@fastspace/schema-form 0.0.14 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,12 @@
1
- (function(L,ct){typeof exports=="object"&&typeof module<"u"?ct(exports,require("valibot"),require("react/jsx-runtime"),require("react"),require("react-hook-form"),require("@emotion/react"),require("@emotion/styled"),require("@mui/material"),require("@mui/x-date-pickers"),require("@mui/x-date-pickers/AdapterDayjs"),require("@mui/x-date-pickers/DateTimePicker"),require("dayjs"),require("dayjs/locale/zh-cn"),require("@mui/x-date-pickers/DatePicker"),require("@mui/x-date-pickers/TimePicker")):typeof define=="function"&&define.amd?define(["exports","valibot","react/jsx-runtime","react","react-hook-form","@emotion/react","@emotion/styled","@mui/material","@mui/x-date-pickers","@mui/x-date-pickers/AdapterDayjs","@mui/x-date-pickers/DateTimePicker","dayjs","dayjs/locale/zh-cn","@mui/x-date-pickers/DatePicker","@mui/x-date-pickers/TimePicker"],ct):(L=typeof globalThis<"u"?globalThis:L||self,ct(L.SchemaFormLib={},L.Valibot,L.jsxRuntime,L.React,L.ReactHookForm,L.react,L.emStyled,L.MaterialUI,L.xDatePickers,L.AdapterDayjs,L.DateTimePicker,L.dayjs,null,L.DatePicker,L.TimePicker))})(this,(function(L,ct,v,W,Fe,Be,ti,U,or,ir,ri,an,Wc,ni,oi){"use strict";function ln(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 P=ln(ct),j=ln(W);function Tt(e){return!!(e==null||typeof e=="string"&&e.trim()===""||Array.isArray(e)&&e.length===0)}function ii(e,t){const r=t.split(".");let n=e;for(const o of r){if(n==null)return;n=n[o]}return n}function cn(e){return"field"in e}function si(e){return"and"in e||"or"in e||"not"in e}function ai(e,t){const r=ii(t,e.field);return"eq"in e?r===e.eq:"ne"in e?r!==e.ne:"gt"in e&&typeof r=="number"?r>e.gt:"gte"in e&&typeof r=="number"?r>=e.gte:"lt"in e&&typeof r=="number"?r<e.lt:"lte"in e&&typeof r=="number"?r<=e.lte:"in"in e&&Array.isArray(e.in)?e.in.includes(r):"notIn"in e&&Array.isArray(e.notIn)?!e.notIn.includes(r):"empty"in e?e.empty?Tt(r):!Tt(r):"notEmpty"in e?e.notEmpty?!Tt(r):Tt(r):!1}function li(e,t){return"and"in e?e.and.every(r=>Ne(r,t)):"or"in e?e.or.some(r=>Ne(r,t)):"not"in e?!Ne(e.not,t):!1}function Ne(e,t){return e?typeof e=="function"?e(t):cn(e)?ai(e,t):si(e)?li(e,t):!0:!0}function qe(e){const t=[];if(cn(e))t.push(e.field);else if("and"in e)for(const r of e.and)t.push(...qe(r));else if("or"in e)for(const r of e.or)t.push(...qe(r));else"not"in e&&t.push(...qe(e.not));return[...new Set(t)]}function ut(e,t,r=!1,n=!1){let o=!e.hidden;o&&e.visibleWhen&&(o=Ne(e.visibleWhen,t));let i=e.disabled??!1;!i&&e.disabledWhen&&(i=Ne(e.disabledWhen,t)),r&&(i=!0);let a=e.rules?.some(u=>u.type==="required")??!1;!a&&e.requiredWhen&&(a=Ne(e.requiredWhen,t));const l=e.readonly??n;return{visible:o,disabled:i,required:a,readonly:l}}function ci(e,t,r=!1,n=!1){const o=new Map;for(const i of e.input.fields){const a=ut(i,t,r,n);o.set(i.name,a)}return o}function Ze(e,t){if(e&&typeof e!="function"){if("field"in e){t.add(e.field);return}"and"in e&&Array.isArray(e.and)&&e.and.forEach(r=>Ze(r,t)),"or"in e&&Array.isArray(e.or)&&e.or.forEach(r=>Ze(r,t)),"not"in e&&Ze(e.not,t)}}function un(e){const t=new Set;for(const r of e.allFields){if(r.dependencies)for(const n of r.dependencies)t.add(n);if(Ze(r.visibleWhen,t),Ze(r.disabledWhen,t),Ze(r.requiredWhen,t),r.compute?.dependencies)for(const n of r.compute.dependencies)t.add(n)}return Array.from(t)}function ui(e){const t=/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g,r=e.match(t)??[],n=new Set(["true","false","null","undefined","Math","Number","String","Boolean","Array","Object","if","else","return","const","let","var"]);return r.filter(o=>!n.has(o))}function dn(e){const t=new Map,r=new Map,n={},o=[],i=a=>{for(const l of a){const u=l.name;t.set(u,l),o.push(l),l.defaultValue!==void 0&&(n[u]=l.defaultValue),l.columns&&i(l.columns)}};i(e.fields);for(const a of o){const l=a.name,u=new Set;if(a.dependencies)for(const f of a.dependencies)u.add(f);if(a.visibleWhen)for(const f of qe(a.visibleWhen))u.add(f);if(a.disabledWhen)for(const f of qe(a.disabledWhen))u.add(f);if(a.requiredWhen)for(const f of qe(a.requiredWhen))u.add(f);if(a.compute)if(a.compute.dependencies)for(const f of a.compute.dependencies)u.add(f);else for(const f of ui(a.compute.expr))u.add(f);for(const f of u)r.has(f)||r.set(f,new Set),r.get(f)?.add(l)}return{input:e,fieldMap:t,dependencyGraph:r,defaultValues:n,allFields:o}}function di(e,t){const r=new Set,n=[e];for(;n.length>0;){const o=n.shift();if(!o)continue;const i=t.get(o);if(i)for(const a of i)r.has(a)||(r.add(a),n.push(a))}return r}function fi(e,t){return{...e.defaultValues,...t}}function pi(e,t){return e.rules?.some(n=>n.type==="required")?!0:e.requiredWhen?Ne(e.requiredWhen,t):!1}function mi(e){const t=e.rules?.find(n=>n.type==="required"),r=e.ui?.label??String(e.name);return t?.message??`${r}不能为空`}function sr(e,t){const r=e.ui?.label??String(e.name),n=e.component,o=e.rules??[],i=pi(e,t),a=mi(e),l=e.ui?.props?.multiple===!0;if((n==="Autocomplete"||n==="Select")&&l){const h=[];i&&h.push(P.check(g=>Array.isArray(g)&&g.length>0&&g!==void 0&&g!==null,a));const d=P.union([P.string(),P.number(),P.boolean(),P.undefined_(),P.null_(),P.array(P.unknown())]);return h.length>0?P.pipe(d,...h):d}if(["Radio","Select","Autocomplete"].includes(n)){const h=P.union([P.string(),P.number(),P.boolean(),P.undefined_(),P.null_()]);return i?P.pipe(h,P.check(d=>d!=null&&d!=="",a)):h}if(["Text","Password","Textarea","Date","Time","DateTime"].includes(n)){const h=P.union([P.string(),P.undefined_(),P.null_()]),d=[];i&&d.push(P.check(g=>g!=null&&g!=="",a));for(const g of o)switch(g.type){case"minLength":d.push(P.check(x=>x==null||x===""||String(x).length>=g.value,g.message??`${r}至少${g.value}个字符`));break;case"maxLength":d.push(P.check(x=>x==null||x===""||String(x).length<=g.value,g.message??`${r}最多${g.value}个字符`));break;case"pattern":{const x=typeof g.value=="string"?new RegExp(g.value):g.value;d.push(P.check(A=>A==null||A===""||x.test(String(A)),g.message??`${r}格式不正确`));break}case"email":d.push(P.check(x=>x==null||x===""||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(x)),g.message??`${r}必须是有效的邮箱`));break;case"url":d.push(P.check(x=>{if(x==null||x==="")return!0;try{return new URL(String(x)),!0}catch{return!1}},g.message??`${r}必须是有效的URL`));break;case"custom":d.push(P.check(x=>g.validate(x,t)===!0,x=>{const A=g.validate(x.input,t);return typeof A=="string"?A:"校验失败"}));break}return d.length>0?P.pipe(h,...d):h}if(["Number","Slider","Rating"].includes(n)){const h=P.union([P.number(),P.undefined_(),P.null_(),P.pipe(P.string(),P.transform(Number),P.number())]),d=[];i&&d.push(P.check(g=>g!=null&&!Number.isNaN(g),a));for(const g of o)switch(g.type){case"min":d.push(P.check(x=>x==null||Number(x)>=g.value,g.message??`${r}不能小于${g.value}`));break;case"max":d.push(P.check(x=>x==null||Number(x)<=g.value,g.message??`${r}不能大于${g.value}`));break;case"custom":d.push(P.check(x=>g.validate(x,t)===!0,x=>{const A=g.validate(x.input,t);return typeof A=="string"?A:"校验失败"}));break}return d.length>0?P.pipe(h,...d):h}if(["Checkbox","Switch"].includes(n)){const h=P.union([P.boolean(),P.undefined_(),P.null_()]);return i?P.pipe(h,P.check(d=>d===!0,a)):h}if(n==="FormList"){const h=e.columns??[],d=e.minItems??0,g=e.maxItems??1/0,x={};for(const C of h)if(C.component==="Group"&&C.columns)for(const E of C.columns)x[E.name]=sr(E,t);else C.component!=="Group"&&(x[C.name]=sr(C,t));const A=P.object(x),R=[];d>0&&R.push(P.check(C=>Array.isArray(C)&&C.length>=d,`至少需要${d}条数据`)),g<1/0&&R.push(P.check(C=>Array.isArray(C)&&C.length<=g,`最多允许${g}条数据`));const O=P.array(A);return R.length>0?P.pipe(O,...R):O}if(n==="Upload"){const h=o.find(g=>g.type==="array"),d=h?.type==="array"?h.minItems??(i?1:0):i?1:0;return d>0?P.pipe(P.union([P.array(P.unknown()),P.undefined_(),P.null_()]),P.check(g=>Array.isArray(g)&&g.length>=d,h?.message??a)):P.union([P.array(P.unknown()),P.undefined_(),P.null_()])}const b=o.filter(h=>h.type==="custom");return b.length>0?P.pipe(P.unknown(),...b.map(h=>h.type==="custom"?P.check(d=>h.validate(d,t)===!0,d=>{const g=h.validate(d.input,t);return typeof g=="string"?g:"校验失败"}):P.check(()=>!0,""))):i?P.pipe(P.unknown(),P.check(h=>h!=null&&h!=="",a)):P.optional(P.unknown())}function fn(e,t){const r={};for(const n of e.input.fields){if(n.hidden||n.component==="Hidden"){r[n.name]=P.optional(P.unknown());continue}if(n.component!=="Group"){if(n.visibleWhen&&!Ne(n.visibleWhen,t)){r[n.name]=P.optional(P.unknown());continue}r[n.name]=sr(n,t)}}return P.object(r)}function pn(e){return async(t,r,n)=>{const o=fn(e,t),i=P.safeParse(o,t);if(i.success)return{values:i.output,errors:{}};const a={};for(const l of i.issues){const u=Array.isArray(l.path)?l.path.map(f=>f.key??"").filter(f=>f!=="").join("."):"";u&&!a[u]&&(a[u]={type:"validation",message:l.message})}return{values:{},errors:a}}}function mn(e){const t=e.match(/\b[a-zA-Z_][a-zA-Z0-9_]*\b/g)||[],r=new Set(["true","false","null","undefined","NaN","Infinity","Math","Number","String","Boolean","Array","Object","if","else","return","function"]);return Array.from(new Set(t.filter(n=>!r.has(n))))}function ar(e){return e==null?!1:typeof e=="number"?!Number.isNaN(e):typeof e=="string"?e.trim()!=="":!0}function hn(e,t,r,n,o="round"){try{for(const u of r)if(!ar(t[u]))return;const i={};for(const u of r){const f=t[u];typeof f=="string"&&!Number.isNaN(Number(f))?i[u]=Number(f):i[u]=f??0}let l=new Function(...Object.keys(i),`"use strict"; return (${e});`)(...Object.values(i));if(typeof l=="number"){if(!Number.isFinite(l))return;if(n!==void 0&&n>=0){const u=Math.pow(10,n);switch(o){case"ceil":l=Math.ceil(l*u)/u;break;case"floor":l=Math.floor(l*u)/u;break;case"round":default:l=Number(l.toFixed(n));break}}}return l}catch{return}}function hi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xt={exports:{}},wt={exports:{}},ne={};var gn;function gi(){if(gn)return ne;gn=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,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,d=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function R(C){if(typeof C=="object"&&C!==null){var E=C.$$typeof;switch(E){case t:switch(C=C.type,C){case u:case f:case n:case i:case o:case y:return C;default:switch(C=C&&C.$$typeof,C){case l:case m:case h:case b:case a:return C;default:return E}}case r:return E}}}function O(C){return R(C)===f}return ne.AsyncMode=u,ne.ConcurrentMode=f,ne.ContextConsumer=l,ne.ContextProvider=a,ne.Element=t,ne.ForwardRef=m,ne.Fragment=n,ne.Lazy=h,ne.Memo=b,ne.Portal=r,ne.Profiler=i,ne.StrictMode=o,ne.Suspense=y,ne.isAsyncMode=function(C){return O(C)||R(C)===u},ne.isConcurrentMode=O,ne.isContextConsumer=function(C){return R(C)===l},ne.isContextProvider=function(C){return R(C)===a},ne.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===t},ne.isForwardRef=function(C){return R(C)===m},ne.isFragment=function(C){return R(C)===n},ne.isLazy=function(C){return R(C)===h},ne.isMemo=function(C){return R(C)===b},ne.isPortal=function(C){return R(C)===r},ne.isProfiler=function(C){return R(C)===i},ne.isStrictMode=function(C){return R(C)===o},ne.isSuspense=function(C){return R(C)===y},ne.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===n||C===f||C===i||C===o||C===y||C===p||typeof C=="object"&&C!==null&&(C.$$typeof===h||C.$$typeof===b||C.$$typeof===a||C.$$typeof===l||C.$$typeof===m||C.$$typeof===g||C.$$typeof===x||C.$$typeof===A||C.$$typeof===d)},ne.typeOf=R,ne}var oe={};var yn;function yi(){return yn||(yn=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,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,d=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function R(_){return typeof _=="string"||typeof _=="function"||_===n||_===f||_===i||_===o||_===y||_===p||typeof _=="object"&&_!==null&&(_.$$typeof===h||_.$$typeof===b||_.$$typeof===a||_.$$typeof===l||_.$$typeof===m||_.$$typeof===g||_.$$typeof===x||_.$$typeof===A||_.$$typeof===d)}function O(_){if(typeof _=="object"&&_!==null){var we=_.$$typeof;switch(we){case t:var Le=_.type;switch(Le){case u:case f:case n:case i:case o:case y:return Le;default:var rr=Le&&Le.$$typeof;switch(rr){case l:case m:case h:case b:case a:return rr;default:return we}}case r:return we}}}var C=u,E=f,z=l,Z=a,G=t,Y=m,N=n,c=h,w=b,T=r,D=i,M=o,X=y,re=!1;function ce(_){return re||(re=!0),$(_)||O(_)===u}function $(_){return O(_)===f}function k(_){return O(_)===l}function H(_){return O(_)===a}function K(_){return typeof _=="object"&&_!==null&&_.$$typeof===t}function I(_){return O(_)===m}function B(_){return O(_)===n}function V(_){return O(_)===h}function F(_){return O(_)===b}function q(_){return O(_)===r}function Q(_){return O(_)===i}function J(_){return O(_)===o}function ue(_){return O(_)===y}oe.AsyncMode=C,oe.ConcurrentMode=E,oe.ContextConsumer=z,oe.ContextProvider=Z,oe.Element=G,oe.ForwardRef=Y,oe.Fragment=N,oe.Lazy=c,oe.Memo=w,oe.Portal=T,oe.Profiler=D,oe.StrictMode=M,oe.Suspense=X,oe.isAsyncMode=ce,oe.isConcurrentMode=$,oe.isContextConsumer=k,oe.isContextProvider=H,oe.isElement=K,oe.isForwardRef=I,oe.isFragment=B,oe.isLazy=V,oe.isMemo=F,oe.isPortal=q,oe.isProfiler=Q,oe.isStrictMode=J,oe.isSuspense=ue,oe.isValidElementType=R,oe.typeOf=O})()),oe}var bn;function vn(){return bn||(bn=1,process.env.NODE_ENV==="production"?wt.exports=gi():wt.exports=yi()),wt.exports}var lr,Sn;function bi(){if(Sn)return lr;Sn=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},l=0;l<10;l++)a["_"+String.fromCharCode(l)]=l;var u=Object.getOwnPropertyNames(a).map(function(m){return a[m]});if(u.join("")!=="0123456789")return!1;var f={};return"abcdefghijklmnopqrst".split("").forEach(function(m){f[m]=m}),Object.keys(Object.assign({},f)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return lr=o()?Object.assign:function(i,a){for(var l,u=n(i),f,m=1;m<arguments.length;m++){l=Object(arguments[m]);for(var y in l)t.call(l,y)&&(u[y]=l[y]);if(e){f=e(l);for(var p=0;p<f.length;p++)r.call(l,f[p])&&(u[f[p]]=l[f[p]])}}return u},lr}var cr,Cn;function ur(){if(Cn)return cr;Cn=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return cr=e,cr}var dr,Tn;function xn(){return Tn||(Tn=1,dr=Function.call.bind(Object.prototype.hasOwnProperty)),dr}var fr,wn;function vi(){if(wn)return fr;wn=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ur(),r={},n=xn();e=function(i){var a="Warning: "+i;try{throw new Error(a)}catch{}}}function o(i,a,l,u,f){if(process.env.NODE_ENV!=="production"){for(var m in i)if(n(i,m)){var y;try{if(typeof i[m]!="function"){var p=Error((u||"React class")+": "+l+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}y=i[m](a,m,u,l,null,t)}catch(h){y=h}if(y&&!(y instanceof Error)&&e((u||"React class")+": type specification of "+l+" `"+m+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof y+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),y instanceof Error&&!(y.message in r)){r[y.message]=!0;var b=f?f():"";e("Failed "+l+" type: "+y.message+(b??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},fr=o,fr}var pr,En;function Si(){if(En)return pr;En=1;var e=vn(),t=bi(),r=ur(),n=xn(),o=vi(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(l){var u="Warning: "+l;try{throw new Error(u)}catch{}});function a(){return null}return pr=function(l,u){var f=typeof Symbol=="function"&&Symbol.iterator,m="@@iterator";function y($){var k=$&&(f&&$[f]||$[m]);if(typeof k=="function")return k}var p="<<anonymous>>",b={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:A(),arrayOf:R,element:O(),elementType:C(),instanceOf:E,node:Y(),objectOf:Z,oneOf:z,oneOfType:G,shape:c,exact:w};function h($,k){return $===k?$!==0||1/$===1/k:$!==$&&k!==k}function d($,k){this.message=$,this.data=k&&typeof k=="object"?k:{},this.stack=""}d.prototype=Error.prototype;function g($){if(process.env.NODE_ENV!=="production")var k={},H=0;function K(B,V,F,q,Q,J,ue){if(q=q||p,J=J||F,ue!==r){if(u){var _=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 _.name="Invariant Violation",_}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var we=q+":"+F;!k[we]&&H<3&&(i("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+q+"`. 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."),k[we]=!0,H++)}}return V[F]==null?B?V[F]===null?new d("The "+Q+" `"+J+"` is marked as required "+("in `"+q+"`, but its value is `null`.")):new d("The "+Q+" `"+J+"` is marked as required in "+("`"+q+"`, but its value is `undefined`.")):null:$(V,F,q,Q,J)}var I=K.bind(null,!1);return I.isRequired=K.bind(null,!0),I}function x($){function k(H,K,I,B,V,F){var q=H[K],Q=M(q);if(Q!==$){var J=X(q);return new d("Invalid "+B+" `"+V+"` of type "+("`"+J+"` supplied to `"+I+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return g(k)}function A(){return g(a)}function R($){function k(H,K,I,B,V){if(typeof $!="function")return new d("Property `"+V+"` of component `"+I+"` has invalid PropType notation inside arrayOf.");var F=H[K];if(!Array.isArray(F)){var q=M(F);return new d("Invalid "+B+" `"+V+"` of type "+("`"+q+"` supplied to `"+I+"`, expected an array."))}for(var Q=0;Q<F.length;Q++){var J=$(F,Q,I,B,V+"["+Q+"]",r);if(J instanceof Error)return J}return null}return g(k)}function O(){function $(k,H,K,I,B){var V=k[H];if(!l(V)){var F=M(V);return new d("Invalid "+I+" `"+B+"` of type "+("`"+F+"` supplied to `"+K+"`, expected a single ReactElement."))}return null}return g($)}function C(){function $(k,H,K,I,B){var V=k[H];if(!e.isValidElementType(V)){var F=M(V);return new d("Invalid "+I+" `"+B+"` of type "+("`"+F+"` supplied to `"+K+"`, expected a single ReactElement type."))}return null}return g($)}function E($){function k(H,K,I,B,V){if(!(H[K]instanceof $)){var F=$.name||p,q=ce(H[K]);return new d("Invalid "+B+" `"+V+"` of type "+("`"+q+"` supplied to `"+I+"`, expected ")+("instance of `"+F+"`."))}return null}return g(k)}function z($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("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])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function k(H,K,I,B,V){for(var F=H[K],q=0;q<$.length;q++)if(h(F,$[q]))return null;var Q=JSON.stringify($,function(ue,_){var we=X(_);return we==="symbol"?String(_):_});return new d("Invalid "+B+" `"+V+"` of value `"+String(F)+"` "+("supplied to `"+I+"`, expected one of "+Q+"."))}return g(k)}function Z($){function k(H,K,I,B,V){if(typeof $!="function")return new d("Property `"+V+"` of component `"+I+"` has invalid PropType notation inside objectOf.");var F=H[K],q=M(F);if(q!=="object")return new d("Invalid "+B+" `"+V+"` of type "+("`"+q+"` supplied to `"+I+"`, expected an object."));for(var Q in F)if(n(F,Q)){var J=$(F,Q,I,B,V+"."+Q,r);if(J instanceof Error)return J}return null}return g(k)}function G($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var k=0;k<$.length;k++){var H=$[k];if(typeof H!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+re(H)+" at index "+k+"."),a}function K(I,B,V,F,q){for(var Q=[],J=0;J<$.length;J++){var ue=$[J],_=ue(I,B,V,F,q,r);if(_==null)return null;_.data&&n(_.data,"expectedType")&&Q.push(_.data.expectedType)}var we=Q.length>0?", expected one of type ["+Q.join(", ")+"]":"";return new d("Invalid "+F+" `"+q+"` supplied to "+("`"+V+"`"+we+"."))}return g(K)}function Y(){function $(k,H,K,I,B){return T(k[H])?null:new d("Invalid "+I+" `"+B+"` supplied to "+("`"+K+"`, expected a ReactNode."))}return g($)}function N($,k,H,K,I){return new d(($||"React class")+": "+k+" type `"+H+"."+K+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+I+"`.")}function c($){function k(H,K,I,B,V){var F=H[K],q=M(F);if(q!=="object")return new d("Invalid "+B+" `"+V+"` of type `"+q+"` "+("supplied to `"+I+"`, expected `object`."));for(var Q in $){var J=$[Q];if(typeof J!="function")return N(I,B,V,Q,X(J));var ue=J(F,Q,I,B,V+"."+Q,r);if(ue)return ue}return null}return g(k)}function w($){function k(H,K,I,B,V){var F=H[K],q=M(F);if(q!=="object")return new d("Invalid "+B+" `"+V+"` of type `"+q+"` "+("supplied to `"+I+"`, expected `object`."));var Q=t({},H[K],$);for(var J in Q){var ue=$[J];if(n($,J)&&typeof ue!="function")return N(I,B,V,J,X(ue));if(!ue)return new d("Invalid "+B+" `"+V+"` key `"+J+"` supplied to `"+I+"`.\nBad object: "+JSON.stringify(H[K],null," ")+`
2
- Valid keys: `+JSON.stringify(Object.keys($),null," "));var _=ue(F,J,I,B,V+"."+J,r);if(_)return _}return null}return g(k)}function T($){switch(typeof $){case"number":case"string":case"undefined":return!0;case"boolean":return!$;case"object":if(Array.isArray($))return $.every(T);if($===null||l($))return!0;var k=y($);if(k){var H=k.call($),K;if(k!==$.entries){for(;!(K=H.next()).done;)if(!T(K.value))return!1}else for(;!(K=H.next()).done;){var I=K.value;if(I&&!T(I[1]))return!1}}else return!1;return!0;default:return!1}}function D($,k){return $==="symbol"?!0:k?k["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&k instanceof Symbol:!1}function M($){var k=typeof $;return Array.isArray($)?"array":$ instanceof RegExp?"object":D(k,$)?"symbol":k}function X($){if(typeof $>"u"||$===null)return""+$;var k=M($);if(k==="object"){if($ instanceof Date)return"date";if($ instanceof RegExp)return"regexp"}return k}function re($){var k=X($);switch(k){case"array":case"object":return"an "+k;case"boolean":case"date":case"regexp":return"a "+k;default:return k}}function ce($){return!$.constructor||!$.constructor.name?p:$.constructor.name}return b.checkPropTypes=o,b.resetWarningCache=o.resetWarningCache,b.PropTypes=b,b},pr}var mr,On;function Ci(){if(On)return mr;On=1;var e=ur();function t(){}function r(){}return r.resetWarningCache=t,mr=function(){function n(a,l,u,f,m,y){if(y!==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 o(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},mr}var $n;function Ti(){if($n)return xt.exports;if($n=1,process.env.NODE_ENV!=="production"){var e=vn(),t=!0;xt.exports=Si()(e.isElement,t)}else xt.exports=Ci()();return xt.exports}var xi=Ti();const s=hi(xi);function kn(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=kn(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function fe(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=kn(e))&&(n&&(n+=" "),n+=t);return n}function wi(e,t){return j.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}const An=e=>e,Pn=(()=>{let e=An;return{configure(t){e=t},generate(t){return e(t)},reset(){e=An}}})(),Ei={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 ve(e,t,r="Mui"){const n=Ei[t];return n?`${r}-${n}`:`${Pn.generate(e)}-${t}`}function Pe(e,t,r=void 0){const n={};for(const o in e){const i=e[o];let a="",l=!0;for(let u=0;u<i.length;u+=1){const f=i[u];f&&(a+=(l===!0?"":" ")+t(f),l=!1,r&&r[f]&&(a+=" "+r[f]))}n[o]=a}return n}function Oi(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=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(o){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 $i={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 ki(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Ai=/[A-Z]|^ms/g,Pi=/_EMO_([^_]+?)_([^]*?)_EMO_/g,In=function(t){return t.charCodeAt(1)===45},Mn=function(t){return t!=null&&typeof t!="boolean"},hr=ki(function(e){return In(e)?e:e.replace(Ai,"-$&").toLowerCase()}),_n=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Pi,function(n,o,i){return je={name:o,styles:i,next:je},o})}return $i[t]!==1&&!In(t)&&typeof r=="number"&&r!==0?r+"px":r};function Et(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 o=r;if(o.anim===1)return je={name:o.name,styles:o.styles,next:je},o.name;var i=r;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)je={name:a.name,styles:a.styles,next:je},a=a.next;var l=i.styles+";";return l}return Ii(e,t,r)}}var u=r;return u}function Ii(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=Et(e,t,r[o])+";";else for(var i in r){var a=r[i];if(typeof a!="object"){var l=a;Mn(l)&&(n+=hr(i)+":"+_n(i,l)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var u=0;u<a.length;u++)Mn(a[u])&&(n+=hr(i)+":"+_n(i,a[u])+";");else{var f=Et(e,t,a);switch(i){case"animation":case"animationName":{n+=hr(i)+":"+f+";";break}default:n+=i+"{"+f+"}"}}}return n}var Nn=/label:\s*([^\s;{]+)\s*(;|$)/g,je;function Mi(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,o="";je=void 0;var i=e[0];if(i==null||i.raw===void 0)n=!1,o+=Et(r,t,i);else{var a=i;o+=a[0]}for(var l=1;l<e.length;l++)if(o+=Et(r,t,e[l]),n){var u=i;o+=u[l]}Nn.lastIndex=0;for(var f="",m;(m=Nn.exec(o))!==null;)f+="-"+m[1];var y=Oi(o)+f;return{name:y,styles:o,next:je}}function Rn(e,t){const r=ti(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const o=typeof e=="string"?`"${e}"`:"component";return n.length===0||n.some(i=>i===void 0),r(...n)}:r}function _i(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Dn=[];function Ge(e){return Dn[0]=e,Mi(Dn)}var Ot={exports:{}},ae={};var Bn;function Ni(){if(Bn)return ae;Bn=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),b=Symbol.for("react.client.reference");function h(d){if(typeof d=="object"&&d!==null){var g=d.$$typeof;switch(g){case e:switch(d=d.type,d){case r:case o:case n:case u:case f:case p:return d;default:switch(d=d&&d.$$typeof,d){case a:case l:case y:case m:return d;case i:return d;default:return g}}case t:return g}}}return ae.ContextConsumer=i,ae.ContextProvider=a,ae.Element=e,ae.ForwardRef=l,ae.Fragment=r,ae.Lazy=y,ae.Memo=m,ae.Portal=t,ae.Profiler=o,ae.StrictMode=n,ae.Suspense=u,ae.SuspenseList=f,ae.isContextConsumer=function(d){return h(d)===i},ae.isContextProvider=function(d){return h(d)===a},ae.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===e},ae.isForwardRef=function(d){return h(d)===l},ae.isFragment=function(d){return h(d)===r},ae.isLazy=function(d){return h(d)===y},ae.isMemo=function(d){return h(d)===m},ae.isPortal=function(d){return h(d)===t},ae.isProfiler=function(d){return h(d)===o},ae.isStrictMode=function(d){return h(d)===n},ae.isSuspense=function(d){return h(d)===u},ae.isSuspenseList=function(d){return h(d)===f},ae.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===r||d===o||d===n||d===u||d===f||typeof d=="object"&&d!==null&&(d.$$typeof===y||d.$$typeof===m||d.$$typeof===a||d.$$typeof===i||d.$$typeof===l||d.$$typeof===b||d.getModuleId!==void 0)},ae.typeOf=h,ae}var le={};var jn;function Ri(){return jn||(jn=1,process.env.NODE_ENV!=="production"&&(function(){function e(d){if(typeof d=="object"&&d!==null){var g=d.$$typeof;switch(g){case t:switch(d=d.type,d){case n:case i:case o:case f:case m:case b:return d;default:switch(d=d&&d.$$typeof,d){case l:case u:case p:case y:return d;case a:return d;default:return g}}case r:return g}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),b=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");le.ContextConsumer=a,le.ContextProvider=l,le.Element=t,le.ForwardRef=u,le.Fragment=n,le.Lazy=p,le.Memo=y,le.Portal=r,le.Profiler=i,le.StrictMode=o,le.Suspense=f,le.SuspenseList=m,le.isContextConsumer=function(d){return e(d)===a},le.isContextProvider=function(d){return e(d)===l},le.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===t},le.isForwardRef=function(d){return e(d)===u},le.isFragment=function(d){return e(d)===n},le.isLazy=function(d){return e(d)===p},le.isMemo=function(d){return e(d)===y},le.isPortal=function(d){return e(d)===r},le.isProfiler=function(d){return e(d)===i},le.isStrictMode=function(d){return e(d)===o},le.isSuspense=function(d){return e(d)===f},le.isSuspenseList=function(d){return e(d)===m},le.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===n||d===i||d===o||d===f||d===m||typeof d=="object"&&d!==null&&(d.$$typeof===p||d.$$typeof===y||d.$$typeof===l||d.$$typeof===a||d.$$typeof===u||d.$$typeof===h||d.getModuleId!==void 0)},le.typeOf=e})()),le}var Vn;function Di(){return Vn||(Vn=1,process.env.NODE_ENV==="production"?Ot.exports=Ni():Ot.exports=Ri()),Ot.exports}var $t=Di();function Ie(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 zn(e){if(j.isValidElement(e)||$t.isValidElementType(e)||!Ie(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=zn(e[r])}),t}function ye(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return Ie(e)&&Ie(t)&&Object.keys(t).forEach(o=>{j.isValidElement(t[o])||$t.isValidElementType(t[o])?n[o]=t[o]:Ie(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&Ie(e[o])?n[o]=ye(e[o],t[o],r):r.clone?n[o]=Ie(t[o])?zn(t[o]):t[o]:n[o]=t[o]}),n}function Ve(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 te(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Ve(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Wn(e,t=""){return e.displayName||e.name||t}function Ln(e,t,r){const n=Wn(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function Bi(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Wn(e,"Component");if(typeof e=="object")switch(e.$$typeof){case $t.ForwardRef:return Ln(e,e.render,"ForwardRef");case $t.Memo:return Ln(e,e.type,"memo");default:return}}}const ji=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 Vi(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...o}=e,i=ji(t),a=Object.keys(i);function l(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r})`}function u(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-n/100}${r})`}function f(p,b){const h=a.indexOf(b);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r}) and (max-width:${(h!==-1&&typeof t[a[h]]=="number"?t[a[h]]:b)-n/100}${r})`}function m(p){return a.indexOf(p)+1<a.length?f(p,a[a.indexOf(p)+1]):l(p)}function y(p){const b=a.indexOf(p);return b===0?l(a[1]):b===a.length-1?u(a[b]):f(p,a[a.indexOf(p)+1]).replace("@media","@media not all and")}return{keys:a,values:i,up:l,down:u,between:f,only:m,not:y,unit:r,...o}}function Fn(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,o)=>{const i=/min-width:\s*([0-9.]+)/;return+(n.match(i)?.[1]||0)-+(o.match(i)?.[1]||0)});return r.length?r.reduce((n,o)=>{const i=t[o];return delete n[o],n[o]=i,n},{...t}):t}function zi(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function Wi(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>\`.
3
- For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Ve(18,`(${t})`));return null}const[,n,o]=r,i=Number.isNaN(+n)?n||0:+n;return e.containerQueries(o).up(i)}function Li(e){const t=(i,a)=>i.replace("@media",a?`@container ${a}`:"@container");function r(i,a){i.up=(...l)=>t(e.breakpoints.up(...l),a),i.down=(...l)=>t(e.breakpoints.down(...l),a),i.between=(...l)=>t(e.breakpoints.between(...l),a),i.only=(...l)=>t(e.breakpoints.only(...l),a),i.not=(...l)=>{const u=t(e.breakpoints.not(...l),a);return u.includes("not all and")?u.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):u}}const n={},o=i=>(r(n,i),n);return r(o),{...e,containerQueries:o}}const Fi={borderRadius:4},ze=process.env.NODE_ENV!=="production"?s.oneOfType([s.number,s.string,s.object,s.array]):{};function dt(e,t){return t?ye(e,t,{clone:!1}):e}const kt={xs:0,sm:600,md:900,lg:1200,xl:1536},qn={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${kt[e]}px)`},qi={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:kt[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function Ee(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const i=n.breakpoints||qn;return t.reduce((a,l,u)=>(a[i.up(i.keys[u])]=r(t[u]),a),{})}if(typeof t=="object"){const i=n.breakpoints||qn;return Object.keys(t).reduce((a,l)=>{if(zi(i.keys,l)){const u=Wi(n.containerQueries?n:qi,l);u&&(a[u]=r(t[l],l))}else if(Object.keys(i.values||kt).includes(l)){const u=i.up(l);a[u]=r(t[l],l)}else{const u=l;a[u]=t[u]}return a},{})}return r(t)}function Gn(e={}){return e.keys?.reduce((r,n)=>{const o=e.up(n);return r[o]={},r},{})||{}}function gr(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function Gi(e,...t){const r=Gn(e),n=[r,...t].reduce((o,i)=>ye(o,i),{});return gr(Object.keys(r),n)}function Ui(e,t){if(typeof e!="object")return{};const r={},n=Object.keys(t);return Array.isArray(e)?n.forEach((o,i)=>{i<e.length&&(r[o]=!0)}):n.forEach(o=>{e[o]!=null&&(r[o]=!0)}),r}function yr({values:e,breakpoints:t,base:r}){const n=r||Ui(e,t),o=Object.keys(n);if(o.length===0)return e;let i;return o.reduce((a,l,u)=>(Array.isArray(e)?(a[l]=e[u]!=null?e[u]:e[i],i=u):typeof e=="object"?(a[l]=e[l]!=null?e[l]:e[i],i=l):a[l]=e,a),{})}function At(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(n!=null)return n}return t.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function Pt(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=At(e,r)||n,t&&(o=t(o,n,e)),o}function he(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,i=a=>{if(a[t]==null)return null;const l=a[t],u=a.theme,f=At(u,n)||{};return Ee(a,l,y=>{let p=Pt(f,o,y);return y===p&&typeof y=="string"&&(p=Pt(f,o,`${t}${y==="default"?"":te(y)}`,y)),r===!1?p:{[r]:p}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[t]:ze}:{},i.filterProps=[t],i}function Yi(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const Hi={m:"margin",p:"padding"},Ki={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Un={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Xi=Yi(e=>{if(e.length>2)if(Un[e])e=Un[e];else return[e];const[t,r]=e.split(""),n=Hi[t],o=Ki[r]||"";return Array.isArray(o)?o.map(i=>n+i):[n+o]}),It=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Mt=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Qi=[...It,...Mt];function ft(e,t,r,n){const o=At(e,t,!0)??r;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:(process.env.NODE_ENV,typeof o=="string"?o.startsWith("var(")&&i===0?0:o.startsWith("var(")&&i===1?o:`calc(${i} * ${o})`:o*i):Array.isArray(o)?i=>{if(typeof i=="string")return i;const a=Math.abs(i);process.env.NODE_ENV!=="production"&&Number.isInteger(a)&&a>o.length-1;const l=o[a];return i>=0?l:typeof l=="number"?-l:typeof l=="string"&&l.startsWith("var(")?`calc(-1 * ${l})`:`-${l}`}:typeof o=="function"?o:(process.env.NODE_ENV,()=>{})}function _t(e){return ft(e,"spacing",8,"spacing")}function Ue(e,t){return typeof t=="string"||t==null?t:e(t)}function Ji(e,t){return r=>e.reduce((n,o)=>(n[o]=Ue(t,r),n),{})}function Zi(e,t,r,n){if(!t.includes(r))return null;const o=Xi(r),i=Ji(o,n),a=e[r];return Ee(e,a,i)}function Yn(e,t){const r=_t(e.theme);return Object.keys(e).map(n=>Zi(e,t,n,r)).reduce(dt,{})}function pe(e){return Yn(e,It)}pe.propTypes=process.env.NODE_ENV!=="production"?It.reduce((e,t)=>(e[t]=ze,e),{}):{},pe.filterProps=It;function me(e){return Yn(e,Mt)}me.propTypes=process.env.NODE_ENV!=="production"?Mt.reduce((e,t)=>(e[t]=ze,e),{}):{},me.filterProps=Mt,process.env.NODE_ENV!=="production"&&Qi.reduce((e,t)=>(e[t]=ze,e),{});function Hn(e=8,t=_t({spacing:e})){if(e.mui)return e;const r=(...n)=>(process.env.NODE_ENV!=="production"&&n.length<=4,(n.length===0?[1]:n).map(i=>{const a=t(i);return typeof a=="number"?`${a}px`:a}).join(" "));return r.mui=!0,r}function Nt(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(i=>{n[i]=o}),n),{}),r=n=>Object.keys(n).reduce((o,i)=>t[i]?dt(o,t[i](n)):o,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function Se(e){return typeof e!="number"?e:`${e}px solid`}function Ce(e,t){return he({prop:e,themeKey:"borders",transform:t})}const es=Ce("border",Se),ts=Ce("borderTop",Se),rs=Ce("borderRight",Se),ns=Ce("borderBottom",Se),os=Ce("borderLeft",Se),is=Ce("borderColor"),ss=Ce("borderTopColor"),as=Ce("borderRightColor"),ls=Ce("borderBottomColor"),cs=Ce("borderLeftColor"),us=Ce("outline",Se),ds=Ce("outlineColor"),Rt=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=ft(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:Ue(t,n)});return Ee(e,e.borderRadius,r)}return null};Rt.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:ze}:{},Rt.filterProps=["borderRadius"],Nt(es,ts,rs,ns,os,is,ss,as,ls,cs,Rt,us,ds);const Dt=e=>{if(e.gap!==void 0&&e.gap!==null){const t=ft(e.theme,"spacing",8,"gap"),r=n=>({gap:Ue(t,n)});return Ee(e,e.gap,r)}return null};Dt.propTypes=process.env.NODE_ENV!=="production"?{gap:ze}:{},Dt.filterProps=["gap"];const Bt=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=ft(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:Ue(t,n)});return Ee(e,e.columnGap,r)}return null};Bt.propTypes=process.env.NODE_ENV!=="production"?{columnGap:ze}:{},Bt.filterProps=["columnGap"];const jt=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=ft(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:Ue(t,n)});return Ee(e,e.rowGap,r)}return null};jt.propTypes=process.env.NODE_ENV!=="production"?{rowGap:ze}:{},jt.filterProps=["rowGap"];const fs=he({prop:"gridColumn"}),ps=he({prop:"gridRow"}),ms=he({prop:"gridAutoFlow"}),hs=he({prop:"gridAutoColumns"}),gs=he({prop:"gridAutoRows"}),ys=he({prop:"gridTemplateColumns"}),bs=he({prop:"gridTemplateRows"}),vs=he({prop:"gridTemplateAreas"}),Ss=he({prop:"gridArea"});Nt(Dt,Bt,jt,fs,ps,ms,hs,gs,ys,bs,vs,Ss);function et(e,t){return t==="grey"?t:e}const Cs=he({prop:"color",themeKey:"palette",transform:et}),Ts=he({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:et}),xs=he({prop:"backgroundColor",themeKey:"palette",transform:et});Nt(Cs,Ts,xs);function be(e){return e<=1&&e!==0?`${e*100}%`:e}const ws=he({prop:"width",transform:be}),br=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{const n=e.theme?.breakpoints?.values?.[r]||kt[r];return n?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:be(r)}};return Ee(e,e.maxWidth,t)}return null};br.filterProps=["maxWidth"];const Es=he({prop:"minWidth",transform:be}),Os=he({prop:"height",transform:be}),$s=he({prop:"maxHeight",transform:be}),ks=he({prop:"minHeight",transform:be});he({prop:"size",cssProperty:"width",transform:be}),he({prop:"size",cssProperty:"height",transform:be});const As=he({prop:"boxSizing"});Nt(ws,br,Es,Os,$s,ks,As);const pt={border:{themeKey:"borders",transform:Se},borderTop:{themeKey:"borders",transform:Se},borderRight:{themeKey:"borders",transform:Se},borderBottom:{themeKey:"borders",transform:Se},borderLeft:{themeKey:"borders",transform:Se},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Se},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Rt},color:{themeKey:"palette",transform:et},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:et},backgroundColor:{themeKey:"palette",transform:et},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:pe},mt:{style:pe},mr:{style:pe},mb:{style:pe},ml:{style:pe},mx:{style:pe},my:{style:pe},margin:{style:pe},marginTop:{style:pe},marginRight:{style:pe},marginBottom:{style:pe},marginLeft:{style:pe},marginX:{style:pe},marginY:{style:pe},marginInline:{style:pe},marginInlineStart:{style:pe},marginInlineEnd:{style:pe},marginBlock:{style:pe},marginBlockStart:{style:pe},marginBlockEnd:{style:pe},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:Dt},rowGap:{style:jt},columnGap:{style:Bt},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:be},maxWidth:{style:br},minWidth:{transform:be},height:{transform:be},maxHeight:{transform:be},minHeight:{transform:be},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 Ps(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function Is(e,t){return typeof e=="function"?e(t):e}function Ms(){function e(r,n,o,i){const a={[r]:n,theme:o},l=i[r];if(!l)return{[r]:n};const{cssProperty:u=r,themeKey:f,transform:m,style:y}=l;if(n==null)return null;if(f==="typography"&&n==="inherit")return{[r]:n};const p=At(o,f)||{};return y?y(a):Ee(a,n,h=>{let d=Pt(p,m,h);return h===d&&typeof h=="string"&&(d=Pt(p,m,`${r}${h==="default"?"":te(h)}`,h)),u===!1?d:{[u]:d}})}function t(r){const{sx:n,theme:o={},nested:i}=r||{};if(!n)return null;const a=o.unstable_sxConfig??pt;function l(u){let f=u;if(typeof u=="function")f=u(o);else if(typeof u!="object")return u;if(!f)return null;const m=Gn(o.breakpoints),y=Object.keys(m);let p=m;return Object.keys(f).forEach(b=>{const h=Is(f[b],o);if(h!=null)if(typeof h=="object")if(a[b])p=dt(p,e(b,h,o,a));else{const d=Ee({theme:o},h,g=>({[b]:g}));Ps(d,h)?p[b]=t({sx:h,theme:o,nested:!0}):p=dt(p,d)}else p=dt(p,e(b,h,o,a))}),!i&&o.modularCssLayers?{"@layer sx":Fn(o,gr(y,p))}:Fn(o,gr(y,p))}return Array.isArray(n)?n.map(l):l(n)}return t}const Ye=Ms();Ye.filterProps=["sx"];function _s(e,t){const r=this;if(r.vars){if(!r.colorSchemes?.[e]||typeof r.getColorSchemeSelector!="function")return{};let n=r.getColorSchemeSelector(e);return n==="&"?t:((n.includes("data-")||n.includes("."))&&(n=`*:where(${n.replace(/\s*&$/,"")}) &`),{[n]:t})}return r.palette.mode===e?t:{}}function mt(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:i={},...a}=e,l=Vi(r),u=Hn(o);let f=ye({breakpoints:l,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:u,shape:{...Fi,...i}},a);return f=Li(f),f.applyStyles=_s,f=t.reduce((m,y)=>ye(m,y),f),f.unstable_sxConfig={...pt,...a?.unstable_sxConfig},f.unstable_sx=function(y){return Ye({sx:y,theme:this})},f}const Ns=e=>{const t={systemProps:{},otherProps:{}},r=e?.theme?.unstable_sxConfig??pt;return Object.keys(e).forEach(n=>{r[n]?t.systemProps[n]=e[n]:t.otherProps[n]=e[n]}),t};function Vt(e){const{sx:t,...r}=e,{systemProps:n,otherProps:o}=Ns(r);let i;return Array.isArray(t)?i=[n,...t]:typeof t=="function"?i=(...a)=>{const l=t(...a);return Ie(l)?{...n,...l}:n}:i={...n,...t},{...o,sx:i}}function Kn(e){const{variants:t,...r}=e,n={variants:t,style:Ge(r),isProcessed:!0};return n.style===r||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=Ge(o.style))}),n}const Rs=mt();function vr(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function He(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Ds(e){return e?(t,r)=>r[e]:null}function Bs(e,t,r){e.theme=zs(e.theme)?r:e.theme[t]||e.theme}function zt(e,t,r){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(o=>zt(e,o,r));if(Array.isArray(n?.variants)){let o;if(n.isProcessed)o=r?He(n.style,r):n.style;else{const{variants:i,...a}=n;o=r?He(Ge(a),r):a}return Xn(e,n.variants,[o],r)}return n?.isProcessed?r?He(Ge(n.style),r):n.style:r?He(Ge(n),r):n}function Xn(e,t,r=[],n=void 0){let o;e:for(let i=0;i<t.length;i+=1){const a=t[i];if(typeof a.props=="function"){if(o??={...e,...e.ownerState,ownerState:e.ownerState},!a.props(o))continue}else for(const l in a.props)if(e[l]!==a.props[l]&&e.ownerState?.[l]!==a.props[l])continue e;typeof a.style=="function"?(o??={...e,...e.ownerState,ownerState:e.ownerState},r.push(n?He(Ge(a.style(o)),n):a.style(o))):r.push(n?He(Ge(a.style),n):a.style)}return r}function Qn(e={}){const{themeId:t,defaultTheme:r=Rs,rootShouldForwardProp:n=vr,slotShouldForwardProp:o=vr}=e;function i(l){Bs(l,t,r)}return(l,u={})=>{_i(l,E=>E.filter(z=>z!==Ye));const{name:f,slot:m,skipVariantsResolver:y,skipSx:p,overridesResolver:b=Ds(Jn(m)),...h}=u,d=f&&f.startsWith("Mui")||m?"components":"custom",g=y!==void 0?y:m&&m!=="Root"&&m!=="root"||!1,x=p||!1;let A=vr;m==="Root"||m==="root"?A=n:m?A=o:Ws(l)&&(A=void 0);const R=Rn(l,{shouldForwardProp:A,label:Vs(f,m),...h}),O=E=>{if(E.__emotion_real===E)return E;if(typeof E=="function")return function(Z){return zt(Z,E,Z.theme.modularCssLayers?d:void 0)};if(Ie(E)){const z=Kn(E);return function(G){return z.variants?zt(G,z,G.theme.modularCssLayers?d:void 0):G.theme.modularCssLayers?He(z.style,d):z.style}}return E},C=(...E)=>{const z=[],Z=E.map(O),G=[];if(z.push(i),f&&b&&G.push(function(w){const D=w.theme.components?.[f]?.styleOverrides;if(!D)return null;const M={};for(const X in D)M[X]=zt(w,D[X],w.theme.modularCssLayers?"theme":void 0);return b(w,M)}),f&&!g&&G.push(function(w){const D=w.theme?.components?.[f]?.variants;return D?Xn(w,D,[],w.theme.modularCssLayers?"theme":void 0):null}),x||G.push(Ye),Array.isArray(Z[0])){const c=Z.shift(),w=new Array(z.length).fill(""),T=new Array(G.length).fill("");let D;D=[...w,...c,...T],D.raw=[...w,...c.raw,...T],z.unshift(D)}const Y=[...z,...Z,...G],N=R(...Y);return l.muiName&&(N.muiName=l.muiName),process.env.NODE_ENV!=="production"&&(N.displayName=js(f,m,l)),N};return R.withConfig&&(C.withConfig=R.withConfig),C}}function js(e,t,r){return e?`${e}${te(t||"")}`:`Styled(${Bi(r)})`}function Vs(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${Jn(t||"Root")}`),r}function zs(e){for(const t in e)return!1;return!0}function Ws(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Jn(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const Zn=Qn();function ht(e,t,r=!1){const n={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const i=o;if(i==="components"||i==="slots")n[i]={...e[i],...n[i]};else if(i==="componentsProps"||i==="slotProps"){const a=e[i],l=t[i];if(!l)n[i]=a||{};else if(!a)n[i]=l;else{n[i]={...l};for(const u in a)if(Object.prototype.hasOwnProperty.call(a,u)){const f=u;n[i][f]=ht(a[f],l[f],r)}}}else i==="className"&&r&&t.className?n.className=fe(e?.className,t?.className):i==="style"&&r&&t.style?n.style={...e?.style,...t?.style}:n[i]===void 0&&(n[i]=e[i])}return n}function Ls(e){const{theme:t,name:r,props:n}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?n:ht(t.components[r].defaultProps,n)}function Fs(e){return Object.keys(e).length===0}function qs(e=null){const t=j.useContext(Be.ThemeContext);return!t||Fs(t)?e:t}const Gs=mt();function Wt(e=Gs){return qs(e)}function eo({props:e,name:t,defaultTheme:r,themeId:n}){let o=Wt(r);return n&&(o=o[n]||o),Ls({theme:o,name:t,props:e})}const Us=(e,t)=>e.filter(r=>t.includes(r)),tt=(e,t,r)=>{const n=e.keys[0];Array.isArray(t)?t.forEach((o,i)=>{r((a,l)=>{i<=e.keys.length-1&&(i===0?Object.assign(a,l):a[e.up(e.keys[i])]=l)},o)}):t&&typeof t=="object"?(Object.keys(t).length>e.keys.length?e.keys:Us(e.keys,Object.keys(t))).forEach(i=>{if(e.keys.includes(i)){const a=t[i];a!==void 0&&r((l,u)=>{n===i?Object.assign(l,u):l[e.up(i)]=u},a)}}):(typeof t=="number"||typeof t=="string")&&r((o,i)=>{Object.assign(o,i)},t)};function Lt(e){return`--Grid-${e}Spacing`}function Ft(e){return`--Grid-parent-${e}Spacing`}const to="--Grid-columns",rt="--Grid-parent-columns",Ys=({theme:e,ownerState:t})=>{const r={};return tt(e.breakpoints,t.size,(n,o)=>{let i={};o==="grow"&&(i={flexBasis:0,flexGrow:1,maxWidth:"100%"}),o==="auto"&&(i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof o=="number"&&(i={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${o} / var(${rt}) - (var(${rt}) - ${o}) * (var(${Ft("column")}) / var(${rt})))`}),n(r,i)}),r},Hs=({theme:e,ownerState:t})=>{const r={};return tt(e.breakpoints,t.offset,(n,o)=>{let i={};o==="auto"&&(i={marginLeft:"auto"}),typeof o=="number"&&(i={marginLeft:o===0?"0px":`calc(100% * ${o} / var(${rt}) + var(${Ft("column")}) * ${o} / var(${rt}))`}),n(r,i)}),r},Ks=({theme:e,ownerState:t})=>{if(!t.container)return{};const r={[to]:12};return tt(e.breakpoints,t.columns,(n,o)=>{const i=o??12;n(r,{[to]:i,"> *":{[rt]:i}})}),r},Xs=({theme:e,ownerState:t})=>{if(!t.container)return{};const r={};return tt(e.breakpoints,t.rowSpacing,(n,o)=>{const i=typeof o=="string"?o:e.spacing?.(o);n(r,{[Lt("row")]:i,"> *":{[Ft("row")]:i}})}),r},Qs=({theme:e,ownerState:t})=>{if(!t.container)return{};const r={};return tt(e.breakpoints,t.columnSpacing,(n,o)=>{const i=typeof o=="string"?o:e.spacing?.(o);n(r,{[Lt("column")]:i,"> *":{[Ft("column")]:i}})}),r},Js=({theme:e,ownerState:t})=>{if(!t.container)return{};const r={};return tt(e.breakpoints,t.direction,(n,o)=>{n(r,{flexDirection:o})}),r},Zs=({ownerState:e})=>({minWidth:0,boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",...e.wrap&&e.wrap!=="wrap"&&{flexWrap:e.wrap},gap:`var(${Lt("row")}) var(${Lt("column")})`}}),ea=e=>{const t=[];return Object.entries(e).forEach(([r,n])=>{n!==!1&&n!==void 0&&t.push(`grid-${r}-${String(n)}`)}),t},ta=(e,t="xs")=>{function r(n){return n===void 0?!1:typeof n=="string"&&!Number.isNaN(Number(n))||typeof n=="number"&&n>0}if(r(e))return[`spacing-${t}-${String(e)}`];if(typeof e=="object"&&!Array.isArray(e)){const n=[];return Object.entries(e).forEach(([o,i])=>{r(i)&&n.push(`spacing-${o}-${String(i)}`)}),n}return[]},ra=e=>e===void 0?[]:typeof e=="object"?Object.entries(e).map(([t,r])=>`direction-${t}-${r}`):[`direction-xs-${String(e)}`],Fc=e=>["item","zeroMinWidth"].includes(e)?`The \`${e}\` prop has been removed and is no longer necessary. You can safely remove it.`:`The \`${e}\` prop has been removed. See https://mui.com/material-ui/migration/upgrade-to-grid-v2/ for migration instructions.`,ro=[];function na(e,t){const r=[];e.item!==void 0&&(delete e.item,r.push("item")),e.zeroMinWidth!==void 0&&(delete e.zeroMinWidth,r.push("zeroMinWidth")),t.keys.forEach(n=>{e[n]!==void 0&&(r.push(n),delete e[n])}),process.env.NODE_ENV!=="production"&&r.forEach(n=>{ro.includes(n)||ro.push(n)})}const oa=mt(),ia=Zn("div",{name:"MuiGrid",slot:"Root"});function sa(e){return eo({props:e,name:"MuiGrid",defaultTheme:oa})}function aa(e={}){const{createStyledComponent:t=ia,useThemeProps:r=sa,useTheme:n=Wt,componentName:o="MuiGrid"}=e,i=(f,m)=>{const{container:y,direction:p,spacing:b,wrap:h,size:d}=f,g={root:["root",y&&"container",h!=="wrap"&&`wrap-xs-${String(h)}`,...ra(p),...ea(d),...y?ta(b,m.breakpoints.keys[0]):[]]};return Pe(g,x=>ve(o,x),{})};function a(f,m,y=()=>!0){const p={};return f===null||(Array.isArray(f)?f.forEach((b,h)=>{b!==null&&y(b)&&m.keys[h]&&(p[m.keys[h]]=b)}):typeof f=="object"?Object.keys(f).forEach(b=>{const h=f[b];h!=null&&y(h)&&(p[b]=h)}):p[m.keys[0]]=f),p}const l=t(Ks,Qs,Xs,Ys,Js,Zs,Hs),u=j.forwardRef(function(m,y){const p=n(),b=r(m),h=Vt(b);na(h,p.breakpoints);const{className:d,children:g,columns:x=12,container:A=!1,component:R="div",direction:O="row",wrap:C="wrap",size:E={},offset:z={},spacing:Z=0,rowSpacing:G=Z,columnSpacing:Y=Z,unstable_level:N=0,...c}=h,w=a(E,p.breakpoints,k=>k!==!1),T=a(z,p.breakpoints),D=m.columns??(N?void 0:x),M=m.spacing??(N?void 0:Z),X=m.rowSpacing??m.spacing??(N?void 0:G),re=m.columnSpacing??m.spacing??(N?void 0:Y),ce={...h,level:N,columns:D,container:A,direction:O,wrap:C,spacing:M,rowSpacing:X,columnSpacing:re,size:w,offset:T},$=i(ce,p);return v.jsx(l,{ref:y,as:R,ownerState:ce,className:fe($.root,d),...c,children:j.Children.map(g,k=>j.isValidElement(k)&&wi(k,["Grid"])&&A&&k.props.container?j.cloneElement(k,{unstable_level:k.props?.unstable_level??N+1}):k)})});return process.env.NODE_ENV!=="production"&&(u.propTypes={children:s.node,className:s.string,columns:s.oneOfType([s.arrayOf(s.number),s.number,s.object]),columnSpacing:s.oneOfType([s.arrayOf(s.oneOfType([s.number,s.string])),s.number,s.object,s.string]),component:s.elementType,container:s.bool,direction:s.oneOfType([s.oneOf(["column-reverse","column","row-reverse","row"]),s.arrayOf(s.oneOf(["column-reverse","column","row-reverse","row"])),s.object]),offset:s.oneOfType([s.string,s.number,s.arrayOf(s.oneOfType([s.string,s.number])),s.object]),rowSpacing:s.oneOfType([s.arrayOf(s.oneOfType([s.number,s.string])),s.number,s.object,s.string]),size:s.oneOfType([s.string,s.bool,s.number,s.arrayOf(s.oneOfType([s.string,s.bool,s.number])),s.object]),spacing:s.oneOfType([s.arrayOf(s.oneOfType([s.number,s.string])),s.number,s.object,s.string]),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),wrap:s.oneOf(["nowrap","wrap-reverse","wrap"])}),u.muiName="Grid",u}function Me(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=ve(e,o,r)}),n}function la(e,t){if(process.env.NODE_ENV==="production")return()=>()=>null;const r=t?{...t.propTypes}:null;return o=>(i,a,l,u,f,...m)=>{const y=f||a,p=r?.[y];if(p){const b=p(i,a,l,u,f,...m);if(b)return b}return typeof i[a]<"u"&&!i[o]?new Error(`The prop \`${y}\` of \`${e}\` can only be used together with the \`${o}\` prop.`):null}}const Sr="$$material";function ca(e={}){const{themeId:t,defaultTheme:r,defaultClassName:n="MuiBox-root",generateClassName:o}=e,i=Rn("div",{shouldForwardProp:l=>l!=="theme"&&l!=="sx"&&l!=="as"})(Ye);return j.forwardRef(function(u,f){const m=Wt(r),{className:y,component:p="div",...b}=Vt(u);return v.jsx(i,{as:p,ref:f,className:fe(y,o?o(n):n),theme:t&&m[t]||m,...b})})}const ua=typeof window<"u"?j.useLayoutEffect:j.useEffect;function da(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function Cr(e,t=0,r=1){return process.env.NODE_ENV!=="production"&&(e<t||e>r),da(e,t,r)}function fa(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),r?`rgb${r.length===4?"a":""}(${r.map((n,o)=>o<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function We(e){if(e.type)return e;if(e.charAt(0)==="#")return We(fa(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.
4
- The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Ve(9,e));let n=e.substring(t+1,e.length-1),o;if(r==="color"){if(n=n.split(" "),o=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(o))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
5
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Ve(10,o))}else n=n.split(",");return n=n.map(i=>parseFloat(i)),{type:r,values:n,colorSpace:o}}const pa=e=>{const t=We(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},gt=(e,t)=>{try{return pa(e)}catch{return t&&process.env.NODE_ENV,e}};function qt(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((o,i)=>i<3?parseInt(o,10):o):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function no(e){e=We(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,i=n*Math.min(o,1-o),a=(f,m=(f+r/30)%12)=>o-i*Math.max(Math.min(m-3,9-m,1),-1);let l="rgb";const u=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(l+="a",u.push(t[3])),qt({type:l,values:u})}function Tr(e){e=We(e);let t=e.type==="hsl"||e.type==="hsla"?We(no(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function oo(e,t){const r=Tr(e),n=Tr(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function Gt(e,t){return e=We(e),t=Cr(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,qt(e)}function Ke(e,t,r){try{return Gt(e,t)}catch{return r&&process.env.NODE_ENV,e}}function Ut(e,t){if(e=We(e),t=Cr(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 qt(e)}function ie(e,t,r){try{return Ut(e,t)}catch{return r&&process.env.NODE_ENV,e}}function Yt(e,t){if(e=We(e),t=Cr(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 qt(e)}function se(e,t,r){try{return Yt(e,t)}catch{return r&&process.env.NODE_ENV,e}}function ma(e,t=.15){return Tr(e)>.5?Ut(e,t):Yt(e,t)}function Ht(e,t,r){try{return ma(e,t)}catch{return e}}const ha=j.createContext(void 0);process.env.NODE_ENV!=="production"&&(s.node,s.object);function ga(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const o=t.components[r];return o.defaultProps?ht(o.defaultProps,n,t.components.mergeClassNameAndStyle):!o.styleOverrides&&!o.variants?ht(o,n,t.components.mergeClassNameAndStyle):n}function ya({props:e,name:t}){const r=j.useContext(ha);return ga({props:e,name:t,theme:{components:r}})}let io=0;function ba(e){const[t,r]=j.useState(e),n=e||t;return j.useEffect(()=>{t==null&&(io+=1,r(`mui-${io}`))},[t]),n}const so={...j}.useId;function ao(e){if(so!==void 0){const t=so();return e??t}return ba(e)}const lo={theme:void 0};function va(e){let t,r;return function(o){let i=t;return(i===void 0||o.theme!==r)&&(lo.theme=o.theme,i=Kn(e(lo)),t=i,r=o.theme),i}}function Sa(e=""){function t(...n){if(!n.length)return"";const o=n[0];return typeof o=="string"&&!o.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}-`:""}${o}${t(...n.slice(1))})`:`, ${o}`}return(n,...o)=>`var(--${e?`${e}-`:""}${n}${t(...o)})`}const co=(e,t,r,n=[])=>{let o=e;t.forEach((i,a)=>{a===t.length-1?Array.isArray(o)?o[Number(i)]=r:o&&typeof o=="object"&&(o[i]=r):o&&typeof o=="object"&&(o[i]||(o[i]=n.includes(i)?[]:{}),o=o[i])})},Ca=(e,t,r)=>{function n(o,i=[],a=[]){Object.entries(o).forEach(([l,u])=>{(!r||r&&!r([...i,l]))&&u!=null&&(typeof u=="object"&&Object.keys(u).length>0?n(u,[...i,l],Array.isArray(u)?[...a,l]:a):t([...i,l],u,a))})}n(e)},Ta=(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 xr(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},o={},i={},a={};return Ca(e,(l,u,f)=>{if((typeof u=="string"||typeof u=="number")&&(!n||!n(l,u))){const m=`--${r?`${r}-`:""}${l.join("-")}`,y=Ta(l,u);Object.assign(o,{[m]:y}),co(i,l,`var(${m})`,f),co(a,l,`var(${m}, ${y})`,f)}},l=>l[0]==="vars"),{css:o,vars:i,varsWithDefaults:a}}function xa(e,t={}){const{getSelector:r=x,disableCssColorScheme:n,colorSchemeSelector:o,enableContrastVars:i}=t,{colorSchemes:a={},components:l,defaultColorScheme:u="light",...f}=e,{vars:m,css:y,varsWithDefaults:p}=xr(f,t);let b=p;const h={},{[u]:d,...g}=a;if(Object.entries(g||{}).forEach(([O,C])=>{const{vars:E,css:z,varsWithDefaults:Z}=xr(C,t);b=ye(b,Z),h[O]={css:z,vars:E}}),d){const{css:O,vars:C,varsWithDefaults:E}=xr(d,t);b=ye(b,E),h[u]={css:O,vars:C}}function x(O,C){let E=o;if(o==="class"&&(E=".%s"),o==="data"&&(E="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(E=`[${o}="%s"]`),O){if(E==="media")return e.defaultColorScheme===O?":root":{[`@media (prefers-color-scheme: ${a[O]?.palette?.mode||O})`]:{":root":C}};if(E)return e.defaultColorScheme===O?`:root, ${E.replace("%s",String(O))}`:E.replace("%s",String(O))}return":root"}return{vars:b,generateThemeVars:()=>{let O={...m};return Object.entries(h).forEach(([,{vars:C}])=>{O=ye(O,C)}),O},generateStyleSheets:()=>{const O=[],C=e.defaultColorScheme||"light";function E(G,Y){Object.keys(Y).length&&O.push(typeof G=="string"?{[G]:{...Y}}:G)}E(r(void 0,{...y}),y);const{[C]:z,...Z}=h;if(z){const{css:G}=z,Y=a[C]?.palette?.mode,N=!n&&Y?{colorScheme:Y,...G}:{...G};E(r(C,{...N}),N)}return Object.entries(Z).forEach(([G,{css:Y}])=>{const N=a[G]?.palette?.mode,c=!n&&N?{colorScheme:N,...Y}:{...Y};E(r(G,{...c}),c)}),i&&O.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),O}}}function wa(e){return function(r){return e==="media"?(process.env.NODE_ENV,`@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 Ea=mt(),Oa=Zn("div",{name:"MuiStack",slot:"Root"});function $a(e){return eo({props:e,name:"MuiStack",defaultTheme:Ea})}function ka(e,t){const r=j.Children.toArray(e).filter(Boolean);return r.reduce((n,o,i)=>(n.push(o),i<r.length-1&&n.push(j.cloneElement(t,{key:`separator-${i}`})),n),[])}const Aa=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],Pa=({ownerState:e,theme:t})=>{let r={display:"flex",flexDirection:"column",...Ee({theme:t},yr({values:e.direction,breakpoints:t.breakpoints.values}),n=>({flexDirection:n}))};if(e.spacing){const n=_t(t),o=Object.keys(t.breakpoints.values).reduce((u,f)=>((typeof e.spacing=="object"&&e.spacing[f]!=null||typeof e.direction=="object"&&e.direction[f]!=null)&&(u[f]=!0),u),{}),i=yr({values:e.direction,base:o}),a=yr({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((u,f,m)=>{if(!i[u]){const p=f>0?i[m[f-1]]:"column";i[u]=p}}),r=ye(r,Ee({theme:t},a,(u,f)=>e.useFlexGap?{gap:Ue(n,u)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Aa(f?i[f]:e.direction)}`]:Ue(n,u)}}))}return r=Gi(t.breakpoints,r),r};function Ia(e={}){const{createStyledComponent:t=Oa,useThemeProps:r=$a,componentName:n="MuiStack"}=e,o=()=>Pe({root:["root"]},u=>ve(n,u),{}),i=t(Pa),a=j.forwardRef(function(u,f){const m=r(u),y=Vt(m),{component:p="div",direction:b="column",spacing:h=0,divider:d,children:g,className:x,useFlexGap:A=!1,...R}=y,O={direction:b,spacing:h,useFlexGap:A},C=o();return v.jsx(i,{as:p,ownerState:O,ref:f,className:fe(C.root,x),...R,children:d?ka(g,d):g})});return process.env.NODE_ENV!=="production"&&(a.propTypes={children:s.node,direction:s.oneOfType([s.oneOf(["column-reverse","column","row-reverse","row"]),s.arrayOf(s.oneOf(["column-reverse","column","row-reverse","row"])),s.object]),divider:s.node,spacing:s.oneOfType([s.arrayOf(s.oneOfType([s.number,s.string])),s.number,s.object,s.string]),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])}),a}const yt={black:"#000",white:"#fff"},Ma={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"},nt={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},ot={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},bt={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},it={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},st={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},at={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function uo(){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:yt.white,default:yt.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 fo=uo();function po(){return{text:{primary:yt.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:yt.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 wr=po();function mo(e,t,r,n){const o=n.light||n,i=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Yt(e.main,o):t==="dark"&&(e.dark=Ut(e.main,i)))}function ho(e,t,r,n,o){const i=o.light||o,a=o.dark||o*1.5;t[r]||(t.hasOwnProperty(n)?t[r]=t[n]:r==="light"?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(i*100).toFixed(0)}%)`:r==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(a*100).toFixed(0)}%)`))}function _a(e="light"){return e==="dark"?{main:it[200],light:it[50],dark:it[400]}:{main:it[700],light:it[400],dark:it[800]}}function Na(e="light"){return e==="dark"?{main:nt[200],light:nt[50],dark:nt[400]}:{main:nt[500],light:nt[300],dark:nt[700]}}function Ra(e="light"){return e==="dark"?{main:ot[500],light:ot[300],dark:ot[700]}:{main:ot[700],light:ot[400],dark:ot[800]}}function Da(e="light"){return e==="dark"?{main:st[400],light:st[300],dark:st[700]}:{main:st[700],light:st[500],dark:st[900]}}function Ba(e="light"){return e==="dark"?{main:at[400],light:at[300],dark:at[700]}:{main:at[800],light:at[500],dark:at[900]}}function ja(e="light"){return e==="dark"?{main:bt[400],light:bt[300],dark:bt[700]}:{main:"#ed6c02",light:bt[500],dark:bt[900]}}function Va(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function Er(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,colorSpace:o,...i}=e,a=e.primary||_a(t),l=e.secondary||Na(t),u=e.error||Ra(t),f=e.info||Da(t),m=e.success||Ba(t),y=e.warning||ja(t);function p(g){if(o)return Va(g);const x=oo(g,wr.text.primary)>=r?wr.text.primary:fo.text.primary;return process.env.NODE_ENV!=="production"&&oo(g,x)<3,x}const b=({color:g,name:x,mainShade:A=500,lightShade:R=300,darkShade:O=700})=>{if(g={...g},!g.main&&g[A]&&(g.main=g[A]),!g.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${x?` (${x})`:""} provided to augmentColor(color) is invalid.
6
- The color object needs to have a \`main\` property or a \`${A}\` property.`:Ve(11,x?` (${x})`:"",A));if(typeof g.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${x?` (${x})`:""} provided to augmentColor(color) is invalid.
1
+ (function(k,et){typeof exports=="object"&&typeof module<"u"?et(exports,require("valibot"),require("react/jsx-runtime"),require("react"),require("@mui/material"),require("@mui/x-date-pickers"),require("@mui/x-date-pickers/AdapterDayjs"),require("dayjs/locale/zh-cn"),require("@mui/icons-material"),require("dayjs"),require("@emotion/styled"),require("@emotion/react")):typeof define=="function"&&define.amd?define(["exports","valibot","react/jsx-runtime","react","@mui/material","@mui/x-date-pickers","@mui/x-date-pickers/AdapterDayjs","dayjs/locale/zh-cn","@mui/icons-material","dayjs","@emotion/styled","@emotion/react"],et):(k=typeof globalThis<"u"?globalThis:k||self,et(k.SchemaFormLib={},k.Valibot,k.jsxRuntime,k.React,k.MaterialUI,k.xDatePickers,k.AdapterDayjs,null,k.iconsMaterial,k.dayjs,k.emStyled))})(this,(function(k,et,v,O,w,tt,Ut,tu,ut,Be,Vs){"use strict";var Vr=typeof document<"u"?document.currentScript:null;function Nn(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const D=Nn(et),Ve=Nn(O);class Ps{add(e,r,n){if(typeof arguments[0]!="string")for(let i in arguments[0])this.add(i,arguments[0][i],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(i){this[i]=this[i]||[],r&&this[i][n?"unshift":"push"](r)},this)}run(e,r){this[e]=this[e]||[],this[e].forEach(function(n){n.call(r&&r.context?r.context:r,r)})}}class Ds{constructor(e){this.jsep=e,this.registered={}}register(...e){e.forEach(r=>{if(typeof r!="object"||!r.name||!r.init)throw new Error("Invalid JSEP plugin format");this.registered[r.name]||(r.init(this.jsep),this.registered[r.name]=r)})}}class S{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+S.version}static addUnaryOp(e){return S.max_unop_len=Math.max(e.length,S.max_unop_len),S.unary_ops[e]=1,S}static addBinaryOp(e,r,n){return S.max_binop_len=Math.max(e.length,S.max_binop_len),S.binary_ops[e]=r,n?S.right_associative.add(e):S.right_associative.delete(e),S}static addIdentifierChar(e){return S.additional_identifier_chars.add(e),S}static addLiteral(e,r){return S.literals[e]=r,S}static removeUnaryOp(e){return delete S.unary_ops[e],e.length===S.max_unop_len&&(S.max_unop_len=S.getMaxKeyLen(S.unary_ops)),S}static removeAllUnaryOps(){return S.unary_ops={},S.max_unop_len=0,S}static removeIdentifierChar(e){return S.additional_identifier_chars.delete(e),S}static removeBinaryOp(e){return delete S.binary_ops[e],e.length===S.max_binop_len&&(S.max_binop_len=S.getMaxKeyLen(S.binary_ops)),S.right_associative.delete(e),S}static removeAllBinaryOps(){return S.binary_ops={},S.max_binop_len=0,S}static removeLiteral(e){return delete S.literals[e],S}static removeAllLiterals(){return S.literals={},S}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new S(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map(r=>r.length))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return S.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!S.binary_ops[String.fromCharCode(e)]||S.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return S.isIdentifierStart(e)||S.isDecimalDigit(e)}throwError(e){const r=new Error(e+" at character "+this.index);throw r.index=this.index,r.description=e,r}runHook(e,r){if(S.hooks[e]){const n={context:this,node:r};return S.hooks.run(e,n),n.node}return r}searchHook(e){if(S.hooks[e]){const r={context:this};return S.hooks[e].find(function(n){return n.call(r.context,r),r.node}),r.node}}gobbleSpaces(){let e=this.code;for(;e===S.SPACE_CODE||e===S.TAB_CODE||e===S.LF_CODE||e===S.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const e=this.gobbleExpressions(),r=e.length===1?e[0]:{type:S.COMPOUND,body:e};return this.runHook("after-all",r)}gobbleExpressions(e){let r=[],n,i;for(;this.index<this.expr.length;)if(n=this.code,n===S.SEMCOL_CODE||n===S.COMMA_CODE)this.index++;else if(i=this.gobbleExpression())r.push(i);else if(this.index<this.expr.length){if(n===e)break;this.throwError('Unexpected "'+this.char+'"')}return r}gobbleExpression(){const e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}gobbleBinaryOp(){this.gobbleSpaces();let e=this.expr.substr(this.index,S.max_binop_len),r=e.length;for(;r>0;){if(S.binary_ops.hasOwnProperty(e)&&(!S.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!S.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=r,e;e=e.substr(0,--r)}return!1}gobbleBinaryExpression(){let e,r,n,i,s,o,a,c,d;if(o=this.gobbleToken(),!o||(r=this.gobbleBinaryOp(),!r))return o;for(s={value:r,prec:S.binaryPrecedence(r),right_a:S.right_associative.has(r)},a=this.gobbleToken(),a||this.throwError("Expected expression after "+r),i=[o,s,a];r=this.gobbleBinaryOp();){if(n=S.binaryPrecedence(r),n===0){this.index-=r.length;break}s={value:r,prec:n,right_a:S.right_associative.has(r)},d=r;const l=u=>s.right_a&&u.right_a?n>u.prec:n<=u.prec;for(;i.length>2&&l(i[i.length-2]);)a=i.pop(),r=i.pop().value,o=i.pop(),e={type:S.BINARY_EXP,operator:r,left:o,right:a},i.push(e);e=this.gobbleToken(),e||this.throwError("Expected expression after "+d),i.push(s,e)}for(c=i.length-1,e=i[c];c>1;)e={type:S.BINARY_EXP,operator:i[c-1].value,left:i[c-2],right:e},c-=2;return e}gobbleToken(){let e,r,n,i;if(this.gobbleSpaces(),i=this.searchHook("gobble-token"),i)return this.runHook("after-token",i);if(e=this.code,S.isDecimalDigit(e)||e===S.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===S.SQUOTE_CODE||e===S.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(e===S.OBRACK_CODE)i=this.gobbleArray();else{for(r=this.expr.substr(this.index,S.max_unop_len),n=r.length;n>0;){if(S.unary_ops.hasOwnProperty(r)&&(!S.isIdentifierStart(this.code)||this.index+r.length<this.expr.length&&!S.isIdentifierPart(this.expr.charCodeAt(this.index+r.length)))){this.index+=n;const s=this.gobbleToken();return s||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:S.UNARY_EXP,operator:r,argument:s,prefix:!0})}r=r.substr(0,--n)}S.isIdentifierStart(e)?(i=this.gobbleIdentifier(),S.literals.hasOwnProperty(i.name)?i={type:S.LITERAL,value:S.literals[i.name],raw:i.name}:i.name===S.this_str&&(i={type:S.THIS_EXP})):e===S.OPAREN_CODE&&(i=this.gobbleGroup())}return i?(i=this.gobbleTokenProperty(i),this.runHook("after-token",i)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let r=this.code;for(;r===S.PERIOD_CODE||r===S.OBRACK_CODE||r===S.OPAREN_CODE||r===S.QUMARK_CODE;){let n;if(r===S.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==S.PERIOD_CODE)break;n=!0,this.index+=2,this.gobbleSpaces(),r=this.code}this.index++,r===S.OBRACK_CODE?(e={type:S.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()},e.property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),r=this.code,r!==S.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):r===S.OPAREN_CODE?e={type:S.CALL_EXP,arguments:this.gobbleArguments(S.CPAREN_CODE),callee:e}:(r===S.PERIOD_CODE||n)&&(n&&this.index--,this.gobbleSpaces(),e={type:S.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),n&&(e.optional=!0),this.gobbleSpaces(),r=this.code}return e}gobbleNumericLiteral(){let e="",r,n;for(;S.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===S.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);S.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(r=this.char,r==="e"||r==="E"){for(e+=this.expr.charAt(this.index++),r=this.char,(r==="+"||r==="-")&&(e+=this.expr.charAt(this.index++));S.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);S.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return n=this.code,S.isIdentifierStart(n)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(n===S.PERIOD_CODE||e.length===1&&e.charCodeAt(0)===S.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:S.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="";const r=this.index,n=this.expr.charAt(this.index++);let i=!1;for(;this.index<this.expr.length;){let s=this.expr.charAt(this.index++);if(s===n){i=!0;break}else if(s==="\\")switch(s=this.expr.charAt(this.index++),s){case"n":e+=`
2
+ `;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=s}else e+=s}return i||this.throwError('Unclosed quote after "'+e+'"'),{type:S.LITERAL,value:e,raw:this.expr.substring(r,this.index)}}gobbleIdentifier(){let e=this.code,r=this.index;for(S.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(e=this.code,S.isIdentifierPart(e));)this.index++;return{type:S.IDENTIFIER,name:this.expr.slice(r,this.index)}}gobbleArguments(e){const r=[];let n=!1,i=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let s=this.code;if(s===e){n=!0,this.index++,e===S.CPAREN_CODE&&i&&i>=r.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}else if(s===S.COMMA_CODE){if(this.index++,i++,i!==r.length){if(e===S.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===S.CBRACK_CODE)for(let o=r.length;o<i;o++)r.push(null)}}else if(r.length!==i&&i!==0)this.throwError("Expected comma");else{const o=this.gobbleExpression();(!o||o.type===S.COMPOUND)&&this.throwError("Expected comma"),r.push(o)}}return n||this.throwError("Expected "+String.fromCharCode(e)),r}gobbleGroup(){this.index++;let e=this.gobbleExpressions(S.CPAREN_CODE);if(this.code===S.CPAREN_CODE)return this.index++,e.length===1?e[0]:e.length?{type:S.SEQUENCE_EXP,expressions:e}:!1;this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:S.ARRAY_EXP,elements:this.gobbleArguments(S.CBRACK_CODE)}}}const Ls=new Ps;Object.assign(S,{hooks:Ls,plugins:new Ds(S),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),S.max_unop_len=S.getMaxKeyLen(S.unary_ops),S.max_binop_len=S.getMaxKeyLen(S.binary_ops);const rt=t=>new S(t).parse(),Ns=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(S).filter(t=>!Ns.includes(t)&&rt[t]===void 0).forEach(t=>{rt[t]=S[t]}),rt.Jsep=S;const Bs="ConditionalExpression";var Rs={name:"ternary",init(t){t.hooks.add("after-expression",function(r){if(r.node&&this.code===t.QUMARK_CODE){this.index++;const n=r.node,i=this.gobbleExpression();if(i||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===t.COLON_CODE){this.index++;const s=this.gobbleExpression();if(s||this.throwError("Expected expression"),r.node={type:Bs,test:n,consequent:i,alternate:s},n.operator&&t.binary_ops[n.operator]<=.9){let o=n;for(;o.right.operator&&t.binary_ops[o.right.operator]<=.9;)o=o.right;r.node.test=o.right,o.right=r.node,r.node=n}}else this.throwError("Expected :")}})}};rt.plugins.register(Rs);const Bn=new Set(["__proto__","constructor","prototype","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"]),Pr=new Set(["eval","Function","setTimeout","setInterval","setImmediate","fetch","XMLHttpRequest","WebSocket","require","import","process","global","globalThis","window","document"]);class Rn{allowedGlobals;constructor(){this.allowedGlobals=Object.freeze({Math,Number,String,Boolean,Array,Object:Object.freeze({keys:Object.keys,values:Object.values,entries:Object.entries,fromEntries:Object.fromEntries,assign:Object.assign}),Date,JSON:Object.freeze({parse:JSON.parse,stringify:JSON.stringify}),isNaN,isFinite,parseFloat,parseInt,NaN:NaN,Infinity:1/0,undefined:void 0,null:null,true:!0,false:!1})}compile(e){try{const r=rt(e);return this.validateNode(r),n=>this.evaluate(r,n)}catch(r){const n=r instanceof Error?r.message:String(r);throw new Error(`Invalid expression "${e}": ${n}`)}}tryCompile(e){try{return this.compile(e)}catch{return null}}evaluate(e,r){switch(e.type){case"Literal":return e.value;case"Identifier":{const n=e.name;if(Pr.has(n))throw new Error(`[SafeEvaluator] Security violation: accessing '${n}' is forbidden`);return Object.prototype.hasOwnProperty.call(r.values,n)?r.values[n]:Object.prototype.hasOwnProperty.call(r.meta,n)?r.meta[n]:Object.prototype.hasOwnProperty.call(r.context,n)?r.context[n]:Object.prototype.hasOwnProperty.call(this.allowedGlobals,n)?this.allowedGlobals[n]:n==="undefined"?void 0:n==="null"?null:n==="true"?!0:n==="false"?!1:void 0}case"BinaryExpression":{const n=e,i=this.evaluate(n.left,r),s=this.evaluate(n.right,r);switch(n.operator){case"+":return i+s;case"-":return i-s;case"*":return i*s;case"/":return i/s;case"%":return i%s;case"==":return i==s;case"!=":return i!=s;case"===":return i===s;case"!==":return i!==s;case">":return i>s;case"<":return i<s;case">=":return i>=s;case"<=":return i<=s;case"&&":return i&&s;case"||":return i||s;default:throw new Error(`Unknown binary operator: ${n.operator}`)}}case"UnaryExpression":{const n=e,i=this.evaluate(n.argument,r);switch(n.operator){case"!":return!i;case"-":return-i;case"+":return+i;default:throw new Error(`Unknown unary operator: ${n.operator}`)}}case"MemberExpression":{const n=e,i=this.evaluate(n.object,r);if(i==null)return;let s;if(n.computed?s=this.evaluate(n.property,r):s=n.property.name,Bn.has(String(s)))throw new Error(`[SafeEvaluator] Security violation: accessing '${s}' is forbidden`);if(typeof i=="object"&&i!==null&&!Object.prototype.hasOwnProperty.call(i,s)&&!(s in i))return;const o=i[s];if(typeof o=="function"){const a=String(s);if(a.startsWith("__")||a==="constructor")throw new Error(`[SafeEvaluator] Security violation: calling '${a}' is forbidden`);return o.bind(i)}return o}case"CallExpression":{const n=e,i=this.evaluate(n.callee,r);if(typeof i!="function")throw new Error("Callee is not a function");const s=n.arguments.map(o=>this.evaluate(o,r));return i(...s)}case"ConditionalExpression":{const n=e;return this.evaluate(n.test,r)?this.evaluate(n.consequent,r):this.evaluate(n.alternate,r)}case"ArrayExpression":return e.elements.map(i=>i?this.evaluate(i,r):null);case"Compound":{const n=e;let i;for(const s of n.body)i=this.evaluate(s,r);return i}default:throw new Error(`[SafeEvaluator] Unsupported expression type: ${e.type}`)}}extractDependencies(e){const r=new Set,n=new Set(["undefined","null","true","false","NaN","Infinity"]);try{const i=rt(e);this.visitIdentifiers(i,s=>{!Object.prototype.hasOwnProperty.call(this.allowedGlobals,s)&&!n.has(s)&&!Pr.has(s)&&r.add(s)})}catch{}return Array.from(r)}validate(e){try{const r=rt(e);return this.validateNode(r),{valid:!0}}catch(r){return{valid:!1,error:r instanceof Error?r.message:String(r)}}}validateNode(e){if(e.type==="Identifier"){const r=e.name;if(Pr.has(r))throw new Error(`Forbidden identifier: ${r}`)}else if(e.type==="MemberExpression"){const r=e;if(this.validateNode(r.object),r.computed)this.validateNode(r.property);else{const n=r.property.name;if(Bn.has(n))throw new Error(`Forbidden property access: ${n}`)}}else if(e.type==="BinaryExpression"){const r=e;this.validateNode(r.left),this.validateNode(r.right)}else if(e.type==="UnaryExpression")this.validateNode(e.argument);else if(e.type==="CallExpression"){const r=e;this.validateNode(r.callee),r.arguments.forEach(n=>this.validateNode(n))}else if(e.type==="ConditionalExpression"){const r=e;this.validateNode(r.test),this.validateNode(r.consequent),this.validateNode(r.alternate)}else e.type==="ArrayExpression"?e.elements.forEach(r=>{r&&this.validateNode(r)}):e.type==="Compound"&&e.body.forEach(r=>this.validateNode(r))}visitIdentifiers(e,r){if(e.type==="Identifier")r(e.name);else if(e.type==="BinaryExpression"){const n=e;this.visitIdentifiers(n.left,r),this.visitIdentifiers(n.right,r)}else if(e.type==="UnaryExpression")this.visitIdentifiers(e.argument,r);else if(e.type==="MemberExpression"){const n=e;this.visitIdentifiers(n.object,r),n.computed&&this.visitIdentifiers(n.property,r)}else if(e.type==="CallExpression"){const n=e;this.visitIdentifiers(n.callee,r),n.arguments.forEach(i=>this.visitIdentifiers(i,r))}else if(e.type==="ConditionalExpression"){const n=e;this.visitIdentifiers(n.test,r),this.visitIdentifiers(n.consequent,r),this.visitIdentifiers(n.alternate,r)}else e.type==="ArrayExpression"&&e.elements.forEach(n=>{n&&this.visitIdentifiers(n,r)})}}const At=new Rn;class Dr{strictMode;constructor(e={}){this.strictMode=e.strictMode??!0}analyze(e,r){const n=new Map,i=new Map,s=new Set,o=new Set,a=new Set,c=new Map,d=[];for(const m of e){const y="target"in m?m.target:null;if(!y){if(m.type==="effect")for(const f of m.deps)s.add(f),a.add(f),c.has(f)||c.set(f,[]),c.get(f).push(m);continue}s.add(y),o.add(y),m.deps.length===0&&m.type!=="options"&&d.push(`Rule for "${y}" has no dependencies - it will only run on initialization`);for(const f of m.deps)s.add(f),a.add(f),n.has(f)||n.set(f,new Set),n.get(f).add(y),i.has(y)||i.set(y,new Set),i.get(y).add(f),c.has(f)||c.set(f,[]),c.get(f).push(m)}const l=this.findCycles(n);if(l.length>0){const y=`[DependencyAnalyzer] Cyclic dependencies detected:
3
+ ${l.map(f=>f.join(" -> ")).join(`
4
+ `)}`;if(this.strictMode)throw new Error(y);d.push(y)}const u=this.findIsolatedFields(r?new Set(r):s,a,o),h=this.topologicalSort(n,s);return{dependencyMap:c,topologicalOrder:h,cycles:l,isolatedFields:u,report:{cycles:l,isolatedFields:u,warnings:d}}}findIsolatedFields(e,r,n){const i=new Set([...r,...n]),s=[];for(const o of e)i.has(o)||s.push(o);return s}findCycles(e){let r=0;const n=[],i=new Map,s=new Map,o=new Set,a=[],c=d=>{i.set(d,r),s.set(d,r),r++,n.push(d),o.add(d);const l=e.get(d)||new Set;for(const u of l)i.has(u)?o.has(u)&&s.set(d,Math.min(s.get(d),i.get(u))):(c(u),s.set(d,Math.min(s.get(d),s.get(u))));if(s.get(d)===i.get(d)){const u=[];let h;do h=n.pop(),o.delete(h),u.push(h);while(h!==d);(u.length>1||e.get(d)?.has(d))&&a.push(u)}};for(const d of e.keys())i.has(d)||c(d);return a}topologicalSort(e,r){const n=new Set,i=[],s=o=>{if(n.has(o))return;n.add(o);const a=e.get(o)||new Set;for(const c of a)s(c);i.push(o)};for(const o of r)s(o);return i.reverse()}}const Ws=new Dr;function Ce(t){return!!(t==null||typeof t=="string"&&t.trim()===""||Array.isArray(t)&&t.length===0)}function Mt(t){return!Array.isArray(t)||t.length===0?!1:typeof t[0]=="object"&&t[0]!==null&&"type"in t[0]&&typeof t[0].type=="string"}const Wn={required:t=>D.check(e=>!Ce(e),t?.message??`${t?.label??"该字段"}不能为空`),email:t=>D.check(e=>Ce(e)||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(e)),t?.message??`${t?.label??"该字段"}必须是有效的邮箱`),phone:t=>D.check(e=>Ce(e)||/^1[3-9]\d{9}$/.test(String(e)),t?.message??`${t?.label??"该字段"}必须是有效的手机号`),url:t=>D.check(e=>{if(Ce(e))return!0;try{return new URL(String(e)),!0}catch{return!1}},t?.message??`${t?.label??"该字段"}必须是有效的URL`),minLength:t=>D.check(e=>Ce(e)||String(e).length>=(t?.value??0),t?.message??`${t?.label??"该字段"}至少${t?.value??0}个字符`),maxLength:t=>D.check(e=>Ce(e)||String(e).length<=(t?.value??1/0),t?.message??`${t?.label??"该字段"}最多${t?.value??0}个字符`),min:t=>D.check(e=>Ce(e)||Number(e)>=(t?.value??-1/0),t?.message??`${t?.label??"该字段"}不能小于${t?.value??0}`),max:t=>D.check(e=>Ce(e)||Number(e)<=(t?.value??1/0),t?.message??`${t?.label??"该字段"}不能大于${t?.value??0}`),pattern:t=>{const e=t?.value instanceof RegExp?t.value:new RegExp(t?.value??".*");return D.check(r=>Ce(r)||e.test(String(r)),t?.message??`${t?.label??"该字段"}格式不正确`)},idCard:t=>D.check(e=>Ce(e)||/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/.test(String(e)),t?.message??`${t?.label??"该字段"}必须是有效的身份证号`),integer:t=>D.check(e=>Ce(e)||Number.isInteger(Number(e)),t?.message??`${t?.label??"该字段"}必须是整数`),positive:t=>D.check(e=>Ce(e)||Number(e)>0,t?.message??`${t?.label??"该字段"}必须是正数`),negative:t=>D.check(e=>Ce(e)||Number(e)<0,t?.message??`${t?.label??"该字段"}必须是负数`),alphanumeric:t=>D.check(e=>Ce(e)||/^[a-zA-Z0-9]+$/.test(String(e)),t?.message??`${t?.label??"该字段"}只能包含字母和数字`),chinese:t=>D.check(e=>Ce(e)||/^[\u4e00-\u9fa5]+$/.test(String(e)),t?.message??`${t?.label??"该字段"}只能包含中文字符`)};function Lr(t={}){const e=new Map(Object.entries({...Wn,...t}));return{get:n=>e.get(n),register:(n,i)=>{e.has(n)||e.set(n,i)},override:(n,i)=>{e.set(n,i)},registerAll:n=>{Object.entries(n).forEach(([i,s])=>{e.set(i,s)})},has:n=>e.has(n),getNames:()=>Array.from(e.keys()),toSchema:(n,i={})=>{const{label:s,baseType:o="any"}=i,a=[];for(const d of n){const l=d.type,u={value:d.value,message:d.message,label:s},h=e.get(l);h&&a.push(h(u))}let c;switch(o){case"string":c=D.union([D.string(),D.undefined_(),D.null_()]);break;case"number":c=D.union([D.number(),D.undefined_(),D.null_()]);break;default:c=D.unknown()}return a.length>0?D.pipe(c,...a):c}}}const nt=Lr();function Gt(t,e){return nt.toSchema(t,e)}function zs(t,e){nt.register(t,e)}function js(t,e){nt.override(t,e)}function Us(t,e){if(t)return Mt(t)?nt.toSchema(t,{label:e?.label}):t}function _t(t){const e=t.match(/^(\d+)\.(\d+)\.(\d+)(?:-(.+))?$/);return e?{major:parseInt(e[1],10),minor:parseInt(e[2],10),patch:parseInt(e[3],10),prerelease:e[4]}:null}function Gs(t,e){const r=_t(t);if(!r)return!1;if(e==="*"||e==="x")return!0;if(e.match(/^(\d+)\.x(\.x)?$/)){const n=parseInt(e.split(".")[0],10);return r.major===n}if(e.startsWith("^")){const n=_t(e.slice(1));return n?n.major===0?r.major===0&&r.minor===n.minor&&r.patch>=n.patch:r.major===n.major&&(r.minor>n.minor||r.minor===n.minor&&r.patch>=n.patch):!1}if(e.startsWith("~")){const n=_t(e.slice(1));return n?r.major===n.major&&r.minor===n.minor&&r.patch>=n.patch:!1}if(e.startsWith(">=")){const n=_t(e.slice(2));return n?r.major!==n.major?r.major>n.major:r.minor!==n.minor?r.minor>n.minor:r.patch>=n.patch:!1}return t===e}const Hs="1.0.0";class Ht{options;dependencyAnalyzer;constructor(e={}){this.options={runtimeVersion:e.runtimeVersion??Hs,strictMode:e.strictMode??!0,skipSecurityValidation:e.skipSecurityValidation??!1},this.dependencyAnalyzer=new Dr({strictMode:this.options.strictMode})}compile(e){this.checkVersion(e.meta);const r={},n=[],i=this.processFields(e.fields,r,n),s=Object.keys(r),o=this.dependencyAnalyzer.analyze(n,s),{dependencyMap:a,topologicalOrder:c,report:d}=o,l=new Map;c.forEach((h,m)=>l.set(h,m));const u=n.map(h=>{const m="target"in h?h.target:"",y=l.get(m)??0;return{...h,priority:y}});for(const[,h]of a.entries())h.sort((m,y)=>m.priority-y.priority);return process.env.NODE_ENV==="development"&&d.warnings.length>0&&d.warnings.forEach(h=>{h.includes("Cyclic dependencies")}),{meta:e.meta||{version:"0.0.0"},fields:r,layout:i,rules:u,dependencyMap:a,topologicalOrder:c,staticAnalysisReport:{cycles:d.cycles,isolatedFields:d.isolatedFields}}}checkVersion(e){if(!(!e?.version||!_t(e.version))&&e.compatibleWith&&e.compatibleWith.length>0){const n=this.options.runtimeVersion;if(!e.compatibleWith.some(s=>Gs(n,s))){const s=`Schema version ${e.version} is not compatible with runtime version ${n}. Compatible versions: ${e.compatibleWith.join(", ")}`;if(this.options.strictMode)throw new Error(`[SchemaCompiler] ${s}`)}}}processFields(e,r,n,i=""){const s=[];for(const o of e){const a=i?`${i}.${o.name}`:o.name,c=["Grid","Stack","Card","Group"].includes(o.component),d=o.children&&o.children.length>0;if(c||d&&!o.name){const l=o.children?this.processFields(o.children,r,n,i):[];s.push({type:"container",component:o.component,props:o.ui,children:l})}else{const l=Us(o.validate,{label:o.ui?.label});r[a]={name:a,component:o.component,defaultValue:o.defaultValue,props:{...o.ui,colSpan:o.colSpan,independent:o.independent,...Array.isArray(o.options)?{options:o.options}:{}},validate:l},this.extractRule(a,o.visibleWhen,"gate","visible",n),this.extractRule(a,o.disabledWhen,"gate","disabled",n),this.extractRule(a,o.requiredWhen,"gate","required",n),this.extractRule(a,o.compute,"derive",void 0,n),this.extractOptionsRule(a,o.options,n);let u=[];o.children&&(u=this.processFields(o.children,r,n,a)),s.push({type:"field",field:a,children:u.length>0?u:void 0})}}return s}extractOptionsRule(e,r,n){if(r){if(Array.isArray(r))n.push({type:"options",target:e,deps:[],fetcher:async()=>r,priority:0});else if(typeof r=="function")process.env.NODE_ENV,n.push({type:"options",target:e,deps:[],fetcher:r,priority:0});else if(typeof r=="object"&&"fetcher"in r){const{fetcher:i,deps:s=[]}=r;n.push({type:"options",target:e,deps:s,fetcher:i,priority:0})}}}extractRule(e,r,n,i,s){if(!r)return;let o,a=[];typeof r=="function"?(o=r,process.env.NODE_ENV):(o=At.compile(r),a=At.extractDependencies(r)),n==="gate"?s.push({type:"gate",target:e,deps:a,evaluator:o,effect:i,priority:0}):n==="derive"&&s.push({type:"derive",target:e,deps:a,evaluator:o,priority:0})}}const zn=new Ht;function Ys(t){return new Ht(t)}const qs=["Text","Number","Password","Textarea","Select","Autocomplete","Checkbox","Switch","Radio","Slider","Rating","Date","Time","DateTime","Upload","Hidden","Custom","Group","FormList"];class Nr{options;constructor(e={}){this.options={checkUnusedFields:e.checkUnusedFields??!0,checkExpressions:e.checkExpressions??!0,checkComponentTypes:e.checkComponentTypes??!0,knownComponents:e.knownComponents??qs}}lint(e){const r=[],n=new Set,i=new Set;if(this.lintFields(e.fields,r,n,i,""),this.options.checkUnusedFields)for(const a of n)i.has(a);e.meta&&e.meta.version&&!/^\d+\.\d+\.\d+/.test(e.meta.version)&&r.push({severity:"warning",message:`Invalid version format: "${e.meta.version}". Expected SemVer format (e.g., "1.0.0")`,suggestion:'Use SemVer format like "1.0.0"'});const s=r.filter(a=>a.severity==="error"),o=r.filter(a=>a.severity==="warning");return{valid:s.length===0,messages:r,errors:s,warnings:o}}lintFields(e,r,n,i,s){const o=new Set;for(const a of e){const c=s?`${s}.${a.name}`:a.name;!a.name&&a.component!=="Grid"&&a.component!=="Stack"?r.push({severity:"error",field:c||"(unnamed)",message:"Field name is required",suggestion:"Add a unique name to the field"}):a.name&&(o.has(a.name)&&r.push({severity:"error",field:c,message:`Duplicate field name: "${a.name}"`,suggestion:"Use unique field names"}),o.add(a.name),n.add(c)),this.options.checkComponentTypes&&(this.options.knownComponents.includes(a.component)||r.push({severity:"warning",field:c,message:`Unknown component type: "${a.component}"`,suggestion:`Known types: ${this.options.knownComponents.join(", ")}`})),this.options.checkExpressions&&(this.lintExpression(a.visibleWhen,"visibleWhen",c,r,i),this.lintExpression(a.disabledWhen,"disabledWhen",c,r,i),this.lintExpression(a.requiredWhen,"requiredWhen",c,r,i),this.lintExpression(a.compute,"compute",c,r,i)),["Select","Radio","Autocomplete"].includes(a.component)&&!a.options&&!a.ui?.options&&!a.ui?.optionRequest&&r.push({severity:"warning",field:c,message:`${a.component} component should have options defined`,suggestion:"Add options array or optionRequest function"}),a.component==="FormList"&&(!a.children||a.children.length===0)&&r.push({severity:"error",field:c,message:"FormList must have children (columns) defined",suggestion:"Add children array with field definitions"}),a.component==="Group"&&(!a.children||a.children.length===0)&&r.push({severity:"warning",field:c,message:"Group should have children defined",suggestion:"Add children array with field definitions"}),a.children&&a.children.length>0&&this.lintFields(a.children,r,n,i,c)}}lintExpression(e,r,n,i,s){if(e){if(typeof e=="function"){i.push({severity:"info",field:n,rule:r,message:`${r} uses function - dependencies cannot be statically analyzed`,suggestion:"Consider using string expression for better static analysis"});return}if(typeof e=="string"){const o=At.validate(e);if(!o.valid){i.push({severity:"error",field:n,rule:r,message:`Invalid expression: ${o.error}`,suggestion:"Fix the expression syntax"});return}const a=At.extractDependencies(e);for(const d of a)s.add(d);const c=n.split(".").pop();r==="compute"&&a.includes(c||"")&&i.push({severity:"warning",field:n,rule:r,message:"Potential self-reference in compute expression",suggestion:"Avoid referencing the same field in its own compute expression"})}}}}const jn=new Nr;function Ks(t,e){return(e?new Nr(e):jn).lint(t)}class Un{schema;form;scheduler;config;pendingRules=new Set;isBatching=!1;traces=[];metaCache=new Map;listeners=new Map;constructor(e,r,n,i={}){this.schema=e,this.form=r,this.scheduler=n,this.config={enableTracing:i.enableTracing??(typeof{url:typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Vr&&Vr.tagName.toUpperCase()==="SCRIPT"&&Vr.src||new URL("schema-form-lib.umd.cjs",document.baseURI).href}<"u"&&!1)??(typeof process<"u"&&process.env?.NODE_ENV==="development")??!1,maxTraceCount:i.maxTraceCount??1e3,onError:i.onError??(()=>{}),externalContext:i.externalContext??{}},this.initializeMetaCache()}subscribe(e,r){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(r),()=>{const n=this.listeners.get(e);n&&(n.delete(r),n.size===0&&this.listeners.delete(e))}}initializeMetaCache(){for(const e of Object.keys(this.schema.fields))this.metaCache.set(e,{isVisible:!0,isDisabled:!1,isRequired:!1})}getFieldMeta(e){return this.metaCache.get(e)}getAllMeta(){const e={};for(const[r,n]of this.metaCache)e[r]={...n};return e}getTraces(){return this.traces}clearTraces(){this.traces=[]}clearListeners(){this.listeners.clear()}notifyFieldChange(e){const r=this.schema.dependencyMap.get(e);if(!(!r||r.length===0)){for(const n of r)this.pendingRules.add(n);this.scheduleBatchUpdate()}}scheduleBatchUpdate(){this.isBatching||(this.isBatching=!0,queueMicrotask(()=>{this.flushUpdates(),this.isBatching=!1}))}deepFreeze(e){return e===null||typeof e!="object"||Object.isFrozen(e)||(Object.freeze(e),Object.getOwnPropertyNames(e).forEach(r=>{const n=e[r];n!==null&&(typeof n=="object"||typeof n=="function")&&!Object.isFrozen(n)&&this.deepFreeze(n)})),e}flushUpdates(){if(this.pendingRules.size===0)return;const e=this.deepFreeze(this.cloneDeep(this.form.state.values)),r=this.deepFreeze(this.getAllMeta()),n=Object.freeze({values:e,meta:r,context:Object.freeze({...this.config.externalContext})}),i=Array.from(this.pendingRules).sort((c,d)=>c.priority-d.priority);this.pendingRules.clear();const s=new Map,o=new Map,a=new Map;for(const c of i){const d=performance.now(),l="target"in c?c.target:"effect";try{c.type==="derive"?this.executeDeriveRule(c,n,s,a,d):c.type==="gate"?this.executeGateRule(c,n,o,d):c.type==="options"?this.executeOptionsRule(c,n,d):c.type==="effect"&&this.executeEffectRule(c,n,d)}catch(u){const h=u;this.logTrace(c,d,void 0,h),this.config.enableTracing,this.config.onError(h,{rule:c,target:l})}}this.commitUpdates(s,o)}executeDeriveRule(e,r,n,i,s){if(n.has(e.target)){const a=i.get(e.target)??0;e.priority===a&&this.config.enableTracing}const o=e.evaluator(r);n.set(e.target,o),i.set(e.target,e.priority),this.logTrace(e,s,o)}executeGateRule(e,r,n,i){const s=e.evaluator(r);n.has(e.target)||n.set(e.target,{});const o=n.get(e.target);switch(e.effect){case"visible":o.isVisible=s;break;case"disabled":o.isDisabled=s;break;case"required":o.isRequired=s;break}this.logTrace(e,i,s)}executeOptionsRule(e,r,n){const i={};for(const o of e.deps)i[o]=this.getValueByPath(r.values,o);const s=this.scheduler.generateHash(i);this.scheduler.schedule(e.target,s,e.fetcher,r).then(o=>{const a=this.metaCache.get(e.target);a&&(a.options=o),this.form.setFieldMeta(e.target,c=>({...c,options:o})),this.notifyListeners([e.target]),this.logTrace(e,n,o)}).catch(o=>{o?.message!=="Request aborted"&&(this.logTrace(e,n,void 0,o),this.config.onError(o,{rule:e,target:e.target}))})}executeEffectRule(e,r,n){const i={setFieldValue:(s,o)=>{this.form.setFieldValue(s,o)},setFieldMeta:(s,o)=>{const a=this.metaCache.get(s);a&&Object.assign(a,o),this.form.setFieldMeta(s,c=>({...c,...o}))},getFieldValue:s=>this.form.getFieldValue(s),getFieldMeta:s=>this.metaCache.get(s)};e.handler(r,i),this.logTrace(e,n,"effect executed")}commitUpdates(e,r){for(const[i,s]of e){const o=this.form.getFieldValue(i);this.isEqual(o,s)||this.form.setFieldValue(i,s)}const n=[];for(const[i,s]of r){const o=this.metaCache.get(i);o?Object.assign(o,s):this.metaCache.set(i,{isVisible:!0,isDisabled:!1,isRequired:!1,...s}),n.push(i),this.form.setFieldMeta(i,a=>({...a,...s}))}this.notifyListeners(n)}notifyListeners(e){for(const r of e){const n=this.listeners.get(r);n&&n.forEach(i=>{try{i()}catch{}})}}getValueByPath(e,r){const n=r.split(".");let i=e;for(const s of n){if(i==null)return;i=i[s]}return i}cloneDeep(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>this.cloneDeep(n));const r={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=this.cloneDeep(e[n]));return r}isEqual(e,r){if(e===r)return!0;if(e===null||r===null||typeof e!="object"||typeof r!="object")return e!==e&&r!==r;if(Array.isArray(e)!==Array.isArray(r))return!1;if(Array.isArray(e)){if(e.length!==r.length)return!1;for(let s=0;s<e.length;s++)if(!this.isEqual(e[s],r[s]))return!1;return!0}const n=Object.keys(e),i=Object.keys(r);if(n.length!==i.length)return!1;for(const s of n)if(!Object.prototype.hasOwnProperty.call(r,s)||!this.isEqual(e[s],r[s]))return!1;return!0}logTrace(e,r,n,i){if(!this.config.enableTracing)return;const s={ruleId:"target"in e?`${e.type}:${e.target}`:`${e.type}`,target:"target"in e?e.target:"effect",type:e.type,deps:"deps"in e?e.deps:void 0,duration:performance.now()-r,result:n,error:i,timestamp:Date.now()};for(this.traces.push(s);this.traces.length>this.config.maxTraceCount;)this.traces.shift()}initialize(){for(const e of this.schema.rules)this.pendingRules.add(e);this.scheduleBatchUpdate()}updateContext(e){this.config.externalContext={...this.config.externalContext,...e}}}class Gn{cache=new Map;activeRequests=new Map;pendingPromises=new Map;config;constructor(e={}){this.config={staleTime:e.staleTime??300*1e3,maxCacheSize:e.maxCacheSize??100,timeout:e.timeout??30*1e3,deduplication:e.deduplication??!0}}async schedule(e,r,n,i){const s=`${e}:${r}`,o=this.cache.get(s);if(o&&Date.now()-o.timestamp<this.config.staleTime)return o.data;if(this.config.deduplication&&this.pendingPromises.has(s))return this.pendingPromises.get(s);const a=this.activeRequests.get(e);a&&a.hash!==r&&(a.controller.abort(),this.activeRequests.delete(e));const c=new AbortController,d={controller:c,hash:r,startTime:Date.now()};this.activeRequests.set(e,d);const l=setTimeout(()=>{c.abort()},this.config.timeout),u=(async()=>{try{const h=await n(i,c.signal);if(this.activeRequests.get(e)?.controller!==c)throw new Error("Request aborted");return this.setCache(s,h,r),h}catch(h){throw h instanceof Error&&(h.name==="AbortError"||h.message==="Request aborted")?new Error("Request aborted"):h}finally{clearTimeout(l),this.activeRequests.get(e)?.controller===c&&this.activeRequests.delete(e),this.pendingPromises.delete(s)}})();return this.config.deduplication&&this.pendingPromises.set(s,u),u}setCache(e,r,n){if(this.cache.size>=this.config.maxCacheSize){const i=this.cache.keys().next().value;i&&this.cache.delete(i)}this.cache.set(e,{data:r,timestamp:Date.now(),hash:n})}generateHash(e){try{return this.stableStringify(e)}catch{return`__unstable_${Date.now()}`}}stableStringify(e){return e===null||typeof e!="object"?JSON.stringify(e):Array.isArray(e)?"["+e.map(i=>this.stableStringify(i)).join(",")+"]":"{"+Object.keys(e).sort().map(i=>{const s=this.stableStringify(e[i]);return`${JSON.stringify(i)}:${s}`}).join(",")+"}"}cancel(e){const r=this.activeRequests.get(e);r&&(r.controller.abort(),this.activeRequests.delete(e))}cancelAll(){for(const[,e]of this.activeRequests)e.controller.abort();this.activeRequests.clear(),this.pendingPromises.clear()}clearCache(e){if(e)for(const r of this.cache.keys())r.startsWith(`${e}:`)&&this.cache.delete(r);else this.cache.clear()}getCacheStats(){return{size:this.cache.size,maxSize:this.config.maxCacheSize,keys:Array.from(this.cache.keys())}}invalidate(e,r){r?this.cache.delete(`${e}:${r}`):this.clearCache(e)}}class Hn{effectSystem;asyncScheduler;schema;form;initialized=!1;constructor(e,r,n={}){this.schema=e,this.form=r,this.asyncScheduler=new Gn(n.async),this.effectSystem=new Un(e,r,this.asyncScheduler,n.effect),n.autoInitialize!==!1&&this.initialize()}getForm(){return this.form}initialize(){this.initialized||(this.initialized=!0,this.effectSystem.initialize())}notifyChange(e){this.effectSystem.notifyFieldChange(e)}notifyChanges(e){for(const r of e)this.effectSystem.notifyFieldChange(r)}subscribe(e,r){return this.effectSystem.subscribe(e,r)}getFieldMeta(e){return this.effectSystem.getFieldMeta(e)}getAllMeta(){return this.effectSystem.getAllMeta()}updateContext(e){this.effectSystem.updateContext(e)}get scheduler(){return this.asyncScheduler}getTraces(){return this.effectSystem.getTraces()}clearTraces(){this.effectSystem.clearTraces()}invalidateAndRefresh(e){e?(this.asyncScheduler.invalidate(e),this.notifyChange(e)):(this.asyncScheduler.clearCache(),this.effectSystem.initialize())}destroy(){this.asyncScheduler.cancelAll(),this.asyncScheduler.clearCache(),this.effectSystem.clearTraces(),this.effectSystem.clearListeners()}}const Yn=t=>({value:e})=>{if(!t)return;const r=Mt(t)?Gt(t):t,n=et.safeParse(r,e);if(!n.success)return n.issues[0]?.message},Xs=t=>({value:e})=>{if(!t)return;const r=Mt(t)?Gt(t):t,n=et.safeParse(r,e);if(!n.success)return n.issues.map(i=>i.message).join(", ")};function Ye(t){return!!(t==null||typeof t=="string"&&t.trim()===""||Array.isArray(t)&&t.length===0)}function qn(t,e={}){const{label:r="该字段",fieldType:n="unknown",values:i={}}=e,s=[],o=t.find(l=>l.type==="required"),a=!!o,c=o?.message??`${r}不能为空`;let d;switch(n){case"text":case"date":d=D.union([D.string(),D.undefined_(),D.null_()]);break;case"number":d=D.union([D.number(),D.undefined_(),D.null_(),D.pipe(D.string(),D.transform(Number),D.number())]);break;case"boolean":d=D.union([D.boolean(),D.undefined_(),D.null_()]);break;case"select":d=D.union([D.string(),D.number(),D.boolean(),D.undefined_(),D.null_(),D.array(D.unknown())]);break;case"array":d=D.union([D.array(D.unknown()),D.undefined_(),D.null_()]);break;default:d=D.unknown()}a&&(n==="boolean"?s.push(D.check(l=>l===!0,c)):n==="array"?s.push(D.check(l=>Array.isArray(l)&&l.length>0,c)):s.push(D.check(l=>!Ye(l),c)));for(const l of t)switch(l.type){case"required":break;case"minLength":s.push(D.check(u=>Ye(u)||String(u).length>=l.value,l.message??`${r}至少${l.value}个字符`));break;case"maxLength":s.push(D.check(u=>Ye(u)||String(u).length<=l.value,l.message??`${r}最多${l.value}个字符`));break;case"min":s.push(D.check(u=>Ye(u)||Number(u)>=l.value,l.message??`${r}不能小于${l.value}`));break;case"max":s.push(D.check(u=>Ye(u)||Number(u)<=l.value,l.message??`${r}不能大于${l.value}`));break;case"pattern":{const u=typeof l.value=="string"?new RegExp(l.value):l.value;s.push(D.check(h=>Ye(h)||u.test(String(h)),l.message??`${r}格式不正确`));break}case"email":s.push(D.check(u=>Ye(u)||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(u)),l.message??`${r}必须是有效的邮箱`));break;case"url":s.push(D.check(u=>{if(Ye(u))return!0;try{return new URL(String(u)),!0}catch{return!1}},l.message??`${r}必须是有效的URL`));break;case"custom":s.push(D.check(u=>l.validate(u,i)===!0,u=>{const h=l.validate(u.input,i);return typeof h=="string"?h:"校验失败"}));break;case"array":{const u=l.minItems??0,h=l.maxItems??1/0;u>0&&s.push(D.check(m=>Array.isArray(m)&&m.length>=u,l.message??`至少需要${u}条数据`)),h<1/0&&s.push(D.check(m=>Array.isArray(m)&&m.length<=h,l.message??`最多允许${h}条数据`));break}}return s.length>0?D.pipe(d,...s):d}function Kn(t){const e=["Text","Password","Textarea"],r=["Number","Slider","Rating"],n=["Checkbox","Switch"],i=["Select","Radio","Autocomplete"],s=["Date","Time","DateTime"],o=["FormList"];return e.includes(t)?"text":r.includes(t)?"number":n.includes(t)?"boolean":i.includes(t)?"select":s.includes(t)?"date":o.includes(t)?"array":"unknown"}function Qs(t,e,r,n={}){return qn(r,{...n,fieldType:Kn(e),label:n.label??t})}const dt=new WeakMap,Yt=new WeakMap,qt={current:[]};let Br=!1,kt=0;const $t=new Set,Kt=new Map;function Xn(t){const e=Array.from(t).sort((r,n)=>r instanceof Re&&r.options.deps.includes(n)?1:n instanceof Re&&n.options.deps.includes(r)?-1:0);for(const r of e){if(qt.current.includes(r))continue;qt.current.push(r),r.recompute();const n=Yt.get(r);if(n)for(const i of n){const s=dt.get(i);s&&Xn(s)}}}function Zs(t){const e={prevVal:t.prevState,currentVal:t.state};for(const r of t.listeners)r(e)}function Js(t){const e={prevVal:t.prevState,currentVal:t.state};for(const r of t.listeners)r(e)}function Qn(t){if(kt>0&&!Kt.has(t)&&Kt.set(t,t.prevState),$t.add(t),!(kt>0)&&!Br)try{for(Br=!0;$t.size>0;){const e=Array.from($t);$t.clear();for(const r of e){const n=Kt.get(r)??r.prevState;r.prevState=n,Zs(r)}for(const r of e){const n=dt.get(r);n&&(qt.current.push(r),Xn(n))}for(const r of e){const n=dt.get(r);if(n)for(const i of n)Js(i)}}}finally{Br=!1,qt.current=[],Kt.clear()}}function Pe(t){kt++;try{t()}finally{if(kt--,kt===0){const e=$t.values().next().value;e&&Qn(e)}}}function eo(t){return typeof t=="function"}class Rr{constructor(e,r){this.listeners=new Set,this.subscribe=n=>{var i,s;this.listeners.add(n);const o=(s=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:s.call(i,n,this);return()=>{this.listeners.delete(n),o?.()}},this.prevState=e,this.state=e,this.options=r}setState(e){var r,n,i;this.prevState=this.state,(r=this.options)!=null&&r.updateFn?this.state=this.options.updateFn(this.prevState)(e):eo(e)?this.state=e(this.prevState):this.state=e,(i=(n=this.options)==null?void 0:n.onUpdate)==null||i.call(n),Qn(this)}}class Re{constructor(e){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const r=this.options.deps.length,n=new Array(r),i=new Array(r);for(let s=0;s<r;s++){const o=this.options.deps[s];n[s]=o.prevState,i[s]=o.state}return this.lastSeenDepValues=i,{prevDepVals:n,currDepVals:i,prevVal:this.prevState??void 0}},this.recompute=()=>{var r,n;this.prevState=this.state;const i=this.getDepVals();this.state=this.options.fn(i),(n=(r=this.options).onUpdate)==null||n.call(r)},this.checkIfRecalculationNeededDeeply=()=>{for(const s of this.options.deps)s instanceof Re&&s.checkIfRecalculationNeededDeeply();let r=!1;const n=this.lastSeenDepValues,{currDepVals:i}=this.getDepVals();for(let s=0;s<i.length;s++)if(i[s]!==n[s]){r=!0;break}r&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const r of this._subscriptions)r()}),this.subscribe=r=>{var n,i;this.listeners.add(r);const s=(i=(n=this.options).onSubscribe)==null?void 0:i.call(n,r,this);return()=>{this.listeners.delete(r),s?.()}},this.options=e,this.state=e.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(e=this.options.deps){for(const r of e)if(r instanceof Re)r.registerOnGraph(),this.registerOnGraph(r.options.deps);else if(r instanceof Rr){let n=dt.get(r);n||(n=new Set,dt.set(r,n)),n.add(this);let i=Yt.get(this);i||(i=new Set,Yt.set(this,i)),i.add(r)}}unregisterFromGraph(e=this.options.deps){for(const r of e)if(r instanceof Re)this.unregisterFromGraph(r.options.deps);else if(r instanceof Rr){const n=dt.get(r);n&&n.delete(this);const i=Yt.get(this);i&&i.delete(r)}}}var to=class{constructor(t,e){this.fn=t,this.options=e,this.lastExecutionTime=0,this.isPending=!1,this.maybeExecute=(...r)=>{const n=Date.now()-this.lastExecutionTime;if(this.options.leading&&n>=this.options.wait)this.execute(...r);else if(this.lastArgs=r,!this.timeoutId&&this.options.trailing){const i=this.options.wait-n;this.isPending=!0,this.timeoutId=setTimeout(()=>{this.lastArgs!==void 0&&this.execute(...this.lastArgs)},i)}},this.execute=(...r)=>{this.fn(...r),this.options.onExecute?.(r,this),this.lastExecutionTime=Date.now(),this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.flush=()=>{this.isPending&&this.lastArgs&&this.execute(...this.lastArgs)},this.cancel=()=>{this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.clearTimeout=()=>{this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=void 0)},this.options.leading===void 0&&this.options.trailing===void 0&&(this.options.leading=!0,this.options.trailing=!0)}};function ro(t,e){return new to(t,e).maybeExecute}class no{#s=!0;#t;#e;#d;#r;#a;#n;#l;#f=0;#p=5;#o=!1;#c=!1;#i=null;#h=()=>{this.debugLog("Connected to event bus"),this.#a=!0,this.#o=!1,this.debugLog("Emitting queued events",this.#r),this.#r.forEach(e=>this.emitEventToBus(e)),this.#r=[],this.stopConnectLoop(),this.#e().removeEventListener("tanstack-connect-success",this.#h)};#u=()=>{if(this.#f<this.#p){this.#f++,this.dispatchCustomEvent("tanstack-connect",{});return}this.#e().removeEventListener("tanstack-connect",this.#u),this.#c=!0,this.debugLog("Max retries reached, giving up on connection"),this.stopConnectLoop()};#m=()=>{this.#o||(this.#o=!0,this.#e().addEventListener("tanstack-connect-success",this.#h),this.#u())};constructor({pluginId:e,debug:r=!1,enabled:n=!0,reconnectEveryMs:i=300}){this.#t=e,this.#s=n,this.#e=this.getGlobalTarget,this.#d=r,this.debugLog(" Initializing event subscription for plugin",this.#t),this.#r=[],this.#a=!1,this.#c=!1,this.#n=null,this.#l=i}startConnectLoop(){this.#n!==null||this.#a||(this.debugLog(`Starting connect loop (every ${this.#l}ms)`),this.#n=setInterval(this.#u,this.#l))}stopConnectLoop(){this.#o=!1,this.#n!==null&&(clearInterval(this.#n),this.#n=null,this.#r=[],this.debugLog("Stopped connect loop"))}debugLog(...e){this.#d}getGlobalTarget(){if(typeof globalThis<"u"&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog("Using global event target"),globalThis.__TANSTACK_EVENT_TARGET__;if(typeof window<"u"&&typeof window.addEventListener<"u")return this.debugLog("Using window as event target"),window;const e=typeof EventTarget<"u"?new EventTarget:void 0;return typeof e>"u"||typeof e.addEventListener>"u"?(this.debugLog("No event mechanism available, running in non-web environment"),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog("Using new EventTarget as fallback"),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,r){try{const n=new Event(e,{detail:r});this.#e().dispatchEvent(n)}catch{this.debugLog("Failed to dispatch shim event")}}dispatchCustomEvent(e,r){try{this.#e().dispatchEvent(new CustomEvent(e,{detail:r}))}catch{this.dispatchCustomEventShim(e,r)}}emitEventToBus(e){this.debugLog("Emitting event to client bus",e),this.dispatchCustomEvent("tanstack-dispatch-event",e)}createEventPayload(e,r){return{type:`${this.#t}:${e}`,payload:r,pluginId:this.#t}}emit(e,r){if(!this.#s){this.debugLog("Event bus client is disabled, not emitting event",e,r);return}if(this.#i&&(this.debugLog("Emitting event to internal event target",e,r),this.#i.dispatchEvent(new CustomEvent(`${this.#t}:${e}`,{detail:this.createEventPayload(e,r)}))),this.#c){this.debugLog("Previously failed to connect, not emitting to bus");return}if(!this.#a){this.debugLog("Bus not available, will be pushed as soon as connected"),this.#r.push(this.createEventPayload(e,r)),typeof CustomEvent<"u"&&!this.#o&&(this.#m(),this.startConnectLoop());return}return this.emitEventToBus(this.createEventPayload(e,r))}on(e,r,n){const i=n?.withEventTarget??!1,s=`${this.#t}:${e}`;if(i&&(this.#i||(this.#i=new EventTarget),this.#i.addEventListener(s,a=>{r(a.detail)})),!this.#s)return this.debugLog("Event bus client is disabled, not registering event",s),()=>{};const o=a=>{this.debugLog("Received event from bus",a.detail),r(a.detail)};return this.#e().addEventListener(s,o),this.debugLog("Registered event to bus",s),()=>{i&&this.#i?.removeEventListener(s,o),this.#e().removeEventListener(s,o)}}onAll(e){if(!this.#s)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};const r=n=>{const i=n.detail;e(i)};return this.#e().addEventListener("tanstack-devtools-global",r),()=>this.#e().removeEventListener("tanstack-devtools-global",r)}onAllPluginEvents(e){if(!this.#s)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};const r=n=>{const i=n.detail;this.#t&&i.pluginId!==this.#t||e(i)};return this.#e().addEventListener("tanstack-devtools-global",r),()=>this.#e().removeEventListener("tanstack-devtools-global",r)}}class io extends no{constructor(){super({pluginId:"form-devtools",reconnectEveryMs:1e3})}}const _e=new io;function Xt(t,e){return typeof t=="function"?t(e):t}function Qt(t,e){return zr(e).reduce((n,i)=>{if(n===null)return null;if(typeof n<"u")return n[i]},t)}function Zt(t,e,r){const n=zr(e);function i(s){if(!n.length)return Xt(r,s);const o=n.shift();if(typeof o=="string"||typeof o=="number"&&!Array.isArray(s))return typeof s=="object"?(s===null&&(s={}),{...s,[o]:i(s[o])}):{[o]:i()};if(Array.isArray(s)&&typeof o=="number"){const a=s.slice(0,o);return[...a.length?a:new Array(o),i(s[o]),...s.slice(o+1)]}return[...new Array(o),i()]}return i(t)}function so(t,e){const r=zr(e);function n(i){if(!i)return;if(r.length===1){const o=r[0];if(Array.isArray(i)&&typeof o=="number")return i.filter((d,l)=>l!==o);const{[o]:a,...c}=i;return c}const s=r.shift();if((typeof s=="string"||typeof s=="number"&&!Array.isArray(i))&&typeof i=="object")return{...i,[s]:n(i[s])};if(typeof s=="number"&&Array.isArray(i)){if(s>=i.length)return i;const o=i.slice(0,s);return[...o.length?o:new Array(s),n(i[s]),...i.slice(s+1)]}throw new Error("It seems we have created an infinite loop in deleteBy. ")}return n(t)}const oo=/^(\d+)$/gm,ao=/\.(\d+)(?=\.)/gm,lo=/^(\d+)\./gm,co=/\.(\d+$)/gm,uo=/\.{2,}/gm,Wr="__int__",Jt=`${Wr}$1`;function zr(t){if(Array.isArray(t))return[...t];if(typeof t!="string")throw new Error("Path must be a string.");return t.replace(/(^\[)|]/gm,"").replace(/\[/g,".").replace(oo,Jt).replace(ao,`.${Jt}.`).replace(lo,`${Jt}.`).replace(co,`.${Jt}`).replace(uo,".").split(".").map(e=>{if(e.startsWith(Wr)){const r=e.substring(Wr.length),n=parseInt(r,10);return String(n)===r?n:r}return e})}function fo(t){return!(Array.isArray(t)&&t.length===0)}function jr(t,e){const r=n=>n.validators.filter(Boolean).map(i=>({cause:i.cause,validate:i.fn}));return e.validationLogic({form:e.form,validators:e.validators,event:{type:t,async:!1},runValidation:r})}function Ur(t,e){const{asyncDebounceMs:r}=e,{onBlurAsyncDebounceMs:n,onChangeAsyncDebounceMs:i,onDynamicAsyncDebounceMs:s}=e.validators||{},o=r??0,a=c=>c.validators.filter(Boolean).map(d=>{const l=d?.cause||t;let u=o;switch(l){case"change":u=i??o;break;case"blur":u=n??o;break;case"dynamic":u=s??o;break;case"submit":u=0;break}return t==="submit"&&(u=0),{cause:l,validate:d.fn,debounceMs:u}});return e.validationLogic({form:e.form,validators:e.validators,event:{type:t,async:!0},runValidation:a})}const Gr=t=>!!t&&typeof t=="object"&&"fields"in t;function qe(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(const[i,s]of t)if(!e.has(i)||!Object.is(s,e.get(i)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0}const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const i of r)if(!n.includes(i)||!qe(t[i],e[i]))return!1;return!0}const Zn=({newFormValidatorError:t,isPreviousErrorFromFormValidator:e,previousErrorValue:r})=>t?{newErrorValue:t,newSource:"form"}:e?{newErrorValue:void 0,newSource:void 0}:r?{newErrorValue:r,newSource:"field"}:{newErrorValue:void 0,newSource:void 0},Jn=({formLevelError:t,fieldLevelError:e})=>e?{newErrorValue:e,newSource:"field"}:t?{newErrorValue:t,newSource:"form"}:{newErrorValue:void 0,newSource:void 0};function we(t,e){return t==null?e:{...t,...e}}let it=256;const er=[];let tr;for(;it--;)er[it]=(it+256).toString(16).substring(1);function ei(){let t=0,e,r="";if(!tr||it+16>256){for(tr=new Array(256),t=256;t--;)tr[t]=256*Math.random()|0;t=0,it=0}for(;t<16;t++)e=tr[it+t],t===6?r+=er[e&15|64]:t===8?r+=er[e&63|128]:r+=er[e],t&1&&t>1&&t<11&&(r+="-");return it++,r}const ho=ro(t=>_e.emit("form-state",{id:t.formId,state:t.store.state}),{wait:300}),ft=t=>{if(!t.validators)return t.runValidation({validators:[],form:t.form});const e=t.event.async,r=e?void 0:{fn:t.validators.onMount,cause:"mount"},n={fn:e?t.validators.onChangeAsync:t.validators.onChange,cause:"change"},i={fn:e?t.validators.onBlurAsync:t.validators.onBlur,cause:"blur"},s={fn:e?t.validators.onSubmitAsync:t.validators.onSubmit,cause:"submit"},o=e?void 0:{fn:()=>{},cause:"server"};switch(t.event.type){case"mount":return t.runValidation({validators:[r],form:t.form});case"submit":return t.runValidation({validators:[n,i,s,o],form:t.form});case"server":return t.runValidation({validators:[],form:t.form});case"blur":return t.runValidation({validators:[i,o],form:t.form});case"change":return t.runValidation({validators:[n,o],form:t.form});default:throw new Error(`Unknown validation event type: ${t.event.type}`)}};function po(t,e){const r=new Map;for(const n of t){const i=n.path??[];let s=e,o="";for(let a=0;a<i.length;a++){const c=i[a];if(c===void 0)continue;const d=typeof c=="object"?c.key:c,l=Number(d);Array.isArray(s)&&!Number.isNaN(l)?o+=`[${l}]`:o+=(a>0?".":"")+String(d),typeof s=="object"&&s!==null?s=s[d]:s=void 0}r.set(o,(r.get(o)??[]).concat(n))}return Object.fromEntries(r)}const ti=(t,e)=>{const r=po(t,e);return{form:r,fields:r}},ht={validate({value:t,validationSource:e},r){const n=r["~standard"].validate(t);if(n instanceof Promise)throw new Error("async function passed to sync validator");if(n.issues)return e==="field"?n.issues:ti(n.issues,t)},async validateAsync({value:t,validationSource:e},r){const n=await r["~standard"].validate(t);if(n.issues)return e==="field"?n.issues:ti(n.issues,t)}},ri=t=>!!t&&"~standard"in t,pt={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,isValid:!0,isDefaultValue:!0,errors:[],errorMap:{},errorSourceMap:{}};function rr(t){function e(l,u,h){const m=o(l,u,"move",h),y=Math.min(u,h),f=Math.max(u,h);for(let b=y;b<=f;b++)m.push(s(l,b));const g=Object.keys(t.fieldInfo).reduce((b,T)=>(T.startsWith(s(l,u))&&b.set(T,t.getFieldMeta(T)),b),new Map);c(m,u<h?"up":"down"),Object.keys(t.fieldInfo).filter(b=>b.startsWith(s(l,h))).forEach(b=>{const T=b.replace(s(l,h),s(l,u)),A=g.get(T);A&&t.setFieldMeta(b,A)})}function r(l,u){const h=o(l,u,"remove");c(h,"up")}function n(l,u,h){o(l,u,"swap",h).forEach(y=>{if(!y.toString().startsWith(s(l,u)))return;const f=y.toString().replace(s(l,u),s(l,h)),[g,b]=[t.getFieldMeta(y),t.getFieldMeta(f)];g&&t.setFieldMeta(f,g),b&&t.setFieldMeta(y,b)})}function i(l,u){const h=o(l,u,"insert");c(h,"down"),h.forEach(m=>{m.toString().startsWith(s(l,u))&&t.setFieldMeta(m,d())})}function s(l,u){return`${l}[${u}]`}function o(l,u,h,m){const y=[s(l,u)];switch(h){case"swap":y.push(s(l,m));break;case"move":{const[f,g]=[Math.min(u,m),Math.max(u,m)];for(let b=f;b<=g;b++)y.push(s(l,b));break}default:{const f=t.getFieldValue(l),g=Array.isArray(f)?f.length:0;for(let b=u+1;b<g;b++)y.push(s(l,b));break}}return Object.keys(t.fieldInfo).filter(f=>y.some(g=>f.startsWith(g)))}function a(l,u){return l.replace(/\[(\d+)\]/,(h,m)=>{const y=parseInt(m,10);return`[${u==="up"?y+1:Math.max(0,y-1)}]`})}function c(l,u){(u==="up"?l:[...l].reverse()).forEach(m=>{const y=a(m.toString(),u),f=t.getFieldMeta(y);f?t.setFieldMeta(m,f):t.setFieldMeta(m,d())})}const d=()=>pt;return{handleArrayMove:e,handleArrayRemove:r,handleArraySwap:n,handleArrayInsert:i}}function Hr(t){return{values:t.values??{},errorMap:t.errorMap??{},fieldMetaBase:t.fieldMetaBase??{},isSubmitted:t.isSubmitted??!1,isSubmitting:t.isSubmitting??!1,isValidating:t.isValidating??!1,submissionAttempts:t.submissionAttempts??0,isSubmitSuccessful:t.isSubmitSuccessful??!1,validationMetaMap:t.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}}}class ni{constructor(e){this.options={},this.fieldInfo={},this.prevTransformArray=[],this.mount=()=>{const r=this.fieldMetaDerived.mount(),n=this.store.mount(),i=this.store.subscribe(()=>{ho(this)}),s=_e.on("request-form-state",l=>{l.payload.id===this._formId&&_e.emit("form-api",{id:this._formId,state:this.store.state,options:this.options})}),o=_e.on("request-form-reset",l=>{l.payload.id===this._formId&&this.reset()}),a=_e.on("request-form-force-submit",l=>{l.payload.id===this._formId&&(this._devtoolsSubmissionOverride=!0,this.handleSubmit(),this._devtoolsSubmissionOverride=!1)}),c=()=>{a(),o(),s(),i(),r(),n(),_e.emit("form-unmounted",{id:this._formId})};this.options.listeners?.onMount?.({formApi:this});const{onMount:d}=this.options.validators||{};return _e.emit("form-api",{id:this._formId,state:this.store.state,options:this.options}),d&&this.validateSync("mount"),c},this.update=r=>{if(!r)return;const n=this.options;this.options=r;const i=!!r.transform?.deps?.some((a,c)=>a!==this.prevTransformArray[c]),s=r.defaultValues&&!qe(r.defaultValues,n.defaultValues)&&!this.state.isTouched,o=!qe(r.defaultState,n.defaultState)&&!this.state.isTouched;!s&&!o&&!i||(Pe(()=>{this.baseStore.setState(()=>Hr(Object.assign({},this.state,o?r.defaultState:{},s?{values:r.defaultValues}:{},i?{_force_re_eval:!this.state._force_re_eval}:{})))}),_e.emit("form-api",{id:this._formId,state:this.store.state,options:this.options}))},this.reset=(r,n)=>{const{fieldMeta:i}=this.state,s=this.resetFieldMeta(i);r&&!n?.keepDefaultValues&&(this.options={...this.options,defaultValues:r}),this.baseStore.setState(()=>Hr({...this.options.defaultState,values:r??this.options.defaultValues??this.options.defaultState?.values,fieldMetaBase:s}))},this.validateAllFields=async r=>{const n=[];return Pe(()=>{Object.values(this.fieldInfo).forEach(s=>{if(!s.instance)return;const o=s.instance;n.push(Promise.resolve().then(()=>o.validate(r,{skipFormValidation:!0}))),s.instance.state.meta.isTouched||s.instance.setMeta(a=>({...a,isTouched:!0}))})}),(await Promise.all(n)).flat()},this.validateArrayFieldsStartingFrom=async(r,n,i)=>{const s=this.getFieldValue(r),o=Array.isArray(s)?Math.max(s.length-1,0):null,a=[`${r}[${n}]`];for(let u=n+1;u<=(o??0);u++)a.push(`${r}[${u}]`);const c=Object.keys(this.fieldInfo).filter(u=>a.some(h=>u.startsWith(h))),d=[];return Pe(()=>{c.forEach(u=>{d.push(Promise.resolve().then(()=>this.validateField(u,i)))})}),(await Promise.all(d)).flat()},this.validateField=(r,n)=>{const i=this.fieldInfo[r]?.instance;return i?(i.state.meta.isTouched||i.setMeta(s=>({...s,isTouched:!0})),i.validate(n)):[]},this.validateSync=r=>{const n=jr(r,{...this.options,form:this,validationLogic:this.options.validationLogic||ft});let i=!1;const s={};return Pe(()=>{for(const c of n){if(!c.validate)continue;const d=this.runValidator({validate:c.validate,value:{value:this.state.values,formApi:this,validationSource:"form"},type:"validate"}),{formError:l,fieldErrors:u}=nr(d),h=Ft(c.cause),m=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(u||{})]);for(const y of m){if(this.baseStore.state.fieldMetaBase[y]===void 0&&!u?.[y])continue;const f=this.getFieldMeta(y)??pt,{errorMap:g,errorSourceMap:b}=f,T=u?.[y],{newErrorValue:A,newSource:x}=Zn({newFormValidatorError:T,isPreviousErrorFromFormValidator:b?.[h]==="form",previousErrorValue:g?.[h]});x==="form"&&(s[y]={...s[y],[h]:T}),g?.[h]!==A&&this.setFieldMeta(y,(E=pt)=>({...E,errorMap:{...E.errorMap,[h]:A},errorSourceMap:{...E.errorSourceMap,[h]:x}}))}this.state.errorMap?.[h]!==l&&this.baseStore.setState(y=>({...y,errorMap:{...y.errorMap,[h]:l}})),(l||u)&&(i=!0)}const o=Ft("submit");this.state.errorMap?.[o]&&r!=="submit"&&!i&&this.baseStore.setState(c=>({...c,errorMap:{...c.errorMap,[o]:void 0}}));const a=Ft("server");this.state.errorMap?.[a]&&r!=="server"&&!i&&this.baseStore.setState(c=>({...c,errorMap:{...c.errorMap,[a]:void 0}}))}),{hasErrored:i,fieldsErrorMap:s}},this.validateAsync=async r=>{const n=Ur(r,{...this.options,form:this,validationLogic:this.options.validationLogic||ft});this.state.isFormValidating||this.baseStore.setState(c=>({...c,isFormValidating:!0}));const i=[];let s;for(const c of n){if(!c.validate)continue;const d=Ft(c.cause);this.state.validationMetaMap[d]?.lastAbortController.abort();const u=new AbortController;this.state.validationMetaMap[d]={lastAbortController:u},i.push(new Promise(async h=>{let m;try{m=await new Promise((b,T)=>{setTimeout(async()=>{if(u.signal.aborted)return b(void 0);try{b(await this.runValidator({validate:c.validate,value:{value:this.state.values,formApi:this,validationSource:"form",signal:u.signal},type:"validateAsync"}))}catch(A){T(A)}},c.debounceMs)})}catch(b){m=b}const{formError:y,fieldErrors:f}=nr(m);f&&(s=s?{...s,...f}:f);const g=Ft(c.cause);for(const b of Object.keys(this.state.fieldMeta)){if(this.baseStore.state.fieldMetaBase[b]===void 0)continue;const T=this.getFieldMeta(b);if(!T)continue;const{errorMap:A,errorSourceMap:x}=T,E=s?.[b],{newErrorValue:M,newSource:B}=Zn({newFormValidatorError:E,isPreviousErrorFromFormValidator:x?.[g]==="form",previousErrorValue:A?.[g]});A?.[g]!==M&&this.setFieldMeta(b,N=>({...N,errorMap:{...N.errorMap,[g]:M},errorSourceMap:{...N.errorSourceMap,[g]:B}}))}this.baseStore.setState(b=>({...b,errorMap:{...b.errorMap,[g]:y}})),h(s?{fieldErrors:s,errorMapKey:g}:void 0)}))}let o=[];const a={};if(i.length){o=await Promise.all(i);for(const c of o)if(c?.fieldErrors){const{errorMapKey:d}=c;for(const[l,u]of Object.entries(c.fieldErrors)){const m={...a[l]||{},[d]:u};a[l]=m}}}return this.baseStore.setState(c=>({...c,isFormValidating:!1})),a},this.validate=r=>{const{hasErrored:n,fieldsErrorMap:i}=this.validateSync(r);return n&&!this.options.asyncAlways?i:this.validateAsync(r)},this._handleSubmit=async r=>{this.baseStore.setState(s=>({...s,isSubmitted:!1,submissionAttempts:s.submissionAttempts+1,isSubmitSuccessful:!1})),Pe(()=>{Object.values(this.fieldInfo).forEach(s=>{s.instance&&(s.instance.state.meta.isTouched||s.instance.setMeta(o=>({...o,isTouched:!0})))})});const n=r??this.options.onSubmitMeta;if(!this.state.canSubmit&&!this._devtoolsSubmissionOverride){this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:n});return}this.baseStore.setState(s=>({...s,isSubmitting:!0}));const i=()=>{this.baseStore.setState(s=>({...s,isSubmitting:!1}))};if(await this.validateAllFields("submit"),!this.state.isFieldsValid){i(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:n}),_e.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"validateAllFields",errors:Object.values(this.state.fieldMeta).map(s=>s.errors).flat()});return}if(await this.validate("submit"),!this.state.isValid){i(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:n}),_e.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"validate",errors:this.state.errors});return}Pe(()=>{Object.values(this.fieldInfo).forEach(s=>{s.instance?.options.listeners?.onSubmit?.({value:s.instance.state.value,fieldApi:s.instance})})}),this.options.listeners?.onSubmit?.({formApi:this,meta:n});try{await this.options.onSubmit?.({value:this.state.values,formApi:this,meta:n}),Pe(()=>{this.baseStore.setState(s=>({...s,isSubmitted:!0,isSubmitSuccessful:!0})),_e.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!0}),i()})}catch(s){throw this.baseStore.setState(o=>({...o,isSubmitSuccessful:!1})),_e.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"inflight",onError:s}),i(),s}},this.getFieldValue=r=>Qt(this.state.values,r),this.getFieldMeta=r=>this.state.fieldMeta[r],this.getFieldInfo=r=>this.fieldInfo[r]||={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.setFieldMeta=(r,n)=>{this.baseStore.setState(i=>({...i,fieldMetaBase:{...i.fieldMetaBase,[r]:Xt(n,i.fieldMetaBase[r])}}))},this.resetFieldMeta=r=>Object.keys(r).reduce((n,i)=>{const s=i;return n[s]=pt,n},{}),this.setFieldValue=(r,n,i)=>{const s=i?.dontUpdateMeta??!1,o=i?.dontRunListeners??!1,a=i?.dontValidate??!1;Pe(()=>{s||this.setFieldMeta(r,c=>({...c,isTouched:!0,isDirty:!0,errorMap:{...c?.errorMap,onMount:void 0}})),this.baseStore.setState(c=>({...c,values:Zt(c.values,r,n)}))}),o||this.getFieldInfo(r).instance?.triggerOnChangeListener(),a||this.validateField(r,"change")},this.deleteField=r=>{const i=[...Object.keys(this.fieldInfo).filter(s=>{const o=r.toString();return s!==o&&s.startsWith(o)}),r];this.baseStore.setState(s=>{const o={...s};return i.forEach(a=>{o.values=so(o.values,a),delete this.fieldInfo[a],delete o.fieldMetaBase[a]}),o})},this.pushFieldValue=(r,n,i)=>{this.setFieldValue(r,s=>[...Array.isArray(s)?s:[],n],i)},this.insertFieldValue=async(r,n,i,s)=>{this.setFieldValue(r,a=>[...a.slice(0,n),i,...a.slice(n)],we(s,{dontValidate:!0}));const o=s?.dontValidate??!1;o||await this.validateField(r,"change"),rr(this).handleArrayInsert(r,n),o||await this.validateArrayFieldsStartingFrom(r,n,"change")},this.replaceFieldValue=async(r,n,i,s)=>{this.setFieldValue(r,a=>a.map((c,d)=>d===n?i:c),we(s,{dontValidate:!0})),(s?.dontValidate??!1)||(await this.validateField(r,"change"),await this.validateArrayFieldsStartingFrom(r,n,"change"))},this.removeFieldValue=async(r,n,i)=>{const s=this.getFieldValue(r),o=Array.isArray(s)?Math.max(s.length-1,0):null;if(this.setFieldValue(r,c=>c.filter((d,l)=>l!==n),we(i,{dontValidate:!0})),rr(this).handleArrayRemove(r,n),o!==null){const c=`${r}[${o}]`;this.deleteField(c)}(i?.dontValidate??!1)||(await this.validateField(r,"change"),await this.validateArrayFieldsStartingFrom(r,n,"change"))},this.swapFieldValues=(r,n,i,s)=>{this.setFieldValue(r,a=>{const c=a[n],d=a[i];return Zt(Zt(a,`${n}`,d),`${i}`,c)},we(s,{dontValidate:!0})),rr(this).handleArraySwap(r,n,i),(s?.dontValidate??!1)||(this.validateField(r,"change"),this.validateField(`${r}[${n}]`,"change"),this.validateField(`${r}[${i}]`,"change"))},this.moveFieldValues=(r,n,i,s)=>{this.setFieldValue(r,a=>{const c=[...a];return c.splice(i,0,c.splice(n,1)[0]),c},we(s,{dontValidate:!0})),rr(this).handleArrayMove(r,n,i),(s?.dontValidate??!1)||(this.validateField(r,"change"),this.validateField(`${r}[${n}]`,"change"),this.validateField(`${r}[${i}]`,"change"))},this.clearFieldValues=(r,n)=>{const i=this.getFieldValue(r),s=Array.isArray(i)?Math.max(i.length-1,0):null;if(this.setFieldValue(r,[],we(n,{dontValidate:!0})),s!==null)for(let a=0;a<=s;a++){const c=`${r}[${a}]`;this.deleteField(c)}(n?.dontValidate??!1)||this.validateField(r,"change")},this.resetField=r=>{this.baseStore.setState(n=>({...n,fieldMetaBase:{...n.fieldMetaBase,[r]:pt},values:this.options.defaultValues?Zt(n.values,r,Qt(this.options.defaultValues,r)):n.values}))},this.setErrorMap=r=>{Pe(()=>{Object.entries(r).forEach(([n,i])=>{const s=n;if(Gr(i)){const{formError:o,fieldErrors:a}=nr(i);for(const c of Object.keys(this.fieldInfo))this.getFieldMeta(c)&&this.setFieldMeta(c,l=>({...l,errorMap:{...l.errorMap,[s]:a?.[c]},errorSourceMap:{...l.errorSourceMap,[s]:"form"}}));this.baseStore.setState(c=>({...c,errorMap:{...c.errorMap,[s]:o}}))}else this.baseStore.setState(o=>({...o,errorMap:{...o.errorMap,[s]:i}}))})})},this.getAllErrors=()=>({form:{errors:this.state.errors,errorMap:this.state.errorMap},fields:Object.entries(this.state.fieldMeta).reduce((r,[n,i])=>(Object.keys(i).length&&i.errors.length&&(r[n]={errors:i.errors,errorMap:i.errorMap}),r),{})}),this.parseValuesWithSchema=r=>ht.validate({value:this.state.values,validationSource:"form"},r),this.parseValuesWithSchemaAsync=r=>ht.validateAsync({value:this.state.values,validationSource:"form"},r),this.timeoutIds={validations:{},listeners:{},formListeners:{}},this._formId=e?.formId??ei(),this._devtoolsSubmissionOverride=!1,this.baseStore=new Rr(Hr({...e?.defaultState,values:e?.defaultValues??e?.defaultState?.values})),this.fieldMetaDerived=new Re({deps:[this.baseStore],fn:({prevDepVals:r,currDepVals:n,prevVal:i})=>{const s=i,o=r?.[0],a=n[0];let c=0;const d={};for(const l of Object.keys(a.fieldMetaBase)){const u=a.fieldMetaBase[l],h=o?.fieldMetaBase[l],m=s?.[l],y=Qt(a.values,l);let f=m?.errors;if(!h||u.errorMap!==h.errorMap){f=Object.values(u.errorMap??{}).filter(x=>x!==void 0);const A=this.getFieldInfo(l)?.instance;A&&!A.options.disableErrorFlat&&(f=f.flat(1))}const g=!fo(f),b=!u.isDirty,T=qe(y,Qt(this.options.defaultValues,l))||qe(y,this.getFieldInfo(l)?.instance?.options.defaultValue);if(m&&m.isPristine===b&&m.isValid===g&&m.isDefaultValue===T&&m.errors===f&&u===h){d[l]=m,c++;continue}d[l]={...u,errors:f??[],isPristine:b,isValid:g,isDefaultValue:T}}return Object.keys(a.fieldMetaBase).length&&s&&c===Object.keys(a.fieldMetaBase).length?s:d}}),this.store=new Re({deps:[this.baseStore,this.fieldMetaDerived],fn:({prevDepVals:r,currDepVals:n,prevVal:i})=>{const s=i,o=r?.[0],a=n[0],c=n[1],d=Object.values(c).filter(Boolean),l=d.some(_=>_.isValidating),u=d.every(_=>_.isValid),h=d.some(_=>_.isTouched),m=d.some(_=>_.isBlurred),y=d.every(_=>_.isDefaultValue),f=h&&a.errorMap?.onMount,g=d.some(_=>_.isDirty),b=!g,T=!!(a.errorMap?.onMount||d.some(_=>_?.errorMap?.onMount)),A=!!l;let x=s?.errors??[];(!o||a.errorMap!==o.errorMap)&&(x=Object.values(a.errorMap).reduce((_,$)=>$===void 0?_:$&&Gr($)?(_.push($.form),_):(_.push($),_),[]));const E=x.length===0,M=u&&E,B=this.options.canSubmitWhenInvalid??!1,N=a.submissionAttempts===0&&!h&&!T||!A&&!a.isSubmitting&&M||B;let L=a.errorMap;if(f&&(x=x.filter(_=>_!==a.errorMap.onMount),L=Object.assign(L,{onMount:void 0})),s&&o&&s.errorMap===L&&s.fieldMeta===this.fieldMetaDerived.state&&s.errors===x&&s.isFieldsValidating===l&&s.isFieldsValid===u&&s.isFormValid===E&&s.isValid===M&&s.canSubmit===N&&s.isTouched===h&&s.isBlurred===m&&s.isPristine===b&&s.isDefaultValue===y&&s.isDirty===g&&qe(o,a))return s;let z={...a,errorMap:L,fieldMeta:this.fieldMetaDerived.state,errors:x,isFieldsValidating:l,isFieldsValid:u,isFormValid:E,isValid:M,canSubmit:N,isTouched:h,isBlurred:m,isPristine:b,isDefaultValue:y,isDirty:g};const H=this.options.transform?.deps??[];if(H.length!==this.prevTransformArray.length||H.some((_,$)=>_!==this.prevTransformArray[$])){const _=Object.assign({},this,{state:z});this.options.transform?.fn(_),z=_.state,this.prevTransformArray=H}return z}}),this.handleSubmit=this.handleSubmit.bind(this),this.update(e||{})}get state(){return this.store.state}get formId(){return this._formId}runValidator(e){return ri(e.validate)?ht[e.type](e.value,e.validate):e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}}function nr(t){if(t){if(Gr(t)){const e=nr(t.form).formError,r=t.fields;return{formError:e,fieldErrors:r}}return{formError:t}}return{formError:void 0}}function Ft(t){switch(t){case"submit":return"onSubmit";case"blur":return"onBlur";case"mount":return"onMount";case"server":return"onServer";case"dynamic":return"onDynamic";default:return"onChange"}}class ii{constructor(e){this.options={},this.mount=()=>{const r=this.store.mount();this.options.defaultValue!==void 0&&!this.getMeta().isTouched&&this.form.setFieldValue(this.name,this.options.defaultValue,{dontUpdateMeta:!0});const n=this.getInfo();n.instance=this,this.update(this.options);const{onMount:i}=this.options.validators||{};if(i){const s=this.runValidator({validate:i,value:{value:this.state.value,fieldApi:this,validationSource:"field"},type:"validate"});s&&this.setMeta(o=>({...o,errorMap:{...o?.errorMap,onMount:s},errorSourceMap:{...o?.errorSourceMap,onMount:"field"}}))}return this.options.listeners?.onMount?.({value:this.state.value,fieldApi:this}),r},this.update=r=>{if(this.options=r,this.name=r.name,!this.state.meta.isTouched&&this.options.defaultValue!==void 0){const n=this.form.getFieldValue(this.name);qe(n,r.defaultValue)||this.form.setFieldValue(this.name,r.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0})}this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,this.state.meta)},this.getValue=()=>this.form.getFieldValue(this.name),this.setValue=(r,n)=>{this.form.setFieldValue(this.name,r,we(n,{dontRunListeners:!0,dontValidate:!0})),n?.dontRunListeners||this.triggerOnChangeListener(),n?.dontValidate||this.validate("change")},this.getMeta=()=>this.store.state.meta,this.setMeta=r=>this.form.setFieldMeta(this.name,r),this.getInfo=()=>this.form.getFieldInfo(this.name),this.pushValue=(r,n)=>{this.form.pushFieldValue(this.name,r,we(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.insertValue=(r,n,i)=>{this.form.insertFieldValue(this.name,r,n,we(i,{dontRunListeners:!0})),i?.dontRunListeners||this.triggerOnChangeListener()},this.replaceValue=(r,n,i)=>{this.form.replaceFieldValue(this.name,r,n,we(i,{dontRunListeners:!0})),i?.dontRunListeners||this.triggerOnChangeListener()},this.removeValue=(r,n)=>{this.form.removeFieldValue(this.name,r,we(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.swapValues=(r,n,i)=>{this.form.swapFieldValues(this.name,r,n,we(i,{dontRunListeners:!0})),i?.dontRunListeners||this.triggerOnChangeListener()},this.moveValue=(r,n,i)=>{this.form.moveFieldValues(this.name,r,n,we(i,{dontRunListeners:!0})),i?.dontRunListeners||this.triggerOnChangeListener()},this.clearValues=r=>{this.form.clearFieldValues(this.name,we(r,{dontRunListeners:!0})),r?.dontRunListeners||this.triggerOnChangeListener()},this.getLinkedFields=r=>{const n=Object.values(this.form.fieldInfo),i=[];for(const s of n){if(!s.instance)continue;const{onChangeListenTo:o,onBlurListenTo:a}=s.instance.options.validators||{};r==="change"&&o?.includes(this.name)&&i.push(s.instance),r==="blur"&&a?.includes(this.name)&&i.push(s.instance)}return i},this.validateSync=(r,n)=>{const i=jr(r,{...this.options,form:this.form,validationLogic:this.form.options.validationLogic||ft}),o=this.getLinkedFields(r).reduce((d,l)=>{const u=jr(r,{...l.options,form:l.form,validationLogic:l.form.options.validationLogic||ft});return u.forEach(h=>{h.field=l}),d.concat(u)},[]);let a=!1;Pe(()=>{const d=(l,u)=>{const h=ir(u.cause),m=u.validate?si(l.runValidator({validate:u.validate,value:{value:l.store.state.value,validationSource:"field",fieldApi:l},type:"validate"})):void 0,y=n[h],{newErrorValue:f,newSource:g}=Jn({formLevelError:y,fieldLevelError:m});l.state.meta.errorMap?.[h]!==f&&l.setMeta(b=>({...b,errorMap:{...b.errorMap,[h]:f},errorSourceMap:{...b.errorSourceMap,[h]:g}})),f&&(a=!0)};for(const l of i)d(this,l);for(const l of o)l.validate&&d(l.field,l)});const c=ir("submit");return this.state.meta.errorMap?.[c]&&r!=="submit"&&!a&&this.setMeta(d=>({...d,errorMap:{...d.errorMap,[c]:void 0},errorSourceMap:{...d.errorSourceMap,[c]:void 0}})),{hasErrored:a}},this.validateAsync=async(r,n)=>{const i=Ur(r,{...this.options,form:this.form,validationLogic:this.form.options.validationLogic||ft}),s=await n,o=this.getLinkedFields(r),a=o.reduce((m,y)=>{const f=Ur(r,{...y.options,form:y.form,validationLogic:y.form.options.validationLogic||ft});return f.forEach(g=>{g.field=y}),m.concat(f)},[]),c=[],d=[],l=i.some(m=>m.validate)||a.some(m=>m.validate);if(l){this.state.meta.isValidating||this.setMeta(m=>({...m,isValidating:!0}));for(const m of o)m.setMeta(y=>({...y,isValidating:!0}))}const u=(m,y,f)=>{const g=ir(y.cause);m.getInfo().validationMetaMap[g]?.lastAbortController.abort();const T=new AbortController;this.getInfo().validationMetaMap[g]={lastAbortController:T},f.push(new Promise(async A=>{let x;try{x=await new Promise((L,z)=>{this.timeoutIds.validations[y.cause]&&clearTimeout(this.timeoutIds.validations[y.cause]),this.timeoutIds.validations[y.cause]=setTimeout(async()=>{if(T.signal.aborted)return L(void 0);try{L(await this.runValidator({validate:y.validate,value:{value:m.store.state.value,fieldApi:m,signal:T.signal,validationSource:"field"},type:"validateAsync"}))}catch(H){z(H)}},y.debounceMs)})}catch(L){x=L}if(T.signal.aborted)return A(void 0);const E=si(x),M=s[this.name]?.[g],{newErrorValue:B,newSource:N}=Jn({formLevelError:M,fieldLevelError:E});m.setMeta(L=>({...L,errorMap:{...L?.errorMap,[g]:B},errorSourceMap:{...L.errorSourceMap,[g]:N}})),A(B)}))};for(const m of i)m.validate&&u(this,m,c);for(const m of a)m.validate&&u(m.field,m,d);let h=[];if((c.length||d.length)&&(h=await Promise.all(c),await Promise.all(d)),l){this.setMeta(m=>({...m,isValidating:!1}));for(const m of o)m.setMeta(y=>({...y,isValidating:!1}))}return h.filter(Boolean)},this.validate=(r,n)=>{if(!this.state.meta.isTouched)return[];const{fieldsErrorMap:i}=n?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(r),{hasErrored:s}=this.validateSync(r,i[this.name]??{});if(s&&!this.options.asyncAlways)return this.getInfo().validationMetaMap[ir(r)]?.lastAbortController.abort(),this.state.meta.errors;const o=n?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(r);return this.validateAsync(r,o)},this.handleChange=r=>{this.setValue(r)},this.handleBlur=()=>{this.state.meta.isTouched||this.setMeta(n=>({...n,isTouched:!0})),this.state.meta.isBlurred||this.setMeta(n=>({...n,isBlurred:!0})),this.validate("blur"),this.triggerOnBlurListener()},this.setErrorMap=r=>{this.setMeta(n=>({...n,errorMap:{...n.errorMap,...r}}))},this.parseValueWithSchema=r=>ht.validate({value:this.state.value,validationSource:"field"},r),this.parseValueWithSchemaAsync=r=>ht.validateAsync({value:this.state.value,validationSource:"field"},r),this.triggerOnChangeListener=()=>{const r=this.form.options.listeners?.onChangeDebounceMs;r&&r>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this})},r)):this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this});const n=this.options.listeners?.onChangeDebounceMs;n&&n>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},n)):this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},this.form=e.form,this.name=e.name,this.options=e,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.store=new Re({deps:[this.form.store],fn:({prevVal:r})=>{const n=r,i=this.form.getFieldMeta(this.name)??{...pt,...e.defaultMeta};let s=this.form.getFieldValue(this.name);return!i.isTouched&&s===void 0&&this.options.defaultValue!==void 0&&!qe(s,this.options.defaultValue)&&(s=this.options.defaultValue),n&&n.value===s&&n.meta===i?n:{value:s,meta:i}}})}get state(){return this.store.state}runValidator(e){return ri(e.validate)?ht[e.type](e.value,e.validate):e.validate(e.value)}triggerOnBlurListener(){const e=this.form.options.listeners?.onBlurDebounceMs;e&&e>0?(this.timeoutIds.formListeners.blur&&clearTimeout(this.timeoutIds.formListeners.blur),this.timeoutIds.formListeners.blur=setTimeout(()=>{this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this});const r=this.options.listeners?.onBlurDebounceMs;r&&r>0?(this.timeoutIds.listeners.blur&&clearTimeout(this.timeoutIds.listeners.blur),this.timeoutIds.listeners.blur=setTimeout(()=>{this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},r)):this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})}}function si(t){if(t)return t}function ir(t){switch(t){case"submit":return"onSubmit";case"blur":return"onBlur";case"mount":return"onMount";case"server":return"onServer";case"dynamic":return"onDynamic";default:return"onChange"}}function oi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var sr={exports:{}},Yr={},or={exports:{}},qr={};var ai;function mo(){if(ai)return qr;ai=1;var t=O;function e(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,i=t.useEffect,s=t.useLayoutEffect,o=t.useDebugValue;function a(u,h){var m=h(),y=n({inst:{value:m,getSnapshot:h}}),f=y[0].inst,g=y[1];return s(function(){f.value=m,f.getSnapshot=h,c(f)&&g({inst:f})},[u,m,h]),i(function(){return c(f)&&g({inst:f}),u(function(){c(f)&&g({inst:f})})},[u]),o(m),m}function c(u){var h=u.getSnapshot;u=u.value;try{var m=h();return!r(u,m)}catch{return!0}}function d(u,h){return h()}var l=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:a;return qr.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:l,qr}var Kr={};var li;function go(){return li||(li=1,process.env.NODE_ENV!=="production"&&(function(){function t(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}function e(m,y){l||i.startTransition===void 0||(l=!0);var f=y();if(!u){var g=y();s(f,g)||(u=!0)}g=o({inst:{value:f,getSnapshot:y}});var b=g[0].inst,T=g[1];return c(function(){b.value=f,b.getSnapshot=y,r(b)&&T({inst:b})},[m,f,y]),a(function(){return r(b)&&T({inst:b}),m(function(){r(b)&&T({inst:b})})},[m]),d(f),f}function r(m){var y=m.getSnapshot;m=m.value;try{var f=y();return!s(m,f)}catch{return!0}}function n(m,y){return y()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=O,s=typeof Object.is=="function"?Object.is:t,o=i.useState,a=i.useEffect,c=i.useLayoutEffect,d=i.useDebugValue,l=!1,u=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:e;Kr.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Kr}var ci;function ui(){return ci||(ci=1,process.env.NODE_ENV==="production"?or.exports=mo():or.exports=go()),or.exports}var di;function yo(){if(di)return Yr;di=1;var t=O,e=ui();function r(d,l){return d===l&&(d!==0||1/d===1/l)||d!==d&&l!==l}var n=typeof Object.is=="function"?Object.is:r,i=e.useSyncExternalStore,s=t.useRef,o=t.useEffect,a=t.useMemo,c=t.useDebugValue;return Yr.useSyncExternalStoreWithSelector=function(d,l,u,h,m){var y=s(null);if(y.current===null){var f={hasValue:!1,value:null};y.current=f}else f=y.current;y=a(function(){function b(M){if(!T){if(T=!0,A=M,M=h(M),m!==void 0&&f.hasValue){var B=f.value;if(m(B,M))return x=B}return x=M}if(B=x,n(A,M))return B;var N=h(M);return m!==void 0&&m(B,N)?(A=M,B):(A=M,x=N)}var T=!1,A,x,E=u===void 0?null:u;return[function(){return b(l())},E===null?void 0:function(){return b(E())}]},[l,u,h,m]);var g=i(d,y[0],y[1]);return o(function(){f.hasValue=!0,f.value=g},[g]),c(g),g},Yr}var Xr={};var fi;function vo(){return fi||(fi=1,process.env.NODE_ENV!=="production"&&(function(){function t(d,l){return d===l&&(d!==0||1/d===1/l)||d!==d&&l!==l}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=O,r=ui(),n=typeof Object.is=="function"?Object.is:t,i=r.useSyncExternalStore,s=e.useRef,o=e.useEffect,a=e.useMemo,c=e.useDebugValue;Xr.useSyncExternalStoreWithSelector=function(d,l,u,h,m){var y=s(null);if(y.current===null){var f={hasValue:!1,value:null};y.current=f}else f=y.current;y=a(function(){function b(M){if(!T){if(T=!0,A=M,M=h(M),m!==void 0&&f.hasValue){var B=f.value;if(m(B,M))return x=B}return x=M}if(B=x,n(A,M))return B;var N=h(M);return m!==void 0&&m(B,N)?(A=M,B):(A=M,x=N)}var T=!1,A,x,E=u===void 0?null:u;return[function(){return b(l())},E===null?void 0:function(){return b(E())}]},[l,u,h,m]);var g=i(d,y[0],y[1]);return o(function(){f.hasValue=!0,f.value=g},[g]),c(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Xr}var hi;function bo(){return hi||(hi=1,process.env.NODE_ENV==="production"?sr.exports=yo():sr.exports=vo()),sr.exports}var So=bo();function Ke(t,e=n=>n,r={}){const n=r.equal??Eo;return So.useSyncExternalStoreWithSelector(t.subscribe,()=>t.state,()=>t.state,e,n)}function Eo(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(const[n,i]of t)if(!e.has(n)||!Object.is(i,e.get(n)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();const r=pi(t);if(r.length!==pi(e).length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(e,r[n])||!Object.is(t[r[n]],e[r[n]]))return!1;return!0}function pi(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}const ar=typeof window<"u"?O.useLayoutEffect:O.useEffect;function Co(t){const[e,r]=O.useState(()=>({form:t.form,name:t.name})),[n,i]=O.useState(()=>new ii({...t}));(e.form!==t.form||e.name!==t.name)&&(i(new ii({...t})),r({form:t.form,name:t.name}));const s=Ke(n.store,t.mode==="array"?m=>Object.keys(m.value??[]).length:m=>m.value),o=Ke(n.store,m=>m.meta.isTouched),a=Ke(n.store,m=>m.meta.isBlurred),c=Ke(n.store,m=>m.meta.isDirty),d=Ke(n.store,m=>m.meta.errorMap),l=Ke(n.store,m=>m.meta.errorSourceMap),u=Ke(n.store,m=>m.meta.isValidating),h=O.useMemo(()=>{const y={...n,get state(){return{value:t.mode==="array"?n.state.value:s,get meta(){return{...n.state.meta,isTouched:o,isBlurred:a,isDirty:c,errorMap:d,errorSourceMap:l,isValidating:u}}}}};return y.Field=mi,y},[n,t.mode,s,o,a,c,d,l,u]);return ar(n.mount,[n]),ar(()=>{n.update(t)}),h}const mi=(({children:t,...e})=>{const r=Co(e),n=O.useMemo(()=>Xt(t,r),[t,r]);return v.jsx(v.Fragment,{children:n})});function wo(){return O.useState(()=>ei())[0]}const xo=Ve.version.split(".")[0]==="17"?wo:Ve.useId;function To({form:t,selector:e,children:r}){const n=Ke(t.store,e);return v.jsx(v.Fragment,{children:Xt(r,n)})}function Oo(t){const e=xo(),[r,n]=O.useState(t?.formId),[i,s]=O.useState(()=>new ni({...t,formId:t?.formId??e}));if(r!==t?.formId){const a=t?.formId??e;s(new ni({...t,formId:a})),n(a)}const o=O.useMemo(()=>{const a={...i,handleSubmit:((...c)=>i._handleSubmit(...c)),get formId(){return i._formId},get state(){return i.store.state}};return a.Field=function(d){return v.jsx(mi,{...d,form:i})},a.Subscribe=function(d){return v.jsx(To,{form:i,selector:d.selector,children:d.children})},a},[i]);return ar(i.mount,[]),ar(()=>{i.update(t)}),o}function gi(t){const{schema:e,defaultValues:r={},onSubmit:n,onValuesChange:i,compilerOptions:s,runtimeConfig:o,formOptions:a}=t,c=O.useMemo(()=>(s?new Ht(s):zn).compile(e),[e,s]),d=O.useMemo(()=>{const g={},b=c.fields;for(const[T,A]of Object.entries(b))A.defaultValue!==void 0&&(g[T]=A.defaultValue);return{...g,...r}},[c,r]),l=Oo({defaultValues:d,onSubmit:async({value:g})=>{await n?.(g)},...a}),u=O.useMemo(()=>new Hn(c,l,{autoInitialize:!1,...o}),[c,l,o]);O.useEffect(()=>(u.initialize(),()=>{u.destroy()}),[u]),O.useEffect(()=>i?l.store.subscribe(()=>{const b=l.state.values;i(b)}):void 0,[l,i]);const h=O.useCallback(()=>{l.handleSubmit()},[l]),m=O.useCallback(()=>{l.reset(),u.invalidateAndRefresh()},[l,u]),y=O.useCallback(()=>l.state.values,[l]),f=O.useCallback((g,b)=>{l.setFieldValue(g,b),u.notifyChange(g)},[l,u]);return{form:l,runtime:u,compiledSchema:c,handleSubmit:h,handleReset:m,getValues:y,setValue:f}}const yi=O.createContext(null),vi=({runtime:t,children:e})=>v.jsx(yi.Provider,{value:{runtime:t},children:e}),Qr=()=>{const t=O.useContext(yi);if(!t)throw new Error("useRuntime must be used within a SchemaFormProvider");return t.runtime};function Zr(t={}){const{isolated:e=!1,extend:r}=t,n=O.useRef(null);n.current||(e?n.current=Lr(r):(r&&Object.entries(r).forEach(([u,h])=>{nt.override(u,h)}),n.current=nt));const i=n.current,s=O.useCallback((u,h)=>{i.register(u,h)},[i]),o=O.useCallback((u,h)=>{i.override(u,h)},[i]),a=O.useCallback(u=>{i.registerAll(u)},[i]),c=O.useCallback(u=>i.has(u),[i]),d=O.useCallback(()=>i.getNames(),[i]),l=O.useCallback((u,h)=>i.toSchema(u,h),[i]);return O.useMemo(()=>({register:s,override:o,extend:a,has:c,getNames:d,toSchema:l,registry:i}),[s,o,a,c,d,l,i])}const bi=O.createContext(null);function Ao({children:t,extend:e,isolated:r=!1}){const n=Zr({extend:e,isolated:r});return v.jsx(bi.Provider,{value:n,children:t})}function Mo(){const t=O.useContext(bi);return t||Zr()}function _o(t){const e=Qr(),r=O.useCallback(i=>e.subscribe(t,i),[e,t]),n=O.useCallback(()=>e.getFieldMeta(t),[e,t]);return O.useSyncExternalStore(r,n,n)}const be=O.memo(function({form:e,name:r,validate:n,render:i,fieldProps:s}){const o=Qr(),a=_o(r),c=O.useMemo(()=>{if(!n)return;let d=n;if(Mt(n)){const u=s?.label||r;d=Gt(n,{label:u})}const l=Yn(d);return{onChange:l,onBlur:l}},[n,s?.label,r]);return a?.isVisible===!1?null:v.jsx(e.Field,{name:r,validators:c,children:d=>{const{state:l,handleChange:u,handleBlur:h}=d,m=E=>{u(E),o.notifyChange(r)},y=a?.isDisabled??l.meta?.isDisabled??!1,f=a?.isRequired??l.meta?.isRequired??!1,g=a?.options??l.meta?.options??[],b=l.meta?.errorMap,T=l.meta?.isDirty,A=E=>{if(E){if(typeof E=="string")return E;if(Array.isArray(E))return E[0]}};let x;return T?x=A(b?.onChange):x=A(b?.onBlur)??l.meta?.errors?.[0],x=x??a?.error,i({name:r,value:l.value,onChange:m,onBlur:h,error:x,disabled:y,visible:!0,required:f,options:g,isDirty:l.meta?.isDirty,isTouched:l.meta?.isTouched,...s})}})});function ko(t){return function(r){return v.jsx(be,{form:t,...r})}}const st={compact:40},De={label:14,input:14,helper:12,option:14},It={helperMarginTop:4,labelGap:8,inputPadding:"8px 12px"},Le={"& .MuiInputBase-input":{fontSize:De.input,padding:It.inputPadding},"& .MuiInputLabel-root":{fontSize:De.label,transform:"translate(14px, 9px) scale(1)","&.MuiInputLabel-shrink":{transform:"translate(14px, -9px) scale(0.75)"}},"& .MuiOutlinedInput-root":{minHeight:`${st.compact}px`},"& .MuiFormHelperText-root":{marginTop:`${It.helperMarginTop}px`,fontSize:De.helper},"& .MuiInputLabel-asterisk":{display:"none"}},mt={minHeight:`${st.compact}px`,justifyContent:"center","& .MuiFormLabel-root":{fontSize:De.label,"&.Mui-focused":{color:"text.primary"}},"& .MuiFormControlLabel-label":{fontSize:De.option},"& .MuiFormHelperText-root":{marginTop:`${It.helperMarginTop}px`,fontSize:De.helper,marginLeft:0}},Si={"& .MuiFormLabel-root":{fontSize:De.label,marginBottom:`${It.labelGap}px`,"&.Mui-focused":{color:"text.primary"}},"& .MuiFormHelperText-root":{marginTop:`${It.helperMarginTop}px`,fontSize:De.helper,marginLeft:0}},Ei="YYYY-MM-DD",Ci="HH:mm",wi="YYYY-MM-DD HH:mm",de=(t,e)=>e?v.jsx(w.Box,{component:"span",sx:{alignItems:"center","&::before":{content:'"✱"',color:"error.main",mr:"4px",fontSize:"0.5em",alignSelf:"center",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",top:"-2px"}},children:t}):t;function $o(t){return t?typeof t=="object"&&("xs"in t||"sm"in t||"md"in t)?t:{xs:t}:{xs:12}}const Jr=O.memo(function({value:e,onChange:r,onBlur:n,error:i,disabled:s,required:o,visible:a=!0,label:c,placeholder:d,helperText:l,multiline:u=!1,rows:h=4,type:m="text",inputProps:y,slotProps:f}){return a?v.jsx(w.TextField,{fullWidth:!0,label:de(c,o),placeholder:d,value:e??"",onChange:g=>r(g.target.value),onBlur:n,disabled:s,required:o,error:!!i,helperText:i||l,multiline:u,rows:u?h:void 0,type:m,sx:Le,slotProps:{input:y,...f}}):null}),Fo=({form:t,name:e,validate:r,...n})=>v.jsx(be,{form:t,name:e,validate:r,render:i=>v.jsx(Jr,{...i,...n})}),Io=O.memo(function({value:e,onChange:r,onBlur:n,error:i,disabled:s,required:o,visible:a=!0,label:c,placeholder:d,helperText:l}){const[u,h]=O.useState(!1);if(!a)return null;const m=()=>h(f=>!f),y=f=>{f.preventDefault()};return v.jsx(w.TextField,{fullWidth:!0,label:de(c,o),placeholder:d,value:e??"",onChange:f=>r(f.target.value),onBlur:n,disabled:s,required:o,error:!!i,helperText:i||l,type:u?"text":"password",size:"small",sx:Le,slotProps:{input:{endAdornment:v.jsx(w.InputAdornment,{position:"end",children:v.jsx(w.IconButton,{"aria-label":"toggle password visibility",onClick:m,onMouseDown:y,edge:"end",size:"small",children:u?v.jsx(ut.VisibilityOff,{fontSize:"small"}):v.jsx(ut.Visibility,{fontSize:"small"})})})}}})}),Vo=O.memo(function({value:e,onChange:r,onBlur:n,error:i,disabled:s,required:o,visible:a=!0,label:c,placeholder:d,helperText:l,rows:u=4,maxRows:h,maxLength:m,inputProps:y,slotProps:f}){if(!a)return null;const g=h?{minRows:u,maxRows:h}:{rows:u},b={...y??{},inputProps:{...y?.inputProps,...m===void 0?{}:{maxLength:m}}};return v.jsx(w.TextField,{fullWidth:!0,label:de(c,o),placeholder:d,value:e??"",onChange:T=>r(T.target.value),onBlur:n,disabled:s,required:o,error:!!i,helperText:i||l,multiline:!0,...g,size:"small",sx:Le,slotProps:{input:b,...f}})}),en=O.memo(function({value:e,onChange:r,onBlur:n,error:i,disabled:s,required:o,visible:a=!0,label:c,placeholder:d,helperText:l,min:u,max:h,step:m,inputProps:y,slotProps:f}){if(!a)return null;const g=A=>{const x=A.target.value;if(x==="")r(null);else{const E=parseFloat(x);r(isNaN(E)?null:E)}},b=e==null||Number.isNaN(e)?"":e,T={...f,htmlInput:{...u===void 0?{}:{min:u},...h===void 0?{}:{max:h},...m===void 0?{}:{step:m},...f?.htmlInput,...y??{}}};return v.jsx(w.TextField,{fullWidth:!0,type:"number",size:"small",label:de(c,o),placeholder:d,value:b,onChange:g,onBlur:n,disabled:s,required:o,error:!!i,helperText:i||l,sx:Le,slotProps:T})}),Po=({form:t,name:e,validate:r,...n})=>v.jsx(be,{form:t,name:e,validate:r,render:i=>v.jsx(en,{...i,...n})}),Do=w.styled("ul")(({theme:t})=>({padding:t.spacing(.5),margin:0,listStyle:"none",maxHeight:260,overflow:"auto","& .MuiAutocomplete-option":{minHeight:36,padding:t.spacing(.75,1.5),display:"flex",alignItems:"center",gap:t.spacing(1),fontSize:14,borderRadius:t.shape.borderRadius,cursor:"pointer",transition:t.transitions.create(["background-color"],{duration:t.transitions.duration.shortest}),"&:hover":{backgroundColor:t.palette.action.hover},'&[aria-selected="true"]':{backgroundColor:t.palette.action.selected},'&[aria-disabled="true"]':{opacity:.5,cursor:"not-allowed"}},"& .MuiAutocomplete-listboxStatus":{cursor:"default",pointerEvents:"none"}})),Lo=O.forwardRef((t,e)=>{const{children:r,fetchingMore:n,hasMore:i=!0,showNoMore:s,empty:o,error:a,onRetry:c,loading:d,savedScrollTop:l,onScrollPositionChange:u,...h}=t,m=O.useRef(null);return O.useImperativeHandle(e,()=>m.current),O.useLayoutEffect(()=>{l!==void 0&&l>0&&m.current&&!n&&(m.current.scrollTop=l)},[n,l]),v.jsxs(Do,{...h,ref:m,children:[d&&!n&&v.jsxs(w.Box,{component:"li",className:"MuiAutocomplete-option MuiAutocomplete-listboxStatus",sx:{py:2,gap:1,display:"flex",alignItems:"center",justifyContent:"center",color:"text.secondary"},children:[v.jsx(w.CircularProgress,{size:16,color:"inherit"}),v.jsx(w.Typography,{variant:"body2",children:"加载中…"})]}),!d&&r,o&&!d&&!n&&!a&&v.jsx(w.Box,{component:"li",className:"MuiAutocomplete-option MuiAutocomplete-listboxStatus",sx:{py:2,justifyContent:"center"},children:v.jsx(w.Typography,{variant:"body2",color:"text.secondary",children:"暂无数据"})}),a&&!d&&v.jsxs(w.Box,{component:"li",className:"MuiAutocomplete-option",sx:{py:2,display:"flex",flexDirection:"column",alignItems:"center",gap:1,cursor:"default"},children:[v.jsx(w.Typography,{variant:"body2",color:"error.main",children:"加载失败"}),c&&v.jsx(w.Button,{size:"small",variant:"outlined",color:"primary",startIcon:v.jsx(ut.Refresh,{}),onClick:y=>{y.stopPropagation(),c()},sx:{pointerEvents:"auto"},children:"重试"})]}),n&&!a&&v.jsxs(w.Box,{component:"li",className:"MuiAutocomplete-option MuiAutocomplete-listboxStatus",sx:{py:1.5,gap:1,display:"flex",alignItems:"center",justifyContent:"center",color:"text.secondary"},children:[v.jsx(w.CircularProgress,{size:16,color:"inherit"}),v.jsx(w.Typography,{variant:"body2",children:"加载中…"})]}),!i&&s&&!n&&!o&&!d&&!a&&v.jsx(w.Box,{component:"li",className:"MuiAutocomplete-option MuiAutocomplete-listboxStatus",sx:{py:1.5,justifyContent:"center"},children:v.jsx(w.Typography,{variant:"caption",color:"text.disabled",children:"已加载全部"})})]})}),lr=O.memo(function({value:e,onChange:r,onBlur:n,options:i=[],disabled:s,visible:o=!0,required:a,error:c,label:d,placeholder:l,helperText:u,multiple:h=!1,freeSolo:m=!1,loading:y=!1,remoteConfig:f,suffixButton:g,onAddOptionSuccess:b,autoSelectNewOption:T=!1,refreshOnOpen:A=!1,searchClearConfig:x={},optionLabelProp:E="label",optionValueProp:M="value",emptyText:B,showAddSuffix:N,clearable:L}){if(!o)return null;const{keepSearchOnClose:z=!1,keepSearchOnSelect:H=!1,cacheSearchKeyword:p=!1,clearValueOnly:_=!1}=x,$=O.useRef(f);$.current=f;const[R,G]=O.useState([]),[le,ge]=O.useState(!1),[Se,F]=O.useState(!1),[I,j]=O.useState(""),[q,Y]=O.useState(!1),[J,K]=O.useState(1),[X,Z]=O.useState(!0),[ee,Q]=O.useState(!1),[ce,V]=O.useState(""),[Ee,xe]=O.useState(!1),[Ue,xt]=O.useState(0),[Ge,Wt]=O.useState(""),Fe=O.useRef([]),zt=O.useRef(!1),ks=O.useRef(!1),$s=O.useRef(""),jt=O.useRef(null),Tt=f?R:i,Fs=f?.pageSize??20,Is=O.useMemo(()=>{if(f||!Ge)return Tt.length;const P=Ge.toLowerCase();return Tt.filter(W=>(typeof W=="object"?W.label:String(W)).toLowerCase().includes(P)).length},[Tt,Ge,f])>0,Dn=O.useMemo(()=>Tt.map(P=>{if(typeof P=="object"&&P!==null){const W=P[M]??P.value,U=W==null?null:typeof W=="string"||typeof W=="number"||typeof W=="boolean"?W:String(W);return{...P,label:String(P[E]??P.label??""),value:U}}return{label:String(P),value:P}}),[Tt,E,M]);O.useEffect(()=>{if(!f)return;const P=Array.isArray(e)?e:e?[e]:[];if(P.length===0)return;const W=R.filter(ve=>P.includes(ve.value)),U=[...Fe.current];let pe=!1;W.forEach(ve=>{U.some(ye=>ye.value===ve.value)||(U.push(ve),pe=!0)}),pe&&(Fe.current=U)},[e,R,f]);const Ae=O.useCallback(async(P,W,U=!1)=>{const pe=$.current;if(pe){if($s.current=P,pe.minSearchLength&&P.length<pe.minSearchLength){U||(G([]),Z(!0));return}U||(K(1),Z(!0),Q(!1)),U?F(!0):ge(!0),pe.onLoadingChange?.(!0);try{const ve=await pe.fetchOptions(P,W,Fs);if(P!==$s.current&&!U)return;if(U)G(ye=>{const Me=ve.data.filter(Ie=>!ye.some(He=>He.value===Ie.value));return[...ye,...Me]});else{const ye=[...ve.data],Me=Array.isArray(e)?e:e?[e]:[];Fe.current.forEach(Ie=>{Me.includes(Ie.value)&&!ye.some(He=>He.value===Ie.value)&&ye.push(Ie)}),G(ye)}Z(ve.hasMore),Q(!1)}catch{Q(!0)}finally{U?F(!1):ge(!1),pe.onLoadingChange?.(!1)}}},[Fs,e]),jc=O.useCallback(()=>{Se?Ae(I,J,!0):Ae(I,1,!1)},[Ae,I,J,Se]);O.useEffect(()=>{const P=$.current;if(!P?.fetchById||!e)return;const U=(Array.isArray(e)?e:[e]).filter(pe=>!R.some(ve=>ve.value===pe));U.length!==0&&Promise.all(U.map(async pe=>{try{return await P.fetchById(pe)}catch{return null}})).then(pe=>{const ve=pe.filter(ye=>ye!==null);ve.length>0&&(G(ye=>{const Me=[...ye];return ve.forEach(Ie=>{Me.some(He=>He.value===Ie.value)||Me.push(Ie)}),Me}),ve.forEach(ye=>{Fe.current.some(Me=>Me.value===ye.value)||Fe.current.push(ye)}))})},[e,R]);const Uc=O.useCallback((P=!0)=>{p&&I.trim()&&V(I),j(""),P&&!_&&f&&Ae("",1,!1)},[p,I,_,f,Ae]),Gc=O.useCallback(()=>{ce&&(j(ce),f&&Ae(ce,1,!1),xe(!1))},[ce,f,Ae]),Hc=()=>{zt.current=!1,Y(!0),Q(!1),z||j(""),f&&(A||!ks.current)&&(Ae(z?I:"",1,!1),ks.current=!0)},Yc=()=>{if(Y(!1),!zt.current&&!h&&f){if(!z){p&&I.trim()&&V(I);const P=e;if(P!=null){const W=R.find(U=>U.value===P)||Fe.current.find(U=>U.value===P);j(W?W.label:"")}else j("")}}else!z&&!H&&zt.current&&Uc(!_)},qc=(P,W,U)=>{U!=="reset"&&(j(W),xe(!1),Wt(W),f&&(jt.current&&clearTimeout(jt.current),(U==="input"||U==="clear")&&(K(1),Z(!0),Q(!1),xt(0),jt.current=setTimeout(()=>{Ae(W,1,!1)},f.debounceTimeout??500))))},Kc=P=>{const W=P.currentTarget;if(xt(W.scrollTop),!le&&!Se&&X&&!ee&&W.scrollTop+W.clientHeight>=W.scrollHeight-20){const U=J+1;K(U),Ae(I,U,!0)}};O.useEffect(()=>()=>{jt.current&&clearTimeout(jt.current)},[]);const Xc=()=>h?Array.isArray(e)?e.map(P=>Dn.find(W=>W.value===P)||{label:String(P),value:P}).filter(Boolean):[]:Dn.find(P=>P.value===e)||(e?{label:String(e),value:e}:null),Qc=O.useCallback(P=>{if(f?Ae(I,1,!1):G(W=>[...W,P]),T)if(h){const W=Array.isArray(e)?e:[];r([...W,P.value])}else r(P.value)},[f,Ae,I,T,h,e,r]),Ot=(()=>{if(g){const P=g(Ge,Is);if(P)return P}if(typeof N=="function"){const P=N(Ge,Is);if(P)return P}return N===!0?{icon:v.jsx(ut.Add,{fontSize:"small"}),onClick:()=>{b&&b({},{isRemote:!!f,refreshRemote:f?()=>Ae(I,1,!1):void 0,appendLocalOption:Qc})},tooltip:"添加选项"}:null})(),Zc=()=>{if(!Ot)return;const{icon:P,tooltip:W}=Ot,U=P||v.jsx(ut.Add,{fontSize:"small"});return W?v.jsx(w.Tooltip,{title:W,children:v.jsx("span",{style:{display:"flex",alignItems:"center"},children:U})}):U},Jc=()=>{if(!Ot)return{};const{onClick:P,disabled:W}=Ot;return{onClick:U=>{U.stopPropagation(),P()},disabled:W,"aria-label":Ot.tooltip||"操作",sx:{transform:"none !important","&.MuiAutocomplete-popupIndicatorOpen":{transform:"none !important"}}}},eu=P=>v.jsxs(v.Fragment,{children:[(le||y)&&v.jsx(w.CircularProgress,{color:"inherit",size:20}),p&&ce&&!I&&Ee&&!s&&v.jsx(w.Tooltip,{title:"恢复上次搜索",children:v.jsx(w.IconButton,{size:"small",onClick:Gc,sx:{p:.5},children:v.jsx(ut.Replay,{fontSize:"small"})})}),P]});return v.jsx(w.Autocomplete,{multiple:h,freeSolo:m,disableCloseOnSelect:h,open:q,onOpen:Hc,onClose:Yc,options:Dn,loading:le||y,disableClearable:L===!1,noOptionsText:B||"暂无数据",popupIcon:Zc(),filterOptions:f?P=>P:void 0,inputValue:f?I:void 0,onInputChange:qc,getOptionLabel:P=>P?.label||String(P?.value)||"",isOptionEqualToValue:(P,W)=>P.value===W.value,value:Xc(),onChange:(P,W)=>{if(zt.current=!0,h){const U=W.map(pe=>pe.value);r(U),Fe.current=W}else{const U=W?.value??null;r(U),W&&(Fe.current=[W],H||j(W.label))}!H&&f&&setTimeout(()=>{if(!h){const U=W?.label||"";j(U)}},0)},onBlur:n,disabled:s,slots:{listbox:f?Lo:void 0},slotProps:{listbox:{onScroll:f?Kc:void 0,style:{maxHeight:260},...f?{fetchingMore:Se,hasMore:X,showNoMore:R.length>0,empty:R.length===0&&!le&&!Se,error:ee,onRetry:jc,loading:le,savedScrollTop:Ue}:{}},chip:{size:"small",variant:"outlined"},popupIndicator:Ot?Jc():{}},renderOption:(P,W,U)=>{const{key:pe,...ve}=P,ye=typeof W=="string",Me=ye?W:W.listLabel??W.label,Ie=ye?W:W.value,He=ye?void 0:W.key,Ln=pe??He??String(Ie)??U.index;return O.createElement("li",{...ve,key:Ln},Me)},renderTags:h?(P,W)=>Array.isArray(P)?P.map((U,pe)=>{const{key:ve,...ye}=W({index:pe}),Me=typeof U=="string"?U:U.label,Ie=typeof U=="string"?U:U.value,He=typeof U=="string"?void 0:U.key,Ln=ve??He??String(Ie)??pe;return O.createElement(w.Chip,{label:Me,...ye,key:Ln,size:"small"})}):null:void 0,renderInput:P=>v.jsx(w.TextField,{...P,label:de(d,a),placeholder:l,error:!!c,helperText:c||u,required:a,size:"small",sx:Le,onMouseEnter:()=>{p&&ce&&!I&&xe(!0)},onMouseLeave:()=>{xe(!1)},slotProps:{input:{...P.InputProps,endAdornment:eu(P.InputProps.endAdornment)}}})})}),xi=({form:t,name:e,validate:r,...n})=>v.jsx(be,{form:t,name:e,validate:r,render:i=>v.jsx(lr,{...i,...n})}),Ti=lr,No=xi,tn=O.memo(function({value:e,onChange:r,onBlur:n,error:i,disabled:s,required:o,visible:a=!0,label:c,helperText:d,checkboxProps:l}){return a?v.jsxs(w.FormControl,{error:!!i,disabled:s,required:o,sx:mt,children:[v.jsx(w.FormControlLabel,{control:v.jsx(w.Checkbox,{size:"small",checked:!!e,onChange:u=>r(u.target.checked),onBlur:n,disabled:s,...l}),label:de(c,o)}),(i||d)&&v.jsx(w.FormHelperText,{children:i||d})]}):null}),Bo=({form:t,name:e,validate:r,...n})=>v.jsx(be,{form:t,name:e,validate:r,render:i=>v.jsx(tn,{...i,...n})}),rn=O.memo(function({value:e,onChange:r,onBlur:n,error:i,disabled:s,required:o,visible:a=!0,label:c,helperText:d,switchProps:l}){return a?v.jsxs(w.FormControl,{error:!!i,disabled:s,required:o,sx:mt,children:[v.jsx(w.FormControlLabel,{control:v.jsx(w.Switch,{size:"small",checked:!!e,onChange:u=>r(u.target.checked),onBlur:n,disabled:s,...l}),label:de(c,o)}),(i||d)&&v.jsx(w.FormHelperText,{children:i||d})]}):null}),Ro=({form:t,name:e,validate:r,...n})=>v.jsx(be,{form:t,name:e,validate:r,render:i=>v.jsx(rn,{...i,...n})}),nn=O.memo(function({value:e,onChange:r,onBlur:n,error:i,disabled:s,required:o,visible:a=!0,options:c=[],label:d,helperText:l,row:u=!1,inline:h=!1,radioProps:m}){if(!a)return null;const y=Array.isArray(c)?c.map(g=>typeof g=="object"?g:{label:String(g),value:g}):[],f=v.jsx(w.RadioGroup,{row:u,value:e??"",onChange:g=>{const b=g.target.value,T=y.find(A=>String(A.value)===b);r(T?T.value:b)},onBlur:n,sx:{gap:u?.5:0,"& .MuiFormControlLabel-root":{marginRight:u?2:0,marginLeft:0}},children:y.map(g=>v.jsx(w.FormControlLabel,{value:String(g.value),control:v.jsx(w.Radio,{size:"small",disabled:g.disabled,...m}),label:g.listLabel??g.label,disabled:g.disabled||s},g.key??String(g.value)))});return h?v.jsxs(w.FormControl,{component:"fieldset",error:!!i,disabled:s,required:o,sx:{...mt,position:"relative",pb:i||l?2.5:0},children:[v.jsxs(w.Box,{sx:{display:"flex",alignItems:u?"center":"flex-start",minHeight:`${st.compact}px`},children:[d&&v.jsx(w.FormLabel,{component:"legend",sx:{mb:0,mr:2,flexShrink:0,pt:u?0:1},children:de(d,o)}),f]}),(i||l)&&v.jsx(w.FormHelperText,{sx:{position:"absolute",bottom:0,left:0,m:0},children:i||l})]}):v.jsxs(w.FormControl,{component:"fieldset",error:!!i,disabled:s,required:o,sx:mt,children:[d&&v.jsx(w.FormLabel,{component:"legend",sx:{mb:.5},children:de(d,o)}),f,(i||l)&&v.jsx(w.FormHelperText,{children:i||l})]})}),Wo=({form:t,name:e,validate:r,...n})=>v.jsx(be,{form:t,name:e,validate:r,render:i=>v.jsx(nn,{...i,...n})}),sn=O.memo(function({value:e,onChange:r,onBlur:n,error:i,disabled:s,required:o,visible:a=!0,label:c,helperText:d,format:l=Ei,min:u,max:h}){if(!a)return null;const m=e?Be(e):null,y=u?Be(u):void 0,f=h?Be(h):void 0;return v.jsx(tt.LocalizationProvider,{adapterLocale:"zh-cn",dateAdapter:Ut.AdapterDayjs,children:v.jsx(tt.DatePicker,{value:m,onChange:g=>r(g?.isValid()?g.format(l):null),format:l,disabled:s,minDate:y,maxDate:f,slotProps:{textField:{fullWidth:!0,label:de(c,o),error:!!i,helperText:i||d,required:o,size:"small",sx:Le,onBlur:n}}})})}),zo=({form:t,name:e,validate:r,...n})=>v.jsx(be,{form:t,name:e,validate:r,render:i=>v.jsx(sn,{...i,...n})});var cr={exports:{}},jo=cr.exports,Oi;function Uo(){return Oi||(Oi=1,(function(t,e){(function(r,n){t.exports=n()})(jo,(function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,o=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,c={},d=function(g){return(g=+g)+(g>68?1900:2e3)},l=function(g){return function(b){this[g]=+b}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=(function(b){if(!b||b==="Z")return 0;var T=b.match(/([+-]|\d\d)/g),A=60*T[1]+(+T[2]||0);return A===0?0:T[0]==="+"?-A:A})(g)}],h=function(g){var b=c[g];return b&&(b.indexOf?b:b.s.concat(b.f))},m=function(g,b){var T,A=c.meridiem;if(A){for(var x=1;x<=24;x+=1)if(g.indexOf(A(x,0,b))>-1){T=x>12;break}}else T=g===(b?"pm":"PM");return T},y={A:[a,function(g){this.afternoon=m(g,!1)}],a:[a,function(g){this.afternoon=m(g,!0)}],Q:[i,function(g){this.month=3*(g-1)+1}],S:[i,function(g){this.milliseconds=100*+g}],SS:[s,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[o,l("seconds")],ss:[o,l("seconds")],m:[o,l("minutes")],mm:[o,l("minutes")],H:[o,l("hours")],h:[o,l("hours")],HH:[o,l("hours")],hh:[o,l("hours")],D:[o,l("day")],DD:[s,l("day")],Do:[a,function(g){var b=c.ordinal,T=g.match(/\d+/);if(this.day=T[0],b)for(var A=1;A<=31;A+=1)b(A).replace(/\[|\]/g,"")===g&&(this.day=A)}],w:[o,l("week")],ww:[s,l("week")],M:[o,l("month")],MM:[s,l("month")],MMM:[a,function(g){var b=h("months"),T=(h("monthsShort")||b.map((function(A){return A.slice(0,3)}))).indexOf(g)+1;if(T<1)throw new Error;this.month=T%12||T}],MMMM:[a,function(g){var b=h("months").indexOf(g)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,l("year")],YY:[s,function(g){this.year=d(g)}],YYYY:[/\d{4}/,l("year")],Z:u,ZZ:u};function f(g){var b,T;b=g,T=c&&c.formats;for(var A=(g=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(z,H,p){var _=p&&p.toUpperCase();return H||T[p]||r[p]||T[_].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function($,R,G){return R||G.slice(1)}))}))).match(n),x=A.length,E=0;E<x;E+=1){var M=A[E],B=y[M],N=B&&B[0],L=B&&B[1];A[E]=L?{regex:N,parser:L}:M.replace(/^\[|\]$/g,"")}return function(z){for(var H={},p=0,_=0;p<x;p+=1){var $=A[p];if(typeof $=="string")_+=$.length;else{var R=$.regex,G=$.parser,le=z.slice(_),ge=R.exec(le)[0];G.call(H,ge),z=z.replace(ge,"")}}return(function(Se){var F=Se.afternoon;if(F!==void 0){var I=Se.hours;F?I<12&&(Se.hours+=12):I===12&&(Se.hours=0),delete Se.afternoon}})(H),H}}return function(g,b,T){T.p.customParseFormat=!0,g&&g.parseTwoDigitYear&&(d=g.parseTwoDigitYear);var A=b.prototype,x=A.parse;A.parse=function(E){var M=E.date,B=E.utc,N=E.args;this.$u=B;var L=N[1];if(typeof L=="string"){var z=N[2]===!0,H=N[3]===!0,p=z||H,_=N[2];H&&(_=N[2]),c=this.$locale(),!z&&_&&(c=T.Ls[_]),this.$d=(function(le,ge,Se,F){try{if(["x","X"].indexOf(ge)>-1)return new Date((ge==="X"?1e3:1)*le);var I=f(ge)(le),j=I.year,q=I.month,Y=I.day,J=I.hours,K=I.minutes,X=I.seconds,Z=I.milliseconds,ee=I.zone,Q=I.week,ce=new Date,V=Y||(j||q?1:ce.getDate()),Ee=j||ce.getFullYear(),xe=0;j&&!q||(xe=q>0?q-1:ce.getMonth());var Ue,xt=J||0,Ge=K||0,Wt=X||0,Fe=Z||0;return ee?new Date(Date.UTC(Ee,xe,V,xt,Ge,Wt,Fe+60*ee.offset*1e3)):Se?new Date(Date.UTC(Ee,xe,V,xt,Ge,Wt,Fe)):(Ue=new Date(Ee,xe,V,xt,Ge,Wt,Fe),Q&&(Ue=F(Ue).week(Q).toDate()),Ue)}catch{return new Date("")}})(M,L,B,T),this.init(),_&&_!==!0&&(this.$L=this.locale(_).$L),p&&M!=this.format(L)&&(this.$d=new Date("")),c={}}else if(L instanceof Array)for(var $=L.length,R=1;R<=$;R+=1){N[1]=L[R-1];var G=T.apply(this,N);if(G.isValid()){this.$d=G.$d,this.$L=G.$L,this.init();break}R===$&&(this.$d=new Date(""))}else x.call(this,E)}}}))})(cr)),cr.exports}var Go=Uo();const Ho=oi(Go);Be.extend(Ho);const on=O.memo(function({value:e,onChange:r,onBlur:n,error:i,disabled:s,required:o,visible:a=!0,label:c,helperText:d,format:l=Ci,ampm:u=!1,minutesStep:h=1,secondsStep:m}){if(!a)return null;const y=O.useMemo(()=>{if(!e)return null;const g=Be(e,l,!0);if(g.isValid())return g;const b=Be(e);return b.isValid()?b:null},[e,l]),f=O.useCallback(g=>{if(!g||!g.isValid()){r(null);return}r(g.format(l))},[r,l]);return v.jsx(tt.LocalizationProvider,{adapterLocale:"zh-cn",dateAdapter:Ut.AdapterDayjs,children:v.jsx(tt.TimePicker,{value:y,onChange:f,format:l,ampm:u,disabled:s,minutesStep:h,...m?{secondsStep:m}:{},slotProps:{textField:{fullWidth:!0,label:de(c,o),error:!!i,helperText:i||d,required:o,size:"small",sx:Le,onBlur:n},actionBar:{actions:["clear","accept"]}}})})}),Yo=({form:t,name:e,validate:r,...n})=>v.jsx(be,{form:t,name:e,validate:r,render:i=>v.jsx(on,{...i,...n})}),an=O.memo(function({value:e,onChange:r,onBlur:n,error:i,disabled:s,required:o,visible:a=!0,label:c,helperText:d,format:l=wi,minDateTime:u,maxDateTime:h,ampm:m=!1}){if(!a)return null;const y=e?Be(e):null,f=u?Be(u):void 0,g=h?Be(h):void 0;return v.jsx(tt.LocalizationProvider,{adapterLocale:"zh-cn",dateAdapter:Ut.AdapterDayjs,children:v.jsx(tt.DateTimePicker,{value:y,onChange:b=>r(b?.isValid()?b.format(l):null),format:l,ampm:m,disabled:s,minDateTime:f,maxDateTime:g,slotProps:{textField:{fullWidth:!0,label:de(c,o),error:!!i,helperText:i||d,required:o,size:"small",sx:Le,onBlur:n}}})})}),qo=({form:t,name:e,validate:r,...n})=>v.jsx(be,{form:t,name:e,validate:r,render:i=>v.jsx(an,{...i,...n})}),ln=O.memo(function({value:e,onChange:r,error:n,disabled:i,required:s,visible:o=!0,label:a,helperText:c,min:d=0,max:l=100,step:u=1,marks:h,valueLabelDisplay:m="auto",showValue:y=!0,inline:f=!1}){if(!o)return null;const g=v.jsx(w.Slider,{size:"small",sx:{py:.3},value:e??d,onChange:(b,T)=>r(T),disabled:i,min:d,max:l,step:u,marks:h,valueLabelDisplay:m});return f?v.jsxs(w.FormControl,{fullWidth:!0,error:!!n,disabled:i,sx:{...Si,minHeight:`${st.compact}px`},children:[v.jsxs(w.Box,{sx:{display:"flex",alignItems:"center",minHeight:`${st.compact}px`,gap:2},children:[a&&v.jsx(w.FormLabel,{sx:{mb:0,flexShrink:0},children:de(a,s)}),v.jsx(w.Box,{sx:{flex:1,px:1},children:g}),y&&v.jsx(w.Typography,{variant:"body2",color:"text.secondary",sx:{fontSize:De.input,minWidth:32,textAlign:"right"},children:e??d})]}),(n||c)&&v.jsx(w.FormHelperText,{children:n||c})]}):v.jsxs(w.FormControl,{fullWidth:!0,error:!!n,disabled:i,sx:{...Si},children:[a&&v.jsxs(w.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:.5},children:[v.jsx(w.FormLabel,{children:de(a,s)}),y&&v.jsx(w.Typography,{variant:"body2",color:"text.secondary",sx:{fontSize:De.input},children:e??d})]}),g,(n||c)&&v.jsx(w.FormHelperText,{children:n||c})]})}),Ko=({form:t,name:e,validate:r,...n})=>v.jsx(be,{form:t,name:e,validate:r,render:i=>v.jsx(ln,{...i,...n})}),cn=O.memo(function({value:e,onChange:r,error:n,disabled:i,required:s,visible:o=!0,label:a,helperText:c,max:d=5,precision:l=1,size:u="small",readOnly:h=!1,inline:m=!0}){if(!o)return null;const y=v.jsx(w.Rating,{value:e??0,onChange:(f,g)=>r(g),sx:{py:0},disabled:i,readOnly:h,max:d,precision:l,size:u});return m?v.jsxs(w.FormControl,{error:!!n,disabled:i,sx:{...mt,minHeight:`${st.compact}px`},children:[v.jsxs(w.Box,{sx:{display:"flex",alignItems:"center",minHeight:`${st.compact}px`,gap:2},children:[a&&v.jsx(w.FormLabel,{sx:{mb:0,flexShrink:0},children:de(a,s)}),y]}),(n||c)&&v.jsx(w.FormHelperText,{children:n||c})]}):v.jsxs(w.FormControl,{error:!!n,disabled:i,sx:mt,children:[a&&v.jsx(w.FormLabel,{sx:{mb:.5},children:de(a,s)}),v.jsx(w.Box,{children:y}),(n||c)&&v.jsx(w.FormHelperText,{children:n||c})]})}),Xo=({form:t,name:e,validate:r,...n})=>v.jsx(be,{form:t,name:e,validate:r,render:i=>v.jsx(cn,{...i,...n})}),un=O.memo(function({value:e,onChange:r,name:n}){return v.jsx("input",{type:"hidden",name:n,value:e??"",onChange:i=>r(i.target.value)})}),Qo=({form:t,name:e,validate:r})=>v.jsx(be,{form:t,name:e,validate:r,render:n=>v.jsx(un,{...n})}),ur=O.createContext(null),dn=()=>{const t=O.useContext(ur);if(!t)throw new Error("useLayoutContext must be used within a LayoutRenderer");return t},dr=({layout:t,renderField:e})=>v.jsx(ur.Provider,{value:{renderField:e},children:t.map((r,n)=>v.jsx(Ai,{node:r,renderField:e},n))}),Ai=({node:t,renderField:e})=>{if(t.type==="field"){if(!t.field)return null;const o=e(t.field,t.children);return v.jsx(v.Fragment,{children:o})}const{component:r,props:n,children:i}=t,s=i?v.jsx(dr,{layout:i,renderField:e}):null;switch(r){case"Grid":return v.jsx(w.Grid,{container:!0,spacing:2,...n,children:i?.map((o,a)=>v.jsx(w.Grid,{size:o.props?.gridItem||12,children:v.jsx(Ai,{node:o,renderField:e})},a))});case"Stack":return v.jsx(w.Stack,{spacing:2,...n,children:s});case"Card":return v.jsx(w.Card,{...n,children:v.jsxs(w.CardContent,{children:[n?.title&&v.jsx(w.Typography,{variant:"h6",gutterBottom:!0,children:n.title}),s]})});case"Group":return v.jsxs(w.Paper,{variant:"outlined",sx:{p:2},...n,children:[n?.title&&v.jsx(w.Typography,{variant:"subtitle1",gutterBottom:!0,children:n.title}),s]});default:return v.jsx("div",{...n,children:s})}},fn=O.memo(function({visible:e=!0,disabled:r,label:n,helperText:i,layoutChildren:s,variant:o="divider",spacing:a=2,required:c}){if(!e)return null;const{renderField:d}=dn(),l=()=>v.jsx(w.Grid,{container:!0,spacing:a,children:s&&v.jsx(dr,{layout:s,renderField:d})});return o==="card"?v.jsx(w.Card,{variant:"outlined",sx:{width:"100%"},children:v.jsxs(w.CardContent,{children:[n&&v.jsx(w.Typography,{variant:"subtitle1",fontWeight:"bold",gutterBottom:!0,children:de(n,c)}),i&&v.jsx(w.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:i}),l()]})}):o==="divider"?v.jsxs(w.Box,{sx:{width:"100%"},children:[n&&v.jsxs(v.Fragment,{children:[v.jsx(w.Divider,{sx:{mb:2},children:v.jsx(w.Typography,{variant:"subtitle2",color:"text.secondary",children:de(n,c)})}),i&&v.jsx(w.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:i})]}),l()]}):v.jsxs(w.Box,{sx:{width:"100%"},children:[n&&v.jsx(w.Typography,{variant:"subtitle1",fontWeight:"bold",gutterBottom:!0,children:de(n,c)}),i&&v.jsx(w.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:i}),l()]})}),Zo=t=>v.jsx(fn,{...t}),hn=O.memo(function({value:e,onChange:r,onBlur:n,name:i,error:s,disabled:o,required:a,visible:c=!0,label:d,helperText:l,children:u,component:h,componentProps:m={},...y}){if(!c)return null;const f={value:e,onChange:r,onBlur:n,name:i,error:s,disabled:o,required:a,visible:c};return u!==void 0?typeof u=="function"?v.jsx(w.Box,{children:u({...f,label:d,helperText:l,...y,...m})}):v.jsx(w.Box,{children:u}):h?v.jsx(h,{...f,label:d,helperText:l,...y,...m}):v.jsx(w.TextField,{fullWidth:!0,name:i,value:e??"",onChange:g=>r(g.target.value),onBlur:n,label:de(d,a),error:!!s,helperText:s||l,disabled:o,required:a,size:"small",sx:Le,...m})}),Jo=({form:t,name:e,validate:r,...n})=>v.jsx(be,{form:t,name:e,validate:r,render:i=>v.jsx(hn,{...i,...n})}),Mi=t=>t,ea=(()=>{let t=Mi;return{configure(e){t=e},generate(e){return t(e)},reset(){t=Mi}}})();function Xe(t,...e){const r=new URL(`https://mui.com/production-error/?code=${t}`);return e.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${t}; visit ${r} for the full message.`}function ot(t){if(typeof t!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Xe(7));return t.charAt(0).toUpperCase()+t.slice(1)}var fr={exports:{}},hr={exports:{}},re={};var _i;function ta(){if(_i)return re;_i=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,d=t?Symbol.for("react.concurrent_mode"):60111,l=t?Symbol.for("react.forward_ref"):60112,u=t?Symbol.for("react.suspense"):60113,h=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,f=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,T=t?Symbol.for("react.scope"):60119;function A(E){if(typeof E=="object"&&E!==null){var M=E.$$typeof;switch(M){case e:switch(E=E.type,E){case c:case d:case n:case s:case i:case u:return E;default:switch(E=E&&E.$$typeof,E){case a:case l:case y:case m:case o:return E;default:return M}}case r:return M}}}function x(E){return A(E)===d}return re.AsyncMode=c,re.ConcurrentMode=d,re.ContextConsumer=a,re.ContextProvider=o,re.Element=e,re.ForwardRef=l,re.Fragment=n,re.Lazy=y,re.Memo=m,re.Portal=r,re.Profiler=s,re.StrictMode=i,re.Suspense=u,re.isAsyncMode=function(E){return x(E)||A(E)===c},re.isConcurrentMode=x,re.isContextConsumer=function(E){return A(E)===a},re.isContextProvider=function(E){return A(E)===o},re.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===e},re.isForwardRef=function(E){return A(E)===l},re.isFragment=function(E){return A(E)===n},re.isLazy=function(E){return A(E)===y},re.isMemo=function(E){return A(E)===m},re.isPortal=function(E){return A(E)===r},re.isProfiler=function(E){return A(E)===s},re.isStrictMode=function(E){return A(E)===i},re.isSuspense=function(E){return A(E)===u},re.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===n||E===d||E===s||E===i||E===u||E===h||typeof E=="object"&&E!==null&&(E.$$typeof===y||E.$$typeof===m||E.$$typeof===o||E.$$typeof===a||E.$$typeof===l||E.$$typeof===g||E.$$typeof===b||E.$$typeof===T||E.$$typeof===f)},re.typeOf=A,re}var ne={};var ki;function ra(){return ki||(ki=1,process.env.NODE_ENV!=="production"&&(function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,d=t?Symbol.for("react.concurrent_mode"):60111,l=t?Symbol.for("react.forward_ref"):60112,u=t?Symbol.for("react.suspense"):60113,h=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,f=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,T=t?Symbol.for("react.scope"):60119;function A(V){return typeof V=="string"||typeof V=="function"||V===n||V===d||V===s||V===i||V===u||V===h||typeof V=="object"&&V!==null&&(V.$$typeof===y||V.$$typeof===m||V.$$typeof===o||V.$$typeof===a||V.$$typeof===l||V.$$typeof===g||V.$$typeof===b||V.$$typeof===T||V.$$typeof===f)}function x(V){if(typeof V=="object"&&V!==null){var Ee=V.$$typeof;switch(Ee){case e:var xe=V.type;switch(xe){case c:case d:case n:case s:case i:case u:return xe;default:var Ue=xe&&xe.$$typeof;switch(Ue){case a:case l:case y:case m:case o:return Ue;default:return Ee}}case r:return Ee}}}var E=c,M=d,B=a,N=o,L=e,z=l,H=n,p=y,_=m,$=r,R=s,G=i,le=u,ge=!1;function Se(V){return ge||(ge=!0),F(V)||x(V)===c}function F(V){return x(V)===d}function I(V){return x(V)===a}function j(V){return x(V)===o}function q(V){return typeof V=="object"&&V!==null&&V.$$typeof===e}function Y(V){return x(V)===l}function J(V){return x(V)===n}function K(V){return x(V)===y}function X(V){return x(V)===m}function Z(V){return x(V)===r}function ee(V){return x(V)===s}function Q(V){return x(V)===i}function ce(V){return x(V)===u}ne.AsyncMode=E,ne.ConcurrentMode=M,ne.ContextConsumer=B,ne.ContextProvider=N,ne.Element=L,ne.ForwardRef=z,ne.Fragment=H,ne.Lazy=p,ne.Memo=_,ne.Portal=$,ne.Profiler=R,ne.StrictMode=G,ne.Suspense=le,ne.isAsyncMode=Se,ne.isConcurrentMode=F,ne.isContextConsumer=I,ne.isContextProvider=j,ne.isElement=q,ne.isForwardRef=Y,ne.isFragment=J,ne.isLazy=K,ne.isMemo=X,ne.isPortal=Z,ne.isProfiler=ee,ne.isStrictMode=Q,ne.isSuspense=ce,ne.isValidElementType=A,ne.typeOf=x})()),ne}var $i;function Fi(){return $i||($i=1,process.env.NODE_ENV==="production"?hr.exports=ta():hr.exports=ra()),hr.exports}var pn,Ii;function na(){if(Ii)return pn;Ii=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function i(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var o={},a=0;a<10;a++)o["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(o).map(function(l){return o[l]});if(c.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(l){d[l]=l}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return pn=i()?Object.assign:function(s,o){for(var a,c=n(s),d,l=1;l<arguments.length;l++){a=Object(arguments[l]);for(var u in a)e.call(a,u)&&(c[u]=a[u]);if(t){d=t(a);for(var h=0;h<d.length;h++)r.call(a,d[h])&&(c[d[h]]=a[d[h]])}}return c},pn}var mn,Vi;function gn(){if(Vi)return mn;Vi=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return mn=t,mn}var yn,Pi;function Di(){return Pi||(Pi=1,yn=Function.call.bind(Object.prototype.hasOwnProperty)),yn}var vn,Li;function ia(){if(Li)return vn;Li=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=gn(),r={},n=Di();t=function(s){var o="Warning: "+s;try{throw new Error(o)}catch{}}}function i(s,o,a,c,d){if(process.env.NODE_ENV!=="production"){for(var l in s)if(n(s,l)){var u;try{if(typeof s[l]!="function"){var h=Error((c||"React class")+": "+a+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}u=s[l](o,l,c,a,null,e)}catch(y){u=y}if(u&&!(u instanceof Error)&&t((c||"React class")+": type specification of "+a+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in r)){r[u.message]=!0;var m=d?d():"";t("Failed "+a+" type: "+u.message+(m??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},vn=i,vn}var bn,Ni;function sa(){if(Ni)return bn;Ni=1;var t=Fi(),e=na(),r=gn(),n=Di(),i=ia(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var c="Warning: "+a;try{throw new Error(c)}catch{}});function o(){return null}return bn=function(a,c){var d=typeof Symbol=="function"&&Symbol.iterator,l="@@iterator";function u(F){var I=F&&(d&&F[d]||F[l]);if(typeof I=="function")return I}var h="<<anonymous>>",m={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:T(),arrayOf:A,element:x(),elementType:E(),instanceOf:M,node:z(),objectOf:N,oneOf:B,oneOfType:L,shape:p,exact:_};function y(F,I){return F===I?F!==0||1/F===1/I:F!==F&&I!==I}function f(F,I){this.message=F,this.data=I&&typeof I=="object"?I:{},this.stack=""}f.prototype=Error.prototype;function g(F){if(process.env.NODE_ENV!=="production")var I={},j=0;function q(J,K,X,Z,ee,Q,ce){if(Z=Z||h,Q=Q||X,ce!==r){if(c){var V=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 V.name="Invariant Violation",V}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ee=Z+":"+X;!I[Ee]&&j<3&&(s("You are manually calling a React.PropTypes validation function for the `"+Q+"` prop on `"+Z+"`. 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."),I[Ee]=!0,j++)}}return K[X]==null?J?K[X]===null?new f("The "+ee+" `"+Q+"` is marked as required "+("in `"+Z+"`, but its value is `null`.")):new f("The "+ee+" `"+Q+"` is marked as required in "+("`"+Z+"`, but its value is `undefined`.")):null:F(K,X,Z,ee,Q)}var Y=q.bind(null,!1);return Y.isRequired=q.bind(null,!0),Y}function b(F){function I(j,q,Y,J,K,X){var Z=j[q],ee=G(Z);if(ee!==F){var Q=le(Z);return new f("Invalid "+J+" `"+K+"` of type "+("`"+Q+"` supplied to `"+Y+"`, expected ")+("`"+F+"`."),{expectedType:F})}return null}return g(I)}function T(){return g(o)}function A(F){function I(j,q,Y,J,K){if(typeof F!="function")return new f("Property `"+K+"` of component `"+Y+"` has invalid PropType notation inside arrayOf.");var X=j[q];if(!Array.isArray(X)){var Z=G(X);return new f("Invalid "+J+" `"+K+"` of type "+("`"+Z+"` supplied to `"+Y+"`, expected an array."))}for(var ee=0;ee<X.length;ee++){var Q=F(X,ee,Y,J,K+"["+ee+"]",r);if(Q instanceof Error)return Q}return null}return g(I)}function x(){function F(I,j,q,Y,J){var K=I[j];if(!a(K)){var X=G(K);return new f("Invalid "+Y+" `"+J+"` of type "+("`"+X+"` supplied to `"+q+"`, expected a single ReactElement."))}return null}return g(F)}function E(){function F(I,j,q,Y,J){var K=I[j];if(!t.isValidElementType(K)){var X=G(K);return new f("Invalid "+Y+" `"+J+"` of type "+("`"+X+"` supplied to `"+q+"`, expected a single ReactElement type."))}return null}return g(F)}function M(F){function I(j,q,Y,J,K){if(!(j[q]instanceof F)){var X=F.name||h,Z=Se(j[q]);return new f("Invalid "+J+" `"+K+"` of type "+("`"+Z+"` supplied to `"+Y+"`, expected ")+("instance of `"+X+"`."))}return null}return g(I)}function B(F){if(!Array.isArray(F))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("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])."):s("Invalid argument supplied to oneOf, expected an array.")),o;function I(j,q,Y,J,K){for(var X=j[q],Z=0;Z<F.length;Z++)if(y(X,F[Z]))return null;var ee=JSON.stringify(F,function(ce,V){var Ee=le(V);return Ee==="symbol"?String(V):V});return new f("Invalid "+J+" `"+K+"` of value `"+String(X)+"` "+("supplied to `"+Y+"`, expected one of "+ee+"."))}return g(I)}function N(F){function I(j,q,Y,J,K){if(typeof F!="function")return new f("Property `"+K+"` of component `"+Y+"` has invalid PropType notation inside objectOf.");var X=j[q],Z=G(X);if(Z!=="object")return new f("Invalid "+J+" `"+K+"` of type "+("`"+Z+"` supplied to `"+Y+"`, expected an object."));for(var ee in X)if(n(X,ee)){var Q=F(X,ee,Y,J,K+"."+ee,r);if(Q instanceof Error)return Q}return null}return g(I)}function L(F){if(!Array.isArray(F))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var I=0;I<F.length;I++){var j=F[I];if(typeof j!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ge(j)+" at index "+I+"."),o}function q(Y,J,K,X,Z){for(var ee=[],Q=0;Q<F.length;Q++){var ce=F[Q],V=ce(Y,J,K,X,Z,r);if(V==null)return null;V.data&&n(V.data,"expectedType")&&ee.push(V.data.expectedType)}var Ee=ee.length>0?", expected one of type ["+ee.join(", ")+"]":"";return new f("Invalid "+X+" `"+Z+"` supplied to "+("`"+K+"`"+Ee+"."))}return g(q)}function z(){function F(I,j,q,Y,J){return $(I[j])?null:new f("Invalid "+Y+" `"+J+"` supplied to "+("`"+q+"`, expected a ReactNode."))}return g(F)}function H(F,I,j,q,Y){return new f((F||"React class")+": "+I+" type `"+j+"."+q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Y+"`.")}function p(F){function I(j,q,Y,J,K){var X=j[q],Z=G(X);if(Z!=="object")return new f("Invalid "+J+" `"+K+"` of type `"+Z+"` "+("supplied to `"+Y+"`, expected `object`."));for(var ee in F){var Q=F[ee];if(typeof Q!="function")return H(Y,J,K,ee,le(Q));var ce=Q(X,ee,Y,J,K+"."+ee,r);if(ce)return ce}return null}return g(I)}function _(F){function I(j,q,Y,J,K){var X=j[q],Z=G(X);if(Z!=="object")return new f("Invalid "+J+" `"+K+"` of type `"+Z+"` "+("supplied to `"+Y+"`, expected `object`."));var ee=e({},j[q],F);for(var Q in ee){var ce=F[Q];if(n(F,Q)&&typeof ce!="function")return H(Y,J,K,Q,le(ce));if(!ce)return new f("Invalid "+J+" `"+K+"` key `"+Q+"` supplied to `"+Y+"`.\nBad object: "+JSON.stringify(j[q],null," ")+`
5
+ Valid keys: `+JSON.stringify(Object.keys(F),null," "));var V=ce(X,Q,Y,J,K+"."+Q,r);if(V)return V}return null}return g(I)}function $(F){switch(typeof F){case"number":case"string":case"undefined":return!0;case"boolean":return!F;case"object":if(Array.isArray(F))return F.every($);if(F===null||a(F))return!0;var I=u(F);if(I){var j=I.call(F),q;if(I!==F.entries){for(;!(q=j.next()).done;)if(!$(q.value))return!1}else for(;!(q=j.next()).done;){var Y=q.value;if(Y&&!$(Y[1]))return!1}}else return!1;return!0;default:return!1}}function R(F,I){return F==="symbol"?!0:I?I["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&I instanceof Symbol:!1}function G(F){var I=typeof F;return Array.isArray(F)?"array":F instanceof RegExp?"object":R(I,F)?"symbol":I}function le(F){if(typeof F>"u"||F===null)return""+F;var I=G(F);if(I==="object"){if(F instanceof Date)return"date";if(F instanceof RegExp)return"regexp"}return I}function ge(F){var I=le(F);switch(I){case"array":case"object":return"an "+I;case"boolean":case"date":case"regexp":return"a "+I;default:return I}}function Se(F){return!F.constructor||!F.constructor.name?h:F.constructor.name}return m.checkPropTypes=i,m.resetWarningCache=i.resetWarningCache,m.PropTypes=m,m},bn}var Sn,Bi;function oa(){if(Bi)return Sn;Bi=1;var t=gn();function e(){}function r(){}return r.resetWarningCache=e,Sn=function(){function n(o,a,c,d,l,u){if(u!==t){var h=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 h.name="Invariant Violation",h}}n.isRequired=n;function i(){return n}var s={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:e};return s.PropTypes=s,s},Sn}var Ri;function aa(){if(Ri)return fr.exports;if(Ri=1,process.env.NODE_ENV!=="production"){var t=Fi(),e=!0;fr.exports=sa()(t.isElement,e)}else fr.exports=oa()();return fr.exports}var la=aa();const te=oi(la);function Wi(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=Wi(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function zi(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=Wi(t))&&(n&&(n+=" "),n+=e);return n}function ca(t,e,r=void 0){const n={};for(const i in t){const s=t[i];let o="",a=!0;for(let c=0;c<s.length;c+=1){const d=s[c];d&&(o+=(a===!0?"":" ")+e(d),a=!1,r&&r[d]&&(o+=" "+r[d]))}n[i]=o}return n}var pr={exports:{}},oe={};var ji;function ua(){if(ji)return oe;ji=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),l=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");function y(f){if(typeof f=="object"&&f!==null){var g=f.$$typeof;switch(g){case t:switch(f=f.type,f){case r:case i:case n:case c:case d:case h:return f;default:switch(f=f&&f.$$typeof,f){case o:case a:case u:case l:return f;case s:return f;default:return g}}case e:return g}}}return oe.ContextConsumer=s,oe.ContextProvider=o,oe.Element=t,oe.ForwardRef=a,oe.Fragment=r,oe.Lazy=u,oe.Memo=l,oe.Portal=e,oe.Profiler=i,oe.StrictMode=n,oe.Suspense=c,oe.SuspenseList=d,oe.isContextConsumer=function(f){return y(f)===s},oe.isContextProvider=function(f){return y(f)===o},oe.isElement=function(f){return typeof f=="object"&&f!==null&&f.$$typeof===t},oe.isForwardRef=function(f){return y(f)===a},oe.isFragment=function(f){return y(f)===r},oe.isLazy=function(f){return y(f)===u},oe.isMemo=function(f){return y(f)===l},oe.isPortal=function(f){return y(f)===e},oe.isProfiler=function(f){return y(f)===i},oe.isStrictMode=function(f){return y(f)===n},oe.isSuspense=function(f){return y(f)===c},oe.isSuspenseList=function(f){return y(f)===d},oe.isValidElementType=function(f){return typeof f=="string"||typeof f=="function"||f===r||f===i||f===n||f===c||f===d||typeof f=="object"&&f!==null&&(f.$$typeof===u||f.$$typeof===l||f.$$typeof===o||f.$$typeof===s||f.$$typeof===a||f.$$typeof===m||f.getModuleId!==void 0)},oe.typeOf=y,oe}var ae={};var Ui;function da(){return Ui||(Ui=1,process.env.NODE_ENV!=="production"&&(function(){function t(f){if(typeof f=="object"&&f!==null){var g=f.$$typeof;switch(g){case e:switch(f=f.type,f){case n:case s:case i:case d:case l:case m:return f;default:switch(f=f&&f.$$typeof,f){case a:case c:case h:case u:return f;case o:return f;default:return g}}case r:return g}}}var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),y=Symbol.for("react.client.reference");ae.ContextConsumer=o,ae.ContextProvider=a,ae.Element=e,ae.ForwardRef=c,ae.Fragment=n,ae.Lazy=h,ae.Memo=u,ae.Portal=r,ae.Profiler=s,ae.StrictMode=i,ae.Suspense=d,ae.SuspenseList=l,ae.isContextConsumer=function(f){return t(f)===o},ae.isContextProvider=function(f){return t(f)===a},ae.isElement=function(f){return typeof f=="object"&&f!==null&&f.$$typeof===e},ae.isForwardRef=function(f){return t(f)===c},ae.isFragment=function(f){return t(f)===n},ae.isLazy=function(f){return t(f)===h},ae.isMemo=function(f){return t(f)===u},ae.isPortal=function(f){return t(f)===r},ae.isProfiler=function(f){return t(f)===s},ae.isStrictMode=function(f){return t(f)===i},ae.isSuspense=function(f){return t(f)===d},ae.isSuspenseList=function(f){return t(f)===l},ae.isValidElementType=function(f){return typeof f=="string"||typeof f=="function"||f===n||f===s||f===i||f===d||f===l||typeof f=="object"&&f!==null&&(f.$$typeof===h||f.$$typeof===u||f.$$typeof===a||f.$$typeof===o||f.$$typeof===c||f.$$typeof===y||f.getModuleId!==void 0)},ae.typeOf=t})()),ae}var Gi;function fa(){return Gi||(Gi=1,process.env.NODE_ENV==="production"?pr.exports=ua():pr.exports=da()),pr.exports}var mr=fa();function We(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Hi(t){if(Ve.isValidElement(t)||mr.isValidElementType(t)||!We(t))return t;const e={};return Object.keys(t).forEach(r=>{e[r]=Hi(t[r])}),e}function Te(t,e,r={clone:!0}){const n=r.clone?{...t}:t;return We(t)&&We(e)&&Object.keys(e).forEach(i=>{Ve.isValidElement(e[i])||mr.isValidElementType(e[i])?n[i]=e[i]:We(e[i])&&Object.prototype.hasOwnProperty.call(t,i)&&We(t[i])?n[i]=Te(t[i],e[i],r):r.clone?n[i]=We(e[i])?Hi(e[i]):e[i]:n[i]=e[i]}),n}function Vt(t,e){return e?Te(t,e,{clone:!1}):t}const Qe=process.env.NODE_ENV!=="production"?te.oneOfType([te.number,te.string,te.object,te.array]):{};function Yi(t,e){if(!t.containerQueries)return e;const r=Object.keys(e).filter(n=>n.startsWith("@container")).sort((n,i)=>{const s=/min-width:\s*([0-9.]+)/;return+(n.match(s)?.[1]||0)-+(i.match(s)?.[1]||0)});return r.length?r.reduce((n,i)=>{const s=e[i];return delete n[i],n[i]=s,n},{...e}):e}function ha(t,e){return e==="@"||e.startsWith("@")&&(t.some(r=>e.startsWith(`@${r}`))||!!e.match(/^@\d/))}function pa(t,e){const r=e.match(/^@([^/]+)?\/?(.+)?$/);if(!r){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${e})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
6
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Xe(18,`(${e})`));return null}const[,n,i]=r,s=Number.isNaN(+n)?n||0:+n;return t.containerQueries(i).up(s)}function ma(t){const e=(s,o)=>s.replace("@media",o?`@container ${o}`:"@container");function r(s,o){s.up=(...a)=>e(t.breakpoints.up(...a),o),s.down=(...a)=>e(t.breakpoints.down(...a),o),s.between=(...a)=>e(t.breakpoints.between(...a),o),s.only=(...a)=>e(t.breakpoints.only(...a),o),s.not=(...a)=>{const c=e(t.breakpoints.not(...a),o);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=s=>(r(n,s),n);return r(i),{...t,containerQueries:i}}const gr={xs:0,sm:600,md:900,lg:1200,xl:1536},qi={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${gr[t]}px)`},ga={containerQueries:t=>({up:e=>{let r=typeof e=="number"?e:gr[e]||e;return typeof r=="number"&&(r=`${r}px`),t?`@container ${t} (min-width:${r})`:`@container (min-width:${r})`}})};function ze(t,e,r){const n=t.theme||{};if(Array.isArray(e)){const s=n.breakpoints||qi;return e.reduce((o,a,c)=>(o[s.up(s.keys[c])]=r(e[c]),o),{})}if(typeof e=="object"){const s=n.breakpoints||qi;return Object.keys(e).reduce((o,a)=>{if(ha(s.keys,a)){const c=pa(n.containerQueries?n:ga,a);c&&(o[c]=r(e[a],a))}else if(Object.keys(s.values||gr).includes(a)){const c=s.up(a);o[c]=r(e[a],a)}else{const c=a;o[c]=e[c]}return o},{})}return r(e)}function ya(t={}){return t.keys?.reduce((r,n)=>{const i=t.up(n);return r[i]={},r},{})||{}}function Ki(t,e){return t.reduce((r,n)=>{const i=r[n];return(!i||Object.keys(i).length===0)&&delete r[n],r},e)}function yr(t,e,r=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&r){const n=`vars.${e}`.split(".").reduce((i,s)=>i&&i[s]?i[s]:null,t);if(n!=null)return n}return e.split(".").reduce((n,i)=>n&&n[i]!=null?n[i]:null,t)}function vr(t,e,r,n=r){let i;return typeof t=="function"?i=t(r):Array.isArray(t)?i=t[r]||n:i=yr(t,r)||n,e&&(i=e(i,n,t)),i}function me(t){const{prop:e,cssProperty:r=t.prop,themeKey:n,transform:i}=t,s=o=>{if(o[e]==null)return null;const a=o[e],c=o.theme,d=yr(c,n)||{};return ze(o,a,u=>{let h=vr(d,i,u);return u===h&&typeof u=="string"&&(h=vr(d,i,`${e}${u==="default"?"":ot(u)}`,u)),r===!1?h:{[r]:h}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[e]:Qe}:{},s.filterProps=[e],s}function va(t){const e={};return r=>(e[r]===void 0&&(e[r]=t(r)),e[r])}const ba={m:"margin",p:"padding"},Sa={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Xi={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Ea=va(t=>{if(t.length>2)if(Xi[t])t=Xi[t];else return[t];const[e,r]=t.split(""),n=ba[e],i=Sa[r]||"";return Array.isArray(i)?i.map(s=>n+s):[n+i]}),br=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Sr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Ca=[...br,...Sr];function Pt(t,e,r,n){const i=yr(t,e,!0)??r;return typeof i=="number"||typeof i=="string"?s=>typeof s=="string"?s:(process.env.NODE_ENV,typeof i=="string"?i.startsWith("var(")&&s===0?0:i.startsWith("var(")&&s===1?i:`calc(${s} * ${i})`:i*s):Array.isArray(i)?s=>{if(typeof s=="string")return s;const o=Math.abs(s);process.env.NODE_ENV!=="production"&&Number.isInteger(o)&&o>i.length-1;const a=i[o];return s>=0?a:typeof a=="number"?-a:typeof a=="string"&&a.startsWith("var(")?`calc(-1 * ${a})`:`-${a}`}:typeof i=="function"?i:(process.env.NODE_ENV,()=>{})}function En(t){return Pt(t,"spacing",8,"spacing")}function Dt(t,e){return typeof e=="string"||e==null?e:t(e)}function wa(t,e){return r=>t.reduce((n,i)=>(n[i]=Dt(e,r),n),{})}function xa(t,e,r,n){if(!e.includes(r))return null;const i=Ea(r),s=wa(i,n),o=t[r];return ze(t,o,s)}function Qi(t,e){const r=En(t.theme);return Object.keys(t).map(n=>xa(t,e,n,r)).reduce(Vt,{})}function fe(t){return Qi(t,br)}fe.propTypes=process.env.NODE_ENV!=="production"?br.reduce((t,e)=>(t[e]=Qe,t),{}):{},fe.filterProps=br;function he(t){return Qi(t,Sr)}he.propTypes=process.env.NODE_ENV!=="production"?Sr.reduce((t,e)=>(t[e]=Qe,t),{}):{},he.filterProps=Sr,process.env.NODE_ENV!=="production"&&Ca.reduce((t,e)=>(t[e]=Qe,t),{});function Er(...t){const e=t.reduce((n,i)=>(i.filterProps.forEach(s=>{n[s]=i}),n),{}),r=n=>Object.keys(n).reduce((i,s)=>e[s]?Vt(i,e[s](n)):i,{});return r.propTypes=process.env.NODE_ENV!=="production"?t.reduce((n,i)=>Object.assign(n,i.propTypes),{}):{},r.filterProps=t.reduce((n,i)=>n.concat(i.filterProps),[]),r}function ke(t){return typeof t!="number"?t:`${t}px solid`}function $e(t,e){return me({prop:t,themeKey:"borders",transform:e})}const Ta=$e("border",ke),Oa=$e("borderTop",ke),Aa=$e("borderRight",ke),Ma=$e("borderBottom",ke),_a=$e("borderLeft",ke),ka=$e("borderColor"),$a=$e("borderTopColor"),Fa=$e("borderRightColor"),Ia=$e("borderBottomColor"),Va=$e("borderLeftColor"),Pa=$e("outline",ke),Da=$e("outlineColor"),Cr=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=Pt(t.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:Dt(e,n)});return ze(t,t.borderRadius,r)}return null};Cr.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Qe}:{},Cr.filterProps=["borderRadius"],Er(Ta,Oa,Aa,Ma,_a,ka,$a,Fa,Ia,Va,Cr,Pa,Da);const wr=t=>{if(t.gap!==void 0&&t.gap!==null){const e=Pt(t.theme,"spacing",8,"gap"),r=n=>({gap:Dt(e,n)});return ze(t,t.gap,r)}return null};wr.propTypes=process.env.NODE_ENV!=="production"?{gap:Qe}:{},wr.filterProps=["gap"];const xr=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=Pt(t.theme,"spacing",8,"columnGap"),r=n=>({columnGap:Dt(e,n)});return ze(t,t.columnGap,r)}return null};xr.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Qe}:{},xr.filterProps=["columnGap"];const Tr=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=Pt(t.theme,"spacing",8,"rowGap"),r=n=>({rowGap:Dt(e,n)});return ze(t,t.rowGap,r)}return null};Tr.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Qe}:{},Tr.filterProps=["rowGap"];const La=me({prop:"gridColumn"}),Na=me({prop:"gridRow"}),Ba=me({prop:"gridAutoFlow"}),Ra=me({prop:"gridAutoColumns"}),Wa=me({prop:"gridAutoRows"}),za=me({prop:"gridTemplateColumns"}),ja=me({prop:"gridTemplateRows"}),Ua=me({prop:"gridTemplateAreas"}),Ga=me({prop:"gridArea"});Er(wr,xr,Tr,La,Na,Ba,Ra,Wa,za,ja,Ua,Ga);function gt(t,e){return e==="grey"?e:t}const Ha=me({prop:"color",themeKey:"palette",transform:gt}),Ya=me({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:gt}),qa=me({prop:"backgroundColor",themeKey:"palette",transform:gt});Er(Ha,Ya,qa);function Oe(t){return t<=1&&t!==0?`${t*100}%`:t}const Ka=me({prop:"width",transform:Oe}),Cn=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=r=>{const n=t.theme?.breakpoints?.values?.[r]||gr[r];return n?t.theme?.breakpoints?.unit!=="px"?{maxWidth:`${n}${t.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:Oe(r)}};return ze(t,t.maxWidth,e)}return null};Cn.filterProps=["maxWidth"];const Xa=me({prop:"minWidth",transform:Oe}),Qa=me({prop:"height",transform:Oe}),Za=me({prop:"maxHeight",transform:Oe}),Ja=me({prop:"minHeight",transform:Oe});me({prop:"size",cssProperty:"width",transform:Oe}),me({prop:"size",cssProperty:"height",transform:Oe});const el=me({prop:"boxSizing"});Er(Ka,Cn,Xa,Qa,Za,Ja,el);const Or={border:{themeKey:"borders",transform:ke},borderTop:{themeKey:"borders",transform:ke},borderRight:{themeKey:"borders",transform:ke},borderBottom:{themeKey:"borders",transform:ke},borderLeft:{themeKey:"borders",transform:ke},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:ke},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Cr},color:{themeKey:"palette",transform:gt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:gt},backgroundColor:{themeKey:"palette",transform:gt},p:{style:he},pt:{style:he},pr:{style:he},pb:{style:he},pl:{style:he},px:{style:he},py:{style:he},padding:{style:he},paddingTop:{style:he},paddingRight:{style:he},paddingBottom:{style:he},paddingLeft:{style:he},paddingX:{style:he},paddingY:{style:he},paddingInline:{style:he},paddingInlineStart:{style:he},paddingInlineEnd:{style:he},paddingBlock:{style:he},paddingBlockStart:{style:he},paddingBlockEnd:{style:he},m:{style:fe},mt:{style:fe},mr:{style:fe},mb:{style:fe},ml:{style:fe},mx:{style:fe},my:{style:fe},margin:{style:fe},marginTop:{style:fe},marginRight:{style:fe},marginBottom:{style:fe},marginLeft:{style:fe},marginX:{style:fe},marginY:{style:fe},marginInline:{style:fe},marginInlineStart:{style:fe},marginInlineEnd:{style:fe},marginBlock:{style:fe},marginBlockStart:{style:fe},marginBlockEnd:{style:fe},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:wr},rowGap:{style:Tr},columnGap:{style:xr},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Oe},maxWidth:{style:Cn},minWidth:{transform:Oe},height:{transform:Oe},maxHeight:{transform:Oe},minHeight:{transform:Oe},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 tl(...t){const e=t.reduce((n,i)=>n.concat(Object.keys(i)),[]),r=new Set(e);return t.every(n=>r.size===Object.keys(n).length)}function rl(t,e){return typeof t=="function"?t(e):t}function nl(){function t(r,n,i,s){const o={[r]:n,theme:i},a=s[r];if(!a)return{[r]:n};const{cssProperty:c=r,themeKey:d,transform:l,style:u}=a;if(n==null)return null;if(d==="typography"&&n==="inherit")return{[r]:n};const h=yr(i,d)||{};return u?u(o):ze(o,n,y=>{let f=vr(h,l,y);return y===f&&typeof y=="string"&&(f=vr(h,l,`${r}${y==="default"?"":ot(y)}`,y)),c===!1?f:{[c]:f}})}function e(r){const{sx:n,theme:i={},nested:s}=r||{};if(!n)return null;const o=i.unstable_sxConfig??Or;function a(c){let d=c;if(typeof c=="function")d=c(i);else if(typeof c!="object")return c;if(!d)return null;const l=ya(i.breakpoints),u=Object.keys(l);let h=l;return Object.keys(d).forEach(m=>{const y=rl(d[m],i);if(y!=null)if(typeof y=="object")if(o[m])h=Vt(h,t(m,y,i,o));else{const f=ze({theme:i},y,g=>({[m]:g}));tl(f,y)?h[m]=e({sx:y,theme:i,nested:!0}):h=Vt(h,f)}else h=Vt(h,t(m,y,i,o))}),!s&&i.modularCssLayers?{"@layer sx":Yi(i,Ki(u,h))}:Yi(i,Ki(u,h))}return Array.isArray(n)?n.map(a):a(n)}return e}const yt=nl();yt.filterProps=["sx"];function il(t){for(var e=0,r,n=0,i=t.length;i>=4;++n,i-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var sl={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 ol(t){var e=Object.create(null);return function(r){return e[r]===void 0&&(e[r]=t(r)),e[r]}}var al=/[A-Z]|^ms/g,ll=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Zi=function(e){return e.charCodeAt(1)===45},Ji=function(e){return e!=null&&typeof e!="boolean"},wn=ol(function(t){return Zi(t)?t:t.replace(al,"-$&").toLowerCase()}),es=function(e,r){switch(e){case"animation":case"animationName":if(typeof r=="string")return r.replace(ll,function(n,i,s){return Ze={name:i,styles:s,next:Ze},i})}return sl[e]!==1&&!Zi(e)&&typeof r=="number"&&r!==0?r+"px":r};function Ar(t,e,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 Ze={name:i.name,styles:i.styles,next:Ze},i.name;var s=r;if(s.styles!==void 0){var o=s.next;if(o!==void 0)for(;o!==void 0;)Ze={name:o.name,styles:o.styles,next:Ze},o=o.next;var a=s.styles+";";return a}return cl(t,e,r)}}var c=r;return c}function cl(t,e,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=Ar(t,e,r[i])+";";else for(var s in r){var o=r[s];if(typeof o!="object"){var a=o;Ji(a)&&(n+=wn(s)+":"+es(s,a)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&e==null)for(var c=0;c<o.length;c++)Ji(o[c])&&(n+=wn(s)+":"+es(s,o[c])+";");else{var d=Ar(t,e,o);switch(s){case"animation":case"animationName":{n+=wn(s)+":"+d+";";break}default:n+=s+"{"+d+"}"}}}return n}var ts=/label:\s*([^\s;{]+)\s*(;|$)/g,Ze;function ul(t,e,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var n=!0,i="";Ze=void 0;var s=t[0];if(s==null||s.raw===void 0)n=!1,i+=Ar(r,e,s);else{var o=s;i+=o[0]}for(var a=1;a<t.length;a++)if(i+=Ar(r,e,t[a]),n){var c=s;i+=c[a]}ts.lastIndex=0;for(var d="",l;(l=ts.exec(i))!==null;)d+="-"+l[1];var u=il(i)+d;return{name:u,styles:i,next:Ze}}function dl(t,e){const r=Vs(t,e);return process.env.NODE_ENV!=="production"?(...n)=>{const i=typeof t=="string"?`"${t}"`:"component";return n.length===0||n.some(s=>s===void 0),r(...n)}:r}function fl(t,e){Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))}const rs=[];function at(t){return rs[0]=t,ul(rs)}const hl=t=>{const e=Object.keys(t).map(r=>({key:r,val:t[r]}))||[];return e.sort((r,n)=>r.val-n.val),e.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function pl(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...i}=t,s=hl(e),o=Object.keys(s);function a(h){return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${r})`}function c(h){return`@media (max-width:${(typeof e[h]=="number"?e[h]:h)-n/100}${r})`}function d(h,m){const y=o.indexOf(m);return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${r}) and (max-width:${(y!==-1&&typeof e[o[y]]=="number"?e[o[y]]:m)-n/100}${r})`}function l(h){return o.indexOf(h)+1<o.length?d(h,o[o.indexOf(h)+1]):a(h)}function u(h){const m=o.indexOf(h);return m===0?a(o[1]):m===o.length-1?c(o[m]):d(h,o[o.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:o,values:s,up:a,down:c,between:d,only:l,not:u,unit:r,...i}}const ml={borderRadius:4};function ns(t=8,e=En({spacing:t})){if(t.mui)return t;const r=(...n)=>(process.env.NODE_ENV!=="production"&&n.length<=4,(n.length===0?[1]:n).map(s=>{const o=e(s);return typeof o=="number"?`${o}px`:o}).join(" "));return r.mui=!0,r}function gl(t,e){const r=this;if(r.vars){if(!r.colorSchemes?.[t]||typeof r.getColorSchemeSelector!="function")return{};let n=r.getColorSchemeSelector(t);return n==="&"?e:((n.includes("data-")||n.includes("."))&&(n=`*:where(${n.replace(/\s*&$/,"")}) &`),{[n]:e})}return r.palette.mode===t?e:{}}function is(t={},...e){const{breakpoints:r={},palette:n={},spacing:i,shape:s={},...o}=t,a=pl(r),c=ns(i);let d=Te({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:c,shape:{...ml,...s}},o);return d=ma(d),d.applyStyles=gl,d=e.reduce((l,u)=>Te(l,u),d),d.unstable_sxConfig={...Or,...o?.unstable_sxConfig},d.unstable_sx=function(u){return yt({sx:u,theme:this})},d}const yl={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 xn(t,e,r="Mui"){const n=yl[e];return n?`${r}-${n}`:`${ea.generate(t)}-${e}`}function vl(t,e,r="Mui"){const n={};return e.forEach(i=>{n[i]=xn(t,i,r)}),n}function ss(t,e=""){return t.displayName||t.name||e}function os(t,e,r){const n=ss(e);return t.displayName||(n!==""?`${r}(${n})`:r)}function bl(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return ss(t,"Component");if(typeof t=="object")switch(t.$$typeof){case mr.ForwardRef:return os(t,t.render,"ForwardRef");case mr.Memo:return os(t,t.type,"memo");default:return}}}function as(t){const{variants:e,...r}=t,n={variants:e,style:at(r),isProcessed:!0};return n.style===r||e&&e.forEach(i=>{typeof i.style!="function"&&(i.style=at(i.style))}),n}const Sl=is();function Tn(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function lt(t,e){return e&&t&&typeof t=="object"&&t.styles&&!t.styles.startsWith("@layer")&&(t.styles=`@layer ${e}{${String(t.styles)}}`),t}function El(t){return t?(e,r)=>r[t]:null}function Cl(t,e,r){t.theme=Ol(t.theme)?r:t.theme[e]||t.theme}function Mr(t,e,r){const n=typeof e=="function"?e(t):e;if(Array.isArray(n))return n.flatMap(i=>Mr(t,i,r));if(Array.isArray(n?.variants)){let i;if(n.isProcessed)i=r?lt(n.style,r):n.style;else{const{variants:s,...o}=n;i=r?lt(at(o),r):o}return ls(t,n.variants,[i],r)}return n?.isProcessed?r?lt(at(n.style),r):n.style:r?lt(at(n),r):n}function ls(t,e,r=[],n=void 0){let i;e:for(let s=0;s<e.length;s+=1){const o=e[s];if(typeof o.props=="function"){if(i??={...t,...t.ownerState,ownerState:t.ownerState},!o.props(i))continue}else for(const a in o.props)if(t[a]!==o.props[a]&&t.ownerState?.[a]!==o.props[a])continue e;typeof o.style=="function"?(i??={...t,...t.ownerState,ownerState:t.ownerState},r.push(n?lt(at(o.style(i)),n):o.style(i))):r.push(n?lt(at(o.style),n):o.style)}return r}function wl(t={}){const{themeId:e,defaultTheme:r=Sl,rootShouldForwardProp:n=Tn,slotShouldForwardProp:i=Tn}=t;function s(a){Cl(a,e,r)}return(a,c={})=>{fl(a,M=>M.filter(B=>B!==yt));const{name:d,slot:l,skipVariantsResolver:u,skipSx:h,overridesResolver:m=El(cs(l)),...y}=c,f=d&&d.startsWith("Mui")||l?"components":"custom",g=u!==void 0?u:l&&l!=="Root"&&l!=="root"||!1,b=h||!1;let T=Tn;l==="Root"||l==="root"?T=n:l?T=i:Al(a)&&(T=void 0);const A=dl(a,{shouldForwardProp:T,label:Tl(d,l),...y}),x=M=>{if(M.__emotion_real===M)return M;if(typeof M=="function")return function(N){return Mr(N,M,N.theme.modularCssLayers?f:void 0)};if(We(M)){const B=as(M);return function(L){return B.variants?Mr(L,B,L.theme.modularCssLayers?f:void 0):L.theme.modularCssLayers?lt(B.style,f):B.style}}return M},E=(...M)=>{const B=[],N=M.map(x),L=[];if(B.push(s),d&&m&&L.push(function(_){const R=_.theme.components?.[d]?.styleOverrides;if(!R)return null;const G={};for(const le in R)G[le]=Mr(_,R[le],_.theme.modularCssLayers?"theme":void 0);return m(_,G)}),d&&!g&&L.push(function(_){const R=_.theme?.components?.[d]?.variants;return R?ls(_,R,[],_.theme.modularCssLayers?"theme":void 0):null}),b||L.push(yt),Array.isArray(N[0])){const p=N.shift(),_=new Array(B.length).fill(""),$=new Array(L.length).fill("");let R;R=[..._,...p,...$],R.raw=[..._,...p.raw,...$],B.unshift(R)}const z=[...B,...N,...L],H=A(...z);return a.muiName&&(H.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(H.displayName=xl(d,l,a)),H};return A.withConfig&&(E.withConfig=A.withConfig),E}}function xl(t,e,r){return t?`${t}${ot(e||"")}`:`Styled(${bl(r)})`}function Tl(t,e){let r;return process.env.NODE_ENV!=="production"&&t&&(r=`${t}-${cs(e||"Root")}`),r}function Ol(t){for(const e in t)return!1;return!0}function Al(t){return typeof t=="string"&&t.charCodeAt(0)>96}function cs(t){return t&&t.charAt(0).toLowerCase()+t.slice(1)}function On(t,e,r=!1){const n={...e};for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)){const s=i;if(s==="components"||s==="slots")n[s]={...t[s],...n[s]};else if(s==="componentsProps"||s==="slotProps"){const o=t[s],a=e[s];if(!a)n[s]=o||{};else if(!o)n[s]=a;else{n[s]={...a};for(const c in o)if(Object.prototype.hasOwnProperty.call(o,c)){const d=c;n[s][d]=On(o[d],a[d],r)}}}else s==="className"&&r&&e.className?n.className=zi(t?.className,e?.className):s==="style"&&r&&e.style?n.style={...t?.style,...e?.style}:n[s]===void 0&&(n[s]=t[s])}return n}function Ml(t,e=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,r))}function An(t,e=0,r=1){return process.env.NODE_ENV!=="production"&&(t<e||t>r),Ml(t,e,r)}function _l(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let r=t.match(e);return r&&r[0].length===1&&(r=r.map(n=>n+n)),process.env.NODE_ENV!=="production"&&(t.length,t.trim().length),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 Je(t){if(t.type)return t;if(t.charAt(0)==="#")return Je(_l(t));const e=t.indexOf("("),r=t.substring(0,e);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${t}\` color.
7
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Xe(9,t));let n=t.substring(e+1,t.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.
8
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Xe(10,i))}else n=n.split(",");return n=n.map(s=>parseFloat(s)),{type:r,values:n,colorSpace:i}}const kl=t=>{const e=Je(t);return e.values.slice(0,3).map((r,n)=>e.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},Lt=(t,e)=>{try{return kl(t)}catch{return e&&process.env.NODE_ENV,t}};function _r(t){const{type:e,colorSpace:r}=t;let{values:n}=t;return e.includes("rgb")?n=n.map((i,s)=>s<3?parseInt(i,10):i):e.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),e.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${e}(${n})`}function us(t){t=Je(t);const{values:e}=t,r=e[0],n=e[1]/100,i=e[2]/100,s=n*Math.min(i,1-i),o=(d,l=(d+r/30)%12)=>i-s*Math.max(Math.min(l-3,9-l,1),-1);let a="rgb";const c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return t.type==="hsla"&&(a+="a",c.push(e[3])),_r({type:a,values:c})}function Mn(t){t=Je(t);let e=t.type==="hsl"||t.type==="hsla"?Je(us(t)).values:t.values;return e=e.map(r=>(t.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function ds(t,e){const r=Mn(t),n=Mn(e);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function fs(t,e){return t=Je(t),e=An(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,_r(t)}function ct(t,e,r){try{return fs(t,e)}catch{return r&&process.env.NODE_ENV,t}}function kr(t,e){if(t=Je(t),e=An(e),t.type.includes("hsl"))t.values[2]*=1-e;else if(t.type.includes("rgb")||t.type.includes("color"))for(let r=0;r<3;r+=1)t.values[r]*=1-e;return _r(t)}function ie(t,e,r){try{return kr(t,e)}catch{return r&&process.env.NODE_ENV,t}}function $r(t,e){if(t=Je(t),e=An(e),t.type.includes("hsl"))t.values[2]+=(100-t.values[2])*e;else if(t.type.includes("rgb"))for(let r=0;r<3;r+=1)t.values[r]+=(255-t.values[r])*e;else if(t.type.includes("color"))for(let r=0;r<3;r+=1)t.values[r]+=(1-t.values[r])*e;return _r(t)}function se(t,e,r){try{return $r(t,e)}catch{return r&&process.env.NODE_ENV,t}}function $l(t,e=.15){return Mn(t)>.5?kr(t,e):$r(t,e)}function Fr(t,e,r){try{return $l(t,e)}catch{return t}}const Fl=Ve.createContext(void 0);process.env.NODE_ENV!=="production"&&(te.node,te.object);function Il(t){const{theme:e,name:r,props:n}=t;if(!e||!e.components||!e.components[r])return n;const i=e.components[r];return i.defaultProps?On(i.defaultProps,n,e.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?On(i,n,e.components.mergeClassNameAndStyle):n}function Vl({props:t,name:e}){const r=Ve.useContext(Fl);return Il({props:t,name:e,theme:{components:r}})}const hs={theme:void 0};function Pl(t){let e,r;return function(i){let s=e;return(s===void 0||i.theme!==r)&&(hs.theme=i.theme,s=as(t(hs)),e=s,r=i.theme),s}}function Dl(t=""){function e(...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(--${t?`${t}-`:""}${i}${e(...n.slice(1))})`:`, ${i}`}return(n,...i)=>`var(--${t?`${t}-`:""}${n}${e(...i)})`}const ps=(t,e,r,n=[])=>{let i=t;e.forEach((s,o)=>{o===e.length-1?Array.isArray(i)?i[Number(s)]=r:i&&typeof i=="object"&&(i[s]=r):i&&typeof i=="object"&&(i[s]||(i[s]=n.includes(s)?[]:{}),i=i[s])})},Ll=(t,e,r)=>{function n(i,s=[],o=[]){Object.entries(i).forEach(([a,c])=>{(!r||r&&!r([...s,a]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?n(c,[...s,a],Array.isArray(c)?[...o,a]:o):e([...s,a],c,o))})}n(t)},Nl=(t,e)=>typeof e=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>t.includes(n))||t[t.length-1].toLowerCase().includes("opacity")?e:`${e}px`:e;function _n(t,e){const{prefix:r,shouldSkipGeneratingVar:n}=e||{},i={},s={},o={};return Ll(t,(a,c,d)=>{if((typeof c=="string"||typeof c=="number")&&(!n||!n(a,c))){const l=`--${r?`${r}-`:""}${a.join("-")}`,u=Nl(a,c);Object.assign(i,{[l]:u}),ps(s,a,`var(${l})`,d),ps(o,a,`var(${l}, ${u})`,d)}},a=>a[0]==="vars"),{css:i,vars:s,varsWithDefaults:o}}function Bl(t,e={}){const{getSelector:r=b,disableCssColorScheme:n,colorSchemeSelector:i,enableContrastVars:s}=e,{colorSchemes:o={},components:a,defaultColorScheme:c="light",...d}=t,{vars:l,css:u,varsWithDefaults:h}=_n(d,e);let m=h;const y={},{[c]:f,...g}=o;if(Object.entries(g||{}).forEach(([x,E])=>{const{vars:M,css:B,varsWithDefaults:N}=_n(E,e);m=Te(m,N),y[x]={css:B,vars:M}}),f){const{css:x,vars:E,varsWithDefaults:M}=_n(f,e);m=Te(m,M),y[c]={css:x,vars:E}}function b(x,E){let M=i;if(i==="class"&&(M=".%s"),i==="data"&&(M="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(M=`[${i}="%s"]`),x){if(M==="media")return t.defaultColorScheme===x?":root":{[`@media (prefers-color-scheme: ${o[x]?.palette?.mode||x})`]:{":root":E}};if(M)return t.defaultColorScheme===x?`:root, ${M.replace("%s",String(x))}`:M.replace("%s",String(x))}return":root"}return{vars:m,generateThemeVars:()=>{let x={...l};return Object.entries(y).forEach(([,{vars:E}])=>{x=Te(x,E)}),x},generateStyleSheets:()=>{const x=[],E=t.defaultColorScheme||"light";function M(L,z){Object.keys(z).length&&x.push(typeof L=="string"?{[L]:{...z}}:L)}M(r(void 0,{...u}),u);const{[E]:B,...N}=y;if(B){const{css:L}=B,z=o[E]?.palette?.mode,H=!n&&z?{colorScheme:z,...L}:{...L};M(r(E,{...H}),H)}return Object.entries(N).forEach(([L,{css:z}])=>{const H=o[L]?.palette?.mode,p=!n&&H?{colorScheme:H,...z}:{...z};M(r(L,{...p}),p)}),s&&x.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),x}}}function Rl(t){return function(r){return t==="media"?(process.env.NODE_ENV,`@media (prefers-color-scheme: ${r})`):t?t.startsWith("data-")&&!t.includes("%s")?`[${t}="${r}"] &`:t==="class"?`.${r} &`:t==="data"?`[data-${r}] &`:`${t.replace("%s",r)} &`:"&"}}const Nt={black:"#000",white:"#fff"},Wl={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"},vt={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},bt={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Bt={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},St={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Et={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Ct={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function ms(){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:Nt.white,default:Nt.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 gs=ms();function ys(){return{text:{primary:Nt.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:Nt.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 kn=ys();function vs(t,e,r,n){const i=n.light||n,s=n.dark||n*1.5;t[e]||(t.hasOwnProperty(r)?t[e]=t[r]:e==="light"?t.light=$r(t.main,i):e==="dark"&&(t.dark=kr(t.main,s)))}function bs(t,e,r,n,i){const s=i.light||i,o=i.dark||i*1.5;e[r]||(e.hasOwnProperty(n)?e[r]=e[n]:r==="light"?e.light=`color-mix(in ${t}, ${e.main}, #fff ${(s*100).toFixed(0)}%)`:r==="dark"&&(e.dark=`color-mix(in ${t}, ${e.main}, #000 ${(o*100).toFixed(0)}%)`))}function zl(t="light"){return t==="dark"?{main:St[200],light:St[50],dark:St[400]}:{main:St[700],light:St[400],dark:St[800]}}function jl(t="light"){return t==="dark"?{main:vt[200],light:vt[50],dark:vt[400]}:{main:vt[500],light:vt[300],dark:vt[700]}}function Ul(t="light"){return t==="dark"?{main:bt[500],light:bt[300],dark:bt[700]}:{main:bt[700],light:bt[400],dark:bt[800]}}function Gl(t="light"){return t==="dark"?{main:Et[400],light:Et[300],dark:Et[700]}:{main:Et[700],light:Et[500],dark:Et[900]}}function Hl(t="light"){return t==="dark"?{main:Ct[400],light:Ct[300],dark:Ct[700]}:{main:Ct[800],light:Ct[500],dark:Ct[900]}}function Yl(t="light"){return t==="dark"?{main:Bt[400],light:Bt[300],dark:Bt[700]}:{main:"#ed6c02",light:Bt[500],dark:Bt[900]}}function ql(t){return`oklch(from ${t} var(--__l) 0 h / var(--__a))`}function $n(t){const{mode:e="light",contrastThreshold:r=3,tonalOffset:n=.2,colorSpace:i,...s}=t,o=t.primary||zl(e),a=t.secondary||jl(e),c=t.error||Ul(e),d=t.info||Gl(e),l=t.success||Hl(e),u=t.warning||Yl(e);function h(g){if(i)return ql(g);const b=ds(g,kn.text.primary)>=r?kn.text.primary:gs.text.primary;return process.env.NODE_ENV!=="production"&&ds(g,b)<3,b}const m=({color:g,name:b,mainShade:T=500,lightShade:A=300,darkShade:x=700})=>{if(g={...g},!g.main&&g[T]&&(g.main=g[T]),!g.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
9
+ The color object needs to have a \`main\` property or a \`${T}\` property.`:Xe(11,b?` (${b})`:"",T));if(typeof g.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
7
10
  \`color.main\` should be a string, but \`${JSON.stringify(g.main)}\` was provided instead.
8
11
 
9
12
  Did you intend to use one of the following approaches?
@@ -16,113 +19,12 @@ const theme1 = createTheme({ palette: {
16
19
 
17
20
  const theme2 = createTheme({ palette: {
18
21
  primary: { main: green[500] },
19
- } });`:Ve(12,x?` (${x})`:"",JSON.stringify(g.main)));return o?(ho(o,g,"light",R,n),ho(o,g,"dark",O,n)):(mo(g,"light",R,n),mo(g,"dark",O,n)),g.contrastText||(g.contrastText=p(g.main)),g};let h;return t==="light"?h=uo():t==="dark"&&(h=po()),process.env.NODE_ENV,ye({common:{...yt},mode:t,primary:b({color:a,name:"primary"}),secondary:b({color:l,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:b({color:u,name:"error"}),warning:b({color:y,name:"warning"}),info:b({color:f,name:"info"}),success:b({color:m,name:"success"}),grey:Ma,contrastThreshold:r,getContrastText:p,augmentColor:b,tonalOffset:n,...h},i)}function za(e){const t={};return Object.entries(e).forEach(n=>{const[o,i]=n;typeof i=="object"&&(t[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function Wa(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function La(e){return Math.round(e*1e5)/1e5}const go={textTransform:"uppercase"},yo='"Roboto", "Helvetica", "Arial", sans-serif';function Fa(e,t){const{fontFamily:r=yo,fontSize:n=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:u=16,allVariants:f,pxToRem:m,...y}=typeof t=="function"?t(e):t;process.env.NODE_ENV;const p=n/14,b=m||(g=>`${g/u*p}rem`),h=(g,x,A,R,O)=>({fontFamily:r,fontWeight:g,fontSize:b(x),lineHeight:A,...r===yo?{letterSpacing:`${La(R/x)}em`}:{},...O,...f}),d={h1:h(o,96,1.167,-1.5),h2:h(o,60,1.2,-.5),h3:h(i,48,1.167,0),h4:h(i,34,1.235,.25),h5:h(i,24,1.334,0),h6:h(a,20,1.6,.15),subtitle1:h(i,16,1.75,.15),subtitle2:h(a,14,1.57,.1),body1:h(i,16,1.5,.15),body2:h(i,14,1.43,.15),button:h(a,14,1.75,.4,go),caption:h(i,12,1.66,.4),overline:h(i,12,2.66,1,go),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ye({htmlFontSize:u,pxToRem:b,fontFamily:r,fontSize:n,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:l,...d},y,{clone:!1})}const qa=.2,Ga=.14,Ua=.12;function de(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${qa})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Ga})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Ua})`].join(",")}const Ya=["none",de(0,2,1,-1,0,1,1,0,0,1,3,0),de(0,3,1,-2,0,2,2,0,0,1,5,0),de(0,3,3,-2,0,3,4,0,0,1,8,0),de(0,2,4,-1,0,4,5,0,0,1,10,0),de(0,3,5,-1,0,5,8,0,0,1,14,0),de(0,3,5,-1,0,6,10,0,0,1,18,0),de(0,4,5,-2,0,7,10,1,0,2,16,1),de(0,5,5,-3,0,8,10,1,0,3,14,2),de(0,5,6,-3,0,9,12,1,0,3,16,2),de(0,6,6,-3,0,10,14,1,0,4,18,3),de(0,6,7,-4,0,11,15,1,0,4,20,3),de(0,7,8,-4,0,12,17,2,0,5,22,4),de(0,7,8,-4,0,13,19,2,0,5,24,4),de(0,7,9,-4,0,14,21,2,0,5,26,4),de(0,8,9,-5,0,15,22,2,0,6,28,5),de(0,8,10,-5,0,16,24,2,0,6,30,5),de(0,8,11,-5,0,17,26,2,0,6,32,5),de(0,9,11,-5,0,18,28,2,0,7,34,6),de(0,9,12,-6,0,19,29,2,0,7,36,6),de(0,10,13,-6,0,20,31,3,0,8,38,7),de(0,10,13,-6,0,21,33,3,0,8,40,7),de(0,10,14,-6,0,22,35,3,0,8,42,7),de(0,11,14,-7,0,23,36,3,0,9,44,8),de(0,11,15,-7,0,24,38,3,0,9,46,8)],Ha={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)"},Ka={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function bo(e){return`${Math.round(e)}ms`}function Xa(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Qa(e){const t={...Ha,...e.easing},r={...Ka,...e.duration};return{getAutoHeightDuration:Xa,create:(o=["all"],i={})=>{const{duration:a=r.standard,easing:l=t.easeInOut,delay:u=0,...f}=i;if(process.env.NODE_ENV!=="production"){const m=p=>typeof p=="string",y=p=>!Number.isNaN(parseFloat(p));!m(o)&&Array.isArray(o),!y(a)&&m(a),m(l),!y(u)&&m(u),Object.keys(f).length}return(Array.isArray(o)?o:[o]).map(m=>`${m} ${typeof a=="string"?a:bo(a)} ${l} ${typeof u=="string"?u:bo(u)}`).join(",")},...e,easing:t,duration:r}}const Ja={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Za(e){return Ie(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function vo(e={}){const t={...e};function r(n){const o=Object.entries(n);for(let i=0;i<o.length;i++){const[a,l]=o[i];!Za(l)||a.startsWith("unstable_")?delete n[a]:Ie(l)&&(n[a]={...l},r(n[a]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
22
+ } });`:Xe(12,b?` (${b})`:"",JSON.stringify(g.main)));return i?(bs(i,g,"light",A,n),bs(i,g,"dark",x,n)):(vs(g,"light",A,n),vs(g,"dark",x,n)),g.contrastText||(g.contrastText=h(g.main)),g};let y;return e==="light"?y=ms():e==="dark"&&(y=ys()),process.env.NODE_ENV,Te({common:{...Nt},mode:e,primary:m({color:o,name:"primary"}),secondary:m({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:m({color:c,name:"error"}),warning:m({color:u,name:"warning"}),info:m({color:d,name:"info"}),success:m({color:l,name:"success"}),grey:Wl,contrastThreshold:r,getContrastText:h,augmentColor:m,tonalOffset:n,...y},s)}function Kl(t){const e={};return Object.entries(t).forEach(n=>{const[i,s]=n;typeof s=="object"&&(e[i]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),e}function Xl(t,e){return{toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}},...e}}function Ql(t){return Math.round(t*1e5)/1e5}const Ss={textTransform:"uppercase"},Es='"Roboto", "Helvetica", "Arial", sans-serif';function Zl(t,e){const{fontFamily:r=Es,fontSize:n=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:o=500,fontWeightBold:a=700,htmlFontSize:c=16,allVariants:d,pxToRem:l,...u}=typeof e=="function"?e(t):e;process.env.NODE_ENV;const h=n/14,m=l||(g=>`${g/c*h}rem`),y=(g,b,T,A,x)=>({fontFamily:r,fontWeight:g,fontSize:m(b),lineHeight:T,...r===Es?{letterSpacing:`${Ql(A/b)}em`}:{},...x,...d}),f={h1:y(i,96,1.167,-1.5),h2:y(i,60,1.2,-.5),h3:y(s,48,1.167,0),h4:y(s,34,1.235,.25),h5:y(s,24,1.334,0),h6:y(o,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(o,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(o,14,1.75,.4,Ss),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,Ss),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Te({htmlFontSize:c,pxToRem:m,fontFamily:r,fontSize:n,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:o,fontWeightBold:a,...f},u,{clone:!1})}const Jl=.2,ec=.14,tc=.12;function ue(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${Jl})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${ec})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${tc})`].join(",")}const rc=["none",ue(0,2,1,-1,0,1,1,0,0,1,3,0),ue(0,3,1,-2,0,2,2,0,0,1,5,0),ue(0,3,3,-2,0,3,4,0,0,1,8,0),ue(0,2,4,-1,0,4,5,0,0,1,10,0),ue(0,3,5,-1,0,5,8,0,0,1,14,0),ue(0,3,5,-1,0,6,10,0,0,1,18,0),ue(0,4,5,-2,0,7,10,1,0,2,16,1),ue(0,5,5,-3,0,8,10,1,0,3,14,2),ue(0,5,6,-3,0,9,12,1,0,3,16,2),ue(0,6,6,-3,0,10,14,1,0,4,18,3),ue(0,6,7,-4,0,11,15,1,0,4,20,3),ue(0,7,8,-4,0,12,17,2,0,5,22,4),ue(0,7,8,-4,0,13,19,2,0,5,24,4),ue(0,7,9,-4,0,14,21,2,0,5,26,4),ue(0,8,9,-5,0,15,22,2,0,6,28,5),ue(0,8,10,-5,0,16,24,2,0,6,30,5),ue(0,8,11,-5,0,17,26,2,0,6,32,5),ue(0,9,11,-5,0,18,28,2,0,7,34,6),ue(0,9,12,-6,0,19,29,2,0,7,36,6),ue(0,10,13,-6,0,20,31,3,0,8,38,7),ue(0,10,13,-6,0,21,33,3,0,8,40,7),ue(0,10,14,-6,0,22,35,3,0,8,42,7),ue(0,11,14,-7,0,23,36,3,0,9,44,8),ue(0,11,15,-7,0,24,38,3,0,9,46,8)],nc={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)"},ic={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Cs(t){return`${Math.round(t)}ms`}function sc(t){if(!t)return 0;const e=t/36;return Math.min(Math.round((4+15*e**.25+e/5)*10),3e3)}function oc(t){const e={...nc,...t.easing},r={...ic,...t.duration};return{getAutoHeightDuration:sc,create:(i=["all"],s={})=>{const{duration:o=r.standard,easing:a=e.easeInOut,delay:c=0,...d}=s;if(process.env.NODE_ENV!=="production"){const l=h=>typeof h=="string",u=h=>!Number.isNaN(parseFloat(h));!l(i)&&Array.isArray(i),!u(o)&&l(o),l(a),!u(c)&&l(c),Object.keys(d).length}return(Array.isArray(i)?i:[i]).map(l=>`${l} ${typeof o=="string"?o:Cs(o)} ${a} ${typeof c=="string"?c:Cs(c)}`).join(",")},...t,easing:e,duration:r}}const ac={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function lc(t){return We(t)||typeof t>"u"||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||Array.isArray(t)}function ws(t={}){const e={...t};function r(n){const i=Object.entries(n);for(let s=0;s<i.length;s++){const[o,a]=i[s];!lc(a)||o.startsWith("unstable_")?delete n[o]:We(a)&&(n[o]={...a},r(n[o]))}}return r(e),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
20
23
 
21
- const theme = ${JSON.stringify(t,null,2)};
24
+ const theme = ${JSON.stringify(e,null,2)};
22
25
 
23
26
  theme.breakpoints = createBreakpoints(theme.breakpoints || {});
24
27
  theme.transitions = createTransitions(theme.transitions || {});
25
28
 
26
- export default theme;`}function So(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const el=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let r=0;for(let n=0;n<t.length;n+=1)r+=+t[n];return r};function tl(e){Object.assign(e,{alpha(t,r){const n=this||e;return n.colorSpace?`oklch(from ${t} l c h / ${typeof r=="string"?`calc(${r})`:r})`:n.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof r=="string"?`calc(${r})`:r})`:Gt(t,el(r))},lighten(t,r){const n=this||e;return n.colorSpace?`color-mix(in ${n.colorSpace}, ${t}, #fff ${So(r)})`:Yt(t,r)},darken(t,r){const n=this||e;return n.colorSpace?`color-mix(in ${n.colorSpace}, ${t}, #000 ${So(r)})`:Ut(t,r)}})}function Or(e={},...t){const{breakpoints:r,mixins:n={},spacing:o,palette:i={},transitions:a={},typography:l={},shape:u,colorSpace:f,...m}=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.":Ve(20));const y=Er({...i,colorSpace:f}),p=mt(e);let b=ye(p,{mixins:Wa(p.breakpoints,n),palette:y,shadows:Ya.slice(),typography:Fa(y,l),transitions:Qa(a),zIndex:{...Ja}});if(b=ye(b,m),b=t.reduce((h,d)=>ye(h,d),b),process.env.NODE_ENV!=="production"){const h=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],d=(g,x)=>{let A;for(A in g){const R=g[A];if(h.includes(A)&&Object.keys(R).length>0){if(process.env.NODE_ENV!=="production"){const O=ve("",A)}g[A]={}}}};Object.keys(b.components).forEach(g=>{const x=b.components[g].styleOverrides;x&&g.startsWith("Mui")&&d(x,g)})}return b.unstable_sxConfig={...pt,...m?.unstable_sxConfig},b.unstable_sx=function(d){return Ye({sx:d,theme:this})},b.toRuntimeSource=vo,tl(b),b}function $r(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 rl=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=$r(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Co(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function To(e){return e==="dark"?rl:[]}function nl(e){const{palette:t={mode:"light"},opacity:r,overlays:n,colorSpace:o,...i}=e,a=Er({...t,colorSpace:o});return{palette:a,opacity:{...Co(a.mode),...r},overlays:n||To(a.mode),...i}}function ol(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const il=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],sl=e=>(t,r)=>{const n=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return il(e.cssVarPrefix).forEach(l=>{a[l]=r[l],delete r[l]}),i==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:a}}:i?{[i.replace("%s",t)]:a,[`${n}, ${i.replace("%s",t)}`]:r}:{[n]:{...r,...a}}}if(i&&i!=="media")return`${n}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(i)return i.replace("%s",String(t))}return n};function al(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function S(e,t,r){!e[t]&&r&&(e[t]=r)}function vt(e){return typeof e!="string"||!e.startsWith("hsl")?e:no(e)}function Re(e,t){`${t}Channel`in e||(e[`${t}Channel`]=gt(vt(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().
27
- 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 ll(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const _e=e=>{try{return e()}catch{}},cl=(e="mui")=>Sa(e);function kr(e,t,r,n,o){if(!r)return;r=r===!0?{}:r;const i=o==="dark"?"dark":"light";if(!n){t[o]=nl({...r,palette:{mode:i,...r?.palette},colorSpace:e});return}const{palette:a,...l}=Or({...n,palette:{mode:i,...r?.palette},colorSpace:e});return t[o]={...r,palette:a,opacity:{...Co(i),...r?.opacity},overlays:r?.overlays||To(i)},l}function ul(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",nativeColor:a=!1,shouldSkipGeneratingVar:l=ol,colorSchemeSelector:u=r.light&&r.dark?"media":void 0,rootSelector:f=":root",...m}=e,y=Object.keys(r)[0],p=n||(r.light&&y!=="light"?"light":y),b=cl(i),{[p]:h,light:d,dark:g,...x}=r,A={...x};let R=h;if((p==="dark"&&!("dark"in r)||p==="light"&&!("light"in r))&&(R=!0),!R)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${p}\` option is either missing or invalid.`:Ve(21,p));let O;a&&(O="oklch");const C=kr(O,A,R,m,p);d&&!A.light&&kr(O,A,d,void 0,"light"),g&&!A.dark&&kr(O,A,g,void 0,"dark");let E={defaultColorScheme:p,...C,cssVarPrefix:i,colorSchemeSelector:u,rootSelector:f,getCssVar:b,colorSchemes:A,font:{...za(C.typography),...C.font},spacing:ll(m.spacing)};Object.keys(E.colorSchemes).forEach(N=>{const c=E.colorSchemes[N].palette,w=D=>{const M=D.split("-"),X=M[1],re=M[2];return b(D,c[X][re])};c.mode==="light"&&(S(c.common,"background","#fff"),S(c.common,"onBackground","#000")),c.mode==="dark"&&(S(c.common,"background","#000"),S(c.common,"onBackground","#fff"));function T(D,M,X){if(O){let re;return D===Ke&&(re=`transparent ${((1-X)*100).toFixed(0)}%`),D===ie&&(re=`#000 ${(X*100).toFixed(0)}%`),D===se&&(re=`#fff ${(X*100).toFixed(0)}%`),`color-mix(in ${O}, ${M}, ${re})`}return D(M,X)}if(al(c,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),c.mode==="light"){S(c.Alert,"errorColor",T(ie,c.error.light,.6)),S(c.Alert,"infoColor",T(ie,c.info.light,.6)),S(c.Alert,"successColor",T(ie,c.success.light,.6)),S(c.Alert,"warningColor",T(ie,c.warning.light,.6)),S(c.Alert,"errorFilledBg",w("palette-error-main")),S(c.Alert,"infoFilledBg",w("palette-info-main")),S(c.Alert,"successFilledBg",w("palette-success-main")),S(c.Alert,"warningFilledBg",w("palette-warning-main")),S(c.Alert,"errorFilledColor",_e(()=>c.getContrastText(c.error.main))),S(c.Alert,"infoFilledColor",_e(()=>c.getContrastText(c.info.main))),S(c.Alert,"successFilledColor",_e(()=>c.getContrastText(c.success.main))),S(c.Alert,"warningFilledColor",_e(()=>c.getContrastText(c.warning.main))),S(c.Alert,"errorStandardBg",T(se,c.error.light,.9)),S(c.Alert,"infoStandardBg",T(se,c.info.light,.9)),S(c.Alert,"successStandardBg",T(se,c.success.light,.9)),S(c.Alert,"warningStandardBg",T(se,c.warning.light,.9)),S(c.Alert,"errorIconColor",w("palette-error-main")),S(c.Alert,"infoIconColor",w("palette-info-main")),S(c.Alert,"successIconColor",w("palette-success-main")),S(c.Alert,"warningIconColor",w("palette-warning-main")),S(c.AppBar,"defaultBg",w("palette-grey-100")),S(c.Avatar,"defaultBg",w("palette-grey-400")),S(c.Button,"inheritContainedBg",w("palette-grey-300")),S(c.Button,"inheritContainedHoverBg",w("palette-grey-A100")),S(c.Chip,"defaultBorder",w("palette-grey-400")),S(c.Chip,"defaultAvatarColor",w("palette-grey-700")),S(c.Chip,"defaultIconColor",w("palette-grey-700")),S(c.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),S(c.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),S(c.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),S(c.LinearProgress,"primaryBg",T(se,c.primary.main,.62)),S(c.LinearProgress,"secondaryBg",T(se,c.secondary.main,.62)),S(c.LinearProgress,"errorBg",T(se,c.error.main,.62)),S(c.LinearProgress,"infoBg",T(se,c.info.main,.62)),S(c.LinearProgress,"successBg",T(se,c.success.main,.62)),S(c.LinearProgress,"warningBg",T(se,c.warning.main,.62)),S(c.Skeleton,"bg",O?T(Ke,c.text.primary,.11):`rgba(${w("palette-text-primaryChannel")} / 0.11)`),S(c.Slider,"primaryTrack",T(se,c.primary.main,.62)),S(c.Slider,"secondaryTrack",T(se,c.secondary.main,.62)),S(c.Slider,"errorTrack",T(se,c.error.main,.62)),S(c.Slider,"infoTrack",T(se,c.info.main,.62)),S(c.Slider,"successTrack",T(se,c.success.main,.62)),S(c.Slider,"warningTrack",T(se,c.warning.main,.62));const D=O?T(ie,c.background.default,.6825):Ht(c.background.default,.8);S(c.SnackbarContent,"bg",D),S(c.SnackbarContent,"color",_e(()=>O?wr.text.primary:c.getContrastText(D))),S(c.SpeedDialAction,"fabHoverBg",Ht(c.background.paper,.15)),S(c.StepConnector,"border",w("palette-grey-400")),S(c.StepContent,"border",w("palette-grey-400")),S(c.Switch,"defaultColor",w("palette-common-white")),S(c.Switch,"defaultDisabledColor",w("palette-grey-100")),S(c.Switch,"primaryDisabledColor",T(se,c.primary.main,.62)),S(c.Switch,"secondaryDisabledColor",T(se,c.secondary.main,.62)),S(c.Switch,"errorDisabledColor",T(se,c.error.main,.62)),S(c.Switch,"infoDisabledColor",T(se,c.info.main,.62)),S(c.Switch,"successDisabledColor",T(se,c.success.main,.62)),S(c.Switch,"warningDisabledColor",T(se,c.warning.main,.62)),S(c.TableCell,"border",T(se,T(Ke,c.divider,1),.88)),S(c.Tooltip,"bg",T(Ke,c.grey[700],.92))}if(c.mode==="dark"){S(c.Alert,"errorColor",T(se,c.error.light,.6)),S(c.Alert,"infoColor",T(se,c.info.light,.6)),S(c.Alert,"successColor",T(se,c.success.light,.6)),S(c.Alert,"warningColor",T(se,c.warning.light,.6)),S(c.Alert,"errorFilledBg",w("palette-error-dark")),S(c.Alert,"infoFilledBg",w("palette-info-dark")),S(c.Alert,"successFilledBg",w("palette-success-dark")),S(c.Alert,"warningFilledBg",w("palette-warning-dark")),S(c.Alert,"errorFilledColor",_e(()=>c.getContrastText(c.error.dark))),S(c.Alert,"infoFilledColor",_e(()=>c.getContrastText(c.info.dark))),S(c.Alert,"successFilledColor",_e(()=>c.getContrastText(c.success.dark))),S(c.Alert,"warningFilledColor",_e(()=>c.getContrastText(c.warning.dark))),S(c.Alert,"errorStandardBg",T(ie,c.error.light,.9)),S(c.Alert,"infoStandardBg",T(ie,c.info.light,.9)),S(c.Alert,"successStandardBg",T(ie,c.success.light,.9)),S(c.Alert,"warningStandardBg",T(ie,c.warning.light,.9)),S(c.Alert,"errorIconColor",w("palette-error-main")),S(c.Alert,"infoIconColor",w("palette-info-main")),S(c.Alert,"successIconColor",w("palette-success-main")),S(c.Alert,"warningIconColor",w("palette-warning-main")),S(c.AppBar,"defaultBg",w("palette-grey-900")),S(c.AppBar,"darkBg",w("palette-background-paper")),S(c.AppBar,"darkColor",w("palette-text-primary")),S(c.Avatar,"defaultBg",w("palette-grey-600")),S(c.Button,"inheritContainedBg",w("palette-grey-800")),S(c.Button,"inheritContainedHoverBg",w("palette-grey-700")),S(c.Chip,"defaultBorder",w("palette-grey-700")),S(c.Chip,"defaultAvatarColor",w("palette-grey-300")),S(c.Chip,"defaultIconColor",w("palette-grey-300")),S(c.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),S(c.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),S(c.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),S(c.LinearProgress,"primaryBg",T(ie,c.primary.main,.5)),S(c.LinearProgress,"secondaryBg",T(ie,c.secondary.main,.5)),S(c.LinearProgress,"errorBg",T(ie,c.error.main,.5)),S(c.LinearProgress,"infoBg",T(ie,c.info.main,.5)),S(c.LinearProgress,"successBg",T(ie,c.success.main,.5)),S(c.LinearProgress,"warningBg",T(ie,c.warning.main,.5)),S(c.Skeleton,"bg",O?T(Ke,c.text.primary,.13):`rgba(${w("palette-text-primaryChannel")} / 0.13)`),S(c.Slider,"primaryTrack",T(ie,c.primary.main,.5)),S(c.Slider,"secondaryTrack",T(ie,c.secondary.main,.5)),S(c.Slider,"errorTrack",T(ie,c.error.main,.5)),S(c.Slider,"infoTrack",T(ie,c.info.main,.5)),S(c.Slider,"successTrack",T(ie,c.success.main,.5)),S(c.Slider,"warningTrack",T(ie,c.warning.main,.5));const D=O?T(se,c.background.default,.985):Ht(c.background.default,.98);S(c.SnackbarContent,"bg",D),S(c.SnackbarContent,"color",_e(()=>O?fo.text.primary:c.getContrastText(D))),S(c.SpeedDialAction,"fabHoverBg",Ht(c.background.paper,.15)),S(c.StepConnector,"border",w("palette-grey-600")),S(c.StepContent,"border",w("palette-grey-600")),S(c.Switch,"defaultColor",w("palette-grey-300")),S(c.Switch,"defaultDisabledColor",w("palette-grey-600")),S(c.Switch,"primaryDisabledColor",T(ie,c.primary.main,.55)),S(c.Switch,"secondaryDisabledColor",T(ie,c.secondary.main,.55)),S(c.Switch,"errorDisabledColor",T(ie,c.error.main,.55)),S(c.Switch,"infoDisabledColor",T(ie,c.info.main,.55)),S(c.Switch,"successDisabledColor",T(ie,c.success.main,.55)),S(c.Switch,"warningDisabledColor",T(ie,c.warning.main,.55)),S(c.TableCell,"border",T(ie,T(Ke,c.divider,1),.68)),S(c.Tooltip,"bg",T(Ke,c.grey[700],.92))}Re(c.background,"default"),Re(c.background,"paper"),Re(c.common,"background"),Re(c.common,"onBackground"),Re(c,"divider"),Object.keys(c).forEach(D=>{const M=c[D];D!=="tonalOffset"&&M&&typeof M=="object"&&(M.main&&S(c[D],"mainChannel",gt(vt(M.main))),M.light&&S(c[D],"lightChannel",gt(vt(M.light))),M.dark&&S(c[D],"darkChannel",gt(vt(M.dark))),M.contrastText&&S(c[D],"contrastTextChannel",gt(vt(M.contrastText))),D==="text"&&(Re(c[D],"primary"),Re(c[D],"secondary")),D==="action"&&(M.active&&Re(c[D],"active"),M.selected&&Re(c[D],"selected")))})}),E=t.reduce((N,c)=>ye(N,c),E);const z={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:l,getSelector:sl(E),enableContrastVars:a},{vars:Z,generateThemeVars:G,generateStyleSheets:Y}=xa(E,z);return E.vars=Z,Object.entries(E.colorSchemes[E.defaultColorScheme]).forEach(([N,c])=>{E[N]=c}),E.generateThemeVars=G,E.generateStyleSheets=Y,E.generateSpacing=function(){return Hn(m.spacing,_t(this))},E.getColorSchemeSelector=wa(u),E.spacing=E.generateSpacing(),E.shouldSkipGeneratingVar=l,E.unstable_sxConfig={...pt,...m?.unstable_sxConfig},E.unstable_sx=function(c){return Ye({sx:c,theme:this})},E.toRuntimeSource=vo,E}function xo(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:Er({...r===!0?{}:r.palette,mode:t})})}function wo(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:o=r?void 0:{light:!0},defaultColorScheme:i=r?.mode,...a}=e,l=i||"light",u=o?.[l],f={...o,...r?{[l]:{...typeof u!="boolean"&&u,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return Or(e,...t);let m=r;"palette"in e||f[l]&&(f[l]!==!0?m=f[l].palette:l==="dark"&&(m={mode:"dark"}));const y=Or({...e,palette:m},...t);return y.defaultColorScheme=l,y.colorSchemes=f,y.palette.mode==="light"&&(y.colorSchemes.light={...f.light!==!0&&f.light,palette:y.palette},xo(y,"dark",f.dark)),y.palette.mode==="dark"&&(y.colorSchemes.dark={...f.dark!==!0&&f.dark,palette:y.palette},xo(y,"light",f.light)),y}return!r&&!("light"in f)&&l==="light"&&(f.light=!0),ul({...a,colorSchemes:f,defaultColorScheme:l,...typeof n!="boolean"&&n},...t)}const Eo=wo();function Oo(){const e=Wt(Eo);return process.env.NODE_ENV!=="production"&&j.useDebugValue(e),e[Sr]||e}function dl(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const $o=e=>dl(e)&&e!=="classes",ge=Qn({themeId:Sr,defaultTheme:Eo,rootShouldForwardProp:$o});process.env.NODE_ENV!=="production"&&(s.node,s.object.isRequired);function Oe(e){return ya(e)}const Xe=aa({createStyledComponent:ge("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.container&&t.container]}}),componentName:"MuiGrid",useThemeProps:e=>Oe({props:e,name:"MuiGrid"}),useTheme:Oo});if(process.env.NODE_ENV!=="production"&&(Xe.propTypes={children:s.node,columns:s.oneOfType([s.arrayOf(s.number),s.number,s.object]),columnSpacing:s.oneOfType([s.arrayOf(s.oneOfType([s.number,s.string])),s.number,s.object,s.string]),container:s.bool,direction:s.oneOfType([s.oneOf(["column-reverse","column","row-reverse","row"]),s.arrayOf(s.oneOf(["column-reverse","column","row-reverse","row"])),s.object]),offset:s.oneOfType([s.string,s.number,s.arrayOf(s.oneOfType([s.string,s.number])),s.object]),rowSpacing:s.oneOfType([s.arrayOf(s.oneOfType([s.number,s.string])),s.number,s.object,s.string]),size:s.oneOfType([s.string,s.bool,s.number,s.arrayOf(s.oneOfType([s.string,s.bool,s.number])),s.object]),spacing:s.oneOfType([s.arrayOf(s.oneOfType([s.number,s.string])),s.number,s.object,s.string]),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),unstable_level:s.number,wrap:s.oneOf(["nowrap","wrap-reverse","wrap"])}),process.env.NODE_ENV!=="production"){const e=Xe,t=la("Grid",e);e.propTypes={...e.propTypes,direction:t("container"),spacing:t("container"),wrap:t("container")}}function fl(e){return e==null?{xs:12}:typeof e=="object"?e:{xs:e}}function pl(e){const t=new Set,r=n=>{const o=i=>{if(i){if(typeof i=="function"){t.add("*");return}"field"in i&&t.add(i.field),"and"in i&&Array.isArray(i.and)&&i.and.forEach(o),"or"in i&&Array.isArray(i.or)&&i.or.forEach(o),"not"in i&&o(i.not)}};o(n.visibleWhen),o(n.disabledWhen),o(n.requiredWhen),n.dependencies&&n.dependencies.forEach(i=>t.add(i))};if(r(e),e.component==="Group"&&e.columns){const n=o=>{o.forEach(i=>{r(i),i.component==="Group"&&i.columns&&n(i.columns)})};n(e.columns)}return Array.from(t)}function ml({field:e,index:t,values:r,form:n,disabled:o=!1,readOnly:i=!1,widgets:a,optionsMap:l,useGrid:u=!0}){const f=ut(e,r,o,i);if(!f.visible)return null;const m=a[e.component]??a.Text,y=l[e.name]??e.ui?.options??[],b=e.component==="Group"||e.component==="FormList"?v.jsx(m,{field:{name:e.name,value:void 0,onChange:()=>{},onBlur:()=>{},ref:()=>{}},form:n,globalDisabled:o,globalReadOnly:i,label:e.ui?.label,optionsMap:l,schema:e,widgets:a,values:r}):v.jsx(Fe.Controller,{control:n.control,name:e.name,render:({field:h,fieldState:d})=>v.jsx(m,{error:!!d.error,field:h,fieldProps:{...e.ui?.props,...e.fieldProps,disabled:f.disabled,required:f.required,readOnly:f.readonly,placeholder:e.ui?.placeholder},form:n,helperText:d.error?.message??e.ui?.helperText,label:e.ui?.label,options:y,values:r,schema:e})});if(u){const h=fl(e.colSpan);return v.jsx(Xe,{size:h,children:b},`${String(e.name)}-${t}`)}return b}const ko=W.memo(ml,(e,t)=>{if(e.field!==t.field||e.index!==t.index||e.disabled!==t.disabled||e.readOnly!==t.readOnly||e.useGrid!==t.useGrid||e.widgets!==t.widgets||e.form!==t.form)return!1;const r=e.optionsMap[e.field.name],n=t.optionsMap[t.field.name];if(r!==n)return!1;const o=pl(t.field);if(o.includes("*"))return!1;for(const i of o)if(e.values[i]!==t.values[i])return!1;return!0}),Ao=({spacing:e=2,children:t})=>v.jsx(Xe,{container:!0,spacing:e,children:t}),Po=Ia({createStyledComponent:ge("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Oe({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(Po.propTypes={children:s.node,component:s.elementType,direction:s.oneOfType([s.oneOf(["column-reverse","column","row-reverse","row"]),s.arrayOf(s.oneOf(["column-reverse","column","row-reverse","row"])),s.object]),divider:s.node,spacing:s.oneOfType([s.arrayOf(s.oneOfType([s.number,s.string])),s.number,s.object,s.string]),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),useFlexGap:s.bool});const Io=({spacing:e=2,children:t})=>v.jsx(Po,{spacing:e,children:t}),$e={"& .MuiInputBase-input":{fontSize:14,padding:"8px 12px"},"& .MuiInputLabel-root":{fontSize:14,transform:"translate(14px, 9px) scale(1)","&.MuiInputLabel-shrink":{transform:"translate(14px, -9px) scale(0.75)"}},"& .MuiOutlinedInput-root":{minHeight:"40px"},"& .MuiFormHelperText-root":{marginTop:"4px",fontSize:12},"& .MuiInputLabel-asterisk":{display:"none"}},Ar="YYYY-MM-DD",Pr="YYYY-MM-DD HH:mm",hl=U.styled("ul")(({theme:e})=>({padding:e.spacing(.5),margin:0,listStyle:"none",maxHeight:260,overflow:"auto","& .MuiAutocomplete-option":{minHeight:36,padding:e.spacing(.75,1.5),display:"flex",alignItems:"center",gap:e.spacing(1),fontSize:14,borderRadius:e.shape.borderRadius,cursor:"pointer",transition:e.transitions.create(["background-color"],{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:e.palette.action.hover},'&[aria-selected="true"]':{backgroundColor:e.palette.action.selected},'&[aria-disabled="true"]':{opacity:.5,cursor:"not-allowed"}},"& .MuiAutocomplete-listboxStatus":{cursor:"default",pointerEvents:"none"}})),gl=W.forwardRef((e,t)=>{const{children:r,fetchingMore:n,hasMore:o=!0,showNoMore:i,empty:a,error:l,...u}=e;return v.jsxs(hl,{...u,ref:t,children:[r,a&&!n&&v.jsx(U.Box,{component:"li",className:"MuiAutocomplete-option MuiAutocomplete-listboxStatus",sx:{py:2,justifyContent:"center",pointerEvents:"none",cursor:"default"},children:v.jsx(U.Typography,{variant:"body2",color:"text.secondary",children:"暂无数据"})}),l&&v.jsx(U.Box,{component:"li",className:"MuiAutocomplete-option MuiAutocomplete-listboxStatus",sx:{py:2,color:"error.main",justifyContent:"center",pointerEvents:"none",cursor:"default"},children:v.jsx(U.Typography,{variant:"body2",children:"加载失败,请重试"})}),n&&v.jsxs(U.Box,{component:"li",className:"MuiAutocomplete-option MuiAutocomplete-listboxStatus",sx:{py:1.5,gap:1,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",color:"text.secondary",cursor:"default"},children:[v.jsx(U.CircularProgress,{size:16,color:"inherit"}),v.jsx(U.Typography,{variant:"body2",children:"加载中…"})]}),!o&&i&&!n&&!a&&v.jsx(U.Box,{component:"li",className:"MuiAutocomplete-option MuiAutocomplete-listboxStatus",sx:{py:1.5,justifyContent:"center",pointerEvents:"none",cursor:"default"},children:v.jsx(U.Typography,{variant:"caption",color:"text.disabled",children:"没有更多数据了"})})]})}),lt=({field:e,label:t,error:r,helperText:n,options:o=[],fieldProps:i,form:a,schema:l})=>{const{onChange:u,multiple:f=!1,loading:m,...y}=i??{},p=l?.ui?.remoteConfig,b=W.useRef(p);b.current=p;const[h,d]=W.useState([]),[g,x]=W.useState(!1),[A,R]=W.useState(!1),[O,C]=W.useState(""),[E,z]=W.useState(!1),[Z,G]=W.useState(1),[Y,N]=W.useState(!0),c=W.useRef(null),w=W.useRef(!1),T=p?h:o,D=p?.pageSize??20,M=W.useRef([]);W.useEffect(()=>{if(!p)return;const I=Array.isArray(e.value)?e.value:e.value?[e.value]:[];if(I.length===0)return;const B=h.filter(q=>I.includes(q.value)),V=[...M.current];let F=!1;B.forEach(q=>{V.some(Q=>Q.value==q.value)||(V.push(q),F=!0)}),F&&(M.current=V)},[e.value,h,p]),W.useEffect(()=>{const I=b.current;if(!I?.fetchById||!e.value)return;const V=(Array.isArray(e.value)?e.value:[e.value]).filter(F=>!h.some(q=>q.value==F));V.length!==0&&Promise.all(V.map(async F=>{try{return await I.fetchById(F)}catch{return null}})).then(F=>{const q=F.filter(Q=>Q!==null);q.length>0&&(d(Q=>{const J=[...Q];return q.forEach(ue=>{J.some(_=>_.value==ue.value)||J.push(ue)}),J}),q.forEach(Q=>{M.current.some(J=>J.value==Q.value)||M.current.push(Q)}))})},[e.value,h]);const X=W.useCallback(async(I,B,V=!1)=>{if(p){V||(G(1),N(!0)),V?R(!0):x(!0),p.onLoadingChange?.(!0);try{const F=await p.fetchOptions(I,B,D);if(V)d(q=>{const Q=F.data.filter(J=>!q.some(ue=>ue.value===J.value));return[...q,...Q]});else{const q=[...F.data],Q=Array.isArray(e.value)?e.value:e.value?[e.value]:[];M.current.filter(ue=>Q.includes(ue.value)).forEach(ue=>{q.some(_=>_.value==ue.value)||q.push(ue)}),d(q)}N(F.hasMore)}catch{}finally{V?R(!1):x(!1),p.onLoadingChange?.(!1)}}},[p,D,e.value]),re=W.useRef(null),ce=()=>{c.current=e.value,w.current=!1,z(!0),C(""),p&&X("",1,!1)},$=()=>{if(z(!1),!w.current&&!f){const I=e.value;if(I!=null){const B=T.find(V=>V.value===I);B&&C(B.label)}}},k=(I,B,V)=>{V!=="reset"&&(C(B),p&&(re.current&&clearTimeout(re.current),(V==="input"||V==="clear")&&(re.current=setTimeout(()=>{X(B,1,!1)},p.debounceTimeout??500))))};W.useEffect(()=>()=>{re.current&&clearTimeout(re.current)},[]);const H=I=>{const B=I.currentTarget;if(!g&&!A&&Y&&B.scrollTop+B.clientHeight>=B.scrollHeight-20){const V=Z+1;G(V),X(O,V,!0)}},K=()=>f?T.filter(I=>(e.value??[]).includes(I.value)):T.find(I=>I.value===e.value)??null;return v.jsx(U.FormControl,{fullWidth:!0,error:r,required:y?.required,disabled:y?.disabled,size:"small",sx:$e,children:v.jsx(U.Autocomplete,{multiple:f,disableCloseOnSelect:f,open:E,onOpen:ce,onClose:$,inputValue:p?O:void 0,onInputChange:p?k:void 0,options:T,loading:g||m,filterOptions:p?I=>I:void 0,value:K(),onChange:(I,B)=>{w.current=!0;const V=f?B.map(F=>F.value):B?.value??null;e.onChange(V),!f&&B&&C(B.label),typeof u=="function"&&u(I,B),a?.trigger(e.name)},slots:{listbox:p?gl:void 0},slotProps:{listbox:{onScroll:p?H:void 0,style:{maxHeight:260},...p?{fetchingMore:A,hasMore:Y,showNoMore:h.length>0,empty:h.length===0&&!g&&!A,error:!1}:{}},chip:{size:"small",variant:"outlined",sx:{height:22,fontSize:12,borderRadius:1,backgroundColor:"background.paper","& .MuiChip-label":{px:.75},"& .MuiChip-deleteIcon":{fontSize:16,marginRight:.25}}}},getOptionLabel:I=>I?.label??"",getOptionKey:I=>{const B=I?.key??I?.value;return typeof B=="string"||typeof B=="number"?B:String(B)},isOptionEqualToValue:(I,B)=>I?.value===B?.value,size:"small",disabled:y?.disabled,renderOption:(I,B)=>W.createElement("li",{...I,key:B.key??B.value},B.listLabel??B.label),renderInput:I=>v.jsx(U.TextField,{...I,error:r,fullWidth:!0,helperText:n,label:t,onBlur:()=>{e.onBlur?.(),a?.trigger(e.name)},required:y?.required,size:"small",sx:$e,slotProps:{input:{...I.InputProps,endAdornment:v.jsxs(v.Fragment,{children:[g||m?v.jsx(U.CircularProgress,{color:"inherit",size:20}):null,I.InputProps.endAdornment]})}}})})})},Te=(e,t)=>t?v.jsxs("span",{style:{display:"flex",alignItems:"center"},children:[v.jsx("span",{style:{color:"#d32f2f",marginRight:"4px",fontSize:"20px",fontWeight:"bold",lineHeight:"1",paddingTop:"4px"},children:"*"}),e]}):e,Ir=({field:e,label:t,error:r,helperText:n,fieldProps:o})=>v.jsxs(U.FormControl,{error:r,required:o?.required,component:"fieldset",children:[v.jsx(U.FormControlLabel,{control:v.jsx(U.Checkbox,{checked:e.value??!1,disabled:o?.disabled,onChange:i=>e.onChange(i.target.checked),inputRef:e.ref}),label:Te(t,o?.required)}),n&&v.jsx(U.FormHelperText,{children:n})]}),Mr=({field:e,label:t,error:r,helperText:n,fieldProps:o,form:i,values:a})=>{const{children:l,component:u,...f}=o??{};return l!==void 0?typeof l=="function"?l({field:e,label:t,error:r,helperText:n,form:i,values:a,fieldProps:f}):v.jsx(v.Fragment,{children:l}):u?v.jsx(u,{field:e,label:t,error:r,helperText:n,form:i,values:a,...f}):v.jsx(U.TextField,{...e,label:Te(t,f?.required),error:r,helperText:n,fullWidth:!0,size:"small",sx:$e,...f})},_r=({field:e,label:t,error:r,helperText:n,fieldProps:o})=>v.jsx(or.LocalizationProvider,{adapterLocale:"zh-cn",dateAdapter:ir.AdapterDayjs,children:v.jsx(ri.DateTimePicker,{value:e.value?an(e.value):null,onChange:i=>e.onChange(i?.isValid()?i.format(Pr):""),format:Pr,disabled:o?.disabled,slotProps:{textField:{fullWidth:!0,label:Te(t,o?.required),error:r,helperText:n,required:o?.required,size:"small",sx:$e}},...o})}),Nr=({field:e,label:t,error:r,helperText:n,fieldProps:o,form:i})=>v.jsx(or.LocalizationProvider,{adapterLocale:"zh-cn",dateAdapter:ir.AdapterDayjs,children:v.jsx(ni.DatePicker,{value:e.value?an(e.value):null,onChange:a=>e.onChange(a?.isValid()?a.format(Ar):""),onClose:()=>i?.trigger(e.name),format:Ar,disabled:o?.disabled,slotProps:{textField:{fullWidth:!0,label:Te(t,o?.required),error:r,helperText:n,required:o?.required,size:"small",sx:$e,onBlur:()=>i?.trigger(e.name)}},...o})});function yl(){return Vt}const ke=va;function bl(e){return ve("MuiSvgIcon",e)}Me("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const vl=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${te(t)}`,`fontSize${te(r)}`]};return Pe(o,bl,n)},Sl=ge("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${te(r.color)}`],t[`fontSize${te(r.fontSize)}`]]}})(ke(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),Kt=j.forwardRef(function(t,r){const n=Oe({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:l="svg",fontSize:u="medium",htmlColor:f,inheritViewBox:m=!1,titleAccess:y,viewBox:p="0 0 24 24",...b}=n,h=j.isValidElement(o)&&o.type==="svg",d={...n,color:a,component:l,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:m,viewBox:p,hasSvgAsChild:h},g={};m||(g.viewBox=p);const x=vl(d);return v.jsxs(Sl,{as:l,className:fe(x.root,i),focusable:"false",color:f,"aria-hidden":y?void 0:!0,role:y?"img":void 0,ref:r,...g,...b,...h&&o.props,ownerState:d,children:[h?o.props.children:o,y?v.jsx("title",{children:y}):null]})});process.env.NODE_ENV!=="production"&&(Kt.propTypes={children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),s.string]),component:s.elementType,fontSize:s.oneOfType([s.oneOf(["inherit","large","medium","small"]),s.string]),htmlColor:s.string,inheritViewBox:s.bool,shapeRendering:s.string,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),titleAccess:s.string,viewBox:s.string}),Kt.muiName="SvgIcon";function Rr(e,t){function r(n,o){return v.jsx(Kt,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:o,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Kt.muiName,j.memo(j.forwardRef(r))}function Xt(e){const t=j.useRef(e);return ua(()=>{t.current=e}),j.useRef((...r)=>(0,t.current)(...r)).current}function Mo(...e){const t=j.useRef(void 0),r=j.useCallback(n=>{const o=e.map(i=>{if(i==null)return null;if(typeof i=="function"){const a=i,l=a(n);return typeof l=="function"?l:()=>{a(null)}}return i.current=n,()=>{i.current=null}});return()=>{o.forEach(i=>i?.())}},e);return j.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}const Cl=Rr(v.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),Tl=Rr(v.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"),xl=Rr(v.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"),wl=Me("MuiBox",["root"]),El=wo(),Qt=ca({themeId:Sr,defaultTheme:El,defaultClassName:wl.root,generateClassName:Pn.generate});process.env.NODE_ENV!=="production"&&(Qt.propTypes={children:s.node,component:s.elementType,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});const Ol=s.oneOfType([s.func,s.object]);function Jt(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function $l(e){const{prototype:t={}}=e;return!!t.isReactComponent}function kl(e,t,r,n,o){const i=e[t],a=o||t;if(i==null||typeof window>"u")return null;let l;return typeof i=="function"&&!$l(i)&&(l="Did you accidentally provide a plain function component instead?"),l!==void 0?new Error(`Invalid ${n} \`${a}\` supplied to \`${r}\`. Expected an element type that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Al=Jt(s.elementType,kl);function _o(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&window.navigator.userAgent.includes("jsdom")}return!1}const No={};function Ro(e,t){const r=j.useRef(No);return r.current===No&&(r.current=e(t)),r}class Zt{static create(){return new Zt}static use(){const t=Ro(Zt.create).current,[r,n]=j.useState(!1);return t.shouldMount=r,t.setShouldMount=n,j.useEffect(t.mountEffect,[r]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=Il(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...t){this.mount().then(()=>this.ref.current?.start(...t))}stop(...t){this.mount().then(()=>this.ref.current?.stop(...t))}pulsate(...t){this.mount().then(()=>this.ref.current?.pulsate(...t))}}function Pl(){return Zt.use()}function Il(){let e,t;const r=new Promise((n,o)=>{e=n,t=o});return r.resolve=e,r.reject=t,r}function Dr(){return Dr=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},Dr.apply(null,arguments)}function Ml(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 Br(e,t){return Br=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Br(e,t)}function _l(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Br(e,t)}const Do=W.createContext(null);function Nl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jr(e,t){var r=function(i){return t&&W.isValidElement(i)?t(i):i},n=Object.create(null);return e&&W.Children.map(e,function(o){return o}).forEach(function(o){n[o.key]=r(o)}),n}function Rl(e,t){e=e||{},t=t||{};function r(m){return m in t?t[m]:e[m]}var n=Object.create(null),o=[];for(var i in e)i in t?o.length&&(n[i]=o,o=[]):o.push(i);var a,l={};for(var u in t){if(n[u])for(a=0;a<n[u].length;a++){var f=n[u][a];l[n[u][a]]=r(f)}l[u]=r(u)}for(a=0;a<o.length;a++)l[o[a]]=r(o[a]);return l}function Qe(e,t,r){return r[t]!=null?r[t]:e.props[t]}function Dl(e,t){return jr(e.children,function(r){return W.cloneElement(r,{onExited:t.bind(null,r),in:!0,appear:Qe(r,"appear",e),enter:Qe(r,"enter",e),exit:Qe(r,"exit",e)})})}function Bl(e,t,r){var n=jr(e.children),o=Rl(t,n);return Object.keys(o).forEach(function(i){var a=o[i];if(W.isValidElement(a)){var l=i in t,u=i in n,f=t[i],m=W.isValidElement(f)&&!f.props.in;u&&(!l||m)?o[i]=W.cloneElement(a,{onExited:r.bind(null,a),in:!0,exit:Qe(a,"exit",e),enter:Qe(a,"enter",e)}):!u&&l&&!m?o[i]=W.cloneElement(a,{in:!1}):u&&l&&W.isValidElement(f)&&(o[i]=W.cloneElement(a,{onExited:r.bind(null,a),in:f.props.in,exit:Qe(a,"exit",e),enter:Qe(a,"enter",e)}))}}),o}var jl=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Vl={component:"div",childFactory:function(t){return t}},Vr=(function(e){_l(t,e);function t(n,o){var i;i=e.call(this,n,o)||this;var a=i.handleExited.bind(Nl(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}var r=t.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(o,i){var a=i.children,l=i.handleExited,u=i.firstRender;return{children:u?Dl(o,l):Bl(o,a,l),firstRender:!1}},r.handleExited=function(o,i){var a=jr(this.props.children);o.key in a||(o.props.onExited&&o.props.onExited(i),this.mounted&&this.setState(function(l){var u=Dr({},l.children);return delete u[o.key],{children:u}}))},r.render=function(){var o=this.props,i=o.component,a=o.childFactory,l=Ml(o,["component","childFactory"]),u=this.state.contextValue,f=jl(this.state.children).map(a);return delete l.appear,delete l.enter,delete l.exit,i===null?W.createElement(Do.Provider,{value:u},f):W.createElement(Do.Provider,{value:u},W.createElement(i,l,f))},t})(W.Component);Vr.propTypes=process.env.NODE_ENV!=="production"?{component:s.any,children:s.node,appear:s.bool,enter:s.bool,exit:s.bool,childFactory:s.func}:{},Vr.defaultProps=Vl;const zl=[];function Wl(e){j.useEffect(e,zl)}class zr{static create(){return new zr}currentId=null;start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function Ll(){const e=Ro(zr.create).current;return Wl(e.disposeEffect),e}function Bo(e){const{className:t,classes:r,pulsate:n=!1,rippleX:o,rippleY:i,rippleSize:a,in:l,onExited:u,timeout:f}=e,[m,y]=j.useState(!1),p=fe(t,r.ripple,r.rippleVisible,n&&r.ripplePulsate),b={width:a,height:a,top:-(a/2)+i,left:-(a/2)+o},h=fe(r.child,m&&r.childLeaving,n&&r.childPulsate);return!l&&!m&&y(!0),j.useEffect(()=>{if(!l&&u!=null){const d=setTimeout(u,f);return()=>{clearTimeout(d)}}},[u,l,f]),v.jsx("span",{className:p,style:b,children:v.jsx("span",{className:h})})}process.env.NODE_ENV!=="production"&&(Bo.propTypes={classes:s.object.isRequired,className:s.string,in:s.bool,onExited:s.func,pulsate:s.bool,rippleSize:s.number,rippleX:s.number,rippleY:s.number,timeout:s.number.isRequired});const xe=Me("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Wr=550,Fl=80,ql=Be.keyframes`
28
- 0% {
29
- transform: scale(0);
30
- opacity: 0.1;
31
- }
32
-
33
- 100% {
34
- transform: scale(1);
35
- opacity: 0.3;
36
- }
37
- `,Gl=Be.keyframes`
38
- 0% {
39
- opacity: 1;
40
- }
41
-
42
- 100% {
43
- opacity: 0;
44
- }
45
- `,Ul=Be.keyframes`
46
- 0% {
47
- transform: scale(1);
48
- }
49
-
50
- 50% {
51
- transform: scale(0.92);
52
- }
53
-
54
- 100% {
55
- transform: scale(1);
56
- }
57
- `,Yl=ge("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Hl=ge(Bo,{name:"MuiTouchRipple",slot:"Ripple"})`
58
- opacity: 0;
59
- position: absolute;
60
-
61
- &.${xe.rippleVisible} {
62
- opacity: 0.3;
63
- transform: scale(1);
64
- animation-name: ${ql};
65
- animation-duration: ${Wr}ms;
66
- animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
67
- }
68
-
69
- &.${xe.ripplePulsate} {
70
- animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
71
- }
72
-
73
- & .${xe.child} {
74
- opacity: 1;
75
- display: block;
76
- width: 100%;
77
- height: 100%;
78
- border-radius: 50%;
79
- background-color: currentColor;
80
- }
81
-
82
- & .${xe.childLeaving} {
83
- opacity: 0;
84
- animation-name: ${Gl};
85
- animation-duration: ${Wr}ms;
86
- animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
87
- }
88
-
89
- & .${xe.childPulsate} {
90
- position: absolute;
91
- /* @noflip */
92
- left: 0px;
93
- top: 0;
94
- animation-name: ${Ul};
95
- animation-duration: 2500ms;
96
- animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
97
- animation-iteration-count: infinite;
98
- animation-delay: 200ms;
99
- }
100
- `,jo=j.forwardRef(function(t,r){const n=Oe({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a,...l}=n,[u,f]=j.useState([]),m=j.useRef(0),y=j.useRef(null);j.useEffect(()=>{y.current&&(y.current(),y.current=null)},[u]);const p=j.useRef(!1),b=Ll(),h=j.useRef(null),d=j.useRef(null),g=j.useCallback(O=>{const{pulsate:C,rippleX:E,rippleY:z,rippleSize:Z,cb:G}=O;f(Y=>[...Y,v.jsx(Hl,{classes:{ripple:fe(i.ripple,xe.ripple),rippleVisible:fe(i.rippleVisible,xe.rippleVisible),ripplePulsate:fe(i.ripplePulsate,xe.ripplePulsate),child:fe(i.child,xe.child),childLeaving:fe(i.childLeaving,xe.childLeaving),childPulsate:fe(i.childPulsate,xe.childPulsate)},timeout:Wr,pulsate:C,rippleX:E,rippleY:z,rippleSize:Z},m.current)]),m.current+=1,y.current=G},[i]),x=j.useCallback((O={},C={},E=()=>{})=>{const{pulsate:z=!1,center:Z=o||C.pulsate,fakeElement:G=!1}=C;if(O?.type==="mousedown"&&p.current){p.current=!1;return}O?.type==="touchstart"&&(p.current=!0);const Y=G?null:d.current,N=Y?Y.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,w,T;if(Z||O===void 0||O.clientX===0&&O.clientY===0||!O.clientX&&!O.touches)c=Math.round(N.width/2),w=Math.round(N.height/2);else{const{clientX:D,clientY:M}=O.touches&&O.touches.length>0?O.touches[0]:O;c=Math.round(D-N.left),w=Math.round(M-N.top)}if(Z)T=Math.sqrt((2*N.width**2+N.height**2)/3),T%2===0&&(T+=1);else{const D=Math.max(Math.abs((Y?Y.clientWidth:0)-c),c)*2+2,M=Math.max(Math.abs((Y?Y.clientHeight:0)-w),w)*2+2;T=Math.sqrt(D**2+M**2)}O?.touches?h.current===null&&(h.current=()=>{g({pulsate:z,rippleX:c,rippleY:w,rippleSize:T,cb:E})},b.start(Fl,()=>{h.current&&(h.current(),h.current=null)})):g({pulsate:z,rippleX:c,rippleY:w,rippleSize:T,cb:E})},[o,g,b]),A=j.useCallback(()=>{x({},{pulsate:!0})},[x]),R=j.useCallback((O,C)=>{if(b.clear(),O?.type==="touchend"&&h.current){h.current(),h.current=null,b.start(0,()=>{R(O,C)});return}h.current=null,f(E=>E.length>0?E.slice(1):E),y.current=C},[b]);return j.useImperativeHandle(r,()=>({pulsate:A,start:x,stop:R}),[A,x,R]),v.jsx(Yl,{className:fe(xe.root,i.root,a),ref:d,...l,children:v.jsx(Vr,{component:null,exit:!0,children:u})})});process.env.NODE_ENV!=="production"&&(jo.propTypes={center:s.bool,classes:s.object,className:s.string});function Kl(e){return ve("MuiButtonBase",e)}const Xl=Me("MuiButtonBase",["root","disabled","focusVisible"]),Ql=e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:o}=e,a=Pe({root:["root",t&&"disabled",r&&"focusVisible"]},Kl,o);return r&&n&&(a.root+=` ${n}`),a},Jl=ge("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"},[`&.${Xl.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Lr=j.forwardRef(function(t,r){const n=Oe({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:l,component:u="button",disabled:f=!1,disableRipple:m=!1,disableTouchRipple:y=!1,focusRipple:p=!1,focusVisibleClassName:b,LinkComponent:h="a",onBlur:d,onClick:g,onContextMenu:x,onDragLeave:A,onFocus:R,onFocusVisible:O,onKeyDown:C,onKeyUp:E,onMouseDown:z,onMouseLeave:Z,onMouseUp:G,onTouchEnd:Y,onTouchMove:N,onTouchStart:c,tabIndex:w=0,TouchRippleProps:T,touchRippleRef:D,type:M,...X}=n,re=j.useRef(null),ce=Pl(),$=Mo(ce.ref,D),[k,H]=j.useState(!1);f&&k&&H(!1),j.useImperativeHandle(o,()=>({focusVisible:()=>{H(!0),re.current.focus()}}),[]);const K=ce.shouldMount&&!m&&!f;j.useEffect(()=>{k&&p&&!m&&ce.pulsate()},[m,p,k,ce]);const I=De(ce,"start",z,y),B=De(ce,"stop",x,y),V=De(ce,"stop",A,y),F=De(ce,"stop",G,y),q=De(ce,"stop",ee=>{k&&ee.preventDefault(),Z&&Z(ee)},y),Q=De(ce,"start",c,y),J=De(ce,"stop",Y,y),ue=De(ce,"stop",N,y),_=De(ce,"stop",ee=>{_o(ee.target)||H(!1),d&&d(ee)},!1),we=Xt(ee=>{re.current||(re.current=ee.currentTarget),_o(ee.target)&&(H(!0),O&&O(ee)),R&&R(ee)}),Le=()=>{const ee=re.current;return u&&u!=="button"&&!(ee.tagName==="A"&&ee.href)},rr=Xt(ee=>{p&&!ee.repeat&&k&&ee.key===" "&&ce.stop(ee,()=>{ce.start(ee)}),ee.target===ee.currentTarget&&Le()&&ee.key===" "&&ee.preventDefault(),C&&C(ee),ee.target===ee.currentTarget&&Le()&&ee.key==="Enter"&&!f&&(ee.preventDefault(),g&&g(ee))}),jc=Xt(ee=>{p&&ee.key===" "&&k&&!ee.defaultPrevented&&ce.stop(ee,()=>{ce.pulsate(ee)}),E&&E(ee),g&&ee.target===ee.currentTarget&&Le()&&ee.key===" "&&!ee.defaultPrevented&&g(ee)});let nr=u;nr==="button"&&(X.href||X.to)&&(nr=h);const Ct={};if(nr==="button"){const ee=!!X.formAction;Ct.type=M===void 0&&!ee?"button":M,Ct.disabled=f}else!X.href&&!X.to&&(Ct.role="button"),f&&(Ct["aria-disabled"]=f);const Vc=Mo(r,re),ei={...n,centerRipple:i,component:u,disabled:f,disableRipple:m,disableTouchRipple:y,focusRipple:p,tabIndex:w,focusVisible:k},zc=Ql(ei);return v.jsxs(Jl,{as:nr,className:fe(zc.root,l),ownerState:ei,onBlur:_,onClick:g,onContextMenu:B,onFocus:we,onKeyDown:rr,onKeyUp:jc,onMouseDown:I,onMouseLeave:q,onMouseUp:F,onDragLeave:V,onTouchEnd:J,onTouchMove:ue,onTouchStart:Q,ref:Vc,tabIndex:f?-1:w,type:M,...Ct,...X,children:[a,K?v.jsx(jo,{ref:$,center:i,...T}):null]})});function De(e,t,r,n=!1){return Xt(o=>(r&&r(o),n||e[t](o),!0))}process.env.NODE_ENV!=="production"&&(Lr.propTypes={action:Ol,centerRipple:s.bool,children:s.node,classes:s.object,className:s.string,component:Al,disabled:s.bool,disableRipple:s.bool,disableTouchRipple:s.bool,focusRipple:s.bool,focusVisibleClassName:s.string,formAction:s.oneOfType([s.func,s.string]),href:s.any,LinkComponent:s.elementType,onBlur:s.func,onClick:s.func,onContextMenu:s.func,onDragLeave:s.func,onFocus:s.func,onFocusVisible:s.func,onKeyDown:s.func,onKeyUp:s.func,onMouseDown:s.func,onMouseLeave:s.func,onMouseUp:s.func,onTouchEnd:s.func,onTouchMove:s.func,onTouchStart:s.func,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),tabIndex:s.number,TouchRippleProps:s.object,touchRippleRef:s.oneOfType([s.func,s.shape({current:s.shape({pulsate:s.func.isRequired,start:s.func.isRequired,stop:s.func.isRequired})})]),type:s.oneOfType([s.oneOf(["button","reset","submit"]),s.string])});function Zl(e){return typeof e.main=="string"}function ec(e,t=[]){if(!Zl(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function St(e=[]){return([,t])=>t&&ec(t,e)}function tc(e){return ve("MuiCircularProgress",e)}Me("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Ae=44,Fr=Be.keyframes`
101
- 0% {
102
- transform: rotate(0deg);
103
- }
104
-
105
- 100% {
106
- transform: rotate(360deg);
107
- }
108
- `,qr=Be.keyframes`
109
- 0% {
110
- stroke-dasharray: 1px, 200px;
111
- stroke-dashoffset: 0;
112
- }
113
-
114
- 50% {
115
- stroke-dasharray: 100px, 200px;
116
- stroke-dashoffset: -15px;
117
- }
118
-
119
- 100% {
120
- stroke-dasharray: 1px, 200px;
121
- stroke-dashoffset: -126px;
122
- }
123
- `,rc=typeof Fr!="string"?Be.css`
124
- animation: ${Fr} 1.4s linear infinite;
125
- `:null,nc=typeof qr!="string"?Be.css`
126
- animation: ${qr} 1.4s ease-in-out infinite;
127
- `:null,oc=e=>{const{classes:t,variant:r,color:n,disableShrink:o}=e,i={root:["root",r,`color${te(n)}`],svg:["svg"],track:["track"],circle:["circle",`circle${te(r)}`,o&&"circleDisableShrink"]};return Pe(i,tc,t)},ic=ge("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${te(r.color)}`]]}})(ke(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:rc||{animation:`${Fr} 1.4s linear infinite`}},...Object.entries(e.palette).filter(St()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),sc=ge("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),ac=ge("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${te(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})(ke(({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:nc||{animation:`${qr} 1.4s ease-in-out infinite`}}]}))),lc=ge("circle",{name:"MuiCircularProgress",slot:"Track"})(ke(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),Gr=j.forwardRef(function(t,r){const n=Oe({props:t,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:a=!1,enableTrackSlot:l=!1,size:u=40,style:f,thickness:m=3.6,value:y=0,variant:p="indeterminate",...b}=n,h={...n,color:i,disableShrink:a,size:u,thickness:m,value:y,variant:p,enableTrackSlot:l},d=oc(h),g={},x={},A={};if(p==="determinate"){const R=2*Math.PI*((Ae-m)/2);g.strokeDasharray=R.toFixed(3),A["aria-valuenow"]=Math.round(y),g.strokeDashoffset=`${((100-y)/100*R).toFixed(3)}px`,x.transform="rotate(-90deg)"}return v.jsx(ic,{className:fe(d.root,o),style:{width:u,height:u,...x,...f},ownerState:h,ref:r,role:"progressbar",...A,...b,children:v.jsxs(sc,{className:d.svg,ownerState:h,viewBox:`${Ae/2} ${Ae/2} ${Ae} ${Ae}`,children:[l?v.jsx(lc,{className:d.track,ownerState:h,cx:Ae,cy:Ae,r:(Ae-m)/2,fill:"none",strokeWidth:m,"aria-hidden":"true"}):null,v.jsx(ac,{className:d.circle,style:g,ownerState:h,cx:Ae,cy:Ae,r:(Ae-m)/2,fill:"none",strokeWidth:m})]})})});process.env.NODE_ENV!=="production"&&(Gr.propTypes={classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["inherit","primary","secondary","error","info","success","warning"]),s.string]),disableShrink:Jt(s.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),enableTrackSlot:s.bool,size:s.oneOfType([s.number,s.string]),style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),thickness:s.number,value:s.number,variant:s.oneOf(["determinate","indeterminate"])});function cc(e){return ve("MuiButton",e)}const Je=Me("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),Vo=j.createContext({});process.env.NODE_ENV!=="production"&&(Vo.displayName="ButtonGroupContext");const zo=j.createContext(void 0);process.env.NODE_ENV!=="production"&&(zo.displayName="ButtonGroupButtonContext");const uc=e=>{const{color:t,disableElevation:r,fullWidth:n,size:o,variant:i,loading:a,loadingPosition:l,classes:u}=e,f={root:["root",a&&"loading",i,`${i}${te(t)}`,`size${te(o)}`,`${i}Size${te(o)}`,`color${te(t)}`,r&&"disableElevation",n&&"fullWidth",a&&`loadingPosition${te(l)}`],startIcon:["icon","startIcon",`iconSize${te(o)}`],endIcon:["icon","endIcon",`iconSize${te(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},m=Pe(f,cc,u);return{...u,...m}},Wo=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],dc=ge(Lr,{shouldForwardProp:e=>$o(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${te(r.color)}`],t[`size${te(r.size)}`],t[`${r.variant}Size${te(r.size)}`],r.color==="inherit"&&t.colorInherit,r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth,r.loading&&t.loading]}})(ke(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],r=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${Je.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${Je.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${Je.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${Je.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(St()).map(([n])=>({props:{color:n},style:{"--variant-textColor":(e.vars||e).palette[n].main,"--variant-outlinedColor":(e.vars||e).palette[n].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[n].main,.5),"--variant-containedColor":(e.vars||e).palette[n].contrastText,"--variant-containedBg":(e.vars||e).palette[n].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[n].dark,"--variant-textBg":e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[n].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:r,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Je.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Je.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${Je.loading}`]:{color:"transparent"}}}]}})),fc=ge("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.startIcon,r.loading&&t.startIconLoadingStart,t[`iconSize${te(r.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...Wo]})),pc=ge("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.endIcon,r.loading&&t.endIconLoadingEnd,t[`iconSize${te(r.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...Wo]})),mc=ge("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),Lo=ge("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),Fo=j.forwardRef(function(t,r){const n=j.useContext(Vo),o=j.useContext(zo),i=ht(n,t),a=Oe({props:i,name:"MuiButton"}),{children:l,color:u="primary",component:f="button",className:m,disabled:y=!1,disableElevation:p=!1,disableFocusRipple:b=!1,endIcon:h,focusVisibleClassName:d,fullWidth:g=!1,id:x,loading:A=null,loadingIndicator:R,loadingPosition:O="center",size:C="medium",startIcon:E,type:z,variant:Z="text",...G}=a,Y=ao(x),N=R??v.jsx(Gr,{"aria-labelledby":Y,color:"inherit",size:16}),c={...a,color:u,component:f,disabled:y,disableElevation:p,disableFocusRipple:b,fullWidth:g,loading:A,loadingIndicator:N,loadingPosition:O,size:C,type:z,variant:Z},w=uc(c),T=(E||A&&O==="start")&&v.jsx(fc,{className:w.startIcon,ownerState:c,children:E||v.jsx(Lo,{className:w.loadingIconPlaceholder,ownerState:c})}),D=(h||A&&O==="end")&&v.jsx(pc,{className:w.endIcon,ownerState:c,children:h||v.jsx(Lo,{className:w.loadingIconPlaceholder,ownerState:c})}),M=o||"",X=typeof A=="boolean"?v.jsx("span",{className:w.loadingWrapper,style:{display:"contents"},children:A&&v.jsx(mc,{className:w.loadingIndicator,ownerState:c,children:N})}):null;return v.jsxs(dc,{ownerState:c,className:fe(n.className,w.root,m,M),component:f,disabled:y||A,focusRipple:!b,focusVisibleClassName:fe(w.focusVisible,d),ref:r,type:z,id:A?Y:x,...G,classes:w,children:[T,O!=="end"&&X,l,O==="end"&&X,D]})});process.env.NODE_ENV!=="production"&&(Fo.propTypes={children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["inherit","primary","secondary","success","error","info","warning"]),s.string]),component:s.elementType,disabled:s.bool,disableElevation:s.bool,disableFocusRipple:s.bool,disableRipple:s.bool,endIcon:s.node,focusVisibleClassName:s.string,fullWidth:s.bool,href:s.string,id:s.string,loading:s.bool,loadingIndicator:s.node,loadingPosition:s.oneOf(["center","end","start"]),size:s.oneOfType([s.oneOf(["small","medium","large"]),s.string]),startIcon:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),type:s.oneOfType([s.oneOf(["button","reset","submit"]),s.string]),variant:s.oneOfType([s.oneOf(["contained","outlined","text"]),s.string])});function hc(e){return ve("MuiDivider",e)}Me("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const gc=e=>{const{absolute:t,children:r,classes:n,flexItem:o,light:i,orientation:a,textAlign:l,variant:u}=e;return Pe({root:["root",t&&"absolute",u,i&&"light",a==="vertical"&&"vertical",o&&"flexItem",r&&"withChildren",r&&a==="vertical"&&"withChildrenVertical",l==="right"&&a!=="vertical"&&"textAlignRight",l==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},hc,n)},yc=ge("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,r.orientation==="vertical"&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&r.orientation==="vertical"&&t.withChildrenVertical,r.textAlign==="right"&&r.orientation!=="vertical"&&t.textAlignRight,r.textAlign==="left"&&r.orientation!=="vertical"&&t.textAlignLeft]}})(ke(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.alpha((e.vars||e).palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),bc=ge("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.wrapper,r.orientation==="vertical"&&t.wrapperVertical]}})(ke(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),er=j.forwardRef(function(t,r){const n=Oe({props:t,name:"MuiDivider"}),{absolute:o=!1,children:i,className:a,orientation:l="horizontal",component:u=i||l==="vertical"?"div":"hr",flexItem:f=!1,light:m=!1,role:y=u!=="hr"?"separator":void 0,textAlign:p="center",variant:b="fullWidth",...h}=n,d={...n,absolute:o,component:u,flexItem:f,light:m,orientation:l,role:y,textAlign:p,variant:b},g=gc(d);return v.jsx(yc,{as:u,className:fe(g.root,a),role:y,ref:r,ownerState:d,"aria-orientation":y==="separator"&&(u!=="hr"||l==="vertical")?l:void 0,...h,children:i?v.jsx(bc,{className:g.wrapper,ownerState:d,children:i}):null})});er&&(er.muiSkipListHighlight=!0),process.env.NODE_ENV!=="production"&&(er.propTypes={absolute:s.bool,children:s.node,classes:s.object,className:s.string,component:s.elementType,flexItem:s.bool,light:s.bool,orientation:s.oneOf(["horizontal","vertical"]),role:s.string,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),textAlign:s.oneOf(["center","left","right"]),variant:s.oneOfType([s.oneOf(["fullWidth","inset","middle"]),s.string])});function vc(e){return ve("MuiIconButton",e)}const qo=Me("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Sc=e=>{const{classes:t,disabled:r,color:n,edge:o,size:i,loading:a}=e,l={root:["root",a&&"loading",r&&"disabled",n!=="default"&&`color${te(n)}`,o&&`edge${te(o)}`,`size${te(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Pe(l,vc,t)},Cc=ge(Lr,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.loading&&t.loading,r.color!=="default"&&t[`color${te(r.color)}`],r.edge&&t[`edge${te(r.edge)}`],t[`size${te(r.size)}`]]}})(ke(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),ke(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(St()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(St()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${qo.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${qo.loading}`]:{color:"transparent"}}))),Tc=ge("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"}}]})),Ur=j.forwardRef(function(t,r){const n=Oe({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:a,color:l="default",disabled:u=!1,disableFocusRipple:f=!1,size:m="medium",id:y,loading:p=null,loadingIndicator:b,...h}=n,d=ao(y),g=b??v.jsx(Gr,{"aria-labelledby":d,color:"inherit",size:16}),x={...n,edge:o,color:l,disabled:u,disableFocusRipple:f,loading:p,loadingIndicator:g,size:m},A=Sc(x);return v.jsxs(Cc,{id:p?d:y,className:fe(A.root,a),centerRipple:!0,focusRipple:!f,disabled:u||p,ref:r,...h,ownerState:x,children:[typeof p=="boolean"&&v.jsx("span",{className:A.loadingWrapper,style:{display:"contents"},children:v.jsx(Tc,{className:A.loadingIndicator,ownerState:x,children:p&&g})}),i]})});process.env.NODE_ENV!=="production"&&(Ur.propTypes={children:Jt(s.node,e=>j.Children.toArray(e.children).some(r=>j.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(`
128
- `)):null),classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),s.string]),disabled:s.bool,disableFocusRipple:s.bool,disableRipple:s.bool,edge:s.oneOf(["end","start",!1]),id:s.string,loading:s.bool,loadingIndicator:s.node,size:s.oneOfType([s.oneOf(["small","medium","large"]),s.string]),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function xc(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return e===null?"null":e.constructor.name;default:return t}}function Go(e,t,r,n){const o=e[t];if(o==null||!Number.isInteger(o)){const i=xc(o);return new RangeError(`Invalid ${n} \`${t}\` of type \`${i}\` supplied to \`${r}\`, expected \`integer\`.`)}return null}function Uo(e,t,r,n){return e[t]===void 0?null:Go(e,t,r,n)}function Yr(){return null}Uo.isRequired=Go,Yr.isRequired=Yr;const wc=process.env.NODE_ENV==="production"?Yr:Uo;function Ec(e){return ve("MuiPaper",e)}Me("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Oc=e=>{const{square:t,elevation:r,variant:n,classes:o}=e,i={root:["root",n,!t&&"rounded",n==="elevation"&&`elevation${r}`]};return Pe(i,Ec,o)},$c=ge("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],!r.square&&t.rounded,r.variant==="elevation"&&t[`elevation${r.elevation}`]]}})(ke(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),Yo=j.forwardRef(function(t,r){const n=Oe({props:t,name:"MuiPaper"}),o=Oo(),{className:i,component:a="div",elevation:l=1,square:u=!1,variant:f="elevation",...m}=n,y={...n,component:a,elevation:l,square:u,variant:f},p=Oc(y);return process.env.NODE_ENV!=="production"&&o.shadows[l],v.jsx($c,{as:a,ownerState:y,className:fe(p.root,i),ref:r,...m,style:{...f==="elevation"&&{"--Paper-shadow":(o.vars||o).shadows[l],...o.vars&&{"--Paper-overlay":o.vars.overlays?.[l]},...!o.vars&&o.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Gt("#fff",$r(l))}, ${Gt("#fff",$r(l))})`}},...m.style}})});process.env.NODE_ENV!=="production"&&(Yo.propTypes={children:s.node,classes:s.object,className:s.string,component:s.elementType,elevation:Jt(wc,e=>{const{elevation:t,variant:r}=e;return t>0&&r==="outlined"?new Error(`MUI: Combining \`elevation={${t}}\` with \`variant="${r}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`):null}),square:s.bool,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),variant:s.oneOfType([s.oneOf(["elevation","outlined"]),s.string])});function kc(e){return ve("MuiTypography",e)}Me("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Ac={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Pc=yl(),Ic=e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:o,variant:i,classes:a}=e,l={root:["root",i,e.align!=="inherit"&&`align${te(t)}`,r&&"gutterBottom",n&&"noWrap",o&&"paragraph"]};return Pe(l,kc,a)},Mc=ge("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${te(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(ke(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([t,r])=>t!=="inherit"&&r&&typeof r=="object").map(([t,r])=>({props:{variant:t},style:r})),...Object.entries(e.palette).filter(St()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,t])=>typeof t=="string").map(([t])=>({props:{color:`text${te(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:t})=>t.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:t})=>t.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:t})=>t.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:t})=>t.paragraph,style:{marginBottom:16}}]}))),Ho={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Hr=j.forwardRef(function(t,r){const{color:n,...o}=Oe({props:t,name:"MuiTypography"}),i=!Ac[n],a=Pc({...o,...i&&{color:n}}),{align:l="inherit",className:u,component:f,gutterBottom:m=!1,noWrap:y=!1,paragraph:p=!1,variant:b="body1",variantMapping:h=Ho,...d}=a,g={...a,align:l,color:n,className:u,component:f,gutterBottom:m,noWrap:y,paragraph:p,variant:b,variantMapping:h},x=f||(p?"p":h[b]||Ho[b])||"span",A=Ic(g);return v.jsx(Mc,{as:x,ref:r,className:fe(A.root,u),...d,ownerState:g,style:{...l!=="inherit"&&{"--Typography-textAlign":l},...d.style}})});process.env.NODE_ENV!=="production"&&(Hr.propTypes={align:s.oneOf(["center","inherit","justify","left","right"]),children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),s.string]),component:s.elementType,gutterBottom:s.bool,noWrap:s.bool,paragraph:s.bool,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),variant:s.oneOfType([s.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),s.string]),variantMapping:s.object});function Ko(e){return e?typeof e=="object"&&("xs"in e||"sm"in e||"md"in e)?e:{xs:e}:{xs:12}}function Xo(e){if(!e)return{};const t={};for(const r of e)r.component==="Group"&&r.columns?Object.assign(t,Xo(r.columns)):t[r.name]=r.defaultValue??"";return t}function Qo(e){const t=[];for(const r of e)r.component==="Group"&&r.columns?t.push(...Qo(r.columns)):r.compute&&t.push({name:r.name,expr:r.compute.expr,dependencies:r.compute.dependencies||mn(r.compute.expr),precision:r.compute.precision,roundMode:r.compute.roundMode});return t}const tr=({schema:e,form:t,widgets:r={},optionsMap:n={},globalDisabled:o=!1,globalReadOnly:i=!1,label:a})=>{if(!e||!t||!r)return null;const{fields:l,append:u,remove:f}=Fe.useFieldArray({control:t.control,name:e.name}),m=W.useMemo(()=>e.columns?Qo(e.columns):[],[e.columns]),y=(E,z)=>{if(!m.some(Y=>Y.dependencies.includes(z)))return;const G=t.getValues(`${e.name}.${E}`);G&&m.forEach(({name:Y,expr:N,dependencies:c,precision:w,roundMode:T})=>{if(Y===z||!c.includes(z)||!c.every(re=>ar(G[re])))return;const M=hn(N,G,c,w,T),X=G[Y];M!==void 0&&M!==X&&!Number.isNaN(M)&&(typeof M!="number"||typeof X!="number"||Math.abs(M-X)>1e-4)&&t.setValue(`${e.name}.${E}.${Y}`,M,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0})})},p=t.watch(),{columns:b=[],minItems:h=0,maxItems:d=1/0,addText:g="添加一行",copyable:x=!1}=e,A=()=>{if(l.length>=d)return;const E=Xo(b);u(E)},R=E=>{if(l.length>=d)return;const z=t.getValues(`${e.name}.${E}`);u(z)},O=E=>{l.length<=h||f(E)},C=(E,z,Z)=>{const G=`${e.name}.${z}.${E.name}`,Y=p?.[e.name]?.[z]||{},N={...p,...Y},c=ut(E,N,o,i);if(!c.visible)return null;if(E.component==="Group")return v.jsx(U.Grid,{size:Ko(E.colSpan),children:v.jsx(U.Grid,{container:!0,spacing:2,children:E.columns?.map((M,X)=>C({...M,name:M.name},z,X))})},`${G}-${Z}`);const w=r[E.component]??r.Text;if(!w)return null;const T=n[E.name]??E.ui?.options??[],D=Ko(E.colSpan);return v.jsx(U.Grid,{size:D,children:v.jsx(Fe.Controller,{control:t.control,name:G,render:({field:M,fieldState:X})=>v.jsx(w,{error:!!X.error,field:{...M,onBlur:re=>{M.onBlur(),y(z,E.name)}},fieldProps:{...E.ui?.props,disabled:c.disabled,required:c.required,readOnly:c.readonly,placeholder:E.ui?.placeholder},form:t,helperText:X.error?.message??E.ui?.helperText,label:E.ui?.label,options:T})})},`${G}-${Z}`)};return v.jsxs(Qt,{children:[a&&v.jsx(Hr,{variant:"subtitle2",sx:{mb:1,fontWeight:600},children:a}),l.map((E,z)=>v.jsxs(Yo,{variant:"outlined",sx:{p:2,mb:2,position:"relative"},children:[v.jsxs(Qt,{sx:{position:"absolute",top:8,right:8,display:"flex",gap:.5},children:[x&&l.length<d&&!o&&v.jsx(Ur,{size:"small",onClick:()=>R(z),title:"复制",children:v.jsx(Tl,{fontSize:"small"})}),l.length>h&&!o&&v.jsx(Ur,{size:"small",onClick:()=>O(z),color:"error",title:"删除",children:v.jsx(xl,{fontSize:"small"})})]}),v.jsx(U.Grid,{container:!0,spacing:2,sx:{pr:6},children:b.map((Z,G)=>C(Z,z,G))})]},E.id)),l.length<d&&!o&&v.jsx(v.Fragment,{children:v.jsx(er,{sx:{my:2},children:v.jsx(Fo,{variant:"text",size:"small",startIcon:v.jsx(Cl,{}),onClick:A,children:g})})})]})};function _c(e){return e?typeof e=="object"&&("xs"in e||"sm"in e||"md"in e)?e:{xs:e}:{xs:12}}const Kr=({schema:e,form:t,widgets:r={},optionsMap:n={},globalDisabled:o=!1,globalReadOnly:i=!1,values:a})=>{if(!e?.columns||!t||!r)return null;const l=a||t.watch();return v.jsxs(Qt,{sx:{width:"100%"},children:[e.ui?.label&&v.jsx(Hr,{variant:"subtitle1",gutterBottom:!0,sx:{fontWeight:"bold",mb:2},children:e.ui.label}),v.jsx(Xe,{container:!0,spacing:2,children:e.columns.map((u,f)=>{const m=ut(u,l,o,i);if(!m.visible)return null;const y=r[u.component]??r.Text;if(!y)return null;const p=n[u.name]??u.ui?.options??[],b=_c(u.colSpan);return u.component==="Group"||u.component==="FormList"?v.jsx(Xe,{size:b,children:v.jsx(y,{field:{name:u.name,value:void 0,onChange:()=>{},onBlur:()=>{},ref:()=>{}},form:t,globalDisabled:o,globalReadOnly:i,optionsMap:n,schema:u,widgets:r,values:l})},`${String(u.name)}-${f}`):v.jsx(Xe,{size:b,children:v.jsx(Fe.Controller,{control:t.control,name:u.name,render:({field:h,fieldState:d})=>v.jsx(y,{error:!!d.error,field:h,fieldProps:{...u.ui?.props,disabled:m.disabled,required:m.required,readOnly:m.readonly,placeholder:u.ui?.placeholder},form:t,helperText:d.error?.message??u.ui?.helperText,label:u.ui?.label,options:p,values:l})})},`${String(u.name)}-${f}`)})})]})},Xr=({field:e})=>v.jsx("input",{type:"hidden",...e,value:e.value??""}),Qr=({field:e,label:t,error:r,helperText:n,fieldProps:o})=>v.jsx(U.TextField,{name:e.name,ref:e.ref,value:e.value??"",onChange:i=>{const a=i.target.value;e.onChange(a===""?null:Number(a))},onBlur:e.onBlur,type:"number",label:Te(t,o?.required),error:r,helperText:n,fullWidth:!0,size:"small",sx:$e,disabled:o?.disabled,required:o?.required,...o}),Jr=({field:e,label:t,error:r,helperText:n,fieldProps:o})=>v.jsx(U.TextField,{...e,value:e.value??"",type:"password",label:Te(t,o?.required),error:r,helperText:n,fullWidth:!0,size:"small",sx:$e,disabled:o?.disabled,required:o?.required,...o}),Jo=U.styled(U.Box)(({theme:e})=>({backgroundColor:"#fff",...e.typography.body2,textAlign:"center",color:(e.vars??e).palette.text.secondary,...e.applyStyles("dark",{backgroundColor:"#1A2027"})})),Zr=({field:e,label:t,options:r=[],error:n,helperText:o,fieldProps:i})=>{const a=m=>r.find(p=>String(p.value)===m)?.value??m,l=e.value!==void 0&&e.value!==null?String(e.value):"",u=i?.inline===!0,f=v.jsx(U.RadioGroup,{row:!0,onChange:m=>{const y=a(m.target.value);e.onChange(y)},value:l,sx:u?{flexWrap:"nowrap"}:void 0,children:r.map(m=>v.jsx(U.FormControlLabel,{control:v.jsx(U.Radio,{size:"small"}),disabled:m.disabled,label:m.label,value:String(m.value)},String(m.value)))});return v.jsxs(U.FormControl,{component:"fieldset",disabled:i?.disabled,error:n,required:i?.required,sx:{width:"100%","& .MuiFormLabel-root":{fontSize:14,"&.Mui-focused":{color:"primary.main"}},"& .MuiFormControlLabel-label":{fontSize:14},"& .MuiFormHelperText-root":{marginTop:"4px",fontSize:12}},children:[u?v.jsxs(U.Stack,{direction:"row",spacing:2,alignItems:"center",children:[v.jsx(Jo,{children:t&&v.jsx(U.FormLabel,{component:"legend",required:!1,sx:{mb:0,flexShrink:0},children:Te(t,i?.required)})}),v.jsx(Jo,{children:f})]}):v.jsxs(U.Stack,{spacing:0,children:[t&&v.jsx(U.FormLabel,{component:"legend",required:!1,children:Te(t,i?.required)}),f]}),o&&v.jsx(U.FormHelperText,{children:o})]})},en=({field:e,label:t,fieldProps:r})=>v.jsxs(U.FormControl,{children:[t&&v.jsx(U.FormLabel,{children:t}),v.jsx(U.Rating,{value:e.value??0,onChange:(n,o)=>e.onChange(o),disabled:r?.disabled,readOnly:r?.readOnly,...r})]}),tn=({field:e,label:t,fieldProps:r})=>v.jsxs(U.FormControl,{fullWidth:!0,children:[t&&v.jsx(U.FormLabel,{children:t}),v.jsx(U.Slider,{value:e.value??0,onChange:(n,o)=>e.onChange(o),disabled:r?.disabled,...r})]}),rn=({field:e,label:t,error:r,helperText:n,fieldProps:o})=>v.jsxs(U.FormControl,{error:r,required:o?.required,component:"fieldset",children:[v.jsx(U.FormControlLabel,{control:v.jsx(U.Switch,{checked:e.value??!1,disabled:o?.disabled,onChange:i=>e.onChange(i.target.checked),inputRef:e.ref}),label:Te(t,o?.required)}),n&&v.jsx(U.FormHelperText,{children:n})]}),nn=({field:e,label:t,error:r,helperText:n,fieldProps:o})=>v.jsx(U.TextField,{...e,value:e.value??"",label:Te(t,o?.required),multiline:!0,rows:4,error:r,helperText:n,fullWidth:!0,size:"small",sx:$e,disabled:o?.disabled,required:o?.required,...o}),on=({field:e,label:t,error:r,helperText:n,fieldProps:o})=>v.jsx(U.TextField,{...e,value:e.value??"",label:Te(t,o?.required),error:r,helperText:n,fullWidth:!0,size:"small",sx:$e,disabled:o?.disabled,required:o?.required,...o}),sn=({field:e,label:t,error:r,helperText:n,fieldProps:o})=>v.jsx(or.LocalizationProvider,{adapterLocale:"zh-cn",dateAdapter:ir.AdapterDayjs,children:v.jsx(oi.TimePicker,{disabled:o?.disabled,onChange:i=>e.onChange(i),slotProps:{textField:{fullWidth:!0,label:Te(t,o?.required),error:r,helperText:n,required:o?.required,size:"small",sx:$e}},value:e.value??null,...o})}),Zo={Hidden:Xr,Text:on,Password:Jr,Number:Qr,Textarea:nn,Select:lt,Autocomplete:lt,Checkbox:Ir,Switch:rn,Radio:Zr,Slider:tn,Rating:en,Date:Nr,Time:sn,DateTime:_r,Custom:Mr,Group:Kr,FormList:tr,hidden:Xr,text:on,password:Jr,number:Qr,textarea:nn,select:lt,autocomplete:lt,checkbox:Ir,switch:rn,radio:Zr,slider:tn,rating:en,date:Nr,time:sn,datetime:_r,custom:Mr,group:Kr,formList:tr,formlist:tr};async function Nc(e,t){const r=e.ui?.optionRequest;if(!r)return null;try{return await r(t)}catch{return e.ui?.options??[]}}function Rc(e,t){const[r,n]=W.useState({}),o=W.useRef({}),i=W.useRef(new Set),a=W.useRef({});return W.useEffect(()=>{i.current.clear(),o.current={},a.current={};const l={};for(const u of e)l[u.name]=u.ui?.options??[];n(l)},[e]),W.useEffect(()=>{e.forEach(async l=>{if(!l.ui?.optionRequest)return;const u=l.name,f=l.dependencies||[];let m=!1;const y={};if(f.forEach(p=>{y[p]=t[p]}),f.length===0)i.current.has(u)||(m=!0);else if(!i.current.has(u))m=!0;else{const p=o.current[u];f.some(h=>y[h]!==p?.[h])&&(m=!0)}if(m){i.current.add(u),o.current[u]=y;const p=(a.current[u]||0)+1;a.current[u]=p;try{const b=await Nc(l,t);a.current[u]===p&&b!==null&&n(h=>({...h,[u]:b}))}catch{a.current[u]}}})},[e,t]),r}function Dc(e,t){const{schema:r,defaultValues:n,onSubmit:o,onValuesChange:i,grid:a=!0,readOnly:l=!1,disabled:u=!1,widgets:f={},children:m,spacing:y}=e,p=W.useMemo(()=>dn(r),[r]),b=W.useRef(void 0);b.current===void 0&&(b.current={...p.defaultValues,...n||{}});const h=W.useMemo(()=>({...Zo,...f}),[f]),d=W.useMemo(()=>pn(p),[p]),g=Fe.useForm({defaultValues:b.current,resolver:d,mode:"onBlur",reValidateMode:"onBlur"}),x=W.useMemo(()=>un(p),[p]),A=Fe.useWatch({control:g.control,name:x}),R=W.useMemo(()=>{const N={};return Array.isArray(A)&&x.forEach((c,w)=>{N[c]=A[w]}),N},[A,x]),O=Rc(p.allFields,R),C=W.useRef({});W.useEffect(()=>{const N=C.current;if(Object.keys(N).length===0){C.current={...R};return}const c={};let w=!1;for(const T of p.allFields)if(T.dependencies?.length&&T.dependencies.some(M=>R[M]!==N[M])){const M=g.getValues(T.name);M!=null&&M!==""&&(c[T.name]=null,w=!0)}w&&Object.entries(c).forEach(([T,D])=>{g.setValue(T,D,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0})}),C.current={...R}},[R,p.allFields,g]),W.useEffect(()=>{i&&i(g.getValues())},[R,i,g]);const E=W.useMemo(()=>p.allFields.filter(N=>N.compute).map(N=>({name:N.name,expr:N.compute.expr,dependencies:N.compute.dependencies||mn(N.compute.expr),precision:N.compute.precision,roundMode:N.compute.roundMode})),[p.allFields]),z=W.useRef({});W.useEffect(()=>{if(E.length===0)return;let N=!1;const c={};for(const{name:w,expr:T,dependencies:D,precision:M,roundMode:X}of E){const re=D.map(K=>`${K}:${R[K]}`).join("|"),ce=z.current[w];if(re===ce)continue;if(!D.every(K=>ar(R[K]))){z.current[w]=re;continue}const k=hn(T,R,D,M,X),H=g.getValues(w);k!==void 0&&k!==H&&!Number.isNaN(k)&&(typeof k!="number"||typeof H!="number"||Math.abs(k-H)>1e-4)&&(c[w]=k,N=!0),z.current[w]=re}N&&g.reset({...g.getValues(),...c},{keepDirty:!0,keepTouched:!0,keepErrors:!0,keepDefaultValues:!1})},[R,E,g]);const Z=W.useCallback(async N=>{const c=g.getValues(),w={};for(const T of p.allFields){if(T.noSubmit)continue;const D=T.name;let M=D in N?N[D]:c[D];T.transform?w[D]=T.transform(M,c):w[D]=M}o&&await o(w)},[p.allFields,o,g]);W.useImperativeHandle(t,()=>({...g,submit:async()=>{await g.handleSubmit(Z)()},getFormValues:()=>{const c=g.getValues(),w={};for(const T of p.allFields)T.noSubmit||(w[T.name]=c[T.name]);return w},setValues:c=>{for(const[w,T]of Object.entries(c))T!==void 0&&g.setValue(w,T)}}),[g,p,Z]);const G=()=>p.input.fields.flatMap((c,w)=>{if(c.component==="Hidden")return[];const T=[];return c.newLine&&a&&T.push(v.jsx("div",{style:{gridColumn:"1 / -1",height:0}},`${String(c.name)}-${w}-newline`)),T.push(v.jsx(ko,{field:c,index:w,values:R,form:g,disabled:u,readOnly:l,widgets:h,optionsMap:O,useGrid:a},`${String(c.name)}-${w}`)),T}),Y=y??r.layout?.spacing??2;return v.jsx(Fe.FormProvider,{...g,children:v.jsxs("form",{noValidate:!0,style:{marginTop:"16px"},children:[a?v.jsx(Ao,{spacing:Y,children:G()}):v.jsx(Io,{spacing:Y,children:G()}),m]})})}const Bc=W.forwardRef(Dc);L.AutocompleteWidget=lt,L.CheckboxWidget=Ir,L.CustomWidget=Mr,L.DATETIME_FORMAT=Pr,L.DATE_FORMAT=Ar,L.DateTimeWidget=_r,L.DateWidget=Nr,L.FieldRenderer=ko,L.FormListWidget=tr,L.GridLayout=Ao,L.GroupWidget=Kr,L.HiddenWidget=Xr,L.NumberWidget=Qr,L.PasswordWidget=Jr,L.RadioWidget=Zr,L.RatingWidget=en,L.SchemaForm=Bc,L.SelectWidget=lt,L.SliderWidget=tn,L.StackLayout=Io,L.SwitchWidget=rn,L.TextWidget=on,L.TextareaWidget=nn,L.TimeWidget=sn,L.buildValibotSchema=fn,L.compactFieldStyles=$e,L.computeAllFieldStates=ci,L.computeFieldState=ut,L.createDynamicResolver=pn,L.defaultWidgets=Zo,L.evaluateCondition=Ne,L.extractDependencies=qe,L.getDownstreamFields=di,L.getWatchFields=un,L.mergeDefaultValues=fi,L.parseSchema=dn,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})}));
29
+ export default theme;`}function xs(t){return typeof t=="number"?`${(t*100).toFixed(0)}%`:`calc((${t}) * 100%)`}const cc=t=>{if(!Number.isNaN(+t))return+t;const e=t.match(/\d*\.?\d+/g);if(!e)return 0;let r=0;for(let n=0;n<e.length;n+=1)r+=+e[n];return r};function uc(t){Object.assign(t,{alpha(e,r){const n=this||t;return n.colorSpace?`oklch(from ${e} l c h / ${typeof r=="string"?`calc(${r})`:r})`:n.vars?`rgba(${e.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof r=="string"?`calc(${r})`:r})`:fs(e,cc(r))},lighten(e,r){const n=this||t;return n.colorSpace?`color-mix(in ${n.colorSpace}, ${e}, #fff ${xs(r)})`:$r(e,r)},darken(e,r){const n=this||t;return n.colorSpace?`color-mix(in ${n.colorSpace}, ${e}, #000 ${xs(r)})`:kr(e,r)}})}function Fn(t={},...e){const{breakpoints:r,mixins:n={},spacing:i,palette:s={},transitions:o={},typography:a={},shape:c,colorSpace:d,...l}=t;if(t.vars&&t.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.":Xe(20));const u=$n({...s,colorSpace:d}),h=is(t);let m=Te(h,{mixins:Xl(h.breakpoints,n),palette:u,shadows:rc.slice(),typography:Zl(u,a),transitions:oc(o),zIndex:{...ac}});if(m=Te(m,l),m=e.reduce((y,f)=>Te(y,f),m),process.env.NODE_ENV!=="production"){const y=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],f=(g,b)=>{let T;for(T in g){const A=g[T];if(y.includes(T)&&Object.keys(A).length>0){if(process.env.NODE_ENV!=="production"){const x=xn("",T)}g[T]={}}}};Object.keys(m.components).forEach(g=>{const b=m.components[g].styleOverrides;b&&g.startsWith("Mui")&&f(b,g)})}return m.unstable_sxConfig={...Or,...l?.unstable_sxConfig},m.unstable_sx=function(f){return yt({sx:f,theme:this})},m.toRuntimeSource=ws,uc(m),m}function dc(t){let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,Math.round(e*10)/1e3}const fc=[...Array(25)].map((t,e)=>{if(e===0)return"none";const r=dc(e);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Ts(t){return{inputPlaceholder:t==="dark"?.5:.42,inputUnderline:t==="dark"?.7:.42,switchTrackDisabled:t==="dark"?.2:.12,switchTrack:t==="dark"?.3:.38}}function Os(t){return t==="dark"?fc:[]}function hc(t){const{palette:e={mode:"light"},opacity:r,overlays:n,colorSpace:i,...s}=t,o=$n({...e,colorSpace:i});return{palette:o,opacity:{...Ts(o.mode),...r},overlays:n||Os(o.mode),...s}}function pc(t){return!!t[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!t[0].match(/sxConfig$/)||t[0]==="palette"&&!!t[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const mc=t=>[...[...Array(25)].map((e,r)=>`--${t?`${t}-`:""}overlays-${r}`),`--${t?`${t}-`:""}palette-AppBar-darkBg`,`--${t?`${t}-`:""}palette-AppBar-darkColor`],gc=t=>(e,r)=>{const n=t.rootSelector||":root",i=t.colorSchemeSelector;let s=i;if(i==="class"&&(s=".%s"),i==="data"&&(s="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(s=`[${i}="%s"]`),t.defaultColorScheme===e){if(e==="dark"){const o={};return mc(t.cssVarPrefix).forEach(a=>{o[a]=r[a],delete r[a]}),s==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:o}}:s?{[s.replace("%s",e)]:o,[`${n}, ${s.replace("%s",e)}`]:r}:{[n]:{...r,...o}}}if(s&&s!=="media")return`${n}, ${s.replace("%s",String(e))}`}else if(e){if(s==="media")return{[`@media (prefers-color-scheme: ${String(e)})`]:{[n]:r}};if(s)return s.replace("%s",String(e))}return n};function yc(t,e){e.forEach(r=>{t[r]||(t[r]={})})}function C(t,e,r){!t[e]&&r&&(t[e]=r)}function Rt(t){return typeof t!="string"||!t.startsWith("hsl")?t:us(t)}function je(t,e){`${e}Channel`in t||(t[`${e}Channel`]=Lt(Rt(t[e]),`MUI: Can't create \`palette.${e}Channel\` because \`palette.${e}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
30
+ To suppress this warning, you need to explicitly provide the \`palette.${e}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function vc(t){return typeof t=="number"?`${t}px`:typeof t=="string"||typeof t=="function"||Array.isArray(t)?t:"8px"}const Ne=t=>{try{return t()}catch{}},bc=(t="mui")=>Dl(t);function In(t,e,r,n,i){if(!r)return;r=r===!0?{}:r;const s=i==="dark"?"dark":"light";if(!n){e[i]=hc({...r,palette:{mode:s,...r?.palette},colorSpace:t});return}const{palette:o,...a}=Fn({...n,palette:{mode:s,...r?.palette},colorSpace:t});return e[i]={...r,palette:o,opacity:{...Ts(s),...r?.opacity},overlays:r?.overlays||Os(s)},a}function Sc(t={},...e){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:s="mui",nativeColor:o=!1,shouldSkipGeneratingVar:a=pc,colorSchemeSelector:c=r.light&&r.dark?"media":void 0,rootSelector:d=":root",...l}=t,u=Object.keys(r)[0],h=n||(r.light&&u!=="light"?"light":u),m=bc(s),{[h]:y,light:f,dark:g,...b}=r,T={...b};let A=y;if((h==="dark"&&!("dark"in r)||h==="light"&&!("light"in r))&&(A=!0),!A)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${h}\` option is either missing or invalid.`:Xe(21,h));let x;o&&(x="oklch");const E=In(x,T,A,l,h);f&&!T.light&&In(x,T,f,void 0,"light"),g&&!T.dark&&In(x,T,g,void 0,"dark");let M={defaultColorScheme:h,...E,cssVarPrefix:s,colorSchemeSelector:c,rootSelector:d,getCssVar:m,colorSchemes:T,font:{...Kl(E.typography),...E.font},spacing:vc(l.spacing)};Object.keys(M.colorSchemes).forEach(H=>{const p=M.colorSchemes[H].palette,_=R=>{const G=R.split("-"),le=G[1],ge=G[2];return m(R,p[le][ge])};p.mode==="light"&&(C(p.common,"background","#fff"),C(p.common,"onBackground","#000")),p.mode==="dark"&&(C(p.common,"background","#000"),C(p.common,"onBackground","#fff"));function $(R,G,le){if(x){let ge;return R===ct&&(ge=`transparent ${((1-le)*100).toFixed(0)}%`),R===ie&&(ge=`#000 ${(le*100).toFixed(0)}%`),R===se&&(ge=`#fff ${(le*100).toFixed(0)}%`),`color-mix(in ${x}, ${G}, ${ge})`}return R(G,le)}if(yc(p,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),p.mode==="light"){C(p.Alert,"errorColor",$(ie,p.error.light,.6)),C(p.Alert,"infoColor",$(ie,p.info.light,.6)),C(p.Alert,"successColor",$(ie,p.success.light,.6)),C(p.Alert,"warningColor",$(ie,p.warning.light,.6)),C(p.Alert,"errorFilledBg",_("palette-error-main")),C(p.Alert,"infoFilledBg",_("palette-info-main")),C(p.Alert,"successFilledBg",_("palette-success-main")),C(p.Alert,"warningFilledBg",_("palette-warning-main")),C(p.Alert,"errorFilledColor",Ne(()=>p.getContrastText(p.error.main))),C(p.Alert,"infoFilledColor",Ne(()=>p.getContrastText(p.info.main))),C(p.Alert,"successFilledColor",Ne(()=>p.getContrastText(p.success.main))),C(p.Alert,"warningFilledColor",Ne(()=>p.getContrastText(p.warning.main))),C(p.Alert,"errorStandardBg",$(se,p.error.light,.9)),C(p.Alert,"infoStandardBg",$(se,p.info.light,.9)),C(p.Alert,"successStandardBg",$(se,p.success.light,.9)),C(p.Alert,"warningStandardBg",$(se,p.warning.light,.9)),C(p.Alert,"errorIconColor",_("palette-error-main")),C(p.Alert,"infoIconColor",_("palette-info-main")),C(p.Alert,"successIconColor",_("palette-success-main")),C(p.Alert,"warningIconColor",_("palette-warning-main")),C(p.AppBar,"defaultBg",_("palette-grey-100")),C(p.Avatar,"defaultBg",_("palette-grey-400")),C(p.Button,"inheritContainedBg",_("palette-grey-300")),C(p.Button,"inheritContainedHoverBg",_("palette-grey-A100")),C(p.Chip,"defaultBorder",_("palette-grey-400")),C(p.Chip,"defaultAvatarColor",_("palette-grey-700")),C(p.Chip,"defaultIconColor",_("palette-grey-700")),C(p.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),C(p.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),C(p.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),C(p.LinearProgress,"primaryBg",$(se,p.primary.main,.62)),C(p.LinearProgress,"secondaryBg",$(se,p.secondary.main,.62)),C(p.LinearProgress,"errorBg",$(se,p.error.main,.62)),C(p.LinearProgress,"infoBg",$(se,p.info.main,.62)),C(p.LinearProgress,"successBg",$(se,p.success.main,.62)),C(p.LinearProgress,"warningBg",$(se,p.warning.main,.62)),C(p.Skeleton,"bg",x?$(ct,p.text.primary,.11):`rgba(${_("palette-text-primaryChannel")} / 0.11)`),C(p.Slider,"primaryTrack",$(se,p.primary.main,.62)),C(p.Slider,"secondaryTrack",$(se,p.secondary.main,.62)),C(p.Slider,"errorTrack",$(se,p.error.main,.62)),C(p.Slider,"infoTrack",$(se,p.info.main,.62)),C(p.Slider,"successTrack",$(se,p.success.main,.62)),C(p.Slider,"warningTrack",$(se,p.warning.main,.62));const R=x?$(ie,p.background.default,.6825):Fr(p.background.default,.8);C(p.SnackbarContent,"bg",R),C(p.SnackbarContent,"color",Ne(()=>x?kn.text.primary:p.getContrastText(R))),C(p.SpeedDialAction,"fabHoverBg",Fr(p.background.paper,.15)),C(p.StepConnector,"border",_("palette-grey-400")),C(p.StepContent,"border",_("palette-grey-400")),C(p.Switch,"defaultColor",_("palette-common-white")),C(p.Switch,"defaultDisabledColor",_("palette-grey-100")),C(p.Switch,"primaryDisabledColor",$(se,p.primary.main,.62)),C(p.Switch,"secondaryDisabledColor",$(se,p.secondary.main,.62)),C(p.Switch,"errorDisabledColor",$(se,p.error.main,.62)),C(p.Switch,"infoDisabledColor",$(se,p.info.main,.62)),C(p.Switch,"successDisabledColor",$(se,p.success.main,.62)),C(p.Switch,"warningDisabledColor",$(se,p.warning.main,.62)),C(p.TableCell,"border",$(se,$(ct,p.divider,1),.88)),C(p.Tooltip,"bg",$(ct,p.grey[700],.92))}if(p.mode==="dark"){C(p.Alert,"errorColor",$(se,p.error.light,.6)),C(p.Alert,"infoColor",$(se,p.info.light,.6)),C(p.Alert,"successColor",$(se,p.success.light,.6)),C(p.Alert,"warningColor",$(se,p.warning.light,.6)),C(p.Alert,"errorFilledBg",_("palette-error-dark")),C(p.Alert,"infoFilledBg",_("palette-info-dark")),C(p.Alert,"successFilledBg",_("palette-success-dark")),C(p.Alert,"warningFilledBg",_("palette-warning-dark")),C(p.Alert,"errorFilledColor",Ne(()=>p.getContrastText(p.error.dark))),C(p.Alert,"infoFilledColor",Ne(()=>p.getContrastText(p.info.dark))),C(p.Alert,"successFilledColor",Ne(()=>p.getContrastText(p.success.dark))),C(p.Alert,"warningFilledColor",Ne(()=>p.getContrastText(p.warning.dark))),C(p.Alert,"errorStandardBg",$(ie,p.error.light,.9)),C(p.Alert,"infoStandardBg",$(ie,p.info.light,.9)),C(p.Alert,"successStandardBg",$(ie,p.success.light,.9)),C(p.Alert,"warningStandardBg",$(ie,p.warning.light,.9)),C(p.Alert,"errorIconColor",_("palette-error-main")),C(p.Alert,"infoIconColor",_("palette-info-main")),C(p.Alert,"successIconColor",_("palette-success-main")),C(p.Alert,"warningIconColor",_("palette-warning-main")),C(p.AppBar,"defaultBg",_("palette-grey-900")),C(p.AppBar,"darkBg",_("palette-background-paper")),C(p.AppBar,"darkColor",_("palette-text-primary")),C(p.Avatar,"defaultBg",_("palette-grey-600")),C(p.Button,"inheritContainedBg",_("palette-grey-800")),C(p.Button,"inheritContainedHoverBg",_("palette-grey-700")),C(p.Chip,"defaultBorder",_("palette-grey-700")),C(p.Chip,"defaultAvatarColor",_("palette-grey-300")),C(p.Chip,"defaultIconColor",_("palette-grey-300")),C(p.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),C(p.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),C(p.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),C(p.LinearProgress,"primaryBg",$(ie,p.primary.main,.5)),C(p.LinearProgress,"secondaryBg",$(ie,p.secondary.main,.5)),C(p.LinearProgress,"errorBg",$(ie,p.error.main,.5)),C(p.LinearProgress,"infoBg",$(ie,p.info.main,.5)),C(p.LinearProgress,"successBg",$(ie,p.success.main,.5)),C(p.LinearProgress,"warningBg",$(ie,p.warning.main,.5)),C(p.Skeleton,"bg",x?$(ct,p.text.primary,.13):`rgba(${_("palette-text-primaryChannel")} / 0.13)`),C(p.Slider,"primaryTrack",$(ie,p.primary.main,.5)),C(p.Slider,"secondaryTrack",$(ie,p.secondary.main,.5)),C(p.Slider,"errorTrack",$(ie,p.error.main,.5)),C(p.Slider,"infoTrack",$(ie,p.info.main,.5)),C(p.Slider,"successTrack",$(ie,p.success.main,.5)),C(p.Slider,"warningTrack",$(ie,p.warning.main,.5));const R=x?$(se,p.background.default,.985):Fr(p.background.default,.98);C(p.SnackbarContent,"bg",R),C(p.SnackbarContent,"color",Ne(()=>x?gs.text.primary:p.getContrastText(R))),C(p.SpeedDialAction,"fabHoverBg",Fr(p.background.paper,.15)),C(p.StepConnector,"border",_("palette-grey-600")),C(p.StepContent,"border",_("palette-grey-600")),C(p.Switch,"defaultColor",_("palette-grey-300")),C(p.Switch,"defaultDisabledColor",_("palette-grey-600")),C(p.Switch,"primaryDisabledColor",$(ie,p.primary.main,.55)),C(p.Switch,"secondaryDisabledColor",$(ie,p.secondary.main,.55)),C(p.Switch,"errorDisabledColor",$(ie,p.error.main,.55)),C(p.Switch,"infoDisabledColor",$(ie,p.info.main,.55)),C(p.Switch,"successDisabledColor",$(ie,p.success.main,.55)),C(p.Switch,"warningDisabledColor",$(ie,p.warning.main,.55)),C(p.TableCell,"border",$(ie,$(ct,p.divider,1),.68)),C(p.Tooltip,"bg",$(ct,p.grey[700],.92))}je(p.background,"default"),je(p.background,"paper"),je(p.common,"background"),je(p.common,"onBackground"),je(p,"divider"),Object.keys(p).forEach(R=>{const G=p[R];R!=="tonalOffset"&&G&&typeof G=="object"&&(G.main&&C(p[R],"mainChannel",Lt(Rt(G.main))),G.light&&C(p[R],"lightChannel",Lt(Rt(G.light))),G.dark&&C(p[R],"darkChannel",Lt(Rt(G.dark))),G.contrastText&&C(p[R],"contrastTextChannel",Lt(Rt(G.contrastText))),R==="text"&&(je(p[R],"primary"),je(p[R],"secondary")),R==="action"&&(G.active&&je(p[R],"active"),G.selected&&je(p[R],"selected")))})}),M=e.reduce((H,p)=>Te(H,p),M);const B={prefix:s,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:gc(M),enableContrastVars:o},{vars:N,generateThemeVars:L,generateStyleSheets:z}=Bl(M,B);return M.vars=N,Object.entries(M.colorSchemes[M.defaultColorScheme]).forEach(([H,p])=>{M[H]=p}),M.generateThemeVars=L,M.generateStyleSheets=z,M.generateSpacing=function(){return ns(l.spacing,En(this))},M.getColorSchemeSelector=Rl(c),M.spacing=M.generateSpacing(),M.shouldSkipGeneratingVar=a,M.unstable_sxConfig={...Or,...l?.unstable_sxConfig},M.unstable_sx=function(p){return yt({sx:p,theme:this})},M.toRuntimeSource=ws,M}function As(t,e,r){t.colorSchemes&&r&&(t.colorSchemes[e]={...r!==!0&&r,palette:$n({...r===!0?{}:r.palette,mode:e})})}function Ec(t={},...e){const{palette:r,cssVariables:n=!1,colorSchemes:i=r?void 0:{light:!0},defaultColorScheme:s=r?.mode,...o}=t,a=s||"light",c=i?.[a],d={...i,...r?{[a]:{...typeof c!="boolean"&&c,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in t))return Fn(t,...e);let l=r;"palette"in t||d[a]&&(d[a]!==!0?l=d[a].palette:a==="dark"&&(l={mode:"dark"}));const u=Fn({...t,palette:l},...e);return u.defaultColorScheme=a,u.colorSchemes=d,u.palette.mode==="light"&&(u.colorSchemes.light={...d.light!==!0&&d.light,palette:u.palette},As(u,"dark",d.dark)),u.palette.mode==="dark"&&(u.colorSchemes.dark={...d.dark!==!0&&d.dark,palette:u.palette},As(u,"light",d.light)),u}return!r&&!("light"in d)&&a==="light"&&(d.light=!0),Sc({...o,colorSchemes:d,defaultColorScheme:a,...typeof n!="boolean"&&n},...e)}const Cc=Ec(),wc="$$material";function xc(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const Tc=wl({themeId:wc,defaultTheme:Cc,rootShouldForwardProp:t=>xc(t)&&t!=="classes"}),Oc=Pl;process.env.NODE_ENV!=="production"&&(te.node,te.object.isRequired);function Ac(t){return Vl(t)}function Mc(t){return xn("MuiSvgIcon",t)}vl("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const _c=t=>{const{color:e,fontSize:r,classes:n}=t,i={root:["root",e!=="inherit"&&`color${ot(e)}`,`fontSize${ot(r)}`]};return ca(i,Mc,n)},kc=Tc("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.color!=="inherit"&&e[`color${ot(r.color)}`],e[`fontSize${ot(r.fontSize)}`]]}})(Oc(({theme:t})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:t.transitions?.create?.("fill",{duration:(t.vars??t).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:t.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:t.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:t.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((t.vars??t).palette).filter(([,e])=>e&&e.main).map(([e])=>({props:{color:e},style:{color:(t.vars??t).palette?.[e]?.main}})),{props:{color:"action"},style:{color:(t.vars??t).palette?.action?.active}},{props:{color:"disabled"},style:{color:(t.vars??t).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),Ir=Ve.forwardRef(function(e,r){const n=Ac({props:e,name:"MuiSvgIcon"}),{children:i,className:s,color:o="inherit",component:a="svg",fontSize:c="medium",htmlColor:d,inheritViewBox:l=!1,titleAccess:u,viewBox:h="0 0 24 24",...m}=n,y=Ve.isValidElement(i)&&i.type==="svg",f={...n,color:o,component:a,fontSize:c,instanceFontSize:e.fontSize,inheritViewBox:l,viewBox:h,hasSvgAsChild:y},g={};l||(g.viewBox=h);const b=_c(f);return v.jsxs(kc,{as:a,className:zi(b.root,s),focusable:"false",color:d,"aria-hidden":u?void 0:!0,role:u?"img":void 0,ref:r,...g,...m,...y&&i.props,ownerState:f,children:[y?i.props.children:i,u?v.jsx("title",{children:u}):null]})});process.env.NODE_ENV!=="production"&&(Ir.propTypes={children:te.node,classes:te.object,className:te.string,color:te.oneOfType([te.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),te.string]),component:te.elementType,fontSize:te.oneOfType([te.oneOf(["inherit","large","medium","small"]),te.string]),htmlColor:te.string,inheritViewBox:te.bool,shapeRendering:te.string,sx:te.oneOfType([te.arrayOf(te.oneOfType([te.func,te.object,te.bool])),te.func,te.object]),titleAccess:te.string,viewBox:te.string}),Ir.muiName="SvgIcon";function Vn(t,e){function r(n,i){return v.jsx(Ir,{"data-testid":process.env.NODE_ENV!=="production"?`${e}Icon`:void 0,ref:i,...n,children:t})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${e}Icon`),r.muiName=Ir.muiName,Ve.memo(Ve.forwardRef(r))}const $c=Vn(v.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"),Fc=Vn(v.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),Ic=Vn(v.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"),Pn=O.memo(function({value:e,onChange:r,name:n,layoutChildren:i,label:s,helperText:o,disabled:a,visible:c=!0,minItems:d=0,maxItems:l=1/0,addText:u="添加一项",copyable:h=!1,emptyText:m="暂无数据",showIndex:y=!1,itemDefaultValue:f={},required:g}){if(!c)return null;const b=Array.isArray(e)?e:[],{renderField:T}=dn(),A=b.length<l&&!a,x=b.length>d&&!a,E=O.useCallback(()=>{A&&r([...b,{...f}])},[A,b,r,f]),M=O.useCallback(L=>{if(!A)return;const z=b[L];r([...b,{...z}])},[A,b,r]),B=O.useCallback(L=>{x&&r(b.filter((z,H)=>H!==L))},[x,b,r]),N=O.useCallback(L=>(z,H)=>{let p=z;return n&&z.startsWith(n+".")?p=`${n}[${L}]${z.substring(n.length)}`:n&&!z.includes(".")&&(p=`${n}[${L}].${z}`),T(p,H)},[n,T]);return v.jsxs(w.Stack,{spacing:2,sx:{width:"100%"},children:[s&&v.jsx(w.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:v.jsxs(w.Typography,{variant:"subtitle1",fontWeight:"bold",children:[de(s,g),l!==1/0&&v.jsxs(w.Typography,{component:"span",variant:"body2",color:"text.secondary",sx:{ml:1},children:["(",b.length,"/",l,")"]})]})}),o&&v.jsx(w.Typography,{variant:"body2",color:"text.secondary",children:o}),b.length===0&&v.jsx(w.Box,{sx:{p:3,textAlign:"center",color:"text.secondary",border:"1px dashed",borderColor:"divider",borderRadius:1},children:v.jsx(w.Typography,{variant:"body2",children:m})}),b.map((L,z)=>v.jsx(w.Card,{variant:"outlined",children:v.jsx(w.CardContent,{sx:{p:2,"&:last-child":{pb:2}},children:v.jsxs(w.Stack,{direction:"row",alignItems:"flex-start",spacing:2,children:[y&&v.jsxs(w.Typography,{variant:"body2",color:"text.secondary",sx:{minWidth:24,pt:1,fontWeight:"bold"},children:["#",z+1]}),v.jsx(w.Box,{flexGrow:1,children:i&&v.jsx(w.Grid,{container:!0,spacing:2,children:v.jsx(dr,{layout:i,renderField:N(z)})})}),v.jsxs(w.Stack,{direction:"row",spacing:.5,sx:{pt:.5},children:[h&&A&&v.jsx(w.Tooltip,{title:"复制此行",children:v.jsx(w.IconButton,{onClick:()=>M(z),size:"small",color:"primary",children:v.jsx(Ic,{fontSize:"small"})})}),x&&v.jsx(w.Tooltip,{title:"删除此行",children:v.jsx(w.IconButton,{onClick:()=>B(z),size:"small",color:"error",children:v.jsx($c,{fontSize:"small"})})})]})]})})},z)),A&&v.jsx(w.Divider,{children:v.jsx(w.Button,{startIcon:v.jsx(Fc,{}),onClick:E,variant:"text",size:"small",disabled:a,children:u})})]})}),Vc=Pn,wt={Text:Jr,Password:Io,Textarea:Vo,Number:en,Slider:ln,Rating:cn,Select:Ti,Autocomplete:lr,Radio:nn,Checkbox:tn,Switch:rn,Date:sn,Time:on,DateTime:an,FormList:Pn,Group:fn,Hidden:un,Custom:hn};function Pc(t){return wt[t]}function Dc(t,e){wt[t]=e}function Lc(t){Object.assign(wt,t)}function Nc(){return Object.keys(wt)}function Bc(t){return t?typeof t=="number"?{xs:t}:t:{xs:12}}const Ms=O.memo(function({field:e,form:r,widgets:n,disabled:i,readOnly:s,layoutChildren:o}){const a=n[e.component];if(!a)return null;const c=Bc(e.props?.colSpan),d=e.props||{};return d.independent===!0?v.jsx(w.Grid,{size:12,children:v.jsx(w.Grid,{container:!0,children:v.jsx(w.Grid,{size:c,children:v.jsx(be,{form:r,name:e.name,validate:e.validate,fieldProps:{disabled:i||d.disabled,readOnly:s||d.readOnly,layoutChildren:o},render:u=>v.jsx(a,{...u,...d,label:d.label,placeholder:d.placeholder,helperText:d.helperText,options:u.options?.length?u.options:d.options})})})})}):v.jsx(w.Grid,{size:c,children:v.jsx(be,{form:r,name:e.name,validate:e.validate,fieldProps:{disabled:i||d.disabled,readOnly:s||d.readOnly,layoutChildren:o},render:u=>v.jsx(a,{...u,...d,label:d.label,placeholder:d.placeholder,helperText:d.helperText,options:u.options?.length?u.options:d.options})})})}),Rc=O.memo(function t({nodes:e,fields:r,form:n,widgets:i,disabled:s,readOnly:o,spacing:a=2}){return v.jsx(v.Fragment,{children:e.map((c,d)=>{if(c.type==="field"&&c.field){const l=r[c.field];return l?v.jsx(Ms,{field:l,form:n,widgets:i,disabled:s,readOnly:o,layoutChildren:c.children},l.name):null}if(c.type==="container"&&c.children){const l=c.component,u=c.props||{};return l==="Grid"?v.jsx(w.Grid,{container:!0,spacing:u.spacing??a,...u,children:v.jsx(t,{nodes:c.children,fields:r,form:n,widgets:i,disabled:s,readOnly:o,spacing:a})},`container-${d}`):v.jsx(O.Fragment,{children:v.jsx(t,{nodes:c.children,fields:r,form:n,widgets:i,disabled:s,readOnly:o,spacing:a})},`container-${d}`)}return null})})}),_s=O.memo(function({schema:e,form:r,widgets:n,disabled:i,readOnly:s,spacing:o=2}){const a=O.useMemo(()=>({...wt,...n}),[n]),c=O.useMemo(()=>e.layout&&e.layout.length>0?e.layout:Object.keys(e.fields).map(l=>({type:"field",field:l})),[e.layout,e.fields]),d=O.useCallback((l,u)=>{let h=e.fields[l];if(!h){const m=l.replace(/\[\d+\]/g,""),y=e.fields[m];y&&(h={...y,name:l})}return h?v.jsx(Ms,{field:h,form:r,widgets:a,disabled:i,readOnly:s,layoutChildren:u},h.name):null},[e.fields,r,a,i,s]);return v.jsx(ur.Provider,{value:{renderField:d},children:v.jsx(w.Grid,{container:!0,spacing:o,children:v.jsx(Rc,{nodes:c,fields:e.fields,form:r,widgets:a,disabled:i,readOnly:s,spacing:o})})})});function Wc(t,e){const{schema:r,defaultValues:n,onSubmit:i,onValuesChange:s,onSubmitFailed:o,widgets:a,disabled:c,readOnly:d,spacing:l=2,formProps:u,children:h,sx:m,compilerOptions:y,runtimeConfig:f}=t,{form:g,runtime:b,compiledSchema:T,handleSubmit:A,handleReset:x,getValues:E,setValue:M}=gi({schema:r,defaultValues:n,onSubmit:i,onValuesChange:s,compilerOptions:y,runtimeConfig:f});O.useImperativeHandle(e,()=>({submit:A,reset:x,getValues:E,setValue:M,setValues:N=>{for(const[L,z]of Object.entries(N))M(L,z)},getForm:()=>g,getRuntime:()=>b,getCompiledSchema:()=>T,validate:async N=>N?(await g.validateField(N),!g.getFieldMeta(N)?.errors?.length):(await g.validate(),g.state.isValid),clearErrors:N=>{if(N)g.setFieldMeta(N,L=>({...L,errors:[]}));else for(const L of Object.keys(T.fields))g.setFieldMeta(L,z=>({...z,errors:[]}))}}),[g,b,T,A,x,E,M]);const B=N=>{N.preventDefault(),N.stopPropagation(),A()};return v.jsx(tt.LocalizationProvider,{dateAdapter:Ut.AdapterDayjs,adapterLocale:"zh-cn",children:v.jsxs(vi,{runtime:b,children:[v.jsxs(w.Box,{component:"form",onSubmit:B,sx:m,...u,children:[v.jsx(_s,{schema:T,form:g,widgets:a,disabled:c,readOnly:d,spacing:l}),h]}),!1]})})}const zc=O.forwardRef(Wc);k.AsyncScheduler=Gn,k.AutocompleteWidget=xi,k.AutocompleteWidgetRender=lr,k.CheckboxWidget=Bo,k.CheckboxWidgetRender=tn,k.CustomWidget=Jo,k.CustomWidgetRender=hn,k.DATETIME_FORMAT=wi,k.DATE_FORMAT=Ei,k.DateTimeWidget=qo,k.DateTimeWidgetRender=an,k.DateWidget=zo,k.DateWidgetRender=sn,k.DependencyAnalyzer=Dr,k.EffectSystem=Un,k.FieldAdapter=be,k.FormListWidget=Vc,k.FormListWidgetRender=Pn,k.FormRuntime=Hn,k.GroupWidget=Zo,k.GroupWidgetRender=fn,k.HiddenWidget=Qo,k.HiddenWidgetRender=un,k.LayoutContext=ur,k.LayoutRenderer=dr,k.NumberWidget=Po,k.NumberWidgetRender=en,k.RadioWidget=Wo,k.RadioWidgetRender=nn,k.RatingWidget=Xo,k.RatingWidgetRender=cn,k.SafeEvaluator=Rn,k.SchemaCompiler=Ht,k.SchemaForm=zc,k.SchemaFormProvider=vi,k.SchemaLinter=Nr,k.SchemaRenderer=_s,k.SelectWidget=No,k.SelectWidgetRender=Ti,k.SliderWidget=Ko,k.SliderWidgetRender=ln,k.SwitchWidget=Ro,k.SwitchWidgetRender=rn,k.TIME_FORMAT=Ci,k.TextWidget=Fo,k.TextWidgetRender=Jr,k.TimeWidget=Yo,k.TimeWidgetRender=on,k.ValidationPresetsProvider=Ao,k.compactFieldStyles=Le,k.createCompiler=Ys,k.createFieldAdapter=ko,k.createFieldValidator=Qs,k.createValidationRegistry=Lr,k.defaultRuleFactories=Wn,k.defaultWidgets=wt,k.dependencyAnalyzer=Ws,k.getRegisteredWidgetTypes=Nc,k.getWidget=Pc,k.globalValidationRegistry=nt,k.inferFieldType=Kn,k.isPresetRulesArray=Mt,k.lintSchema=Ks,k.overridePresetRule=js,k.parseColSpan=$o,k.presetToSchema=Gt,k.registerPresetRule=zs,k.registerWidget=Dc,k.registerWidgets=Lc,k.renderLabel=de,k.rulesToValibot=qn,k.safeEvaluator=At,k.schemaCompiler=zn,k.schemaLinter=jn,k.useLayoutContext=dn,k.useRuntime=Qr,k.useSchemaForm=gi,k.useValidationPresets=Zr,k.useValidationPresetsContext=Mo,k.valibotFormValidator=Xs,k.valibotValidator=Yn,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})}));