@vived/sandbox 1.9.2 → 1.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs
CHANGED
|
@@ -359,7 +359,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
359
359
|
`));let Fe;if(R){if(!Array.isArray(W))throw new Error(process.env.NODE_ENV!=="production"?"MUI: The `value` prop must be an array when using the `Select` component with `multiple`.":Hi(2));Fe=W.some(qe=>VA(qe,Oe.props.value)),Fe&&ue&&le.push(Oe.props.children)}else Fe=VA(W,Oe.props.value),Fe&&ue&&(X=Oe.props.children);return Fe&&(Ne=!0),w.cloneElement(Oe,{"aria-selected":Fe?"true":"false",onClick:Ge(Oe),onKeyUp:qe=>{qe.key===" "&&qe.preventDefault(),Oe.props.onKeyUp&&Oe.props.onKeyUp(qe)},role:"option",selected:Fe,value:void 0,"data-value":Oe.props.value})});process.env.NODE_ENV!=="production"&&w.useEffect(()=>{if(!Ne&&!R&&W!==""){const Oe=et.map(Fe=>Fe.props.value);console.warn([`MUI: You have provided an out-of-range value \`${W}\` for the select ${I?`(name="${I}") `:""}component.`,"Consider providing a value that matches one of the available options or ''.",`The available values are ${Oe.filter(Fe=>Fe!=null).map(Fe=>`\`${Fe}\``).join(", ")||'""'}.`].join(`
|
|
360
360
|
`))}},[Ne,et,R,I,W]),ue&&(R?le.length===0?pt=null:pt=le.reduce((Oe,Fe,qe)=>(Oe.push(Fe),qe<le.length-1&&Oe.push(", "),Oe),[]):pt=X);let Ve=te;!o&&oe&&ee&&(Ve=ge.clientWidth);let Ae;typeof G<"u"?Ae=G:Ae=h?null:0;const Ce=$.id||(I?`mui-component-select-${I}`:void 0),nt={...t,variant:ce,value:W,open:Te,error:l},on=oZ(nt),it=typeof((Jt=C.slotProps)==null?void 0:Jt.paper)=="function"?C.slotProps.paper(nt):(tt=C.slotProps)==null?void 0:tt.paper,Wt=typeof((qt=C.slotProps)==null?void 0:qt.list)=="function"?C.slotProps.list(nt):(Yn=C.slotProps)==null?void 0:Yn.list,It=Bi(),an=Bi();return S.jsxs(w.Fragment,{children:[S.jsx(rZ,{as:"div",ref:Le,tabIndex:Ae,role:"combobox","aria-controls":Te?It:void 0,"aria-disabled":h?"true":void 0,"aria-expanded":Te?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[A,Ce].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":M?"true":void 0,"aria-invalid":l?"true":void 0,onKeyDown:ot,onMouseDown:h||_?null:Ee,onBlur:Gt,onFocus:D,...$,ownerState:nt,className:Ie($.className,on.select,c),id:Ce,children:MX(pt)?YA||(YA=S.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):pt}),S.jsx(sZ,{"aria-invalid":l,value:Array.isArray(W)?W.join(","):W,name:I,ref:re,"aria-hidden":!0,onChange:st,tabIndex:-1,disabled:h,className:on.nativeInput,autoFocus:s,required:M,...O,id:O.id??an,ownerState:nt}),S.jsx(iZ,{as:E,className:on.icon,ownerState:nt}),S.jsx(PX,{value:V,children:S.jsx(Qd,{id:`menu-${I||""}`,anchorEl:ge,open:Te,onClose:xe,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...C,slotProps:{...C.slotProps,list:{"aria-labelledby":A,role:"listbox","aria-multiselectable":R?"true":void 0,disableListWrap:!0,id:It,...Wt},paper:{...it,style:{minWidth:Ve,...it==null?void 0:it.style}}},children:Re})})]})});process.env.NODE_ENV!=="production"&&(_I.propTypes={"aria-describedby":d.string,"aria-label":d.string,autoFocus:d.bool,autoWidth:d.bool,children:d.node,classes:d.object,className:d.string,defaultOpen:d.bool,defaultValue:d.any,disabled:d.bool,displayEmpty:d.bool,error:d.bool,IconComponent:d.elementType.isRequired,inputRef:qr,labelId:d.string,MenuProps:d.object,multiple:d.bool,name:d.string,onBlur:d.func,onChange:d.func,onClose:d.func,onFocus:d.func,onOpen:d.func,open:d.bool,readOnly:d.bool,renderValue:d.func,required:d.bool,SelectDisplayProps:d.object,tabIndex:d.oneOfType([d.number,d.string]),type:d.any,value:d.any,variant:d.oneOf(["standard","outlined","filled"])});const aZ=En(S.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),lZ=e=>{const{classes:t}=e,r=$e({root:["root"]},CI,t);return{...t,...r}},j9={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>kn(e)&&e!=="variant"},cZ=he(Kd,j9)(""),uZ=he(Xd,j9)(""),dZ=he(Yd,j9)(""),G9=w.forwardRef(function(t,n){const r=ze({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:s,classes:o={},className:a,defaultOpen:c=!1,displayEmpty:u=!1,IconComponent:f=aZ,id:h,input:y,inputProps:l,label:E,labelId:T,MenuProps:A,multiple:C=!1,native:R=!1,onClose:I,onOpen:v,open:N,renderValue:x,SelectDisplayProps:D,variant:H="outlined",...j}=r,L=R?AI:_I,U=mi(),_=Es({props:r,muiFormControl:U,states:["variant","error"]}),F=_.variant||H,M={...r,variant:F,classes:o},$=lZ(M),{root:G,...z}=$,K=y||{standard:S.jsx(cZ,{ownerState:M}),outlined:S.jsx(uZ,{label:E,ownerState:M}),filled:S.jsx(dZ,{ownerState:M})}[F],ce=gn(n,jc(K));return S.jsx(w.Fragment,{children:w.cloneElement(K,{inputComponent:L,inputProps:{children:s,error:_.error,IconComponent:f,variant:F,type:void 0,multiple:C,...R?{id:h}:{autoWidth:i,defaultOpen:c,displayEmpty:u,labelId:T,MenuProps:A,onClose:I,onOpen:v,open:N,renderValue:x,SelectDisplayProps:{id:h,...D}},...l,classes:l?wn(z,l.classes):z,...y?y.props.inputProps:{}},...(C&&R||u)&&F==="outlined"?{notched:!0}:{},ref:ce,className:Ie(K.props.className,a,$.root),...!y&&{variant:F},...j})})});process.env.NODE_ENV!=="production"&&(G9.propTypes={autoWidth:d.bool,children:d.node,classes:d.object,className:d.string,defaultOpen:d.bool,defaultValue:d.any,displayEmpty:d.bool,IconComponent:d.elementType,id:d.string,input:d.element,inputProps:d.object,label:d.node,labelId:d.string,MenuProps:d.object,multiple:d.bool,native:d.bool,onChange:d.func,onClose:d.func,onOpen:d.func,open:d.bool,renderValue:d.func,SelectDisplayProps:d.object,sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object]),value:d.oneOfType([d.oneOf([""]),d.any]),variant:d.oneOf(["filled","outlined","standard"])});G9.muiName="Select";function pZ(e){return Be("MuiTextField",e)}He("MuiTextField",["root"]);const fZ={standard:Kd,filled:Yd,outlined:Xd},hZ=e=>{const{classes:t}=e;return $e({root:["root"]},pZ,t)},mZ=he(P9,{name:"MuiTextField",slot:"Root"})({}),ds=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiTextField"}),{autoComplete:i,autoFocus:s=!1,children:o,className:a,color:c="primary",defaultValue:u,disabled:f=!1,error:h=!1,fullWidth:y=!1,helperText:l,id:E,inputRef:T,label:A,maxRows:C,minRows:R,multiline:I=!1,name:v,onBlur:N,onChange:x,onFocus:D,placeholder:H,required:j=!1,rows:L,select:U=!1,slots:_={},slotProps:F={},type:M,value:$,variant:G="outlined",...z}=r,K={...r,autoFocus:s,color:c,disabled:f,error:h,fullWidth:y,multiline:I,required:j,select:U,variant:G},ce=hZ(K);process.env.NODE_ENV!=="production"&&U&&!o&&console.error("MUI: `children` must be passed when using the `TextField` component with `select`.");const O=Bi(E),W=l&&O?`${O}-helper-text`:void 0,se=A&&O?`${O}-label`:void 0,B=fZ[G],ae={slots:_,slotProps:F},[re,Z]=We("select",{elementType:G9,externalForwardedProps:ae,ownerState:K}),ee=U&&Z.native,J={},oe=ae.slotProps.inputLabel;G==="outlined"&&(oe&&typeof oe.shrink<"u"&&(J.notched=oe.shrink),J.label=A),U&&(ee||(J.id=void 0),J["aria-describedby"]=void 0);const[te,be]=We("root",{elementType:mZ,shouldForwardComponentProp:!0,externalForwardedProps:{...ae,...z},ownerState:K,className:Ie(ce.root,a),ref:n,additionalProps:{disabled:f,error:h,fullWidth:y,required:j,color:c,variant:G}}),[V,ve]=We("input",{elementType:B,externalForwardedProps:ae,additionalProps:J,ownerState:K}),[Q,Le]=We("inputLabel",{elementType:nI,externalForwardedProps:ae,ownerState:K}),[ge,Te]=We("htmlInput",{elementType:"input",externalForwardedProps:ae,ownerState:K}),[ie,Ee]=We("formHelperText",{elementType:rI,externalForwardedProps:ae,ownerState:K}),xe=S.jsx(V,{"aria-describedby":W,autoComplete:i,autoFocus:s,defaultValue:u,fullWidth:y,multiline:I,name:v,rows:L,maxRows:C,minRows:R,type:M,value:$,id:O,inputRef:T,onBlur:N,onChange:x,onFocus:D,placeholder:H,inputProps:Te,slots:{input:_.htmlInput?ge:void 0},...ve});return S.jsxs(te,{...be,children:[A!=null&&A!==""&&S.jsx(Q,{htmlFor:U&&!ee?void 0:O,id:se,...U&&!ee&&{component:"div"},...Le,children:A}),U?S.jsx(re,{"aria-describedby":W,id:O,labelId:se,value:$,input:xe,...Z,children:o}):xe,l&&S.jsx(ie,{id:W,...Ee,children:l})]})});process.env.NODE_ENV!=="production"&&(ds.propTypes={autoComplete:d.string,autoFocus:d.bool,children:d.node,classes:d.object,className:d.string,color:d.oneOfType([d.oneOf(["primary","secondary","error","info","success","warning"]),d.string]),defaultValue:d.any,disabled:d.bool,error:d.bool,fullWidth:d.bool,helperText:d.node,id:d.string,inputRef:qr,label:d.node,margin:d.oneOf(["dense","none","normal"]),maxRows:d.oneOfType([d.number,d.string]),minRows:d.oneOfType([d.number,d.string]),multiline:d.bool,name:d.string,onBlur:d.func,onChange:d.func,onFocus:d.func,placeholder:d.string,required:d.bool,rows:d.oneOfType([d.number,d.string]),select:d.bool,size:d.oneOfType([d.oneOf(["medium","small"]),d.string]),slotProps:d.shape({formHelperText:d.oneOfType([d.func,d.object]),htmlInput:d.oneOfType([d.func,d.object]),input:d.oneOfType([d.func,d.object]),inputLabel:d.oneOfType([d.func,d.object]),select:d.oneOfType([d.func,d.object])}),slots:d.shape({formHelperText:d.elementType,htmlInput:d.elementType,input:d.elementType,inputLabel:d.elementType,root:d.elementType,select:d.elementType}),sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object]),type:d.string,value:d.any,variant:d.oneOf(["filled","outlined","standard"])});const gZ=e=>{const{initialArchived:t,cancel:n,initialDescription:r,initialName:i,submit:s}=e,[o,a]=Y.useState(""),[c,u]=Y.useState(""),[f,h]=Y.useState(!1),[y,l]=Y.useState(!0),[E,T]=Y.useState(!0);Y.useEffect(()=>{y&&(l(!1),a(i),u(r),h(t))},[y,i,r,t]),Y.useEffect(()=>{T(o===i&&c===r&&f===t)},[o,c,f,t,i,r]);const A=C=>{C.preventDefault(),s(o,c,f)};return S.jsx("form",{onSubmit:A,children:S.jsxs(Tr,{spacing:4,sx:{mt:2,maxWidth:480,alignItems:"flex-start"},children:[S.jsx(ds,{label:"Name",size:"small",fullWidth:!0,value:o,onChange:C=>a(C.target.value)}),S.jsx(ds,{label:"Description",size:"small",fullWidth:!0,value:c,onChange:C=>u(C.target.value)}),S.jsx(us,{label:"Archived",control:S.jsx(zo,{checked:f,onChange:C=>h(C.target.checked)})}),S.jsxs(Tr,{direction:"row",spacing:2,children:[S.jsx(At,{variant:"contained",type:"submit",disabled:E,children:"Save"}),S.jsx(At,{variant:"outlined",type:"button",onClick:n,children:"Cancel"})]})]})})},EZ=()=>{const e=St(L4),t=Y.useContext(_t),[n,r]=Y.useState(),i=e!=null&&e.filename?`.${e.filename.split(".").slice(-1)[0]}`:"";function s(){n&&e&&V3(n,e.id,t)}const o=a=>{if(!a.target.files)return;const c=a.target.files[0];r(c)};return S.jsxs(Tr,{direction:"row",spacing:2,sx:{alignItems:"center"},children:[S.jsxs(At,{variant:"outlined",component:"label",size:"small",children:[n?n.name:`Choose ${i||"file"}…`,S.jsx("input",{type:"file",id:"assetFile",accept:i,hidden:!0,onChange:o})]}),S.jsx(At,{variant:"contained",size:"small",disabled:n===void 0,onClick:s,children:"Update Asset File"})]})};function bZ({theme:e,...t}){const n=oi in e?e[oi]:void 0;return S.jsx(Oc,{...t,themeId:n?oi:void 0,theme:n||e})}const Hu={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"};process.env.NODE_ENV!=="production"&&(d.string,d.string,d.string,d.string,d.string,d.oneOf(["dark","light","system"]),d.string,d.string);const{CssVarsProvider:TZ}=dP({themeId:oi,theme:()=>ld({cssVariables:!0}),colorSchemeStorageKey:Hu.colorSchemeStorageKey,modeStorageKey:Hu.modeStorageKey,defaultColorScheme:{light:Hu.defaultLightColorScheme,dark:Hu.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:k2(e.palette,e.typography)};return t.unstable_sx=function(r){return Ro({sx:r,theme:this})},t}}),yZ=TZ;function SZ({theme:e,...t}){const n=w.useMemo(()=>{if(typeof e=="function")return e;const r=oi in e?e[oi]:e;return"colorSchemes"in r?null:"vars"in r?e:{...e,vars:null}},[e]);return n?S.jsx(bZ,{theme:n,...t}):S.jsx(yZ,{theme:e,...t})}const AZ=He("MuiBox",["root"]),CZ=ld(),Or=MM({themeId:oi,defaultTheme:CZ,defaultClassName:AZ.root,generateClassName:b2.generate});process.env.NODE_ENV!=="production"&&(Or.propTypes={children:d.node,component:d.elementType,sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object])});function _Z(e){return Be("MuiDivider",e)}const XA=He("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","vertical","withChildren","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),IZ=e=>{const{absolute:t,children:n,classes:r,flexItem:i,orientation:s,textAlign:o,variant:a}=e;return $e({root:["root",t&&"absolute",a,s==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",o==="right"&&s!=="vertical"&&"textAlignRight",o==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},_Z,r)},NZ=he("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(Xe(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),RZ=he("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(Xe(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),Fc=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiDivider"}),{absolute:i=!1,children:s,className:o,orientation:a="horizontal",component:c=s||a==="vertical"?"div":"hr",flexItem:u=!1,role:f=c!=="hr"?"separator":void 0,textAlign:h="center",variant:y="fullWidth",...l}=r,E={...r,absolute:i,component:c,flexItem:u,orientation:a,role:f,textAlign:h,variant:y},T=IZ(E);return S.jsx(NZ,{as:c,className:Ie(T.root,o),role:f,ref:n,ownerState:E,"aria-orientation":f==="separator"&&(c!=="hr"||a==="vertical")?a:void 0,...l,children:s?S.jsx(RZ,{className:T.wrapper,ownerState:E,children:s}):null})});process.env.NODE_ENV!=="production"&&(Fc.propTypes={absolute:d.bool,children:d.node,classes:d.object,className:d.string,component:d.elementType,flexItem:d.bool,orientation:d.oneOf(["horizontal","vertical"]),role:d.string,sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object]),textAlign:d.oneOf(["center","left","right"]),variant:d.oneOfType([d.oneOf(["fullWidth","inset","middle"]),d.string])});const vZ=()=>{const e=Y.useContext(_t),t=St(L4),n=()=>Ym(Ut.MOUNTED,e),r=(i,s,o)=>{t&&j3({archived:o,description:s,name:i},t.id,e)};return t?S.jsxs(Or,{sx:{padding:"1.5rem 1.75rem 2rem",maxWidth:640},children:[S.jsx(lr,{variant:"h5",component:"h1",children:"Edit Asset"}),S.jsx(lr,{variant:"body2",color:"text.secondary",sx:{fontFamily:"monospace",mb:4},children:t.id}),S.jsxs(Tr,{spacing:4,sx:{alignItems:"flex-start"},children:[S.jsx(CY,{assetID:t.id}),S.jsx(EZ,{})]}),S.jsx(Fc,{sx:{my:6}}),S.jsx(gZ,{initialArchived:t.archived,initialDescription:t.description,initialName:t.name,cancel:n,submit:r}),S.jsx(Fc,{sx:{my:6}}),S.jsx(AY,{assetID:t.id})]}):S.jsxs(Or,{sx:{padding:"1.5rem 1.75rem 2rem",maxWidth:640},children:[S.jsx(lr,{variant:"h5",component:"h1",gutterBottom:!0,children:"No asset is selected"}),S.jsx(At,{"data-testid":"no-asset-ok",variant:"contained",onClick:n,children:"OK"})]})},xZ=()=>S.jsxs("div",{children:[S.jsx("h1",{children:"App has thrown a Fatal Error"}),S.jsx("p",{children:"Check the console for details"})]}),OZ=()=>S.jsxs("div",{children:[S.jsx("h1",{children:"App loading..."}),S.jsx("p",{children:"Hint, if you are stuck here, your App is not dispatching App Is Ready"})]}),wZ=()=>{const e=Y.useContext(_t);return S.jsxs(Tr,{direction:"row",spacing:2,sx:{my:2,alignItems:"center"},children:[S.jsx(At,{variant:"contained",size:"small",onClick:()=>C7(e),children:"Copy Persistent States"}),S.jsx("label",{children:" Paste into the persistent states file in src/Data "})]})},uu=w.createContext();process.env.NODE_ENV!=="production"&&(uu.displayName="Tablelvl2Context");function DZ(e){return Be("MuiTableRow",e)}const ZA=He("MuiTableRow",["root","selected","hover","head","footer"]),kZ=e=>{const{classes:t,selected:n,hover:r,head:i,footer:s}=e;return $e({root:["root",n&&"selected",r&&"hover",i&&"head",s&&"footer"]},DZ,t)},LZ=he("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(Xe(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${ZA.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${ZA.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)}}}))),QA="tr",Qa=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiTableRow"}),{className:i,component:s=QA,hover:o=!1,selected:a=!1,...c}=r,u=w.useContext(uu),f={...r,component:s,hover:o,selected:a,head:u&&u.variant==="head",footer:u&&u.variant==="footer"},h=kZ(f);return S.jsx(LZ,{as:s,ref:n,className:Ie(h.root,i),role:s===QA?null:"row",ownerState:f,...c})});process.env.NODE_ENV!=="production"&&(Qa.propTypes={children:d.node,classes:d.object,className:d.string,component:d.elementType,hover:d.bool,selected:d.bool,sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object])});const z9=w.createContext();process.env.NODE_ENV!=="production"&&(z9.displayName="TableContext");function MZ(e){return Be("MuiTableCell",e)}const PZ=He("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),FZ=e=>{const{classes:t,variant:n,align:r,padding:i,size:s,stickyHeader:o}=e,a={root:["root",n,o&&"stickyHeader",r!=="inherit"&&`align${De(r)}`,i!=="normal"&&`padding${De(i)}`,`size${De(s)}`]};return $e(a,MZ,t)},UZ=he("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${De(n.size)}`],n.padding!=="normal"&&t[`padding${De(n.padding)}`],n.align!=="inherit"&&t[`align${De(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(Xe(({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid
|
|
361
361
|
${e.palette.mode==="light"?e.lighten(e.alpha(e.palette.divider,1),.88):e.darken(e.alpha(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${PZ.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:t})=>t.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]}))),Bn=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiTableCell"}),{align:i="inherit",className:s,component:o,padding:a,scope:c,size:u,sortDirection:f,variant:h,...y}=r,l=w.useContext(z9),E=w.useContext(uu),T=E&&E.variant==="head";let A;o?A=o:A=T?"th":"td";let C=c;A==="td"?C=void 0:!C&&T&&(C="col");const R=h||E&&E.variant,I={...r,align:i,component:A,padding:a||(l&&l.padding?l.padding:"normal"),size:u||(l&&l.size?l.size:"medium"),sortDirection:f,stickyHeader:R==="head"&&l&&l.stickyHeader,variant:R},v=FZ(I);let N=null;return f&&(N=f==="asc"?"ascending":"descending"),S.jsx(UZ,{as:A,ref:n,className:Ie(v.root,s),"aria-sort":N,scope:C,ownerState:I,...y})});process.env.NODE_ENV!=="production"&&(Bn.propTypes={align:d.oneOf(["center","inherit","justify","left","right"]),children:d.node,classes:d.object,className:d.string,component:d.elementType,padding:d.oneOf(["checkbox","none","normal"]),scope:d.string,size:d.oneOfType([d.oneOf(["medium","small"]),d.string]),sortDirection:d.oneOf(["asc","desc",!1]),sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object]),variant:d.oneOfType([d.oneOf(["body","footer","head"]),d.string])});function BZ(e){return Be("MuiIconButton",e)}const JA=He("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),HZ=e=>{const{classes:t,disabled:n,color:r,edge:i,size:s,loading:o}=e,a={root:["root",o&&"loading",n&&"disabled",r!=="default"&&`color${De(r)}`,i&&`edge${De(i)}`,`size${De(s)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return $e(a,BZ,t)},$Z=he(ji,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${De(n.color)}`],n.edge&&t[`edge${De(n.edge)}`],t[`size${De(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(hn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(hn()).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)}}],[`&.${JA.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${JA.loading}`]:{color:"transparent"}}))),jZ=he("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"}}]})),Ri=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiIconButton"}),{edge:i=!1,children:s,className:o,color:a="default",disabled:c=!1,disableFocusRipple:u=!1,size:f="medium",id:h,loading:y=null,loadingIndicator:l,...E}=r,T=Bi(h),A=l??S.jsx(ud,{"aria-labelledby":T,color:"inherit",size:16}),C={...r,edge:i,color:a,disabled:c,disableFocusRipple:u,loading:y,loadingIndicator:A,size:f},R=HZ(C);return S.jsxs($Z,{id:y?T:h,className:Ie(R.root,o),centerRipple:!0,internalNativeButton:!0,focusRipple:!u,disabled:c||y,ref:n,...E,ownerState:C,children:[typeof y=="boolean"&&S.jsx("span",{className:R.loadingWrapper,style:{display:"contents"},children:S.jsx(jZ,{className:R.loadingIndicator,ownerState:C,children:y&&A})}),s]})});process.env.NODE_ENV!=="production"&&(Ri.propTypes={children:Lo(d.node,e=>w.Children.toArray(e.children).some(n=>w.isValidElement(n)&&n.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
|
|
362
|
-
`)):null),classes:d.object,className:d.string,color:d.oneOfType([d.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),d.string]),disabled:d.bool,disableFocusRipple:d.bool,disableRipple:d.bool,edge:d.oneOf(["end","start",!1]),id:d.string,loading:d.bool,loadingIndicator:d.node,size:d.oneOfType([d.oneOf(["small","medium","large"]),d.string]),sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object])});function GZ(e){return Be("MuiListItemText",e)}const aa=He("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),zZ=e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:s}=e;return $e({root:["root",n&&"inset",s&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},GZ,t)},VZ=he("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${aa.primary}`]:t.primary},{[`& .${aa.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${gy.root}:where(& .${aa.primary})`]:{display:"block"},[`.${gy.root}:where(& .${aa.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),fa=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiListItemText"}),{children:i,className:s,disableTypography:o=!1,inset:a=!1,primary:c,secondary:u,slots:f={},slotProps:h={},...y}=r,{dense:l}=w.useContext(Pc);let E=c??i,T=u;const A={...r,disableTypography:o,inset:a,primary:!!E,secondary:!!T,dense:l},C=zZ(A),R={slots:f,slotProps:h},[I,v]=We("root",{className:Ie(C.root,s),elementType:VZ,externalForwardedProps:{...R,...y},ownerState:A,ref:n}),[N,x]=We("primary",{className:C.primary,elementType:lr,externalForwardedProps:R,ownerState:A}),[D,H]=We("secondary",{className:C.secondary,elementType:lr,externalForwardedProps:R,ownerState:A});return E!=null&&E.type!==lr&&!o&&(E=S.jsx(N,{variant:l?"body2":"body1",component:x!=null&&x.variant?void 0:"span",...x,children:E})),T!=null&&T.type!==lr&&!o&&(T=S.jsx(D,{variant:"body2",color:"textSecondary",...H,children:T})),S.jsxs(I,{...v,children:[E,T]})});process.env.NODE_ENV!=="production"&&(fa.propTypes={children:d.node,classes:d.object,className:d.string,disableTypography:d.bool,inset:d.bool,primary:d.node,secondary:d.node,slotProps:d.shape({primary:d.oneOfType([d.func,d.object]),root:d.oneOfType([d.func,d.object]),secondary:d.oneOfType([d.func,d.object])}),slots:d.shape({primary:d.elementType,root:d.elementType,secondary:d.elementType}),sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object])});const eC=He("MuiListItemIcon",["root","alignItemsFlexStart"]);function WZ(e){return Be("MuiMenuItem",e)}const zl=He("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),qZ=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},KZ=e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:s,classes:o}=e,c=$e({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",s&&"selected"]},WZ,o);return{...o,...c}},YZ=he(ji,{shouldForwardProp:e=>kn(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:qZ})(Xe(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${zl.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${zl.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${zl.selected}:hover`]:{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.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${zl.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${zl.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${XA.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${XA.inset}`]:{marginLeft:52},[`& .${aa.root}`]:{marginTop:0,marginBottom:0},[`& .${aa.inset}`]:{paddingLeft:36},[`& .${eC.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${eC.root} svg`]:{fontSize:"1.25rem"}}}]}))),ha=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:s="li",dense:o=!1,divider:a=!1,disableGutters:c=!1,focusVisibleClassName:u,role:f="menuitem",tabIndex:h,className:y,...l}=r,E=mI(),T=w.useContext(Pc),A=w.useMemo(()=>({dense:o||T.dense||!1,disableGutters:c}),[T.dense,o,c]),C=FX(),R=Bi(),I=C.suppressInitialFocusVisible,v=C.itemsFocusableWhenDisabled,N=w.useRef(null);Er(()=>{i&&(N.current?fI(N.current,E):process.env.NODE_ENV!=="production"&&console.error("MUI: Unable to set focus to a MenuItem whose component has not been rendered."))},[i]);const x={...r,dense:A.dense,divider:a,disableGutters:c},D=KZ(r),H=aI({id:R,ref:n,disabled:r.disabled,focusableWhenDisabled:v,selected:r.selected}),j=gn(N,H.ref);let L;return h!==void 0?L=h:C.variant==="selectedMenu"?L=H.tabIndex:(!r.disabled||v)&&(L=-1),S.jsx(Pc.Provider,{value:A,children:S.jsx(YZ,{ref:j,role:f,tabIndex:L,component:s,internalNativeButton:!1,focusableWhenDisabled:v,suppressFocusVisible:I,focusVisibleClassName:Ie(D.focusVisible,u),className:Ie(D.root,y),...l,ownerState:x,classes:D})})});process.env.NODE_ENV!=="production"&&(ha.propTypes={autoFocus:d.bool,children:d.node,classes:d.object,className:d.string,component:d.elementType,dense:d.bool,disabled:d.bool,disableGutters:d.bool,divider:d.bool,focusVisibleClassName:d.string,role:d.string,selected:d.bool,sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object]),tabIndex:d.number});const II=En(S.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),NI=En(S.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert"),tC=({id:e,section:t,query:n})=>{const r=Y.useContext(_t),[i,s]=Y.useState(null),{id:o,name:a,description:c,archived:u}=sl(e,Px);if(!(u?t==="archived":t==="active"))return null;const h=n.trim().toLowerCase();if(h&&!a.toLowerCase().includes(h)&&!c.toLowerCase().includes(h))return null;const y=!!i,l=()=>s(null),E=t==="active"?[S.jsx(ha,{"data-testid":"edit-asset",onClick:()=>{D3(e,r),l()},children:S.jsx(fa,{children:"Edit"})},"edit"),S.jsx(ha,{"data-testid":"archive-asset",onClick:()=>{d5(e,!0,r),l()},children:S.jsx(fa,{children:"Archive"})},"archive")]:[S.jsx(ha,{"data-testid":"unarchive-asset",onClick:()=>{d5(e,!1,r),l()},children:S.jsx(fa,{children:"Unarchive"})},"unarchive")];return S.jsxs(Qa,{hover:!0,"data-asset-row":!0,children:[S.jsx(Bn,{"data-testid":"asset-name",children:a}),S.jsx(Bn,{"data-testid":"asset-description",children:c}),S.jsxs(Bn,{children:[S.jsx("span",{"data-testid":"asset-id",style:{fontFamily:"monospace"},children:o}),S.jsx(Ri,{"data-testid":"copy-asset-id",size:"small",title:"Copy id",onClick:()=>{var T;return(T=navigator.clipboard)==null?void 0:T.writeText(o)},children:S.jsx(II,{fontSize:"small"})})]}),S.jsxs(Bn,{align:"right",padding:"none",children:[S.jsx(Ri,{"data-testid":"asset-menu",size:"small","aria-label":`Actions for ${a}`,"aria-haspopup":"true","aria-expanded":y,onClick:T=>s(T.currentTarget),children:S.jsx(NI,{fontSize:"small"})}),S.jsx(Qd,{anchorEl:i,open:y,onClose:l,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:E})]})]})};function XZ(e){return Be("MuiCollapse",e)}He("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const ZZ=e=>{const{orientation:t,classes:n}=e;return $e({root:["root",t],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",t],wrapperInner:["wrapperInner",t]},XZ,n)},QZ=he("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(Xe(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),JZ=he("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),eQ=he("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),w1=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiCollapse"}),{addEndListener:i,children:s,className:o,collapsedSize:a="0px",component:c,easing:u,in:f,onEnter:h,onEntered:y,onEntering:l,onExit:E,onExited:T,onExiting:A,orientation:C="vertical",slots:R={},slotProps:I={},style:v,timeout:N=L2.standard,TransitionComponent:x=Wr,...D}=r,H={...r,orientation:C,collapsedSize:a},j=ZZ(H),L=Mo(),U=Og(),_=w.useRef(null),F=w.useRef(),M=typeof a=="number"?`${a}px`:a,$=C==="horizontal",G=$?"width":"height",z=w.useRef(null),K=gn(n,z),ce=()=>_.current?_.current[$?"clientWidth":"clientHeight"]:0,O=In(z,(Q,Le)=>{_.current&&$&&(_.current.style.position="absolute"),Q.style[G]=M,h&&h(Q,Le)}),W=In(z,(Q,Le)=>{const ge=ce();_.current&&$&&(_.current.style.position="");const{duration:Te,easing:ie}=Xa({style:v,timeout:N,easing:u},{mode:"enter"});if(N==="auto"){const Ee=L.transitions.getAutoHeightDuration(ge);Q.style.transitionDuration=`${Ee}ms`,F.current=Ee}else Q.style.transitionDuration=typeof Te=="string"?Te:`${Te}ms`;Q.style[G]=`${ge}px`,Q.style.transitionTimingFunction=ie,l&&l(Q,Le)}),se=In(z,(Q,Le)=>{Q.style[G]="auto",y&&y(Q,Le)}),B=In(z,Q=>{Q.style[G]=`${ce()}px`,E&&E(Q)}),ae=In(z,T),re=In(z,Q=>{const Le=ce(),{duration:ge,easing:Te}=Xa({style:v,timeout:N,easing:u},{mode:"exit"});if(N==="auto"){const ie=L.transitions.getAutoHeightDuration(Le);Q.style.transitionDuration=`${ie}ms`,F.current=ie}else Q.style.transitionDuration=typeof ge=="string"?ge:`${ge}ms`;Q.style[G]=M,Q.style.transitionTimingFunction=Te,A&&A(Q)}),Z=Q=>{N==="auto"&&U.start(F.current||0,Q),i&&i(z.current,Q)},ee={slots:R,slotProps:I,component:c},[J,oe]=We("root",{ref:K,className:Ie(j.root,o),elementType:QZ,externalForwardedProps:ee,ownerState:H,additionalProps:{style:{[$?"minWidth":"minHeight"]:M,...v}}}),[te,be]=We("wrapper",{ref:_,className:j.wrapper,elementType:JZ,externalForwardedProps:ee,ownerState:H}),[V,ve]=We("wrapperInner",{className:j.wrapperInner,elementType:eQ,externalForwardedProps:ee,ownerState:H});return S.jsx(x,{in:f,onEnter:O,onEntered:se,onEntering:W,onExit:B,onExited:ae,onExiting:re,addEndListener:Z,nodeRef:z,timeout:N==="auto"?null:N,...D,children:(Q,{ownerState:Le,...ge})=>{const Te={...H,state:Q};return S.jsx(J,{...oe,className:Ie(oe.className,{entered:j.entered,exited:!f&&M==="0px"&&j.hidden}[Q]),ownerState:Te,...ge,children:S.jsx(te,{...be,ownerState:Te,children:S.jsx(V,{...ve,ownerState:Te,children:s})})})}})});process.env.NODE_ENV!=="production"&&(w1.propTypes={addEndListener:d.func,children:d.node,classes:d.object,className:d.string,collapsedSize:d.oneOfType([d.number,d.string]),component:vg,easing:d.oneOfType([d.shape({enter:d.string,exit:d.string}),d.string]),in:d.bool,onEnter:d.func,onEntered:d.func,onEntering:d.func,onExit:d.func,onExited:d.func,onExiting:d.func,orientation:d.oneOf(["horizontal","vertical"]),slotProps:d.shape({root:d.oneOfType([d.func,d.object]),wrapper:d.oneOfType([d.func,d.object]),wrapperInner:d.oneOfType([d.func,d.object])}),slots:d.shape({root:d.elementType,wrapper:d.elementType,wrapperInner:d.elementType}),style:d.object,sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object]),timeout:d.oneOfType([d.oneOf(["auto"]),d.number,d.shape({appear:d.number,enter:d.number,exit:d.number})])});w1&&(w1.muiSupportAuto=!0);function tQ(e){return Be("MuiTable",e)}He("MuiTable",["root","stickyHeader"]);const nQ=e=>{const{classes:t,stickyHeader:n}=e;return $e({root:["root",n&&"stickyHeader"]},tQ,t)},rQ=he("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(Xe(({theme:e})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:t})=>t.stickyHeader,style:{borderCollapse:"separate"}}]}))),nC="table",D1=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiTable"}),{className:i,component:s=nC,padding:o="normal",size:a="medium",stickyHeader:c=!1,...u}=r,f={...r,component:s,padding:o,size:a,stickyHeader:c},h=nQ(f),y=w.useMemo(()=>({padding:o,size:a,stickyHeader:c}),[o,a,c]);return S.jsx(z9.Provider,{value:y,children:S.jsx(rQ,{as:s,role:s===nC?null:"table",ref:n,className:Ie(h.root,i),ownerState:f,...u})})});process.env.NODE_ENV!=="production"&&(D1.propTypes={children:d.node,classes:d.object,className:d.string,component:d.elementType,padding:d.oneOf(["checkbox","none","normal"]),size:d.oneOfType([d.oneOf(["medium","small"]),d.string]),stickyHeader:d.bool,sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object])});function iQ(e){return Be("MuiTableHead",e)}He("MuiTableHead",["root"]);const sQ=e=>{const{classes:t}=e;return $e({root:["root"]},iQ,t)},oQ=he("thead",{name:"MuiTableHead",slot:"Root"})({display:"table-header-group"}),aQ={variant:"head"},rC="thead",V9=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiTableHead"}),{className:i,component:s=rC,...o}=r,a={...r,component:s},c=sQ(a);return S.jsx(uu.Provider,{value:aQ,children:S.jsx(oQ,{as:s,className:Ie(c.root,i),ref:n,role:s===rC?null:"rowgroup",ownerState:a,...o})})});process.env.NODE_ENV!=="production"&&(V9.propTypes={children:d.node,classes:d.object,className:d.string,component:d.elementType,sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object])});function lQ(e){return Be("MuiTableBody",e)}He("MuiTableBody",["root"]);const cQ=e=>{const{classes:t}=e;return $e({root:["root"]},lQ,t)},uQ=he("tbody",{name:"MuiTableBody",slot:"Root"})({display:"table-row-group"}),dQ={variant:"body"},iC="tbody",k1=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiTableBody"}),{className:i,component:s=iC,...o}=r,a={...r,component:s},c=cQ(a);return S.jsx(uu.Provider,{value:dQ,children:S.jsx(uQ,{className:Ie(c.root,i),as:s,ref:n,role:s===iC?null:"rowgroup",ownerState:a,...o})})});process.env.NODE_ENV!=="production"&&(k1.propTypes={children:d.node,classes:d.object,className:d.string,component:d.elementType,sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object])});function pQ(e){return Be("MuiTableContainer",e)}He("MuiTableContainer",["root"]);const fQ=e=>{const{classes:t}=e;return $e({root:["root"]},pQ,t)},hQ=he("div",{name:"MuiTableContainer",slot:"Root"})({width:"100%",overflowX:"auto"}),L1=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiTableContainer"}),{className:i,component:s="div",...o}=r,a={...r,component:s},c=fQ(a);return S.jsx(hQ,{ref:n,as:s,className:Ie(c.root,i),ownerState:a,...o})});process.env.NODE_ENV!=="production"&&(L1.propTypes={children:d.node,classes:d.object,className:d.string,component:d.elementType,sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object])});const mQ=En(S.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Lm={"& tbody tr:nth-of-type(odd)":{backgroundColor:"action.hover"},"& td, & th":{borderColor:"divider"},"& thead th":{borderBottom:2,borderColor:"divider"}},gQ={"&:not(:has(tr[data-asset-row]))":{display:"none"}},EQ={display:"none","tbody:not(:has(tr[data-asset-row])) &":{display:"table-row"}},bQ=()=>{const e=Y.useContext(_t),t=St(k4),n=St(Gx),[r,i]=Y.useState(""),[s,o]=Y.useState(!1);return Y.useEffect(()=>{n||B3(e)},[n,e]),S.jsxs(S.Fragment,{children:[S.jsx("h2",{children:"App Assets:"}),S.jsxs(Tr,{direction:"row",spacing:2,sx:{my:2,alignItems:"center"},children:[S.jsx(At,{"data-testid":"add-app-asset",variant:"contained",size:"small",onClick:()=>Ym(Ut.NEW_APP_ASSET,e),children:"Add App Asset"}),S.jsx(ds,{"data-testid":"asset-search",size:"small",placeholder:"Filter assets…",value:r,onChange:a=>i(a.target.value)})]}),t.length===0?S.jsx("p",{"data-testid":"assets-empty",children:"App has no assets"}):S.jsxs(S.Fragment,{children:[S.jsx(L1,{component:$i,variant:"outlined",children:S.jsxs(D1,{size:"small",sx:Lm,children:[S.jsx(V9,{children:S.jsxs(Qa,{children:[S.jsx(Bn,{children:"Name"}),S.jsx(Bn,{children:"Description"}),S.jsx(Bn,{children:"Asset ID"}),S.jsx(Bn,{align:"right",children:"Actions"})]})}),S.jsxs(k1,{children:[t.map(a=>S.jsx(tC,{id:a,section:"active",query:r},a)),S.jsx(Qa,{"data-testid":"assets-no-match",sx:EQ,children:S.jsx(Bn,{colSpan:4,children:"No assets match this filter"})})]})]})}),S.jsxs(Or,{"data-testid":"archived-group",sx:gQ,children:[S.jsx(At,{"data-testid":"archived-toggle",size:"small",color:"inherit","aria-expanded":s,onClick:()=>o(!s),startIcon:S.jsx(mQ,{sx:{transform:s?"none":"rotate(-90deg)",transition:"transform 150ms"}}),sx:{mt:2},children:"Archived"}),S.jsx(w1,{in:s,children:S.jsx(L1,{component:$i,variant:"outlined",children:S.jsx(D1,{size:"small",sx:Lm,children:S.jsx(k1,{children:t.map(a=>S.jsx(tC,{id:a,section:"archived",query:r},"arch-"+a))})})})})]})]})]})},TQ=En(S.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"}),"Cancel");function yQ(e){return Be("MuiChip",e)}const Mt=He("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","deletable","outlined","filled","avatar","icon","label","deleteIcon","focusVisible"]),SQ=e=>{const{classes:t,disabled:n,size:r,color:i,onDelete:s,clickable:o,variant:a}=e,c={root:["root",a,n&&"disabled",`size${De(r)}`,`color${De(i)}`,o&&"clickable",s&&"deletable"],label:["label"],avatar:["avatar"],icon:["icon"],deleteIcon:["deleteIcon"]};return $e(c,yQ,t)},AQ=he("div",{name:"MuiChip",slot:"Root",shouldForwardProp:e=>kn(e)&&e!=="focusableWhenDisabled"&&e!=="skipFocusWhenDisabled",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,clickable:i,onDelete:s,size:o,variant:a}=n;return[{[`& .${Mt.avatar}`]:t.avatar},{[`& .${Mt.icon}`]:t.icon},{[`& .${Mt.deleteIcon}`]:t.deleteIcon},t.root,t[`size${De(o)}`],t[`color${De(r)}`],i&&t.clickable,s&&t.deletable,t[a]]}})(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",[`&.${Mt.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Mt.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Mt.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Mt.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:{color:"primary"},style:{[`& .${Mt.avatar}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark}}},{props:{color:"secondary"},style:{[`& .${Mt.avatar}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark}}},{props:{size:"small"},style:{height:24,[`& .${Mt.avatar}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Mt.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Mt.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(hn(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${Mt.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:{[`& .${Mt.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${Mt.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${Mt.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(hn(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${Mt.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}`)},[`&.${Mt.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(hn(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${Mt.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]}`,[`&.${Mt.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Mt.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Mt.avatar}`]:{marginLeft:4},[`& .${Mt.icon}`]:{marginLeft:4},[`& .${Mt.deleteIcon}`]:{marginRight:5}}},{props:{size:"small",variant:"outlined"},style:{[`& .${Mt.avatar}`]:{marginLeft:2},[`& .${Mt.icon}`]:{marginLeft:2},[`& .${Mt.deleteIcon}`]:{marginRight:3}}},...Object.entries(e.palette).filter(hn()).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)}`,[`&.${Mt.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${Mt.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.focusOpacity)},[`& .${Mt.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),CQ=he("span",{name:"MuiChip",slot:"Label"})({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 sC(e){return e.key==="Backspace"||e.key==="Delete"}const Mm=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiChip"}),{avatar:i,className:s,clickable:o,color:a="default",component:c,deleteIcon:u,disabled:f=!1,icon:h,label:y,onClick:l,onDelete:E,onKeyDown:T,onKeyUp:A,size:C="medium",variant:R="filled",tabIndex:I,skipFocusWhenDisabled:v=!1,slots:N={},slotProps:x={},...D}=r,{nativeButton:H,...j}=D,L=w.useRef(null),U=gn(L,n),_=J=>{J.stopPropagation(),E(J)},F=J=>{J.currentTarget===J.target&&sC(J)&&J.preventDefault(),T&&T(J)},M=J=>{J.currentTarget===J.target&&E&&sC(J)&&E(J),A&&A(J)},$=o!==!1&&l?!0:o,G=$||E?ji:c||"div",z={...r,component:G,disabled:f,size:C,color:a,iconColor:w.isValidElement(h)&&h.props.color||a,onDelete:!!E,clickable:$,variant:R},K=SQ(z),ce=G===ji?{component:c||"div",internalNativeButton:!1,focusVisibleClassName:K.focusVisible,...E&&{disableRipple:!0},...H!==void 0&&{nativeButton:H}}:{};let O=null;E&&(O=u&&w.isValidElement(u)?w.cloneElement(u,{className:Ie(u.props.className,K.deleteIcon),onClick:_}):S.jsx(TQ,{className:K.deleteIcon,onClick:_}));let W=null;i&&w.isValidElement(i)&&(W=w.cloneElement(i,{className:Ie(K.avatar,i.props.className)}));let se=null;h&&w.isValidElement(h)&&(se=w.cloneElement(h,{className:Ie(K.icon,h.props.className)})),process.env.NODE_ENV!=="production"&&W&&se&&console.error("MUI: The Chip component can not handle the avatar and the icon prop at the same time. Pick one.");const B={slots:N,slotProps:x},[ae,re]=We("root",{elementType:AQ,externalForwardedProps:{...B,...j},ownerState:z,shouldForwardComponentProp:!0,ref:U,className:Ie(K.root,s),additionalProps:{disabled:$&&f?!0:void 0,tabIndex:v&&f?-1:I,...ce},getSlotProps:J=>({...J,onClick:oe=>{var te;(te=J.onClick)==null||te.call(J,oe),l==null||l(oe)},onKeyDown:oe=>{var te;(te=J.onKeyDown)==null||te.call(J,oe),F(oe)},onKeyUp:oe=>{var te;(te=J.onKeyUp)==null||te.call(J,oe),M(oe)}})}),[Z,ee]=We("label",{elementType:CQ,externalForwardedProps:B,ownerState:z,className:K.label});return S.jsxs(ae,{as:G,...re,children:[W||se,S.jsx(Z,{...ee,children:y}),O]})});process.env.NODE_ENV!=="production"&&(Mm.propTypes={avatar:d.element,children:Z2,classes:d.object,className:d.string,clickable:d.bool,color:d.oneOfType([d.oneOf(["default","primary","secondary","error","info","success","warning"]),d.string]),component:d.elementType,deleteIcon:d.element,disabled:d.bool,icon:d.element,label:d.node,nativeButton:d.bool,onClick:d.func,onDelete:d.func,onKeyDown:d.func,onKeyUp:d.func,size:d.oneOfType([d.oneOf(["medium","small"]),d.string]),skipFocusWhenDisabled:d.bool,slotProps:d.shape({label:d.oneOfType([d.func,d.object]),root:d.oneOfType([d.func,d.object])}),slots:d.shape({label:d.elementType,root:d.elementType}),sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object]),tabIndex:d.number,variant:d.oneOfType([d.oneOf(["filled","outlined"]),d.string])});const _Q=["unsupported","threw","no-app-handler"],IQ=({record:e})=>{const[t,n]=Y.useState(!1),r=e.direction==="dispatch",i=_Q.includes(e.outcome),s=Object.entries(e.payload.fields),o=r?"success.main":"info.main",a=r?"host → app":"app → host";return S.jsxs($i,{variant:"outlined",role:"button","aria-expanded":t,"data-testid":`record-${e.direction}`,onClick:()=>n(!t),sx:{p:2,my:1,width:"70%",cursor:"pointer",alignSelf:r?"flex-start":"flex-end",borderColor:o,borderLeftWidth:r?4:1,borderRightWidth:r?1:4,"&:hover":{boxShadow:2}},children:[S.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[S.jsx(Mm,{"data-testid":"record-direction-label",size:"small",variant:"outlined",color:r?"success":"info",label:a}),S.jsx("strong",{children:e.type}),i&&S.jsx(Mm,{"data-testid":"record-outcome-badge",size:"small",color:e.outcome==="threw"?"error":"warning",label:e.outcome})]}),t&&S.jsxs("div",{"data-testid":"record-details",style:{marginTop:6},children:[S.jsx("p",{style:{margin:0,opacity:.7,fontSize:"0.8rem"},children:`v${e.version} · ${new Date(e.timestamp).toLocaleTimeString()}`}),e.payload.isEmpty?S.jsx("p",{"data-testid":"record-payload-empty",style:{margin:"4px 0 0"},children:"(empty payload)"}):S.jsx("div",{"data-testid":"record-payload",style:{marginTop:4},children:s.map(([c,u])=>S.jsx("p",{style:{margin:0,fontFamily:"monospace"},children:`${c}: ${u}`},c))})]})]})},NQ=()=>{const e=Y.useContext(_t),{records:t,count:n}=St(G4),r=Y.useRef(null);return Y.useEffect(()=>{var i;(i=r.current)==null||i.scrollIntoView({behavior:"smooth"})},[n]),S.jsxs("div",{children:[S.jsxs(Or,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[S.jsx("h2",{style:{margin:0},children:`Boundary traffic [${n}]`}),S.jsx(At,{variant:"contained",size:"small","data-testid":"boundary-clear",onClick:()=>GD(e),children:"Clear"})]}),n===0?S.jsx("p",{"data-testid":"boundary-empty",children:"No Requests have crossed the boundary yet."}):S.jsxs(Or,{"data-testid":"boundary-stream",sx:{display:"flex",flexDirection:"column",width:"100%",maxWidth:900,mx:"auto"},children:[t.map((i,s)=>S.jsx(IQ,{record:i},s)),S.jsx("div",{ref:r})]})]})},RQ=()=>{const e=St(x4),t=Y.useContext(_t);return S.jsx(us,{control:S.jsx(zo,{onChange:n=>D4(n.target.checked,t),checked:e}),label:"Dev Mode"})},vQ=()=>{const e=Y.useContext(_t),t=St(ww);return S.jsx(us,{control:S.jsx(zo,{onChange:()=>Hw(e),checked:t}),label:"Emulate zSpace"})},xQ=()=>{const e=Y.useContext(_t),[t,n]=Y.useState(""),[r,i]=Y.useState(""),[s,o]=Y.useState(!1),[a,c]=Y.useState(""),u=h=>{h.preventDefault(),QO(r,t,e).catch(y=>{o(!0),c(y.message)})};let f=S.jsx(S.Fragment,{});return s&&(f=S.jsxs(S.Fragment,{children:[S.jsx("label",{children:"Login Failed"}),S.jsx("br",{}),S.jsx("label",{children:a}),S.jsx("p",{})]})),S.jsxs("div",{children:[f,S.jsx("form",{onSubmit:u,children:S.jsxs(Tr,{spacing:4,children:[S.jsx(ds,{label:"Email",size:"small",placeholder:"Email",name:"email",fullWidth:!0,value:r,onChange:h=>i(h.target.value),required:!0}),S.jsx(ds,{label:"Password",size:"small",placeholder:"Password",name:"password",fullWidth:!0,value:t,onChange:h=>n(h.target.value),type:"password",required:!0,autoComplete:"on"}),S.jsx(At,{variant:"contained",type:"submit",children:"Login"})]})})]})},RI=()=>{const e=St(JD),t=Y.useContext(_t);return S.jsx(us,{control:S.jsx(zo,{onChange:()=>nk(t),checked:e}),label:"Forward Logs to the Console"})},OQ=()=>{const e=St(z4);return S.jsxs(S.Fragment,{children:[S.jsx("h2",{children:"Logs:"}),S.jsx("p",{children:e.logsLabel}),S.jsx("p",{children:e.warningsLabel}),S.jsx("p",{children:e.errorsLabel}),S.jsx(RI,{})]})},wQ=e=>{const{slideName:t,tries:n,message:r,success:i}=e;return S.jsxs("div",{className:"challengeCard",children:[S.jsxs("p",{children:["Hit result for ",t]}),S.jsx("p",{children:r}),S.jsxs("p",{children:["Success: ",i]}),S.jsxs("p",{children:["Tries: ",n]})]})},DQ=e=>{const{slideName:t,tries:n,message:r,hits:i,misses:s,unanswered:o}=e;return S.jsxs("div",{className:"challengeCard",children:[S.jsxs("p",{children:["Multi hit result for ",t]}),S.jsx("p",{children:r}),S.jsxs("p",{children:["Tries: ",n]}),S.jsxs("p",{children:["Hits: ",i]}),S.jsxs("p",{children:["Misses: ",s]}),S.jsxs("p",{children:["Unanswered: ",o]})]})},kQ=e=>{const{slideName:t,tries:n,message:r,maxStars:i,stars:s}=e;return S.jsxs("div",{className:"challengeCard",children:[S.jsxs("p",{children:["Quality result for ",t]}),S.jsx("p",{children:r}),S.jsxs("p",{children:["You got ",s," out of ",i," stars"]}),S.jsxs("p",{children:["Tries: ",n]})," "]})},LQ=e=>{const{slideName:t,tries:n,message:r,score:i,maxScore:s}=e;return S.jsxs("div",{className:"challengeCard",children:[S.jsxs("p",{children:["Score result for ",t]}),S.jsx("p",{children:r}),S.jsxs("p",{children:["You got ",i," out of ",s," points"]}),S.jsxs("p",{children:["Tries: ",n]})," "]})},MQ=()=>{const e=St($4);function t(){return e.length===0?S.jsx("p",{children:"No results have been submitted"}):S.jsx(S.Fragment,{children:e.map(r=>n(r))})}function n(r){const{resultData:i,resultType:s,attempts:o,id:a,message:c,slideName:u}=r;if(s==="HIT"){const{success:f}=i;return S.jsx(wQ,{slideName:u,tries:o,message:c,success:f},a)}else if(s==="MULTIHIT"){const{hits:f,misses:h,unanswered:y}=i;return S.jsx(DQ,{slideName:u,tries:o,message:c,hits:f,misses:h,unanswered:y},a)}else if(s==="QUALITY"){const{stars:f,maxStars:h}=i;return S.jsx(kQ,{slideName:u,tries:o,message:c,stars:f,maxStars:h},a)}else if(s==="SCORE"){const{score:f,maxScore:h}=i;return S.jsx(LQ,{slideName:u,tries:o,message:c,score:f,maxScore:h},a)}else return S.jsx("p",{children:"Unknown result type"},a)}return S.jsxs(S.Fragment,{children:[S.jsx("h2",{children:"Challenge Results:"}),t()]})},PQ=()=>{const e=St(O4),t=Y.useContext(_t);return S.jsx(us,{control:S.jsx(zo,{onChange:()=>hx(t),checked:e}),label:"Start in zSpace"})},FQ=En(S.jsx("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),UQ=En(S.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit"),BQ=En(S.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),HQ=({id:e,index:t})=>{const n=Y.useContext(_t),{name:r}=sl(e,p7),i=St(O4);return S.jsxs(Qa,{hover:!0,children:[S.jsx(Bn,{"data-testid":"state-index",children:t+1}),S.jsx(Bn,{"data-testid":"state-name",children:r}),S.jsxs(Bn,{align:"right",padding:"none",children:[S.jsx(Ri,{"data-testid":"consume-state",size:"small",title:"Consume",onClick:()=>h7(e,n),children:S.jsx(FQ,{fontSize:"small"})}),S.jsx(Ri,{"data-testid":"author-state",size:"small",title:"Author",disabled:i,onClick:()=>b7(e,n),children:S.jsx(UQ,{fontSize:"small"})}),S.jsx(Ri,{"data-testid":"duplicate-state",size:"small",title:"Duplicate",onClick:()=>g7(e,n),children:S.jsx(II,{fontSize:"small"})}),S.jsx(Ri,{"data-testid":"remove-state",size:"small",title:"Remove",onClick:()=>m7(e,n),children:S.jsx(BQ,{fontSize:"small"})})]})]})},$Q=()=>{const{states:e}=St(H1);return S.jsxs(S.Fragment,{children:[S.jsx("h2",{children:"Stored States:"}),S.jsx(L1,{component:$i,variant:"outlined",children:S.jsxs(D1,{size:"small",sx:Lm,children:[S.jsx(V9,{children:S.jsxs(Qa,{children:[S.jsx(Bn,{width:48,children:"#"}),S.jsx(Bn,{children:"Name"}),S.jsx(Bn,{align:"right",children:"Actions"})]})}),S.jsx(k1,{children:e.map((t,n)=>S.jsx(HQ,{id:t,index:n},t))})]})})]})},Pm="sandbox:selectedTheme";function jQ(e,t){Km(e,t);const n=zr.get(e);n&&n.store(Pm,t).catch(()=>{e.submitWarning("selectSandboxTheme","Failed to persist the selected theme")})}function GQ(e){return Be("MuiFormGroup",e)}He("MuiFormGroup",["root","row","error"]);const zQ=e=>{const{classes:t,row:n,error:r}=e;return $e({root:["root",n&&"row",r&&"error"]},GQ,t)},VQ=he("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.row&&t.row]}})({display:"flex",flexDirection:"column",flexWrap:"wrap",variants:[{props:{row:!0},style:{flexDirection:"row"}}]}),vI=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiFormGroup"}),{className:i,row:s=!1,...o}=r,a=mi(),c=Es({props:r,muiFormControl:a,states:["error"]}),u={...r,row:s,error:c.error},f=zQ(u);return S.jsx(VQ,{className:Ie(f.root,i),ownerState:u,ref:n,...o})});process.env.NODE_ENV!=="production"&&(vI.propTypes={children:d.node,classes:d.object,className:d.string,row:d.bool,sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object])});function WQ(e){return Be("MuiRadioGroup",e)}He("MuiRadioGroup",["root","row","error"]);const W9=w.createContext(void 0);process.env.NODE_ENV!=="production"&&(W9.displayName="RadioGroupContext");const qQ=e=>{const{classes:t,row:n,error:r}=e;return $e({root:["root",n&&"row",r&&"error"]},WQ,t)},xI=w.forwardRef(function(t,n){const{actions:r,children:i,className:s,defaultValue:o,name:a,onChange:c,value:u,...f}=t,h=w.useRef(null),y=qQ(t),[l,E]=S1({controlled:u,default:o,name:"RadioGroup"});w.useImperativeHandle(r,()=>({focus:()=>{let R=h.current.querySelector("input:not(:disabled):checked");R||(R=h.current.querySelector("input:not(:disabled)")),R&&R.focus()}}),[]);const T=gn(n,h),A=Bi(a),C=w.useMemo(()=>({name:A,onChange(R){E(R.target.value),c&&c(R,R.target.value)},value:l}),[A,c,E,l]);return S.jsx(W9.Provider,{value:C,children:S.jsx(vI,{role:"radiogroup",ref:T,className:Ie(y.root,s),...f,children:i})})});process.env.NODE_ENV!=="production"&&(xI.propTypes={children:d.node,className:d.string,defaultValue:d.any,name:d.string,onChange:d.func,value:d.any});function KQ(){return w.useContext(W9)}const YQ=En(S.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),XQ=En(S.jsx("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked"),ZQ=he("span",{name:"MuiRadioButtonIcon",shouldForwardProp:kn})({position:"relative",display:"flex"}),QQ=he(YQ,{name:"MuiRadioButtonIcon"})({transform:"scale(1)"}),JQ=he(XQ,{name:"MuiRadioButtonIcon"})(Xe(({theme:e})=>({left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest}),variants:[{props:{checked:!0},style:{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}}]})));function q9(e){const{checked:t=!1,classes:n={},fontSize:r}=e,i={...e,checked:t};return S.jsxs(ZQ,{className:n.root,ownerState:i,children:[S.jsx(QQ,{fontSize:r,className:n.background,ownerState:i}),S.jsx(JQ,{fontSize:r,className:n.dot,ownerState:i})]})}process.env.NODE_ENV!=="production"&&(q9.propTypes={checked:d.bool,classes:d.object,fontSize:d.oneOf(["small","medium"])});function eJ(e){return Be("MuiRadio",e)}const oC=He("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),tJ=e=>{const{classes:t,color:n,size:r}=e,i={root:["root",`color${De(n)}`,r!=="medium"&&`size${De(r)}`]};return{...t,...$e(i,eJ,t)}},nJ=he(M9,{shouldForwardProp:e=>kn(e)||e==="classes",name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size!=="medium"&&t[`size${De(n.size)}`],t[`color${De(n.color)}`]]}})(Xe(({theme:e})=>({color:(e.vars||e).palette.text.secondary,[`&.${oC.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{color:"default",disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(hn()).map(([t])=>({props:{color:t,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(hn()).map(([t])=>({props:{color:t,disabled:!1},style:{[`&.${oC.checked}`]:{color:(e.vars||e).palette[t].main}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]})));function rJ(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}const iJ=S.jsx(q9,{checked:!0}),sJ=S.jsx(q9,{}),Fm=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiRadio"}),{checked:i,checkedIcon:s=iJ,color:o="primary",icon:a=sJ,name:c,onChange:u,size:f="medium",className:h,disabled:y,disableRipple:l=!1,slots:E={},slotProps:T={},...A}=r,C=mi();let R=y;C&&typeof R>"u"&&(R=C.disabled),R??(R=!1);const I={...r,disabled:R,disableRipple:l,color:o,size:f},v=tJ(I),N=KQ();let x=i;const D=dm(u,N&&N.onChange);let H=c;N&&(typeof x>"u"&&(x=rJ(N.value,r.value)),typeof H>"u"&&(H=N.name));const j=T.input,[L,U]=We("root",{ref:n,elementType:nJ,className:Ie(v.root,h),shouldForwardComponentProp:!0,externalForwardedProps:{slots:E,slotProps:T,...A},getSlotProps:_=>({..._,onChange:(F,...M)=>{var $;($=_.onChange)==null||$.call(_,F,...M),D(F,...M)}}),ownerState:I,additionalProps:{type:"radio",icon:w.cloneElement(a,{fontSize:a.props.fontSize??f}),checkedIcon:w.cloneElement(s,{fontSize:s.props.fontSize??f}),disabled:R,name:H,checked:x,slots:E,slotProps:{input:typeof j=="function"?j(I):j}}});return S.jsx(L,{...U,classes:v})});process.env.NODE_ENV!=="production"&&(Fm.propTypes={checked:d.bool,checkedIcon:d.node,classes:d.object,className:d.string,color:d.oneOfType([d.oneOf(["default","primary","secondary","error","info","success","warning"]),d.string]),disabled:d.bool,disableRipple:d.bool,icon:d.node,id:d.string,name:d.string,onChange:d.func,required:d.bool,size:d.oneOfType([d.oneOf(["medium","small"]),d.string]),slotProps:d.shape({input:d.oneOfType([d.func,d.object]),root:d.oneOfType([d.func,d.object])}),slots:d.shape({input:d.elementType,root:d.elementType}),sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object]),value:d.any});const OI=()=>{const e=Y.useContext(_t),n=St(R4).themeName||"light";return S.jsxs(P9,{children:[S.jsx(F9,{children:"Theme"}),S.jsxs(xI,{row:!0,value:n,onChange:r=>jQ(e,r.target.value),children:[S.jsx(us,{value:"light",control:S.jsx(Fm,{}),label:"Light"}),S.jsx(us,{value:"dark",control:S.jsx(Fm,{}),label:"Dark"})]})]})};function oJ(e){return Be("MuiTab",e)}const jr=He("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","icon"]),aJ=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:s,label:o,selected:a,disabled:c}=e,u={root:["root",s&&o&&"labelIcon",`textColor${De(n)}`,r&&"fullWidth",i&&"wrapped",a&&"selected",c&&"disabled"],icon:["icon"]};return $e(u,oJ,t)},lJ=he(ji,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${De(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${jr.icon}`]:t.icon}]}})(Xe(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:t})=>t.label&&(t.iconPosition==="top"||t.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:t})=>t.label&&t.iconPosition!=="top"&&t.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:t})=>t.icon&&t.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="top",style:{[`& > .${jr.icon}`]:{marginBottom:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="bottom",style:{[`& > .${jr.icon}`]:{marginTop:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="start",style:{[`& > .${jr.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="end",style:{[`& > .${jr.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${jr.selected}`]:{opacity:1},[`&.${jr.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${jr.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${jr.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${jr.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${jr.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:t})=>t.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:t})=>t.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),wI=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiTab"}),{className:i,disabled:s=!1,disableFocusRipple:o=!1,fullWidth:a,icon:c,iconPosition:u="top",indicator:f,label:h,onChange:y,onClick:l,onFocus:E,selected:T,selectionFollowsFocus:A,textColor:C="inherit",value:R,wrapped:I=!1,...v}=r,N=sI(),x=aI({id:R,ref:n,disabled:s,selected:T}),H=N.getItemMap().size===0&&T?0:x.tabIndex,j={...r,disabled:s,disableFocusRipple:o,selected:T,icon:!!c,iconPosition:u,label:!!h,fullWidth:a,textColor:C,wrapped:I},L=aJ(j),U=c&&h&&w.isValidElement(c)?w.cloneElement(c,{className:Ie(L.icon,c.props.className)}):c,_=M=>{!T&&y&&y(M,R),l&&l(M)},F=M=>{A&&!T&&y&&y(M,R),E&&E(M)};return S.jsxs(lJ,{internalNativeButton:!0,focusRipple:!o,className:Ie(L.root,i),ref:x.ref,role:"tab","aria-selected":T,disabled:s,onClick:_,onFocus:F,tabIndex:H,ownerState:j,...v,children:[u==="top"||u==="start"?S.jsxs(w.Fragment,{children:[U,h]}):S.jsxs(w.Fragment,{children:[h,U]}),f]})});process.env.NODE_ENV!=="production"&&(wI.propTypes={children:Z2,classes:d.object,className:d.string,disabled:d.bool,disableFocusRipple:d.bool,disableRipple:d.bool,icon:d.oneOfType([d.element,d.string]),iconPosition:d.oneOf(["bottom","end","start","top"]),label:d.node,onChange:d.func,onClick:d.func,onFocus:d.func,sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object]),value:d.any,wrapped:d.bool});function cJ(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function uJ(e,t,n,r={},i=()=>{}){const{ease:s=cJ,duration:o=300}=r;let a=null;const c=t[e];let u=!1;const f=()=>{u=!0},h=y=>{if(u){i(new Error("Animation cancelled"));return}a===null&&(a=y);const l=Math.min(1,(y-a)/o);if(t[e]=s(l)*(n-c)+c,l>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(h)};return c===n?(i(new Error("Element already at target position")),f):(requestAnimationFrame(h),f)}const dJ={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function DI(e){const{onChange:t,...n}=e,r=w.useRef(),i=w.useRef(null),s=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Er(()=>{const o=cd(()=>{const c=r.current;s(),c!==r.current&&t(r.current)}),a=Vr(i.current);return a.addEventListener("resize",o),()=>{o.clear(),a.removeEventListener("resize",o)}},[t]),w.useEffect(()=>{s(),t(r.current)},[t]),S.jsx("div",{style:dJ,...n,ref:i})}process.env.NODE_ENV!=="production"&&(DI.propTypes={onChange:d.func.isRequired});const pJ=En(S.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),fJ=En(S.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function hJ(e){return Be("MuiTabScrollButton",e)}const mJ=He("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),gJ=e=>{const{classes:t,orientation:n,disabled:r}=e;return $e({root:["root",n,r&&"disabled"]},hJ,t)},EJ=he(ji,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${mJ.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),kI=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiTabScrollButton"}),{className:i,slots:s={},slotProps:o={},direction:a,orientation:c,disabled:u,...f}=r,{nativeButton:h,...y}=f,l=gg(),E={isRtl:l,...r},T=gJ(E),A=s.StartScrollButtonIcon??pJ,C=s.EndScrollButtonIcon??fJ,R=Mc({elementType:A,externalSlotProps:o.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:E}),I=Mc({elementType:C,externalSlotProps:o.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:E});return S.jsx(EJ,{component:"div",className:Ie(T.root,i),ref:n,role:null,ownerState:E,tabIndex:null,...y,style:{...y.style,...c==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${l?-90:90}deg)`}},children:a==="left"?S.jsx(A,{...R}):S.jsx(C,{...I})})});process.env.NODE_ENV!=="production"&&(kI.propTypes={children:d.node,classes:d.object,className:d.string,direction:d.oneOf(["left","right"]).isRequired,disabled:d.bool,orientation:d.oneOf(["horizontal","vertical"]).isRequired,slotProps:d.shape({endScrollButtonIcon:d.oneOfType([d.func,d.object]),startScrollButtonIcon:d.oneOfType([d.func,d.object])}),slots:d.shape({EndScrollButtonIcon:d.elementType,StartScrollButtonIcon:d.elementType}),style:d.object,sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object])});function bJ(e){return Be("MuiTabs",e)}const Ch=He("MuiTabs",["root","vertical","list","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),TJ=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:s,centered:o,scrollButtonsHideMobile:a,classes:c}=e;return $e({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",s&&"scrollableY"],list:["list",t&&"vertical",o&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},bJ,c)},yJ=he("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Ch.scrollButtons}`]:t.scrollButtons},{[`& .${Ch.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(Xe(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.scrollButtonsHideMobile,style:{[`& .${Ch.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),SJ=he("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),AJ=he("div",{name:"MuiTabs",slot:"List",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.list,n.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),CJ=he("span",{name:"MuiTabs",slot:"Indicator"})(Xe(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:t})=>t.vertical,style:{height:"100%",width:2,right:0}}]}))),_J=he(DI)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),aC={};let lC=!1;const LI=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiTabs"}),i=Mo(),s=gg(),{"aria-label":o,"aria-labelledby":a,action:c,centered:u=!1,children:f,className:h,component:y="div",allowScrollButtonsMobile:l=!1,indicatorColor:E="primary",onChange:T,orientation:A="horizontal",scrollButtons:C="auto",selectionFollowsFocus:R,slots:I={},slotProps:v={},textColor:N="primary",value:x,variant:D="standard",visibleScrollbar:H=!1,...j}=r,L=D==="scrollable",U=A==="vertical",_=U?"scrollTop":"scrollLeft",F=U?"top":"left",M=U?"bottom":"right",$=U?"clientHeight":"clientWidth",G=U?"height":"width",z={...r,component:y,allowScrollButtonsMobile:l,indicatorColor:E,orientation:A,vertical:U,scrollButtons:C,textColor:N,variant:D,visibleScrollbar:H,fixed:!L,hideScrollbar:L&&!H,scrollableX:L&&!U,scrollableY:L&&U,centered:u&&!L,scrollButtonsHideMobile:!l},K=TJ(z),ce=Mc({elementType:I.startScrollButtonIcon,externalSlotProps:v.startScrollButtonIcon,ownerState:z}),O=Mc({elementType:I.endScrollButtonIcon,externalSlotProps:v.endScrollButtonIcon,ownerState:z});process.env.NODE_ENV!=="production"&&u&&L&&console.error('MUI: You can not use the `centered={true}` and `variant="scrollable"` properties at the same time on a `Tabs` component.');const[W,se]=w.useState(!1),[B,ae]=w.useState(aC),[re,Z]=w.useState(!1),[ee,J]=w.useState(!1),[oe,te]=w.useState(!1),be=x===!1?null:x,[V,ve]=w.useState(!1),[Q,Le]=w.useState({overflow:"hidden",scrollbarWidth:0}),ge=new Map,Te=w.useRef(null),ie=w.useRef(null),Ee={slots:I,slotProps:v},xe=()=>{const Se=Te.current;let ye;if(Se){const fe=Se.getBoundingClientRect();ye={clientWidth:Se.clientWidth,scrollLeft:Se.scrollLeft,scrollTop:Se.scrollTop,scrollWidth:Se.scrollWidth,top:fe.top,bottom:fe.bottom,left:fe.left,right:fe.right}}let ke;if(Se&&x!==!1){const fe=ie.current.children;if(fe.length>0){const ft=fe[ge.get(x)];process.env.NODE_ENV!=="production"&&(ft||console.error(["MUI: The `value` provided to the Tabs component is invalid.",`None of the Tabs' children match with "${x}".`,ge.keys?`You can provide one of the following values: ${Array.from(ge.keys()).join(", ")}.`:null].join(`
|
|
362
|
+
`)):null),classes:d.object,className:d.string,color:d.oneOfType([d.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),d.string]),disabled:d.bool,disableFocusRipple:d.bool,disableRipple:d.bool,edge:d.oneOf(["end","start",!1]),id:d.string,loading:d.bool,loadingIndicator:d.node,size:d.oneOfType([d.oneOf(["small","medium","large"]),d.string]),sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object])});function GZ(e){return Be("MuiListItemText",e)}const aa=He("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),zZ=e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:s}=e;return $e({root:["root",n&&"inset",s&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},GZ,t)},VZ=he("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${aa.primary}`]:t.primary},{[`& .${aa.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${gy.root}:where(& .${aa.primary})`]:{display:"block"},[`.${gy.root}:where(& .${aa.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),fa=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiListItemText"}),{children:i,className:s,disableTypography:o=!1,inset:a=!1,primary:c,secondary:u,slots:f={},slotProps:h={},...y}=r,{dense:l}=w.useContext(Pc);let E=c??i,T=u;const A={...r,disableTypography:o,inset:a,primary:!!E,secondary:!!T,dense:l},C=zZ(A),R={slots:f,slotProps:h},[I,v]=We("root",{className:Ie(C.root,s),elementType:VZ,externalForwardedProps:{...R,...y},ownerState:A,ref:n}),[N,x]=We("primary",{className:C.primary,elementType:lr,externalForwardedProps:R,ownerState:A}),[D,H]=We("secondary",{className:C.secondary,elementType:lr,externalForwardedProps:R,ownerState:A});return E!=null&&E.type!==lr&&!o&&(E=S.jsx(N,{variant:l?"body2":"body1",component:x!=null&&x.variant?void 0:"span",...x,children:E})),T!=null&&T.type!==lr&&!o&&(T=S.jsx(D,{variant:"body2",color:"textSecondary",...H,children:T})),S.jsxs(I,{...v,children:[E,T]})});process.env.NODE_ENV!=="production"&&(fa.propTypes={children:d.node,classes:d.object,className:d.string,disableTypography:d.bool,inset:d.bool,primary:d.node,secondary:d.node,slotProps:d.shape({primary:d.oneOfType([d.func,d.object]),root:d.oneOfType([d.func,d.object]),secondary:d.oneOfType([d.func,d.object])}),slots:d.shape({primary:d.elementType,root:d.elementType,secondary:d.elementType}),sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object])});const eC=He("MuiListItemIcon",["root","alignItemsFlexStart"]);function WZ(e){return Be("MuiMenuItem",e)}const zl=He("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),qZ=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},KZ=e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:s,classes:o}=e,c=$e({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",s&&"selected"]},WZ,o);return{...o,...c}},YZ=he(ji,{shouldForwardProp:e=>kn(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:qZ})(Xe(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${zl.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${zl.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${zl.selected}:hover`]:{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.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${zl.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${zl.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${XA.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${XA.inset}`]:{marginLeft:52},[`& .${aa.root}`]:{marginTop:0,marginBottom:0},[`& .${aa.inset}`]:{paddingLeft:36},[`& .${eC.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${eC.root} svg`]:{fontSize:"1.25rem"}}}]}))),ha=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:s="li",dense:o=!1,divider:a=!1,disableGutters:c=!1,focusVisibleClassName:u,role:f="menuitem",tabIndex:h,className:y,...l}=r,E=mI(),T=w.useContext(Pc),A=w.useMemo(()=>({dense:o||T.dense||!1,disableGutters:c}),[T.dense,o,c]),C=FX(),R=Bi(),I=C.suppressInitialFocusVisible,v=C.itemsFocusableWhenDisabled,N=w.useRef(null);Er(()=>{i&&(N.current?fI(N.current,E):process.env.NODE_ENV!=="production"&&console.error("MUI: Unable to set focus to a MenuItem whose component has not been rendered."))},[i]);const x={...r,dense:A.dense,divider:a,disableGutters:c},D=KZ(r),H=aI({id:R,ref:n,disabled:r.disabled,focusableWhenDisabled:v,selected:r.selected}),j=gn(N,H.ref);let L;return h!==void 0?L=h:C.variant==="selectedMenu"?L=H.tabIndex:(!r.disabled||v)&&(L=-1),S.jsx(Pc.Provider,{value:A,children:S.jsx(YZ,{ref:j,role:f,tabIndex:L,component:s,internalNativeButton:!1,focusableWhenDisabled:v,suppressFocusVisible:I,focusVisibleClassName:Ie(D.focusVisible,u),className:Ie(D.root,y),...l,ownerState:x,classes:D})})});process.env.NODE_ENV!=="production"&&(ha.propTypes={autoFocus:d.bool,children:d.node,classes:d.object,className:d.string,component:d.elementType,dense:d.bool,disabled:d.bool,disableGutters:d.bool,divider:d.bool,focusVisibleClassName:d.string,role:d.string,selected:d.bool,sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object]),tabIndex:d.number});const II=En(S.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),NI=En(S.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert"),tC=({id:e,section:t,query:n})=>{const r=Y.useContext(_t),[i,s]=Y.useState(null),{id:o,name:a,description:c,archived:u}=sl(e,Px);if(!(u?t==="archived":t==="active"))return null;const h=n.trim().toLowerCase();if(h&&!a.toLowerCase().includes(h)&&!c.toLowerCase().includes(h))return null;const y=!!i,l=()=>s(null),E=t==="active"?[S.jsx(ha,{"data-testid":"edit-asset",onClick:()=>{D3(e,r),l()},children:S.jsx(fa,{children:"Edit"})},"edit"),S.jsx(ha,{"data-testid":"archive-asset",onClick:()=>{d5(e,!0,r),l()},children:S.jsx(fa,{children:"Archive"})},"archive")]:[S.jsx(ha,{"data-testid":"unarchive-asset",onClick:()=>{d5(e,!1,r),l()},children:S.jsx(fa,{children:"Unarchive"})},"unarchive")];return S.jsxs(Qa,{hover:!0,"data-asset-row":!0,children:[S.jsx(Bn,{"data-testid":"asset-name",children:a}),S.jsx(Bn,{"data-testid":"asset-description",children:c}),S.jsxs(Bn,{children:[S.jsx("span",{"data-testid":"asset-id",style:{fontFamily:"monospace"},children:o}),S.jsx(Ri,{"data-testid":"copy-asset-id",size:"small",title:"Copy id",onClick:()=>{var T;return(T=navigator.clipboard)==null?void 0:T.writeText(o)},children:S.jsx(II,{fontSize:"small"})})]}),S.jsxs(Bn,{align:"right",padding:"none",children:[S.jsx(Ri,{"data-testid":"asset-menu",size:"small","aria-label":`Actions for ${a}`,"aria-haspopup":"true","aria-expanded":y,onClick:T=>s(T.currentTarget),children:S.jsx(NI,{fontSize:"small"})}),S.jsx(Qd,{anchorEl:i,open:y,onClose:l,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:E})]})]})};function XZ(e){return Be("MuiCollapse",e)}He("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const ZZ=e=>{const{orientation:t,classes:n}=e;return $e({root:["root",t],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",t],wrapperInner:["wrapperInner",t]},XZ,n)},QZ=he("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(Xe(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),JZ=he("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),eQ=he("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),w1=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiCollapse"}),{addEndListener:i,children:s,className:o,collapsedSize:a="0px",component:c,easing:u,in:f,onEnter:h,onEntered:y,onEntering:l,onExit:E,onExited:T,onExiting:A,orientation:C="vertical",slots:R={},slotProps:I={},style:v,timeout:N=L2.standard,TransitionComponent:x=Wr,...D}=r,H={...r,orientation:C,collapsedSize:a},j=ZZ(H),L=Mo(),U=Og(),_=w.useRef(null),F=w.useRef(),M=typeof a=="number"?`${a}px`:a,$=C==="horizontal",G=$?"width":"height",z=w.useRef(null),K=gn(n,z),ce=()=>_.current?_.current[$?"clientWidth":"clientHeight"]:0,O=In(z,(Q,Le)=>{_.current&&$&&(_.current.style.position="absolute"),Q.style[G]=M,h&&h(Q,Le)}),W=In(z,(Q,Le)=>{const ge=ce();_.current&&$&&(_.current.style.position="");const{duration:Te,easing:ie}=Xa({style:v,timeout:N,easing:u},{mode:"enter"});if(N==="auto"){const Ee=L.transitions.getAutoHeightDuration(ge);Q.style.transitionDuration=`${Ee}ms`,F.current=Ee}else Q.style.transitionDuration=typeof Te=="string"?Te:`${Te}ms`;Q.style[G]=`${ge}px`,Q.style.transitionTimingFunction=ie,l&&l(Q,Le)}),se=In(z,(Q,Le)=>{Q.style[G]="auto",y&&y(Q,Le)}),B=In(z,Q=>{Q.style[G]=`${ce()}px`,E&&E(Q)}),ae=In(z,T),re=In(z,Q=>{const Le=ce(),{duration:ge,easing:Te}=Xa({style:v,timeout:N,easing:u},{mode:"exit"});if(N==="auto"){const ie=L.transitions.getAutoHeightDuration(Le);Q.style.transitionDuration=`${ie}ms`,F.current=ie}else Q.style.transitionDuration=typeof ge=="string"?ge:`${ge}ms`;Q.style[G]=M,Q.style.transitionTimingFunction=Te,A&&A(Q)}),Z=Q=>{N==="auto"&&U.start(F.current||0,Q),i&&i(z.current,Q)},ee={slots:R,slotProps:I,component:c},[J,oe]=We("root",{ref:K,className:Ie(j.root,o),elementType:QZ,externalForwardedProps:ee,ownerState:H,additionalProps:{style:{[$?"minWidth":"minHeight"]:M,...v}}}),[te,be]=We("wrapper",{ref:_,className:j.wrapper,elementType:JZ,externalForwardedProps:ee,ownerState:H}),[V,ve]=We("wrapperInner",{className:j.wrapperInner,elementType:eQ,externalForwardedProps:ee,ownerState:H});return S.jsx(x,{in:f,onEnter:O,onEntered:se,onEntering:W,onExit:B,onExited:ae,onExiting:re,addEndListener:Z,nodeRef:z,timeout:N==="auto"?null:N,...D,children:(Q,{ownerState:Le,...ge})=>{const Te={...H,state:Q};return S.jsx(J,{...oe,className:Ie(oe.className,{entered:j.entered,exited:!f&&M==="0px"&&j.hidden}[Q]),ownerState:Te,...ge,children:S.jsx(te,{...be,ownerState:Te,children:S.jsx(V,{...ve,ownerState:Te,children:s})})})}})});process.env.NODE_ENV!=="production"&&(w1.propTypes={addEndListener:d.func,children:d.node,classes:d.object,className:d.string,collapsedSize:d.oneOfType([d.number,d.string]),component:vg,easing:d.oneOfType([d.shape({enter:d.string,exit:d.string}),d.string]),in:d.bool,onEnter:d.func,onEntered:d.func,onEntering:d.func,onExit:d.func,onExited:d.func,onExiting:d.func,orientation:d.oneOf(["horizontal","vertical"]),slotProps:d.shape({root:d.oneOfType([d.func,d.object]),wrapper:d.oneOfType([d.func,d.object]),wrapperInner:d.oneOfType([d.func,d.object])}),slots:d.shape({root:d.elementType,wrapper:d.elementType,wrapperInner:d.elementType}),style:d.object,sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object]),timeout:d.oneOfType([d.oneOf(["auto"]),d.number,d.shape({appear:d.number,enter:d.number,exit:d.number})])});w1&&(w1.muiSupportAuto=!0);function tQ(e){return Be("MuiTable",e)}He("MuiTable",["root","stickyHeader"]);const nQ=e=>{const{classes:t,stickyHeader:n}=e;return $e({root:["root",n&&"stickyHeader"]},tQ,t)},rQ=he("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(Xe(({theme:e})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:t})=>t.stickyHeader,style:{borderCollapse:"separate"}}]}))),nC="table",D1=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiTable"}),{className:i,component:s=nC,padding:o="normal",size:a="medium",stickyHeader:c=!1,...u}=r,f={...r,component:s,padding:o,size:a,stickyHeader:c},h=nQ(f),y=w.useMemo(()=>({padding:o,size:a,stickyHeader:c}),[o,a,c]);return S.jsx(z9.Provider,{value:y,children:S.jsx(rQ,{as:s,role:s===nC?null:"table",ref:n,className:Ie(h.root,i),ownerState:f,...u})})});process.env.NODE_ENV!=="production"&&(D1.propTypes={children:d.node,classes:d.object,className:d.string,component:d.elementType,padding:d.oneOf(["checkbox","none","normal"]),size:d.oneOfType([d.oneOf(["medium","small"]),d.string]),stickyHeader:d.bool,sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object])});function iQ(e){return Be("MuiTableHead",e)}He("MuiTableHead",["root"]);const sQ=e=>{const{classes:t}=e;return $e({root:["root"]},iQ,t)},oQ=he("thead",{name:"MuiTableHead",slot:"Root"})({display:"table-header-group"}),aQ={variant:"head"},rC="thead",V9=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiTableHead"}),{className:i,component:s=rC,...o}=r,a={...r,component:s},c=sQ(a);return S.jsx(uu.Provider,{value:aQ,children:S.jsx(oQ,{as:s,className:Ie(c.root,i),ref:n,role:s===rC?null:"rowgroup",ownerState:a,...o})})});process.env.NODE_ENV!=="production"&&(V9.propTypes={children:d.node,classes:d.object,className:d.string,component:d.elementType,sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object])});function lQ(e){return Be("MuiTableBody",e)}He("MuiTableBody",["root"]);const cQ=e=>{const{classes:t}=e;return $e({root:["root"]},lQ,t)},uQ=he("tbody",{name:"MuiTableBody",slot:"Root"})({display:"table-row-group"}),dQ={variant:"body"},iC="tbody",k1=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiTableBody"}),{className:i,component:s=iC,...o}=r,a={...r,component:s},c=cQ(a);return S.jsx(uu.Provider,{value:dQ,children:S.jsx(uQ,{className:Ie(c.root,i),as:s,ref:n,role:s===iC?null:"rowgroup",ownerState:a,...o})})});process.env.NODE_ENV!=="production"&&(k1.propTypes={children:d.node,classes:d.object,className:d.string,component:d.elementType,sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object])});function pQ(e){return Be("MuiTableContainer",e)}He("MuiTableContainer",["root"]);const fQ=e=>{const{classes:t}=e;return $e({root:["root"]},pQ,t)},hQ=he("div",{name:"MuiTableContainer",slot:"Root"})({width:"100%",overflowX:"auto"}),L1=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiTableContainer"}),{className:i,component:s="div",...o}=r,a={...r,component:s},c=fQ(a);return S.jsx(hQ,{ref:n,as:s,className:Ie(c.root,i),ownerState:a,...o})});process.env.NODE_ENV!=="production"&&(L1.propTypes={children:d.node,classes:d.object,className:d.string,component:d.elementType,sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object])});const mQ=En(S.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Lm={"& tbody tr:nth-of-type(odd)":{backgroundColor:"action.hover"},"& tbody tr.MuiTableRow-hover:hover":{backgroundColor:"action.selected"},"& td, & th":{borderColor:"divider"},"& thead th":{borderBottom:2,borderColor:"divider"}},gQ={"&:not(:has(tr[data-asset-row]))":{display:"none"}},EQ={display:"none","tbody:not(:has(tr[data-asset-row])) &":{display:"table-row"}},bQ=()=>{const e=Y.useContext(_t),t=St(k4),n=St(Gx),[r,i]=Y.useState(""),[s,o]=Y.useState(!1);return Y.useEffect(()=>{n||B3(e)},[n,e]),S.jsxs(S.Fragment,{children:[S.jsx("h2",{children:"App Assets:"}),S.jsxs(Tr,{direction:"row",spacing:2,sx:{my:2,alignItems:"center"},children:[S.jsx(At,{"data-testid":"add-app-asset",variant:"contained",size:"small",onClick:()=>Ym(Ut.NEW_APP_ASSET,e),children:"Add App Asset"}),S.jsx(ds,{"data-testid":"asset-search",size:"small",placeholder:"Filter assets…",value:r,onChange:a=>i(a.target.value)})]}),t.length===0?S.jsx("p",{"data-testid":"assets-empty",children:"App has no assets"}):S.jsxs(S.Fragment,{children:[S.jsx(L1,{component:$i,variant:"outlined",children:S.jsxs(D1,{size:"small",sx:Lm,children:[S.jsx(V9,{children:S.jsxs(Qa,{children:[S.jsx(Bn,{children:"Name"}),S.jsx(Bn,{children:"Description"}),S.jsx(Bn,{children:"Asset ID"}),S.jsx(Bn,{align:"right",children:"Actions"})]})}),S.jsxs(k1,{children:[t.map(a=>S.jsx(tC,{id:a,section:"active",query:r},a)),S.jsx(Qa,{"data-testid":"assets-no-match",sx:EQ,children:S.jsx(Bn,{colSpan:4,children:"No assets match this filter"})})]})]})}),S.jsxs(Or,{"data-testid":"archived-group",sx:gQ,children:[S.jsx(At,{"data-testid":"archived-toggle",size:"small",color:"inherit","aria-expanded":s,onClick:()=>o(!s),startIcon:S.jsx(mQ,{sx:{transform:s?"none":"rotate(-90deg)",transition:"transform 150ms"}}),sx:{mt:2},children:"Archived"}),S.jsx(w1,{in:s,children:S.jsx(L1,{component:$i,variant:"outlined",children:S.jsx(D1,{size:"small",sx:Lm,children:S.jsx(k1,{children:t.map(a=>S.jsx(tC,{id:a,section:"archived",query:r},"arch-"+a))})})})})]})]})]})},TQ=En(S.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"}),"Cancel");function yQ(e){return Be("MuiChip",e)}const Mt=He("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","deletable","outlined","filled","avatar","icon","label","deleteIcon","focusVisible"]),SQ=e=>{const{classes:t,disabled:n,size:r,color:i,onDelete:s,clickable:o,variant:a}=e,c={root:["root",a,n&&"disabled",`size${De(r)}`,`color${De(i)}`,o&&"clickable",s&&"deletable"],label:["label"],avatar:["avatar"],icon:["icon"],deleteIcon:["deleteIcon"]};return $e(c,yQ,t)},AQ=he("div",{name:"MuiChip",slot:"Root",shouldForwardProp:e=>kn(e)&&e!=="focusableWhenDisabled"&&e!=="skipFocusWhenDisabled",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,clickable:i,onDelete:s,size:o,variant:a}=n;return[{[`& .${Mt.avatar}`]:t.avatar},{[`& .${Mt.icon}`]:t.icon},{[`& .${Mt.deleteIcon}`]:t.deleteIcon},t.root,t[`size${De(o)}`],t[`color${De(r)}`],i&&t.clickable,s&&t.deletable,t[a]]}})(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",[`&.${Mt.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Mt.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Mt.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Mt.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:{color:"primary"},style:{[`& .${Mt.avatar}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark}}},{props:{color:"secondary"},style:{[`& .${Mt.avatar}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark}}},{props:{size:"small"},style:{height:24,[`& .${Mt.avatar}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Mt.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Mt.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(hn(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${Mt.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:{[`& .${Mt.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${Mt.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${Mt.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(hn(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${Mt.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}`)},[`&.${Mt.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(hn(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${Mt.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]}`,[`&.${Mt.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Mt.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Mt.avatar}`]:{marginLeft:4},[`& .${Mt.icon}`]:{marginLeft:4},[`& .${Mt.deleteIcon}`]:{marginRight:5}}},{props:{size:"small",variant:"outlined"},style:{[`& .${Mt.avatar}`]:{marginLeft:2},[`& .${Mt.icon}`]:{marginLeft:2},[`& .${Mt.deleteIcon}`]:{marginRight:3}}},...Object.entries(e.palette).filter(hn()).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)}`,[`&.${Mt.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${Mt.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.focusOpacity)},[`& .${Mt.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),CQ=he("span",{name:"MuiChip",slot:"Label"})({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 sC(e){return e.key==="Backspace"||e.key==="Delete"}const Mm=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiChip"}),{avatar:i,className:s,clickable:o,color:a="default",component:c,deleteIcon:u,disabled:f=!1,icon:h,label:y,onClick:l,onDelete:E,onKeyDown:T,onKeyUp:A,size:C="medium",variant:R="filled",tabIndex:I,skipFocusWhenDisabled:v=!1,slots:N={},slotProps:x={},...D}=r,{nativeButton:H,...j}=D,L=w.useRef(null),U=gn(L,n),_=J=>{J.stopPropagation(),E(J)},F=J=>{J.currentTarget===J.target&&sC(J)&&J.preventDefault(),T&&T(J)},M=J=>{J.currentTarget===J.target&&E&&sC(J)&&E(J),A&&A(J)},$=o!==!1&&l?!0:o,G=$||E?ji:c||"div",z={...r,component:G,disabled:f,size:C,color:a,iconColor:w.isValidElement(h)&&h.props.color||a,onDelete:!!E,clickable:$,variant:R},K=SQ(z),ce=G===ji?{component:c||"div",internalNativeButton:!1,focusVisibleClassName:K.focusVisible,...E&&{disableRipple:!0},...H!==void 0&&{nativeButton:H}}:{};let O=null;E&&(O=u&&w.isValidElement(u)?w.cloneElement(u,{className:Ie(u.props.className,K.deleteIcon),onClick:_}):S.jsx(TQ,{className:K.deleteIcon,onClick:_}));let W=null;i&&w.isValidElement(i)&&(W=w.cloneElement(i,{className:Ie(K.avatar,i.props.className)}));let se=null;h&&w.isValidElement(h)&&(se=w.cloneElement(h,{className:Ie(K.icon,h.props.className)})),process.env.NODE_ENV!=="production"&&W&&se&&console.error("MUI: The Chip component can not handle the avatar and the icon prop at the same time. Pick one.");const B={slots:N,slotProps:x},[ae,re]=We("root",{elementType:AQ,externalForwardedProps:{...B,...j},ownerState:z,shouldForwardComponentProp:!0,ref:U,className:Ie(K.root,s),additionalProps:{disabled:$&&f?!0:void 0,tabIndex:v&&f?-1:I,...ce},getSlotProps:J=>({...J,onClick:oe=>{var te;(te=J.onClick)==null||te.call(J,oe),l==null||l(oe)},onKeyDown:oe=>{var te;(te=J.onKeyDown)==null||te.call(J,oe),F(oe)},onKeyUp:oe=>{var te;(te=J.onKeyUp)==null||te.call(J,oe),M(oe)}})}),[Z,ee]=We("label",{elementType:CQ,externalForwardedProps:B,ownerState:z,className:K.label});return S.jsxs(ae,{as:G,...re,children:[W||se,S.jsx(Z,{...ee,children:y}),O]})});process.env.NODE_ENV!=="production"&&(Mm.propTypes={avatar:d.element,children:Z2,classes:d.object,className:d.string,clickable:d.bool,color:d.oneOfType([d.oneOf(["default","primary","secondary","error","info","success","warning"]),d.string]),component:d.elementType,deleteIcon:d.element,disabled:d.bool,icon:d.element,label:d.node,nativeButton:d.bool,onClick:d.func,onDelete:d.func,onKeyDown:d.func,onKeyUp:d.func,size:d.oneOfType([d.oneOf(["medium","small"]),d.string]),skipFocusWhenDisabled:d.bool,slotProps:d.shape({label:d.oneOfType([d.func,d.object]),root:d.oneOfType([d.func,d.object])}),slots:d.shape({label:d.elementType,root:d.elementType}),sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object]),tabIndex:d.number,variant:d.oneOfType([d.oneOf(["filled","outlined"]),d.string])});const _Q=["unsupported","threw","no-app-handler"],IQ=({record:e})=>{const[t,n]=Y.useState(!1),r=e.direction==="dispatch",i=_Q.includes(e.outcome),s=Object.entries(e.payload.fields),o=r?"success.main":"info.main",a=r?"host → app":"app → host";return S.jsxs($i,{variant:"outlined",role:"button","aria-expanded":t,"data-testid":`record-${e.direction}`,onClick:()=>n(!t),sx:{p:2,my:1,width:"70%",cursor:"pointer",alignSelf:r?"flex-start":"flex-end",borderColor:o,borderLeftWidth:r?4:1,borderRightWidth:r?1:4,"&:hover":{boxShadow:2}},children:[S.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[S.jsx(Mm,{"data-testid":"record-direction-label",size:"small",variant:"outlined",color:r?"success":"info",label:a}),S.jsx("strong",{children:e.type}),i&&S.jsx(Mm,{"data-testid":"record-outcome-badge",size:"small",color:e.outcome==="threw"?"error":"warning",label:e.outcome})]}),t&&S.jsxs("div",{"data-testid":"record-details",style:{marginTop:6},children:[S.jsx("p",{style:{margin:0,opacity:.7,fontSize:"0.8rem"},children:`v${e.version} · ${new Date(e.timestamp).toLocaleTimeString()}`}),e.payload.isEmpty?S.jsx("p",{"data-testid":"record-payload-empty",style:{margin:"4px 0 0"},children:"(empty payload)"}):S.jsx("div",{"data-testid":"record-payload",style:{marginTop:4},children:s.map(([c,u])=>S.jsx("p",{style:{margin:0,fontFamily:"monospace"},children:`${c}: ${u}`},c))})]})]})},NQ=()=>{const e=Y.useContext(_t),{records:t,count:n}=St(G4),r=Y.useRef(null);return Y.useEffect(()=>{var i;(i=r.current)==null||i.scrollIntoView({behavior:"smooth"})},[n]),S.jsxs("div",{children:[S.jsxs(Or,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[S.jsx("h2",{style:{margin:0},children:`Boundary traffic [${n}]`}),S.jsx(At,{variant:"contained",size:"small","data-testid":"boundary-clear",onClick:()=>GD(e),children:"Clear"})]}),n===0?S.jsx("p",{"data-testid":"boundary-empty",children:"No Requests have crossed the boundary yet."}):S.jsxs(Or,{"data-testid":"boundary-stream",sx:{display:"flex",flexDirection:"column",width:"100%",maxWidth:900,mx:"auto"},children:[t.map((i,s)=>S.jsx(IQ,{record:i},s)),S.jsx("div",{ref:r})]})]})},RQ=()=>{const e=St(x4),t=Y.useContext(_t);return S.jsx(us,{control:S.jsx(zo,{onChange:n=>D4(n.target.checked,t),checked:e}),label:"Dev Mode"})},vQ=()=>{const e=Y.useContext(_t),t=St(ww);return S.jsx(us,{control:S.jsx(zo,{onChange:()=>Hw(e),checked:t}),label:"Emulate zSpace"})},xQ=()=>{const e=Y.useContext(_t),[t,n]=Y.useState(""),[r,i]=Y.useState(""),[s,o]=Y.useState(!1),[a,c]=Y.useState(""),u=h=>{h.preventDefault(),QO(r,t,e).catch(y=>{o(!0),c(y.message)})};let f=S.jsx(S.Fragment,{});return s&&(f=S.jsxs(S.Fragment,{children:[S.jsx("label",{children:"Login Failed"}),S.jsx("br",{}),S.jsx("label",{children:a}),S.jsx("p",{})]})),S.jsxs("div",{children:[f,S.jsx("form",{onSubmit:u,children:S.jsxs(Tr,{spacing:4,children:[S.jsx(ds,{label:"Email",size:"small",placeholder:"Email",name:"email",fullWidth:!0,value:r,onChange:h=>i(h.target.value),required:!0}),S.jsx(ds,{label:"Password",size:"small",placeholder:"Password",name:"password",fullWidth:!0,value:t,onChange:h=>n(h.target.value),type:"password",required:!0,autoComplete:"on"}),S.jsx(At,{variant:"contained",type:"submit",children:"Login"})]})})]})},RI=()=>{const e=St(JD),t=Y.useContext(_t);return S.jsx(us,{control:S.jsx(zo,{onChange:()=>nk(t),checked:e}),label:"Forward Logs to the Console"})},OQ=()=>{const e=St(z4);return S.jsxs(S.Fragment,{children:[S.jsx("h2",{children:"Logs:"}),S.jsx("p",{children:e.logsLabel}),S.jsx("p",{children:e.warningsLabel}),S.jsx("p",{children:e.errorsLabel}),S.jsx(RI,{})]})},wQ=e=>{const{slideName:t,tries:n,message:r,success:i}=e;return S.jsxs("div",{className:"challengeCard",children:[S.jsxs("p",{children:["Hit result for ",t]}),S.jsx("p",{children:r}),S.jsxs("p",{children:["Success: ",i]}),S.jsxs("p",{children:["Tries: ",n]})]})},DQ=e=>{const{slideName:t,tries:n,message:r,hits:i,misses:s,unanswered:o}=e;return S.jsxs("div",{className:"challengeCard",children:[S.jsxs("p",{children:["Multi hit result for ",t]}),S.jsx("p",{children:r}),S.jsxs("p",{children:["Tries: ",n]}),S.jsxs("p",{children:["Hits: ",i]}),S.jsxs("p",{children:["Misses: ",s]}),S.jsxs("p",{children:["Unanswered: ",o]})]})},kQ=e=>{const{slideName:t,tries:n,message:r,maxStars:i,stars:s}=e;return S.jsxs("div",{className:"challengeCard",children:[S.jsxs("p",{children:["Quality result for ",t]}),S.jsx("p",{children:r}),S.jsxs("p",{children:["You got ",s," out of ",i," stars"]}),S.jsxs("p",{children:["Tries: ",n]})," "]})},LQ=e=>{const{slideName:t,tries:n,message:r,score:i,maxScore:s}=e;return S.jsxs("div",{className:"challengeCard",children:[S.jsxs("p",{children:["Score result for ",t]}),S.jsx("p",{children:r}),S.jsxs("p",{children:["You got ",i," out of ",s," points"]}),S.jsxs("p",{children:["Tries: ",n]})," "]})},MQ=()=>{const e=St($4);function t(){return e.length===0?S.jsx("p",{children:"No results have been submitted"}):S.jsx(S.Fragment,{children:e.map(r=>n(r))})}function n(r){const{resultData:i,resultType:s,attempts:o,id:a,message:c,slideName:u}=r;if(s==="HIT"){const{success:f}=i;return S.jsx(wQ,{slideName:u,tries:o,message:c,success:f},a)}else if(s==="MULTIHIT"){const{hits:f,misses:h,unanswered:y}=i;return S.jsx(DQ,{slideName:u,tries:o,message:c,hits:f,misses:h,unanswered:y},a)}else if(s==="QUALITY"){const{stars:f,maxStars:h}=i;return S.jsx(kQ,{slideName:u,tries:o,message:c,stars:f,maxStars:h},a)}else if(s==="SCORE"){const{score:f,maxScore:h}=i;return S.jsx(LQ,{slideName:u,tries:o,message:c,score:f,maxScore:h},a)}else return S.jsx("p",{children:"Unknown result type"},a)}return S.jsxs(S.Fragment,{children:[S.jsx("h2",{children:"Challenge Results:"}),t()]})},PQ=()=>{const e=St(O4),t=Y.useContext(_t);return S.jsx(us,{control:S.jsx(zo,{onChange:()=>hx(t),checked:e}),label:"Start in zSpace"})},FQ=En(S.jsx("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),UQ=En(S.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit"),BQ=En(S.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),HQ=({id:e,index:t})=>{const n=Y.useContext(_t),{name:r}=sl(e,p7),i=St(O4);return S.jsxs(Qa,{hover:!0,children:[S.jsx(Bn,{"data-testid":"state-index",children:t+1}),S.jsx(Bn,{"data-testid":"state-name",children:r}),S.jsxs(Bn,{align:"right",padding:"none",children:[S.jsx(Ri,{"data-testid":"consume-state",size:"small",title:"Consume",onClick:()=>h7(e,n),children:S.jsx(FQ,{fontSize:"small"})}),S.jsx(Ri,{"data-testid":"author-state",size:"small",title:"Author",disabled:i,onClick:()=>b7(e,n),children:S.jsx(UQ,{fontSize:"small"})}),S.jsx(Ri,{"data-testid":"duplicate-state",size:"small",title:"Duplicate",onClick:()=>g7(e,n),children:S.jsx(II,{fontSize:"small"})}),S.jsx(Ri,{"data-testid":"remove-state",size:"small",title:"Remove",onClick:()=>m7(e,n),children:S.jsx(BQ,{fontSize:"small"})})]})]})},$Q=()=>{const{states:e}=St(H1);return S.jsxs(S.Fragment,{children:[S.jsx("h2",{children:"Stored States:"}),S.jsx(L1,{component:$i,variant:"outlined",children:S.jsxs(D1,{size:"small",sx:Lm,children:[S.jsx(V9,{children:S.jsxs(Qa,{children:[S.jsx(Bn,{width:48,children:"#"}),S.jsx(Bn,{children:"Name"}),S.jsx(Bn,{align:"right",children:"Actions"})]})}),S.jsx(k1,{children:e.map((t,n)=>S.jsx(HQ,{id:t,index:n},t))})]})})]})},Pm="sandbox:selectedTheme";function jQ(e,t){Km(e,t);const n=zr.get(e);n&&n.store(Pm,t).catch(()=>{e.submitWarning("selectSandboxTheme","Failed to persist the selected theme")})}function GQ(e){return Be("MuiFormGroup",e)}He("MuiFormGroup",["root","row","error"]);const zQ=e=>{const{classes:t,row:n,error:r}=e;return $e({root:["root",n&&"row",r&&"error"]},GQ,t)},VQ=he("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.row&&t.row]}})({display:"flex",flexDirection:"column",flexWrap:"wrap",variants:[{props:{row:!0},style:{flexDirection:"row"}}]}),vI=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiFormGroup"}),{className:i,row:s=!1,...o}=r,a=mi(),c=Es({props:r,muiFormControl:a,states:["error"]}),u={...r,row:s,error:c.error},f=zQ(u);return S.jsx(VQ,{className:Ie(f.root,i),ownerState:u,ref:n,...o})});process.env.NODE_ENV!=="production"&&(vI.propTypes={children:d.node,classes:d.object,className:d.string,row:d.bool,sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object])});function WQ(e){return Be("MuiRadioGroup",e)}He("MuiRadioGroup",["root","row","error"]);const W9=w.createContext(void 0);process.env.NODE_ENV!=="production"&&(W9.displayName="RadioGroupContext");const qQ=e=>{const{classes:t,row:n,error:r}=e;return $e({root:["root",n&&"row",r&&"error"]},WQ,t)},xI=w.forwardRef(function(t,n){const{actions:r,children:i,className:s,defaultValue:o,name:a,onChange:c,value:u,...f}=t,h=w.useRef(null),y=qQ(t),[l,E]=S1({controlled:u,default:o,name:"RadioGroup"});w.useImperativeHandle(r,()=>({focus:()=>{let R=h.current.querySelector("input:not(:disabled):checked");R||(R=h.current.querySelector("input:not(:disabled)")),R&&R.focus()}}),[]);const T=gn(n,h),A=Bi(a),C=w.useMemo(()=>({name:A,onChange(R){E(R.target.value),c&&c(R,R.target.value)},value:l}),[A,c,E,l]);return S.jsx(W9.Provider,{value:C,children:S.jsx(vI,{role:"radiogroup",ref:T,className:Ie(y.root,s),...f,children:i})})});process.env.NODE_ENV!=="production"&&(xI.propTypes={children:d.node,className:d.string,defaultValue:d.any,name:d.string,onChange:d.func,value:d.any});function KQ(){return w.useContext(W9)}const YQ=En(S.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),XQ=En(S.jsx("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked"),ZQ=he("span",{name:"MuiRadioButtonIcon",shouldForwardProp:kn})({position:"relative",display:"flex"}),QQ=he(YQ,{name:"MuiRadioButtonIcon"})({transform:"scale(1)"}),JQ=he(XQ,{name:"MuiRadioButtonIcon"})(Xe(({theme:e})=>({left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest}),variants:[{props:{checked:!0},style:{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}}]})));function q9(e){const{checked:t=!1,classes:n={},fontSize:r}=e,i={...e,checked:t};return S.jsxs(ZQ,{className:n.root,ownerState:i,children:[S.jsx(QQ,{fontSize:r,className:n.background,ownerState:i}),S.jsx(JQ,{fontSize:r,className:n.dot,ownerState:i})]})}process.env.NODE_ENV!=="production"&&(q9.propTypes={checked:d.bool,classes:d.object,fontSize:d.oneOf(["small","medium"])});function eJ(e){return Be("MuiRadio",e)}const oC=He("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),tJ=e=>{const{classes:t,color:n,size:r}=e,i={root:["root",`color${De(n)}`,r!=="medium"&&`size${De(r)}`]};return{...t,...$e(i,eJ,t)}},nJ=he(M9,{shouldForwardProp:e=>kn(e)||e==="classes",name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size!=="medium"&&t[`size${De(n.size)}`],t[`color${De(n.color)}`]]}})(Xe(({theme:e})=>({color:(e.vars||e).palette.text.secondary,[`&.${oC.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{color:"default",disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(hn()).map(([t])=>({props:{color:t,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(hn()).map(([t])=>({props:{color:t,disabled:!1},style:{[`&.${oC.checked}`]:{color:(e.vars||e).palette[t].main}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]})));function rJ(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}const iJ=S.jsx(q9,{checked:!0}),sJ=S.jsx(q9,{}),Fm=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiRadio"}),{checked:i,checkedIcon:s=iJ,color:o="primary",icon:a=sJ,name:c,onChange:u,size:f="medium",className:h,disabled:y,disableRipple:l=!1,slots:E={},slotProps:T={},...A}=r,C=mi();let R=y;C&&typeof R>"u"&&(R=C.disabled),R??(R=!1);const I={...r,disabled:R,disableRipple:l,color:o,size:f},v=tJ(I),N=KQ();let x=i;const D=dm(u,N&&N.onChange);let H=c;N&&(typeof x>"u"&&(x=rJ(N.value,r.value)),typeof H>"u"&&(H=N.name));const j=T.input,[L,U]=We("root",{ref:n,elementType:nJ,className:Ie(v.root,h),shouldForwardComponentProp:!0,externalForwardedProps:{slots:E,slotProps:T,...A},getSlotProps:_=>({..._,onChange:(F,...M)=>{var $;($=_.onChange)==null||$.call(_,F,...M),D(F,...M)}}),ownerState:I,additionalProps:{type:"radio",icon:w.cloneElement(a,{fontSize:a.props.fontSize??f}),checkedIcon:w.cloneElement(s,{fontSize:s.props.fontSize??f}),disabled:R,name:H,checked:x,slots:E,slotProps:{input:typeof j=="function"?j(I):j}}});return S.jsx(L,{...U,classes:v})});process.env.NODE_ENV!=="production"&&(Fm.propTypes={checked:d.bool,checkedIcon:d.node,classes:d.object,className:d.string,color:d.oneOfType([d.oneOf(["default","primary","secondary","error","info","success","warning"]),d.string]),disabled:d.bool,disableRipple:d.bool,icon:d.node,id:d.string,name:d.string,onChange:d.func,required:d.bool,size:d.oneOfType([d.oneOf(["medium","small"]),d.string]),slotProps:d.shape({input:d.oneOfType([d.func,d.object]),root:d.oneOfType([d.func,d.object])}),slots:d.shape({input:d.elementType,root:d.elementType}),sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object]),value:d.any});const OI=()=>{const e=Y.useContext(_t),n=St(R4).themeName||"light";return S.jsxs(P9,{children:[S.jsx(F9,{children:"Theme"}),S.jsxs(xI,{row:!0,value:n,onChange:r=>jQ(e,r.target.value),children:[S.jsx(us,{value:"light",control:S.jsx(Fm,{}),label:"Light"}),S.jsx(us,{value:"dark",control:S.jsx(Fm,{}),label:"Dark"})]})]})};function oJ(e){return Be("MuiTab",e)}const jr=He("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","icon"]),aJ=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:s,label:o,selected:a,disabled:c}=e,u={root:["root",s&&o&&"labelIcon",`textColor${De(n)}`,r&&"fullWidth",i&&"wrapped",a&&"selected",c&&"disabled"],icon:["icon"]};return $e(u,oJ,t)},lJ=he(ji,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${De(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${jr.icon}`]:t.icon}]}})(Xe(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:t})=>t.label&&(t.iconPosition==="top"||t.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:t})=>t.label&&t.iconPosition!=="top"&&t.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:t})=>t.icon&&t.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="top",style:{[`& > .${jr.icon}`]:{marginBottom:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="bottom",style:{[`& > .${jr.icon}`]:{marginTop:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="start",style:{[`& > .${jr.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="end",style:{[`& > .${jr.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${jr.selected}`]:{opacity:1},[`&.${jr.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${jr.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${jr.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${jr.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${jr.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:t})=>t.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:t})=>t.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),wI=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiTab"}),{className:i,disabled:s=!1,disableFocusRipple:o=!1,fullWidth:a,icon:c,iconPosition:u="top",indicator:f,label:h,onChange:y,onClick:l,onFocus:E,selected:T,selectionFollowsFocus:A,textColor:C="inherit",value:R,wrapped:I=!1,...v}=r,N=sI(),x=aI({id:R,ref:n,disabled:s,selected:T}),H=N.getItemMap().size===0&&T?0:x.tabIndex,j={...r,disabled:s,disableFocusRipple:o,selected:T,icon:!!c,iconPosition:u,label:!!h,fullWidth:a,textColor:C,wrapped:I},L=aJ(j),U=c&&h&&w.isValidElement(c)?w.cloneElement(c,{className:Ie(L.icon,c.props.className)}):c,_=M=>{!T&&y&&y(M,R),l&&l(M)},F=M=>{A&&!T&&y&&y(M,R),E&&E(M)};return S.jsxs(lJ,{internalNativeButton:!0,focusRipple:!o,className:Ie(L.root,i),ref:x.ref,role:"tab","aria-selected":T,disabled:s,onClick:_,onFocus:F,tabIndex:H,ownerState:j,...v,children:[u==="top"||u==="start"?S.jsxs(w.Fragment,{children:[U,h]}):S.jsxs(w.Fragment,{children:[h,U]}),f]})});process.env.NODE_ENV!=="production"&&(wI.propTypes={children:Z2,classes:d.object,className:d.string,disabled:d.bool,disableFocusRipple:d.bool,disableRipple:d.bool,icon:d.oneOfType([d.element,d.string]),iconPosition:d.oneOf(["bottom","end","start","top"]),label:d.node,onChange:d.func,onClick:d.func,onFocus:d.func,sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object]),value:d.any,wrapped:d.bool});function cJ(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function uJ(e,t,n,r={},i=()=>{}){const{ease:s=cJ,duration:o=300}=r;let a=null;const c=t[e];let u=!1;const f=()=>{u=!0},h=y=>{if(u){i(new Error("Animation cancelled"));return}a===null&&(a=y);const l=Math.min(1,(y-a)/o);if(t[e]=s(l)*(n-c)+c,l>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(h)};return c===n?(i(new Error("Element already at target position")),f):(requestAnimationFrame(h),f)}const dJ={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function DI(e){const{onChange:t,...n}=e,r=w.useRef(),i=w.useRef(null),s=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Er(()=>{const o=cd(()=>{const c=r.current;s(),c!==r.current&&t(r.current)}),a=Vr(i.current);return a.addEventListener("resize",o),()=>{o.clear(),a.removeEventListener("resize",o)}},[t]),w.useEffect(()=>{s(),t(r.current)},[t]),S.jsx("div",{style:dJ,...n,ref:i})}process.env.NODE_ENV!=="production"&&(DI.propTypes={onChange:d.func.isRequired});const pJ=En(S.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),fJ=En(S.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function hJ(e){return Be("MuiTabScrollButton",e)}const mJ=He("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),gJ=e=>{const{classes:t,orientation:n,disabled:r}=e;return $e({root:["root",n,r&&"disabled"]},hJ,t)},EJ=he(ji,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${mJ.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),kI=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiTabScrollButton"}),{className:i,slots:s={},slotProps:o={},direction:a,orientation:c,disabled:u,...f}=r,{nativeButton:h,...y}=f,l=gg(),E={isRtl:l,...r},T=gJ(E),A=s.StartScrollButtonIcon??pJ,C=s.EndScrollButtonIcon??fJ,R=Mc({elementType:A,externalSlotProps:o.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:E}),I=Mc({elementType:C,externalSlotProps:o.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:E});return S.jsx(EJ,{component:"div",className:Ie(T.root,i),ref:n,role:null,ownerState:E,tabIndex:null,...y,style:{...y.style,...c==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${l?-90:90}deg)`}},children:a==="left"?S.jsx(A,{...R}):S.jsx(C,{...I})})});process.env.NODE_ENV!=="production"&&(kI.propTypes={children:d.node,classes:d.object,className:d.string,direction:d.oneOf(["left","right"]).isRequired,disabled:d.bool,orientation:d.oneOf(["horizontal","vertical"]).isRequired,slotProps:d.shape({endScrollButtonIcon:d.oneOfType([d.func,d.object]),startScrollButtonIcon:d.oneOfType([d.func,d.object])}),slots:d.shape({EndScrollButtonIcon:d.elementType,StartScrollButtonIcon:d.elementType}),style:d.object,sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object])});function bJ(e){return Be("MuiTabs",e)}const Ch=He("MuiTabs",["root","vertical","list","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),TJ=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:s,centered:o,scrollButtonsHideMobile:a,classes:c}=e;return $e({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",s&&"scrollableY"],list:["list",t&&"vertical",o&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},bJ,c)},yJ=he("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Ch.scrollButtons}`]:t.scrollButtons},{[`& .${Ch.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(Xe(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.scrollButtonsHideMobile,style:{[`& .${Ch.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),SJ=he("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),AJ=he("div",{name:"MuiTabs",slot:"List",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.list,n.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),CJ=he("span",{name:"MuiTabs",slot:"Indicator"})(Xe(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:t})=>t.vertical,style:{height:"100%",width:2,right:0}}]}))),_J=he(DI)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),aC={};let lC=!1;const LI=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiTabs"}),i=Mo(),s=gg(),{"aria-label":o,"aria-labelledby":a,action:c,centered:u=!1,children:f,className:h,component:y="div",allowScrollButtonsMobile:l=!1,indicatorColor:E="primary",onChange:T,orientation:A="horizontal",scrollButtons:C="auto",selectionFollowsFocus:R,slots:I={},slotProps:v={},textColor:N="primary",value:x,variant:D="standard",visibleScrollbar:H=!1,...j}=r,L=D==="scrollable",U=A==="vertical",_=U?"scrollTop":"scrollLeft",F=U?"top":"left",M=U?"bottom":"right",$=U?"clientHeight":"clientWidth",G=U?"height":"width",z={...r,component:y,allowScrollButtonsMobile:l,indicatorColor:E,orientation:A,vertical:U,scrollButtons:C,textColor:N,variant:D,visibleScrollbar:H,fixed:!L,hideScrollbar:L&&!H,scrollableX:L&&!U,scrollableY:L&&U,centered:u&&!L,scrollButtonsHideMobile:!l},K=TJ(z),ce=Mc({elementType:I.startScrollButtonIcon,externalSlotProps:v.startScrollButtonIcon,ownerState:z}),O=Mc({elementType:I.endScrollButtonIcon,externalSlotProps:v.endScrollButtonIcon,ownerState:z});process.env.NODE_ENV!=="production"&&u&&L&&console.error('MUI: You can not use the `centered={true}` and `variant="scrollable"` properties at the same time on a `Tabs` component.');const[W,se]=w.useState(!1),[B,ae]=w.useState(aC),[re,Z]=w.useState(!1),[ee,J]=w.useState(!1),[oe,te]=w.useState(!1),be=x===!1?null:x,[V,ve]=w.useState(!1),[Q,Le]=w.useState({overflow:"hidden",scrollbarWidth:0}),ge=new Map,Te=w.useRef(null),ie=w.useRef(null),Ee={slots:I,slotProps:v},xe=()=>{const Se=Te.current;let ye;if(Se){const fe=Se.getBoundingClientRect();ye={clientWidth:Se.clientWidth,scrollLeft:Se.scrollLeft,scrollTop:Se.scrollTop,scrollWidth:Se.scrollWidth,top:fe.top,bottom:fe.bottom,left:fe.left,right:fe.right}}let ke;if(Se&&x!==!1){const fe=ie.current.children;if(fe.length>0){const ft=fe[ge.get(x)];process.env.NODE_ENV!=="production"&&(ft||console.error(["MUI: The `value` provided to the Tabs component is invalid.",`None of the Tabs' children match with "${x}".`,ge.keys?`You can provide one of the following values: ${Array.from(ge.keys()).join(", ")}.`:null].join(`
|
|
363
363
|
`))),ke=ft?ft.getBoundingClientRect():null,process.env.NODE_ENV!=="production"&&H9()&&!lC&&ke&&ke.width===0&&ke.height===0&&ye.clientWidth!==0&&(ye=null,console.error(["MUI: The `value` provided to the Tabs component is invalid.",`The Tab with this \`value\` ("${x}") is not part of the document layout.`,"Make sure the tab item is present in the document or that it's not `display: none`."].join(`
|
|
364
364
|
`)),lC=!0)}}return{tabsMeta:ye,tabMeta:ke}},et=zn(()=>{const{tabsMeta:Se,tabMeta:ye}=xe();let ke=0,fe;U?(fe="top",ye&&Se&&(ke=ye.top-Se.top+Se.scrollTop)):(fe=s?"right":"left",ye&&Se&&(ke=(s?-1:1)*(ye[fe]-Se[fe]+Se.scrollLeft)));const ft={[fe]:ke,[G]:ye?ye[G]:0};if(typeof B[fe]!="number"||typeof B[G]!="number")ae(ft);else{const at=Math.abs(B[fe]-ft[fe]),zt=Math.abs(B[G]-ft[G]);(at>=1||zt>=1)&&ae(ft)}}),st=(Se,{animation:ye=!0}={})=>{ye?uJ(_,Te.current,Se,{duration:i.transitions.duration.standard}):Te.current[_]=Se},Ge=Se=>{let ye=Te.current[_];U?ye+=Se:ye+=Se*(s?-1:1),st(ye)},ot=()=>{const Se=Te.current[$];let ye=0;const ke=Array.from(ie.current.children);for(let fe=0;fe<ke.length;fe+=1){const ft=ke[fe];if(ye+ft[$]>Se){fe===0&&(ye=Se);break}ye+=ft[$]}return ye},Gt=()=>{Ge(-1*ot())},pt=()=>{Ge(ot())},[X,{onChange:le,...ue}]=We("scrollbar",{className:Ie(K.scrollableX,K.hideScrollbar),elementType:_J,shouldForwardComponentProp:!0,externalForwardedProps:Ee,ownerState:z}),Ne=w.useCallback(Se=>{le==null||le(Se),Le({overflow:null,scrollbarWidth:Se})},[le]),[Re,Ve]=We("scrollButtons",{className:K.scrollButtons,elementType:kI,externalForwardedProps:Ee,ownerState:z,additionalProps:{orientation:A,slots:{StartScrollButtonIcon:I.startScrollButtonIcon,EndScrollButtonIcon:I.endScrollButtonIcon},slotProps:{startScrollButtonIcon:ce,endScrollButtonIcon:O}}}),Ae=()=>{const Se={};Se.scrollbarSizeListener=L?S.jsx(X,{...ue,onChange:Ne}):null;const ke=L&&(C==="auto"&&(re||ee)||C===!0);return Se.scrollButtonStart=ke?S.jsx(Re,{direction:s?"right":"left",onClick:Gt,disabled:!re,...Ve}):null,Se.scrollButtonEnd=ke?S.jsx(Re,{direction:s?"left":"right",onClick:pt,disabled:!ee,...Ve}):null,Se},Ce=zn(Se=>{const{tabsMeta:ye,tabMeta:ke}=xe();if(!(!ke||!ye)){if(ke[F]<ye[F]){const fe=ye[_]+(ke[F]-ye[F]);st(fe,{animation:Se})}else if(ke[M]>ye[M]){const fe=ye[_]+(ke[M]-ye[M]);st(fe,{animation:Se})}}}),nt=zn(()=>{L&&C!==!1&&te(!oe)});w.useEffect(()=>{const Se=cd(()=>{Te.current&&et()});let ye;const ke=at=>{at.forEach(zt=>{zt.removedNodes.forEach(lt=>{ye==null||ye.unobserve(lt)}),zt.addedNodes.forEach(lt=>{ye==null||ye.observe(lt)})}),Se(),nt()},fe=Vr(Te.current);fe.addEventListener("resize",Se);let ft;return typeof ResizeObserver<"u"&&(ye=new ResizeObserver(Se),Array.from(ie.current.children).forEach(at=>{ye.observe(at)})),typeof MutationObserver<"u"&&(ft=new MutationObserver(ke),ft.observe(ie.current,{childList:!0})),()=>{Se.clear(),fe.removeEventListener("resize",Se),ft==null||ft.disconnect(),ye==null||ye.disconnect()}},[et,nt]),w.useEffect(()=>{const Se=Array.from(ie.current.children),ye=Se.length;if(typeof IntersectionObserver<"u"&&ye>0&&L&&C!==!1){const ke=Se[0],fe=Se[ye-1],ft={root:Te.current,threshold:.99},at=jn=>{Z(!jn[0].isIntersecting)},zt=new IntersectionObserver(at,ft);zt.observe(ke);const lt=jn=>{J(!jn[0].isIntersecting)},Xn=new IntersectionObserver(lt,ft);return Xn.observe(fe),()=>{zt.disconnect(),Xn.disconnect()}}},[L,C,oe,f==null?void 0:f.length]),w.useEffect(()=>{se(!0)},[]),w.useEffect(()=>{et()}),w.useEffect(()=>{Ce(aC!==B)},[Ce,B]),w.useImperativeHandle(c,()=>({updateIndicator:et,updateScrollButtons:nt}),[et,nt]);const[on,it]=We("indicator",{className:K.indicator,elementType:CJ,externalForwardedProps:Ee,ownerState:z,additionalProps:{style:B}}),Wt=S.jsx(on,{...it}),It=oI({activeItemId:V?void 0:be,orientation:A,isRtl:s}),an=It.getContainerProps(),tt=w.Children.toArray(f).filter(w.isValidElement).map((Se,ye)=>{const ke=Se.props.value===void 0?ye:Se.props.value;return process.env.NODE_ENV!=="production"&&iI.isFragment(Se)&&console.error(["MUI: The Tabs component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
365
365
|
`)),ge.set(ke,ye),{child:Se,index:ye,childValue:ke}}).map(({child:Se,childValue:ye})=>{const ke=ye===x;return w.cloneElement(Se,{fullWidth:D==="fullWidth",indicator:ke&&!W&&Wt,selected:ke,selectionFollowsFocus:R,onChange:T,textColor:N,value:ye})}),qt=Ae(),[Yn,Oe]=We("root",{ref:n,className:Ie(K.root,h),elementType:yJ,externalForwardedProps:{...Ee,...j,component:y},ownerState:z}),[Fe,qe]=We("scroller",{ref:Te,className:K.scroller,elementType:SJ,externalForwardedProps:Ee,ownerState:z,additionalProps:{style:{overflow:Q.overflow,[U?`margin${s?"Left":"Right"}`:"marginBottom"]:H?void 0:-Q.scrollbarWidth}}}),Cn=gn(an.ref,ie),Pn=Se=>{const ye=ie.current,ke=Ni(qn(ye));(ke==null?void 0:ke.getAttribute("role"))==="tab"&&an.onKeyDown(Se)},[Mr,Pr]=We("list",{ref:Cn,className:K.list,elementType:AJ,externalForwardedProps:Ee,ownerState:z,getSlotProps:Se=>({...Se,onBlur:ye=>{var ke;ye.currentTarget.contains(ye.relatedTarget)||ve(!1),(ke=Se.onBlur)==null||ke.call(Se,ye)},onKeyDown:ye=>{var ke;Pn(ye),(ke=Se.onKeyDown)==null||ke.call(Se,ye)},onFocus:ye=>{var ke;ve(!0),an.onFocus(ye),(ke=Se.onFocus)==null||ke.call(Se,ye)}})});return S.jsxs(Yn,{...Oe,children:[qt.scrollButtonStart,qt.scrollbarSizeListener,S.jsxs(Fe,{...qe,children:[S.jsx(Mr,{"aria-label":o,"aria-labelledby":a,"aria-orientation":A==="vertical"?"vertical":null,role:"tablist",...Pr,children:S.jsx(Zd.Provider,{value:It,children:tt})}),W&&Wt]}),qt.scrollButtonEnd]})});process.env.NODE_ENV!=="production"&&(LI.propTypes={action:qr,allowScrollButtonsMobile:d.bool,"aria-label":d.string,"aria-labelledby":d.string,centered:d.bool,children:d.node,classes:d.object,className:d.string,component:d.elementType,indicatorColor:d.oneOfType([d.oneOf(["primary","secondary"]),d.string]),onChange:d.func,orientation:d.oneOf(["horizontal","vertical"]),scrollButtons:d.oneOf(["auto",!1,!0]),selectionFollowsFocus:d.bool,slotProps:d.shape({endScrollButtonIcon:d.oneOfType([d.func,d.object]),indicator:d.oneOfType([d.func,d.object]),list:d.oneOfType([d.func,d.object]),root:d.oneOfType([d.func,d.object]),scrollbar:d.oneOfType([d.func,d.object]),scrollButtons:d.oneOfType([d.func,d.object]),scroller:d.oneOfType([d.func,d.object]),startScrollButtonIcon:d.oneOfType([d.func,d.object])}),slots:d.shape({endScrollButtonIcon:d.elementType,indicator:d.elementType,list:d.elementType,root:d.elementType,scrollbar:d.elementType,scrollButtons:d.elementType,scroller:d.elementType,startScrollButtonIcon:d.elementType}),sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object]),textColor:d.oneOf(["inherit","primary","secondary"]),value:d.any,variant:d.oneOf(["fullWidth","scrollable","standard"]),visibleScrollbar:d.bool});function IJ(e){let t=0;const n=r=>{const i=r.match(/^(\d+)/);return i?parseInt(i[1],10):0};return t+=n(e.logsLabel),t+=n(e.warningsLabel),t+=n(e.errorsLabel),t}const NJ=()=>{const e=Y.useContext(_t),t=St(F4),n=St(OO),r=St(H1),i=St(z4),s=St($4),o=St(k4),a=St(G4),c=Y.useRef(""),[u,f]=Y.useState(0);Y.useEffect(()=>{if(n!==""&&c.current===""){const A=Ye.get(e);if(!A){e.submitError("Mounted","Unable to find AppSandboxEntity"),c.current=n;return}M3(A.appID,e)}c.current=n},[e,n]);const h=r.states.length,y=IJ(i),l=s.length,E=o.length,T=[`States [${h}]`,`Logs [${y}]`,`Results [${l}]`,`Assets [${E}]`,`Boundary [${a.count}]`];return t&&T.push("zSpace"),S.jsxs("div",{id:"mounted",style:{padding:"1.5rem 1.75rem 2rem"},children:[S.jsxs(Or,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[S.jsx("h1",{children:"App is mounted and ready to start"}),S.jsx(At,{variant:"contained",size:"small",onClick:()=>mx(e),children:"Unmount App"})]}),S.jsx(LI,{value:u,onChange:(A,C)=>f(C),children:T.map(A=>S.jsx(wI,{label:A},A))}),S.jsxs(Or,{sx:{pt:4},children:[T[u].startsWith("States")&&S.jsxs("div",{children:[S.jsxs(Tr,{direction:"row",spacing:6,sx:{mb:2,alignItems:"center"},children:[S.jsx(RQ,{}),S.jsx(OI,{})]}),S.jsx($Q,{}),S.jsx(Tr,{direction:"row",spacing:2,sx:{my:2},children:S.jsx(At,{variant:"contained",size:"small",onClick:()=>y7(e),children:"Create new state"})}),S.jsx(wZ,{})]}),T[u].startsWith("Logs")&&S.jsx(OQ,{}),T[u].startsWith("Results")&&S.jsx(MQ,{}),T[u].startsWith("Assets")&&S.jsx("div",{children:n===""?S.jsxs("div",{children:[S.jsx("p",{children:"Login to manage App Assets"}),S.jsx(xQ,{})]}):S.jsx(bQ,{})}),T[u].startsWith("Boundary")&&S.jsx(NQ,{}),T[u]==="zSpace"&&S.jsxs("div",{children:[S.jsx(vQ,{}),S.jsx(PQ,{})]})]}),S.jsx(J8,{})]})};function RJ(e){return Be("MuiAlert",e)}const cC=He("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","outlined","standard"]),vJ=En(S.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),xJ=En(S.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),OJ=En(S.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),wJ=En(S.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),DJ=En(S.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"}),"Close"),kJ=e=>{const{variant:t,color:n,severity:r,classes:i}=e,s={root:["root",`color${De(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return $e(s,RJ,i)},LJ=he($i,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})(Xe(({theme:e})=>{const t=e.palette.mode==="light"?e.darken:e.lighten,n=e.palette.mode==="light"?e.lighten:e.darken;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(hn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${cC.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(hn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${cC.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(hn(["dark"])).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)}}}))]}})),MJ=he("div",{name:"MuiAlert",slot:"Icon"})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),PJ=he("div",{name:"MuiAlert",slot:"Message"})({padding:"8px 0",minWidth:0,overflow:"auto"}),FJ=he("div",{name:"MuiAlert",slot:"Action"})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),uC={success:S.jsx(vJ,{fontSize:"inherit"}),warning:S.jsx(xJ,{fontSize:"inherit"}),error:S.jsx(OJ,{fontSize:"inherit"}),info:S.jsx(wJ,{fontSize:"inherit"})},MI=w.forwardRef(function(t,n){const r=ze({props:t,name:"MuiAlert"}),{action:i,children:s,className:o,closeText:a="Close",color:c,icon:u,iconMapping:f=uC,onClose:h,role:y="alert",severity:l="success",slotProps:E={},slots:T={},variant:A="standard",...C}=r,R={...r,color:c,severity:l,variant:A,colorSeverity:c||l},I=kJ(R),v={slots:T,slotProps:E},[N,x]=We("root",{ref:n,shouldForwardComponentProp:!0,className:Ie(I.root,o),elementType:LJ,externalForwardedProps:{...v,...C},ownerState:R,additionalProps:{role:y,elevation:0}}),[D,H]=We("icon",{className:I.icon,elementType:MJ,externalForwardedProps:v,ownerState:R}),[j,L]=We("message",{className:I.message,elementType:PJ,externalForwardedProps:v,ownerState:R}),[U,_]=We("action",{className:I.action,elementType:FJ,externalForwardedProps:v,ownerState:R}),[F,M]=We("closeButton",{elementType:Ri,externalForwardedProps:v,ownerState:R}),[$,G]=We("closeIcon",{elementType:DJ,externalForwardedProps:v,ownerState:R});return S.jsxs(N,{...x,children:[u!==!1?S.jsx(D,{...H,children:u||f[l]||uC[l]}):null,S.jsx(j,{...L,children:s}),i!=null?S.jsx(U,{..._,children:i}):null,i==null&&h?S.jsx(U,{..._,children:S.jsx(F,{size:"small","aria-label":a,title:a,color:"inherit",onClick:h,...M,children:S.jsx($,{fontSize:"small",...G})})}):null]})});process.env.NODE_ENV!=="production"&&(MI.propTypes={action:d.node,children:d.node,classes:d.object,className:d.string,closeText:d.string,color:d.oneOfType([d.oneOf(["error","info","success","warning"]),d.string]),icon:d.node,iconMapping:d.shape({error:d.node,info:d.node,success:d.node,warning:d.node}),onClose:d.func,role:d.string,severity:d.oneOfType([d.oneOf(["error","info","success","warning"]),d.string]),slotProps:d.shape({action:d.oneOfType([d.func,d.object]),closeButton:d.oneOfType([d.func,d.object]),closeIcon:d.oneOfType([d.func,d.object]),icon:d.oneOfType([d.func,d.object]),message:d.oneOfType([d.func,d.object]),root:d.oneOfType([d.func,d.object])}),slots:d.shape({action:d.elementType,closeButton:d.elementType,closeIcon:d.elementType,icon:d.elementType,message:d.elementType,root:d.elementType}),sx:d.oneOfType([d.arrayOf(d.oneOfType([d.func,d.object,d.bool])),d.func,d.object]),variant:d.oneOfType([d.oneOf(["filled","outlined","standard"]),d.string])});const UJ=()=>{const e=Y.useContext(_t),[t,n]=Y.useState(""),[r,i]=Y.useState(""),[s,o]=Y.useState(!1),[a,c]=Y.useState(!0),[u,f]=Y.useState(),[h,y]=Y.useState("");Y.useEffect(()=>{c(t===""||u===void 0)},[t,u]);const l=()=>Ym(Ut.MOUNTED,e),E=A=>{A.preventDefault(),u&&(o(!0),U3({description:r,file:u,name:t},e).catch(C=>{o(!1),y(C instanceof Error?C.message:String(C))}))},T=A=>{if(!A.target.files)return;const C=A.target.files[0];f(C)};return h?S.jsxs(Or,{sx:{padding:"1.5rem 1.75rem 2rem",maxWidth:640},children:[S.jsx(lr,{variant:"h5",component:"h1",gutterBottom:!0,children:"Could not create the asset"}),S.jsx(MI,{severity:"error","data-testid":"new-asset-error",sx:{mb:4},children:h}),S.jsx(At,{"data-testid":"new-asset-error-ok",variant:"contained",type:"button",onClick:l,children:"OK"})]}):S.jsxs(Or,{sx:{padding:"1.5rem 1.75rem 2rem",maxWidth:640},children:[S.jsx(lr,{variant:"h5",component:"h1",gutterBottom:!0,children:"New App Asset"}),S.jsx("form",{onSubmit:E,children:S.jsxs(Tr,{spacing:4,sx:{mt:4,alignItems:"flex-start"},children:[S.jsx(ds,{label:"Name",size:"small",fullWidth:!0,value:t,onChange:A=>n(A.target.value),placeholder:"Asset Name"}),S.jsx(ds,{label:"Description",size:"small",fullWidth:!0,value:r,onChange:A=>i(A.target.value),placeholder:"Asset Description"}),S.jsxs(At,{variant:"outlined",component:"label",size:"small",children:[u?u.name:"Choose file…",S.jsx("input",{type:"file",id:"assetFile",hidden:!0,onChange:T})]}),S.jsxs(Tr,{direction:"row",spacing:2,children:[S.jsx(At,{variant:"contained",type:"submit",disabled:s||a,children:"Submit"}),S.jsx(At,{"data-testid":"new-asset-cancel",variant:"outlined",type:"button",onClick:l,disabled:s,children:"Cancel"})]})]})})]})},BJ="_container_jpz4g_1",HJ={container:BJ},$J=({children:e,...t})=>e?S.jsx("footer",{id:"sandbox-boottom-toolbar",className:HJ.container,...t,children:e}):S.jsx(S.Fragment,{}),jJ="_container_1hbgg_1",GJ={container:jJ},zJ=({children:e,...t})=>e?S.jsx("header",{id:"sandbox-top-toolbar",className:GJ.container,...t,children:e}):S.jsx(S.Fragment,{}),VJ="_container_1wlrm_1",WJ={container:VJ},qJ=({children:e,...t})=>{const n=t.id||"host-wrapper";return S.jsx("div",{className:WJ.container,id:n,...t,children:e})},KJ="_container_8h263_1",YJ={container:KJ},XJ=({children:e,...t})=>e?S.jsx("section",{id:"workspace-pane-left",className:YJ.container,...t,children:e}):S.jsx(S.Fragment,{}),ZJ="_container_16qvk_1",QJ={container:ZJ},JJ=({children:e,...t})=>e?S.jsx("section",{id:"workspace-pane-right",className:QJ.container,...t,children:e}):S.jsx(S.Fragment,{}),eee="_container_13v4b_1",tee={container:eee},nee=({children:e,...t})=>S.jsx("section",{id:"workspace-center-wrapper",className:tee.container,...t,children:e}),ree="_container_9iwjy_1",iee={container:ree},see=({children:e,...t})=>{const n=t.id||"workspace-wrapper";return S.jsx("div",{id:n,className:iee.container,...t,children:e})},oee="_slideContentContainer_hwg89_1",aee={slideContentContainer:oee},lee=({workspaceCenterContentRef:e,topToolbarContent:t,workspaceLeftContent:n,workspaceRightContent:r,workspaceCenterContent:i,bottomToolbarContent:s,...o})=>{const a=Mo(),{paper:c,default:u}=a.palette.background;return S.jsxs(qJ,{...o,children:[S.jsx(zJ,{style:{backgroundColor:c},children:t}),S.jsxs(see,{style:{backgroundColor:u},children:[S.jsx(XJ,{style:{backgroundColor:c},children:n}),S.jsx(nee,{style:{backgroundColor:u},children:S.jsx("div",{id:"sandbox-workspace-slide-content",ref:e,className:aee.slideContentContainer,style:{backgroundColor:u},children:i})}),S.jsx(JJ,{style:{backgroundColor:c},children:r})]}),S.jsx($J,{style:{backgroundColor:c},children:s})]})},cee=()=>{const e=Y.useContext(_t);return S.jsx(At,{variant:"contained",onClick:()=>f7(e),children:"Cancel"})},uee=()=>{const e=Y.useContext(_t);return S.jsx(At,{variant:"contained",onClick:()=>E7(e),children:"Edit"})},dee=()=>{const e=Y.useContext(_t),{nextSlideID:t}=St(H1),[n,r]=Y.useState(!0);Y.useEffect(()=>{r(t===void 0)},[t]);function i(){t&&B4(t,e)}return S.jsx(At,{variant:"contained",onClick:i,disabled:n,children:"Next"})},pee=()=>{const e=Y.useContext(_t),{previousSlideID:t}=St(H1),[n,r]=Y.useState(!0);Y.useEffect(()=>{r(t===void 0)},[t]);function i(){t&&B4(t,e)}return S.jsx(At,{variant:"contained",onClick:i,disabled:n,children:"Previous"})},fee=()=>{const{hasChanges:e}=St(U4),t=Y.useContext(_t);return S.jsx(At,{variant:"contained",disabled:!e,onClick:()=>S7(t),children:"Save"})},hee=()=>{const e=Y.useContext(_t),[t,n]=Y.useState(null),r=St(x4),i=St(F4),s=St(Lw),o=!!t;function a(){n(null)}function c(){s?Bw(e):Uw(e),a()}return S.jsxs(S.Fragment,{children:[S.jsx(Ri,{"data-testid":"toolbar-menu-button","aria-label":"More sandbox options","aria-haspopup":"true","aria-expanded":o,onClick:u=>n(u.currentTarget),children:S.jsx(NI,{})}),S.jsxs(Qd,{anchorEl:t,open:o,onClose:a,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[i&&S.jsx(ha,{"data-testid":"toolbar-menu-zspace",onClick:c,children:S.jsx(fa,{children:s?"Stop zSpace":"Start zSpace"})}),i&&S.jsx(Fc,{}),S.jsxs(ha,{"data-testid":"toolbar-menu-dev-mode",onClick:()=>D4(!r,e),children:[S.jsx(zo,{checked:r,disableRipple:!0,tabIndex:-1,sx:{ml:-2,mr:1}}),S.jsx(fa,{children:"Dev Mode"})]}),S.jsx(Fc,{}),S.jsx(Or,{sx:{px:4,pt:1,pb:2},children:S.jsx(OI,{})})]})]})},mee=()=>{const e=Y.useContext(_t);return S.jsx(At,{variant:"contained",onClick:()=>T7(e),children:"Stop"})},gee=()=>{const{isEditing:e}=St(U4);function t(){return e?r():n()}function n(){return S.jsxs(S.Fragment,{children:[S.jsx(pee,{}),S.jsx(dee,{}),S.jsx(uee,{}),S.jsx(mee,{}),S.jsx(Or,{sx:{flexGrow:1}}),S.jsx(hee,{})]})}function r(){return S.jsxs(S.Fragment,{children:[S.jsx(fee,{}),S.jsx(cee,{})]})}return S.jsx(Tr,{direction:"row",spacing:2,sx:{width:"100%",whiteSpace:"nowrap",overflow:"auto hidden",alignItems:"center"},children:t()})},Eee=()=>{const e=Y.useContext(_t),t=Y.useRef(null),[n,r]=Y.useState(!1);return Y.useEffect(()=>(t.current&&!n&&(ux(t.current,e),r(!0)),()=>{n&&dx(e)}),[n,e]),S.jsx(S.Fragment,{children:S.jsx(lee,{workspaceCenterContentRef:t,topToolbarContent:S.jsx(gee,{}),workspaceCenterContent:!0})})},bee=()=>{const e=Y.useContext(_t);return S.jsxs("div",{style:{padding:"0 1rem 1rem"},children:[S.jsx("h1",{children:"App is ready to Mount"}),S.jsx(At,{variant:"contained",onClick:()=>w4(e),children:"Mount"}),S.jsx("br",{}),S.jsx(RI,{})]})},Tee=()=>{const e=Y.useContext(_t),t=St(nx),n=Y.useRef(!0);Y.useEffect(()=>{if(t===Ut.UNMOUNTED&&n.current){n.current=!1;const i=setTimeout(()=>{w4(e)},100);return()=>clearTimeout(i)}},[e,t]);function r(){return t===Ut.UNMOUNTED?S.jsx(bee,{}):t===Ut.LOADING?S.jsx(OZ,{}):t===Ut.MOUNTED?S.jsx(NJ,{}):t===Ut.PLAYING?S.jsx(Eee,{}):t===Ut.FATAL_ERROR?S.jsx(xZ,{}):t===Ut.EDIT_ASSET?S.jsx(vZ,{}):t===Ut.NEW_APP_ASSET?S.jsx(UJ,{}):(e.submitError("SandboxUI","Encountered an unsupported Sandbox State: "+t),S.jsx("h2",{children:"[SandboxUI] Encountered an unsupported Sandbox State: "+t}))}return S.jsxs(S.Fragment,{children:[r(),S.jsx(J8,{})]})},Um=typeof Sg({})=="function",yee=(e,t)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...t&&!e.vars&&{colorScheme:e.palette.mode}}),See=e=>({color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),PI=(e,t=!1)=>{var s,o;const n={};t&&e.colorSchemes&&typeof e.getColorSchemeSelector=="function"&&Object.entries(e.colorSchemes).forEach(([a,c])=>{var f,h;const u=e.getColorSchemeSelector(a);u.startsWith("@")?n[u]={":root":{colorScheme:(f=c.palette)==null?void 0:f.mode}}:n[u.replace(/\s*&/,"")]={colorScheme:(h=c.palette)==null?void 0:h.mode}});let r={html:yee(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...See(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...n};const i=(o=(s=e.components)==null?void 0:s.MuiCssBaseline)==null?void 0:o.styleOverrides;return i&&(r=[r,i]),r},n1="mui-ecs",Aee=e=>{const t=PI(e,!1),n=Array.isArray(t)?t[0]:t;return!e.vars&&n&&(n.html[`:root:has(${n1})`]={colorScheme:e.palette.mode}),e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([r,i])=>{var o,a;const s=e.getColorSchemeSelector(r);s.startsWith("@")?n[s]={[`:root:not(:has(.${n1}))`]:{colorScheme:(o=i.palette)==null?void 0:o.mode}}:n[s.replace(/\s*&/,"")]={[`&:not(:has(.${n1}))`]:{colorScheme:(a=i.palette)==null?void 0:a.mode}}}),t},Cee=Sg(Um?({theme:e,enableColorScheme:t})=>PI(e,t):({theme:e})=>Aee(e));function FI(e){const t=ze({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return S.jsxs(w.Fragment,{children:[Um&&S.jsx(Cee,{enableColorScheme:r}),!Um&&!r&&S.jsx("span",{className:n1,style:{display:"none"}}),n]})}process.env.NODE_ENV!=="production"&&(FI.propTypes={children:d.node,enableColorScheme:d.bool});const Yi={sans:'"Source Sans 3", Arial, system-ui, "Helvetica Neue", Helvetica, sans-serif',mono:'"JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace'},Jo={sm:6,md:8,lg:12,pill:9999},_ee={xxs:4};function Iee(e){const t=e.scheme,n=e.themeName==="dark";return ld({palette:{mode:n?"dark":"light",primary:{main:t.primary,dark:t.onPrimaryFixedVariant,light:t.tertiary,contrastText:t.onPrimary},secondary:{main:t.secondary,contrastText:t.onSecondary},error:{main:t.error,contrastText:t.onError},background:{default:t.background,paper:t.surface},text:{primary:t.onBackground,secondary:t.onSurfaceVariant,disabled:t.outline},divider:t.outlineVariant},shape:{borderRadius:Jo.md},spacing:_ee.xxs,typography:{fontFamily:Yi.sans,h1:{fontFamily:Yi.sans,fontWeight:700,fontSize:"3rem",lineHeight:1.1,letterSpacing:0},h2:{fontFamily:Yi.sans,fontWeight:700,fontSize:"2.25rem",lineHeight:1.2,letterSpacing:0},h3:{fontFamily:Yi.sans,fontWeight:700,fontSize:"1.625rem",lineHeight:1.25,letterSpacing:0},h4:{fontFamily:Yi.sans,fontWeight:600,fontSize:"1.375rem",lineHeight:1.3,letterSpacing:0},h5:{fontFamily:Yi.sans,fontWeight:600,fontSize:"1.125rem",lineHeight:1.4,letterSpacing:0},h6:{fontFamily:Yi.sans,fontWeight:600,fontSize:"1rem",lineHeight:1.4,letterSpacing:0},subtitle1:{fontWeight:600,fontSize:"1rem",lineHeight:1.4},subtitle2:{fontWeight:600,fontSize:"0.875rem",lineHeight:1.4},body1:{fontWeight:400,fontSize:"1rem",lineHeight:1.5},body2:{fontWeight:400,fontSize:"0.875rem",lineHeight:1.5},button:{fontWeight:600,fontSize:"0.875rem",lineHeight:1,letterSpacing:0,textTransform:"none"},caption:{fontWeight:400,fontSize:"0.8125rem",lineHeight:1.4},overline:{fontWeight:600,fontSize:"0.6875rem",lineHeight:1.4,letterSpacing:"0.6px",textTransform:"uppercase"}},components:{MuiCssBaseline:{styleOverrides:{body:{backgroundColor:t.background,color:t.onBackground},"code, kbd, samp, pre":{fontFamily:Yi.mono}}},MuiPaper:{defaultProps:{elevation:0},styleOverrides:{root:{backgroundImage:"none",border:`1px solid ${t.outlineVariant}`},rounded:{borderRadius:Jo.lg}}},MuiMenu:{defaultProps:{slotProps:{paper:{elevation:0}}}},MuiAppBar:{defaultProps:{elevation:0,color:"default"},styleOverrides:{root:{backgroundColor:t.surface,color:t.onSurface,borderBottom:`1px solid ${t.outlineVariant}`,boxShadow:"none"}}},MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:{borderRadius:Jo.md,textTransform:"none",fontWeight:600,lineHeight:1,padding:"10px 18px",minHeight:40},sizeSmall:{padding:"8px 16px",fontSize:"0.875rem",minHeight:36},sizeLarge:{padding:"12px 22px",minHeight:44},contained:{boxShadow:"none","&:hover":{boxShadow:"none"}},outlined:{borderColor:t.outline}}},MuiOutlinedInput:{styleOverrides:{root:{borderRadius:Jo.md,backgroundColor:t.surface},notchedOutline:{borderColor:t.outline}}},MuiChip:{styleOverrides:{root:{borderRadius:Jo.pill,fontWeight:600}}},MuiTooltip:{styleOverrides:{tooltip:{backgroundColor:t.inverseSurface,color:t.inverseOnSurface,fontSize:"0.75rem",borderRadius:Jo.sm},arrow:{color:t.inverseSurface}}},MuiDivider:{styleOverrides:{root:{borderColor:t.outlineVariant}}},MuiTab:{styleOverrides:{root:{textTransform:"none",fontWeight:600,...n&&{"&.Mui-selected":{color:t.tertiary}}}}},MuiTabs:{styleOverrides:{...n&&{indicator:{backgroundColor:t.tertiary}}}}}})}function Nee(e){return{"--vived-canvas":e.background,"--vived-surface":e.surface}}function Ree(e,t=document.documentElement){const n=Nee(e);Object.entries(n).forEach(([r,i])=>{t.style.setProperty(r,i)})}const vee=({scheme:e})=>(Y.useEffect(()=>{Ree(e)},[e]),null),xee=({children:e})=>{const t=St(R4),n=Iee(t);return S.jsxs(SZ,{theme:n,children:[S.jsx(FI,{}),S.jsx(vee,{scheme:t.scheme}),e]})};function Oee(e,t){RN.createRoot(e).render(S.jsx(_t.Provider,{value:t,children:S.jsx(xee,{children:S.jsx(Tee,{})})}))}const wee="Logging",Dee="NoHubcallbackProvidedException";var or;(function(e){e.DEBUG="DEBUG",e.ERROR="ERROR",e.INFO="INFO",e.WARN="WARN",e.VERBOSE="VERBOSE",e.NONE="NONE"})(or||(or={}));const dC={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,NONE:6};class pr{constructor(t,n=or.WARN){this.name=t,this.level=n,this._pluggables=[]}_padding(t){return t<10?"0"+t:""+t}_ts(){const t=new Date;return[this._padding(t.getMinutes()),this._padding(t.getSeconds())].join(":")+"."+t.getMilliseconds()}configure(t){return t?(this._config=t,this._config):this._config}_log(t,...n){let r=this.level;pr.LOG_LEVEL&&(r=pr.LOG_LEVEL),typeof window<"u"&&window.LOG_LEVEL&&(r=window.LOG_LEVEL);const i=dC[r];if(!(dC[t]>=i))return;let o=console.log.bind(console);t===or.ERROR&&console.error&&(o=console.error.bind(console)),t===or.WARN&&console.warn&&(o=console.warn.bind(console)),pr.BIND_ALL_LOG_LEVELS&&(t===or.INFO&&console.info&&(o=console.info.bind(console)),t===or.DEBUG&&console.debug&&(o=console.debug.bind(console)));const a=`[${t}] ${this._ts()} ${this.name}`;let c="";if(n.length===1&&typeof n[0]=="string")c=`${a} - ${n[0]}`,o(c);else if(n.length===1)c=`${a} ${n[0]}`,o(a,n[0]);else if(typeof n[0]=="string"){let u=n.slice(1);u.length===1&&(u=u[0]),c=`${a} - ${n[0]} ${u}`,o(`${a} - ${n[0]}`,u)}else c=`${a} ${n}`,o(a,n);for(const u of this._pluggables){const f={message:c,timestamp:Date.now()};u.pushLogs([f])}}log(...t){this._log(or.INFO,...t)}info(...t){this._log(or.INFO,...t)}warn(...t){this._log(or.WARN,...t)}error(...t){this._log(or.ERROR,...t)}debug(...t){this._log(or.DEBUG,...t)}verbose(...t){this._log(or.VERBOSE,...t)}addPluggable(t){t&&t.getCategoryName()===wee&&(this._pluggables.push(t),t.configure(this._config))}listPluggables(){return this._pluggables}}pr.LOG_LEVEL=null;pr.BIND_ALL_LOG_LEVELS=!1;class rr extends Error{constructor({message:t,name:n,recoverySuggestion:r,underlyingError:i,metadata:s}){if(super(t),this.name=n,this.underlyingError=i,this.recoverySuggestion=r,s){const{extendedRequestId:o,httpStatusCode:a,requestId:c}=s;this.metadata={extendedRequestId:o,httpStatusCode:a,requestId:c}}this.constructor=rr,Object.setPrototypeOf(this,rr.prototype)}}var Oo;(function(e){e.NoEndpointId="NoEndpointId",e.PlatformNotSupported="PlatformNotSupported",e.Unknown="Unknown",e.NetworkError="NetworkError"})(Oo||(Oo={}));const K9=(e,t=rr)=>(n,r,i)=>{const{message:s,recoverySuggestion:o}=e[r];if(!n)throw new t({name:r,message:i?`${s} ${i}`:s,recoverySuggestion:o})},wo=typeof Symbol<"u"?Symbol("amplify_default"):"@@amplify_default",Vl=new pr("Hub");class kee{constructor(t){this.listeners=new Map,this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","ui","xr"],this.name=t}_remove(t,n){const r=this.listeners.get(t);if(!r){Vl.warn(`No listeners for ${t}`);return}this.listeners.set(t,[...r.filter(({callback:i})=>i!==n)])}dispatch(t,n,r,i){typeof t=="string"&&this.protectedChannels.indexOf(t)>-1&&(i===wo||Vl.warn(`WARNING: ${t} is protected and dispatching on it can have unintended consequences`));const s={channel:t,payload:{...n},source:r,patternInfo:[]};try{this._toListeners(s)}catch(o){Vl.error(o)}}listen(t,n,r="noname"){let i;if(typeof n!="function")throw new rr({name:Dee,message:"No callback supplied to Hub"});i=n;let s=this.listeners.get(t);return s||(s=[],this.listeners.set(t,s)),s.push({name:r,callback:i}),()=>{this._remove(t,i)}}_toListeners(t){const{channel:n,payload:r}=t,i=this.listeners.get(n);i&&i.forEach(s=>{Vl.debug(`Dispatching to ${n} with `,r);try{s.callback(t)}catch(o){Vl.error(o)}})}}const Ja=new kee("__default__"),Lee=()=>{if(typeof window=="object"&&typeof window.crypto=="object")return window.crypto;if(typeof crypto=="object")return crypto;throw new rr({name:"MissingPolyfill",message:"Cannot resolve the `crypto` function from the environment."})},Mee=()=>{if(typeof window<"u"&&typeof window.btoa=="function")return window.btoa;if(typeof btoa=="function")return btoa;throw new rr({name:"Base64EncoderError",message:"Cannot resolve the `btoa` function from the environment."})},Pee=()=>{if(typeof window<"u"&&typeof window.atob=="function")return window.atob;if(typeof atob=="function")return atob;throw new rr({name:"Base64EncoderError",message:"Cannot resolve the `atob` function from the environment."})},Y9={convert(e,t){let n=e;return t!=null&&t.urlSafe&&(n=n.replace(/-/g,"+").replace(/_/g,"/")),Pee()(n)}};var ii;(function(e){e.AuthTokenConfigException="AuthTokenConfigException",e.AuthUserPoolAndIdentityPoolException="AuthUserPoolAndIdentityPoolException",e.AuthUserPoolException="AuthUserPoolException",e.InvalidIdentityPoolIdException="InvalidIdentityPoolIdException",e.OAuthNotConfigureException="OAuthNotConfigureException"})(ii||(ii={}));const Fee={[ii.AuthTokenConfigException]:{message:"Auth Token Provider not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app."},[ii.AuthUserPoolAndIdentityPoolException]:{message:"Auth UserPool or IdentityPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId."},[ii.AuthUserPoolException]:{message:"Auth UserPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId."},[ii.InvalidIdentityPoolIdException]:{message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."},[ii.OAuthNotConfigureException]:{message:"oauth param not configured.",recoverySuggestion:"Make sure to call Amplify.configure with oauth parameter in your app."}},X9=K9(Fee);function Qt(e){let t=!0;e?t=!!e.userPoolId&&!!e.userPoolClientId:t=!1,X9(t,ii.AuthUserPoolException)}function UI(e){var n,r,i,s,o,a,c,u;const t=!!((r=(n=e==null?void 0:e.loginWith)==null?void 0:n.oauth)!=null&&r.domain)&&!!((s=(i=e==null?void 0:e.loginWith)==null?void 0:i.oauth)!=null&&s.redirectSignOut)&&!!((a=(o=e==null?void 0:e.loginWith)==null?void 0:o.oauth)!=null&&a.redirectSignIn)&&!!((u=(c=e==null?void 0:e.loginWith)==null?void 0:c.oauth)!=null&&u.responseType);X9(t,ii.OAuthNotConfigureException)}function r1(e){const t=!!(e!=null&&e.identityPoolId);X9(t,ii.InvalidIdentityPoolIdException)}function Do(e){const t=e.split(".");if(t.length!==3)throw new Error("Invalid token");try{const r=t[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(Y9.convert(r).split("").map(o=>`%${`00${o.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")),s=JSON.parse(i);return{toString:()=>e,payload:s}}catch{throw new Error("Invalid token payload")}}const BI=e=>{const t=Reflect.ownKeys(e);for(const n of t){const r=e[n];(r&&typeof r=="object"||typeof r=="function")&&BI(r)}return Object.freeze(e)},Uee=new pr("parseAWSExports"),Bee={API_KEY:"apiKey",AWS_IAM:"iam",AMAZON_COGNITO_USER_POOLS:"userPool",OPENID_CONNECT:"oidc",NONE:"none",AWS_LAMBDA:"lambda",LAMBDA:"lambda"},Hee=(e={})=>{var ae,re,Z,ee,J,oe;if(!Object.prototype.hasOwnProperty.call(e,"aws_project_region"))throw new rr({name:"InvalidParameterException",message:"Invalid config parameter.",recoverySuggestion:"Ensure passing the config object imported from `amplifyconfiguration.json`."});const{aws_appsync_apiKey:t,aws_appsync_authenticationType:n,aws_appsync_graphqlEndpoint:r,aws_appsync_region:i,aws_bots_config:s,aws_cognito_identity_pool_id:o,aws_cognito_sign_up_verification_method:a,aws_cognito_mfa_configuration:c,aws_cognito_mfa_types:u,aws_cognito_password_protection_settings:f,aws_cognito_verification_mechanisms:h,aws_cognito_signup_attributes:y,aws_cognito_social_providers:l,aws_cognito_username_attributes:E,aws_mandatory_sign_in:T,aws_mobile_analytics_app_id:A,aws_mobile_analytics_app_region:C,aws_user_files_s3_bucket:R,aws_user_files_s3_bucket_region:I,aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing:v,aws_user_pools_id:N,aws_user_pools_web_client_id:x,geo:D,oauth:H,predictions:j,aws_cloud_logic_custom:L,Notifications:U,modelIntrospection:_}=e,F={};A&&(F.Analytics={Pinpoint:{appId:A,region:C}});const{InAppMessaging:M,Push:$}=U??{};if(M!=null&&M.AWSPinpoint||$!=null&&$.AWSPinpoint){if(M!=null&&M.AWSPinpoint){const{appId:te,region:be}=M.AWSPinpoint;F.Notifications={InAppMessaging:{Pinpoint:{appId:te,region:be}}}}if($!=null&&$.AWSPinpoint){const{appId:te,region:be}=$.AWSPinpoint;F.Notifications={...F.Notifications,PushNotification:{Pinpoint:{appId:te,region:be}}}}}if(Array.isArray(s)&&(F.Interactions={LexV1:Object.fromEntries(s.map(te=>[te.name,te]))}),r){const te=Bee[n];te||Uee.debug(`Invalid authentication type ${n}. Falling back to IAM.`),F.API={GraphQL:{endpoint:r,apiKey:t,region:i,defaultAuthMode:te??"iam"}},_&&(F.API.GraphQL.modelIntrospection=_)}const G=c?{status:c&&c.toLowerCase(),totpEnabled:(u==null?void 0:u.includes("TOTP"))??!1,smsEnabled:(u==null?void 0:u.includes("SMS"))??!1}:void 0,z=f?{minLength:f.passwordPolicyMinLength,requireLowercase:((ae=f.passwordPolicyCharacters)==null?void 0:ae.includes("REQUIRES_LOWERCASE"))??!1,requireUppercase:((re=f.passwordPolicyCharacters)==null?void 0:re.includes("REQUIRES_UPPERCASE"))??!1,requireNumbers:((Z=f.passwordPolicyCharacters)==null?void 0:Z.includes("REQUIRES_NUMBERS"))??!1,requireSpecialCharacters:((ee=f.passwordPolicyCharacters)==null?void 0:ee.includes("REQUIRES_SYMBOLS"))??!1}:void 0,ce=Array.from(new Set([...h??[],...y??[]])).reduce((te,be)=>({...te,[be.toLowerCase()]:{required:!0}}),{}),O=(E==null?void 0:E.includes("EMAIL"))??!1,W=(E==null?void 0:E.includes("PHONE_NUMBER"))??!1;(o||N)&&(F.Auth={Cognito:{identityPoolId:o,allowGuestAccess:T!=="enable",signUpVerificationMethod:a,userAttributes:ce,userPoolClientId:x,userPoolId:N,mfa:G,passwordFormat:z,loginWith:{username:!(O||W),email:O,phone:W}}});const se=H?Object.keys(H).length>0:!1,B=l?l.length>0:!1;if(F.Auth&&se&&(F.Auth.Cognito.loginWith={...F.Auth.Cognito.loginWith,oauth:{...$ee(H),...B&&{providers:jee(l)}}}),R&&(F.Storage={S3:{bucket:R,region:I,dangerouslyConnectToHttpEndpointForTesting:v}}),D){const{amazon_location_service:te}=D;F.Geo={LocationService:{maps:te.maps,geofenceCollections:te.geofenceCollections,searchIndices:te.search_indices,region:te.region}}}if(L&&(F.API={...F.API,REST:L.reduce((te,be)=>{const{name:V,endpoint:ve,region:Q,service:Le}=be;return{...te,[V]:{endpoint:ve,...Le?{service:Le}:void 0,...Q?{region:Q}:void 0}}},{})}),j){const{VoiceId:te}=((oe=(J=j==null?void 0:j.convert)==null?void 0:J.speechGenerator)==null?void 0:oe.defaults)??{};F.Predictions=te?{...j,convert:{...j.convert,speechGenerator:{...j.convert.speechGenerator,defaults:{voiceId:te}}}}:j}return F},pC=e=>(e==null?void 0:e.split(","))??[],$ee=({domain:e,scope:t,redirectSignIn:n,redirectSignOut:r,responseType:i})=>({domain:e,scopes:t,redirectSignIn:pC(n),redirectSignOut:pC(r),responseType:i}),jee=e=>e.map(t=>{const n=t.toLowerCase();return n.charAt(0).toUpperCase()+n.slice(1)}),Gee=Symbol("oauth-listener"),vn=[];for(let e=0;e<256;++e)vn.push((e+256).toString(16).slice(1));function zee(e,t=0){return(vn[e[t+0]]+vn[e[t+1]]+vn[e[t+2]]+vn[e[t+3]]+"-"+vn[e[t+4]]+vn[e[t+5]]+"-"+vn[e[t+6]]+vn[e[t+7]]+"-"+vn[e[t+8]]+vn[e[t+9]]+"-"+vn[e[t+10]]+vn[e[t+11]]+vn[e[t+12]]+vn[e[t+13]]+vn[e[t+14]]+vn[e[t+15]]).toLowerCase()}let _h;const Vee=new Uint8Array(16);function Wee(){if(!_h){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");_h=crypto.getRandomValues.bind(crypto)}return _h(Vee)}const qee=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),fC={randomUUID:qee};function Kee(e,t,n){var i;if(fC.randomUUID&&!t&&!e)return fC.randomUUID();e=e||{};const r=e.random??((i=e.rng)==null?void 0:i.call(e))??Wee();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n=n||0,n<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let s=0;s<16;++s)t[n+s]=r[s];return t}return zee(r)}function Yee(e){const{version:t}=e;return t?t.startsWith("1"):!1}function Xee(e){if(!e)return;const{bucket_name:t,aws_region:n,buckets:r}=e;return{S3:{bucket:t,region:n,buckets:r&&ate(r)}}}function Zee(e){if(!e)return;const{user_pool_id:t,user_pool_client_id:n,identity_pool_id:r,password_policy:i,mfa_configuration:s,mfa_methods:o,unauthenticated_identities_enabled:a,oauth:c,username_attributes:u,standard_required_attributes:f,groups:h,passwordless:y}=e,l={Cognito:{userPoolId:t,userPoolClientId:n,groups:h}};return r&&(l.Cognito={...l.Cognito,identityPoolId:r}),i&&(l.Cognito.passwordFormat={requireLowercase:i.require_lowercase,requireNumbers:i.require_numbers,requireUppercase:i.require_uppercase,requireSpecialCharacters:i.require_symbols,minLength:i.min_length??6}),s&&(l.Cognito.mfa={status:ote(s),smsEnabled:o==null?void 0:o.includes("SMS"),totpEnabled:o==null?void 0:o.includes("TOTP")}),a&&(l.Cognito.allowGuestAccess=a),c&&(l.Cognito.loginWith={oauth:{domain:c.domain,redirectSignIn:c.redirect_sign_in_uri,redirectSignOut:c.redirect_sign_out_uri,responseType:c.response_type==="token"?"token":"code",scopes:c.scopes,providers:ste(c.identity_providers)}}),u&&(l.Cognito.loginWith={...l.Cognito.loginWith,email:u.includes("email"),phone:u.includes("phone_number"),username:u.includes("username")}),f&&(l.Cognito.userAttributes=f.reduce((E,T)=>({...E,[T]:{required:!0}}),{})),y&&(l.Cognito.passwordless={emailOtpEnabled:y.email_otp_enabled,smsOtpEnabled:y.sms_otp_enabled,webAuthn:y.web_authn?{relyingPartyId:y.web_authn.relying_party_id,userVerification:y.web_authn.user_verification}:void 0,preferredChallenge:y.preferred_challenge}),l}function Qee(e){if(!(e!=null&&e.amazon_pinpoint))return;const{amazon_pinpoint:t}=e;return{Pinpoint:{appId:t.app_id,region:t.aws_region}}}function Jee(e){if(!e)return;const{aws_region:t,geofence_collections:n,maps:r,search_indices:i}=e;return{LocationService:{region:t,searchIndices:i,geofenceCollections:n,maps:r}}}function ete(e){if(!e)return;const{aws_region:t,default_authorization_type:n,url:r,api_key:i,model_introspection:s}=e;return{GraphQL:{endpoint:r,defaultAuthMode:HI(n),region:t,apiKey:i,modelIntrospection:s}}}function tte(e){if(!(e!=null&&e.events))return;const{url:t,aws_region:n,api_key:r,default_authorization_type:i}=e.events;return{Events:{endpoint:t,defaultAuthMode:HI(i),region:n,apiKey:r}}}function nte(e){if(!e)return;const{aws_region:t,channels:n,amazon_pinpoint_app_id:r}=e,i=n.includes("IN_APP_MESSAGING"),s=n.includes("APNS")||n.includes("FCM");if(!(i||s))return;const o={};return i&&(o.InAppMessaging={Pinpoint:{appId:r,region:t}}),s&&(o.PushNotification={Pinpoint:{appId:r,region:t}}),o}function rte(e){const t={};if(e.storage&&(t.Storage=Xee(e.storage)),e.auth&&(t.Auth=Zee(e.auth)),e.analytics&&(t.Analytics=Qee(e.analytics)),e.geo&&(t.Geo=Jee(e.geo)),e.data&&(t.API=ete(e.data)),e.custom){const n=tte(e.custom);n&&"Events"in n&&(t.API={...t.API,...n})}return e.notifications&&(t.Notifications=nte(e.notifications)),t}const ite={AMAZON_COGNITO_USER_POOLS:"userPool",API_KEY:"apiKey",AWS_IAM:"iam",AWS_LAMBDA:"lambda",OPENID_CONNECT:"oidc"};function HI(e){return ite[e]}const hC={GOOGLE:"Google",LOGIN_WITH_AMAZON:"Amazon",FACEBOOK:"Facebook",SIGN_IN_WITH_APPLE:"Apple"};function ste(e=[]){return e.reduce((t,n)=>(hC[n]!==void 0&&t.push(hC[n]),t),[])}function ote(e){return e==="OPTIONAL"?"optional":e==="REQUIRED"?"on":"off"}function ate(e){const t={};return e.forEach(({name:n,bucket_name:r,aws_region:i,paths:s})=>{if(n in t)throw new Error(`Duplicate friendly name found: ${n}. Name must be unique.`);const o=s?Object.entries(s).reduce((a,[c,u])=>(u!==void 0&&(a[c]=u),a),{}):void 0;t[n]={bucketName:r,region:i,paths:o}}),t}const $I=e=>Object.keys(e).some(t=>t.startsWith("aws_"))?Hee(e):Yee(e)?rte(e):e;function lte(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(f){try{u(r.next(f))}catch(h){o(h)}}function c(f){try{u(r.throw(f))}catch(h){o(h)}}function u(f){f.done?s(f.value):i(f.value).then(a,c)}u((r=r.apply(e,t||[])).next())})}function cte(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(f){return c([u,f])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){n.label=u[1];break}if(u[0]===6&&n.label<s[1]){n.label=s[1],s=u;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(u);break}s[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(f){u=[6,f],i=0}finally{r=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var Ar=64,ute=32,dte=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),pte=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],fte=Math.pow(2,53)-1,i1=(function(){function e(){this.state=Int32Array.from(pte),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");var n=0,r=t.byteLength;if(this.bytesHashed+=r,this.bytesHashed*8>fte)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=t[n++],r--,this.bufferLength===Ar&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(n.setUint8(this.bufferLength++,128),r%Ar>=Ar-8){for(var i=this.bufferLength;i<Ar;i++)n.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(var i=this.bufferLength;i<Ar-8;i++)n.setUint8(i,0);n.setUint32(Ar-8,Math.floor(t/4294967296),!0),n.setUint32(Ar-4,t),this.hashBuffer(),this.finished=!0}for(var s=new Uint8Array(ute),i=0;i<8;i++)s[i*4]=this.state[i]>>>24&255,s[i*4+1]=this.state[i]>>>16&255,s[i*4+2]=this.state[i]>>>8&255,s[i*4+3]=this.state[i]>>>0&255;return s},e.prototype.hashBuffer=function(){for(var t=this,n=t.buffer,r=t.state,i=r[0],s=r[1],o=r[2],a=r[3],c=r[4],u=r[5],f=r[6],h=r[7],y=0;y<Ar;y++){if(y<16)this.temp[y]=(n[y*4]&255)<<24|(n[y*4+1]&255)<<16|(n[y*4+2]&255)<<8|n[y*4+3]&255;else{var l=this.temp[y-2],E=(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10;l=this.temp[y-15];var T=(l>>>7|l<<25)^(l>>>18|l<<14)^l>>>3;this.temp[y]=(E+this.temp[y-7]|0)+(T+this.temp[y-16]|0)}var A=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&u^~c&f)|0)+(h+(dte[y]+this.temp[y]|0)|0)|0,C=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&s^i&o^s&o)|0;h=f,f=u,u=c,c=a+A|0,a=o,o=s,s=i,i=A+C|0}r[0]+=i,r[1]+=s,r[2]+=o,r[3]+=a,r[4]+=c,r[5]+=u,r[6]+=f,r[7]+=h},e})();const hte=e=>new TextEncoder().encode(e);var mte=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:hte;function jI(e){return e instanceof Uint8Array?e:typeof e=="string"?mte(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function gte(e){return typeof e=="string"?e.length===0:e.byteLength===0}var M1=(function(){function e(t){this.secret=t,this.hash=new i1,this.reset()}return e.prototype.update=function(t){if(!(gte(t)||this.error))try{this.hash.update(jI(t))}catch(n){this.error=n}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return lte(this,void 0,void 0,function(){return cte(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new i1,this.secret){this.outer=new i1;var t=Ete(this.secret),n=new Uint8Array(Ar);n.set(t);for(var r=0;r<Ar;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(var r=0;r<t.byteLength;r++)t[r]=0}},e})();function Ete(e){var t=jI(e);if(t.byteLength>Ar){var n=new i1;n.update(t),t=n.digest()}var r=new Uint8Array(Ar);return r.set(t),r}for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`)}var dn;(function(e){e.WebUnknown="0",e.React="1",e.NextJs="2",e.Angular="3",e.VueJs="4",e.Nuxt="5",e.Svelte="6",e.ServerSideUnknown="100",e.ReactSSR="101",e.NextJsSSR="102",e.AngularSSR="103",e.VueJsSSR="104",e.NuxtSSR="105",e.SvelteSSR="106",e.ReactNative="201",e.Expo="202"})(dn||(dn={}));var Bm;(function(e){e.AI="ai",e.API="api",e.Auth="auth",e.Analytics="analytics",e.DataStore="datastore",e.Geo="geo",e.InAppMessaging="inappmessaging",e.Interactions="interactions",e.Predictions="predictions",e.PubSub="pubsub",e.PushNotification="pushnotification",e.Storage="storage"})(Bm||(Bm={}));var mC;(function(e){e.CreateConversation="1",e.GetConversation="2",e.ListConversations="3",e.DeleteConversation="4",e.SendMessage="5",e.ListMessages="6",e.OnMessage="7",e.Generation="8",e.UpdateConversation="9"})(mC||(mC={}));var gC;(function(e){e.Record="1",e.IdentifyUser="2"})(gC||(gC={}));var EC;(function(e){e.GraphQl="1",e.Get="2",e.Post="3",e.Put="4",e.Patch="5",e.Del="6",e.Head="7"})(EC||(EC={}));var Gi;(function(e){e.SignUp="1",e.ConfirmSignUp="2",e.ResendSignUpCode="3",e.SignIn="4",e.FetchMFAPreference="6",e.UpdateMFAPreference="7",e.SetUpTOTP="10",e.VerifyTOTPSetup="11",e.ConfirmSignIn="12",e.DeleteUserAttributes="15",e.DeleteUser="16",e.UpdateUserAttributes="17",e.FetchUserAttributes="18",e.ConfirmUserAttribute="22",e.SignOut="26",e.UpdatePassword="27",e.ResetPassword="28",e.ConfirmResetPassword="29",e.FederatedSignIn="30",e.RememberDevice="32",e.ForgetDevice="33",e.FetchDevices="34",e.SendUserAttributeVerificationCode="35",e.SignInWithRedirect="36",e.StartWebAuthnRegistration="37",e.CompleteWebAuthnRegistration="38",e.ListWebAuthnCredentials="39",e.DeleteWebAuthnCredential="40"})(Gi||(Gi={}));var bC;(function(e){e.Subscribe="1",e.GraphQl="2"})(bC||(bC={}));var TC;(function(e){e.SearchByText="0",e.SearchByCoordinates="1",e.SearchForSuggestions="2",e.SearchByPlaceId="3",e.SaveGeofences="4",e.GetGeofence="5",e.ListGeofences="6",e.DeleteGeofences="7"})(TC||(TC={}));var yC;(function(e){e.SyncMessages="1",e.IdentifyUser="2",e.NotifyMessageInteraction="3"})(yC||(yC={}));var SC;(function(e){e.None="0"})(SC||(SC={}));var AC;(function(e){e.Convert="1",e.Identify="2",e.Interpret="3"})(AC||(AC={}));var CC;(function(e){e.Subscribe="1"})(CC||(CC={}));var _C;(function(e){e.InitializePushNotifications="1",e.IdentifyUser="2"})(_C||(_C={}));var IC;(function(e){e.UploadData="1",e.DownloadData="2",e.List="3",e.Copy="4",e.Remove="5",e.GetProperties="6",e.GetUrl="7",e.GetDataAccess="8",e.ListCallerAccessGrants="9"})(IC||(IC={}));const bte="6.16.4",Jd=()=>typeof global<"u",Tl=()=>typeof window<"u",GI=()=>typeof document<"u",Z9=()=>typeof process<"u",Uc=(e,t)=>!!Object.keys(e).find(n=>n.startsWith(t));function Tte(){const e=r=>r.startsWith("_react")||r.startsWith("__react"),t=r=>Object.keys(r).find(e),n=()=>Array.from(document.querySelectorAll("[id]"));return GI()&&n().some(t)}function yte(){return Z9()&&typeof process.env<"u"&&!!Object.keys(process.env).find(e=>e.includes("react"))}function Ste(){return Tl()&&Uc(window,"__VUE")}function Ate(){return Jd()&&Uc(global,"__VUE")}function Cte(){return Tl()&&Uc(window,"__SVELTE")}function _te(){return Z9()&&typeof process.env<"u"&&!!Object.keys(process.env).find(e=>e.includes("svelte"))}function Ite(){return Tl()&&window.next&&typeof window.next=="object"}function Nte(){return Jd()&&(Uc(global,"__next")||Uc(global,"__NEXT"))}function Rte(){return Tl()&&(window.__NUXT__!==void 0||window.$nuxt!==void 0)}function vte(){return Jd()&&typeof global.__NUXT_PATHS__<"u"}function xte(){const e=!!(GI()&&document.querySelector("[ng-version]")),t=!!(Tl()&&typeof window.ng<"u");return e||t}function Ote(){var e;return Z9()&&typeof process.env=="object"&&((e=process.env.npm_lifecycle_script)==null?void 0:e.startsWith("ng "))||!1}function wte(){return typeof navigator<"u"&&typeof navigator.product<"u"&&navigator.product==="ReactNative"}function Dte(){return Jd()&&typeof global.expo<"u"}function kte(){return Tl()}const Lte=[{platform:dn.Expo,detectionMethod:Dte},{platform:dn.ReactNative,detectionMethod:wte},{platform:dn.NextJs,detectionMethod:Ite},{platform:dn.Nuxt,detectionMethod:Rte},{platform:dn.Angular,detectionMethod:xte},{platform:dn.React,detectionMethod:Tte},{platform:dn.VueJs,detectionMethod:Ste},{platform:dn.Svelte,detectionMethod:Cte},{platform:dn.WebUnknown,detectionMethod:kte},{platform:dn.NextJsSSR,detectionMethod:Nte},{platform:dn.NuxtSSR,detectionMethod:vte},{platform:dn.ReactSSR,detectionMethod:yte},{platform:dn.VueJsSSR,detectionMethod:Ate},{platform:dn.AngularSSR,detectionMethod:Ote},{platform:dn.SvelteSSR,detectionMethod:_te}];function Mte(){var e;return((e=Lte.find(t=>t.detectionMethod()))==null?void 0:e.platform)||dn.ServerSideUnknown}let cc;const Ih=[];let Hm=!1;const Pte=10,Fte=10,Ute=1e3,zI=()=>{var e;if(!cc){if(cc=Mte(),Hm)for(;Ih.length;)(e=Ih.pop())==null||e();else Ih.forEach(t=>{t()});NC(dn.ServerSideUnknown,Pte),NC(dn.WebUnknown,Fte)}return cc};function Bte(){cc=void 0}function NC(e,t){cc===e&&!Hm&&setTimeout(()=>{Bte(),Hm=!0,setTimeout(zI,Ute)},t)}const Hte={},$te=(e,t)=>{var n,r;return(r=(n=Hte[e])==null?void 0:n[t])==null?void 0:r.additionalDetails},jte="aws-amplify",Gte=e=>e.replace(/\+.*/,""),zte=({category:e,action:t}={})=>{const n=[[jte,Gte(bte)]];if(e&&n.push([e,t]),n.push(["framework",zI()]),e&&t){const r=$te(e,t);r&&r.forEach(i=>{n.push(i)})}return n},ep=e=>zte(e).map(([r,i])=>r&&i?`${r}/${i}`:r).join(" "),VI=()=>typeof window<"u"&&typeof window.document<"u",RC=new pr("Auth");class Vte{configure(t,n){var r,i;this.authConfig=t,this.authOptions=n,t&&((r=t.Cognito)!=null&&r.userPoolEndpoint)&&RC.warn(vC("Amazon Cognito User Pool")),t&&((i=t.Cognito)!=null&&i.identityPoolEndpoint)&&RC.warn(vC("Amazon Cognito Identity Pool"))}async fetchAuthSession(t={}){var s,o,a,c,u,f;let n,r;const i=await this.getTokens(t);return i?(r=(o=(s=i.accessToken)==null?void 0:s.payload)==null?void 0:o.sub,n=await((c=(a=this.authOptions)==null?void 0:a.credentialsProvider)==null?void 0:c.getCredentialsAndIdentityId({authConfig:this.authConfig,tokens:i,authenticated:!0,forceRefresh:t.forceRefresh}))):n=await((f=(u=this.authOptions)==null?void 0:u.credentialsProvider)==null?void 0:f.getCredentialsAndIdentityId({authConfig:this.authConfig,authenticated:!1,forceRefresh:t.forceRefresh})),{tokens:i,credentials:n==null?void 0:n.credentials,identityId:n==null?void 0:n.identityId,userSub:r}}async clearCredentials(){var t,n;await((n=(t=this.authOptions)==null?void 0:t.credentialsProvider)==null?void 0:n.clearCredentialsAndIdentityId())}async getTokens(t){var n,r;return await((r=(n=this.authOptions)==null?void 0:n.tokenProvider)==null?void 0:r.getTokens(t))??void 0}}const vC=e=>`You are using a custom Amazon ${e} endpoint, ensure the endpoint is correct.`;class Wte{constructor(){this.oAuthListener=void 0,this.isConfigured=!1,this.resourcesConfig={},this.libraryOptions={},this.Auth=new Vte}configure(t,n){var i,s,o,a,c;const r=$I(t);this.resourcesConfig=r,n&&(this.libraryOptions=n),this.resourcesConfig=BI(this.resourcesConfig),this.Auth.configure(this.resourcesConfig.Auth,this.libraryOptions.Auth),((i=this.resourcesConfig.Analytics)!=null&&i.Pinpoint||(o=(s=this.resourcesConfig.Notifications)==null?void 0:s.InAppMessaging)!=null&&o.Pinpoint||(c=(a=this.resourcesConfig.Notifications)==null?void 0:a.PushNotification)!=null&&c.Pinpoint)&&console.warn("AWS will end support for Amazon Pinpoint on October 30, 2026. The guidance is to use AWS End User Messaging for push notifications and SMS, Amazon Simple Email Service for sending emails, Amazon Connect for campaigns, journeys, endpoints, and engagement analytics. Pinpoint recommends Amazon Kinesis for event collection and mobile analytics."),Ja.dispatch("core",{event:"configure",data:this.resourcesConfig},"Configure",wo),this.notifyOAuthListener(),this.isConfigured=!0}getConfig(){return this.isConfigured||console.warn("Amplify has not been configured. Please call Amplify.configure() before using this service."),this.resourcesConfig}[Gee](t){var n,r,i;(r=(n=this.resourcesConfig.Auth)==null?void 0:n.Cognito.loginWith)!=null&&r.oauth?t((i=this.resourcesConfig.Auth)==null?void 0:i.Cognito):this.oAuthListener=t}notifyOAuthListener(){var t,n,r;!((n=(t=this.resourcesConfig.Auth)==null?void 0:t.Cognito.loginWith)!=null&&n.oauth)||!this.oAuthListener||(this.oAuthListener((r=this.resourcesConfig.Auth)==null?void 0:r.Cognito),this.oAuthListener=void 0)}}const Sn=new Wte,qte=(e,t)=>e.Auth.fetchAuthSession(t),xC=e=>qte(Sn,e);function WI(){return Sn.Auth.clearCredentials()}const tp=e=>{const{headers:t,statusCode:n}=e;return{...Kte(e)?e.$metadata:{},httpStatusCode:n,requestId:t["x-amzn-requestid"]??t["x-amzn-request-id"]??t["x-amz-request-id"],extendedRequestId:t["x-amz-id-2"],cfId:t["x-amz-cf-id"]}},Kte=e=>typeof(e==null?void 0:e.$metadata)=="object",du=async e=>{if(!e||e.statusCode<300)return;const t=await np(e),r=(o=>{const[a]=o.toString().split(/[,:]+/);return a.includes("#")?a.split("#")[1]:a})(e.headers["x-amzn-errortype"]??t.code??t.__type??"UnknownError"),i=t.message??t.Message??"Unknown error",s=new Error(i);return Object.assign(s,{name:r,$metadata:tp(e)})},np=async e=>{if(!e.body)throw new Error("Missing response payload");const t=await e.body.json();return Object.assign(t,{$metadata:tp(e)})},bs=(e,t,n,r)=>async(i,s)=>{const o={...r,...i},a=await o.endpointResolver(o,s),c=await t(s,a),u=await e(c,{...o});return n(u)},Yte=300*1e3;function Xte(e=Yte){return r=>{const i=2**r*100+100*Math.random();return i>e?!1:i}}const qI=3,OC="amz-sdk-invocation-id",Zte="amz-sdk-request",wC=300*1e3,KI=e=>{const n=Xte(wC)(e);return n===!1?wC:n},Qte=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch","BadRequestException"],Jte=e=>!!e&&Qte.includes(e),YI=e=>async(t,n)=>{const r=n??await e(t)??void 0,i=(r==null?void 0:r.code)||(r==null?void 0:r.name),s=t==null?void 0:t.statusCode;return{retryable:rne(n)||nne(s,i)||Jte(i)||ine(s,i)}},ene=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException"],tne=["TimeoutError","RequestTimeout","RequestTimeoutException"],nne=(e,t)=>e===429||!!t&&ene.includes(t),rne=e=>[Oo.NetworkError,"ERR_NETWORK"].includes(e==null?void 0:e.name),ine=(e,t)=>!!e&&[500,502,503,504].includes(e)||!!t&&tne.includes(t),XI="cognito-identity",ZI={service:XI,retryDecider:YI(du),computeDelay:KI,cache:"no-store"},sne=({maxAttempts:e=qI,retryDecider:t,computeDelay:n,abortSignal:r})=>{if(e<1)throw new Error("maxAttempts must be greater than 0");return(i,s)=>async function(a){let c,u=s.attemptsCount??0,f;const h=()=>{if(f)return DC(f,u),f;throw DC(c,u),c};for(;!(r!=null&&r.aborted)&&u<e;){try{f=await i(a),c=void 0}catch(E){c=E,f=void 0}u=(s.attemptsCount??0)>u?s.attemptsCount??0:u+1,s.attemptsCount=u;const{isCredentialsExpiredError:y,retryable:l}=await t(f,c,s);if(l){if(s.isCredentialsExpired=!!y,!(r!=null&&r.aborted)&&u<e){const E=n(u);await one(E,r)}continue}else return h()}if(r!=null&&r.aborted)throw new Error("Request aborted.");return h()}},one=(e,t)=>{if(t!=null&&t.aborted)return Promise.resolve();let n,r;const i=new Promise(s=>{r=s,n=setTimeout(s,e)});return t==null||t.addEventListener("abort",function s(o){clearTimeout(n),t==null||t.removeEventListener("abort",s),r()}),i},DC=(e,t)=>{Object.prototype.toString.call(e)==="[object Object]"&&(e.$metadata={...e.$metadata??{},attempts:t})},ane=Kee,lne=()=>e=>async function(n){return n.headers[OC]||(n.headers[OC]=ane()),e(n)},cne=({maxAttempts:e=qI})=>(t,n)=>async function(i){const s=n.attemptsCount??0;return i.headers[Zte]=`attempt=${s+1}; max=${e}`,t(i)},une=({userAgentHeader:e="x-amz-user-agent",userAgentValue:t=""})=>n=>async function(i){if(t.trim().length===0)return await n(i);{const s=e.toLowerCase();return i.headers[s]=i.headers[s]?`${i.headers[s]} ${t}`:t,await n(i)}},Q9=(e,t)=>(n,r)=>{const i={};let s=o=>e(o,r);for(let o=t.length-1;o>=0;o--){const a=t[o];s=a(r)(s,i)}return s(n)},Nh=e=>{let t;return()=>(t||(t=e()),t)},dne=e=>!["HEAD","GET"].includes(e.toUpperCase()),pne=async({url:e,method:t,headers:n,body:r},{abortSignal:i,cache:s,withCrossDomainCredentials:o})=>{var h;let a;try{a=await fetch(e,{method:t,headers:n,body:dne(t)?r:void 0,signal:i,cache:s,credentials:o?"include":"same-origin"})}catch(y){throw y instanceof TypeError?new rr({name:Oo.NetworkError,message:"A network error has occurred.",underlyingError:y}):y}const c={};(h=a.headers)==null||h.forEach((y,l)=>{c[l.toLowerCase()]=y});const u={statusCode:a.status,headers:c,body:null},f=Object.assign(a.body??{},{text:Nh(()=>a.text()),blob:Nh(()=>a.blob()),json:Nh(()=>a.json())});return{...u,body:f}},QI=Q9(pne,[une,lne,sne,cne]),fne=()=>e=>async function(n){return n.headers["cache-control"]="no-store",e(n)},JI=Q9(QI,[fne]),eN=e=>(t,n)=>{const r=hne(e),i=JSON.stringify(t);return mne(n,r,i)},hne=e=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${e}`}),mne=({url:e},t,n)=>({headers:t,url:e,body:n,method:"POST"}),kC=e=>bs(JI,eN("GetCredentialsForIdentity"),gne,{...ZI,...e,userAgentValue:ep()}),gne=async e=>{if(e.statusCode>=300)throw await du(e);const t=await np(e);return{IdentityId:t.IdentityId,Credentials:Ene(t.Credentials),$metadata:tp(e)}},Ene=({Expiration:e,...t}={})=>({...t,Expiration:e&&new Date(e*1e3)}),bne=e=>bs(JI,eN("GetId"),Tne,{...ZI,...e,userAgentValue:ep()}),Tne=async e=>{if(e.statusCode>=300)throw await du(e);return{IdentityId:(await np(e)).IdentityId,$metadata:tp(e)}},tN={id:"aws",outputs:{dnsSuffix:"amazonaws.com"},regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",regions:["aws-global"]},yne={partitions:[tN,{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn"},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:["aws-cn-global"]}]},nN=e=>{const{partitions:t}=yne;for(const{regions:n,outputs:r,regionRegex:i}of t){const s=new RegExp(i);if(n.includes(e)||s.test(e))return r.dnsSuffix}return tN.outputs.dnsSuffix},pu=URL,Sne=({region:e})=>({url:new pu(`https://${XI}.${e}.${nN(e)}`)});class Ql extends rr{constructor(){super({name:Oo.PlatformNotSupported,message:"Function not supported on current platform"})}}class rN{constructor(t){this.storage=t}async setItem(t,n){if(!this.storage)throw new Ql;this.storage.setItem(t,n)}async getItem(t){if(!this.storage)throw new Ql;return this.storage.getItem(t)}async removeItem(t){if(!this.storage)throw new Ql;this.storage.removeItem(t)}async clear(){if(!this.storage)throw new Ql;this.storage.clear()}}class iN{constructor(){this.storage=new Map}get length(){return this.storage.size}key(t){return t>this.length-1?null:Array.from(this.storage.keys())[t]}setItem(t,n){this.storage.set(t,n)}getItem(t){return this.storage.get(t)??null}removeItem(t){this.storage.delete(t)}clear(){this.storage.clear()}}const sN=new pr("CoreStorageUtils"),Ane=()=>{try{if(typeof window<"u"&&window.localStorage)return window.localStorage}catch{sN.info("localStorage not found. InMemoryStorage is used as a fallback.")}return new iN},oN=()=>{try{if(typeof window<"u"&&window.sessionStorage)return window.sessionStorage.getItem("test"),window.sessionStorage;throw new Error("sessionStorage is not defined")}catch{return sN.info("sessionStorage not found. InMemoryStorage is used as a fallback."),new iN}};class Cne extends rN{constructor(){super(Ane())}}class _ne extends rN{constructor(){super(oN())}}class Ine{constructor(t){this._storage=t}get storage(){if(!this._storage)throw new Ql;return this._storage}setItem(t,n){this.storage.setItem(t,n)}getItem(t){return this.storage.getItem(t)}removeItem(t){this.storage.removeItem(t)}clear(){this.storage.clear()}}class Nne extends Ine{constructor(){super(oN())}}/*! js-cookie v3.0.5 | MIT */function $u(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Rne={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function $m(e,t){function n(i,s,o){if(!(typeof document>"u")){o=$u({},t,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in o)o[c]&&(a+="; "+c,o[c]!==!0&&(a+="="+o[c].split(";")[0]));return document.cookie=i+"="+e.write(s,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var s=document.cookie?document.cookie.split("; "):[],o={},a=0;a<s.length;a++){var c=s[a].split("="),u=c.slice(1).join("=");try{var f=decodeURIComponent(c[0]);if(o[f]=e.read(u,f),i===f)break}catch{}}return i?o[i]:o}}return Object.create({set:n,get:r,remove:function(i,s){n(i,"",$u({},s,{expires:-1}))},withAttributes:function(i){return $m(this.converter,$u({},this.attributes,i))},withConverter:function(i){return $m($u({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var ju=$m(Rne,{path:"/"});class vne{constructor(t={}){const{path:n,domain:r,expires:i,sameSite:s,secure:o}=t;if(this.domain=r,this.path=n||"/",this.expires=Object.prototype.hasOwnProperty.call(t,"expires")?i:365,this.secure=Object.prototype.hasOwnProperty.call(t,"secure")?o:!0,Object.prototype.hasOwnProperty.call(t,"sameSite")){if(!s||!["strict","lax","none"].includes(s))throw new Error('The sameSite value of cookieStorage must be "lax", "strict" or "none".');if(s==="none"&&!this.secure)throw new Error("sameSite = None requires the Secure attribute in latest browser versions.");this.sameSite=s}}async setItem(t,n){ju.set(t,n,this.getData())}async getItem(t){return ju.get(t)??null}async removeItem(t){ju.remove(t,this.getData())}async clear(){const t=ju.get(),n=Object.keys(t).map(r=>this.removeItem(r));await Promise.all(n)}getData(){return{path:this.path,expires:this.expires,domain:this.domain,secure:this.secure,...this.sameSite&&{sameSite:this.sameSite}}}}const fu=new Cne;new _ne;const vi=new Nne,xne=e=>{let t;return async(...n)=>t||(t=new Promise((r,i)=>{e(...n).then(s=>{r(s)}).catch(s=>{i(s)}).finally(()=>{t=void 0})}),t)};function LC({expiresAt:e,clockDrift:t,tolerance:n=5e3}){return Date.now()+t+n>e}const One=async()=>{const{userAgentData:e}=navigator;if(!e)return navigator.userAgent;const{platform:t="",platformVersion:n="",model:r="",architecture:i="",fullVersionList:s=[]}=await e.getHighEntropyValues(["platform","platformVersion","architecture","model","fullVersionList"]),o=s.map(c=>`${c.brand}/${c.version}`).join(";");return[t,n,i,r,t,o].filter(c=>c).join(" ")||navigator.userAgent};function wne(e){return Array.from(e,t=>String.fromCodePoint(t)).join("")}const Bc={convert(e,t={urlSafe:!1,skipPadding:!1}){const n=typeof e=="string"?e:wne(e);let r=Mee()(n);return t.urlSafe&&(r=r.replace(/\+/g,"-").replace(/\//g,"_")),t.skipPadding&&(r=r.replace(/=/g,"")),r}};function Dne(){return Lee().getRandomValues(new Uint32Array(1))[0]}function kne(e){const{words:t}=e,{sigBytes:n}=e,r=[];for(let i=0;i<n;i++){const s=t[i>>>2]>>>24-i%4*8&255;r.push((s>>>4).toString(16)),r.push((s&15).toString(16))}return r.join("")}class J9{constructor(t,n){this.words=[];let r=t;r=this.words=r||[],n!==void 0?this.sigBytes=n:this.sigBytes=r.length*4}random(t){const n=[];for(let r=0;r<t;r+=4)n.push(Dne());return new J9(n,t)}toString(){return kne(this)}}var yt;(function(e){e.EmptySignInUsername="EmptySignInUsername",e.EmptySignInPassword="EmptySignInPassword",e.CustomAuthSignInPassword="CustomAuthSignInPassword",e.EmptySignUpUsername="EmptySignUpUsername",e.EmptySignUpPassword="EmptySignUpPassword",e.EmptyConfirmSignUpUsername="EmptyConfirmSignUpUsername",e.EmptyConfirmSignUpCode="EmptyConfirmSignUpCode",e.EmptyResendSignUpCodeUsername="EmptyresendSignUpCodeUsername",e.EmptyChallengeResponse="EmptyChallengeResponse",e.EmptyConfirmResetPasswordUsername="EmptyConfirmResetPasswordUsername",e.EmptyConfirmResetPasswordNewPassword="EmptyConfirmResetPasswordNewPassword",e.EmptyConfirmResetPasswordConfirmationCode="EmptyConfirmResetPasswordConfirmationCode",e.EmptyResetPasswordUsername="EmptyResetPasswordUsername",e.EmptyVerifyTOTPSetupCode="EmptyVerifyTOTPSetupCode",e.EmptyConfirmUserAttributeCode="EmptyConfirmUserAttributeCode",e.IncorrectMFAMethod="IncorrectMFAMethod",e.EmptyUpdatePassword="EmptyUpdatePassword",e.InvalidPreferredChallenge="InvalidPreferredChallenge"})(yt||(yt={}));const Lne={[yt.EmptyChallengeResponse]:{message:"challengeResponse is required to confirmSignIn"},[yt.EmptyConfirmResetPasswordUsername]:{message:"username is required to confirmResetPassword"},[yt.EmptyConfirmSignUpCode]:{message:"code is required to confirmSignUp"},[yt.EmptyConfirmSignUpUsername]:{message:"username is required to confirmSignUp"},[yt.EmptyConfirmResetPasswordConfirmationCode]:{message:"confirmationCode is required to confirmResetPassword"},[yt.EmptyConfirmResetPasswordNewPassword]:{message:"newPassword is required to confirmResetPassword"},[yt.EmptyResendSignUpCodeUsername]:{message:"username is required to confirmSignUp"},[yt.EmptyResetPasswordUsername]:{message:"username is required to resetPassword"},[yt.EmptySignInPassword]:{message:"password is required to signIn"},[yt.EmptySignInUsername]:{message:"username is required to signIn"},[yt.EmptySignUpPassword]:{message:"password is required to signUp"},[yt.EmptySignUpUsername]:{message:"username is required to signUp"},[yt.CustomAuthSignInPassword]:{message:"A password is not needed when signing in with CUSTOM_WITHOUT_SRP",recoverySuggestion:"Do not include a password in your signIn call."},[yt.IncorrectMFAMethod]:{message:"Incorrect MFA method was chosen. It should be either SMS, TOTP, or EMAIL",recoverySuggestion:"Try to pass SMS, TOTP, or EMAIL as the challengeResponse"},[yt.EmptyVerifyTOTPSetupCode]:{message:"code is required to verifyTotpSetup"},[yt.EmptyUpdatePassword]:{message:"oldPassword and newPassword are required to changePassword"},[yt.EmptyConfirmUserAttributeCode]:{message:"confirmation code is required to confirmUserAttribute"},[yt.InvalidPreferredChallenge]:{message:"The preferred challenge is not enabled in your backend configuration",recoverySuggestion:"Ensure the authentication method is enabled in your Amplify backend configuration"}};var MC;(function(e){e.DEFAULT_MSG="Authentication Error",e.EMPTY_EMAIL="Email cannot be empty",e.EMPTY_PHONE="Phone number cannot be empty",e.EMPTY_USERNAME="Username cannot be empty",e.INVALID_USERNAME="The username should either be a string or one of the sign in types",e.EMPTY_PASSWORD="Password cannot be empty",e.EMPTY_CODE="Confirmation code cannot be empty",e.SIGN_UP_ERROR="Error creating account",e.NO_MFA="No valid MFA method provided",e.INVALID_MFA="Invalid MFA type",e.EMPTY_CHALLENGE="Challenge response cannot be empty",e.NO_USER_SESSION="Failed to get the session because the user is empty",e.NETWORK_ERROR="Network Error",e.DEVICE_CONFIG="Device tracking has not been configured in this User Pool",e.AUTOSIGNIN_ERROR="Please use your credentials to sign in",e.OAUTH_ERROR="Couldn't finish OAuth flow, check your User Pool HostedUI settings"})(MC||(MC={}));var el;(function(e){e.SignInException="SignInException",e.OAuthSignInError="OAuthSignInException"})(el||(el={}));class Je extends rr{constructor(t){super(t),this.constructor=Je,Object.setPrototypeOf(this,Je.prototype)}}function Rr(e,t){const{message:n,recoverySuggestion:r}=Lne[t];if(!e)throw new Je({name:t,message:n,recoverySuggestion:r})}function yr(e){const t=e==null?void 0:e.split("_")[0];if(!e||e.indexOf("_")<0||!t||typeof t!="string")throw new Je({name:"InvalidUserPoolId",message:"Invalid user pool id provided."});return t}function jm(e){if(!e||!e.includes(":"))throw new Je({name:"InvalidIdentityPoolIdException",message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."});return e.split(":")[0]}var PC;(function(e){e.ConcurrentModificationException="ConcurrentModificationException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException"})(PC||(PC={}));var FC;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(FC||(FC={}));var UC;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UsernameExistsException="UsernameExistsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(UC||(UC={}));var BC;(function(e){e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyFailedAttemptsException="TooManyFailedAttemptsException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(BC||(BC={}));var HC;(function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyFailedAttemptsException="TooManyFailedAttemptsException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"})(HC||(HC={}));var $C;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})($C||($C={}));var jC;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(jC||(jC={}));var GC;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(GC||(GC={}));var zC;(function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"})(zC||(zC={}));var VC;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(VC||(VC={}));var WC;(function(e){e.ExternalServiceException="ExternalServiceException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceConflictException="ResourceConflictException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException"})(WC||(WC={}));var qC;(function(e){e.ExternalServiceException="ExternalServiceException",e.InternalErrorException="InternalErrorException",e.InvalidIdentityPoolConfigurationException="InvalidIdentityPoolConfigurationException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceConflictException="ResourceConflictException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException"})(qC||(qC={}));var KC;(function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(KC||(KC={}));var YC;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException"})(YC||(YC={}));var P1;(function(e){e.PasswordResetRequiredException="PasswordResetRequiredException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(P1||(P1={}));var XC;(function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"})(XC||(XC={}));var ZC;(function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.MFAMethodNotFoundException="MFAMethodNotFoundException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(ZC||(ZC={}));var QC;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(QC||(QC={}));var JC;(function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UsernameExistsException="UsernameExistsException"})(JC||(JC={}));var e4;(function(e){e.AliasExistsException="AliasExistsException",e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(e4||(e4={}));var t4;(function(e){e.CodeMismatchException="CodeMismatchException",e.EnableSoftwareTokenMFAException="EnableSoftwareTokenMFAException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(t4||(t4={}));var n4;(function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(n4||(n4={}));var r4;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(r4||(r4={}));var i4;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(i4||(i4={}));const rp="UserUnAuthenticatedException",Mne="UserAlreadyAuthenticatedException",Pne="DeviceMetadataNotFoundException",Fne="InvalidRedirectException",Une="InvalidAppSchemeException",Bne="InvalidPreferredRedirectUrlException",Hne=new Je({name:Fne,message:"signInRedirect or signOutRedirect had an invalid format or was not found.",recoverySuggestion:"Please make sure the signIn/Out redirect in your oauth config is valid."});new Je({name:Une,message:"A valid non-http app scheme was not found in the config.",recoverySuggestion:"Please make sure a valid custom app scheme is present in the config."});new Je({name:Bne,message:"The given preferredRedirectUrl does not match any items in the redirectSignOutUrls array from the config.",recoverySuggestion:"Please make sure a matching preferredRedirectUrl is provided."});const $ne="InvalidOriginException",jne=new Je({name:$ne,message:"redirect is coming from a different origin. The oauth flow needs to be initiated from the same origin",recoverySuggestion:"Please call signInWithRedirect from the same origin."}),Gne="OAuthSignOutException",zne="TokenRefreshException",Vne="UnexpectedSignInInterruptionException";function Wne(e){if(!e||!e.accessToken)throw new Je({name:rp,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}function qne(e){if(!e||!e.idToken)throw new Je({name:rp,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}const Kne=new Je({name:zne,message:`Token refresh is not supported when authenticated with the 'implicit grant' (token) oauth flow.
|