@malloy-publisher/sdk 0.0.123 → 0.0.124
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/client/api.d.ts
CHANGED
|
@@ -937,6 +937,12 @@ export interface Table {
|
|
|
937
937
|
* @memberof Table
|
|
938
938
|
*/
|
|
939
939
|
'resource'?: string;
|
|
940
|
+
/**
|
|
941
|
+
* Table source as a JSON string.
|
|
942
|
+
* @type {string}
|
|
943
|
+
* @memberof Table
|
|
944
|
+
*/
|
|
945
|
+
'source'?: string;
|
|
940
946
|
/**
|
|
941
947
|
* Table fields
|
|
942
948
|
* @type {Array<Column>}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Malloy Publisher - Semantic Model Serving API
|
|
3
|
-
* The Malloy Publisher - Semantic Model Serving API provides comprehensive access to Malloy packages and their associated resources.
|
|
3
|
+
* The Malloy Publisher - Semantic Model Serving API provides comprehensive access to Malloy packages and their associated resources. A Malloy package is a directory containing Malloy models (.malloy files), Malloy notebooks (.malloynb files), and embedded databases (.parquet files) with a malloy-publisher.json manifest at the package\'s root directory. ## Key Features - **Project Management**: Create and manage projects with their associated packages and connections - **Package Lifecycle**: Full CRUD operations for Malloy packages and their versions - **Model & Notebook Access**: Retrieve and execute Malloy models and notebooks - **Connection Management**: Secure database connection configuration and testing - **Query Execution**: Execute queries against models and retrieve results - **Watch Mode**: Real-time file watching for development workflows ## Resource Hierarchy The API follows a hierarchical resource structure: ``` Projects ├── Connections └── Packages ├── Models ├── Notebooks └── Databases ``` For examples, see the Malloy samples packages (https://github.com/malloydata/malloy-samples) repository.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: v0
|
|
6
6
|
*
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Malloy Publisher - Semantic Model Serving API
|
|
3
|
-
* The Malloy Publisher - Semantic Model Serving API provides comprehensive access to Malloy packages and their associated resources.
|
|
3
|
+
* The Malloy Publisher - Semantic Model Serving API provides comprehensive access to Malloy packages and their associated resources. A Malloy package is a directory containing Malloy models (.malloy files), Malloy notebooks (.malloynb files), and embedded databases (.parquet files) with a malloy-publisher.json manifest at the package\'s root directory. ## Key Features - **Project Management**: Create and manage projects with their associated packages and connections - **Package Lifecycle**: Full CRUD operations for Malloy packages and their versions - **Model & Notebook Access**: Retrieve and execute Malloy models and notebooks - **Connection Management**: Secure database connection configuration and testing - **Query Execution**: Execute queries against models and retrieve results - **Watch Mode**: Real-time file watching for development workflows ## Resource Hierarchy The API follows a hierarchical resource structure: ``` Projects ├── Connections └── Packages ├── Models ├── Notebooks └── Databases ``` For examples, see the Malloy samples packages (https://github.com/malloydata/malloy-samples) repository.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: v0
|
|
6
6
|
*
|
package/dist/index.cjs.js
CHANGED
|
@@ -127,7 +127,7 @@ export default theme;`}function yp(e){return typeof e=="number"?`${(e*100).toFix
|
|
|
127
127
|
animation: ${ic} 1.4s ease-in-out infinite;
|
|
128
128
|
`:null,Wv=e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,`color${me(r)}`],svg:["svg"],circle:["circle",`circle${me(n)}`,i&&"circleDisableShrink"]};return ze(o,$v,t)},Vv=ce("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${me(n.color)}`]]}})(Xe(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:zv||{animation:`${rc} 1.4s linear infinite`}},...Object.entries(e.palette).filter(nn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Gv=ce("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),Yv=ce("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${me(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Xe(({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:qv||{animation:`${ic} 1.4s ease-in-out infinite`}}]}))),O0=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiCircularProgress"}),{className:i,color:o="primary",disableShrink:s=!1,size:a=40,style:l,thickness:u=3.6,value:c=0,variant:d="indeterminate",...h}=r,f={...r,color:o,disableShrink:s,size:a,thickness:u,value:c,variant:d},g=Wv(f),x={},b={},y={};if(d==="determinate"){const C=2*Math.PI*((kr-u)/2);x.strokeDasharray=C.toFixed(3),y["aria-valuenow"]=Math.round(c),x.strokeDashoffset=`${((100-c)/100*C).toFixed(3)}px`,b.transform="rotate(-90deg)"}return p.jsx(Vv,{className:De(g.root,i),style:{width:a,height:a,...b,...l},ownerState:f,ref:n,role:"progressbar",...y,...h,children:p.jsx(Gv,{className:g.svg,ownerState:f,viewBox:`${kr/2} ${kr/2} ${kr} ${kr}`,children:p.jsx(Yv,{className:g.circle,style:x,ownerState:f,cx:kr,cy:kr,r:(kr-u)/2,fill:"none",strokeWidth:u})})})});function Kv(e){return qe("MuiIconButton",e)}const sf=Me("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Qv=e=>{const{classes:t,disabled:n,color:r,edge:i,size:o,loading:s}=e,a={root:["root",s&&"loading",n&&"disabled",r!=="default"&&`color${me(r)}`,i&&`edge${me(i)}`,`size${me(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return ze(a,Kv,t)},Xv=ce(Hi,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${me(n.color)}`],n.edge&&t[`edge${me(n.edge)}`],t[`size${me(n.size)}`]]}})(Xe(({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}}]})),Xe(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(nn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(nn()).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)}}],[`&.${sf.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${sf.loading}`]:{color:"transparent"}}))),Zv=ce("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"}}]})),Ui=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiIconButton"}),{edge:i=!1,children:o,className:s,color:a="default",disabled:l=!1,disableFocusRipple:u=!1,size:c="medium",id:d,loading:h=null,loadingIndicator:f,...g}=r,x=Vi(d),b=f??p.jsx(O0,{"aria-labelledby":x,color:"inherit",size:16}),y={...r,edge:i,color:a,disabled:l,disableFocusRipple:u,loading:h,loadingIndicator:b,size:c},C=Qv(y);return p.jsxs(Xv,{id:h?x:d,className:De(C.root,s),centerRipple:!0,focusRipple:!u,disabled:l||h,ref:n,...g,ownerState:y,children:[typeof h=="boolean"&&p.jsx("span",{className:C.loadingWrapper,style:{display:"contents"},children:p.jsx(Zv,{className:C.loadingIndicator,ownerState:y,children:h&&b})}),o]})}),Jv=it(p.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}));function e6(e){return qe("MuiChip",e)}const Ke=Me("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]);function nt(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,internalForwardedProps:s,shouldForwardComponentProp:a=!1,...l}=t,{component:u,slots:c={[e]:void 0},slotProps:d={[e]:void 0},...h}=o,f=c[e]||r,g=Wn(d[e],i),{props:{component:x,...b},internalRef:y}=_0({className:n,...l,externalForwardedProps:e==="root"?h:void 0,externalSlotProps:g}),C=mt(y,g?.ref,t.ref),E=e==="root"?x||u:x,S=D0(f,{...e==="root"&&!u&&!c[e]&&s,...e!=="root"&&!c[e]&&s,...b,...E&&!a&&{as:E},...E&&a&&{component:E},ref:C},i);return[f,S]}const t6=e=>{const{classes:t,disabled:n,size:r,color:i,iconColor:o,onDelete:s,clickable:a,variant:l}=e,u={root:["root",l,n&&"disabled",`size${me(r)}`,`color${me(i)}`,a&&"clickable",a&&`clickableColor${me(i)}`,s&&"deletable",s&&`deletableColor${me(i)}`,`${l}${me(i)}`],label:["label",`label${me(r)}`],avatar:["avatar",`avatar${me(r)}`,`avatarColor${me(i)}`],icon:["icon",`icon${me(r)}`,`iconColor${me(o)}`],deleteIcon:["deleteIcon",`deleteIcon${me(r)}`,`deleteIconColor${me(i)}`,`deleteIcon${me(l)}Color${me(i)}`]};return ze(u,e6,t)},n6=ce("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:i,clickable:o,onDelete:s,size:a,variant:l}=n;return[{[`& .${Ke.avatar}`]:t.avatar},{[`& .${Ke.avatar}`]:t[`avatar${me(a)}`]},{[`& .${Ke.avatar}`]:t[`avatarColor${me(r)}`]},{[`& .${Ke.icon}`]:t.icon},{[`& .${Ke.icon}`]:t[`icon${me(a)}`]},{[`& .${Ke.icon}`]:t[`iconColor${me(i)}`]},{[`& .${Ke.deleteIcon}`]:t.deleteIcon},{[`& .${Ke.deleteIcon}`]:t[`deleteIcon${me(a)}`]},{[`& .${Ke.deleteIcon}`]:t[`deleteIconColor${me(r)}`]},{[`& .${Ke.deleteIcon}`]:t[`deleteIcon${me(l)}Color${me(r)}`]},t.root,t[`size${me(a)}`],t[`color${me(r)}`],o&&t.clickable,o&&r!=="default"&&t[`clickableColor${me(r)})`],s&&t.deletable,s&&r!=="default"&&t[`deletableColor${me(r)}`],t[l],t[`${l}${me(r)}`]]}})(Xe(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Ke.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Ke.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Ke.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Ke.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Ke.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Ke.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Ke.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${Ke.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Ke.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(nn(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${Ke.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[n].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${Ke.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${Ke.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${Ke.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(nn(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${Ke.focusVisible}`]:{background:(e.vars||e).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},[`&.${Ke.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(nn(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${Ke.focusVisible}`]:{backgroundColor:(e.vars||e).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Ke.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Ke.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Ke.avatar}`]:{marginLeft:4},[`& .${Ke.avatarSmall}`]:{marginLeft:2},[`& .${Ke.icon}`]:{marginLeft:4},[`& .${Ke.iconSmall}`]:{marginLeft:2},[`& .${Ke.deleteIcon}`]:{marginRight:5},[`& .${Ke.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(nn()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(e.vars||e).palette[n].main,border:`1px solid ${e.alpha((e.vars||e).palette[n].main,.7)}`,[`&.${Ke.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${Ke.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.focusOpacity)},[`& .${Ke.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),r6=ce("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${me(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function af(e){return e.key==="Backspace"||e.key==="Delete"}const i6=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiChip"}),{avatar:i,className:o,clickable:s,color:a="default",component:l,deleteIcon:u,disabled:c=!1,icon:d,label:h,onClick:f,onDelete:g,onKeyDown:x,onKeyUp:b,size:y="medium",variant:C="filled",tabIndex:E,skipFocusWhenDisabled:S=!1,slots:I={},slotProps:k={},...F}=r,z=A.useRef(null),U=mt(z,n),D=q=>{q.stopPropagation(),g&&g(q)},j=q=>{q.currentTarget===q.target&&af(q)&&q.preventDefault(),x&&x(q)},T=q=>{q.currentTarget===q.target&&g&&af(q)&&g(q),b&&b(q)},L=s!==!1&&f?!0:s,N=L||g?Hi:l||"div",M={...r,component:N,disabled:c,size:y,color:a,iconColor:A.isValidElement(d)&&d.props.color||a,onDelete:!!g,clickable:L,variant:C},H=t6(M),X=N===Hi?{component:l||"div",focusVisibleClassName:H.focusVisible,...g&&{disableRipple:!0}}:{};let ue=null;g&&(ue=u&&A.isValidElement(u)?A.cloneElement(u,{className:De(u.props.className,H.deleteIcon),onClick:D}):p.jsx(Jv,{className:H.deleteIcon,onClick:D}));let $=null;i&&A.isValidElement(i)&&($=A.cloneElement(i,{className:De(H.avatar,i.props.className)}));let _=null;d&&A.isValidElement(d)&&(_=A.cloneElement(d,{className:De(H.icon,d.props.className)}));const te={slots:I,slotProps:k},[oe,P]=nt("root",{elementType:n6,externalForwardedProps:{...te,...F},ownerState:M,shouldForwardComponentProp:!0,ref:U,className:De(H.root,o),additionalProps:{disabled:L&&c?!0:void 0,tabIndex:S&&c?-1:E,...X},getSlotProps:q=>({...q,onClick:re=>{q.onClick?.(re),f?.(re)},onKeyDown:re=>{q.onKeyDown?.(re),j(re)},onKeyUp:re=>{q.onKeyUp?.(re),T(re)}})}),[Ee,se]=nt("label",{elementType:r6,externalForwardedProps:te,ownerState:M,className:H.label});return p.jsxs(oe,{as:N,...P,children:[$||_,p.jsx(Ee,{...se,children:h}),ue]})});function Ms(e){return parseInt(e,10)||0}const o6={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function s6(e){for(const t in e)return!1;return!0}function lf(e){return s6(e)||e.outerHeightStyle===0&&!e.overflowing}const a6=A.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:a,...l}=t,{current:u}=A.useRef(a!=null),c=A.useRef(null),d=mt(n,c),h=A.useRef(null),f=A.useRef(null),g=A.useCallback(()=>{const E=c.current,S=f.current;if(!E||!S)return;const k=fr(E).getComputedStyle(E);if(k.width==="0px")return{outerHeightStyle:0,overflowing:!1};S.style.width=k.width,S.value=E.value||t.placeholder||"x",S.value.slice(-1)===`
|
|
129
129
|
`&&(S.value+=" ");const F=k.boxSizing,z=Ms(k.paddingBottom)+Ms(k.paddingTop),U=Ms(k.borderBottomWidth)+Ms(k.borderTopWidth),D=S.scrollHeight;S.value="x";const j=S.scrollHeight;let T=D;o&&(T=Math.max(Number(o)*j,T)),i&&(T=Math.min(Number(i)*j,T)),T=Math.max(T,j);const L=T+(F==="border-box"?z+U:0),N=Math.abs(T-D)<=1;return{outerHeightStyle:L,overflowing:N}},[i,o,t.placeholder]),x=wt(()=>{const E=c.current,S=g();if(!E||!S||lf(S))return!1;const I=S.outerHeightStyle;return h.current!=null&&h.current!==I}),b=A.useCallback(()=>{const E=c.current,S=g();if(!E||!S||lf(S))return;const I=S.outerHeightStyle;h.current!==I&&(h.current=I,E.style.height=`${I}px`),E.style.overflow=S.overflowing?"hidden":""},[g]),y=A.useRef(-1);Qn(()=>{const E=wm(b),S=c?.current;if(!S)return;const I=fr(S);I.addEventListener("resize",E);let k;return typeof ResizeObserver<"u"&&(k=new ResizeObserver(()=>{x()&&(k.unobserve(S),cancelAnimationFrame(y.current),b(),y.current=requestAnimationFrame(()=>{k.observe(S)}))}),k.observe(S)),()=>{E.clear(),cancelAnimationFrame(y.current),I.removeEventListener("resize",E),k&&k.disconnect()}},[g,b,x]),Qn(()=>{b()});const C=E=>{u||b();const S=E.target,I=S.value.length,k=S.value.endsWith(`
|
|
130
|
-
`),F=S.selectionStart===I;k&&F&&S.setSelectionRange(I,I),r&&r(E)};return p.jsxs(A.Fragment,{children:[p.jsx("textarea",{value:a,onChange:C,ref:d,rows:o,style:s,...l}),p.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:f,tabIndex:-1,style:{...o6.shadow,...s,paddingTop:0,paddingBottom:0}})]})});function Ji({props:e,states:t,muiFormControl:n}){return t.reduce((r,i)=>(r[i]=e[i],n&&typeof e[i]>"u"&&(r[i]=n[i]),r),{})}const ed=A.createContext(void 0);function li(){return A.useContext(ed)}function uf(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function _a(e,t=!1){return e&&(uf(e.value)&&e.value!==""||t&&uf(e.defaultValue)&&e.defaultValue!=="")}function l6(e){return e.startAdornment}function u6(e){return qe("MuiInputBase",e)}const bn=Me("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var cf;const cl=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${me(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},dl=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},c6=e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:s,formControl:a,fullWidth:l,hiddenLabel:u,multiline:c,readOnly:d,size:h,startAdornment:f,type:g}=e,x={root:["root",`color${me(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",s&&"focused",a&&"formControl",h&&h!=="medium"&&`size${me(h)}`,c&&"multiline",f&&"adornedStart",o&&"adornedEnd",u&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled",g==="search"&&"inputTypeSearch",c&&"inputMultiline",h==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",f&&"inputAdornedStart",o&&"inputAdornedEnd",d&&"readOnly"]};return ze(x,u6,t)},pl=ce("div",{name:"MuiInputBase",slot:"Root",overridesResolver:cl})(Xe(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${bn.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),fl=ce("input",{name:"MuiInputBase",slot:"Input",overridesResolver:dl})(Xe(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${bn.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${bn.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:o})=>!o.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:o})=>o.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),df=A2({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),td=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:o,autoFocus:s,className:a,color:l,components:u={},componentsProps:c={},defaultValue:d,disabled:h,disableInjectingGlobalStyles:f,endAdornment:g,error:x,fullWidth:b=!1,id:y,inputComponent:C="input",inputProps:E={},inputRef:S,margin:I,maxRows:k,minRows:F,multiline:z=!1,name:U,onBlur:D,onChange:j,onClick:T,onFocus:L,onKeyDown:N,onKeyUp:M,placeholder:H,readOnly:X,renderSuffix:ue,rows:$,size:_,slotProps:te={},slots:oe={},startAdornment:P,type:Ee="text",value:se,...q}=r,re=E.value!=null?E.value:se,{current:ie}=A.useRef(re!=null),Te=A.useRef(),K=A.useCallback(Ie=>{},[]),W=mt(Te,S,E.ref,K),[Ce,ve]=A.useState(!1),ne=li(),Be=Ji({props:r,muiFormControl:ne,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Be.focused=ne?ne.focused:Ce,A.useEffect(()=>{!ne&&h&&Ce&&(ve(!1),D&&D())},[ne,h,Ce,D]);const Le=ne&&ne.onFilled,_e=ne&&ne.onEmpty,ye=A.useCallback(Ie=>{_a(Ie)?Le&&Le():_e&&_e()},[Le,_e]);Qn(()=>{ie&&ye({value:re})},[re,ye,ie]);const Ze=Ie=>{L&&L(Ie),E.onFocus&&E.onFocus(Ie),ne&&ne.onFocus?ne.onFocus(Ie):ve(!0)},Se=Ie=>{D&&D(Ie),E.onBlur&&E.onBlur(Ie),ne&&ne.onBlur?ne.onBlur(Ie):ve(!1)},Ue=(Ie,...Ye)=>{if(!ie){const gt=Ie.target||Te.current;if(gt==null)throw new Error(dr(1));ye({value:gt.value})}E.onChange&&E.onChange(Ie,...Ye),j&&j(Ie,...Ye)};A.useEffect(()=>{ye(Te.current)},[]);const xe=Ie=>{Te.current&&Ie.currentTarget===Ie.target&&Te.current.focus(),T&&T(Ie)};let yt=C,et=E;z&&yt==="input"&&($?et={type:void 0,minRows:$,maxRows:$,...et}:et={type:void 0,maxRows:k,minRows:F,...et},yt=a6);const je=Ie=>{ye(Ie.animationName==="mui-auto-fill-cancel"?Te.current:{value:"x"})};A.useEffect(()=>{ne&&ne.setAdornedStart(!!P)},[ne,P]);const Y={...r,color:Be.color||"primary",disabled:Be.disabled,endAdornment:g,error:Be.error,focused:Be.focused,formControl:ne,fullWidth:b,hiddenLabel:Be.hiddenLabel,multiline:z,size:Be.size,startAdornment:P,type:Ee},fe=c6(Y),Ae=oe.root||u.Root||pl,Ne=te.root||c.root||{},Pe=oe.input||u.Input||fl;return et={...et,...te.input??c.input},p.jsxs(A.Fragment,{children:[!f&&typeof df=="function"&&(cf||(cf=p.jsx(df,{}))),p.jsxs(Ae,{...Ne,ref:n,onClick:xe,...q,...!Aa(Ae)&&{ownerState:{...Y,...Ne.ownerState}},className:De(fe.root,Ne.className,a,X&&"MuiInputBase-readOnly"),children:[P,p.jsx(ed.Provider,{value:null,children:p.jsx(Pe,{"aria-invalid":Be.error,"aria-describedby":i,autoComplete:o,autoFocus:s,defaultValue:d,disabled:Be.disabled,id:y,onAnimationStart:je,name:U,placeholder:H,readOnly:X,required:Be.required,rows:$,value:re,onKeyDown:N,onKeyUp:M,type:Ee,...et,...!Aa(Pe)&&{as:yt,ownerState:{...Y,...et.ownerState}},ref:W,className:De(fe.input,et.className,X&&"MuiInputBase-readOnly"),onBlur:Se,onChange:Ue,onFocus:Ze})}),g,ue?ue({...Be,startAdornment:P}):null]})]})});function d6(e){return qe("MuiInput",e)}const Dr={...bn,...Me("MuiInput",["root","underline","input"])};function p6(e){return qe("MuiOutlinedInput",e)}const kn={...bn,...Me("MuiOutlinedInput",["root","notchedOutline","input"])};function f6(e){return qe("MuiFilledInput",e)}const xn={...bn,...Me("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},h6=it(p.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),F0=it(p.jsx("path",{d:"M7 10l5 5 5-5z"}));function m6(e){return qe("MuiAutocomplete",e)}const We=Me("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var pf,ff;const g6=e=>{const{classes:t,disablePortal:n,expanded:r,focused:i,fullWidth:o,hasClearIcon:s,hasPopupIcon:a,inputFocused:l,popupOpen:u,size:c}=e,d={root:["root",r&&"expanded",i&&"focused",o&&"fullWidth",s&&"hasClearIcon",a&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${me(c)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",u&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return ze(d,m6,t)},b6=ce("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:i,hasPopupIcon:o,inputFocused:s,size:a}=n;return[{[`& .${We.tag}`]:t.tag},{[`& .${We.tag}`]:t[`tagSize${me(a)}`]},{[`& .${We.inputRoot}`]:t.inputRoot},{[`& .${We.input}`]:t.input},{[`& .${We.input}`]:s&&t.inputFocused},t.root,r&&t.fullWidth,o&&t.hasPopupIcon,i&&t.hasClearIcon]}})({[`&.${We.focused} .${We.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${We.clearIndicator}`]:{visibility:"visible"}},[`& .${We.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${We.inputRoot}`]:{[`.${We.hasPopupIcon}&, .${We.hasClearIcon}&`]:{paddingRight:30},[`.${We.hasPopupIcon}.${We.hasClearIcon}&`]:{paddingRight:56},[`& .${We.input}`]:{width:0,minWidth:30}},[`& .${Dr.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${Dr.root}.${bn.sizeSmall}`]:{[`& .${Dr.input}`]:{padding:"2px 4px 3px 0"}},[`& .${kn.root}`]:{padding:9,[`.${We.hasPopupIcon}&, .${We.hasClearIcon}&`]:{paddingRight:39},[`.${We.hasPopupIcon}.${We.hasClearIcon}&`]:{paddingRight:65},[`& .${We.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${We.endAdornment}`]:{right:9}},[`& .${kn.root}.${bn.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${We.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${xn.root}`]:{paddingTop:19,paddingLeft:8,[`.${We.hasPopupIcon}&, .${We.hasClearIcon}&`]:{paddingRight:39},[`.${We.hasPopupIcon}.${We.hasClearIcon}&`]:{paddingRight:65},[`& .${xn.input}`]:{padding:"7px 4px"},[`& .${We.endAdornment}`]:{right:9}},[`& .${xn.root}.${bn.sizeSmall}`]:{paddingBottom:1,[`& .${xn.input}`]:{padding:"2.5px 4px"}},[`& .${bn.hiddenLabel}`]:{paddingTop:8},[`& .${xn.root}.${bn.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${We.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${xn.root}.${bn.hiddenLabel}.${bn.sizeSmall}`]:{[`& .${We.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${We.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${We.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${We.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${We.inputRoot}`]:{flexWrap:"wrap"}}}]}),x6=ce("div",{name:"MuiAutocomplete",slot:"EndAdornment"})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),y6=ce(Ui,{name:"MuiAutocomplete",slot:"ClearIndicator"})({marginRight:-2,padding:4,visibility:"hidden"}),E6=ce(Ui,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),C6=ce(R0,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${We.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(Xe(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),T6=ce(Zi,{name:"MuiAutocomplete",slot:"Paper"})(Xe(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),v6=ce("div",{name:"MuiAutocomplete",slot:"Loading"})(Xe(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),S6=ce("div",{name:"MuiAutocomplete",slot:"NoOptions"})(Xe(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),k6=ce("ul",{name:"MuiAutocomplete",slot:"Listbox"})(Xe(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${We.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${We.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${We.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${We.focused}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${We.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}}}))),I6=ce(Ju,{name:"MuiAutocomplete",slot:"GroupLabel"})(Xe(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),A6=ce("ul",{name:"MuiAutocomplete",slot:"GroupUl"})({padding:0,[`& .${We.option}`]:{paddingLeft:24}}),w6=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiAutocomplete"}),{autoComplete:i=!1,autoHighlight:o=!1,autoSelect:s=!1,blurOnSelect:a=!1,ChipProps:l,className:u,clearIcon:c=pf||(pf=p.jsx(h6,{fontSize:"small"})),clearOnBlur:d=!r.freeSolo,clearOnEscape:h=!1,clearText:f="Clear",closeText:g="Close",componentsProps:x,defaultValue:b=r.multiple?[]:null,disableClearable:y=!1,disableCloseOnSelect:C=!1,disabled:E=!1,disabledItemsFocusable:S=!1,disableListWrap:I=!1,disablePortal:k=!1,filterOptions:F,filterSelectedOptions:z=!1,forcePopupIcon:U="auto",freeSolo:D=!1,fullWidth:j=!1,getLimitTagsText:T=rt=>`+${rt}`,getOptionDisabled:L,getOptionKey:N,getOptionLabel:M,isOptionEqualToValue:H,groupBy:X,handleHomeEndKeys:ue=!r.freeSolo,id:$,includeInputInList:_=!1,inputValue:te,limitTags:oe=-1,ListboxComponent:P,ListboxProps:Ee,loading:se=!1,loadingText:q="Loading…",multiple:re=!1,noOptionsText:ie="No options",onChange:Te,onClose:K,onHighlightChange:W,onInputChange:Ce,onOpen:ve,open:ne,openOnFocus:Be=!1,openText:Le="Open",options:_e,PaperComponent:ye,PopperComponent:Ze,popupIcon:Se=ff||(ff=p.jsx(F0,{})),readOnly:Ue=!1,renderGroup:xe,renderInput:yt,renderOption:et,renderTags:je,renderValue:Y,selectOnFocus:fe=!r.freeSolo,size:Ae="medium",slots:Ne={},slotProps:Pe={},value:Ie,...Ye}=r,{getRootProps:gt,getInputProps:lt,getInputLabelProps:G,getPopupIndicatorProps:ae,getClearProps:he,getItemProps:we,getListboxProps:Tt,getOptionProps:an,value:Ht,dirty:Lt,expanded:_t,id:Tn,popupOpen:ft,focused:zt,focusedItem:tr,anchorEl:vn,setAnchorEl:jr,inputValue:Fn,groupedOptions:nr}=KT({...r,componentName:"Autocomplete"}),pi=!y&&!E&&Lt&&!Ue,lo=(!D||U===!0)&&U!==!1,{onMouseDown:Al}=lt(),{ref:wl,...Dl}=Tt(),uo=M||(rt=>rt.label??rt),Pt={...r,disablePortal:k,expanded:_t,focused:zt,fullWidth:j,getOptionLabel:uo,hasClearIcon:pi,hasPopupIcon:lo,inputFocused:tr===-1,popupOpen:ft,size:Ae},Ot=g6(Pt),Tr={slots:{paper:ye,popper:Ze,...Ne},slotProps:{chip:l,listbox:Ee,...x,...Pe}},[Pl,co]=nt("listbox",{elementType:k6,externalForwardedProps:Tr,ownerState:Pt,className:Ot.listbox,additionalProps:Dl,ref:wl}),[Ds,ee]=nt("paper",{elementType:Zi,externalForwardedProps:Tr,ownerState:Pt,className:Ot.paper}),[J,ke]=nt("popper",{elementType:R0,externalForwardedProps:Tr,ownerState:Pt,className:Ot.popper,additionalProps:{disablePortal:k,style:{width:vn?vn.clientWidth:null},role:"presentation",anchorEl:vn,open:ft}});let Oe;const Fe=rt=>({className:Ot.tag,disabled:E,...we(rt)});if(re?Ht.length>0&&(je?Oe=je(Ht,Fe,Pt):Y?Oe=Y(Ht,Fe,Pt):Oe=Ht.map((rt,vr)=>{const{key:Sr,...po}=Fe({index:vr});return p.jsx(i6,{label:uo(rt),size:Ae,...po,...Tr.slotProps.chip},Sr)})):Y&&Ht!=null&&(Oe=Y(Ht,Fe,Pt)),oe>-1&&Array.isArray(Oe)){const rt=Oe.length-oe;!zt&&rt>0&&(Oe=Oe.splice(0,oe),Oe.push(p.jsx("span",{className:Ot.tag,children:T(rt)},Oe.length)))}const vt=xe||(rt=>p.jsxs("li",{children:[p.jsx(I6,{className:Ot.groupLabel,ownerState:Pt,component:"div",children:rt.group}),p.jsx(A6,{className:Ot.groupUl,ownerState:Pt,children:rt.children})]},rt.key)),_s=et||((rt,vr)=>{const{key:Sr,...po}=rt;return p.jsx("li",{...po,children:uo(vr)},Sr)}),Wd=(rt,vr)=>{const Sr=an({option:rt,index:vr});return _s({...Sr,className:Ot.option},rt,{selected:Sr["aria-selected"],index:vr,inputValue:Fn},Pt)},Vd=Tr.slotProps.clearIndicator,Gd=Tr.slotProps.popupIndicator;return p.jsxs(A.Fragment,{children:[p.jsx(b6,{ref:n,className:De(Ot.root,u),ownerState:Pt,...gt(Ye),children:yt({id:Tn,disabled:E,fullWidth:!0,size:Ae==="small"?"small":void 0,InputLabelProps:G(),InputProps:{ref:jr,className:Ot.inputRoot,startAdornment:Oe,onMouseDown:rt=>{rt.target===rt.currentTarget&&Al(rt)},...(pi||lo)&&{endAdornment:p.jsxs(x6,{className:Ot.endAdornment,ownerState:Pt,children:[pi?p.jsx(y6,{...he(),"aria-label":f,title:f,ownerState:Pt,...Vd,className:De(Ot.clearIndicator,Vd?.className),children:c}):null,lo?p.jsx(E6,{...ae(),disabled:E,"aria-label":ft?g:Le,title:ft?g:Le,ownerState:Pt,...Gd,className:De(Ot.popupIndicator,Gd?.className),children:Se}):null]})}},inputProps:{className:Ot.input,disabled:E,readOnly:Ue,...lt()}})}),vn?p.jsx(C6,{as:J,...ke,children:p.jsxs(T6,{as:Ds,...ee,children:[se&&nr.length===0?p.jsx(v6,{className:Ot.loading,ownerState:Pt,children:q}):null,nr.length===0&&!D&&!se?p.jsx(S6,{className:Ot.noOptions,ownerState:Pt,role:"presentation",onMouseDown:rt=>{rt.preventDefault()},children:ie}):null,nr.length>0?p.jsx(Pl,{as:P,...co,children:nr.map((rt,vr)=>X?vt({key:rt.key,group:rt.group,children:rt.options.map((Sr,po)=>Wd(Sr,rt.index+po))}):Wd(rt,vr))}):null]})}):null]})}),D6=e=>{const{classes:t,disableUnderline:n}=e,i=ze({root:["root",!n&&"underline"],input:["input"]},d6,t);return{...t,...i}},_6=ce(pl,{shouldForwardProp:e=>on(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...cl(e,t),!n.disableUnderline&&t.underline]}})(Xe(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Dr.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Dr.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Dr.disabled}, .${Dr.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Dr.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(nn()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),P6=ce(fl,{name:"MuiInput",slot:"Input",overridesResolver:dl})({}),nd=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiInput"}),{disableUnderline:i=!1,components:o={},componentsProps:s,fullWidth:a=!1,inputComponent:l="input",multiline:u=!1,slotProps:c,slots:d={},type:h="text",...f}=r,g=D6(r),b={root:{ownerState:{disableUnderline:i}}},y=c??s?Gt(c??s,b):b,C=d.root??o.Root??_6,E=d.input??o.Input??P6;return p.jsx(td,{slots:{root:C,input:E},slotProps:y,fullWidth:a,inputComponent:l,multiline:u,ref:n,type:h,...f,classes:g})});nd.muiName="Input";const R6=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:o,hiddenLabel:s,multiline:a}=e,l={root:["root",!n&&"underline",r&&"adornedStart",i&&"adornedEnd",o==="small"&&`size${me(o)}`,s&&"hiddenLabel",a&&"multiline"],input:["input"]},u=ze(l,f6,t);return{...t,...u}},N6=ce(pl,{shouldForwardProp:e=>on(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...cl(e,t),!n.disableUnderline&&t.underline]}})(Xe(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",i=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",o=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${xn.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${xn.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:o},variants:[{props:({ownerState:s})=>!s.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${xn.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${xn.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${xn.disabled}, .${xn.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${xn.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(nn()).map(([s])=>({props:{disableUnderline:!1,color:s},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[s]?.main}`}}})),{props:({ownerState:s})=>s.startAdornment,style:{paddingLeft:12}},{props:({ownerState:s})=>s.endAdornment,style:{paddingRight:12}},{props:({ownerState:s})=>s.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:s,size:a})=>s.multiline&&a==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel&&s.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),L6=ce(fl,{name:"MuiFilledInput",slot:"Input",overridesResolver:dl})(Xe(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),rd=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiFilledInput"}),{disableUnderline:i=!1,components:o={},componentsProps:s,fullWidth:a=!1,hiddenLabel:l,inputComponent:u="input",multiline:c=!1,slotProps:d,slots:h={},type:f="text",...g}=r,x={...r,disableUnderline:i,fullWidth:a,inputComponent:u,multiline:c,type:f},b=R6(r),y={root:{ownerState:x},input:{ownerState:x}},C=d??s?Gt(y,d??s):y,E=h.root??o.Root??N6,S=h.input??o.Input??L6;return p.jsx(td,{slots:{root:E,input:S},slotProps:C,fullWidth:a,inputComponent:u,multiline:c,ref:n,type:f,...g,classes:b})});rd.muiName="Input";var hf;const O6=ce("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:on})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),F6=ce("legend",{name:"MuiNotchedOutlined",shouldForwardProp:on})(Xe(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function M6(e){const{children:t,classes:n,className:r,label:i,notched:o,...s}=e,a=i!=null&&i!=="",l={...e,notched:o,withLabel:a};return p.jsx(O6,{"aria-hidden":!0,className:r,ownerState:l,...s,children:p.jsx(F6,{ownerState:l,children:a?p.jsx("span",{children:i}):hf||(hf=p.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})}const B6=e=>{const{classes:t}=e,r=ze({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},p6,t);return{...t,...r}},j6=ce(pl,{shouldForwardProp:e=>on(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:cl})(Xe(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${kn.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${kn.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${kn.focused} .${kn.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(nn()).map(([n])=>({props:{color:n},style:{[`&.${kn.focused} .${kn.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${kn.error} .${kn.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${kn.disabled} .${kn.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),H6=ce(M6,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(Xe(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),U6=ce(fl,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:dl})(Xe(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),id=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiOutlinedInput"}),{components:i={},fullWidth:o=!1,inputComponent:s="input",label:a,multiline:l=!1,notched:u,slots:c={},slotProps:d={},type:h="text",...f}=r,g=B6(r),x=li(),b=Ji({props:r,muiFormControl:x,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),y={...r,color:b.color||"primary",disabled:b.disabled,error:b.error,focused:b.focused,formControl:x,fullWidth:o,hiddenLabel:b.hiddenLabel,multiline:l,size:b.size,type:h},C=c.root??i.Root??j6,E=c.input??i.Input??U6,[S,I]=nt("notchedOutline",{elementType:H6,className:g.notchedOutline,shouldForwardComponentProp:!0,ownerState:y,externalForwardedProps:{slots:c,slotProps:d},additionalProps:{label:a!=null&&a!==""&&b.required?p.jsxs(A.Fragment,{children:[a," ","*"]}):a}});return p.jsx(td,{slots:{root:C,input:E},slotProps:d,renderSuffix:k=>p.jsx(S,{...I,notched:typeof u<"u"?u:!!(k.startAdornment||k.filled||k.focused)}),fullWidth:o,inputComponent:s,multiline:l,ref:n,type:h,...f,classes:{...g,notchedOutline:null}})});id.muiName="Input";function $6(e){return qe("MuiFormLabel",e)}const Mo=Me("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),z6=e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:s,required:a}=e,l={root:["root",`color${me(n)}`,i&&"disabled",o&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",o&&"error"]};return ze(l,$6,t)},q6=ce("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color==="secondary"&&t.colorSecondary,n.filled&&t.filled]}})(Xe(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(nn()).map(([t])=>({props:{color:t},style:{[`&.${Mo.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Mo.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Mo.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),W6=ce("span",{name:"MuiFormLabel",slot:"Asterisk"})(Xe(({theme:e})=>({[`&.${Mo.error}`]:{color:(e.vars||e).palette.error.main}}))),V6=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiFormLabel"}),{children:i,className:o,color:s,component:a="label",disabled:l,error:u,filled:c,focused:d,required:h,...f}=r,g=li(),x=Ji({props:r,muiFormControl:g,states:["color","required","focused","disabled","error","filled"]}),b={...r,color:x.color||"primary",component:a,disabled:x.disabled,error:x.error,filled:x.filled,focused:x.focused,required:x.required},y=z6(b);return p.jsxs(q6,{as:a,ownerState:b,className:De(y.root,o),ref:n,...f,children:[i,x.required&&p.jsxs(W6,{ownerState:b,"aria-hidden":!0,className:y.asterisk,children:[" ","*"]})]})});function G6(e){return qe("MuiInputLabel",e)}Me("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const Y6=e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:o,variant:s,required:a}=e,l={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&r!=="medium"&&`size${me(r)}`,s],asterisk:[a&&"asterisk"]},u=ze(l,G6,t);return{...t,...u}},K6=ce(V6,{shouldForwardProp:e=>on(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Mo.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(Xe(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:r})=>t==="filled"&&n.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),Q6=A.forwardRef(function(t,n){const r=Ge({name:"MuiInputLabel",props:t}),{disableAnimation:i=!1,margin:o,shrink:s,variant:a,className:l,...u}=r,c=li();let d=s;typeof d>"u"&&c&&(d=c.filled||c.focused||c.adornedStart);const h=Ji({props:r,muiFormControl:c,states:["size","variant","required","focused"]}),f={...r,disableAnimation:i,formControl:c,shrink:d,size:h.size,variant:h.variant,required:h.required,focused:h.focused},g=Y6(f);return p.jsx(K6,{"data-shrink":d,ref:n,className:De(g.root,l),...u,ownerState:f,classes:g})});function X6(e){return qe("MuiFormControl",e)}Me("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Z6=e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root",n!=="none"&&`margin${me(n)}`,r&&"fullWidth"]};return ze(i,X6,t)},J6=ce("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${me(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),eS=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:a="div",disabled:l=!1,error:u=!1,focused:c,fullWidth:d=!1,hiddenLabel:h=!1,margin:f="none",required:g=!1,size:x="medium",variant:b="outlined",...y}=r,C={...r,color:s,component:a,disabled:l,error:u,fullWidth:d,hiddenLabel:h,margin:f,required:g,size:x,variant:b},E=Z6(C),[S,I]=A.useState(()=>{let M=!1;return i&&A.Children.forEach(i,H=>{if(!Hl(H,["Input","Select"]))return;const X=Hl(H,["Select"])?H.props.input:H;X&&l6(X.props)&&(M=!0)}),M}),[k,F]=A.useState(()=>{let M=!1;return i&&A.Children.forEach(i,H=>{Hl(H,["Input","Select"])&&(_a(H.props,!0)||_a(H.props.inputProps,!0))&&(M=!0)}),M}),[z,U]=A.useState(!1);l&&z&&U(!1);const D=c!==void 0&&!l?c:z;let j;A.useRef(!1);const T=A.useCallback(()=>{F(!0)},[]),L=A.useCallback(()=>{F(!1)},[]),N=A.useMemo(()=>({adornedStart:S,setAdornedStart:I,color:s,disabled:l,error:u,filled:k,focused:D,fullWidth:d,hiddenLabel:h,size:x,onBlur:()=>{U(!1)},onFocus:()=>{U(!0)},onEmpty:L,onFilled:T,registerEffect:j,required:g,variant:b}),[S,s,l,u,k,D,d,h,j,L,T,g,x,b]);return p.jsx(ed.Provider,{value:N,children:p.jsx(J6,{as:a,ownerState:C,className:De(E.root,o),ref:n,...y,children:i})})});function tS(e){return qe("MuiFormHelperText",e)}const mf=Me("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var gf;const nS=e=>{const{classes:t,contained:n,size:r,disabled:i,error:o,filled:s,focused:a,required:l}=e,u={root:["root",i&&"disabled",o&&"error",r&&`size${me(r)}`,n&&"contained",a&&"focused",s&&"filled",l&&"required"]};return ze(u,tS,t)},rS=ce("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${me(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(Xe(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${mf.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${mf.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),iS=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiFormHelperText"}),{children:i,className:o,component:s="p",disabled:a,error:l,filled:u,focused:c,margin:d,required:h,variant:f,...g}=r,x=li(),b=Ji({props:r,muiFormControl:x,states:["variant","size","disabled","error","filled","focused","required"]}),y={...r,component:s,contained:b.variant==="filled"||b.variant==="outlined",variant:b.variant,size:b.size,disabled:b.disabled,error:b.error,filled:b.filled,focused:b.focused,required:b.required};delete y.ownerState;const C=nS(y);return p.jsx(rS,{as:s,className:De(C.root,o),ref:n,...g,ownerState:y,children:i===" "?gf||(gf=p.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):i})}),oc=A.createContext({});function oS(e){return qe("MuiList",e)}Me("MuiList",["root","padding","dense","subheader"]);const sS=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return ze({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},oS,t)},aS=ce("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),lS=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:u,...c}=r,d=A.useMemo(()=>({dense:a}),[a]),h={...r,component:s,dense:a,disablePadding:l},f=sS(h);return p.jsx(oc.Provider,{value:d,children:p.jsxs(aS,{as:s,className:De(f.root,o),ref:n,ownerState:h,...c,children:[u,i]})})});function M0(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function Ql(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function bf(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function B0(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function go(e,t,n,r,i,o){let s=!1,a=i(e,t,t?n:!1);for(;a;){if(a===e.firstChild){if(s)return!1;s=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!B0(a,o)||l)a=i(e,a,n);else return a.focus(),!0}return!1}const uS=A.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:u=!1,onKeyDown:c,variant:d="selectedMenu",...h}=t,f=A.useRef(null),g=A.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Qn(()=>{i&&f.current.focus()},[i]),A.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(E,{direction:S})=>{const I=!f.current.style.width;if(E.clientHeight<f.current.clientHeight&&I){const k=`${M0(fr(E))}px`;f.current.style[S==="rtl"?"paddingLeft":"paddingRight"]=k,f.current.style.width=`calc(100% + ${k})`}return f.current}}),[]);const x=E=>{const S=f.current,I=E.key;if(E.ctrlKey||E.metaKey||E.altKey){c&&c(E);return}const F=Ut(S).activeElement;if(I==="ArrowDown")E.preventDefault(),go(S,F,u,l,Ql);else if(I==="ArrowUp")E.preventDefault(),go(S,F,u,l,bf);else if(I==="Home")E.preventDefault(),go(S,null,u,l,Ql);else if(I==="End")E.preventDefault(),go(S,null,u,l,bf);else if(I.length===1){const z=g.current,U=I.toLowerCase(),D=performance.now();z.keys.length>0&&(D-z.lastTime>500?(z.keys=[],z.repeating=!0,z.previousKeyMatched=!0):z.repeating&&U!==z.keys[0]&&(z.repeating=!1)),z.lastTime=D,z.keys.push(U);const j=F&&!z.repeating&&B0(F,z);z.previousKeyMatched&&(j||go(S,F,!1,l,Ql,z))?E.preventDefault():z.previousKeyMatched=!1}c&&c(E)},b=mt(f,n);let y=-1;A.Children.forEach(s,(E,S)=>{if(!A.isValidElement(E)){y===S&&(y+=1,y>=s.length&&(y=-1));return}E.props.disabled||(d==="selectedMenu"&&E.props.selected||y===-1)&&(y=S),y===S&&(E.props.disabled||E.props.muiSkipListHighlight||E.type.muiSkipListHighlight)&&(y+=1,y>=s.length&&(y=-1))});const C=A.Children.map(s,(E,S)=>{if(S===y){const I={};return o&&(I.autoFocus=!0),E.props.tabIndex===void 0&&d==="selectedMenu"&&(I.tabIndex=0),A.cloneElement(E,I)}return E});return p.jsx(lS,{role:"menu",ref:b,className:a,onKeyDown:x,tabIndex:i?0:-1,...h,children:C})}),j0=e=>e.scrollTop;function $i(e,t){const{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:i.transitionDelay}}function sc(e){return`scale(${e}, ${e**2})`}const cS={entering:{opacity:1,transform:sc(1)},entered:{opacity:1,transform:"none"}},Xl=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Pa=A.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:a,onEnter:l,onEntered:u,onEntering:c,onExit:d,onExited:h,onExiting:f,style:g,timeout:x="auto",TransitionComponent:b=jn,...y}=t,C=ul(),E=A.useRef(),S=Gi(),I=A.useRef(null),k=mt(I,Xi(o),n),F=M=>H=>{if(M){const X=I.current;H===void 0?M(X):M(X,H)}},z=F(c),U=F((M,H)=>{j0(M);const{duration:X,delay:ue,easing:$}=$i({style:g,timeout:x,easing:s},{mode:"enter"});let _;x==="auto"?(_=S.transitions.getAutoHeightDuration(M.clientHeight),E.current=_):_=X,M.style.transition=[S.transitions.create("opacity",{duration:_,delay:ue}),S.transitions.create("transform",{duration:Xl?_:_*.666,delay:ue,easing:$})].join(","),l&&l(M,H)}),D=F(u),j=F(f),T=F(M=>{const{duration:H,delay:X,easing:ue}=$i({style:g,timeout:x,easing:s},{mode:"exit"});let $;x==="auto"?($=S.transitions.getAutoHeightDuration(M.clientHeight),E.current=$):$=H,M.style.transition=[S.transitions.create("opacity",{duration:$,delay:X}),S.transitions.create("transform",{duration:Xl?$:$*.666,delay:Xl?X:X||$*.333,easing:ue})].join(","),M.style.opacity=0,M.style.transform=sc(.75),d&&d(M)}),L=F(h),N=M=>{x==="auto"&&C.start(E.current||0,M),r&&r(I.current,M)};return p.jsx(b,{appear:i,in:a,nodeRef:I,onEnter:U,onEntered:D,onEntering:z,onExit:T,onExited:L,onExiting:j,addEndListener:N,timeout:x==="auto"?null:x,...y,children:(M,{ownerState:H,...X})=>A.cloneElement(o,{style:{opacity:0,transform:sc(.75),visibility:M==="exited"&&!a?"hidden":void 0,...cS[M],...g,...o.props.style},ref:k,...X})})});Pa&&(Pa.muiSupportAuto=!0);function dS(e){const t=Ut(e);return t.body===e?fr(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Bo(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function xf(e){return parseInt(fr(e).getComputedStyle(e).paddingRight,10)||0}function pS(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function yf(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,s=>{const a=!o.includes(s),l=!pS(s);a&&l&&Bo(s,i)})}function Zl(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function fS(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(dS(r)){const s=M0(fr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${xf(r)+s}px`;const a=Ut(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${xf(l)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Ut(r).body;else{const s=r.parentElement,a=fr(r);o=s?.nodeName==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:a})=>{o?s.style.setProperty(a,o):s.style.removeProperty(a)})}}function hS(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class mS{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&Bo(t.modalRef,!1);const i=hS(n);yf(n,t.mount,t.modalRef,i,!0);const o=Zl(this.containers,s=>s.container===n);return o!==-1?(this.containers[o].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=Zl(this.containers,o=>o.modals.includes(t)),i=this.containers[r];i.restore||(i.restore=fS(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=Zl(this.containers,s=>s.modals.includes(t)),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&Bo(t.modalRef,n),yf(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=o.modals[o.modals.length-1];s.modalRef&&Bo(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const gS=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function bS(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function xS(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function yS(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||xS(e))}function ES(e){const t=[],n=[];return Array.from(e.querySelectorAll(gS)).forEach((r,i)=>{const o=bS(r);o===-1||!yS(r)||(o===0?t.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function CS(){return!0}function TS(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=ES,isEnabled:s=CS,open:a}=e,l=A.useRef(!1),u=A.useRef(null),c=A.useRef(null),d=A.useRef(null),h=A.useRef(null),f=A.useRef(!1),g=A.useRef(null),x=mt(Xi(t),g),b=A.useRef(null);A.useEffect(()=>{!a||!g.current||(f.current=!n)},[n,a]),A.useEffect(()=>{if(!a||!g.current)return;const E=Ut(g.current);return g.current.contains(E.activeElement)||(g.current.hasAttribute("tabIndex")||g.current.setAttribute("tabIndex","-1"),f.current&&g.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[a]),A.useEffect(()=>{if(!a||!g.current)return;const E=Ut(g.current),S=F=>{b.current=F,!(r||!s()||F.key!=="Tab")&&E.activeElement===g.current&&F.shiftKey&&(l.current=!0,c.current&&c.current.focus())},I=()=>{const F=g.current;if(F===null)return;if(!E.hasFocus()||!s()||l.current){l.current=!1;return}if(F.contains(E.activeElement)||r&&E.activeElement!==u.current&&E.activeElement!==c.current)return;if(E.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!f.current)return;let z=[];if((E.activeElement===u.current||E.activeElement===c.current)&&(z=o(g.current)),z.length>0){const U=!!(b.current?.shiftKey&&b.current?.key==="Tab"),D=z[0],j=z[z.length-1];typeof D!="string"&&typeof j!="string"&&(U?j.focus():D.focus())}else F.focus()};E.addEventListener("focusin",I),E.addEventListener("keydown",S,!0);const k=setInterval(()=>{E.activeElement&&E.activeElement.tagName==="BODY"&&I()},50);return()=>{clearInterval(k),E.removeEventListener("focusin",I),E.removeEventListener("keydown",S,!0)}},[n,r,i,s,a,o]);const y=E=>{d.current===null&&(d.current=E.relatedTarget),f.current=!0,h.current=E.target;const S=t.props.onFocus;S&&S(E)},C=E=>{d.current===null&&(d.current=E.relatedTarget),f.current=!0};return p.jsxs(A.Fragment,{children:[p.jsx("div",{tabIndex:a?0:-1,onFocus:C,ref:u,"data-testid":"sentinelStart"}),A.cloneElement(t,{ref:x,onFocus:y}),p.jsx("div",{tabIndex:a?0:-1,onFocus:C,ref:c,"data-testid":"sentinelEnd"})]})}const vS={entering:{opacity:1},entered:{opacity:1}},ac=A.forwardRef(function(t,n){const r=Gi(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:a,easing:l,in:u,onEnter:c,onEntered:d,onEntering:h,onExit:f,onExited:g,onExiting:x,style:b,timeout:y=i,TransitionComponent:C=jn,...E}=t,S=A.useRef(null),I=mt(S,Xi(a),n),k=N=>M=>{if(N){const H=S.current;M===void 0?N(H):N(H,M)}},F=k(h),z=k((N,M)=>{j0(N);const H=$i({style:b,timeout:y,easing:l},{mode:"enter"});N.style.webkitTransition=r.transitions.create("opacity",H),N.style.transition=r.transitions.create("opacity",H),c&&c(N,M)}),U=k(d),D=k(x),j=k(N=>{const M=$i({style:b,timeout:y,easing:l},{mode:"exit"});N.style.webkitTransition=r.transitions.create("opacity",M),N.style.transition=r.transitions.create("opacity",M),f&&f(N)}),T=k(g),L=N=>{o&&o(S.current,N)};return p.jsx(C,{appear:s,in:u,nodeRef:S,onEnter:z,onEntered:U,onEntering:F,onExit:j,onExited:T,onExiting:D,addEndListener:L,timeout:y,...E,children:(N,{ownerState:M,...H})=>A.cloneElement(a,{style:{opacity:0,visibility:N==="exited"&&!u?"hidden":void 0,...vS[N],...b,...a.props.style},ref:I,...H})})});function SS(e){return qe("MuiBackdrop",e)}Me("MuiBackdrop",["root","invisible"]);const kS=e=>{const{classes:t,invisible:n}=e;return ze({root:["root",n&&"invisible"]},SS,t)},IS=ce("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),H0=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiBackdrop"}),{children:i,className:o,component:s="div",invisible:a=!1,open:l,components:u={},componentsProps:c={},slotProps:d={},slots:h={},TransitionComponent:f,transitionDuration:g,...x}=r,b={...r,component:s,invisible:a},y=kS(b),C={transition:f,root:u.Root,...h},E={...c,...d},S={component:s,slots:C,slotProps:E},[I,k]=nt("root",{elementType:IS,externalForwardedProps:S,className:De(y.root,o),ownerState:b}),[F,z]=nt("transition",{elementType:ac,externalForwardedProps:S,ownerState:b});return p.jsx(F,{in:l,timeout:g,...x,...z,children:p.jsx(I,{"aria-hidden":!0,...k,classes:y,ref:n,children:i})})});function AS(e){return typeof e=="function"?e():e}function wS(e){return e?e.props.hasOwnProperty("in"):!1}const Ef=()=>{},Bs=new mS;function DS(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:i=!1,onTransitionEnter:o,onTransitionExited:s,children:a,onClose:l,open:u,rootRef:c}=e,d=A.useRef({}),h=A.useRef(null),f=A.useRef(null),g=mt(f,c),[x,b]=A.useState(!u),y=wS(a);let C=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(C=!1);const E=()=>Ut(h.current),S=()=>(d.current.modalRef=f.current,d.current.mount=h.current,d.current),I=()=>{Bs.mount(S(),{disableScrollLock:r}),f.current&&(f.current.scrollTop=0)},k=wt(()=>{const M=AS(t)||E().body;Bs.add(S(),M),f.current&&I()}),F=()=>Bs.isTopModal(S()),z=wt(M=>{h.current=M,M&&(u&&F()?I():f.current&&Bo(f.current,C))}),U=A.useCallback(()=>{Bs.remove(S(),C)},[C]);A.useEffect(()=>()=>{U()},[U]),A.useEffect(()=>{u?k():(!y||!i)&&U()},[u,U,y,i,k]);const D=M=>H=>{M.onKeyDown?.(H),!(H.key!=="Escape"||H.which===229||!F())&&(n||(H.stopPropagation(),l&&l(H,"escapeKeyDown")))},j=M=>H=>{M.onClick?.(H),H.target===H.currentTarget&&l&&l(H,"backdropClick")};return{getRootProps:(M={})=>{const H=Jt(e);delete H.onTransitionEnter,delete H.onTransitionExited;const X={...H,...M};return{role:"presentation",...X,onKeyDown:D(X),ref:g}},getBackdropProps:(M={})=>{const H=M;return{"aria-hidden":!0,...H,onClick:j(H),open:u}},getTransitionProps:()=>{const M=()=>{b(!1),o&&o()},H=()=>{b(!0),s&&s(),i&&U()};return{onEnter:Qd(M,a?.props.onEnter??Ef),onExited:Qd(H,a?.props.onExited??Ef)}},rootRef:g,portalRef:z,isTopModal:F,exited:x,hasTransition:y}}function _S(e){return qe("MuiModal",e)}Me("MuiModal",["root","hidden","backdrop"]);const PS=e=>{const{open:t,exited:n,classes:r}=e;return ze({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},_S,r)},RS=ce("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Xe(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),NS=ce(H0,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),U0=A.forwardRef(function(t,n){const r=Ge({name:"MuiModal",props:t}),{BackdropComponent:i=NS,BackdropProps:o,classes:s,className:a,closeAfterTransition:l=!1,children:u,container:c,component:d,components:h={},componentsProps:f={},disableAutoFocus:g=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:b=!1,disablePortal:y=!1,disableRestoreFocus:C=!1,disableScrollLock:E=!1,hideBackdrop:S=!1,keepMounted:I=!1,onClose:k,onTransitionEnter:F,onTransitionExited:z,open:U,slotProps:D={},slots:j={},theme:T,...L}=r,N={...r,closeAfterTransition:l,disableAutoFocus:g,disableEnforceFocus:x,disableEscapeKeyDown:b,disablePortal:y,disableRestoreFocus:C,disableScrollLock:E,hideBackdrop:S,keepMounted:I},{getRootProps:M,getBackdropProps:H,getTransitionProps:X,portalRef:ue,isTopModal:$,exited:_,hasTransition:te}=DS({...N,rootRef:n}),oe={...N,exited:_},P=PS(oe),Ee={};if(u.props.tabIndex===void 0&&(Ee.tabIndex="-1"),te){const{onEnter:K,onExited:W}=X();Ee.onEnter=K,Ee.onExited=W}const se={slots:{root:h.Root,backdrop:h.Backdrop,...j},slotProps:{...f,...D}},[q,re]=nt("root",{ref:n,elementType:RS,externalForwardedProps:{...se,...L,component:d},getSlotProps:M,ownerState:oe,className:De(a,P?.root,!oe.open&&oe.exited&&P?.hidden)}),[ie,Te]=nt("backdrop",{ref:o?.ref,elementType:i,externalForwardedProps:se,shouldForwardComponentProp:!0,additionalProps:o,getSlotProps:K=>H({...K,onClick:W=>{K?.onClick&&K.onClick(W)}}),className:De(o?.className,P?.backdrop),ownerState:oe});return!I&&!U&&(!te||_)?null:p.jsx(P0,{ref:ue,container:c,disablePortal:y,children:p.jsxs(q,{...re,children:[!S&&i?p.jsx(ie,{...Te}):null,p.jsx(TS,{disableEnforceFocus:x,disableAutoFocus:g,disableRestoreFocus:C,isEnabled:$,open:U,children:A.cloneElement(u,Ee)})]})})});function LS(e){return qe("MuiPopover",e)}Me("MuiPopover",["root","paper"]);function Cf(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function Tf(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function vf(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function js(e){return typeof e=="function"?e():e}const OS=e=>{const{classes:t}=e;return ze({root:["root"],paper:["paper"]},LS,t)},FS=ce(U0,{name:"MuiPopover",slot:"Root"})({}),$0=ce(Zi,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),MS=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiPopover"}),{action:i,anchorEl:o,anchorOrigin:s={vertical:"top",horizontal:"left"},anchorPosition:a,anchorReference:l="anchorEl",children:u,className:c,container:d,elevation:h=8,marginThreshold:f=16,open:g,PaperProps:x={},slots:b={},slotProps:y={},transformOrigin:C={vertical:"top",horizontal:"left"},TransitionComponent:E,transitionDuration:S="auto",TransitionProps:I={},disableScrollLock:k=!1,...F}=r,z=A.useRef(),U={...r,anchorOrigin:s,anchorReference:l,elevation:h,marginThreshold:f,transformOrigin:C,TransitionComponent:E,transitionDuration:S,TransitionProps:I},D=OS(U),j=A.useCallback(()=>{if(l==="anchorPosition")return a;const K=js(o),Ce=(K&&K.nodeType===1?K:Ut(z.current).body).getBoundingClientRect();return{top:Ce.top+Cf(Ce,s.vertical),left:Ce.left+Tf(Ce,s.horizontal)}},[o,s.horizontal,s.vertical,a,l]),T=A.useCallback(K=>({vertical:Cf(K,C.vertical),horizontal:Tf(K,C.horizontal)}),[C.horizontal,C.vertical]),L=A.useCallback(K=>{const W={width:K.offsetWidth,height:K.offsetHeight},Ce=T(W);if(l==="none")return{top:null,left:null,transformOrigin:vf(Ce)};const ve=j();let ne=ve.top-Ce.vertical,Be=ve.left-Ce.horizontal;const Le=ne+W.height,_e=Be+W.width,ye=fr(js(o)),Ze=ye.innerHeight-f,Se=ye.innerWidth-f;if(f!==null&&ne<f){const Ue=ne-f;ne-=Ue,Ce.vertical+=Ue}else if(f!==null&&Le>Ze){const Ue=Le-Ze;ne-=Ue,Ce.vertical+=Ue}if(f!==null&&Be<f){const Ue=Be-f;Be-=Ue,Ce.horizontal+=Ue}else if(_e>Se){const Ue=_e-Se;Be-=Ue,Ce.horizontal+=Ue}return{top:`${Math.round(ne)}px`,left:`${Math.round(Be)}px`,transformOrigin:vf(Ce)}},[o,l,j,T,f]),[N,M]=A.useState(g),H=A.useCallback(()=>{const K=z.current;if(!K)return;const W=L(K);W.top!==null&&K.style.setProperty("top",W.top),W.left!==null&&(K.style.left=W.left),K.style.transformOrigin=W.transformOrigin,M(!0)},[L]);A.useEffect(()=>(k&&window.addEventListener("scroll",H),()=>window.removeEventListener("scroll",H)),[o,k,H]);const X=()=>{H()},ue=()=>{M(!1)};A.useEffect(()=>{g&&H()}),A.useImperativeHandle(i,()=>g?{updatePosition:()=>{H()}}:null,[g,H]),A.useEffect(()=>{if(!g)return;const K=wm(()=>{H()}),W=fr(js(o));return W.addEventListener("resize",K),()=>{K.clear(),W.removeEventListener("resize",K)}},[o,g,H]);let $=S;const _={slots:{transition:E,...b},slotProps:{transition:I,paper:x,...y}},[te,oe]=nt("transition",{elementType:Pa,externalForwardedProps:_,ownerState:U,getSlotProps:K=>({...K,onEntering:(W,Ce)=>{K.onEntering?.(W,Ce),X()},onExited:W=>{K.onExited?.(W),ue()}}),additionalProps:{appear:!0,in:g}});S==="auto"&&!te.muiSupportAuto&&($=void 0);const P=d||(o?Ut(js(o)).body:void 0),[Ee,{slots:se,slotProps:q,...re}]=nt("root",{ref:n,elementType:FS,externalForwardedProps:{..._,...F},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:b.backdrop},slotProps:{backdrop:Dm(typeof y.backdrop=="function"?y.backdrop(U):y.backdrop,{invisible:!0})},container:P,open:g},ownerState:U,className:De(D.root,c)}),[ie,Te]=nt("paper",{ref:z,className:D.paper,elementType:$0,externalForwardedProps:_,shouldForwardComponentProp:!0,additionalProps:{elevation:h,style:N?void 0:{opacity:0}},ownerState:U});return p.jsx(Ee,{...re,...!Aa(Ee)&&{slots:se,slotProps:q,disableScrollLock:k},children:p.jsx(te,{...oe,timeout:$,children:p.jsx(ie,{...Te,children:u})})})});function BS(e){return qe("MuiMenu",e)}Me("MuiMenu",["root","paper","list"]);const jS={vertical:"top",horizontal:"right"},HS={vertical:"top",horizontal:"left"},US=e=>{const{classes:t}=e;return ze({root:["root"],paper:["paper"],list:["list"]},BS,t)},$S=ce(MS,{shouldForwardProp:e=>on(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),zS=ce($0,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),qS=ce(uS,{name:"MuiMenu",slot:"List"})({outline:0}),WS=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiMenu"}),{autoFocus:i=!0,children:o,className:s,disableAutoFocusItem:a=!1,MenuListProps:l={},onClose:u,open:c,PaperProps:d={},PopoverClasses:h,transitionDuration:f="auto",TransitionProps:{onEntering:g,...x}={},variant:b="selectedMenu",slots:y={},slotProps:C={},...E}=r,S=Rc(),I={...r,autoFocus:i,disableAutoFocusItem:a,MenuListProps:l,onEntering:g,PaperProps:d,transitionDuration:f,TransitionProps:x,variant:b},k=US(I),F=i&&!a&&c,z=A.useRef(null),U=($,_)=>{z.current&&z.current.adjustStyleForScrollbar($,{direction:S?"rtl":"ltr"}),g&&g($,_)},D=$=>{$.key==="Tab"&&($.preventDefault(),u&&u($,"tabKeyDown"))};let j=-1;A.Children.map(o,($,_)=>{A.isValidElement($)&&($.props.disabled||(b==="selectedMenu"&&$.props.selected||j===-1)&&(j=_))});const T={slots:y,slotProps:{list:l,transition:x,paper:d,...C}},L=ur({elementType:y.root,externalSlotProps:C.root,ownerState:I,className:[k.root,s]}),[N,M]=nt("paper",{className:k.paper,elementType:zS,externalForwardedProps:T,shouldForwardComponentProp:!0,ownerState:I}),[H,X]=nt("list",{className:De(k.list,l.className),elementType:qS,shouldForwardComponentProp:!0,externalForwardedProps:T,getSlotProps:$=>({...$,onKeyDown:_=>{D(_),$.onKeyDown?.(_)}}),ownerState:I}),ue=typeof T.slotProps.transition=="function"?T.slotProps.transition(I):T.slotProps.transition;return p.jsx($S,{onClose:u,anchorOrigin:{vertical:"bottom",horizontal:S?"right":"left"},transformOrigin:S?jS:HS,slots:{root:y.root,paper:N,backdrop:y.backdrop,...y.transition&&{transition:y.transition}},slotProps:{root:L,paper:M,backdrop:typeof C.backdrop=="function"?C.backdrop(I):C.backdrop,transition:{...ue,onEntering:(...$)=>{U(...$),ue?.onEntering?.(...$)}}},open:c,ref:n,transitionDuration:f,ownerState:I,...E,classes:h,children:p.jsx(H,{actions:z,autoFocus:i&&(j===-1||a),autoFocusItem:F,variant:b,...X,children:o})})});function VS(e){return qe("MuiNativeSelect",e)}const od=Me("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),GS=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${me(n)}`,o&&"iconOpen",r&&"disabled"]};return ze(a,VS,t)},z0=ce("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${od.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),YS=ce(z0,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:on,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${od.multiple}`]:t.multiple}]}})({}),q0=ce("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${od.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),KS=ce(q0,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${me(n.variant)}`],n.open&&t.iconOpen]}})({}),QS=A.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:s,inputRef:a,variant:l="standard",...u}=t,c={...t,disabled:i,variant:l,error:o},d=GS(c);return p.jsxs(A.Fragment,{children:[p.jsx(YS,{ownerState:c,className:De(d.select,r),disabled:i,ref:a||n,...u}),t.multiple?null:p.jsx(KS,{as:s,ownerState:c,className:d.icon})]})});function W0(e){return qe("MuiSelect",e)}const bo=Me("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Sf;const XS=ce(z0,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${bo.select}`]:t.select},{[`&.${bo.select}`]:t[n.variant]},{[`&.${bo.error}`]:t.error},{[`&.${bo.multiple}`]:t.multiple}]}})({[`&.${bo.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),ZS=ce(q0,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${me(n.variant)}`],n.open&&t.iconOpen]}})({}),JS=ce("input",{shouldForwardProp:e=>Am(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function kf(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function ek(e){return e==null||typeof e=="string"&&!e.trim()}const tk=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${me(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return ze(a,W0,t)},nk=A.forwardRef(function(t,n){const{"aria-describedby":r,"aria-label":i,autoFocus:o,autoWidth:s,children:a,className:l,defaultOpen:u,defaultValue:c,disabled:d,displayEmpty:h,error:f=!1,IconComponent:g,inputRef:x,labelId:b,MenuProps:y={},multiple:C,name:E,onBlur:S,onChange:I,onClose:k,onFocus:F,onOpen:z,open:U,readOnly:D,renderValue:j,required:T,SelectDisplayProps:L={},tabIndex:N,type:M,value:H,variant:X="standard",...ue}=t,[$,_]=wi({controlled:H,default:c,name:"Select"}),[te,oe]=wi({controlled:U,default:u,name:"Select"}),P=A.useRef(null),Ee=A.useRef(null),[se,q]=A.useState(null),{current:re}=A.useRef(U!=null),[ie,Te]=A.useState(),K=mt(n,x),W=A.useCallback(G=>{Ee.current=G,G&&q(G)},[]),Ce=se?.parentNode;A.useImperativeHandle(K,()=>({focus:()=>{Ee.current.focus()},node:P.current,value:$}),[$]),A.useEffect(()=>{u&&te&&se&&!re&&(Te(s?null:Ce.clientWidth),Ee.current.focus())},[se,s]),A.useEffect(()=>{o&&Ee.current.focus()},[o]),A.useEffect(()=>{if(!b)return;const G=Ut(Ee.current).getElementById(b);if(G){const ae=()=>{getSelection().isCollapsed&&Ee.current.focus()};return G.addEventListener("click",ae),()=>{G.removeEventListener("click",ae)}}},[b]);const ve=(G,ae)=>{G?z&&z(ae):k&&k(ae),re||(Te(s?null:Ce.clientWidth),oe(G))},ne=G=>{G.button===0&&(G.preventDefault(),Ee.current.focus(),ve(!0,G))},Be=G=>{ve(!1,G)},Le=A.Children.toArray(a),_e=G=>{const ae=Le.find(he=>he.props.value===G.target.value);ae!==void 0&&(_(ae.props.value),I&&I(G,ae))},ye=G=>ae=>{let he;if(ae.currentTarget.hasAttribute("tabindex")){if(C){he=Array.isArray($)?$.slice():[];const we=$.indexOf(G.props.value);we===-1?he.push(G.props.value):he.splice(we,1)}else he=G.props.value;if(G.props.onClick&&G.props.onClick(ae),$!==he&&(_(he),I)){const we=ae.nativeEvent||ae,Tt=new we.constructor(we.type,we);Object.defineProperty(Tt,"target",{writable:!0,value:{value:he,name:E}}),I(Tt,G)}C||ve(!1,ae)}},Ze=G=>{D||[" ","ArrowUp","ArrowDown","Enter"].includes(G.key)&&(G.preventDefault(),ve(!0,G))},Se=se!==null&&te,Ue=G=>{!Se&&S&&(Object.defineProperty(G,"target",{writable:!0,value:{value:$,name:E}}),S(G))};delete ue["aria-invalid"];let xe,yt;const et=[];let je=!1;(_a({value:$})||h)&&(j?xe=j($):je=!0);const Y=Le.map(G=>{if(!A.isValidElement(G))return null;let ae;if(C){if(!Array.isArray($))throw new Error(dr(2));ae=$.some(he=>kf(he,G.props.value)),ae&&je&&et.push(G.props.children)}else ae=kf($,G.props.value),ae&&je&&(yt=G.props.children);return A.cloneElement(G,{"aria-selected":ae?"true":"false",onClick:ye(G),onKeyUp:he=>{he.key===" "&&he.preventDefault(),G.props.onKeyUp&&G.props.onKeyUp(he)},role:"option",selected:ae,value:void 0,"data-value":G.props.value})});je&&(C?et.length===0?xe=null:xe=et.reduce((G,ae,he)=>(G.push(ae),he<et.length-1&&G.push(", "),G),[]):xe=yt);let fe=ie;!s&&re&&se&&(fe=Ce.clientWidth);let Ae;typeof N<"u"?Ae=N:Ae=d?null:0;const Ne=L.id||(E?`mui-component-select-${E}`:void 0),Pe={...t,variant:X,value:$,open:Se,error:f},Ie=tk(Pe),Ye={...y.PaperProps,...typeof y.slotProps?.paper=="function"?y.slotProps.paper(Pe):y.slotProps?.paper},gt={...y.MenuListProps,...typeof y.slotProps?.list=="function"?y.slotProps.list(Pe):y.slotProps?.list},lt=Vi();return p.jsxs(A.Fragment,{children:[p.jsx(XS,{as:"div",ref:W,tabIndex:Ae,role:"combobox","aria-controls":Se?lt:void 0,"aria-disabled":d?"true":void 0,"aria-expanded":Se?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[b,Ne].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":T?"true":void 0,"aria-invalid":f?"true":void 0,onKeyDown:Ze,onMouseDown:d||D?null:ne,onBlur:Ue,onFocus:F,...L,ownerState:Pe,className:De(L.className,Ie.select,l),id:Ne,children:ek(xe)?Sf||(Sf=p.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):xe}),p.jsx(JS,{"aria-invalid":f,value:Array.isArray($)?$.join(","):$,name:E,ref:P,"aria-hidden":!0,onChange:_e,tabIndex:-1,disabled:d,className:Ie.nativeInput,autoFocus:o,required:T,...ue,ownerState:Pe}),p.jsx(ZS,{as:g,className:Ie.icon,ownerState:Pe}),p.jsx(WS,{id:`menu-${E||""}`,anchorEl:Ce,open:Se,onClose:Be,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...y,slotProps:{...y.slotProps,list:{"aria-labelledby":b,role:"listbox","aria-multiselectable":C?"true":void 0,disableListWrap:!0,id:lt,...gt},paper:{...Ye,style:{minWidth:fe,...Ye!=null?Ye.style:null}}},children:Y})]})}),rk=e=>{const{classes:t}=e,r=ze({root:["root"]},W0,t);return{...t,...r}},sd={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>on(e)&&e!=="variant"},ik=ce(nd,sd)(""),ok=ce(id,sd)(""),sk=ce(rd,sd)(""),V0=A.forwardRef(function(t,n){const r=Ge({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:s={},className:a,defaultOpen:l=!1,displayEmpty:u=!1,IconComponent:c=F0,id:d,input:h,inputProps:f,label:g,labelId:x,MenuProps:b,multiple:y=!1,native:C=!1,onClose:E,onOpen:S,open:I,renderValue:k,SelectDisplayProps:F,variant:z="outlined",...U}=r,D=C?QS:nk,j=li(),T=Ji({props:r,muiFormControl:j,states:["variant","error"]}),L=T.variant||z,N={...r,variant:L,classes:s},M=rk(N),{root:H,...X}=M,ue=h||{standard:p.jsx(ik,{ownerState:N}),outlined:p.jsx(ok,{label:g,ownerState:N}),filled:p.jsx(sk,{ownerState:N})}[L],$=mt(n,Xi(ue));return p.jsx(A.Fragment,{children:A.cloneElement(ue,{inputComponent:D,inputProps:{children:o,error:T.error,IconComponent:c,variant:L,type:void 0,multiple:y,...C?{id:d}:{autoWidth:i,defaultOpen:l,displayEmpty:u,labelId:x,MenuProps:b,onClose:E,onOpen:S,open:I,renderValue:k,SelectDisplayProps:{id:d,...F}},...f,classes:f?Gt(X,f.classes):X,...h?h.props.inputProps:{}},...(y&&C||u)&&L==="outlined"?{notched:!0}:{},ref:$,className:De(ue.props.className,a,M.root),...!h&&{variant:L},...U})})});V0.muiName="Select";function ak(e){return qe("MuiTextField",e)}Me("MuiTextField",["root"]);const lk={standard:nd,filled:rd,outlined:id},uk=e=>{const{classes:t}=e;return ze({root:["root"]},ak,t)},ck=ce(eS,{name:"MuiTextField",slot:"Root"})({}),Yt=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:a,color:l="primary",defaultValue:u,disabled:c=!1,error:d=!1,FormHelperTextProps:h,fullWidth:f=!1,helperText:g,id:x,InputLabelProps:b,inputProps:y,InputProps:C,inputRef:E,label:S,maxRows:I,minRows:k,multiline:F=!1,name:z,onBlur:U,onChange:D,onFocus:j,placeholder:T,required:L=!1,rows:N,select:M=!1,SelectProps:H,slots:X={},slotProps:ue={},type:$,value:_,variant:te="outlined",...oe}=r,P={...r,autoFocus:o,color:l,disabled:c,error:d,fullWidth:f,multiline:F,required:L,select:M,variant:te},Ee=uk(P),se=Vi(x),q=g&&se?`${se}-helper-text`:void 0,re=S&&se?`${se}-label`:void 0,ie=lk[te],Te={slots:X,slotProps:{input:C,inputLabel:b,htmlInput:y,formHelperText:h,select:H,...ue}},K={},W=Te.slotProps.inputLabel;te==="outlined"&&(W&&typeof W.shrink<"u"&&(K.notched=W.shrink),K.label=S),M&&((!H||!H.native)&&(K.id=void 0),K["aria-describedby"]=void 0);const[Ce,ve]=nt("root",{elementType:ck,shouldForwardComponentProp:!0,externalForwardedProps:{...Te,...oe},ownerState:P,className:De(Ee.root,a),ref:n,additionalProps:{disabled:c,error:d,fullWidth:f,required:L,color:l,variant:te}}),[ne,Be]=nt("input",{elementType:ie,externalForwardedProps:Te,additionalProps:K,ownerState:P}),[Le,_e]=nt("inputLabel",{elementType:Q6,externalForwardedProps:Te,ownerState:P}),[ye,Ze]=nt("htmlInput",{elementType:"input",externalForwardedProps:Te,ownerState:P}),[Se,Ue]=nt("formHelperText",{elementType:iS,externalForwardedProps:Te,ownerState:P}),[xe,yt]=nt("select",{elementType:V0,externalForwardedProps:Te,ownerState:P}),et=p.jsx(ne,{"aria-describedby":q,autoComplete:i,autoFocus:o,defaultValue:u,fullWidth:f,multiline:F,name:z,rows:N,maxRows:I,minRows:k,type:$,value:_,id:se,inputRef:E,onBlur:U,onChange:D,onFocus:j,placeholder:T,inputProps:Ze,slots:{input:X.htmlInput?ye:void 0},...Be});return p.jsxs(Ce,{...ve,children:[S!=null&&S!==""&&p.jsx(Le,{htmlFor:se,id:re,..._e,children:S}),M?p.jsx(xe,{"aria-describedby":q,id:se,labelId:re,value:_,input:et,...yt,children:s}):et,g&&p.jsx(Se,{id:q,...Ue,children:g})]})});function ad({sourceAndPaths:e,selectedSourceIndex:t,existingQuery:n,onQueryChange:r,onSourceChange:i,resourceUri:o}){return B.useEffect(()=>{i&&i(t)},[t,i]),p.jsx(zc,{children:p.jsxs(ht.Stack,{spacing:2,component:"section",children:[p.jsx(G0,{sourceAndPath:e[t],existingQuery:n,onChange:s=>{r&&r(s)},resourceUri:o}),p.jsx(ht.Box,{height:"5px"})]})})}function Js(){return{query:void 0,malloyQuery:void 0,malloyResult:void 0}}function dk({sourceAndPath:e,onChange:t,existingQuery:n,explorerComponents:r,QueryBuilder:i,resourceUri:o}){const[s,a]=B.useState(n||Js()),[l,u]=B.useState(void 0);B.useEffect(()=>{n&&a(n)},[n]);const[c,d]=B.useState([]),{MalloyExplorerProvider:h,QueryPanel:f,ResizableCollapsiblePanel:g,ResultPanel:x,SourcePanel:b}=r;B.useEffect(()=>{t&&t(s)},[t,s]);const{projectName:y,packageName:C,versionId:E}=ct(o),{apiClients:S}=Je.useServer(),I=Yn({mutationFn:()=>{const U=typeof s?.malloyQuery=="string"?s.malloyQuery:new i.ASTQuery({source:e.sourceInfo,query:s?.malloyQuery}).toMalloy();return u({executionState:"running",query:s?.malloyQuery,queryResolutionStartMillis:Date.now(),onCancel:I.reset,response:{result:{}}}),a({...s,query:U}),S.models.executeQueryModel(y,C,e.modelPath,{query:U,sourceName:void 0,queryName:void 0,versionId:E})},onSuccess:U=>{if(U){const D=JSON.parse(U.data.result);a({...s,malloyResult:D}),u(j=>j?{...j,executionState:"finished",response:{result:D}}:void 0)}}}),[k,F]=B.useState(e.sourceInfo.name);B.useEffect(()=>{k!==e.sourceInfo.name&&(F(e.sourceInfo.name),a(Js()),u(void 0))},[e,k]);const z=B.useCallback(U=>{a({...s,malloyQuery:U,malloyResult:void 0})},[s]);return k!==e.sourceInfo.name?p.jsx("div",{children:"Loading..."}):p.jsx(y0,{sx:{border:"1px solid #e0e0e0",borderRadius:"8px",overflow:"hidden"},children:p.jsx(h,{source:e.sourceInfo,query:s?.malloyQuery,topValues:[],onFocusedNestViewPathChange:d,focusedNestViewPath:c,onQueryChange:z,children:p.jsxs("div",{style:{display:"flex",height:"100%",overflowY:"auto"},children:[p.jsx(g,{isInitiallyExpanded:!0,initialWidth:180,minWidth:180,icon:"database",title:e.sourceInfo.name,children:p.jsx(b,{onRefresh:()=>a(Js())})}),p.jsx(g,{isInitiallyExpanded:!0,initialWidth:280,minWidth:280,icon:"filterSliders",title:"Query",children:p.jsx(f,{runQuery:()=>{console.log(`running query with: ${s?.malloyQuery}`);try{I.mutate()}catch(U){console.error("Error running query:",U)}}})}),p.jsx(x,{source:e.sourceInfo,draftQuery:s?.malloyQuery,setDraftQuery:U=>a({...s,malloyQuery:U}),submittedQuery:l,options:{showRawQuery:!0}})]})})},e.sourceInfo.name)}function G0(e){const[t,n]=B.useState(null),[r,i]=B.useState(null),[o,s]=B.useState(!0);return B.useEffect(()=>{let a=!0;return Promise.all([import("@malloydata/malloy-explorer"),import("@malloydata/malloy-query-builder")]).then(([l,u])=>{a&&(n(l),i(u),s(!1))}).catch(l=>{console.error("Failed to load Malloy components:",l),a&&s(!1)}),()=>{a=!1}},[]),o||!t||!r?p.jsx(UT,{children:p.jsx(y0,{children:p.jsx("div",{style:{alignItems:"center",justifyContent:"center",height:"200px",color:"#666"},children:"Loading explorer..."})})}):p.jsx(dk,{...e,explorerComponents:t,QueryBuilder:r,resourceUri:e.resourceUri})}function ld(e,t=!0){const{modelPath:n,projectName:r,packageName:i,versionId:o}=ct(e),{apiClients:s}=Je.useServer();return Qt({queryKey:["package",r,i,n,o],queryFn:async()=>(await s.models.getModel(r,i,n,o)).data,enabled:t})}function ud({data:e,onChange:t,existingQuery:n,initialSelectedSourceIndex:r=0,onSourceChange:i,resourceUri:o}){const[s,a]=B.useState(r);B.useEffect(()=>{a(r)},[r]);const{data:l,isError:u,isLoading:c,error:d}=ld(o,!e),{modelPath:h}=ct(o),f=e||l;if(c&&!e)return p.jsx(Kt,{text:"Fetching Model..."});if(u&&!e)return console.log("error",d),p.jsx(sn,{error:d,context:`ModelExplorer > ${h}`});if(!f)return p.jsx(Kt,{text:"Loading..."});const g=(f?.sourceInfos||[]).map((b,y)=>{try{return JSON.parse(b)?.name||`Source ${y+1}`}catch{return`Source ${y+1}`}}),x=g[s]||"";return p.jsxs(ka,{variant:"outlined",children:[p.jsx(x0,{children:p.jsx(v.Stack,{sx:{flexDirection:"row"},children:p.jsx(w6,{size:"small",id:"size-small-standard",disablePortal:!0,options:g,value:x,onChange:(b,y)=>{if(!y)return;const C=g.indexOf(y);C>=0&&(a(C),i?.(C))},renderInput:b=>p.jsx(Yt,{...b}),style:{width:350,marginTop:"3px",marginLeft:"6px",marginBottom:"8px"}})})}),p.jsx(zc,{children:p.jsxs(v.Stack,{spacing:2,component:"section",children:[Array.isArray(f.sourceInfos)&&f.sourceInfos.length>0&&p.jsx(ad,{sourceAndPaths:f.sourceInfos.map(b=>({sourceInfo:JSON.parse(b),modelPath:h})),selectedSourceIndex:s,existingQuery:n,onQueryChange:t,resourceUri:o}),p.jsx(v.Box,{height:"5px"})]})})]})}function cd({open:e,onClose:t,resourceUri:n,data:r,title:i="Data Sources",hasValidImport:o=!0,existingQuery:s,initialSelectedSourceIndex:a,onChange:l,onSourceChange:u}){return p.jsxs(v.Dialog,{open:e,onClose:t,maxWidth:!1,fullWidth:!0,sx:{"& .MuiDialog-paper":{width:"95vw",height:"95vh",maxWidth:"none"}},children:[p.jsxs(v.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[i,p.jsx(v.IconButton,{onClick:t,sx:{color:"#666666"},children:p.jsx(Lr,{})})]}),p.jsx(v.DialogContent,{children:o?p.jsx(ud,{resourceUri:n,data:r,existingQuery:s,initialSelectedSourceIndex:a,onChange:l,onSourceChange:u}):p.jsx("div",{children:"No valid import statement found in cell"})})]})}function pk({onChange:e,resourceUri:t}){const{modelPath:n}=ct(t),{data:r,isError:i,isLoading:o,error:s}=ld(t),[a,l]=B.useState(!1),[u,c]=B.useState(),[d,h]=B.useState(0),[f,g]=B.useState("");if(o)return p.jsx(Kt,{text:"Fetching Model..."});if(i)return console.log("error",s),p.jsx(sn,{error:s,context:`Model > ${n}`});const x=C=>{c(C),e&&e(C)},b=C=>{h(C)},y=()=>{const C=window.location.href;navigator.clipboard.writeText(C).then(()=>g("URL copied to clipboard!")).catch(()=>g("Failed to copy URL"))};return p.jsxs(p.Fragment,{children:[p.jsxs(v.Box,{sx:{position:"relative",maxWidth:"1200px",margin:"0 auto",paddingTop:"24px"},children:[Array.isArray(r?.sourceInfos)&&r.sourceInfos.length>0&&p.jsxs(v.Stack,{spacing:2,component:"section",children:[p.jsxs(v.Box,{sx:{padding:"0 0 16px 0",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[p.jsx(v.Typography,{variant:"h1",sx:{fontSize:"28px",fontWeight:"600",color:"#1a1a1a",marginBottom:"8px",marginTop:"0",paddingLeft:"0"},children:"Sources"}),p.jsx(v.Tooltip,{title:"Click to copy link",children:p.jsx(Lc,{sx:{fontSize:"24px",color:"#666666",cursor:"pointer"},onClick:y})})]}),p.jsx(ud,{data:r,onChange:x,onSourceChange:b,existingQuery:u,initialSelectedSourceIndex:d,resourceUri:t}),p.jsx(v.IconButton,{sx:{position:"absolute",top:"90px",right:"4px",backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"32px",height:"32px",zIndex:2},onClick:()=>l(!0),children:p.jsx(v.Tooltip,{title:"Expanded view",children:p.jsx(N2,{sx:{fontSize:"18px",color:"#666666",marginBottom:"5px"}})})})]}),r?.queries?.length>0&&p.jsxs(v.Stack,{spacing:2,component:"section",sx:{marginTop:"24px"},children:[p.jsx(v.Box,{sx:{padding:"0 0 16px 0"},children:p.jsx(v.Typography,{variant:"h2",sx:{fontSize:"24px",fontWeight:"600",color:"#1a1a1a",marginBottom:"0",marginTop:"8px",paddingLeft:"0"},children:"Named Queries"})}),r.queries.map(C=>p.jsx(zT,{queryName:C.name,annotations:C.annotations,resourceUri:t},C.name))]}),p.jsx(cd,{open:a,onClose:()=>l(!1),resourceUri:t,data:r,title:`Model: ${n.split("/").pop()}`,existingQuery:u,initialSelectedSourceIndex:d,onChange:x,onSourceChange:b})]}),p.jsx(v.Snackbar,{open:f!=="",autoHideDuration:6e3,onClose:()=>g(""),message:f})]})}const Y0=it(p.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"})),fk=it(p.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"})),hk=B.lazy(()=>Promise.resolve().then(()=>Gb));function K0(e){const{projectName:t,packageName:n}=ct(e.resourceUri);if(!t||!n)throw new Error("Project and Package name must be provided for query embedding.");return JSON.stringify({...e})}function mk({embeddedQueryResult:e}){const{query:t,sourceName:n,queryName:r,resourceUri:i}=JSON.parse(e),{modelPath:o}=ct(i);if(!o||!t&&(!r||!n)||typeof o!="string")throw new Error("Invalid embedded query result: "+e);return p.jsx(Q0,{query:t,sourceName:n,queryName:r,resourceUri:i})}function Q0({query:e,sourceName:t,queryName:n,resourceUri:r}){const{modelPath:i,projectName:o,packageName:s,versionId:a}=ct(r),{apiClients:l}=Je.useServer();if(!o||!s)throw new Error("No project or package name provided. A resource URI must be provided.");const{data:u,isSuccess:c,isError:d,error:h}=Qt({queryKey:[r,e,t,n],queryFn:()=>l.models.executeQueryModel(o,s,i,{query:e,sourceName:t,queryName:n,versionId:a})});return p.jsxs(p.Fragment,{children:[!c&&!d&&p.jsx(Kt,{text:"Fetching Query Results..."}),c&&p.jsx(B.Suspense,{fallback:p.jsx("div",{children:"Loading..."}),children:p.jsx(hk,{result:u.data.result})}),d&&p.jsx(sn,{context:`${o} > ${s} > ${i}`,error:h})]})}function gk({cell:e,hideCodeCellIcon:t,hideEmbeddingIcon:n,resourceUri:r,index:i}){const[o,s]=B.useState(!1),[a,l]=B.useState(!1),[u,c]=B.useState(!1),[d,h]=B.useState(),[f,g]=B.useState(),[x,b]=B.useState(!1),[y,C]=B.useState(""),E=/import\s*\{([^}]+)\}\s*from\s*['"`][^'"`]+['"`]/,S=/import\s*(?:\{[^}]*\}\s*from\s*)?['"`]([^'"`]+)['"`]/,I=!!e.text&&(E.test(e.text)||S.test(e.text)),k=()=>{if(!e.newSources||e.newSources.length===0)return 0;let D=[],j="";if(e.text){const T=e.text.match(E);T&&(D=T[1].split(",").map(N=>N.trim()));const L=e.text.match(S);L&&(j=L[1].trim())}for(let T=0;T<e.newSources.length;T++)try{const L=JSON.parse(e.newSources[T]);if(D.length>0&&D.includes(L.name)||j&&j===L.path)return T}catch{continue}return 0},F=e.newSources&&e.newSources.length>0?{sourceInfos:e.newSources,resource:r}:void 0,z=K0({query:e.text,resourceUri:r});B.useEffect(()=>{e.type==="code"&&Sa(e.text,"malloy").then(D=>{h(D)})},[e]),B.useEffect(()=>{Sa(z,"typescript").then(D=>{g(D)})},[z]);const U=()=>{const D=window.location.href;navigator.clipboard.writeText(D).then(()=>C("URL copied to clipboard!")).catch(()=>C("Failed to copy URL"))};return e.type==="markdown"&&p.jsx(Yu,{children:p.jsxs(v.Box,{sx:{"& h1, & h2, & h3, & h4, & h5, & h6":{fontWeight:"600",color:"#1a1a1a",marginBottom:"8px",marginTop:"16px"},"& h1":{fontSize:"28px"},"& h2":{fontSize:"24px"},"& h3":{fontSize:"20px"},"& p":{color:"#333333",lineHeight:"1.7",marginBottom:"8px",fontSize:"16px"},"& ul, & ol":{color:"#333333",lineHeight:"1.7",marginBottom:"8px",fontSize:"16px"},"& li":{marginBottom:"4px"}},children:[i===0?p.jsxs(v.Stack,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",children:[p.jsx(ua,{children:e.text}),p.jsx(v.Tooltip,{title:"Click to copy link",children:p.jsx(Lc,{sx:{fontSize:"24px",color:"#666666",cursor:"pointer",marginTop:"26px"},onClick:U})})]}):p.jsx(ua,{children:e.text}),p.jsx(v.Snackbar,{open:y!=="",autoHideDuration:6e3,onClose:()=>C(""),message:y})]})})||e.type==="code"&&p.jsxs(Yu,{children:[(!t||!n&&e.result||e.newSources&&e.newSources.length>0)&&p.jsx(v.Stack,{sx:{flexDirection:"column",gap:"8px",marginBottom:"16px"},children:e.newSources&&e.newSources.length>0&&I&&p.jsx(Ku,{sx:{position:"relative",padding:"0"},children:p.jsxs(v.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:"24px",paddingRight:"8px"},children:[d&&p.jsx("span",{dangerouslySetInnerHTML:{__html:e.text.length>50&&d?`${d.substring(0,50)}...`:d},style:{fontFamily:"monospace",fontSize:"14px",flex:1,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginRight:"8px"}}),p.jsx(v.IconButton,{sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"32px",height:"32px",flexShrink:0},onClick:()=>b(!0),children:p.jsx(Xo,{sx:{fontSize:"18px",color:"#666666"}})})]})})}),p.jsx(cd,{open:x,onClose:()=>b(!1),title:"Data Sources",hasValidImport:I,resourceUri:r,data:F,initialSelectedSourceIndex:k()}),p.jsxs(v.Dialog,{open:o,onClose:()=>s(!1),maxWidth:"lg",fullWidth:!0,children:[p.jsxs(v.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:["Malloy Code",p.jsx(v.IconButton,{onClick:()=>s(!1),sx:{color:"#666666"},children:p.jsx(Lr,{})})]}),p.jsx(v.DialogContent,{children:p.jsx(v.Box,{sx:{border:"1px solid #e0e0e0",borderRadius:"8px",padding:"16px",fontFamily:"monospace",fontSize:"14px",lineHeight:"1.5",overflow:"auto",maxHeight:"70vh",backgroundColor:"#ffffff"},children:p.jsx("pre",{className:"code-display",style:{margin:0},dangerouslySetInnerHTML:{__html:d}})})})]}),p.jsxs(v.Dialog,{open:a,onClose:()=>l(!1),maxWidth:"lg",fullWidth:!0,children:[p.jsxs(v.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:["Embeddable Code",p.jsx(v.IconButton,{onClick:()=>l(!1),sx:{color:"#666666"},children:p.jsx(Lr,{})})]}),p.jsx(v.DialogContent,{children:p.jsxs(v.Stack,{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start"},children:[p.jsx(v.Typography,{component:"div",sx:{fontSize:"12px",fontFamily:"monospace","& .line":{textWrap:"wrap"},flex:1},dangerouslySetInnerHTML:{__html:f}}),p.jsx(v.Tooltip,{title:"Copy Embeddable Code",children:p.jsx(v.IconButton,{sx:{width:"24px",height:"24px",marginLeft:"8px",color:"#666666"},onClick:()=>{navigator.clipboard.writeText(z)},children:p.jsx(fk,{})})})]})})]}),p.jsx(b0,{open:u,onClose:()=>c(!1),result:e.result||"",title:"Results"}),e.result&&p.jsxs(Ku,{sx:{position:"relative"},children:[p.jsx(v.Box,{sx:{paddingTop:"24px"},children:p.jsx(ys,{result:e.result,minHeight:300,maxHeight:1e3})}),p.jsx(v.Box,{sx:{position:"absolute",bottom:0,left:0,right:0,height:"40px",background:"linear-gradient(transparent, rgba(255, 255, 255, 0.9))",pointerEvents:"none",zIndex:1}}),p.jsxs(v.Stack,{sx:{position:"absolute",top:"8px",right:"8px",flexDirection:"row",gap:"8px",alignItems:"center",zIndex:2},children:[!t&&p.jsx(v.IconButton,{sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"32px",height:"32px"},onClick:D=>{D.stopPropagation(),s(!0)},children:p.jsx(Y0,{sx:{fontSize:"18px",color:"#666666"}})}),p.jsx(v.IconButton,{sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"32px",height:"32px"},onClick:()=>c(!0),children:p.jsx(Xo,{sx:{fontSize:"18px",color:"#666666"}})})]})]})]})}function X0({resourceUri:e}){const{apiClients:t}=Je.useServer(),{projectName:n,packageName:r,versionId:i,modelPath:o}=ct(e),{data:s,isSuccess:a,isError:l,error:u}=Qt({queryKey:[e],queryFn:async()=>(await t.notebooks.getNotebook(n,r,o,i)).data});return p.jsx(jT,{children:p.jsx(HT,{children:p.jsxs(v.Stack,{spacing:3,component:"section",children:[!a&&!l&&p.jsx(Kt,{text:"Fetching Notebook..."}),a&&s.notebookCells?.map((c,d)=>p.jsx(gk,{cell:c,index:d,resourceUri:e},d)),l&&u.status===404&&p.jsxs(v.Typography,{variant:"body2",sx:{color:"#666666"},children:[p.jsx("code",{children:`${n} > ${r} > ${o}`})," ","not found."]}),l&&u.status!==404&&p.jsx(sn,{error:u,context:`${n} > ${r} > ${o}`})]})})})}const bk=it(p.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),yi=ht.createStack({createStyledComponent:ce("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Ge({props:e,name:"MuiStack"})});class Pi{constructor(t,n){this.workbookData=n,this.workbookStorage=t,this.workbookData?this.isSaved=!0:(this.workbookData={models:[],cells:[],workbookPath:void 0},this.isSaved=!1)}isSaved;workbookStorage;getWorkbookData(){return this.workbookData}getWorkbookPath(){return this.workbookData.workbookPath}async renameWorkbook(t){if(this.workbookData.workbookPath.path!==t)try{await this.workbookStorage.moveWorkbook(this.workbookData.workbookPath,{path:t,workspace:this.workbookData.workbookPath.workspace})}catch{}return this.workbookData.workbookPath.path=t,this.isSaved=!1,await this.saveWorkbook()}getCells(){return this.workbookData.cells}deleteCell(t){return this.workbookData.cells=[...this.workbookData.cells.slice(0,t),...this.workbookData.cells.slice(t+1)],this.isSaved=!1,this}insertCell(t,n){return this.workbookData.cells=[...this.workbookData.cells.slice(0,t),n,...this.workbookData.cells.slice(t)],this.isSaved=!1,this}setCell(t,n){return this.workbookData.cells[t]=n,this.isSaved=!1,this}setModels(t){return this.workbookData.models=t,this.isSaved=!1,this}getModels(){return this.workbookData.models}updateWorkbookData(t){return this.workbookData=t,this.isSaved=!1,this}async saveWorkbook(){if(!this.isSaved){if(!this.workbookData.workbookPath)throw new Error("Workbook path is not set");await this.workbookStorage.saveWorkbook(this.workbookData.workbookPath,JSON.stringify(this.workbookData)),this.isSaved=!0}return new Pi(this.workbookStorage,this.workbookData)}toMalloyWorkbook(){return this.workbookData.cells.map(t=>t.isMarkdown?`>>>markdown
|
|
130
|
+
`),F=S.selectionStart===I;k&&F&&S.setSelectionRange(I,I),r&&r(E)};return p.jsxs(A.Fragment,{children:[p.jsx("textarea",{value:a,onChange:C,ref:d,rows:o,style:s,...l}),p.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:f,tabIndex:-1,style:{...o6.shadow,...s,paddingTop:0,paddingBottom:0}})]})});function Ji({props:e,states:t,muiFormControl:n}){return t.reduce((r,i)=>(r[i]=e[i],n&&typeof e[i]>"u"&&(r[i]=n[i]),r),{})}const ed=A.createContext(void 0);function li(){return A.useContext(ed)}function uf(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function _a(e,t=!1){return e&&(uf(e.value)&&e.value!==""||t&&uf(e.defaultValue)&&e.defaultValue!=="")}function l6(e){return e.startAdornment}function u6(e){return qe("MuiInputBase",e)}const bn=Me("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var cf;const cl=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${me(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},dl=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},c6=e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:s,formControl:a,fullWidth:l,hiddenLabel:u,multiline:c,readOnly:d,size:h,startAdornment:f,type:g}=e,x={root:["root",`color${me(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",s&&"focused",a&&"formControl",h&&h!=="medium"&&`size${me(h)}`,c&&"multiline",f&&"adornedStart",o&&"adornedEnd",u&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled",g==="search"&&"inputTypeSearch",c&&"inputMultiline",h==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",f&&"inputAdornedStart",o&&"inputAdornedEnd",d&&"readOnly"]};return ze(x,u6,t)},pl=ce("div",{name:"MuiInputBase",slot:"Root",overridesResolver:cl})(Xe(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${bn.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),fl=ce("input",{name:"MuiInputBase",slot:"Input",overridesResolver:dl})(Xe(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${bn.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${bn.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:o})=>!o.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:o})=>o.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),df=A2({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),td=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:o,autoFocus:s,className:a,color:l,components:u={},componentsProps:c={},defaultValue:d,disabled:h,disableInjectingGlobalStyles:f,endAdornment:g,error:x,fullWidth:b=!1,id:y,inputComponent:C="input",inputProps:E={},inputRef:S,margin:I,maxRows:k,minRows:F,multiline:z=!1,name:U,onBlur:D,onChange:j,onClick:T,onFocus:L,onKeyDown:N,onKeyUp:M,placeholder:H,readOnly:X,renderSuffix:ue,rows:$,size:_,slotProps:te={},slots:oe={},startAdornment:P,type:Ee="text",value:se,...q}=r,re=E.value!=null?E.value:se,{current:ie}=A.useRef(re!=null),Te=A.useRef(),K=A.useCallback(Ie=>{},[]),W=mt(Te,S,E.ref,K),[Ce,ve]=A.useState(!1),ne=li(),Be=Ji({props:r,muiFormControl:ne,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Be.focused=ne?ne.focused:Ce,A.useEffect(()=>{!ne&&h&&Ce&&(ve(!1),D&&D())},[ne,h,Ce,D]);const Le=ne&&ne.onFilled,_e=ne&&ne.onEmpty,ye=A.useCallback(Ie=>{_a(Ie)?Le&&Le():_e&&_e()},[Le,_e]);Qn(()=>{ie&&ye({value:re})},[re,ye,ie]);const Ze=Ie=>{L&&L(Ie),E.onFocus&&E.onFocus(Ie),ne&&ne.onFocus?ne.onFocus(Ie):ve(!0)},Se=Ie=>{D&&D(Ie),E.onBlur&&E.onBlur(Ie),ne&&ne.onBlur?ne.onBlur(Ie):ve(!1)},Ue=(Ie,...Ye)=>{if(!ie){const gt=Ie.target||Te.current;if(gt==null)throw new Error(dr(1));ye({value:gt.value})}E.onChange&&E.onChange(Ie,...Ye),j&&j(Ie,...Ye)};A.useEffect(()=>{ye(Te.current)},[]);const xe=Ie=>{Te.current&&Ie.currentTarget===Ie.target&&Te.current.focus(),T&&T(Ie)};let yt=C,et=E;z&&yt==="input"&&($?et={type:void 0,minRows:$,maxRows:$,...et}:et={type:void 0,maxRows:k,minRows:F,...et},yt=a6);const je=Ie=>{ye(Ie.animationName==="mui-auto-fill-cancel"?Te.current:{value:"x"})};A.useEffect(()=>{ne&&ne.setAdornedStart(!!P)},[ne,P]);const Y={...r,color:Be.color||"primary",disabled:Be.disabled,endAdornment:g,error:Be.error,focused:Be.focused,formControl:ne,fullWidth:b,hiddenLabel:Be.hiddenLabel,multiline:z,size:Be.size,startAdornment:P,type:Ee},fe=c6(Y),Ae=oe.root||u.Root||pl,Ne=te.root||c.root||{},Pe=oe.input||u.Input||fl;return et={...et,...te.input??c.input},p.jsxs(A.Fragment,{children:[!f&&typeof df=="function"&&(cf||(cf=p.jsx(df,{}))),p.jsxs(Ae,{...Ne,ref:n,onClick:xe,...q,...!Aa(Ae)&&{ownerState:{...Y,...Ne.ownerState}},className:De(fe.root,Ne.className,a,X&&"MuiInputBase-readOnly"),children:[P,p.jsx(ed.Provider,{value:null,children:p.jsx(Pe,{"aria-invalid":Be.error,"aria-describedby":i,autoComplete:o,autoFocus:s,defaultValue:d,disabled:Be.disabled,id:y,onAnimationStart:je,name:U,placeholder:H,readOnly:X,required:Be.required,rows:$,value:re,onKeyDown:N,onKeyUp:M,type:Ee,...et,...!Aa(Pe)&&{as:yt,ownerState:{...Y,...et.ownerState}},ref:W,className:De(fe.input,et.className,X&&"MuiInputBase-readOnly"),onBlur:Se,onChange:Ue,onFocus:Ze})}),g,ue?ue({...Be,startAdornment:P}):null]})]})});function d6(e){return qe("MuiInput",e)}const Dr={...bn,...Me("MuiInput",["root","underline","input"])};function p6(e){return qe("MuiOutlinedInput",e)}const kn={...bn,...Me("MuiOutlinedInput",["root","notchedOutline","input"])};function f6(e){return qe("MuiFilledInput",e)}const xn={...bn,...Me("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},h6=it(p.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),F0=it(p.jsx("path",{d:"M7 10l5 5 5-5z"}));function m6(e){return qe("MuiAutocomplete",e)}const We=Me("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var pf,ff;const g6=e=>{const{classes:t,disablePortal:n,expanded:r,focused:i,fullWidth:o,hasClearIcon:s,hasPopupIcon:a,inputFocused:l,popupOpen:u,size:c}=e,d={root:["root",r&&"expanded",i&&"focused",o&&"fullWidth",s&&"hasClearIcon",a&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${me(c)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",u&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return ze(d,m6,t)},b6=ce("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:i,hasPopupIcon:o,inputFocused:s,size:a}=n;return[{[`& .${We.tag}`]:t.tag},{[`& .${We.tag}`]:t[`tagSize${me(a)}`]},{[`& .${We.inputRoot}`]:t.inputRoot},{[`& .${We.input}`]:t.input},{[`& .${We.input}`]:s&&t.inputFocused},t.root,r&&t.fullWidth,o&&t.hasPopupIcon,i&&t.hasClearIcon]}})({[`&.${We.focused} .${We.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${We.clearIndicator}`]:{visibility:"visible"}},[`& .${We.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${We.inputRoot}`]:{[`.${We.hasPopupIcon}&, .${We.hasClearIcon}&`]:{paddingRight:30},[`.${We.hasPopupIcon}.${We.hasClearIcon}&`]:{paddingRight:56},[`& .${We.input}`]:{width:0,minWidth:30}},[`& .${Dr.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${Dr.root}.${bn.sizeSmall}`]:{[`& .${Dr.input}`]:{padding:"2px 4px 3px 0"}},[`& .${kn.root}`]:{padding:9,[`.${We.hasPopupIcon}&, .${We.hasClearIcon}&`]:{paddingRight:39},[`.${We.hasPopupIcon}.${We.hasClearIcon}&`]:{paddingRight:65},[`& .${We.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${We.endAdornment}`]:{right:9}},[`& .${kn.root}.${bn.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${We.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${xn.root}`]:{paddingTop:19,paddingLeft:8,[`.${We.hasPopupIcon}&, .${We.hasClearIcon}&`]:{paddingRight:39},[`.${We.hasPopupIcon}.${We.hasClearIcon}&`]:{paddingRight:65},[`& .${xn.input}`]:{padding:"7px 4px"},[`& .${We.endAdornment}`]:{right:9}},[`& .${xn.root}.${bn.sizeSmall}`]:{paddingBottom:1,[`& .${xn.input}`]:{padding:"2.5px 4px"}},[`& .${bn.hiddenLabel}`]:{paddingTop:8},[`& .${xn.root}.${bn.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${We.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${xn.root}.${bn.hiddenLabel}.${bn.sizeSmall}`]:{[`& .${We.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${We.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${We.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${We.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${We.inputRoot}`]:{flexWrap:"wrap"}}}]}),x6=ce("div",{name:"MuiAutocomplete",slot:"EndAdornment"})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),y6=ce(Ui,{name:"MuiAutocomplete",slot:"ClearIndicator"})({marginRight:-2,padding:4,visibility:"hidden"}),E6=ce(Ui,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),C6=ce(R0,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${We.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(Xe(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),T6=ce(Zi,{name:"MuiAutocomplete",slot:"Paper"})(Xe(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),v6=ce("div",{name:"MuiAutocomplete",slot:"Loading"})(Xe(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),S6=ce("div",{name:"MuiAutocomplete",slot:"NoOptions"})(Xe(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),k6=ce("ul",{name:"MuiAutocomplete",slot:"Listbox"})(Xe(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${We.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${We.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${We.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${We.focused}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${We.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}}}))),I6=ce(Ju,{name:"MuiAutocomplete",slot:"GroupLabel"})(Xe(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),A6=ce("ul",{name:"MuiAutocomplete",slot:"GroupUl"})({padding:0,[`& .${We.option}`]:{paddingLeft:24}}),w6=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiAutocomplete"}),{autoComplete:i=!1,autoHighlight:o=!1,autoSelect:s=!1,blurOnSelect:a=!1,ChipProps:l,className:u,clearIcon:c=pf||(pf=p.jsx(h6,{fontSize:"small"})),clearOnBlur:d=!r.freeSolo,clearOnEscape:h=!1,clearText:f="Clear",closeText:g="Close",componentsProps:x,defaultValue:b=r.multiple?[]:null,disableClearable:y=!1,disableCloseOnSelect:C=!1,disabled:E=!1,disabledItemsFocusable:S=!1,disableListWrap:I=!1,disablePortal:k=!1,filterOptions:F,filterSelectedOptions:z=!1,forcePopupIcon:U="auto",freeSolo:D=!1,fullWidth:j=!1,getLimitTagsText:T=rt=>`+${rt}`,getOptionDisabled:L,getOptionKey:N,getOptionLabel:M,isOptionEqualToValue:H,groupBy:X,handleHomeEndKeys:ue=!r.freeSolo,id:$,includeInputInList:_=!1,inputValue:te,limitTags:oe=-1,ListboxComponent:P,ListboxProps:Ee,loading:se=!1,loadingText:q="Loading…",multiple:re=!1,noOptionsText:ie="No options",onChange:Te,onClose:K,onHighlightChange:W,onInputChange:Ce,onOpen:ve,open:ne,openOnFocus:Be=!1,openText:Le="Open",options:_e,PaperComponent:ye,PopperComponent:Ze,popupIcon:Se=ff||(ff=p.jsx(F0,{})),readOnly:Ue=!1,renderGroup:xe,renderInput:yt,renderOption:et,renderTags:je,renderValue:Y,selectOnFocus:fe=!r.freeSolo,size:Ae="medium",slots:Ne={},slotProps:Pe={},value:Ie,...Ye}=r,{getRootProps:gt,getInputProps:lt,getInputLabelProps:G,getPopupIndicatorProps:ae,getClearProps:he,getItemProps:we,getListboxProps:Tt,getOptionProps:an,value:Ht,dirty:Lt,expanded:_t,id:Tn,popupOpen:ft,focused:zt,focusedItem:tr,anchorEl:vn,setAnchorEl:jr,inputValue:Fn,groupedOptions:nr}=KT({...r,componentName:"Autocomplete"}),pi=!y&&!E&&Lt&&!Ue,lo=(!D||U===!0)&&U!==!1,{onMouseDown:Al}=lt(),{ref:wl,...Dl}=Tt(),uo=M||(rt=>rt.label??rt),Pt={...r,disablePortal:k,expanded:_t,focused:zt,fullWidth:j,getOptionLabel:uo,hasClearIcon:pi,hasPopupIcon:lo,inputFocused:tr===-1,popupOpen:ft,size:Ae},Ot=g6(Pt),Tr={slots:{paper:ye,popper:Ze,...Ne},slotProps:{chip:l,listbox:Ee,...x,...Pe}},[Pl,co]=nt("listbox",{elementType:k6,externalForwardedProps:Tr,ownerState:Pt,className:Ot.listbox,additionalProps:Dl,ref:wl}),[Ds,ee]=nt("paper",{elementType:Zi,externalForwardedProps:Tr,ownerState:Pt,className:Ot.paper}),[J,ke]=nt("popper",{elementType:R0,externalForwardedProps:Tr,ownerState:Pt,className:Ot.popper,additionalProps:{disablePortal:k,style:{width:vn?vn.clientWidth:null},role:"presentation",anchorEl:vn,open:ft}});let Oe;const Fe=rt=>({className:Ot.tag,disabled:E,...we(rt)});if(re?Ht.length>0&&(je?Oe=je(Ht,Fe,Pt):Y?Oe=Y(Ht,Fe,Pt):Oe=Ht.map((rt,vr)=>{const{key:Sr,...po}=Fe({index:vr});return p.jsx(i6,{label:uo(rt),size:Ae,...po,...Tr.slotProps.chip},Sr)})):Y&&Ht!=null&&(Oe=Y(Ht,Fe,Pt)),oe>-1&&Array.isArray(Oe)){const rt=Oe.length-oe;!zt&&rt>0&&(Oe=Oe.splice(0,oe),Oe.push(p.jsx("span",{className:Ot.tag,children:T(rt)},Oe.length)))}const vt=xe||(rt=>p.jsxs("li",{children:[p.jsx(I6,{className:Ot.groupLabel,ownerState:Pt,component:"div",children:rt.group}),p.jsx(A6,{className:Ot.groupUl,ownerState:Pt,children:rt.children})]},rt.key)),_s=et||((rt,vr)=>{const{key:Sr,...po}=rt;return p.jsx("li",{...po,children:uo(vr)},Sr)}),Wd=(rt,vr)=>{const Sr=an({option:rt,index:vr});return _s({...Sr,className:Ot.option},rt,{selected:Sr["aria-selected"],index:vr,inputValue:Fn},Pt)},Vd=Tr.slotProps.clearIndicator,Gd=Tr.slotProps.popupIndicator;return p.jsxs(A.Fragment,{children:[p.jsx(b6,{ref:n,className:De(Ot.root,u),ownerState:Pt,...gt(Ye),children:yt({id:Tn,disabled:E,fullWidth:!0,size:Ae==="small"?"small":void 0,InputLabelProps:G(),InputProps:{ref:jr,className:Ot.inputRoot,startAdornment:Oe,onMouseDown:rt=>{rt.target===rt.currentTarget&&Al(rt)},...(pi||lo)&&{endAdornment:p.jsxs(x6,{className:Ot.endAdornment,ownerState:Pt,children:[pi?p.jsx(y6,{...he(),"aria-label":f,title:f,ownerState:Pt,...Vd,className:De(Ot.clearIndicator,Vd?.className),children:c}):null,lo?p.jsx(E6,{...ae(),disabled:E,"aria-label":ft?g:Le,title:ft?g:Le,ownerState:Pt,...Gd,className:De(Ot.popupIndicator,Gd?.className),children:Se}):null]})}},inputProps:{className:Ot.input,disabled:E,readOnly:Ue,...lt()}})}),vn?p.jsx(C6,{as:J,...ke,children:p.jsxs(T6,{as:Ds,...ee,children:[se&&nr.length===0?p.jsx(v6,{className:Ot.loading,ownerState:Pt,children:q}):null,nr.length===0&&!D&&!se?p.jsx(S6,{className:Ot.noOptions,ownerState:Pt,role:"presentation",onMouseDown:rt=>{rt.preventDefault()},children:ie}):null,nr.length>0?p.jsx(Pl,{as:P,...co,children:nr.map((rt,vr)=>X?vt({key:rt.key,group:rt.group,children:rt.options.map((Sr,po)=>Wd(Sr,rt.index+po))}):Wd(rt,vr))}):null]})}):null]})}),D6=e=>{const{classes:t,disableUnderline:n}=e,i=ze({root:["root",!n&&"underline"],input:["input"]},d6,t);return{...t,...i}},_6=ce(pl,{shouldForwardProp:e=>on(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...cl(e,t),!n.disableUnderline&&t.underline]}})(Xe(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Dr.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Dr.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Dr.disabled}, .${Dr.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Dr.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(nn()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),P6=ce(fl,{name:"MuiInput",slot:"Input",overridesResolver:dl})({}),nd=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiInput"}),{disableUnderline:i=!1,components:o={},componentsProps:s,fullWidth:a=!1,inputComponent:l="input",multiline:u=!1,slotProps:c,slots:d={},type:h="text",...f}=r,g=D6(r),b={root:{ownerState:{disableUnderline:i}}},y=c??s?Gt(c??s,b):b,C=d.root??o.Root??_6,E=d.input??o.Input??P6;return p.jsx(td,{slots:{root:C,input:E},slotProps:y,fullWidth:a,inputComponent:l,multiline:u,ref:n,type:h,...f,classes:g})});nd.muiName="Input";const R6=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:o,hiddenLabel:s,multiline:a}=e,l={root:["root",!n&&"underline",r&&"adornedStart",i&&"adornedEnd",o==="small"&&`size${me(o)}`,s&&"hiddenLabel",a&&"multiline"],input:["input"]},u=ze(l,f6,t);return{...t,...u}},N6=ce(pl,{shouldForwardProp:e=>on(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...cl(e,t),!n.disableUnderline&&t.underline]}})(Xe(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",i=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",o=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${xn.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${xn.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:o},variants:[{props:({ownerState:s})=>!s.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${xn.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${xn.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${xn.disabled}, .${xn.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${xn.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(nn()).map(([s])=>({props:{disableUnderline:!1,color:s},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[s]?.main}`}}})),{props:({ownerState:s})=>s.startAdornment,style:{paddingLeft:12}},{props:({ownerState:s})=>s.endAdornment,style:{paddingRight:12}},{props:({ownerState:s})=>s.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:s,size:a})=>s.multiline&&a==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel&&s.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),L6=ce(fl,{name:"MuiFilledInput",slot:"Input",overridesResolver:dl})(Xe(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),rd=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiFilledInput"}),{disableUnderline:i=!1,components:o={},componentsProps:s,fullWidth:a=!1,hiddenLabel:l,inputComponent:u="input",multiline:c=!1,slotProps:d,slots:h={},type:f="text",...g}=r,x={...r,disableUnderline:i,fullWidth:a,inputComponent:u,multiline:c,type:f},b=R6(r),y={root:{ownerState:x},input:{ownerState:x}},C=d??s?Gt(y,d??s):y,E=h.root??o.Root??N6,S=h.input??o.Input??L6;return p.jsx(td,{slots:{root:E,input:S},slotProps:C,fullWidth:a,inputComponent:u,multiline:c,ref:n,type:f,...g,classes:b})});rd.muiName="Input";var hf;const O6=ce("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:on})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),F6=ce("legend",{name:"MuiNotchedOutlined",shouldForwardProp:on})(Xe(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function M6(e){const{children:t,classes:n,className:r,label:i,notched:o,...s}=e,a=i!=null&&i!=="",l={...e,notched:o,withLabel:a};return p.jsx(O6,{"aria-hidden":!0,className:r,ownerState:l,...s,children:p.jsx(F6,{ownerState:l,children:a?p.jsx("span",{children:i}):hf||(hf=p.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})}const B6=e=>{const{classes:t}=e,r=ze({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},p6,t);return{...t,...r}},j6=ce(pl,{shouldForwardProp:e=>on(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:cl})(Xe(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${kn.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${kn.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${kn.focused} .${kn.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(nn()).map(([n])=>({props:{color:n},style:{[`&.${kn.focused} .${kn.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${kn.error} .${kn.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${kn.disabled} .${kn.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),H6=ce(M6,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(Xe(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),U6=ce(fl,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:dl})(Xe(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),id=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiOutlinedInput"}),{components:i={},fullWidth:o=!1,inputComponent:s="input",label:a,multiline:l=!1,notched:u,slots:c={},slotProps:d={},type:h="text",...f}=r,g=B6(r),x=li(),b=Ji({props:r,muiFormControl:x,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),y={...r,color:b.color||"primary",disabled:b.disabled,error:b.error,focused:b.focused,formControl:x,fullWidth:o,hiddenLabel:b.hiddenLabel,multiline:l,size:b.size,type:h},C=c.root??i.Root??j6,E=c.input??i.Input??U6,[S,I]=nt("notchedOutline",{elementType:H6,className:g.notchedOutline,shouldForwardComponentProp:!0,ownerState:y,externalForwardedProps:{slots:c,slotProps:d},additionalProps:{label:a!=null&&a!==""&&b.required?p.jsxs(A.Fragment,{children:[a," ","*"]}):a}});return p.jsx(td,{slots:{root:C,input:E},slotProps:d,renderSuffix:k=>p.jsx(S,{...I,notched:typeof u<"u"?u:!!(k.startAdornment||k.filled||k.focused)}),fullWidth:o,inputComponent:s,multiline:l,ref:n,type:h,...f,classes:{...g,notchedOutline:null}})});id.muiName="Input";function $6(e){return qe("MuiFormLabel",e)}const Mo=Me("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),z6=e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:s,required:a}=e,l={root:["root",`color${me(n)}`,i&&"disabled",o&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",o&&"error"]};return ze(l,$6,t)},q6=ce("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color==="secondary"&&t.colorSecondary,n.filled&&t.filled]}})(Xe(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(nn()).map(([t])=>({props:{color:t},style:{[`&.${Mo.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Mo.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Mo.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),W6=ce("span",{name:"MuiFormLabel",slot:"Asterisk"})(Xe(({theme:e})=>({[`&.${Mo.error}`]:{color:(e.vars||e).palette.error.main}}))),V6=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiFormLabel"}),{children:i,className:o,color:s,component:a="label",disabled:l,error:u,filled:c,focused:d,required:h,...f}=r,g=li(),x=Ji({props:r,muiFormControl:g,states:["color","required","focused","disabled","error","filled"]}),b={...r,color:x.color||"primary",component:a,disabled:x.disabled,error:x.error,filled:x.filled,focused:x.focused,required:x.required},y=z6(b);return p.jsxs(q6,{as:a,ownerState:b,className:De(y.root,o),ref:n,...f,children:[i,x.required&&p.jsxs(W6,{ownerState:b,"aria-hidden":!0,className:y.asterisk,children:[" ","*"]})]})});function G6(e){return qe("MuiInputLabel",e)}Me("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const Y6=e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:o,variant:s,required:a}=e,l={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&r!=="medium"&&`size${me(r)}`,s],asterisk:[a&&"asterisk"]},u=ze(l,G6,t);return{...t,...u}},K6=ce(V6,{shouldForwardProp:e=>on(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Mo.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(Xe(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:r})=>t==="filled"&&n.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),Q6=A.forwardRef(function(t,n){const r=Ge({name:"MuiInputLabel",props:t}),{disableAnimation:i=!1,margin:o,shrink:s,variant:a,className:l,...u}=r,c=li();let d=s;typeof d>"u"&&c&&(d=c.filled||c.focused||c.adornedStart);const h=Ji({props:r,muiFormControl:c,states:["size","variant","required","focused"]}),f={...r,disableAnimation:i,formControl:c,shrink:d,size:h.size,variant:h.variant,required:h.required,focused:h.focused},g=Y6(f);return p.jsx(K6,{"data-shrink":d,ref:n,className:De(g.root,l),...u,ownerState:f,classes:g})});function X6(e){return qe("MuiFormControl",e)}Me("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Z6=e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root",n!=="none"&&`margin${me(n)}`,r&&"fullWidth"]};return ze(i,X6,t)},J6=ce("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${me(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),eS=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:a="div",disabled:l=!1,error:u=!1,focused:c,fullWidth:d=!1,hiddenLabel:h=!1,margin:f="none",required:g=!1,size:x="medium",variant:b="outlined",...y}=r,C={...r,color:s,component:a,disabled:l,error:u,fullWidth:d,hiddenLabel:h,margin:f,required:g,size:x,variant:b},E=Z6(C),[S,I]=A.useState(()=>{let M=!1;return i&&A.Children.forEach(i,H=>{if(!Hl(H,["Input","Select"]))return;const X=Hl(H,["Select"])?H.props.input:H;X&&l6(X.props)&&(M=!0)}),M}),[k,F]=A.useState(()=>{let M=!1;return i&&A.Children.forEach(i,H=>{Hl(H,["Input","Select"])&&(_a(H.props,!0)||_a(H.props.inputProps,!0))&&(M=!0)}),M}),[z,U]=A.useState(!1);l&&z&&U(!1);const D=c!==void 0&&!l?c:z;let j;A.useRef(!1);const T=A.useCallback(()=>{F(!0)},[]),L=A.useCallback(()=>{F(!1)},[]),N=A.useMemo(()=>({adornedStart:S,setAdornedStart:I,color:s,disabled:l,error:u,filled:k,focused:D,fullWidth:d,hiddenLabel:h,size:x,onBlur:()=>{U(!1)},onFocus:()=>{U(!0)},onEmpty:L,onFilled:T,registerEffect:j,required:g,variant:b}),[S,s,l,u,k,D,d,h,j,L,T,g,x,b]);return p.jsx(ed.Provider,{value:N,children:p.jsx(J6,{as:a,ownerState:C,className:De(E.root,o),ref:n,...y,children:i})})});function tS(e){return qe("MuiFormHelperText",e)}const mf=Me("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var gf;const nS=e=>{const{classes:t,contained:n,size:r,disabled:i,error:o,filled:s,focused:a,required:l}=e,u={root:["root",i&&"disabled",o&&"error",r&&`size${me(r)}`,n&&"contained",a&&"focused",s&&"filled",l&&"required"]};return ze(u,tS,t)},rS=ce("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${me(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(Xe(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${mf.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${mf.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),iS=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiFormHelperText"}),{children:i,className:o,component:s="p",disabled:a,error:l,filled:u,focused:c,margin:d,required:h,variant:f,...g}=r,x=li(),b=Ji({props:r,muiFormControl:x,states:["variant","size","disabled","error","filled","focused","required"]}),y={...r,component:s,contained:b.variant==="filled"||b.variant==="outlined",variant:b.variant,size:b.size,disabled:b.disabled,error:b.error,filled:b.filled,focused:b.focused,required:b.required};delete y.ownerState;const C=nS(y);return p.jsx(rS,{as:s,className:De(C.root,o),ref:n,...g,ownerState:y,children:i===" "?gf||(gf=p.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):i})}),oc=A.createContext({});function oS(e){return qe("MuiList",e)}Me("MuiList",["root","padding","dense","subheader"]);const sS=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return ze({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},oS,t)},aS=ce("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),lS=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:u,...c}=r,d=A.useMemo(()=>({dense:a}),[a]),h={...r,component:s,dense:a,disablePadding:l},f=sS(h);return p.jsx(oc.Provider,{value:d,children:p.jsxs(aS,{as:s,className:De(f.root,o),ref:n,ownerState:h,...c,children:[u,i]})})});function M0(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function Ql(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function bf(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function B0(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function go(e,t,n,r,i,o){let s=!1,a=i(e,t,t?n:!1);for(;a;){if(a===e.firstChild){if(s)return!1;s=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!B0(a,o)||l)a=i(e,a,n);else return a.focus(),!0}return!1}const uS=A.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:u=!1,onKeyDown:c,variant:d="selectedMenu",...h}=t,f=A.useRef(null),g=A.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Qn(()=>{i&&f.current.focus()},[i]),A.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(E,{direction:S})=>{const I=!f.current.style.width;if(E.clientHeight<f.current.clientHeight&&I){const k=`${M0(fr(E))}px`;f.current.style[S==="rtl"?"paddingLeft":"paddingRight"]=k,f.current.style.width=`calc(100% + ${k})`}return f.current}}),[]);const x=E=>{const S=f.current,I=E.key;if(E.ctrlKey||E.metaKey||E.altKey){c&&c(E);return}const F=Ut(S).activeElement;if(I==="ArrowDown")E.preventDefault(),go(S,F,u,l,Ql);else if(I==="ArrowUp")E.preventDefault(),go(S,F,u,l,bf);else if(I==="Home")E.preventDefault(),go(S,null,u,l,Ql);else if(I==="End")E.preventDefault(),go(S,null,u,l,bf);else if(I.length===1){const z=g.current,U=I.toLowerCase(),D=performance.now();z.keys.length>0&&(D-z.lastTime>500?(z.keys=[],z.repeating=!0,z.previousKeyMatched=!0):z.repeating&&U!==z.keys[0]&&(z.repeating=!1)),z.lastTime=D,z.keys.push(U);const j=F&&!z.repeating&&B0(F,z);z.previousKeyMatched&&(j||go(S,F,!1,l,Ql,z))?E.preventDefault():z.previousKeyMatched=!1}c&&c(E)},b=mt(f,n);let y=-1;A.Children.forEach(s,(E,S)=>{if(!A.isValidElement(E)){y===S&&(y+=1,y>=s.length&&(y=-1));return}E.props.disabled||(d==="selectedMenu"&&E.props.selected||y===-1)&&(y=S),y===S&&(E.props.disabled||E.props.muiSkipListHighlight||E.type.muiSkipListHighlight)&&(y+=1,y>=s.length&&(y=-1))});const C=A.Children.map(s,(E,S)=>{if(S===y){const I={};return o&&(I.autoFocus=!0),E.props.tabIndex===void 0&&d==="selectedMenu"&&(I.tabIndex=0),A.cloneElement(E,I)}return E});return p.jsx(lS,{role:"menu",ref:b,className:a,onKeyDown:x,tabIndex:i?0:-1,...h,children:C})}),j0=e=>e.scrollTop;function $i(e,t){const{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:i.transitionDelay}}function sc(e){return`scale(${e}, ${e**2})`}const cS={entering:{opacity:1,transform:sc(1)},entered:{opacity:1,transform:"none"}},Xl=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Pa=A.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:a,onEnter:l,onEntered:u,onEntering:c,onExit:d,onExited:h,onExiting:f,style:g,timeout:x="auto",TransitionComponent:b=jn,...y}=t,C=ul(),E=A.useRef(),S=Gi(),I=A.useRef(null),k=mt(I,Xi(o),n),F=M=>H=>{if(M){const X=I.current;H===void 0?M(X):M(X,H)}},z=F(c),U=F((M,H)=>{j0(M);const{duration:X,delay:ue,easing:$}=$i({style:g,timeout:x,easing:s},{mode:"enter"});let _;x==="auto"?(_=S.transitions.getAutoHeightDuration(M.clientHeight),E.current=_):_=X,M.style.transition=[S.transitions.create("opacity",{duration:_,delay:ue}),S.transitions.create("transform",{duration:Xl?_:_*.666,delay:ue,easing:$})].join(","),l&&l(M,H)}),D=F(u),j=F(f),T=F(M=>{const{duration:H,delay:X,easing:ue}=$i({style:g,timeout:x,easing:s},{mode:"exit"});let $;x==="auto"?($=S.transitions.getAutoHeightDuration(M.clientHeight),E.current=$):$=H,M.style.transition=[S.transitions.create("opacity",{duration:$,delay:X}),S.transitions.create("transform",{duration:Xl?$:$*.666,delay:Xl?X:X||$*.333,easing:ue})].join(","),M.style.opacity=0,M.style.transform=sc(.75),d&&d(M)}),L=F(h),N=M=>{x==="auto"&&C.start(E.current||0,M),r&&r(I.current,M)};return p.jsx(b,{appear:i,in:a,nodeRef:I,onEnter:U,onEntered:D,onEntering:z,onExit:T,onExited:L,onExiting:j,addEndListener:N,timeout:x==="auto"?null:x,...y,children:(M,{ownerState:H,...X})=>A.cloneElement(o,{style:{opacity:0,transform:sc(.75),visibility:M==="exited"&&!a?"hidden":void 0,...cS[M],...g,...o.props.style},ref:k,...X})})});Pa&&(Pa.muiSupportAuto=!0);function dS(e){const t=Ut(e);return t.body===e?fr(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Bo(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function xf(e){return parseInt(fr(e).getComputedStyle(e).paddingRight,10)||0}function pS(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function yf(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,s=>{const a=!o.includes(s),l=!pS(s);a&&l&&Bo(s,i)})}function Zl(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function fS(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(dS(r)){const s=M0(fr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${xf(r)+s}px`;const a=Ut(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${xf(l)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Ut(r).body;else{const s=r.parentElement,a=fr(r);o=s?.nodeName==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:a})=>{o?s.style.setProperty(a,o):s.style.removeProperty(a)})}}function hS(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class mS{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&Bo(t.modalRef,!1);const i=hS(n);yf(n,t.mount,t.modalRef,i,!0);const o=Zl(this.containers,s=>s.container===n);return o!==-1?(this.containers[o].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=Zl(this.containers,o=>o.modals.includes(t)),i=this.containers[r];i.restore||(i.restore=fS(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=Zl(this.containers,s=>s.modals.includes(t)),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&Bo(t.modalRef,n),yf(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=o.modals[o.modals.length-1];s.modalRef&&Bo(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const gS=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function bS(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function xS(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function yS(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||xS(e))}function ES(e){const t=[],n=[];return Array.from(e.querySelectorAll(gS)).forEach((r,i)=>{const o=bS(r);o===-1||!yS(r)||(o===0?t.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function CS(){return!0}function TS(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=ES,isEnabled:s=CS,open:a}=e,l=A.useRef(!1),u=A.useRef(null),c=A.useRef(null),d=A.useRef(null),h=A.useRef(null),f=A.useRef(!1),g=A.useRef(null),x=mt(Xi(t),g),b=A.useRef(null);A.useEffect(()=>{!a||!g.current||(f.current=!n)},[n,a]),A.useEffect(()=>{if(!a||!g.current)return;const E=Ut(g.current);return g.current.contains(E.activeElement)||(g.current.hasAttribute("tabIndex")||g.current.setAttribute("tabIndex","-1"),f.current&&g.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[a]),A.useEffect(()=>{if(!a||!g.current)return;const E=Ut(g.current),S=F=>{b.current=F,!(r||!s()||F.key!=="Tab")&&E.activeElement===g.current&&F.shiftKey&&(l.current=!0,c.current&&c.current.focus())},I=()=>{const F=g.current;if(F===null)return;if(!E.hasFocus()||!s()||l.current){l.current=!1;return}if(F.contains(E.activeElement)||r&&E.activeElement!==u.current&&E.activeElement!==c.current)return;if(E.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!f.current)return;let z=[];if((E.activeElement===u.current||E.activeElement===c.current)&&(z=o(g.current)),z.length>0){const U=!!(b.current?.shiftKey&&b.current?.key==="Tab"),D=z[0],j=z[z.length-1];typeof D!="string"&&typeof j!="string"&&(U?j.focus():D.focus())}else F.focus()};E.addEventListener("focusin",I),E.addEventListener("keydown",S,!0);const k=setInterval(()=>{E.activeElement&&E.activeElement.tagName==="BODY"&&I()},50);return()=>{clearInterval(k),E.removeEventListener("focusin",I),E.removeEventListener("keydown",S,!0)}},[n,r,i,s,a,o]);const y=E=>{d.current===null&&(d.current=E.relatedTarget),f.current=!0,h.current=E.target;const S=t.props.onFocus;S&&S(E)},C=E=>{d.current===null&&(d.current=E.relatedTarget),f.current=!0};return p.jsxs(A.Fragment,{children:[p.jsx("div",{tabIndex:a?0:-1,onFocus:C,ref:u,"data-testid":"sentinelStart"}),A.cloneElement(t,{ref:x,onFocus:y}),p.jsx("div",{tabIndex:a?0:-1,onFocus:C,ref:c,"data-testid":"sentinelEnd"})]})}const vS={entering:{opacity:1},entered:{opacity:1}},ac=A.forwardRef(function(t,n){const r=Gi(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:a,easing:l,in:u,onEnter:c,onEntered:d,onEntering:h,onExit:f,onExited:g,onExiting:x,style:b,timeout:y=i,TransitionComponent:C=jn,...E}=t,S=A.useRef(null),I=mt(S,Xi(a),n),k=N=>M=>{if(N){const H=S.current;M===void 0?N(H):N(H,M)}},F=k(h),z=k((N,M)=>{j0(N);const H=$i({style:b,timeout:y,easing:l},{mode:"enter"});N.style.webkitTransition=r.transitions.create("opacity",H),N.style.transition=r.transitions.create("opacity",H),c&&c(N,M)}),U=k(d),D=k(x),j=k(N=>{const M=$i({style:b,timeout:y,easing:l},{mode:"exit"});N.style.webkitTransition=r.transitions.create("opacity",M),N.style.transition=r.transitions.create("opacity",M),f&&f(N)}),T=k(g),L=N=>{o&&o(S.current,N)};return p.jsx(C,{appear:s,in:u,nodeRef:S,onEnter:z,onEntered:U,onEntering:F,onExit:j,onExited:T,onExiting:D,addEndListener:L,timeout:y,...E,children:(N,{ownerState:M,...H})=>A.cloneElement(a,{style:{opacity:0,visibility:N==="exited"&&!u?"hidden":void 0,...vS[N],...b,...a.props.style},ref:I,...H})})});function SS(e){return qe("MuiBackdrop",e)}Me("MuiBackdrop",["root","invisible"]);const kS=e=>{const{classes:t,invisible:n}=e;return ze({root:["root",n&&"invisible"]},SS,t)},IS=ce("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),H0=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiBackdrop"}),{children:i,className:o,component:s="div",invisible:a=!1,open:l,components:u={},componentsProps:c={},slotProps:d={},slots:h={},TransitionComponent:f,transitionDuration:g,...x}=r,b={...r,component:s,invisible:a},y=kS(b),C={transition:f,root:u.Root,...h},E={...c,...d},S={component:s,slots:C,slotProps:E},[I,k]=nt("root",{elementType:IS,externalForwardedProps:S,className:De(y.root,o),ownerState:b}),[F,z]=nt("transition",{elementType:ac,externalForwardedProps:S,ownerState:b});return p.jsx(F,{in:l,timeout:g,...x,...z,children:p.jsx(I,{"aria-hidden":!0,...k,classes:y,ref:n,children:i})})});function AS(e){return typeof e=="function"?e():e}function wS(e){return e?e.props.hasOwnProperty("in"):!1}const Ef=()=>{},Bs=new mS;function DS(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:i=!1,onTransitionEnter:o,onTransitionExited:s,children:a,onClose:l,open:u,rootRef:c}=e,d=A.useRef({}),h=A.useRef(null),f=A.useRef(null),g=mt(f,c),[x,b]=A.useState(!u),y=wS(a);let C=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(C=!1);const E=()=>Ut(h.current),S=()=>(d.current.modalRef=f.current,d.current.mount=h.current,d.current),I=()=>{Bs.mount(S(),{disableScrollLock:r}),f.current&&(f.current.scrollTop=0)},k=wt(()=>{const M=AS(t)||E().body;Bs.add(S(),M),f.current&&I()}),F=()=>Bs.isTopModal(S()),z=wt(M=>{h.current=M,M&&(u&&F()?I():f.current&&Bo(f.current,C))}),U=A.useCallback(()=>{Bs.remove(S(),C)},[C]);A.useEffect(()=>()=>{U()},[U]),A.useEffect(()=>{u?k():(!y||!i)&&U()},[u,U,y,i,k]);const D=M=>H=>{M.onKeyDown?.(H),!(H.key!=="Escape"||H.which===229||!F())&&(n||(H.stopPropagation(),l&&l(H,"escapeKeyDown")))},j=M=>H=>{M.onClick?.(H),H.target===H.currentTarget&&l&&l(H,"backdropClick")};return{getRootProps:(M={})=>{const H=Jt(e);delete H.onTransitionEnter,delete H.onTransitionExited;const X={...H,...M};return{role:"presentation",...X,onKeyDown:D(X),ref:g}},getBackdropProps:(M={})=>{const H=M;return{"aria-hidden":!0,...H,onClick:j(H),open:u}},getTransitionProps:()=>{const M=()=>{b(!1),o&&o()},H=()=>{b(!0),s&&s(),i&&U()};return{onEnter:Qd(M,a?.props.onEnter??Ef),onExited:Qd(H,a?.props.onExited??Ef)}},rootRef:g,portalRef:z,isTopModal:F,exited:x,hasTransition:y}}function _S(e){return qe("MuiModal",e)}Me("MuiModal",["root","hidden","backdrop"]);const PS=e=>{const{open:t,exited:n,classes:r}=e;return ze({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},_S,r)},RS=ce("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Xe(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),NS=ce(H0,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),U0=A.forwardRef(function(t,n){const r=Ge({name:"MuiModal",props:t}),{BackdropComponent:i=NS,BackdropProps:o,classes:s,className:a,closeAfterTransition:l=!1,children:u,container:c,component:d,components:h={},componentsProps:f={},disableAutoFocus:g=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:b=!1,disablePortal:y=!1,disableRestoreFocus:C=!1,disableScrollLock:E=!1,hideBackdrop:S=!1,keepMounted:I=!1,onClose:k,onTransitionEnter:F,onTransitionExited:z,open:U,slotProps:D={},slots:j={},theme:T,...L}=r,N={...r,closeAfterTransition:l,disableAutoFocus:g,disableEnforceFocus:x,disableEscapeKeyDown:b,disablePortal:y,disableRestoreFocus:C,disableScrollLock:E,hideBackdrop:S,keepMounted:I},{getRootProps:M,getBackdropProps:H,getTransitionProps:X,portalRef:ue,isTopModal:$,exited:_,hasTransition:te}=DS({...N,rootRef:n}),oe={...N,exited:_},P=PS(oe),Ee={};if(u.props.tabIndex===void 0&&(Ee.tabIndex="-1"),te){const{onEnter:K,onExited:W}=X();Ee.onEnter=K,Ee.onExited=W}const se={slots:{root:h.Root,backdrop:h.Backdrop,...j},slotProps:{...f,...D}},[q,re]=nt("root",{ref:n,elementType:RS,externalForwardedProps:{...se,...L,component:d},getSlotProps:M,ownerState:oe,className:De(a,P?.root,!oe.open&&oe.exited&&P?.hidden)}),[ie,Te]=nt("backdrop",{ref:o?.ref,elementType:i,externalForwardedProps:se,shouldForwardComponentProp:!0,additionalProps:o,getSlotProps:K=>H({...K,onClick:W=>{K?.onClick&&K.onClick(W)}}),className:De(o?.className,P?.backdrop),ownerState:oe});return!I&&!U&&(!te||_)?null:p.jsx(P0,{ref:ue,container:c,disablePortal:y,children:p.jsxs(q,{...re,children:[!S&&i?p.jsx(ie,{...Te}):null,p.jsx(TS,{disableEnforceFocus:x,disableAutoFocus:g,disableRestoreFocus:C,isEnabled:$,open:U,children:A.cloneElement(u,Ee)})]})})});function LS(e){return qe("MuiPopover",e)}Me("MuiPopover",["root","paper"]);function Cf(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function Tf(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function vf(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function js(e){return typeof e=="function"?e():e}const OS=e=>{const{classes:t}=e;return ze({root:["root"],paper:["paper"]},LS,t)},FS=ce(U0,{name:"MuiPopover",slot:"Root"})({}),$0=ce(Zi,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),MS=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiPopover"}),{action:i,anchorEl:o,anchorOrigin:s={vertical:"top",horizontal:"left"},anchorPosition:a,anchorReference:l="anchorEl",children:u,className:c,container:d,elevation:h=8,marginThreshold:f=16,open:g,PaperProps:x={},slots:b={},slotProps:y={},transformOrigin:C={vertical:"top",horizontal:"left"},TransitionComponent:E,transitionDuration:S="auto",TransitionProps:I={},disableScrollLock:k=!1,...F}=r,z=A.useRef(),U={...r,anchorOrigin:s,anchorReference:l,elevation:h,marginThreshold:f,transformOrigin:C,TransitionComponent:E,transitionDuration:S,TransitionProps:I},D=OS(U),j=A.useCallback(()=>{if(l==="anchorPosition")return a;const K=js(o),Ce=(K&&K.nodeType===1?K:Ut(z.current).body).getBoundingClientRect();return{top:Ce.top+Cf(Ce,s.vertical),left:Ce.left+Tf(Ce,s.horizontal)}},[o,s.horizontal,s.vertical,a,l]),T=A.useCallback(K=>({vertical:Cf(K,C.vertical),horizontal:Tf(K,C.horizontal)}),[C.horizontal,C.vertical]),L=A.useCallback(K=>{const W={width:K.offsetWidth,height:K.offsetHeight},Ce=T(W);if(l==="none")return{top:null,left:null,transformOrigin:vf(Ce)};const ve=j();let ne=ve.top-Ce.vertical,Be=ve.left-Ce.horizontal;const Le=ne+W.height,_e=Be+W.width,ye=fr(js(o)),Ze=ye.innerHeight-f,Se=ye.innerWidth-f;if(f!==null&&ne<f){const Ue=ne-f;ne-=Ue,Ce.vertical+=Ue}else if(f!==null&&Le>Ze){const Ue=Le-Ze;ne-=Ue,Ce.vertical+=Ue}if(f!==null&&Be<f){const Ue=Be-f;Be-=Ue,Ce.horizontal+=Ue}else if(_e>Se){const Ue=_e-Se;Be-=Ue,Ce.horizontal+=Ue}return{top:`${Math.round(ne)}px`,left:`${Math.round(Be)}px`,transformOrigin:vf(Ce)}},[o,l,j,T,f]),[N,M]=A.useState(g),H=A.useCallback(()=>{const K=z.current;if(!K)return;const W=L(K);W.top!==null&&K.style.setProperty("top",W.top),W.left!==null&&(K.style.left=W.left),K.style.transformOrigin=W.transformOrigin,M(!0)},[L]);A.useEffect(()=>(k&&window.addEventListener("scroll",H),()=>window.removeEventListener("scroll",H)),[o,k,H]);const X=()=>{H()},ue=()=>{M(!1)};A.useEffect(()=>{g&&H()}),A.useImperativeHandle(i,()=>g?{updatePosition:()=>{H()}}:null,[g,H]),A.useEffect(()=>{if(!g)return;const K=wm(()=>{H()}),W=fr(js(o));return W.addEventListener("resize",K),()=>{K.clear(),W.removeEventListener("resize",K)}},[o,g,H]);let $=S;const _={slots:{transition:E,...b},slotProps:{transition:I,paper:x,...y}},[te,oe]=nt("transition",{elementType:Pa,externalForwardedProps:_,ownerState:U,getSlotProps:K=>({...K,onEntering:(W,Ce)=>{K.onEntering?.(W,Ce),X()},onExited:W=>{K.onExited?.(W),ue()}}),additionalProps:{appear:!0,in:g}});S==="auto"&&!te.muiSupportAuto&&($=void 0);const P=d||(o?Ut(js(o)).body:void 0),[Ee,{slots:se,slotProps:q,...re}]=nt("root",{ref:n,elementType:FS,externalForwardedProps:{..._,...F},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:b.backdrop},slotProps:{backdrop:Dm(typeof y.backdrop=="function"?y.backdrop(U):y.backdrop,{invisible:!0})},container:P,open:g},ownerState:U,className:De(D.root,c)}),[ie,Te]=nt("paper",{ref:z,className:D.paper,elementType:$0,externalForwardedProps:_,shouldForwardComponentProp:!0,additionalProps:{elevation:h,style:N?void 0:{opacity:0}},ownerState:U});return p.jsx(Ee,{...re,...!Aa(Ee)&&{slots:se,slotProps:q,disableScrollLock:k},children:p.jsx(te,{...oe,timeout:$,children:p.jsx(ie,{...Te,children:u})})})});function BS(e){return qe("MuiMenu",e)}Me("MuiMenu",["root","paper","list"]);const jS={vertical:"top",horizontal:"right"},HS={vertical:"top",horizontal:"left"},US=e=>{const{classes:t}=e;return ze({root:["root"],paper:["paper"],list:["list"]},BS,t)},$S=ce(MS,{shouldForwardProp:e=>on(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),zS=ce($0,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),qS=ce(uS,{name:"MuiMenu",slot:"List"})({outline:0}),WS=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiMenu"}),{autoFocus:i=!0,children:o,className:s,disableAutoFocusItem:a=!1,MenuListProps:l={},onClose:u,open:c,PaperProps:d={},PopoverClasses:h,transitionDuration:f="auto",TransitionProps:{onEntering:g,...x}={},variant:b="selectedMenu",slots:y={},slotProps:C={},...E}=r,S=Rc(),I={...r,autoFocus:i,disableAutoFocusItem:a,MenuListProps:l,onEntering:g,PaperProps:d,transitionDuration:f,TransitionProps:x,variant:b},k=US(I),F=i&&!a&&c,z=A.useRef(null),U=($,_)=>{z.current&&z.current.adjustStyleForScrollbar($,{direction:S?"rtl":"ltr"}),g&&g($,_)},D=$=>{$.key==="Tab"&&($.preventDefault(),u&&u($,"tabKeyDown"))};let j=-1;A.Children.map(o,($,_)=>{A.isValidElement($)&&($.props.disabled||(b==="selectedMenu"&&$.props.selected||j===-1)&&(j=_))});const T={slots:y,slotProps:{list:l,transition:x,paper:d,...C}},L=ur({elementType:y.root,externalSlotProps:C.root,ownerState:I,className:[k.root,s]}),[N,M]=nt("paper",{className:k.paper,elementType:zS,externalForwardedProps:T,shouldForwardComponentProp:!0,ownerState:I}),[H,X]=nt("list",{className:De(k.list,l.className),elementType:qS,shouldForwardComponentProp:!0,externalForwardedProps:T,getSlotProps:$=>({...$,onKeyDown:_=>{D(_),$.onKeyDown?.(_)}}),ownerState:I}),ue=typeof T.slotProps.transition=="function"?T.slotProps.transition(I):T.slotProps.transition;return p.jsx($S,{onClose:u,anchorOrigin:{vertical:"bottom",horizontal:S?"right":"left"},transformOrigin:S?jS:HS,slots:{root:y.root,paper:N,backdrop:y.backdrop,...y.transition&&{transition:y.transition}},slotProps:{root:L,paper:M,backdrop:typeof C.backdrop=="function"?C.backdrop(I):C.backdrop,transition:{...ue,onEntering:(...$)=>{U(...$),ue?.onEntering?.(...$)}}},open:c,ref:n,transitionDuration:f,ownerState:I,...E,classes:h,children:p.jsx(H,{actions:z,autoFocus:i&&(j===-1||a),autoFocusItem:F,variant:b,...X,children:o})})});function VS(e){return qe("MuiNativeSelect",e)}const od=Me("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),GS=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${me(n)}`,o&&"iconOpen",r&&"disabled"]};return ze(a,VS,t)},z0=ce("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${od.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),YS=ce(z0,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:on,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${od.multiple}`]:t.multiple}]}})({}),q0=ce("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${od.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),KS=ce(q0,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${me(n.variant)}`],n.open&&t.iconOpen]}})({}),QS=A.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:s,inputRef:a,variant:l="standard",...u}=t,c={...t,disabled:i,variant:l,error:o},d=GS(c);return p.jsxs(A.Fragment,{children:[p.jsx(YS,{ownerState:c,className:De(d.select,r),disabled:i,ref:a||n,...u}),t.multiple?null:p.jsx(KS,{as:s,ownerState:c,className:d.icon})]})});function W0(e){return qe("MuiSelect",e)}const bo=Me("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Sf;const XS=ce(z0,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${bo.select}`]:t.select},{[`&.${bo.select}`]:t[n.variant]},{[`&.${bo.error}`]:t.error},{[`&.${bo.multiple}`]:t.multiple}]}})({[`&.${bo.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),ZS=ce(q0,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${me(n.variant)}`],n.open&&t.iconOpen]}})({}),JS=ce("input",{shouldForwardProp:e=>Am(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function kf(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function ek(e){return e==null||typeof e=="string"&&!e.trim()}const tk=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${me(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return ze(a,W0,t)},nk=A.forwardRef(function(t,n){const{"aria-describedby":r,"aria-label":i,autoFocus:o,autoWidth:s,children:a,className:l,defaultOpen:u,defaultValue:c,disabled:d,displayEmpty:h,error:f=!1,IconComponent:g,inputRef:x,labelId:b,MenuProps:y={},multiple:C,name:E,onBlur:S,onChange:I,onClose:k,onFocus:F,onOpen:z,open:U,readOnly:D,renderValue:j,required:T,SelectDisplayProps:L={},tabIndex:N,type:M,value:H,variant:X="standard",...ue}=t,[$,_]=wi({controlled:H,default:c,name:"Select"}),[te,oe]=wi({controlled:U,default:u,name:"Select"}),P=A.useRef(null),Ee=A.useRef(null),[se,q]=A.useState(null),{current:re}=A.useRef(U!=null),[ie,Te]=A.useState(),K=mt(n,x),W=A.useCallback(G=>{Ee.current=G,G&&q(G)},[]),Ce=se?.parentNode;A.useImperativeHandle(K,()=>({focus:()=>{Ee.current.focus()},node:P.current,value:$}),[$]),A.useEffect(()=>{u&&te&&se&&!re&&(Te(s?null:Ce.clientWidth),Ee.current.focus())},[se,s]),A.useEffect(()=>{o&&Ee.current.focus()},[o]),A.useEffect(()=>{if(!b)return;const G=Ut(Ee.current).getElementById(b);if(G){const ae=()=>{getSelection().isCollapsed&&Ee.current.focus()};return G.addEventListener("click",ae),()=>{G.removeEventListener("click",ae)}}},[b]);const ve=(G,ae)=>{G?z&&z(ae):k&&k(ae),re||(Te(s?null:Ce.clientWidth),oe(G))},ne=G=>{G.button===0&&(G.preventDefault(),Ee.current.focus(),ve(!0,G))},Be=G=>{ve(!1,G)},Le=A.Children.toArray(a),_e=G=>{const ae=Le.find(he=>he.props.value===G.target.value);ae!==void 0&&(_(ae.props.value),I&&I(G,ae))},ye=G=>ae=>{let he;if(ae.currentTarget.hasAttribute("tabindex")){if(C){he=Array.isArray($)?$.slice():[];const we=$.indexOf(G.props.value);we===-1?he.push(G.props.value):he.splice(we,1)}else he=G.props.value;if(G.props.onClick&&G.props.onClick(ae),$!==he&&(_(he),I)){const we=ae.nativeEvent||ae,Tt=new we.constructor(we.type,we);Object.defineProperty(Tt,"target",{writable:!0,value:{value:he,name:E}}),I(Tt,G)}C||ve(!1,ae)}},Ze=G=>{D||[" ","ArrowUp","ArrowDown","Enter"].includes(G.key)&&(G.preventDefault(),ve(!0,G))},Se=se!==null&&te,Ue=G=>{!Se&&S&&(Object.defineProperty(G,"target",{writable:!0,value:{value:$,name:E}}),S(G))};delete ue["aria-invalid"];let xe,yt;const et=[];let je=!1;(_a({value:$})||h)&&(j?xe=j($):je=!0);const Y=Le.map(G=>{if(!A.isValidElement(G))return null;let ae;if(C){if(!Array.isArray($))throw new Error(dr(2));ae=$.some(he=>kf(he,G.props.value)),ae&&je&&et.push(G.props.children)}else ae=kf($,G.props.value),ae&&je&&(yt=G.props.children);return A.cloneElement(G,{"aria-selected":ae?"true":"false",onClick:ye(G),onKeyUp:he=>{he.key===" "&&he.preventDefault(),G.props.onKeyUp&&G.props.onKeyUp(he)},role:"option",selected:ae,value:void 0,"data-value":G.props.value})});je&&(C?et.length===0?xe=null:xe=et.reduce((G,ae,he)=>(G.push(ae),he<et.length-1&&G.push(", "),G),[]):xe=yt);let fe=ie;!s&&re&&se&&(fe=Ce.clientWidth);let Ae;typeof N<"u"?Ae=N:Ae=d?null:0;const Ne=L.id||(E?`mui-component-select-${E}`:void 0),Pe={...t,variant:X,value:$,open:Se,error:f},Ie=tk(Pe),Ye={...y.PaperProps,...typeof y.slotProps?.paper=="function"?y.slotProps.paper(Pe):y.slotProps?.paper},gt={...y.MenuListProps,...typeof y.slotProps?.list=="function"?y.slotProps.list(Pe):y.slotProps?.list},lt=Vi();return p.jsxs(A.Fragment,{children:[p.jsx(XS,{as:"div",ref:W,tabIndex:Ae,role:"combobox","aria-controls":Se?lt:void 0,"aria-disabled":d?"true":void 0,"aria-expanded":Se?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[b,Ne].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":T?"true":void 0,"aria-invalid":f?"true":void 0,onKeyDown:Ze,onMouseDown:d||D?null:ne,onBlur:Ue,onFocus:F,...L,ownerState:Pe,className:De(L.className,Ie.select,l),id:Ne,children:ek(xe)?Sf||(Sf=p.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):xe}),p.jsx(JS,{"aria-invalid":f,value:Array.isArray($)?$.join(","):$,name:E,ref:P,"aria-hidden":!0,onChange:_e,tabIndex:-1,disabled:d,className:Ie.nativeInput,autoFocus:o,required:T,...ue,ownerState:Pe}),p.jsx(ZS,{as:g,className:Ie.icon,ownerState:Pe}),p.jsx(WS,{id:`menu-${E||""}`,anchorEl:Ce,open:Se,onClose:Be,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...y,slotProps:{...y.slotProps,list:{"aria-labelledby":b,role:"listbox","aria-multiselectable":C?"true":void 0,disableListWrap:!0,id:lt,...gt},paper:{...Ye,style:{minWidth:fe,...Ye!=null?Ye.style:null}}},children:Y})]})}),rk=e=>{const{classes:t}=e,r=ze({root:["root"]},W0,t);return{...t,...r}},sd={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>on(e)&&e!=="variant"},ik=ce(nd,sd)(""),ok=ce(id,sd)(""),sk=ce(rd,sd)(""),V0=A.forwardRef(function(t,n){const r=Ge({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:s={},className:a,defaultOpen:l=!1,displayEmpty:u=!1,IconComponent:c=F0,id:d,input:h,inputProps:f,label:g,labelId:x,MenuProps:b,multiple:y=!1,native:C=!1,onClose:E,onOpen:S,open:I,renderValue:k,SelectDisplayProps:F,variant:z="outlined",...U}=r,D=C?QS:nk,j=li(),T=Ji({props:r,muiFormControl:j,states:["variant","error"]}),L=T.variant||z,N={...r,variant:L,classes:s},M=rk(N),{root:H,...X}=M,ue=h||{standard:p.jsx(ik,{ownerState:N}),outlined:p.jsx(ok,{label:g,ownerState:N}),filled:p.jsx(sk,{ownerState:N})}[L],$=mt(n,Xi(ue));return p.jsx(A.Fragment,{children:A.cloneElement(ue,{inputComponent:D,inputProps:{children:o,error:T.error,IconComponent:c,variant:L,type:void 0,multiple:y,...C?{id:d}:{autoWidth:i,defaultOpen:l,displayEmpty:u,labelId:x,MenuProps:b,onClose:E,onOpen:S,open:I,renderValue:k,SelectDisplayProps:{id:d,...F}},...f,classes:f?Gt(X,f.classes):X,...h?h.props.inputProps:{}},...(y&&C||u)&&L==="outlined"?{notched:!0}:{},ref:$,className:De(ue.props.className,a,M.root),...!h&&{variant:L},...U})})});V0.muiName="Select";function ak(e){return qe("MuiTextField",e)}Me("MuiTextField",["root"]);const lk={standard:nd,filled:rd,outlined:id},uk=e=>{const{classes:t}=e;return ze({root:["root"]},ak,t)},ck=ce(eS,{name:"MuiTextField",slot:"Root"})({}),Yt=A.forwardRef(function(t,n){const r=Ge({props:t,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:a,color:l="primary",defaultValue:u,disabled:c=!1,error:d=!1,FormHelperTextProps:h,fullWidth:f=!1,helperText:g,id:x,InputLabelProps:b,inputProps:y,InputProps:C,inputRef:E,label:S,maxRows:I,minRows:k,multiline:F=!1,name:z,onBlur:U,onChange:D,onFocus:j,placeholder:T,required:L=!1,rows:N,select:M=!1,SelectProps:H,slots:X={},slotProps:ue={},type:$,value:_,variant:te="outlined",...oe}=r,P={...r,autoFocus:o,color:l,disabled:c,error:d,fullWidth:f,multiline:F,required:L,select:M,variant:te},Ee=uk(P),se=Vi(x),q=g&&se?`${se}-helper-text`:void 0,re=S&&se?`${se}-label`:void 0,ie=lk[te],Te={slots:X,slotProps:{input:C,inputLabel:b,htmlInput:y,formHelperText:h,select:H,...ue}},K={},W=Te.slotProps.inputLabel;te==="outlined"&&(W&&typeof W.shrink<"u"&&(K.notched=W.shrink),K.label=S),M&&((!H||!H.native)&&(K.id=void 0),K["aria-describedby"]=void 0);const[Ce,ve]=nt("root",{elementType:ck,shouldForwardComponentProp:!0,externalForwardedProps:{...Te,...oe},ownerState:P,className:De(Ee.root,a),ref:n,additionalProps:{disabled:c,error:d,fullWidth:f,required:L,color:l,variant:te}}),[ne,Be]=nt("input",{elementType:ie,externalForwardedProps:Te,additionalProps:K,ownerState:P}),[Le,_e]=nt("inputLabel",{elementType:Q6,externalForwardedProps:Te,ownerState:P}),[ye,Ze]=nt("htmlInput",{elementType:"input",externalForwardedProps:Te,ownerState:P}),[Se,Ue]=nt("formHelperText",{elementType:iS,externalForwardedProps:Te,ownerState:P}),[xe,yt]=nt("select",{elementType:V0,externalForwardedProps:Te,ownerState:P}),et=p.jsx(ne,{"aria-describedby":q,autoComplete:i,autoFocus:o,defaultValue:u,fullWidth:f,multiline:F,name:z,rows:N,maxRows:I,minRows:k,type:$,value:_,id:se,inputRef:E,onBlur:U,onChange:D,onFocus:j,placeholder:T,inputProps:Ze,slots:{input:X.htmlInput?ye:void 0},...Be});return p.jsxs(Ce,{...ve,children:[S!=null&&S!==""&&p.jsx(Le,{htmlFor:se,id:re,..._e,children:S}),M?p.jsx(xe,{"aria-describedby":q,id:se,labelId:re,value:_,input:et,...yt,children:s}):et,g&&p.jsx(Se,{id:q,...Ue,children:g})]})});function ad({sourceAndPaths:e,selectedSourceIndex:t,existingQuery:n,onQueryChange:r,onSourceChange:i,resourceUri:o}){return B.useEffect(()=>{i&&i(t)},[t,i]),p.jsx(zc,{children:p.jsxs(ht.Stack,{spacing:2,component:"section",children:[p.jsx(G0,{sourceAndPath:e[t],existingQuery:n,onChange:s=>{r&&r(s)},resourceUri:o}),p.jsx(ht.Box,{height:"5px"})]})})}function Js(){return{query:void 0,malloyQuery:void 0,malloyResult:void 0}}function dk({sourceAndPath:e,onChange:t,existingQuery:n,explorerComponents:r,QueryBuilder:i,resourceUri:o}){const[s,a]=B.useState(n||Js()),[l,u]=B.useState(void 0);B.useEffect(()=>{n&&a(n)},[n]);const[c,d]=B.useState([]),{MalloyExplorerProvider:h,QueryPanel:f,ResizableCollapsiblePanel:g,ResultPanel:x,SourcePanel:b}=r;B.useEffect(()=>{t&&t(s)},[t,s]);const{projectName:y,packageName:C,versionId:E}=ct(o),{apiClients:S}=Je.useServer(),I=Yn({mutationFn:()=>{const U=typeof s?.malloyQuery=="string"?s.malloyQuery:new i.ASTQuery({source:e.sourceInfo,query:s?.malloyQuery}).toMalloy();return u({executionState:"running",query:s?.malloyQuery,queryResolutionStartMillis:Date.now(),onCancel:I.reset,response:{result:{}}}),a({...s,query:U}),S.models.executeQueryModel(y,C,e.modelPath,{query:U,sourceName:void 0,queryName:void 0,versionId:E})},onSuccess:U=>{if(U){const D=JSON.parse(U.data.result);a({...s,malloyResult:D}),u(j=>j?{...j,executionState:"finished",response:{result:D}}:void 0)}}}),[k,F]=B.useState(e.sourceInfo.name);B.useEffect(()=>{k!==e.sourceInfo.name&&(F(e.sourceInfo.name),a(Js()),u(void 0))},[e,k]);const z=B.useCallback(U=>{a({...s,malloyQuery:U,malloyResult:void 0})},[s]);return k!==e.sourceInfo.name?p.jsx("div",{children:"Loading..."}):p.jsx(y0,{sx:{border:"1px solid #e0e0e0",borderRadius:"8px",overflow:"hidden"},children:p.jsx(h,{source:e.sourceInfo,query:s?.malloyQuery,topValues:[],onFocusedNestViewPathChange:d,focusedNestViewPath:c,onQueryChange:z,children:p.jsxs("div",{style:{display:"flex",height:"100%",overflowY:"auto"},children:[p.jsx(g,{isInitiallyExpanded:!0,initialWidth:180,minWidth:180,icon:"database",title:e.sourceInfo.name,children:p.jsx(b,{onRefresh:()=>a(Js())})}),p.jsx(g,{isInitiallyExpanded:!0,initialWidth:280,minWidth:280,icon:"filterSliders",title:"Query",children:p.jsx(f,{runQuery:()=>{console.log(`running query with: ${s?.malloyQuery}`);try{I.mutate()}catch(U){console.error("Error running query:",U)}}})}),p.jsx(x,{source:e.sourceInfo,draftQuery:s?.malloyQuery,setDraftQuery:U=>a({...s,malloyQuery:U}),submittedQuery:l,options:{showRawQuery:!0}})]})})},e.sourceInfo.name)}function G0(e){const[t,n]=B.useState(null),[r,i]=B.useState(null),[o,s]=B.useState(!0);return B.useEffect(()=>{let a=!0;return Promise.all([import("@malloydata/malloy-explorer"),import("@malloydata/malloy-query-builder")]).then(([l,u])=>{a&&(n(l),i(u),s(!1))}).catch(l=>{console.error("Failed to load Malloy components:",l),a&&s(!1)}),()=>{a=!1}},[]),o||!t||!r?p.jsx(UT,{children:p.jsx(y0,{children:p.jsx("div",{style:{alignItems:"center",justifyContent:"center",height:"200px",color:"#666"},children:"Loading explorer..."})})}):p.jsx(dk,{...e,explorerComponents:t,QueryBuilder:r,resourceUri:e.resourceUri})}function ld(e,t=!0){const{modelPath:n,projectName:r,packageName:i,versionId:o}=ct(e),{apiClients:s}=Je.useServer();return Qt({queryKey:["package",r,i,n,o],queryFn:async()=>(await s.models.getModel(r,i,n,o)).data,enabled:t})}function ud({data:e,onChange:t,existingQuery:n,initialSelectedSourceIndex:r=0,onSourceChange:i,resourceUri:o}){const[s,a]=B.useState(r);B.useEffect(()=>{a(r)},[r]);const{data:l,isError:u,isLoading:c,error:d}=ld(o,!e),{modelPath:h}=ct(o),f=e||l;if(c&&!e)return p.jsx(Kt,{text:"Fetching Model..."});if(u&&!e)return console.log("error",d),p.jsx(sn,{error:d,context:`ModelExplorer > ${h}`});if(!f)return p.jsx(Kt,{text:"Loading..."});const g=(f?.sourceInfos||[]).map((b,y)=>{try{return JSON.parse(b)?.name||`Source ${y+1}`}catch{return`Source ${y+1}`}}),x=g[s]||"";return p.jsxs(ka,{variant:"outlined",children:[p.jsx(x0,{children:p.jsx(v.Stack,{sx:{flexDirection:"row"},children:p.jsx(w6,{size:"small",id:"size-small-standard",disablePortal:!0,options:g,value:x,onChange:(b,y)=>{if(!y)return;const C=g.indexOf(y);C>=0&&(a(C),i?.(C))},renderInput:b=>p.jsx(Yt,{...b}),style:{width:350,marginTop:"3px",marginLeft:"6px",marginBottom:"8px"}})})}),p.jsx(zc,{children:p.jsxs(v.Stack,{spacing:2,component:"section",children:[Array.isArray(f.sourceInfos)&&f.sourceInfos.length>0&&p.jsx(ad,{sourceAndPaths:f.sourceInfos.map(b=>({sourceInfo:JSON.parse(b),modelPath:h})),selectedSourceIndex:s,existingQuery:n,onQueryChange:t,resourceUri:o}),p.jsx(v.Box,{height:"5px"})]})})]})}function cd({open:e,onClose:t,resourceUri:n,data:r,title:i="Data Sources",hasValidImport:o=!0,existingQuery:s,initialSelectedSourceIndex:a,onChange:l,onSourceChange:u}){return p.jsxs(v.Dialog,{open:e,onClose:t,fullScreen:!0,children:[p.jsxs(v.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[i,p.jsx(v.IconButton,{onClick:t,sx:{color:"#666666"},children:p.jsx(Lr,{})})]}),p.jsx(v.DialogContent,{children:o?p.jsx(ud,{resourceUri:n,data:r,existingQuery:s,initialSelectedSourceIndex:a,onChange:l,onSourceChange:u}):p.jsx("div",{children:"No valid import statement found in cell"})})]})}function pk({onChange:e,resourceUri:t}){const{modelPath:n}=ct(t),{data:r,isError:i,isLoading:o,error:s}=ld(t),[a,l]=B.useState(!1),[u,c]=B.useState(),[d,h]=B.useState(0),[f,g]=B.useState("");if(o)return p.jsx(Kt,{text:"Fetching Model..."});if(i)return console.log("error",s),p.jsx(sn,{error:s,context:`Model > ${n}`});const x=C=>{c(C),e&&e(C)},b=C=>{h(C)},y=()=>{const C=window.location.href;navigator.clipboard.writeText(C).then(()=>g("URL copied to clipboard!")).catch(()=>g("Failed to copy URL"))};return p.jsxs(p.Fragment,{children:[p.jsxs(v.Box,{sx:{position:"relative",maxWidth:"1200px",margin:"0 auto",paddingTop:"24px"},children:[Array.isArray(r?.sourceInfos)&&r.sourceInfos.length>0&&p.jsxs(v.Stack,{spacing:2,component:"section",children:[p.jsxs(v.Box,{sx:{padding:"0 0 16px 0",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[p.jsx(v.Typography,{variant:"h1",sx:{fontSize:"28px",fontWeight:"600",color:"#1a1a1a",marginBottom:"8px",marginTop:"0",paddingLeft:"0"},children:"Sources"}),p.jsx(v.Tooltip,{title:"Click to copy link",children:p.jsx(Lc,{sx:{fontSize:"24px",color:"#666666",cursor:"pointer"},onClick:y})})]}),p.jsx(ud,{data:r,onChange:x,onSourceChange:b,existingQuery:u,initialSelectedSourceIndex:d,resourceUri:t}),p.jsx(v.IconButton,{sx:{position:"absolute",top:"90px",right:"4px",backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"32px",height:"32px",zIndex:2},onClick:()=>l(!0),children:p.jsx(v.Tooltip,{title:"Expanded view",children:p.jsx(N2,{sx:{fontSize:"18px",color:"#666666",marginBottom:"5px"}})})})]}),r?.queries?.length>0&&p.jsxs(v.Stack,{spacing:2,component:"section",sx:{marginTop:"24px"},children:[p.jsx(v.Box,{sx:{padding:"0 0 16px 0"},children:p.jsx(v.Typography,{variant:"h2",sx:{fontSize:"24px",fontWeight:"600",color:"#1a1a1a",marginBottom:"0",marginTop:"8px",paddingLeft:"0"},children:"Named Queries"})}),r.queries.map(C=>p.jsx(zT,{queryName:C.name,annotations:C.annotations,resourceUri:t},C.name))]}),p.jsx(cd,{open:a,onClose:()=>l(!1),resourceUri:t,data:r,title:`Model: ${n.split("/").pop()}`,existingQuery:u,initialSelectedSourceIndex:d,onChange:x,onSourceChange:b})]}),p.jsx(v.Snackbar,{open:f!=="",autoHideDuration:6e3,onClose:()=>g(""),message:f})]})}const Y0=it(p.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"})),fk=it(p.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"})),hk=B.lazy(()=>Promise.resolve().then(()=>Gb));function K0(e){const{projectName:t,packageName:n}=ct(e.resourceUri);if(!t||!n)throw new Error("Project and Package name must be provided for query embedding.");return JSON.stringify({...e})}function mk({embeddedQueryResult:e}){const{query:t,sourceName:n,queryName:r,resourceUri:i}=JSON.parse(e),{modelPath:o}=ct(i);if(!o||!t&&(!r||!n)||typeof o!="string")throw new Error("Invalid embedded query result: "+e);return p.jsx(Q0,{query:t,sourceName:n,queryName:r,resourceUri:i})}function Q0({query:e,sourceName:t,queryName:n,resourceUri:r}){const{modelPath:i,projectName:o,packageName:s,versionId:a}=ct(r),{apiClients:l}=Je.useServer();if(!o||!s)throw new Error("No project or package name provided. A resource URI must be provided.");const{data:u,isSuccess:c,isError:d,error:h}=Qt({queryKey:[r,e,t,n],queryFn:()=>l.models.executeQueryModel(o,s,i,{query:e,sourceName:t,queryName:n,versionId:a})});return p.jsxs(p.Fragment,{children:[!c&&!d&&p.jsx(Kt,{text:"Fetching Query Results..."}),c&&p.jsx(B.Suspense,{fallback:p.jsx("div",{children:"Loading..."}),children:p.jsx(hk,{result:u.data.result})}),d&&p.jsx(sn,{context:`${o} > ${s} > ${i}`,error:h})]})}function gk({cell:e,hideCodeCellIcon:t,hideEmbeddingIcon:n,resourceUri:r,index:i}){const[o,s]=B.useState(!1),[a,l]=B.useState(!1),[u,c]=B.useState(!1),[d,h]=B.useState(),[f,g]=B.useState(),[x,b]=B.useState(!1),[y,C]=B.useState(""),E=/import\s*\{([^}]+)\}\s*from\s*['"`][^'"`]+['"`]/,S=/import\s*(?:\{[^}]*\}\s*from\s*)?['"`]([^'"`]+)['"`]/,I=!!e.text&&(E.test(e.text)||S.test(e.text)),k=()=>{if(!e.newSources||e.newSources.length===0)return 0;let D=[],j="";if(e.text){const T=e.text.match(E);T&&(D=T[1].split(",").map(N=>N.trim()));const L=e.text.match(S);L&&(j=L[1].trim())}for(let T=0;T<e.newSources.length;T++)try{const L=JSON.parse(e.newSources[T]);if(D.length>0&&D.includes(L.name)||j&&j===L.path)return T}catch{continue}return 0},F=e.newSources&&e.newSources.length>0?{sourceInfos:e.newSources,resource:r}:void 0,z=K0({query:e.text,resourceUri:r});B.useEffect(()=>{e.type==="code"&&Sa(e.text,"malloy").then(D=>{h(D)})},[e]),B.useEffect(()=>{Sa(z,"typescript").then(D=>{g(D)})},[z]);const U=()=>{const D=window.location.href;navigator.clipboard.writeText(D).then(()=>C("URL copied to clipboard!")).catch(()=>C("Failed to copy URL"))};return e.type==="markdown"&&p.jsx(Yu,{children:p.jsxs(v.Box,{sx:{"& h1, & h2, & h3, & h4, & h5, & h6":{fontWeight:"600",color:"#1a1a1a",marginBottom:"8px",marginTop:"16px"},"& h1":{fontSize:"28px"},"& h2":{fontSize:"24px"},"& h3":{fontSize:"20px"},"& p":{color:"#333333",lineHeight:"1.7",marginBottom:"8px",fontSize:"16px"},"& ul, & ol":{color:"#333333",lineHeight:"1.7",marginBottom:"8px",fontSize:"16px"},"& li":{marginBottom:"4px"}},children:[i===0?p.jsxs(v.Stack,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",children:[p.jsx(ua,{children:e.text}),p.jsx(v.Tooltip,{title:"Click to copy link",children:p.jsx(Lc,{sx:{fontSize:"24px",color:"#666666",cursor:"pointer",marginTop:"26px"},onClick:U})})]}):p.jsx(ua,{children:e.text}),p.jsx(v.Snackbar,{open:y!=="",autoHideDuration:6e3,onClose:()=>C(""),message:y})]})})||e.type==="code"&&p.jsxs(Yu,{children:[(!t||!n&&e.result||e.newSources&&e.newSources.length>0)&&p.jsx(v.Stack,{sx:{flexDirection:"column",gap:"8px",marginBottom:"16px"},children:e.newSources&&e.newSources.length>0&&I&&p.jsx(Ku,{sx:{position:"relative",padding:"0"},children:p.jsxs(v.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:"24px",paddingRight:"8px"},children:[d&&p.jsx("span",{dangerouslySetInnerHTML:{__html:e.text.length>50&&d?`${d.substring(0,50)}...`:d},style:{fontFamily:"monospace",fontSize:"14px",flex:1,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginRight:"8px"}}),p.jsx(v.IconButton,{sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"32px",height:"32px",flexShrink:0},onClick:()=>b(!0),children:p.jsx(Xo,{sx:{fontSize:"18px",color:"#666666"}})})]})})}),p.jsx(cd,{open:x,onClose:()=>b(!1),title:"Data Sources",hasValidImport:I,resourceUri:r,data:F,initialSelectedSourceIndex:k()}),p.jsxs(v.Dialog,{open:o,onClose:()=>s(!1),maxWidth:"lg",fullWidth:!0,children:[p.jsxs(v.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:["Malloy Code",p.jsx(v.IconButton,{onClick:()=>s(!1),sx:{color:"#666666"},children:p.jsx(Lr,{})})]}),p.jsx(v.DialogContent,{children:p.jsx(v.Box,{sx:{border:"1px solid #e0e0e0",borderRadius:"8px",padding:"16px",fontFamily:"monospace",fontSize:"14px",lineHeight:"1.5",overflow:"auto",maxHeight:"70vh",backgroundColor:"#ffffff"},children:p.jsx("pre",{className:"code-display",style:{margin:0},dangerouslySetInnerHTML:{__html:d}})})})]}),p.jsxs(v.Dialog,{open:a,onClose:()=>l(!1),maxWidth:"lg",fullWidth:!0,children:[p.jsxs(v.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:["Embeddable Code",p.jsx(v.IconButton,{onClick:()=>l(!1),sx:{color:"#666666"},children:p.jsx(Lr,{})})]}),p.jsx(v.DialogContent,{children:p.jsxs(v.Stack,{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start"},children:[p.jsx(v.Typography,{component:"div",sx:{fontSize:"12px",fontFamily:"monospace","& .line":{textWrap:"wrap"},flex:1},dangerouslySetInnerHTML:{__html:f}}),p.jsx(v.Tooltip,{title:"Copy Embeddable Code",children:p.jsx(v.IconButton,{sx:{width:"24px",height:"24px",marginLeft:"8px",color:"#666666"},onClick:()=>{navigator.clipboard.writeText(z)},children:p.jsx(fk,{})})})]})})]}),p.jsx(b0,{open:u,onClose:()=>c(!1),result:e.result||"",title:"Results"}),e.result&&p.jsxs(Ku,{sx:{position:"relative"},children:[p.jsx(v.Box,{sx:{paddingTop:"24px"},children:p.jsx(ys,{result:e.result,minHeight:300,maxHeight:1e3})}),p.jsx(v.Box,{sx:{position:"absolute",bottom:0,left:0,right:0,height:"40px",background:"linear-gradient(transparent, rgba(255, 255, 255, 0.9))",pointerEvents:"none",zIndex:1}}),p.jsxs(v.Stack,{sx:{position:"absolute",top:"8px",right:"8px",flexDirection:"row",gap:"8px",alignItems:"center",zIndex:2},children:[!t&&p.jsx(v.IconButton,{sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"32px",height:"32px"},onClick:D=>{D.stopPropagation(),s(!0)},children:p.jsx(Y0,{sx:{fontSize:"18px",color:"#666666"}})}),p.jsx(v.IconButton,{sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"32px",height:"32px"},onClick:()=>c(!0),children:p.jsx(Xo,{sx:{fontSize:"18px",color:"#666666"}})})]})]})]})}function X0({resourceUri:e}){const{apiClients:t}=Je.useServer(),{projectName:n,packageName:r,versionId:i,modelPath:o}=ct(e),{data:s,isSuccess:a,isError:l,error:u}=Qt({queryKey:[e],queryFn:async()=>(await t.notebooks.getNotebook(n,r,o,i)).data});return p.jsx(jT,{children:p.jsx(HT,{children:p.jsxs(v.Stack,{spacing:3,component:"section",children:[!a&&!l&&p.jsx(Kt,{text:"Fetching Notebook..."}),a&&s.notebookCells?.map((c,d)=>p.jsx(gk,{cell:c,index:d,resourceUri:e},d)),l&&u.status===404&&p.jsxs(v.Typography,{variant:"body2",sx:{color:"#666666"},children:[p.jsx("code",{children:`${n} > ${r} > ${o}`})," ","not found."]}),l&&u.status!==404&&p.jsx(sn,{error:u,context:`${n} > ${r} > ${o}`})]})})})}const bk=it(p.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),yi=ht.createStack({createStyledComponent:ce("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Ge({props:e,name:"MuiStack"})});class Pi{constructor(t,n){this.workbookData=n,this.workbookStorage=t,this.workbookData?this.isSaved=!0:(this.workbookData={models:[],cells:[],workbookPath:void 0},this.isSaved=!1)}isSaved;workbookStorage;getWorkbookData(){return this.workbookData}getWorkbookPath(){return this.workbookData.workbookPath}async renameWorkbook(t){if(this.workbookData.workbookPath.path!==t)try{await this.workbookStorage.moveWorkbook(this.workbookData.workbookPath,{path:t,workspace:this.workbookData.workbookPath.workspace})}catch{}return this.workbookData.workbookPath.path=t,this.isSaved=!1,await this.saveWorkbook()}getCells(){return this.workbookData.cells}deleteCell(t){return this.workbookData.cells=[...this.workbookData.cells.slice(0,t),...this.workbookData.cells.slice(t+1)],this.isSaved=!1,this}insertCell(t,n){return this.workbookData.cells=[...this.workbookData.cells.slice(0,t),n,...this.workbookData.cells.slice(t)],this.isSaved=!1,this}setCell(t,n){return this.workbookData.cells[t]=n,this.isSaved=!1,this}setModels(t){return this.workbookData.models=t,this.isSaved=!1,this}getModels(){return this.workbookData.models}updateWorkbookData(t){return this.workbookData=t,this.isSaved=!1,this}async saveWorkbook(){if(!this.isSaved){if(!this.workbookData.workbookPath)throw new Error("Workbook path is not set");await this.workbookStorage.saveWorkbook(this.workbookData.workbookPath,JSON.stringify(this.workbookData)),this.isSaved=!0}return new Pi(this.workbookStorage,this.workbookData)}toMalloyWorkbook(){return this.workbookData.cells.map(t=>t.isMarkdown?`>>>markdown
|
|
131
131
|
`+t.value:`>>>malloy
|
|
132
132
|
import {${t.sourceName}}" from '${t.modelPath}'"
|
|
133
133
|
`+t.value+`
|
package/dist/index.es.js
CHANGED
|
@@ -20428,49 +20428,33 @@ function Ug({
|
|
|
20428
20428
|
onChange: l,
|
|
20429
20429
|
onSourceChange: u
|
|
20430
20430
|
}) {
|
|
20431
|
-
return /* @__PURE__ */ L(
|
|
20432
|
-
|
|
20433
|
-
|
|
20434
|
-
|
|
20435
|
-
|
|
20436
|
-
|
|
20437
|
-
|
|
20438
|
-
|
|
20439
|
-
|
|
20440
|
-
|
|
20441
|
-
|
|
20442
|
-
|
|
20443
|
-
|
|
20444
|
-
}
|
|
20445
|
-
|
|
20446
|
-
|
|
20447
|
-
|
|
20448
|
-
|
|
20449
|
-
|
|
20450
|
-
|
|
20451
|
-
|
|
20452
|
-
|
|
20453
|
-
|
|
20454
|
-
|
|
20455
|
-
|
|
20456
|
-
|
|
20457
|
-
|
|
20458
|
-
}
|
|
20459
|
-
),
|
|
20460
|
-
/* @__PURE__ */ h(pr, { children: o ? /* @__PURE__ */ h(
|
|
20461
|
-
$g,
|
|
20462
|
-
{
|
|
20463
|
-
resourceUri: n,
|
|
20464
|
-
data: r,
|
|
20465
|
-
existingQuery: a,
|
|
20466
|
-
initialSelectedSourceIndex: s,
|
|
20467
|
-
onChange: l,
|
|
20468
|
-
onSourceChange: u
|
|
20469
|
-
}
|
|
20470
|
-
) : /* @__PURE__ */ h("div", { children: "No valid import statement found in cell" }) })
|
|
20471
|
-
]
|
|
20472
|
-
}
|
|
20473
|
-
);
|
|
20431
|
+
return /* @__PURE__ */ L(cr, { open: e, onClose: t, fullScreen: !0, children: [
|
|
20432
|
+
/* @__PURE__ */ L(
|
|
20433
|
+
dr,
|
|
20434
|
+
{
|
|
20435
|
+
sx: {
|
|
20436
|
+
display: "flex",
|
|
20437
|
+
justifyContent: "space-between",
|
|
20438
|
+
alignItems: "center"
|
|
20439
|
+
},
|
|
20440
|
+
children: [
|
|
20441
|
+
i,
|
|
20442
|
+
/* @__PURE__ */ h(yt, { onClick: t, sx: { color: "#666666" }, children: /* @__PURE__ */ h(Jr, {}) })
|
|
20443
|
+
]
|
|
20444
|
+
}
|
|
20445
|
+
),
|
|
20446
|
+
/* @__PURE__ */ h(pr, { children: o ? /* @__PURE__ */ h(
|
|
20447
|
+
$g,
|
|
20448
|
+
{
|
|
20449
|
+
resourceUri: n,
|
|
20450
|
+
data: r,
|
|
20451
|
+
existingQuery: a,
|
|
20452
|
+
initialSelectedSourceIndex: s,
|
|
20453
|
+
onChange: l,
|
|
20454
|
+
onSourceChange: u
|
|
20455
|
+
}
|
|
20456
|
+
) : /* @__PURE__ */ h("div", { children: "No valid import statement found in cell" }) })
|
|
20457
|
+
] });
|
|
20474
20458
|
}
|
|
20475
20459
|
function kM({ onChange: e, resourceUri: t }) {
|
|
20476
20460
|
const { modelPath: n } = gt(t), { data: r, isError: i, isLoading: o, error: a } = Hg(t), [s, l] = pe.useState(!1), [u, c] = pe.useState(), [d, f] = pe.useState(0), [p, g] = tt("");
|
package/package.json
CHANGED
|
@@ -31,19 +31,7 @@ export function ModelExplorerDialog({
|
|
|
31
31
|
onSourceChange,
|
|
32
32
|
}: ModelExplorerDialogProps) {
|
|
33
33
|
return (
|
|
34
|
-
<Dialog
|
|
35
|
-
open={open}
|
|
36
|
-
onClose={onClose}
|
|
37
|
-
maxWidth={false}
|
|
38
|
-
fullWidth
|
|
39
|
-
sx={{
|
|
40
|
-
"& .MuiDialog-paper": {
|
|
41
|
-
width: "95vw",
|
|
42
|
-
height: "95vh",
|
|
43
|
-
maxWidth: "none",
|
|
44
|
-
},
|
|
45
|
-
}}
|
|
46
|
-
>
|
|
34
|
+
<Dialog open={open} onClose={onClose} fullScreen>
|
|
47
35
|
<DialogTitle
|
|
48
36
|
sx={{
|
|
49
37
|
display: "flex",
|