@opengov/form-renderer 0.2.10 → 0.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lib.js CHANGED
@@ -22045,25 +22045,37 @@ function O8({
22045
22045
  id: e,
22046
22046
  name: t,
22047
22047
  readonly: r,
22048
- wrapper: n
22048
+ disabled: n,
22049
+ wrapper: u
22049
22050
  }) {
22050
- const { field: u } = V1(), i = a4(e), a = i4(i.type);
22051
- if (!a || !a.renderField) return /* @__PURE__ */ J.jsxs(Pr, { children: [
22051
+ const { field: i } = V1(), a = a4(e), s = i4(a.type);
22052
+ if (!s || !s.renderField) return /* @__PURE__ */ J.jsxs(Pr, { children: [
22052
22053
  "Missing render for field type ",
22053
- i.type
22054
+ a.type
22054
22055
  ] });
22055
- const { renderField: s, ...l } = a, c = u == null ? void 0 : u(i, l), f = n || Pr;
22056
- return /* @__PURE__ */ J.jsx(f, { "data-testid": "field-container", field: i, sx: c, children: s(i, l, { readonly: r, name: t }) });
22056
+ const { renderField: l, ...c } = s, f = i == null ? void 0 : i(a, c), p = u || Pr;
22057
+ return /* @__PURE__ */ J.jsx(p, { "data-testid": "field-container", field: a, sx: f, children: l(a, c, { readonly: r, name: t, disabled: n }) });
22057
22058
  }
22058
22059
  function $8({
22059
22060
  section: e,
22060
22061
  fields: t,
22061
22062
  fieldNames: r,
22062
22063
  readonly: n,
22063
- fieldWrapper: u
22064
+ disabled: u,
22065
+ fieldWrapper: i
22064
22066
  }) {
22065
- const { section: i } = V1(), a = i == null ? void 0 : i(e);
22066
- return /* @__PURE__ */ J.jsx(Pr, { "data-testid": "section-container", sx: a, children: t.map((s, l) => /* @__PURE__ */ J.jsx(O8, { id: s, name: (r == null ? void 0 : r[l]) ?? s, readonly: n, wrapper: u }, s)) });
22067
+ const { section: a } = V1(), s = a == null ? void 0 : a(e);
22068
+ return /* @__PURE__ */ J.jsx(Pr, { "data-testid": "section-container", sx: s, children: t.map((l, c) => /* @__PURE__ */ J.jsx(
22069
+ O8,
22070
+ {
22071
+ id: l,
22072
+ name: (r == null ? void 0 : r[c]) ?? l,
22073
+ readonly: n,
22074
+ disabled: u,
22075
+ wrapper: i
22076
+ },
22077
+ l
22078
+ )) });
22067
22079
  }
22068
22080
  export {
22069
22081
  j8 as AutosaveForm,
package/dist/lib.umd.cjs CHANGED
@@ -161,4 +161,4 @@ theme.transitions = createTransitions(theme.transitions || {});
161
161
  export default theme;`}function Rs(e={},...t){const{breakpoints:r,mixins:n={},spacing:u,palette:i={},transitions:a={},typography:s={},shape:l,...c}=e;if(e.vars)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":$r(20));const f=Is(i),p=kd(e);let o=zt(p,{mixins:kD(p.breakpoints,n),palette:f,shadows:HD.slice(),typography:LD(f,s),transitions:YD(a),zIndex:{...GD}});if(o=zt(o,c),o=t.reduce((d,m)=>zt(d,m),o),process.env.NODE_ENV!=="production"){const d=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],m=(h,b)=>{let g;for(g in h){const w=h[g];if(d.includes(g)&&Object.keys(w).length>0){if(process.env.NODE_ENV!=="production"){const v=ys("",g);console.error([`MUI: The \`${b}\` component increases the CSS specificity of the \`${g}\` internal state.`,"You can not override it like this: ",JSON.stringify(h,null,2),"",`Instead, you need to use the '&.${v}' syntax:`,JSON.stringify({root:{[`&.${v}`]:w}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
162
162
  `))}h[g]={}}}};Object.keys(o.components).forEach(h=>{const b=o.components[h].styleOverrides;b&&h.startsWith("Mui")&&m(b,h)})}return o.unstable_sxConfig={...gi,...c==null?void 0:c.unstable_sxConfig},o.unstable_sx=function(m){return En({sx:m,theme:this})},o.toRuntimeSource=Zd,o}function QD(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 KD=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=QD(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Jd(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function eh(e){return e==="dark"?KD:[]}function ZD(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...u}=e,i=Is(t);return{palette:i,opacity:{...Jd(i.mode),...r},overlays:n||eh(i.mode),...u}}function JD(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const e6=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],t6=e=>(t,r)=>{const n=e.rootSelector||":root",u=e.colorSchemeSelector;let i=u;if(u==="class"&&(i=".%s"),u==="data"&&(i="[data-%s]"),u!=null&&u.startsWith("data-")&&!u.includes("%s")&&(i=`[${u}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return e6(e.cssVarPrefix).forEach(s=>{a[s]=r[s],delete r[s]}),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 r6(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function $(e,t,r){!e[t]&&r&&(e[t]=r)}function fu(e){return typeof e!="string"||!e.startsWith("hsl")?e:$d(e)}function Fr(e,t){`${t}Channel`in e||(e[`${t}Channel`]=su(fu(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().
163
163
  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 n6(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const yr=e=>{try{return e()}catch{}},u6=(e="mui")=>xD(e);function ks(e,t,r,n){if(!t)return;t=t===!0?{}:t;const u=n==="dark"?"dark":"light";if(!r){e[n]=ZD({...t,palette:{mode:u,...t==null?void 0:t.palette}});return}const{palette:i,...a}=Rs({...r,palette:{mode:u,...t==null?void 0:t.palette}});return e[n]={...t,palette:i,opacity:{...Jd(u),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||eh(u)},a}function i6(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:u=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:a=JD,colorSchemeSelector:s=r.light&&r.dark?"media":void 0,rootSelector:l=":root",...c}=e,f=Object.keys(r)[0],p=n||(r.light&&f!=="light"?"light":f),o=u6(i),{[p]:d,light:m,dark:h,...b}=r,g={...b};let w=d;if((p==="dark"&&!("dark"in r)||p==="light"&&!("light"in r))&&(w=!0),!w)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${p}\` option is either missing or invalid.`:$r(21,p));const v=ks(g,w,c,p);m&&!g.light&&ks(g,m,void 0,"light"),h&&!g.dark&&ks(g,h,void 0,"dark");let D={defaultColorScheme:p,...v,cssVarPrefix:i,colorSchemeSelector:s,rootSelector:l,getCssVar:o,colorSchemes:g,font:{...RD(v.typography),...v.font},spacing:n6(c.spacing)};Object.keys(D.colorSchemes).forEach(T=>{const x=D.colorSchemes[T].palette,_=F=>{const M=F.split("-"),B=M[1],N=M[2];return o(F,x[B][N])};if(x.mode==="light"&&($(x.common,"background","#fff"),$(x.common,"onBackground","#000")),x.mode==="dark"&&($(x.common,"background","#000"),$(x.common,"onBackground","#fff")),r6(x,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),x.mode==="light"){$(x.Alert,"errorColor",Ke(x.error.light,.6)),$(x.Alert,"infoColor",Ke(x.info.light,.6)),$(x.Alert,"successColor",Ke(x.success.light,.6)),$(x.Alert,"warningColor",Ke(x.warning.light,.6)),$(x.Alert,"errorFilledBg",_("palette-error-main")),$(x.Alert,"infoFilledBg",_("palette-info-main")),$(x.Alert,"successFilledBg",_("palette-success-main")),$(x.Alert,"warningFilledBg",_("palette-warning-main")),$(x.Alert,"errorFilledColor",yr(()=>x.getContrastText(x.error.main))),$(x.Alert,"infoFilledColor",yr(()=>x.getContrastText(x.info.main))),$(x.Alert,"successFilledColor",yr(()=>x.getContrastText(x.success.main))),$(x.Alert,"warningFilledColor",yr(()=>x.getContrastText(x.warning.main))),$(x.Alert,"errorStandardBg",Ze(x.error.light,.9)),$(x.Alert,"infoStandardBg",Ze(x.info.light,.9)),$(x.Alert,"successStandardBg",Ze(x.success.light,.9)),$(x.Alert,"warningStandardBg",Ze(x.warning.light,.9)),$(x.Alert,"errorIconColor",_("palette-error-main")),$(x.Alert,"infoIconColor",_("palette-info-main")),$(x.Alert,"successIconColor",_("palette-success-main")),$(x.Alert,"warningIconColor",_("palette-warning-main")),$(x.AppBar,"defaultBg",_("palette-grey-100")),$(x.Avatar,"defaultBg",_("palette-grey-400")),$(x.Button,"inheritContainedBg",_("palette-grey-300")),$(x.Button,"inheritContainedHoverBg",_("palette-grey-A100")),$(x.Chip,"defaultBorder",_("palette-grey-400")),$(x.Chip,"defaultAvatarColor",_("palette-grey-700")),$(x.Chip,"defaultIconColor",_("palette-grey-700")),$(x.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),$(x.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),$(x.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),$(x.LinearProgress,"primaryBg",Ze(x.primary.main,.62)),$(x.LinearProgress,"secondaryBg",Ze(x.secondary.main,.62)),$(x.LinearProgress,"errorBg",Ze(x.error.main,.62)),$(x.LinearProgress,"infoBg",Ze(x.info.main,.62)),$(x.LinearProgress,"successBg",Ze(x.success.main,.62)),$(x.LinearProgress,"warningBg",Ze(x.warning.main,.62)),$(x.Skeleton,"bg",`rgba(${_("palette-text-primaryChannel")} / 0.11)`),$(x.Slider,"primaryTrack",Ze(x.primary.main,.62)),$(x.Slider,"secondaryTrack",Ze(x.secondary.main,.62)),$(x.Slider,"errorTrack",Ze(x.error.main,.62)),$(x.Slider,"infoTrack",Ze(x.info.main,.62)),$(x.Slider,"successTrack",Ze(x.success.main,.62)),$(x.Slider,"warningTrack",Ze(x.warning.main,.62));const F=Si(x.background.default,.8);$(x.SnackbarContent,"bg",F),$(x.SnackbarContent,"color",yr(()=>x.getContrastText(F))),$(x.SpeedDialAction,"fabHoverBg",Si(x.background.paper,.15)),$(x.StepConnector,"border",_("palette-grey-400")),$(x.StepContent,"border",_("palette-grey-400")),$(x.Switch,"defaultColor",_("palette-common-white")),$(x.Switch,"defaultDisabledColor",_("palette-grey-100")),$(x.Switch,"primaryDisabledColor",Ze(x.primary.main,.62)),$(x.Switch,"secondaryDisabledColor",Ze(x.secondary.main,.62)),$(x.Switch,"errorDisabledColor",Ze(x.error.main,.62)),$(x.Switch,"infoDisabledColor",Ze(x.info.main,.62)),$(x.Switch,"successDisabledColor",Ze(x.success.main,.62)),$(x.Switch,"warningDisabledColor",Ze(x.warning.main,.62)),$(x.TableCell,"border",Ze(Ti(x.divider,1),.88)),$(x.Tooltip,"bg",Ti(x.grey[700],.92))}if(x.mode==="dark"){$(x.Alert,"errorColor",Ze(x.error.light,.6)),$(x.Alert,"infoColor",Ze(x.info.light,.6)),$(x.Alert,"successColor",Ze(x.success.light,.6)),$(x.Alert,"warningColor",Ze(x.warning.light,.6)),$(x.Alert,"errorFilledBg",_("palette-error-dark")),$(x.Alert,"infoFilledBg",_("palette-info-dark")),$(x.Alert,"successFilledBg",_("palette-success-dark")),$(x.Alert,"warningFilledBg",_("palette-warning-dark")),$(x.Alert,"errorFilledColor",yr(()=>x.getContrastText(x.error.dark))),$(x.Alert,"infoFilledColor",yr(()=>x.getContrastText(x.info.dark))),$(x.Alert,"successFilledColor",yr(()=>x.getContrastText(x.success.dark))),$(x.Alert,"warningFilledColor",yr(()=>x.getContrastText(x.warning.dark))),$(x.Alert,"errorStandardBg",Ke(x.error.light,.9)),$(x.Alert,"infoStandardBg",Ke(x.info.light,.9)),$(x.Alert,"successStandardBg",Ke(x.success.light,.9)),$(x.Alert,"warningStandardBg",Ke(x.warning.light,.9)),$(x.Alert,"errorIconColor",_("palette-error-main")),$(x.Alert,"infoIconColor",_("palette-info-main")),$(x.Alert,"successIconColor",_("palette-success-main")),$(x.Alert,"warningIconColor",_("palette-warning-main")),$(x.AppBar,"defaultBg",_("palette-grey-900")),$(x.AppBar,"darkBg",_("palette-background-paper")),$(x.AppBar,"darkColor",_("palette-text-primary")),$(x.Avatar,"defaultBg",_("palette-grey-600")),$(x.Button,"inheritContainedBg",_("palette-grey-800")),$(x.Button,"inheritContainedHoverBg",_("palette-grey-700")),$(x.Chip,"defaultBorder",_("palette-grey-700")),$(x.Chip,"defaultAvatarColor",_("palette-grey-300")),$(x.Chip,"defaultIconColor",_("palette-grey-300")),$(x.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),$(x.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),$(x.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),$(x.LinearProgress,"primaryBg",Ke(x.primary.main,.5)),$(x.LinearProgress,"secondaryBg",Ke(x.secondary.main,.5)),$(x.LinearProgress,"errorBg",Ke(x.error.main,.5)),$(x.LinearProgress,"infoBg",Ke(x.info.main,.5)),$(x.LinearProgress,"successBg",Ke(x.success.main,.5)),$(x.LinearProgress,"warningBg",Ke(x.warning.main,.5)),$(x.Skeleton,"bg",`rgba(${_("palette-text-primaryChannel")} / 0.13)`),$(x.Slider,"primaryTrack",Ke(x.primary.main,.5)),$(x.Slider,"secondaryTrack",Ke(x.secondary.main,.5)),$(x.Slider,"errorTrack",Ke(x.error.main,.5)),$(x.Slider,"infoTrack",Ke(x.info.main,.5)),$(x.Slider,"successTrack",Ke(x.success.main,.5)),$(x.Slider,"warningTrack",Ke(x.warning.main,.5));const F=Si(x.background.default,.98);$(x.SnackbarContent,"bg",F),$(x.SnackbarContent,"color",yr(()=>x.getContrastText(F))),$(x.SpeedDialAction,"fabHoverBg",Si(x.background.paper,.15)),$(x.StepConnector,"border",_("palette-grey-600")),$(x.StepContent,"border",_("palette-grey-600")),$(x.Switch,"defaultColor",_("palette-grey-300")),$(x.Switch,"defaultDisabledColor",_("palette-grey-600")),$(x.Switch,"primaryDisabledColor",Ke(x.primary.main,.55)),$(x.Switch,"secondaryDisabledColor",Ke(x.secondary.main,.55)),$(x.Switch,"errorDisabledColor",Ke(x.error.main,.55)),$(x.Switch,"infoDisabledColor",Ke(x.info.main,.55)),$(x.Switch,"successDisabledColor",Ke(x.success.main,.55)),$(x.Switch,"warningDisabledColor",Ke(x.warning.main,.55)),$(x.TableCell,"border",Ke(Ti(x.divider,1),.68)),$(x.Tooltip,"bg",Ti(x.grey[700],.92))}Fr(x.background,"default"),Fr(x.background,"paper"),Fr(x.common,"background"),Fr(x.common,"onBackground"),Fr(x,"divider"),Object.keys(x).forEach(F=>{const M=x[F];F!=="tonalOffset"&&M&&typeof M=="object"&&(M.main&&$(x[F],"mainChannel",su(fu(M.main))),M.light&&$(x[F],"lightChannel",su(fu(M.light))),M.dark&&$(x[F],"darkChannel",su(fu(M.dark))),M.contrastText&&$(x[F],"contrastTextChannel",su(fu(M.contrastText))),F==="text"&&(Fr(x[F],"primary"),Fr(x[F],"secondary")),F==="action"&&(M.active&&Fr(x[F],"active"),M.selected&&Fr(x[F],"selected")))})}),D=t.reduce((T,x)=>zt(T,x),D);const y={prefix:i,disableCssColorScheme:u,shouldSkipGeneratingVar:a,getSelector:t6(D)},{vars:E,generateThemeVars:A,generateStyleSheets:C}=_D(D,y);return D.vars=E,Object.entries(D.colorSchemes[D.defaultColorScheme]).forEach(([T,x])=>{D[T]=x}),D.generateThemeVars=A,D.generateStyleSheets=C,D.generateSpacing=function(){return Rd(c.spacing,vs(this))},D.getColorSchemeSelector=TD(s),D.spacing=D.generateSpacing(),D.shouldSkipGeneratingVar=a,D.unstable_sxConfig={...gi,...c==null?void 0:c.unstable_sxConfig},D.unstable_sx=function(x){return En({sx:x,theme:this})},D.toRuntimeSource=Zd,D}function th(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:Is({...r===!0?{}:r.palette,mode:t})})}function a6(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:u=r?void 0:{light:!0},defaultColorScheme:i=r==null?void 0:r.mode,...a}=e,s=i||"light",l=u==null?void 0:u[s],c={...u,...r?{[s]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return Rs(e,...t);let f=r;"palette"in e||c[s]&&(c[s]!==!0?f=c[s].palette:s==="dark"&&(f={mode:"dark"}));const p=Rs({...e,palette:f},...t);return p.defaultColorScheme=s,p.colorSchemes=c,p.palette.mode==="light"&&(p.colorSchemes.light={...c.light!==!0&&c.light,palette:p.palette},th(p,"dark",c.dark)),p.palette.mode==="dark"&&(p.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:p.palette},th(p,"light",c.light)),p}return!r&&!("light"in c)&&s==="light"&&(c.light=!0),i6({...a,colorSchemes:c,defaultColorScheme:s,...typeof n!="boolean"&&n},...t)}const s6=a6(),o6="$$material";function c6(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const f6=fD({themeId:o6,defaultTheme:s6,rootShouldForwardProp:e=>c6(e)&&e!=="classes"}),l6=ED;process.env.NODE_ENV!=="production"&&(Ne.node,Ne.object.isRequired);function d6(e){return DD(e)}function h6(e){return ys("MuiSvgIcon",e)}a3("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const p6=e=>{const{color:t,fontSize:r,classes:n}=e,u={root:["root",t!=="inherit"&&`color${un(t)}`,`fontSize${un(r)}`]};return n3(u,h6,n)},m6=f6("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${un(r.color)}`],t[`fontSize${un(r.fontSize)}`]]}})(l6(({theme:e})=>{var t,r,n,u,i,a,s,l,c,f,p,o,d,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(u=(t=e.transitions)==null?void 0:t.create)==null?void 0:u.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:h=>!h.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((a=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:a.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:l.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:f.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,h])=>h&&h.main).map(([h])=>{var b,g;return{props:{color:h},style:{color:(g=(b=(e.vars??e).palette)==null?void 0:b[h])==null?void 0:g.main}}}),{props:{color:"action"},style:{color:(o=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:o.active}},{props:{color:"disabled"},style:{color:(m=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:m.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Fi=At.forwardRef(function(t,r){const n=d6({props:t,name:"MuiSvgIcon"}),{children:u,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:f=!1,titleAccess:p,viewBox:o="0 0 24 24",...d}=n,m=At.isValidElement(u)&&u.type==="svg",h={...n,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:o,hasSvgAsChild:m},b={};f||(b.viewBox=o);const g=p6(h);return J.jsxs(m6,{as:s,className:o3(g.root,i),focusable:"false",color:c,"aria-hidden":p?void 0:!0,role:p?"img":void 0,ref:r,...b,...d,...m&&u.props,ownerState:h,children:[m?u.props.children:u,p?J.jsx("title",{children:p}):null]})});process.env.NODE_ENV!=="production"&&(Fi.propTypes={children:Ne.node,classes:Ne.object,className:Ne.string,color:Ne.oneOfType([Ne.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),Ne.string]),component:Ne.elementType,fontSize:Ne.oneOfType([Ne.oneOf(["inherit","large","medium","small"]),Ne.string]),htmlColor:Ne.string,inheritViewBox:Ne.bool,shapeRendering:Ne.string,sx:Ne.oneOfType([Ne.arrayOf(Ne.oneOfType([Ne.func,Ne.object,Ne.bool])),Ne.func,Ne.object]),titleAccess:Ne.string,viewBox:Ne.string}),Fi.muiName="SvgIcon";function qs(e,t){function r(n,u){return J.jsx(Fi,{"data-testid":`${t}Icon`,ref:u,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Fi.muiName,At.memo(At.forwardRef(r))}const g6=qs(J.jsx("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp"),b6=qs(J.jsx("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown");function y6(e){let t=e.replace(/[^\d.-]/g,"");t=(t.indexOf("-")===0?"-":"")+t.replace(/-/g,"");const n=t.indexOf(".");if(n!==-1){const u=t.replace(/\./g,"");t=u.slice(0,n)+"."+u.slice(n)}return t}const Oi=e=>/^-?(?:\d+|\d*\.\d+|\d+\.)$/.test(e);function rh(e){const{disabled:t,readonly:r,decimalPlaces:n=14,name:u,rules:i,sx:a,...s}=e,{field:l,fieldState:{error:c}}=Jt.useController({name:u,rules:{...i,validate:d=>d&&!Oi(d)?"Please enter a valid number.":!0}}),f=d=>{const m=d.target.value,h=y6(m);l.onChange(h)},p=d=>{const m=parseFloat(d);if(Oi(d)){const h=zv(m,n);l.onChange(Lv(h))}l.onBlur()};if(r)return J.jsx(Jr,{label:s.label,text:l.value,sx:a,error:c==null?void 0:c.message});const o=J.jsxs(qe.InputAdornment,{position:"end",sx:{display:"flex",flexDirection:"column",gap:1,alignItems:"center",height:"auto !important"},children:[J.jsx(qe.IconButton,{size:"small",onClick:()=>{if(Oi(l.value)||!l.value){const d=Uv(l.value||0,1);l.onChange(d),p(d)}},disabled:t,sx:{pt:0,pb:0},children:J.jsx(g6,{fontSize:"small","data-testid":"increment-button"})}),J.jsx(qe.IconButton,{size:"small",onClick:()=>{if(Oi(l.value)||!l.value){const d=Vv(l.value||0,1);l.onChange(d),p(d)}},disabled:t,sx:{pt:0,pb:0},children:J.jsx(b6,{fontSize:"small","data-testid":"decrement-button"})})]});return J.jsx(qe.TextField,{...l,...s,onChange:f,onBlur:d=>p(d.target.value),fullWidth:!0,placeholder:t?"0":"",error:!!c,helperText:!!c&&J.jsx(ln,{error:c.message}),disabled:t,sx:{...a,m:0},InputProps:{endAdornment:o},slotProps:{input:{endAdornment:o}}})}function nh({name:e,label:t,sx:r={}}){const{control:n}=Jt.useFormContext();return J.jsx(Jt.Controller,{name:e,control:n,render:({field:u,fieldState:{error:i}})=>J.jsx(Jr,{label:t,text:u.value||0,sx:r,error:i==null?void 0:i.message})})}function uh({name:e,label:t,options:r=[],sx:n={},disabled:u,rules:i={},readonly:a}){const{field:s,fieldState:{error:l}}=Jt.useController({name:e,rules:i}),c=r.map(p=>({label:p.displayValue,id:p.key})),{value:f}=s;return a?J.jsx(Jr,{label:t,text:f==null?void 0:f.displayValue,sx:n,error:l==null?void 0:l.message}):J.jsx(qe.Autocomplete,{"data-test-id":"form-field-select",...s,value:f==null?void 0:f.displayValue,onChange:(p,o)=>s.onChange(o?{displayValue:o.label,key:o.id}:null),options:c,renderInput:p=>J.jsx(qe.TextField,{...p,label:t,error:!!l,helperText:!!l&&J.jsx(ln,{error:l.message}),slotProps:{inputLabel:{shrink:!0}},sx:{...n,m:0}}),fullWidth:!0,disabled:u})}const v6=qs(J.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25"}),"Help");var Ls,ih;function w6(){return ih||(ih=1,Ls=function(e){var t={};function r(n){if(t[n])return t[n].exports;var u=t[n]={i:n,l:!1,exports:{}};return e[n].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=e,r.c=t,r.d=function(n,u,i){r.o(n,u)||Object.defineProperty(n,u,{enumerable:!0,get:i})},r.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(n,u){if(1&u&&(n=r(n)),8&u||4&u&&typeof n=="object"&&n&&n.__esModule)return n;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&u&&typeof n!="string")for(var a in n)r.d(i,a,(function(s){return n[s]}).bind(null,a));return i},r.n=function(n){var u=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(u,"a",u),u},r.o=function(n,u){return Object.prototype.hasOwnProperty.call(n,u)},r.p="",r(r.s=2)}([function(e,t){e.exports=ad()},function(e,t){e.exports=Xe},function(e,t,r){r.r(t);var n=r(1),u=r(0),i=function(){return(i=Object.assign||function(m){for(var h,b=1,g=arguments.length;b<g;b++)for(var w in h=arguments[b])Object.prototype.hasOwnProperty.call(h,w)&&(m[w]=h[w]);return m}).apply(this,arguments)},a=function(m,h){var b={};for(var g in m)Object.prototype.hasOwnProperty.call(m,g)&&h.indexOf(g)<0&&(b[g]=m[g]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function"){var w=0;for(g=Object.getOwnPropertySymbols(m);w<g.length;w++)h.indexOf(g[w])<0&&Object.prototype.propertyIsEnumerable.call(m,g[w])&&(b[g[w]]=m[g[w]])}return b},s=0,l=n.forwardRef(function(m,h){var b=m.title,g=b===void 0?null:b,w=m.description,v=w===void 0?null:w,D=m.size,y=D===void 0?null:D,E=m.color,A=E===void 0?"currentColor":E,C=m.horizontal,T=C===void 0?null:C,x=m.vertical,_=x===void 0?null:x,F=m.rotate,M=F===void 0?null:F,B=m.spin,N=B===void 0?null:B,I=m.style,Z=I===void 0?{}:I,re=m.children,ie=a(m,["title","description","size","color","horizontal","vertical","rotate","spin","style","children"]);s++;var q,K=N!==null&&N,ce=n.Children.map(re,function(he){var oe=he;K!==!0&&(K=(N===null?oe.props.spin:N)===!0);var be=oe.props.size;typeof y=="number"&&typeof oe.props.size=="number"&&(be=oe.props.size/y);var ye={size:be,color:A===null?oe.props.color:A,horizontal:T===null?oe.props.horizontal:T,vertical:_===null?oe.props.vertical:_,rotate:M===null?oe.props.rotate:M,spin:N===null?oe.props.spin:N,inStack:!0};return n.cloneElement(oe,ye)});y!==null&&(Z.width=typeof y=="string"?y:1.5*y+"rem");var Y,se="stack_labelledby_"+s,de="stack_describedby_"+s;if(g)q=v?se+" "+de:se;else if(Y="presentation",v)throw new Error("title attribute required when description is set");return n.createElement("svg",i({ref:h,viewBox:"0 0 24 24",style:Z,role:Y,"aria-labelledby":q},ie),g&&n.createElement("title",{id:se},g),v&&n.createElement("desc",{id:de},v),K&&n.createElement("style",null,"@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }","@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }"),ce)});l.displayName="Stack",l.propTypes={size:u.oneOfType([u.number,u.string]),color:u.string,horizontal:u.bool,vertical:u.bool,rotate:u.number,spin:u.oneOfType([u.bool,u.number]),children:u.oneOfType([u.arrayOf(u.node),u.node]).isRequired,className:u.string,style:u.object},l.defaultProps={size:null,color:null,horizontal:null,vertical:null,rotate:null,spin:null};var c=l;r.d(t,"Icon",function(){return d}),r.d(t,"Stack",function(){return c});var f=function(){return(f=Object.assign||function(m){for(var h,b=1,g=arguments.length;b<g;b++)for(var w in h=arguments[b])Object.prototype.hasOwnProperty.call(h,w)&&(m[w]=h[w]);return m}).apply(this,arguments)},p=function(m,h){var b={};for(var g in m)Object.prototype.hasOwnProperty.call(m,g)&&h.indexOf(g)<0&&(b[g]=m[g]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function"){var w=0;for(g=Object.getOwnPropertySymbols(m);w<g.length;w++)h.indexOf(g[w])<0&&Object.prototype.propertyIsEnumerable.call(m,g[w])&&(b[g[w]]=m[g[w]])}return b},o=0,d=n.forwardRef(function(m,h){var b=m.path,g=m.id,w=g===void 0?++o:g,v=m.title,D=v===void 0?null:v,y=m.description,E=y===void 0?null:y,A=m.size,C=A===void 0?null:A,T=m.color,x=T===void 0?"currentColor":T,_=m.horizontal,F=_!==void 0&&_,M=m.vertical,B=M!==void 0&&M,N=m.rotate,I=N===void 0?0:N,Z=m.spin,re=Z!==void 0&&Z,ie=m.style,q=ie===void 0?{}:ie,K=m.inStack,ce=K!==void 0&&K,Y=p(m,["path","id","title","description","size","color","horizontal","vertical","rotate","spin","style","inStack"]),se={},de=[];C!==null&&(ce?de.push("scale("+C+")"):(q.width=typeof C=="string"?C:1.5*C+"rem",q.height=q.width)),F&&de.push("scaleX(-1)"),B&&de.push("scaleY(-1)"),I!==0&&de.push("rotate("+I+"deg)"),x!==null&&(se.fill=x);var he=n.createElement("path",f({d:b,style:se},ce?Y:{})),oe=he;de.length>0&&(q.transform=de.join(" "),q.transformOrigin="center",ce&&(oe=n.createElement("g",{style:q},he,n.createElement("rect",{width:"24",height:"24",fill:"transparent"}))));var be,ye=oe,ve=re===!0||typeof re!="number"?2:re,L=!ce&&(F||B);if(ve<0&&(L=!L),re&&(ye=n.createElement("g",{style:{animation:"spin"+(L?"-inverse":"")+" linear "+Math.abs(ve)+"s infinite",transformOrigin:"center"}},oe,!(F||B||I!==0)&&n.createElement("rect",{width:"24",height:"24",fill:"transparent"}))),ce)return ye;var k,W="icon_labelledby_"+w,me="icon_describedby_"+w;if(D)be=E?W+" "+me:W;else if(k="presentation",E)throw new Error("title attribute required when description is set");return n.createElement("svg",f({ref:h,viewBox:"0 0 24 24",style:q,role:k,"aria-labelledby":be},Y),D&&n.createElement("title",{id:W},D),E&&n.createElement("desc",{id:me},E),!ce&&re&&(L?n.createElement("style",null,"@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }"):n.createElement("style",null,"@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }")),ye)});d.displayName="Icon",d.propTypes={path:u.string.isRequired,size:u.oneOfType([u.number,u.string]),color:u.string,horizontal:u.bool,vertical:u.bool,rotate:u.number,spin:u.oneOfType([u.bool,u.number]),style:u.object,inStack:u.bool,className:u.string},d.defaultProps={size:null,color:"currentColor",horizontal:!1,vertical:!1,rotate:0,spin:!1},t.default=d}])),Ls}var D6=w6();const js=bu(D6);var E6="M7,2H17A2,2 0 0,1 19,4V20A2,2 0 0,1 17,22H7A2,2 0 0,1 5,20V4A2,2 0 0,1 7,2M7,4V8H17V4H7M7,10V12H9V10H7M11,10V12H13V10H11M15,10V12H17V10H15M7,14V16H9V14H7M11,14V16H13V14H11M15,14V16H17V14H15M7,18V20H9V18H7M11,18V20H13V18H11M15,18V20H17V18H15Z",x6="M12,1L3,5V11C3,16.55 6.84,21.74 12,23C17.16,21.74 21,16.55 21,11V5L12,1M12,7C13.4,7 14.8,8.1 14.8,9.5V11C15.4,11 16,11.6 16,12.3V15.8C16,16.4 15.4,17 14.7,17H9.2C8.6,17 8,16.4 8,15.7V12.2C8,11.6 8.6,11 9.2,11V9.5C9.2,8.1 10.6,7 12,7M12,8.2C11.2,8.2 10.5,8.7 10.5,9.5V11H13.5V9.5C13.5,8.7 12.8,8.2 12,8.2Z",A6="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z";function an({children:e,internal:t,required:r,helpText:n,isCalculated:u,readonly:i,deleted:a,isSection:s,variant:l="h4"}){const c={display:"flex",alignItems:"center"},f=i?{...c,gap:1}:{...c,justifyContent:"space-between"};return J.jsxs(qe.Box,{sx:f,children:[J.jsxs(qe.Typography,{"data-testid":"form-field-label",variant:l,color:"black",sx:{whiteSpace:"normal",wordBreak:"break-word"},children:[e,r&&"*"]}),J.jsxs(qe.Box,{sx:{display:"flex",gap:1},children:[t&&J.jsx(qe.Tooltip,{placement:"top",title:s?"This section is hidden from the applicant and visible to employees only.":"This field is hidden from the applicant and visible to employees only.",sx:{cursor:"default"},children:J.jsx(js,{path:x6,size:"20px",color:on.capitalDesignTokens.foundations.colors.yellow700,"data-testid":"internal-icon"})}),n&&n!==""&&J.jsx(qe.Tooltip,{placement:"top",title:J.jsx(qe.Typography,{variant:"bodyXSmall",sx:{whiteSpace:"pre-line"},children:n}),sx:{cursor:"default"},children:J.jsx(v6,{fontSize:"small",htmlColor:on.capitalDesignTokens.foundations.colors.gray600,"data-testid":"help-icon"})}),u&&J.jsx(qe.Tooltip,{placement:"top",title:"This field is calculated.",sx:{cursor:"default"},children:J.jsx(js,{path:E6,size:"20px",color:on.capitalDesignTokens.foundations.colors.gray800,"data-testid":"calculation-icon"})}),a&&J.jsx(qe.Tooltip,{placement:"top",title:"This field was deleted.",sx:{cursor:"default"},children:J.jsx(js,{path:A6,size:"20px",color:on.capitalDesignTokens.foundations.colors.gray800})})]})]})}const C6={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyy:{sectionType:"year",contentType:"digit",maxLength:4},yyyy:"year",M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMMM:{sectionType:"month",contentType:"letter"},MMM:{sectionType:"month",contentType:"letter"},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"letter"},EE:{sectionType:"weekDay",contentType:"letter"},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},EEEEE:{sectionType:"weekDay",contentType:"letter"},i:{sectionType:"weekDay",contentType:"digit",maxLength:1},ii:"weekDay",iii:{sectionType:"weekDay",contentType:"letter"},iiii:{sectionType:"weekDay",contentType:"letter"},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},ee:"weekDay",eee:{sectionType:"weekDay",contentType:"letter"},eeee:{sectionType:"weekDay",contentType:"letter"},eeeee:{sectionType:"weekDay",contentType:"letter"},eeeeee:{sectionType:"weekDay",contentType:"letter"},c:{sectionType:"weekDay",contentType:"digit",maxLength:1},cc:"weekDay",ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},ccccc:{sectionType:"weekDay",contentType:"letter"},cccccc:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",aa:"meridiem",aaa:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},_6={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",dayOfMonthFull:"do",weekday:"EEEE",weekdayShort:"EEEEEE",hours24h:"HH",hours12h:"hh",meridiem:"aa",minutes:"mm",seconds:"ss",fullDate:"PP",keyboardDate:"P",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",fullTime:"p",fullTime12h:"hh:mm aa",fullTime24h:"HH:mm",keyboardDateTime:"P p",keyboardDateTime12h:"P hh:mm aa",keyboardDateTime24h:"P HH:mm"};class T6{constructor(t){this.isMUIAdapter=!0,this.isTimezoneCompatible=!1,this.lib=void 0,this.locale=void 0,this.formats=void 0,this.formatTokenMap=C6,this.escapedCharacters={start:"'",end:"'"},this.longFormatters=void 0,this.date=a=>typeof a>"u"?new Date:a===null?null:new Date(a),this.getInvalidDate=()=>new Date("Invalid Date"),this.getTimezone=()=>"default",this.setTimezone=a=>a,this.toJsDate=a=>a,this.getCurrentLocaleCode=()=>this.locale.code,this.is12HourCycleInCurrentLocale=()=>/a/.test(this.locale.formatLong.time({width:"short"})),this.expandFormat=a=>{const s=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;return a.match(s).map(l=>{const c=l[0];if(c==="p"||c==="P"){const f=this.longFormatters[c];return f(l,this.locale.formatLong)}return l}).join("")},this.formatNumber=a=>a,this.getDayOfWeek=a=>a.getDay()+1;const{locale:r,formats:n,longFormatters:u,lib:i}=t;this.locale=r,this.formats=Hn({},_6,n),this.longFormatters=u,this.lib=i||"date-fns"}}class S6 extends T6{constructor({locale:t,formats:r}={}){if(process.env.NODE_ENV!=="production"){if(typeof Vr!="function")throw new Error(["MUI: The `date-fns` package v2.x is not compatible with this adapter.","Please, install v3.x or v4.x of the package or use the `AdapterDateFns` instead."].join(`
164
- `));if(!Ln)throw new Error("MUI: The minimum supported `date-fns` package version compatible with this adapter is `3.2.x`.")}super({locale:t??Ui,formats:r,longFormatters:Ln}),this.parse=(n,u)=>n===""?null:bg(n,u,new Date,{locale:this.locale}),this.isValid=n=>n==null?!1:$c(n),this.format=(n,u)=>this.formatByString(n,this.formats[u]),this.formatByString=(n,u)=>Gi(n,u,{locale:this.locale}),this.isEqual=(n,u)=>n===null&&u===null?!0:n===null||u===null?!1:Em(n,u),this.isSameYear=(n,u)=>Dg(n,u),this.isSameMonth=(n,u)=>wg(n,u),this.isSameDay=(n,u)=>vp(n,u),this.isSameHour=(n,u)=>vg(n,u),this.isAfter=(n,u)=>Du(n,u),this.isAfterYear=(n,u)=>Du(n,Hc(u)),this.isAfterDay=(n,u)=>Du(n,zc(u)),this.isBefore=(n,u)=>Eu(n,u),this.isBeforeYear=(n,u)=>Eu(n,this.startOfYear(u)),this.isBeforeDay=(n,u)=>Eu(n,this.startOfDay(u)),this.isWithinRange=(n,[u,i])=>Eg(n,{start:u,end:i}),this.startOfYear=n=>Uc(n),this.startOfMonth=n=>Ep(n),this.startOfWeek=n=>wr(n,{locale:this.locale}),this.startOfDay=n=>Yr(n),this.endOfYear=n=>Hc(n),this.endOfMonth=n=>Dp(n),this.endOfWeek=n=>xp(n,{locale:this.locale}),this.endOfDay=n=>zc(n),this.addYears=(n,u)=>yp(n,u),this.addMonths=(n,u)=>vu(n,u),this.addWeeks=(n,u)=>bp(n,u),this.addDays=(n,u)=>Vr(n,u),this.addHours=(n,u)=>lp(n,u),this.addMinutes=(n,u)=>mp(n,u),this.addSeconds=(n,u)=>gp(n,u),this.getYear=n=>Dm(n),this.getMonth=n=>vm(n),this.getDate=n=>hm(n),this.getHours=n=>mm(n),this.getMinutes=n=>ym(n),this.getSeconds=n=>wm(n),this.getMilliseconds=n=>bm(n),this.setYear=(n,u)=>Og(n,u),this.setMonth=(n,u)=>Ag(n,u),this.setDate=(n,u)=>Cg(n,u),this.setHours=(n,u)=>_g(n,u),this.setMinutes=(n,u)=>Sg(n,u),this.setSeconds=(n,u)=>Fg(n,u),this.setMilliseconds=(n,u)=>Tg(n,u),this.getDaysInMonth=n=>Jc(n),this.getWeekArray=n=>{const u=this.startOfWeek(this.startOfMonth(n)),i=this.endOfWeek(this.endOfMonth(n));let a=0,s=u;const l=[];for(;this.isBefore(s,i);){const c=Math.floor(a/7);l[c]=l[c]||[],l[c].push(s),s=this.addDays(s,1),a+=1}return l},this.getWeekNumber=n=>Wi(n,{locale:this.locale}),this.getYearRange=([n,u])=>{const i=this.startOfYear(n),a=this.endOfYear(u),s=[];let l=i;for(;this.isBefore(l,a);)s.push(l),l=this.addYears(l,1);return s}}}const ah=Xe.createContext(void 0),F6=({children:e,layout:t={section:()=>({}),field:()=>({})}})=>J.jsx(ah.Provider,{value:{layout:t},children:e}),sh=()=>{const e=Xe.useContext(ah);if(!e)throw new Error("useFormLayout must be used within a FormLayoutProvider");return e.layout},oh=Xe.createContext(void 0),O6=({children:e,template:t,fieldTypes:r})=>J.jsx(oh.Provider,{value:{template:t,fieldTypes:r},children:e}),ch=()=>{const e=Xe.useContext(oh);if(!e)throw new Error("useFormRenderer must be used within a FormRendererProvider");return e},N6=e=>{const{fieldTypes:t}=ch();if(!e)return null;const r=t.find(i=>i.type===e);if(!r)throw new Error(`Field type ${e} not found`);const{renderField:n,...u}=r;return{renderField:n,fullWidth:u.fullWidth,...u}},M6=e=>{const{template:t}=ch(),r=t.fields[e];if(!r)throw new Error(`Field template for ${e} not found`);return r},P6={type:"DATE",name:"Date",groups:[],dateFormat:"MM/dd/yyyy",renderField:(e,t,{disabled:r,readonly:n,name:u})=>J.jsx(Sf,{name:u??e.id,label:J.jsx(an,{...e,readonly:n,children:e.label}),rules:Nn(e),constraints:e.constraints,dateFormat:t.dateFormat,disabled:r,readonly:n})},B6={type:"DROPDOWN",name:"Dropdown",groups:[],renderField:(e,t,{disabled:r,readonly:n,name:u})=>J.jsx(uh,{name:u??e.id,label:J.jsx(an,{...e,children:e.label}),rules:Nn(e),options:e.options,disabled:r,readonly:n})},I6={type:"CHECKBOX",name:"Checkbox",groups:[],renderField:(e,t,{disabled:r,readonly:n,name:u})=>J.jsx(Ff,{name:u??e.id,label:J.jsx(an,{...e,readonly:n,children:e.label}),rules:Nn(e),disabled:r,readonly:n})},R6={type:"TEXTINPUT",name:"Text",groups:[],maxLength:262144,filter:e=>e.replace(/[^\u0000-\u00FF ]/g,""),renderField:(e,t,{disabled:r,readonly:n,name:u})=>J.jsx(Of,{rules:Nn(e),label:J.jsx(an,{...e,readonly:n,children:e.label}),name:u??e.id,disabled:r,readonly:n,maxLength:t.maxLength,filter:t.filter})},k6={type:"NUMBER",name:"Number",groups:[],decimalPlaces:14,renderField:(e,t,{disabled:r,readonly:n,name:u})=>J.jsx(rh,{name:u??e.id,label:J.jsx(an,{...e,readonly:n,children:e.label}),rules:{...Nn(e),min:{value:e.min,message:`Value must be at least ${e.min}.`},max:{value:e.max,message:`Value must be no more than ${e.max}.`}},disabled:r,readonly:n,decimalPlaces:t.decimalPlaces})},q6={type:"CALCULATEDNUMBER",name:"Calculated Number",groups:[],renderField:(e,t,{readonly:r,name:n})=>J.jsx(nh,{name:n??e.id,label:J.jsx(an,{...e,readonly:r,children:e.label}),rules:[]})},Nn=e=>({required:{value:e.required??!1,message:"This field is required."}}),fh=[R6,k6,q6,B6,I6,P6];function L6({children:e,template:t,fieldTypes:r=fh,layout:n}){return J.jsx(Ur.LocalizationProvider,{dateAdapter:S6,adapterLocale:void 0,children:J.jsx(F6,{layout:n,children:J.jsx(O6,{template:t,fieldTypes:r,children:e})})})}var $s,lh;function j6(){if(lh)return $s;lh=1;function e(){this.__data__=[],this.size=0}return $s=e,$s}var zs,dh;function hh(){if(dh)return zs;dh=1;function e(t,r){return t===r||t!==t&&r!==r}return zs=e,zs}var Hs,ph;function Ni(){if(ph)return Hs;ph=1;var e=hh();function t(r,n){for(var u=r.length;u--;)if(e(r[u][0],n))return u;return-1}return Hs=t,Hs}var Us,mh;function $6(){if(mh)return Us;mh=1;var e=Ni(),t=Array.prototype,r=t.splice;function n(u){var i=this.__data__,a=e(i,u);if(a<0)return!1;var s=i.length-1;return a==s?i.pop():r.call(i,a,1),--this.size,!0}return Us=n,Us}var Vs,gh;function z6(){if(gh)return Vs;gh=1;var e=Ni();function t(r){var n=this.__data__,u=e(n,r);return u<0?void 0:n[u][1]}return Vs=t,Vs}var Ws,bh;function H6(){if(bh)return Ws;bh=1;var e=Ni();function t(r){return e(this.__data__,r)>-1}return Ws=t,Ws}var Ys,yh;function U6(){if(yh)return Ys;yh=1;var e=Ni();function t(r,n){var u=this.__data__,i=e(u,r);return i<0?(++this.size,u.push([r,n])):u[i][1]=n,this}return Ys=t,Ys}var Gs,vh;function Mi(){if(vh)return Gs;vh=1;var e=j6(),t=$6(),r=z6(),n=H6(),u=U6();function i(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var c=a[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=u,Gs=i,Gs}var Xs,wh;function V6(){if(wh)return Xs;wh=1;var e=Mi();function t(){this.__data__=new e,this.size=0}return Xs=t,Xs}var Qs,Dh;function W6(){if(Dh)return Qs;Dh=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return Qs=e,Qs}var Ks,Eh;function Y6(){if(Eh)return Ks;Eh=1;function e(t){return this.__data__.get(t)}return Ks=e,Ks}var Zs,xh;function G6(){if(xh)return Zs;xh=1;function e(t){return this.__data__.has(t)}return Zs=e,Zs}var Js,Ah;function Ch(){if(Ah)return Js;Ah=1;var e=typeof gu=="object"&&gu&&gu.Object===Object&&gu;return Js=e,Js}var eo,_h;function Or(){if(_h)return eo;_h=1;var e=Ch(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return eo=r,eo}var to,Th;function ro(){if(Th)return to;Th=1;var e=Or(),t=e.Symbol;return to=t,to}var no,Sh;function X6(){if(Sh)return no;Sh=1;var e=ro(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,u=e?e.toStringTag:void 0;function i(a){var s=r.call(a,u),l=a[u];try{a[u]=void 0;var c=!0}catch{}var f=n.call(a);return c&&(s?a[u]=l:delete a[u]),f}return no=i,no}var uo,Fh;function Q6(){if(Fh)return uo;Fh=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return uo=r,uo}var io,Oh;function Pi(){if(Oh)return io;Oh=1;var e=ro(),t=X6(),r=Q6(),n="[object Null]",u="[object Undefined]",i=e?e.toStringTag:void 0;function a(s){return s==null?s===void 0?u:n:i&&i in Object(s)?t(s):r(s)}return io=a,io}var ao,Nh;function Mh(){if(Nh)return ao;Nh=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return ao=e,ao}var so,Ph;function Bh(){if(Ph)return so;Ph=1;var e=Pi(),t=Mh(),r="[object AsyncFunction]",n="[object Function]",u="[object GeneratorFunction]",i="[object Proxy]";function a(s){if(!t(s))return!1;var l=e(s);return l==n||l==u||l==r||l==i}return so=a,so}var oo,Ih;function K6(){if(Ih)return oo;Ih=1;var e=Or(),t=e["__core-js_shared__"];return oo=t,oo}var co,Rh;function Z6(){if(Rh)return co;Rh=1;var e=K6(),t=function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function r(n){return!!t&&t in n}return co=r,co}var fo,kh;function qh(){if(kh)return fo;kh=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return fo=r,fo}var lo,Lh;function J6(){if(Lh)return lo;Lh=1;var e=Bh(),t=Z6(),r=Mh(),n=qh(),u=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,a=Function.prototype,s=Object.prototype,l=a.toString,c=s.hasOwnProperty,f=RegExp("^"+l.call(c).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p(o){if(!r(o)||t(o))return!1;var d=e(o)?f:i;return d.test(n(o))}return lo=p,lo}var ho,jh;function e4(){if(jh)return ho;jh=1;function e(t,r){return t==null?void 0:t[r]}return ho=e,ho}var po,$h;function Mn(){if($h)return po;$h=1;var e=J6(),t=e4();function r(n,u){var i=t(n,u);return e(i)?i:void 0}return po=r,po}var mo,zh;function go(){if(zh)return mo;zh=1;var e=Mn(),t=Or(),r=e(t,"Map");return mo=r,mo}var bo,Hh;function Bi(){if(Hh)return bo;Hh=1;var e=Mn(),t=e(Object,"create");return bo=t,bo}var yo,Uh;function t4(){if(Uh)return yo;Uh=1;var e=Bi();function t(){this.__data__=e?e(null):{},this.size=0}return yo=t,yo}var vo,Vh;function r4(){if(Vh)return vo;Vh=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return vo=e,vo}var wo,Wh;function n4(){if(Wh)return wo;Wh=1;var e=Bi(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function u(i){var a=this.__data__;if(e){var s=a[i];return s===t?void 0:s}return n.call(a,i)?a[i]:void 0}return wo=u,wo}var Do,Yh;function u4(){if(Yh)return Do;Yh=1;var e=Bi(),t=Object.prototype,r=t.hasOwnProperty;function n(u){var i=this.__data__;return e?i[u]!==void 0:r.call(i,u)}return Do=n,Do}var Eo,Gh;function i4(){if(Gh)return Eo;Gh=1;var e=Bi(),t="__lodash_hash_undefined__";function r(n,u){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=e&&u===void 0?t:u,this}return Eo=r,Eo}var xo,Xh;function a4(){if(Xh)return xo;Xh=1;var e=t4(),t=r4(),r=n4(),n=u4(),u=i4();function i(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var c=a[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=u,xo=i,xo}var Ao,Qh;function s4(){if(Qh)return Ao;Qh=1;var e=a4(),t=Mi(),r=go();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Ao=n,Ao}var Co,Kh;function o4(){if(Kh)return Co;Kh=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Co=e,Co}var _o,Zh;function Ii(){if(Zh)return _o;Zh=1;var e=o4();function t(r,n){var u=r.__data__;return e(n)?u[typeof n=="string"?"string":"hash"]:u.map}return _o=t,_o}var To,Jh;function c4(){if(Jh)return To;Jh=1;var e=Ii();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return To=t,To}var So,e1;function f4(){if(e1)return So;e1=1;var e=Ii();function t(r){return e(this,r).get(r)}return So=t,So}var Fo,t1;function l4(){if(t1)return Fo;t1=1;var e=Ii();function t(r){return e(this,r).has(r)}return Fo=t,Fo}var Oo,r1;function d4(){if(r1)return Oo;r1=1;var e=Ii();function t(r,n){var u=e(this,r),i=u.size;return u.set(r,n),this.size+=u.size==i?0:1,this}return Oo=t,Oo}var No,n1;function u1(){if(n1)return No;n1=1;var e=s4(),t=c4(),r=f4(),n=l4(),u=d4();function i(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var c=a[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=u,No=i,No}var Mo,i1;function h4(){if(i1)return Mo;i1=1;var e=Mi(),t=go(),r=u1(),n=200;function u(i,a){var s=this.__data__;if(s instanceof e){var l=s.__data__;if(!t||l.length<n-1)return l.push([i,a]),this.size=++s.size,this;s=this.__data__=new r(l)}return s.set(i,a),this.size=s.size,this}return Mo=u,Mo}var Po,a1;function p4(){if(a1)return Po;a1=1;var e=Mi(),t=V6(),r=W6(),n=Y6(),u=G6(),i=h4();function a(s){var l=this.__data__=new e(s);this.size=l.size}return a.prototype.clear=t,a.prototype.delete=r,a.prototype.get=n,a.prototype.has=u,a.prototype.set=i,Po=a,Po}var Bo,s1;function m4(){if(s1)return Bo;s1=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return Bo=t,Bo}var Io,o1;function g4(){if(o1)return Io;o1=1;function e(t){return this.__data__.has(t)}return Io=e,Io}var Ro,c1;function b4(){if(c1)return Ro;c1=1;var e=u1(),t=m4(),r=g4();function n(u){var i=-1,a=u==null?0:u.length;for(this.__data__=new e;++i<a;)this.add(u[i])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,Ro=n,Ro}var ko,f1;function y4(){if(f1)return ko;f1=1;function e(t,r){for(var n=-1,u=t==null?0:t.length;++n<u;)if(r(t[n],n,t))return!0;return!1}return ko=e,ko}var qo,l1;function v4(){if(l1)return qo;l1=1;function e(t,r){return t.has(r)}return qo=e,qo}var Lo,d1;function h1(){if(d1)return Lo;d1=1;var e=b4(),t=y4(),r=v4(),n=1,u=2;function i(a,s,l,c,f,p){var o=l&n,d=a.length,m=s.length;if(d!=m&&!(o&&m>d))return!1;var h=p.get(a),b=p.get(s);if(h&&b)return h==s&&b==a;var g=-1,w=!0,v=l&u?new e:void 0;for(p.set(a,s),p.set(s,a);++g<d;){var D=a[g],y=s[g];if(c)var E=o?c(y,D,g,s,a,p):c(D,y,g,a,s,p);if(E!==void 0){if(E)continue;w=!1;break}if(v){if(!t(s,function(A,C){if(!r(v,C)&&(D===A||f(D,A,l,c,p)))return v.push(C)})){w=!1;break}}else if(!(D===y||f(D,y,l,c,p))){w=!1;break}}return p.delete(a),p.delete(s),w}return Lo=i,Lo}var jo,p1;function w4(){if(p1)return jo;p1=1;var e=Or(),t=e.Uint8Array;return jo=t,jo}var $o,m1;function D4(){if(m1)return $o;m1=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(u,i){n[++r]=[i,u]}),n}return $o=e,$o}var zo,g1;function E4(){if(g1)return zo;g1=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(u){n[++r]=u}),n}return zo=e,zo}var Ho,b1;function x4(){if(b1)return Ho;b1=1;var e=ro(),t=w4(),r=hh(),n=h1(),u=D4(),i=E4(),a=1,s=2,l="[object Boolean]",c="[object Date]",f="[object Error]",p="[object Map]",o="[object Number]",d="[object RegExp]",m="[object Set]",h="[object String]",b="[object Symbol]",g="[object ArrayBuffer]",w="[object DataView]",v=e?e.prototype:void 0,D=v?v.valueOf:void 0;function y(E,A,C,T,x,_,F){switch(C){case w:if(E.byteLength!=A.byteLength||E.byteOffset!=A.byteOffset)return!1;E=E.buffer,A=A.buffer;case g:return!(E.byteLength!=A.byteLength||!_(new t(E),new t(A)));case l:case c:case o:return r(+E,+A);case f:return E.name==A.name&&E.message==A.message;case d:case h:return E==A+"";case p:var M=u;case m:var B=T&a;if(M||(M=i),E.size!=A.size&&!B)return!1;var N=F.get(E);if(N)return N==A;T|=s,F.set(E,A);var I=n(M(E),M(A),T,x,_,F);return F.delete(E),I;case b:if(D)return D.call(E)==D.call(A)}return!1}return Ho=y,Ho}var Uo,y1;function A4(){if(y1)return Uo;y1=1;function e(t,r){for(var n=-1,u=r.length,i=t.length;++n<u;)t[i+n]=r[n];return t}return Uo=e,Uo}var Vo,v1;function Wo(){if(v1)return Vo;v1=1;var e=Array.isArray;return Vo=e,Vo}var Yo,w1;function C4(){if(w1)return Yo;w1=1;var e=A4(),t=Wo();function r(n,u,i){var a=u(n);return t(n)?a:e(a,i(n))}return Yo=r,Yo}var Go,D1;function _4(){if(D1)return Go;D1=1;function e(t,r){for(var n=-1,u=t==null?0:t.length,i=0,a=[];++n<u;){var s=t[n];r(s,n,t)&&(a[i++]=s)}return a}return Go=e,Go}var Xo,E1;function T4(){if(E1)return Xo;E1=1;function e(){return[]}return Xo=e,Xo}var Qo,x1;function S4(){if(x1)return Qo;x1=1;var e=_4(),t=T4(),r=Object.prototype,n=r.propertyIsEnumerable,u=Object.getOwnPropertySymbols,i=u?function(a){return a==null?[]:(a=Object(a),e(u(a),function(s){return n.call(a,s)}))}:t;return Qo=i,Qo}var Ko,A1;function F4(){if(A1)return Ko;A1=1;function e(t,r){for(var n=-1,u=Array(t);++n<t;)u[n]=r(n);return u}return Ko=e,Ko}var Zo,C1;function Ri(){if(C1)return Zo;C1=1;function e(t){return t!=null&&typeof t=="object"}return Zo=e,Zo}var Jo,_1;function O4(){if(_1)return Jo;_1=1;var e=Pi(),t=Ri(),r="[object Arguments]";function n(u){return t(u)&&e(u)==r}return Jo=n,Jo}var ec,T1;function N4(){if(T1)return ec;T1=1;var e=O4(),t=Ri(),r=Object.prototype,n=r.hasOwnProperty,u=r.propertyIsEnumerable,i=e(function(){return arguments}())?e:function(a){return t(a)&&n.call(a,"callee")&&!u.call(a,"callee")};return ec=i,ec}var lu={exports:{}},tc,S1;function M4(){if(S1)return tc;S1=1;function e(){return!1}return tc=e,tc}lu.exports;var F1;function O1(){return F1||(F1=1,function(e,t){var r=Or(),n=M4(),u=t&&!t.nodeType&&t,i=u&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===u,s=a?r.Buffer:void 0,l=s?s.isBuffer:void 0,c=l||n;e.exports=c}(lu,lu.exports)),lu.exports}var rc,N1;function P4(){if(N1)return rc;N1=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,u){var i=typeof n;return u=u??e,!!u&&(i=="number"||i!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<u}return rc=r,rc}var nc,M1;function P1(){if(M1)return nc;M1=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return nc=t,nc}var uc,B1;function B4(){if(B1)return uc;B1=1;var e=Pi(),t=P1(),r=Ri(),n="[object Arguments]",u="[object Array]",i="[object Boolean]",a="[object Date]",s="[object Error]",l="[object Function]",c="[object Map]",f="[object Number]",p="[object Object]",o="[object RegExp]",d="[object Set]",m="[object String]",h="[object WeakMap]",b="[object ArrayBuffer]",g="[object DataView]",w="[object Float32Array]",v="[object Float64Array]",D="[object Int8Array]",y="[object Int16Array]",E="[object Int32Array]",A="[object Uint8Array]",C="[object Uint8ClampedArray]",T="[object Uint16Array]",x="[object Uint32Array]",_={};_[w]=_[v]=_[D]=_[y]=_[E]=_[A]=_[C]=_[T]=_[x]=!0,_[n]=_[u]=_[b]=_[i]=_[g]=_[a]=_[s]=_[l]=_[c]=_[f]=_[p]=_[o]=_[d]=_[m]=_[h]=!1;function F(M){return r(M)&&t(M.length)&&!!_[e(M)]}return uc=F,uc}var ic,I1;function I4(){if(I1)return ic;I1=1;function e(t){return function(r){return t(r)}}return ic=e,ic}var du={exports:{}};du.exports;var R1;function R4(){return R1||(R1=1,function(e,t){var r=Ch(),n=t&&!t.nodeType&&t,u=n&&!0&&e&&!e.nodeType&&e,i=u&&u.exports===n,a=i&&r.process,s=function(){try{var l=u&&u.require&&u.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s}(du,du.exports)),du.exports}var ac,k1;function q1(){if(k1)return ac;k1=1;var e=B4(),t=I4(),r=R4(),n=r&&r.isTypedArray,u=n?t(n):e;return ac=u,ac}var sc,L1;function k4(){if(L1)return sc;L1=1;var e=F4(),t=N4(),r=Wo(),n=O1(),u=P4(),i=q1(),a=Object.prototype,s=a.hasOwnProperty;function l(c,f){var p=r(c),o=!p&&t(c),d=!p&&!o&&n(c),m=!p&&!o&&!d&&i(c),h=p||o||d||m,b=h?e(c.length,String):[],g=b.length;for(var w in c)(f||s.call(c,w))&&!(h&&(w=="length"||d&&(w=="offset"||w=="parent")||m&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||u(w,g)))&&b.push(w);return b}return sc=l,sc}var oc,j1;function q4(){if(j1)return oc;j1=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,u=typeof n=="function"&&n.prototype||e;return r===u}return oc=t,oc}var cc,$1;function L4(){if($1)return cc;$1=1;function e(t,r){return function(n){return t(r(n))}}return cc=e,cc}var fc,z1;function j4(){if(z1)return fc;z1=1;var e=L4(),t=e(Object.keys,Object);return fc=t,fc}var lc,H1;function $4(){if(H1)return lc;H1=1;var e=q4(),t=j4(),r=Object.prototype,n=r.hasOwnProperty;function u(i){if(!e(i))return t(i);var a=[];for(var s in Object(i))n.call(i,s)&&s!="constructor"&&a.push(s);return a}return lc=u,lc}var dc,U1;function z4(){if(U1)return dc;U1=1;var e=Bh(),t=P1();function r(n){return n!=null&&t(n.length)&&!e(n)}return dc=r,dc}var hc,V1;function H4(){if(V1)return hc;V1=1;var e=k4(),t=$4(),r=z4();function n(u){return r(u)?e(u):t(u)}return hc=n,hc}var pc,W1;function U4(){if(W1)return pc;W1=1;var e=C4(),t=S4(),r=H4();function n(u){return e(u,r,t)}return pc=n,pc}var mc,Y1;function V4(){if(Y1)return mc;Y1=1;var e=U4(),t=1,r=Object.prototype,n=r.hasOwnProperty;function u(i,a,s,l,c,f){var p=s&t,o=e(i),d=o.length,m=e(a),h=m.length;if(d!=h&&!p)return!1;for(var b=d;b--;){var g=o[b];if(!(p?g in a:n.call(a,g)))return!1}var w=f.get(i),v=f.get(a);if(w&&v)return w==a&&v==i;var D=!0;f.set(i,a),f.set(a,i);for(var y=p;++b<d;){g=o[b];var E=i[g],A=a[g];if(l)var C=p?l(A,E,g,a,i,f):l(E,A,g,i,a,f);if(!(C===void 0?E===A||c(E,A,s,l,f):C)){D=!1;break}y||(y=g=="constructor")}if(D&&!y){var T=i.constructor,x=a.constructor;T!=x&&"constructor"in i&&"constructor"in a&&!(typeof T=="function"&&T instanceof T&&typeof x=="function"&&x instanceof x)&&(D=!1)}return f.delete(i),f.delete(a),D}return mc=u,mc}var gc,G1;function W4(){if(G1)return gc;G1=1;var e=Mn(),t=Or(),r=e(t,"DataView");return gc=r,gc}var bc,X1;function Y4(){if(X1)return bc;X1=1;var e=Mn(),t=Or(),r=e(t,"Promise");return bc=r,bc}var yc,Q1;function G4(){if(Q1)return yc;Q1=1;var e=Mn(),t=Or(),r=e(t,"Set");return yc=r,yc}var vc,K1;function X4(){if(K1)return vc;K1=1;var e=Mn(),t=Or(),r=e(t,"WeakMap");return vc=r,vc}var wc,Z1;function Q4(){if(Z1)return wc;Z1=1;var e=W4(),t=go(),r=Y4(),n=G4(),u=X4(),i=Pi(),a=qh(),s="[object Map]",l="[object Object]",c="[object Promise]",f="[object Set]",p="[object WeakMap]",o="[object DataView]",d=a(e),m=a(t),h=a(r),b=a(n),g=a(u),w=i;return(e&&w(new e(new ArrayBuffer(1)))!=o||t&&w(new t)!=s||r&&w(r.resolve())!=c||n&&w(new n)!=f||u&&w(new u)!=p)&&(w=function(v){var D=i(v),y=D==l?v.constructor:void 0,E=y?a(y):"";if(E)switch(E){case d:return o;case m:return s;case h:return c;case b:return f;case g:return p}return D}),wc=w,wc}var Dc,J1;function K4(){if(J1)return Dc;J1=1;var e=p4(),t=h1(),r=x4(),n=V4(),u=Q4(),i=Wo(),a=O1(),s=q1(),l=1,c="[object Arguments]",f="[object Array]",p="[object Object]",o=Object.prototype,d=o.hasOwnProperty;function m(h,b,g,w,v,D){var y=i(h),E=i(b),A=y?f:u(h),C=E?f:u(b);A=A==c?p:A,C=C==c?p:C;var T=A==p,x=C==p,_=A==C;if(_&&a(h)){if(!a(b))return!1;y=!0,T=!1}if(_&&!T)return D||(D=new e),y||s(h)?t(h,b,g,w,v,D):r(h,b,A,g,w,v,D);if(!(g&l)){var F=T&&d.call(h,"__wrapped__"),M=x&&d.call(b,"__wrapped__");if(F||M){var B=F?h.value():h,N=M?b.value():b;return D||(D=new e),v(B,N,g,w,D)}}return _?(D||(D=new e),n(h,b,g,w,v,D)):!1}return Dc=m,Dc}var Ec,ep;function Z4(){if(ep)return Ec;ep=1;var e=K4(),t=Ri();function r(n,u,i,a,s){return n===u?!0:n==null||u==null||!t(n)&&!t(u)?n!==n&&u!==u:e(n,u,i,a,r,s)}return Ec=r,Ec}var xc,tp;function J4(){if(tp)return xc;tp=1;var e=Z4();function t(r,n){return e(r,n)}return xc=t,xc}var e8=J4();const t8=bu(e8);function r8({children:e,formOptions:t,submitOptions:r,loading:n}){const u=Jt.useForm(t),{handleSubmit:i,reset:a,watch:s}=u,l=Xe.useRef(null);Xe.useEffect(()=>{if(n)return;const b=t==null?void 0:t.defaultValues;b&&(t8(l.current,b)||(a(b),l.current=b))},[n,a,t==null?void 0:t.defaultValues]);const{onSubmit:c,onReset:f,formId:p,submitOnChange:o,registerForm:d}=r||{},m=async b=>{await(c==null?void 0:c(b)),a(b)},h=async()=>{a(t==null?void 0:t.defaultValues),await(f==null?void 0:f())};return Xe.useEffect(()=>{if(!o)return()=>{};const b=s(g=>i(w=>c==null?void 0:c(w))(g));return()=>b.unsubscribe()},[s,o,i,c]),J.jsx(Jt.FormProvider,{...u,children:J.jsx("form",{"data-testid":p,onSubmit:i(m),onReset:h,ref:d,id:p,style:{width:"100%"},children:e})})}function n8({children:e,formOptions:t,submitOptions:r}){const{formId:n,onSubmit:u,onBlur:i}=r,a=Jt.useForm(t),{getFieldState:s,reset:l,getValues:c,handleSubmit:f,trigger:p}=a,o=async()=>{const d=c(),m=Object.keys(d).filter(g=>s(g).isDirty);await p(m);const b=m.filter(g=>!s(g).invalid).reduce((g,w)=>(g[w]=d[w],g),{});Object.keys(b).length>0&&(await(i==null?void 0:i(b)),l({...d,...b},{keepErrors:!0}))};return J.jsx(Jt.FormProvider,{...a,children:J.jsx("form",{onBlur:o,onSubmit:f(async d=>{await(u==null?void 0:u(d)),l(d)}),id:n,"data-testid":n,children:e})})}function rp({id:e,name:t,readonly:r,wrapper:n}){const{field:u}=sh(),i=M6(e),a=N6(i.type);if(!a||!a.renderField)return J.jsxs(qe.Box,{children:["Missing render for field type ",i.type]});const{renderField:s,...l}=a,c=u==null?void 0:u(i,l),f=n||qe.Box;return J.jsx(f,{"data-testid":"field-container",field:i,sx:c,children:s(i,l,{readonly:r,name:t})})}function u8({section:e,fields:t,fieldNames:r,readonly:n,fieldWrapper:u}){const{section:i}=sh(),a=i==null?void 0:i(e);return J.jsx(qe.Box,{"data-testid":"section-container",sx:a,children:t.map((s,l)=>J.jsx(rp,{id:s,name:(r==null?void 0:r[l])??s,readonly:n,wrapper:u},s))})}Se.AutosaveForm=n8,Se.CalculatedNumber=nh,Se.CheckboxInput=Ff,Se.DateInput=Sf,Se.DropdownInput=uh,Se.ErrorMessage=ln,Se.Field=rp,Se.Form=r8,Se.FormFieldLabel=an,Se.LabelWithChildren=$a,Se.NumberInput=rh,Se.ReadOnlyField=Jr,Se.RendererProvider=L6,Se.Section=u8,Se.TextInput=Of,Se.defaultFieldTypes=fh,Se.defaultRules=Nn,Object.defineProperty(Se,Symbol.toStringTag,{value:"Module"})});
164
+ `));if(!Ln)throw new Error("MUI: The minimum supported `date-fns` package version compatible with this adapter is `3.2.x`.")}super({locale:t??Ui,formats:r,longFormatters:Ln}),this.parse=(n,u)=>n===""?null:bg(n,u,new Date,{locale:this.locale}),this.isValid=n=>n==null?!1:$c(n),this.format=(n,u)=>this.formatByString(n,this.formats[u]),this.formatByString=(n,u)=>Gi(n,u,{locale:this.locale}),this.isEqual=(n,u)=>n===null&&u===null?!0:n===null||u===null?!1:Em(n,u),this.isSameYear=(n,u)=>Dg(n,u),this.isSameMonth=(n,u)=>wg(n,u),this.isSameDay=(n,u)=>vp(n,u),this.isSameHour=(n,u)=>vg(n,u),this.isAfter=(n,u)=>Du(n,u),this.isAfterYear=(n,u)=>Du(n,Hc(u)),this.isAfterDay=(n,u)=>Du(n,zc(u)),this.isBefore=(n,u)=>Eu(n,u),this.isBeforeYear=(n,u)=>Eu(n,this.startOfYear(u)),this.isBeforeDay=(n,u)=>Eu(n,this.startOfDay(u)),this.isWithinRange=(n,[u,i])=>Eg(n,{start:u,end:i}),this.startOfYear=n=>Uc(n),this.startOfMonth=n=>Ep(n),this.startOfWeek=n=>wr(n,{locale:this.locale}),this.startOfDay=n=>Yr(n),this.endOfYear=n=>Hc(n),this.endOfMonth=n=>Dp(n),this.endOfWeek=n=>xp(n,{locale:this.locale}),this.endOfDay=n=>zc(n),this.addYears=(n,u)=>yp(n,u),this.addMonths=(n,u)=>vu(n,u),this.addWeeks=(n,u)=>bp(n,u),this.addDays=(n,u)=>Vr(n,u),this.addHours=(n,u)=>lp(n,u),this.addMinutes=(n,u)=>mp(n,u),this.addSeconds=(n,u)=>gp(n,u),this.getYear=n=>Dm(n),this.getMonth=n=>vm(n),this.getDate=n=>hm(n),this.getHours=n=>mm(n),this.getMinutes=n=>ym(n),this.getSeconds=n=>wm(n),this.getMilliseconds=n=>bm(n),this.setYear=(n,u)=>Og(n,u),this.setMonth=(n,u)=>Ag(n,u),this.setDate=(n,u)=>Cg(n,u),this.setHours=(n,u)=>_g(n,u),this.setMinutes=(n,u)=>Sg(n,u),this.setSeconds=(n,u)=>Fg(n,u),this.setMilliseconds=(n,u)=>Tg(n,u),this.getDaysInMonth=n=>Jc(n),this.getWeekArray=n=>{const u=this.startOfWeek(this.startOfMonth(n)),i=this.endOfWeek(this.endOfMonth(n));let a=0,s=u;const l=[];for(;this.isBefore(s,i);){const c=Math.floor(a/7);l[c]=l[c]||[],l[c].push(s),s=this.addDays(s,1),a+=1}return l},this.getWeekNumber=n=>Wi(n,{locale:this.locale}),this.getYearRange=([n,u])=>{const i=this.startOfYear(n),a=this.endOfYear(u),s=[];let l=i;for(;this.isBefore(l,a);)s.push(l),l=this.addYears(l,1);return s}}}const ah=Xe.createContext(void 0),F6=({children:e,layout:t={section:()=>({}),field:()=>({})}})=>J.jsx(ah.Provider,{value:{layout:t},children:e}),sh=()=>{const e=Xe.useContext(ah);if(!e)throw new Error("useFormLayout must be used within a FormLayoutProvider");return e.layout},oh=Xe.createContext(void 0),O6=({children:e,template:t,fieldTypes:r})=>J.jsx(oh.Provider,{value:{template:t,fieldTypes:r},children:e}),ch=()=>{const e=Xe.useContext(oh);if(!e)throw new Error("useFormRenderer must be used within a FormRendererProvider");return e},N6=e=>{const{fieldTypes:t}=ch();if(!e)return null;const r=t.find(i=>i.type===e);if(!r)throw new Error(`Field type ${e} not found`);const{renderField:n,...u}=r;return{renderField:n,fullWidth:u.fullWidth,...u}},M6=e=>{const{template:t}=ch(),r=t.fields[e];if(!r)throw new Error(`Field template for ${e} not found`);return r},P6={type:"DATE",name:"Date",groups:[],dateFormat:"MM/dd/yyyy",renderField:(e,t,{disabled:r,readonly:n,name:u})=>J.jsx(Sf,{name:u??e.id,label:J.jsx(an,{...e,readonly:n,children:e.label}),rules:Nn(e),constraints:e.constraints,dateFormat:t.dateFormat,disabled:r,readonly:n})},B6={type:"DROPDOWN",name:"Dropdown",groups:[],renderField:(e,t,{disabled:r,readonly:n,name:u})=>J.jsx(uh,{name:u??e.id,label:J.jsx(an,{...e,children:e.label}),rules:Nn(e),options:e.options,disabled:r,readonly:n})},I6={type:"CHECKBOX",name:"Checkbox",groups:[],renderField:(e,t,{disabled:r,readonly:n,name:u})=>J.jsx(Ff,{name:u??e.id,label:J.jsx(an,{...e,readonly:n,children:e.label}),rules:Nn(e),disabled:r,readonly:n})},R6={type:"TEXTINPUT",name:"Text",groups:[],maxLength:262144,filter:e=>e.replace(/[^\u0000-\u00FF ]/g,""),renderField:(e,t,{disabled:r,readonly:n,name:u})=>J.jsx(Of,{rules:Nn(e),label:J.jsx(an,{...e,readonly:n,children:e.label}),name:u??e.id,disabled:r,readonly:n,maxLength:t.maxLength,filter:t.filter})},k6={type:"NUMBER",name:"Number",groups:[],decimalPlaces:14,renderField:(e,t,{disabled:r,readonly:n,name:u})=>J.jsx(rh,{name:u??e.id,label:J.jsx(an,{...e,readonly:n,children:e.label}),rules:{...Nn(e),min:{value:e.min,message:`Value must be at least ${e.min}.`},max:{value:e.max,message:`Value must be no more than ${e.max}.`}},disabled:r,readonly:n,decimalPlaces:t.decimalPlaces})},q6={type:"CALCULATEDNUMBER",name:"Calculated Number",groups:[],renderField:(e,t,{readonly:r,name:n})=>J.jsx(nh,{name:n??e.id,label:J.jsx(an,{...e,readonly:r,children:e.label}),rules:[]})},Nn=e=>({required:{value:e.required??!1,message:"This field is required."}}),fh=[R6,k6,q6,B6,I6,P6];function L6({children:e,template:t,fieldTypes:r=fh,layout:n}){return J.jsx(Ur.LocalizationProvider,{dateAdapter:S6,adapterLocale:void 0,children:J.jsx(F6,{layout:n,children:J.jsx(O6,{template:t,fieldTypes:r,children:e})})})}var $s,lh;function j6(){if(lh)return $s;lh=1;function e(){this.__data__=[],this.size=0}return $s=e,$s}var zs,dh;function hh(){if(dh)return zs;dh=1;function e(t,r){return t===r||t!==t&&r!==r}return zs=e,zs}var Hs,ph;function Ni(){if(ph)return Hs;ph=1;var e=hh();function t(r,n){for(var u=r.length;u--;)if(e(r[u][0],n))return u;return-1}return Hs=t,Hs}var Us,mh;function $6(){if(mh)return Us;mh=1;var e=Ni(),t=Array.prototype,r=t.splice;function n(u){var i=this.__data__,a=e(i,u);if(a<0)return!1;var s=i.length-1;return a==s?i.pop():r.call(i,a,1),--this.size,!0}return Us=n,Us}var Vs,gh;function z6(){if(gh)return Vs;gh=1;var e=Ni();function t(r){var n=this.__data__,u=e(n,r);return u<0?void 0:n[u][1]}return Vs=t,Vs}var Ws,bh;function H6(){if(bh)return Ws;bh=1;var e=Ni();function t(r){return e(this.__data__,r)>-1}return Ws=t,Ws}var Ys,yh;function U6(){if(yh)return Ys;yh=1;var e=Ni();function t(r,n){var u=this.__data__,i=e(u,r);return i<0?(++this.size,u.push([r,n])):u[i][1]=n,this}return Ys=t,Ys}var Gs,vh;function Mi(){if(vh)return Gs;vh=1;var e=j6(),t=$6(),r=z6(),n=H6(),u=U6();function i(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var c=a[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=u,Gs=i,Gs}var Xs,wh;function V6(){if(wh)return Xs;wh=1;var e=Mi();function t(){this.__data__=new e,this.size=0}return Xs=t,Xs}var Qs,Dh;function W6(){if(Dh)return Qs;Dh=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return Qs=e,Qs}var Ks,Eh;function Y6(){if(Eh)return Ks;Eh=1;function e(t){return this.__data__.get(t)}return Ks=e,Ks}var Zs,xh;function G6(){if(xh)return Zs;xh=1;function e(t){return this.__data__.has(t)}return Zs=e,Zs}var Js,Ah;function Ch(){if(Ah)return Js;Ah=1;var e=typeof gu=="object"&&gu&&gu.Object===Object&&gu;return Js=e,Js}var eo,_h;function Or(){if(_h)return eo;_h=1;var e=Ch(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return eo=r,eo}var to,Th;function ro(){if(Th)return to;Th=1;var e=Or(),t=e.Symbol;return to=t,to}var no,Sh;function X6(){if(Sh)return no;Sh=1;var e=ro(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,u=e?e.toStringTag:void 0;function i(a){var s=r.call(a,u),l=a[u];try{a[u]=void 0;var c=!0}catch{}var f=n.call(a);return c&&(s?a[u]=l:delete a[u]),f}return no=i,no}var uo,Fh;function Q6(){if(Fh)return uo;Fh=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return uo=r,uo}var io,Oh;function Pi(){if(Oh)return io;Oh=1;var e=ro(),t=X6(),r=Q6(),n="[object Null]",u="[object Undefined]",i=e?e.toStringTag:void 0;function a(s){return s==null?s===void 0?u:n:i&&i in Object(s)?t(s):r(s)}return io=a,io}var ao,Nh;function Mh(){if(Nh)return ao;Nh=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return ao=e,ao}var so,Ph;function Bh(){if(Ph)return so;Ph=1;var e=Pi(),t=Mh(),r="[object AsyncFunction]",n="[object Function]",u="[object GeneratorFunction]",i="[object Proxy]";function a(s){if(!t(s))return!1;var l=e(s);return l==n||l==u||l==r||l==i}return so=a,so}var oo,Ih;function K6(){if(Ih)return oo;Ih=1;var e=Or(),t=e["__core-js_shared__"];return oo=t,oo}var co,Rh;function Z6(){if(Rh)return co;Rh=1;var e=K6(),t=function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function r(n){return!!t&&t in n}return co=r,co}var fo,kh;function qh(){if(kh)return fo;kh=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return fo=r,fo}var lo,Lh;function J6(){if(Lh)return lo;Lh=1;var e=Bh(),t=Z6(),r=Mh(),n=qh(),u=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,a=Function.prototype,s=Object.prototype,l=a.toString,c=s.hasOwnProperty,f=RegExp("^"+l.call(c).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p(o){if(!r(o)||t(o))return!1;var d=e(o)?f:i;return d.test(n(o))}return lo=p,lo}var ho,jh;function e4(){if(jh)return ho;jh=1;function e(t,r){return t==null?void 0:t[r]}return ho=e,ho}var po,$h;function Mn(){if($h)return po;$h=1;var e=J6(),t=e4();function r(n,u){var i=t(n,u);return e(i)?i:void 0}return po=r,po}var mo,zh;function go(){if(zh)return mo;zh=1;var e=Mn(),t=Or(),r=e(t,"Map");return mo=r,mo}var bo,Hh;function Bi(){if(Hh)return bo;Hh=1;var e=Mn(),t=e(Object,"create");return bo=t,bo}var yo,Uh;function t4(){if(Uh)return yo;Uh=1;var e=Bi();function t(){this.__data__=e?e(null):{},this.size=0}return yo=t,yo}var vo,Vh;function r4(){if(Vh)return vo;Vh=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return vo=e,vo}var wo,Wh;function n4(){if(Wh)return wo;Wh=1;var e=Bi(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function u(i){var a=this.__data__;if(e){var s=a[i];return s===t?void 0:s}return n.call(a,i)?a[i]:void 0}return wo=u,wo}var Do,Yh;function u4(){if(Yh)return Do;Yh=1;var e=Bi(),t=Object.prototype,r=t.hasOwnProperty;function n(u){var i=this.__data__;return e?i[u]!==void 0:r.call(i,u)}return Do=n,Do}var Eo,Gh;function i4(){if(Gh)return Eo;Gh=1;var e=Bi(),t="__lodash_hash_undefined__";function r(n,u){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=e&&u===void 0?t:u,this}return Eo=r,Eo}var xo,Xh;function a4(){if(Xh)return xo;Xh=1;var e=t4(),t=r4(),r=n4(),n=u4(),u=i4();function i(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var c=a[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=u,xo=i,xo}var Ao,Qh;function s4(){if(Qh)return Ao;Qh=1;var e=a4(),t=Mi(),r=go();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Ao=n,Ao}var Co,Kh;function o4(){if(Kh)return Co;Kh=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Co=e,Co}var _o,Zh;function Ii(){if(Zh)return _o;Zh=1;var e=o4();function t(r,n){var u=r.__data__;return e(n)?u[typeof n=="string"?"string":"hash"]:u.map}return _o=t,_o}var To,Jh;function c4(){if(Jh)return To;Jh=1;var e=Ii();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return To=t,To}var So,e1;function f4(){if(e1)return So;e1=1;var e=Ii();function t(r){return e(this,r).get(r)}return So=t,So}var Fo,t1;function l4(){if(t1)return Fo;t1=1;var e=Ii();function t(r){return e(this,r).has(r)}return Fo=t,Fo}var Oo,r1;function d4(){if(r1)return Oo;r1=1;var e=Ii();function t(r,n){var u=e(this,r),i=u.size;return u.set(r,n),this.size+=u.size==i?0:1,this}return Oo=t,Oo}var No,n1;function u1(){if(n1)return No;n1=1;var e=s4(),t=c4(),r=f4(),n=l4(),u=d4();function i(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var c=a[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=u,No=i,No}var Mo,i1;function h4(){if(i1)return Mo;i1=1;var e=Mi(),t=go(),r=u1(),n=200;function u(i,a){var s=this.__data__;if(s instanceof e){var l=s.__data__;if(!t||l.length<n-1)return l.push([i,a]),this.size=++s.size,this;s=this.__data__=new r(l)}return s.set(i,a),this.size=s.size,this}return Mo=u,Mo}var Po,a1;function p4(){if(a1)return Po;a1=1;var e=Mi(),t=V6(),r=W6(),n=Y6(),u=G6(),i=h4();function a(s){var l=this.__data__=new e(s);this.size=l.size}return a.prototype.clear=t,a.prototype.delete=r,a.prototype.get=n,a.prototype.has=u,a.prototype.set=i,Po=a,Po}var Bo,s1;function m4(){if(s1)return Bo;s1=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return Bo=t,Bo}var Io,o1;function g4(){if(o1)return Io;o1=1;function e(t){return this.__data__.has(t)}return Io=e,Io}var Ro,c1;function b4(){if(c1)return Ro;c1=1;var e=u1(),t=m4(),r=g4();function n(u){var i=-1,a=u==null?0:u.length;for(this.__data__=new e;++i<a;)this.add(u[i])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,Ro=n,Ro}var ko,f1;function y4(){if(f1)return ko;f1=1;function e(t,r){for(var n=-1,u=t==null?0:t.length;++n<u;)if(r(t[n],n,t))return!0;return!1}return ko=e,ko}var qo,l1;function v4(){if(l1)return qo;l1=1;function e(t,r){return t.has(r)}return qo=e,qo}var Lo,d1;function h1(){if(d1)return Lo;d1=1;var e=b4(),t=y4(),r=v4(),n=1,u=2;function i(a,s,l,c,f,p){var o=l&n,d=a.length,m=s.length;if(d!=m&&!(o&&m>d))return!1;var h=p.get(a),b=p.get(s);if(h&&b)return h==s&&b==a;var g=-1,w=!0,v=l&u?new e:void 0;for(p.set(a,s),p.set(s,a);++g<d;){var D=a[g],y=s[g];if(c)var E=o?c(y,D,g,s,a,p):c(D,y,g,a,s,p);if(E!==void 0){if(E)continue;w=!1;break}if(v){if(!t(s,function(A,C){if(!r(v,C)&&(D===A||f(D,A,l,c,p)))return v.push(C)})){w=!1;break}}else if(!(D===y||f(D,y,l,c,p))){w=!1;break}}return p.delete(a),p.delete(s),w}return Lo=i,Lo}var jo,p1;function w4(){if(p1)return jo;p1=1;var e=Or(),t=e.Uint8Array;return jo=t,jo}var $o,m1;function D4(){if(m1)return $o;m1=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(u,i){n[++r]=[i,u]}),n}return $o=e,$o}var zo,g1;function E4(){if(g1)return zo;g1=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(u){n[++r]=u}),n}return zo=e,zo}var Ho,b1;function x4(){if(b1)return Ho;b1=1;var e=ro(),t=w4(),r=hh(),n=h1(),u=D4(),i=E4(),a=1,s=2,l="[object Boolean]",c="[object Date]",f="[object Error]",p="[object Map]",o="[object Number]",d="[object RegExp]",m="[object Set]",h="[object String]",b="[object Symbol]",g="[object ArrayBuffer]",w="[object DataView]",v=e?e.prototype:void 0,D=v?v.valueOf:void 0;function y(E,A,C,T,x,_,F){switch(C){case w:if(E.byteLength!=A.byteLength||E.byteOffset!=A.byteOffset)return!1;E=E.buffer,A=A.buffer;case g:return!(E.byteLength!=A.byteLength||!_(new t(E),new t(A)));case l:case c:case o:return r(+E,+A);case f:return E.name==A.name&&E.message==A.message;case d:case h:return E==A+"";case p:var M=u;case m:var B=T&a;if(M||(M=i),E.size!=A.size&&!B)return!1;var N=F.get(E);if(N)return N==A;T|=s,F.set(E,A);var I=n(M(E),M(A),T,x,_,F);return F.delete(E),I;case b:if(D)return D.call(E)==D.call(A)}return!1}return Ho=y,Ho}var Uo,y1;function A4(){if(y1)return Uo;y1=1;function e(t,r){for(var n=-1,u=r.length,i=t.length;++n<u;)t[i+n]=r[n];return t}return Uo=e,Uo}var Vo,v1;function Wo(){if(v1)return Vo;v1=1;var e=Array.isArray;return Vo=e,Vo}var Yo,w1;function C4(){if(w1)return Yo;w1=1;var e=A4(),t=Wo();function r(n,u,i){var a=u(n);return t(n)?a:e(a,i(n))}return Yo=r,Yo}var Go,D1;function _4(){if(D1)return Go;D1=1;function e(t,r){for(var n=-1,u=t==null?0:t.length,i=0,a=[];++n<u;){var s=t[n];r(s,n,t)&&(a[i++]=s)}return a}return Go=e,Go}var Xo,E1;function T4(){if(E1)return Xo;E1=1;function e(){return[]}return Xo=e,Xo}var Qo,x1;function S4(){if(x1)return Qo;x1=1;var e=_4(),t=T4(),r=Object.prototype,n=r.propertyIsEnumerable,u=Object.getOwnPropertySymbols,i=u?function(a){return a==null?[]:(a=Object(a),e(u(a),function(s){return n.call(a,s)}))}:t;return Qo=i,Qo}var Ko,A1;function F4(){if(A1)return Ko;A1=1;function e(t,r){for(var n=-1,u=Array(t);++n<t;)u[n]=r(n);return u}return Ko=e,Ko}var Zo,C1;function Ri(){if(C1)return Zo;C1=1;function e(t){return t!=null&&typeof t=="object"}return Zo=e,Zo}var Jo,_1;function O4(){if(_1)return Jo;_1=1;var e=Pi(),t=Ri(),r="[object Arguments]";function n(u){return t(u)&&e(u)==r}return Jo=n,Jo}var ec,T1;function N4(){if(T1)return ec;T1=1;var e=O4(),t=Ri(),r=Object.prototype,n=r.hasOwnProperty,u=r.propertyIsEnumerable,i=e(function(){return arguments}())?e:function(a){return t(a)&&n.call(a,"callee")&&!u.call(a,"callee")};return ec=i,ec}var lu={exports:{}},tc,S1;function M4(){if(S1)return tc;S1=1;function e(){return!1}return tc=e,tc}lu.exports;var F1;function O1(){return F1||(F1=1,function(e,t){var r=Or(),n=M4(),u=t&&!t.nodeType&&t,i=u&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===u,s=a?r.Buffer:void 0,l=s?s.isBuffer:void 0,c=l||n;e.exports=c}(lu,lu.exports)),lu.exports}var rc,N1;function P4(){if(N1)return rc;N1=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,u){var i=typeof n;return u=u??e,!!u&&(i=="number"||i!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<u}return rc=r,rc}var nc,M1;function P1(){if(M1)return nc;M1=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return nc=t,nc}var uc,B1;function B4(){if(B1)return uc;B1=1;var e=Pi(),t=P1(),r=Ri(),n="[object Arguments]",u="[object Array]",i="[object Boolean]",a="[object Date]",s="[object Error]",l="[object Function]",c="[object Map]",f="[object Number]",p="[object Object]",o="[object RegExp]",d="[object Set]",m="[object String]",h="[object WeakMap]",b="[object ArrayBuffer]",g="[object DataView]",w="[object Float32Array]",v="[object Float64Array]",D="[object Int8Array]",y="[object Int16Array]",E="[object Int32Array]",A="[object Uint8Array]",C="[object Uint8ClampedArray]",T="[object Uint16Array]",x="[object Uint32Array]",_={};_[w]=_[v]=_[D]=_[y]=_[E]=_[A]=_[C]=_[T]=_[x]=!0,_[n]=_[u]=_[b]=_[i]=_[g]=_[a]=_[s]=_[l]=_[c]=_[f]=_[p]=_[o]=_[d]=_[m]=_[h]=!1;function F(M){return r(M)&&t(M.length)&&!!_[e(M)]}return uc=F,uc}var ic,I1;function I4(){if(I1)return ic;I1=1;function e(t){return function(r){return t(r)}}return ic=e,ic}var du={exports:{}};du.exports;var R1;function R4(){return R1||(R1=1,function(e,t){var r=Ch(),n=t&&!t.nodeType&&t,u=n&&!0&&e&&!e.nodeType&&e,i=u&&u.exports===n,a=i&&r.process,s=function(){try{var l=u&&u.require&&u.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s}(du,du.exports)),du.exports}var ac,k1;function q1(){if(k1)return ac;k1=1;var e=B4(),t=I4(),r=R4(),n=r&&r.isTypedArray,u=n?t(n):e;return ac=u,ac}var sc,L1;function k4(){if(L1)return sc;L1=1;var e=F4(),t=N4(),r=Wo(),n=O1(),u=P4(),i=q1(),a=Object.prototype,s=a.hasOwnProperty;function l(c,f){var p=r(c),o=!p&&t(c),d=!p&&!o&&n(c),m=!p&&!o&&!d&&i(c),h=p||o||d||m,b=h?e(c.length,String):[],g=b.length;for(var w in c)(f||s.call(c,w))&&!(h&&(w=="length"||d&&(w=="offset"||w=="parent")||m&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||u(w,g)))&&b.push(w);return b}return sc=l,sc}var oc,j1;function q4(){if(j1)return oc;j1=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,u=typeof n=="function"&&n.prototype||e;return r===u}return oc=t,oc}var cc,$1;function L4(){if($1)return cc;$1=1;function e(t,r){return function(n){return t(r(n))}}return cc=e,cc}var fc,z1;function j4(){if(z1)return fc;z1=1;var e=L4(),t=e(Object.keys,Object);return fc=t,fc}var lc,H1;function $4(){if(H1)return lc;H1=1;var e=q4(),t=j4(),r=Object.prototype,n=r.hasOwnProperty;function u(i){if(!e(i))return t(i);var a=[];for(var s in Object(i))n.call(i,s)&&s!="constructor"&&a.push(s);return a}return lc=u,lc}var dc,U1;function z4(){if(U1)return dc;U1=1;var e=Bh(),t=P1();function r(n){return n!=null&&t(n.length)&&!e(n)}return dc=r,dc}var hc,V1;function H4(){if(V1)return hc;V1=1;var e=k4(),t=$4(),r=z4();function n(u){return r(u)?e(u):t(u)}return hc=n,hc}var pc,W1;function U4(){if(W1)return pc;W1=1;var e=C4(),t=S4(),r=H4();function n(u){return e(u,r,t)}return pc=n,pc}var mc,Y1;function V4(){if(Y1)return mc;Y1=1;var e=U4(),t=1,r=Object.prototype,n=r.hasOwnProperty;function u(i,a,s,l,c,f){var p=s&t,o=e(i),d=o.length,m=e(a),h=m.length;if(d!=h&&!p)return!1;for(var b=d;b--;){var g=o[b];if(!(p?g in a:n.call(a,g)))return!1}var w=f.get(i),v=f.get(a);if(w&&v)return w==a&&v==i;var D=!0;f.set(i,a),f.set(a,i);for(var y=p;++b<d;){g=o[b];var E=i[g],A=a[g];if(l)var C=p?l(A,E,g,a,i,f):l(E,A,g,i,a,f);if(!(C===void 0?E===A||c(E,A,s,l,f):C)){D=!1;break}y||(y=g=="constructor")}if(D&&!y){var T=i.constructor,x=a.constructor;T!=x&&"constructor"in i&&"constructor"in a&&!(typeof T=="function"&&T instanceof T&&typeof x=="function"&&x instanceof x)&&(D=!1)}return f.delete(i),f.delete(a),D}return mc=u,mc}var gc,G1;function W4(){if(G1)return gc;G1=1;var e=Mn(),t=Or(),r=e(t,"DataView");return gc=r,gc}var bc,X1;function Y4(){if(X1)return bc;X1=1;var e=Mn(),t=Or(),r=e(t,"Promise");return bc=r,bc}var yc,Q1;function G4(){if(Q1)return yc;Q1=1;var e=Mn(),t=Or(),r=e(t,"Set");return yc=r,yc}var vc,K1;function X4(){if(K1)return vc;K1=1;var e=Mn(),t=Or(),r=e(t,"WeakMap");return vc=r,vc}var wc,Z1;function Q4(){if(Z1)return wc;Z1=1;var e=W4(),t=go(),r=Y4(),n=G4(),u=X4(),i=Pi(),a=qh(),s="[object Map]",l="[object Object]",c="[object Promise]",f="[object Set]",p="[object WeakMap]",o="[object DataView]",d=a(e),m=a(t),h=a(r),b=a(n),g=a(u),w=i;return(e&&w(new e(new ArrayBuffer(1)))!=o||t&&w(new t)!=s||r&&w(r.resolve())!=c||n&&w(new n)!=f||u&&w(new u)!=p)&&(w=function(v){var D=i(v),y=D==l?v.constructor:void 0,E=y?a(y):"";if(E)switch(E){case d:return o;case m:return s;case h:return c;case b:return f;case g:return p}return D}),wc=w,wc}var Dc,J1;function K4(){if(J1)return Dc;J1=1;var e=p4(),t=h1(),r=x4(),n=V4(),u=Q4(),i=Wo(),a=O1(),s=q1(),l=1,c="[object Arguments]",f="[object Array]",p="[object Object]",o=Object.prototype,d=o.hasOwnProperty;function m(h,b,g,w,v,D){var y=i(h),E=i(b),A=y?f:u(h),C=E?f:u(b);A=A==c?p:A,C=C==c?p:C;var T=A==p,x=C==p,_=A==C;if(_&&a(h)){if(!a(b))return!1;y=!0,T=!1}if(_&&!T)return D||(D=new e),y||s(h)?t(h,b,g,w,v,D):r(h,b,A,g,w,v,D);if(!(g&l)){var F=T&&d.call(h,"__wrapped__"),M=x&&d.call(b,"__wrapped__");if(F||M){var B=F?h.value():h,N=M?b.value():b;return D||(D=new e),v(B,N,g,w,D)}}return _?(D||(D=new e),n(h,b,g,w,v,D)):!1}return Dc=m,Dc}var Ec,ep;function Z4(){if(ep)return Ec;ep=1;var e=K4(),t=Ri();function r(n,u,i,a,s){return n===u?!0:n==null||u==null||!t(n)&&!t(u)?n!==n&&u!==u:e(n,u,i,a,r,s)}return Ec=r,Ec}var xc,tp;function J4(){if(tp)return xc;tp=1;var e=Z4();function t(r,n){return e(r,n)}return xc=t,xc}var e8=J4();const t8=bu(e8);function r8({children:e,formOptions:t,submitOptions:r,loading:n}){const u=Jt.useForm(t),{handleSubmit:i,reset:a,watch:s}=u,l=Xe.useRef(null);Xe.useEffect(()=>{if(n)return;const b=t==null?void 0:t.defaultValues;b&&(t8(l.current,b)||(a(b),l.current=b))},[n,a,t==null?void 0:t.defaultValues]);const{onSubmit:c,onReset:f,formId:p,submitOnChange:o,registerForm:d}=r||{},m=async b=>{await(c==null?void 0:c(b)),a(b)},h=async()=>{a(t==null?void 0:t.defaultValues),await(f==null?void 0:f())};return Xe.useEffect(()=>{if(!o)return()=>{};const b=s(g=>i(w=>c==null?void 0:c(w))(g));return()=>b.unsubscribe()},[s,o,i,c]),J.jsx(Jt.FormProvider,{...u,children:J.jsx("form",{"data-testid":p,onSubmit:i(m),onReset:h,ref:d,id:p,style:{width:"100%"},children:e})})}function n8({children:e,formOptions:t,submitOptions:r}){const{formId:n,onSubmit:u,onBlur:i}=r,a=Jt.useForm(t),{getFieldState:s,reset:l,getValues:c,handleSubmit:f,trigger:p}=a,o=async()=>{const d=c(),m=Object.keys(d).filter(g=>s(g).isDirty);await p(m);const b=m.filter(g=>!s(g).invalid).reduce((g,w)=>(g[w]=d[w],g),{});Object.keys(b).length>0&&(await(i==null?void 0:i(b)),l({...d,...b},{keepErrors:!0}))};return J.jsx(Jt.FormProvider,{...a,children:J.jsx("form",{onBlur:o,onSubmit:f(async d=>{await(u==null?void 0:u(d)),l(d)}),id:n,"data-testid":n,children:e})})}function rp({id:e,name:t,readonly:r,disabled:n,wrapper:u}){const{field:i}=sh(),a=M6(e),s=N6(a.type);if(!s||!s.renderField)return J.jsxs(qe.Box,{children:["Missing render for field type ",a.type]});const{renderField:l,...c}=s,f=i==null?void 0:i(a,c),p=u||qe.Box;return J.jsx(p,{"data-testid":"field-container",field:a,sx:f,children:l(a,c,{readonly:r,name:t,disabled:n})})}function u8({section:e,fields:t,fieldNames:r,readonly:n,disabled:u,fieldWrapper:i}){const{section:a}=sh(),s=a==null?void 0:a(e);return J.jsx(qe.Box,{"data-testid":"section-container",sx:s,children:t.map((l,c)=>J.jsx(rp,{id:l,name:(r==null?void 0:r[c])??l,readonly:n,disabled:u,wrapper:i},l))})}Se.AutosaveForm=n8,Se.CalculatedNumber=nh,Se.CheckboxInput=Ff,Se.DateInput=Sf,Se.DropdownInput=uh,Se.ErrorMessage=ln,Se.Field=rp,Se.Form=r8,Se.FormFieldLabel=an,Se.LabelWithChildren=$a,Se.NumberInput=rh,Se.ReadOnlyField=Jr,Se.RendererProvider=L6,Se.Section=u8,Se.TextInput=Of,Se.defaultFieldTypes=fh,Se.defaultRules=Nn,Object.defineProperty(Se,Symbol.toStringTag,{value:"Module"})});
@@ -8,12 +8,14 @@ import { FieldTemplate } from '@opengov/form-utils';
8
8
  * @param id - The fieldId to render.
9
9
  * @param name - The name of the field within the form.
10
10
  * @param readonly - Whether the field is readonly.
11
+ * @param disabled - Whether the field is disabled.
11
12
  * @returns A Field component.
12
13
  */
13
- export default function Field({ id, name, readonly, wrapper, }: {
14
+ export default function Field({ id, name, readonly, disabled, wrapper, }: {
14
15
  id: string;
15
16
  name?: string;
16
17
  readonly?: boolean;
18
+ disabled?: boolean;
17
19
  wrapper?: React.ComponentType<{
18
20
  children: React.ReactNode;
19
21
  field: FieldTemplate;
@@ -10,11 +10,12 @@ import { FieldTemplate, SectionTemplate } from '@opengov/form-utils';
10
10
  * @param readonly - Whether the section is readonly.
11
11
  * @returns A Section component.
12
12
  */
13
- export default function Section({ section, fields, fieldNames, readonly, fieldWrapper, }: {
13
+ export default function Section({ section, fields, fieldNames, readonly, disabled, fieldWrapper, }: {
14
14
  section: SectionTemplate;
15
15
  fields: string[];
16
16
  fieldNames?: string[];
17
17
  readonly?: boolean;
18
+ disabled?: boolean;
18
19
  fieldWrapper?: React.ComponentType<{
19
20
  children: React.ReactNode;
20
21
  field: FieldTemplate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengov/form-renderer",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "OpenGov Smart Forms form renderer",
5
5
  "type": "module",
6
6
  "files": [