@hanzo/ui 8.0.5 → 8.0.7

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 (39) hide show
  1. package/package.json +5 -1
  2. package/src/product/AppHeader.tsx +34 -26
  3. package/src/product/ComboBox.tsx +49 -69
  4. package/src/product/SelectMenu.tsx +23 -37
  5. package/src/product/ThemeToggle.tsx +121 -11
  6. package/src/product/ThemeToggleNext.tsx +27 -0
  7. package/src/product/index.ts +8 -0
  8. package/src/product/menu/ContextMenu.tsx +114 -0
  9. package/src/product/menu/DropdownMenu.tsx +76 -0
  10. package/src/product/menu/index.ts +15 -0
  11. package/src/product/menu/items.tsx +230 -0
  12. package/src/product/menu/portal-theme.tsx +33 -0
  13. package/src/product/menu/roving.ts +34 -0
  14. package/src/product/surfaces.data.ts +42 -0
  15. package/types/product/AppHeader.d.ts +5 -11
  16. package/types/product/AppHeader.d.ts.map +1 -1
  17. package/types/product/ComboBox.d.ts.map +1 -1
  18. package/types/product/SelectMenu.d.ts +8 -5
  19. package/types/product/SelectMenu.d.ts.map +1 -1
  20. package/types/product/ThemeToggle.d.ts +21 -1
  21. package/types/product/ThemeToggle.d.ts.map +1 -1
  22. package/types/product/ThemeToggleNext.d.ts +5 -0
  23. package/types/product/ThemeToggleNext.d.ts.map +1 -0
  24. package/types/product/index.d.ts +3 -0
  25. package/types/product/index.d.ts.map +1 -1
  26. package/types/product/menu/ContextMenu.d.ts +24 -0
  27. package/types/product/menu/ContextMenu.d.ts.map +1 -0
  28. package/types/product/menu/DropdownMenu.d.ts +34 -0
  29. package/types/product/menu/DropdownMenu.d.ts.map +1 -0
  30. package/types/product/menu/index.d.ts +5 -0
  31. package/types/product/menu/index.d.ts.map +1 -0
  32. package/types/product/menu/items.d.ts +69 -0
  33. package/types/product/menu/items.d.ts.map +1 -0
  34. package/types/product/menu/portal-theme.d.ts +29 -0
  35. package/types/product/menu/portal-theme.d.ts.map +1 -0
  36. package/types/product/menu/roving.d.ts +9 -0
  37. package/types/product/menu/roving.d.ts.map +1 -0
  38. package/types/product/surfaces.data.d.ts +17 -0
  39. package/types/product/surfaces.data.d.ts.map +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeToggleNext.d.ts","sourceRoot":"","sources":["../../src/product/ThemeToggleNext.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAuB,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAE1E,iBAAS,eAAe,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,2CAWjF;AAED,eAAe,eAAe,CAAA;AAC9B,OAAO,EAAE,eAAe,EAAE,CAAA"}
@@ -3,10 +3,12 @@ export { SERIES, colorForIndex, utilColor, Sparkline as MetricSparkline, MiniBar
3
3
  export { Donut as DonutRing, type DonutSegment } from './Donut';
4
4
  export { ComboBox } from './ComboBox';
5
5
  export * from './combobox/filter';
6
+ export * from './surfaces.data';
6
7
  export * from './AppHeader';
7
8
  export * from './BrandMark';
8
9
  export * from './OrgSwitcher';
9
10
  export * from './scope';
11
+ export * from './menu';
10
12
  export * from './DataTable';
11
13
  export * from './EmptyState';
12
14
  export * from './FadeIn';
@@ -21,6 +23,7 @@ export * from './SelectMenu';
21
23
  export * from './SlideOver';
22
24
  export * from './StatusTag';
23
25
  export * from './ThemeToggle';
26
+ export { ThemeToggleNext } from './ThemeToggleNext';
24
27
  export * from './Toast';
25
28
  export * from './color';
26
29
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/product/index.ts"],"names":[],"mappings":"AAaA,cAAc,UAAU,CAAA;AAKxB,OAAO,EACL,MAAM,EACN,aAAa,EACb,SAAS,EACT,SAAS,IAAI,eAAe,EAC5B,QAAQ,EACR,OAAO,EACP,SAAS,EACT,UAAU,EACV,UAAU,EACV,KAAK,GACN,MAAM,UAAU,CA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AAGtB,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * ContextMenu — a right-click menu that renders the SAME shared item spec as
3
+ * DropdownMenu, so every menu in the fleet is identical. Built on the @hanzo/gui
4
+ * Portal with the SAME portal-theme fix as the dropdown: the menu is portaled to the
5
+ * root, escaping any nested `<Theme>`, so it re-applies the captured theme via
6
+ * <PortalTheme>. Web/desktop right-click (`onContextMenu`); on native — which has no
7
+ * right-click — the wrapped child renders untouched.
8
+ *
9
+ * <ContextMenu items={[{ key:'copy', label:'Copy', icon:<Copy size={16}/>, onSelect:copy }]}>
10
+ * <YStack>right-click me</YStack>
11
+ * </ContextMenu>
12
+ */
13
+ import type { ReactElement } from 'react';
14
+ import { type MenuItemSpec } from './items';
15
+ export type ContextMenuProps = {
16
+ /** The right-clickable target. Its `onContextMenu` is composed, not replaced. */
17
+ children: ReactElement;
18
+ items: MenuItemSpec[];
19
+ disabled?: boolean;
20
+ minWidth?: number;
21
+ maxHeight?: number;
22
+ };
23
+ export declare function ContextMenu({ children, items, disabled, minWidth, maxHeight }: ContextMenuProps): import("react/jsx-runtime").JSX.Element;
24
+ //# sourceMappingURL=ContextMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../src/product/menu/ContextMenu.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,YAAY,EAAc,MAAM,OAAO,CAAA;AAGrD,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAMvE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,iFAAiF;IACjF,QAAQ,EAAE,YAAY,CAAA;IACtB,KAAK,EAAE,YAAY,EAAE,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAc,EAAE,SAAS,EAAE,EAAE,gBAAgB,2CAiFrG"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * DropdownMenu — a portal-theme-safe dropdown on the @hanzo/gui Popover (the proven
3
+ * console idiom, same shell as SelectMenu/ComboBox). Declarative `items`; renders the
4
+ * ONE shared menu-item spec so it is pixel-identical to every other menu. Opens under
5
+ * a nested `<Theme>` correctly because the portaled content re-applies the captured
6
+ * theme (see PortalTheme).
7
+ *
8
+ * <DropdownMenu
9
+ * trigger={<Button>Actions</Button>}
10
+ * items={[
11
+ * { key: 'rename', label: 'Rename', icon: <Pencil size={16} />, onSelect: rename },
12
+ * { type: 'separator' },
13
+ * { key: 'del', label: 'Delete', destructive: true, onSelect: del },
14
+ * ]}
15
+ * />
16
+ */
17
+ import type { ReactElement } from 'react';
18
+ import { Popover } from '@hanzo/gui';
19
+ import { type MenuItemSpec } from './items';
20
+ export type DropdownMenuProps = {
21
+ /** The clickable element. Cloned as the Popover trigger (`asChild`). */
22
+ trigger: ReactElement;
23
+ items: MenuItemSpec[];
24
+ /** Controlled open state. Omit for uncontrolled. */
25
+ open?: boolean;
26
+ defaultOpen?: boolean;
27
+ onOpenChange?: (open: boolean) => void;
28
+ /** Popover placement (default `bottom-start`). */
29
+ placement?: React.ComponentProps<typeof Popover>['placement'];
30
+ minWidth?: number;
31
+ maxHeight?: number;
32
+ };
33
+ export declare function DropdownMenu({ trigger, items, open, defaultOpen, onOpenChange, placement, minWidth, maxHeight, }: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
34
+ //# sourceMappingURL=DropdownMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/product/menu/DropdownMenu.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,OAAO,EAAwB,MAAM,YAAY,CAAA;AAC1D,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAIvE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,wEAAwE;IACxE,OAAO,EAAE,YAAY,CAAA;IACrB,KAAK,EAAE,YAAY,EAAE,CAAA;IACrB,oDAAoD;IACpD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,kDAAkD;IAClD,SAAS,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,WAAW,CAAC,CAAA;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,KAAK,EACL,IAAI,EACJ,WAAmB,EACnB,YAAY,EACZ,SAA0B,EAC1B,QAAc,EACd,SAAS,GACV,EAAE,iBAAiB,2CA4BnB"}
@@ -0,0 +1,5 @@
1
+ export { DropdownMenu, type DropdownMenuProps } from './DropdownMenu';
2
+ export { ContextMenu, type ContextMenuProps } from './ContextMenu';
3
+ export { MenuPanel, MenuItemView, MenuSeparatorView, MenuLabelView, renderMenuItems, type MenuItemSpec, } from './items';
4
+ export { PortalTheme } from './portal-theme';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/product/menu/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACrE,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EACL,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,KAAK,YAAY,GAClB,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * The ONE menu-item spec — every menu across the fleet renders through these
3
+ * presentational primitives, so DropdownMenu, ContextMenu, SelectMenu and ComboBox
4
+ * are pixel-identical. Geometry is literal px on a strict 8-grid (never random);
5
+ * colour is theme-adaptive tokens ($color2/$color11/$color12/$borderColor) so light
6
+ * and dark both work, with the single purple accent supplied by the brand CSS vars.
7
+ *
8
+ * Style props use the @hanzo/gui config shorthands (bg/items/justify/px/py/p/mx/my/
9
+ * minW/maxH/rounded/select/shrink) — the config omits the longhand aliases.
10
+ *
11
+ * Panel — bg $color2 (#111 dark), hairline border, radius 12, inner pad 4, subtle
12
+ * border+ambient elevation.
13
+ * Item — height 30 (28–32 band), px 8, gap 8, radius 7; icon in a fixed 16px slot
14
+ * on the left; label 13px $color12; right affordance (shortcut / check /
15
+ * chevron) right-aligned. States: hover/active/focus → accent-soft, focus
16
+ * visible; selected → check + purple; disabled → muted, no hover.
17
+ * Separator — 1px hairline, 4px vertical margin.
18
+ * Label — 11px uppercase muted section header, px 8.
19
+ */
20
+ import type { ReactNode, KeyboardEvent } from 'react';
21
+ export declare const PANEL_RADIUS = 12;
22
+ export declare const PANEL_PAD = 4;
23
+ export type MenuItemSpec = {
24
+ type?: 'item';
25
+ /** Stable key. */
26
+ key: string;
27
+ label: string;
28
+ /** Leading Lucide icon (16px, unfilled) in the fixed left slot. */
29
+ icon?: ReactNode;
30
+ /** Second muted line under the label (e.g. an id or hint). */
31
+ description?: string;
32
+ /** Right-aligned shortcut / hint text (e.g. "⌘K"). */
33
+ shortcut?: string;
34
+ /** Renders a right check + purple tint. */
35
+ selected?: boolean;
36
+ disabled?: boolean;
37
+ /** Danger styling (red label/icon). */
38
+ destructive?: boolean;
39
+ /** Renders a right chevron (submenu / drill-in affordance). */
40
+ hasSubmenu?: boolean;
41
+ onSelect: () => void;
42
+ /** Keep the menu open after selecting (default: close). */
43
+ closeOnSelect?: boolean;
44
+ } | {
45
+ type: 'separator';
46
+ key?: string;
47
+ } | {
48
+ type: 'label';
49
+ key?: string;
50
+ label: string;
51
+ };
52
+ export declare function MenuPanel({ children, minWidth, maxHeight, onKeyDown, panelRef, ...rest }: {
53
+ children: ReactNode;
54
+ minWidth?: number;
55
+ maxHeight?: number;
56
+ onKeyDown?: (e: KeyboardEvent) => void;
57
+ /** Web DOM node of the panel (for measuring / edge-flip). */
58
+ panelRef?: (node: HTMLElement | null) => void;
59
+ [key: string]: unknown;
60
+ }): import("react/jsx-runtime").JSX.Element;
61
+ export declare function MenuItemView({ icon, label, description, shortcut, selected, disabled, destructive, hasSubmenu, onSelect, }: Omit<Extract<MenuItemSpec, {
62
+ type?: 'item';
63
+ }>, 'key' | 'type' | 'closeOnSelect'>): import("react/jsx-runtime").JSX.Element;
64
+ export declare function MenuSeparatorView(): import("react/jsx-runtime").JSX.Element;
65
+ export declare function MenuLabelView({ children }: {
66
+ children: ReactNode;
67
+ }): import("react/jsx-runtime").JSX.Element;
68
+ export declare function renderMenuItems(items: MenuItemSpec[], close?: () => void): ReactNode;
69
+ //# sourceMappingURL=items.d.ts.map
@@ -0,0 +1 @@
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A;IAClB,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAA;IACtC,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;IAC7C,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB,2CA0BA;AAGD,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,KAAK,EACL,WAAW,EACX,QAAQ,EACR,QAAgB,EAChB,QAAgB,EAChB,WAAmB,EACnB,UAAkB,EAClB,QAAQ,GACT,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,eAAe,CAAC,2CA4DlF;AAGD,wBAAgB,iBAAiB,4CAEhC;AAGD,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAclE;AAGD,wBAAgB,eAAe,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,IAAI,GAAG,SAAS,CAgBpF"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * PortalTheme — the ONE fix for "themed content escapes its theme through a portal".
3
+ *
4
+ * @hanzo/gui's `Popover.Content` and `Portal` render their children in a SEPARATE
5
+ * React subtree (a Gorhom-style portal host mounted at the app root), NOT via
6
+ * `ReactDOM.createPortal`. React context therefore does NOT flow from the trigger's
7
+ * location to the host. Under a nested `<Theme name="dark">` the portaled content
8
+ * lands OUTSIDE that theme context and Tamagui throws "Missing theme" (or renders
9
+ * unthemed).
10
+ *
11
+ * The fix is two-part and must stay two-part:
12
+ * 1. At the TRIGGER site (theme context still available) capture the resolved
13
+ * theme name with `useThemeName()`.
14
+ * 2. INSIDE the portaled content re-apply it: `<PortalTheme name={captured}>`.
15
+ *
16
+ * Every portal-backed menu in this package (DropdownMenu, ContextMenu, SelectMenu,
17
+ * ComboBox) uses this so a menu renders identically whether it is opened under the
18
+ * root theme or under any nested `<Theme>`, light or dark.
19
+ */
20
+ import type { ReactNode } from 'react';
21
+ import { useThemeName } from '@hanzo/gui';
22
+ /** Capture the current resolved theme name at the trigger site. Re-exported so the
23
+ * capture + re-apply pair reads from one module. */
24
+ export { useThemeName };
25
+ export declare function PortalTheme({ name, children }: {
26
+ name: string;
27
+ children: ReactNode;
28
+ }): import("react/jsx-runtime").JSX.Element;
29
+ //# sourceMappingURL=portal-theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"portal-theme.d.ts","sourceRoot":"","sources":["../../../src/product/menu/portal-theme.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAS,YAAY,EAAE,MAAM,YAAY,CAAA;AAEhD;qDACqD;AACrD,OAAO,EAAE,YAAY,EAAE,CAAA;AAEvB,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAIpF"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Roving keyboard focus for a menu panel — ArrowUp/Down move focus between enabled
3
+ * `[role="menuitem"]` children, Home/End jump to ends, Escape closes. Web/desktop
4
+ * only (guards on `document`); native menus have no pointer-keyboard nav. Shared by
5
+ * DropdownMenu and ContextMenu so navigation is identical.
6
+ */
7
+ import type { KeyboardEvent } from 'react';
8
+ export declare function menuKeyDown(e: KeyboardEvent, onClose?: () => void): void;
9
+ //# sourceMappingURL=roving.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roving.d.ts","sourceRoot":"","sources":["../../../src/product/menu/roving.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE1C,wBAAgB,WAAW,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI,CAuBxE"}
@@ -0,0 +1,17 @@
1
+ export type SurfaceId = 'ai' | 'console' | 'app' | 'chat' | 'bot' | 'team' | 'billing';
2
+ /** One Hanzo surface the app switcher offers. */
3
+ export type Surface = {
4
+ /** Stable id; also the per-surface icon key. */
5
+ id: SurfaceId;
6
+ /** Menu label. */
7
+ label: string;
8
+ /** Absolute product URL (opened in a new tab). */
9
+ href: string;
10
+ /** The domain, shown as the tile subtitle. */
11
+ hint: string;
12
+ };
13
+ /** The seven Hanzo surfaces (`console` opens the cloud AI console). */
14
+ export declare const SURFACES: Surface[];
15
+ /** Every surface except `current` — a launcher never links to itself. */
16
+ export declare function otherSurfaces(current?: SurfaceId): Surface[];
17
+ //# sourceMappingURL=surfaces.data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surfaces.data.d.ts","sourceRoot":"","sources":["../../src/product/surfaces.data.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,SAAS,CAAA;AAEtF,iDAAiD;AACjD,MAAM,MAAM,OAAO,GAAG;IACpB,gDAAgD;IAChD,EAAE,EAAE,SAAS,CAAA;IACb,kBAAkB;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAA;IACZ,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,uEAAuE;AACvE,eAAO,MAAM,QAAQ,EAAE,OAAO,EAQ7B,CAAA;AAED,yEAAyE;AACzE,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,EAAE,CAE5D"}