@australiangreens/ag-internal-components 0.0.57 → 0.0.58

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.
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"DevDemo.d.ts","sourceRoot":"","sources":["../../src/DevDemo/DevDemo.tsx"],"names":[],"mappings":";AAYA,MAAM,CAAC,OAAO,UAAU,OAAO,gBAuB9B"}
1
+ {"version":3,"file":"DevDemo.d.ts","sourceRoot":"","sources":["../../src/DevDemo/DevDemo.tsx"],"names":[],"mappings":";AAaA,MAAM,CAAC,OAAO,UAAU,OAAO,gBAwB9B"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ export default function FetchAutocompleteDemo(): JSX.Element;
3
+ //# sourceMappingURL=FetchAutocompleteDemo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FetchAutocompleteDemo.d.ts","sourceRoot":"","sources":["../../src/DevDemo/FetchAutocompleteDemo.tsx"],"names":[],"mappings":";AA6CA,MAAM,CAAC,OAAO,UAAU,qBAAqB,gBAuB5C"}
@@ -1 +1 @@
1
- {"version":3,"file":"NavBarContent.d.ts","sourceRoot":"","sources":["../../src/DevDemo/NavBarContent.tsx"],"names":[],"mappings":";AAeA,MAAM,CAAC,OAAO,UAAU,aAAa,gBA+EpC"}
1
+ {"version":3,"file":"NavBarContent.d.ts","sourceRoot":"","sources":["../../src/DevDemo/NavBarContent.tsx"],"names":[],"mappings":";AAgBA,MAAM,CAAC,OAAO,UAAU,aAAa,gBA0FpC"}
@@ -1,2 +1,2 @@
1
- "use strict";var it=Object.defineProperty,st=Object.defineProperties;var lt=Object.getOwnPropertyDescriptors;var X=Object.getOwnPropertySymbols;var Se=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable;var ae=(e,t,o)=>t in e?it(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,i=(e,t)=>{for(var o in t||(t={}))Se.call(t,o)&&ae(e,o,t[o]);if(X)for(var o of X(t))be.call(t,o)&&ae(e,o,t[o]);return e},A=(e,t)=>st(e,lt(t));var Te=(e,t)=>{var o={};for(var a in e)Se.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(e!=null&&X)for(var a of X(e))t.indexOf(a)<0&&be.call(e,a)&&(o[a]=e[a]);return o};var Be=(e,t,o)=>(ae(e,typeof t!="symbol"?t+"":t,o),o);var Q=(e,t,o)=>new Promise((a,s)=>{var l=d=>{try{p(o.next(d))}catch(c){s(c)}},u=d=>{try{p(o.throw(d))}catch(c){s(c)}},p=d=>d.done?a(d.value):Promise.resolve(d.value).then(l,u);p((o=o.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),g=require("react"),r=require("@mui/material"),dt=require("@mui/material/CssBaseline"),b=require("@mui/material/styles"),ct=require("@australiangreens/ag-error"),Z=require("souvlaki"),ut=require("@mui/material/List"),pt=require("@mui/material/Button"),gt=require("@mui/material/Dialog"),ht=require("@mui/material/DialogActions"),xt=require("@mui/material/DialogContent"),ft=require("@mui/material/DialogTitle"),q=require("@mui/icons-material"),f=require("jotai"),mt=require("jotai/utils"),F=e=>e&&e.__esModule?e:{default:e},vt=F(dt),_e=F(ut),je=F(pt),Ct=F(gt),wt=F(ht),At=F(xt),St=F(ft);function bt({text:e}){const[t,o]=g.useState(0);return n.jsxs(n.Fragment,{children:[n.jsx(r.Typography,{variant:"h6",color:"inherit",component:"div",sx:{fontSize:"22px"},children:"Hello world"}),n.jsx(r.Typography,{variant:"caption",display:"block",children:n.jsx("span",{children:"Just ensuring MUI is working as planned as a peer dependency. v0.0.11"})}),n.jsx(r.Button,{variant:"outlined",onClick:()=>o(a=>a+1),"aria-label":"Increment",children:"Hello I am a button"}),n.jsxs("p",{children:["This is some text: ",n.jsx("span",{children:e})]}),n.jsxs(r.Paper,{children:["This number will incremember when button pressed: ",t]})]})}const le=330,de=73,k="Navbar",E={root:`${k}-root`,menuButton:`${k}-menuButton`,hide:`${k}-hide`,content:`${k}-content`,userInfoHolder:`${k}-userInfoHolder`,settings:`${k}-settings`,pieChartIcon:`${k}-pieChartIcon`},Tt=b.styled(r.Box,{name:"NavBar"})(({theme:e})=>({[`&.${E.root}`]:{display:"flex"},[`& .${E.menuButton}`]:{marginRight:36},[`& .${E.hide}`]:{display:"none"},[`& .${E.content}`]:{flexGrow:1,padding:e.spacing(3)},[`& .${E.userInfoHolder}`]:{height:"148px",marginTop:"64px",marginBottom:"16px"}})),Me=()=>({position:"absolute",height:"100%",overflowX:"hidden",overflowY:"hidden",color:"white",backgroundColor:"black"}),Bt=()=>i({width:le},Me()),jt=()=>i({width:de},Me()),Dt=b.styled(r.Drawer,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>i(i({width:t?le:de,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",zIndex:e.zIndex.drawer+100},t&&{"& .MuiDrawer-paper":Bt()}),!t&&{"& .MuiDrawer-paper":jt()}));class ee extends ct.AgError{}Be(ee,"errorName","ContextError");const He=g.createContext(null),It={},yt={},Re=({overrideState:e=It,overrideActions:t=yt,children:o})=>{const[{open:a},s]=g.useState({open:!0}),l=g.useCallback(d=>{s({open:d})},[]),u=g.useCallback(()=>{s(d=>A(i({},d),{open:!d.open}))},[]),p=i(i({open:a,setOpen:l,toggleOpen:u},e),t);return n.jsx(He.Provider,{value:p,children:o})},qe=()=>{const e=g.useContext(He);if(e===null)throw new ee("Error: Tried to useNavBar outside of a <NavBarProvider>");return e},We=(e={})=>i({open:!0},e),Ot=Z.createHelper((e=We(),t={})=>({children:o})=>n.jsx(Re,{overrideState:e,overrideActions:t,children:o})),De=7,kt=b.styled(_e.default)(({theme:e})=>({backgroundColor:"black",color:"white","& .MuiListItem-root":{padding:"unset"},"& .MuiListItemButton-root":{" .MuiListItemIcon-root":{color:"white",padding:`${De}px`},"&.Mui-focusVisible":{backgroundColor:e.palette.grey[700]},"&.Mui-selected":{borderLeftStyle:"solid",borderLeftWidth:"7px",borderLeftColor:e.palette.primary.main,paddingLeft:`calc(${e.spacing(2)} - ${De}px)`},"&:hover":{backgroundColor:e.palette.primary.dark},"&.Mui-selected.Mui-focusVisible":{backgroundColor:e.palette.grey[700]},"&.Mui-selected:hover":{backgroundColor:e.palette.primary.dark}}})),Ie=7,Nt=b.styled(_e.default)(({theme:e})=>({backgroundColor:"#e8e8e8",color:"inherit","& .MuiListItem-root":{padding:"unset"},"& .MuiListItemButton-root":{" .MuiListItemIcon-root":{color:"inherit",padding:`${Ie}px`},"&.Mui-focusVisible":{backgroundColor:e.palette.grey[700]},"&.Mui-selected":{borderLeftStyle:"solid",borderLeftWidth:"7px",borderLeftColor:e.palette.primary.main,paddingLeft:`calc(${e.spacing(2)} - ${Ie}px)`},"&:hover":{backgroundColor:e.palette.primary.dark},"&.Mui-selected.Mui-focusVisible":{backgroundColor:e.palette.grey[700]},"&.Mui-selected:hover":{backgroundColor:e.palette.primary.dark}}}));function Et({"data-testid":e,children:t}){const{open:o}=qe();return n.jsxs(Tt,{className:E.root,"data-testid":e,children:[n.jsx(vt.default,{}),n.jsx(Dt,{variant:"permanent",anchor:"left",transitionDuration:null,open:o,children:t})]})}const ze=({isOpen:e,dialogTitle:t,children:o,maxWidth:a,primaryButton:s,secondaryButton:l,onClose:u})=>{var c,m;const[p,d]=g.useState(!1);return n.jsxs(Ct.default,{open:e,onClose:()=>{p||u()},fullWidth:!0,maxWidth:a!=null?a:"xs",children:[n.jsx(St.default,{children:t}),n.jsx(At.default,{sx:{"& > :last-child":{marginBottom:0}},children:o}),n.jsxs(wt.default,{children:[n.jsx(je.default,{onClick:(c=l==null?void 0:l.onClick)!=null?c:u,"data-testid":l==null?void 0:l.testId,disabled:(l==null?void 0:l.disabled)||p,color:l==null?void 0:l.buttonColor,children:(m=l==null?void 0:l.text)!=null?m:"Cancel"}),s&&n.jsx(je.default,{onClick:()=>Q(exports,null,function*(){var v;d(!0),yield(v=s.onClick)==null?void 0:v.call(s),d(!1)}),"data-testid":s.testId,disabled:s.disabled||p,color:s==null?void 0:s.buttonColor,children:s.text})]})]})},Ft=24,Pt=64,N="TopBar",T={topStripe:`${N}-topStripe`,titleBar:`${N}-titleBar`,titleSlider:`${N}-titleSlider`,titleText:`${N}-titleText`,leftPanelButton:`${N}-leftPanelButton`,rightPanelButton:`${N}-leftPanelButton`},$t=r.styled("div",{shouldForwardProp:e=>!["leftPanel","rightPanel"].includes(e),name:N})(({theme:e,leftPanel:t,rightPanel:o})=>{var a,s;return{width:"100%",[`& .${T.topStripe}`]:{width:"100%",height:`${Ft}px`,backgroundColor:e.palette.primary.main},[`& .${T.titleBar}`]:{backgroundColor:e.palette.primary.light,height:`${Pt}px`,padding:e.spacing(0,3),width:"100%"},[`& .${T.titleSlider}`]:i(i({height:"100%",display:"flex",alignItems:"center",color:"white",transition:e.transitions.create("margin",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),[`& .${T.leftPanelButton}`]:{marginRight:e.spacing(2),flexGrow:0},[`& .${T.titleText}`]:{flexGrow:1},[`& .${T.rightPanelButton}`]:{flexGrow:0}},(t==null?void 0:t.open)&&{transition:e.transitions.create("margin",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen}),marginLeft:`${(a=t==null?void 0:t.width)!=null?a:0}px`}),(o==null?void 0:o.open)&&{transition:e.transitions.create("margin",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen}),marginRight:`${(s=o==null?void 0:o.width)!=null?s:0}px`})}});function Lt({titleText:e="",leftPanel:t,rightPanel:o,"data-testid":a}){return n.jsxs($t,{leftPanel:t,rightPanel:o,"data-testid":a,children:[n.jsx("div",{className:T.topStripe}),n.jsx("div",{className:T.titleBar,children:n.jsxs(r.Box,{className:T.titleSlider,children:[t!==void 0&&!t.open&&t.showOpenArrow&&n.jsxs(r.IconButton,{className:T.leftPanelButton,color:"inherit","aria-label":"Open left side panel",onClick:t==null?void 0:t.onOpen,edge:"start",size:"large",children:[" ",n.jsx(q.ArrowForward,{})]}),n.jsx(r.Typography,{className:T.titleText,variant:"h6",noWrap:!0,children:e}),o!==void 0&&!o.open&&o.showOpenArrow&&n.jsxs(r.IconButton,{className:T.rightPanelButton,color:"inherit","aria-label":"Open right side panel",onClick:o==null?void 0:o.onOpen,edge:"end",size:"large",children:[" ",n.jsx(q.ArrowBack,{})]})]})})]})}const Ge=400,_t=r.styled(r.Drawer,{shouldForwardProp:e=>!["width","debug","debugOpacity","navBarOpen","navBarWidthOpen","navBarWidthClosed"].includes(e),name:"SidePanelDrawer"})(({width:e,debugOpacity:t=!1,anchor:o,navBarOpen:a,navBarWidthOpen:s,navBarWidthClosed:l})=>({width:e,"& .MuiDrawer-paper":i(i({position:"absolute",width:e,boxSizing:"border-box",border:"unset",boxShadow:"0px 4px 5px rgba(0, 0, 0, 0.14), 0px 1px 10px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.2)"},t&&{opacity:"50%"}),o==="left"&&i({marginLeft:`${l}px`},a&&{marginLeft:`${s}px`}))})),Mt=r.styled(r.Box,{shouldForwardProp:e=>!["anchor"].includes(e)})(({theme:e,anchor:t})=>A(i({display:"flex",alignItems:"center",padding:e.spacing(2)},e.mixins.toolbar),{justifyContent:t==="left"?"space-between":"flex-start",backgroundColor:e.palette.primary.light,height:"88px","&,*":{color:"white"}," .MuiTypography-root":{fontSize:"22px"}," .MuiButtonBase-root":{marginRight:t==="right"?e.spacing(2):0}}));function ye({children:e,anchor:t="left",open:o,onClose:a=()=>{},titleText:s="",width:l=Ge,showCloseArrow:u=!0,debugOpacity:p=!1,headerBoxProps:d={},onOpened:c,onClosed:m,"data-testid":v,navBarOpen:w=!1,navBarWidthOpen:C=0,navBarWidthClosed:j=0}){return n.jsxs(_t,{SlideProps:{onEntered:()=>c==null?void 0:c(),onExited:()=>m==null?void 0:m()},variant:"persistent",anchor:t,open:o,width:l,debugOpacity:p,"data-testid":v,navBarOpen:w,navBarWidthOpen:C,navBarWidthClosed:j,children:[n.jsx(Mt,A(i({anchor:t},d),{children:t==="left"?n.jsxs(n.Fragment,{children:[n.jsx(r.Typography,{variant:"h6",color:"inherit",component:"div",children:s}),u&&n.jsxs(r.IconButton,{onClick:a,size:"large","aria-label":"Close left side panel",children:[n.jsx(q.ArrowBack,{"data-testid":"arrowbackicon"})," "]})]}):n.jsxs(n.Fragment,{children:[u&&n.jsxs(r.IconButton,{onClick:a,size:"large","aria-label":"Close right side panel",children:[n.jsx(q.ArrowForward,{})," "]}),n.jsx(r.Typography,{variant:"h6",color:"inherit",component:"div",children:s})]})})),e]})}const Ht=b.styled(r.Box,{shouldForwardProp:e=>!["leftPanel","rightPanel"].includes(e),name:"PanelAwareMargins"})(({theme:e,leftPanel:t,rightPanel:o})=>{var a,s;return i(i({transition:e.transitions.create("margin",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen})},(t==null?void 0:t.open)&&{transition:e.transitions.create("margin",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen}),marginLeft:`${(a=t==null?void 0:t.width)!=null?a:0}px`}),(o==null?void 0:o.open)&&{transition:e.transitions.create("margin",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen}),marginRight:`${(s=o==null?void 0:o.width)!=null?s:0}px`})}),Rt=b.styled(r.Container,{name:"PageContainer"})(({theme:e})=>({paddingTop:e.spacing(3),paddingBottom:e.spacing(3)})),ie=!1,se=!1,J={titleText:"",flavour:"push",width:Ge,arrowButtons:"both",startOpen:!1,open:void 0,onChangeOpen:void 0,content:n.jsx(n.Fragment,{}),onOpened:void 0,onClosed:void 0,dataTestId:void 0};function qt({children:e,titleText:t="",leftPanel:o,rightPanel:a,sidePanelsAreMutuallyExclusive:s=!0,debugOpacity:l=!1,pageContainerProps:u,pageContentDataTestId:p,topBarDataTestId:d,navBarOpen:c,navBarWidthOpen:m,navBarWidthClosed:v}){const[w,C]=g.useState(ie),[j,D]=g.useState(se),[B,S]=g.useState(ie),[I,$]=g.useState(se),L=o!==void 0,_=a!==void 0,{titleText:y,content:z,flavour:G,open:M,onChangeOpen:H,width:h,arrowButtons:x,startOpen:P,onOpened:Ye,onClosed:Ze,dataTestId:et}=o?i(i({},J),o):i({},J),{titleText:tt,content:nt,flavour:ve,open:te,onChangeOpen:Ce,width:ne,arrowButtons:U,startOpen:V,onOpened:ot,onClosed:rt,dataTestId:at}=a?i(i({},J),a):i({},J);g.useEffect(()=>{P!==ie&&(C(P),S(P))},[P]),g.useEffect(()=>{V!==se&&(D(V),$(V))},[V]);const oe=M===void 0?w:M,re=te===void 0?j:te,we=O=>{M===void 0&&(C(O),s&&_&&(O?(D(!1),$(j)):D(I))),H&&H(O)},Ae=O=>{te===void 0&&(D(O),s&&L&&(O?(C(!1),S(w)):C(B))),Ce&&Ce(O)};return n.jsxs(r.Box,{children:[L&&n.jsx(ye,{"data-testid":et,anchor:"left",open:oe,onClose:()=>we(!1),width:h,titleText:y,debugOpacity:l,showCloseArrow:x==="both"||x==="close",onOpened:Ye,onClosed:Ze,navBarOpen:c,navBarWidthOpen:m,navBarWidthClosed:v,children:z}),_&&n.jsx(ye,{"data-testid":at,anchor:"right",open:re,onClose:()=>Ae(!1),width:ne,titleText:tt,debugOpacity:l,showCloseArrow:U==="both"||U==="close",onOpened:ot,onClosed:rt,navBarOpen:c,navBarWidthOpen:m,navBarWidthClosed:v,children:nt}),n.jsx(Lt,i(i({titleText:t,"data-testid":d},L&&G==="push"?{leftPanel:{open:oe,width:h,onOpen:()=>we(!0),showOpenArrow:x==="both"||x==="open"}}:{}),_&&ve==="push"?{rightPanel:{open:re,width:ne,onOpen:()=>Ae(!0),showOpenArrow:U==="both"||U==="open"}}:{})),n.jsx(Ht,A(i(i({},G==="push"?{leftPanel:{open:oe,width:h}}:{}),ve==="push"?{rightPanel:{open:re,width:ne}}:{}),{children:n.jsx(Rt,A(i({"data-testid":p},u),{children:e}))}))]})}const ce=()=>{const e=r.useTheme();return r.useMediaQuery(e.breakpoints.down("sm"))},Wt=64,zt=64,Gt=256,W=f.atom(!0),ue=f.atom(Gt),pe=f.atom(zt),ge=f.atom(""),he=f.atom(Wt),xe=f.atom(void 0);function Ut({links:e}){return n.jsx("div",{children:"LinksMenu not implemented yet"})}const K="Navbar",R={root:`${K}-root`,menuButton:`${K}-menuButton`,hide:`${K}-hide`,content:`${K}-content`},Vt=b.styled(r.Box,{name:"NavBar"})(({theme:e})=>({[`&.${R.root}`]:{display:"flex"},[`& .${R.menuButton}`]:{marginRight:36},[`& .${R.hide}`]:{display:"none"},[`& .${R.content}`]:{flexGrow:1,padding:e.spacing(3)}})),Y=(e,t,o)=>e.transitions.create(t,{easing:e.transitions.easing.sharp,duration:o==="leaving"?e.transitions.duration.leavingScreen:e.transitions.duration.enteringScreen}),Xt=e=>{const t=r.useTheme();return n.jsx(r.Collapse,i({easing:t.transitions.easing.sharp,timeout:{enter:t.transitions.duration.enteringScreen,exit:t.transitions.duration.leavingScreen}},e))},Ue=e=>{var t,o;return{overflowX:"hidden",color:"inherit",backgroundColor:(o=(t=e==null?void 0:e.navBar)==null?void 0:t.backgroundColor)!=null?o:"white"}},Oe=(e,t)=>i({width:t,transition:Y(e,"width","entering")},Ue(e)),ke=(e,t)=>i({width:t,transition:Y(e,"width","leaving")},Ue(e)),Qt=b.styled(r.Drawer,{shouldForwardProp:e=>!["widthOpen","widthClosed","isSmallScreen"].includes(e)})(({theme:e,open:t,widthOpen:o,widthClosed:a,isSmallScreen:s})=>i(i({flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",display:"flex",flexDirection:"column"},t&&A(i({},Oe(e,o)),{backgroundColor:"","& .MuiDrawer-paper":Oe(e,o)})),!t&&A(i({},ke(e,s?o:a)),{backgroundColor:"","& .MuiDrawer-paper":ke(e,s?o:a)})));function Jt(e){let t=0;for(let o=0,a=e.length;o<a;o++){const s=e.charCodeAt(o);t=(t<<5)-t+s,t|=0}return t}const Ne=["#A62A21","#7e3794","#0B51C1","#3A6024","#A81563","#B3003C"],Kt=e=>e.split(/\s/).map(t=>t.substring(0,1).toUpperCase()).filter(t=>!!t).slice(0,2).join("").toUpperCase();function Yt({user:e,domainCode:t,open:o}){const a=r.useTheme();return n.jsxs(r.Box,{sx:{paddingTop:3,display:"flex",alignItems:"center",flexDirection:"column",gap:"0.5rem"},children:[n.jsx(r.Box,{sx:{width:o?"5rem":"2rem",transition:o?Y(a,["width","height"],"entering"):Y(a,["width","height"],"leaving"),aspectRatio:1},children:e!=null&&e.name?n.jsx(r.Avatar,{src:e==null?void 0:e.picture,sx:{width:"100%",height:"100%",bgcolor:Ne[Math.abs(Jt(e.name))%Ne.length]},children:Kt(e.name)}):n.jsx(r.Avatar,{sx:{width:"100%",height:"100%"}})}),n.jsx(Xt,{sx:{width:"100%"},in:o,children:n.jsx(r.Fade,{in:o,children:n.jsxs(r.Box,{width:"100%",display:"flex",flexDirection:"column",alignItems:"center",children:[e!=null&&e.name?n.jsx(r.Typography,{children:e.name}):n.jsx(r.Skeleton,{animation:!1,width:"50%"}),t?n.jsx(r.Typography,{children:t.toUpperCase()}):n.jsx(r.Skeleton,{animation:!1,width:"25%"})]})})})]})}function Zt({open:e,widthClosed:t,widthOpen:o,"data-testid":a,top:s,middle:l,bottom:u,user:p,domainCode:d}){const c=ce(),m=f.useSetAtom(W);return n.jsx(Vt,{className:R.root,"data-testid":a,children:n.jsxs(Qt,{open:e,widthOpen:o,widthClosed:t,anchor:"left",variant:c?"temporary":"permanent",PaperProps:{component:"nav"},onClose:()=>{m(!1)},isSmallScreen:c,children:[!c&&n.jsx(r.Toolbar,{}),s&&n.jsxs(r.Box,{flexGrow:"0",children:[s,n.jsx(r.Divider,{variant:"middle"})]}),n.jsx(r.Box,{flexGrow:"1",children:Array.isArray(l)?n.jsx(Ut,{links:l}):l}),n.jsxs(r.Box,{flexGrow:"0",children:[n.jsx(r.Divider,{variant:"middle"}),n.jsx(Yt,{user:p,domainCode:d,open:e}),u&&n.jsx(n.Fragment,{children:u})]})]})})}function en({children:e,topBarHeight:t}){return n.jsx(r.Box,{sx:{overflow:"auto",height:`calc(100vh - ${t}px)`,scrollbarGutter:"stable",flexGrow:1},children:n.jsx(r.Container,{component:"main",id:"main-content",sx:{paddingTop:3,paddingBottom:3,flexGrow:1},children:e})})}const tn="TopBar",nn={titleText:`${tn}-titleText`};function on({titleText:e="",height:t,"data-testid":o}){const a=f.useSetAtom(W),s=()=>a(p=>!p),l=r.useTheme(),u=ce();return n.jsx("header",{"data-testid":o,children:n.jsxs(r.Paper,{square:!0,elevation:0,sx:{width:"100%",position:"sticky",color:"primary.contrastText",backgroundColor:"primary.main",display:"flex",alignItems:"center",gap:2,flexShrink:0,height:t,zIndex:u?0:l.zIndex.drawer+1},children:[n.jsx(r.IconButton,{size:"medium",color:"inherit",sx:{padding:1.5},onClick:s,children:n.jsx(q.ViewHeadline,{fontSize:"medium"})}),n.jsx(r.Typography,{className:nn.titleText,variant:"h6",children:e})]})})}function rn({children:e,initialTitleText:t,initialNavBarOpen:o,pageContainerProps:a,pageContentDataTestId:s,topBarDataTestId:l,navBarDataTestId:u,navBarMiddle:p,navBarBottom:d,user:c,domainCode:m}){const[v,w]=f.useAtom(W),[C]=f.useAtom(ue),[j]=f.useAtom(pe),[D,B]=f.useAtom(ge),[S]=f.useAtom(he),[I]=f.useAtom(xe);return g.useEffect(()=>{t!==void 0&&B(t)},[t,B]),g.useEffect(()=>{o!==void 0&&w(o)},[o,w]),n.jsxs(r.Box,{children:[n.jsx(r.CssBaseline,{}),n.jsx(on,{titleText:D,"data-testid":l,height:S}),n.jsxs(r.Box,{sx:{display:"flex"},children:[n.jsx(Zt,{open:v,top:I,middle:p,bottom:d,user:c,domainCode:m,widthOpen:C,widthClosed:j,offsetTop:S,"data-testid":u}),n.jsx(en,A(i({"data-testid":s,topBarHeight:S},a),{children:e}))]})]})}const an={autoHideDuration:6e3,anchorOrigin:{vertical:"top",horizontal:"center"},disableWindowBlurListener:!1},sn={shouldClose:(e,t)=>t!=="clickaway"},Ee={message:"",severity:"info",variant:"standard",progressIndicator:void 0},Fe=100,Pe=2e3,ln=2e3,dn=(()=>{let e=0;return()=>(e+=1,e)})(),cn={borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px"},un={},pn={},fe=g.createContext(null);function Ve(l){var u=l,{overrideState:e=un,overrideActions:t=pn,shouldClose:o=sn.shouldClose,children:a}=u,s=Te(u,["overrideState","overrideActions","shouldClose","children"]);var H;const[{open:p},d]=g.useState({open:!1}),c=g.useRef([]),m=g.useRef(Date.now()),v=g.useRef(0),w=g.useCallback(h=>{d({open:h})},[]),C=g.useCallback((h={})=>{v.current+=1,c.current.length>=Fe&&Date.now()-m.current>=Pe&&(m.current=Date.now(),console.error(`SaladBarProvider: MAX_QUEUE_LENGTH (${Fe}) hit ${v.current} times in last ${Pe}ms)`),v.current=0);const x=i(A(i({},Ee),{key:dn()}),h);return c.current.push(x),c.current.length===1&&d({open:!0}),x.key},[]),j=(h="",x={})=>C(i({message:h,severity:"success"},x)),D=(h="",x={})=>C(i({message:h,severity:"info"},x)),B=(h="",x={})=>C(i({message:h,severity:"warning"},x)),S=(h="",x={})=>C(i({message:h,severity:"error"},x)),I=h=>{const x=c.current.findIndex(P=>P.key===h);if(x!==-1)return x===0?(d({open:!1}),c.current[0]):c.current.splice(x,1)},$=(h,x)=>{o(h,x)&&d({open:!1})},L=()=>{},_=()=>{c.current.shift(),c.current.length>0&&d({open:!0})},y=(H=c.current[0])!=null?H:i({},Ee),z={};"autoHideDuration"in y&&(z.autoHideDuration=y.autoHideDuration);const G=i(i({},an),s),M=i(i({open:p,setOpen:w,enqueueNotification:C,enqueueSuccessNotification:j,enqueueInfoNotification:D,enqueueWarningNotification:B,enqueueErrorNotification:S,removeNotification:I},e),t);return n.jsxs(fe.Provider,{value:M,children:[a,n.jsx(r.Snackbar,A(i(i({},G),z),{open:p,onClose:$,TransitionProps:{onExited:_,onExit:L},sx:{zIndex:ln},children:n.jsxs("div",{children:[n.jsx(r.Alert,{onClose:h=>$(h,"closeAlert"),severity:y.severity,variant:"filled",icon:y.progressIndicator==="circular"?n.jsx(r.CircularProgress,{size:"1em"}):void 0,style:y.progressIndicator==="linear"?cn:void 0,children:y.message}),y.progressIndicator==="linear"&&n.jsx(r.LinearProgress,{color:"primary"})]})}))]})}function Xe(){const e=g.useContext(fe);if(e===null)throw new ee("Error: Tried to useSaladBar outside of a <SaladBarProvider>");return e}const gn=Z.createHelper((e={autoHideDuration:1},t={},o={})=>({children:a})=>n.jsx(Ve,A(i({},e),{overrideState:t,overrideActions:o,children:a}))),Qe=f.getDefaultStore(),hn=({children:e,store:t})=>n.jsx(f.Provider,{store:t!=null?t:Qe,children:e}),Je="domainCode";var Le;const $e=f.atom(JSON.parse((Le=localStorage.getItem(Je))!=null?Le:'{"domainCode": ""}').domainCode),me=f.atom(e=>e($e),(e,t,o)=>{t($e,o),localStorage.setItem(Je,JSON.stringify({domainCode:o}))}),xn={act:"ACT",nsw:"NSW",nt:"NT",qld:"QLD",sa:"SA",tas:"TAS",vic:"VIC",wa:"WA",ag:"AG",fedmps:"Fedmps","":""},fn=e=>{var t;return e===null?"N/A":(t=xn[e])!=null?t:""},mn=({isLoading:e,isOpen:t,onClose:o,domainOptions:a,applicationName:s,handleLogout:l})=>{const[u,p]=f.useAtom(me),[d,c]=g.useState(u),{enqueueSuccessNotification:m}=Xe(),v=a.length===0,w=!!u&&!a.includes(u)&&!a.includes(d),C=!u||v||w,j=()=>Q(exports,null,function*(){d?(p(d),m(`Set domain to ${d}`),o()):p("")}),D=()=>Q(exports,null,function*(){u&&!v&&!w?(c(u),o()):C&&l()});let B;return v?B="Unable to retrieve your active organisations. Try logging in again.":w&&(B="You no longer have any roles in your chosen organisation. Please choose another."),n.jsxs(ze,{isOpen:t,dialogTitle:"Select an organisation",primaryButton:{text:"Confirm",onClick:j,disabled:!d||v||w,buttonColor:"primary"},secondaryButton:{text:C?"Logout":"Cancel",onClick:D},onClose:C?()=>{}:o,children:[n.jsxs(r.Typography,{marginBottom:2,children:["Select the default organisation that you want to use with the ",s,"."]}),n.jsx(r.Autocomplete,{loading:e,multiple:!1,disableClearable:!1,value:d!==""?d:null,onChange:(S,I)=>c(I!=null?I:""),getOptionLabel:fn,options:[...a],renderInput:S=>n.jsx(r.TextField,A(i({},S),{variant:"filled",label:"Select organisation",InputProps:A(i({},S.InputProps),{endAdornment:n.jsxs(n.Fragment,{children:[e?n.jsx(r.CircularProgress,{color:"inherit",size:20,sx:{marginTop:"-20px"}}):null,S.InputProps.endAdornment]})})}))}),B&&n.jsx(r.FormHelperText,{error:!0,children:B})]})},vn=b.createTheme({palette:{primary:{dark:"#00A651",light:"#A3D39C",main:"#007236",contrastText:"#FFF"},warning:{main:"#F5871F",light:"#FCC589",dark:"#A2590A",contrastText:"#FFF"},secondary:{main:"#662D91",light:"#BD8CBF",dark:"#440E62",contrastText:"#FFF"},error:{main:"#D43C95",light:"#8F2064",dark:"#F9CDE0",contrastText:"#FFF"},info:{main:"#00A88D",light:"#ADDCCF",dark:"#005243",contrastText:"#FFF"},success:{main:"#00A651",light:"#A3D39C",dark:"#007236",contrastText:"#FFF"}},typography:{explainer:{fontSize:"14px",marginBlockStart:"1em"}},navBar:{backgroundColor:"#E8E8E8"}}),Cn=b.createTheme({palette:{primary:{main:"#007236",dark:"#005221",light:"#00A04E",contrastText:"#FFFFFF"},secondary:{main:"#662D91",dark:"#440E62",light:"#93268F",contrastText:"#FFFFFF"},error:{main:"#D32F2F",dark:"#C62828",light:"#EF5350"},info:{main:"#0288D1",dark:"#01579B",light:"#03A9F4"},success:{main:"#0288D1",dark:"#01579B",light:"#03A9F4"}},components:{MuiTextField:{defaultProps:{color:"secondary"}},MuiToggleButtonGroup:{defaultProps:{color:"secondary"}},MuiCheckbox:{defaultProps:{color:"secondary"}},MuiSelect:{defaultProps:{color:"secondary"}},MuiSwitch:{defaultProps:{color:"secondary"}},MuiFormControl:{defaultProps:{color:"secondary"}},MuiMenuItem:{styleOverrides:{root:({theme:e})=>({"&.Mui-selected":{backgroundColor:b.alpha(e.palette.secondary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:b.alpha(e.palette.secondary.main,e.palette.action.selectedOpacity)},"&.Mui-focusVisible":{backgroundColor:b.alpha(e.palette.secondary.main,e.palette.action.focusOpacity)}}})}}},typography:{explainer:{fontSize:"14px",marginBlockStart:"1em"},h3:{fontSize:"1rem",fontWeight:700}},navBar:{backgroundColor:"#E8E8E8"}}),wn={domainCode:me,navBarOpen:W,navBarWidthOpen:ue,navBarWidthClosed:pe,titleText:ge,topBarHeight:he,navBarTop:xe},An=Z.createHelper(()=>({children:e})=>n.jsx(f.Provider,{children:e})),Ke=({initialValues:e,children:t})=>(mt.useHydrateAtoms(e),n.jsx(n.Fragment,{children:t})),Sn=Z.createHelper(e=>({children:t})=>n.jsx(Ke,{initialValues:Object.entries(e).map(([o,a])=>[wn[o],a]),children:t}));exports.AgDialog=ze;exports.AppLayout=rn;exports.AtomProvider=hn;exports.Context=fe;exports.ContextError=ee;exports.DomainCodeDialog=mn;exports.ExampleComponent=bt;exports.HydrateAtoms=Ke;exports.NAVBAR_WIDTH_CLOSED=de;exports.NAVBAR_WIDTH_OPENED=le;exports.NavBar=Et;exports.NavBarDarkStyledList=kt;exports.NavBarLightStyledList=Nt;exports.NavBarProvider=Re;exports.PageLayout=qt;exports.SaladBarProvider=Ve;exports.atomStore=Qe;exports.buildNavBarState=We;exports.domainCodeAtom=me;exports.fed21Theme=vn;exports.internalAgSystemsTheme=Cn;exports.navBarClasses=E;exports.navBarOpenAtom=W;exports.navBarTopAtom=xe;exports.navBarWidthClosedAtom=pe;exports.navBarWidthOpenAtom=ue;exports.titleTextAtom=ge;exports.topBarHeightAtom=he;exports.useNavBar=qe;exports.useSaladBar=Xe;exports.useSmallScreen=ce;exports.withAtomProvider=An;exports.withNavBarProvider=Ot;exports.withOverrideDefaults=Sn;exports.withSaladBarProvider=gn;
1
+ "use strict";var at=Object.defineProperty,st=Object.defineProperties;var lt=Object.getOwnPropertyDescriptors;var Q=Object.getOwnPropertySymbols;var be=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable;var ie=(e,t,o)=>t in e?at(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,a=(e,t)=>{for(var o in t||(t={}))be.call(t,o)&&ie(e,o,t[o]);if(Q)for(var o of Q(t))Se.call(t,o)&&ie(e,o,t[o]);return e},j=(e,t)=>st(e,lt(t));var je=(e,t)=>{var o={};for(var i in e)be.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(e!=null&&Q)for(var i of Q(e))t.indexOf(i)<0&&Se.call(e,i)&&(o[i]=e[i]);return o};var Be=(e,t,o)=>(ie(e,typeof t!="symbol"?t+"":t,o),o);var z=(e,t,o)=>new Promise((i,s)=>{var l=u=>{try{x(o.next(u))}catch(p){s(p)}},c=u=>{try{x(o.throw(u))}catch(p){s(p)}},x=u=>u.done?i(u.value):Promise.resolve(u.value).then(l,c);x((o=o.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),h=require("react"),r=require("@mui/material"),ct=require("@mui/material/CssBaseline"),T=require("@mui/material/styles"),dt=require("@australiangreens/ag-error"),Z=require("souvlaki"),ut=require("@mui/material/List"),pt=require("@mui/material/Button"),ht=require("@mui/material/Dialog"),gt=require("@mui/material/DialogActions"),xt=require("@mui/material/DialogContent"),ft=require("@mui/material/DialogTitle"),W=require("@mui/icons-material"),mt=require("autosuggest-highlight/parse"),vt=require("autosuggest-highlight/match"),S=require("jotai"),Ct=require("jotai/utils"),P=e=>e&&e.__esModule?e:{default:e},wt=P(ct),Le=P(ut),De=P(pt),At=P(ht),bt=P(gt),St=P(xt),jt=P(ft),Bt=P(mt),Dt=P(vt);function Tt({text:e}){const[t,o]=h.useState(0);return n.jsxs(n.Fragment,{children:[n.jsx(r.Typography,{variant:"h6",color:"inherit",component:"div",sx:{fontSize:"22px"},children:"Hello world"}),n.jsx(r.Typography,{variant:"caption",display:"block",children:n.jsx("span",{children:"Just ensuring MUI is working as planned as a peer dependency. v0.0.11"})}),n.jsx(r.Button,{variant:"outlined",onClick:()=>o(i=>i+1),"aria-label":"Increment",children:"Hello I am a button"}),n.jsxs("p",{children:["This is some text: ",n.jsx("span",{children:e})]}),n.jsxs(r.Paper,{children:["This number will incremember when button pressed: ",t]})]})}const le=330,ce=73,H="Navbar",q={root:`${H}-root`,menuButton:`${H}-menuButton`,hide:`${H}-hide`,content:`${H}-content`,userInfoHolder:`${H}-userInfoHolder`,settings:`${H}-settings`,pieChartIcon:`${H}-pieChartIcon`},yt=T.styled(r.Box,{name:"NavBar"})(({theme:e})=>({[`&.${q.root}`]:{display:"flex"},[`& .${q.menuButton}`]:{marginRight:36},[`& .${q.hide}`]:{display:"none"},[`& .${q.content}`]:{flexGrow:1,padding:e.spacing(3)},[`& .${q.userInfoHolder}`]:{height:"148px",marginTop:"64px",marginBottom:"16px"}})),Me=()=>({position:"absolute",height:"100%",overflowX:"hidden",overflowY:"hidden",color:"white",backgroundColor:"black"}),It=()=>a({width:le},Me()),Ot=()=>a({width:ce},Me()),kt=T.styled(r.Drawer,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>a(a({width:t?le:ce,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",zIndex:e.zIndex.drawer+100},t&&{"& .MuiDrawer-paper":It()}),!t&&{"& .MuiDrawer-paper":Ot()}));class ee extends dt.AgError{}Be(ee,"errorName","ContextError");const He=h.createContext(null),Et={},Ft={},Re=({overrideState:e=Et,overrideActions:t=Ft,children:o})=>{const[{open:i},s]=h.useState({open:!0}),l=h.useCallback(u=>{s({open:u})},[]),c=h.useCallback(()=>{s(u=>j(a({},u),{open:!u.open}))},[]),x=a(a({open:i,setOpen:l,toggleOpen:c},e),t);return n.jsx(He.Provider,{value:x,children:o})},qe=()=>{const e=h.useContext(He);if(e===null)throw new ee("Error: Tried to useNavBar outside of a <NavBarProvider>");return e},We=(e={})=>a({open:!0},e),Nt=Z.createHelper((e=We(),t={})=>({children:o})=>n.jsx(Re,{overrideState:e,overrideActions:t,children:o})),Te=7,Pt=T.styled(Le.default)(({theme:e})=>({backgroundColor:"black",color:"white","& .MuiListItem-root":{padding:"unset"},"& .MuiListItemButton-root":{" .MuiListItemIcon-root":{color:"white",padding:`${Te}px`},"&.Mui-focusVisible":{backgroundColor:e.palette.grey[700]},"&.Mui-selected":{borderLeftStyle:"solid",borderLeftWidth:"7px",borderLeftColor:e.palette.primary.main,paddingLeft:`calc(${e.spacing(2)} - ${Te}px)`},"&:hover":{backgroundColor:e.palette.primary.dark},"&.Mui-selected.Mui-focusVisible":{backgroundColor:e.palette.grey[700]},"&.Mui-selected:hover":{backgroundColor:e.palette.primary.dark}}})),ye=7,_t=T.styled(Le.default)(({theme:e})=>({backgroundColor:"#e8e8e8",color:"inherit","& .MuiListItem-root":{padding:"unset"},"& .MuiListItemButton-root":{" .MuiListItemIcon-root":{color:"inherit",padding:`${ye}px`},"&.Mui-focusVisible":{backgroundColor:e.palette.grey[700]},"&.Mui-selected":{borderLeftStyle:"solid",borderLeftWidth:"7px",borderLeftColor:e.palette.primary.main,paddingLeft:`calc(${e.spacing(2)} - ${ye}px)`},"&:hover":{backgroundColor:e.palette.primary.dark},"&.Mui-selected.Mui-focusVisible":{backgroundColor:e.palette.grey[700]},"&.Mui-selected:hover":{backgroundColor:e.palette.primary.dark}}}));function $t({"data-testid":e,children:t}){const{open:o}=qe();return n.jsxs(yt,{className:q.root,"data-testid":e,children:[n.jsx(wt.default,{}),n.jsx(kt,{variant:"permanent",anchor:"left",transitionDuration:null,open:o,children:t})]})}const ze=({isOpen:e,dialogTitle:t,children:o,maxWidth:i,primaryButton:s,secondaryButton:l,onClose:c})=>{var p,A;const[x,u]=h.useState(!1);return n.jsxs(At.default,{open:e,onClose:()=>{x||c()},fullWidth:!0,maxWidth:i!=null?i:"xs",children:[n.jsx(jt.default,{children:t}),n.jsx(St.default,{sx:{"& > :last-child":{marginBottom:0}},children:o}),n.jsxs(bt.default,{children:[n.jsx(De.default,{onClick:(p=l==null?void 0:l.onClick)!=null?p:c,"data-testid":l==null?void 0:l.testId,disabled:(l==null?void 0:l.disabled)||x,color:l==null?void 0:l.buttonColor,children:(A=l==null?void 0:l.text)!=null?A:"Cancel"}),s&&n.jsx(De.default,{onClick:()=>z(exports,null,function*(){var b;u(!0),yield(b=s.onClick)==null?void 0:b.call(s),u(!1)}),"data-testid":s.testId,disabled:s.disabled||x,color:s==null?void 0:s.buttonColor,children:s.text})]})]})};function Lt({lookup:e=()=>z(this,null,function*(){}),enableHighlighting:t=!0,onChange:o,minLength:i,label:s,value:l,dataTestidPrefix:c,loadingText:x="Loading...",noOptionsText:u="No options",popupIcon:p=n.jsx(W.ArrowDropDown,{}),error:A=!1,helperText:b="",preLoadedOptions:f=void 0}){const[v,y]=h.useState(""),[I,D]=h.useState(f||[]),[B,O]=h.useState(!1),[_,F]=h.useState(!1),L=(d,g)=>{const w=l.filter(N=>N.id!==g);o(w,"delete",d)};h.useEffect(()=>{let d;const g=()=>z(this,null,function*(){d=new AbortController;try{const w=yield e(v,d.signal);D(w!=null?w:[]),F(!1)}catch(w){if(w instanceof Error&&w.name==="AbortError")console.debug("Previous lookup request was cancelled");else throw w}});if(v!=="")return(!i||v.length>=i)&&!f?(F(!0),g()):F(!1),function(){d&&d.abort()}},[v,e,i,f]),h.useEffect(()=>{!B&&!f&&D([]),!B&&f&&D(f)},[B,f]);const E=h.useMemo(()=>f?(d,g)=>d.filter(w=>w.label.toLowerCase().includes(g.inputValue.toLowerCase())):d=>d,[f]);return n.jsxs(n.Fragment,{children:[n.jsx(r.Autocomplete,{"data-testid":c?c+"Autocomplete":void 0,disablePortal:!0,multiple:!0,getOptionLabel:d=>typeof d=="string"?d:d.label,filterOptions:E,loading:_,options:[...l,...I],filterSelectedOptions:!0,includeInputInList:!0,value:l,onOpen:()=>O(!0),onClose:()=>O(!1),onChange:(d,g,w)=>{o(g,w,d)},onInputChange:(d,g)=>y(g),noOptionsText:u,loadingText:x,popupIcon:p,renderInput:d=>n.jsx(r.TextField,j(a({},d),{label:s,fullWidth:!0,variant:"filled",error:A,helperText:b,InputProps:j(a({},d.InputProps),{endAdornment:n.jsxs(n.Fragment,{children:[_?n.jsx(r.CircularProgress,{color:"inherit",size:20}):null,d.InputProps.endAdornment]})}),"data-testid":c?c+"TextField":void 0,onKeyDown:g=>{(g.key==="Backspace"||g.key==="Delete")&&g.stopPropagation()}})),renderTags:()=>null,isOptionEqualToValue:(d,g)=>d.id===g.id,renderOption:(d,g,w)=>{if(t){const N=Dt.default(g.label,w.inputValue,{insideWords:!0,findAllOccurrences:!0}),C=Bt.default(g.label,N);return h.createElement("li",j(a({},d),{key:g.id,"data-testid":c?c+"li"+g.id.toString():void 0}),n.jsx("div",{children:C.map((m,$)=>n.jsx("span",{style:{fontWeight:m.highlight?700:400},children:m.text},$))}))}else return h.createElement("li",j(a({},d),{key:g.id,"data-testid":c?c+"li"+g.id.toString():void 0}),g.label)}}),l.length>0&&n.jsx(r.Box,{children:l.map(d=>n.jsx(r.Chip,{sx:{marginTop:1,marginRight:1,height:"auto"},label:n.jsx(r.Tooltip,{title:d.tooltipContent||"",placement:"bottom-start",PopperProps:{modifiers:[{name:"offset",options:{offset:[115,-15]}}]},children:n.jsx(r.Typography,{style:{whiteSpace:"normal"},children:d.chipLabel?d.chipLabel:d.label})}),"data-testid":c?c+"Chip"+d.id.toString():void 0,onDelete:g=>L(g,d.id),deleteIcon:n.jsx(W.Cancel,{"data-testid":c?c+"ChipDelete"+d.id.toString():"CancelIcon"})},d.id))})]})}const Mt=24,Ht=64,R="TopBar",k={topStripe:`${R}-topStripe`,titleBar:`${R}-titleBar`,titleSlider:`${R}-titleSlider`,titleText:`${R}-titleText`,leftPanelButton:`${R}-leftPanelButton`,rightPanelButton:`${R}-leftPanelButton`},Rt=r.styled("div",{shouldForwardProp:e=>!["leftPanel","rightPanel"].includes(e),name:R})(({theme:e,leftPanel:t,rightPanel:o})=>{var i,s;return{width:"100%",[`& .${k.topStripe}`]:{width:"100%",height:`${Mt}px`,backgroundColor:e.palette.primary.main},[`& .${k.titleBar}`]:{backgroundColor:e.palette.primary.light,height:`${Ht}px`,padding:e.spacing(0,3),width:"100%"},[`& .${k.titleSlider}`]:a(a({height:"100%",display:"flex",alignItems:"center",color:"white",transition:e.transitions.create("margin",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),[`& .${k.leftPanelButton}`]:{marginRight:e.spacing(2),flexGrow:0},[`& .${k.titleText}`]:{flexGrow:1},[`& .${k.rightPanelButton}`]:{flexGrow:0}},(t==null?void 0:t.open)&&{transition:e.transitions.create("margin",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen}),marginLeft:`${(i=t==null?void 0:t.width)!=null?i:0}px`}),(o==null?void 0:o.open)&&{transition:e.transitions.create("margin",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen}),marginRight:`${(s=o==null?void 0:o.width)!=null?s:0}px`})}});function qt({titleText:e="",leftPanel:t,rightPanel:o,"data-testid":i}){return n.jsxs(Rt,{leftPanel:t,rightPanel:o,"data-testid":i,children:[n.jsx("div",{className:k.topStripe}),n.jsx("div",{className:k.titleBar,children:n.jsxs(r.Box,{className:k.titleSlider,children:[t!==void 0&&!t.open&&t.showOpenArrow&&n.jsxs(r.IconButton,{className:k.leftPanelButton,color:"inherit","aria-label":"Open left side panel",onClick:t==null?void 0:t.onOpen,edge:"start",size:"large",children:[" ",n.jsx(W.ArrowForward,{})]}),n.jsx(r.Typography,{className:k.titleText,variant:"h6",noWrap:!0,children:e}),o!==void 0&&!o.open&&o.showOpenArrow&&n.jsxs(r.IconButton,{className:k.rightPanelButton,color:"inherit","aria-label":"Open right side panel",onClick:o==null?void 0:o.onOpen,edge:"end",size:"large",children:[" ",n.jsx(W.ArrowBack,{})]})]})})]})}const Ve=400,Wt=r.styled(r.Drawer,{shouldForwardProp:e=>!["width","debug","debugOpacity","navBarOpen","navBarWidthOpen","navBarWidthClosed"].includes(e),name:"SidePanelDrawer"})(({width:e,debugOpacity:t=!1,anchor:o,navBarOpen:i,navBarWidthOpen:s,navBarWidthClosed:l})=>({width:e,"& .MuiDrawer-paper":a(a({position:"absolute",width:e,boxSizing:"border-box",border:"unset",boxShadow:"0px 4px 5px rgba(0, 0, 0, 0.14), 0px 1px 10px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.2)"},t&&{opacity:"50%"}),o==="left"&&a({marginLeft:`${l}px`},i&&{marginLeft:`${s}px`}))})),zt=r.styled(r.Box,{shouldForwardProp:e=>!["anchor"].includes(e)})(({theme:e,anchor:t})=>j(a({display:"flex",alignItems:"center",padding:e.spacing(2)},e.mixins.toolbar),{justifyContent:t==="left"?"space-between":"flex-start",backgroundColor:e.palette.primary.light,height:"88px","&,*":{color:"white"}," .MuiTypography-root":{fontSize:"22px"}," .MuiButtonBase-root":{marginRight:t==="right"?e.spacing(2):0}}));function Ie({children:e,anchor:t="left",open:o,onClose:i=()=>{},titleText:s="",width:l=Ve,showCloseArrow:c=!0,debugOpacity:x=!1,headerBoxProps:u={},onOpened:p,onClosed:A,"data-testid":b,navBarOpen:f=!1,navBarWidthOpen:v=0,navBarWidthClosed:y=0}){return n.jsxs(Wt,{SlideProps:{onEntered:()=>p==null?void 0:p(),onExited:()=>A==null?void 0:A()},variant:"persistent",anchor:t,open:o,width:l,debugOpacity:x,"data-testid":b,navBarOpen:f,navBarWidthOpen:v,navBarWidthClosed:y,children:[n.jsx(zt,j(a({anchor:t},u),{children:t==="left"?n.jsxs(n.Fragment,{children:[n.jsx(r.Typography,{variant:"h6",color:"inherit",component:"div",children:s}),c&&n.jsxs(r.IconButton,{onClick:i,size:"large","aria-label":"Close left side panel",children:[n.jsx(W.ArrowBack,{"data-testid":"arrowbackicon"})," "]})]}):n.jsxs(n.Fragment,{children:[c&&n.jsxs(r.IconButton,{onClick:i,size:"large","aria-label":"Close right side panel",children:[n.jsx(W.ArrowForward,{})," "]}),n.jsx(r.Typography,{variant:"h6",color:"inherit",component:"div",children:s})]})})),e]})}const Vt=T.styled(r.Box,{shouldForwardProp:e=>!["leftPanel","rightPanel"].includes(e),name:"PanelAwareMargins"})(({theme:e,leftPanel:t,rightPanel:o})=>{var i,s;return a(a({transition:e.transitions.create("margin",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen})},(t==null?void 0:t.open)&&{transition:e.transitions.create("margin",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen}),marginLeft:`${(i=t==null?void 0:t.width)!=null?i:0}px`}),(o==null?void 0:o.open)&&{transition:e.transitions.create("margin",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen}),marginRight:`${(s=o==null?void 0:o.width)!=null?s:0}px`})}),Gt=T.styled(r.Container,{name:"PageContainer"})(({theme:e})=>({paddingTop:e.spacing(3),paddingBottom:e.spacing(3)})),ae=!1,se=!1,K={titleText:"",flavour:"push",width:Ve,arrowButtons:"both",startOpen:!1,open:void 0,onChangeOpen:void 0,content:n.jsx(n.Fragment,{}),onOpened:void 0,onClosed:void 0,dataTestId:void 0};function Ut({children:e,titleText:t="",leftPanel:o,rightPanel:i,sidePanelsAreMutuallyExclusive:s=!0,debugOpacity:l=!1,pageContainerProps:c,pageContentDataTestId:x,topBarDataTestId:u,navBarOpen:p,navBarWidthOpen:A,navBarWidthClosed:b}){const[f,v]=h.useState(ae),[y,I]=h.useState(se),[D,B]=h.useState(ae),[O,_]=h.useState(se),F=o!==void 0,L=i!==void 0,{titleText:E,content:d,flavour:g,open:w,onChangeOpen:N,width:C,arrowButtons:m,startOpen:$,onOpened:Ye,onClosed:Ze,dataTestId:et}=o?a(a({},K),o):a({},K),{titleText:tt,content:nt,flavour:ve,open:te,onChangeOpen:Ce,width:ne,arrowButtons:U,startOpen:X,onOpened:ot,onClosed:rt,dataTestId:it}=i?a(a({},K),i):a({},K);h.useEffect(()=>{$!==ae&&(v($),B($))},[$]),h.useEffect(()=>{X!==se&&(I(X),_(X))},[X]);const oe=w===void 0?f:w,re=te===void 0?y:te,we=M=>{w===void 0&&(v(M),s&&L&&(M?(I(!1),_(y)):I(O))),N&&N(M)},Ae=M=>{te===void 0&&(I(M),s&&F&&(M?(v(!1),B(f)):v(D))),Ce&&Ce(M)};return n.jsxs(r.Box,{children:[F&&n.jsx(Ie,{"data-testid":et,anchor:"left",open:oe,onClose:()=>we(!1),width:C,titleText:E,debugOpacity:l,showCloseArrow:m==="both"||m==="close",onOpened:Ye,onClosed:Ze,navBarOpen:p,navBarWidthOpen:A,navBarWidthClosed:b,children:d}),L&&n.jsx(Ie,{"data-testid":it,anchor:"right",open:re,onClose:()=>Ae(!1),width:ne,titleText:tt,debugOpacity:l,showCloseArrow:U==="both"||U==="close",onOpened:ot,onClosed:rt,navBarOpen:p,navBarWidthOpen:A,navBarWidthClosed:b,children:nt}),n.jsx(qt,a(a({titleText:t,"data-testid":u},F&&g==="push"?{leftPanel:{open:oe,width:C,onOpen:()=>we(!0),showOpenArrow:m==="both"||m==="open"}}:{}),L&&ve==="push"?{rightPanel:{open:re,width:ne,onOpen:()=>Ae(!0),showOpenArrow:U==="both"||U==="open"}}:{})),n.jsx(Vt,j(a(a({},g==="push"?{leftPanel:{open:oe,width:C}}:{}),ve==="push"?{rightPanel:{open:re,width:ne}}:{}),{children:n.jsx(Gt,j(a({"data-testid":x},c),{children:e}))}))]})}const de=()=>{const e=r.useTheme();return r.useMediaQuery(e.breakpoints.down("sm"))},Xt=64,Qt=64,Kt=256,G=S.atom(!0),ue=S.atom(Kt),pe=S.atom(Qt),he=S.atom(""),ge=S.atom(Xt),xe=S.atom(void 0);function Jt({links:e}){return n.jsx("div",{children:"LinksMenu not implemented yet"})}const J="Navbar",V={root:`${J}-root`,menuButton:`${J}-menuButton`,hide:`${J}-hide`,content:`${J}-content`},Yt=T.styled(r.Box,{name:"NavBar"})(({theme:e})=>({[`&.${V.root}`]:{display:"flex"},[`& .${V.menuButton}`]:{marginRight:36},[`& .${V.hide}`]:{display:"none"},[`& .${V.content}`]:{flexGrow:1,padding:e.spacing(3)}})),Y=(e,t,o)=>e.transitions.create(t,{easing:e.transitions.easing.sharp,duration:o==="leaving"?e.transitions.duration.leavingScreen:e.transitions.duration.enteringScreen}),Zt=e=>{const t=r.useTheme();return n.jsx(r.Collapse,a({easing:t.transitions.easing.sharp,timeout:{enter:t.transitions.duration.enteringScreen,exit:t.transitions.duration.leavingScreen}},e))},Ge=e=>{var t,o;return{overflowX:"hidden",color:"inherit",backgroundColor:(o=(t=e==null?void 0:e.navBar)==null?void 0:t.backgroundColor)!=null?o:"white"}},Oe=(e,t)=>a({width:t,transition:Y(e,"width","entering")},Ge(e)),ke=(e,t)=>a({width:t,transition:Y(e,"width","leaving")},Ge(e)),en=T.styled(r.Drawer,{shouldForwardProp:e=>!["widthOpen","widthClosed","isSmallScreen"].includes(e)})(({theme:e,open:t,widthOpen:o,widthClosed:i,isSmallScreen:s})=>a(a({flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",display:"flex",flexDirection:"column"},t&&j(a({},Oe(e,o)),{backgroundColor:"","& .MuiDrawer-paper":Oe(e,o)})),!t&&j(a({},ke(e,s?o:i)),{backgroundColor:"","& .MuiDrawer-paper":ke(e,s?o:i)})));function tn(e){let t=0;for(let o=0,i=e.length;o<i;o++){const s=e.charCodeAt(o);t=(t<<5)-t+s,t|=0}return t}const Ee=["#A62A21","#7e3794","#0B51C1","#3A6024","#A81563","#B3003C"],nn=e=>e.split(/\s/).map(t=>t.substring(0,1).toUpperCase()).filter(t=>!!t).slice(0,2).join("").toUpperCase();function on({user:e,domainCode:t,open:o}){const i=r.useTheme();return n.jsxs(r.Box,{sx:{paddingTop:3,display:"flex",alignItems:"center",flexDirection:"column",gap:"0.5rem"},children:[n.jsx(r.Box,{sx:{width:o?"5rem":"2rem",transition:o?Y(i,["width","height"],"entering"):Y(i,["width","height"],"leaving"),aspectRatio:1},children:e!=null&&e.name?n.jsx(r.Avatar,{src:e==null?void 0:e.picture,sx:{width:"100%",height:"100%",bgcolor:Ee[Math.abs(tn(e.name))%Ee.length]},children:nn(e.name)}):n.jsx(r.Avatar,{sx:{width:"100%",height:"100%"}})}),n.jsx(Zt,{sx:{width:"100%"},in:o,children:n.jsx(r.Fade,{in:o,children:n.jsxs(r.Box,{width:"100%",display:"flex",flexDirection:"column",alignItems:"center",children:[e!=null&&e.name?n.jsx(r.Typography,{children:e.name}):n.jsx(r.Skeleton,{animation:!1,width:"50%"}),t?n.jsx(r.Typography,{children:t.toUpperCase()}):n.jsx(r.Skeleton,{animation:!1,width:"25%"})]})})})]})}function rn({open:e,widthClosed:t,widthOpen:o,"data-testid":i,top:s,middle:l,bottom:c,user:x,domainCode:u}){const p=de(),A=S.useSetAtom(G);return n.jsx(Yt,{className:V.root,"data-testid":i,children:n.jsxs(en,{open:e,widthOpen:o,widthClosed:t,anchor:"left",variant:p?"temporary":"permanent",PaperProps:{component:"nav"},onClose:()=>{A(!1)},isSmallScreen:p,children:[!p&&n.jsx(r.Toolbar,{}),s&&n.jsxs(r.Box,{flexGrow:"0",children:[s,n.jsx(r.Divider,{variant:"middle"})]}),n.jsx(r.Box,{flexGrow:"1",children:Array.isArray(l)?n.jsx(Jt,{links:l}):l}),n.jsxs(r.Box,{flexGrow:"0",children:[n.jsx(r.Divider,{variant:"middle"}),n.jsx(on,{user:x,domainCode:u,open:e}),c&&n.jsx(n.Fragment,{children:c})]})]})})}function an({children:e,topBarHeight:t,maxWidth:o=!1}){return n.jsx(r.Box,{sx:{overflow:"auto",height:`calc(100vh - ${t}px)`,scrollbarGutter:"stable",flexGrow:1},children:n.jsx(r.Container,{component:"main",id:"main-content",maxWidth:o,sx:{paddingTop:3,paddingBottom:3,flexGrow:1},children:e})})}const sn="TopBar",ln={titleText:`${sn}-titleText`};function cn({titleText:e="",height:t,"data-testid":o}){const i=S.useSetAtom(G),s=()=>i(x=>!x),l=r.useTheme(),c=de();return n.jsx("header",{"data-testid":o,children:n.jsxs(r.Paper,{square:!0,elevation:0,sx:{width:"100%",position:"sticky",color:"primary.contrastText",backgroundColor:"primary.main",display:"flex",alignItems:"center",gap:2,flexShrink:0,height:t,zIndex:c?0:l.zIndex.drawer+1},children:[n.jsx(r.IconButton,{size:"medium",color:"inherit",sx:{padding:1.5},onClick:s,children:n.jsx(W.ViewHeadline,{fontSize:"medium"})}),n.jsx(r.Typography,{className:ln.titleText,variant:"h6",children:e})]})})}function dn({children:e,initialTitleText:t,initialNavBarOpen:o,pageContainerProps:i,pageContentDataTestId:s,topBarDataTestId:l,navBarDataTestId:c,navBarMiddle:x,navBarBottom:u,user:p,domainCode:A}){const[b,f]=S.useAtom(G),[v]=S.useAtom(ue),[y]=S.useAtom(pe),[I,D]=S.useAtom(he),[B]=S.useAtom(ge),[O]=S.useAtom(xe);return h.useEffect(()=>{t!==void 0&&D(t)},[t,D]),h.useEffect(()=>{o!==void 0&&f(o)},[o,f]),n.jsxs(r.Box,{children:[n.jsx(r.CssBaseline,{}),n.jsx(cn,{titleText:I,"data-testid":l,height:B}),n.jsxs(r.Box,{sx:{display:"flex"},children:[n.jsx(rn,{open:b,top:O,middle:x,bottom:u,user:p,domainCode:A,widthOpen:v,widthClosed:y,offsetTop:B,"data-testid":c}),n.jsx(an,j(a({"data-testid":s,topBarHeight:B},i),{children:e}))]})]})}const un={autoHideDuration:6e3,anchorOrigin:{vertical:"top",horizontal:"center"},disableWindowBlurListener:!1},pn={shouldClose:(e,t)=>t!=="clickaway"},Fe={message:"",severity:"info",variant:"standard",progressIndicator:void 0},Ne=100,Pe=2e3,hn=2e3,gn=(()=>{let e=0;return()=>(e+=1,e)})(),xn={borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px"},fn={},mn={},fe=h.createContext(null);function Ue(l){var c=l,{overrideState:e=fn,overrideActions:t=mn,shouldClose:o=pn.shouldClose,children:i}=c,s=je(c,["overrideState","overrideActions","shouldClose","children"]);var N;const[{open:x},u]=h.useState({open:!1}),p=h.useRef([]),A=h.useRef(Date.now()),b=h.useRef(0),f=h.useCallback(C=>{u({open:C})},[]),v=h.useCallback((C={})=>{b.current+=1,p.current.length>=Ne&&Date.now()-A.current>=Pe&&(A.current=Date.now(),console.error(`SaladBarProvider: MAX_QUEUE_LENGTH (${Ne}) hit ${b.current} times in last ${Pe}ms)`),b.current=0);const m=a(j(a({},Fe),{key:gn()}),C);return p.current.push(m),p.current.length===1&&u({open:!0}),m.key},[]),y=(C="",m={})=>v(a({message:C,severity:"success"},m)),I=(C="",m={})=>v(a({message:C,severity:"info"},m)),D=(C="",m={})=>v(a({message:C,severity:"warning"},m)),B=(C="",m={})=>v(a({message:C,severity:"error"},m)),O=C=>{const m=p.current.findIndex($=>$.key===C);if(m!==-1)return m===0?(u({open:!1}),p.current[0]):p.current.splice(m,1)},_=(C,m)=>{o(C,m)&&u({open:!1})},F=()=>{},L=()=>{p.current.shift(),p.current.length>0&&u({open:!0})},E=(N=p.current[0])!=null?N:a({},Fe),d={};"autoHideDuration"in E&&(d.autoHideDuration=E.autoHideDuration);const g=a(a({},un),s),w=a(a({open:x,setOpen:f,enqueueNotification:v,enqueueSuccessNotification:y,enqueueInfoNotification:I,enqueueWarningNotification:D,enqueueErrorNotification:B,removeNotification:O},e),t);return n.jsxs(fe.Provider,{value:w,children:[i,n.jsx(r.Snackbar,j(a(a({},g),d),{open:x,onClose:_,TransitionProps:{onExited:L,onExit:F},sx:{zIndex:hn},children:n.jsxs("div",{children:[n.jsx(r.Alert,{onClose:C=>_(C,"closeAlert"),severity:E.severity,variant:"filled",icon:E.progressIndicator==="circular"?n.jsx(r.CircularProgress,{size:"1em"}):void 0,style:E.progressIndicator==="linear"?xn:void 0,children:E.message}),E.progressIndicator==="linear"&&n.jsx(r.LinearProgress,{color:"primary"})]})}))]})}function Xe(){const e=h.useContext(fe);if(e===null)throw new ee("Error: Tried to useSaladBar outside of a <SaladBarProvider>");return e}const vn=Z.createHelper((e={autoHideDuration:1},t={},o={})=>({children:i})=>n.jsx(Ue,j(a({},e),{overrideState:t,overrideActions:o,children:i}))),Qe=S.getDefaultStore(),Cn=({children:e,store:t})=>n.jsx(S.Provider,{store:t!=null?t:Qe,children:e}),Ke="domainCode";var $e;const _e=S.atom(JSON.parse(($e=localStorage.getItem(Ke))!=null?$e:'{"domainCode": ""}').domainCode),me=S.atom(e=>e(_e),(e,t,o)=>{t(_e,o),localStorage.setItem(Ke,JSON.stringify({domainCode:o}))}),wn={act:"ACT",nsw:"NSW",nt:"NT",qld:"QLD",sa:"SA",tas:"TAS",vic:"VIC",wa:"WA",ag:"AG",fedmps:"Fedmps","":""},An=e=>{var t;return e===null?"N/A":(t=wn[e])!=null?t:""},bn=({isLoading:e,isOpen:t,onClose:o,domainOptions:i,applicationName:s,handleLogout:l})=>{const[c,x]=S.useAtom(me),[u,p]=h.useState(c),{enqueueSuccessNotification:A}=Xe(),b=i.length===0,f=!!c&&!i.includes(c)&&!i.includes(u),v=!c||b||f,y=()=>z(exports,null,function*(){u?(x(u),A(`Set domain to ${u}`),o()):x("")}),I=()=>z(exports,null,function*(){c&&!b&&!f?(p(c),o()):v&&l()});let D;return b?D="Unable to retrieve your active organisations. Try logging in again.":f&&(D="You no longer have any roles in your chosen organisation. Please choose another."),n.jsxs(ze,{isOpen:t,dialogTitle:"Select an organisation",primaryButton:{text:"Confirm",onClick:y,disabled:!u||b||f,buttonColor:"primary"},secondaryButton:{text:v?"Logout":"Cancel",onClick:I},onClose:v?()=>{}:o,children:[n.jsxs(r.Typography,{marginBottom:2,children:["Select the default organisation that you want to use with the ",s,"."]}),n.jsx(r.Autocomplete,{loading:e,multiple:!1,disableClearable:!1,value:u!==""?u:null,onChange:(B,O)=>p(O!=null?O:""),getOptionLabel:An,options:[...i],renderInput:B=>n.jsx(r.TextField,j(a({},B),{variant:"filled",label:"Select organisation",InputProps:j(a({},B.InputProps),{endAdornment:n.jsxs(n.Fragment,{children:[e?n.jsx(r.CircularProgress,{color:"inherit",size:20,sx:{marginTop:"-20px"}}):null,B.InputProps.endAdornment]})})}))}),D&&n.jsx(r.FormHelperText,{error:!0,children:D})]})},Sn=T.createTheme({palette:{primary:{dark:"#00A651",light:"#A3D39C",main:"#007236",contrastText:"#FFF"},warning:{main:"#F5871F",light:"#FCC589",dark:"#A2590A",contrastText:"#FFF"},secondary:{main:"#662D91",light:"#BD8CBF",dark:"#440E62",contrastText:"#FFF"},error:{main:"#D43C95",light:"#8F2064",dark:"#F9CDE0",contrastText:"#FFF"},info:{main:"#00A88D",light:"#ADDCCF",dark:"#005243",contrastText:"#FFF"},success:{main:"#00A651",light:"#A3D39C",dark:"#007236",contrastText:"#FFF"}},typography:{explainer:{fontSize:"14px",marginBlockStart:"1em"}},navBar:{backgroundColor:"#E8E8E8"}}),jn=T.createTheme({palette:{primary:{main:"#007236",dark:"#005221",light:"#00A04E",contrastText:"#FFFFFF"},secondary:{main:"#662D91",dark:"#440E62",light:"#93268F",contrastText:"#FFFFFF"},error:{main:"#D32F2F",dark:"#C62828",light:"#EF5350"},info:{main:"#0288D1",dark:"#01579B",light:"#03A9F4"},success:{main:"#0288D1",dark:"#01579B",light:"#03A9F4"}},components:{MuiTextField:{defaultProps:{color:"secondary"}},MuiToggleButtonGroup:{defaultProps:{color:"secondary"}},MuiCheckbox:{defaultProps:{color:"secondary"}},MuiSelect:{defaultProps:{color:"secondary"}},MuiSwitch:{defaultProps:{color:"secondary"}},MuiFormControl:{defaultProps:{color:"secondary"}},MuiMenuItem:{styleOverrides:{root:({theme:e})=>({"&.Mui-selected":{backgroundColor:T.alpha(e.palette.secondary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:T.alpha(e.palette.secondary.main,e.palette.action.selectedOpacity)},"&.Mui-focusVisible":{backgroundColor:T.alpha(e.palette.secondary.main,e.palette.action.focusOpacity)}}})}}},typography:{explainer:{fontSize:"14px",marginBlockStart:"1em"},h3:{fontSize:"1rem",fontWeight:700}},navBar:{backgroundColor:"#E8E8E8"}}),Bn={domainCode:me,navBarOpen:G,navBarWidthOpen:ue,navBarWidthClosed:pe,titleText:he,topBarHeight:ge,navBarTop:xe},Dn=Z.createHelper(()=>({children:e})=>n.jsx(S.Provider,{children:e})),Je=({initialValues:e,children:t})=>(Ct.useHydrateAtoms(e),n.jsx(n.Fragment,{children:t})),Tn=Z.createHelper(e=>({children:t})=>n.jsx(Je,{initialValues:Object.entries(e).map(([o,i])=>[Bn[o],i]),children:t}));exports.AgDialog=ze;exports.AppLayout=dn;exports.AtomProvider=Cn;exports.Context=fe;exports.ContextError=ee;exports.DomainCodeDialog=bn;exports.ExampleComponent=Tt;exports.FetchAutocomplete=Lt;exports.HydrateAtoms=Je;exports.NAVBAR_WIDTH_CLOSED=ce;exports.NAVBAR_WIDTH_OPENED=le;exports.NavBar=$t;exports.NavBarDarkStyledList=Pt;exports.NavBarLightStyledList=_t;exports.NavBarProvider=Re;exports.PageLayout=Ut;exports.SaladBarProvider=Ue;exports.atomStore=Qe;exports.buildNavBarState=We;exports.domainCodeAtom=me;exports.fed21Theme=Sn;exports.internalAgSystemsTheme=jn;exports.navBarClasses=q;exports.navBarOpenAtom=G;exports.navBarTopAtom=xe;exports.navBarWidthClosedAtom=pe;exports.navBarWidthOpenAtom=ue;exports.titleTextAtom=he;exports.topBarHeightAtom=ge;exports.useNavBar=qe;exports.useSaladBar=Xe;exports.useSmallScreen=de;exports.withAtomProvider=Dn;exports.withNavBarProvider=Nt;exports.withOverrideDefaults=Tn;exports.withSaladBarProvider=vn;
2
2
  //# sourceMappingURL=index.cjs.map