spry-apps-dropdown 1.0.2 → 2.0.2

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/README.md CHANGED
@@ -1,16 +1,18 @@
1
1
  # spry-apps-dropdown
2
2
 
3
- A React component for displaying Spry apps in a dropdown menu with dynamic API integration.
3
+ A React component library for displaying Spry apps dropdown and profile menu with dynamic API integration. Features a Google-style UI with beautiful animations.
4
4
 
5
5
  ## Features
6
6
 
7
- - 🎨 Beautiful Material-UI design with smooth animations
7
+ - 🎨 Beautiful Material-UI design with smooth animations (Google-inspired)
8
8
  - 🔄 Automatic data fetching from API
9
9
  - 💾 Built-in caching and refetching
10
10
  - ⚡ Loading and error states
11
11
  - 📱 Responsive layout
12
12
  - 🎯 TypeScript support
13
13
  - 🔌 Easy integration
14
+ - 👤 Profile menu with avatar, account management, and sign out
15
+ - 🎛️ Combined TopBar component with both apps dropdown and profile menu
14
16
 
15
17
  ## Installation
16
18
 
@@ -22,7 +24,57 @@ That's it! All dependencies are included. Just make sure your project already ha
22
24
 
23
25
  ## Usage
24
26
 
25
- ### Basic Usage (Recommended)
27
+ ### TopBar Component (Easiest - Recommended for v2.0+)
28
+
29
+ The `TopBar` component combines both apps dropdown and profile menu in a single component, just like Google's interface:
30
+
31
+ ```tsx
32
+ import { TopBar } from 'spry-apps-dropdown'
33
+
34
+ function MyAppBar() {
35
+ return (
36
+ <AppBar>
37
+ <Toolbar>
38
+ <Typography variant="h6" sx={{ flexGrow: 1 }}>
39
+ My App
40
+ </Typography>
41
+
42
+ <TopBar
43
+ apiUrl="https://your-api.com"
44
+ onSignOut={() => handleLogout()}
45
+ getAuthToken={() => yourAuthToken}
46
+ appsRefetchInterval={30000} // 30 seconds
47
+ appsCacheTime={30000}
48
+ profileRefetchInterval={5 * 60 * 1000} // 5 minutes
49
+ profileCacheTime={5 * 60 * 1000}
50
+ />
51
+ </Toolbar>
52
+ </AppBar>
53
+ )
54
+ }
55
+ ```
56
+
57
+ ### Profile Menu Only
58
+
59
+ Use just the profile menu component:
60
+
61
+ ```tsx
62
+ import { ProfileMenuConnected } from 'spry-apps-dropdown'
63
+
64
+ function MyComponent() {
65
+ return (
66
+ <ProfileMenuConnected
67
+ apiUrl="https://your-api.com"
68
+ onSignOut={() => handleLogout()}
69
+ getAuthToken={() => yourAuthToken}
70
+ refetchInterval={5 * 60 * 1000} // 5 minutes
71
+ cacheTime={5 * 60 * 1000}
72
+ />
73
+ )
74
+ }
75
+ ```
76
+
77
+ ### Apps Dropdown Only (Basic Usage)
26
78
 
27
79
  Import `AppsDropdownConnected` for automatic API integration:
28
80
 
@@ -95,6 +147,42 @@ function MyComponent() {
95
147
 
96
148
  ## API Reference
97
149
 
150
+ ### `TopBar` (New in v2.0)
151
+
152
+ Combined component with both apps dropdown and profile menu, positioned side by side like Google's interface.
153
+
154
+ #### Props
155
+
156
+ | Prop | Type | Required | Default | Description |
157
+ |------|------|----------|---------|-------------|
158
+ | `apiUrl` | `string` | Yes | - | Base URL for apps API |
159
+ | `profileApiUrl` | `string` | No | Same as `apiUrl` | Base URL for profile API |
160
+ | `onSignOut` | `() => void` | No | - | Callback when user signs out |
161
+ | `getAuthToken` | `() => string \| null \| Promise<string \| null>` | No | - | Function to get auth token |
162
+ | `profileHeaders` | `Record<string, string>` | No | - | Custom headers for profile API |
163
+ | `showAppsDropdown` | `boolean` | No | `true` | Show apps dropdown |
164
+ | `showProfileMenu` | `boolean` | No | `true` | Show profile menu |
165
+ | `appsRefetchInterval` | `number` | No | `300000` (5 min) | Apps refetch interval in ms |
166
+ | `appsCacheTime` | `number` | No | `300000` (5 min) | Apps cache duration in ms |
167
+ | `profileRefetchInterval` | `number` | No | `300000` (5 min) | Profile refetch interval in ms |
168
+ | `profileCacheTime` | `number` | No | `300000` (5 min) | Profile cache duration in ms |
169
+
170
+ ### `ProfileMenuConnected` (New in v2.0)
171
+
172
+ Profile menu component with automatic API integration.
173
+
174
+ #### Props
175
+
176
+ | Prop | Type | Required | Default | Description |
177
+ |------|------|----------|---------|-------------|
178
+ | `apiUrl` | `string` | Yes | - | Base URL for profile API |
179
+ | `onSignOut` | `() => void` | No | - | Callback when user signs out |
180
+ | `onManageAccount` | `() => void` | No | - | Callback for manage account button |
181
+ | `getAuthToken` | `() => string \| null \| Promise<string \| null>` | No | - | Function to get auth token |
182
+ | `headers` | `Record<string, string>` | No | - | Custom headers for API requests |
183
+ | `refetchInterval` | `number` | No | `300000` (5 min) | Auto-refetch interval in ms |
184
+ | `cacheTime` | `number` | No | `300000` (5 min) | Cache duration in ms |
185
+
98
186
  ### `AppsDropdownConnected`
99
187
 
100
188
  The main component with automatic API integration.
@@ -192,6 +280,36 @@ Returns:
192
280
  }
193
281
  ```
194
282
 
283
+ ### `GET /api/profile` (New in v2.0)
284
+
285
+ Returns user profile information. Supports multiple authentication methods:
286
+
287
+ **Option 1: JWT Token (via Authorization header)**
288
+ ```http
289
+ GET /api/profile
290
+ Authorization: Bearer <jwt-token>
291
+ ```
292
+
293
+ **Option 2: Custom Headers**
294
+ ```http
295
+ GET /api/profile
296
+ X-User-Email: user@example.com
297
+ X-User-FirstName: John
298
+ X-User-LastName: Doe
299
+ X-User-Avatar: https://example.com/avatar.jpg
300
+ ```
301
+
302
+ **Response:**
303
+ ```json
304
+ {
305
+ "email": "user@example.com",
306
+ "firstName": "John",
307
+ "lastName": "Doe",
308
+ "avatar": "https://example.com/avatar.jpg",
309
+ "manageAccountUrl": "https://account.spry.com"
310
+ }
311
+ ```
312
+
195
313
  See [spry-apps-server](https://github.com/your-org/spry-apps-server) for the reference backend implementation.
196
314
 
197
315
  ## Styling
@@ -1,2 +1,2 @@
1
1
  import type { AppsDropdownProps } from './types';
2
- export declare function AppsDropdown({ apps, open, onClose, buttonRef, isLoading, error, onRetry }: AppsDropdownProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function AppsDropdown({ apps, open, onClose, buttonRef, isLoading, error, onRetry, excludeAppId }: AppsDropdownProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { ProfileMenuProps } from './types';
2
+ export declare function ProfileMenu({ profile, isLoading, onSignOut, onManageAccount, }: ProfileMenuProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import type { UseProfileDataOptions } from './types';
2
+ interface ProfileMenuConnectedProps extends UseProfileDataOptions {
3
+ apiUrl: string;
4
+ onSignOut?: () => void;
5
+ onManageAccount?: () => void;
6
+ }
7
+ export declare function ProfileMenuConnected({ apiUrl, onSignOut, onManageAccount, ...options }: ProfileMenuConnectedProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { TopBarProps } from './types';
2
+ /**
3
+ * TopBar component that combines AppsDropdown and ProfileMenu
4
+ * Similar to Google's interface with apps icon and profile icon side by side
5
+ */
6
+ export declare function TopBar({ apiUrl, profileApiUrl, onSignOut, getAuthToken, profileHeaders, showAppsDropdown, showProfileMenu, appsRefetchInterval, // 5 minutes
7
+ appsCacheTime, // 5 minutes
8
+ profileRefetchInterval, // 5 minutes
9
+ profileCacheTime, }: TopBarProps): import("react/jsx-runtime").JSX.Element;
package/dist/index.cjs CHANGED
@@ -1,7 +1,35 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const x=require("react"),g=require("@mui/material"),W=require("framer-motion");var O={exports:{}},k={};var q;function ce(){if(q)return k;q=1;var c=Symbol.for("react.transitional.element"),E=Symbol.for("react.fragment");function f(l,u,i){var h=null;if(i!==void 0&&(h=""+i),u.key!==void 0&&(h=""+u.key),"key"in u){i={};for(var d in u)d!=="key"&&(i[d]=u[d])}else i=u;return u=i.ref,{$$typeof:c,type:l,key:h,ref:u!==void 0?u:null,props:i}}return k.Fragment=E,k.jsx=f,k.jsxs=f,k}var j={};var H;function ie(){return H||(H=1,process.env.NODE_ENV!=="production"&&(function(){function c(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===oe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case p:return"Fragment";case G:return"Profiler";case w:return"StrictMode";case ee:return"Suspense";case re:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case o:return"Portal";case Q:return e.displayName||"Context";case Z:return(e._context.displayName||"Context")+".Consumer";case K:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case te:return r=e.displayName||null,r!==null?r:c(e.type)||"Memo";case C:r=e._payload,e=e._init;try{return c(e(r))}catch{}}return null}function E(e){return""+e}function f(e){try{E(e);var r=!1}catch{r=!0}if(r){r=console;var n=r.error,a=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",a),E(e)}}function l(e){if(e===p)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===C)return"<...>";try{var r=c(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function u(){var e=P.A;return e===null?null:e.getOwner()}function i(){return Error("react-stack-top-frame")}function h(e){if(F.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function d(e,r){function n(){L||(L=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}function R(){var e=c(this.type);return $[e]||($[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function b(e,r,n,a,S,I){var s=n.ref;return e={$$typeof:y,type:e,key:r,props:n,_owner:a},(s!==void 0?s:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:R}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:S}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:I}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function v(e,r,n,a,S,I){var s=r.children;if(s!==void 0)if(a)if(ae(s)){for(a=0;a<s.length;a++)t(s[a]);Object.freeze&&Object.freeze(s)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else t(s);if(F.call(r,"key")){s=c(e);var A=Object.keys(r).filter(function(se){return se!=="key"});a=0<A.length?"{key: someKey, "+A.join(": ..., ")+": ...}":"{key: someKey}",U[s+a]||(A=0<A.length?"{"+A.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
- let props = %s;
3
- <%s {...props} />
4
- React keys must be passed directly to JSX without using spread:
5
- let props = %s;
6
- <%s key={someKey} {...props} />`,a,s,A,s),U[s+a]=!0)}if(s=null,n!==void 0&&(f(n),s=""+n),h(r)&&(f(r.key),s=""+r.key),"key"in r){n={};for(var D in r)D!=="key"&&(n[D]=r[D])}else n=r;return s&&d(n,typeof e=="function"?e.displayName||e.name||"Unknown":e),b(e,s,n,u(),S,I)}function t(e){_(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===C&&(e._payload.status==="fulfilled"?_(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function _(e){return typeof e=="object"&&e!==null&&e.$$typeof===y}var T=x,y=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),oe=Symbol.for("react.client.reference"),P=T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=Object.prototype.hasOwnProperty,ae=Array.isArray,N=console.createTask?console.createTask:function(){return null};T={react_stack_bottom_frame:function(e){return e()}};var L,$={},M=T.react_stack_bottom_frame.bind(T,i)(),z=N(l(i)),U={};j.Fragment=p,j.jsx=function(e,r,n){var a=1e4>P.recentlyCreatedOwnerStacks++;return v(e,r,n,!1,a?Error("react-stack-top-frame"):M,a?N(l(e)):z)},j.jsxs=function(e,r,n){var a=1e4>P.recentlyCreatedOwnerStacks++;return v(e,r,n,!0,a?Error("react-stack-top-frame"):M,a?N(l(e)):z)}})()),j}var B;function le(){return B||(B=1,process.env.NODE_ENV==="production"?O.exports=ce():O.exports=ie()),O.exports}var m=le();function J({apps:c,open:E,onClose:f,buttonRef:l,isLoading:u=!1,error:i=null,onRetry:h}){const d=x.useRef(null),[R,b]=x.useState("64px");x.useLayoutEffect(()=>{if(E&&l?.current){const t=l.current.getBoundingClientRect();b(`${t.bottom+8}px`)}},[E,l]),x.useEffect(()=>{const t=_=>{d.current&&!d.current.contains(_.target)&&l?.current&&!l.current.contains(_.target)&&f()};return E&&document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[E,f,l]);const v=t=>{window.open(t,"_blank"),f()};return m.jsx(W.AnimatePresence,{children:E&&m.jsx(W.motion.div,{ref:d,initial:{opacity:0,scaleX:.6,scaleY:.6,y:-8},animate:{opacity:1,scaleX:1,scaleY:1,y:0},exit:{opacity:0,scaleX:.6,scaleY:.6,y:-8},transition:{duration:.18,ease:"easeOut"},style:{position:"absolute",top:R,right:"16px",zIndex:1e3,transformOrigin:"top right"},children:m.jsxs(g.Box,{sx:{bgcolor:"#E8F0FE",borderRadius:"8px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",p:2,width:"320px",minHeight:"100px"},onClick:t=>t.stopPropagation(),children:[u&&c.length===0&&m.jsx(g.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100px"},children:m.jsx(g.CircularProgress,{size:32})}),i&&c.length===0&&m.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100px",gap:1},children:[m.jsx(g.Typography,{sx:{fontSize:"0.875rem",color:"#ea4335",textAlign:"center"},children:"Failed to load apps"}),h&&m.jsx(g.Link,{component:"button",onClick:h,sx:{fontSize:"0.875rem",color:"#1a73e8",cursor:"pointer",textDecoration:"underline"},children:"Retry"})]}),c.length>0&&m.jsx(g.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:1},children:c.map(t=>m.jsxs(g.Link,{onClick:()=>v(t.url),sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100px",p:1.5,borderRadius:"12px",cursor:"pointer",textDecoration:"none",transition:"background-color 200ms","&:hover":{bgcolor:"#f1f3f4"}},title:t.description,children:[m.jsx(g.Box,{sx:{pb:1},children:t.iconUrl?m.jsx(g.Box,{component:"img",src:t.iconUrl,alt:t.name,sx:{width:"32px",height:"32px",objectFit:"contain"}}):m.jsx(g.Box,{sx:{width:"32px",height:"32px",borderRadius:"6px",bgcolor:t.color||"#4285f4",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.5rem"},children:t.name.charAt(0)})}),m.jsx(g.Typography,{sx:{fontSize:"0.75rem",fontWeight:500,color:"#202124",textAlign:"center",lineHeight:1.2},children:t.name})]},t.id))})]})})})}const Y="spry_apps_cache",ue=300*1e3,fe=300*1e3;function V(c,E={}){const{refetchInterval:f=ue,cacheTime:l=fe}=E,[u,i]=x.useState([]),[h,d]=x.useState(!0),[R,b]=x.useState(null),v=x.useRef(null),t=x.useRef(null),_=x.useCallback(()=>{try{const o=localStorage.getItem(Y);if(!o)return null;const p=JSON.parse(o);return Date.now()-p.timestamp<l?p.apps:(localStorage.removeItem(Y),null)}catch(o){return console.error("Error loading from cache:",o),null}},[l]),T=x.useCallback(o=>{try{const p={apps:o,timestamp:Date.now()};localStorage.setItem(Y,JSON.stringify(p))}catch(p){console.error("Error saving to cache:",p)}},[]),y=x.useCallback(async()=>{t.current&&t.current.abort(),t.current=new AbortController;try{d(!0),b(null);const o=await fetch(`${c}/api/apps`,{signal:t.current.signal,headers:{Accept:"application/json"}});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);const p=await o.json();i(p.apps),T(p.apps),b(null)}catch(o){if(o instanceof Error&&o.name==="AbortError")return;const p=o instanceof Error?o.message:"Failed to fetch apps";b(p),console.error("Error fetching apps:",o);const w=_();w&&i(w)}finally{d(!1)}},[c,_,T]);return x.useEffect(()=>{const o=_();return o&&(i(o),d(!1)),y(),f>0&&(v.current=window.setInterval(()=>{y()},f)),()=>{v.current&&window.clearInterval(v.current),t.current&&t.current.abort()}},[c,f,_,y]),{apps:u,isLoading:h,error:R,refetch:y}}function X({apiUrl:c,open:E,onClose:f,buttonRef:l,refetchInterval:u,cacheTime:i}){const{apps:h,isLoading:d,error:R,refetch:b}=V(c,{refetchInterval:u,cacheTime:i});return m.jsx(J,{apps:h,open:E,onClose:f,buttonRef:l,isLoading:d,error:R,onRetry:b})}exports.AppsDropdown=J;exports.AppsDropdownConnected=X;exports.default=X;exports.useAppsData=V;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const $=require("react/jsx-runtime"),X=require("react"),H=require("@mui/material"),Nt=require("framer-motion"),Dr=require("@emotion/styled");require("@emotion/react");function Br(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const be=Br(X);function pr({apps:e,open:t,onClose:r,buttonRef:n,isLoading:o=!1,error:i=null,onRetry:c,excludeAppId:l}){const u=X.useRef(null),[f,g]=X.useState("64px"),m=()=>{const h=window.location.origin;return e.find(a=>a.url.startsWith(h))?.id},p=e.filter(h=>{if(l&&h.id===l)return!1;const a=m();return!(a&&h.id===a)});X.useLayoutEffect(()=>{if(t&&n?.current){const h=n.current.getBoundingClientRect();g(`${h.bottom+8}px`)}},[t,n]),X.useEffect(()=>{const h=a=>{u.current&&!u.current.contains(a.target)&&n?.current&&!n.current.contains(a.target)&&r()};return t&&document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)}},[t,r,n]);const v=h=>{window.open(h,"_blank"),r()};return $.jsx(Nt.AnimatePresence,{children:t&&$.jsx(Nt.motion.div,{ref:u,initial:{opacity:0,scaleX:.6,scaleY:.6,y:-8},animate:{opacity:1,scaleX:1,scaleY:1,y:0},exit:{opacity:0,scaleX:.6,scaleY:.6,y:-8},transition:{duration:.18,ease:"easeOut"},style:{position:"absolute",top:f,right:"16px",zIndex:1e3,transformOrigin:"top right"},children:$.jsxs(H.Box,{sx:{bgcolor:"#E8F0FE",borderRadius:"8px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",p:2,width:"320px",minHeight:"100px"},onClick:h=>h.stopPropagation(),children:[o&&p.length===0&&$.jsx(H.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100px"},children:$.jsx(H.CircularProgress,{size:32})}),i&&p.length===0&&$.jsxs(H.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100px",gap:1},children:[$.jsx(H.Typography,{sx:{fontSize:"0.875rem",color:"#ea4335",textAlign:"center"},children:"Failed to load apps"}),c&&$.jsx(H.Link,{component:"button",onClick:c,sx:{fontSize:"0.875rem",color:"#1a73e8",cursor:"pointer",textDecoration:"underline"},children:"Retry"})]}),p.length>0&&$.jsx(H.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:1},children:p.map(h=>$.jsxs(H.Link,{onClick:()=>v(h.url),sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100px",p:1.5,borderRadius:"12px",cursor:"pointer",textDecoration:"none",transition:"background-color 200ms","&:hover":{bgcolor:"#f1f3f4"}},title:h.description,children:[$.jsx(H.Box,{sx:{pb:1},children:h.iconUrl?$.jsx(H.Box,{component:"img",src:h.iconUrl,alt:h.name,sx:{width:"32px",height:"32px",objectFit:"contain"}}):$.jsx(H.Box,{sx:{width:"32px",height:"32px",borderRadius:"6px",bgcolor:h.color||"#4285f4",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.5rem"},children:h.name.charAt(0)})}),$.jsx(H.Typography,{sx:{fontSize:"0.75rem",fontWeight:500,color:"#202124",textAlign:"center",lineHeight:1.2},children:h.name})]},h.id))})]})})})}const lt="spry_apps_cache",Lr=300*1e3,Fr=300*1e3;function mr(e,t={}){const{refetchInterval:r=Lr,cacheTime:n=Fr}=t,[o,i]=X.useState([]),[c,l]=X.useState(!0),[u,f]=X.useState(null),g=X.useRef(null),m=X.useRef(null),p=X.useCallback(()=>{try{const a=localStorage.getItem(lt);if(!a)return null;const S=JSON.parse(a);return Date.now()-S.timestamp<n?S.apps:(localStorage.removeItem(lt),null)}catch(a){return console.error("Error loading from cache:",a),null}},[n]),v=X.useCallback(a=>{try{const S={apps:a,timestamp:Date.now()};localStorage.setItem(lt,JSON.stringify(S))}catch(S){console.error("Error saving to cache:",S)}},[]),h=X.useCallback(async()=>{m.current&&m.current.abort(),m.current=new AbortController;try{l(!0),f(null);const a=await fetch(`${e}/api/apps`,{signal:m.current.signal,headers:{Accept:"application/json"}});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const S=await a.json();i(S.apps),v(S.apps),f(null)}catch(a){if(a instanceof Error&&a.name==="AbortError")return;const S=a instanceof Error?a.message:"Failed to fetch apps";f(S),console.error("Error fetching apps:",a);const E=p();E&&i(E)}finally{l(!1)}},[e,p,v]);return X.useEffect(()=>{const a=p();return a&&(i(a),l(!1)),h(),r>0&&(g.current=window.setInterval(()=>{h()},r)),()=>{g.current&&window.clearInterval(g.current),m.current&&m.current.abort()}},[e,r,n]),{apps:o,isLoading:c,error:u,refetch:h}}function Vr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ve={exports:{}},Y={};var Mt;function zr(){if(Mt)return Y;Mt=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),c=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),v=Symbol.for("react.client.reference");function h(a){if(typeof a=="object"&&a!==null){var S=a.$$typeof;switch(S){case e:switch(a=a.type,a){case r:case o:case n:case u:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case c:case l:case m:case g:return a;case i:return a;default:return S}}case t:return S}}}return Y.ContextConsumer=i,Y.ContextProvider=c,Y.Element=e,Y.ForwardRef=l,Y.Fragment=r,Y.Lazy=m,Y.Memo=g,Y.Portal=t,Y.Profiler=o,Y.StrictMode=n,Y.Suspense=u,Y.SuspenseList=f,Y.isContextConsumer=function(a){return h(a)===i},Y.isContextProvider=function(a){return h(a)===c},Y.isElement=function(a){return typeof a=="object"&&a!==null&&a.$$typeof===e},Y.isForwardRef=function(a){return h(a)===l},Y.isFragment=function(a){return h(a)===r},Y.isLazy=function(a){return h(a)===m},Y.isMemo=function(a){return h(a)===g},Y.isPortal=function(a){return h(a)===t},Y.isProfiler=function(a){return h(a)===o},Y.isStrictMode=function(a){return h(a)===n},Y.isSuspense=function(a){return h(a)===u},Y.isSuspenseList=function(a){return h(a)===f},Y.isValidElementType=function(a){return typeof a=="string"||typeof a=="function"||a===r||a===o||a===n||a===u||a===f||typeof a=="object"&&a!==null&&(a.$$typeof===m||a.$$typeof===g||a.$$typeof===c||a.$$typeof===i||a.$$typeof===l||a.$$typeof===v||a.getModuleId!==void 0)},Y.typeOf=h,Y}var q={};var jt;function Wr(){return jt||(jt=1,process.env.NODE_ENV!=="production"&&(function(){function e(a){if(typeof a=="object"&&a!==null){var S=a.$$typeof;switch(S){case t:switch(a=a.type,a){case n:case i:case o:case f:case g:case v:return a;default:switch(a=a&&a.$$typeof,a){case l:case u:case p:case m:return a;case c:return a;default:return S}}case r:return S}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");q.ContextConsumer=c,q.ContextProvider=l,q.Element=t,q.ForwardRef=u,q.Fragment=n,q.Lazy=p,q.Memo=m,q.Portal=r,q.Profiler=i,q.StrictMode=o,q.Suspense=f,q.SuspenseList=g,q.isContextConsumer=function(a){return e(a)===c},q.isContextProvider=function(a){return e(a)===l},q.isElement=function(a){return typeof a=="object"&&a!==null&&a.$$typeof===t},q.isForwardRef=function(a){return e(a)===u},q.isFragment=function(a){return e(a)===n},q.isLazy=function(a){return e(a)===p},q.isMemo=function(a){return e(a)===m},q.isPortal=function(a){return e(a)===r},q.isProfiler=function(a){return e(a)===i},q.isStrictMode=function(a){return e(a)===o},q.isSuspense=function(a){return e(a)===f},q.isSuspenseList=function(a){return e(a)===g},q.isValidElementType=function(a){return typeof a=="string"||typeof a=="function"||a===n||a===i||a===o||a===f||a===g||typeof a=="object"&&a!==null&&(a.$$typeof===p||a.$$typeof===m||a.$$typeof===l||a.$$typeof===c||a.$$typeof===u||a.$$typeof===h||a.getModuleId!==void 0)},q.typeOf=e})()),q}var Dt;function Ur(){return Dt||(Dt=1,process.env.NODE_ENV==="production"?Ve.exports=zr():Ve.exports=Wr()),Ve.exports}var He=Ur();function he(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function hr(e){if(be.isValidElement(e)||He.isValidElementType(e)||!he(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=hr(e[r])}),t}function ce(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return he(e)&&he(t)&&Object.keys(t).forEach(o=>{be.isValidElement(t[o])||He.isValidElementType(t[o])?n[o]=t[o]:he(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&he(e[o])?n[o]=ce(e[o],t[o],r):r.clone?n[o]=he(t[o])?hr(t[o]):t[o]:n[o]=t[o]}),n}var ze={exports:{}},We={exports:{}},V={};var Bt;function Yr(){if(Bt)return V;Bt=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,g=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,a=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function T(y){if(typeof y=="object"&&y!==null){var U=y.$$typeof;switch(U){case t:switch(y=y.type,y){case u:case f:case n:case i:case o:case m:return y;default:switch(y=y&&y.$$typeof,y){case l:case g:case h:case v:case c:return y;default:return U}}case r:return U}}}function w(y){return T(y)===f}return V.AsyncMode=u,V.ConcurrentMode=f,V.ContextConsumer=l,V.ContextProvider=c,V.Element=t,V.ForwardRef=g,V.Fragment=n,V.Lazy=h,V.Memo=v,V.Portal=r,V.Profiler=i,V.StrictMode=o,V.Suspense=m,V.isAsyncMode=function(y){return w(y)||T(y)===u},V.isConcurrentMode=w,V.isContextConsumer=function(y){return T(y)===l},V.isContextProvider=function(y){return T(y)===c},V.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},V.isForwardRef=function(y){return T(y)===g},V.isFragment=function(y){return T(y)===n},V.isLazy=function(y){return T(y)===h},V.isMemo=function(y){return T(y)===v},V.isPortal=function(y){return T(y)===r},V.isProfiler=function(y){return T(y)===i},V.isStrictMode=function(y){return T(y)===o},V.isSuspense=function(y){return T(y)===m},V.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===f||y===i||y===o||y===m||y===p||typeof y=="object"&&y!==null&&(y.$$typeof===h||y.$$typeof===v||y.$$typeof===c||y.$$typeof===l||y.$$typeof===g||y.$$typeof===S||y.$$typeof===E||y.$$typeof===k||y.$$typeof===a)},V.typeOf=T,V}var z={};var Lt;function qr(){return Lt||(Lt=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,g=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,a=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function T(C){return typeof C=="string"||typeof C=="function"||C===n||C===f||C===i||C===o||C===m||C===p||typeof C=="object"&&C!==null&&(C.$$typeof===h||C.$$typeof===v||C.$$typeof===c||C.$$typeof===l||C.$$typeof===g||C.$$typeof===S||C.$$typeof===E||C.$$typeof===k||C.$$typeof===a)}function w(C){if(typeof C=="object"&&C!==null){var de=C.$$typeof;switch(de){case t:var Fe=C.type;switch(Fe){case u:case f:case n:case i:case o:case m:return Fe;default:var kt=Fe&&Fe.$$typeof;switch(kt){case l:case g:case h:case v:case c:return kt;default:return de}}case r:return de}}}var y=u,U=f,Z=l,Q=c,L=t,s=g,A=n,F=h,B=v,ie=r,ne=i,se=o,fe=m,Le=!1;function ct(C){return Le||(Le=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),b(C)||w(C)===u}function b(C){return w(C)===f}function x(C){return w(C)===l}function I(C){return w(C)===c}function R(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function O(C){return w(C)===g}function N(C){return w(C)===n}function _(C){return w(C)===h}function P(C){return w(C)===v}function M(C){return w(C)===r}function W(C){return w(C)===i}function j(C){return w(C)===o}function oe(C){return w(C)===m}z.AsyncMode=y,z.ConcurrentMode=U,z.ContextConsumer=Z,z.ContextProvider=Q,z.Element=L,z.ForwardRef=s,z.Fragment=A,z.Lazy=F,z.Memo=B,z.Portal=ie,z.Profiler=ne,z.StrictMode=se,z.Suspense=fe,z.isAsyncMode=ct,z.isConcurrentMode=b,z.isContextConsumer=x,z.isContextProvider=I,z.isElement=R,z.isForwardRef=O,z.isFragment=N,z.isLazy=_,z.isMemo=P,z.isPortal=M,z.isProfiler=W,z.isStrictMode=j,z.isSuspense=oe,z.isValidElementType=T,z.typeOf=w})()),z}var Ft;function gr(){return Ft||(Ft=1,process.env.NODE_ENV==="production"?We.exports=Yr():We.exports=qr()),We.exports}var ut,Vt;function Hr(){if(Vt)return ut;Vt=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var c={},l=0;l<10;l++)c["_"+String.fromCharCode(l)]=l;var u=Object.getOwnPropertyNames(c).map(function(g){return c[g]});if(u.join("")!=="0123456789")return!1;var f={};return"abcdefghijklmnopqrst".split("").forEach(function(g){f[g]=g}),Object.keys(Object.assign({},f)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ut=o()?Object.assign:function(i,c){for(var l,u=n(i),f,g=1;g<arguments.length;g++){l=Object(arguments[g]);for(var m in l)t.call(l,m)&&(u[m]=l[m]);if(e){f=e(l);for(var p=0;p<f.length;p++)r.call(l,f[p])&&(u[f[p]]=l[f[p]])}}return u},ut}var ft,zt;function Tt(){if(zt)return ft;zt=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ft=e,ft}var dt,Wt;function yr(){return Wt||(Wt=1,dt=Function.call.bind(Object.prototype.hasOwnProperty)),dt}var pt,Ut;function Gr(){if(Ut)return pt;Ut=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Tt(),r={},n=yr();e=function(i){var c="Warning: "+i;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}}}function o(i,c,l,u,f){if(process.env.NODE_ENV!=="production"){for(var g in i)if(n(i,g)){var m;try{if(typeof i[g]!="function"){var p=Error((u||"React class")+": "+l+" type `"+g+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[g]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}m=i[g](c,g,u,l,null,t)}catch(h){m=h}if(m&&!(m instanceof Error)&&e((u||"React class")+": type specification of "+l+" `"+g+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof m+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),m instanceof Error&&!(m.message in r)){r[m.message]=!0;var v=f?f():"";e("Failed "+l+" type: "+m.message+(v??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},pt=o,pt}var mt,Yt;function Kr(){if(Yt)return mt;Yt=1;var e=gr(),t=Hr(),r=Tt(),n=yr(),o=Gr(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(l){var u="Warning: "+l;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function c(){return null}return mt=function(l,u){var f=typeof Symbol=="function"&&Symbol.iterator,g="@@iterator";function m(b){var x=b&&(f&&b[f]||b[g]);if(typeof x=="function")return x}var p="<<anonymous>>",v={array:E("array"),bigint:E("bigint"),bool:E("boolean"),func:E("function"),number:E("number"),object:E("object"),string:E("string"),symbol:E("symbol"),any:k(),arrayOf:T,element:w(),elementType:y(),instanceOf:U,node:s(),objectOf:Q,oneOf:Z,oneOfType:L,shape:F,exact:B};function h(b,x){return b===x?b!==0||1/b===1/x:b!==b&&x!==x}function a(b,x){this.message=b,this.data=x&&typeof x=="object"?x:{},this.stack=""}a.prototype=Error.prototype;function S(b){if(process.env.NODE_ENV!=="production")var x={},I=0;function R(N,_,P,M,W,j,oe){if(M=M||p,j=j||P,oe!==r){if(u){var C=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw C.name="Invariant Violation",C}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var de=M+":"+P;!x[de]&&I<3&&(i("You are manually calling a React.PropTypes validation function for the `"+j+"` prop on `"+M+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),x[de]=!0,I++)}}return _[P]==null?N?_[P]===null?new a("The "+W+" `"+j+"` is marked as required "+("in `"+M+"`, but its value is `null`.")):new a("The "+W+" `"+j+"` is marked as required in "+("`"+M+"`, but its value is `undefined`.")):null:b(_,P,M,W,j)}var O=R.bind(null,!1);return O.isRequired=R.bind(null,!0),O}function E(b){function x(I,R,O,N,_,P){var M=I[R],W=se(M);if(W!==b){var j=fe(M);return new a("Invalid "+N+" `"+_+"` of type "+("`"+j+"` supplied to `"+O+"`, expected ")+("`"+b+"`."),{expectedType:b})}return null}return S(x)}function k(){return S(c)}function T(b){function x(I,R,O,N,_){if(typeof b!="function")return new a("Property `"+_+"` of component `"+O+"` has invalid PropType notation inside arrayOf.");var P=I[R];if(!Array.isArray(P)){var M=se(P);return new a("Invalid "+N+" `"+_+"` of type "+("`"+M+"` supplied to `"+O+"`, expected an array."))}for(var W=0;W<P.length;W++){var j=b(P,W,O,N,_+"["+W+"]",r);if(j instanceof Error)return j}return null}return S(x)}function w(){function b(x,I,R,O,N){var _=x[I];if(!l(_)){var P=se(_);return new a("Invalid "+O+" `"+N+"` of type "+("`"+P+"` supplied to `"+R+"`, expected a single ReactElement."))}return null}return S(b)}function y(){function b(x,I,R,O,N){var _=x[I];if(!e.isValidElementType(_)){var P=se(_);return new a("Invalid "+O+" `"+N+"` of type "+("`"+P+"` supplied to `"+R+"`, expected a single ReactElement type."))}return null}return S(b)}function U(b){function x(I,R,O,N,_){if(!(I[R]instanceof b)){var P=b.name||p,M=ct(I[R]);return new a("Invalid "+N+" `"+_+"` of type "+("`"+M+"` supplied to `"+O+"`, expected ")+("instance of `"+P+"`."))}return null}return S(x)}function Z(b){if(!Array.isArray(b))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),c;function x(I,R,O,N,_){for(var P=I[R],M=0;M<b.length;M++)if(h(P,b[M]))return null;var W=JSON.stringify(b,function(oe,C){var de=fe(C);return de==="symbol"?String(C):C});return new a("Invalid "+N+" `"+_+"` of value `"+String(P)+"` "+("supplied to `"+O+"`, expected one of "+W+"."))}return S(x)}function Q(b){function x(I,R,O,N,_){if(typeof b!="function")return new a("Property `"+_+"` of component `"+O+"` has invalid PropType notation inside objectOf.");var P=I[R],M=se(P);if(M!=="object")return new a("Invalid "+N+" `"+_+"` of type "+("`"+M+"` supplied to `"+O+"`, expected an object."));for(var W in P)if(n(P,W)){var j=b(P,W,O,N,_+"."+W,r);if(j instanceof Error)return j}return null}return S(x)}function L(b){if(!Array.isArray(b))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),c;for(var x=0;x<b.length;x++){var I=b[x];if(typeof I!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Le(I)+" at index "+x+"."),c}function R(O,N,_,P,M){for(var W=[],j=0;j<b.length;j++){var oe=b[j],C=oe(O,N,_,P,M,r);if(C==null)return null;C.data&&n(C.data,"expectedType")&&W.push(C.data.expectedType)}var de=W.length>0?", expected one of type ["+W.join(", ")+"]":"";return new a("Invalid "+P+" `"+M+"` supplied to "+("`"+_+"`"+de+"."))}return S(R)}function s(){function b(x,I,R,O,N){return ie(x[I])?null:new a("Invalid "+O+" `"+N+"` supplied to "+("`"+R+"`, expected a ReactNode."))}return S(b)}function A(b,x,I,R,O){return new a((b||"React class")+": "+x+" type `"+I+"."+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+O+"`.")}function F(b){function x(I,R,O,N,_){var P=I[R],M=se(P);if(M!=="object")return new a("Invalid "+N+" `"+_+"` of type `"+M+"` "+("supplied to `"+O+"`, expected `object`."));for(var W in b){var j=b[W];if(typeof j!="function")return A(O,N,_,W,fe(j));var oe=j(P,W,O,N,_+"."+W,r);if(oe)return oe}return null}return S(x)}function B(b){function x(I,R,O,N,_){var P=I[R],M=se(P);if(M!=="object")return new a("Invalid "+N+" `"+_+"` of type `"+M+"` "+("supplied to `"+O+"`, expected `object`."));var W=t({},I[R],b);for(var j in W){var oe=b[j];if(n(b,j)&&typeof oe!="function")return A(O,N,_,j,fe(oe));if(!oe)return new a("Invalid "+N+" `"+_+"` key `"+j+"` supplied to `"+O+"`.\nBad object: "+JSON.stringify(I[R],null," ")+`
2
+ Valid keys: `+JSON.stringify(Object.keys(b),null," "));var C=oe(P,j,O,N,_+"."+j,r);if(C)return C}return null}return S(x)}function ie(b){switch(typeof b){case"number":case"string":case"undefined":return!0;case"boolean":return!b;case"object":if(Array.isArray(b))return b.every(ie);if(b===null||l(b))return!0;var x=m(b);if(x){var I=x.call(b),R;if(x!==b.entries){for(;!(R=I.next()).done;)if(!ie(R.value))return!1}else for(;!(R=I.next()).done;){var O=R.value;if(O&&!ie(O[1]))return!1}}else return!1;return!0;default:return!1}}function ne(b,x){return b==="symbol"?!0:x?x["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&x instanceof Symbol:!1}function se(b){var x=typeof b;return Array.isArray(b)?"array":b instanceof RegExp?"object":ne(x,b)?"symbol":x}function fe(b){if(typeof b>"u"||b===null)return""+b;var x=se(b);if(x==="object"){if(b instanceof Date)return"date";if(b instanceof RegExp)return"regexp"}return x}function Le(b){var x=fe(b);switch(x){case"array":case"object":return"an "+x;case"boolean":case"date":case"regexp":return"a "+x;default:return x}}function ct(b){return!b.constructor||!b.constructor.name?p:b.constructor.name}return v.checkPropTypes=o,v.resetWarningCache=o.resetWarningCache,v.PropTypes=v,v},mt}var ht,qt;function Xr(){if(qt)return ht;qt=1;var e=Tt();function t(){}function r(){}return r.resetWarningCache=t,ht=function(){function n(c,l,u,f,g,m){if(m!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}n.isRequired=n;function o(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},ht}var Ht;function Jr(){if(Ht)return ze.exports;if(Ht=1,process.env.NODE_ENV!=="production"){var e=gr(),t=!0;ze.exports=Kr()(e.isElement,t)}else ze.exports=Xr()();return ze.exports}var Qr=Jr();const D=Vr(Qr);function ve(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}function br(e,t=""){return e.displayName||e.name||t}function Gt(e,t,r){const n=br(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function Zr(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return br(e,"Component");if(typeof e=="object")switch(e.$$typeof){case He.ForwardRef:return Gt(e,e.render,"ForwardRef");case He.Memo:return Gt(e,e.type,"memo");default:return}}}function Te(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":ve(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Ct(e,t){const r={...t};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=n;if(o==="components"||o==="slots")r[o]={...e[o],...r[o]};else if(o==="componentsProps"||o==="slotProps"){const i=e[o],c=t[o];if(!c)r[o]=i||{};else if(!i)r[o]=c;else{r[o]={...c};for(const l in i)if(Object.prototype.hasOwnProperty.call(i,l)){const u=l;r[o][u]=Ct(i[u],c[u])}}}else r[o]===void 0&&(r[o]=e[o])}return r}function en(e,t,r=void 0){const n={};for(const o in e){const i=e[o];let c="",l=!0;for(let u=0;u<i.length;u+=1){const f=i[u];f&&(c+=(l===!0?"":" ")+t(f),l=!1,r&&r[f]&&(c+=" "+r[f]))}n[o]=c}return n}const Kt=e=>e,tn=()=>{let e=Kt;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Kt}}},rn=tn(),nn={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function wt(e,t,r="Mui"){const n=nn[t];return n?`${r}-${n}`:`${rn.generate(e)}-${t}`}function on(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=wt(e,o,r)}),n}function sn(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function vr(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=vr(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function an(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=vr(e))&&(n&&(n+=" "),n+=t);return n}function Me(e,t){return t?ce(e,t,{clone:!1}):e}const Ce=process.env.NODE_ENV!=="production"?D.oneOfType([D.number,D.string,D.object,D.array]):{};function Xt(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,o)=>{const i=/min-width:\s*([0-9.]+)/;return+(n.match(i)?.[1]||0)-+(o.match(i)?.[1]||0)});return r.length?r.reduce((n,o)=>{const i=t[o];return delete n[o],n[o]=i,n},{...t}):t}function cn(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function ln(e,t){const r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
3
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:ve(18,`(${t})`));return null}const[,n,o]=r,i=Number.isNaN(+n)?n||0:+n;return e.containerQueries(o).up(i)}function un(e){const t=(i,c)=>i.replace("@media",c?`@container ${c}`:"@container");function r(i,c){i.up=(...l)=>t(e.breakpoints.up(...l),c),i.down=(...l)=>t(e.breakpoints.down(...l),c),i.between=(...l)=>t(e.breakpoints.between(...l),c),i.only=(...l)=>t(e.breakpoints.only(...l),c),i.not=(...l)=>{const u=t(e.breakpoints.not(...l),c);return u.includes("not all and")?u.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):u}}const n={},o=i=>(r(n,i),n);return r(o),{...e,containerQueries:o}}const Je={xs:0,sm:600,md:900,lg:1200,xl:1536},Jt={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Je[e]}px)`},fn={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:Je[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function ge(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const i=n.breakpoints||Jt;return t.reduce((c,l,u)=>(c[i.up(i.keys[u])]=r(t[u]),c),{})}if(typeof t=="object"){const i=n.breakpoints||Jt;return Object.keys(t).reduce((c,l)=>{if(cn(i.keys,l)){const u=ln(n.containerQueries?n:fn,l);u&&(c[u]=r(t[l],l))}else if(Object.keys(i.values||Je).includes(l)){const u=i.up(l);c[u]=r(t[l],l)}else{const u=l;c[u]=t[u]}return c},{})}return r(t)}function dn(e={}){return e.keys?.reduce((r,n)=>{const o=e.up(n);return r[o]={},r},{})||{}}function Qt(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function Qe(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(n!=null)return n}return t.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function Ge(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=Qe(e,r)||n,t&&(o=t(o,n,e)),o}function re(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,i=c=>{if(c[t]==null)return null;const l=c[t],u=c.theme,f=Qe(u,n)||{};return ge(c,l,m=>{let p=Ge(f,o,m);return m===p&&typeof m=="string"&&(p=Ge(f,o,`${t}${m==="default"?"":Te(m)}`,m)),r===!1?p:{[r]:p}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[t]:Ce}:{},i.filterProps=[t],i}function pn(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const mn={m:"margin",p:"padding"},hn={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Zt={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},gn=pn(e=>{if(e.length>2)if(Zt[e])e=Zt[e];else return[e];const[t,r]=e.split(""),n=mn[t],o=hn[r]||"";return Array.isArray(o)?o.map(i=>n+i):[n+o]}),Ze=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],et=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],yn=[...Ze,...et];function De(e,t,r,n){const o=Qe(e,t,!0)??r;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${i}.`),typeof o=="string"?`calc(${i} * ${o})`:o*i):Array.isArray(o)?i=>{if(typeof i=="string")return i;const c=Math.abs(i);process.env.NODE_ENV!=="production"&&(Number.isInteger(c)?c>o.length-1&&console.error([`MUI: The value provided (${c}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${c} > ${o.length-1}, you need to add the missing values.`].join(`
4
+ `)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
5
+ `)));const l=o[c];return i>=0?l:typeof l=="number"?-l:`-${l}`}:typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
6
+ `)),()=>{})}function At(e){return De(e,"spacing",8,"spacing")}function Be(e,t){return typeof t=="string"||t==null?t:e(t)}function bn(e,t){return r=>e.reduce((n,o)=>(n[o]=Be(t,r),n),{})}function vn(e,t,r,n){if(!t.includes(r))return null;const o=gn(r),i=bn(o,n),c=e[r];return ge(e,c,i)}function Sr(e,t){const r=At(e.theme);return Object.keys(e).map(n=>vn(e,t,n,r)).reduce(Me,{})}function ee(e){return Sr(e,Ze)}ee.propTypes=process.env.NODE_ENV!=="production"?Ze.reduce((e,t)=>(e[t]=Ce,e),{}):{};ee.filterProps=Ze;function te(e){return Sr(e,et)}te.propTypes=process.env.NODE_ENV!=="production"?et.reduce((e,t)=>(e[t]=Ce,e),{}):{};te.filterProps=et;process.env.NODE_ENV!=="production"&&yn.reduce((e,t)=>(e[t]=Ce,e),{});function tt(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(i=>{n[i]=o}),n),{}),r=n=>Object.keys(n).reduce((o,i)=>t[i]?Me(o,t[i](n)):o,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function le(e){return typeof e!="number"?e:`${e}px solid`}function ue(e,t){return re({prop:e,themeKey:"borders",transform:t})}const Sn=ue("border",le),Cn=ue("borderTop",le),En=ue("borderRight",le),xn=ue("borderBottom",le),Tn=ue("borderLeft",le),wn=ue("borderColor"),An=ue("borderTopColor"),$n=ue("borderRightColor"),On=ue("borderBottomColor"),_n=ue("borderLeftColor"),Rn=ue("outline",le),Pn=ue("outlineColor"),rt=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=De(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:Be(t,n)});return ge(e,e.borderRadius,r)}return null};rt.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Ce}:{};rt.filterProps=["borderRadius"];tt(Sn,Cn,En,xn,Tn,wn,An,$n,On,_n,rt,Rn,Pn);const nt=e=>{if(e.gap!==void 0&&e.gap!==null){const t=De(e.theme,"spacing",8,"gap"),r=n=>({gap:Be(t,n)});return ge(e,e.gap,r)}return null};nt.propTypes=process.env.NODE_ENV!=="production"?{gap:Ce}:{};nt.filterProps=["gap"];const ot=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=De(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:Be(t,n)});return ge(e,e.columnGap,r)}return null};ot.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Ce}:{};ot.filterProps=["columnGap"];const it=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=De(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:Be(t,n)});return ge(e,e.rowGap,r)}return null};it.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Ce}:{};it.filterProps=["rowGap"];const In=re({prop:"gridColumn"}),kn=re({prop:"gridRow"}),Nn=re({prop:"gridAutoFlow"}),Mn=re({prop:"gridAutoColumns"}),jn=re({prop:"gridAutoRows"}),Dn=re({prop:"gridTemplateColumns"}),Bn=re({prop:"gridTemplateRows"}),Ln=re({prop:"gridTemplateAreas"}),Fn=re({prop:"gridArea"});tt(nt,ot,it,In,kn,Nn,Mn,jn,Dn,Bn,Ln,Fn);function Re(e,t){return t==="grey"?t:e}const Vn=re({prop:"color",themeKey:"palette",transform:Re}),zn=re({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Re}),Wn=re({prop:"backgroundColor",themeKey:"palette",transform:Re});tt(Vn,zn,Wn);function ae(e){return e<=1&&e!==0?`${e*100}%`:e}const Un=re({prop:"width",transform:ae}),$t=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{const n=e.theme?.breakpoints?.values?.[r]||Je[r];return n?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:ae(r)}};return ge(e,e.maxWidth,t)}return null};$t.filterProps=["maxWidth"];const Yn=re({prop:"minWidth",transform:ae}),qn=re({prop:"height",transform:ae}),Hn=re({prop:"maxHeight",transform:ae}),Gn=re({prop:"minHeight",transform:ae});re({prop:"size",cssProperty:"width",transform:ae});re({prop:"size",cssProperty:"height",transform:ae});const Kn=re({prop:"boxSizing"});tt(Un,$t,Yn,qn,Hn,Gn,Kn);const st={border:{themeKey:"borders",transform:le},borderTop:{themeKey:"borders",transform:le},borderRight:{themeKey:"borders",transform:le},borderBottom:{themeKey:"borders",transform:le},borderLeft:{themeKey:"borders",transform:le},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:le},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:rt},color:{themeKey:"palette",transform:Re},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Re},backgroundColor:{themeKey:"palette",transform:Re},p:{style:te},pt:{style:te},pr:{style:te},pb:{style:te},pl:{style:te},px:{style:te},py:{style:te},padding:{style:te},paddingTop:{style:te},paddingRight:{style:te},paddingBottom:{style:te},paddingLeft:{style:te},paddingX:{style:te},paddingY:{style:te},paddingInline:{style:te},paddingInlineStart:{style:te},paddingInlineEnd:{style:te},paddingBlock:{style:te},paddingBlockStart:{style:te},paddingBlockEnd:{style:te},m:{style:ee},mt:{style:ee},mr:{style:ee},mb:{style:ee},ml:{style:ee},mx:{style:ee},my:{style:ee},margin:{style:ee},marginTop:{style:ee},marginRight:{style:ee},marginBottom:{style:ee},marginLeft:{style:ee},marginX:{style:ee},marginY:{style:ee},marginInline:{style:ee},marginInlineStart:{style:ee},marginInlineEnd:{style:ee},marginBlock:{style:ee},marginBlockStart:{style:ee},marginBlockEnd:{style:ee},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:nt},rowGap:{style:it},columnGap:{style:ot},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ae},maxWidth:{style:$t},minWidth:{transform:ae},height:{transform:ae},maxHeight:{transform:ae},minHeight:{transform:ae},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Xn(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function Jn(e,t){return typeof e=="function"?e(t):e}function Qn(){function e(r,n,o,i){const c={[r]:n,theme:o},l=i[r];if(!l)return{[r]:n};const{cssProperty:u=r,themeKey:f,transform:g,style:m}=l;if(n==null)return null;if(f==="typography"&&n==="inherit")return{[r]:n};const p=Qe(o,f)||{};return m?m(c):ge(c,n,h=>{let a=Ge(p,g,h);return h===a&&typeof h=="string"&&(a=Ge(p,g,`${r}${h==="default"?"":Te(h)}`,h)),u===!1?a:{[u]:a}})}function t(r){const{sx:n,theme:o={},nested:i}=r||{};if(!n)return null;const c=o.unstable_sxConfig??st;function l(u){let f=u;if(typeof u=="function")f=u(o);else if(typeof u!="object")return u;if(!f)return null;const g=dn(o.breakpoints),m=Object.keys(g);let p=g;return Object.keys(f).forEach(v=>{const h=Jn(f[v],o);if(h!=null)if(typeof h=="object")if(c[v])p=Me(p,e(v,h,o,c));else{const a=ge({theme:o},h,S=>({[v]:S}));Xn(a,h)?p[v]=t({sx:h,theme:o,nested:!0}):p=Me(p,a)}else p=Me(p,e(v,h,o,c))}),!i&&o.modularCssLayers?{"@layer sx":Xt(o,Qt(m,p))}:Xt(o,Qt(m,p))}return Array.isArray(n)?n.map(l):l(n)}return t}const Pe=Qn();Pe.filterProps=["sx"];function Zn(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var eo={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function to(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var ro=/[A-Z]|^ms/g,no=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Cr=function(t){return t.charCodeAt(1)===45},er=function(t){return t!=null&&typeof t!="boolean"},gt=to(function(e){return Cr(e)?e:e.replace(ro,"-$&").toLowerCase()}),tr=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(no,function(n,o,i){return ye={name:o,styles:i,next:ye},o})}return eo[t]!==1&&!Cr(t)&&typeof r=="number"&&r!==0?r+"px":r};function Ke(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return ye={name:o.name,styles:o.styles,next:ye},o.name;var i=r;if(i.styles!==void 0){var c=i.next;if(c!==void 0)for(;c!==void 0;)ye={name:c.name,styles:c.styles,next:ye},c=c.next;var l=i.styles+";";return l}return oo(e,t,r)}}var u=r;return u}function oo(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=Ke(e,t,r[o])+";";else for(var i in r){var c=r[i];if(typeof c!="object"){var l=c;er(l)&&(n+=gt(i)+":"+tr(i,l)+";")}else if(Array.isArray(c)&&typeof c[0]=="string"&&t==null)for(var u=0;u<c.length;u++)er(c[u])&&(n+=gt(i)+":"+tr(i,c[u])+";");else{var f=Ke(e,t,c);switch(i){case"animation":case"animationName":{n+=gt(i)+":"+f+";";break}default:n+=i+"{"+f+"}"}}}return n}var rr=/label:\s*([^\s;{]+)\s*(;|$)/g,ye;function io(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";ye=void 0;var i=e[0];if(i==null||i.raw===void 0)n=!1,o+=Ke(r,t,i);else{var c=i;o+=c[0]}for(var l=1;l<e.length;l++)if(o+=Ke(r,t,e[l]),n){var u=i;o+=u[l]}rr.lastIndex=0;for(var f="",g;(g=rr.exec(o))!==null;)f+="-"+g[1];var m=Zn(o)+f;return{name:m,styles:o,next:ye}}function so(e,t){const r=Dr(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const o=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
7
+ `)):n.some(i=>i===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),r(...n)}:r}function ao(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const nr=[];function xe(e){return nr[0]=e,io(nr)}const co=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function lo(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...o}=e,i=co(t),c=Object.keys(i);function l(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r})`}function u(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-n/100}${r})`}function f(p,v){const h=c.indexOf(v);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r}) and (max-width:${(h!==-1&&typeof t[c[h]]=="number"?t[c[h]]:v)-n/100}${r})`}function g(p){return c.indexOf(p)+1<c.length?f(p,c[c.indexOf(p)+1]):l(p)}function m(p){const v=c.indexOf(p);return v===0?l(c[1]):v===c.length-1?u(c[v]):f(p,c[c.indexOf(p)+1]).replace("@media","@media not all and")}return{keys:c,values:i,up:l,down:u,between:f,only:g,not:m,unit:r,...o}}const uo={borderRadius:4};function Er(e=8,t=At({spacing:e})){if(e.mui)return e;const r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(i=>{const c=t(i);return typeof c=="number"?`${c}px`:c}).join(" "));return r.mui=!0,r}function fo(e,t){const r=this;if(r.vars){if(!r.colorSchemes?.[e]||typeof r.getColorSchemeSelector!="function")return{};let n=r.getColorSchemeSelector(e);return n==="&"?t:((n.includes("data-")||n.includes("."))&&(n=`*:where(${n.replace(/\s*&$/,"")}) &`),{[n]:t})}return r.palette.mode===e?t:{}}function xr(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:i={},...c}=e,l=lo(r),u=Er(o);let f=ce({breakpoints:l,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:u,shape:{...uo,...i}},c);return f=un(f),f.applyStyles=fo,f=t.reduce((g,m)=>ce(g,m),f),f.unstable_sxConfig={...st,...c?.unstable_sxConfig},f.unstable_sx=function(m){return Pe({sx:m,theme:this})},f}function Tr(e){const{variants:t,...r}=e,n={variants:t,style:xe(r),isProcessed:!0};return n.style===r||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=xe(o.style))}),n}const po=xr();function yt(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Ee(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function mo(e){return e?(t,r)=>r[e]:null}function ho(e,t,r){e.theme=vo(e.theme)?r:e.theme[t]||e.theme}function qe(e,t,r){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(o=>qe(e,o,r));if(Array.isArray(n?.variants)){let o;if(n.isProcessed)o=r?Ee(n.style,r):n.style;else{const{variants:i,...c}=n;o=r?Ee(xe(c),r):c}return wr(e,n.variants,[o],r)}return n?.isProcessed?r?Ee(xe(n.style),r):n.style:r?Ee(xe(n),r):n}function wr(e,t,r=[],n=void 0){let o;e:for(let i=0;i<t.length;i+=1){const c=t[i];if(typeof c.props=="function"){if(o??={...e,...e.ownerState,ownerState:e.ownerState},!c.props(o))continue}else for(const l in c.props)if(e[l]!==c.props[l]&&e.ownerState?.[l]!==c.props[l])continue e;typeof c.style=="function"?(o??={...e,...e.ownerState,ownerState:e.ownerState},r.push(n?Ee(xe(c.style(o)),n):c.style(o))):r.push(n?Ee(xe(c.style),n):c.style)}return r}function go(e={}){const{themeId:t,defaultTheme:r=po,rootShouldForwardProp:n=yt,slotShouldForwardProp:o=yt}=e;function i(l){ho(l,t,r)}return(l,u={})=>{ao(l,U=>U.filter(Z=>Z!==Pe));const{name:f,slot:g,skipVariantsResolver:m,skipSx:p,overridesResolver:v=mo(Ar(g)),...h}=u,a=f&&f.startsWith("Mui")||g?"components":"custom",S=m!==void 0?m:g&&g!=="Root"&&g!=="root"||!1,E=p||!1;let k=yt;g==="Root"||g==="root"?k=n:g?k=o:So(l)&&(k=void 0);const T=so(l,{shouldForwardProp:k,label:bo(f,g),...h}),w=U=>{if(U.__emotion_real===U)return U;if(typeof U=="function")return function(Q){return qe(Q,U,Q.theme.modularCssLayers?a:void 0)};if(he(U)){const Z=Tr(U);return function(L){return Z.variants?qe(L,Z,L.theme.modularCssLayers?a:void 0):L.theme.modularCssLayers?Ee(Z.style,a):Z.style}}return U},y=(...U)=>{const Z=[],Q=U.map(w),L=[];if(Z.push(i),f&&v&&L.push(function(B){const ne=B.theme.components?.[f]?.styleOverrides;if(!ne)return null;const se={};for(const fe in ne)se[fe]=qe(B,ne[fe],B.theme.modularCssLayers?"theme":void 0);return v(B,se)}),f&&!S&&L.push(function(B){const ne=B.theme?.components?.[f]?.variants;return ne?wr(B,ne,[],B.theme.modularCssLayers?"theme":void 0):null}),E||L.push(Pe),Array.isArray(Q[0])){const F=Q.shift(),B=new Array(Z.length).fill(""),ie=new Array(L.length).fill("");let ne;ne=[...B,...F,...ie],ne.raw=[...B,...F.raw,...ie],Z.unshift(ne)}const s=[...Z,...Q,...L],A=T(...s);return l.muiName&&(A.muiName=l.muiName),process.env.NODE_ENV!=="production"&&(A.displayName=yo(f,g,l)),A};return T.withConfig&&(y.withConfig=T.withConfig),y}}function yo(e,t,r){return e?`${e}${Te(t||"")}`:`Styled(${Zr(r)})`}function bo(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${Ar(t||"Root")}`),r}function vo(e){for(const t in e)return!1;return!0}function So(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Ar(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Ot(e,t=0,r=1){return process.env.NODE_ENV!=="production"&&(e<t||e>r)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),sn(e,t,r)}function Co(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),r?`rgb${r.length===4?"a":""}(${r.map((n,o)=>o<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function Se(e){if(e.type)return e;if(e.charAt(0)==="#")return Se(Co(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
8
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:ve(9,e));let n=e.substring(t+1,e.length-1),o;if(r==="color"){if(n=n.split(" "),o=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
9
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:ve(10,o))}else n=n.split(",");return n=n.map(i=>parseFloat(i)),{type:r,values:n,colorSpace:o}}const Eo=e=>{const t=Se(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},ke=(e,t)=>{try{return Eo(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function at(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((o,i)=>i<3?parseInt(o,10):o):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function $r(e){e=Se(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,i=n*Math.min(o,1-o),c=(f,g=(f+r/30)%12)=>o-i*Math.max(Math.min(g-3,9-g,1),-1);let l="rgb";const u=[Math.round(c(0)*255),Math.round(c(8)*255),Math.round(c(4)*255)];return e.type==="hsla"&&(l+="a",u.push(t[3])),at({type:l,values:u})}function Et(e){e=Se(e);let t=e.type==="hsl"||e.type==="hsla"?Se($r(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function or(e,t){const r=Et(e),n=Et(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function xo(e,t){return e=Se(e),t=Ot(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,at(e)}function Ue(e,t,r){try{return xo(e,t)}catch{return e}}function _t(e,t){if(e=Se(e),t=Ot(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return at(e)}function G(e,t,r){try{return _t(e,t)}catch{return e}}function Rt(e,t){if(e=Se(e),t=Ot(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return at(e)}function K(e,t,r){try{return Rt(e,t)}catch{return e}}function To(e,t=.15){return Et(e)>.5?_t(e,t):Rt(e,t)}function Ye(e,t,r){try{return To(e,t)}catch{return e}}const wo=be.createContext(void 0);process.env.NODE_ENV!=="production"&&(D.node,D.object);function Ao(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const o=t.components[r];return o.defaultProps?Ct(o.defaultProps,n):!o.styleOverrides&&!o.variants?Ct(o,n):n}function $o({props:e,name:t}){const r=be.useContext(wo);return Ao({props:e,name:t,theme:{components:r}})}const ir={theme:void 0};function Oo(e){let t,r;return function(o){let i=t;return(i===void 0||o.theme!==r)&&(ir.theme=o.theme,i=Tr(e(ir)),t=i,r=o.theme),i}}function _o(e=""){function t(...n){if(!n.length)return"";const o=n[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${t(...n.slice(1))})`:`, ${o}`}return(n,...o)=>`var(--${e?`${e}-`:""}${n}${t(...o)})`}const sr=(e,t,r,n=[])=>{let o=e;t.forEach((i,c)=>{c===t.length-1?Array.isArray(o)?o[Number(i)]=r:o&&typeof o=="object"&&(o[i]=r):o&&typeof o=="object"&&(o[i]||(o[i]=n.includes(i)?[]:{}),o=o[i])})},Ro=(e,t,r)=>{function n(o,i=[],c=[]){Object.entries(o).forEach(([l,u])=>{(!r||r&&!r([...i,l]))&&u!=null&&(typeof u=="object"&&Object.keys(u).length>0?n(u,[...i,l],Array.isArray(u)?[...c,l]:c):t([...i,l],u,c))})}n(e)},Po=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function bt(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},o={},i={},c={};return Ro(e,(l,u,f)=>{if((typeof u=="string"||typeof u=="number")&&(!n||!n(l,u))){const g=`--${r?`${r}-`:""}${l.join("-")}`,m=Po(l,u);Object.assign(o,{[g]:m}),sr(i,l,`var(${g})`,f),sr(c,l,`var(${g}, ${m})`,f)}},l=>l[0]==="vars"),{css:o,vars:i,varsWithDefaults:c}}function Io(e,t={}){const{getSelector:r=S,disableCssColorScheme:n,colorSchemeSelector:o}=t,{colorSchemes:i={},components:c,defaultColorScheme:l="light",...u}=e,{vars:f,css:g,varsWithDefaults:m}=bt(u,t);let p=m;const v={},{[l]:h,...a}=i;if(Object.entries(a||{}).forEach(([T,w])=>{const{vars:y,css:U,varsWithDefaults:Z}=bt(w,t);p=ce(p,Z),v[T]={css:U,vars:y}}),h){const{css:T,vars:w,varsWithDefaults:y}=bt(h,t);p=ce(p,y),v[l]={css:T,vars:w}}function S(T,w){let y=o;if(o==="class"&&(y=".%s"),o==="data"&&(y="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(y=`[${o}="%s"]`),T){if(y==="media")return e.defaultColorScheme===T?":root":{[`@media (prefers-color-scheme: ${i[T]?.palette?.mode||T})`]:{":root":w}};if(y)return e.defaultColorScheme===T?`:root, ${y.replace("%s",String(T))}`:y.replace("%s",String(T))}return":root"}return{vars:p,generateThemeVars:()=>{let T={...f};return Object.entries(v).forEach(([,{vars:w}])=>{T=ce(T,w)}),T},generateStyleSheets:()=>{const T=[],w=e.defaultColorScheme||"light";function y(Q,L){Object.keys(L).length&&T.push(typeof Q=="string"?{[Q]:{...L}}:Q)}y(r(void 0,{...g}),g);const{[w]:U,...Z}=v;if(U){const{css:Q}=U,L=i[w]?.palette?.mode,s=!n&&L?{colorScheme:L,...Q}:{...Q};y(r(w,{...s}),s)}return Object.entries(Z).forEach(([Q,{css:L}])=>{const s=i[Q]?.palette?.mode,A=!n&&s?{colorScheme:s,...L}:{...L};y(r(Q,{...A}),A)}),T}}}function ko(e){return function(r){return e==="media"?(process.env.NODE_ENV!=="production"&&r!=="light"&&r!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${r}'.`),`@media (prefers-color-scheme: ${r})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}const je={black:"#000",white:"#fff"},No={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},we={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Ae={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Ie={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},$e={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Oe={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},_e={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Or(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:je.white,default:je.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Mo=Or();function _r(){return{text:{primary:je.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:je.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const ar=_r();function cr(e,t,r,n){const o=n.light||n,i=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Rt(e.main,o):t==="dark"&&(e.dark=_t(e.main,i)))}function jo(e="light"){return e==="dark"?{main:$e[200],light:$e[50],dark:$e[400]}:{main:$e[700],light:$e[400],dark:$e[800]}}function Do(e="light"){return e==="dark"?{main:we[200],light:we[50],dark:we[400]}:{main:we[500],light:we[300],dark:we[700]}}function Bo(e="light"){return e==="dark"?{main:Ae[500],light:Ae[300],dark:Ae[700]}:{main:Ae[700],light:Ae[400],dark:Ae[800]}}function Lo(e="light"){return e==="dark"?{main:Oe[400],light:Oe[300],dark:Oe[700]}:{main:Oe[700],light:Oe[500],dark:Oe[900]}}function Fo(e="light"){return e==="dark"?{main:_e[400],light:_e[300],dark:_e[700]}:{main:_e[800],light:_e[500],dark:_e[900]}}function Vo(e="light"){return e==="dark"?{main:Ie[400],light:Ie[300],dark:Ie[700]}:{main:"#ed6c02",light:Ie[500],dark:Ie[900]}}function Pt(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...o}=e,i=e.primary||jo(t),c=e.secondary||Do(t),l=e.error||Bo(t),u=e.info||Lo(t),f=e.success||Fo(t),g=e.warning||Vo(t);function m(a){const S=or(a,ar.text.primary)>=r?ar.text.primary:Mo.text.primary;if(process.env.NODE_ENV!=="production"){const E=or(a,S);E<3&&console.error([`MUI: The contrast ratio of ${E}:1 for ${S} on ${a}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
10
+ `))}return S}const p=({color:a,name:S,mainShade:E=500,lightShade:k=300,darkShade:T=700})=>{if(a={...a},!a.main&&a[E]&&(a.main=a[E]),!a.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${S?` (${S})`:""} provided to augmentColor(color) is invalid.
11
+ The color object needs to have a \`main\` property or a \`${E}\` property.`:ve(11,S?` (${S})`:"",E));if(typeof a.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${S?` (${S})`:""} provided to augmentColor(color) is invalid.
12
+ \`color.main\` should be a string, but \`${JSON.stringify(a.main)}\` was provided instead.
13
+
14
+ Did you intend to use one of the following approaches?
15
+
16
+ import { green } from "@mui/material/colors";
17
+
18
+ const theme1 = createTheme({ palette: {
19
+ primary: green,
20
+ } });
21
+
22
+ const theme2 = createTheme({ palette: {
23
+ primary: { main: green[500] },
24
+ } });`:ve(12,S?` (${S})`:"",JSON.stringify(a.main)));return cr(a,"light",k,n),cr(a,"dark",T,n),a.contrastText||(a.contrastText=m(a.main)),a};let v;return t==="light"?v=Or():t==="dark"&&(v=_r()),process.env.NODE_ENV!=="production"&&(v||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),ce({common:{...je},mode:t,primary:p({color:i,name:"primary"}),secondary:p({color:c,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:l,name:"error"}),warning:p({color:g,name:"warning"}),info:p({color:u,name:"info"}),success:p({color:f,name:"success"}),grey:No,contrastThreshold:r,getContrastText:m,augmentColor:p,tonalOffset:n,...v},o)}function zo(e){const t={};return Object.entries(e).forEach(n=>{const[o,i]=n;typeof i=="object"&&(t[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function Wo(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function Uo(e){return Math.round(e*1e5)/1e5}const lr={textTransform:"uppercase"},ur='"Roboto", "Helvetica", "Arial", sans-serif';function Yo(e,t){const{fontFamily:r=ur,fontSize:n=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:c=500,fontWeightBold:l=700,htmlFontSize:u=16,allVariants:f,pxToRem:g,...m}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof n!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof u!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const p=n/14,v=g||(S=>`${S/u*p}rem`),h=(S,E,k,T,w)=>({fontFamily:r,fontWeight:S,fontSize:v(E),lineHeight:k,...r===ur?{letterSpacing:`${Uo(T/E)}em`}:{},...w,...f}),a={h1:h(o,96,1.167,-1.5),h2:h(o,60,1.2,-.5),h3:h(i,48,1.167,0),h4:h(i,34,1.235,.25),h5:h(i,24,1.334,0),h6:h(c,20,1.6,.15),subtitle1:h(i,16,1.75,.15),subtitle2:h(c,14,1.57,.1),body1:h(i,16,1.5,.15),body2:h(i,14,1.43,.15),button:h(c,14,1.75,.4,lr),caption:h(i,12,1.66,.4),overline:h(i,12,2.66,1,lr),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ce({htmlFontSize:u,pxToRem:v,fontFamily:r,fontSize:n,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:c,fontWeightBold:l,...a},m,{clone:!1})}const qo=.2,Ho=.14,Go=.12;function J(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${qo})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Ho})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Go})`].join(",")}const Ko=["none",J(0,2,1,-1,0,1,1,0,0,1,3,0),J(0,3,1,-2,0,2,2,0,0,1,5,0),J(0,3,3,-2,0,3,4,0,0,1,8,0),J(0,2,4,-1,0,4,5,0,0,1,10,0),J(0,3,5,-1,0,5,8,0,0,1,14,0),J(0,3,5,-1,0,6,10,0,0,1,18,0),J(0,4,5,-2,0,7,10,1,0,2,16,1),J(0,5,5,-3,0,8,10,1,0,3,14,2),J(0,5,6,-3,0,9,12,1,0,3,16,2),J(0,6,6,-3,0,10,14,1,0,4,18,3),J(0,6,7,-4,0,11,15,1,0,4,20,3),J(0,7,8,-4,0,12,17,2,0,5,22,4),J(0,7,8,-4,0,13,19,2,0,5,24,4),J(0,7,9,-4,0,14,21,2,0,5,26,4),J(0,8,9,-5,0,15,22,2,0,6,28,5),J(0,8,10,-5,0,16,24,2,0,6,30,5),J(0,8,11,-5,0,17,26,2,0,6,32,5),J(0,9,11,-5,0,18,28,2,0,7,34,6),J(0,9,12,-6,0,19,29,2,0,7,36,6),J(0,10,13,-6,0,20,31,3,0,8,38,7),J(0,10,13,-6,0,21,33,3,0,8,40,7),J(0,10,14,-6,0,22,35,3,0,8,42,7),J(0,11,14,-7,0,23,36,3,0,9,44,8),J(0,11,15,-7,0,24,38,3,0,9,46,8)],Xo={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Jo={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function fr(e){return`${Math.round(e)}ms`}function Qo(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Zo(e){const t={...Xo,...e.easing},r={...Jo,...e.duration};return{getAutoHeightDuration:Qo,create:(o=["all"],i={})=>{const{duration:c=r.standard,easing:l=t.easeInOut,delay:u=0,...f}=i;if(process.env.NODE_ENV!=="production"){const g=p=>typeof p=="string",m=p=>!Number.isNaN(parseFloat(p));!g(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!m(c)&&!g(c)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${c}.`),g(l)||console.error('MUI: Argument "easing" must be a string.'),!m(u)&&!g(u)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof i!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
25
+ `)),Object.keys(f).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(f).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(g=>`${g} ${typeof c=="string"?c:fr(c)} ${l} ${typeof u=="string"?u:fr(u)}`).join(",")},...e,easing:t,duration:r}}const ei={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function ti(e){return he(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Rr(e={}){const t={...e};function r(n){const o=Object.entries(n);for(let i=0;i<o.length;i++){const[c,l]=o[i];!ti(l)||c.startsWith("unstable_")?delete n[c]:he(l)&&(n[c]={...l},r(n[c]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
26
+
27
+ const theme = ${JSON.stringify(t,null,2)};
28
+
29
+ theme.breakpoints = createBreakpoints(theme.breakpoints || {});
30
+ theme.transitions = createTransitions(theme.transitions || {});
31
+
32
+ export default theme;`}function xt(e={},...t){const{breakpoints:r,mixins:n={},spacing:o,palette:i={},transitions:c={},typography:l={},shape:u,...f}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":ve(20));const g=Pt(i),m=xr(e);let p=ce(m,{mixins:Wo(m.breakpoints,n),palette:g,shadows:Ko.slice(),typography:Yo(g,l),transitions:Zo(c),zIndex:{...ei}});if(p=ce(p,f),p=t.reduce((v,h)=>ce(v,h),p),process.env.NODE_ENV!=="production"){const v=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],h=(a,S)=>{let E;for(E in a){const k=a[E];if(v.includes(E)&&Object.keys(k).length>0){if(process.env.NODE_ENV!=="production"){const T=wt("",E);console.error([`MUI: The \`${S}\` component increases the CSS specificity of the \`${E}\` internal state.`,"You can not override it like this: ",JSON.stringify(a,null,2),"",`Instead, you need to use the '&.${T}' syntax:`,JSON.stringify({root:{[`&.${T}`]:k}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
33
+ `))}a[E]={}}}};Object.keys(p.components).forEach(a=>{const S=p.components[a].styleOverrides;S&&a.startsWith("Mui")&&h(S,a)})}return p.unstable_sxConfig={...st,...f?.unstable_sxConfig},p.unstable_sx=function(h){return Pe({sx:h,theme:this})},p.toRuntimeSource=Rr,p}function ri(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const ni=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=ri(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Pr(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Ir(e){return e==="dark"?ni:[]}function oi(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...o}=e,i=Pt(t);return{palette:i,opacity:{...Pr(i.mode),...r},overlays:n||Ir(i.mode),...o}}function ii(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const si=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],ai=e=>(t,r)=>{const n=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const c={};return si(e.cssVarPrefix).forEach(l=>{c[l]=r[l],delete r[l]}),i==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:c}}:i?{[i.replace("%s",t)]:c,[`${n}, ${i.replace("%s",t)}`]:r}:{[n]:{...r,...c}}}if(i&&i!=="media")return`${n}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(i)return i.replace("%s",String(t))}return n};function ci(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function d(e,t,r){!e[t]&&r&&(e[t]=r)}function Ne(e){return typeof e!="string"||!e.startsWith("hsl")?e:$r(e)}function me(e,t){`${t}Channel`in e||(e[`${t}Channel`]=ke(Ne(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
34
+ To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function li(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const pe=e=>{try{return e()}catch{}},ui=(e="mui")=>_o(e);function vt(e,t,r,n){if(!t)return;t=t===!0?{}:t;const o=n==="dark"?"dark":"light";if(!r){e[n]=oi({...t,palette:{mode:o,...t?.palette}});return}const{palette:i,...c}=xt({...r,palette:{mode:o,...t?.palette}});return e[n]={...t,palette:i,opacity:{...Pr(o),...t?.opacity},overlays:t?.overlays||Ir(o)},c}function fi(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:c=ii,colorSchemeSelector:l=r.light&&r.dark?"media":void 0,rootSelector:u=":root",...f}=e,g=Object.keys(r)[0],m=n||(r.light&&g!=="light"?"light":g),p=ui(i),{[m]:v,light:h,dark:a,...S}=r,E={...S};let k=v;if((m==="dark"&&!("dark"in r)||m==="light"&&!("light"in r))&&(k=!0),!k)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${m}\` option is either missing or invalid.`:ve(21,m));const T=vt(E,k,f,m);h&&!E.light&&vt(E,h,void 0,"light"),a&&!E.dark&&vt(E,a,void 0,"dark");let w={defaultColorScheme:m,...T,cssVarPrefix:i,colorSchemeSelector:l,rootSelector:u,getCssVar:p,colorSchemes:E,font:{...zo(T.typography),...T.font},spacing:li(f.spacing)};Object.keys(w.colorSchemes).forEach(L=>{const s=w.colorSchemes[L].palette,A=F=>{const B=F.split("-"),ie=B[1],ne=B[2];return p(F,s[ie][ne])};if(s.mode==="light"&&(d(s.common,"background","#fff"),d(s.common,"onBackground","#000")),s.mode==="dark"&&(d(s.common,"background","#000"),d(s.common,"onBackground","#fff")),ci(s,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),s.mode==="light"){d(s.Alert,"errorColor",G(s.error.light,.6)),d(s.Alert,"infoColor",G(s.info.light,.6)),d(s.Alert,"successColor",G(s.success.light,.6)),d(s.Alert,"warningColor",G(s.warning.light,.6)),d(s.Alert,"errorFilledBg",A("palette-error-main")),d(s.Alert,"infoFilledBg",A("palette-info-main")),d(s.Alert,"successFilledBg",A("palette-success-main")),d(s.Alert,"warningFilledBg",A("palette-warning-main")),d(s.Alert,"errorFilledColor",pe(()=>s.getContrastText(s.error.main))),d(s.Alert,"infoFilledColor",pe(()=>s.getContrastText(s.info.main))),d(s.Alert,"successFilledColor",pe(()=>s.getContrastText(s.success.main))),d(s.Alert,"warningFilledColor",pe(()=>s.getContrastText(s.warning.main))),d(s.Alert,"errorStandardBg",K(s.error.light,.9)),d(s.Alert,"infoStandardBg",K(s.info.light,.9)),d(s.Alert,"successStandardBg",K(s.success.light,.9)),d(s.Alert,"warningStandardBg",K(s.warning.light,.9)),d(s.Alert,"errorIconColor",A("palette-error-main")),d(s.Alert,"infoIconColor",A("palette-info-main")),d(s.Alert,"successIconColor",A("palette-success-main")),d(s.Alert,"warningIconColor",A("palette-warning-main")),d(s.AppBar,"defaultBg",A("palette-grey-100")),d(s.Avatar,"defaultBg",A("palette-grey-400")),d(s.Button,"inheritContainedBg",A("palette-grey-300")),d(s.Button,"inheritContainedHoverBg",A("palette-grey-A100")),d(s.Chip,"defaultBorder",A("palette-grey-400")),d(s.Chip,"defaultAvatarColor",A("palette-grey-700")),d(s.Chip,"defaultIconColor",A("palette-grey-700")),d(s.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),d(s.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),d(s.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),d(s.LinearProgress,"primaryBg",K(s.primary.main,.62)),d(s.LinearProgress,"secondaryBg",K(s.secondary.main,.62)),d(s.LinearProgress,"errorBg",K(s.error.main,.62)),d(s.LinearProgress,"infoBg",K(s.info.main,.62)),d(s.LinearProgress,"successBg",K(s.success.main,.62)),d(s.LinearProgress,"warningBg",K(s.warning.main,.62)),d(s.Skeleton,"bg",`rgba(${A("palette-text-primaryChannel")} / 0.11)`),d(s.Slider,"primaryTrack",K(s.primary.main,.62)),d(s.Slider,"secondaryTrack",K(s.secondary.main,.62)),d(s.Slider,"errorTrack",K(s.error.main,.62)),d(s.Slider,"infoTrack",K(s.info.main,.62)),d(s.Slider,"successTrack",K(s.success.main,.62)),d(s.Slider,"warningTrack",K(s.warning.main,.62));const F=Ye(s.background.default,.8);d(s.SnackbarContent,"bg",F),d(s.SnackbarContent,"color",pe(()=>s.getContrastText(F))),d(s.SpeedDialAction,"fabHoverBg",Ye(s.background.paper,.15)),d(s.StepConnector,"border",A("palette-grey-400")),d(s.StepContent,"border",A("palette-grey-400")),d(s.Switch,"defaultColor",A("palette-common-white")),d(s.Switch,"defaultDisabledColor",A("palette-grey-100")),d(s.Switch,"primaryDisabledColor",K(s.primary.main,.62)),d(s.Switch,"secondaryDisabledColor",K(s.secondary.main,.62)),d(s.Switch,"errorDisabledColor",K(s.error.main,.62)),d(s.Switch,"infoDisabledColor",K(s.info.main,.62)),d(s.Switch,"successDisabledColor",K(s.success.main,.62)),d(s.Switch,"warningDisabledColor",K(s.warning.main,.62)),d(s.TableCell,"border",K(Ue(s.divider,1),.88)),d(s.Tooltip,"bg",Ue(s.grey[700],.92))}if(s.mode==="dark"){d(s.Alert,"errorColor",K(s.error.light,.6)),d(s.Alert,"infoColor",K(s.info.light,.6)),d(s.Alert,"successColor",K(s.success.light,.6)),d(s.Alert,"warningColor",K(s.warning.light,.6)),d(s.Alert,"errorFilledBg",A("palette-error-dark")),d(s.Alert,"infoFilledBg",A("palette-info-dark")),d(s.Alert,"successFilledBg",A("palette-success-dark")),d(s.Alert,"warningFilledBg",A("palette-warning-dark")),d(s.Alert,"errorFilledColor",pe(()=>s.getContrastText(s.error.dark))),d(s.Alert,"infoFilledColor",pe(()=>s.getContrastText(s.info.dark))),d(s.Alert,"successFilledColor",pe(()=>s.getContrastText(s.success.dark))),d(s.Alert,"warningFilledColor",pe(()=>s.getContrastText(s.warning.dark))),d(s.Alert,"errorStandardBg",G(s.error.light,.9)),d(s.Alert,"infoStandardBg",G(s.info.light,.9)),d(s.Alert,"successStandardBg",G(s.success.light,.9)),d(s.Alert,"warningStandardBg",G(s.warning.light,.9)),d(s.Alert,"errorIconColor",A("palette-error-main")),d(s.Alert,"infoIconColor",A("palette-info-main")),d(s.Alert,"successIconColor",A("palette-success-main")),d(s.Alert,"warningIconColor",A("palette-warning-main")),d(s.AppBar,"defaultBg",A("palette-grey-900")),d(s.AppBar,"darkBg",A("palette-background-paper")),d(s.AppBar,"darkColor",A("palette-text-primary")),d(s.Avatar,"defaultBg",A("palette-grey-600")),d(s.Button,"inheritContainedBg",A("palette-grey-800")),d(s.Button,"inheritContainedHoverBg",A("palette-grey-700")),d(s.Chip,"defaultBorder",A("palette-grey-700")),d(s.Chip,"defaultAvatarColor",A("palette-grey-300")),d(s.Chip,"defaultIconColor",A("palette-grey-300")),d(s.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),d(s.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),d(s.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),d(s.LinearProgress,"primaryBg",G(s.primary.main,.5)),d(s.LinearProgress,"secondaryBg",G(s.secondary.main,.5)),d(s.LinearProgress,"errorBg",G(s.error.main,.5)),d(s.LinearProgress,"infoBg",G(s.info.main,.5)),d(s.LinearProgress,"successBg",G(s.success.main,.5)),d(s.LinearProgress,"warningBg",G(s.warning.main,.5)),d(s.Skeleton,"bg",`rgba(${A("palette-text-primaryChannel")} / 0.13)`),d(s.Slider,"primaryTrack",G(s.primary.main,.5)),d(s.Slider,"secondaryTrack",G(s.secondary.main,.5)),d(s.Slider,"errorTrack",G(s.error.main,.5)),d(s.Slider,"infoTrack",G(s.info.main,.5)),d(s.Slider,"successTrack",G(s.success.main,.5)),d(s.Slider,"warningTrack",G(s.warning.main,.5));const F=Ye(s.background.default,.98);d(s.SnackbarContent,"bg",F),d(s.SnackbarContent,"color",pe(()=>s.getContrastText(F))),d(s.SpeedDialAction,"fabHoverBg",Ye(s.background.paper,.15)),d(s.StepConnector,"border",A("palette-grey-600")),d(s.StepContent,"border",A("palette-grey-600")),d(s.Switch,"defaultColor",A("palette-grey-300")),d(s.Switch,"defaultDisabledColor",A("palette-grey-600")),d(s.Switch,"primaryDisabledColor",G(s.primary.main,.55)),d(s.Switch,"secondaryDisabledColor",G(s.secondary.main,.55)),d(s.Switch,"errorDisabledColor",G(s.error.main,.55)),d(s.Switch,"infoDisabledColor",G(s.info.main,.55)),d(s.Switch,"successDisabledColor",G(s.success.main,.55)),d(s.Switch,"warningDisabledColor",G(s.warning.main,.55)),d(s.TableCell,"border",G(Ue(s.divider,1),.68)),d(s.Tooltip,"bg",Ue(s.grey[700],.92))}me(s.background,"default"),me(s.background,"paper"),me(s.common,"background"),me(s.common,"onBackground"),me(s,"divider"),Object.keys(s).forEach(F=>{const B=s[F];F!=="tonalOffset"&&B&&typeof B=="object"&&(B.main&&d(s[F],"mainChannel",ke(Ne(B.main))),B.light&&d(s[F],"lightChannel",ke(Ne(B.light))),B.dark&&d(s[F],"darkChannel",ke(Ne(B.dark))),B.contrastText&&d(s[F],"contrastTextChannel",ke(Ne(B.contrastText))),F==="text"&&(me(s[F],"primary"),me(s[F],"secondary")),F==="action"&&(B.active&&me(s[F],"active"),B.selected&&me(s[F],"selected")))})}),w=t.reduce((L,s)=>ce(L,s),w);const y={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:c,getSelector:ai(w)},{vars:U,generateThemeVars:Z,generateStyleSheets:Q}=Io(w,y);return w.vars=U,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach(([L,s])=>{w[L]=s}),w.generateThemeVars=Z,w.generateStyleSheets=Q,w.generateSpacing=function(){return Er(f.spacing,At(this))},w.getColorSchemeSelector=ko(l),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=c,w.unstable_sxConfig={...st,...f?.unstable_sxConfig},w.unstable_sx=function(s){return Pe({sx:s,theme:this})},w.toRuntimeSource=Rr,w}function dr(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:Pt({...r===!0?{}:r.palette,mode:t})})}function di(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:o=r?void 0:{light:!0},defaultColorScheme:i=r?.mode,...c}=e,l=i||"light",u=o?.[l],f={...o,...r?{[l]:{...typeof u!="boolean"&&u,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return xt(e,...t);let g=r;"palette"in e||f[l]&&(f[l]!==!0?g=f[l].palette:l==="dark"&&(g={mode:"dark"}));const m=xt({...e,palette:g},...t);return m.defaultColorScheme=l,m.colorSchemes=f,m.palette.mode==="light"&&(m.colorSchemes.light={...f.light!==!0&&f.light,palette:m.palette},dr(m,"dark",f.dark)),m.palette.mode==="dark"&&(m.colorSchemes.dark={...f.dark!==!0&&f.dark,palette:m.palette},dr(m,"light",f.light)),m}return!r&&!("light"in f)&&l==="light"&&(f.light=!0),fi({...c,colorSchemes:f,defaultColorScheme:l,...typeof n!="boolean"&&n},...t)}const pi=di(),mi="$$material";function hi(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const gi=e=>hi(e)&&e!=="classes",yi=go({themeId:mi,defaultTheme:pi,rootShouldForwardProp:gi}),bi=Oo;process.env.NODE_ENV!=="production"&&(D.node,D.object.isRequired);function vi(e){return $o(e)}function Si(e){return wt("MuiSvgIcon",e)}on("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Ci=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${Te(t)}`,`fontSize${Te(r)}`]};return en(o,Si,n)},Ei=yi("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${Te(r.color)}`],t[`fontSize${Te(r.fontSize)}`]]}})(bi(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),Xe=be.forwardRef(function(t,r){const n=vi({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:c="inherit",component:l="svg",fontSize:u="medium",htmlColor:f,inheritViewBox:g=!1,titleAccess:m,viewBox:p="0 0 24 24",...v}=n,h=be.isValidElement(o)&&o.type==="svg",a={...n,color:c,component:l,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:g,viewBox:p,hasSvgAsChild:h},S={};g||(S.viewBox=p);const E=Ci(a);return $.jsxs(Ei,{as:l,className:an(E.root,i),focusable:"false",color:f,"aria-hidden":m?void 0:!0,role:m?"img":void 0,ref:r,...S,...v,...h&&o.props,ownerState:a,children:[h?o.props.children:o,m?$.jsx("title",{children:m}):null]})});process.env.NODE_ENV!=="production"&&(Xe.propTypes={children:D.node,classes:D.object,className:D.string,color:D.oneOfType([D.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),D.string]),component:D.elementType,fontSize:D.oneOfType([D.oneOf(["inherit","large","medium","small"]),D.string]),htmlColor:D.string,inheritViewBox:D.bool,shapeRendering:D.string,sx:D.oneOfType([D.arrayOf(D.oneOfType([D.func,D.object,D.bool])),D.func,D.object]),titleAccess:D.string,viewBox:D.string});Xe.muiName="SvgIcon";function kr(e,t){function r(n,o){return $.jsx(Xe,{"data-testid":`${t}Icon`,ref:o,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Xe.muiName,be.memo(be.forwardRef(r))}const xi=kr($.jsx("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z"}),"Logout");function Nr({profile:e,isLoading:t,onSignOut:r,onManageAccount:n}){const o="https://sprylogin.com/my-account/",[i,c]=X.useState(null),l=h=>{c(h.currentTarget)},u=()=>{c(null)},f=()=>{u(),r&&r()},g=()=>{u(),n?n():e?.manageAccountUrl?window.location.href=e.manageAccountUrl:window.location.href=o},m=!!i,p=()=>e?.firstName&&e?.lastName?`${e.firstName[0]}${e.lastName[0]}`.toUpperCase():e?.firstName?e.firstName[0].toUpperCase():e?.email?e.email[0].toUpperCase():"?",v=()=>e?.firstName&&e?.lastName?`${e.firstName} ${e.lastName}`:e?.firstName?e.firstName:e?.email?e.email.split("@")[0]:"User";return $.jsxs($.Fragment,{children:[$.jsx(H.IconButton,{onClick:l,sx:{p:.5,"&:hover":{backgroundColor:"rgba(60, 64, 67, 0.08)"}},disabled:t&&!e,children:t&&!e?$.jsx(H.CircularProgress,{size:32}):$.jsx(H.Avatar,{src:e?.avatar||void 0,sx:{width:32,height:32,bgcolor:"#1a73e8",fontSize:"0.875rem",fontWeight:500},children:p()})}),$.jsxs(H.Menu,{anchorEl:i,open:m,onClose:u,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},slotProps:{paper:{sx:{width:320,mt:1,overflow:"visible",boxShadow:"0 2px 10px rgba(0,0,0,0.2)",borderRadius:"8px"}}},children:[$.jsxs(H.Box,{sx:{px:2,py:2.5},children:[$.jsxs(H.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",mb:2},children:[$.jsx(H.Avatar,{src:e?.avatar||void 0,sx:{width:64,height:64,bgcolor:"#1a73e8",fontSize:"1.5rem",fontWeight:500,mb:1.5},children:p()}),$.jsx(H.Typography,{variant:"subtitle1",sx:{fontWeight:500,color:"text.primary",textAlign:"center",mb:.5},children:v()}),$.jsx(H.Typography,{variant:"body2",sx:{color:"text.secondary",textAlign:"center",wordBreak:"break-all"},children:e?.email||"No email"})]}),$.jsx(H.Button,{variant:"outlined",fullWidth:!0,onClick:g,sx:{borderRadius:"20px",textTransform:"none",borderColor:"#dadce0",color:"#3c4043",fontWeight:500,fontSize:"0.875rem",py:.75,"&:hover":{backgroundColor:"rgba(66, 133, 244, 0.04)",borderColor:"#dadce0"}},children:"Manage your Account"})]}),$.jsx(H.Divider,{}),r&&$.jsxs(H.MenuItem,{onClick:f,sx:{py:1.5,px:2,"&:hover":{backgroundColor:"rgba(60, 64, 67, 0.08)"}},children:[$.jsx(H.ListItemIcon,{sx:{minWidth:36},children:$.jsx(xi,{fontSize:"small",sx:{color:"#5f6368"}})}),$.jsx(H.Typography,{variant:"body2",sx:{color:"#3c4043"},children:"Sign out"})]})]})]})}const St="spry_profile_cache",Ti=300*1e3,wi=300*1e3;function Mr(e,t={}){const{refetchInterval:r=Ti,cacheTime:n=wi,getAuthToken:o,headers:i={}}=t,[c,l]=X.useState(null),[u,f]=X.useState(!0),[g,m]=X.useState(null),p=X.useRef(null),v=X.useRef(null),h=X.useCallback(()=>{try{const E=localStorage.getItem(St);if(!E)return null;const k=JSON.parse(E);return Date.now()-k.timestamp<n?k.profile:(localStorage.removeItem(St),null)}catch(E){return console.error("Error loading profile from cache:",E),null}},[n]),a=X.useCallback(E=>{try{const k={profile:E,timestamp:Date.now()};localStorage.setItem(St,JSON.stringify(k))}catch(k){console.error("Error saving profile to cache:",k)}},[]),S=X.useCallback(async()=>{v.current&&v.current.abort(),v.current=new AbortController;try{f(!0),m(null);let E=null;o&&(E=await Promise.resolve(o()));const k={Accept:"application/json",...i};E&&(k.Authorization=`Bearer ${E}`);const T=await fetch(`${e}/api/profile`,{signal:v.current.signal,headers:k});if(!T.ok)throw new Error(`HTTP error! status: ${T.status}`);const w=await T.json();l(w),a(w),m(null)}catch(E){if(E instanceof Error&&E.name==="AbortError")return;const k=E instanceof Error?E.message:"Failed to fetch profile";m(k),console.error("Error fetching profile:",E);const T=h();T&&l(T)}finally{f(!1)}},[e,o,i,h,a]);return X.useEffect(()=>{const E=h();return E&&(l(E),f(!1)),S(),r>0&&(p.current=window.setInterval(()=>{S()},r)),()=>{p.current&&window.clearInterval(p.current),v.current&&v.current.abort()}},[e,r,n]),{profile:c,isLoading:u,error:g,refetch:S}}function jr({apiUrl:e,onSignOut:t,onManageAccount:r,...n}){const{profile:o,isLoading:i,error:c}=Mr(e,n);return c&&console.error("Error loading profile:",c),$.jsx(Nr,{profile:o,isLoading:i,onSignOut:t,onManageAccount:r})}const Ai=kr($.jsx("path",{d:"M4 8h4V4H4zm6 12h4v-4h-4zm-6 0h4v-4H4zm0-6h4v-4H4zm6 0h4v-4h-4zm6-10v4h4V4zm-6 4h4V4h-4zm6 6h4v-4h-4zm0 6h4v-4h-4z"}),"Apps");function $i({apiUrl:e,profileApiUrl:t,onSignOut:r,getAuthToken:n,profileHeaders:o,showAppsDropdown:i=!0,showProfileMenu:c=!0,appsRefetchInterval:l=300*1e3,appsCacheTime:u=300*1e3,profileRefetchInterval:f=300*1e3,profileCacheTime:g=300*1e3}){const[m,p]=X.useState(!1),v=X.useRef(null),h=t||e;return $.jsxs(H.Stack,{direction:"row",spacing:1,alignItems:"center",children:[i&&$.jsxs($.Fragment,{children:[$.jsx(H.IconButton,{ref:v,onClick:()=>p(!m),sx:{color:"#5f6368","&:hover":{bgcolor:"rgba(60, 64, 67, 0.08)"}},"aria-label":"Google apps",children:$.jsx(Ai,{})}),$.jsx(It,{apiUrl:e,open:m,onClose:()=>p(!1),buttonRef:v,refetchInterval:l,cacheTime:u})]}),c&&$.jsx(jr,{apiUrl:h,onSignOut:r,refetchInterval:f,cacheTime:g,getAuthToken:n,headers:o})]})}function It({apiUrl:e,open:t,onClose:r,buttonRef:n,refetchInterval:o,cacheTime:i}){const{apps:c,isLoading:l,error:u,refetch:f}=mr(e,{refetchInterval:o,cacheTime:i});return $.jsx(pr,{apps:c,open:t,onClose:r,buttonRef:n,isLoading:l,error:u,onRetry:f})}exports.AppsDropdown=pr;exports.AppsDropdownConnected=It;exports.ProfileMenu=Nr;exports.ProfileMenuConnected=jr;exports.TopBar=$i;exports.default=It;exports.useAppsData=mr;exports.useProfileData=Mr;
7
35
  //# sourceMappingURL=index.cjs.map