moi-computer 0.10.1-next.1 → 0.10.1-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/client/components/shared/AgentBlobatar.tsx +93 -0
  2. package/client/features/chat/ChatEmptyState.tsx +110 -80
  3. package/client/features/chat/ChatPanel.tsx +19 -11
  4. package/client/features/chat/ChatPopup.tsx +23 -11
  5. package/client/features/chat/ChatPromptBubbles.tsx +1 -1
  6. package/client/features/chat/TurnView.tsx +0 -17
  7. package/client/features/chat/useStickToBottom.ts +1 -1
  8. package/client/features/dev/ChatStatesPage.tsx +17 -9
  9. package/client/features/workspace/CustomizePanel.tsx +33 -4
  10. package/client/features/workspace/WorkspaceScreen.tsx +11 -5
  11. package/client/features/workspace/WorkspaceTabs.tsx +5 -8
  12. package/client/index.css +28 -13
  13. package/client/index.html +15 -0
  14. package/client/index.tsx +1 -0
  15. package/client/theme.css +9 -0
  16. package/dist/{chunk-efdyz6xp.js → chunk-0pcdwjkp.js} +1 -1
  17. package/dist/chunk-4xmcsjjv.js +1 -0
  18. package/dist/chunk-76j95afs.css +1 -0
  19. package/dist/{chunk-5t06zksf.js → chunk-8jh75pjg.js} +2 -2
  20. package/dist/{chunk-97eg9mjn.js → chunk-9y2zbzqz.js} +1 -1
  21. package/dist/chunk-dfs36zgc.js +1 -0
  22. package/dist/chunk-e4e993yf.js +83 -0
  23. package/dist/chunk-vq8ga42s.js +1 -0
  24. package/dist/{chunk-ht1f95h9.js → chunk-yhj9bg1s.js} +2 -2
  25. package/dist/{chunk-0set7tmf.js → chunk-yt2qjn3m.js} +2 -2
  26. package/dist/chunk-yz743a75.js +10 -0
  27. package/dist/index.html +16 -1
  28. package/lib/themes.ts +21 -3
  29. package/lib/types.ts +1 -1
  30. package/package.json +4 -2
  31. package/server/bundler/build-applet.ts +30 -0
  32. package/server/cli-ui-components.ts +258 -0
  33. package/server/cli.ts +48 -5
  34. package/server/control.ts +5 -3
  35. package/server/moi-scaffold.ts +9 -1
  36. package/server/skills-template.ts +5 -0
  37. package/server/theme.ts +17 -5
  38. package/server/ui-components.ts +545 -0
  39. package/workspace/.claude/skills/moi-workspace/SKILL.md +27 -6
  40. package/workspace/.claude/skills/moi-workspace/references/DESIGN.md +10 -2
  41. package/workspace/.claude/skills/moi-workspace/references/UI-COMPONENTS.md +202 -0
  42. package/client/components/shared/IconGhost.tsx +0 -127
  43. package/dist/chunk-10knptd0.css +0 -1
  44. package/dist/chunk-b4qp3p42.js +0 -83
  45. package/dist/chunk-dfe7qnrp.js +0 -1
  46. package/dist/chunk-h2kj1ysj.js +0 -1
  47. package/dist/chunk-nek4ec05.js +0 -1
  48. package/dist/chunk-qtc5a8qa.js +0 -10
@@ -2,11 +2,14 @@ import type { CSSProperties, ReactNode, Ref } from 'react'
2
2
 
3
3
  import { IconCircleCheckFilled } from '@tabler/icons-react'
4
4
 
5
+ import { AgentBlobatar } from '@/client/components/shared/AgentBlobatar'
5
6
  import { useWorkspaceLayoutCtx } from '@/client/features/workspace/WorkspaceLayoutContext'
6
7
  import { BottomPanel } from '@/client/components/shared/BottomPanel'
7
8
  import { cn } from '@/client/lib/cn'
8
9
  import { getWorkspaceThemeStyle, usePreloadWorkspaceFonts } from '@/client/runtime/workspace-theme'
9
10
  import {
11
+ AGENT_THEMES,
12
+ type AgentThemeConfig,
10
13
  COLOR_THEMES,
11
14
  type ColorThemeConfig,
12
15
  FONT_THEMES,
@@ -14,7 +17,7 @@ import {
14
17
  type RadiusThemeConfig,
15
18
  resolveWorkspaceTheme
16
19
  } from '@/lib/themes'
17
- import type { ColorTheme, FontTheme, RadiusTheme, WorkspaceTheme } from '@/lib/types'
20
+ import type { AgentTheme, ColorTheme, FontTheme, RadiusTheme, WorkspaceTheme } from '@/lib/types'
18
21
 
19
22
  const FONT_OPTIONS = Object.entries(FONT_THEMES) as [FontTheme, (typeof FONT_THEMES)[FontTheme]][]
20
23
 
@@ -22,6 +25,11 @@ const COLOR_OPTIONS = Object.entries(COLOR_THEMES) as [ColorTheme, ColorThemeCon
22
25
 
23
26
  const RADIUS_OPTIONS = Object.entries(RADIUS_THEMES) as [RadiusTheme, RadiusThemeConfig][]
24
27
 
28
+ const AGENT_OPTIONS = Object.entries(AGENT_THEMES) as [AgentTheme, AgentThemeConfig][]
29
+
30
+ const CUSTOMIZE_OPTION_CLASS =
31
+ 'relative w-full rounded-lg bg-card text-left ring-1 ring-border transition-opacity outline-none focus-visible:ring-3 focus-visible:ring-ring/50'
32
+
25
33
  type CustomizeOptionGroupProps = {
26
34
  children: ReactNode
27
35
  className?: string
@@ -64,7 +72,7 @@ function CustomizeOption({ active, children, className, onSelect, style }: Custo
64
72
  aria-pressed={active}
65
73
  onClick={onSelect}
66
74
  className={cn(
67
- 'relative w-full rounded-lg bg-card text-left ring-1 ring-border transition-opacity outline-none focus-visible:ring-3 focus-visible:ring-ring/50',
75
+ CUSTOMIZE_OPTION_CLASS,
68
76
  'flex items-center gap-2 p-3',
69
77
  className,
70
78
  !active && 'cursor-pointer pr-9 opacity-70 hover:opacity-100'
@@ -92,8 +100,8 @@ export function CustomizePanel({ onClose, ref }: CustomizePanelProps) {
92
100
  }
93
101
 
94
102
  return (
95
- <BottomPanel ref={ref} title="Customize" onClose={onClose} className="@4xl/workspace:max-w-4xl">
96
- <div className="grid grid-cols-1 gap-4 @4xl/workspace:grid-cols-[repeat(2,minmax(0,1fr))_0.5rem_repeat(2,minmax(0,1fr))_0.5rem_minmax(0,1fr)] @4xl/workspace:gap-x-2">
103
+ <BottomPanel ref={ref} title="Customize" onClose={onClose} className="@4xl/workspace:max-w-5xl">
104
+ <div className="grid grid-cols-1 gap-4 @4xl/workspace:grid-cols-[repeat(2,minmax(0,1fr))_0.5rem_repeat(2,minmax(0,1fr))_0.5rem_minmax(0,1fr)_0.5rem_minmax(0,1fr)] @4xl/workspace:gap-x-2">
97
105
  <CustomizeOptionGroup
98
106
  label="Font"
99
107
  className="@4xl/workspace:col-span-2 @4xl/workspace:col-start-1"
@@ -161,6 +169,27 @@ export function CustomizePanel({ onClose, ref }: CustomizePanelProps) {
161
169
  </CustomizeOption>
162
170
  ))}
163
171
  </CustomizeOptionGroup>
172
+
173
+ <CustomizeOptionGroup
174
+ label="Agent"
175
+ className="@4xl/workspace:col-start-9"
176
+ gridClassName="@4xl/workspace:grid-cols-1"
177
+ >
178
+ {AGENT_OPTIONS.map(([key, preset]) => (
179
+ <CustomizeOption
180
+ key={key}
181
+ active={key === theme.agent}
182
+ onSelect={() => setTheme({ agent: key })}
183
+ >
184
+ <div className="flex items-center gap-2">
185
+ <span className="flex size-5 shrink-0 items-center justify-center">
186
+ <AgentBlobatar preset={key} color="primary" size={32} />
187
+ </span>
188
+ <span className="text-sm font-medium">{preset.label}</span>
189
+ </div>
190
+ </CustomizeOption>
191
+ ))}
192
+ </CustomizeOptionGroup>
164
193
  </div>
165
194
  </BottomPanel>
166
195
  )
@@ -8,15 +8,15 @@ import {
8
8
  IconLayout2,
9
9
  IconLayoutSidebarRight,
10
10
  IconLetterCase,
11
+ IconMessages,
11
12
  IconSketching
12
13
  } from '@tabler/icons-react'
13
14
 
14
- import { IconGhost } from '@/client/components/shared/IconGhost'
15
15
  import { DrawingLayer } from '@/client/features/drawings/DrawingLayer'
16
16
  import { DrawingToolbar } from '@/client/features/drawings/DrawingToolbar'
17
17
  import { useChatAnnotation } from '@/client/features/drawings/useChatAnnotation'
18
18
  import { ChatPanel } from '@/client/features/chat/ChatPanel'
19
- import type { ChatWelcomeDestination } from '@/client/features/chat/ChatEmptyState'
19
+ import type { WelcomeDestination } from '@/client/features/chat/ChatEmptyState'
20
20
  import { ChatPopup } from '@/client/features/chat/ChatPopup'
21
21
  import { CustomizePanel } from '@/client/features/workspace/CustomizePanel'
22
22
  import { useAppletEvent } from '@/client/features/applets/applet-runtime'
@@ -35,6 +35,7 @@ import { useViewBuilderDrafts } from '@/client/features/views/useViewBuilderDraf
35
35
  import { useFitsSplitLayout } from '@/client/features/workspace/useFitsSplitLayout'
36
36
  import { useWorkspaceComposerState } from '@/client/features/chat/composer/useWorkspaceComposerState'
37
37
  import { useWorkspaceTheme } from '@/client/runtime/workspace-theme'
38
+ import { resolveWorkspaceTheme } from '@/lib/themes'
38
39
  import {
39
40
  hasRunningWorkspaceActivity,
40
41
  isSessionRunning,
@@ -154,7 +155,7 @@ function tabItemFor(
154
155
  if (tab === 'agent') {
155
156
  return {
156
157
  key: tab,
157
- Icon: IconGhost,
158
+ Icon: IconMessages,
158
159
  label: 'Agent',
159
160
  closable,
160
161
  loading: agentRunning
@@ -211,6 +212,7 @@ function applyVisibleTabOrder(
211
212
 
212
213
  export function WorkspaceScreen({ widgets, views, builders }: WorkspaceScreenProps) {
213
214
  const { layout, setLayout, name, icon, provider, workspaceId } = useWorkspaceLayoutCtx()
215
+ const theme = resolveWorkspaceTheme(layout.theme)
214
216
  const builderActions = useViewBuilderActions()
215
217
  const {
216
218
  ref: rowRef,
@@ -394,7 +396,7 @@ export function WorkspaceScreen({ widgets, views, builders }: WorkspaceScreenPro
394
396
  }
395
397
  }
396
398
 
397
- const navigateFromWelcome = (destination: ChatWelcomeDestination) => {
399
+ const navigateFromWelcome = (destination: WelcomeDestination) => {
398
400
  if (destination === 'views') {
399
401
  const firstView = views[0]
400
402
  if (firstView) openTab(viewTabId(firstView.id))
@@ -488,7 +490,7 @@ export function WorkspaceScreen({ widgets, views, builders }: WorkspaceScreenPro
488
490
  ? ([
489
491
  {
490
492
  key: 'agent',
491
- Icon: IconGhost,
493
+ Icon: IconMessages,
492
494
  label: 'Agent',
493
495
  onClick: () => openTab('agent')
494
496
  }
@@ -573,6 +575,7 @@ export function WorkspaceScreen({ widgets, views, builders }: WorkspaceScreenPro
573
575
  // The docked split chat. Full-screen Agent uses the tabbed chat below.
574
576
  const dockedChat = (
575
577
  <ChatPanel
578
+ agent={theme.agent}
576
579
  active={mode === 'split'}
577
580
  focusRequest={chatFocusRequest}
578
581
  chatLoaded={chatLoaded}
@@ -595,6 +598,7 @@ export function WorkspaceScreen({ widgets, views, builders }: WorkspaceScreenPro
595
598
 
596
599
  const tabbedChat = (
597
600
  <ChatPanel
601
+ agent={theme.agent}
598
602
  active={mode === 'fullscreen' && activeTab === 'agent'}
599
603
  focusRequest={chatFocusRequest}
600
604
  chatLoaded={chatLoaded}
@@ -741,6 +745,7 @@ export function WorkspaceScreen({ widgets, views, builders }: WorkspaceScreenPro
741
745
 
742
746
  {mode === 'fullscreen' && activeTab !== 'agent' && hasWorkspaceContent && (
743
747
  <ChatPopup
748
+ agent={theme.agent}
744
749
  loading={hasRunningSession}
745
750
  open={floatingChatOpen}
746
751
  onOpenChange={setFloatingChatOpen}
@@ -752,6 +757,7 @@ export function WorkspaceScreen({ widgets, views, builders }: WorkspaceScreenPro
752
757
  >
753
758
  {onClose => (
754
759
  <ChatPanel
760
+ agent={theme.agent}
755
761
  active={floatingChatOpen}
756
762
  focusRequest={chatFocusRequest}
757
763
  chatLoaded={chatLoaded}
@@ -1,7 +1,6 @@
1
1
  import { IconPlus, IconX, type Icon as TabIcon } from '@tabler/icons-react'
2
2
  import { cva } from 'class-variance-authority'
3
3
 
4
- import { IconGhost } from '@/client/components/shared/IconGhost'
5
4
  import { ReorderableList } from '@/client/components/shared/ReorderableList'
6
5
  import type { ReorderableRenderState } from '@/client/components/shared/ReorderableList'
7
6
  import { Button, buttonVariants } from '@/client/components/ui/button'
@@ -76,10 +75,10 @@ function CreateTabMenu({ items }: { items: CreateWorkspaceTabItem[] }) {
76
75
  />
77
76
  <DropdownMenuContent align="start" className="min-w-48">
78
77
  <DropdownMenuGroup>
79
- {items.map(({ key, Icon, label, onClick }) => (
80
- <DropdownMenuItem key={key} onClick={onClick} className="font-medium">
81
- <Icon stroke={2} />
82
- {label}
78
+ {items.map(item => (
79
+ <DropdownMenuItem key={item.key} onClick={item.onClick} className="font-medium">
80
+ <item.Icon stroke={2} />
81
+ {item.label}
83
82
  </DropdownMenuItem>
84
83
  ))}
85
84
  </DropdownMenuGroup>
@@ -134,9 +133,7 @@ function WorkspaceTab(props: WorkspaceTabProps) {
134
133
  tab.closable && 'group-hover/tab:mr-3'
135
134
  )}
136
135
  >
137
- {tab.Icon === IconGhost ? (
138
- <IconGhost data-icon="inline-start" stroke={2} animated={tab.loading} />
139
- ) : tab.loading ? (
136
+ {tab.loading ? (
140
137
  <Spinner data-icon="inline-start" />
141
138
  ) : (
142
139
  <tab.Icon data-icon="inline-start" stroke={2} />
package/client/index.css CHANGED
@@ -36,6 +36,15 @@
36
36
  --border: oklch(0 0 0 / 0.07);
37
37
  --input: oklch(0.922 0 0);
38
38
  --ring: oklch(0.708 0 0);
39
+
40
+ /* shadcn compatibility: secondary surfaces and chart palettes. */
41
+ --secondary: var(--accent);
42
+ --secondary-foreground: var(--accent-foreground);
43
+ --chart-1: oklch(0.646 0.222 41.116);
44
+ --chart-2: oklch(0.6 0.118 184.704);
45
+ --chart-3: oklch(0.398 0.07 227.392);
46
+ --chart-4: oklch(0.828 0.189 84.429);
47
+ --chart-5: oklch(0.769 0.188 70.08);
39
48
  --radius: 0.625rem;
40
49
  --default-sans: ui-sans-serif, system-ui, sans-serif;
41
50
  --sans: var(--default-sans);
@@ -82,6 +91,15 @@
82
91
  --border: oklch(1 0 0 / 0.1);
83
92
  --input: oklch(0.35 0 0);
84
93
  --ring: oklch(0.556 0 0);
94
+
95
+ /* shadcn compatibility: secondary surfaces and chart palettes. */
96
+ --secondary: var(--accent);
97
+ --secondary-foreground: var(--accent-foreground);
98
+ --chart-1: oklch(0.488 0.243 264.376);
99
+ --chart-2: oklch(0.696 0.17 162.48);
100
+ --chart-3: oklch(0.769 0.188 70.08);
101
+ --chart-4: oklch(0.627 0.265 303.9);
102
+ --chart-5: oklch(0.645 0.246 16.439);
85
103
  }
86
104
 
87
105
  /* Theme tokens and texture utilities shared with applet bundles. */
@@ -102,6 +120,10 @@
102
120
  }
103
121
 
104
122
  @layer base {
123
+ /* Mirrored into the synthetic applet Tailwind entry (writeSyntheticTailwindCss
124
+ in server/bundler/build-applet.ts): this file never reaches applet builds,
125
+ and without the rule their bare `border` renders preflight black. Keep the
126
+ two copies in sync. */
105
127
  * {
106
128
  @apply border-border outline-ring/50;
107
129
  }
@@ -113,20 +135,13 @@
113
135
  -moz-osx-font-smoothing: grayscale;
114
136
  }
115
137
 
138
+ /* `bg-muted`, not `bg-background`: every route shell (SidebarLayout) paints
139
+ `h-dvh bg-muted`, so matching it here means the first paint — before the
140
+ SPA boots and before any workspace theme lands — is already the colour the
141
+ app settles on, instead of flashing white. It also fixes the overscroll
142
+ gutter, which browsers paint from the body background. */
116
143
  body {
117
- @apply bg-background font-sans text-foreground;
118
- }
119
- }
120
-
121
- @keyframes pulse-dot {
122
- 0%,
123
- 100% {
124
- opacity: 0.2;
125
- transform: scale(0.85);
126
- }
127
- 50% {
128
- opacity: 1;
129
- transform: scale(1);
144
+ @apply bg-muted font-sans text-foreground;
130
145
  }
131
146
  }
132
147
 
package/client/index.html CHANGED
@@ -3,7 +3,22 @@
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <!-- The app has no dark mode (nothing ever adds the `.dark` class), so say
7
+ so: without this the browser picks a base canvas from the OS setting. -->
8
+ <meta name="color-scheme" content="light" />
6
9
  <title>moi</title>
10
+ <!-- First-paint background, inline and before the stylesheet link on
11
+ purpose. index.css is render-blocking, so until it resolves the browser
12
+ has only its own white canvas to paint — on a cold load or a new tab
13
+ that is a white flash the stylesheet cannot prevent, because it *is*
14
+ the stylesheet. Parsed from the HTML, this applies with no round trip.
15
+ The literal duplicates `--muted` in client/index.css (custom properties
16
+ do not exist yet at this point); theme.test.ts pins the two together. -->
17
+ <style>
18
+ html {
19
+ background: oklch(0.97 0 0);
20
+ }
21
+ </style>
7
22
  <link rel="icon" type="image/png" href="./assets/favicon.png" />
8
23
  <!-- React is vendored locally (client/vendor/react, generated by
9
24
  scripts/build-vendor.ts) and served by the /vendor/react route, so moi
package/client/index.tsx CHANGED
@@ -1,6 +1,7 @@
1
1
  // Must run before any tldraw module loads — see the file for why.
2
2
  import './structured-clone-shim'
3
3
 
4
+ import 'blobatar/motion.css'
4
5
  import './index.css'
5
6
 
6
7
  import { startHmrWatchdog } from './runtime/hmr-watchdog'
package/client/theme.css CHANGED
@@ -40,6 +40,15 @@
40
40
  --color-input: var(--input);
41
41
  --color-ring: var(--ring);
42
42
 
43
+ /* shadcn compatibility: secondary surfaces and chart palettes. */
44
+ --color-secondary: var(--secondary);
45
+ --color-secondary-foreground: var(--secondary-foreground);
46
+ --color-chart-1: var(--chart-1);
47
+ --color-chart-2: var(--chart-2);
48
+ --color-chart-3: var(--chart-3);
49
+ --color-chart-4: var(--chart-4);
50
+ --color-chart-5: var(--chart-5);
51
+
43
52
  --radius-xs: calc(var(--radius) * 0.4);
44
53
  --radius-sm: calc(var(--radius) * 0.6);
45
54
  --radius-md: calc(var(--radius) * 0.8);
@@ -1,4 +1,4 @@
1
- import"/chunk-97eg9mjn.js";function t(z,Q){return z[13]=1,z[14]=Q>>8,z[15]=Q&255,z[16]=Q>>8,z[17]=Q&255,z}var e=112,zz=72,Qz=89,Zz=115,p;function Nz(){let z=new Int32Array(256);for(let Q=0;Q<256;Q++){let Z=Q;for(let $=0;$<8;$++)Z=Z&1?3988292384^Z>>>1:Z>>>1;z[Q]=Z}return z}function Iz(z){let Q=-1;if(!p)p=Nz();for(let Z=0;Z<z.length;Z++)Q=p[(Q^z[Z])&255]^Q>>>8;return Q^-1}function Uz(z){let Q=z.length-1;for(let Z=Q;Z>=4;Z--)if(z[Z-4]===9&&z[Z-3]===e&&z[Z-2]===zz&&z[Z-1]===Qz&&z[Z]===Zz)return Z-3;return 0}function $z(z,Q,Z=!1){let $=new Uint8Array(13);Q*=39.3701,$[0]=e,$[1]=zz,$[2]=Qz,$[3]=Zz,$[4]=Q>>>24,$[5]=Q>>>16,$[6]=Q>>>8,$[7]=Q&255,$[8]=$[4],$[9]=$[5],$[10]=$[6],$[11]=$[7],$[12]=1;let Y=Iz($),K=new Uint8Array(4);if(K[0]=Y>>>24,K[1]=Y>>>16,K[2]=Y>>>8,K[3]=Y&255,Z){let X=Uz(z);return z.set($,X),z.set(K,X+13),z}else{let X=new Uint8Array(4);X[0]=0,X[1]=0,X[2]=0,X[3]=9;let J=new Uint8Array(54);return J.set(z,0),J.set(X,33),J.set($,37),J.set(K,50),J}}var Dz="AAlwSFlz",Fz="AAAJcEhZ",Rz="AAAACXBI";function wz(z){let Q=z.indexOf(Dz);if(Q===-1)Q=z.indexOf(Fz);if(Q===-1)Q=z.indexOf(Rz);return Q}var Jz="[modern-screenshot]",D=typeof window<"u",Ez=D&&"Worker"in window,Kz=D&&"atob"in window,Cz=D&&"btoa"in window,x=D?window.navigator?.userAgent:"",Yz=x.includes("Chrome"),S=x.includes("AppleWebKit")&&!Yz,u=x.includes("Firefox"),fz=(z)=>z&&("__CONTEXT__"in z),Tz=(z)=>z.constructor.name==="CSSFontFaceRule",bz=(z)=>z.constructor.name==="CSSImportRule",Sz=(z)=>z.constructor.name==="CSSLayerBlockRule",k=(z)=>z.nodeType===1,f=(z)=>typeof z.className==="object",Xz=(z)=>z.tagName==="image",hz=(z)=>z.tagName==="use",w=(z)=>k(z)&&typeof z.style<"u"&&!f(z),gz=(z)=>z.nodeType===8,vz=(z)=>z.nodeType===3,R=(z)=>z.tagName==="IMG",h=(z)=>z.tagName==="VIDEO",pz=(z)=>z.tagName==="CANVAS",yz=(z)=>z.tagName==="TEXTAREA",mz=(z)=>z.tagName==="INPUT",xz=(z)=>z.tagName==="STYLE",uz=(z)=>z.tagName==="SCRIPT",iz=(z)=>z.tagName==="SELECT",cz=(z)=>z.tagName==="SLOT",dz=(z)=>z.tagName==="IFRAME",az=(...z)=>console.warn(Jz,...z);function lz(z){let Q=z?.createElement?.("canvas");if(Q)Q.height=Q.width=1;return Boolean(Q)&&"toDataURL"in Q&&Boolean(Q.toDataURL("image/webp").includes("image/webp"))}var y=(z)=>z.startsWith("data:");function Gz(z,Q){if(z.match(/^[a-z]+:\/\//i))return z;if(D&&z.match(/^\/\//))return window.location.protocol+z;if(z.match(/^[a-z]+:/i))return z;if(!D)return z;let Z=g().implementation.createHTMLDocument(),$=Z.createElement("base"),Y=Z.createElement("a");if(Z.head.appendChild($),Z.body.appendChild(Y),Q)$.href=Q;return Y.href=z,Y.href}function g(z){return(z&&k(z)?z?.ownerDocument:z)??window.document}var v="http://www.w3.org/2000/svg";function jz(z,Q,Z){let $=g(Z).createElementNS(v,"svg");return $.setAttributeNS(null,"width",z.toString()),$.setAttributeNS(null,"height",Q.toString()),$.setAttributeNS(null,"viewBox",`0 0 ${z} ${Q}`),$}function Vz(z,Q){let Z=new XMLSerializer().serializeToString(z);if(Q)Z=Z.replace(/[\u0000-\u0008\v\f\u000E-\u001F\uD800-\uDFFF\uFFFE\uFFFF]/gu,"");return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(Z)}`}async function sz(z,Q="image/png",Z=1){try{return await new Promise(($,Y)=>{z.toBlob((K)=>{if(K)$(K);else Y(Error("Blob is null"))},Q,Z)})}catch($){if(Kz)return rz(z.toDataURL(Q,Z));throw $}}function rz(z){let[Q,Z]=z.split(","),$=Q.match(/data:(.+);/)?.[1]??void 0,Y=window.atob(Z),K=Y.length,X=new Uint8Array(K);for(let J=0;J<K;J+=1)X[J]=Y.charCodeAt(J);return new Blob([X],{type:$})}function Hz(z,Q){return new Promise((Z,$)=>{let Y=new FileReader;if(Y.onload=()=>Z(Y.result),Y.onerror=()=>$(Y.error),Y.onabort=()=>$(Error(`Failed read blob to ${Q}`)),Q==="dataUrl")Y.readAsDataURL(z);else if(Q==="arrayBuffer")Y.readAsArrayBuffer(z)})}var nz=(z)=>Hz(z,"dataUrl"),oz=(z)=>Hz(z,"arrayBuffer");function F(z,Q){let Z=g(Q).createElement("img");return Z.decoding="sync",Z.loading="eager",Z.src=z,Z}function E(z,Q){return new Promise((Z)=>{let{timeout:$,ownerDocument:Y,onError:K,onWarn:X}=Q??{},J=typeof z==="string"?F(z,g(Y)):z,V=null,j=null;function G(){Z(J),V&&clearTimeout(V),j?.()}if($)V=setTimeout(G,$);if(h(J)){let M=J.currentSrc||J.src;if(!M){if(J.poster)return E(J.poster,Q).then(Z);return G()}if(J.readyState>=2)return G();let B=G,q=(W)=>{X?.("Failed video load",M,W),K?.(W),G()};j=()=>{J.removeEventListener("loadeddata",B),J.removeEventListener("error",q)},J.addEventListener("loadeddata",B,{once:!0}),J.addEventListener("error",q,{once:!0})}else{let M=Xz(J)?J.href.baseVal:J.currentSrc||J.src;if(!M)return G();let B=async()=>{if(R(J)&&"decode"in J)try{await J.decode()}catch(W){X?.("Failed to decode image, trying to render anyway",J.dataset.originalSrc||M,W)}G()},q=(W)=>{X?.("Failed image load",J.dataset.originalSrc||M,W),G()};if(R(J)&&J.complete)return B();j=()=>{J.removeEventListener("load",B),J.removeEventListener("error",q)},J.addEventListener("load",B,{once:!0}),J.addEventListener("error",q,{once:!0})}})}async function tz(z,Q){if(w(z))if(R(z)||h(z))await E(z,Q);else await Promise.all(["img","video"].flatMap((Z)=>{return Array.from(z.querySelectorAll(Z)).map(($)=>E($,Q))}))}var Bz=function(){let Q=0,Z=()=>`0000${(Math.random()*1679616<<0).toString(36)}`.slice(-4);return()=>{return Q+=1,`u${Z()}${Q}`}}();function Mz(z){return z?.split(",").map((Q)=>Q.trim().replace(/"|'/g,"").toLowerCase()).filter(Boolean)}var a=0;function ez(z){let Q=`${Jz}[#${a}]`;return a++,{time:(Z)=>z&&console.time(`${Q} ${Z}`),timeEnd:(Z)=>z&&console.timeEnd(`${Q} ${Z}`),warn:(...Z)=>z&&az(...Z)}}function zQ(z){return{cache:z?"no-cache":"force-cache"}}async function N(z,Q){return fz(z)?z:QQ(z,{...Q,autoDestruct:!0})}async function QQ(z,Q){let{scale:Z=1,workerUrl:$,workerNumber:Y=1}=Q||{},K=Boolean(Q?.debug),X=Q?.features??!0,J=z.ownerDocument??(D?window.document:void 0),V=z.ownerDocument?.defaultView??(D?window:void 0),j=new Map,G={width:0,height:0,quality:1,type:"image/png",scale:Z,backgroundColor:null,style:null,filter:null,maximumCanvasSize:0,timeout:30000,progress:null,debug:K,fetch:{requestInit:zQ(Q?.fetch?.bypassingCache),placeholderImage:"data:image/png;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",bypassingCache:!1,...Q?.fetch},fetchFn:null,font:{},drawImageInterval:100,workerUrl:null,workerNumber:Y,onCloneEachNode:null,onCloneNode:null,onEmbedNode:null,onCreateForeignObjectSvg:null,includeStyleProperties:null,autoDestruct:!1,...Q,__CONTEXT__:!0,log:ez(K),node:z,ownerDocument:J,ownerWindow:V,dpi:Z===1?null:96*Z,svgStyleElement:qz(J),svgDefsElement:J?.createElementNS(v,"defs"),svgStyles:new Map,defaultComputedStyles:new Map,workers:[...Array.from({length:Ez&&$&&Y?Y:0})].map(()=>{try{let q=new Worker($);return q.onmessage=async(W)=>{let{url:H,result:L}=W.data;if(L)j.get(H)?.resolve?.(L);else j.get(H)?.reject?.(Error(`Error receiving message from worker: ${H}`))},q.onmessageerror=(W)=>{let{url:H}=W.data;j.get(H)?.reject?.(Error(`Error receiving message from worker: ${H}`))},q}catch(q){return G.log.warn("Failed to new Worker",q),null}}).filter(Boolean),fontFamilies:new Map,fontCssTexts:new Map,acceptOfImage:`${[lz(J)&&"image/webp","image/svg+xml","image/*","*/*"].filter(Boolean).join(",")};q=0.8`,requests:j,drawImageCount:0,tasks:[],features:X,isEnable:(q)=>{if(q==="restoreScrollPosition")return typeof X==="boolean"?!1:X[q]??!1;if(typeof X==="boolean")return X;return X[q]??!0},shadowRoots:[]};G.log.time("wait until load"),await tz(z,{timeout:G.timeout,onWarn:G.log.warn}),G.log.timeEnd("wait until load");let{width:M,height:B}=ZQ(z,G);return G.width=M,G.height=B,G}function qz(z){if(!z)return;let Q=z.createElement("style"),Z=Q.ownerDocument.createTextNode(`
1
+ import"/chunk-9y2zbzqz.js";function t(z,Q){return z[13]=1,z[14]=Q>>8,z[15]=Q&255,z[16]=Q>>8,z[17]=Q&255,z}var e=112,zz=72,Qz=89,Zz=115,p;function Nz(){let z=new Int32Array(256);for(let Q=0;Q<256;Q++){let Z=Q;for(let $=0;$<8;$++)Z=Z&1?3988292384^Z>>>1:Z>>>1;z[Q]=Z}return z}function Iz(z){let Q=-1;if(!p)p=Nz();for(let Z=0;Z<z.length;Z++)Q=p[(Q^z[Z])&255]^Q>>>8;return Q^-1}function Uz(z){let Q=z.length-1;for(let Z=Q;Z>=4;Z--)if(z[Z-4]===9&&z[Z-3]===e&&z[Z-2]===zz&&z[Z-1]===Qz&&z[Z]===Zz)return Z-3;return 0}function $z(z,Q,Z=!1){let $=new Uint8Array(13);Q*=39.3701,$[0]=e,$[1]=zz,$[2]=Qz,$[3]=Zz,$[4]=Q>>>24,$[5]=Q>>>16,$[6]=Q>>>8,$[7]=Q&255,$[8]=$[4],$[9]=$[5],$[10]=$[6],$[11]=$[7],$[12]=1;let Y=Iz($),K=new Uint8Array(4);if(K[0]=Y>>>24,K[1]=Y>>>16,K[2]=Y>>>8,K[3]=Y&255,Z){let X=Uz(z);return z.set($,X),z.set(K,X+13),z}else{let X=new Uint8Array(4);X[0]=0,X[1]=0,X[2]=0,X[3]=9;let J=new Uint8Array(54);return J.set(z,0),J.set(X,33),J.set($,37),J.set(K,50),J}}var Dz="AAlwSFlz",Fz="AAAJcEhZ",Rz="AAAACXBI";function wz(z){let Q=z.indexOf(Dz);if(Q===-1)Q=z.indexOf(Fz);if(Q===-1)Q=z.indexOf(Rz);return Q}var Jz="[modern-screenshot]",D=typeof window<"u",Ez=D&&"Worker"in window,Kz=D&&"atob"in window,Cz=D&&"btoa"in window,x=D?window.navigator?.userAgent:"",Yz=x.includes("Chrome"),S=x.includes("AppleWebKit")&&!Yz,u=x.includes("Firefox"),fz=(z)=>z&&("__CONTEXT__"in z),Tz=(z)=>z.constructor.name==="CSSFontFaceRule",bz=(z)=>z.constructor.name==="CSSImportRule",Sz=(z)=>z.constructor.name==="CSSLayerBlockRule",k=(z)=>z.nodeType===1,f=(z)=>typeof z.className==="object",Xz=(z)=>z.tagName==="image",hz=(z)=>z.tagName==="use",w=(z)=>k(z)&&typeof z.style<"u"&&!f(z),gz=(z)=>z.nodeType===8,vz=(z)=>z.nodeType===3,R=(z)=>z.tagName==="IMG",h=(z)=>z.tagName==="VIDEO",pz=(z)=>z.tagName==="CANVAS",yz=(z)=>z.tagName==="TEXTAREA",mz=(z)=>z.tagName==="INPUT",xz=(z)=>z.tagName==="STYLE",uz=(z)=>z.tagName==="SCRIPT",iz=(z)=>z.tagName==="SELECT",cz=(z)=>z.tagName==="SLOT",dz=(z)=>z.tagName==="IFRAME",az=(...z)=>console.warn(Jz,...z);function lz(z){let Q=z?.createElement?.("canvas");if(Q)Q.height=Q.width=1;return Boolean(Q)&&"toDataURL"in Q&&Boolean(Q.toDataURL("image/webp").includes("image/webp"))}var y=(z)=>z.startsWith("data:");function Gz(z,Q){if(z.match(/^[a-z]+:\/\//i))return z;if(D&&z.match(/^\/\//))return window.location.protocol+z;if(z.match(/^[a-z]+:/i))return z;if(!D)return z;let Z=g().implementation.createHTMLDocument(),$=Z.createElement("base"),Y=Z.createElement("a");if(Z.head.appendChild($),Z.body.appendChild(Y),Q)$.href=Q;return Y.href=z,Y.href}function g(z){return(z&&k(z)?z?.ownerDocument:z)??window.document}var v="http://www.w3.org/2000/svg";function jz(z,Q,Z){let $=g(Z).createElementNS(v,"svg");return $.setAttributeNS(null,"width",z.toString()),$.setAttributeNS(null,"height",Q.toString()),$.setAttributeNS(null,"viewBox",`0 0 ${z} ${Q}`),$}function Vz(z,Q){let Z=new XMLSerializer().serializeToString(z);if(Q)Z=Z.replace(/[\u0000-\u0008\v\f\u000E-\u001F\uD800-\uDFFF\uFFFE\uFFFF]/gu,"");return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(Z)}`}async function sz(z,Q="image/png",Z=1){try{return await new Promise(($,Y)=>{z.toBlob((K)=>{if(K)$(K);else Y(Error("Blob is null"))},Q,Z)})}catch($){if(Kz)return rz(z.toDataURL(Q,Z));throw $}}function rz(z){let[Q,Z]=z.split(","),$=Q.match(/data:(.+);/)?.[1]??void 0,Y=window.atob(Z),K=Y.length,X=new Uint8Array(K);for(let J=0;J<K;J+=1)X[J]=Y.charCodeAt(J);return new Blob([X],{type:$})}function Hz(z,Q){return new Promise((Z,$)=>{let Y=new FileReader;if(Y.onload=()=>Z(Y.result),Y.onerror=()=>$(Y.error),Y.onabort=()=>$(Error(`Failed read blob to ${Q}`)),Q==="dataUrl")Y.readAsDataURL(z);else if(Q==="arrayBuffer")Y.readAsArrayBuffer(z)})}var nz=(z)=>Hz(z,"dataUrl"),oz=(z)=>Hz(z,"arrayBuffer");function F(z,Q){let Z=g(Q).createElement("img");return Z.decoding="sync",Z.loading="eager",Z.src=z,Z}function E(z,Q){return new Promise((Z)=>{let{timeout:$,ownerDocument:Y,onError:K,onWarn:X}=Q??{},J=typeof z==="string"?F(z,g(Y)):z,V=null,j=null;function G(){Z(J),V&&clearTimeout(V),j?.()}if($)V=setTimeout(G,$);if(h(J)){let M=J.currentSrc||J.src;if(!M){if(J.poster)return E(J.poster,Q).then(Z);return G()}if(J.readyState>=2)return G();let B=G,q=(W)=>{X?.("Failed video load",M,W),K?.(W),G()};j=()=>{J.removeEventListener("loadeddata",B),J.removeEventListener("error",q)},J.addEventListener("loadeddata",B,{once:!0}),J.addEventListener("error",q,{once:!0})}else{let M=Xz(J)?J.href.baseVal:J.currentSrc||J.src;if(!M)return G();let B=async()=>{if(R(J)&&"decode"in J)try{await J.decode()}catch(W){X?.("Failed to decode image, trying to render anyway",J.dataset.originalSrc||M,W)}G()},q=(W)=>{X?.("Failed image load",J.dataset.originalSrc||M,W),G()};if(R(J)&&J.complete)return B();j=()=>{J.removeEventListener("load",B),J.removeEventListener("error",q)},J.addEventListener("load",B,{once:!0}),J.addEventListener("error",q,{once:!0})}})}async function tz(z,Q){if(w(z))if(R(z)||h(z))await E(z,Q);else await Promise.all(["img","video"].flatMap((Z)=>{return Array.from(z.querySelectorAll(Z)).map(($)=>E($,Q))}))}var Bz=function(){let Q=0,Z=()=>`0000${(Math.random()*1679616<<0).toString(36)}`.slice(-4);return()=>{return Q+=1,`u${Z()}${Q}`}}();function Mz(z){return z?.split(",").map((Q)=>Q.trim().replace(/"|'/g,"").toLowerCase()).filter(Boolean)}var a=0;function ez(z){let Q=`${Jz}[#${a}]`;return a++,{time:(Z)=>z&&console.time(`${Q} ${Z}`),timeEnd:(Z)=>z&&console.timeEnd(`${Q} ${Z}`),warn:(...Z)=>z&&az(...Z)}}function zQ(z){return{cache:z?"no-cache":"force-cache"}}async function N(z,Q){return fz(z)?z:QQ(z,{...Q,autoDestruct:!0})}async function QQ(z,Q){let{scale:Z=1,workerUrl:$,workerNumber:Y=1}=Q||{},K=Boolean(Q?.debug),X=Q?.features??!0,J=z.ownerDocument??(D?window.document:void 0),V=z.ownerDocument?.defaultView??(D?window:void 0),j=new Map,G={width:0,height:0,quality:1,type:"image/png",scale:Z,backgroundColor:null,style:null,filter:null,maximumCanvasSize:0,timeout:30000,progress:null,debug:K,fetch:{requestInit:zQ(Q?.fetch?.bypassingCache),placeholderImage:"data:image/png;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",bypassingCache:!1,...Q?.fetch},fetchFn:null,font:{},drawImageInterval:100,workerUrl:null,workerNumber:Y,onCloneEachNode:null,onCloneNode:null,onEmbedNode:null,onCreateForeignObjectSvg:null,includeStyleProperties:null,autoDestruct:!1,...Q,__CONTEXT__:!0,log:ez(K),node:z,ownerDocument:J,ownerWindow:V,dpi:Z===1?null:96*Z,svgStyleElement:qz(J),svgDefsElement:J?.createElementNS(v,"defs"),svgStyles:new Map,defaultComputedStyles:new Map,workers:[...Array.from({length:Ez&&$&&Y?Y:0})].map(()=>{try{let q=new Worker($);return q.onmessage=async(W)=>{let{url:H,result:L}=W.data;if(L)j.get(H)?.resolve?.(L);else j.get(H)?.reject?.(Error(`Error receiving message from worker: ${H}`))},q.onmessageerror=(W)=>{let{url:H}=W.data;j.get(H)?.reject?.(Error(`Error receiving message from worker: ${H}`))},q}catch(q){return G.log.warn("Failed to new Worker",q),null}}).filter(Boolean),fontFamilies:new Map,fontCssTexts:new Map,acceptOfImage:`${[lz(J)&&"image/webp","image/svg+xml","image/*","*/*"].filter(Boolean).join(",")};q=0.8`,requests:j,drawImageCount:0,tasks:[],features:X,isEnable:(q)=>{if(q==="restoreScrollPosition")return typeof X==="boolean"?!1:X[q]??!1;if(typeof X==="boolean")return X;return X[q]??!0},shadowRoots:[]};G.log.time("wait until load"),await tz(z,{timeout:G.timeout,onWarn:G.log.warn}),G.log.timeEnd("wait until load");let{width:M,height:B}=ZQ(z,G);return G.width=M,G.height=B,G}function qz(z){if(!z)return;let Q=z.createElement("style"),Z=Q.ownerDocument.createTextNode(`
2
2
  .______background-clip--text {
3
3
  background-clip: text;
4
4
  -webkit-background-clip: text;
@@ -0,0 +1 @@
1
+ import{Oc as a,Pc as b}from"/chunk-yt2qjn3m.js";import"/chunk-yhj9bg1s.js";import"/chunk-9y2zbzqz.js";export{b as useAppConfig,a as loadAppConfig};