finform-react-builder 1.8.43 → 1.8.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,23 +1,23 @@
1
- "use strict";var Kc=Object.defineProperty;var vs=e=>{throw TypeError(e)};var Yc=(e,t,r)=>t in e?Kc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var pn=(e,t,r)=>Yc(e,typeof t!="symbol"?t+"":t,r),Pi=(e,t,r)=>t.has(e)||vs("Cannot "+r);var F=(e,t,r)=>(Pi(e,t,"read from private field"),r?r.call(e):t.get(e)),he=(e,t,r)=>t.has(e)?vs("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ne=(e,t,r,n)=>(Pi(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),ge=(e,t,r)=>(Pi(e,t,"access private method"),r);var Dn=(e,t,r,n)=>({set _(i){ne(e,t,i,r)},get _(){return F(e,t,n)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),$=require("react"),x=require("@mui/material"),Gc=require("@emotion/styled"),Pr=require("@emotion/react");function Qc(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 ie=Qc($);var An=e=>e.type==="checkbox",vr=e=>e instanceof Date,nt=e=>e==null;const ol=e=>typeof e=="object";var Le=e=>!nt(e)&&!Array.isArray(e)&&ol(e)&&!vr(e),ll=e=>Le(e)&&e.target?An(e.target)?e.target.checked:e.target.value:e,Zc=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,cl=(e,t)=>e.has(Zc(t)),Xc=e=>{const t=e.constructor&&e.constructor.prototype;return Le(t)&&t.hasOwnProperty("isPrototypeOf")},Na=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function $e(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(!(Na&&(e instanceof Blob||n))&&(r||Le(e)))if(t=r?[]:{},!r&&!Xc(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=$e(e[i]));else return e;return t}var vi=e=>/^\w*$/.test(e),Oe=e=>e===void 0,bi=e=>Array.isArray(e)?e.filter(Boolean):[],La=e=>bi(e.replace(/["|']|\]/g,"").split(/\.|\[/)),te=(e,t,r)=>{if(!t||!Le(e))return r;const n=(vi(t)?[t]:La(t)).reduce((i,a)=>nt(i)?i:i[a],e);return Oe(n)||n===e?Oe(e[t])?r:e[t]:n},dt=e=>typeof e=="boolean",be=(e,t,r)=>{let n=-1;const i=vi(t)?[t]:La(t),a=i.length,s=a-1;for(;++n<a;){const o=i[n];let c=r;if(n!==s){const d=e[o];c=Le(d)||Array.isArray(d)?d:isNaN(+i[n+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;e[o]=c,e=e[o]}};const Jn={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"},ul=$.createContext(null);ul.displayName="HookFormContext";const wi=()=>$.useContext(ul);var pl=(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 Si=typeof window<"u"?ie.useLayoutEffect:ie.useEffect;function Jc(e){const t=wi(),{control:r=t.control,disabled:n,name:i,exact:a}=e||{},[s,o]=$.useState(r._formState),c=$.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Si(()=>r._subscribe({name:i,formState:c.current,exact:a,callback:d=>{!n&&o({...r._formState,...d})}}),[i,n,a]),$.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),$.useMemo(()=>pl(s,r,c.current,!1),[s,r])}var zt=e=>typeof e=="string",dl=(e,t,r,n,i)=>zt(e)?(n&&t.watch.add(e),te(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),te(r,a))):(n&&(t.watchAll=!0),r);function fl(e){const t=wi(),{control:r=t.control,name:n,defaultValue:i,disabled:a,exact:s}=e||{},o=$.useRef(i),[c,d]=$.useState(r._getWatch(n,o.current));return Si(()=>r._subscribe({name:n,formState:{values:!0},exact:s,callback:h=>!a&&d(dl(n,r._names,h.values||r._formValues,!1,o.current))}),[n,r,a,s]),$.useEffect(()=>r._removeUnmounted()),c}function eu(e){const t=wi(),{name:r,disabled:n,control:i=t.control,shouldUnregister:a}=e,s=cl(i._names.array,r),o=fl({control:i,name:r,defaultValue:te(i._formValues,r,te(i._defaultValues,r,e.defaultValue)),exact:!0}),c=Jc({control:i,name:r,exact:!0}),d=$.useRef(e),h=$.useRef(i.register(r,{...e.rules,value:o,...dt(e.disabled)?{disabled:e.disabled}:{}})),f=$.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!te(c.errors,r)},isDirty:{enumerable:!0,get:()=>!!te(c.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!te(c.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!te(c.validatingFields,r)},error:{enumerable:!0,get:()=>te(c.errors,r)}}),[c,r]),p=$.useCallback(C=>h.current.onChange({target:{value:ll(C),name:r},type:Jn.CHANGE}),[r]),y=$.useCallback(()=>h.current.onBlur({target:{value:te(i._formValues,r),name:r},type:Jn.BLUR}),[r,i._formValues]),k=$.useCallback(C=>{const v=te(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]),m=$.useMemo(()=>({name:r,value:o,...dt(n)||c.disabled?{disabled:c.disabled||n}:{},onChange:p,onBlur:y,ref:k}),[r,n,c.disabled,p,y,k,o]);return $.useEffect(()=>{const C=i._options.shouldUnregister||a;i.register(r,{...d.current.rules,...dt(d.current.disabled)?{disabled:d.current.disabled}:{}});const v=(S,D)=>{const j=te(i._fields,S);j&&j._f&&(j._f.mount=D)};if(v(r,!0),C){const S=$e(te(i._options.defaultValues,r));be(i._defaultValues,r,S),Oe(te(i._formValues,r))&&be(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:m,formState:c,fieldState:f}),[m,c,f])}const Re=e=>e.render(eu(e));var hl=(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],bs=()=>{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=[]}}},la=e=>nt(e)||!ol(e);function Jt(e,t){if(la(e)||la(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)||Le(a)&&Le(s)||Array.isArray(a)&&Array.isArray(s)?!Jt(a,s):a!==s)return!1}}return!0}var rt=e=>Le(e)&&!Object.keys(e).length,qa=e=>e.type==="file",Ft=e=>typeof e=="function",ei=e=>{if(!Na)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ml=e=>e.type==="select-multiple",Wa=e=>e.type==="radio",tu=e=>Wa(e)||An(e),Di=e=>ei(e)&&e.isConnected;function ru(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Oe(e)?n++:e[t[n++]];return e}function nu(e){for(const t in e)if(e.hasOwnProperty(t)&&!Oe(e[t]))return!1;return!0}function Ue(e,t){const r=Array.isArray(t)?t:vi(t)?[t]:La(t),n=r.length===1?e:ru(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(Le(n)&&rt(n)||Array.isArray(n)&&nu(n))&&Ue(e,r.slice(0,-1)),e}var xl=e=>{for(const t in e)if(Ft(e[t]))return!0;return!1};function ti(e,t={}){const r=Array.isArray(e);if(Le(e)||r)for(const n in e)Array.isArray(e[n])||Le(e[n])&&!xl(e[n])?(t[n]=Array.isArray(e[n])?[]:{},ti(e[n],t[n])):nt(e[n])||(t[n]=!0);return t}function gl(e,t,r){const n=Array.isArray(e);if(Le(e)||n)for(const i in e)Array.isArray(e[i])||Le(e[i])&&!xl(e[i])?Oe(t)||la(r[i])?r[i]=Array.isArray(e[i])?ti(e[i],[]):{...ti(e[i])}:gl(e[i],nt(t)?{}:t[i],r[i]):r[i]=!Jt(e[i],t[i]);return r}var dn=(e,t)=>gl(e,t,ti(t));const ws={value:!1,isValid:!1},Ss={value:!0,isValid:!0};var yl=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&&!Oe(e[0].attributes.value)?Oe(e[0].value)||e[0].value===""?Ss:{value:e[0].value,isValid:!0}:Ss:ws}return ws},vl=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Oe(e)?e:t?e===""?NaN:e&&+e:r&&zt(e)?new Date(e):n?n(e):e;const Cs={isValid:!1,value:null};var bl=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Cs):Cs;function Es(e){const t=e.ref;return qa(t)?t.files:Wa(t)?bl(e.refs).value:ml(t)?[...t.selectedOptions].map(({value:r})=>r):An(t)?yl(e.refs).value:vl(Oe(t.value)?e.ref.value:t.value,e)}var iu=(e,t,r,n)=>{const i={};for(const a of e){const s=te(t,a);s&&be(i,a,s._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},ri=e=>e instanceof RegExp,fn=e=>Oe(e)?e:ri(e)?e.source:Le(e)?ri(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 ks="AsyncFunction";var au=e=>!!e&&!!e.validate&&!!(Ft(e.validate)&&e.validate.constructor.name===ks||Le(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===ks)),su=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ca=(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=te(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(Le(o)&&Kr(o,t))break}}};function Ts(e,t,r){const n=te(e,r);if(n||vi(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),s=te(t,a),o=te(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 ou=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return rt(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(s=>t[s]===(!n||Ct.all))},lu=(e,t,r)=>!e||!t||e===t||ct(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),cu=(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,uu=(e,t)=>!bi(te(e,t)).length&&Ue(e,t),wl=(e,t,r)=>{const n=ct(te(e,r));return be(n,"root",t[r]),be(e,r,n),e},Hn=e=>zt(e);function js(e,t,r="validate"){if(Hn(e)||Array.isArray(e)&&e.every(Hn)||dt(e)&&!e)return{type:r,message:Hn(e)?e:"",ref:t}}var zr=e=>Le(e)&&!ri(e)?e:{value:e,message:""},ua=async(e,t,r,n,i,a)=>{const{ref:s,refs:o,required:c,maxLength:d,minLength:h,min:f,max:p,pattern:y,validate:k,name:m,valueAsNumber:C,mount:v}=e._f,S=te(r,m);if(!v||t.has(m))return{};const D=o?o[0]:s,j=L=>{i&&D.reportValidity&&(D.setCustomValidity(dt(L)?"":L||""),D.reportValidity())},E={},R=Wa(s),z=An(s),_=R||z,I=(C||qa(s))&&Oe(s.value)&&Oe(S)||ei(s)&&s.value===""||S===""||Array.isArray(S)&&!S.length,u=hl.bind(null,m,n,E),P=(L,A,B,Y=Bt.maxLength,ae=Bt.minLength)=>{const de=L?A:B;E[m]={type:L?Y:ae,message:de,ref:s,...u(L?Y:ae,de)}};if(a?!Array.isArray(S)||!S.length:c&&(!_&&(I||nt(S))||dt(S)&&!S||z&&!yl(o).isValid||R&&!bl(o).isValid)){const{value:L,message:A}=Hn(c)?{value:!!c,message:c}:zr(c);if(L&&(E[m]={type:Bt.required,message:A,ref:D,...u(Bt.required,A)},!n))return j(A),E}if(!I&&(!nt(f)||!nt(p))){let L,A;const B=zr(p),Y=zr(f);if(!nt(S)&&!isNaN(S)){const ae=s.valueAsNumber||S&&+S;nt(B.value)||(L=ae>B.value),nt(Y.value)||(A=ae<Y.value)}else{const ae=s.valueAsDate||new Date(S),de=q=>new Date(new Date().toDateString()+" "+q),ce=s.type=="time",Q=s.type=="week";zt(B.value)&&S&&(L=ce?de(S)>de(B.value):Q?S>B.value:ae>new Date(B.value)),zt(Y.value)&&S&&(A=ce?de(S)<de(Y.value):Q?S<Y.value:ae<new Date(Y.value))}if((L||A)&&(P(!!L,B.message,Y.message,Bt.max,Bt.min),!n))return j(E[m].message),E}if((d||h)&&!I&&(zt(S)||a&&Array.isArray(S))){const L=zr(d),A=zr(h),B=!nt(L.value)&&S.length>+L.value,Y=!nt(A.value)&&S.length<+A.value;if((B||Y)&&(P(B,L.message,A.message),!n))return j(E[m].message),E}if(y&&!I&&zt(S)){const{value:L,message:A}=zr(y);if(ri(L)&&!S.match(L)&&(E[m]={type:Bt.pattern,message:A,ref:s,...u(Bt.pattern,A)},!n))return j(A),E}if(k){if(Ft(k)){const L=await k(S,r),A=js(L,D);if(A&&(E[m]={...A,...u(Bt.validate,A.message)},!n))return j(A.message),E}else if(Le(k)){let L={};for(const A in k){if(!rt(L)&&!n)break;const B=js(await k[A](S,r),D,A);B&&(L={...B,...u(A,B.message)},j(B.message),n&&(E[m]=L))}if(!rt(L)&&(E[m]={ref:D,...L},!n))return E}}return j(!0),E};const pu={mode:Ct.onSubmit,reValidateMode:Ct.onChange,shouldFocusError:!0};function du(e={}){let t={...pu,...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=Le(t.defaultValues)||Le(t.values)?$e(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:$e(i),s={action:!1,mount:!1,watch:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,d=0;const h={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let f={...h};const p={array:bs(),state:bs()},y=t.criteriaMode===Ct.all,k=g=>w=>{clearTimeout(d),d=setTimeout(g,w)},m=async g=>{if(!t.disabled&&(h.isValid||f.isValid||g)){const w=t.resolver?rt((await z()).errors):await I(n,!0);w!==r.isValid&&p.state.next({isValid:w})}},C=(g,w)=>{!t.disabled&&(h.isValidating||h.validatingFields||f.isValidating||f.validatingFields)&&((g||Array.from(o.mount)).forEach(b=>{b&&(w?be(r.validatingFields,b,w):Ue(r.validatingFields,b))}),p.state.next({validatingFields:r.validatingFields,isValidating:!rt(r.validatingFields)}))},v=(g,w=[],b,N,O=!0,M=!0)=>{if(N&&b&&!t.disabled){if(s.action=!0,M&&Array.isArray(te(n,g))){const Z=b(te(n,g),N.argA,N.argB);O&&be(n,g,Z)}if(M&&Array.isArray(te(r.errors,g))){const Z=b(te(r.errors,g),N.argA,N.argB);O&&be(r.errors,g,Z),uu(r.errors,g)}if((h.touchedFields||f.touchedFields)&&M&&Array.isArray(te(r.touchedFields,g))){const Z=b(te(r.touchedFields,g),N.argA,N.argB);O&&be(r.touchedFields,g,Z)}(h.dirtyFields||f.dirtyFields)&&(r.dirtyFields=dn(i,a)),p.state.next({name:g,isDirty:P(g,w),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else be(a,g,w)},S=(g,w)=>{be(r.errors,g,w),p.state.next({errors:r.errors})},D=g=>{r.errors=g,p.state.next({errors:r.errors,isValid:!1})},j=(g,w,b,N)=>{const O=te(n,g);if(O){const M=te(a,g,Oe(b)?te(i,g):b);Oe(M)||N&&N.defaultChecked||w?be(a,g,w?M:Es(O._f)):B(g,M),s.mount&&m()}},E=(g,w,b,N,O)=>{let M=!1,Z=!1;const ee={name:g};if(!t.disabled){if(!b||N){(h.isDirty||f.isDirty)&&(Z=r.isDirty,r.isDirty=ee.isDirty=P(),M=Z!==ee.isDirty);const U=Jt(te(i,g),w);Z=!!te(r.dirtyFields,g),U?Ue(r.dirtyFields,g):be(r.dirtyFields,g,!0),ee.dirtyFields=r.dirtyFields,M=M||(h.dirtyFields||f.dirtyFields)&&Z!==!U}if(b){const U=te(r.touchedFields,g);U||(be(r.touchedFields,g,b),ee.touchedFields=r.touchedFields,M=M||(h.touchedFields||f.touchedFields)&&U!==b)}M&&O&&p.state.next(ee)}return M?ee:{}},R=(g,w,b,N)=>{const O=te(r.errors,g),M=(h.isValid||f.isValid)&&dt(w)&&r.isValid!==w;if(t.delayError&&b?(c=k(()=>S(g,b)),c(t.delayError)):(clearTimeout(d),c=null,b?be(r.errors,g,b):Ue(r.errors,g)),(b?!Jt(O,b):O)||!rt(N)||M){const Z={...N,...M&&dt(w)?{isValid:w}:{},errors:r.errors,name:g};r={...r,...Z},p.state.next(Z)}},z=async g=>{C(g,!0);const w=await t.resolver(a,t.context,iu(g||o.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return C(g),w},_=async g=>{const{errors:w}=await z(g);if(g)for(const b of g){const N=te(w,b);N?be(r.errors,b,N):Ue(r.errors,b)}else r.errors=w;return w},I=async(g,w,b={valid:!0})=>{for(const N in g){const O=g[N];if(O){const{_f:M,...Z}=O;if(M){const ee=o.array.has(M.name),U=O._f&&au(O._f);U&&h.validatingFields&&C([N],!0);const xe=await ua(O,o.disabled,a,y,t.shouldUseNativeValidation&&!w,ee);if(U&&h.validatingFields&&C([N]),xe[M.name]&&(b.valid=!1,w))break;!w&&(te(xe,M.name)?ee?wl(r.errors,xe,M.name):be(r.errors,M.name,xe[M.name]):Ue(r.errors,M.name))}!rt(Z)&&await I(Z,w,b)}}return b.valid},u=()=>{for(const g of o.unMount){const w=te(n,g);w&&(w._f.refs?w._f.refs.every(b=>!Di(b)):!Di(w._f.ref))&&J(g)}o.unMount=new Set},P=(g,w)=>!t.disabled&&(g&&w&&be(a,g,w),!Jt(q(),i)),L=(g,w,b)=>dl(g,o,{...s.mount?a:Oe(w)?i:zt(g)?{[g]:w}:w},b,w),A=g=>bi(te(s.mount?a:i,g,t.shouldUnregister?te(i,g,[]):[])),B=(g,w,b={})=>{const N=te(n,g);let O=w;if(N){const M=N._f;M&&(!M.disabled&&be(a,g,vl(w,M)),O=ei(M.ref)&&nt(w)?"":w,ml(M.ref)?[...M.ref.options].forEach(Z=>Z.selected=O.includes(Z.value)):M.refs?An(M.ref)?M.refs.forEach(Z=>{(!Z.defaultChecked||!Z.disabled)&&(Array.isArray(O)?Z.checked=!!O.find(ee=>ee===Z.value):Z.checked=O===Z.value||!!O)}):M.refs.forEach(Z=>Z.checked=Z.value===O):qa(M.ref)?M.ref.value="":(M.ref.value=O,M.ref.type||p.state.next({name:g,values:$e(a)})))}(b.shouldDirty||b.shouldTouch)&&E(g,O,b.shouldTouch,b.shouldDirty,!0),b.shouldValidate&&Q(g)},Y=(g,w,b)=>{for(const N in w){if(!w.hasOwnProperty(N))return;const O=w[N],M=g+"."+N,Z=te(n,M);(o.array.has(g)||Le(O)||Z&&!Z._f)&&!vr(O)?Y(M,O,b):B(M,O,b)}},ae=(g,w,b={})=>{const N=te(n,g),O=o.array.has(g),M=$e(w);be(a,g,M),O?(p.array.next({name:g,values:$e(a)}),(h.isDirty||h.dirtyFields||f.isDirty||f.dirtyFields)&&b.shouldDirty&&p.state.next({name:g,dirtyFields:dn(i,a),isDirty:P(g,M)})):N&&!N._f&&!nt(M)?Y(g,M,b):B(g,M,b),ca(g,o)&&p.state.next({...r}),p.state.next({name:s.mount?g:void 0,values:$e(a)})},de=async g=>{s.mount=!0;const w=g.target;let b=w.name,N=!0;const O=te(n,b),M=U=>{N=Number.isNaN(U)||vr(U)&&isNaN(U.getTime())||Jt(U,te(a,b,U))},Z=Ur(t.mode),ee=Ur(t.reValidateMode);if(O){let U,xe;const Ee=w.type?Es(O._f):ll(g),ke=g.type===Jn.BLUR||g.type===Jn.FOCUS_OUT,Me=!su(O._f)&&!t.resolver&&!te(r.errors,b)&&!O._f.deps||cu(ke,te(r.touchedFields,b),r.isSubmitted,ee,Z),Ne=ca(b,o,ke);be(a,b,Ee),ke?(O._f.onBlur&&O._f.onBlur(g),c&&c(0)):O._f.onChange&&O._f.onChange(g);const Xe=E(b,Ee,ke),Ot=!rt(Xe)||Ne;if(!ke&&p.state.next({name:b,type:g.type,values:$e(a)}),Me)return(h.isValid||f.isValid)&&(t.mode==="onBlur"?ke&&m():ke||m()),Ot&&p.state.next({name:b,...Ne?{}:Xe});if(!ke&&Ne&&p.state.next({...r}),t.resolver){const{errors:Je}=await z([b]);if(M(Ee),N){const Ke=Ts(r.errors,n,b),pt=Ts(Je,n,Ke.name||b);U=pt.error,b=pt.name,xe=rt(Je)}}else C([b],!0),U=(await ua(O,o.disabled,a,y,t.shouldUseNativeValidation))[b],C([b]),M(Ee),N&&(U?xe=!1:(h.isValid||f.isValid)&&(xe=await I(n,!0)));N&&(O._f.deps&&Q(O._f.deps),R(b,xe,U,Xe))}},ce=(g,w)=>{if(te(r.errors,w)&&g.focus)return g.focus(),1},Q=async(g,w={})=>{let b,N;const O=ct(g);if(t.resolver){const M=await _(Oe(g)?g:O);b=rt(M),N=g?!O.some(Z=>te(M,Z)):b}else g?(N=(await Promise.all(O.map(async M=>{const Z=te(n,M);return await I(Z&&Z._f?{[M]:Z}:Z)}))).every(Boolean),!(!N&&!r.isValid)&&m()):N=b=await I(n);return p.state.next({...!zt(g)||(h.isValid||f.isValid)&&b!==r.isValid?{}:{name:g},...t.resolver||!g?{isValid:b}:{},errors:r.errors}),w.shouldFocus&&!N&&Kr(n,ce,g?O:o.mount),N},q=g=>{const w={...s.mount?a:i};return Oe(g)?w:zt(g)?te(w,g):g.map(b=>te(w,b))},G=(g,w)=>({invalid:!!te((w||r).errors,g),isDirty:!!te((w||r).dirtyFields,g),error:te((w||r).errors,g),isValidating:!!te(r.validatingFields,g),isTouched:!!te((w||r).touchedFields,g)}),ue=g=>{g&&ct(g).forEach(w=>Ue(r.errors,w)),p.state.next({errors:g?r.errors:{}})},fe=(g,w,b)=>{const N=(te(n,g,{_f:{}})._f||{}).ref,O=te(r.errors,g)||{},{ref:M,message:Z,type:ee,...U}=O;be(r.errors,g,{...U,...w,ref:N}),p.state.next({name:g,errors:r.errors,isValid:!1}),b&&b.shouldFocus&&N&&N.focus&&N.focus()},pe=(g,w)=>Ft(g)?p.state.subscribe({next:b=>g(L(void 0,w),b)}):L(g,w,!0),me=g=>p.state.subscribe({next:w=>{lu(g.name,w.name,g.exact)&&ou(w,g.formState||h,He,g.reRenderRoot)&&g.callback({values:{...a},...r,...w})}}).unsubscribe,W=g=>(s.mount=!0,f={...f,...g.formState},me({...g,formState:f})),J=(g,w={})=>{for(const b of g?ct(g):o.mount)o.mount.delete(b),o.array.delete(b),w.keepValue||(Ue(n,b),Ue(a,b)),!w.keepError&&Ue(r.errors,b),!w.keepDirty&&Ue(r.dirtyFields,b),!w.keepTouched&&Ue(r.touchedFields,b),!w.keepIsValidating&&Ue(r.validatingFields,b),!t.shouldUnregister&&!w.keepDefaultValue&&Ue(i,b);p.state.next({values:$e(a)}),p.state.next({...r,...w.keepDirty?{isDirty:P()}:{}}),!w.keepIsValid&&m()},re=({disabled:g,name:w})=>{(dt(g)&&s.mount||g||o.disabled.has(w))&&(g?o.disabled.add(w):o.disabled.delete(w))},oe=(g,w={})=>{let b=te(n,g);const N=dt(w.disabled)||dt(t.disabled);return be(n,g,{...b||{},_f:{...b&&b._f?b._f:{ref:{name:g}},name:g,mount:!0,...w}}),o.mount.add(g),b?re({disabled:dt(w.disabled)?w.disabled:t.disabled,name:g}):j(g,!0,w.value),{...N?{disabled:w.disabled||t.disabled}:{},...t.progressive?{required:!!w.required,min:fn(w.min),max:fn(w.max),minLength:fn(w.minLength),maxLength:fn(w.maxLength),pattern:fn(w.pattern)}:{},name:g,onChange:de,onBlur:de,ref:O=>{if(O){oe(g,w),b=te(n,g);const M=Oe(O.value)&&O.querySelectorAll&&O.querySelectorAll("input,select,textarea")[0]||O,Z=tu(M),ee=b._f.refs||[];if(Z?ee.find(U=>U===M):M===b._f.ref)return;be(n,g,{_f:{...b._f,...Z?{refs:[...ee.filter(Di),M,...Array.isArray(te(i,g))?[{}]:[]],ref:{type:M.type,name:g}}:{ref:M}}}),j(g,!1,void 0,M)}else b=te(n,g,{}),b._f&&(b._f.mount=!1),(t.shouldUnregister||w.shouldUnregister)&&!(cl(o.array,g)&&s.action)&&o.unMount.add(g)}}},le=()=>t.shouldFocusError&&Kr(n,ce,o.mount),ve=g=>{dt(g)&&(p.state.next({disabled:g}),Kr(n,(w,b)=>{const N=te(n,b);N&&(w.disabled=N._f.disabled||g,Array.isArray(N._f.refs)&&N._f.refs.forEach(O=>{O.disabled=N._f.disabled||g}))},0,!1))},X=(g,w)=>async b=>{let N;b&&(b.preventDefault&&b.preventDefault(),b.persist&&b.persist());let O=$e(a);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:M,values:Z}=await z();r.errors=M,O=Z}else await I(n);if(o.disabled.size)for(const M of o.disabled)be(O,M,void 0);if(Ue(r.errors,"root"),rt(r.errors)){p.state.next({errors:{}});try{await g(O,b)}catch(M){N=M}}else w&&await w({...r.errors},b),le(),setTimeout(le);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:rt(r.errors)&&!N,submitCount:r.submitCount+1,errors:r.errors}),N)throw N},Ie=(g,w={})=>{te(n,g)&&(Oe(w.defaultValue)?ae(g,$e(te(i,g))):(ae(g,w.defaultValue),be(i,g,$e(w.defaultValue))),w.keepTouched||Ue(r.touchedFields,g),w.keepDirty||(Ue(r.dirtyFields,g),r.isDirty=w.defaultValue?P(g,$e(te(i,g))):P()),w.keepError||(Ue(r.errors,g),h.isValid&&m()),p.state.next({...r}))},We=(g,w={})=>{const b=g?$e(g):i,N=$e(b),O=rt(g),M=O?i:N;if(w.keepDefaultValues||(i=b),!w.keepValues){if(w.keepDirtyValues){const Z=new Set([...o.mount,...Object.keys(dn(i,a))]);for(const ee of Array.from(Z))te(r.dirtyFields,ee)?be(M,ee,te(a,ee)):ae(ee,te(M,ee))}else{if(Na&&Oe(g))for(const Z of o.mount){const ee=te(n,Z);if(ee&&ee._f){const U=Array.isArray(ee._f.refs)?ee._f.refs[0]:ee._f.ref;if(ei(U)){const xe=U.closest("form");if(xe){xe.reset();break}}}}for(const Z of o.mount)ae(Z,te(M,Z))}a=$e(M),p.array.next({values:{...M}}),p.state.next({values:{...M}})}o={mount:w.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!h.isValid||!!w.keepIsValid||!!w.keepDirtyValues,s.watch=!!t.shouldUnregister,p.state.next({submitCount:w.keepSubmitCount?r.submitCount:0,isDirty:O?!1:w.keepDirty?r.isDirty:!!(w.keepDefaultValues&&!Jt(g,i)),isSubmitted:w.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:O?{}:w.keepDirtyValues?w.keepDefaultValues&&a?dn(i,a):r.dirtyFields:w.keepDefaultValues&&g?dn(i,g):w.keepDirty?r.dirtyFields:{},touchedFields:w.keepTouched?r.touchedFields:{},errors:w.keepErrors?r.errors:{},isSubmitSuccessful:w.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Qe=(g,w)=>We(Ft(g)?g(a):g,w),gt=(g,w={})=>{const b=te(n,g),N=b&&b._f;if(N){const O=N.refs?N.refs[0]:N.ref;O.focus&&(O.focus(),w.shouldSelect&&Ft(O.select)&&O.select())}},He=g=>{r={...r,...g}},se={control:{register:oe,unregister:J,getFieldState:G,handleSubmit:X,setError:fe,_subscribe:me,_runSchema:z,_focusError:le,_getWatch:L,_getDirty:P,_setValid:m,_setFieldArray:v,_setDisabledField:re,_setErrors:D,_getFieldArray:A,_reset:We,_resetDefaultValues:()=>Ft(t.defaultValues)&&t.defaultValues().then(g=>{Qe(g,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:u,_disableForm:ve,_subjects:p,_proxyFormState:h,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:W,trigger:Q,register:oe,handleSubmit:X,watch:pe,setValue:ae,getValues:q,reset:Qe,resetField:Ie,clearErrors:ue,unregister:J,setError:fe,setFocus:gt,getFieldState:G};return{...se,formControl:se}}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)})},Ii=(e,t,r={})=>r.shouldFocus||Oe(r.shouldFocus)?r.focusName||`${e}.${Oe(r.focusIndex)?t:r.focusIndex}.`:"",Mi=(e,t)=>[...e,...ct(t)],zi=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Bi(e,t,r){return[...e.slice(0,t),...ct(r),...e.slice(t)]}var Vi=(e,t,r)=>Array.isArray(e)?(Oe(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],Ni=(e,t)=>[...ct(t),...ct(e)];function fu(e,t){let r=0;const n=[...e];for(const i of t)n.splice(i-r,1),r++;return bi(n).length?n:[]}var Li=(e,t)=>Oe(t)?[]:fu(e,ct(t).sort((r,n)=>r-n)),qi=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},Fs=(e,t,r)=>(e[t]=r,e);function hu(e){const t=wi(),{control:r=t.control,name:n,keyName:i="id",shouldUnregister:a,rules:s}=e,[o,c]=$.useState(r._getFieldArray(n)),d=$.useRef(r._getFieldArray(n).map(Gt)),h=$.useRef(o),f=$.useRef(n),p=$.useRef(!1);f.current=n,h.current=o,r._names.array.add(n),s&&r.register(n,s),Si(()=>r._subjects.array.subscribe({next:({values:R,name:z})=>{if(z===f.current||!z){const _=te(R,f.current);Array.isArray(_)&&(c(_),d.current=_.map(Gt))}}}).unsubscribe,[r]);const y=$.useCallback(R=>{p.current=!0,r._setFieldArray(n,R)},[r,n]),k=(R,z)=>{const _=ct($e(R)),I=Mi(r._getFieldArray(n),_);r._names.focus=Ii(n,I.length-1,z),d.current=Mi(d.current,_.map(Gt)),y(I),c(I),r._setFieldArray(n,I,Mi,{argA:zi(R)})},m=(R,z)=>{const _=ct($e(R)),I=Ni(r._getFieldArray(n),_);r._names.focus=Ii(n,0,z),d.current=Ni(d.current,_.map(Gt)),y(I),c(I),r._setFieldArray(n,I,Ni,{argA:zi(R)})},C=R=>{const z=Li(r._getFieldArray(n),R);d.current=Li(d.current,R),y(z),c(z),!Array.isArray(te(r._fields,n))&&be(r._fields,n,void 0),r._setFieldArray(n,z,Li,{argA:R})},v=(R,z,_)=>{const I=ct($e(z)),u=Bi(r._getFieldArray(n),R,I);r._names.focus=Ii(n,R,_),d.current=Bi(d.current,R,I.map(Gt)),y(u),c(u),r._setFieldArray(n,u,Bi,{argA:R,argB:zi(z)})},S=(R,z)=>{const _=r._getFieldArray(n);qi(_,R,z),qi(d.current,R,z),y(_),c(_),r._setFieldArray(n,_,qi,{argA:R,argB:z},!1)},D=(R,z)=>{const _=r._getFieldArray(n);Vi(_,R,z),Vi(d.current,R,z),y(_),c(_),r._setFieldArray(n,_,Vi,{argA:R,argB:z},!1)},j=(R,z)=>{const _=$e(z),I=Fs(r._getFieldArray(n),R,_);d.current=[...I].map((u,P)=>!u||P===R?Gt():d.current[P]),y(I),c([...I]),r._setFieldArray(n,I,Fs,{argA:R,argB:_},!0,!1)},E=R=>{const z=ct($e(R));d.current=z.map(Gt),y([...z]),c([...z]),r._setFieldArray(n,[...z],_=>_,{},!0,!1)};return $.useEffect(()=>{if(r._state.action=!1,ca(n,r._names)&&r._subjects.state.next({...r._formState}),p.current&&(!Ur(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!Ur(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([n]).then(R=>{const z=te(R.errors,n),_=te(r._formState.errors,n);(_?!z&&_.type||z&&(_.type!==z.type||_.message!==z.message):z&&z.type)&&(z?be(r._formState.errors,n,z):Ue(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const R=te(r._fields,n);R&&R._f&&!(Ur(r._options.reValidateMode).isOnSubmit&&Ur(r._options.mode).isOnSubmit)&&ua(R,r._names.disabled,r._formValues,r._options.criteriaMode===Ct.all,r._options.shouldUseNativeValidation,!0).then(z=>!rt(z)&&r._subjects.state.next({errors:wl(r._formState.errors,z,n)}))}r._subjects.state.next({name:n,values:$e(r._formValues)}),r._names.focus&&Kr(r._fields,(R,z)=>{if(r._names.focus&&z.startsWith(r._names.focus)&&R.focus)return R.focus(),1}),r._names.focus="",r._setValid(),p.current=!1},[o,n,r]),$.useEffect(()=>(!te(r._formValues,n)&&r._setFieldArray(n),()=>{const R=(z,_)=>{const I=te(r._fields,z);I&&I._f&&(I._f.mount=_)};r._options.shouldUnregister||a?r.unregister(n):R(n,!1)}),[n,r,i,a]),{swap:$.useCallback(S,[y,n,r]),move:$.useCallback(D,[y,n,r]),prepend:$.useCallback(m,[y,n,r]),append:$.useCallback(k,[y,n,r]),remove:$.useCallback(C,[y,n,r]),insert:$.useCallback(v,[y,n,r]),update:$.useCallback(j,[y,n,r]),replace:$.useCallback(E,[y,n,r]),fields:$.useMemo(()=>o.map((R,z)=>({...R,[i]:d.current[z]||Gt()})),[o,i])}}function mu(e={}){const t=$.useRef(void 0),r=$.useRef(void 0),[n,i]=$.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}=du(e);t.current={...o,formState:n}}const a=t.current.control;return a._options=e,Si(()=>{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&&!Jt(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=pl(n,a),t.current}const As=(e,t,r)=>{if(e&&"reportValidity"in e){const n=te(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Sl=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?As(n.ref,r,e):n&&n.refs&&n.refs.forEach(i=>As(i,r,e))}},xu=(e,t)=>{t.shouldUseNativeValidation&&Sl(e,t);const r={};for(const n in e){const i=te(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(gu(t.names||Object.keys(e),n)){const s=Object.assign({},te(r,n));be(s,"root",a),be(r,n,s)}else be(r,n,a)}return r},gu=(e,t)=>{const r=Os(t);return e.some(n=>Os(n).match(`^${r}\\.\\d+`))};function Os(e){return e.replace(/\]|\[/g,"")}function yu(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{return Promise.resolve(function(s,o){try{var c=(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&&Sl({},a),{values:r.raw?Object.assign({},n):d,errors:{}}}))}catch(d){return o(d)}return c&&c.then?c.then(void 0,o):c}(0,function(s){if(!s.inner)throw s;return{values:{},errors:xu((o=s,c=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(o.inner||[]).reduce(function(d,h){if(d[h.path]||(d[h.path]={message:h.message,type:h.type}),c){var f=d[h.path].types,p=f&&f[h.type];d[h.path]=hl(h.path,c,d,h.type,p?[].concat(p,h.message):h.message)}return d},{})),a)};var o,c}))}catch(s){return Promise.reject(s)}}}var On=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 ot(){}function vu(e,t){return typeof e=="function"?e(t):e}function pa(e){return typeof e=="number"&&e>=0&&e!==1/0}function Cl(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 _s(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==Ua(s,t.options))return!1}else if(!Sn(t.queryKey,s))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||a&&!a(t))}function Rs(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 Ua(e,t){return((t==null?void 0:t.queryKeyHashFn)||wn)(e)}function wn(e){return JSON.stringify(e,(t,r)=>ha(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 da(e,t){if(e===t)return e;const r=$s(e)&&$s(t);if(r||ha(e)&&ha(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),s=a.length,o=r?[]:{},c=new Set(n);let d=0;for(let h=0;h<s;h++){const f=r?h:a[h];(!r&&c.has(f)||r)&&e[f]===void 0&&t[f]===void 0?(o[f]=void 0,d++):(o[f]=da(e[f],t[f]),o[f]===e[f]&&e[f]!==void 0&&d++)}return i===s&&d===i?e:o}return t}function fa(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 $s(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ha(e){if(!Ps(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Ps(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ps(e){return Object.prototype.toString.call(e)==="[object Object]"}function bu(e){return new Promise(t=>{setTimeout(t,e)})}function ma(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 da(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 da(e,t)}return t}function wu(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Su(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var ni=Symbol();function El(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===ni&&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===ni?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Cu(e,t){return typeof e=="function"?e(...t):!!e}var Sr,er,Gr,Xo,Eu=(Xo=class extends On{constructor(){super();he(this,Sr);he(this,er);he(this,Gr);ne(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),ne(this,er,void 0))}setEventListener(t){var r;ne(this,Gr,t),(r=F(this,er))==null||r.call(this),ne(this,er,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){F(this,Sr)!==t&&(ne(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,Xo),Ha=new Eu,Qr,tr,Zr,Jo,ku=(Jo=class extends On{constructor(){super();he(this,Qr,!0);he(this,tr);he(this,Zr);ne(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),ne(this,tr,void 0))}setEventListener(t){var r;ne(this,Zr,t),(r=F(this,tr))==null||r.call(this),ne(this,tr,t(this.setOnline.bind(this)))}setOnline(t){F(this,Qr)!==t&&(ne(this,Qr,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return F(this,Qr)}},Qr=new WeakMap,tr=new WeakMap,Zr=new WeakMap,Jo),ii=new ku;function xa(){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 Tu(e){return Math.min(1e3*2**e,3e4)}function kl(e){return(e??"online")==="online"?ii.isOnline():!0}var Tl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Wi(e){return e instanceof Tl}function jl(e){let t=!1,r=0,n=!1,i;const a=xa(),s=m=>{var C;n||(p(new Tl(m)),(C=e.abort)==null||C.call(e))},o=()=>{t=!0},c=()=>{t=!1},d=()=>Ha.isFocused()&&(e.networkMode==="always"||ii.isOnline())&&e.canRun(),h=()=>kl(e.networkMode)&&e.canRun(),f=m=>{var C;n||(n=!0,(C=e.onSuccess)==null||C.call(e,m),i==null||i(),a.resolve(m))},p=m=>{var C;n||(n=!0,(C=e.onError)==null||C.call(e,m),i==null||i(),a.reject(m))},y=()=>new Promise(m=>{var C;i=v=>{(n||d())&&m(v)},(C=e.onPause)==null||C.call(e)}).then(()=>{var m;i=void 0,n||(m=e.onContinue)==null||m.call(e)}),k=()=>{if(n)return;let m;const C=r===0?e.initialPromise:void 0;try{m=C??e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(f).catch(v=>{var R;if(n)return;const S=e.retry??(Rr?0:3),D=e.retryDelay??Tu,j=typeof D=="function"?D(r,v):D,E=S===!0||typeof S=="number"&&r<S||typeof S=="function"&&S(r,v);if(t||!E){p(v);return}r++,(R=e.onFail)==null||R.call(e,r,v),bu(j).then(()=>d()?void 0:y()).then(()=>{t?p(v):k()})})};return{promise:a,cancel:s,continue:()=>(i==null||i(),a),cancelRetry:o,continueRetry:c,canStart:h,start:()=>(h()?k():y().then(k),a)}}var ju=e=>setTimeout(e,0);function Fu(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=ju;const a=o=>{t?e.push(o):i(()=>{r(o)})},s=()=>{const o=e;e=[],o.length&&i(()=>{n(()=>{o.forEach(c=>{r(c)})})})};return{batch:o=>{let c;t++;try{c=o()}finally{t--,t||s()}return c},batchCalls:o=>(...c)=>{a(()=>{o(...c)})},schedule:a,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{i=o}}}var Ye=Fu(),Cr,el,Fl=(el=class{constructor(){he(this,Cr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),pa(this.gcTime)&&ne(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)),ne(this,Cr,void 0))}},Cr=new WeakMap,el),Xr,Er,yt,kr,Ze,kn,Tr,Tt,Wt,tl,Au=(tl=class extends Fl{constructor(t){super();he(this,Tt);he(this,Xr);he(this,Er);he(this,yt);he(this,kr);he(this,Ze);he(this,kn);he(this,Tr);ne(this,Tr,!1),ne(this,kn,t.defaultOptions),this.setOptions(t.options),this.observers=[],ne(this,kr,t.client),ne(this,yt,F(this,kr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ne(this,Xr,Ou(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,Ze))==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=ma(this.state.data,t,this.options);return ge(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){ge(this,Tt,Wt).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=F(this,Ze))==null?void 0:n.promise;return(i=F(this,Ze))==null||i.cancel(t),r?r.then(ot).catch(ot):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===ni||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:!Cl(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=F(this,Ze))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=F(this,Ze))==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,Ze)&&(F(this,Tr)?F(this,Ze).cancel({revert:!0}):F(this,Ze).cancelRetry()),this.scheduleGc()),F(this,yt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ge(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,Ze))return F(this,Ze).continueRetry(),F(this,Ze).promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(y=>y.options.queryFn);p&&this.setOptions(p.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=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(ne(this,Tr,!0),n.signal)})},a=()=>{const p=El(this.options,r),k=(()=>{const m={client:F(this,kr),queryKey:this.queryKey,meta:this.meta};return i(m),m})();return ne(this,Tr,!1),this.options.persister?this.options.persister(p,k,this):p(k)},o=(()=>{const p={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:F(this,kr),state:this.state,fetchFn:a};return i(p),p})();(d=this.options.behavior)==null||d.onFetch(o,this),ne(this,Er,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=o.fetchOptions)==null?void 0:h.meta))&&ge(this,Tt,Wt).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const c=p=>{var y,k,m,C;Wi(p)&&p.silent||ge(this,Tt,Wt).call(this,{type:"error",error:p}),Wi(p)||((k=(y=F(this,yt).config).onError)==null||k.call(y,p,this),(C=(m=F(this,yt).config).onSettled)==null||C.call(m,this.state.data,p,this)),this.scheduleGc()};return ne(this,Ze,jl({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:p=>{var y,k,m,C;if(p===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}`),c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(v){c(v);return}(k=(y=F(this,yt).config).onSuccess)==null||k.call(y,p,this),(C=(m=F(this,yt).config).onSettled)==null||C.call(m,p,this.state.error,this),this.scheduleGc()},onError:c,onFail:(p,y)=>{ge(this,Tt,Wt).call(this,{type:"failed",failureCount:p,error:y})},onPause:()=>{ge(this,Tt,Wt).call(this,{type:"pause"})},onContinue:()=>{ge(this,Tt,Wt).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),F(this,Ze).start()}},Xr=new WeakMap,Er=new WeakMap,yt=new WeakMap,kr=new WeakMap,Ze=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,...Al(n.data,this.options),fetchMeta:t.meta??null};case"success":return ne(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 Wi(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),Ye.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),F(this,yt).notify({query:this,type:"updated",action:t})})},tl);function Al(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:kl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ou(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,rl,_u=(rl=class extends On{constructor(t={}){super();he(this,Pt);this.config=t,ne(this,Pt,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??Ua(i,r);let s=this.get(a);return s||(s=new Au({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(){Ye.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=>_s(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>_s(t,n)):r}notify(t){Ye.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ye.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ye.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Pt=new WeakMap,rl),Dt,et,jr,It,Zt,nl,Ru=(nl=class extends Fl{constructor(t){super();he(this,It);he(this,Dt);he(this,et);he(this,jr);this.mutationId=t.mutationId,ne(this,et,t.mutationCache),ne(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,et).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ne(this,Dt,F(this,Dt).filter(r=>r!==t)),this.scheduleGc(),F(this,et).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){F(this,Dt).length||(this.state.status==="pending"?this.scheduleGc():F(this,et).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,c,d,h,f,p,y,k,m,C,v,S,D,j,E,R,z,_;const r=()=>{ge(this,It,Zt).call(this,{type:"continue"})};ne(this,jr,jl({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(I,u)=>{ge(this,It,Zt).call(this,{type:"failed",failureCount:I,error:u})},onPause:()=>{ge(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,et).canRun(this)}));const n=this.state.status==="pending",i=!F(this,jr).canStart();try{if(n)r();else{ge(this,It,Zt).call(this,{type:"pending",variables:t,isPaused:i}),await((s=(a=F(this,et).config).onMutate)==null?void 0:s.call(a,t,this));const u=await((c=(o=this.options).onMutate)==null?void 0:c.call(o,t));u!==this.state.context&&ge(this,It,Zt).call(this,{type:"pending",context:u,variables:t,isPaused:i})}const I=await F(this,jr).start();return await((h=(d=F(this,et).config).onSuccess)==null?void 0:h.call(d,I,t,this.state.context,this)),await((p=(f=this.options).onSuccess)==null?void 0:p.call(f,I,t,this.state.context)),await((k=(y=F(this,et).config).onSettled)==null?void 0:k.call(y,I,null,this.state.variables,this.state.context,this)),await((C=(m=this.options).onSettled)==null?void 0:C.call(m,I,null,t,this.state.context)),ge(this,It,Zt).call(this,{type:"success",data:I}),I}catch(I){try{throw await((S=(v=F(this,et).config).onError)==null?void 0:S.call(v,I,t,this.state.context,this)),await((j=(D=this.options).onError)==null?void 0:j.call(D,I,t,this.state.context)),await((R=(E=F(this,et).config).onSettled)==null?void 0:R.call(E,void 0,I,this.state.variables,this.state.context,this)),await((_=(z=this.options).onSettled)==null?void 0:_.call(z,void 0,I,t,this.state.context)),I}finally{ge(this,It,Zt).call(this,{type:"error",error:I})}}finally{F(this,et).runNext(this)}}},Dt=new WeakMap,et=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),Ye.batch(()=>{F(this,Dt).forEach(n=>{n.onMutationUpdate(t)}),F(this,et).notify({mutation:this,type:"updated",action:t})})},nl);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,il,Pu=(il=class extends On{constructor(t={}){super();he(this,Ut);he(this,jt);he(this,Tn);this.config=t,ne(this,Ut,new Set),ne(this,jt,new Map),ne(this,Tn,0)}build(t,r,n){const i=new Ru({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(){Ye.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=>Rs(r,n))}findAll(t={}){return this.getAll().filter(r=>Rs(t,r))}notify(t){Ye.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Ye.batch(()=>Promise.all(t.map(r=>r.continue().catch(ot))))}},Ut=new WeakMap,jt=new WeakMap,Tn=new WeakMap,il);function In(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Ds(e){return{onFetch:(t,r)=>{var h,f,p,y,k;const n=t.options,i=(p=(f=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:f.fetchMore)==null?void 0:p.direction,a=((y=t.state.data)==null?void 0:y.pages)||[],s=((k=t.state.data)==null?void 0:k.pageParams)||[];let o={pages:[],pageParams:[]},c=0;const d=async()=>{let m=!1;const C=D=>{Object.defineProperty(D,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},v=El(t.options,t.fetchOptions),S=async(D,j,E)=>{if(m)return Promise.reject();if(j==null&&D.pages.length)return Promise.resolve(D);const z=(()=>{const P={client:t.client,queryKey:t.queryKey,pageParam:j,direction:E?"backward":"forward",meta:t.options.meta};return C(P),P})(),_=await v(z),{maxPages:I}=t.options,u=E?Su:wu;return{pages:u(D.pages,_,I),pageParams:u(D.pageParams,j,I)}};if(i&&a.length){const D=i==="backward",j=D?Du:Is,E={pages:a,pageParams:s},R=j(n,E);o=await S(E,R,D)}else{const D=e??a.length;do{const j=c===0?s[0]??n.initialPageParam:Is(n,o);if(c>0&&j==null)break;o=await S(o,j),c++}while(c<D)}return o};t.options.persister?t.fetchFn=()=>{var m,C;return(C=(m=t.options).persister)==null?void 0:C.call(m,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=d}}}function Is(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 Du(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 Ve,rr,nr,Jr,en,ir,tn,rn,al,Iu=(al=class{constructor(e={}){he(this,Ve);he(this,rr);he(this,nr);he(this,Jr);he(this,en);he(this,ir);he(this,tn);he(this,rn);ne(this,Ve,e.queryCache||new _u),ne(this,rr,e.mutationCache||new Pu),ne(this,nr,e.defaultOptions||{}),ne(this,Jr,new Map),ne(this,en,new Map),ne(this,ir,0)}mount(){Dn(this,ir)._++,F(this,ir)===1&&(ne(this,tn,Ha.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Ve).onFocus())})),ne(this,rn,ii.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Ve).onOnline())})))}unmount(){var e,t;Dn(this,ir)._--,F(this,ir)===0&&((e=F(this,tn))==null||e.call(this),ne(this,tn,void 0),(t=F(this,rn))==null||t.call(this),ne(this,rn,void 0))}isFetching(e){return F(this,Ve).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,Ve).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=F(this,Ve).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,Ve).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,Ve).get(n.queryHash),a=i==null?void 0:i.state.data,s=vu(t,a);if(s!==void 0)return F(this,Ve).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Ye.batch(()=>F(this,Ve).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,Ve).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=F(this,Ve);Ye.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=F(this,Ve);return Ye.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ye.batch(()=>F(this,Ve).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(ot).catch(ot)}invalidateQueries(e,t={}){return Ye.batch(()=>(F(this,Ve).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=Ye.batch(()=>F(this,Ve).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(ot)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(ot)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=F(this,Ve).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(ot).catch(ot)}fetchInfiniteQuery(e){return e.behavior=Ds(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ot).catch(ot)}ensureInfiniteQueryData(e){return e.behavior=Ds(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ii.isOnline()?F(this,rr).resumePausedMutations():Promise.resolve()}getQueryCache(){return F(this,Ve)}getMutationCache(){return F(this,rr)}getDefaultOptions(){return F(this,nr)}setDefaultOptions(e){ne(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=Ua(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===ni&&(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,Ve).clear(),F(this,rr).clear()}},Ve=new WeakMap,rr=new WeakMap,nr=new WeakMap,Jr=new WeakMap,en=new WeakMap,ir=new WeakMap,tn=new WeakMap,rn=new WeakMap,al),st,ye,jn,tt,Fr,nn,ar,sr,Fn,an,sn,Ar,Or,or,on,Ce,mn,ga,ya,va,ba,wa,Sa,Ca,Ol,sl,Mu=(sl=class extends On{constructor(t,r){super();he(this,Ce);he(this,st);he(this,ye);he(this,jn);he(this,tt);he(this,Fr);he(this,nn);he(this,ar);he(this,sr);he(this,Fn);he(this,an);he(this,sn);he(this,Ar);he(this,Or);he(this,or);he(this,on,new Set);this.options=r,ne(this,st,t),ne(this,sr,null),ne(this,ar,xa()),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,ye).addObserver(this),Ms(F(this,ye),this.options)?ge(this,Ce,mn).call(this):this.updateResult(),ge(this,Ce,ba).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ea(F(this,ye),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ea(F(this,ye),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ge(this,Ce,wa).call(this),ge(this,Ce,Sa).call(this),F(this,ye).removeObserver(this)}setOptions(t){const r=this.options,n=F(this,ye);if(this.options=F(this,st).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof bt(this.options.enabled,F(this,ye))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ge(this,Ce,Ca).call(this),F(this,ye).setOptions(this.options),r._defaulted&&!fa(this.options,r)&&F(this,st).getQueryCache().notify({type:"observerOptionsUpdated",query:F(this,ye),observer:this});const i=this.hasListeners();i&&zs(F(this,ye),n,this.options,r)&&ge(this,Ce,mn).call(this),this.updateResult(),i&&(F(this,ye)!==n||bt(this.options.enabled,F(this,ye))!==bt(r.enabled,F(this,ye))||cr(this.options.staleTime,F(this,ye))!==cr(r.staleTime,F(this,ye)))&&ge(this,Ce,ga).call(this);const a=ge(this,Ce,ya).call(this);i&&(F(this,ye)!==n||bt(this.options.enabled,F(this,ye))!==bt(r.enabled,F(this,ye))||a!==F(this,or))&&ge(this,Ce,va).call(this,a)}getOptimisticResult(t){const r=F(this,st).getQueryCache().build(F(this,st),t),n=this.createResult(r,t);return Bu(this,n)&&(ne(this,tt,n),ne(this,nn,this.options),ne(this,Fr,F(this,ye).state)),n}getCurrentResult(){return F(this,tt)}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,ye)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=F(this,st).defaultQueryOptions(t),n=F(this,st).getQueryCache().build(F(this,st),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return ge(this,Ce,mn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),F(this,tt)))}createResult(t,r){var I;const n=F(this,ye),i=this.options,a=F(this,tt),s=F(this,Fr),o=F(this,nn),d=t!==n?t.state:F(this,jn),{state:h}=t;let f={...h},p=!1,y;if(r._optimisticResults){const u=this.hasListeners(),P=!u&&Ms(t,r),L=u&&zs(t,n,r,i);(P||L)&&(f={...f,...Al(h.data,t.options)}),r._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:k,errorUpdatedAt:m,status:C}=f;y=f.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((I=F(this,sn))==null?void 0:I.state.data,F(this,sn)):r.placeholderData,u!==void 0&&(C="success",y=ma(a==null?void 0:a.data,u,r),p=!0)}if(r.select&&y!==void 0&&!v)if(a&&y===(s==null?void 0:s.data)&&r.select===F(this,Fn))y=F(this,an);else try{ne(this,Fn,r.select),y=r.select(y),y=ma(a==null?void 0:a.data,y,r),ne(this,an,y),ne(this,sr,null)}catch(u){ne(this,sr,u)}F(this,sr)&&(k=F(this,sr),y=F(this,an),m=Date.now(),C="error");const S=f.fetchStatus==="fetching",D=C==="pending",j=C==="error",E=D&&S,R=y!==void 0,_={status:C,fetchStatus:f.fetchStatus,isPending:D,isSuccess:C==="success",isError:j,isInitialLoading:E,isLoading:E,data:y,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:S,isRefetching:S&&!D,isLoadingError:j&&!R,isPaused:f.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:j&&R,isStale:Ka(t,r),refetch:this.refetch,promise:F(this,ar),isEnabled:bt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const u=A=>{_.status==="error"?A.reject(_.error):_.data!==void 0&&A.resolve(_.data)},P=()=>{const A=ne(this,ar,_.promise=xa());u(A)},L=F(this,ar);switch(L.status){case"pending":t.queryHash===n.queryHash&&u(L);break;case"fulfilled":(_.status==="error"||_.data!==L.value)&&P();break;case"rejected":(_.status!=="error"||_.error!==L.reason)&&P();break}}return _}updateResult(){const t=F(this,tt),r=this.createResult(F(this,ye),this.options);if(ne(this,Fr,F(this,ye).state),ne(this,nn,this.options),F(this,Fr).data!==void 0&&ne(this,sn,F(this,ye)),fa(r,t))return;ne(this,tt,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,tt)).some(o=>{const c=o;return F(this,tt)[c]!==t[c]&&s.has(c)})};ge(this,Ce,Ol).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ge(this,Ce,ba).call(this)}},st=new WeakMap,ye=new WeakMap,jn=new WeakMap,tt=new WeakMap,Fr=new WeakMap,nn=new WeakMap,ar=new WeakMap,sr=new WeakMap,Fn=new WeakMap,an=new WeakMap,sn=new WeakMap,Ar=new WeakMap,Or=new WeakMap,or=new WeakMap,on=new WeakMap,Ce=new WeakSet,mn=function(t){ge(this,Ce,Ca).call(this);let r=F(this,ye).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(ot)),r},ga=function(){ge(this,Ce,wa).call(this);const t=cr(this.options.staleTime,F(this,ye));if(Rr||F(this,tt).isStale||!pa(t))return;const n=Cl(F(this,tt).dataUpdatedAt,t)+1;ne(this,Ar,setTimeout(()=>{F(this,tt).isStale||this.updateResult()},n))},ya=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(F(this,ye)):this.options.refetchInterval)??!1},va=function(t){ge(this,Ce,Sa).call(this),ne(this,or,t),!(Rr||bt(this.options.enabled,F(this,ye))===!1||!pa(F(this,or))||F(this,or)===0)&&ne(this,Or,setInterval(()=>{(this.options.refetchIntervalInBackground||Ha.isFocused())&&ge(this,Ce,mn).call(this)},F(this,or)))},ba=function(){ge(this,Ce,ga).call(this),ge(this,Ce,va).call(this,ge(this,Ce,ya).call(this))},wa=function(){F(this,Ar)&&(clearTimeout(F(this,Ar)),ne(this,Ar,void 0))},Sa=function(){F(this,Or)&&(clearInterval(F(this,Or)),ne(this,Or,void 0))},Ca=function(){const t=F(this,st).getQueryCache().build(F(this,st),this.options);if(t===F(this,ye))return;const r=F(this,ye);ne(this,ye,t),ne(this,jn,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Ol=function(t){Ye.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(F(this,tt))}),F(this,st).getQueryCache().notify({query:F(this,ye),type:"observerResultsUpdated"})})},sl);function zu(e,t){return bt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ms(e,t){return zu(e,t)||e.state.data!==void 0&&Ea(e,t,t.refetchOnMount)}function Ea(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&&Ka(e,t)}return!1}function zs(e,t,r,n){return(e!==t||bt(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Ka(e,r)}function Ka(e,t){return bt(t.enabled,e)!==!1&&e.isStaleByTime(cr(t.staleTime,e))}function Bu(e,t){return!fa(e.getCurrentResult(),t)}var _l=ie.createContext(void 0),Vu=e=>{const t=ie.useContext(_l);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Nu=({client:e,children:t})=>(ie.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(_l.Provider,{value:e,children:t})),Rl=ie.createContext(!1),Lu=()=>ie.useContext(Rl);Rl.Provider;function qu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Wu=ie.createContext(qu()),Uu=()=>ie.useContext(Wu),Hu=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Ku=e=>{ie.useEffect(()=>{e.clearReset()},[e])},Yu=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||Cu(r,[e.error,n])),Gu=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))}},Qu=(e,t)=>e.isLoading&&e.isFetching&&!t,Zu=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Bs=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Xu(e,t,r){var f,p,y,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=Lu(),i=Uu(),a=Vu(),s=a.defaultQueryOptions(e);(p=(f=a.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||p.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",Gu(s),Hu(s,i),Ku(i);const o=!a.getQueryCache().get(s.queryHash),[c]=ie.useState(()=>new t(a,s)),d=c.getOptimisticResult(s),h=!n&&e.subscribed!==!1;if(ie.useSyncExternalStore(ie.useCallback(C=>{const v=h?c.subscribe(Ye.batchCalls(C)):ot;return c.updateResult(),v},[c,h]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),ie.useEffect(()=>{c.setOptions(s)},[s,c]),Zu(s,d))throw Bs(s,c,i);if(Yu({result:d,errorResetBoundary:i,throwOnError:s.throwOnError,query:a.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw d.error;if((k=(y=a.getDefaultOptions().queries)==null?void 0:y._experimental_afterQuery)==null||k.call(y,s,d),s.experimental_prefetchInRender&&!Rr&&Qu(d,n)){const C=o?Bs(s,c,i):(m=a.getQueryCache().get(s.queryHash))==null?void 0:m.promise;C==null||C.catch(ot).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?d:c.trackResult(d)}function Ju(e,t){return Xu(e,Mu)}function Ya(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mn={exports:{}},zn={exports:{}},we={};/** @license React v16.13.1
1
+ "use strict";var Kc=Object.defineProperty;var vs=e=>{throw TypeError(e)};var Yc=(e,t,r)=>t in e?Kc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var pn=(e,t,r)=>Yc(e,typeof t!="symbol"?t+"":t,r),Pi=(e,t,r)=>t.has(e)||vs("Cannot "+r);var A=(e,t,r)=>(Pi(e,t,"read from private field"),r?r.call(e):t.get(e)),fe=(e,t,r)=>t.has(e)?vs("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),re=(e,t,r,n)=>(Pi(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),me=(e,t,r)=>(Pi(e,t,"access private method"),r);var Dn=(e,t,r,n)=>({set _(i){re(e,t,i,r)},get _(){return A(e,t,n)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),P=require("react"),x=require("@mui/material"),Gc=require("@emotion/styled"),Pr=require("@emotion/react");function Qc(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=Qc(P);var An=e=>e.type==="checkbox",vr=e=>e instanceof Date,nt=e=>e==null;const ol=e=>typeof e=="object";var Ve=e=>!nt(e)&&!Array.isArray(e)&&ol(e)&&!vr(e),ll=e=>Ve(e)&&e.target?An(e.target)?e.target.checked:e.target.value:e,Zc=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,cl=(e,t)=>e.has(Zc(t)),Xc=e=>{const t=e.constructor&&e.constructor.prototype;return Ve(t)&&t.hasOwnProperty("isPrototypeOf")},Na=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function _e(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(!(Na&&(e instanceof Blob||n))&&(r||Ve(e)))if(t=r?[]:{},!r&&!Xc(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=_e(e[i]));else return e;return t}var vi=e=>/^\w*$/.test(e),Fe=e=>e===void 0,bi=e=>Array.isArray(e)?e.filter(Boolean):[],La=e=>bi(e.replace(/["|']|\]/g,"").split(/\.|\[/)),J=(e,t,r)=>{if(!t||!Ve(e))return r;const n=(vi(t)?[t]:La(t)).reduce((i,a)=>nt(i)?i:i[a],e);return Fe(n)||n===e?Fe(e[t])?r:e[t]:n},dt=e=>typeof e=="boolean",ye=(e,t,r)=>{let n=-1;const i=vi(t)?[t]:La(t),a=i.length,s=a-1;for(;++n<a;){const o=i[n];let c=r;if(n!==s){const d=e[o];c=Ve(d)||Array.isArray(d)?d:isNaN(+i[n+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;e[o]=c,e=e[o]}};const Jn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},St={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"},ul=P.createContext(null);ul.displayName="HookFormContext";const wi=()=>P.useContext(ul);var pl=(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]!==St.all&&(t._proxyFormState[s]=!n||St.all),r&&(r[s]=!0),e[s]}});return i};const Si=typeof window<"u"?ne.useLayoutEffect:ne.useEffect;function Jc(e){const t=wi(),{control:r=t.control,disabled:n,name:i,exact:a}=e||{},[s,o]=P.useState(r._formState),c=P.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Si(()=>r._subscribe({name:i,formState:c.current,exact:a,callback:d=>{!n&&o({...r._formState,...d})}}),[i,n,a]),P.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),P.useMemo(()=>pl(s,r,c.current,!1),[s,r])}var zt=e=>typeof e=="string",dl=(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 fl(e){const t=wi(),{control:r=t.control,name:n,defaultValue:i,disabled:a,exact:s}=e||{},o=P.useRef(i),[c,d]=P.useState(r._getWatch(n,o.current));return Si(()=>r._subscribe({name:n,formState:{values:!0},exact:s,callback:h=>!a&&d(dl(n,r._names,h.values||r._formValues,!1,o.current))}),[n,r,a,s]),P.useEffect(()=>r._removeUnmounted()),c}function eu(e){const t=wi(),{name:r,disabled:n,control:i=t.control,shouldUnregister:a}=e,s=cl(i._names.array,r),o=fl({control:i,name:r,defaultValue:J(i._formValues,r,J(i._defaultValues,r,e.defaultValue)),exact:!0}),c=Jc({control:i,name:r,exact:!0}),d=P.useRef(e),h=P.useRef(i.register(r,{...e.rules,value:o,...dt(e.disabled)?{disabled:e.disabled}:{}})),f=P.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!J(c.errors,r)},isDirty:{enumerable:!0,get:()=>!!J(c.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!J(c.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!J(c.validatingFields,r)},error:{enumerable:!0,get:()=>J(c.errors,r)}}),[c,r]),p=P.useCallback(S=>h.current.onChange({target:{value:ll(S),name:r},type:Jn.CHANGE}),[r]),y=P.useCallback(()=>h.current.onBlur({target:{value:J(i._formValues,r),name:r},type:Jn.BLUR}),[r,i._formValues]),E=P.useCallback(S=>{const v=J(i._fields,r);v&&S&&(v._f.ref={focus:()=>S.focus&&S.focus(),select:()=>S.select&&S.select(),setCustomValidity:j=>S.setCustomValidity(j),reportValidity:()=>S.reportValidity()})},[i._fields,r]),m=P.useMemo(()=>({name:r,value:o,...dt(n)||c.disabled?{disabled:c.disabled||n}:{},onChange:p,onBlur:y,ref:E}),[r,n,c.disabled,p,y,E,o]);return P.useEffect(()=>{const S=i._options.shouldUnregister||a;i.register(r,{...d.current.rules,...dt(d.current.disabled)?{disabled:d.current.disabled}:{}});const v=(j,M)=>{const F=J(i._fields,j);F&&F._f&&(F._f.mount=M)};if(v(r,!0),S){const j=_e(J(i._options.defaultValues,r));ye(i._defaultValues,r,j),Fe(J(i._formValues,r))&&ye(i._formValues,r,j)}return!s&&i.register(r),()=>{(s?S&&!i._state.action:S)?i.unregister(r):v(r,!1)}},[r,i,s,a]),P.useEffect(()=>{i._setDisabledField({disabled:n,name:r})},[n,r,i]),P.useMemo(()=>({field:m,formState:c,fieldState:f}),[m,c,f])}const Oe=e=>e.render(eu(e));var hl=(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],bs=()=>{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=[]}}},la=e=>nt(e)||!ol(e);function Jt(e,t){if(la(e)||la(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)||Ve(a)&&Ve(s)||Array.isArray(a)&&Array.isArray(s)?!Jt(a,s):a!==s)return!1}}return!0}var rt=e=>Ve(e)&&!Object.keys(e).length,qa=e=>e.type==="file",Ft=e=>typeof e=="function",ei=e=>{if(!Na)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ml=e=>e.type==="select-multiple",Wa=e=>e.type==="radio",tu=e=>Wa(e)||An(e),Di=e=>ei(e)&&e.isConnected;function ru(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Fe(e)?n++:e[t[n++]];return e}function nu(e){for(const t in e)if(e.hasOwnProperty(t)&&!Fe(e[t]))return!1;return!0}function Le(e,t){const r=Array.isArray(t)?t:vi(t)?[t]:La(t),n=r.length===1?e:ru(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(Ve(n)&&rt(n)||Array.isArray(n)&&nu(n))&&Le(e,r.slice(0,-1)),e}var xl=e=>{for(const t in e)if(Ft(e[t]))return!0;return!1};function ti(e,t={}){const r=Array.isArray(e);if(Ve(e)||r)for(const n in e)Array.isArray(e[n])||Ve(e[n])&&!xl(e[n])?(t[n]=Array.isArray(e[n])?[]:{},ti(e[n],t[n])):nt(e[n])||(t[n]=!0);return t}function gl(e,t,r){const n=Array.isArray(e);if(Ve(e)||n)for(const i in e)Array.isArray(e[i])||Ve(e[i])&&!xl(e[i])?Fe(t)||la(r[i])?r[i]=Array.isArray(e[i])?ti(e[i],[]):{...ti(e[i])}:gl(e[i],nt(t)?{}:t[i],r[i]):r[i]=!Jt(e[i],t[i]);return r}var dn=(e,t)=>gl(e,t,ti(t));const ws={value:!1,isValid:!1},Ss={value:!0,isValid:!0};var yl=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&&!Fe(e[0].attributes.value)?Fe(e[0].value)||e[0].value===""?Ss:{value:e[0].value,isValid:!0}:Ss:ws}return ws},vl=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Fe(e)?e:t?e===""?NaN:e&&+e:r&&zt(e)?new Date(e):n?n(e):e;const Cs={isValid:!1,value:null};var bl=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Cs):Cs;function Es(e){const t=e.ref;return qa(t)?t.files:Wa(t)?bl(e.refs).value:ml(t)?[...t.selectedOptions].map(({value:r})=>r):An(t)?yl(e.refs).value:vl(Fe(t.value)?e.ref.value:t.value,e)}var iu=(e,t,r,n)=>{const i={};for(const a of e){const s=J(t,a);s&&ye(i,a,s._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},ri=e=>e instanceof RegExp,fn=e=>Fe(e)?e:ri(e)?e.source:Ve(e)?ri(e.value)?e.value.source:e.value:e,Ur=e=>({isOnSubmit:!e||e===St.onSubmit,isOnBlur:e===St.onBlur,isOnChange:e===St.onChange,isOnAll:e===St.all,isOnTouch:e===St.onTouched});const ks="AsyncFunction";var au=e=>!!e&&!!e.validate&&!!(Ft(e.validate)&&e.validate.constructor.name===ks||Ve(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===ks)),su=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ca=(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(Ve(o)&&Kr(o,t))break}}};function Ts(e,t,r){const n=J(e,r);if(n||vi(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 ou=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return rt(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(s=>t[s]===(!n||St.all))},lu=(e,t,r)=>!e||!t||e===t||ct(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),cu=(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,uu=(e,t)=>!bi(J(e,t)).length&&Le(e,t),wl=(e,t,r)=>{const n=ct(J(e,r));return ye(n,"root",t[r]),ye(e,r,n),e},Hn=e=>zt(e);function js(e,t,r="validate"){if(Hn(e)||Array.isArray(e)&&e.every(Hn)||dt(e)&&!e)return{type:r,message:Hn(e)?e:"",ref:t}}var zr=e=>Ve(e)&&!ri(e)?e:{value:e,message:""},ua=async(e,t,r,n,i,a)=>{const{ref:s,refs:o,required:c,maxLength:d,minLength:h,min:f,max:p,pattern:y,validate:E,name:m,valueAsNumber:S,mount:v}=e._f,j=J(r,m);if(!v||t.has(m))return{};const M=o?o[0]:s,F=L=>{i&&M.reportValidity&&(M.setCustomValidity(dt(L)?"":L||""),M.reportValidity())},C={},R=Wa(s),B=An(s),_=R||B,I=(S||qa(s))&&Fe(s.value)&&Fe(j)||ei(s)&&s.value===""||j===""||Array.isArray(j)&&!j.length,u=hl.bind(null,m,n,C),D=(L,$,V,ee=Bt.maxLength,ie=Bt.minLength)=>{const he=L?$:V;C[m]={type:L?ee:ie,message:he,ref:s,...u(L?ee:ie,he)}};if(a?!Array.isArray(j)||!j.length:c&&(!_&&(I||nt(j))||dt(j)&&!j||B&&!yl(o).isValid||R&&!bl(o).isValid)){const{value:L,message:$}=Hn(c)?{value:!!c,message:c}:zr(c);if(L&&(C[m]={type:Bt.required,message:$,ref:M,...u(Bt.required,$)},!n))return F($),C}if(!I&&(!nt(f)||!nt(p))){let L,$;const V=zr(p),ee=zr(f);if(!nt(j)&&!isNaN(j)){const ie=s.valueAsNumber||j&&+j;nt(V.value)||(L=ie>V.value),nt(ee.value)||($=ie<ee.value)}else{const ie=s.valueAsDate||new Date(j),he=U=>new Date(new Date().toDateString()+" "+U),le=s.type=="time",Y=s.type=="week";zt(V.value)&&j&&(L=le?he(j)>he(V.value):Y?j>V.value:ie>new Date(V.value)),zt(ee.value)&&j&&($=le?he(j)<he(ee.value):Y?j<ee.value:ie<new Date(ee.value))}if((L||$)&&(D(!!L,V.message,ee.message,Bt.max,Bt.min),!n))return F(C[m].message),C}if((d||h)&&!I&&(zt(j)||a&&Array.isArray(j))){const L=zr(d),$=zr(h),V=!nt(L.value)&&j.length>+L.value,ee=!nt($.value)&&j.length<+$.value;if((V||ee)&&(D(V,L.message,$.message),!n))return F(C[m].message),C}if(y&&!I&&zt(j)){const{value:L,message:$}=zr(y);if(ri(L)&&!j.match(L)&&(C[m]={type:Bt.pattern,message:$,ref:s,...u(Bt.pattern,$)},!n))return F($),C}if(E){if(Ft(E)){const L=await E(j,r),$=js(L,M);if($&&(C[m]={...$,...u(Bt.validate,$.message)},!n))return F($.message),C}else if(Ve(E)){let L={};for(const $ in E){if(!rt(L)&&!n)break;const V=js(await E[$](j,r),M,$);V&&(L={...V,...u($,V.message)},F(V.message),n&&(C[m]=L))}if(!rt(L)&&(C[m]={ref:M,...L},!n))return C}}return F(!0),C};const pu={mode:St.onSubmit,reValidateMode:St.onChange,shouldFocusError:!0};function du(e={}){let t={...pu,...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=Ve(t.defaultValues)||Ve(t.values)?_e(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:_e(i),s={action:!1,mount:!1,watch:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,d=0;const h={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let f={...h};const p={array:bs(),state:bs()},y=t.criteriaMode===St.all,E=w=>T=>{clearTimeout(d),d=setTimeout(w,T)},m=async w=>{if(!t.disabled&&(h.isValid||f.isValid||w)){const T=t.resolver?rt((await B()).errors):await I(n,!0);T!==r.isValid&&p.state.next({isValid:T})}},S=(w,T)=>{!t.disabled&&(h.isValidating||h.validatingFields||f.isValidating||f.validatingFields)&&((w||Array.from(o.mount)).forEach(g=>{g&&(T?ye(r.validatingFields,g,T):Le(r.validatingFields,g))}),p.state.next({validatingFields:r.validatingFields,isValidating:!rt(r.validatingFields)}))},v=(w,T=[],g,z,b=!0,O=!0)=>{if(z&&g&&!t.disabled){if(s.action=!0,O&&Array.isArray(J(n,w))){const q=g(J(n,w),z.argA,z.argB);b&&ye(n,w,q)}if(O&&Array.isArray(J(r.errors,w))){const q=g(J(r.errors,w),z.argA,z.argB);b&&ye(r.errors,w,q),uu(r.errors,w)}if((h.touchedFields||f.touchedFields)&&O&&Array.isArray(J(r.touchedFields,w))){const q=g(J(r.touchedFields,w),z.argA,z.argB);b&&ye(r.touchedFields,w,q)}(h.dirtyFields||f.dirtyFields)&&(r.dirtyFields=dn(i,a)),p.state.next({name:w,isDirty:D(w,T),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ye(a,w,T)},j=(w,T)=>{ye(r.errors,w,T),p.state.next({errors:r.errors})},M=w=>{r.errors=w,p.state.next({errors:r.errors,isValid:!1})},F=(w,T,g,z)=>{const b=J(n,w);if(b){const O=J(a,w,Fe(g)?J(i,w):g);Fe(O)||z&&z.defaultChecked||T?ye(a,w,T?O:Es(b._f)):V(w,O),s.mount&&m()}},C=(w,T,g,z,b)=>{let O=!1,q=!1;const K={name:w};if(!t.disabled){if(!g||z){(h.isDirty||f.isDirty)&&(q=r.isDirty,r.isDirty=K.isDirty=D(),O=q!==K.isDirty);const W=Jt(J(i,w),T);q=!!J(r.dirtyFields,w),W?Le(r.dirtyFields,w):ye(r.dirtyFields,w,!0),K.dirtyFields=r.dirtyFields,O=O||(h.dirtyFields||f.dirtyFields)&&q!==!W}if(g){const W=J(r.touchedFields,w);W||(ye(r.touchedFields,w,g),K.touchedFields=r.touchedFields,O=O||(h.touchedFields||f.touchedFields)&&W!==g)}O&&b&&p.state.next(K)}return O?K:{}},R=(w,T,g,z)=>{const b=J(r.errors,w),O=(h.isValid||f.isValid)&&dt(T)&&r.isValid!==T;if(t.delayError&&g?(c=E(()=>j(w,g)),c(t.delayError)):(clearTimeout(d),c=null,g?ye(r.errors,w,g):Le(r.errors,w)),(g?!Jt(b,g):b)||!rt(z)||O){const q={...z,...O&&dt(T)?{isValid:T}:{},errors:r.errors,name:w};r={...r,...q},p.state.next(q)}},B=async w=>{S(w,!0);const T=await t.resolver(a,t.context,iu(w||o.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return S(w),T},_=async w=>{const{errors:T}=await B(w);if(w)for(const g of w){const z=J(T,g);z?ye(r.errors,g,z):Le(r.errors,g)}else r.errors=T;return T},I=async(w,T,g={valid:!0})=>{for(const z in w){const b=w[z];if(b){const{_f:O,...q}=b;if(O){const K=o.array.has(O.name),W=b._f&&au(b._f);W&&h.validatingFields&&S([z],!0);const ue=await ua(b,o.disabled,a,y,t.shouldUseNativeValidation&&!T,K);if(W&&h.validatingFields&&S([z]),ue[O.name]&&(g.valid=!1,T))break;!T&&(J(ue,O.name)?K?wl(r.errors,ue,O.name):ye(r.errors,O.name,ue[O.name]):Le(r.errors,O.name))}!rt(q)&&await I(q,T,g)}}return g.valid},u=()=>{for(const w of o.unMount){const T=J(n,w);T&&(T._f.refs?T._f.refs.every(g=>!Di(g)):!Di(T._f.ref))&&X(w)}o.unMount=new Set},D=(w,T)=>!t.disabled&&(w&&T&&ye(a,w,T),!Jt(U(),i)),L=(w,T,g)=>dl(w,o,{...s.mount?a:Fe(T)?i:zt(w)?{[w]:T}:T},g,T),$=w=>bi(J(s.mount?a:i,w,t.shouldUnregister?J(i,w,[]):[])),V=(w,T,g={})=>{const z=J(n,w);let b=T;if(z){const O=z._f;O&&(!O.disabled&&ye(a,w,vl(T,O)),b=ei(O.ref)&&nt(T)?"":T,ml(O.ref)?[...O.ref.options].forEach(q=>q.selected=b.includes(q.value)):O.refs?An(O.ref)?O.refs.forEach(q=>{(!q.defaultChecked||!q.disabled)&&(Array.isArray(b)?q.checked=!!b.find(K=>K===q.value):q.checked=b===q.value||!!b)}):O.refs.forEach(q=>q.checked=q.value===b):qa(O.ref)?O.ref.value="":(O.ref.value=b,O.ref.type||p.state.next({name:w,values:_e(a)})))}(g.shouldDirty||g.shouldTouch)&&C(w,b,g.shouldTouch,g.shouldDirty,!0),g.shouldValidate&&Y(w)},ee=(w,T,g)=>{for(const z in T){if(!T.hasOwnProperty(z))return;const b=T[z],O=w+"."+z,q=J(n,O);(o.array.has(w)||Ve(b)||q&&!q._f)&&!vr(b)?ee(O,b,g):V(O,b,g)}},ie=(w,T,g={})=>{const z=J(n,w),b=o.array.has(w),O=_e(T);ye(a,w,O),b?(p.array.next({name:w,values:_e(a)}),(h.isDirty||h.dirtyFields||f.isDirty||f.dirtyFields)&&g.shouldDirty&&p.state.next({name:w,dirtyFields:dn(i,a),isDirty:D(w,O)})):z&&!z._f&&!nt(O)?ee(w,O,g):V(w,O,g),ca(w,o)&&p.state.next({...r}),p.state.next({name:s.mount?w:void 0,values:_e(a)})},he=async w=>{s.mount=!0;const T=w.target;let g=T.name,z=!0;const b=J(n,g),O=W=>{z=Number.isNaN(W)||vr(W)&&isNaN(W.getTime())||Jt(W,J(a,g,W))},q=Ur(t.mode),K=Ur(t.reValidateMode);if(b){let W,ue;const ve=T.type?Es(b._f):ll(w),Ce=w.type===Jn.BLUR||w.type===Jn.FOCUS_OUT,De=!su(b._f)&&!t.resolver&&!J(r.errors,g)&&!b._f.deps||cu(Ce,J(r.touchedFields,g),r.isSubmitted,K,q),Be=ca(g,o,Ce);ye(a,g,ve),Ce?(b._f.onBlur&&b._f.onBlur(w),c&&c(0)):b._f.onChange&&b._f.onChange(w);const Xe=C(g,ve,Ce),Ot=!rt(Xe)||Be;if(!Ce&&p.state.next({name:g,type:w.type,values:_e(a)}),De)return(h.isValid||f.isValid)&&(t.mode==="onBlur"?Ce&&m():Ce||m()),Ot&&p.state.next({name:g,...Be?{}:Xe});if(!Ce&&Be&&p.state.next({...r}),t.resolver){const{errors:Je}=await B([g]);if(O(ve),z){const We=Ts(r.errors,n,g),pt=Ts(Je,n,We.name||g);W=pt.error,g=pt.name,ue=rt(Je)}}else S([g],!0),W=(await ua(b,o.disabled,a,y,t.shouldUseNativeValidation))[g],S([g]),O(ve),z&&(W?ue=!1:(h.isValid||f.isValid)&&(ue=await I(n,!0)));z&&(b._f.deps&&Y(b._f.deps),R(g,ue,W,Xe))}},le=(w,T)=>{if(J(r.errors,T)&&w.focus)return w.focus(),1},Y=async(w,T={})=>{let g,z;const b=ct(w);if(t.resolver){const O=await _(Fe(w)?w:b);g=rt(O),z=w?!b.some(q=>J(O,q)):g}else w?(z=(await Promise.all(b.map(async O=>{const q=J(n,O);return await I(q&&q._f?{[O]:q}:q)}))).every(Boolean),!(!z&&!r.isValid)&&m()):z=g=await I(n);return p.state.next({...!zt(w)||(h.isValid||f.isValid)&&g!==r.isValid?{}:{name:w},...t.resolver||!w?{isValid:g}:{},errors:r.errors}),T.shouldFocus&&!z&&Kr(n,le,w?b:o.mount),z},U=w=>{const T={...s.mount?a:i};return Fe(w)?T:zt(w)?J(T,w):w.map(g=>J(T,g))},Z=(w,T)=>({invalid:!!J((T||r).errors,w),isDirty:!!J((T||r).dirtyFields,w),error:J((T||r).errors,w),isValidating:!!J(r.validatingFields,w),isTouched:!!J((T||r).touchedFields,w)}),ce=w=>{w&&ct(w).forEach(T=>Le(r.errors,T)),p.state.next({errors:w?r.errors:{}})},de=(w,T,g)=>{const z=(J(n,w,{_f:{}})._f||{}).ref,b=J(r.errors,w)||{},{ref:O,message:q,type:K,...W}=b;ye(r.errors,w,{...W,...T,ref:z}),p.state.next({name:w,errors:r.errors,isValid:!1}),g&&g.shouldFocus&&z&&z.focus&&z.focus()},oe=(w,T)=>Ft(w)?p.state.subscribe({next:g=>w(L(void 0,T),g)}):L(w,T,!0),pe=w=>p.state.subscribe({next:T=>{lu(w.name,T.name,w.exact)&&ou(T,w.formState||h,Ue,w.reRenderRoot)&&w.callback({values:{...a},...r,...T})}}).unsubscribe,H=w=>(s.mount=!0,f={...f,...w.formState},pe({...w,formState:f})),X=(w,T={})=>{for(const g of w?ct(w):o.mount)o.mount.delete(g),o.array.delete(g),T.keepValue||(Le(n,g),Le(a,g)),!T.keepError&&Le(r.errors,g),!T.keepDirty&&Le(r.dirtyFields,g),!T.keepTouched&&Le(r.touchedFields,g),!T.keepIsValidating&&Le(r.validatingFields,g),!t.shouldUnregister&&!T.keepDefaultValue&&Le(i,g);p.state.next({values:_e(a)}),p.state.next({...r,...T.keepDirty?{isDirty:D()}:{}}),!T.keepIsValid&&m()},te=({disabled:w,name:T})=>{(dt(w)&&s.mount||w||o.disabled.has(T))&&(w?o.disabled.add(T):o.disabled.delete(T))},ae=(w,T={})=>{let g=J(n,w);const z=dt(T.disabled)||dt(t.disabled);return ye(n,w,{...g||{},_f:{...g&&g._f?g._f:{ref:{name:w}},name:w,mount:!0,...T}}),o.mount.add(w),g?te({disabled:dt(T.disabled)?T.disabled:t.disabled,name:w}):F(w,!0,T.value),{...z?{disabled:T.disabled||t.disabled}:{},...t.progressive?{required:!!T.required,min:fn(T.min),max:fn(T.max),minLength:fn(T.minLength),maxLength:fn(T.maxLength),pattern:fn(T.pattern)}:{},name:w,onChange:he,onBlur:he,ref:b=>{if(b){ae(w,T),g=J(n,w);const O=Fe(b.value)&&b.querySelectorAll&&b.querySelectorAll("input,select,textarea")[0]||b,q=tu(O),K=g._f.refs||[];if(q?K.find(W=>W===O):O===g._f.ref)return;ye(n,w,{_f:{...g._f,...q?{refs:[...K.filter(Di),O,...Array.isArray(J(i,w))?[{}]:[]],ref:{type:O.type,name:w}}:{ref:O}}}),F(w,!1,void 0,O)}else g=J(n,w,{}),g._f&&(g._f.mount=!1),(t.shouldUnregister||T.shouldUnregister)&&!(cl(o.array,w)&&s.action)&&o.unMount.add(w)}}},se=()=>t.shouldFocusError&&Kr(n,le,o.mount),ge=w=>{dt(w)&&(p.state.next({disabled:w}),Kr(n,(T,g)=>{const z=J(n,g);z&&(T.disabled=z._f.disabled||w,Array.isArray(z._f.refs)&&z._f.refs.forEach(b=>{b.disabled=z._f.disabled||w}))},0,!1))},Q=(w,T)=>async g=>{let z;g&&(g.preventDefault&&g.preventDefault(),g.persist&&g.persist());let b=_e(a);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:O,values:q}=await B();r.errors=O,b=q}else await I(n);if(o.disabled.size)for(const O of o.disabled)ye(b,O,void 0);if(Le(r.errors,"root"),rt(r.errors)){p.state.next({errors:{}});try{await w(b,g)}catch(O){z=O}}else T&&await T({...r.errors},g),se(),setTimeout(se);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:rt(r.errors)&&!z,submitCount:r.submitCount+1,errors:r.errors}),z)throw z},Pe=(w,T={})=>{J(n,w)&&(Fe(T.defaultValue)?ie(w,_e(J(i,w))):(ie(w,T.defaultValue),ye(i,w,_e(T.defaultValue))),T.keepTouched||Le(r.touchedFields,w),T.keepDirty||(Le(r.dirtyFields,w),r.isDirty=T.defaultValue?D(w,_e(J(i,w))):D()),T.keepError||(Le(r.errors,w),h.isValid&&m()),p.state.next({...r}))},qe=(w,T={})=>{const g=w?_e(w):i,z=_e(g),b=rt(w),O=b?i:z;if(T.keepDefaultValues||(i=g),!T.keepValues){if(T.keepDirtyValues){const q=new Set([...o.mount,...Object.keys(dn(i,a))]);for(const K of Array.from(q))J(r.dirtyFields,K)?ye(O,K,J(a,K)):ie(K,J(O,K))}else{if(Na&&Fe(w))for(const q of o.mount){const K=J(n,q);if(K&&K._f){const W=Array.isArray(K._f.refs)?K._f.refs[0]:K._f.ref;if(ei(W)){const ue=W.closest("form");if(ue){ue.reset();break}}}}for(const q of o.mount)ie(q,J(O,q))}a=_e(O),p.array.next({values:{...O}}),p.state.next({values:{...O}})}o={mount:T.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!h.isValid||!!T.keepIsValid||!!T.keepDirtyValues,s.watch=!!t.shouldUnregister,p.state.next({submitCount:T.keepSubmitCount?r.submitCount:0,isDirty:b?!1:T.keepDirty?r.isDirty:!!(T.keepDefaultValues&&!Jt(w,i)),isSubmitted:T.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:b?{}:T.keepDirtyValues?T.keepDefaultValues&&a?dn(i,a):r.dirtyFields:T.keepDefaultValues&&w?dn(i,w):T.keepDirty?r.dirtyFields:{},touchedFields:T.keepTouched?r.touchedFields:{},errors:T.keepErrors?r.errors:{},isSubmitSuccessful:T.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Ge=(w,T)=>qe(Ft(w)?w(a):w,T),kt=(w,T={})=>{const g=J(n,w),z=g&&g._f;if(z){const b=z.refs?z.refs[0]:z.ref;b.focus&&(b.focus(),T.shouldSelect&&Ft(b.select)&&b.select())}},Ue=w=>{r={...r,...w}},He={control:{register:ae,unregister:X,getFieldState:Z,handleSubmit:Q,setError:de,_subscribe:pe,_runSchema:B,_focusError:se,_getWatch:L,_getDirty:D,_setValid:m,_setFieldArray:v,_setDisabledField:te,_setErrors:M,_getFieldArray:$,_reset:qe,_resetDefaultValues:()=>Ft(t.defaultValues)&&t.defaultValues().then(w=>{Ge(w,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:u,_disableForm:ge,_subjects:p,_proxyFormState:h,get _fields(){return n},get _formValues(){return a},get _state(){return s},set _state(w){s=w},get _defaultValues(){return i},get _names(){return o},set _names(w){o=w},get _formState(){return r},get _options(){return t},set _options(w){t={...t,...w}}},subscribe:H,trigger:Y,register:ae,handleSubmit:Q,watch:oe,setValue:ie,getValues:U,reset:Ge,resetField:Pe,clearErrors:ce,unregister:X,setError:de,setFocus:kt,getFieldState:Z};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)})},Ii=(e,t,r={})=>r.shouldFocus||Fe(r.shouldFocus)?r.focusName||`${e}.${Fe(r.focusIndex)?t:r.focusIndex}.`:"",Mi=(e,t)=>[...e,...ct(t)],zi=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Bi(e,t,r){return[...e.slice(0,t),...ct(r),...e.slice(t)]}var Vi=(e,t,r)=>Array.isArray(e)?(Fe(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],Ni=(e,t)=>[...ct(t),...ct(e)];function fu(e,t){let r=0;const n=[...e];for(const i of t)n.splice(i-r,1),r++;return bi(n).length?n:[]}var Li=(e,t)=>Fe(t)?[]:fu(e,ct(t).sort((r,n)=>r-n)),qi=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},Fs=(e,t,r)=>(e[t]=r,e);function hu(e){const t=wi(),{control:r=t.control,name:n,keyName:i="id",shouldUnregister:a,rules:s}=e,[o,c]=P.useState(r._getFieldArray(n)),d=P.useRef(r._getFieldArray(n).map(Gt)),h=P.useRef(o),f=P.useRef(n),p=P.useRef(!1);f.current=n,h.current=o,r._names.array.add(n),s&&r.register(n,s),Si(()=>r._subjects.array.subscribe({next:({values:R,name:B})=>{if(B===f.current||!B){const _=J(R,f.current);Array.isArray(_)&&(c(_),d.current=_.map(Gt))}}}).unsubscribe,[r]);const y=P.useCallback(R=>{p.current=!0,r._setFieldArray(n,R)},[r,n]),E=(R,B)=>{const _=ct(_e(R)),I=Mi(r._getFieldArray(n),_);r._names.focus=Ii(n,I.length-1,B),d.current=Mi(d.current,_.map(Gt)),y(I),c(I),r._setFieldArray(n,I,Mi,{argA:zi(R)})},m=(R,B)=>{const _=ct(_e(R)),I=Ni(r._getFieldArray(n),_);r._names.focus=Ii(n,0,B),d.current=Ni(d.current,_.map(Gt)),y(I),c(I),r._setFieldArray(n,I,Ni,{argA:zi(R)})},S=R=>{const B=Li(r._getFieldArray(n),R);d.current=Li(d.current,R),y(B),c(B),!Array.isArray(J(r._fields,n))&&ye(r._fields,n,void 0),r._setFieldArray(n,B,Li,{argA:R})},v=(R,B,_)=>{const I=ct(_e(B)),u=Bi(r._getFieldArray(n),R,I);r._names.focus=Ii(n,R,_),d.current=Bi(d.current,R,I.map(Gt)),y(u),c(u),r._setFieldArray(n,u,Bi,{argA:R,argB:zi(B)})},j=(R,B)=>{const _=r._getFieldArray(n);qi(_,R,B),qi(d.current,R,B),y(_),c(_),r._setFieldArray(n,_,qi,{argA:R,argB:B},!1)},M=(R,B)=>{const _=r._getFieldArray(n);Vi(_,R,B),Vi(d.current,R,B),y(_),c(_),r._setFieldArray(n,_,Vi,{argA:R,argB:B},!1)},F=(R,B)=>{const _=_e(B),I=Fs(r._getFieldArray(n),R,_);d.current=[...I].map((u,D)=>!u||D===R?Gt():d.current[D]),y(I),c([...I]),r._setFieldArray(n,I,Fs,{argA:R,argB:_},!0,!1)},C=R=>{const B=ct(_e(R));d.current=B.map(Gt),y([...B]),c([...B]),r._setFieldArray(n,[...B],_=>_,{},!0,!1)};return P.useEffect(()=>{if(r._state.action=!1,ca(n,r._names)&&r._subjects.state.next({...r._formState}),p.current&&(!Ur(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!Ur(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([n]).then(R=>{const B=J(R.errors,n),_=J(r._formState.errors,n);(_?!B&&_.type||B&&(_.type!==B.type||_.message!==B.message):B&&B.type)&&(B?ye(r._formState.errors,n,B):Le(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const R=J(r._fields,n);R&&R._f&&!(Ur(r._options.reValidateMode).isOnSubmit&&Ur(r._options.mode).isOnSubmit)&&ua(R,r._names.disabled,r._formValues,r._options.criteriaMode===St.all,r._options.shouldUseNativeValidation,!0).then(B=>!rt(B)&&r._subjects.state.next({errors:wl(r._formState.errors,B,n)}))}r._subjects.state.next({name:n,values:_e(r._formValues)}),r._names.focus&&Kr(r._fields,(R,B)=>{if(r._names.focus&&B.startsWith(r._names.focus)&&R.focus)return R.focus(),1}),r._names.focus="",r._setValid(),p.current=!1},[o,n,r]),P.useEffect(()=>(!J(r._formValues,n)&&r._setFieldArray(n),()=>{const R=(B,_)=>{const I=J(r._fields,B);I&&I._f&&(I._f.mount=_)};r._options.shouldUnregister||a?r.unregister(n):R(n,!1)}),[n,r,i,a]),{swap:P.useCallback(j,[y,n,r]),move:P.useCallback(M,[y,n,r]),prepend:P.useCallback(m,[y,n,r]),append:P.useCallback(E,[y,n,r]),remove:P.useCallback(S,[y,n,r]),insert:P.useCallback(v,[y,n,r]),update:P.useCallback(F,[y,n,r]),replace:P.useCallback(C,[y,n,r]),fields:P.useMemo(()=>o.map((R,B)=>({...R,[i]:d.current[B]||Gt()})),[o,i])}}function mu(e={}){const t=P.useRef(void 0),r=P.useRef(void 0),[n,i]=P.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}=du(e);t.current={...o,formState:n}}const a=t.current.control;return a._options=e,Si(()=>{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]),P.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),P.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),P.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),P.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),P.useEffect(()=>{if(a._proxyFormState.isDirty){const s=a._getDirty();s!==n.isDirty&&a._subjects.state.next({isDirty:s})}},[a,n.isDirty]),P.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]),P.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=pl(n,a),t.current}const As=(e,t,r)=>{if(e&&"reportValidity"in e){const n=J(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Sl=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?As(n.ref,r,e):n&&n.refs&&n.refs.forEach(i=>As(i,r,e))}},xu=(e,t)=>{t.shouldUseNativeValidation&&Sl(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(gu(t.names||Object.keys(e),n)){const s=Object.assign({},J(r,n));ye(s,"root",a),ye(r,n,s)}else ye(r,n,a)}return r},gu=(e,t)=>{const r=Os(t);return e.some(n=>Os(n).match(`^${r}\\.\\d+`))};function Os(e){return e.replace(/\]|\[/g,"")}function yu(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{return Promise.resolve(function(s,o){try{var c=(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&&Sl({},a),{values:r.raw?Object.assign({},n):d,errors:{}}}))}catch(d){return o(d)}return c&&c.then?c.then(void 0,o):c}(0,function(s){if(!s.inner)throw s;return{values:{},errors:xu((o=s,c=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(o.inner||[]).reduce(function(d,h){if(d[h.path]||(d[h.path]={message:h.message,type:h.type}),c){var f=d[h.path].types,p=f&&f[h.type];d[h.path]=hl(h.path,c,d,h.type,p?[].concat(p,h.message):h.message)}return d},{})),a)};var o,c}))}catch(s){return Promise.reject(s)}}}var On=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 ot(){}function vu(e,t){return typeof e=="function"?e(t):e}function pa(e){return typeof e=="number"&&e>=0&&e!==1/0}function Cl(e,t){return Math.max(e+(t||0)-Date.now(),0)}function cr(e,t){return typeof e=="function"?e(t):e}function vt(e,t){return typeof e=="function"?e(t):e}function _s(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==Ua(s,t.options))return!1}else if(!Sn(t.queryKey,s))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||a&&!a(t))}function Rs(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 Ua(e,t){return((t==null?void 0:t.queryKeyHashFn)||wn)(e)}function wn(e){return JSON.stringify(e,(t,r)=>ha(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 da(e,t){if(e===t)return e;const r=$s(e)&&$s(t);if(r||ha(e)&&ha(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),s=a.length,o=r?[]:{},c=new Set(n);let d=0;for(let h=0;h<s;h++){const f=r?h:a[h];(!r&&c.has(f)||r)&&e[f]===void 0&&t[f]===void 0?(o[f]=void 0,d++):(o[f]=da(e[f],t[f]),o[f]===e[f]&&e[f]!==void 0&&d++)}return i===s&&d===i?e:o}return t}function fa(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 $s(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ha(e){if(!Ps(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Ps(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ps(e){return Object.prototype.toString.call(e)==="[object Object]"}function bu(e){return new Promise(t=>{setTimeout(t,e)})}function ma(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 da(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 da(e,t)}return t}function wu(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Su(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var ni=Symbol();function El(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===ni&&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===ni?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Cu(e,t){return typeof e=="function"?e(...t):!!e}var Sr,er,Gr,Xo,Eu=(Xo=class extends On{constructor(){super();fe(this,Sr);fe(this,er);fe(this,Gr);re(this,Gr,t=>{if(!Rr&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){A(this,er)||this.setEventListener(A(this,Gr))}onUnsubscribe(){var t;this.hasListeners()||((t=A(this,er))==null||t.call(this),re(this,er,void 0))}setEventListener(t){var r;re(this,Gr,t),(r=A(this,er))==null||r.call(this),re(this,er,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){A(this,Sr)!==t&&(re(this,Sr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof A(this,Sr)=="boolean"?A(this,Sr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Sr=new WeakMap,er=new WeakMap,Gr=new WeakMap,Xo),Ha=new Eu,Qr,tr,Zr,Jo,ku=(Jo=class extends On{constructor(){super();fe(this,Qr,!0);fe(this,tr);fe(this,Zr);re(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(){A(this,tr)||this.setEventListener(A(this,Zr))}onUnsubscribe(){var t;this.hasListeners()||((t=A(this,tr))==null||t.call(this),re(this,tr,void 0))}setEventListener(t){var r;re(this,Zr,t),(r=A(this,tr))==null||r.call(this),re(this,tr,t(this.setOnline.bind(this)))}setOnline(t){A(this,Qr)!==t&&(re(this,Qr,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return A(this,Qr)}},Qr=new WeakMap,tr=new WeakMap,Zr=new WeakMap,Jo),ii=new ku;function xa(){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 Tu(e){return Math.min(1e3*2**e,3e4)}function kl(e){return(e??"online")==="online"?ii.isOnline():!0}var Tl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Wi(e){return e instanceof Tl}function jl(e){let t=!1,r=0,n=!1,i;const a=xa(),s=m=>{var S;n||(p(new Tl(m)),(S=e.abort)==null||S.call(e))},o=()=>{t=!0},c=()=>{t=!1},d=()=>Ha.isFocused()&&(e.networkMode==="always"||ii.isOnline())&&e.canRun(),h=()=>kl(e.networkMode)&&e.canRun(),f=m=>{var S;n||(n=!0,(S=e.onSuccess)==null||S.call(e,m),i==null||i(),a.resolve(m))},p=m=>{var S;n||(n=!0,(S=e.onError)==null||S.call(e,m),i==null||i(),a.reject(m))},y=()=>new Promise(m=>{var S;i=v=>{(n||d())&&m(v)},(S=e.onPause)==null||S.call(e)}).then(()=>{var m;i=void 0,n||(m=e.onContinue)==null||m.call(e)}),E=()=>{if(n)return;let m;const S=r===0?e.initialPromise:void 0;try{m=S??e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(f).catch(v=>{var R;if(n)return;const j=e.retry??(Rr?0:3),M=e.retryDelay??Tu,F=typeof M=="function"?M(r,v):M,C=j===!0||typeof j=="number"&&r<j||typeof j=="function"&&j(r,v);if(t||!C){p(v);return}r++,(R=e.onFail)==null||R.call(e,r,v),bu(F).then(()=>d()?void 0:y()).then(()=>{t?p(v):E()})})};return{promise:a,cancel:s,continue:()=>(i==null||i(),a),cancelRetry:o,continueRetry:c,canStart:h,start:()=>(h()?E():y().then(E),a)}}var ju=e=>setTimeout(e,0);function Fu(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=ju;const a=o=>{t?e.push(o):i(()=>{r(o)})},s=()=>{const o=e;e=[],o.length&&i(()=>{n(()=>{o.forEach(c=>{r(c)})})})};return{batch:o=>{let c;t++;try{c=o()}finally{t--,t||s()}return c},batchCalls:o=>(...c)=>{a(()=>{o(...c)})},schedule:a,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{i=o}}}var Ke=Fu(),Cr,el,Fl=(el=class{constructor(){fe(this,Cr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),pa(this.gcTime)&&re(this,Cr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Rr?1/0:5*60*1e3))}clearGcTimeout(){A(this,Cr)&&(clearTimeout(A(this,Cr)),re(this,Cr,void 0))}},Cr=new WeakMap,el),Xr,Er,gt,kr,Qe,kn,Tr,Tt,Wt,tl,Au=(tl=class extends Fl{constructor(t){super();fe(this,Tt);fe(this,Xr);fe(this,Er);fe(this,gt);fe(this,kr);fe(this,Qe);fe(this,kn);fe(this,Tr);re(this,Tr,!1),re(this,kn,t.defaultOptions),this.setOptions(t.options),this.observers=[],re(this,kr,t.client),re(this,gt,A(this,kr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,re(this,Xr,Ou(this.options)),this.state=t.state??A(this,Xr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=A(this,Qe))==null?void 0:t.promise}setOptions(t){this.options={...A(this,kn),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&A(this,gt).remove(this)}setData(t,r){const n=ma(this.state.data,t,this.options);return me(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){me(this,Tt,Wt).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=A(this,Qe))==null?void 0:n.promise;return(i=A(this,Qe))==null||i.cancel(t),r?r.then(ot).catch(ot):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(A(this,Xr))}isActive(){return this.observers.some(t=>vt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ni||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:!Cl(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=A(this,Qe))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=A(this,Qe))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),A(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||(A(this,Qe)&&(A(this,Tr)?A(this,Qe).cancel({revert:!0}):A(this,Qe).cancelRetry()),this.scheduleGc()),A(this,gt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||me(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(A(this,Qe))return A(this,Qe).continueRetry(),A(this,Qe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(y=>y.options.queryFn);p&&this.setOptions(p.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=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(re(this,Tr,!0),n.signal)})},a=()=>{const p=El(this.options,r),E=(()=>{const m={client:A(this,kr),queryKey:this.queryKey,meta:this.meta};return i(m),m})();return re(this,Tr,!1),this.options.persister?this.options.persister(p,E,this):p(E)},o=(()=>{const p={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:A(this,kr),state:this.state,fetchFn:a};return i(p),p})();(d=this.options.behavior)==null||d.onFetch(o,this),re(this,Er,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=o.fetchOptions)==null?void 0:h.meta))&&me(this,Tt,Wt).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const c=p=>{var y,E,m,S;Wi(p)&&p.silent||me(this,Tt,Wt).call(this,{type:"error",error:p}),Wi(p)||((E=(y=A(this,gt).config).onError)==null||E.call(y,p,this),(S=(m=A(this,gt).config).onSettled)==null||S.call(m,this.state.data,p,this)),this.scheduleGc()};return re(this,Qe,jl({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:p=>{var y,E,m,S;if(p===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}`),c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(v){c(v);return}(E=(y=A(this,gt).config).onSuccess)==null||E.call(y,p,this),(S=(m=A(this,gt).config).onSettled)==null||S.call(m,p,this.state.error,this),this.scheduleGc()},onError:c,onFail:(p,y)=>{me(this,Tt,Wt).call(this,{type:"failed",failureCount:p,error:y})},onPause:()=>{me(this,Tt,Wt).call(this,{type:"pause"})},onContinue:()=>{me(this,Tt,Wt).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),A(this,Qe).start()}},Xr=new WeakMap,Er=new WeakMap,gt=new WeakMap,kr=new WeakMap,Qe=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,...Al(n.data,this.options),fetchMeta:t.meta??null};case"success":return re(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 Wi(i)&&i.revert&&A(this,Er)?{...A(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),Ke.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),A(this,gt).notify({query:this,type:"updated",action:t})})},tl);function Al(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:kl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ou(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,rl,_u=(rl=class extends On{constructor(t={}){super();fe(this,Pt);this.config=t,re(this,Pt,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??Ua(i,r);let s=this.get(a);return s||(s=new Au({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){A(this,Pt).has(t.queryHash)||(A(this,Pt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=A(this,Pt).get(t.queryHash);r&&(t.destroy(),r===t&&A(this,Pt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ke.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return A(this,Pt).get(t)}getAll(){return[...A(this,Pt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>_s(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>_s(t,n)):r}notify(t){Ke.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Pt=new WeakMap,rl),Dt,et,jr,It,Zt,nl,Ru=(nl=class extends Fl{constructor(t){super();fe(this,It);fe(this,Dt);fe(this,et);fe(this,jr);this.mutationId=t.mutationId,re(this,et,t.mutationCache),re(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){A(this,Dt).includes(t)||(A(this,Dt).push(t),this.clearGcTimeout(),A(this,et).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){re(this,Dt,A(this,Dt).filter(r=>r!==t)),this.scheduleGc(),A(this,et).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){A(this,Dt).length||(this.state.status==="pending"?this.scheduleGc():A(this,et).remove(this))}continue(){var t;return((t=A(this,jr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,s,o,c,d,h,f,p,y,E,m,S,v,j,M,F,C,R,B,_;const r=()=>{me(this,It,Zt).call(this,{type:"continue"})};re(this,jr,jl({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(I,u)=>{me(this,It,Zt).call(this,{type:"failed",failureCount:I,error:u})},onPause:()=>{me(this,It,Zt).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>A(this,et).canRun(this)}));const n=this.state.status==="pending",i=!A(this,jr).canStart();try{if(n)r();else{me(this,It,Zt).call(this,{type:"pending",variables:t,isPaused:i}),await((s=(a=A(this,et).config).onMutate)==null?void 0:s.call(a,t,this));const u=await((c=(o=this.options).onMutate)==null?void 0:c.call(o,t));u!==this.state.context&&me(this,It,Zt).call(this,{type:"pending",context:u,variables:t,isPaused:i})}const I=await A(this,jr).start();return await((h=(d=A(this,et).config).onSuccess)==null?void 0:h.call(d,I,t,this.state.context,this)),await((p=(f=this.options).onSuccess)==null?void 0:p.call(f,I,t,this.state.context)),await((E=(y=A(this,et).config).onSettled)==null?void 0:E.call(y,I,null,this.state.variables,this.state.context,this)),await((S=(m=this.options).onSettled)==null?void 0:S.call(m,I,null,t,this.state.context)),me(this,It,Zt).call(this,{type:"success",data:I}),I}catch(I){try{throw await((j=(v=A(this,et).config).onError)==null?void 0:j.call(v,I,t,this.state.context,this)),await((F=(M=this.options).onError)==null?void 0:F.call(M,I,t,this.state.context)),await((R=(C=A(this,et).config).onSettled)==null?void 0:R.call(C,void 0,I,this.state.variables,this.state.context,this)),await((_=(B=this.options).onSettled)==null?void 0:_.call(B,void 0,I,t,this.state.context)),I}finally{me(this,It,Zt).call(this,{type:"error",error:I})}}finally{A(this,et).runNext(this)}}},Dt=new WeakMap,et=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),Ke.batch(()=>{A(this,Dt).forEach(n=>{n.onMutationUpdate(t)}),A(this,et).notify({mutation:this,type:"updated",action:t})})},nl);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,il,Pu=(il=class extends On{constructor(t={}){super();fe(this,Ut);fe(this,jt);fe(this,Tn);this.config=t,re(this,Ut,new Set),re(this,jt,new Map),re(this,Tn,0)}build(t,r,n){const i=new Ru({mutationCache:this,mutationId:++Dn(this,Tn)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){A(this,Ut).add(t);const r=In(t);if(typeof r=="string"){const n=A(this,jt).get(r);n?n.push(t):A(this,jt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(A(this,Ut).delete(t)){const r=In(t);if(typeof r=="string"){const n=A(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&&A(this,jt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=In(t);if(typeof r=="string"){const n=A(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=A(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(){Ke.batch(()=>{A(this,Ut).forEach(t=>{this.notify({type:"removed",mutation:t})}),A(this,Ut).clear(),A(this,jt).clear()})}getAll(){return Array.from(A(this,Ut))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Rs(r,n))}findAll(t={}){return this.getAll().filter(r=>Rs(t,r))}notify(t){Ke.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Ke.batch(()=>Promise.all(t.map(r=>r.continue().catch(ot))))}},Ut=new WeakMap,jt=new WeakMap,Tn=new WeakMap,il);function In(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Ds(e){return{onFetch:(t,r)=>{var h,f,p,y,E;const n=t.options,i=(p=(f=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:f.fetchMore)==null?void 0:p.direction,a=((y=t.state.data)==null?void 0:y.pages)||[],s=((E=t.state.data)==null?void 0:E.pageParams)||[];let o={pages:[],pageParams:[]},c=0;const d=async()=>{let m=!1;const S=M=>{Object.defineProperty(M,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},v=El(t.options,t.fetchOptions),j=async(M,F,C)=>{if(m)return Promise.reject();if(F==null&&M.pages.length)return Promise.resolve(M);const B=(()=>{const D={client:t.client,queryKey:t.queryKey,pageParam:F,direction:C?"backward":"forward",meta:t.options.meta};return S(D),D})(),_=await v(B),{maxPages:I}=t.options,u=C?Su:wu;return{pages:u(M.pages,_,I),pageParams:u(M.pageParams,F,I)}};if(i&&a.length){const M=i==="backward",F=M?Du:Is,C={pages:a,pageParams:s},R=F(n,C);o=await j(C,R,M)}else{const M=e??a.length;do{const F=c===0?s[0]??n.initialPageParam:Is(n,o);if(c>0&&F==null)break;o=await j(o,F),c++}while(c<M)}return o};t.options.persister?t.fetchFn=()=>{var m,S;return(S=(m=t.options).persister)==null?void 0:S.call(m,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=d}}}function Is(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 Du(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 ze,rr,nr,Jr,en,ir,tn,rn,al,Iu=(al=class{constructor(e={}){fe(this,ze);fe(this,rr);fe(this,nr);fe(this,Jr);fe(this,en);fe(this,ir);fe(this,tn);fe(this,rn);re(this,ze,e.queryCache||new _u),re(this,rr,e.mutationCache||new Pu),re(this,nr,e.defaultOptions||{}),re(this,Jr,new Map),re(this,en,new Map),re(this,ir,0)}mount(){Dn(this,ir)._++,A(this,ir)===1&&(re(this,tn,Ha.subscribe(async e=>{e&&(await this.resumePausedMutations(),A(this,ze).onFocus())})),re(this,rn,ii.subscribe(async e=>{e&&(await this.resumePausedMutations(),A(this,ze).onOnline())})))}unmount(){var e,t;Dn(this,ir)._--,A(this,ir)===0&&((e=A(this,tn))==null||e.call(this),re(this,tn,void 0),(t=A(this,rn))==null||t.call(this),re(this,rn,void 0))}isFetching(e){return A(this,ze).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return A(this,rr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=A(this,ze).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=A(this,ze).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 A(this,ze).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=A(this,ze).get(n.queryHash),a=i==null?void 0:i.state.data,s=vu(t,a);if(s!==void 0)return A(this,ze).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Ke.batch(()=>A(this,ze).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=A(this,ze).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=A(this,ze);Ke.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=A(this,ze);return Ke.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ke.batch(()=>A(this,ze).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(ot).catch(ot)}invalidateQueries(e,t={}){return Ke.batch(()=>(A(this,ze).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=Ke.batch(()=>A(this,ze).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(ot)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(ot)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=A(this,ze).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(ot).catch(ot)}fetchInfiniteQuery(e){return e.behavior=Ds(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ot).catch(ot)}ensureInfiniteQueryData(e){return e.behavior=Ds(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ii.isOnline()?A(this,rr).resumePausedMutations():Promise.resolve()}getQueryCache(){return A(this,ze)}getMutationCache(){return A(this,rr)}getDefaultOptions(){return A(this,nr)}setDefaultOptions(e){re(this,nr,e)}setQueryDefaults(e,t){A(this,Jr).set(wn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...A(this,Jr).values()],r={};return t.forEach(n=>{Sn(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){A(this,en).set(wn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...A(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={...A(this,nr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ua(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===ni&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...A(this,nr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){A(this,ze).clear(),A(this,rr).clear()}},ze=new WeakMap,rr=new WeakMap,nr=new WeakMap,Jr=new WeakMap,en=new WeakMap,ir=new WeakMap,tn=new WeakMap,rn=new WeakMap,al),st,xe,jn,tt,Fr,nn,ar,sr,Fn,an,sn,Ar,Or,or,on,Se,mn,ga,ya,va,ba,wa,Sa,Ca,Ol,sl,Mu=(sl=class extends On{constructor(t,r){super();fe(this,Se);fe(this,st);fe(this,xe);fe(this,jn);fe(this,tt);fe(this,Fr);fe(this,nn);fe(this,ar);fe(this,sr);fe(this,Fn);fe(this,an);fe(this,sn);fe(this,Ar);fe(this,Or);fe(this,or);fe(this,on,new Set);this.options=r,re(this,st,t),re(this,sr,null),re(this,ar,xa()),this.options.experimental_prefetchInRender||A(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&&(A(this,xe).addObserver(this),Ms(A(this,xe),this.options)?me(this,Se,mn).call(this):this.updateResult(),me(this,Se,ba).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ea(A(this,xe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ea(A(this,xe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,me(this,Se,wa).call(this),me(this,Se,Sa).call(this),A(this,xe).removeObserver(this)}setOptions(t){const r=this.options,n=A(this,xe);if(this.options=A(this,st).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof vt(this.options.enabled,A(this,xe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");me(this,Se,Ca).call(this),A(this,xe).setOptions(this.options),r._defaulted&&!fa(this.options,r)&&A(this,st).getQueryCache().notify({type:"observerOptionsUpdated",query:A(this,xe),observer:this});const i=this.hasListeners();i&&zs(A(this,xe),n,this.options,r)&&me(this,Se,mn).call(this),this.updateResult(),i&&(A(this,xe)!==n||vt(this.options.enabled,A(this,xe))!==vt(r.enabled,A(this,xe))||cr(this.options.staleTime,A(this,xe))!==cr(r.staleTime,A(this,xe)))&&me(this,Se,ga).call(this);const a=me(this,Se,ya).call(this);i&&(A(this,xe)!==n||vt(this.options.enabled,A(this,xe))!==vt(r.enabled,A(this,xe))||a!==A(this,or))&&me(this,Se,va).call(this,a)}getOptimisticResult(t){const r=A(this,st).getQueryCache().build(A(this,st),t),n=this.createResult(r,t);return Bu(this,n)&&(re(this,tt,n),re(this,nn,this.options),re(this,Fr,A(this,xe).state)),n}getCurrentResult(){return A(this,tt)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),Reflect.get(n,i))})}trackProp(t){A(this,on).add(t)}getCurrentQuery(){return A(this,xe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=A(this,st).defaultQueryOptions(t),n=A(this,st).getQueryCache().build(A(this,st),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return me(this,Se,mn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),A(this,tt)))}createResult(t,r){var I;const n=A(this,xe),i=this.options,a=A(this,tt),s=A(this,Fr),o=A(this,nn),d=t!==n?t.state:A(this,jn),{state:h}=t;let f={...h},p=!1,y;if(r._optimisticResults){const u=this.hasListeners(),D=!u&&Ms(t,r),L=u&&zs(t,n,r,i);(D||L)&&(f={...f,...Al(h.data,t.options)}),r._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:E,errorUpdatedAt:m,status:S}=f;y=f.data;let v=!1;if(r.placeholderData!==void 0&&y===void 0&&S==="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((I=A(this,sn))==null?void 0:I.state.data,A(this,sn)):r.placeholderData,u!==void 0&&(S="success",y=ma(a==null?void 0:a.data,u,r),p=!0)}if(r.select&&y!==void 0&&!v)if(a&&y===(s==null?void 0:s.data)&&r.select===A(this,Fn))y=A(this,an);else try{re(this,Fn,r.select),y=r.select(y),y=ma(a==null?void 0:a.data,y,r),re(this,an,y),re(this,sr,null)}catch(u){re(this,sr,u)}A(this,sr)&&(E=A(this,sr),y=A(this,an),m=Date.now(),S="error");const j=f.fetchStatus==="fetching",M=S==="pending",F=S==="error",C=M&&j,R=y!==void 0,_={status:S,fetchStatus:f.fetchStatus,isPending:M,isSuccess:S==="success",isError:F,isInitialLoading:C,isLoading:C,data:y,dataUpdatedAt:f.dataUpdatedAt,error:E,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:j,isRefetching:j&&!M,isLoadingError:F&&!R,isPaused:f.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:F&&R,isStale:Ka(t,r),refetch:this.refetch,promise:A(this,ar),isEnabled:vt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const u=$=>{_.status==="error"?$.reject(_.error):_.data!==void 0&&$.resolve(_.data)},D=()=>{const $=re(this,ar,_.promise=xa());u($)},L=A(this,ar);switch(L.status){case"pending":t.queryHash===n.queryHash&&u(L);break;case"fulfilled":(_.status==="error"||_.data!==L.value)&&D();break;case"rejected":(_.status!=="error"||_.error!==L.reason)&&D();break}}return _}updateResult(){const t=A(this,tt),r=this.createResult(A(this,xe),this.options);if(re(this,Fr,A(this,xe).state),re(this,nn,this.options),A(this,Fr).data!==void 0&&re(this,sn,A(this,xe)),fa(r,t))return;re(this,tt,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!A(this,on).size)return!0;const s=new Set(a??A(this,on));return this.options.throwOnError&&s.add("error"),Object.keys(A(this,tt)).some(o=>{const c=o;return A(this,tt)[c]!==t[c]&&s.has(c)})};me(this,Se,Ol).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&me(this,Se,ba).call(this)}},st=new WeakMap,xe=new WeakMap,jn=new WeakMap,tt=new WeakMap,Fr=new WeakMap,nn=new WeakMap,ar=new WeakMap,sr=new WeakMap,Fn=new WeakMap,an=new WeakMap,sn=new WeakMap,Ar=new WeakMap,Or=new WeakMap,or=new WeakMap,on=new WeakMap,Se=new WeakSet,mn=function(t){me(this,Se,Ca).call(this);let r=A(this,xe).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(ot)),r},ga=function(){me(this,Se,wa).call(this);const t=cr(this.options.staleTime,A(this,xe));if(Rr||A(this,tt).isStale||!pa(t))return;const n=Cl(A(this,tt).dataUpdatedAt,t)+1;re(this,Ar,setTimeout(()=>{A(this,tt).isStale||this.updateResult()},n))},ya=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(A(this,xe)):this.options.refetchInterval)??!1},va=function(t){me(this,Se,Sa).call(this),re(this,or,t),!(Rr||vt(this.options.enabled,A(this,xe))===!1||!pa(A(this,or))||A(this,or)===0)&&re(this,Or,setInterval(()=>{(this.options.refetchIntervalInBackground||Ha.isFocused())&&me(this,Se,mn).call(this)},A(this,or)))},ba=function(){me(this,Se,ga).call(this),me(this,Se,va).call(this,me(this,Se,ya).call(this))},wa=function(){A(this,Ar)&&(clearTimeout(A(this,Ar)),re(this,Ar,void 0))},Sa=function(){A(this,Or)&&(clearInterval(A(this,Or)),re(this,Or,void 0))},Ca=function(){const t=A(this,st).getQueryCache().build(A(this,st),this.options);if(t===A(this,xe))return;const r=A(this,xe);re(this,xe,t),re(this,jn,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Ol=function(t){Ke.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(A(this,tt))}),A(this,st).getQueryCache().notify({query:A(this,xe),type:"observerResultsUpdated"})})},sl);function zu(e,t){return vt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ms(e,t){return zu(e,t)||e.state.data!==void 0&&Ea(e,t,t.refetchOnMount)}function Ea(e,t,r){if(vt(t.enabled,e)!==!1&&cr(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Ka(e,t)}return!1}function zs(e,t,r,n){return(e!==t||vt(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Ka(e,r)}function Ka(e,t){return vt(t.enabled,e)!==!1&&e.isStaleByTime(cr(t.staleTime,e))}function Bu(e,t){return!fa(e.getCurrentResult(),t)}var _l=ne.createContext(void 0),Vu=e=>{const t=ne.useContext(_l);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Nu=({client:e,children:t})=>(ne.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(_l.Provider,{value:e,children:t})),Rl=ne.createContext(!1),Lu=()=>ne.useContext(Rl);Rl.Provider;function qu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Wu=ne.createContext(qu()),Uu=()=>ne.useContext(Wu),Hu=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Ku=e=>{ne.useEffect(()=>{e.clearReset()},[e])},Yu=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||Cu(r,[e.error,n])),Gu=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))}},Qu=(e,t)=>e.isLoading&&e.isFetching&&!t,Zu=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Bs=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Xu(e,t,r){var f,p,y,E,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=Lu(),i=Uu(),a=Vu(),s=a.defaultQueryOptions(e);(p=(f=a.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||p.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",Gu(s),Hu(s,i),Ku(i);const o=!a.getQueryCache().get(s.queryHash),[c]=ne.useState(()=>new t(a,s)),d=c.getOptimisticResult(s),h=!n&&e.subscribed!==!1;if(ne.useSyncExternalStore(ne.useCallback(S=>{const v=h?c.subscribe(Ke.batchCalls(S)):ot;return c.updateResult(),v},[c,h]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),ne.useEffect(()=>{c.setOptions(s)},[s,c]),Zu(s,d))throw Bs(s,c,i);if(Yu({result:d,errorResetBoundary:i,throwOnError:s.throwOnError,query:a.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw d.error;if((E=(y=a.getDefaultOptions().queries)==null?void 0:y._experimental_afterQuery)==null||E.call(y,s,d),s.experimental_prefetchInRender&&!Rr&&Qu(d,n)){const S=o?Bs(s,c,i):(m=a.getQueryCache().get(s.queryHash))==null?void 0:m.promise;S==null||S.catch(ot).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?d:c.trackResult(d)}function Ju(e,t){return Xu(e,Mu)}function Ya(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mn={exports:{}},zn={exports:{}},be={};/** @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 Vs;function ep(){if(Vs)return we;Vs=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,c=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,p=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,k=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,C=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function D(E){if(typeof E=="object"&&E!==null){var R=E.$$typeof;switch(R){case t:switch(E=E.type,E){case c:case d:case n:case a:case i:case f:return E;default:switch(E=E&&E.$$typeof,E){case o:case h:case k:case y:case s:return E;default:return R}}case r:return R}}}function j(E){return D(E)===d}return we.AsyncMode=c,we.ConcurrentMode=d,we.ContextConsumer=o,we.ContextProvider=s,we.Element=t,we.ForwardRef=h,we.Fragment=n,we.Lazy=k,we.Memo=y,we.Portal=r,we.Profiler=a,we.StrictMode=i,we.Suspense=f,we.isAsyncMode=function(E){return j(E)||D(E)===c},we.isConcurrentMode=j,we.isContextConsumer=function(E){return D(E)===o},we.isContextProvider=function(E){return D(E)===s},we.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},we.isForwardRef=function(E){return D(E)===h},we.isFragment=function(E){return D(E)===n},we.isLazy=function(E){return D(E)===k},we.isMemo=function(E){return D(E)===y},we.isPortal=function(E){return D(E)===r},we.isProfiler=function(E){return D(E)===a},we.isStrictMode=function(E){return D(E)===i},we.isSuspense=function(E){return D(E)===f},we.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===n||E===d||E===a||E===i||E===f||E===p||typeof E=="object"&&E!==null&&(E.$$typeof===k||E.$$typeof===y||E.$$typeof===s||E.$$typeof===o||E.$$typeof===h||E.$$typeof===C||E.$$typeof===v||E.$$typeof===S||E.$$typeof===m)},we.typeOf=D,we}var Se={};/** @license React v16.13.1
8
+ */var Vs;function ep(){if(Vs)return be;Vs=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,c=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,p=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function M(C){if(typeof C=="object"&&C!==null){var R=C.$$typeof;switch(R){case t:switch(C=C.type,C){case c:case d:case n:case a:case i:case f:return C;default:switch(C=C&&C.$$typeof,C){case o:case h:case E:case y:case s:return C;default:return R}}case r:return R}}}function F(C){return M(C)===d}return be.AsyncMode=c,be.ConcurrentMode=d,be.ContextConsumer=o,be.ContextProvider=s,be.Element=t,be.ForwardRef=h,be.Fragment=n,be.Lazy=E,be.Memo=y,be.Portal=r,be.Profiler=a,be.StrictMode=i,be.Suspense=f,be.isAsyncMode=function(C){return F(C)||M(C)===c},be.isConcurrentMode=F,be.isContextConsumer=function(C){return M(C)===o},be.isContextProvider=function(C){return M(C)===s},be.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===t},be.isForwardRef=function(C){return M(C)===h},be.isFragment=function(C){return M(C)===n},be.isLazy=function(C){return M(C)===E},be.isMemo=function(C){return M(C)===y},be.isPortal=function(C){return M(C)===r},be.isProfiler=function(C){return M(C)===a},be.isStrictMode=function(C){return M(C)===i},be.isSuspense=function(C){return M(C)===f},be.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===n||C===d||C===a||C===i||C===f||C===p||typeof C=="object"&&C!==null&&(C.$$typeof===E||C.$$typeof===y||C.$$typeof===s||C.$$typeof===o||C.$$typeof===h||C.$$typeof===S||C.$$typeof===v||C.$$typeof===j||C.$$typeof===m)},be.typeOf=M,be}var we={};/** @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 Ns;function tp(){return Ns||(Ns=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,c=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,p=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,k=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,C=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function D(X){return typeof X=="string"||typeof X=="function"||X===n||X===d||X===a||X===i||X===f||X===p||typeof X=="object"&&X!==null&&(X.$$typeof===k||X.$$typeof===y||X.$$typeof===s||X.$$typeof===o||X.$$typeof===h||X.$$typeof===C||X.$$typeof===v||X.$$typeof===S||X.$$typeof===m)}function j(X){if(typeof X=="object"&&X!==null){var Ie=X.$$typeof;switch(Ie){case t:var We=X.type;switch(We){case c:case d:case n:case a:case i:case f:return We;default:var Qe=We&&We.$$typeof;switch(Qe){case o:case h:case k:case y:case s:return Qe;default:return Ie}}case r:return Ie}}}var E=c,R=d,z=o,_=s,I=t,u=h,P=n,L=k,A=y,B=r,Y=a,ae=i,de=f,ce=!1;function Q(X){return ce||(ce=!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.")),q(X)||j(X)===c}function q(X){return j(X)===d}function G(X){return j(X)===o}function ue(X){return j(X)===s}function fe(X){return typeof X=="object"&&X!==null&&X.$$typeof===t}function pe(X){return j(X)===h}function me(X){return j(X)===n}function W(X){return j(X)===k}function J(X){return j(X)===y}function re(X){return j(X)===r}function oe(X){return j(X)===a}function le(X){return j(X)===i}function ve(X){return j(X)===f}Se.AsyncMode=E,Se.ConcurrentMode=R,Se.ContextConsumer=z,Se.ContextProvider=_,Se.Element=I,Se.ForwardRef=u,Se.Fragment=P,Se.Lazy=L,Se.Memo=A,Se.Portal=B,Se.Profiler=Y,Se.StrictMode=ae,Se.Suspense=de,Se.isAsyncMode=Q,Se.isConcurrentMode=q,Se.isContextConsumer=G,Se.isContextProvider=ue,Se.isElement=fe,Se.isForwardRef=pe,Se.isFragment=me,Se.isLazy=W,Se.isMemo=J,Se.isPortal=re,Se.isProfiler=oe,Se.isStrictMode=le,Se.isSuspense=ve,Se.isValidElementType=D,Se.typeOf=j}()),Se}var Ls;function $l(){return Ls||(Ls=1,process.env.NODE_ENV==="production"?zn.exports=ep():zn.exports=tp()),zn.exports}/*
15
+ */var Ns;function tp(){return Ns||(Ns=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,c=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,p=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function M(Q){return typeof Q=="string"||typeof Q=="function"||Q===n||Q===d||Q===a||Q===i||Q===f||Q===p||typeof Q=="object"&&Q!==null&&(Q.$$typeof===E||Q.$$typeof===y||Q.$$typeof===s||Q.$$typeof===o||Q.$$typeof===h||Q.$$typeof===S||Q.$$typeof===v||Q.$$typeof===j||Q.$$typeof===m)}function F(Q){if(typeof Q=="object"&&Q!==null){var Pe=Q.$$typeof;switch(Pe){case t:var qe=Q.type;switch(qe){case c:case d:case n:case a:case i:case f:return qe;default:var Ge=qe&&qe.$$typeof;switch(Ge){case o:case h:case E:case y:case s:return Ge;default:return Pe}}case r:return Pe}}}var C=c,R=d,B=o,_=s,I=t,u=h,D=n,L=E,$=y,V=r,ee=a,ie=i,he=f,le=!1;function Y(Q){return le||(le=!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.")),U(Q)||F(Q)===c}function U(Q){return F(Q)===d}function Z(Q){return F(Q)===o}function ce(Q){return F(Q)===s}function de(Q){return typeof Q=="object"&&Q!==null&&Q.$$typeof===t}function oe(Q){return F(Q)===h}function pe(Q){return F(Q)===n}function H(Q){return F(Q)===E}function X(Q){return F(Q)===y}function te(Q){return F(Q)===r}function ae(Q){return F(Q)===a}function se(Q){return F(Q)===i}function ge(Q){return F(Q)===f}we.AsyncMode=C,we.ConcurrentMode=R,we.ContextConsumer=B,we.ContextProvider=_,we.Element=I,we.ForwardRef=u,we.Fragment=D,we.Lazy=L,we.Memo=$,we.Portal=V,we.Profiler=ee,we.StrictMode=ie,we.Suspense=he,we.isAsyncMode=Y,we.isConcurrentMode=U,we.isContextConsumer=Z,we.isContextProvider=ce,we.isElement=de,we.isForwardRef=oe,we.isFragment=pe,we.isLazy=H,we.isMemo=X,we.isPortal=te,we.isProfiler=ae,we.isStrictMode=se,we.isSuspense=ge,we.isValidElementType=M,we.typeOf=F}()),we}var Ls;function $l(){return Ls||(Ls=1,process.env.NODE_ENV==="production"?zn.exports=ep():zn.exports=tp()),zn.exports}/*
16
16
  object-assign
17
17
  (c) Sindre Sorhus
18
18
  @license MIT
19
- */var Ui,qs;function rp(){if(qs)return Ui;qs=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 c=Object.getOwnPropertyNames(s).map(function(h){return s[h]});if(c.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 Ui=i()?Object.assign:function(a,s){for(var o,c=n(a),d,h=1;h<arguments.length;h++){o=Object(arguments[h]);for(var f in o)t.call(o,f)&&(c[f]=o[f]);if(e){d=e(o);for(var p=0;p<d.length;p++)r.call(o,d[p])&&(c[d[p]]=o[d[p]])}}return c},Ui}var Hi,Ws;function Ga(){if(Ws)return Hi;Ws=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Hi=e,Hi}var Ki,Us;function Pl(){return Us||(Us=1,Ki=Function.call.bind(Object.prototype.hasOwnProperty)),Ki}var Yi,Hs;function np(){if(Hs)return Yi;Hs=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ga(),r={},n=Pl();e=function(a){var s="Warning: "+a;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(a,s,o,c,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 p=Error((c||"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 p.name="Invariant Violation",p}f=a[h](s,h,c,o,null,t)}catch(k){f=k}if(f&&!(f instanceof Error)&&e((c||"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 y=d?d():"";e("Failed "+o+" type: "+f.message+(y??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Yi=i,Yi}var Gi,Ks;function ip(){if(Ks)return Gi;Ks=1;var e=$l(),t=rp(),r=Ga(),n=Pl(),i=np(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var c="Warning: "+o;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function s(){return null}return Gi=function(o,c){var d=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function f(q){var G=q&&(d&&q[d]||q[h]);if(typeof G=="function")return G}var p="<<anonymous>>",y={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:S(),arrayOf:D,element:j(),elementType:E(),instanceOf:R,node:u(),objectOf:_,oneOf:z,oneOfType:I,shape:L,exact:A};function k(q,G){return q===G?q!==0||1/q===1/G:q!==q&&G!==G}function m(q,G){this.message=q,this.data=G&&typeof G=="object"?G:{},this.stack=""}m.prototype=Error.prototype;function C(q){if(process.env.NODE_ENV!=="production")var G={},ue=0;function fe(me,W,J,re,oe,le,ve){if(re=re||p,le=le||J,ve!==r){if(c){var X=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 X.name="Invariant Violation",X}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ie=re+":"+J;!G[Ie]&&ue<3&&(a("You are manually calling a React.PropTypes validation function for the `"+le+"` prop on `"+re+"`. 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."),G[Ie]=!0,ue++)}}return W[J]==null?me?W[J]===null?new m("The "+oe+" `"+le+"` is marked as required "+("in `"+re+"`, but its value is `null`.")):new m("The "+oe+" `"+le+"` is marked as required in "+("`"+re+"`, but its value is `undefined`.")):null:q(W,J,re,oe,le)}var pe=fe.bind(null,!1);return pe.isRequired=fe.bind(null,!0),pe}function v(q){function G(ue,fe,pe,me,W,J){var re=ue[fe],oe=ae(re);if(oe!==q){var le=de(re);return new m("Invalid "+me+" `"+W+"` of type "+("`"+le+"` supplied to `"+pe+"`, expected ")+("`"+q+"`."),{expectedType:q})}return null}return C(G)}function S(){return C(s)}function D(q){function G(ue,fe,pe,me,W){if(typeof q!="function")return new m("Property `"+W+"` of component `"+pe+"` has invalid PropType notation inside arrayOf.");var J=ue[fe];if(!Array.isArray(J)){var re=ae(J);return new m("Invalid "+me+" `"+W+"` of type "+("`"+re+"` supplied to `"+pe+"`, expected an array."))}for(var oe=0;oe<J.length;oe++){var le=q(J,oe,pe,me,W+"["+oe+"]",r);if(le instanceof Error)return le}return null}return C(G)}function j(){function q(G,ue,fe,pe,me){var W=G[ue];if(!o(W)){var J=ae(W);return new m("Invalid "+pe+" `"+me+"` of type "+("`"+J+"` supplied to `"+fe+"`, expected a single ReactElement."))}return null}return C(q)}function E(){function q(G,ue,fe,pe,me){var W=G[ue];if(!e.isValidElementType(W)){var J=ae(W);return new m("Invalid "+pe+" `"+me+"` of type "+("`"+J+"` supplied to `"+fe+"`, expected a single ReactElement type."))}return null}return C(q)}function R(q){function G(ue,fe,pe,me,W){if(!(ue[fe]instanceof q)){var J=q.name||p,re=Q(ue[fe]);return new m("Invalid "+me+" `"+W+"` of type "+("`"+re+"` supplied to `"+pe+"`, expected ")+("instance of `"+J+"`."))}return null}return C(G)}function z(q){if(!Array.isArray(q))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 G(ue,fe,pe,me,W){for(var J=ue[fe],re=0;re<q.length;re++)if(k(J,q[re]))return null;var oe=JSON.stringify(q,function(ve,X){var Ie=de(X);return Ie==="symbol"?String(X):X});return new m("Invalid "+me+" `"+W+"` of value `"+String(J)+"` "+("supplied to `"+pe+"`, expected one of "+oe+"."))}return C(G)}function _(q){function G(ue,fe,pe,me,W){if(typeof q!="function")return new m("Property `"+W+"` of component `"+pe+"` has invalid PropType notation inside objectOf.");var J=ue[fe],re=ae(J);if(re!=="object")return new m("Invalid "+me+" `"+W+"` of type "+("`"+re+"` supplied to `"+pe+"`, expected an object."));for(var oe in J)if(n(J,oe)){var le=q(J,oe,pe,me,W+"."+oe,r);if(le instanceof Error)return le}return null}return C(G)}function I(q){if(!Array.isArray(q))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var G=0;G<q.length;G++){var ue=q[G];if(typeof ue!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ce(ue)+" at index "+G+"."),s}function fe(pe,me,W,J,re){for(var oe=[],le=0;le<q.length;le++){var ve=q[le],X=ve(pe,me,W,J,re,r);if(X==null)return null;X.data&&n(X.data,"expectedType")&&oe.push(X.data.expectedType)}var Ie=oe.length>0?", expected one of type ["+oe.join(", ")+"]":"";return new m("Invalid "+J+" `"+re+"` supplied to "+("`"+W+"`"+Ie+"."))}return C(fe)}function u(){function q(G,ue,fe,pe,me){return B(G[ue])?null:new m("Invalid "+pe+" `"+me+"` supplied to "+("`"+fe+"`, expected a ReactNode."))}return C(q)}function P(q,G,ue,fe,pe){return new m((q||"React class")+": "+G+" type `"+ue+"."+fe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+pe+"`.")}function L(q){function G(ue,fe,pe,me,W){var J=ue[fe],re=ae(J);if(re!=="object")return new m("Invalid "+me+" `"+W+"` of type `"+re+"` "+("supplied to `"+pe+"`, expected `object`."));for(var oe in q){var le=q[oe];if(typeof le!="function")return P(pe,me,W,oe,de(le));var ve=le(J,oe,pe,me,W+"."+oe,r);if(ve)return ve}return null}return C(G)}function A(q){function G(ue,fe,pe,me,W){var J=ue[fe],re=ae(J);if(re!=="object")return new m("Invalid "+me+" `"+W+"` of type `"+re+"` "+("supplied to `"+pe+"`, expected `object`."));var oe=t({},ue[fe],q);for(var le in oe){var ve=q[le];if(n(q,le)&&typeof ve!="function")return P(pe,me,W,le,de(ve));if(!ve)return new m("Invalid "+me+" `"+W+"` key `"+le+"` supplied to `"+pe+"`.\nBad object: "+JSON.stringify(ue[fe],null," ")+`
20
- Valid keys: `+JSON.stringify(Object.keys(q),null," "));var X=ve(J,le,pe,me,W+"."+le,r);if(X)return X}return null}return C(G)}function B(q){switch(typeof q){case"number":case"string":case"undefined":return!0;case"boolean":return!q;case"object":if(Array.isArray(q))return q.every(B);if(q===null||o(q))return!0;var G=f(q);if(G){var ue=G.call(q),fe;if(G!==q.entries){for(;!(fe=ue.next()).done;)if(!B(fe.value))return!1}else for(;!(fe=ue.next()).done;){var pe=fe.value;if(pe&&!B(pe[1]))return!1}}else return!1;return!0;default:return!1}}function Y(q,G){return q==="symbol"?!0:G?G["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&G instanceof Symbol:!1}function ae(q){var G=typeof q;return Array.isArray(q)?"array":q instanceof RegExp?"object":Y(G,q)?"symbol":G}function de(q){if(typeof q>"u"||q===null)return""+q;var G=ae(q);if(G==="object"){if(q instanceof Date)return"date";if(q instanceof RegExp)return"regexp"}return G}function ce(q){var G=de(q);switch(G){case"array":case"object":return"an "+G;case"boolean":case"date":case"regexp":return"a "+G;default:return G}}function Q(q){return!q.constructor||!q.constructor.name?p:q.constructor.name}return y.checkPropTypes=i,y.resetWarningCache=i.resetWarningCache,y.PropTypes=y,y},Gi}var Qi,Ys;function ap(){if(Ys)return Qi;Ys=1;var e=Ga();function t(){}function r(){}return r.resetWarningCache=t,Qi=function(){function n(s,o,c,d,h,f){if(f!==e){var p=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 p.name="Invariant Violation",p}}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},Qi}var Gs;function sp(){if(Gs)return Mn.exports;if(Gs=1,process.env.NODE_ENV!=="production"){var e=$l(),t=!0;Mn.exports=ip()(e.isElement,t)}else Mn.exports=ap()();return Mn.exports}var op=sp();const T=Ya(op);function Dl(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=Dl(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function it(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Dl(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 c=0;c<a.length;c+=1){const d=a[c];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 De(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:{}},Te={};/**
19
+ */var Ui,qs;function rp(){if(qs)return Ui;qs=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 c=Object.getOwnPropertyNames(s).map(function(h){return s[h]});if(c.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 Ui=i()?Object.assign:function(a,s){for(var o,c=n(a),d,h=1;h<arguments.length;h++){o=Object(arguments[h]);for(var f in o)t.call(o,f)&&(c[f]=o[f]);if(e){d=e(o);for(var p=0;p<d.length;p++)r.call(o,d[p])&&(c[d[p]]=o[d[p]])}}return c},Ui}var Hi,Ws;function Ga(){if(Ws)return Hi;Ws=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Hi=e,Hi}var Ki,Us;function Pl(){return Us||(Us=1,Ki=Function.call.bind(Object.prototype.hasOwnProperty)),Ki}var Yi,Hs;function np(){if(Hs)return Yi;Hs=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ga(),r={},n=Pl();e=function(a){var s="Warning: "+a;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(a,s,o,c,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 p=Error((c||"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 p.name="Invariant Violation",p}f=a[h](s,h,c,o,null,t)}catch(E){f=E}if(f&&!(f instanceof Error)&&e((c||"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 y=d?d():"";e("Failed "+o+" type: "+f.message+(y??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Yi=i,Yi}var Gi,Ks;function ip(){if(Ks)return Gi;Ks=1;var e=$l(),t=rp(),r=Ga(),n=Pl(),i=np(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var c="Warning: "+o;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function s(){return null}return Gi=function(o,c){var d=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function f(U){var Z=U&&(d&&U[d]||U[h]);if(typeof Z=="function")return Z}var p="<<anonymous>>",y={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:j(),arrayOf:M,element:F(),elementType:C(),instanceOf:R,node:u(),objectOf:_,oneOf:B,oneOfType:I,shape:L,exact:$};function E(U,Z){return U===Z?U!==0||1/U===1/Z:U!==U&&Z!==Z}function m(U,Z){this.message=U,this.data=Z&&typeof Z=="object"?Z:{},this.stack=""}m.prototype=Error.prototype;function S(U){if(process.env.NODE_ENV!=="production")var Z={},ce=0;function de(pe,H,X,te,ae,se,ge){if(te=te||p,se=se||X,ge!==r){if(c){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 Pe=te+":"+X;!Z[Pe]&&ce<3&&(a("You are manually calling a React.PropTypes validation function for the `"+se+"` prop on `"+te+"`. 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."),Z[Pe]=!0,ce++)}}return H[X]==null?pe?H[X]===null?new m("The "+ae+" `"+se+"` is marked as required "+("in `"+te+"`, but its value is `null`.")):new m("The "+ae+" `"+se+"` is marked as required in "+("`"+te+"`, but its value is `undefined`.")):null:U(H,X,te,ae,se)}var oe=de.bind(null,!1);return oe.isRequired=de.bind(null,!0),oe}function v(U){function Z(ce,de,oe,pe,H,X){var te=ce[de],ae=ie(te);if(ae!==U){var se=he(te);return new m("Invalid "+pe+" `"+H+"` of type "+("`"+se+"` supplied to `"+oe+"`, expected ")+("`"+U+"`."),{expectedType:U})}return null}return S(Z)}function j(){return S(s)}function M(U){function Z(ce,de,oe,pe,H){if(typeof U!="function")return new m("Property `"+H+"` of component `"+oe+"` has invalid PropType notation inside arrayOf.");var X=ce[de];if(!Array.isArray(X)){var te=ie(X);return new m("Invalid "+pe+" `"+H+"` of type "+("`"+te+"` supplied to `"+oe+"`, expected an array."))}for(var ae=0;ae<X.length;ae++){var se=U(X,ae,oe,pe,H+"["+ae+"]",r);if(se instanceof Error)return se}return null}return S(Z)}function F(){function U(Z,ce,de,oe,pe){var H=Z[ce];if(!o(H)){var X=ie(H);return new m("Invalid "+oe+" `"+pe+"` of type "+("`"+X+"` supplied to `"+de+"`, expected a single ReactElement."))}return null}return S(U)}function C(){function U(Z,ce,de,oe,pe){var H=Z[ce];if(!e.isValidElementType(H)){var X=ie(H);return new m("Invalid "+oe+" `"+pe+"` of type "+("`"+X+"` supplied to `"+de+"`, expected a single ReactElement type."))}return null}return S(U)}function R(U){function Z(ce,de,oe,pe,H){if(!(ce[de]instanceof U)){var X=U.name||p,te=Y(ce[de]);return new m("Invalid "+pe+" `"+H+"` of type "+("`"+te+"` supplied to `"+oe+"`, expected ")+("instance of `"+X+"`."))}return null}return S(Z)}function B(U){if(!Array.isArray(U))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 Z(ce,de,oe,pe,H){for(var X=ce[de],te=0;te<U.length;te++)if(E(X,U[te]))return null;var ae=JSON.stringify(U,function(ge,Q){var Pe=he(Q);return Pe==="symbol"?String(Q):Q});return new m("Invalid "+pe+" `"+H+"` of value `"+String(X)+"` "+("supplied to `"+oe+"`, expected one of "+ae+"."))}return S(Z)}function _(U){function Z(ce,de,oe,pe,H){if(typeof U!="function")return new m("Property `"+H+"` of component `"+oe+"` has invalid PropType notation inside objectOf.");var X=ce[de],te=ie(X);if(te!=="object")return new m("Invalid "+pe+" `"+H+"` of type "+("`"+te+"` supplied to `"+oe+"`, expected an object."));for(var ae in X)if(n(X,ae)){var se=U(X,ae,oe,pe,H+"."+ae,r);if(se instanceof Error)return se}return null}return S(Z)}function I(U){if(!Array.isArray(U))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var Z=0;Z<U.length;Z++){var ce=U[Z];if(typeof ce!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+le(ce)+" at index "+Z+"."),s}function de(oe,pe,H,X,te){for(var ae=[],se=0;se<U.length;se++){var ge=U[se],Q=ge(oe,pe,H,X,te,r);if(Q==null)return null;Q.data&&n(Q.data,"expectedType")&&ae.push(Q.data.expectedType)}var Pe=ae.length>0?", expected one of type ["+ae.join(", ")+"]":"";return new m("Invalid "+X+" `"+te+"` supplied to "+("`"+H+"`"+Pe+"."))}return S(de)}function u(){function U(Z,ce,de,oe,pe){return V(Z[ce])?null:new m("Invalid "+oe+" `"+pe+"` supplied to "+("`"+de+"`, expected a ReactNode."))}return S(U)}function D(U,Z,ce,de,oe){return new m((U||"React class")+": "+Z+" type `"+ce+"."+de+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+oe+"`.")}function L(U){function Z(ce,de,oe,pe,H){var X=ce[de],te=ie(X);if(te!=="object")return new m("Invalid "+pe+" `"+H+"` of type `"+te+"` "+("supplied to `"+oe+"`, expected `object`."));for(var ae in U){var se=U[ae];if(typeof se!="function")return D(oe,pe,H,ae,he(se));var ge=se(X,ae,oe,pe,H+"."+ae,r);if(ge)return ge}return null}return S(Z)}function $(U){function Z(ce,de,oe,pe,H){var X=ce[de],te=ie(X);if(te!=="object")return new m("Invalid "+pe+" `"+H+"` of type `"+te+"` "+("supplied to `"+oe+"`, expected `object`."));var ae=t({},ce[de],U);for(var se in ae){var ge=U[se];if(n(U,se)&&typeof ge!="function")return D(oe,pe,H,se,he(ge));if(!ge)return new m("Invalid "+pe+" `"+H+"` key `"+se+"` supplied to `"+oe+"`.\nBad object: "+JSON.stringify(ce[de],null," ")+`
20
+ Valid keys: `+JSON.stringify(Object.keys(U),null," "));var Q=ge(X,se,oe,pe,H+"."+se,r);if(Q)return Q}return null}return S(Z)}function V(U){switch(typeof U){case"number":case"string":case"undefined":return!0;case"boolean":return!U;case"object":if(Array.isArray(U))return U.every(V);if(U===null||o(U))return!0;var Z=f(U);if(Z){var ce=Z.call(U),de;if(Z!==U.entries){for(;!(de=ce.next()).done;)if(!V(de.value))return!1}else for(;!(de=ce.next()).done;){var oe=de.value;if(oe&&!V(oe[1]))return!1}}else return!1;return!0;default:return!1}}function ee(U,Z){return U==="symbol"?!0:Z?Z["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Z instanceof Symbol:!1}function ie(U){var Z=typeof U;return Array.isArray(U)?"array":U instanceof RegExp?"object":ee(Z,U)?"symbol":Z}function he(U){if(typeof U>"u"||U===null)return""+U;var Z=ie(U);if(Z==="object"){if(U instanceof Date)return"date";if(U instanceof RegExp)return"regexp"}return Z}function le(U){var Z=he(U);switch(Z){case"array":case"object":return"an "+Z;case"boolean":case"date":case"regexp":return"a "+Z;default:return Z}}function Y(U){return!U.constructor||!U.constructor.name?p:U.constructor.name}return y.checkPropTypes=i,y.resetWarningCache=i.resetWarningCache,y.PropTypes=y,y},Gi}var Qi,Ys;function ap(){if(Ys)return Qi;Ys=1;var e=Ga();function t(){}function r(){}return r.resetWarningCache=t,Qi=function(){function n(s,o,c,d,h,f){if(f!==e){var p=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 p.name="Invariant Violation",p}}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},Qi}var Gs;function sp(){if(Gs)return Mn.exports;if(Gs=1,process.env.NODE_ENV!=="production"){var e=$l(),t=!0;Mn.exports=ip()(e.isElement,t)}else Mn.exports=ap()();return Mn.exports}var op=sp();const k=Ya(op);function Dl(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=Dl(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function it(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Dl(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 c=0;c<a.length;c+=1){const d=a[c];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 $e(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:{}},Ee={};/**
21
21
  * @license React
22
22
  * react-is.production.js
23
23
  *
@@ -25,7 +25,7 @@ Valid keys: `+JSON.stringify(Object.keys(q),null," "));var X=ve(J,le,pe,me,W+".
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 Qs;function lp(){if(Qs)return Te;Qs=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"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),y=Symbol.for("react.client.reference");function k(m){if(typeof m=="object"&&m!==null){var C=m.$$typeof;switch(C){case e:switch(m=m.type,m){case r:case i:case n:case c:case d:case p: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 C}}case t:return C}}}return Te.ContextConsumer=a,Te.ContextProvider=s,Te.Element=e,Te.ForwardRef=o,Te.Fragment=r,Te.Lazy=f,Te.Memo=h,Te.Portal=t,Te.Profiler=i,Te.StrictMode=n,Te.Suspense=c,Te.SuspenseList=d,Te.isContextConsumer=function(m){return k(m)===a},Te.isContextProvider=function(m){return k(m)===s},Te.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},Te.isForwardRef=function(m){return k(m)===o},Te.isFragment=function(m){return k(m)===r},Te.isLazy=function(m){return k(m)===f},Te.isMemo=function(m){return k(m)===h},Te.isPortal=function(m){return k(m)===t},Te.isProfiler=function(m){return k(m)===i},Te.isStrictMode=function(m){return k(m)===n},Te.isSuspense=function(m){return k(m)===c},Te.isSuspenseList=function(m){return k(m)===d},Te.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===i||m===n||m===c||m===d||typeof m=="object"&&m!==null&&(m.$$typeof===f||m.$$typeof===h||m.$$typeof===s||m.$$typeof===a||m.$$typeof===o||m.$$typeof===y||m.getModuleId!==void 0)},Te.typeOf=k,Te}var je={};/**
28
+ */var Qs;function lp(){if(Qs)return Ee;Qs=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"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),y=Symbol.for("react.client.reference");function E(m){if(typeof m=="object"&&m!==null){var S=m.$$typeof;switch(S){case e:switch(m=m.type,m){case r:case i:case n:case c:case d:case p: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 S}}case t:return S}}}return Ee.ContextConsumer=a,Ee.ContextProvider=s,Ee.Element=e,Ee.ForwardRef=o,Ee.Fragment=r,Ee.Lazy=f,Ee.Memo=h,Ee.Portal=t,Ee.Profiler=i,Ee.StrictMode=n,Ee.Suspense=c,Ee.SuspenseList=d,Ee.isContextConsumer=function(m){return E(m)===a},Ee.isContextProvider=function(m){return E(m)===s},Ee.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},Ee.isForwardRef=function(m){return E(m)===o},Ee.isFragment=function(m){return E(m)===r},Ee.isLazy=function(m){return E(m)===f},Ee.isMemo=function(m){return E(m)===h},Ee.isPortal=function(m){return E(m)===t},Ee.isProfiler=function(m){return E(m)===i},Ee.isStrictMode=function(m){return E(m)===n},Ee.isSuspense=function(m){return E(m)===c},Ee.isSuspenseList=function(m){return E(m)===d},Ee.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===i||m===n||m===c||m===d||typeof m=="object"&&m!==null&&(m.$$typeof===f||m.$$typeof===h||m.$$typeof===s||m.$$typeof===a||m.$$typeof===o||m.$$typeof===y||m.getModuleId!==void 0)},Ee.typeOf=E,Ee}var ke={};/**
29
29
  * @license React
30
30
  * react-is.development.js
31
31
  *
@@ -33,22 +33,22 @@ Valid keys: `+JSON.stringify(Object.keys(q),null," "));var X=ve(J,le,pe,me,W+".
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 Zs;function cp(){return Zs||(Zs=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var C=m.$$typeof;switch(C){case t:switch(m=m.type,m){case n:case a:case i:case d:case h:case y:return m;default:switch(m=m&&m.$$typeof,m){case o:case c:case p:case f:return m;case s:return m;default:return C}}case r:return C}}}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"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.view_transition"),k=Symbol.for("react.client.reference");je.ContextConsumer=s,je.ContextProvider=o,je.Element=t,je.ForwardRef=c,je.Fragment=n,je.Lazy=p,je.Memo=f,je.Portal=r,je.Profiler=a,je.StrictMode=i,je.Suspense=d,je.SuspenseList=h,je.isContextConsumer=function(m){return e(m)===s},je.isContextProvider=function(m){return e(m)===o},je.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},je.isForwardRef=function(m){return e(m)===c},je.isFragment=function(m){return e(m)===n},je.isLazy=function(m){return e(m)===p},je.isMemo=function(m){return e(m)===f},je.isPortal=function(m){return e(m)===r},je.isProfiler=function(m){return e(m)===a},je.isStrictMode=function(m){return e(m)===i},je.isSuspense=function(m){return e(m)===d},je.isSuspenseList=function(m){return e(m)===h},je.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===p||m.$$typeof===f||m.$$typeof===o||m.$$typeof===s||m.$$typeof===c||m.$$typeof===k||m.getModuleId!==void 0)},je.typeOf=e}()),je}var Xs;function up(){return Xs||(Xs=1,process.env.NODE_ENV==="production"?Bn.exports=lp():Bn.exports=cp()),Bn.exports}var ai=up();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 Il(e){if(ie.isValidElement(e)||ai.isValidElementType(e)||!Mt(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Il(e[r])}),t}function ht(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return Mt(e)&&Mt(t)&&Object.keys(t).forEach(i=>{ie.isValidElement(t[i])||ai.isValidElementType(t[i])?n[i]=t[i]:Mt(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Mt(e[i])?n[i]=ht(e[i],t[i],r):r.clone?n[i]=Mt(t[i])?Il(t[i]):t[i]:n[i]=t[i]}),n}function bn(e,t){return t?ht(e,t,{clone:!1}):e}const fr=process.env.NODE_ENV!=="production"?T.oneOfType([T.number,T.string,T.object,T.array]):{};function pp(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 dp(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function fp(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 hp(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 c=t(e.breakpoints.not(...o),s);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const n={},i=a=>(r(n,a),n);return r(i),{...e,containerQueries:i}}const Ci={xs:0,sm:600,md:900,lg:1200,xl:1536},Js={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Ci[e]}px)`},mp={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:Ci[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||Js;return t.reduce((s,o,c)=>(s[a.up(a.keys[c])]=r(t[c]),s),{})}if(typeof t=="object"){const a=n.breakpoints||Js;return Object.keys(t).reduce((s,o)=>{if(dp(a.keys,o)){const c=fp(n.containerQueries?n:mp,o);c&&(s[c]=r(t[o],o))}else if(Object.keys(a.values||Ci).includes(o)){const c=a.up(o);s[c]=r(t[o],o)}else{const c=o;s[c]=t[c]}return s},{})}return r(t)}function xp(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,i)=>{const a=e.up(i);return n[a]={},n},{}))||{}}function gp(e,t){return e.reduce((r,n)=>{const i=r[n];return(!i||Object.keys(i).length===0)&&delete r[n],r},t)}function Ei(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 si(e,t,r,n=r){let i;return typeof e=="function"?i=e(r):Array.isArray(e)?i=e[r]||n:i=Ei(e,r)||n,t&&(i=t(i,n,e)),i}function qe(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],c=s.theme,d=Ei(c,n)||{};return Kt(s,o,f=>{let p=si(d,i,f);return f===p&&typeof f=="string"&&(p=si(d,i,`${t}${f==="default"?"":De(f)}`,f)),r===!1?p:{[r]:p}})};return a.propTypes=process.env.NODE_ENV!=="production"?{[t]:fr}:{},a.filterProps=[t],a}function yp(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const vp={m:"margin",p:"padding"},bp={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},eo={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},wp=yp(e=>{if(e.length>2)if(eo[e])e=eo[e];else return[e];const[t,r]=e.split(""),n=vp[t],i=bp[r]||"";return Array.isArray(i)?i.map(a=>n+a):[n+i]}),ki=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ti=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Sp=[...ki,...Ti];function _n(e,t,r,n){const i=Ei(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(`
36
+ */var Zs;function cp(){return Zs||(Zs=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var S=m.$$typeof;switch(S){case t:switch(m=m.type,m){case n:case a:case i:case d:case h:case y:return m;default:switch(m=m&&m.$$typeof,m){case o:case c:case p:case f:return m;case s:return m;default:return S}}case r:return S}}}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"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.view_transition"),E=Symbol.for("react.client.reference");ke.ContextConsumer=s,ke.ContextProvider=o,ke.Element=t,ke.ForwardRef=c,ke.Fragment=n,ke.Lazy=p,ke.Memo=f,ke.Portal=r,ke.Profiler=a,ke.StrictMode=i,ke.Suspense=d,ke.SuspenseList=h,ke.isContextConsumer=function(m){return e(m)===s},ke.isContextProvider=function(m){return e(m)===o},ke.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},ke.isForwardRef=function(m){return e(m)===c},ke.isFragment=function(m){return e(m)===n},ke.isLazy=function(m){return e(m)===p},ke.isMemo=function(m){return e(m)===f},ke.isPortal=function(m){return e(m)===r},ke.isProfiler=function(m){return e(m)===a},ke.isStrictMode=function(m){return e(m)===i},ke.isSuspense=function(m){return e(m)===d},ke.isSuspenseList=function(m){return e(m)===h},ke.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===p||m.$$typeof===f||m.$$typeof===o||m.$$typeof===s||m.$$typeof===c||m.$$typeof===E||m.getModuleId!==void 0)},ke.typeOf=e}()),ke}var Xs;function up(){return Xs||(Xs=1,process.env.NODE_ENV==="production"?Bn.exports=lp():Bn.exports=cp()),Bn.exports}var ai=up();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 Il(e){if(ne.isValidElement(e)||ai.isValidElementType(e)||!Mt(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Il(e[r])}),t}function ht(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return Mt(e)&&Mt(t)&&Object.keys(t).forEach(i=>{ne.isValidElement(t[i])||ai.isValidElementType(t[i])?n[i]=t[i]:Mt(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Mt(e[i])?n[i]=ht(e[i],t[i],r):r.clone?n[i]=Mt(t[i])?Il(t[i]):t[i]:n[i]=t[i]}),n}function bn(e,t){return t?ht(e,t,{clone:!1}):e}const fr=process.env.NODE_ENV!=="production"?k.oneOfType([k.number,k.string,k.object,k.array]):{};function pp(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 dp(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function fp(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 hp(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 c=t(e.breakpoints.not(...o),s);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const n={},i=a=>(r(n,a),n);return r(i),{...e,containerQueries:i}}const Ci={xs:0,sm:600,md:900,lg:1200,xl:1536},Js={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Ci[e]}px)`},mp={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:Ci[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||Js;return t.reduce((s,o,c)=>(s[a.up(a.keys[c])]=r(t[c]),s),{})}if(typeof t=="object"){const a=n.breakpoints||Js;return Object.keys(t).reduce((s,o)=>{if(dp(a.keys,o)){const c=fp(n.containerQueries?n:mp,o);c&&(s[c]=r(t[o],o))}else if(Object.keys(a.values||Ci).includes(o)){const c=a.up(o);s[c]=r(t[o],o)}else{const c=o;s[c]=t[c]}return s},{})}return r(t)}function xp(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,i)=>{const a=e.up(i);return n[a]={},n},{}))||{}}function gp(e,t){return e.reduce((r,n)=>{const i=r[n];return(!i||Object.keys(i).length===0)&&delete r[n],r},t)}function Ei(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 si(e,t,r,n=r){let i;return typeof e=="function"?i=e(r):Array.isArray(e)?i=e[r]||n:i=Ei(e,r)||n,t&&(i=t(i,n,e)),i}function Ne(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],c=s.theme,d=Ei(c,n)||{};return Kt(s,o,f=>{let p=si(d,i,f);return f===p&&typeof f=="string"&&(p=si(d,i,`${t}${f==="default"?"":$e(f)}`,f)),r===!1?p:{[r]:p}})};return a.propTypes=process.env.NODE_ENV!=="production"?{[t]:fr}:{},a.filterProps=[t],a}function yp(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const vp={m:"margin",p:"padding"},bp={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},eo={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},wp=yp(e=>{if(e.length>2)if(eo[e])e=eo[e];else return[e];const[t,r]=e.split(""),n=vp[t],i=bp[r]||"";return Array.isArray(i)?i.map(a=>n+a):[n+i]}),ki=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ti=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Sp=[...ki,...Ti];function _n(e,t,r,n){const i=Ei(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 Qa(e){return _n(e,"spacing",8,"spacing")}function Rn(e,t){return typeof t=="string"||t==null?t:e(t)}function Cp(e,t){return r=>e.reduce((n,i)=>(n[i]=Rn(t,r),n),{})}function Ep(e,t,r,n){if(!t.includes(r))return null;const i=wp(r),a=Cp(i,n),s=e[r];return Kt(e,s,a)}function Ml(e,t){const r=Qa(e.theme);return Object.keys(e).map(n=>Ep(e,t,n,r)).reduce(bn,{})}function ze(e){return Ml(e,ki)}ze.propTypes=process.env.NODE_ENV!=="production"?ki.reduce((e,t)=>(e[t]=fr,e),{}):{};ze.filterProps=ki;function Be(e){return Ml(e,Ti)}Be.propTypes=process.env.NODE_ENV!=="production"?Ti.reduce((e,t)=>(e[t]=fr,e),{}):{};Be.filterProps=Ti;process.env.NODE_ENV!=="production"&&Sp.reduce((e,t)=>(e[t]=fr,e),{});function ji(...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 qe({prop:e,themeKey:"borders",transform:t})}const kp=kt("border",St),Tp=kt("borderTop",St),jp=kt("borderRight",St),Fp=kt("borderBottom",St),Ap=kt("borderLeft",St),Op=kt("borderColor"),_p=kt("borderTopColor"),Rp=kt("borderRightColor"),$p=kt("borderBottomColor"),Pp=kt("borderLeftColor"),Dp=kt("outline",St),Ip=kt("outlineColor"),Fi=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};Fi.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:fr}:{};Fi.filterProps=["borderRadius"];ji(kp,Tp,jp,Fp,Ap,Op,_p,Rp,$p,Pp,Fi,Dp,Ip);const Ai=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};Ai.propTypes=process.env.NODE_ENV!=="production"?{gap:fr}:{};Ai.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 _i=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};_i.propTypes=process.env.NODE_ENV!=="production"?{rowGap:fr}:{};_i.filterProps=["rowGap"];const Mp=qe({prop:"gridColumn"}),zp=qe({prop:"gridRow"}),Bp=qe({prop:"gridAutoFlow"}),Vp=qe({prop:"gridAutoColumns"}),Np=qe({prop:"gridAutoRows"}),Lp=qe({prop:"gridTemplateColumns"}),qp=qe({prop:"gridTemplateRows"}),Wp=qe({prop:"gridTemplateAreas"}),Up=qe({prop:"gridArea"});ji(Ai,Oi,_i,Mp,zp,Bp,Vp,Np,Lp,qp,Wp,Up);function Yr(e,t){return t==="grey"?t:e}const Hp=qe({prop:"color",themeKey:"palette",transform:Yr}),Kp=qe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Yr}),Yp=qe({prop:"backgroundColor",themeKey:"palette",transform:Yr});ji(Hp,Kp,Yp);function ft(e){return e<=1&&e!==0?`${e*100}%`:e}const Gp=qe({prop:"width",transform:ft}),Za=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var i,a,s,o,c;const n=((s=(a=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:a.values)==null?void 0:s[r])||Ci[r];return n?((c=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:ft(r)}};return Kt(e,e.maxWidth,t)}return null};Za.filterProps=["maxWidth"];const Qp=qe({prop:"minWidth",transform:ft}),Zp=qe({prop:"height",transform:ft}),Xp=qe({prop:"maxHeight",transform:ft}),Jp=qe({prop:"minHeight",transform:ft});qe({prop:"size",cssProperty:"width",transform:ft});qe({prop:"size",cssProperty:"height",transform:ft});const ed=qe({prop:"boxSizing"});ji(Gp,Za,Qp,Zp,Xp,Jp,ed);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:Fi},color:{themeKey:"palette",transform:Yr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Yr},backgroundColor:{themeKey:"palette",transform:Yr},p:{style:Be},pt:{style:Be},pr:{style:Be},pb:{style:Be},pl:{style:Be},px:{style:Be},py:{style:Be},padding:{style:Be},paddingTop:{style:Be},paddingRight:{style:Be},paddingBottom:{style:Be},paddingLeft:{style:Be},paddingX:{style:Be},paddingY:{style:Be},paddingInline:{style:Be},paddingInlineStart:{style:Be},paddingInlineEnd:{style:Be},paddingBlock:{style:Be},paddingBlockStart:{style:Be},paddingBlockEnd:{style:Be},m:{style:ze},mt:{style:ze},mr:{style:ze},mb:{style:ze},ml:{style:ze},mx:{style:ze},my:{style:ze},margin:{style:ze},marginTop:{style:ze},marginRight:{style:ze},marginBottom:{style:ze},marginLeft:{style:ze},marginX:{style:ze},marginY:{style:ze},marginInline:{style:ze},marginInlineStart:{style:ze},marginInlineEnd:{style:ze},marginBlock:{style:ze},marginBlockStart:{style:ze},marginBlockEnd:{style:ze},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:Ai},rowGap:{style:_i},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:ft},maxWidth:{style:Za},minWidth:{transform:ft},height:{transform:ft},maxHeight:{transform:ft},minHeight:{transform:ft},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 td(...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 rd(e,t){return typeof e=="function"?e(t):e}function nd(){function e(r,n,i,a){const s={[r]:n,theme:i},o=a[r];if(!o)return{[r]:n};const{cssProperty:c=r,themeKey:d,transform:h,style:f}=o;if(n==null)return null;if(d==="typography"&&n==="inherit")return{[r]:n};const p=Ei(i,d)||{};return f?f(s):Kt(s,n,k=>{let m=si(p,h,k);return k===m&&typeof k=="string"&&(m=si(p,h,`${r}${k==="default"?"":De(k)}`,k)),c===!1?m:{[c]:m}})}function t(r){const{sx:n,theme:i={}}=r||{};if(!n)return null;const a=i.unstable_sxConfig??$n;function s(o){let c=o;if(typeof o=="function")c=o(i);else if(typeof o!="object")return o;if(!c)return null;const d=xp(i.breakpoints),h=Object.keys(d);let f=d;return Object.keys(c).forEach(p=>{const y=rd(c[p],i);if(y!=null)if(typeof y=="object")if(a[p])f=bn(f,e(p,y,i,a));else{const k=Kt({theme:i},y,m=>({[p]:m}));td(k,y)?f[p]=t({sx:y,theme:i}):f=bn(f,k)}else f=bn(f,e(p,y,i,a))}),pp(i,gp(h,f))}return Array.isArray(n)?n.map(s):s(n)}return t}const ln=nd();ln.filterProps=["sx"];const id=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 ad(e){const{sx:t,...r}=e,{systemProps:n,otherProps:i}=id(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 sd(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 od={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 ld(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var cd=/[A-Z]|^ms/g,ud=/_EMO_([^_]+?)_([^]*?)_EMO_/g,zl=function(t){return t.charCodeAt(1)===45},to=function(t){return t!=null&&typeof t!="boolean"},Zi=ld(function(e){return zl(e)?e:e.replace(cd,"-$&").toLowerCase()}),ro=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(ud,function(n,i,a){return lr={name:i,styles:a,next:lr},i})}return od[t]!==1&&!zl(t)&&typeof r=="number"&&r!==0?r+"px":r};function oi(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 pd(e,t,r)}}var c=r;return c}function pd(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=oi(e,t,r[i])+";";else for(var a in r){var s=r[a];if(typeof s!="object"){var o=s;to(o)&&(n+=Zi(a)+":"+ro(a,o)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var c=0;c<s.length;c++)to(s[c])&&(n+=Zi(a)+":"+ro(a,s[c])+";");else{var d=oi(e,t,s);switch(a){case"animation":case"animationName":{n+=Zi(a)+":"+d+";";break}default:n+=a+"{"+d+"}"}}}return n}var no=/label:\s*([^\s;{]+)\s*(;|$)/g,lr;function dd(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+=oi(r,t,a);else{var s=a;i+=s[0]}for(var o=1;o<e.length;o++)if(i+=oi(r,t,e[o]),n){var c=a;i+=c[o]}no.lastIndex=0;for(var d="",h;(h=no.exec(i))!==null;)d+="-"+h[1];var f=sd(i)+d;return{name:f,styles:i,next:lr}}/**
40
+ `)),()=>{})}function Qa(e){return _n(e,"spacing",8,"spacing")}function Rn(e,t){return typeof t=="string"||t==null?t:e(t)}function Cp(e,t){return r=>e.reduce((n,i)=>(n[i]=Rn(t,r),n),{})}function Ep(e,t,r,n){if(!t.includes(r))return null;const i=wp(r),a=Cp(i,n),s=e[r];return Kt(e,s,a)}function Ml(e,t){const r=Qa(e.theme);return Object.keys(e).map(n=>Ep(e,t,n,r)).reduce(bn,{})}function Ie(e){return Ml(e,ki)}Ie.propTypes=process.env.NODE_ENV!=="production"?ki.reduce((e,t)=>(e[t]=fr,e),{}):{};Ie.filterProps=ki;function Me(e){return Ml(e,Ti)}Me.propTypes=process.env.NODE_ENV!=="production"?Ti.reduce((e,t)=>(e[t]=fr,e),{}):{};Me.filterProps=Ti;process.env.NODE_ENV!=="production"&&Sp.reduce((e,t)=>(e[t]=fr,e),{});function ji(...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 wt(e){return typeof e!="number"?e:`${e}px solid`}function Et(e,t){return Ne({prop:e,themeKey:"borders",transform:t})}const kp=Et("border",wt),Tp=Et("borderTop",wt),jp=Et("borderRight",wt),Fp=Et("borderBottom",wt),Ap=Et("borderLeft",wt),Op=Et("borderColor"),_p=Et("borderTopColor"),Rp=Et("borderRightColor"),$p=Et("borderBottomColor"),Pp=Et("borderLeftColor"),Dp=Et("outline",wt),Ip=Et("outlineColor"),Fi=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};Fi.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:fr}:{};Fi.filterProps=["borderRadius"];ji(kp,Tp,jp,Fp,Ap,Op,_p,Rp,$p,Pp,Fi,Dp,Ip);const Ai=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};Ai.propTypes=process.env.NODE_ENV!=="production"?{gap:fr}:{};Ai.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 _i=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};_i.propTypes=process.env.NODE_ENV!=="production"?{rowGap:fr}:{};_i.filterProps=["rowGap"];const Mp=Ne({prop:"gridColumn"}),zp=Ne({prop:"gridRow"}),Bp=Ne({prop:"gridAutoFlow"}),Vp=Ne({prop:"gridAutoColumns"}),Np=Ne({prop:"gridAutoRows"}),Lp=Ne({prop:"gridTemplateColumns"}),qp=Ne({prop:"gridTemplateRows"}),Wp=Ne({prop:"gridTemplateAreas"}),Up=Ne({prop:"gridArea"});ji(Ai,Oi,_i,Mp,zp,Bp,Vp,Np,Lp,qp,Wp,Up);function Yr(e,t){return t==="grey"?t:e}const Hp=Ne({prop:"color",themeKey:"palette",transform:Yr}),Kp=Ne({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Yr}),Yp=Ne({prop:"backgroundColor",themeKey:"palette",transform:Yr});ji(Hp,Kp,Yp);function ft(e){return e<=1&&e!==0?`${e*100}%`:e}const Gp=Ne({prop:"width",transform:ft}),Za=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var i,a,s,o,c;const n=((s=(a=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:a.values)==null?void 0:s[r])||Ci[r];return n?((c=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:ft(r)}};return Kt(e,e.maxWidth,t)}return null};Za.filterProps=["maxWidth"];const Qp=Ne({prop:"minWidth",transform:ft}),Zp=Ne({prop:"height",transform:ft}),Xp=Ne({prop:"maxHeight",transform:ft}),Jp=Ne({prop:"minHeight",transform:ft});Ne({prop:"size",cssProperty:"width",transform:ft});Ne({prop:"size",cssProperty:"height",transform:ft});const ed=Ne({prop:"boxSizing"});ji(Gp,Za,Qp,Zp,Xp,Jp,ed);const $n={border:{themeKey:"borders",transform:wt},borderTop:{themeKey:"borders",transform:wt},borderRight:{themeKey:"borders",transform:wt},borderBottom:{themeKey:"borders",transform:wt},borderLeft:{themeKey:"borders",transform:wt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:wt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Fi},color:{themeKey:"palette",transform:Yr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Yr},backgroundColor:{themeKey:"palette",transform:Yr},p:{style:Me},pt:{style:Me},pr:{style:Me},pb:{style:Me},pl:{style:Me},px:{style:Me},py:{style:Me},padding:{style:Me},paddingTop:{style:Me},paddingRight:{style:Me},paddingBottom:{style:Me},paddingLeft:{style:Me},paddingX:{style:Me},paddingY:{style:Me},paddingInline:{style:Me},paddingInlineStart:{style:Me},paddingInlineEnd:{style:Me},paddingBlock:{style:Me},paddingBlockStart:{style:Me},paddingBlockEnd:{style:Me},m:{style:Ie},mt:{style:Ie},mr:{style:Ie},mb:{style:Ie},ml:{style:Ie},mx:{style:Ie},my:{style:Ie},margin:{style:Ie},marginTop:{style:Ie},marginRight:{style:Ie},marginBottom:{style:Ie},marginLeft:{style:Ie},marginX:{style:Ie},marginY:{style:Ie},marginInline:{style:Ie},marginInlineStart:{style:Ie},marginInlineEnd:{style:Ie},marginBlock:{style:Ie},marginBlockStart:{style:Ie},marginBlockEnd:{style:Ie},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:Ai},rowGap:{style:_i},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:ft},maxWidth:{style:Za},minWidth:{transform:ft},height:{transform:ft},maxHeight:{transform:ft},minHeight:{transform:ft},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 td(...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 rd(e,t){return typeof e=="function"?e(t):e}function nd(){function e(r,n,i,a){const s={[r]:n,theme:i},o=a[r];if(!o)return{[r]:n};const{cssProperty:c=r,themeKey:d,transform:h,style:f}=o;if(n==null)return null;if(d==="typography"&&n==="inherit")return{[r]:n};const p=Ei(i,d)||{};return f?f(s):Kt(s,n,E=>{let m=si(p,h,E);return E===m&&typeof E=="string"&&(m=si(p,h,`${r}${E==="default"?"":$e(E)}`,E)),c===!1?m:{[c]:m}})}function t(r){const{sx:n,theme:i={}}=r||{};if(!n)return null;const a=i.unstable_sxConfig??$n;function s(o){let c=o;if(typeof o=="function")c=o(i);else if(typeof o!="object")return o;if(!c)return null;const d=xp(i.breakpoints),h=Object.keys(d);let f=d;return Object.keys(c).forEach(p=>{const y=rd(c[p],i);if(y!=null)if(typeof y=="object")if(a[p])f=bn(f,e(p,y,i,a));else{const E=Kt({theme:i},y,m=>({[p]:m}));td(E,y)?f[p]=t({sx:y,theme:i}):f=bn(f,E)}else f=bn(f,e(p,y,i,a))}),pp(i,gp(h,f))}return Array.isArray(n)?n.map(s):s(n)}return t}const ln=nd();ln.filterProps=["sx"];const id=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 ad(e){const{sx:t,...r}=e,{systemProps:n,otherProps:i}=id(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 sd(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 od={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 ld(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var cd=/[A-Z]|^ms/g,ud=/_EMO_([^_]+?)_([^]*?)_EMO_/g,zl=function(t){return t.charCodeAt(1)===45},to=function(t){return t!=null&&typeof t!="boolean"},Zi=ld(function(e){return zl(e)?e:e.replace(cd,"-$&").toLowerCase()}),ro=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(ud,function(n,i,a){return lr={name:i,styles:a,next:lr},i})}return od[t]!==1&&!zl(t)&&typeof r=="number"&&r!==0?r+"px":r};function oi(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 pd(e,t,r)}}var c=r;return c}function pd(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=oi(e,t,r[i])+";";else for(var a in r){var s=r[a];if(typeof s!="object"){var o=s;to(o)&&(n+=Zi(a)+":"+ro(a,o)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var c=0;c<s.length;c++)to(s[c])&&(n+=Zi(a)+":"+ro(a,s[c])+";");else{var d=oi(e,t,s);switch(a){case"animation":case"animationName":{n+=Zi(a)+":"+d+";";break}default:n+=a+"{"+d+"}"}}}return n}var no=/label:\s*([^\s;{]+)\s*(;|$)/g,lr;function dd(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+=oi(r,t,a);else{var s=a;i+=s[0]}for(var o=1;o<e.length;o++)if(i+=oi(r,t,e[o]),n){var c=a;i+=c[o]}no.lastIndex=0;for(var d="",h;(h=no.exec(i))!==null;)d+="-"+h[1];var f=sd(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
46
  */function fd(e,t){const r=Gc(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 hd(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const io=[];function ao(e){return io[0]=e,dd(io)}const md=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 xd(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...i}=e,a=md(t),s=Object.keys(a);function o(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r})`}function c(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-n/100}${r})`}function d(p,y){const k=s.indexOf(y);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r}) and (max-width:${(k!==-1&&typeof t[s[k]]=="number"?t[s[k]]:y)-n/100}${r})`}function h(p){return s.indexOf(p)+1<s.length?d(p,s[s.indexOf(p)+1]):o(p)}function f(p){const y=s.indexOf(p);return y===0?o(s[1]):y===s.length-1?c(s[y]):d(p,s[s.indexOf(p)+1]).replace("@media","@media not all and")}return{keys:s,values:a,up:o,down:c,between:d,only:h,not:f,unit:r,...i}}const gd={borderRadius:4};function Bl(e=8,t=Qa({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 yd(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 Vl(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:a={},...s}=e,o=xd(r),c=Bl(i);let d=ht({breakpoints:o,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:c,shape:{...gd,...a}},s);return d=hp(d),d.applyStyles=yd,d=t.reduce((h,f)=>ht(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 so=e=>e,vd=()=>{let e=so;return{configure(t){e=t},generate(t){return e(t)},reset(){e=so}}},bd=vd(),wd={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=wd[t];return n?`${r}-${n}`:`${bd.generate(e)}-${t}`}function Dr(e,t,r="Mui"){const n={};return t.forEach(i=>{n[i]=hr(e,i,r)}),n}function Nl(e,t=""){return e.displayName||e.name||t}function oo(e,t,r){const n=Nl(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function Sd(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Nl(e,"Component");if(typeof e=="object")switch(e.$$typeof){case ai.ForwardRef:return oo(e,e.render,"ForwardRef");case ai.Memo:return oo(e,e.type,"memo");default:return}}}function Ll(e){const{variants:t,...r}=e,n={variants:t,style:ao(r),isProcessed:!0};return n.style===r||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=ao(i.style))}),n}const Cd=Vl();function Xi(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Ed(e){return e?(t,r)=>r[e]:null}function kd(e,t,r){e.theme=Ad(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 ql(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function ql(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 Td(e={}){const{themeId:t,defaultTheme:r=Cd,rootShouldForwardProp:n=Xi,slotShouldForwardProp:i=Xi}=e;function a(o){kd(o,t,r)}return(o,c={})=>{hd(o,E=>E.filter(R=>R!==ln));const{name:d,slot:h,skipVariantsResolver:f,skipSx:p,overridesResolver:y=Ed(Wl(h)),...k}=c,m=f!==void 0?f:h&&h!=="Root"&&h!=="root"||!1,C=p||!1;let v=Xi;h==="Root"||h==="root"?v=n:h?v=i:Od(o)&&(v=void 0);const S=fd(o,{shouldForwardProp:v,label:Fd(d,h),...k}),D=E=>{if(E.__emotion_real===E)return E;if(typeof E=="function")return function(z){return Kn(z,E)};if(Mt(E)){const R=Ll(E);return R.variants?function(_){return Kn(_,R)}:R.style}return E},j=(...E)=>{const R=[],z=E.map(D),_=[];if(R.push(a),d&&y&&_.push(function(L){var ae,de;const B=(de=(ae=L.theme.components)==null?void 0:ae[d])==null?void 0:de.styleOverrides;if(!B)return null;const Y={};for(const ce in B)Y[ce]=Kn(L,B[ce]);return y(L,Y)}),d&&!m&&_.push(function(L){var Y,ae;const A=L.theme,B=(ae=(Y=A==null?void 0:A.components)==null?void 0:Y[d])==null?void 0:ae.variants;return B?ql(L,B):null}),C||_.push(ln),Array.isArray(z[0])){const P=z.shift(),L=new Array(R.length).fill(""),A=new Array(_.length).fill("");let B;B=[...L,...P,...A],B.raw=[...L,...P.raw,...A],R.unshift(B)}const I=[...R,...z,..._],u=S(...I);return o.muiName&&(u.muiName=o.muiName),process.env.NODE_ENV!=="production"&&(u.displayName=jd(d,h,o)),u};return S.withConfig&&(j.withConfig=S.withConfig),j}}function jd(e,t,r){return e?`${e}${De(t||"")}`:`Styled(${Sd(r)})`}function Fd(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${Wl(t||"Root")}`),r}function Ad(e){for(const t in e)return!1;return!0}function Od(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Wl(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function ka(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 c=o;r[i][c]=ka(a[c],s[c])}}}else r[i]===void 0&&(r[i]=e[i])}return r}const _d=typeof window<"u"?ie.useLayoutEffect:ie.useEffect;function Rd(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function Xa(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}].`),Rd(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.
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 hd(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const io=[];function ao(e){return io[0]=e,dd(io)}const md=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 xd(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...i}=e,a=md(t),s=Object.keys(a);function o(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r})`}function c(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-n/100}${r})`}function d(p,y){const E=s.indexOf(y);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r}) and (max-width:${(E!==-1&&typeof t[s[E]]=="number"?t[s[E]]:y)-n/100}${r})`}function h(p){return s.indexOf(p)+1<s.length?d(p,s[s.indexOf(p)+1]):o(p)}function f(p){const y=s.indexOf(p);return y===0?o(s[1]):y===s.length-1?c(s[y]):d(p,s[s.indexOf(p)+1]).replace("@media","@media not all and")}return{keys:s,values:a,up:o,down:c,between:d,only:h,not:f,unit:r,...i}}const gd={borderRadius:4};function Bl(e=8,t=Qa({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 yd(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 Vl(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:a={},...s}=e,o=xd(r),c=Bl(i);let d=ht({breakpoints:o,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:c,shape:{...gd,...a}},s);return d=hp(d),d.applyStyles=yd,d=t.reduce((h,f)=>ht(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 so=e=>e,vd=()=>{let e=so;return{configure(t){e=t},generate(t){return e(t)},reset(){e=so}}},bd=vd(),wd={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=wd[t];return n?`${r}-${n}`:`${bd.generate(e)}-${t}`}function Dr(e,t,r="Mui"){const n={};return t.forEach(i=>{n[i]=hr(e,i,r)}),n}function Nl(e,t=""){return e.displayName||e.name||t}function oo(e,t,r){const n=Nl(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function Sd(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Nl(e,"Component");if(typeof e=="object")switch(e.$$typeof){case ai.ForwardRef:return oo(e,e.render,"ForwardRef");case ai.Memo:return oo(e,e.type,"memo");default:return}}}function Ll(e){const{variants:t,...r}=e,n={variants:t,style:ao(r),isProcessed:!0};return n.style===r||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=ao(i.style))}),n}const Cd=Vl();function Xi(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Ed(e){return e?(t,r)=>r[e]:null}function kd(e,t,r){e.theme=Ad(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 ql(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function ql(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 Td(e={}){const{themeId:t,defaultTheme:r=Cd,rootShouldForwardProp:n=Xi,slotShouldForwardProp:i=Xi}=e;function a(o){kd(o,t,r)}return(o,c={})=>{hd(o,C=>C.filter(R=>R!==ln));const{name:d,slot:h,skipVariantsResolver:f,skipSx:p,overridesResolver:y=Ed(Wl(h)),...E}=c,m=f!==void 0?f:h&&h!=="Root"&&h!=="root"||!1,S=p||!1;let v=Xi;h==="Root"||h==="root"?v=n:h?v=i:Od(o)&&(v=void 0);const j=fd(o,{shouldForwardProp:v,label:Fd(d,h),...E}),M=C=>{if(C.__emotion_real===C)return C;if(typeof C=="function")return function(B){return Kn(B,C)};if(Mt(C)){const R=Ll(C);return R.variants?function(_){return Kn(_,R)}:R.style}return C},F=(...C)=>{const R=[],B=C.map(M),_=[];if(R.push(a),d&&y&&_.push(function(L){var ie,he;const V=(he=(ie=L.theme.components)==null?void 0:ie[d])==null?void 0:he.styleOverrides;if(!V)return null;const ee={};for(const le in V)ee[le]=Kn(L,V[le]);return y(L,ee)}),d&&!m&&_.push(function(L){var ee,ie;const $=L.theme,V=(ie=(ee=$==null?void 0:$.components)==null?void 0:ee[d])==null?void 0:ie.variants;return V?ql(L,V):null}),S||_.push(ln),Array.isArray(B[0])){const D=B.shift(),L=new Array(R.length).fill(""),$=new Array(_.length).fill("");let V;V=[...L,...D,...$],V.raw=[...L,...D.raw,...$],R.unshift(V)}const I=[...R,...B,..._],u=j(...I);return o.muiName&&(u.muiName=o.muiName),process.env.NODE_ENV!=="production"&&(u.displayName=jd(d,h,o)),u};return j.withConfig&&(F.withConfig=j.withConfig),F}}function jd(e,t,r){return e?`${e}${$e(t||"")}`:`Styled(${Sd(r)})`}function Fd(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${Wl(t||"Root")}`),r}function Ad(e){for(const t in e)return!1;return!0}function Od(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Wl(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function ka(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 c=o;r[i][c]=ka(a[c],s[c])}}}else r[i]===void 0&&(r[i]=e[i])}return r}const _d=typeof window<"u"?ne.useLayoutEffect:ne.useEffect;function Rd(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function Xa(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}].`),Rd(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
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 Pd=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 Pd(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function Ri(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 Ul(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 c=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(o+="a",c.push(t[3])),Ri({type:o,values:c})}function Ta(e){e=dr(e);let t=e.type==="hsl"||e.type==="hsla"?dr(Ul(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 lo(e,t){const r=Ta(e),n=Ta(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function Et(e,t){return e=dr(e),t=Xa(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Ri(e)}function Vn(e,t,r){try{return Et(e,t)}catch{return e}}function Ja(e,t){if(e=dr(e),t=Xa(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 Ri(e)}function Fe(e,t,r){try{return Ja(e,t)}catch{return e}}function es(e,t){if(e=dr(e),t=Xa(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 Ri(e)}function Ae(e,t,r){try{return es(e,t)}catch{return e}}function Dd(e,t=.15){return Ta(e)>.5?Ja(e,t):es(e,t)}function Nn(e,t,r){try{return Dd(e,t)}catch{return e}}const Id=ie.createContext(void 0);process.env.NODE_ENV!=="production"&&(T.node,T.object);function Md(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?ka(i.defaultProps,n):!i.styleOverrides&&!i.variants?ka(i,n):n}function zd({props:e,name:t}){const r=ie.useContext(Id);return Md({props:e,name:t,theme:{components:r}})}const co={theme:void 0};function Bd(e){let t,r;return function(i){let a=t;return(a===void 0||i.theme!==r)&&(co.theme=i.theme,a=Ll(e(co)),t=a,r=i.theme),a}}function Vd(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 uo=(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])})},Nd=(e,t,r)=>{function n(i,a=[],s=[]){Object.entries(i).forEach(([o,c])=>{(!r||r&&!r([...a,o]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?n(c,[...a,o],Array.isArray(c)?[...s,o]:s):t([...a,o],c,s))})}n(e)},Ld=(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 Ji(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},i={},a={},s={};return Nd(e,(o,c,d)=>{if((typeof c=="string"||typeof c=="number")&&(!n||!n(o,c))){const h=`--${r?`${r}-`:""}${o.join("-")}`,f=Ld(o,c);Object.assign(i,{[h]:f}),uo(a,o,`var(${h})`,d),uo(s,o,`var(${h}, ${f})`,d)}},o=>o[0]==="vars"),{css:i,vars:a,varsWithDefaults:s}}function qd(e,t={}){const{getSelector:r=C,disableCssColorScheme:n,colorSchemeSelector:i}=t,{colorSchemes:a={},components:s,defaultColorScheme:o="light",...c}=e,{vars:d,css:h,varsWithDefaults:f}=Ji(c,t);let p=f;const y={},{[o]:k,...m}=a;if(Object.entries(m||{}).forEach(([D,j])=>{const{vars:E,css:R,varsWithDefaults:z}=Ji(j,t);p=ht(p,z),y[D]={css:R,vars:E}}),k){const{css:D,vars:j,varsWithDefaults:E}=Ji(k,t);p=ht(p,E),y[o]={css:D,vars:j}}function C(D,j){var R,z;let E=i;if(i==="class"&&(E=".%s"),i==="data"&&(E="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(E=`[${i}="%s"]`),D){if(E==="media")return e.defaultColorScheme===D?":root":{[`@media (prefers-color-scheme: ${((z=(R=a[D])==null?void 0:R.palette)==null?void 0:z.mode)||D})`]:{":root":j}};if(E)return e.defaultColorScheme===D?`:root, ${E.replace("%s",String(D))}`:E.replace("%s",String(D))}return":root"}return{vars:p,generateThemeVars:()=>{let D={...d};return Object.entries(y).forEach(([,{vars:j}])=>{D=ht(D,j)}),D},generateStyleSheets:()=>{var _,I;const D=[],j=e.defaultColorScheme||"light";function E(u,P){Object.keys(P).length&&D.push(typeof u=="string"?{[u]:{...P}}:u)}E(r(void 0,{...h}),h);const{[j]:R,...z}=y;if(R){const{css:u}=R,P=(I=(_=a[j])==null?void 0:_.palette)==null?void 0:I.mode,L=!n&&P?{colorScheme:P,...u}:{...u};E(r(j,{...L}),L)}return Object.entries(z).forEach(([u,{css:P}])=>{var B,Y;const L=(Y=(B=a[u])==null?void 0:B.palette)==null?void 0:Y.mode,A=!n&&L?{colorScheme:L,...P}:{...P};E(r(u,{...A}),A)}),D}}}function Wd(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"},Ud={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 Hl(){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 Hd=Hl();function Kl(){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 po=Kl();function fo(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=es(e.main,i):t==="dark"&&(e.dark=Ja(e.main,a)))}function Kd(e="light"){return e==="dark"?{main:Nr[200],light:Nr[50],dark:Nr[400]}:{main:Nr[700],light:Nr[400],dark:Nr[800]}}function Yd(e="light"){return e==="dark"?{main:Br[200],light:Br[50],dark:Br[400]}:{main:Br[500],light:Br[300],dark:Br[700]}}function Gd(e="light"){return e==="dark"?{main:Vr[500],light:Vr[300],dark:Vr[700]}:{main:Vr[700],light:Vr[400],dark:Vr[800]}}function Qd(e="light"){return e==="dark"?{main:Lr[400],light:Lr[300],dark:Lr[700]}:{main:Lr[700],light:Lr[500],dark:Lr[900]}}function Zd(e="light"){return e==="dark"?{main:qr[400],light:qr[300],dark:qr[700]}:{main:qr[800],light:qr[500],dark:qr[900]}}function Xd(e="light"){return e==="dark"?{main:hn[400],light:hn[300],dark:hn[700]}:{main:"#ed6c02",light:hn[500],dark:hn[900]}}function ts(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...i}=e,a=e.primary||Kd(t),s=e.secondary||Yd(t),o=e.error||Gd(t),c=e.info||Qd(t),d=e.success||Zd(t),h=e.warning||Xd(t);function f(m){const C=lo(m,po.text.primary)>=r?po.text.primary:Hd.text.primary;if(process.env.NODE_ENV!=="production"){const v=lo(m,C);v<3&&console.error([`MUI: The contrast ratio of ${v}:1 for ${C} 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 C}const p=({color:m,name:C,mainShade:v=500,lightShade:S=300,darkShade:D=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${C?` (${C})`:""} provided to augmentColor(color) is invalid.
51
- The color object needs to have a \`main\` property or a \`${v}\` property.`:pr(11,C?` (${C})`:"",v));if(typeof m.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${C?` (${C})`:""} provided to augmentColor(color) is invalid.
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 Pd=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 Pd(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function Ri(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 Ul(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 c=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(o+="a",c.push(t[3])),Ri({type:o,values:c})}function Ta(e){e=dr(e);let t=e.type==="hsl"||e.type==="hsla"?dr(Ul(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 lo(e,t){const r=Ta(e),n=Ta(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function Ct(e,t){return e=dr(e),t=Xa(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Ri(e)}function Vn(e,t,r){try{return Ct(e,t)}catch{return e}}function Ja(e,t){if(e=dr(e),t=Xa(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 Ri(e)}function Te(e,t,r){try{return Ja(e,t)}catch{return e}}function es(e,t){if(e=dr(e),t=Xa(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 Ri(e)}function je(e,t,r){try{return es(e,t)}catch{return e}}function Dd(e,t=.15){return Ta(e)>.5?Ja(e,t):es(e,t)}function Nn(e,t,r){try{return Dd(e,t)}catch{return e}}const Id=ne.createContext(void 0);process.env.NODE_ENV!=="production"&&(k.node,k.object);function Md(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?ka(i.defaultProps,n):!i.styleOverrides&&!i.variants?ka(i,n):n}function zd({props:e,name:t}){const r=ne.useContext(Id);return Md({props:e,name:t,theme:{components:r}})}const co={theme:void 0};function Bd(e){let t,r;return function(i){let a=t;return(a===void 0||i.theme!==r)&&(co.theme=i.theme,a=Ll(e(co)),t=a,r=i.theme),a}}function Vd(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 uo=(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])})},Nd=(e,t,r)=>{function n(i,a=[],s=[]){Object.entries(i).forEach(([o,c])=>{(!r||r&&!r([...a,o]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?n(c,[...a,o],Array.isArray(c)?[...s,o]:s):t([...a,o],c,s))})}n(e)},Ld=(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 Ji(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},i={},a={},s={};return Nd(e,(o,c,d)=>{if((typeof c=="string"||typeof c=="number")&&(!n||!n(o,c))){const h=`--${r?`${r}-`:""}${o.join("-")}`,f=Ld(o,c);Object.assign(i,{[h]:f}),uo(a,o,`var(${h})`,d),uo(s,o,`var(${h}, ${f})`,d)}},o=>o[0]==="vars"),{css:i,vars:a,varsWithDefaults:s}}function qd(e,t={}){const{getSelector:r=S,disableCssColorScheme:n,colorSchemeSelector:i}=t,{colorSchemes:a={},components:s,defaultColorScheme:o="light",...c}=e,{vars:d,css:h,varsWithDefaults:f}=Ji(c,t);let p=f;const y={},{[o]:E,...m}=a;if(Object.entries(m||{}).forEach(([M,F])=>{const{vars:C,css:R,varsWithDefaults:B}=Ji(F,t);p=ht(p,B),y[M]={css:R,vars:C}}),E){const{css:M,vars:F,varsWithDefaults:C}=Ji(E,t);p=ht(p,C),y[o]={css:M,vars:F}}function S(M,F){var R,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"]`),M){if(C==="media")return e.defaultColorScheme===M?":root":{[`@media (prefers-color-scheme: ${((B=(R=a[M])==null?void 0:R.palette)==null?void 0:B.mode)||M})`]:{":root":F}};if(C)return e.defaultColorScheme===M?`:root, ${C.replace("%s",String(M))}`:C.replace("%s",String(M))}return":root"}return{vars:p,generateThemeVars:()=>{let M={...d};return Object.entries(y).forEach(([,{vars:F}])=>{M=ht(M,F)}),M},generateStyleSheets:()=>{var _,I;const M=[],F=e.defaultColorScheme||"light";function C(u,D){Object.keys(D).length&&M.push(typeof u=="string"?{[u]:{...D}}:u)}C(r(void 0,{...h}),h);const{[F]:R,...B}=y;if(R){const{css:u}=R,D=(I=(_=a[F])==null?void 0:_.palette)==null?void 0:I.mode,L=!n&&D?{colorScheme:D,...u}:{...u};C(r(F,{...L}),L)}return Object.entries(B).forEach(([u,{css:D}])=>{var V,ee;const L=(ee=(V=a[u])==null?void 0:V.palette)==null?void 0:ee.mode,$=!n&&L?{colorScheme:L,...D}:{...D};C(r(u,{...$}),$)}),M}}}function Wd(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"},Ud={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 Hl(){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 Hd=Hl();function Kl(){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 po=Kl();function fo(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=es(e.main,i):t==="dark"&&(e.dark=Ja(e.main,a)))}function Kd(e="light"){return e==="dark"?{main:Nr[200],light:Nr[50],dark:Nr[400]}:{main:Nr[700],light:Nr[400],dark:Nr[800]}}function Yd(e="light"){return e==="dark"?{main:Br[200],light:Br[50],dark:Br[400]}:{main:Br[500],light:Br[300],dark:Br[700]}}function Gd(e="light"){return e==="dark"?{main:Vr[500],light:Vr[300],dark:Vr[700]}:{main:Vr[700],light:Vr[400],dark:Vr[800]}}function Qd(e="light"){return e==="dark"?{main:Lr[400],light:Lr[300],dark:Lr[700]}:{main:Lr[700],light:Lr[500],dark:Lr[900]}}function Zd(e="light"){return e==="dark"?{main:qr[400],light:qr[300],dark:qr[700]}:{main:qr[800],light:qr[500],dark:qr[900]}}function Xd(e="light"){return e==="dark"?{main:hn[400],light:hn[300],dark:hn[700]}:{main:"#ed6c02",light:hn[500],dark:hn[900]}}function ts(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...i}=e,a=e.primary||Kd(t),s=e.secondary||Yd(t),o=e.error||Gd(t),c=e.info||Qd(t),d=e.success||Zd(t),h=e.warning||Xd(t);function f(m){const S=lo(m,po.text.primary)>=r?po.text.primary:Hd.text.primary;if(process.env.NODE_ENV!=="production"){const v=lo(m,S);v<3&&console.error([`MUI: The contrast ratio of ${v}:1 for ${S} 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 S}const p=({color:m,name:S,mainShade:v=500,lightShade:j=300,darkShade:M=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${S?` (${S})`:""} provided to augmentColor(color) is invalid.
51
+ The color object needs to have a \`main\` property or a \`${v}\` property.`:pr(11,S?` (${S})`:"",v));if(typeof m.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${S?` (${S})`:""} provided to augmentColor(color) is invalid.
52
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?
@@ -61,7 +61,7 @@ const theme1 = createTheme({ palette: {
61
61
 
62
62
  const theme2 = createTheme({ palette: {
63
63
  primary: { main: green[500] },
64
- } });`:pr(12,C?` (${C})`:"",JSON.stringify(m.main)));return fo(m,"light",S,n),fo(m,"dark",D,n),m.contrastText||(m.contrastText=f(m.main)),m};let y;return t==="light"?y=Hl():t==="dark"&&(y=Kl()),process.env.NODE_ENV!=="production"&&(y||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),ht({common:{...Cn},mode:t,primary:p({color:a,name:"primary"}),secondary:p({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:o,name:"error"}),warning:p({color:h,name:"warning"}),info:p({color:c,name:"info"}),success:p({color:d,name:"success"}),grey:Ud,contrastThreshold:r,getContrastText:f,augmentColor:p,tonalOffset:n,...y},i)}function Jd(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 ef(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function tf(e){return Math.round(e*1e5)/1e5}const ho={textTransform:"uppercase"},mo='"Roboto", "Helvetica", "Arial", sans-serif';function rf(e,t){const{fontFamily:r=mo,fontSize:n=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:o=700,htmlFontSize:c=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 c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const p=n/14,y=h||(C=>`${C/c*p}rem`),k=(C,v,S,D,j)=>({fontFamily:r,fontWeight:C,fontSize:y(v),lineHeight:S,...r===mo?{letterSpacing:`${tf(D/v)}em`}:{},...j,...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,ho),caption:k(a,12,1.66,.4),overline:k(a,12,2.66,1,ho),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ht({htmlFontSize:c,pxToRem:y,fontFamily:r,fontSize:n,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:o,...m},f,{clone:!1})}const nf=.2,af=.14,sf=.12;function _e(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${nf})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${af})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${sf})`].join(",")}const of=["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)],lf={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)"},cf={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function xo(e){return`${Math.round(e)}ms`}function uf(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function pf(e){const t={...lf,...e.easing},r={...cf,...e.duration};return{getAutoHeightDuration:uf,create:(i=["all"],a={})=>{const{duration:s=r.standard,easing:o=t.easeInOut,delay:c=0,...d}=a;if(process.env.NODE_ENV!=="production"){const h=p=>typeof p=="string",f=p=>!Number.isNaN(parseFloat(p));!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(c)&&!h(c)&&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(`
64
+ } });`:pr(12,S?` (${S})`:"",JSON.stringify(m.main)));return fo(m,"light",j,n),fo(m,"dark",M,n),m.contrastText||(m.contrastText=f(m.main)),m};let y;return t==="light"?y=Hl():t==="dark"&&(y=Kl()),process.env.NODE_ENV!=="production"&&(y||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),ht({common:{...Cn},mode:t,primary:p({color:a,name:"primary"}),secondary:p({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:o,name:"error"}),warning:p({color:h,name:"warning"}),info:p({color:c,name:"info"}),success:p({color:d,name:"success"}),grey:Ud,contrastThreshold:r,getContrastText:f,augmentColor:p,tonalOffset:n,...y},i)}function Jd(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 ef(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function tf(e){return Math.round(e*1e5)/1e5}const ho={textTransform:"uppercase"},mo='"Roboto", "Helvetica", "Arial", sans-serif';function rf(e,t){const{fontFamily:r=mo,fontSize:n=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:o=700,htmlFontSize:c=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 c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const p=n/14,y=h||(S=>`${S/c*p}rem`),E=(S,v,j,M,F)=>({fontFamily:r,fontWeight:S,fontSize:y(v),lineHeight:j,...r===mo?{letterSpacing:`${tf(M/v)}em`}:{},...F,...d}),m={h1:E(i,96,1.167,-1.5),h2:E(i,60,1.2,-.5),h3:E(a,48,1.167,0),h4:E(a,34,1.235,.25),h5:E(a,24,1.334,0),h6:E(s,20,1.6,.15),subtitle1:E(a,16,1.75,.15),subtitle2:E(s,14,1.57,.1),body1:E(a,16,1.5,.15),body2:E(a,14,1.43,.15),button:E(s,14,1.75,.4,ho),caption:E(a,12,1.66,.4),overline:E(a,12,2.66,1,ho),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ht({htmlFontSize:c,pxToRem:y,fontFamily:r,fontSize:n,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:o,...m},f,{clone:!1})}const nf=.2,af=.14,sf=.12;function Ae(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${nf})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${af})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${sf})`].join(",")}const of=["none",Ae(0,2,1,-1,0,1,1,0,0,1,3,0),Ae(0,3,1,-2,0,2,2,0,0,1,5,0),Ae(0,3,3,-2,0,3,4,0,0,1,8,0),Ae(0,2,4,-1,0,4,5,0,0,1,10,0),Ae(0,3,5,-1,0,5,8,0,0,1,14,0),Ae(0,3,5,-1,0,6,10,0,0,1,18,0),Ae(0,4,5,-2,0,7,10,1,0,2,16,1),Ae(0,5,5,-3,0,8,10,1,0,3,14,2),Ae(0,5,6,-3,0,9,12,1,0,3,16,2),Ae(0,6,6,-3,0,10,14,1,0,4,18,3),Ae(0,6,7,-4,0,11,15,1,0,4,20,3),Ae(0,7,8,-4,0,12,17,2,0,5,22,4),Ae(0,7,8,-4,0,13,19,2,0,5,24,4),Ae(0,7,9,-4,0,14,21,2,0,5,26,4),Ae(0,8,9,-5,0,15,22,2,0,6,28,5),Ae(0,8,10,-5,0,16,24,2,0,6,30,5),Ae(0,8,11,-5,0,17,26,2,0,6,32,5),Ae(0,9,11,-5,0,18,28,2,0,7,34,6),Ae(0,9,12,-6,0,19,29,2,0,7,36,6),Ae(0,10,13,-6,0,20,31,3,0,8,38,7),Ae(0,10,13,-6,0,21,33,3,0,8,40,7),Ae(0,10,14,-6,0,22,35,3,0,8,42,7),Ae(0,11,14,-7,0,23,36,3,0,9,44,8),Ae(0,11,15,-7,0,24,38,3,0,9,46,8)],lf={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)"},cf={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function xo(e){return`${Math.round(e)}ms`}function uf(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function pf(e){const t={...lf,...e.easing},r={...cf,...e.duration};return{getAutoHeightDuration:uf,create:(i=["all"],a={})=>{const{duration:s=r.standard,easing:o=t.easeInOut,delay:c=0,...d}=a;if(process.env.NODE_ENV!=="production"){const h=p=>typeof p=="string",f=p=>!Number.isNaN(parseFloat(p));!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(c)&&!h(c)&&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
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:xo(s)} ${o} ${typeof c=="string"?c:xo(c)}`).join(",")},...e,easing:t,duration:r}}const df={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function ff(e){return Mt(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Yl(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];!ff(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)};
@@ -69,10 +69,10 @@ const theme = ${JSON.stringify(t,null,2)};
69
69
  theme.breakpoints = createBreakpoints(theme.breakpoints || {});
70
70
  theme.transitions = createTransitions(theme.transitions || {});
71
71
 
72
- export default theme;`}function ja(e={},...t){const{breakpoints:r,mixins:n={},spacing:i,palette:a={},transitions:s={},typography:o={},shape:c,...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=ts(a),f=Vl(e);let p=ht(f,{mixins:ef(f.breakpoints,n),palette:h,shadows:of.slice(),typography:rf(h,o),transitions:pf(s),zIndex:{...df}});if(p=ht(p,d),p=t.reduce((y,k)=>ht(y,k),p),process.env.NODE_ENV!=="production"){const y=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],k=(m,C)=>{let v;for(v in m){const S=m[v];if(y.includes(v)&&Object.keys(S).length>0){if(process.env.NODE_ENV!=="production"){const D=hr("",v);console.error([`MUI: The \`${C}\` 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 '&.${D}' syntax:`,JSON.stringify({root:{[`&.${D}`]:S}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
73
- `))}m[v]={}}}};Object.keys(p.components).forEach(m=>{const C=p.components[m].styleOverrides;C&&m.startsWith("Mui")&&k(C,m)})}return p.unstable_sxConfig={...$n,...d==null?void 0:d.unstable_sxConfig},p.unstable_sx=function(k){return ln({sx:k,theme:this})},p.toRuntimeSource=Yl,p}function hf(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 mf=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=hf(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Gl(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Ql(e){return e==="dark"?mf:[]}function xf(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...i}=e,a=ts(t);return{palette:a,opacity:{...Gl(a.mode),...r},overlays:n||Ql(a.mode),...i}}function gf(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 yf=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],vf=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 yf(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 bf(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:Ul(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 wf(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{}},Sf=(e="mui")=>Vd(e);function ea(e,t,r,n){if(!t)return;t=t===!0?{}:t;const i=n==="dark"?"dark":"light";if(!r){e[n]=xf({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:a,...s}=ja({...r,palette:{mode:i,...t==null?void 0:t.palette}});return e[n]={...t,palette:a,opacity:{...Gl(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Ql(i)},s}function Cf(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:s=gf,colorSchemeSelector:o=r.light&&r.dark?"media":void 0,rootSelector:c=":root",...d}=e,h=Object.keys(r)[0],f=n||(r.light&&h!=="light"?"light":h),p=Sf(a),{[f]:y,light:k,dark:m,...C}=r,v={...C};let S=y;if((f==="dark"&&!("dark"in r)||f==="light"&&!("light"in r))&&(S=!0),!S)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${f}\` option is either missing or invalid.`:pr(21,f));const D=ea(v,S,d,f);k&&!v.light&&ea(v,k,void 0,"light"),m&&!v.dark&&ea(v,m,void 0,"dark");let j={defaultColorScheme:f,...D,cssVarPrefix:a,colorSchemeSelector:o,rootSelector:c,getCssVar:p,colorSchemes:v,font:{...Jd(D.typography),...D.font},spacing:wf(d.spacing)};Object.keys(j.colorSchemes).forEach(I=>{const u=j.colorSchemes[I].palette,P=L=>{const A=L.split("-"),B=A[1],Y=A[2];return p(L,u[B][Y])};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")),bf(u,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),u.mode==="light"){V(u.Alert,"errorColor",Fe(u.error.light,.6)),V(u.Alert,"infoColor",Fe(u.info.light,.6)),V(u.Alert,"successColor",Fe(u.success.light,.6)),V(u.Alert,"warningColor",Fe(u.warning.light,.6)),V(u.Alert,"errorFilledBg",P("palette-error-main")),V(u.Alert,"infoFilledBg",P("palette-info-main")),V(u.Alert,"successFilledBg",P("palette-success-main")),V(u.Alert,"warningFilledBg",P("palette-warning-main")),V(u.Alert,"errorFilledColor",_t(()=>u.getContrastText(u.error.main))),V(u.Alert,"infoFilledColor",_t(()=>u.getContrastText(u.info.main))),V(u.Alert,"successFilledColor",_t(()=>u.getContrastText(u.success.main))),V(u.Alert,"warningFilledColor",_t(()=>u.getContrastText(u.warning.main))),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",P("palette-error-main")),V(u.Alert,"infoIconColor",P("palette-info-main")),V(u.Alert,"successIconColor",P("palette-success-main")),V(u.Alert,"warningIconColor",P("palette-warning-main")),V(u.AppBar,"defaultBg",P("palette-grey-100")),V(u.Avatar,"defaultBg",P("palette-grey-400")),V(u.Button,"inheritContainedBg",P("palette-grey-300")),V(u.Button,"inheritContainedHoverBg",P("palette-grey-A100")),V(u.Chip,"defaultBorder",P("palette-grey-400")),V(u.Chip,"defaultAvatarColor",P("palette-grey-700")),V(u.Chip,"defaultIconColor",P("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",Ae(u.primary.main,.62)),V(u.LinearProgress,"secondaryBg",Ae(u.secondary.main,.62)),V(u.LinearProgress,"errorBg",Ae(u.error.main,.62)),V(u.LinearProgress,"infoBg",Ae(u.info.main,.62)),V(u.LinearProgress,"successBg",Ae(u.success.main,.62)),V(u.LinearProgress,"warningBg",Ae(u.warning.main,.62)),V(u.Skeleton,"bg",`rgba(${P("palette-text-primaryChannel")} / 0.11)`),V(u.Slider,"primaryTrack",Ae(u.primary.main,.62)),V(u.Slider,"secondaryTrack",Ae(u.secondary.main,.62)),V(u.Slider,"errorTrack",Ae(u.error.main,.62)),V(u.Slider,"infoTrack",Ae(u.info.main,.62)),V(u.Slider,"successTrack",Ae(u.success.main,.62)),V(u.Slider,"warningTrack",Ae(u.warning.main,.62));const L=Nn(u.background.default,.8);V(u.SnackbarContent,"bg",L),V(u.SnackbarContent,"color",_t(()=>u.getContrastText(L))),V(u.SpeedDialAction,"fabHoverBg",Nn(u.background.paper,.15)),V(u.StepConnector,"border",P("palette-grey-400")),V(u.StepContent,"border",P("palette-grey-400")),V(u.Switch,"defaultColor",P("palette-common-white")),V(u.Switch,"defaultDisabledColor",P("palette-grey-100")),V(u.Switch,"primaryDisabledColor",Ae(u.primary.main,.62)),V(u.Switch,"secondaryDisabledColor",Ae(u.secondary.main,.62)),V(u.Switch,"errorDisabledColor",Ae(u.error.main,.62)),V(u.Switch,"infoDisabledColor",Ae(u.info.main,.62)),V(u.Switch,"successDisabledColor",Ae(u.success.main,.62)),V(u.Switch,"warningDisabledColor",Ae(u.warning.main,.62)),V(u.TableCell,"border",Ae(Vn(u.divider,1),.88)),V(u.Tooltip,"bg",Vn(u.grey[700],.92))}if(u.mode==="dark"){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",P("palette-error-dark")),V(u.Alert,"infoFilledBg",P("palette-info-dark")),V(u.Alert,"successFilledBg",P("palette-success-dark")),V(u.Alert,"warningFilledBg",P("palette-warning-dark")),V(u.Alert,"errorFilledColor",_t(()=>u.getContrastText(u.error.dark))),V(u.Alert,"infoFilledColor",_t(()=>u.getContrastText(u.info.dark))),V(u.Alert,"successFilledColor",_t(()=>u.getContrastText(u.success.dark))),V(u.Alert,"warningFilledColor",_t(()=>u.getContrastText(u.warning.dark))),V(u.Alert,"errorStandardBg",Fe(u.error.light,.9)),V(u.Alert,"infoStandardBg",Fe(u.info.light,.9)),V(u.Alert,"successStandardBg",Fe(u.success.light,.9)),V(u.Alert,"warningStandardBg",Fe(u.warning.light,.9)),V(u.Alert,"errorIconColor",P("palette-error-main")),V(u.Alert,"infoIconColor",P("palette-info-main")),V(u.Alert,"successIconColor",P("palette-success-main")),V(u.Alert,"warningIconColor",P("palette-warning-main")),V(u.AppBar,"defaultBg",P("palette-grey-900")),V(u.AppBar,"darkBg",P("palette-background-paper")),V(u.AppBar,"darkColor",P("palette-text-primary")),V(u.Avatar,"defaultBg",P("palette-grey-600")),V(u.Button,"inheritContainedBg",P("palette-grey-800")),V(u.Button,"inheritContainedHoverBg",P("palette-grey-700")),V(u.Chip,"defaultBorder",P("palette-grey-700")),V(u.Chip,"defaultAvatarColor",P("palette-grey-300")),V(u.Chip,"defaultIconColor",P("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",Fe(u.primary.main,.5)),V(u.LinearProgress,"secondaryBg",Fe(u.secondary.main,.5)),V(u.LinearProgress,"errorBg",Fe(u.error.main,.5)),V(u.LinearProgress,"infoBg",Fe(u.info.main,.5)),V(u.LinearProgress,"successBg",Fe(u.success.main,.5)),V(u.LinearProgress,"warningBg",Fe(u.warning.main,.5)),V(u.Skeleton,"bg",`rgba(${P("palette-text-primaryChannel")} / 0.13)`),V(u.Slider,"primaryTrack",Fe(u.primary.main,.5)),V(u.Slider,"secondaryTrack",Fe(u.secondary.main,.5)),V(u.Slider,"errorTrack",Fe(u.error.main,.5)),V(u.Slider,"infoTrack",Fe(u.info.main,.5)),V(u.Slider,"successTrack",Fe(u.success.main,.5)),V(u.Slider,"warningTrack",Fe(u.warning.main,.5));const L=Nn(u.background.default,.98);V(u.SnackbarContent,"bg",L),V(u.SnackbarContent,"color",_t(()=>u.getContrastText(L))),V(u.SpeedDialAction,"fabHoverBg",Nn(u.background.paper,.15)),V(u.StepConnector,"border",P("palette-grey-600")),V(u.StepContent,"border",P("palette-grey-600")),V(u.Switch,"defaultColor",P("palette-grey-300")),V(u.Switch,"defaultDisabledColor",P("palette-grey-600")),V(u.Switch,"primaryDisabledColor",Fe(u.primary.main,.55)),V(u.Switch,"secondaryDisabledColor",Fe(u.secondary.main,.55)),V(u.Switch,"errorDisabledColor",Fe(u.error.main,.55)),V(u.Switch,"infoDisabledColor",Fe(u.info.main,.55)),V(u.Switch,"successDisabledColor",Fe(u.success.main,.55)),V(u.Switch,"warningDisabledColor",Fe(u.warning.main,.55)),V(u.TableCell,"border",Fe(Vn(u.divider,1),.68)),V(u.Tooltip,"bg",Vn(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(L=>{const A=u[L];L!=="tonalOffset"&&A&&typeof A=="object"&&(A.main&&V(u[L],"mainChannel",xn(gn(A.main))),A.light&&V(u[L],"lightChannel",xn(gn(A.light))),A.dark&&V(u[L],"darkChannel",xn(gn(A.dark))),A.contrastText&&V(u[L],"contrastTextChannel",xn(gn(A.contrastText))),L==="text"&&(Vt(u[L],"primary"),Vt(u[L],"secondary")),L==="action"&&(A.active&&Vt(u[L],"active"),A.selected&&Vt(u[L],"selected")))})}),j=t.reduce((I,u)=>ht(I,u),j);const E={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:vf(j)},{vars:R,generateThemeVars:z,generateStyleSheets:_}=qd(j,E);return j.vars=R,Object.entries(j.colorSchemes[j.defaultColorScheme]).forEach(([I,u])=>{j[I]=u}),j.generateThemeVars=z,j.generateStyleSheets=_,j.generateSpacing=function(){return Bl(d.spacing,Qa(this))},j.getColorSchemeSelector=Wd(o),j.spacing=j.generateSpacing(),j.shouldSkipGeneratingVar=s,j.unstable_sxConfig={...$n,...d==null?void 0:d.unstable_sxConfig},j.unstable_sx=function(u){return ln({sx:u,theme:this})},j.toRuntimeSource=Yl,j}function go(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:ts({...r===!0?{}:r.palette,mode:t})})}function Ef(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",c=i==null?void 0:i[o],d={...i,...r?{[o]:{...typeof c!="boolean"&&c,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return ja(e,...t);let h=r;"palette"in e||d[o]&&(d[o]!==!0?h=d[o].palette:o==="dark"&&(h={mode:"dark"}));const f=ja({...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},go(f,"dark",d.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...d.dark!==!0&&d.dark,palette:f.palette},go(f,"light",d.light)),f}return!r&&!("light"in d)&&o==="light"&&(d.light=!0),Cf({...s,colorSchemes:d,defaultColorScheme:o,...typeof n!="boolean"&&n},...t)}const kf=Ef(),Tf="$$material";function jf(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Ff=e=>jf(e)&&e!=="classes",xt=Td({themeId:Tf,defaultTheme:kf,rootShouldForwardProp:Ff});function Af(){return ad}const $r=Bd;process.env.NODE_ENV!=="production"&&(T.node,T.object.isRequired);function Ir(e){return zd(e)}function Of(e){return typeof e.main=="string"}function _f(e,t=[]){if(!Of(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function li(e=[]){return([,t])=>t&&_f(t,e)}function Rf(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},Pf=Af(),Df=e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:i,variant:a,classes:s}=e,o={root:["root",a,e.align!=="inherit"&&`align${De(t)}`,r&&"gutterBottom",n&&"noWrap",i&&"paragraph"]};return un(o,Rf,s)},If=xt("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${De(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(li()).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${De(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}}]}})),yo={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Zl=ie.forwardRef(function(t,r){const{color:n,...i}=Ir({props:t,name:"MuiTypography"}),a=!$f[n],s=Pf({...i,...a&&{color:n}}),{align:o="inherit",className:c,component:d,gutterBottom:h=!1,noWrap:f=!1,paragraph:p=!1,variant:y="body1",variantMapping:k=yo,...m}=s,C={...s,align:o,color:n,className:c,component:d,gutterBottom:h,noWrap:f,paragraph:p,variant:y,variantMapping:k},v=d||(p?"p":k[y]||yo[y])||"span",S=Df(C);return l.jsx(If,{as:v,ref:r,className:it(S.root,c),...m,ownerState:C,style:{...o!=="inherit"&&{"--Typography-textAlign":o},...m.style}})});process.env.NODE_ENV!=="production"&&(Zl.propTypes={align:T.oneOf(["center","inherit","justify","left","right"]),children:T.node,classes:T.object,className:T.string,color:T.oneOfType([T.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),T.string]),component:T.elementType,gutterBottom:T.bool,noWrap:T.bool,paragraph:T.bool,style:T.object,sx:T.oneOfType([T.arrayOf(T.oneOfType([T.func,T.object,T.bool])),T.func,T.object]),variant:T.oneOfType([T.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),T.string]),variantMapping:T.object});const rs=ie.createContext(void 0);process.env.NODE_ENV!=="production"&&(rs.displayName="FormControlContext");function Mf(){return ie.useContext(rs)}function zf(e){return hr("MuiInputAdornment",e)}const vo=Dr("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var bo;const Bf=(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${De(r.position)}`],r.disablePointerEvents===!0&&t.disablePointerEvents,t[r.variant]]},Vf=e=>{const{classes:t,disablePointerEvents:r,hiddenLabel:n,position:i,size:a,variant:s}=e,o={root:["root",r&&"disablePointerEvents",i&&`position${De(i)}`,s,n&&"hiddenLabel",a&&`size${De(a)}`]};return un(o,zf,t)},Nf=xt("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:Bf})($r(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${vo.positionStart}&:not(.${vo.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),Xl=ie.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiInputAdornment"}),{children:i,className:a,component:s="div",disablePointerEvents:o=!1,disableTypography:c=!1,position:d,variant:h,...f}=n,p=Mf()||{};let y=h;h&&p.variant&&process.env.NODE_ENV!=="production"&&h===p.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),p&&!y&&(y=p.variant);const k={...n,hiddenLabel:p.hiddenLabel,size:p.size,disablePointerEvents:o,position:d,variant:y},m=Vf(k);return l.jsx(rs.Provider,{value:null,children:l.jsx(Nf,{as:s,ownerState:k,className:it(m.root,a),ref:r,...f,children:typeof i=="string"&&!c?l.jsx(Zl,{color:"textSecondary",children:i}):l.jsxs(ie.Fragment,{children:[d==="start"?bo||(bo=l.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,i]})})})});process.env.NODE_ENV!=="production"&&(Xl.propTypes={children:T.node,classes:T.object,className:T.string,component:T.elementType,disablePointerEvents:T.bool,disableTypography:T.bool,position:T.oneOf(["end","start"]).isRequired,sx:T.oneOfType([T.arrayOf(T.oneOfType([T.func,T.object,T.bool])),T.func,T.object]),variant:T.oneOf(["filled","outlined","standard"])});function ns(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function Lf(e){return hr("MuiSvgIcon",e)}Dr("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const qf=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${De(t)}`,`fontSize${De(r)}`]};return un(i,Lf,n)},Wf=xt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${De(r.color)}`],t[`fontSize${De(r.fontSize)}`]]}})($r(({theme:e})=>{var t,r,n,i,a,s,o,c,d,h,f,p,y,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:((c=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:c.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 C,v;return{props:{color:m},style:{color:(v=(C=(e.vars??e).palette)==null?void 0:C[m])==null?void 0:v.main}}}),{props:{color:"action"},style:{color:(p=(f=(e.vars??e).palette)==null?void 0:f.action)==null?void 0:p.active}},{props:{color:"disabled"},style:{color:(k=(y=(e.vars??e).palette)==null?void 0:y.action)==null?void 0:k.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),ci=ie.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiSvgIcon"}),{children:i,className:a,color:s="inherit",component:o="svg",fontSize:c="medium",htmlColor:d,inheritViewBox:h=!1,titleAccess:f,viewBox:p="0 0 24 24",...y}=n,k=ie.isValidElement(i)&&i.type==="svg",m={...n,color:s,component:o,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:h,viewBox:p,hasSvgAsChild:k},C={};h||(C.viewBox=p);const v=qf(m);return l.jsxs(Wf,{as:o,className:it(v.root,a),focusable:"false",color:d,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:r,...C,...y,...k&&i.props,ownerState:m,children:[k?i.props.children:i,f?l.jsx("title",{children:f}):null]})});process.env.NODE_ENV!=="production"&&(ci.propTypes={children:T.node,classes:T.object,className:T.string,color:T.oneOfType([T.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),T.string]),component:T.elementType,fontSize:T.oneOfType([T.oneOf(["inherit","large","medium","small"]),T.string]),htmlColor:T.string,inheritViewBox:T.bool,shapeRendering:T.string,sx:T.oneOfType([T.arrayOf(T.oneOfType([T.func,T.object,T.bool])),T.func,T.object]),titleAccess:T.string,viewBox:T.string});ci.muiName="SvgIcon";function ut(e,t){function r(n,i){return l.jsx(ci,{"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=ci.muiName,ie.memo(ie.forwardRef(r))}let wo=0;function Uf(e){const[t,r]=ie.useState(e),n=e||t;return ie.useEffect(()=>{t==null&&(wo+=1,r(`mui-${wo}`))},[t]),n}const Hf={...ie},So=Hf.useId;function Kf(e){if(So!==void 0){const t=So();return e??t}return Uf(e)}function Yn(e){const t=ie.useRef(e);return _d(()=>{t.current=e}),ie.useRef((...r)=>(0,t.current)(...r)).current}function Co(...e){const t=ie.useRef(void 0),r=ie.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 ie.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}const Yf=T.oneOfType([T.func,T.object]);function Gf(e){const{prototype:t={}}=e;return!!t.isReactComponent}function Qf(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"&&!Gf(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 Zf=ns(T.elementType,Qf);function Eo(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 ko={};function Jl(e,t){const r=ie.useRef(ko);return r.current===ko&&(r.current=e(t)),r}class ui{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 ui}static use(){const t=Jl(ui.create).current,[r,n]=ie.useState(!1);return t.shouldMount=r,t.setShouldMount=n,ie.useEffect(t.mountEffect,[r]),t}mount(){return this.mounted||(this.mounted=Jf(),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 Xf(){return ui.use()}function Jf(){let e,t;const r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r}function Fa(){return Fa=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},Fa.apply(null,arguments)}function eh(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 Aa(e,t){return Aa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Aa(e,t)}function th(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Aa(e,t)}const To=$.createContext(null);function rh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function is(e,t){var r=function(a){return t&&$.isValidElement(a)?t(a):a},n=Object.create(null);return e&&$.Children.map(e,function(i){return i}).forEach(function(i){n[i.key]=r(i)}),n}function nh(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 c in t){if(n[c])for(s=0;s<n[c].length;s++){var d=n[c][s];o[n[c][s]]=r(d)}o[c]=r(c)}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 ih(e,t){return is(e.children,function(r){return $.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 ah(e,t,r){var n=is(e.children),i=nh(t,n);return Object.keys(i).forEach(function(a){var s=i[a];if($.isValidElement(s)){var o=a in t,c=a in n,d=t[a],h=$.isValidElement(d)&&!d.props.in;c&&(!o||h)?i[a]=$.cloneElement(s,{onExited:r.bind(null,s),in:!0,exit:br(s,"exit",e),enter:br(s,"enter",e)}):!c&&o&&!h?i[a]=$.cloneElement(s,{in:!1}):c&&o&&$.isValidElement(d)&&(i[a]=$.cloneElement(s,{onExited:r.bind(null,s),in:d.props.in,exit:br(s,"exit",e),enter:br(s,"enter",e)}))}}),i}var sh=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},oh={component:"div",childFactory:function(t){return t}},as=function(e){th(t,e);function t(n,i){var a;a=e.call(this,n,i)||this;var s=a.handleExited.bind(rh(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,c=a.firstRender;return{children:c?ih(i,o):ah(i,s,o),firstRender:!1}},r.handleExited=function(i,a){var s=is(this.props.children);i.key in s||(i.props.onExited&&i.props.onExited(a),this.mounted&&this.setState(function(o){var c=Fa({},o.children);return delete c[i.key],{children:c}}))},r.render=function(){var i=this.props,a=i.component,s=i.childFactory,o=eh(i,["component","childFactory"]),c=this.state.contextValue,d=sh(this.state.children).map(s);return delete o.appear,delete o.enter,delete o.exit,a===null?$.createElement(To.Provider,{value:c},d):$.createElement(To.Provider,{value:c},$.createElement(a,o,d))},t}($.Component);as.propTypes=process.env.NODE_ENV!=="production"?{component:T.any,children:T.node,appear:T.bool,enter:T.bool,exit:T.bool,childFactory:T.func}:{};as.defaultProps=oh;const lh=[];function ch(e){ie.useEffect(e,lh)}class ss{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 ss}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}}function uh(){const e=Jl(ss.create).current;return ch(e.disposeEffect),e}function ec(e){const{className:t,classes:r,pulsate:n=!1,rippleX:i,rippleY:a,rippleSize:s,in:o,onExited:c,timeout:d}=e,[h,f]=ie.useState(!1),p=it(t,r.ripple,r.rippleVisible,n&&r.ripplePulsate),y={width:s,height:s,top:-(s/2)+a,left:-(s/2)+i},k=it(r.child,h&&r.childLeaving,n&&r.childPulsate);return!o&&!h&&f(!0),ie.useEffect(()=>{if(!o&&c!=null){const m=setTimeout(c,d);return()=>{clearTimeout(m)}}},[c,o,d]),l.jsx("span",{className:p,style:y,children:l.jsx("span",{className:k})})}process.env.NODE_ENV!=="production"&&(ec.propTypes={classes:T.object.isRequired,className:T.string,in:T.bool,onExited:T.func,pulsate:T.bool,rippleSize:T.number,rippleX:T.number,rippleY:T.number,timeout:T.number.isRequired});const wt=Dr("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Oa=550,ph=80,dh=Pr.keyframes`
72
+ export default theme;`}function ja(e={},...t){const{breakpoints:r,mixins:n={},spacing:i,palette:a={},transitions:s={},typography:o={},shape:c,...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=ts(a),f=Vl(e);let p=ht(f,{mixins:ef(f.breakpoints,n),palette:h,shadows:of.slice(),typography:rf(h,o),transitions:pf(s),zIndex:{...df}});if(p=ht(p,d),p=t.reduce((y,E)=>ht(y,E),p),process.env.NODE_ENV!=="production"){const y=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],E=(m,S)=>{let v;for(v in m){const j=m[v];if(y.includes(v)&&Object.keys(j).length>0){if(process.env.NODE_ENV!=="production"){const M=hr("",v);console.error([`MUI: The \`${S}\` 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 '&.${M}' syntax:`,JSON.stringify({root:{[`&.${M}`]:j}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
73
+ `))}m[v]={}}}};Object.keys(p.components).forEach(m=>{const S=p.components[m].styleOverrides;S&&m.startsWith("Mui")&&E(S,m)})}return p.unstable_sxConfig={...$n,...d==null?void 0:d.unstable_sxConfig},p.unstable_sx=function(E){return ln({sx:E,theme:this})},p.toRuntimeSource=Yl,p}function hf(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 mf=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=hf(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Gl(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Ql(e){return e==="dark"?mf:[]}function xf(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...i}=e,a=ts(t);return{palette:a,opacity:{...Gl(a.mode),...r},overlays:n||Ql(a.mode),...i}}function gf(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 yf=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],vf=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 yf(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 bf(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function N(e,t,r){!e[t]&&r&&(e[t]=r)}function gn(e){return typeof e!="string"||!e.startsWith("hsl")?e:Ul(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 wf(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{}},Sf=(e="mui")=>Vd(e);function ea(e,t,r,n){if(!t)return;t=t===!0?{}:t;const i=n==="dark"?"dark":"light";if(!r){e[n]=xf({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:a,...s}=ja({...r,palette:{mode:i,...t==null?void 0:t.palette}});return e[n]={...t,palette:a,opacity:{...Gl(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Ql(i)},s}function Cf(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:s=gf,colorSchemeSelector:o=r.light&&r.dark?"media":void 0,rootSelector:c=":root",...d}=e,h=Object.keys(r)[0],f=n||(r.light&&h!=="light"?"light":h),p=Sf(a),{[f]:y,light:E,dark:m,...S}=r,v={...S};let j=y;if((f==="dark"&&!("dark"in r)||f==="light"&&!("light"in r))&&(j=!0),!j)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${f}\` option is either missing or invalid.`:pr(21,f));const M=ea(v,j,d,f);E&&!v.light&&ea(v,E,void 0,"light"),m&&!v.dark&&ea(v,m,void 0,"dark");let F={defaultColorScheme:f,...M,cssVarPrefix:a,colorSchemeSelector:o,rootSelector:c,getCssVar:p,colorSchemes:v,font:{...Jd(M.typography),...M.font},spacing:wf(d.spacing)};Object.keys(F.colorSchemes).forEach(I=>{const u=F.colorSchemes[I].palette,D=L=>{const $=L.split("-"),V=$[1],ee=$[2];return p(L,u[V][ee])};if(u.mode==="light"&&(N(u.common,"background","#fff"),N(u.common,"onBackground","#000")),u.mode==="dark"&&(N(u.common,"background","#000"),N(u.common,"onBackground","#fff")),bf(u,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),u.mode==="light"){N(u.Alert,"errorColor",Te(u.error.light,.6)),N(u.Alert,"infoColor",Te(u.info.light,.6)),N(u.Alert,"successColor",Te(u.success.light,.6)),N(u.Alert,"warningColor",Te(u.warning.light,.6)),N(u.Alert,"errorFilledBg",D("palette-error-main")),N(u.Alert,"infoFilledBg",D("palette-info-main")),N(u.Alert,"successFilledBg",D("palette-success-main")),N(u.Alert,"warningFilledBg",D("palette-warning-main")),N(u.Alert,"errorFilledColor",_t(()=>u.getContrastText(u.error.main))),N(u.Alert,"infoFilledColor",_t(()=>u.getContrastText(u.info.main))),N(u.Alert,"successFilledColor",_t(()=>u.getContrastText(u.success.main))),N(u.Alert,"warningFilledColor",_t(()=>u.getContrastText(u.warning.main))),N(u.Alert,"errorStandardBg",je(u.error.light,.9)),N(u.Alert,"infoStandardBg",je(u.info.light,.9)),N(u.Alert,"successStandardBg",je(u.success.light,.9)),N(u.Alert,"warningStandardBg",je(u.warning.light,.9)),N(u.Alert,"errorIconColor",D("palette-error-main")),N(u.Alert,"infoIconColor",D("palette-info-main")),N(u.Alert,"successIconColor",D("palette-success-main")),N(u.Alert,"warningIconColor",D("palette-warning-main")),N(u.AppBar,"defaultBg",D("palette-grey-100")),N(u.Avatar,"defaultBg",D("palette-grey-400")),N(u.Button,"inheritContainedBg",D("palette-grey-300")),N(u.Button,"inheritContainedHoverBg",D("palette-grey-A100")),N(u.Chip,"defaultBorder",D("palette-grey-400")),N(u.Chip,"defaultAvatarColor",D("palette-grey-700")),N(u.Chip,"defaultIconColor",D("palette-grey-700")),N(u.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),N(u.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),N(u.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),N(u.LinearProgress,"primaryBg",je(u.primary.main,.62)),N(u.LinearProgress,"secondaryBg",je(u.secondary.main,.62)),N(u.LinearProgress,"errorBg",je(u.error.main,.62)),N(u.LinearProgress,"infoBg",je(u.info.main,.62)),N(u.LinearProgress,"successBg",je(u.success.main,.62)),N(u.LinearProgress,"warningBg",je(u.warning.main,.62)),N(u.Skeleton,"bg",`rgba(${D("palette-text-primaryChannel")} / 0.11)`),N(u.Slider,"primaryTrack",je(u.primary.main,.62)),N(u.Slider,"secondaryTrack",je(u.secondary.main,.62)),N(u.Slider,"errorTrack",je(u.error.main,.62)),N(u.Slider,"infoTrack",je(u.info.main,.62)),N(u.Slider,"successTrack",je(u.success.main,.62)),N(u.Slider,"warningTrack",je(u.warning.main,.62));const L=Nn(u.background.default,.8);N(u.SnackbarContent,"bg",L),N(u.SnackbarContent,"color",_t(()=>u.getContrastText(L))),N(u.SpeedDialAction,"fabHoverBg",Nn(u.background.paper,.15)),N(u.StepConnector,"border",D("palette-grey-400")),N(u.StepContent,"border",D("palette-grey-400")),N(u.Switch,"defaultColor",D("palette-common-white")),N(u.Switch,"defaultDisabledColor",D("palette-grey-100")),N(u.Switch,"primaryDisabledColor",je(u.primary.main,.62)),N(u.Switch,"secondaryDisabledColor",je(u.secondary.main,.62)),N(u.Switch,"errorDisabledColor",je(u.error.main,.62)),N(u.Switch,"infoDisabledColor",je(u.info.main,.62)),N(u.Switch,"successDisabledColor",je(u.success.main,.62)),N(u.Switch,"warningDisabledColor",je(u.warning.main,.62)),N(u.TableCell,"border",je(Vn(u.divider,1),.88)),N(u.Tooltip,"bg",Vn(u.grey[700],.92))}if(u.mode==="dark"){N(u.Alert,"errorColor",je(u.error.light,.6)),N(u.Alert,"infoColor",je(u.info.light,.6)),N(u.Alert,"successColor",je(u.success.light,.6)),N(u.Alert,"warningColor",je(u.warning.light,.6)),N(u.Alert,"errorFilledBg",D("palette-error-dark")),N(u.Alert,"infoFilledBg",D("palette-info-dark")),N(u.Alert,"successFilledBg",D("palette-success-dark")),N(u.Alert,"warningFilledBg",D("palette-warning-dark")),N(u.Alert,"errorFilledColor",_t(()=>u.getContrastText(u.error.dark))),N(u.Alert,"infoFilledColor",_t(()=>u.getContrastText(u.info.dark))),N(u.Alert,"successFilledColor",_t(()=>u.getContrastText(u.success.dark))),N(u.Alert,"warningFilledColor",_t(()=>u.getContrastText(u.warning.dark))),N(u.Alert,"errorStandardBg",Te(u.error.light,.9)),N(u.Alert,"infoStandardBg",Te(u.info.light,.9)),N(u.Alert,"successStandardBg",Te(u.success.light,.9)),N(u.Alert,"warningStandardBg",Te(u.warning.light,.9)),N(u.Alert,"errorIconColor",D("palette-error-main")),N(u.Alert,"infoIconColor",D("palette-info-main")),N(u.Alert,"successIconColor",D("palette-success-main")),N(u.Alert,"warningIconColor",D("palette-warning-main")),N(u.AppBar,"defaultBg",D("palette-grey-900")),N(u.AppBar,"darkBg",D("palette-background-paper")),N(u.AppBar,"darkColor",D("palette-text-primary")),N(u.Avatar,"defaultBg",D("palette-grey-600")),N(u.Button,"inheritContainedBg",D("palette-grey-800")),N(u.Button,"inheritContainedHoverBg",D("palette-grey-700")),N(u.Chip,"defaultBorder",D("palette-grey-700")),N(u.Chip,"defaultAvatarColor",D("palette-grey-300")),N(u.Chip,"defaultIconColor",D("palette-grey-300")),N(u.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),N(u.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),N(u.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),N(u.LinearProgress,"primaryBg",Te(u.primary.main,.5)),N(u.LinearProgress,"secondaryBg",Te(u.secondary.main,.5)),N(u.LinearProgress,"errorBg",Te(u.error.main,.5)),N(u.LinearProgress,"infoBg",Te(u.info.main,.5)),N(u.LinearProgress,"successBg",Te(u.success.main,.5)),N(u.LinearProgress,"warningBg",Te(u.warning.main,.5)),N(u.Skeleton,"bg",`rgba(${D("palette-text-primaryChannel")} / 0.13)`),N(u.Slider,"primaryTrack",Te(u.primary.main,.5)),N(u.Slider,"secondaryTrack",Te(u.secondary.main,.5)),N(u.Slider,"errorTrack",Te(u.error.main,.5)),N(u.Slider,"infoTrack",Te(u.info.main,.5)),N(u.Slider,"successTrack",Te(u.success.main,.5)),N(u.Slider,"warningTrack",Te(u.warning.main,.5));const L=Nn(u.background.default,.98);N(u.SnackbarContent,"bg",L),N(u.SnackbarContent,"color",_t(()=>u.getContrastText(L))),N(u.SpeedDialAction,"fabHoverBg",Nn(u.background.paper,.15)),N(u.StepConnector,"border",D("palette-grey-600")),N(u.StepContent,"border",D("palette-grey-600")),N(u.Switch,"defaultColor",D("palette-grey-300")),N(u.Switch,"defaultDisabledColor",D("palette-grey-600")),N(u.Switch,"primaryDisabledColor",Te(u.primary.main,.55)),N(u.Switch,"secondaryDisabledColor",Te(u.secondary.main,.55)),N(u.Switch,"errorDisabledColor",Te(u.error.main,.55)),N(u.Switch,"infoDisabledColor",Te(u.info.main,.55)),N(u.Switch,"successDisabledColor",Te(u.success.main,.55)),N(u.Switch,"warningDisabledColor",Te(u.warning.main,.55)),N(u.TableCell,"border",Te(Vn(u.divider,1),.68)),N(u.Tooltip,"bg",Vn(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(L=>{const $=u[L];L!=="tonalOffset"&&$&&typeof $=="object"&&($.main&&N(u[L],"mainChannel",xn(gn($.main))),$.light&&N(u[L],"lightChannel",xn(gn($.light))),$.dark&&N(u[L],"darkChannel",xn(gn($.dark))),$.contrastText&&N(u[L],"contrastTextChannel",xn(gn($.contrastText))),L==="text"&&(Vt(u[L],"primary"),Vt(u[L],"secondary")),L==="action"&&($.active&&Vt(u[L],"active"),$.selected&&Vt(u[L],"selected")))})}),F=t.reduce((I,u)=>ht(I,u),F);const C={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:vf(F)},{vars:R,generateThemeVars:B,generateStyleSheets:_}=qd(F,C);return F.vars=R,Object.entries(F.colorSchemes[F.defaultColorScheme]).forEach(([I,u])=>{F[I]=u}),F.generateThemeVars=B,F.generateStyleSheets=_,F.generateSpacing=function(){return Bl(d.spacing,Qa(this))},F.getColorSchemeSelector=Wd(o),F.spacing=F.generateSpacing(),F.shouldSkipGeneratingVar=s,F.unstable_sxConfig={...$n,...d==null?void 0:d.unstable_sxConfig},F.unstable_sx=function(u){return ln({sx:u,theme:this})},F.toRuntimeSource=Yl,F}function go(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:ts({...r===!0?{}:r.palette,mode:t})})}function Ef(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",c=i==null?void 0:i[o],d={...i,...r?{[o]:{...typeof c!="boolean"&&c,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return ja(e,...t);let h=r;"palette"in e||d[o]&&(d[o]!==!0?h=d[o].palette:o==="dark"&&(h={mode:"dark"}));const f=ja({...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},go(f,"dark",d.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...d.dark!==!0&&d.dark,palette:f.palette},go(f,"light",d.light)),f}return!r&&!("light"in d)&&o==="light"&&(d.light=!0),Cf({...s,colorSchemes:d,defaultColorScheme:o,...typeof n!="boolean"&&n},...t)}const kf=Ef(),Tf="$$material";function jf(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Ff=e=>jf(e)&&e!=="classes",xt=Td({themeId:Tf,defaultTheme:kf,rootShouldForwardProp:Ff});function Af(){return ad}const $r=Bd;process.env.NODE_ENV!=="production"&&(k.node,k.object.isRequired);function Ir(e){return zd(e)}function Of(e){return typeof e.main=="string"}function _f(e,t=[]){if(!Of(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function li(e=[]){return([,t])=>t&&_f(t,e)}function Rf(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},Pf=Af(),Df=e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:i,variant:a,classes:s}=e,o={root:["root",a,e.align!=="inherit"&&`align${$e(t)}`,r&&"gutterBottom",n&&"noWrap",i&&"paragraph"]};return un(o,Rf,s)},If=xt("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${$e(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(li()).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${$e(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}}]}})),yo={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Zl=ne.forwardRef(function(t,r){const{color:n,...i}=Ir({props:t,name:"MuiTypography"}),a=!$f[n],s=Pf({...i,...a&&{color:n}}),{align:o="inherit",className:c,component:d,gutterBottom:h=!1,noWrap:f=!1,paragraph:p=!1,variant:y="body1",variantMapping:E=yo,...m}=s,S={...s,align:o,color:n,className:c,component:d,gutterBottom:h,noWrap:f,paragraph:p,variant:y,variantMapping:E},v=d||(p?"p":E[y]||yo[y])||"span",j=Df(S);return l.jsx(If,{as:v,ref:r,className:it(j.root,c),...m,ownerState:S,style:{...o!=="inherit"&&{"--Typography-textAlign":o},...m.style}})});process.env.NODE_ENV!=="production"&&(Zl.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 rs=ne.createContext(void 0);process.env.NODE_ENV!=="production"&&(rs.displayName="FormControlContext");function Mf(){return ne.useContext(rs)}function zf(e){return hr("MuiInputAdornment",e)}const vo=Dr("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var bo;const Bf=(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${$e(r.position)}`],r.disablePointerEvents===!0&&t.disablePointerEvents,t[r.variant]]},Vf=e=>{const{classes:t,disablePointerEvents:r,hiddenLabel:n,position:i,size:a,variant:s}=e,o={root:["root",r&&"disablePointerEvents",i&&`position${$e(i)}`,s,n&&"hiddenLabel",a&&`size${$e(a)}`]};return un(o,zf,t)},Nf=xt("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:Bf})($r(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${vo.positionStart}&:not(.${vo.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),Xl=ne.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiInputAdornment"}),{children:i,className:a,component:s="div",disablePointerEvents:o=!1,disableTypography:c=!1,position:d,variant:h,...f}=n,p=Mf()||{};let y=h;h&&p.variant&&process.env.NODE_ENV!=="production"&&h===p.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),p&&!y&&(y=p.variant);const E={...n,hiddenLabel:p.hiddenLabel,size:p.size,disablePointerEvents:o,position:d,variant:y},m=Vf(E);return l.jsx(rs.Provider,{value:null,children:l.jsx(Nf,{as:s,ownerState:E,className:it(m.root,a),ref:r,...f,children:typeof i=="string"&&!c?l.jsx(Zl,{color:"textSecondary",children:i}):l.jsxs(ne.Fragment,{children:[d==="start"?bo||(bo=l.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,i]})})})});process.env.NODE_ENV!=="production"&&(Xl.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 ns(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function Lf(e){return hr("MuiSvgIcon",e)}Dr("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const qf=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${$e(t)}`,`fontSize${$e(r)}`]};return un(i,Lf,n)},Wf=xt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${$e(r.color)}`],t[`fontSize${$e(r.fontSize)}`]]}})($r(({theme:e})=>{var t,r,n,i,a,s,o,c,d,h,f,p,y,E;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:((c=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:c.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 S,v;return{props:{color:m},style:{color:(v=(S=(e.vars??e).palette)==null?void 0:S[m])==null?void 0:v.main}}}),{props:{color:"action"},style:{color:(p=(f=(e.vars??e).palette)==null?void 0:f.action)==null?void 0:p.active}},{props:{color:"disabled"},style:{color:(E=(y=(e.vars??e).palette)==null?void 0:y.action)==null?void 0:E.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),ci=ne.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiSvgIcon"}),{children:i,className:a,color:s="inherit",component:o="svg",fontSize:c="medium",htmlColor:d,inheritViewBox:h=!1,titleAccess:f,viewBox:p="0 0 24 24",...y}=n,E=ne.isValidElement(i)&&i.type==="svg",m={...n,color:s,component:o,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:h,viewBox:p,hasSvgAsChild:E},S={};h||(S.viewBox=p);const v=qf(m);return l.jsxs(Wf,{as:o,className:it(v.root,a),focusable:"false",color:d,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:r,...S,...y,...E&&i.props,ownerState:m,children:[E?i.props.children:i,f?l.jsx("title",{children:f}):null]})});process.env.NODE_ENV!=="production"&&(ci.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});ci.muiName="SvgIcon";function ut(e,t){function r(n,i){return l.jsx(ci,{"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=ci.muiName,ne.memo(ne.forwardRef(r))}let wo=0;function Uf(e){const[t,r]=ne.useState(e),n=e||t;return ne.useEffect(()=>{t==null&&(wo+=1,r(`mui-${wo}`))},[t]),n}const Hf={...ne},So=Hf.useId;function Kf(e){if(So!==void 0){const t=So();return e??t}return Uf(e)}function Yn(e){const t=ne.useRef(e);return _d(()=>{t.current=e}),ne.useRef((...r)=>(0,t.current)(...r)).current}function Co(...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 Yf=k.oneOfType([k.func,k.object]);function Gf(e){const{prototype:t={}}=e;return!!t.isReactComponent}function Qf(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"&&!Gf(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 Zf=ns(k.elementType,Qf);function Eo(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 ko={};function Jl(e,t){const r=ne.useRef(ko);return r.current===ko&&(r.current=e(t)),r}class ui{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 ui}static use(){const t=Jl(ui.create).current,[r,n]=ne.useState(!1);return t.shouldMount=r,t.setShouldMount=n,ne.useEffect(t.mountEffect,[r]),t}mount(){return this.mounted||(this.mounted=Jf(),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 Xf(){return ui.use()}function Jf(){let e,t;const r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r}function Fa(){return Fa=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},Fa.apply(null,arguments)}function eh(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 Aa(e,t){return Aa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Aa(e,t)}function th(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Aa(e,t)}const To=P.createContext(null);function rh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function is(e,t){var r=function(a){return t&&P.isValidElement(a)?t(a):a},n=Object.create(null);return e&&P.Children.map(e,function(i){return i}).forEach(function(i){n[i.key]=r(i)}),n}function nh(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 c in t){if(n[c])for(s=0;s<n[c].length;s++){var d=n[c][s];o[n[c][s]]=r(d)}o[c]=r(c)}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 ih(e,t){return is(e.children,function(r){return P.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 ah(e,t,r){var n=is(e.children),i=nh(t,n);return Object.keys(i).forEach(function(a){var s=i[a];if(P.isValidElement(s)){var o=a in t,c=a in n,d=t[a],h=P.isValidElement(d)&&!d.props.in;c&&(!o||h)?i[a]=P.cloneElement(s,{onExited:r.bind(null,s),in:!0,exit:br(s,"exit",e),enter:br(s,"enter",e)}):!c&&o&&!h?i[a]=P.cloneElement(s,{in:!1}):c&&o&&P.isValidElement(d)&&(i[a]=P.cloneElement(s,{onExited:r.bind(null,s),in:d.props.in,exit:br(s,"exit",e),enter:br(s,"enter",e)}))}}),i}var sh=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},oh={component:"div",childFactory:function(t){return t}},as=function(e){th(t,e);function t(n,i){var a;a=e.call(this,n,i)||this;var s=a.handleExited.bind(rh(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,c=a.firstRender;return{children:c?ih(i,o):ah(i,s,o),firstRender:!1}},r.handleExited=function(i,a){var s=is(this.props.children);i.key in s||(i.props.onExited&&i.props.onExited(a),this.mounted&&this.setState(function(o){var c=Fa({},o.children);return delete c[i.key],{children:c}}))},r.render=function(){var i=this.props,a=i.component,s=i.childFactory,o=eh(i,["component","childFactory"]),c=this.state.contextValue,d=sh(this.state.children).map(s);return delete o.appear,delete o.enter,delete o.exit,a===null?P.createElement(To.Provider,{value:c},d):P.createElement(To.Provider,{value:c},P.createElement(a,o,d))},t}(P.Component);as.propTypes=process.env.NODE_ENV!=="production"?{component:k.any,children:k.node,appear:k.bool,enter:k.bool,exit:k.bool,childFactory:k.func}:{};as.defaultProps=oh;const lh=[];function ch(e){ne.useEffect(e,lh)}class ss{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 ss}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}}function uh(){const e=Jl(ss.create).current;return ch(e.disposeEffect),e}function ec(e){const{className:t,classes:r,pulsate:n=!1,rippleX:i,rippleY:a,rippleSize:s,in:o,onExited:c,timeout:d}=e,[h,f]=ne.useState(!1),p=it(t,r.ripple,r.rippleVisible,n&&r.ripplePulsate),y={width:s,height:s,top:-(s/2)+a,left:-(s/2)+i},E=it(r.child,h&&r.childLeaving,n&&r.childPulsate);return!o&&!h&&f(!0),ne.useEffect(()=>{if(!o&&c!=null){const m=setTimeout(c,d);return()=>{clearTimeout(m)}}},[c,o,d]),l.jsx("span",{className:p,style:y,children:l.jsx("span",{className:E})})}process.env.NODE_ENV!=="production"&&(ec.propTypes={classes:k.object.isRequired,className:k.string,in:k.bool,onExited:k.func,pulsate:k.bool,rippleSize:k.number,rippleX:k.number,rippleY:k.number,timeout:k.number.isRequired});const bt=Dr("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Oa=550,ph=80,dh=Pr.keyframes`
76
76
  0% {
77
77
  transform: scale(0);
78
78
  opacity: 0.1;
@@ -106,7 +106,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
106
106
  opacity: 0;
107
107
  position: absolute;
108
108
 
109
- &.${wt.rippleVisible} {
109
+ &.${bt.rippleVisible} {
110
110
  opacity: 0.3;
111
111
  transform: scale(1);
112
112
  animation-name: ${dh};
@@ -114,11 +114,11 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
114
114
  animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
115
115
  }
116
116
 
117
- &.${wt.ripplePulsate} {
117
+ &.${bt.ripplePulsate} {
118
118
  animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
119
119
  }
120
120
 
121
- & .${wt.child} {
121
+ & .${bt.child} {
122
122
  opacity: 1;
123
123
  display: block;
124
124
  width: 100%;
@@ -127,14 +127,14 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
127
127
  background-color: currentColor;
128
128
  }
129
129
 
130
- & .${wt.childLeaving} {
130
+ & .${bt.childLeaving} {
131
131
  opacity: 0;
132
132
  animation-name: ${fh};
133
133
  animation-duration: ${Oa}ms;
134
134
  animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
135
135
  }
136
136
 
137
- & .${wt.childPulsate} {
137
+ & .${bt.childPulsate} {
138
138
  position: absolute;
139
139
  /* @noflip */
140
140
  left: 0px;
@@ -145,7 +145,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
145
145
  animation-iteration-count: infinite;
146
146
  animation-delay: 200ms;
147
147
  }
148
- `,tc=ie.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:a={},className:s,...o}=n,[c,d]=ie.useState([]),h=ie.useRef(0),f=ie.useRef(null);ie.useEffect(()=>{f.current&&(f.current(),f.current=null)},[c]);const p=ie.useRef(!1),y=uh(),k=ie.useRef(null),m=ie.useRef(null),C=ie.useCallback(j=>{const{pulsate:E,rippleX:R,rippleY:z,rippleSize:_,cb:I}=j;d(u=>[...u,l.jsx(xh,{classes:{ripple:it(a.ripple,wt.ripple),rippleVisible:it(a.rippleVisible,wt.rippleVisible),ripplePulsate:it(a.ripplePulsate,wt.ripplePulsate),child:it(a.child,wt.child),childLeaving:it(a.childLeaving,wt.childLeaving),childPulsate:it(a.childPulsate,wt.childPulsate)},timeout:Oa,pulsate:E,rippleX:R,rippleY:z,rippleSize:_},h.current)]),h.current+=1,f.current=I},[a]),v=ie.useCallback((j={},E={},R=()=>{})=>{const{pulsate:z=!1,center:_=i||E.pulsate,fakeElement:I=!1}=E;if((j==null?void 0:j.type)==="mousedown"&&p.current){p.current=!1;return}(j==null?void 0:j.type)==="touchstart"&&(p.current=!0);const u=I?null:m.current,P=u?u.getBoundingClientRect():{width:0,height:0,left:0,top:0};let L,A,B;if(_||j===void 0||j.clientX===0&&j.clientY===0||!j.clientX&&!j.touches)L=Math.round(P.width/2),A=Math.round(P.height/2);else{const{clientX:Y,clientY:ae}=j.touches&&j.touches.length>0?j.touches[0]:j;L=Math.round(Y-P.left),A=Math.round(ae-P.top)}if(_)B=Math.sqrt((2*P.width**2+P.height**2)/3),B%2===0&&(B+=1);else{const Y=Math.max(Math.abs((u?u.clientWidth:0)-L),L)*2+2,ae=Math.max(Math.abs((u?u.clientHeight:0)-A),A)*2+2;B=Math.sqrt(Y**2+ae**2)}j!=null&&j.touches?k.current===null&&(k.current=()=>{C({pulsate:z,rippleX:L,rippleY:A,rippleSize:B,cb:R})},y.start(ph,()=>{k.current&&(k.current(),k.current=null)})):C({pulsate:z,rippleX:L,rippleY:A,rippleSize:B,cb:R})},[i,C,y]),S=ie.useCallback(()=>{v({},{pulsate:!0})},[v]),D=ie.useCallback((j,E)=>{if(y.clear(),(j==null?void 0:j.type)==="touchend"&&k.current){k.current(),k.current=null,y.start(0,()=>{D(j,E)});return}k.current=null,d(R=>R.length>0?R.slice(1):R),f.current=E},[y]);return ie.useImperativeHandle(r,()=>({pulsate:S,start:v,stop:D}),[S,v,D]),l.jsx(mh,{className:it(wt.root,a.root,s),ref:m,...o,children:l.jsx(as,{component:null,exit:!0,children:c})})});process.env.NODE_ENV!=="production"&&(tc.propTypes={center:T.bool,classes:T.object,className:T.string});function gh(e){return hr("MuiButtonBase",e)}const yh=Dr("MuiButtonBase",["root","disabled","focusVisible"]),vh=e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:i}=e,s=un({root:["root",t&&"disabled",r&&"focusVisible"]},gh,i);return r&&n&&(s.root+=` ${n}`),s},bh=xt("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"},[`&.${yh.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),rc=ie.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:a=!1,children:s,className:o,component:c="button",disabled:d=!1,disableRipple:h=!1,disableTouchRipple:f=!1,focusRipple:p=!1,focusVisibleClassName:y,LinkComponent:k="a",onBlur:m,onClick:C,onContextMenu:v,onDragLeave:S,onFocus:D,onFocusVisible:j,onKeyDown:E,onKeyUp:R,onMouseDown:z,onMouseLeave:_,onMouseUp:I,onTouchEnd:u,onTouchMove:P,onTouchStart:L,tabIndex:A=0,TouchRippleProps:B,touchRippleRef:Y,type:ae,...de}=n,ce=ie.useRef(null),Q=Xf(),q=Co(Q.ref,Y),[G,ue]=ie.useState(!1);d&&G&&ue(!1),ie.useImperativeHandle(i,()=>({focusVisible:()=>{ue(!0),ce.current.focus()}}),[]);const fe=Q.shouldMount&&!h&&!d;ie.useEffect(()=>{G&&p&&!h&&Q.pulsate()},[h,p,G,Q]);const pe=Nt(Q,"start",z,f),me=Nt(Q,"stop",v,f),W=Nt(Q,"stop",S,f),J=Nt(Q,"stop",I,f),re=Nt(Q,"stop",b=>{G&&b.preventDefault(),_&&_(b)},f),oe=Nt(Q,"start",L,f),le=Nt(Q,"stop",u,f),ve=Nt(Q,"stop",P,f),X=Nt(Q,"stop",b=>{Eo(b.target)||ue(!1),m&&m(b)},!1),Ie=Yn(b=>{ce.current||(ce.current=b.currentTarget),Eo(b.target)&&(ue(!0),j&&j(b)),D&&D(b)}),We=()=>{const b=ce.current;return c&&c!=="button"&&!(b.tagName==="A"&&b.href)},Qe=Yn(b=>{p&&!b.repeat&&G&&b.key===" "&&Q.stop(b,()=>{Q.start(b)}),b.target===b.currentTarget&&We()&&b.key===" "&&b.preventDefault(),E&&E(b),b.target===b.currentTarget&&We()&&b.key==="Enter"&&!d&&(b.preventDefault(),C&&C(b))}),gt=Yn(b=>{p&&b.key===" "&&G&&!b.defaultPrevented&&Q.stop(b,()=>{Q.pulsate(b)}),R&&R(b),C&&b.target===b.currentTarget&&We()&&b.key===" "&&!b.defaultPrevented&&C(b)});let He=c;He==="button"&&(de.href||de.to)&&(He=k);const K={};He==="button"?(K.type=ae===void 0?"button":ae,K.disabled=d):(!de.href&&!de.to&&(K.role="button"),d&&(K["aria-disabled"]=d));const se=Co(r,ce),g={...n,centerRipple:a,component:c,disabled:d,disableRipple:h,disableTouchRipple:f,focusRipple:p,tabIndex:A,focusVisible:G},w=vh(g);return l.jsxs(bh,{as:He,className:it(w.root,o),ownerState:g,onBlur:X,onClick:C,onContextMenu:me,onFocus:Ie,onKeyDown:Qe,onKeyUp:gt,onMouseDown:pe,onMouseLeave:re,onMouseUp:J,onDragLeave:W,onTouchEnd:le,onTouchMove:ve,onTouchStart:oe,ref:se,tabIndex:d?-1:A,type:ae,...K,...de,children:[s,fe?l.jsx(tc,{ref:q,center:a,...B}):null]})});function Nt(e,t,r,n=!1){return Yn(i=>(r&&r(i),n||e[t](i),!0))}process.env.NODE_ENV!=="production"&&(rc.propTypes={action:Yf,centerRipple:T.bool,children:T.node,classes:T.object,className:T.string,component:Zf,disabled:T.bool,disableRipple:T.bool,disableTouchRipple:T.bool,focusRipple:T.bool,focusVisibleClassName:T.string,href:T.any,LinkComponent:T.elementType,onBlur:T.func,onClick:T.func,onContextMenu:T.func,onDragLeave:T.func,onFocus:T.func,onFocusVisible:T.func,onKeyDown:T.func,onKeyUp:T.func,onMouseDown:T.func,onMouseLeave:T.func,onMouseUp:T.func,onTouchEnd:T.func,onTouchMove:T.func,onTouchStart:T.func,sx:T.oneOfType([T.arrayOf(T.oneOfType([T.func,T.object,T.bool])),T.func,T.object]),tabIndex:T.number,TouchRippleProps:T.object,touchRippleRef:T.oneOfType([T.func,T.shape({current:T.shape({pulsate:T.func.isRequired,start:T.func.isRequired,stop:T.func.isRequired})})]),type:T.oneOfType([T.oneOf(["button","reset","submit"]),T.string])});function wh(e){return hr("MuiCircularProgress",e)}Dr("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Qt=44,_a=Pr.keyframes`
148
+ `,tc=ne.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:a={},className:s,...o}=n,[c,d]=ne.useState([]),h=ne.useRef(0),f=ne.useRef(null);ne.useEffect(()=>{f.current&&(f.current(),f.current=null)},[c]);const p=ne.useRef(!1),y=uh(),E=ne.useRef(null),m=ne.useRef(null),S=ne.useCallback(F=>{const{pulsate:C,rippleX:R,rippleY:B,rippleSize:_,cb:I}=F;d(u=>[...u,l.jsx(xh,{classes:{ripple:it(a.ripple,bt.ripple),rippleVisible:it(a.rippleVisible,bt.rippleVisible),ripplePulsate:it(a.ripplePulsate,bt.ripplePulsate),child:it(a.child,bt.child),childLeaving:it(a.childLeaving,bt.childLeaving),childPulsate:it(a.childPulsate,bt.childPulsate)},timeout:Oa,pulsate:C,rippleX:R,rippleY:B,rippleSize:_},h.current)]),h.current+=1,f.current=I},[a]),v=ne.useCallback((F={},C={},R=()=>{})=>{const{pulsate:B=!1,center:_=i||C.pulsate,fakeElement:I=!1}=C;if((F==null?void 0:F.type)==="mousedown"&&p.current){p.current=!1;return}(F==null?void 0:F.type)==="touchstart"&&(p.current=!0);const u=I?null:m.current,D=u?u.getBoundingClientRect():{width:0,height:0,left:0,top:0};let L,$,V;if(_||F===void 0||F.clientX===0&&F.clientY===0||!F.clientX&&!F.touches)L=Math.round(D.width/2),$=Math.round(D.height/2);else{const{clientX:ee,clientY:ie}=F.touches&&F.touches.length>0?F.touches[0]:F;L=Math.round(ee-D.left),$=Math.round(ie-D.top)}if(_)V=Math.sqrt((2*D.width**2+D.height**2)/3),V%2===0&&(V+=1);else{const ee=Math.max(Math.abs((u?u.clientWidth:0)-L),L)*2+2,ie=Math.max(Math.abs((u?u.clientHeight:0)-$),$)*2+2;V=Math.sqrt(ee**2+ie**2)}F!=null&&F.touches?E.current===null&&(E.current=()=>{S({pulsate:B,rippleX:L,rippleY:$,rippleSize:V,cb:R})},y.start(ph,()=>{E.current&&(E.current(),E.current=null)})):S({pulsate:B,rippleX:L,rippleY:$,rippleSize:V,cb:R})},[i,S,y]),j=ne.useCallback(()=>{v({},{pulsate:!0})},[v]),M=ne.useCallback((F,C)=>{if(y.clear(),(F==null?void 0:F.type)==="touchend"&&E.current){E.current(),E.current=null,y.start(0,()=>{M(F,C)});return}E.current=null,d(R=>R.length>0?R.slice(1):R),f.current=C},[y]);return ne.useImperativeHandle(r,()=>({pulsate:j,start:v,stop:M}),[j,v,M]),l.jsx(mh,{className:it(bt.root,a.root,s),ref:m,...o,children:l.jsx(as,{component:null,exit:!0,children:c})})});process.env.NODE_ENV!=="production"&&(tc.propTypes={center:k.bool,classes:k.object,className:k.string});function gh(e){return hr("MuiButtonBase",e)}const yh=Dr("MuiButtonBase",["root","disabled","focusVisible"]),vh=e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:i}=e,s=un({root:["root",t&&"disabled",r&&"focusVisible"]},gh,i);return r&&n&&(s.root+=` ${n}`),s},bh=xt("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"},[`&.${yh.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),rc=ne.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:a=!1,children:s,className:o,component:c="button",disabled:d=!1,disableRipple:h=!1,disableTouchRipple:f=!1,focusRipple:p=!1,focusVisibleClassName:y,LinkComponent:E="a",onBlur:m,onClick:S,onContextMenu:v,onDragLeave:j,onFocus:M,onFocusVisible:F,onKeyDown:C,onKeyUp:R,onMouseDown:B,onMouseLeave:_,onMouseUp:I,onTouchEnd:u,onTouchMove:D,onTouchStart:L,tabIndex:$=0,TouchRippleProps:V,touchRippleRef:ee,type:ie,...he}=n,le=ne.useRef(null),Y=Xf(),U=Co(Y.ref,ee),[Z,ce]=ne.useState(!1);d&&Z&&ce(!1),ne.useImperativeHandle(i,()=>({focusVisible:()=>{ce(!0),le.current.focus()}}),[]);const de=Y.shouldMount&&!h&&!d;ne.useEffect(()=>{Z&&p&&!h&&Y.pulsate()},[h,p,Z,Y]);const oe=Nt(Y,"start",B,f),pe=Nt(Y,"stop",v,f),H=Nt(Y,"stop",j,f),X=Nt(Y,"stop",I,f),te=Nt(Y,"stop",g=>{Z&&g.preventDefault(),_&&_(g)},f),ae=Nt(Y,"start",L,f),se=Nt(Y,"stop",u,f),ge=Nt(Y,"stop",D,f),Q=Nt(Y,"stop",g=>{Eo(g.target)||ce(!1),m&&m(g)},!1),Pe=Yn(g=>{le.current||(le.current=g.currentTarget),Eo(g.target)&&(ce(!0),F&&F(g)),M&&M(g)}),qe=()=>{const g=le.current;return c&&c!=="button"&&!(g.tagName==="A"&&g.href)},Ge=Yn(g=>{p&&!g.repeat&&Z&&g.key===" "&&Y.stop(g,()=>{Y.start(g)}),g.target===g.currentTarget&&qe()&&g.key===" "&&g.preventDefault(),C&&C(g),g.target===g.currentTarget&&qe()&&g.key==="Enter"&&!d&&(g.preventDefault(),S&&S(g))}),kt=Yn(g=>{p&&g.key===" "&&Z&&!g.defaultPrevented&&Y.stop(g,()=>{Y.pulsate(g)}),R&&R(g),S&&g.target===g.currentTarget&&qe()&&g.key===" "&&!g.defaultPrevented&&S(g)});let Ue=c;Ue==="button"&&(he.href||he.to)&&(Ue=E);const Ze={};Ue==="button"?(Ze.type=ie===void 0?"button":ie,Ze.disabled=d):(!he.href&&!he.to&&(Ze.role="button"),d&&(Ze["aria-disabled"]=d));const He=Co(r,le),w={...n,centerRipple:a,component:c,disabled:d,disableRipple:h,disableTouchRipple:f,focusRipple:p,tabIndex:$,focusVisible:Z},T=vh(w);return l.jsxs(bh,{as:Ue,className:it(T.root,o),ownerState:w,onBlur:Q,onClick:S,onContextMenu:pe,onFocus:Pe,onKeyDown:Ge,onKeyUp:kt,onMouseDown:oe,onMouseLeave:te,onMouseUp:X,onDragLeave:H,onTouchEnd:se,onTouchMove:ge,onTouchStart:ae,ref:He,tabIndex:d?-1:$,type:ie,...Ze,...he,children:[s,de?l.jsx(tc,{ref:U,center:a,...V}):null]})});function Nt(e,t,r,n=!1){return Yn(i=>(r&&r(i),n||e[t](i),!0))}process.env.NODE_ENV!=="production"&&(rc.propTypes={action:Yf,centerRipple:k.bool,children:k.node,classes:k.object,className:k.string,component:Zf,disabled:k.bool,disableRipple:k.bool,disableTouchRipple:k.bool,focusRipple:k.bool,focusVisibleClassName:k.string,href:k.any,LinkComponent:k.elementType,onBlur:k.func,onClick:k.func,onContextMenu:k.func,onDragLeave:k.func,onFocus:k.func,onFocusVisible:k.func,onKeyDown:k.func,onKeyUp:k.func,onMouseDown:k.func,onMouseLeave:k.func,onMouseUp:k.func,onTouchEnd:k.func,onTouchMove:k.func,onTouchStart:k.func,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),tabIndex:k.number,TouchRippleProps:k.object,touchRippleRef:k.oneOfType([k.func,k.shape({current:k.shape({pulsate:k.func.isRequired,start:k.func.isRequired,stop:k.func.isRequired})})]),type:k.oneOfType([k.oneOf(["button","reset","submit"]),k.string])});function wh(e){return hr("MuiCircularProgress",e)}Dr("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Qt=44,_a=Pr.keyframes`
149
149
  0% {
150
150
  transform: rotate(0deg);
151
151
  }
@@ -172,12 +172,12 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
172
172
  animation: ${_a} 1.4s linear infinite;
173
173
  `:null,Ch=typeof Ra!="string"?Pr.css`
174
174
  animation: ${Ra} 1.4s ease-in-out infinite;
175
- `:null,Eh=e=>{const{classes:t,variant:r,color:n,disableShrink:i}=e,a={root:["root",r,`color${De(n)}`],svg:["svg"],circle:["circle",`circle${De(r)}`,i&&"circleDisableShrink"]};return un(a,wh,t)},kh=xt("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${De(r.color)}`]]}})($r(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:Sh||{animation:`${_a} 1.4s linear infinite`}},...Object.entries(e.palette).filter(li()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Th=xt("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),jh=xt("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${De(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:Ch||{animation:`${Ra} 1.4s ease-in-out infinite`}}]}))),nc=ie.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiCircularProgress"}),{className:i,color:a="primary",disableShrink:s=!1,size:o=40,style:c,thickness:d=3.6,value:h=0,variant:f="indeterminate",...p}=n,y={...n,color:a,disableShrink:s,size:o,thickness:d,value:h,variant:f},k=Eh(y),m={},C={},v={};if(f==="determinate"){const S=2*Math.PI*((Qt-d)/2);m.strokeDasharray=S.toFixed(3),v["aria-valuenow"]=Math.round(h),m.strokeDashoffset=`${((100-h)/100*S).toFixed(3)}px`,C.transform="rotate(-90deg)"}return l.jsx(kh,{className:it(k.root,i),style:{width:o,height:o,...C,...c},ownerState:y,ref:r,role:"progressbar",...v,...p,children:l.jsx(Th,{className:k.svg,ownerState:y,viewBox:`${Qt/2} ${Qt/2} ${Qt} ${Qt}`,children:l.jsx(jh,{className:k.circle,style:m,ownerState:y,cx:Qt,cy:Qt,r:(Qt-d)/2,fill:"none",strokeWidth:d})})})});process.env.NODE_ENV!=="production"&&(nc.propTypes={classes:T.object,className:T.string,color:T.oneOfType([T.oneOf(["inherit","primary","secondary","error","info","success","warning"]),T.string]),disableShrink:ns(T.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:T.oneOfType([T.number,T.string]),style:T.object,sx:T.oneOfType([T.arrayOf(T.oneOfType([T.func,T.object,T.bool])),T.func,T.object]),thickness:T.number,value:T.number,variant:T.oneOf(["determinate","indeterminate"])});function Fh(e){return hr("MuiIconButton",e)}const jo=Dr("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Ah=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${De(n)}`,i&&`edge${De(i)}`,`size${De(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return un(o,Fh,t)},Oh=xt(rc,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.loading&&t.loading,r.color!=="default"&&t[`color${De(r.color)}`],r.edge&&t[`edge${De(r.edge)}`],t[`size${De(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(li()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(li()).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)}}],[`&.${jo.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${jo.loading}`]:{color:"transparent"}}))),_h=xt("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=ie.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiIconButton"}),{edge:i=!1,children:a,className:s,color:o="default",disabled:c=!1,disableFocusRipple:d=!1,size:h="medium",id:f,loading:p=null,loadingIndicator:y,...k}=n,m=Kf(f),C=y??l.jsx(nc,{"aria-labelledby":m,color:"inherit",size:16}),v={...n,edge:i,color:o,disabled:c,disableFocusRipple:d,loading:p,loadingIndicator:C,size:h},S=Ah(v);return l.jsxs(Oh,{id:p?m:f,className:it(S.root,s),centerRipple:!0,focusRipple:!d,disabled:c||p,ref:r,...k,ownerState:v,children:[typeof p=="boolean"&&l.jsx("span",{className:S.loadingWrapper,style:{display:"contents"},children:l.jsx(_h,{className:S.loadingIndicator,ownerState:v,children:p&&C})}),a]})});process.env.NODE_ENV!=="production"&&(Gn.propTypes={children:ns(T.node,e=>ie.Children.toArray(e.children).some(r=>ie.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:T.object,className:T.string,color:T.oneOfType([T.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),T.string]),disabled:T.bool,disableFocusRipple:T.bool,disableRipple:T.bool,edge:T.oneOf(["end","start",!1]),id:T.string,loading:T.bool,loadingIndicator:T.node,size:T.oneOfType([T.oneOf(["small","medium","large"]),T.string]),sx:T.oneOfType([T.arrayOf(T.oneOfType([T.func,T.object,T.bool])),T.func,T.object])});const Fo=ut(l.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"),Ao=ut(l.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"),Rh=ut(l.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"),os=ut(l.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),pi=ut(l.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=ut(l.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"),H={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}},Ph=(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 Ph(n.r+(i.r-n.r)*r,n.g+(i.g-n.g)*r,n.b+(i.b-n.b)*r)},ls=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)}},Dh=ls(H.primary.main),Ih=ls(H.secondary.main),Ge=ls(H.text.primary),Mh={primary:H.primary.main,secondary:H.secondary.main,textPrimary:H.text.primary,textSecondary:H.text.secondary,divider:H.divider,background:H.background},vt=({hasError:e,sx:t,labelText:r,labelVariant:n="subtitle2",endAdornment:i,endorsementText:a,endorsementBg:s="#E6E8EC",endorsementColor:o="#111827",endorsementRadius:c="6px",endorsementHeight:d=28,endorsementPaddingX:h="8px",...f})=>{var m,C;const p=!!r,y=a?l.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:c,backgroundColor:s,color:o,fontSize:12,fontWeight:300,lineHeight:1,whiteSpace:"nowrap"},children:a}):null,k={...f.InputProps,endAdornment:y||i?l.jsxs(x.InputAdornment,{sx:{mr:-1},position:"end",children:[y||i,(m=f.InputProps)==null?void 0:m.endAdornment]}):(C=f.InputProps)==null?void 0:C.endAdornment};return l.jsxs(x.Box,{children:[p&&l.jsx(x.Typography,{variant:n,sx:{color:H.text.primary,mb:.5,fontWeight:500},children:r}),l.jsx(x.TextField,{fullWidth:!0,size:"small",...f,InputProps:k,label:p?void 0:f.label,sx:{"& .MuiOutlinedInput-root":{backgroundColor:H.background.paper,borderRadius:"8px","& fieldset":{borderColor:H.divider},"&:hover fieldset":{borderColor:Ge[300]},"&.Mui-focused fieldset":{borderColor:Ge[400]},"&.Mui-error fieldset":{borderColor:H.error.main}},"& .MuiInputBase-input":{color:H.text.primary},"& .MuiFormLabel-root":{color:H.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:H.text.primary},"& .MuiFormHelperText-root":{color:e?H.error.main:H.text.secondary},...t}})]})},$i=({labelText:e,label:t,options:r,loading:n,helperText:i,size:a="small",labelVariant:s="subtitle2",placeholder:o,value:c,sx:d,...h})=>{const f=$.useId(),p=c==null||c===""||Array.isArray(c)&&c.length===0,y=k=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...k,children:l.jsx("path",{d:"M6 9l6 6 6-6",stroke:H.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});return l.jsxs(x.FormControl,{fullWidth:!0,size:a,error:!!h.error,variant:"outlined",children:[e&&l.jsx(x.Typography,{variant:s,sx:{color:H.text.primary,mb:.5,fontWeight:500},children:e}),t&&l.jsx(x.InputLabel,{id:f,shrink:!p||!!o,sx:{color:H.text.secondary,"&.Mui-focused":{color:H.text.primary},"&.Mui-error":{color:H.error.main}},children:t}),l.jsx(x.Select,{...h,value:c,labelId:t?f:void 0,label:t,displayEmpty:!0,input:l.jsx(x.OutlinedInput,{label:t}),IconComponent:y,renderValue:k=>{const m=k;if(p)return l.jsx("span",{style:{color:H.text.secondary},children:o??""});const C=r.find(v=>v.value===m);return(C==null?void 0:C.label)??String(m)},endAdornment:n?l.jsx(x.CircularProgress,{size:20}):void 0,MenuProps:{PaperProps:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${H.divider}`,mt:.5,borderRadius:"8px"}}},sx:{backgroundColor:H.background.paper,boxShadow:"none",borderRadius:"8px",height:"40px","& .MuiSelect-select":{color:H.text.primary,fontSize:14,pr:3},"& .MuiOutlinedInput-notchedOutline":{borderColor:H.divider},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:Ge[300]},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:Ge[400]},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:H.error.main},"& svg":{right:8,position:"absolute",pointerEvents:"none"},...d},children:n?l.jsx(x.MenuItem,{disabled:!0,children:l.jsx(x.CircularProgress,{size:16})}):r.map(k=>l.jsx(x.MenuItem,{value:k.value,sx:{backgroundColor:H.background.paper,color:H.text.primary,fontSize:14,mx:1,"&:hover":{backgroundColor:Ge[50],borderRadius:"4px"},"&.Mui-selected":{backgroundColor:Ge[50],borderRadius:"4px"}},children:k.label},k.value))}),i&&l.jsx(x.FormHelperText,{children:i})]})},zh=e=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:l.jsx("path",{d:"M6 9l6 6 6-6",stroke:H.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),ic=({id:e,options:t,value:r,multiple:n,label:i,labelText:a,placeholder:s,onChange:o,labelVariant:c="subtitle2",disabled:d,loading:h,error:f,helperText:p,onOpen:y,noOptionsText:k,sx:m})=>l.jsxs(x.Box,{children:[a&&l.jsx(x.Typography,{variant:c,sx:{color:H.text.primary,mb:.5,fontWeight:500},children:a}),l.jsx(x.Autocomplete,{id:e,options:t,value:r,multiple:n,size:"small",popupIcon:l.jsx(zh,{}),disabled:d,loading:h,onOpen:y,noOptionsText:k,fullWidth:!0,componentsProps:{paper:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${H.divider}`,mt:.5,borderRadius:"8px"}}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:H.background.paper,borderRadius:"8px",height:"40px","& fieldset":{borderColor:H.divider},"&:hover fieldset":{borderColor:Ge[300]},"&.Mui-focused fieldset":{borderColor:Ge[400]},"&.Mui-error fieldset":{borderColor:H.error.main}},"& .MuiInputBase-input":{color:H.text.primary,fontSize:14},"& .MuiAutocomplete-popupIndicator":{color:H.text.secondary},"& .MuiAutocomplete-endAdornment svg":{width:16,height:16},...m},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})=>l.jsxs(x.Box,{component:"li",...C,sx:{backgroundColor:H.background.paper,color:H.text.primary,mx:.5,borderRadius:"4px","&:hover":{backgroundColor:Ge[50]},"&.Mui-focused":{backgroundColor:Ge[50]},...S?{backgroundColor:Ge[50]}:{}},children:[n&&l.jsx(x.Checkbox,{checked:S}),l.jsx(x.Typography,{variant:"body2",sx:{color:H.text.primary,fontSize:14},children:typeof v=="string"?v:v.label})]}),renderInput:C=>l.jsx(x.TextField,{...C,label:i,placeholder:s,size:"small",error:f,helperText:p,InputLabelProps:{shrink:!!r||!!s,sx:{color:H.text.secondary,"&.Mui-focused":{color:H.text.primary},"&.Mui-error":{color:H.error.main}}},InputProps:{...C.InputProps,endAdornment:l.jsxs(l.Fragment,{children:[h?l.jsx(x.CircularProgress,{size:20}):null,C.InputProps.endAdornment]})}}),onChange:(C,v)=>o(v)})]}),Ht=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>l.jsx(x.FormControlLabel,{control:l.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})}),ac=({labelText:e,label:t,value:r=[],options:n,row:i=!1,onChange:a,labelPosition:s="top",labelVariant:o="subtitle2",helperText:c,error:d,groupPadding:h=1.5,itemGap:f=1,disabled:p=!1})=>{const y=typeof i=="number"&&i>0,k=y?i:12,m=i===!0,C=i===!1&&!y,v=(S,D)=>{const j=Array.isArray(r)?[...r]:[];D?j.includes(S)||a([...j,S]):a(j.filter(E=>E!==S))};return l.jsxs(x.FormControl,{error:d,disabled:p,sx:S=>{var D;return{display:"flex",flexDirection:"column",px:S.spacing(h),borderRadius:((D=S.shape)==null?void 0:D.borderRadius)||8,mx:-2.5,backgroundColor:S.palette.background.paper}},children:[s==="top"&&e&&l.jsx(x.Typography,{variant:o,sx:S=>({color:S.palette.text.primary,mb:.5,fontSize:S.typography.fontSize,fontWeight:500}),children:e}),t&&l.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&&l.jsx(x.Box,{sx:S=>({display:"grid",gridTemplateColumns:`repeat(${k}, 1fr)`,gap:S.spacing(f),mt:0}),children:n.map(S=>{const D=Array.isArray(r)&&r.includes(S.value);return l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:D,onChange:j=>v(S.value,j.target.checked),disabled:p,sx:j=>({color:j.palette.text.secondary,"&.Mui-checked":{color:j.palette.primary.main}})}),label:S.label,sx:j=>({m:0,"& .MuiFormControlLabel-label":{color:j.palette.text.primary,fontSize:12}})},String(S.value))})}),m&&l.jsx(x.Box,{sx:S=>({display:"flex",flexDirection:"row",flexWrap:"wrap",gap:S.spacing(f),alignItems:"center",mt:0}),children:n.map(S=>{const D=Array.isArray(r)&&r.includes(S.value);return l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:D,onChange:j=>v(S.value,j.target.checked),disabled:p,sx:j=>({color:j.palette.text.secondary,"&.Mui-checked":{color:j.palette.primary.main}})}),label:S.label,sx:j=>({m:0,"& .MuiFormControlLabel-label":{color:j.palette.text.primary,fontSize:12}})},String(S.value))})}),C&&l.jsx(x.Box,{sx:S=>({display:"flex",flexDirection:"column",gap:S.spacing(f),alignItems:"flex-start",mt:0}),children:n.map(S=>{const D=Array.isArray(r)&&r.includes(S.value);return l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:D,onChange:j=>v(S.value,j.target.checked),disabled:p,sx:j=>({color:j.palette.text.secondary,"&.Mui-checked":{color:j.palette.primary.main}})}),label:S.label,sx:j=>({m:0,"& .MuiFormControlLabel-label":{color:j.palette.text.primary,fontSize:12}})},String(S.value))})}),c&&l.jsx(x.FormHelperText,{sx:{mt:.5},children:c})]})},di=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>l.jsx(x.FormControlLabel,{control:l.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:c,error:d,groupPadding:h=1.5,itemGap:f=1})=>l.jsxs(x.FormControl,{error:d,sx:p=>{var y;return{display:"flex",flexDirection:"column",px:p.spacing(h),borderRadius:((y=p.shape)==null?void 0:y.borderRadius)||8,mx:-2.5,backgroundColor:p.palette.background.paper}},children:[s==="top"&&e&&l.jsx(x.Typography,{variant:o,sx:p=>({color:p.palette.text.primary,mb:.5,fontSize:p.typography.fontSize,fontWeight:500}),children:e}),t&&l.jsx(x.FormLabel,{sx:p=>({color:p.palette.text.secondary,mb:.5,mx:1,fontSize:p.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:p.palette.text.primary},"&.Mui-error":{color:p.palette.error.main}}),children:t}),l.jsx(x.RadioGroup,{row:i,value:r,onChange:p=>a(p.target.value),sx:p=>({display:"flex",flexDirection:i?"row":"column",gap:p.spacing(f),alignItems:i?"center":"flex-start"}),children:n.map(p=>l.jsx(x.FormControlLabel,{value:p.value,control:l.jsx(x.Radio,{size:"small",sx:y=>({color:y.palette.text.secondary,"&.Mui-checked":{color:y.palette.primary.main}})}),label:l.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",gap:0},children:[l.jsx(x.Typography,{variant:"body2",sx:{color:"#1a1a1a",fontSize:12,fontWeight:400,lineHeight:1.5},children:p.label}),p.description&&l.jsx(x.Typography,{variant:"caption",sx:{color:"#1a1a1a",fontSize:10,fontWeight:300,lineHeight:1.5},children:p.description})]}),sx:{m:0,gap:.5,"& .MuiFormControlLabel-label":{marginLeft:0},"& .MuiRadio-root":{alignSelf:"flex-start",marginTop:0}}},String(p.value)))}),c&&l.jsx(x.FormHelperText,{sx:{mt:.5},children:c})]}),cs=({labelPosition:e="inner",labelVariant:t="subtitle2",label:r,sx:n,...i})=>l.jsxs(x.Box,{children:[e==="top"&&r&&l.jsx(x.Typography,{variant:t,sx:{color:"#111827",mb:.5},children:r}),l.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}})]}),sc=({labelText:e,labelVariant:t="subtitle2",hasError:r,sx:n,label:i,...a})=>{const s=!!e;return l.jsxs(x.Box,{children:[s&&l.jsx(x.Typography,{variant:t,sx:{color:H.text.primary,mb:.5,fontWeight:500},children:e}),l.jsx(x.TextField,{fullWidth:!0,multiline:!0,minRows:3,size:"small",...a,label:s?void 0:i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:H.background.paper,borderRadius:"8px","& fieldset":{borderColor:H.divider},"&:hover fieldset":{borderColor:Ge[300]},"&.Mui-focused fieldset":{borderColor:Ge[400]},"&.Mui-error fieldset":{borderColor:H.error.main}},"& .MuiInputBase-input":{color:H.text.primary,fontSize:14},"& .MuiFormLabel-root":{color:H.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:H.text.primary},"& .MuiFormHelperText-root":{color:r?H.error.main:H.text.secondary},...n}})]})},oc=({title:e,subtitle:t,actions:r,align:n="left",sx:i})=>l.jsxs(x.Box,{sx:a=>({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:a.spacing(1),py:a.spacing(1),...i}),children:[l.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",minWidth:0,flex:1,textAlign:n},children:[e&&l.jsx(x.Typography,{variant:"h6",sx:a=>({color:a.palette.text.primary,fontSize:12,fontWeight:600,lineHeight:1.3}),children:e}),t&&l.jsx(x.Typography,{variant:"body2",sx:a=>({color:a.palette.text.secondary,mt:e?.5:0,fontSize:12,fontWeight:300}),children:t})]}),r&&l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:r})]}),yn=ut(l.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),lc=()=>l.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("g",{"clip-path":"url(#clip0_5814_24904)",children:l.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"})}),l.jsx("defs",{children:l.jsx("clipPath",{id:"clip0_5814_24904",children:l.jsx("rect",{width:"24",height:"24",fill:"white"})})})]});function cc({items:e,getId:t,onReorder:r,header:n,disabled:i,sx:a,getText:s,showIndex:o=!0,showLeftIcon:c=!0,renderItem:d,chipText:h,helperText:f,emptyStateText:p,emptyStateButtonText:y="Add Phase",onEmptyStateButtonClick:k,emptyStateSx:m}){const[C,v]=$.useState(null),[S,D]=$.useState(null),j=u=>P=>{if(!i){v(u),P.dataTransfer.effectAllowed="move";try{P.dataTransfer.setData("text/plain",String(t(e[u])))}catch{}}},E=u=>P=>{i||(P.preventDefault(),D(u),P.dataTransfer.dropEffect="move")},R=u=>P=>{if(i)return;if(P.preventDefault(),C===null||C===u){v(null),D(null);return}const L=[...e],[A]=L.splice(C,1);L.splice(u,0,A),v(null),D(null),r(L)},z=()=>{v(null),D(null)},_=e.length===0,I=_&&(p||k!==void 0);return l.jsxs(x.Box,{role:"list",sx:u=>({display:"flex",flexDirection:"column",gap:u.spacing(1),...a}),children:[n,!_&&l.jsx(x.Divider,{sx:{mt:-.5,mb:1,dividerColor:"#EBEBEB"}}),I?l.jsxs(x.Box,{sx:u=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"200px",padding:u.spacing(4),backgroundColor:u.palette.mode==="dark"?"#000000":H.background.paper,border:`2px dashed ${u.palette.mode==="dark"?"#FFFFFF":H.divider}`,borderRadius:"8px",textAlign:"center",...m}),children:[p&&l.jsx(x.Typography,{variant:"body1",sx:u=>({color:u.palette.text.secondary,fontSize:"14px",fontWeight:400,lineHeight:1.5,mb:k?2:0,maxWidth:"400px"}),children:p}),k&&l.jsx(x.Button,{variant:"outlined",startIcon:l.jsx(yn,{}),onClick:k,disabled:i,sx:u=>({mt:p?0:2,backgroundColor:u.palette.mode==="dark"?`${u.palette.primary.main}1A`:`${u.palette.primary.main}0D`,borderColor:u.palette.primary.main,color:u.palette.primary.main,"&:hover":{backgroundColor:u.palette.mode==="dark"?`${u.palette.primary.main}33`:`${u.palette.primary.main}1A`,borderColor:u.palette.primary.main},borderRadius:"6px",textTransform:"none",fontSize:"14px",fontWeight:500,px:2,py:1}),children:y})]}):e.map((u,P)=>{const L=C===P,A=S===P&&C!==null&&C!==P;return l.jsx(x.Box,{role:"listitem",draggable:!i,onDragStart:j(P),onDragOver:E(P),onDrop:R(P),onDragEnd:z,sx:B=>({userSelect:"none",cursor:i?"default":"grab",backgroundColor:"#F8F8FA",border:`1px solid ${A?B.palette.primary.main:"#EBEBEB"}`,borderRadius:"8px",padding:B.spacing(1),opacity:L?.6:1,boxShadow:A?`0 0 0 2px ${B.palette.primary.main}33`:"none"}),children:d?d(u,L):l.jsxs(x.Box,{sx:B=>({display:"flex",alignItems:"center",gap:B.spacing(1),minWidth:0}),children:[c&&l.jsx(lc,{}),o&&l.jsxs(x.Typography,{variant:"body2",sx:B=>({fontWeight:600,fontSize:14,color:`${B.palette.text.primary}`,flex:"0 0 auto"}),children:[P+1,"."]}),(()=>{const B=typeof h=="function"?h(u,P):h;return B?l.jsx(x.Chip,{label:B,sx:{borderRadius:"4px",p:"12px 3px"},size:"small"}):null})(),l.jsx(x.Typography,{variant:"body2",sx:B=>({fontSize:12,fontWeight:500,color:`${B.palette.text.primary}90`,flex:1,minWidth:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),children:s?s(u):""})]})},String(t(u)))}),!_&&f?typeof f=="string"?l.jsx(x.Typography,{variant:"caption",sx:u=>({color:`${u.palette.text.primary}60`}),children:f}):f:null]})}const Bh=xt(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:H.primary.main}})),Vh=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const i=a=>{const{active:s,completed:o,icon:c}=a;return o?l.jsx(x.Box,{sx:{width:24,height:24,border:`1.2px solid ${H.primary.main}`,borderRadius:"50%",backgroundColor:H.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx(os,{sx:{fontSize:16,fontWeight:600}})}):s?l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${H.primary.main}`,backgroundColor:Et(H.primary.main,.2),color:H.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:c}):l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:H.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:c})};return l.jsx(x.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(Bh,{}),sx:{"& .MuiStepConnector-vertical":{my:-1.1},"& .MuiStepLabel-label":{fontSize:14,color:H.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((a,s)=>l.jsxs(x.Step,{onClick:()=>r==null?void 0:r(s),completed:s<t,children:[l.jsx(x.StepLabel,{StepIconComponent:i,children:l.jsx(x.Typography,{sx:{fontSize:12,fontWeight:500,color:s===t?H.primary.main:H.text.primary},children:a.label})}),s!==e.length-1&&l.jsx(x.Divider,{sx:{ml:4.2,borderColor:H.divider}})]},s))})},us=({colorKey:e="primary",colorHex:t,tone:r="soft",bgAlpha:n=.12,borderAlpha:i=.24,sx:a,...s})=>l.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})}),Nh=xt(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:H.primary.main}})),Lh=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const[i,a]=$.useState(null),s=o=>{const{active:c,completed:d,icon:h}=o;return d?l.jsx(x.Box,{sx:{width:24,height:24,border:`1.2px solid ${H.primary.main}`,borderRadius:"50%",backgroundColor:H.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:l.jsx(os,{sx:{fontSize:16,fontWeight:600}})}):c?l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${H.primary.main}`,backgroundColor:Et(H.primary.main,.2),color:H.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3,overflow:"hidden"},children:h}):l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:H.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3},children:h})};return l.jsx(x.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(Nh,{}),sx:{"& .MuiStepConnector-vertical":{my:-3.5},"& .MuiStepLabel-label":{fontSize:14,color:H.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((o,c)=>l.jsxs(x.Step,{onMouseEnter:()=>a(c),onMouseLeave:()=>a(null),onClick:()=>r==null?void 0:r(c),completed:c<t,children:[l.jsxs(x.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[l.jsxs(x.StepLabel,{StepIconComponent:s,children:[l.jsxs(x.Box,{sx:{display:"flex",gap:1,alignItems:"center"},children:[l.jsx(x.Typography,{sx:{fontSize:14,fontWeight:500,color:c===t?H.primary.main:H.text.primary},children:o.label}),l.jsx(us,{size:"small",colorHex:c<t?H.success.main:c===t?"#973B00":H.text.primary,label:c<t?"Completed":c===t?"In progress":"Not started"})]}),l.jsx(x.Typography,{sx:{fontSize:12,fontWeight:400,color:`${H.text.primary}60`,mt:.5,width:"80%"},children:o.description})]}),i===c&&l.jsx(x.Button,{sx:{display:c>t?"none":"block"},variant:c<t?"outlined":"contained",size:"small",color:"primary",children:c<t?"Edit":c===t?"Complete":""})]}),c!==e.length-1&&l.jsx(x.Divider,{sx:{ml:4.2,borderColor:H.divider}})]},c))})},qh=ut(l.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"),Wh=({variant:e="list",title:t,subtitle:r,text:n,items:i=[],icon:a,colorHex:s,sx:o})=>{const c=s||H.info.main,d=Et(c,.08),h=Et(c,.08),f=a??l.jsx(qh,{sx:{color:c,fontSize:18}});return e==="inlineInfo"?l.jsxs(x.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:d,border:`1px solid ${h}`,boxShadow:"none",...o},children:[l.jsx(x.Box,{sx:{display:"flex",alignItems:"center"},children:f}),l.jsx(x.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:c},children:n})]}):e==="inline"?l.jsx(x.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:d,border:`1px solid ${h}`,boxShadow:"none",...o},children:l.jsx(x.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:c},children:n})}):e==="listWithHeader"?l.jsxs(x.Card,{sx:{p:2,boxShadow:"none",borderRadius:"6px",backgroundColor:d,border:`1px solid ${h}`,...o},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[f,l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:600,color:c,fontSize:14,lineHeight:1.3},children:t})]}),r&&l.jsx(x.Typography,{variant:"body2",sx:{mt:.5,color:c,fontSize:10,lineHeight:1.3},children:r}),l.jsx(x.List,{sx:{pl:5,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:c},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:400,lineHeight:"18px",color:c,my:-.5}},children:i.map((p,y)=>l.jsx(x.ListItem,{sx:{py:0},children:l.jsx(x.ListItemText,{primary:p})},y))})]}):l.jsx(x.Card,{sx:{p:"11px",borderRadius:"8px",backgroundColor:d,border:`0.5px solid ${h}`,boxShadow:"none",...o},children:l.jsx(x.List,{sx:{pl:4,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:c},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:600,lineHeight:"18px",color:c,my:-.5}},children:i.map((p,y)=>l.jsx(x.ListItem,{sx:{py:0},children:l.jsx(x.ListItemText,{primary:p})},y))})})},uc=({value:e,onChange:t,items:r,ariaLabel:n,sx:i,tabSx:a})=>l.jsxs(x.Box,{children:[l.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 c=typeof s.value=="string"||typeof s.value=="number"?s.value:o;return l.jsx(x.Tab,{value:c,disabled:s.disabled,label:l.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(c))})}),r.map((s,o)=>{const c=typeof s.value=="string"||typeof s.value=="number"?s.value:o,d=s.content??(typeof s.value=="object"?s.value:null);return d&&e===c?l.jsx(x.Box,{sx:{mt:1},children:d},`panel-${c}`):null})]}),Uh=ut(l.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"),pc=({name:e,columns:t,initialRow:r,addLabel:n,rowDeletable:i=!0,control:a,sx:s,addActions:o,emptyTitle:c="No items configured",emptySubtitle:d="Click 'Add' to get started.",emptyCardSx:h,setValue:f,rowSelectionMode:p,rowSelectionKey:y})=>{const{fields:k,append:m,remove:C}=hu({control:a,name:e}),v=$.useMemo(()=>{if(y)return y;const I=t.find(u=>u.type==="rowSelect");return I==null?void 0:I.key},[t,y]),S=fl({control:a,name:e})||[],D=$.useMemo(()=>{if(!v)return{};const I={};return S.forEach((u,P)=>{I[P]=!!(u!=null&&u[v])}),I},[S,v]),j=$.useCallback(I=>D[I]===!0,[D]),E=$.useCallback((I,u)=>{if(!f||!v)return;const P=`${e}.${I}.${v}`;p==="single"&&u&&S.forEach((L,A)=>{if(A!==I){const B=`${e}.${A}.${v}`;f(B,!1,{shouldDirty:!0})}}),f(P,u,{shouldDirty:!0})},[e,v,p,f,S]),R=I=>{const u={...I||r};t.forEach(P=>{P.value!==void 0&&u[P.key]===void 0&&(u[P.key]=typeof P.value=="function"?P.value(u,k.length):P.value)}),m(u)},z=$.useMemo(()=>t.reduce((u,P)=>{if(P.width==="auto"||P.width===void 0)return u+120;const L=typeof P.width=="number"?P.width:typeof P.width=="string"&&parseInt(P.width)||160;return u+L},0)+(i?100:0),[t,i]),_=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 l.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?l.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:[l.jsx(x.Typography,{variant:"subtitle1",sx:I=>({color:I.palette.primary.main,fontWeight:600,mb:.5,fontSize:14}),children:c}),l.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,u)=>l.jsx(x.Button,{variant:"outlined",size:"small",startIcon:l.jsx(yn,{}),sx:{mr:1,mt:1},onClick:()=>R(I.template),children:I.label},`empty-add-${u}`)):n&&l.jsx(x.Button,{variant:"outlined",size:"small",startIcon:l.jsx(yn,{}),onClick:()=>R(),children:n})]}):l.jsxs(l.Fragment,{children:[l.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,u)=>l.jsx(x.Button,{variant:u===0?"contained":"outlined",size:"small",startIcon:l.jsx(yn,{}),onClick:()=>R(I.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:I.label},`add-${u}`)):n&&l.jsx(x.Button,{variant:"contained",size:"small",startIcon:l.jsx(yn,{}),onClick:()=>R(),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})}),l.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:l.jsx(x.TableContainer,{sx:{width:"max-content",minWidth:"100%"},children:l.jsxs(x.Table,{stickyHeader:!0,sx:{minWidth:`${z||650}px`},children:[l.jsx(x.TableHead,{children:l.jsxs(x.TableRow,{children:[t.map(I=>l.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,..._(I)},children:I.header},I.key)),i&&l.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"})]})}),l.jsx(x.TableBody,{children:k.map((I,u)=>{const P=j(u),L=p&&!P;return l.jsxs(x.TableRow,{children:[t.map(A=>{var ce;const B=`${e}.${u}.${A.key}`,Y=A.type==="rowSelect"||A.key===v,ae=Y?!1:L?!0:typeof A.disabled=="function"?A.disabled(I,u):!!A.disabled;if(A.type==="index"){const Q=A.indexFormat?A.indexFormat(u):`#${u+1}`;return l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",textAlign:((ce=A.cellSx)==null?void 0:ce.textAlign)||"center",..._(A),...A.cellSx},children:Q},A.key)}if(A.value!==void 0&&A.editable===!1){const Q=typeof A.value=="function"?A.value(I,u):A.value;return l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",..._(A),...A.cellSx},children:Q},A.key)}const de=A.endorsementText?typeof A.endorsementText=="function"?A.endorsementText(I,u):A.endorsementText:void 0;return l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",..._(A),...A.cellSx},children:A.type==="rowSelect"||Y&&A.type==="checkbox"?l.jsx(Re,{name:B,control:a,defaultValue:!1,render:({field:Q})=>l.jsx(Ht,{label:"",checked:!!Q.value,disabled:!1,onChange:q=>{Q.onChange(q),E(u,q)},sx:A.sx})}):A.type==="checkbox"?l.jsx(Re,{name:B,control:a,render:({field:Q})=>l.jsx(Ht,{label:"",checked:!!Q.value,disabled:ae,onChange:Q.onChange,sx:A.sx})}):A.type==="select"?l.jsx(Re,{name:B,control:a,render:({field:Q})=>l.jsx($i,{...Q,fullWidth:!0,disabled:ae,options:A.options||[],size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...A.sx},helperText:A.helperText,required:A.required})}):A.type==="date"?l.jsx(Re,{name:B,control:a,defaultValue:A.value!==void 0?typeof A.value=="function"?A.value(I,u):A.value:void 0,render:({field:Q})=>($.useEffect(()=>{if(f&&(Q.value===void 0||Q.value===null||Q.value==="")&&A.value!==void 0){const q=typeof A.value=="function"?A.value(I,u):A.value;f(B,q,{shouldValidate:!1})}},[B,Q.value,A.value,I,u,f]),l.jsx(cs,{...Q,fullWidth:!0,disabled:ae,size:"small",placeholder:A.placeholder||"DD/MM/YYYY",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...A.sx},helperText:A.helperText,required:A.required}))}):l.jsx(Re,{name:B,control:a,defaultValue:A.value!==void 0?typeof A.value=="function"?A.value(I,u):A.value:void 0,render:({field:Q})=>($.useEffect(()=>{if(f&&(Q.value===void 0||Q.value===null||Q.value==="")&&A.value!==void 0){const q=typeof A.value=="function"?A.value(I,u):A.value;f(B,q,{shouldValidate:!1})}},[B,Q.value,A.value,I,u,f]),l.jsx(vt,{...Q,fullWidth:!0,type:A.type==="number"?"number":"text",placeholder:A.placeholder,disabled:ae,size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...A.sx},helperText:A.helperText,required:A.required,endorsementText:de,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&&l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",px:1.5,py:0,borderBottom:"1px solid #E5E6EB",textAlign:"center"},children:l.jsx(x.IconButton,{size:"small",color:"error",onClick:()=>C(u),sx:{width:"20px",height:"20px"},children:l.jsx(Uh,{sx:{fontSize:"20px"}})})})]},I.id)})})]})})})]})})},dc=({name:e,control:t,items:r,sx:n,cardSx:i})=>l.jsx(x.Box,{sx:{display:"flex",flexDirection:"column",gap:1,...n},children:r.map(a=>{const s=!!a.leftAction,o=!!a.rightAction,c=!!(a.header||a.chipText),d=a.leftAction,h=a.rightAction;return l.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&&l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexShrink:0},children:l.jsx(Re,{name:d.name,control:t,defaultValue:!1,render:({field:f})=>l.jsx(Ht,{label:d.label||"",checked:!!f.value,onChange:f.onChange,sx:{margin:0}})})}),c&&l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flex:s||o?1:"none",ml:s?1:0},children:[a.header&&l.jsx(x.Typography,{variant:"body2",sx:{fontSize:"12px",color:"rgba(0,0,0,0.87)",fontWeight:400},children:a.header}),a.chipText&&l.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&&l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexShrink:0,ml:"auto"},children:l.jsx(Re,{name:h.name,control:t,defaultValue:!1,render:({field:f})=>l.jsx(di,{label:h.label,checked:!!f.value,onChange:f.onChange,sx:{margin:0}})})}),!s&&!o&&!c&&l.jsx(x.Box,{sx:{width:"100%",height:"100%"}})]},a.id)})}),fc=ut(l.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"),ta=ut(l.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"),Hh=[{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"}],ra=[{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"}],Kh=({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,c]=$.useState(e.seasonalMonths||[]),d=p=>{const y=o.includes(p)?o.filter(k=>k!==p):[...o,p];c(y),r(e.id,{seasonalMonths:y})},h=(()=>{const p=e.min||0;return p<0?"Min cannot be negative.":Number.isInteger(p)?null:"Use whole periods."})(),f=(()=>{const p=e.min||0,y=e.max||0;return Number.isInteger(y)?y<p?"Max must be ≥ Min.":null:"Use whole periods."})();return l.jsx(x.Card,{sx:{border:"2px solid",borderColor:H.divider,position:"relative",...s},children:l.jsxs(x.CardContent,{sx:{p:2},children:[l.jsxs(x.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs(x.Box,{sx:{display:"flex",gap:.5,alignItems:"center"},children:[l.jsx(x.Box,{children:l.jsx(lc,{})}),l.jsx(us,{label:t+1,size:"small"})]}),l.jsx(x.IconButton,{onClick:()=>n(e.id),disabled:a,sx:{color:H.error.main,"&:hover":{bgcolor:Ge[50]}},size:"small",children:l.jsx(fc,{fontSize:"small"})})]}),l.jsx(x.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:l.jsxs(x.Box,{sx:{flex:1,display:"grid",gap:1.5},children:[l.jsxs(x.Box,{sx:{display:"flex",gap:2,mb:.5},children:[l.jsx(x.Box,{sx:{flex:.5,display:"grid",gap:1},children:l.jsx($i,{labelText:"Phase type",value:e.type,onChange:p=>r(e.id,{type:p.target.value}),options:Hh,disabled:a})}),l.jsxs(x.Box,{sx:{display:"grid",gap:1,flex:.5},children:[l.jsx(x.Typography,{variant:"caption",sx:{fontSize:"12px",color:H.text.secondary},children:"Allocation priority (1–9)"}),l.jsx(vt,{type:"number",value:e.priority||5,onChange:p=>{const y=parseInt(p.target.value)||5;r(e.id,{priority:Math.min(9,Math.max(1,y))})},inputProps:{min:1,max:9},disabled:a,sx:{textAlign:"center"}})]})]}),l.jsxs(x.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[l.jsx(x.Box,{sx:{display:"grid",gap:1},children:l.jsx(vt,{labelText:"Min periods",type:"number",value:e.min||0,onChange:p=>{const y=parseInt(p.target.value)||0;r(e.id,{min:y,...e.lockLength?{max:y}:{}})},inputProps:{min:0},disabled:a,error:!!h,helperText:h||void 0})}),l.jsx(x.Box,{sx:{display:"grid",gap:1},children:l.jsx(vt,{labelText:"Max periods",type:"number",value:e.lockLength?e.min:e.max||0,onChange:p=>r(e.id,{max:parseInt(p.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}:{}})})]}),l.jsxs(x.Box,{sx:{display:"flex",gap:3},children:[l.jsx(Ht,{label:"Lock length (fix to Min)",checked:e.lockLength||!1,onChange:p=>r(e.id,{lockLength:p,...p?{max:e.min}:{}}),disabled:a}),l.jsx(Ht,{label:"Residual fill",checked:e.residualFill||!1,onChange:p=>r(e.id,{residualFill:p}),disabled:a})]}),e.type==="principal-moratorium"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(ta,{sx:{fontSize:14,color:H.text.secondary,cursor:"help"}})})]}),l.jsx(wr,{value:e.interestPolicy||"accrue-capitalize",onChange:p=>r(e.id,{interestPolicy:p}),options:ra,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&l.jsx(x.Typography,{variant:"caption",sx:{color:H.text.secondary,mt:1},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]}),e.type==="balloon"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1.5},children:[l.jsx(wr,{value:e.balloonType||"percent",onChange:p=>r(e.id,{balloonType:p}),options:[{label:"Amount",value:"amount"},{label:"Percent",value:"percent"}],row:!0,labelPosition:"none"}),e.balloonType==="amount"&&l.jsx(vt,{labelText:"Balloon Amount",type:"number",value:e.balloonAmount||"",onChange:p=>r(e.id,{balloonAmount:parseFloat(p.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.balloonType==="percent"&&l.jsx(vt,{labelText:"Balloon Percent",type:"number",value:e.balloonPercent||"",onChange:p=>r(e.id,{balloonPercent:parseFloat(p.target.value)||0}),placeholder:"Enter percent",inputProps:{max:100},disabled:a})]}),e.type==="bullet"&&l.jsx(x.Typography,{variant:"caption",sx:{color:H.text.secondary},children:"Principal at maturity"}),e.type==="step-up-down"&&l.jsxs(x.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[l.jsx(vt,{labelText:"Step Percent",type:"number",value:e.stepPercent||"",onChange:p=>r(e.id,{stepPercent:parseFloat(p.target.value)||0}),placeholder:"e.g., 10",disabled:a}),l.jsx(vt,{labelText:"Every N periods",type:"number",value:e.stepEveryN||"",onChange:p=>r(e.id,{stepEveryN:parseInt(p.target.value)||0}),placeholder:"e.g., 6",disabled:a})]}),e.type==="seasonal-skips"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1.5},children:[l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Skip Months"}),l.jsx(x.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:i.map(p=>l.jsx(x.Chip,{label:p,size:"small",onClick:()=>!a&&d(p),sx:{cursor:a?"default":"pointer",bgcolor:o.includes(p)?H.primary.main:"transparent",color:o.includes(p)?H.primary.contrastText:H.text.primary,border:`1px solid ${H.divider}`,"&:hover":{bgcolor:o.includes(p)?Ge[600]:Ge[50]}}},p))})]}),l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(ta,{sx:{fontSize:14,color:H.text.secondary,cursor:"help"}})})]}),l.jsx(wr,{value:e.interestPolicy||"accrue-capitalize",onChange:p=>r(e.id,{interestPolicy:p}),options:ra,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&l.jsx(x.Typography,{variant:"caption",sx:{color:H.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]}),e.type==="custom-fixed"&&l.jsx(vt,{labelText:"Fixed Installment Amount",type:"number",value:e.customAmount||"",onChange:p=>r(e.id,{customAmount:parseFloat(p.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.type==="payment-holiday"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(ta,{sx:{fontSize:14,color:H.text.secondary,cursor:"help"}})})]}),l.jsx(wr,{value:e.holidayInterestTreatment||"accrue-capitalize",onChange:p=>r(e.id,{holidayInterestTreatment:p}),options:ra,labelPosition:"none"}),e.holidayInterestTreatment==="accrue-forgive"&&l.jsx(x.Typography,{variant:"caption",sx:{color:H.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]})})]})})};async function hc(e,t,r,n){try{const{endpoint:i,method:a="GET",valueField:s="value",labelField:o="label",headers:c={},params:d={},body:h,transform:f,passThroughFields:p}=e;let y=i;if(t&&!i.startsWith("http")&&(y=`${t}${i.startsWith("/")?i:`/${i}`}`),n){const j=/\{([^}]+)\}/g;y=y.replace(j,(E,R)=>{const z=n[R];return z!=null?encodeURIComponent(String(z)):""}),y=y.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}const k=new URLSearchParams;Object.entries(d).forEach(([j,E])=>{E!=null&&k.append(j,String(E))}),k.toString()&&(y+=`${y.includes("?")?"&":"?"}${k.toString()}`);try{const j=/^https?:\/\//i.test(y),E=new URL(y,j?void 0:"http://local.placeholder"),R=Array.from(E.searchParams.entries());for(const[z,_]of R)(_===""||_==="undefined"||_==="null")&&E.searchParams.delete(z);j?y=E.toString():y=E.pathname+(E.search?E.search:""),y=y.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}catch{}const m={"Content-Type":"application/json",...r,...c},C={method:a,headers:m};(a==="POST"||a==="PUT")&&h&&(C.body=JSON.stringify(h));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(f)return f(Array.isArray(S)?S:S.data||S);const D=Array.isArray(S)?S:S.data||S;if(!Array.isArray(D))throw new Error("API response is not an array");return D.map(j=>{const E={label:j[o]||j.name||j.title||String(j[s]||""),value:j[s]||j.id||j.value||""},R=Array.isArray(p)?p:void 0;if(Array.isArray(R))for(const z of R)j[z]!==void 0&&(E[z]=j[z]);return E})}catch(i){throw console.error("API fetch error:",i),new Error(`Failed to fetch data: ${i instanceof Error?i.message:"Unknown error"}`)}}function mc(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 Ju({queryKey:s,queryFn:()=>{if(!e)throw new Error("API config is required");return hc(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 ps(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 Yh(e,t){const r=ps(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 ds=({field:e,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:s})=>{const o=r[e.name],c=!!o,[d,h]=$.useState(!1),f=$.useRef(!1),[p,y]=$.useState(!1),[k,m]=$.useState(!1),[C,v]=$.useState(!1),S=$.useRef(null),D=$.useRef(null),j=()=>{var re;const W=e.required;if(typeof W=="function")try{return!!W(a||{})}catch{return!1}if(W!==void 0)return!!W;const J=(re=e.validation)==null?void 0:re.required;if(typeof J=="function")try{return!!J(a||{})}catch{return!1}return J!==void 0?!!J:!1},E=W=>j()?`${W} *`:W,R=()=>{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 W=e.value;if(typeof W!="function"||!s)return;let J;try{J=W(a||{})}catch{return}const re=a?a[e.name]:void 0;if(z.current===void 0&&(z.current=J),re===void 0||re===z.current)try{s(e.name,J,{shouldValidate:!0,shouldDirty:!1}),z.current=J}catch{}},[JSON.stringify(Array.isArray(e.valueDeps)&&a?e.valueDeps.reduce((W,J)=>({...W,[J]:a[J]}),{}):a||{}),e.name]);const _=$.useMemo(()=>{const W=ps(e);return W&&Array.isArray(e.passThroughFields)&&(W.passThroughFields=e.passThroughFields),W},[e.apiConfig,e.api_endpoint,e.api_method,e.value_field,e.label_field,e.depends_on,e.conditional,e.passThroughFields]),I=$.useRef(null),u=_!=null&&_.dependsOn?a==null?void 0:a[_.dependsOn]:null,P=$.useMemo(()=>{if(!(_!=null&&_.dependsOn))return!1;const W=u,J=I.current,re=W!==J;return re&&(I.current=W),re},[_==null?void 0:_.dependsOn,u]),L=$.useMemo(()=>{const W=e.showWhen;if(typeof W=="function")try{return!!W(a||{})}catch{return!0}if(W&&typeof W=="object"){const J=W.field,re=W.equals,oe=W.in,le=J?(a||{})[J]:void 0;if(J&&typeof re<"u")return le===re;if(J&&Array.isArray(oe))return oe.includes(le)}return!0},[e.showWhen,a]),A=$.useCallback(()=>{const W=e.dynamicEndorsement;if(typeof W=="function")try{return W(a||{})}catch{return e.endorsementText}return e.endorsementText},[e,a]),B=$.useCallback(()=>{const W=e.endAdornment,J=e.endAdornmentSwitch,re=e.endAdornmentCheckbox;if(J)return l.jsx(Re,{name:J,control:t,defaultValue:e.endAdornmentSwitchDefault??!1,render:({field:oe})=>l.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(re)return l.jsx(Re,{name:re,control:t,defaultValue:e.endAdornmentCheckboxDefault??!1,render:({field:oe})=>l.jsx(Ht,{label:"",checked:oe.value||!1,onChange:oe.onChange,disabled:e.endAdornmentCheckboxDisabled,sx:e.endAdornmentCheckboxSx})});if(typeof W=="function")try{return W(a||{},{control:t,setValue:s})}catch{return}return W},[e,a,t,s]),Y=$.useMemo(()=>d&&gr(e)&&(!(_!=null&&_.dependsOn)||u),[d,e,_==null?void 0:_.dependsOn,u]),ae=$.useMemo(()=>{const W={};if(!a)return W;const J=(_==null?void 0:_.endpoint)||(e==null?void 0:e.api_endpoint);if(J&&typeof J=="string"){const re=J.match(/\{([^}]+)\}/g)||[];for(const oe of re){const le=oe.slice(1,-1),ve=a[le];ve!==void 0&&(W[le]=ve)}}if(_!=null&&_.dependsOn){const re=_.dependsOn,oe=a[re];oe!==void 0&&(W[re]=oe)}return W},[_==null?void 0:_.endpoint,e==null?void 0:e.api_endpoint,_==null?void 0:_.dependsOn,a]),{data:de=[],isLoading:ce,error:Q}=mc(_,n,i,ae,Y),q=$.useCallback(()=>{gr(e)&&!f.current&&(f.current=!0,h(!0))},[e]),G=$.useCallback(()=>{gr(e)&&!f.current&&(f.current=!0,h(!0))},[e]);$.useEffect(()=>{if(gr(e)&&!f.current){const W=a==null?void 0:a[e.name];W!=null&&W!==""&&(f.current=!0,h(!0))}},[e,a]),$.useEffect(()=>{gr(e)&&(_!=null&&_.dependsOn)&&P&&f.current&&(f.current=!1,h(!1))},[P,_==null?void 0:_.dependsOn]);const ue=$.useCallback(()=>gr(e)?de:e.type==="select"||e.type==="toggle"||e.type==="radio"||e.type==="autocomplete"?e.options||[]:[],[e,de]),fe=()=>{var W,J,re,oe,le,ve;switch(e.type){case"title":return l.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 l.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 X=e.actionName,Ie=e.actionComponent,We=e.actionLabel,Qe=w=>l.jsx(oc,{title:e.title||e.label,subtitle:e.subtitle,align:e.align||"left",sx:e.sx,actions:w??e.actions}),gt=w=>{if(e.cardWrap){const N={...{px:2,py:1,boxShadow:"none",border:"1px solid #DDDDDD"},...e.cardSx};return l.jsx(x.Card,{sx:N,...e.cardProps,children:w})}return w};return gt(X&&Ie?l.jsx(Re,{name:X,control:t,defaultValue:e.value??!1,render:({field:w})=>Qe(Ie==="switch"?l.jsx(di,{label:We,checked:!!w.value,onChange:w.onChange}):l.jsx(Ht,{label:We||"",checked:!!w.value,onChange:w.onChange}))}):Qe());case"tabs":return l.jsx(Re,{name:e.name,control:t,defaultValue:e.defaultValue??(typeof((J=(W=e.items)==null?void 0:W[0])==null?void 0:J.value)=="string"||typeof((oe=(re=e.items)==null?void 0:re[0])==null?void 0:oe.value)=="number"?(ve=(le=e.items)==null?void 0:le[0])==null?void 0:ve.value:0),render:({field:w})=>{const b=e.items||[],N=b.map((ee,U)=>({label:ee.label,value:typeof ee.value=="string"||typeof ee.value=="number"?ee.value:U,content:ee.content,disabled:ee.disabled})),O=w.value,M=(()=>{if(typeof O=="string"||typeof O=="number"){const ee=b.findIndex((U,xe)=>typeof U.value=="string"||typeof U.value=="number"?U.value===O:xe===O);return ee>=0?ee:0}return Number(O)||0})(),Z=b[M]||{};return l.jsxs(x.Box,{children:[l.jsx(uc,{value:w.value,onChange:w.onChange,items:N,ariaLabel:e.ariaLabel||e.label,sx:e.sx,tabSx:e.tabSx}),Array.isArray(Z.fields)&&Z.fields.length>0&&(()=>{const ee=Z.fields,U=[];let xe=[];for(const ke of ee)ke.type==="section"&&xe.length>0?(U.push(xe),xe=[ke]):xe.push(ke);xe.length>0&&U.push(xe);const Ee={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 l.jsx(x.Box,{sx:{mt:1},children:U.map((ke,Me)=>{const Ne=ke.find(Je=>Je.type==="section"),Xe=(Ne==null?void 0:Ne.cardWrap)!==!1,Ot=l.jsx(l.Fragment,{children:ke.map(Je=>{const Ke=Je.showWhen;if(Ke)try{if(typeof Ke=="function"){if(!Ke(a||{}))return null}else if(typeof Ke=="object"){const Yt=Ke.field,xs=Ke.equals,gs=Ke.in,ys=Yt?(a||{})[Yt]:void 0;if(Yt&&typeof xs<"u"&&ys!==xs||Yt&&Array.isArray(gs)&&!gs.includes(ys))return null}}catch{}const pt=Math.min(Math.max(Je.col??12,1),12);return l.jsx(x.Box,{sx:{gridColumn:`span ${pt}`},children:l.jsx(ds,{field:Je,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:s})},Je.name)})});return Xe?l.jsx(x.Card,{sx:{...Ee,...(Ne==null?void 0:Ne.cardSx)||{}},...(Ne==null?void 0:Ne.cardProps)||{},children:Ot},`tab-group-${Me}`):l.jsx(x.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1},children:Ot},`tab-group-${Me}`)})})})()]})}});case"grid":const He=e.defaultRows||[];return l.jsx(Re,{name:e.name,control:t,defaultValue:He.length>0?He:R()||[],render:()=>l.jsx(pc,{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 l.jsx(dc,{name:e.name,control:t,items:e.items||[],sx:e.sx,cardSx:e.cardSx});case"dragdroplist":return l.jsx(Re,{name:e.name,control:t,defaultValue:e.items||[],render:({field:w})=>{const b=e,N=w.value||b.items||[],O=typeof b.getId=="function"?b.getId:typeof b.getId=="string"?ee=>ee[b.getId]:ee=>ee.id??ee._id??ee.key??String(ee),M=typeof b.getText=="function"?b.getText:typeof b.getText=="string"?ee=>ee[b.getText]??String(ee):ee=>ee.text??ee.label??ee.name??ee.title??String(ee),Z=(()=>{if(typeof b.chipText=="function")return b.chipText;if(typeof b.chipText=="string")return N.length>0&&N[0]&&b.chipText in N[0]?(ee,U)=>ee[b.chipText]??void 0:b.chipText})();return l.jsx(cc,{items:N,getId:O,onReorder:ee=>{w.onChange(ee)},header:b.header,disabled:e.disabled,sx:b.sx,chipText:Z,helperText:b.helperText||(c?o==null?void 0:o.message:void 0),getText:M,showIndex:b.showIndex!==!1,showLeftIcon:b.showLeftIcon!==!1,renderItem:b.renderItem})}});case"text":case"email":case"password":case"tel":case"textarea":return l.jsx(Re,{name:e.name,control:t,defaultValue:R(),render:({field:w})=>e.type==="textarea"?l.jsx(sc,{...w,labelText:e.labelPosition==="top"?E(e.label):void 0,label:e.labelPosition!=="top"?E(e.label):void 0,labelVariant:e.labelVariant,placeholder:e.placeholder,disabled:e.disabled,hasError:c,helperText:(o==null?void 0:o.message)||e.helperText}):l.jsx(vt,{...w,id:e.id,labelText:e.labelPosition==="top"?E(e.label):void 0,label:e.labelPosition!=="top"?E(e.label):void 0,endAdornment:B(),endorsementText:A(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:e.type==="password"?p?"text":"password":e.type,placeholder:e.placeholder,disabled:e.disabled,hasError:c,helperText:(o==null?void 0:o.message)||e.helperText,InputProps:e.type==="password"?{endAdornment:l.jsx(Xl,{position:"end",children:l.jsx(Gn,{"aria-label":"toggle password visibility",onClick:()=>y(b=>!b),edge:"end",children:p?l.jsx(Ao,{}):l.jsx(Fo,{})})})}:void 0})});case"number":return l.jsx(Re,{name:e.name,control:t,defaultValue:R(),render:({field:w})=>l.jsx(vt,{...w,id:e.id,labelText:e.labelPosition==="top"?E(e.label):void 0,label:e.labelPosition!=="top"?E(e.label):void 0,endAdornment:B(),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:c,helperText:(o==null?void 0:o.message)||e.helperText,inputProps:{min:e.min,max:e.max}})});case"select":const K=ue();return l.jsx(Re,{name:e.name,control:t,defaultValue:R(),render:({field:w})=>l.jsx($i,{labelText:e.labelPosition==="top"?E(e.label):void 0,label:e.labelPosition!=="top"&&e.labelPosition!=="none"?E(e.label):void 0,labelVariant:e.labelVariant,value:w.value,onChange:w.onChange,options:K,disabled:e.disabled||ce,placeholder:e.labelPosition==="inner"||e.labelPosition==="none"||!e.labelPosition?e.placeholder||(e.labelPosition==="none"?E(e.label):void 0):e.placeholder,loading:ce,error:c||!!Q,helperText:(o==null?void 0:o.message)||(Q==null?void 0:Q.message)||e.helperText,onOpen:q})});case"checkbox":return l.jsx(Re,{name:e.name,control:t,defaultValue:R(),render:({field:w})=>l.jsx(Ht,{label:E(e.label),checked:!!w.value,disabled:e.disabled,onChange:w.onChange})});case"toggle":return l.jsx(Re,{name:e.name,control:t,defaultValue:R(),render:({field:w})=>l.jsx(wr,{label:E(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:w.value,options:e.options||[],row:!0,onChange:w.onChange})});case"radio":return l.jsx(Re,{name:e.name,control:t,defaultValue:R(),render:({field:w})=>l.jsx(wr,{label:E(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:w.value,options:e.options||[],row:e.row===!0,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:w.onChange})});case"checkboxGroup":return l.jsx(Re,{name:e.name,control:t,defaultValue:R()||[],render:({field:w})=>l.jsx(ac,{label:E(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:Array.isArray(w.value)?w.value:[],options:e.options||[],row:e.row,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:w.onChange,disabled:e.disabled})});case"switch":return l.jsx(Re,{name:e.name,control:t,defaultValue:R(),render:({field:w})=>l.jsx(di,{label:E(e.label),checked:!!w.value,disabled:e.disabled,onChange:w.onChange})});case"autocomplete":const se=ue(),g=!!(e.disabled||ce||_!=null&&_.dependsOn&&!u);return l.jsx(Re,{name:e.name,control:t,defaultValue:R(),render:({field:w})=>{const b=w.value,N=e.multiple===!0,O=(_==null?void 0:_.valueField)||e.value_field||"value",M=(_==null?void 0:_.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[O]!==void 0)return U[O];if(U.value!==void 0)return U.value;if(U.id!==void 0)return U.id}}},ee=(()=>{if(N)return(Array.isArray(b)?b:[]).map(xe=>{const Ee=se.find(ke=>{const Me=Z(ke);return Me!==void 0&&Me===xe});return Ee||{[O]:xe,[M]:`Selected: ${xe}`,value:xe,label:`Selected: ${xe}`}});{if(b==null||b==="")return null;const U=se.find(xe=>{const Ee=Z(xe);return Ee!==void 0&&Ee===b});return U||{[O]:b,[M]:`Selected: ${b}`,value:b,label:`Selected: ${b}`}}})();return l.jsx(ic,{id:e.id,options:se,value:ee,multiple:N,labelText:e.labelPosition==="top"?E(e.label):void 0,label:e.labelPosition!=="top"?E(e.label):void 0,placeholder:g&&(_!=null&&_.dependsOn)&&!u?`Please select ${_.dependsOn.replace(/_/g," ")} first`:e.placeholder,labelVariant:e.labelVariant,disabled:g,loading:ce,error:c||!!Q,helperText:(o==null?void 0:o.message)||(Q==null?void 0:Q.message)||e.helperText||"",onOpen:G,noOptionsText:g&&(_!=null&&_.dependsOn)&&!u?`Please select ${_.dependsOn.replace(/_/g," ")} first`:ce?"Fetching data...":d&&!ce&&se.length===0?"No options available":"Click to load options",onChange:U=>{const xe=(_==null?void 0:_.valueField)||e.value_field||"value";if(N){const ke=(Array.isArray(U)?U:[]).map(Me=>typeof Me=="object"&&(Me[xe]||Me.value||Me.id)||Me);w.onChange(ke)}else{let Ee;U&&typeof U=="object"?Ee=U[xe]||U.value||U.id||U:Ee=U,w.onChange(Ee);const ke=e.selectedAssignments;if(ke&&U&&typeof U=="object")for(const[Me,Ne]of Object.entries(ke)){const Xe=U[Ne];if(Xe!==void 0&&typeof s=="function")try{s(Me,Xe,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!1})}catch{}}}}})}});case"date":return l.jsx(Re,{name:e.name,control:t,defaultValue:R(),render:({field:w})=>l.jsx(cs,{...w,id:e.name,label:E(e.label),labelPosition:e.labelPosition||"inner",labelVariant:e.labelVariant,disabled:e.disabled,error:c,helperText:o==null?void 0:o.message,inputProps:{min:e.minDate,max:e.maxDate}})});case"image":return l.jsx(Re,{name:e.name,control:t,defaultValue:R(),render:({field:w})=>{const b=w.value||e.defaultValue||e.src;if(b){const U=e.imageUploaded||{},xe=U.previewText||"Preview",Ee=U.removeText||"Remove",ke=U.saveText||"Save logo",Me=U.showSave!==void 0?U.showSave:!!(e.onSave||U.saveText),Ne=()=>{if(v(!0),typeof e.onPreview=="function")try{e.onPreview(b)}catch{}},Xe=()=>{w.onChange(""),typeof e.onRemove=="function"&&e.onRemove()},Ot=()=>{typeof e.onSave=="function"&&e.onSave({url:b,file:D.current||void 0})},Je=Ke=>{const pt=Ke.target.files&&Ke.target.files[0];if(pt){if(typeof e.onFileSelected=="function")try{e.onFileSelected(pt)}catch{}try{const Yt=URL.createObjectURL(pt);w.onChange(Yt)}catch{}D.current=pt,v(!1)}};return l.jsxs(x.Card,{sx:{display:"flex",alignItems:"center",gap:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",...U.cardSx},children:[l.jsx("input",{type:"file",ref:S,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:Je}),l.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[l.jsx(x.Box,{sx:{width:"30%",height:"10%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",background:"#FFFFFF",overflow:"hidden",...U.thumbnailSx},children:l.jsx("img",{src:b,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:"100%"}})}),l.jsxs(x.Box,{sx:{flexGrow:1},children:[l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:500,...U.fileNameSx},children:typeof b=="string"?b.split("/").pop():"Selected image"}),l.jsx(x.Typography,{sx:{fontSize:"10px",...U.fileMetaSx},children:"Image selected"})]}),l.jsxs(x.Box,{sx:{display:"flex",gap:1},children:[l.jsx(x.Button,{type:"button",sx:{...U.previewButtonSx},variant:"outlined",onClick:Ne,startIcon:l.jsx(Fo,{}),children:xe}),l.jsx(x.Button,{variant:"outlined",color:"error",onClick:Xe,sx:{...U.removeButtonSx},startIcon:l.jsx(Ao,{}),children:Ee}),Me&&l.jsx(x.Button,{variant:"contained",onClick:Ot,sx:{...U.saveButtonSx},children:ke})]})]}),l.jsxs(x.Dialog,{open:C,onClose:()=>v(!1),maxWidth:"md",fullWidth:!0,children:[l.jsx(x.DialogTitle,{children:U.previewTitle||"Image preview"}),l.jsx(x.DialogContent,{children:l.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:l.jsx("img",{src:b,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:380}})})}),l.jsxs(x.DialogActions,{children:[l.jsx(x.Button,{type:"button",variant:"outlined",onClick:()=>{var Ke;return(Ke=S.current)==null?void 0:Ke.click()},children:U.replaceText||"Replace logo"}),l.jsx(x.Button,{type:"button",variant:"contained",onClick:()=>v(!1),children:U.closeText||"Close"})]})]})]})}const N=e.imagePlaceholder||{},O=N.icon||"upload",M=S,Z=()=>{var U;try{(U=M.current)==null||U.click()}catch{}},ee=U=>{const xe=U.target.files&&U.target.files[0];if(xe){typeof e.onFileSelected=="function"&&e.onFileSelected(xe);try{const Ee=URL.createObjectURL(xe);w.onChange(Ee)}catch{}D.current=xe}};return l.jsxs(x.Card,{sx:{border:"1px dashed",borderColor:"#CCCCCC",boxShadow:"none",p:2,textAlign:"center",color:"primary.main",...N.sx},children:[l.jsx("input",{type:"file",ref:M,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:ee}),l.jsx(Gn,{sx:{borderRadius:"8px",...N.iconSx},children:O==="image"?l.jsx($h,{sx:{width:36,height:36,color:"primary.main"}}):l.jsx(pi,{sx:{width:36,height:36,color:"primary.main"}})}),l.jsx(x.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main",...N.titleSx},children:N.title||"Drag & Drop the image here"}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main",...N.subtitleSx},children:N.subtitle||""}),l.jsx(x.Button,{onClick:Z,sx:{my:2,...N.buttonSx},startIcon:l.jsx(pi,{}),variant:"contained",disabled:e.disabled,children:N.buttonText||"Upload File"}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,...N.helperTextSx},children:N.helperText||e.helperText||""})]})}});case"component":return l.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]),me=$.useCallback(async()=>{try{const W=a?a[e.name]:void 0;let J="";W==null?J="":Array.isArray(W)?J=W.join(", "):typeof W=="object"?J=JSON.stringify(W):J=String(W),await navigator.clipboard.writeText(J),m(!0),window.setTimeout(()=>m(!1),1200)}catch{}},[a,e.name]);return l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:.3},children:[l.jsx(x.Box,{sx:{flexGrow:1},children:L?fe():null}),pe&&l.jsx(Gn,{"aria-label":`copy ${e.label||e.name}`,onClick:me,size:"small",children:k?l.jsx(os,{fontSize:"small"}):l.jsx(Rh,{fontSize:"small"})})]})};var na,_o;function Gh(){if(_o)return na;_o=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),c=new e(s),d=new e(s);na={Cache:e,split:f,normalizePath:h,setter:function(v){var S=h(v);return c.get(v)||c.set(v,function(j,E){for(var R=0,z=S.length,_=j;R<z-1;){var I=S[R];if(I==="__proto__"||I==="constructor"||I==="prototype")return j;_=_[S[R++]]}_[S[R]]=E})},getter:function(v,S){var D=h(v);return d.get(v)||d.set(v,function(E){for(var R=0,z=D.length;R<z;)if(E!=null||!S)E=E[D[R++]];else return;return E})},join:function(v){return v.reduce(function(S,D){return S+(y(D)||r.test(D)?"["+D+"]":(S?".":"")+D)},"")},forEach:function(v,S,D){p(Array.isArray(v)?v:f(v),S,D)}};function h(v){return o.get(v)||o.set(v,f(v).map(function(S){return S.replace(a,"$2")}))}function f(v){return v.match(t)||[""]}function p(v,S,D){var j=v.length,E,R,z,_;for(R=0;R<j;R++)E=v[R],E&&(C(E)&&(E='"'+E+'"'),_=y(E),z=!_&&/^\d+$/.test(E),S.call(D,E,_,z,R,v))}function y(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 C(v){return!y(v)&&(k(v)||m(v))}return na}var _r=Gh(),ia,Ro;function Qh(){if(Ro)return ia;Ro=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,p)=>`${f}${f?p[0].toUpperCase()+p.slice(1).toLowerCase():p.toLowerCase()}`,"");return ia={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(" ")},ia}var aa=Qh(),Ln={exports:{}},$o;function Zh(){if($o)return Ln.exports;$o=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),c={},d=s,h=r(a),f=n(i);for(a.forEach(function(y){if(!f.has(y[0])||!f.has(y[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});d--;)c[d]||p(i[d],d,new Set);return o;function p(y,k,m){if(m.has(y)){var C;try{C=", node was:"+JSON.stringify(y)}catch{C=""}throw new Error("Cyclic dependency"+C)}if(!f.has(y))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(y));if(!c[k]){c[k]=!0;var v=h.get(y)||new Set;if(v=Array.from(v),k=v.length){m.add(y);do{var S=v[--k];p(S,f.get(S),m)}while(k);m.delete(y)}o[--s]=y}}}function t(i){for(var a=new Set,s=0,o=i.length;s<o;s++){var c=i[s];a.add(c[0]),a.add(c[1])}return Array.from(a)}function r(i){for(var a=new Map,s=0,o=i.length;s<o;s++){var c=i[s];a.has(c[0])||a.set(c[0],new Set),a.has(c[1])||a.set(c[1],new Set),a.get(c[0]).add(c[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 Xh=Zh();const Jh=Ya(Xh),em=Object.prototype.toString,tm=Error.prototype.toString,rm=RegExp.prototype.toString,nm=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",im=/^Symbol\((.*)\)(.*)$/;function am(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Po(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return am(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return nm.call(e).replace(im,"Symbol($1)");const n=em.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+tm.call(e)+"]":n==="RegExp"?rm.call(e):null}function ur(e,t){let r=Po(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let a=Po(this[n],t);return a!==null?a:i},2)}function xc(e){return e==null?[]:[].concat(e)}let gc,yc,vc,sm=/\$\{\s*(\w+)\s*\}/g;gc=Symbol.toStringTag;class Do{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[gc]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],xc(t).forEach(a=>{if(lt.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]}}yc=Symbol.hasInstance;vc=Symbol.toStringTag;class lt 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(sm,(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 Do(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[vc]="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,lt)}static[yc](t){return Do[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}},at={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"},$a={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Pa={isValue:"${path} field must be ${value}"},Qn={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},om={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"},lm={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 lt.formatError($t.notType,e)}};Object.assign(Object.create(null),{mixed:$t,string:at,number:Xt,date:$a,object:Qn,array:om,boolean:Pa,tuple:lm});const fs=e=>e&&e.__isYupSchema__;class fi{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(c=>c===n);return new fi(t,(o,c)=>{var d;let h=s(...o)?i:a;return(d=h==null?void 0:h(c))!=null?d:c})}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(!fs(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const qn={context:"$",value:"."};function hi(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 At=e=>e==null;function Wr(e){function t({value:r,path:n="",options:i,originalValue:a,schema:s},o,c){const{name:d,test:h,params:f,message:p,skipAbsent:y}=e;let{parent:k,context:m,abortEarly:C=s.spec.abortEarly,disableStackTrace:v=s.spec.disableStackTrace}=i;function S(P){return mr.isRef(P)?P.getValue(r,k,m):P}function D(P={}){const L=Object.assign({value:r,originalValue:a,label:s.spec.label,path:P.path||n,spec:s.spec,disableStackTrace:P.disableStackTrace||v},f,P.params);for(const B of Object.keys(L))L[B]=S(L[B]);const A=new lt(lt.formatError(P.message||p,L),r,L.path,P.type||d,L.disableStackTrace);return A.params=L,A}const j=C?o:c;let E={path:n,parent:k,type:d,from:i.from,createError:D,resolve:S,options:i,originalValue:a,schema:s};const R=P=>{lt.isError(P)?j(P):P?c(null):j(D())},z=P=>{lt.isError(P)?j(P):o(P)};if(y&&At(r))return R(!0);let I;try{var u;if(I=h.call(E,r,E),typeof((u=I)==null?void 0:u.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${E.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(I).then(R,z)}}catch(P){z(P);return}R(I)}return t.OPTIONS=e,t}function cm(e,t,r,n=r){let i,a,s;return t?(_r.forEach(t,(o,c,d)=>{let h=c?o.slice(1,o.length-1):o;e=e.resolve({context:n,parent:i,value:r});let f=e.type==="tuple",p=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&&p>=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[p],e=f?e.spec.types[p]: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=c?"["+o+"]":"."+o}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class mi 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 mi(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(fs(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 mt{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 mi,this._blacklist=new mi,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&&At(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}".
175
+ `:null,Eh=e=>{const{classes:t,variant:r,color:n,disableShrink:i}=e,a={root:["root",r,`color${$e(n)}`],svg:["svg"],circle:["circle",`circle${$e(r)}`,i&&"circleDisableShrink"]};return un(a,wh,t)},kh=xt("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${$e(r.color)}`]]}})($r(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:Sh||{animation:`${_a} 1.4s linear infinite`}},...Object.entries(e.palette).filter(li()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Th=xt("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),jh=xt("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${$e(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:Ch||{animation:`${Ra} 1.4s ease-in-out infinite`}}]}))),nc=ne.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiCircularProgress"}),{className:i,color:a="primary",disableShrink:s=!1,size:o=40,style:c,thickness:d=3.6,value:h=0,variant:f="indeterminate",...p}=n,y={...n,color:a,disableShrink:s,size:o,thickness:d,value:h,variant:f},E=Eh(y),m={},S={},v={};if(f==="determinate"){const j=2*Math.PI*((Qt-d)/2);m.strokeDasharray=j.toFixed(3),v["aria-valuenow"]=Math.round(h),m.strokeDashoffset=`${((100-h)/100*j).toFixed(3)}px`,S.transform="rotate(-90deg)"}return l.jsx(kh,{className:it(E.root,i),style:{width:o,height:o,...S,...c},ownerState:y,ref:r,role:"progressbar",...v,...p,children:l.jsx(Th,{className:E.svg,ownerState:y,viewBox:`${Qt/2} ${Qt/2} ${Qt} ${Qt}`,children:l.jsx(jh,{className:E.circle,style:m,ownerState:y,cx:Qt,cy:Qt,r:(Qt-d)/2,fill:"none",strokeWidth:d})})})});process.env.NODE_ENV!=="production"&&(nc.propTypes={classes:k.object,className:k.string,color:k.oneOfType([k.oneOf(["inherit","primary","secondary","error","info","success","warning"]),k.string]),disableShrink:ns(k.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:k.oneOfType([k.number,k.string]),style:k.object,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),thickness:k.number,value:k.number,variant:k.oneOf(["determinate","indeterminate"])});function Fh(e){return hr("MuiIconButton",e)}const jo=Dr("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Ah=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${$e(n)}`,i&&`edge${$e(i)}`,`size${$e(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return un(o,Fh,t)},Oh=xt(rc,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.loading&&t.loading,r.color!=="default"&&t[`color${$e(r.color)}`],r.edge&&t[`edge${$e(r.edge)}`],t[`size${$e(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})`:Ct(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(li()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(li()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ct((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)}}],[`&.${jo.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${jo.loading}`]:{color:"transparent"}}))),_h=xt("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=ne.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiIconButton"}),{edge:i=!1,children:a,className:s,color:o="default",disabled:c=!1,disableFocusRipple:d=!1,size:h="medium",id:f,loading:p=null,loadingIndicator:y,...E}=n,m=Kf(f),S=y??l.jsx(nc,{"aria-labelledby":m,color:"inherit",size:16}),v={...n,edge:i,color:o,disabled:c,disableFocusRipple:d,loading:p,loadingIndicator:S,size:h},j=Ah(v);return l.jsxs(Oh,{id:p?m:f,className:it(j.root,s),centerRipple:!0,focusRipple:!d,disabled:c||p,ref:r,...E,ownerState:v,children:[typeof p=="boolean"&&l.jsx("span",{className:j.loadingWrapper,style:{display:"contents"},children:l.jsx(_h,{className:j.loadingIndicator,ownerState:v,children:p&&S})}),a]})});process.env.NODE_ENV!=="production"&&(Gn.propTypes={children:ns(k.node,e=>ne.Children.toArray(e.children).some(r=>ne.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: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 Fo=ut(l.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"),Ao=ut(l.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"),Rh=ut(l.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"),os=ut(l.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),pi=ut(l.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=ut(l.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"),G={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}},Ph=(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 Ph(n.r+(i.r-n.r)*r,n.g+(i.g-n.g)*r,n.b+(i.b-n.b)*r)},ls=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)}},Dh=ls(G.primary.main),Ih=ls(G.secondary.main),Ye=ls(G.text.primary),Mh={primary:G.primary.main,secondary:G.secondary.main,textPrimary:G.text.primary,textSecondary:G.text.secondary,divider:G.divider,background:G.background},yt=({hasError:e,sx:t,labelText:r,labelVariant:n="subtitle2",endAdornment:i,endorsementText:a,endorsementBg:s="#E6E8EC",endorsementColor:o="#111827",endorsementRadius:c="6px",endorsementHeight:d=28,endorsementPaddingX:h="8px",...f})=>{var m,S;const p=!!r,y=a?l.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:c,backgroundColor:s,color:o,fontSize:12,fontWeight:300,lineHeight:1,whiteSpace:"nowrap"},children:a}):null,E={...f.InputProps,endAdornment:y||i?l.jsxs(x.InputAdornment,{sx:{mr:-1},position:"end",children:[y||i,(m=f.InputProps)==null?void 0:m.endAdornment]}):(S=f.InputProps)==null?void 0:S.endAdornment};return l.jsxs(x.Box,{children:[p&&l.jsx(x.Typography,{variant:n,sx:{color:G.text.primary,mb:.5,fontWeight:500},children:r}),l.jsx(x.TextField,{fullWidth:!0,size:"small",...f,InputProps:E,label:p?void 0:f.label,sx:{"& .MuiOutlinedInput-root":{backgroundColor:G.background.paper,borderRadius:"8px","& fieldset":{borderColor:G.divider},"&:hover fieldset":{borderColor:Ye[300]},"&.Mui-focused fieldset":{borderColor:Ye[400]},"&.Mui-error fieldset":{borderColor:G.error.main}},"& .MuiInputBase-input":{color:G.text.primary},"& .MuiFormLabel-root":{color:G.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:G.text.primary},"& .MuiFormHelperText-root":{color:e?G.error.main:G.text.secondary},...t}})]})},$i=({labelText:e,label:t,options:r,loading:n,helperText:i,size:a="small",labelVariant:s="subtitle2",placeholder:o,value:c,sx:d,...h})=>{const f=P.useId(),p=c==null||c===""||Array.isArray(c)&&c.length===0,y=E=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...E,children:l.jsx("path",{d:"M6 9l6 6 6-6",stroke:G.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});return l.jsxs(x.FormControl,{fullWidth:!0,size:a,error:!!h.error,variant:"outlined",children:[e&&l.jsx(x.Typography,{variant:s,sx:{color:G.text.primary,mb:.5,fontWeight:500},children:e}),t&&l.jsx(x.InputLabel,{id:f,shrink:!p||!!o,sx:{color:G.text.secondary,"&.Mui-focused":{color:G.text.primary},"&.Mui-error":{color:G.error.main}},children:t}),l.jsx(x.Select,{...h,value:c,labelId:t?f:void 0,label:t,displayEmpty:!0,input:l.jsx(x.OutlinedInput,{label:t}),IconComponent:y,renderValue:E=>{const m=E;if(p)return l.jsx("span",{style:{color:G.text.secondary},children:o??""});const S=r.find(v=>v.value===m);return(S==null?void 0:S.label)??String(m)},endAdornment:n?l.jsx(x.CircularProgress,{size:20}):void 0,MenuProps:{PaperProps:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${G.divider}`,mt:.5,borderRadius:"8px"}}},sx:{backgroundColor:G.background.paper,boxShadow:"none",borderRadius:"8px",height:"40px","& .MuiSelect-select":{color:G.text.primary,fontSize:14,pr:3},"& .MuiOutlinedInput-notchedOutline":{borderColor:G.divider},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:Ye[300]},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:Ye[400]},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:G.error.main},"& svg":{right:8,position:"absolute",pointerEvents:"none"},...d},children:n?l.jsx(x.MenuItem,{disabled:!0,children:l.jsx(x.CircularProgress,{size:16})}):r.map(E=>l.jsx(x.MenuItem,{value:E.value,sx:{backgroundColor:G.background.paper,color:G.text.primary,fontSize:14,mx:1,"&:hover":{backgroundColor:Ye[50],borderRadius:"4px"},"&.Mui-selected":{backgroundColor:Ye[50],borderRadius:"4px"}},children:E.label},E.value))}),i&&l.jsx(x.FormHelperText,{children:i})]})},zh=e=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:l.jsx("path",{d:"M6 9l6 6 6-6",stroke:G.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),ic=({id:e,options:t,value:r,multiple:n,label:i,labelText:a,placeholder:s,onChange:o,labelVariant:c="subtitle2",disabled:d,loading:h,error:f,helperText:p,onOpen:y,noOptionsText:E,sx:m})=>l.jsxs(x.Box,{children:[a&&l.jsx(x.Typography,{variant:c,sx:{color:G.text.primary,mb:.5,fontWeight:500},children:a}),l.jsx(x.Autocomplete,{id:e,options:t,value:r,multiple:n,size:"small",popupIcon:l.jsx(zh,{}),disabled:d,loading:h,onOpen:y,noOptionsText:E,fullWidth:!0,componentsProps:{paper:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${G.divider}`,mt:.5,borderRadius:"8px"}}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:G.background.paper,borderRadius:"8px",height:"40px","& fieldset":{borderColor:G.divider},"&:hover fieldset":{borderColor:Ye[300]},"&.Mui-focused fieldset":{borderColor:Ye[400]},"&.Mui-error fieldset":{borderColor:G.error.main}},"& .MuiInputBase-input":{color:G.text.primary,fontSize:14},"& .MuiAutocomplete-popupIndicator":{color:G.text.secondary},"& .MuiAutocomplete-endAdornment svg":{width:16,height:16},...m},getOptionLabel:S=>typeof S=="string"?S:(S==null?void 0:S.label)??"",isOptionEqualToValue:(S,v)=>((S==null?void 0:S.value)??S)===((v==null?void 0:v.value)??v),renderOption:(S,v,{selected:j})=>l.jsxs(x.Box,{component:"li",...S,sx:{backgroundColor:G.background.paper,color:G.text.primary,mx:.5,borderRadius:"4px","&:hover":{backgroundColor:Ye[50]},"&.Mui-focused":{backgroundColor:Ye[50]},...j?{backgroundColor:Ye[50]}:{}},children:[n&&l.jsx(x.Checkbox,{checked:j}),l.jsx(x.Typography,{variant:"body2",sx:{color:G.text.primary,fontSize:14},children:typeof v=="string"?v:v.label})]}),renderInput:S=>l.jsx(x.TextField,{...S,label:i,placeholder:s,size:"small",error:f,helperText:p,InputLabelProps:{shrink:!!r||!!s,sx:{color:G.text.secondary,"&.Mui-focused":{color:G.text.primary},"&.Mui-error":{color:G.error.main}}},InputProps:{...S.InputProps,endAdornment:l.jsxs(l.Fragment,{children:[h?l.jsx(x.CircularProgress,{size:20}):null,S.InputProps.endAdornment]})}}),onChange:(S,v)=>o(v)})]}),Ht=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>l.jsx(x.FormControlLabel,{control:l.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})}),ac=({labelText:e,label:t,value:r=[],options:n,row:i=!1,onChange:a,labelPosition:s="top",labelVariant:o="subtitle2",helperText:c,error:d,groupPadding:h=1.5,itemGap:f=1,disabled:p=!1})=>{const y=typeof i=="number"&&i>0,E=y?i:12,m=i===!0,S=i===!1&&!y,v=(j,M)=>{const F=Array.isArray(r)?[...r]:[];M?F.includes(j)||a([...F,j]):a(F.filter(C=>C!==j))};return l.jsxs(x.FormControl,{error:d,disabled:p,sx:j=>{var M;return{display:"flex",flexDirection:"column",px:j.spacing(h),borderRadius:((M=j.shape)==null?void 0:M.borderRadius)||8,mx:-2.5,backgroundColor:j.palette.background.paper}},children:[s==="top"&&e&&l.jsx(x.Typography,{variant:o,sx:j=>({color:j.palette.text.primary,mb:.5,fontSize:j.typography.fontSize,fontWeight:500}),children:e}),t&&l.jsx(x.FormLabel,{sx:j=>({color:j.palette.text.secondary,mb:.5,mx:1,fontSize:j.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:j.palette.text.primary},"&.Mui-error":{color:j.palette.error.main}}),children:t}),y&&l.jsx(x.Box,{sx:j=>({display:"grid",gridTemplateColumns:`repeat(${E}, 1fr)`,gap:j.spacing(f),mt:0}),children:n.map(j=>{const M=Array.isArray(r)&&r.includes(j.value);return l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:M,onChange:F=>v(j.value,F.target.checked),disabled:p,sx:F=>({color:F.palette.text.secondary,"&.Mui-checked":{color:F.palette.primary.main}})}),label:j.label,sx:F=>({m:0,"& .MuiFormControlLabel-label":{color:F.palette.text.primary,fontSize:12}})},String(j.value))})}),m&&l.jsx(x.Box,{sx:j=>({display:"flex",flexDirection:"row",flexWrap:"wrap",gap:j.spacing(f),alignItems:"center",mt:0}),children:n.map(j=>{const M=Array.isArray(r)&&r.includes(j.value);return l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:M,onChange:F=>v(j.value,F.target.checked),disabled:p,sx:F=>({color:F.palette.text.secondary,"&.Mui-checked":{color:F.palette.primary.main}})}),label:j.label,sx:F=>({m:0,"& .MuiFormControlLabel-label":{color:F.palette.text.primary,fontSize:12}})},String(j.value))})}),S&&l.jsx(x.Box,{sx:j=>({display:"flex",flexDirection:"column",gap:j.spacing(f),alignItems:"flex-start",mt:0}),children:n.map(j=>{const M=Array.isArray(r)&&r.includes(j.value);return l.jsx(x.FormControlLabel,{control:l.jsx(x.Checkbox,{size:"small",checked:M,onChange:F=>v(j.value,F.target.checked),disabled:p,sx:F=>({color:F.palette.text.secondary,"&.Mui-checked":{color:F.palette.primary.main}})}),label:j.label,sx:F=>({m:0,"& .MuiFormControlLabel-label":{color:F.palette.text.primary,fontSize:12}})},String(j.value))})}),c&&l.jsx(x.FormHelperText,{sx:{mt:.5},children:c})]})},di=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>l.jsx(x.FormControlLabel,{control:l.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:c,error:d,groupPadding:h=1.5,itemGap:f=1})=>l.jsxs(x.FormControl,{error:d,sx:p=>{var y;return{display:"flex",flexDirection:"column",px:p.spacing(h),borderRadius:((y=p.shape)==null?void 0:y.borderRadius)||8,mx:-2.5,backgroundColor:p.palette.background.paper}},children:[s==="top"&&e&&l.jsx(x.Typography,{variant:o,sx:p=>({color:p.palette.text.primary,mb:.5,fontSize:p.typography.fontSize,fontWeight:500}),children:e}),t&&l.jsx(x.FormLabel,{sx:p=>({color:p.palette.text.secondary,mb:.5,mx:1,fontSize:p.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:p.palette.text.primary},"&.Mui-error":{color:p.palette.error.main}}),children:t}),l.jsx(x.RadioGroup,{row:i,value:r,onChange:p=>a(p.target.value),sx:p=>({display:"flex",flexDirection:i?"row":"column",gap:p.spacing(f),alignItems:i?"center":"flex-start"}),children:n.map(p=>l.jsx(x.FormControlLabel,{value:p.value,control:l.jsx(x.Radio,{size:"small",sx:y=>({color:y.palette.text.secondary,"&.Mui-checked":{color:y.palette.primary.main}})}),label:l.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",gap:0},children:[l.jsx(x.Typography,{variant:"body2",sx:{color:"#1a1a1a",fontSize:12,fontWeight:400,lineHeight:1.5},children:p.label}),p.description&&l.jsx(x.Typography,{variant:"caption",sx:{color:"#1a1a1a",fontSize:10,fontWeight:300,lineHeight:1.5},children:p.description})]}),sx:{m:0,gap:.5,"& .MuiFormControlLabel-label":{marginLeft:0},"& .MuiRadio-root":{alignSelf:"flex-start",marginTop:0}}},String(p.value)))}),c&&l.jsx(x.FormHelperText,{sx:{mt:.5},children:c})]}),cs=({labelPosition:e="inner",labelVariant:t="subtitle2",label:r,sx:n,...i})=>l.jsxs(x.Box,{children:[e==="top"&&r&&l.jsx(x.Typography,{variant:t,sx:{color:"#111827",mb:.5},children:r}),l.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}})]}),sc=({labelText:e,labelVariant:t="subtitle2",hasError:r,sx:n,label:i,...a})=>{const s=!!e;return l.jsxs(x.Box,{children:[s&&l.jsx(x.Typography,{variant:t,sx:{color:G.text.primary,mb:.5,fontWeight:500},children:e}),l.jsx(x.TextField,{fullWidth:!0,multiline:!0,minRows:3,size:"small",...a,label:s?void 0:i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:G.background.paper,borderRadius:"8px","& fieldset":{borderColor:G.divider},"&:hover fieldset":{borderColor:Ye[300]},"&.Mui-focused fieldset":{borderColor:Ye[400]},"&.Mui-error fieldset":{borderColor:G.error.main}},"& .MuiInputBase-input":{color:G.text.primary,fontSize:14},"& .MuiFormLabel-root":{color:G.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:G.text.primary},"& .MuiFormHelperText-root":{color:r?G.error.main:G.text.secondary},...n}})]})},oc=({title:e,subtitle:t,actions:r,align:n="left",sx:i})=>l.jsxs(x.Box,{sx:a=>({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:a.spacing(1),py:a.spacing(1),...i}),children:[l.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",minWidth:0,flex:1,textAlign:n},children:[e&&l.jsx(x.Typography,{variant:"h6",sx:a=>({color:a.palette.text.primary,fontSize:12,fontWeight:600,lineHeight:1.3}),children:e}),t&&l.jsx(x.Typography,{variant:"body2",sx:a=>({color:a.palette.text.secondary,mt:e?.5:0,fontSize:12,fontWeight:300}),children:t})]}),r&&l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:r})]}),yn=ut(l.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),lc=()=>l.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("g",{"clip-path":"url(#clip0_5814_24904)",children:l.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"})}),l.jsx("defs",{children:l.jsx("clipPath",{id:"clip0_5814_24904",children:l.jsx("rect",{width:"24",height:"24",fill:"white"})})})]});function cc({items:e,getId:t,onReorder:r,header:n,disabled:i,sx:a,getText:s,showIndex:o=!0,showLeftIcon:c=!0,renderItem:d,chipText:h,helperText:f,emptyStateText:p,emptyStateButtonText:y="Add Phase",onEmptyStateButtonClick:E,emptyStateSx:m}){const[S,v]=P.useState(null),[j,M]=P.useState(null),F=u=>D=>{if(!i){v(u),D.dataTransfer.effectAllowed="move";try{D.dataTransfer.setData("text/plain",String(t(e[u])))}catch{}}},C=u=>D=>{i||(D.preventDefault(),M(u),D.dataTransfer.dropEffect="move")},R=u=>D=>{if(i)return;if(D.preventDefault(),S===null||S===u){v(null),M(null);return}const L=[...e],[$]=L.splice(S,1);L.splice(u,0,$),v(null),M(null),r(L)},B=()=>{v(null),M(null)},_=e.length===0,I=_&&(p||E!==void 0);return l.jsxs(x.Box,{role:"list",sx:u=>({display:"flex",flexDirection:"column",gap:u.spacing(1),...a}),children:[n,!_&&l.jsx(x.Divider,{sx:{mt:-.5,mb:1,dividerColor:"#EBEBEB"}}),I?l.jsxs(x.Box,{sx:u=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"200px",padding:u.spacing(4),backgroundColor:u.palette.mode==="dark"?"#000000":G.background.paper,border:`2px dashed ${u.palette.mode==="dark"?"#FFFFFF":G.divider}`,borderRadius:"8px",textAlign:"center",...m}),children:[p&&l.jsx(x.Typography,{variant:"body1",sx:u=>({color:u.palette.text.secondary,fontSize:"14px",fontWeight:400,lineHeight:1.5,mb:E?2:0,maxWidth:"400px"}),children:p}),E&&l.jsx(x.Button,{variant:"outlined",startIcon:l.jsx(yn,{}),onClick:E,disabled:i,sx:u=>({mt:p?0:2,backgroundColor:u.palette.mode==="dark"?`${u.palette.primary.main}1A`:`${u.palette.primary.main}0D`,borderColor:u.palette.primary.main,color:u.palette.primary.main,"&:hover":{backgroundColor:u.palette.mode==="dark"?`${u.palette.primary.main}33`:`${u.palette.primary.main}1A`,borderColor:u.palette.primary.main},borderRadius:"6px",textTransform:"none",fontSize:"14px",fontWeight:500,px:2,py:1}),children:y})]}):e.map((u,D)=>{const L=S===D,$=j===D&&S!==null&&S!==D;return l.jsx(x.Box,{role:"listitem",draggable:!i,onDragStart:F(D),onDragOver:C(D),onDrop:R(D),onDragEnd:B,sx:V=>({userSelect:"none",cursor:i?"default":"grab",backgroundColor:"#F8F8FA",border:`1px solid ${$?V.palette.primary.main:"#EBEBEB"}`,borderRadius:"8px",padding:V.spacing(1),opacity:L?.6:1,boxShadow:$?`0 0 0 2px ${V.palette.primary.main}33`:"none"}),children:d?d(u,L):l.jsxs(x.Box,{sx:V=>({display:"flex",alignItems:"center",gap:V.spacing(1),minWidth:0}),children:[c&&l.jsx(lc,{}),o&&l.jsxs(x.Typography,{variant:"body2",sx:V=>({fontWeight:600,fontSize:14,color:`${V.palette.text.primary}`,flex:"0 0 auto"}),children:[D+1,"."]}),(()=>{const V=typeof h=="function"?h(u,D):h;return V?l.jsx(x.Chip,{label:V,sx:{borderRadius:"4px",p:"12px 3px"},size:"small"}):null})(),l.jsx(x.Typography,{variant:"body2",sx:V=>({fontSize:12,fontWeight:500,color:`${V.palette.text.primary}90`,flex:1,minWidth:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),children:s?s(u):""})]})},String(t(u)))}),!_&&f?typeof f=="string"?l.jsx(x.Typography,{variant:"caption",sx:u=>({color:`${u.palette.text.primary}60`}),children:f}):f:null]})}const Bh=xt(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:G.primary.main}})),Vh=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const i=a=>{const{active:s,completed:o,icon:c}=a;return o?l.jsx(x.Box,{sx:{width:24,height:24,border:`1.2px solid ${G.primary.main}`,borderRadius:"50%",backgroundColor:G.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx(os,{sx:{fontSize:16,fontWeight:600}})}):s?l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${G.primary.main}`,backgroundColor:Ct(G.primary.main,.2),color:G.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:c}):l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:G.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:c})};return l.jsx(x.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(Bh,{}),sx:{"& .MuiStepConnector-vertical":{my:-1.1},"& .MuiStepLabel-label":{fontSize:14,color:G.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((a,s)=>l.jsxs(x.Step,{onClick:()=>r==null?void 0:r(s),completed:s<t,children:[l.jsx(x.StepLabel,{StepIconComponent:i,children:l.jsx(x.Typography,{sx:{fontSize:12,fontWeight:500,color:s===t?G.primary.main:G.text.primary},children:a.label})}),s!==e.length-1&&l.jsx(x.Divider,{sx:{ml:4.2,borderColor:G.divider}})]},s))})},us=({colorKey:e="primary",colorHex:t,tone:r="soft",bgAlpha:n=.12,borderAlpha:i=.24,sx:a,...s})=>l.jsx(x.Chip,{...s,sx:o=>({fontWeight:600,borderRadius:"4px",height:18,border:`0.5px solid ${Ct(t||o.palette.text.primary,.5)}`,backgroundColor:Ct(t||o.palette.text.primary,.1),"& .MuiChip-label":{p:"8px",color:t||o.palette.text.primary,fontSize:10,fontWeight:500},...a})}),Nh=xt(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:G.primary.main}})),Lh=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const[i,a]=P.useState(null),s=o=>{const{active:c,completed:d,icon:h}=o;return d?l.jsx(x.Box,{sx:{width:24,height:24,border:`1.2px solid ${G.primary.main}`,borderRadius:"50%",backgroundColor:G.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:l.jsx(os,{sx:{fontSize:16,fontWeight:600}})}):c?l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${G.primary.main}`,backgroundColor:Ct(G.primary.main,.2),color:G.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3,overflow:"hidden"},children:h}):l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:G.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3},children:h})};return l.jsx(x.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(Nh,{}),sx:{"& .MuiStepConnector-vertical":{my:-3.5},"& .MuiStepLabel-label":{fontSize:14,color:G.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((o,c)=>l.jsxs(x.Step,{onMouseEnter:()=>a(c),onMouseLeave:()=>a(null),onClick:()=>r==null?void 0:r(c),completed:c<t,children:[l.jsxs(x.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[l.jsxs(x.StepLabel,{StepIconComponent:s,children:[l.jsxs(x.Box,{sx:{display:"flex",gap:1,alignItems:"center"},children:[l.jsx(x.Typography,{sx:{fontSize:14,fontWeight:500,color:c===t?G.primary.main:G.text.primary},children:o.label}),l.jsx(us,{size:"small",colorHex:c<t?G.success.main:c===t?"#973B00":G.text.primary,label:c<t?"Completed":c===t?"In progress":"Not started"})]}),l.jsx(x.Typography,{sx:{fontSize:12,fontWeight:400,color:`${G.text.primary}60`,mt:.5,width:"80%"},children:o.description})]}),i===c&&l.jsx(x.Button,{sx:{display:c>t?"none":"block"},variant:c<t?"outlined":"contained",size:"small",color:"primary",children:c<t?"Edit":c===t?"Complete":""})]}),c!==e.length-1&&l.jsx(x.Divider,{sx:{ml:4.2,borderColor:G.divider}})]},c))})},qh=ut(l.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"),Wh=({variant:e="list",title:t,subtitle:r,text:n,items:i=[],icon:a,colorHex:s,sx:o})=>{const c=s||G.info.main,d=Ct(c,.08),h=Ct(c,.08),f=a??l.jsx(qh,{sx:{color:c,fontSize:18}});return e==="inlineInfo"?l.jsxs(x.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:d,border:`1px solid ${h}`,boxShadow:"none",...o},children:[l.jsx(x.Box,{sx:{display:"flex",alignItems:"center"},children:f}),l.jsx(x.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:c},children:n})]}):e==="inline"?l.jsx(x.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:d,border:`1px solid ${h}`,boxShadow:"none",...o},children:l.jsx(x.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:c},children:n})}):e==="listWithHeader"?l.jsxs(x.Card,{sx:{p:2,boxShadow:"none",borderRadius:"6px",backgroundColor:d,border:`1px solid ${h}`,...o},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[f,l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:600,color:c,fontSize:14,lineHeight:1.3},children:t})]}),r&&l.jsx(x.Typography,{variant:"body2",sx:{mt:.5,color:c,fontSize:10,lineHeight:1.3},children:r}),l.jsx(x.List,{sx:{pl:5,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:c},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:400,lineHeight:"18px",color:c,my:-.5}},children:i.map((p,y)=>l.jsx(x.ListItem,{sx:{py:0},children:l.jsx(x.ListItemText,{primary:p})},y))})]}):l.jsx(x.Card,{sx:{p:"11px",borderRadius:"8px",backgroundColor:d,border:`0.5px solid ${h}`,boxShadow:"none",...o},children:l.jsx(x.List,{sx:{pl:4,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:c},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:600,lineHeight:"18px",color:c,my:-.5}},children:i.map((p,y)=>l.jsx(x.ListItem,{sx:{py:0},children:l.jsx(x.ListItemText,{primary:p})},y))})})},uc=({value:e,onChange:t,items:r,ariaLabel:n,sx:i,tabSx:a})=>l.jsxs(x.Box,{children:[l.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 c=typeof s.value=="string"||typeof s.value=="number"?s.value:o;return l.jsx(x.Tab,{value:c,disabled:s.disabled,label:l.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(c))})}),r.map((s,o)=>{const c=typeof s.value=="string"||typeof s.value=="number"?s.value:o,d=s.content??(typeof s.value=="object"?s.value:null);return d&&e===c?l.jsx(x.Box,{sx:{mt:1},children:d},`panel-${c}`):null})]}),Uh=ut(l.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"),pc=({name:e,columns:t,initialRow:r,addLabel:n,rowDeletable:i=!0,control:a,sx:s,addActions:o,emptyTitle:c="No items configured",emptySubtitle:d="Click 'Add' to get started.",emptyCardSx:h,setValue:f,rowSelectionMode:p,rowSelectionKey:y})=>{const{fields:E,append:m,remove:S}=hu({control:a,name:e}),v=P.useMemo(()=>{if(y)return y;const I=t.find(u=>u.type==="rowSelect");return I==null?void 0:I.key},[t,y]),j=fl({control:a,name:e})||[],M=P.useMemo(()=>{if(!v)return{};const I={};return j.forEach((u,D)=>{I[D]=!!(u!=null&&u[v])}),I},[j,v]),F=P.useCallback(I=>M[I]===!0,[M]),C=P.useCallback((I,u)=>{if(!f||!v)return;const D=`${e}.${I}.${v}`;p==="single"&&u&&j.forEach((L,$)=>{if($!==I){const V=`${e}.${$}.${v}`;f(V,!1,{shouldDirty:!0})}}),f(D,u,{shouldDirty:!0})},[e,v,p,f,j]),R=I=>{const u={...I||r};t.forEach(D=>{D.value!==void 0&&u[D.key]===void 0&&(u[D.key]=typeof D.value=="function"?D.value(u,E.length):D.value)}),m(u)},B=P.useMemo(()=>t.reduce((u,D)=>{if(D.width==="auto"||D.width===void 0)return u+120;const L=typeof D.width=="number"?D.width:typeof D.width=="string"&&parseInt(D.width)||160;return u+L},0)+(i?100:0),[t,i]),_=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 l.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:E.length===0?l.jsxs(x.Box,{sx:I=>({p:4,textAlign:"center",borderStyle:"dashed",borderColor:Ct(I.palette.primary.main,.4),backgroundColor:Ct(I.palette.primary.main,.04),borderWidth:1,borderRadius:"8px",...h}),children:[l.jsx(x.Typography,{variant:"subtitle1",sx:I=>({color:I.palette.primary.main,fontWeight:600,mb:.5,fontSize:14}),children:c}),l.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,u)=>l.jsx(x.Button,{variant:"outlined",size:"small",startIcon:l.jsx(yn,{}),sx:{mr:1,mt:1},onClick:()=>R(I.template),children:I.label},`empty-add-${u}`)):n&&l.jsx(x.Button,{variant:"outlined",size:"small",startIcon:l.jsx(yn,{}),onClick:()=>R(),children:n})]}):l.jsxs(l.Fragment,{children:[l.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,u)=>l.jsx(x.Button,{variant:u===0?"contained":"outlined",size:"small",startIcon:l.jsx(yn,{}),onClick:()=>R(I.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:I.label},`add-${u}`)):n&&l.jsx(x.Button,{variant:"contained",size:"small",startIcon:l.jsx(yn,{}),onClick:()=>R(),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})}),l.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:l.jsx(x.TableContainer,{sx:{width:"max-content",minWidth:"100%"},children:l.jsxs(x.Table,{stickyHeader:!0,sx:{minWidth:`${B||650}px`},children:[l.jsx(x.TableHead,{children:l.jsxs(x.TableRow,{children:[t.map(I=>l.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,..._(I)},children:I.header},I.key)),i&&l.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"})]})}),l.jsx(x.TableBody,{children:E.map((I,u)=>{const D=F(u),L=p&&!D;return l.jsxs(x.TableRow,{children:[t.map($=>{var le;const V=`${e}.${u}.${$.key}`,ee=$.type==="rowSelect"||$.key===v,ie=ee?!1:L?!0:typeof $.disabled=="function"?$.disabled(I,u):!!$.disabled;if($.type==="index"){const Y=$.indexFormat?$.indexFormat(u):`#${u+1}`;return l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",textAlign:((le=$.cellSx)==null?void 0:le.textAlign)||"center",..._($),...$.cellSx},children:Y},$.key)}if($.value!==void 0&&$.editable===!1){const Y=typeof $.value=="function"?$.value(I,u):$.value;return l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",..._($),...$.cellSx},children:Y},$.key)}const he=$.endorsementText?typeof $.endorsementText=="function"?$.endorsementText(I,u):$.endorsementText:void 0;return l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",..._($),...$.cellSx},children:$.type==="rowSelect"||ee&&$.type==="checkbox"?l.jsx(Oe,{name:V,control:a,defaultValue:!1,render:({field:Y})=>l.jsx(Ht,{label:"",checked:!!Y.value,disabled:!1,onChange:U=>{Y.onChange(U),C(u,U)},sx:$.sx})}):$.type==="checkbox"?l.jsx(Oe,{name:V,control:a,render:({field:Y})=>l.jsx(Ht,{label:"",checked:!!Y.value,disabled:ie,onChange:Y.onChange,sx:$.sx})}):$.type==="select"?l.jsx(Oe,{name:V,control:a,render:({field:Y})=>l.jsx($i,{...Y,fullWidth:!0,disabled:ie,options:$.options||[],size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...$.sx},helperText:$.helperText,required:$.required})}):$.type==="date"?l.jsx(Oe,{name:V,control:a,defaultValue:$.value!==void 0?typeof $.value=="function"?$.value(I,u):$.value:void 0,render:({field:Y})=>(P.useEffect(()=>{if(f&&(Y.value===void 0||Y.value===null||Y.value==="")&&$.value!==void 0){const U=typeof $.value=="function"?$.value(I,u):$.value;f(V,U,{shouldValidate:!1})}},[V,Y.value,$.value,I,u,f]),l.jsx(cs,{...Y,fullWidth:!0,disabled:ie,size:"small",placeholder:$.placeholder||"DD/MM/YYYY",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...$.sx},helperText:$.helperText,required:$.required}))}):l.jsx(Oe,{name:V,control:a,defaultValue:$.value!==void 0?typeof $.value=="function"?$.value(I,u):$.value:void 0,render:({field:Y})=>(P.useEffect(()=>{if(f&&(Y.value===void 0||Y.value===null||Y.value==="")&&$.value!==void 0){const U=typeof $.value=="function"?$.value(I,u):$.value;f(V,U,{shouldValidate:!1})}},[V,Y.value,$.value,I,u,f]),l.jsx(yt,{...Y,fullWidth:!0,type:$.type==="number"?"number":"text",placeholder:$.placeholder,disabled:ie,size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...$.sx},helperText:$.helperText,required:$.required,endorsementText:he,endorsementBg:$.endorsementBg,endorsementColor:$.endorsementColor,endorsementRadius:$.endorsementRadius,endorsementHeight:$.endorsementHeight,endorsementPaddingX:$.endorsementPaddingX,inputProps:{...$.type==="number"?{min:$.min,max:$.max,step:$.step}:{minLength:$.minLength,maxLength:$.maxLength,pattern:$.pattern}}}))})},$.key)}),i&&l.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",px:1.5,py:0,borderBottom:"1px solid #E5E6EB",textAlign:"center"},children:l.jsx(x.IconButton,{size:"small",color:"error",onClick:()=>S(u),sx:{width:"20px",height:"20px"},children:l.jsx(Uh,{sx:{fontSize:"20px"}})})})]},I.id)})})]})})})]})})},dc=({name:e,control:t,items:r,sx:n,cardSx:i})=>l.jsx(x.Box,{sx:{display:"flex",flexDirection:"column",gap:1,...n},children:r.map(a=>{const s=!!a.leftAction,o=!!a.rightAction,c=!!(a.header||a.chipText),d=a.leftAction,h=a.rightAction;return l.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&&l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexShrink:0},children:l.jsx(Oe,{name:d.name,control:t,defaultValue:!1,render:({field:f})=>l.jsx(Ht,{label:d.label||"",checked:!!f.value,onChange:f.onChange,sx:{margin:0}})})}),c&&l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flex:s||o?1:"none",ml:s?1:0},children:[a.header&&l.jsx(x.Typography,{variant:"body2",sx:{fontSize:"12px",color:"rgba(0,0,0,0.87)",fontWeight:400},children:a.header}),a.chipText&&l.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&&l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexShrink:0,ml:"auto"},children:l.jsx(Oe,{name:h.name,control:t,defaultValue:!1,render:({field:f})=>l.jsx(di,{label:h.label,checked:!!f.value,onChange:f.onChange,sx:{margin:0}})})}),!s&&!o&&!c&&l.jsx(x.Box,{sx:{width:"100%",height:"100%"}})]},a.id)})}),fc=ut(l.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"),ta=ut(l.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"),Hh=[{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"}],ra=[{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"}],Kh=({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,c]=P.useState(e.seasonalMonths||[]),d=p=>{const y=o.includes(p)?o.filter(E=>E!==p):[...o,p];c(y),r(e.id,{seasonalMonths:y})},h=(()=>{const p=e.min||0;return p<0?"Min cannot be negative.":Number.isInteger(p)?null:"Use whole periods."})(),f=(()=>{const p=e.min||0,y=e.max||0;return Number.isInteger(y)?y<p?"Max must be ≥ Min.":null:"Use whole periods."})();return l.jsx(x.Card,{sx:{border:"2px solid",borderColor:G.divider,position:"relative",...s},children:l.jsxs(x.CardContent,{sx:{p:2},children:[l.jsxs(x.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs(x.Box,{sx:{display:"flex",gap:.5,alignItems:"center"},children:[l.jsx(x.Box,{children:l.jsx(lc,{})}),l.jsx(us,{label:t+1,size:"small"})]}),l.jsx(x.IconButton,{onClick:()=>n(e.id),disabled:a,sx:{color:G.error.main,"&:hover":{bgcolor:Ye[50]}},size:"small",children:l.jsx(fc,{fontSize:"small"})})]}),l.jsx(x.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:l.jsxs(x.Box,{sx:{flex:1,display:"grid",gap:1.5},children:[l.jsxs(x.Box,{sx:{display:"flex",gap:2,mb:.5},children:[l.jsx(x.Box,{sx:{flex:.5,display:"grid",gap:1},children:l.jsx($i,{labelText:"Phase type",value:e.type,onChange:p=>r(e.id,{type:p.target.value}),options:Hh,disabled:a})}),l.jsxs(x.Box,{sx:{display:"grid",gap:1,flex:.5},children:[l.jsx(x.Typography,{variant:"caption",sx:{fontSize:"12px",color:G.text.secondary},children:"Allocation priority (1–9)"}),l.jsx(yt,{type:"number",value:e.priority||5,onChange:p=>{const y=parseInt(p.target.value)||5;r(e.id,{priority:Math.min(9,Math.max(1,y))})},inputProps:{min:1,max:9},disabled:a,sx:{textAlign:"center"}})]})]}),l.jsxs(x.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[l.jsx(x.Box,{sx:{display:"grid",gap:1},children:l.jsx(yt,{labelText:"Min periods",type:"number",value:e.min||0,onChange:p=>{const y=parseInt(p.target.value)||0;r(e.id,{min:y,...e.lockLength?{max:y}:{}})},inputProps:{min:0},disabled:a,error:!!h,helperText:h||void 0})}),l.jsx(x.Box,{sx:{display:"grid",gap:1},children:l.jsx(yt,{labelText:"Max periods",type:"number",value:e.lockLength?e.min:e.max||0,onChange:p=>r(e.id,{max:parseInt(p.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}:{}})})]}),l.jsxs(x.Box,{sx:{display:"flex",gap:3},children:[l.jsx(Ht,{label:"Lock length (fix to Min)",checked:e.lockLength||!1,onChange:p=>r(e.id,{lockLength:p,...p?{max:e.min}:{}}),disabled:a}),l.jsx(Ht,{label:"Residual fill",checked:e.residualFill||!1,onChange:p=>r(e.id,{residualFill:p}),disabled:a})]}),e.type==="principal-moratorium"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(ta,{sx:{fontSize:14,color:G.text.secondary,cursor:"help"}})})]}),l.jsx(wr,{value:e.interestPolicy||"accrue-capitalize",onChange:p=>r(e.id,{interestPolicy:p}),options:ra,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&l.jsx(x.Typography,{variant:"caption",sx:{color:G.text.secondary,mt:1},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]}),e.type==="balloon"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1.5},children:[l.jsx(wr,{value:e.balloonType||"percent",onChange:p=>r(e.id,{balloonType:p}),options:[{label:"Amount",value:"amount"},{label:"Percent",value:"percent"}],row:!0,labelPosition:"none"}),e.balloonType==="amount"&&l.jsx(yt,{labelText:"Balloon Amount",type:"number",value:e.balloonAmount||"",onChange:p=>r(e.id,{balloonAmount:parseFloat(p.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.balloonType==="percent"&&l.jsx(yt,{labelText:"Balloon Percent",type:"number",value:e.balloonPercent||"",onChange:p=>r(e.id,{balloonPercent:parseFloat(p.target.value)||0}),placeholder:"Enter percent",inputProps:{max:100},disabled:a})]}),e.type==="bullet"&&l.jsx(x.Typography,{variant:"caption",sx:{color:G.text.secondary},children:"Principal at maturity"}),e.type==="step-up-down"&&l.jsxs(x.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[l.jsx(yt,{labelText:"Step Percent",type:"number",value:e.stepPercent||"",onChange:p=>r(e.id,{stepPercent:parseFloat(p.target.value)||0}),placeholder:"e.g., 10",disabled:a}),l.jsx(yt,{labelText:"Every N periods",type:"number",value:e.stepEveryN||"",onChange:p=>r(e.id,{stepEveryN:parseInt(p.target.value)||0}),placeholder:"e.g., 6",disabled:a})]}),e.type==="seasonal-skips"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1.5},children:[l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Skip Months"}),l.jsx(x.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:i.map(p=>l.jsx(x.Chip,{label:p,size:"small",onClick:()=>!a&&d(p),sx:{cursor:a?"default":"pointer",bgcolor:o.includes(p)?G.primary.main:"transparent",color:o.includes(p)?G.primary.contrastText:G.text.primary,border:`1px solid ${G.divider}`,"&:hover":{bgcolor:o.includes(p)?Ye[600]:Ye[50]}}},p))})]}),l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(ta,{sx:{fontSize:14,color:G.text.secondary,cursor:"help"}})})]}),l.jsx(wr,{value:e.interestPolicy||"accrue-capitalize",onChange:p=>r(e.id,{interestPolicy:p}),options:ra,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&l.jsx(x.Typography,{variant:"caption",sx:{color:G.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]}),e.type==="custom-fixed"&&l.jsx(yt,{labelText:"Fixed Installment Amount",type:"number",value:e.customAmount||"",onChange:p=>r(e.id,{customAmount:parseFloat(p.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.type==="payment-holiday"&&l.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(ta,{sx:{fontSize:14,color:G.text.secondary,cursor:"help"}})})]}),l.jsx(wr,{value:e.holidayInterestTreatment||"accrue-capitalize",onChange:p=>r(e.id,{holidayInterestTreatment:p}),options:ra,labelPosition:"none"}),e.holidayInterestTreatment==="accrue-forgive"&&l.jsx(x.Typography,{variant:"caption",sx:{color:G.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]})})]})})};async function hc(e,t,r,n){try{const{endpoint:i,method:a="GET",valueField:s="value",labelField:o="label",headers:c={},params:d={},body:h,transform:f,passThroughFields:p}=e;let y=i;if(t&&!i.startsWith("http")&&(y=`${t}${i.startsWith("/")?i:`/${i}`}`),n){const F=/\{([^}]+)\}/g;y=y.replace(F,(C,R)=>{const B=n[R];return B!=null?encodeURIComponent(String(B)):""}),y=y.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}const E=new URLSearchParams;Object.entries(d).forEach(([F,C])=>{C!=null&&E.append(F,String(C))}),E.toString()&&(y+=`${y.includes("?")?"&":"?"}${E.toString()}`);try{const F=/^https?:\/\//i.test(y),C=new URL(y,F?void 0:"http://local.placeholder"),R=Array.from(C.searchParams.entries());for(const[B,_]of R)(_===""||_==="undefined"||_==="null")&&C.searchParams.delete(B);F?y=C.toString():y=C.pathname+(C.search?C.search:""),y=y.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}catch{}const m={"Content-Type":"application/json",...r,...c},S={method:a,headers:m};(a==="POST"||a==="PUT")&&h&&(S.body=JSON.stringify(h));const v=await fetch(y,S);if(!v.ok)throw new Error(`API request failed: ${v.status} ${v.statusText}`);const j=await v.json();if(f)return f(Array.isArray(j)?j:j.data||j);const M=Array.isArray(j)?j:j.data||j;if(!Array.isArray(M))throw new Error("API response is not an array");return M.map(F=>{const C={label:F[o]||F.name||F.title||String(F[s]||""),value:F[s]||F.id||F.value||""},R=Array.isArray(p)?p:void 0;if(Array.isArray(R))for(const B of R)F[B]!==void 0&&(C[B]=F[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 mc(e,t,r,n,i=!1){const a=P.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=P.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 Ju({queryKey:s,queryFn:()=>{if(!e)throw new Error("API config is required");return hc(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 ps(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 Yh(e,t){const r=ps(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 ds=({field:e,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:s})=>{const o=r[e.name],c=!!o,[d,h]=P.useState(!1),f=P.useRef(!1),[p,y]=P.useState(!1),[E,m]=P.useState(!1),[S,v]=P.useState(!1),j=P.useRef(null),M=P.useRef(null),F=()=>{var te;const H=e.required;if(typeof H=="function")try{return!!H(a||{})}catch{return!1}if(H!==void 0)return!!H;const X=(te=e.validation)==null?void 0:te.required;if(typeof X=="function")try{return!!X(a||{})}catch{return!1}return X!==void 0?!!X:!1},C=H=>F()?`${H} *`:H,R=()=>{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=P.useRef(void 0);P.useEffect(()=>{const H=e.value;if(typeof H!="function"||!s)return;let X;try{X=H(a||{})}catch{return}const te=a?a[e.name]:void 0;if(B.current===void 0&&(B.current=X),te===void 0||te===B.current)try{s(e.name,X,{shouldValidate:!0,shouldDirty:!1}),B.current=X}catch{}},[JSON.stringify(Array.isArray(e.valueDeps)&&a?e.valueDeps.reduce((H,X)=>({...H,[X]:a[X]}),{}):a||{}),e.name]);const _=P.useMemo(()=>{const H=ps(e);return H&&Array.isArray(e.passThroughFields)&&(H.passThroughFields=e.passThroughFields),H},[e.apiConfig,e.api_endpoint,e.api_method,e.value_field,e.label_field,e.depends_on,e.conditional,e.passThroughFields]),I=P.useRef(null),u=_!=null&&_.dependsOn?a==null?void 0:a[_.dependsOn]:null,D=P.useMemo(()=>{if(!(_!=null&&_.dependsOn))return!1;const H=u,X=I.current,te=H!==X;return te&&(I.current=H),te},[_==null?void 0:_.dependsOn,u]),L=P.useMemo(()=>{const H=e.showWhen;if(typeof H=="function")try{return!!H(a||{})}catch{return!0}if(H&&typeof H=="object"){const X=H.field,te=H.equals,ae=H.in,se=X?(a||{})[X]:void 0;if(X&&typeof te<"u")return se===te;if(X&&Array.isArray(ae))return ae.includes(se)}return!0},[e.showWhen,a]),$=P.useCallback(()=>{const H=e.dynamicEndorsement;if(typeof H=="function")try{return H(a||{})}catch{return e.endorsementText}return e.endorsementText},[e,a]),V=P.useCallback(()=>{const H=e.endAdornment,X=e.endAdornmentSwitch,te=e.endAdornmentCheckbox;if(X)return l.jsx(Oe,{name:X,control:t,defaultValue:e.endAdornmentSwitchDefault??!1,render:({field:ae})=>l.jsx(x.Switch,{checked:ae.value||!1,onChange:se=>{ae.onChange(se.target.checked),e.endAdornmentSwitchOnChange&&e.endAdornmentSwitchOnChange(se.target.checked,a,s)},disabled:e.endAdornmentSwitchDisabled,size:e.endAdornmentSwitchSize||"small",sx:e.endAdornmentSwitchSx})});if(te)return l.jsx(Oe,{name:te,control:t,defaultValue:e.endAdornmentCheckboxDefault??!1,render:({field:ae})=>l.jsx(Ht,{label:"",checked:ae.value||!1,onChange:ae.onChange,disabled:e.endAdornmentCheckboxDisabled,sx:e.endAdornmentCheckboxSx})});if(typeof H=="function")try{return H(a||{},{control:t,setValue:s})}catch{return}return H},[e,a,t,s]),ee=P.useMemo(()=>d&&gr(e)&&(!(_!=null&&_.dependsOn)||u),[d,e,_==null?void 0:_.dependsOn,u]),ie=P.useMemo(()=>{const H={};if(!a)return H;const X=(_==null?void 0:_.endpoint)||(e==null?void 0:e.api_endpoint);if(X&&typeof X=="string"){const te=X.match(/\{([^}]+)\}/g)||[];for(const ae of te){const se=ae.slice(1,-1),ge=a[se];ge!==void 0&&(H[se]=ge)}}if(_!=null&&_.dependsOn){const te=_.dependsOn,ae=a[te];ae!==void 0&&(H[te]=ae)}return H},[_==null?void 0:_.endpoint,e==null?void 0:e.api_endpoint,_==null?void 0:_.dependsOn,a]),{data:he=[],isLoading:le,error:Y}=mc(_,n,i,ie,ee),U=P.useCallback(()=>{gr(e)&&!f.current&&(f.current=!0,h(!0))},[e]),Z=P.useCallback(()=>{gr(e)&&!f.current&&(f.current=!0,h(!0))},[e]);P.useEffect(()=>{if(gr(e)&&!f.current){const H=a==null?void 0:a[e.name];H!=null&&H!==""&&(f.current=!0,h(!0))}},[e,a]),P.useEffect(()=>{gr(e)&&(_!=null&&_.dependsOn)&&D&&f.current&&(f.current=!1,h(!1))},[D,_==null?void 0:_.dependsOn]);const ce=P.useCallback(()=>gr(e)?he:e.type==="select"||e.type==="toggle"||e.type==="radio"||e.type==="autocomplete"?e.options||[]:[],[e,he]),de=()=>{var H,X,te,ae,se,ge;switch(e.type){case"title":return l.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 l.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,Pe=e.actionComponent,qe=e.actionLabel,Ge=T=>l.jsx(oc,{title:e.title||e.label,subtitle:e.subtitle,align:e.align||"left",sx:e.sx,actions:T??e.actions}),kt=T=>{if(e.cardWrap){const z={...{px:2,py:1,boxShadow:"none",border:"1px solid #DDDDDD"},...e.cardSx};return l.jsx(x.Card,{sx:z,...e.cardProps,children:T})}return T};return kt(Q&&Pe?l.jsx(Oe,{name:Q,control:t,defaultValue:e.value??!1,render:({field:T})=>Ge(Pe==="switch"?l.jsx(di,{label:qe,checked:!!T.value,onChange:T.onChange}):l.jsx(Ht,{label:qe||"",checked:!!T.value,onChange:T.onChange}))}):Ge());case"tabs":return l.jsx(Oe,{name:e.name,control:t,defaultValue:e.defaultValue??(typeof((X=(H=e.items)==null?void 0:H[0])==null?void 0:X.value)=="string"||typeof((ae=(te=e.items)==null?void 0:te[0])==null?void 0:ae.value)=="number"?(ge=(se=e.items)==null?void 0:se[0])==null?void 0:ge.value:0),render:({field:T})=>{const g=e.items||[],z=g.map((K,W)=>({label:K.label,value:typeof K.value=="string"||typeof K.value=="number"?K.value:W,content:K.content,disabled:K.disabled})),b=T.value,O=(()=>{if(typeof b=="string"||typeof b=="number"){const K=g.findIndex((W,ue)=>typeof W.value=="string"||typeof W.value=="number"?W.value===b:ue===b);return K>=0?K:0}return Number(b)||0})(),q=g[O]||{};return l.jsxs(x.Box,{children:[l.jsx(uc,{value:T.value,onChange:T.onChange,items:z,ariaLabel:e.ariaLabel||e.label,sx:e.sx,tabSx:e.tabSx}),Array.isArray(q.fields)&&q.fields.length>0&&(()=>{const K=q.fields,W=[];let ue=[];for(const Ce of K)Ce.type==="section"&&ue.length>0?(W.push(ue),ue=[Ce]):ue.push(Ce);ue.length>0&&W.push(ue);const ve={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 l.jsx(x.Box,{sx:{mt:1},children:W.map((Ce,De)=>{const Be=Ce.find(Je=>Je.type==="section"),Xe=(Be==null?void 0:Be.cardWrap)!==!1,Ot=l.jsx(l.Fragment,{children:Ce.map(Je=>{const We=Je.showWhen;if(We)try{if(typeof We=="function"){if(!We(a||{}))return null}else if(typeof We=="object"){const Yt=We.field,xs=We.equals,gs=We.in,ys=Yt?(a||{})[Yt]:void 0;if(Yt&&typeof xs<"u"&&ys!==xs||Yt&&Array.isArray(gs)&&!gs.includes(ys))return null}}catch{}const pt=Math.min(Math.max(Je.col??12,1),12);return l.jsx(x.Box,{sx:{gridColumn:`span ${pt}`},children:l.jsx(ds,{field:Je,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:s})},Je.name)})});return Xe?l.jsx(x.Card,{sx:{...ve,...(Be==null?void 0:Be.cardSx)||{}},...(Be==null?void 0:Be.cardProps)||{},children:Ot},`tab-group-${De}`):l.jsx(x.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1},children:Ot},`tab-group-${De}`)})})})()]})}});case"grid":const Ue=e.defaultRows||[];return l.jsx(Oe,{name:e.name,control:t,defaultValue:Ue.length>0?Ue:R()||[],render:()=>l.jsx(pc,{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 l.jsx(dc,{name:e.name,control:t,items:e.items||[],sx:e.sx,cardSx:e.cardSx});case"dragdroplist":return l.jsx(Oe,{name:e.name,control:t,defaultValue:e.items||[],render:({field:T})=>{const g=e,z=T.value||g.items||[],b=typeof g.getId=="function"?g.getId:typeof g.getId=="string"?K=>K[g.getId]:K=>K.id??K._id??K.key??String(K),O=typeof g.getText=="function"?g.getText:typeof g.getText=="string"?K=>K[g.getText]??String(K):K=>K.text??K.label??K.name??K.title??String(K),q=(()=>{if(typeof g.chipText=="function")return g.chipText;if(typeof g.chipText=="string")return z.length>0&&z[0]&&g.chipText in z[0]?(K,W)=>K[g.chipText]??void 0:g.chipText})();return l.jsx(cc,{items:z,getId:b,onReorder:K=>{T.onChange(K)},header:g.header,disabled:e.disabled,sx:g.sx,chipText:q,helperText:g.helperText||(c?o==null?void 0:o.message:void 0),getText:O,showIndex:g.showIndex!==!1,showLeftIcon:g.showLeftIcon!==!1,renderItem:g.renderItem})}});case"text":case"email":case"password":case"tel":case"textarea":return l.jsx(Oe,{name:e.name,control:t,defaultValue:R(),render:({field:T})=>e.type==="textarea"?l.jsx(sc,{...T,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:c,helperText:(o==null?void 0:o.message)||e.helperText}):l.jsx(yt,{...T,id:e.id,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,endAdornment:V(),endorsementText:$(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:e.type==="password"?p?"text":"password":e.type,placeholder:e.placeholder,disabled:e.disabled,hasError:c,helperText:(o==null?void 0:o.message)||e.helperText,InputProps:e.type==="password"?{endAdornment:l.jsx(Xl,{position:"end",children:l.jsx(Gn,{"aria-label":"toggle password visibility",onClick:()=>y(g=>!g),edge:"end",children:p?l.jsx(Ao,{}):l.jsx(Fo,{})})})}:void 0})});case"number":return l.jsx(Oe,{name:e.name,control:t,defaultValue:R(),render:({field:T})=>l.jsx(yt,{...T,id:e.id,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,endAdornment:V(),endorsementText:$(),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:c,helperText:(o==null?void 0:o.message)||e.helperText,inputProps:{min:e.min,max:e.max}})});case"select":const Ze=ce();return l.jsx(Oe,{name:e.name,control:t,defaultValue:R(),render:({field:T})=>l.jsx($i,{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:T.value,onChange:T.onChange,options:Ze,disabled:e.disabled||le,placeholder:e.labelPosition==="inner"||e.labelPosition==="none"||!e.labelPosition?e.placeholder||(e.labelPosition==="none"?C(e.label):void 0):e.placeholder,loading:le,error:c||!!Y,helperText:(o==null?void 0:o.message)||(Y==null?void 0:Y.message)||e.helperText,onOpen:U})});case"checkbox":return l.jsx(Oe,{name:e.name,control:t,defaultValue:R(),render:({field:T})=>l.jsx(Ht,{label:C(e.label),checked:!!T.value,disabled:e.disabled,onChange:T.onChange})});case"toggle":return l.jsx(Oe,{name:e.name,control:t,defaultValue:R(),render:({field:T})=>l.jsx(wr,{label:C(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:T.value,options:e.options||[],row:!0,onChange:T.onChange})});case"radio":return l.jsx(Oe,{name:e.name,control:t,defaultValue:R(),render:({field:T})=>l.jsx(wr,{label:C(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:T.value,options:e.options||[],row:e.row===!0,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:T.onChange})});case"checkboxGroup":return l.jsx(Oe,{name:e.name,control:t,defaultValue:R()||[],render:({field:T})=>l.jsx(ac,{label:C(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:Array.isArray(T.value)?T.value:[],options:e.options||[],row:e.row,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:T.onChange,disabled:e.disabled})});case"switch":return l.jsx(Oe,{name:e.name,control:t,defaultValue:R(),render:({field:T})=>l.jsx(di,{label:C(e.label),checked:!!T.value,disabled:e.disabled,onChange:T.onChange})});case"autocomplete":const He=ce(),w=!!(e.disabled||le||_!=null&&_.dependsOn&&!u);return l.jsx(Oe,{name:e.name,control:t,defaultValue:R(),render:({field:T})=>{const g=T.value,z=e.multiple===!0,b=(_==null?void 0:_.valueField)||e.value_field||"value",O=(_==null?void 0:_.labelField)||e.label_field||"label",q=W=>{if(W!=null){if(typeof W=="string"||typeof W=="number")return W;if(typeof W=="object"){if(W[b]!==void 0)return W[b];if(W.value!==void 0)return W.value;if(W.id!==void 0)return W.id}}},K=(()=>{if(z)return(Array.isArray(g)?g:[]).map(ue=>{const ve=He.find(Ce=>{const De=q(Ce);return De!==void 0&&De===ue});return ve||{[b]:ue,[O]:`Selected: ${ue}`,value:ue,label:`Selected: ${ue}`}});{if(g==null||g==="")return null;const W=He.find(ue=>{const ve=q(ue);return ve!==void 0&&ve===g});return W||{[b]:g,[O]:`Selected: ${g}`,value:g,label:`Selected: ${g}`}}})();return l.jsx(ic,{id:e.id,options:He,value:K,multiple:z,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,placeholder:w&&(_!=null&&_.dependsOn)&&!u?`Please select ${_.dependsOn.replace(/_/g," ")} first`:e.placeholder,labelVariant:e.labelVariant,disabled:w,loading:le,error:c||!!Y,helperText:(o==null?void 0:o.message)||(Y==null?void 0:Y.message)||e.helperText||"",onOpen:Z,noOptionsText:w&&(_!=null&&_.dependsOn)&&!u?`Please select ${_.dependsOn.replace(/_/g," ")} first`:le?"Fetching data...":d&&!le&&He.length===0?"No options available":"Click to load options",onChange:W=>{const ue=(_==null?void 0:_.valueField)||e.value_field||"value";if(z){const Ce=(Array.isArray(W)?W:[]).map(De=>typeof De=="object"&&(De[ue]||De.value||De.id)||De);T.onChange(Ce)}else{let ve;W&&typeof W=="object"?ve=W[ue]||W.value||W.id||W:ve=W,T.onChange(ve);const Ce=e.selectedAssignments;if(Ce&&W&&typeof W=="object")for(const[De,Be]of Object.entries(Ce)){const Xe=W[Be];if(Xe!==void 0&&typeof s=="function")try{s(De,Xe,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!1})}catch{}}}}})}});case"date":return l.jsx(Oe,{name:e.name,control:t,defaultValue:R(),render:({field:T})=>l.jsx(cs,{...T,id:e.name,label:C(e.label),labelPosition:e.labelPosition||"inner",labelVariant:e.labelVariant,disabled:e.disabled,error:c,helperText:o==null?void 0:o.message,inputProps:{min:e.minDate,max:e.maxDate}})});case"image":return l.jsx(Oe,{name:e.name,control:t,defaultValue:R(),render:({field:T})=>{const g=T.value||e.defaultValue||e.src;if(g){const W=e.imageUploaded||{},ue=W.previewText||"Preview",ve=W.removeText||"Remove",Ce=W.saveText||"Save logo",De=W.showSave!==void 0?W.showSave:!!(e.onSave||W.saveText),Be=()=>{if(v(!0),typeof e.onPreview=="function")try{e.onPreview(g)}catch{}},Xe=()=>{T.onChange(""),typeof e.onRemove=="function"&&e.onRemove()},Ot=()=>{typeof e.onSave=="function"&&e.onSave({url:g,file:M.current||void 0})},Je=We=>{const pt=We.target.files&&We.target.files[0];if(pt){if(typeof e.onFileSelected=="function")try{e.onFileSelected(pt)}catch{}try{const Yt=URL.createObjectURL(pt);T.onChange(Yt)}catch{}M.current=pt,v(!1)}};return l.jsxs(x.Card,{sx:{display:"flex",alignItems:"center",gap:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",...W.cardSx},children:[l.jsx("input",{type:"file",ref:j,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:Je}),l.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[l.jsx(x.Box,{sx:{width:"30%",height:"10%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",background:"#FFFFFF",overflow:"hidden",...W.thumbnailSx},children:l.jsx("img",{src:g,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:"100%"}})}),l.jsxs(x.Box,{sx:{flexGrow:1},children:[l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:500,...W.fileNameSx},children:typeof g=="string"?g.split("/").pop():"Selected image"}),l.jsx(x.Typography,{sx:{fontSize:"10px",...W.fileMetaSx},children:"Image selected"})]}),l.jsxs(x.Box,{sx:{display:"flex",gap:1},children:[l.jsx(x.Button,{type:"button",sx:{...W.previewButtonSx},variant:"outlined",onClick:Be,startIcon:l.jsx(Fo,{}),children:ue}),l.jsx(x.Button,{variant:"outlined",color:"error",onClick:Xe,sx:{...W.removeButtonSx},startIcon:l.jsx(Ao,{}),children:ve}),De&&l.jsx(x.Button,{variant:"contained",onClick:Ot,sx:{...W.saveButtonSx},children:Ce})]})]}),l.jsxs(x.Dialog,{open:S,onClose:()=>v(!1),maxWidth:"md",fullWidth:!0,children:[l.jsx(x.DialogTitle,{children:W.previewTitle||"Image preview"}),l.jsx(x.DialogContent,{children:l.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:l.jsx("img",{src:g,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:380}})})}),l.jsxs(x.DialogActions,{children:[l.jsx(x.Button,{type:"button",variant:"outlined",onClick:()=>{var We;return(We=j.current)==null?void 0:We.click()},children:W.replaceText||"Replace logo"}),l.jsx(x.Button,{type:"button",variant:"contained",onClick:()=>v(!1),children:W.closeText||"Close"})]})]})]})}const z=e.imagePlaceholder||{},b=z.icon||"upload",O=j,q=()=>{var W;try{(W=O.current)==null||W.click()}catch{}},K=W=>{const ue=W.target.files&&W.target.files[0];if(ue){typeof e.onFileSelected=="function"&&e.onFileSelected(ue);try{const ve=URL.createObjectURL(ue);T.onChange(ve)}catch{}M.current=ue}};return l.jsxs(x.Card,{sx:{border:"1px dashed",borderColor:"#CCCCCC",boxShadow:"none",p:2,textAlign:"center",color:"primary.main",...z.sx},children:[l.jsx("input",{type:"file",ref:O,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:K}),l.jsx(Gn,{sx:{borderRadius:"8px",...z.iconSx},children:b==="image"?l.jsx($h,{sx:{width:36,height:36,color:"primary.main"}}):l.jsx(pi,{sx:{width:36,height:36,color:"primary.main"}})}),l.jsx(x.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main",...z.titleSx},children:z.title||"Drag & Drop the image here"}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main",...z.subtitleSx},children:z.subtitle||""}),l.jsx(x.Button,{onClick:q,sx:{my:2,...z.buttonSx},startIcon:l.jsx(pi,{}),variant:"contained",disabled:e.disabled,children:z.buttonText||"Upload File"}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,...z.helperTextSx},children:z.helperText||e.helperText||""})]})}});case"component":return l.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}},oe=P.useMemo(()=>!e.disabled||e.copyWhenDisabled===!1?!1:!["title","section","image","component"].includes(e.type),[e.disabled,e.copyWhenDisabled,e.type]),pe=P.useCallback(async()=>{try{const H=a?a[e.name]:void 0;let X="";H==null?X="":Array.isArray(H)?X=H.join(", "):typeof H=="object"?X=JSON.stringify(H):X=String(H),await navigator.clipboard.writeText(X),m(!0),window.setTimeout(()=>m(!1),1200)}catch{}},[a,e.name]);return l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:.3},children:[l.jsx(x.Box,{sx:{flexGrow:1},children:L?de():null}),oe&&l.jsx(Gn,{"aria-label":`copy ${e.label||e.name}`,onClick:pe,size:"small",children:E?l.jsx(os,{fontSize:"small"}):l.jsx(Rh,{fontSize:"small"})})]})};var na,_o;function Gh(){if(_o)return na;_o=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,j){return this._size>=this._maxSize&&this.clear(),v in this._values||this._size++,this._values[v]=j};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,o=new e(s),c=new e(s),d=new e(s);na={Cache:e,split:f,normalizePath:h,setter:function(v){var j=h(v);return c.get(v)||c.set(v,function(F,C){for(var R=0,B=j.length,_=F;R<B-1;){var I=j[R];if(I==="__proto__"||I==="constructor"||I==="prototype")return F;_=_[j[R++]]}_[j[R]]=C})},getter:function(v,j){var M=h(v);return d.get(v)||d.set(v,function(C){for(var R=0,B=M.length;R<B;)if(C!=null||!j)C=C[M[R++]];else return;return C})},join:function(v){return v.reduce(function(j,M){return j+(y(M)||r.test(M)?"["+M+"]":(j?".":"")+M)},"")},forEach:function(v,j,M){p(Array.isArray(v)?v:f(v),j,M)}};function h(v){return o.get(v)||o.set(v,f(v).map(function(j){return j.replace(a,"$2")}))}function f(v){return v.match(t)||[""]}function p(v,j,M){var F=v.length,C,R,B,_;for(R=0;R<F;R++)C=v[R],C&&(S(C)&&(C='"'+C+'"'),_=y(C),B=!_&&/^\d+$/.test(C),j.call(M,C,_,B,R,v))}function y(v){return typeof v=="string"&&v&&["'",'"'].indexOf(v.charAt(0))!==-1}function E(v){return v.match(n)&&!v.match(r)}function m(v){return i.test(v)}function S(v){return!y(v)&&(E(v)||m(v))}return na}var _r=Gh(),ia,Ro;function Qh(){if(Ro)return ia;Ro=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,p)=>`${f}${f?p[0].toUpperCase()+p.slice(1).toLowerCase():p.toLowerCase()}`,"");return ia={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(" ")},ia}var aa=Qh(),Ln={exports:{}},$o;function Zh(){if($o)return Ln.exports;$o=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),c={},d=s,h=r(a),f=n(i);for(a.forEach(function(y){if(!f.has(y[0])||!f.has(y[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});d--;)c[d]||p(i[d],d,new Set);return o;function p(y,E,m){if(m.has(y)){var S;try{S=", node was:"+JSON.stringify(y)}catch{S=""}throw new Error("Cyclic dependency"+S)}if(!f.has(y))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(y));if(!c[E]){c[E]=!0;var v=h.get(y)||new Set;if(v=Array.from(v),E=v.length){m.add(y);do{var j=v[--E];p(j,f.get(j),m)}while(E);m.delete(y)}o[--s]=y}}}function t(i){for(var a=new Set,s=0,o=i.length;s<o;s++){var c=i[s];a.add(c[0]),a.add(c[1])}return Array.from(a)}function r(i){for(var a=new Map,s=0,o=i.length;s<o;s++){var c=i[s];a.has(c[0])||a.set(c[0],new Set),a.has(c[1])||a.set(c[1],new Set),a.get(c[0]).add(c[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 Xh=Zh();const Jh=Ya(Xh),em=Object.prototype.toString,tm=Error.prototype.toString,rm=RegExp.prototype.toString,nm=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",im=/^Symbol\((.*)\)(.*)$/;function am(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Po(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return am(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return nm.call(e).replace(im,"Symbol($1)");const n=em.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+tm.call(e)+"]":n==="RegExp"?rm.call(e):null}function ur(e,t){let r=Po(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let a=Po(this[n],t);return a!==null?a:i},2)}function xc(e){return e==null?[]:[].concat(e)}let gc,yc,vc,sm=/\$\{\s*(\w+)\s*\}/g;gc=Symbol.toStringTag;class Do{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[gc]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],xc(t).forEach(a=>{if(lt.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]}}yc=Symbol.hasInstance;vc=Symbol.toStringTag;class lt 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(sm,(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 Do(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[vc]="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,lt)}static[yc](t){return Do[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}},at={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"},$a={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Pa={isValue:"${path} field must be ${value}"},Qn={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},om={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"},lm={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 lt.formatError($t.notType,e)}};Object.assign(Object.create(null),{mixed:$t,string:at,number:Xt,date:$a,object:Qn,array:om,boolean:Pa,tuple:lm});const fs=e=>e&&e.__isYupSchema__;class fi{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(c=>c===n);return new fi(t,(o,c)=>{var d;let h=s(...o)?i:a;return(d=h==null?void 0:h(c))!=null?d:c})}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(!fs(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const qn={context:"$",value:"."};function hi(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 At=e=>e==null;function Wr(e){function t({value:r,path:n="",options:i,originalValue:a,schema:s},o,c){const{name:d,test:h,params:f,message:p,skipAbsent:y}=e;let{parent:E,context:m,abortEarly:S=s.spec.abortEarly,disableStackTrace:v=s.spec.disableStackTrace}=i;function j(D){return mr.isRef(D)?D.getValue(r,E,m):D}function M(D={}){const L=Object.assign({value:r,originalValue:a,label:s.spec.label,path:D.path||n,spec:s.spec,disableStackTrace:D.disableStackTrace||v},f,D.params);for(const V of Object.keys(L))L[V]=j(L[V]);const $=new lt(lt.formatError(D.message||p,L),r,L.path,D.type||d,L.disableStackTrace);return $.params=L,$}const F=S?o:c;let C={path:n,parent:E,type:d,from:i.from,createError:M,resolve:j,options:i,originalValue:a,schema:s};const R=D=>{lt.isError(D)?F(D):D?c(null):F(M())},B=D=>{lt.isError(D)?F(D):o(D)};if(y&&At(r))return R(!0);let I;try{var u;if(I=h.call(C,r,C),typeof((u=I)==null?void 0:u.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(R,B)}}catch(D){B(D);return}R(I)}return t.OPTIONS=e,t}function cm(e,t,r,n=r){let i,a,s;return t?(_r.forEach(t,(o,c,d)=>{let h=c?o.slice(1,o.length-1):o;e=e.resolve({context:n,parent:i,value:r});let f=e.type==="tuple",p=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&&p>=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[p],e=f?e.spec.types[p]: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=c?"["+o+"]":"."+o}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class mi 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 mi(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(fs(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 mt{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 mi,this._blacklist=new mi,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&&At(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,c=t;o||(c=this._cast(c,Object.assign({assert:!1},r)));let d=[];for(let h of Object.values(this.internalTests))h&&d.push(h);this.runTests({path:a,value:c,originalValue:s,options:r,tests:d},n,h=>{if(h.length)return i(h,c);this.runTests({path:a,value:c,originalValue:s,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:a,value:s,originalValue:o,path:c,options:d}=t,h=m=>{i||(i=!0,r(m,s))},f=m=>{i||(i=!0,n(m,s))},p=a.length,y=[];if(!p)return f([]);let k={value:s,originalValue:o,path:c,options:d,schema:this};for(let m=0;m<a.length;m++){const C=a[m];C(k,h,function(S){S&&(Array.isArray(S)?y.push(...S):y.push(S)),--p<=0&&f(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 c=typeof o=="number";let d=n[o];const h=Object.assign({},s,{strict:!0,parent:n,value:d,originalValue:a[o],key:void 0,[c?"index":"key"]:o,path:c||o.includes(".")?`${i||""}[${c?o:`"${o}"`}]`:(i?`${i}.`:"")+t});return(f,p,y)=>this.resolve(h)._validate(d,h,p,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,(c,d)=>{lt.isError(c)&&(c.value=d),o(c)},(c,d)=>{c.length?o(new lt(c,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,c)=>{throw lt.isError(o)&&(o.value=c),o},(o,c)=>{if(o.length)throw new lt(o,t,void 0,void 0,s);a=c}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(lt.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(lt.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=xc(t).map(a=>new mr(a));return i.forEach(a=>{a.isSibling&&n.deps.push(a.key)}),n.conditions.push(typeof r=="function"?new fi(i,r):fi.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(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,d,h)=>h.findIndex(f=>f.name===c.name)===d)}}}mt.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])mt.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:a,schema:s}=cm(this,t,r,n.context);return s[e](i&&i[a],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])mt.prototype[e]=mt.prototype.oneOf;for(const e of["not","nope"])mt.prototype[e]=mt.prototype.notOneOf;const um=()=>!0;function bc(e){return new wc(e)}class wc extends mt{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:um},t))}}bc.prototype=wc.prototype;function Sc(){return new Cc}class Cc extends mt{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=Pa.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return At(r)||r===!0}})}isFalse(t=Pa.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return At(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)}}Sc.prototype=Cc.prototype;const pm=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function dm(e){const t=Da(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 Da(e){var t,r;const n=pm.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 fm=/^[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])?)*$/,hm=/^((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,mm=/^(?:[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,xm="^\\d{4}-\\d{2}-\\d{2}",gm="\\d{2}:\\d{2}:\\d{2}",ym="(([+-]\\d{2}(:?\\d{2})?)|Z)",vm=new RegExp(`${xm}T${gm}(\\.\\d+)?${ym}$`),bm=e=>At(e)||e===e.trim(),wm={}.toString();function vn(){return new Ec}class Ec extends mt{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===wm?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=at.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=at.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=at.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||at.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&n||s.search(t)!==-1})}email(t=at.email){return this.matches(fm,{name:"email",message:t,excludeEmptyString:!0})}url(t=at.url){return this.matches(hm,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=at.uuid){return this.matches(mm,{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(vm,{name:"datetime",message:r||at.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||at.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:a=>{if(!a||n)return!0;const s=Da(a);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||at.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const s=Da(a);return s?s.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=at.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:bm})}lowercase(t=at.lowercase){return this.transform(r=>At(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>At(r)||r===r.toLowerCase()})}uppercase(t=at.uppercase){return this.transform(r=>At(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>At(r)||r===r.toUpperCase()})}}vn.prototype=Ec.prototype;let Sm=e=>e!=+e;function kc(){return new Tc}class Tc extends mt{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Sm(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=>At(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=>At(i)?i:Math[t](i))}}kc.prototype=Tc.prototype;let jc=new Date(""),Cm=e=>Object.prototype.toString.call(e)==="[object Date]";function hs(){return new Pn}class Pn extends mt{constructor(){super({type:"date",check(t){return Cm(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=dm(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=$a.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=$a.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=jc;hs.prototype=Pn.prototype;hs.INVALID_DATE=jc;function Em(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([s,o])=>`${s}-${o}`));function a(s,o){let c=_r.split(s)[0];n.add(c),i.has(`${o}-${c}`)||r.push([o,c])}for(const s of Object.keys(e)){let o=e[s];n.add(s),mr.isRef(o)&&o.isSibling?a(o.path,s):fs(o)&&"deps"in o&&o.deps.forEach(c=>a(c,s))}return Jh.array(Array.from(n),r).reverse()}function Io(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 Fc(e){return(t,r)=>Io(e,t)-Io(e,r)}const km=(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 Tm=(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 Mo=e=>Object.prototype.toString.call(e)==="[object Object]";function zo(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const jm=Fc([]);function Ac(e){return new Oc(e)}class Oc extends mt{constructor(t){super({type:"object",check(r){return Mo(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=jm,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))),c={},d=Object.assign({},r,{parent:c,__validating:r.__validating||!1}),h=!1;for(const f of o){let p=a[f],y=f in i;if(p){let k,m=i[f];d.path=(r.path?`${r.path}.`:"")+f,p=p.resolve({value:m,context:r.context,parent:c});let C=p instanceof mt?p.spec:void 0,v=C==null?void 0:C.strict;if(C!=null&&C.strip){h=h||f in i;continue}k=!r.__validating||!v?p.cast(i[f],d):i[f],k!==void 0&&(c[f]=k)}else y&&!s&&(c[f]=i[f]);(y!==f in c||c[f]!==i[f])&&(h=!0)}return h?c: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,(c,d)=>{if(!o||!Mo(d)){i(c,d);return}s=s||d;let h=[];for(let f of this._nodes){let p=this.fields[f];!p||mr.isRef(p)||h.push(p.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(c),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=Em(t,r),n._sortErrors=Fc(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 Tm(a,t)&&(s=Object.assign({},a),n||delete s[t],s[r]=i(a)),s})}json(){return this.transform(km)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Qn.exact,test(r){if(r==null)return!0;const n=zo(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=zo(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(aa.camelCase)}snakeCase(){return this.transformKeys(aa.snakeCase)}constantCase(){return this.transformKeys(t=>aa.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}}Ac.prototype=Oc.prototype;const _c=e=>{const t={};return e.forEach(r=>{var s,o,c;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`,d=>d?new RegExp(r.pattern).test(d):!0)));break;case"email":n=vn().email(((s=r.validation)==null?void 0:s.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`,d=>d?new RegExp(r.pattern).test(d):!0)));break;case"number":if(n=kc().transform((d,h)=>h===""||h===null?void 0:d).nullable().typeError(`${r.label} must be a number`),r.validation)n=xr(n,r,"number");else{if(r.min!==void 0){const d=typeof r.min=="object"&&r.min!==null&&"field"in r.min,h=d?hi(r.min.field):r.min,f=d&&r.min.message?r.min.message:`${r.label} must be at least ${d?"the minimum value":r.min}`;n=n.min(h,f)}if(r.max!==void 0){const d=typeof r.max=="object"&&r.max!==null&&"field"in r.max,h=d?hi(r.max.field):r.max,f=d&&r.max.message?r.max.message:`${r.label} must be at most ${d?"the maximum value":r.max}`;n=n.max(h,f)}}break;case"select":n=vn(),r.validation&&(n=xr(n,r,"string"));break;case"checkbox":n=Sc(),r.validation&&(n=xr(n,r,"boolean"));break;case"date":n=hs().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=bc()}const i=((o=r.validation)==null?void 0:o.required)!==void 0?r.validation.required:r.required;if(typeof i=="function"?!1:!!i){const d=((c=r.validation)==null?void 0:c.message)||`${r.label} is required`;n=n.required(d)}t[r.name]=n}),Ac().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=hi(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=hi(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},Rc=({currentStep:e,totalSteps:t,onStepChange:r,stepTitles:n=[],showStepTitles:i=!0,completedSteps:a=[]})=>{const s=$.useMemo(()=>Array.from({length:t},(h,f)=>f+1),[t]),o=$.useMemo(()=>Math.round(e/t*100),[e,t]),c=h=>n[h-1]||`Step ${h}`,d=h=>h===e||a.includes(h)||h===e+1&&a.includes(e);return l.jsxs(x.Card,{sx:{mb:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",background:"#F8F8F8",borderRadius:"4px"},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:s.map((h,f)=>{const p=h===e,y=h<e||a.includes(h),k=p||y?"primary.main":"#8F97A4";return l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center"},children:[l.jsxs(x.Box,{onClick:()=>d(h)&&r(h),sx:{display:"flex",alignItems:"center",cursor:d(h)?"pointer":"default"},children:[l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:p||y?"2px solid":"1px solid",borderColor:p||y?"primary.main":"#8F97A4",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:m=>p||y?Et(m.palette.primary.main,.2):"transparent",mr:.5,color:k,fontWeight:p||y?600:500,fontSize:"12px"},children:h}),i&&l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:600,color:k},children:c(h)})]}),f<s.length-1&&l.jsx(x.Box,{sx:{width:40,height:2,mx:1,borderRadius:1,backgroundColor:h<e?"primary.main":"#DFE3E8"}})]},h)})}),l.jsx(x.Typography,{sx:{color:"#8F97A4",fontSize:"12px",fontWeight:500},children:`Step ${e} of ${t}, ${o}% complete`})]}),l.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}}})]})},$c=({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,c)=>{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"),p=o.type?o.type:h?"submit":"button",y=f?"outlined":"contained",k=o.disabled||t,m=C=>C&&["primary","secondary","error","info","success","warning"].includes(C)?C:"primary";return l.jsxs(x.Button,{type:p,variant:y,color:m(o.color),size:o.size||"large",disabled:k,onClick:o.onClick?()=>r(o):void 0,sx:o.sx,children:[o.loading&&l.jsx(x.CircularProgress,{size:20,sx:{mr:1}}),o.text]},`${o.text}-${c}`)};return l.jsxs(x.Box,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx(x.Box,{sx:{display:"flex",gap:2},children:n.map((o,c)=>s(o,c))}),l.jsx(x.Box,{sx:{display:"flex",gap:2},children:i.map((o,c)=>s(o,c))}),l.jsx(x.Box,{sx:{display:"flex",gap:2},children:a.map((o,c)=>s(o,c))})]})},Fm=({config:e,onSubmit:t,onStepChange:r,currentStep:n=1,totalSteps:i=1,isMultiStep:a=!1,formData:s})=>{const{buttons:o,position:c="right",layout:d="horizontal",spacing:h=2,sx:f}=e,p=v=>{let S="button",D="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"))&&(D="outlined"),{buttonType:S,buttonVariant:D}},y=v=>["primary","secondary","error","warning","info","success"].includes(v||"")?v:"primary",k=v=>{const{buttonType:S}=p(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))},m=(v,S)=>{const{buttonType:D,buttonVariant:j}=p(v),E=y(v.color);return l.jsx(x.Button,{type:D,variant:j,color:E,size:v.size||"medium",disabled:v.disabled,onClick:()=>k(v),sx:v.sx,children:v.text},S)},C=()=>{const v={display:"flex",gap:h,...f};switch(c){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"?l.jsx(x.Box,{sx:C(),children:o.map((v,S)=>l.jsx(x.Box,{sx:{width:"100%"},children:m(v,S)},S))}):l.jsx(x.Box,{sx:C(),children:l.jsx(x.ButtonGroup,{variant:"outlined",size:"medium",children:o.map((v,S)=>m(v,S))})})},Pc=(e,t)=>{const r=e==null?void 0:e.showWhen;if(r){if(typeof r=="function")try{return!!r(t||{})}catch{return!0}if(r&&typeof r=="object"){const n=r.field,i=r.equals,a=r.in,s=n?(t||{})[n]:void 0;if(n&&typeof i<"u")return s===i;if(n&&Array.isArray(a))return a.includes(s)}}return!0},Xn=(e,t)=>{const r=[];for(const n of e)if(Pc(n,t)&&(r.push(n),n.type==="tabs"&&n.items)){const i=n.items||[],a=(t||{})[n.name],s=(()=>{if(typeof a=="string"||typeof a=="number"){const c=i.findIndex((d,h)=>typeof d.value=="string"||typeof d.value=="number"?d.value===a:h===a);return c>=0?c:0}return Number(a)||0})(),o=i[s]||{};Array.isArray(o.fields)&&r.push(...Xn(o.fields,t))}return r},Am=new Iu({defaultOptions:{queries:{staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0}}}),Om=e=>l.jsx(Nu,{client:Am,children:l.jsx(_m,{...e})}),_m=({id:e,theme:t,fields:r,onSubmit:n,onChange:i,submitButtonText:a="Submit",onSubmitClick:s,defaultValues:o,showSubmitButton:c=!0,buttons:d,buttonGroup:h,formCardWrap:f,formCardSx:p,formCardProps:y,baseUrl:k,apiHeaders:m,stepNavigationProps:C})=>{var gt,He;const v=[...new Set(r.map(K=>K.step).filter(K=>K!=null&&K>0))].sort((K,se)=>(K||0)-(se||0)),S=v.length>1,D=v.length||1,[j,E]=$.useState(1),R=S?r.filter(K=>K.step===j):r,z=$.useCallback(K=>{const se=[];for(const g of K)if(se.push(g),g.type==="tabs"&&g.items)for(const w of g.items||[])Array.isArray(w.fields)&&se.push(...z(w.fields));return se},[]),{control:_,handleSubmit:I,formState:{errors:u},watch:P,setValue:L,resetField:A,trigger:B}=mu({resolver:$.useCallback((K,se,g)=>{const b=Xn(S?R:r,K),N=_c(b);return yu(N)(K,se,g)},[S,R,r]),mode:"onChange",defaultValues:o}),Y=P(),ae=$.useRef({});$.useEffect(()=>{const K=[];for(const se of r){const g=se.depends_on;g&&typeof se.name=="string"&&K.push({dependentField:se.name,dependencyName:g})}if(K.length!==0)for(const{dependentField:se,dependencyName:g}of K){const w=ae.current[g],b=Y==null?void 0:Y[g];if(w!==b)try{A(se)}catch{}ae.current[g]=b}},[r,Y,A]);const de=$.useRef(i);$.useEffect(()=>{de.current=i},[i]);const ce=$.useMemo(()=>{try{return JSON.stringify(Y)}catch{return String(Date.now())}},[Y]),Q=$.useRef(null);$.useEffect(()=>{de.current&&Q.current!==ce&&(Q.current=ce,de.current(Y))},[ce]);const q=async()=>{if(!S)return!0;const K=r.filter(g=>g.step===j);for(const g of K)if(typeof g.required=="function"?!!g.required(Y):!!g.required){const b=Y[g.name];let N=!0;if(g.type==="checkbox"?N=b===!0:Array.isArray(b)?N=b.length>0:N=b!=null&&b!=="",!N)return!1}return await B()?!0:Object.keys(u).filter(w=>K.some(b=>b.name===w)).map(w=>{const b=u[w];return typeof(b==null?void 0:b.message)=="string"?b.message:`${w} is invalid`}).length===0},G=$.useMemo(()=>{if(!S)return!0;const K=r.filter(g=>g.step===j);for(const g of K)if(typeof g.required=="function"?!!g.required(Y):!!g.required){const b=Y[g.name];let N=!0;if(g.type==="checkbox"?N=b===!0:Array.isArray(b)?N=b.length>0:N=b!=null&&b!=="",!N)return!1}return Object.keys(u).filter(g=>K.some(w=>w.name===g)).length===0},[S,j,r,Y,u]),ue=$.useCallback((K,se)=>Pc(K,se),[]),fe=$.useCallback(K=>{const se=[];for(const g of K)if(se.push(g),g.type==="tabs"&&g.items)for(const w of g.items||[])Array.isArray(w.fields)&&se.push(...fe(w.fields));return se},[]),pe=$.useCallback((K,se)=>Xn(K,se),[]),me=$.useMemo(()=>{if(S)return G;const K=Xn(r,Y);for(const w of K){if(!ue(w,Y))continue;if(typeof w.required=="function"?!!w.required(Y):!!w.required){const N=Y[w.name];let O=!0;if(w.type==="checkbox"?O=N===!0:O=N!=null&&N!==""&&!(Array.isArray(N)&&N.length===0),!O)return!1}}const se=new Set(K.map(w=>w.name));return Object.keys(u).filter(w=>se.has(w)).length===0},[S,G,r,Y,u,pe,ue]),W=async K=>{K<1||K>D||K>j&&S&&!await q()||E(K)},J=async K=>{if(S&&j<D){console.warn("Form submission attempted on non-final step");return}s&&s(K),n(K)},re=async K=>{K&&(K.preventDefault(),K.stopPropagation()),S&&j<D&&await q()&&W(j+1)},oe=K=>{K&&(K.preventDefault(),K.stopPropagation()),S&&j>1&&W(j-1)},le=K=>K.col?K.col:(K.xs||K.sm||K.md||K.lg||K.xl)&&(K.xs||K.sm||K.md||K.lg||K.xl)||12,ve=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:((gt=t.typography)==null?void 0:gt.fontFamily)||"Roboto, Arial, sans-serif",fontSize:typeof((He=t.typography)==null?void 0:He.fontSize)=="number"?t.typography.fontSize:14}}):void 0,X=()=>{if(h&&h.buttons&&h.buttons.length>0){const K={...h,buttons:h.buttons.map(se=>{const g=(se.text||"").toLowerCase(),w=se.type==="submit"||g.includes("submit")||g.includes("save")||g.includes("finish")||g.includes("complete"),b=g.includes("next");let N=!1;return S?(w||b)&&(N=!G):w&&(N=!me),{...se,disabled:se.disabled||N}})};return l.jsx(x.Box,{sx:{mt:3},children:l.jsx(Fm,{config:K,onSubmit:J,onStepChange:W,currentStep:j,totalSteps:D,isMultiStep:S,formData:Y})})}if(d&&d.length>0){const K=d.map(se=>{const g=(se.text||"").toLowerCase(),w=se.type==="submit"||g.includes("submit")||g.includes("save")||g.includes("finish")||g.includes("complete"),b=g.includes("next");let N=!1;return S?(w||b)&&(N=!G):w&&(N=!me),{...se,disabled:se.disabled||N}});return l.jsx($c,{buttons:K})}return c?l.jsx(x.Box,{sx:{mt:3,display:"flex",justifyContent:"flex-end",flexDirection:"column",alignItems:"flex-end"},children:l.jsxs(x.Box,{sx:{display:"flex",gap:2},children:[S&&j>1&&l.jsx(x.Button,{type:"button",variant:"outlined",onClick:oe,children:"Previous"}),S?j<D?l.jsx(x.Button,{type:"button",variant:"contained",color:"primary",size:"large",disabled:!G,onClick:re,children:"Next"}):l.jsx(x.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!G,children:a}):l.jsx(x.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!me,children:a})]})}):null},Ie=$.useMemo(()=>{const K=[];let se=[];for(const g of R)g.type==="section"&&se.length>0?(K.push(se),se=[g]):se.push(g);return se.length>0&&K.push(se),K},[R]),We=l.jsxs(x.Box,{component:"form",onSubmit:K=>{if(S&&j<D){K.preventDefault(),K.stopPropagation(),G&&re();return}I(J)(K)},id:e,onKeyDown:K=>{K.key==="Enter"&&S&&j<D&&(K.preventDefault(),G&&re())},children:[S&&l.jsx(Rc,{currentStep:j,totalSteps:D,onStepChange:W,stepTitles:C==null?void 0:C.stepTitles,showStepTitles:(C==null?void 0:C.showStepTitles)!==!1}),Ie.map((K,se)=>{const g=K.find(M=>M.type==="section");if(g&&!ue(g,Y))return null;const w=(g==null?void 0:g.cardWrap)!==!1,b={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},N={display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},O=l.jsx(l.Fragment,{children:K.map(M=>{if(!ue(M,Y))return null;const Z=le(M);return l.jsx(x.Box,{sx:{gridColumn:`span ${Z}`},children:l.jsx(ds,{field:M,control:_,errors:u,baseUrl:k,apiHeaders:m,formData:Y,setValue:L})},M.name)})});return w?l.jsx(x.Card,{sx:{...b,...(g==null?void 0:g.cardSx)||{}},...(g==null?void 0:g.cardProps)||{},children:O},`group-${se}`):l.jsx(x.Box,{sx:N,children:O},`group-${se}`)}),X()]}),Qe=f?l.jsx(x.Card,{sx:{p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",...p},...y,children:We}):We;return ve?l.jsx(x.ThemeProvider,{theme:ve,children:Qe}):Qe},Rm=({src:e,alt:t,width:r="100%",height:n="auto",style:i,className:a,onClick:s})=>l.jsx(x.Box,{sx:{textAlign:"center"},children:l.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 c(h){try{d(n.throw(h))}catch(f){s(f)}}function d(h){h.done?a(h.value):i(h.value).then(o,c)}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=Pm(e),{webkitRelativePath:i}=e,a=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof n.path!="string"&&Bo(n,"path",a),Bo(n,"relativePath",a),n}function Pm(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 Bo(e,t,r){Object.defineProperty(e,t,{value:r,writable:!1,configurable:!1,enumerable:!0})}const Dm=[".DS_Store","Thumbs.db"];function Im(e){return Mr(this,void 0,void 0,function*(){return xi(e)&&Mm(e.dataTransfer)?Nm(e.dataTransfer,e.type):zm(e)?Bm(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?Vm(e):[]})}function Mm(e){return xi(e)}function zm(e){return xi(e)&&xi(e.target)}function xi(e){return typeof e=="object"&&e!==null}function Bm(e){return Ia(e.target.files).map(t=>cn(t))}function Vm(e){return Mr(this,void 0,void 0,function*(){return(yield Promise.all(e.map(r=>r.getFile()))).map(r=>cn(r))})}function Nm(e,t){return Mr(this,void 0,void 0,function*(){if(e.items){const r=Ia(e.items).filter(i=>i.kind==="file");if(t!=="drop")return r;const n=yield Promise.all(r.map(Lm));return Vo(Dc(n))}return Vo(Ia(e.files).map(r=>cn(r)))})}function Vo(e){return e.filter(t=>Dm.indexOf(t.name)===-1)}function Ia(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 Lm(e){if(typeof e.webkitGetAsEntry!="function")return No(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Ic(t):No(e,t)}function Dc(e){return e.reduce((t,r)=>[...t,...Array.isArray(r)?Dc(r):[r]],[])}function No(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 qm(e){return Mr(this,void 0,void 0,function*(){return e.isDirectory?Ic(e):Wm(e)})}function Ic(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(qm));i.push(o),a()}else try{const o=yield Promise.all(i);r(o)}catch(o){n(o)}}),s=>{n(s)})}a()})}function Wm(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={},Lo;function Um(){return Lo||(Lo=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 Hm=Um();const sa=Ya(Hm);function qo(e){return Gm(e)||Ym(e)||zc(e)||Km()}function Km(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
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,c=t;o||(c=this._cast(c,Object.assign({assert:!1},r)));let d=[];for(let h of Object.values(this.internalTests))h&&d.push(h);this.runTests({path:a,value:c,originalValue:s,options:r,tests:d},n,h=>{if(h.length)return i(h,c);this.runTests({path:a,value:c,originalValue:s,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:a,value:s,originalValue:o,path:c,options:d}=t,h=m=>{i||(i=!0,r(m,s))},f=m=>{i||(i=!0,n(m,s))},p=a.length,y=[];if(!p)return f([]);let E={value:s,originalValue:o,path:c,options:d,schema:this};for(let m=0;m<a.length;m++){const S=a[m];S(E,h,function(j){j&&(Array.isArray(j)?y.push(...j):y.push(j)),--p<=0&&f(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 c=typeof o=="number";let d=n[o];const h=Object.assign({},s,{strict:!0,parent:n,value:d,originalValue:a[o],key:void 0,[c?"index":"key"]:o,path:c||o.includes(".")?`${i||""}[${c?o:`"${o}"`}]`:(i?`${i}.`:"")+t});return(f,p,y)=>this.resolve(h)._validate(d,h,p,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,(c,d)=>{lt.isError(c)&&(c.value=d),o(c)},(c,d)=>{c.length?o(new lt(c,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,c)=>{throw lt.isError(o)&&(o.value=c),o},(o,c)=>{if(o.length)throw new lt(o,t,void 0,void 0,s);a=c}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(lt.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(lt.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=xc(t).map(a=>new mr(a));return i.forEach(a=>{a.isSibling&&n.deps.push(a.key)}),n.conditions.push(typeof r=="function"?new fi(i,r):fi.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(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,d,h)=>h.findIndex(f=>f.name===c.name)===d)}}}mt.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])mt.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:a,schema:s}=cm(this,t,r,n.context);return s[e](i&&i[a],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])mt.prototype[e]=mt.prototype.oneOf;for(const e of["not","nope"])mt.prototype[e]=mt.prototype.notOneOf;const um=()=>!0;function bc(e){return new wc(e)}class wc extends mt{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:um},t))}}bc.prototype=wc.prototype;function Sc(){return new Cc}class Cc extends mt{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=Pa.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return At(r)||r===!0}})}isFalse(t=Pa.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return At(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)}}Sc.prototype=Cc.prototype;const pm=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function dm(e){const t=Da(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 Da(e){var t,r;const n=pm.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 fm=/^[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])?)*$/,hm=/^((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,mm=/^(?:[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,xm="^\\d{4}-\\d{2}-\\d{2}",gm="\\d{2}:\\d{2}:\\d{2}",ym="(([+-]\\d{2}(:?\\d{2})?)|Z)",vm=new RegExp(`${xm}T${gm}(\\.\\d+)?${ym}$`),bm=e=>At(e)||e===e.trim(),wm={}.toString();function vn(){return new Ec}class Ec extends mt{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===wm?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=at.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=at.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=at.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||at.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&n||s.search(t)!==-1})}email(t=at.email){return this.matches(fm,{name:"email",message:t,excludeEmptyString:!0})}url(t=at.url){return this.matches(hm,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=at.uuid){return this.matches(mm,{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(vm,{name:"datetime",message:r||at.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||at.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:a=>{if(!a||n)return!0;const s=Da(a);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||at.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const s=Da(a);return s?s.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=at.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:bm})}lowercase(t=at.lowercase){return this.transform(r=>At(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>At(r)||r===r.toLowerCase()})}uppercase(t=at.uppercase){return this.transform(r=>At(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>At(r)||r===r.toUpperCase()})}}vn.prototype=Ec.prototype;let Sm=e=>e!=+e;function kc(){return new Tc}class Tc extends mt{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Sm(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=>At(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=>At(i)?i:Math[t](i))}}kc.prototype=Tc.prototype;let jc=new Date(""),Cm=e=>Object.prototype.toString.call(e)==="[object Date]";function hs(){return new Pn}class Pn extends mt{constructor(){super({type:"date",check(t){return Cm(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=dm(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=$a.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=$a.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=jc;hs.prototype=Pn.prototype;hs.INVALID_DATE=jc;function Em(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([s,o])=>`${s}-${o}`));function a(s,o){let c=_r.split(s)[0];n.add(c),i.has(`${o}-${c}`)||r.push([o,c])}for(const s of Object.keys(e)){let o=e[s];n.add(s),mr.isRef(o)&&o.isSibling?a(o.path,s):fs(o)&&"deps"in o&&o.deps.forEach(c=>a(c,s))}return Jh.array(Array.from(n),r).reverse()}function Io(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 Fc(e){return(t,r)=>Io(e,t)-Io(e,r)}const km=(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 Tm=(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 Mo=e=>Object.prototype.toString.call(e)==="[object Object]";function zo(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const jm=Fc([]);function Ac(e){return new Oc(e)}class Oc extends mt{constructor(t){super({type:"object",check(r){return Mo(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=jm,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))),c={},d=Object.assign({},r,{parent:c,__validating:r.__validating||!1}),h=!1;for(const f of o){let p=a[f],y=f in i;if(p){let E,m=i[f];d.path=(r.path?`${r.path}.`:"")+f,p=p.resolve({value:m,context:r.context,parent:c});let S=p instanceof mt?p.spec:void 0,v=S==null?void 0:S.strict;if(S!=null&&S.strip){h=h||f in i;continue}E=!r.__validating||!v?p.cast(i[f],d):i[f],E!==void 0&&(c[f]=E)}else y&&!s&&(c[f]=i[f]);(y!==f in c||c[f]!==i[f])&&(h=!0)}return h?c: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,(c,d)=>{if(!o||!Mo(d)){i(c,d);return}s=s||d;let h=[];for(let f of this._nodes){let p=this.fields[f];!p||mr.isRef(p)||h.push(p.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(c),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=Em(t,r),n._sortErrors=Fc(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 Tm(a,t)&&(s=Object.assign({},a),n||delete s[t],s[r]=i(a)),s})}json(){return this.transform(km)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Qn.exact,test(r){if(r==null)return!0;const n=zo(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=zo(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(aa.camelCase)}snakeCase(){return this.transformKeys(aa.snakeCase)}constantCase(){return this.transformKeys(t=>aa.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}}Ac.prototype=Oc.prototype;const _c=e=>{const t={};return e.forEach(r=>{var s,o,c;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`,d=>d?new RegExp(r.pattern).test(d):!0)));break;case"email":n=vn().email(((s=r.validation)==null?void 0:s.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`,d=>d?new RegExp(r.pattern).test(d):!0)));break;case"number":if(n=kc().transform((d,h)=>h===""||h===null?void 0:d).nullable().typeError(`${r.label} must be a number`),r.validation)n=xr(n,r,"number");else{if(r.min!==void 0){const d=typeof r.min=="object"&&r.min!==null&&"field"in r.min,h=d?hi(r.min.field):r.min,f=d&&r.min.message?r.min.message:`${r.label} must be at least ${d?"the minimum value":r.min}`;n=n.min(h,f)}if(r.max!==void 0){const d=typeof r.max=="object"&&r.max!==null&&"field"in r.max,h=d?hi(r.max.field):r.max,f=d&&r.max.message?r.max.message:`${r.label} must be at most ${d?"the maximum value":r.max}`;n=n.max(h,f)}}break;case"select":n=vn(),r.validation&&(n=xr(n,r,"string"));break;case"checkbox":n=Sc(),r.validation&&(n=xr(n,r,"boolean"));break;case"date":n=hs().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=bc()}const i=((o=r.validation)==null?void 0:o.required)!==void 0?r.validation.required:r.required;if(typeof i=="function"?!1:!!i){const d=((c=r.validation)==null?void 0:c.message)||`${r.label} is required`;n=n.required(d)}t[r.name]=n}),Ac().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=hi(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=hi(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},Rc=({currentStep:e,totalSteps:t,onStepChange:r,stepTitles:n=[],showStepTitles:i=!0,completedSteps:a=[]})=>{const s=P.useMemo(()=>Array.from({length:t},(h,f)=>f+1),[t]),o=P.useMemo(()=>Math.round(e/t*100),[e,t]),c=h=>n[h-1]||`Step ${h}`,d=h=>h===e||a.includes(h)||h===e+1&&a.includes(e);return l.jsxs(x.Card,{sx:{mb:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",background:"#F8F8F8",borderRadius:"4px"},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[l.jsx(x.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:s.map((h,f)=>{const p=h===e,y=h<e||a.includes(h),E=p||y?"primary.main":"#8F97A4";return l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center"},children:[l.jsxs(x.Box,{onClick:()=>d(h)&&r(h),sx:{display:"flex",alignItems:"center",cursor:d(h)?"pointer":"default"},children:[l.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:p||y?"2px solid":"1px solid",borderColor:p||y?"primary.main":"#8F97A4",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:m=>p||y?Ct(m.palette.primary.main,.2):"transparent",mr:.5,color:E,fontWeight:p||y?600:500,fontSize:"12px"},children:h}),i&&l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:600,color:E},children:c(h)})]}),f<s.length-1&&l.jsx(x.Box,{sx:{width:40,height:2,mx:1,borderRadius:1,backgroundColor:h<e?"primary.main":"#DFE3E8"}})]},h)})}),l.jsx(x.Typography,{sx:{color:"#8F97A4",fontSize:"12px",fontWeight:500},children:`Step ${e} of ${t}, ${o}% complete`})]}),l.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}}})]})},$c=({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,c)=>{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"),p=o.type?o.type:h?"submit":"button",y=f?"outlined":"contained",E=o.disabled||t,m=S=>S&&["primary","secondary","error","info","success","warning"].includes(S)?S:"primary";return l.jsxs(x.Button,{type:p,variant:y,color:m(o.color),size:o.size||"large",disabled:E,onClick:o.onClick?()=>r(o):void 0,sx:o.sx,children:[o.loading&&l.jsx(x.CircularProgress,{size:20,sx:{mr:1}}),o.text]},`${o.text}-${c}`)};return l.jsxs(x.Box,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx(x.Box,{sx:{display:"flex",gap:2},children:n.map((o,c)=>s(o,c))}),l.jsx(x.Box,{sx:{display:"flex",gap:2},children:i.map((o,c)=>s(o,c))}),l.jsx(x.Box,{sx:{display:"flex",gap:2},children:a.map((o,c)=>s(o,c))})]})},Fm=({config:e,onSubmit:t,onStepChange:r,currentStep:n=1,totalSteps:i=1,isMultiStep:a=!1,formData:s})=>{const{buttons:o,position:c="right",layout:d="horizontal",spacing:h=2,sx:f}=e,p=v=>{let j="button",M="contained";return v.type?j=v.type:v.text.toLowerCase().includes("submit")||v.text.toLowerCase().includes("save")||v.text.toLowerCase().includes("next")?j="submit":(v.text.toLowerCase().includes("reset")||v.text.toLowerCase().includes("clear"))&&(j="reset"),(v.text.toLowerCase().includes("cancel")||v.text.toLowerCase().includes("back")||v.text.toLowerCase().includes("draft"))&&(M="outlined"),{buttonType:j,buttonVariant:M}},y=v=>["primary","secondary","error","warning","info","success"].includes(v||"")?v:"primary",E=v=>{const{buttonType:j}=p(v);v.onClick?v.onClick():j==="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,j)=>{const{buttonType:M,buttonVariant:F}=p(v),C=y(v.color);return l.jsx(x.Button,{type:M,variant:F,color:C,size:v.size||"medium",disabled:v.disabled,onClick:()=>E(v),sx:v.sx,children:v.text},j)},S=()=>{const v={display:"flex",gap:h,...f};switch(c){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"?l.jsx(x.Box,{sx:S(),children:o.map((v,j)=>l.jsx(x.Box,{sx:{width:"100%"},children:m(v,j)},j))}):l.jsx(x.Box,{sx:S(),children:l.jsx(x.ButtonGroup,{variant:"outlined",size:"medium",children:o.map((v,j)=>m(v,j))})})},Pc=(e,t)=>{const r=e==null?void 0:e.showWhen;if(r){if(typeof r=="function")try{return!!r(t||{})}catch{return!0}if(r&&typeof r=="object"){const n=r.field,i=r.equals,a=r.in,s=n?(t||{})[n]:void 0;if(n&&typeof i<"u")return s===i;if(n&&Array.isArray(a))return a.includes(s)}}return!0},Xn=(e,t)=>{const r=[];for(const n of e)if(Pc(n,t)&&(r.push(n),n.type==="tabs"&&n.items)){const i=n.items||[],a=(t||{})[n.name],s=(()=>{if(typeof a=="string"||typeof a=="number"){const c=i.findIndex((d,h)=>typeof d.value=="string"||typeof d.value=="number"?d.value===a:h===a);return c>=0?c:0}return Number(a)||0})(),o=i[s]||{};Array.isArray(o.fields)&&r.push(...Xn(o.fields,t))}return r},Am=new Iu({defaultOptions:{queries:{staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0}}}),Om=e=>l.jsx(Nu,{client:Am,children:l.jsx(_m,{...e})}),_m=({id:e,theme:t,fields:r,onSubmit:n,onChange:i,submitButtonText:a="Submit",onSubmitClick:s,defaultValues:o,showSubmitButton:c=!0,buttons:d,buttonGroup:h,stickyButtons:f,stickyButtonsSx:p,fixedButtons:y,fixedButtonsSx:E,formCardWrap:m,formCardSx:S,formCardProps:v,baseUrl:j,apiHeaders:M,stepNavigationProps:F})=>{var w,T;const C=[...new Set(r.map(g=>g.step).filter(g=>g!=null&&g>0))].sort((g,z)=>(g||0)-(z||0)),R=C.length>1,B=C.length||1,[_,I]=P.useState(1),u=R?r.filter(g=>g.step===_):r,D=P.useCallback(g=>{const z=[];for(const b of g)if(z.push(b),b.type==="tabs"&&b.items)for(const O of b.items||[])Array.isArray(O.fields)&&z.push(...D(O.fields));return z},[]),{control:L,handleSubmit:$,formState:{errors:V},watch:ee,setValue:ie,resetField:he,trigger:le}=mu({resolver:P.useCallback((g,z,b)=>{const q=Xn(R?u:r,g),K=_c(q);return yu(K)(g,z,b)},[R,u,r]),mode:"onChange",defaultValues:o}),Y=ee(),U=P.useRef({});P.useEffect(()=>{const g=[];for(const z of r){const b=z.depends_on;b&&typeof z.name=="string"&&g.push({dependentField:z.name,dependencyName:b})}if(g.length!==0)for(const{dependentField:z,dependencyName:b}of g){const O=U.current[b],q=Y==null?void 0:Y[b];if(O!==q)try{he(z)}catch{}U.current[b]=q}},[r,Y,he]);const Z=P.useRef(i);P.useEffect(()=>{Z.current=i},[i]);const ce=P.useMemo(()=>{try{return JSON.stringify(Y)}catch{return String(Date.now())}},[Y]),de=P.useRef(null);P.useEffect(()=>{Z.current&&de.current!==ce&&(de.current=ce,Z.current(Y))},[ce]);const oe=async()=>{if(!R)return!0;const g=r.filter(b=>b.step===_);for(const b of g)if(typeof b.required=="function"?!!b.required(Y):!!b.required){const q=Y[b.name];let K=!0;if(b.type==="checkbox"?K=q===!0:Array.isArray(q)?K=q.length>0:K=q!=null&&q!=="",!K)return!1}return await le()?!0:Object.keys(V).filter(O=>g.some(q=>q.name===O)).map(O=>{const q=V[O];return typeof(q==null?void 0:q.message)=="string"?q.message:`${O} is invalid`}).length===0},pe=P.useMemo(()=>{if(!R)return!0;const g=r.filter(b=>b.step===_);for(const b of g)if(typeof b.required=="function"?!!b.required(Y):!!b.required){const q=Y[b.name];let K=!0;if(b.type==="checkbox"?K=q===!0:Array.isArray(q)?K=q.length>0:K=q!=null&&q!=="",!K)return!1}return Object.keys(V).filter(b=>g.some(O=>O.name===b)).length===0},[R,_,r,Y,V]),H=P.useCallback((g,z)=>Pc(g,z),[]),X=P.useCallback(g=>{const z=[];for(const b of g)if(z.push(b),b.type==="tabs"&&b.items)for(const O of b.items||[])Array.isArray(O.fields)&&z.push(...X(O.fields));return z},[]),te=P.useCallback((g,z)=>Xn(g,z),[]),ae=P.useMemo(()=>{if(R)return pe;const g=Xn(r,Y);for(const O of g){if(!H(O,Y))continue;if(typeof O.required=="function"?!!O.required(Y):!!O.required){const K=Y[O.name];let W=!0;if(O.type==="checkbox"?W=K===!0:W=K!=null&&K!==""&&!(Array.isArray(K)&&K.length===0),!W)return!1}}const z=new Set(g.map(O=>O.name));return Object.keys(V).filter(O=>z.has(O)).length===0},[R,pe,r,Y,V,te,H]),se=async g=>{g<1||g>B||g>_&&R&&!await oe()||I(g)},ge=async g=>{if(R&&_<B){console.warn("Form submission attempted on non-final step");return}s&&s(g),n(g)},Q=async g=>{g&&(g.preventDefault(),g.stopPropagation()),R&&_<B&&await oe()&&se(_+1)},Pe=g=>{g&&(g.preventDefault(),g.stopPropagation()),R&&_>1&&se(_-1)},qe=g=>g.col?g.col:(g.xs||g.sm||g.md||g.lg||g.xl)&&(g.xs||g.sm||g.md||g.lg||g.xl)||12,Ge=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:((w=t.typography)==null?void 0:w.fontFamily)||"Roboto, Arial, sans-serif",fontSize:typeof((T=t.typography)==null?void 0:T.fontSize)=="number"?t.typography.fontSize:14}}):void 0,kt=()=>{const g=y?{position:"fixed",left:0,right:0,bottom:0,background:"#FFFFFF",pt:2,px:2,pb:2,zIndex:1300,borderTop:"1px solid rgba(0,0,0,0.08)",boxShadow:"0 -2px 8px rgba(0,0,0,0.08)",...E}:f?{position:"sticky",bottom:0,background:"#FFFFFF",pt:2,pb:2,zIndex:1200,borderTop:"1px solid rgba(0,0,0,0.08)",boxShadow:"0 -2px 8px rgba(0,0,0,0.04)",...p}:void 0;if(h&&h.buttons&&h.buttons.length>0){const z={...h,buttons:h.buttons.map(b=>{const O=(b.text||"").toLowerCase(),q=b.type==="submit"||O.includes("submit")||O.includes("save")||O.includes("finish")||O.includes("complete"),K=O.includes("next");let W=!1;return R?(q||K)&&(W=!pe):q&&(W=!ae),{...b,disabled:b.disabled||W}})};return l.jsx(x.Box,{sx:{mt:3,...g||{}},children:l.jsx(Fm,{config:z,onSubmit:ge,onStepChange:se,currentStep:_,totalSteps:B,isMultiStep:R,formData:Y})})}if(d&&d.length>0){const z=d.map(b=>{const O=(b.text||"").toLowerCase(),q=b.type==="submit"||O.includes("submit")||O.includes("save")||O.includes("finish")||O.includes("complete"),K=O.includes("next");let W=!1;return R?(q||K)&&(W=!pe):q&&(W=!ae),{...b,disabled:b.disabled||W}});return l.jsx(x.Box,{sx:g,children:l.jsx($c,{buttons:z})})}return c?l.jsx(x.Box,{sx:{mt:3,display:"flex",justifyContent:"flex-end",flexDirection:"column",alignItems:"flex-end",...g||{}},children:l.jsxs(x.Box,{sx:{display:"flex",gap:2},children:[R&&_>1&&l.jsx(x.Button,{type:"button",variant:"outlined",onClick:Pe,children:"Previous"}),R?_<B?l.jsx(x.Button,{type:"button",variant:"contained",color:"primary",size:"large",disabled:!pe,onClick:Q,children:"Next"}):l.jsx(x.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!pe,children:a}):l.jsx(x.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!ae,children:a})]})}):null},Ue=P.useMemo(()=>{const g=[];let z=[];for(const b of u)b.type==="section"&&z.length>0?(g.push(z),z=[b]):z.push(b);return z.length>0&&g.push(z),g},[u]),Ze=l.jsxs(x.Box,{component:"form",onSubmit:g=>{if(R&&_<B){g.preventDefault(),g.stopPropagation(),pe&&Q();return}$(ge)(g)},id:e,onKeyDown:g=>{g.key==="Enter"&&R&&_<B&&(g.preventDefault(),pe&&Q())},sx:{pb:y?10:void 0},children:[R&&l.jsx(Rc,{currentStep:_,totalSteps:B,onStepChange:se,stepTitles:F==null?void 0:F.stepTitles,showStepTitles:(F==null?void 0:F.showStepTitles)!==!1}),Ue.map((g,z)=>{const b=g.find(ue=>ue.type==="section");if(b&&!H(b,Y))return null;const O=(b==null?void 0:b.cardWrap)!==!1,q={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},K={display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},W=l.jsx(l.Fragment,{children:g.map(ue=>{if(!H(ue,Y))return null;const ve=qe(ue);return l.jsx(x.Box,{sx:{gridColumn:`span ${ve}`},children:l.jsx(ds,{field:ue,control:L,errors:V,baseUrl:j,apiHeaders:M,formData:Y,setValue:ie})},ue.name)})});return O?l.jsx(x.Card,{sx:{...q,...(b==null?void 0:b.cardSx)||{}},...(b==null?void 0:b.cardProps)||{},children:W},`group-${z}`):l.jsx(x.Box,{sx:K,children:W},`group-${z}`)}),kt()]}),He=m?l.jsx(x.Card,{sx:{p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",...S},...v,children:Ze}):Ze;return Ge?l.jsx(x.ThemeProvider,{theme:Ge,children:He}):He},Rm=({src:e,alt:t,width:r="100%",height:n="auto",style:i,className:a,onClick:s})=>l.jsx(x.Box,{sx:{textAlign:"center"},children:l.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 c(h){try{d(n.throw(h))}catch(f){s(f)}}function d(h){h.done?a(h.value):i(h.value).then(o,c)}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=Pm(e),{webkitRelativePath:i}=e,a=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof n.path!="string"&&Bo(n,"path",a),Bo(n,"relativePath",a),n}function Pm(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 Bo(e,t,r){Object.defineProperty(e,t,{value:r,writable:!1,configurable:!1,enumerable:!0})}const Dm=[".DS_Store","Thumbs.db"];function Im(e){return Mr(this,void 0,void 0,function*(){return xi(e)&&Mm(e.dataTransfer)?Nm(e.dataTransfer,e.type):zm(e)?Bm(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?Vm(e):[]})}function Mm(e){return xi(e)}function zm(e){return xi(e)&&xi(e.target)}function xi(e){return typeof e=="object"&&e!==null}function Bm(e){return Ia(e.target.files).map(t=>cn(t))}function Vm(e){return Mr(this,void 0,void 0,function*(){return(yield Promise.all(e.map(r=>r.getFile()))).map(r=>cn(r))})}function Nm(e,t){return Mr(this,void 0,void 0,function*(){if(e.items){const r=Ia(e.items).filter(i=>i.kind==="file");if(t!=="drop")return r;const n=yield Promise.all(r.map(Lm));return Vo(Dc(n))}return Vo(Ia(e.files).map(r=>cn(r)))})}function Vo(e){return e.filter(t=>Dm.indexOf(t.name)===-1)}function Ia(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 Lm(e){if(typeof e.webkitGetAsEntry!="function")return No(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Ic(t):No(e,t)}function Dc(e){return e.reduce((t,r)=>[...t,...Array.isArray(r)?Dc(r):[r]],[])}function No(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 qm(e){return Mr(this,void 0,void 0,function*(){return e.isDirectory?Ic(e):Wm(e)})}function Ic(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(qm));i.push(o),a()}else try{const o=yield Promise.all(i);r(o)}catch(o){n(o)}}),s=>{n(s)})}a()})}function Wm(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={},Lo;function Um(){return Lo||(Lo=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 Hm=Um();const sa=Ya(Hm);function qo(e){return Gm(e)||Ym(e)||zc(e)||Km()}function Km(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
180
180
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ym(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gm(e){if(Array.isArray(e))return Ma(e)}function Wo(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 Uo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wo(Object(r),!0).forEach(function(n){Mc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mc(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 Xm(e)||Zm(e,t)||zc(e,t)||Qm()}function Qm(){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 zc(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 Zm(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(c){a=!0,o=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw o}}return n}}function Xm(e){if(Array.isArray(e))return e}var Jm=typeof sa=="function"?sa:sa.default,ex="file-invalid-type",tx="file-too-large",rx="file-too-small",nx="too-many-files",ix=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:ex,message:"File type must be ".concat(n)}},Ho=function(t){return{code:tx,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Ko=function(t){return{code:rx,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},ax={code:nx,message:"Too many files"};function Bc(e,t){var r=e.type==="application/x-moz-file"||Jm(e,t);return[r,r?null:ix(t)]}function Vc(e,t,r){if(yr(e.size))if(yr(t)&&yr(r)){if(e.size>r)return[!1,Ho(r)];if(e.size<t)return[!1,Ko(t)]}else{if(yr(t)&&e.size<t)return[!1,Ko(t)];if(yr(r)&&e.size>r)return[!1,Ho(r)]}return[!0,null]}function yr(e){return e!=null}function sx(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(c){var d=Bc(c,r),h=En(d,1),f=h[0],p=Vc(c,n,i),y=En(p,1),k=y[0],m=o?o(c):null;return f&&k&&!m})}function gi(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 Yo(e){e.preventDefault()}function ox(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function lx(e){return e.indexOf("Edge/")!==-1}function cx(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return ox(e)||lx(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!gi(n)&&o&&o.apply(void 0,[n].concat(a)),gi(n)})}}function ux(){return"showOpenFilePicker"in window}function px(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 Nc(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(Lc))&&(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 Uo(Uo({},r),{},Mc({},a,s))},{});return[{description:"Files",accept:t}]}return e}function dx(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(qo(t),[i],qo(a))},[]).filter(function(t){return Nc(t)||Lc(t)}).join(",")}function fx(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function hx(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Nc(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function Lc(e){return/^.*\.[\w]+$/.test(e)}var mx=["children"],xx=["open"],gx=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],yx=["refKey","onChange","onClick"];function vx(e){return Sx(e)||wx(e)||qc(e)||bx()}function bx(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
181
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zc(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 Zm(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(c){a=!0,o=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw o}}return n}}function Xm(e){if(Array.isArray(e))return e}var Jm=typeof sa=="function"?sa:sa.default,ex="file-invalid-type",tx="file-too-large",rx="file-too-small",nx="too-many-files",ix=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:ex,message:"File type must be ".concat(n)}},Ho=function(t){return{code:tx,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Ko=function(t){return{code:rx,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},ax={code:nx,message:"Too many files"};function Bc(e,t){var r=e.type==="application/x-moz-file"||Jm(e,t);return[r,r?null:ix(t)]}function Vc(e,t,r){if(yr(e.size))if(yr(t)&&yr(r)){if(e.size>r)return[!1,Ho(r)];if(e.size<t)return[!1,Ko(t)]}else{if(yr(t)&&e.size<t)return[!1,Ko(t)];if(yr(r)&&e.size>r)return[!1,Ho(r)]}return[!0,null]}function yr(e){return e!=null}function sx(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(c){var d=Bc(c,r),h=En(d,1),f=h[0],p=Vc(c,n,i),y=En(p,1),E=y[0],m=o?o(c):null;return f&&E&&!m})}function gi(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 Yo(e){e.preventDefault()}function ox(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function lx(e){return e.indexOf("Edge/")!==-1}function cx(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return ox(e)||lx(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!gi(n)&&o&&o.apply(void 0,[n].concat(a)),gi(n)})}}function ux(){return"showOpenFilePicker"in window}function px(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 Nc(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(Lc))&&(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 Uo(Uo({},r),{},Mc({},a,s))},{});return[{description:"Files",accept:t}]}return e}function dx(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(qo(t),[i],qo(a))},[]).filter(function(t){return Nc(t)||Lc(t)}).join(",")}function fx(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function hx(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Nc(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function Lc(e){return/^.*\.[\w]+$/.test(e)}var mx=["children"],xx=["open"],gx=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],yx=["refKey","onChange","onClick"];function vx(e){return Sx(e)||wx(e)||qc(e)||bx()}function bx(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
182
182
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wx(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Sx(e){if(Array.isArray(e))return za(e)}function oa(e,t){return kx(e)||Ex(e,t)||qc(e,t)||Cx()}function Cx(){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 qc(e,t){if(e){if(typeof e=="string")return za(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 za(e,t)}}function za(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 Ex(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(c){a=!0,o=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw o}}return n}}function kx(e){if(Array.isArray(e))return e}function Go(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 Pe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Go(Object(r),!0).forEach(function(n){Ba(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Go(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ba(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yi(e,t){if(e==null)return{};var r=Tx(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 Tx(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 ms=$.forwardRef(function(e,t){var r=e.children,n=yi(e,mx),i=Uc(n),a=i.open,s=yi(i,xx);return $.useImperativeHandle(t,function(){return{open:a}},[a]),$.createElement($.Fragment,null,r(Pe(Pe({},s),{},{open:a})))});ms.displayName="Dropzone";var Wc={disabled:!1,getFilesFromEvent:Im,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};ms.defaultProps=Wc;ms.propTypes={children:T.func,accept:T.objectOf(T.arrayOf(T.string)),multiple:T.bool,preventDropOnDocument:T.bool,noClick:T.bool,noKeyboard:T.bool,noDrag:T.bool,noDragEventsBubbling:T.bool,minSize:T.number,maxSize:T.number,maxFiles:T.number,disabled:T.bool,getFilesFromEvent:T.func,onFileDialogCancel:T.func,onFileDialogOpen:T.func,useFsAccessApi:T.bool,autoFocus:T.bool,onDragEnter:T.func,onDragLeave:T.func,onDragOver:T.func,onDrop:T.func,onDropAccepted:T.func,onDropRejected:T.func,onError:T.func,validator:T.func};var Va={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Uc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Pe(Pe({},Wc),e),r=t.accept,n=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,s=t.minSize,o=t.multiple,c=t.maxFiles,d=t.onDragEnter,h=t.onDragLeave,f=t.onDragOver,p=t.onDrop,y=t.onDropAccepted,k=t.onDropRejected,m=t.onFileDialogCancel,C=t.onFileDialogOpen,v=t.useFsAccessApi,S=t.autoFocus,D=t.preventDropOnDocument,j=t.noClick,E=t.noKeyboard,R=t.noDrag,z=t.noDragEventsBubbling,_=t.onError,I=t.validator,u=$.useMemo(function(){return dx(r)},[r]),P=$.useMemo(function(){return px(r)},[r]),L=$.useMemo(function(){return typeof C=="function"?C:Qo},[C]),A=$.useMemo(function(){return typeof m=="function"?m:Qo},[m]),B=$.useRef(null),Y=$.useRef(null),ae=$.useReducer(jx,Va),de=oa(ae,2),ce=de[0],Q=de[1],q=ce.isFocused,G=ce.isFileDialogActive,ue=$.useRef(typeof window<"u"&&window.isSecureContext&&v&&ux()),fe=function(){!ue.current&&G&&setTimeout(function(){if(Y.current){var M=Y.current.files;M.length||(Q({type:"closeDialog"}),A())}},300)};$.useEffect(function(){return window.addEventListener("focus",fe,!1),function(){window.removeEventListener("focus",fe,!1)}},[Y,G,A,ue]);var pe=$.useRef([]),me=function(M){B.current&&B.current.contains(M.target)||(M.preventDefault(),pe.current=[])};$.useEffect(function(){return D&&(document.addEventListener("dragover",Yo,!1),document.addEventListener("drop",me,!1)),function(){D&&(document.removeEventListener("dragover",Yo),document.removeEventListener("drop",me))}},[B,D]),$.useEffect(function(){return!n&&S&&B.current&&B.current.focus(),function(){}},[B,S,n]);var W=$.useCallback(function(O){_?_(O):console.error(O)},[_]),J=$.useCallback(function(O){O.preventDefault(),O.persist(),g(O),pe.current=[].concat(vx(pe.current),[O.target]),Un(O)&&Promise.resolve(i(O)).then(function(M){if(!(gi(O)&&!z)){var Z=M.length,ee=Z>0&&sx({files:M,accept:u,minSize:s,maxSize:a,multiple:o,maxFiles:c,validator:I}),U=Z>0&&!ee;Q({isDragAccept:ee,isDragReject:U,isDragActive:!0,type:"setDraggedFiles"}),d&&d(O)}}).catch(function(M){return W(M)})},[i,d,W,z,u,s,a,o,c,I]),re=$.useCallback(function(O){O.preventDefault(),O.persist(),g(O);var M=Un(O);if(M&&O.dataTransfer)try{O.dataTransfer.dropEffect="copy"}catch{}return M&&f&&f(O),!1},[f,z]),oe=$.useCallback(function(O){O.preventDefault(),O.persist(),g(O);var M=pe.current.filter(function(ee){return B.current&&B.current.contains(ee)}),Z=M.indexOf(O.target);Z!==-1&&M.splice(Z,1),pe.current=M,!(M.length>0)&&(Q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Un(O)&&h&&h(O))},[B,h,z]),le=$.useCallback(function(O,M){var Z=[],ee=[];O.forEach(function(U){var xe=Bc(U,u),Ee=oa(xe,2),ke=Ee[0],Me=Ee[1],Ne=Vc(U,s,a),Xe=oa(Ne,2),Ot=Xe[0],Je=Xe[1],Ke=I?I(U):null;if(ke&&Ot&&!Ke)Z.push(U);else{var pt=[Me,Je];Ke&&(pt=pt.concat(Ke)),ee.push({file:U,errors:pt.filter(function(Yt){return Yt})})}}),(!o&&Z.length>1||o&&c>=1&&Z.length>c)&&(Z.forEach(function(U){ee.push({file:U,errors:[ax]})}),Z.splice(0)),Q({acceptedFiles:Z,fileRejections:ee,isDragReject:ee.length>0,type:"setFiles"}),p&&p(Z,ee,M),ee.length>0&&k&&k(ee,M),Z.length>0&&y&&y(Z,M)},[Q,o,u,s,a,c,p,y,k,I]),ve=$.useCallback(function(O){O.preventDefault(),O.persist(),g(O),pe.current=[],Un(O)&&Promise.resolve(i(O)).then(function(M){gi(O)&&!z||le(M,O)}).catch(function(M){return W(M)}),Q({type:"reset"})},[i,le,W,z]),X=$.useCallback(function(){if(ue.current){Q({type:"openDialog"}),L();var O={multiple:o,types:P};window.showOpenFilePicker(O).then(function(M){return i(M)}).then(function(M){le(M,null),Q({type:"closeDialog"})}).catch(function(M){fx(M)?(A(M),Q({type:"closeDialog"})):hx(M)?(ue.current=!1,Y.current?(Y.current.value=null,Y.current.click()):W(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."))):W(M)});return}Y.current&&(Q({type:"openDialog"}),L(),Y.current.value=null,Y.current.click())},[Q,L,A,v,le,W,P,o]),Ie=$.useCallback(function(O){!B.current||!B.current.isEqualNode(O.target)||(O.key===" "||O.key==="Enter"||O.keyCode===32||O.keyCode===13)&&(O.preventDefault(),X())},[B,X]),We=$.useCallback(function(){Q({type:"focus"})},[]),Qe=$.useCallback(function(){Q({type:"blur"})},[]),gt=$.useCallback(function(){j||(cx()?setTimeout(X,0):X())},[j,X]),He=function(M){return n?null:M},K=function(M){return E?null:He(M)},se=function(M){return R?null:He(M)},g=function(M){z&&M.stopPropagation()},w=$.useMemo(function(){return function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=O.refKey,Z=M===void 0?"ref":M,ee=O.role,U=O.onKeyDown,xe=O.onFocus,Ee=O.onBlur,ke=O.onClick,Me=O.onDragEnter,Ne=O.onDragOver,Xe=O.onDragLeave,Ot=O.onDrop,Je=yi(O,gx);return Pe(Pe(Ba({onKeyDown:K(Rt(U,Ie)),onFocus:K(Rt(xe,We)),onBlur:K(Rt(Ee,Qe)),onClick:He(Rt(ke,gt)),onDragEnter:se(Rt(Me,J)),onDragOver:se(Rt(Ne,re)),onDragLeave:se(Rt(Xe,oe)),onDrop:se(Rt(Ot,ve)),role:typeof ee=="string"&&ee!==""?ee:"presentation"},Z,B),!n&&!E?{tabIndex:0}:{}),Je)}},[B,Ie,We,Qe,gt,J,re,oe,ve,E,R,n]),b=$.useCallback(function(O){O.stopPropagation()},[]),N=$.useMemo(function(){return function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=O.refKey,Z=M===void 0?"ref":M,ee=O.onChange,U=O.onClick,xe=yi(O,yx),Ee=Ba({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:He(Rt(ee,ve)),onClick:He(Rt(U,b)),tabIndex:-1},Z,Y);return Pe(Pe({},Ee),xe)}},[Y,r,o,ve,n]);return Pe(Pe({},ce),{},{isFocused:q&&!n,getRootProps:w,getInputProps:N,rootRef:B,inputRef:Y,open:He(X)})}function jx(e,t){switch(t.type){case"focus":return Pe(Pe({},e),{},{isFocused:!0});case"blur":return Pe(Pe({},e),{},{isFocused:!1});case"openDialog":return Pe(Pe({},Va),{},{isFileDialogActive:!0});case"closeDialog":return Pe(Pe({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Pe(Pe({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Pe(Pe({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Pe({},Va);default:return e}}function Qo(){}const Fx=ut(l.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"),Zo=ut(l.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"),Ax=ut(l.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"),Hc=({file:e,onRemove:t})=>{const r=()=>e.file.type.startsWith("image/")?l.jsx(Ax,{}):e.file.type.includes("pdf")?l.jsx(Zo,{}):l.jsx(Zo,{}),n=()=>{switch(e.status){case"success":return l.jsx(Fx,{color:"success"});case"uploading":return l.jsx(x.CircularProgress,{size:16});default:return null}},i=a=>{if(a===0)return"0 Bytes";const s=1024,o=["Bytes","KB","MB","GB"],c=Math.floor(Math.log(a)/Math.log(s));return parseFloat((a/Math.pow(s,c)).toFixed(2))+" "+o[c]};return l.jsxs(x.Paper,{sx:{p:2,mb:1,display:"flex",alignItems:"center",gap:2,border:"1px solid #e0e0e0"},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[r(),n()]}),l.jsxs(x.Box,{sx:{flex:1,minWidth:0},children:[l.jsx(x.Typography,{variant:"body2",noWrap:!0,children:e.file.name}),l.jsxs(x.Typography,{variant:"caption",color:"textSecondary",children:[i(e.file.size)," • ",e.file.type]})]}),l.jsx(x.Tooltip,{title:"Remove file",children:l.jsx(x.IconButton,{size:"small",onClick:()=>t(e.id),color:"error",children:l.jsx(fc,{})})})]})},Ox=({config:e,value:t=[],onChange:r,onSubmit:n,disabled:i=!1,className:a,style:s,title:o,subtitle:c,buttonText:d,fileSupportedText:h})=>{const[f,p]=$.useState(t),[y,k]=$.useState([]),[m,C]=$.useState(!1),[v,S]=$.useState(!1),[D,j]=$.useState([]),E=$.useRef(null);$.useEffect(()=>{p(t)},[t]);const R=$.useCallback(B=>{var ae,de;return((ae=e==null?void 0:e.fileTypes)==null?void 0:ae.some(ce=>{if(ce.includes("*")){const Q=ce.split("/")[0];return B.type.startsWith(Q)}return B.type===ce}))?e!=null&&e.maxSize&&B.size>e.maxSize?`File size exceeds maximum limit of ${(e.maxSize/1048576).toFixed(1)}MB`:null:`File type ${B.type} is not allowed. Allowed types: ${(de=e==null?void 0:e.fileTypes)==null?void 0:de.join(", ")}`},[e]),z=$.useCallback(async B=>{console.log("handleFiles called with:",B.length,"files"),C(!0);const Y=[],ae=[];try{for(const ce of B){let Q=null;if(e!=null&&e.multiple&&f.some(G=>G.file.name===ce.name&&G.file.size===ce.size&&G.file.lastModified===ce.lastModified)){ae.push(`${ce.name}: File already exists`);continue}if(Q=R(ce),!Q&&(e!=null&&e.customValidation))try{const q=e.customValidation(ce);q instanceof Promise?Q=await q:Q=q}catch(q){Q=`Custom validation failed: ${q instanceof Error?q.message:"Unknown error"}`}if(Q)ae.push(`${ce.name}: ${Q}`);else{const q={id:`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,file:ce,preview:ce.type.startsWith("image/")?URL.createObjectURL(ce):void 0,progress:0,status:"pending",uploadedAt:new Date};Y.push(q)}}const de=e!=null&&e.multiple?[...f,...Y]:Y;p(de),r==null||r(de),ae.length>0?(j(ae),k(ae)):(j([]),k([]))}catch(de){const ce=`Unexpected error: ${de instanceof Error?de.message:"Unknown error"}`;j([ce]),k([ce])}},[f,e==null?void 0:e.multiple,R,e==null?void 0:e.customValidation,r]),_=$.useCallback(B=>{C(!0);const Y=f.filter(ae=>ae.id!==B);p(Y),r==null||r(Y),j([]),E.current&&(E.current.value="")},[f,r]),I=$.useCallback(()=>{if(e!=null&&e.required&&f.length===0){k([`${e.title} is required`]);return}j([]),S(!0);const B=f.filter(Y=>Y.status!=="error");n==null||n(B)},[f,n,e==null?void 0:e.required,e==null?void 0:e.title]),{getRootProps:u,getInputProps:P,isDragActive:L}=Uc({onDrop:z,multiple:e==null?void 0:e.multiple,disabled:i,noClick:!1,noKeyboard:!1});$.useEffect(()=>{if(!m)return;const B=[],Y=[...D,...B];Y.length>0?k(Y):k([])},[f,e==null?void 0:e.required,e==null?void 0:e.title,m,v,D]);const A=()=>{var B;switch(((B=e==null?void 0:e.submitButton)==null?void 0:B.position)||"right"){case"left":return"flex-start";case"center":return"center";case"right":return"flex-end";default:return"flex-end"}};return l.jsxs(x.Box,{className:a,style:s,children:[l.jsxs(x.Typography,{variant:"h6",gutterBottom:!0,children:[e==null?void 0:e.title,(e==null?void 0:e.required)&&l.jsx("span",{style:{color:"red"},children:" *"})]}),(e==null?void 0:e.description)&&l.jsx(x.Typography,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:e==null?void 0:e.description}),$.createElement(x.Card,{...u(),key:`dropzone-${f.length}`,sx:{border:"1px dashed",borderColor:L?"primary.main":"#CCCCCC",backgroundColor:L?"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"}}},l.jsx("input",{...P(),ref:E}),l.jsx(x.IconButton,{sx:{borderRadius:"8px"},children:l.jsx(pi,{sx:{width:36,height:36,color:"primary.main"}})}),l.jsx(x.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main"},children:o}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main"},children:c}),l.jsx(x.Button,{onClick:()=>{var B;return(B=E.current)==null?void 0:B.click()},sx:{my:2},startIcon:l.jsx(pi,{}),variant:"contained",children:d}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400},children:h})),y.length>0&&l.jsx(x.Alert,{severity:"error",sx:{mt:2},children:y.map((B,Y)=>l.jsx(x.Typography,{variant:"body2",children:B},Y))}),f.length>0&&l.jsxs(x.Box,{sx:{mt:2},children:[l.jsxs(x.Typography,{variant:"subtitle1",gutterBottom:!0,children:["Selected Files (",f.length,")"]}),f.map(B=>l.jsx(Hc,{file:B,onRemove:_},B.id))]}),(e==null?void 0:e.helperText)&&l.jsx(x.Typography,{variant:"caption",color:"textSecondary",sx:{mt:1,display:"block"},children:e.helperText}),(e==null?void 0:e.submitButton)&&l.jsx(x.Box,{sx:{mt:3,display:"flex",justifyContent:A()},children:l.jsx(x.Button,{variant:"contained",onClick:I,disabled:i||e.submitButton.disabled||f.length===0,startIcon:e.submitButton.loading?l.jsx(x.CircularProgress,{size:16,color:"inherit"}):void 0,children:e.submitButton.text})})]})};exports.CustomButtons=$c;exports.DocumentUpload=Ox;exports.FieldRenderer=ds;exports.FilePreview=Hc;exports.FinAutocomplete=ic;exports.FinCheckbox=Ht;exports.FinCheckboxGroup=ac;exports.FinChip=us;exports.FinCustomizedVerticalStepper=Lh;exports.FinDateField=cs;exports.FinDragDropList=cc;exports.FinEditableGrid=pc;exports.FinForm=Om;exports.FinInfoCard=Wh;exports.FinListCards=dc;exports.FinPhaseCard=Kh;exports.FinRadioGroup=wr;exports.FinSelect=$i;exports.FinSwitch=di;exports.FinTabs=uc;exports.FinTextField=vt;exports.FinTextarea=sc;exports.FinUiHeader=oc;exports.FinVerticalStepper=Vh;exports.ImageComponent=Rm;exports.StepNavigation=Rc;exports.brand=Mh;exports.fetchApiData=hc;exports.finflowPalette=H;exports.generateSchema=_c;exports.getApiConfig=ps;exports.hasApiConfig=gr;exports.neutral=Ge;exports.primary=Dh;exports.secondary=Ih;exports.shouldShowField=Yh;exports.useApiData=mc;
183
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qc(e,t){if(e){if(typeof e=="string")return za(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 za(e,t)}}function za(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 Ex(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(c){a=!0,o=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw o}}return n}}function kx(e){if(Array.isArray(e))return e}function Go(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 Re(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Go(Object(r),!0).forEach(function(n){Ba(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Go(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ba(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yi(e,t){if(e==null)return{};var r=Tx(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 Tx(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 ms=P.forwardRef(function(e,t){var r=e.children,n=yi(e,mx),i=Uc(n),a=i.open,s=yi(i,xx);return P.useImperativeHandle(t,function(){return{open:a}},[a]),P.createElement(P.Fragment,null,r(Re(Re({},s),{},{open:a})))});ms.displayName="Dropzone";var Wc={disabled:!1,getFilesFromEvent:Im,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};ms.defaultProps=Wc;ms.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 Va={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Uc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Re(Re({},Wc),e),r=t.accept,n=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,s=t.minSize,o=t.multiple,c=t.maxFiles,d=t.onDragEnter,h=t.onDragLeave,f=t.onDragOver,p=t.onDrop,y=t.onDropAccepted,E=t.onDropRejected,m=t.onFileDialogCancel,S=t.onFileDialogOpen,v=t.useFsAccessApi,j=t.autoFocus,M=t.preventDropOnDocument,F=t.noClick,C=t.noKeyboard,R=t.noDrag,B=t.noDragEventsBubbling,_=t.onError,I=t.validator,u=P.useMemo(function(){return dx(r)},[r]),D=P.useMemo(function(){return px(r)},[r]),L=P.useMemo(function(){return typeof S=="function"?S:Qo},[S]),$=P.useMemo(function(){return typeof m=="function"?m:Qo},[m]),V=P.useRef(null),ee=P.useRef(null),ie=P.useReducer(jx,Va),he=oa(ie,2),le=he[0],Y=he[1],U=le.isFocused,Z=le.isFileDialogActive,ce=P.useRef(typeof window<"u"&&window.isSecureContext&&v&&ux()),de=function(){!ce.current&&Z&&setTimeout(function(){if(ee.current){var O=ee.current.files;O.length||(Y({type:"closeDialog"}),$())}},300)};P.useEffect(function(){return window.addEventListener("focus",de,!1),function(){window.removeEventListener("focus",de,!1)}},[ee,Z,$,ce]);var oe=P.useRef([]),pe=function(O){V.current&&V.current.contains(O.target)||(O.preventDefault(),oe.current=[])};P.useEffect(function(){return M&&(document.addEventListener("dragover",Yo,!1),document.addEventListener("drop",pe,!1)),function(){M&&(document.removeEventListener("dragover",Yo),document.removeEventListener("drop",pe))}},[V,M]),P.useEffect(function(){return!n&&j&&V.current&&V.current.focus(),function(){}},[V,j,n]);var H=P.useCallback(function(b){_?_(b):console.error(b)},[_]),X=P.useCallback(function(b){b.preventDefault(),b.persist(),w(b),oe.current=[].concat(vx(oe.current),[b.target]),Un(b)&&Promise.resolve(i(b)).then(function(O){if(!(gi(b)&&!B)){var q=O.length,K=q>0&&sx({files:O,accept:u,minSize:s,maxSize:a,multiple:o,maxFiles:c,validator:I}),W=q>0&&!K;Y({isDragAccept:K,isDragReject:W,isDragActive:!0,type:"setDraggedFiles"}),d&&d(b)}}).catch(function(O){return H(O)})},[i,d,H,B,u,s,a,o,c,I]),te=P.useCallback(function(b){b.preventDefault(),b.persist(),w(b);var O=Un(b);if(O&&b.dataTransfer)try{b.dataTransfer.dropEffect="copy"}catch{}return O&&f&&f(b),!1},[f,B]),ae=P.useCallback(function(b){b.preventDefault(),b.persist(),w(b);var O=oe.current.filter(function(K){return V.current&&V.current.contains(K)}),q=O.indexOf(b.target);q!==-1&&O.splice(q,1),oe.current=O,!(O.length>0)&&(Y({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Un(b)&&h&&h(b))},[V,h,B]),se=P.useCallback(function(b,O){var q=[],K=[];b.forEach(function(W){var ue=Bc(W,u),ve=oa(ue,2),Ce=ve[0],De=ve[1],Be=Vc(W,s,a),Xe=oa(Be,2),Ot=Xe[0],Je=Xe[1],We=I?I(W):null;if(Ce&&Ot&&!We)q.push(W);else{var pt=[De,Je];We&&(pt=pt.concat(We)),K.push({file:W,errors:pt.filter(function(Yt){return Yt})})}}),(!o&&q.length>1||o&&c>=1&&q.length>c)&&(q.forEach(function(W){K.push({file:W,errors:[ax]})}),q.splice(0)),Y({acceptedFiles:q,fileRejections:K,isDragReject:K.length>0,type:"setFiles"}),p&&p(q,K,O),K.length>0&&E&&E(K,O),q.length>0&&y&&y(q,O)},[Y,o,u,s,a,c,p,y,E,I]),ge=P.useCallback(function(b){b.preventDefault(),b.persist(),w(b),oe.current=[],Un(b)&&Promise.resolve(i(b)).then(function(O){gi(b)&&!B||se(O,b)}).catch(function(O){return H(O)}),Y({type:"reset"})},[i,se,H,B]),Q=P.useCallback(function(){if(ce.current){Y({type:"openDialog"}),L();var b={multiple:o,types:D};window.showOpenFilePicker(b).then(function(O){return i(O)}).then(function(O){se(O,null),Y({type:"closeDialog"})}).catch(function(O){fx(O)?($(O),Y({type:"closeDialog"})):hx(O)?(ce.current=!1,ee.current?(ee.current.value=null,ee.current.click()):H(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."))):H(O)});return}ee.current&&(Y({type:"openDialog"}),L(),ee.current.value=null,ee.current.click())},[Y,L,$,v,se,H,D,o]),Pe=P.useCallback(function(b){!V.current||!V.current.isEqualNode(b.target)||(b.key===" "||b.key==="Enter"||b.keyCode===32||b.keyCode===13)&&(b.preventDefault(),Q())},[V,Q]),qe=P.useCallback(function(){Y({type:"focus"})},[]),Ge=P.useCallback(function(){Y({type:"blur"})},[]),kt=P.useCallback(function(){F||(cx()?setTimeout(Q,0):Q())},[F,Q]),Ue=function(O){return n?null:O},Ze=function(O){return C?null:Ue(O)},He=function(O){return R?null:Ue(O)},w=function(O){B&&O.stopPropagation()},T=P.useMemo(function(){return function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=b.refKey,q=O===void 0?"ref":O,K=b.role,W=b.onKeyDown,ue=b.onFocus,ve=b.onBlur,Ce=b.onClick,De=b.onDragEnter,Be=b.onDragOver,Xe=b.onDragLeave,Ot=b.onDrop,Je=yi(b,gx);return Re(Re(Ba({onKeyDown:Ze(Rt(W,Pe)),onFocus:Ze(Rt(ue,qe)),onBlur:Ze(Rt(ve,Ge)),onClick:Ue(Rt(Ce,kt)),onDragEnter:He(Rt(De,X)),onDragOver:He(Rt(Be,te)),onDragLeave:He(Rt(Xe,ae)),onDrop:He(Rt(Ot,ge)),role:typeof K=="string"&&K!==""?K:"presentation"},q,V),!n&&!C?{tabIndex:0}:{}),Je)}},[V,Pe,qe,Ge,kt,X,te,ae,ge,C,R,n]),g=P.useCallback(function(b){b.stopPropagation()},[]),z=P.useMemo(function(){return function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=b.refKey,q=O===void 0?"ref":O,K=b.onChange,W=b.onClick,ue=yi(b,yx),ve=Ba({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:Ue(Rt(K,ge)),onClick:Ue(Rt(W,g)),tabIndex:-1},q,ee);return Re(Re({},ve),ue)}},[ee,r,o,ge,n]);return Re(Re({},le),{},{isFocused:U&&!n,getRootProps:T,getInputProps:z,rootRef:V,inputRef:ee,open:Ue(Q)})}function jx(e,t){switch(t.type){case"focus":return Re(Re({},e),{},{isFocused:!0});case"blur":return Re(Re({},e),{},{isFocused:!1});case"openDialog":return Re(Re({},Va),{},{isFileDialogActive:!0});case"closeDialog":return Re(Re({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Re(Re({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Re(Re({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Re({},Va);default:return e}}function Qo(){}const Fx=ut(l.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"),Zo=ut(l.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"),Ax=ut(l.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"),Hc=({file:e,onRemove:t})=>{const r=()=>e.file.type.startsWith("image/")?l.jsx(Ax,{}):e.file.type.includes("pdf")?l.jsx(Zo,{}):l.jsx(Zo,{}),n=()=>{switch(e.status){case"success":return l.jsx(Fx,{color:"success"});case"uploading":return l.jsx(x.CircularProgress,{size:16});default:return null}},i=a=>{if(a===0)return"0 Bytes";const s=1024,o=["Bytes","KB","MB","GB"],c=Math.floor(Math.log(a)/Math.log(s));return parseFloat((a/Math.pow(s,c)).toFixed(2))+" "+o[c]};return l.jsxs(x.Paper,{sx:{p:2,mb:1,display:"flex",alignItems:"center",gap:2,border:"1px solid #e0e0e0"},children:[l.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[r(),n()]}),l.jsxs(x.Box,{sx:{flex:1,minWidth:0},children:[l.jsx(x.Typography,{variant:"body2",noWrap:!0,children:e.file.name}),l.jsxs(x.Typography,{variant:"caption",color:"textSecondary",children:[i(e.file.size)," • ",e.file.type]})]}),l.jsx(x.Tooltip,{title:"Remove file",children:l.jsx(x.IconButton,{size:"small",onClick:()=>t(e.id),color:"error",children:l.jsx(fc,{})})})]})},Ox=({config:e,value:t=[],onChange:r,onSubmit:n,disabled:i=!1,className:a,style:s,title:o,subtitle:c,buttonText:d,fileSupportedText:h})=>{const[f,p]=P.useState(t),[y,E]=P.useState([]),[m,S]=P.useState(!1),[v,j]=P.useState(!1),[M,F]=P.useState([]),C=P.useRef(null);P.useEffect(()=>{p(t)},[t]);const R=P.useCallback(V=>{var ie,he;return((ie=e==null?void 0:e.fileTypes)==null?void 0:ie.some(le=>{if(le.includes("*")){const Y=le.split("/")[0];return V.type.startsWith(Y)}return V.type===le}))?e!=null&&e.maxSize&&V.size>e.maxSize?`File size exceeds maximum limit of ${(e.maxSize/1048576).toFixed(1)}MB`:null:`File type ${V.type} is not allowed. Allowed types: ${(he=e==null?void 0:e.fileTypes)==null?void 0:he.join(", ")}`},[e]),B=P.useCallback(async V=>{console.log("handleFiles called with:",V.length,"files"),S(!0);const ee=[],ie=[];try{for(const le of V){let Y=null;if(e!=null&&e.multiple&&f.some(Z=>Z.file.name===le.name&&Z.file.size===le.size&&Z.file.lastModified===le.lastModified)){ie.push(`${le.name}: File already exists`);continue}if(Y=R(le),!Y&&(e!=null&&e.customValidation))try{const U=e.customValidation(le);U instanceof Promise?Y=await U:Y=U}catch(U){Y=`Custom validation failed: ${U instanceof Error?U.message:"Unknown error"}`}if(Y)ie.push(`${le.name}: ${Y}`);else{const U={id:`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,file:le,preview:le.type.startsWith("image/")?URL.createObjectURL(le):void 0,progress:0,status:"pending",uploadedAt:new Date};ee.push(U)}}const he=e!=null&&e.multiple?[...f,...ee]:ee;p(he),r==null||r(he),ie.length>0?(F(ie),E(ie)):(F([]),E([]))}catch(he){const le=`Unexpected error: ${he instanceof Error?he.message:"Unknown error"}`;F([le]),E([le])}},[f,e==null?void 0:e.multiple,R,e==null?void 0:e.customValidation,r]),_=P.useCallback(V=>{S(!0);const ee=f.filter(ie=>ie.id!==V);p(ee),r==null||r(ee),F([]),C.current&&(C.current.value="")},[f,r]),I=P.useCallback(()=>{if(e!=null&&e.required&&f.length===0){E([`${e.title} is required`]);return}F([]),j(!0);const V=f.filter(ee=>ee.status!=="error");n==null||n(V)},[f,n,e==null?void 0:e.required,e==null?void 0:e.title]),{getRootProps:u,getInputProps:D,isDragActive:L}=Uc({onDrop:B,multiple:e==null?void 0:e.multiple,disabled:i,noClick:!1,noKeyboard:!1});P.useEffect(()=>{if(!m)return;const V=[],ee=[...M,...V];ee.length>0?E(ee):E([])},[f,e==null?void 0:e.required,e==null?void 0:e.title,m,v,M]);const $=()=>{var V;switch(((V=e==null?void 0:e.submitButton)==null?void 0:V.position)||"right"){case"left":return"flex-start";case"center":return"center";case"right":return"flex-end";default:return"flex-end"}};return l.jsxs(x.Box,{className:a,style:s,children:[l.jsxs(x.Typography,{variant:"h6",gutterBottom:!0,children:[e==null?void 0:e.title,(e==null?void 0:e.required)&&l.jsx("span",{style:{color:"red"},children:" *"})]}),(e==null?void 0:e.description)&&l.jsx(x.Typography,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:e==null?void 0:e.description}),P.createElement(x.Card,{...u(),key:`dropzone-${f.length}`,sx:{border:"1px dashed",borderColor:L?"primary.main":"#CCCCCC",backgroundColor:L?"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"}}},l.jsx("input",{...D(),ref:C}),l.jsx(x.IconButton,{sx:{borderRadius:"8px"},children:l.jsx(pi,{sx:{width:36,height:36,color:"primary.main"}})}),l.jsx(x.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main"},children:o}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main"},children:c}),l.jsx(x.Button,{onClick:()=>{var V;return(V=C.current)==null?void 0:V.click()},sx:{my:2},startIcon:l.jsx(pi,{}),variant:"contained",children:d}),l.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400},children:h})),y.length>0&&l.jsx(x.Alert,{severity:"error",sx:{mt:2},children:y.map((V,ee)=>l.jsx(x.Typography,{variant:"body2",children:V},ee))}),f.length>0&&l.jsxs(x.Box,{sx:{mt:2},children:[l.jsxs(x.Typography,{variant:"subtitle1",gutterBottom:!0,children:["Selected Files (",f.length,")"]}),f.map(V=>l.jsx(Hc,{file:V,onRemove:_},V.id))]}),(e==null?void 0:e.helperText)&&l.jsx(x.Typography,{variant:"caption",color:"textSecondary",sx:{mt:1,display:"block"},children:e.helperText}),(e==null?void 0:e.submitButton)&&l.jsx(x.Box,{sx:{mt:3,display:"flex",justifyContent:$()},children:l.jsx(x.Button,{variant:"contained",onClick:I,disabled:i||e.submitButton.disabled||f.length===0,startIcon:e.submitButton.loading?l.jsx(x.CircularProgress,{size:16,color:"inherit"}):void 0,children:e.submitButton.text})})]})};exports.CustomButtons=$c;exports.DocumentUpload=Ox;exports.FieldRenderer=ds;exports.FilePreview=Hc;exports.FinAutocomplete=ic;exports.FinCheckbox=Ht;exports.FinCheckboxGroup=ac;exports.FinChip=us;exports.FinCustomizedVerticalStepper=Lh;exports.FinDateField=cs;exports.FinDragDropList=cc;exports.FinEditableGrid=pc;exports.FinForm=Om;exports.FinInfoCard=Wh;exports.FinListCards=dc;exports.FinPhaseCard=Kh;exports.FinRadioGroup=wr;exports.FinSelect=$i;exports.FinSwitch=di;exports.FinTabs=uc;exports.FinTextField=yt;exports.FinTextarea=sc;exports.FinUiHeader=oc;exports.FinVerticalStepper=Vh;exports.ImageComponent=Rm;exports.StepNavigation=Rc;exports.brand=Mh;exports.fetchApiData=hc;exports.finflowPalette=G;exports.generateSchema=_c;exports.getApiConfig=ps;exports.hasApiConfig=gr;exports.neutral=Ye;exports.primary=Dh;exports.secondary=Ih;exports.shouldShowField=Yh;exports.useApiData=mc;