@inf-monkeys-tech/monkeys-design 2.0.272 → 2.0.273
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/capabilities/index.js +3 -3
- package/dist/components/capabilities/index.js.map +1 -1
- package/dist/components/capabilities/index.mjs +3 -3
- package/dist/components/capabilities/index.mjs.map +1 -1
- package/dist/components/visualizations/index.js +1 -1
- package/dist/components/visualizations/index.js.map +1 -1
- package/dist/components/visualizations/index.mjs +1 -1
- package/dist/components/visualizations/index.mjs.map +1 -1
- package/dist/components/workbench/index.js +1 -1
- package/dist/components/workbench/index.js.map +1 -1
- package/dist/components/workbench/index.mjs +1 -1
- package/dist/components/workbench/index.mjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/sources/{d16ffdc5969b7ca24c61d2ab95f576794238d974bfed006ddf79c17118cfb4ee.tsx → 6eedbebd1935ba71dd71cb6f7090d527a23c5d2f4a2bb1e059b8338dfb3a7bcc.tsx} +1 -1
- package/dist/sources/{1ffd6e7b4cf7c9deda4d231cfdb7d3e07d2017d4e8c1cf007d164addc0a208b3.tsx → 7f65cf7da10339a13ed70bd78c19a89bb254246d50bbe7fe07bbe62eebd98f91.tsx} +1 -1
- package/package.json +1 -1
|
@@ -61,7 +61,7 @@ var Qe__namespace = /*#__PURE__*/_interopNamespace(Qe);
|
|
|
61
61
|
var Jk__default = /*#__PURE__*/_interopDefault(Jk);
|
|
62
62
|
var Zk__default = /*#__PURE__*/_interopDefault(Zk);
|
|
63
63
|
|
|
64
|
-
var _m=Object.defineProperty;var r=(e,t)=>_m(e,"name",{value:t,configurable:true});function l(...e){return tailwindMerge.twMerge(e.filter(Boolean).join(" "))}r(l,"cn");function O(e){return e!=null&&typeof e!="boolean"}r(O,"hasRenderableNode");function Kl(e){return typeof e=="string"?e.trim().length>0:O(e)}r(Kl,"hasNonEmptyRenderableNode");var qm=lt.createContext(void 0);function Ul(e){let t=lt.useContext(qm);return lt.useMemo(()=>e?t?{...t,...e,slots:{...t.slots,...e.slots},styles:{...t.styles,...e.styles}}:e:t,[e,t])}r(Ul,"useDataExplorerAppearance");function Ht(...e){return e.filter(Boolean).join(" ")}r(Ht,"cn");function ir(e,t){return typeof e=="function"?e(t):e}r(ir,"resolveDataExplorerValue");var Ym={},Yl={surfaceRoot:"relative flex h-full min-h-0 w-full min-w-0 overflow-hidden rounded-md border border-border bg-background shadow-sm",toolbarRoot:"flex flex-wrap items-center gap-2 border-b border-border bg-background px-4 py-3",toolbarLeading:"flex items-center gap-2",toolbarSearch:"flex h-10 min-w-52 flex-1 items-center gap-2 rounded-md border border-border bg-background px-3 text-sm",toolbarSearchIcon:"inline-flex shrink-0 text-muted-foreground",toolbarSearchInput:"min-w-0 flex-1 bg-transparent text-sm outline-hidden placeholder:text-muted-foreground",toolbarViewSwitch:"flex items-center rounded-md border border-border bg-background p-0.5",toolbarViewButton:"inline-flex h-9 min-w-9 items-center justify-center gap-2 rounded-md px-2 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:pointer-events-none disabled:opacity-50",toolbarViewButtonActive:"bg-muted text-foreground",toolbarActions:"flex items-center gap-2",actionBarRoot:"flex min-w-0 flex-wrap items-center gap-2",actionBarLeading:"flex shrink-0 items-center gap-2",actionBarActions:"flex min-w-0 flex-1 flex-wrap items-center gap-2",actionBarTrailing:"flex shrink-0 items-center gap-2",actionButtonBase:"inline-flex h-9 items-center justify-center gap-2 rounded-md border px-3 text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",actionButtonDefault:"border-border bg-background text-foreground hover:bg-accent/60",actionButtonPrimary:"border-primary/20 bg-primary/10 text-primary hover:bg-primary/15",actionButtonDanger:"border-destructive/20 bg-destructive/10 text-destructive-text hover:bg-destructive/15",actionButtonMuted:"border-border/60 bg-muted/45 text-muted-foreground hover:bg-muted/70 hover:text-foreground",actionButtonActive:"ring-1 ring-primary/30",actionButtonDisabled:"cursor-not-allowed opacity-60",actionIconButton:"w-9 px-0",actionToggleActive:"border-primary/30 bg-primary/10 text-primary",controlButton:"inline-flex h-10 min-w-0 items-center justify-center gap-2 rounded-md border border-border bg-background px-3 text-sm font-medium text-foreground transition-colors hover:bg-accent/60 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60",controlButtonIcon:"inline-flex h-4 w-4 shrink-0 items-center justify-center text-[inherit] [&_*]:!text-[inherit] [&_svg]:!stroke-current [&_svg_*]:!stroke-current",controlButtonLabel:"min-w-0 truncate",controlSelectTrigger:"inline-flex h-10 min-w-28 items-center justify-between gap-3 rounded-md border border-border bg-background px-3 text-sm font-medium text-foreground transition-colors hover:bg-accent/60 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60",controlSelectValue:"flex min-w-0 items-center gap-1 truncate",controlCheckbox:"inline-flex h-9 items-center gap-2 rounded-md border border-border bg-background px-3 text-sm font-medium text-foreground transition-colors hover:bg-accent/60 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60",controlCheckboxIndicator:"flex h-4 w-4 shrink-0 items-center justify-center rounded border border-border bg-background text-primary",controlCheckboxLabel:"min-w-0 truncate",menuTrigger:"inline-flex h-8 w-8 items-center justify-center rounded-md text-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",menuContent:"z-50 min-w-36 rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md outline-hidden",menuLabel:"px-2 py-1.5 text-xs font-medium text-muted-foreground",menuSeparator:"-mx-1 my-1 h-px bg-border",menuItem:"relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",menuItemPrimary:"text-primary focus:text-primary",menuItemDanger:"text-destructive-text focus:text-destructive-text",menuItemMuted:"text-muted-foreground",menuItemIcon:"inline-flex h-4 w-4 shrink-0 items-center justify-center",menuItemLabel:"truncate",cardRoot:"group relative flex min-w-0 flex-col overflow-hidden rounded-lg border border-border/70 bg-background transition-shadow",cardInteractive:"cursor-pointer hover:shadow-sm",cardSelected:"ring-2 ring-primary",cardDisabled:"opacity-60",cardHeader:"p-4",cardMedia:"shrink-0 overflow-hidden",cardFooter:"shrink-0 border-t border-border/60 px-4 py-3",recordCardRoot:"group relative border-border/70 transition-shadow hover:shadow-sm",recordCardActive:"z-10 ring-2 ring-monkeys-500",footerRoot:"flex items-center border-t border-border bg-background px-4 py-3",footerSummary:"flex items-center gap-1 whitespace-nowrap text-sm text-muted-foreground",footerJumpButton:"inline-flex items-center gap-1 text-muted-foreground underline-offset-4 hover:text-foreground hover:underline",footerPageSizeSelect:"h-8 rounded-md border border-border bg-background px-2 text-sm text-foreground",previewRoot:"relative h-full min-h-0 w-full flex-1 select-none self-stretch overflow-hidden bg-slate-950",previewPlaceholder:"flex h-full w-full items-center justify-center rounded-xl bg-white/5 px-6 text-center text-sm text-white/60",previewActions:"absolute right-4 top-4 z-20 flex flex-col gap-2",previewControls:"absolute bottom-4 right-4 z-20 flex flex-col gap-2",previewZoomLabel:"min-w-[3rem] rounded-full border border-white/15 bg-black/30 px-1 py-1 text-center text-xs font-medium text-white/70 shadow-lg backdrop-blur",previewControlButton:"inline-flex h-9 w-9 items-center justify-center rounded-full border border-white/15 bg-black/30 text-white/90 shadow-lg backdrop-blur transition hover:bg-black/45",previewNavigationButton:"absolute top-1/2 flex h-10 w-10 -translate-y-1/2 items-center justify-center rounded-full border border-white/15 bg-black/30 text-white/90 shadow-lg backdrop-blur transition-colors hover:bg-black/45 disabled:pointer-events-none disabled:opacity-40",detailRoot:"flex h-full flex-col overflow-hidden bg-background",detailHeader:"flex items-center justify-between gap-3 border-b border-border bg-background px-4 py-4 sm:px-5",detailLeading:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground",detailNavigation:"hidden items-center gap-1 rounded-lg border border-border bg-background px-1 py-1 md:flex",detailNavigationButton:"flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-50",detailCloseButton:"flex h-10 w-10 items-center justify-center rounded-full border border-border bg-background text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",detailPreviewPanel:"min-h-0 overflow-hidden border-b border-border bg-background xl:border-b-0",detailPreviewFrame:"relative h-full min-h-0 w-full overflow-hidden bg-background",detailRightPanel:"min-h-0 min-w-0 border-t border-border bg-background xl:border-l xl:border-t-0",detailRightPanelBody:"h-full overflow-y-auto overscroll-contain bg-background p-5",treeShellRoot:"flex h-full min-h-0 flex-col overflow-hidden",treeShellHeader:"flex shrink-0 items-start justify-between gap-3 px-4 py-3",treeShellTitle:"truncate text-sm font-semibold",treeShellSubtitle:"mt-1 text-sm text-muted-foreground",treeShellToolbar:"flex shrink-0 items-center gap-2",treeShellBody:"min-h-0 flex-1 overflow-hidden",treeShellFooter:"shrink-0",treeRoot:"min-w-0 space-y-1 overflow-hidden text-sm",treeGroup:"min-w-0 space-y-1",treeGroupHeader:"group/tree-group flex min-w-0 items-center gap-1",treeGroupHeaderButton:"flex h-9 min-w-0 flex-1 items-center gap-2 rounded-md px-2 text-left font-medium text-muted-foreground transition-colors hover:bg-accent/55 hover:text-foreground",treeGroupContent:"min-w-0 space-y-0.5",treeGroupActions:"shrink-0 opacity-0 transition-opacity group-hover/tree-group:opacity-100 data-[state=open]:opacity-100",treeNode:"min-w-0",treeNodeButton:"group/tree-node flex min-h-9 w-full min-w-0 items-center gap-1 rounded-md pr-1 text-left text-sm text-foreground transition-colors hover:bg-accent/55 hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",treeNodeSelected:"bg-accent text-accent-foreground",treeNodeDisabled:"cursor-not-allowed opacity-55",treeNodeDragging:"opacity-50",treeNodeToggle:"inline-flex h-5 w-5 shrink-0 items-center justify-center rounded border-0 bg-transparent p-0 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",treeNodeIcon:"inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground group-hover/tree-node:text-foreground",treeNodeLabel:"min-w-0 truncate",treeNodeDescription:"mt-0.5 truncate text-xs text-muted-foreground",treeNodeMeta:"ml-2 shrink-0 text-xs text-muted-foreground",treeNodeBadge:"ml-2 shrink-0 rounded-full border border-border bg-muted px-1.5 py-0.5 text-[11px] leading-none text-muted-foreground",treeNodeActions:"ml-1 shrink-0 opacity-0 transition-opacity group-hover/tree-node:opacity-100 data-[state=open]:opacity-100",treeNodeChildren:"mt-0.5 min-w-0 space-y-0.5",treeNodeDragHandle:"inline-flex h-5 w-5 shrink-0 cursor-grab items-center justify-center rounded text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-foreground active:cursor-grabbing group-hover/tree-node:opacity-100",treeEmpty:"px-3 py-2 text-xs text-muted-foreground",treeError:"px-3 py-2 text-xs text-destructive-text",treeLoading:"px-3 py-2 text-xs text-muted-foreground"},Jm={flush:{surfaceRoot:"relative flex h-full min-h-0 w-full min-w-0 overflow-hidden"}},Xm={compact:{treeShellHeader:"px-3 py-2",toolbarRoot:"px-3 py-2",toolbarSearch:"h-9 min-w-48",toolbarViewButton:"h-8 min-w-8 text-xs",actionButtonBase:"h-8 px-2.5 text-xs",actionIconButton:"h-8 w-8 px-0",controlButton:"h-9 px-2.5 text-xs",controlSelectTrigger:"h-9 min-w-24 px-2.5 text-xs",controlCheckbox:"h-8 px-2.5 text-xs",menuTrigger:"h-8 w-8",footerRoot:"px-3 py-2",footerPageSizeSelect:"h-8 text-xs",treeGroupHeaderButton:"h-8 text-xs",treeNodeButton:"min-h-8 text-xs",treeEmpty:"py-1.5 text-xs",treeError:"py-1.5 text-xs",treeLoading:"py-1.5 text-xs"},default:{},comfortable:{treeShellHeader:"px-5 py-4",toolbarRoot:"px-5 py-4",toolbarSearch:"h-11",toolbarViewButton:"h-10 min-w-10",actionButtonBase:"h-10 px-3.5",actionIconButton:"h-10 w-10 px-0",controlButton:"h-11 px-3.5",controlSelectTrigger:"h-11 min-w-32 px-3.5",controlCheckbox:"h-10 px-3.5",menuTrigger:"h-9 w-9",footerRoot:"px-5 py-3.5",treeGroupHeaderButton:"h-10",treeNodeButton:"min-h-10"}},Zm={none:{surfaceRoot:"rounded-none",toolbarSearch:"rounded-none",toolbarViewSwitch:"rounded-none",toolbarViewButton:"rounded-none",actionButtonBase:"rounded-none",controlButton:"rounded-none",controlSelectTrigger:"rounded-none",controlCheckbox:"rounded-none",controlCheckboxIndicator:"rounded-none",menuTrigger:"rounded-none",menuContent:"rounded-none",menuItem:"rounded-none",cardRoot:"rounded-none",footerPageSizeSelect:"rounded-none",detailLeading:"rounded-none",detailNavigation:"rounded-none",detailNavigationButton:"rounded-none",detailCloseButton:"rounded-none",treeGroupHeaderButton:"rounded-none",treeNodeButton:"rounded-none",treeNodeToggle:"rounded-none",treeNodeBadge:"rounded-none",treeNodeDragHandle:"rounded-none"},sm:{surfaceRoot:"rounded-sm",toolbarSearch:"rounded-sm",toolbarViewSwitch:"rounded-sm",toolbarViewButton:"rounded-sm",actionButtonBase:"rounded-sm",controlButton:"rounded-sm",controlSelectTrigger:"rounded-sm",controlCheckbox:"rounded-sm",controlCheckboxIndicator:"rounded-sm",menuTrigger:"rounded-sm",menuContent:"rounded-sm",menuItem:"rounded-sm",cardRoot:"rounded-sm",treeGroupHeaderButton:"rounded-sm",treeNodeButton:"rounded-sm",treeNodeToggle:"rounded-sm",treeNodeBadge:"rounded-sm",treeNodeDragHandle:"rounded-sm"},md:{},lg:{surfaceRoot:"rounded-xl",toolbarSearch:"rounded-lg",toolbarViewSwitch:"rounded-lg",toolbarViewButton:"rounded-lg",actionButtonBase:"rounded-lg",controlButton:"rounded-lg",controlSelectTrigger:"rounded-lg",controlCheckbox:"rounded-lg",controlCheckboxIndicator:"rounded-md",menuTrigger:"rounded-lg",menuContent:"rounded-lg",cardRoot:"rounded-xl",treeGroupHeaderButton:"rounded-lg",treeNodeButton:"rounded-lg",treeNodeToggle:"rounded-md",treeNodeBadge:"rounded-lg",treeNodeDragHandle:"rounded-md"},xl:{surfaceRoot:"rounded-2xl",toolbarSearch:"rounded-xl",toolbarViewSwitch:"rounded-xl",toolbarViewButton:"rounded-xl",actionButtonBase:"rounded-xl",controlButton:"rounded-xl",controlSelectTrigger:"rounded-xl",controlCheckbox:"rounded-xl",controlCheckboxIndicator:"rounded-lg",menuTrigger:"rounded-xl",menuContent:"rounded-xl",cardRoot:"rounded-2xl",treeGroupHeaderButton:"rounded-xl",treeNodeButton:"rounded-xl",treeNodeToggle:"rounded-lg",treeNodeBadge:"rounded-xl",treeNodeDragHandle:"rounded-lg"},full:{surfaceRoot:"rounded-2xl",toolbarSearch:"rounded-full",toolbarViewSwitch:"rounded-full",toolbarViewButton:"rounded-full",actionButtonBase:"rounded-full",controlButton:"rounded-full",controlSelectTrigger:"rounded-full",controlCheckbox:"rounded-full",controlCheckboxIndicator:"rounded-full",menuTrigger:"rounded-full",cardRoot:"rounded-2xl",treeGroupHeaderButton:"rounded-full",treeNodeButton:"rounded-full",treeNodeToggle:"rounded-full",treeNodeBadge:"rounded-full",treeNodeDragHandle:"rounded-full"}},Qm={none:{surfaceRoot:"border-transparent",toolbarRoot:"border-transparent",toolbarSearch:"border-transparent",toolbarViewSwitch:"border-transparent",actionButtonBase:"border-transparent",controlButton:"border-transparent",controlSelectTrigger:"border-transparent",controlCheckbox:"border-transparent",cardRoot:"border-transparent",footerRoot:"border-transparent",detailHeader:"border-transparent",detailPreviewPanel:"border-transparent",detailRightPanel:"border-transparent"},subtle:{surfaceRoot:"border-border/60",toolbarRoot:"border-border/60",toolbarSearch:"border-border/60",toolbarViewSwitch:"border-border/60",actionButtonDefault:"border-border/60",controlButton:"border-border/60",controlSelectTrigger:"border-border/60",controlCheckbox:"border-border/60",cardRoot:"border-border/60",footerRoot:"border-border/60"},solid:{},strong:{surfaceRoot:"border-foreground/20",toolbarRoot:"border-foreground/20",toolbarSearch:"border-foreground/20",toolbarViewSwitch:"border-foreground/20",actionButtonDefault:"border-foreground/20",controlButton:"border-foreground/20",controlSelectTrigger:"border-foreground/20",controlCheckbox:"border-foreground/20",cardRoot:"border-foreground/20",footerRoot:"border-foreground/20"}},ep={plain:{},muted:{surfaceRoot:"bg-card",toolbarRoot:"bg-muted/20",toolbarSearch:"bg-background",toolbarViewSwitch:"bg-background",controlButton:"bg-background",controlSelectTrigger:"bg-background",controlCheckbox:"bg-background",cardRoot:"bg-card",footerRoot:"bg-muted/20",detailHeader:"bg-muted/20"},soft:{surfaceRoot:"bg-background/95 shadow-sm",toolbarRoot:"bg-background/95",actionButtonDefault:"bg-muted/30 hover:bg-muted/55",controlButton:"bg-muted/30 hover:bg-muted/55",controlSelectTrigger:"bg-muted/30 hover:bg-muted/55",controlCheckbox:"bg-muted/30 hover:bg-muted/55",cardRoot:"bg-background/95 shadow-sm",footerRoot:"bg-background/95"},glass:{surfaceRoot:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",toolbarRoot:"border-white/10 bg-white/5 backdrop-blur-md",toolbarSearch:"border-white/10 bg-white/5",toolbarViewSwitch:"border-white/10 bg-white/5",actionButtonDefault:"border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]",controlButton:"border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]",controlSelectTrigger:"border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]",controlCheckbox:"border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]",controlCheckboxIndicator:"border-white/15 bg-white/10",cardRoot:"border-white/10 bg-white/[0.06] shadow-none",footerRoot:"border-white/10 bg-white/5 backdrop-blur-md"},"dark-stage":{previewRoot:"bg-slate-950",previewPlaceholder:"bg-white/5 text-white/60",actionButtonBase:"inline-flex h-9 items-center justify-center gap-2 rounded-full border px-3 text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-white/45 focus-visible:ring-offset-0",actionButtonDefault:"border-white/15 bg-black/30 text-white/90 shadow-lg backdrop-blur hover:bg-black/[0.45]",controlButton:"border-white/15 bg-black/30 text-white/90 shadow-lg backdrop-blur hover:bg-black/[0.45]",controlSelectTrigger:"border-white/15 bg-black/30 text-white/90 shadow-lg backdrop-blur hover:bg-black/[0.45]",controlCheckbox:"border-white/15 bg-black/30 text-white/90 shadow-lg backdrop-blur hover:bg-black/[0.45]",actionButtonPrimary:"border-white/25 bg-white/20 text-white shadow-lg backdrop-blur hover:bg-white/28",actionButtonMuted:"border-white/10 bg-black/20 text-white/70 shadow-lg backdrop-blur hover:bg-black/[0.35] hover:text-white",actionIconButton:"h-9 w-9 px-0"}},ql={default:{density:"default",radius:"md",border:"solid",background:"plain"},soft:{density:"default",radius:"md",border:"subtle",background:"plain"},compact:{density:"compact",radius:"md",border:"subtle",background:"soft"},"tinted-glass":{density:"default",radius:"lg",border:"subtle",background:"glass"},flat:{density:"compact",radius:"none",border:"solid",background:"plain"},glass:{density:"default",radius:"lg",border:"subtle",background:"glass"},"hard-edge":{density:"compact",radius:"none",border:"solid",background:"plain"}},tp={soft:{actionButtonBase:"font-medium",controlButton:"font-medium",controlSelectTrigger:"font-medium",controlCheckbox:"font-medium",menuTrigger:"rounded-full",cardRoot:"border-border/70"},compact:{toolbarRoot:"gap-2",actionButtonBase:"text-xs",controlButton:"text-xs",controlSelectTrigger:"text-xs",controlCheckbox:"text-xs",footerRoot:"text-xs"},"tinted-glass":{actionButtonDefault:"border-border/60 bg-background/10 text-foreground hover:bg-accent/60",actionButtonPrimary:"border-primary/30 bg-primary/15 text-primary-foreground hover:bg-primary/20",actionButtonMuted:"border-border/50 bg-muted/20 text-muted-foreground hover:bg-muted/45 hover:text-foreground",controlButton:"border-border/60 bg-background/10 text-foreground hover:bg-accent/60",controlSelectTrigger:"border-border/60 bg-background/10 text-foreground hover:bg-accent/60",controlCheckbox:"border-border/60 bg-background/10 text-foreground hover:bg-accent/60",controlCheckboxIndicator:"border-border/60 bg-background/10 text-primary",menuContent:"border-border bg-popover text-popover-foreground shadow-2xl",menuSeparator:"bg-border",menuItem:"focus:bg-accent focus:text-accent-foreground",cardSelected:"ring-2 ring-primary",previewRoot:"bg-background",treeGroupHeaderButton:"text-muted-foreground hover:bg-accent/60 hover:text-foreground",treeNodeButton:"text-foreground hover:bg-accent/60 hover:text-accent-foreground focus-visible:ring-ring",treeNodeSelected:"bg-accent text-accent-foreground",treeNodeToggle:"text-muted-foreground hover:bg-accent hover:text-foreground",treeNodeIcon:"text-muted-foreground group-hover/tree-node:text-foreground",treeNodeMeta:"text-muted-foreground",treeNodeBadge:"border-border bg-muted text-muted-foreground",treeNodeActions:"text-muted-foreground",treeNodeDragHandle:"text-muted-foreground hover:bg-accent hover:text-foreground group-hover/tree-node:opacity-100",treeEmpty:"text-muted-foreground",treeError:"text-destructive-text",treeLoading:"text-muted-foreground"},flat:{toolbarRoot:"border-slate-200 bg-white",toolbarSearch:"rounded-none border-slate-200 bg-white shadow-none",toolbarViewSwitch:"rounded-none border-slate-200 bg-white shadow-none",actionButtonBase:"rounded-none shadow-none",controlButton:"rounded-none border-slate-200 bg-white text-slate-700 shadow-none hover:bg-slate-50",controlSelectTrigger:"rounded-none border-slate-200 bg-white text-slate-700 shadow-none hover:bg-slate-50",controlCheckbox:"rounded-none border-slate-200 bg-white text-slate-700 shadow-none hover:bg-slate-50",actionButtonDefault:"border-slate-200 bg-white text-slate-700 hover:bg-slate-50",menuTrigger:"rounded-none border border-slate-200 bg-white text-slate-700 shadow-none hover:bg-slate-50",menuContent:"rounded-none border-slate-200 bg-white shadow-none",cardRoot:"rounded-none border-slate-200 bg-white shadow-none",footerRoot:"border-slate-200 bg-white",treeRoot:"space-y-1 text-sm",treeGroupHeader:"group/tree-group flex min-w-0 items-center",treeGroupHeaderButton:"h-9 rounded-none px-3 text-slate-600 shadow-none hover:bg-slate-100 hover:text-slate-950",treeGroupContent:"space-y-1",treeNodeButton:"min-h-9 rounded-none text-slate-700 hover:bg-slate-100 hover:text-slate-950 focus-visible:ring-slate-300",treeNodeSelected:"bg-slate-100 text-slate-950",treeNodeToggle:"rounded-none text-slate-500 hover:bg-transparent hover:text-slate-950",treeNodeIcon:"text-slate-500 group-hover/tree-node:text-slate-950",treeNodeDragHandle:"rounded-none text-slate-400 hover:bg-transparent hover:text-slate-700",treeNodeActions:"text-slate-500"},glass:{menuContent:"border-white/10 bg-slate-950/90 text-white backdrop-blur-xl",menuSeparator:"bg-white/10",menuItem:"focus:bg-white/10 focus:text-white"},"hard-edge":{toolbarRoot:"border-slate-200 bg-white",actionButtonBase:"rounded-none shadow-none",controlButton:"rounded-none shadow-none",controlSelectTrigger:"rounded-none shadow-none",controlCheckbox:"rounded-none shadow-none",cardRoot:"rounded-none border-slate-200 bg-white shadow-none",footerRoot:"border-slate-200 bg-white",footerPageSizeSelect:"rounded-none border-slate-200 shadow-none"}},op=Object.keys(Yl);function np(...e){return op.reduce((t,o)=>(t[o]=Ht(...e.map(n=>n?.[o])),t),{})}r(np,"mergeSlots");function rp(...e){return e.reduce((t,o)=>({...t,...o}),{})}r(rp,"mergeStyles");function ap(e){let t=ql[e];if(!t)throw new TypeError(`Unknown Data Explorer theme preset "${String(e)}". Expected one of: ${Object.keys(ql).join(", ")}.`);return t}r(ap,"getPresetDefaults");function Jl(e){let t=e?.preset??"default",o=e?.surface??"card",n=ap(t),a=e?.density??n.density??"default",i=e?.radius??n.radius??"md",s=e?.border??n.border??"solid",u=e?.background??n.background??"plain",c=np(Yl,tp[t],Xm[a],Zm[i],Qm[s],ep[u],e?.slots);return o==="flush"&&(c.surfaceRoot=Ht(Jm.flush.surfaceRoot,e?.slots?.surfaceRoot)),{surface:o,preset:t,density:a,radius:i,border:s,background:u,styles:rp(Ym,e?.styles),slots:c}}r(Jl,"resolveDataExplorerAppearance");function Xl(e,t){if(t==="primary")return e.slots.menuItemPrimary;if(t==="danger")return e.slots.menuItemDanger;if(t==="muted")return e.slots.menuItemMuted}r(Xl,"getDataExplorerMenuItemToneClassName");var Ki={locale:"en-US",messages:{pagination:{navigation:"Pagination",first:"First",previous:"Previous",next:"Next",last:"Last",page:r(({page:e,pageCount:t})=>`Page ${e} of ${t}`,"page"),currentPage:r(({page:e,pageCount:t})=>`Page ${e} of ${t}, current page`,"currentPage"),emptyResults:"0 results",range:r(({start:e,end:t,total:o})=>`${e}-${t} of ${o}`,"range"),selected:r(({count:e})=>`${e} selected`,"selected"),pageSize:"Items per page",loadBatchSize:"Items per load",perLoad:"Items per load",jumpToPage:"Jump to page",pages:"pages",clickToJump:"Click to jump to a page"},dialog:{close:"Close dialog"},dropdownMenu:{actions:"Actions"},loading:{spinner:"Loading"},layout:{resizePanels:"Resize panels",expandPanel:"Expand",collapsePanel:"Collapse",movePanel:"Move",moveBefore:"Move earlier",moveAfter:"Move later"},steps:{label:"Progress",current:"Current",completed:"Completed",error:"Error",disabled:"Disabled"},numberInput:{increment:"Increase value",decrement:"Decrease value"},passwordInput:{showPassword:"Show password",hidePassword:"Hide password"},multiSelect:{placeholder:"Select options",empty:"No options",removeOption:r(({value:e})=>`Remove ${e}`,"removeOption")},table:{dragColumn:r(({columnId:e})=>`Drag column ${e}`,"dragColumn"),resizeColumn:r(({columnId:e})=>`Resize column ${e}`,"resizeColumn"),sortColumn:r(({columnId:e})=>e?`Sort column ${e}`:"Sort column","sortColumn"),loadingRow:"Loading table row"},toolbar:{theme:{label:"Appearance",toggle:"Toggle theme",auto:"Auto",light:"Light",dark:"Dark"},language:{label:"Language",switch:"Switch language"}},toast:{errorTitle:"Error",warningTitle:"Warning",defaultErrorDescription:"Something went wrong.",defaultWarningDescription:"Please check and try again."},dataExplorer:{viewTree:{actions:"More actions",expand:"Expand",collapse:"Collapse",loading:"Loading...",empty:"No views",error:"Unable to load views"}},workbench:{relationshipGraph:{zoomOut:"Zoom out",zoomIn:"Zoom in",zoomToFit:"Fit graph",minimap:"Graph overview"},collection:{label:"Collection",loading:"Loading items",empty:"No items",loadError:"Unable to load items",refreshError:"Unable to refresh items",retry:"Retry",loadingMore:"Loading more items",permission:"You do not have permission to view this content",offline:"You appear to be offline",requestAccess:"Request access"},interactiveTable:{columnActions:"Column actions",freezeColumn:"Freeze to left",freezeEndColumn:"Freeze to right",unfreezeColumn:"Unfreeze from left",unfreezeEndColumn:"Unfreeze from right",unfreezeAllColumns:"Unfreeze all columns",resetColumnWidth:"Reset column width",frozenColumnTitle:"Frozen column"}},agentWorkbench:{label:"Session activity",reasoning:"Reasoning",plan:"Plan",taskNoDetail:"No additional details",modes:{chat:"Chat",work:"Work"},composer:{send:"Send message",stop:"Stop generating",queue:"Queue message",attach:"Add photos or files",voice:"Start voice input",webSearch:"Web search",chatMode:"Chat mode",model:"Model",reasoning:"Reasoning effort",permissions:"Permissions",removeAttachment:"Remove attachment",editQueued:"Edit queued message",deleteQueued:"Delete queued message",moveUp:"Move message up",moveDown:"Move message down",queued:"Queued messages",uploading:"Uploading",uploadFailed:"Upload failed",retryAttachment:"Retry attachment upload",noModels:"No models available",message:"Message",attachmentOnly:"Attachment",reasoningOptions:{low:"Low",medium:"Medium",high:"High",xhigh:"Extra high"},permissionOptions:{"approval-required":"Approval required","auto-approve":"Auto approve","full-access":"Full access"}},quickStart:{label:"Quick start",back:"Back",addFile:"Add file"},tool:{input:"Input",output:"Output",status:{pending:"Pending",running:"Running",completed:"Completed",failed:"Error",denied:"Denied"}},approval:{approve:"Approve",reject:"Reject",approved:"Approved",rejected:"Rejected"},artifact:{pending:"Preparing",ready:"Ready",failed:"Failed",open:r(({name:e})=>`Open ${e}`,"open")},run:{stopping:"Stopping...",stoppedAfter:r(({duration:e})=>`You stopped after ${e}`,"stoppedAfter")},process:{running:"Working",queued:"Queued",waitingApproval:"Waiting for approval",failed:"Failed",stopped:"Stopped",processed:"Processed",processedFor:r(({duration:e})=>`Worked for ${e}`,"processedFor"),completedCount:r(({completed:e,total:t})=>`${e}/${t} completed`,"completedCount")},artifactWorkspace:{outputs:"Outputs",sources:"Sources",viewAll:"View all",toggleSummary:"Toggle files",tabs:"Open files",closeTab:r(({name:e})=>`Close ${e}`,"closeTab"),closeWorkspace:"Close workspace",close:"Close",closeOthers:"Close other tabs",closeRight:"Close tabs to the right",closeAll:"Close all tabs",kinds:{audio:"Audio",file:"File",html:"HTML",image:"Image",markdown:"Markdown",pdf:"PDF",presentation:"Presentation",video:"Video",web:"Web page"},collapse:"Collapse",maximize:"Full screen",restore:"Exit full screen",download:r(({name:e})=>`Download ${e}`,"download"),openExternal:r(({name:e})=>`Open ${e} in a new window`,"openExternal"),loading:"Loading preview...",failed:"Preview unavailable",retry:"Try again"},usage:{label:"Context usage",context:r(({used:e,total:t})=>`${e} / ${t} tokens`,"context")},navigation:{search:"Search agents and sessions",searchSessions:"Search sessions",searchShortcut:"Focus search",clearSearch:"Clear search",tabsLabel:"Agent workbench navigation",agents:"Agents",sessions:"Sessions",newAgent:"New Agent",newSession:"New Session",capabilities:"Capabilities & Extensions",settings:"Agent Settings",allAgents:"All Agents",recentSessions:"Recent Sessions",chat:"Chat",work:"Work",chats:"Chats",builtIn:"Built-in",noDescription:"No description",loading:"Loading...",emptyAgents:"No agents yet",emptySessions:"No sessions yet",noResults:"No matching results",retry:"Retry",pin:"Pin",unpin:"Unpin",rename:"Rename",delete:"Delete",actions:"Actions",save:"Save",cancel:"Cancel",running:"Running",completed:"Completed",failed:"Failed",contextUsage:r(({percent:e})=>`${e}% context used`,"contextUsage")},details:{title:"Task details",description:"Summary and workspace activity",duration:"Duration",updated:"Updated",model:"Model",mode:"Mode",permissions:"Permissions",tokenUsage:"Token usage",summary:"Summary",summaryEmpty:"No summary is available yet.",summaryFailed:"The summary could not be generated.",highlights:"Highlights",pendingItems:"Pending items",tabs:{label:"Task detail views",summary:"Summary",workspace:"Workspace"},status:{queued:"Queued",running:"Running",waiting_approval:"Waiting for approval",stopping:"Stopping",stopped:"Stopped",completed:"Completed",failed:"Failed"},state:{loading:{title:"Loading task details",description:"Restoring the latest session activity."},empty:{title:"No task selected",description:"Select a task to inspect its details."},error:{title:"Unable to load task details",description:"Try again after the session is available."}},actions:{close:"Close task details",copySummary:"Copy summary",retry:"Retry",retrySummary:"Retry summary",resume:"Resume",continueInNewTask:"Continue in new task",editAndRerun:"Edit and rerun",export:"Export"},workspace:{diffs:"Code changes",files:"Files",terminals:"Terminals",tests:"Tests",artifacts:"Artifacts",exitCode:r(({code:e})=>`Exit code ${e}`,"exitCode"),diffStatus:{added:"Added",modified:"Modified",deleted:"Deleted",renamed:"Renamed"},fileOperation:{upsert:"Updated",delete:"Deleted"}}}}}};function Zl(e,t){return t?{beautiful:{...e.beautiful,...t.beautiful},pagination:{...e.pagination,...t.pagination},dialog:{...e.dialog,...t.dialog},dropdownMenu:{...e.dropdownMenu,...t.dropdownMenu},loading:{...e.loading,...t.loading},layout:{...e.layout,...t.layout},steps:{...e.steps,...t.steps},numberInput:{...e.numberInput,...t.numberInput},passwordInput:{...e.passwordInput,...t.passwordInput},multiSelect:{...e.multiSelect,...t.multiSelect},table:{...e.table,...t.table},toolbar:{theme:{...e.toolbar.theme,...t.toolbar?.theme},language:{...e.toolbar.language,...t.toolbar?.language}},toast:{...e.toast,...t.toast},dataExplorer:{viewTree:{...e.dataExplorer.viewTree,...t.dataExplorer?.viewTree}},workbench:{relationshipGraph:{zoomOut:"Zoom out",zoomIn:"Zoom in",zoomToFit:"Fit graph",minimap:"Graph overview",...e.workbench.relationshipGraph,...t.workbench?.relationshipGraph},collection:{...e.workbench.collection,...t.workbench?.collection},interactiveTable:{...e.workbench.interactiveTable,...t.workbench?.interactiveTable}},agentWorkbench:{...e.agentWorkbench,...t.agentWorkbench,modes:{...e.agentWorkbench.modes,...t.agentWorkbench?.modes},composer:{...e.agentWorkbench.composer,...t.agentWorkbench?.composer},quickStart:{...e.agentWorkbench.quickStart,...t.agentWorkbench?.quickStart},tool:{...e.agentWorkbench.tool,...t.agentWorkbench?.tool,status:{...e.agentWorkbench.tool.status,...t.agentWorkbench?.tool?.status}},approval:{...e.agentWorkbench.approval,...t.agentWorkbench?.approval},artifact:{...e.agentWorkbench.artifact,...t.agentWorkbench?.artifact},run:{...e.agentWorkbench.run,...t.agentWorkbench?.run},process:{...e.agentWorkbench.process,...t.agentWorkbench?.process},artifactWorkspace:{...e.agentWorkbench.artifactWorkspace,...t.agentWorkbench?.artifactWorkspace},usage:{...e.agentWorkbench.usage,...t.agentWorkbench?.usage},navigation:{...e.agentWorkbench.navigation,...t.agentWorkbench?.navigation},details:{...e.agentWorkbench.details,...t.agentWorkbench?.details,tabs:{...e.agentWorkbench.details.tabs,...t.agentWorkbench?.details?.tabs},status:{...e.agentWorkbench.details.status,...t.agentWorkbench?.details?.status},state:{loading:{...e.agentWorkbench.details.state.loading,...t.agentWorkbench?.details?.state?.loading},empty:{...e.agentWorkbench.details.state.empty,...t.agentWorkbench?.details?.state?.empty},error:{...e.agentWorkbench.details.state.error,...t.agentWorkbench?.details?.state?.error}},actions:{...e.agentWorkbench.details.actions,...t.agentWorkbench?.details?.actions},workspace:{...e.agentWorkbench.details.workspace,...t.agentWorkbench?.details?.workspace,diffStatus:{...e.agentWorkbench.details.workspace.diffStatus,...t.agentWorkbench?.details?.workspace?.diffStatus},fileOperation:{...e.agentWorkbench.details.workspace.fileOperation,...t.agentWorkbench?.details?.workspace?.fileOperation}}}}}:e}r(Zl,"mergeMonkeysLocaleMessages");var sr={locale:Ki.locale,messages:Zl(Ki.messages)};var ip=Object.freeze({}),sp=Object.freeze({}),Ql=Symbol.for("@inf-monkeys-tech/monkeys-design/provider-context@1");function lp(){return Object.freeze({locale:lt.createContext({...sr,provided:false}),theme:lt.createContext({provided:false}),direction:lt.createContext({provided:false}),environment:lt.createContext({provided:false,environment:ip,portal:sp})})}r(lp,"createMonkeysProviderContexts");function dp(){let e=globalThis,t=e[Ql];if(t)return t;let o=lp();return Object.defineProperty(e,Ql,{value:o,enumerable:false,configurable:false,writable:false}),o}r(dp,"getMonkeysProviderContexts");var ua=dp(),Ui=ua.locale,ma=ua.theme,td=ua.direction,pa=ua.environment;function cp(e,t){return t===void 0?e:e===void 0?t:{...e,...t,slots:e.slots||t.slots?{...e.slots,...t.slots}:void 0,styles:e.styles||t.styles?{...e.styles,...t.styles}:void 0}}r(cp,"mergeAppearance");function xt(){try{return lt.useContext(Ui)??{...sr,provided:!1}}catch{return {...sr,provided:false}}}r(xt,"useMonkeysLocale");function vt(){return lt.useContext(Ui).messages}r(vt,"useMonkeysLocaleMessages");function dn(){return lt.useContext(ma).resolvedTheme}r(dn,"useMonkeysResolvedTheme");function Oe(e){let t=lt.useContext(ma).baseAppearance;return lt.useMemo(()=>cp(t,e),[e,t])}r(Oe,"useMonkeysBaseAppearance");function Ro(){return lt.useContext(ma).statusStates??{}}r(Ro,"useMonkeysStatusStates");function qi(){return lt.useContext(td).direction}r(qi,"useMonkeysDirection");function Yi(){return lt.useContext(pa).environment}r(Yi,"useMonkeysEnvironment");function Ji(){return lt.useContext(pa).portal}r(Ji,"useMonkeysPortalOptions");function Ne(){let e=lt.useContext(Ui),t=lt.useContext(ma),o=lt.useContext(td),n=e.provided||t.provided||o.provided;return lt.useMemo(()=>n?{dir:o.direction,"data-monkeys-direction":o.direction,"data-monkeys-locale":e.locale,"data-monkeys-theme":t.themeId,"data-monkeys-theme-mode":t.resolvedTheme?.colorMode}:{},[o.direction,e.locale,n,t.resolvedTheme?.colorMode,t.themeId])}r(Ne,"useMonkeysComponentAttributes");function Xi(){return lt.useContext(pa).iconResolver}r(Xi,"useMonkeysAssetIconResolver");function od(){return lt.useContext(pa).imageResolver}r(od,"useMonkeysAssetImageResolver");function nd(e,t){let o=new WeakMap,n=new Map,a=1;return (...i)=>{let s=i.slice(0,-1),u=i[i.length-1],c=s.map(m=>{if(!m)return 0;let p=o.get(m);return p===void 0&&(p=a++,o.set(m,p)),p}).join(":"),d=n.get(c);if(!d){let m={};for(let p of e)m[p]=t(...s.map(f=>f?.[p]));d=Object.freeze(m),n.size>=64&&n.delete(n.keys().next().value),n.set(c,d);}let g={...d};if(u)for(let m of e){let p=u[m];p&&(g[m]=t(...s.map(f=>f?.[m]),p));}return g}}r(nd,"createStaticSlotMerger");var up={},yt="motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",Zt="motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",ga="motion-safe:transition-transform motion-safe:duration-300 motion-safe:ease-out",rd=l("[scrollbar-width:thin]","[scrollbar-color:hsl(var(--muted-foreground)/0.45)_transparent]","[&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2","[&::-webkit-scrollbar-button]:hidden [&::-webkit-scrollbar-button]:h-0 [&::-webkit-scrollbar-button]:w-0 [&::-webkit-scrollbar-button]:bg-transparent","[&::-webkit-scrollbar-button:single-button]:hidden [&::-webkit-scrollbar-button:single-button]:h-0 [&::-webkit-scrollbar-button:single-button]:w-0","[&::-webkit-scrollbar-button:double-button]:hidden [&::-webkit-scrollbar-button:double-button]:h-0 [&::-webkit-scrollbar-button:double-button]:w-0","[&::-webkit-scrollbar-corner]:bg-transparent","[&::-webkit-scrollbar-track]:bg-transparent","[&:has(thead.sticky)::-webkit-scrollbar-track]:mt-[var(--base-table-header-height)]","[&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/40","hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/55"),mp=l("[&.sticky_th]:sticky [&.sticky_th]:top-0 [&.sticky_th]:z-[2]","[&.sticky_th]:bg-[var(--base-table-sticky-header-bg)]","[&.sticky_th]:shadow-[inset_0_-1px_0_var(--base-table-header-separator)]"),id={buttonBase:l("group/button inline-flex min-w-0 items-center justify-center gap-2 rounded-md border px-3 text-sm font-medium focus-visible:outline-hidden","cursor-pointer disabled:!cursor-not-allowed",Zt),buttonDefault:"border-border bg-background text-foreground hover:bg-accent/60",buttonPrimary:"border-primary/20 bg-primary/10 text-primary hover:bg-primary/15",buttonSuccess:"border-[hsl(var(--success,142_72%_29%)_/_0.30)] bg-[hsl(var(--success,142_72%_29%)_/_0.10)] text-[hsl(var(--success,142_72%_29%))] hover:bg-[hsl(var(--success,142_72%_29%)_/_0.15)]",buttonWarning:"border-[hsl(var(--warning,45_93%_47%)_/_0.30)] bg-[hsl(var(--warning,45_93%_47%)_/_0.10)] text-[hsl(var(--warning-foreground,28_73%_26%))] hover:bg-[hsl(var(--warning,45_93%_47%)_/_0.15)]",buttonDanger:"border-destructive/20 bg-destructive/10 text-destructive-text hover:bg-destructive/15",buttonMuted:"border-border/60 bg-muted/45 text-muted-foreground hover:bg-muted/70 hover:text-foreground",buttonActive:"border-primary/35 bg-primary/10 text-primary",buttonDisabled:"!cursor-not-allowed opacity-60",buttonIconOnly:"w-9 px-0",buttonIcon:"inline-flex h-4 w-4 shrink-0 items-center justify-center text-[inherit] [&_*]:!text-[inherit] [&_svg]:!stroke-current [&_svg_*]:!stroke-current",buttonLabel:"min-w-0 truncate",badgeBase:l("inline-flex max-w-full items-center gap-1.5 rounded-full border px-2 py-0.5 text-xs font-medium",yt),badgeDefault:"border-border/60 bg-background text-foreground",badgePrimary:"border-primary/30 bg-primary/10 text-primary",badgeSuccess:"border-[hsl(var(--success,142_72%_29%)_/_0.30)] bg-[hsl(var(--success,142_72%_29%)_/_0.10)] text-[hsl(var(--success,142_72%_29%))]",badgeWarning:"border-[hsl(var(--warning,45_93%_47%)_/_0.30)] bg-[hsl(var(--warning,45_93%_47%)_/_0.10)] text-[hsl(var(--warning-foreground,28_73%_26%))]",badgeDanger:"border-destructive/30 bg-destructive/10 text-destructive-text",badgeMuted:"border-border/60 bg-muted text-muted-foreground",badgeIcon:"inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center",badgeLabel:"min-w-0 truncate",textRoot:"min-w-0 break-words leading-6",textSizeXs:"text-xs",textSizeSm:"text-sm",textSizeMd:"text-base",textSizeLg:"text-lg",textSizeXl:"text-xl",typographyToneDefault:"text-foreground",typographyToneMuted:"text-muted-foreground",typographyTonePrimary:"text-primary",typographyToneSuccess:"text-emerald-700 dark:text-emerald-400",typographyToneWarning:"text-amber-700 dark:text-amber-400",typographyToneDanger:"text-destructive-text",typographyToneInherit:"text-inherit",headingRoot:"min-w-0 break-words font-semibold tracking-tight",headingSizeXs:"text-sm leading-5",headingSizeSm:"text-base leading-6",headingSizeMd:"text-lg leading-7",headingSizeLg:"text-xl leading-7",headingSizeXl:"text-2xl leading-8",headingSize2xl:"text-3xl leading-9",linkRoot:"inline break-words underline decoration-current/40 underline-offset-4 hover:decoration-current focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30",codeInline:"rounded border border-border/70 bg-muted/60 px-1.5 py-0.5 font-mono text-[0.875em] leading-[1.45] text-foreground",codeBlock:"m-0 max-w-full overflow-x-auto rounded-md border border-border/70 bg-muted/60 p-4 text-foreground",codeContent:"font-mono text-sm leading-6",kbdRoot:"inline-flex min-h-5 items-center rounded border border-border bg-muted/70 px-1.5 font-mono text-[0.75em] font-medium leading-5 text-foreground shadow-[inset_0_-1px_0_hsl(var(--monkeys-color-border))]",listRoot:"m-0 min-w-0 list-outside break-words ps-5 text-foreground",listSpacingCompact:"[&>li+li]:mt-1",listSpacingDefault:"[&>li+li]:mt-2",listSpacingRelaxed:"[&>li+li]:mt-3",listMarkerNone:"list-none ps-0",listMarkerDisc:"list-disc",listMarkerCircle:"list-[circle]",listMarkerSquare:"list-[square]",listMarkerDecimal:"list-decimal",listMarkerLowerAlpha:"list-[lower-alpha]",listMarkerUpperAlpha:"list-[upper-alpha]",listItem:"min-w-0 ps-1 leading-6 marker:text-muted-foreground",stackRoot:"flex min-w-0 flex-col",inlineRoot:"flex min-w-0 flex-row",gridRoot:"grid min-w-0",containerRoot:"mx-auto w-full min-w-0",aspectRatioRoot:"relative min-w-0 overflow-hidden [&>*]:h-full [&>*]:w-full",spinnerRoot:"inline-flex shrink-0 items-center justify-center text-current align-middle",spinnerIndicator:"h-5 w-5 rounded-full border-2 border-current border-r-transparent motion-safe:animate-spin motion-reduce:animate-none",visuallyHiddenRoot:"sr-only",visuallyHiddenFocusable:"focus:not-sr-only focus:fixed focus:left-4 focus:top-4 focus:z-[1000] focus:rounded-md focus:bg-background focus:px-4 focus:py-2 focus:text-foreground focus:shadow-lg focus:outline-hidden focus:ring-2 focus:ring-ring focus-within:not-sr-only focus-within:fixed focus-within:left-4 focus-within:top-4 focus-within:z-[1000] focus-within:rounded-md focus-within:bg-background focus-within:px-4 focus-within:py-2 focus-within:text-foreground focus-within:shadow-lg focus-within:ring-2 focus-within:ring-ring",fieldsetRoot:"min-w-0 border-0 p-0 text-foreground",fieldsetLegend:"min-w-0 text-sm font-semibold leading-6 text-foreground",fieldsetDescription:"mt-1 text-sm leading-5 text-muted-foreground",fieldsetError:"mt-1 text-sm leading-5 text-destructive-text",fieldsetContent:"mt-3 grid min-w-0 gap-3",stepsRoot:"m-0 min-w-0 list-none p-0 text-foreground",stepsHorizontal:"flex w-full max-w-full items-start overflow-x-auto pb-2",stepsVertical:"grid",stepsItem:"relative min-w-0",stepsItemHorizontal:"flex min-w-52 flex-1 items-start",stepsItemVertical:"pb-6 last:pb-0",stepsTrigger:"flex min-w-0 flex-1 items-start gap-3 rounded-md border-0 bg-transparent p-1 text-start text-inherit",stepsTriggerInteractive:"cursor-pointer hover:bg-accent/50 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",stepsTriggerDisabled:"!cursor-not-allowed opacity-60",stepsIndicator:"relative z-[1] inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full border text-xs font-semibold",stepsIndicatorPending:"border-border bg-background text-muted-foreground",stepsIndicatorCurrent:"border-primary/50 bg-primary/10 text-primary",stepsIndicatorCompleted:"border-primary bg-primary text-primary-foreground",stepsIndicatorError:"border-destructive bg-destructive text-destructive-foreground",stepsContent:"grid min-w-0 gap-1 pt-0.5",stepsLabel:"min-w-0 break-words text-sm font-medium leading-5",stepsDescription:"min-w-0 break-words text-sm leading-5 text-muted-foreground",stepsStatus:"sr-only",stepsConnector:"shrink-0 bg-border",stepsConnectorHorizontal:"mt-3.5 h-px w-8",stepsConnectorVertical:"absolute bottom-0 top-8 start-3.5 w-px -translate-x-1/2",stepsConnectorCompleted:"bg-primary/60",stepsConnectorError:"bg-destructive/60",scrollAreaViewport:"min-h-0 min-w-0",numberInputControl:"tabular-nums",numberInputStepControls:"me-1 flex shrink-0 self-stretch overflow-hidden border-s border-border",numberInputStepButton:"flex min-h-6 w-7 cursor-pointer items-center justify-center border-0 bg-transparent px-1 text-xs leading-none text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:z-[1] focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:!cursor-not-allowed disabled:opacity-40",passwordInputControl:"pe-2",passwordInputToggle:"me-1 inline-flex min-h-7 shrink-0 cursor-pointer items-center justify-center rounded px-2 text-xs font-medium text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:!cursor-not-allowed disabled:opacity-40",inputGroupRoot:l("relative flex min-w-0 items-stretch overflow-hidden rounded-md border border-border bg-background text-foreground focus-within:border-primary/50 focus-within:ring-2 focus-within:ring-ring/30",yt),inputGroupInvalid:"border-destructive/55 focus-within:border-destructive/70 focus-within:ring-destructive/25",inputGroupDisabled:"!cursor-not-allowed bg-muted/35",inputGroupContent:"flex min-w-0 flex-1 items-stretch [&>*]:min-w-0",inputGroupStartElement:"inline-flex shrink-0 items-center justify-center ps-3 pe-1 text-foreground/75",inputGroupEndElement:"inline-flex shrink-0 items-center justify-center ps-1 pe-3 text-foreground/75",inputGroupStartAddon:"inline-flex max-w-[min(40%,16rem)] shrink-0 items-center overflow-hidden border-e border-border bg-muted/60 px-3 text-sm text-foreground/75 text-ellipsis whitespace-nowrap [&>*]:min-w-0",inputGroupEndAddon:"inline-flex max-w-[min(40%,16rem)] shrink-0 items-center overflow-hidden border-s border-border bg-muted/60 px-3 text-sm text-foreground/75 text-ellipsis whitespace-nowrap [&>*]:min-w-0",panelRoot:l("group relative flex min-w-0 flex-col overflow-hidden rounded-lg border border-border/70 bg-background",Zt),panelInteractive:"cursor-pointer hover:shadow-md",panelSelected:"border-primary/45 bg-primary/5",panelDisabled:"!cursor-not-allowed opacity-60",panelMedia:"shrink-0 overflow-hidden",panelHeader:"min-w-0 p-token-lg",panelTitle:"min-w-0 truncate text-sm font-semibold leading-none text-foreground",panelDescription:"mt-1 text-sm leading-5 text-foreground/75",panelBody:"min-w-0 px-token-lg pb-token-lg text-sm text-foreground",panelBodyStandalone:"pt-token-lg",panelFooter:"shrink-0 border-t border-border/60 px-token-lg py-token-md",stateRoot:l("flex min-h-48 flex-col items-center justify-center rounded-lg border border-border/70 bg-background px-6 py-10 text-center",yt),stateIcon:"mb-token-lg flex h-12 w-12 items-center justify-center rounded-full bg-muted text-muted-foreground motion-safe:animate-in motion-safe:fade-in",stateTitle:"text-sm font-semibold text-foreground",stateDescription:"mt-2 max-w-md text-sm leading-6 text-muted-foreground",stateActions:"mt-token-xl flex flex-wrap items-center justify-center gap-token-sm",loadingSpinner:"h-5 w-5 motion-safe:animate-spin motion-reduce:animate-none",fieldRoot:"grid min-w-0 gap-token-md",fieldLabelRow:"flex min-w-0 items-center justify-between gap-token-md",fieldLabel:"min-w-0 text-sm font-medium leading-none text-foreground",fieldRequired:"text-destructive-text",fieldDescription:"text-sm leading-5 text-muted-foreground",fieldMessage:"text-sm leading-5 text-muted-foreground",fieldControl:"min-w-0",controlWrapper:l("relative flex min-w-0 items-center rounded-md border border-border bg-background text-foreground focus-within:border-primary/35",yt),controlBase:"min-w-0 flex-1 bg-transparent px-3 text-sm text-foreground outline-hidden placeholder:text-muted-foreground disabled:!cursor-not-allowed",controlInput:"h-9",controlTextarea:"min-h-24 resize-y py-2 leading-6",controlSelect:"h-9 cursor-pointer appearance-none pr-9 disabled:!cursor-not-allowed",controlIcon:"pointer-events-none ml-3 inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground",controlTrailing:"mr-3 inline-flex shrink-0 items-center justify-center text-muted-foreground",controlInvalid:"border-destructive/45 focus-within:border-destructive/60",controlDisabled:"!cursor-not-allowed opacity-60",controlReadOnly:"bg-muted/35",selectChevron:l("pointer-events-none absolute right-3 top-1/2 h-2 w-2 -translate-y-1/2 rotate-45 border-b border-r border-current text-muted-foreground",ga),selectMenu:"absolute left-0 right-0 top-[calc(100%+0.375rem)] z-50 max-h-60 overflow-auto rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg outline-hidden",selectOption:l("flex min-h-8 w-full min-w-0 cursor-pointer items-center rounded-sm px-2.5 py-1.5 text-left text-sm text-foreground",Zt),selectOptionActive:"bg-accent text-accent-foreground",selectOptionSelected:"bg-primary/10 text-primary",selectOptionDisabled:"!cursor-not-allowed opacity-50",selectPlaceholder:"text-muted-foreground",selectNative:"sr-only",switchRoot:"inline-flex min-w-0 cursor-pointer items-start gap-3",switchInput:"sr-only",switchTrack:l("relative mt-0.5 inline-flex h-6 w-10 shrink-0 items-center rounded-full border border-border bg-muted focus-within:border-primary/35",yt),switchThumb:l("h-4 w-4 translate-x-1 rounded-full bg-background shadow-sm",ga),switchChecked:"border-primary/40 bg-primary/80 text-primary-foreground",switchDisabled:"!cursor-not-allowed opacity-60",switchContent:"grid min-w-0 gap-1",switchLabel:"text-sm font-medium leading-none text-foreground",switchDescription:"text-sm leading-5 text-muted-foreground",checkboxRoot:"inline-flex min-w-0 cursor-pointer items-start gap-3",checkboxInput:"sr-only",checkboxBox:l("mt-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border border-border bg-background text-primary focus-within:border-primary/40",yt),checkboxBoxChecked:"border-primary/45 bg-primary text-primary-foreground",checkboxBoxInvalid:"border-destructive/50",checkboxIndicator:"text-xs font-bold leading-none",checkboxDisabled:"!cursor-not-allowed opacity-60",checkboxContent:"grid min-w-0 gap-1",checkboxLabel:"text-sm font-medium leading-none text-foreground",checkboxDescription:"text-sm leading-5 text-muted-foreground",radioGroupRoot:"grid min-w-0 gap-2",radioOption:l("inline-flex min-w-0 cursor-pointer items-start gap-3 rounded-md border border-border/60 bg-background px-3 py-2 text-sm",Zt,"hover:bg-muted/35"),radioInput:"sr-only",radioMarker:l("mt-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full border border-border bg-background text-primary focus-within:border-primary/40",yt),radioMarkerChecked:"border-primary/50 bg-primary/10",radioIndicator:"h-2 w-2 rounded-full bg-primary",radioOptionDisabled:"!cursor-not-allowed opacity-60 hover:bg-background",radioContent:"grid min-w-0 gap-1",radioLabel:"text-sm font-medium leading-none text-foreground",radioDescription:"text-sm leading-5 text-muted-foreground",dialogRoot:"relative",dialogTrigger:"",dialogTriggerDisabled:"!cursor-not-allowed opacity-60",dialogOverlay:"fixed inset-0 z-50 bg-background/70 backdrop-blur-sm motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out",dialogContent:"pointer-events-none fixed inset-0 z-50 flex min-h-0 items-center justify-center p-4",dialogPanel:l("pointer-events-auto relative flex max-h-[min(85vh,720px)] w-full max-w-lg min-w-0 flex-col overflow-hidden rounded-lg border border-border/70 bg-background text-foreground shadow-xl","motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95 motion-safe:duration-300 motion-safe:ease-out"),dialogHeader:"grid min-w-0 gap-1 border-b border-border/60 px-5 py-4",dialogTitle:"min-w-0 pr-8 text-base font-semibold leading-6 text-foreground",dialogDescription:"text-sm leading-6 text-muted-foreground",dialogBody:"min-h-0 min-w-0 overflow-auto px-5 py-4 text-sm text-foreground",dialogFooter:"flex shrink-0 flex-wrap items-center justify-end gap-2 border-t border-border/60 px-5 py-4",dialogClose:l("absolute right-3 top-3 inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-muted-foreground hover:bg-muted/60 hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30",Zt),dropdownRoot:"relative inline-flex min-w-0",dropdownTrigger:"",dropdownTriggerDisabled:"!cursor-not-allowed opacity-60",dropdownMenu:"z-50 min-w-48 overflow-hidden rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out",dropdownMenuTop:"bottom-[calc(100%+0.375rem)] top-auto",dropdownMenuEnd:"left-auto right-0",dropdownLabel:"px-2.5 py-1.5 text-xs font-semibold uppercase tracking-[0.12em] text-muted-foreground",dropdownSeparator:"my-1 h-px bg-border/70",dropdownItem:l("flex min-w-0 cursor-pointer items-center gap-2 rounded-sm px-2.5 py-2 text-left text-sm text-foreground hover:bg-accent/60 focus:bg-accent/60 data-[highlighted]:bg-accent/60 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30",Zt),dropdownItemDanger:"text-destructive-text hover:bg-destructive/10 focus:bg-destructive/10 data-[highlighted]:bg-destructive/10",dropdownItemDisabled:"!cursor-not-allowed opacity-50 hover:bg-transparent focus:bg-transparent data-[highlighted]:bg-transparent",dropdownItemIcon:"inline-flex h-4 w-4 shrink-0 items-center justify-center",dropdownItemContent:"grid min-w-0 flex-1 gap-0.5",dropdownItemLabel:"min-w-0 truncate",dropdownItemDescription:"min-w-0 truncate text-xs leading-4 text-muted-foreground",dropdownItemShortcut:"ml-3 shrink-0 text-xs font-medium text-muted-foreground",tooltipRoot:"relative inline-flex min-w-0",tooltipTrigger:"inline-flex min-w-0",tooltipContent:"pointer-events-none z-50 max-w-xs rounded-md border border-border bg-popover px-2.5 py-1.5 text-xs leading-5 text-popover-foreground shadow-lg motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out",noticeBase:l("flex min-w-0 gap-3 rounded-lg border px-4 py-3 text-sm",yt,"motion-safe:animate-in motion-safe:fade-in"),noticeDefault:"border-border bg-background text-foreground",noticePrimary:"border-primary/25 bg-primary/10 text-primary",noticeSuccess:"border-[hsl(var(--success,142_72%_29%)_/_0.30)] bg-[hsl(var(--success,142_72%_29%)_/_0.10)] text-foreground",noticeWarning:"border-[hsl(var(--warning,45_93%_47%)_/_0.30)] bg-[hsl(var(--warning,45_93%_47%)_/_0.10)] text-[hsl(var(--warning-foreground,28_73%_26%))]",noticeDanger:"border-destructive/30 bg-destructive/10 text-destructive-text",noticeMuted:"border-border/60 bg-muted/35 text-muted-foreground",noticeIcon:"mt-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center motion-safe:animate-in motion-safe:fade-in",noticeTitle:"font-semibold leading-5",noticeDescription:"leading-6",noticeActions:"mt-3 flex flex-wrap items-center gap-2",dividerRoot:l("shrink-0 border-border/70",yt),dividerLabel:"mx-3 shrink-0 text-xs font-medium uppercase tracking-[0.12em] text-muted-foreground motion-safe:animate-in motion-safe:fade-in",sectionHeaderRoot:"flex min-w-0 flex-wrap items-start justify-between gap-token-md motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out",sectionHeaderContent:"grid min-w-0 gap-1",sectionHeaderEyebrow:"text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground",sectionHeaderTitle:"text-base font-semibold leading-6 text-foreground",sectionHeaderDescription:"max-w-2xl text-sm leading-6 text-muted-foreground",sectionHeaderActions:"flex shrink-0 flex-wrap items-center gap-2",tabsRoot:"grid min-w-0 gap-token-md",tabsList:l("inline-flex min-w-0 flex-wrap items-center gap-token-xs rounded-lg border border-border/70 bg-muted/30 p-token-xs",yt),tabsTrigger:l("inline-flex min-w-0 cursor-pointer items-center justify-center rounded-md px-3 py-1.5 text-sm font-medium text-muted-foreground hover:bg-background/70 hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:ring-offset-1 motion-reduce:transition-none",Zt),tabsTriggerActive:"bg-background text-foreground shadow-sm",tabsTriggerDisabled:"!cursor-not-allowed opacity-50 hover:bg-transparent",tabsPanel:"min-w-0 rounded-lg border border-border/70 bg-background p-4 text-sm text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30 motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out motion-reduce:transition-none",segmentedRoot:l("inline-flex min-w-0 items-center gap-1 rounded-lg border border-border/70 bg-muted/30 p-1",yt),segmentedItem:l("inline-flex min-w-0 cursor-pointer items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium text-muted-foreground hover:bg-background/70 hover:text-foreground focus-visible:outline-hidden",Zt),segmentedItemActive:"bg-background text-foreground shadow-sm",segmentedItemDisabled:"!cursor-not-allowed opacity-50 hover:bg-transparent",progressRoot:"grid min-w-0 gap-2",progressTrack:"h-2 w-full overflow-hidden rounded-full bg-muted",progressIndicator:"h-full rounded-full bg-primary motion-safe:transition-[width] motion-safe:duration-500 motion-safe:ease-out",progressLabelRow:"flex min-w-0 items-center justify-between gap-3",progressLabel:"min-w-0 truncate text-sm font-medium text-foreground",progressValue:"shrink-0 text-xs font-medium text-muted-foreground",skeletonRoot:"relative overflow-hidden rounded-md bg-muted/70",avatarRoot:"relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full border border-border bg-muted text-sm font-semibold text-muted-foreground motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",avatarImage:"h-full w-full object-cover",avatarFallback:"flex h-full w-full items-center justify-center bg-muted text-foreground",avatarStatus:"absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-muted-foreground motion-safe:animate-pulse",avatarText:"min-w-0 truncate text-sm font-medium text-foreground",toolbarRoot:l("flex min-w-0 flex-wrap items-center justify-between gap-token-md rounded-lg border border-border/70 bg-background px-token-lg py-token-md",yt),toolbarLeading:"flex min-w-0 items-center gap-token-md",toolbarTitle:"min-w-0 truncate text-sm font-semibold text-foreground",toolbarDescription:"mt-0.5 text-sm leading-5 text-muted-foreground",toolbarContent:"min-w-0 flex-1",toolbarActions:"flex shrink-0 flex-wrap items-center gap-token-sm",breadcrumbRoot:"min-w-0 text-sm text-muted-foreground",breadcrumbList:"flex min-w-0 flex-wrap items-center gap-1.5",breadcrumbItem:"inline-flex min-w-0 items-center gap-1.5",breadcrumbLink:"min-w-0 cursor-pointer truncate text-muted-foreground hover:text-foreground disabled:!cursor-not-allowed disabled:opacity-50 aria-disabled:!cursor-not-allowed aria-disabled:opacity-50 aria-disabled:hover:text-muted-foreground motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",breadcrumbCurrent:"min-w-0 truncate font-medium text-foreground",breadcrumbSeparator:"shrink-0 text-muted-foreground/70",paginationRoot:"flex min-w-0 flex-wrap items-center justify-between gap-3 text-sm",paginationInfo:"min-w-0 text-muted-foreground",paginationControls:"flex min-w-0 flex-wrap items-center justify-end gap-1.5",paginationButton:"inline-flex h-8 min-w-8 cursor-pointer items-center justify-center whitespace-nowrap rounded-md border border-border bg-background px-2.5 text-sm font-medium text-foreground hover:bg-accent/60 disabled:!cursor-not-allowed disabled:opacity-50 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",paginationButtonDisabled:"!cursor-not-allowed opacity-50",paginationPage:"inline-flex h-8 min-w-8 cursor-default items-center justify-center rounded-md bg-muted/50 px-2.5 text-sm font-medium text-foreground hover:bg-muted/50",paginationEllipsis:"inline-flex h-8 min-w-6 items-center justify-center px-1 text-sm text-muted-foreground",descriptionListRoot:"grid min-w-0 gap-3 text-sm",descriptionListItem:"grid min-w-0 gap-1 rounded-md border border-border/60 bg-background px-3 py-2 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out hover:shadow-sm",descriptionListTerm:"min-w-0 truncate text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",descriptionListValue:"min-w-0 text-sm leading-6 text-foreground",accordionRoot:"grid min-w-0 gap-2",accordionItem:"overflow-hidden rounded-lg border border-border/70 bg-background motion-safe:transition motion-safe:duration-300 motion-safe:ease-out motion-reduce:transition-none",accordionTrigger:"flex w-full min-w-0 cursor-pointer items-center justify-between gap-3 px-4 py-3 text-start text-sm font-medium text-foreground hover:bg-muted/40 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:!cursor-not-allowed disabled:opacity-50 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out motion-reduce:transition-none",accordionTriggerIcon:l("h-2 w-2 shrink-0 rotate-45 border-b border-r border-current text-muted-foreground",ga,"motion-reduce:transition-none"),accordionPanel:"border-t border-border/60 px-4 py-3 text-sm leading-6 text-muted-foreground motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out motion-reduce:animate-none",menuTrigger:"inline-flex min-w-0",menuContent:"z-50 min-w-44 overflow-hidden rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg outline-hidden motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95 motion-safe:duration-300 motion-safe:ease-out",menuLabel:"px-2 py-1.5 text-xs font-medium text-muted-foreground",menuSeparator:"-mx-1 my-1 h-px bg-border",menuItem:l("relative flex min-h-8 min-w-0 cursor-pointer select-none items-center gap-2 rounded-sm px-2.5 py-1.5 text-sm text-foreground outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:!cursor-not-allowed data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",Zt),menuItemDefault:"text-foreground",menuItemPrimary:"text-primary focus:text-primary data-[highlighted]:text-primary",menuItemSuccess:"text-[hsl(var(--success,142_72%_29%))] focus:text-[hsl(var(--success,142_72%_29%))] data-[highlighted]:text-[hsl(var(--success,142_72%_29%))]",menuItemWarning:"text-[hsl(var(--warning-foreground,28_73%_26%))] focus:text-[hsl(var(--warning-foreground,28_73%_26%))] data-[highlighted]:text-[hsl(var(--warning-foreground,28_73%_26%))]",menuItemDanger:"text-destructive-text focus:text-destructive-text data-[highlighted]:text-destructive-text",menuItemMuted:"text-muted-foreground focus:text-foreground data-[highlighted]:text-foreground",menuItemDisabled:"!cursor-not-allowed opacity-50 data-[disabled]:pointer-events-none",menuItemIcon:"inline-flex h-4 w-4 shrink-0 items-center justify-center",menuItemLabel:"min-w-0 flex-1 truncate",menuItemShortcut:"ml-4 shrink-0 text-xs font-medium text-muted-foreground",menuCheckboxIndicator:"absolute left-2 inline-flex h-4 w-4 items-center justify-center text-current",menuRadioIndicator:"absolute left-2 inline-flex h-4 w-4 items-center justify-center text-current",menuSubTrigger:l("relative flex min-h-8 min-w-0 cursor-pointer select-none items-center gap-2 rounded-sm px-2.5 py-1.5 text-sm text-foreground outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:!cursor-not-allowed data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",Zt),menuSubTriggerIcon:"ml-auto inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground",menuSubContent:"z-50 min-w-40 overflow-hidden rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg outline-hidden motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95 motion-safe:duration-300 motion-safe:ease-out",tableContainer:l("relative isolate min-w-0 overflow-auto rounded-lg border border-border/70 bg-background/95 bg-clip-padding [scrollbar-gutter:stable]","[--base-table-header-height:2.75rem] [--base-table-split-scrollbar-gutter:0.75rem]","[--base-table-sticky-header-bg:hsl(var(--background))] [--base-table-header-separator:hsl(var(--border)_/_0.7)]",rd,yt),tableContainerFooterAttached:"!rounded-b-none !shadow-none",tableRoot:"w-full caption-bottom border-separate border-spacing-0 text-sm text-foreground",tableCaption:"mt-3 text-sm text-muted-foreground",tableHeader:l("relative z-[2] bg-transparent [&_tr]:bg-transparent",mp),tableBody:"[&_tr:last-child>*]:border-b-0",tableFooter:"bg-muted/30 font-medium [&_tr>*]:border-t [&_tr>*]:border-border/70",tableFooterBar:l("flex min-w-0 flex-wrap items-center justify-between gap-3 rounded-lg border border-border/70 bg-muted/20 px-4 py-3 text-sm text-foreground shadow-none",yt),tableFooterBarAttached:"-mt-px rounded-t-none border-t border-border/70 shadow-none",tableFooterBarLeading:"flex min-w-0 items-center gap-2",tableFooterBarContent:"min-w-0 flex-1",tableFooterBarActions:"ms-auto flex shrink-0 flex-wrap items-center gap-2",tableSplitRoot:"grid w-full min-w-0 grid-cols-[minmax(0,1fr)] grid-rows-[auto_minmax(0,1fr)_auto] caption-bottom border-separate border-spacing-0 text-sm text-foreground",tableSplitHeader:"block w-full min-w-0 shrink-0 overflow-x-hidden overflow-y-hidden bg-transparent",tableSplitBody:l("block min-h-0 w-full min-w-0 max-w-full justify-self-stretch overflow-auto [scrollbar-gutter:stable]",rd),tableSplitFooter:"block w-full min-w-0 shrink-0 overflow-x-hidden overflow-y-hidden",tableSplitRow:"grid w-max min-w-full [grid-template-columns:var(--base-table-column-template)]",tableSplitHead:"flex min-w-0 overflow-hidden",tableSplitCell:"block min-w-0 overflow-hidden [overflow-wrap:anywhere]",tableRow:l("[&>*]:border-b [&>*]:border-border/60 data-[state=selected]:bg-primary/5 data-[state=selected]:[&>*]:bg-primary/5",yt),tableRowInteractive:"cursor-pointer [--base-table-row-hover-bg:hsl(var(--muted)_/_0.35)] hover:bg-[var(--base-table-row-hover-bg)] hover:[&>td]:bg-[var(--base-table-row-hover-bg)] hover:[&>th]:bg-[var(--base-table-row-hover-bg)]",tableRowSelected:"bg-primary/5 [&>*]:bg-primary/5",tableRowDisabled:"!cursor-not-allowed opacity-60",tableHead:"relative h-11 whitespace-nowrap px-3 py-2 text-left align-middle text-xs font-semibold text-muted-foreground shadow-[inset_0_-1px_0_var(--base-table-header-separator)]",tableHeadContent:"flex min-w-0 items-center justify-between gap-2",tableHeadMain:"flex min-w-0 items-center gap-2",tableHeadIcon:"inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground",tableHeadText:"grid min-w-0 gap-0.5",tableHeadLabel:"min-w-0 truncate text-xs font-semibold leading-4 text-foreground",tableHeadDescription:"min-w-0 truncate text-xs font-normal leading-4 text-muted-foreground",tableHeadMeta:"shrink-0 text-xs font-medium text-muted-foreground",tableHeadActions:"flex shrink-0 items-center gap-1",tableHeadSortButton:l("inline-flex min-w-0 cursor-pointer items-center gap-1 rounded-sm text-left focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30 disabled:!cursor-not-allowed disabled:opacity-60",yt),tableHeadSortIcon:l("inline-flex h-3 w-3 shrink-0 items-center justify-center text-muted-foreground",ga),tableHeadDragHandle:l("inline-flex h-5 w-4 shrink-0 cursor-grab items-center justify-center rounded-sm text-muted-foreground hover:bg-muted active:cursor-grabbing focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30 disabled:!cursor-not-allowed disabled:opacity-50",yt),tableHeadResizeHandle:l("absolute end-0 top-1/2 h-7 w-2 -translate-y-1/2 cursor-col-resize touch-none rounded-sm after:absolute after:start-1/2 after:top-1/2 after:h-5 after:w-px after:-translate-x-1/2 after:-translate-y-1/2 after:bg-border hover:after:bg-primary focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30 disabled:!cursor-not-allowed disabled:opacity-50",yt),tableCell:"min-w-0 px-3 py-2 align-middle text-sm text-foreground [overflow-wrap:anywhere]",tableCellAlignCenter:"text-center",tableCellAlignRight:"text-right",tableEmptyRow:"[&>*]:border-b [&>*]:border-border/60",tableEmptyCell:"px-4 py-10 text-center",tableEmptyContent:"mx-auto flex max-w-md flex-col items-center justify-center text-center",tableEmptyIcon:"mb-3 flex h-10 w-10 items-center justify-center rounded-full bg-muted text-muted-foreground",tableEmptyTitle:"text-sm font-semibold text-foreground",tableEmptyDescription:"mt-1 text-sm leading-6 text-muted-foreground",tableEmptyActions:"mt-4 flex flex-wrap items-center justify-center gap-2",tableLoadingRow:"[&>*]:border-b [&>*]:border-border/60",tableLoadingCell:"px-3 py-2",tableLoadingSkeleton:"h-4 w-full rounded-md bg-muted/70",layoutRoot:l("grid min-w-0 overflow-hidden grid-rows-[auto_minmax(0,1fr)_auto] gap-3 rounded-lg border border-border/70 bg-background p-3 text-foreground",yt),layoutRootFull:"h-full min-h-0",layoutHeader:"min-w-0",layoutBody:"grid min-h-0 min-w-0 overflow-hidden gap-token-md",layoutSidebar:"min-h-0 min-w-0 overflow-hidden",layoutMain:"min-h-0 min-w-0 overflow-hidden",layoutAside:"min-h-0 min-w-0 overflow-hidden",layoutFooter:"min-w-0",layoutPane:l("h-full max-h-full min-h-0 min-w-0 overflow-hidden rounded-lg bg-background text-foreground",yt),layoutPaneScrollable:"overflow-auto",layoutPaneBordered:"border border-border/70",layoutPaneMuted:"bg-muted/25",layoutPaneSoft:"bg-background/95 shadow-sm",layoutPaneTransparent:"bg-transparent shadow-none",layoutSplitRoot:"grid min-h-0 min-w-0 overflow-hidden",layoutSplitHorizontal:"grid-flow-col",layoutSplitVertical:"grid-flow-row",layoutSplitPane:"min-h-0 min-w-0 overflow-hidden",layoutSplitPrimary:"",layoutSplitSecondary:"",layoutResizeHandle:l("group/resize relative z-10 flex shrink-0 items-center justify-center bg-transparent text-muted-foreground hover:bg-border/60 active:bg-border/70 focus-visible:bg-border/60 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30",Zt),layoutResizeHandleHorizontal:"w-2 cursor-col-resize",layoutResizeHandleVertical:"h-2 cursor-row-resize",layoutResizeHandleDisabled:"cursor-default opacity-60",layoutResizeHandleIndicator:"rounded-full bg-muted-foreground/45 group-hover/resize:bg-primary/70"},pp={compact:{buttonBase:"h-8 px-2.5 text-xs",buttonIconOnly:"h-8 w-8 px-0",badgeBase:"px-1.5 py-0 text-xs",panelHeader:"p-token-md",panelBody:"px-token-md pb-token-md text-xs",panelBodyStandalone:"pt-token-md",panelFooter:"px-token-md py-token-md",stateRoot:"min-h-36 px-4 py-7",stateIcon:"mb-3 h-10 w-10",fieldRoot:"gap-token-sm",fieldLabel:"text-xs",fieldDescription:"text-xs leading-5",fieldMessage:"text-xs leading-5",controlInput:"h-8 text-xs",controlTextarea:"min-h-20 text-xs",controlSelect:"h-8 text-xs",selectMenu:"text-xs",selectOption:"min-h-7 px-2 py-1 text-xs",switchTrack:"h-5 w-9",switchThumb:"h-3.5 w-3.5",checkboxBox:"h-3.5 w-3.5",checkboxLabel:"text-xs",checkboxDescription:"text-xs leading-5",radioOption:"px-2 py-1.5 text-xs",radioMarker:"h-3.5 w-3.5",radioIndicator:"h-1.5 w-1.5",radioLabel:"text-xs",radioDescription:"text-xs leading-5",dialogPanel:"max-w-md",dialogHeader:"px-4 py-3",dialogTitle:"text-sm leading-5",dialogDescription:"text-xs leading-5",dialogBody:"px-4 py-3 text-xs",dialogFooter:"px-4 py-3",dropdownMenu:"min-w-44 text-xs",dropdownItem:"px-2 py-1.5 text-xs",tooltipContent:"text-xs leading-4",noticeBase:"px-3 py-2 text-xs",dividerLabel:"text-xs",sectionHeaderRoot:"gap-token-sm",sectionHeaderTitle:"text-sm leading-5",sectionHeaderDescription:"text-xs leading-5",tabsList:"gap-token-xs p-token-xs",tabsTrigger:"px-2 py-1 text-xs",tabsPanel:"p-3 text-xs",segmentedRoot:"gap-token-xs p-token-xs",segmentedItem:"px-2 py-1 text-xs",progressTrack:"h-1.5",avatarRoot:"text-xs",toolbarRoot:"gap-token-sm px-token-md py-token-md",toolbarTitle:"text-xs",toolbarDescription:"text-xs leading-5",paginationButton:"h-7 min-w-7 px-2 text-xs",paginationPage:"h-7 min-w-7 px-2 text-xs",descriptionListRoot:"gap-2 text-xs",descriptionListItem:"px-2 py-1.5",descriptionListTerm:"text-xs",descriptionListValue:"text-xs leading-5",accordionTrigger:"px-3 py-2 text-xs",accordionPanel:"px-3 py-2 text-xs leading-5",menuContent:"min-w-40 p-0.5 text-xs",menuSubContent:"min-w-36 p-0.5 text-xs",menuLabel:"px-2 py-1 text-xs",menuItem:"min-h-7 px-2 py-1 text-xs",menuSubTrigger:"min-h-7 px-2 py-1 text-xs",menuItemShortcut:"text-xs",tableContainer:"[--base-table-header-height:2.25rem]",tableHead:"h-9 px-2 py-1.5 text-xs",tableCell:"px-2 py-1.5 text-xs",tableHeadLabel:"text-xs",tableHeadDescription:"text-xs leading-3",tableLoadingCell:"px-2 py-1.5",layoutRoot:"gap-token-md p-token-md",layoutBody:"gap-token-md",layoutPane:"rounded-md text-xs",layoutResizeHandleHorizontal:"w-1.5",layoutResizeHandleVertical:"h-1.5"},default:{buttonBase:"h-9"},comfortable:{buttonBase:"h-10 px-3.5",buttonIconOnly:"h-10 w-10 px-0",badgeBase:"px-2.5 py-1",panelHeader:"p-token-xl",panelBody:"px-token-xl pb-token-xl",panelBodyStandalone:"pt-token-xl",panelFooter:"px-token-xl py-token-lg",stateRoot:"min-h-56 px-8 py-12",stateIcon:"mb-5 h-14 w-14",fieldRoot:"gap-token-md",controlInput:"h-10",controlTextarea:"min-h-28",controlSelect:"h-10",selectMenu:"p-1.5",selectOption:"min-h-9 px-3 py-2",switchTrack:"h-7 w-12",switchThumb:"h-5 w-5",checkboxBox:"h-5 w-5",radioOption:"px-4 py-3",radioMarker:"h-5 w-5",radioIndicator:"h-2.5 w-2.5",dialogPanel:"max-w-xl",dialogHeader:"px-6 py-5",dialogBody:"px-6 py-5",dialogFooter:"px-6 py-5",dropdownMenu:"min-w-56",dropdownItem:"px-3 py-2.5",noticeBase:"px-5 py-4",sectionHeaderTitle:"text-lg leading-7",tabsTrigger:"px-3.5 py-2",tabsPanel:"p-5",segmentedItem:"px-3.5 py-2",progressTrack:"h-2.5",toolbarRoot:"px-token-xl py-token-lg",paginationButton:"h-9 min-w-9 px-3",paginationPage:"h-9 min-w-9 px-3",descriptionListItem:"px-4 py-3",accordionTrigger:"px-5 py-4",accordionPanel:"px-5 py-4",menuContent:"min-w-48 p-1.5",menuSubContent:"min-w-44 p-1.5",menuItem:"min-h-9 px-3 py-2",menuSubTrigger:"min-h-9 px-3 py-2",tableContainer:"[--base-table-header-height:3rem]",tableHead:"h-12 px-4 py-3",tableCell:"px-4 py-3",tableLoadingCell:"px-4 py-3",layoutRoot:"gap-token-lg p-token-lg",layoutBody:"gap-token-lg",layoutPane:"rounded-xl",layoutResizeHandleHorizontal:"w-2.5",layoutResizeHandleVertical:"h-2.5"}},gp={none:{buttonBase:"rounded-none",badgeBase:"rounded-none",panelRoot:"rounded-none",stateRoot:"rounded-none",stateIcon:"rounded-none",controlWrapper:"rounded-none",selectMenu:"rounded-none",selectOption:"rounded-none",switchTrack:"rounded-none",switchThumb:"rounded-none",checkboxBox:"rounded-none",radioOption:"rounded-none",dialogPanel:"rounded-none",dialogClose:"rounded-none",dropdownMenu:"rounded-none",dropdownItem:"rounded-none",tooltipContent:"rounded-none",noticeBase:"rounded-none",tabsList:"rounded-none",tabsTrigger:"rounded-none",tabsPanel:"rounded-none",segmentedRoot:"rounded-none",segmentedItem:"rounded-none",progressTrack:"rounded-none",progressIndicator:"rounded-none",skeletonRoot:"rounded-none",avatarRoot:"rounded-none",avatarStatus:"rounded-none",toolbarRoot:"rounded-none",paginationButton:"rounded-none",paginationPage:"rounded-none",descriptionListItem:"rounded-none",accordionItem:"rounded-none",menuContent:"rounded-none",menuItem:"rounded-none",menuSubTrigger:"rounded-none",menuSubContent:"rounded-none",tableContainer:"rounded-none",tableEmptyIcon:"rounded-none",tableLoadingSkeleton:"rounded-none",layoutRoot:"rounded-none",layoutPane:"rounded-none"},sm:{buttonBase:"rounded-sm",badgeBase:"rounded-sm",panelRoot:"rounded-sm",stateRoot:"rounded-sm",stateIcon:"rounded-sm",controlWrapper:"rounded-sm",selectMenu:"rounded-sm",selectOption:"rounded-sm",switchTrack:"rounded-sm",switchThumb:"rounded-sm",checkboxBox:"rounded-sm",radioOption:"rounded-sm",dialogPanel:"rounded-sm",dialogClose:"rounded-sm",dropdownMenu:"rounded-sm",dropdownItem:"rounded-sm",tooltipContent:"rounded-sm",noticeBase:"rounded-sm",tabsList:"rounded-sm",tabsTrigger:"rounded-sm",tabsPanel:"rounded-sm",segmentedRoot:"rounded-sm",segmentedItem:"rounded-sm",progressTrack:"rounded-sm",progressIndicator:"rounded-sm",skeletonRoot:"rounded-sm",avatarRoot:"rounded-sm",avatarStatus:"rounded-sm",toolbarRoot:"rounded-sm",paginationButton:"rounded-sm",paginationPage:"rounded-sm",descriptionListItem:"rounded-sm",accordionItem:"rounded-sm",menuContent:"rounded-sm",menuItem:"rounded-sm",menuSubTrigger:"rounded-sm",menuSubContent:"rounded-sm",tableContainer:"rounded-sm",tableEmptyIcon:"rounded-sm",tableLoadingSkeleton:"rounded-sm",layoutRoot:"rounded-sm",layoutPane:"rounded-sm"},md:{},lg:{buttonBase:"rounded-lg",badgeBase:"rounded-lg",panelRoot:"rounded-xl",stateRoot:"rounded-xl",stateIcon:"rounded-xl",controlWrapper:"rounded-lg",selectMenu:"rounded-lg",selectOption:"rounded-md",switchTrack:"rounded-full",switchThumb:"rounded-full",checkboxBox:"rounded-md",radioOption:"rounded-xl",dialogPanel:"rounded-xl",dialogClose:"rounded-lg",dropdownMenu:"rounded-lg",dropdownItem:"rounded-md",tooltipContent:"rounded-md",noticeBase:"rounded-xl",tabsList:"rounded-xl",tabsTrigger:"rounded-lg",tabsPanel:"rounded-xl",segmentedRoot:"rounded-xl",segmentedItem:"rounded-lg",skeletonRoot:"rounded-lg",toolbarRoot:"rounded-xl",descriptionListItem:"rounded-lg",accordionItem:"rounded-xl",menuContent:"rounded-lg",menuItem:"rounded-md",menuSubTrigger:"rounded-md",menuSubContent:"rounded-lg",tableContainer:"rounded-xl",tableEmptyIcon:"rounded-xl",tableLoadingSkeleton:"rounded-lg",layoutRoot:"rounded-xl",layoutPane:"rounded-xl"},xl:{buttonBase:"rounded-xl",badgeBase:"rounded-xl",panelRoot:"rounded-2xl",stateRoot:"rounded-2xl",stateIcon:"rounded-2xl",controlWrapper:"rounded-xl",selectMenu:"rounded-xl",selectOption:"rounded-lg",switchTrack:"rounded-full",switchThumb:"rounded-full",checkboxBox:"rounded-lg",radioOption:"rounded-2xl",dialogPanel:"rounded-2xl",dialogClose:"rounded-xl",dropdownMenu:"rounded-xl",dropdownItem:"rounded-lg",tooltipContent:"rounded-lg",noticeBase:"rounded-2xl",tabsList:"rounded-2xl",tabsTrigger:"rounded-xl",tabsPanel:"rounded-2xl",segmentedRoot:"rounded-2xl",segmentedItem:"rounded-xl",skeletonRoot:"rounded-xl",toolbarRoot:"rounded-2xl",paginationButton:"rounded-xl",paginationPage:"rounded-xl",descriptionListItem:"rounded-xl",accordionItem:"rounded-2xl",menuContent:"rounded-xl",menuItem:"rounded-lg",menuSubTrigger:"rounded-lg",menuSubContent:"rounded-xl",tableContainer:"rounded-2xl",tableEmptyIcon:"rounded-2xl",tableLoadingSkeleton:"rounded-xl",layoutRoot:"rounded-2xl",layoutPane:"rounded-2xl"},full:{buttonBase:"rounded-full",badgeBase:"rounded-full",panelRoot:"rounded-2xl",stateRoot:"rounded-2xl",stateIcon:"rounded-full",controlWrapper:"rounded-full",selectMenu:"rounded-2xl",selectOption:"rounded-full",switchTrack:"rounded-full",switchThumb:"rounded-full",checkboxBox:"rounded-full",radioOption:"rounded-2xl",dialogPanel:"rounded-2xl",dialogClose:"rounded-full",dropdownMenu:"rounded-2xl",dropdownItem:"rounded-full",tooltipContent:"rounded-full",noticeBase:"rounded-2xl",tabsList:"rounded-full",tabsTrigger:"rounded-full",tabsPanel:"rounded-2xl",segmentedRoot:"rounded-full",segmentedItem:"rounded-full",progressTrack:"rounded-full",progressIndicator:"rounded-full",skeletonRoot:"rounded-full",avatarRoot:"rounded-full",avatarStatus:"rounded-full",toolbarRoot:"rounded-2xl",paginationButton:"rounded-full",paginationPage:"rounded-full",descriptionListItem:"rounded-2xl",accordionItem:"rounded-2xl",menuContent:"rounded-2xl",menuItem:"rounded-full",menuSubTrigger:"rounded-full",menuSubContent:"rounded-2xl",tableContainer:"rounded-2xl",tableEmptyIcon:"rounded-full",tableLoadingSkeleton:"rounded-full",layoutRoot:"rounded-2xl",layoutPane:"rounded-2xl"}},bp={none:{buttonBase:"border-transparent",badgeBase:"border-transparent",panelRoot:"border-transparent",panelFooter:"border-transparent",stateRoot:"border-transparent",controlWrapper:"border-transparent",selectMenu:"border-transparent",switchTrack:"border-transparent",checkboxBox:"border-transparent",radioOption:"border-transparent",radioMarker:"border-transparent",dialogPanel:"border-transparent",dialogHeader:"border-transparent",dialogFooter:"border-transparent",dropdownMenu:"border-transparent",tooltipContent:"border-transparent",noticeBase:"border-transparent",dividerRoot:"border-transparent",tabsList:"border-transparent",tabsPanel:"border-transparent",segmentedRoot:"border-transparent",avatarRoot:"border-transparent",toolbarRoot:"border-transparent",paginationButton:"border-transparent",descriptionListItem:"border-transparent",accordionItem:"border-transparent",accordionPanel:"border-transparent",menuContent:"border-transparent",menuSeparator:"bg-transparent",menuSubContent:"border-transparent",tableContainer:"border-transparent [--base-table-header-separator:transparent]",tableHeader:"border-transparent",tableFooter:"[&_tr>*]:border-transparent",tableFooterBar:"border-transparent",tableFooterBarAttached:"border-t border-transparent",tableRow:"[&>*]:border-transparent",tableEmptyRow:"[&>*]:border-transparent",tableLoadingRow:"[&>*]:border-transparent",layoutRoot:"border-transparent",layoutPaneBordered:"border-transparent",layoutResizeHandle:"bg-transparent hover:bg-transparent active:bg-transparent focus-visible:bg-transparent"},subtle:{buttonDefault:"border-border/60",badgeDefault:"border-border/60",panelRoot:"border-border/60",panelFooter:"border-border/60",stateRoot:"border-border/60",controlWrapper:"border-border/60",selectMenu:"border-border/60",switchTrack:"border-border/60",checkboxBox:"border-border/60",radioOption:"border-border/60",radioMarker:"border-border/60",dialogPanel:"border-border/60",dialogHeader:"border-border/60",dialogFooter:"border-border/60",dropdownMenu:"border-border/60",tooltipContent:"border-border/60",noticeDefault:"border-border/60",dividerRoot:"border-border/60",tabsList:"border-border/60",tabsPanel:"border-border/60",segmentedRoot:"border-border/60",avatarRoot:"border-border/60",toolbarRoot:"border-border/60",paginationButton:"border-border/60",descriptionListItem:"border-border/60",accordionItem:"border-border/60",accordionPanel:"border-border/60",menuContent:"border-border/60",menuSeparator:"bg-border/60",menuSubContent:"border-border/60",tableContainer:"border-border/60 [--base-table-header-separator:hsl(var(--border)_/_0.6)]",tableHeader:"border-border/60",tableFooter:"[&_tr>*]:border-border/60",tableFooterBar:"border-border/60",tableFooterBarAttached:"border-t border-border/60",tableRow:"[&>*]:border-border/50",tableEmptyRow:"[&>*]:border-border/50",tableLoadingRow:"[&>*]:border-border/50",layoutRoot:"border-border/60",layoutPaneBordered:"border-border/60"},solid:{},strong:{buttonDefault:"border-foreground/20",badgeDefault:"border-foreground/20",panelRoot:"border-foreground/20",panelFooter:"border-foreground/20",stateRoot:"border-foreground/20",controlWrapper:"border-foreground/20",selectMenu:"border-foreground/20",switchTrack:"border-foreground/20",checkboxBox:"border-foreground/20",radioOption:"border-foreground/20",radioMarker:"border-foreground/20",dialogPanel:"border-foreground/20",dialogHeader:"border-foreground/15",dialogFooter:"border-foreground/15",dropdownMenu:"border-foreground/20",tooltipContent:"border-foreground/20",noticeDefault:"border-foreground/20",dividerRoot:"border-foreground/20",tabsList:"border-foreground/20",tabsPanel:"border-foreground/20",segmentedRoot:"border-foreground/20",avatarRoot:"border-foreground/20",toolbarRoot:"border-foreground/20",paginationButton:"border-foreground/20",descriptionListItem:"border-foreground/20",accordionItem:"border-foreground/20",accordionPanel:"border-foreground/20",menuContent:"border-foreground/20",menuSeparator:"bg-foreground/15",menuSubContent:"border-foreground/20",tableContainer:"border-foreground/20 [--base-table-header-separator:hsl(var(--foreground)_/_0.15)]",tableHeader:"border-foreground/20",tableFooter:"[&_tr>*]:border-foreground/20",tableFooterBar:"border-foreground/20",tableFooterBarAttached:"border-t border-foreground/20",tableRow:"[&>*]:border-foreground/15",tableEmptyRow:"[&>*]:border-foreground/15",tableLoadingRow:"[&>*]:border-foreground/15",layoutRoot:"border-foreground/20",layoutPaneBordered:"border-foreground/20",layoutResizeHandle:"hover:bg-foreground/15 active:bg-foreground/20 focus-visible:bg-foreground/15"}},fp={plain:{},muted:{buttonDefault:"bg-muted/20 hover:bg-muted/45",panelRoot:"bg-card",panelFooter:"bg-muted/20",stateRoot:"bg-muted/20",controlWrapper:"bg-background",selectMenu:"bg-background",selectOptionActive:"bg-muted/70 text-foreground",checkboxBox:"bg-background",radioOption:"bg-card hover:bg-muted/45",radioMarker:"bg-background",dialogPanel:"bg-card",dropdownMenu:"bg-background",dropdownItem:"hover:bg-muted/60",tooltipContent:"bg-popover",noticeDefault:"bg-muted/20",tabsList:"bg-muted/35",tabsTriggerActive:"bg-background",tabsPanel:"bg-card",segmentedRoot:"bg-muted/35",segmentedItemActive:"bg-background",progressTrack:"bg-muted/60",skeletonRoot:"bg-muted",toolbarRoot:"bg-card",paginationButton:"bg-background hover:bg-muted/60",paginationPage:"bg-muted/60",descriptionListItem:"bg-card",accordionItem:"bg-card",menuContent:"bg-background",menuItem:"focus:bg-muted/70 data-[highlighted]:bg-muted/70",menuSubTrigger:"focus:bg-muted/70 data-[highlighted]:bg-muted/70 data-[state=open]:bg-muted/70",menuSubContent:"bg-background",tableContainer:"bg-background/95 [scrollbar-gutter:stable]",tableFooter:"bg-muted/35",tableFooterBar:"bg-muted/30 shadow-none",tableRowInteractive:"cursor-pointer [--base-table-row-hover-bg:hsl(var(--muted)_/_0.45)]",tableLoadingSkeleton:"bg-muted",layoutRoot:"bg-card",layoutPane:"bg-card",layoutPaneMuted:"bg-muted/35",layoutResizeHandle:"hover:bg-border/70 active:bg-border/80 focus-visible:bg-border/70"},soft:{buttonDefault:"bg-muted/30 hover:bg-muted/55",panelRoot:"bg-background/95 shadow-sm",stateRoot:"bg-background/95 shadow-sm",controlWrapper:"bg-background/95",selectMenu:"bg-background/95 shadow-xl",selectOptionActive:"bg-muted/60 text-foreground",checkboxBox:"bg-background/95",radioOption:"bg-background/95 shadow-sm hover:bg-muted/35",radioMarker:"bg-background/95",dialogPanel:"bg-background/95 shadow-xl",dropdownMenu:"bg-background/95 shadow-xl",dropdownItem:"hover:bg-muted/55",tooltipContent:"bg-popover shadow-xl",noticeDefault:"bg-background/95 shadow-sm",tabsList:"bg-background/60 shadow-sm",tabsTriggerActive:"bg-background",tabsPanel:"bg-background/95 shadow-sm",segmentedRoot:"bg-background/60 shadow-sm",segmentedItemActive:"bg-background",skeletonRoot:"bg-background/80",toolbarRoot:"bg-background/95 shadow-sm",paginationButton:"bg-background/95 hover:bg-muted/55",descriptionListItem:"bg-background/95 shadow-sm",accordionItem:"bg-background/95 shadow-sm",menuContent:"bg-background/95 shadow-xl",menuItem:"focus:bg-muted/60 data-[highlighted]:bg-muted/60",menuSubTrigger:"focus:bg-muted/60 data-[highlighted]:bg-muted/60 data-[state=open]:bg-muted/60",menuSubContent:"bg-background/95 shadow-xl",tableContainer:"bg-background/95 shadow-sm [scrollbar-gutter:stable]",tableFooter:"bg-muted/25",tableFooterBar:"bg-muted/25 shadow-none",tableRowInteractive:"cursor-pointer [--base-table-row-hover-bg:hsl(var(--muted)_/_0.35)]",tableLoadingSkeleton:"bg-muted/65",layoutRoot:"bg-background/95 shadow-sm",layoutPane:"bg-background/95 shadow-sm",layoutPaneSoft:"bg-background/95 shadow-md"},glass:{buttonBase:"backdrop-blur-md",buttonDefault:"border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]",badgeDefault:"border-white/10 bg-white/[0.08] text-foreground",panelRoot:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",panelFooter:"border-white/10 bg-white/[0.05]",stateRoot:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",stateIcon:"bg-white/10 text-foreground",controlWrapper:"border-white/10 bg-white/[0.08] text-foreground backdrop-blur-md",selectMenu:"border-foreground/10 bg-background/10 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md",selectOption:"text-foreground",selectOptionActive:"bg-white/[0.14] text-foreground",selectOptionSelected:"bg-white/[0.18] text-foreground",switchTrack:"border-white/10 bg-white/[0.12] backdrop-blur-md",checkboxBox:"border-white/10 bg-white/[0.08] backdrop-blur-md",checkboxBoxChecked:"border-white/20 bg-white/[0.22] text-foreground",radioOption:"border-white/10 bg-white/[0.06] backdrop-blur-md hover:bg-white/[0.10]",radioMarker:"border-white/10 bg-white/[0.08] backdrop-blur-md",radioMarkerChecked:"border-white/25 bg-white/[0.16]",dialogOverlay:"bg-background/45 backdrop-blur-md",dialogPanel:"border-white/10 bg-white/[0.08] shadow-2xl backdrop-blur-md",dialogHeader:"border-white/10",dialogFooter:"border-white/10",dropdownMenu:"border-foreground/10 bg-background/10 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md",dropdownItem:"text-foreground hover:bg-white/[0.14]",tooltipContent:"border-foreground/10 bg-background/15 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md",noticeDefault:"border-white/10 bg-white/[0.08] text-foreground backdrop-blur-md",dividerRoot:"border-white/15",tabsList:"border-white/10 bg-white/[0.08] backdrop-blur-md",tabsTrigger:"text-muted-foreground hover:bg-white/[0.12] hover:text-foreground",tabsTriggerActive:"bg-white/[0.16] text-foreground shadow-none",tabsPanel:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",segmentedRoot:"border-white/10 bg-white/[0.08] backdrop-blur-md",segmentedItem:"text-muted-foreground hover:bg-white/[0.12] hover:text-foreground",segmentedItemActive:"bg-white/[0.16] text-foreground shadow-none",progressTrack:"bg-white/[0.12]",skeletonRoot:"bg-white/[0.16]",avatarRoot:"border-white/10 bg-white/[0.12] text-foreground",avatarFallback:"bg-white/[0.12] text-foreground",avatarStatus:"border-background",toolbarRoot:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",paginationButton:"border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]",paginationPage:"bg-white/[0.12] text-foreground",descriptionListItem:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",accordionItem:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",accordionPanel:"border-white/10",menuContent:"border-foreground/10 bg-background/10 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md",menuSeparator:"bg-white/10",menuItem:"text-foreground focus:bg-white/[0.14] focus:text-foreground data-[highlighted]:bg-white/[0.14] data-[highlighted]:text-foreground",menuSubTrigger:"text-foreground focus:bg-white/[0.14] focus:text-foreground data-[highlighted]:bg-white/[0.14] data-[highlighted]:text-foreground data-[state=open]:bg-white/[0.16]",menuSubContent:"border-foreground/10 bg-background/10 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md",tableContainer:"border-foreground/10 bg-background/[0.06] shadow-none backdrop-blur-md [scrollbar-gutter:stable] [--base-table-sticky-header-bg:hsl(var(--background)/0.94)] [--base-table-header-separator:hsl(var(--foreground)/0.24)]",tableHeader:"border-white/10",tableFooter:"bg-white/[0.05] [&_tr>*]:border-white/10",tableFooterBar:"border-white/10 bg-white/[0.05] shadow-none backdrop-blur-md",tableFooterBarAttached:"border-t border-white/10",tableRow:"[&>*]:border-white/10",tableRowInteractive:"cursor-pointer [--base-table-row-hover-bg:hsl(var(--foreground)/0.08)]",tableHeadLabel:"text-foreground",tableLoadingSkeleton:"bg-white/[0.16]",layoutRoot:"border-white/10 bg-white/[0.05] shadow-none backdrop-blur-md",layoutPane:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",layoutPaneMuted:"bg-white/[0.08]",layoutPaneSoft:"bg-white/[0.10] shadow-none backdrop-blur-md",layoutResizeHandle:"text-foreground/65 hover:bg-white/10 active:bg-white/15 focus-visible:bg-white/10",layoutResizeHandleIndicator:"bg-white/45 group-hover/resize:bg-white/75"},dark:{buttonBase:"border-white/15 text-white shadow-lg backdrop-blur",buttonDefault:"bg-black/30 hover:bg-black/[0.45]",buttonPrimary:"border-white/25 bg-white/20 text-white hover:bg-white/25",buttonMuted:"border-white/10 bg-black/20 text-white/70 hover:bg-black/[0.35] hover:text-white",badgeDefault:"border-white/10 bg-white/[0.08] text-white",badgeMuted:"border-white/10 bg-black/20 text-white/70",panelRoot:"border-white/10 bg-slate-950 text-white shadow-none",panelTitle:"text-white",panelDescription:"text-white/65",panelBody:"text-white/85",panelFooter:"border-white/10 bg-white/[0.04]",stateRoot:"border-white/10 bg-slate-950 text-white shadow-none",stateIcon:"bg-white/10 text-white/75",stateTitle:"text-white",stateDescription:"text-white/65",fieldLabel:"text-white",fieldDescription:"text-white/65",fieldMessage:"text-white/65",controlWrapper:"border-white/15 bg-black/30 text-white shadow-lg backdrop-blur focus-within:border-white/35",controlBase:"text-white placeholder:text-white/45",selectChevron:"text-white/65",selectMenu:"border-white/15 bg-slate-950 text-white shadow-2xl",selectOption:"text-white",selectOptionActive:"bg-white/[0.12] text-white",selectOptionSelected:"bg-white/[0.16] text-white",selectPlaceholder:"text-white/45",switchTrack:"border-white/15 bg-black/30 shadow-lg backdrop-blur",switchChecked:"border-white/25 bg-white/25 text-white",switchLabel:"text-white",switchDescription:"text-white/65",checkboxBox:"border-white/15 bg-black/30 text-white shadow-lg backdrop-blur",checkboxBoxChecked:"border-white/25 bg-white/25 text-white",checkboxLabel:"text-white",checkboxDescription:"text-white/65",radioOption:"border-white/10 bg-white/[0.06] text-white hover:bg-white/[0.08]",radioMarker:"border-white/15 bg-black/30 text-white shadow-lg backdrop-blur",radioMarkerChecked:"border-white/25 bg-white/25",radioIndicator:"bg-white",radioLabel:"text-white",radioDescription:"text-white/65",dialogOverlay:"bg-slate-950/75",dialogPanel:"border-white/10 bg-slate-950 text-white shadow-2xl",dialogHeader:"border-white/10",dialogTitle:"text-white",dialogDescription:"text-white/65",dialogBody:"text-white/85",dialogFooter:"border-white/10",dialogClose:"text-white/65 hover:bg-white/[0.08] hover:text-white",dropdownMenu:"border-white/15 bg-slate-950 text-white shadow-2xl",dropdownLabel:"text-white/55",dropdownSeparator:"bg-white/15",dropdownItem:"text-white hover:bg-white/[0.10]",dropdownItemDescription:"text-white/55",dropdownItemShortcut:"text-white/55",tooltipContent:"border-white/15 bg-slate-950 text-white shadow-2xl",noticeDefault:"border-white/10 bg-white/[0.08] text-white",noticeMuted:"border-white/10 bg-black/20 text-white/70",dividerRoot:"border-white/15",dividerLabel:"text-white/55",sectionHeaderEyebrow:"text-white/55",sectionHeaderTitle:"text-white",sectionHeaderDescription:"text-white/65",tabsList:"border-white/10 bg-white/[0.08]",tabsTrigger:"text-white/65 hover:bg-white/[0.12] hover:text-white",tabsTriggerActive:"bg-white/[0.16] text-white shadow-none",tabsPanel:"border-white/10 bg-white/[0.06] text-white",segmentedRoot:"border-white/10 bg-white/[0.08]",segmentedItem:"text-white/65 hover:bg-white/[0.12] hover:text-white",segmentedItemActive:"bg-white/[0.16] text-white shadow-none",progressTrack:"bg-white/[0.12]",progressLabel:"text-white",progressValue:"text-white/65",skeletonRoot:"bg-white/[0.14]",avatarRoot:"border-white/15 bg-white/[0.10] text-white",avatarFallback:"bg-white/[0.10] text-white/75",avatarText:"text-white",avatarStatus:"border-slate-950",toolbarRoot:"border-white/10 bg-white/[0.06] text-white",toolbarTitle:"text-white",toolbarDescription:"text-white/65",breadcrumbLink:"text-white/65 hover:text-white",breadcrumbCurrent:"text-white",breadcrumbSeparator:"text-white/45",paginationInfo:"text-white/65",paginationButton:"border-white/10 bg-white/[0.08] text-white hover:bg-white/[0.14]",paginationPage:"bg-white/[0.14] text-white",descriptionListItem:"border-white/10 bg-white/[0.06]",descriptionListTerm:"text-white/55",descriptionListValue:"text-white",accordionItem:"border-white/10 bg-white/[0.06]",accordionTrigger:"text-white hover:bg-white/[0.08]",accordionPanel:"border-white/10 text-white/70",tableContainer:"border-foreground/10 bg-background text-foreground shadow-none [scrollbar-gutter:stable] [--base-table-sticky-header-bg:hsl(var(--background)/0.98)] [--base-table-header-separator:hsl(var(--foreground)/0.16)]",tableRoot:"text-white",tableHeader:"border-white/10",tableFooter:"bg-white/[0.05] [&_tr>*]:border-white/10",tableFooterBar:"border-white/10 bg-white/[0.05] text-white/65",tableFooterBarAttached:"border-t border-white/10",tableRow:"[&>*]:border-white/10",tableRowInteractive:"cursor-pointer [--base-table-row-hover-bg:hsl(var(--foreground)/0.06)]",tableHead:"text-white/65",tableHeadLabel:"text-white",tableHeadDescription:"text-white/55",tableHeadMeta:"text-white/55",tableHeadIcon:"text-white/55",tableHeadSortIcon:"text-white/55",tableHeadDragHandle:"text-white/55 hover:bg-white/[0.08]",tableHeadResizeHandle:"after:bg-white/20 hover:after:bg-white/60",tableCell:"text-white/85",tableEmptyIcon:"bg-white/10 text-white/65",tableEmptyTitle:"text-white",tableEmptyDescription:"text-white/60",menuContent:"border-white/10 bg-slate-950 text-white shadow-2xl",menuLabel:"text-white/55",menuSeparator:"bg-white/10",menuItem:"text-white focus:bg-white/[0.10] focus:text-white data-[highlighted]:bg-white/[0.10] data-[highlighted]:text-white",menuItemDefault:"text-white",menuItemPrimary:"text-primary focus:text-primary data-[highlighted]:text-primary",menuItemSuccess:"text-[hsl(var(--success,142_69%_58%))] focus:text-[hsl(var(--success,142_69%_58%))] data-[highlighted]:text-[hsl(var(--success,142_69%_58%))]",menuItemWarning:"text-[hsl(var(--warning-foreground,53_98%_77%))] focus:text-[hsl(var(--warning-foreground,53_98%_77%))] data-[highlighted]:text-[hsl(var(--warning-foreground,53_98%_77%))]",menuItemDanger:"text-destructive-text focus:text-destructive-text data-[highlighted]:text-destructive-text",menuItemMuted:"text-white/65 focus:text-white data-[highlighted]:text-white",menuItemShortcut:"text-white/45",menuSubTrigger:"text-white focus:bg-white/[0.10] focus:text-white data-[highlighted]:bg-white/[0.10] data-[highlighted]:text-white data-[state=open]:bg-white/[0.12]",menuSubTriggerIcon:"text-white/55",menuSubContent:"border-white/10 bg-slate-950 text-white shadow-2xl",tableLoadingSkeleton:"bg-white/[0.14]",layoutRoot:"border-white/10 bg-slate-950 text-white shadow-none",layoutPane:"border-white/10 bg-slate-950 text-white shadow-none",layoutPaneMuted:"bg-white/[0.06]",layoutPaneSoft:"bg-white/[0.08] shadow-none",layoutResizeHandle:"text-white/65 hover:bg-white/10 active:bg-white/15 focus-visible:bg-white/10",layoutResizeHandleIndicator:"bg-white/45 group-hover/resize:bg-white/75"}},ad={default:{density:"default",radius:"md",border:"solid",background:"plain"},soft:{density:"default",radius:"lg",border:"subtle",background:"soft"},compact:{density:"compact",radius:"md",border:"subtle",background:"muted"},"tinted-glass":{density:"default",radius:"lg",border:"subtle",background:"glass"},glass:{density:"default",radius:"xl",border:"subtle",background:"glass"},"hard-edge":{density:"compact",radius:"none",border:"strong",background:"plain"}},yp={soft:{buttonBase:"font-medium",panelRoot:"border-border/70",controlWrapper:"font-medium",tabsTrigger:"font-medium",segmentedItem:"font-medium",toolbarRoot:"border-border/70",tableContainer:"border-border/70",tableFooterBar:"border-border/70",tableHeadLabel:"font-semibold",menuItemLabel:"font-medium"},compact:{buttonBase:"text-xs",badgeBase:"text-xs",fieldLabel:"text-xs",controlBase:"text-xs",selectOption:"text-xs",menuItem:"text-xs",menuSubTrigger:"text-xs",noticeBase:"text-xs",sectionHeaderTitle:"text-sm",tabsTrigger:"text-xs",segmentedItem:"text-xs",toolbarTitle:"text-xs",paginationRoot:"text-xs"},"tinted-glass":{buttonPrimary:"border-primary/25 bg-primary/15 text-primary-foreground hover:bg-primary/20",badgePrimary:"border-primary/25 bg-primary/15 text-primary-foreground",noticePrimary:"border-primary/25 bg-primary/15 text-primary-foreground",progressIndicator:"bg-primary",avatarStatus:"border-background"},glass:{panelRoot:"shadow-[0_24px_80px_hsl(var(--foreground)/0.12)]",stateRoot:"shadow-[0_24px_80px_hsl(var(--foreground)/0.12)]",noticeBase:"shadow-[0_18px_60px_hsl(var(--foreground)/0.10)]",tabsPanel:"shadow-[0_18px_60px_hsl(var(--foreground)/0.10)]",toolbarRoot:"shadow-[0_18px_60px_hsl(var(--foreground)/0.10)]",descriptionListItem:"shadow-[0_12px_40px_hsl(var(--foreground)/0.08)]",accordionItem:"shadow-[0_12px_40px_hsl(var(--foreground)/0.08)]"},"hard-edge":{buttonBase:"shadow-none",panelRoot:"shadow-none",stateRoot:"shadow-none",controlWrapper:"shadow-none",selectMenu:"shadow-none",menuContent:"shadow-none",menuSubContent:"shadow-none",noticeBase:"shadow-none",tabsList:"shadow-none",tabsTriggerActive:"shadow-none",tabsPanel:"shadow-none",segmentedRoot:"shadow-none",segmentedItemActive:"shadow-none",toolbarRoot:"shadow-none",descriptionListItem:"shadow-none",accordionItem:"shadow-none"}};function hp(e){return ad[e]??ad.default}r(hp,"getPresetDefaults");var xp=Object.keys(id),vp=nd(xp,l);function kp(...e){return Object.assign({},...e.filter(Boolean))}r(kp,"mergeStyles");function De(e){let t=e?.preset??"default",o=e?.variant??"default",n=hp(t),a=e?.density??n.density??"default",i=e?.state??"idle",s=e?.radius??n.radius??"md",u=e?.border??n.border??"solid",c=e?.background??n.background??"plain";return {preset:t,variant:o,density:a,state:i,radius:s,border:u,background:c,styles:kp(up,e?.styles),slots:vp(id,yp[t],pp[a],gp[s],bp[u],fp[c],e?.slots)}}r(De,"resolveBaseAppearance");function ba(e,t="default",o=false){return l(t==="default"&&e.slots.buttonDefault,t==="primary"&&e.slots.buttonPrimary,t==="success"&&e.slots.buttonSuccess,t==="warning"&&e.slots.buttonWarning,t==="danger"&&e.slots.buttonDanger,t==="muted"&&e.slots.buttonMuted,o&&e.slots.buttonActive)}r(ba,"getBaseButtonToneClassName");function sd(e,t="default"){return l(t==="default"&&e.slots.badgeDefault,t==="primary"&&e.slots.badgePrimary,t==="success"&&e.slots.badgeSuccess,t==="warning"&&e.slots.badgeWarning,t==="danger"&&e.slots.badgeDanger,t==="muted"&&e.slots.badgeMuted)}r(sd,"getBaseBadgeToneClassName");function lr(e,t="default"){return l(t==="default"&&e.slots.menuItemDefault,t==="primary"&&e.slots.menuItemPrimary,t==="success"&&e.slots.menuItemSuccess,t==="warning"&&e.slots.menuItemWarning,t==="danger"&&e.slots.menuItemDanger,t==="muted"&&e.slots.menuItemMuted)}r(lr,"getBaseMenuItemToneClassName");var ld=Symbol.for("@inf-monkeys-tech/monkeys-design/bento-depth@1"),dd=globalThis,cd=dd[ld]??(dd[ld]=lt.createContext(0));function In(){return lt.useContext(cd)}r(In,"useBentoDepth");function Mn({children:e,depth:t}){return jsxRuntime.jsx(cd.Provider,{value:t,children:e})}r(Mn,"BentoDepthProvider");function No({children:e}){return jsxRuntime.jsx(Mn,{depth:0,children:e})}r(No,"BentoScope");var fa=["background","glowColor","borderColor","borderWidth","borderStyle","radius","shadow","padding","gap"],Sp={background:"hsl(var(--card, 0 0% 100%))",glowColor:"var(--monkeys-bento-glow-default)",borderColor:"hsl(var(--border, 214.3 31.8% 91.4%))",borderWidth:"1px",borderStyle:"solid",radius:"var(--radius, 0.75rem)",shadow:"none",padding:"var(--global-spacing, 0.75rem)",gap:"var(--global-spacing, 0.75rem)"},Zi=new WeakMap;function md(e,t){if(!Number.isSafeInteger(t)||t<1)throw new RangeError("Bento level must be a positive safe integer.");let o=e&&Zi.get(e)?.get(t);if(o)return o;let n={...Sp},a=Object.fromEntries(fa.map(s=>[s,"builtin"]));for(let s of fa){let u=s==="padding"||s==="gap"?e?.density:e?.colorMode,c=s==="glowColor"?"component.bento":"semantic.bento",d=[`${c}.levels.level${t}.${s}`,`${c}.default.${s}`];for(let g of d){let m=u&&e?.cssValues[`${g}.${u}`]!==void 0?`${g}.${u}`:g,p=e?.cssValues[m];if(p!==void 0){n[s]=p,a[s]=m;break}}}let i=Object.freeze({values:Object.freeze(n),sources:Object.freeze(a)});if(e){let s=Zi.get(e)??new Map;s.set(t,i),Zi.set(e,s);}return i}r(md,"resolveBentoTokens");var Qi="rounded-[var(--monkeys-bento-radius)] border-[length:var(--monkeys-bento-border-width)] border-[color:var(--monkeys-bento-border-color)] [border-style:var(--monkeys-bento-border-style)] bg-[var(--monkeys-bento-background)] shadow-[shadow:var(--monkeys-bento-shadow)] p-[var(--monkeys-bento-padding)] gap-[var(--monkeys-bento-gap)]";function dr(){let e=In(),t=e+1,o=md(dn(),t),n=Object.fromEntries(fa.map(a=>[`--monkeys-bento-${a.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`)}`,o.values[a]]));return {parentDepth:e,level:t,variables:n}}r(dr,"useBentoSurface");var pd="[data-monkeys-bento-level]",ya="data-monkeys-scrollbar-active",gd='[data-monkeys-scrollbar], [data-monkeys-scroll-viewport], [data-radix-scroll-area-viewport], .monkeys-scrollbar, .monkeys-ui-scroll-viewport, .monkeys-ui-description, .monkeys-ui-page-main, .monkeys-ui-dialog, .monkeys-ui-menu, .monkeys-ui-select-content, [style*="overflow"][style*="auto"], [style*="overflow"][style*="scroll"], .overflow-auto, .overflow-x-auto, .overflow-y-auto, .overflow-scroll, .overflow-x-scroll, .overflow-y-scroll';function ha(e,t=true){let o=lt.useRef(),n=r(()=>{let i=o.current;i?.observer?.disconnect(),i?.marked.forEach(s=>s.removeAttribute(ya)),o.current=void 0;},"clear");lt.useEffect(()=>n,[t]);let a=r((i,s)=>{if(!t||!i.isConnected||!i.matches(pd))return;o.current?.root!==i&&(n(),o.current={root:i,hovered:false,marked:new Set});let u=o.current;if(s!==void 0&&(u.hovered=s),!(u.hovered||i.matches(":focus-visible")||!!i.querySelector(":focus-visible"))){u.observer?.disconnect(),u.observer=void 0,u.marked.forEach(g=>g.removeAttribute(ya)),u.marked.clear();return}let d=new Set;for(let g of [i,...i.querySelectorAll(gd)])g.matches(gd)&&g.closest(pd)===i&&d.add(g);u.marked.forEach(g=>{d.has(g)||g.removeAttribute(ya);}),d.forEach(g=>{u.marked.has(g)||g.setAttribute(ya,"");}),u.marked=d,u.observer||(u.observer=new MutationObserver(()=>a(i)),u.observer.observe(i,{childList:true,subtree:true}));},"update");return {onPointerEnter(i){a(i.currentTarget,true),e.onPointerEnter?.(i);},onPointerLeave(i){a(i.currentTarget,false),e.onPointerLeave?.(i);},onFocusCapture(i){a(i.currentTarget),e.onFocusCapture?.(i);},onBlurCapture(i){let s=i.currentTarget;queueMicrotask(()=>a(s)),e.onBlurCapture?.(i);}}}r(ha,"useBentoScrollbarVisibility");function fd({as:e="article",decoration:t,title:o,description:n,media:a,header:i,footer:s,children:u,interactive:c,selected:d,disabled:g,appearance:m,variant:p,density:f,state:b,className:v,classNames:y,style:x,...w}){let h=De({...m,variant:p,density:f,state:b}),k=e,C=i!==void 0?O(i):O(o)||O(n),T=a!=null,S=!C&&!T;return jsxRuntime.jsxs(k,{...w,"aria-disabled":g||void 0,"data-variant":h.variant,"data-density":h.density,"data-state":b??(g?"disabled":d?"selected":"idle"),"data-monkeys-component":"panel","data-slot":"root","data-interactive":c||void 0,"data-selected":d||void 0,"data-disabled":g||void 0,className:l(h.slots.panelRoot,c&&!g&&h.slots.panelInteractive,d&&h.slots.panelSelected,g&&h.slots.panelDisabled,y?.root,v),style:{...h.styles.panel,...x},children:[t,T?jsxRuntime.jsx("div",{"data-slot":"media",className:l(h.slots.panelMedia,y?.media),children:a}):null,C?jsxRuntime.jsx("div",{"data-slot":"header",className:l(h.slots.panelHeader,y?.header),style:h.styles.panelHeader,children:i!==void 0?i:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[O(o)?jsxRuntime.jsx("div",{"data-slot":"title",className:l(h.slots.panelTitle,y?.title),children:o}):null,O(n)?jsxRuntime.jsx("div",{"data-slot":"description",className:l(h.slots.panelDescription,y?.description),children:n}):null]})}):null,u!=null?jsxRuntime.jsx("div",{"data-slot":"body",className:l(h.slots.panelBody,S&&h.slots.panelBodyStandalone,y?.body),style:h.styles.panelBody,children:u}):null,s!=null?jsxRuntime.jsx("div",{"data-slot":"footer",className:l(h.slots.panelFooter,y?.footer),style:h.styles.panelFooter,children:s}):null]})}r(fd,"BasePanel");var yd=r(e=>e==null?void 0:typeof e=="number"?`${e}px`:e,"cssSize"),hd=r(e=>e!==void 0&&Number.isFinite(e)&&e>0?e:8,"safeSpeed"),Ip=r(e=>{let[t,o=t]=e.trim().split(/\s*\/\s*|\s+/);return {rx:t,ry:o}},"radiusParts");function ts({mode:e="solid",color:t,colors:o,width:n=1,radius:a,speed:i,direction:s="clockwise",className:u,style:c}){let g=`border-effect-${lt__namespace.useId().replace(/:/g,"")}`,m=lt__namespace.useRef(null),[p,f]=lt__namespace.useState({width:0,height:0,rx:"0px",ry:"0px"});lt__namespace.useEffect(()=>{let T=m.current;if(!T||typeof ResizeObserver>"u")return;let S=r(()=>{let W=getComputedStyle(T).borderTopLeftRadius,H=Ip(W),{rx:L,ry:F}=H;f({width:T.clientWidth,height:T.clientHeight,rx:L,ry:F});},"update");S();let I=new ResizeObserver(S);I.observe(T);let R=new MutationObserver(S);for(let W=T;W;W=W.parentElement)R.observe(W,{attributes:true});return ()=>{I.disconnect(),R.disconnect();}},[a]);let b=o?.length?o:[t||"hsl(var(--monkeys-color-border, var(--border, var(--input))))"],v=b.length===1?[b[0],b[0]]:b,y=s==="counterclockwise"?"reverse":"normal",x=(p.width||1)/2,w=(p.height||1)/2,h=s==="counterclockwise"?`360 ${x} ${w};0 ${x} ${w}`:`0 ${x} ${w};360 ${x} ${w}`,C={...{"--border-effect-width":yd(n),"--border-effect-radius":yd(a)||"inherit","--border-effect-speed":`${hd(i)}s`,"--border-effect-color":t||"hsl(var(--monkeys-color-border, var(--border, var(--input))))","--border-effect-gradient":`linear-gradient(90deg, ${v.join(", ")})`,"--border-effect-direction":y},...c};return jsxRuntime.jsxs("div",{ref:m,"aria-hidden":"true",className:`monkeys-border-effect monkeys-border-effect-${e}${u?` ${u}`:""}`,style:{...C,pointerEvents:"none"},children:[jsxRuntime.jsx("span",{className:"monkeys-border-effect-ring"}),e==="animated"&&jsxRuntime.jsxs("svg",{"aria-hidden":"true",focusable:"false",className:"monkeys-border-effect-svg",viewBox:`0 0 ${p.width||1} ${p.height||1}`,children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:g,gradientUnits:"userSpaceOnUse",x1:"0",y1:"0",x2:p.width||1,y2:"0",children:[v.map((T,S)=>jsxRuntime.jsx("stop",{offset:`${S/(v.length-1)*100}%`,stopColor:T},S)),jsxRuntime.jsx("animateTransform",{attributeName:"gradientTransform",type:"rotate",values:h,dur:`${hd(i)}s`,repeatCount:"indefinite"})]})}),jsxRuntime.jsx("rect",{x:"0",y:"0",width:p.width,height:p.height,rx:p.rx,ry:p.ry,fill:"none",stroke:`url(#${g})`,style:{strokeWidth:"calc(var(--border-effect-width) * 2)"}})]})]})}r(ts,"BorderEffect");var Mp=r((e,t)=>Object.keys(e??{}).some(o=>o.startsWith("padding")&&e?.[o]!==void 0)||/(?:^|[\s:])!?p[xytrblse]?-(?:\[|[a-z0-9])/.test(t??""),"ownsPadding");function xd({children:e,className:t,contentClassName:o,chrome:n="panel",borderEffect:a,decoration:i,headerWrap:s=false,title:u,titleIcon:c,action:d,appearance:g,classNames:m,...p}){let{parentDepth:f,level:b,variables:v}=dr(),y=Oe(g),x=n==="panel",w=x&&a!=null,h=ha(p,x),k=Mp(y?.styles?.panelBody,[m?.body,o,y?.slots?.panelBody].join(" "));return jsxRuntime.jsx(Mn,{depth:x?b:f,children:jsxRuntime.jsx(fd,{as:"section",appearance:{...y,slots:{...y?.slots,panelRoot:y?.slots?.panelRoot},styles:{...y?.styles,panelHeader:{...n==="plain"?{padding:0,paddingBlockEnd:"var(--global-spacing-lg, 1rem)"}:{},...y?.styles?.panelHeader},panelBody:{...!k||n==="plain"?{padding:0}:{},...y?.styles?.panelBody}}},classNames:{...m,root:l("min-h-0",x&&"gap-[var(--monkeys-bento-gap)]",x&&y?.radius===void 0&&!y?.preset&&"rounded-[var(--monkeys-bento-radius)]",x&&y?.border===void 0&&!y?.preset&&"border-[length:var(--monkeys-bento-border-width)] border-[color:var(--monkeys-bento-border-color)] [border-style:var(--monkeys-bento-border-style)]",x&&y?.background===void 0&&!y?.preset&&"bg-[var(--monkeys-bento-background)]",x&&!y?.preset&&y?.background===void 0&&"shadow-[shadow:var(--monkeys-bento-shadow)]",x&&!k&&"p-[var(--monkeys-bento-padding)]",!x&&"border-0 bg-transparent shadow-none",y?.slots?.panelRoot,m?.root,t),header:l("flex min-w-0 items-center gap-[var(--monkeys-bento-gap,var(--global-spacing,0.75rem))] border-b border-border p-0 pb-[var(--monkeys-bento-gap)]",n==="plain"&&"border-0 px-0 pt-0 pb-token-lg",m?.header),body:l("flex min-h-0 flex-col gap-[var(--monkeys-bento-gap,var(--global-spacing,0.75rem))] p-0",y?.slots?.panelBody,m?.body,o),footer:l("px-0 pb-0 pt-[var(--monkeys-bento-gap)]",m?.footer)},header:u?jsxRuntime.jsxs("div",{style:{alignItems:y?.styles?.panelHeader?.alignItems},className:l("flex min-w-0 flex-1 items-center justify-between gap-token-md",s&&"flex-wrap"),children:[jsxRuntime.jsxs("div",{className:l("flex min-w-0 flex-1 items-center gap-token-sm",s&&"basis-auto"),children:[c?jsxRuntime.jsx("span",{className:"inline-flex size-8 shrink-0 items-center justify-center rounded-md border border-primary/30 bg-primary/10 text-primary",children:jsxRuntime.jsx(c,{className:"size-4 text-primary",color:"currentColor",stroke:"currentColor"})}):null,jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("h2",{style:{margin:0},className:"truncate text-base font-semibold text-foreground",children:u}),p.description?jsxRuntime.jsx("div",{className:"mt-1 text-sm text-muted-foreground",children:p.description}):null]})]}),d?jsxRuntime.jsx("div",{className:l("shrink-0",s&&"max-w-full"),children:d}):null]}):void 0,...p,...h,decoration:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[i,w?jsxRuntime.jsx(ts,{...a}):null]}),"data-monkeys-bento-level":x?b:void 0,style:{...x?v:{},...p.style,...w?{borderColor:"transparent"}:{}},children:e})})}r(xd,"BentoPanel");var Pp={menu:"monkeys-overlay-surface--menu bg-menu-surface text-popover-foreground",dialog:"monkeys-overlay-surface--dialog bg-dialog-surface text-foreground"};function cn(e,t={}){return ["monkeys-overlay-surface",Pp[e],t.rounded===false?void 0:"monkeys-overlay-surface--rounded"].filter(Boolean).join(" ")}r(cn,"getOverlaySurfaceClassName");var Ap=lt__namespace.forwardRef(({className:e,style:t,...o},n)=>jsxRuntime.jsx(Io__namespace.Item,{ref:n,className:l("border-b",e),style:{borderColor:"var(--monkeys-component-accordion-item-border-color, hsl(var(--border)))",...t},...o}));Ap.displayName="AccordionItem";var zp=lt__namespace.forwardRef(({className:e,children:t,...o},n)=>jsxRuntime.jsx(Io__namespace.Header,{className:"flex",children:jsxRuntime.jsxs(Io__namespace.Trigger,{ref:n,className:l("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...o,children:[t,jsxRuntime.jsx(lucideReact.ChevronDown,{"aria-hidden":"true",className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));zp.displayName="AccordionTrigger";var Op=lt__namespace.forwardRef(({className:e,children:t,...o},n)=>jsxRuntime.jsx(Io__namespace.Content,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o,children:jsxRuntime.jsx("div",{className:l("pb-4 pt-0",e),children:t})}));Op.displayName="AccordionContent";var Fp=lt__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(va__namespace.Root,{ref:o,className:l("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:jsxRuntime.jsx(va__namespace.Indicator,{className:"flex items-center justify-center text-current",children:jsxRuntime.jsx(lucideReact.Check,{"aria-hidden":"true",className:"h-4 w-4"})})}));Fp.displayName="Checkbox";var ur=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_[data-slot=icon]]:text-[inherit] [&_[data-slot=icon]_*]:!text-[inherit] [&_[data-slot=icon]_svg]:!stroke-current [&_[data-slot=icon]_svg_*]:!stroke-current [&_[data-slot=end-icon]]:text-[inherit] [&_[data-slot=end-icon]_*]:!text-[inherit] [&_[data-slot=end-icon]_svg]:!stroke-current [&_[data-slot=end-icon]_svg_*]:!stroke-current [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-control-surface shadow-sm ring-offset-control-surface hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-sm px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Hp=lt__namespace.forwardRef(({className:e,variant:t,size:o,asChild:n=false,unstyled:a=false,...i},s)=>jsxRuntime.jsx(n?reactSlot.Slot:"button",{ref:s,className:a?e:ur({variant:t,size:o,className:e}),...i}));Hp.displayName="Button";var Vp=lt__namespace.forwardRef(({className:e,children:t,viewportClassName:o,viewportRef:n,onViewportScroll:a,scrollbar:i=true,scrollbarOrientation:s="vertical",scrollBarDisabled:u=false,type:c,...d},g)=>{let m=In();return jsxRuntime.jsxs(co__namespace.Root,{ref:g,type:c??(m>0?"auto":void 0),className:l("group relative overflow-hidden",u&&"no-scrollbar",e),...d,children:[jsxRuntime.jsx(co__namespace.Viewport,{ref:n,onScroll:a,className:l("h-full w-full rounded-[inherit]",o),children:t}),i?jsxRuntime.jsx(vd,{orientation:s,className:l(u&&"size-0 p-0")}):null,jsxRuntime.jsx(co__namespace.Corner,{})]})});Vp.displayName="ScrollArea";var vd=lt__namespace.forwardRef(({className:e,orientation:t="vertical",...o},n)=>jsxRuntime.jsx(co__namespace.ScrollAreaScrollbar,{ref:n,"data-monkeys-scrollbar":"",orientation:t,className:l("flex touch-none select-none opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100 data-[state=visible]:opacity-100",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-px",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-px",e),...o,children:jsxRuntime.jsx(co__namespace.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));vd.displayName="ScrollBar";var Gp=lt__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(ka__namespace.Root,{ref:o,className:l("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,children:jsxRuntime.jsx(ka__namespace.Thumb,{className:"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"})}));Gp.displayName="Switch";var _p=lt__namespace.forwardRef(({variant:e="default",...t},o)=>jsxRuntime.jsx(_o__namespace.Root,{ref:o,"data-variant":e,...t}));_p.displayName="Tabs";var $p=lt__namespace.forwardRef(({className:e,gap:t,style:o,...n},a)=>jsxRuntime.jsx(_o__namespace.List,{ref:a,className:l("inline-flex h-10 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),style:{gap:t,...o},...n}));$p.displayName="TabsList";var jp=lt__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(_o__namespace.Trigger,{ref:o,className:l("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));jp.displayName="TabsTrigger";var Kp=lt__namespace.forwardRef(({className:e,...t},o)=>{let n=In();return jsxRuntime.jsx(_o__namespace.Content,{ref:o,className:l("mt-2 ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n>0&&"gap-[var(--monkeys-bento-gap)]",e),...t})});Kp.displayName="TabsContent";var Up=lt__namespace.forwardRef(({className:e,sideOffset:t=4,...o},n)=>{let a=Ne();return jsxRuntime.jsx(uo__namespace.Portal,{children:jsxRuntime.jsx(uo__namespace.Content,{...a,...o,ref:n,sideOffset:t,"data-monkeys-component":"tooltip","data-slot":"content","data-surface":"menu",className:l("z-50 overflow-hidden border px-3 py-1.5 text-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",cn("menu"),e)})})});Up.displayName="TooltipContent";var pr=lt__namespace.forwardRef(({className:e,appearance:t="standard",unstyled:o=false,type:n,...a},i)=>jsxRuntime.jsx("input",{ref:i,type:n,className:o?e:l("flex w-full border border-input bg-control-surface px-3 text-foreground ring-offset-control-surface transition-[border-color,background-color,color,box-shadow] file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t==="compact"?"h-9 rounded-md py-1 text-sm shadow-sm":"h-10 rounded-md py-2 text-sm shadow-sm",t==="shadow"&&"rounded-lg shadow-sm shadow-black/[0.02] dark:border-white/10 dark:bg-white/[0.04] dark:shadow-none",e),...a}));pr.displayName="Input";var qp=lt__namespace.forwardRef(({className:e,appearance:t="standard",unstyled:o=false,...n},a)=>jsxRuntime.jsx("textarea",{ref:a,className:o?e:l("flex w-full border border-input bg-control-surface px-3 py-2 text-foreground ring-offset-control-surface placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t==="compact"?"min-h-[60px] rounded-md text-sm shadow-sm":"min-h-[80px] rounded-md text-sm",t==="shadow"&&"rounded-lg shadow-sm shadow-black/[0.02] dark:border-white/10 dark:bg-white/[0.04] dark:shadow-none",e),...n}));qp.displayName="Textarea";var Yp=lt__namespace.forwardRef((e,t)=>jsxRuntime.jsx("select",{ref:t,...e}));Yp.displayName="NativeSelect";var Jp=lt__namespace.forwardRef((e,t)=>jsxRuntime.jsx("option",{ref:t,...e}));Jp.displayName="NativeOption";function Ca(e){if(!e)return;let t=/^data:image\/svg\+xml(?:[;,]|$)/i.test(e.trim());if(!t)try{t=/\.svgz?$/i.test(decodeURIComponent(new URL(e,"https://preview.invalid").pathname));}catch{return}return t?{backgroundColor:"var(--monkeys-media-svg-background)",objectFit:"contain"}:void 0}r(Ca,"svgPreviewSurface");var Xp=r(({aspectRatio:e="square",maxSquareHeight:t=true,className:o}={})=>l("w-full overflow-hidden bg-muted",(e==="square"||e==="1:1")&&"aspect-square",(e==="square"||e==="1:1")&&t&&"max-h-[300px]",e==="4:3"&&"aspect-[4/3]",e==="3:4"&&"aspect-[3/4]",(e==="video"||e==="16:9")&&"aspect-video",e==="9:16"&&"aspect-[9/16]",o),"mediaPreviewFrameClassName"),ns=lt__namespace.forwardRef(({aspectRatio:e="square",maxSquareHeight:t=true,className:o,...n},a)=>jsxRuntime.jsx("div",{ref:a,className:Xp({aspectRatio:e,maxSquareHeight:t,className:o}),...n}));ns.displayName="MediaPreviewFrame";var gr=lt__namespace.forwardRef(({fit:e="contain",className:t,style:o,...n},a)=>{let i=Ca(n.src);return jsxRuntime.jsx("img",{ref:a,className:l("block size-full",e==="contain"?"object-contain":"object-cover",t),style:{...i,...i?{objectFit:e}:{},...o},...n})});gr.displayName="MediaPreviewImage";var Cd=Symbol.for("@inf-monkeys-tech/monkeys-design/dialog-dock@1"),Sd=globalThis,eg=Sd[Cd]??(Sd[Cd]=lt__namespace.createContext(null)),zt=r(()=>lt__namespace.useContext(eg),"useDialogDock");var rs=lt__namespace.forwardRef(({children:e,className:t,style:o,closeLabel:n="Close",showCloseButton:a=true,onInteractOutside:i,...s},u)=>{let c=zt(),d=lt__namespace.useId(),g=lt__namespace.useRef(null),m=lt__namespace.useRef(false);return lt__namespace.useEffect(()=>{m.current&&!c?.collapsed&&c?.activeId===d&&g.current?.focus(),m.current=!!c?.collapsed;},[c?.collapsed,c?.activeId,d]),lt__namespace.useEffect(()=>c?.register(d),[c?.register,d]),c?.container?jsxRuntime.jsx(bt__namespace.Portal,{container:c.container,children:jsxRuntime.jsx("div",{style:{display:"contents"},children:jsxRuntime.jsx(No,{children:jsxRuntime.jsx(xd,{className:"monkeys-dialog-dock-panel overflow-auto",contentClassName:"shrink-0",style:{display:c.activeId===d?void 0:"none"},children:jsxRuntime.jsxs(bt__namespace.Content,{...s,ref:u,"data-monkeys-dialog-content":true,"data-presentation":"docked","data-title-visible":c.showTitle,"data-collapsible":c.collapsible,className:l("monkeys-dialog-dock-content",t),style:o,onInteractOutside:p=>{i?.(p),p.preventDefault();},children:[e,c.collapsible&&jsxRuntime.jsx("button",{ref:g,type:"button",className:"monkeys-dialog-dock-collapse","aria-label":c.collapseLabel,title:c.collapseLabel,"aria-expanded":!c.collapsed,onClick:()=>c.setCollapsed(true),children:jsxRuntime.jsx(lucideReact.PanelRightClose,{"aria-hidden":"true",className:"size-4"})}),a&&jsxRuntime.jsxs(bt__namespace.Close,{className:"monkeys-dialog-dock-close","aria-label":typeof n=="string"?n:void 0,children:[jsxRuntime.jsx(lucideReact.X,{"aria-hidden":"true",className:"size-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:n})]})]})})})})}):null});rs.displayName="DockedDialogContent";var Rd=Symbol.for("@inf-monkeys-tech/monkeys-design/dialog-open@1"),Nd=globalThis,Id=Nd[Rd]??(Nd[Rd]=lt__namespace.createContext(false));function Ta({open:e,defaultOpen:t,onOpenChange:o,modal:n,...a}){let i=zt(),[s,u]=lt__namespace.useState(t??false),c=e??s;return jsxRuntime.jsx(Id.Provider,{value:c,children:jsxRuntime.jsx(bt__namespace.Root,{...a,open:c,modal:i?false:n,onOpenChange:d=>{u(d),o?.(d);}})})}r(Ta,"Dialog");var og=bt__namespace.Portal;var Md=lt__namespace.forwardRef(({className:e,...t},o)=>{let n=Ne();return jsxRuntime.jsx(bt__namespace.Overlay,{...n,...t,ref:o,className:l("theme-overlay-backdrop fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),"data-monkeys-component":"dialog","data-slot":"overlay","data-monkeys-overlay":true})});Md.displayName="DialogOverlay";var Bd=lt__namespace.forwardRef(({className:e,...t},o)=>{let n=Ne();return jsxRuntime.jsx(bt__namespace.Content,{...n,...t,ref:o,className:e,"data-monkeys-component":"dialog","data-slot":"content","data-surface":"dialog","data-monkeys-dialog-content":true})});Bd.displayName="DialogSurfaceContent";var mn=lt__namespace.forwardRef(({className:e,children:t,showCloseButton:o=true,closeLabel:n="Close",overlayClassName:a,overlayStyle:i,...s},u)=>{let c=zt(),d=lt__namespace.useContext(Id);return c?d?jsxRuntime.jsx(rs,{...s,ref:u,className:e,showCloseButton:o,closeLabel:n,children:t}):null:jsxRuntime.jsxs(og,{children:[jsxRuntime.jsx(Md,{className:a,style:i}),jsxRuntime.jsxs(Bd,{...s,ref:u,className:l("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",cn("dialog"),e),children:[jsxRuntime.jsx(No,{children:t}),o?jsxRuntime.jsxs(bt__namespace.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-dialog-surface transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[jsxRuntime.jsx(lucideReact.X,{"aria-hidden":"true",className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:n})]}):null]})]})});mn.displayName="DialogContent";var ng=lt__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(mn,{ref:o,className:l("duration-0 data-[state=open]:animate-none data-[state=closed]:animate-none",e),...t}));ng.displayName="DialogContentNoAnimation";var rg=r(({className:e,...t})=>jsxRuntime.jsx("div",{className:l(zt()?.showTitle===false?"contents":"flex flex-col space-y-1.5 text-center sm:text-left",e),...t}),"DialogHeader");rg.displayName="DialogHeader";var ag=r(({className:e,...t})=>jsxRuntime.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),"DialogFooter");ag.displayName="DialogFooter";var br=lt__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(bt__namespace.Title,{ref:o,className:l("text-lg font-semibold leading-none tracking-tight",e,zt()?.showTitle===false&&"sr-only"),...t}));br.displayName="DialogTitle";var fr=lt__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(bt__namespace.Description,{ref:o,className:l("text-sm text-muted-foreground",e),...t}));fr.displayName="DialogDescription";lt__namespace.forwardRef((e,t)=>{let o=zt()?bt__namespace.Trigger:wt__namespace.Trigger;return jsxRuntime.jsx(o,{...e,ref:t})});var ig=wt__namespace.Portal,Pd=lt__namespace.forwardRef(({className:e,style:t,...o},n)=>{let a=Ne();return jsxRuntime.jsx(wt__namespace.Overlay,{...a,...o,ref:n,className:l("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),"data-monkeys-component":"alert-dialog","data-slot":"overlay","data-monkeys-overlay":true,style:{pointerEvents:"auto",...t}})});Pd.displayName="AlertDialogOverlay";var sg=lt__namespace.forwardRef(({className:e,style:t,children:o,...n},a)=>{let i=Ne();return zt()?jsxRuntime.jsx(mn,{...n,...i,ref:a,role:"alertdialog",showCloseButton:false,className:e,style:t,children:o}):jsxRuntime.jsxs(ig,{children:[jsxRuntime.jsx(Pd,{}),jsxRuntime.jsx(wt__namespace.Content,{...i,...n,ref:a,className:l("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",cn("dialog"),e),"data-monkeys-component":"alert-dialog","data-slot":"content","data-surface":"dialog","data-monkeys-dialog-content":true,style:{pointerEvents:"auto",...t},children:jsxRuntime.jsx(No,{children:o})})]})});sg.displayName="AlertDialogContent";var lg=r(({className:e,...t})=>jsxRuntime.jsx("div",{className:l("flex flex-col space-y-2 text-center sm:text-left",e),...t}),"AlertDialogHeader"),dg=r(({className:e,...t})=>jsxRuntime.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),"AlertDialogFooter"),cg=lt__namespace.forwardRef(({className:e,...t},o)=>{let n=zt()?bt__namespace.Title:wt__namespace.Title;return jsxRuntime.jsx(n,{ref:o,className:l("text-lg font-semibold",e,zt()?.showTitle===false&&"sr-only"),...t})}),ug=lt__namespace.forwardRef(({className:e,...t},o)=>{let n=zt()?bt__namespace.Description:wt__namespace.Description;return jsxRuntime.jsx(n,{ref:o,className:l("text-sm text-muted-foreground",e),...t})}),mg=lt__namespace.forwardRef(({className:e,...t},o)=>{let n=zt()?bt__namespace.Close:wt__namespace.Action;return jsxRuntime.jsx(n,{ref:o,className:l(ur(),e),...t})}),pg=lt__namespace.forwardRef(({className:e,...t},o)=>{let n=zt()?bt__namespace.Close:wt__namespace.Action;return jsxRuntime.jsx(n,{ref:o,className:l(ur({variant:"destructive"}),e),...t})}),gg=lt__namespace.forwardRef(({className:e,...t},o)=>{let n=zt()?bt__namespace.Close:wt__namespace.Cancel;return jsxRuntime.jsx(n,{ref:o,className:l(ur({variant:"outline"}),"mt-2 sm:mt-0",e),...t})});lg.displayName="AlertDialogHeader";dg.displayName="AlertDialogFooter";cg.displayName="AlertDialogTitle";ug.displayName="AlertDialogDescription";mg.displayName="AlertDialogAction";pg.displayName="AlertDialogDangerAction";gg.displayName="AlertDialogCancel";var Wd=Qt__namespace.Root,Ld=Qt__namespace.Trigger;var as=lt__namespace.forwardRef(r(function({align:t="center",sideOffset:o=4,container:n,portalForceMount:a,unstyled:i=false,className:s,style:u,...c},d){let g=Ne(),m=typeof document<"u"?(()=>{let f=document.activeElement?.closest("[data-monkeys-dialog-content]");return f||Array.from(document.querySelectorAll('[data-monkeys-dialog-content][data-state="open"]')).at(-1)})():void 0;return jsxRuntime.jsx(Qt__namespace.Portal,{container:n??m,forceMount:a,children:jsxRuntime.jsx(Qt__namespace.Content,{...g,...c,ref:d,align:t,sideOffset:o,"data-monkeys-component":"popover","data-slot":"content","data-surface":"menu",className:i?s:l("z-50 w-72 border p-4 outline-hidden",cn("menu"),"data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),style:i?u:{pointerEvents:"auto",...u}})})},"PopoverContent"));as.displayName=Qt__namespace.Content.displayName;var Ad=["pulse","shimmer","shimmer-soft","shimmer-diagonal","shimmer-vertical","drift","outline","none"];function Od(e,t=false){if(!(e===void 0||Ad.includes(e))&&!(t&&(e==="shimmer-shared"||e==="shimmer-stagger")))throw new TypeError(`Skeleton animation must be ${Ad.join(", ")}${t?", shimmer-shared, or shimmer-stagger":""}.`)}r(Od,"validateSkeletonAnimation");var ss=lt.createContext(null),hr=lt.createContext(void 0);function ls(e){delete e.dataset.skeletonReady;for(let t of ["width","offset","delay"])e.style.removeProperty(`--monkeys-skeleton-${t}`);}r(ls,"clearGeometry");function fg(e,t,o,n){let a=lt.useMemo(()=>({nodes:new Map,update:r(()=>{},"update")}),[]);return lt.useEffect(()=>{if(!o||t||e!=="shimmer-shared"&&e!=="shimmer-stagger")return;let i=window.matchMedia("(prefers-reduced-motion: reduce)"),s,u,c=false,d=new Set,g=r(()=>{if(u=void 0,!c)return;let b=[...a.nodes.keys()].filter(C=>C.isConnected);if(b.sort((C,T)=>C.compareDocumentPosition(T)&2?1:-1),e==="shimmer-stagger"){b.forEach((C,T)=>{let S=a.nodes.get(C)?.item??T;C.style.setProperty("--monkeys-skeleton-delay",`${Math.min(S*80,400)}ms`);});return}let v=n?.current??b[0]?.parentElement;for(let C of b)for(;v&&!v.contains(C);)v=v.parentElement;let y=new Set(b);for(let C of b)for(let T=C.parentElement;T&&(y.add(T),T!==v);T=T.parentElement);v&&y.add(v);for(let C of d)y.has(C)||(s?.unobserve(C),d.delete(C));for(let C of y)d.has(C)||(s?.observe(C),d.add(C));let x=b.map(C=>C.getBoundingClientRect()),w=b.map((C,T)=>{let S=getComputedStyle(C),I=S.boxSizing==="border-box"?0:parseFloat(S.paddingLeft)+parseFloat(S.paddingRight)+parseFloat(S.borderLeftWidth)+parseFloat(S.borderRightWidth),R=parseFloat(S.width)+I,W=R?x[T].width/R:1;return Math.abs(W-1)<1e-4?1:W}),h=Math.min(...x.map(C=>C.left)),k=Math.max(...x.map(C=>C.right));b.forEach((C,T)=>{let S=x[T];if(!S.width||!S.height){ls(C);return}let I=w[T];C.style.setProperty("--monkeys-skeleton-width",`${(k-h)/I}px`),C.style.setProperty("--monkeys-skeleton-offset",`${(h-S.left)/I}px`),C.dataset.skeletonReady||(C.style.setProperty("--monkeys-skeleton-delay",`${-(performance.now()%2600)}ms`),C.dataset.skeletonReady="true");});},"measure"),m=r(()=>{c&&u===void 0&&(u=window.requestAnimationFrame(g));},"schedule"),p=r(()=>{c=false,s?.disconnect(),s=void 0,d.clear(),u!==void 0&&window.cancelAnimationFrame(u),u=void 0,window.removeEventListener("resize",m),window.removeEventListener("scroll",m,true),a.nodes.forEach((b,v)=>ls(v));},"stop"),f=r(()=>{p(),!(i.matches||e==="shimmer-shared"&&typeof ResizeObserver>"u")&&(c=true,e==="shimmer-shared"&&(s=new ResizeObserver(m),window.addEventListener("resize",m),window.addEventListener("scroll",m,{capture:true,passive:true})),m());},"start");return a.update=m,f(),i.addEventListener("change",f),()=>{p(),i.removeEventListener("change",f),a.update=()=>{};}},[e,t,o,a,n]),lt.useEffect(()=>{a.update();}),a}r(fg,"useGroupRegistry");function jo({animation:e,animated:t,children:o,independent:n=false,containerRef:a}){if(Od(e,true),t!==void 0&&typeof t!="boolean")throw new TypeError("SkeletonGroup animated must be a boolean.");let i=lt.useContext(ss),s=lt.useContext(hr),u=n||e!==void 0||!i,c=e??i?.animation??"pulse",d=!!i?.disabled||t===false||c==="none",g=fg(c,d,u,a),m=lt.useMemo(()=>({animation:c,disabled:d,registry:u?g:i.registry}),[c,d,u,g,i]),p=jsxRuntime.jsx(ss.Provider,{value:m,children:o});return jsxRuntime.jsx(hr.Provider,{value:u?void 0:s,children:p})}r(jo,"SkeletonScope");function En({index:e,children:t}){let o=lt.useContext(hr);return jsxRuntime.jsx(hr.Provider,{value:o??e,children:t})}r(En,"SkeletonItem");function yg(e,t){return lt.useMemo(()=>{let o;return n=>{if(e(n),typeof t=="function"){if(o)o(),o=void 0;else if(n===null){t(null);return}if(n!==null){let a=t(n);typeof a=="function"&&(o=a);}}else t&&(t.current=n);}},[e,t])}r(yg,"useSkeletonRef");function Fd(e,t=true,o){Od(e);let n=lt.useContext(ss),a=lt.useContext(hr),i=!t||n?.disabled?"none":e??n?.animation??"pulse",[s,u]=lt.useState(null),c=yg(u,o),d=e===void 0&&(i==="shimmer-shared"||i==="shimmer-stagger")?n?.registry:void 0;return lt.useEffect(()=>{if(!(!s||!d))return d.nodes.set(s,{item:a}),d.update(),()=>{d.nodes.delete(s),ls(s),d.update();}},[s,d,a,i]),{ref:c,mode:i,style:i==="shimmer-stagger"&&a!==void 0?{"--monkeys-skeleton-delay":`${Math.min(a*80,400)}ms`}:void 0}}r(Fd,"useSkeletonMotion");function Vd(e){if(e===null)return null;if(typeof e=="string"&&e.trim().length>0)return e;throw new TypeError("BaseField validate must return a non-empty error string or null.")}r(Vd,"resolveBaseFieldValidationResult");var us=lt.createContext(null);function Ko(){let e=lt.useContext(us),t=lt.useRef(null);t.current===null&&(t.current=Symbol("BaseFieldControl"));let o=e?.registerControl;lt.useEffect(()=>{if(!(!o||t.current===null))return o(t.current)},[o]);let n=e?.notifyBlur,a=e?.notifyChange;return {invalid:e?.invalid??false,notifyBlur:lt.useCallback(i=>n?.(i),[n]),notifyChange:lt.useCallback(i=>a?.(i),[a])}}r(Ko,"useBaseFieldControl");var Rg={sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"},Ng={sm:"text-[10px]",md:"text-[11px]",lg:"text-xs"};function Ig(e,...t){for(let o of t)if(o){if(typeof o=="function"){o(e);continue}o.current=e;}}r(Ig,"setRefs");var pn=lt.forwardRef(r(function({label:t,description:o,indeterminate:n=false,invalid:a=false,disabled:i=false,controlSize:s,appearance:u,className:c,classNames:d,style:g,checked:m,defaultChecked:p,onBlur:f,onChange:b,"aria-invalid":v,...y},x){for(let[D,B]of [["indeterminate",n],["invalid",a],["disabled",i]])if(typeof B!="boolean")throw new TypeError(`BaseCheckbox ${D} must be a boolean.`);if(s!==void 0&&s!=="sm"&&s!=="md"&&s!=="lg")throw new TypeError('BaseCheckbox controlSize must be "sm", "md", or "lg".');let w=Oe(u),h=Ne(),k=De(w),C=Ko(),T=a||C.invalid,S=O(t),I=Kl(o),R=lt.useRef(null),W=lt.useRef(n);W.current=n;let[H,L]=lt.useState(p??false),F=m!==void 0,$=!!(F?m:H),M=n||$,G=n?"mixed":$?"checked":"unchecked",Y=lt.useCallback(D=>{R.current=D,D&&(D.indeterminate=W.current),Ig(D,x);},[x]);lt.useEffect(()=>{R.current&&(R.current.indeterminate=n);},[n]);let N=r(D=>{i||(F||L(D.currentTarget.checked),b?.(D),C.notifyChange(D.currentTarget.checked),R.current&&(R.current.indeterminate=n));},"handleChange");return jsxRuntime.jsxs("label",{...h,"data-monkeys-component":"checkbox","data-slot":"root","data-state":G,"data-size":s,"data-invalid":T||void 0,"data-disabled":i||void 0,className:l(k.slots.checkboxRoot,!I&&"items-center",i&&k.slots.checkboxDisabled,d?.root,c),style:{...k.styles.checkboxRoot,...g},children:[jsxRuntime.jsxs("span",{"data-slot":"box","data-state":G,"data-size":s,className:l(k.slots.checkboxBox,!I&&"mt-0",M&&k.slots.checkboxBoxChecked,T&&k.slots.checkboxBoxInvalid,s&&Rg[s],d?.box),style:{...k.styles.checkboxBox},children:[jsxRuntime.jsx("input",{...y,ref:Y,type:"checkbox",disabled:i,checked:m,defaultChecked:p,"aria-invalid":v??(T||void 0),"aria-checked":n?"mixed":$,"data-slot":"input","data-state":G,"data-size":s,"data-invalid":T||void 0,"data-disabled":i||void 0,className:l(k.slots.checkboxInput,d?.input),onBlur:D=>{f?.(D),C.notifyBlur(D.currentTarget.checked);},onChange:N}),M?jsxRuntime.jsx("span",{"aria-hidden":"true","data-slot":"indicator","data-state":G,"data-size":s,className:l(k.slots.checkboxIndicator,s&&Ng[s],d?.indicator),children:n?"\u2013":"\u2713"}):null]}),S||I?jsxRuntime.jsxs("span",{"data-slot":"content",className:l(k.slots.checkboxContent,d?.content),children:[S?jsxRuntime.jsx("span",{"data-slot":"label",className:l(k.slots.checkboxLabel,d?.label),children:t}):null,I?jsxRuntime.jsx("span",{"data-slot":"description",className:l(k.slots.checkboxDescription,d?.description),children:o}):null]}):null]})},"BaseCheckbox"));function ps(e,t){let o=typeof e=="function"?e():e;if(o===null)return null;if(!o||typeof o!="object"||o.nodeType!==1)throw new TypeError(`${t} must resolve to an Element or null.`);return o}r(ps,"resolveContainerValue");function _d({explicitProvided:e,explicitContainer:t,providerProvided:o,providerContainer:n,getDocument:a}){if(e)return ps(t,"BasePortal container");if(o)return ps(n,"MonkeysProvider portal.container");if(!a)return null;let i=a();if(i===null)return null;if(!i||typeof i!="object"||!("body"in i))throw new TypeError("MonkeysProvider environment.getDocument must resolve to a Document or null.");return ps(i.body,"MonkeysProvider environment.getDocument().body")}r(_d,"resolveBasePortalContainer");function Eg({mounted:e,explicitDisabled:t,explicitContainer:o,providerDisabled:n,providerContainer:a,getDocument:i}){let s=t??n??false;if(!e||s)return {mounted:e,disabled:s,shouldPortal:false,container:null,radixPortalProps:void 0};let u=_d({explicitProvided:o!==void 0,explicitContainer:o,providerProvided:a!==void 0,providerContainer:a,getDocument:i});return u?{mounted:true,disabled:false,shouldPortal:true,container:u,radixPortalProps:Object.freeze({container:u})}:{mounted:true,disabled:false,shouldPortal:false,container:null,radixPortalProps:void 0}}r(Eg,"resolveBaseOverlayPortalState");function Dg(){return globalThis.document??null}r(Dg,"getDefaultDocument");function Mo(e={}){let t=Yi(),o=Ji(),[n,a]=lt.useState(false);return lt.useEffect(()=>{a(true);},[]),Eg({mounted:n,explicitDisabled:e.disabled,explicitContainer:e.container,providerDisabled:o.disabled,providerContainer:o.container,getDocument:t.getDocument??Dg})}r(Mo,"useBaseOverlayPortal");function $d(e,t){return t.shouldPortal?reactDom.createPortal(e,t.container):jsxRuntime.jsx(jsxRuntime.Fragment,{children:e})}r($d,"renderBaseOverlayPortalContent");function Na(e,t){if(typeof e!="boolean")throw new TypeError(`BaseTooltip ${t} must be a boolean.`)}r(Na,"validateBoolean");function Hg(e){if(e!=="top"&&e!=="bottom"&&e!=="left"&&e!=="right")throw new TypeError('BaseTooltip placement must be "top", "bottom", "left", or "right".')}r(Hg,"validatePlacement");function Vg(e,t){return lt.isValidElement(e)&&e.type!==lt.Fragment?e:jsxRuntime.jsx("span",{tabIndex:!t&&O(e)?0:void 0,children:e})}r(Vg,"normalizeTrigger");var xr=lt.forwardRef(r(function({content:t,children:o,open:n,defaultOpen:a=false,placement:i="top",disabled:s=false,portal:u=false,appearance:c,className:d,classNames:g,style:m,onOpenChange:p,...f},b){n!==void 0&&Na(n,"open"),Na(a,"defaultOpen"),Na(s,"disabled"),Na(u,"portal"),Hg(i);let v=Oe(c),y=Ne(),x=De(v),w=Mo({disabled:!u}),[h,k]=lt.useState(a),C=n!==void 0,T=!s&&O(t),I=T&&(C?n:h),R=u&&w.shouldPortal?"portaled":"inline",W=r(F=>{F&&!T||(C||k(F),p?.(F));},"handleOpenChange"),H=Vg(o,s),L=T?jsxRuntime.jsx(uo__namespace.Content,{...y,side:i,sideOffset:8,collisionPadding:8,"data-monkeys-component":"tooltip","data-slot":"content","data-placement":i,"data-portal":R,"data-disabled":s||void 0,className:l(x.slots.tooltipContent,g?.content),style:x.styles.tooltip,children:t}):null;return jsxRuntime.jsx("span",{...y,...f,ref:b,"data-monkeys-component":"tooltip","data-slot":"root","data-state":I?"open":"closed","data-placement":i,"data-portal":R,"data-disabled":s||void 0,className:l(x.slots.tooltipRoot,g?.root,d),style:m,children:jsxRuntime.jsx(uo__namespace.Provider,{delayDuration:0,skipDelayDuration:0,disableHoverableContent:true,children:jsxRuntime.jsxs(uo__namespace.Root,{open:I,onOpenChange:W,delayDuration:0,disableHoverableContent:true,children:[jsxRuntime.jsx("span",{...y,"data-monkeys-component":"tooltip","data-slot":"trigger-wrapper","data-state":I?"open":"closed","data-placement":i,"data-portal":R,"data-disabled":s||void 0,className:l(x.slots.tooltipTrigger,g?.trigger),children:jsxRuntime.jsx(uo__namespace.Trigger,{asChild:true,...y,"data-monkeys-component":"tooltip","data-slot":"trigger","data-placement":i,"data-portal":R,"data-disabled":s||void 0,children:H})}),u&&w.shouldPortal?jsxRuntime.jsx(uo__namespace.Portal,{...w.radixPortalProps,children:L}):L]})})})},"BaseTooltip"));function eo(e,t){if(typeof e!="string")return;let o=e.trim();if(!o||/[\u0000-\u001f\u007f\\]/.test(o)||/^https?:/i.test(o)&&!/^https?:\/\//i.test(o))return;let n;try{n=new URL(o,"https://monkeys.invalid/");}catch{return}if(!(n.username||n.password)){if(n.protocol==="http:"||n.protocol==="https:"||t==="link"&&(n.protocol==="mailto:"||n.protocol==="tel:"))return o;if(n.protocol==="blob:"){if(n.pathname.startsWith("null/"))return o;try{let a=new URL(n.pathname);if(["https:","http:"].includes(a.protocol)&&!a.username&&!a.password)return o}catch{}}}}r(eo,"safeDisplayUrl");function jd(e){if(typeof e!="string"||!e.trim())return;let t=e.split(",");for(let o of t){let n=o.trim().split(/\s+/);if(!eo(n[0],"media")||n.length>2||n.length===2&&!/^(?:[1-9]\d*w|(?:\d+(?:\.\d+)?|\.\d+)x)$/.test(n[1]))return}return e}r(jd,"safeDisplaySrcSet");function Kd({kind:e}){return jsxRuntime.jsx(e==="image"?lucideReact.Image:e==="video"?lucideReact.Video:e==="audio"?lucideReact.Music2:lucideReact.FileText,{className:"h-6 w-6","aria-hidden":"true"})}r(Kd,"PreviewIcon");function qd({src:e,kind:t="image",alt:o="Preview",title:n,aspectRatio:a="auto",fit:i="contain",controls:s=true,loading:u=false,empty:c="No preview available",error:d="Preview is unavailable right now.",className:g,style:m,classNames:p,mediaAttributes:f,onLoad:b,onError:v}){let[y,x]=lt.useState(false),w=eo(e,"media")??"",h=Object.fromEntries(Object.entries(f??{}).flatMap(([S,I])=>{let R=S.toLowerCase();return R==="src"||R==="srcdoc"||R==="dangerouslysetinnerhtml"?[]:R==="srcset"?[["srcSet",jd(I)]]:R==="poster"?[["poster",eo(I,"media")]]:[[S,I]]}));lt.useEffect(()=>{x(false);},[w,t]);let k=r((S,I)=>jsxRuntime.jsx("div",{className:Ht("flex min-h-24 flex-col items-center justify-center gap-2 bg-muted/30 p-4 text-center text-sm text-muted-foreground",p?.placeholder,I),role:u?"status":"img","aria-label":typeof S=="string"?S:void 0,children:S}),"renderPlaceholder");if(u)return jsxRuntime.jsx("div",{className:Ht("min-w-0 overflow-hidden",p?.root,g),style:m,"aria-busy":"true",children:jsxRuntime.jsxs("div",{className:Ht("flex min-h-24 flex-col items-center justify-center gap-2 bg-muted/30 p-4 text-sm text-muted-foreground",p?.loading),children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"h-5 w-5 animate-spin","aria-hidden":"true"}),n||"Loading preview..."]})});if(!w||y)return jsxRuntime.jsx("div",{className:Ht("min-w-0 overflow-hidden",p?.root,g),style:m,children:k(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Kd,{kind:t}),jsxRuntime.jsx("span",{className:Ht("max-w-full truncate",y?p?.error:void 0),children:y?d:c}),n?jsxRuntime.jsx("span",{className:"max-w-full truncate text-xs",children:n}):null]}))});let C=r(()=>{x(true),v?.();},"handleError"),T=t==="image"?jsxRuntime.jsx(gr,{...h,src:w,alt:o,fit:i,className:p?.media,loading:"lazy",decoding:"async",draggable:false,onLoad:b,onError:C}):t==="video"?jsxRuntime.jsx("video",{...h,src:w,className:Ht("block h-auto w-full",i==="cover"?"object-cover":"object-contain",p?.media),controls:s,preload:"metadata",onLoadedData:b,onError:C}):t==="audio"?jsxRuntime.jsx("audio",{...h,src:w,className:Ht("w-full",p?.media),controls:s,preload:"metadata",onCanPlay:b,onError:C}):k(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Kd,{kind:"file"}),jsxRuntime.jsx("span",{className:"max-w-full truncate",children:n||w})]}));return t==="image"?jsxRuntime.jsx(ns,{aspectRatio:a,className:Ht(p?.root,g),style:m,children:T}):jsxRuntime.jsx("div",{className:Ht("min-w-0 overflow-hidden",p?.root,g),style:m,children:T})}r(qd,"DataExplorerMediaPreview");var Xg={sm:"h-8 px-2.5 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-3.5 text-base"},Zg={sm:"h-8 w-8 px-0",md:"h-9 w-9 px-0",lg:"h-10 w-10 px-0"},bs={sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"};function Ia(e){return typeof e=="string"&&e.trim()?e:void 0}r(Ia,"nonEmptyText");function Qg(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-full w-full motion-safe:animate-spin motion-reduce:animate-none",fill:"none",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"9",className:"opacity-25",stroke:"currentColor",strokeWidth:"3"}),jsxRuntime.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M12 3a9 9 0 0 1 9 9h-3a6 6 0 0 0-6-6V3Z"})]})}r(Qg,"LoadingIcon");var ve=lt.forwardRef(r(function({children:t,label:o,icon:n,endIcon:a,type:i="button",title:s,ariaLabel:u,tone:c,size:d,active:g=false,iconOnly:m=false,disabled:p=false,loading:f=false,stopPropagation:b=false,appearance:v,variant:y,density:x,state:w,className:h,classNames:k,style:C,onClick:T,"aria-label":S,"aria-pressed":I,...R},W){for(let[Q,j]of [["active",g],["iconOnly",m],["disabled",p],["loading",f],["stopPropagation",b]])if(typeof j!="boolean")throw new TypeError(`BaseButton ${Q} must be a boolean.`);if(d!==void 0&&d!=="sm"&&d!=="md"&&d!=="lg")throw new TypeError('BaseButton size must be "sm", "md", or "lg".');if(c!==void 0&&c!=="default"&&c!=="primary"&&c!=="success"&&c!=="warning"&&c!=="danger"&&c!=="muted")throw new TypeError('BaseButton tone must be "default", "primary", "success", "warning", "danger", or "muted".');let H=Oe(v),L=Ne(),F=De({...H,variant:y,density:x,state:w}),$=t??o,M=O($)&&(typeof $!="string"||!!$.trim()),G=Ia(u)??Ia(S),Y=typeof $=="string"?Ia($):void 0,N=Ia(s);if(m&&!M&&!G&&!N)throw new TypeError("BaseButton iconOnly requires ariaLabel, aria-label, title, or a renderable label.");let D=G??Y??N,B=p||f,K=c??"default",J=w??(f?"loading":p?"disabled":g?"active":"idle"),V=r(Q=>{b&&Q.stopPropagation(),!B&&T?.(Q);},"handleClick");return jsxRuntime.jsxs("button",{...L,...R,ref:W,type:i,title:s,"aria-label":D,"aria-pressed":I??(g||void 0),"aria-busy":f||void 0,"data-variant":F.variant,"data-density":F.density,disabled:B,"data-monkeys-component":"button","data-slot":"root","data-state":J,"data-tone":K,"data-size":d,"data-active":g||void 0,"data-loading":f||void 0,"data-disabled":B||void 0,"data-icon-only":m||void 0,className:l(F.slots.buttonBase,m&&F.slots.buttonIconOnly,d&&Xg[d],m&&d&&Zg[d],ba(F,c,g),B&&F.slots.buttonDisabled,k?.root,h),style:{...F.styles.button,...g?F.styles.buttonActive:void 0,...B?F.styles.buttonDisabled:void 0,...C},onClick:V,children:[f?jsxRuntime.jsx("span",{"data-slot":"icon","data-state":J,"data-tone":K,"data-size":d,className:l(F.slots.buttonIcon,d&&bs[d],k?.icon),children:jsxRuntime.jsx(Qg,{})}):n?jsxRuntime.jsx("span",{"data-slot":"icon","data-state":J,"data-tone":K,"data-size":d,className:l(F.slots.buttonIcon,d&&bs[d],k?.icon),children:n}):null,m?O($)?jsxRuntime.jsx("span",{"data-slot":"label","data-state":J,"data-tone":K,"data-size":d,className:"sr-only",children:$}):null:O($)?jsxRuntime.jsx("span",{"data-slot":"label","data-state":J,"data-tone":K,"data-size":d,className:l(F.slots.buttonLabel,k?.label),children:$}):null,!f&&a?jsxRuntime.jsx("span",{"data-slot":"end-icon","data-state":J,"data-tone":K,"data-size":d,className:l(F.slots.buttonIcon,d&&bs[d],k?.icon,k?.endIcon),children:a}):null]})},"BaseButton"));function Dn(e,t){let o=monkeys.I18nTextSchema.safeParse(e);if(!o.success)throw new TypeError("Invalid I18n display text");let n;try{n=Intl.getCanonicalLocales(t)[0]??"";}catch{n="";}let a=n.split("-")[0]??"";return o.data.values[n]??o.data.values[a]??o.data.values[o.data.defaultLocale]}r(Dn,"resolveI18nDisplayText");var bn=lt.forwardRef(r(function({children:t,label:o,icon:n,tone:a,appearance:i,variant:s,density:u,state:c,className:d,classNames:g,style:m,...p},f){if(a!==void 0&&a!=="default"&&a!=="primary"&&a!=="success"&&a!=="warning"&&a!=="danger"&&a!=="muted")throw new TypeError('BaseBadge tone must be "default", "primary", "success", "warning", "danger", or "muted".');let b=Oe(i),v=Ne(),y=De({...b,variant:s,density:u,state:c}),x=t??o,w=a??"default";return jsxRuntime.jsxs("span",{...v,...p,ref:f,"data-monkeys-component":"badge","data-slot":"root","data-tone":w,"data-variant":y.variant,"data-density":y.density,"data-state":y.state,className:l(y.slots.badgeBase,sd(y,a),g?.root,d),style:{...y.styles.badge,...m},children:[n?jsxRuntime.jsx("span",{"data-slot":"icon","data-tone":w,className:l(y.slots.badgeIcon,g?.icon),children:n}):null,x!=null?jsxRuntime.jsx("span",{"data-slot":"label","data-tone":w,className:l(y.slots.badgeLabel,g?.label),children:x}):null]})},"BaseBadge"));var nb=["default","primary","success","warning","danger","muted"];function qt(e,t){if(typeof e!="boolean")throw new TypeError(`BaseContextMenu ${t} must be a boolean.`)}r(qt,"validateBoolean");function Ma(e){if(e!==void 0&&!nb.includes(e))throw new TypeError('BaseContextMenu tone must be "default", "primary", "success", "warning", "danger", or "muted".')}r(Ma,"validateTone");function rb(e){if(e!==void 0&&e!=="ltr"&&e!=="rtl")throw new TypeError('BaseContextMenu dir must be "ltr" or "rtl".')}r(rb,"validateDirection");function ab(){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:jsxRuntime.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 4.5"})})}r(ab,"CheckIcon");function ib(){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3.5 w-3.5",fill:"currentColor",children:jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"3"})})}r(ib,"DotIcon");function sb(){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:jsxRuntime.jsx("path",{d:"m6 4 4 4-4 4"})})}r(sb,"ChevronRightIcon");function fs({label:e,icon:t,shortcut:o,children:n,classNames:a,inset:i,indicator:s}){let u=n??e;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s||null,O(t)?jsxRuntime.jsx("span",{"data-slot":"icon",className:l(a?.icon),children:t}):i?jsxRuntime.jsx("span",{"aria-hidden":"true","data-slot":"icon",className:"h-4 w-4 shrink-0"}):null,O(u)?jsxRuntime.jsx("span",{"data-slot":"label",className:l(a?.label),children:u}):null,O(o)?jsxRuntime.jsx("span",{"data-slot":"shortcut",className:l(a?.shortcut),children:o}):null]})}r(fs,"renderItemContent");function Xd({children:e,trigger:t,content:o,disabled:n=false,modal:a=true,dir:i,appearance:s,className:u,classNames:c,onOpenChange:d}){qt(n,"disabled"),qt(a,"modal"),rb(i);let g=qi(),m=Oe(s);return jsxRuntime.jsxs(Qe__namespace.Root,{onOpenChange:d,modal:a,dir:i??g,children:[t?jsxRuntime.jsx(ys,{disabled:n,appearance:m,className:l(c?.trigger,u),children:t}):null,o?jsxRuntime.jsx(hs,{appearance:m,className:c?.content,children:o}):null,e]})}r(Xd,"BaseContextMenu");var ys=lt.forwardRef(r(function({children:t,disabled:o=false,asChild:n=false,appearance:a,className:i,style:s,...u},c){qt(o,"Trigger disabled"),qt(n,"Trigger asChild");let d=Oe(a),g=Ne(),m=De(d);return jsxRuntime.jsx(Qe__namespace.Trigger,{...g,...u,ref:c,asChild:n,disabled:o,"data-monkeys-component":"context-menu","data-slot":"trigger","data-disabled":o||void 0,className:l(!n&&m.slots.menuTrigger,o&&!n&&m.slots.menuItemDisabled,i),style:s,children:t})},"BaseContextMenuTrigger")),hs=lt.forwardRef(r(function({children:t,appearance:o,className:n,classNames:a,style:i,...s},u){let c=Oe(o),d=Ne(),g=De(c),m=Mo(),p=jsxRuntime.jsx(Qe__namespace.Content,{...d,...s,ref:u,"data-monkeys-component":"context-menu","data-slot":"content",className:l(g.slots.menuContent,a?.root,n),style:{...g.styles.menuContent,...i},children:t});return m.shouldPortal?jsxRuntime.jsx(Qe__namespace.Portal,{...m.radixPortalProps,children:p}):p},"BaseContextMenuContent")),Zd=lt.forwardRef(r(function({children:t,appearance:o,className:n,style:a,...i},s){let u=Oe(o),c=Ne(),d=De(u);return jsxRuntime.jsx(Qe__namespace.Label,{...c,...i,ref:s,"data-monkeys-component":"context-menu","data-slot":"label",className:l(d.slots.menuLabel,n),style:a,children:t})},"BaseContextMenuLabel")),Qd=lt.forwardRef(r(function({appearance:t,className:o,style:n,...a},i){let s=Oe(t),u=Ne(),c=De(s);return jsxRuntime.jsx(Qe__namespace.Separator,{...u,...a,ref:i,"data-monkeys-component":"context-menu","data-slot":"separator",className:l(c.slots.menuSeparator,o),style:n})},"BaseContextMenuSeparator")),Wn=lt.forwardRef(r(function({children:t,label:o,icon:n,shortcut:a,tone:i,disabled:s=false,inset:u=false,appearance:c,className:d,classNames:g,style:m,onSelect:p,...f},b){qt(s,"Item disabled"),qt(u,"Item inset"),Ma(i);let v=i??"default",y=Oe(c),x=Ne(),w=De(y);return jsxRuntime.jsx(Qe__namespace.Item,{...x,...f,ref:b,disabled:s,"data-monkeys-component":"context-menu","data-slot":"item","data-tone":v,"data-disabled":s||void 0,className:l(w.slots.menuItem,lr(w,i),s&&w.slots.menuItemDisabled,g?.root,d),style:{...w.styles.menuItem,...m},onSelect:h=>{if(s){h.preventDefault();return}p?.(h);},children:fs({children:t,label:o,icon:n,shortcut:a,inset:u,classNames:{icon:l(w.slots.menuItemIcon,g?.icon),label:l(w.slots.menuItemLabel,g?.label),shortcut:l(w.slots.menuItemShortcut,g?.shortcut)}})})},"BaseContextMenuItem"));lt.forwardRef(r(function({children:t,label:o,icon:n,shortcut:a,tone:i,disabled:s=false,inset:u=false,checked:c,onCheckedChange:d,appearance:g,className:m,classNames:p,style:f,onSelect:b,...v},y){if(qt(s,"CheckboxItem disabled"),qt(u,"CheckboxItem inset"),Ma(i),c!==void 0&&c!=="indeterminate"&&typeof c!="boolean")throw new TypeError('BaseContextMenu CheckboxItem checked must be a boolean or "indeterminate".');let x=i??"default",w=Oe(g),h=Ne(),k=De(w);return jsxRuntime.jsx(Qe__namespace.CheckboxItem,{...h,...v,ref:y,checked:c,disabled:s,"data-monkeys-component":"context-menu","data-slot":"checkbox-item","data-tone":x,"data-disabled":s||void 0,"data-checked":c==="indeterminate"?"mixed":c===void 0?void 0:String(c),onCheckedChange:C=>{s||d?.(C);},className:l(k.slots.menuItem,"pl-8",lr(k,i),s&&k.slots.menuItemDisabled,p?.root,m),style:{...k.styles.menuItem,...f},onSelect:C=>{if(s){C.preventDefault();return}b?.(C);},children:fs({children:t,label:o,icon:n,shortcut:a,inset:u,classNames:{icon:l(k.slots.menuItemIcon,p?.icon),label:l(k.slots.menuItemLabel,p?.label),shortcut:l(k.slots.menuItemShortcut,p?.shortcut)},indicator:jsxRuntime.jsx(Qe__namespace.ItemIndicator,{"data-slot":"indicator",className:l(k.slots.menuCheckboxIndicator,p?.indicator),children:jsxRuntime.jsx(ab,{})})})})},"BaseContextMenuCheckboxItem"));lt.forwardRef(r(function({children:t,label:o,icon:n,shortcut:a,tone:i,disabled:s=false,inset:u=false,value:c,appearance:d,className:g,classNames:m,style:p,onSelect:f,...b},v){qt(s,"RadioItem disabled"),qt(u,"RadioItem inset"),Ma(i);let y=i??"default",x=Oe(d),w=Ne(),h=De(x);return jsxRuntime.jsx(Qe__namespace.RadioItem,{...w,...b,ref:v,value:c,disabled:s,"data-monkeys-component":"context-menu","data-slot":"radio-item","data-tone":y,"data-value":c,"data-disabled":s||void 0,className:l(h.slots.menuItem,"pl-8",lr(h,i),s&&h.slots.menuItemDisabled,m?.root,g),style:{...h.styles.menuItem,...p},onSelect:k=>{if(s){k.preventDefault();return}f?.(k);},children:fs({children:t,label:o,icon:n,shortcut:a,inset:u,classNames:{icon:l(h.slots.menuItemIcon,m?.icon),label:l(h.slots.menuItemLabel,m?.label),shortcut:l(h.slots.menuItemShortcut,m?.shortcut)},indicator:jsxRuntime.jsx(Qe__namespace.ItemIndicator,{"data-slot":"indicator",className:l(h.slots.menuRadioIndicator,m?.indicator),children:jsxRuntime.jsx(ib,{})})})})},"BaseContextMenuRadioItem"));lt.forwardRef(r(function({children:t,label:o,icon:n,tone:a,disabled:i=false,inset:s=false,appearance:u,className:c,classNames:d,style:g,...m},p){qt(i,"SubTrigger disabled"),qt(s,"SubTrigger inset"),Ma(a);let f=a??"default",b=Oe(u),v=Ne(),y=De(b),x=t??o;return jsxRuntime.jsxs(Qe__namespace.SubTrigger,{...v,...m,ref:p,disabled:i,"data-monkeys-component":"context-menu","data-slot":"sub-trigger","data-tone":f,"data-disabled":i||void 0,className:l(y.slots.menuSubTrigger,lr(y,a),i&&y.slots.menuItemDisabled,d?.root,c),style:{...y.styles.menuItem,...g},children:[O(n)?jsxRuntime.jsx("span",{"data-slot":"icon",className:l(y.slots.menuItemIcon,d?.icon),children:n}):s?jsxRuntime.jsx("span",{"aria-hidden":"true","data-slot":"icon",className:"h-4 w-4 shrink-0"}):null,O(x)?jsxRuntime.jsx("span",{"data-slot":"label",className:l(y.slots.menuItemLabel,d?.label),children:x}):null,jsxRuntime.jsx("span",{"data-slot":"sub-indicator",className:l(y.slots.menuSubTriggerIcon,d?.shortcut,"rtl:rotate-180"),children:jsxRuntime.jsx(sb,{})})]})},"BaseContextMenuSubTrigger"));lt.forwardRef(r(function({children:t,appearance:o,className:n,classNames:a,style:i,sideOffset:s=6,...u},c){let d=Oe(o),g=Ne(),m=De(d),p=Mo(),f=jsxRuntime.jsx(Qe__namespace.SubContent,{...g,...u,ref:c,sideOffset:s,"data-monkeys-component":"context-menu","data-slot":"sub-content",className:l(m.slots.menuSubContent,a?.root,n),style:{...m.styles.menuContent,...i},children:t});return p.shouldPortal?jsxRuntime.jsx(Qe__namespace.Portal,{...p.radixPortalProps,children:f}):f},"BaseContextMenuSubContent"));var db={1:"grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-2 xl:grid-cols-3"};function vs({items:e,columns:t=1,appearance:o,className:n,classNames:a,style:i,children:s,...u}){let c=De(o);return jsxRuntime.jsxs("dl",{...u,className:l(c.slots.descriptionListRoot,db[t],a?.root,n),style:{...c.styles.descriptionList,...i},children:[e?.map((d,g)=>jsxRuntime.jsxs("div",{className:l(c.slots.descriptionListItem,a?.item),children:[jsxRuntime.jsx("dt",{className:l(c.slots.descriptionListTerm,a?.term),children:d.term}),jsxRuntime.jsx("dd",{className:l(c.slots.descriptionListValue,a?.value),children:d.value})]},g)),s]})}r(vs,"BaseDescriptionList");var pb=["default","primary","success","warning","danger","muted"];function mo(e,t){if(typeof e!="boolean")throw new TypeError(`BaseDialog ${t} must be a boolean.`)}r(mo,"validateBoolean");function gb(e){if(!pb.includes(e))throw new TypeError('BaseDialog triggerTone must be "default", "primary", "success", "warning", "danger", or "muted".')}r(gb,"validateTriggerTone");function bb({trigger:e,triggerLabel:t,triggerIcon:o,triggerTone:n,triggerDisabled:a,theme:i}){return O(e)?jsxRuntime.jsx("span",{role:"button",tabIndex:a?-1:0,"aria-disabled":a||void 0,onKeyDown:s=>{a||(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),s.currentTarget.click());},children:e}):O(t)?jsxRuntime.jsxs("button",{type:"button",disabled:a,"aria-label":typeof t=="string"&&t.trim()?t:void 0,className:l(i.slots.buttonBase,ba(i,n),a&&i.slots.buttonDisabled),style:{...i.styles.button,...a?i.styles.buttonDisabled:void 0},children:[O(o)?jsxRuntime.jsx("span",{"data-slot":"icon",className:i.slots.buttonIcon,children:o}):null,jsxRuntime.jsx("span",{"data-slot":"label",className:i.slots.buttonLabel,children:t})]}):null}r(bb,"renderTrigger");var Ln=lt.forwardRef(r(function({open:t,defaultOpen:o=false,size:n="default",title:a,description:i,header:s,footer:u,trigger:c,triggerLabel:d,triggerIcon:g,triggerTone:m="default",triggerDisabled:p=false,closeLabel:f,closeOnEscape:b=true,closeOnOverlayClick:v=true,showCloseButton:y=true,keepMounted:x=false,trapFocus:w=true,restoreFocus:h=true,initialFocus:k="first-interactive",initialFocusRef:C,zIndex:T,portal:S=false,appearance:I,className:R,classNames:W,style:H,children:L,onOpenChange:F,id:$,...M},G){if(t!==void 0&&mo(t,"open"),mo(o,"defaultOpen"),!["default","viewport","page"].includes(n))throw new TypeError("BaseDialog size must be default, viewport or page.");if(mo(p,"triggerDisabled"),mo(b,"closeOnEscape"),mo(v,"closeOnOverlayClick"),mo(y,"showCloseButton"),mo(x,"keepMounted"),mo(w,"trapFocus"),mo(h,"restoreFocus"),mo(S,"portal"),gb(m),k!=="first-interactive"&&k!=="container"&&k!=="explicit")throw new TypeError('BaseDialog initialFocus must be "first-interactive", "container", or "explicit".');if(T!==void 0&&!Number.isFinite(T))throw new TypeError("BaseDialog zIndex must be a finite number.");let Y=vt().dialog,N=Oe(I),D=Ne(),B=f===void 0?Y.close:f,K=De(N),J=Mo({disabled:!S}),[V,Q]=lt.useState(o),j=lt.useRef(null),Z=lt.useRef(null),te=t!==void 0,ae=te?t:V,le=S&&J.shouldPortal?"portaled":"inline",A=O(a),me=O(i),P=O(s);if(y&&(typeof B!="string"||!B.trim()))throw new TypeError("BaseDialog closeLabel must be a non-empty string when showCloseButton is true.");let _=r(xe=>{te||Q(xe),F?.(xe);},"handleOpenChange");lt.useEffect(()=>{if(!ae||!x)return;let xe=j.current,oe=xe?.ownerDocument,se=oe?.defaultView;if(!xe||!oe||!se)return;Z.current=oe.activeElement instanceof se.HTMLElement?oe.activeElement:null;let Re=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),Ie=r(()=>{let U=xe.querySelector(Re);(k==="container"?xe:k==="explicit"?C?.current??xe:U??xe).focus();},"focusInitial"),ze=se.requestAnimationFrame(Ie),ce=r(U=>{if(U.key==="Escape"&&b){U.preventDefault(),U.stopPropagation(),_(false);return}if(U.key!=="Tab"||!w)return;let z=Array.from(xe.querySelectorAll(Re));if(z.length===0){U.preventDefault(),xe.focus();return}let X=z[0],ie=z[z.length-1];U.shiftKey&&oe.activeElement===X?(U.preventDefault(),ie.focus()):!U.shiftKey&&oe.activeElement===ie&&(U.preventDefault(),X.focus());},"handleKeyDown");return se.addEventListener("keydown",ce),()=>{se.cancelAnimationFrame(ze),se.removeEventListener("keydown",ce),h&&Z.current?.isConnected&&Z.current.focus();}},[b,k,C,ae,x,h,w]);let re=P||A||me?jsxRuntime.jsxs("div",{...D,"data-monkeys-component":"dialog","data-slot":"header","data-state":ae?"open":"closed","data-portal":le,className:l(K.slots.dialogHeader,W?.header,n==="page"&&"sr-only"),children:[P?s:null,A?jsxRuntime.jsx(bt__namespace.Title,{...D,"data-monkeys-component":"dialog","data-slot":"title","data-state":ae?"open":"closed","data-portal":le,className:P?"sr-only":l(K.slots.dialogTitle,W?.title),children:a}):null,me?jsxRuntime.jsx(bt__namespace.Description,{...D,"data-monkeys-component":"dialog","data-slot":"description","data-state":ae?"open":"closed","data-portal":le,className:P?"sr-only":l(K.slots.dialogDescription,W?.description),children:i}):null]}):null,fe=bb({trigger:c,triggerLabel:d,triggerIcon:g,triggerTone:m,triggerDisabled:p,theme:K}),ye=ae||x?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(bt__namespace.Overlay,{forceMount:x||void 0,hidden:!ae,...D,"aria-hidden":"true","data-monkeys-component":"dialog","data-slot":"overlay","data-portal":le,className:l(K.slots.dialogOverlay,W?.overlay),style:{...K.styles.dialogOverlay,zIndex:T,...n==="page"?{background:"transparent",backdropFilter:"none"}:{}}}),jsxRuntime.jsx("div",{...D,hidden:!ae,"data-monkeys-component":"dialog","data-slot":"content","data-state":ae?"open":"closed","data-portal":le,className:l(K.slots.dialogContent,W?.content),style:{zIndex:T,...n==="page"?{padding:0,inset:0}:{}},children:jsxRuntime.jsx(bt__namespace.Content,{forceMount:x||void 0,...D,...A?{}:{"aria-labelledby":void 0},...me?{}:{"aria-describedby":void 0},asChild:true,onOpenAutoFocus:xe=>{if(x){xe.preventDefault();return}let oe=j.current;Z.current=oe?.ownerDocument.activeElement,(k==="container"||k==="explicit")&&(xe.preventDefault(),(k==="explicit"?C?.current??oe:oe)?.focus({preventScroll:true}));},onCloseAutoFocus:xe=>{if(x||!h){xe.preventDefault();return}let oe=Z.current;oe?.isConnected&&(xe.preventDefault(),oe.focus({preventScroll:true}));},onEscapeKeyDown:xe=>{(x||!b)&&xe.preventDefault();},onPointerDownOutside:xe=>{v||xe.preventDefault();},children:jsxRuntime.jsxs("div",{...D,ref:j,tabIndex:-1,"aria-modal":"true","data-monkeys-component":"dialog","data-slot":"panel","data-portal":le,className:l(K.slots.dialogPanel,W?.panel),"data-presentation":n,style:{...K.styles.dialogPanel,...n!=="default"?{width:n==="page"?"100vw":"96vw",maxWidth:"none",height:n==="page"?"100dvh":"94dvh",maxHeight:n==="page"?"100dvh":"94dvh",display:"flex",flexDirection:"column"}:{},...n==="page"?{borderRadius:0,border:0,boxShadow:"none",margin:0,animation:"none"}:{}},children:[re,y?jsxRuntime.jsx(bt__namespace.Close,{asChild:true,children:jsxRuntime.jsx("button",{...D,type:"button","aria-label":B,title:B,"data-monkeys-component":"dialog","data-slot":"close","data-state":ae?"open":"closed","data-portal":le,className:l(K.slots.dialogClose,W?.close),children:"\xD7"})}):null,jsxRuntime.jsx("div",{...D,"data-monkeys-component":"dialog","data-slot":"body","data-state":ae?"open":"closed","data-portal":le,className:l(K.slots.dialogBody,W?.body),style:n!=="default"?{minHeight:0,flex:"1 1 0%",overflow:"hidden",padding:0}:void 0,children:L}),O(u)?jsxRuntime.jsx("div",{...D,"data-monkeys-component":"dialog","data-slot":"footer","data-state":ae?"open":"closed","data-portal":le,className:l(K.slots.dialogFooter,W?.footer),children:u}):null]})})})]}):null;return jsxRuntime.jsx("div",{...D,...M,ref:G,id:$,"data-monkeys-component":"dialog","data-slot":"root","data-state":ae?"open":"closed","data-portal":le,className:l(K.slots.dialogRoot,W?.root,R),style:H,children:jsxRuntime.jsxs(bt__namespace.Root,{open:ae,onOpenChange:_,modal:!x&&w,children:[fe?jsxRuntime.jsx(bt__namespace.Trigger,{...D,asChild:true,disabled:p,"data-monkeys-component":"dialog","data-slot":"trigger","data-portal":le,"data-tone":m,"data-disabled":p||void 0,className:l(K.slots.dialogTrigger,p&&K.slots.dialogTriggerDisabled,W?.trigger),children:fe}):null,S&&J.shouldPortal?jsxRuntime.jsx(No,{children:jsxRuntime.jsx(bt__namespace.Portal,{...J.radixPortalProps,forceMount:x||void 0,children:ye})}):jsxRuntime.jsx(No,{children:ye})]})})},"BaseDialog"));function hb(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",children:[jsxRuntime.jsx("rect",{width:"16",height:"12",x:"4",y:"6",rx:"2"}),jsxRuntime.jsx("path",{d:"M8 10h8"}),jsxRuntime.jsx("path",{d:"M8 14h5"})]})}r(hb,"DefaultEmptyIcon");var Ba=lt.forwardRef(r(function({icon:t=jsxRuntime.jsx(hb,{}),title:o,description:n,actions:a,variant:i,appearance:s,className:u,classNames:c,style:d,...g},m){let p=Oe(s),f=Ne(),b=Ro(),v=i??b.empty?.variant??"default",y=b.density==="compact"?"min-h-0 px-3 py-3":b.density==="comfortable"?"min-h-56 px-8 py-12":void 0,x=De(p);return jsxRuntime.jsxs("div",{...f,...g,ref:m,"data-monkeys-component":"empty-state","data-slot":"root","data-state":"empty","data-variant":v,"data-density":b.density,className:l(x.slots.stateRoot,y,v==="compact"&&"min-h-0 gap-1 py-3",c?.root,u),style:{...x.styles.stateRoot,...d},children:[O(t)?jsxRuntime.jsx("div",{"data-slot":"icon","data-state":"empty",className:l(x.slots.stateIcon,c?.icon),style:x.styles.stateIcon,children:t}):null,O(o)?jsxRuntime.jsx("div",{"data-slot":"title","data-state":"empty",className:l(x.slots.stateTitle,c?.title),children:o}):null,O(n)?jsxRuntime.jsx("div",{"data-slot":"description","data-state":"empty",className:l(x.slots.stateDescription,c?.description),children:n}):null,O(a)?jsxRuntime.jsx("div",{"data-slot":"actions","data-state":"empty",className:l(x.slots.stateActions,c?.actions),children:a}):null]})},"BaseEmptyState"));var rc=lt.createContext(false);function ac({children:e}){let{locale:t}=xt();return e==null||e===""?null:jsxRuntime.jsx(xr,{content:e,portal:true,children:jsxRuntime.jsx("button",{type:"button","aria-label":typeof e=="string"?e:t.startsWith("zh")?"\u8BF4\u660E":"Help","data-form-help":true,className:"inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:jsxRuntime.jsx(lucideReact.HelpCircle,{className:"h-4 w-4","aria-hidden":"true"})})})}r(ac,"BaseFormHelp");function Rb(...e){let t=e.flatMap(o=>o?.split(/\s+/).filter(Boolean)??[]);return t.length?Array.from(new Set(t)).join(" "):void 0}r(Rb,"mergeAriaIds");function ws(e,t,o){if(e===void 0)return t;if(!e.trim()||/\s/.test(e))throw new TypeError(`BaseField ${o} must be a non-empty ID without whitespace.`);return e}r(ws,"resolveOptionalId");var Po=lt.forwardRef(r(function({label:t,description:o,message:n,error:a,required:i=false,disabled:s=false,htmlFor:u,descriptionId:c,messageId:d,errorId:g,validate:m,validationMode:p="onBlur",children:f,appearance:b,className:v,classNames:y,style:x,...w},h){for(let[_,re]of [["required",i],["disabled",s]])if(typeof re!="boolean")throw new TypeError(`BaseField ${_} must be a boolean.`);if(m!==void 0&&typeof m!="function")throw new TypeError("BaseField validate must be a function.");if(p!=="onBlur"&&p!=="onChange")throw new TypeError('BaseField validationMode must be "onBlur" or "onChange".');let k=lt.useContext(rc)?"tooltip":"inline",C=lt.useId(),T=Oe(b),S=Ne(),I=De(T),R=O(o),[W,H]=lt.useState(null),L=lt.useRef(new Set),F=lt.useRef(m),$=lt.useRef(p),M=lt.useRef(s);F.current=m,$.current=p,M.current=s;let G=m!==void 0;lt.useEffect(()=>{(!G||s)&&H(null);},[s,G]),lt.useEffect(()=>{if(G&&L.current.size!==1)throw new TypeError("BaseField with validate must contain exactly one compatible Base control.")},[G]);let Y=lt.useCallback(_=>{let re=L.current;if(F.current!==void 0&&!re.has(_)&&re.size>0)throw new TypeError("BaseField with validate supports exactly one compatible Base control. Use BaseFieldset for control groups.");return re.add(_),()=>{re.delete(_);}},[]),N=lt.useCallback((_,re)=>{let fe=F.current;if(M.current||fe===void 0||$.current!==_)return;let ye=Vd(fe(re));if(ye===null){H(null);return}H(ye);},[]),D=lt.useCallback(_=>N("onBlur",_),[N]),B=lt.useCallback(_=>N("onChange",_),[N]),J=O(a)?a:W,V=O(J),Q=!V&&O(n),j=V?J:n,Z=u??`${C}-control`,te=R?ws(c,`${C}-description`,"descriptionId"):void 0,ae=Q?ws(d,`${C}-message`,"messageId"):void 0,le=V?ws(g,`${C}-error`,"errorId"):void 0,A={id:Z,"aria-describedby":Rb(te,ae),"aria-errormessage":le,"aria-invalid":V?true:void 0,"aria-required":i?true:void 0,required:i||void 0,disabled:s||void 0},me=typeof f=="function"?f(A):f,P=lt.useMemo(()=>({invalid:V,registerControl:Y,notifyBlur:D,notifyChange:B}),[V,D,B,Y]);return jsxRuntime.jsxs("div",{...S,...w,ref:h,"aria-disabled":s||void 0,"data-monkeys-component":"field","data-slot":"root","data-required":i||void 0,"data-disabled":s||void 0,"data-invalid":V||void 0,className:l(I.slots.fieldRoot,s&&I.slots.controlDisabled,y?.root,v),style:{...I.styles.field,...x},children:[O(t)?jsxRuntime.jsxs("div",{"data-slot":"label-row",className:l(I.slots.fieldLabelRow,y?.labelRow),children:[jsxRuntime.jsxs("label",{htmlFor:typeof f=="function"?Z:u,"data-slot":"label",className:l(I.slots.fieldLabel,y?.label),children:[t,i?jsxRuntime.jsxs("span",{"aria-hidden":"true","data-slot":"required-indicator",className:l(I.slots.fieldRequired,y?.required),children:[" ","*"]}):null]}),k==="tooltip"&&R?jsxRuntime.jsx(ac,{children:o}):null]}):null,R?jsxRuntime.jsx("div",{id:te,"data-slot":"description",className:l(I.slots.fieldDescription,y?.description,k==="tooltip"&&"sr-only"),children:o}):null,O(me)?jsxRuntime.jsx("div",{"data-slot":"control",className:l(I.slots.fieldControl,y?.control),style:I.styles.fieldControl,children:jsxRuntime.jsx(us.Provider,{value:P,children:me})}):null,O(j)?jsxRuntime.jsx("div",{id:V?le:ae,role:V?"alert":void 0,"data-slot":V?"error":"message",className:l(I.slots.fieldMessage,V&&"text-destructive-text",y?.message),children:j}):null]})},"BaseField"));var Ib={sm:"h-8 px-2.5 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-3.5 text-base"},to=lt.forwardRef(r(function({icon:t,trailing:o,invalid:n=false,disabled:a=false,readOnly:i=false,controlSize:s,appearance:u,className:c,classNames:d,style:g,"aria-invalid":m,onBlur:p,onChange:f,...b},v){for(let[C,T]of [["invalid",n],["disabled",a],["readOnly",i]])if(typeof T!="boolean")throw new TypeError(`BaseInput ${C} must be a boolean.`);if(s!==void 0&&s!=="sm"&&s!=="md"&&s!=="lg")throw new TypeError('BaseInput controlSize must be "sm", "md", or "lg".');let y=Oe(u),x=Ne(),w=De(y),h=Ko(),k=n||h.invalid;return jsxRuntime.jsxs("div",{...x,"data-monkeys-component":"input","data-slot":"root","data-size":s,"data-invalid":k||void 0,"data-disabled":a||void 0,"data-readonly":i||void 0,className:l(w.slots.controlWrapper,k&&w.slots.controlInvalid,a&&w.slots.controlDisabled,i&&w.slots.controlReadOnly,d?.root,c),style:{...w.styles.control,...k?w.styles.controlInvalid:void 0,...a?w.styles.controlDisabled:void 0,...g},children:[O(t)?jsxRuntime.jsx("span",{"data-slot":"icon",className:l(w.slots.controlIcon,d?.icon),children:t}):null,jsxRuntime.jsx("input",{...b,ref:v,disabled:a,readOnly:i,"aria-invalid":m??(k||void 0),"data-slot":"control","data-size":s,"data-invalid":k||void 0,"data-disabled":a||void 0,"data-readonly":i||void 0,className:l(w.slots.controlBase,w.slots.controlInput,s&&Ib[s],d?.control),onBlur:C=>{p?.(C),h.notifyBlur(C.currentTarget.value);},onChange:C=>{f?.(C),h.notifyChange(C.currentTarget.value);}}),O(o)?jsxRuntime.jsx("span",{"data-slot":"trailing",className:l(w.slots.controlTrailing,d?.trailing),children:o}):null]})},"BaseInput"));var Pb={line:"h-4 w-full",block:"h-24 w-full",circle:"aspect-square h-10 rounded-full"},Wt=lt.forwardRef(r(function({variant:t="line",animated:o=true,animation:n,appearance:a,className:i,classNames:s,style:u,...c},d){if(t!=="line"&&t!=="block"&&t!=="circle")throw new TypeError('BaseSkeleton variant must be "line", "block", or "circle".');if(typeof o!="boolean")throw new TypeError("BaseSkeleton animated must be a boolean.");let g=Oe(a),m=Ne(),p=De(g),f=Fd(n,o,d);return jsxRuntime.jsx("div",{...m,...c,ref:f.ref,"aria-hidden":"true","data-monkeys-component":"skeleton","data-slot":"root","data-variant":t,"data-animated":f.mode!=="none","data-state":f.mode!=="none"?"animated":"static","data-skeleton-animation":f.mode,className:l(p.slots.skeletonRoot,Pb[t],f.mode==="pulse"&&"motion-safe:animate-pulse motion-reduce:animate-none",s?.root,i),style:{...p.styles.skeleton,...f.style,...u}})},"BaseSkeleton"));function Wb({className:e}){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:e,fill:"none",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"9",className:"opacity-25",stroke:"currentColor",strokeWidth:"3"}),jsxRuntime.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M12 3a9 9 0 0 1 9 9h-3a6 6 0 0 0-6-6V3Z"})]})}r(Wb,"DefaultLoadingIcon");var Yo=lt.forwardRef(r(function({icon:t,title:o,description:n,actions:a,variant:i,animation:s,appearance:u,className:c,classNames:d,style:g,role:m="status","aria-live":p="polite","aria-busy":f=true,"aria-label":b,"aria-labelledby":v,...y},x){let w=Oe(u),h=Ne(),{loading:k}=vt(),C=Ro(),T=i??C.loading?.variant??"spinner",S=C.density==="compact"?"min-h-0 px-3 py-3":C.density==="comfortable"?"min-h-56 px-8 py-12":void 0,I=De(w),R=T==="skeleton"&&t===void 0?void 0:t===void 0?jsxRuntime.jsx(Wb,{className:l("motion-safe:animate-spin motion-reduce:animate-none",I.slots.loadingSpinner)}):t,W=b??(v===void 0?typeof o=="string"?o:k.spinner:void 0);return jsxRuntime.jsxs("div",{...h,...y,ref:x,role:m,"aria-live":p,"aria-busy":f,"aria-label":W,"aria-labelledby":v,"data-monkeys-component":"loading-state","data-slot":"root","data-state":"loading","data-variant":T,"data-density":C.density,className:l(I.slots.stateRoot,S,d?.root,c),style:{...I.styles.stateRoot,...g},children:[T==="skeleton"?jsxRuntime.jsx(jo,{animation:s,children:jsxRuntime.jsxs("div",{className:"flex w-full max-w-sm flex-col gap-3","data-slot":"skeleton",children:[jsxRuntime.jsx(Wt,{variant:"block",className:"h-20"}),jsxRuntime.jsx(Wt,{variant:"line",className:"w-4/5"}),jsxRuntime.jsx(Wt,{variant:"line",className:"w-3/5"})]})}):O(R)?jsxRuntime.jsx("div",{"data-slot":"icon","data-state":"loading",className:l(I.slots.stateIcon,d?.icon),style:I.styles.stateIcon,children:R}):null,T!=="skeleton"&&O(o)?jsxRuntime.jsx("div",{"data-slot":"title","data-state":"loading",className:l(I.slots.stateTitle,d?.title),children:o}):null,T!=="skeleton"&&O(n)?jsxRuntime.jsx("div",{"data-slot":"description","data-state":"loading",className:l(I.slots.stateDescription,d?.description),children:n}):null,O(a)?jsxRuntime.jsx("div",{"data-slot":"actions","data-state":"loading",className:l(I.slots.stateActions,d?.actions),children:a}):null]})},"BaseLoadingState"));var $b=500;function jb({options:e,value:t,defaultValue:o,invalid:n,disabled:a,openForPreview:i,portal:s,required:u}){for(let[c,d]of [["invalid",n],["disabled",a],["openForPreview",i],["portal",s]])if(typeof d!="boolean")throw new TypeError(`BaseSelect ${c} must be a boolean.`);if(u!==void 0&&typeof u!="boolean")throw new TypeError("BaseSelect required must be a boolean.");if(e!==void 0&&!Array.isArray(e))throw new TypeError("BaseSelect options must be an array.");if(e?.forEach((c,d)=>{if(!c||typeof c!="object")throw new TypeError(`BaseSelect option at index ${d} must be an object.`);if(typeof c.value!="string")throw new TypeError(`BaseSelect option value at index ${d} must be a string.`);if(c.disabled!==void 0&&typeof c.disabled!="boolean")throw new TypeError(`BaseSelect option disabled at index ${d} must be a boolean.`);if(c.textValue!==void 0&&typeof c.textValue!="string")throw new TypeError(`BaseSelect option textValue at index ${d} must be a string.`)}),e?.length){if(t!==void 0&&typeof t!="string"&&typeof t!="number")throw new TypeError("BaseSelect value must be a string or number when options are used.");if(o!==void 0&&typeof o!="string"&&typeof o!="number")throw new TypeError("BaseSelect defaultValue must be a string or number when options are used.")}}r(jb,"validateSelectProps");function Ts(e){return typeof e=="string"||typeof e=="number"?String(e):""}r(Ts,"normalizeValue");function Kb(e,t){if(t!==void 0)return e.find(o=>o.value===t)}r(Kb,"findOption");function wr(e,t){let o=e.findIndex(n=>n.value===t&&!n.disabled);return o>=0?o:e.findIndex(n=>!n.disabled)}r(wr,"getInitialActiveIndex");function Ub(e,t,o){if(!e.length)return -1;let n=t>=0?t:o===1?-1:0;for(let a=1;a<=e.length;a+=1){let i=(n+a*o+e.length)%e.length;if(!e[i]?.disabled)return i}return -1}r(Ub,"getNextEnabledIndex");function qb(e,t){if(t==="first")return e.findIndex(o=>!o.disabled);for(let o=e.length-1;o>=0;o-=1)if(!e[o]?.disabled)return o;return -1}r(qb,"getBoundaryEnabledIndex");function sc(e){return e.textValue!==void 0?e.textValue:typeof e.label=="string"?e.label:e.value}r(sc,"getOptionText");function Yb(e){return e.replace(/[^a-zA-Z0-9_-]/g,"-")}r(Yb,"toDomId");var po=lt.forwardRef(r(function({options:t,placeholder:o,icon:n,invalid:a=false,disabled:i=false,openForPreview:s=false,portal:u=false,appearance:c,className:d,classNames:g,style:m,children:p,value:f,defaultValue:b,onBlur:v,onChange:y,onFocus:x,onInvalid:w,name:h,id:k,required:C,"aria-invalid":T,"aria-label":S,"aria-labelledby":I,"aria-describedby":R,"aria-errormessage":W,"aria-required":H,...L},F){jb({options:t,value:f,defaultValue:b,invalid:a,disabled:i,openForPreview:s,portal:u,required:C});let $=Oe(c),M=Ne(),G=De($),Y=Ko(),N=a||Y.invalid,D=lt.useId(),B=k??D,K=`${B}-button`,J=`${B}-listbox`,V=lt.useRef(null),Q=lt.useRef(null),j=lt.useRef(null),Z=lt.useRef([]),te=lt.useRef(false),ae=lt.useRef(""),le=lt.useRef(null),A=t??[],me=A.length>0,P=s,[_,re]=lt.useState(false),[fe,ye]=lt.useState(false),xe=P||_,oe=Mo({disabled:P||!u?true:void 0}),{refs:se,floatingStyles:Re,isPositioned:Ie,placement:ze}=react.useFloating({transform:false,open:me&&xe&&oe.shouldPortal,placement:"bottom-start",strategy:"fixed",whileElementsMounted:oe.shouldPortal?react.autoUpdate:void 0,middleware:[react.offset(6),react.flip({padding:8}),react.shift({padding:8}),react.size({padding:8,apply({rects:pe,availableHeight:Ge,elements:ee}){Object.assign(ee.floating.style,{width:`${pe.reference.width}px`,maxHeight:`min(15rem, ${Math.max(0,Ge)}px)`});}})]}),ce=lt.useCallback(pe=>{Q.current=pe,se.setReference(pe);},[se.setReference]),[U,z]=lt.useState(()=>Ts(b)),X=f!==void 0,ie=X?Ts(f):U,q=Kb(A,ie),[de,we]=lt.useState(()=>wr(A,ie)),Ce=de>=0&&!A[de]?.disabled?de:wr(A,ie),Me=A.map((pe,Ge)=>`${B}-option-${Ge}-${Yb(pe.value)}`),Be=q?.label??o,_e=!q,Ze=L.dir??M.dir,Fe=i?"disabled":N?"invalid":xe?"open":"closed",ot=r(pe=>{j.current=pe,typeof F=="function"?F(pe):F&&(F.current=pe);},"setSelectRef"),We=r(pe=>{v?.(pe),Y.notifyBlur(pe.currentTarget.value);},"handleNativeBlur"),Le=r(pe=>{y?.(pe),Y.notifyChange(pe.currentTarget.value);},"handleNativeChange"),ne=r(()=>{we(wr(A,ie));},"resetActiveIndex"),Se=r(()=>{ne(),P||re(false);},"cancelAndClose"),Ve=r((pe,Ge=false)=>{ye(Ge),we(pe??wr(A,ie)),P||re(true);},"openMenu"),Ye=r(pe=>{let Ge=j.current;if(!Ge)return;let ee=Ge.ownerDocument.defaultView;if(!ee)throw new Error("BaseSelect cannot dispatch change without an owning window.");let ue=Object.getOwnPropertyDescriptor(ee.HTMLSelectElement.prototype,"value")?.set;if(!ue)throw new Error("BaseSelect could not resolve the native select value setter.");ue.call(Ge,pe),Ge.dispatchEvent(new ee.Event("change",{bubbles:true}));},"notifyChange"),nt=r(pe=>{let Ge=A[pe];!Ge||Ge.disabled||i||(we(pe),Ge.value!==ie&&(X||z(Ge.value),Ye(Ge.value)),P||re(false));},"commitIndex"),gt=r(pe=>{pe<0||A[pe]?.disabled||(we(pe),xe||Ve(pe));},"moveActive"),Pt=r((pe,Ge)=>{let ee=pe.currentTarget.ownerDocument.defaultView;if(!ee)return;let ue=`${ae.current}${Ge}`.toLocaleLowerCase();ae.current=ue,le.current&&le.current.ownerWindow.clearTimeout(le.current.timerId),le.current={ownerWindow:ee,timerId:ee.setTimeout(()=>{ae.current="",le.current=null;},$b)};let he=Array.from(ue).every(Ee=>Ee===ue[0])?Ge.toLocaleLowerCase():ue,ke=xe?Ce:A.findIndex(Ee=>Ee.value===ie&&!Ee.disabled);for(let Ee=1;Ee<=A.length;Ee+=1){let ge=(ke+Ee+A.length)%A.length,He=A[ge];if(!He?.disabled&&sc(He).trim().toLocaleLowerCase().startsWith(he)){pe.preventDefault(),gt(ge);return}}},"handleTypeahead"),Ue=r(pe=>{if(!(i||te.current||pe.nativeEvent.isComposing)){if(pe.key==="ArrowDown"||pe.key==="ArrowUp"){pe.preventDefault();let Ge=A.findIndex(ue=>ue.value===ie&&!ue.disabled);gt(Ub(A,xe?Ce:Ge,pe.key==="ArrowDown"?1:-1));return}if(pe.key==="Home"||pe.key==="End"){pe.preventDefault(),gt(qb(A,pe.key==="Home"?"first":"last"));return}if(pe.key==="Enter"||pe.key===" "){pe.preventDefault(),xe?nt(Ce):Ve();return}if(pe.key==="Escape"&&xe){pe.preventDefault(),Se();return}if(pe.key==="Tab"&&xe){nt(Ce);return}pe.key.length===1&&!pe.ctrlKey&&!pe.metaKey&&!pe.altKey&&!/\s/.test(pe.key)&&Pt(pe,pe.key);}},"handleKeyDown"),Ut=r(pe=>{x?.(pe),pe.defaultPrevented||Q.current?.focus();},"handleCustomFocus"),Ft=r(pe=>{w?.(pe),pe.preventDefault(),Q.current?.focus();},"handleCustomInvalid");return lt.useEffect(()=>{if(!me||!xe||P)return;let pe=V.current?.ownerDocument;if(!pe)return;let Ge=r(ee=>{!V.current?.contains(ee.target)&&!se.floating.current?.contains(ee.target)&&Se();},"handlePointerDown");return pe.addEventListener("pointerdown",Ge),()=>{pe.removeEventListener("pointerdown",Ge);}},[P,me,xe,A,ie]),lt.useEffect(()=>{!me||!xe||Ce<0||Z.current[Ce]?.scrollIntoView?.({block:"nearest"});},[me,xe,Ce]),lt.useEffect(()=>{if(!me||X)return;let pe=j.current,Ge=pe?.form,ee=pe?.ownerDocument.defaultView;if(!Ge||!ee)return;let ue=r(()=>{ee.setTimeout(()=>{let Pe=Ts(b);z(Pe),we(wr(A,Pe)),P||re(false);},0);},"handleReset");return Ge.addEventListener("reset",ue),()=>Ge.removeEventListener("reset",ue)},[b,P,X,me,A]),lt.useEffect(()=>()=>{le.current&&le.current.ownerWindow.clearTimeout(le.current.timerId);},[]),me?jsxRuntime.jsxs("div",{...M,ref:V,dir:Ze,"data-monkeys-component":"select","data-slot":"root","data-state":Fe,"data-native":"false",className:l(G.slots.controlWrapper,"overflow-visible",xe&&"z-50",N&&G.slots.controlInvalid,i&&G.slots.controlDisabled,g?.root,d),style:{...G.styles.control,...N?G.styles.controlInvalid:void 0,...i?G.styles.controlDisabled:void 0,...m},children:[O(n)?jsxRuntime.jsx("span",{className:l(G.slots.controlIcon,g?.icon),children:n}):null,jsxRuntime.jsx("button",{...M,ref:ce,type:"button",id:K,role:"combobox",disabled:i,dir:Ze,"aria-haspopup":"listbox","aria-expanded":xe,"aria-controls":J,"aria-activedescendant":xe&&Ce>=0?Me[Ce]:void 0,"aria-autocomplete":"none","aria-invalid":T??(N||void 0),"aria-label":S,"aria-labelledby":I,"aria-describedby":R,"aria-errormessage":W,"aria-required":H??(C||void 0),"data-monkeys-component":"select","data-slot":"trigger","data-state":Fe,className:l(G.slots.controlBase,G.slots.controlSelect,"flex items-center text-left",g?.control),onClick:pe=>{xe?Se():Ve(void 0,pe.detail>0);},onBlur:pe=>{!V.current?.contains(pe.relatedTarget)&&!se.floating.current?.contains(pe.relatedTarget)&&(Se(),Y.notifyBlur(ie));},onCompositionStart:()=>{te.current=true;},onCompositionEnd:()=>{te.current=false;},onKeyDown:Ue,children:jsxRuntime.jsx("span",{className:l("min-w-0 flex-1 truncate",_e&&G.slots.selectPlaceholder,_e&&g?.placeholder),children:Be})}),jsxRuntime.jsx("span",{className:l(G.slots.selectChevron,xe&&"rotate-[225deg]")}),jsxRuntime.jsxs("select",{...M,...L,ref:ot,id:k,name:h,value:ie,required:C,disabled:i,dir:Ze,"aria-hidden":"true",tabIndex:-1,"data-monkeys-component":"select","data-slot":"native","data-state":Fe,"data-native":"false",className:G.slots.selectNative,onBlur:v,onFocus:Ut,onInvalid:Ft,onChange:Le,children:[O(o)?jsxRuntime.jsx("option",{value:"",disabled:true,children:o}):null,A.map(pe=>jsxRuntime.jsx("option",{value:pe.value,disabled:pe.disabled,children:sc(pe)},pe.value))]}),xe?$d(jsxRuntime.jsx("div",{...M,ref:oe.shouldPortal?se.setFloating:void 0,id:J,role:"listbox",dir:Ze,"aria-labelledby":K,"data-monkeys-component":"select","data-slot":"menu","data-portal":oe.shouldPortal?"portaled":"inline","data-state":"open","data-side":oe.shouldPortal?ze.split("-")[0]:"bottom",className:l(G.slots.selectMenu,oe.shouldPortal&&ze.startsWith("top")?"origin-bottom":"origin-top",fe&&!P&&(!oe.shouldPortal||Ie)&&"motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95 motion-safe:duration-150 motion-safe:ease-out",g?.menu),style:{...G.styles.selectMenu,...oe.shouldPortal?{...Re,right:"auto",visibility:Ie?"visible":"hidden"}:void 0},children:A.map((pe,Ge)=>{let ee=pe.value===ie,ue=Ge===Ce,Pe=pe.disabled?"disabled":ue?"active":ee?"selected":"idle";return lt.createElement("button",{...M,ref:he=>{Z.current[Ge]=he;},key:pe.value,id:Me[Ge],type:"button",role:"option",tabIndex:-1,disabled:pe.disabled,dir:Ze,"aria-selected":ee,"data-monkeys-component":"select","data-slot":"option","data-state":Pe,"data-active":ue||void 0,"data-selected":ee||void 0,"data-disabled":pe.disabled||void 0,className:l(G.slots.selectOption,ue&&G.slots.selectOptionActive,ee&&G.slots.selectOptionSelected,pe.disabled&&G.slots.selectOptionDisabled,g?.option),style:{...G.styles.selectOption,...ue?G.styles.selectOptionActive:void 0,...ee?G.styles.selectOptionSelected:void 0},onMouseDown:he=>he.preventDefault(),onClick:()=>nt(Ge)},jsxRuntime.jsx("span",{className:"min-w-0 flex-1 truncate",children:pe.label}))})}),oe):null]}):jsxRuntime.jsxs("div",{...M,"data-monkeys-component":"select","data-slot":"root","data-state":Fe,"data-native":"true",className:l(G.slots.controlWrapper,N&&G.slots.controlInvalid,i&&G.slots.controlDisabled,g?.root,d),style:{...G.styles.control,...N?G.styles.controlInvalid:void 0,...i?G.styles.controlDisabled:void 0,...m},children:[O(n)?jsxRuntime.jsx("span",{className:l(G.slots.controlIcon,g?.icon),children:n}):null,jsxRuntime.jsxs("select",{...M,...L,id:k,ref:F,name:h,value:f,defaultValue:b,required:C,disabled:i,"aria-invalid":T??(N||void 0),"aria-label":S,"aria-labelledby":I,"aria-describedby":R,"aria-errormessage":W,"aria-required":H,"data-monkeys-component":"select","data-slot":"native","data-state":Fe,"data-native":"true",onBlur:We,onFocus:x,onInvalid:w,onChange:Le,className:l(G.slots.controlBase,G.slots.controlSelect,g?.control),children:[O(o)?jsxRuntime.jsx("option",{value:"",disabled:true,children:o}):null,p]}),jsxRuntime.jsx("span",{className:G.slots.selectChevron})]})},"BaseSelect"));function Zb(e,t){return t&&e?.some(o=>o.value===t)&&!e.find(n=>n.value===t)?.disabled?t:e?.find(o=>!o.disabled)?.value??e?.[0]?.value}r(Zb,"getInitialSegmentValue");function yn({options:e=[],value:t,defaultValue:o,appearance:n,className:a,classNames:i,style:s,onValueChange:u,...c}){let d=De(n),[g,m]=lt.useState(()=>Zb(e,o)),p=t!==void 0,f=p?t:g,b=r((y,x)=>{x||(p||m(y),u?.(y));},"handleSelect"),v=r(y=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(y.key))return;let x=e.filter(S=>!S.disabled);if(x.length===0)return;y.preventDefault();let w=Math.max(0,x.findIndex(S=>S.value===f)),h=y.key==="Home"?0:y.key==="End"?x.length-1:y.key==="ArrowLeft"||y.key==="ArrowUp"?(w-1+x.length)%x.length:(w+1)%x.length,k=x[h],C=y.currentTarget.querySelectorAll('[role="radio"]'),T=Array.from(C).find(S=>S.dataset.value===k.value);b(k.value),T?.focus();},"handleKeyDown");return jsxRuntime.jsx("div",{...c,role:"radiogroup","aria-orientation":"horizontal",className:l(d.slots.segmentedRoot,i?.root,a),style:{...d.styles.segmentedRoot,...s},onKeyDown:v,children:e.map(y=>{let x=y.value===f;return jsxRuntime.jsxs("button",{type:"button",role:"radio","data-value":y.value,"aria-checked":x,tabIndex:x?0:-1,disabled:y.disabled,className:l(d.slots.segmentedItem,x&&d.slots.segmentedItemActive,y.disabled&&d.slots.segmentedItemDisabled,i?.item),style:d.styles.segmentedItem,onClick:()=>b(y.value,y.disabled),children:[O(y.icon)?jsxRuntime.jsx("span",{className:l("inline-flex h-4 w-4 shrink-0",i?.icon),children:y.icon}):null,jsxRuntime.jsx("span",{className:l("min-w-0 truncate",i?.label),children:y.label})]},y.value)})})}r(yn,"BaseSegmentedControl");function tf({kind:e}){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-7 w-7",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",children:{error:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"9"}),jsxRuntime.jsx("path",{d:"M12 7v6"}),jsxRuntime.jsx("path",{d:"M12 17h.01"})]}),permission:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2"}),jsxRuntime.jsx("path",{d:"M8 10V7a4 4 0 0 1 8 0v3"})]}),offline:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M5 12.5a10 10 0 0 1 14 0"}),jsxRuntime.jsx("path",{d:"M8.5 16a5 5 0 0 1 7 0"}),jsxRuntime.jsx("path",{d:"M12 20h.01"}),jsxRuntime.jsx("path",{d:"m4 4 16 16"})]}),fallback:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"9"}),jsxRuntime.jsx("path",{d:"M9.5 9a2.5 2.5 0 1 1 4.2 1.8c-1 .8-1.7 1.2-1.7 2.7"}),jsxRuntime.jsx("path",{d:"M12 17h.01"})]})}[e]})}r(tf,"SystemStateIcon");var Sr=lt.forwardRef(r(function({kind:t="fallback",icon:o,title:n,description:a,actions:i,appearance:s,className:u,classNames:c,style:d,role:g,"aria-live":m,...p},f){let b=Oe(s),v=Ne(),y=Ro(),x=y.density==="compact"?"min-h-0 px-3 py-3":y.density==="comfortable"?"min-h-56 px-8 py-12":void 0,w=De(b),h=o===void 0?jsxRuntime.jsx(tf,{kind:t}):o,k=g??(t==="error"||t==="offline"?"alert":"status");return jsxRuntime.jsxs("div",{...v,...p,ref:f,role:k,"aria-live":m??(k==="alert"?"assertive":"polite"),"data-monkeys-component":"system-state","data-slot":"root","data-state":t,"data-density":y.density,className:l(w.slots.stateRoot,x,c?.root,u),style:{...w.styles.stateRoot,...d},children:[O(h)?jsxRuntime.jsx("div",{"data-slot":"icon","data-state":t,className:l(w.slots.stateIcon,c?.icon),style:w.styles.stateIcon,children:h}):null,O(n)?jsxRuntime.jsx("div",{"data-slot":"title","data-state":t,className:l(w.slots.stateTitle,c?.title),children:n}):null,O(a)?jsxRuntime.jsx("div",{"data-slot":"description","data-state":t,className:l(w.slots.stateDescription,c?.description),children:a}):null,O(i)?jsxRuntime.jsx("div",{"data-slot":"actions","data-state":t,className:l(w.slots.stateActions,c?.actions),children:i}):null]})},"BaseSystemState"));var Ns="application/x-monkeys-base-table-column",Oa=8;function Ds(e,t){typeof e=="function"?e(t):e&&(e.current=t);}r(Ds,"assignRef");function Do(e,t){if(t!==void 0&&typeof t!="boolean")throw new Error(`BaseTable ${e} must be a boolean.`)}r(Do,"assertBoolean");function An(e,t,o){if(t!==void 0&&!o.includes(t))throw new Error(`BaseTable ${e} must be one of ${o.map(n=>`"${n}"`).join(", ")}.`)}r(An,"assertEnum");function Is(e,t){if(t!==void 0&&(typeof t!="string"||t.trim().length===0))throw new Error(`BaseTable ${e} must be a non-empty string when provided.`)}r(Is,"assertOptionalLabel");function Es(e,t){if(t!==void 0&&typeof t!="function")throw new Error(`BaseTable ${e} must be a function when provided.`)}r(Es,"assertOptionalFunction");function Xo(e,t,o={}){if(e!==void 0){if(typeof e=="number"){if(!Number.isFinite(e)||e<0)throw new Error(`BaseTable ${t} must be a finite non-negative number${o.stringAllowed?" or a non-empty CSS size string":""}.`);return}if(!(o.stringAllowed&&typeof e=="string"&&e.trim().length>0))throw new Error(`BaseTable ${t} must be ${o.stringAllowed?"a finite non-negative number or a non-empty CSS size string":"a finite non-negative number"}.`)}}r(Xo,"validateCssSizeValue");function sf(e){if(e===void 0)return;if(!Array.isArray(e))throw new Error("BaseTable columns must be an array when provided.");let t=new Set;return e.forEach((o,n)=>{if(!o||typeof o!="object"||Array.isArray(o))throw new Error(`BaseTable column at index ${n} must be an object.`);let a=o;if(typeof a.id!="string"||a.id.trim().length===0)throw new Error(`BaseTable column id at index ${n} must be a non-empty string.`);let i=a.id.trim();if(a.id!==i)throw new Error(`BaseTable column id "${a.id}" must not contain surrounding whitespace.`);if(t.has(i))throw new Error(`BaseTable columns contain duplicate id "${i}".`);if(t.add(i),Xo(a.width,`column "${i}" width`,{stringAllowed:true}),Xo(a.minWidth,`column "${i}" minWidth`,{stringAllowed:true}),Xo(a.maxWidth,`column "${i}" maxWidth`,{stringAllowed:true}),typeof a.minWidth=="number"&&typeof a.maxWidth=="number"&&a.minWidth>a.maxWidth)throw new Error(`BaseTable column "${i}" minWidth cannot be greater than maxWidth.`)}),t}r(sf,"validateColumns");function lf(e,t){if(e===void 0)return;if(!Array.isArray(e))throw new Error("BaseTable columnOrder must be an array when provided.");let o=new Set;if(e.forEach((n,a)=>{if(typeof n!="string"||n.trim().length===0)throw new Error(`BaseTable columnOrder entry at index ${a} must be a non-empty string.`);let i=n.trim();if(n!==i)throw new Error(`BaseTable columnOrder entry "${n}" must not contain surrounding whitespace.`);if(o.has(i))throw new Error(`BaseTable columnOrder contains duplicate id "${i}".`);if(t&&!t.has(i))throw new Error(`BaseTable columnOrder contains unknown column id "${i}".`);o.add(i);}),t&&o.size!==t.size){let n=[...t].filter(a=>!o.has(a));throw new Error(`BaseTable columnOrder must contain every configured column id; missing ${n.map(a=>`"${a}"`).join(", ")}.`)}}r(lf,"validateColumnOrder");function df(e,t){if(e!==void 0){if(!e||typeof e!="object"||Array.isArray(e)||![Object.prototype,null].includes(Object.getPrototypeOf(e)))throw new Error("BaseTable columnSizes must be a plain record when provided.");Object.entries(e).forEach(([o,n])=>{let a=o.trim();if(a.length===0)throw new Error("BaseTable columnSizes keys must be non-empty strings.");if(o!==a)throw new Error(`BaseTable columnSizes key "${o}" must not contain surrounding whitespace.`);if(t&&!t.has(a))throw new Error(`BaseTable columnSizes contains unknown column id "${o}".`);Xo(n,`columnSizes["${o}"]`);});}}r(df,"validateColumnSizes");function Fa(e){let t=e.ownerDocument.defaultView;return t?t.getComputedStyle(e).direction==="rtl":e.closest('[dir="rtl"]')!==null}r(Fa,"isRtl");function cf(e,t){if(e.setPointerCapture)try{e.setPointerCapture(t);}catch(o){let n=e.ownerDocument.defaultView?.DOMException;if(n&&o instanceof n&&o.name==="NotFoundError")return;throw o}}r(cf,"setPointerCaptureIfAvailable");var uc=lt.createContext(null);function Zo(e){let t=lt.useContext(uc),o=Oe(e);if(t){let a=e===void 0?t.appearance:o;return {...t,theme:e===void 0?t.theme:De(a),appearance:a}}let n=De(o);return {appearance:o,theme:n,layout:"native",setDraggingColumnId:r(()=>{},"setDraggingColumnId")}}r(Zo,"useBaseTableContext");function mc(e){let t=false;return lt.Children.forEach(e,o=>{if(t||!lt.isValidElement(o))return;let n=o.props;if(n.layout==="split-scroll"){t=true;return}n.children&&(t=mc(n.children));}),t}r(mc,"hasSplitScrollTable");function Ms(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r(Ms,"toCssSize");function uf(e,t){if(e!==void 0){if(typeof e=="number"){if(!Number.isFinite(e)||e<0)throw new Error(`BaseTable ${t} must be a finite non-negative number when numeric.`);return `${e}px`}if(e.trim().length===0)throw new Error(`BaseTable ${t} must not be an empty CSS size.`);return e}}r(uf,"validateTableCssSize");function Bs(e,t,o){if(e!==void 0){if(typeof e=="number"){if(!Number.isFinite(e)||e<0)throw new Error(`BaseTable split-scroll column "${t}" has invalid ${o}. Expected a finite non-negative number.`);return `${e}px`}if(e.trim().length===0)throw new Error(`BaseTable split-scroll column "${t}" has an empty ${o} value.`);return e}}r(Bs,"validateCssSize");function dc(e,t,o){if(!(e===void 0||typeof e!="number")){if(!Number.isFinite(e)||e<0)throw new Error(`BaseTable split-scroll column "${t}" has invalid ${o}. Expected a finite non-negative number.`);return e}}r(dc,"validateNumericSize");function mf(e,t){if(!e?.length)throw new Error('BaseTable layout="split-scroll" requires at least one column definition.');let o=new Set;return `${e.map((a,i)=>{let s=a.id.trim();if(!s)throw new Error(`BaseTable split-scroll column at index ${i} requires a non-empty id.`);if(o.has(s))throw new Error(`BaseTable layout="split-scroll" received duplicate column id "${s}".`);o.add(s);let u=t?.[s],c=dc(a.minWidth,s,"minWidth"),d=dc(a.maxWidth,s,"maxWidth");if(c!==void 0&&d!==void 0&&d<c)throw new Error(`BaseTable split-scroll column "${s}" has maxWidth smaller than minWidth.`);let g=Bs(a.minWidth,s,"minWidth"),m=Bs(a.maxWidth,s,"maxWidth"),p=u!==void 0?Jo(u,c,d):a.width,f=Bs(p,s,"width");return f||`minmax(${g??"0px"}, ${m??"1fr"})`}).join(" ")} var(--base-table-split-scrollbar-gutter)`}r(mf,"buildSplitColumnTemplate");function Jo(e,t,o){let n=t??48,a=o??Number.POSITIVE_INFINITY;return Math.min(Math.max(e,n),a)}r(Jo,"clampWidth");function Ps(e,t,o){if(!e||t===o)return;let n=e.indexOf(t),a=e.indexOf(o);if(n<0||a<0)return;let i=[...e],[s]=i.splice(n,1);return i.splice(a,0,s),i}r(Ps,"getNextColumnOrder");function pf(e){switch(e){case "asc":return "ascending";case "desc":return "descending";default:return}}r(pf,"sortAriaValue");function gf(e){switch(e){case "center":return "center";case "right":return "flex-end";default:return "flex-start"}}r(gf,"getSplitHeadJustifyContent");function bf(e){switch(e){case "top":return "flex-start";case "bottom":return "flex-end";default:return "center"}}r(bf,"getSplitHeadAlignItems");function ff({direction:e,className:t}){return jsxRuntime.jsx("span",{"aria-hidden":"true",className:l(t,e==="desc"&&"rotate-180",(!e||e==="none")&&"opacity-45"),children:"\u25B2"})}r(ff,"SortIndicator");function yf(){return jsxRuntime.jsxs("span",{"aria-hidden":"true",className:"grid gap-0.5",children:[jsxRuntime.jsx("span",{className:"h-0.5 w-0.5 rounded-full bg-current"}),jsxRuntime.jsx("span",{className:"h-0.5 w-0.5 rounded-full bg-current"}),jsxRuntime.jsx("span",{className:"h-0.5 w-0.5 rounded-full bg-current"})]})}r(yf,"DragHandleIcon");var Va=lt.forwardRef(r(function({appearance:t,attachedFooter:o=false,children:n,className:a,classNames:i,style:s,...u},c){Do("attachedFooter",o);let d=Oe(t),g=Ne(),m=De(d),f=mc(n)?{overflow:"hidden",scrollbarGutter:"auto"}:void 0;return jsxRuntime.jsx("div",{...g,...u,ref:c,"data-monkeys-component":"table-container","data-slot":"container","data-base-table-container":"","data-attached-footer":o?"":void 0,className:l(m.slots.tableContainer,o&&m.slots.tableContainerFooterAttached,i?.root,a),style:{...m.styles.tableContainer,...o?m.styles.tableContainerFooterAttached:void 0,...f,...s},children:n})},"BaseTableContainer")),Ga=lt.forwardRef(r(function({appearance:t,className:o,classNames:n,style:a,layout:i="native",columns:s,bodyMaxHeight:u,bodyClassName:c,columnOrder:d,columnSizes:g,columnDragEnabled:m=false,columnResizeEnabled:p=false,onColumnOrderChange:f,onColumnSizeChange:b,...v},y){An("layout",i,["native","split-scroll"]),Do("columnDragEnabled",m),Do("columnResizeEnabled",p),Es("onColumnOrderChange",f),Es("onColumnSizeChange",b),Xo(u,"bodyMaxHeight",{stringAllowed:true});let x=sf(s);lf(d,x),df(g,x);let w=Oe(t),h=Ne(),k=De(w),[C,T]=lt.useState(),S=lt.useRef(null),I=lt.useRef(null),R=i==="split-scroll",W=R?mf(s,g):void 0,H={appearance:w,theme:k,layout:i,columnTemplate:W,bodyMaxHeight:u,bodyClassName:c,splitHeaderRef:S,splitFooterRef:I,columnOrder:d,columnSizes:g,columnDragEnabled:m,columnResizeEnabled:p,onColumnOrderChange:f,onColumnSizeChange:b,draggingColumnId:C,setDraggingColumnId:T};return jsxRuntime.jsx(uc.Provider,{value:H,children:jsxRuntime.jsx("table",{...h,...v,ref:y,"data-monkeys-component":"table","data-slot":"root","data-base-table-layout":i,className:l(k.slots.tableRoot,R&&k.slots.tableSplitRoot,n?.root,o),style:{...k.styles.table,...R?k.styles.tableSplitRoot:void 0,...W?{"--base-table-column-template":W}:void 0,...a}})})},"BaseTable")),_a=lt.forwardRef(r(function({appearance:t,className:o,classNames:n,style:a,...i},s){let{layout:u,splitHeaderRef:c,theme:d}=Zo(t),g=u==="split-scroll";return jsxRuntime.jsx("thead",{...i,ref:r(p=>{c&&(c.current=g?p:null),Ds(s,p);},"setHeaderRef"),"data-slot":"header",className:l(d.slots.tableHeader,g&&d.slots.tableSplitHeader,n?.root,o),style:{...d.styles.tableHeader,...g?d.styles.tableSplitHeader:void 0,...a}})},"BaseTableHeader")),$a=lt.forwardRef(r(function({appearance:t,className:o,classNames:n,onScroll:a,style:i,...s},u){let{bodyClassName:c,bodyMaxHeight:d,layout:g,splitFooterRef:m,splitHeaderRef:p,theme:f}=Zo(t),b=g==="split-scroll";return jsxRuntime.jsx("tbody",{...s,ref:u,"data-slot":"body",onScroll:b?y=>{let x=y.currentTarget.scrollLeft;p?.current&&(p.current.scrollLeft=x),m?.current&&(m.current.scrollLeft=x),a?.(y);}:a,className:l(f.slots.tableBody,b&&f.slots.tableSplitBody,b&&c,n?.root,o),style:{...f.styles.tableBody,...b?f.styles.tableSplitBody:void 0,...b&&d!==void 0?{maxHeight:uf(d,"bodyMaxHeight")}:void 0,...i}})},"BaseTableBody"));lt.forwardRef(r(function({appearance:t,className:o,classNames:n,style:a,...i},s){let{layout:u,splitFooterRef:c,theme:d}=Zo(t),g=u==="split-scroll";return jsxRuntime.jsx("tfoot",{...i,ref:r(p=>{c&&(c.current=g?p:null),Ds(s,p);},"setFooterRef"),"data-slot":"footer",className:l(d.slots.tableFooter,g&&d.slots.tableSplitFooter,n?.root,o),style:{...d.styles.tableFooter,...g?d.styles.tableSplitFooter:void 0,...a}})},"BaseTableFooter"));var hn=lt.forwardRef(r(function({interactive:t,selected:o,disabled:n,appearance:a,className:i,classNames:s,style:u,...c},d){Do("interactive",t),Do("selected",o),Do("disabled",n);let{layout:g,theme:m}=Zo(a),p=g==="split-scroll";return jsxRuntime.jsx("tr",{...c,ref:d,"data-slot":"row","aria-disabled":n||void 0,"data-state":o?"selected":void 0,className:l(m.slots.tableRow,p&&m.slots.tableSplitRow,t&&!n&&m.slots.tableRowInteractive,o&&m.slots.tableRowSelected,n&&m.slots.tableRowDisabled,s?.root,i),style:{...m.styles.tableRow,...p?m.styles.tableSplitRow:void 0,...u}})},"BaseTableRow")),ja=lt.forwardRef(r(function({presentation:t,columnId:o,align:n,verticalAlign:a,icon:i,label:s,description:u,meta:c,actions:d,trailing:g,sortable:m,sortDirection:p="none",sortLabel:f,onSort:b,draggable:v,dragLabel:y,resizable:x,resizeLabel:w,width:h,minWidth:k,maxWidth:C,appearance:T,className:S,classNames:I,style:R,children:W,onDragOver:H,onDrop:L,...F},$){if(An("head presentation",t,["classic-data-grid"]),An("head align",n,["left","center","right"]),An("head verticalAlign",a,["top","middle","bottom"]),An("head sortDirection",p,["asc","desc","none"]),Do("head sortable",m),Do("head draggable",v),Do("head resizable",x),Es("head onSort",b),Is("head sortLabel",f),Is("head dragLabel",y),Is("head resizeLabel",w),o!==void 0&&(typeof o!="string"||o.trim().length===0))throw new Error("BaseTable head columnId must be a non-empty string when provided.");if(Xo(h,"head width",{stringAllowed:true}),Xo(k,"head minWidth"),Xo(C,"head maxWidth"),k!==void 0&&C!==void 0&&k>C)throw new Error("BaseTable head minWidth cannot be greater than maxWidth.");let M=Zo(T),{theme:G}=M,Y=vt().table,N=M.layout==="split-scroll",D=t==="classic-data-grid",B=n??(N?"center":"left"),K=a??"middle",J=lt.useRef(null),V=lt.useRef(()=>{}),[Q,j]=lt.useState(),Z=r(ce=>{J.current=ce,Ds($,ce);},"setHeadRef"),te=o&&M.columnSizes?.[o]!==void 0?M.columnSizes[o]:h,ae=!!(o&&v!==false&&(v||M.columnDragEnabled)&&M.columnOrder&&M.onColumnOrderChange),le=!!(o&&x!==false&&(x||M.columnResizeEnabled)&&M.onColumnSizeChange);if(le&&C!==void 0&&C<(k??48))throw new Error("BaseTable resizable head maxWidth cannot be smaller than its effective minWidth.");let A=!!(m||b),me=pf(p),P=O(s)?s:W,_=O(P)||O(u),re=f??(_?void 0:Y.sortColumn({columnId:o?.trim()||void 0})),fe=ae||O(i)||O(s)||O(u)||O(c)||O(d)||O(g)||A,ye=D?jsxRuntime.jsx("div",{className:l("flex h-full min-w-0 select-none items-center",B==="center"?"justify-center":B==="right"?"justify-end":"justify-start",ae&&"cursor-grab active:cursor-grabbing"),...ae?{draggable:true,role:"button",tabIndex:0,"aria-disabled":false,"aria-roledescription":"sortable",onKeyDown:r(ce=>{if(!o||!M.columnOrder||ce.key!=="ArrowLeft"&&ce.key!=="ArrowRight")return;let U=M.columnOrder.indexOf(o);if(U<0)return;let z=Fa(ce.currentTarget),X=ce.key==="ArrowLeft"?-1:1,ie=U+(z?-X:X),q=M.columnOrder[ie];if(!q)return;let de=Ps(M.columnOrder,o,q);de&&(ce.preventDefault(),M.onColumnOrderChange?.(de,{columnId:o,targetColumnId:q}));},"onKeyDown"),onDragStart:r(ce=>{ce.stopPropagation(),M.setDraggingColumnId(o),ce.dataTransfer.effectAllowed="move",ce.dataTransfer.setData(Ns,o);},"onDragStart"),onDragEnd:r(ce=>{ce.stopPropagation(),M.setDraggingColumnId(void 0);},"onDragEnd")}:{},children:P}):fe?jsxRuntime.jsxs("div",{className:l(G.slots.tableHeadContent,I?.content),children:[jsxRuntime.jsxs("div",{className:l(G.slots.tableHeadMain,I?.main),children:[ae?jsxRuntime.jsx("button",{type:"button",draggable:true,title:y,"aria-label":y??Y.dragColumn({columnId:o}),className:l(G.slots.tableHeadDragHandle,I?.dragHandle),onClick:ce=>ce.stopPropagation(),onKeyDown:ce=>{if(!o||!M.columnOrder||ce.key!=="ArrowLeft"&&ce.key!=="ArrowRight")return;let U=M.columnOrder.indexOf(o);if(U<0)return;let z=Fa(ce.currentTarget),X=ce.key==="ArrowLeft"?-1:1,ie=U+(z?-X:X),q=M.columnOrder[ie];if(!q)return;let de=Ps(M.columnOrder,o,q);de&&(ce.preventDefault(),M.onColumnOrderChange?.(de,{columnId:o,targetColumnId:q}));},onDragStart:ce=>{ce.stopPropagation(),M.setDraggingColumnId(o),ce.dataTransfer.effectAllowed="move",ce.dataTransfer.setData(Ns,o);},onDragEnd:ce=>{ce.stopPropagation(),M.setDraggingColumnId(void 0);},children:jsxRuntime.jsx(yf,{})}):null,i?jsxRuntime.jsx("span",{className:l(G.slots.tableHeadIcon,I?.icon),children:i}):null,A?jsxRuntime.jsxs("button",{type:"button",disabled:!b,title:f,"aria-label":re,className:l(G.slots.tableHeadSortButton,I?.sortButton),onClick:ce=>{ce.stopPropagation(),b?.(o);},children:[jsxRuntime.jsxs("span",{className:l(G.slots.tableHeadText,I?.text),children:[O(P)?jsxRuntime.jsx("span",{className:l(G.slots.tableHeadLabel,I?.label),children:P}):null,O(u)?jsxRuntime.jsx("span",{className:l(G.slots.tableHeadDescription,I?.description),children:u}):null]}),jsxRuntime.jsx(ff,{direction:p,className:l(G.slots.tableHeadSortIcon,I?.sortIcon)})]}):jsxRuntime.jsxs("span",{className:l(G.slots.tableHeadText,I?.text),children:[O(P)?jsxRuntime.jsx("span",{className:l(G.slots.tableHeadLabel,I?.label),children:P}):null,O(u)?jsxRuntime.jsx("span",{className:l(G.slots.tableHeadDescription,I?.description),children:u}):null]})]}),O(c)||O(d)||O(g)?jsxRuntime.jsxs("div",{className:l(G.slots.tableHeadActions,I?.actions),children:[O(c)?jsxRuntime.jsx("span",{className:l(G.slots.tableHeadMeta,I?.meta),children:c}):null,d,g]}):null]}):W,xe=r(ce=>{H?.(ce),!(!ae||!M.draggingColumnId||M.draggingColumnId===o)&&(ce.preventDefault(),ce.dataTransfer.dropEffect="move");},"handleDragOver"),oe=r(ce=>{if(L?.(ce),!ae||!o)return;let U=M.draggingColumnId||ce.dataTransfer.getData(Ns);if(!U||U===o)return;let z=Ps(M.columnOrder,U,o);z&&(ce.preventDefault(),M.onColumnOrderChange?.(z,{columnId:U,targetColumnId:o})),M.setDraggingColumnId(void 0);},"handleDrop"),se=r(ce=>{if(!le||!o||!M.onColumnSizeChange||ce.button!==0&&ce.pointerType!=="touch")return;ce.preventDefault(),ce.stopPropagation(),V.current();let U=ce.clientX,z=Re??J.current?.offsetWidth??k??48,X=Jo(z,k,C),ie=ce.pointerId,q=ce.currentTarget,de=q.ownerDocument,we=Fa(q),Ce=r(_e=>{if(_e.pointerId!==ie)return;let Ze=Jo(X+(we?U-_e.clientX:_e.clientX-U),k,C);M.onColumnSizeChange?.(o,Ze,{columnId:o,previousWidth:X,minWidth:k,maxWidth:C});},"handlePointerMove"),Me=r(_e=>{_e.pointerId===ie&&V.current();},"handleStop"),Be=r(_e=>{_e.pointerId===ie&&V.current();},"handleLostCapture");V.current=()=>{de.removeEventListener("pointermove",Ce),de.removeEventListener("pointerup",Me),de.removeEventListener("pointercancel",Me),q.removeEventListener("lostpointercapture",Be),q.hasPointerCapture?.(ie)&&q.releasePointerCapture?.(ie),V.current=()=>{};},cf(q,ie),de.addEventListener("pointermove",Ce),de.addEventListener("pointerup",Me),de.addEventListener("pointercancel",Me),q.addEventListener("lostpointercapture",Be);},"handleResizePointerDown"),Re=typeof te=="number"?Jo(te,k,C):Q,Ie=Re??Jo(k??48,k,C),ze=r(ce=>{if(!le||!o||!M.onColumnSizeChange)return;let U=Fa(ce.currentTarget),z=Re??Jo(J.current?.offsetWidth||k||48,k,C),X;ce.key==="ArrowLeft"&&(X=z+(U?Oa:-Oa)),ce.key==="ArrowRight"&&(X=z+(U?-Oa:Oa)),ce.key==="Home"&&k!==void 0&&(X=k),ce.key==="End"&&C!==void 0&&(X=C),X!==void 0&&(ce.preventDefault(),ce.stopPropagation(),M.onColumnSizeChange(o,Jo(X,k,C),{columnId:o,previousWidth:z,minWidth:k,maxWidth:C}));},"handleResizeKeyDown");return lt.useEffect(()=>{if(typeof te=="number"){j(void 0);return}let ce=J.current?.getBoundingClientRect().width;if(ce&&Number.isFinite(ce)){let U=Jo(ce,k,C);j(z=>z===U?z:U);}},[te,k,C,le]),lt.useEffect(()=>(le||V.current(),()=>V.current()),[le,o,M.onColumnSizeChange]),jsxRuntime.jsxs("th",{...F,ref:Z,"data-slot":"head","data-v2-header-drag-id":D&&ae?o:void 0,scope:F.scope??"col","aria-sort":me,className:l(G.slots.tableHead,N&&G.slots.tableSplitHead,B==="center"&&G.slots.tableCellAlignCenter,B==="right"&&G.slots.tableCellAlignRight,D&&"!relative !h-9 !px-3 !align-middle !text-sm !font-medium !text-muted-foreground after:pointer-events-none after:absolute after:bottom-2 after:right-0 after:top-2 after:w-px after:bg-border/50 after:content-['']",I?.root,S),style:{...G.styles.tableHead,...N?G.styles.tableSplitHead:void 0,width:N?void 0:Ms(te),minWidth:N?void 0:Ms(k),maxWidth:N?void 0:Ms(C),...N?{alignItems:bf(K),justifyContent:gf(B),textAlign:B}:a?{verticalAlign:a}:void 0,...R},onDragOver:xe,onDrop:oe,children:[ye,le&&D?jsxRuntime.jsx("div",{"data-column-resize-handle":"true",className:"absolute right-0 top-0 z-20 h-full w-2 cursor-col-resize touch-none select-none hover:bg-muted",onPointerDown:se}):le?jsxRuntime.jsx("button",{type:"button",role:"separator","aria-orientation":"vertical","aria-valuenow":Ie,"aria-valuemin":k??48,"aria-valuemax":C,"aria-valuetext":`${Ie}px`,title:w,"aria-label":w??Y.resizeColumn({columnId:o}),className:l(G.slots.tableHeadResizeHandle,I?.resizeHandle),onClick:ce=>ce.stopPropagation(),onKeyDown:ze,onPointerDown:se}):null]})},"BaseTableHead")),Tr=lt.forwardRef(r(function({align:t="left",appearance:o,className:n,classNames:a,style:i,...s},u){An("cell align",t,["left","center","right"]);let{layout:c,theme:d}=Zo(o),g=c==="split-scroll";return jsxRuntime.jsx("td",{...s,ref:u,"data-slot":"cell",className:l(d.slots.tableCell,g&&d.slots.tableSplitCell,t==="center"&&d.slots.tableCellAlignCenter,t==="right"&&d.slots.tableCellAlignRight,a?.root,n),style:{...d.styles.tableCell,...g?d.styles.tableSplitCell:void 0,...i}})},"BaseTableCell"));lt.forwardRef(r(function({appearance:t,className:o,classNames:n,style:a,...i},s){let{theme:u}=Zo(t);return jsxRuntime.jsx("caption",{...i,ref:s,"data-slot":"caption",className:l(u.slots.tableCaption,n?.root,o),style:{...u.styles.tableCaption,...a}})},"BaseTableCaption"));var Ka=lt.forwardRef(r(function({colSpan:t,icon:o,title:n,description:a,actions:i,children:s,appearance:u,className:c,classNames:d,style:g,...m},p){if(!Number.isSafeInteger(t)||t<1)throw new Error("BaseTable empty colSpan must be a positive safe integer.");let{layout:f,theme:b}=Zo(u),v=f==="split-scroll",y=O(o)||O(n)||O(a)||O(i);return jsxRuntime.jsx("tr",{...m,ref:p,"data-slot":"empty-row",className:l(b.slots.tableEmptyRow,v&&b.slots.tableSplitRow,d?.row,c),style:{...b.styles.tableEmpty,...v?b.styles.tableSplitRow:void 0,...g},children:jsxRuntime.jsx("td",{colSpan:t,"data-slot":"empty-cell",className:l(b.slots.tableEmptyCell,v&&b.slots.tableSplitCell,d?.cell),style:v?{gridColumn:"1 / -1"}:void 0,children:y?jsxRuntime.jsxs("div",{className:l(b.slots.tableEmptyContent,d?.content),children:[O(o)?jsxRuntime.jsx("div",{className:l(b.slots.tableEmptyIcon,d?.icon),children:o}):null,O(n)?jsxRuntime.jsx("div",{className:l(b.slots.tableEmptyTitle,d?.title),children:n}):null,O(a)?jsxRuntime.jsx("div",{className:l(b.slots.tableEmptyDescription,d?.description),children:a}):null,O(i)?jsxRuntime.jsx("div",{className:l(b.slots.tableEmptyActions,d?.actions),children:i}):null]}):s})})},"BaseTableEmpty"));var xf={sm:"min-h-20 px-2.5 py-1.5 text-xs leading-5",md:"min-h-24 px-3 py-2 text-sm leading-6",lg:"min-h-28 px-3.5 py-2.5 text-base leading-7"},Rr=lt.forwardRef(r(function({invalid:t=false,disabled:o=false,readOnly:n=false,controlSize:a,appearance:i,className:s,classNames:u,style:c,"aria-invalid":d,onBlur:g,onChange:m,...p},f){for(let[h,k]of [["invalid",t],["disabled",o],["readOnly",n]])if(typeof k!="boolean")throw new TypeError(`BaseTextarea ${h} must be a boolean.`);if(a!==void 0&&a!=="sm"&&a!=="md"&&a!=="lg")throw new TypeError('BaseTextarea controlSize must be "sm", "md", or "lg".');let b=Oe(i),v=Ne(),y=De(b),x=Ko(),w=t||x.invalid;return jsxRuntime.jsx("textarea",{...v,...p,ref:f,disabled:o,readOnly:n,"aria-invalid":d??(w||void 0),"data-monkeys-component":"textarea","data-slot":"control","data-size":a,"data-invalid":w||void 0,"data-disabled":o||void 0,"data-readonly":n||void 0,className:l(y.slots.controlWrapper,y.slots.controlBase,y.slots.controlTextarea,w&&y.slots.controlInvalid,o&&y.slots.controlDisabled,n&&y.slots.controlReadOnly,a&&xf[a],u?.control,s),style:{...y.styles.control,...w?y.styles.controlInvalid:void 0,...o?y.styles.controlDisabled:void 0,...c},onBlur:h=>{g?.(h),x.notifyBlur(h.currentTarget.value);},onChange:h=>{m?.(h),x.notifyChange(h.currentTarget.value);}})},"BaseTextarea"));var pc={path:["d"],circle:["cx","cy","r"],rect:["x","y","width","height","rx","ry"],polyline:["points"],line:["x1","x2","y1","y2"],ellipse:["cx","cy","rx","ry"],polygon:["points"]};function Os(e){if(!Array.isArray(e)||!e.length||e.length>256)return;let t=[];for(let o of e){if(!Array.isArray(o)||o.length!==2||typeof o[0]!="string"||!Object.prototype.hasOwnProperty.call(pc,o[0]))return;let n=o[0],a=o[1];if(!a||typeof a!="object"||Array.isArray(a)||Object.getPrototypeOf(a)!==Object.prototype)return;let i={};for(let[s,u]of Object.entries(Object.getOwnPropertyDescriptors(a))){if(!("value"in u)||typeof u.value!="string")return;let c=u.value;if(s==="key"){if(c.length>256)return}else if(s==="fill"){if(c!=="currentColor"&&c!=="none")return}else if(pc[n].includes(s)){if(s==="d"){if(!c.length||c.length>8192||!/^[MmZzLlHhVvCcSsQqTtAa0-9eE+.,\s-]+$/.test(c))return}else if(s==="points"){if(!c.length||c.length>8192||!/^[0-9eE+.,\s-]+$/.test(c))return}else if(!c.trim()||c.length>128||!Number.isFinite(Number(c)))return}else return;i[s]=c;}t.push([n,i]);}return t}r(Os,"parseAssetIconNodes");var On=lt.forwardRef(r(function({icon:t,alt:o,normalizeImageIcon:n=false,className:a,style:i,...s},u){let c=Ne(),d=Xi()??runtime.resolveAssetIconNodes,g=od(),m=t.kind==="image"?t.src:void 0,[p,f]=lt.useState();lt.useEffect(()=>{if(!m||!g)return;let F=new AbortController;return Promise.resolve().then(()=>g(m,F.signal)).then($=>{F.signal.aborted||f({reference:m,resolver:g,src:eo($,"media")});}).catch(()=>{F.signal.aborted||f({reference:m,resolver:g});}),()=>F.abort()},[m,g]);let b=g?p&&p.reference===m&&p.resolver===g?p.src:void 0:eo(m,"media"),[v,y]=lt.useState(),x=lt.useRef(null);lt.useEffect(()=>{let F=x.current;b&&F?.complete&&y({source:b,resolver:g,ready:F.naturalWidth>0});},[b,g]);let w=t.kind==="lucide"?t.name:void 0,h=lt.useMemo(()=>{if(w)try{return d.peek?Os(d.peek(w)):void 0}catch{return}},[w,d]),[k,C]=lt.useState();lt.useEffect(()=>{let F=true;return w&&!h&&Promise.resolve().then(()=>d(w)).then($=>{F&&C({name:w,resolver:d,nodes:Os($)});}).catch(()=>{F&&C({name:w,resolver:d,nodes:void 0});}),()=>{F=false;}},[w,d,h]);let T=k?.name===w&&k?.resolver===d,S=h??(T?k?.nodes:void 0),I=!!(m&&g&&!(p?.reference===m&&p?.resolver===g)),R=v?.source===b&&v?.resolver===g,W=!!(w&&!h&&!T),H=t.kind==="emoji"?"ready":t.kind==="image"?b?R?v?.ready?"ready":"error":"loading":I?"loading":"error":S?"ready":W?"loading":"error",L=H==="loading"?jsxRuntime.jsx(Wt,{variant:"block",className:"h-5 w-5 max-h-full max-w-full rounded"}):jsxRuntime.jsx(lucideReact.Wrench,{"aria-hidden":"true",className:"h-5 w-5 max-h-full max-w-full"});return jsxRuntime.jsx("div",{...c,...s,ref:u,role:"img","aria-label":o,"data-icon-state":H,"aria-busy":H==="loading"||void 0,className:l("monkeys-asset-icon flex h-11 w-11 shrink-0 items-center justify-center rounded-xl text-muted-foreground",t.kind==="emoji"?"text-2xl":t.kind==="image"&&!n?"overflow-hidden border":"bg-muted",a),style:{...t.kind==="emoji"&&t.backgroundColor?{backgroundColor:t.backgroundColor}:{},...i},children:t.kind==="image"?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[b&&H!=="error"&&jsxRuntime.jsx("img",{ref:x,src:b,alt:"","aria-hidden":"true",onLoad:F=>{F.currentTarget===x.current&&y({source:b,resolver:g,ready:true});},onError:F=>{F.currentTarget===x.current&&y({source:b,resolver:g,ready:false});},style:H==="loading"?{display:"none"}:void 0,className:n?"h-5 w-5 object-contain":"h-full w-full object-cover"},b),H!=="ready"&&L]}):t.kind==="emoji"?jsxRuntime.jsx("span",{"aria-hidden":"true",children:t.value}):S?jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"h-5 w-5 max-h-full max-w-full",children:S.map(([F,$],M)=>{let{key:G,...Y}=$;return lt.createElement(F,{...Y,key:G??M})})}):L})},"BaseAssetIcon"));function bc({expanded:e}){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:jsxRuntime.jsx("path",{d:e?"m6 9 6 6 6-6":"m9 18 6-6-6-6"})})}r(bc,"ChevronIcon");function Bf(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"12",cy:"5",r:"1"}),jsxRuntime.jsx("circle",{cx:"12",cy:"19",r:"1"})]})}r(Bf,"MoreIcon");function Pf(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[jsxRuntime.jsx("circle",{cx:"9",cy:"6",r:"1"}),jsxRuntime.jsx("circle",{cx:"9",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"9",cy:"18",r:"1"}),jsxRuntime.jsx("circle",{cx:"15",cy:"6",r:"1"}),jsxRuntime.jsx("circle",{cx:"15",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"15",cy:"18",r:"1"})]})}r(Pf,"GripIcon");function hc(e,t){for(let o of e??[])o.defaultExpanded&&t.add(o.id),hc(o.children,t);}r(hc,"collectDefaultExpandedNodeIds");function fc(e,t){let o=new Set(t??[]);for(let n of e)hc(n.nodes,o);return o}r(fc,"buildDefaultNodeExpandedSet");function yc(e,t){let o=new Set(t??[]);for(let n of e)(n.hideHeader||n.defaultExpanded!==false)&&o.add(n.id);return o}r(yc,"buildDefaultGroupExpandedSet");function xc(e,t,o,n){for(let[a,i]of (e??[]).entries())n.set(i.id,{node:i,group:t,parentId:o,index:a}),xc(i.children,t,i.id,n);}r(xc,"flattenNodes");function Ef(e){let t=new Map;for(let o of e)xc(o.nodes,o,void 0,t);return t}r(Ef,"buildFlattenedNodeMap");function Df(e,t){return [...t??[],...e.actions??[]]}r(Df,"getNodeActions");function Wf(e,t){return [...t??[],...e.actions??[]]}r(Wf,"getGroupActions");function Fs({groups:e,nodes:t,context:o,selectedNodeId:n,selectedGroupId:a,expandedNodeIds:i,defaultExpandedNodeIds:s,expandedGroupIds:u,defaultExpandedGroupIds:c,resetExpansionKey:d,nodeActions:g,groupActions:m,indentSize:p=16,indentOffset:f=8,actionIcon:b,empty:v,loading:y=false,loadingNode:x,error:w,labels:h,reorderMode:k="none",appearance:C,className:T,classNames:S,onSelectNode:I,onSelectGroup:R,onExpandedNodeIdsChange:W,onExpandedGroupIdsChange:H,onAction:L,onReorderNodes:F}){let $=vt().dataExplorer.viewTree,M=Jl(Ul(C)),G=h?.actions??$.actions,Y=h?.expand??$.expand,N=h?.collapse??$.collapse,D=x??h?.loading??$.loading,B=v??h?.empty??$.empty,K=Array.isArray(e),J=lt.useMemo(()=>K?e:[{id:"__root__",hideHeader:true,defaultExpanded:true,nodes:Array.isArray(t)?t:[]}],[e,K,t]),V=lt.useMemo(()=>Ef(J),[J]),[Q,j]=lt.useState(()=>fc(J,s)),[Z,te]=lt.useState(()=>yc(J,c)),[ae,le]=lt.useState(),[A,me]=lt.useState();lt.useEffect(()=>{j(fc(J,s)),te(yc(J,c));},[c,s,d]);let P=i!==void 0?new Set(i):Q,_=u!==void 0?new Set(u):Z,re=r((U,z)=>{let X=new Set(P);z?X.add(U):X.delete(U),i===void 0&&j(X),W?.([...X]);},"setNodeExpanded"),fe=r((U,z)=>{let X=new Set(_);z?X.add(U):X.delete(U),u===void 0&&te(X),H?.([...X]);},"setGroupExpanded"),ye=r((U,z)=>z.type==="node"?{type:"node",action:U,node:z.node,group:z.group,context:o}:{type:"group",action:U,group:z.group,context:o},"createActionContext"),xe=r((U,z)=>{let X=U.filter(ie=>{let q=ye(ie,z);return ir(ie.visible,q)??true});return X.length===0?null:jsxRuntime.jsxs(Gt__namespace.Root,{children:[jsxRuntime.jsx(Gt__namespace.Trigger,{asChild:true,children:jsxRuntime.jsx("button",{type:"button",title:G,"aria-label":G,className:l(M.slots.menuTrigger,z.type==="group"?M.slots.treeGroupActions:M.slots.treeNodeActions,z.type==="group"?S?.groupActions:l(S?.nodeActions,S?.itemActions)),onClick:ie=>ie.stopPropagation(),children:b??jsxRuntime.jsx(Bf,{})})}),jsxRuntime.jsx(Gt__namespace.Portal,{children:jsxRuntime.jsx(Gt__namespace.Content,{align:"end",sideOffset:6,className:l(M.slots.menuContent,S?.menuContent),style:M.styles.menuContent,onClick:ie=>ie.stopPropagation(),children:X.map(ie=>{let q=ye(ie,z),de=(ir(ie.disabled,q)??false)||(ir(ie.loading,q)??false),we=ir(ie.active,q)??false;return ie.render?jsxRuntime.jsx("div",{children:ie.render(q)},ie.id):jsxRuntime.jsxs("div",{children:[ie.separatorBefore?jsxRuntime.jsx(Gt__namespace.Separator,{className:M.slots.menuSeparator}):null,jsxRuntime.jsxs(Gt__namespace.Item,{title:ie.title,disabled:de,className:l(M.slots.menuItem,Xl(M,ie.tone),we&&"bg-accent text-accent-foreground",S?.menuItem),style:M.styles.menuItem,onSelect:()=>{de||(ie.onAction?.(q),L?.(q));},children:[ie.icon?jsxRuntime.jsx("span",{className:M.slots.menuItemIcon,children:ie.icon}):null,jsxRuntime.jsx("span",{className:M.slots.menuItemLabel,children:ie.label})]}),ie.separatorAfter?jsxRuntime.jsx(Gt__namespace.Separator,{className:M.slots.menuSeparator}):null]},ie.id)})})})]})},"renderActions"),oe=r((U,z)=>{U.preventDefault();let X=ae||U.dataTransfer.getData("application/x-data-explorer-node");if(!X||X===z.id||!F){le(void 0),me(void 0);return}let ie=V.get(X),q=V.get(z.id);if(!ie||!q){le(void 0),me(void 0);return}let de=ie.parentId===q.parentId&&ie.group?.id===q.group?.id;if(k==="same-parent"&&!de){le(void 0),me(void 0);return}let we={activeNode:ie.node,overNode:q.node,activeGroup:ie.group,overGroup:q.group,activeParentId:ie.parentId,overParentId:q.parentId,oldIndex:ie.index,newIndex:q.index,sameParent:de,context:o};F(we),le(void 0),me(void 0);},"handleDrop"),se=r((U,z,X)=>{let ie=Array.isArray(U.children)?U.children:[],q=ie.length>0,de=U.collapsible===false||P.has(U.id),we=n===U.id,Ce=U.selectable!==false&&!U.disabled,Me=k!=="none"&&!!F&&U.reorderable!==false,Be=ae===U.id,_e=A===U.id&&ae!==U.id,Ze=Df(U,g);return jsxRuntime.jsxs("div",{"data-data-explorer-entry":"node","data-data-explorer-node-id":U.id,"data-data-explorer-group-id":z?.id,className:l(M.slots.treeNode,S?.node,S?.item,U.className),onDragOver:Fe=>{!ae||!Me||(Fe.preventDefault(),me(U.id));},onDragLeave:()=>{A===U.id&&me(void 0);},onDrop:Fe=>oe(Fe,U),children:[jsxRuntime.jsxs("div",{className:l(M.slots.treeNodeButton,we&&M.slots.treeNodeSelected,U.disabled&&M.slots.treeNodeDisabled,Be&&M.slots.treeNodeDragging,_e&&"ring-1 ring-primary/30",we&&S?.itemSelected,we&&S?.nodeSelected,U.disabled&&S?.nodeDisabled,Be&&S?.nodeDragging,S?.nodeButton,S?.itemButton),style:{paddingLeft:`calc(${(U.indentLevel??X)*p+f}px + var(--data-explorer-tree-group-indent, 0px))`},role:"treeitem","aria-selected":we||void 0,"aria-disabled":U.disabled||void 0,"aria-expanded":q?de:void 0,"aria-label":U.ariaLabel,tabIndex:Ce?0:-1,onClick:()=>{Ce&&I?.(U,o);},onKeyDown:Fe=>{Fe.target===Fe.currentTarget&&Ce&&(Fe.key!=="Enter"&&Fe.key!==" "||(Fe.preventDefault(),I?.(U,o)));},children:[Me?jsxRuntime.jsx("span",{draggable:true,className:l(M.slots.treeNodeDragHandle,S?.nodeDragHandle),onClick:Fe=>Fe.stopPropagation(),onDragStart:Fe=>{Fe.stopPropagation(),Fe.dataTransfer.effectAllowed="move",Fe.dataTransfer.setData("application/x-data-explorer-node",U.id),le(U.id);},onDragEnd:()=>{le(void 0),me(void 0);},children:jsxRuntime.jsx(Pf,{})}):null,q?jsxRuntime.jsx("button",{type:"button",className:l(M.slots.treeNodeToggle,S?.nodeToggle,S?.expander),"aria-label":de?N:Y,onClick:Fe=>{Fe.stopPropagation(),re(U.id,!de);},children:jsxRuntime.jsx(bc,{expanded:de})}):jsxRuntime.jsx("span",{className:l(M.slots.treeNodeToggle,S?.nodeToggle)}),U.icon?jsxRuntime.jsx("span",{className:l(M.slots.treeNodeIcon,S?.nodeIcon,S?.itemIcon),children:U.icon}):null,jsxRuntime.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[jsxRuntime.jsx("span",{className:l(M.slots.treeNodeLabel,S?.nodeLabel,S?.itemLabel),children:U.label}),U.description?jsxRuntime.jsx("span",{className:l(M.slots.treeNodeDescription,S?.nodeDescription),children:U.description}):null]}),U.meta?jsxRuntime.jsx("span",{className:l(M.slots.treeNodeMeta,S?.nodeMeta),children:U.meta}):null,U.badge?jsxRuntime.jsx("span",{className:l(M.slots.treeNodeBadge,S?.nodeBadge),children:U.badge}):null,xe(Ze,{type:"node",node:U,group:z})]}),q&&de?jsxRuntime.jsx("div",{className:l(M.slots.treeNodeChildren,S?.nodeChildren,S?.list),children:ie.map(Fe=>se(Fe,z,X+1))}):null]},U.id)},"renderNode"),Re=r((U,z,X)=>U===false?null:jsxRuntime.jsx("div",{className:l(z,X),children:U}),"renderPlaceholder");if(y)return jsxRuntime.jsx("div",{className:l(M.slots.treeRoot,S?.root,T),children:Re(D,M.slots.treeLoading,S?.loading)});if(w)return jsxRuntime.jsx("div",{className:l(M.slots.treeRoot,S?.root,T),children:Re(w??h?.error,M.slots.treeError,S?.error)});let Ie=J.some(U=>(U.nodes??[]).length>0),ze=J.some(U=>U.status==="loading"||U.error);return !Ie&&!ze&&(!K||J.length===0)?jsxRuntime.jsx("div",{className:l(M.slots.treeRoot,S?.root,T),children:Re(B,M.slots.treeEmpty,S?.empty)}):jsxRuntime.jsx("div",{className:l(M.slots.treeRoot,S?.root,T),role:Ie||J.some(U=>!U.hideHeader)?"tree":void 0,children:J.map(U=>{let z=U.hideHeader||U.collapsible===false||_.has(U.id),X=U.nodes?.length??0,ie=Wf(U,m),q=a===U.id,de=U.collapsible!==false;return jsxRuntime.jsxs("section",{"data-data-explorer-entry":"group","data-data-explorer-group-id":U.id,className:l(M.slots.treeGroup,S?.group,U.className),children:[U.hideHeader?null:jsxRuntime.jsxs("div",{role:"treeitem","aria-label":typeof U.label=="string"?U.label:void 0,"aria-selected":U.selectable?q:void 0,"aria-expanded":de?z:void 0,className:l(M.slots.treeGroupHeader,M.slots.treeGroupHeaderButton,q&&M.slots.treeNodeSelected,S?.groupHeader,S?.groupHeaderButton,q&&S?.itemSelected),children:[jsxRuntime.jsxs("button",{type:"button",className:l("flex min-w-0 flex-1 items-center gap-2 text-left outline-hidden focus-visible:ring-2 focus-visible:ring-ring",S?.groupLabel),"aria-pressed":U.selectable?q:void 0,"aria-expanded":!U.selectable&&de?z:void 0,onClick:()=>{if(U.selectable){R?.(U,o);return}de&&fe(U.id,!z);},children:[U.icon?jsxRuntime.jsx("span",{className:l(M.slots.treeNodeIcon,S?.nodeIcon,S?.itemIcon),children:U.icon}):null,jsxRuntime.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[U.label?jsxRuntime.jsx("span",{className:l(M.slots.treeNodeLabel,S?.nodeLabel,S?.itemLabel),children:U.label}):null,U.description?jsxRuntime.jsx("span",{className:l(M.slots.treeNodeDescription,S?.nodeDescription),children:U.description}):null]}),U.meta?jsxRuntime.jsx("span",{className:l(M.slots.treeNodeMeta,S?.nodeMeta),children:U.meta}):null,U.badge?jsxRuntime.jsx("span",{className:l(M.slots.treeNodeBadge,S?.nodeBadge),children:U.badge}):null]}),de?jsxRuntime.jsx("button",{type:"button",className:l(M.slots.treeNodeToggle,S?.expander),"aria-label":z?N:Y,"aria-expanded":z,onClick:()=>fe(U.id,!z),children:jsxRuntime.jsx(bc,{expanded:z})}):jsxRuntime.jsx("span",{className:l(M.slots.treeNodeToggle,S?.expander)}),xe(ie,{type:"group",group:U})]}),z?jsxRuntime.jsx("div",{role:"group",className:l(M.slots.treeGroupContent,S?.groupContent,S?.list),children:U.loading||U.status==="loading"?Re(D,M.slots.treeLoading,S?.loading):U.error||U.status==="error"?Re(U.error??h?.error??$.error,M.slots.treeError,S?.error):X>0?U.nodes?.map(we=>se(we,U,0)):Re(U.empty??B,M.slots.treeEmpty,S?.empty)}):null]},U.id)})})}r(Fs,"DataExplorerViewTree");var Ir="gap-2 rounded-[var(--radius)] border border-transparent text-sm font-medium motion-reduce:transition-none",Mr="size-[var(--monkeys-component-navigation-sidebar-icon-size,1.125rem)] shrink-0 text-inherit [&_svg]:size-full",Hs="text-foreground hover:border-transparent hover:bg-[var(--navigation-internal-hover-background)] hover:text-[var(--navigation-internal-hover-foreground)]",Vs="border-[var(--navigation-internal-selected-border)] bg-[var(--navigation-internal-selected-background)] text-[var(--navigation-internal-selected-foreground)] hover:border-[var(--navigation-internal-selected-border)] hover:bg-[var(--navigation-internal-selected-background)] hover:text-[var(--navigation-internal-selected-foreground)]",vc="[--navigation-internal-theme-selected-background:color-mix(in_srgb,hsl(var(--monkeys-color-primary,var(--primary)))_10%,transparent)] [--navigation-internal-theme-selected-foreground:hsl(var(--monkeys-color-primary,var(--primary)))] dark:[--navigation-internal-theme-selected-background:hsl(var(--monkeys-color-accent,var(--accent)))] dark:[--navigation-internal-theme-selected-foreground:hsl(var(--monkeys-color-foreground,var(--foreground)))]";function kc(e){let t={muted:"hsl(var(--monkeys-color-accent,var(--accent)))",soft:"color-mix(in srgb,hsl(var(--monkeys-color-primary,var(--primary))) 10%,transparent)",solid:"hsl(var(--monkeys-color-primary,var(--primary)))",outline:"hsl(var(--monkeys-color-background,var(--background)))"}[e??"muted"];return {"--navigation-internal-default-selected-background":e===void 0?"var(--navigation-internal-theme-selected-background)":t,"--navigation-internal-default-selected-foreground":e===void 0?"var(--navigation-internal-theme-selected-foreground)":e==="solid"?"hsl(var(--monkeys-color-primary-foreground,var(--primary-foreground)))":"hsl(var(--monkeys-color-foreground,var(--foreground)))","--navigation-internal-selected-background":"var(--monkeys-component-navigation-sidebar-row-selected-background,var(--navigation-internal-default-selected-background))","--navigation-internal-selected-foreground":"var(--monkeys-component-navigation-sidebar-row-selected-foreground,var(--navigation-internal-default-selected-foreground))","--navigation-internal-selected-border":`var(--monkeys-component-navigation-sidebar-row-selected-border,${e===void 0||e==="muted"?"transparent":e==="soft"?"color-mix(in srgb,hsl(var(--monkeys-color-primary,var(--primary))) 25%,transparent)":e==="outline"?"color-mix(in srgb,hsl(var(--monkeys-color-primary,var(--primary))) 55%,transparent)":"hsl(var(--monkeys-color-primary,var(--primary)))"})`,"--navigation-internal-hover-background":"var(--monkeys-component-navigation-sidebar-row-hover-background,color-mix(in srgb,hsl(var(--monkeys-color-accent,var(--accent))) 65%,transparent))","--navigation-internal-hover-foreground":"var(--monkeys-component-navigation-sidebar-row-hover-foreground,hsl(var(--monkeys-color-foreground,var(--foreground))))"}}r(kc,"unifiedStyle");var Lf="[--navigation-internal-selected-background:var(--monkeys-component-navigation-sidebar-row-selected-background,var(--monkeys-component-navigation-sidebar-tree-row-selected-background,var(--navigation-internal-default-selected-background)))] [--navigation-internal-selected-foreground:var(--monkeys-component-navigation-sidebar-row-selected-foreground,var(--monkeys-component-navigation-sidebar-tree-row-selected-foreground,var(--navigation-internal-default-selected-foreground)))] [--navigation-internal-hover-background:var(--monkeys-component-navigation-sidebar-row-hover-background,var(--monkeys-component-navigation-sidebar-tree-row-hover-background,color-mix(in_srgb,hsl(var(--monkeys-color-accent,var(--accent)))_65%,transparent)))] [--navigation-internal-hover-foreground:var(--monkeys-component-navigation-sidebar-row-hover-foreground,var(--monkeys-component-navigation-sidebar-tree-row-hover-foreground,hsl(var(--monkeys-color-foreground,var(--foreground)))))]",Af="aria-selected:border-[var(--navigation-internal-selected-border)] aria-selected:bg-[var(--navigation-internal-selected-background)] aria-selected:text-[var(--navigation-internal-selected-foreground)] aria-selected:hover:border-[var(--navigation-internal-selected-border)] aria-selected:hover:bg-[var(--navigation-internal-selected-background)] aria-selected:hover:text-[var(--navigation-internal-selected-foreground)]",Nr="rounded-[var(--monkeys-component-navigation-sidebar-action-radius,0.25rem)] text-inherit hover:bg-foreground/10 hover:text-inherit focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none";function wc(e,t,o={}){let n=l(Ir,e,t,Hs);return {...o,root:l(Lf,"space-y-0.5",o.root),group:l("space-y-0.5","[&>[role=treeitem]+[role=group]]:[--data-explorer-tree-group-indent:var(--monkeys-component-navigation-sidebar-tree-group-indent,1rem)]",o.group),groupHeaderButton:l("h-auto",n,o.groupHeaderButton),nodeButton:l(n,Af,o.nodeButton),itemSelected:l(Vs,o.itemSelected),nodeIcon:l(Mr,"group-hover/tree-node:text-inherit",o.nodeIcon),nodeLabel:l("font-medium",o.nodeLabel),nodeDescription:l("text-inherit",o.nodeDescription),nodeDisabled:l("opacity-50",o.nodeDisabled),groupActions:l(Nr,"order-2 size-5 p-0 group-focus-within/tree-group:opacity-100",o.groupActions),nodeActions:l(Nr,"order-2 size-5 p-0 group-focus-within/tree-node:opacity-100",o.nodeActions),nodeToggle:l(Nr,"order-1 empty:hidden",o.nodeToggle),expander:l(Nr,"order-1 empty:hidden",o.expander),nodeDragHandle:l(Nr,o.nodeDragHandle)}}r(wc,"unifiedTreeClassNames");function Ff({collapsed:e}){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-4 w-4",fill:"none",children:jsxRuntime.jsx("path",{d:e?"M4 4.5h12M4 15.5h12M5 7.5 7.5 10 5 12.5M15 7.5 12.5 10l2.5 2.5":"M4 4.5h12M4 15.5h12M7.5 7.5 5 10l2.5 2.5M12.5 7.5 15 10l-2.5 2.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}r(Ff,"CollapseIcon");function Hf(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-4 w-4",fill:"none",children:[jsxRuntime.jsx("circle",{cx:"8.5",cy:"8.5",r:"5",stroke:"currentColor",strokeWidth:"1.6"}),jsxRuntime.jsx("path",{d:"m12.2 12.2 3.3 3.3",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})}r(Hf,"SearchIcon");function Vf(){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-3.5 w-3.5",fill:"none",children:jsxRuntime.jsx("path",{d:"m6 6 8 8m0-8-8 8",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})})}r(Vf,"ClearIcon");function Gf(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-4 w-4",fill:"currentColor",children:[jsxRuntime.jsx("circle",{cx:"5",cy:"10",r:"1.2"}),jsxRuntime.jsx("circle",{cx:"10",cy:"10",r:"1.2"}),jsxRuntime.jsx("circle",{cx:"15",cy:"10",r:"1.2"})]})}r(Gf,"MoreIcon");function Ya({expanded:e}){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:l("h-4 w-4 transition-transform motion-reduce:transition-none",e&&"rotate-180"),fill:"none",children:jsxRuntime.jsx("path",{d:"m6 8 4 4 4-4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}r(Ya,"DisclosureIcon");function _f(e,t){typeof e=="function"?e(t):e&&(e.current=t);}r(_f,"assignRef");function Fn(e,t){if(!Number.isFinite(t))throw new RangeError(`NavigationSidebar ${e} must be a finite number.`)}r(Fn,"requireFiniteNumber");function $f(e){let t=e.minWidth??180,o=e.maxWidth??420,n=e.defaultWidth??256,a=e.collapsedWidth??60,i=e.collapseThreshold??140;if(Fn("minWidth",t),Fn("maxWidth",o),Fn("defaultWidth",n),Fn("collapsedWidth",a),Fn("collapseThreshold",i),t<=0)throw new RangeError("NavigationSidebar minWidth must be greater than zero.");if(o<t)throw new RangeError("NavigationSidebar maxWidth must be greater than or equal to minWidth.");if(a<0)throw new RangeError("NavigationSidebar collapsedWidth cannot be negative.");if(i<0)throw new RangeError("NavigationSidebar collapseThreshold cannot be negative.");return {defaultWidth:n,minWidth:t,maxWidth:o,collapsedWidth:a,collapseThreshold:i}}r($f,"resolveLayoutBounds");function Ja(e,t){return Math.min(Math.max(e,t.minWidth),t.maxWidth)}r(Ja,"clampWidth");function Nc(e,t){if(t){t(e);return}typeof console<"u"&&console.warn("NavigationSidebar could not persist layout state.",e);}r(Nc,"reportStorageError");function Ic(e){if(e)return e;if(!(typeof window>"u"))return window.localStorage}r(Ic,"resolveStorage");function jf(e,t){let o={collapsed:e.defaultCollapsed??false,width:Ja(t.defaultWidth,t)};if(!e.storageKey)return o;let n=Ic(e.storage);if(!n)return o;try{let a=n.getItem(e.storageKey);if(!a)return o;let i=JSON.parse(a);return {collapsed:typeof i.collapsed=="boolean"?i.collapsed:o.collapsed,width:typeof i.width=="number"&&Number.isFinite(i.width)?Ja(i.width,t):o.width}}catch(a){return Nc(a,e.onStorageError),o}}r(jf,"readStoredLayout");function _s(e,t){return t||(typeof e=="string"?e:void 0)}r(_s,"getNodeTitle");function Kf(e){return e==="solid"?"border-primary bg-primary text-primary-foreground shadow-sm":e==="outline"?"border-primary/55 bg-background text-foreground ring-1 ring-primary/20":e==="muted"?"border-transparent bg-muted text-foreground":"border-primary/25 bg-primary/10 text-foreground"}r(Kf,"activeVariantClassName");function Uf(e){if(e?.preset!==void 0&&e.preset!=="unified")throw new TypeError(`Unknown NavigationSidebar preset "${e.preset}". Supported preset: unified.`);let t=e?.preset==="unified",o=e?.density??(t?"compact":"default"),n=e?.surface??"panel",a=e?.activeVariant??(t?"muted":"soft");return {unified:t,density:o,surface:n,activeVariant:a,selected:t?Vs:Kf(a),inactive:t?Hs:"text-muted-foreground hover:border-border/70 hover:bg-muted/60 hover:text-foreground",root:l(n==="plain"&&"border-transparent bg-transparent shadow-none",n==="panel"&&"border-border/70 bg-card text-card-foreground shadow-sm",n==="frosted"&&"border-border/55 bg-card/80 text-card-foreground shadow-sm backdrop-blur-xl",n==="outlined"&&"border-border bg-background text-foreground shadow-none",t&&"rounded-[var(--radius)] shadow-none",t&&vc,t&&n==="panel"&&"border-[var(--monkeys-component-navigation-sidebar-border,hsl(var(--monkeys-color-border,var(--border))))] bg-[var(--monkeys-component-navigation-sidebar-background,hsl(var(--monkeys-color-card,var(--card))))] text-foreground"),itemHeight:o==="compact"?t?"min-h-[var(--monkeys-component-navigation-sidebar-row-height,2.5rem)]":"min-h-9":o==="comfortable"?"min-h-14":"min-h-11",itemPadding:o==="compact"?t?"px-2 py-2":"px-2 py-1.5":o==="comfortable"?"px-3 py-3":"px-3 py-2",searchHeight:o==="compact"?t?"h-[var(--monkeys-component-navigation-sidebar-row-height,2.5rem)]":"h-8":o==="comfortable"?"h-10":"h-9"}}r(Uf,"resolveAppearance");var Rc="hover:bg-[var(--monkeys-component-navigation-sidebar-tree-row-hover-background,hsl(var(--muted)))] hover:text-[var(--monkeys-component-navigation-sidebar-tree-row-hover-foreground,hsl(var(--foreground)))]",qf="bg-[var(--monkeys-component-navigation-sidebar-tree-row-selected-background,hsl(var(--accent)))] text-[var(--monkeys-component-navigation-sidebar-tree-row-selected-foreground,hsl(var(--accent-foreground)))] hover:bg-[var(--monkeys-component-navigation-sidebar-tree-row-selected-background,hsl(var(--accent)))] hover:text-[var(--monkeys-component-navigation-sidebar-tree-row-selected-foreground,hsl(var(--accent-foreground)))]",Br="hover:!bg-transparent hover:!text-inherit focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring";function Yf(e){return {...e,groupHeader:l(Rc,e?.groupHeader),itemSelected:l(qf,e?.itemSelected),nodeButton:l(Rc,"aria-selected:bg-[var(--monkeys-component-navigation-sidebar-tree-row-selected-background,hsl(var(--accent)))] aria-selected:text-[var(--monkeys-component-navigation-sidebar-tree-row-selected-foreground,hsl(var(--accent-foreground)))] aria-selected:hover:bg-[var(--monkeys-component-navigation-sidebar-tree-row-selected-background,hsl(var(--accent)))] aria-selected:hover:text-[var(--monkeys-component-navigation-sidebar-tree-row-selected-foreground,hsl(var(--accent-foreground)))]",e?.nodeButton),expander:l(Br,e?.expander),nodeToggle:l(Br,e?.nodeToggle),groupActions:l(Br,e?.groupActions),nodeActions:l(Br,e?.nodeActions),nodeDragHandle:l(Br,e?.nodeDragHandle)}}r(Yf,"resolveNavigationTreeClassNames");function $s({item:e,active:t,collapsed:o,mobile:n,embedded:a=false,appearance:i,classNames:s,domClassName:u}){return l("group/navigation-item relative flex w-full min-w-0 items-center gap-3 rounded-[var(--radius)] border border-transparent text-left text-sm outline-hidden transition-[background-color,border-color,color,box-shadow] focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",i.itemHeight,i.itemPadding,i.unified&&Ir,a?"min-h-0 self-stretch border-0 bg-transparent text-inherit hover:bg-transparent hover:text-inherit":t?i.selected:i.inactive,o&&!n&&"justify-center px-0",e.disabled&&"pointer-events-none opacity-50",s?.item,t&&s?.itemActive,n&&s?.mobileItem,u,e.className)}r($s,"entryClassName");function js({item:e,collapsed:t,mobile:o,classNames:n,endIndicator:a,appearance:i}){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[O(e.icon)?jsxRuntime.jsx("span",{className:l("flex size-5 shrink-0 items-center justify-center [&_svg]:size-full",i.unified&&Mr,n?.itemIcon),"aria-hidden":"true",children:e.icon}):null,o||!t?jsxRuntime.jsxs("span",{className:l("flex min-w-0 flex-1 flex-col",n?.itemContent),children:[jsxRuntime.jsx("span",{className:l("min-w-0 truncate font-semibold",i.unified&&"font-medium",n?.itemLabel),children:e.label}),O(e.description)?jsxRuntime.jsx("span",{className:l("mt-0.5 truncate text-xs font-normal",i.unified&&"text-inherit",n?.itemDescription),children:e.description}):null]}):null,(o||!t)&&O(e.meta)?jsxRuntime.jsx("span",{className:l("shrink-0 text-xs text-muted-foreground",n?.itemMeta),children:e.meta}):null,(o||!t)&&O(e.endContent)?jsxRuntime.jsx("span",{className:l("shrink-0",n?.itemEndContent),children:e.endContent}):null,(o||!t)&&O(a)?jsxRuntime.jsx("span",{className:"flex shrink-0 items-center justify-center",children:a}):null]})}r(js,"EntryContent");function Xa({item:e,active:t,collapsed:o,itemAs:n,appearance:a,classNames:i,mobile:s=false,embedded:u=false,onSelect:c,ariaControls:d,ariaExpanded:g,endIndicator:m}){let p=n??(e.href?"a":"button"),f=_s(e.label,e.title),b=e.domProps??{},v=r(x=>{if(e.disabled){x.preventDefault();return}e.onClick?.(x),c?.();},"handleClick"),y={...b,...e.to?{to:e.to}:{},...e.href?{href:e.href}:{},...p==="button"?{type:"button",disabled:e.disabled}:{},title:f,"aria-current":t?"page":void 0,"aria-disabled":e.disabled||void 0,"aria-controls":d,"aria-expanded":g,tabIndex:e.disabled?-1:b.tabIndex,onClick:v};return jsxRuntime.jsx(p,{...y,"data-navigation-sidebar-item-id":e.id,"data-active":t?"true":"false","data-expanded":g===void 0?void 0:String(g),className:$s({item:e,active:t,collapsed:o,mobile:s,embedded:u,appearance:a,classNames:i,domClassName:b.className}),children:jsxRuntime.jsx(js,{appearance:a,item:e,collapsed:o,mobile:s,classNames:i,endIndicator:m})})}r(Xa,"EntryButton");function Jf({item:e,appearance:t,classNames:o}){let n=e.domProps??{};return jsxRuntime.jsx("div",{...n,"data-navigation-sidebar-item-id":e.id,"aria-disabled":e.disabled||void 0,title:_s(e.label,e.title),className:$s({item:e,active:false,collapsed:false,mobile:true,embedded:true,appearance:t,classNames:o,domClassName:n.className}),children:jsxRuntime.jsx(js,{appearance:t,item:e,collapsed:false,mobile:true,classNames:o})})}r(Jf,"EntryPresentation");function Za({active:e,appearance:t}){return l("flex w-full min-w-0 items-center gap-0.5 rounded-[var(--radius)] border border-transparent pr-1 text-sm transition-[background-color,border-color,color,box-shadow] motion-reduce:transition-none",t.itemHeight,t.unified&&Ir,e?t.selected:t.inactive)}r(Za,"routeRowClassName");function Qa(e,t){return t?e.filter(o=>!o.filterIds?.length||o.filterIds.includes(t)):e}r(Qa,"filterCatalogItems");function Xf({props:e,collapsed:t,appearance:o}){let{items:n=[],sections:a=[],filters:i=[],activeFilterId:s,activeItemId:u,onFilterSelect:c,itemAs:d,layout:g="single",empty:m,ariaLabel:p,classNames:f}=e,b=Qa(n,s),v=a.map(h=>({...h,items:Qa(h.items,s)})).filter(h=>h.items.length>0),y=b.length>0||v.length>0,x=i.length>0&&!t?jsxRuntime.jsx("div",{role:"group",className:l(g==="split"?"flex min-w-32 flex-col gap-1 border-r border-border/60 pr-2":"flex flex-wrap gap-1",f?.filterList),"aria-label":p?`${p} filters`:void 0,children:i.map(h=>{let k=h.id===s;return jsxRuntime.jsxs("button",{type:"button",title:h.title??(typeof h.label=="string"?h.label:void 0),"aria-pressed":k,disabled:h.disabled,className:l("inline-flex min-h-8 items-center gap-2 rounded-md px-2.5 text-xs font-medium text-muted-foreground outline-hidden transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",k&&"bg-muted text-foreground",f?.filterItem,k&&f?.filterItemActive),onClick:()=>c?.(h),children:[O(h.icon)?jsxRuntime.jsx("span",{"aria-hidden":"true",children:h.icon}):null,jsxRuntime.jsx("span",{className:"truncate",children:h.label})]},h.id)})}):null,w=y?jsxRuntime.jsxs("div",{className:l("min-w-0 flex-1",f?.list),children:[b.length>0?jsxRuntime.jsx("ul",{className:"grid list-none gap-1 p-0",children:b.map(h=>jsxRuntime.jsx("li",{children:jsxRuntime.jsx(Xa,{item:h,active:h.active??h.id===u,collapsed:t,itemAs:d,appearance:o,classNames:f})},h.id))}):null,v.map(h=>jsxRuntime.jsxs("section",{className:l("mt-3 first:mt-0",f?.section,h.className),children:[!t&&O(h.label)?jsxRuntime.jsx("div",{className:l("mb-1 px-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",f?.sectionLabel,h.labelClassName),children:h.label}):null,jsxRuntime.jsx("ul",{className:"grid list-none gap-1 p-0",children:h.items.map(k=>jsxRuntime.jsx("li",{children:jsxRuntime.jsx(Xa,{item:k,active:k.active??k.id===u,collapsed:t,itemAs:d,appearance:o,classNames:f})},k.id))})]},h.id))]}):jsxRuntime.jsx("div",{className:"px-3 py-8 text-center text-sm text-muted-foreground",children:m});return jsxRuntime.jsxs("nav",{"aria-label":p,className:l(g==="split"&&!t&&"flex min-w-0 gap-2"),children:[x,w]})}r(Xf,"CatalogContent");function Zf({child:e,parent:t,active:o,interactive:n,onSelect:a,appearance:i,classNames:s,embedded:u=false}){let c=n?"button":"div",d=e.domProps??{};return jsxRuntime.jsxs(c,{...d,...n?{type:"button"}:{},"data-navigation-sidebar-child-id":e.id,"aria-current":n&&o?"page":void 0,"aria-disabled":e.disabled||void 0,title:_s(e.label,e.title),disabled:n?e.disabled:void 0,className:l("flex w-full min-w-0 flex-1 items-center gap-3 rounded-[var(--radius)] border border-transparent text-left text-sm font-semibold outline-hidden transition-[background-color,border-color,color,box-shadow] focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",i.itemHeight,i.itemPadding,i.unified&&Ir,u?"min-h-0 self-stretch border-0 bg-transparent text-inherit hover:bg-transparent hover:text-inherit":o?i.selected:i.inactive,e.disabled&&"pointer-events-none opacity-50",s?.childItem,o&&s?.childItemActive,d.className,e.className),onClick:n&&!e.disabled?()=>a?.(e,t):void 0,children:[O(e.icon)?jsxRuntime.jsx("span",{className:l("flex size-5 shrink-0 items-center justify-center [&_svg]:size-full",i.unified&&Mr),"aria-hidden":"true",children:e.icon}):null,jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:e.label})]})}r(Zf,"ChildEntry");function ei({itemId:e,actions:t,kind:o,className:n,mobile:a=false}){return O(t)?jsxRuntime.jsx("div",{"data-navigation-sidebar-item-actions":o==="item"?e:void 0,"data-navigation-sidebar-child-actions":o==="child"?e:void 0,"data-navigation-sidebar-actions-mobile":a?"true":void 0,className:l("ml-auto flex shrink-0 items-center gap-1 [&>button]:border-0 [&>button]:bg-transparent [&>button]:shadow-none [&>button:hover]:bg-muted",n),children:t}):null}r(ei,"RouteActions");function Ks(e){return e.interaction==="disclosure"}r(Ks,"isDisclosureRouteItem");function Qf(e){let t=new Set,o=new Set,n=new Set;for(let a of e){let i=a.id;if(t.has(i))throw new RangeError(`NavigationSidebar route item ids must be unique; received "${i}" more than once.`);if(t.add(i),Ks(a)){if(!a.children.length)throw new RangeError(`NavigationSidebar disclosure item "${a.id}" must include at least one child.`);if(a.href!==void 0||a.to!==void 0||a.onClick!==void 0)throw new TypeError(`NavigationSidebar disclosure item "${i}" cannot define href, to, or onClick.`);n.add(a.id);}else if(a.childrenPresentation==="collapsible"){if(!a.children?.length)throw new RangeError(`NavigationSidebar collapsible route item "${a.id}" must include at least one child.`);n.add(a.id);}for(let u of a.children??[]){if(o.has(u.id))throw new RangeError(`NavigationSidebar route child ids must be unique; received "${u.id}" more than once.`);o.add(u.id);}}return n}r(Qf,"validateRouteItems");function ey({item:e,expanded:t,controls:o,label:n,onToggle:a,classNames:i}){let s=typeof e.label=="string"?e.label:e.id;return jsxRuntime.jsx("button",{type:"button",disabled:e.disabled,"aria-expanded":t,"aria-controls":o,"aria-label":`${n}: ${s}`,title:n,"data-navigation-sidebar-disclosure-trigger":e.id,className:l("inline-flex h-8 w-7 shrink-0 items-center justify-center rounded-md border-0 bg-transparent text-muted-foreground shadow-none outline-hidden hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",i?.childMenuTrigger),onClick:a,children:jsxRuntime.jsx(Ya,{expanded:t})})}r(ey,"RouteChildrenToggle");function ti({item:e,activeChildId:t,label:o,onChildSelect:n,classNames:a,appearance:i,triggerVariant:s="submenu",mobile:u=false}){let c=(e.children??[]).filter(p=>!p.disabled);if(!e.children?.length||s==="submenu"&&(!n||c.length===0))return null;let d=typeof e.label=="string"?e.label:e.id,g=!!e.disabled||!n||c.length===0,m=e.domProps??{};return jsxRuntime.jsxs(Gt__namespace.Root,{children:[jsxRuntime.jsx(Gt__namespace.Trigger,{asChild:true,children:s==="item"&&i?jsxRuntime.jsx("button",{...m,type:"button",disabled:g,"aria-label":`${o}: ${d}`,title:o,"data-navigation-sidebar-item-id":e.id,"data-navigation-sidebar-disclosure-menu":"true",className:$s({item:e,active:false,collapsed:!u,mobile:u,appearance:i,classNames:a,domClassName:m.className}),children:jsxRuntime.jsx(js,{appearance:i,item:e,collapsed:!u,mobile:u,classNames:a,endIndicator:u?jsxRuntime.jsx(Ya,{expanded:false}):void 0})}):jsxRuntime.jsx("button",{type:"button",disabled:s==="disclosure"?g:void 0,"data-navigation-sidebar-disclosure-trigger":s==="disclosure"?e.id:void 0,className:l("inline-flex h-8 shrink-0 items-center justify-center rounded-md border-0 bg-transparent text-muted-foreground shadow-none outline-hidden hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",s==="disclosure"?"w-7":"w-6",a?.childMenuTrigger),"aria-label":`${o}: ${d}`,title:o,children:s==="disclosure"?jsxRuntime.jsx(Ya,{expanded:false}):jsxRuntime.jsx(Gf,{})})}),jsxRuntime.jsx(Gt__namespace.Portal,{children:jsxRuntime.jsx(Gt__namespace.Content,{side:"right",align:"start",sideOffset:8,className:l("z-50 min-w-40 rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md outline-hidden",a?.childMenuContent),children:e.children?.map(p=>jsxRuntime.jsxs(Gt__namespace.Item,{disabled:p.disabled,"data-navigation-sidebar-child-id":p.id,"data-active":p.id===t?"true":"false",className:l("flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",p.id===t&&"bg-accent text-accent-foreground"),onSelect:()=>n?.(p,e),children:[O(p.icon)?jsxRuntime.jsx("span",{"aria-hidden":"true",children:p.icon}):null,jsxRuntime.jsx("span",{className:"truncate",children:p.label})]},p.id))})})]})}r(ti,"CollapsedChildMenu");function ty({props:e,collapsed:t,appearance:o}){let{routeItems:n,activeItemId:a,activeChildId:i,expandedItemIds:s,defaultExpandedItemIds:u=[],itemAs:c,onItemSelect:d,onChildSelect:g,onExpandedItemIdsChange:m,collapsedChildMenuLabel:p="Open submenu",disclosureLabel:f="Toggle submenu",ariaLabel:b,classNames:v}=e,y=lt.useId(),x=lt.useMemo(()=>Qf(n),[n]),[w,h]=lt.useState(()=>u),k=s!==void 0,C=s??w,T=lt.useMemo(()=>C.filter(R=>x.has(R)),[x,C]),S=lt.useMemo(()=>new Set(T),[T]),I=lt.useCallback(R=>{if(R.disabled||!x.has(R.id))return;let W=S.has(R.id)?T.filter(H=>H!==R.id):[...T,R.id];k||h(W),m?.(W);},[x,S,k,T,m]);return jsxRuntime.jsx("nav",{"aria-label":b,children:jsxRuntime.jsx("ul",{className:l("grid list-none gap-2 p-0",o.unified&&"gap-0.5",v?.list),children:n.map((R,W)=>{let H=Ks(R),L=!H&&R.id===a,F=!!R.children?.length,$=x.has(R.id),M=!$||S.has(R.id),G=!t&&O(R.actions),Y=t&&F&&!!g||!t&&$&&!H||G,N=`${y}-route-children-${W}`;return jsxRuntime.jsxs("li",{className:"grid min-w-0 gap-1",children:[t&&H?jsxRuntime.jsx(ti,{item:R,activeChildId:i,label:p,onChildSelect:g,classNames:v,appearance:o,triggerVariant:"item"}):jsxRuntime.jsxs("div",{"data-navigation-sidebar-item-row":Y?R.id:void 0,"data-active":Y?String(L):void 0,className:Y?Za({active:L,appearance:o}):void 0,children:[jsxRuntime.jsx(Xa,{item:R,active:L,collapsed:t,embedded:Y,itemAs:H?"button":c,appearance:o,classNames:v,onSelect:H?()=>I(R):d?()=>d(R):void 0,ariaControls:!t&&$&&H?N:void 0,ariaExpanded:!t&&$&&H?M:void 0,endIndicator:!t&&H&&!G?jsxRuntime.jsx(Ya,{expanded:M}):void 0}),G?jsxRuntime.jsx(ei,{itemId:R.id,actions:R.actions,kind:"item",className:v?.itemActions}):null,t&&g?jsxRuntime.jsx(ti,{item:R,activeChildId:i,label:p,onChildSelect:g,classNames:v}):null,!t&&$&&(!H||G)?jsxRuntime.jsx(ey,{item:R,expanded:M,controls:N,label:f,onToggle:()=>I(R),classNames:v}):null]}),!t&&F?jsxRuntime.jsx("ul",{id:N,hidden:!M,style:M?void 0:{display:"none"},className:l("ml-5 grid list-none gap-0.5 border-l border-border/70 py-1 pl-3",o.unified&&"border-border",v?.childList),children:R.children?.map(D=>{let B=O(D.actions),K=D.id===i,J=jsxRuntime.jsx(Zf,{child:D,parent:R,active:K,interactive:!!g,onSelect:g,appearance:o,classNames:v,embedded:B});return jsxRuntime.jsx("li",{children:B?jsxRuntime.jsxs("div",{"data-navigation-sidebar-child-row":D.id,"data-active":String(K),className:Za({active:K,appearance:o}),children:[J,jsxRuntime.jsx(ei,{itemId:D.id,actions:D.actions,kind:"child",className:v?.childActions})]}):J},D.id)})}):null]},R.id)})})})}r(ty,"RouteContent");function oy(e,t,o){return [...Qa(e,o),...t.flatMap(n=>Qa(n.items,o))]}r(oy,"flattenCatalogItems");function ny({props:e,appearance:t}){if(!e.mobile||e.mobile.mode!=="horizontal")return null;let o=e.classNames,n=e.kind==="catalog"?oy(e.items??[],e.sections??[],e.activeFilterId):e.routeItems;return jsxRuntime.jsx("nav",{"aria-label":e.ariaLabel,className:l("flex gap-2 overflow-x-auto pb-1",o?.mobileNav,e.mobile.className),children:n.map(a=>{let i={...o,mobileItem:l(o?.mobileItem,e.mobile?.itemClassName)},s=e.kind==="route"?a:void 0,u=s!==void 0&&O(s.actions);if(e.kind==="route"&&Ks(a))return u?jsxRuntime.jsxs("div",{"data-navigation-sidebar-item-row":a.id,"data-active":"false",className:l(Za({active:false,appearance:t}),"shrink-0"),children:[jsxRuntime.jsx(Jf,{item:a,appearance:t,classNames:i}),jsxRuntime.jsx(ei,{itemId:a.id,actions:a.actions,kind:"item",className:o?.itemActions,mobile:true}),jsxRuntime.jsx(ti,{item:a,activeChildId:e.activeChildId,label:e.collapsedChildMenuLabel??"Open submenu",onChildSelect:e.onChildSelect,classNames:i,appearance:t,triggerVariant:"disclosure",mobile:true})]},a.id):jsxRuntime.jsx(lt.Fragment,{children:jsxRuntime.jsx(ti,{item:a,activeChildId:e.activeChildId,label:e.collapsedChildMenuLabel??"Open submenu",onChildSelect:e.onChildSelect,classNames:i,appearance:t,triggerVariant:"item",mobile:true})},a.id);let c=e.kind==="catalog"?a.active??a.id===e.activeItemId:a.id===e.activeItemId,d=jsxRuntime.jsx(Xa,{item:a,active:c,collapsed:false,embedded:u,itemAs:e.itemAs,appearance:t,classNames:i,mobile:true,onSelect:e.kind==="route"&&e.onItemSelect?()=>e.onItemSelect?.(a):void 0});return u&&s?jsxRuntime.jsxs("div",{"data-navigation-sidebar-item-row":a.id,"data-active":String(c),className:l(Za({active:c,appearance:t}),"shrink-0"),children:[d,jsxRuntime.jsx(ei,{itemId:s.id,actions:s.actions,kind:"item",className:o?.itemActions,mobile:true})]},a.id):jsxRuntime.jsx(lt.Fragment,{children:d},a.id)})})}r(ny,"MobileNavigation");function ry(e,t){let o=$f(e);e.width!==void 0&&Fn("width",e.width);let n=lt.useRef(null);n.current||(n.current=jf(e,o));let a=lt.useRef(null),[i,s]=lt.useState(n.current.collapsed),[u,c]=lt.useState(n.current.width),[d,g]=lt.useState(e.search?.defaultValue??""),[m,p]=lt.useState(false),f=e.collapsed??i,b=Ja(e.width??u,o),v=e.search?.value??d,y=e.collapsed!==void 0,x=e.width!==void 0,w=lt.useMemo(()=>Uf(e.appearance),[e.appearance]),h=e.collapsible??true,k=e.resizable??true,C=h?e.collapsePlacement??"header":"none",T=e.collapseLabel??"Collapse sidebar",S=e.expandLabel??"Expand sidebar",I=e.resizeLabel??"Resize sidebar",R=!f||o.collapsedWidth>0,W=r(Y=>{a.current=Y,_f(t,Y);},"setSidebarRef"),H=lt.useCallback(Y=>{!h&&Y||(y||s(Y),e.onCollapsedChange?.(Y));},[h,y,e.onCollapsedChange]),L=lt.useCallback(Y=>{let N=Ja(Y,o);x||c(N),e.onWidthChange?.(N);},[o.maxWidth,o.minWidth,x,e.onWidthChange]);lt.useEffect(()=>{if(!e.storageKey)return;let Y=Ic(e.storage);if(Y)try{Y.setItem(e.storageKey,JSON.stringify({collapsed:f,width:b}));}catch(N){Nc(N,e.onStorageError);}},[e.onStorageError,e.storage,e.storageKey,f,b]),lt.useEffect(()=>{if(!m)return;let Y=document.body.style.cursor,N=document.body.style.userSelect,D=r(K=>{let J=a.current;if(!J)return;let V=K.clientX-J.getBoundingClientRect().left;if(h&&V<o.collapseThreshold){H(true);return}H(false),L(V);},"handlePointerMove"),B=r(()=>p(false),"handlePointerUp");return window.addEventListener("pointermove",D),window.addEventListener("pointerup",B),document.body.style.cursor="col-resize",document.body.style.userSelect="none",()=>{window.removeEventListener("pointermove",D),window.removeEventListener("pointerup",B),document.body.style.cursor=Y,document.body.style.userSelect=N;}},[o.collapseThreshold,h,m,H,L]);let F=r(Y=>{if(!(Y.key!=="ArrowLeft"&&Y.key!=="ArrowRight")){if(Y.preventDefault(),Y.key==="ArrowLeft"){let N=b-24;h&&N<o.collapseThreshold?H(true):L(N);return}f&&H(false),L(Math.max(b+24,o.minWidth));}},"handleResizeKeyDown"),$=r(Y=>jsxRuntime.jsx("button",{type:"button",className:l("inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-md text-muted-foreground outline-hidden transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",e.classNames?.collapseButton,Y),"aria-label":f?S:T,title:f?S:T,"aria-expanded":!f,onClick:()=>H(!f),children:jsxRuntime.jsx(Ff,{collapsed:f})}),"collapseButton"),M=O(e.title)||O(e.headerLeading)||O(e.headerActions)||C==="header",G=r(()=>{if(e.kind==="catalog")return jsxRuntime.jsx(Xf,{props:e,collapsed:f,appearance:w});if(e.kind==="route")return jsxRuntime.jsx(ty,{props:e,collapsed:f,appearance:w});let Y=e.tree;return jsxRuntime.jsx(Fs,{...Y,classNames:w.unified?wc(w.itemHeight,w.itemPadding,Y.classNames):Yf(Y.classNames)})},"renderContent");return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("aside",{...e.rootDomProps,ref:W,"aria-label":e.ariaLabel,"data-monkeys-component":e.dataComponent??"navigation-sidebar","data-navigation-sidebar-kind":e.kind,"data-navigation-sidebar-preset":e.appearance?.preset,"data-collapsed":f?"true":"false",className:l("relative flex h-full min-h-0 shrink-0 flex-col overflow-visible rounded-[calc(var(--radius)+0.25rem)] border transition-[width,opacity] duration-300 motion-reduce:transition-none",w.root,e.desktopClassName,e.classNames?.root,e.rootDomProps?.className,e.className),style:{...w.unified?kc(e.appearance?.activeVariant):{},...e.style,width:e.widthMode==="fill"?void 0:f?o.collapsedWidth:b,transition:m?"none":e.style?.transition},children:[k?jsxRuntime.jsx("button",{type:"button",role:"separator","aria-orientation":"vertical","aria-valuemin":o.minWidth,"aria-valuemax":o.maxWidth,"aria-valuenow":b,"aria-label":I,title:I,className:l("group/resize absolute -right-1.5 bottom-0 top-0 z-40 w-3 cursor-col-resize bg-transparent outline-hidden focus-visible:ring-2 focus-visible:ring-ring",e.classNames?.resizeHandle),onPointerDown:Y=>{Y.preventDefault(),p(true);},onKeyDown:F,children:jsxRuntime.jsx("span",{className:"pointer-events-none absolute bottom-3 right-1/2 top-3 w-px translate-x-1/2 rounded-full bg-border opacity-0 transition-opacity group-hover/resize:opacity-100 group-focus-visible/resize:opacity-100"})}):null,C==="edge"?$("absolute -right-3 top-1/2 z-50 -translate-y-1/2 border border-border bg-background shadow-sm"):null,R?jsxRuntime.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-col overflow-hidden",children:[M?jsxRuntime.jsxs("div",{className:l("flex min-h-12 min-w-0 items-center gap-2 border-b border-border/60 px-3",w.unified&&"min-h-14 border-border px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))]",f&&"justify-center px-1",e.classNames?.header),children:[O(e.headerLeading)?jsxRuntime.jsx("span",{className:l("flex shrink-0 items-center justify-center",e.classNames?.headerLeading),children:e.headerLeading}):null,!f&&O(e.title)?jsxRuntime.jsx("div",{className:l("min-w-0 flex-1 truncate text-sm font-semibold",e.classNames?.title),children:e.title}):null,!f&&O(e.headerActions)?jsxRuntime.jsx("div",{className:l("flex shrink-0 items-center gap-1",e.classNames?.headerActions),children:e.headerActions}):null,C==="header"?$():null]}):null,!f&&e.search?jsxRuntime.jsx("div",{className:l("px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))] pb-2 pt-3",w.unified&&"pb-1",e.classNames?.search),children:jsxRuntime.jsxs("div",{className:l("flex items-center gap-2 rounded-md border border-input bg-[var(--monkeys-component-navigation-sidebar-search-background,hsl(var(--monkeys-color-control-surface)))] px-3 text-muted-foreground ring-offset-control-surface focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",w.searchHeight,w.unified&&"rounded-[var(--radius)] border-border bg-[var(--monkeys-component-navigation-sidebar-search-background,transparent)] px-2"),children:[jsxRuntime.jsx("span",{className:l("flex shrink-0",w.unified&&Mr,e.classNames?.searchIcon),"aria-hidden":"true",children:e.search.icon??jsxRuntime.jsx(Hf,{})}),jsxRuntime.jsx("input",{type:"search",value:v,placeholder:e.search.placeholder,"aria-label":e.search.ariaLabel,className:l("min-w-0 flex-1 bg-transparent text-sm text-foreground outline-hidden placeholder:text-muted-foreground",e.classNames?.searchInput),onChange:Y=>{let N=Y.currentTarget.value;e.search?.value===void 0&&g(N),e.search?.onValueChange?.(N);}}),v&&e.search.clearLabel?jsxRuntime.jsx("button",{type:"button",className:l("inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",e.classNames?.searchClear),"aria-label":e.search.clearLabel,title:e.search.clearLabel,onClick:()=>{e.search?.value===void 0&&g(""),e.search?.onValueChange?.("");},children:jsxRuntime.jsx(Vf,{})}):null]})}):null,jsxRuntime.jsx("div",{className:l("min-h-0 flex-1 overflow-y-auto px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))] py-3",w.unified&&e.search&&"pt-1",f&&"px-1.5",e.classNames?.content),children:G()}),O(e.footer)||C==="footer"?jsxRuntime.jsxs("div",{className:l("flex shrink-0 items-center gap-2 border-t border-border/70 p-3",w.unified&&"border-border",f&&"justify-center px-1",e.classNames?.footer),children:[!f&&O(e.footer)?jsxRuntime.jsx("div",{className:"min-w-0 flex-1",children:e.footer}):null,C==="footer"?$():null]}):null]}):null]}),e.kind!=="tree"?jsxRuntime.jsx(ny,{props:e,appearance:w}):null]})}r(ry,"NavigationSidebarInner");var Er=lt.forwardRef(ry);var iy=lt.forwardRef(r(function({title:t,items:o,sections:n=[],activeItemId:a,onItemSelect:i,itemAs:s,collapsed:u,defaultCollapsed:c=false,onCollapsedChange:d,width:g,onWidthChange:m,defaultWidth:p=220,minWidth:f=180,maxWidth:b=420,collapsedWidth:v=60,collapseThreshold:y=140,storageKey:x,resizable:w=true,collapsible:h=true,collapseLabel:k="Collapse sidebar",expandLabel:C="Expand sidebar",resizeLabel:T="Resize sidebar",desktopClassName:S="hidden md:flex",mobileClassName:I="flex md:hidden",className:R,classNames:W,style:H,...L},F){let{level:$,variables:M}=dr(),G=ha(L),Y=r(N=>({...N,icon:N.icon??(N.iconName?jsxRuntime.jsx(On,{icon:{kind:"lucide",name:N.iconName},alt:"",className:"h-4 w-4 rounded-none bg-transparent"}):void 0),endContent:N.endContent??(N.count!==void 0?jsxRuntime.jsx(bn,{children:N.count}):void 0),onClick:r(D=>{N.disabled||(N.onClick?.(D),D.defaultPrevented||i?.({itemId:N.id}));},"onClick")}),"project");return jsxRuntime.jsx(Mn,{depth:$,children:jsxRuntime.jsx(Er,{ref:F,kind:"catalog",title:t,items:o.map(Y),sections:n.map(N=>({...N,items:N.items.map(Y)})),activeItemId:a,itemAs:s,collapsed:u,defaultCollapsed:c,onCollapsedChange:d,width:g,onWidthChange:m,defaultWidth:p,minWidth:f,maxWidth:b,collapsedWidth:v,collapseThreshold:y,storageKey:x,resizable:w,collapsible:h,collapsePlacement:"header",collapseLabel:k,expandLabel:C,resizeLabel:T,desktopClassName:S,dataComponent:"workbench-resizable-sidebar",rootDomProps:{...L,...G,"data-workbench-resizable-sidebar":"","data-monkeys-bento-level":$},appearance:{density:"compact",surface:"panel",activeVariant:"soft"},mobile:{mode:"horizontal",className:I},className:l(Qi,"[&>div]:gap-[var(--monkeys-bento-gap)] [--monkeys-sidebar-item-padding:var(--monkeys-bento-gap)] data-[collapsed=true]:[--monkeys-sidebar-item-padding:0px]",W?.root,R),classNames:{root:W?.root,header:l("min-h-0 gap-[var(--monkeys-bento-gap)] border-0 p-0",W?.header),title:l("text-xs font-medium uppercase text-muted-foreground",W?.title),collapseButton:l("h-8 w-8",W?.collapseButton),content:l("space-y-[var(--monkeys-bento-gap)] p-0",W?.list),list:"[&_ul]:gap-[var(--monkeys-bento-gap)]",section:l("mt-[var(--monkeys-bento-gap)]",W?.section),sectionLabel:l("mb-[var(--monkeys-bento-gap)] px-[var(--monkeys-bento-gap)]",W?.sectionLabel),item:l("h-auto min-h-9 gap-[var(--monkeys-bento-gap)] rounded-md px-[var(--monkeys-sidebar-item-padding)] py-[calc(var(--monkeys-bento-gap)/2)] text-sm shadow-none",W?.item),itemIcon:l("[&_svg]:h-3.5 [&_svg]:w-3.5",W?.itemIcon),itemLabel:W?.itemLabel,resizeHandle:W?.resizeHandle,mobileNav:l("gap-[var(--monkeys-bento-gap,var(--global-spacing,0.75rem))] pb-0",W?.mobileNav),mobileItem:l("h-auto min-h-9 w-auto shrink-0 gap-[var(--monkeys-bento-gap,var(--global-spacing,0.75rem))] px-[var(--monkeys-bento-gap,var(--global-spacing,0.75rem))] py-[calc(var(--monkeys-bento-gap,var(--global-spacing,0.75rem))/2)] text-sm",W?.mobileItem)},style:{...M,...H}})})},"WorkbenchResizableSidebar"));function ly(e){return !!(e.header||e.footer||e.bodyAs||e.bodyClassName||e.bodyProps||e.classNames?.body)}r(ly,"shouldRenderBodyWrapper");var dy=lt.forwardRef(r(function({as:t="section",bodyAs:o="div",header:n,footer:a,children:i,className:s,headerClassName:u,bodyClassName:c,footerClassName:d,bodyProps:g,classNames:m,style:p,...f},b){let v=ly({header:n,footer:a,bodyAs:o==="div"?void 0:o,bodyClassName:c,bodyProps:g,classNames:m}),{className:y,...x}=g??{};return jsxRuntime.jsxs(t,{ref:b,"data-workbench-content-pane":true,className:l("workbench-surface-subtle flex h-full min-w-0 flex-1 flex-col overflow-hidden rounded-lg border border-border/50 transition-all duration-300 dark:border-border/40",m?.root,s),style:p,...f,children:[n?jsxRuntime.jsx("div",{className:l("shrink-0 border-b border-border/40 px-4 py-3 dark:border-border/30",m?.header,u),children:n}):null,v?jsxRuntime.jsx(o,{className:l("min-h-0 flex-1 overflow-hidden",m?.body,c,y),...x,children:i}):i,a?jsxRuntime.jsx("div",{className:l("shrink-0 border-t border-border/40 px-4 py-3 dark:border-border/30",m?.footer,d),children:a}):null]})},"WorkbenchContentPane"));var Ec={settingsButton:"Gallery settings",title:"Gallery settings",visibleColumns:"Visible fields",coverField:"Cover field",autoDetect:"Auto",cardDensity:"Card density",cardColumns:"Cards per row",detailColumns:"Detail columns",fieldVisibility:"Field visibility",fieldLimit:"Field limit",fieldLimitHint:"Uses current field order",layout:"Gallery layout",compact:"Compact",comfortable:"Standard",detailed:"Detailed",autoColumns:"Auto",columns:r(e=>`${e}`,"columns"),bentoColumns:r(e=>`${e}`,"bentoColumns"),topLimit:"First fields",allFields:"All fields",adaptiveGrid:"Grid",masonry:"Masonry"};function Qo(e){return String(e?.key||"")}r(Qo,"normalizeColumnKey");function py(e){return e.label??e.key}r(py,"getDefaultColumnLabel");function gy(e){return e.filter(t=>Qo(t)&&t.hidden!==true).map(t=>Qo(t))}r(gy,"getDefaultVisibleColumnKeys");function by({columns:e,visibleColumnKeys:t,allowEmptyVisibleColumns:o}){let n=new Set(e.map(Qo).filter(Boolean)),a=Array.isArray(t)?t.filter(i=>n.has(String(i))):null;return a&&(a.length||o)?a:gy(e)}r(by,"getResolvedVisibleColumnKeys");function fy(e){return [{value:"compact",label:e.compact},{value:"comfortable",label:e.comfortable},{value:"detailed",label:e.detailed}]}r(fy,"getDefaultDensityOptions");function yy(e){return [{value:"auto",label:e.autoColumns},{value:1,label:e.columns(1)},{value:2,label:e.columns(2)},{value:3,label:e.columns(3)},{value:4,label:e.columns(4)}]}r(yy,"getDefaultGridColumnOptions");function hy(e){return [{value:1,label:e.bentoColumns(1)},{value:2,label:e.bentoColumns(2)},{value:3,label:e.bentoColumns(3)}]}r(hy,"getDefaultBentoColumnOptions");function xy(e){return [{value:"limit",label:e.topLimit},{value:"all",label:e.allFields}]}r(xy,"getDefaultDetailVisibilityOptions");function vy(e){return [{value:"fixed",label:e.adaptiveGrid},{value:"masonry",label:e.masonry}]}r(vy,"getDefaultLayoutOptions");function Dr(e){return String(e)}r(Dr,"normalizeOptionValue");function Wr(e,t,o){let n=String(t??o);return e.some(a=>String(a.value)===n)?n:String(o)}r(Wr,"getOptionValue");function Pc(e){let t=Number.parseInt(e,10);return Number.isFinite(t)?t:1}r(Pc,"parseNumberOption");var Lr={root:"flex w-full flex-wrap",item:"min-w-[58px] flex-1 px-2 text-[11px]",label:"text-[11px]"};function Dc({columns:e=[],galleryFieldOptions:t,value:o,onValueChange:n,labels:a,densityOptions:i,gridColumnOptions:s,bentoColumnOptions:u,detailVisibilityOptions:c,layoutOptions:d,getColumnLabel:g=py,getColumnDescription:m,showColumnVisibility:p=true,showGalleryControls:f=true,showLayoutControl:b=true,showGridColumns:v=true,showDetailColumns:y=true,allowEmptyVisibleColumns:x=false,className:w,classNames:h}){let k={...Ec,...a},C=o||{},T=e.filter(B=>Qo(B)),S=by({columns:T,visibleColumnKeys:C.visibleColumnKeys,allowEmptyVisibleColumns:x}),I=new Set(S),R=(t||T).filter(B=>Qo(B)),W=i||fy(k),H=s||yy(k),L=u||hy(k),F=c||xy(k),$=d||vy(k),M=typeof n=="function",G=r(B=>{n?.({...C,...B},B);},"updateValue"),Y=r(B=>{if(!M)return;let K=new Set(S);K.has(B)?K.delete(B):K.add(B);let J=T.map(Qo).filter(V=>K.has(V));!J.length&&!x&&(J=[B]),G({visibleColumnKeys:J});},"toggleColumn"),N=p&&T.length>0,D=f;return jsxRuntime.jsxs("div",{className:l("space-y-3 text-foreground",h?.root,w),children:[N?jsxRuntime.jsxs("section",{className:l("space-y-2",h?.section),children:[jsxRuntime.jsx("div",{className:l("text-[10px] font-medium uppercase tracking-wide text-muted-foreground",h?.sectionHeader),children:k.visibleColumns}),jsxRuntime.jsx("div",{className:l("max-h-[220px] space-y-1 overflow-y-auto pr-1",h?.columnList),children:T.map(B=>{let K=Qo(B);return jsxRuntime.jsx(pn,{checked:I.has(K),disabled:!M,label:g(B),description:m?.(B),onChange:()=>Y(K),className:l("flex w-full rounded-lg px-2 py-1.5 hover:bg-muted/50",h?.columnItem)},`workbench-gallery-column-${K}`)})})]}):null,D?jsxRuntime.jsxs("section",{className:l("space-y-3 border-t border-border/60 pt-3",h?.section),children:[jsxRuntime.jsx(Po,{label:k.coverField,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(po,{value:String(C.galleryFieldKey||"auto"),options:[{value:"auto",label:k.autoDetect},...R.map(B=>({value:Qo(B),label:g(B)}))],disabled:!M,onChange:B=>G({galleryFieldKey:B.currentTarget.value||"auto"}),className:h?.control})}),jsxRuntime.jsx(Po,{label:k.cardDensity,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(yn,{value:Wr(W,C.galleryDensity,"comfortable"),options:W.map(B=>({value:Dr(B.value),label:B.label,disabled:B.disabled})),onValueChange:B=>G({galleryDensity:B}),className:l("w-full",h?.control),classNames:Lr})}),v?jsxRuntime.jsx(Po,{label:k.cardColumns,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(yn,{value:Wr(H,C.galleryGridColumns,"auto"),options:H.map(B=>({value:Dr(B.value),label:B.label,disabled:B.disabled})),onValueChange:B=>G({galleryGridColumns:B==="auto"?"auto":Pc(B)}),className:l("w-full",h?.control),classNames:Lr})}):null,y?jsxRuntime.jsx(Po,{label:k.detailColumns,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(yn,{value:Wr(L,C.galleryBentoColumns,2),options:L.map(B=>({value:Dr(B.value),label:B.label,disabled:B.disabled})),onValueChange:B=>G({galleryBentoColumns:Pc(B)}),className:l("w-full",h?.control),classNames:Lr})}):null,jsxRuntime.jsx(Po,{label:k.fieldVisibility,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(yn,{value:Wr(F,C.galleryDetailVisibility,"limit"),options:F.map(B=>({value:Dr(B.value),label:B.label,disabled:B.disabled})),onValueChange:B=>G({galleryDetailVisibility:B}),className:l("w-full",h?.control),classNames:Lr})}),C.galleryDetailVisibility!=="all"?jsxRuntime.jsx(Po,{label:k.fieldLimit,description:k.fieldLimitHint,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground",description:"text-[10px]"},children:jsxRuntime.jsx(to,{type:"number",min:1,step:1,value:String(C.galleryDetailLimit||4),disabled:!M,onChange:B=>G({galleryDetailLimit:B.currentTarget.value}),className:h?.control})}):null,b?jsxRuntime.jsx(Po,{label:k.layout,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(yn,{value:Wr($,C.galleryLayout,"fixed"),options:$.map(B=>({value:Dr(B.value),label:B.label,disabled:B.disabled})),onValueChange:B=>G({galleryLayout:B}),className:l("w-full",h?.control),classNames:Lr})}):null]}):null]})}r(Dc,"WorkbenchGallerySettingsPanel");function ni({open:e,defaultOpen:t=false,onOpenChange:o,triggerIcon:n,triggerLabel:a,triggerTitle:i,align:s="end",popoverWidth:u=320,panelHeader:c,panelBefore:d,panelAfter:g,panelClassName:m,buttonClassName:p,popoverClassName:f,buttonClassNames:b,labels:v,className:y,classNames:x,...w}){let h={...Ec,...v},k=lt.useRef(null),[C,T]=lt.useState(t),[S,I]=lt.useState({}),R=e!==void 0,W=R?!!e:C,H=r($=>{R||T($),o?.($);},"setOpen");lt.useLayoutEffect(()=>{if(!W)return;let $=r(()=>{let Y=k.current?.getBoundingClientRect();if(!Y||typeof window>"u")return;let N=12,D=Math.max(window.innerWidth-N*2,0),B=Math.min(u,D||u),K=s==="start"?Y.left:Y.right-B,J=Math.min(Math.max(K,N),Math.max(window.innerWidth-B-N,N)),V=Math.min(Y.bottom+8,Math.max(window.innerHeight-80,N));I({left:J,top:V,width:B,maxHeight:`calc(100vh - ${Math.round(V+N)}px)`});},"updatePopoverPosition"),M=r(Y=>{k.current?.contains(Y.target)||H(false);},"handlePointerDown"),G=r(Y=>{Y.key==="Escape"&&H(false);},"handleKeyDown");return $(),window.addEventListener("resize",$),window.addEventListener("scroll",$,true),window.addEventListener("pointerdown",M),window.addEventListener("keydown",G),()=>{window.removeEventListener("resize",$),window.removeEventListener("scroll",$,true),window.removeEventListener("pointerdown",M),window.removeEventListener("keydown",G);}},[s,W,u]);let L=a??h.settingsButton,F=c??h.title;return jsxRuntime.jsxs("div",{ref:k,className:l("relative inline-flex",b?.root,y),children:[jsxRuntime.jsx(ve,{icon:n,label:L,title:i||(typeof L=="string"?L:void 0),iconOnly:!!n,active:W,tone:"muted","aria-haspopup":"dialog","aria-expanded":W,className:l(b?.trigger,p),onClick:()=>H(!W)}),W?jsxRuntime.jsxs("div",{role:"dialog","aria-label":typeof F=="string"?F:void 0,className:l("fixed z-50 overflow-y-auto rounded-xl border border-border bg-card p-3 text-foreground shadow-lg",s==="start"?"origin-top-left":"origin-top-right",b?.popover,f),style:S,children:[F?jsxRuntime.jsx("div",{className:l("mb-3 text-[11px] font-medium text-foreground",b?.header),children:F}):null,d,jsxRuntime.jsx(Dc,{...w,labels:h,className:l(b?.panel,m),classNames:x}),g]}):null]})}r(ni,"WorkbenchGallerySettingsButton");function zc(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[jsxRuntime.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),jsxRuntime.jsx("path",{d:"M3 10h18M9 4v16"})]})}r(zc,"TableViewIcon");function Oc(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[jsxRuntime.jsx("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1.5"})]})}r(Oc,"GalleryViewIcon");function Wc(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[jsxRuntime.jsx("path",{d:"M20 7h-9M7 7H4M14 17H4M20 17h-3"}),jsxRuntime.jsx("circle",{cx:"9",cy:"7",r:"2"}),jsxRuntime.jsx("circle",{cx:"16",cy:"17",r:"2"})]})}r(Wc,"SettingsIcon");function Ty({open:e}){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:l("h-3 w-3 opacity-55 transition-transform",e&&"rotate-180"),fill:"none",stroke:"currentColor",strokeWidth:"2",children:jsxRuntime.jsx("path",{d:"m6 9 6 6 6-6"})})}r(Ty,"ChevronDownIcon");var Ry=[{value:"list",label:"Table view",icon:jsxRuntime.jsx(zc,{})},{value:"gallery",label:"Gallery view",icon:jsxRuntime.jsx(Oc,{})}];function Lc(e){return e.icon!==void 0?e.icon:e.value==="list"||e.value==="table"?jsxRuntime.jsx(zc,{}):e.value==="gallery"?jsxRuntime.jsx(Oc,{}):null}r(Lc,"getViewModeOptionIcon");function Ac(e){return e.triggerLabel??e.labels?.settingsButton??"Settings"}r(Ac,"getSettingsTriggerLabel");function Ny({value:e,options:t,onValueChange:o,classNames:n}){let a=lt.useRef(null),[i,s]=lt.useState(false),u=t.find(d=>d.value===e)||t.find(d=>!d.disabled)||t[0],c=u?Lc(u):null;return lt.useEffect(()=>{if(!i)return;let d=r(m=>{a.current?.contains(m.target)||s(false);},"handlePointerDown"),g=r(m=>{m.key==="Escape"&&s(false);},"handleKeyDown");return window.addEventListener("pointerdown",d),window.addEventListener("keydown",g),()=>{window.removeEventListener("pointerdown",d),window.removeEventListener("keydown",g);}},[i]),u?jsxRuntime.jsxs("div",{ref:a,className:l("relative inline-flex",n?.viewModeRoot),children:[jsxRuntime.jsxs("button",{type:"button","aria-haspopup":"listbox","aria-expanded":i,className:l("inline-flex h-7 min-w-0 items-center justify-center gap-1.5 rounded-md border border-border/70 bg-card px-2 text-xs font-medium text-foreground shadow-none transition-colors hover:bg-muted/50 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/25",n?.viewModeTrigger),onClick:()=>s(d=>!d),children:[c?jsxRuntime.jsx("span",{className:"inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center text-muted-foreground",children:c}):null,jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:u.label}),jsxRuntime.jsx(Ty,{open:i})]}),i?jsxRuntime.jsx("div",{role:"listbox",className:l("absolute left-0 top-full z-50 mt-2 min-w-[160px] overflow-hidden rounded-xl border border-border/60 bg-card/95 p-1.5 text-xs text-foreground shadow-lg backdrop-blur-xl",n?.viewModeMenu),children:t.map(d=>{let g=d.value===u.value,m=Lc(d);return jsxRuntime.jsxs("button",{type:"button",role:"option","aria-selected":g,disabled:d.disabled,className:l("flex min-h-8 w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left text-xs font-medium text-muted-foreground transition-colors hover:bg-muted/55 hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",g&&"bg-muted/60 text-foreground",n?.viewModeItem),onClick:()=>{d.disabled||(o?.(d.value,d),s(false));},children:[m?jsxRuntime.jsx("span",{className:"inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:m}):null,jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:d.label})]},d.value)})}):null]}):null}r(Ny,"WorkbenchContentToolbarViewModeControl");var qs=lt.forwardRef(r(function({as:t="div",children:o,end:n,viewMode:a,viewModeOptions:i,onViewModeChange:s,gallerySettings:u,gallerySettingsPlacement:c="start",className:d,startClassName:g,endClassName:m,classNames:p,...f},b){let v=i||(a?Ry:[]),y=u&&typeof u=="object"?u:null,x=!!v.length,w=!!y,h=w&&c!=="end",k=w&&c==="end",C=x||h||!!o,T=!!n||k;return jsxRuntime.jsxs(t,{ref:b,"data-workbench-content-toolbar":true,className:l("flex min-h-[46px] shrink-0 flex-col gap-2 border-b border-border/60 px-4 py-2 md:flex-row md:items-center md:justify-between",p?.root,d),...f,children:[C?jsxRuntime.jsxs("div",{className:l("flex flex-wrap items-center gap-2",p?.start,g),children:[x?jsxRuntime.jsx(Ny,{value:a,options:v,onValueChange:s,classNames:p}):null,h&&y?jsxRuntime.jsx(ni,{align:"end",triggerIcon:jsxRuntime.jsx(Wc,{}),triggerLabel:Ac(y),...y,buttonClassName:l("!h-7 !w-7 !min-h-0 !rounded-md !p-0 text-xs",p?.settings,y.buttonClassName)}):null,o]}):null,T?jsxRuntime.jsxs("div",{className:l("flex shrink-0 items-center gap-2",p?.end,m),children:[n,k&&y?jsxRuntime.jsx(ni,{align:"end",triggerIcon:jsxRuntime.jsx(Wc,{}),triggerLabel:Ac(y),...y,buttonClassName:l("!h-7 !w-7 !min-h-0 !rounded-md !p-0 text-xs",p?.settings,y.buttonClassName)}):null]}):null]})},"WorkbenchContentToolbar"));function By(e){return !!(e.header||e.footer||e.bodyAs||e.bodyClassName||e.bodyProps||e.classNames?.body)}r(By,"shouldRenderBodyWrapper");function Gc(e){if(e==null||typeof e=="boolean")return false;if(typeof e=="string")return e.trim().length>0;if(Array.isArray(e))return e.some(Gc);let t=lt.Children.toArray(e);return t.length?t.some(o=>typeof o=="string"?o.trim().length>0:true):false}r(Gc,"hasRenderableChildren");function Py(e,t){return t===void 0?{}:e===void 0?{width:t}:{width:e?t:0,opacity:e?1:0}}r(Py,"resolveWidthStyle");function Fc(e){return e.label??e.key}r(Fc,"getFallbackFieldLabel");function Ey(e){let t=["text","label","title","display","value","recordId"];for(let o of t){if(!Object.prototype.hasOwnProperty.call(e,o))continue;let n=e[o];if(n!=null&&n!=="")return n}}r(Ey,"getObjectDisplayValue");function Hc(e){return e==null||e===""}r(Hc,"isEmptyDetailValue");function Vc(e){return ["string","number","boolean"].includes(typeof e)}r(Vc,"isPlainDisplayValue");function _c(e){if(!e)return null;if(typeof e=="string"){let n=e.startsWith("data:image/"),a=/\.(avif|gif|jpe?g|png|svg|webp)(\?.*)?$/i.test(e);return n||a?{src:e}:null}if(typeof e!="object"||lt.isValidElement(e))return null;let t=e,o=t.src||t.url||t.thumbnail||t.preview||t.image;return o?{src:String(o),alt:t.alt||t.label||t.title||"",caption:t.caption||t.description||t.label||t.title}:null}r(_c,"getMediaDisplayData");function Dy(e,t){let o=String(e?.renderType||"").toLowerCase();return ["image","media","preview","thumbnail"].includes(o)||!!_c(t)}r(Dy,"shouldRenderAsMedia");function Wy(e,t){return e?typeof e=="string"||typeof e=="number"?jsxRuntime.jsx("span",{className:l("inline-flex h-3.5 min-w-3.5 shrink-0 items-center justify-center rounded-sm text-[10px] font-semibold text-primary",t),children:e}):typeof e=="boolean"?null:lt.isValidElement(e)?e:jsxRuntime.jsx(e,{className:l("h-3.5 w-3.5 shrink-0 text-primary",t)}):jsxRuntime.jsxs("span",{className:l("relative inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center",t),children:[jsxRuntime.jsx("span",{className:"absolute inset-0 rounded-full border border-primary/25 bg-primary/10"}),jsxRuntime.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-primary"})]})}r(Wy,"renderMaybeFieldIcon");function Ly(e,t,o){return jsxRuntime.jsxs("span",{className:l("inline-flex min-w-0 items-center gap-1.5 text-[11px] font-semibold text-foreground",o?.fieldLabel),children:[Wy(t.labelIcon||t.icon,o?.fieldLabelIcon),jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:e})]})}r(Ly,"renderDetailFieldLabel");function Ay({media:e,classNames:t}){return jsxRuntime.jsxs("div",{className:l("grid gap-2",t?.mediaValue),children:[jsxRuntime.jsx("div",{className:"overflow-hidden rounded-md border border-border/55 bg-muted/20 dark:border-border/45 dark:bg-muted/10",children:jsxRuntime.jsx("img",{src:e.src,alt:String(e.alt||""),className:l("block aspect-[16/9] w-full object-cover",t?.mediaImage)})}),e.caption?jsxRuntime.jsx("div",{className:l("truncate text-[11px] leading-4 text-muted-foreground",t?.mediaCaption),children:e.caption}):null]})}r(Ay,"WorkbenchDetailSidebarMediaValue");function Ys(e,t,o,n){if(Hc(e))return t;if(lt.isValidElement(e))return e;if(Dy(o,e)){let a=_c(e);if(a)return jsxRuntime.jsx(Ay,{media:a,classNames:n})}if(Array.isArray(e)){let a=e.map(i=>Ys(i,"",void 0,n)).filter(i=>!Hc(i));return a.length?a.every(Vc)?a.map(String).join(" \xB7 "):jsxRuntime.jsx("span",{className:"inline-flex flex-wrap items-center gap-1",children:a.map((i,s)=>jsxRuntime.jsxs("span",{className:"inline-flex items-center gap-1",children:[s>0?jsxRuntime.jsx("span",{className:"text-muted-foreground",children:"\xB7"}):null,Vc(i)?String(i):i]},s))}):t}if(typeof e=="object"){let a=Ey(e);return a===void 0?t:Ys(a,t,o,n)}return String(e)}r(Ys,"getDefaultDetailDisplayValue");function zy(e,t){return Object.prototype.hasOwnProperty.call(e,"value")?typeof e.value=="function"?e.value(t,e):e.value:t?t?.[e.key]:void 0}r(zy,"getDefaultFieldValue");function Oy(e,t){return typeof e.hidden=="function"?e.hidden(e,t):!!e.hidden}r(Oy,"shouldHideField");function Fy(e,t){return typeof e.hidden=="function"?e.hidden(e,t):!!e.hidden}r(Fy,"shouldHideSection");function Hy({record:e,fields:t,sections:o,fieldColumns:n=1,emptyValue:a="\u2014",emptyState:i,getFieldValue:s,renderFieldValue:u,formatFieldValue:c,formatFieldLabel:d,classNames:g}){let p=(o?.length?o:t?.length?[{fields:t,columns:n}]:[]).filter(f=>!Fy(f,e));return p.length?jsxRuntime.jsx("div",{className:l("space-y-3",g?.autoBody),children:p.map((f,b)=>{let v=(f.fields||[]).filter(w=>!Oy(w,e)),y=f.id||`section-${b}`;if(!v.length&&!f.emptyState)return null;let x=v.map((w,h)=>{let k={field:w,fieldIndex:h,section:f,sectionIndex:b,record:e},C=s?s(w,e,k):zy(w,e),T=u?u(w,e,k):c?c(C,k):Ys(C,w.emptyValue??a,w,g),S=d?d(Fc(w),k):Fc(w);return {term:Ly(S,w,g),value:T}});return jsxRuntime.jsxs("section",{className:l("min-w-0 space-y-3",g?.section),children:[f.title||f.description?jsxRuntime.jsxs("div",{className:l("min-w-0 space-y-1.5",g?.sectionHeader),children:[f.title?jsxRuntime.jsx("div",{className:l("inline-flex max-w-full items-center gap-2 rounded-md border border-primary/20 bg-primary/5 px-2.5 py-1.5 text-xs font-medium text-primary dark:border-primary/25 dark:bg-primary/10",g?.sectionTitle),children:f.title}):null,f.description?jsxRuntime.jsx("div",{className:l("text-[11px] leading-5 text-muted-foreground",g?.sectionDescription),children:f.description}):null]}):null,x.length?jsxRuntime.jsx(vs,{items:x,columns:f.columns||n,className:l("gap-3",g?.descriptionList),classNames:{item:l("!border-0 !bg-transparent !p-0 !shadow-none !gap-1.5",g?.descriptionListItem),term:l("!normal-case !tracking-normal !text-foreground",g?.descriptionListTerm),value:l("min-h-10 rounded-md border border-border/55 bg-muted/25 px-3 py-2 text-xs leading-5 text-foreground shadow-[inset_0_1px_0_hsl(var(--background)/0.8)] dark:border-border/45 dark:bg-white/[0.035]",g?.fieldValue,g?.descriptionListValue)}}):jsxRuntime.jsx("div",{className:l("py-3 text-center text-xs text-muted-foreground",g?.emptyState),children:f.emptyState})]},y)})}):i?jsxRuntime.jsx("div",{className:l("rounded-lg border border-dashed border-border/60 px-3 py-6 text-center text-xs text-muted-foreground",g?.emptyState),children:i}):null}r(Hy,"WorkbenchDetailSidebarAutoContent");var Vy=lt.forwardRef(r(function({as:t="aside",bodyAs:o="div",open:n,width:a,header:i,footer:s,resizeHandle:u,children:c,record:d,fields:g,sections:m,fieldColumns:p,emptyValue:f,emptyState:b,getFieldValue:v,renderFieldValue:y,formatFieldValue:x,formatFieldLabel:w,className:h,headerClassName:k,bodyClassName:C,footerClassName:T,resizeHandleClassName:S,bodyProps:I,classNames:R,style:W,...H},L){let F=Gc(c)?c:jsxRuntime.jsx(Hy,{record:d,fields:g,sections:m,fieldColumns:p,emptyValue:f,emptyState:b,getFieldValue:v,renderFieldValue:y,formatFieldValue:x,formatFieldLabel:w,classNames:R}),$=By({header:i,footer:s,bodyAs:o==="div"?void 0:o,bodyClassName:C,bodyProps:I,classNames:R}),{className:M,...G}=I??{};return jsxRuntime.jsxs(t,{ref:L,"data-workbench-detail-sidebar":true,"data-open":n===void 0?void 0:n?"true":"false",className:l("workbench-surface-subtle relative flex flex-shrink-0 flex-col self-stretch overflow-hidden rounded-lg border border-border/50 transition-all duration-300 dark:border-border/40",n===false&&"pointer-events-none",R?.root,h),style:{...Py(n,a),...W},...H,children:[u?jsxRuntime.jsx("div",{className:l(R?.resizeHandle,S),children:u}):null,i?jsxRuntime.jsx("div",{className:l("shrink-0 border-b border-border/40 px-4 py-3 dark:border-border/30",R?.header,k),children:i}):null,$?jsxRuntime.jsx(o,{className:l("min-h-0 flex-1 overflow-y-auto",R?.body,C,M),...G,children:F}):F,s?jsxRuntime.jsx("div",{className:l("shrink-0 border-t border-border/40 px-4 py-3 dark:border-border/30",R?.footer,T),children:s}):null]})},"WorkbenchDetailSidebar"));function jc(e){return typeof e=="function"?true:typeof e=="object"&&e!==null&&!lt.isValidElement(e)&&"$$typeof"in e}r(jc,"isWorkbenchIconComponent");function zr(e,t){return e?lt.isValidElement(e)?e:jc(e)?jsxRuntime.jsx(e,{className:t}):e:null}r(zr,"renderWorkbenchIcon");function Kc(e){return !e||!jc(e)?null:e}r(Kc,"getWorkbenchIconComponent");function $y(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r($y,"toCssSize");var jy=160,Ky=56,Uy=128;function Uc(e){if(typeof e=="number"&&Number.isFinite(e)&&e>0)return e;if(typeof e!="string")return;let t=e.trim().match(/^(\d+(?:\.\d+)?)px$/i);return t?Number(t[1]):void 0}r(Uc,"numericCssSize");function Jc(e,t){return e.renderType==="icon"?Ky:t?Uy:jy}r(Jc,"defaultWorkbenchColumnWidth");function qc(e,t,o){return t??Uc(e.width)??Uc(e.minWidth)??Jc(e,o)}r(qc,"resolvedWorkbenchColumnWidth");function qy(e){return e==null||e===false?null:e}r(qy,"defaultFormatLabel");function Yc(e){if(typeof e=="string"||typeof e=="number")return String(e)}r(Yc,"toTitle");function Yy(e,t){return e?.id??e?.key??e?.linkKey??t}r(Yy,"defaultGetRowKey");function Jy(e){return e?.linkKey??e?.id??e?.key}r(Jy,"defaultGetRowSelectionKey");function Xy(e,t){if(!t?.length)return e;let o=new Map(e.map(s=>[s.key,s])),n=t.map(s=>o.get(s)).filter(Boolean),a=new Set(n.map(s=>s.key)),i=e.filter(s=>!a.has(s.key));return [...n,...i]}r(Xy,"getOrderedColumns");function Qs(e,t){let o=new Set(e),n=(t||[]).filter(s=>o.has(s)),a=new Set(n),i=e.filter(s=>!a.has(s));return [...n,...i]}r(Qs,"normalizeColumnOrder");function Zy({helperText:e,className:t}){return O(e)?jsxRuntime.jsxs("span",{className:l("group relative inline-flex items-center",t),children:[jsxRuntime.jsx("button",{type:"button",title:Yc(e),"aria-label":Yc(e)||"Field help",className:"inline-flex h-4 w-4 items-center justify-center rounded-md border border-border/60 bg-background text-xs font-semibold normal-case tracking-normal text-muted-foreground shadow-sm transition-colors hover:border-primary/40 hover:text-primary focus-visible:border-primary/40 focus-visible:text-primary focus-visible:outline-hidden",onClick:o=>o.stopPropagation(),children:"?"}),jsxRuntime.jsx("span",{role:"tooltip",className:"pointer-events-none absolute left-1/2 top-full z-40 mt-2 hidden w-72 -translate-x-1/2 whitespace-pre-line rounded-lg border border-border/60 bg-card px-3 py-2 text-xs font-normal normal-case leading-5 tracking-normal text-foreground shadow-sm backdrop-blur-sm group-hover:block group-focus-within:block",children:e})]}):null}r(Zy,"WorkbenchTableHeaderHelper");function Qy({rows:e=[],columns:t=[],onRowClick:o,selectedRowKey:n,selectedLinkKey:a,activePrimaryColumn:i,activeTablePrimaryColumn:s,renderedRowCount:u,totalRowCount:c,tableMinWidth:d,minWidth:g,bodyMaxHeight:m="min(58vh, 38rem)",stickyFirstColumn:p=true,appearance:f,headerPresentation:b,fillRemainingWidthColumnKey:v,columnOrder:y,columnSizes:x,columnDragEnabled:w,columnResizeEnabled:h,className:k,tableClassName:C,rowClassName:T,classNames:S,style:I,renderCell:R,renderFieldValue:W,renderColumnHeader:H,onColumnOrderChange:L,onColumnSizeChange:F,onSort:$,formatLabel:M=qy,getColumnDataType:G,getColumnIcon:Y,getColumnTypeIcon:N,getRowKey:D=Yy,getRowSelectionKey:B=Jy,isActionColumn:K,isActionField:J,isRowDisabled:V,isWorkbenchPlaceholderRow:Q,emptyState:j="-",hiddenRowsMessage:Z,scrollFooter:te,scrollRestoration:ae}){let le=t.map(ne=>ne.key).join(""),A=lt.useMemo(()=>le?le.split(""):[],[le]),[me,P]=lt.useState(A),[_,re]=lt.useState({}),fe=lt.useRef(null),ye=lt.useRef(new Map),xe=lt.useRef(ae);xe.current=ae;let oe=lt.useRef(void 0),se=lt.useCallback(()=>{let ne=fe.current,Se=xe.current;if(!ne||!Se||oe.current!==Se.key)return;let Ve=ne.getBoundingClientRect().top,Ye=Array.from(ye.current.entries()).find(([,nt])=>nt.getBoundingClientRect().bottom>Ve);Se.write({x:ne.scrollLeft,y:ne.scrollTop,...Ye?{rowKey:Ye[0],rowOffset:Ye[1].getBoundingClientRect().top-Ve}:{}});},[]);lt.useEffect(()=>{let ne=fe.current,Se=xe.current;if(!ne||!Se||oe.current===Se.key||e.length===0)return;let Ve=Se.read(),Ye=r(()=>{let Pt=Ve?.rowKey?ye.current.get(Ve.rowKey):void 0,Ue=Pt&&typeof Ve?.rowOffset=="number"?ne.scrollTop+Pt.getBoundingClientRect().top-ne.getBoundingClientRect().top-Ve.rowOffset:Ve?.y??0;ne.scrollTo({left:Ve?.x??0,top:Math.max(0,Ue),behavior:"auto"}),oe.current=Se.key;},"restore"),nt=ne.ownerDocument.defaultView;if(!nt){Ye();return}let gt=nt.requestAnimationFrame(Ye);return ()=>nt.cancelAnimationFrame(gt)},[e,ae?.key]),lt.useEffect(()=>{let ne=fe.current?.ownerDocument.defaultView;return ne?.addEventListener("pagehide",se),()=>{ne?.removeEventListener("pagehide",se),se();}},[se]);let[Re,Ie]=lt.useState();lt.useEffect(()=>{P(ne=>Qs(A,ne));},[A]);let ze=y?Qs(A,y):me,ce=x??_,U=lt.useCallback((ne,Se)=>{let Ve=Qs(A,ne);y||P(Ve),L?.(Ve,Se);},[y,A,L]),z=lt.useCallback((ne,Se,Ve)=>{x||re(Ye=>({...Ye,[ne]:Se})),F?.(ne,Se,Ve);},[x,F]),X=n??a,ie=i??s,q=Xy(t,ze),de=v?q.reduce((ne,Se)=>Se.key===v?ne:ne+qc(Se,ce[Se.key],K?.(Se)??J?.(Se)??false),0):void 0,we=v&&de!==void 0&&Re!==void 0?Math.max(0,Math.round(Re-de)):void 0,Ce=q.flatMap(ne=>ne.key!==v?[ne]:we===0?[]:we===void 0?[ne]:[{...ne,width:we,minWidth:we,maxWidth:we}]),Me=Math.max(0,Number(c||e.length)-Number(u||e.length)),Be=R??W??((ne,Se)=>Se?.[ne.key]),_e=K??J??(()=>false),Ze=V??Q??(()=>false),Fe=Y??N,ot=de!==void 0&&we!==void 0?de+we:void 0,We=ot??d??g??Math.max(760,Ce.reduce((ne,Se)=>ne+qc(Se,ce[Se.key],_e(Se)),0));lt.useEffect(()=>{if(!v){Ie(void 0);return}let ne=fe.current;if(!ne)return;let Se=ne.ownerDocument.defaultView,Ve=r(()=>{let gt=Math.round(ne.getBoundingClientRect().width);!Number.isFinite(gt)||gt<=0||Ie(Pt=>Pt===gt?Pt:gt);},"updateWidth");Ve();let Ye=Se?.ResizeObserver,nt=Ye?new Ye(Ve):void 0;return nt?.observe(ne),Se?.addEventListener("resize",Ve),()=>{nt?.disconnect(),Se?.removeEventListener("resize",Ve);}},[v]);let Le=Me>0&&Z?typeof Z=="function"?Z(Me,u||e.length,c||e.length):Z:null;return jsxRuntime.jsxs(Va,{appearance:f,className:l("w-full overflow-hidden rounded-lg border border-border/40 bg-muted/15 dark:border-border/35 dark:bg-muted/10",S?.root,k),style:m==="100%"?{display:"flex",minHeight:0,flex:1,flexDirection:"column",...I}:I,children:[jsxRuntime.jsxs("div",{ref:fe,onScroll:se,className:l("w-full overflow-auto",S?.scrollArea),style:{maxHeight:$y(m),...m==="100%"?{minHeight:0,flex:1}:{}},children:[jsxRuntime.jsxs(Ga,{appearance:f,columnOrder:ze,columnSizes:ce,columnDragEnabled:w,columnResizeEnabled:h,onColumnOrderChange:U,onColumnSizeChange:z,className:l("w-full table-auto text-left text-xs",S?.table,C),style:{width:ot,minWidth:We},children:[jsxRuntime.jsx(_a,{appearance:f,className:l("z-20 text-xs font-sans text-muted-foreground",S?.header),children:jsxRuntime.jsx(hn,{className:l("hover:bg-transparent",S?.headerRow),children:Ce.map((ne,Se)=>{let Ve=Jc(ne,_e(ne)),Ye=ne.renderType||ne.type||G?.(ne.key,e,ne),nt=zr(Fe?.(Ye,ne),"h-3.5 w-3.5 shrink-0 text-primary"),Pt=Ce[Se-1]?.renderType==="icon"&&ne.key===ie?.key,Ue=H?H(ne,{column:ne,columnIndex:Se,columns:Ce,rows:e,columnType:Ye}):M(ne.label,{column:ne}),Ut=!H&&(O(ne.trailing)||O(ne.helperText))?jsxRuntime.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[O(ne.trailing)?M(ne.trailing,{column:ne}):null,jsxRuntime.jsx(Zy,{helperText:M(ne.helperText,{column:ne}),className:S?.helper})]}):void 0,Ft=!!ne.sortable,pe=Ft&&$?()=>$(ne.key,ne):void 0;return jsxRuntime.jsx(ja,{appearance:f,presentation:b,columnId:ne.key,align:ne.align,icon:H?void 0:nt,label:Ue,description:H?void 0:M(ne.description,{column:ne}),meta:H?void 0:M(ne.meta,{column:ne}),actions:ne.actions,trailing:Ut,sortable:Ft,sortDirection:ne.sortDirection,sortLabel:ne.sortLabel,onSort:pe,draggable:ne.draggable,dragLabel:ne.dragLabel,resizable:ne.resizable,resizeLabel:ne.resizeLabel,width:ne.width??Ve,minWidth:typeof ne.minWidth=="number"?ne.minWidth:void 0,maxWidth:typeof ne.maxWidth=="number"?ne.maxWidth:void 0,className:l("sticky top-0 z-20 h-auto whitespace-nowrap bg-card/95 px-4 py-3 font-medium backdrop-blur-sm supports-[backdrop-filter]:bg-card/90",p&&Se===0&&"md:left-0 md:z-30 md:shadow-[1px_0_0_0_hsl(var(--border)/0.35)]",ne.compactHeaderClassName,ne.renderType==="icon"&&"pl-3 pr-1",Pt&&"pl-2",S?.headerCell,ne.headerClassName),style:{minWidth:typeof ne.minWidth=="string"?ne.minWidth:void 0,maxWidth:typeof ne.maxWidth=="string"?ne.maxWidth:void 0,...ne.headerStyle}},ne.key)})})}),jsxRuntime.jsx($a,{appearance:f,className:l("divide-y divide-border/35 dark:divide-border/30",S?.body),children:e.length?e.map((ne,Se)=>{let Ve=D(ne,Se),Ye=Ze(ne,Se),nt=B(ne,Se),gt=!!(X&&String(nt)===String(X)),Pt=typeof T=="function"?T(ne,Se):T;return jsxRuntime.jsx(hn,{appearance:f,ref:Ue=>{Ue?ye.current.set(String(Ve),Ue):ye.current.delete(String(Ve));},interactive:!!o&&!Ye,"data-item-key":String(Ve),tabIndex:o&&!Ye?0:void 0,selected:gt,disabled:Ye,onClick:Ue=>{Ye||(o&&Ue.currentTarget.focus({preventScroll:true}),o?.(ne,Se));},onKeyDown:Ue=>{Ue.target!==Ue.currentTarget||Ye||!o||!["Enter"," "].includes(Ue.key)||(Ue.preventDefault(),o(ne,Se));},className:l(o&&!Ye?"cursor-pointer":"cursor-default",gt?"bg-primary/10 hover:bg-primary/15":Ye?"":"hover:bg-muted/25 dark:hover:bg-muted/15",S?.row,Pt),children:Ce.map((Ue,Ut)=>{let Ft=_e(Ue)||Ue.wrap===true,Ge=Ce[Ut-1]?.renderType==="icon"&&Ue.key===ie?.key;return jsxRuntime.jsx(Tr,{appearance:f,align:Ue.align,className:l(Ft?"align-top whitespace-normal":"whitespace-nowrap","px-4 py-3 text-muted-foreground",!Ft&&"overflow-hidden text-ellipsis",p&&Ut===0&&"md:sticky md:left-0 md:z-10 md:bg-card/95 md:text-foreground md:shadow-[1px_0_0_0_hsl(var(--border)/0.3)]",Ue.compactCellClassName,Ue.renderType==="icon"&&"pl-3 pr-1",Ge&&"pl-2",S?.cell,Ue.cellClassName),style:Ue.cellStyle,children:Be(Ue,ne,{row:ne,rowIndex:Se,column:Ue,columnIndex:Ut,compact:true,surface:"list"})},`${Ve}-${Ue.key}`)})},Ve)}):jsxRuntime.jsx(Ka,{appearance:f,colSpan:Math.max(Ce.length,1),classNames:{cell:"px-4 py-10 text-center text-sm text-muted-foreground"},children:j})})]}),O(te)?jsxRuntime.jsx("div",{style:{minWidth:We},children:te}):null]}),Le?jsxRuntime.jsx("div",{className:l("border-t border-border/40 px-4 py-2 text-xs text-muted-foreground dark:border-border/30",S?.footer),children:Le}):null]})}r(Qy,"WorkbenchTableView");function el(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r(el,"toCssSize");function Gn(){return typeof window<"u"}r(Gn,"isBrowser");function Zc(e,t){return e?.id??e?.key??t}r(Zc,"defaultGetRowKey");function si(e){return typeof e.width=="number"?e.width:typeof e.minWidth=="number"?e.minWidth:160}r(si,"getColumnDefaultSize");function eh(e,t){return e.reduce((o,n)=>(o[n.key]=t?.[n.key]??si(n),o),{})}r(eh,"buildDefaultColumnSizes");function Qc(e,t){if(!e||!Gn())return t;try{let o=JSON.parse(window.localStorage.getItem(e)||"{}");return Object.keys(t).reduce((n,a)=>{let i=Number(o?.[a]);return n[a]=Number.isFinite(i)?i:t[a],n},{})}catch{return t}}r(Qc,"loadStoredColumnSizes");function eu(e,t){!e||!Gn()||window.localStorage.setItem(e,JSON.stringify(t));}r(eu,"persistColumnSizes");function iu(e){return e?`${e}.frozenColumnCount`:void 0}r(iu,"getFrozenColumnStorageKey");function su(e){return e?`${e}.frozenEndColumnCount`:void 0}r(su,"getFrozenEndColumnStorageKey");function en(e,t){return Number.isFinite(e)?Math.max(0,Math.min(Math.round(e),t)):0}r(en,"clampFrozenColumnCount");function th(e,t,o){let n=en(e,o),a=en(t,Math.max(0,o-n));return {startCount:n,endCount:a}}r(th,"normalizeFrozenColumnCounts");function tu(e,t,o){let n=en(t,o),a=iu(e);if(!a||!Gn())return n;try{let i=window.localStorage.getItem(a);if(i===null)return n;let s=Number(i);return Number.isFinite(s)?en(s,o):n}catch{return n}}r(tu,"loadStoredFrozenColumnCount");function oh(e,t){let o=iu(e);!o||!Gn()||window.localStorage.setItem(o,String(t));}r(oh,"persistFrozenColumnCount");function ou(e,t,o){let n=en(t,o),a=su(e);if(!a||!Gn())return n;try{let i=window.localStorage.getItem(a);if(i===null)return n;let s=Number(i);return Number.isFinite(s)?en(s,o):n}catch{return n}}r(ou,"loadStoredFrozenEndColumnCount");function nh(e,t){let o=su(e);!o||!Gn()||window.localStorage.setItem(o,String(t));}r(nh,"persistFrozenEndColumnCount");function ii(e,t){let o=new Set(e),n=(t||[]).filter(s=>o.has(s)),a=new Set(n),i=e.filter(s=>!a.has(s));return [...n,...i]}r(ii,"normalizeColumnOrder");function rh(e,t){let o=ii(e.map(a=>a.key),t),n=new Map(e.map(a=>[a.key,a]));return o.map(a=>n.get(a)).filter(Boolean)}r(rh,"getOrderedColumns");function Vr(e,t){let o=t[e.key];return typeof o=="number"?o:si(e)}r(Vr,"getColumnNumericWidth");function ah(e,t,o){let n=new Map,a=0;return e.slice(0,Math.max(0,o)).forEach(i=>{n.set(i.key,a),a+=Vr(i,t);}),n}r(ah,"buildFrozenOffsets");function ih(e,t,o){let n=new Map,a=0;return e.slice(Math.max(0,e.length-o)).reverse().forEach(i=>{n.set(i.key,a),a+=Vr(i,t);}),n}r(ih,"buildFrozenEndOffsets");function nu(e,t,o){return typeof e=="function"?e(t,o):e}r(nu,"resolveRowClassName");function ru(e,t){let o=t?.[e.key];return o==null||o===""?"\u2014":String(o)}r(ru,"renderDefaultCell");function au({children:e,wrap:t}){return jsxRuntime.jsx("div",{className:l("min-w-0 max-w-full overflow-auto overscroll-contain [scrollbar-width:thin]",t?"max-h-20 whitespace-pre-wrap break-words leading-5":"whitespace-nowrap"),children:e})}r(au,"InteractiveTableCellContent");function sh({className:e}){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:e,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.75",children:[jsxRuntime.jsx("path",{d:"M5.25 2.75h5.5"}),jsxRuntime.jsx("path",{d:"M6.25 2.75v4L4.5 9.25h7L9.75 6.75v-4"}),jsxRuntime.jsx("path",{d:"M8 9.25v4"})]})}r(sh,"PinIcon");function lh({rows:e=[],columns:t=[],pinnedTopRows:o=[],getRowKey:n=Zc,getPinnedTopRowKey:a=Zc,renderCell:i,renderPinnedTopCell:s,renderColumnHeader:u,onRowClick:c,getRowState:d,rowClassName:g,pinnedTopRowClassName:m,emptyState:p="\u2014",columnMenuLabels:f,columnStorageKey:b,columnOrder:v,columnSizes:y,defaultColumnSizes:x,columnDragEnabled:w=false,columnResizeEnabled:h=true,frozenColumnCount:k=0,frozenEndColumnCount:C=0,tableMinWidth:T,bodyMaxHeight:S="min(60vh, 42rem)",appearance:I,className:R,tableClassName:W,classNames:H,style:L,onColumnOrderChange:F,onColumnSizeChange:$,onResetColumnSizes:M,onFrozenColumnCountChange:G,onFrozenEndColumnCountChange:Y,onSort:N}){let D=vt().workbench.interactiveTable,B=t.map(q=>q.key).join(""),K=lt.useMemo(()=>B?B.split(""):[],[B]),J=lt.useMemo(()=>eh(t,x),[t,x]),[V,Q]=lt.useState(K),[j,Z]=lt.useState(()=>Qc(b,J)),[te,ae]=lt.useState(()=>tu(b,k,t.length)),[le,A]=lt.useState(()=>ou(b,C,t.length));lt.useEffect(()=>{Q(q=>ii(K,q));},[K]),lt.useEffect(()=>{y||Z(Qc(b,J));},[y,b,J]),lt.useEffect(()=>{ae(tu(b,k,t.length));},[b,t.length,k]),lt.useEffect(()=>{A(ou(b,C,t.length));},[b,t.length,C]);let me=v?ii(K,v):V,P=y??j,_=rh(t,me),{startCount:re,endCount:fe}=th(te,le,_.length),ye=ah(_,P,re),xe=ih(_,P,fe),oe=T??Math.max(760,_.reduce((q,de)=>q+Vr(de,P),0)),se={columnActions:f?.columnActions??D.columnActions,freezeColumn:f?.freezeColumn??D.freezeColumn,freezeEndColumn:f?.freezeEndColumn??D.freezeEndColumn,unfreezeColumn:f?.unfreezeColumn??D.unfreezeColumn,unfreezeEndColumn:f?.unfreezeEndColumn??D.unfreezeEndColumn,unfreezeAllColumns:f?.unfreezeAllColumns??D.unfreezeAllColumns,resetColumnWidth:f?.resetColumnWidth??D.resetColumnWidth,frozenColumnTitle:f?.frozenColumnTitle??D.frozenColumnTitle},Re=lt.useCallback((q,de)=>{let we=ii(K,q);v||Q(we),F?.(we,de);},[v,K,F]),Ie=lt.useCallback((q,de,we)=>{let Ce=t.find(Fe=>Fe.key===q),Me=Ce?.minWidth,Be=Ce?.maxWidth,_e=Math.max(typeof Me=="number"?Me:0,Math.min(de,typeof Be=="number"?Be:Number.POSITIVE_INFINITY)),Ze={...P,[q]:_e};y||Z(Ze),eu(b,Ze),$?.(q,_e,we);},[y,b,t,$,P]),ze=lt.useCallback(q=>{let de=J[q.key]??si(q),we=Vr(q,P),Ce={...P,[q.key]:de};y||Z(Ce),eu(b,Ce),$?.(q.key,de,{columnId:q.key,previousWidth:we,minWidth:q.minWidth,maxWidth:q.maxWidth}),M?.(Ce);},[y,b,J,$,M,P]),ce=lt.useCallback(q=>{let de=en(q,Math.max(0,_.length-fe));ae(de),oh(b,de),G?.(de);},[b,G,_.length,fe]),U=lt.useCallback(q=>{let de=en(q,Math.max(0,_.length-re));A(de),nh(b,de),Y?.(de);},[b,Y,_.length,re]),z=r(q=>{if(q<re)return "start";if(q>=_.length-fe)return "end"},"getFrozenPosition"),X=r((q,de,we=false)=>{let Ce=z(de);if(Ce)return l("sticky",Ce==="start"?"shadow-[1px_0_0_0_hsl(var(--border)/0.45)]":"shadow-[-1px_0_0_0_hsl(var(--border)/0.45)]",we?"bg-muted/60":"bg-inherit",we?"z-40":"z-20",(de===0||de===_.length-1)&&(we?"z-50":"z-30"))},"getFrozenClassName"),ie=r((q,de)=>{let we=z(de);if(we==="start")return {left:ye.get(q.key)??0};if(we==="end")return {right:xe.get(q.key)??0}},"getFrozenStyle");return jsxRuntime.jsx(Va,{appearance:I,className:l("flex h-full min-h-0 flex-col overflow-hidden rounded-lg border border-border/60 bg-card",H?.root,R),style:L,children:jsxRuntime.jsx("div",{className:l("min-h-0 flex-1 overflow-auto",H?.scrollArea),style:{maxHeight:el(S)},children:jsxRuntime.jsxs(Ga,{appearance:I,columnOrder:me,columnSizes:P,columnDragEnabled:w,columnResizeEnabled:h,onColumnOrderChange:Re,onColumnSizeChange:Ie,className:l("w-full table-fixed text-left text-xs",H?.table,W),style:{minWidth:oe},children:[jsxRuntime.jsx("colgroup",{children:_.map(q=>jsxRuntime.jsx("col",{style:{width:el(P[q.key]??q.width),minWidth:el(q.minWidth)}},q.key))}),jsxRuntime.jsx(_a,{appearance:I,className:l("border-b border-border/60 bg-muted/60 text-[11px] font-medium text-muted-foreground",H?.tableHeader),children:jsxRuntime.jsx(hn,{appearance:I,className:l("hover:bg-transparent",H?.headerRow),children:_.map((q,de)=>{let we=u?u(q,{column:q,columnIndex:de,columns:_,rows:e}):q.label,Ce=!!q.sortable,Me=Ce&&N?()=>N(q.key,q):void 0,Be=de<re,_e=de>=_.length-fe,Ze=Be||_e,Fe=Vr(q,P)===(J[q.key]??si(q));return jsxRuntime.jsxs(Xd,{modal:false,children:[jsxRuntime.jsx(ys,{asChild:true,appearance:I,children:jsxRuntime.jsx(ja,{appearance:I,columnId:q.key,align:q.align,label:we,description:q.description,trailing:Ze?jsxRuntime.jsx("span",{title:se.frozenColumnTitle,className:"inline-flex h-5 w-5 items-center justify-center rounded text-primary",children:jsxRuntime.jsx(sh,{className:"h-3.5 w-3.5"})}):null,sortable:Ce,sortDirection:q.sortDirection,sortLabel:q.sortLabel,onSort:Me,draggable:q.draggable,resizable:q.resizable,width:q.width,minWidth:q.minWidth,maxWidth:q.maxWidth,className:l("sticky top-0 h-9 whitespace-nowrap border-r border-border/50 bg-muted/60 px-2.5 py-2 backdrop-blur",X(q,de,true),q.headerClassName,q.className,H?.headerCell),style:ie(q,de)})}),jsxRuntime.jsxs(hs,{appearance:I,alignOffset:-4,className:"min-w-44",children:[jsxRuntime.jsx(Zd,{appearance:I,children:se.columnActions}),Ze?jsxRuntime.jsx(Wn,{appearance:I,onSelect:()=>{_e?U(_.length-de-1):ce(de);},children:_e?se.unfreezeEndColumn:se.unfreezeColumn}):jsxRuntime.jsx(Wn,{appearance:I,onSelect:()=>ce(de+1),children:se.freezeColumn}),Ze?null:jsxRuntime.jsx(Wn,{appearance:I,onSelect:()=>U(_.length-de),children:se.freezeEndColumn}),jsxRuntime.jsx(Wn,{appearance:I,disabled:re===0&&fe===0,onSelect:()=>{ce(0),U(0);},children:se.unfreezeAllColumns}),jsxRuntime.jsx(Qd,{appearance:I}),jsxRuntime.jsx(Wn,{appearance:I,disabled:Fe,onSelect:()=>ze(q),children:se.resetColumnWidth})]})]},q.key)})})}),jsxRuntime.jsxs($a,{appearance:I,className:l("divide-y divide-border/50",H?.body),children:[o.map((q,de)=>{let we=a(q,de),Ce=nu(m,q,de);return jsxRuntime.jsx(hn,{appearance:I,className:l("bg-card/95",H?.pinnedTopRow,Ce),children:_.map((Me,Be)=>jsxRuntime.jsx(Tr,{appearance:I,align:Me.align,className:l("h-[52px] border-r border-border/50 px-2.5 py-1.5 align-middle",Me.wrap?"whitespace-normal":"whitespace-nowrap",X(Me,Be),Me.cellClassName,H?.cell),style:ie(Me,Be),children:jsxRuntime.jsx(au,{wrap:Me.wrap,children:s?s(Me,q,{row:q,rowIndex:de,column:Me,columnIndex:Be,isPinnedTopRow:true}):ru(Me,q)})},`pinned-${we}-${Me.key}`))},`pinned-${we}`)}),e.length?e.map((q,de)=>{let we=n(q,de),Ce=d?.(q,de)||{},Me=nu(g,q,de);return jsxRuntime.jsx(hn,{appearance:I,interactive:!!c&&!Ce.disabled,selected:Ce.selected,disabled:Ce.disabled,onClick:()=>{Ce.disabled||c?.(q,de);},className:l("min-h-[52px] bg-card transition-colors",Ce.saving&&"bg-primary/5",Ce.pending&&"opacity-80",c&&!Ce.disabled?"cursor-pointer hover:bg-muted/30":"hover:bg-muted/30",H?.row,Me),children:_.map((Be,_e)=>jsxRuntime.jsx(Tr,{appearance:I,align:Be.align,className:l("h-[52px] border-r border-border/50 px-2.5 py-1.5 align-middle",Be.wrap?"whitespace-normal":"whitespace-nowrap",X(Be,_e),Be.cellClassName,H?.cell),style:ie(Be,_e),children:jsxRuntime.jsx(au,{wrap:Be.wrap,children:i?i(Be,q,{row:q,rowIndex:de,column:Be,columnIndex:_e,isPinnedTopRow:false}):ru(Be,q)})},`${we}-${Be.key}`))},we)}):o.length?null:jsxRuntime.jsx(Ka,{appearance:I,colSpan:Math.max(_.length,1),className:H?.empty,children:p})]})]})})})}r(lh,"InteractiveTable");function dh({value:e,placeholder:t,disabled:o,multiline:n=false,commitOnBlur:a=true,className:i,inputClassName:s,onCommit:u}){let c=String(e||""),[d,g]=lt.useState(c);lt.useEffect(()=>{g(c);},[c]);let m=lt.useCallback(async()=>{let f=String(d||"").trim(),b=String(c||"").trim();if(f!==b)try{await u?.(f);}catch{g(c);}},[d,c,u]),p=l("w-full resize-none rounded-sm border border-transparent bg-transparent px-1.5 py-1 text-xs text-foreground outline-hidden transition-colors","placeholder:text-muted-foreground/70 hover:border-border/60 hover:bg-background focus:border-primary/45 focus:bg-background",n?"min-h-[42px] leading-5":"h-8",o&&"cursor-not-allowed text-muted-foreground hover:border-transparent hover:bg-transparent",s);return n?jsxRuntime.jsx("textarea",{className:l(p,i),disabled:o,value:d,placeholder:t,onChange:f=>g(f.target.value),onBlur:()=>{a&&m();},onKeyDown:f=>{(f.metaKey||f.ctrlKey)&&f.key==="Enter"&&f.currentTarget.blur(),f.key==="Escape"&&(g(c),f.currentTarget.blur());}}):jsxRuntime.jsx("input",{className:l(p,i),disabled:o,value:d,placeholder:t,onChange:f=>g(f.target.value),onBlur:()=>{a&&m();},onKeyDown:f=>{f.key==="Enter"&&f.currentTarget.blur(),f.key==="Escape"&&(g(c),f.currentTarget.blur());}})}r(dh,"InteractiveTableEditableTextCell");function ch({children:e,mono:t=false,className:o}){return jsxRuntime.jsx("div",{className:l("min-w-0 text-xs text-muted-foreground",t&&"font-mono",o),children:O(e)?e:"\u2014"})}r(ch,"InteractiveTableReadonlyCell");function uh({value:e,options:t,disabled:o,ariaLabel:n,children:a,className:i,onChange:s}){return jsxRuntime.jsxs("div",{className:l("relative flex w-full items-center",i),children:[a,jsxRuntime.jsx("select",{"aria-label":n,disabled:o,value:e,onChange:u=>s?.(u.target.value),className:"absolute inset-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed",children:t.map(u=>jsxRuntime.jsx("option",{value:u.value,children:u.label},u.value))})]})}r(uh,"InteractiveTableSelectCell");function lu({children:e,title:t,presentation:o,renderSlot:n}){let a=o.title,i=a?.placement??"none",s=a?.background==="panel"?"div":"span",u=(o.slots??[]).map(g=>({slot:g,content:n?.(g)})).filter(g=>g.content!=null),c=i==="none"?null:jsxRuntime.jsx("div",{className:"monkeys-gallery-cover-title",title:typeof t=="string"||typeof t=="number"?String(t):void 0,"data-placement":i,"data-background":a?.background??(i.startsWith("overlay")?"gradient":"none"),style:{...a?.background==="panel"?{margin:12,borderRadius:"var(--radius)",border:"1px solid hsl(var(--border) / .8)",background:"hsl(var(--card) / .9)",backdropFilter:"blur(12px)",boxShadow:"var(--monkeys-component-overlay-dialog-shadow)"}:{},textAlign:a?.align??"left",padding:a?.padding??12,fontSize:`var(--monkeys-gallery-title-${a?.size??"md"})`,fontWeight:a?.weight==="normal"?400:a?.weight==="medium"?500:600},children:jsxRuntime.jsx(s,{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:a?.background==="panel"?void 0:a?.maxLines??2,overflow:"hidden"},children:t})}),d=r(g=>jsxRuntime.jsx("div",{className:"monkeys-gallery-slot-row","data-row":g,children:u.filter(({slot:m})=>m.position.startsWith(g)).map(({slot:m,content:p})=>jsxRuntime.jsx("div",{"data-card-slot":m.position,"data-visibility":m.visibility??"always",className:m.visibility==="hover"?"monkeys-gallery-hover-actions":void 0,style:{gridColumn:m.position.endsWith("left")?1:m.position.endsWith("center")?2:3,justifySelf:m.position.endsWith("left")?"start":m.position.endsWith("center")?"center":"end",padding:m.inset??12,gap:m.gap??8,flexDirection:m.direction==="vertical"?"column":"row"},children:p},m.position))}),"band");return jsxRuntime.jsxs("div",{className:"monkeys-gallery-card-surface","data-hover-effect":o.hover?.effect??"none",style:{"--monkeys-gallery-hover-scale":o.hover?.scale??1.02},children:[i==="above"&&c,jsxRuntime.jsxs("div",{className:"monkeys-gallery-media-card",children:[jsxRuntime.jsx("div",{className:"monkeys-gallery-card-media",children:e}),jsxRuntime.jsxs("div",{className:"monkeys-gallery-card-overlay",children:[jsxRuntime.jsxs("div",{children:[i==="overlay-top"&&c,d("top")]}),d("middle"),jsxRuntime.jsxs("div",{children:[d("bottom"),i==="overlay-bottom"&&c]})]})]}),i==="below"&&c]})}r(lu,"WorkbenchGalleryCardSurface");var mh=/\.(png|jpe?g|webp|gif|svg|bmp|avif)$/i,ph=/\.(wav|mp3|ogg|m4a|flac|aac)$/i,gh=r(e=>/^https?:\/\//i.test(String(e||"")),"isLikelyUrl"),du=r(e=>String(e?.renderType||e?.type||"").toLowerCase(),"getColumnRenderKind"),bh=r(e=>String(e||"").startsWith("data:image/")||mh.test(String(e||"")),"isImageLikeValue"),fh=r(e=>String(e||"").startsWith("data:audio/")||ph.test(String(e||"")),"isAudioLikeValue"),yh=r(e=>String(e||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),"escapeSvgText"),_n=r((e,t)=>e?t?.[e.key]??null:null,"getDefaultGalleryFieldValue"),$r=r(e=>{if(e==null||e==="")return "\u2014";if(Array.isArray(e))return e.map(o=>{if(typeof o=="string")return o;if(!o||typeof o!="object")return "";let n=o;return n.text||n.label||n.title||n.display||n.value||n.recordId||""}).filter(Boolean).join(" \xB7 ")||"\u2014";if(typeof e=="object"){let t=e;return String(t.text||t.label||t.title||t.display||t.value||"\u2014")}return String(e)},"getDefaultGalleryDisplayText"),jr=r((e={key:""},t)=>du(e)==="image"||bh(t),"isDefaultGalleryImageField"),Kr=r((e={key:""},t)=>du(e)==="audio"||fh(t),"isDefaultGalleryAudioField"),cu=r((e,t,o)=>{if(gh(e)||String(e||"").startsWith("data:image/"))return String(e);let n=yh(e||o||t||""),i=`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 960 540'><defs><linearGradient id='g' x1='0' y1='0' x2='1' y2='1'><stop offset='0%' stop-color='#0f172a'/><stop offset='55%' stop-color='#1d4ed8'/><stop offset='100%' stop-color='#14b8a6'/></linearGradient></defs><rect width='960' height='540' fill='url(#g)'/><g opacity='0.28'><circle cx='780' cy='130' r='150' fill='#67e8f9'/><circle cx='180' cy='430' r='170' fill='#a78bfa'/></g>${n?`<text x='68' y='450' fill='white' font-family='Inter, Arial' font-size='52' font-weight='700'>${n}</text>`:""}</svg>`;return `data:image/svg+xml;utf8,${encodeURIComponent(i)}`},"getDefaultGalleryImagePreviewSrc"),li=r((e,t,{getFieldValue:o=_n,shouldEnhanceMultimodal:n=true,isImageField:a=jr,isAudioField:i=Kr}={})=>{if(!e||!n)return false;let s=o(e,t);return a(e,s)||i(e,s)},"isDefaultGalleryMediaColumn"),di=r((e,t,{isMediaColumn:o=r(()=>false,"isMediaColumn")}={})=>!e||e.renderType==="icon"?false:!o(e,t),"isDefaultGalleryTitleCandidate"),ci=r((e,t,{isMediaColumn:o=r(()=>false,"isMediaColumn")}={})=>!e||e.renderType==="icon"?false:!o(e,t),"isDefaultGallerySummaryCandidate"),uu=r((e,t,{compact:o=false,getFieldValue:n=_n,getDisplayText:a=$r}={})=>{let i=n(e,t);return jsxRuntime.jsx("span",{className:l("leading-relaxed",o&&e?.wrap===true&&"line-clamp-2 block"),children:a(i)})},"renderDefaultGalleryFieldValue");var xh=r(e=>e==="compact"?2:e==="detailed"?6:4,"getDefaultGalleryDetailLimit"),vh=r((e,t)=>e===1||e===2||e===3?Number(e):t==="detailed"?1:2,"getNormalizedGalleryBentoColumns"),kh=r(({density:e,visibility:t,limit:o})=>{if(t==="all")return Number.POSITIVE_INFINITY;let n=Number.parseInt(String(o),10);return Number.isFinite(n)&&n>0?n:xh(e)},"getNormalizedGalleryDetailLimit"),wh=r(e=>e==="compact"?"p-3":e==="detailed"?"p-4":"p-3.5","getGalleryCardPaddingClassName"),Ch=r((e,t)=>t?"h-auto w-full object-cover":e==="compact"?"h-32 w-full object-cover":e==="detailed"?"h-48 w-full object-cover":"h-40 w-full object-cover","getGalleryPreviewClassName"),Sh=r(e=>e===1?"grid-cols-1":e===3?"grid-cols-1 sm:grid-cols-2 2xl:grid-cols-3":"grid-cols-1 sm:grid-cols-2","getGalleryDetailGridClassName");function Th(e){return Kc(e)}r(Th,"getIconComponent");function Rh(e){return e}r(Rh,"defaultFormatLabel");function Nh(e){return typeof e=="string"||typeof e=="number"?String(e):""}r(Nh,"getLabelText");function tl({row:e,columns:t,onClick:o,cardInteraction:n="button",cardPresentation:a,renderCardSlot:i,renderCoverTitle:s,isSelected:u=false,isMasonry:c=false,galleryFieldKey:d="auto",galleryDensity:g="comfortable",galleryBentoColumns:m,galleryDetailVisibility:p="limit",galleryDetailLimit:f,galleryDetailPresentation:b="tiles",shouldEnhanceMultimodal:v=true,getFieldValue:y,isMediaColumn:x,isTitleCandidate:w,isSummaryCandidate:h,getDisplayText:k,renderFieldValue:C,getImagePreviewSrc:T,isImageField:S,isAudioField:I,AudioPlayerComponent:R,cardVariant:W="default",renderPreview:H,renderMeta:L,renderLeadingVisual:F,resolveRecordVisual:$,hiddenDetailFieldKeys:M=[],labels:G,formatLabel:Y=Rh,className:N}){let D=y||_n,B=k||$r,K=S||jr,J=I||Kr,V=T||cu,Q=x||((ge,He)=>li(ge,He,{getFieldValue:D,shouldEnhanceMultimodal:v,isImageField:K,isAudioField:J})),j=w||((ge,He)=>di(ge,He,{isMediaColumn:Q})),Z=h||((ge,He)=>ci(ge,He,{isMediaColumn:Q})),te=C||((ge,He,{compact:ft}={})=>uu(ge,He,{compact:ft,getFieldValue:D,getDisplayText:B})),ae=W==="preview-only",le=W==="image-only",A=W==="chromatic-bento",P=(d!=="auto"?t.find(ge=>ge.key===d&&Q(ge,e)):null)||(v?t.find(ge=>Q(ge,e)):null),_=t.find(ge=>ge.renderType==="icon"),re=_&&$?$(e[_.key],e,_):null,fe=Th(re?.Icon||re?.icon),ye=P?D(P,e):null,xe=P?K(P,ye):false,oe=P?J(P,ye):false,se=t.filter(ge=>ge.key!==P?.key&&ge.renderType!=="icon"),Ie=se.filter(ge=>{if(!ge||Q(ge,e)||!j(ge,e))return false;let He=D(ge,e);return !(He==null||He==="")})[0]||null,ze=B(Ie?D(Ie,e):e.linkKey||e.id),U=se.filter(ge=>ge&&ge.key!==Ie?.key&&!Q(ge,e)&&Z(ge,e)).map(ge=>({column:ge,text:String(B(D(ge,e)))})),z=(U.find(({text:ge})=>ge!=="\u2014"&&ge.length>12)||U.find(({text:ge})=>ge!=="\u2014"))?.column||null,X=z?B(D(z,e)):"",ie=new Set(M),q=se.filter(ge=>ge.key!==Ie?.key&&ge.key!==z?.key&&!ie.has(ge.key)),de=kh({density:g,visibility:p,limit:f}),we=Number.isFinite(de)?q.slice(0,de):q,Ce=g==="detailed",Me=vh(m,g),Be=wh(g),_e=Sh(Me),Ze=b==="lines",Fe=le?a?"block h-auto w-full":"block h-auto w-full transition-transform duration-500 group-hover:scale-[1.02]":Ch(g,c),ot=a?.media?.aspectRatio,We=a?.media?.fit;if(ot!==void 0&&(!Number.isFinite(ot)||ot<=0))throw new TypeError("Gallery media aspectRatio must be a finite positive number.");if(We!==void 0&&We!=="contain"&&We!=="cover")throw new TypeError('Gallery media fit must be "contain" or "cover".');let Le=typeof H=="function"?H({row:e,mediaColumn:P,mediaValue:ye,isImageMedia:xe,isAudioMedia:oe,iconVisual:re,IconComponent:fe,previewClassName:Fe}):null,ne={row:e,contentColumns:se,detailColumns:q,titleColumn:Ie,summaryColumn:z,getDisplayText:B,getFieldValue:D},Se=L?.(ne)??null,Ve=F?.({...ne,iconVisual:re})??null,Ye=!Ve&&re?jsxRuntime.jsx("div",{className:l("flex h-9 w-9 items-center justify-center rounded-lg border",re.chipClassName||"border-primary/20 bg-primary/10 text-primary"),children:zr(re.Icon||re.icon,l("h-4 w-4",re.iconClassName||"text-primary"))}):null,nt=Ve||Ye,gt=A?"shrink-0 rounded-full border border-border/40 bg-muted/25 px-2.5 py-1 text-[10px] text-muted-foreground transition-all duration-300 group-hover:border-primary/30 group-hover:bg-primary/10 group-hover:text-primary dark:border-border/35 dark:bg-muted/15":"shrink-0 rounded-md border border-border/40 bg-muted/25 px-2 py-1 text-[10px] text-muted-foreground dark:border-border/35 dark:bg-muted/15",Pt=A?"rounded-xl border border-border/35 bg-muted/20 px-3 py-2.5 transition-all duration-300 group-hover:border-primary/25 group-hover:bg-primary/5 dark:border-border/30 dark:bg-muted/10":"rounded-lg border border-border/35 bg-muted/20 px-2.5 py-2 dark:border-border/30 dark:bg-muted/10",Ue=A?"text-[10px] uppercase tracking-[0.14em] text-muted-foreground transition-colors duration-300 group-hover:text-foreground":"text-[10px] uppercase tracking-[0.12em] text-muted-foreground",Ut=A?"mt-1.5 text-[11px] text-muted-foreground transition-colors duration-300 group-hover:text-foreground [&_*]:max-w-full [&_pre]:text-[11px] [&_pre]:leading-relaxed":"mt-1.5 text-[11px] text-foreground [&_*]:max-w-full [&_pre]:text-[11px] [&_pre]:leading-relaxed",Ft=G?.fieldCount?.(se.length),pe=G?.coverOnlyHint,Ge=Le==null&&xe&&P?V(ye,e.id,P.label):void 0,ee=Le??jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[xe&&P?jsxRuntime.jsx("div",{style:ot===void 0?void 0:{position:"relative",aspectRatio:ot},className:l("overflow-hidden bg-card/50",le?"rounded-[inherit] bg-transparent":ae?"rounded-[inherit]":"mb-3 rounded-lg border border-border/70"),children:jsxRuntime.jsx("img",{src:Ge,style:{...Ca(Ge),...ot===void 0?{}:{position:"absolute",inset:0,width:"100%",height:"100%"},...We===void 0&&ot===void 0?{}:{objectFit:We??"cover"}},alt:typeof ye?.alt=="string"?ye.alt:typeof ye=="string"?ye:String(P.label||""),className:Fe,loading:"lazy",referrerPolicy:"no-referrer",onError:ge=>{ge.currentTarget.onerror=null,ge.currentTarget.src=V("",e.id,P.label);}})}):null,!xe&&re&&ae?jsxRuntime.jsx("div",{className:l("flex items-center justify-center","rounded-[inherit] border py-10",re.chipClassName||"border-primary/20 bg-primary/5"),children:zr(re.Icon||re.icon,l("h-10 w-10",re.iconClassName||"text-primary"))}):null,oe&&R?jsxRuntime.jsx("div",{className:l(!ae&&"mb-3"),children:jsxRuntime.jsx(R,{filename:String(ye)})}):null]}),ue=a?lu:null,Pe=a?.title?.fieldId?t.find(ge=>ge.key===a.title?.fieldId):Ie,he=s?s(e):Pe?B(D(Pe,e)):ze,ke=!!a?.slots?.length,Ee=ke||n==="container"?"div":"button";return jsxRuntime.jsxs(Ee,{"data-gallery-card":true,"data-card-hover-effect":a?.hover?.effect,type:Ee==="button"?"button":void 0,role:ke&&n==="button"&&o?"group":void 0,tabIndex:ke&&n==="button"&&o?0:void 0,onKeyDown:ke&&n==="button"&&o?ge=>{ge.target===ge.currentTarget&&(ge.key==="Enter"||ge.key===" ")&&(ge.preventDefault(),o());}:void 0,onClick:n==="button"?ge=>{(!ke||!ge.target.closest("button,a,input,select,textarea,[role=button],[role=menuitem]"))&&o?.();}:void 0,"aria-label":Nh(ze),className:l("group relative w-full rounded-lg text-left transition-all duration-300",le?"overflow-hidden bg-transparent p-0 shadow-none":ae?"overflow-hidden bg-transparent p-0":l("overflow-hidden border",A&&"shadow-none"),!ae&&!le&&Be,!ae&&!le&&(u?A?"border-primary/35 bg-background/85 ring-1 ring-primary/20":"border-primary/40 bg-primary/10 ring-1 ring-primary/30":A?a?"workbench-surface-card":"workbench-surface-card hover:-translate-y-1 hover:border-primary/20":a?"workbench-surface-card":"workbench-surface-card hover:border-primary/30"),ae&&u&&"ring-1 ring-primary/30",le&&(u?"ring-1 ring-primary/30":!a&&"hover:-translate-y-0.5"),c?"block h-full w-full min-w-0":"h-full min-w-0",N),children:[A?jsxRuntime.jsx("div",{"aria-hidden":"true",className:l("pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_top_right,hsl(var(--primary)/0.18),transparent_40%),radial-gradient(circle_at_bottom_left,hsl(var(--accent)/0.18),transparent_45%)] opacity-0 transition-opacity duration-300",u?"opacity-100":"group-hover:opacity-100")}):null,jsxRuntime.jsxs("div",{className:l("relative z-[1]",(le||ae)&&"rounded-[inherit]"),children:[ue&&a?jsxRuntime.jsx(ue,{presentation:a,title:he,renderSlot:ge=>i?.(ge,ne),children:ee}):ee,!ae&&!le?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-start gap-3",children:[nt?jsxRuntime.jsx("div",{className:"shrink-0",children:nt}):null,jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-1 items-start justify-between gap-3",children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[!a?.title&&jsxRuntime.jsx("div",{className:l("flex items-center gap-2 text-sm font-semibold",A?"text-muted-foreground transition-colors duration-300 group-hover:text-foreground":"text-foreground"),children:jsxRuntime.jsx("span",{className:"truncate",children:n==="container"&&o?jsxRuntime.jsx("button",{type:"button",onClick:o,className:"border-0 bg-transparent p-0 text-left hover:underline",style:{font:"inherit",color:"inherit"},children:ze}):ze})}),X&&X!==ze?jsxRuntime.jsx("div",{className:l("mt-1 text-[11px] leading-5 text-muted-foreground",Ce?"line-clamp-4":"line-clamp-2",A&&"transition-colors duration-300 group-hover:text-foreground"),children:X}):null]}),Se??(O(Ft)?jsxRuntime.jsx("span",{className:gt,children:Ft}):null)]})]}),we.length>0?jsxRuntime.jsx("div",{"data-gallery-detail-presentation":b,className:l("mt-3 grid grid-flow-row gap-2",Ze?"grid-cols-1":_e),children:we.map(ge=>jsxRuntime.jsxs("div",{className:Ze?"flex min-w-0 items-start gap-2 text-xs":Pt,children:[ge.label?jsxRuntime.jsx("div",{className:Ze?"shrink-0 text-muted-foreground":Ue,children:Y(ge.label,{column:ge})}):null,jsxRuntime.jsx("div",{className:Ze?"min-w-0 text-foreground":l(Ut,!ge.label&&"mt-0"),children:te(ge,e,{compact:g!=="detailed",surface:"gallery"})})]},`${e.id||e.linkKey}-${ge.key}`))}):null,!Ie&&!X&&we.length===0&&O(pe)?jsxRuntime.jsx("div",{className:l("mt-3 text-[11px] text-muted-foreground",A&&"transition-colors duration-300 group-hover:text-foreground"),children:pe}):null]}):null]})]})}r(tl,"WorkbenchGalleryCard");function pu(e,t){let o=e==="rail"?"horizontal":"vertical";if(t&&t!=="auto"&&t!==o)throw new TypeError(`Gallery layout ${e} requires ${o} scrolling.`);return o}r(pu,"resolveGalleryScrollDirection");function Bh(e,t,o,n,a){let i=Array.from({length:t},()=>0),s=0,u=0,c=e.map((d,g)=>{if(a==="rail")return {index:g,left:g*(o+n),top:0,width:o,height:d};if(a==="grid")return g>0&&g%t===0&&(s+=u+n,u=0),u=Math.max(u,d),{index:g,left:g%t*(o+n),top:s,width:o,height:d};let m=i.indexOf(Math.min(...i)),p=i[m];return i[m]=p+d+n,{index:g,left:m*(o+n),top:p,width:o,height:d}});return {placements:c,height:Math.max(0,...c.map(d=>d.top+d.height)),width:a==="rail"?Math.max(0,e.length*(o+n)-n):t*(o+n)-n}}r(Bh,"placeWindowedItems");function Ph(e,t,o,n,a){let i=t-a,s=t+o+a;return e.filter(u=>{let c=n?u.left:u.top;return c<=s&&c+(n?u.width:u.height)>=i})}r(Ph,"visibleWindow");function bu({items:e,getKey:t,layout:o,cardWidth:n,estimateHeight:a,getScrollOwner:i,railRef:s,tailRef:u,containerProps:c,getItemProps:d,renderItem:g}){let m=o.mode==="rail",p=m?1:o.columnCount,f=Math.max(1,m?n??280:o.columnWidth),b=lt.useRef(null),v=lt.useRef(new Map),y=lt.useRef(),[x,w]=lt.useState({width:f,heights:{}}),[h,k]=lt.useState({start:0,length:m?1280:720}),[C,T]=lt.useState(),[S,I]=lt.useState(),R=e.map(t),W=JSON.stringify(R),H=R.map((D,B)=>x.heights[D]??Math.max(1,a(e[B],f))),L=lt.useMemo(()=>Bh(H,p,f,o.gap,m?"rail":o.mode==="grid"?"grid":"masonry"),[JSON.stringify(H),p,f,o.gap,m,o.mode]),F=lt.useCallback(()=>{let D=b.current,B=i();if(!D||!B)return;let K=D.getBoundingClientRect(),J=B.getBoundingClientRect(),V=B.offsetHeight>0?J.height/B.offsetHeight:1,Q=m?B.scrollLeft:(J.top-K.top)/(V||1)+B.clientTop,j=m?B.clientWidth:B.clientHeight;j<=0||k(Z=>Z.start===Q&&Z.length===j?Z:{start:Q,length:j});},[i,m]);lt.useLayoutEffect(()=>{F();},[F,L.height,L.width]),lt.useEffect(()=>{let D=i();if(!D)return;let B=0,K=r(()=>{B||(B=requestAnimationFrame(()=>{B=0,F();}));},"update");D.addEventListener("scroll",K,{passive:true}),window.addEventListener("resize",K);let J=typeof ResizeObserver=="function"?new ResizeObserver(K):void 0;return J?.observe(D),b.current&&J?.observe(b.current),()=>{D.removeEventListener("scroll",K),window.removeEventListener("resize",K),J?.disconnect(),cancelAnimationFrame(B);}},[i,F]),lt.useEffect(()=>{if(typeof ResizeObserver!="function")return;let D=new ResizeObserver(B=>{w(K=>{let J={...K.heights},V=K.width!==f;for(let Q of B){let j=Q.target.dataset.windowKey,Z=Q.borderBoxSize?.[0]?.blockSize??Q.target.offsetHeight;j!==void 0&&Z>0&&J[j]!==Z&&(J[j]=Z,V=true);}return V?{width:f,heights:J}:K});});return y.current=D,v.current.forEach(B=>D.observe(B)),()=>{D.disconnect(),y.current=void 0;}},[f]),lt.useEffect(()=>{let D=new Set(R);w(B=>({width:B.width,heights:Object.fromEntries(Object.entries(B.heights).filter(([K])=>D.has(K)))}));},[W]);let $=r((D,B)=>{let K=v.current.get(D);if(K&&y.current?.unobserve(K),!B){v.current.delete(D);return}B.dataset.windowKey=D,v.current.set(D,B),y.current?.observe(B);},"register"),M=h.length,G=Ph(L.placements,h.start,h.length,m,M),Y=new Set(G.map(D=>D.index));for(let D of [C,S]){let B=D===void 0?-1:R.indexOf(D);B>=0&&Y.add(B);}lt.useLayoutEffect(()=>{if(!S)return;let D=v.current.get(S)?.parentElement;D&&(D.focus(),D.scrollIntoView({block:"nearest",inline:"nearest"}),I(void 0));},[S]);let N={...o,columnWidth:f,itemWidth:f};return jsxRuntime.jsxs("div",{...c,ref:D=>{b.current=D,s&&(s.current=D);},"data-collection-windowed":"","data-collection-total":e.length,style:{...c.style,position:"relative",...m?{overflowX:"auto",overflowY:"hidden"}:{height:L.height},overflowAnchor:"none"},children:[m?jsxRuntime.jsx("div",{"aria-hidden":"true",style:{width:L.width,height:L.height,pointerEvents:"none"}}):null,Array.from(Y).sort((D,B)=>D-B).map(D=>{let B=e[D],K=R[D],J=L.placements[D],V=d(B,N);return jsxRuntime.jsx("div",{...V,"aria-posinset":D+1,"aria-setsize":e.length,onFocus:Q=>{T(K),V.onFocus?.(Q);},onBlur:Q=>{Q.currentTarget.contains(Q.relatedTarget)||T(void 0),V.onBlur?.(Q);},onKeyDown:Q=>{if(Q.target===Q.currentTarget){let j=m?1:p,Z=Q.key==="Home"?0:Q.key==="End"?e.length-1:Q.key==="ArrowRight"?D+1:Q.key==="ArrowLeft"?D-1:Q.key==="ArrowDown"?D+j:Q.key==="ArrowUp"?D-j:void 0;if(Z!==void 0){Q.preventDefault(),I(R[Math.min(e.length-1,Math.max(0,Z))]);return}}V.onKeyDown?.(Q);},style:{...V.style,position:"absolute",left:J.left,top:J.top,width:J.width},children:jsxRuntime.jsx("div",{ref:Q=>$(K,Q),children:g(B,N)})},K)}),u?jsxRuntime.jsx("div",{ref:u,"aria-hidden":"true",style:{position:"absolute",left:Math.max(0,L.width-1),top:0,width:1,height:1}}):null]})}r(bu,"WorkbenchWindowedLayout");var Wh=12,Lh=8,hu=280,vu=240,Ah=typeof window>"u"?lt.useEffect:lt.useLayoutEffect;function gi(e,t,o){return Math.min(Math.max(e,t),o)}r(gi,"clamp");function zh(e){if(typeof window>"u")return 16;let t=e||document.documentElement,o=Number.parseFloat(window.getComputedStyle(t).fontSize);return Number.isFinite(o)&&o>0?o:16}r(zh,"getRootFontSize");function bi(e,t,o){if(typeof e=="number"&&Number.isFinite(e)&&e>0)return e;if(typeof e!="string")return t;let n=e.trim().toLowerCase();if(!n)return t;if(/^\d+(\.\d+)?$/.test(n)){let a=Number.parseFloat(n);return Number.isFinite(a)&&a>0?a:t}if(n.endsWith("px")){let a=Number.parseFloat(n);return Number.isFinite(a)&&a>0?a:t}if(n.endsWith("rem")){let a=Number.parseFloat(n);return !Number.isFinite(a)||a<=0?t:a*zh(o)}return t}r(bi,"resolveLengthToPixels");function xu(e,t){let o=Object.keys(e),n=Object.keys(t);if(o.length!==n.length)return false;for(let a of n)if(e[a]!==t[a])return false;return true}r(xu,"areMeasurementMapsEqual");function Oh({containerWidth:e,itemCount:t,targetColumnWidth:o,gap:n}){if(!e)return 1;let a=Math.max(t,1),i=Math.max(1,Math.min(a,Math.ceil((e+n)/(Math.max(o*.58,1)+n)))),s=1,u=Number.POSITIVE_INFINITY;for(let c=1;c<=i;c+=1){let d=(e-n*Math.max(c-1,0))/c;if(!Number.isFinite(d)||d<=0)continue;let g=Math.max(0,o*.78-d),m=Math.max(0,d-o*1.35),p=Math.abs(d-o)+g*3+m*2;p<u&&(u=p,s=c);}return s}r(Oh,"getMasonryColumnCount");function Fh({size:e,columnWidth:t,columnCount:o,gap:n}){if(Number.isFinite(e?.columnSpan)&&Number(e?.columnSpan)>0)return gi(Math.round(Number(e?.columnSpan)),1,o);let a=bi(e?.width,t,null);return gi(Math.ceil((a+n)/(t+n)),1,o)}r(Fh,"getItemColumnSpan");function Hh({size:e,measuredHeight:t,rowHeight:o,gap:n}){if(Number.isFinite(e?.rowSpan)&&Number(e?.rowSpan)>0)return Math.max(1,Math.round(Number(e?.rowSpan)));let a=Number.isFinite(t)&&Number(t)>0?Number(t):bi(e?.height,vu,null);return Math.max(1,Math.ceil((a+n)/(o+n)))}r(Hh,"getItemRowSpan");function Vh({size:e,measuredHeight:t}){return Number.isFinite(t)&&Number(t)>0?Number(t):bi(e?.height,vu,null)}r(Vh,"getResolvedItemHeight");function Ur({items:e=[],renderItem:t,getItemKey:o=r((p,f)=>p?.id??p?.key??f,"getItemKey"),getItemSize:n,columnWidth:a=hu,columnCount:i,gap:s=Wh,rowHeight:u=Lh,placementStrategy:c="shelf",containerProps:d,getItemProps:g,className:m}){let p=lt.useRef(null),f=lt.useRef(new Map),b=lt.useRef(null),[v,y]=lt.useState(0),[x,w]=lt.useState({}),h=lt.useMemo(()=>e.map((L,F)=>String(o(L,F))),[o,e]),k=h.join("|");lt.useEffect(()=>{let L=p.current;if(!L)return;let F=r(()=>{let $=Math.round(L.getBoundingClientRect().width);y(M=>M===$?M:$);},"updateWidth");if(F(),typeof ResizeObserver=="function"){let $=new ResizeObserver(()=>F());return $.observe(L),()=>$.disconnect()}return window.addEventListener("resize",F),()=>window.removeEventListener("resize",F)},[]),lt.useEffect(()=>{w(L=>{let F=new Set(h),$=Object.fromEntries(Object.entries(L).filter(([M])=>F.has(M)));return xu(L,$)?L:$});},[h,k]);let C=bi(a,hu,p.current),T=c==="dense",I=(Number.isFinite(i)&&Number(i)>0?gi(Math.round(Number(i)),1,24):void 0)||Oh({containerWidth:v,itemCount:e.length,targetColumnWidth:C,gap:s}),R=v>0?(v-s*Math.max(I-1,0))/I:C,W=lt.useMemo(()=>e.map((L,F)=>{let $=h[F],M=typeof n=="function"?n(L,{columnCount:I,columnWidth:R,containerWidth:v,gap:s,placementStrategy:c,rowHeight:u})||{}:{};return {key:$,item:L,size:M,columnSpan:Fh({size:M,columnWidth:R,columnCount:I,gap:s}),rowSpan:Hh({size:M,measuredHeight:x[$],rowHeight:u,gap:s})}}),[I,v,s,n,h,e,x,c,R,u]);Ah(()=>{let L={};f.current.forEach((F,$)=>{let M=Math.ceil(F.getBoundingClientRect().height);Number.isFinite(M)&&M>0&&(L[$]=M);}),w(F=>{if(!Object.keys(L).length)return F;let $={...F,...L};return xu(F,$)?F:$});},[I,T,k,R]),lt.useEffect(()=>{if(typeof ResizeObserver!="function")return;let L=new ResizeObserver(F=>{w($=>{let M={...$},G=false;for(let Y of F){let N=Y.target.dataset.masonryKey;if(!N)continue;let D=Math.ceil(Y.contentRect.height);!Number.isFinite(D)||D<=0||M[N]===D||(M[N]=D,G=true);}return G?M:$});});return b.current=L,f.current.forEach(F=>L.observe(F)),()=>{L.disconnect(),b.current=null;}},[T,k]);let H=r((L,F)=>{let $=f.current,M=$.get(L);if(M&&M!==F&&b.current&&b.current.unobserve(M),!F){$.delete(L);return}F.dataset.masonryKey=L,$.set(L,F),b.current&&b.current.observe(F);},"registerItemNode");if(!T){let L=(()=>{let F=Array.from({length:I},()=>0),$=0,M=0,G=W.map(({key:Y,item:N,columnSpan:D,rowSpan:B,size:K})=>{let J=gi(D,1,I),V=$;if(c==="shortest"){let le=Number.POSITIVE_INFINITY;for(let A=0;A<=I-J;A+=1){let me=Math.max(...F.slice(A,A+J));me<le&&(le=me,V=A);}}else V+J>I&&(V=0),V=Math.min(V,I-J);let Q=R*J+s*Math.max(J-1,0),j=Vh({size:K,measuredHeight:x[Y]}),Z=Math.max(...F.slice(V,V+J)),te=V*(R+s),ae=Z+j;for(let le=V;le<V+J;le+=1)F[le]=ae+s;return M=Math.max(M,ae),c!=="shortest"&&($=V+J,$>=I&&($=0)),{key:Y,item:N,columnSpan:J,itemHeight:j,itemWidth:Q,left:te,rowSpan:B,size:K,top:Z}});return {containerHeight:Math.max(0,M),positionedItems:G}})();return jsxRuntime.jsx("div",{ref:p,...d,className:l("relative w-full",m,d?.className),style:{...d?.style,height:`${L.containerHeight}px`},children:L.positionedItems.map(({key:F,item:$,columnSpan:M,rowSpan:G,size:Y,itemWidth:N,left:D,top:B})=>{let K=v<=0&&I===1,J=K?"100%":`${N}px`,V={columnCount:I,columnSpan:M,columnWidth:R,containerWidth:v,gap:s,itemWidth:N,placementStrategy:c,rowSpan:G,rowHeight:u,size:Y},Q=g?.($,V);return jsxRuntime.jsx("div",{...Q,className:l("absolute min-w-0",Q?.className),style:{...Q?.style,left:K?0:`${D}px`,top:`${B}px`,width:J,maxWidth:J},children:jsxRuntime.jsx("div",{ref:j=>H(F,j),role:"presentation",className:"min-w-0",children:t($,V)})},F)})})}return jsxRuntime.jsx("div",{ref:p,...d,className:l("grid w-full items-start",m,d?.className),style:{...d?.style,gap:`${s}px`,gridAutoFlow:"row dense",gridAutoRows:`${u}px`,gridTemplateColumns:`repeat(${I}, minmax(0, 1fr))`},children:W.map(({key:L,item:F,columnSpan:$,rowSpan:M,size:G})=>{let Y={columnCount:I,columnSpan:$,columnWidth:R,containerWidth:v,gap:s,placementStrategy:c,rowSpan:M,rowHeight:u,size:G},N=g?.(F,Y);return jsxRuntime.jsx("div",{...N,className:l("min-w-0",N?.className),style:{...N?.style,gridColumn:`span ${$}`,gridRow:`span ${M}`},children:jsxRuntime.jsx("div",{ref:D=>H(L,D),role:"presentation",className:"min-w-0",children:t(F,Y)})},L)})})}r(Ur,"WorkbenchMasonryLayout");var _h=12,$h=[1],jh=[4/3],Kh=[1,4/5,3/2,3/4,5/4],Uh=.5,qh=2,Yh="hsl(var(--monkeys-color-muted, var(--muted)))";function fi(e,t,o){return Math.min(Math.max(e,t),o)}r(fi,"clamp");function al(e,t,o){return typeof e!="number"||!Number.isFinite(e)||e<=0?t:fi(Math.round(e),1,o)}r(al,"normalizeCount");function Jh(e){return e==="masonry"||e==="dense"?Kh:e==="rail"?jh:$h}r(Jh,"getDefaultAspectRatios");function Xh(e,t){let o=t?.filter(n=>typeof n=="number"&&Number.isFinite(n)&&n>0).map(n=>fi(n,Uh,qh));return o?.length?o:Jh(e)}r(Xh,"resolveAspectRatios");function wu(e){return al(e?.count,_h,48)}r(wu,"resolveWorkbenchCollectionSkeletonCapacity");function Cu(e){if(e===void 0)return "skeleton";if(e==="skeleton"||e==="spinner")return e;throw new TypeError('WorkbenchCollection loading.variant must be "skeleton" or "spinner".')}r(Cu,"resolveWorkbenchCollectionLoadingVariant");function Zh({columnCount:e,config:t,phase:o}){if(o==="initial"){let a=fi(e*2,6,24);return al(t?.count,a,48)}let n=fi(e,1,12);return al(t?.loadMoreCount,n,24)}r(Zh,"resolveSkeletonCount");function ku(e,t){return Math.max(1,e/t)}r(ku,"getSkeletonHeight");function il({mode:e,phase:t,columnCount:o,columnWidth:n,cardWidth:a,gap:i,rowHeight:s,config:u,ariaLabel:c,className:d}){let g=Zh({columnCount:o,config:u,phase:t}),m=Xh(e,u?.aspectRatios),p=u?.animated??true,f=lt.useMemo(()=>Array.from({length:g},(v,y)=>({aspectRatio:m[y%m.length],key:`${t}-${y}`,index:y})),[m,g,t]),b=r((v,y)=>jsxRuntime.jsx(En,{index:v.index,children:jsxRuntime.jsx(Wt,{variant:"block",animated:p,className:"h-auto w-full rounded-lg",style:{backgroundColor:Yh,...y??{aspectRatio:String(v.aspectRatio)}},"data-collection-skeleton-item":"","data-skeleton-aspect-ratio":v.aspectRatio})}),"renderSkeleton");return jsxRuntime.jsx(jo,{animation:u?.animation,animated:p,children:jsxRuntime.jsx("div",{role:"status","aria-label":c,"aria-atomic":"true","data-collection-loading":t,"data-layout-mode":e,className:"min-w-0",children:e==="masonry"||e==="dense"?jsxRuntime.jsx(Ur,{items:f,columnCount:o,columnWidth:n,gap:i,rowHeight:s,placementStrategy:e==="dense"?"dense":"shortest",className:d,containerProps:{"aria-hidden":true},getItemKey:v=>v.key,getItemSize:(v,y)=>({height:ku(y.columnWidth,v.aspectRatio)}),renderItem:(v,y)=>b(v,{height:`${ku(y.columnWidth,v.aspectRatio)}px`})}):e==="rail"?jsxRuntime.jsx("div",{"aria-hidden":"true",className:l("grid min-w-0 grid-flow-col items-start overflow-x-auto",d),style:{gap:i,gridAutoColumns:typeof a=="number"?`${a}px`:a??`${n}px`},children:f.map(v=>jsxRuntime.jsx("div",{children:b(v)},v.key))}):jsxRuntime.jsx("div",{"aria-hidden":"true",className:l("grid min-w-0 items-start",d),style:{gap:i,gridTemplateColumns:`repeat(${o}, minmax(0, 1fr))`},children:f.map(v=>jsxRuntime.jsx("div",{children:b(v)},v.key))})})})}r(il,"WorkbenchCollectionSkeleton");function ex(e,t){if(e.size!==t.size)return false;for(let o of e)if(!t.has(o))return false;return true}r(ex,"setsEqual");function tx(e){return String(e)}r(tx,"getComparableKey");function ox(e){return e==="multiple"?"toggle":"replace"}r(ox,"getDefaultBehavior");function cl({items:e,getItemKey:t,mode:o="none",behavior:n,selectedKeys:a,defaultSelectedKeys:i,isItemDisabled:s,onSelectionChange:u}){let c=a!==void 0,[d,g]=lt.useState(()=>new Set(i??[])),m=lt.useRef(null),p=lt.useRef(u);p.current=u;let f=lt.useMemo(()=>{let k=new Map;return e.map((C,T)=>{let S=t(C,T),I=tx(S),R=k.get(I);if(R!==void 0)throw new TypeError(`useWorkbenchCollectionSelection received duplicate item key "${I}" at indices ${R} and ${T}.`);return k.set(I,T),{item:C,index:T,key:S}})},[t,e]),b=lt.useMemo(()=>{let k=new Map;return f.forEach(C=>k.set(C.key,C)),k},[f]),v=lt.useMemo(()=>o==="none"?new Set:c?new Set(a??[]):d,[c,a,d,o]),y=lt.useRef(v);y.current=v;let x=lt.useCallback(()=>{m.current=null;},[]);lt.useEffect(()=>{if(c)return;let k=new Set(f.map(({key:C})=>C));g(C=>{let T=new Set(Array.from(C).filter(S=>k.has(S)));return ex(C,T)?C:(y.current=T,T)});},[c,f]),lt.useEffect(()=>{let k=m.current;if(o!=="multiple"||v.size===0||k===null){x();return}let C=b.get(k);(!C||s?.(C.item,C.index))&&x();},[s,b,o,x,v.size]);let w=lt.useCallback((k,C={})=>{if(o==="none")return;let T=b.get(k);if(!T||s?.(T.item,T.index))return;let S=new Set(y.current),I=n??ox(o),R=C.shiftKey&&o==="multiple"?"range":C.behavior??I;o==="single"&&(R=R==="toggle"?"toggle":"replace");let W=m.current===null?void 0:b.get(m.current),H=!!(W&&!s?.(W.item,W.index));o==="multiple"&&R==="range"&&!H&&(R=I==="range"?"toggle":I);let L=new Set;if(o==="single")R==="toggle"&&S.has(T.key)||L.add(T.key);else if(R==="range"&&W){S.forEach(M=>L.add(M));let F=Math.min(W.index,T.index),$=Math.max(W.index,T.index);f.slice(F,$+1).forEach(M=>{s?.(M.item,M.index)||L.add(M.key);});}else R==="replace"?L.add(T.key):(S.forEach(F=>L.add(F)),L.has(T.key)?L.delete(T.key):L.add(T.key));m.current=o==="multiple"?T.key:null,c||(y.current=L,g(L)),p.current?.(L,{item:T.item,index:T.index,key:T.key,behavior:R});},[n,c,s,b,o,f]),h=lt.useCallback(k=>v.has(k),[v]);return {mode:o,selectedKeys:v,isSelected:h,selectKey:w,resetAnchor:x}}r(cl,"useWorkbenchCollectionSelection");var pl=12,ax=8,hi=280,ix=640,sx=1024,Iu=24;function xi(e,t,o){return Math.min(Math.max(e,t),o)}r(xi,"clamp");function ro(e,t){return typeof e=="function"?e(t):e}r(ro,"resolveRenderableSlot");function Kn(e,t,o){if(typeof e=="number"&&Number.isFinite(e)&&e>0)return e;if(typeof e!="string")return t;let n=e.trim().toLowerCase();if(!n)return t;if(/^\d+(\.\d+)?(px)?$/.test(n)){let a=Number.parseFloat(n);return Number.isFinite(a)&&a>0?a:t}if(n.endsWith("rem")){let a=Number.parseFloat(n),i=typeof window>"u"?16:Number.parseFloat(window.getComputedStyle(o||document.documentElement).fontSize)||16;return Number.isFinite(a)&&a>0?a*i:t}return t}r(Kn,"resolveLengthToPixels");function yi(e){if(!(typeof e!="number"||!Number.isFinite(e)||e<=0))return xi(Math.round(e),1,Iu)}r(yi,"normalizeColumns");function Tu(e,t){if(e==="auto"||e===void 0)return;if(typeof e=="number")return yi(e);let o=yi(e.mobile),n=yi(e.tablet),a=yi(e.desktop);return t>=sx?a??n??o:t>=ix?n??o??a:o??n??a}r(Tu,"resolveResponsiveColumns");function lx({containerWidth:e,itemCount:t,gap:o,columns:n,underfilledBehavior:a,maxColumns:i,minCardWidth:s,idealCardWidth:u,maxCardWidth:c,node:d}){let g=Tu(n,e),m=Tu(i,e);if(g)return m?Math.min(g,m):g;if(!e)return 1;let p=Kn(u,hi,d),f=Kn(s,p*.78,d),b=Math.max(f,Kn(c,p*1.35,d)),v=Math.max(t,1),y=Math.max(1,Math.min(a==="preserve-columns"?Iu:v,Math.ceil((e+o)/(Math.max(f*.75,1)+o)))),x=1,w=Number.POSITIVE_INFINITY;for(let h=1;h<=y;h+=1){let k=(e-o*Math.max(h-1,0))/h;if(!Number.isFinite(k)||k<=0)continue;let C=Math.abs(k-p)+Math.max(0,f-k)*3+Math.max(0,k-b)*2;C<w&&(w=C,x=h);}return m?Math.min(x,m):x}r(lx,"resolveColumnCount");function Ru(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0?e:pl}r(Ru,"normalizeGap");function dx(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?e:ax}r(dx,"normalizeRowHeight");function cx(e){return typeof e=="number"&&Number.isFinite(e)?xi(e,0,1):0}r(cx,"normalizeThreshold");function ux(e,t,o){let n=Number.isFinite(t)&&Number(t)>0?Number(t):void 0,a=e?.height??(n?Math.max(1,o/n):void 0);return {...e,height:a}}r(ux,"normalizeItemSize");function mx(e,t){if(e&&typeof e=="object"){let o=e;if(typeof o.id=="string"||typeof o.id=="number")return o.id;if(typeof o.key=="string"||typeof o.key=="number")return o.key}return t}r(mx,"getDefaultItemKey");function px(e){return `@inf-monkeys-tech/monkeys-design:workbench-collection:${e}`}r(px,"getScrollStorageKey");function gx(e){let t=e?.parentElement??null;for(;t;){if(typeof window>"u")return t;let o=window.getComputedStyle(t).overflowY;if(o==="auto"||o==="scroll")return t;t=t.parentElement;}return null}r(gx,"getParentScrollOwner");function Nu(e,t){if(typeof Element>"u"||!(e instanceof Element)||e===t)return false;let o=e.closest('a, button, input, select, textarea, summary, [contenteditable="true"], [data-collection-action]');return !!(o&&t.contains(o))}r(Nu,"isInteractiveEventTarget");function bx(e){if(!(!Number.isFinite(e)||Number(e)<=0))return xi(Math.round(Number(e)),1,12)}r(bx,"normalizeTitleMaxLines");function on({items:e,config:t,renderItem:o,slots:n,callbacks:a,className:i,classNames:s,style:u,ariaLabel:c}){let d=Ne(),g=vt().workbench.collection,m=Ro(),p=dn(),f=lt.useId().replace(/:/g,""),b=lt.useRef(null),v=lt.useRef(null),y=lt.useRef(null),x=lt.useRef(null),w=lt.useRef(false),h=lt.useRef(false),k=lt.useRef(false),C=lt.useRef(false),T=lt.useRef(null),S=lt.useRef(null),I=lt.useRef(void 0),R=lt.useRef(false),[W,H]=lt.useState(0),[L,F]=lt.useState(pl),[$,M]=lt.useState(null),G=lt.useRef(a);G.current=a;let Y=lt.useCallback(ee=>{y.current=ee,M(ee);},[]),N=t.layout.mode;if(N!=="grid"&&N!=="masonry"&&N!=="dense"&&N!=="rail")throw new TypeError(`WorkbenchCollection layout.mode "${String(N)}" is not supported.`);let D=t.layout.gap===void 0?L:Ru(t.layout.gap),B=dx(t.layout.rowHeight),K=t.getItemKey??mx,J=lt.useMemo(()=>e.map((ee,ue)=>{let Pe=K(ee,ue);return {item:ee,index:ue,key:Pe,stringKey:String(Pe)}}),[K,e]),V=J.map(({stringKey:ee})=>ee).join(""),Q=t.state,j=Q?.loading===true,Z=Q?.loadingMore===true,te=Q?.hasMore===true,ae=Cu(t.loading?.variant),le=j&&J.length===0&&ae==="skeleton"?wu(t.loading?.skeleton):J.length,A=t.selection?.mode??"none",me=lt.useCallback(ee=>t.selection?.isItemDisabled?.(ee.item,ee.index)??false,[t.selection?.isItemDisabled]),P=lt.useCallback(ee=>ee.key,[]),_=lt.useCallback((ee,ue)=>{G.current?.onSelectionChange?.(ee,{item:ue.item.item,key:ue.key,behavior:ue.behavior});},[]),{selectedKeys:re,selectKey:fe}=cl({items:J,getItemKey:P,mode:A,behavior:t.selection?.behavior,selectedKeys:t.selection?.selectedKeys,defaultSelectedKeys:t.selection?.defaultSelectedKeys,isItemDisabled:me,onSelectionChange:_});lt.useEffect(()=>{let ee=$;if(!ee)return;let ue=r(()=>{if(t.layout.gap===void 0&&b.current){let he=Number.parseFloat(window.getComputedStyle(b.current).columnGap);F(Number.isFinite(he)&&he>=0?he:pl);}let Pe=ee.clientWidth;H(he=>he===Pe?he:Pe);},"updateWidth");if(ue(),typeof ResizeObserver=="function"){let Pe=new ResizeObserver(ue);return Pe.observe(ee),()=>Pe.disconnect()}if(!(typeof window>"u"))return window.addEventListener("resize",ue),()=>window.removeEventListener("resize",ue)},[$,t.layout.gap,u?.gap,p]);let ye=lx({containerWidth:W,itemCount:le,gap:D,columns:t.layout.columns,underfilledBehavior:t.layout.underfilledBehavior,maxColumns:t.layout.maxColumns,minCardWidth:t.layout.minCardWidth,idealCardWidth:t.layout.idealCardWidth??t.layout.columnWidth,maxCardWidth:t.layout.maxCardWidth,node:y.current}),xe=W>0?Math.max(0,(W-D*Math.max(ye-1,0))/ye):Kn(t.layout.cardWidth??t.layout.columnWidth??t.layout.idealCardWidth,hi,y.current),oe=t.layout.placementStrategy??(N==="dense"?"dense":N==="masonry"?"shortest":"shelf"),se=lt.useMemo(()=>({collection:t.labels?.collection??g.label,loading:t.labels?.loading??g.loading,empty:t.labels?.empty??g.empty,loadError:t.labels?.loadError??g.loadError,refreshError:t.labels?.refreshError??g.refreshError,retry:t.labels?.retry??g.retry,loadingMore:t.labels?.loadingMore??g.loadingMore,permission:t.labels?.permission??g.permission,offline:t.labels?.offline??g.offline,requestAccess:t.labels?.requestAccess??g.requestAccess}),[t.labels,g]),Re=lt.useMemo(()=>{let ee=t.virtualization;return ee?.enabled!==true||ee.fallback!=="error"?null:ee.adapter?ee.adapter.supports?.(N)===false?new Error(`WorkbenchCollection virtualization adapter does not support mode "${N}".`):null:new Error("WorkbenchCollection virtualization requires an adapter.")},[t.virtualization,N]),Ie=lt.useMemo(()=>({mode:N,columnCount:ye,columnWidth:xe,containerWidth:W,gap:D,itemCount:J.length}),[ye,xe,W,D,N,J.length]);lt.useEffect(()=>{G.current?.onLayoutChange?.(Ie),W>0&&!R.current&&(R.current=true,G.current?.onLayoutReady?.(Ie));},[Ie,W]),lt.useEffect(()=>{R.current=false;},[N]);let ze=lt.useCallback(()=>{let ee=t.layout.scrollOwner;return ee&&ee!=="self"&&ee!=="parent"?ee:N==="rail"?v.current:ee==="parent"?gx(b.current):b.current},[t.layout.scrollOwner,N]);lt.useEffect(()=>{let ee=t.scrollRestorationKey?.trim();if(!ee||typeof window>"u")return;let ue=ze();if(!ue)return;let Pe=px(ee);try{let ke=Number.parseFloat(window.sessionStorage.getItem(Pe)??"");Number.isFinite(ke)&&ke>=0&&(ue.scrollTop=ke);}catch{}let he=r(()=>{try{window.sessionStorage.setItem(Pe,String(ue.scrollTop));}catch{}},"saveScrollPosition");return ue.addEventListener("scroll",he,{passive:true}),()=>{he(),ue.removeEventListener("scroll",he);}},[t.scrollRestorationKey,ze]);let ce=typeof a?.onLoadMore=="function",U=Q?.error??Re;lt.useEffect(()=>{(!ce||!te)&&(h.current=false,k.current=false,C.current=false);},[ce,te]);let z=lt.useCallback(()=>{if(!ce||!te||Z||w.current)return;w.current=true;let ee=r(()=>{w.current=false;},"releaseRequest");try{let ue=G.current?.onLoadMore?.();ue&&typeof ue.then=="function"?ue.then(ee,ee):ee();}catch(ue){throw ee(),ue}},[ce,te,Z]);lt.useEffect(()=>{let ee=x.current;if((T.current!==ee||S.current!==V||I.current!==t.loading?.pageKey)&&(T.current=ee,S.current=V,I.current=t.loading?.pageKey,h.current=false,k.current=false,C.current=false),!ee||!ce||!te||typeof IntersectionObserver!="function")return;let ue=ze(),Pe=false,he=true,ke=new IntersectionObserver(He=>{if(!he)return;let ft=He.some(ar=>ar.isIntersecting);if(!(ft&&(Z||w.current))){if(C.current){if(Pe=true,C.current=false,h.current=ft,!ft){k.current=false;return}if(k.current)return;k.current=true,z();return}if(!Pe){Pe=true,h.current=ft,ft||(k.current=false),ft&&t.loading?.autoFill&&!k.current&&(k.current=true,z());return}if(!ft){h.current=false,k.current=false;return}h.current||(h.current=true,k.current=true,z());}},{root:ue===b.current?ue:ue||null,rootMargin:t.loading?.rootMargin??"240px",threshold:cx(t.loading?.threshold)}),Ee=ue??(typeof window>"u"?null:window),ge=r(()=>{!h.current||k.current||C.current||(C.current=true,ke.unobserve(ee),ke.takeRecords(),ke.observe(ee));},"validateActiveIntersection");return ke.observe(ee),Ee?.addEventListener("scroll",ge,{passive:true}),()=>{he=false,ke.disconnect(),Ee?.removeEventListener("scroll",ge);}},[ce,t.loading?.autoFill,t.loading?.pageKey,t.loading?.rootMargin,t.loading?.threshold,te,V,Z,J.length,z,ze]),lt.useEffect(()=>{if(!t.loading?.autoFill||!ce||!te||Z||k.current||w.current||!x.current)return;let ue=ze()??(t.layout.scrollOwner==="parent"?b.current?.parentElement??null:null)??b.current;if(!ue)return;let Pe=N==="rail"?ue.clientWidth:ue.clientHeight,he=N==="rail"?ue.scrollWidth:ue.scrollHeight;Pe<=0||he<=Pe+1&&(k.current=true,z());},[ce,t.layout.scrollOwner,t.loading?.autoFill,t.loading?.pageKey,te,V,Z,J.length,z,ze,N]);let X=lt.useMemo(()=>{if(!t.grouping)return [{key:"__all__",stringKey:"__all__",items:J}];let ee=new Map;return J.forEach(ue=>{let Pe=t.grouping?.getGroupKey(ue.item,ue.index)??"__all__",he=String(Pe),ke=ee.get(he);if(ke){ke.items.push(ue);return}ee.set(he,{key:Pe,stringKey:he,label:t.grouping?.getGroupLabel?.(Pe,ue.item),items:[ue]});}),Array.from(ee.values())},[t.grouping,J]),ie=lt.useCallback((ee,ue)=>{let Pe=t.selection?.isItemDisabled?.(ee.item,ee.index)??false,he={item:ee.item,index:ee.index,key:ee.key,status:t.getItemStatus?.(ee.item,ee.index)??"idle",disabled:Pe,selected:re.has(ee.key),selectionMode:A,layout:ue,select:r(ke=>fe(ee.key,{behavior:ke}),"select"),selectFromEvent:r((ke,Ee)=>fe(ee.key,{behavior:Ee,shiftKey:ke.shiftKey}),"selectFromEvent"),preview:r(()=>a?.onItemPreview?.(ee.item,he),"preview"),detail:r(()=>a?.onItemDetail?.(ee.item,he),"detail"),renderSlot:r(ke=>n?.item?.[ke]?.(ee.item,he),"renderSlot"),notifyMediaLoad:r(()=>a?.onMediaLoad?.(ee.item,he),"notifyMediaLoad"),notifyMediaError:r(ke=>a?.onMediaError?.(ee.item,he,ke),"notifyMediaError")};return he},[a,t.getItemStatus,t.selection,re,fe,A,n?.item]),q=lt.useCallback((ee,ue)=>{let Pe=r(he=>{he.target!==he.currentTarget||he.key!=="Enter"&&he.key!==" "||(he.preventDefault(),A!=="none"?ue.selectFromEvent(he):a?.onItemClick?.(ee.item,ue,he));},"handleKeyboard");return {id:`${f}-item-${ee.index}`,"data-monkeys-collection-item":"","data-item-key":ee.stringKey,"data-selected":ue.selected||void 0,"data-disabled":ue.disabled||void 0,"data-status":ue.status,role:A==="none"?"listitem":"option","aria-selected":A==="none"?void 0:ue.selected,"aria-disabled":ue.disabled||void 0,tabIndex:a?.onItemClick||A!=="none"||t.item?.title?.visibility==="hover"?0:void 0,draggable:a?.onItemDragStart?true:void 0,className:l("min-w-0 group/workbench-collection-item outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t.appearance?.hover&&t.appearance.hover!=="none"&&"transition-[transform,box-shadow,background-color] duration-200",t.appearance?.hover==="highlight"&&"hover:bg-muted/30",t.appearance?.hover==="lift"&&"hover:-translate-y-0.5 motion-reduce:transform-none",t.appearance?.hover==="scale"&&"hover:scale-[1.01] motion-reduce:transform-none",t.appearance?.hover==="shadow"&&"hover:shadow-md",t.appearance?.hover==="lift-shadow"&&"hover:-translate-y-0.5 hover:shadow-md motion-reduce:transform-none",t.appearance?.selection==="ring"&&ue.selected&&"ring-2 ring-primary",t.appearance?.selection==="outline"&&ue.selected&&"outline outline-2 outline-primary",s?.item),onClick:r(he=>{Nu(he.target,he.currentTarget)||(A!=="none"&&ue.selectFromEvent(he),a?.onItemClick?.(ee.item,ue,he));},"onClick"),onDoubleClick:r(he=>{Nu(he.target,he.currentTarget)||a?.onItemDoubleClick?.(ee.item,ue,he);},"onDoubleClick"),onMouseEnter:r(he=>a?.onItemHoverChange?.(ee.item,ue,true,he),"onMouseEnter"),onMouseLeave:r(he=>a?.onItemHoverChange?.(ee.item,ue,false,he),"onMouseLeave"),onKeyDown:Pe,onDragStart:r(he=>a?.onItemDragStart?.(ee.item,ue,he),"onDragStart"),onDragOver:a?.onItemDrop?he=>he.preventDefault():void 0,onDrop:r(he=>a?.onItemDrop?.(ee.item,ue,he),"onDrop")}},[a,s?.item,f,t.appearance,t.item?.title?.visibility,A]),de=lt.useCallback((ee,ue)=>{let Pe=o(ee.item,ue),he=t.item?.title,ke=he?.visibility??"always",Ee=he&&ke!=="never"?he.getContent?.(ee.item,ue)??ue.renderSlot("title"):null,ge=!!(he&&O(Ee)),He=he?.placement??"below",ft=ge&&He.startsWith("overlay-"),ar=bx(he?.maxLines),da=he?.surface??(ft?"scrim":"none"),_l=ge?jsxRuntime.jsx("div",{"data-collection-item-title":"","data-title-placement":He,"data-title-visibility":ke,className:l("min-w-0 px-1 py-2 text-sm font-medium text-foreground",he?.align==="center"&&"text-center",he?.align==="end"&&"text-right",ke==="hover"&&"!opacity-0 transition-opacity group-hover/workbench-collection-item:!opacity-100 group-focus-within/workbench-collection-item:!opacity-100",ft&&"pointer-events-none absolute inset-x-0 z-10 px-3 py-2",He==="overlay-top"&&"top-0",He==="overlay-center"&&"top-1/2 -translate-y-1/2 motion-reduce:transform-none",He==="overlay-bottom"&&"bottom-0",da==="surface"&&"bg-background/90 backdrop-blur-sm",da==="scrim"&&He==="overlay-top"&&"bg-gradient-to-b from-background/90 to-transparent pb-8",da==="scrim"&&He==="overlay-bottom"&&"bg-gradient-to-t from-background/90 to-transparent pt-8",da==="scrim"&&He==="overlay-center"&&"bg-background/75 backdrop-blur-sm",!!ar&&"overflow-hidden [display:-webkit-box] [-webkit-box-orient:vertical]",s?.itemTitle),style:ar?{WebkitLineClamp:ar}:void 0,children:Ee}):null,Xt=t.item?.actions,_i=Xt?.visibility??"always",$l=Xt&&_i!=="never"?ue.renderSlot("actions"):null,$i=!!(Xt&&O($l)),Nn=Xt?.placement??"overlay-bottom",ji=$i&&Nn.startsWith("overlay-"),jl=$i?jsxRuntime.jsx("div",{"data-collection-item-actions":"","data-actions-placement":Nn,"data-actions-align":Xt?.align??"center","data-actions-visibility":_i,className:l("flex min-w-0 items-center gap-2 px-2 py-2",Xt?.align==="start"&&"justify-start",(Xt?.align===void 0||Xt.align==="center")&&"justify-center",Xt?.align==="end"&&"justify-end",Xt?.wrap!==false&&"flex-wrap",_i==="hover"&&"!opacity-0 transition-opacity group-hover/workbench-collection-item:!opacity-100 group-focus-within/workbench-collection-item:!opacity-100 [@media(hover:none)]:!opacity-100",ji&&"pointer-events-none absolute inset-x-0 z-20",Nn==="overlay-top"&&"top-1",Nn==="overlay-bottom"&&"bottom-1",s?.itemActions),children:jsxRuntime.jsx("div",{className:l("pointer-events-auto flex items-center gap-2",Xt?.wrap!==false&&"flex-wrap"),children:$l})}):null;return !ge&&!$i?Pe:jsxRuntime.jsxs("div",{className:l("min-w-0",(ft||ji)&&"relative",s?.itemContent),"data-collection-item-content":"",children:[He==="above"?_l:null,Nn==="above"?jl:null,Pe,He==="below"||ft?_l:null,Nn==="below"||ji?jl:null]})},[s?.itemActions,s?.itemContent,s?.itemTitle,t.item,o]),we=lt.useCallback((ee,ue,Pe=true)=>{let he=ie(ee,ue),ke=de(ee,he);return Pe?jsxRuntime.jsx("div",{...q(ee,he),children:ke}):ke},[ie,q,de]),Ce=lt.useMemo(()=>({mode:N,columnCount:ye,columnWidth:xe,containerWidth:W,gap:D,placementStrategy:oe,rowHeight:B}),[ye,xe,W,D,N,oe,B]),Me=r(ee=>{if(t.windowed&&N!=="dense"){let ke=ee===X[X.length-1];return jsxRuntime.jsx(bu,{items:ee.items,getKey:Ee=>Ee.stringKey,layout:Ce,cardWidth:Kn(t.layout.cardWidth,hi,b.current),getScrollOwner:ze,railRef:N==="rail"&&ke?v:void 0,tailRef:N==="rail"&&ke?x:void 0,estimateHeight:(Ee,ge)=>{let He=t.layout.getItemSize?.(Ee.item,{...Ce,columnWidth:ge}),ft=t.layout.getItemAspectRatio?.(Ee.item,Ee.index);return Kn(He?.height,ft&&ft>0?ge/ft:300,b.current)},containerProps:{role:A==="none"?"list":"listbox","aria-label":c??se.collection,"aria-multiselectable":A==="multiple"||void 0,className:s?.layout},getItemProps:(Ee,ge)=>q(Ee,ie(Ee,ge)),renderItem:(Ee,ge)=>we(Ee,ge,false)})}let ue=t.virtualization,Pe=ue?.adapter,he=ue?.enabled===true;if(he&&(!Pe||Pe.supports?.(N)===false)&&ue?.fallback==="error")return null;if(he&&Pe&&Pe.supports?.(N)!==false)return Pe.render({items:ee.items.map(({item:ke})=>ke),keys:ee.items.map(({key:ke})=>ke),layout:t.layout,scrollOwner:ze(),renderItem:r((ke,Ee,ge)=>{let He=ee.items[Ee];return He?jsxRuntime.jsx(lt.Fragment,{children:we(He,ge)},He.stringKey):null},"renderItem")});if(N==="masonry"||N==="dense")return jsxRuntime.jsx(Ur,{items:ee.items,columnCount:ye,columnWidth:t.layout.cardWidth??t.layout.columnWidth??t.layout.idealCardWidth,gap:D,rowHeight:B,placementStrategy:N==="dense"?"dense":oe,className:s?.layout,containerProps:{role:A==="none"?"list":"listbox","aria-label":c??se.collection,"aria-multiselectable":A==="multiple"||void 0},getItemProps:(ke,Ee)=>{let ge=ie(ke,{...Ee,mode:N});return q(ke,ge)},getItemKey:ke=>ke.key,getItemSize:(ke,Ee)=>{let ge={...Ee,mode:N},He=t.layout.getItemSize?.(ke.item,ge),ft=t.layout.getItemAspectRatio?.(ke.item,ke.index);return ux(He,ft,Ee.columnWidth)},renderItem:(ke,Ee)=>we(ke,{...Ee,mode:N},false)});if(N==="rail"){let ke=t.layout.cardWidth??t.layout.idealCardWidth??hi,Ee=ee===X[X.length-1];return jsxRuntime.jsx("div",{ref:Ee?v:void 0,role:A==="none"?"list":"listbox","aria-label":c??se.collection,"aria-multiselectable":A==="multiple"||void 0,className:l("grid min-w-0 grid-flow-col items-start overflow-x-auto",s?.layout),style:{gap:D,gridAutoColumns:typeof ke=="number"?`${ke}px`:ke},children:ee.items.map((ge,He)=>jsxRuntime.jsx("div",{ref:Ee&&He===ee.items.length-1?x:void 0,className:"min-w-0",children:we(ge,Ce)},ge.stringKey))})}return jsxRuntime.jsx("div",{role:A==="none"?"list":"listbox","aria-label":c??se.collection,"aria-multiselectable":A==="multiple"||void 0,className:l("grid min-w-0 items-start",s?.layout),style:{gap:D,gridTemplateColumns:`repeat(${ye}, minmax(0, 1fr))`},children:ee.items.map(ke=>{let Ee=t.layout.getItemSize?.(ke.item,Ce),ge=xi(Math.round(Number(Ee?.columnSpan)||1),1,ye),He=t.layout.getItemAspectRatio?.(ke.item,ke.index);return jsxRuntime.jsx("div",{...q(ke,ie(ke,{...Ce,columnSpan:ge,size:Ee})),style:{gridColumn:ge>1?`span ${ge}`:void 0,aspectRatio:Number.isFinite(He)&&Number(He)>0?String(He):void 0},children:we(ke,{...Ce,columnSpan:ge,size:Ee},false)},ke.stringKey)})})},"renderGroupItems"),Be={items:e,error:U,loading:j,loadingMore:Z,selectedKeys:re,retry:r(()=>a?.onRetry?.(),"retry")},_e=ro(n?.header,Be),Ze=ro(n?.toolbar,Be),Fe=re.size>0?ro(n?.selectionToolbar,Be):null,ot=ro(n?.beforeItems,Be),We=ro(n?.footer,Be),Le=Q?.permission===true,ne=Q?.offline===true&&!Le,Se=j&&e.length===0&&!Le&&!ne,Ve=!!U&&e.length===0&&!Le&&!ne&&!Se,Ye=!Le&&!ne&&!Se&&!Ve&&(Q?.empty===true||e.length===0),nt=ro(n?.loading,Be),gt=ro(n?.error,Be),Pt=ro(n?.permission,Be),Ue=ro(n?.offline,Be),Ut=ro(n?.empty,Be),Ft=ro(n?.loadMore,Be),pe=t.layout.scrollOwner==="self"||t.layout.scrollOwner===void 0&&(t.layout.fillHeight||t.layout.maxHeight),Ge={...u,gap:t.layout.gap===void 0?u?.gap??"var(--monkeys-bento-gap, var(--global-spacing, 0.75rem))":Ru(t.layout.gap),padding:t.layout.padding??u?.padding,height:t.layout.fillHeight?"100%":u?.height,maxHeight:t.layout.maxHeight??u?.maxHeight,overflow:pe?"auto":u?.overflow};return jsxRuntime.jsxs("section",{ref:b,...d,"data-monkeys-component":"workbench-collection","data-layout-mode":N,"data-density":t.appearance?.density,"data-radius":t.appearance?.radius,"data-media-fit":t.appearance?.mediaFit,"data-hover-effect":t.appearance?.hover,"aria-label":c??se.collection,"aria-busy":j||Z||void 0,className:l("min-h-0 min-w-0",t.layout.fillHeight&&"h-full",s?.root,i),style:Ge,children:[O(_e)?jsxRuntime.jsx("div",{className:s?.header,children:_e}):null,O(Ze)?jsxRuntime.jsx("div",{className:s?.toolbar,children:Ze}):null,O(Fe)?jsxRuntime.jsx("div",{className:s?.selectionToolbar,children:Fe}):null,O(ot)?jsxRuntime.jsx("div",{className:s?.beforeItems,children:ot}):null,Le?O(Pt)?Pt:jsxRuntime.jsx(Sr,{kind:"permission",title:se.permission,actions:m.permission?.showRequestAccess!==false&&a?.onRequestAccess?jsxRuntime.jsx(ve,{size:"sm",label:se.requestAccess,onClick:a.onRequestAccess}):void 0}):ne?O(Ue)?Ue:jsxRuntime.jsx(Sr,{kind:"offline",title:se.offline,actions:m.error?.showRetry!==false&&a?.onRetry?jsxRuntime.jsx(ve,{size:"sm",label:se.retry,onClick:a.onRetry}):void 0}):Se?O(nt)?nt:ae==="spinner"?jsxRuntime.jsx(Yo,{title:se.loading,variant:"spinner"}):jsxRuntime.jsx("div",{ref:Y,className:l("min-w-0",s?.items),children:jsxRuntime.jsx(il,{mode:N,phase:"initial",columnCount:ye,columnWidth:xe,cardWidth:t.layout.cardWidth??t.layout.idealCardWidth,gap:D,rowHeight:B,config:t.loading?.skeleton,ariaLabel:se.loading,className:s?.layout})}):Ve?O(gt)?gt:jsxRuntime.jsx(Sr,{kind:"error",title:se.loadError,actions:m.error?.showRetry!==false&&a?.onRetry?jsxRuntime.jsx(ve,{size:"sm",label:se.retry,onClick:a.onRetry}):void 0}):Ye?O(Ut)?Ut:jsxRuntime.jsx(Ba,{title:se.empty}):jsxRuntime.jsx("div",{ref:Y,className:l("min-w-0",s?.items),children:X.map((ee,ue)=>{let Pe={key:ee.key,label:ee.label,items:ee.items.map(({item:Ee})=>Ee),groupIndex:ue},he=t.grouping?n?.groupHeading?.(Pe,Be)??ee.label:null,ke=`${f}-group-${ue}`;return jsxRuntime.jsxs("div",{"data-collection-group":ee.stringKey,className:s?.group,children:[O(he)?jsxRuntime.jsx("div",{id:ke,role:"heading","aria-level":2,className:s?.groupHeading,children:he}):null,Me(ee)]},ee.stringKey)})}),e.length>0&&U?jsxRuntime.jsx("div",{className:s?.status,children:O(gt)?gt:jsxRuntime.jsx(Sr,{kind:"error",title:se.refreshError,actions:m.error?.showRetry!==false&&a?.onRetry?jsxRuntime.jsx(ve,{size:"sm",label:se.retry,onClick:a.onRetry}):void 0})}):null,e.length>0&&(te||Z)?jsxRuntime.jsx("div",{ref:N==="rail"?void 0:x,className:s?.loadMore,"data-collection-load-more":"",children:O(Ft)?Ft:Z?ae==="spinner"?jsxRuntime.jsx(Yo,{title:se.loadingMore,variant:"spinner"}):jsxRuntime.jsx(il,{mode:N,phase:"load-more",columnCount:ye,columnWidth:xe,cardWidth:t.layout.cardWidth??t.layout.idealCardWidth,gap:D,rowHeight:B,config:t.loading?.skeleton,ariaLabel:se.loadingMore,className:s?.layout}):null}):null,O(We)?jsxRuntime.jsx("div",{className:s?.footer,children:We}):null]})}r(on,"WorkbenchCollection");function hx(e){if(typeof e=="number"&&Number.isFinite(e)&&e>0)return `${e}px`;if(typeof e=="string"&&e.trim())return e.trim()}r(hx,"getNormalizedGalleryGridCardWidth");function xx(e){return e==="compact"?2:e==="detailed"?6:4}r(xx,"getDefaultGalleryDetailLimit");function vx(e,t){return e===1||e===2||e===3?Number(e):t==="detailed"?1:2}r(vx,"getNormalizedGalleryBentoColumns");function kx({density:e,visibility:t,limit:o}){if(t==="all")return Number.POSITIVE_INFINITY;let n=Number.parseInt(String(o),10);return Number.isFinite(n)&&n>0?n:xx(e)}r(kx,"getNormalizedGalleryDetailLimit");function Mu(e){return e==="compact"?{min:220,ideal:244,max:268}:e==="detailed"?{min:320,ideal:372,max:420}:{min:260,ideal:304,max:348}}r(Mu,"getGalleryCardWidthMetrics");function wx(e){if(e==null||e===""||e==="auto")return;let t=Number.parseInt(String(e),10);if(!(!Number.isFinite(t)||t<=0))return Math.max(1,Math.min(t,8))}r(wx,"getNormalizedGalleryGridColumns");function Bu(e){if(e==null)return 0;let t=String(e).trim();return t&&t!=="\u2014"?t.length:0}r(Bu,"getGalleryTextLength");function qr({column:e,row:t,getFieldValue:o,getDisplayText:n}){if(!e)return "";let a=o(e,t);if(a==null||a==="")return "";let i=n(a);return i==="\u2014"?"":String(i)}r(qr,"getGalleryFieldText");function gl({text:e,charsPerLine:t,maxLines:o}){let n=Bu(e);return n?Math.max(1,Math.min(o,Math.ceil(n/t))):0}r(gl,"estimateLineCount");function Cx({text:e,density:t,bentoColumns:o}){let n=t==="detailed"?54:t==="compact"?44:48,s=gl({text:e,charsPerLine:o===1?t==="detailed"?32:26:t==="detailed"?18:15,maxLines:t==="detailed"?3:2});return s?n+Math.max(0,s-1)*16:n}r(Cx,"estimateGalleryDetailCellHeight");function Sx({columns:e,density:t,bentoColumns:o}){if(!e.length)return 0;let n=e.map(i=>Cx({text:i.text,density:t,bentoColumns:o}));if(o===1)return 12+n.reduce((i,s)=>i+s,0)+Math.max(0,e.length-1)*8;let a=12;for(let i=0;i<n.length;i+=o){let s=n.slice(i,i+o);a+=Math.max(...s),i+o<n.length&&(a+=8);}return a}r(Sx,"estimateGalleryDetailGridHeight");function Tx({row:e,columns:t,galleryFieldKey:o,galleryDensity:n,galleryBentoColumns:a,galleryDetailVisibility:i,galleryDetailLimit:s,getFieldValue:u,isMediaColumn:c,isTitleCandidate:d,isSummaryCandidate:g,getDisplayText:m,isImageField:p,isAudioField:f,cardVariant:b,renderPreview:v,renderLeadingVisual:y,hiddenDetailFieldKeys:x,layout:w,resolveRecordVisual:h}){let k=t.find(A=>A.renderType==="icon"),C=k&&h?h(e?.[k.key],e,k):null,S=(o!=="auto"?t.find(A=>A.key===o&&c(A,e)):null)||t.find(A=>c(A,e))||null,I=S?u(S,e):null,R=S?p(S,I):false,W=S?f(S,I):false,L=!!y||!!C,F=t.filter(A=>A.key!==S?.key&&A.renderType!=="icon"),M=F.filter(A=>{if(!A||c(A,e)||!d(A,e))return false;let me=u(A,e);return !(me==null||me==="")})[0]||null,G=M?qr({column:M,row:e,getFieldValue:u,getDisplayText:m}):String(m(e?.linkKey||e?.id||"")),Y=F.find(A=>!A||A.key===M?.key||c(A,e)||!g(A,e)?false:qr({column:A,row:e,getFieldValue:u,getDisplayText:m}).length>12)||F.find(A=>!A||A.key===M?.key||c(A,e)||!g(A,e)?false:Bu(qr({column:A,row:e,getFieldValue:u,getDisplayText:m}))>0)||null,N=Y?qr({column:Y,row:e,getFieldValue:u,getDisplayText:m}):"",D=new Set(x),B=F.filter(A=>A.key!==M?.key&&A.key!==Y?.key&&!D.has(A.key)).map(A=>({column:A,text:qr({column:A,row:e,getFieldValue:u,getDisplayText:m})})),K=kx({density:n,visibility:i,limit:s}),J=Number.isFinite(K)?B.slice(0,K):B,V=Math.max(B.length-J.length,0),Q=vx(a,n),j=w?.columnWidth||Mu(n).ideal;if(b==="image-only")return {width:j,height:Math.round(j*1.25)};if(b==="preview-only")return {width:j,height:Math.round(j*.82)};let Z=n==="detailed"?84:n==="compact"?64:72;typeof v=="function"?Z+=n==="detailed"?188:n==="compact"?140:164:R?Z+=Math.round(j*(n==="detailed"?.72:.62))+12:W&&(Z+=92);let te=gl({text:G,charsPerLine:n==="detailed"?26:24,maxLines:2})||1,ae=gl({text:N,charsPerLine:L?22:n==="detailed"?30:26,maxLines:n==="detailed"?4:2}),le=26+te*18+(ae>0?ae*16+4:0);return Z+=Math.max(L?56:0,le),Z+=Sx({columns:J,density:n,bentoColumns:Q}),V>0&&(Z+=18),!N&&J.length===0&&(Z+=24),{width:j,height:Z}}r(Tx,"getDefaultGalleryMasonryItemSize");function Rx({rows:e=[],children:t,columns:o=[],onRowClick:n,cardInteraction:a="button",selectedLinkKey:i,selectedRowKey:s,selectedRowKeys:u,className:c,isMasonry:d=false,galleryLayoutMode:g="auto",galleryRailCardWidth:m,galleryGap:p,galleryScrollDirection:f,galleryGridColumns:b,galleryGridColumnsResponsive:v,galleryCardWidthMetrics:y,galleryCardAspectRatio:x,galleryCardMinHeight:w,galleryGridCardWidth:h,galleryUnderfilledBehavior:k,galleryMasonryColumnWidth:C,masonryPlacementStrategy:T,pagination:S,onLoadMore:I,scrollOwner:R,windowed:W,galleryFieldKey:H="auto",galleryDensity:L="comfortable",galleryBentoColumns:F=2,galleryDetailVisibility:$="limit",galleryDetailLimit:M,shouldEnhanceMultimodal:G=true,getFieldValue:Y,isMediaColumn:N,isTitleCandidate:D,isSummaryCandidate:B,getDisplayText:K,renderFieldValue:J,getImagePreviewSrc:V,isImageField:Q,isAudioField:j,AudioPlayerComponent:Z,cardVariant:te="default",cardPresentation:ae,renderCardSlot:le,renderCoverTitle:A,galleryDetailPresentation:me,renderPreview:P,renderMeta:_,renderLeadingVisual:re,resolveRecordVisual:fe,hiddenDetailFieldKeys:ye=[],labels:xe,formatLabel:oe,getMasonryItemSize:se}){let{min:Re,ideal:Ie,max:ze}=y??Mu(L),ce=m||Re,U=wx(b),z=hx(h),X=C||Re,ie=g==="rail",q=Y||_n,de=K||$r,we=Q||jr,Ce=j||Kr,Me=N||((We,Le)=>li(We,Le,{getFieldValue:q,shouldEnhanceMultimodal:G,isImageField:we,isAudioField:Ce})),Be=D||((We,Le)=>di(We,Le,{isMediaColumn:Me})),_e=B||((We,Le)=>ci(We,Le,{isMediaColumn:Me})),Ze=J||((We,Le,{compact:ne}={})=>jsxRuntime.jsx("span",{children:de(q(We,Le))})),Fe=r((We,Le)=>jsxRuntime.jsx(tl,{row:We,columns:o,cardInteraction:a,onClick:n?()=>n(We,Le):void 0,isSelected:u?u.has(String(We?.linkKey||We?.id||"")):String(We?.linkKey||We?.id||"")===String(s||i||""),isMasonry:d,galleryFieldKey:H,galleryDensity:L,galleryBentoColumns:F,galleryDetailVisibility:$,galleryDetailLimit:M,galleryDetailPresentation:me,shouldEnhanceMultimodal:G,getFieldValue:q,isMediaColumn:Me,isTitleCandidate:Be,isSummaryCandidate:_e,getDisplayText:de,renderFieldValue:Ze,getImagePreviewSrc:V,isImageField:we,isAudioField:Ce,AudioPlayerComponent:Z,cardVariant:te,cardPresentation:ae,renderCardSlot:le,renderCoverTitle:A,renderPreview:P,renderMeta:_,renderLeadingVisual:re,resolveRecordVisual:fe,hiddenDetailFieldKeys:ye,labels:xe,formatLabel:oe},We?.id||We?.linkKey||Le),"renderGalleryCard"),ot=d?T==="dense"?"dense":"masonry":ie?"rail":"grid";if(pu(ot,f),t!==void 0){let We=lt.Children.toArray(t);return jsxRuntime.jsx(on,{items:We,callbacks:{onLoadMore:I},slots:{loadMore:S?.loadingMore?jsxRuntime.jsx(Yo,{variant:"spinner",className:"py-global",style:{minHeight:0}}):void 0},classNames:{layout:c},config:{windowed:W,state:S,loading:{autoFill:true},getItemKey:r((Le,ne)=>lt.isValidElement(Le)&&Le.key!=null?Le.key:ne,"getItemKey"),layout:{mode:ot,scrollOwner:R??"parent",gap:p,columns:v??(U?{mobile:1,tablet:Math.min(2,U),desktop:U}:"auto"),underfilledBehavior:k,cardWidth:ie?ce:void 0,minCardWidth:z??Re,idealCardWidth:z??Ie,maxCardWidth:z??ze}},renderItem:Le=>Le})}return jsxRuntime.jsx(on,{items:e,slots:{loadMore:S?.loadingMore?jsxRuntime.jsx(Yo,{variant:"spinner",className:"py-global",style:{minHeight:0}}):void 0},callbacks:{onLoadMore:I,onItemClick:a==="container"&&n?(We,Le)=>n(We,Le.index):void 0},classNames:{layout:c},config:{windowed:W,state:S,loading:{autoFill:true},getItemKey:r((We,Le)=>We?.id||We?.linkKey||Le,"getItemKey"),layout:{mode:ot,underfilledBehavior:k,scrollOwner:R,gap:p,columns:v??(U?{mobile:1,tablet:Math.min(2,U),desktop:U}:"auto"),cardWidth:ie?ce:void 0,minCardWidth:z??Re,idealCardWidth:d?X:z??Ie,maxCardWidth:z??ze,placementStrategy:T??(te==="image-only"?"shortest":"shelf"),getItemAspectRatio:te==="image-only"?We=>{let Le=o.find(nt=>nt.key===H)??o.find(nt=>Me(nt,We)),ne=Le?q(Le,We):void 0,Se=ne&&typeof ne=="object"&&"aspectRatio"in ne?ne.aspectRatio:void 0;if(typeof Se!="string"||!/^\d+(?:\.\d+)?:\d+(?:\.\d+)?$/.test(Se))return;let[Ve,Ye]=Se.split(":").map(Number);return Ve>0&&Ye>0?Ve/Ye:void 0}:void 0,getItemSize:te==="image-only"&&x&&x>0?(We,Le)=>({height:Math.max(w??0,Le.columnWidth/x)}):d?(We,Le)=>{let ne=Tx({row:We,columns:o,galleryFieldKey:H,galleryDensity:L,galleryBentoColumns:F,galleryDetailVisibility:$,galleryDetailLimit:M,getFieldValue:q,isMediaColumn:Me,isTitleCandidate:Be,isSummaryCandidate:_e,getDisplayText:de,isImageField:we,isAudioField:Ce,cardVariant:te,renderPreview:P,renderLeadingVisual:re,hiddenDetailFieldKeys:ye,layout:Le,resolveRecordVisual:fe});if(typeof se!="function")return ne;let Se=se(We,{...Le,placementStrategy:Le.placementStrategy==="dense"?"dense":"shelf",defaultSize:ne})||{};return {...ne,...Se}}:void 0}},renderItem:(We,Le)=>Fe(We,Le.index)})}r(Rx,"WorkbenchGalleryView");function Nx({layout:e="horizontal",mediaPosition:t="start",detailsSize:o="balanced",sizing:n="content",asidePosition:a="end",detailsVisible:i=true,heading:s,metadata:u,message:c,actions:d,media:g,toolbar:m,aside:p,secondary:f,children:b,className:v,...y}){let x=i&&(O(s)||O(u)||O(b)||O(c)||O(d)),w=e==="horizontal"&&O(g)&&x,h=n==="fill",k=O(f),C=w&&k,T=O(p)?jsxRuntime.jsx("div",{"data-record-part":"aside",className:"flex min-h-0 shrink-0 gap-global",children:p}):null;return jsxRuntime.jsxs("article",{...y,"data-monkeys-component":"record-view","data-record-layout":e,"data-record-sizing":n,className:l("@container flex min-h-0 min-w-0 flex-col gap-global font-[family-name:var(--font-sans)] text-sm leading-5 text-foreground",h&&"h-full",v),children:[O(m)&&jsxRuntime.jsx("div",{"data-record-part":"toolbar",className:"flex shrink-0 flex-wrap items-center gap-global",children:m}),jsxRuntime.jsxs("div",{className:l("flex min-h-0 min-w-0 gap-global",h&&"flex-1"),children:[a==="start"&&T,jsxRuntime.jsxs("div",{"data-record-part":"body",className:l("grid min-h-0 min-w-0 flex-1 grid-cols-1 gap-global",C?"@[48rem]:grid-cols-[minmax(0,2fr)_minmax(0,1fr)_minmax(0,1fr)]":w&&(o==="balanced"?"@[48rem]:grid-cols-2":t==="start"?"@[48rem]:grid-cols-[minmax(0,1fr)_minmax(16rem,24rem)]":"@[48rem]:grid-cols-[minmax(16rem,24rem)_minmax(0,1fr)]"),h&&"overflow-auto @[48rem]:overflow-hidden"),children:[O(g)&&jsxRuntime.jsx("div",{"data-record-part":"media",className:l("min-h-0 min-w-0",t==="end"&&w&&"@[48rem]:order-2",h&&"flex flex-col"),children:g}),x&&jsxRuntime.jsxs("div",{"data-record-part":"details",className:l("flex min-h-0 min-w-0 flex-col [&>section]:flex-1",h&&"@[48rem]:overflow-auto"),children:[O(s)&&jsxRuntime.jsx("div",{className:"mb-global flex flex-wrap items-center gap-global",children:s}),O(u)&&jsxRuntime.jsx("div",{className:"mb-global flex flex-wrap items-center gap-global text-sm tabular-nums text-muted-foreground [&_span]:text-inherit [&_time]:text-inherit",children:u}),b,O(c)&&jsxRuntime.jsx("div",{className:"mt-global break-words text-sm text-destructive-text",children:c}),O(d)&&jsxRuntime.jsx("div",{className:"mt-auto flex shrink-0 flex-wrap gap-global pt-global",children:d})]}),k&&jsxRuntime.jsx("div",{"data-record-part":"secondary",className:l("flex min-h-0 min-w-0 flex-col [&>section]:flex-1",h&&"@[48rem]:overflow-auto"),children:f})]}),a==="end"&&T]})]})}r(Nx,"RecordView");var Ix=[{id:"primary",layout:"rail",filterCount:2,cardCount:4,aspectRatios:[16/11]},{id:"secondary",layout:"grid",filterCount:3,cardCount:5,aspectRatios:[4/5,1,3/4,5/4,1]}];function Pu(e,t,o){return typeof e!="number"||!Number.isFinite(e)||e<0?t:Math.min(Math.round(e),o)}r(Pu,"normalizeCount");function Mx(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?1:Math.min(Math.max(e,.5),2)}r(Mx,"normalizeAspectRatio");function Bx({animated:e,filterCount:t}){return jsxRuntime.jsxs("div",{className:"flex min-h-10 flex-wrap items-center justify-between gap-4",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(Wt,{variant:"line",animated:e,className:"h-6 w-36 rounded-md"}),jsxRuntime.jsx(Wt,{variant:"line",animated:e,className:"h-3 w-12"})]}),jsxRuntime.jsx("div",{className:"flex flex-wrap justify-end gap-2",children:Array.from({length:t},(o,n)=>jsxRuntime.jsx(Wt,{variant:"block",animated:e,className:"h-9 w-28 rounded-lg"},n))})]})}r(Bx,"WorkbenchGallerySkeletonHeading");function Px({sections:e=Ix,animated:t=true,animation:o,className:n,...a}){return jsxRuntime.jsx(jo,{animation:o,animated:t,children:jsxRuntime.jsx("div",{...a,role:"status","aria-busy":"true","aria-label":"Loading gallery","data-monkeys-component":"workbench-gallery-skeleton",className:l("grid w-full gap-4",n),children:e.map((i,s)=>{let u=i.layout??"grid",c=Pu(i.filterCount,2,8),d=Pu(i.cardCount,u==="rail"?4:5,24),g=i.aspectRatios?.length?i.aspectRatios:[u==="rail"?16/11:1];return jsxRuntime.jsx(En,{index:s,children:jsxRuntime.jsxs("section",{className:"grid gap-4","data-skeleton-section":i.id,children:[jsxRuntime.jsx(Bx,{animated:t,filterCount:c}),jsxRuntime.jsx("div",{className:l("grid items-start gap-4",u==="rail"?"grid-cols-1 sm:grid-cols-2 xl:grid-cols-4":"grid-cols-2 md:grid-cols-3 xl:grid-cols-5"),"data-skeleton-layout":u,children:Array.from({length:d},(m,p)=>jsxRuntime.jsx("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:jsxRuntime.jsx(Wt,{variant:"block",animated:t,className:"h-auto w-full rounded-none",style:{aspectRatio:String(Mx(g[p%g.length]))}})},p))})]})},i.id||s)})})})}r(Px,"WorkbenchGallerySkeleton");function Ex({animated:e=true,animation:t,className:o,"aria-label":n,...a}){let i=vt().loading.spinner,s=r(u=>jsxRuntime.jsx(Wt,{variant:"block",animated:e,className:u}),"skeleton");return jsxRuntime.jsx(jo,{animation:t,animated:e,children:jsxRuntime.jsxs("div",{...a,role:"status","aria-busy":"true","aria-label":n??i,"data-monkeys-component":"workbench-page-skeleton",className:l("flex size-full min-h-0 flex-col gap-4 overflow-hidden",o),children:[jsxRuntime.jsxs("div",{className:"flex h-10 shrink-0 items-center justify-between gap-4 rounded-lg border border-border bg-card px-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[s("h-5 w-20"),s("h-5 w-16"),s("h-5 w-24")]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[s("h-7 w-20"),s("size-7")]})]}),jsxRuntime.jsxs("div",{className:"grid shrink-0 grid-cols-1 gap-4 md:grid-cols-3",children:[s("h-40 md:col-span-2"),s("h-40")]}),jsxRuntime.jsxs("div",{className:"grid min-h-0 flex-1 grid-cols-1 gap-4 lg:grid-cols-[minmax(0,2fr)_minmax(14rem,1fr)]",children:[jsxRuntime.jsxs("div",{className:"flex min-h-0 flex-col gap-4 rounded-lg border border-border bg-card p-4",children:[s("h-6 w-40"),jsxRuntime.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:6},(u,c)=>jsxRuntime.jsx(En,{index:c,children:jsxRuntime.jsxs("div",{className:"space-y-2",children:[s("h-4 w-20"),s("h-9 w-full")]})},c))}),s("min-h-32 flex-1")]}),jsxRuntime.jsxs("div",{className:"flex min-h-40 flex-col gap-4 rounded-lg border border-border bg-card p-4",children:[s("h-6 w-28"),s("min-h-28 flex-1"),s("h-9 w-full")]})]})]})})}r(Ex,"WorkbenchPageSkeleton");function Eu(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r(Eu,"toCssSize");function Vx(e,t){return String(e?.id??e?.key??t)}r(Vx,"defaultGetRowId");function Gx(e){return String(e?.columnId??e?.status??"")}r(Gx,"defaultGetColumnId");function _x(e){let t=e?.title??e?.name??e?.id??"Untitled";return jsxRuntime.jsx("div",{className:"rounded-lg border border-border/70 bg-card px-3 py-2 text-sm text-foreground shadow-sm",children:String(t)})}r(_x,"defaultRenderCard");function $x({row:e,rowId:t,rowIndex:o,column:n,classNames:a,renderCard:i}){let{attributes:s,listeners:u,setNodeRef:c,isDragging:d}=core.useDraggable({id:t});return jsxRuntime.jsx("div",{ref:c,...u,...s,className:l("touch-none",a?.cardWrapper),children:i(e,{row:e,rowIndex:o,column:n,isDragging:d,isOverlay:false})})}r($x,"WorkbenchLaneDraggableCard");function jx({column:e,columnRows:t,columnWidth:o,columnMinHeight:n,emptyColumn:a,classNames:i,renderCard:s}){let{setNodeRef:u,isOver:c}=core.useDroppable({id:e.id});return jsxRuntime.jsxs("section",{className:l("flex shrink-0 flex-col rounded-xl border border-border/60 bg-card p-2 shadow-sm",i?.column,e.className),style:{width:Eu(o)??"280px"},children:[jsxRuntime.jsxs("div",{className:l("flex h-10 items-center gap-2 px-1",i?.columnHeader,e.headerClassName),children:[e.icon?jsxRuntime.jsx("span",{className:l("inline-flex h-4 w-4 items-center justify-center text-muted-foreground",i?.columnIcon,e.iconClassName),children:e.icon}):null,jsxRuntime.jsx("span",{className:l("inline-flex items-center rounded px-2 py-0.5 text-xs font-semibold bg-muted text-muted-foreground",i?.columnBadge,e.badgeClassName),children:e.label??e.id}),jsxRuntime.jsx("span",{className:l("text-xs text-muted-foreground",i?.columnCount),children:t.length})]}),jsxRuntime.jsx("div",{ref:u,className:l("mt-1 flex min-h-[200px] flex-1 flex-col gap-2 overflow-y-auto rounded-lg p-1 transition-colors [scrollbar-width:thin]",c&&"bg-accent/60",i?.columnBody,e.bodyClassName),style:{minHeight:Eu(n)},children:t.length?t.map(({row:d,rowIndex:g,rowId:m})=>jsxRuntime.jsx($x,{row:d,rowId:m,rowIndex:g,column:e,classNames:i,renderCard:s},m)):a?jsxRuntime.jsx("div",{className:l("flex min-h-24 items-center justify-center rounded-lg border border-dashed border-border/60 px-3 py-4 text-xs text-muted-foreground",i?.emptyColumn),children:a}):null})]})}r(jx,"WorkbenchLaneColumnView");function Kx({rows:e=[],columns:t=[],getRowId:o=Vx,getColumnId:n=Gx,renderCard:a,renderOverlayCard:i,onMoveRow:s,onSelectRow:u,emptyColumn:c,activationDistance:d=5,columnWidth:g=280,columnMinHeight:m,className:p,classNames:f,style:b}){let v=a??((H,L)=>u?jsxRuntime.jsx(ve,{className:"w-full justify-start whitespace-normal text-left",onClick:()=>u({rowId:o(H,L.rowIndex)}),children:String(H?.title??H?.name??o(H,L.rowIndex))}):_x(H)),[y,x]=lt.useState(null),w=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:d}})),h=lt.useMemo(()=>new Map(t.map(H=>[H.id,H])),[t]),k=lt.useMemo(()=>e.map((H,L)=>({row:H,rowIndex:L,rowId:o(H,L),columnId:n(H,L)})),[n,o,e]),C=y?k.find(H=>H.rowId===y):void 0,T=lt.useMemo(()=>{let H=new Map;return t.forEach(L=>H.set(L.id,[])),k.forEach(({row:L,rowIndex:F,rowId:$,columnId:M})=>{H.get(M)?.push({row:L,rowIndex:F,rowId:$});}),H},[t,k]),S=C?h.get(C.columnId):void 0,I=lt.useCallback(H=>{x(String(H.active.id));},[]),R=lt.useCallback(H=>{x(null);let L=String(H.active.id),F=String(H.over?.id??""),$=k.find(M=>M.rowId===L);!$||!h.has(F)||$.columnId===F||s?.(L,F,$.row);},[h,s,k]),W=lt.useCallback(()=>{x(null);},[]);return jsxRuntime.jsxs(core.DndContext,{sensors:w,onDragStart:I,onDragEnd:R,onDragCancel:W,children:[jsxRuntime.jsx("div",{className:l("flex min-h-0 flex-1 gap-4 overflow-x-auto p-4 [scrollbar-width:thin]",f?.root,p),style:b,children:t.map(H=>jsxRuntime.jsx(jx,{column:H,columnRows:T.get(H.id)||[],columnWidth:g,columnMinHeight:m,emptyColumn:c,classNames:f,renderCard:v},H.id))}),jsxRuntime.jsx(core.DragOverlay,{children:C&&S?jsxRuntime.jsx("div",{className:l(f?.overlayWrapper),children:(i||v)(C.row,{row:C.row,rowIndex:C.rowIndex,column:S,isDragging:false,isOverlay:true})}):null})]})}r(Kx,"WorkbenchLaneView");var It=r((e,t,o,n)=>Number.isFinite(e)?Math.min(n,Math.max(o,e)):t,"bounded"),yo=r(e=>Math.round(e*1e3)/1e3,"coordinate");function qx(e,t=0){if(!e.length)return "";let o=e[0],n=`M${yo(o[0])},${yo(o[1])}`,a=It(t,0,0,1)/6;for(let i=0;i<e.length;i++){let s=e[(i+e.length-1)%e.length],u=e[i],c=e[(i+1)%e.length],d=e[(i+2)%e.length];a?n+=`C${yo(u[0]+(c[0]-s[0])*a)},${yo(u[1]+(c[1]-s[1])*a)} ${yo(c[0]-(d[0]-u[0])*a)},${yo(c[1]-(d[1]-u[1])*a)} ${yo(c[0])},${yo(c[1])}`:n+=`L${yo(c[0])},${yo(c[1])}`;}return n+"Z"}r(qx,"metricRadarPath");function Du({items:e,summary:t,ariaLabel:o="Metrics",className:n,itemClassName:a,radar:i={}}){let s="metric-radar-"+lt.useId().replace(/[^a-zA-Z0-9_-]/g,""),u=It(i.geometry?.radius,100,20,120),c=It(i.geometry?.labelRadius,131,u,155),d=It(i.geometry?.startAngle,-90,-360,360),g=Math.round(It(i.geometry?.levels,4,1,12)),m=r((S,I)=>{let R=(d+S*360/e.length)*Math.PI/180;return [180+Math.cos(R)*I,160+Math.sin(R)*I]},"point"),p=e.map((S,I)=>Number.isFinite(S.progress)?m(I,It(S.progress,0,0,1)*u):void 0),f=p.every(S=>S!==void 0),b=i.series,v=i.grid,y=i.labels,x=i.summary,w=b?.stroke??"hsl(var(--primary))",h=v?.color??"hsl(var(--border))",k=b?.gradient,C=It(k?.angle,0,-360,360)*Math.PI/180,T=k?`url(#${s})`:b?.fill??"hsl(var(--primary) / .18)";return jsxRuntime.jsxs("figure",{"aria-label":o,"data-monkeys-component":"workbench-metric-grid","data-metric-variant":"radar",className:["m-0 min-w-0",n].filter(Boolean).join(" "),children:[jsxRuntime.jsxs("svg",{viewBox:"0 0 360 320",role:"img","aria-label":t?`${o} \xB7 ${t.label} ${t.value}`:o,className:"mx-auto block w-full max-w-sm overflow-visible",children:[k?jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:s,x1:`${50-Math.cos(C)*50}%`,y1:`${50-Math.sin(C)*50}%`,x2:`${50+Math.cos(C)*50}%`,y2:`${50+Math.sin(C)*50}%`,children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:k.from}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:k.to})]})}):null,jsxRuntime.jsxs("g",{opacity:It(v?.opacity,1,0,1),stroke:h,strokeWidth:It(v?.strokeWidth,1,0,8),fill:"none",children:[Array.from({length:g},(S,I)=>jsxRuntime.jsx("polygon",{points:e.map((R,W)=>m(W,u*(I+1)/g).join(",")).join(" ")},I)),v?.showAxes===false?null:e.map((S,I)=>{let R=m(I,u);return jsxRuntime.jsx("line",{x1:"180",y1:"160",x2:R[0],y2:R[1]},S.id)})]}),e.map((S,I)=>{let R=m(I,c),W=y?.align==="outward"?R[0]<179?"end":R[0]>181?"start":"middle":"middle";return jsxRuntime.jsxs("g",{children:[typeof S.label=="string"||typeof S.label=="number"?jsxRuntime.jsx("text",{x:R[0],y:R[1]-(y?.showValues===false?0:7),textAnchor:W,dominantBaseline:"middle",fontSize:It(y?.fontSize,12,6,28),fill:y?.color??"hsl(var(--muted-foreground))",children:S.label}):null,y?.showValues!==false&&(typeof S.value=="string"||typeof S.value=="number")?jsxRuntime.jsx("text",{"data-metric-axis-value":S.id,x:R[0],y:R[1]+10,textAnchor:W,dominantBaseline:"middle",fontSize:It(y?.valueFontSize,13,6,28),fontWeight:"600",fill:y?.valueColor??"hsl(var(--foreground))",children:S.value}):null]},S.id)}),f?jsxRuntime.jsx("path",{"data-metric-radar-series":"complete",d:qx(p,i.geometry?.smoothing),fill:T,fillOpacity:It(b?.fillOpacity,1,0,1),stroke:w,strokeWidth:It(b?.strokeWidth,2.5,0,8)}):p.map((S,I)=>{let R=p[(I+1)%p.length];return S&&R?jsxRuntime.jsx("line",{"data-metric-radar-series":"partial",x1:S[0],y1:S[1],x2:R[0],y2:R[1],stroke:w,strokeWidth:It(b?.strokeWidth,2.5,0,8)},e[I].id):null}),b?.showPoints===false?null:p.map((S,I)=>S?jsxRuntime.jsx("circle",{cx:S[0],cy:S[1],r:It(b?.pointRadius,3,0,10),fill:w},e[I].id):null),t?jsxRuntime.jsxs("g",{"data-metric-radar-summary":"true",textAnchor:"middle",paintOrder:"stroke",stroke:x?.outline??"hsl(var(--card))",strokeWidth:"3",strokeLinejoin:"round",children:[x?.showLabel===false?null:jsxRuntime.jsx("text",{x:"180",y:"149",fontSize:It(x?.labelFontSize,12,6,28),fill:x?.labelColor??"hsl(var(--muted-foreground))",children:t.label}),jsxRuntime.jsx("text",{x:"180",y:x?.showLabel===false?160:174,dominantBaseline:x?.showLabel===false?"middle":void 0,fontSize:It(x?.fontSize,23,10,64),fontWeight:"700",fill:x?.color??"hsl(var(--foreground))",children:t.value})]}):null]}),jsxRuntime.jsx("dl",{className:"sr-only",children:e.map(S=>jsxRuntime.jsxs("div",{className:a,children:[jsxRuntime.jsx("dt",{children:S.label}),jsxRuntime.jsx("dd",{children:S.value})]},S.id))})]})}r(Du,"WorkbenchMetricRadar");var Wu=r(e=>{if(Number.isFinite(e))return Math.min(1,Math.max(0,Number(e)))},"normalizeProgress");function Yx({items:e,summary:t,variant:o="bars",density:n="comfortable",emptyState:a=null,ariaLabel:i="Metrics",className:s,itemClassName:u,radar:c}){if(!e.length)return O(a)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:a}):null;if(o==="radar"&&e.length>=3&&e.length<=12){if(c)return jsxRuntime.jsx(Du,{items:e,summary:t,ariaLabel:i,className:s,itemClassName:u,radar:c});let d=r((p,f)=>{let b=-Math.PI/2+p*Math.PI*2/e.length;return [180+Math.cos(b)*f,160+Math.sin(b)*f]},"point"),g=e.map((p,f)=>{let b=Wu(p.progress);return b===void 0?void 0:d(f,b*100)}),m=g.every(Boolean);return jsxRuntime.jsxs("figure",{"aria-label":i,"data-monkeys-component":"workbench-metric-grid","data-metric-variant":"radar",className:l("m-0 min-w-0",s),children:[jsxRuntime.jsxs("svg",{viewBox:"0 0 360 320",role:"img","aria-label":t?`${i} \xB7 ${t.label} ${t.value}`:i,className:"mx-auto block w-full max-w-sm overflow-visible",children:[[.25,.5,.75,1].map(p=>jsxRuntime.jsx("polygon",{points:e.map((f,b)=>d(b,p*100).join(",")).join(" "),fill:"none",stroke:"hsl(var(--border))"},p)),e.map((p,f)=>{let b=d(f,100),v=d(f,131);return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:"180",y1:"160",x2:b[0],y2:b[1],stroke:"hsl(var(--border))"}),typeof p.label=="string"||typeof p.label=="number"?jsxRuntime.jsx("text",{x:v[0],y:v[1]-7,textAnchor:"middle",dominantBaseline:"middle",fontSize:"12",fill:"hsl(var(--muted-foreground))",children:p.label}):null,typeof p.value=="string"||typeof p.value=="number"?jsxRuntime.jsx("text",{"data-metric-axis-value":p.id,x:v[0],y:v[1]+10,textAnchor:"middle",dominantBaseline:"middle",fontSize:"13",fontWeight:"600",fill:"hsl(var(--foreground))",children:p.value}):null]},p.id)}),m?jsxRuntime.jsx("polygon",{"data-metric-radar-series":"complete",points:g.map(p=>p.join(",")).join(" "),fill:"hsl(var(--primary) / .18)",stroke:"hsl(var(--primary))",strokeWidth:"2.5"}):g.map((p,f)=>{let b=g[(f+1)%g.length];return p&&b?jsxRuntime.jsx("line",{"data-metric-radar-series":"partial",x1:p[0],y1:p[1],x2:b[0],y2:b[1],stroke:"hsl(var(--primary))",strokeWidth:"2.5"},e[f].id):null}),g.map((p,f)=>p?jsxRuntime.jsx("circle",{cx:p[0],cy:p[1],r:"3",fill:"hsl(var(--primary))"},e[f].id):null),t?jsxRuntime.jsxs("g",{"data-metric-radar-summary":"true",textAnchor:"middle",paintOrder:"stroke",stroke:"hsl(var(--card))",strokeWidth:"3",strokeLinejoin:"round",children:[jsxRuntime.jsx("text",{x:"180",y:"149",fontSize:"12",fill:"hsl(var(--muted-foreground))",children:t.label}),jsxRuntime.jsx("text",{x:"180",y:"174",fontSize:"23",fontWeight:"700",fill:"hsl(var(--foreground))",children:t.value})]}):null]}),jsxRuntime.jsx("dl",{className:"sr-only",children:e.map(p=>jsxRuntime.jsxs("div",{className:l("flex min-w-0 justify-between gap-2",u),children:[jsxRuntime.jsx("dt",{className:"truncate text-muted-foreground",children:p.label}),jsxRuntime.jsx("dd",{className:"font-semibold tabular-nums",children:p.value})]},p.id))})]})}return o==="list"?jsxRuntime.jsx("dl",{"aria-label":i,"data-monkeys-component":"workbench-metric-grid","data-metric-variant":o,"data-metric-density":n,className:l("grid min-w-0",n==="compact"?"gap-2":"gap-3",s),children:e.map(d=>jsxRuntime.jsxs("div",{className:l("flex min-w-0 items-start justify-between gap-4",n==="compact"?"text-xs":"text-sm",u),children:[jsxRuntime.jsxs("dt",{className:"min-w-0 text-muted-foreground",children:[jsxRuntime.jsx("span",{className:"block truncate",children:d.label}),O(d.description)?jsxRuntime.jsx("span",{className:"mt-0.5 block text-xs leading-4 text-muted-foreground/80",children:d.description}):null]}),jsxRuntime.jsx("dd",{className:"shrink-0 font-semibold tabular-nums text-foreground",children:d.value})]},d.id))}):o==="cards"?jsxRuntime.jsx("dl",{"aria-label":i,"data-monkeys-component":"workbench-metric-grid","data-metric-variant":o,"data-metric-density":n,className:l("grid min-w-0 [grid-template-columns:repeat(auto-fit,minmax(9rem,1fr))]",n==="compact"?"gap-2":"gap-3",s),children:e.map(d=>jsxRuntime.jsxs("div",{className:l("min-w-0 rounded-lg border border-border/70 bg-card text-card-foreground",n==="compact"?"p-3":"p-4",u),children:[jsxRuntime.jsx("dt",{className:"truncate text-xs font-medium text-muted-foreground",children:d.label}),jsxRuntime.jsx("dd",{className:l("font-semibold tabular-nums text-foreground",n==="compact"?"mt-1.5 text-xl":"mt-2 text-2xl"),children:d.value}),O(d.description)?jsxRuntime.jsx("div",{className:"mt-2 text-xs leading-5 text-muted-foreground",children:d.description}):null]},d.id))}):jsxRuntime.jsx("dl",{"aria-label":i,"data-monkeys-component":"workbench-metric-grid","data-metric-variant":o,"data-metric-density":n,className:l("grid min-w-0 [grid-template-columns:repeat(auto-fit,minmax(5.5rem,1fr))]",n==="compact"?"gap-2":"gap-3",s),children:e.map(d=>{let g=Wu(d.progress);return jsxRuntime.jsxs("div",{className:l("min-w-0",u),children:[jsxRuntime.jsx("div",{role:g===void 0?void 0:"meter","aria-label":g===void 0?void 0:String(d.label),"aria-valuemin":g===void 0?void 0:0,"aria-valuemax":g===void 0?void 0:100,"aria-valuenow":g===void 0?void 0:Math.round(g*100),className:l("overflow-hidden rounded-full bg-muted",n==="compact"?"h-1.5":"h-2"),children:g===void 0?null:jsxRuntime.jsx("span",{className:"block h-full rounded-full bg-primary transition-[width] duration-200 motion-reduce:transition-none",style:{width:`${Math.max(g>0?4:0,g*100)}%`}})}),jsxRuntime.jsxs("div",{className:"mt-1.5 flex min-w-0 items-baseline justify-between gap-2",children:[jsxRuntime.jsx("dt",{className:"truncate text-xs text-muted-foreground",children:d.label}),jsxRuntime.jsx("dd",{className:"shrink-0 text-xs font-semibold tabular-nums text-foreground",children:d.value})]})]},d.id)})})}r(Yx,"WorkbenchMetricGrid");var Lu=Math.PI*(3-Math.sqrt(5)),Au=r(e=>Array.from(e).reduce((t,o)=>Math.imul(t^o.charCodeAt(0),16777619)>>>0,2166136261),"hash");function wi(e,t){let o=new Set(e.map(h=>h.id)),n=new Map,a=new Set,i=new Map(e.map(h=>[h.id,new Set])),s=t.filter(h=>o.has(h.sourceId)&&o.has(h.targetId));for(let h of s){let k=n.get(h.sourceId)??[];k.includes(h.targetId)||k.push(h.targetId),n.set(h.sourceId,k),a.add(h.targetId),i.get(h.sourceId).add(h.targetId),i.get(h.targetId).add(h.sourceId);}let c=e.filter(h=>!a.has(h.id))[0]?.id??e[0]?.id,d=new Map,g=c?[c]:[];c&&d.set(c,{depth:0,branch:c,cluster:c});for(let h=0;h<g.length;h++){let k=g[h],C=d.get(k);for(let T of n.get(k)??[])d.has(T)||(d.set(T,{depth:C.depth+1,branch:C.depth===0?T:C.branch,cluster:C.depth<2?T:C.cluster}),g.push(T));}for(let h of e)d.has(h.id)||d.set(h.id,{depth:1,branch:h.id,cluster:h.id});let m=[...new Set([...d.values()].filter(h=>h.depth>0).map(h=>h.branch))],p=new Map;for(let[h,k]of d){if(k.depth<2)continue;let C=p.get(k.cluster)??[];C.push(h),p.set(k.cluster,C);}let f=m.map(h=>Math.sqrt([...d.values()].filter(k=>k.branch===h).length+8)),b=f.reduce((h,k)=>h+k,0)||1,v=-Math.PI/2,y=new Map;m.forEach((h,k)=>{let C=Math.PI*2*f[k]/b,T=v+C/2;y.set(h,{x:Math.cos(T)*12,y:Math.sin(T)*10,z:Math.sin(T*2)*3.2,angle:T}),v+=C;});let x=new Map;for(let h of m){let k=y.get(h),C=[...p.keys()].filter(T=>d.get(T)?.branch===h);C.forEach((T,S)=>{let I=C.length>1?Math.max(3,Math.sqrt(C.length)*1.7):1.5,R=S*Lu+k.angle;x.set(T,{x:k.x+Math.cos(R)*I,y:k.y+Math.sin(R)*I,z:k.z+Math.sin(R)*2.5});});}let w=e.map(h=>{let k=d.get(h.id),C=k.depth<2?y.get(k.branch):x.get(k.cluster);if(k.depth===0||!C)return {...h,...k,x:0,y:0,z:0};if(k.depth===1)return {...h,...k,x:C.x*.76,y:C.y*.76,z:C.z};let S=p.get(k.cluster).indexOf(h.id),I=k.depth===2?0:1.5+Math.sqrt(S)*.72,R=S*Lu+Au(k.cluster)%360*Math.PI/180;return {...h,...k,x:C.x+Math.cos(R)*I,y:C.y+Math.sin(R)*I*.85,z:C.z+Math.sin(R*1.37)*Math.min(I,3.5)}});for(let h=0;h<30;h++)for(let k=0;k<w.length;k++)for(let C=k+1;C<w.length;C++){let T=w[k],S=w[C],I=S.x-T.x,R=S.y-T.y,W=Math.hypot(I,R),H=T.depth<3||S.depth<3?1.4:.85;if(W>=H)continue;let L=Au(T.id+S.id)%360*Math.PI/180,F=W>.001?I/W:Math.cos(L),$=W>.001?R/W:Math.sin(L),M=(H-W)*.25;T.depth>0&&(T.x-=F*M,T.y-=$*M),S.depth>0&&(S.x+=F*M,S.y+=$*M);}if(w.length)for(let h of ["x","y","z"]){let k=(Math.min(...w.map(C=>C[h]))+Math.max(...w.map(C=>C[h])))/2;w.forEach(C=>{C[h]-=k;});}return {points:w,links:s,neighbors:i,root:c}}r(wi,"buildRelationshipGalaxyLayout");function Ou({nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,ariaLabel:a,className:i}){let s=vt(),u=lt.useRef(null),c=lt.useRef(new Map),d=lt.useRef(o),g=lt.useRef(n),[m,p]=lt.useState(false),f=JSON.stringify([e,t]),b=lt.useMemo(()=>wi(e,t),[f]);return d.current=o,g.current=n,lt.useEffect(()=>{let v=u.current;if(!v)return;let y=false,x=r(()=>{},"cleanup");return p(false),Promise.all([import('three'),import('three/examples/jsm/controls/OrbitControls.js')]).then(([w,{OrbitControls:h}])=>{if(y)return;let k=[],C=new w.Scene,T=getComputedStyle(v),S=r((oe,se)=>{let Re=document.createElement("span");Re.style.color=`hsl(${T.getPropertyValue(oe).trim()||T.getPropertyValue(se).trim()})`,v.append(Re);let Ie=new w.Color(getComputedStyle(Re).color);return Re.remove(),Ie},"tokenColor"),I=S("--radar-canvas","--background");C.background=I;let R=new w.PerspectiveCamera(48,1,.1,250),W=new w.WebGLRenderer({antialias:true,alpha:false});W.setPixelRatio(Math.min(devicePixelRatio,2)),W.domElement.style.cssText="position:absolute;inset:0;width:100%;height:100%;touch-action:none",W.domElement.setAttribute("aria-hidden","true"),v.prepend(W.domElement);let H=new h(R,W.domElement);H.enableDamping=true,H.dampingFactor=.08,H.rotateSpeed=.45,H.minDistance=8,H.maxDistance=130,H.autoRotate=false;let L=new Map(b.points.map(oe=>[oe.id,new w.Vector3(oe.x,oe.y,oe.z)])),F={primary:S("--radar-series-one","--primary"),secondary:S("--radar-series-two","--success"),accent:S("--radar-series-three","--warning"),muted:S("--radar-series-four","--muted-foreground")},$=128,M=new Uint8Array($*$*4);for(let oe=0;oe<$;oe++)for(let se=0;se<$;se++){let Re=Math.hypot(se+.5-$/2,oe+.5-$/2)/($/2),Ie=Re<.09?1:Math.exp(-Re*7.5)*.85;M.set([255,255,255,Math.round(Ie*255)],(oe*$+se)*4);}let G=new w.DataTexture(M,$,$,w.RGBAFormat);G.minFilter=G.magFilter=w.LinearFilter,G.needsUpdate=true,k.push(G);let Y=b.points.map(oe=>{let se=new w.SpriteMaterial({map:G,color:F[oe.tone??"primary"],transparent:true,blending:w.AdditiveBlending,depthWrite:false}),Re=new w.Sprite(se);return Re.position.copy(L.get(oe.id)),C.add(Re),k.push(se),Re}),N=new w.BufferGeometry;N.setAttribute("position",new w.Float32BufferAttribute(b.links.flatMap(oe=>[...L.get(oe.sourceId).toArray(),...L.get(oe.targetId).toArray()]),3));let D=new Float32Array(b.links.length*6);N.setAttribute("color",new w.BufferAttribute(D,3));let B=new w.LineBasicMaterial({vertexColors:true,transparent:true,opacity:.5,depthWrite:false});C.add(new w.LineSegments(N,B)),k.push(N,B);let K=new Map;b.points.filter(oe=>oe.depth>0).forEach(oe=>{let se=K.get(oe.cluster)??[];se.push(oe),K.set(oe.cluster,se);});for(let oe of K.values()){if(oe.length<3)continue;let se=oe.reduce((ze,ce)=>ze.add(L.get(ce.id)),new w.Vector3).multiplyScalar(1/oe.length),Re=new w.SpriteMaterial({map:G,color:F[oe[0].tone??"primary"],transparent:true,opacity:.13,blending:w.AdditiveBlending,depthWrite:false}),Ie=new w.Sprite(Re);Ie.position.copy(se),Ie.position.z-=1,Ie.scale.setScalar(8+Math.sqrt(oe.length)*1.2),C.add(Ie),k.push(Re);}let J=Math.max(8,...b.points.map(oe=>Math.abs(oe.x)))+3,V=Math.max(6,...b.points.map(oe=>Math.abs(oe.y)))+3,Q=55,j=false,Z=new ResizeObserver(()=>{let{width:oe,height:se}=v.getBoundingClientRect();if(!oe||!se)return;R.aspect=oe/se;let Re=Math.max(V,J/R.aspect)/Math.tan(w.MathUtils.degToRad(R.fov/2))+7;j?R.position.sub(H.target).multiplyScalar(Re/Q).add(H.target):(R.position.set(0,0,Re),j=true),Q=Re,H.update(),R.updateProjectionMatrix(),W.setSize(oe,se,false);});Z.observe(v);let te=new w.Vector3,ae=new w.Vector2,le={x:0,y:0},A,me,P=r(oe=>{let se=W.domElement.getBoundingClientRect();ae.set(oe.clientX-se.left,oe.clientY-se.top);let Re,Ie=12;for(let ze of b.points){if(te.copy(L.get(ze.id)).project(R),te.z<-1||te.z>1)continue;let ce=Math.hypot((te.x+1)*se.width/2-ae.x,(-te.y+1)*se.height/2-ae.y);ce<Ie&&(Ie=ce,Re=ze);}return Re},"nodeAt"),_=r(oe=>{le={x:oe.clientX,y:oe.clientY};},"pointerDown"),re=r(oe=>{A=P(oe)?.id,W.domElement.style.cursor=A?"pointer":"grab";},"pointerMove"),fe=r(()=>{A=void 0;},"pointerLeave"),ye=r(oe=>{if(Math.hypot(oe.clientX-le.x,oe.clientY-le.y)>5)return;let se=P(oe);se&&g.current?.(se);},"pointerUp");W.domElement.addEventListener("pointerdown",_),W.domElement.addEventListener("pointermove",re),W.domElement.addEventListener("pointerleave",fe),W.domElement.addEventListener("pointerup",ye);let xe=[...b.points].sort((oe,se)=>oe.depth-se.depth||(b.neighbors.get(se.id)?.size??0)-(b.neighbors.get(oe.id)?.size??0));W.setAnimationLoop(()=>{H.update();let oe=d.current,se=oe?b.neighbors.get(oe):void 0;(me!==oe||!N.userData.initialized)&&(me=oe,N.userData.initialized=true,b.links.forEach((z,X)=>{let ie=z.sourceId===oe||z.targetId===oe,q=b.points.find(we=>we.id===z.targetId),de=F[q.tone??"primary"].clone().multiplyScalar(oe?ie?1.35:.12:.45);D.set([...de.toArray(),...de.toArray()],X*6);}),N.attributes.color.needsUpdate=true),Y.forEach((z,X)=>{let ie=b.points[X],q=oe===ie.id;z.scale.setScalar((ie.depth===0?2.2:ie.depth===1?1.8:ie.depth===2?1.2:.82)*(q?1.5:1)),z.material.opacity=!oe||q||se?.has(ie.id)?1:.25;});let Re=v.clientWidth,Ie=v.clientHeight,ze=Q/R.position.distanceTo(H.target),ce=[],U=[...xe].sort((z,X)=>+(X.id===oe||X.id===A)-+(z.id===oe||z.id===A));for(let z of U){let X=c.current.get(z.id);if(!X)continue;let ie=z.id===oe,q=z.id===A,de=se?.has(z.id);te.copy(L.get(z.id)).project(R);let we=(te.x+1)*Re/2,Ce=(-te.y+1)*Ie/2+10,Me={x:we-Math.min(z.label.length*13,170)/2,y:Ce,width:Math.min(z.label.length*13,170),height:21},Be=te.z>-1&&te.z<1&&Me.x>4&&Me.x+Me.width<Re-4&&Ce>4&&Ce+21<Ie-4,_e=ie||q||de||z.depth<=2||ze>1.65,Ze=ce.some(ot=>Me.x<ot.x+ot.width+8&&Me.x+Me.width+8>ot.x&&Me.y<ot.y+ot.height+5&&Me.y+Me.height+5>ot.y),Fe=Be&&_e&&(ie||q||!Ze)&&(!oe||ie||q||de||z.depth<2);X.style.display=Fe?"block":"none",X.tabIndex=Fe?0:-1,X.style.transform=`translate(${we}px,${Ce}px) translate(-50%,0)`,X.style.color="#"+F[z.tone??"primary"].clone().lerp(F.primary,.45).getHexString(),X.style.opacity=oe&&!ie&&!de&&!q?"0.45":"1",X.style.fontWeight=z.depth<2||ie?"var(--monkeys-semantic-font-weight-semibold, 600)":"var(--monkeys-semantic-font-weight-normal, 400)",X.style.zIndex=ie||q?"2":"1",Fe&&ce.push(Me);}W.render(C,R);}),x=r(()=>{W.domElement.removeEventListener("pointerdown",_),W.domElement.removeEventListener("pointermove",re),W.domElement.removeEventListener("pointerleave",fe),W.domElement.removeEventListener("pointerup",ye),Z.disconnect(),W.setAnimationLoop(null),H.dispose(),k.forEach(oe=>oe.dispose()),W.dispose(),W.domElement.remove();},"cleanup");}).catch(()=>{y||p(true);}),()=>{y=true,x();}},[b]),jsxRuntime.jsxs("div",{ref:u,className:i,role:"group","aria-label":a,"data-monkeys-component":"relationship-galaxy",style:{position:"relative",width:"100%",height:"100%",minHeight:400,overflow:"hidden",background:"hsl(var(--radar-canvas, var(--background)))"},children:[e.map(v=>jsxRuntime.jsx("button",{ref:y=>{y?c.current.set(v.id,y):c.current.delete(v.id);},"aria-pressed":o===v.id,className:"font-sans text-xs",title:v.meta,onClick:()=>g.current?.(v),style:{display:"none",position:"absolute",left:0,top:0,maxWidth:170,border:0,background:"transparent",padding:"calc(var(--global-spacing, 0.75rem) / 6)",cursor:"pointer",textShadow:"0 1px 4px hsl(var(--radar-canvas, var(--foreground)))",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:v.label},v.id)),m&&jsxRuntime.jsx("div",{role:"alert",className:"absolute inset-0 grid place-items-center bg-background text-foreground",children:s.workbench.collection.loadError})]})}r(Ou,"RelationshipGalaxy");var Yr={physics:{repulsion:18e3,linkDistance:100,weakLinkDistance:280,linkStrength:.014,strongLinkStrength:.025,centerStrength:.0015,velocityRetention:.72,maxVelocity:35,collisionPadding:18,collisionPasses:2,cooling:.975,minAlpha:.002,ticksPerFrame:2},nodes:{fontSize:13,iconSize:16,showIcons:true,showLabels:true,focusScale:1.08,borderRadius:999,glow:true,contextOpacity:null},edges:{visible:true,curved:true,widthScale:1,opacityScale:1,glow:true,color:null},interaction:{pan:true,zoom:true,dragNodes:true,keyboard:true,openNodes:true,dragThreshold:4,keyboardStep:15,keyboardFastStep:50},viewport:{minZoom:.08,maxZoom:8,fitMaxZoom:2,fitPadding:60,screenPadding:50,zoomSensitivity:.0012,zoomStep:180,fitOnResize:true},ui:{controls:true,minimap:true,minimapWidth:156,minimapHeight:108,dock:"bottom-left"}};for(let e of Object.values(Yr))Object.freeze(e);Object.freeze(Yr);var Fu={repulsion:[0,1e6],linkDistance:[0,2e3],weakLinkDistance:[0,3e3],linkStrength:[0,.2],strongLinkStrength:[0,.2],centerStrength:[0,.1],velocityRetention:[0,.99],maxVelocity:[1,100],collisionPadding:[0,200],collisionPasses:[0,8],cooling:[.5,.995],minAlpha:[.001,.1],ticksPerFrame:[1,10],fontSize:[8,48],iconSize:[8,64],focusScale:[.5,2],borderRadius:[0,999],contextOpacity:[0,1],widthScale:[0,8],opacityScale:[0,5],dragThreshold:[0,30],keyboardStep:[1,200],keyboardFastStep:[1,500],minZoom:[.01,20],maxZoom:[.01,20],fitMaxZoom:[.01,20],fitPadding:[0,500],screenPadding:[0,300],zoomSensitivity:[1e-4,.01],zoomStep:[1,1e3],minimapWidth:[140,360],minimapHeight:[60,300]},Hu=new Set(["collisionPasses","ticksPerFrame"]),Vu=r(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"record");function Si(e={}){if(!Vu(e))throw new Error("config must be an object");let t=structuredClone(Yr);for(let[o,n]of Object.entries(e)){if(!Object.prototype.hasOwnProperty.call(t,o))throw new Error(`Unknown config group: ${o}`);if(!Vu(n))throw new Error(`config.${o} must be an object`);let a=t[o];for(let[i,s]of Object.entries(n)){let u=`config.${o}.${i}`;if(!Object.prototype.hasOwnProperty.call(a,i))throw new Error(`Unknown field: ${u}`);if((i==="contextOpacity"||i==="color")&&s===null){a[i]=null;continue}if(i==="dock"){if(typeof s!="string"||!["bottom-left","bottom-right","top-left","top-right"].includes(s))throw new Error(`${u} must be a supported corner`)}else if(i==="color"){if(typeof s!="string"||!/^#[\da-f]{6}$/i.test(s))throw new Error(`${u} must be a #RRGGBB color or null`)}else if(Fu[i]){let[c,d]=Fu[i];if(typeof s!="number"||!Number.isFinite(s)||s<c||s>d||Hu.has(i)&&!Number.isInteger(s))throw new Error(`${u} must be ${Hu.has(i)?"an integer":"a number"} in [${c}, ${d}]`)}else if(typeof s!="boolean")throw new Error(`${u} must be a boolean`);a[i]=s;}}if(t.viewport.minZoom>t.viewport.maxZoom)throw new Error("config.viewport.minZoom must not exceed maxZoom");return t}r(Si,"resolveRelationshipGraphConfig");var xl=r((e,t,o)=>Math.min(o,Math.max(t,e)),"clamp");function Gu(e,t,o={}){let n=Si({physics:o.physics??{}}).physics,a=[...e].sort((m,p)=>m.id.localeCompare(p.id,"en")).map((m,p)=>({...m,x:Number.isFinite(m.x)?m.x:Math.cos(p*2.39996)*100,y:Number.isFinite(m.y)?m.y:Math.sin(p*2.39996)*100,vx:0,vy:0,...o.fixedNodes?.has(m.id)?{fx:o.fixedNodes.get(m.id).x,fy:o.fixedNodes.get(m.id).y}:{}})),i=new Map(a.map(m=>[m.id,m])),s=t.flatMap(m=>{let p=i.get(m.sourceId),f=i.get(m.targetId);if(!p||!f||p===f)return [];let b=Number.isFinite(m.associationStrength)?xl(m.associationStrength,0,1):0;return [{source:p,target:f,strength:b,distance:(p.width+f.width)/2+(n.linkDistance+(1-b)*n.weakLinkDistance)}]}).sort((m,p)=>`${m.source.id}:${m.target.id}`.localeCompare(`${p.source.id}:${p.target.id}`,"en")),u=o.center??{x:3800,y:2800},c=a.length?1:0,d=0;function g(m=1){for(let p=0;p<m&&c>0;p++){for(let f=0;f<a.length;f++)for(let b=f+1;b<a.length;b++){let v=a[f],y=a[b],x=y.x-v.x,w=y.y-v.y;if(Math.abs(x)+Math.abs(w)<.01){let S=(f+b+1)*2.39996;x=Math.cos(S),w=Math.sin(S);}let h=Math.max(1,Math.hypot(x,w)),k=Math.min(8,n.repulsion/Math.max(2500,h*h))*c,C=x/h*k,T=w/h*k;v.vx-=C,v.vy-=T,y.vx+=C,y.vy+=T;}for(let{source:f,target:b,strength:v,distance:y}of s){let x=b.x-f.x,w=b.y-f.y,h=Math.max(1,Math.hypot(x,w)),k=(h-y)*(n.linkStrength+v*n.strongLinkStrength)*c,C=x/h*k,T=w/h*k;f.vx+=C,f.vy+=T,b.vx-=C,b.vy-=T;}d=0;for(let f of a)f.vx=xl((f.vx+(u.x-f.x)*n.centerStrength*c)*n.velocityRetention,-n.maxVelocity,n.maxVelocity),f.vy=xl((f.vy+(u.y-f.y)*n.centerStrength*c)*n.velocityRetention,-n.maxVelocity,n.maxVelocity),f.fx!==void 0&&f.fy!==void 0?(f.x=f.fx,f.y=f.fy,f.vx=f.vy=0):(f.x+=f.vx,f.y+=f.vy,d+=f.vx*f.vx+f.vy*f.vy);for(let f=0;f<n.collisionPasses;f++)for(let b=0;b<a.length;b++)for(let v=b+1;v<a.length;v++){let y=a[b],x=a[v],w=x.x-y.x,h=x.y-y.y,k=(y.width+x.width)/2+n.collisionPadding-Math.abs(w),C=(y.height+x.height)/2+n.collisionPadding-Math.abs(h);if(k<=0||C<=0)continue;let T=y.fx===void 0,S=x.fx===void 0,I=Number(T)+Number(S);if(I)if(k<C){let R=Math.sign(w||1)*k/I;T&&(y.x-=R),S&&(x.x+=R);}else {let R=Math.sign(h||1)*C/I;T&&(y.y-=R),S&&(x.y+=R);}}c*=n.cooling,c<n.minAlpha&&(c=0);}return c>0}return r(g,"step"),{step:g,get active(){return c>0},get energy(){return d},positions:r(()=>new Map(a.map(({id:m,x:p,y:f})=>[m,{x:p,y:f}])),"positions"),reheat(){a.length&&(c=Math.max(c,.65));},pin(m,p,f){let b=i.get(m);!b||!Number.isFinite(p)||!Number.isFinite(f)||(b.x=b.fx=p,b.y=b.fy=f,b.vx=b.vy=0,c=Math.max(c,.65));},release(m){let p=i.get(m);if(!p)return;let f=o.fixedNodes?.get(m);p.fx=f?.x,p.fy=f?.y,c=Math.max(c,.65);}}}r(Gu,"createForceSimulation");var vl=r((e,t)=>{if(!e.length)return {x:0,y:0,width:2,height:2};let o=Math.min(...e.map(s=>s.x-s.width/2))-t,n=Math.max(...e.map(s=>s.x+s.width/2))+t,a=Math.min(...e.map(s=>s.y-s.height/2))-t,i=Math.max(...e.map(s=>s.y+s.height/2))+t;return {x:o,y:a,width:Math.max(2,n-o),height:Math.max(2,i-a)}},"calculateTrendRadarFocusTopologyBounds");var io={x:0,y:0,width:7600,height:5600};var tv=r((e,t,o)=>Math.min(o,Math.max(t,e)),"clamp");var _u=r(e=>{let t=Number.isFinite(e)?tv(e,0,1):0,o=.8+Math.pow(t,1.35)*7.2;return {strokeWidth:o,strokeOpacity:.26+t*.7,glowWidth:o+3+t*7,glowOpacity:t<.28?.02:.04+t*.14}},"getTrendRadarFocusTopologyFocusEdgeStyle"),Ti=r((e,t="dark")=>{let o=r((u,c,d)=>`color-mix(in srgb, ${c} ${d}%, ${u})`,"mix"),n=e.role==="context",a=e.role==="focus",i=o("hsl(var(--monkeys-color-background))",e.solidColor,t==="light"?a?16:n?4:10:a?48:40),s=t==="light"?o(n?"hsl(var(--monkeys-color-muted-foreground))":"hsl(var(--monkeys-color-foreground))",e.solidColor,n?10:38):o(e.color,"hsl(var(--monkeys-color-foreground))",a?45:34);return {background:i,foreground:s,border:o(i,s,a?82:67)}},"getTrendRadarFocusTopologyNodeTone"),ov=r((e,t)=>{let o=t.x-e.x,n=t.y-e.y,a=Math.max(Math.hypot(o,n),1),i=Math.min(72,Math.max(18,a*.13)),s=e.id.localeCompare(t.id)>=0?1:-1;return {x:(e.x+t.x)/2+n/a*i*s,y:(e.y+t.y)/2-o/a*i*s}},"getTrendRadarFocusTopologyEdgeControlPoint"),$u=r((e,t)=>{let o=ov(e,t);return `M ${e.x} ${e.y} Q ${o.x} ${o.y} ${t.x} ${t.y}`},"getTrendRadarFocusTopologyEdgePath");var vv={"align-justify":lucideReact.AlignJustify,grid:lucideReact.Grid3X3,layers:lucideReact.Layers,"map-pin":lucideReact.MapPin,mountain:lucideReact.Mountain,package:lucideReact.Package,paintbrush:lucideReact.Paintbrush,palette:lucideReact.Palette,scissors:lucideReact.Scissors,shield:lucideReact.Shield,"shield-check":lucideReact.ShieldCheck,shirt:lucideReact.Shirt,snowflake:lucideReact.Snowflake,sparkles:lucideReact.Sparkles,user:lucideReact.UserRound,users:lucideReact.UsersRound},kv=r((e,t)=>{if(e.role!=="focus")return "var(--trend-radar-muted-color)";let o=Math.pow(e.associationStrength,1.2)*86;return `color-mix(in srgb, var(--trend-radar-muted-color), ${t.color} ${o}%)`},"edgeStroke");function Ku({model:e,config:t=Yr,onOpenNode:o,renderNodeAction:n,relationshipLabel:a,colorMode:i="dark",onNodePointerDown:s,onNodeKeyDown:u}){let c=r((m,p)=>t.edges.curved?$u(m,p):`M ${m.x} ${m.y} L ${p.x} ${p.y}`,"edgePath"),d=lt.useId().replace(/:/g,""),g=lt.useMemo(()=>new Map(e.nodes.map(m=>[m.id,m])),[e.nodes]);return jsxRuntime.jsxs("div",{className:"trend-radar-focus-topology-background pointer-events-none relative size-full overflow-visible","data-radar-focus-topology-surface":"true","data-radar-focus-topology-color-mode":i,children:[t.edges.visible&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${io.width} ${io.height}`,className:"absolute inset-0 size-full overflow-visible","aria-hidden":"true",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("filter",{id:d,x:"-40%",y:"-40%",width:"180%",height:"180%",children:jsxRuntime.jsx("feGaussianBlur",{stdDeviation:"7"})})}),jsxRuntime.jsx("g",{"data-radar-focus-topology-edge-layer":"context",children:e.edges.filter(m=>m.role!=="focus").map(m=>{let p=g.get(m.sourceId),f=g.get(m.targetId);return !p||!f?null:jsxRuntime.jsx("path",{d:c(p,f),fill:"none",stroke:t.edges.color??"var(--trend-radar-muted-color)",strokeWidth:Math.max(.8,.72+Math.pow(m.associationStrength,1.08)*2.2)*t.edges.widthScale,strokeOpacity:Math.min(1,(m.role==="related"?.12:.045)*t.edges.opacityScale),strokeLinecap:"round",strokeLinejoin:"round"},m.id)})}),jsxRuntime.jsx("g",{"data-radar-focus-topology-edge-layer":"focus",children:e.edges.filter(m=>m.role==="focus").map(m=>{let p=g.get(m.sourceId),f=g.get(m.targetId);if(!p||!f)return null;let b=c(p,f),v=t.edges.color??kv(m,p.id===e.subjectId?f:p),y=_u(m.associationStrength);return jsxRuntime.jsxs("g",{"data-radar-focus-topology-focus-edge":m.id,"data-radar-focus-topology-association-strength":m.associationStrength.toFixed(4),children:[jsxRuntime.jsx("path",{d:b,fill:"none",stroke:v,strokeWidth:y.glowWidth*t.edges.widthScale,strokeOpacity:t.edges.glow?Math.min(1,y.glowOpacity*t.edges.opacityScale):0,strokeLinecap:"round",filter:`url(#${d})`}),jsxRuntime.jsx("path",{d:b,fill:"none",stroke:v,strokeWidth:y.strokeWidth*t.edges.widthScale,strokeOpacity:Math.min(1,y.strokeOpacity*t.edges.opacityScale),strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntime.jsx("title",{children:a(m)})})]},m.id)})})]}),e.nodes.map(m=>{let p=vv[m.iconName]??lucideReact.Palette,f=Ti(m,i),b=m.role==="focus",v=m.role==="context",y=!!(o&&!b);return jsxRuntime.jsxs("div",{className:l("absolute transition-[filter,opacity,transform] duration-200",b?"z-20":m.role==="related"?"z-10":"z-0",v&&i==="dark"&&"opacity-[0.18] brightness-[0.72] saturate-[0.3] hover:!opacity-100 hover:!filter-none"),style:{"--radar-node-background":f.background,"--radar-node-foreground":f.foreground,"--radar-node-border":f.border,left:m.x,opacity:v?t.nodes.contextOpacity??(i==="dark"?m.contextOpacity:void 0):void 0,top:m.y,width:m.width,height:m.height,transform:`translate(-50%, -50%) scale(${b?t.nodes.focusScale:1})`,transformOrigin:"center center"},"data-radar-focus-topology-node-anchor":m.ref.id,children:[jsxRuntime.jsxs("button",{type:"button",disabled:!y&&!s,"aria-label":m.label,title:m.taxonomy?.secondaryLabel?`${m.label} \xB7 ${m.taxonomy.secondaryLabel}`:m.label,onPointerDown:x=>{x.stopPropagation(),s?.(x,m);},onKeyDown:x=>u?.(x,m),onClick:x=>{x.stopPropagation(),y&&o?.(m);},className:l("focus-visible:ring-primary pointer-events-auto flex size-full items-center justify-center gap-2 rounded-full border-0 px-3 text-left text-[0.8125rem] leading-none font-semibold outline-hidden transition-[box-shadow,filter,transform] focus-visible:ring-2",y&&"cursor-pointer hover:brightness-110",!y&&"cursor-default disabled:opacity-100"),style:{fontSize:t.nodes.fontSize,borderRadius:t.nodes.borderRadius,color:f.foreground,backgroundColor:f.background,boxShadow:t.nodes.glow?b?`inset 0 0 0 2px ${f.border}, 0 0 34px ${m.color}66`:m.role==="related"?`inset 0 0 0 1px ${f.border}, 0 0 18px ${m.color}24`:`inset 0 0 0 1px ${f.border}`:`inset 0 0 0 ${b?2:1}px ${f.border}`},"data-radar-focus-topology-node":m.ref.id,"data-world-x":m.x.toFixed(2),"data-world-y":m.y.toFixed(2),"data-radar-focus-topology-node-role":m.role,children:[t.nodes.showIcons&&jsxRuntime.jsx(p,{className:"shrink-0",size:t.nodes.iconSize,color:f.foreground,strokeWidth:1.8,"aria-hidden":"true"}),t.nodes.showLabels&&jsxRuntime.jsx("span",{className:"min-w-0 truncate",style:{color:"inherit"},children:m.label})]}),n?.(m)]},m.id)})]})}r(Ku,"TrendRadarFocusTopologySurface");function qu({model:e,config:t,onCameraChange:o,colorMode:n="light",ariaLabel:a,onOpenNode:i,renderNodeAction:s,nodeAction:u,onNodeAction:c,relationshipLabel:d,controls:g,onNodePositionChange:m}){if(u?.maxActive!==void 0&&(!Number.isSafeInteger(u.maxActive)||u.maxActive<1))throw new TypeError("Node action maxActive must be a positive integer.");if(u?.size!==void 0&&(!Number.isFinite(u.size)||u.size<16||u.size>48))throw new TypeError("Node action size must be between 16 and 48.");let p=lt.useMemo(()=>Si(t),[t]),f=lt.useMemo(()=>new Set(u?.activeNodeIds??[]),[u?.activeNodeIds]),b=JSON.stringify(p.physics),v=lt.useMemo(()=>JSON.parse(b),[b]),y=JSON.stringify(p.viewport),x=lt.useMemo(()=>JSON.parse(y),[y]),{interaction:w,ui:h}=p,k=lt.useRef(null),C=lt.useRef(),T=JSON.stringify({nodes:e.nodes.map(({id:P,x:_,y:re,width:fe,height:ye})=>({id:P,x:_,y:re,width:fe,height:ye})),edges:e.edges.map(({sourceId:P,targetId:_,associationStrength:re})=>({sourceId:P,targetId:_,associationStrength:re}))}),S=lt.useMemo(()=>{let P=JSON.parse(T);return Gu(P.nodes,P.edges,{physics:v})},[T,v]),[I,R]=lt.useState(()=>S.positions()),[W,H]=lt.useState(false),[L,F]=lt.useState({x:0,y:0,z:1}),$=lt.useRef(o);$.current=o,lt.useEffect(()=>{$.current?.(L);},[L]);let M=lt.useRef(L),G=lt.useRef(),Y=lt.useRef(false),[N,D]=lt.useState({width:1,height:1}),B=lt.useRef(false),K=lt.useMemo(()=>e.nodes.map(P=>({...P,...I.get(P.id)??{}})),[e.nodes,I]),J=lt.useRef(K);J.current=K;let V=lt.useCallback(P=>{M.current=P,F(P);},[]),Q=lt.useCallback(()=>{if(C.current!==void 0)return;if(B.current&&!G.current){S.step(1400),R(S.positions()),H(false);return}H(S.active);let P=r(()=>{S.step(v.ticksPerFrame),R(S.positions()),S.active?C.current=requestAnimationFrame(P):(C.current=void 0,H(false));},"tick");C.current=requestAnimationFrame(P);},[S,v.ticksPerFrame]),j=lt.useCallback(()=>{let P=k.current;if(!P)return;let _=vl(J.current,x.fitPadding),re=Math.max(x.minZoom,Math.min(x.maxZoom,x.fitMaxZoom,(P.clientWidth-x.screenPadding*2)/_.width,(P.clientHeight-x.screenPadding*2)/_.height));V({x:P.clientWidth/(2*re)-_.x-_.width/2,y:P.clientHeight/(2*re)-_.y-_.height/2,z:re});},[V,x]);lt.useEffect(()=>{B.current=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??false;let P=S.positions();return R(P),J.current=J.current.map(_=>({..._,...P.get(_.id)})),j(),Q(),()=>{C.current!==void 0&&cancelAnimationFrame(C.current),C.current=void 0;let _=G.current;_?.target.hasPointerCapture?.(_.pointerId)&&_.target.releasePointerCapture(_.pointerId),G.current=void 0;}},[S,j,Q]),lt.useEffect(()=>{let P=k.current;if(!P)return;let _=new ResizeObserver(()=>{D({width:P.clientWidth,height:P.clientHeight}),x.fitOnResize&&j();});return _.observe(P),()=>_.disconnect()},[j,x.fitOnResize]);let Z=lt.useCallback((P,_,re)=>{if(!w.zoom)return;let fe=M.current,ye=Math.max(x.minZoom,Math.min(x.maxZoom,fe.z*Math.exp(-P*x.zoomSensitivity)));V({x:fe.x-_/fe.z+_/ye,y:fe.y-re/fe.z+re/ye,z:ye});},[V,x,w.zoom]);lt.useEffect(()=>{let P=k.current;if(!P)return;let _=r(re=>{if(G.current||!w.zoom)return;re.preventDefault();let fe=P.getBoundingClientRect();Z(re.deltaY,re.clientX-fe.left,re.clientY-fe.top);},"wheel");return P.addEventListener("wheel",_,{passive:false}),()=>P.removeEventListener("wheel",_)},[Z,w.zoom]);let te=r((P,_)=>{if(P.button!==0||G.current||(_?!w.dragNodes:!w.pan))return;Y.current=false;let re=M.current;G.current={pointerId:P.pointerId,id:_?.id,startX:P.clientX,startY:P.clientY,x:_?.x??re.x,y:_?.y??re.y,moved:false,target:P.currentTarget},P.currentTarget.setPointerCapture(P.pointerId),_&&(S.pin(_.id,_.x,_.y),Q());},"begin"),ae=r(P=>{let _=G.current;if(!(!_||_.pointerId!==P.pointerId)){if(G.current=void 0,Y.current=_.moved,_.id){let re=S.positions().get(_.id);S.release(_.id),Q(),_.moved&&re&&m?.(_.id,re);}_.target.hasPointerCapture(P.pointerId)&&_.target.releasePointerCapture(P.pointerId);}},"end"),le={...e,nodes:K},A=new Map(K.map(P=>[P.id,P])),me=vl([...e.nodes,...K],200);return jsxRuntime.jsxs("section",{ref:k,className:"relationship-graph bg-background relative size-full overflow-hidden",style:{cursor:w.pan?void 0:"default",touchAction:w.pan||w.dragNodes?"none":"auto"},role:"region","aria-label":a,"data-radar-focus-topology":"true","data-graph-engine":"native-force","data-force-running":W,"data-radar-focus-topology-camera":`${L.x.toFixed(2)},${L.y.toFixed(2)},${L.z.toFixed(3)}`,onPointerDown:P=>{P.target.closest("button")||te(P);},onPointerMove:P=>{let _=G.current;if(!_||_.pointerId!==P.pointerId)return;let re=P.clientX-_.startX,fe=P.clientY-_.startY;_.moved||(_.moved=Math.hypot(re,fe)>w.dragThreshold),_.moved&&(_.id?(S.pin(_.id,_.x+re/M.current.z,_.y+fe/M.current.z),R(S.positions()),Q()):V({...M.current,x:_.x+re/M.current.z,y:_.y+fe/M.current.z}));},onPointerUp:ae,onPointerCancel:ae,onLostPointerCapture:ae,onClickCapture:P=>{Y.current&&(P.preventDefault(),P.stopPropagation(),Y.current=false);},children:[jsxRuntime.jsx("div",{style:{position:"absolute",left:0,top:0,width:io.width,height:io.height,transformOrigin:"0 0",transform:`translate(${L.x*L.z}px, ${L.y*L.z}px) scale(${L.z})`},children:jsxRuntime.jsx(Ku,{model:le,config:p,colorMode:n,relationshipLabel:d,onOpenNode:w.openNodes?i:void 0,renderNodeAction:s??(u&&c?P=>{if(u.nodeKinds&&!u.nodeKinds.includes(P.ref.kind))return null;let _=f.has(P.id),re=u.disabled||!_&&u.maxActive!==void 0&&f.size>=u.maxActive,fe=`${_?u.activeLabel??u.label:u.label}: ${P.label}`,ye=_?lucideReact.Check:lucideReact.Plus,xe=u.size??24;return jsxRuntime.jsx("button",{type:"button","data-relationship-node-action":P.id,"aria-label":fe,title:fe,"aria-pressed":_,disabled:re,className:"grid place-items-center rounded-md border border-current bg-card text-foreground shadow-sm outline-none hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-40",style:{position:"absolute",right:0,top:0,width:xe,height:xe,color:Ti(P,n).foreground,transform:`translate(50%, -50%) scale(${u.keepScreenSize===false?1:1/L.z})`,transformOrigin:"center"},onPointerDown:oe=>oe.stopPropagation(),onKeyDown:oe=>oe.stopPropagation(),onClick:oe=>{oe.stopPropagation(),c(P);},children:jsxRuntime.jsx(ye,{size:xe*.6,"aria-hidden":"true"})})}:void 0),onNodePointerDown:w.dragNodes?(P,_)=>te(P,_):void 0,onNodeKeyDown:(P,_)=>{if(!w.keyboard||!w.dragNodes)return;let re={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]}[P.key];if(!re)return;P.preventDefault(),P.stopPropagation();let fe=(P.shiftKey?w.keyboardFastStep:w.keyboardStep)/M.current.z,ye={x:_.x+re[0]*fe,y:_.y+re[1]*fe};S.pin(_.id,ye.x,ye.y),R(S.positions()),S.release(_.id),Q(),m?.(_.id,ye);}})}),(h.controls||h.minimap)&&jsxRuntime.jsxs("div",{className:"relationship-minimap","data-radar-focus-topology-minimap":"true",style:{width:h.minimapWidth,left:h.dock.endsWith("left")?12:"auto",right:h.dock.endsWith("right")?12:"auto",top:h.dock.startsWith("top")?12:"auto",bottom:h.dock.startsWith("bottom")?12:"auto"},children:[h.controls&&jsxRuntime.jsxs("div",{className:"relationship-controls",children:[jsxRuntime.jsx("button",{type:"button","aria-label":g.zoomOut,onClick:()=>Z(x.zoomStep,N.width/2,N.height/2),disabled:!w.zoom||L.z<=x.minZoom,children:jsxRuntime.jsx(lucideReact.Minus,{size:15})}),jsxRuntime.jsxs("output",{children:[Math.round(L.z*100),"%"]}),jsxRuntime.jsx("button",{type:"button","aria-label":g.zoomIn,onClick:()=>Z(-x.zoomStep,N.width/2,N.height/2),disabled:!w.zoom||L.z>=x.maxZoom,children:jsxRuntime.jsx(lucideReact.Plus,{size:15})}),jsxRuntime.jsx("button",{type:"button","aria-label":g.zoomToFit,onClick:j,children:jsxRuntime.jsx(lucideReact.LocateFixed,{size:15})})]}),h.minimap&&jsxRuntime.jsx("button",{type:"button",className:"relationship-minimap-map",disabled:!w.pan,"aria-label":g.minimap,onClick:P=>{if(P.detail===0){j();return}let _=P.currentTarget.getBoundingClientRect(),re=(P.clientX-_.left)/_.width*me.width+me.x,fe=(P.clientY-_.top)/_.height*me.height+me.y;V({...L,x:N.width/(2*L.z)-re,y:N.height/(2*L.z)-fe});},children:jsxRuntime.jsxs("svg",{viewBox:`${me.x} ${me.y} ${me.width} ${me.height}`,style:{height:h.minimapHeight},preserveAspectRatio:"none","aria-hidden":"true",children:[e.edges.map(P=>{let _=A.get(P.sourceId),re=A.get(P.targetId);return _&&re?jsxRuntime.jsx("line",{x1:_.x,y1:_.y,x2:re.x,y2:re.y,stroke:"currentColor",strokeWidth:2,opacity:.2},P.id):null}),K.map(P=>jsxRuntime.jsx("circle",{cx:P.x,cy:P.y,r:P.role==="focus"?14:8,fill:P.color},P.id)),jsxRuntime.jsx("rect",{x:-L.x,y:-L.y,width:N.width/L.z,height:N.height/L.z,fill:"currentColor",fillOpacity:.07,stroke:"currentColor",strokeWidth:4})]})})]})]})}r(qu,"RelationshipGraph2D");var Tv={primary:"hsl(var(--radar-series-one, var(--primary)))",secondary:"hsl(var(--radar-series-two, var(--success)))",accent:"hsl(var(--radar-series-three, var(--warning)))",muted:"hsl(var(--radar-series-four, var(--muted-foreground)))"},Rv={nodes:{showIcons:false,glow:false,contextOpacity:1},edges:{glow:false,opacityScale:3,widthScale:.5}};function Ju({nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,ariaLabel:a="Relationship graph",className:i,height:s=440}){let u=vt(),c=dn(),d=JSON.stringify([e,t]),g=lt.useMemo(()=>wi(e,t),[d]),m=lt.useMemo(()=>({subjectId:o??"",bounds:io,focusBounds:io,nodes:g.points.map(b=>{let v=Math.max(88,Math.min(240,Array.from(b.label).length*14+32)),y=Tv[b.tone??"muted"];return {id:b.id,ref:{kind:"node",id:b.id},label:b.label,x:io.width/2+b.x*70,y:io.height/2+b.y*70,width:v,height:36,radius:v/2,score:0,degree:g.neighbors.get(b.id)?.size??0,colorKey:b.tone??"muted",color:y,solidColor:y,iconName:"layers",role:b.id===o?"focus":"related"}}),edges:g.links.map((b,v)=>({id:b.id??`${b.sourceId}:${b.targetId}:${v}`,sourceId:b.sourceId,targetId:b.targetId,evidenceRefs:[],evidenceCount:0,associationStrength:1,role:b.sourceId===o||b.targetId===o?"focus":"related"}))}),[g,o]),p=lt.useMemo(()=>new Map(e.map(b=>[b.id,b])),[d]),f=lt.useMemo(()=>new Map(g.links.map((b,v)=>[b.id??`${b.sourceId}:${b.targetId}:${v}`,b.label??`${p.get(b.sourceId)?.label} \u2192 ${p.get(b.targetId)?.label}`])),[g,p]);return jsxRuntime.jsx("div",{"data-monkeys-component":"workbench-relationship-graph","data-workbench-relationship-variant":"force-2d",className:l("relative h-[var(--relationship-height)] min-h-0 min-w-0 overflow-hidden",i),style:{"--relationship-height":`${s}px`},children:jsxRuntime.jsx(qu,{model:m,config:Rv,colorMode:c?.colorMode==="dark"?"dark":"light",ariaLabel:a,controls:u.workbench.relationshipGraph??{zoomOut:"Zoom out",zoomIn:"Zoom in",zoomToFit:"Fit graph",minimap:"Graph overview"},relationshipLabel:b=>f.get(b.id)??"",onOpenNode:n?b=>{let v=p.get(b.id);v&&n(v);}:void 0})})}r(Ju,"RelationshipForce2D");var Nv={primary:"fill-primary/10 stroke-primary text-primary",secondary:"fill-secondary stroke-secondary-foreground text-secondary-foreground",accent:"fill-accent stroke-accent-foreground text-accent-foreground",muted:"fill-muted stroke-muted-foreground text-muted-foreground"},Iv={primary:"--radar-series-one",secondary:"--radar-series-two",accent:"--radar-series-three",muted:"--radar-series-four"},Mv={primary:"var(--primary)",secondary:"var(--secondary-foreground)",accent:"var(--accent-foreground)",muted:"var(--muted-foreground)"},Bi=r((e,t=1)=>`hsl(var(${Iv[e]}, ${Mv[e]}) / ${t})`,"radarToneColor"),Bv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activateNode");function Pv({nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,width:a=900,height:i=440,emptyState:s=null,ariaLabel:u="Relationship graph",className:c,variant:d="default"}){if(!e.length)return O(s)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:s}):null;if(d==="galaxy")return jsxRuntime.jsx(Ou,{nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,ariaLabel:u,className:c});if(d==="force-2d")return jsxRuntime.jsx(Ju,{nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,ariaLabel:u,className:c,height:i});let g=d==="radar",m=Math.min(a,i)*(g?.37:.35),p=o?e.findIndex(v=>v.id===o):-1,f=p>=0?e.filter((v,y)=>y!==p):e,b=new Map(e.map((v,y)=>{if(e.length===1)return [v.id,{x:a/2,y:i/2}];if(g&&y===p)return [v.id,{x:a/2,y:i/2}];let x=f.findIndex(h=>h.id===v.id),w=Math.PI*2*x/f.length-Math.PI/2;return [v.id,{x:a/2+Math.cos(w)*m,y:i/2+Math.sin(w)*m}]}));return jsxRuntime.jsx("div",{"data-monkeys-component":"workbench-relationship-graph","data-workbench-relationship-variant":d,className:l("relative min-w-0 overflow-hidden rounded-lg border",g?"min-h-[42rem]":"overflow-x-auto border-border/70 bg-card",c),style:g?{backgroundColor:"hsl(var(--radar-canvas, var(--background)))",borderColor:"hsl(var(--radar-shell-border, var(--border)))",backgroundImage:"linear-gradient(hsl(var(--radar-grid, var(--border)) / 0.28) 1px, transparent 1px), linear-gradient(90deg, hsl(var(--radar-grid, var(--border)) / 0.28) 1px, transparent 1px), radial-gradient(circle at center, hsl(var(--primary) / 0.1), transparent 45%)",backgroundSize:"4rem 4rem, 4rem 4rem, 100% 100%"}:void 0,children:jsxRuntime.jsxs("svg",{viewBox:`0 0 ${a} ${i}`,className:l(g?"absolute inset-0 size-full":"min-w-[42rem]"),preserveAspectRatio:g?"xMidYMid meet":void 0,role:"img","aria-label":u,children:[t.map((v,y)=>{let x=b.get(v.sourceId),w=b.get(v.targetId);return !x||!w?null:jsxRuntime.jsx("line",{x1:x.x,y1:x.y,x2:w.x,y2:w.y,className:g?void 0:"stroke-border",strokeWidth:g?"2":"1.5",style:g?{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.46)",filter:"drop-shadow(0 0 0.35rem hsl(var(--primary) / 0.34))"}:void 0,children:jsxRuntime.jsx("title",{children:v.label||`${v.sourceId} to ${v.targetId}`})},v.id||`${v.sourceId}:${v.targetId}:${y}`)}),e.map(v=>{let y=b.get(v.id),x=v.id===o,w=v.tone||"muted",h=g?{color:Bi(w)}:void 0;return jsxRuntime.jsxs("g",{transform:`translate(${y.x}, ${y.y})`,role:n?"button":void 0,tabIndex:n?0:void 0,"aria-label":v.meta?`${v.label}, ${v.meta}`:v.label,"aria-pressed":n?x:void 0,onClick:n?()=>n(v):void 0,onKeyDown:k=>Bv(k,v,n),className:l(g?"outline-hidden":Nv[w],n&&"cursor-pointer outline-hidden"),style:h,children:[jsxRuntime.jsx("circle",{r:g&&x?"50":g?"40":"36",className:l("stroke-1 transition-[stroke-width] duration-150 motion-reduce:transition-none",x&&"stroke-[3]"),style:g?{fill:Bi(w,x?.22:.12),stroke:Bi(w,x?1:.78),filter:`drop-shadow(0 0 ${x?"1.4rem":"0.75rem"} ${Bi(w,.62)})`}:void 0}),jsxRuntime.jsx("text",{textAnchor:"middle",y:v.meta?-3:4,className:l("pointer-events-none fill-current font-semibold",g?"text-sm":"text-xs"),children:v.label.slice(0,18)}),v.meta?jsxRuntime.jsx("text",{textAnchor:"middle",y:"16",className:l("pointer-events-none text-xs",g?"fill-current opacity-70":"fill-muted-foreground"),children:v.meta.slice(0,22)}):null]},v.id)})]})})}r(Pv,"WorkbenchRelationshipGraph");var Dv={primary:"fill-primary stroke-primary",secondary:"fill-secondary stroke-secondary-foreground",accent:"fill-accent stroke-accent-foreground",muted:"fill-muted stroke-muted-foreground"},Wv=r(e=>e.filter(Number.isFinite),"finiteValues"),kl=r((e,t,o)=>{let n=Wv(e),a=Number.isFinite(t)?Number(t):Math.min(...n,0),i=Number.isFinite(o)?Number(o):Math.max(...n,1);return a===i?[a,i+1]:a<i?[a,i]:[i,a]},"getDomain"),Zr=r((e,t,o,n)=>o+(e-t[0])/(t[1]-t[0])*(n-o),"scale"),wn=r((e,t,o)=>Math.min(o,Math.max(t,e)),"clamp"),Lv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activatePoint");function Av({points:e,xAxis:t,yAxis:o,thresholds:n,selectedPointId:a,onPointSelect:i,width:s=900,height:u=420,emptyState:c=null,ariaLabel:d=`${t.label} by ${o.label}`,className:g}){let m=e.filter(T=>Number.isFinite(T.x)&&Number.isFinite(T.y));if(!m.length)return O(c)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:c}):null;let p=56,f=kl(m.map(T=>T.x),t.min,t.max),b=kl(m.map(T=>T.y),o.min,o.max),v=kl(m.map(T=>T.size??1)),y=p,x=s-p,w=p,h=u-p,k=Number.isFinite(n?.x)?Zr(Number(n?.x),f,y,x):void 0,C=Number.isFinite(n?.y)?Zr(Number(n?.y),b,h,w):void 0;return jsxRuntime.jsx("div",{"data-monkeys-component":"workbench-scatter-plot",className:l("min-w-0 overflow-x-auto rounded-lg border border-border/70 bg-card p-3",g),children:jsxRuntime.jsxs("svg",{viewBox:`0 0 ${s} ${u}`,className:"min-w-[42rem]",role:"img","aria-label":d,children:[jsxRuntime.jsx("line",{x1:y,y1:h,x2:x,y2:h,className:"stroke-border"}),jsxRuntime.jsx("line",{x1:y,y1:w,x2:y,y2:h,className:"stroke-border"}),k===void 0?null:jsxRuntime.jsx("line",{x1:wn(k,y,x),y1:w,x2:wn(k,y,x),y2:h,className:"stroke-muted-foreground/50",strokeDasharray:"5 5"}),C===void 0?null:jsxRuntime.jsx("line",{x1:y,y1:wn(C,w,h),x2:x,y2:wn(C,w,h),className:"stroke-muted-foreground/50",strokeDasharray:"5 5"}),jsxRuntime.jsx("text",{x:s/2,y:u-12,textAnchor:"middle",className:"fill-muted-foreground text-xs",children:t.label}),jsxRuntime.jsx("text",{x:"16",y:u/2,textAnchor:"middle",transform:`rotate(-90 16 ${u/2})`,className:"fill-muted-foreground text-xs",children:o.label}),m.map(T=>{let S=wn(Zr(T.x,f,y,x),y,x),I=wn(Zr(T.y,b,h,w),w,h),R=T.size===void 0?9:wn(Zr(T.size,v,7,18),7,18),W=a===T.id;return jsxRuntime.jsxs("g",{transform:`translate(${S}, ${I})`,role:i?"button":void 0,tabIndex:i?0:void 0,"aria-label":`${T.label}: ${t.label} ${T.x}, ${o.label} ${T.y}`,"aria-pressed":i?W:void 0,onClick:i?()=>i(T):void 0,onKeyDown:H=>Lv(H,T,i),className:l(i&&"cursor-pointer outline-hidden"),children:[jsxRuntime.jsx("circle",{r:R,className:l("stroke-1 opacity-80 transition-opacity duration-150 motion-reduce:transition-none",Dv[T.tone||"primary"],W?"opacity-100 stroke-[3]":"hover:opacity-100")}),jsxRuntime.jsx("text",{y:-R-7,textAnchor:"middle",className:"pointer-events-none fill-foreground text-[0.6875rem] font-semibold",children:T.label.slice(0,24)}),jsxRuntime.jsx("title",{children:T.description||T.label})]},T.id)})]})})}r(Av,"WorkbenchScatterPlot");var Ov=r((e,t,o)=>{!o||t.disabled||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activateItem");function Fv({items:e,onItemSelect:t,ariaLabel:o="Journey",className:n}){return jsxRuntime.jsx("nav",{"aria-label":o,"data-monkeys-component":"workbench-journey-navigation",className:l("min-w-0 overflow-x-auto rounded-lg border border-border/70 bg-card p-2",n),children:jsxRuntime.jsx("ol",{className:"flex min-w-max items-stretch gap-1",children:e.map((a,i)=>{let s=a.state||"upcoming";return jsxRuntime.jsxs("li",{className:"flex items-center",children:[i?jsxRuntime.jsx("span",{className:"mx-1 h-px w-5 bg-border","aria-hidden":"true"}):null,jsxRuntime.jsxs("button",{type:"button",disabled:a.disabled,"aria-current":s==="current"?"page":void 0,onClick:t&&!a.disabled?()=>t(a):void 0,onKeyDown:u=>Ov(u,a,t),className:l("min-w-28 rounded-md border px-3 py-2 text-left outline-hidden transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background motion-reduce:transition-none",s==="current"&&"border-primary bg-primary text-primary-foreground",s==="complete"&&"border-primary/30 bg-primary/10 text-foreground",s==="upcoming"&&"border-transparent bg-muted/50 text-muted-foreground",a.disabled&&"cursor-not-allowed opacity-50"),children:[O(a.eyebrow)?jsxRuntime.jsx("span",{className:l("block text-[0.625rem] font-semibold uppercase tracking-[0.14em]",s==="current"?"text-primary-foreground/75":"text-muted-foreground"),children:a.eyebrow}):null,jsxRuntime.jsx("span",{className:"mt-0.5 block text-xs font-semibold",children:a.label})]})]},a.id)})})})}r(Fv,"WorkbenchJourneyNavigation");var Hv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activateItem");function Vv({items:e,selectedItemId:t,onItemSelect:o,emptyState:n=null,ariaLabel:a="Ranked items",className:i}){return e.length?jsxRuntime.jsx("ol",{"aria-label":a,"data-monkeys-component":"workbench-ranked-list",className:l("grid min-w-0 gap-2",i),children:e.map((s,u)=>{let c=t===s.id;return jsxRuntime.jsx("li",{children:jsxRuntime.jsxs("button",{type:"button","aria-pressed":o?c:void 0,onClick:o?()=>o(s):void 0,onKeyDown:d=>Hv(d,s,o),className:l("grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-3 rounded-lg border bg-card p-3 text-left text-card-foreground outline-hidden transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",c?"border-primary bg-primary/5":"border-border/70 hover:border-primary/40 hover:bg-accent/50",!o&&"cursor-default"),children:[jsxRuntime.jsx("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-semibold tabular-nums text-muted-foreground",children:s.leading||u+1}),jsxRuntime.jsxs("span",{className:"min-w-0",children:[jsxRuntime.jsx("span",{className:"block truncate text-sm font-semibold text-foreground",children:s.label}),O(s.description)?jsxRuntime.jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:s.description}):null,s.tags?.length?jsxRuntime.jsx("span",{className:"mt-2 flex flex-wrap gap-1.5",children:s.tags.map((d,g)=>jsxRuntime.jsx("span",{className:"rounded-full bg-secondary px-2 py-0.5 text-[0.625rem] font-medium text-secondary-foreground",children:d},`${s.id}:tag:${g}`))}):null,s.metrics?.length?jsxRuntime.jsx("span",{className:"mt-2 grid grid-cols-2 gap-x-4 gap-y-1 sm:grid-cols-4",children:s.metrics.map(d=>jsxRuntime.jsxs("span",{className:"min-w-0",children:[jsxRuntime.jsx("span",{className:"block truncate text-[0.625rem] text-muted-foreground",children:d.label}),jsxRuntime.jsx("span",{className:"block text-xs font-semibold tabular-nums text-foreground",children:d.value})]},d.id))}):null]}),jsxRuntime.jsxs("span",{className:"shrink-0 text-right",children:[O(s.score)?jsxRuntime.jsx("span",{className:"block text-lg font-semibold tabular-nums text-primary",children:s.score}):null,O(s.trailing)?jsxRuntime.jsx("span",{className:"mt-1 block text-muted-foreground",children:s.trailing}):null]})]})},s.id)})}):O(n)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:n}):null}r(Vv,"WorkbenchRankedList");function _v({title:e,description:t,items:o,onRemove:n,removeLabel:a=r(()=>"Remove","removeLabel"),actions:i,emptyState:s=null,className:u}){return jsxRuntime.jsxs("section",{"data-monkeys-component":"workbench-selection-tray",className:l("rounded-lg border border-border/70 bg-card p-4 text-card-foreground",u),children:[jsxRuntime.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("h2",{className:"text-sm font-semibold text-foreground",children:e}),O(t)?jsxRuntime.jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground",children:t}):null]}),jsxRuntime.jsx("span",{className:"rounded-full bg-primary/10 px-2.5 py-1 text-xs font-semibold tabular-nums text-primary",children:o.length})]}),o.length?jsxRuntime.jsx("ul",{className:"mt-3 flex flex-wrap gap-2",children:o.map(c=>jsxRuntime.jsxs("li",{className:"flex max-w-full items-center gap-2 rounded-full border border-border bg-background px-3 py-1.5 text-xs text-foreground",children:[jsxRuntime.jsx("span",{className:"min-w-0 truncate font-medium",children:c.label}),O(c.meta)?jsxRuntime.jsx("span",{className:"shrink-0 text-muted-foreground",children:c.meta}):null,n?jsxRuntime.jsx("button",{type:"button","aria-label":a(c),onClick:()=>n(c),className:"rounded-md px-1 text-muted-foreground outline-hidden hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:"\xD7"}):null]},c.id))}):jsxRuntime.jsx("div",{className:"mt-3 rounded-md border border-dashed border-border px-4 py-5 text-center text-xs text-muted-foreground",children:s}),O(i)?jsxRuntime.jsx("div",{className:"mt-4 flex flex-wrap justify-end gap-2 border-t border-border pt-4",children:i}):null]})}r(_v,"WorkbenchSelectionTray");function Di(e,t="milliseconds",o){if(t!=="milliseconds"&&t!=="seconds")return "\u2014";let n;if(typeof e=="number")n=t==="seconds"?e*1e3:e;else if(typeof e=="string"){let i=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,3}))?(Z|[+-]\d{2}:\d{2})$/.exec(e);if(!i)return "\u2014";let s=Number(i[1]),u=Number(i[2]),c=Number(i[3]),d=Number(i[4]),g=Number(i[5]),m=Number(i[6]),p=new Date(0);if(p.setUTCFullYear(s,u-1,c),p.getUTCFullYear()!==s||p.getUTCMonth()!==u-1||p.getUTCDate()!==c||d>23||g>59||m>59)return "\u2014";n=Date.parse(e);}else return "\u2014";if(!Number.isFinite(n))return "\u2014";let a=new Date(n);if(!Number.isFinite(a.getTime()))return "\u2014";try{return a.toLocaleString(o)}catch{return "\u2014"}}r(Di,"renderDateTimeValue");function $v({items:e,emptyState:t=null,ariaLabel:o="Evidence",className:n,translate:a=r(i=>i,"translate")}){let{locale:i}=xt();return e.length?jsxRuntime.jsx("ol",{"aria-label":o,"data-monkeys-component":"workbench-evidence-list",className:l("grid min-w-0 gap-0",n),children:e.map((s,u)=>jsxRuntime.jsxs("li",{className:"grid min-w-0 grid-cols-[1.25rem_minmax(0,1fr)_auto] gap-3",children:[jsxRuntime.jsxs("span",{className:"flex flex-col items-center","aria-hidden":"true",children:[jsxRuntime.jsx("span",{className:"mt-1 flex size-5 items-center justify-center rounded-full border border-primary/40 bg-primary/10 text-[0.625rem] font-semibold text-primary",children:s.marker||u+1}),u<e.length-1?jsxRuntime.jsx("span",{className:"min-h-8 w-px flex-1 bg-border"}):null]}),jsxRuntime.jsxs("span",{className:"min-w-0 pb-5",children:[jsxRuntime.jsx("span",{className:"block text-sm font-semibold text-foreground",children:s.titleKey?a(s.titleKey):s.title}),O(s.description)||s.descriptionKey?jsxRuntime.jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:s.descriptionKey?a(s.descriptionKey):s.description}):null,O(s.source)||s.sourceKey||O(s.timestamp)||s.timestampValue!==void 0?jsxRuntime.jsxs("span",{className:"mt-1.5 flex flex-wrap gap-x-3 gap-y-1 text-[0.6875rem] text-muted-foreground",children:[O(s.source)||s.sourceKey?jsxRuntime.jsx("span",{children:s.sourceKey?a(s.sourceKey):s.source}):null,O(s.timestamp)||s.timestampValue!==void 0?jsxRuntime.jsx("time",{children:s.timestampValue!==void 0?Di(s.timestampValue,"milliseconds",i):s.timestamp}):null]}):null]}),O(s.action)?jsxRuntime.jsx("span",{className:"pb-5",children:s.action}):null]},s.id))}):O(t)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:t}):null}r($v,"WorkbenchEvidenceList");var Uv=lt.forwardRef(r(function({src:t,title:o,className:n,style:a,...i},s){let u=eo(t,"media"),c=u&&!u.startsWith("blob:")?u:void 0;return jsxRuntime.jsx("iframe",{...i,ref:s,src:c,title:o,"data-monkeys-component":"web-preview-frame","data-invalid-source":!c||void 0,sandbox:"allow-scripts allow-same-origin allow-forms allow-popups allow-presentation",referrerPolicy:"no-referrer",className:l("h-full min-h-80 w-full border-0 bg-background",n),style:a})},"WebPreviewFrame"));var Yv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activateItem");function Jv({items:e,selectedItemId:t,onItemSelect:o,emptyState:n=null,ariaLabel:a="Assets",className:i}){return e.length?jsxRuntime.jsx("div",{"data-monkeys-component":"workbench-asset-gallery",children:jsxRuntime.jsx(on,{items:e,config:{getItemKey:r(s=>s.id,"getItemKey"),layout:{mode:"grid",columns:"auto",minCardWidth:"12rem",idealCardWidth:"16rem",gap:12},appearance:{hover:"none"}},ariaLabel:a,className:i,renderItem:s=>{let u=t===s.id;return jsxRuntime.jsxs("button",{type:"button","aria-pressed":o?u:void 0,onClick:o?()=>o(s):void 0,onKeyDown:c=>Yv(c,s,o),className:l("group w-full overflow-hidden rounded-lg border bg-card text-left text-card-foreground outline-hidden transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",u?"border-primary ring-1 ring-primary":"border-border/70 hover:border-primary/40",!o&&"cursor-default"),children:[jsxRuntime.jsx("span",{className:"block aspect-[4/3] overflow-hidden bg-muted",children:jsxRuntime.jsx("img",{src:s.url,alt:s.alt,loading:"lazy",className:"size-full object-cover transition-transform duration-200 group-hover:scale-[1.02] motion-reduce:transition-none"})}),jsxRuntime.jsxs("span",{className:"block p-3",children:[O(s.title)?jsxRuntime.jsx("span",{className:"block truncate text-sm font-semibold text-foreground",children:s.title}):null,O(s.description)?jsxRuntime.jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:s.description}):null,s.badges?.length?jsxRuntime.jsx("span",{className:"mt-2 flex flex-wrap gap-1.5",children:s.badges.map((c,d)=>jsxRuntime.jsx("span",{className:"rounded-full bg-secondary px-2 py-0.5 text-[0.625rem] text-secondary-foreground",children:c},`${s.id}:badge:${d}`))}):null]})]})}})}):O(n)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:n}):null}r(Jv,"WorkbenchAssetGallery");var tm={primary:"--radar-series-one",secondary:"--radar-series-two",accent:"--radar-series-three",muted:"--radar-series-four"},om={primary:"var(--primary)",secondary:"var(--secondary-foreground)",accent:"var(--accent-foreground)",muted:"var(--muted-foreground)"},Cn=r(e=>`hsl(var(${tm[e]}, ${om[e]}))`,"workbenchVisualizationToneColor"),ea=r((e,t)=>`hsl(var(${tm[e]}, ${om[e]}) / ${t})`,"workbenchVisualizationToneColorWithAlpha");var Zv={backgroundColor:"hsl(var(--radar-canvas, var(--background)))",color:"hsl(var(--foreground))"},nm={backgroundColor:"hsl(var(--radar-panel, var(--card)))",borderColor:"hsl(var(--radar-border, var(--border)))"};function rm({items:e,activeItemId:t,activeChildId:o,onItemSelect:n,onChildSelect:a,footer:i,ariaLabel:s="Radar navigation"}){return jsxRuntime.jsx(Er,{kind:"route",routeItems:e.map(u=>({...u,children:u.children?.map(c=>({...c,domProps:{"data-radar-navigation-child-id":c.id}}))})),activeItemId:t,activeChildId:o,onItemSelect:n?u=>n(u):void 0,onChildSelect:a?(u,c)=>a(u,c):void 0,footer:i,ariaLabel:s,dataComponent:"workbench-radar-navigation",widthMode:"fill",resizable:false,collapsible:false,appearance:{density:"default",surface:"outlined",activeVariant:"solid"},className:"min-w-0 self-stretch rounded-lg",classNames:{content:"p-3",list:"gap-2",item:"min-h-11 px-3 py-2 text-sm font-semibold",itemActive:"bg-primary text-primary-foreground shadow-[0_0_1.25rem_hsl(var(--primary)/0.28)]",childList:"ml-5 gap-0.5 border-l border-border/70 py-1 pl-3",childItem:"min-h-9 px-2 text-xs font-medium",childItemActive:"border-primary/40 bg-primary/15 text-primary",footer:"p-3"},style:nm})}r(rm,"WorkbenchRadarNavigation");function Qv({navigationItems:e=[],activeNavigationId:t,activeNavigationChildId:o,onNavigationSelect:n,onNavigationChildSelect:a,navigationFooter:i,navigation:s,children:u,inspector:c,inspectorLabel:d="Context controls",className:g,contentClassName:m,minimumHeight:p="calc(100dvh - 1rem)",ariaLabel:f="Radar workspace"}){return jsxRuntime.jsxs("section",{"data-monkeys-component":"workbench-radar-workspace","data-radar-active-navigation-id":t,"aria-label":f,className:l("grid min-w-0 gap-3 overflow-hidden p-3 lg:grid-cols-[12.5rem_minmax(0,1fr)] xl:grid-cols-[12.5rem_minmax(0,1fr)_20rem]",g),style:{...Zv,minHeight:p},children:[O(s)?s:jsxRuntime.jsx(rm,{items:e,activeItemId:t,activeChildId:o,onItemSelect:n,onChildSelect:a,footer:i}),jsxRuntime.jsx("div",{"data-radar-workspace-region":"content",className:l("relative min-h-[42rem] min-w-0 overflow-hidden rounded-lg border",m),style:{backgroundColor:"hsl(var(--radar-canvas, var(--background)))",borderColor:"hsl(var(--radar-shell-border, var(--border)))",boxShadow:"inset 0 0 0 1px hsl(var(--radar-grid, var(--border)) / 0.22)"},children:u}),O(c)?jsxRuntime.jsx("aside",{"aria-label":d,"data-radar-workspace-region":"inspector",className:"min-h-0 overflow-y-auto rounded-lg border lg:col-span-2 xl:col-span-1",style:nm,children:c}):null]})}r(Qv,"WorkbenchRadarWorkspace");function ek({title:e,icon:t,description:o,children:n,className:a}){return jsxRuntime.jsxs("section",{"data-monkeys-component":"workbench-radar-inspector-section",className:l("border-b border-border/70 p-4 last:border-b-0",a),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold text-primary",children:[O(t)?jsxRuntime.jsx("span",{"aria-hidden":"true",children:t}):null,jsxRuntime.jsx("h2",{children:e})]}),O(o)?jsxRuntime.jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground",children:o}):null,O(n)?jsxRuntime.jsx("div",{className:"mt-3",children:n}):null]})}r(ek,"WorkbenchRadarInspectorSection");function tk(e){let{disclosure:t,onSelect:o}=e;if(!t&&!o||t?.mode==="integrated"&&(!!o||e.selected!==void 0)||t?.mode==="separate"&&!o)throw new Error("Invalid WorkbenchRadarFilterRow props.")}r(tk,"assertValidRadarFilterRowProps");function ok(e){tk(e);let{label:t,value:o,icon:n,selected:a,disabled:i=false,tone:s,onSelect:u,disclosure:c,className:d}=e,g=a??false,m=g?void 0:"monkeys-workbench-radar-filter-row--idle",p=i?"monkeys-workbench-radar-filter-disabled":void 0,f=s??"primary",b=Cn(f),v={"--workbench-radar-filter-tone":b,"--tw-ring-color":s?b:"hsl(var(--ring))",...g||s?{backgroundColor:ea(f,g?.14:.08),borderColor:b}:{}},y=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[O(n)?jsxRuntime.jsx("span",{className:l("flex size-4 shrink-0 items-center justify-center",s?"text-[var(--workbench-radar-filter-tone)]":"text-muted-foreground"),"aria-hidden":"true",children:n}):null,jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:t}),O(o)?jsxRuntime.jsx("span",{className:"ml-auto shrink-0 tabular-nums text-muted-foreground",children:o}):null]}),x=c?jsxRuntime.jsx("span",{"aria-hidden":"true",className:l("text-lg leading-none transition-transform motion-reduce:transition-none",c.expanded&&"rotate-90"),children:"\u203A"}):null;if(c?.mode==="separate"){let k=c.expanded?c.collapseLabel:c.expandLabel;return jsxRuntime.jsxs("div",{"data-monkeys-component":"workbench-radar-filter-row",className:l("monkeys-workbench-radar-filter-row monkeys-workbench-radar-filter-row--separate",m,p,d),style:v,children:[jsxRuntime.jsx("button",{type:"button","aria-pressed":a,disabled:i,onClick:u,className:l("monkeys-workbench-radar-filter-control monkeys-workbench-radar-filter-row__action",p),children:y}),jsxRuntime.jsx("button",{type:"button","aria-expanded":c.expanded,"aria-controls":c.controls,"aria-label":k,disabled:i,onClick:c.onToggle,className:l("monkeys-workbench-radar-filter-row__disclosure",p),children:x})]})}let w=c?.mode==="integrated"?c:void 0,h=w?w.expanded?w.collapseLabel:w.expandLabel:void 0;return jsxRuntime.jsxs("button",{type:"button","data-monkeys-component":"workbench-radar-filter-row","aria-label":h,"aria-pressed":w?void 0:a,"aria-expanded":w?.expanded,"aria-controls":w?.controls,disabled:i,onClick:w?.onToggle??u,className:l("monkeys-workbench-radar-filter-control monkeys-workbench-radar-filter-row",m,p,d),style:v,children:[y,w?jsxRuntime.jsx("span",{className:"ml-auto shrink-0 text-muted-foreground",children:x}):null]})}r(ok,"WorkbenchRadarFilterRow");function nk({label:e,value:t,icon:o,selected:n=false,disabled:a=false,onSelect:i,className:s}){let u=!!i||a;return jsxRuntime.jsxs(u?"button":"div",{type:u?"button":void 0,"aria-pressed":i&&!a?n:void 0,disabled:u?a:void 0,onClick:i,className:l("flex min-w-0 items-center border text-xs font-semibold outline-hidden transition-colors focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none","monkeys-workbench-radar-filter-control rounded-md",n?"border-primary bg-primary/20 text-primary":"border-border bg-background/40 text-foreground hover:border-primary/60 hover:bg-primary/10",a&&"cursor-not-allowed opacity-50",s),children:[O(o)?jsxRuntime.jsx("span",{className:"shrink-0","aria-hidden":"true",children:o}):null,jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:e}),O(t)?jsxRuntime.jsx("span",{className:"ml-auto shrink-0 text-muted-foreground",children:t}):null]})}r(nk,"WorkbenchRadarFilterChip");var ak=r(e=>e.filter(Number.isFinite),"finiteValues"),wl=r((e,t,o)=>{let n=ak(e),a=Number.isFinite(t)?Number(t):Math.min(...n,0),i=Number.isFinite(o)?Number(o):Math.max(...n,1);return a===i?[a,i+1]:a<i?[a,i]:[i,a]},"getDomain"),an=r((e,t,o,n)=>o+(e-t[0])/(t[1]-t[0])*(n-o),"scale"),sn=r((e,t,o)=>Math.min(o,Math.max(t,e)),"clamp"),ik=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activatePoint"),sk={"low-high":{x:26,y:8,anchor:"start"},"high-high":{x:974,y:8,anchor:"end"},"low-low":{x:26,y:660,anchor:"start"},"high-low":{x:974,y:660,anchor:"end"}};function lk({points:e,xAxis:t,yAxis:o,thresholds:n,quadrants:a=[],legend:i=[],selectedPointId:s,onPointSelect:u,width:c=1e3,height:d=700,labelLimit:g=18,emptyState:m=null,ariaLabel:p=`${t.label} by ${o.label} radar matrix`,className:f}){let b=e.filter(R=>Number.isFinite(R.x)&&Number.isFinite(R.y));if(!b.length)return O(m)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:m}):null;let v=wl(b.map(R=>R.x),t.min,t.max),y=wl(b.map(R=>R.y),o.min,o.max),x=wl(b.map(R=>R.size??1)),w=0,h=c,k=0,C=d,T=sn(an(Number.isFinite(n?.x)?Number(n?.x):(v[0]+v[1])/2,v,w,h),w,h),S=sn(an(Number.isFinite(n?.y)?Number(n?.y):(y[0]+y[1])/2,y,C,k),k,C),I=new Set([...b].sort((R,W)=>(W.size??0)-(R.size??0)).slice(0,g).map(R=>R.id));return jsxRuntime.jsxs("div",{"data-monkeys-component":"workbench-radar-matrix",className:l("relative size-full min-h-[42rem] min-w-0 overflow-hidden",f),style:{backgroundColor:"hsl(var(--radar-canvas, var(--background)))",backgroundImage:"radial-gradient(circle at 78% 20%, hsl(var(--primary) / 0.08), transparent 32%), radial-gradient(circle at 18% 82%, hsl(var(--radar-series-two, var(--accent-foreground)) / 0.06), transparent 30%)"},children:[jsxRuntime.jsxs("svg",{viewBox:`0 0 ${c} ${d}`,preserveAspectRatio:"none",className:"absolute inset-0 size-full",role:"img","aria-label":p,children:[jsxRuntime.jsxs("g",{"aria-hidden":"true",children:[Array.from({length:13},(R,W)=>{let H=c/12*W,L=d/12*W;return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:H,y1:0,x2:H,y2:d,style:{stroke:"hsl(var(--radar-grid, var(--border)) / 0.36)"}}),jsxRuntime.jsx("line",{x1:0,y1:L,x2:c,y2:L,style:{stroke:"hsl(var(--radar-grid, var(--border)) / 0.36)"}})]},W)}),jsxRuntime.jsx("line",{x1:T,y1:0,x2:T,y2:d,strokeWidth:"1.5",style:{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.64)"}}),jsxRuntime.jsx("line",{x1:0,y1:S,x2:c,y2:S,strokeWidth:"1.5",style:{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.64)"}})]}),a.map(R=>{let W=sk[R.id];return jsxRuntime.jsxs("g",{"aria-hidden":"true",children:[jsxRuntime.jsx("text",{x:W.x,y:W.y+20,textAnchor:W.anchor,className:"fill-muted-foreground text-[0.8125rem] font-semibold",children:R.title}),O(R.description)&&typeof R.description=="string"?jsxRuntime.jsx("text",{x:W.x,y:W.y+40,textAnchor:W.anchor,className:"fill-muted-foreground text-[0.6875rem]",children:R.description}):null]},R.id)}),b.map((R,W)=>{let H=sn(an(R.x,v,40,c-40),40,c-40),L=sn(an(R.y,y,d-48,54),54,d-48),F=R.tone||(W%2===0?"primary":"accent"),$=s===R.id,M=I.has(R.id),G=M?sn(an(R.size??1,x,5,9),5,9):3.5,Y=M?sn(an(R.size??1,x,14,31),14,31):0,N={fill:Cn(F),stroke:"hsl(var(--foreground) / 0.74)"},D={fill:Cn(F),filter:`drop-shadow(0 0 0.65rem ${ea(F,.72)})`};return jsxRuntime.jsxs("g",{transform:`translate(${H}, ${L})`,role:u?"button":void 0,tabIndex:u?0:void 0,"aria-label":`${R.label}: ${t.label} ${R.x}, ${o.label} ${R.y}`,"aria-pressed":u?$:void 0,onClick:u?()=>u(R):void 0,onKeyDown:B=>ik(B,R,u),className:l(u&&"cursor-pointer outline-hidden"),children:[$?jsxRuntime.jsx("circle",{r:G+10,fill:"none",strokeWidth:"2",style:{stroke:ea(F,.48)}}):null,jsxRuntime.jsx("circle",{r:G,strokeWidth:"1.25",style:N}),M?jsxRuntime.jsx("text",{y:-G-8,textAnchor:"middle",fontSize:Y,fontWeight:"700",style:D,className:"pointer-events-none",children:R.label.slice(0,22)}):null,jsxRuntime.jsx("title",{children:R.description||R.label})]},R.id)}),jsxRuntime.jsx("circle",{cx:T,cy:S,r:"10",style:{fill:"hsl(var(--radar-axis, var(--primary)))"}}),jsxRuntime.jsx("circle",{cx:T,cy:S,r:"3",className:"fill-primary-foreground"}),jsxRuntime.jsx("text",{x:c/2,y:d-12,textAnchor:"middle",className:"fill-muted-foreground text-[0.6875rem]",children:t.label}),jsxRuntime.jsx("text",{x:"14",y:d/2,textAnchor:"middle",transform:`rotate(-90 14 ${d/2})`,className:"fill-muted-foreground text-[0.6875rem]",children:o.label})]}),jsxRuntime.jsxs("div",{className:"absolute bottom-4 left-4 hidden w-44 overflow-hidden rounded-[var(--radius)] border bg-card/95 shadow-xl sm:block",style:{borderColor:"hsl(var(--radar-border, var(--border)))"},"aria-hidden":"true",children:[jsxRuntime.jsxs("div",{className:"flex h-9 items-center justify-between border-b border-border px-3 text-xs font-semibold text-muted-foreground",children:[jsxRuntime.jsx("span",{children:"\u2212"}),jsxRuntime.jsx("span",{children:"100%"}),jsxRuntime.jsx("span",{children:"\uFF0B"})]}),jsxRuntime.jsxs("svg",{viewBox:`0 0 ${c} ${d}`,className:"h-24 w-full",children:[jsxRuntime.jsx("rect",{width:c,height:d,style:{fill:"hsl(var(--radar-canvas, var(--background)))"}}),jsxRuntime.jsx("line",{x1:T,y1:0,x2:T,y2:d,style:{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.7)"},strokeWidth:"6"}),jsxRuntime.jsx("line",{x1:0,y1:S,x2:c,y2:S,style:{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.7)"},strokeWidth:"6"}),b.map((R,W)=>jsxRuntime.jsx("circle",{cx:sn(an(R.x,v,40,c-40),40,c-40),cy:sn(an(R.y,y,d-48,54),54,d-48),r:"8",style:{fill:Cn(R.tone||(W%2===0?"primary":"accent"))}},R.id)),jsxRuntime.jsx("rect",{x:c*.22,y:d*.12,width:c*.58,height:d*.62,fill:"none",strokeWidth:"8",style:{stroke:"hsl(var(--primary))"}})]})]}),i.length?jsxRuntime.jsx("div",{className:"absolute bottom-4 left-1/2 hidden -translate-x-1/2 items-center gap-4 rounded-full border border-border bg-card/95 px-4 py-2 text-xs font-semibold shadow-xl md:flex",children:i.map(R=>{let W=R.tone||"muted";return jsxRuntime.jsxs("span",{className:"flex items-center gap-2 text-muted-foreground",children:[jsxRuntime.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:Cn(W)}}),R.label]},R.id)})}):null]})}r(lk,"WorkbenchRadarMatrix");var im=2048,Sl=2*1024*1024,Tl=class Tl extends Error{constructor(o,n,a){super(o);this.code=o;this.expectedSequence=n;this.receivedSequence=a;this.name="RuntimeTerminalOutputError";}};r(Tl,"RuntimeTerminalOutputError");var ta=Tl;function lm(e,t){let o=r((m,p)=>{throw new ta(m,e.highWater+1,p)},"fail");if(!Array.isArray(t))return o("invalid-frame");if(t.length>im)return o("output-budget-exceeded");let n=new Map(e.frames.map(m=>[m.sequence,m])),a=[],i=e.highWater,s,u=0;for(let m of t){if(!m||!Number.isSafeInteger(m.sequence)||m.sequence<1||typeof m.data!="string")return o("invalid-frame");if(s!==void 0&&m.sequence===s)return o("duplicate-sequence",m.sequence);if(s!==void 0&&m.sequence!==s+1)return o("sequence-gap",m.sequence);if(s=m.sequence,m.data.length>Sl)return o("output-budget-exceeded",m.sequence);let p=new TextEncoder().encode(m.data).byteLength;if(u+=p,u>Sl)return o("output-budget-exceeded",m.sequence);if(m.sequence<=i){let f=n.get(m.sequence);if(!f)return o("history-expired",m.sequence);if(f.data!==m.data)return o("sequence-conflict",m.sequence)}else {if(m.sequence!==i+1)return o("sequence-gap",m.sequence);i=m.sequence,a.push({sequence:m.sequence,data:m.data,bytes:p});}}let c=[...e.frames,...a],d=e.bytes+a.reduce((m,p)=>m+p.bytes,0),g=0;for(;c.length-g>im||d>Sl;)d-=c[g++].bytes;return {history:{highWater:i,bytes:d,frames:c.slice(g)},append:a.map(({sequence:m,data:p})=>({sequence:m,data:p}))}}r(lm,"prepareRuntimeTerminalOutput");function ck(e){let t=lt.useRef(null),o=lt.useRef(e);o.current=e;let n=lt.useRef();return lt.useEffect(()=>{let a=e.sessionKey,i=t.current;if(!i||!a)return;let s=true,u,c,d=[],g=false,m=r(()=>{g||(g=true,c?.disconnect(),d.forEach(v=>v.dispose()),u?.dispose());},"cleanup"),p={highWater:0,bytes:0,frames:[]},f=r(()=>s&&o.current.sessionKey===a,"current"),b=r(v=>{if(!f())return;let y=v instanceof ta?v:new ta("load-failed",p.highWater+1);o.current.onOutputError?.({sessionKey:a,code:y.code,expectedSequence:y.expectedSequence,...y.receivedSequence===void 0?{}:{receivedSequence:y.receivedSequence}});},"report");return Promise.all([import('@xterm/xterm'),import('@xterm/addon-fit'),import('@xterm/addon-web-links')]).then(([{Terminal:v},{FitAddon:y},{WebLinksAddon:x}])=>{if(!f())return;let w=r((S,I)=>{let R=eo(I,"link");f()&&R&&/^https?:\/\//i.test(R)&&window.open(R,"_blank","noopener,noreferrer");},"openLink"),h=new v({linkHandler:{activate:w},cursorBlink:true,disableStdin:o.current.disabled===true,fontSize:13,fontFamily:'"JetBrains Mono", Menlo, Monaco, "Courier New", monospace'});u=h;let k=new y;h.loadAddon(k),h.loadAddon(new x(w)),h.open(i);let C=r(()=>{if(!f())return;k.fit();let S=k.proposeDimensions();S&&Number.isInteger(S.cols)&&Number.isInteger(S.rows)&&S.cols>0&&S.rows>0&&o.current.onResize?.({sessionKey:a,columns:S.cols,rows:S.rows});},"resize");d.push(h.onData(S=>{f()&&!o.current.disabled&&o.current.onInput?.({sessionKey:a,data:S});}));let T=r(S=>{if(f())try{let I=lm(p,S);I.append.length&&h.write(I.append.map(R=>R.data).join("")),p=I.history;}catch(I){b(I);}},"write");n.current={sessionKey:a,terminal:h,write:T},C(),typeof ResizeObserver<"u"&&(c=new ResizeObserver(C),c.observe(i)),T(o.current.output);}).catch(v=>{m(),u&&n.current?.terminal===u&&(n.current=void 0),b(v);}),()=>{s=false,m(),u&&n.current?.terminal===u&&(n.current=void 0);}},[e.sessionKey]),lt.useEffect(()=>{let a=n.current;a?.sessionKey===e.sessionKey&&(a.terminal.options.disableStdin=e.disabled===true,a.write(e.output));},[e.sessionKey,e.output,e.disabled]),jsxRuntime.jsxs("div",{className:e.className,style:e.style,children:[jsxRuntime.jsx("div",{role:"status",children:e.statusLabel}),jsxRuntime.jsx("div",{ref:t,className:"h-full min-h-48 w-full rounded-2xl"})]})}r(ck,"RuntimeTerminalView");var mk={operationFailed:{en:"The file operation failed. Review the input and try again.",zh:"\u6587\u4EF6\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u8F93\u5165\u540E\u91CD\u8BD5\u3002"},apply:{en:"Apply",zh:"\u5E94\u7528"},cancel:{en:"Cancel",zh:"\u53D6\u6D88"},compact:{en:"Compact",zh:"\u7D27\u51D1"},confirm:{en:"Confirm",zh:"\u786E\u8BA4"},confirmAction:{en:"Confirm file action",zh:"\u786E\u8BA4\u6587\u4EF6\u64CD\u4F5C"},create:{en:"Create",zh:"\u65B0\u5EFA"},delete:{en:"Delete",zh:"\u5220\u9664"},detailed:{en:"Detailed",zh:"\u8BE6\u7EC6"},diff:{en:"Diff",zh:"\u5DEE\u5F02"},directory:{en:"Directory",zh:"\u6587\u4EF6\u5939"},discardReload:{en:"Discard draft and reload",zh:"\u653E\u5F03\u4FEE\u6539\u5E76\u91CD\u65B0\u52A0\u8F7D"},download:{en:"Download",zh:"\u4E0B\u8F7D"},file:{en:"File",zh:"\u6587\u4EF6"},actions:{en:"File actions",zh:"\u6587\u4EF6\u64CD\u4F5C"},files:{en:"Files",zh:"\u6587\u4EF6"},kind:{en:"Kind",zh:"\u7C7B\u578B"},loadingDiff:{en:"Loading diff",zh:"\u6B63\u5728\u52A0\u8F7D\u5DEE\u5F02"},path:{en:"Path",zh:"\u8DEF\u5F84"},refresh:{en:"Refresh",zh:"\u5237\u65B0"},rename:{en:"Rename",zh:"\u91CD\u547D\u540D"},save:{en:"Save",zh:"\u4FDD\u5B58"},search:{en:"Search",zh:"\u641C\u7D22"},searchFiles:{en:"Search files",zh:"\u641C\u7D22\u6587\u4EF6"},simple:{en:"Simple",zh:"\u7B80\u6D01"},sourceControl:{en:"Source control",zh:"\u6E90\u4EE3\u7801\u7BA1\u7406"},viewMode:{en:"View mode",zh:"\u663E\u793A\u65B9\u5F0F"},binaryUnavailable:{en:"Binary file cannot be previewed.",zh:"\u65E0\u6CD5\u9884\u89C8\u4E8C\u8FDB\u5236\u6587\u4EF6\u3002"},diffTooLarge:{en:"Diff exceeds text editor limit.",zh:"\u5DEE\u5F02\u5185\u5BB9\u8D85\u8FC7\u7F16\u8F91\u5668\u5927\u5C0F\u9650\u5236\u3002"},diffUnavailable:{en:"Diff is unavailable.",zh:"\u6682\u65F6\u65E0\u6CD5\u67E5\u770B\u5DEE\u5F02\u3002"},changedExternally:{en:"File changed externally; your draft is preserved.",zh:"\u6587\u4EF6\u5DF2\u88AB\u5916\u90E8\u4FEE\u6539\uFF1B\u4F60\u7684\u8349\u7A3F\u5DF2\u4FDD\u7559\u3002"},tooLarge:{en:"File exceeds text editor limit.",zh:"\u6587\u4EF6\u8D85\u8FC7\u7F16\u8F91\u5668\u5927\u5C0F\u9650\u5236\u3002"},imageUnavailable:{en:"Image preview is unavailable.",zh:"\u6682\u65F6\u65E0\u6CD5\u9884\u89C8\u56FE\u7247\u3002"},tooManyExpanded:{en:"Too many expanded paths.",zh:"\u5C55\u5F00\u7684\u8DEF\u5F84\u6570\u91CF\u8FC7\u591A\u3002"},deleteConfirm:{en:"Delete the selected item?",zh:"\u5220\u9664\u6240\u9009\u9879\u76EE\uFF1F"},discardConfirm:{en:"Discard unsaved changes?",zh:"\u653E\u5F03\u672A\u4FDD\u5B58\u7684\u4FEE\u6539\uFF1F"},name:{en:"Name",zh:"\u540D\u79F0"},size:{en:"Size",zh:"\u5927\u5C0F"},modified:{en:"Modified",zh:"\u4FEE\u6539\u65F6\u95F4"},permissions:{en:"Permissions",zh:"\u6743\u9650"},type:{en:"Type",zh:"\u7C7B\u578B"},empty:{en:"Select a file to view or edit its contents.",zh:"\u9009\u62E9\u6587\u4EF6\u4EE5\u67E5\u770B\u6216\u7F16\u8F91\u5185\u5BB9\u3002"},emptyTree:{en:"No matching files.",zh:"\u6CA1\u6709\u5339\u914D\u7684\u6587\u4EF6\u3002"},renameItem:{en:"Rename {name}",zh:"\u91CD\u547D\u540D {name}"},deleteItem:{en:"Delete {name}",zh:"\u5220\u9664 {name}"},downloadItem:{en:"Download {name}",zh:"\u4E0B\u8F7D {name}"}};function dm(e){let{locale:t}=xt();return (o,n)=>{let a=`monkeys.design.runtimeFiles.${o}`,i=e?.(a);return (i&&i!==a?i:mk[o][t.toLowerCase().startsWith("zh")?"zh":"en"]).replace(/\{([A-Za-z]+)\}/g,(u,c)=>n?.[c]??u)}}r(dm,"useRuntimeFileCopy");var na=r(e=>new TextEncoder().encode(e).byteLength,"bytes"),Li=r(e=>({...e,value:e.content}),"fromFile");function xk(e){return jsxRuntime.jsx(vk,{...e},JSON.stringify([e.model.scopeId]))}r(xk,"RuntimeFileExplorer");function vk(e){let{model:t,onIntent:o,renderEditor:n,renderPreview:a,renderDiff:i,onDraftStateChange:s,translate:u}=e,{locale:c}=xt(),d=dm(u);if(t.openFile&&t.preview)throw new TypeError("openFile and preview are mutually exclusive.");if(t.preview?.kind==="image"&&t.preview.src!==void 0==(t.preview.contentBase64!==void 0))throw new TypeError("Image requires exactly one of src and contentBase64.");let g=lt.useRef(true);lt.useEffect(()=>(g.current=true,()=>{g.current=false;}),[]);let[m,p]=lt.useState(false),[f,b]=lt.useState(t.search??""),[v,y]=lt.useState(false);lt.useEffect(()=>b(t.search??""),[t.search]),lt.useEffect(()=>{if(typeof window.matchMedia!="function")return;let z=window.matchMedia("(max-width: 767px)"),X=r(()=>p(z.matches),"update");return X(),z.addEventListener("change",X),()=>z.removeEventListener("change",X)},[]);let[x,w]=lt.useState(()=>t.openFile?Li(t.openFile):null),[h,k]=lt.useState(null),[C,T]=lt.useState(false),[S,I]=lt.useState(""),[R,W]=lt.useState(null),[H,L]=lt.useState(""),[F,$]=lt.useState("file"),M=lt.useRef(null),G=lt.useRef(null),Y=x!==null&&x.value!==x.content,N=Number.isSafeInteger(t.maxTextBytes)&&t.maxTextBytes>0?Math.min(t.maxTextBytes,1024*1024):1024*1024,D=x!==null&&na(x.value)>N,B=t.disabled===true||t.saving===true,K=x?.readOnly===true||t.openFile?.path===x?.path&&t.openFile?.readOnly===true,J=lt.useRef({blocked:B,draft:x,readOnly:K,conflict:C,tooLarge:D});J.current={blocked:B,draft:x,readOnly:K,conflict:C,tooLarge:D};let V=t.preview?.path,Q=t.activeView==="diff",j=t.diff?.path??x?.path??t.selectedPath??"";lt.useEffect(()=>{if(Q||t.preview){let ie=Q?`diff:${j}`:V;if(Y&&G.current!==ie){T(true);return}x&&w(null),M.current=null,G.current=null,T(false);return}let z=t.openFile;if(!z){Y?T(true):(w(null),T(false));return}if(!x||z.path!==x.path){if(Y&&G.current!==z.path){T(true);return}G.current=null,M.current=null,w(Li(z)),T(false);return}if(z.revision===x.revision&&z.content===x.content)return;let X=M.current;if(X&&X.path===z.path&&z.revision!==X.revision&&z.content===X.content){w({...z,value:x.value}),M.current=null,T(false);return}if(Y){T(true);return}w(Li(z)),T(false);},[t.openFile?.path,t.openFile?.revision,t.openFile?.content,t.preview,Q,t.diff?.identity]),lt.useEffect(()=>{if(!Y)return;let z=r(X=>{X.preventDefault(),X.returnValue="";},"beforeUnload");return window.addEventListener("beforeunload",z),()=>window.removeEventListener("beforeunload",z)},[Y]);let Z=lt.useRef(s);Z.current=s,lt.useEffect(()=>{Z.current?.({path:x?.path??null,revision:x?.revision??null,dirty:Y});},[x?.path,x?.revision,Y]);let te=r(z=>{if(g.current){switch(z.type){case "select":if(e.onSelect)return e.onSelect(z);break;case "expand":if(e.onExpand)return e.onExpand(z);break;case "view-mode":if(e.onViewMode)return e.onViewMode(z);break;case "search":if(e.onSearch)return e.onSearch(z);break;case "edit":if(e.onEdit)return e.onEdit(z);break;case "save":if(e.onSave)return e.onSave(z);break;case "create":if(e.onCreate)return e.onCreate(z);break;case "rename":if(e.onRename)return e.onRename(z);break;case "delete":if(e.onDelete)return e.onDelete(z);break;case "download":if(e.onDownload)return e.onDownload(z);break;case "open-diff":if(e.onOpenDiff)return e.onOpenDiff(z);break;case "refresh":if(e.onRefresh)return e.onRefresh(z);break;case "sourcecontrol":if(e.onSourceControl)return e.onSourceControl(z);break}o?.(z);}},"route"),ae=r(z=>{if(!(B||!g.current)){if(z.type==="delete"||Y&&(z.type==="sourcecontrol"||z.type==="open-diff"||z.type==="select"&&z.path!==x?.path)){k(z);return}te(z);}},"send"),le=r(z=>{!g.current||J.current.draft!==x||!x||B||J.current.blocked||J.current.readOnly||J.current.conflict||K||C||na(z)>N||(w({...x,value:z}),te({type:"edit",path:x.path,expectedRevision:x.revision,content:z}));},"change"),A=r(()=>{!g.current||J.current.draft!==x||!x||B||J.current.blocked||J.current.readOnly||J.current.conflict||J.current.tooLarge||K||C||D||!Y||(M.current={path:x.path,revision:x.revision,content:x.value},te({type:"save",path:x.path,expectedRevision:x.revision,content:x.value}));},"save"),me=t.viewMode==="detailed"&&m?"compact":t.viewMode??"simple",P=new Set(t.expandedPaths??(()=>{let z=[],X=r(ie=>{for(let q of ie)q.expanded&&z.push(q.path),q.children&&X(q.children);},"visit");return X(t.nodes),z})()),_=(t.search??"").trim().toLocaleLowerCase(c),re=r(z=>z.flatMap(X=>{let ie=X.children?re(X.children):void 0;return !_||X.name.toLocaleLowerCase(c).includes(_)||X.path.toLocaleLowerCase(c).includes(_)||ie?.length?[{...X,children:ie}]:[]}),"filterTree"),fe=re(t.nodes),ye=r(z=>{let X=new Set(P);if(X.has(z.path)?X.delete(z.path):X.add(z.path),X.size>1e4||na(JSON.stringify([...X]))>1024*1024){y(true);return}y(false),ae({type:"expand",path:z.path,expandedPaths:[...X]});},"toggle"),xe=r(z=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{children:Number.isSafeInteger(z.size)&&z.size>=0?new Intl.NumberFormat(c).format(z.size):"\u2014"}),jsxRuntime.jsx("span",{children:z.modified?Di(z.modified,"milliseconds",c):"\u2014"}),jsxRuntime.jsx("span",{children:z.permissionsRwx??"\u2014"}),jsxRuntime.jsx("span",{children:z.mimeType??"\u2014"})]}),"metadata"),oe=r(z=>jsxRuntime.jsx("ul",{className:"space-y-1",children:z.map(X=>jsxRuntime.jsxs("li",{children:[jsxRuntime.jsxs("div",{className:me==="detailed"?"grid min-w-[44rem] grid-cols-[minmax(10rem,1fr)_6rem_10rem_6rem_8rem_auto] items-center gap-2":"flex min-w-0 items-center gap-2",children:[jsxRuntime.jsxs(ve,{className:"min-w-0 flex-1 justify-start truncate border-transparent",classNames:{label:"min-w-0 truncate"},icon:X.type==="directory"?P.has(X.path)?jsxRuntime.jsx(lucideReact.ChevronDown,{size:14}):jsxRuntime.jsx(lucideReact.ChevronRight,{size:14}):jsxRuntime.jsx(lucideReact.FileText,{size:14}),tone:t.selectedPath===X.path?"primary":"muted",size:"sm",type:"button",disabled:B||X.loading,"aria-current":t.selectedPath===X.path?"true":void 0,"aria-expanded":X.type==="directory"?P.has(X.path):void 0,onClick:()=>X.type==="directory"?ye(X):ae({type:"select",path:X.path}),children:[X.name,X.loading?"\u2026":""]}),me==="detailed"?xe(X):me==="compact"&&X.type==="file"?jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:X.mimeType??""}):null,jsxRuntime.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[jsxRuntime.jsx(ve,{size:"sm",tone:"muted","aria-label":d("renameItem",{name:X.name}),disabled:B||Y,onClick:()=>{L(X.path),I(X.path),W("rename");},children:jsxRuntime.jsx(lucideReact.Pencil,{size:12})}),jsxRuntime.jsx(ve,{size:"sm",tone:"muted","aria-label":d("downloadItem",{name:X.name}),disabled:B,onClick:()=>ae({type:"download",path:X.path,kind:X.type}),children:jsxRuntime.jsx(lucideReact.Download,{size:12})}),jsxRuntime.jsx(ve,{size:"sm",tone:"muted","aria-label":d("deleteItem",{name:X.name}),disabled:B||K,onClick:()=>ae({type:"delete",path:X.path,kind:X.type}),children:jsxRuntime.jsx(lucideReact.Trash2,{size:12})})]})]}),(P.has(X.path)||_)&&X.children?jsxRuntime.jsx("div",{className:"ml-3 border-l border-border pl-2",children:oe(X.children)}):null]},X.path))}),"tree"),se=x?.path??t.preview?.path??t.openFile?.path,Re=Q&&!x,Ie=!x&&!Re?t.preview:null,ze=t.diff,ce=ze?na(ze.original)>1024*1024||na(ze.modified)>1024*1024:false,U=r(()=>Re?t.diffStatus==="loading"?jsxRuntime.jsx("p",{role:"status",children:d("loadingDiff")}):t.diffStatus==="error"?jsxRuntime.jsx("p",{role:"alert",children:d(t.diffErrorCode==="declarative.runtimeFiles.diffTooLarge"?"diffTooLarge":"diffUnavailable")}):ce?jsxRuntime.jsx("p",{role:"status",children:d("diffTooLarge")}):!ze||ze.isBinary||!i?jsxRuntime.jsx("p",{role:"status",children:d("diffUnavailable")}):i({...ze,readOnly:true}):Ie?Ie.kind==="binary"?jsxRuntime.jsx("p",{role:"status",children:d("binaryUnavailable")}):Ie.kind==="too-large"?jsxRuntime.jsx("p",{role:"status",children:d("tooLarge")}):Ie.kind==="image"?a?a(Ie):jsxRuntime.jsx(qd,{kind:"image",src:Ie.src,alt:Ie.alt??Ie.path,empty:d("imageUnavailable"),error:d("imageUnavailable")}):null:D?jsxRuntime.jsx("div",{role:"status",children:d("tooLarge")}):x?n?n({path:x.path,value:x.value,language:x.language,readOnly:B||K||C,onChange:le,onSave:A}):jsxRuntime.jsx(Rr,{"aria-label":x.path,value:x.value,readOnly:B||K||C,onChange:z=>le(z.currentTarget.value),onKeyDown:z=>{(z.ctrlKey||z.metaKey)&&z.key.toLowerCase()==="s"&&(z.preventDefault(),A());}}):jsxRuntime.jsx("div",{className:"flex min-h-64 items-center justify-center p-6 text-sm text-muted-foreground",children:d("empty")}),"renderContent");return jsxRuntime.jsxs("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden rounded-md border border-border bg-background","data-monkeys-component":"runtime-file-explorer","data-view-mode":me,children:[jsxRuntime.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b border-border p-3",children:[t.viewMode!==void 0?jsxRuntime.jsxs(po,{"aria-label":d("viewMode"),value:t.viewMode,disabled:B,onChange:z=>{let X=z.currentTarget.value;(X==="simple"||X==="compact"||X==="detailed")&&ae({type:"view-mode",value:X});},children:[jsxRuntime.jsx("option",{value:"simple",children:d("simple")}),jsxRuntime.jsx("option",{value:"compact",children:d("compact")}),jsxRuntime.jsx("option",{value:"detailed",children:d("detailed")})]}):null,t.search!==void 0?jsxRuntime.jsxs("form",{className:"flex min-w-0 flex-1 items-center gap-2",onSubmit:z=>{z.preventDefault(),ae({type:"search",value:f});},children:[jsxRuntime.jsx(to,{className:"min-w-0 flex-1","aria-label":d("searchFiles"),value:f,disabled:B,onChange:z=>b(z.currentTarget.value)}),jsxRuntime.jsx(ve,{type:"submit",disabled:B,children:d("search")})]}):null]}),v?jsxRuntime.jsx("p",{className:"p-3 text-sm text-destructive-text",role:"alert",children:d("tooManyExpanded")}):null,t.errorCode?jsxRuntime.jsx("p",{className:"p-3 text-sm text-destructive-text",role:"alert",children:d("operationFailed")}):null,jsxRuntime.jsxs("div",{className:me==="detailed"?"grid min-h-0 flex-1 grid-cols-1":"grid min-h-0 flex-1 grid-cols-1 md:grid-cols-[minmax(16rem,24rem)_minmax(0,1fr)]",children:[jsxRuntime.jsxs("nav",{className:me==="detailed"?"max-h-80 min-w-0 overflow-auto border-b border-border p-2":"max-h-80 min-w-0 overflow-auto border-b border-border p-2 md:max-h-none md:border-b-0 md:border-r","aria-label":d("files"),children:[me==="detailed"?jsxRuntime.jsx("div",{className:"grid min-w-[44rem] grid-cols-[minmax(10rem,1fr)_6rem_10rem_6rem_8rem_auto] gap-2 text-xs text-muted-foreground",children:["name","size","modified","permissions","type","actions"].map(z=>jsxRuntime.jsx("span",{children:d(z)},z))}):null,fe.length?oe(fe):jsxRuntime.jsx("p",{className:"p-3 text-sm text-muted-foreground",children:d("emptyTree")})]}),jsxRuntime.jsxs("div",{className:"flex min-h-0 min-w-0 flex-col",children:[jsxRuntime.jsxs("div",{className:"flex flex-wrap items-center gap-1 border-b border-border p-2",role:"toolbar","aria-label":d("actions"),children:[jsxRuntime.jsx(ve,{disabled:B,onClick:()=>ae({type:"refresh"}),children:d("refresh")}),jsxRuntime.jsx(ve,{disabled:B,onClick:()=>ae({type:"sourcecontrol"}),children:d("sourceControl")}),jsxRuntime.jsx(ve,{disabled:B,onClick:()=>{W("create"),I("");},children:d("create")}),jsxRuntime.jsx(ve,{disabled:B||!x||K||Y,onClick:()=>{L(x?.path??""),W("rename"),I(x?.path??"");},children:d("rename")}),jsxRuntime.jsx(ve,{disabled:B||!x||K,onClick:()=>x&&ae({type:"delete",path:x.path,kind:"file"}),children:d("delete")}),jsxRuntime.jsx(ve,{disabled:B||!se,onClick:()=>se&&ae({type:"download",path:se,kind:"file"}),children:d("download")}),jsxRuntime.jsx(ve,{disabled:B||!se,onClick:()=>se&&ae({type:"open-diff",path:se}),children:d("diff")}),jsxRuntime.jsx(ve,{disabled:B||!Y||!x||K||C||D,onClick:A,children:d("save")})]}),R?jsxRuntime.jsxs("form",{className:"flex flex-wrap items-center gap-2 border-b border-border p-3",onSubmit:async z=>{if(z.preventDefault(),!(B||!S.trim()||R==="rename"&&(K||Y)))try{R==="rename"?await te({type:"rename",path:H,newPath:S.trim()}):await te({type:"create",path:S.trim(),kind:F}),W(null);}catch{}},children:[R==="create"?jsxRuntime.jsxs(po,{"aria-label":d("kind"),value:F,disabled:B,onChange:z=>$(z.currentTarget.value==="directory"?"directory":"file"),children:[jsxRuntime.jsx("option",{value:"file",children:d("file")}),jsxRuntime.jsx("option",{value:"directory",children:d("directory")})]}):null,jsxRuntime.jsx(to,{"aria-label":d("path"),value:S,disabled:B,onChange:z=>I(z.currentTarget.value)}),jsxRuntime.jsx(ve,{type:"submit",disabled:B||!S.trim(),children:d("apply")}),jsxRuntime.jsx(ve,{type:"button",onClick:()=>W(null),children:d("cancel")})]}):null,C?jsxRuntime.jsxs("div",{role:"alert",children:[d("changedExternally"),jsxRuntime.jsx(ve,{disabled:B,onClick:()=>k(Q?{type:"open-diff",path:j}:{type:"select",path:t.preview?.path??t.openFile?.path??x?.path??""}),children:d("discardReload")})]}):null,jsxRuntime.jsx("div",{className:"min-h-80 min-w-0 flex-1 overflow-auto",children:U()})]})]}),h?jsxRuntime.jsx(Ta,{open:true,onOpenChange:z=>{!z&&!B&&k(null);},children:jsxRuntime.jsxs(mn,{onEscapeKeyDown:z=>{B&&z.preventDefault();},onPointerDownOutside:z=>{B&&z.preventDefault();},children:[jsxRuntime.jsx(br,{children:d("confirmAction")}),t.errorCode?jsxRuntime.jsx("p",{role:"alert",children:d("operationFailed")}):null,jsxRuntime.jsx(fr,{children:d(h.type==="delete"?"deleteConfirm":"discardConfirm")}),jsxRuntime.jsx(ve,{disabled:B||h.type==="delete"&&K,onClick:async()=>{if(!(B||h.type==="delete"&&K)){h.type==="open-diff"&&(G.current=`diff:${h.path}`,Q&&h.path===j&&(w(null),T(false),G.current=null)),h.type==="select"&&(G.current=h.path,t.preview?.path===h.path?(w(null),T(false),G.current=null):t.openFile?.path===h.path&&(w(Li(t.openFile)),T(false),G.current=null));try{await te(h),k(null);}catch{}}},children:d("confirm")}),jsxRuntime.jsx(ve,{disabled:B,onClick:()=>k(null),children:d("cancel")})]})}):null]})}r(vk,"RuntimeFileExplorerSession");var E=Object.freeze({numericSeries:Object.freeze({inspect:"monkeys.design.capability.numericSeries.inspect",noPoints:"monkeys.design.capability.numericSeries.noPoints",point:"monkeys.design.capability.numericSeries.point",label:"monkeys.design.capability.numericSeries.label",description:"monkeys.design.capability.numericSeries.description",start:"monkeys.design.capability.numericSeries.start",end:"monkeys.design.capability.numericSeries.end",reset:"monkeys.design.capability.numericSeries.reset",expand:"monkeys.design.capability.numericSeries.expand",close:"monkeys.design.capability.numericSeries.close"}),catalog:Object.freeze({shellLayout:Object.freeze({label:"monkeys.design.catalog.shellLayout.label",description:"monkeys.design.catalog.shellLayout.description"}),sidebarFilter:Object.freeze({label:"monkeys.design.catalog.sidebarFilter.label",description:"monkeys.design.catalog.sidebarFilter.description"}),ontologyNavigator:Object.freeze({label:"monkeys.design.catalog.ontologyNavigator.label",description:"monkeys.design.catalog.ontologyNavigator.description"}),dataToolbar:Object.freeze({label:"monkeys.design.catalog.dataToolbar.label",description:"monkeys.design.catalog.dataToolbar.description"}),ontologyTable:Object.freeze({label:"monkeys.design.catalog.ontologyTable.label",description:"monkeys.design.catalog.ontologyTable.description"}),cardGrid:Object.freeze({label:"monkeys.design.catalog.cardGrid.label",description:"monkeys.design.catalog.cardGrid.description"}),pagination:Object.freeze({label:"monkeys.design.catalog.pagination.label",description:"monkeys.design.catalog.pagination.description"}),recordDetail:Object.freeze({label:"monkeys.design.catalog.recordDetail.label",description:"monkeys.design.catalog.recordDetail.description"}),recordEditor:Object.freeze({label:"monkeys.design.catalog.recordEditor.label",description:"monkeys.design.catalog.recordEditor.description"}),recordHistory:Object.freeze({label:"monkeys.design.catalog.recordHistory.label",description:"monkeys.design.catalog.recordHistory.description"}),ontologyManagement:Object.freeze({label:"monkeys.design.catalog.ontologyManagement.label",description:"monkeys.design.catalog.ontologyManagement.description"}),featureColumnManager:Object.freeze({label:"monkeys.design.catalog.featureColumnManager.label",description:"monkeys.design.catalog.featureColumnManager.description"}),ontologyTrendMatrix:Object.freeze({label:"monkeys.design.catalog.ontologyTrendMatrix.label",description:"monkeys.design.catalog.ontologyTrendMatrix.description"}),dataContextBar:Object.freeze({label:"monkeys.design.catalog.dataContextBar.label",description:"monkeys.design.catalog.dataContextBar.description"}),gallery:Object.freeze({label:"monkeys.design.catalog.gallery.label",description:"monkeys.design.catalog.gallery.description"}),sectionHeader:Object.freeze({label:"monkeys.design.catalog.sectionHeader.label",description:"monkeys.design.catalog.sectionHeader.description"}),notice:Object.freeze({label:"monkeys.design.catalog.notice.label",description:"monkeys.design.catalog.notice.description"}),descriptionList:Object.freeze({label:"monkeys.design.catalog.descriptionList.label",description:"monkeys.design.catalog.descriptionList.description"}),contentPanel:Object.freeze({label:"monkeys.design.catalog.contentPanel.label",description:"monkeys.design.catalog.contentPanel.description"}),toolbar:Object.freeze({label:"monkeys.design.catalog.toolbar.label",description:"monkeys.design.catalog.toolbar.description"}),status:Object.freeze({label:"monkeys.design.catalog.status.label",description:"monkeys.design.catalog.status.description"}),viewLeaf:Object.freeze({label:"monkeys.design.catalog.viewLeaf.label",description:"monkeys.design.catalog.viewLeaf.description"})}),status:Object.freeze({loading:Object.freeze({title:"monkeys.design.capability.status.loading.title",description:"monkeys.design.capability.status.loading.description"}),empty:Object.freeze({title:"monkeys.design.capability.status.empty.title",description:"monkeys.design.capability.status.empty.description"}),error:Object.freeze({title:"monkeys.design.capability.status.error.title",description:"monkeys.design.capability.status.error.description"}),forbidden:Object.freeze({title:"monkeys.design.capability.status.forbidden.title",description:"monkeys.design.capability.status.forbidden.description"}),retry:"monkeys.design.capability.status.retry.label"}),shellLayout:Object.freeze({resizeSidebar:"monkeys.design.capability.shellLayout.resizeSidebar",collapseSidebar:"monkeys.design.capability.shellLayout.collapseSidebar",expandSidebar:"monkeys.design.capability.shellLayout.expandSidebar",resizeAside:"monkeys.design.capability.shellLayout.resizeAside"}),sidebarFilter:Object.freeze({title:"monkeys.design.capability.sidebarFilter.title",searchLabel:"monkeys.design.capability.sidebarFilter.search.label",searchPlaceholder:"monkeys.design.capability.sidebarFilter.search.placeholder",groupLabel:"monkeys.design.capability.sidebarFilter.group.label",optionLabel:"monkeys.design.capability.sidebarFilter.option.label"}),gallery:Object.freeze({itemTitle:"monkeys.design.capability.gallery.item.title",itemActivate:"monkeys.design.capability.gallery.item.activate",loadMore:"monkeys.design.capability.gallery.pagination.loadMore",loadingMore:"monkeys.design.capability.gallery.pagination.loadingMore"}),ontologyNavigator:Object.freeze({empty:"monkeys.design.capability.ontologyNavigator.empty",moreActions:"monkeys.design.capability.ontologyNavigator.moreActions",searchLabel:"monkeys.design.capability.ontologyNavigator.search.label",searchPlaceholder:"monkeys.design.capability.ontologyNavigator.search.placeholder",loadMore:"monkeys.design.capability.ontologyNavigator.loadMore",loadingMore:"monkeys.design.capability.ontologyNavigator.loadingMore"}),dataToolbar:Object.freeze({addRow:"monkeys.design.capability.dataToolbar.addRow",blankRowName:"monkeys.design.capability.dataToolbar.blankRowName",searchPlaceholder:"monkeys.design.capability.dataToolbar.search.placeholder",selection:"monkeys.design.capability.dataToolbar.selection",gallerySettings:"monkeys.design.capability.dataToolbar.gallerySettings",galleryPresentation:{visibleColumns:"monkeys.design.capability.dataToolbar.galleryPresentation.visibleColumns",coverField:"monkeys.design.capability.dataToolbar.galleryPresentation.coverField",autoDetect:"monkeys.design.capability.dataToolbar.galleryPresentation.autoDetect",cardDensity:"monkeys.design.capability.dataToolbar.galleryPresentation.cardDensity",cardColumns:"monkeys.design.capability.dataToolbar.galleryPresentation.cardColumns",detailColumns:"monkeys.design.capability.dataToolbar.galleryPresentation.detailColumns",fieldVisibility:"monkeys.design.capability.dataToolbar.galleryPresentation.fieldVisibility",fieldLimit:"monkeys.design.capability.dataToolbar.galleryPresentation.fieldLimit",fieldLimitHint:"monkeys.design.capability.dataToolbar.galleryPresentation.fieldLimitHint",layout:"monkeys.design.capability.dataToolbar.galleryPresentation.layout",compact:"monkeys.design.capability.dataToolbar.galleryPresentation.compact",comfortable:"monkeys.design.capability.dataToolbar.galleryPresentation.comfortable",detailed:"monkeys.design.capability.dataToolbar.galleryPresentation.detailed",autoColumns:"monkeys.design.capability.dataToolbar.galleryPresentation.autoColumns",columns:"monkeys.design.capability.dataToolbar.galleryPresentation.columns",bentoColumns:"monkeys.design.capability.dataToolbar.galleryPresentation.bentoColumns",topLimit:"monkeys.design.capability.dataToolbar.galleryPresentation.topLimit",allFields:"monkeys.design.capability.dataToolbar.galleryPresentation.allFields",adaptiveGrid:"monkeys.design.capability.dataToolbar.galleryPresentation.adaptiveGrid",masonry:"monkeys.design.capability.dataToolbar.galleryPresentation.masonry",rail:"monkeys.design.capability.dataToolbar.galleryPresentation.rail"}}),ontologyTable:Object.freeze({label:"monkeys.design.capability.ontologyTable.label",empty:"monkeys.design.capability.ontologyTable.empty",activate:"monkeys.design.capability.ontologyTable.activate",select:"monkeys.design.capability.ontologyTable.select",sort:"monkeys.design.capability.ontologyTable.sort",loadMore:"monkeys.design.capability.ontologyTable.loadMore",loadingMore:"monkeys.design.capability.ontologyTable.loadingMore"}),cardGrid:Object.freeze({empty:"monkeys.design.capability.cardGrid.empty",activate:"monkeys.design.capability.cardGrid.activate",select:"monkeys.design.capability.cardGrid.select",loadMore:"monkeys.design.capability.cardGrid.loadMore",loadingMore:"monkeys.design.capability.cardGrid.loadingMore"}),pagination:Object.freeze({label:"monkeys.design.capability.pagination.label",loadMore:"monkeys.design.capability.pagination.loadMore",loadingMore:"monkeys.design.capability.pagination.loadingMore"}),recordDetail:Object.freeze({edit:"monkeys.design.capability.recordDetail.edit",close:"monkeys.design.capability.recordDetail.close",attachments:"monkeys.design.capability.recordDetail.attachments",previous:"monkeys.design.capability.recordDetail.previous",next:"monkeys.design.capability.recordDetail.next"}),recordEditor:Object.freeze({submit:"monkeys.design.capability.recordEditor.submit",cancel:"monkeys.design.capability.recordEditor.cancel",mapping:Object.freeze({targets:"monkeys.design.capability.recordEditor.mapping.targets",sources:"monkeys.design.capability.recordEditor.mapping.sources",actions:"monkeys.design.capability.recordEditor.mapping.actions",addTarget:"monkeys.design.capability.recordEditor.mapping.addTarget",removeTarget:"monkeys.design.capability.recordEditor.mapping.removeTarget",addSource:"monkeys.design.capability.recordEditor.mapping.addSource",removeSource:"monkeys.design.capability.recordEditor.mapping.removeSource",search:"monkeys.design.capability.recordEditor.mapping.search",emptyTargets:"monkeys.design.capability.recordEditor.mapping.emptyTargets",emptySources:"monkeys.design.capability.recordEditor.mapping.emptySources"}),optionsEmpty:"monkeys.design.capability.recordEditor.options.empty",optionsLoadMore:"monkeys.design.capability.recordEditor.options.loadMore",optionsLoadingMore:"monkeys.design.capability.recordEditor.options.loadingMore",jsonInvalid:"monkeys.design.capability.recordEditor.json.invalid"}),recordHistory:Object.freeze({title:"monkeys.design.capability.recordHistory.title",close:"monkeys.design.capability.recordHistory.close",commits:"monkeys.design.capability.recordHistory.commits",loadMore:"monkeys.design.capability.recordHistory.loadMore",loadingMore:"monkeys.design.capability.recordHistory.loadingMore",selected:"monkeys.design.capability.recordHistory.selected",diff:"monkeys.design.capability.recordHistory.diff",field:"monkeys.design.capability.recordHistory.diff.field",before:"monkeys.design.capability.recordHistory.diff.before",after:"monkeys.design.capability.recordHistory.diff.after",noDiff:"monkeys.design.capability.recordHistory.diff.empty",reason:"monkeys.design.capability.recordHistory.reason",reasonDescription:"monkeys.design.capability.recordHistory.reason.description",rollback:"monkeys.design.capability.recordHistory.rollback",delete:"monkeys.design.capability.recordHistory.delete"}),ontologyManagement:Object.freeze({title:"monkeys.design.capability.ontologyManagement.title",markerDescription:"monkeys.design.capability.ontologyManagement.markerDescription",create:"monkeys.design.capability.ontologyManagement.create",edit:"monkeys.design.capability.ontologyManagement.edit",delete:"monkeys.design.capability.ontologyManagement.delete",import:"monkeys.design.capability.ontologyManagement.import",description:"monkeys.design.capability.ontologyManagement.description",submit:"monkeys.design.capability.ontologyManagement.submit",cancel:"monkeys.design.capability.ontologyManagement.cancel",displayName:"monkeys.design.capability.ontologyManagement.field.displayName",label:"monkeys.design.capability.ontologyManagement.field.label",templateKey:"monkeys.design.capability.ontologyManagement.field.templateKey",templateName:"monkeys.design.capability.ontologyManagement.field.templateName",templateDescription:"monkeys.design.capability.ontologyManagement.field.templateDescription",templateTags:"monkeys.design.capability.ontologyManagement.field.templateTags",templateTagsDescription:"monkeys.design.capability.ontologyManagement.field.templateTagsDescription",creatorCurrentUser:"monkeys.design.capability.ontologyManagement.field.creatorCurrentUser",creatorCurrentUserShort:"monkeys.design.capability.ontologyManagement.field.creatorCurrentUserShort",defaultViewTemplatesDescription:"monkeys.design.capability.ontologyManagement.field.defaultViewTemplatesDescription",defaultViewTemplate:"monkeys.design.capability.ontologyManagement.field.defaultViewTemplate",defaultSelectedView:"monkeys.design.capability.ontologyManagement.field.defaultSelectedView",tagFilterEnabled:"monkeys.design.capability.ontologyManagement.field.tagFilterEnabled",tagFilterEmpty:"monkeys.design.capability.ontologyManagement.field.tagFilterEmpty",tableColumnsSummary:"monkeys.design.capability.ontologyManagement.field.tableColumnsSummary",editTemplateDetails:"monkeys.design.capability.ontologyManagement.field.editTemplateDetails",editTemplateDetailsDescription:"monkeys.design.capability.ontologyManagement.field.editTemplateDetailsDescription",filterInclude:"monkeys.design.capability.ontologyManagement.filter.include",filterAny:"monkeys.design.capability.ontologyManagement.filter.any",filterExclude:"monkeys.design.capability.ontologyManagement.filter.exclude",filterNoTags:"monkeys.design.capability.ontologyManagement.filter.noTags",filterSearch:"monkeys.design.capability.ontologyManagement.filter.search",filterTagGroup:"monkeys.design.capability.ontologyManagement.filter.tagGroup",filterAllGroups:"monkeys.design.capability.ontologyManagement.filter.allGroups",filterAddOrGroup:"monkeys.design.capability.ontologyManagement.filter.addOrGroup",filterNoOrGroups:"monkeys.design.capability.ontologyManagement.filter.noOrGroups",filterOrGroup:"monkeys.design.capability.ontologyManagement.filter.orGroup",filterDeleteGroup:"monkeys.design.capability.ontologyManagement.filter.deleteGroup",filterSupplement:"monkeys.design.capability.ontologyManagement.filter.supplement",filterConfigureSupplement:"monkeys.design.capability.ontologyManagement.filter.configureSupplement",filterClearSupplement:"monkeys.design.capability.ontologyManagement.filter.clearSupplement",filterSupplementMode:"monkeys.design.capability.ontologyManagement.filter.supplementMode",filterModeOr:"monkeys.design.capability.ontologyManagement.filter.modeOr",filterModeAnd:"monkeys.design.capability.ontologyManagement.filter.modeAnd",filterModeCombination:"monkeys.design.capability.ontologyManagement.filter.modeCombination",filterRequiredAll:"monkeys.design.capability.ontologyManagement.filter.requiredAll",filterRequiredAny:"monkeys.design.capability.ontologyManagement.filter.requiredAny",filterAdvancedRules:"monkeys.design.capability.ontologyManagement.filter.advancedRules",filterAdvancedRulesDescription:"monkeys.design.capability.ontologyManagement.filter.advancedRulesDescription",filterRemoveAdvancedRules:"monkeys.design.capability.ontologyManagement.filter.removeAdvancedRules",defaultViewTemplates:"monkeys.design.capability.ontologyManagement.field.defaultViewTemplates",markerExists:"monkeys.design.capability.ontologyManagement.field.markerExists",targetOntology:"monkeys.design.capability.ontologyManagement.field.targetOntology",deleteTemplate:"monkeys.design.capability.ontologyManagement.action.deleteTemplate",deleteMarker:"monkeys.design.capability.ontologyManagement.action.deleteMarker",createDefaultViews:"monkeys.design.capability.ontologyManagement.action.createDefaultViews",techpackPreset:"monkeys.design.capability.ontologyManagement.action.techpackPreset",trendPreset:"monkeys.design.capability.ontologyManagement.action.trendPreset",addTemplate:"monkeys.design.capability.ontologyManagement.action.addTemplate",noTemplates:"monkeys.design.capability.ontologyManagement.empty.noTemplates",descriptionField:"monkeys.design.capability.ontologyManagement.field.description",bodyKind:"monkeys.design.capability.ontologyManagement.field.bodyKind",visible:"monkeys.design.capability.ontologyManagement.field.visible",kernelReadAllTeams:"monkeys.design.capability.ontologyManagement.field.kernelReadAllTeams",publicRead:"monkeys.design.capability.ontologyManagement.field.publicRead",publicWrite:"monkeys.design.capability.ontologyManagement.field.publicWrite",customizeViewModes:"monkeys.design.capability.ontologyManagement.field.customizeViewModes",availableViewModes:"monkeys.design.capability.ontologyManagement.field.availableViewModes",defaultViewMode:"monkeys.design.capability.ontologyManagement.field.defaultViewMode",viewModeTable:"monkeys.design.capability.ontologyManagement.field.viewMode.table",viewModeCard:"monkeys.design.capability.ontologyManagement.field.viewMode.card",viewModeGallery:"monkeys.design.capability.ontologyManagement.field.viewMode.gallery",viewModeTrendMatrix:"monkeys.design.capability.ontologyManagement.field.viewMode.trendMatrix",selectAtLeastOneViewMode:"monkeys.design.capability.ontologyManagement.field.validation.selectAtLeastOneViewMode",profile:"monkeys.design.capability.ontologyManagement.field.profile",sourceOntologyId:"monkeys.design.capability.ontologyManagement.field.sourceOntologyId",viewId:"monkeys.design.capability.ontologyManagement.field.viewId",name:"monkeys.design.capability.ontologyManagement.field.name",targetTeamId:"monkeys.design.capability.ontologyManagement.field.targetTeamId",currentTeamId:"monkeys.design.capability.ontologyManagement.field.currentTeamId",count:"monkeys.design.capability.ontologyManagement.field.count",blankRowLabel:"monkeys.design.capability.ontologyManagement.field.blankRowLabel",indexMode:"monkeys.design.capability.ontologyManagement.field.indexMode",parentId:"monkeys.design.capability.ontologyManagement.field.parentId",viewType:"monkeys.design.capability.ontologyManagement.field.viewType.label",viewTypeFilter:"monkeys.design.capability.ontologyManagement.field.viewType.filter",viewTypeContainer:"monkeys.design.capability.ontologyManagement.field.viewType.container",sourceContainerViewId:"monkeys.design.capability.ontologyManagement.field.sourceContainerViewId",displayConfig:"monkeys.design.capability.ontologyManagement.field.displayConfig",sort:"monkeys.design.capability.ontologyManagement.field.sort",managedFileId:"monkeys.design.capability.ontologyManagement.field.managedFileId",mode:"monkeys.design.capability.ontologyManagement.field.mode",columnId:"monkeys.design.capability.ontologyManagement.field.columnId",containerViewId:"monkeys.design.capability.ontologyManagement.field.containerViewId",type:"monkeys.design.capability.ontologyManagement.field.type",config:"monkeys.design.capability.ontologyManagement.field.config",scopeContainerViewId:"monkeys.design.capability.ontologyManagement.field.scopeContainerViewId",attached:"monkeys.design.capability.ontologyManagement.field.attached.label",attachedTrue:"monkeys.design.capability.ontologyManagement.field.attached.true",attachedFalse:"monkeys.design.capability.ontologyManagement.field.attached.false",pageSize:"monkeys.design.capability.ontologyManagement.field.pageSize",tagGroupIds:"monkeys.design.capability.ontologyManagement.field.tagGroupIds",featureColumnIds:"monkeys.design.capability.ontologyManagement.field.featureColumnIds",basicFieldIds:"monkeys.design.capability.ontologyManagement.field.basicFieldIds",columnType:"monkeys.design.capability.ontologyManagement.field.columnType.label",columnTypeFeature:"monkeys.design.capability.ontologyManagement.field.columnType.feature",columnTypePreview:"monkeys.design.capability.ontologyManagement.field.columnType.preview",featureColumnId:"monkeys.design.capability.ontologyManagement.field.featureColumnId",itemLimit:"monkeys.design.capability.ontologyManagement.field.itemLimit",shareOperation:"monkeys.design.capability.ontologyManagement.field.shareOperation.label",shareOperationUpsert:"monkeys.design.capability.ontologyManagement.field.shareOperation.upsert",shareOperationRevoke:"monkeys.design.capability.ontologyManagement.field.shareOperation.revoke",targetType:"monkeys.design.capability.ontologyManagement.field.targetType.label",targetTypeUser:"monkeys.design.capability.ontologyManagement.field.targetType.user",targetTypeTeam:"monkeys.design.capability.ontologyManagement.field.targetType.team",targetId:"monkeys.design.capability.ontologyManagement.field.targetId",permissions:"monkeys.design.capability.ontologyManagement.field.permissions",expiresAt:"monkeys.design.capability.ontologyManagement.field.expiresAt",actions:Object.freeze({"ontology-create":"monkeys.design.capability.ontologyManagement.action.ontologyCreate","ontology-update":"monkeys.design.capability.ontologyManagement.action.ontologyUpdate","ontology-delete":"monkeys.design.capability.ontologyManagement.action.ontologyDelete","ontology-marker":"monkeys.design.capability.ontologyManagement.action.ontologyMarker","ontology-default-views":"monkeys.design.capability.ontologyManagement.action.ontologyDefaultViews","ontology-snapshot":"monkeys.design.capability.ontologyManagement.action.ontologySnapshot","ontology-import-jsonl":"monkeys.design.capability.ontologyManagement.action.ontologyImportJsonl","ontology-import-records-jsonl":"monkeys.design.capability.ontologyManagement.action.ontologyImportRecordsJsonl","ontology-import-tag-relations-jsonl":"monkeys.design.capability.ontologyManagement.action.ontologyImportTagRelationsJsonl","ontology-import-text-column-jsonl":"monkeys.design.capability.ontologyManagement.action.ontologyImportTextColumnJsonl","ontology-import-json-column-jsonl":"monkeys.design.capability.ontologyManagement.action.ontologyImportJsonColumnJsonl","ontology-import-relation-column-jsonl":"monkeys.design.capability.ontologyManagement.action.ontologyImportRelationColumnJsonl","feature-column-create":"monkeys.design.capability.ontologyManagement.action.featureColumnCreate","feature-column-update":"monkeys.design.capability.ontologyManagement.action.featureColumnUpdate","feature-column-attachment-set":"monkeys.design.capability.ontologyManagement.action.featureColumnAttachmentSet","view-export-jsonl":"monkeys.design.capability.ontologyManagement.action.viewExportJsonl","feature-column-images-export":"monkeys.design.capability.ontologyManagement.action.featureColumnImagesExport","view-create":"monkeys.design.capability.ontologyManagement.action.viewCreate","view-detail":"monkeys.design.capability.ontologyManagement.action.viewDetail","view-convert-to-container":"monkeys.design.capability.ontologyManagement.action.viewConvertToContainer","view-edit-team":"monkeys.design.capability.ontologyManagement.action.viewEditTeam","view-insert-blank-rows":"monkeys.design.capability.ontologyManagement.action.viewInsertBlankRows","view-snapshot":"monkeys.design.capability.ontologyManagement.action.viewSnapshot","view-update":"monkeys.design.capability.ontologyManagement.action.viewUpdate","view-delete":"monkeys.design.capability.ontologyManagement.action.viewDelete","view-share":"monkeys.design.capability.ontologyManagement.action.viewShare"})}),ontologyTrendMatrix:Object.freeze({label:"monkeys.design.capability.ontologyTrendMatrix.label",row:"monkeys.design.capability.ontologyTrendMatrix.row",window:"monkeys.design.capability.ontologyTrendMatrix.window",select:"monkeys.design.capability.ontologyTrendMatrix.select"}),dataContextBar:Object.freeze({label:"monkeys.design.capability.dataContextBar.label",filter:"monkeys.design.capability.dataContextBar.filter",searchLabel:"monkeys.design.capability.dataContextBar.search.label",searchPlaceholder:"monkeys.design.capability.dataContextBar.search.placeholder",clear:"monkeys.design.capability.dataContextBar.clear",clearAll:"monkeys.design.capability.dataContextBar.clearAll",tagFilterClear:"monkeys.design.capability.dataContextBar.tagFilterClear",filterDescription:"monkeys.design.capability.dataContextBar.filterDescription",tagScope:"monkeys.design.capability.dataContextBar.tagScope",currentViewTags:"monkeys.design.capability.dataContextBar.currentViewTags",allTags:"monkeys.design.capability.dataContextBar.allTags",panelFilter:"monkeys.design.capability.dataContextBar.panelFilter",searchTags:"monkeys.design.capability.dataContextBar.searchTags",noAvailableTags:"monkeys.design.capability.dataContextBar.noAvailableTags",loadedAll:"monkeys.design.capability.dataContextBar.loadedAll",refreshTags:"monkeys.design.capability.dataContextBar.refreshTags",confirm:"monkeys.design.capability.dataContextBar.confirm",tagPanel:"monkeys.design.capability.dataContextBar.tagPanel",selectPanel:"monkeys.design.capability.dataContextBar.selectPanel",noPanels:"monkeys.design.capability.dataContextBar.noPanels",noPanelGroups:"monkeys.design.capability.dataContextBar.noPanelGroups",singleSelect:"monkeys.design.capability.dataContextBar.singleSelect",multiSelect:"monkeys.design.capability.dataContextBar.multiSelect",defaultGroup:"monkeys.design.capability.dataContextBar.defaultGroup",more:"monkeys.design.capability.dataContextBar.more",dashboardContext:"monkeys.design.capability.dataContextBar.dashboardContext",contextCount:"monkeys.design.capability.dataContextBar.contextCount",fields:Object.freeze({search:"monkeys.design.capability.dataContextBar.field.search",tagIds:"monkeys.design.capability.dataContextBar.field.tagIds",tagGroupIds:"monkeys.design.capability.dataContextBar.field.tagGroupIds",timeFrom:"monkeys.design.capability.dataContextBar.field.timeFrom",timeTo:"monkeys.design.capability.dataContextBar.field.timeTo",clickedField:"monkeys.design.capability.dataContextBar.field.clickedField",clickedValue:"monkeys.design.capability.dataContextBar.field.clickedValue",dashboardDrilldown:"monkeys.design.capability.dataContextBar.field.dashboardDrilldown"})})}),Ai=Object.freeze({"en-US":Object.freeze({"monkeys.design.capability.agentConversation.label":"Agent conversation","monkeys.design.capability.agentConversation.description":"Persistent conversation through an authenticated Agent runtime.","monkeys.design.capability.reportDocument.label":"Report document","monkeys.design.capability.reportDocument.description":"Read a projected report with managed media.",[E.ontologyManagement.markerDescription]:"Configure the ontology marker and default views.",[E.ontologyManagement.label]:"Marker name",[E.ontologyManagement.targetOntology]:"Target ontology",[E.ontologyManagement.templateKey]:"Template key",[E.ontologyManagement.templateName]:"View name",[E.ontologyManagement.templateDescription]:"View description",[E.ontologyManagement.templateTags]:"Tag filters",[E.ontologyManagement.templateTagsDescription]:"Choose the tags included, matched, or excluded by this view.",[E.ontologyManagement.creatorCurrentUser]:"Only show records created by the current user",[E.ontologyManagement.creatorCurrentUserShort]:"Current user",[E.ontologyManagement.defaultViewTemplatesDescription]:"Configure default views and their filters for this ontology.",[E.ontologyManagement.defaultViewTemplate]:"Default view template",[E.ontologyManagement.defaultSelectedView]:"Open by default",[E.ontologyManagement.tagFilterEnabled]:"Tag filters configured",[E.ontologyManagement.tagFilterEmpty]:"No tag filters",[E.ontologyManagement.tableColumnsSummary]:"{count} table columns configured",[E.ontologyManagement.editTemplateDetails]:"Edit view template",[E.ontologyManagement.editTemplateDetailsDescription]:"Configure the name, order, and filters.",[E.ontologyManagement.defaultViewTemplates]:"Default view templates",[E.ontologyManagement.markerExists]:"Ontology marker exists",[E.ontologyManagement.filterInclude]:"Include all",[E.ontologyManagement.filterAny]:"Match any",[E.ontologyManagement.filterExclude]:"Exclude",[E.ontologyManagement.filterNoTags]:"No matching tags",[E.ontologyManagement.filterSearch]:"Search tags",[E.ontologyManagement.filterTagGroup]:"Tag group",[E.ontologyManagement.filterAllGroups]:"All tag groups",[E.ontologyManagement.filterAddOrGroup]:"Add OR group",[E.ontologyManagement.filterNoOrGroups]:"No OR groups",[E.ontologyManagement.filterOrGroup]:"OR group {n}",[E.ontologyManagement.filterDeleteGroup]:"Delete group",[E.ontologyManagement.filterSupplement]:"Supplement rules for {name}",[E.ontologyManagement.filterConfigureSupplement]:"Configure supplement rules",[E.ontologyManagement.filterClearSupplement]:"Clear supplement rules",[E.ontologyManagement.filterSupplementMode]:"Match mode",[E.ontologyManagement.filterModeOr]:"Any condition (OR)",[E.ontologyManagement.filterModeAnd]:"All conditions (AND)",[E.ontologyManagement.filterModeCombination]:"Combined conditions",[E.ontologyManagement.filterRequiredAll]:"Require all tags",[E.ontologyManagement.filterRequiredAny]:"Require at least one tag",[E.ontologyManagement.filterAdvancedRules]:"{count} advanced rules",[E.ontologyManagement.filterAdvancedRulesDescription]:"Existing rules are preserved unless explicitly removed.",[E.ontologyManagement.filterRemoveAdvancedRules]:"Remove advanced rules",[E.ontologyManagement.deleteTemplate]:"Delete template",[E.ontologyManagement.deleteMarker]:"Delete marker",[E.ontologyManagement.createDefaultViews]:"Create default views",[E.ontologyManagement.addTemplate]:"Add view template",[E.ontologyManagement.noTemplates]:"No default view templates",[E.ontologyManagement.actions["ontology-marker"]]:"Set ontology marker",[E.ontologyManagement.actions["view-detail"]]:"View details",[E.ontologyManagement.actions["view-convert-to-container"]]:"Convert to enhanced view",[E.ontologyManagement.actions["view-edit-team"]]:"Edit view team",[E.ontologyManagement.actions["view-insert-blank-rows"]]:"Insert blank rows",[E.ontologyManagement.actions["view-snapshot"]]:"Import to new Ontology",[E.ontologyManagement.targetTeamId]:"Target team ID",[E.ontologyManagement.currentTeamId]:"Current team ID",[E.ontologyManagement.count]:"Row count",[E.ontologyManagement.blankRowLabel]:"Blank row label","monkeys.design.capability.pagination.previous":"Previous page","monkeys.design.capability.pagination.next":"Next page","monkeys.design.iconPicker.confirm":"Confirm","monkeys.design.iconPicker.categories":"Categories","monkeys.design.iconPicker.icon":"Icon","monkeys.design.iconPicker.choose":"Choose an icon","monkeys.design.iconPicker.current":"Current icon","monkeys.design.iconPicker.reset":"Reset","monkeys.design.iconPicker.search":"Search icons","monkeys.design.iconPicker.category":"Category","monkeys.design.iconPicker.background":"Background color","monkeys.design.iconPicker.upload":"Upload icon","monkeys.design.iconPicker.uploadFailed":"Icon upload failed","monkeys.design.iconPicker.loading":"Loading icons","monkeys.design.iconPicker.retry":"Retry","monkeys.design.iconPicker.empty":"No matching icons","monkeys.design.iconPicker.close":"Close","monkeys.design.iconPicker.emoji":"Emoji","monkeys.design.iconPicker.catalogFailed":"Unable to load icons","monkeys.design.emojiPanel.loading":"Loading emoji","monkeys.design.emojiPanel.unavailable":"Unable to load emoji","monkeys.design.capability.choicePicker.label":"Choice picker","monkeys.design.capability.choicePicker.description":"Search and select a paginated collection.","monkeys.design.capability.runtimeTerminal.status":"Terminal","monkeys.design.capability.runtimeTerminal.waiting":"Connecting to terminal\u2026","monkeys.design.capability.recordEditor.add":"Add item","monkeys.design.capability.recordEditor.remove":"Remove item","monkeys.design.capability.recordEditor.moveUp":"Move up","monkeys.design.capability.recordEditor.moveDown":"Move down","monkeys.design.capability.recordEditor.reset":"Reset","monkeys.design.capability.imageUpload.sizeHint":"One image, up to {{size}} MB","monkeys.design.capability.imageUpload.title":"Click or drag an image here","monkeys.design.capability.imageUpload.hint":"Paste an image or image link","monkeys.design.capability.imageUpload.paste":"Paste from clipboard","monkeys.design.capability.imageUpload.replace":"Replace image","monkeys.design.capability.imageUpload.clipboardUnavailable":"Clipboard access is unavailable. Paste with your keyboard or choose a file.","monkeys.design.capability.imageUpload.clipboardEmpty":"No image or image link was found in the clipboard.","monkeys.design.capability.filePicker.label":"Choose file","monkeys.design.capability.mediaDraft.choose":"Add images","monkeys.design.capability.mediaDraft.hint":"Up to {count} images, {size} MB each. Uploaded when you save.","monkeys.design.capability.mediaDraft.replace":"Replace","monkeys.design.capability.mediaDraft.preview":"Preview image","monkeys.design.capability.mediaDraft.previewPrevious":"Previous image","monkeys.design.capability.mediaDraft.previewNext":"Next image","monkeys.design.capability.mediaDraft.count":"Too many images. Remove an image before adding more.","monkeys.design.capability.mediaDraft.type":"Choose image files.","monkeys.design.capability.mediaDraft.size":"An image is empty or exceeds the allowed size.","monkeys.design.capability.mediaDraft.failed":"Images could not be selected. Try again.","monkeys.design.capability.mediaDraft.unavailable":"Preview unavailable","monkeys.design.capability.mediaDraft.previous":"Move image earlier","monkeys.design.capability.mediaDraft.next":"Move image later","monkeys.design.capability.mediaDraft.remove":"Remove","monkeys.design.capability.filePicker.description":"Select a local file for a governed action.","monkeys.design.capability.filePicker.cancel":"Clear file","monkeys.design.capability.filePicker.tooLarge":"The file exceeds the allowed size.","monkeys.design.capability.filePicker.invalidType":"Choose a supported file type.","monkeys.design.capability.filePicker.registrationFailed":"The file could not be selected. Try again.","monkeys.design.capability.recordEditor.date.invalid":"Enter a valid date and time within the allowed range.","monkeys.design.capability.recordEditor.month.choose":"Choose year and month","monkeys.design.capability.recordEditor.month.previous":"Previous year or group of years","monkeys.design.capability.recordEditor.month.next":"Next year or group of years","monkeys.design.capability.recordEditor.month.clear":"Clear","monkeys.design.capability.recordEditor.clear":"Clear","monkeys.design.capability.recordEditor.notSet":"Not set","monkeys.design.capability.recordEditor.noOptions":"No matching options","monkeys.design.capability.recordEditor.pick":"Choose","monkeys.design.capability.recordEditor.selectionSummary":"Selected: {{count}}","monkeys.design.capability.recordEditor.sections":"Form sections","monkeys.design.capability.recordEditor.secretKeep":"Keep existing","monkeys.design.capability.recordEditor.treeReorderFailed":"Could not save the order. Reload the list and try again.","monkeys.design.capability.recordEditor.secretMode":"{field} update mode","monkeys.design.capability.recordEditor.secretReplace":"Replace","monkeys.design.capability.recordEditor.secretClear":"Clear","monkeys.design.capability.recordEditor.mapping.targets":"Targets","monkeys.design.capability.recordEditor.mapping.sources":"Sources","monkeys.design.capability.recordEditor.mapping.actions":"Mapping actions","monkeys.design.capability.recordEditor.mapping.addTarget":"Add target","monkeys.design.capability.recordEditor.mapping.removeTarget":"Remove target","monkeys.design.capability.recordEditor.mapping.addSource":"Add source","monkeys.design.capability.recordEditor.mapping.removeSource":"Remove source","monkeys.design.capability.recordEditor.mapping.search":"Search sources","monkeys.design.capability.recordEditor.mapping.emptyTargets":"No targets","monkeys.design.capability.recordEditor.mapping.emptySources":"No sources assigned","monkeys.design.capability.recordEditor.mapping.groupCount":"{count} grouped targets","monkeys.design.capability.recordEditor.mapping.memberCount":"({count})","monkeys.design.capability.recordEditor.mapping.newTarget":"Enter target name","monkeys.design.capability.recordEditor.mapping.rename":"Target name","monkeys.design.capability.recordEditor.mapping.unnamed":"Unnamed target","monkeys.design.capability.recordEditor.mapping.incomplete":"Enter a name and assign at least one source before saving.","monkeys.design.capability.recordEditor.mapping.deleteConfirmation":"Delete \u201C{name}\u201D?","monkeys.design.capability.recordEditor.mapping.confirmDelete":"Delete","monkeys.design.capability.recordEditor.mapping.cancel":"Cancel","monkeys.design.capability.recordEditor.mapping.selectTarget":"Select a target on the left first","monkeys.design.capability.recordEditor.mapping.sourceTabs":"Source list","monkeys.design.capability.recordEditor.mapping.assigned":"Included ({count})","monkeys.design.capability.recordEditor.mapping.available":"Available ({count})","monkeys.design.capability.recordEditor.mapping.selectVisible":"Select current list","monkeys.design.capability.recordEditor.mapping.selected":"{count} selected","monkeys.design.capability.recordEditor.mapping.noMatches":"No matches","monkeys.design.capability.recordEditor.mapping.noAvailable":"No available sources","monkeys.design.capability.recordEditor.mapping.customSource":"Add custom source","monkeys.design.capability.recordEditor.mapping.addCustom":"Add custom source","monkeys.design.capability.recordEditor.mapping.add":"Add","monkeys.design.capability.recordEditor.mapping.addHint":"Add selected sources to this target","monkeys.design.capability.recordEditor.mapping.removeHint":"Remove selected sources from this target","monkeys.design.capability.recordEditor.mapping.currentTarget":"Current target: {name}","monkeys.design.capability.recordEditor.mapping.invalid":"The mapping is invalid.","monkeys.design.capability.recordEditor.mapping.invalidName":"Enter a valid name.","monkeys.design.capability.recordEditor.mapping.alreadyAssigned":"This source belongs to another target.","monkeys.design.capability.recordEditor.mapping.unavailable":"This source is unavailable.","monkeys.design.capability.recordEditor.mapping.added":"Added {count} sources to \u201C{name}\u201D","monkeys.design.capability.recordEditor.mapping.removed":"Removed {count} sources from \u201C{name}\u201D","monkeys.design.capability.recordEditor.mapping.deleted":"Deleted \u201C{name}\u201D",[E.numericSeries.inspect]:"Inspect observation","monkeys.design.capability.summaryChart.label":"Summary chart","monkeys.design.capability.dataToolbar.moreActions":"More actions","monkeys.design.capability.summaryChart.description":"Compare numeric series and category totals.","monkeys.design.capability.sparkline.label":"Sparkline","monkeys.design.capability.sparkline.description":"Show a compact, axis-free trend inside dense surfaces such as metric tiles.",[E.numericSeries.noPoints]:"No observations in this range",[E.numericSeries.point]:"{xLabel} {x}, {yLabel} {y}",[E.numericSeries.label]:"Numeric series",[E.numericSeries.description]:"Inspect numeric observations with range zoom and expansion.",[E.numericSeries.start]:"Range start",[E.numericSeries.end]:"Range end",[E.numericSeries.reset]:"Reset range",[E.numericSeries.expand]:"Expand chart",[E.numericSeries.close]:"Close chart",[E.shellLayout.resizeSidebar]:"Resize sidebar",[E.shellLayout.collapseSidebar]:"Collapse sidebar",[E.shellLayout.expandSidebar]:"Expand sidebar",[E.shellLayout.resizeAside]:"Resize detail panel",[E.ontologyNavigator.moreActions]:"More actions",[E.dataToolbar.addRow]:"Add row",[E.dataToolbar.blankRowName]:"Blank Row",[E.ontologyTrendMatrix.label]:"Ontology trend matrix",[E.ontologyTrendMatrix.row]:"Row",[E.ontologyTrendMatrix.window]:"Visible rows {start}-{end} of {total}",[E.ontologyTrendMatrix.select]:"Select {row}, {column}, {value}",[E.dataContextBar.label]:"Data filters and drilldown context",[E.dataContextBar.filter]:"Filters",[E.dataContextBar.searchLabel]:"Search data",[E.dataContextBar.searchPlaceholder]:"Search",[E.dataContextBar.clear]:"Clear",[E.dataContextBar.clearAll]:"Clear all",[E.dataContextBar.tagFilterClear]:"Clear",[E.dataContextBar.filterDescription]:"Filter assets by selecting tags via tag panel or manual search.",[E.dataContextBar.tagScope]:"Tag scope",[E.dataContextBar.currentViewTags]:"Current view",[E.dataContextBar.allTags]:"All tags",[E.dataContextBar.panelFilter]:"Panel filter",[E.dataContextBar.searchTags]:"Search tags",[E.dataContextBar.noAvailableTags]:"No available tags",[E.dataContextBar.loadedAll]:"All loaded",[E.dataContextBar.refreshTags]:"Refresh tags",[E.dataContextBar.confirm]:"Confirm",[E.dataContextBar.tagPanel]:"Tag panel",[E.dataContextBar.selectPanel]:"Select a panel",[E.dataContextBar.noPanels]:"No available panels",[E.dataContextBar.noPanelGroups]:"No tag groups in this panel",[E.dataContextBar.singleSelect]:"Single select",[E.dataContextBar.multiSelect]:"Multi select",[E.dataContextBar.defaultGroup]:"Default group",[E.dataContextBar.more]:"+{count} more",[E.dataContextBar.dashboardContext]:"Dashboard context",[E.dataContextBar.contextCount]:"{count} context values",[E.dataContextBar.fields.search]:"Search",[E.dataContextBar.fields.tagIds]:"Tags",[E.dataContextBar.fields.tagGroupIds]:"Tag groups",[E.dataContextBar.fields.timeFrom]:"From",[E.dataContextBar.fields.timeTo]:"To",[E.dataContextBar.fields.clickedField]:"Drilldown field",[E.dataContextBar.fields.clickedValue]:"Drilldown value",[E.dataContextBar.fields.dashboardDrilldown]:"Dashboard drilldown"}),"zh-CN":Object.freeze({"monkeys.design.capability.agentConversation.label":"\u667A\u80FD\u4F53\u5BF9\u8BDD","monkeys.design.capability.agentConversation.description":"\u901A\u8FC7\u5DF2\u8BA4\u8BC1\u667A\u80FD\u4F53\u8FD0\u884C\u65F6\u8FDB\u884C\u6301\u4E45\u5316\u5BF9\u8BDD\u3002","monkeys.design.capability.reportDocument.label":"\u62A5\u544A\u6587\u6863","monkeys.design.capability.reportDocument.description":"\u9605\u8BFB\u5305\u542B\u6258\u7BA1\u5A92\u4F53\u7684\u62A5\u544A\u6295\u5F71\u3002",[E.ontologyManagement.markerDescription]:"\u914D\u7F6E\u4ED3\u5E93\u6807\u8BB0\u548C\u9ED8\u8BA4\u89C6\u56FE\u3002",[E.ontologyManagement.label]:"\u6807\u8BB0\u540D\u79F0",[E.ontologyManagement.targetOntology]:"\u76EE\u6807\u4ED3\u5E93",[E.ontologyManagement.templateKey]:"\u6A21\u677F\u6807\u8BC6",[E.ontologyManagement.templateName]:"\u89C6\u56FE\u540D\u79F0",[E.ontologyManagement.templateDescription]:"\u89C6\u56FE\u63CF\u8FF0",[E.ontologyManagement.templateTags]:"\u6807\u7B7E\u7B5B\u9009",[E.ontologyManagement.templateTagsDescription]:"\u8BBE\u7F6E\u8BE5\u89C6\u56FE\u5305\u542B\u3001\u5339\u914D\u6216\u6392\u9664\u7684\u6807\u7B7E\u3002",[E.ontologyManagement.creatorCurrentUser]:"\u4EC5\u663E\u793A\u5F53\u524D\u7528\u6237\u521B\u5EFA\u7684\u6570\u636E",[E.ontologyManagement.creatorCurrentUserShort]:"\u5F53\u524D\u7528\u6237",[E.ontologyManagement.defaultViewTemplatesDescription]:"\u4E3A\u4ED3\u5E93\u914D\u7F6E\u9ED8\u8BA4\u89C6\u56FE\u53CA\u5176\u7B5B\u9009\u6761\u4EF6\u3002",[E.ontologyManagement.defaultViewTemplate]:"\u9ED8\u8BA4\u89C6\u56FE\u6A21\u677F",[E.ontologyManagement.defaultSelectedView]:"\u9ED8\u8BA4\u6253\u5F00",[E.ontologyManagement.tagFilterEnabled]:"\u5DF2\u914D\u7F6E\u6807\u7B7E\u7B5B\u9009",[E.ontologyManagement.tagFilterEmpty]:"\u672A\u914D\u7F6E\u6807\u7B7E\u7B5B\u9009",[E.ontologyManagement.tableColumnsSummary]:"\u5DF2\u914D\u7F6E {count} \u4E2A\u8868\u683C\u5217",[E.ontologyManagement.editTemplateDetails]:"\u7F16\u8F91\u89C6\u56FE\u6A21\u677F",[E.ontologyManagement.editTemplateDetailsDescription]:"\u914D\u7F6E\u540D\u79F0\u3001\u6392\u5E8F\u548C\u7B5B\u9009\u6761\u4EF6\u3002",[E.ontologyManagement.defaultViewTemplates]:"\u9ED8\u8BA4\u89C6\u56FE\u6A21\u677F",[E.ontologyManagement.markerExists]:"\u5DF2\u6709\u4ED3\u5E93\u6807\u8BB0",[E.ontologyManagement.filterInclude]:"\u5168\u90E8\u5305\u542B",[E.ontologyManagement.filterAny]:"\u5339\u914D\u4EFB\u610F",[E.ontologyManagement.filterExclude]:"\u6392\u9664",[E.ontologyManagement.filterNoTags]:"\u6CA1\u6709\u5339\u914D\u7684\u6807\u7B7E",[E.ontologyManagement.filterSearch]:"\u641C\u7D22\u6807\u7B7E",[E.ontologyManagement.filterTagGroup]:"\u6807\u7B7E\u7EC4",[E.ontologyManagement.filterAllGroups]:"\u5168\u90E8\u6807\u7B7E\u7EC4",[E.ontologyManagement.filterAddOrGroup]:"\u6DFB\u52A0\u6216\u6761\u4EF6\u7EC4",[E.ontologyManagement.filterNoOrGroups]:"\u6682\u65E0\u6216\u6761\u4EF6\u7EC4",[E.ontologyManagement.filterOrGroup]:"\u6216\u6761\u4EF6\u7EC4 {n}",[E.ontologyManagement.filterDeleteGroup]:"\u5220\u9664\u6761\u4EF6\u7EC4",[E.ontologyManagement.filterSupplement]:"{name} \u7684\u8865\u5145\u89C4\u5219",[E.ontologyManagement.filterConfigureSupplement]:"\u914D\u7F6E\u8865\u5145\u89C4\u5219",[E.ontologyManagement.filterClearSupplement]:"\u6E05\u9664\u8865\u5145\u89C4\u5219",[E.ontologyManagement.filterSupplementMode]:"\u5339\u914D\u65B9\u5F0F",[E.ontologyManagement.filterModeOr]:"\u4EFB\u610F\u6761\u4EF6\uFF08OR\uFF09",[E.ontologyManagement.filterModeAnd]:"\u5168\u90E8\u6761\u4EF6\uFF08AND\uFF09",[E.ontologyManagement.filterModeCombination]:"\u7EC4\u5408\u6761\u4EF6",[E.ontologyManagement.filterRequiredAll]:"\u5FC5\u987B\u5305\u542B\u5168\u90E8\u6807\u7B7E",[E.ontologyManagement.filterRequiredAny]:"\u81F3\u5C11\u5305\u542B\u4E00\u4E2A\u6807\u7B7E",[E.ontologyManagement.filterAdvancedRules]:"{count} \u9879\u9AD8\u7EA7\u89C4\u5219",[E.ontologyManagement.filterAdvancedRulesDescription]:"\u5DF2\u6709\u89C4\u5219\u5C06\u4FDD\u7559\uFF0C\u9664\u975E\u660E\u786E\u79FB\u9664\u3002",[E.ontologyManagement.filterRemoveAdvancedRules]:"\u79FB\u9664\u9AD8\u7EA7\u89C4\u5219",[E.ontologyManagement.deleteTemplate]:"\u5220\u9664\u6A21\u677F",[E.ontologyManagement.deleteMarker]:"\u5220\u9664\u4ED3\u5E93\u6807\u8BB0",[E.ontologyManagement.createDefaultViews]:"\u521B\u5EFA\u9ED8\u8BA4\u89C6\u56FE",[E.ontologyManagement.addTemplate]:"\u6DFB\u52A0\u89C6\u56FE\u6A21\u677F",[E.ontologyManagement.noTemplates]:"\u6682\u65E0\u9ED8\u8BA4\u89C6\u56FE\u6A21\u677F",[E.ontologyManagement.actions["ontology-marker"]]:"\u8BBE\u7F6E\u4ED3\u5E93\u6807\u8BB0",[E.ontologyManagement.actions["view-detail"]]:"\u67E5\u770B\u8BE6\u60C5",[E.ontologyManagement.actions["view-convert-to-container"]]:"\u8F6C\u5316\u4E3A\u589E\u5F3A\u89C6\u56FE",[E.ontologyManagement.actions["view-edit-team"]]:"\u4FEE\u6539\u89C6\u56FE\u56E2\u961F",[E.ontologyManagement.actions["view-insert-blank-rows"]]:"\u63D2\u5165\u7A7A\u767D\u884C",[E.ontologyManagement.actions["view-snapshot"]]:"\u5BFC\u5165\u5230\u65B0 Ontology",[E.ontologyManagement.targetTeamId]:"\u76EE\u6807\u56E2\u961F ID",[E.ontologyManagement.currentTeamId]:"\u5F53\u524D\u56E2\u961F ID",[E.ontologyManagement.count]:"\u884C\u6570",[E.ontologyManagement.blankRowLabel]:"\u7A7A\u767D\u884C\u540D\u79F0","monkeys.design.capability.pagination.previous":"\u4E0A\u4E00\u9875","monkeys.design.capability.pagination.next":"\u4E0B\u4E00\u9875","monkeys.design.iconPicker.confirm":"\u786E\u8BA4","monkeys.design.iconPicker.categories":"\u5206\u7C7B","monkeys.design.iconPicker.icon":"\u56FE\u6807","monkeys.design.iconPicker.choose":"\u9009\u62E9\u56FE\u6807","monkeys.design.iconPicker.current":"\u5F53\u524D\u56FE\u6807","monkeys.design.iconPicker.reset":"\u91CD\u7F6E","monkeys.design.iconPicker.search":"\u641C\u7D22\u56FE\u6807","monkeys.design.iconPicker.category":"\u5206\u7C7B","monkeys.design.iconPicker.background":"\u80CC\u666F\u989C\u8272","monkeys.design.iconPicker.upload":"\u4E0A\u4F20\u56FE\u6807","monkeys.design.iconPicker.uploadFailed":"\u56FE\u6807\u4E0A\u4F20\u5931\u8D25","monkeys.design.iconPicker.loading":"\u6B63\u5728\u52A0\u8F7D\u56FE\u6807","monkeys.design.iconPicker.retry":"\u91CD\u8BD5","monkeys.design.iconPicker.empty":"\u6CA1\u6709\u5339\u914D\u7684\u56FE\u6807","monkeys.design.iconPicker.close":"\u5173\u95ED","monkeys.design.iconPicker.emoji":"\u8868\u60C5","monkeys.design.iconPicker.catalogFailed":"\u65E0\u6CD5\u52A0\u8F7D\u56FE\u6807","monkeys.design.emojiPanel.loading":"\u6B63\u5728\u52A0\u8F7D\u8868\u60C5","monkeys.design.emojiPanel.unavailable":"\u65E0\u6CD5\u52A0\u8F7D\u8868\u60C5","monkeys.design.capability.choicePicker.label":"\u9009\u9879\u9009\u62E9\u5668","monkeys.design.capability.choicePicker.description":"\u641C\u7D22\u5E76\u9009\u62E9\u5206\u9875\u96C6\u5408\u4E2D\u7684\u9009\u9879\u3002","monkeys.design.capability.summaryChart.label":"\u6C47\u603B\u56FE\u8868","monkeys.design.capability.dataToolbar.moreActions":"\u66F4\u591A\u64CD\u4F5C","monkeys.design.capability.summaryChart.description":"\u6BD4\u8F83\u6570\u503C\u5E8F\u5217\u4E0E\u5206\u7C7B\u6C47\u603B\u3002","monkeys.design.capability.sparkline.label":"\u8FF7\u4F60\u8D8B\u52BF\u7EBF","monkeys.design.capability.sparkline.description":"\u5728\u6307\u6807\u5361\u7B49\u7D27\u51D1\u533A\u57DF\u5C55\u793A\u65E0\u5750\u6807\u8F74\u7684\u8FF7\u4F60\u8D8B\u52BF\u3002","monkeys.design.capability.runtimeTerminal.status":"\u7EC8\u7AEF","monkeys.design.capability.runtimeTerminal.waiting":"\u6B63\u5728\u8FDE\u63A5\u7EC8\u7AEF\u2026","monkeys.design.capability.recordEditor.add":"\u6DFB\u52A0\u6761\u76EE","monkeys.design.capability.recordEditor.remove":"\u5220\u9664\u6761\u76EE","monkeys.design.capability.recordEditor.moveUp":"\u4E0A\u79FB","monkeys.design.capability.recordEditor.moveDown":"\u4E0B\u79FB","monkeys.design.capability.recordEditor.reset":"\u91CD\u7F6E","monkeys.design.capability.imageUpload.sizeHint":"\u5355\u5F20\u56FE\u7247\uFF0C\u6700\u5927 {{size}} MB","monkeys.design.capability.imageUpload.title":"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247","monkeys.design.capability.imageUpload.hint":"\u652F\u6301\u7C98\u8D34\u56FE\u7247\u6216\u56FE\u7247\u94FE\u63A5","monkeys.design.capability.imageUpload.paste":"\u4ECE\u526A\u8D34\u677F\u7C98\u8D34","monkeys.design.capability.imageUpload.replace":"\u66FF\u6362\u56FE\u7247","monkeys.design.capability.imageUpload.clipboardUnavailable":"\u65E0\u6CD5\u8BFB\u53D6\u526A\u8D34\u677F\uFF0C\u8BF7\u4F7F\u7528\u952E\u76D8\u7C98\u8D34\u6216\u9009\u62E9\u6587\u4EF6\u3002","monkeys.design.capability.imageUpload.clipboardEmpty":"\u526A\u8D34\u677F\u4E2D\u6CA1\u6709\u56FE\u7247\u6216\u56FE\u7247\u94FE\u63A5\u3002","monkeys.design.capability.filePicker.label":"\u9009\u62E9\u6587\u4EF6","monkeys.design.capability.mediaDraft.choose":"\u6DFB\u52A0\u56FE\u7247","monkeys.design.capability.mediaDraft.hint":"\u6BCF\u5F20\u4E0D\u8D85\u8FC7 {size} MB\uFF0C\u6700\u591A {count} \u5F20\u3002\u70B9\u51FB\u300C\u4FDD\u5B58\u300D\u540E\u4E0A\u4F20\u3002","monkeys.design.capability.mediaDraft.replace":"\u66FF\u6362","monkeys.design.capability.mediaDraft.preview":"\u9884\u89C8\u56FE\u7247","monkeys.design.capability.mediaDraft.previewPrevious":"\u4E0A\u4E00\u5F20","monkeys.design.capability.mediaDraft.previewNext":"\u4E0B\u4E00\u5F20","monkeys.design.capability.mediaDraft.count":"\u56FE\u7247\u6570\u91CF\u8D85\u8FC7\u9650\u5236\uFF0C\u8BF7\u79FB\u9664\u540E\u518D\u6DFB\u52A0\u3002","monkeys.design.capability.mediaDraft.type":"\u8BF7\u9009\u62E9\u56FE\u7247\u6587\u4EF6\u3002","monkeys.design.capability.mediaDraft.size":"\u56FE\u7247\u4E3A\u7A7A\u6216\u5927\u5C0F\u8D85\u8FC7\u5141\u8BB8\u8303\u56F4\u3002","monkeys.design.capability.mediaDraft.failed":"\u65E0\u6CD5\u9009\u62E9\u56FE\u7247\uFF0C\u8BF7\u91CD\u8BD5\u3002","monkeys.design.capability.mediaDraft.unavailable":"\u6682\u65E0\u9884\u89C8","monkeys.design.capability.mediaDraft.previous":"\u524D\u79FB\u56FE\u7247","monkeys.design.capability.mediaDraft.next":"\u540E\u79FB\u56FE\u7247","monkeys.design.capability.mediaDraft.remove":"\u79FB\u9664","monkeys.design.capability.filePicker.description":"\u9009\u62E9\u672C\u5730\u6587\u4EF6\u4EE5\u6267\u884C\u53D7\u6CBB\u7406\u64CD\u4F5C\u3002","monkeys.design.capability.filePicker.cancel":"\u6E05\u9664\u6587\u4EF6","monkeys.design.capability.filePicker.tooLarge":"\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u5141\u8BB8\u8303\u56F4\u3002","monkeys.design.capability.filePicker.invalidType":"\u8BF7\u9009\u62E9\u652F\u6301\u7684\u6587\u4EF6\u7C7B\u578B\u3002","monkeys.design.capability.filePicker.registrationFailed":"\u65E0\u6CD5\u9009\u62E9\u8BE5\u6587\u4EF6\uFF0C\u8BF7\u91CD\u8BD5\u3002","monkeys.design.capability.recordEditor.date.invalid":"\u8BF7\u8F93\u5165\u5141\u8BB8\u8303\u56F4\u5185\u7684\u6709\u6548\u65E5\u671F\u548C\u65F6\u95F4\u3002","monkeys.design.capability.recordEditor.month.choose":"\u9009\u62E9\u5E74\u6708","monkeys.design.capability.recordEditor.month.previous":"\u4E0A\u4E00\u5E74\u6216\u4E0A\u4E00\u7EC4\u5E74\u4EFD","monkeys.design.capability.recordEditor.month.next":"\u4E0B\u4E00\u5E74\u6216\u4E0B\u4E00\u7EC4\u5E74\u4EFD","monkeys.design.capability.recordEditor.month.clear":"\u6E05\u9664","monkeys.design.capability.recordEditor.clear":"\u6E05\u9664","monkeys.design.capability.recordEditor.notSet":"\u672A\u8BBE\u7F6E","monkeys.design.capability.recordEditor.noOptions":"\u6682\u65E0\u5339\u914D\u9009\u9879","monkeys.design.capability.recordEditor.pick":"\u9009\u62E9","monkeys.design.capability.recordEditor.selectionSummary":"\u5DF2\u9009 {{count}} \u9879","monkeys.design.capability.recordEditor.sections":"\u8868\u5355\u5206\u7C7B","monkeys.design.capability.recordEditor.secretKeep":"\u4FDD\u7559\u73B0\u6709\u503C","monkeys.design.capability.recordEditor.treeReorderFailed":"\u987A\u5E8F\u4FDD\u5B58\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u52A0\u8F7D\u5217\u8868\u540E\u91CD\u8BD5\u3002","monkeys.design.capability.recordEditor.secretMode":"{field} \u66F4\u65B0\u65B9\u5F0F","monkeys.design.capability.recordEditor.secretReplace":"\u66FF\u6362","monkeys.design.capability.recordEditor.secretClear":"\u6E05\u9664","monkeys.design.capability.recordEditor.mapping.targets":"\u5F52\u5E76\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.sources":"\u539F\u59CB\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.actions":"\u5F52\u5E76\u64CD\u4F5C","monkeys.design.capability.recordEditor.mapping.addTarget":"\u65B0\u589E\u5F52\u5E76\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.removeTarget":"\u5220\u9664\u5F52\u5E76\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.addSource":"\u52A0\u5165\u5F53\u524D\u5F52\u5E76","monkeys.design.capability.recordEditor.mapping.removeSource":"\u79FB\u51FA\u5F53\u524D\u5F52\u5E76","monkeys.design.capability.recordEditor.mapping.search":"\u641C\u7D22\u539F\u59CB\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.emptyTargets":"\u6682\u65E0\u5F52\u5E76\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.emptySources":"\u5F53\u524D\u5F52\u5E76\u90E8\u95E8\u6682\u65E0\u539F\u59CB\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.groupCount":"\u5171 {count} \u4E2A\u5F52\u5E76\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.memberCount":"\uFF08{count} \u4E2A\uFF09","monkeys.design.capability.recordEditor.mapping.newTarget":"\u8F93\u5165\u5F52\u5E76\u90E8\u95E8\u540D\u79F0","monkeys.design.capability.recordEditor.mapping.rename":"\u5F52\u5E76\u90E8\u95E8\u540D\u79F0","monkeys.design.capability.recordEditor.mapping.unnamed":"\u672A\u547D\u540D\u5F52\u5E76\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.incomplete":"\u8BF7\u586B\u5199\u540D\u79F0\u5E76\u81F3\u5C11\u52A0\u5165\u4E00\u4E2A\u539F\u59CB\u90E8\u95E8\u540E\u4FDD\u5B58\u3002","monkeys.design.capability.recordEditor.mapping.deleteConfirmation":"\u786E\u5B9A\u5220\u9664\u201C{name}\u201D\u5417\uFF1F","monkeys.design.capability.recordEditor.mapping.confirmDelete":"\u786E\u8BA4\u5220\u9664","monkeys.design.capability.recordEditor.mapping.cancel":"\u53D6\u6D88","monkeys.design.capability.recordEditor.mapping.selectTarget":"\u8BF7\u5148\u9009\u62E9\u5DE6\u4FA7\u5F52\u5E76\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.sourceTabs":"\u539F\u59CB\u90E8\u95E8\u5217\u8868","monkeys.design.capability.recordEditor.mapping.assigned":"\u5DF2\u5305\u542B\uFF08{count}\uFF09","monkeys.design.capability.recordEditor.mapping.available":"\u53EF\u6DFB\u52A0\uFF08{count}\uFF09","monkeys.design.capability.recordEditor.mapping.selectVisible":"\u5168\u9009\u5F53\u524D\u5217\u8868","monkeys.design.capability.recordEditor.mapping.selected":"\u5DF2\u9009 {count} \u4E2A","monkeys.design.capability.recordEditor.mapping.noMatches":"\u6CA1\u6709\u5339\u914D\u7684\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.noAvailable":"\u6CA1\u6709\u53EF\u6DFB\u52A0\u7684\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.customSource":"\u6DFB\u52A0\u81EA\u5B9A\u4E49\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.addCustom":"\u6DFB\u52A0\u81EA\u5B9A\u4E49\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.add":"\u6DFB\u52A0","monkeys.design.capability.recordEditor.mapping.addHint":"\u5C06\u9009\u4E2D\u7684\u90E8\u95E8\u52A0\u5165\u5F53\u524D\u5F52\u5E76","monkeys.design.capability.recordEditor.mapping.removeHint":"\u5C06\u9009\u4E2D\u7684\u90E8\u95E8\u79FB\u51FA\u5F53\u524D\u5F52\u5E76","monkeys.design.capability.recordEditor.mapping.currentTarget":"\u5F53\u524D\u5F52\u5E76\uFF1A{name}","monkeys.design.capability.recordEditor.mapping.invalid":"\u5F52\u5E76\u914D\u7F6E\u65E0\u6548\uFF0C\u8BF7\u68C0\u67E5\u540D\u79F0\u548C\u90E8\u95E8\u5F52\u5C5E\u3002","monkeys.design.capability.recordEditor.mapping.invalidName":"\u8BF7\u8F93\u5165\u6709\u6548\u540D\u79F0\u3002","monkeys.design.capability.recordEditor.mapping.alreadyAssigned":"\u8BE5\u90E8\u95E8\u5DF2\u7ECF\u5F52\u5165\u5176\u4ED6\u5F52\u5E76\u90E8\u95E8\u3002","monkeys.design.capability.recordEditor.mapping.unavailable":"\u8BE5\u90E8\u95E8\u5F53\u524D\u4E0D\u53EF\u6DFB\u52A0\u3002","monkeys.design.capability.recordEditor.mapping.added":"\u5DF2\u5411\u201C{name}\u201D\u52A0\u5165 {count} \u4E2A\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.removed":"\u5DF2\u4ECE\u201C{name}\u201D\u79FB\u51FA {count} \u4E2A\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.deleted":"\u5DF2\u5220\u9664\u201C{name}\u201D",[E.numericSeries.inspect]:"\u67E5\u770B\u89C2\u6D4B\u70B9",[E.numericSeries.noPoints]:"\u6B64\u8303\u56F4\u5185\u6CA1\u6709\u89C2\u6D4B\u70B9",[E.numericSeries.point]:"{xLabel} {x}, {yLabel} {y}",[E.numericSeries.label]:"\u6570\u503C\u5E8F\u5217",[E.numericSeries.description]:"\u67E5\u770B\u6570\u503C\u89C2\u6D4B\uFF0C\u7F29\u653E\u8303\u56F4\u5E76\u653E\u5927\u56FE\u8868\u3002",[E.numericSeries.start]:"\u8303\u56F4\u8D77\u70B9",[E.numericSeries.end]:"\u8303\u56F4\u7EC8\u70B9",[E.numericSeries.reset]:"\u91CD\u7F6E\u8303\u56F4",[E.numericSeries.expand]:"\u653E\u5927\u56FE\u8868",[E.numericSeries.close]:"\u5173\u95ED\u56FE\u8868",[E.shellLayout.resizeSidebar]:"\u8C03\u6574\u4FA7\u8FB9\u680F\u5BBD\u5EA6",[E.shellLayout.collapseSidebar]:"\u6536\u8D77\u4FA7\u8FB9\u680F",[E.shellLayout.expandSidebar]:"\u5C55\u5F00\u4FA7\u8FB9\u680F",[E.shellLayout.resizeAside]:"\u8C03\u6574\u8BE6\u60C5\u4FA7\u8FB9\u680F\u5BBD\u5EA6",[E.ontologyNavigator.moreActions]:"\u66F4\u591A\u64CD\u4F5C",[E.dataToolbar.addRow]:"\u6DFB\u52A0\u4E00\u884C",[E.dataToolbar.blankRowName]:"\u7A7A\u767D\u884C",[E.ontologyTrendMatrix.label]:"\u672C\u4F53\u8D8B\u52BF\u77E9\u9635",[E.ontologyTrendMatrix.row]:"\u884C",[E.ontologyTrendMatrix.window]:"\u5F53\u524D\u663E\u793A\u7B2C {start}-{end} \u884C\uFF0C\u5171 {total} \u884C",[E.ontologyTrendMatrix.select]:"\u9009\u62E9 {row}\u3001{column}\u3001{value}",[E.dataContextBar.label]:"\u6570\u636E\u7B5B\u9009\u4E0E\u94BB\u53D6\u4E0A\u4E0B\u6587",[E.dataContextBar.filter]:"\u7B5B\u9009",[E.dataContextBar.searchLabel]:"\u641C\u7D22\u6570\u636E",[E.dataContextBar.searchPlaceholder]:"\u641C\u7D22",[E.dataContextBar.clear]:"\u6E05\u9664",[E.dataContextBar.clearAll]:"\u5168\u90E8\u6E05\u9664",[E.dataContextBar.tagFilterClear]:"\u6E05\u7A7A",[E.dataContextBar.filterDescription]:"\u901A\u8FC7\u6807\u7B7E\u9762\u677F\u6216\u624B\u52A8\u641C\u7D22\uFF0C\u9009\u62E9\u7528\u4E8E\u8FC7\u6EE4\u8D44\u4EA7\u7684 Tag\u3002",[E.dataContextBar.tagScope]:"\u6807\u7B7E\u8303\u56F4",[E.dataContextBar.currentViewTags]:"\u5F53\u524D\u89C6\u56FE",[E.dataContextBar.allTags]:"\u5168\u90E8\u6807\u7B7E",[E.dataContextBar.panelFilter]:"\u9762\u677F\u7B5B\u9009",[E.dataContextBar.searchTags]:"\u641C\u7D22\u6807\u7B7E",[E.dataContextBar.noAvailableTags]:"\u6682\u65E0\u53EF\u7528\u6807\u7B7E",[E.dataContextBar.loadedAll]:"\u5DF2\u52A0\u8F7D\u5168\u90E8",[E.dataContextBar.refreshTags]:"\u5237\u65B0\u6807\u7B7E",[E.dataContextBar.confirm]:"\u786E\u5B9A",[E.dataContextBar.tagPanel]:"\u6807\u7B7E\u9762\u677F",[E.dataContextBar.selectPanel]:"\u9009\u62E9\u6807\u7B7E\u9762\u677F",[E.dataContextBar.noPanels]:"\u6682\u65E0\u53EF\u7528\u6807\u7B7E\u9762\u677F",[E.dataContextBar.noPanelGroups]:"\u5F53\u524D\u9762\u677F\u6CA1\u6709\u6807\u7B7E\u7EC4",[E.dataContextBar.singleSelect]:"\u5355\u9009",[E.dataContextBar.multiSelect]:"\u591A\u9009",[E.dataContextBar.defaultGroup]:"\u9ED8\u8BA4\u6807\u7B7E\u7EC4",[E.dataContextBar.more]:"\u53E6\u6709 {count} \u9879",[E.dataContextBar.dashboardContext]:"\u4EEA\u8868\u76D8\u4E0A\u4E0B\u6587",[E.dataContextBar.contextCount]:"{count} \u9879\u4E0A\u4E0B\u6587",[E.dataContextBar.fields.search]:"\u641C\u7D22",[E.dataContextBar.fields.tagIds]:"\u6807\u7B7E",[E.dataContextBar.fields.tagGroupIds]:"\u6807\u7B7E\u7EC4",[E.dataContextBar.fields.timeFrom]:"\u5F00\u59CB\u65F6\u95F4",[E.dataContextBar.fields.timeTo]:"\u7ED3\u675F\u65F6\u95F4",[E.dataContextBar.fields.clickedField]:"\u94BB\u53D6\u5B57\u6BB5",[E.dataContextBar.fields.clickedValue]:"\u94BB\u53D6\u503C",[E.dataContextBar.fields.dashboardDrilldown]:"\u4EEA\u8868\u76D8\u94BB\u53D6"})});var mm={ar:r(()=>import('@emoji-mart/data/i18n/ar.json'),"ar"),be:r(()=>import('@emoji-mart/data/i18n/be.json'),"be"),cs:r(()=>import('@emoji-mart/data/i18n/cs.json'),"cs"),de:r(()=>import('@emoji-mart/data/i18n/de.json'),"de"),en:r(()=>import('@emoji-mart/data/i18n/en.json'),"en"),es:r(()=>import('@emoji-mart/data/i18n/es.json'),"es"),fa:r(()=>import('@emoji-mart/data/i18n/fa.json'),"fa"),fi:r(()=>import('@emoji-mart/data/i18n/fi.json'),"fi"),fr:r(()=>import('@emoji-mart/data/i18n/fr.json'),"fr"),hi:r(()=>import('@emoji-mart/data/i18n/hi.json'),"hi"),it:r(()=>import('@emoji-mart/data/i18n/it.json'),"it"),ja:r(()=>import('@emoji-mart/data/i18n/ja.json'),"ja"),ko:r(()=>import('@emoji-mart/data/i18n/ko.json'),"ko"),nl:r(()=>import('@emoji-mart/data/i18n/nl.json'),"nl"),pl:r(()=>import('@emoji-mart/data/i18n/pl.json'),"pl"),pt:r(()=>import('@emoji-mart/data/i18n/pt.json'),"pt"),ru:r(()=>import('@emoji-mart/data/i18n/ru.json'),"ru"),sa:r(()=>import('@emoji-mart/data/i18n/sa.json'),"sa"),tr:r(()=>import('@emoji-mart/data/i18n/tr.json'),"tr"),uk:r(()=>import('@emoji-mart/data/i18n/uk.json'),"uk"),vi:r(()=>import('@emoji-mart/data/i18n/vi.json'),"vi"),zh:r(()=>import('@emoji-mart/data/i18n/zh.json'),"zh")};function wk({language:e,disabled:t,onSelect:o}){let n=Ne(),[a,i]=lt.useState(0),[s,u]=lt.useState(false),[c,d]=lt.useState(),g=lt.useRef({disabled:t,onSelect:o});g.current={disabled:t,onSelect:o};let m=lt.useRef(true);lt.useEffect(()=>(m.current=true,()=>{m.current=false;}),[]),lt.useEffect(()=>{let b=false;return u(false),Promise.all([import('@emoji-mart/react'),import('@emoji-mart/data'),mm[e]()]).then(([v,y,x])=>{b||d({Picker:v.default,data:y.default,i18n:x.default});}).catch(()=>{b||u(true);}),()=>{b=true;}},[e,a]);let p=Ai[e==="zh"?"zh-CN":"en-US"];if(s)return jsxRuntime.jsxs("div",{role:"alert",className:"flex items-center gap-2 text-sm",children:[p["monkeys.design.emojiPanel.unavailable"],jsxRuntime.jsx(ve,{disabled:t,onClick:()=>i(b=>b+1),children:p["monkeys.design.iconPicker.retry"]})]});if(!c)return jsxRuntime.jsx("div",{role:"status",className:"text-sm text-muted-foreground",children:p["monkeys.design.emojiPanel.loading"]});let{Picker:f}=c;return jsxRuntime.jsx("fieldset",{"data-monkeys-component":"emoji-panel",disabled:t,"aria-disabled":t,className:"min-w-0 [&_em-emoji-picker]:h-80 [&_em-emoji-picker]:w-full [&_em-emoji-picker]:shadow-none",style:{pointerEvents:t?"none":void 0},children:jsxRuntime.jsx(f,{locale:e,data:c.data,i18n:c.i18n,theme:n["data-monkeys-theme-mode"]==="dark"?"dark":"light",dynamicWidth:true,maxFrequentRows:1,navPosition:"bottom",previewPosition:"none",onEmojiSelect:b=>{m.current&&!g.current.disabled&&b&&typeof b=="object"&&"native"in b&&typeof b.native=="string"&&b.native.length>0&&b.native.length<=64&&g.current.onSelect(b.native);}})})}r(wk,"LocalizedEmojiPanel");function pm({locale:e,disabled:t=false,onSelect:o}){let n=xt(),a=(e??n.locale).toLowerCase().split("-")[0],i=Object.prototype.hasOwnProperty.call(mm,a)?a:"en";return jsxRuntime.jsx(wk,{language:i,disabled:t,onSelect:o},i)}r(pm,"EmojiPanel");function Nl(e){if(!e||typeof e!="object"||!("locale"in e)||typeof e.locale!="string"||!("disabled"in e)||typeof e.disabled!="boolean"||!("onSelect"in e)||typeof e.onSelect!="function")throw new TypeError("Invalid emoji picker context.");let t=e.onSelect;return jsxRuntime.jsx(pm,{locale:e.locale,disabled:e.disabled,onSelect:o=>t(o)})}r(Nl,"renderIconPickerEmoji");var ra=5*1024*1024*1024;function gm(e,t){if(!t?.trim())return true;let o=e.name.toLowerCase(),n=e.type.toLowerCase();return t.split(",").some(a=>{let i=a.trim().toLowerCase();return /^\.[a-z0-9][a-z0-9._-]*$/.test(i)?o.endsWith(i):/^[a-z0-9!#$&^_.+-]+\/\*$/.test(i)?n.startsWith(i.slice(0,-1)):/^[a-z0-9!#$&^_.+-]+\/[a-z0-9!#$&^_.+-]+$/.test(i)&&n===i})}r(gm,"filePickerAccepts");function bm(e){if(!e||typeof e!="object"||Array.isArray(e))return;let t=e;if(!(Object.keys(t).length!==4||typeof t.handleId!="string"||t.handleId.length<1||t.handleId.length>256||typeof t.fileName!="string"||t.fileName.length<1||t.fileName.length>1024||typeof t.mimeType!="string"||t.mimeType.length>256||typeof t.size!="number"||!Number.isInteger(t.size)||t.size<0||t.size>ra))return {handleId:t.handleId,fileName:t.fileName,size:t.size,mimeType:t.mimeType}}r(bm,"readTransientFileMetadata");var ym=".png,.jpg,.jpeg,.webp,.svg";function Pk({compactActions:e=false,model:t,onIntent:o,renderEmojiPicker:n=Nl,transientFiles:a,translate:i,catalogSource:s}){let{locale:u}=xt(),c=s??(!t.icons.length&&!t.categories.length?runtime.defaultIconPickerCatalogSource:void 0),d=r(N=>{let D=i?.(N);return D&&D!==N?D:Ai[u.toLowerCase().startsWith("zh")?"zh-CN":"en-US"][N]??N},"translate"),[g,m]=lt.useState(),[p,f]=lt.useState("idle"),[b,v]=lt.useState(0);lt.useEffect(()=>{if(!c||!t.open||t.mode!=="icon"||g?.source===c)return;let N=new AbortController;return f("loading"),c.load(N.signal).then(D=>{N.signal.aborted||(m({source:c,value:D}),f("idle"));}).catch(()=>{N.signal.aborted||f("error");}),()=>N.abort()},[c,t.open,t.mode,b]);let y=c?{...t,...g?.source===c?g.value:{},loading:t.loading||p==="loading",errorCode:t.errorCode??(p==="error"?"monkeys.design.iconPicker.catalogFailed":void 0)}:t,x=lt.useRef(null),w=lt.useRef(null),[h,k]=lt.useState(false),C=r(()=>{let N=w.current;w.current=null,N?.registry.discard(N.handleId);},"release");lt.useEffect(()=>()=>C(),[a]),lt.useEffect(()=>{y.open||C();},[y.open]);let T=y.disabled===true||y.uploading===true,S=r(N=>{T||o(N);},"emit"),I=r(()=>{T||(C(),o({type:"open-change",open:false,mode:y.mode}));},"close"),R=y.value.kind==="emoji"?y.value.value:y.defaultValue.kind==="emoji"?y.defaultValue.value:"\u{1F340}",W=y.value.kind==="emoji"?y.value.backgroundColor:y.backgroundColors[0],H=r((N,D=W)=>{!N||N.length>64||S({type:"change",value:{kind:"emoji",value:N,...D?{backgroundColor:D}:{}}});},"chooseEmoji"),L=[...new Map(y.customIcons.map(N=>[N.id,N])).values()].slice(0,50),F=y.search.trim().toLowerCase(),$=y.categoryId==="custom-upload",M=($?L:y.icons).filter(N=>($||y.categoryId==="all"||N.categoryIds?.includes(y.categoryId))&&(!F||N.id.toLowerCase().includes(F)||N.tags?.some(D=>D.toLowerCase().includes(F)))),G=r(N=>{T||o({type:"open-change",open:y.open,mode:N});},"changeMode"),Y=r((N,D,B,K)=>e?jsxRuntime.jsx(xr,{content:d(N),portal:true,children:jsxRuntime.jsx(ve,{label:d(N),iconOnly:true,icon:D,disabled:T,"aria-pressed":K,active:K,onClick:B})}):jsxRuntime.jsx(ve,{type:"button",disabled:T,"aria-pressed":K,active:K,onClick:B,children:d(N)}),"action");return jsxRuntime.jsx("section",{"data-monkeys-component":"icon-picker",className:"flex items-center",children:jsxRuntime.jsxs(Wd,{open:y.open,modal:false,onOpenChange:N=>{N?S({type:"open-change",open:true,mode:y.mode}):I();},children:[jsxRuntime.jsx(Ld,{asChild:true,children:jsxRuntime.jsx(ve,{type:"button","aria-label":d("monkeys.design.iconPicker.choose"),disabled:T,className:"gap-2 px-2",endIcon:jsxRuntime.jsx(lucideReact.ChevronDown,{"aria-hidden":"true",className:"h-3.5 w-3.5 text-muted-foreground"}),children:jsxRuntime.jsx(On,{icon:y.value,alt:d("monkeys.design.iconPicker.current"),className:"h-6 w-6 rounded-sm bg-transparent text-xl text-current"})})}),jsxRuntime.jsxs(as,{align:"start",sideOffset:8,collisionPadding:12,"aria-label":d("monkeys.design.iconPicker.choose"),className:"flex w-96 max-w-[calc(100vw-24px)] flex-col gap-3 overflow-y-auto p-3",style:{maxHeight:"var(--radix-popover-content-available-height)",transformOrigin:"var(--radix-popover-content-transform-origin)"},onOpenAutoFocus:N=>{y.mode==="icon"&&x.current&&(N.preventDefault(),x.current.focus());},onEscapeKeyDown:N=>{T&&N.preventDefault();},onInteractOutside:N=>{T&&N.preventDefault();},children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[Y("monkeys.design.iconPicker.emoji",jsxRuntime.jsx(lucideReact.Smile,{className:"h-4 w-4"}),()=>G("emoji"),y.mode==="emoji"),Y("monkeys.design.iconPicker.icon",jsxRuntime.jsx(lucideReact.Shapes,{className:"h-4 w-4"}),()=>G("icon"),y.mode==="icon"),jsxRuntime.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[Y("monkeys.design.iconPicker.reset",jsxRuntime.jsx(lucideReact.RotateCcw,{className:"h-4 w-4"}),()=>{T||(o({type:"change",value:y.defaultValue}),o({type:"reset"}),I());}),Y("monkeys.design.iconPicker.close",jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"}),I)]})]}),y.mode==="emoji"?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[n({locale:u,disabled:T,onSelect:r(N=>{T||!N||N.length>64||(H(N),I());},"onSelect")}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2 empty:hidden","aria-label":d("monkeys.design.iconPicker.background"),children:y.backgroundColors.map(N=>jsxRuntime.jsx(ve,{className:"h-7 w-7 rounded-md border p-0",type:"button",disabled:T,"aria-label":N,"aria-pressed":N===W,style:{backgroundColor:N},onClick:()=>H(R,N),children:jsxRuntime.jsx("span",{className:"sr-only",children:d("monkeys.design.iconPicker.background")})},N))})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(to,{ref:x,"aria-label":d("monkeys.design.iconPicker.search"),placeholder:d("monkeys.design.iconPicker.search"),disabled:T,value:y.search,onChange:N=>S({type:"search",value:N.currentTarget.value})}),jsxRuntime.jsx("div",{className:"flex shrink-0 gap-1 overflow-x-auto pb-1","aria-label":d("monkeys.design.iconPicker.categories"),children:y.categories.filter(N=>N.id!=="custom-upload"||a||y.customIcons.length).map(N=>jsxRuntime.jsx(ve,{type:"button",className:"shrink-0",size:"sm",variant:"ghost",disabled:T,active:N.id===y.categoryId,"aria-pressed":N.id===y.categoryId,onClick:()=>S({type:"category-change",categoryId:N.id}),children:Dn(N.labelI18n,u)},N.id))}),$?jsxRuntime.jsxs("label",{children:[d("monkeys.design.iconPicker.upload"),jsxRuntime.jsx(to,{type:"file",accept:ym,disabled:T||!a,onChange:N=>{let D=N.currentTarget.files?.[0];if(N.currentTarget.value="",!D||T||!a)return;let B=y.maxUploadBytes??ra;if(!Number.isInteger(B)||B<1||B>ra||D.size>B||!gm(D,ym)){k(true);return}C(),k(false);try{let K=a.register(D),J=bm(K);if(!J){typeof K?.handleId=="string"&&a.discard(K.handleId),k(!0);return}w.current={registry:a,handleId:J.handleId},o({type:"upload",...J});}catch{C(),k(true);}}})]}):null,h?jsxRuntime.jsx("div",{role:"alert",children:d("monkeys.design.iconPicker.uploadFailed")}):null,y.loading?jsxRuntime.jsx("div",{role:"status",children:d("monkeys.design.iconPicker.loading")}):y.errorCode?jsxRuntime.jsxs("div",{role:"alert",children:[d(y.errorCode),jsxRuntime.jsx(ve,{disabled:T,onClick:()=>{v(N=>N+1),S({type:"retry"});},children:d("monkeys.design.iconPicker.retry")})]}):jsxRuntime.jsxs("div",{className:"grid min-h-0 max-h-64 grid-cols-7 gap-1 overflow-auto",onKeyDown:N=>{let D=Array.from(N.currentTarget.querySelectorAll("button:not(:disabled)")),B=D.indexOf(N.target);if(B<0)return;let K={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7}[N.key],J=N.key==="Home"?0:N.key==="End"?D.length-1:K===void 0?void 0:Math.max(0,Math.min(D.length-1,B+K));J!==void 0&&(N.preventDefault(),D[J]?.focus());},children:[M.map(N=>jsxRuntime.jsxs(ve,{className:"relative h-10 min-w-0 p-1",variant:"ghost",active:JSON.stringify(N.icon)===JSON.stringify(y.value),type:"button",title:N.id,"aria-label":N.id,disabled:T,onClick:()=>{T||(o({type:"change",value:N.icon}),I());},children:[jsxRuntime.jsx(On,{icon:N.icon,alt:N.id,className:"h-7 w-7 rounded-sm bg-transparent text-2xl text-current"}),jsxRuntime.jsx("span",{className:"sr-only",children:N.id})]},N.id)),M.length?null:jsxRuntime.jsx("p",{className:"col-span-7 py-3 text-center text-sm text-muted-foreground",children:d("monkeys.design.iconPicker.empty")})]})]})]})]})})}r(Pk,"IconPicker");function Ml(e){return [...e].sort((t,o)=>t.layout.y-o.layout.y||t.layout.x-o.layout.x).slice(0,12).map(t=>t.id)}r(Ml,"initialLayoutCanvasMountedIds");function Ek(e,t,o){if(![e,t,o].every(Number.isFinite))throw new TypeError("Invalid layout mount count.");if(e=Math.max(0,Math.floor(e)),!e)return 0;t=Math.min(e,Math.max(0,Math.floor(t))),o=Math.min(e,Math.max(0,Math.floor(o)));let n=e>=120?24:e>=80?32:e>=48?40:48,a=Math.max(o,Math.min(t,n)),i=Math.max(8,Math.ceil(a*.75));return Math.min(e,Math.max(Math.min(e,18),Math.min(n,a+i)))}r(Ek,"layoutCanvasRetainedMountLimit");function xm(e){let t=new Set(e.items.map(s=>s.id));if(t.size!==e.items.length)throw new TypeError("Layout widget IDs must be unique.");let o=new Set(e.visibleIds.filter(s=>t.has(s))),n=Ml(e.items),a=Ek(t.size,o.size,n.length);if(e.mode==="run")return {retainedOrder:[],mountedIds:[...o],limit:a};let i=[...new Set(e.retainedOrder.filter(s=>t.has(s)))];i.length||i.push(...n);for(let s of [...o,e.selectedWidgetId,e.draggingWidgetId,e.resizingWidgetId]){if(!s||!t.has(s))continue;let u=i.indexOf(s);u>=0&&i.splice(u,1),i.push(s);}for(;i.length>a;){let s=i.findIndex(u=>!o.has(u));if(s<0)break;i.splice(s,1);}return {retainedOrder:i,mountedIds:[...new Set([...i,...o])],limit:a}}r(xm,"projectLayoutCanvasMounting");function Sm({items:e,mode:t,selectedWidgetId:o,draggingWidgetId:n,resizingWidgetId:a,renderItem:i}){let s=lt.useRef(null),u=JSON.stringify(e.map(v=>[v.id,v.layout.x,v.layout.y])),[c,d]=lt.useState(()=>Ml(e)),[g,m]=lt.useState([]),p=lt.useMemo(()=>xm({items:e,mode:t,visibleIds:c,retainedOrder:g,selectedWidgetId:o,draggingWidgetId:n,resizingWidgetId:a}),[u,t,c,g,o,n,a]),f=JSON.stringify(p.retainedOrder);lt.useEffect(()=>{m(v=>JSON.stringify(v)===f?v:p.retainedOrder);},[f]),lt.useEffect(()=>{let v=s.current;if(!v)return;if(typeof IntersectionObserver>"u"){d(e.map(h=>h.id));return}let y=true,x=new Map;d([]);let w=new IntersectionObserver(h=>{if(!y)return;for(let C of h){let T=C.target.dataset.layoutMountId;T&&x.set(T,C.isIntersecting);}let k=[...x].filter(([,C])=>C).map(([C])=>C);d(C=>JSON.stringify(C)===JSON.stringify(k)?C:k);},{root:null,rootMargin:`${720}px 0px ${720}px 0px`,threshold:0});for(let h of v.children)w.observe(h);return ()=>{y=false,w.disconnect();}},[u]);let b=new Set(p.mountedIds);return jsxRuntime.jsx("div",{ref:s,"data-layout-grid":true,className:"grid",style:{gridTemplateColumns:"repeat(24,minmax(0,1fr))",gridAutoRows:28,gap:12},children:e.map(v=>jsxRuntime.jsx("div",{"data-layout-mount-id":v.id,style:{gridColumn:`${v.layout.x+1} / span ${v.layout.w}`,gridRow:`${v.layout.y+1} / span ${v.layout.h}`,minWidth:0,minHeight:0},children:i(v,b.has(v.id))},v.id))})}r(Sm,"LayoutCanvasGrid");var Oi="application/x-monkeys-layout-catalog-item";var Zn={columns:24,rowHeight:28,gap:12,maxRows:100,minimum:4},Bl=r((e,t)=>e.x<t.x+t.w&&e.x+e.w>t.x&&e.y<t.y+t.h&&e.y+e.h>t.y,"overlap");function Hi(e,t=[]){let o=[],n=r(()=>{o.length&&t.push(o),o=[];},"flush");for(let a of e)a.type==="widget"?o.push(a.widgetId):(n(),a.type==="section"?Hi(a.children,t):a.tabs.forEach(i=>Hi(i.children,t)));return n(),t}r(Hi,"runs");var wo=zod.z.string().min(1).max(256).refine(e=>!["__proto__","constructor","prototype"].includes(e)),Fi=zod.z.string().max(8192),Lk=zod.z.union([zod.z.object({type:zod.z.enum(["widget","section","tabs"]),id:wo}).strict(),zod.z.object({type:zod.z.literal("tab"),id:wo,tabsId:wo}).strict()]),Pl=zod.z.lazy(()=>zod.z.union([zod.z.object({type:zod.z.literal("widget"),id:wo,widgetId:wo}).strict(),zod.z.object({type:zod.z.literal("section"),id:wo,title:Fi.optional(),description:Fi.optional(),children:zod.z.array(Pl)}).strict(),zod.z.object({type:zod.z.literal("tabs"),id:wo,title:Fi.optional(),size:zod.z.enum(["large","small"]).optional(),behavior:zod.z.enum(["switch","anchor"]).optional(),tabs:zod.z.array(zod.z.object({id:wo,label:Fi.optional(),target:Lk.optional(),children:zod.z.array(Pl)}).strict())}).strict()])),Ak=zod.z.object({x:zod.z.number().int().min(0),y:zod.z.number().int().min(0),w:zod.z.number().int().min(4).max(24),h:zod.z.number().int().min(4).max(100),minW:zod.z.number().int().min(4).max(24),minH:zod.z.number().int().min(4).max(100)}).strict().refine(e=>e.w>=e.minW&&e.h>=e.minH&&e.x+e.w<=24&&e.y+e.h<=100),zk=zod.z.object({version:zod.z.literal(1),revision:wo,root:zod.z.array(Pl),widgets:zod.z.record(wo,zod.z.object({layout:Ak}).strict())}).strict();function Xn(e){let t=0,o=new Set,n=r((g,m)=>{if(g&&typeof g=="object"){if(m>64||++t>8192||o.has(g))throw new TypeError("Layout nesting budget exceeded.");o.add(g);for(let p of Object.values(g))n(p,m+1);o.delete(g);}},"bound");n(e,0);let a=zk.parse(e),i=new Set,s=new Set,u=0,c=r(()=>{throw new TypeError("Invalid layout canvas model.")},"fail"),d=r((g,m)=>{m>16&&c();for(let p of g)if((i.has(p.id)||++u>512)&&c(),i.add(p.id),p.type==="widget")(s.has(p.widgetId)||!Object.prototype.hasOwnProperty.call(a.widgets,p.widgetId))&&c(),s.add(p.widgetId);else if(p.type==="section")d(p.children,m+1);else for(let f of p.tabs)(i.has(f.id)||++u>512)&&c(),i.add(f.id),d(f.children,m+1);},"visit");d(a.root,0),Object.keys(a.widgets).some(g=>!s.has(g))&&c();for(let g of Hi(a.root))for(let m=0;m<g.length;m++)for(let p=0;p<m;p++)Bl(a.widgets[g[m]].layout,a.widgets[g[p]].layout)&&c();}r(Xn,"validateLayoutCanvasModel");function Vi(e,t){if(Xn(e),t.type==="remove"){let u=[],c=false,d=r(b=>{for(let v of b)v.type==="widget"?u.push(v.widgetId):v.type==="section"?d(v.children):v.tabs.forEach(y=>d(y.children));},"collect"),g=r(b=>b.flatMap(v=>v.id===t.nodeId?(c=true,d([v]),[]):v.type==="section"?[{...v,children:g(v.children)}]:v.type==="tabs"?[{...v,tabs:v.tabs.flatMap(y=>y.id===t.nodeId?(c=true,d(y.children),[]):[{...y,children:g(y.children)}])}]:[v]),"remove"),m=g(e.root);if(!c)throw new TypeError("Unknown layout node.");let p=new Set(u),f={...e,root:m,widgets:Object.fromEntries(Object.entries(e.widgets).filter(([b])=>!p.has(b)))};return Xn(f),{model:f,removedWidgetIds:u}}let o=e.widgets[t.widgetId];if(!o)throw new TypeError("Unknown layout widget.");let n={...o.layout,...t.type==="move"?{x:t.x,y:t.y}:{w:t.w,h:t.h}};if(!Object.values(n).every(Number.isSafeInteger)||n.w<n.minW||n.h<n.minH||n.w>24||n.h>100||n.x<0||n.y<0||n.x+n.w>24||n.y+n.h>100)throw new RangeError("Layout operation exceeds grid bounds.");let a=(Hi(e.root).find(u=>u.includes(t.widgetId))??[]).filter(u=>u!==t.widgetId).map(u=>e.widgets[u].layout),i=a.some(u=>Bl(n,u))?void 0:n;if(!i){let u=1/0;for(let c=0;c<=100-n.h;c++)for(let d=0;d<=24-n.w;d++){let g={...n,x:d,y:c},m=Math.abs(c-n.y)*1e3+Math.abs(d-n.x)*100+c*10+d;m<u&&!a.some(p=>Bl(g,p))&&(i=g,u=m);}}if(!i)throw new RangeError("No available layout position.");let s={...e,widgets:{...e.widgets,[t.widgetId]:{...o,layout:i}}};return Xn(s),{model:s,removedWidgetIds:[]}}r(Vi,"applyLayoutCanvasOperation");function Hk({model:e,mode:t,widgetOrder:o,children:n,selectedNodeId:a,currentTabs:i={},disabled:s=false,labels:u,allowedCatalogItemIds:c=[],draggingCatalogItemId:d,onInsertRequest:g,onReorder:m,onSelect:p,onChange:f,onTabChange:b,onOperationError:v,className:y}){Xn(e);let x=lt.Children.toArray(n);if(o.length!==x.length||new Set(o).size!==o.length||o.length!==Object.keys(e.widgets).length||o.some(j=>!Object.prototype.hasOwnProperty.call(e.widgets,j)))throw new TypeError("Layout widget content must map each widget exactly once.");let w=new Map(o.map((j,Z)=>[j,x[Z]])),h=lt.useRef(null),k=lt.useRef(e);k.current=e;let C=lt.useRef({id:d,model:e});C.current.id!==d&&(C.current={id:d,model:e});let T=lt.useRef(),[S,I]=lt.useState(),R=lt.useRef(),[W,H]=lt.useState(),[L,F]=lt.useState(),$=lt.useRef();lt.useEffect(()=>{R.current=void 0,$.current=void 0,T.current=void 0,I(void 0),H(void 0),F(void 0);},[e,s,t]);let M=r(()=>!!(d&&d.trim().length>0&&d.length<=256&&!/[\u0000-\u001f\u007f-\u009f]/.test(d)&&!["__proto__","prototype","constructor"].includes(d)&&c.includes(d)&&C.current.model===e),"validCatalog"),G=r((j,Z,te,ae=e)=>{s||t!=="edit"||ae!==k.current||j===Z||!e.root.some(le=>le.id===j)||!e.root.some(le=>le.id===Z)||m?.({sourceNodeId:j,targetNodeId:Z,position:te,expectedRevision:ae.revision});},"reorder"),Y=r(j=>t==="edit"&&e.root.some(Z=>Z.id===j)&&m?jsxRuntime.jsx("button",{type:"button","data-layout-reorder":j,draggable:!s,disabled:s,"aria-label":u.reorder??u.move,onDragStart:Z=>{if(s){Z.preventDefault();return}T.current={id:j,model:e},Z.dataTransfer.setData("application/x-monkeys-layout-root-node",j),Z.dataTransfer.effectAllowed="move";},onDragEnd:()=>{T.current=void 0,I(void 0);},onKeyDown:Z=>{let te=e.root.findIndex(A=>A.id===j),ae=Z.key==="ArrowUp"?-1:Z.key==="ArrowDown"?1:0;if(!ae)return;Z.preventDefault();let le=e.root[te+ae];le&&G(j,le.id,ae<0?"before":"after");},children:u.reorder??u.move}):null,"reorderHandle"),N=r(j=>{if(t!=="edit"||!g&&!(j.type==="root"&&m))return null;let Z=JSON.stringify(j);return jsxRuntime.jsx("div",{"data-layout-insert-target":Z,"data-layout-insert-type":j.type,"data-layout-insert-index":j.index,"data-layout-section-id":j.type==="section"?j.sectionId:void 0,"data-layout-tabs-id":j.type==="tab"?j.tabsId:void 0,"data-layout-tab-id":j.type==="tab"?j.tabId:void 0,"data-drop-preview":S===Z||void 0,"aria-label":u.insert??u.move,className:S===Z?"min-h-4 border-2 border-primary bg-primary/10":"min-h-2",onDragOver:te=>{s||!(M()||j.type==="root"&&T.current?.model===e)||(te.preventDefault(),te.stopPropagation(),I(Z));},onDragLeave:()=>I(void 0),onDrop:te=>{if(te.preventDefault(),te.stopPropagation(),I(void 0),s||t!=="edit"||k.current!==e)return;let ae=T.current;if(ae&&j.type==="root"){if(T.current=void 0,te.dataTransfer.getData("application/x-monkeys-layout-root-node")!==ae.id)return;let A=e.root[j.index]??e.root[e.root.length-1];A&&G(ae.id,A.id,j.index<e.root.length?"before":"after",ae.model);return}let le=te.dataTransfer.getData(Oi);M()&&le===d&&g?.({catalogItemId:le,target:j,expectedRevision:e.revision});},children:S===Z?u.insert??u.move:null},`drop:${Z}`)},"dropZone"),D=r((j,Z)=>{if(!(s||t!=="edit"||R.current===j)){if(k.current!==j){v?.({code:"stale-model",revision:j.revision});return}try{let te=Vi(j,Z);f&&(R.current=j),f?.({expectedRevision:j.revision,...te,reason:Z.type});}catch{v?.({code:"invalid-operation",revision:j.revision});}}},"commit"),B=r((j,Z,te)=>{if(s||t!=="edit"||j.button!==0)return;let le=j.currentTarget.closest("[data-layout-grid]")?.getBoundingClientRect().width??0;if(le<=0)return;let A=e.widgets[Z].layout;$.current={pointerId:j.pointerId,x:j.clientX,y:j.clientY,width:le,model:e,operation:te==="move"?{type:te,widgetId:Z,x:A.x,y:A.y}:{type:te,widgetId:Z,w:A.w,h:A.h}},j.currentTarget.setPointerCapture(j.pointerId),j.preventDefault();},"begin"),K=r((j,Z)=>{let te=$.current;if(!te||te.pointerId!==j.pointerId)return;if(k.current!==te.model||s||t!=="edit"){$.current=void 0,H(void 0);return}let ae=Math.round((j.clientX-te.x)/((te.width+Zn.gap)/Zn.columns)),le=Math.round((j.clientY-te.y)/(Zn.rowHeight+Zn.gap)),A=te.operation,me=A.type==="move"?{...A,x:A.x+ae,y:A.y+le}:A.type==="resize"?{...A,w:A.w+ae,h:A.h+le}:A;if(Z)$.current=void 0,H(void 0),D(te.model,me);else try{H(Vi(te.model,me).model);}catch{H(void 0);}},"update"),J=W??e,V=r(j=>jsxRuntime.jsx("button",{type:"button",disabled:s,onClick:()=>F({nodeId:j,model:e}),children:u.remove}),"remove"),Q=r((j,Z)=>{let te=[],ae=[],le=r(()=>{if(!ae.length)return;let A=ae.flatMap(me=>me.type==="widget"?[{id:me.widgetId,node:me,layout:J.widgets[me.widgetId].layout}]:[]);ae=[],te.push(jsxRuntime.jsx(Sm,{items:A,mode:t,selectedWidgetId:A.find(me=>me.node.id===a)?.id,renderItem:({node:me},P)=>{let _=J.widgets[me.widgetId].layout,re=r(fe=>jsxRuntime.jsx("button",{type:"button",disabled:s,"aria-label":u[fe],style:{touchAction:"none"},onPointerDown:ye=>B(ye,me.widgetId,fe),onPointerMove:ye=>K(ye,false),onPointerUp:ye=>K(ye,true),onPointerCancel:()=>{$.current=void 0,H(void 0);},onKeyDown:ye=>{let xe={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]}[ye.key];xe&&(ye.preventDefault(),D(e,fe==="move"?{type:fe,widgetId:me.widgetId,x:_.x+xe[0],y:_.y+xe[1]}:{type:fe,widgetId:me.widgetId,w:_.w+xe[0],h:_.h+xe[1]}));},children:u[fe]}),"controls");return jsxRuntime.jsxs("div",{"data-layout-widget":me.widgetId,"data-selected":a===me.id||void 0,className:"h-full min-h-0 min-w-0 overflow-auto rounded border border-border","data-layout-node-id":me.id,children:[N({...Z,index:j.indexOf(me)}),t==="edit"?jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx("button",{type:"button",disabled:s,onClick:()=>p?.({nodeId:me.id,revision:e.revision}),children:me.widgetId}),Y(me.id),re("move"),re("resize"),V(me.id)]}):null,P?w.get(me.widgetId):null]},me.id)}},A[0].id));},"flush");for(let A of j){if(A.type==="widget"){ae.push(A);continue}if(le(),te.push(N({...Z,index:j.indexOf(A)})),A.type==="section")te.push(jsxRuntime.jsxs("section",{"data-layout-node-id":A.id,className:"space-y-3",children:[jsxRuntime.jsxs("header",{children:[jsxRuntime.jsx("h3",{children:t==="edit"?jsxRuntime.jsx("button",{disabled:s,onClick:()=>p?.({nodeId:A.id,revision:e.revision}),children:A.title??A.id}):A.title??A.id}),A.description?jsxRuntime.jsx("p",{children:A.description}):null,Y(A.id),t==="edit"?V(A.id):null]}),Q(A.children,{type:"section",sectionId:A.id})]},A.id));else {let me=i[A.id]??A.tabs[0]?.id;te.push(jsxRuntime.jsxs("section",{"data-layout-node-id":A.id,children:[jsxRuntime.jsx("h3",{children:t==="edit"?jsxRuntime.jsx("button",{disabled:s,onClick:()=>p?.({nodeId:A.id,revision:e.revision}),children:A.title??A.id}):A.title??A.id}),Y(A.id),t==="edit"?V(A.id):null,jsxRuntime.jsx("div",{role:"tablist",children:A.tabs.map(P=>jsxRuntime.jsx("button",{type:"button",role:"tab","aria-selected":me===P.id,disabled:s,onClick:()=>{if(t==="edit"&&p?.({nodeId:P.id,revision:e.revision}),b?.({tabsId:A.id,tabId:P.id,revision:e.revision}),A.behavior!=="anchor"||!P.target)return;let _=P.target;_.type==="tab"&&b?.({tabsId:_.tabsId,tabId:_.id,revision:e.revision}),requestAnimationFrame(()=>{let re=h.current?.querySelectorAll("[data-layout-node-id], [data-layout-widget], [data-layout-tab-id]");(re&&[...re].find(ye=>_.type==="widget"?ye.dataset.layoutWidget===_.id:_.type==="tab"?ye.dataset.layoutTabId===_.id&&ye.dataset.layoutTabsId===_.tabsId:ye.dataset.layoutNodeId===_.id))?.scrollIntoView({behavior:typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth",block:"start",inline:"nearest"});});},children:P.label??P.id},P.id))}),A.tabs.map(P=>jsxRuntime.jsx("div",{role:"tabpanel","data-layout-tab-id":P.id,"data-layout-tabs-id":A.id,hidden:A.behavior!=="anchor"&&me!==P.id,children:Q(P.children,{type:"tab",tabsId:A.id,tabId:P.id})},P.id))]},A.id));}}return le(),te.push(N({...Z,index:j.length})),te},"nodes");return jsxRuntime.jsxs("div",{ref:h,className:y,"data-layout-canvas":true,children:[Q(J.root,{type:"root"}),jsxRuntime.jsx(Ta,{open:!!L,onOpenChange:j=>{j||F(void 0);},children:jsxRuntime.jsxs(mn,{children:[jsxRuntime.jsx(br,{children:u.confirmRemove}),jsxRuntime.jsx(fr,{children:u.removeDescription}),jsxRuntime.jsx("button",{type:"button",onClick:()=>F(void 0),children:u.cancel}),jsxRuntime.jsx("button",{type:"button",disabled:s,onClick:()=>{L&&D(L.model,{type:"remove",nodeId:L.nodeId}),F(void 0);},children:u.remove})]})})]})}r(Hk,"LayoutCanvas");function Gk({catalogItemId:e,disabled:t=false,children:o,className:n,onInsertRequest:a,onDragStateChange:i}){if(typeof e!="string"||!e.trim()||e.length>256||/[\u0000-\u001f\u007f-\u009f]/.test(e)||["__proto__","prototype","constructor"].includes(e))throw new TypeError("Invalid layout catalog item ID.");let s=lt.useRef(),u=lt.useRef(false),c=r(()=>{let d=s.current;s.current=void 0,d&&d.notify?.({catalogItemId:d.catalogItemId,active:false});},"finish");return lt.useEffect(()=>()=>c(),[e,t]),jsxRuntime.jsx("button",{type:"button",className:n,disabled:t,draggable:!t,onPointerDown:()=>{s.current||(u.current=false);},onKeyDown:d=>{!s.current&&(d.key==="Enter"||d.key===" ")&&(u.current=false);},onClick:d=>{if(t||u.current){d.preventDefault();return}a?.({catalogItemId:e});},onDragStart:d=>{if(t){d.preventDefault();return}c(),d.dataTransfer.clearData(),d.dataTransfer.setData(Oi,e),d.dataTransfer.effectAllowed="copy",u.current=true,s.current={catalogItemId:e,notify:i},i?.({catalogItemId:e,active:true});},onDragEnd:c,children:o})}r(Gk,"LayoutCatalogItem");function $k({value:e,tokens:t,disabled:o=false,readOnly:n=false,ariaLabel:a,tokenGroupLabel:i,maxLength:s,onChange:u}){let c=lt.useRef(null),d=lt.useRef(false),g=lt.useRef();lt.useLayoutEffect(()=>{let p=g.current;p&&(o||n||e!==p.previous&&e!==p.value?g.current=void 0:e===p.value&&(g.current=void 0,c.current?.focus(),c.current?.setSelectionRange(p.caret,p.caret)));},[e,o,n]),lt.useLayoutEffect(()=>()=>{g.current=void 0;},[]);let m=r(p=>s===void 0||p.length<=s,"fits");return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("textarea",{ref:c,value:e,disabled:o,readOnly:n,"aria-label":a,maxLength:s,onCompositionStart:()=>{d.current=true,g.current=void 0;},onCompositionEnd:()=>{d.current=false;},onChange:p=>{g.current=void 0,!o&&!n&&m(p.currentTarget.value)&&u?.({value:p.currentTarget.value});}}),jsxRuntime.jsx("div",{role:"group","aria-label":i,children:t.map((p,f)=>jsxRuntime.jsx("button",{type:"button",disabled:o||n||p.disabled,onMouseDown:b=>b.preventDefault(),onClick:()=>{let b=c.current;if(!b||o||n||p.disabled||d.current||g.current)return;let v=b.selectionStart,y=b.selectionEnd,x=e.slice(0,v)+p.value+e.slice(y);!m(x)||x===e||(g.current={previous:e,value:x,caret:v+p.value.length},u?.({value:x}));},children:p.label},f))})]})}r($k,"TemplateTextEditor");function Kk({model:e,labels:t,locale:o,timeZone:n,disabled:a=false,loading:i=false,onIntent:s}){let{locale:u}=xt(),c=a||i,d=e.repositories.find(p=>p.id===e.selectedRepositoryId),g=r(p=>{c||s?.({...p,scopeId:e.scopeId,expectedRevision:e.revision});},"emit"),m;try{m=new Intl.DateTimeFormat(o??u,{dateStyle:"medium",timeStyle:"short",timeZone:n});}catch{}return jsxRuntime.jsxs("section",{"aria-busy":i,className:"flex min-h-0 flex-col gap-3 text-sm",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("label",{children:[t.repositories,jsxRuntime.jsxs(po,{"aria-label":t.repositories,disabled:c,value:e.selectedRepositoryId??"",onChange:p=>g({action:"select-repository",repositoryId:p.currentTarget.value}),children:[jsxRuntime.jsx("option",{value:"",disabled:true,children:t.repositories}),e.repositories.map(p=>jsxRuntime.jsx("option",{value:p.id,children:p.name},p.id))]})]}),jsxRuntime.jsx(ve,{size:"sm",disabled:c,onClick:()=>g({action:"refresh"}),children:t.refresh})]}),i&&jsxRuntime.jsx("p",{role:"status",children:t.loading}),d?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("dl",{className:"flex flex-wrap gap-3",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("dt",{children:t.branch}),jsxRuntime.jsx("dd",{children:d.branch??"\u2014"})]}),d.upstream&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("dt",{children:t.upstream}),jsxRuntime.jsx("dd",{children:d.upstream})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("dt",{children:t.ahead}),jsxRuntime.jsx("dd",{children:d.ahead??0})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("dt",{children:t.behind}),jsxRuntime.jsx("dd",{children:d.behind??0})]})]}),jsxRuntime.jsx("h3",{children:t.status}),d.changes.length===0&&jsxRuntime.jsx("p",{children:t.empty}),jsxRuntime.jsx("ul",{className:"flex flex-col gap-1",children:d.changes.map(p=>jsxRuntime.jsxs("li",{className:"flex flex-wrap items-center gap-2",children:[jsxRuntime.jsx(bn,{label:p.status}),jsxRuntime.jsx("span",{className:"min-w-0 break-all",children:p.path}),p.indexStatus&&jsxRuntime.jsx("code",{children:p.indexStatus}),p.worktreeStatus&&jsxRuntime.jsx("code",{children:p.worktreeStatus}),jsxRuntime.jsx(ve,{size:"sm",disabled:c,onClick:()=>g({action:"open-file",repositoryId:d.id,path:p.path}),children:t.openFile}),jsxRuntime.jsx(ve,{size:"sm",disabled:c,onClick:()=>g({action:"open-diff",repositoryId:d.id,path:p.path}),children:t.openDiff})]},p.path))}),jsxRuntime.jsx("h3",{children:t.history}),d.commits.length===0&&jsxRuntime.jsx("p",{children:t.empty}),jsxRuntime.jsx("ol",{className:"flex flex-col gap-2",children:d.commits.map(p=>{let f=e.expandedCommitIds.includes(p.id),b=p.date?new Date(p.date):void 0,v=b&&Number.isFinite(b.getTime());return jsxRuntime.jsxs("li",{children:[jsxRuntime.jsxs(ve,{size:"sm",disabled:c,"aria-expanded":f,onClick:()=>g({action:"toggle-commit",repositoryId:d.id,commitId:p.id,expanded:!f}),children:[p.shortId," ",p.message]}),jsxRuntime.jsxs("div",{className:"flex flex-wrap gap-2",children:[jsxRuntime.jsx("span",{children:p.author}),v&&m?jsxRuntime.jsx("time",{dateTime:b.toISOString(),children:m.format(b)}):jsxRuntime.jsx("span",{children:t.unknownDate}),p.refs?.map(y=>jsxRuntime.jsx(bn,{label:y},y))]}),f&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("ul",{children:p.files.slice(0,8).map(y=>jsxRuntime.jsxs("li",{className:"flex gap-2",children:[jsxRuntime.jsx("span",{className:"break-all",children:y.path}),y.status&&jsxRuntime.jsx(bn,{label:y.status})]},y.path))}),p.files.length>8&&jsxRuntime.jsxs("p",{children:[t.remainingFiles,": ",p.files.length-8]})]})]},p.id)})})]}):jsxRuntime.jsx("p",{children:t.empty})]})}r(Kk,"RuntimeSourceControlView");var Al=1e4,Uk=Al+2,Bm=1024*1024,Ll=r(e=>typeof e=="string"&&e.trim().length>0&&e.length<=256&&!/[\u0000-\u001f\u007f-\u009f]/.test(e),"validId");function Mm(e){if(e.length>Al)return "ORDERED_SELECTION_LIMIT_EXCEEDED";if(e.some(t=>!Ll(t))||new Set(e).size!==e.length)return "ORDERED_SELECTION_INVALID_MODEL";if(new TextEncoder().encode(JSON.stringify(e)).byteLength>Bm)return "ORDERED_SELECTION_BYTES_EXCEEDED"}r(Mm,"validateOrderedSelection");function qk(e){return jsxRuntime.jsx(Yk,{...e},JSON.stringify([e.model.scopeId,e.model.revision]))}r(qk,"OrderedSelection");function Yk({model:e,onIntent:t,translate:o}){let{locale:n}=xt(),[a,i]=lt.useState(()=>[...e.selectedIds]),[s,u]=lt.useState(e.search??""),[c,d]=lt.useState(""),[g,m]=lt.useState(()=>Mm(e.selectedIds)),[p,f]=lt.useState(0),b=lt.useRef(a),v=lt.useRef(new Set),y=lt.useRef(new Map),x=lt.useRef(true),w=lt.useRef();lt.useEffect(()=>(x.current=true,()=>{x.current=false;}),[]);let h=!!(e.pending||e.readOnly||e.loading),k=lt.useRef({blocked:h,model:e});k.current={blocked:h,model:e};let C=r(V=>{x.current&&!k.current.blocked&&t(V);},"emit"),T=e.append&&!v.current.has(e.append.revision)?e.append.rows:[],S=[...e.candidates??[],...T],I=new Set(b.current),R=(e.append?.rows??[]).filter(V=>I.has(V.id));for(let V of [...(e.selectedRows??[]).filter(Q=>I.has(Q.id)),...R,...S])Ll(V.id)&&y.current.set(V.id,V);let W=new Set([...b.current,...S.map(V=>V.id)]);for(let V of y.current.keys())W.has(V)||y.current.delete(V);let H=r(V=>{let Q=e.groups??[];if(Q.length>Uk||Q.some(te=>!Ll(te.id))||new Set(Q.map(te=>te.id)).size!==Q.length)return "ORDERED_SELECTION_INVALID_MODEL";let j=new Map;for(let te of V)j.set(te,y.current.get(te)??{id:te});for(let te of S)j.set(te.id,te);return new TextEncoder().encode(JSON.stringify({selectedIds:V,rows:[...j.values()],groups:Q})).byteLength>Bm?"ORDERED_SELECTION_BYTES_EXCEEDED":void 0},"displayIssue"),L=r(V=>{let Q=y.current.get(V);return Q?.labelI18n?Dn(Q.labelI18n,n):Q?.labelKey?o(Q.labelKey):Q?.label||V},"label"),F=r((V,Q=false)=>{let j=y.current.get(V),te=[j?.descriptionI18n?Dn(j.descriptionI18n,n):j?.descriptionKey?o(j.descriptionKey):j?.description,j?.showId?V:void 0].filter(ae=>ae!==void 0&&ae!=="").join(" \xB7 ");return jsxRuntime.jsxs("span",{className:"min-w-0 flex-1 overflow-hidden",children:[jsxRuntime.jsxs("span",{className:"block truncate",children:[L(V),Q&&j?.missing?` (${o("Unavailable")})`:""]}),te?jsxRuntime.jsx("span",{className:"block truncate text-xs text-muted-foreground",title:te,children:te}):null]})},"rowText"),$=e.selectionMode==="single"?1:Math.min(1e4,e.maxSelected??1e4),M=e.minSelected??0,G=r(V=>{if(k.current.blocked||!x.current)return false;let j=(V.length>$?"ORDERED_SELECTION_LIMIT_EXCEEDED":Mm(V))??H(V);return j?(m(j),C({type:"error",scopeId:e.scopeId,code:j}),false):(b.current=V,m(void 0),i(V),C({type:"change",scopeId:e.scopeId,expectedRevision:e.revision,selectedIds:[...V],selectedCount:V.length}),true)},"commit");lt.useEffect(()=>{!e.append||e.append.rows.length===0||h||v.current.has(e.append.revision)||G([...new Set([...a,...e.append.rows.map(V=>V.id)])])&&v.current.add(e.append.revision);},[e.append,h,a]);let Y=r((V,Q)=>{let j=a.indexOf(V);if(j<0||Q<0||Q>=a.length||j===Q)return;let Z=[...a];Z.splice(j,1),Z.splice(Q,0,V),G(Z);},"move"),N=r(()=>C({type:"search",scopeId:e.scopeId,value:s.trim()}),"searchNow"),B=!Number.isSafeInteger(M)||!Number.isSafeInteger($)||M<0||$<0||M>$?"ORDERED_SELECTION_INVALID_MODEL":H(a),K=B??g??(e.errorCode&&/^[A-Z][A-Z0-9_]{0,127}$/.test(e.errorCode)?e.errorCode:e.errorCode?"ORDERED_SELECTION_INVALID_MODEL":void 0),J=Math.min(p,Math.max(0,a.length-1));return jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-col gap-3","data-ordered-selection":e.scopeId,children:[K?jsxRuntime.jsx("p",{role:"alert",children:o(K)}):null,e.loading?jsxRuntime.jsx("p",{role:"status",children:o("Loading")}):null,e.mode==="ids"?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Rr,{"aria-label":o("IDs"),disabled:h,value:c,onChange:V=>d(V.target.value)}),jsxRuntime.jsx(ve,{disabled:h,onClick:()=>{G([...new Set([...a,...c.split(/[\s,;]+/).filter(Boolean)])]);},children:o("Add")})]}):jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[e.groupId!==void 0?jsxRuntime.jsx(po,{"aria-label":o("Group"),value:e.groupId,disabled:h||e.canBrowse===false,onChange:V=>C({type:"group-change",scopeId:e.scopeId,value:V.currentTarget.value}),children:(e.groups??[]).map(V=>jsxRuntime.jsx("option",{value:V.id,children:V.labelI18n?Dn(V.labelI18n,n):V.labelKey?o(V.labelKey):V.label||V.id},V.id))}):null,jsxRuntime.jsx(to,{"aria-label":o("Search"),value:s,disabled:h||e.canBrowse===false,onChange:V=>u(V.target.value),onKeyDown:V=>{V.key==="Enter"&&(V.preventDefault(),N());}}),jsxRuntime.jsx(ve,{disabled:h||e.canBrowse===false,onClick:N,children:o("Search")}),e.allowCreate?jsxRuntime.jsx(ve,{disabled:h,onClick:()=>C({type:"create",scopeId:e.scopeId}),children:o("Create")}):null,jsxRuntime.jsx("div",{className:"w-full space-y-2","data-ordered-candidates":true,style:{maxHeight:384,overflowY:"auto"},children:(e.candidates??[]).map(V=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("label",{className:"flex min-w-0 flex-1 items-center gap-2",children:[jsxRuntime.jsx(pn,{disabled:h||V.disabled,checked:a.includes(V.id),onChange:Q=>G(Q.currentTarget.checked?e.selectionMode==="single"?[V.id]:[...new Set([...a,V.id])]:a.filter(j=>j!==V.id))}),F(V.id)]}),e.allowCopy?jsxRuntime.jsx(ve,{disabled:h||V.disabled,onClick:()=>C({type:"copy",scopeId:e.scopeId,id:V.id}),children:o("Copy")}):null]},V.id))}),e.pagination?.hasMore&&e.pagination.nextCursor?jsxRuntime.jsx(ve,{disabled:h||e.canBrowse===false||e.pagination.loadingMore,onClick:()=>C({type:"load-more",scopeId:e.scopeId,cursor:e.pagination.nextCursor}),children:o("Load more")}):null]}),jsxRuntime.jsx(ve,{className:"self-start",disabled:h||a.length===0,onClick:()=>G([]),children:o("Clear")}),jsxRuntime.jsxs("div",{role:"status","aria-live":"polite",children:[a.length," / ",Al]}),jsxRuntime.jsx("div",{"data-ordered-viewport":true,style:{height:Math.min(384,a.length*48),overflowY:"auto"},onScroll:V=>f(Math.max(0,Math.floor(V.currentTarget.scrollTop/48)-2)),children:jsxRuntime.jsx("ol",{"aria-label":o("Selected"),style:{height:a.length*48,position:"relative",margin:0},children:a.slice(J,J+14).map((V,Q)=>{let j=J+Q;return jsxRuntime.jsxs("li",{"data-ordered-id":V,"aria-posinset":j+1,"aria-setsize":a.length,style:{position:"absolute",top:j*48,height:48,left:0,right:0,display:"flex",gap:8},onDragOver:Z=>{!h&&w.current&&Z.preventDefault();},onDrop:Z=>{Z.preventDefault(),w.current&&Z.dataTransfer.getData("application/x-monkeys-ordered-selection")===w.current&&Y(w.current,j),w.current=void 0;},children:[jsxRuntime.jsx(ve,{"data-ordered-drag":V,"aria-label":o("Move"),disabled:h,draggable:!h,onDragStart:Z=>{if(h)return Z.preventDefault();w.current=V,Z.dataTransfer.setData("application/x-monkeys-ordered-selection",V);},onDragEnd:()=>{w.current=void 0;},onKeyDown:Z=>{(Z.key==="ArrowUp"||Z.key==="ArrowDown")&&(Z.preventDefault(),Y(V,j+(Z.key==="ArrowUp"?-1:1)));},children:"\u2195"}),F(V,true),jsxRuntime.jsx(ve,{disabled:h||j===0,"aria-label":o("Move up"),onClick:()=>Y(V,j-1),children:"\u2191"}),jsxRuntime.jsx(ve,{disabled:h||j===a.length-1,"aria-label":o("Move down"),onClick:()=>Y(V,j+1),children:"\u2193"}),jsxRuntime.jsx(ve,{disabled:h,"aria-label":o("Remove"),onClick:()=>G(a.filter(Z=>Z!==V)),children:"\xD7"})]},V)})})}),jsxRuntime.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.showSubmit!==false?jsxRuntime.jsx(ve,{disabled:h||!!(g||B)||a.length<M||a.length>$,onClick:()=>C({type:"submit",scopeId:e.scopeId,expectedRevision:e.revision,selectedIds:[...a],selectedCount:a.length}),children:o("Save")}):null,e.showCancel!==false?jsxRuntime.jsx(ve,{disabled:h,onClick:()=>C({type:"cancel",scopeId:e.scopeId}),children:o("Cancel")}):null,e.errorCode?jsxRuntime.jsx(ve,{disabled:h,onClick:()=>C({type:"retry",scopeId:e.scopeId}),children:o("Retry")}):null]})]})}r(Yk,"SelectionDraft");var Qk={h1:r(({children:e})=>jsxRuntime.jsx("h1",{className:"mb-3 mt-6 text-xl font-bold first:mt-0",children:e}),"h1"),h2:r(({children:e})=>jsxRuntime.jsx("h2",{className:"mb-3 mt-6 text-lg font-semibold first:mt-0",children:e}),"h2"),h3:r(({children:e})=>jsxRuntime.jsx("h3",{className:"mb-2 mt-5 text-base font-semibold first:mt-0",children:e}),"h3"),h4:r(({children:e})=>jsxRuntime.jsx("h4",{className:"mb-2 mt-4 text-sm font-semibold first:mt-0",children:e}),"h4"),p:r(({children:e})=>jsxRuntime.jsx("p",{className:"my-3 break-words leading-6 first:mt-0 last:mb-0",children:e}),"p"),ul:r(({children:e})=>jsxRuntime.jsx("ul",{className:"my-3 list-disc space-y-1 pl-6",children:e}),"ul"),ol:r(({children:e})=>jsxRuntime.jsx("ol",{className:"my-3 list-decimal space-y-1 pl-6",children:e}),"ol"),li:r(({children:e})=>jsxRuntime.jsx("li",{className:"break-words leading-6",children:e}),"li"),blockquote:r(({children:e})=>jsxRuntime.jsx("blockquote",{className:"my-4 border-l-4 border-border bg-muted/35 px-4 py-1 text-muted-foreground",children:e}),"blockquote"),a:r(({children:e,href:t})=>jsxRuntime.jsx("a",{className:"break-all font-medium text-primary underline-offset-4 hover:underline",href:t,target:"_blank",rel:"noreferrer noopener",children:e}),"a"),pre:r(({children:e})=>jsxRuntime.jsx("pre",{className:"my-4 max-w-full overflow-x-auto rounded-lg border border-border/60 bg-muted/45 p-4 text-xs leading-5",children:e}),"pre"),code:r(({className:e,children:t})=>jsxRuntime.jsx("code",{className:l(e,"break-words rounded bg-muted px-1 py-0.5 font-mono text-[0.9em] [pre_&]:break-normal [pre_&]:bg-transparent [pre_&]:p-0"),children:t}),"code"),table:r(({children:e})=>jsxRuntime.jsx("div",{className:"my-4 max-w-full overflow-x-auto rounded-lg border border-border/60",children:jsxRuntime.jsx("table",{className:"min-w-full border-collapse text-sm",children:e})}),"table"),thead:r(({children:e})=>jsxRuntime.jsx("thead",{className:"bg-muted/55",children:e}),"thead"),tbody:r(({children:e})=>jsxRuntime.jsx("tbody",{className:"divide-y divide-border/60",children:e}),"tbody"),tr:r(({children:e})=>jsxRuntime.jsx("tr",{className:"divide-x divide-border/60",children:e}),"tr"),th:r(({children:e})=>jsxRuntime.jsx("th",{className:"whitespace-nowrap px-3 py-2 text-left font-semibold",children:e}),"th"),td:r(({children:e})=>jsxRuntime.jsx("td",{className:"min-w-32 px-3 py-2 align-top",children:e}),"td"),hr:r(()=>jsxRuntime.jsx("hr",{className:"my-6 border-border"}),"hr")};function ew({content:e,className:t}){let o=String(e||"").trim();return o?jsxRuntime.jsx("div",{className:l("min-w-0 max-w-full text-sm text-foreground",t),"data-monkeys-component":"markdown-content",children:jsxRuntime.jsx(Jk__default.default,{remarkPlugins:[Zk__default.default],components:Qk,skipHtml:true,urlTransform:Jk.defaultUrlTransform,children:o})}):jsxRuntime.jsx("div",{className:l("text-sm text-muted-foreground",t),children:"\u2014"})}r(ew,"MarkdownContent");function tw({viewMode:e="list",heading:t,metadata:o,message:n,actions:a,outputs:i,children:s,className:u,...c}){return jsxRuntime.jsxs("article",{...c,"data-monkeys-component":"workbench-task-card","data-view-mode":e,className:l("border-border/70 font-[family-name:var(--font-sans)] text-sm leading-5",e==="grid"?"flex h-full flex-col gap-global rounded-lg border bg-card p-global shadow-sm":"grid items-center gap-global border-b py-global last:border-b-0 lg:grid-cols-2",u),children:[jsxRuntime.jsxs("div",{"data-task-part":"details",className:l("flex min-w-0 flex-col",e==="grid"?"flex-1":"min-h-60"),children:[jsxRuntime.jsx("div",{className:"mb-global flex flex-wrap items-center gap-global",children:t}),o!=null&&jsxRuntime.jsx("div",{className:"mb-global flex flex-wrap items-center gap-global text-sm tabular-nums text-muted-foreground [&_span]:text-inherit [&_time]:text-inherit",children:o}),s,n!=null&&jsxRuntime.jsx("div",{className:"mt-global break-words text-sm text-destructive-text",children:n}),a!=null&&jsxRuntime.jsx("div",{className:"mt-auto flex flex-wrap gap-global pt-global",children:a})]}),i!=null&&jsxRuntime.jsx("div",{"data-task-part":"outputs",className:l("min-w-0 w-full",e==="grid"&&"-order-1"),children:i})]})}r(tw,"WorkbenchTaskCard");function iw({title:e,filters:t,sortOrder:o,viewMode:n,onSortOrderChange:a,onViewModeChange:i,labels:s,disabled:u,className:c}){return jsxRuntime.jsx(qs,{"data-monkeys-component":"workbench-task-toolbar",classNames:{root:"min-h-0 flex-row flex-wrap items-center gap-global border-0 p-0 font-[family-name:var(--font-sans)] text-sm leading-5",end:"max-w-full flex-wrap gap-global"},className:c,end:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[t,jsxRuntime.jsxs("div",{className:"flex items-center gap-global",children:[jsxRuntime.jsx(ve,{type:"button",variant:"outline",disabled:u,title:s.sort,icon:o==="latest"?jsxRuntime.jsx(lucideReact.ArrowDownWideNarrow,{}):jsxRuntime.jsx(lucideReact.ArrowUpNarrowWide,{}),className:"h-10 min-w-28 gap-global rounded-lg bg-muted/40 px-global py-global-1/2 text-sm font-medium shadow-none hover:bg-muted/70",onClick:()=>a(o==="latest"?"oldest":"latest"),children:o==="latest"?s.latest:s.oldest}),jsxRuntime.jsx(ve,{type:"button",variant:"outline",disabled:u,icon:n==="list"?jsxRuntime.jsx(lucideReact.Grid2X2,{}):jsxRuntime.jsx(lucideReact.LayoutList,{}),className:"h-10 gap-global rounded-lg bg-muted/40 px-global py-global-1/2 text-sm font-medium shadow-none hover:bg-muted/70",onClick:()=>i(n==="list"?"grid":"list"),children:n==="list"?s.gridView:s.listView})]})]}),children:e})}r(iw,"WorkbenchTaskToolbar");function lw({items:e=[],children:t,hasOutputs:o,viewMode:n="list",ariaLabel:a,previewLabel:i,processingLabel:s,processing:u=false,emptyState:c,onPreview:d,className:g}){let m=n==="grid"?"aspect-square w-full":"aspect-square w-[calc((100%-3*var(--global-spacing))/4)] min-w-32 max-w-48";return jsxRuntime.jsxs("div",{"data-monkeys-component":"workbench-task-outputs",role:"region","aria-label":a,tabIndex:0,className:l("flex w-full min-w-0 snap-x snap-proximity items-center gap-global overflow-x-auto py-global-1/2 font-[family-name:var(--font-sans)] text-sm leading-5 focus-visible:outline focus-visible:outline-2",g),children:[t,e.map(p=>p.kind==="media"?d?jsxRuntime.jsx("button",{type:"button",onClick:()=>d(p),"aria-label":p.previewLabel||i,className:l("flex shrink-0 snap-start items-center justify-center overflow-hidden rounded-lg border bg-muted/20 focus-visible:outline focus-visible:outline-2",m),children:p.content},p.id):jsxRuntime.jsx("div",{className:l("flex shrink-0 snap-start items-center justify-center overflow-hidden rounded-lg border bg-muted/20",m),children:p.content},p.id):jsxRuntime.jsx("pre",{className:"h-60 w-full min-w-0 shrink-0 snap-start overflow-auto whitespace-pre-wrap break-words rounded-lg border bg-muted/20 p-global font-[family-name:var(--font-sans)] text-sm leading-5",children:p.content},p.id)),!(o??(e.length>0||!!t))&&(u?jsxRuntime.jsx("div",{role:"status","aria-label":s,className:l("flex shrink-0 items-center justify-center rounded-lg border bg-gradient-to-br from-muted via-background to-muted",m),children:jsxRuntime.jsx("span",{"aria-hidden":"true",className:"size-16 animate-spin rounded-full border-[8px] border-muted-foreground/40 border-t-foreground motion-reduce:animate-none sm:size-20"})}):jsxRuntime.jsx("div",{className:"flex min-h-60 w-full items-center justify-center rounded-lg border border-dashed bg-muted/20 p-global text-center text-sm text-muted-foreground",children:c}))]})}r(lw,"WorkbenchTaskOutputs");function pw({src:e,kind:t,alt:o,expanded:n=false,loading:a=false,failed:i=false,loadingLabel:s,errorLabel:u,onError:c,renderMedia:d}){return d?jsxRuntime.jsx(jsxRuntime.Fragment,{children:d({src:e,kind:t,alt:o,expanded:n,loadingLabel:s,errorLabel:u})}):a?jsxRuntime.jsx("span",{role:"status","aria-label":s,children:jsxRuntime.jsx(lucideReact.Loader2,{"aria-hidden":"true",className:"size-6 animate-spin text-muted-foreground motion-reduce:animate-none"})}):i||!e||t==="3d"?jsxRuntime.jsx("span",{role:"img","aria-label":u,children:jsxRuntime.jsx(lucideReact.ImageOff,{"aria-hidden":"true",className:"size-6 text-muted-foreground"})}):t==="video"?jsxRuntime.jsxs("span",{className:n?"contents":"relative block size-full",children:[jsxRuntime.jsx("video",{src:e,"aria-label":o,controls:n,playsInline:true,preload:"metadata",onError:c,className:n?"max-h-[75vh] max-w-full":"size-full object-contain"}),!n&&jsxRuntime.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:jsxRuntime.jsx("span",{className:"flex size-12 items-center justify-center rounded-full bg-[hsl(var(--monkeys-color-media-overlay)/0.6)] shadow-md sm:size-14",children:jsxRuntime.jsx(lucideReact.Play,{className:"ml-0.5 size-5 !fill-[hsl(var(--monkeys-color-media-foreground))] !stroke-[hsl(var(--monkeys-color-media-foreground))] sm:size-6"})})})]}):jsxRuntime.jsx(gr,{src:e,alt:o,loading:"lazy",onError:c,className:n?"h-auto w-auto max-h-[75vh] max-w-full":void 0})}r(pw,"WorkbenchTaskMedia");function xw({text:e,labels:t,className:o}){let n=lt.useId(),a=lt.useRef(null),i=lt.useRef(null),[s,u]=lt.useState(false),[c,d]=lt.useState(false),[g,m]=lt.useState(false),[p,f]=lt.useState(false),[b,v]=lt.useState(3),y=e||t.empty;return lt.useEffect(()=>{u(false),m(false),f(false);},[y]),lt.useEffect(()=>{let x=i.current,w=a.current;if(!x||!w)return;let h=r(()=>{if(w.dataset.expanded==="true")return;let S=getComputedStyle(x),I=Number.parseFloat(S.lineHeight)||20,R=w.closest('[data-record-layout="horizontal"]'),W=!!R,H=W?w.closest('[data-record-part="details"]'):null,L=R?.querySelector('[data-record-part="media"]'),F=H?.getBoundingClientRect(),$=H?.offsetHeight&&F?.height?F.height/H.offsetHeight:1,M=H?Array.from(H.children).slice(Array.from(H.children).indexOf(w)+1).reduce((V,Q)=>{let j=getComputedStyle(Q),Z=j.marginTop==="auto"?0:Number.parseFloat(j.marginTop)||0,te=j.marginBottom==="auto"?0:Number.parseFloat(j.marginBottom)||0;return V+Q.getBoundingClientRect().height/$+Z+te},0):0,G=w.clientHeight||I*3+40;if(W&&H&&F){let V=w.getBoundingClientRect(),Q=getComputedStyle(H),j=Number.parseFloat(Q.minBlockSize)||H.clientHeight||F.height/$;G=Math.max(I,j-(V.top-F.top)/$-M);}else if(!W)G=w.clientHeight||I*3+40;else if(R&&L){let V=w.getBoundingClientRect(),Q=L.getBoundingClientRect(),j=V.top-Q.top;G=Math.max(G,Q.height-j);}let Y=W?x.clientWidth||x.getBoundingClientRect().width/$:x.getBoundingClientRect().width,N=x.cloneNode(true);N.style.cssText=["position:absolute","visibility:hidden","display:block","height:auto","max-height:none",`width:${Y}px`,"overflow:visible","flex:none","-webkit-line-clamp:unset"].join(";"),w.appendChild(N);let D=N.scrollHeight||x.scrollHeight;N.remove();let B=Math.max(I,G-40),K=W?3:Math.max(1,Math.floor(B/I)),J=W?D>I*3+1:D>B+1;v(K),d(J),f(W),m(true);},"measure");if(h(),typeof ResizeObserver>"u")return;let k=new ResizeObserver(h);k.observe(x),k.observe(w);let T=w.closest('[data-record-layout="horizontal"]')?.querySelector('[data-record-part="details"]');return T&&k.observe(T),()=>k.disconnect()},[y]),jsxRuntime.jsxs("div",{ref:a,"data-monkeys-component":"workbench-task-prompt","data-expanded":s||void 0,"data-overflowing":g&&p&&c?"true":void 0,className:l("flex min-h-0 min-w-0 flex-col font-[family-name:var(--font-sans)] text-sm leading-5",o),children:[jsxRuntime.jsx("p",{ref:i,id:n,className:l("min-h-0 flex-1 whitespace-pre-wrap break-words text-sm leading-5 text-foreground [overflow-wrap:anywhere]"),style:s||!c?void 0:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:b,overflow:"hidden"},children:y}),(c||s)&&jsxRuntime.jsxs("button",{type:"button","aria-expanded":s,"aria-controls":n,onClick:()=>u(x=>!x),className:"mt-global-1/2 inline-flex min-h-8 items-center gap-global-1/2 rounded-lg px-global-1/2 text-sm font-medium text-foreground underline underline-offset-4 hover:bg-muted focus-visible:outline focus-visible:outline-2",children:[s?t.less:t.more,s?jsxRuntime.jsx(lucideReact.ChevronUp,{"aria-hidden":"true",className:"size-4"}):jsxRuntime.jsx(lucideReact.ChevronDown,{"aria-hidden":"true",className:"size-4"})]})]})}r(xw,"WorkbenchTaskPrompt");function kw({kind:e="media",viewMode:t="list",text:o,previewLabel:n,downloadable:a=false,downloadLabel:i,downloading:s=false,children:u,onPreview:c,onDownload:d}){if(e==="text")return jsxRuntime.jsx("pre",{className:"h-60 w-full min-w-0 shrink-0 snap-start overflow-auto whitespace-pre-wrap break-words rounded-lg border bg-muted/20 p-global font-[family-name:var(--font-sans)] text-sm leading-5",children:o??u});let g=l("flex shrink-0 snap-start items-center justify-center overflow-hidden rounded-lg border bg-muted/20",t==="grid"?"aspect-square w-full":e==="file"?"aspect-square w-60 min-w-60 max-w-72":"aspect-square w-[calc((100%-3*var(--global-spacing))/4)] min-w-32 max-w-48");return e==="media"&&c&&!(a&&d)?jsxRuntime.jsx("button",{type:"button",className:l(g,"focus-visible:outline focus-visible:outline-2"),"aria-label":n,onClick:c,children:u}):jsxRuntime.jsx("div",{className:g,children:e==="media"&&a&&d?jsxRuntime.jsxs("div",{className:"group/task-output relative size-full",children:[c?jsxRuntime.jsx(ve,{type:"button",variant:"ghost",className:"flex size-full items-center justify-center rounded-none border-0 p-0 focus-visible:outline focus-visible:outline-2",classNames:{label:"size-full"},"aria-label":n,onClick:c,children:u}):u,jsxRuntime.jsx(ve,{icon:jsxRuntime.jsx(lucideReact.Download,{"aria-hidden":"true"}),iconOnly:true,size:"sm",ariaLabel:i,title:i,loading:s,disabled:s,stopPropagation:true,onClick:d,className:"absolute right-global-1/2 top-global-1/2 z-10 border shadow-sm opacity-0 transition-opacity group-hover/task-output:opacity-100 group-focus-within/task-output:opacity-100 data-[loading=true]:opacity-100 [@media(hover:none)]:opacity-100"})]}):u})}r(kw,"WorkbenchTaskOutputItem");function Rw({filename:e,preview:t,previewLabel:o,downloadLabel:n,downloading:a=false,disabled:i=false,onPreview:s,onDownload:u}){return jsxRuntime.jsxs("div",{className:"flex size-full min-h-0 flex-col font-[family-name:var(--font-sans)] text-sm leading-5","data-monkeys-component":"workbench-task-spreadsheet",children:[t?jsxRuntime.jsx("button",{type:"button",onClick:s,"aria-label":o,className:"flex min-h-0 flex-1 items-center justify-center p-global-1/2 focus-visible:outline focus-visible:outline-2",children:t}):jsxRuntime.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-global-1/2",children:jsxRuntime.jsx(lucideReact.FileSpreadsheet,{className:"size-10 text-green-600","aria-hidden":"true"})}),jsxRuntime.jsxs("div",{className:"flex shrink-0 items-center gap-global-1/2 border-t p-global-1/2",children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[jsxRuntime.jsx("p",{className:"line-clamp-2 break-all text-sm font-medium",title:e,children:e}),jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:"XLSX"})]}),jsxRuntime.jsx("button",{type:"button","aria-label":n,title:n,disabled:i||a||!u,onClick:u,className:"flex size-9 shrink-0 items-center justify-center rounded-lg border bg-background disabled:opacity-50 focus-visible:outline focus-visible:outline-2",children:a?jsxRuntime.jsx(lucideReact.Loader2,{className:"size-4 animate-spin motion-reduce:animate-none"}):jsxRuntime.jsx(lucideReact.Download,{className:"size-4"})})]})]})}r(Rw,"WorkbenchTaskSpreadsheet");function Mw({startTime:e,endTime:t,running:o=false,mode:n="absolute",className:a}){let{locale:i}=xt(),[s,u]=lt.useState(Date.now);lt.useEffect(()=>{if(n==="absolute"||n==="duration"&&!o)return;let f=setInterval(()=>{document.visibilityState==="visible"&&u(Date.now());},n==="duration"?1e3:1e4);return ()=>clearInterval(f)},[n,o]);let c=t&&t>0?t:e;if(!c||!Number.isFinite(c)||!Number.isFinite(new Date(c).getTime()))return null;if(n==="duration"){let f=t&&t>0?t:o?s:void 0;if(!e||!f||f<e)return null;let b=(f-e)/1e3;return jsxRuntime.jsx("span",{className:a,children:b<60?`${b.toFixed(2)}s`:b<3600?`${Math.floor(b/60)}m ${Math.floor(b%60)}s`:`${Math.floor(b/3600)}h ${Math.floor(b%3600/60)}m`})}let d=new Intl.DateTimeFormat(i,{dateStyle:"medium",timeStyle:"medium"}).format(c),g=Math.max(0,(s-c)/1e3),[m,p]=g<60?[g,"second"]:g<3600?[g/60,"minute"]:g<86400?[g/3600,"hour"]:[g/86400,"day"];return jsxRuntime.jsx("time",{className:a,dateTime:new Date(c).toISOString(),title:d,children:n==="absolute"?d:new Intl.RelativeTimeFormat(i,{numeric:"auto"}).format(-Math.floor(m),p)})}r(Mw,"WorkbenchTaskTime");function Ew({data:e,viewMode:t="list",title:o,openLabel:n,closeLabel:a,renderEditor:i}){let[s,u]=lt.useState(false),[c,d]=lt.useState(5),g=lt.useRef(null);return lt.useEffect(()=>{let m=g.current;if(!m)return;let p=r(()=>{let b=getComputedStyle(m),v=Number.parseFloat(b.lineHeight),y=Number.parseFloat(b.rowGap)||0;v>0&&d(Math.max(0,Math.floor((m.clientHeight+y)/(v+y))));},"measure");if(p(),typeof ResizeObserver>"u")return;let f=new ResizeObserver(p);return f.observe(m),()=>f.disconnect()},[]),jsxRuntime.jsxs("section",{className:"monkeys-task-measurements","data-view-mode":t,children:[jsxRuntime.jsxs("div",{className:"flex size-full flex-col gap-global overflow-hidden rounded-lg border border-border bg-background p-global text-left",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:e.garment_type||o}),jsxRuntime.jsx("dl",{ref:g,className:"grid min-h-0 w-full flex-1 grid-cols-[minmax(0,1fr)_auto] content-start gap-x-global gap-y-1 overflow-hidden text-sm leading-5",children:e.measurements_table.filter(m=>m.size!==null&&m.size!==0).slice(0,c).map((m,p)=>jsxRuntime.jsxs("div",{className:"contents",children:[jsxRuntime.jsx("dt",{className:"truncate",children:m.name}),jsxRuntime.jsxs("dd",{children:[m.size," ",m.unit]})]},p))}),jsxRuntime.jsx(ve,{label:n,onClick:()=>u(true)})]}),jsxRuntime.jsx(Ln,{open:s,onOpenChange:u,title:o,closeLabel:a,portal:true,className:"w-[min(60rem,95vw)] max-w-none",children:s&&jsxRuntime.jsx("div",{className:"max-h-[75vh] min-w-0 overflow-auto",children:i({data:e})})})]})}r(Ew,"WorkbenchMeasurementsPreview");function Fw({item:e,playLabel:t,selectionMode:o}){let[n,a]=lt.useState(false);if(lt.useEffect(()=>a(false),[e.thumbnailSrc,e.src]),e.notice||e.status==="blocked")return jsxRuntime.jsx("div",{className:"flex size-full items-center justify-center bg-muted p-2 text-center text-xs text-muted-foreground",children:e.notice});let i=n?e.src:e.thumbnailSrc||e.src;return i?e.mediaType==="video"?jsxRuntime.jsxs("div",{"data-history-video-surface":true,className:"group relative size-full bg-[hsl(var(--monkeys-color-media-surface))]",children:[jsxRuntime.jsx("video",{src:i,autoPlay:true,muted:true,playsInline:true,preload:"metadata",onLoadedMetadata:({currentTarget:s})=>{Number.isFinite(s.duration)&&s.duration>0&&(s.currentTime=Math.min(.1,s.duration/2));},onLoadedData:({currentTarget:s})=>{s.currentTime>0&&s.pause();},onSeeked:({currentTarget:s})=>s.pause(),className:"size-full object-contain","aria-label":e.alt}),jsxRuntime.jsx("div",{"data-history-video-overlay":true,"aria-hidden":"true",className:"pointer-events-none absolute inset-0 bg-[hsl(var(--monkeys-color-media-overlay)/0)] transition-colors duration-150 group-hover:bg-[hsl(var(--monkeys-color-media-overlay)/.25)] group-focus-within:bg-[hsl(var(--monkeys-color-media-overlay)/.25)]"}),jsxRuntime.jsx(ve,{ariaLabel:t,"data-history-play":true,tabIndex:o?-1:0,variant:"ghost",size:"lg",iconOnly:true,className:"monkeys-media-overlay-action absolute left-1/2 top-1/2 z-10 size-10 -translate-x-1/2 -translate-y-1/2 p-0 [--monkeys-component-media-action-radius:9999px] [--monkeys-component-media-action-opacity:.55] [--monkeys-component-media-action-hover-opacity:.7] focus-visible:ring-2 focus-visible:ring-[hsl(var(--monkeys-color-media-foreground))]",icon:jsxRuntime.jsx(lucideReact.Play,{className:"size-4 fill-current"})})]}):jsxRuntime.jsx("img",{src:i,alt:e.alt??"",loading:"lazy",onError:()=>{!n&&e.src&&i!==e.src&&a(true);},className:"size-full object-contain opacity-100"}):jsxRuntime.jsx("div",{className:"size-full bg-muted","aria-hidden":"true"})}r(Fw,"HistoryMedia");function Hw({items:e,loading:t=false,loadingMore:o=false,error:n,hasMore:a=false,pageKey:i,expanded:s,selectedIds:u,selectionMode:c,className:d,itemClassName:g,labels:m,busy:p=false,popupScale:f=1,panelClassName:b,buttonClassName:v,buttonVariant:y="outline",onRetry:x,onLoadMore:w,onExpandedChange:h,onSelectionModeChange:k,onSelectedIdsChange:C,onItemActivate:T,onDelete:S,onItemDragStart:I}){let R=lt.useRef(null),[W,H]=lt.useState(),[L,F]=lt.useState(false),[$,M]=lt.useState(false),[G,Y]=lt.useState([]),N=s??L,D=c??$,B=u??G,K=lt.useMemo(()=>new Set(B),[B]),J=lt.useRef(B);J.current=B;let V=Number.isFinite(f)&&f>0?f:1;lt.useLayoutEffect(()=>{if(!N||!R.current)return;let P=0,_=r(()=>{let ye=R.current?.getBoundingClientRect();ye&&H({left:ye.left,width:ye.width,bottom:Math.max(0,window.innerHeight-ye.bottom)});},"measure"),re=r(()=>{cancelAnimationFrame(P),P=requestAnimationFrame(_);},"schedule");_();let fe=typeof ResizeObserver=="function"?new ResizeObserver(re):void 0;return fe?.observe(R.current),window.addEventListener("resize",re),window.addEventListener("scroll",re,true),()=>{fe?.disconnect(),cancelAnimationFrame(P),window.removeEventListener("resize",re),window.removeEventListener("scroll",re,true);}},[N]),lt.useEffect(()=>{let P=new Set(e.map(re=>re.id)),_=B.filter(re=>P.has(re));_.length!==B.length&&(Y(_),C?.(_));},[e,B,C]);let Q=r(P=>{s===void 0&&F(P),h?.(P);},"setExpanded"),j=r(P=>{c===void 0&&M(P),k?.(P),P||Z([]);},"setSelection"),Z=r(P=>{J.current=P,u===void 0&&Y(P),C?.(P);},"updateSelection"),te=r(P=>{if(p||P.selectable===false)return;let _=J.current;Z(_.includes(P.id)?_.filter(re=>re!==P.id):[..._,P.id]);},"toggle"),ae=r(P=>{let _=K.has(P.id),re=P.selectable!==false&&!p;return jsxRuntime.jsxs("div",{"data-history-selection-key":P.id,"data-history-item-id":P.id,role:D?"checkbox":"button","aria-checked":D?_:void 0,"aria-label":D?P.label??m.selectItem:P.alt,"aria-disabled":(D?!re:P.disabled)||void 0,tabIndex:(D?re:!P.disabled)?0:void 0,draggable:!!(P.draggable&&!D&&!P.disabled),onDragStart:fe=>{if(!P.draggable||D||P.disabled){fe.preventDefault();return}I?.(fe,P);},onClick:fe=>{D?(fe.stopPropagation(),te(P)):P.disabled||T?.(P);},onKeyDown:fe=>{(fe.key===" "||fe.key==="Enter")&&(fe.preventDefault(),D?te(P):P.disabled||T?.(P));},...P.dataAttributes,className:l("group relative aspect-square min-w-0 overflow-hidden rounded-md border border-border/60 bg-transparent outline-hidden transition-[box-shadow,border-color,opacity] focus-visible:ring-2 focus-visible:ring-ring",_&&"border-primary ring-2 ring-primary/70",P.disabled&&"opacity-60",D&&re&&"cursor-pointer",g),children:[jsxRuntime.jsx(Fw,{item:P,playLabel:m.playVideo,selectionMode:D}),D&&re?jsxRuntime.jsx("span",{className:"pointer-events-none absolute right-1 top-1 z-10 flex items-center justify-center",children:jsxRuntime.jsx(pn,{checked:_,controlSize:"sm","aria-hidden":"true",tabIndex:-1,readOnly:true})}):null]},P.id)},"renderItem"),le=r(P=>jsxRuntime.jsx(on,{items:e,config:{getItemKey:r(_=>_.id,"getItemKey"),layout:{mode:P,cardWidth:P==="rail"?72:void 0,idealCardWidth:72,gap:8,getItemAspectRatio:r(()=>1,"getItemAspectRatio"),scrollOwner:"parent"},state:{loading:t,loadingMore:o&&a,hasMore:a},loading:{rootMargin:"1px",pageKey:i,variant:"spinner",autoFill:true},windowed:true,appearance:{hover:"none"},labels:{collection:m.ariaLabel,loading:m.loading,loadingMore:m.loadingMore,empty:m.empty}},classNames:{loadMore:"h-px min-h-0 overflow-hidden"},slots:{loadMore:jsxRuntime.jsx("span",{"aria-hidden":"true",className:"block h-px"})},callbacks:{onLoadMore:P==="grid"||!N?w:void 0},renderItem:ae}),"collection"),A=r((P,_,re,fe=false)=>jsxRuntime.jsx(ve,{icon:jsxRuntime.jsx(P,{className:"size-full"}),iconOnly:true,ariaLabel:_,size:"md",variant:y,className:v,disabled:fe,onClick:re}),"button"),me=jsxRuntime.jsxs("div",{role:"alert",className:"flex min-h-20 flex-col items-center justify-center gap-1 p-2 text-center text-sm",children:[jsxRuntime.jsx("span",{children:m.loadError}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:m.loadErrorDescription}),x?jsxRuntime.jsx(ve,{size:"sm",variant:"outline",label:m.retry,onClick:x}):null]});return jsxRuntime.jsxs("div",{ref:R,"data-workbench-history-result":true,className:l("relative w-full min-w-0 max-w-full rounded-lg",b,d),children:[e.length?jsxRuntime.jsxs("div",{className:"flex min-w-0 items-center gap-2 p-3",children:[A(N?lucideReact.Minimize2:lucideReact.Maximize2,N?m.collapse:m.expand,()=>Q(!N)),jsxRuntime.jsx("div",{className:"min-w-0 flex-1",children:le("rail")})]}):t?jsxRuntime.jsx(Yo,{title:m.loading,variant:"spinner",className:"min-h-20 p-2"}):n?me:jsxRuntime.jsx(Ba,{title:m.empty,className:"min-h-20 p-2"}),N&&typeof document<"u"?reactDom.createPortal(jsxRuntime.jsxs("div",{"data-history-expanded":true,className:l("fixed z-50 rounded-lg border border-border bg-card text-card-foreground shadow-xl",b),style:{left:W?.left??0,width:(W?.width??0)/V,bottom:W?.bottom??0,transform:`scale(${V})`,transformOrigin:"left bottom"},children:[jsxRuntime.jsxs("div",{className:"max-h-[50vh] overflow-y-auto p-3",style:{marginBottom:72,maxHeight:"50vh",overflowY:"auto"},children:[le("grid"),n&&e.length?jsxRuntime.jsxs("div",{role:"alert",className:"flex items-center gap-2 text-xs",children:[m.refreshError,x?jsxRuntime.jsx(ve,{size:"sm",label:m.retry,onClick:x}):null]}):null]}),jsxRuntime.jsxs("div",{className:"absolute inset-x-3 bottom-3 flex items-center justify-between gap-2",children:[A(lucideReact.Minimize2,m.collapse,()=>Q(false)),jsxRuntime.jsx("div",{className:"flex items-center gap-1.5",children:D?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"rounded-full border border-border px-2 py-1 text-xs",children:m.selectedCount}),A(lucideReact.X,m.exitSelection,()=>j(false),p),S?A(lucideReact.Trash2,m.deleteSelected,()=>{p||S(B);},!B.length||p):null]}):S?A(lucideReact.Trash2,m.enterSelection,()=>j(true),p):null})]})]}),document.body):null]})}r(Hw,"WorkbenchHistoryResult");function $w({open:e,title:t,description:o,name:n,nameLabel:a,namePlaceholder:i,createLabel:s,cancelLabel:u,closeLabel:c,creating:d=false,error:g,showError:m=true,className:p,onOpenChange:f,onNameChange:b,onCreate:v}){let y=lt.useId(),x=lt.useRef(null),[w,h]=lt.useState(false),[k,C]=lt.useState(null),T=lt.useRef(false),S=lt.useRef(false);lt.useEffect(()=>{e||(T.current=false,C(null),h(false));},[e]);let I=d,R=r(L=>{!I&&!S.current&&f?.(L);},"close"),W=r(async()=>{if(!(!n.trim()||I||S.current||T.current||!v)){S.current=true,h(true);try{await v();}finally{S.current=false;}}},"create"),H={radius:"lg"};return jsxRuntime.jsx(Ln,{open:e,onOpenChange:R,title:t,description:o,closeLabel:c,closeOnEscape:!I,closeOnOverlayClick:!I,showCloseButton:!I,portal:true,initialFocus:"explicit",initialFocusRef:x,className:p,classNames:{panel:"w-full max-w-[420px] gap-4 p-6",header:"border-0 p-0",title:"text-lg font-semibold leading-tight",description:"text-sm text-muted-foreground",body:"overflow-visible p-0",footer:"border-0 p-0"},footer:jsxRuntime.jsxs("div",{className:"flex justify-end gap-2",children:[jsxRuntime.jsx(ve,{size:"lg",appearance:H,className:"text-sm",disabled:I,onClick:()=>R(false),children:u}),jsxRuntime.jsx(ve,{size:"lg",tone:"primary",appearance:{...H,slots:{buttonPrimary:"border-primary bg-primary text-primary-foreground hover:bg-primary/90"}},className:"text-sm",loading:d,disabled:I||!n.trim(),onClick:W,children:s})]}),children:jsxRuntime.jsxs("div",{className:"space-y-4","data-monkeys-component":"create-collection-dialog",children:[jsxRuntime.jsxs("div",{className:"space-y-2 py-2",children:[jsxRuntime.jsx("label",{htmlFor:y,className:"text-sm font-medium leading-5",children:a}),jsxRuntime.jsx(pr,{ref:x,id:y,maxLength:80,"aria-label":a,placeholder:i,value:k??n,disabled:I,onCompositionStart:L=>{T.current=true,C(L.currentTarget.value);},onCompositionEnd:L=>{T.current=false,C(null),b?.(L.currentTarget.value);},onChange:L=>{T.current?C(L.currentTarget.value):b?.(L.currentTarget.value);},onKeyDown:L=>{L.key==="Enter"&&!L.nativeEvent.isComposing&&!T.current&&(L.preventDefault(),W());}})]}),w&&!d&&m&&g&&jsxRuntime.jsx("div",{role:"alert",className:"text-sm text-destructive-text",children:g})]})})}r($w,"WorkbenchCreateCollectionDialog");function Xw({open:e,items:t,selectedId:o,name:n,title:a,description:i,nameLabel:s,namePlaceholder:u,createLabel:c,confirmLabel:d,cancelLabel:g,closeLabel:m,loadingLabel:p,emptyLabel:f,loading:b=false,creating:v=false,adding:y=false,createError:x,confirmError:w,showCreateError:h=true,showConfirmError:k=true,className:C,onOpenChange:T,onSelectedIdChange:S,onNameChange:I,onCreate:R,onConfirm:W}){let H=lt.useId(),L=lt.useRef(null),F=lt.useRef(false),$=lt.useRef(false),[M,G]=lt.useState(null);lt.useEffect(()=>{e||(F.current=false);},[e]);let Y=v||y||M!==null,N=t.some(K=>K.id===o),D=r(K=>{!Y&&!$.current&&T?.(K);},"close"),B=r(async K=>{let J=K==="create"?R:W;if(!(Y||$.current||!J||(K==="create"?!n.trim()||F.current:!N))){$.current=true,G(K);try{await J();}catch{}finally{$.current=false,G(null);}}},"submit");return jsxRuntime.jsx(Ln,{open:e,onOpenChange:D,title:a,description:i,closeLabel:m,portal:true,closeOnEscape:!Y,closeOnOverlayClick:!Y,showCloseButton:!Y,initialFocus:"explicit",initialFocusRef:L,className:C,classNames:{panel:"w-full max-w-[480px] gap-global-2 p-6",header:"border-0 p-0",title:"text-lg font-semibold leading-tight",description:"text-sm text-muted-foreground",body:"-m-1 min-h-0 p-1",footer:"border-0 p-0"},footer:jsxRuntime.jsxs("div",{className:"flex justify-end gap-global",children:[jsxRuntime.jsx(ve,{variant:"outline",className:"h-10",appearance:{radius:"lg"},disabled:Y,onClick:()=>D(false),children:g}),jsxRuntime.jsx(ve,{variant:"outline",className:"h-10",appearance:{radius:"lg"},disabled:Y||!N,loading:y||M==="confirm",onClick:()=>B("confirm"),children:d})]}),children:jsxRuntime.jsxs("div",{className:"flex min-h-0 flex-col gap-global-2","data-monkeys-component":"add-to-collection-dialog","aria-busy":Y||b,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-global",children:[jsxRuntime.jsx(pr,{ref:L,id:H,"aria-label":s,placeholder:u,appearance:"shadow",className:"min-w-0 flex-1",value:n,disabled:Y,onChange:K=>I?.(K.currentTarget.value),onCompositionStart:()=>{F.current=true;},onCompositionEnd:()=>{F.current=false;},onKeyDown:K=>{K.key==="Enter"&&!K.nativeEvent.isComposing&&!F.current&&(K.preventDefault(),B("create"));}}),jsxRuntime.jsx(ve,{variant:"outline",appearance:{radius:"lg"},icon:jsxRuntime.jsx(lucideReact.FolderPlus,{}),className:"h-10 shrink-0",disabled:Y||!n.trim(),loading:v||M==="create",onClick:()=>B("create"),children:c})]}),h&&x&&jsxRuntime.jsx("p",{role:"alert",className:"text-sm text-destructive-text",children:x}),jsxRuntime.jsx("div",{className:"-m-1 flex max-h-80 min-h-0 flex-col gap-global overflow-y-auto p-1",role:"group","aria-label":a,children:t.length===0?jsxRuntime.jsx("p",{role:"status",className:"rounded-lg border border-dashed border-border px-global-2 py-global-2 text-center text-sm text-muted-foreground",children:b?p:f}):t.map(K=>jsxRuntime.jsx(ve,{variant:"outline",icon:jsxRuntime.jsx(lucideReact.FolderOpen,{className:"size-4 shrink-0","aria-hidden":"true"}),endIcon:o===K.id?jsxRuntime.jsx(lucideReact.Check,{className:"size-4 shrink-0","aria-hidden":"true"}):void 0,label:K.name,classNames:{label:"min-w-0 flex-1 truncate text-left"},"aria-pressed":o===K.id,disabled:Y,className:l("flex h-10 w-full shrink-0 items-center justify-start gap-global rounded-lg border px-global-2 py-global text-left text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",o===K.id?"border-foreground bg-muted text-foreground":"border-border bg-background text-foreground hover:bg-muted"),onClick:()=>S?.(K.id)},K.id))}),k&&w&&jsxRuntime.jsx("p",{role:"alert",className:"text-sm text-destructive-text",children:w})]})})}r(Xw,"WorkbenchAddToCollectionDialog");function Zw({renderPreview:e,...t}){return jsxRuntime.jsx(jsxRuntime.Fragment,{children:e(t)})}r(Zw,"WorkbenchMediaPreview");
|
|
64
|
+
var _m=Object.defineProperty;var r=(e,t)=>_m(e,"name",{value:t,configurable:true});function l(...e){return tailwindMerge.twMerge(e.filter(Boolean).join(" "))}r(l,"cn");function O(e){return e!=null&&typeof e!="boolean"}r(O,"hasRenderableNode");function Kl(e){return typeof e=="string"?e.trim().length>0:O(e)}r(Kl,"hasNonEmptyRenderableNode");var qm=lt.createContext(void 0);function Ul(e){let t=lt.useContext(qm);return lt.useMemo(()=>e?t?{...t,...e,slots:{...t.slots,...e.slots},styles:{...t.styles,...e.styles}}:e:t,[e,t])}r(Ul,"useDataExplorerAppearance");function Ht(...e){return e.filter(Boolean).join(" ")}r(Ht,"cn");function ir(e,t){return typeof e=="function"?e(t):e}r(ir,"resolveDataExplorerValue");var Ym={},Yl={surfaceRoot:"relative flex h-full min-h-0 w-full min-w-0 overflow-hidden rounded-md border border-border bg-background shadow-sm",toolbarRoot:"flex flex-wrap items-center gap-2 border-b border-border bg-background px-4 py-3",toolbarLeading:"flex items-center gap-2",toolbarSearch:"flex h-10 min-w-52 flex-1 items-center gap-2 rounded-md border border-border bg-background px-3 text-sm",toolbarSearchIcon:"inline-flex shrink-0 text-muted-foreground",toolbarSearchInput:"min-w-0 flex-1 bg-transparent text-sm outline-hidden placeholder:text-muted-foreground",toolbarViewSwitch:"flex items-center rounded-md border border-border bg-background p-0.5",toolbarViewButton:"inline-flex h-9 min-w-9 items-center justify-center gap-2 rounded-md px-2 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:pointer-events-none disabled:opacity-50",toolbarViewButtonActive:"bg-muted text-foreground",toolbarActions:"flex items-center gap-2",actionBarRoot:"flex min-w-0 flex-wrap items-center gap-2",actionBarLeading:"flex shrink-0 items-center gap-2",actionBarActions:"flex min-w-0 flex-1 flex-wrap items-center gap-2",actionBarTrailing:"flex shrink-0 items-center gap-2",actionButtonBase:"inline-flex h-9 items-center justify-center gap-2 rounded-md border px-3 text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",actionButtonDefault:"border-border bg-background text-foreground hover:bg-accent/60",actionButtonPrimary:"border-primary/20 bg-primary/10 text-primary hover:bg-primary/15",actionButtonDanger:"border-destructive/20 bg-destructive/10 text-destructive-text hover:bg-destructive/15",actionButtonMuted:"border-border/60 bg-muted/45 text-muted-foreground hover:bg-muted/70 hover:text-foreground",actionButtonActive:"ring-1 ring-primary/30",actionButtonDisabled:"cursor-not-allowed opacity-60",actionIconButton:"w-9 px-0",actionToggleActive:"border-primary/30 bg-primary/10 text-primary",controlButton:"inline-flex h-10 min-w-0 items-center justify-center gap-2 rounded-md border border-border bg-background px-3 text-sm font-medium text-foreground transition-colors hover:bg-accent/60 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60",controlButtonIcon:"inline-flex h-4 w-4 shrink-0 items-center justify-center text-[inherit] [&_*]:!text-[inherit] [&_svg]:!stroke-current [&_svg_*]:!stroke-current",controlButtonLabel:"min-w-0 truncate",controlSelectTrigger:"inline-flex h-10 min-w-28 items-center justify-between gap-3 rounded-md border border-border bg-background px-3 text-sm font-medium text-foreground transition-colors hover:bg-accent/60 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60",controlSelectValue:"flex min-w-0 items-center gap-1 truncate",controlCheckbox:"inline-flex h-9 items-center gap-2 rounded-md border border-border bg-background px-3 text-sm font-medium text-foreground transition-colors hover:bg-accent/60 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60",controlCheckboxIndicator:"flex h-4 w-4 shrink-0 items-center justify-center rounded border border-border bg-background text-primary",controlCheckboxLabel:"min-w-0 truncate",menuTrigger:"inline-flex h-8 w-8 items-center justify-center rounded-md text-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",menuContent:"z-50 min-w-36 rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md outline-hidden",menuLabel:"px-2 py-1.5 text-xs font-medium text-muted-foreground",menuSeparator:"-mx-1 my-1 h-px bg-border",menuItem:"relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",menuItemPrimary:"text-primary focus:text-primary",menuItemDanger:"text-destructive-text focus:text-destructive-text",menuItemMuted:"text-muted-foreground",menuItemIcon:"inline-flex h-4 w-4 shrink-0 items-center justify-center",menuItemLabel:"truncate",cardRoot:"group relative flex min-w-0 flex-col overflow-hidden rounded-lg border border-border/70 bg-background transition-shadow",cardInteractive:"cursor-pointer hover:shadow-sm",cardSelected:"ring-2 ring-primary",cardDisabled:"opacity-60",cardHeader:"p-4",cardMedia:"shrink-0 overflow-hidden",cardFooter:"shrink-0 border-t border-border/60 px-4 py-3",recordCardRoot:"group relative border-border/70 transition-shadow hover:shadow-sm",recordCardActive:"z-10 ring-2 ring-monkeys-500",footerRoot:"flex items-center border-t border-border bg-background px-4 py-3",footerSummary:"flex items-center gap-1 whitespace-nowrap text-sm text-muted-foreground",footerJumpButton:"inline-flex items-center gap-1 text-muted-foreground underline-offset-4 hover:text-foreground hover:underline",footerPageSizeSelect:"h-8 rounded-md border border-border bg-background px-2 text-sm text-foreground",previewRoot:"relative h-full min-h-0 w-full flex-1 select-none self-stretch overflow-hidden bg-slate-950",previewPlaceholder:"flex h-full w-full items-center justify-center rounded-xl bg-white/5 px-6 text-center text-sm text-white/60",previewActions:"absolute right-4 top-4 z-20 flex flex-col gap-2",previewControls:"absolute bottom-4 right-4 z-20 flex flex-col gap-2",previewZoomLabel:"min-w-[3rem] rounded-full border border-white/15 bg-black/30 px-1 py-1 text-center text-xs font-medium text-white/70 shadow-lg backdrop-blur",previewControlButton:"inline-flex h-9 w-9 items-center justify-center rounded-full border border-white/15 bg-black/30 text-white/90 shadow-lg backdrop-blur transition hover:bg-black/45",previewNavigationButton:"absolute top-1/2 flex h-10 w-10 -translate-y-1/2 items-center justify-center rounded-full border border-white/15 bg-black/30 text-white/90 shadow-lg backdrop-blur transition-colors hover:bg-black/45 disabled:pointer-events-none disabled:opacity-40",detailRoot:"flex h-full flex-col overflow-hidden bg-background",detailHeader:"flex items-center justify-between gap-3 border-b border-border bg-background px-4 py-4 sm:px-5",detailLeading:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground",detailNavigation:"hidden items-center gap-1 rounded-lg border border-border bg-background px-1 py-1 md:flex",detailNavigationButton:"flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-50",detailCloseButton:"flex h-10 w-10 items-center justify-center rounded-full border border-border bg-background text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",detailPreviewPanel:"min-h-0 overflow-hidden border-b border-border bg-background xl:border-b-0",detailPreviewFrame:"relative h-full min-h-0 w-full overflow-hidden bg-background",detailRightPanel:"min-h-0 min-w-0 border-t border-border bg-background xl:border-l xl:border-t-0",detailRightPanelBody:"h-full overflow-y-auto overscroll-contain bg-background p-5",treeShellRoot:"flex h-full min-h-0 flex-col overflow-hidden",treeShellHeader:"flex shrink-0 items-start justify-between gap-3 px-4 py-3",treeShellTitle:"truncate text-sm font-semibold",treeShellSubtitle:"mt-1 text-sm text-muted-foreground",treeShellToolbar:"flex shrink-0 items-center gap-2",treeShellBody:"min-h-0 flex-1 overflow-hidden",treeShellFooter:"shrink-0",treeRoot:"min-w-0 space-y-1 overflow-hidden text-sm",treeGroup:"min-w-0 space-y-1",treeGroupHeader:"group/tree-group flex min-w-0 items-center gap-1",treeGroupHeaderButton:"flex h-9 min-w-0 flex-1 items-center gap-2 rounded-md px-2 text-left font-medium text-muted-foreground transition-colors hover:bg-accent/55 hover:text-foreground",treeGroupContent:"min-w-0 space-y-0.5",treeGroupActions:"shrink-0 opacity-0 transition-opacity group-hover/tree-group:opacity-100 data-[state=open]:opacity-100",treeNode:"min-w-0",treeNodeButton:"group/tree-node flex min-h-9 w-full min-w-0 items-center gap-1 rounded-md pr-1 text-left text-sm text-foreground transition-colors hover:bg-accent/55 hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",treeNodeSelected:"bg-accent text-accent-foreground",treeNodeDisabled:"cursor-not-allowed opacity-55",treeNodeDragging:"opacity-50",treeNodeToggle:"inline-flex h-5 w-5 shrink-0 items-center justify-center rounded border-0 bg-transparent p-0 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",treeNodeIcon:"inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground group-hover/tree-node:text-foreground",treeNodeLabel:"min-w-0 truncate",treeNodeDescription:"mt-0.5 truncate text-xs text-muted-foreground",treeNodeMeta:"ml-2 shrink-0 text-xs text-muted-foreground",treeNodeBadge:"ml-2 shrink-0 rounded-full border border-border bg-muted px-1.5 py-0.5 text-[11px] leading-none text-muted-foreground",treeNodeActions:"ml-1 shrink-0 opacity-0 transition-opacity group-hover/tree-node:opacity-100 data-[state=open]:opacity-100",treeNodeChildren:"mt-0.5 min-w-0 space-y-0.5",treeNodeDragHandle:"inline-flex h-5 w-5 shrink-0 cursor-grab items-center justify-center rounded text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-foreground active:cursor-grabbing group-hover/tree-node:opacity-100",treeEmpty:"px-3 py-2 text-xs text-muted-foreground",treeError:"px-3 py-2 text-xs text-destructive-text",treeLoading:"px-3 py-2 text-xs text-muted-foreground"},Jm={flush:{surfaceRoot:"relative flex h-full min-h-0 w-full min-w-0 overflow-hidden"}},Xm={compact:{treeShellHeader:"px-3 py-2",toolbarRoot:"px-3 py-2",toolbarSearch:"h-9 min-w-48",toolbarViewButton:"h-8 min-w-8 text-xs",actionButtonBase:"h-8 px-2.5 text-xs",actionIconButton:"h-8 w-8 px-0",controlButton:"h-9 px-2.5 text-xs",controlSelectTrigger:"h-9 min-w-24 px-2.5 text-xs",controlCheckbox:"h-8 px-2.5 text-xs",menuTrigger:"h-8 w-8",footerRoot:"px-3 py-2",footerPageSizeSelect:"h-8 text-xs",treeGroupHeaderButton:"h-8 text-xs",treeNodeButton:"min-h-8 text-xs",treeEmpty:"py-1.5 text-xs",treeError:"py-1.5 text-xs",treeLoading:"py-1.5 text-xs"},default:{},comfortable:{treeShellHeader:"px-5 py-4",toolbarRoot:"px-5 py-4",toolbarSearch:"h-11",toolbarViewButton:"h-10 min-w-10",actionButtonBase:"h-10 px-3.5",actionIconButton:"h-10 w-10 px-0",controlButton:"h-11 px-3.5",controlSelectTrigger:"h-11 min-w-32 px-3.5",controlCheckbox:"h-10 px-3.5",menuTrigger:"h-9 w-9",footerRoot:"px-5 py-3.5",treeGroupHeaderButton:"h-10",treeNodeButton:"min-h-10"}},Zm={none:{surfaceRoot:"rounded-none",toolbarSearch:"rounded-none",toolbarViewSwitch:"rounded-none",toolbarViewButton:"rounded-none",actionButtonBase:"rounded-none",controlButton:"rounded-none",controlSelectTrigger:"rounded-none",controlCheckbox:"rounded-none",controlCheckboxIndicator:"rounded-none",menuTrigger:"rounded-none",menuContent:"rounded-none",menuItem:"rounded-none",cardRoot:"rounded-none",footerPageSizeSelect:"rounded-none",detailLeading:"rounded-none",detailNavigation:"rounded-none",detailNavigationButton:"rounded-none",detailCloseButton:"rounded-none",treeGroupHeaderButton:"rounded-none",treeNodeButton:"rounded-none",treeNodeToggle:"rounded-none",treeNodeBadge:"rounded-none",treeNodeDragHandle:"rounded-none"},sm:{surfaceRoot:"rounded-sm",toolbarSearch:"rounded-sm",toolbarViewSwitch:"rounded-sm",toolbarViewButton:"rounded-sm",actionButtonBase:"rounded-sm",controlButton:"rounded-sm",controlSelectTrigger:"rounded-sm",controlCheckbox:"rounded-sm",controlCheckboxIndicator:"rounded-sm",menuTrigger:"rounded-sm",menuContent:"rounded-sm",menuItem:"rounded-sm",cardRoot:"rounded-sm",treeGroupHeaderButton:"rounded-sm",treeNodeButton:"rounded-sm",treeNodeToggle:"rounded-sm",treeNodeBadge:"rounded-sm",treeNodeDragHandle:"rounded-sm"},md:{},lg:{surfaceRoot:"rounded-xl",toolbarSearch:"rounded-lg",toolbarViewSwitch:"rounded-lg",toolbarViewButton:"rounded-lg",actionButtonBase:"rounded-lg",controlButton:"rounded-lg",controlSelectTrigger:"rounded-lg",controlCheckbox:"rounded-lg",controlCheckboxIndicator:"rounded-md",menuTrigger:"rounded-lg",menuContent:"rounded-lg",cardRoot:"rounded-xl",treeGroupHeaderButton:"rounded-lg",treeNodeButton:"rounded-lg",treeNodeToggle:"rounded-md",treeNodeBadge:"rounded-lg",treeNodeDragHandle:"rounded-md"},xl:{surfaceRoot:"rounded-2xl",toolbarSearch:"rounded-xl",toolbarViewSwitch:"rounded-xl",toolbarViewButton:"rounded-xl",actionButtonBase:"rounded-xl",controlButton:"rounded-xl",controlSelectTrigger:"rounded-xl",controlCheckbox:"rounded-xl",controlCheckboxIndicator:"rounded-lg",menuTrigger:"rounded-xl",menuContent:"rounded-xl",cardRoot:"rounded-2xl",treeGroupHeaderButton:"rounded-xl",treeNodeButton:"rounded-xl",treeNodeToggle:"rounded-lg",treeNodeBadge:"rounded-xl",treeNodeDragHandle:"rounded-lg"},full:{surfaceRoot:"rounded-2xl",toolbarSearch:"rounded-full",toolbarViewSwitch:"rounded-full",toolbarViewButton:"rounded-full",actionButtonBase:"rounded-full",controlButton:"rounded-full",controlSelectTrigger:"rounded-full",controlCheckbox:"rounded-full",controlCheckboxIndicator:"rounded-full",menuTrigger:"rounded-full",cardRoot:"rounded-2xl",treeGroupHeaderButton:"rounded-full",treeNodeButton:"rounded-full",treeNodeToggle:"rounded-full",treeNodeBadge:"rounded-full",treeNodeDragHandle:"rounded-full"}},Qm={none:{surfaceRoot:"border-transparent",toolbarRoot:"border-transparent",toolbarSearch:"border-transparent",toolbarViewSwitch:"border-transparent",actionButtonBase:"border-transparent",controlButton:"border-transparent",controlSelectTrigger:"border-transparent",controlCheckbox:"border-transparent",cardRoot:"border-transparent",footerRoot:"border-transparent",detailHeader:"border-transparent",detailPreviewPanel:"border-transparent",detailRightPanel:"border-transparent"},subtle:{surfaceRoot:"border-border/60",toolbarRoot:"border-border/60",toolbarSearch:"border-border/60",toolbarViewSwitch:"border-border/60",actionButtonDefault:"border-border/60",controlButton:"border-border/60",controlSelectTrigger:"border-border/60",controlCheckbox:"border-border/60",cardRoot:"border-border/60",footerRoot:"border-border/60"},solid:{},strong:{surfaceRoot:"border-foreground/20",toolbarRoot:"border-foreground/20",toolbarSearch:"border-foreground/20",toolbarViewSwitch:"border-foreground/20",actionButtonDefault:"border-foreground/20",controlButton:"border-foreground/20",controlSelectTrigger:"border-foreground/20",controlCheckbox:"border-foreground/20",cardRoot:"border-foreground/20",footerRoot:"border-foreground/20"}},ep={plain:{},muted:{surfaceRoot:"bg-card",toolbarRoot:"bg-muted/20",toolbarSearch:"bg-background",toolbarViewSwitch:"bg-background",controlButton:"bg-background",controlSelectTrigger:"bg-background",controlCheckbox:"bg-background",cardRoot:"bg-card",footerRoot:"bg-muted/20",detailHeader:"bg-muted/20"},soft:{surfaceRoot:"bg-background/95 shadow-sm",toolbarRoot:"bg-background/95",actionButtonDefault:"bg-muted/30 hover:bg-muted/55",controlButton:"bg-muted/30 hover:bg-muted/55",controlSelectTrigger:"bg-muted/30 hover:bg-muted/55",controlCheckbox:"bg-muted/30 hover:bg-muted/55",cardRoot:"bg-background/95 shadow-sm",footerRoot:"bg-background/95"},glass:{surfaceRoot:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",toolbarRoot:"border-white/10 bg-white/5 backdrop-blur-md",toolbarSearch:"border-white/10 bg-white/5",toolbarViewSwitch:"border-white/10 bg-white/5",actionButtonDefault:"border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]",controlButton:"border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]",controlSelectTrigger:"border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]",controlCheckbox:"border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]",controlCheckboxIndicator:"border-white/15 bg-white/10",cardRoot:"border-white/10 bg-white/[0.06] shadow-none",footerRoot:"border-white/10 bg-white/5 backdrop-blur-md"},"dark-stage":{previewRoot:"bg-slate-950",previewPlaceholder:"bg-white/5 text-white/60",actionButtonBase:"inline-flex h-9 items-center justify-center gap-2 rounded-full border px-3 text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-white/45 focus-visible:ring-offset-0",actionButtonDefault:"border-white/15 bg-black/30 text-white/90 shadow-lg backdrop-blur hover:bg-black/[0.45]",controlButton:"border-white/15 bg-black/30 text-white/90 shadow-lg backdrop-blur hover:bg-black/[0.45]",controlSelectTrigger:"border-white/15 bg-black/30 text-white/90 shadow-lg backdrop-blur hover:bg-black/[0.45]",controlCheckbox:"border-white/15 bg-black/30 text-white/90 shadow-lg backdrop-blur hover:bg-black/[0.45]",actionButtonPrimary:"border-white/25 bg-white/20 text-white shadow-lg backdrop-blur hover:bg-white/28",actionButtonMuted:"border-white/10 bg-black/20 text-white/70 shadow-lg backdrop-blur hover:bg-black/[0.35] hover:text-white",actionIconButton:"h-9 w-9 px-0"}},ql={default:{density:"default",radius:"md",border:"solid",background:"plain"},soft:{density:"default",radius:"md",border:"subtle",background:"plain"},compact:{density:"compact",radius:"md",border:"subtle",background:"soft"},"tinted-glass":{density:"default",radius:"lg",border:"subtle",background:"glass"},flat:{density:"compact",radius:"none",border:"solid",background:"plain"},glass:{density:"default",radius:"lg",border:"subtle",background:"glass"},"hard-edge":{density:"compact",radius:"none",border:"solid",background:"plain"}},tp={soft:{actionButtonBase:"font-medium",controlButton:"font-medium",controlSelectTrigger:"font-medium",controlCheckbox:"font-medium",menuTrigger:"rounded-full",cardRoot:"border-border/70"},compact:{toolbarRoot:"gap-2",actionButtonBase:"text-xs",controlButton:"text-xs",controlSelectTrigger:"text-xs",controlCheckbox:"text-xs",footerRoot:"text-xs"},"tinted-glass":{actionButtonDefault:"border-border/60 bg-background/10 text-foreground hover:bg-accent/60",actionButtonPrimary:"border-primary/30 bg-primary/15 text-primary-foreground hover:bg-primary/20",actionButtonMuted:"border-border/50 bg-muted/20 text-muted-foreground hover:bg-muted/45 hover:text-foreground",controlButton:"border-border/60 bg-background/10 text-foreground hover:bg-accent/60",controlSelectTrigger:"border-border/60 bg-background/10 text-foreground hover:bg-accent/60",controlCheckbox:"border-border/60 bg-background/10 text-foreground hover:bg-accent/60",controlCheckboxIndicator:"border-border/60 bg-background/10 text-primary",menuContent:"border-border bg-popover text-popover-foreground shadow-2xl",menuSeparator:"bg-border",menuItem:"focus:bg-accent focus:text-accent-foreground",cardSelected:"ring-2 ring-primary",previewRoot:"bg-background",treeGroupHeaderButton:"text-muted-foreground hover:bg-accent/60 hover:text-foreground",treeNodeButton:"text-foreground hover:bg-accent/60 hover:text-accent-foreground focus-visible:ring-ring",treeNodeSelected:"bg-accent text-accent-foreground",treeNodeToggle:"text-muted-foreground hover:bg-accent hover:text-foreground",treeNodeIcon:"text-muted-foreground group-hover/tree-node:text-foreground",treeNodeMeta:"text-muted-foreground",treeNodeBadge:"border-border bg-muted text-muted-foreground",treeNodeActions:"text-muted-foreground",treeNodeDragHandle:"text-muted-foreground hover:bg-accent hover:text-foreground group-hover/tree-node:opacity-100",treeEmpty:"text-muted-foreground",treeError:"text-destructive-text",treeLoading:"text-muted-foreground"},flat:{toolbarRoot:"border-slate-200 bg-white",toolbarSearch:"rounded-none border-slate-200 bg-white shadow-none",toolbarViewSwitch:"rounded-none border-slate-200 bg-white shadow-none",actionButtonBase:"rounded-none shadow-none",controlButton:"rounded-none border-slate-200 bg-white text-slate-700 shadow-none hover:bg-slate-50",controlSelectTrigger:"rounded-none border-slate-200 bg-white text-slate-700 shadow-none hover:bg-slate-50",controlCheckbox:"rounded-none border-slate-200 bg-white text-slate-700 shadow-none hover:bg-slate-50",actionButtonDefault:"border-slate-200 bg-white text-slate-700 hover:bg-slate-50",menuTrigger:"rounded-none border border-slate-200 bg-white text-slate-700 shadow-none hover:bg-slate-50",menuContent:"rounded-none border-slate-200 bg-white shadow-none",cardRoot:"rounded-none border-slate-200 bg-white shadow-none",footerRoot:"border-slate-200 bg-white",treeRoot:"space-y-1 text-sm",treeGroupHeader:"group/tree-group flex min-w-0 items-center",treeGroupHeaderButton:"h-9 rounded-none px-3 text-slate-600 shadow-none hover:bg-slate-100 hover:text-slate-950",treeGroupContent:"space-y-1",treeNodeButton:"min-h-9 rounded-none text-slate-700 hover:bg-slate-100 hover:text-slate-950 focus-visible:ring-slate-300",treeNodeSelected:"bg-slate-100 text-slate-950",treeNodeToggle:"rounded-none text-slate-500 hover:bg-transparent hover:text-slate-950",treeNodeIcon:"text-slate-500 group-hover/tree-node:text-slate-950",treeNodeDragHandle:"rounded-none text-slate-400 hover:bg-transparent hover:text-slate-700",treeNodeActions:"text-slate-500"},glass:{menuContent:"border-white/10 bg-slate-950/90 text-white backdrop-blur-xl",menuSeparator:"bg-white/10",menuItem:"focus:bg-white/10 focus:text-white"},"hard-edge":{toolbarRoot:"border-slate-200 bg-white",actionButtonBase:"rounded-none shadow-none",controlButton:"rounded-none shadow-none",controlSelectTrigger:"rounded-none shadow-none",controlCheckbox:"rounded-none shadow-none",cardRoot:"rounded-none border-slate-200 bg-white shadow-none",footerRoot:"border-slate-200 bg-white",footerPageSizeSelect:"rounded-none border-slate-200 shadow-none"}},op=Object.keys(Yl);function np(...e){return op.reduce((t,o)=>(t[o]=Ht(...e.map(n=>n?.[o])),t),{})}r(np,"mergeSlots");function rp(...e){return e.reduce((t,o)=>({...t,...o}),{})}r(rp,"mergeStyles");function ap(e){let t=ql[e];if(!t)throw new TypeError(`Unknown Data Explorer theme preset "${String(e)}". Expected one of: ${Object.keys(ql).join(", ")}.`);return t}r(ap,"getPresetDefaults");function Jl(e){let t=e?.preset??"default",o=e?.surface??"card",n=ap(t),a=e?.density??n.density??"default",i=e?.radius??n.radius??"md",s=e?.border??n.border??"solid",u=e?.background??n.background??"plain",c=np(Yl,tp[t],Xm[a],Zm[i],Qm[s],ep[u],e?.slots);return o==="flush"&&(c.surfaceRoot=Ht(Jm.flush.surfaceRoot,e?.slots?.surfaceRoot)),{surface:o,preset:t,density:a,radius:i,border:s,background:u,styles:rp(Ym,e?.styles),slots:c}}r(Jl,"resolveDataExplorerAppearance");function Xl(e,t){if(t==="primary")return e.slots.menuItemPrimary;if(t==="danger")return e.slots.menuItemDanger;if(t==="muted")return e.slots.menuItemMuted}r(Xl,"getDataExplorerMenuItemToneClassName");var Ki={locale:"en-US",messages:{pagination:{navigation:"Pagination",first:"First",previous:"Previous",next:"Next",last:"Last",page:r(({page:e,pageCount:t})=>`Page ${e} of ${t}`,"page"),currentPage:r(({page:e,pageCount:t})=>`Page ${e} of ${t}, current page`,"currentPage"),emptyResults:"0 results",range:r(({start:e,end:t,total:o})=>`${e}-${t} of ${o}`,"range"),selected:r(({count:e})=>`${e} selected`,"selected"),pageSize:"Items per page",loadBatchSize:"Items per load",perLoad:"Items per load",jumpToPage:"Jump to page",pages:"pages",clickToJump:"Click to jump to a page"},dialog:{close:"Close dialog"},dropdownMenu:{actions:"Actions"},loading:{spinner:"Loading"},layout:{resizePanels:"Resize panels",expandPanel:"Expand",collapsePanel:"Collapse",movePanel:"Move",moveBefore:"Move earlier",moveAfter:"Move later"},steps:{label:"Progress",current:"Current",completed:"Completed",error:"Error",disabled:"Disabled"},numberInput:{increment:"Increase value",decrement:"Decrease value"},passwordInput:{showPassword:"Show password",hidePassword:"Hide password"},multiSelect:{placeholder:"Select options",empty:"No options",removeOption:r(({value:e})=>`Remove ${e}`,"removeOption")},table:{dragColumn:r(({columnId:e})=>`Drag column ${e}`,"dragColumn"),resizeColumn:r(({columnId:e})=>`Resize column ${e}`,"resizeColumn"),sortColumn:r(({columnId:e})=>e?`Sort column ${e}`:"Sort column","sortColumn"),loadingRow:"Loading table row"},toolbar:{theme:{label:"Appearance",toggle:"Toggle theme",auto:"Auto",light:"Light",dark:"Dark"},language:{label:"Language",switch:"Switch language"}},toast:{errorTitle:"Error",warningTitle:"Warning",defaultErrorDescription:"Something went wrong.",defaultWarningDescription:"Please check and try again."},dataExplorer:{viewTree:{actions:"More actions",expand:"Expand",collapse:"Collapse",loading:"Loading...",empty:"No views",error:"Unable to load views"}},workbench:{relationshipGraph:{zoomOut:"Zoom out",zoomIn:"Zoom in",zoomToFit:"Fit graph",minimap:"Graph overview"},collection:{label:"Collection",loading:"Loading items",empty:"No items",loadError:"Unable to load items",refreshError:"Unable to refresh items",retry:"Retry",loadingMore:"Loading more items",permission:"You do not have permission to view this content",offline:"You appear to be offline",requestAccess:"Request access"},interactiveTable:{columnActions:"Column actions",freezeColumn:"Freeze to left",freezeEndColumn:"Freeze to right",unfreezeColumn:"Unfreeze from left",unfreezeEndColumn:"Unfreeze from right",unfreezeAllColumns:"Unfreeze all columns",resetColumnWidth:"Reset column width",frozenColumnTitle:"Frozen column"}},agentWorkbench:{label:"Session activity",reasoning:"Reasoning",plan:"Plan",taskNoDetail:"No additional details",modes:{chat:"Chat",work:"Work"},composer:{send:"Send message",stop:"Stop generating",queue:"Queue message",attach:"Add photos or files",voice:"Start voice input",webSearch:"Web search",chatMode:"Chat mode",model:"Model",reasoning:"Reasoning effort",permissions:"Permissions",removeAttachment:"Remove attachment",editQueued:"Edit queued message",deleteQueued:"Delete queued message",moveUp:"Move message up",moveDown:"Move message down",queued:"Queued messages",uploading:"Uploading",uploadFailed:"Upload failed",retryAttachment:"Retry attachment upload",noModels:"No models available",message:"Message",attachmentOnly:"Attachment",reasoningOptions:{low:"Low",medium:"Medium",high:"High",xhigh:"Extra high"},permissionOptions:{"approval-required":"Approval required","auto-approve":"Auto approve","full-access":"Full access"}},quickStart:{label:"Quick start",back:"Back",addFile:"Add file"},tool:{input:"Input",output:"Output",status:{pending:"Pending",running:"Running",completed:"Completed",failed:"Error",denied:"Denied"}},approval:{approve:"Approve",reject:"Reject",approved:"Approved",rejected:"Rejected"},artifact:{pending:"Preparing",ready:"Ready",failed:"Failed",open:r(({name:e})=>`Open ${e}`,"open")},run:{stopping:"Stopping...",stoppedAfter:r(({duration:e})=>`You stopped after ${e}`,"stoppedAfter")},process:{running:"Working",queued:"Queued",waitingApproval:"Waiting for approval",failed:"Failed",stopped:"Stopped",processed:"Processed",processedFor:r(({duration:e})=>`Worked for ${e}`,"processedFor"),completedCount:r(({completed:e,total:t})=>`${e}/${t} completed`,"completedCount")},artifactWorkspace:{outputs:"Outputs",sources:"Sources",viewAll:"View all",toggleSummary:"Toggle files",tabs:"Open files",closeTab:r(({name:e})=>`Close ${e}`,"closeTab"),closeWorkspace:"Close workspace",close:"Close",closeOthers:"Close other tabs",closeRight:"Close tabs to the right",closeAll:"Close all tabs",kinds:{audio:"Audio",file:"File",html:"HTML",image:"Image",markdown:"Markdown",pdf:"PDF",presentation:"Presentation",video:"Video",web:"Web page"},collapse:"Collapse",maximize:"Full screen",restore:"Exit full screen",download:r(({name:e})=>`Download ${e}`,"download"),openExternal:r(({name:e})=>`Open ${e} in a new window`,"openExternal"),loading:"Loading preview...",failed:"Preview unavailable",retry:"Try again"},usage:{label:"Context usage",context:r(({used:e,total:t})=>`${e} / ${t} tokens`,"context")},navigation:{search:"Search agents and sessions",searchSessions:"Search sessions",searchShortcut:"Focus search",clearSearch:"Clear search",tabsLabel:"Agent workbench navigation",agents:"Agents",sessions:"Sessions",newAgent:"New Agent",newSession:"New Session",capabilities:"Capabilities & Extensions",settings:"Agent Settings",allAgents:"All Agents",recentSessions:"Recent Sessions",chat:"Chat",work:"Work",chats:"Chats",builtIn:"Built-in",noDescription:"No description",loading:"Loading...",emptyAgents:"No agents yet",emptySessions:"No sessions yet",noResults:"No matching results",retry:"Retry",pin:"Pin",unpin:"Unpin",rename:"Rename",delete:"Delete",actions:"Actions",save:"Save",cancel:"Cancel",running:"Running",completed:"Completed",failed:"Failed",contextUsage:r(({percent:e})=>`${e}% context used`,"contextUsage")},details:{title:"Task details",description:"Summary and workspace activity",duration:"Duration",updated:"Updated",model:"Model",mode:"Mode",permissions:"Permissions",tokenUsage:"Token usage",summary:"Summary",summaryEmpty:"No summary is available yet.",summaryFailed:"The summary could not be generated.",highlights:"Highlights",pendingItems:"Pending items",tabs:{label:"Task detail views",summary:"Summary",workspace:"Workspace"},status:{queued:"Queued",running:"Running",waiting_approval:"Waiting for approval",stopping:"Stopping",stopped:"Stopped",completed:"Completed",failed:"Failed"},state:{loading:{title:"Loading task details",description:"Restoring the latest session activity."},empty:{title:"No task selected",description:"Select a task to inspect its details."},error:{title:"Unable to load task details",description:"Try again after the session is available."}},actions:{close:"Close task details",copySummary:"Copy summary",retry:"Retry",retrySummary:"Retry summary",resume:"Resume",continueInNewTask:"Continue in new task",editAndRerun:"Edit and rerun",export:"Export"},workspace:{diffs:"Code changes",files:"Files",terminals:"Terminals",tests:"Tests",artifacts:"Artifacts",exitCode:r(({code:e})=>`Exit code ${e}`,"exitCode"),diffStatus:{added:"Added",modified:"Modified",deleted:"Deleted",renamed:"Renamed"},fileOperation:{upsert:"Updated",delete:"Deleted"}}}}}};function Zl(e,t){return t?{beautiful:{...e.beautiful,...t.beautiful},pagination:{...e.pagination,...t.pagination},dialog:{...e.dialog,...t.dialog},dropdownMenu:{...e.dropdownMenu,...t.dropdownMenu},loading:{...e.loading,...t.loading},layout:{...e.layout,...t.layout},steps:{...e.steps,...t.steps},numberInput:{...e.numberInput,...t.numberInput},passwordInput:{...e.passwordInput,...t.passwordInput},multiSelect:{...e.multiSelect,...t.multiSelect},table:{...e.table,...t.table},toolbar:{theme:{...e.toolbar.theme,...t.toolbar?.theme},language:{...e.toolbar.language,...t.toolbar?.language}},toast:{...e.toast,...t.toast},dataExplorer:{viewTree:{...e.dataExplorer.viewTree,...t.dataExplorer?.viewTree}},workbench:{relationshipGraph:{zoomOut:"Zoom out",zoomIn:"Zoom in",zoomToFit:"Fit graph",minimap:"Graph overview",...e.workbench.relationshipGraph,...t.workbench?.relationshipGraph},collection:{...e.workbench.collection,...t.workbench?.collection},interactiveTable:{...e.workbench.interactiveTable,...t.workbench?.interactiveTable}},agentWorkbench:{...e.agentWorkbench,...t.agentWorkbench,modes:{...e.agentWorkbench.modes,...t.agentWorkbench?.modes},composer:{...e.agentWorkbench.composer,...t.agentWorkbench?.composer},quickStart:{...e.agentWorkbench.quickStart,...t.agentWorkbench?.quickStart},tool:{...e.agentWorkbench.tool,...t.agentWorkbench?.tool,status:{...e.agentWorkbench.tool.status,...t.agentWorkbench?.tool?.status}},approval:{...e.agentWorkbench.approval,...t.agentWorkbench?.approval},artifact:{...e.agentWorkbench.artifact,...t.agentWorkbench?.artifact},run:{...e.agentWorkbench.run,...t.agentWorkbench?.run},process:{...e.agentWorkbench.process,...t.agentWorkbench?.process},artifactWorkspace:{...e.agentWorkbench.artifactWorkspace,...t.agentWorkbench?.artifactWorkspace},usage:{...e.agentWorkbench.usage,...t.agentWorkbench?.usage},navigation:{...e.agentWorkbench.navigation,...t.agentWorkbench?.navigation},details:{...e.agentWorkbench.details,...t.agentWorkbench?.details,tabs:{...e.agentWorkbench.details.tabs,...t.agentWorkbench?.details?.tabs},status:{...e.agentWorkbench.details.status,...t.agentWorkbench?.details?.status},state:{loading:{...e.agentWorkbench.details.state.loading,...t.agentWorkbench?.details?.state?.loading},empty:{...e.agentWorkbench.details.state.empty,...t.agentWorkbench?.details?.state?.empty},error:{...e.agentWorkbench.details.state.error,...t.agentWorkbench?.details?.state?.error}},actions:{...e.agentWorkbench.details.actions,...t.agentWorkbench?.details?.actions},workspace:{...e.agentWorkbench.details.workspace,...t.agentWorkbench?.details?.workspace,diffStatus:{...e.agentWorkbench.details.workspace.diffStatus,...t.agentWorkbench?.details?.workspace?.diffStatus},fileOperation:{...e.agentWorkbench.details.workspace.fileOperation,...t.agentWorkbench?.details?.workspace?.fileOperation}}}}}:e}r(Zl,"mergeMonkeysLocaleMessages");var sr={locale:Ki.locale,messages:Zl(Ki.messages)};var ip=Object.freeze({}),sp=Object.freeze({}),Ql=Symbol.for("@inf-monkeys-tech/monkeys-design/provider-context@1");function lp(){return Object.freeze({locale:lt.createContext({...sr,provided:false}),theme:lt.createContext({provided:false}),direction:lt.createContext({provided:false}),environment:lt.createContext({provided:false,environment:ip,portal:sp})})}r(lp,"createMonkeysProviderContexts");function dp(){let e=globalThis,t=e[Ql];if(t)return t;let o=lp();return Object.defineProperty(e,Ql,{value:o,enumerable:false,configurable:false,writable:false}),o}r(dp,"getMonkeysProviderContexts");var ua=dp(),Ui=ua.locale,ma=ua.theme,td=ua.direction,pa=ua.environment;function cp(e,t){return t===void 0?e:e===void 0?t:{...e,...t,slots:e.slots||t.slots?{...e.slots,...t.slots}:void 0,styles:e.styles||t.styles?{...e.styles,...t.styles}:void 0}}r(cp,"mergeAppearance");function xt(){try{return lt.useContext(Ui)??{...sr,provided:!1}}catch{return {...sr,provided:false}}}r(xt,"useMonkeysLocale");function vt(){return lt.useContext(Ui).messages}r(vt,"useMonkeysLocaleMessages");function dn(){return lt.useContext(ma).resolvedTheme}r(dn,"useMonkeysResolvedTheme");function Oe(e){let t=lt.useContext(ma).baseAppearance;return lt.useMemo(()=>cp(t,e),[e,t])}r(Oe,"useMonkeysBaseAppearance");function Ro(){return lt.useContext(ma).statusStates??{}}r(Ro,"useMonkeysStatusStates");function qi(){return lt.useContext(td).direction}r(qi,"useMonkeysDirection");function Yi(){return lt.useContext(pa).environment}r(Yi,"useMonkeysEnvironment");function Ji(){return lt.useContext(pa).portal}r(Ji,"useMonkeysPortalOptions");function Ne(){let e=lt.useContext(Ui),t=lt.useContext(ma),o=lt.useContext(td),n=e.provided||t.provided||o.provided;return lt.useMemo(()=>n?{dir:o.direction,"data-monkeys-direction":o.direction,"data-monkeys-locale":e.locale,"data-monkeys-theme":t.themeId,"data-monkeys-theme-mode":t.resolvedTheme?.colorMode}:{},[o.direction,e.locale,n,t.resolvedTheme?.colorMode,t.themeId])}r(Ne,"useMonkeysComponentAttributes");function Xi(){return lt.useContext(pa).iconResolver}r(Xi,"useMonkeysAssetIconResolver");function od(){return lt.useContext(pa).imageResolver}r(od,"useMonkeysAssetImageResolver");function nd(e,t){let o=new WeakMap,n=new Map,a=1;return (...i)=>{let s=i.slice(0,-1),u=i[i.length-1],c=s.map(m=>{if(!m)return 0;let p=o.get(m);return p===void 0&&(p=a++,o.set(m,p)),p}).join(":"),d=n.get(c);if(!d){let m={};for(let p of e)m[p]=t(...s.map(f=>f?.[p]));d=Object.freeze(m),n.size>=64&&n.delete(n.keys().next().value),n.set(c,d);}let g={...d};if(u)for(let m of e){let p=u[m];p&&(g[m]=t(...s.map(f=>f?.[m]),p));}return g}}r(nd,"createStaticSlotMerger");var up={},yt="motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",Zt="motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",ga="motion-safe:transition-transform motion-safe:duration-300 motion-safe:ease-out",rd=l("[scrollbar-width:thin]","[scrollbar-color:hsl(var(--muted-foreground)/0.45)_transparent]","[&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2","[&::-webkit-scrollbar-button]:hidden [&::-webkit-scrollbar-button]:h-0 [&::-webkit-scrollbar-button]:w-0 [&::-webkit-scrollbar-button]:bg-transparent","[&::-webkit-scrollbar-button:single-button]:hidden [&::-webkit-scrollbar-button:single-button]:h-0 [&::-webkit-scrollbar-button:single-button]:w-0","[&::-webkit-scrollbar-button:double-button]:hidden [&::-webkit-scrollbar-button:double-button]:h-0 [&::-webkit-scrollbar-button:double-button]:w-0","[&::-webkit-scrollbar-corner]:bg-transparent","[&::-webkit-scrollbar-track]:bg-transparent","[&:has(thead.sticky)::-webkit-scrollbar-track]:mt-[var(--base-table-header-height)]","[&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/40","hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/55"),mp=l("[&.sticky_th]:sticky [&.sticky_th]:top-0 [&.sticky_th]:z-[2]","[&.sticky_th]:bg-[var(--base-table-sticky-header-bg)]","[&.sticky_th]:shadow-[inset_0_-1px_0_var(--base-table-header-separator)]"),id={buttonBase:l("group/button inline-flex min-w-0 items-center justify-center gap-2 rounded-md border px-3 text-sm font-medium focus-visible:outline-hidden","cursor-pointer disabled:!cursor-not-allowed",Zt),buttonDefault:"border-border bg-background text-foreground hover:bg-accent/60",buttonPrimary:"border-primary/20 bg-primary/10 text-primary hover:bg-primary/15",buttonSuccess:"border-[hsl(var(--success,142_72%_29%)_/_0.30)] bg-[hsl(var(--success,142_72%_29%)_/_0.10)] text-[hsl(var(--success,142_72%_29%))] hover:bg-[hsl(var(--success,142_72%_29%)_/_0.15)]",buttonWarning:"border-[hsl(var(--warning,45_93%_47%)_/_0.30)] bg-[hsl(var(--warning,45_93%_47%)_/_0.10)] text-[hsl(var(--warning-foreground,28_73%_26%))] hover:bg-[hsl(var(--warning,45_93%_47%)_/_0.15)]",buttonDanger:"border-destructive/20 bg-destructive/10 text-destructive-text hover:bg-destructive/15",buttonMuted:"border-border/60 bg-muted/45 text-muted-foreground hover:bg-muted/70 hover:text-foreground",buttonActive:"border-primary/35 bg-primary/10 text-primary",buttonDisabled:"!cursor-not-allowed opacity-60",buttonIconOnly:"w-9 px-0",buttonIcon:"inline-flex h-4 w-4 shrink-0 items-center justify-center text-[inherit] [&_*]:!text-[inherit] [&_svg]:!stroke-current [&_svg_*]:!stroke-current",buttonLabel:"min-w-0 truncate",badgeBase:l("inline-flex max-w-full items-center gap-1.5 rounded-full border px-2 py-0.5 text-xs font-medium",yt),badgeDefault:"border-border/60 bg-background text-foreground",badgePrimary:"border-primary/30 bg-primary/10 text-primary",badgeSuccess:"border-[hsl(var(--success,142_72%_29%)_/_0.30)] bg-[hsl(var(--success,142_72%_29%)_/_0.10)] text-[hsl(var(--success,142_72%_29%))]",badgeWarning:"border-[hsl(var(--warning,45_93%_47%)_/_0.30)] bg-[hsl(var(--warning,45_93%_47%)_/_0.10)] text-[hsl(var(--warning-foreground,28_73%_26%))]",badgeDanger:"border-destructive/30 bg-destructive/10 text-destructive-text",badgeMuted:"border-border/60 bg-muted text-muted-foreground",badgeIcon:"inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center",badgeLabel:"min-w-0 truncate",textRoot:"min-w-0 break-words leading-6",textSizeXs:"text-xs",textSizeSm:"text-sm",textSizeMd:"text-base",textSizeLg:"text-lg",textSizeXl:"text-xl",typographyToneDefault:"text-foreground",typographyToneMuted:"text-muted-foreground",typographyTonePrimary:"text-primary",typographyToneSuccess:"text-emerald-700 dark:text-emerald-400",typographyToneWarning:"text-amber-700 dark:text-amber-400",typographyToneDanger:"text-destructive-text",typographyToneInherit:"text-inherit",headingRoot:"min-w-0 break-words font-semibold tracking-tight",headingSizeXs:"text-sm leading-5",headingSizeSm:"text-base leading-6",headingSizeMd:"text-lg leading-7",headingSizeLg:"text-xl leading-7",headingSizeXl:"text-2xl leading-8",headingSize2xl:"text-3xl leading-9",linkRoot:"inline break-words underline decoration-current/40 underline-offset-4 hover:decoration-current focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30",codeInline:"rounded border border-border/70 bg-muted/60 px-1.5 py-0.5 font-mono text-[0.875em] leading-[1.45] text-foreground",codeBlock:"m-0 max-w-full overflow-x-auto rounded-md border border-border/70 bg-muted/60 p-4 text-foreground",codeContent:"font-mono text-sm leading-6",kbdRoot:"inline-flex min-h-5 items-center rounded border border-border bg-muted/70 px-1.5 font-mono text-[0.75em] font-medium leading-5 text-foreground shadow-[inset_0_-1px_0_hsl(var(--monkeys-color-border))]",listRoot:"m-0 min-w-0 list-outside break-words ps-5 text-foreground",listSpacingCompact:"[&>li+li]:mt-1",listSpacingDefault:"[&>li+li]:mt-2",listSpacingRelaxed:"[&>li+li]:mt-3",listMarkerNone:"list-none ps-0",listMarkerDisc:"list-disc",listMarkerCircle:"list-[circle]",listMarkerSquare:"list-[square]",listMarkerDecimal:"list-decimal",listMarkerLowerAlpha:"list-[lower-alpha]",listMarkerUpperAlpha:"list-[upper-alpha]",listItem:"min-w-0 ps-1 leading-6 marker:text-muted-foreground",stackRoot:"flex min-w-0 flex-col",inlineRoot:"flex min-w-0 flex-row",gridRoot:"grid min-w-0",containerRoot:"mx-auto w-full min-w-0",aspectRatioRoot:"relative min-w-0 overflow-hidden [&>*]:h-full [&>*]:w-full",spinnerRoot:"inline-flex shrink-0 items-center justify-center text-current align-middle",spinnerIndicator:"h-5 w-5 rounded-full border-2 border-current border-r-transparent motion-safe:animate-spin motion-reduce:animate-none",visuallyHiddenRoot:"sr-only",visuallyHiddenFocusable:"focus:not-sr-only focus:fixed focus:left-4 focus:top-4 focus:z-[1000] focus:rounded-md focus:bg-background focus:px-4 focus:py-2 focus:text-foreground focus:shadow-lg focus:outline-hidden focus:ring-2 focus:ring-ring focus-within:not-sr-only focus-within:fixed focus-within:left-4 focus-within:top-4 focus-within:z-[1000] focus-within:rounded-md focus-within:bg-background focus-within:px-4 focus-within:py-2 focus-within:text-foreground focus-within:shadow-lg focus-within:ring-2 focus-within:ring-ring",fieldsetRoot:"min-w-0 border-0 p-0 text-foreground",fieldsetLegend:"min-w-0 text-sm font-semibold leading-6 text-foreground",fieldsetDescription:"mt-1 text-sm leading-5 text-muted-foreground",fieldsetError:"mt-1 text-sm leading-5 text-destructive-text",fieldsetContent:"mt-3 grid min-w-0 gap-3",stepsRoot:"m-0 min-w-0 list-none p-0 text-foreground",stepsHorizontal:"flex w-full max-w-full items-start overflow-x-auto pb-2",stepsVertical:"grid",stepsItem:"relative min-w-0",stepsItemHorizontal:"flex min-w-52 flex-1 items-start",stepsItemVertical:"pb-6 last:pb-0",stepsTrigger:"flex min-w-0 flex-1 items-start gap-3 rounded-md border-0 bg-transparent p-1 text-start text-inherit",stepsTriggerInteractive:"cursor-pointer hover:bg-accent/50 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",stepsTriggerDisabled:"!cursor-not-allowed opacity-60",stepsIndicator:"relative z-[1] inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full border text-xs font-semibold",stepsIndicatorPending:"border-border bg-background text-muted-foreground",stepsIndicatorCurrent:"border-primary/50 bg-primary/10 text-primary",stepsIndicatorCompleted:"border-primary bg-primary text-primary-foreground",stepsIndicatorError:"border-destructive bg-destructive text-destructive-foreground",stepsContent:"grid min-w-0 gap-1 pt-0.5",stepsLabel:"min-w-0 break-words text-sm font-medium leading-5",stepsDescription:"min-w-0 break-words text-sm leading-5 text-muted-foreground",stepsStatus:"sr-only",stepsConnector:"shrink-0 bg-border",stepsConnectorHorizontal:"mt-3.5 h-px w-8",stepsConnectorVertical:"absolute bottom-0 top-8 start-3.5 w-px -translate-x-1/2",stepsConnectorCompleted:"bg-primary/60",stepsConnectorError:"bg-destructive/60",scrollAreaViewport:"min-h-0 min-w-0",numberInputControl:"tabular-nums",numberInputStepControls:"me-1 flex shrink-0 self-stretch overflow-hidden border-s border-border",numberInputStepButton:"flex min-h-6 w-7 cursor-pointer items-center justify-center border-0 bg-transparent px-1 text-xs leading-none text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:z-[1] focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:!cursor-not-allowed disabled:opacity-40",passwordInputControl:"pe-2",passwordInputToggle:"me-1 inline-flex min-h-7 shrink-0 cursor-pointer items-center justify-center rounded px-2 text-xs font-medium text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:!cursor-not-allowed disabled:opacity-40",inputGroupRoot:l("relative flex min-w-0 items-stretch overflow-hidden rounded-md border border-border bg-background text-foreground focus-within:border-primary/50 focus-within:ring-2 focus-within:ring-ring/30",yt),inputGroupInvalid:"border-destructive/55 focus-within:border-destructive/70 focus-within:ring-destructive/25",inputGroupDisabled:"!cursor-not-allowed bg-muted/35",inputGroupContent:"flex min-w-0 flex-1 items-stretch [&>*]:min-w-0",inputGroupStartElement:"inline-flex shrink-0 items-center justify-center ps-3 pe-1 text-foreground/75",inputGroupEndElement:"inline-flex shrink-0 items-center justify-center ps-1 pe-3 text-foreground/75",inputGroupStartAddon:"inline-flex max-w-[min(40%,16rem)] shrink-0 items-center overflow-hidden border-e border-border bg-muted/60 px-3 text-sm text-foreground/75 text-ellipsis whitespace-nowrap [&>*]:min-w-0",inputGroupEndAddon:"inline-flex max-w-[min(40%,16rem)] shrink-0 items-center overflow-hidden border-s border-border bg-muted/60 px-3 text-sm text-foreground/75 text-ellipsis whitespace-nowrap [&>*]:min-w-0",panelRoot:l("group relative flex min-w-0 flex-col overflow-hidden rounded-lg border border-border/70 bg-background",Zt),panelInteractive:"cursor-pointer hover:shadow-md",panelSelected:"border-primary/45 bg-primary/5",panelDisabled:"!cursor-not-allowed opacity-60",panelMedia:"shrink-0 overflow-hidden",panelHeader:"min-w-0 p-token-lg",panelTitle:"min-w-0 truncate text-sm font-semibold leading-none text-foreground",panelDescription:"mt-1 text-sm leading-5 text-foreground/75",panelBody:"min-w-0 px-token-lg pb-token-lg text-sm text-foreground",panelBodyStandalone:"pt-token-lg",panelFooter:"shrink-0 border-t border-border/60 px-token-lg py-token-md",stateRoot:l("flex min-h-48 flex-col items-center justify-center rounded-lg border border-border/70 bg-background px-6 py-10 text-center",yt),stateIcon:"mb-token-lg flex h-12 w-12 items-center justify-center rounded-full bg-muted text-muted-foreground motion-safe:animate-in motion-safe:fade-in",stateTitle:"text-sm font-semibold text-foreground",stateDescription:"mt-2 max-w-md text-sm leading-6 text-muted-foreground",stateActions:"mt-token-xl flex flex-wrap items-center justify-center gap-token-sm",loadingSpinner:"h-5 w-5 motion-safe:animate-spin motion-reduce:animate-none",fieldRoot:"grid min-w-0 gap-token-md",fieldLabelRow:"flex min-w-0 items-center justify-between gap-token-md",fieldLabel:"min-w-0 text-sm font-medium leading-none text-foreground",fieldRequired:"text-destructive-text",fieldDescription:"text-sm leading-5 text-muted-foreground",fieldMessage:"text-sm leading-5 text-muted-foreground",fieldControl:"min-w-0",controlWrapper:l("relative flex min-w-0 items-center rounded-md border border-border bg-background text-foreground focus-within:border-primary/35",yt),controlBase:"min-w-0 flex-1 bg-transparent px-3 text-sm text-foreground outline-hidden placeholder:text-muted-foreground disabled:!cursor-not-allowed",controlInput:"h-9",controlTextarea:"min-h-24 resize-y py-2 leading-6",controlSelect:"h-9 cursor-pointer appearance-none pr-9 disabled:!cursor-not-allowed",controlIcon:"pointer-events-none ml-3 inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground",controlTrailing:"mr-3 inline-flex shrink-0 items-center justify-center text-muted-foreground",controlInvalid:"border-destructive/45 focus-within:border-destructive/60",controlDisabled:"!cursor-not-allowed opacity-60",controlReadOnly:"bg-muted/35",selectChevron:l("pointer-events-none absolute right-3 top-1/2 h-2 w-2 -translate-y-1/2 rotate-45 border-b border-r border-current text-muted-foreground",ga),selectMenu:"absolute left-0 right-0 top-[calc(100%+0.375rem)] z-50 max-h-60 overflow-auto rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg outline-hidden",selectOption:l("flex min-h-8 w-full min-w-0 cursor-pointer items-center rounded-sm px-2.5 py-1.5 text-left text-sm text-foreground",Zt),selectOptionActive:"bg-accent text-accent-foreground",selectOptionSelected:"bg-primary/10 text-primary",selectOptionDisabled:"!cursor-not-allowed opacity-50",selectPlaceholder:"text-muted-foreground",selectNative:"sr-only",switchRoot:"inline-flex min-w-0 cursor-pointer items-start gap-3",switchInput:"sr-only",switchTrack:l("relative mt-0.5 inline-flex h-6 w-10 shrink-0 items-center rounded-full border border-border bg-muted focus-within:border-primary/35",yt),switchThumb:l("h-4 w-4 translate-x-1 rounded-full bg-background shadow-sm",ga),switchChecked:"border-primary/40 bg-primary/80 text-primary-foreground",switchDisabled:"!cursor-not-allowed opacity-60",switchContent:"grid min-w-0 gap-1",switchLabel:"text-sm font-medium leading-none text-foreground",switchDescription:"text-sm leading-5 text-muted-foreground",checkboxRoot:"inline-flex min-w-0 cursor-pointer items-start gap-3",checkboxInput:"sr-only",checkboxBox:l("mt-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border border-border bg-background text-primary focus-within:border-primary/40",yt),checkboxBoxChecked:"border-primary/45 bg-primary text-primary-foreground",checkboxBoxInvalid:"border-destructive/50",checkboxIndicator:"text-xs font-bold leading-none",checkboxDisabled:"!cursor-not-allowed opacity-60",checkboxContent:"grid min-w-0 gap-1",checkboxLabel:"text-sm font-medium leading-none text-foreground",checkboxDescription:"text-sm leading-5 text-muted-foreground",radioGroupRoot:"grid min-w-0 gap-2",radioOption:l("inline-flex min-w-0 cursor-pointer items-start gap-3 rounded-md border border-border/60 bg-background px-3 py-2 text-sm",Zt,"hover:bg-muted/35"),radioInput:"sr-only",radioMarker:l("mt-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full border border-border bg-background text-primary focus-within:border-primary/40",yt),radioMarkerChecked:"border-primary/50 bg-primary/10",radioIndicator:"h-2 w-2 rounded-full bg-primary",radioOptionDisabled:"!cursor-not-allowed opacity-60 hover:bg-background",radioContent:"grid min-w-0 gap-1",radioLabel:"text-sm font-medium leading-none text-foreground",radioDescription:"text-sm leading-5 text-muted-foreground",dialogRoot:"relative",dialogTrigger:"",dialogTriggerDisabled:"!cursor-not-allowed opacity-60",dialogOverlay:"fixed inset-0 z-50 bg-background/70 backdrop-blur-sm motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out",dialogContent:"pointer-events-none fixed inset-0 z-50 flex min-h-0 items-center justify-center p-4",dialogPanel:l("pointer-events-auto relative flex max-h-[min(85vh,720px)] w-full max-w-lg min-w-0 flex-col overflow-hidden rounded-lg border border-border/70 bg-background text-foreground shadow-xl","motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95 motion-safe:duration-300 motion-safe:ease-out"),dialogHeader:"grid min-w-0 gap-1 border-b border-border/60 px-5 py-4",dialogTitle:"min-w-0 pr-8 text-base font-semibold leading-6 text-foreground",dialogDescription:"text-sm leading-6 text-muted-foreground",dialogBody:"min-h-0 min-w-0 overflow-auto px-5 py-4 text-sm text-foreground",dialogFooter:"flex shrink-0 flex-wrap items-center justify-end gap-2 border-t border-border/60 px-5 py-4",dialogClose:l("absolute right-3 top-3 inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-muted-foreground hover:bg-muted/60 hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30",Zt),dropdownRoot:"relative inline-flex min-w-0",dropdownTrigger:"",dropdownTriggerDisabled:"!cursor-not-allowed opacity-60",dropdownMenu:"z-50 min-w-48 overflow-hidden rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out",dropdownMenuTop:"bottom-[calc(100%+0.375rem)] top-auto",dropdownMenuEnd:"left-auto right-0",dropdownLabel:"px-2.5 py-1.5 text-xs font-semibold uppercase tracking-[0.12em] text-muted-foreground",dropdownSeparator:"my-1 h-px bg-border/70",dropdownItem:l("flex min-w-0 cursor-pointer items-center gap-2 rounded-sm px-2.5 py-2 text-left text-sm text-foreground hover:bg-accent/60 focus:bg-accent/60 data-[highlighted]:bg-accent/60 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30",Zt),dropdownItemDanger:"text-destructive-text hover:bg-destructive/10 focus:bg-destructive/10 data-[highlighted]:bg-destructive/10",dropdownItemDisabled:"!cursor-not-allowed opacity-50 hover:bg-transparent focus:bg-transparent data-[highlighted]:bg-transparent",dropdownItemIcon:"inline-flex h-4 w-4 shrink-0 items-center justify-center",dropdownItemContent:"grid min-w-0 flex-1 gap-0.5",dropdownItemLabel:"min-w-0 truncate",dropdownItemDescription:"min-w-0 truncate text-xs leading-4 text-muted-foreground",dropdownItemShortcut:"ml-3 shrink-0 text-xs font-medium text-muted-foreground",tooltipRoot:"relative inline-flex min-w-0",tooltipTrigger:"inline-flex min-w-0",tooltipContent:"pointer-events-none z-50 max-w-xs rounded-md border border-border bg-popover px-2.5 py-1.5 text-xs leading-5 text-popover-foreground shadow-lg motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out",noticeBase:l("flex min-w-0 gap-3 rounded-lg border px-4 py-3 text-sm",yt,"motion-safe:animate-in motion-safe:fade-in"),noticeDefault:"border-border bg-background text-foreground",noticePrimary:"border-primary/25 bg-primary/10 text-primary",noticeSuccess:"border-[hsl(var(--success,142_72%_29%)_/_0.30)] bg-[hsl(var(--success,142_72%_29%)_/_0.10)] text-foreground",noticeWarning:"border-[hsl(var(--warning,45_93%_47%)_/_0.30)] bg-[hsl(var(--warning,45_93%_47%)_/_0.10)] text-[hsl(var(--warning-foreground,28_73%_26%))]",noticeDanger:"border-destructive/30 bg-destructive/10 text-destructive-text",noticeMuted:"border-border/60 bg-muted/35 text-muted-foreground",noticeIcon:"mt-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center motion-safe:animate-in motion-safe:fade-in",noticeTitle:"font-semibold leading-5",noticeDescription:"leading-6",noticeActions:"mt-3 flex flex-wrap items-center gap-2",dividerRoot:l("shrink-0 border-border/70",yt),dividerLabel:"mx-3 shrink-0 text-xs font-medium uppercase tracking-[0.12em] text-muted-foreground motion-safe:animate-in motion-safe:fade-in",sectionHeaderRoot:"flex min-w-0 flex-wrap items-start justify-between gap-token-md motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out",sectionHeaderContent:"grid min-w-0 gap-1",sectionHeaderEyebrow:"text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground",sectionHeaderTitle:"text-base font-semibold leading-6 text-foreground",sectionHeaderDescription:"max-w-2xl text-sm leading-6 text-muted-foreground",sectionHeaderActions:"flex shrink-0 flex-wrap items-center gap-2",tabsRoot:"grid min-w-0 gap-token-md",tabsList:l("inline-flex min-w-0 flex-wrap items-center gap-token-xs rounded-lg border border-border/70 bg-muted/30 p-token-xs",yt),tabsTrigger:l("inline-flex min-w-0 cursor-pointer items-center justify-center rounded-md px-3 py-1.5 text-sm font-medium text-muted-foreground hover:bg-background/70 hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:ring-offset-1 motion-reduce:transition-none",Zt),tabsTriggerActive:"bg-background text-foreground shadow-sm",tabsTriggerDisabled:"!cursor-not-allowed opacity-50 hover:bg-transparent",tabsPanel:"min-w-0 rounded-lg border border-border/70 bg-background p-4 text-sm text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30 motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out motion-reduce:transition-none",segmentedRoot:l("inline-flex min-w-0 items-center gap-1 rounded-lg border border-border/70 bg-muted/30 p-1",yt),segmentedItem:l("inline-flex min-w-0 cursor-pointer items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium text-muted-foreground hover:bg-background/70 hover:text-foreground focus-visible:outline-hidden",Zt),segmentedItemActive:"bg-background text-foreground shadow-sm",segmentedItemDisabled:"!cursor-not-allowed opacity-50 hover:bg-transparent",progressRoot:"grid min-w-0 gap-2",progressTrack:"h-2 w-full overflow-hidden rounded-full bg-muted",progressIndicator:"h-full rounded-full bg-primary motion-safe:transition-[width] motion-safe:duration-500 motion-safe:ease-out",progressLabelRow:"flex min-w-0 items-center justify-between gap-3",progressLabel:"min-w-0 truncate text-sm font-medium text-foreground",progressValue:"shrink-0 text-xs font-medium text-muted-foreground",skeletonRoot:"relative overflow-hidden rounded-md bg-muted/70",avatarRoot:"relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full border border-border bg-muted text-sm font-semibold text-muted-foreground motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",avatarImage:"h-full w-full object-cover",avatarFallback:"flex h-full w-full items-center justify-center bg-muted text-foreground",avatarStatus:"absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-muted-foreground motion-safe:animate-pulse",avatarText:"min-w-0 truncate text-sm font-medium text-foreground",toolbarRoot:l("flex min-w-0 flex-wrap items-center justify-between gap-token-md rounded-lg border border-border/70 bg-background px-token-lg py-token-md",yt),toolbarLeading:"flex min-w-0 items-center gap-token-md",toolbarTitle:"min-w-0 truncate text-sm font-semibold text-foreground",toolbarDescription:"mt-0.5 text-sm leading-5 text-muted-foreground",toolbarContent:"min-w-0 flex-1",toolbarActions:"flex shrink-0 flex-wrap items-center gap-token-sm",breadcrumbRoot:"min-w-0 text-sm text-muted-foreground",breadcrumbList:"flex min-w-0 flex-wrap items-center gap-1.5",breadcrumbItem:"inline-flex min-w-0 items-center gap-1.5",breadcrumbLink:"min-w-0 cursor-pointer truncate text-muted-foreground hover:text-foreground disabled:!cursor-not-allowed disabled:opacity-50 aria-disabled:!cursor-not-allowed aria-disabled:opacity-50 aria-disabled:hover:text-muted-foreground motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",breadcrumbCurrent:"min-w-0 truncate font-medium text-foreground",breadcrumbSeparator:"shrink-0 text-muted-foreground/70",paginationRoot:"flex min-w-0 flex-wrap items-center justify-between gap-3 text-sm",paginationInfo:"min-w-0 text-muted-foreground",paginationControls:"flex min-w-0 flex-wrap items-center justify-end gap-1.5",paginationButton:"inline-flex h-8 min-w-8 cursor-pointer items-center justify-center whitespace-nowrap rounded-md border border-border bg-background px-2.5 text-sm font-medium text-foreground hover:bg-accent/60 disabled:!cursor-not-allowed disabled:opacity-50 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",paginationButtonDisabled:"!cursor-not-allowed opacity-50",paginationPage:"inline-flex h-8 min-w-8 cursor-default items-center justify-center rounded-md bg-muted/50 px-2.5 text-sm font-medium text-foreground hover:bg-muted/50",paginationEllipsis:"inline-flex h-8 min-w-6 items-center justify-center px-1 text-sm text-muted-foreground",descriptionListRoot:"grid min-w-0 gap-3 text-sm",descriptionListItem:"grid min-w-0 gap-1 rounded-md border border-border/60 bg-background px-3 py-2 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out hover:shadow-sm",descriptionListTerm:"min-w-0 truncate text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",descriptionListValue:"min-w-0 text-sm leading-6 text-foreground",accordionRoot:"grid min-w-0 gap-2",accordionItem:"overflow-hidden rounded-lg border border-border/70 bg-background motion-safe:transition motion-safe:duration-300 motion-safe:ease-out motion-reduce:transition-none",accordionTrigger:"flex w-full min-w-0 cursor-pointer items-center justify-between gap-3 px-4 py-3 text-start text-sm font-medium text-foreground hover:bg-muted/40 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:!cursor-not-allowed disabled:opacity-50 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out motion-reduce:transition-none",accordionTriggerIcon:l("h-2 w-2 shrink-0 rotate-45 border-b border-r border-current text-muted-foreground",ga,"motion-reduce:transition-none"),accordionPanel:"border-t border-border/60 px-4 py-3 text-sm leading-6 text-muted-foreground motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out motion-reduce:animate-none",menuTrigger:"inline-flex min-w-0",menuContent:"z-50 min-w-44 overflow-hidden rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg outline-hidden motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95 motion-safe:duration-300 motion-safe:ease-out",menuLabel:"px-2 py-1.5 text-xs font-medium text-muted-foreground",menuSeparator:"-mx-1 my-1 h-px bg-border",menuItem:l("relative flex min-h-8 min-w-0 cursor-pointer select-none items-center gap-2 rounded-sm px-2.5 py-1.5 text-sm text-foreground outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:!cursor-not-allowed data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",Zt),menuItemDefault:"text-foreground",menuItemPrimary:"text-primary focus:text-primary data-[highlighted]:text-primary",menuItemSuccess:"text-[hsl(var(--success,142_72%_29%))] focus:text-[hsl(var(--success,142_72%_29%))] data-[highlighted]:text-[hsl(var(--success,142_72%_29%))]",menuItemWarning:"text-[hsl(var(--warning-foreground,28_73%_26%))] focus:text-[hsl(var(--warning-foreground,28_73%_26%))] data-[highlighted]:text-[hsl(var(--warning-foreground,28_73%_26%))]",menuItemDanger:"text-destructive-text focus:text-destructive-text data-[highlighted]:text-destructive-text",menuItemMuted:"text-muted-foreground focus:text-foreground data-[highlighted]:text-foreground",menuItemDisabled:"!cursor-not-allowed opacity-50 data-[disabled]:pointer-events-none",menuItemIcon:"inline-flex h-4 w-4 shrink-0 items-center justify-center",menuItemLabel:"min-w-0 flex-1 truncate",menuItemShortcut:"ml-4 shrink-0 text-xs font-medium text-muted-foreground",menuCheckboxIndicator:"absolute left-2 inline-flex h-4 w-4 items-center justify-center text-current",menuRadioIndicator:"absolute left-2 inline-flex h-4 w-4 items-center justify-center text-current",menuSubTrigger:l("relative flex min-h-8 min-w-0 cursor-pointer select-none items-center gap-2 rounded-sm px-2.5 py-1.5 text-sm text-foreground outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:!cursor-not-allowed data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",Zt),menuSubTriggerIcon:"ml-auto inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground",menuSubContent:"z-50 min-w-40 overflow-hidden rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg outline-hidden motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95 motion-safe:duration-300 motion-safe:ease-out",tableContainer:l("relative isolate min-w-0 overflow-auto rounded-lg border border-border/70 bg-background/95 bg-clip-padding [scrollbar-gutter:stable]","[--base-table-header-height:2.75rem] [--base-table-split-scrollbar-gutter:0.75rem]","[--base-table-sticky-header-bg:hsl(var(--background))] [--base-table-header-separator:hsl(var(--border)_/_0.7)]",rd,yt),tableContainerFooterAttached:"!rounded-b-none !shadow-none",tableRoot:"w-full caption-bottom border-separate border-spacing-0 text-sm text-foreground",tableCaption:"mt-3 text-sm text-muted-foreground",tableHeader:l("relative z-[2] bg-transparent [&_tr]:bg-transparent",mp),tableBody:"[&_tr:last-child>*]:border-b-0",tableFooter:"bg-muted/30 font-medium [&_tr>*]:border-t [&_tr>*]:border-border/70",tableFooterBar:l("flex min-w-0 flex-wrap items-center justify-between gap-3 rounded-lg border border-border/70 bg-muted/20 px-4 py-3 text-sm text-foreground shadow-none",yt),tableFooterBarAttached:"-mt-px rounded-t-none border-t border-border/70 shadow-none",tableFooterBarLeading:"flex min-w-0 items-center gap-2",tableFooterBarContent:"min-w-0 flex-1",tableFooterBarActions:"ms-auto flex shrink-0 flex-wrap items-center gap-2",tableSplitRoot:"grid w-full min-w-0 grid-cols-[minmax(0,1fr)] grid-rows-[auto_minmax(0,1fr)_auto] caption-bottom border-separate border-spacing-0 text-sm text-foreground",tableSplitHeader:"block w-full min-w-0 shrink-0 overflow-x-hidden overflow-y-hidden bg-transparent",tableSplitBody:l("block min-h-0 w-full min-w-0 max-w-full justify-self-stretch overflow-auto [scrollbar-gutter:stable]",rd),tableSplitFooter:"block w-full min-w-0 shrink-0 overflow-x-hidden overflow-y-hidden",tableSplitRow:"grid w-max min-w-full [grid-template-columns:var(--base-table-column-template)]",tableSplitHead:"flex min-w-0 overflow-hidden",tableSplitCell:"block min-w-0 overflow-hidden [overflow-wrap:anywhere]",tableRow:l("[&>*]:border-b [&>*]:border-border/60 data-[state=selected]:bg-primary/5 data-[state=selected]:[&>*]:bg-primary/5",yt),tableRowInteractive:"cursor-pointer [--base-table-row-hover-bg:hsl(var(--muted)_/_0.35)] hover:bg-[var(--base-table-row-hover-bg)] hover:[&>td]:bg-[var(--base-table-row-hover-bg)] hover:[&>th]:bg-[var(--base-table-row-hover-bg)]",tableRowSelected:"bg-primary/5 [&>*]:bg-primary/5",tableRowDisabled:"!cursor-not-allowed opacity-60",tableHead:"relative h-11 whitespace-nowrap px-3 py-2 text-left align-middle text-xs font-semibold text-muted-foreground shadow-[inset_0_-1px_0_var(--base-table-header-separator)]",tableHeadContent:"flex min-w-0 items-center justify-between gap-2",tableHeadMain:"flex min-w-0 items-center gap-2",tableHeadIcon:"inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground",tableHeadText:"grid min-w-0 gap-0.5",tableHeadLabel:"min-w-0 truncate text-xs font-semibold leading-4 text-foreground",tableHeadDescription:"min-w-0 truncate text-xs font-normal leading-4 text-muted-foreground",tableHeadMeta:"shrink-0 text-xs font-medium text-muted-foreground",tableHeadActions:"flex shrink-0 items-center gap-1",tableHeadSortButton:l("inline-flex min-w-0 cursor-pointer items-center gap-1 rounded-sm text-left focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30 disabled:!cursor-not-allowed disabled:opacity-60",yt),tableHeadSortIcon:l("inline-flex h-3 w-3 shrink-0 items-center justify-center text-muted-foreground",ga),tableHeadDragHandle:l("inline-flex h-5 w-4 shrink-0 cursor-grab items-center justify-center rounded-sm text-muted-foreground hover:bg-muted active:cursor-grabbing focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30 disabled:!cursor-not-allowed disabled:opacity-50",yt),tableHeadResizeHandle:l("absolute end-0 top-1/2 h-7 w-2 -translate-y-1/2 cursor-col-resize touch-none rounded-sm after:absolute after:start-1/2 after:top-1/2 after:h-5 after:w-px after:-translate-x-1/2 after:-translate-y-1/2 after:bg-border hover:after:bg-primary focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30 disabled:!cursor-not-allowed disabled:opacity-50",yt),tableCell:"min-w-0 px-3 py-2 align-middle text-sm text-foreground [overflow-wrap:anywhere]",tableCellAlignCenter:"text-center",tableCellAlignRight:"text-right",tableEmptyRow:"[&>*]:border-b [&>*]:border-border/60",tableEmptyCell:"px-4 py-10 text-center",tableEmptyContent:"mx-auto flex max-w-md flex-col items-center justify-center text-center",tableEmptyIcon:"mb-3 flex h-10 w-10 items-center justify-center rounded-full bg-muted text-muted-foreground",tableEmptyTitle:"text-sm font-semibold text-foreground",tableEmptyDescription:"mt-1 text-sm leading-6 text-muted-foreground",tableEmptyActions:"mt-4 flex flex-wrap items-center justify-center gap-2",tableLoadingRow:"[&>*]:border-b [&>*]:border-border/60",tableLoadingCell:"px-3 py-2",tableLoadingSkeleton:"h-4 w-full rounded-md bg-muted/70",layoutRoot:l("grid min-w-0 overflow-hidden grid-rows-[auto_minmax(0,1fr)_auto] gap-3 rounded-lg border border-border/70 bg-background p-3 text-foreground",yt),layoutRootFull:"h-full min-h-0",layoutHeader:"min-w-0",layoutBody:"grid min-h-0 min-w-0 overflow-hidden gap-token-md",layoutSidebar:"min-h-0 min-w-0 overflow-hidden",layoutMain:"min-h-0 min-w-0 overflow-hidden",layoutAside:"min-h-0 min-w-0 overflow-hidden",layoutFooter:"min-w-0",layoutPane:l("h-full max-h-full min-h-0 min-w-0 overflow-hidden rounded-lg bg-background text-foreground",yt),layoutPaneScrollable:"overflow-auto",layoutPaneBordered:"border border-border/70",layoutPaneMuted:"bg-muted/25",layoutPaneSoft:"bg-background/95 shadow-sm",layoutPaneTransparent:"bg-transparent shadow-none",layoutSplitRoot:"grid min-h-0 min-w-0 overflow-hidden",layoutSplitHorizontal:"grid-flow-col",layoutSplitVertical:"grid-flow-row",layoutSplitPane:"min-h-0 min-w-0 overflow-hidden",layoutSplitPrimary:"",layoutSplitSecondary:"",layoutResizeHandle:l("group/resize relative z-10 flex shrink-0 items-center justify-center bg-transparent text-muted-foreground hover:bg-border/60 active:bg-border/70 focus-visible:bg-border/60 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/30",Zt),layoutResizeHandleHorizontal:"w-2 cursor-col-resize",layoutResizeHandleVertical:"h-2 cursor-row-resize",layoutResizeHandleDisabled:"cursor-default opacity-60",layoutResizeHandleIndicator:"rounded-full bg-muted-foreground/45 group-hover/resize:bg-primary/70"},pp={compact:{buttonBase:"h-8 px-2.5 text-xs",buttonIconOnly:"h-8 w-8 px-0",badgeBase:"px-1.5 py-0 text-xs",panelHeader:"p-token-md",panelBody:"px-token-md pb-token-md text-xs",panelBodyStandalone:"pt-token-md",panelFooter:"px-token-md py-token-md",stateRoot:"min-h-36 px-4 py-7",stateIcon:"mb-3 h-10 w-10",fieldRoot:"gap-token-sm",fieldLabel:"text-xs",fieldDescription:"text-xs leading-5",fieldMessage:"text-xs leading-5",controlInput:"h-8 text-xs",controlTextarea:"min-h-20 text-xs",controlSelect:"h-8 text-xs",selectMenu:"text-xs",selectOption:"min-h-7 px-2 py-1 text-xs",switchTrack:"h-5 w-9",switchThumb:"h-3.5 w-3.5",checkboxBox:"h-3.5 w-3.5",checkboxLabel:"text-xs",checkboxDescription:"text-xs leading-5",radioOption:"px-2 py-1.5 text-xs",radioMarker:"h-3.5 w-3.5",radioIndicator:"h-1.5 w-1.5",radioLabel:"text-xs",radioDescription:"text-xs leading-5",dialogPanel:"max-w-md",dialogHeader:"px-4 py-3",dialogTitle:"text-sm leading-5",dialogDescription:"text-xs leading-5",dialogBody:"px-4 py-3 text-xs",dialogFooter:"px-4 py-3",dropdownMenu:"min-w-44 text-xs",dropdownItem:"px-2 py-1.5 text-xs",tooltipContent:"text-xs leading-4",noticeBase:"px-3 py-2 text-xs",dividerLabel:"text-xs",sectionHeaderRoot:"gap-token-sm",sectionHeaderTitle:"text-sm leading-5",sectionHeaderDescription:"text-xs leading-5",tabsList:"gap-token-xs p-token-xs",tabsTrigger:"px-2 py-1 text-xs",tabsPanel:"p-3 text-xs",segmentedRoot:"gap-token-xs p-token-xs",segmentedItem:"px-2 py-1 text-xs",progressTrack:"h-1.5",avatarRoot:"text-xs",toolbarRoot:"gap-token-sm px-token-md py-token-md",toolbarTitle:"text-xs",toolbarDescription:"text-xs leading-5",paginationButton:"h-7 min-w-7 px-2 text-xs",paginationPage:"h-7 min-w-7 px-2 text-xs",descriptionListRoot:"gap-2 text-xs",descriptionListItem:"px-2 py-1.5",descriptionListTerm:"text-xs",descriptionListValue:"text-xs leading-5",accordionTrigger:"px-3 py-2 text-xs",accordionPanel:"px-3 py-2 text-xs leading-5",menuContent:"min-w-40 p-0.5 text-xs",menuSubContent:"min-w-36 p-0.5 text-xs",menuLabel:"px-2 py-1 text-xs",menuItem:"min-h-7 px-2 py-1 text-xs",menuSubTrigger:"min-h-7 px-2 py-1 text-xs",menuItemShortcut:"text-xs",tableContainer:"[--base-table-header-height:2.25rem]",tableHead:"h-9 px-2 py-1.5 text-xs",tableCell:"px-2 py-1.5 text-xs",tableHeadLabel:"text-xs",tableHeadDescription:"text-xs leading-3",tableLoadingCell:"px-2 py-1.5",layoutRoot:"gap-token-md p-token-md",layoutBody:"gap-token-md",layoutPane:"rounded-md text-xs",layoutResizeHandleHorizontal:"w-1.5",layoutResizeHandleVertical:"h-1.5"},default:{buttonBase:"h-9"},comfortable:{buttonBase:"h-10 px-3.5",buttonIconOnly:"h-10 w-10 px-0",badgeBase:"px-2.5 py-1",panelHeader:"p-token-xl",panelBody:"px-token-xl pb-token-xl",panelBodyStandalone:"pt-token-xl",panelFooter:"px-token-xl py-token-lg",stateRoot:"min-h-56 px-8 py-12",stateIcon:"mb-5 h-14 w-14",fieldRoot:"gap-token-md",controlInput:"h-10",controlTextarea:"min-h-28",controlSelect:"h-10",selectMenu:"p-1.5",selectOption:"min-h-9 px-3 py-2",switchTrack:"h-7 w-12",switchThumb:"h-5 w-5",checkboxBox:"h-5 w-5",radioOption:"px-4 py-3",radioMarker:"h-5 w-5",radioIndicator:"h-2.5 w-2.5",dialogPanel:"max-w-xl",dialogHeader:"px-6 py-5",dialogBody:"px-6 py-5",dialogFooter:"px-6 py-5",dropdownMenu:"min-w-56",dropdownItem:"px-3 py-2.5",noticeBase:"px-5 py-4",sectionHeaderTitle:"text-lg leading-7",tabsTrigger:"px-3.5 py-2",tabsPanel:"p-5",segmentedItem:"px-3.5 py-2",progressTrack:"h-2.5",toolbarRoot:"px-token-xl py-token-lg",paginationButton:"h-9 min-w-9 px-3",paginationPage:"h-9 min-w-9 px-3",descriptionListItem:"px-4 py-3",accordionTrigger:"px-5 py-4",accordionPanel:"px-5 py-4",menuContent:"min-w-48 p-1.5",menuSubContent:"min-w-44 p-1.5",menuItem:"min-h-9 px-3 py-2",menuSubTrigger:"min-h-9 px-3 py-2",tableContainer:"[--base-table-header-height:3rem]",tableHead:"h-12 px-4 py-3",tableCell:"px-4 py-3",tableLoadingCell:"px-4 py-3",layoutRoot:"gap-token-lg p-token-lg",layoutBody:"gap-token-lg",layoutPane:"rounded-xl",layoutResizeHandleHorizontal:"w-2.5",layoutResizeHandleVertical:"h-2.5"}},gp={none:{buttonBase:"rounded-none",badgeBase:"rounded-none",panelRoot:"rounded-none",stateRoot:"rounded-none",stateIcon:"rounded-none",controlWrapper:"rounded-none",selectMenu:"rounded-none",selectOption:"rounded-none",switchTrack:"rounded-none",switchThumb:"rounded-none",checkboxBox:"rounded-none",radioOption:"rounded-none",dialogPanel:"rounded-none",dialogClose:"rounded-none",dropdownMenu:"rounded-none",dropdownItem:"rounded-none",tooltipContent:"rounded-none",noticeBase:"rounded-none",tabsList:"rounded-none",tabsTrigger:"rounded-none",tabsPanel:"rounded-none",segmentedRoot:"rounded-none",segmentedItem:"rounded-none",progressTrack:"rounded-none",progressIndicator:"rounded-none",skeletonRoot:"rounded-none",avatarRoot:"rounded-none",avatarStatus:"rounded-none",toolbarRoot:"rounded-none",paginationButton:"rounded-none",paginationPage:"rounded-none",descriptionListItem:"rounded-none",accordionItem:"rounded-none",menuContent:"rounded-none",menuItem:"rounded-none",menuSubTrigger:"rounded-none",menuSubContent:"rounded-none",tableContainer:"rounded-none",tableEmptyIcon:"rounded-none",tableLoadingSkeleton:"rounded-none",layoutRoot:"rounded-none",layoutPane:"rounded-none"},sm:{buttonBase:"rounded-sm",badgeBase:"rounded-sm",panelRoot:"rounded-sm",stateRoot:"rounded-sm",stateIcon:"rounded-sm",controlWrapper:"rounded-sm",selectMenu:"rounded-sm",selectOption:"rounded-sm",switchTrack:"rounded-sm",switchThumb:"rounded-sm",checkboxBox:"rounded-sm",radioOption:"rounded-sm",dialogPanel:"rounded-sm",dialogClose:"rounded-sm",dropdownMenu:"rounded-sm",dropdownItem:"rounded-sm",tooltipContent:"rounded-sm",noticeBase:"rounded-sm",tabsList:"rounded-sm",tabsTrigger:"rounded-sm",tabsPanel:"rounded-sm",segmentedRoot:"rounded-sm",segmentedItem:"rounded-sm",progressTrack:"rounded-sm",progressIndicator:"rounded-sm",skeletonRoot:"rounded-sm",avatarRoot:"rounded-sm",avatarStatus:"rounded-sm",toolbarRoot:"rounded-sm",paginationButton:"rounded-sm",paginationPage:"rounded-sm",descriptionListItem:"rounded-sm",accordionItem:"rounded-sm",menuContent:"rounded-sm",menuItem:"rounded-sm",menuSubTrigger:"rounded-sm",menuSubContent:"rounded-sm",tableContainer:"rounded-sm",tableEmptyIcon:"rounded-sm",tableLoadingSkeleton:"rounded-sm",layoutRoot:"rounded-sm",layoutPane:"rounded-sm"},md:{},lg:{buttonBase:"rounded-lg",badgeBase:"rounded-lg",panelRoot:"rounded-xl",stateRoot:"rounded-xl",stateIcon:"rounded-xl",controlWrapper:"rounded-lg",selectMenu:"rounded-lg",selectOption:"rounded-md",switchTrack:"rounded-full",switchThumb:"rounded-full",checkboxBox:"rounded-md",radioOption:"rounded-xl",dialogPanel:"rounded-xl",dialogClose:"rounded-lg",dropdownMenu:"rounded-lg",dropdownItem:"rounded-md",tooltipContent:"rounded-md",noticeBase:"rounded-xl",tabsList:"rounded-xl",tabsTrigger:"rounded-lg",tabsPanel:"rounded-xl",segmentedRoot:"rounded-xl",segmentedItem:"rounded-lg",skeletonRoot:"rounded-lg",toolbarRoot:"rounded-xl",descriptionListItem:"rounded-lg",accordionItem:"rounded-xl",menuContent:"rounded-lg",menuItem:"rounded-md",menuSubTrigger:"rounded-md",menuSubContent:"rounded-lg",tableContainer:"rounded-xl",tableEmptyIcon:"rounded-xl",tableLoadingSkeleton:"rounded-lg",layoutRoot:"rounded-xl",layoutPane:"rounded-xl"},xl:{buttonBase:"rounded-xl",badgeBase:"rounded-xl",panelRoot:"rounded-2xl",stateRoot:"rounded-2xl",stateIcon:"rounded-2xl",controlWrapper:"rounded-xl",selectMenu:"rounded-xl",selectOption:"rounded-lg",switchTrack:"rounded-full",switchThumb:"rounded-full",checkboxBox:"rounded-lg",radioOption:"rounded-2xl",dialogPanel:"rounded-2xl",dialogClose:"rounded-xl",dropdownMenu:"rounded-xl",dropdownItem:"rounded-lg",tooltipContent:"rounded-lg",noticeBase:"rounded-2xl",tabsList:"rounded-2xl",tabsTrigger:"rounded-xl",tabsPanel:"rounded-2xl",segmentedRoot:"rounded-2xl",segmentedItem:"rounded-xl",skeletonRoot:"rounded-xl",toolbarRoot:"rounded-2xl",paginationButton:"rounded-xl",paginationPage:"rounded-xl",descriptionListItem:"rounded-xl",accordionItem:"rounded-2xl",menuContent:"rounded-xl",menuItem:"rounded-lg",menuSubTrigger:"rounded-lg",menuSubContent:"rounded-xl",tableContainer:"rounded-2xl",tableEmptyIcon:"rounded-2xl",tableLoadingSkeleton:"rounded-xl",layoutRoot:"rounded-2xl",layoutPane:"rounded-2xl"},full:{buttonBase:"rounded-full",badgeBase:"rounded-full",panelRoot:"rounded-2xl",stateRoot:"rounded-2xl",stateIcon:"rounded-full",controlWrapper:"rounded-full",selectMenu:"rounded-2xl",selectOption:"rounded-full",switchTrack:"rounded-full",switchThumb:"rounded-full",checkboxBox:"rounded-full",radioOption:"rounded-2xl",dialogPanel:"rounded-2xl",dialogClose:"rounded-full",dropdownMenu:"rounded-2xl",dropdownItem:"rounded-full",tooltipContent:"rounded-full",noticeBase:"rounded-2xl",tabsList:"rounded-full",tabsTrigger:"rounded-full",tabsPanel:"rounded-2xl",segmentedRoot:"rounded-full",segmentedItem:"rounded-full",progressTrack:"rounded-full",progressIndicator:"rounded-full",skeletonRoot:"rounded-full",avatarRoot:"rounded-full",avatarStatus:"rounded-full",toolbarRoot:"rounded-2xl",paginationButton:"rounded-full",paginationPage:"rounded-full",descriptionListItem:"rounded-2xl",accordionItem:"rounded-2xl",menuContent:"rounded-2xl",menuItem:"rounded-full",menuSubTrigger:"rounded-full",menuSubContent:"rounded-2xl",tableContainer:"rounded-2xl",tableEmptyIcon:"rounded-full",tableLoadingSkeleton:"rounded-full",layoutRoot:"rounded-2xl",layoutPane:"rounded-2xl"}},bp={none:{buttonBase:"border-transparent",badgeBase:"border-transparent",panelRoot:"border-transparent",panelFooter:"border-transparent",stateRoot:"border-transparent",controlWrapper:"border-transparent",selectMenu:"border-transparent",switchTrack:"border-transparent",checkboxBox:"border-transparent",radioOption:"border-transparent",radioMarker:"border-transparent",dialogPanel:"border-transparent",dialogHeader:"border-transparent",dialogFooter:"border-transparent",dropdownMenu:"border-transparent",tooltipContent:"border-transparent",noticeBase:"border-transparent",dividerRoot:"border-transparent",tabsList:"border-transparent",tabsPanel:"border-transparent",segmentedRoot:"border-transparent",avatarRoot:"border-transparent",toolbarRoot:"border-transparent",paginationButton:"border-transparent",descriptionListItem:"border-transparent",accordionItem:"border-transparent",accordionPanel:"border-transparent",menuContent:"border-transparent",menuSeparator:"bg-transparent",menuSubContent:"border-transparent",tableContainer:"border-transparent [--base-table-header-separator:transparent]",tableHeader:"border-transparent",tableFooter:"[&_tr>*]:border-transparent",tableFooterBar:"border-transparent",tableFooterBarAttached:"border-t border-transparent",tableRow:"[&>*]:border-transparent",tableEmptyRow:"[&>*]:border-transparent",tableLoadingRow:"[&>*]:border-transparent",layoutRoot:"border-transparent",layoutPaneBordered:"border-transparent",layoutResizeHandle:"bg-transparent hover:bg-transparent active:bg-transparent focus-visible:bg-transparent"},subtle:{buttonDefault:"border-border/60",badgeDefault:"border-border/60",panelRoot:"border-border/60",panelFooter:"border-border/60",stateRoot:"border-border/60",controlWrapper:"border-border/60",selectMenu:"border-border/60",switchTrack:"border-border/60",checkboxBox:"border-border/60",radioOption:"border-border/60",radioMarker:"border-border/60",dialogPanel:"border-border/60",dialogHeader:"border-border/60",dialogFooter:"border-border/60",dropdownMenu:"border-border/60",tooltipContent:"border-border/60",noticeDefault:"border-border/60",dividerRoot:"border-border/60",tabsList:"border-border/60",tabsPanel:"border-border/60",segmentedRoot:"border-border/60",avatarRoot:"border-border/60",toolbarRoot:"border-border/60",paginationButton:"border-border/60",descriptionListItem:"border-border/60",accordionItem:"border-border/60",accordionPanel:"border-border/60",menuContent:"border-border/60",menuSeparator:"bg-border/60",menuSubContent:"border-border/60",tableContainer:"border-border/60 [--base-table-header-separator:hsl(var(--border)_/_0.6)]",tableHeader:"border-border/60",tableFooter:"[&_tr>*]:border-border/60",tableFooterBar:"border-border/60",tableFooterBarAttached:"border-t border-border/60",tableRow:"[&>*]:border-border/50",tableEmptyRow:"[&>*]:border-border/50",tableLoadingRow:"[&>*]:border-border/50",layoutRoot:"border-border/60",layoutPaneBordered:"border-border/60"},solid:{},strong:{buttonDefault:"border-foreground/20",badgeDefault:"border-foreground/20",panelRoot:"border-foreground/20",panelFooter:"border-foreground/20",stateRoot:"border-foreground/20",controlWrapper:"border-foreground/20",selectMenu:"border-foreground/20",switchTrack:"border-foreground/20",checkboxBox:"border-foreground/20",radioOption:"border-foreground/20",radioMarker:"border-foreground/20",dialogPanel:"border-foreground/20",dialogHeader:"border-foreground/15",dialogFooter:"border-foreground/15",dropdownMenu:"border-foreground/20",tooltipContent:"border-foreground/20",noticeDefault:"border-foreground/20",dividerRoot:"border-foreground/20",tabsList:"border-foreground/20",tabsPanel:"border-foreground/20",segmentedRoot:"border-foreground/20",avatarRoot:"border-foreground/20",toolbarRoot:"border-foreground/20",paginationButton:"border-foreground/20",descriptionListItem:"border-foreground/20",accordionItem:"border-foreground/20",accordionPanel:"border-foreground/20",menuContent:"border-foreground/20",menuSeparator:"bg-foreground/15",menuSubContent:"border-foreground/20",tableContainer:"border-foreground/20 [--base-table-header-separator:hsl(var(--foreground)_/_0.15)]",tableHeader:"border-foreground/20",tableFooter:"[&_tr>*]:border-foreground/20",tableFooterBar:"border-foreground/20",tableFooterBarAttached:"border-t border-foreground/20",tableRow:"[&>*]:border-foreground/15",tableEmptyRow:"[&>*]:border-foreground/15",tableLoadingRow:"[&>*]:border-foreground/15",layoutRoot:"border-foreground/20",layoutPaneBordered:"border-foreground/20",layoutResizeHandle:"hover:bg-foreground/15 active:bg-foreground/20 focus-visible:bg-foreground/15"}},fp={plain:{},muted:{buttonDefault:"bg-muted/20 hover:bg-muted/45",panelRoot:"bg-card",panelFooter:"bg-muted/20",stateRoot:"bg-muted/20",controlWrapper:"bg-background",selectMenu:"bg-background",selectOptionActive:"bg-muted/70 text-foreground",checkboxBox:"bg-background",radioOption:"bg-card hover:bg-muted/45",radioMarker:"bg-background",dialogPanel:"bg-card",dropdownMenu:"bg-background",dropdownItem:"hover:bg-muted/60",tooltipContent:"bg-popover",noticeDefault:"bg-muted/20",tabsList:"bg-muted/35",tabsTriggerActive:"bg-background",tabsPanel:"bg-card",segmentedRoot:"bg-muted/35",segmentedItemActive:"bg-background",progressTrack:"bg-muted/60",skeletonRoot:"bg-muted",toolbarRoot:"bg-card",paginationButton:"bg-background hover:bg-muted/60",paginationPage:"bg-muted/60",descriptionListItem:"bg-card",accordionItem:"bg-card",menuContent:"bg-background",menuItem:"focus:bg-muted/70 data-[highlighted]:bg-muted/70",menuSubTrigger:"focus:bg-muted/70 data-[highlighted]:bg-muted/70 data-[state=open]:bg-muted/70",menuSubContent:"bg-background",tableContainer:"bg-background/95 [scrollbar-gutter:stable]",tableFooter:"bg-muted/35",tableFooterBar:"bg-muted/30 shadow-none",tableRowInteractive:"cursor-pointer [--base-table-row-hover-bg:hsl(var(--muted)_/_0.45)]",tableLoadingSkeleton:"bg-muted",layoutRoot:"bg-card",layoutPane:"bg-card",layoutPaneMuted:"bg-muted/35",layoutResizeHandle:"hover:bg-border/70 active:bg-border/80 focus-visible:bg-border/70"},soft:{buttonDefault:"bg-muted/30 hover:bg-muted/55",panelRoot:"bg-background/95 shadow-sm",stateRoot:"bg-background/95 shadow-sm",controlWrapper:"bg-background/95",selectMenu:"bg-background/95 shadow-xl",selectOptionActive:"bg-muted/60 text-foreground",checkboxBox:"bg-background/95",radioOption:"bg-background/95 shadow-sm hover:bg-muted/35",radioMarker:"bg-background/95",dialogPanel:"bg-background/95 shadow-xl",dropdownMenu:"bg-background/95 shadow-xl",dropdownItem:"hover:bg-muted/55",tooltipContent:"bg-popover shadow-xl",noticeDefault:"bg-background/95 shadow-sm",tabsList:"bg-background/60 shadow-sm",tabsTriggerActive:"bg-background",tabsPanel:"bg-background/95 shadow-sm",segmentedRoot:"bg-background/60 shadow-sm",segmentedItemActive:"bg-background",skeletonRoot:"bg-background/80",toolbarRoot:"bg-background/95 shadow-sm",paginationButton:"bg-background/95 hover:bg-muted/55",descriptionListItem:"bg-background/95 shadow-sm",accordionItem:"bg-background/95 shadow-sm",menuContent:"bg-background/95 shadow-xl",menuItem:"focus:bg-muted/60 data-[highlighted]:bg-muted/60",menuSubTrigger:"focus:bg-muted/60 data-[highlighted]:bg-muted/60 data-[state=open]:bg-muted/60",menuSubContent:"bg-background/95 shadow-xl",tableContainer:"bg-background/95 shadow-sm [scrollbar-gutter:stable]",tableFooter:"bg-muted/25",tableFooterBar:"bg-muted/25 shadow-none",tableRowInteractive:"cursor-pointer [--base-table-row-hover-bg:hsl(var(--muted)_/_0.35)]",tableLoadingSkeleton:"bg-muted/65",layoutRoot:"bg-background/95 shadow-sm",layoutPane:"bg-background/95 shadow-sm",layoutPaneSoft:"bg-background/95 shadow-md"},glass:{buttonBase:"backdrop-blur-md",buttonDefault:"border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]",badgeDefault:"border-white/10 bg-white/[0.08] text-foreground",panelRoot:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",panelFooter:"border-white/10 bg-white/[0.05]",stateRoot:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",stateIcon:"bg-white/10 text-foreground",controlWrapper:"border-white/10 bg-white/[0.08] text-foreground backdrop-blur-md",selectMenu:"border-foreground/10 bg-background/10 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md",selectOption:"text-foreground",selectOptionActive:"bg-white/[0.14] text-foreground",selectOptionSelected:"bg-white/[0.18] text-foreground",switchTrack:"border-white/10 bg-white/[0.12] backdrop-blur-md",checkboxBox:"border-white/10 bg-white/[0.08] backdrop-blur-md",checkboxBoxChecked:"border-white/20 bg-white/[0.22] text-foreground",radioOption:"border-white/10 bg-white/[0.06] backdrop-blur-md hover:bg-white/[0.10]",radioMarker:"border-white/10 bg-white/[0.08] backdrop-blur-md",radioMarkerChecked:"border-white/25 bg-white/[0.16]",dialogOverlay:"bg-background/45 backdrop-blur-md",dialogPanel:"border-white/10 bg-white/[0.08] shadow-2xl backdrop-blur-md",dialogHeader:"border-white/10",dialogFooter:"border-white/10",dropdownMenu:"border-foreground/10 bg-background/10 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md",dropdownItem:"text-foreground hover:bg-white/[0.14]",tooltipContent:"border-foreground/10 bg-background/15 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md",noticeDefault:"border-white/10 bg-white/[0.08] text-foreground backdrop-blur-md",dividerRoot:"border-white/15",tabsList:"border-white/10 bg-white/[0.08] backdrop-blur-md",tabsTrigger:"text-muted-foreground hover:bg-white/[0.12] hover:text-foreground",tabsTriggerActive:"bg-white/[0.16] text-foreground shadow-none",tabsPanel:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",segmentedRoot:"border-white/10 bg-white/[0.08] backdrop-blur-md",segmentedItem:"text-muted-foreground hover:bg-white/[0.12] hover:text-foreground",segmentedItemActive:"bg-white/[0.16] text-foreground shadow-none",progressTrack:"bg-white/[0.12]",skeletonRoot:"bg-white/[0.16]",avatarRoot:"border-white/10 bg-white/[0.12] text-foreground",avatarFallback:"bg-white/[0.12] text-foreground",avatarStatus:"border-background",toolbarRoot:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",paginationButton:"border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]",paginationPage:"bg-white/[0.12] text-foreground",descriptionListItem:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",accordionItem:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",accordionPanel:"border-white/10",menuContent:"border-foreground/10 bg-background/10 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md",menuSeparator:"bg-white/10",menuItem:"text-foreground focus:bg-white/[0.14] focus:text-foreground data-[highlighted]:bg-white/[0.14] data-[highlighted]:text-foreground",menuSubTrigger:"text-foreground focus:bg-white/[0.14] focus:text-foreground data-[highlighted]:bg-white/[0.14] data-[highlighted]:text-foreground data-[state=open]:bg-white/[0.16]",menuSubContent:"border-foreground/10 bg-background/10 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md",tableContainer:"border-foreground/10 bg-background/[0.06] shadow-none backdrop-blur-md [scrollbar-gutter:stable] [--base-table-sticky-header-bg:hsl(var(--background)/0.94)] [--base-table-header-separator:hsl(var(--foreground)/0.24)]",tableHeader:"border-white/10",tableFooter:"bg-white/[0.05] [&_tr>*]:border-white/10",tableFooterBar:"border-white/10 bg-white/[0.05] shadow-none backdrop-blur-md",tableFooterBarAttached:"border-t border-white/10",tableRow:"[&>*]:border-white/10",tableRowInteractive:"cursor-pointer [--base-table-row-hover-bg:hsl(var(--foreground)/0.08)]",tableHeadLabel:"text-foreground",tableLoadingSkeleton:"bg-white/[0.16]",layoutRoot:"border-white/10 bg-white/[0.05] shadow-none backdrop-blur-md",layoutPane:"border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md",layoutPaneMuted:"bg-white/[0.08]",layoutPaneSoft:"bg-white/[0.10] shadow-none backdrop-blur-md",layoutResizeHandle:"text-foreground/65 hover:bg-white/10 active:bg-white/15 focus-visible:bg-white/10",layoutResizeHandleIndicator:"bg-white/45 group-hover/resize:bg-white/75"},dark:{buttonBase:"border-white/15 text-white shadow-lg backdrop-blur",buttonDefault:"bg-black/30 hover:bg-black/[0.45]",buttonPrimary:"border-white/25 bg-white/20 text-white hover:bg-white/25",buttonMuted:"border-white/10 bg-black/20 text-white/70 hover:bg-black/[0.35] hover:text-white",badgeDefault:"border-white/10 bg-white/[0.08] text-white",badgeMuted:"border-white/10 bg-black/20 text-white/70",panelRoot:"border-white/10 bg-slate-950 text-white shadow-none",panelTitle:"text-white",panelDescription:"text-white/65",panelBody:"text-white/85",panelFooter:"border-white/10 bg-white/[0.04]",stateRoot:"border-white/10 bg-slate-950 text-white shadow-none",stateIcon:"bg-white/10 text-white/75",stateTitle:"text-white",stateDescription:"text-white/65",fieldLabel:"text-white",fieldDescription:"text-white/65",fieldMessage:"text-white/65",controlWrapper:"border-white/15 bg-black/30 text-white shadow-lg backdrop-blur focus-within:border-white/35",controlBase:"text-white placeholder:text-white/45",selectChevron:"text-white/65",selectMenu:"border-white/15 bg-slate-950 text-white shadow-2xl",selectOption:"text-white",selectOptionActive:"bg-white/[0.12] text-white",selectOptionSelected:"bg-white/[0.16] text-white",selectPlaceholder:"text-white/45",switchTrack:"border-white/15 bg-black/30 shadow-lg backdrop-blur",switchChecked:"border-white/25 bg-white/25 text-white",switchLabel:"text-white",switchDescription:"text-white/65",checkboxBox:"border-white/15 bg-black/30 text-white shadow-lg backdrop-blur",checkboxBoxChecked:"border-white/25 bg-white/25 text-white",checkboxLabel:"text-white",checkboxDescription:"text-white/65",radioOption:"border-white/10 bg-white/[0.06] text-white hover:bg-white/[0.08]",radioMarker:"border-white/15 bg-black/30 text-white shadow-lg backdrop-blur",radioMarkerChecked:"border-white/25 bg-white/25",radioIndicator:"bg-white",radioLabel:"text-white",radioDescription:"text-white/65",dialogOverlay:"bg-slate-950/75",dialogPanel:"border-white/10 bg-slate-950 text-white shadow-2xl",dialogHeader:"border-white/10",dialogTitle:"text-white",dialogDescription:"text-white/65",dialogBody:"text-white/85",dialogFooter:"border-white/10",dialogClose:"text-white/65 hover:bg-white/[0.08] hover:text-white",dropdownMenu:"border-white/15 bg-slate-950 text-white shadow-2xl",dropdownLabel:"text-white/55",dropdownSeparator:"bg-white/15",dropdownItem:"text-white hover:bg-white/[0.10]",dropdownItemDescription:"text-white/55",dropdownItemShortcut:"text-white/55",tooltipContent:"border-white/15 bg-slate-950 text-white shadow-2xl",noticeDefault:"border-white/10 bg-white/[0.08] text-white",noticeMuted:"border-white/10 bg-black/20 text-white/70",dividerRoot:"border-white/15",dividerLabel:"text-white/55",sectionHeaderEyebrow:"text-white/55",sectionHeaderTitle:"text-white",sectionHeaderDescription:"text-white/65",tabsList:"border-white/10 bg-white/[0.08]",tabsTrigger:"text-white/65 hover:bg-white/[0.12] hover:text-white",tabsTriggerActive:"bg-white/[0.16] text-white shadow-none",tabsPanel:"border-white/10 bg-white/[0.06] text-white",segmentedRoot:"border-white/10 bg-white/[0.08]",segmentedItem:"text-white/65 hover:bg-white/[0.12] hover:text-white",segmentedItemActive:"bg-white/[0.16] text-white shadow-none",progressTrack:"bg-white/[0.12]",progressLabel:"text-white",progressValue:"text-white/65",skeletonRoot:"bg-white/[0.14]",avatarRoot:"border-white/15 bg-white/[0.10] text-white",avatarFallback:"bg-white/[0.10] text-white/75",avatarText:"text-white",avatarStatus:"border-slate-950",toolbarRoot:"border-white/10 bg-white/[0.06] text-white",toolbarTitle:"text-white",toolbarDescription:"text-white/65",breadcrumbLink:"text-white/65 hover:text-white",breadcrumbCurrent:"text-white",breadcrumbSeparator:"text-white/45",paginationInfo:"text-white/65",paginationButton:"border-white/10 bg-white/[0.08] text-white hover:bg-white/[0.14]",paginationPage:"bg-white/[0.14] text-white",descriptionListItem:"border-white/10 bg-white/[0.06]",descriptionListTerm:"text-white/55",descriptionListValue:"text-white",accordionItem:"border-white/10 bg-white/[0.06]",accordionTrigger:"text-white hover:bg-white/[0.08]",accordionPanel:"border-white/10 text-white/70",tableContainer:"border-foreground/10 bg-background text-foreground shadow-none [scrollbar-gutter:stable] [--base-table-sticky-header-bg:hsl(var(--background)/0.98)] [--base-table-header-separator:hsl(var(--foreground)/0.16)]",tableRoot:"text-white",tableHeader:"border-white/10",tableFooter:"bg-white/[0.05] [&_tr>*]:border-white/10",tableFooterBar:"border-white/10 bg-white/[0.05] text-white/65",tableFooterBarAttached:"border-t border-white/10",tableRow:"[&>*]:border-white/10",tableRowInteractive:"cursor-pointer [--base-table-row-hover-bg:hsl(var(--foreground)/0.06)]",tableHead:"text-white/65",tableHeadLabel:"text-white",tableHeadDescription:"text-white/55",tableHeadMeta:"text-white/55",tableHeadIcon:"text-white/55",tableHeadSortIcon:"text-white/55",tableHeadDragHandle:"text-white/55 hover:bg-white/[0.08]",tableHeadResizeHandle:"after:bg-white/20 hover:after:bg-white/60",tableCell:"text-white/85",tableEmptyIcon:"bg-white/10 text-white/65",tableEmptyTitle:"text-white",tableEmptyDescription:"text-white/60",menuContent:"border-white/10 bg-slate-950 text-white shadow-2xl",menuLabel:"text-white/55",menuSeparator:"bg-white/10",menuItem:"text-white focus:bg-white/[0.10] focus:text-white data-[highlighted]:bg-white/[0.10] data-[highlighted]:text-white",menuItemDefault:"text-white",menuItemPrimary:"text-primary focus:text-primary data-[highlighted]:text-primary",menuItemSuccess:"text-[hsl(var(--success,142_69%_58%))] focus:text-[hsl(var(--success,142_69%_58%))] data-[highlighted]:text-[hsl(var(--success,142_69%_58%))]",menuItemWarning:"text-[hsl(var(--warning-foreground,53_98%_77%))] focus:text-[hsl(var(--warning-foreground,53_98%_77%))] data-[highlighted]:text-[hsl(var(--warning-foreground,53_98%_77%))]",menuItemDanger:"text-destructive-text focus:text-destructive-text data-[highlighted]:text-destructive-text",menuItemMuted:"text-white/65 focus:text-white data-[highlighted]:text-white",menuItemShortcut:"text-white/45",menuSubTrigger:"text-white focus:bg-white/[0.10] focus:text-white data-[highlighted]:bg-white/[0.10] data-[highlighted]:text-white data-[state=open]:bg-white/[0.12]",menuSubTriggerIcon:"text-white/55",menuSubContent:"border-white/10 bg-slate-950 text-white shadow-2xl",tableLoadingSkeleton:"bg-white/[0.14]",layoutRoot:"border-white/10 bg-slate-950 text-white shadow-none",layoutPane:"border-white/10 bg-slate-950 text-white shadow-none",layoutPaneMuted:"bg-white/[0.06]",layoutPaneSoft:"bg-white/[0.08] shadow-none",layoutResizeHandle:"text-white/65 hover:bg-white/10 active:bg-white/15 focus-visible:bg-white/10",layoutResizeHandleIndicator:"bg-white/45 group-hover/resize:bg-white/75"}},ad={default:{density:"default",radius:"md",border:"solid",background:"plain"},soft:{density:"default",radius:"lg",border:"subtle",background:"soft"},compact:{density:"compact",radius:"md",border:"subtle",background:"muted"},"tinted-glass":{density:"default",radius:"lg",border:"subtle",background:"glass"},glass:{density:"default",radius:"xl",border:"subtle",background:"glass"},"hard-edge":{density:"compact",radius:"none",border:"strong",background:"plain"}},yp={soft:{buttonBase:"font-medium",panelRoot:"border-border/70",controlWrapper:"font-medium",tabsTrigger:"font-medium",segmentedItem:"font-medium",toolbarRoot:"border-border/70",tableContainer:"border-border/70",tableFooterBar:"border-border/70",tableHeadLabel:"font-semibold",menuItemLabel:"font-medium"},compact:{buttonBase:"text-xs",badgeBase:"text-xs",fieldLabel:"text-xs",controlBase:"text-xs",selectOption:"text-xs",menuItem:"text-xs",menuSubTrigger:"text-xs",noticeBase:"text-xs",sectionHeaderTitle:"text-sm",tabsTrigger:"text-xs",segmentedItem:"text-xs",toolbarTitle:"text-xs",paginationRoot:"text-xs"},"tinted-glass":{buttonPrimary:"border-primary/25 bg-primary/15 text-primary-foreground hover:bg-primary/20",badgePrimary:"border-primary/25 bg-primary/15 text-primary-foreground",noticePrimary:"border-primary/25 bg-primary/15 text-primary-foreground",progressIndicator:"bg-primary",avatarStatus:"border-background"},glass:{panelRoot:"shadow-[0_24px_80px_hsl(var(--foreground)/0.12)]",stateRoot:"shadow-[0_24px_80px_hsl(var(--foreground)/0.12)]",noticeBase:"shadow-[0_18px_60px_hsl(var(--foreground)/0.10)]",tabsPanel:"shadow-[0_18px_60px_hsl(var(--foreground)/0.10)]",toolbarRoot:"shadow-[0_18px_60px_hsl(var(--foreground)/0.10)]",descriptionListItem:"shadow-[0_12px_40px_hsl(var(--foreground)/0.08)]",accordionItem:"shadow-[0_12px_40px_hsl(var(--foreground)/0.08)]"},"hard-edge":{buttonBase:"shadow-none",panelRoot:"shadow-none",stateRoot:"shadow-none",controlWrapper:"shadow-none",selectMenu:"shadow-none",menuContent:"shadow-none",menuSubContent:"shadow-none",noticeBase:"shadow-none",tabsList:"shadow-none",tabsTriggerActive:"shadow-none",tabsPanel:"shadow-none",segmentedRoot:"shadow-none",segmentedItemActive:"shadow-none",toolbarRoot:"shadow-none",descriptionListItem:"shadow-none",accordionItem:"shadow-none"}};function hp(e){return ad[e]??ad.default}r(hp,"getPresetDefaults");var xp=Object.keys(id),vp=nd(xp,l);function kp(...e){return Object.assign({},...e.filter(Boolean))}r(kp,"mergeStyles");function De(e){let t=e?.preset??"default",o=e?.variant??"default",n=hp(t),a=e?.density??n.density??"default",i=e?.state??"idle",s=e?.radius??n.radius??"md",u=e?.border??n.border??"solid",c=e?.background??n.background??"plain";return {preset:t,variant:o,density:a,state:i,radius:s,border:u,background:c,styles:kp(up,e?.styles),slots:vp(id,yp[t],pp[a],gp[s],bp[u],fp[c],e?.slots)}}r(De,"resolveBaseAppearance");function ba(e,t="default",o=false){return l(t==="default"&&e.slots.buttonDefault,t==="primary"&&e.slots.buttonPrimary,t==="success"&&e.slots.buttonSuccess,t==="warning"&&e.slots.buttonWarning,t==="danger"&&e.slots.buttonDanger,t==="muted"&&e.slots.buttonMuted,o&&e.slots.buttonActive)}r(ba,"getBaseButtonToneClassName");function sd(e,t="default"){return l(t==="default"&&e.slots.badgeDefault,t==="primary"&&e.slots.badgePrimary,t==="success"&&e.slots.badgeSuccess,t==="warning"&&e.slots.badgeWarning,t==="danger"&&e.slots.badgeDanger,t==="muted"&&e.slots.badgeMuted)}r(sd,"getBaseBadgeToneClassName");function lr(e,t="default"){return l(t==="default"&&e.slots.menuItemDefault,t==="primary"&&e.slots.menuItemPrimary,t==="success"&&e.slots.menuItemSuccess,t==="warning"&&e.slots.menuItemWarning,t==="danger"&&e.slots.menuItemDanger,t==="muted"&&e.slots.menuItemMuted)}r(lr,"getBaseMenuItemToneClassName");var ld=Symbol.for("@inf-monkeys-tech/monkeys-design/bento-depth@1"),dd=globalThis,cd=dd[ld]??(dd[ld]=lt.createContext(0));function In(){return lt.useContext(cd)}r(In,"useBentoDepth");function Mn({children:e,depth:t}){return jsxRuntime.jsx(cd.Provider,{value:t,children:e})}r(Mn,"BentoDepthProvider");function No({children:e}){return jsxRuntime.jsx(Mn,{depth:0,children:e})}r(No,"BentoScope");var fa=["background","glowColor","borderColor","borderWidth","borderStyle","radius","shadow","padding","gap"],Sp={background:"hsl(var(--card, 0 0% 100%))",glowColor:"var(--monkeys-bento-glow-default)",borderColor:"hsl(var(--border, 214.3 31.8% 91.4%))",borderWidth:"1px",borderStyle:"solid",radius:"var(--radius, 0.75rem)",shadow:"none",padding:"var(--global-spacing, 0.75rem)",gap:"var(--global-spacing, 0.75rem)"},Zi=new WeakMap;function md(e,t){if(!Number.isSafeInteger(t)||t<1)throw new RangeError("Bento level must be a positive safe integer.");let o=e&&Zi.get(e)?.get(t);if(o)return o;let n={...Sp},a=Object.fromEntries(fa.map(s=>[s,"builtin"]));for(let s of fa){let u=s==="padding"||s==="gap"?e?.density:e?.colorMode,c=s==="glowColor"?"component.bento":"semantic.bento",d=[`${c}.levels.level${t}.${s}`,`${c}.default.${s}`];for(let g of d){let m=u&&e?.cssValues[`${g}.${u}`]!==void 0?`${g}.${u}`:g,p=e?.cssValues[m];if(p!==void 0){n[s]=p,a[s]=m;break}}}let i=Object.freeze({values:Object.freeze(n),sources:Object.freeze(a)});if(e){let s=Zi.get(e)??new Map;s.set(t,i),Zi.set(e,s);}return i}r(md,"resolveBentoTokens");var Qi="rounded-[var(--monkeys-bento-radius)] border-[length:var(--monkeys-bento-border-width)] border-[color:var(--monkeys-bento-border-color)] [border-style:var(--monkeys-bento-border-style)] bg-[var(--monkeys-bento-background)] shadow-[shadow:var(--monkeys-bento-shadow)] p-[var(--monkeys-bento-padding)] gap-[var(--monkeys-bento-gap)]";function dr(){let e=In(),t=e+1,o=md(dn(),t),n=Object.fromEntries(fa.map(a=>[`--monkeys-bento-${a.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`)}`,o.values[a]]));return {parentDepth:e,level:t,variables:n}}r(dr,"useBentoSurface");var pd="[data-monkeys-bento-level]",ya="data-monkeys-scrollbar-active",gd='[data-monkeys-scrollbar], [data-monkeys-scroll-viewport], [data-radix-scroll-area-viewport], .monkeys-scrollbar, .monkeys-ui-scroll-viewport, .monkeys-ui-description, .monkeys-ui-page-main, .monkeys-ui-dialog, .monkeys-ui-menu, .monkeys-ui-select-content, [style*="overflow"][style*="auto"], [style*="overflow"][style*="scroll"], .overflow-auto, .overflow-x-auto, .overflow-y-auto, .overflow-scroll, .overflow-x-scroll, .overflow-y-scroll';function ha(e,t=true){let o=lt.useRef(),n=r(()=>{let i=o.current;i?.observer?.disconnect(),i?.marked.forEach(s=>s.removeAttribute(ya)),o.current=void 0;},"clear");lt.useEffect(()=>n,[t]);let a=r((i,s)=>{if(!t||!i.isConnected||!i.matches(pd))return;o.current?.root!==i&&(n(),o.current={root:i,hovered:false,marked:new Set});let u=o.current;if(s!==void 0&&(u.hovered=s),!(u.hovered||i.matches(":focus-visible")||!!i.querySelector(":focus-visible"))){u.observer?.disconnect(),u.observer=void 0,u.marked.forEach(g=>g.removeAttribute(ya)),u.marked.clear();return}let d=new Set;for(let g of [i,...i.querySelectorAll(gd)])g.matches(gd)&&g.closest(pd)===i&&d.add(g);u.marked.forEach(g=>{d.has(g)||g.removeAttribute(ya);}),d.forEach(g=>{u.marked.has(g)||g.setAttribute(ya,"");}),u.marked=d,u.observer||(u.observer=new MutationObserver(()=>a(i)),u.observer.observe(i,{childList:true,subtree:true}));},"update");return {onPointerEnter(i){a(i.currentTarget,true),e.onPointerEnter?.(i);},onPointerLeave(i){a(i.currentTarget,false),e.onPointerLeave?.(i);},onFocusCapture(i){a(i.currentTarget),e.onFocusCapture?.(i);},onBlurCapture(i){let s=i.currentTarget;queueMicrotask(()=>a(s)),e.onBlurCapture?.(i);}}}r(ha,"useBentoScrollbarVisibility");function fd({as:e="article",decoration:t,title:o,description:n,media:a,header:i,footer:s,children:u,interactive:c,selected:d,disabled:g,appearance:m,variant:p,density:f,state:b,className:v,classNames:y,style:x,...w}){let h=De({...m,variant:p,density:f,state:b}),k=e,C=i!==void 0?O(i):O(o)||O(n),T=a!=null,S=!C&&!T;return jsxRuntime.jsxs(k,{...w,"aria-disabled":g||void 0,"data-variant":h.variant,"data-density":h.density,"data-state":b??(g?"disabled":d?"selected":"idle"),"data-monkeys-component":"panel","data-slot":"root","data-interactive":c||void 0,"data-selected":d||void 0,"data-disabled":g||void 0,className:l(h.slots.panelRoot,c&&!g&&h.slots.panelInteractive,d&&h.slots.panelSelected,g&&h.slots.panelDisabled,y?.root,v),style:{...h.styles.panel,...x},children:[t,T?jsxRuntime.jsx("div",{"data-slot":"media",className:l(h.slots.panelMedia,y?.media),children:a}):null,C?jsxRuntime.jsx("div",{"data-slot":"header",className:l(h.slots.panelHeader,y?.header),style:h.styles.panelHeader,children:i!==void 0?i:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[O(o)?jsxRuntime.jsx("div",{"data-slot":"title",className:l(h.slots.panelTitle,y?.title),children:o}):null,O(n)?jsxRuntime.jsx("div",{"data-slot":"description",className:l(h.slots.panelDescription,y?.description),children:n}):null]})}):null,u!=null?jsxRuntime.jsx("div",{"data-slot":"body",className:l(h.slots.panelBody,S&&h.slots.panelBodyStandalone,y?.body),style:h.styles.panelBody,children:u}):null,s!=null?jsxRuntime.jsx("div",{"data-slot":"footer",className:l(h.slots.panelFooter,y?.footer),style:h.styles.panelFooter,children:s}):null]})}r(fd,"BasePanel");var yd=r(e=>e==null?void 0:typeof e=="number"?`${e}px`:e,"cssSize"),hd=r(e=>e!==void 0&&Number.isFinite(e)&&e>0?e:8,"safeSpeed"),Ip=r(e=>{let[t,o=t]=e.trim().split(/\s*\/\s*|\s+/);return {rx:t,ry:o}},"radiusParts");function ts({mode:e="solid",color:t,colors:o,width:n=1,radius:a,speed:i,direction:s="clockwise",className:u,style:c}){let g=`border-effect-${lt__namespace.useId().replace(/:/g,"")}`,m=lt__namespace.useRef(null),[p,f]=lt__namespace.useState({width:0,height:0,rx:"0px",ry:"0px"});lt__namespace.useEffect(()=>{let T=m.current;if(!T||typeof ResizeObserver>"u")return;let S=r(()=>{let W=getComputedStyle(T).borderTopLeftRadius,H=Ip(W),{rx:L,ry:F}=H;f({width:T.clientWidth,height:T.clientHeight,rx:L,ry:F});},"update");S();let I=new ResizeObserver(S);I.observe(T);let R=new MutationObserver(S);for(let W=T;W;W=W.parentElement)R.observe(W,{attributes:true});return ()=>{I.disconnect(),R.disconnect();}},[a]);let b=o?.length?o:[t||"hsl(var(--monkeys-color-border, var(--border, var(--input))))"],v=b.length===1?[b[0],b[0]]:b,y=s==="counterclockwise"?"reverse":"normal",x=(p.width||1)/2,w=(p.height||1)/2,h=s==="counterclockwise"?`360 ${x} ${w};0 ${x} ${w}`:`0 ${x} ${w};360 ${x} ${w}`,C={...{"--border-effect-width":yd(n),"--border-effect-radius":yd(a)||"inherit","--border-effect-speed":`${hd(i)}s`,"--border-effect-color":t||"hsl(var(--monkeys-color-border, var(--border, var(--input))))","--border-effect-gradient":`linear-gradient(90deg, ${v.join(", ")})`,"--border-effect-direction":y},...c};return jsxRuntime.jsxs("div",{ref:m,"aria-hidden":"true",className:`monkeys-border-effect monkeys-border-effect-${e}${u?` ${u}`:""}`,style:{...C,pointerEvents:"none"},children:[jsxRuntime.jsx("span",{className:"monkeys-border-effect-ring"}),e==="animated"&&jsxRuntime.jsxs("svg",{"aria-hidden":"true",focusable:"false",className:"monkeys-border-effect-svg",viewBox:`0 0 ${p.width||1} ${p.height||1}`,children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:g,gradientUnits:"userSpaceOnUse",x1:"0",y1:"0",x2:p.width||1,y2:"0",children:[v.map((T,S)=>jsxRuntime.jsx("stop",{offset:`${S/(v.length-1)*100}%`,stopColor:T},S)),jsxRuntime.jsx("animateTransform",{attributeName:"gradientTransform",type:"rotate",values:h,dur:`${hd(i)}s`,repeatCount:"indefinite"})]})}),jsxRuntime.jsx("rect",{x:"0",y:"0",width:p.width,height:p.height,rx:p.rx,ry:p.ry,fill:"none",stroke:`url(#${g})`,style:{strokeWidth:"calc(var(--border-effect-width) * 2)"}})]})]})}r(ts,"BorderEffect");var Mp=r((e,t)=>Object.keys(e??{}).some(o=>o.startsWith("padding")&&e?.[o]!==void 0)||/(?:^|[\s:])!?p[xytrblse]?-(?:\[|[a-z0-9])/.test(t??""),"ownsPadding");function xd({children:e,className:t,contentClassName:o,chrome:n="panel",borderEffect:a,decoration:i,headerWrap:s=false,title:u,titleIcon:c,action:d,appearance:g,classNames:m,...p}){let{parentDepth:f,level:b,variables:v}=dr(),y=Oe(g),x=n==="panel",w=x&&a!=null,h=ha(p,x),k=Mp(y?.styles?.panelBody,[m?.body,o,y?.slots?.panelBody].join(" "));return jsxRuntime.jsx(Mn,{depth:x?b:f,children:jsxRuntime.jsx(fd,{as:"section",appearance:{...y,slots:{...y?.slots,panelRoot:y?.slots?.panelRoot},styles:{...y?.styles,panelHeader:{...n==="plain"?{padding:0,paddingBlockEnd:"var(--global-spacing-lg, 1rem)"}:{},...y?.styles?.panelHeader},panelBody:{...!k||n==="plain"?{padding:0}:{},...y?.styles?.panelBody}}},classNames:{...m,root:l("min-h-0",x&&"gap-[var(--monkeys-bento-gap)]",x&&y?.radius===void 0&&!y?.preset&&"rounded-[var(--monkeys-bento-radius)]",x&&y?.border===void 0&&!y?.preset&&"border-[length:var(--monkeys-bento-border-width)] border-[color:var(--monkeys-bento-border-color)] [border-style:var(--monkeys-bento-border-style)]",x&&y?.background===void 0&&!y?.preset&&"bg-[var(--monkeys-bento-background)]",x&&!y?.preset&&y?.background===void 0&&"shadow-[shadow:var(--monkeys-bento-shadow)]",x&&!k&&"p-[var(--monkeys-bento-padding)]",!x&&"border-0 bg-transparent shadow-none",y?.slots?.panelRoot,m?.root,t),header:l("flex min-w-0 items-center gap-[var(--monkeys-bento-gap,var(--global-spacing,0.75rem))] border-b border-border p-0 pb-[var(--monkeys-bento-gap)]",n==="plain"&&"border-0 px-0 pt-0 pb-token-lg",m?.header),body:l("flex min-h-0 flex-col gap-[var(--monkeys-bento-gap,var(--global-spacing,0.75rem))] p-0",y?.slots?.panelBody,m?.body,o),footer:l("px-0 pb-0 pt-[var(--monkeys-bento-gap)]",m?.footer)},header:u?jsxRuntime.jsxs("div",{style:{alignItems:y?.styles?.panelHeader?.alignItems},className:l("flex min-w-0 flex-1 items-center justify-between gap-token-md",s&&"flex-wrap"),children:[jsxRuntime.jsxs("div",{className:l("flex min-w-0 flex-1 items-center gap-token-sm",s&&"basis-auto"),children:[c?jsxRuntime.jsx("span",{className:"inline-flex size-8 shrink-0 items-center justify-center rounded-md border border-primary/30 bg-primary/10 text-primary",children:jsxRuntime.jsx(c,{className:"size-4 text-primary",color:"currentColor",stroke:"currentColor"})}):null,jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("h2",{style:{margin:0},className:"truncate text-base font-semibold text-foreground",children:u}),p.description?jsxRuntime.jsx("div",{className:"mt-1 text-sm text-muted-foreground",children:p.description}):null]})]}),d?jsxRuntime.jsx("div",{className:l("shrink-0",s&&"max-w-full"),children:d}):null]}):void 0,...p,...h,decoration:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[i,w?jsxRuntime.jsx(ts,{...a}):null]}),"data-monkeys-bento-level":x?b:void 0,style:{...x?v:{},...p.style,...w?{borderColor:"transparent"}:{}},children:e})})}r(xd,"BentoPanel");var Pp={menu:"monkeys-overlay-surface--menu bg-menu-surface text-popover-foreground",dialog:"monkeys-overlay-surface--dialog bg-dialog-surface text-foreground"};function cn(e,t={}){return ["monkeys-overlay-surface",Pp[e],t.rounded===false?void 0:"monkeys-overlay-surface--rounded"].filter(Boolean).join(" ")}r(cn,"getOverlaySurfaceClassName");var Ap=lt__namespace.forwardRef(({className:e,style:t,...o},n)=>jsxRuntime.jsx(Io__namespace.Item,{ref:n,className:l("border-b",e),style:{borderColor:"var(--monkeys-component-accordion-item-border-color, hsl(var(--border)))",...t},...o}));Ap.displayName="AccordionItem";var zp=lt__namespace.forwardRef(({className:e,children:t,...o},n)=>jsxRuntime.jsx(Io__namespace.Header,{className:"flex",children:jsxRuntime.jsxs(Io__namespace.Trigger,{ref:n,className:l("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...o,children:[t,jsxRuntime.jsx(lucideReact.ChevronDown,{"aria-hidden":"true",className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));zp.displayName="AccordionTrigger";var Op=lt__namespace.forwardRef(({className:e,children:t,...o},n)=>jsxRuntime.jsx(Io__namespace.Content,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o,children:jsxRuntime.jsx("div",{className:l("pb-4 pt-0",e),children:t})}));Op.displayName="AccordionContent";var Fp=lt__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(va__namespace.Root,{ref:o,className:l("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:jsxRuntime.jsx(va__namespace.Indicator,{className:"flex items-center justify-center text-current",children:jsxRuntime.jsx(lucideReact.Check,{"aria-hidden":"true",className:"h-4 w-4"})})}));Fp.displayName="Checkbox";var ur=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_[data-slot=icon]]:text-[inherit] [&_[data-slot=icon]_*]:!text-[inherit] [&_[data-slot=icon]_svg]:!stroke-current [&_[data-slot=icon]_svg_*]:!stroke-current [&_[data-slot=end-icon]]:text-[inherit] [&_[data-slot=end-icon]_*]:!text-[inherit] [&_[data-slot=end-icon]_svg]:!stroke-current [&_[data-slot=end-icon]_svg_*]:!stroke-current [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-control-surface shadow-sm ring-offset-control-surface hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-sm px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Hp=lt__namespace.forwardRef(({className:e,variant:t,size:o,asChild:n=false,unstyled:a=false,...i},s)=>jsxRuntime.jsx(n?reactSlot.Slot:"button",{ref:s,className:a?e:ur({variant:t,size:o,className:e}),...i}));Hp.displayName="Button";var Vp=lt__namespace.forwardRef(({className:e,children:t,viewportClassName:o,viewportRef:n,onViewportScroll:a,scrollbar:i=true,scrollbarOrientation:s="vertical",scrollBarDisabled:u=false,type:c,...d},g)=>{let m=In();return jsxRuntime.jsxs(co__namespace.Root,{ref:g,type:c??(m>0?"auto":void 0),className:l("group relative overflow-hidden",u&&"no-scrollbar",e),...d,children:[jsxRuntime.jsx(co__namespace.Viewport,{ref:n,onScroll:a,className:l("h-full w-full rounded-[inherit]",o),children:t}),i?jsxRuntime.jsx(vd,{orientation:s,className:l(u&&"size-0 p-0")}):null,jsxRuntime.jsx(co__namespace.Corner,{})]})});Vp.displayName="ScrollArea";var vd=lt__namespace.forwardRef(({className:e,orientation:t="vertical",...o},n)=>jsxRuntime.jsx(co__namespace.ScrollAreaScrollbar,{ref:n,"data-monkeys-scrollbar":"",orientation:t,className:l("flex touch-none select-none opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100 data-[state=visible]:opacity-100",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-px",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-px",e),...o,children:jsxRuntime.jsx(co__namespace.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));vd.displayName="ScrollBar";var Gp=lt__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(ka__namespace.Root,{ref:o,className:l("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,children:jsxRuntime.jsx(ka__namespace.Thumb,{className:"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"})}));Gp.displayName="Switch";var _p=lt__namespace.forwardRef(({variant:e="default",...t},o)=>jsxRuntime.jsx(_o__namespace.Root,{ref:o,"data-variant":e,...t}));_p.displayName="Tabs";var $p=lt__namespace.forwardRef(({className:e,gap:t,style:o,...n},a)=>jsxRuntime.jsx(_o__namespace.List,{ref:a,className:l("inline-flex h-10 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),style:{gap:t,...o},...n}));$p.displayName="TabsList";var jp=lt__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(_o__namespace.Trigger,{ref:o,className:l("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));jp.displayName="TabsTrigger";var Kp=lt__namespace.forwardRef(({className:e,...t},o)=>{let n=In();return jsxRuntime.jsx(_o__namespace.Content,{ref:o,className:l("mt-2 ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n>0&&"gap-[var(--monkeys-bento-gap)]",e),...t})});Kp.displayName="TabsContent";var Up=lt__namespace.forwardRef(({className:e,sideOffset:t=4,...o},n)=>{let a=Ne();return jsxRuntime.jsx(uo__namespace.Portal,{children:jsxRuntime.jsx(uo__namespace.Content,{...a,...o,ref:n,sideOffset:t,"data-monkeys-component":"tooltip","data-slot":"content","data-surface":"menu",className:l("z-50 overflow-hidden border px-3 py-1.5 text-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",cn("menu"),e)})})});Up.displayName="TooltipContent";var pr=lt__namespace.forwardRef(({className:e,appearance:t="standard",unstyled:o=false,type:n,...a},i)=>jsxRuntime.jsx("input",{ref:i,type:n,className:o?e:l("flex w-full border border-input bg-control-surface px-3 text-foreground ring-offset-control-surface transition-[border-color,background-color,color,box-shadow] file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t==="compact"?"h-9 rounded-md py-1 text-sm shadow-sm":"h-10 rounded-md py-2 text-sm shadow-sm",t==="shadow"&&"rounded-lg shadow-sm shadow-black/[0.02] dark:border-white/10 dark:bg-white/[0.04] dark:shadow-none",e),...a}));pr.displayName="Input";var qp=lt__namespace.forwardRef(({className:e,appearance:t="standard",unstyled:o=false,...n},a)=>jsxRuntime.jsx("textarea",{ref:a,className:o?e:l("flex w-full border border-input bg-control-surface px-3 py-2 text-foreground ring-offset-control-surface placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t==="compact"?"min-h-[60px] rounded-md text-sm shadow-sm":"min-h-[80px] rounded-md text-sm",t==="shadow"&&"rounded-lg shadow-sm shadow-black/[0.02] dark:border-white/10 dark:bg-white/[0.04] dark:shadow-none",e),...n}));qp.displayName="Textarea";var Yp=lt__namespace.forwardRef((e,t)=>jsxRuntime.jsx("select",{ref:t,...e}));Yp.displayName="NativeSelect";var Jp=lt__namespace.forwardRef((e,t)=>jsxRuntime.jsx("option",{ref:t,...e}));Jp.displayName="NativeOption";function Ca(e){if(!e)return;let t=/^data:image\/svg\+xml(?:[;,]|$)/i.test(e.trim());if(!t)try{t=/\.svgz?$/i.test(decodeURIComponent(new URL(e,"https://preview.invalid").pathname));}catch{return}return t?{backgroundColor:"var(--monkeys-media-svg-background)",objectFit:"contain"}:void 0}r(Ca,"svgPreviewSurface");var Xp=r(({aspectRatio:e="square",maxSquareHeight:t=true,className:o}={})=>l("w-full overflow-hidden bg-muted",(e==="square"||e==="1:1")&&"aspect-square",(e==="square"||e==="1:1")&&t&&"max-h-[300px]",e==="4:3"&&"aspect-[4/3]",e==="3:4"&&"aspect-[3/4]",(e==="video"||e==="16:9")&&"aspect-video",e==="9:16"&&"aspect-[9/16]",o),"mediaPreviewFrameClassName"),ns=lt__namespace.forwardRef(({aspectRatio:e="square",maxSquareHeight:t=true,className:o,...n},a)=>jsxRuntime.jsx("div",{ref:a,className:Xp({aspectRatio:e,maxSquareHeight:t,className:o}),...n}));ns.displayName="MediaPreviewFrame";var gr=lt__namespace.forwardRef(({fit:e="contain",className:t,style:o,...n},a)=>{let i=Ca(n.src);return jsxRuntime.jsx("img",{ref:a,className:l("block size-full",e==="contain"?"object-contain":"object-cover",t),style:{...i,...i?{objectFit:e}:{},...o},...n})});gr.displayName="MediaPreviewImage";var Cd=Symbol.for("@inf-monkeys-tech/monkeys-design/dialog-dock@1"),Sd=globalThis,eg=Sd[Cd]??(Sd[Cd]=lt__namespace.createContext(null)),zt=r(()=>lt__namespace.useContext(eg),"useDialogDock");var rs=lt__namespace.forwardRef(({children:e,className:t,style:o,closeLabel:n="Close",showCloseButton:a=true,onInteractOutside:i,...s},u)=>{let c=zt(),d=lt__namespace.useId(),g=lt__namespace.useRef(null),m=lt__namespace.useRef(false);return lt__namespace.useEffect(()=>{m.current&&!c?.collapsed&&c?.activeId===d&&g.current?.focus(),m.current=!!c?.collapsed;},[c?.collapsed,c?.activeId,d]),lt__namespace.useEffect(()=>c?.register(d),[c?.register,d]),c?.container?jsxRuntime.jsx(bt__namespace.Portal,{container:c.container,children:jsxRuntime.jsx("div",{style:{display:"contents"},children:jsxRuntime.jsx(No,{children:jsxRuntime.jsx(xd,{className:"monkeys-dialog-dock-panel overflow-auto",contentClassName:"shrink-0",style:{display:c.activeId===d?void 0:"none"},children:jsxRuntime.jsxs(bt__namespace.Content,{...s,ref:u,"data-monkeys-dialog-content":true,"data-presentation":"docked","data-title-visible":c.showTitle,"data-collapsible":c.collapsible,className:l("monkeys-dialog-dock-content",t),style:o,onInteractOutside:p=>{i?.(p),p.preventDefault();},children:[e,c.collapsible&&jsxRuntime.jsx("button",{ref:g,type:"button",className:"monkeys-dialog-dock-collapse","aria-label":c.collapseLabel,title:c.collapseLabel,"aria-expanded":!c.collapsed,onClick:()=>c.setCollapsed(true),children:jsxRuntime.jsx(lucideReact.PanelRightClose,{"aria-hidden":"true",className:"size-4"})}),a&&jsxRuntime.jsxs(bt__namespace.Close,{className:"monkeys-dialog-dock-close","aria-label":typeof n=="string"?n:void 0,children:[jsxRuntime.jsx(lucideReact.X,{"aria-hidden":"true",className:"size-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:n})]})]})})})})}):null});rs.displayName="DockedDialogContent";var Rd=Symbol.for("@inf-monkeys-tech/monkeys-design/dialog-open@1"),Nd=globalThis,Id=Nd[Rd]??(Nd[Rd]=lt__namespace.createContext(false));function Ta({open:e,defaultOpen:t,onOpenChange:o,modal:n,...a}){let i=zt(),[s,u]=lt__namespace.useState(t??false),c=e??s;return jsxRuntime.jsx(Id.Provider,{value:c,children:jsxRuntime.jsx(bt__namespace.Root,{...a,open:c,modal:i?false:n,onOpenChange:d=>{u(d),o?.(d);}})})}r(Ta,"Dialog");var og=bt__namespace.Portal;var Md=lt__namespace.forwardRef(({className:e,...t},o)=>{let n=Ne();return jsxRuntime.jsx(bt__namespace.Overlay,{...n,...t,ref:o,className:l("theme-overlay-backdrop fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),"data-monkeys-component":"dialog","data-slot":"overlay","data-monkeys-overlay":true})});Md.displayName="DialogOverlay";var Bd=lt__namespace.forwardRef(({className:e,...t},o)=>{let n=Ne();return jsxRuntime.jsx(bt__namespace.Content,{...n,...t,ref:o,className:e,"data-monkeys-component":"dialog","data-slot":"content","data-surface":"dialog","data-monkeys-dialog-content":true})});Bd.displayName="DialogSurfaceContent";var mn=lt__namespace.forwardRef(({className:e,children:t,showCloseButton:o=true,closeLabel:n="Close",overlayClassName:a,overlayStyle:i,...s},u)=>{let c=zt(),d=lt__namespace.useContext(Id);return c?d?jsxRuntime.jsx(rs,{...s,ref:u,className:e,showCloseButton:o,closeLabel:n,children:t}):null:jsxRuntime.jsxs(og,{children:[jsxRuntime.jsx(Md,{className:a,style:i}),jsxRuntime.jsxs(Bd,{...s,ref:u,className:l("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",cn("dialog"),e),children:[jsxRuntime.jsx(No,{children:t}),o?jsxRuntime.jsxs(bt__namespace.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-dialog-surface transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[jsxRuntime.jsx(lucideReact.X,{"aria-hidden":"true",className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:n})]}):null]})]})});mn.displayName="DialogContent";var ng=lt__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(mn,{ref:o,className:l("duration-0 data-[state=open]:animate-none data-[state=closed]:animate-none",e),...t}));ng.displayName="DialogContentNoAnimation";var rg=r(({className:e,...t})=>jsxRuntime.jsx("div",{className:l(zt()?.showTitle===false?"contents":"flex flex-col space-y-1.5 text-center sm:text-left",e),...t}),"DialogHeader");rg.displayName="DialogHeader";var ag=r(({className:e,...t})=>jsxRuntime.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),"DialogFooter");ag.displayName="DialogFooter";var br=lt__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(bt__namespace.Title,{ref:o,className:l("text-lg font-semibold leading-none tracking-tight",e,zt()?.showTitle===false&&"sr-only"),...t}));br.displayName="DialogTitle";var fr=lt__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(bt__namespace.Description,{ref:o,className:l("text-sm text-muted-foreground",e),...t}));fr.displayName="DialogDescription";lt__namespace.forwardRef((e,t)=>{let o=zt()?bt__namespace.Trigger:wt__namespace.Trigger;return jsxRuntime.jsx(o,{...e,ref:t})});var ig=wt__namespace.Portal,Pd=lt__namespace.forwardRef(({className:e,style:t,...o},n)=>{let a=Ne();return jsxRuntime.jsx(wt__namespace.Overlay,{...a,...o,ref:n,className:l("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),"data-monkeys-component":"alert-dialog","data-slot":"overlay","data-monkeys-overlay":true,style:{pointerEvents:"auto",...t}})});Pd.displayName="AlertDialogOverlay";var sg=lt__namespace.forwardRef(({className:e,style:t,children:o,...n},a)=>{let i=Ne();return zt()?jsxRuntime.jsx(mn,{...n,...i,ref:a,role:"alertdialog",showCloseButton:false,className:e,style:t,children:o}):jsxRuntime.jsxs(ig,{children:[jsxRuntime.jsx(Pd,{}),jsxRuntime.jsx(wt__namespace.Content,{...i,...n,ref:a,className:l("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",cn("dialog"),e),"data-monkeys-component":"alert-dialog","data-slot":"content","data-surface":"dialog","data-monkeys-dialog-content":true,style:{pointerEvents:"auto",...t},children:jsxRuntime.jsx(No,{children:o})})]})});sg.displayName="AlertDialogContent";var lg=r(({className:e,...t})=>jsxRuntime.jsx("div",{className:l("flex flex-col space-y-2 text-center sm:text-left",e),...t}),"AlertDialogHeader"),dg=r(({className:e,...t})=>jsxRuntime.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),"AlertDialogFooter"),cg=lt__namespace.forwardRef(({className:e,...t},o)=>{let n=zt()?bt__namespace.Title:wt__namespace.Title;return jsxRuntime.jsx(n,{ref:o,className:l("text-lg font-semibold",e,zt()?.showTitle===false&&"sr-only"),...t})}),ug=lt__namespace.forwardRef(({className:e,...t},o)=>{let n=zt()?bt__namespace.Description:wt__namespace.Description;return jsxRuntime.jsx(n,{ref:o,className:l("text-sm text-muted-foreground",e),...t})}),mg=lt__namespace.forwardRef(({className:e,...t},o)=>{let n=zt()?bt__namespace.Close:wt__namespace.Action;return jsxRuntime.jsx(n,{ref:o,className:l(ur(),e),...t})}),pg=lt__namespace.forwardRef(({className:e,...t},o)=>{let n=zt()?bt__namespace.Close:wt__namespace.Action;return jsxRuntime.jsx(n,{ref:o,className:l(ur({variant:"destructive"}),e),...t})}),gg=lt__namespace.forwardRef(({className:e,...t},o)=>{let n=zt()?bt__namespace.Close:wt__namespace.Cancel;return jsxRuntime.jsx(n,{ref:o,className:l(ur({variant:"outline"}),"mt-2 sm:mt-0",e),...t})});lg.displayName="AlertDialogHeader";dg.displayName="AlertDialogFooter";cg.displayName="AlertDialogTitle";ug.displayName="AlertDialogDescription";mg.displayName="AlertDialogAction";pg.displayName="AlertDialogDangerAction";gg.displayName="AlertDialogCancel";var Wd=Qt__namespace.Root,Ld=Qt__namespace.Trigger;var as=lt__namespace.forwardRef(r(function({align:t="center",sideOffset:o=4,container:n,portalForceMount:a,unstyled:i=false,className:s,style:u,...c},d){let g=Ne(),m=typeof document<"u"?(()=>{let f=document.activeElement?.closest("[data-monkeys-dialog-content]");return f||Array.from(document.querySelectorAll('[data-monkeys-dialog-content][data-state="open"]')).at(-1)})():void 0;return jsxRuntime.jsx(Qt__namespace.Portal,{container:n??m,forceMount:a,children:jsxRuntime.jsx(Qt__namespace.Content,{...g,...c,ref:d,align:t,sideOffset:o,"data-monkeys-component":"popover","data-slot":"content","data-surface":"menu",className:i?s:l("z-50 w-72 border p-4 outline-hidden",cn("menu"),"data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),style:i?u:{pointerEvents:"auto",...u}})})},"PopoverContent"));as.displayName=Qt__namespace.Content.displayName;var Ad=["pulse","shimmer","shimmer-soft","shimmer-diagonal","shimmer-vertical","drift","outline","none"];function Od(e,t=false){if(!(e===void 0||Ad.includes(e))&&!(t&&(e==="shimmer-shared"||e==="shimmer-stagger")))throw new TypeError(`Skeleton animation must be ${Ad.join(", ")}${t?", shimmer-shared, or shimmer-stagger":""}.`)}r(Od,"validateSkeletonAnimation");var ss=lt.createContext(null),hr=lt.createContext(void 0);function ls(e){delete e.dataset.skeletonReady;for(let t of ["width","offset","delay"])e.style.removeProperty(`--monkeys-skeleton-${t}`);}r(ls,"clearGeometry");function fg(e,t,o,n){let a=lt.useMemo(()=>({nodes:new Map,update:r(()=>{},"update")}),[]);return lt.useEffect(()=>{if(!o||t||e!=="shimmer-shared"&&e!=="shimmer-stagger")return;let i=window.matchMedia("(prefers-reduced-motion: reduce)"),s,u,c=false,d=new Set,g=r(()=>{if(u=void 0,!c)return;let b=[...a.nodes.keys()].filter(C=>C.isConnected);if(b.sort((C,T)=>C.compareDocumentPosition(T)&2?1:-1),e==="shimmer-stagger"){b.forEach((C,T)=>{let S=a.nodes.get(C)?.item??T;C.style.setProperty("--monkeys-skeleton-delay",`${Math.min(S*80,400)}ms`);});return}let v=n?.current??b[0]?.parentElement;for(let C of b)for(;v&&!v.contains(C);)v=v.parentElement;let y=new Set(b);for(let C of b)for(let T=C.parentElement;T&&(y.add(T),T!==v);T=T.parentElement);v&&y.add(v);for(let C of d)y.has(C)||(s?.unobserve(C),d.delete(C));for(let C of y)d.has(C)||(s?.observe(C),d.add(C));let x=b.map(C=>C.getBoundingClientRect()),w=b.map((C,T)=>{let S=getComputedStyle(C),I=S.boxSizing==="border-box"?0:parseFloat(S.paddingLeft)+parseFloat(S.paddingRight)+parseFloat(S.borderLeftWidth)+parseFloat(S.borderRightWidth),R=parseFloat(S.width)+I,W=R?x[T].width/R:1;return Math.abs(W-1)<1e-4?1:W}),h=Math.min(...x.map(C=>C.left)),k=Math.max(...x.map(C=>C.right));b.forEach((C,T)=>{let S=x[T];if(!S.width||!S.height){ls(C);return}let I=w[T];C.style.setProperty("--monkeys-skeleton-width",`${(k-h)/I}px`),C.style.setProperty("--monkeys-skeleton-offset",`${(h-S.left)/I}px`),C.dataset.skeletonReady||(C.style.setProperty("--monkeys-skeleton-delay",`${-(performance.now()%2600)}ms`),C.dataset.skeletonReady="true");});},"measure"),m=r(()=>{c&&u===void 0&&(u=window.requestAnimationFrame(g));},"schedule"),p=r(()=>{c=false,s?.disconnect(),s=void 0,d.clear(),u!==void 0&&window.cancelAnimationFrame(u),u=void 0,window.removeEventListener("resize",m),window.removeEventListener("scroll",m,true),a.nodes.forEach((b,v)=>ls(v));},"stop"),f=r(()=>{p(),!(i.matches||e==="shimmer-shared"&&typeof ResizeObserver>"u")&&(c=true,e==="shimmer-shared"&&(s=new ResizeObserver(m),window.addEventListener("resize",m),window.addEventListener("scroll",m,{capture:true,passive:true})),m());},"start");return a.update=m,f(),i.addEventListener("change",f),()=>{p(),i.removeEventListener("change",f),a.update=()=>{};}},[e,t,o,a,n]),lt.useEffect(()=>{a.update();}),a}r(fg,"useGroupRegistry");function jo({animation:e,animated:t,children:o,independent:n=false,containerRef:a}){if(Od(e,true),t!==void 0&&typeof t!="boolean")throw new TypeError("SkeletonGroup animated must be a boolean.");let i=lt.useContext(ss),s=lt.useContext(hr),u=n||e!==void 0||!i,c=e??i?.animation??"pulse",d=!!i?.disabled||t===false||c==="none",g=fg(c,d,u,a),m=lt.useMemo(()=>({animation:c,disabled:d,registry:u?g:i.registry}),[c,d,u,g,i]),p=jsxRuntime.jsx(ss.Provider,{value:m,children:o});return jsxRuntime.jsx(hr.Provider,{value:u?void 0:s,children:p})}r(jo,"SkeletonScope");function En({index:e,children:t}){let o=lt.useContext(hr);return jsxRuntime.jsx(hr.Provider,{value:o??e,children:t})}r(En,"SkeletonItem");function yg(e,t){return lt.useMemo(()=>{let o;return n=>{if(e(n),typeof t=="function"){if(o)o(),o=void 0;else if(n===null){t(null);return}if(n!==null){let a=t(n);typeof a=="function"&&(o=a);}}else t&&(t.current=n);}},[e,t])}r(yg,"useSkeletonRef");function Fd(e,t=true,o){Od(e);let n=lt.useContext(ss),a=lt.useContext(hr),i=!t||n?.disabled?"none":e??n?.animation??"pulse",[s,u]=lt.useState(null),c=yg(u,o),d=e===void 0&&(i==="shimmer-shared"||i==="shimmer-stagger")?n?.registry:void 0;return lt.useEffect(()=>{if(!(!s||!d))return d.nodes.set(s,{item:a}),d.update(),()=>{d.nodes.delete(s),ls(s),d.update();}},[s,d,a,i]),{ref:c,mode:i,style:i==="shimmer-stagger"&&a!==void 0?{"--monkeys-skeleton-delay":`${Math.min(a*80,400)}ms`}:void 0}}r(Fd,"useSkeletonMotion");function Vd(e){if(e===null)return null;if(typeof e=="string"&&e.trim().length>0)return e;throw new TypeError("BaseField validate must return a non-empty error string or null.")}r(Vd,"resolveBaseFieldValidationResult");var us=lt.createContext(null);function Ko(){let e=lt.useContext(us),t=lt.useRef(null);t.current===null&&(t.current=Symbol("BaseFieldControl"));let o=e?.registerControl;lt.useEffect(()=>{if(!(!o||t.current===null))return o(t.current)},[o]);let n=e?.notifyBlur,a=e?.notifyChange;return {invalid:e?.invalid??false,notifyBlur:lt.useCallback(i=>n?.(i),[n]),notifyChange:lt.useCallback(i=>a?.(i),[a])}}r(Ko,"useBaseFieldControl");var Rg={sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"},Ng={sm:"text-[10px]",md:"text-[11px]",lg:"text-xs"};function Ig(e,...t){for(let o of t)if(o){if(typeof o=="function"){o(e);continue}o.current=e;}}r(Ig,"setRefs");var pn=lt.forwardRef(r(function({label:t,description:o,indeterminate:n=false,invalid:a=false,disabled:i=false,controlSize:s,appearance:u,className:c,classNames:d,style:g,checked:m,defaultChecked:p,onBlur:f,onChange:b,"aria-invalid":v,...y},x){for(let[D,B]of [["indeterminate",n],["invalid",a],["disabled",i]])if(typeof B!="boolean")throw new TypeError(`BaseCheckbox ${D} must be a boolean.`);if(s!==void 0&&s!=="sm"&&s!=="md"&&s!=="lg")throw new TypeError('BaseCheckbox controlSize must be "sm", "md", or "lg".');let w=Oe(u),h=Ne(),k=De(w),C=Ko(),T=a||C.invalid,S=O(t),I=Kl(o),R=lt.useRef(null),W=lt.useRef(n);W.current=n;let[H,L]=lt.useState(p??false),F=m!==void 0,$=!!(F?m:H),M=n||$,G=n?"mixed":$?"checked":"unchecked",Y=lt.useCallback(D=>{R.current=D,D&&(D.indeterminate=W.current),Ig(D,x);},[x]);lt.useEffect(()=>{R.current&&(R.current.indeterminate=n);},[n]);let N=r(D=>{i||(F||L(D.currentTarget.checked),b?.(D),C.notifyChange(D.currentTarget.checked),R.current&&(R.current.indeterminate=n));},"handleChange");return jsxRuntime.jsxs("label",{...h,"data-monkeys-component":"checkbox","data-slot":"root","data-state":G,"data-size":s,"data-invalid":T||void 0,"data-disabled":i||void 0,className:l(k.slots.checkboxRoot,!I&&"items-center",i&&k.slots.checkboxDisabled,d?.root,c),style:{...k.styles.checkboxRoot,...g},children:[jsxRuntime.jsxs("span",{"data-slot":"box","data-state":G,"data-size":s,className:l(k.slots.checkboxBox,!I&&"mt-0",M&&k.slots.checkboxBoxChecked,T&&k.slots.checkboxBoxInvalid,s&&Rg[s],d?.box),style:{...k.styles.checkboxBox},children:[jsxRuntime.jsx("input",{...y,ref:Y,type:"checkbox",disabled:i,checked:m,defaultChecked:p,"aria-invalid":v??(T||void 0),"aria-checked":n?"mixed":$,"data-slot":"input","data-state":G,"data-size":s,"data-invalid":T||void 0,"data-disabled":i||void 0,className:l(k.slots.checkboxInput,d?.input),onBlur:D=>{f?.(D),C.notifyBlur(D.currentTarget.checked);},onChange:N}),M?jsxRuntime.jsx("span",{"aria-hidden":"true","data-slot":"indicator","data-state":G,"data-size":s,className:l(k.slots.checkboxIndicator,s&&Ng[s],d?.indicator),children:n?"\u2013":"\u2713"}):null]}),S||I?jsxRuntime.jsxs("span",{"data-slot":"content",className:l(k.slots.checkboxContent,d?.content),children:[S?jsxRuntime.jsx("span",{"data-slot":"label",className:l(k.slots.checkboxLabel,d?.label),children:t}):null,I?jsxRuntime.jsx("span",{"data-slot":"description",className:l(k.slots.checkboxDescription,d?.description),children:o}):null]}):null]})},"BaseCheckbox"));function ps(e,t){let o=typeof e=="function"?e():e;if(o===null)return null;if(!o||typeof o!="object"||o.nodeType!==1)throw new TypeError(`${t} must resolve to an Element or null.`);return o}r(ps,"resolveContainerValue");function _d({explicitProvided:e,explicitContainer:t,providerProvided:o,providerContainer:n,getDocument:a}){if(e)return ps(t,"BasePortal container");if(o)return ps(n,"MonkeysProvider portal.container");if(!a)return null;let i=a();if(i===null)return null;if(!i||typeof i!="object"||!("body"in i))throw new TypeError("MonkeysProvider environment.getDocument must resolve to a Document or null.");return ps(i.body,"MonkeysProvider environment.getDocument().body")}r(_d,"resolveBasePortalContainer");function Eg({mounted:e,explicitDisabled:t,explicitContainer:o,providerDisabled:n,providerContainer:a,getDocument:i}){let s=t??n??false;if(!e||s)return {mounted:e,disabled:s,shouldPortal:false,container:null,radixPortalProps:void 0};let u=_d({explicitProvided:o!==void 0,explicitContainer:o,providerProvided:a!==void 0,providerContainer:a,getDocument:i});return u?{mounted:true,disabled:false,shouldPortal:true,container:u,radixPortalProps:Object.freeze({container:u})}:{mounted:true,disabled:false,shouldPortal:false,container:null,radixPortalProps:void 0}}r(Eg,"resolveBaseOverlayPortalState");function Dg(){return globalThis.document??null}r(Dg,"getDefaultDocument");function Mo(e={}){let t=Yi(),o=Ji(),[n,a]=lt.useState(false);return lt.useEffect(()=>{a(true);},[]),Eg({mounted:n,explicitDisabled:e.disabled,explicitContainer:e.container,providerDisabled:o.disabled,providerContainer:o.container,getDocument:t.getDocument??Dg})}r(Mo,"useBaseOverlayPortal");function $d(e,t){return t.shouldPortal?reactDom.createPortal(e,t.container):jsxRuntime.jsx(jsxRuntime.Fragment,{children:e})}r($d,"renderBaseOverlayPortalContent");function Na(e,t){if(typeof e!="boolean")throw new TypeError(`BaseTooltip ${t} must be a boolean.`)}r(Na,"validateBoolean");function Hg(e){if(e!=="top"&&e!=="bottom"&&e!=="left"&&e!=="right")throw new TypeError('BaseTooltip placement must be "top", "bottom", "left", or "right".')}r(Hg,"validatePlacement");function Vg(e,t){return lt.isValidElement(e)&&e.type!==lt.Fragment?e:jsxRuntime.jsx("span",{tabIndex:!t&&O(e)?0:void 0,children:e})}r(Vg,"normalizeTrigger");var xr=lt.forwardRef(r(function({content:t,children:o,open:n,defaultOpen:a=false,placement:i="top",disabled:s=false,portal:u=false,appearance:c,className:d,classNames:g,style:m,onOpenChange:p,...f},b){n!==void 0&&Na(n,"open"),Na(a,"defaultOpen"),Na(s,"disabled"),Na(u,"portal"),Hg(i);let v=Oe(c),y=Ne(),x=De(v),w=Mo({disabled:!u}),[h,k]=lt.useState(a),C=n!==void 0,T=!s&&O(t),I=T&&(C?n:h),R=u&&w.shouldPortal?"portaled":"inline",W=r(F=>{F&&!T||(C||k(F),p?.(F));},"handleOpenChange"),H=Vg(o,s),L=T?jsxRuntime.jsx(uo__namespace.Content,{...y,side:i,sideOffset:8,collisionPadding:8,"data-monkeys-component":"tooltip","data-slot":"content","data-placement":i,"data-portal":R,"data-disabled":s||void 0,className:l(x.slots.tooltipContent,g?.content),style:x.styles.tooltip,children:t}):null;return jsxRuntime.jsx("span",{...y,...f,ref:b,"data-monkeys-component":"tooltip","data-slot":"root","data-state":I?"open":"closed","data-placement":i,"data-portal":R,"data-disabled":s||void 0,className:l(x.slots.tooltipRoot,g?.root,d),style:m,children:jsxRuntime.jsx(uo__namespace.Provider,{delayDuration:0,skipDelayDuration:0,disableHoverableContent:true,children:jsxRuntime.jsxs(uo__namespace.Root,{open:I,onOpenChange:W,delayDuration:0,disableHoverableContent:true,children:[jsxRuntime.jsx("span",{...y,"data-monkeys-component":"tooltip","data-slot":"trigger-wrapper","data-state":I?"open":"closed","data-placement":i,"data-portal":R,"data-disabled":s||void 0,className:l(x.slots.tooltipTrigger,g?.trigger),children:jsxRuntime.jsx(uo__namespace.Trigger,{asChild:true,...y,"data-monkeys-component":"tooltip","data-slot":"trigger","data-placement":i,"data-portal":R,"data-disabled":s||void 0,children:H})}),u&&w.shouldPortal?jsxRuntime.jsx(uo__namespace.Portal,{...w.radixPortalProps,children:L}):L]})})})},"BaseTooltip"));function eo(e,t){if(typeof e!="string")return;let o=e.trim();if(!o||/[\u0000-\u001f\u007f\\]/.test(o)||/^https?:/i.test(o)&&!/^https?:\/\//i.test(o))return;let n;try{n=new URL(o,"https://monkeys.invalid/");}catch{return}if(!(n.username||n.password)){if(n.protocol==="http:"||n.protocol==="https:"||t==="link"&&(n.protocol==="mailto:"||n.protocol==="tel:"))return o;if(n.protocol==="blob:"){if(n.pathname.startsWith("null/"))return o;try{let a=new URL(n.pathname);if(["https:","http:"].includes(a.protocol)&&!a.username&&!a.password)return o}catch{}}}}r(eo,"safeDisplayUrl");function jd(e){if(typeof e!="string"||!e.trim())return;let t=e.split(",");for(let o of t){let n=o.trim().split(/\s+/);if(!eo(n[0],"media")||n.length>2||n.length===2&&!/^(?:[1-9]\d*w|(?:\d+(?:\.\d+)?|\.\d+)x)$/.test(n[1]))return}return e}r(jd,"safeDisplaySrcSet");function Kd({kind:e}){return jsxRuntime.jsx(e==="image"?lucideReact.Image:e==="video"?lucideReact.Video:e==="audio"?lucideReact.Music2:lucideReact.FileText,{className:"h-6 w-6","aria-hidden":"true"})}r(Kd,"PreviewIcon");function qd({src:e,kind:t="image",alt:o="Preview",title:n,aspectRatio:a="auto",fit:i="contain",controls:s=true,loading:u=false,empty:c="No preview available",error:d="Preview is unavailable right now.",className:g,style:m,classNames:p,mediaAttributes:f,onLoad:b,onError:v}){let[y,x]=lt.useState(false),w=eo(e,"media")??"",h=Object.fromEntries(Object.entries(f??{}).flatMap(([S,I])=>{let R=S.toLowerCase();return R==="src"||R==="srcdoc"||R==="dangerouslysetinnerhtml"?[]:R==="srcset"?[["srcSet",jd(I)]]:R==="poster"?[["poster",eo(I,"media")]]:[[S,I]]}));lt.useEffect(()=>{x(false);},[w,t]);let k=r((S,I)=>jsxRuntime.jsx("div",{className:Ht("flex min-h-24 flex-col items-center justify-center gap-2 bg-muted/30 p-4 text-center text-sm text-muted-foreground",p?.placeholder,I),role:u?"status":"img","aria-label":typeof S=="string"?S:void 0,children:S}),"renderPlaceholder");if(u)return jsxRuntime.jsx("div",{className:Ht("min-w-0 overflow-hidden",p?.root,g),style:m,"aria-busy":"true",children:jsxRuntime.jsxs("div",{className:Ht("flex min-h-24 flex-col items-center justify-center gap-2 bg-muted/30 p-4 text-sm text-muted-foreground",p?.loading),children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"h-5 w-5 animate-spin","aria-hidden":"true"}),n||"Loading preview..."]})});if(!w||y)return jsxRuntime.jsx("div",{className:Ht("min-w-0 overflow-hidden",p?.root,g),style:m,children:k(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Kd,{kind:t}),jsxRuntime.jsx("span",{className:Ht("max-w-full truncate",y?p?.error:void 0),children:y?d:c}),n?jsxRuntime.jsx("span",{className:"max-w-full truncate text-xs",children:n}):null]}))});let C=r(()=>{x(true),v?.();},"handleError"),T=t==="image"?jsxRuntime.jsx(gr,{...h,src:w,alt:o,fit:i,className:p?.media,loading:"lazy",decoding:"async",draggable:false,onLoad:b,onError:C}):t==="video"?jsxRuntime.jsx("video",{...h,src:w,className:Ht("block h-auto w-full",i==="cover"?"object-cover":"object-contain",p?.media),controls:s,preload:"metadata",onLoadedData:b,onError:C}):t==="audio"?jsxRuntime.jsx("audio",{...h,src:w,className:Ht("w-full",p?.media),controls:s,preload:"metadata",onCanPlay:b,onError:C}):k(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Kd,{kind:"file"}),jsxRuntime.jsx("span",{className:"max-w-full truncate",children:n||w})]}));return t==="image"?jsxRuntime.jsx(ns,{aspectRatio:a,className:Ht(p?.root,g),style:m,children:T}):jsxRuntime.jsx("div",{className:Ht("min-w-0 overflow-hidden",p?.root,g),style:m,children:T})}r(qd,"DataExplorerMediaPreview");var Xg={sm:"h-8 px-2.5 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-3.5 text-base"},Zg={sm:"h-8 w-8 px-0",md:"h-9 w-9 px-0",lg:"h-10 w-10 px-0"},bs={sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"};function Ia(e){return typeof e=="string"&&e.trim()?e:void 0}r(Ia,"nonEmptyText");function Qg(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-full w-full motion-safe:animate-spin motion-reduce:animate-none",fill:"none",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"9",className:"opacity-25",stroke:"currentColor",strokeWidth:"3"}),jsxRuntime.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M12 3a9 9 0 0 1 9 9h-3a6 6 0 0 0-6-6V3Z"})]})}r(Qg,"LoadingIcon");var ve=lt.forwardRef(r(function({children:t,label:o,icon:n,endIcon:a,type:i="button",title:s,ariaLabel:u,tone:c,size:d,active:g=false,iconOnly:m=false,disabled:p=false,loading:f=false,stopPropagation:b=false,appearance:v,variant:y,density:x,state:w,className:h,classNames:k,style:C,onClick:T,"aria-label":S,"aria-pressed":I,...R},W){for(let[Q,j]of [["active",g],["iconOnly",m],["disabled",p],["loading",f],["stopPropagation",b]])if(typeof j!="boolean")throw new TypeError(`BaseButton ${Q} must be a boolean.`);if(d!==void 0&&d!=="sm"&&d!=="md"&&d!=="lg")throw new TypeError('BaseButton size must be "sm", "md", or "lg".');if(c!==void 0&&c!=="default"&&c!=="primary"&&c!=="success"&&c!=="warning"&&c!=="danger"&&c!=="muted")throw new TypeError('BaseButton tone must be "default", "primary", "success", "warning", "danger", or "muted".');let H=Oe(v),L=Ne(),F=De({...H,variant:y,density:x,state:w}),$=t??o,M=O($)&&(typeof $!="string"||!!$.trim()),G=Ia(u)??Ia(S),Y=typeof $=="string"?Ia($):void 0,N=Ia(s);if(m&&!M&&!G&&!N)throw new TypeError("BaseButton iconOnly requires ariaLabel, aria-label, title, or a renderable label.");let D=G??Y??N,B=p||f,K=c??"default",J=w??(f?"loading":p?"disabled":g?"active":"idle"),V=r(Q=>{b&&Q.stopPropagation(),!B&&T?.(Q);},"handleClick");return jsxRuntime.jsxs("button",{...L,...R,ref:W,type:i,title:s,"aria-label":D,"aria-pressed":I??(g||void 0),"aria-busy":f||void 0,"data-variant":F.variant,"data-density":F.density,disabled:B,"data-monkeys-component":"button","data-slot":"root","data-state":J,"data-tone":K,"data-size":d,"data-active":g||void 0,"data-loading":f||void 0,"data-disabled":B||void 0,"data-icon-only":m||void 0,className:l(F.slots.buttonBase,m&&F.slots.buttonIconOnly,d&&Xg[d],m&&d&&Zg[d],ba(F,c,g),B&&F.slots.buttonDisabled,k?.root,h),style:{...F.styles.button,...g?F.styles.buttonActive:void 0,...B?F.styles.buttonDisabled:void 0,...C},onClick:V,children:[f?jsxRuntime.jsx("span",{"data-slot":"icon","data-state":J,"data-tone":K,"data-size":d,className:l(F.slots.buttonIcon,d&&bs[d],k?.icon),children:jsxRuntime.jsx(Qg,{})}):n?jsxRuntime.jsx("span",{"data-slot":"icon","data-state":J,"data-tone":K,"data-size":d,className:l(F.slots.buttonIcon,d&&bs[d],k?.icon),children:n}):null,m?O($)?jsxRuntime.jsx("span",{"data-slot":"label","data-state":J,"data-tone":K,"data-size":d,className:"sr-only",children:$}):null:O($)?jsxRuntime.jsx("span",{"data-slot":"label","data-state":J,"data-tone":K,"data-size":d,className:l(F.slots.buttonLabel,k?.label),children:$}):null,!f&&a?jsxRuntime.jsx("span",{"data-slot":"end-icon","data-state":J,"data-tone":K,"data-size":d,className:l(F.slots.buttonIcon,d&&bs[d],k?.icon,k?.endIcon),children:a}):null]})},"BaseButton"));function Dn(e,t){let o=monkeys.I18nTextSchema.safeParse(e);if(!o.success)throw new TypeError("Invalid I18n display text");let n;try{n=Intl.getCanonicalLocales(t)[0]??"";}catch{n="";}let a=n.split("-")[0]??"";return o.data.values[n]??o.data.values[a]??o.data.values[o.data.defaultLocale]}r(Dn,"resolveI18nDisplayText");var bn=lt.forwardRef(r(function({children:t,label:o,icon:n,tone:a,appearance:i,variant:s,density:u,state:c,className:d,classNames:g,style:m,...p},f){if(a!==void 0&&a!=="default"&&a!=="primary"&&a!=="success"&&a!=="warning"&&a!=="danger"&&a!=="muted")throw new TypeError('BaseBadge tone must be "default", "primary", "success", "warning", "danger", or "muted".');let b=Oe(i),v=Ne(),y=De({...b,variant:s,density:u,state:c}),x=t??o,w=a??"default";return jsxRuntime.jsxs("span",{...v,...p,ref:f,"data-monkeys-component":"badge","data-slot":"root","data-tone":w,"data-variant":y.variant,"data-density":y.density,"data-state":y.state,className:l(y.slots.badgeBase,sd(y,a),g?.root,d),style:{...y.styles.badge,...m},children:[n?jsxRuntime.jsx("span",{"data-slot":"icon","data-tone":w,className:l(y.slots.badgeIcon,g?.icon),children:n}):null,x!=null?jsxRuntime.jsx("span",{"data-slot":"label","data-tone":w,className:l(y.slots.badgeLabel,g?.label),children:x}):null]})},"BaseBadge"));var nb=["default","primary","success","warning","danger","muted"];function qt(e,t){if(typeof e!="boolean")throw new TypeError(`BaseContextMenu ${t} must be a boolean.`)}r(qt,"validateBoolean");function Ma(e){if(e!==void 0&&!nb.includes(e))throw new TypeError('BaseContextMenu tone must be "default", "primary", "success", "warning", "danger", or "muted".')}r(Ma,"validateTone");function rb(e){if(e!==void 0&&e!=="ltr"&&e!=="rtl")throw new TypeError('BaseContextMenu dir must be "ltr" or "rtl".')}r(rb,"validateDirection");function ab(){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:jsxRuntime.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 4.5"})})}r(ab,"CheckIcon");function ib(){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3.5 w-3.5",fill:"currentColor",children:jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"3"})})}r(ib,"DotIcon");function sb(){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:jsxRuntime.jsx("path",{d:"m6 4 4 4-4 4"})})}r(sb,"ChevronRightIcon");function fs({label:e,icon:t,shortcut:o,children:n,classNames:a,inset:i,indicator:s}){let u=n??e;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s||null,O(t)?jsxRuntime.jsx("span",{"data-slot":"icon",className:l(a?.icon),children:t}):i?jsxRuntime.jsx("span",{"aria-hidden":"true","data-slot":"icon",className:"h-4 w-4 shrink-0"}):null,O(u)?jsxRuntime.jsx("span",{"data-slot":"label",className:l(a?.label),children:u}):null,O(o)?jsxRuntime.jsx("span",{"data-slot":"shortcut",className:l(a?.shortcut),children:o}):null]})}r(fs,"renderItemContent");function Xd({children:e,trigger:t,content:o,disabled:n=false,modal:a=true,dir:i,appearance:s,className:u,classNames:c,onOpenChange:d}){qt(n,"disabled"),qt(a,"modal"),rb(i);let g=qi(),m=Oe(s);return jsxRuntime.jsxs(Qe__namespace.Root,{onOpenChange:d,modal:a,dir:i??g,children:[t?jsxRuntime.jsx(ys,{disabled:n,appearance:m,className:l(c?.trigger,u),children:t}):null,o?jsxRuntime.jsx(hs,{appearance:m,className:c?.content,children:o}):null,e]})}r(Xd,"BaseContextMenu");var ys=lt.forwardRef(r(function({children:t,disabled:o=false,asChild:n=false,appearance:a,className:i,style:s,...u},c){qt(o,"Trigger disabled"),qt(n,"Trigger asChild");let d=Oe(a),g=Ne(),m=De(d);return jsxRuntime.jsx(Qe__namespace.Trigger,{...g,...u,ref:c,asChild:n,disabled:o,"data-monkeys-component":"context-menu","data-slot":"trigger","data-disabled":o||void 0,className:l(!n&&m.slots.menuTrigger,o&&!n&&m.slots.menuItemDisabled,i),style:s,children:t})},"BaseContextMenuTrigger")),hs=lt.forwardRef(r(function({children:t,appearance:o,className:n,classNames:a,style:i,...s},u){let c=Oe(o),d=Ne(),g=De(c),m=Mo(),p=jsxRuntime.jsx(Qe__namespace.Content,{...d,...s,ref:u,"data-monkeys-component":"context-menu","data-slot":"content",className:l(g.slots.menuContent,a?.root,n),style:{...g.styles.menuContent,...i},children:t});return m.shouldPortal?jsxRuntime.jsx(Qe__namespace.Portal,{...m.radixPortalProps,children:p}):p},"BaseContextMenuContent")),Zd=lt.forwardRef(r(function({children:t,appearance:o,className:n,style:a,...i},s){let u=Oe(o),c=Ne(),d=De(u);return jsxRuntime.jsx(Qe__namespace.Label,{...c,...i,ref:s,"data-monkeys-component":"context-menu","data-slot":"label",className:l(d.slots.menuLabel,n),style:a,children:t})},"BaseContextMenuLabel")),Qd=lt.forwardRef(r(function({appearance:t,className:o,style:n,...a},i){let s=Oe(t),u=Ne(),c=De(s);return jsxRuntime.jsx(Qe__namespace.Separator,{...u,...a,ref:i,"data-monkeys-component":"context-menu","data-slot":"separator",className:l(c.slots.menuSeparator,o),style:n})},"BaseContextMenuSeparator")),Wn=lt.forwardRef(r(function({children:t,label:o,icon:n,shortcut:a,tone:i,disabled:s=false,inset:u=false,appearance:c,className:d,classNames:g,style:m,onSelect:p,...f},b){qt(s,"Item disabled"),qt(u,"Item inset"),Ma(i);let v=i??"default",y=Oe(c),x=Ne(),w=De(y);return jsxRuntime.jsx(Qe__namespace.Item,{...x,...f,ref:b,disabled:s,"data-monkeys-component":"context-menu","data-slot":"item","data-tone":v,"data-disabled":s||void 0,className:l(w.slots.menuItem,lr(w,i),s&&w.slots.menuItemDisabled,g?.root,d),style:{...w.styles.menuItem,...m},onSelect:h=>{if(s){h.preventDefault();return}p?.(h);},children:fs({children:t,label:o,icon:n,shortcut:a,inset:u,classNames:{icon:l(w.slots.menuItemIcon,g?.icon),label:l(w.slots.menuItemLabel,g?.label),shortcut:l(w.slots.menuItemShortcut,g?.shortcut)}})})},"BaseContextMenuItem"));lt.forwardRef(r(function({children:t,label:o,icon:n,shortcut:a,tone:i,disabled:s=false,inset:u=false,checked:c,onCheckedChange:d,appearance:g,className:m,classNames:p,style:f,onSelect:b,...v},y){if(qt(s,"CheckboxItem disabled"),qt(u,"CheckboxItem inset"),Ma(i),c!==void 0&&c!=="indeterminate"&&typeof c!="boolean")throw new TypeError('BaseContextMenu CheckboxItem checked must be a boolean or "indeterminate".');let x=i??"default",w=Oe(g),h=Ne(),k=De(w);return jsxRuntime.jsx(Qe__namespace.CheckboxItem,{...h,...v,ref:y,checked:c,disabled:s,"data-monkeys-component":"context-menu","data-slot":"checkbox-item","data-tone":x,"data-disabled":s||void 0,"data-checked":c==="indeterminate"?"mixed":c===void 0?void 0:String(c),onCheckedChange:C=>{s||d?.(C);},className:l(k.slots.menuItem,"pl-8",lr(k,i),s&&k.slots.menuItemDisabled,p?.root,m),style:{...k.styles.menuItem,...f},onSelect:C=>{if(s){C.preventDefault();return}b?.(C);},children:fs({children:t,label:o,icon:n,shortcut:a,inset:u,classNames:{icon:l(k.slots.menuItemIcon,p?.icon),label:l(k.slots.menuItemLabel,p?.label),shortcut:l(k.slots.menuItemShortcut,p?.shortcut)},indicator:jsxRuntime.jsx(Qe__namespace.ItemIndicator,{"data-slot":"indicator",className:l(k.slots.menuCheckboxIndicator,p?.indicator),children:jsxRuntime.jsx(ab,{})})})})},"BaseContextMenuCheckboxItem"));lt.forwardRef(r(function({children:t,label:o,icon:n,shortcut:a,tone:i,disabled:s=false,inset:u=false,value:c,appearance:d,className:g,classNames:m,style:p,onSelect:f,...b},v){qt(s,"RadioItem disabled"),qt(u,"RadioItem inset"),Ma(i);let y=i??"default",x=Oe(d),w=Ne(),h=De(x);return jsxRuntime.jsx(Qe__namespace.RadioItem,{...w,...b,ref:v,value:c,disabled:s,"data-monkeys-component":"context-menu","data-slot":"radio-item","data-tone":y,"data-value":c,"data-disabled":s||void 0,className:l(h.slots.menuItem,"pl-8",lr(h,i),s&&h.slots.menuItemDisabled,m?.root,g),style:{...h.styles.menuItem,...p},onSelect:k=>{if(s){k.preventDefault();return}f?.(k);},children:fs({children:t,label:o,icon:n,shortcut:a,inset:u,classNames:{icon:l(h.slots.menuItemIcon,m?.icon),label:l(h.slots.menuItemLabel,m?.label),shortcut:l(h.slots.menuItemShortcut,m?.shortcut)},indicator:jsxRuntime.jsx(Qe__namespace.ItemIndicator,{"data-slot":"indicator",className:l(h.slots.menuRadioIndicator,m?.indicator),children:jsxRuntime.jsx(ib,{})})})})},"BaseContextMenuRadioItem"));lt.forwardRef(r(function({children:t,label:o,icon:n,tone:a,disabled:i=false,inset:s=false,appearance:u,className:c,classNames:d,style:g,...m},p){qt(i,"SubTrigger disabled"),qt(s,"SubTrigger inset"),Ma(a);let f=a??"default",b=Oe(u),v=Ne(),y=De(b),x=t??o;return jsxRuntime.jsxs(Qe__namespace.SubTrigger,{...v,...m,ref:p,disabled:i,"data-monkeys-component":"context-menu","data-slot":"sub-trigger","data-tone":f,"data-disabled":i||void 0,className:l(y.slots.menuSubTrigger,lr(y,a),i&&y.slots.menuItemDisabled,d?.root,c),style:{...y.styles.menuItem,...g},children:[O(n)?jsxRuntime.jsx("span",{"data-slot":"icon",className:l(y.slots.menuItemIcon,d?.icon),children:n}):s?jsxRuntime.jsx("span",{"aria-hidden":"true","data-slot":"icon",className:"h-4 w-4 shrink-0"}):null,O(x)?jsxRuntime.jsx("span",{"data-slot":"label",className:l(y.slots.menuItemLabel,d?.label),children:x}):null,jsxRuntime.jsx("span",{"data-slot":"sub-indicator",className:l(y.slots.menuSubTriggerIcon,d?.shortcut,"rtl:rotate-180"),children:jsxRuntime.jsx(sb,{})})]})},"BaseContextMenuSubTrigger"));lt.forwardRef(r(function({children:t,appearance:o,className:n,classNames:a,style:i,sideOffset:s=6,...u},c){let d=Oe(o),g=Ne(),m=De(d),p=Mo(),f=jsxRuntime.jsx(Qe__namespace.SubContent,{...g,...u,ref:c,sideOffset:s,"data-monkeys-component":"context-menu","data-slot":"sub-content",className:l(m.slots.menuSubContent,a?.root,n),style:{...m.styles.menuContent,...i},children:t});return p.shouldPortal?jsxRuntime.jsx(Qe__namespace.Portal,{...p.radixPortalProps,children:f}):f},"BaseContextMenuSubContent"));var db={1:"grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-2 xl:grid-cols-3"};function vs({items:e,columns:t=1,appearance:o,className:n,classNames:a,style:i,children:s,...u}){let c=De(o);return jsxRuntime.jsxs("dl",{...u,className:l(c.slots.descriptionListRoot,db[t],a?.root,n),style:{...c.styles.descriptionList,...i},children:[e?.map((d,g)=>jsxRuntime.jsxs("div",{className:l(c.slots.descriptionListItem,a?.item),children:[jsxRuntime.jsx("dt",{className:l(c.slots.descriptionListTerm,a?.term),children:d.term}),jsxRuntime.jsx("dd",{className:l(c.slots.descriptionListValue,a?.value),children:d.value})]},g)),s]})}r(vs,"BaseDescriptionList");var pb=["default","primary","success","warning","danger","muted"];function mo(e,t){if(typeof e!="boolean")throw new TypeError(`BaseDialog ${t} must be a boolean.`)}r(mo,"validateBoolean");function gb(e){if(!pb.includes(e))throw new TypeError('BaseDialog triggerTone must be "default", "primary", "success", "warning", "danger", or "muted".')}r(gb,"validateTriggerTone");function bb({trigger:e,triggerLabel:t,triggerIcon:o,triggerTone:n,triggerDisabled:a,theme:i}){return O(e)?jsxRuntime.jsx("span",{role:"button",tabIndex:a?-1:0,"aria-disabled":a||void 0,onKeyDown:s=>{a||(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),s.currentTarget.click());},children:e}):O(t)?jsxRuntime.jsxs("button",{type:"button",disabled:a,"aria-label":typeof t=="string"&&t.trim()?t:void 0,className:l(i.slots.buttonBase,ba(i,n),a&&i.slots.buttonDisabled),style:{...i.styles.button,...a?i.styles.buttonDisabled:void 0},children:[O(o)?jsxRuntime.jsx("span",{"data-slot":"icon",className:i.slots.buttonIcon,children:o}):null,jsxRuntime.jsx("span",{"data-slot":"label",className:i.slots.buttonLabel,children:t})]}):null}r(bb,"renderTrigger");var Ln=lt.forwardRef(r(function({open:t,defaultOpen:o=false,size:n="default",title:a,description:i,header:s,footer:u,trigger:c,triggerLabel:d,triggerIcon:g,triggerTone:m="default",triggerDisabled:p=false,closeLabel:f,closeOnEscape:b=true,closeOnOverlayClick:v=true,showCloseButton:y=true,keepMounted:x=false,trapFocus:w=true,restoreFocus:h=true,initialFocus:k="first-interactive",initialFocusRef:C,zIndex:T,portal:S=false,appearance:I,className:R,classNames:W,style:H,children:L,onOpenChange:F,id:$,...M},G){if(t!==void 0&&mo(t,"open"),mo(o,"defaultOpen"),!["default","viewport","page"].includes(n))throw new TypeError("BaseDialog size must be default, viewport or page.");if(mo(p,"triggerDisabled"),mo(b,"closeOnEscape"),mo(v,"closeOnOverlayClick"),mo(y,"showCloseButton"),mo(x,"keepMounted"),mo(w,"trapFocus"),mo(h,"restoreFocus"),mo(S,"portal"),gb(m),k!=="first-interactive"&&k!=="container"&&k!=="explicit")throw new TypeError('BaseDialog initialFocus must be "first-interactive", "container", or "explicit".');if(T!==void 0&&!Number.isFinite(T))throw new TypeError("BaseDialog zIndex must be a finite number.");let Y=vt().dialog,N=Oe(I),D=Ne(),B=f===void 0?Y.close:f,K=De(N),J=Mo({disabled:!S}),[V,Q]=lt.useState(o),j=lt.useRef(null),Z=lt.useRef(null),te=t!==void 0,ae=te?t:V,le=S&&J.shouldPortal?"portaled":"inline",A=O(a),me=O(i),P=O(s);if(y&&(typeof B!="string"||!B.trim()))throw new TypeError("BaseDialog closeLabel must be a non-empty string when showCloseButton is true.");let _=r(xe=>{te||Q(xe),F?.(xe);},"handleOpenChange");lt.useEffect(()=>{if(!ae||!x)return;let xe=j.current,oe=xe?.ownerDocument,se=oe?.defaultView;if(!xe||!oe||!se)return;Z.current=oe.activeElement instanceof se.HTMLElement?oe.activeElement:null;let Re=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),Ie=r(()=>{let U=xe.querySelector(Re);(k==="container"?xe:k==="explicit"?C?.current??xe:U??xe).focus();},"focusInitial"),ze=se.requestAnimationFrame(Ie),ce=r(U=>{if(U.key==="Escape"&&b){U.preventDefault(),U.stopPropagation(),_(false);return}if(U.key!=="Tab"||!w)return;let z=Array.from(xe.querySelectorAll(Re));if(z.length===0){U.preventDefault(),xe.focus();return}let X=z[0],ie=z[z.length-1];U.shiftKey&&oe.activeElement===X?(U.preventDefault(),ie.focus()):!U.shiftKey&&oe.activeElement===ie&&(U.preventDefault(),X.focus());},"handleKeyDown");return se.addEventListener("keydown",ce),()=>{se.cancelAnimationFrame(ze),se.removeEventListener("keydown",ce),h&&Z.current?.isConnected&&Z.current.focus();}},[b,k,C,ae,x,h,w]);let re=P||A||me?jsxRuntime.jsxs("div",{...D,"data-monkeys-component":"dialog","data-slot":"header","data-state":ae?"open":"closed","data-portal":le,className:l(K.slots.dialogHeader,W?.header,n==="page"&&"sr-only"),children:[P?s:null,A?jsxRuntime.jsx(bt__namespace.Title,{...D,"data-monkeys-component":"dialog","data-slot":"title","data-state":ae?"open":"closed","data-portal":le,className:P?"sr-only":l(K.slots.dialogTitle,W?.title),children:a}):null,me?jsxRuntime.jsx(bt__namespace.Description,{...D,"data-monkeys-component":"dialog","data-slot":"description","data-state":ae?"open":"closed","data-portal":le,className:P?"sr-only":l(K.slots.dialogDescription,W?.description),children:i}):null]}):null,fe=bb({trigger:c,triggerLabel:d,triggerIcon:g,triggerTone:m,triggerDisabled:p,theme:K}),ye=ae||x?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(bt__namespace.Overlay,{forceMount:x||void 0,hidden:!ae,...D,"aria-hidden":"true","data-monkeys-component":"dialog","data-slot":"overlay","data-portal":le,className:l(K.slots.dialogOverlay,W?.overlay),style:{...K.styles.dialogOverlay,zIndex:T,...n==="page"?{background:"transparent",backdropFilter:"none"}:{}}}),jsxRuntime.jsx("div",{...D,hidden:!ae,"data-monkeys-component":"dialog","data-slot":"content","data-state":ae?"open":"closed","data-portal":le,className:l(K.slots.dialogContent,W?.content),style:{zIndex:T,...n==="page"?{padding:0,inset:0}:{}},children:jsxRuntime.jsx(bt__namespace.Content,{forceMount:x||void 0,...D,...A?{}:{"aria-labelledby":void 0},...me?{}:{"aria-describedby":void 0},asChild:true,onOpenAutoFocus:xe=>{if(x){xe.preventDefault();return}let oe=j.current;Z.current=oe?.ownerDocument.activeElement,(k==="container"||k==="explicit")&&(xe.preventDefault(),(k==="explicit"?C?.current??oe:oe)?.focus({preventScroll:true}));},onCloseAutoFocus:xe=>{if(x||!h){xe.preventDefault();return}let oe=Z.current;oe?.isConnected&&(xe.preventDefault(),oe.focus({preventScroll:true}));},onEscapeKeyDown:xe=>{(x||!b)&&xe.preventDefault();},onPointerDownOutside:xe=>{v||xe.preventDefault();},children:jsxRuntime.jsxs("div",{...D,ref:j,tabIndex:-1,"aria-modal":"true","data-monkeys-component":"dialog","data-slot":"panel","data-portal":le,className:l(K.slots.dialogPanel,W?.panel),"data-presentation":n,style:{...K.styles.dialogPanel,...n!=="default"?{width:n==="page"?"100vw":"96vw",maxWidth:"none",height:n==="page"?"100dvh":"94dvh",maxHeight:n==="page"?"100dvh":"94dvh",display:"flex",flexDirection:"column"}:{},...n==="page"?{borderRadius:0,border:0,boxShadow:"none",margin:0,animation:"none"}:{}},children:[re,y?jsxRuntime.jsx(bt__namespace.Close,{asChild:true,children:jsxRuntime.jsx("button",{...D,type:"button","aria-label":B,title:B,"data-monkeys-component":"dialog","data-slot":"close","data-state":ae?"open":"closed","data-portal":le,className:l(K.slots.dialogClose,W?.close),children:"\xD7"})}):null,jsxRuntime.jsx("div",{...D,"data-monkeys-component":"dialog","data-slot":"body","data-state":ae?"open":"closed","data-portal":le,className:l(K.slots.dialogBody,W?.body),style:n!=="default"?{minHeight:0,flex:"1 1 0%",overflow:"hidden",padding:0}:void 0,children:L}),O(u)?jsxRuntime.jsx("div",{...D,"data-monkeys-component":"dialog","data-slot":"footer","data-state":ae?"open":"closed","data-portal":le,className:l(K.slots.dialogFooter,W?.footer),children:u}):null]})})})]}):null;return jsxRuntime.jsx("div",{...D,...M,ref:G,id:$,"data-monkeys-component":"dialog","data-slot":"root","data-state":ae?"open":"closed","data-portal":le,className:l(K.slots.dialogRoot,W?.root,R),style:H,children:jsxRuntime.jsxs(bt__namespace.Root,{open:ae,onOpenChange:_,modal:!x&&w,children:[fe?jsxRuntime.jsx(bt__namespace.Trigger,{...D,asChild:true,disabled:p,"data-monkeys-component":"dialog","data-slot":"trigger","data-portal":le,"data-tone":m,"data-disabled":p||void 0,className:l(K.slots.dialogTrigger,p&&K.slots.dialogTriggerDisabled,W?.trigger),children:fe}):null,S&&J.shouldPortal?jsxRuntime.jsx(No,{children:jsxRuntime.jsx(bt__namespace.Portal,{...J.radixPortalProps,forceMount:x||void 0,children:ye})}):jsxRuntime.jsx(No,{children:ye})]})})},"BaseDialog"));function hb(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",children:[jsxRuntime.jsx("rect",{width:"16",height:"12",x:"4",y:"6",rx:"2"}),jsxRuntime.jsx("path",{d:"M8 10h8"}),jsxRuntime.jsx("path",{d:"M8 14h5"})]})}r(hb,"DefaultEmptyIcon");var Ba=lt.forwardRef(r(function({icon:t=jsxRuntime.jsx(hb,{}),title:o,description:n,actions:a,variant:i,appearance:s,className:u,classNames:c,style:d,...g},m){let p=Oe(s),f=Ne(),b=Ro(),v=i??b.empty?.variant??"default",y=b.density==="compact"?"min-h-0 px-3 py-3":b.density==="comfortable"?"min-h-56 px-8 py-12":void 0,x=De(p);return jsxRuntime.jsxs("div",{...f,...g,ref:m,"data-monkeys-component":"empty-state","data-slot":"root","data-state":"empty","data-variant":v,"data-density":b.density,className:l(x.slots.stateRoot,y,v==="compact"&&"min-h-0 gap-1 py-3",c?.root,u),style:{...x.styles.stateRoot,...d},children:[O(t)?jsxRuntime.jsx("div",{"data-slot":"icon","data-state":"empty",className:l(x.slots.stateIcon,c?.icon),style:x.styles.stateIcon,children:t}):null,O(o)?jsxRuntime.jsx("div",{"data-slot":"title","data-state":"empty",className:l(x.slots.stateTitle,c?.title),children:o}):null,O(n)?jsxRuntime.jsx("div",{"data-slot":"description","data-state":"empty",className:l(x.slots.stateDescription,c?.description),children:n}):null,O(a)?jsxRuntime.jsx("div",{"data-slot":"actions","data-state":"empty",className:l(x.slots.stateActions,c?.actions),children:a}):null]})},"BaseEmptyState"));var rc=lt.createContext(false);function ac({children:e}){let{locale:t}=xt();return e==null||e===""?null:jsxRuntime.jsx(xr,{content:e,portal:true,children:jsxRuntime.jsx("button",{type:"button","aria-label":typeof e=="string"?e:t.startsWith("zh")?"\u8BF4\u660E":"Help","data-form-help":true,className:"inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:jsxRuntime.jsx(lucideReact.HelpCircle,{className:"h-4 w-4","aria-hidden":"true"})})})}r(ac,"BaseFormHelp");function Rb(...e){let t=e.flatMap(o=>o?.split(/\s+/).filter(Boolean)??[]);return t.length?Array.from(new Set(t)).join(" "):void 0}r(Rb,"mergeAriaIds");function ws(e,t,o){if(e===void 0)return t;if(!e.trim()||/\s/.test(e))throw new TypeError(`BaseField ${o} must be a non-empty ID without whitespace.`);return e}r(ws,"resolveOptionalId");var Po=lt.forwardRef(r(function({label:t,description:o,message:n,error:a,required:i=false,disabled:s=false,htmlFor:u,descriptionId:c,messageId:d,errorId:g,validate:m,validationMode:p="onBlur",children:f,appearance:b,className:v,classNames:y,style:x,...w},h){for(let[_,re]of [["required",i],["disabled",s]])if(typeof re!="boolean")throw new TypeError(`BaseField ${_} must be a boolean.`);if(m!==void 0&&typeof m!="function")throw new TypeError("BaseField validate must be a function.");if(p!=="onBlur"&&p!=="onChange")throw new TypeError('BaseField validationMode must be "onBlur" or "onChange".');let k=lt.useContext(rc)?"tooltip":"inline",C=lt.useId(),T=Oe(b),S=Ne(),I=De(T),R=O(o),[W,H]=lt.useState(null),L=lt.useRef(new Set),F=lt.useRef(m),$=lt.useRef(p),M=lt.useRef(s);F.current=m,$.current=p,M.current=s;let G=m!==void 0;lt.useEffect(()=>{(!G||s)&&H(null);},[s,G]),lt.useEffect(()=>{if(G&&L.current.size!==1)throw new TypeError("BaseField with validate must contain exactly one compatible Base control.")},[G]);let Y=lt.useCallback(_=>{let re=L.current;if(F.current!==void 0&&!re.has(_)&&re.size>0)throw new TypeError("BaseField with validate supports exactly one compatible Base control. Use BaseFieldset for control groups.");return re.add(_),()=>{re.delete(_);}},[]),N=lt.useCallback((_,re)=>{let fe=F.current;if(M.current||fe===void 0||$.current!==_)return;let ye=Vd(fe(re));if(ye===null){H(null);return}H(ye);},[]),D=lt.useCallback(_=>N("onBlur",_),[N]),B=lt.useCallback(_=>N("onChange",_),[N]),J=O(a)?a:W,V=O(J),Q=!V&&O(n),j=V?J:n,Z=u??`${C}-control`,te=R?ws(c,`${C}-description`,"descriptionId"):void 0,ae=Q?ws(d,`${C}-message`,"messageId"):void 0,le=V?ws(g,`${C}-error`,"errorId"):void 0,A={id:Z,"aria-describedby":Rb(te,ae),"aria-errormessage":le,"aria-invalid":V?true:void 0,"aria-required":i?true:void 0,required:i||void 0,disabled:s||void 0},me=typeof f=="function"?f(A):f,P=lt.useMemo(()=>({invalid:V,registerControl:Y,notifyBlur:D,notifyChange:B}),[V,D,B,Y]);return jsxRuntime.jsxs("div",{...S,...w,ref:h,"aria-disabled":s||void 0,"data-monkeys-component":"field","data-slot":"root","data-required":i||void 0,"data-disabled":s||void 0,"data-invalid":V||void 0,className:l(I.slots.fieldRoot,s&&I.slots.controlDisabled,y?.root,v),style:{...I.styles.field,...x},children:[O(t)?jsxRuntime.jsxs("div",{"data-slot":"label-row",className:l(I.slots.fieldLabelRow,y?.labelRow),children:[jsxRuntime.jsxs("label",{htmlFor:typeof f=="function"?Z:u,"data-slot":"label",className:l(I.slots.fieldLabel,y?.label),children:[t,i?jsxRuntime.jsxs("span",{"aria-hidden":"true","data-slot":"required-indicator",className:l(I.slots.fieldRequired,y?.required),children:[" ","*"]}):null]}),k==="tooltip"&&R?jsxRuntime.jsx(ac,{children:o}):null]}):null,R?jsxRuntime.jsx("div",{id:te,"data-slot":"description",className:l(I.slots.fieldDescription,y?.description,k==="tooltip"&&"sr-only"),children:o}):null,O(me)?jsxRuntime.jsx("div",{"data-slot":"control",className:l(I.slots.fieldControl,y?.control),style:I.styles.fieldControl,children:jsxRuntime.jsx(us.Provider,{value:P,children:me})}):null,O(j)?jsxRuntime.jsx("div",{id:V?le:ae,role:V?"alert":void 0,"data-slot":V?"error":"message",className:l(I.slots.fieldMessage,V&&"text-destructive-text",y?.message),children:j}):null]})},"BaseField"));var Ib={sm:"h-8 px-2.5 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-3.5 text-base"},to=lt.forwardRef(r(function({icon:t,trailing:o,invalid:n=false,disabled:a=false,readOnly:i=false,controlSize:s,appearance:u,className:c,classNames:d,style:g,"aria-invalid":m,onBlur:p,onChange:f,...b},v){for(let[C,T]of [["invalid",n],["disabled",a],["readOnly",i]])if(typeof T!="boolean")throw new TypeError(`BaseInput ${C} must be a boolean.`);if(s!==void 0&&s!=="sm"&&s!=="md"&&s!=="lg")throw new TypeError('BaseInput controlSize must be "sm", "md", or "lg".');let y=Oe(u),x=Ne(),w=De(y),h=Ko(),k=n||h.invalid;return jsxRuntime.jsxs("div",{...x,"data-monkeys-component":"input","data-slot":"root","data-size":s,"data-invalid":k||void 0,"data-disabled":a||void 0,"data-readonly":i||void 0,className:l(w.slots.controlWrapper,k&&w.slots.controlInvalid,a&&w.slots.controlDisabled,i&&w.slots.controlReadOnly,d?.root,c),style:{...w.styles.control,...k?w.styles.controlInvalid:void 0,...a?w.styles.controlDisabled:void 0,...g},children:[O(t)?jsxRuntime.jsx("span",{"data-slot":"icon",className:l(w.slots.controlIcon,d?.icon),children:t}):null,jsxRuntime.jsx("input",{...b,ref:v,disabled:a,readOnly:i,"aria-invalid":m??(k||void 0),"data-slot":"control","data-size":s,"data-invalid":k||void 0,"data-disabled":a||void 0,"data-readonly":i||void 0,className:l(w.slots.controlBase,w.slots.controlInput,s&&Ib[s],d?.control),onBlur:C=>{p?.(C),h.notifyBlur(C.currentTarget.value);},onChange:C=>{f?.(C),h.notifyChange(C.currentTarget.value);}}),O(o)?jsxRuntime.jsx("span",{"data-slot":"trailing",className:l(w.slots.controlTrailing,d?.trailing),children:o}):null]})},"BaseInput"));var Pb={line:"h-4 w-full",block:"h-24 w-full",circle:"aspect-square h-10 rounded-full"},Wt=lt.forwardRef(r(function({variant:t="line",animated:o=true,animation:n,appearance:a,className:i,classNames:s,style:u,...c},d){if(t!=="line"&&t!=="block"&&t!=="circle")throw new TypeError('BaseSkeleton variant must be "line", "block", or "circle".');if(typeof o!="boolean")throw new TypeError("BaseSkeleton animated must be a boolean.");let g=Oe(a),m=Ne(),p=De(g),f=Fd(n,o,d);return jsxRuntime.jsx("div",{...m,...c,ref:f.ref,"aria-hidden":"true","data-monkeys-component":"skeleton","data-slot":"root","data-variant":t,"data-animated":f.mode!=="none","data-state":f.mode!=="none"?"animated":"static","data-skeleton-animation":f.mode,className:l(p.slots.skeletonRoot,Pb[t],f.mode==="pulse"&&"motion-safe:animate-pulse motion-reduce:animate-none",s?.root,i),style:{...p.styles.skeleton,...f.style,...u}})},"BaseSkeleton"));function Wb({className:e}){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:e,fill:"none",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"9",className:"opacity-25",stroke:"currentColor",strokeWidth:"3"}),jsxRuntime.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M12 3a9 9 0 0 1 9 9h-3a6 6 0 0 0-6-6V3Z"})]})}r(Wb,"DefaultLoadingIcon");var Yo=lt.forwardRef(r(function({icon:t,title:o,description:n,actions:a,variant:i,animation:s,appearance:u,className:c,classNames:d,style:g,role:m="status","aria-live":p="polite","aria-busy":f=true,"aria-label":b,"aria-labelledby":v,...y},x){let w=Oe(u),h=Ne(),{loading:k}=vt(),C=Ro(),T=i??C.loading?.variant??"spinner",S=C.density==="compact"?"min-h-0 px-3 py-3":C.density==="comfortable"?"min-h-56 px-8 py-12":void 0,I=De(w),R=T==="skeleton"&&t===void 0?void 0:t===void 0?jsxRuntime.jsx(Wb,{className:l("motion-safe:animate-spin motion-reduce:animate-none",I.slots.loadingSpinner)}):t,W=b??(v===void 0?typeof o=="string"?o:k.spinner:void 0);return jsxRuntime.jsxs("div",{...h,...y,ref:x,role:m,"aria-live":p,"aria-busy":f,"aria-label":W,"aria-labelledby":v,"data-monkeys-component":"loading-state","data-slot":"root","data-state":"loading","data-variant":T,"data-density":C.density,className:l(I.slots.stateRoot,S,d?.root,c),style:{...I.styles.stateRoot,...g},children:[T==="skeleton"?jsxRuntime.jsx(jo,{animation:s,children:jsxRuntime.jsxs("div",{className:"flex w-full max-w-sm flex-col gap-3","data-slot":"skeleton",children:[jsxRuntime.jsx(Wt,{variant:"block",className:"h-20"}),jsxRuntime.jsx(Wt,{variant:"line",className:"w-4/5"}),jsxRuntime.jsx(Wt,{variant:"line",className:"w-3/5"})]})}):O(R)?jsxRuntime.jsx("div",{"data-slot":"icon","data-state":"loading",className:l(I.slots.stateIcon,d?.icon),style:I.styles.stateIcon,children:R}):null,T!=="skeleton"&&O(o)?jsxRuntime.jsx("div",{"data-slot":"title","data-state":"loading",className:l(I.slots.stateTitle,d?.title),children:o}):null,T!=="skeleton"&&O(n)?jsxRuntime.jsx("div",{"data-slot":"description","data-state":"loading",className:l(I.slots.stateDescription,d?.description),children:n}):null,O(a)?jsxRuntime.jsx("div",{"data-slot":"actions","data-state":"loading",className:l(I.slots.stateActions,d?.actions),children:a}):null]})},"BaseLoadingState"));var $b=500;function jb({options:e,value:t,defaultValue:o,invalid:n,disabled:a,openForPreview:i,portal:s,required:u}){for(let[c,d]of [["invalid",n],["disabled",a],["openForPreview",i],["portal",s]])if(typeof d!="boolean")throw new TypeError(`BaseSelect ${c} must be a boolean.`);if(u!==void 0&&typeof u!="boolean")throw new TypeError("BaseSelect required must be a boolean.");if(e!==void 0&&!Array.isArray(e))throw new TypeError("BaseSelect options must be an array.");if(e?.forEach((c,d)=>{if(!c||typeof c!="object")throw new TypeError(`BaseSelect option at index ${d} must be an object.`);if(typeof c.value!="string")throw new TypeError(`BaseSelect option value at index ${d} must be a string.`);if(c.disabled!==void 0&&typeof c.disabled!="boolean")throw new TypeError(`BaseSelect option disabled at index ${d} must be a boolean.`);if(c.textValue!==void 0&&typeof c.textValue!="string")throw new TypeError(`BaseSelect option textValue at index ${d} must be a string.`)}),e?.length){if(t!==void 0&&typeof t!="string"&&typeof t!="number")throw new TypeError("BaseSelect value must be a string or number when options are used.");if(o!==void 0&&typeof o!="string"&&typeof o!="number")throw new TypeError("BaseSelect defaultValue must be a string or number when options are used.")}}r(jb,"validateSelectProps");function Ts(e){return typeof e=="string"||typeof e=="number"?String(e):""}r(Ts,"normalizeValue");function Kb(e,t){if(t!==void 0)return e.find(o=>o.value===t)}r(Kb,"findOption");function wr(e,t){let o=e.findIndex(n=>n.value===t&&!n.disabled);return o>=0?o:e.findIndex(n=>!n.disabled)}r(wr,"getInitialActiveIndex");function Ub(e,t,o){if(!e.length)return -1;let n=t>=0?t:o===1?-1:0;for(let a=1;a<=e.length;a+=1){let i=(n+a*o+e.length)%e.length;if(!e[i]?.disabled)return i}return -1}r(Ub,"getNextEnabledIndex");function qb(e,t){if(t==="first")return e.findIndex(o=>!o.disabled);for(let o=e.length-1;o>=0;o-=1)if(!e[o]?.disabled)return o;return -1}r(qb,"getBoundaryEnabledIndex");function sc(e){return e.textValue!==void 0?e.textValue:typeof e.label=="string"?e.label:e.value}r(sc,"getOptionText");function Yb(e){return e.replace(/[^a-zA-Z0-9_-]/g,"-")}r(Yb,"toDomId");var po=lt.forwardRef(r(function({options:t,placeholder:o,icon:n,invalid:a=false,disabled:i=false,openForPreview:s=false,portal:u=false,appearance:c,className:d,classNames:g,style:m,children:p,value:f,defaultValue:b,onBlur:v,onChange:y,onFocus:x,onInvalid:w,name:h,id:k,required:C,"aria-invalid":T,"aria-label":S,"aria-labelledby":I,"aria-describedby":R,"aria-errormessage":W,"aria-required":H,...L},F){jb({options:t,value:f,defaultValue:b,invalid:a,disabled:i,openForPreview:s,portal:u,required:C});let $=Oe(c),M=Ne(),G=De($),Y=Ko(),N=a||Y.invalid,D=lt.useId(),B=k??D,K=`${B}-button`,J=`${B}-listbox`,V=lt.useRef(null),Q=lt.useRef(null),j=lt.useRef(null),Z=lt.useRef([]),te=lt.useRef(false),ae=lt.useRef(""),le=lt.useRef(null),A=t??[],me=A.length>0,P=s,[_,re]=lt.useState(false),[fe,ye]=lt.useState(false),xe=P||_,oe=Mo({disabled:P||!u?true:void 0}),{refs:se,floatingStyles:Re,isPositioned:Ie,placement:ze}=react.useFloating({transform:false,open:me&&xe&&oe.shouldPortal,placement:"bottom-start",strategy:"fixed",whileElementsMounted:oe.shouldPortal?react.autoUpdate:void 0,middleware:[react.offset(6),react.flip({padding:8}),react.shift({padding:8}),react.size({padding:8,apply({rects:pe,availableHeight:Ge,elements:ee}){Object.assign(ee.floating.style,{width:`${pe.reference.width}px`,maxHeight:`min(15rem, ${Math.max(0,Ge)}px)`});}})]}),ce=lt.useCallback(pe=>{Q.current=pe,se.setReference(pe);},[se.setReference]),[U,z]=lt.useState(()=>Ts(b)),X=f!==void 0,ie=X?Ts(f):U,q=Kb(A,ie),[de,we]=lt.useState(()=>wr(A,ie)),Ce=de>=0&&!A[de]?.disabled?de:wr(A,ie),Me=A.map((pe,Ge)=>`${B}-option-${Ge}-${Yb(pe.value)}`),Be=q?.label??o,_e=!q,Ze=L.dir??M.dir,Fe=i?"disabled":N?"invalid":xe?"open":"closed",ot=r(pe=>{j.current=pe,typeof F=="function"?F(pe):F&&(F.current=pe);},"setSelectRef"),We=r(pe=>{v?.(pe),Y.notifyBlur(pe.currentTarget.value);},"handleNativeBlur"),Le=r(pe=>{y?.(pe),Y.notifyChange(pe.currentTarget.value);},"handleNativeChange"),ne=r(()=>{we(wr(A,ie));},"resetActiveIndex"),Se=r(()=>{ne(),P||re(false);},"cancelAndClose"),Ve=r((pe,Ge=false)=>{ye(Ge),we(pe??wr(A,ie)),P||re(true);},"openMenu"),Ye=r(pe=>{let Ge=j.current;if(!Ge)return;let ee=Ge.ownerDocument.defaultView;if(!ee)throw new Error("BaseSelect cannot dispatch change without an owning window.");let ue=Object.getOwnPropertyDescriptor(ee.HTMLSelectElement.prototype,"value")?.set;if(!ue)throw new Error("BaseSelect could not resolve the native select value setter.");ue.call(Ge,pe),Ge.dispatchEvent(new ee.Event("change",{bubbles:true}));},"notifyChange"),nt=r(pe=>{let Ge=A[pe];!Ge||Ge.disabled||i||(we(pe),Ge.value!==ie&&(X||z(Ge.value),Ye(Ge.value)),P||re(false));},"commitIndex"),gt=r(pe=>{pe<0||A[pe]?.disabled||(we(pe),xe||Ve(pe));},"moveActive"),Pt=r((pe,Ge)=>{let ee=pe.currentTarget.ownerDocument.defaultView;if(!ee)return;let ue=`${ae.current}${Ge}`.toLocaleLowerCase();ae.current=ue,le.current&&le.current.ownerWindow.clearTimeout(le.current.timerId),le.current={ownerWindow:ee,timerId:ee.setTimeout(()=>{ae.current="",le.current=null;},$b)};let he=Array.from(ue).every(Ee=>Ee===ue[0])?Ge.toLocaleLowerCase():ue,ke=xe?Ce:A.findIndex(Ee=>Ee.value===ie&&!Ee.disabled);for(let Ee=1;Ee<=A.length;Ee+=1){let ge=(ke+Ee+A.length)%A.length,He=A[ge];if(!He?.disabled&&sc(He).trim().toLocaleLowerCase().startsWith(he)){pe.preventDefault(),gt(ge);return}}},"handleTypeahead"),Ue=r(pe=>{if(!(i||te.current||pe.nativeEvent.isComposing)){if(pe.key==="ArrowDown"||pe.key==="ArrowUp"){pe.preventDefault();let Ge=A.findIndex(ue=>ue.value===ie&&!ue.disabled);gt(Ub(A,xe?Ce:Ge,pe.key==="ArrowDown"?1:-1));return}if(pe.key==="Home"||pe.key==="End"){pe.preventDefault(),gt(qb(A,pe.key==="Home"?"first":"last"));return}if(pe.key==="Enter"||pe.key===" "){pe.preventDefault(),xe?nt(Ce):Ve();return}if(pe.key==="Escape"&&xe){pe.preventDefault(),Se();return}if(pe.key==="Tab"&&xe){nt(Ce);return}pe.key.length===1&&!pe.ctrlKey&&!pe.metaKey&&!pe.altKey&&!/\s/.test(pe.key)&&Pt(pe,pe.key);}},"handleKeyDown"),Ut=r(pe=>{x?.(pe),pe.defaultPrevented||Q.current?.focus();},"handleCustomFocus"),Ft=r(pe=>{w?.(pe),pe.preventDefault(),Q.current?.focus();},"handleCustomInvalid");return lt.useEffect(()=>{if(!me||!xe||P)return;let pe=V.current?.ownerDocument;if(!pe)return;let Ge=r(ee=>{!V.current?.contains(ee.target)&&!se.floating.current?.contains(ee.target)&&Se();},"handlePointerDown");return pe.addEventListener("pointerdown",Ge),()=>{pe.removeEventListener("pointerdown",Ge);}},[P,me,xe,A,ie]),lt.useEffect(()=>{!me||!xe||Ce<0||Z.current[Ce]?.scrollIntoView?.({block:"nearest"});},[me,xe,Ce]),lt.useEffect(()=>{if(!me||X)return;let pe=j.current,Ge=pe?.form,ee=pe?.ownerDocument.defaultView;if(!Ge||!ee)return;let ue=r(()=>{ee.setTimeout(()=>{let Pe=Ts(b);z(Pe),we(wr(A,Pe)),P||re(false);},0);},"handleReset");return Ge.addEventListener("reset",ue),()=>Ge.removeEventListener("reset",ue)},[b,P,X,me,A]),lt.useEffect(()=>()=>{le.current&&le.current.ownerWindow.clearTimeout(le.current.timerId);},[]),me?jsxRuntime.jsxs("div",{...M,ref:V,dir:Ze,"data-monkeys-component":"select","data-slot":"root","data-state":Fe,"data-native":"false",className:l(G.slots.controlWrapper,"overflow-visible",xe&&"z-50",N&&G.slots.controlInvalid,i&&G.slots.controlDisabled,g?.root,d),style:{...G.styles.control,...N?G.styles.controlInvalid:void 0,...i?G.styles.controlDisabled:void 0,...m},children:[O(n)?jsxRuntime.jsx("span",{className:l(G.slots.controlIcon,g?.icon),children:n}):null,jsxRuntime.jsx("button",{...M,ref:ce,type:"button",id:K,role:"combobox",disabled:i,dir:Ze,"aria-haspopup":"listbox","aria-expanded":xe,"aria-controls":J,"aria-activedescendant":xe&&Ce>=0?Me[Ce]:void 0,"aria-autocomplete":"none","aria-invalid":T??(N||void 0),"aria-label":S,"aria-labelledby":I,"aria-describedby":R,"aria-errormessage":W,"aria-required":H??(C||void 0),"data-monkeys-component":"select","data-slot":"trigger","data-state":Fe,className:l(G.slots.controlBase,G.slots.controlSelect,"flex items-center text-left",g?.control),onClick:pe=>{xe?Se():Ve(void 0,pe.detail>0);},onBlur:pe=>{!V.current?.contains(pe.relatedTarget)&&!se.floating.current?.contains(pe.relatedTarget)&&(Se(),Y.notifyBlur(ie));},onCompositionStart:()=>{te.current=true;},onCompositionEnd:()=>{te.current=false;},onKeyDown:Ue,children:jsxRuntime.jsx("span",{className:l("min-w-0 flex-1 truncate",_e&&G.slots.selectPlaceholder,_e&&g?.placeholder),children:Be})}),jsxRuntime.jsx("span",{className:l(G.slots.selectChevron,xe&&"rotate-[225deg]")}),jsxRuntime.jsxs("select",{...M,...L,ref:ot,id:k,name:h,value:ie,required:C,disabled:i,dir:Ze,"aria-hidden":"true",tabIndex:-1,"data-monkeys-component":"select","data-slot":"native","data-state":Fe,"data-native":"false",className:G.slots.selectNative,onBlur:v,onFocus:Ut,onInvalid:Ft,onChange:Le,children:[O(o)?jsxRuntime.jsx("option",{value:"",disabled:true,children:o}):null,A.map(pe=>jsxRuntime.jsx("option",{value:pe.value,disabled:pe.disabled,children:sc(pe)},pe.value))]}),xe?$d(jsxRuntime.jsx("div",{...M,ref:oe.shouldPortal?se.setFloating:void 0,id:J,role:"listbox",dir:Ze,"aria-labelledby":K,"data-monkeys-component":"select","data-slot":"menu","data-portal":oe.shouldPortal?"portaled":"inline","data-state":"open","data-side":oe.shouldPortal?ze.split("-")[0]:"bottom",className:l(G.slots.selectMenu,oe.shouldPortal&&ze.startsWith("top")?"origin-bottom":"origin-top",fe&&!P&&(!oe.shouldPortal||Ie)&&"motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95 motion-safe:duration-150 motion-safe:ease-out",g?.menu),style:{...G.styles.selectMenu,...oe.shouldPortal?{...Re,right:"auto",visibility:Ie?"visible":"hidden"}:void 0},children:A.map((pe,Ge)=>{let ee=pe.value===ie,ue=Ge===Ce,Pe=pe.disabled?"disabled":ue?"active":ee?"selected":"idle";return lt.createElement("button",{...M,ref:he=>{Z.current[Ge]=he;},key:pe.value,id:Me[Ge],type:"button",role:"option",tabIndex:-1,disabled:pe.disabled,dir:Ze,"aria-selected":ee,"data-monkeys-component":"select","data-slot":"option","data-state":Pe,"data-active":ue||void 0,"data-selected":ee||void 0,"data-disabled":pe.disabled||void 0,className:l(G.slots.selectOption,ue&&G.slots.selectOptionActive,ee&&G.slots.selectOptionSelected,pe.disabled&&G.slots.selectOptionDisabled,g?.option),style:{...G.styles.selectOption,...ue?G.styles.selectOptionActive:void 0,...ee?G.styles.selectOptionSelected:void 0},onMouseDown:he=>he.preventDefault(),onClick:()=>nt(Ge)},jsxRuntime.jsx("span",{className:"min-w-0 flex-1 truncate",children:pe.label}))})}),oe):null]}):jsxRuntime.jsxs("div",{...M,"data-monkeys-component":"select","data-slot":"root","data-state":Fe,"data-native":"true",className:l(G.slots.controlWrapper,N&&G.slots.controlInvalid,i&&G.slots.controlDisabled,g?.root,d),style:{...G.styles.control,...N?G.styles.controlInvalid:void 0,...i?G.styles.controlDisabled:void 0,...m},children:[O(n)?jsxRuntime.jsx("span",{className:l(G.slots.controlIcon,g?.icon),children:n}):null,jsxRuntime.jsxs("select",{...M,...L,id:k,ref:F,name:h,value:f,defaultValue:b,required:C,disabled:i,"aria-invalid":T??(N||void 0),"aria-label":S,"aria-labelledby":I,"aria-describedby":R,"aria-errormessage":W,"aria-required":H,"data-monkeys-component":"select","data-slot":"native","data-state":Fe,"data-native":"true",onBlur:We,onFocus:x,onInvalid:w,onChange:Le,className:l(G.slots.controlBase,G.slots.controlSelect,g?.control),children:[O(o)?jsxRuntime.jsx("option",{value:"",disabled:true,children:o}):null,p]}),jsxRuntime.jsx("span",{className:G.slots.selectChevron})]})},"BaseSelect"));function Zb(e,t){return t&&e?.some(o=>o.value===t)&&!e.find(n=>n.value===t)?.disabled?t:e?.find(o=>!o.disabled)?.value??e?.[0]?.value}r(Zb,"getInitialSegmentValue");function yn({options:e=[],value:t,defaultValue:o,appearance:n,className:a,classNames:i,style:s,onValueChange:u,...c}){let d=De(n),[g,m]=lt.useState(()=>Zb(e,o)),p=t!==void 0,f=p?t:g,b=r((y,x)=>{x||(p||m(y),u?.(y));},"handleSelect"),v=r(y=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(y.key))return;let x=e.filter(S=>!S.disabled);if(x.length===0)return;y.preventDefault();let w=Math.max(0,x.findIndex(S=>S.value===f)),h=y.key==="Home"?0:y.key==="End"?x.length-1:y.key==="ArrowLeft"||y.key==="ArrowUp"?(w-1+x.length)%x.length:(w+1)%x.length,k=x[h],C=y.currentTarget.querySelectorAll('[role="radio"]'),T=Array.from(C).find(S=>S.dataset.value===k.value);b(k.value),T?.focus();},"handleKeyDown");return jsxRuntime.jsx("div",{...c,role:"radiogroup","aria-orientation":"horizontal",className:l(d.slots.segmentedRoot,i?.root,a),style:{...d.styles.segmentedRoot,...s},onKeyDown:v,children:e.map(y=>{let x=y.value===f;return jsxRuntime.jsxs("button",{type:"button",role:"radio","data-value":y.value,"aria-checked":x,tabIndex:x?0:-1,disabled:y.disabled,className:l(d.slots.segmentedItem,x&&d.slots.segmentedItemActive,y.disabled&&d.slots.segmentedItemDisabled,i?.item),style:d.styles.segmentedItem,onClick:()=>b(y.value,y.disabled),children:[O(y.icon)?jsxRuntime.jsx("span",{className:l("inline-flex h-4 w-4 shrink-0",i?.icon),children:y.icon}):null,jsxRuntime.jsx("span",{className:l("min-w-0 truncate",i?.label),children:y.label})]},y.value)})})}r(yn,"BaseSegmentedControl");function tf({kind:e}){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-7 w-7",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",children:{error:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"9"}),jsxRuntime.jsx("path",{d:"M12 7v6"}),jsxRuntime.jsx("path",{d:"M12 17h.01"})]}),permission:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2"}),jsxRuntime.jsx("path",{d:"M8 10V7a4 4 0 0 1 8 0v3"})]}),offline:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M5 12.5a10 10 0 0 1 14 0"}),jsxRuntime.jsx("path",{d:"M8.5 16a5 5 0 0 1 7 0"}),jsxRuntime.jsx("path",{d:"M12 20h.01"}),jsxRuntime.jsx("path",{d:"m4 4 16 16"})]}),fallback:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"9"}),jsxRuntime.jsx("path",{d:"M9.5 9a2.5 2.5 0 1 1 4.2 1.8c-1 .8-1.7 1.2-1.7 2.7"}),jsxRuntime.jsx("path",{d:"M12 17h.01"})]})}[e]})}r(tf,"SystemStateIcon");var Sr=lt.forwardRef(r(function({kind:t="fallback",icon:o,title:n,description:a,actions:i,appearance:s,className:u,classNames:c,style:d,role:g,"aria-live":m,...p},f){let b=Oe(s),v=Ne(),y=Ro(),x=y.density==="compact"?"min-h-0 px-3 py-3":y.density==="comfortable"?"min-h-56 px-8 py-12":void 0,w=De(b),h=o===void 0?jsxRuntime.jsx(tf,{kind:t}):o,k=g??(t==="error"||t==="offline"?"alert":"status");return jsxRuntime.jsxs("div",{...v,...p,ref:f,role:k,"aria-live":m??(k==="alert"?"assertive":"polite"),"data-monkeys-component":"system-state","data-slot":"root","data-state":t,"data-density":y.density,className:l(w.slots.stateRoot,x,c?.root,u),style:{...w.styles.stateRoot,...d},children:[O(h)?jsxRuntime.jsx("div",{"data-slot":"icon","data-state":t,className:l(w.slots.stateIcon,c?.icon),style:w.styles.stateIcon,children:h}):null,O(n)?jsxRuntime.jsx("div",{"data-slot":"title","data-state":t,className:l(w.slots.stateTitle,c?.title),children:n}):null,O(a)?jsxRuntime.jsx("div",{"data-slot":"description","data-state":t,className:l(w.slots.stateDescription,c?.description),children:a}):null,O(i)?jsxRuntime.jsx("div",{"data-slot":"actions","data-state":t,className:l(w.slots.stateActions,c?.actions),children:i}):null]})},"BaseSystemState"));var Ns="application/x-monkeys-base-table-column",Oa=8;function Ds(e,t){typeof e=="function"?e(t):e&&(e.current=t);}r(Ds,"assignRef");function Do(e,t){if(t!==void 0&&typeof t!="boolean")throw new Error(`BaseTable ${e} must be a boolean.`)}r(Do,"assertBoolean");function An(e,t,o){if(t!==void 0&&!o.includes(t))throw new Error(`BaseTable ${e} must be one of ${o.map(n=>`"${n}"`).join(", ")}.`)}r(An,"assertEnum");function Is(e,t){if(t!==void 0&&(typeof t!="string"||t.trim().length===0))throw new Error(`BaseTable ${e} must be a non-empty string when provided.`)}r(Is,"assertOptionalLabel");function Es(e,t){if(t!==void 0&&typeof t!="function")throw new Error(`BaseTable ${e} must be a function when provided.`)}r(Es,"assertOptionalFunction");function Xo(e,t,o={}){if(e!==void 0){if(typeof e=="number"){if(!Number.isFinite(e)||e<0)throw new Error(`BaseTable ${t} must be a finite non-negative number${o.stringAllowed?" or a non-empty CSS size string":""}.`);return}if(!(o.stringAllowed&&typeof e=="string"&&e.trim().length>0))throw new Error(`BaseTable ${t} must be ${o.stringAllowed?"a finite non-negative number or a non-empty CSS size string":"a finite non-negative number"}.`)}}r(Xo,"validateCssSizeValue");function sf(e){if(e===void 0)return;if(!Array.isArray(e))throw new Error("BaseTable columns must be an array when provided.");let t=new Set;return e.forEach((o,n)=>{if(!o||typeof o!="object"||Array.isArray(o))throw new Error(`BaseTable column at index ${n} must be an object.`);let a=o;if(typeof a.id!="string"||a.id.trim().length===0)throw new Error(`BaseTable column id at index ${n} must be a non-empty string.`);let i=a.id.trim();if(a.id!==i)throw new Error(`BaseTable column id "${a.id}" must not contain surrounding whitespace.`);if(t.has(i))throw new Error(`BaseTable columns contain duplicate id "${i}".`);if(t.add(i),Xo(a.width,`column "${i}" width`,{stringAllowed:true}),Xo(a.minWidth,`column "${i}" minWidth`,{stringAllowed:true}),Xo(a.maxWidth,`column "${i}" maxWidth`,{stringAllowed:true}),typeof a.minWidth=="number"&&typeof a.maxWidth=="number"&&a.minWidth>a.maxWidth)throw new Error(`BaseTable column "${i}" minWidth cannot be greater than maxWidth.`)}),t}r(sf,"validateColumns");function lf(e,t){if(e===void 0)return;if(!Array.isArray(e))throw new Error("BaseTable columnOrder must be an array when provided.");let o=new Set;if(e.forEach((n,a)=>{if(typeof n!="string"||n.trim().length===0)throw new Error(`BaseTable columnOrder entry at index ${a} must be a non-empty string.`);let i=n.trim();if(n!==i)throw new Error(`BaseTable columnOrder entry "${n}" must not contain surrounding whitespace.`);if(o.has(i))throw new Error(`BaseTable columnOrder contains duplicate id "${i}".`);if(t&&!t.has(i))throw new Error(`BaseTable columnOrder contains unknown column id "${i}".`);o.add(i);}),t&&o.size!==t.size){let n=[...t].filter(a=>!o.has(a));throw new Error(`BaseTable columnOrder must contain every configured column id; missing ${n.map(a=>`"${a}"`).join(", ")}.`)}}r(lf,"validateColumnOrder");function df(e,t){if(e!==void 0){if(!e||typeof e!="object"||Array.isArray(e)||![Object.prototype,null].includes(Object.getPrototypeOf(e)))throw new Error("BaseTable columnSizes must be a plain record when provided.");Object.entries(e).forEach(([o,n])=>{let a=o.trim();if(a.length===0)throw new Error("BaseTable columnSizes keys must be non-empty strings.");if(o!==a)throw new Error(`BaseTable columnSizes key "${o}" must not contain surrounding whitespace.`);if(t&&!t.has(a))throw new Error(`BaseTable columnSizes contains unknown column id "${o}".`);Xo(n,`columnSizes["${o}"]`);});}}r(df,"validateColumnSizes");function Fa(e){let t=e.ownerDocument.defaultView;return t?t.getComputedStyle(e).direction==="rtl":e.closest('[dir="rtl"]')!==null}r(Fa,"isRtl");function cf(e,t){if(e.setPointerCapture)try{e.setPointerCapture(t);}catch(o){let n=e.ownerDocument.defaultView?.DOMException;if(n&&o instanceof n&&o.name==="NotFoundError")return;throw o}}r(cf,"setPointerCaptureIfAvailable");var uc=lt.createContext(null);function Zo(e){let t=lt.useContext(uc),o=Oe(e);if(t){let a=e===void 0?t.appearance:o;return {...t,theme:e===void 0?t.theme:De(a),appearance:a}}let n=De(o);return {appearance:o,theme:n,layout:"native",setDraggingColumnId:r(()=>{},"setDraggingColumnId")}}r(Zo,"useBaseTableContext");function mc(e){let t=false;return lt.Children.forEach(e,o=>{if(t||!lt.isValidElement(o))return;let n=o.props;if(n.layout==="split-scroll"){t=true;return}n.children&&(t=mc(n.children));}),t}r(mc,"hasSplitScrollTable");function Ms(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r(Ms,"toCssSize");function uf(e,t){if(e!==void 0){if(typeof e=="number"){if(!Number.isFinite(e)||e<0)throw new Error(`BaseTable ${t} must be a finite non-negative number when numeric.`);return `${e}px`}if(e.trim().length===0)throw new Error(`BaseTable ${t} must not be an empty CSS size.`);return e}}r(uf,"validateTableCssSize");function Bs(e,t,o){if(e!==void 0){if(typeof e=="number"){if(!Number.isFinite(e)||e<0)throw new Error(`BaseTable split-scroll column "${t}" has invalid ${o}. Expected a finite non-negative number.`);return `${e}px`}if(e.trim().length===0)throw new Error(`BaseTable split-scroll column "${t}" has an empty ${o} value.`);return e}}r(Bs,"validateCssSize");function dc(e,t,o){if(!(e===void 0||typeof e!="number")){if(!Number.isFinite(e)||e<0)throw new Error(`BaseTable split-scroll column "${t}" has invalid ${o}. Expected a finite non-negative number.`);return e}}r(dc,"validateNumericSize");function mf(e,t){if(!e?.length)throw new Error('BaseTable layout="split-scroll" requires at least one column definition.');let o=new Set;return `${e.map((a,i)=>{let s=a.id.trim();if(!s)throw new Error(`BaseTable split-scroll column at index ${i} requires a non-empty id.`);if(o.has(s))throw new Error(`BaseTable layout="split-scroll" received duplicate column id "${s}".`);o.add(s);let u=t?.[s],c=dc(a.minWidth,s,"minWidth"),d=dc(a.maxWidth,s,"maxWidth");if(c!==void 0&&d!==void 0&&d<c)throw new Error(`BaseTable split-scroll column "${s}" has maxWidth smaller than minWidth.`);let g=Bs(a.minWidth,s,"minWidth"),m=Bs(a.maxWidth,s,"maxWidth"),p=u!==void 0?Jo(u,c,d):a.width,f=Bs(p,s,"width");return f||`minmax(${g??"0px"}, ${m??"1fr"})`}).join(" ")} var(--base-table-split-scrollbar-gutter)`}r(mf,"buildSplitColumnTemplate");function Jo(e,t,o){let n=t??48,a=o??Number.POSITIVE_INFINITY;return Math.min(Math.max(e,n),a)}r(Jo,"clampWidth");function Ps(e,t,o){if(!e||t===o)return;let n=e.indexOf(t),a=e.indexOf(o);if(n<0||a<0)return;let i=[...e],[s]=i.splice(n,1);return i.splice(a,0,s),i}r(Ps,"getNextColumnOrder");function pf(e){switch(e){case "asc":return "ascending";case "desc":return "descending";default:return}}r(pf,"sortAriaValue");function gf(e){switch(e){case "center":return "center";case "right":return "flex-end";default:return "flex-start"}}r(gf,"getSplitHeadJustifyContent");function bf(e){switch(e){case "top":return "flex-start";case "bottom":return "flex-end";default:return "center"}}r(bf,"getSplitHeadAlignItems");function ff({direction:e,className:t}){return jsxRuntime.jsx("span",{"aria-hidden":"true",className:l(t,e==="desc"&&"rotate-180",(!e||e==="none")&&"opacity-45"),children:"\u25B2"})}r(ff,"SortIndicator");function yf(){return jsxRuntime.jsxs("span",{"aria-hidden":"true",className:"grid gap-0.5",children:[jsxRuntime.jsx("span",{className:"h-0.5 w-0.5 rounded-full bg-current"}),jsxRuntime.jsx("span",{className:"h-0.5 w-0.5 rounded-full bg-current"}),jsxRuntime.jsx("span",{className:"h-0.5 w-0.5 rounded-full bg-current"})]})}r(yf,"DragHandleIcon");var Va=lt.forwardRef(r(function({appearance:t,attachedFooter:o=false,children:n,className:a,classNames:i,style:s,...u},c){Do("attachedFooter",o);let d=Oe(t),g=Ne(),m=De(d),f=mc(n)?{overflow:"hidden",scrollbarGutter:"auto"}:void 0;return jsxRuntime.jsx("div",{...g,...u,ref:c,"data-monkeys-component":"table-container","data-slot":"container","data-base-table-container":"","data-attached-footer":o?"":void 0,className:l(m.slots.tableContainer,o&&m.slots.tableContainerFooterAttached,i?.root,a),style:{...m.styles.tableContainer,...o?m.styles.tableContainerFooterAttached:void 0,...f,...s},children:n})},"BaseTableContainer")),Ga=lt.forwardRef(r(function({appearance:t,className:o,classNames:n,style:a,layout:i="native",columns:s,bodyMaxHeight:u,bodyClassName:c,columnOrder:d,columnSizes:g,columnDragEnabled:m=false,columnResizeEnabled:p=false,onColumnOrderChange:f,onColumnSizeChange:b,...v},y){An("layout",i,["native","split-scroll"]),Do("columnDragEnabled",m),Do("columnResizeEnabled",p),Es("onColumnOrderChange",f),Es("onColumnSizeChange",b),Xo(u,"bodyMaxHeight",{stringAllowed:true});let x=sf(s);lf(d,x),df(g,x);let w=Oe(t),h=Ne(),k=De(w),[C,T]=lt.useState(),S=lt.useRef(null),I=lt.useRef(null),R=i==="split-scroll",W=R?mf(s,g):void 0,H={appearance:w,theme:k,layout:i,columnTemplate:W,bodyMaxHeight:u,bodyClassName:c,splitHeaderRef:S,splitFooterRef:I,columnOrder:d,columnSizes:g,columnDragEnabled:m,columnResizeEnabled:p,onColumnOrderChange:f,onColumnSizeChange:b,draggingColumnId:C,setDraggingColumnId:T};return jsxRuntime.jsx(uc.Provider,{value:H,children:jsxRuntime.jsx("table",{...h,...v,ref:y,"data-monkeys-component":"table","data-slot":"root","data-base-table-layout":i,className:l(k.slots.tableRoot,R&&k.slots.tableSplitRoot,n?.root,o),style:{...k.styles.table,...R?k.styles.tableSplitRoot:void 0,...W?{"--base-table-column-template":W}:void 0,...a}})})},"BaseTable")),_a=lt.forwardRef(r(function({appearance:t,className:o,classNames:n,style:a,...i},s){let{layout:u,splitHeaderRef:c,theme:d}=Zo(t),g=u==="split-scroll";return jsxRuntime.jsx("thead",{...i,ref:r(p=>{c&&(c.current=g?p:null),Ds(s,p);},"setHeaderRef"),"data-slot":"header",className:l(d.slots.tableHeader,g&&d.slots.tableSplitHeader,n?.root,o),style:{...d.styles.tableHeader,...g?d.styles.tableSplitHeader:void 0,...a}})},"BaseTableHeader")),$a=lt.forwardRef(r(function({appearance:t,className:o,classNames:n,onScroll:a,style:i,...s},u){let{bodyClassName:c,bodyMaxHeight:d,layout:g,splitFooterRef:m,splitHeaderRef:p,theme:f}=Zo(t),b=g==="split-scroll";return jsxRuntime.jsx("tbody",{...s,ref:u,"data-slot":"body",onScroll:b?y=>{let x=y.currentTarget.scrollLeft;p?.current&&(p.current.scrollLeft=x),m?.current&&(m.current.scrollLeft=x),a?.(y);}:a,className:l(f.slots.tableBody,b&&f.slots.tableSplitBody,b&&c,n?.root,o),style:{...f.styles.tableBody,...b?f.styles.tableSplitBody:void 0,...b&&d!==void 0?{maxHeight:uf(d,"bodyMaxHeight")}:void 0,...i}})},"BaseTableBody"));lt.forwardRef(r(function({appearance:t,className:o,classNames:n,style:a,...i},s){let{layout:u,splitFooterRef:c,theme:d}=Zo(t),g=u==="split-scroll";return jsxRuntime.jsx("tfoot",{...i,ref:r(p=>{c&&(c.current=g?p:null),Ds(s,p);},"setFooterRef"),"data-slot":"footer",className:l(d.slots.tableFooter,g&&d.slots.tableSplitFooter,n?.root,o),style:{...d.styles.tableFooter,...g?d.styles.tableSplitFooter:void 0,...a}})},"BaseTableFooter"));var hn=lt.forwardRef(r(function({interactive:t,selected:o,disabled:n,appearance:a,className:i,classNames:s,style:u,...c},d){Do("interactive",t),Do("selected",o),Do("disabled",n);let{layout:g,theme:m}=Zo(a),p=g==="split-scroll";return jsxRuntime.jsx("tr",{...c,ref:d,"data-slot":"row","aria-disabled":n||void 0,"data-state":o?"selected":void 0,className:l(m.slots.tableRow,p&&m.slots.tableSplitRow,t&&!n&&m.slots.tableRowInteractive,o&&m.slots.tableRowSelected,n&&m.slots.tableRowDisabled,s?.root,i),style:{...m.styles.tableRow,...p?m.styles.tableSplitRow:void 0,...u}})},"BaseTableRow")),ja=lt.forwardRef(r(function({presentation:t,columnId:o,align:n,verticalAlign:a,icon:i,label:s,description:u,meta:c,actions:d,trailing:g,sortable:m,sortDirection:p="none",sortLabel:f,onSort:b,draggable:v,dragLabel:y,resizable:x,resizeLabel:w,width:h,minWidth:k,maxWidth:C,appearance:T,className:S,classNames:I,style:R,children:W,onDragOver:H,onDrop:L,...F},$){if(An("head presentation",t,["classic-data-grid"]),An("head align",n,["left","center","right"]),An("head verticalAlign",a,["top","middle","bottom"]),An("head sortDirection",p,["asc","desc","none"]),Do("head sortable",m),Do("head draggable",v),Do("head resizable",x),Es("head onSort",b),Is("head sortLabel",f),Is("head dragLabel",y),Is("head resizeLabel",w),o!==void 0&&(typeof o!="string"||o.trim().length===0))throw new Error("BaseTable head columnId must be a non-empty string when provided.");if(Xo(h,"head width",{stringAllowed:true}),Xo(k,"head minWidth"),Xo(C,"head maxWidth"),k!==void 0&&C!==void 0&&k>C)throw new Error("BaseTable head minWidth cannot be greater than maxWidth.");let M=Zo(T),{theme:G}=M,Y=vt().table,N=M.layout==="split-scroll",D=t==="classic-data-grid",B=n??(N?"center":"left"),K=a??"middle",J=lt.useRef(null),V=lt.useRef(()=>{}),[Q,j]=lt.useState(),Z=r(ce=>{J.current=ce,Ds($,ce);},"setHeadRef"),te=o&&M.columnSizes?.[o]!==void 0?M.columnSizes[o]:h,ae=!!(o&&v!==false&&(v||M.columnDragEnabled)&&M.columnOrder&&M.onColumnOrderChange),le=!!(o&&x!==false&&(x||M.columnResizeEnabled)&&M.onColumnSizeChange);if(le&&C!==void 0&&C<(k??48))throw new Error("BaseTable resizable head maxWidth cannot be smaller than its effective minWidth.");let A=!!(m||b),me=pf(p),P=O(s)?s:W,_=O(P)||O(u),re=f??(_?void 0:Y.sortColumn({columnId:o?.trim()||void 0})),fe=ae||O(i)||O(s)||O(u)||O(c)||O(d)||O(g)||A,ye=D?jsxRuntime.jsx("div",{className:l("flex h-full min-w-0 select-none items-center",B==="center"?"justify-center":B==="right"?"justify-end":"justify-start",ae&&"cursor-grab active:cursor-grabbing"),...ae?{draggable:true,role:"button",tabIndex:0,"aria-disabled":false,"aria-roledescription":"sortable",onKeyDown:r(ce=>{if(!o||!M.columnOrder||ce.key!=="ArrowLeft"&&ce.key!=="ArrowRight")return;let U=M.columnOrder.indexOf(o);if(U<0)return;let z=Fa(ce.currentTarget),X=ce.key==="ArrowLeft"?-1:1,ie=U+(z?-X:X),q=M.columnOrder[ie];if(!q)return;let de=Ps(M.columnOrder,o,q);de&&(ce.preventDefault(),M.onColumnOrderChange?.(de,{columnId:o,targetColumnId:q}));},"onKeyDown"),onDragStart:r(ce=>{ce.stopPropagation(),M.setDraggingColumnId(o),ce.dataTransfer.effectAllowed="move",ce.dataTransfer.setData(Ns,o);},"onDragStart"),onDragEnd:r(ce=>{ce.stopPropagation(),M.setDraggingColumnId(void 0);},"onDragEnd")}:{},children:P}):fe?jsxRuntime.jsxs("div",{className:l(G.slots.tableHeadContent,I?.content),children:[jsxRuntime.jsxs("div",{className:l(G.slots.tableHeadMain,I?.main),children:[ae?jsxRuntime.jsx("button",{type:"button",draggable:true,title:y,"aria-label":y??Y.dragColumn({columnId:o}),className:l(G.slots.tableHeadDragHandle,I?.dragHandle),onClick:ce=>ce.stopPropagation(),onKeyDown:ce=>{if(!o||!M.columnOrder||ce.key!=="ArrowLeft"&&ce.key!=="ArrowRight")return;let U=M.columnOrder.indexOf(o);if(U<0)return;let z=Fa(ce.currentTarget),X=ce.key==="ArrowLeft"?-1:1,ie=U+(z?-X:X),q=M.columnOrder[ie];if(!q)return;let de=Ps(M.columnOrder,o,q);de&&(ce.preventDefault(),M.onColumnOrderChange?.(de,{columnId:o,targetColumnId:q}));},onDragStart:ce=>{ce.stopPropagation(),M.setDraggingColumnId(o),ce.dataTransfer.effectAllowed="move",ce.dataTransfer.setData(Ns,o);},onDragEnd:ce=>{ce.stopPropagation(),M.setDraggingColumnId(void 0);},children:jsxRuntime.jsx(yf,{})}):null,i?jsxRuntime.jsx("span",{className:l(G.slots.tableHeadIcon,I?.icon),children:i}):null,A?jsxRuntime.jsxs("button",{type:"button",disabled:!b,title:f,"aria-label":re,className:l(G.slots.tableHeadSortButton,I?.sortButton),onClick:ce=>{ce.stopPropagation(),b?.(o);},children:[jsxRuntime.jsxs("span",{className:l(G.slots.tableHeadText,I?.text),children:[O(P)?jsxRuntime.jsx("span",{className:l(G.slots.tableHeadLabel,I?.label),children:P}):null,O(u)?jsxRuntime.jsx("span",{className:l(G.slots.tableHeadDescription,I?.description),children:u}):null]}),jsxRuntime.jsx(ff,{direction:p,className:l(G.slots.tableHeadSortIcon,I?.sortIcon)})]}):jsxRuntime.jsxs("span",{className:l(G.slots.tableHeadText,I?.text),children:[O(P)?jsxRuntime.jsx("span",{className:l(G.slots.tableHeadLabel,I?.label),children:P}):null,O(u)?jsxRuntime.jsx("span",{className:l(G.slots.tableHeadDescription,I?.description),children:u}):null]})]}),O(c)||O(d)||O(g)?jsxRuntime.jsxs("div",{className:l(G.slots.tableHeadActions,I?.actions),children:[O(c)?jsxRuntime.jsx("span",{className:l(G.slots.tableHeadMeta,I?.meta),children:c}):null,d,g]}):null]}):W,xe=r(ce=>{H?.(ce),!(!ae||!M.draggingColumnId||M.draggingColumnId===o)&&(ce.preventDefault(),ce.dataTransfer.dropEffect="move");},"handleDragOver"),oe=r(ce=>{if(L?.(ce),!ae||!o)return;let U=M.draggingColumnId||ce.dataTransfer.getData(Ns);if(!U||U===o)return;let z=Ps(M.columnOrder,U,o);z&&(ce.preventDefault(),M.onColumnOrderChange?.(z,{columnId:U,targetColumnId:o})),M.setDraggingColumnId(void 0);},"handleDrop"),se=r(ce=>{if(!le||!o||!M.onColumnSizeChange||ce.button!==0&&ce.pointerType!=="touch")return;ce.preventDefault(),ce.stopPropagation(),V.current();let U=ce.clientX,z=Re??J.current?.offsetWidth??k??48,X=Jo(z,k,C),ie=ce.pointerId,q=ce.currentTarget,de=q.ownerDocument,we=Fa(q),Ce=r(_e=>{if(_e.pointerId!==ie)return;let Ze=Jo(X+(we?U-_e.clientX:_e.clientX-U),k,C);M.onColumnSizeChange?.(o,Ze,{columnId:o,previousWidth:X,minWidth:k,maxWidth:C});},"handlePointerMove"),Me=r(_e=>{_e.pointerId===ie&&V.current();},"handleStop"),Be=r(_e=>{_e.pointerId===ie&&V.current();},"handleLostCapture");V.current=()=>{de.removeEventListener("pointermove",Ce),de.removeEventListener("pointerup",Me),de.removeEventListener("pointercancel",Me),q.removeEventListener("lostpointercapture",Be),q.hasPointerCapture?.(ie)&&q.releasePointerCapture?.(ie),V.current=()=>{};},cf(q,ie),de.addEventListener("pointermove",Ce),de.addEventListener("pointerup",Me),de.addEventListener("pointercancel",Me),q.addEventListener("lostpointercapture",Be);},"handleResizePointerDown"),Re=typeof te=="number"?Jo(te,k,C):Q,Ie=Re??Jo(k??48,k,C),ze=r(ce=>{if(!le||!o||!M.onColumnSizeChange)return;let U=Fa(ce.currentTarget),z=Re??Jo(J.current?.offsetWidth||k||48,k,C),X;ce.key==="ArrowLeft"&&(X=z+(U?Oa:-Oa)),ce.key==="ArrowRight"&&(X=z+(U?-Oa:Oa)),ce.key==="Home"&&k!==void 0&&(X=k),ce.key==="End"&&C!==void 0&&(X=C),X!==void 0&&(ce.preventDefault(),ce.stopPropagation(),M.onColumnSizeChange(o,Jo(X,k,C),{columnId:o,previousWidth:z,minWidth:k,maxWidth:C}));},"handleResizeKeyDown");return lt.useEffect(()=>{if(typeof te=="number"){j(void 0);return}let ce=J.current?.getBoundingClientRect().width;if(ce&&Number.isFinite(ce)){let U=Jo(ce,k,C);j(z=>z===U?z:U);}},[te,k,C,le]),lt.useEffect(()=>(le||V.current(),()=>V.current()),[le,o,M.onColumnSizeChange]),jsxRuntime.jsxs("th",{...F,ref:Z,"data-slot":"head","data-v2-header-drag-id":D&&ae?o:void 0,scope:F.scope??"col","aria-sort":me,className:l(G.slots.tableHead,N&&G.slots.tableSplitHead,B==="center"&&G.slots.tableCellAlignCenter,B==="right"&&G.slots.tableCellAlignRight,D&&"!relative !h-9 !px-3 !align-middle !text-sm !font-medium !text-muted-foreground after:pointer-events-none after:absolute after:bottom-2 after:right-0 after:top-2 after:w-px after:bg-border/50 after:content-['']",I?.root,S),style:{...G.styles.tableHead,...N?G.styles.tableSplitHead:void 0,width:N?void 0:Ms(te),minWidth:N?void 0:Ms(k),maxWidth:N?void 0:Ms(C),...N?{alignItems:bf(K),justifyContent:gf(B),textAlign:B}:a?{verticalAlign:a}:void 0,...R},onDragOver:xe,onDrop:oe,children:[ye,le&&D?jsxRuntime.jsx("div",{"data-column-resize-handle":"true",className:"absolute right-0 top-0 z-20 h-full w-2 cursor-col-resize touch-none select-none hover:bg-muted",onPointerDown:se}):le?jsxRuntime.jsx("button",{type:"button",role:"separator","aria-orientation":"vertical","aria-valuenow":Ie,"aria-valuemin":k??48,"aria-valuemax":C,"aria-valuetext":`${Ie}px`,title:w,"aria-label":w??Y.resizeColumn({columnId:o}),className:l(G.slots.tableHeadResizeHandle,I?.resizeHandle),onClick:ce=>ce.stopPropagation(),onKeyDown:ze,onPointerDown:se}):null]})},"BaseTableHead")),Tr=lt.forwardRef(r(function({align:t="left",appearance:o,className:n,classNames:a,style:i,...s},u){An("cell align",t,["left","center","right"]);let{layout:c,theme:d}=Zo(o),g=c==="split-scroll";return jsxRuntime.jsx("td",{...s,ref:u,"data-slot":"cell",className:l(d.slots.tableCell,g&&d.slots.tableSplitCell,t==="center"&&d.slots.tableCellAlignCenter,t==="right"&&d.slots.tableCellAlignRight,a?.root,n),style:{...d.styles.tableCell,...g?d.styles.tableSplitCell:void 0,...i}})},"BaseTableCell"));lt.forwardRef(r(function({appearance:t,className:o,classNames:n,style:a,...i},s){let{theme:u}=Zo(t);return jsxRuntime.jsx("caption",{...i,ref:s,"data-slot":"caption",className:l(u.slots.tableCaption,n?.root,o),style:{...u.styles.tableCaption,...a}})},"BaseTableCaption"));var Ka=lt.forwardRef(r(function({colSpan:t,icon:o,title:n,description:a,actions:i,children:s,appearance:u,className:c,classNames:d,style:g,...m},p){if(!Number.isSafeInteger(t)||t<1)throw new Error("BaseTable empty colSpan must be a positive safe integer.");let{layout:f,theme:b}=Zo(u),v=f==="split-scroll",y=O(o)||O(n)||O(a)||O(i);return jsxRuntime.jsx("tr",{...m,ref:p,"data-slot":"empty-row",className:l(b.slots.tableEmptyRow,v&&b.slots.tableSplitRow,d?.row,c),style:{...b.styles.tableEmpty,...v?b.styles.tableSplitRow:void 0,...g},children:jsxRuntime.jsx("td",{colSpan:t,"data-slot":"empty-cell",className:l(b.slots.tableEmptyCell,v&&b.slots.tableSplitCell,d?.cell),style:v?{gridColumn:"1 / -1"}:void 0,children:y?jsxRuntime.jsxs("div",{className:l(b.slots.tableEmptyContent,d?.content),children:[O(o)?jsxRuntime.jsx("div",{className:l(b.slots.tableEmptyIcon,d?.icon),children:o}):null,O(n)?jsxRuntime.jsx("div",{className:l(b.slots.tableEmptyTitle,d?.title),children:n}):null,O(a)?jsxRuntime.jsx("div",{className:l(b.slots.tableEmptyDescription,d?.description),children:a}):null,O(i)?jsxRuntime.jsx("div",{className:l(b.slots.tableEmptyActions,d?.actions),children:i}):null]}):s})})},"BaseTableEmpty"));var xf={sm:"min-h-20 px-2.5 py-1.5 text-xs leading-5",md:"min-h-24 px-3 py-2 text-sm leading-6",lg:"min-h-28 px-3.5 py-2.5 text-base leading-7"},Rr=lt.forwardRef(r(function({invalid:t=false,disabled:o=false,readOnly:n=false,controlSize:a,appearance:i,className:s,classNames:u,style:c,"aria-invalid":d,onBlur:g,onChange:m,...p},f){for(let[h,k]of [["invalid",t],["disabled",o],["readOnly",n]])if(typeof k!="boolean")throw new TypeError(`BaseTextarea ${h} must be a boolean.`);if(a!==void 0&&a!=="sm"&&a!=="md"&&a!=="lg")throw new TypeError('BaseTextarea controlSize must be "sm", "md", or "lg".');let b=Oe(i),v=Ne(),y=De(b),x=Ko(),w=t||x.invalid;return jsxRuntime.jsx("textarea",{...v,...p,ref:f,disabled:o,readOnly:n,"aria-invalid":d??(w||void 0),"data-monkeys-component":"textarea","data-slot":"control","data-size":a,"data-invalid":w||void 0,"data-disabled":o||void 0,"data-readonly":n||void 0,className:l(y.slots.controlWrapper,y.slots.controlBase,y.slots.controlTextarea,w&&y.slots.controlInvalid,o&&y.slots.controlDisabled,n&&y.slots.controlReadOnly,a&&xf[a],u?.control,s),style:{...y.styles.control,...w?y.styles.controlInvalid:void 0,...o?y.styles.controlDisabled:void 0,...c},onBlur:h=>{g?.(h),x.notifyBlur(h.currentTarget.value);},onChange:h=>{m?.(h),x.notifyChange(h.currentTarget.value);}})},"BaseTextarea"));var pc={path:["d"],circle:["cx","cy","r"],rect:["x","y","width","height","rx","ry"],polyline:["points"],line:["x1","x2","y1","y2"],ellipse:["cx","cy","rx","ry"],polygon:["points"]};function Os(e){if(!Array.isArray(e)||!e.length||e.length>256)return;let t=[];for(let o of e){if(!Array.isArray(o)||o.length!==2||typeof o[0]!="string"||!Object.prototype.hasOwnProperty.call(pc,o[0]))return;let n=o[0],a=o[1];if(!a||typeof a!="object"||Array.isArray(a)||Object.getPrototypeOf(a)!==Object.prototype)return;let i={};for(let[s,u]of Object.entries(Object.getOwnPropertyDescriptors(a))){if(!("value"in u)||typeof u.value!="string")return;let c=u.value;if(s==="key"){if(c.length>256)return}else if(s==="fill"){if(c!=="currentColor"&&c!=="none")return}else if(pc[n].includes(s)){if(s==="d"){if(!c.length||c.length>8192||!/^[MmZzLlHhVvCcSsQqTtAa0-9eE+.,\s-]+$/.test(c))return}else if(s==="points"){if(!c.length||c.length>8192||!/^[0-9eE+.,\s-]+$/.test(c))return}else if(!c.trim()||c.length>128||!Number.isFinite(Number(c)))return}else return;i[s]=c;}t.push([n,i]);}return t}r(Os,"parseAssetIconNodes");var On=lt.forwardRef(r(function({icon:t,alt:o,normalizeImageIcon:n=false,className:a,style:i,...s},u){let c=Ne(),d=Xi()??runtime.resolveAssetIconNodes,g=od(),m=t.kind==="image"?t.src:void 0,[p,f]=lt.useState();lt.useEffect(()=>{if(!m||!g)return;let F=new AbortController;return Promise.resolve().then(()=>g(m,F.signal)).then($=>{F.signal.aborted||f({reference:m,resolver:g,src:eo($,"media")});}).catch(()=>{F.signal.aborted||f({reference:m,resolver:g});}),()=>F.abort()},[m,g]);let b=g?p&&p.reference===m&&p.resolver===g?p.src:void 0:eo(m,"media"),[v,y]=lt.useState(),x=lt.useRef(null);lt.useEffect(()=>{let F=x.current;b&&F?.complete&&y({source:b,resolver:g,ready:F.naturalWidth>0});},[b,g]);let w=t.kind==="lucide"?t.name:void 0,h=lt.useMemo(()=>{if(w)try{return d.peek?Os(d.peek(w)):void 0}catch{return}},[w,d]),[k,C]=lt.useState();lt.useEffect(()=>{let F=true;return w&&!h&&Promise.resolve().then(()=>d(w)).then($=>{F&&C({name:w,resolver:d,nodes:Os($)});}).catch(()=>{F&&C({name:w,resolver:d,nodes:void 0});}),()=>{F=false;}},[w,d,h]);let T=k?.name===w&&k?.resolver===d,S=h??(T?k?.nodes:void 0),I=!!(m&&g&&!(p?.reference===m&&p?.resolver===g)),R=v?.source===b&&v?.resolver===g,W=!!(w&&!h&&!T),H=t.kind==="emoji"?"ready":t.kind==="image"?b?R?v?.ready?"ready":"error":"loading":I?"loading":"error":S?"ready":W?"loading":"error",L=H==="loading"?jsxRuntime.jsx(Wt,{variant:"block",className:"h-5 w-5 max-h-full max-w-full rounded"}):jsxRuntime.jsx(lucideReact.Wrench,{"aria-hidden":"true",className:"h-5 w-5 max-h-full max-w-full"});return jsxRuntime.jsx("div",{...c,...s,ref:u,role:"img","aria-label":o,"data-icon-state":H,"aria-busy":H==="loading"||void 0,className:l("monkeys-asset-icon flex h-11 w-11 shrink-0 items-center justify-center rounded-xl text-muted-foreground",t.kind==="emoji"?"text-2xl":t.kind==="image"&&!n?"overflow-hidden border":"bg-muted",a),style:{...t.kind==="emoji"&&t.backgroundColor?{backgroundColor:t.backgroundColor}:{},...i},children:t.kind==="image"?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[b&&H!=="error"&&jsxRuntime.jsx("img",{ref:x,src:b,alt:"","aria-hidden":"true",onLoad:F=>{F.currentTarget===x.current&&y({source:b,resolver:g,ready:true});},onError:F=>{F.currentTarget===x.current&&y({source:b,resolver:g,ready:false});},style:H==="loading"?{display:"none"}:void 0,className:n?"h-5 w-5 object-contain":"h-full w-full object-cover"},b),H!=="ready"&&L]}):t.kind==="emoji"?jsxRuntime.jsx("span",{"aria-hidden":"true",children:t.value}):S?jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"h-5 w-5 max-h-full max-w-full",children:S.map(([F,$],M)=>{let{key:G,...Y}=$;return lt.createElement(F,{...Y,key:G??M})})}):L})},"BaseAssetIcon"));function bc({expanded:e}){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:jsxRuntime.jsx("path",{d:e?"m6 9 6 6 6-6":"m9 18 6-6-6-6"})})}r(bc,"ChevronIcon");function Bf(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"12",cy:"5",r:"1"}),jsxRuntime.jsx("circle",{cx:"12",cy:"19",r:"1"})]})}r(Bf,"MoreIcon");function Pf(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[jsxRuntime.jsx("circle",{cx:"9",cy:"6",r:"1"}),jsxRuntime.jsx("circle",{cx:"9",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"9",cy:"18",r:"1"}),jsxRuntime.jsx("circle",{cx:"15",cy:"6",r:"1"}),jsxRuntime.jsx("circle",{cx:"15",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"15",cy:"18",r:"1"})]})}r(Pf,"GripIcon");function hc(e,t){for(let o of e??[])o.defaultExpanded&&t.add(o.id),hc(o.children,t);}r(hc,"collectDefaultExpandedNodeIds");function fc(e,t){let o=new Set(t??[]);for(let n of e)hc(n.nodes,o);return o}r(fc,"buildDefaultNodeExpandedSet");function yc(e,t){let o=new Set(t??[]);for(let n of e)(n.hideHeader||n.defaultExpanded!==false)&&o.add(n.id);return o}r(yc,"buildDefaultGroupExpandedSet");function xc(e,t,o,n){for(let[a,i]of (e??[]).entries())n.set(i.id,{node:i,group:t,parentId:o,index:a}),xc(i.children,t,i.id,n);}r(xc,"flattenNodes");function Ef(e){let t=new Map;for(let o of e)xc(o.nodes,o,void 0,t);return t}r(Ef,"buildFlattenedNodeMap");function Df(e,t){return [...t??[],...e.actions??[]]}r(Df,"getNodeActions");function Wf(e,t){return [...t??[],...e.actions??[]]}r(Wf,"getGroupActions");function Fs({groups:e,nodes:t,context:o,selectedNodeId:n,selectedGroupId:a,expandedNodeIds:i,defaultExpandedNodeIds:s,expandedGroupIds:u,defaultExpandedGroupIds:c,resetExpansionKey:d,nodeActions:g,groupActions:m,indentSize:p=16,indentOffset:f=8,actionIcon:b,empty:v,loading:y=false,loadingNode:x,error:w,labels:h,reorderMode:k="none",appearance:C,className:T,classNames:S,onSelectNode:I,onSelectGroup:R,onExpandedNodeIdsChange:W,onExpandedGroupIdsChange:H,onAction:L,onReorderNodes:F}){let $=vt().dataExplorer.viewTree,M=Jl(Ul(C)),G=h?.actions??$.actions,Y=h?.expand??$.expand,N=h?.collapse??$.collapse,D=x??h?.loading??$.loading,B=v??h?.empty??$.empty,K=Array.isArray(e),J=lt.useMemo(()=>K?e:[{id:"__root__",hideHeader:true,defaultExpanded:true,nodes:Array.isArray(t)?t:[]}],[e,K,t]),V=lt.useMemo(()=>Ef(J),[J]),[Q,j]=lt.useState(()=>fc(J,s)),[Z,te]=lt.useState(()=>yc(J,c)),[ae,le]=lt.useState(),[A,me]=lt.useState();lt.useEffect(()=>{j(fc(J,s)),te(yc(J,c));},[c,s,d]);let P=i!==void 0?new Set(i):Q,_=u!==void 0?new Set(u):Z,re=r((U,z)=>{let X=new Set(P);z?X.add(U):X.delete(U),i===void 0&&j(X),W?.([...X]);},"setNodeExpanded"),fe=r((U,z)=>{let X=new Set(_);z?X.add(U):X.delete(U),u===void 0&&te(X),H?.([...X]);},"setGroupExpanded"),ye=r((U,z)=>z.type==="node"?{type:"node",action:U,node:z.node,group:z.group,context:o}:{type:"group",action:U,group:z.group,context:o},"createActionContext"),xe=r((U,z)=>{let X=U.filter(ie=>{let q=ye(ie,z);return ir(ie.visible,q)??true});return X.length===0?null:jsxRuntime.jsxs(Gt__namespace.Root,{children:[jsxRuntime.jsx(Gt__namespace.Trigger,{asChild:true,children:jsxRuntime.jsx("button",{type:"button",title:G,"aria-label":G,className:l(M.slots.menuTrigger,z.type==="group"?M.slots.treeGroupActions:M.slots.treeNodeActions,z.type==="group"?S?.groupActions:l(S?.nodeActions,S?.itemActions)),onClick:ie=>ie.stopPropagation(),children:b??jsxRuntime.jsx(Bf,{})})}),jsxRuntime.jsx(Gt__namespace.Portal,{children:jsxRuntime.jsx(Gt__namespace.Content,{align:"end",sideOffset:6,className:l(M.slots.menuContent,S?.menuContent),style:M.styles.menuContent,onClick:ie=>ie.stopPropagation(),children:X.map(ie=>{let q=ye(ie,z),de=(ir(ie.disabled,q)??false)||(ir(ie.loading,q)??false),we=ir(ie.active,q)??false;return ie.render?jsxRuntime.jsx("div",{children:ie.render(q)},ie.id):jsxRuntime.jsxs("div",{children:[ie.separatorBefore?jsxRuntime.jsx(Gt__namespace.Separator,{className:M.slots.menuSeparator}):null,jsxRuntime.jsxs(Gt__namespace.Item,{title:ie.title,disabled:de,className:l(M.slots.menuItem,Xl(M,ie.tone),we&&"bg-accent text-accent-foreground",S?.menuItem),style:M.styles.menuItem,onSelect:()=>{de||(ie.onAction?.(q),L?.(q));},children:[ie.icon?jsxRuntime.jsx("span",{className:M.slots.menuItemIcon,children:ie.icon}):null,jsxRuntime.jsx("span",{className:M.slots.menuItemLabel,children:ie.label})]}),ie.separatorAfter?jsxRuntime.jsx(Gt__namespace.Separator,{className:M.slots.menuSeparator}):null]},ie.id)})})})]})},"renderActions"),oe=r((U,z)=>{U.preventDefault();let X=ae||U.dataTransfer.getData("application/x-data-explorer-node");if(!X||X===z.id||!F){le(void 0),me(void 0);return}let ie=V.get(X),q=V.get(z.id);if(!ie||!q){le(void 0),me(void 0);return}let de=ie.parentId===q.parentId&&ie.group?.id===q.group?.id;if(k==="same-parent"&&!de){le(void 0),me(void 0);return}let we={activeNode:ie.node,overNode:q.node,activeGroup:ie.group,overGroup:q.group,activeParentId:ie.parentId,overParentId:q.parentId,oldIndex:ie.index,newIndex:q.index,sameParent:de,context:o};F(we),le(void 0),me(void 0);},"handleDrop"),se=r((U,z,X)=>{let ie=Array.isArray(U.children)?U.children:[],q=ie.length>0,de=U.collapsible===false||P.has(U.id),we=n===U.id,Ce=U.selectable!==false&&!U.disabled,Me=k!=="none"&&!!F&&U.reorderable!==false,Be=ae===U.id,_e=A===U.id&&ae!==U.id,Ze=Df(U,g);return jsxRuntime.jsxs("div",{"data-data-explorer-entry":"node","data-data-explorer-node-id":U.id,"data-data-explorer-group-id":z?.id,className:l(M.slots.treeNode,S?.node,S?.item,U.className),onDragOver:Fe=>{!ae||!Me||(Fe.preventDefault(),me(U.id));},onDragLeave:()=>{A===U.id&&me(void 0);},onDrop:Fe=>oe(Fe,U),children:[jsxRuntime.jsxs("div",{className:l(M.slots.treeNodeButton,we&&M.slots.treeNodeSelected,U.disabled&&M.slots.treeNodeDisabled,Be&&M.slots.treeNodeDragging,_e&&"ring-1 ring-primary/30",we&&S?.itemSelected,we&&S?.nodeSelected,U.disabled&&S?.nodeDisabled,Be&&S?.nodeDragging,S?.nodeButton,S?.itemButton),style:{paddingLeft:`calc(${(U.indentLevel??X)*p+f}px + var(--data-explorer-tree-group-indent, 0px))`},role:"treeitem","aria-selected":we||void 0,"aria-disabled":U.disabled||void 0,"aria-expanded":q?de:void 0,"aria-label":U.ariaLabel,tabIndex:Ce?0:-1,onClick:()=>{Ce&&I?.(U,o);},onKeyDown:Fe=>{Fe.target===Fe.currentTarget&&Ce&&(Fe.key!=="Enter"&&Fe.key!==" "||(Fe.preventDefault(),I?.(U,o)));},children:[Me?jsxRuntime.jsx("span",{draggable:true,className:l(M.slots.treeNodeDragHandle,S?.nodeDragHandle),onClick:Fe=>Fe.stopPropagation(),onDragStart:Fe=>{Fe.stopPropagation(),Fe.dataTransfer.effectAllowed="move",Fe.dataTransfer.setData("application/x-data-explorer-node",U.id),le(U.id);},onDragEnd:()=>{le(void 0),me(void 0);},children:jsxRuntime.jsx(Pf,{})}):null,q?jsxRuntime.jsx("button",{type:"button",className:l(M.slots.treeNodeToggle,S?.nodeToggle,S?.expander),"aria-label":de?N:Y,onClick:Fe=>{Fe.stopPropagation(),re(U.id,!de);},children:jsxRuntime.jsx(bc,{expanded:de})}):jsxRuntime.jsx("span",{className:l(M.slots.treeNodeToggle,S?.nodeToggle)}),U.icon?jsxRuntime.jsx("span",{className:l(M.slots.treeNodeIcon,S?.nodeIcon,S?.itemIcon),children:U.icon}):null,jsxRuntime.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[jsxRuntime.jsx("span",{className:l(M.slots.treeNodeLabel,S?.nodeLabel,S?.itemLabel),children:U.label}),U.description?jsxRuntime.jsx("span",{className:l(M.slots.treeNodeDescription,S?.nodeDescription),children:U.description}):null]}),U.meta?jsxRuntime.jsx("span",{className:l(M.slots.treeNodeMeta,S?.nodeMeta),children:U.meta}):null,U.badge?jsxRuntime.jsx("span",{className:l(M.slots.treeNodeBadge,S?.nodeBadge),children:U.badge}):null,xe(Ze,{type:"node",node:U,group:z})]}),q&&de?jsxRuntime.jsx("div",{className:l(M.slots.treeNodeChildren,S?.nodeChildren,S?.list),children:ie.map(Fe=>se(Fe,z,X+1))}):null]},U.id)},"renderNode"),Re=r((U,z,X)=>U===false?null:jsxRuntime.jsx("div",{className:l(z,X),children:U}),"renderPlaceholder");if(y)return jsxRuntime.jsx("div",{className:l(M.slots.treeRoot,S?.root,T),children:Re(D,M.slots.treeLoading,S?.loading)});if(w)return jsxRuntime.jsx("div",{className:l(M.slots.treeRoot,S?.root,T),children:Re(w??h?.error,M.slots.treeError,S?.error)});let Ie=J.some(U=>(U.nodes??[]).length>0),ze=J.some(U=>U.status==="loading"||U.error);return !Ie&&!ze&&(!K||J.length===0)?jsxRuntime.jsx("div",{className:l(M.slots.treeRoot,S?.root,T),children:Re(B,M.slots.treeEmpty,S?.empty)}):jsxRuntime.jsx("div",{className:l(M.slots.treeRoot,S?.root,T),role:Ie||J.some(U=>!U.hideHeader)?"tree":void 0,children:J.map(U=>{let z=U.hideHeader||U.collapsible===false||_.has(U.id),X=U.nodes?.length??0,ie=Wf(U,m),q=a===U.id,de=U.collapsible!==false;return jsxRuntime.jsxs("section",{"data-data-explorer-entry":"group","data-data-explorer-group-id":U.id,className:l(M.slots.treeGroup,S?.group,U.className),children:[U.hideHeader?null:jsxRuntime.jsxs("div",{role:"treeitem","aria-label":typeof U.label=="string"?U.label:void 0,"aria-selected":U.selectable?q:void 0,"aria-expanded":de?z:void 0,className:l(M.slots.treeGroupHeader,M.slots.treeGroupHeaderButton,q&&M.slots.treeNodeSelected,S?.groupHeader,S?.groupHeaderButton,q&&S?.itemSelected),children:[jsxRuntime.jsxs("button",{type:"button",className:l("flex min-w-0 flex-1 items-center gap-2 text-left outline-hidden focus-visible:ring-2 focus-visible:ring-ring",S?.groupLabel),"aria-pressed":U.selectable?q:void 0,"aria-expanded":!U.selectable&&de?z:void 0,onClick:()=>{if(U.selectable){R?.(U,o);return}de&&fe(U.id,!z);},children:[U.icon?jsxRuntime.jsx("span",{className:l(M.slots.treeNodeIcon,S?.nodeIcon,S?.itemIcon),children:U.icon}):null,jsxRuntime.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[U.label?jsxRuntime.jsx("span",{className:l(M.slots.treeNodeLabel,S?.nodeLabel,S?.itemLabel),children:U.label}):null,U.description?jsxRuntime.jsx("span",{className:l(M.slots.treeNodeDescription,S?.nodeDescription),children:U.description}):null]}),U.meta?jsxRuntime.jsx("span",{className:l(M.slots.treeNodeMeta,S?.nodeMeta),children:U.meta}):null,U.badge?jsxRuntime.jsx("span",{className:l(M.slots.treeNodeBadge,S?.nodeBadge),children:U.badge}):null]}),de?jsxRuntime.jsx("button",{type:"button",className:l(M.slots.treeNodeToggle,S?.expander),"aria-label":z?N:Y,"aria-expanded":z,onClick:()=>fe(U.id,!z),children:jsxRuntime.jsx(bc,{expanded:z})}):jsxRuntime.jsx("span",{className:l(M.slots.treeNodeToggle,S?.expander)}),xe(ie,{type:"group",group:U})]}),z?jsxRuntime.jsx("div",{role:"group",className:l(M.slots.treeGroupContent,S?.groupContent,S?.list),children:U.loading||U.status==="loading"?Re(D,M.slots.treeLoading,S?.loading):U.error||U.status==="error"?Re(U.error??h?.error??$.error,M.slots.treeError,S?.error):X>0?U.nodes?.map(we=>se(we,U,0)):Re(U.empty??B,M.slots.treeEmpty,S?.empty)}):null]},U.id)})})}r(Fs,"DataExplorerViewTree");var Ir="gap-2 rounded-[var(--radius)] border border-transparent text-sm font-medium motion-reduce:transition-none",Mr="size-[var(--monkeys-component-navigation-sidebar-icon-size,1.125rem)] shrink-0 text-inherit [&_svg]:size-full",Hs="text-foreground hover:border-transparent hover:bg-[var(--navigation-internal-hover-background)] hover:text-[var(--navigation-internal-hover-foreground)]",Vs="border-[var(--navigation-internal-selected-border)] bg-[var(--navigation-internal-selected-background)] text-[var(--navigation-internal-selected-foreground)] hover:border-[var(--navigation-internal-selected-border)] hover:bg-[var(--navigation-internal-selected-background)] hover:text-[var(--navigation-internal-selected-foreground)]",vc="[--navigation-internal-theme-selected-background:color-mix(in_srgb,hsl(var(--monkeys-color-primary,var(--primary)))_10%,transparent)] [--navigation-internal-theme-selected-foreground:hsl(var(--monkeys-color-primary,var(--primary)))] dark:[--navigation-internal-theme-selected-background:hsl(var(--monkeys-color-accent,var(--accent)))] dark:[--navigation-internal-theme-selected-foreground:hsl(var(--monkeys-color-foreground,var(--foreground)))]";function kc(e){let t={muted:"hsl(var(--monkeys-color-accent,var(--accent)))",soft:"color-mix(in srgb,hsl(var(--monkeys-color-primary,var(--primary))) 10%,transparent)",solid:"hsl(var(--monkeys-color-primary,var(--primary)))",outline:"hsl(var(--monkeys-color-background,var(--background)))"}[e??"muted"];return {"--navigation-internal-default-selected-background":e===void 0?"var(--navigation-internal-theme-selected-background)":t,"--navigation-internal-default-selected-foreground":e===void 0?"var(--navigation-internal-theme-selected-foreground)":e==="solid"?"hsl(var(--monkeys-color-primary-foreground,var(--primary-foreground)))":"hsl(var(--monkeys-color-foreground,var(--foreground)))","--navigation-internal-selected-background":"var(--monkeys-component-navigation-sidebar-row-selected-background,var(--navigation-internal-default-selected-background))","--navigation-internal-selected-foreground":"var(--monkeys-component-navigation-sidebar-row-selected-foreground,var(--navigation-internal-default-selected-foreground))","--navigation-internal-selected-border":`var(--monkeys-component-navigation-sidebar-row-selected-border,${e===void 0||e==="muted"?"transparent":e==="soft"?"color-mix(in srgb,hsl(var(--monkeys-color-primary,var(--primary))) 25%,transparent)":e==="outline"?"color-mix(in srgb,hsl(var(--monkeys-color-primary,var(--primary))) 55%,transparent)":"hsl(var(--monkeys-color-primary,var(--primary)))"})`,"--navigation-internal-hover-background":"var(--monkeys-component-navigation-sidebar-row-hover-background,color-mix(in srgb,hsl(var(--monkeys-color-accent,var(--accent))) 65%,transparent))","--navigation-internal-hover-foreground":"var(--monkeys-component-navigation-sidebar-row-hover-foreground,hsl(var(--monkeys-color-foreground,var(--foreground))))"}}r(kc,"unifiedStyle");var Lf="[--navigation-internal-selected-background:var(--monkeys-component-navigation-sidebar-row-selected-background,var(--monkeys-component-navigation-sidebar-tree-row-selected-background,var(--navigation-internal-default-selected-background)))] [--navigation-internal-selected-foreground:var(--monkeys-component-navigation-sidebar-row-selected-foreground,var(--monkeys-component-navigation-sidebar-tree-row-selected-foreground,var(--navigation-internal-default-selected-foreground)))] [--navigation-internal-hover-background:var(--monkeys-component-navigation-sidebar-row-hover-background,var(--monkeys-component-navigation-sidebar-tree-row-hover-background,color-mix(in_srgb,hsl(var(--monkeys-color-accent,var(--accent)))_65%,transparent)))] [--navigation-internal-hover-foreground:var(--monkeys-component-navigation-sidebar-row-hover-foreground,var(--monkeys-component-navigation-sidebar-tree-row-hover-foreground,hsl(var(--monkeys-color-foreground,var(--foreground)))))]",Af="aria-selected:border-[var(--navigation-internal-selected-border)] aria-selected:bg-[var(--navigation-internal-selected-background)] aria-selected:text-[var(--navigation-internal-selected-foreground)] aria-selected:hover:border-[var(--navigation-internal-selected-border)] aria-selected:hover:bg-[var(--navigation-internal-selected-background)] aria-selected:hover:text-[var(--navigation-internal-selected-foreground)]",Nr="rounded-[var(--monkeys-component-navigation-sidebar-action-radius,0.25rem)] text-inherit hover:bg-foreground/10 hover:text-inherit focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none";function wc(e,t,o={}){let n=l(Ir,e,t,Hs);return {...o,root:l(Lf,"space-y-0.5",o.root),group:l("space-y-0.5","[&>[role=treeitem]+[role=group]]:[--data-explorer-tree-group-indent:var(--monkeys-component-navigation-sidebar-tree-group-indent,1rem)]",o.group),groupHeaderButton:l("h-auto",n,o.groupHeaderButton),nodeButton:l(n,Af,o.nodeButton),itemSelected:l(Vs,o.itemSelected),nodeIcon:l(Mr,"group-hover/tree-node:text-inherit",o.nodeIcon),nodeLabel:l("font-medium",o.nodeLabel),nodeDescription:l("text-inherit",o.nodeDescription),nodeDisabled:l("opacity-50",o.nodeDisabled),groupActions:l(Nr,"order-2 size-5 p-0 group-focus-within/tree-group:opacity-100",o.groupActions),nodeActions:l(Nr,"order-2 size-5 p-0 group-focus-within/tree-node:opacity-100",o.nodeActions),nodeToggle:l(Nr,"order-1 empty:hidden",o.nodeToggle),expander:l(Nr,"order-1 empty:hidden",o.expander),nodeDragHandle:l(Nr,o.nodeDragHandle)}}r(wc,"unifiedTreeClassNames");function Ff({collapsed:e}){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-4 w-4",fill:"none",children:jsxRuntime.jsx("path",{d:e?"M4 4.5h12M4 15.5h12M5 7.5 7.5 10 5 12.5M15 7.5 12.5 10l2.5 2.5":"M4 4.5h12M4 15.5h12M7.5 7.5 5 10l2.5 2.5M12.5 7.5 15 10l-2.5 2.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}r(Ff,"CollapseIcon");function Hf(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-4 w-4",fill:"none",children:[jsxRuntime.jsx("circle",{cx:"8.5",cy:"8.5",r:"5",stroke:"currentColor",strokeWidth:"1.6"}),jsxRuntime.jsx("path",{d:"m12.2 12.2 3.3 3.3",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})}r(Hf,"SearchIcon");function Vf(){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-3.5 w-3.5",fill:"none",children:jsxRuntime.jsx("path",{d:"m6 6 8 8m0-8-8 8",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})})}r(Vf,"ClearIcon");function Gf(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-4 w-4",fill:"currentColor",children:[jsxRuntime.jsx("circle",{cx:"5",cy:"10",r:"1.2"}),jsxRuntime.jsx("circle",{cx:"10",cy:"10",r:"1.2"}),jsxRuntime.jsx("circle",{cx:"15",cy:"10",r:"1.2"})]})}r(Gf,"MoreIcon");function Ya({expanded:e}){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:l("h-4 w-4 transition-transform motion-reduce:transition-none",e&&"rotate-180"),fill:"none",children:jsxRuntime.jsx("path",{d:"m6 8 4 4 4-4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}r(Ya,"DisclosureIcon");function _f(e,t){typeof e=="function"?e(t):e&&(e.current=t);}r(_f,"assignRef");function Fn(e,t){if(!Number.isFinite(t))throw new RangeError(`NavigationSidebar ${e} must be a finite number.`)}r(Fn,"requireFiniteNumber");function $f(e){let t=e.minWidth??180,o=e.maxWidth??420,n=e.defaultWidth??256,a=e.collapsedWidth??60,i=e.collapseThreshold??140;if(Fn("minWidth",t),Fn("maxWidth",o),Fn("defaultWidth",n),Fn("collapsedWidth",a),Fn("collapseThreshold",i),t<=0)throw new RangeError("NavigationSidebar minWidth must be greater than zero.");if(o<t)throw new RangeError("NavigationSidebar maxWidth must be greater than or equal to minWidth.");if(a<0)throw new RangeError("NavigationSidebar collapsedWidth cannot be negative.");if(i<0)throw new RangeError("NavigationSidebar collapseThreshold cannot be negative.");return {defaultWidth:n,minWidth:t,maxWidth:o,collapsedWidth:a,collapseThreshold:i}}r($f,"resolveLayoutBounds");function Ja(e,t){return Math.min(Math.max(e,t.minWidth),t.maxWidth)}r(Ja,"clampWidth");function Nc(e,t){if(t){t(e);return}typeof console<"u"&&console.warn("NavigationSidebar could not persist layout state.",e);}r(Nc,"reportStorageError");function Ic(e){if(e)return e;if(!(typeof window>"u"))return window.localStorage}r(Ic,"resolveStorage");function jf(e,t){let o={collapsed:e.defaultCollapsed??false,width:Ja(t.defaultWidth,t)};if(!e.storageKey)return o;let n=Ic(e.storage);if(!n)return o;try{let a=n.getItem(e.storageKey);if(!a)return o;let i=JSON.parse(a);return {collapsed:typeof i.collapsed=="boolean"?i.collapsed:o.collapsed,width:typeof i.width=="number"&&Number.isFinite(i.width)?Ja(i.width,t):o.width}}catch(a){return Nc(a,e.onStorageError),o}}r(jf,"readStoredLayout");function _s(e,t){return t||(typeof e=="string"?e:void 0)}r(_s,"getNodeTitle");function Kf(e){return e==="solid"?"border-primary bg-primary text-primary-foreground shadow-sm":e==="outline"?"border-primary/55 bg-background text-foreground ring-1 ring-primary/20":e==="muted"?"border-transparent bg-muted text-foreground":"border-primary/25 bg-primary/10 text-foreground"}r(Kf,"activeVariantClassName");function Uf(e){if(e?.preset!==void 0&&e.preset!=="unified")throw new TypeError(`Unknown NavigationSidebar preset "${e.preset}". Supported preset: unified.`);let t=e?.preset==="unified",o=e?.density??(t?"compact":"default"),n=e?.surface??"panel",a=e?.activeVariant??(t?"muted":"soft");return {unified:t,density:o,surface:n,activeVariant:a,selected:t?Vs:Kf(a),inactive:t?Hs:"text-muted-foreground hover:border-border/70 hover:bg-muted/60 hover:text-foreground",root:l(n==="plain"&&"border-transparent bg-transparent shadow-none",n==="panel"&&"border-border/70 bg-card text-card-foreground shadow-sm",n==="frosted"&&"border-border/55 bg-card/80 text-card-foreground shadow-sm backdrop-blur-xl",n==="outlined"&&"border-border bg-background text-foreground shadow-none",t&&"rounded-[var(--radius)] shadow-none",t&&vc,t&&n==="panel"&&"border-[var(--monkeys-component-navigation-sidebar-border,hsl(var(--monkeys-color-border,var(--border))))] bg-[var(--monkeys-component-navigation-sidebar-background,hsl(var(--monkeys-color-card,var(--card))))] text-foreground"),itemHeight:o==="compact"?t?"min-h-[var(--monkeys-component-navigation-sidebar-row-height,2.5rem)]":"min-h-9":o==="comfortable"?"min-h-14":"min-h-11",itemPadding:o==="compact"?t?"px-2 py-2":"px-2 py-1.5":o==="comfortable"?"px-3 py-3":"px-3 py-2",searchHeight:o==="compact"?t?"h-[var(--monkeys-component-navigation-sidebar-row-height,2.5rem)]":"h-8":o==="comfortable"?"h-10":"h-9"}}r(Uf,"resolveAppearance");var Rc="hover:bg-[var(--monkeys-component-navigation-sidebar-tree-row-hover-background,hsl(var(--muted)))] hover:text-[var(--monkeys-component-navigation-sidebar-tree-row-hover-foreground,hsl(var(--foreground)))]",qf="bg-[var(--monkeys-component-navigation-sidebar-tree-row-selected-background,hsl(var(--accent)))] text-[var(--monkeys-component-navigation-sidebar-tree-row-selected-foreground,hsl(var(--accent-foreground)))] hover:bg-[var(--monkeys-component-navigation-sidebar-tree-row-selected-background,hsl(var(--accent)))] hover:text-[var(--monkeys-component-navigation-sidebar-tree-row-selected-foreground,hsl(var(--accent-foreground)))]",Br="hover:!bg-transparent hover:!text-inherit focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring";function Yf(e){return {...e,groupHeader:l(Rc,e?.groupHeader),itemSelected:l(qf,e?.itemSelected),nodeButton:l(Rc,"aria-selected:bg-[var(--monkeys-component-navigation-sidebar-tree-row-selected-background,hsl(var(--accent)))] aria-selected:text-[var(--monkeys-component-navigation-sidebar-tree-row-selected-foreground,hsl(var(--accent-foreground)))] aria-selected:hover:bg-[var(--monkeys-component-navigation-sidebar-tree-row-selected-background,hsl(var(--accent)))] aria-selected:hover:text-[var(--monkeys-component-navigation-sidebar-tree-row-selected-foreground,hsl(var(--accent-foreground)))]",e?.nodeButton),expander:l(Br,e?.expander),nodeToggle:l(Br,e?.nodeToggle),groupActions:l(Br,e?.groupActions),nodeActions:l(Br,e?.nodeActions),nodeDragHandle:l(Br,e?.nodeDragHandle)}}r(Yf,"resolveNavigationTreeClassNames");function $s({item:e,active:t,collapsed:o,mobile:n,embedded:a=false,appearance:i,classNames:s,domClassName:u}){return l("group/navigation-item relative flex w-full min-w-0 items-center gap-3 rounded-[var(--radius)] border border-transparent text-left text-sm outline-hidden transition-[background-color,border-color,color,box-shadow] focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",i.itemHeight,i.itemPadding,i.unified&&Ir,a?"min-h-0 self-stretch border-0 bg-transparent text-inherit hover:bg-transparent hover:text-inherit":t?i.selected:i.inactive,o&&!n&&"justify-center px-0",e.disabled&&"pointer-events-none opacity-50",s?.item,t&&s?.itemActive,n&&s?.mobileItem,u,e.className)}r($s,"entryClassName");function js({item:e,collapsed:t,mobile:o,classNames:n,endIndicator:a,appearance:i}){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[O(e.icon)?jsxRuntime.jsx("span",{className:l("flex size-5 shrink-0 items-center justify-center [&_svg]:size-full",i.unified&&Mr,n?.itemIcon),"aria-hidden":"true",children:e.icon}):null,o||!t?jsxRuntime.jsxs("span",{className:l("flex min-w-0 flex-1 flex-col",n?.itemContent),children:[jsxRuntime.jsx("span",{className:l("min-w-0 truncate font-semibold",i.unified&&"font-medium",n?.itemLabel),children:e.label}),O(e.description)?jsxRuntime.jsx("span",{className:l("mt-0.5 truncate text-xs font-normal",i.unified&&"text-inherit",n?.itemDescription),children:e.description}):null]}):null,(o||!t)&&O(e.meta)?jsxRuntime.jsx("span",{className:l("shrink-0 text-xs text-muted-foreground",n?.itemMeta),children:e.meta}):null,(o||!t)&&O(e.endContent)?jsxRuntime.jsx("span",{className:l("shrink-0",n?.itemEndContent),children:e.endContent}):null,(o||!t)&&O(a)?jsxRuntime.jsx("span",{className:"flex shrink-0 items-center justify-center",children:a}):null]})}r(js,"EntryContent");function Xa({item:e,active:t,collapsed:o,itemAs:n,appearance:a,classNames:i,mobile:s=false,embedded:u=false,onSelect:c,ariaControls:d,ariaExpanded:g,endIndicator:m}){let p=n??(e.href?"a":"button"),f=_s(e.label,e.title),b=e.domProps??{},v=r(x=>{if(e.disabled){x.preventDefault();return}e.onClick?.(x),c?.();},"handleClick"),y={...b,...e.to?{to:e.to}:{},...e.href?{href:e.href}:{},...p==="button"?{type:"button",disabled:e.disabled}:{},title:f,"aria-current":t?"page":void 0,"aria-disabled":e.disabled||void 0,"aria-controls":d,"aria-expanded":g,tabIndex:e.disabled?-1:b.tabIndex,onClick:v};return jsxRuntime.jsx(p,{...y,"data-navigation-sidebar-item-id":e.id,"data-active":t?"true":"false","data-expanded":g===void 0?void 0:String(g),className:$s({item:e,active:t,collapsed:o,mobile:s,embedded:u,appearance:a,classNames:i,domClassName:b.className}),children:jsxRuntime.jsx(js,{appearance:a,item:e,collapsed:o,mobile:s,classNames:i,endIndicator:m})})}r(Xa,"EntryButton");function Jf({item:e,appearance:t,classNames:o}){let n=e.domProps??{};return jsxRuntime.jsx("div",{...n,"data-navigation-sidebar-item-id":e.id,"aria-disabled":e.disabled||void 0,title:_s(e.label,e.title),className:$s({item:e,active:false,collapsed:false,mobile:true,embedded:true,appearance:t,classNames:o,domClassName:n.className}),children:jsxRuntime.jsx(js,{appearance:t,item:e,collapsed:false,mobile:true,classNames:o})})}r(Jf,"EntryPresentation");function Za({active:e,appearance:t}){return l("flex w-full min-w-0 items-center gap-0.5 rounded-[var(--radius)] border border-transparent pr-1 text-sm transition-[background-color,border-color,color,box-shadow] motion-reduce:transition-none",t.itemHeight,t.unified&&Ir,e?t.selected:t.inactive)}r(Za,"routeRowClassName");function Qa(e,t){return t?e.filter(o=>!o.filterIds?.length||o.filterIds.includes(t)):e}r(Qa,"filterCatalogItems");function Xf({props:e,collapsed:t,appearance:o}){let{items:n=[],sections:a=[],filters:i=[],activeFilterId:s,activeItemId:u,onFilterSelect:c,itemAs:d,layout:g="single",empty:m,ariaLabel:p,classNames:f}=e,b=Qa(n,s),v=a.map(h=>({...h,items:Qa(h.items,s)})).filter(h=>h.items.length>0),y=b.length>0||v.length>0,x=i.length>0&&!t?jsxRuntime.jsx("div",{role:"group",className:l(g==="split"?"flex min-w-32 flex-col gap-1 border-r border-border/60 pr-2":"flex flex-wrap gap-1",f?.filterList),"aria-label":p?`${p} filters`:void 0,children:i.map(h=>{let k=h.id===s;return jsxRuntime.jsxs("button",{type:"button",title:h.title??(typeof h.label=="string"?h.label:void 0),"aria-pressed":k,disabled:h.disabled,className:l("inline-flex min-h-8 items-center gap-2 rounded-md px-2.5 text-xs font-medium text-muted-foreground outline-hidden transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",k&&"bg-muted text-foreground",f?.filterItem,k&&f?.filterItemActive),onClick:()=>c?.(h),children:[O(h.icon)?jsxRuntime.jsx("span",{"aria-hidden":"true",children:h.icon}):null,jsxRuntime.jsx("span",{className:"truncate",children:h.label})]},h.id)})}):null,w=y?jsxRuntime.jsxs("div",{className:l("min-w-0 flex-1",f?.list),children:[b.length>0?jsxRuntime.jsx("ul",{className:"grid list-none gap-1 p-0",children:b.map(h=>jsxRuntime.jsx("li",{children:jsxRuntime.jsx(Xa,{item:h,active:h.active??h.id===u,collapsed:t,itemAs:d,appearance:o,classNames:f})},h.id))}):null,v.map(h=>jsxRuntime.jsxs("section",{className:l("mt-3 first:mt-0",f?.section,h.className),children:[!t&&O(h.label)?jsxRuntime.jsx("div",{className:l("mb-1 px-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",f?.sectionLabel,h.labelClassName),children:h.label}):null,jsxRuntime.jsx("ul",{className:"grid list-none gap-1 p-0",children:h.items.map(k=>jsxRuntime.jsx("li",{children:jsxRuntime.jsx(Xa,{item:k,active:k.active??k.id===u,collapsed:t,itemAs:d,appearance:o,classNames:f})},k.id))})]},h.id))]}):jsxRuntime.jsx("div",{className:"px-3 py-8 text-center text-sm text-muted-foreground",children:m});return jsxRuntime.jsxs("nav",{"aria-label":p,className:l(g==="split"&&!t&&"flex min-w-0 gap-2"),children:[x,w]})}r(Xf,"CatalogContent");function Zf({child:e,parent:t,active:o,interactive:n,onSelect:a,appearance:i,classNames:s,embedded:u=false}){let c=n?"button":"div",d=e.domProps??{};return jsxRuntime.jsxs(c,{...d,...n?{type:"button"}:{},"data-navigation-sidebar-child-id":e.id,"aria-current":n&&o?"page":void 0,"aria-disabled":e.disabled||void 0,title:_s(e.label,e.title),disabled:n?e.disabled:void 0,className:l("flex w-full min-w-0 flex-1 items-center gap-3 rounded-[var(--radius)] border border-transparent text-left text-sm font-semibold outline-hidden transition-[background-color,border-color,color,box-shadow] focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",i.itemHeight,i.itemPadding,i.unified&&Ir,u?"min-h-0 self-stretch border-0 bg-transparent text-inherit hover:bg-transparent hover:text-inherit":o?i.selected:i.inactive,e.disabled&&"pointer-events-none opacity-50",s?.childItem,o&&s?.childItemActive,d.className,e.className),onClick:n&&!e.disabled?()=>a?.(e,t):void 0,children:[O(e.icon)?jsxRuntime.jsx("span",{className:l("flex size-5 shrink-0 items-center justify-center [&_svg]:size-full",i.unified&&Mr),"aria-hidden":"true",children:e.icon}):null,jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:e.label})]})}r(Zf,"ChildEntry");function ei({itemId:e,actions:t,kind:o,className:n,mobile:a=false}){return O(t)?jsxRuntime.jsx("div",{"data-navigation-sidebar-item-actions":o==="item"?e:void 0,"data-navigation-sidebar-child-actions":o==="child"?e:void 0,"data-navigation-sidebar-actions-mobile":a?"true":void 0,className:l("ml-auto flex shrink-0 items-center gap-1 [&>button]:border-0 [&>button]:bg-transparent [&>button]:shadow-none [&>button:hover]:bg-muted",n),children:t}):null}r(ei,"RouteActions");function Ks(e){return e.interaction==="disclosure"}r(Ks,"isDisclosureRouteItem");function Qf(e){let t=new Set,o=new Set,n=new Set;for(let a of e){let i=a.id;if(t.has(i))throw new RangeError(`NavigationSidebar route item ids must be unique; received "${i}" more than once.`);if(t.add(i),Ks(a)){if(!a.children.length)throw new RangeError(`NavigationSidebar disclosure item "${a.id}" must include at least one child.`);if(a.href!==void 0||a.to!==void 0||a.onClick!==void 0)throw new TypeError(`NavigationSidebar disclosure item "${i}" cannot define href, to, or onClick.`);n.add(a.id);}else if(a.childrenPresentation==="collapsible"){if(!a.children?.length)throw new RangeError(`NavigationSidebar collapsible route item "${a.id}" must include at least one child.`);n.add(a.id);}for(let u of a.children??[]){if(o.has(u.id))throw new RangeError(`NavigationSidebar route child ids must be unique; received "${u.id}" more than once.`);o.add(u.id);}}return n}r(Qf,"validateRouteItems");function ey({item:e,expanded:t,controls:o,label:n,onToggle:a,classNames:i}){let s=typeof e.label=="string"?e.label:e.id;return jsxRuntime.jsx("button",{type:"button",disabled:e.disabled,"aria-expanded":t,"aria-controls":o,"aria-label":`${n}: ${s}`,title:n,"data-navigation-sidebar-disclosure-trigger":e.id,className:l("inline-flex h-8 w-7 shrink-0 items-center justify-center rounded-md border-0 bg-transparent text-muted-foreground shadow-none outline-hidden hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",i?.childMenuTrigger),onClick:a,children:jsxRuntime.jsx(Ya,{expanded:t})})}r(ey,"RouteChildrenToggle");function ti({item:e,activeChildId:t,label:o,onChildSelect:n,classNames:a,appearance:i,triggerVariant:s="submenu",mobile:u=false}){let c=(e.children??[]).filter(p=>!p.disabled);if(!e.children?.length||s==="submenu"&&(!n||c.length===0))return null;let d=typeof e.label=="string"?e.label:e.id,g=!!e.disabled||!n||c.length===0,m=e.domProps??{};return jsxRuntime.jsxs(Gt__namespace.Root,{children:[jsxRuntime.jsx(Gt__namespace.Trigger,{asChild:true,children:s==="item"&&i?jsxRuntime.jsx("button",{...m,type:"button",disabled:g,"aria-label":`${o}: ${d}`,title:o,"data-navigation-sidebar-item-id":e.id,"data-navigation-sidebar-disclosure-menu":"true",className:$s({item:e,active:false,collapsed:!u,mobile:u,appearance:i,classNames:a,domClassName:m.className}),children:jsxRuntime.jsx(js,{appearance:i,item:e,collapsed:!u,mobile:u,classNames:a,endIndicator:u?jsxRuntime.jsx(Ya,{expanded:false}):void 0})}):jsxRuntime.jsx("button",{type:"button",disabled:s==="disclosure"?g:void 0,"data-navigation-sidebar-disclosure-trigger":s==="disclosure"?e.id:void 0,className:l("inline-flex h-8 shrink-0 items-center justify-center rounded-md border-0 bg-transparent text-muted-foreground shadow-none outline-hidden hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",s==="disclosure"?"w-7":"w-6",a?.childMenuTrigger),"aria-label":`${o}: ${d}`,title:o,children:s==="disclosure"?jsxRuntime.jsx(Ya,{expanded:false}):jsxRuntime.jsx(Gf,{})})}),jsxRuntime.jsx(Gt__namespace.Portal,{children:jsxRuntime.jsx(Gt__namespace.Content,{side:"right",align:"start",sideOffset:8,className:l("z-50 min-w-40 rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md outline-hidden",a?.childMenuContent),children:e.children?.map(p=>jsxRuntime.jsxs(Gt__namespace.Item,{disabled:p.disabled,"data-navigation-sidebar-child-id":p.id,"data-active":p.id===t?"true":"false",className:l("flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",p.id===t&&"bg-accent text-accent-foreground"),onSelect:()=>n?.(p,e),children:[O(p.icon)?jsxRuntime.jsx("span",{"aria-hidden":"true",children:p.icon}):null,jsxRuntime.jsx("span",{className:"truncate",children:p.label})]},p.id))})})]})}r(ti,"CollapsedChildMenu");function ty({props:e,collapsed:t,appearance:o}){let{routeItems:n,activeItemId:a,activeChildId:i,expandedItemIds:s,defaultExpandedItemIds:u=[],itemAs:c,onItemSelect:d,onChildSelect:g,onExpandedItemIdsChange:m,collapsedChildMenuLabel:p="Open submenu",disclosureLabel:f="Toggle submenu",ariaLabel:b,classNames:v}=e,y=lt.useId(),x=lt.useMemo(()=>Qf(n),[n]),[w,h]=lt.useState(()=>u),k=s!==void 0,C=s??w,T=lt.useMemo(()=>C.filter(R=>x.has(R)),[x,C]),S=lt.useMemo(()=>new Set(T),[T]),I=lt.useCallback(R=>{if(R.disabled||!x.has(R.id))return;let W=S.has(R.id)?T.filter(H=>H!==R.id):[...T,R.id];k||h(W),m?.(W);},[x,S,k,T,m]);return jsxRuntime.jsx("nav",{"aria-label":b,children:jsxRuntime.jsx("ul",{className:l("grid list-none gap-2 p-0",o.unified&&"gap-0.5",v?.list),children:n.map((R,W)=>{let H=Ks(R),L=!H&&R.id===a,F=!!R.children?.length,$=x.has(R.id),M=!$||S.has(R.id),G=!t&&O(R.actions),Y=t&&F&&!!g||!t&&$&&!H||G,N=`${y}-route-children-${W}`;return jsxRuntime.jsxs("li",{className:"grid min-w-0 gap-1",children:[t&&H?jsxRuntime.jsx(ti,{item:R,activeChildId:i,label:p,onChildSelect:g,classNames:v,appearance:o,triggerVariant:"item"}):jsxRuntime.jsxs("div",{"data-navigation-sidebar-item-row":Y?R.id:void 0,"data-active":Y?String(L):void 0,className:Y?Za({active:L,appearance:o}):void 0,children:[jsxRuntime.jsx(Xa,{item:R,active:L,collapsed:t,embedded:Y,itemAs:H?"button":c,appearance:o,classNames:v,onSelect:H?()=>I(R):d?()=>d(R):void 0,ariaControls:!t&&$&&H?N:void 0,ariaExpanded:!t&&$&&H?M:void 0,endIndicator:!t&&H&&!G?jsxRuntime.jsx(Ya,{expanded:M}):void 0}),G?jsxRuntime.jsx(ei,{itemId:R.id,actions:R.actions,kind:"item",className:v?.itemActions}):null,t&&g?jsxRuntime.jsx(ti,{item:R,activeChildId:i,label:p,onChildSelect:g,classNames:v}):null,!t&&$&&(!H||G)?jsxRuntime.jsx(ey,{item:R,expanded:M,controls:N,label:f,onToggle:()=>I(R),classNames:v}):null]}),!t&&F?jsxRuntime.jsx("ul",{id:N,hidden:!M,style:M?void 0:{display:"none"},className:l("ml-5 grid list-none gap-0.5 border-l border-border/70 py-1 pl-3",o.unified&&"border-border",v?.childList),children:R.children?.map(D=>{let B=O(D.actions),K=D.id===i,J=jsxRuntime.jsx(Zf,{child:D,parent:R,active:K,interactive:!!g,onSelect:g,appearance:o,classNames:v,embedded:B});return jsxRuntime.jsx("li",{children:B?jsxRuntime.jsxs("div",{"data-navigation-sidebar-child-row":D.id,"data-active":String(K),className:Za({active:K,appearance:o}),children:[J,jsxRuntime.jsx(ei,{itemId:D.id,actions:D.actions,kind:"child",className:v?.childActions})]}):J},D.id)})}):null]},R.id)})})})}r(ty,"RouteContent");function oy(e,t,o){return [...Qa(e,o),...t.flatMap(n=>Qa(n.items,o))]}r(oy,"flattenCatalogItems");function ny({props:e,appearance:t}){if(!e.mobile||e.mobile.mode!=="horizontal")return null;let o=e.classNames,n=e.kind==="catalog"?oy(e.items??[],e.sections??[],e.activeFilterId):e.routeItems;return jsxRuntime.jsx("nav",{"aria-label":e.ariaLabel,className:l("flex gap-2 overflow-x-auto pb-1",o?.mobileNav,e.mobile.className),children:n.map(a=>{let i={...o,mobileItem:l(o?.mobileItem,e.mobile?.itemClassName)},s=e.kind==="route"?a:void 0,u=s!==void 0&&O(s.actions);if(e.kind==="route"&&Ks(a))return u?jsxRuntime.jsxs("div",{"data-navigation-sidebar-item-row":a.id,"data-active":"false",className:l(Za({active:false,appearance:t}),"shrink-0"),children:[jsxRuntime.jsx(Jf,{item:a,appearance:t,classNames:i}),jsxRuntime.jsx(ei,{itemId:a.id,actions:a.actions,kind:"item",className:o?.itemActions,mobile:true}),jsxRuntime.jsx(ti,{item:a,activeChildId:e.activeChildId,label:e.collapsedChildMenuLabel??"Open submenu",onChildSelect:e.onChildSelect,classNames:i,appearance:t,triggerVariant:"disclosure",mobile:true})]},a.id):jsxRuntime.jsx(lt.Fragment,{children:jsxRuntime.jsx(ti,{item:a,activeChildId:e.activeChildId,label:e.collapsedChildMenuLabel??"Open submenu",onChildSelect:e.onChildSelect,classNames:i,appearance:t,triggerVariant:"item",mobile:true})},a.id);let c=e.kind==="catalog"?a.active??a.id===e.activeItemId:a.id===e.activeItemId,d=jsxRuntime.jsx(Xa,{item:a,active:c,collapsed:false,embedded:u,itemAs:e.itemAs,appearance:t,classNames:i,mobile:true,onSelect:e.kind==="route"&&e.onItemSelect?()=>e.onItemSelect?.(a):void 0});return u&&s?jsxRuntime.jsxs("div",{"data-navigation-sidebar-item-row":a.id,"data-active":String(c),className:l(Za({active:c,appearance:t}),"shrink-0"),children:[d,jsxRuntime.jsx(ei,{itemId:s.id,actions:s.actions,kind:"item",className:o?.itemActions,mobile:true})]},a.id):jsxRuntime.jsx(lt.Fragment,{children:d},a.id)})})}r(ny,"MobileNavigation");function ry(e,t){let o=$f(e);e.width!==void 0&&Fn("width",e.width);let n=lt.useRef(null);n.current||(n.current=jf(e,o));let a=lt.useRef(null),[i,s]=lt.useState(n.current.collapsed),[u,c]=lt.useState(n.current.width),[d,g]=lt.useState(e.search?.defaultValue??""),[m,p]=lt.useState(false),f=e.collapsed??i,b=Ja(e.width??u,o),v=e.search?.value??d,y=e.collapsed!==void 0,x=e.width!==void 0,w=lt.useMemo(()=>Uf(e.appearance),[e.appearance]),h=e.collapsible??true,k=e.resizable??true,C=h?e.collapsePlacement??"header":"none",T=e.collapseLabel??"Collapse sidebar",S=e.expandLabel??"Expand sidebar",I=e.resizeLabel??"Resize sidebar",R=!f||o.collapsedWidth>0,W=r(Y=>{a.current=Y,_f(t,Y);},"setSidebarRef"),H=lt.useCallback(Y=>{!h&&Y||(y||s(Y),e.onCollapsedChange?.(Y));},[h,y,e.onCollapsedChange]),L=lt.useCallback(Y=>{let N=Ja(Y,o);x||c(N),e.onWidthChange?.(N);},[o.maxWidth,o.minWidth,x,e.onWidthChange]);lt.useEffect(()=>{if(!e.storageKey)return;let Y=Ic(e.storage);if(Y)try{Y.setItem(e.storageKey,JSON.stringify({collapsed:f,width:b}));}catch(N){Nc(N,e.onStorageError);}},[e.onStorageError,e.storage,e.storageKey,f,b]),lt.useEffect(()=>{if(!m)return;let Y=document.body.style.cursor,N=document.body.style.userSelect,D=r(K=>{let J=a.current;if(!J)return;let V=K.clientX-J.getBoundingClientRect().left;if(h&&V<o.collapseThreshold){H(true);return}H(false),L(V);},"handlePointerMove"),B=r(()=>p(false),"handlePointerUp");return window.addEventListener("pointermove",D),window.addEventListener("pointerup",B),document.body.style.cursor="col-resize",document.body.style.userSelect="none",()=>{window.removeEventListener("pointermove",D),window.removeEventListener("pointerup",B),document.body.style.cursor=Y,document.body.style.userSelect=N;}},[o.collapseThreshold,h,m,H,L]);let F=r(Y=>{if(!(Y.key!=="ArrowLeft"&&Y.key!=="ArrowRight")){if(Y.preventDefault(),Y.key==="ArrowLeft"){let N=b-24;h&&N<o.collapseThreshold?H(true):L(N);return}f&&H(false),L(Math.max(b+24,o.minWidth));}},"handleResizeKeyDown"),$=r(Y=>jsxRuntime.jsx("button",{type:"button",className:l("inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-md text-muted-foreground outline-hidden transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",e.classNames?.collapseButton,Y),"aria-label":f?S:T,title:f?S:T,"aria-expanded":!f,onClick:()=>H(!f),children:jsxRuntime.jsx(Ff,{collapsed:f})}),"collapseButton"),M=O(e.title)||O(e.headerLeading)||O(e.headerActions)||C==="header",G=r(()=>{if(e.kind==="catalog")return jsxRuntime.jsx(Xf,{props:e,collapsed:f,appearance:w});if(e.kind==="route")return jsxRuntime.jsx(ty,{props:e,collapsed:f,appearance:w});let Y=e.tree;return jsxRuntime.jsx(Fs,{...Y,classNames:w.unified?wc(w.itemHeight,w.itemPadding,Y.classNames):Yf(Y.classNames)})},"renderContent");return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("aside",{...e.rootDomProps,ref:W,"aria-label":e.ariaLabel,"data-monkeys-component":e.dataComponent??"navigation-sidebar","data-navigation-sidebar-kind":e.kind,"data-navigation-sidebar-preset":e.appearance?.preset,"data-collapsed":f?"true":"false",className:l("relative flex h-full min-h-0 shrink-0 flex-col overflow-visible rounded-[calc(var(--radius)+0.25rem)] border transition-[width,opacity] duration-300 motion-reduce:transition-none",w.root,e.desktopClassName,e.classNames?.root,e.rootDomProps?.className,e.className),style:{...w.unified?kc(e.appearance?.activeVariant):{},...e.style,width:e.widthMode==="fill"?void 0:f?o.collapsedWidth:b,transition:m?"none":e.style?.transition},children:[k?jsxRuntime.jsx("button",{type:"button",role:"separator","aria-orientation":"vertical","aria-valuemin":o.minWidth,"aria-valuemax":o.maxWidth,"aria-valuenow":b,"aria-label":I,title:I,className:l("group/resize absolute -right-1.5 bottom-0 top-0 z-40 w-3 cursor-col-resize bg-transparent outline-hidden focus-visible:ring-2 focus-visible:ring-ring",e.classNames?.resizeHandle),onPointerDown:Y=>{Y.preventDefault(),p(true);},onKeyDown:F,children:jsxRuntime.jsx("span",{className:"pointer-events-none absolute bottom-3 right-1/2 top-3 w-px translate-x-1/2 rounded-full bg-border opacity-0 transition-opacity group-hover/resize:opacity-100 group-focus-visible/resize:opacity-100"})}):null,C==="edge"?$("absolute -right-3 top-1/2 z-50 -translate-y-1/2 border border-border bg-background shadow-sm"):null,R?jsxRuntime.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-col overflow-hidden",children:[M?jsxRuntime.jsxs("div",{className:l("flex min-h-12 min-w-0 items-center gap-2 border-b border-border/60 px-3",w.unified&&"min-h-14 border-border px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))]",f&&"justify-center px-1",e.classNames?.header),children:[O(e.headerLeading)?jsxRuntime.jsx("span",{className:l("flex shrink-0 items-center justify-center",e.classNames?.headerLeading),children:e.headerLeading}):null,!f&&O(e.title)?jsxRuntime.jsx("div",{className:l("min-w-0 flex-1 truncate text-sm font-semibold",e.classNames?.title),children:e.title}):null,!f&&O(e.headerActions)?jsxRuntime.jsx("div",{className:l("flex shrink-0 items-center gap-1",e.classNames?.headerActions),children:e.headerActions}):null,C==="header"?$():null]}):null,!f&&e.search?jsxRuntime.jsx("div",{className:l("px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))] pb-2 pt-3",w.unified&&"pb-1",e.classNames?.search),children:jsxRuntime.jsxs("div",{className:l("flex items-center gap-2 rounded-md border border-input bg-[var(--monkeys-component-navigation-sidebar-search-background,hsl(var(--monkeys-color-control-surface)))] px-3 text-muted-foreground ring-offset-control-surface focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",w.searchHeight,w.unified&&"rounded-[var(--radius)] border-border bg-[var(--monkeys-component-navigation-sidebar-search-background,transparent)] px-2"),children:[jsxRuntime.jsx("span",{className:l("flex shrink-0",w.unified&&Mr,e.classNames?.searchIcon),"aria-hidden":"true",children:e.search.icon??jsxRuntime.jsx(Hf,{})}),jsxRuntime.jsx("input",{type:"search",value:v,placeholder:e.search.placeholder,"aria-label":e.search.ariaLabel,className:l("min-w-0 flex-1 bg-transparent text-sm text-foreground outline-hidden placeholder:text-muted-foreground",e.classNames?.searchInput),onChange:Y=>{let N=Y.currentTarget.value;e.search?.value===void 0&&g(N),e.search?.onValueChange?.(N);}}),v&&e.search.clearLabel?jsxRuntime.jsx("button",{type:"button",className:l("inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",e.classNames?.searchClear),"aria-label":e.search.clearLabel,title:e.search.clearLabel,onClick:()=>{e.search?.value===void 0&&g(""),e.search?.onValueChange?.("");},children:jsxRuntime.jsx(Vf,{})}):null]})}):null,jsxRuntime.jsx("div",{className:l("min-h-0 flex-1 overflow-y-auto px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))] py-3",w.unified&&e.search&&"pt-1",f&&"px-1.5",e.classNames?.content),children:G()}),O(e.footer)||C==="footer"?jsxRuntime.jsxs("div",{className:l("flex shrink-0 items-center gap-2 border-t border-border/70 p-3",w.unified&&"border-border",f&&"justify-center px-1",e.classNames?.footer),children:[!f&&O(e.footer)?jsxRuntime.jsx("div",{className:"min-w-0 flex-1",children:e.footer}):null,C==="footer"?$():null]}):null]}):null]}),e.kind!=="tree"?jsxRuntime.jsx(ny,{props:e,appearance:w}):null]})}r(ry,"NavigationSidebarInner");var Er=lt.forwardRef(ry);var iy=lt.forwardRef(r(function({title:t,items:o,sections:n=[],activeItemId:a,onItemSelect:i,itemAs:s,collapsed:u,defaultCollapsed:c=false,onCollapsedChange:d,width:g,onWidthChange:m,defaultWidth:p=220,minWidth:f=180,maxWidth:b=420,collapsedWidth:v=60,collapseThreshold:y=140,storageKey:x,resizable:w=true,collapsible:h=true,collapseLabel:k="Collapse sidebar",expandLabel:C="Expand sidebar",resizeLabel:T="Resize sidebar",desktopClassName:S="hidden md:flex",mobileClassName:I="flex md:hidden",className:R,classNames:W,style:H,...L},F){let{level:$,variables:M}=dr(),G=ha(L),Y=r(N=>({...N,icon:N.icon??(N.iconName?jsxRuntime.jsx(On,{icon:{kind:"lucide",name:N.iconName},alt:"",className:"h-4 w-4 rounded-none bg-transparent"}):void 0),endContent:N.endContent??(N.count!==void 0?jsxRuntime.jsx(bn,{children:N.count}):void 0),onClick:r(D=>{N.disabled||(N.onClick?.(D),D.defaultPrevented||i?.({itemId:N.id}));},"onClick")}),"project");return jsxRuntime.jsx(Mn,{depth:$,children:jsxRuntime.jsx(Er,{ref:F,kind:"catalog",title:t,items:o.map(Y),sections:n.map(N=>({...N,items:N.items.map(Y)})),activeItemId:a,itemAs:s,collapsed:u,defaultCollapsed:c,onCollapsedChange:d,width:g,onWidthChange:m,defaultWidth:p,minWidth:f,maxWidth:b,collapsedWidth:v,collapseThreshold:y,storageKey:x,resizable:w,collapsible:h,collapsePlacement:"header",collapseLabel:k,expandLabel:C,resizeLabel:T,desktopClassName:S,dataComponent:"workbench-resizable-sidebar",rootDomProps:{...L,...G,"data-workbench-resizable-sidebar":"","data-monkeys-bento-level":$},appearance:{density:"compact",surface:"panel",activeVariant:"soft"},mobile:{mode:"horizontal",className:I},className:l(Qi,"[&>div]:gap-[var(--monkeys-bento-gap)] [--monkeys-sidebar-item-padding:var(--monkeys-bento-gap)] data-[collapsed=true]:[--monkeys-sidebar-item-padding:0px]",W?.root,R),classNames:{root:W?.root,header:l("min-h-0 gap-[var(--monkeys-bento-gap)] border-0 p-0",W?.header),title:l("text-xs font-medium uppercase text-muted-foreground",W?.title),collapseButton:l("h-8 w-8",W?.collapseButton),content:l("space-y-[var(--monkeys-bento-gap)] p-0",W?.list),list:"[&_ul]:gap-[var(--monkeys-bento-gap)]",section:l("mt-[var(--monkeys-bento-gap)]",W?.section),sectionLabel:l("mb-[var(--monkeys-bento-gap)] px-[var(--monkeys-bento-gap)]",W?.sectionLabel),item:l("h-auto min-h-9 gap-[var(--monkeys-bento-gap)] rounded-md px-[var(--monkeys-sidebar-item-padding)] py-[calc(var(--monkeys-bento-gap)/2)] text-sm shadow-none",W?.item),itemIcon:l("[&_svg]:h-3.5 [&_svg]:w-3.5",W?.itemIcon),itemLabel:W?.itemLabel,resizeHandle:W?.resizeHandle,mobileNav:l("gap-[var(--monkeys-bento-gap,var(--global-spacing,0.75rem))] pb-0",W?.mobileNav),mobileItem:l("h-auto min-h-9 w-auto shrink-0 gap-[var(--monkeys-bento-gap,var(--global-spacing,0.75rem))] px-[var(--monkeys-bento-gap,var(--global-spacing,0.75rem))] py-[calc(var(--monkeys-bento-gap,var(--global-spacing,0.75rem))/2)] text-sm",W?.mobileItem)},style:{...M,...H}})})},"WorkbenchResizableSidebar"));function ly(e){return !!(e.header||e.footer||e.bodyAs||e.bodyClassName||e.bodyProps||e.classNames?.body)}r(ly,"shouldRenderBodyWrapper");var dy=lt.forwardRef(r(function({as:t="section",bodyAs:o="div",header:n,footer:a,children:i,className:s,headerClassName:u,bodyClassName:c,footerClassName:d,bodyProps:g,classNames:m,style:p,...f},b){let v=ly({header:n,footer:a,bodyAs:o==="div"?void 0:o,bodyClassName:c,bodyProps:g,classNames:m}),{className:y,...x}=g??{};return jsxRuntime.jsxs(t,{ref:b,"data-workbench-content-pane":true,className:l("workbench-surface-subtle flex h-full min-w-0 flex-1 flex-col overflow-hidden rounded-lg border border-border/50 transition-all duration-300 dark:border-border/40",m?.root,s),style:p,...f,children:[n?jsxRuntime.jsx("div",{className:l("shrink-0 border-b border-border/40 px-4 py-3 dark:border-border/30",m?.header,u),children:n}):null,v?jsxRuntime.jsx(o,{className:l("min-h-0 flex-1 overflow-hidden",m?.body,c,y),...x,children:i}):i,a?jsxRuntime.jsx("div",{className:l("shrink-0 border-t border-border/40 px-4 py-3 dark:border-border/30",m?.footer,d),children:a}):null]})},"WorkbenchContentPane"));var Ec={settingsButton:"Gallery settings",title:"Gallery settings",visibleColumns:"Visible fields",coverField:"Cover field",autoDetect:"Auto",cardDensity:"Card density",cardColumns:"Cards per row",detailColumns:"Detail columns",fieldVisibility:"Field visibility",fieldLimit:"Field limit",fieldLimitHint:"Uses current field order",layout:"Gallery layout",compact:"Compact",comfortable:"Standard",detailed:"Detailed",autoColumns:"Auto",columns:r(e=>`${e}`,"columns"),bentoColumns:r(e=>`${e}`,"bentoColumns"),topLimit:"First fields",allFields:"All fields",adaptiveGrid:"Grid",masonry:"Masonry"};function Qo(e){return String(e?.key||"")}r(Qo,"normalizeColumnKey");function py(e){return e.label??e.key}r(py,"getDefaultColumnLabel");function gy(e){return e.filter(t=>Qo(t)&&t.hidden!==true).map(t=>Qo(t))}r(gy,"getDefaultVisibleColumnKeys");function by({columns:e,visibleColumnKeys:t,allowEmptyVisibleColumns:o}){let n=new Set(e.map(Qo).filter(Boolean)),a=Array.isArray(t)?t.filter(i=>n.has(String(i))):null;return a&&(a.length||o)?a:gy(e)}r(by,"getResolvedVisibleColumnKeys");function fy(e){return [{value:"compact",label:e.compact},{value:"comfortable",label:e.comfortable},{value:"detailed",label:e.detailed}]}r(fy,"getDefaultDensityOptions");function yy(e){return [{value:"auto",label:e.autoColumns},{value:1,label:e.columns(1)},{value:2,label:e.columns(2)},{value:3,label:e.columns(3)},{value:4,label:e.columns(4)}]}r(yy,"getDefaultGridColumnOptions");function hy(e){return [{value:1,label:e.bentoColumns(1)},{value:2,label:e.bentoColumns(2)},{value:3,label:e.bentoColumns(3)}]}r(hy,"getDefaultBentoColumnOptions");function xy(e){return [{value:"limit",label:e.topLimit},{value:"all",label:e.allFields}]}r(xy,"getDefaultDetailVisibilityOptions");function vy(e){return [{value:"fixed",label:e.adaptiveGrid},{value:"masonry",label:e.masonry}]}r(vy,"getDefaultLayoutOptions");function Dr(e){return String(e)}r(Dr,"normalizeOptionValue");function Wr(e,t,o){let n=String(t??o);return e.some(a=>String(a.value)===n)?n:String(o)}r(Wr,"getOptionValue");function Pc(e){let t=Number.parseInt(e,10);return Number.isFinite(t)?t:1}r(Pc,"parseNumberOption");var Lr={root:"flex w-full flex-wrap",item:"min-w-[58px] flex-1 px-2 text-[11px]",label:"text-[11px]"};function Dc({columns:e=[],galleryFieldOptions:t,value:o,onValueChange:n,labels:a,densityOptions:i,gridColumnOptions:s,bentoColumnOptions:u,detailVisibilityOptions:c,layoutOptions:d,getColumnLabel:g=py,getColumnDescription:m,showColumnVisibility:p=true,showGalleryControls:f=true,showLayoutControl:b=true,showGridColumns:v=true,showDetailColumns:y=true,allowEmptyVisibleColumns:x=false,className:w,classNames:h}){let k={...Ec,...a},C=o||{},T=e.filter(B=>Qo(B)),S=by({columns:T,visibleColumnKeys:C.visibleColumnKeys,allowEmptyVisibleColumns:x}),I=new Set(S),R=(t||T).filter(B=>Qo(B)),W=i||fy(k),H=s||yy(k),L=u||hy(k),F=c||xy(k),$=d||vy(k),M=typeof n=="function",G=r(B=>{n?.({...C,...B},B);},"updateValue"),Y=r(B=>{if(!M)return;let K=new Set(S);K.has(B)?K.delete(B):K.add(B);let J=T.map(Qo).filter(V=>K.has(V));!J.length&&!x&&(J=[B]),G({visibleColumnKeys:J});},"toggleColumn"),N=p&&T.length>0,D=f;return jsxRuntime.jsxs("div",{className:l("space-y-3 text-foreground",h?.root,w),children:[N?jsxRuntime.jsxs("section",{className:l("space-y-2",h?.section),children:[jsxRuntime.jsx("div",{className:l("text-[10px] font-medium uppercase tracking-wide text-muted-foreground",h?.sectionHeader),children:k.visibleColumns}),jsxRuntime.jsx("div",{className:l("max-h-[220px] space-y-1 overflow-y-auto pr-1",h?.columnList),children:T.map(B=>{let K=Qo(B);return jsxRuntime.jsx(pn,{checked:I.has(K),disabled:!M,label:g(B),description:m?.(B),onChange:()=>Y(K),className:l("flex w-full rounded-lg px-2 py-1.5 hover:bg-muted/50",h?.columnItem)},`workbench-gallery-column-${K}`)})})]}):null,D?jsxRuntime.jsxs("section",{className:l("space-y-3 border-t border-border/60 pt-3",h?.section),children:[jsxRuntime.jsx(Po,{label:k.coverField,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(po,{value:String(C.galleryFieldKey||"auto"),options:[{value:"auto",label:k.autoDetect},...R.map(B=>({value:Qo(B),label:g(B)}))],disabled:!M,onChange:B=>G({galleryFieldKey:B.currentTarget.value||"auto"}),className:h?.control})}),jsxRuntime.jsx(Po,{label:k.cardDensity,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(yn,{value:Wr(W,C.galleryDensity,"comfortable"),options:W.map(B=>({value:Dr(B.value),label:B.label,disabled:B.disabled})),onValueChange:B=>G({galleryDensity:B}),className:l("w-full",h?.control),classNames:Lr})}),v?jsxRuntime.jsx(Po,{label:k.cardColumns,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(yn,{value:Wr(H,C.galleryGridColumns,"auto"),options:H.map(B=>({value:Dr(B.value),label:B.label,disabled:B.disabled})),onValueChange:B=>G({galleryGridColumns:B==="auto"?"auto":Pc(B)}),className:l("w-full",h?.control),classNames:Lr})}):null,y?jsxRuntime.jsx(Po,{label:k.detailColumns,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(yn,{value:Wr(L,C.galleryBentoColumns,2),options:L.map(B=>({value:Dr(B.value),label:B.label,disabled:B.disabled})),onValueChange:B=>G({galleryBentoColumns:Pc(B)}),className:l("w-full",h?.control),classNames:Lr})}):null,jsxRuntime.jsx(Po,{label:k.fieldVisibility,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(yn,{value:Wr(F,C.galleryDetailVisibility,"limit"),options:F.map(B=>({value:Dr(B.value),label:B.label,disabled:B.disabled})),onValueChange:B=>G({galleryDetailVisibility:B}),className:l("w-full",h?.control),classNames:Lr})}),C.galleryDetailVisibility!=="all"?jsxRuntime.jsx(Po,{label:k.fieldLimit,description:k.fieldLimitHint,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground",description:"text-[10px]"},children:jsxRuntime.jsx(to,{type:"number",min:1,step:1,value:String(C.galleryDetailLimit||4),disabled:!M,onChange:B=>G({galleryDetailLimit:B.currentTarget.value}),className:h?.control})}):null,b?jsxRuntime.jsx(Po,{label:k.layout,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(yn,{value:Wr($,C.galleryLayout,"fixed"),options:$.map(B=>({value:Dr(B.value),label:B.label,disabled:B.disabled})),onValueChange:B=>G({galleryLayout:B}),className:l("w-full",h?.control),classNames:Lr})}):null]}):null]})}r(Dc,"WorkbenchGallerySettingsPanel");function ni({open:e,defaultOpen:t=false,onOpenChange:o,triggerIcon:n,triggerLabel:a,triggerTitle:i,align:s="end",popoverWidth:u=320,panelHeader:c,panelBefore:d,panelAfter:g,panelClassName:m,buttonClassName:p,popoverClassName:f,buttonClassNames:b,labels:v,className:y,classNames:x,...w}){let h={...Ec,...v},k=lt.useRef(null),[C,T]=lt.useState(t),[S,I]=lt.useState({}),R=e!==void 0,W=R?!!e:C,H=r($=>{R||T($),o?.($);},"setOpen");lt.useLayoutEffect(()=>{if(!W)return;let $=r(()=>{let Y=k.current?.getBoundingClientRect();if(!Y||typeof window>"u")return;let N=12,D=Math.max(window.innerWidth-N*2,0),B=Math.min(u,D||u),K=s==="start"?Y.left:Y.right-B,J=Math.min(Math.max(K,N),Math.max(window.innerWidth-B-N,N)),V=Math.min(Y.bottom+8,Math.max(window.innerHeight-80,N));I({left:J,top:V,width:B,maxHeight:`calc(100vh - ${Math.round(V+N)}px)`});},"updatePopoverPosition"),M=r(Y=>{k.current?.contains(Y.target)||H(false);},"handlePointerDown"),G=r(Y=>{Y.key==="Escape"&&H(false);},"handleKeyDown");return $(),window.addEventListener("resize",$),window.addEventListener("scroll",$,true),window.addEventListener("pointerdown",M),window.addEventListener("keydown",G),()=>{window.removeEventListener("resize",$),window.removeEventListener("scroll",$,true),window.removeEventListener("pointerdown",M),window.removeEventListener("keydown",G);}},[s,W,u]);let L=a??h.settingsButton,F=c??h.title;return jsxRuntime.jsxs("div",{ref:k,className:l("relative inline-flex",b?.root,y),children:[jsxRuntime.jsx(ve,{icon:n,label:L,title:i||(typeof L=="string"?L:void 0),iconOnly:!!n,active:W,tone:"muted","aria-haspopup":"dialog","aria-expanded":W,className:l(b?.trigger,p),onClick:()=>H(!W)}),W?jsxRuntime.jsxs("div",{role:"dialog","aria-label":typeof F=="string"?F:void 0,className:l("fixed z-50 overflow-y-auto rounded-xl border border-border bg-card p-3 text-foreground shadow-lg",s==="start"?"origin-top-left":"origin-top-right",b?.popover,f),style:S,children:[F?jsxRuntime.jsx("div",{className:l("mb-3 text-[11px] font-medium text-foreground",b?.header),children:F}):null,d,jsxRuntime.jsx(Dc,{...w,labels:h,className:l(b?.panel,m),classNames:x}),g]}):null]})}r(ni,"WorkbenchGallerySettingsButton");function zc(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[jsxRuntime.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),jsxRuntime.jsx("path",{d:"M3 10h18M9 4v16"})]})}r(zc,"TableViewIcon");function Oc(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[jsxRuntime.jsx("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1.5"})]})}r(Oc,"GalleryViewIcon");function Wc(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[jsxRuntime.jsx("path",{d:"M20 7h-9M7 7H4M14 17H4M20 17h-3"}),jsxRuntime.jsx("circle",{cx:"9",cy:"7",r:"2"}),jsxRuntime.jsx("circle",{cx:"16",cy:"17",r:"2"})]})}r(Wc,"SettingsIcon");function Ty({open:e}){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:l("h-3 w-3 opacity-55 transition-transform",e&&"rotate-180"),fill:"none",stroke:"currentColor",strokeWidth:"2",children:jsxRuntime.jsx("path",{d:"m6 9 6 6 6-6"})})}r(Ty,"ChevronDownIcon");var Ry=[{value:"list",label:"Table view",icon:jsxRuntime.jsx(zc,{})},{value:"gallery",label:"Gallery view",icon:jsxRuntime.jsx(Oc,{})}];function Lc(e){return e.icon!==void 0?e.icon:e.value==="list"||e.value==="table"?jsxRuntime.jsx(zc,{}):e.value==="gallery"?jsxRuntime.jsx(Oc,{}):null}r(Lc,"getViewModeOptionIcon");function Ac(e){return e.triggerLabel??e.labels?.settingsButton??"Settings"}r(Ac,"getSettingsTriggerLabel");function Ny({value:e,options:t,onValueChange:o,classNames:n}){let a=lt.useRef(null),[i,s]=lt.useState(false),u=t.find(d=>d.value===e)||t.find(d=>!d.disabled)||t[0],c=u?Lc(u):null;return lt.useEffect(()=>{if(!i)return;let d=r(m=>{a.current?.contains(m.target)||s(false);},"handlePointerDown"),g=r(m=>{m.key==="Escape"&&s(false);},"handleKeyDown");return window.addEventListener("pointerdown",d),window.addEventListener("keydown",g),()=>{window.removeEventListener("pointerdown",d),window.removeEventListener("keydown",g);}},[i]),u?jsxRuntime.jsxs("div",{ref:a,className:l("relative inline-flex",n?.viewModeRoot),children:[jsxRuntime.jsxs("button",{type:"button","aria-haspopup":"listbox","aria-expanded":i,className:l("inline-flex h-7 min-w-0 items-center justify-center gap-1.5 rounded-md border border-border/70 bg-card px-2 text-xs font-medium text-foreground shadow-none transition-colors hover:bg-muted/50 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/25",n?.viewModeTrigger),onClick:()=>s(d=>!d),children:[c?jsxRuntime.jsx("span",{className:"inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center text-muted-foreground",children:c}):null,jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:u.label}),jsxRuntime.jsx(Ty,{open:i})]}),i?jsxRuntime.jsx("div",{role:"listbox",className:l("absolute left-0 top-full z-50 mt-2 min-w-[160px] overflow-hidden rounded-xl border border-border/60 bg-card/95 p-1.5 text-xs text-foreground shadow-lg backdrop-blur-xl",n?.viewModeMenu),children:t.map(d=>{let g=d.value===u.value,m=Lc(d);return jsxRuntime.jsxs("button",{type:"button",role:"option","aria-selected":g,disabled:d.disabled,className:l("flex min-h-8 w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left text-xs font-medium text-muted-foreground transition-colors hover:bg-muted/55 hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",g&&"bg-muted/60 text-foreground",n?.viewModeItem),onClick:()=>{d.disabled||(o?.(d.value,d),s(false));},children:[m?jsxRuntime.jsx("span",{className:"inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:m}):null,jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:d.label})]},d.value)})}):null]}):null}r(Ny,"WorkbenchContentToolbarViewModeControl");var qs=lt.forwardRef(r(function({as:t="div",children:o,end:n,viewMode:a,viewModeOptions:i,onViewModeChange:s,gallerySettings:u,gallerySettingsPlacement:c="start",className:d,startClassName:g,endClassName:m,classNames:p,...f},b){let v=i||(a?Ry:[]),y=u&&typeof u=="object"?u:null,x=!!v.length,w=!!y,h=w&&c!=="end",k=w&&c==="end",C=x||h||!!o,T=!!n||k;return jsxRuntime.jsxs(t,{ref:b,"data-workbench-content-toolbar":true,className:l("flex min-h-[46px] shrink-0 flex-col gap-2 border-b border-border/60 px-4 py-2 md:flex-row md:items-center md:justify-between",p?.root,d),...f,children:[C?jsxRuntime.jsxs("div",{className:l("flex flex-wrap items-center gap-2",p?.start,g),children:[x?jsxRuntime.jsx(Ny,{value:a,options:v,onValueChange:s,classNames:p}):null,h&&y?jsxRuntime.jsx(ni,{align:"end",triggerIcon:jsxRuntime.jsx(Wc,{}),triggerLabel:Ac(y),...y,buttonClassName:l("!h-7 !w-7 !min-h-0 !rounded-md !p-0 text-xs",p?.settings,y.buttonClassName)}):null,o]}):null,T?jsxRuntime.jsxs("div",{className:l("flex shrink-0 items-center gap-2",p?.end,m),children:[n,k&&y?jsxRuntime.jsx(ni,{align:"end",triggerIcon:jsxRuntime.jsx(Wc,{}),triggerLabel:Ac(y),...y,buttonClassName:l("!h-7 !w-7 !min-h-0 !rounded-md !p-0 text-xs",p?.settings,y.buttonClassName)}):null]}):null]})},"WorkbenchContentToolbar"));function By(e){return !!(e.header||e.footer||e.bodyAs||e.bodyClassName||e.bodyProps||e.classNames?.body)}r(By,"shouldRenderBodyWrapper");function Gc(e){if(e==null||typeof e=="boolean")return false;if(typeof e=="string")return e.trim().length>0;if(Array.isArray(e))return e.some(Gc);let t=lt.Children.toArray(e);return t.length?t.some(o=>typeof o=="string"?o.trim().length>0:true):false}r(Gc,"hasRenderableChildren");function Py(e,t){return t===void 0?{}:e===void 0?{width:t}:{width:e?t:0,opacity:e?1:0}}r(Py,"resolveWidthStyle");function Fc(e){return e.label??e.key}r(Fc,"getFallbackFieldLabel");function Ey(e){let t=["text","label","title","display","value","recordId"];for(let o of t){if(!Object.prototype.hasOwnProperty.call(e,o))continue;let n=e[o];if(n!=null&&n!=="")return n}}r(Ey,"getObjectDisplayValue");function Hc(e){return e==null||e===""}r(Hc,"isEmptyDetailValue");function Vc(e){return ["string","number","boolean"].includes(typeof e)}r(Vc,"isPlainDisplayValue");function _c(e){if(!e)return null;if(typeof e=="string"){let n=e.startsWith("data:image/"),a=/\.(avif|gif|jpe?g|png|svg|webp)(\?.*)?$/i.test(e);return n||a?{src:e}:null}if(typeof e!="object"||lt.isValidElement(e))return null;let t=e,o=t.src||t.url||t.thumbnail||t.preview||t.image;return o?{src:String(o),alt:t.alt||t.label||t.title||"",caption:t.caption||t.description||t.label||t.title}:null}r(_c,"getMediaDisplayData");function Dy(e,t){let o=String(e?.renderType||"").toLowerCase();return ["image","media","preview","thumbnail"].includes(o)||!!_c(t)}r(Dy,"shouldRenderAsMedia");function Wy(e,t){return e?typeof e=="string"||typeof e=="number"?jsxRuntime.jsx("span",{className:l("inline-flex h-3.5 min-w-3.5 shrink-0 items-center justify-center rounded-sm text-[10px] font-semibold text-primary",t),children:e}):typeof e=="boolean"?null:lt.isValidElement(e)?e:jsxRuntime.jsx(e,{className:l("h-3.5 w-3.5 shrink-0 text-primary",t)}):jsxRuntime.jsxs("span",{className:l("relative inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center",t),children:[jsxRuntime.jsx("span",{className:"absolute inset-0 rounded-full border border-primary/25 bg-primary/10"}),jsxRuntime.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-primary"})]})}r(Wy,"renderMaybeFieldIcon");function Ly(e,t,o){return jsxRuntime.jsxs("span",{className:l("inline-flex min-w-0 items-center gap-1.5 text-[11px] font-semibold text-foreground",o?.fieldLabel),children:[Wy(t.labelIcon||t.icon,o?.fieldLabelIcon),jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:e})]})}r(Ly,"renderDetailFieldLabel");function Ay({media:e,classNames:t}){return jsxRuntime.jsxs("div",{className:l("grid gap-2",t?.mediaValue),children:[jsxRuntime.jsx("div",{className:"overflow-hidden rounded-md border border-border/55 bg-muted/20 dark:border-border/45 dark:bg-muted/10",children:jsxRuntime.jsx("img",{src:e.src,alt:String(e.alt||""),className:l("block aspect-[16/9] w-full object-cover",t?.mediaImage)})}),e.caption?jsxRuntime.jsx("div",{className:l("truncate text-[11px] leading-4 text-muted-foreground",t?.mediaCaption),children:e.caption}):null]})}r(Ay,"WorkbenchDetailSidebarMediaValue");function Ys(e,t,o,n){if(Hc(e))return t;if(lt.isValidElement(e))return e;if(Dy(o,e)){let a=_c(e);if(a)return jsxRuntime.jsx(Ay,{media:a,classNames:n})}if(Array.isArray(e)){let a=e.map(i=>Ys(i,"",void 0,n)).filter(i=>!Hc(i));return a.length?a.every(Vc)?a.map(String).join(" \xB7 "):jsxRuntime.jsx("span",{className:"inline-flex flex-wrap items-center gap-1",children:a.map((i,s)=>jsxRuntime.jsxs("span",{className:"inline-flex items-center gap-1",children:[s>0?jsxRuntime.jsx("span",{className:"text-muted-foreground",children:"\xB7"}):null,Vc(i)?String(i):i]},s))}):t}if(typeof e=="object"){let a=Ey(e);return a===void 0?t:Ys(a,t,o,n)}return String(e)}r(Ys,"getDefaultDetailDisplayValue");function zy(e,t){return Object.prototype.hasOwnProperty.call(e,"value")?typeof e.value=="function"?e.value(t,e):e.value:t?t?.[e.key]:void 0}r(zy,"getDefaultFieldValue");function Oy(e,t){return typeof e.hidden=="function"?e.hidden(e,t):!!e.hidden}r(Oy,"shouldHideField");function Fy(e,t){return typeof e.hidden=="function"?e.hidden(e,t):!!e.hidden}r(Fy,"shouldHideSection");function Hy({record:e,fields:t,sections:o,fieldColumns:n=1,emptyValue:a="\u2014",emptyState:i,getFieldValue:s,renderFieldValue:u,formatFieldValue:c,formatFieldLabel:d,classNames:g}){let p=(o?.length?o:t?.length?[{fields:t,columns:n}]:[]).filter(f=>!Fy(f,e));return p.length?jsxRuntime.jsx("div",{className:l("space-y-3",g?.autoBody),children:p.map((f,b)=>{let v=(f.fields||[]).filter(w=>!Oy(w,e)),y=f.id||`section-${b}`;if(!v.length&&!f.emptyState)return null;let x=v.map((w,h)=>{let k={field:w,fieldIndex:h,section:f,sectionIndex:b,record:e},C=s?s(w,e,k):zy(w,e),T=u?u(w,e,k):c?c(C,k):Ys(C,w.emptyValue??a,w,g),S=d?d(Fc(w),k):Fc(w);return {term:Ly(S,w,g),value:T}});return jsxRuntime.jsxs("section",{className:l("min-w-0 space-y-3",g?.section),children:[f.title||f.description?jsxRuntime.jsxs("div",{className:l("min-w-0 space-y-1.5",g?.sectionHeader),children:[f.title?jsxRuntime.jsx("div",{className:l("inline-flex max-w-full items-center gap-2 rounded-md border border-primary/20 bg-primary/5 px-2.5 py-1.5 text-xs font-medium text-primary dark:border-primary/25 dark:bg-primary/10",g?.sectionTitle),children:f.title}):null,f.description?jsxRuntime.jsx("div",{className:l("text-[11px] leading-5 text-muted-foreground",g?.sectionDescription),children:f.description}):null]}):null,x.length?jsxRuntime.jsx(vs,{items:x,columns:f.columns||n,className:l("gap-3",g?.descriptionList),classNames:{item:l("!border-0 !bg-transparent !p-0 !shadow-none !gap-1.5",g?.descriptionListItem),term:l("!normal-case !tracking-normal !text-foreground",g?.descriptionListTerm),value:l("min-h-10 rounded-md border border-border/55 bg-muted/25 px-3 py-2 text-xs leading-5 text-foreground shadow-[inset_0_1px_0_hsl(var(--background)/0.8)] dark:border-border/45 dark:bg-white/[0.035]",g?.fieldValue,g?.descriptionListValue)}}):jsxRuntime.jsx("div",{className:l("py-3 text-center text-xs text-muted-foreground",g?.emptyState),children:f.emptyState})]},y)})}):i?jsxRuntime.jsx("div",{className:l("rounded-lg border border-dashed border-border/60 px-3 py-6 text-center text-xs text-muted-foreground",g?.emptyState),children:i}):null}r(Hy,"WorkbenchDetailSidebarAutoContent");var Vy=lt.forwardRef(r(function({as:t="aside",bodyAs:o="div",open:n,width:a,header:i,footer:s,resizeHandle:u,children:c,record:d,fields:g,sections:m,fieldColumns:p,emptyValue:f,emptyState:b,getFieldValue:v,renderFieldValue:y,formatFieldValue:x,formatFieldLabel:w,className:h,headerClassName:k,bodyClassName:C,footerClassName:T,resizeHandleClassName:S,bodyProps:I,classNames:R,style:W,...H},L){let F=Gc(c)?c:jsxRuntime.jsx(Hy,{record:d,fields:g,sections:m,fieldColumns:p,emptyValue:f,emptyState:b,getFieldValue:v,renderFieldValue:y,formatFieldValue:x,formatFieldLabel:w,classNames:R}),$=By({header:i,footer:s,bodyAs:o==="div"?void 0:o,bodyClassName:C,bodyProps:I,classNames:R}),{className:M,...G}=I??{};return jsxRuntime.jsxs(t,{ref:L,"data-workbench-detail-sidebar":true,"data-open":n===void 0?void 0:n?"true":"false",className:l("workbench-surface-subtle relative flex flex-shrink-0 flex-col self-stretch overflow-hidden rounded-lg border border-border/50 transition-all duration-300 dark:border-border/40",n===false&&"pointer-events-none",R?.root,h),style:{...Py(n,a),...W},...H,children:[u?jsxRuntime.jsx("div",{className:l(R?.resizeHandle,S),children:u}):null,i?jsxRuntime.jsx("div",{className:l("shrink-0 border-b border-border/40 px-4 py-3 dark:border-border/30",R?.header,k),children:i}):null,$?jsxRuntime.jsx(o,{className:l("min-h-0 flex-1 overflow-y-auto",R?.body,C,M),...G,children:F}):F,s?jsxRuntime.jsx("div",{className:l("shrink-0 border-t border-border/40 px-4 py-3 dark:border-border/30",R?.footer,T),children:s}):null]})},"WorkbenchDetailSidebar"));function jc(e){return typeof e=="function"?true:typeof e=="object"&&e!==null&&!lt.isValidElement(e)&&"$$typeof"in e}r(jc,"isWorkbenchIconComponent");function zr(e,t){return e?lt.isValidElement(e)?e:jc(e)?jsxRuntime.jsx(e,{className:t}):e:null}r(zr,"renderWorkbenchIcon");function Kc(e){return !e||!jc(e)?null:e}r(Kc,"getWorkbenchIconComponent");function $y(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r($y,"toCssSize");var jy=160,Ky=56,Uy=128;function Uc(e){if(typeof e=="number"&&Number.isFinite(e)&&e>0)return e;if(typeof e!="string")return;let t=e.trim().match(/^(\d+(?:\.\d+)?)px$/i);return t?Number(t[1]):void 0}r(Uc,"numericCssSize");function Jc(e,t){return e.renderType==="icon"?Ky:t?Uy:jy}r(Jc,"defaultWorkbenchColumnWidth");function qc(e,t,o){return t??Uc(e.width)??Uc(e.minWidth)??Jc(e,o)}r(qc,"resolvedWorkbenchColumnWidth");function qy(e){return e==null||e===false?null:e}r(qy,"defaultFormatLabel");function Yc(e){if(typeof e=="string"||typeof e=="number")return String(e)}r(Yc,"toTitle");function Yy(e,t){return e?.id??e?.key??e?.linkKey??t}r(Yy,"defaultGetRowKey");function Jy(e){return e?.linkKey??e?.id??e?.key}r(Jy,"defaultGetRowSelectionKey");function Xy(e,t){if(!t?.length)return e;let o=new Map(e.map(s=>[s.key,s])),n=t.map(s=>o.get(s)).filter(Boolean),a=new Set(n.map(s=>s.key)),i=e.filter(s=>!a.has(s.key));return [...n,...i]}r(Xy,"getOrderedColumns");function Qs(e,t){let o=new Set(e),n=(t||[]).filter(s=>o.has(s)),a=new Set(n),i=e.filter(s=>!a.has(s));return [...n,...i]}r(Qs,"normalizeColumnOrder");function Zy({helperText:e,className:t}){return O(e)?jsxRuntime.jsxs("span",{className:l("group relative inline-flex items-center",t),children:[jsxRuntime.jsx("button",{type:"button",title:Yc(e),"aria-label":Yc(e)||"Field help",className:"inline-flex h-4 w-4 items-center justify-center rounded-md border border-border/60 bg-background text-xs font-semibold normal-case tracking-normal text-muted-foreground shadow-sm transition-colors hover:border-primary/40 hover:text-primary focus-visible:border-primary/40 focus-visible:text-primary focus-visible:outline-hidden",onClick:o=>o.stopPropagation(),children:"?"}),jsxRuntime.jsx("span",{role:"tooltip",className:"pointer-events-none absolute left-1/2 top-full z-40 mt-2 hidden w-72 -translate-x-1/2 whitespace-pre-line rounded-lg border border-border/60 bg-card px-3 py-2 text-xs font-normal normal-case leading-5 tracking-normal text-foreground shadow-sm backdrop-blur-sm group-hover:block group-focus-within:block",children:e})]}):null}r(Zy,"WorkbenchTableHeaderHelper");function Qy({rows:e=[],columns:t=[],onRowClick:o,selectedRowKey:n,selectedLinkKey:a,activePrimaryColumn:i,activeTablePrimaryColumn:s,renderedRowCount:u,totalRowCount:c,tableMinWidth:d,minWidth:g,bodyMaxHeight:m="min(58vh, 38rem)",stickyFirstColumn:p=true,appearance:f,headerPresentation:b,fillRemainingWidthColumnKey:v,columnOrder:y,columnSizes:x,columnDragEnabled:w,columnResizeEnabled:h,className:k,tableClassName:C,rowClassName:T,classNames:S,style:I,renderCell:R,renderFieldValue:W,renderColumnHeader:H,onColumnOrderChange:L,onColumnSizeChange:F,onSort:$,formatLabel:M=qy,getColumnDataType:G,getColumnIcon:Y,getColumnTypeIcon:N,getRowKey:D=Yy,getRowSelectionKey:B=Jy,isActionColumn:K,isActionField:J,isRowDisabled:V,isWorkbenchPlaceholderRow:Q,emptyState:j="-",hiddenRowsMessage:Z,scrollFooter:te,scrollRestoration:ae}){let le=t.map(ne=>ne.key).join(""),A=lt.useMemo(()=>le?le.split(""):[],[le]),[me,P]=lt.useState(A),[_,re]=lt.useState({}),fe=lt.useRef(null),ye=lt.useRef(new Map),xe=lt.useRef(ae);xe.current=ae;let oe=lt.useRef(void 0),se=lt.useCallback(()=>{let ne=fe.current,Se=xe.current;if(!ne||!Se||oe.current!==Se.key)return;let Ve=ne.getBoundingClientRect().top,Ye=Array.from(ye.current.entries()).find(([,nt])=>nt.getBoundingClientRect().bottom>Ve);Se.write({x:ne.scrollLeft,y:ne.scrollTop,...Ye?{rowKey:Ye[0],rowOffset:Ye[1].getBoundingClientRect().top-Ve}:{}});},[]);lt.useEffect(()=>{let ne=fe.current,Se=xe.current;if(!ne||!Se||oe.current===Se.key||e.length===0)return;let Ve=Se.read(),Ye=r(()=>{let Pt=Ve?.rowKey?ye.current.get(Ve.rowKey):void 0,Ue=Pt&&typeof Ve?.rowOffset=="number"?ne.scrollTop+Pt.getBoundingClientRect().top-ne.getBoundingClientRect().top-Ve.rowOffset:Ve?.y??0;ne.scrollTo({left:Ve?.x??0,top:Math.max(0,Ue),behavior:"auto"}),oe.current=Se.key;},"restore"),nt=ne.ownerDocument.defaultView;if(!nt){Ye();return}let gt=nt.requestAnimationFrame(Ye);return ()=>nt.cancelAnimationFrame(gt)},[e,ae?.key]),lt.useEffect(()=>{let ne=fe.current?.ownerDocument.defaultView;return ne?.addEventListener("pagehide",se),()=>{ne?.removeEventListener("pagehide",se),se();}},[se]);let[Re,Ie]=lt.useState();lt.useEffect(()=>{P(ne=>Qs(A,ne));},[A]);let ze=y?Qs(A,y):me,ce=x??_,U=lt.useCallback((ne,Se)=>{let Ve=Qs(A,ne);y||P(Ve),L?.(Ve,Se);},[y,A,L]),z=lt.useCallback((ne,Se,Ve)=>{x||re(Ye=>({...Ye,[ne]:Se})),F?.(ne,Se,Ve);},[x,F]),X=n??a,ie=i??s,q=Xy(t,ze),de=v?q.reduce((ne,Se)=>Se.key===v?ne:ne+qc(Se,ce[Se.key],K?.(Se)??J?.(Se)??false),0):void 0,we=v&&de!==void 0&&Re!==void 0?Math.max(0,Math.round(Re-de)):void 0,Ce=q.flatMap(ne=>ne.key!==v?[ne]:we===0?[]:we===void 0?[ne]:[{...ne,width:we,minWidth:we,maxWidth:we}]),Me=Math.max(0,Number(c||e.length)-Number(u||e.length)),Be=R??W??((ne,Se)=>Se?.[ne.key]),_e=K??J??(()=>false),Ze=V??Q??(()=>false),Fe=Y??N,ot=de!==void 0&&we!==void 0?de+we:void 0,We=ot??d??g??Math.max(760,Ce.reduce((ne,Se)=>ne+qc(Se,ce[Se.key],_e(Se)),0));lt.useEffect(()=>{if(!v){Ie(void 0);return}let ne=fe.current;if(!ne)return;let Se=ne.ownerDocument.defaultView,Ve=r(()=>{let gt=Math.round(ne.getBoundingClientRect().width);!Number.isFinite(gt)||gt<=0||Ie(Pt=>Pt===gt?Pt:gt);},"updateWidth");Ve();let Ye=Se?.ResizeObserver,nt=Ye?new Ye(Ve):void 0;return nt?.observe(ne),Se?.addEventListener("resize",Ve),()=>{nt?.disconnect(),Se?.removeEventListener("resize",Ve);}},[v]);let Le=Me>0&&Z?typeof Z=="function"?Z(Me,u||e.length,c||e.length):Z:null;return jsxRuntime.jsxs(Va,{appearance:f,className:l("w-full overflow-hidden rounded-lg border border-border/40 bg-muted/15 dark:border-border/35 dark:bg-muted/10",S?.root,k),style:m==="100%"?{display:"flex",minHeight:0,flex:1,flexDirection:"column",...I}:I,children:[jsxRuntime.jsxs("div",{ref:fe,onScroll:se,className:l("w-full overflow-auto",S?.scrollArea),style:{maxHeight:$y(m),...m==="100%"?{minHeight:0,flex:1}:{}},children:[jsxRuntime.jsxs(Ga,{appearance:f,columnOrder:ze,columnSizes:ce,columnDragEnabled:w,columnResizeEnabled:h,onColumnOrderChange:U,onColumnSizeChange:z,className:l("w-full table-auto text-left text-xs",S?.table,C),style:{width:ot,minWidth:We},children:[jsxRuntime.jsx(_a,{appearance:f,className:l("z-20 text-xs font-sans text-muted-foreground",S?.header),children:jsxRuntime.jsx(hn,{className:l("hover:bg-transparent",S?.headerRow),children:Ce.map((ne,Se)=>{let Ve=Jc(ne,_e(ne)),Ye=ne.renderType||ne.type||G?.(ne.key,e,ne),nt=zr(Fe?.(Ye,ne),"h-3.5 w-3.5 shrink-0 text-primary"),Pt=Ce[Se-1]?.renderType==="icon"&&ne.key===ie?.key,Ue=H?H(ne,{column:ne,columnIndex:Se,columns:Ce,rows:e,columnType:Ye}):M(ne.label,{column:ne}),Ut=!H&&(O(ne.trailing)||O(ne.helperText))?jsxRuntime.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[O(ne.trailing)?M(ne.trailing,{column:ne}):null,jsxRuntime.jsx(Zy,{helperText:M(ne.helperText,{column:ne}),className:S?.helper})]}):void 0,Ft=!!ne.sortable,pe=Ft&&$?()=>$(ne.key,ne):void 0;return jsxRuntime.jsx(ja,{appearance:f,presentation:b,columnId:ne.key,align:ne.align,icon:H?void 0:nt,label:Ue,description:H?void 0:M(ne.description,{column:ne}),meta:H?void 0:M(ne.meta,{column:ne}),actions:ne.actions,trailing:Ut,sortable:Ft,sortDirection:ne.sortDirection,sortLabel:ne.sortLabel,onSort:pe,draggable:ne.draggable,dragLabel:ne.dragLabel,resizable:ne.resizable,resizeLabel:ne.resizeLabel,width:ne.width??Ve,minWidth:typeof ne.minWidth=="number"?ne.minWidth:void 0,maxWidth:typeof ne.maxWidth=="number"?ne.maxWidth:void 0,className:l("sticky top-0 z-20 h-auto whitespace-nowrap bg-card/95 px-4 py-3 font-medium backdrop-blur-sm supports-[backdrop-filter]:bg-card/90",p&&Se===0&&"md:left-0 md:z-30 md:shadow-[1px_0_0_0_hsl(var(--border)/0.35)]",ne.compactHeaderClassName,ne.renderType==="icon"&&"pl-3 pr-1",Pt&&"pl-2",S?.headerCell,ne.headerClassName),style:{minWidth:typeof ne.minWidth=="string"?ne.minWidth:void 0,maxWidth:typeof ne.maxWidth=="string"?ne.maxWidth:void 0,...ne.headerStyle}},ne.key)})})}),jsxRuntime.jsx($a,{appearance:f,className:l("divide-y divide-border/35 dark:divide-border/30",S?.body),children:e.length?e.map((ne,Se)=>{let Ve=D(ne,Se),Ye=Ze(ne,Se),nt=B(ne,Se),gt=!!(X&&String(nt)===String(X)),Pt=typeof T=="function"?T(ne,Se):T;return jsxRuntime.jsx(hn,{appearance:f,ref:Ue=>{Ue?ye.current.set(String(Ve),Ue):ye.current.delete(String(Ve));},interactive:!!o&&!Ye,"data-item-key":String(Ve),tabIndex:o&&!Ye?0:void 0,selected:gt,disabled:Ye,onClick:Ue=>{Ye||(o&&Ue.currentTarget.focus({preventScroll:true}),o?.(ne,Se));},onKeyDown:Ue=>{Ue.target!==Ue.currentTarget||Ye||!o||!["Enter"," "].includes(Ue.key)||(Ue.preventDefault(),o(ne,Se));},className:l(o&&!Ye?"cursor-pointer":"cursor-default",gt?"bg-primary/10 hover:bg-primary/15":Ye?"":"hover:bg-muted/25 dark:hover:bg-muted/15",S?.row,Pt),children:Ce.map((Ue,Ut)=>{let Ft=_e(Ue)||Ue.wrap===true,Ge=Ce[Ut-1]?.renderType==="icon"&&Ue.key===ie?.key;return jsxRuntime.jsx(Tr,{appearance:f,align:Ue.align,className:l(Ft?"align-top whitespace-normal":"whitespace-nowrap","px-4 py-3 text-muted-foreground",!Ft&&"overflow-hidden text-ellipsis",p&&Ut===0&&"md:sticky md:left-0 md:z-10 md:bg-card/95 md:text-foreground md:shadow-[1px_0_0_0_hsl(var(--border)/0.3)]",Ue.compactCellClassName,Ue.renderType==="icon"&&"pl-3 pr-1",Ge&&"pl-2",S?.cell,Ue.cellClassName),style:Ue.cellStyle,children:Be(Ue,ne,{row:ne,rowIndex:Se,column:Ue,columnIndex:Ut,compact:true,surface:"list"})},`${Ve}-${Ue.key}`)})},Ve)}):jsxRuntime.jsx(Ka,{appearance:f,colSpan:Math.max(Ce.length,1),classNames:{cell:"px-4 py-10 text-center text-sm text-muted-foreground"},children:j})})]}),O(te)?jsxRuntime.jsx("div",{style:{minWidth:We},children:te}):null]}),Le?jsxRuntime.jsx("div",{className:l("border-t border-border/40 px-4 py-2 text-xs text-muted-foreground dark:border-border/30",S?.footer),children:Le}):null]})}r(Qy,"WorkbenchTableView");function el(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r(el,"toCssSize");function Gn(){return typeof window<"u"}r(Gn,"isBrowser");function Zc(e,t){return e?.id??e?.key??t}r(Zc,"defaultGetRowKey");function si(e){return typeof e.width=="number"?e.width:typeof e.minWidth=="number"?e.minWidth:160}r(si,"getColumnDefaultSize");function eh(e,t){return e.reduce((o,n)=>(o[n.key]=t?.[n.key]??si(n),o),{})}r(eh,"buildDefaultColumnSizes");function Qc(e,t){if(!e||!Gn())return t;try{let o=JSON.parse(window.localStorage.getItem(e)||"{}");return Object.keys(t).reduce((n,a)=>{let i=Number(o?.[a]);return n[a]=Number.isFinite(i)?i:t[a],n},{})}catch{return t}}r(Qc,"loadStoredColumnSizes");function eu(e,t){!e||!Gn()||window.localStorage.setItem(e,JSON.stringify(t));}r(eu,"persistColumnSizes");function iu(e){return e?`${e}.frozenColumnCount`:void 0}r(iu,"getFrozenColumnStorageKey");function su(e){return e?`${e}.frozenEndColumnCount`:void 0}r(su,"getFrozenEndColumnStorageKey");function en(e,t){return Number.isFinite(e)?Math.max(0,Math.min(Math.round(e),t)):0}r(en,"clampFrozenColumnCount");function th(e,t,o){let n=en(e,o),a=en(t,Math.max(0,o-n));return {startCount:n,endCount:a}}r(th,"normalizeFrozenColumnCounts");function tu(e,t,o){let n=en(t,o),a=iu(e);if(!a||!Gn())return n;try{let i=window.localStorage.getItem(a);if(i===null)return n;let s=Number(i);return Number.isFinite(s)?en(s,o):n}catch{return n}}r(tu,"loadStoredFrozenColumnCount");function oh(e,t){let o=iu(e);!o||!Gn()||window.localStorage.setItem(o,String(t));}r(oh,"persistFrozenColumnCount");function ou(e,t,o){let n=en(t,o),a=su(e);if(!a||!Gn())return n;try{let i=window.localStorage.getItem(a);if(i===null)return n;let s=Number(i);return Number.isFinite(s)?en(s,o):n}catch{return n}}r(ou,"loadStoredFrozenEndColumnCount");function nh(e,t){let o=su(e);!o||!Gn()||window.localStorage.setItem(o,String(t));}r(nh,"persistFrozenEndColumnCount");function ii(e,t){let o=new Set(e),n=(t||[]).filter(s=>o.has(s)),a=new Set(n),i=e.filter(s=>!a.has(s));return [...n,...i]}r(ii,"normalizeColumnOrder");function rh(e,t){let o=ii(e.map(a=>a.key),t),n=new Map(e.map(a=>[a.key,a]));return o.map(a=>n.get(a)).filter(Boolean)}r(rh,"getOrderedColumns");function Vr(e,t){let o=t[e.key];return typeof o=="number"?o:si(e)}r(Vr,"getColumnNumericWidth");function ah(e,t,o){let n=new Map,a=0;return e.slice(0,Math.max(0,o)).forEach(i=>{n.set(i.key,a),a+=Vr(i,t);}),n}r(ah,"buildFrozenOffsets");function ih(e,t,o){let n=new Map,a=0;return e.slice(Math.max(0,e.length-o)).reverse().forEach(i=>{n.set(i.key,a),a+=Vr(i,t);}),n}r(ih,"buildFrozenEndOffsets");function nu(e,t,o){return typeof e=="function"?e(t,o):e}r(nu,"resolveRowClassName");function ru(e,t){let o=t?.[e.key];return o==null||o===""?"\u2014":String(o)}r(ru,"renderDefaultCell");function au({children:e,wrap:t}){return jsxRuntime.jsx("div",{className:l("min-w-0 max-w-full overflow-auto overscroll-contain [scrollbar-width:thin]",t?"max-h-20 whitespace-pre-wrap break-words leading-5":"whitespace-nowrap"),children:e})}r(au,"InteractiveTableCellContent");function sh({className:e}){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:e,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.75",children:[jsxRuntime.jsx("path",{d:"M5.25 2.75h5.5"}),jsxRuntime.jsx("path",{d:"M6.25 2.75v4L4.5 9.25h7L9.75 6.75v-4"}),jsxRuntime.jsx("path",{d:"M8 9.25v4"})]})}r(sh,"PinIcon");function lh({rows:e=[],columns:t=[],pinnedTopRows:o=[],getRowKey:n=Zc,getPinnedTopRowKey:a=Zc,renderCell:i,renderPinnedTopCell:s,renderColumnHeader:u,onRowClick:c,getRowState:d,rowClassName:g,pinnedTopRowClassName:m,emptyState:p="\u2014",columnMenuLabels:f,columnStorageKey:b,columnOrder:v,columnSizes:y,defaultColumnSizes:x,columnDragEnabled:w=false,columnResizeEnabled:h=true,frozenColumnCount:k=0,frozenEndColumnCount:C=0,tableMinWidth:T,bodyMaxHeight:S="min(60vh, 42rem)",appearance:I,className:R,tableClassName:W,classNames:H,style:L,onColumnOrderChange:F,onColumnSizeChange:$,onResetColumnSizes:M,onFrozenColumnCountChange:G,onFrozenEndColumnCountChange:Y,onSort:N}){let D=vt().workbench.interactiveTable,B=t.map(q=>q.key).join(""),K=lt.useMemo(()=>B?B.split(""):[],[B]),J=lt.useMemo(()=>eh(t,x),[t,x]),[V,Q]=lt.useState(K),[j,Z]=lt.useState(()=>Qc(b,J)),[te,ae]=lt.useState(()=>tu(b,k,t.length)),[le,A]=lt.useState(()=>ou(b,C,t.length));lt.useEffect(()=>{Q(q=>ii(K,q));},[K]),lt.useEffect(()=>{y||Z(Qc(b,J));},[y,b,J]),lt.useEffect(()=>{ae(tu(b,k,t.length));},[b,t.length,k]),lt.useEffect(()=>{A(ou(b,C,t.length));},[b,t.length,C]);let me=v?ii(K,v):V,P=y??j,_=rh(t,me),{startCount:re,endCount:fe}=th(te,le,_.length),ye=ah(_,P,re),xe=ih(_,P,fe),oe=T??Math.max(760,_.reduce((q,de)=>q+Vr(de,P),0)),se={columnActions:f?.columnActions??D.columnActions,freezeColumn:f?.freezeColumn??D.freezeColumn,freezeEndColumn:f?.freezeEndColumn??D.freezeEndColumn,unfreezeColumn:f?.unfreezeColumn??D.unfreezeColumn,unfreezeEndColumn:f?.unfreezeEndColumn??D.unfreezeEndColumn,unfreezeAllColumns:f?.unfreezeAllColumns??D.unfreezeAllColumns,resetColumnWidth:f?.resetColumnWidth??D.resetColumnWidth,frozenColumnTitle:f?.frozenColumnTitle??D.frozenColumnTitle},Re=lt.useCallback((q,de)=>{let we=ii(K,q);v||Q(we),F?.(we,de);},[v,K,F]),Ie=lt.useCallback((q,de,we)=>{let Ce=t.find(Fe=>Fe.key===q),Me=Ce?.minWidth,Be=Ce?.maxWidth,_e=Math.max(typeof Me=="number"?Me:0,Math.min(de,typeof Be=="number"?Be:Number.POSITIVE_INFINITY)),Ze={...P,[q]:_e};y||Z(Ze),eu(b,Ze),$?.(q,_e,we);},[y,b,t,$,P]),ze=lt.useCallback(q=>{let de=J[q.key]??si(q),we=Vr(q,P),Ce={...P,[q.key]:de};y||Z(Ce),eu(b,Ce),$?.(q.key,de,{columnId:q.key,previousWidth:we,minWidth:q.minWidth,maxWidth:q.maxWidth}),M?.(Ce);},[y,b,J,$,M,P]),ce=lt.useCallback(q=>{let de=en(q,Math.max(0,_.length-fe));ae(de),oh(b,de),G?.(de);},[b,G,_.length,fe]),U=lt.useCallback(q=>{let de=en(q,Math.max(0,_.length-re));A(de),nh(b,de),Y?.(de);},[b,Y,_.length,re]),z=r(q=>{if(q<re)return "start";if(q>=_.length-fe)return "end"},"getFrozenPosition"),X=r((q,de,we=false)=>{let Ce=z(de);if(Ce)return l("sticky",Ce==="start"?"shadow-[1px_0_0_0_hsl(var(--border)/0.45)]":"shadow-[-1px_0_0_0_hsl(var(--border)/0.45)]",we?"bg-muted/60":"bg-inherit",we?"z-40":"z-20",(de===0||de===_.length-1)&&(we?"z-50":"z-30"))},"getFrozenClassName"),ie=r((q,de)=>{let we=z(de);if(we==="start")return {left:ye.get(q.key)??0};if(we==="end")return {right:xe.get(q.key)??0}},"getFrozenStyle");return jsxRuntime.jsx(Va,{appearance:I,className:l("flex h-full min-h-0 flex-col overflow-hidden rounded-lg border border-border/60 bg-card",H?.root,R),style:L,children:jsxRuntime.jsx("div",{className:l("min-h-0 flex-1 overflow-auto",H?.scrollArea),style:{maxHeight:el(S)},children:jsxRuntime.jsxs(Ga,{appearance:I,columnOrder:me,columnSizes:P,columnDragEnabled:w,columnResizeEnabled:h,onColumnOrderChange:Re,onColumnSizeChange:Ie,className:l("w-full table-fixed text-left text-xs",H?.table,W),style:{minWidth:oe},children:[jsxRuntime.jsx("colgroup",{children:_.map(q=>jsxRuntime.jsx("col",{style:{width:el(P[q.key]??q.width),minWidth:el(q.minWidth)}},q.key))}),jsxRuntime.jsx(_a,{appearance:I,className:l("border-b border-border/60 bg-muted/60 text-[11px] font-medium text-muted-foreground",H?.tableHeader),children:jsxRuntime.jsx(hn,{appearance:I,className:l("hover:bg-transparent",H?.headerRow),children:_.map((q,de)=>{let we=u?u(q,{column:q,columnIndex:de,columns:_,rows:e}):q.label,Ce=!!q.sortable,Me=Ce&&N?()=>N(q.key,q):void 0,Be=de<re,_e=de>=_.length-fe,Ze=Be||_e,Fe=Vr(q,P)===(J[q.key]??si(q));return jsxRuntime.jsxs(Xd,{modal:false,children:[jsxRuntime.jsx(ys,{asChild:true,appearance:I,children:jsxRuntime.jsx(ja,{appearance:I,columnId:q.key,align:q.align,label:we,description:q.description,trailing:Ze?jsxRuntime.jsx("span",{title:se.frozenColumnTitle,className:"inline-flex h-5 w-5 items-center justify-center rounded text-primary",children:jsxRuntime.jsx(sh,{className:"h-3.5 w-3.5"})}):null,sortable:Ce,sortDirection:q.sortDirection,sortLabel:q.sortLabel,onSort:Me,draggable:q.draggable,resizable:q.resizable,width:q.width,minWidth:q.minWidth,maxWidth:q.maxWidth,className:l("sticky top-0 h-9 whitespace-nowrap border-r border-border/50 bg-muted/60 px-2.5 py-2 backdrop-blur",X(q,de,true),q.headerClassName,q.className,H?.headerCell),style:ie(q,de)})}),jsxRuntime.jsxs(hs,{appearance:I,alignOffset:-4,className:"min-w-44",children:[jsxRuntime.jsx(Zd,{appearance:I,children:se.columnActions}),Ze?jsxRuntime.jsx(Wn,{appearance:I,onSelect:()=>{_e?U(_.length-de-1):ce(de);},children:_e?se.unfreezeEndColumn:se.unfreezeColumn}):jsxRuntime.jsx(Wn,{appearance:I,onSelect:()=>ce(de+1),children:se.freezeColumn}),Ze?null:jsxRuntime.jsx(Wn,{appearance:I,onSelect:()=>U(_.length-de),children:se.freezeEndColumn}),jsxRuntime.jsx(Wn,{appearance:I,disabled:re===0&&fe===0,onSelect:()=>{ce(0),U(0);},children:se.unfreezeAllColumns}),jsxRuntime.jsx(Qd,{appearance:I}),jsxRuntime.jsx(Wn,{appearance:I,disabled:Fe,onSelect:()=>ze(q),children:se.resetColumnWidth})]})]},q.key)})})}),jsxRuntime.jsxs($a,{appearance:I,className:l("divide-y divide-border/50",H?.body),children:[o.map((q,de)=>{let we=a(q,de),Ce=nu(m,q,de);return jsxRuntime.jsx(hn,{appearance:I,className:l("bg-card/95",H?.pinnedTopRow,Ce),children:_.map((Me,Be)=>jsxRuntime.jsx(Tr,{appearance:I,align:Me.align,className:l("h-[52px] border-r border-border/50 px-2.5 py-1.5 align-middle",Me.wrap?"whitespace-normal":"whitespace-nowrap",X(Me,Be),Me.cellClassName,H?.cell),style:ie(Me,Be),children:jsxRuntime.jsx(au,{wrap:Me.wrap,children:s?s(Me,q,{row:q,rowIndex:de,column:Me,columnIndex:Be,isPinnedTopRow:true}):ru(Me,q)})},`pinned-${we}-${Me.key}`))},`pinned-${we}`)}),e.length?e.map((q,de)=>{let we=n(q,de),Ce=d?.(q,de)||{},Me=nu(g,q,de);return jsxRuntime.jsx(hn,{appearance:I,interactive:!!c&&!Ce.disabled,selected:Ce.selected,disabled:Ce.disabled,onClick:()=>{Ce.disabled||c?.(q,de);},className:l("min-h-[52px] bg-card transition-colors",Ce.saving&&"bg-primary/5",Ce.pending&&"opacity-80",c&&!Ce.disabled?"cursor-pointer hover:bg-muted/30":"hover:bg-muted/30",H?.row,Me),children:_.map((Be,_e)=>jsxRuntime.jsx(Tr,{appearance:I,align:Be.align,className:l("h-[52px] border-r border-border/50 px-2.5 py-1.5 align-middle",Be.wrap?"whitespace-normal":"whitespace-nowrap",X(Be,_e),Be.cellClassName,H?.cell),style:ie(Be,_e),children:jsxRuntime.jsx(au,{wrap:Be.wrap,children:i?i(Be,q,{row:q,rowIndex:de,column:Be,columnIndex:_e,isPinnedTopRow:false}):ru(Be,q)})},`${we}-${Be.key}`))},we)}):o.length?null:jsxRuntime.jsx(Ka,{appearance:I,colSpan:Math.max(_.length,1),className:H?.empty,children:p})]})]})})})}r(lh,"InteractiveTable");function dh({value:e,placeholder:t,disabled:o,multiline:n=false,commitOnBlur:a=true,className:i,inputClassName:s,onCommit:u}){let c=String(e||""),[d,g]=lt.useState(c);lt.useEffect(()=>{g(c);},[c]);let m=lt.useCallback(async()=>{let f=String(d||"").trim(),b=String(c||"").trim();if(f!==b)try{await u?.(f);}catch{g(c);}},[d,c,u]),p=l("w-full resize-none rounded-sm border border-transparent bg-transparent px-1.5 py-1 text-xs text-foreground outline-hidden transition-colors","placeholder:text-muted-foreground/70 hover:border-border/60 hover:bg-background focus:border-primary/45 focus:bg-background",n?"min-h-[42px] leading-5":"h-8",o&&"cursor-not-allowed text-muted-foreground hover:border-transparent hover:bg-transparent",s);return n?jsxRuntime.jsx("textarea",{className:l(p,i),disabled:o,value:d,placeholder:t,onChange:f=>g(f.target.value),onBlur:()=>{a&&m();},onKeyDown:f=>{(f.metaKey||f.ctrlKey)&&f.key==="Enter"&&f.currentTarget.blur(),f.key==="Escape"&&(g(c),f.currentTarget.blur());}}):jsxRuntime.jsx("input",{className:l(p,i),disabled:o,value:d,placeholder:t,onChange:f=>g(f.target.value),onBlur:()=>{a&&m();},onKeyDown:f=>{f.key==="Enter"&&f.currentTarget.blur(),f.key==="Escape"&&(g(c),f.currentTarget.blur());}})}r(dh,"InteractiveTableEditableTextCell");function ch({children:e,mono:t=false,className:o}){return jsxRuntime.jsx("div",{className:l("min-w-0 text-xs text-muted-foreground",t&&"font-mono",o),children:O(e)?e:"\u2014"})}r(ch,"InteractiveTableReadonlyCell");function uh({value:e,options:t,disabled:o,ariaLabel:n,children:a,className:i,onChange:s}){return jsxRuntime.jsxs("div",{className:l("relative flex w-full items-center",i),children:[a,jsxRuntime.jsx("select",{"aria-label":n,disabled:o,value:e,onChange:u=>s?.(u.target.value),className:"absolute inset-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed",children:t.map(u=>jsxRuntime.jsx("option",{value:u.value,children:u.label},u.value))})]})}r(uh,"InteractiveTableSelectCell");function lu({children:e,title:t,presentation:o,renderSlot:n}){let a=o.title,i=a?.placement??"none",s=a?.background==="panel"?"div":"span",u=(o.slots??[]).map(g=>({slot:g,content:n?.(g)})).filter(g=>g.content!=null),c=i==="none"?null:jsxRuntime.jsx("div",{className:"monkeys-gallery-cover-title",title:typeof t=="string"||typeof t=="number"?String(t):void 0,"data-placement":i,"data-background":a?.background??(i.startsWith("overlay")?"gradient":"none"),style:{...a?.background==="panel"?{margin:12,borderRadius:"var(--radius)",border:"1px solid hsl(var(--border) / .8)",background:"hsl(var(--card) / .9)",backdropFilter:"blur(12px)",boxShadow:"var(--monkeys-component-overlay-dialog-shadow)"}:{},textAlign:a?.align??"left",padding:a?.padding??12,fontSize:`var(--monkeys-gallery-title-${a?.size??"md"})`,fontWeight:a?.weight==="normal"?400:a?.weight==="medium"?500:600},children:jsxRuntime.jsx(s,{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:a?.background==="panel"?void 0:a?.maxLines??2,overflow:"hidden"},children:t})}),d=r(g=>jsxRuntime.jsx("div",{className:"monkeys-gallery-slot-row","data-row":g,children:u.filter(({slot:m})=>m.position.startsWith(g)).map(({slot:m,content:p})=>jsxRuntime.jsx("div",{"data-card-slot":m.position,"data-visibility":m.visibility??"always",className:m.visibility==="hover"?"monkeys-gallery-hover-actions":void 0,style:{gridColumn:m.position.endsWith("left")?1:m.position.endsWith("center")?2:3,justifySelf:m.position.endsWith("left")?"start":m.position.endsWith("center")?"center":"end",padding:m.inset??12,gap:m.gap??8,flexDirection:m.direction==="vertical"?"column":"row"},children:p},m.position))}),"band");return jsxRuntime.jsxs("div",{className:"monkeys-gallery-card-surface","data-hover-effect":o.hover?.effect??"none",style:{"--monkeys-gallery-hover-scale":o.hover?.scale??1.02},children:[i==="above"&&c,jsxRuntime.jsxs("div",{className:"monkeys-gallery-media-card",children:[jsxRuntime.jsx("div",{className:"monkeys-gallery-card-media",children:e}),jsxRuntime.jsxs("div",{className:"monkeys-gallery-card-overlay",children:[jsxRuntime.jsxs("div",{children:[i==="overlay-top"&&c,d("top")]}),d("middle"),jsxRuntime.jsxs("div",{children:[d("bottom"),i==="overlay-bottom"&&c]})]})]}),i==="below"&&c]})}r(lu,"WorkbenchGalleryCardSurface");var mh=/\.(png|jpe?g|webp|gif|svg|bmp|avif)$/i,ph=/\.(wav|mp3|ogg|m4a|flac|aac)$/i,gh=r(e=>/^https?:\/\//i.test(String(e||"")),"isLikelyUrl"),du=r(e=>String(e?.renderType||e?.type||"").toLowerCase(),"getColumnRenderKind"),bh=r(e=>String(e||"").startsWith("data:image/")||mh.test(String(e||"")),"isImageLikeValue"),fh=r(e=>String(e||"").startsWith("data:audio/")||ph.test(String(e||"")),"isAudioLikeValue"),yh=r(e=>String(e||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),"escapeSvgText"),_n=r((e,t)=>e?t?.[e.key]??null:null,"getDefaultGalleryFieldValue"),$r=r(e=>{if(e==null||e==="")return "\u2014";if(Array.isArray(e))return e.map(o=>{if(typeof o=="string")return o;if(!o||typeof o!="object")return "";let n=o;return n.text||n.label||n.title||n.display||n.value||n.recordId||""}).filter(Boolean).join(" \xB7 ")||"\u2014";if(typeof e=="object"){let t=e;return String(t.text||t.label||t.title||t.display||t.value||"\u2014")}return String(e)},"getDefaultGalleryDisplayText"),jr=r((e={key:""},t)=>du(e)==="image"||bh(t),"isDefaultGalleryImageField"),Kr=r((e={key:""},t)=>du(e)==="audio"||fh(t),"isDefaultGalleryAudioField"),cu=r((e,t,o)=>{if(gh(e)||String(e||"").startsWith("data:image/"))return String(e);let n=yh(e||o||t||""),i=`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 960 540'><defs><linearGradient id='g' x1='0' y1='0' x2='1' y2='1'><stop offset='0%' stop-color='#0f172a'/><stop offset='55%' stop-color='#1d4ed8'/><stop offset='100%' stop-color='#14b8a6'/></linearGradient></defs><rect width='960' height='540' fill='url(#g)'/><g opacity='0.28'><circle cx='780' cy='130' r='150' fill='#67e8f9'/><circle cx='180' cy='430' r='170' fill='#a78bfa'/></g>${n?`<text x='68' y='450' fill='white' font-family='Inter, Arial' font-size='52' font-weight='700'>${n}</text>`:""}</svg>`;return `data:image/svg+xml;utf8,${encodeURIComponent(i)}`},"getDefaultGalleryImagePreviewSrc"),li=r((e,t,{getFieldValue:o=_n,shouldEnhanceMultimodal:n=true,isImageField:a=jr,isAudioField:i=Kr}={})=>{if(!e||!n)return false;let s=o(e,t);return a(e,s)||i(e,s)},"isDefaultGalleryMediaColumn"),di=r((e,t,{isMediaColumn:o=r(()=>false,"isMediaColumn")}={})=>!e||e.renderType==="icon"?false:!o(e,t),"isDefaultGalleryTitleCandidate"),ci=r((e,t,{isMediaColumn:o=r(()=>false,"isMediaColumn")}={})=>!e||e.renderType==="icon"?false:!o(e,t),"isDefaultGallerySummaryCandidate"),uu=r((e,t,{compact:o=false,getFieldValue:n=_n,getDisplayText:a=$r}={})=>{let i=n(e,t);return jsxRuntime.jsx("span",{className:l("leading-relaxed",o&&e?.wrap===true&&"line-clamp-2 block"),children:a(i)})},"renderDefaultGalleryFieldValue");var xh=r(e=>e==="compact"?2:e==="detailed"?6:4,"getDefaultGalleryDetailLimit"),vh=r((e,t)=>e===1||e===2||e===3?Number(e):t==="detailed"?1:2,"getNormalizedGalleryBentoColumns"),kh=r(({density:e,visibility:t,limit:o})=>{if(t==="all")return Number.POSITIVE_INFINITY;let n=Number.parseInt(String(o),10);return Number.isFinite(n)&&n>0?n:xh(e)},"getNormalizedGalleryDetailLimit"),wh=r(e=>e==="compact"?"p-3":e==="detailed"?"p-4":"p-3.5","getGalleryCardPaddingClassName"),Ch=r((e,t)=>t?"h-auto w-full object-cover":e==="compact"?"h-32 w-full object-cover":e==="detailed"?"h-48 w-full object-cover":"h-40 w-full object-cover","getGalleryPreviewClassName"),Sh=r(e=>e===1?"grid-cols-1":e===3?"grid-cols-1 sm:grid-cols-2 2xl:grid-cols-3":"grid-cols-1 sm:grid-cols-2","getGalleryDetailGridClassName");function Th(e){return Kc(e)}r(Th,"getIconComponent");function Rh(e){return e}r(Rh,"defaultFormatLabel");function Nh(e){return typeof e=="string"||typeof e=="number"?String(e):""}r(Nh,"getLabelText");function tl({row:e,columns:t,onClick:o,cardInteraction:n="button",cardPresentation:a,renderCardSlot:i,renderCoverTitle:s,isSelected:u=false,isMasonry:c=false,galleryFieldKey:d="auto",galleryDensity:g="comfortable",galleryBentoColumns:m,galleryDetailVisibility:p="limit",galleryDetailLimit:f,galleryDetailPresentation:b="tiles",shouldEnhanceMultimodal:v=true,getFieldValue:y,isMediaColumn:x,isTitleCandidate:w,isSummaryCandidate:h,getDisplayText:k,renderFieldValue:C,getImagePreviewSrc:T,isImageField:S,isAudioField:I,AudioPlayerComponent:R,cardVariant:W="default",renderPreview:H,renderMeta:L,renderLeadingVisual:F,resolveRecordVisual:$,hiddenDetailFieldKeys:M=[],labels:G,formatLabel:Y=Rh,className:N}){let D=y||_n,B=k||$r,K=S||jr,J=I||Kr,V=T||cu,Q=x||((ge,He)=>li(ge,He,{getFieldValue:D,shouldEnhanceMultimodal:v,isImageField:K,isAudioField:J})),j=w||((ge,He)=>di(ge,He,{isMediaColumn:Q})),Z=h||((ge,He)=>ci(ge,He,{isMediaColumn:Q})),te=C||((ge,He,{compact:ft}={})=>uu(ge,He,{compact:ft,getFieldValue:D,getDisplayText:B})),ae=W==="preview-only",le=W==="image-only",A=W==="chromatic-bento",P=(d!=="auto"?t.find(ge=>ge.key===d&&Q(ge,e)):null)||(v?t.find(ge=>Q(ge,e)):null),_=t.find(ge=>ge.renderType==="icon"),re=_&&$?$(e[_.key],e,_):null,fe=Th(re?.Icon||re?.icon),ye=P?D(P,e):null,xe=P?K(P,ye):false,oe=P?J(P,ye):false,se=t.filter(ge=>ge.key!==P?.key&&ge.renderType!=="icon"),Ie=se.filter(ge=>{if(!ge||Q(ge,e)||!j(ge,e))return false;let He=D(ge,e);return !(He==null||He==="")})[0]||null,ze=B(Ie?D(Ie,e):e.linkKey||e.id),U=se.filter(ge=>ge&&ge.key!==Ie?.key&&!Q(ge,e)&&Z(ge,e)).map(ge=>({column:ge,text:String(B(D(ge,e)))})),z=(U.find(({text:ge})=>ge!=="\u2014"&&ge.length>12)||U.find(({text:ge})=>ge!=="\u2014"))?.column||null,X=z?B(D(z,e)):"",ie=new Set(M),q=se.filter(ge=>ge.key!==Ie?.key&&ge.key!==z?.key&&!ie.has(ge.key)),de=kh({density:g,visibility:p,limit:f}),we=Number.isFinite(de)?q.slice(0,de):q,Ce=g==="detailed",Me=vh(m,g),Be=wh(g),_e=Sh(Me),Ze=b==="lines",Fe=le?a?"block h-auto w-full":"block h-auto w-full transition-transform duration-500 group-hover:scale-[1.02]":Ch(g,c),ot=a?.media?.aspectRatio,We=a?.media?.fit;if(ot!==void 0&&(!Number.isFinite(ot)||ot<=0))throw new TypeError("Gallery media aspectRatio must be a finite positive number.");if(We!==void 0&&We!=="contain"&&We!=="cover")throw new TypeError('Gallery media fit must be "contain" or "cover".');let Le=typeof H=="function"?H({row:e,mediaColumn:P,mediaValue:ye,isImageMedia:xe,isAudioMedia:oe,iconVisual:re,IconComponent:fe,previewClassName:Fe}):null,ne={row:e,contentColumns:se,detailColumns:q,titleColumn:Ie,summaryColumn:z,getDisplayText:B,getFieldValue:D},Se=L?.(ne)??null,Ve=F?.({...ne,iconVisual:re})??null,Ye=!Ve&&re?jsxRuntime.jsx("div",{className:l("flex h-9 w-9 items-center justify-center rounded-lg border",re.chipClassName||"border-primary/20 bg-primary/10 text-primary"),children:zr(re.Icon||re.icon,l("h-4 w-4",re.iconClassName||"text-primary"))}):null,nt=Ve||Ye,gt=A?"shrink-0 rounded-full border border-border/40 bg-muted/25 px-2.5 py-1 text-[10px] text-muted-foreground transition-all duration-300 group-hover:border-primary/30 group-hover:bg-primary/10 group-hover:text-primary dark:border-border/35 dark:bg-muted/15":"shrink-0 rounded-md border border-border/40 bg-muted/25 px-2 py-1 text-[10px] text-muted-foreground dark:border-border/35 dark:bg-muted/15",Pt=A?"rounded-xl border border-border/35 bg-muted/20 px-3 py-2.5 transition-all duration-300 group-hover:border-primary/25 group-hover:bg-primary/5 dark:border-border/30 dark:bg-muted/10":"rounded-lg border border-border/35 bg-muted/20 px-2.5 py-2 dark:border-border/30 dark:bg-muted/10",Ue=A?"text-[10px] uppercase tracking-[0.14em] text-muted-foreground transition-colors duration-300 group-hover:text-foreground":"text-[10px] uppercase tracking-[0.12em] text-muted-foreground",Ut=A?"mt-1.5 text-[11px] text-muted-foreground transition-colors duration-300 group-hover:text-foreground [&_*]:max-w-full [&_pre]:text-[11px] [&_pre]:leading-relaxed":"mt-1.5 text-[11px] text-foreground [&_*]:max-w-full [&_pre]:text-[11px] [&_pre]:leading-relaxed",Ft=G?.fieldCount?.(se.length),pe=G?.coverOnlyHint,Ge=Le==null&&xe&&P?V(ye,e.id,P.label):void 0,ee=Le??jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[xe&&P?jsxRuntime.jsx("div",{style:ot===void 0?void 0:{position:"relative",aspectRatio:ot},className:l("overflow-hidden bg-card/50",le?"rounded-[inherit] bg-transparent":ae?"rounded-[inherit]":"mb-3 rounded-lg border border-border/70"),children:jsxRuntime.jsx("img",{src:Ge,style:{...Ca(Ge),...ot===void 0?{}:{position:"absolute",inset:0,width:"100%",height:"100%"},...We===void 0&&ot===void 0?{}:{objectFit:We??"cover"}},alt:typeof ye?.alt=="string"?ye.alt:typeof ye=="string"?ye:String(P.label||""),className:Fe,loading:"lazy",referrerPolicy:"no-referrer",onError:ge=>{ge.currentTarget.onerror=null,ge.currentTarget.src=V("",e.id,P.label);}})}):null,!xe&&re&&ae?jsxRuntime.jsx("div",{className:l("flex items-center justify-center","rounded-[inherit] border py-10",re.chipClassName||"border-primary/20 bg-primary/5"),children:zr(re.Icon||re.icon,l("h-10 w-10",re.iconClassName||"text-primary"))}):null,oe&&R?jsxRuntime.jsx("div",{className:l(!ae&&"mb-3"),children:jsxRuntime.jsx(R,{filename:String(ye)})}):null]}),ue=a?lu:null,Pe=a?.title?.fieldId?t.find(ge=>ge.key===a.title?.fieldId):Ie,he=s?s(e):Pe?B(D(Pe,e)):ze,ke=!!a?.slots?.length,Ee=ke||n==="container"?"div":"button";return jsxRuntime.jsxs(Ee,{"data-gallery-card":true,"data-card-hover-effect":a?.hover?.effect,type:Ee==="button"?"button":void 0,role:ke&&n==="button"&&o?"group":void 0,tabIndex:ke&&n==="button"&&o?0:void 0,onKeyDown:ke&&n==="button"&&o?ge=>{ge.target===ge.currentTarget&&(ge.key==="Enter"||ge.key===" ")&&(ge.preventDefault(),o());}:void 0,onClick:n==="button"?ge=>{(!ke||!ge.target.closest("button,a,input,select,textarea,[role=button],[role=menuitem]"))&&o?.();}:void 0,"aria-label":Nh(ze),className:l("group relative w-full rounded-lg text-left transition-all duration-300",le?"overflow-hidden bg-transparent p-0 shadow-none":ae?"overflow-hidden bg-transparent p-0":l("overflow-hidden border",A&&"shadow-none"),!ae&&!le&&Be,!ae&&!le&&(u?A?"border-primary/35 bg-background/85 ring-1 ring-primary/20":"border-primary/40 bg-primary/10 ring-1 ring-primary/30":A?a?"workbench-surface-card":"workbench-surface-card hover:-translate-y-1 hover:border-primary/20":a?"workbench-surface-card":"workbench-surface-card hover:border-primary/30"),ae&&u&&"ring-1 ring-primary/30",le&&(u?"ring-1 ring-primary/30":!a&&"hover:-translate-y-0.5"),c?"block h-full w-full min-w-0":"h-full min-w-0",N),children:[A?jsxRuntime.jsx("div",{"aria-hidden":"true",className:l("pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_top_right,hsl(var(--primary)/0.18),transparent_40%),radial-gradient(circle_at_bottom_left,hsl(var(--accent)/0.18),transparent_45%)] opacity-0 transition-opacity duration-300",u?"opacity-100":"group-hover:opacity-100")}):null,jsxRuntime.jsxs("div",{className:l("relative z-[1]",(le||ae)&&"rounded-[inherit]"),children:[ue&&a?jsxRuntime.jsx(ue,{presentation:a,title:he,renderSlot:ge=>i?.(ge,ne),children:ee}):ee,!ae&&!le?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-start gap-3",children:[nt?jsxRuntime.jsx("div",{className:"shrink-0",children:nt}):null,jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-1 items-start justify-between gap-3",children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[!a?.title&&jsxRuntime.jsx("div",{className:l("flex items-center gap-2 text-sm font-semibold",A?"text-muted-foreground transition-colors duration-300 group-hover:text-foreground":"text-foreground"),children:jsxRuntime.jsx("span",{className:"truncate",children:n==="container"&&o?jsxRuntime.jsx("button",{type:"button",onClick:o,className:"border-0 bg-transparent p-0 text-left hover:underline",style:{font:"inherit",color:"inherit"},children:ze}):ze})}),X&&X!==ze?jsxRuntime.jsx("div",{className:l("mt-1 text-[11px] leading-5 text-muted-foreground",Ce?"line-clamp-4":"line-clamp-2",A&&"transition-colors duration-300 group-hover:text-foreground"),children:X}):null]}),Se??(O(Ft)?jsxRuntime.jsx("span",{className:gt,children:Ft}):null)]})]}),we.length>0?jsxRuntime.jsx("div",{"data-gallery-detail-presentation":b,className:l("mt-3 grid grid-flow-row gap-2",Ze?"grid-cols-1":_e),children:we.map(ge=>jsxRuntime.jsxs("div",{className:Ze?"flex min-w-0 items-start gap-2 text-xs":Pt,children:[ge.label?jsxRuntime.jsx("div",{className:Ze?"shrink-0 text-muted-foreground":Ue,children:Y(ge.label,{column:ge})}):null,jsxRuntime.jsx("div",{className:Ze?"min-w-0 text-foreground":l(Ut,!ge.label&&"mt-0"),children:te(ge,e,{compact:g!=="detailed",surface:"gallery"})})]},`${e.id||e.linkKey}-${ge.key}`))}):null,!Ie&&!X&&we.length===0&&O(pe)?jsxRuntime.jsx("div",{className:l("mt-3 text-[11px] text-muted-foreground",A&&"transition-colors duration-300 group-hover:text-foreground"),children:pe}):null]}):null]})]})}r(tl,"WorkbenchGalleryCard");function pu(e,t){let o=e==="rail"?"horizontal":"vertical";if(t&&t!=="auto"&&t!==o)throw new TypeError(`Gallery layout ${e} requires ${o} scrolling.`);return o}r(pu,"resolveGalleryScrollDirection");function Bh(e,t,o,n,a){let i=Array.from({length:t},()=>0),s=0,u=0,c=e.map((d,g)=>{if(a==="rail")return {index:g,left:g*(o+n),top:0,width:o,height:d};if(a==="grid")return g>0&&g%t===0&&(s+=u+n,u=0),u=Math.max(u,d),{index:g,left:g%t*(o+n),top:s,width:o,height:d};let m=i.indexOf(Math.min(...i)),p=i[m];return i[m]=p+d+n,{index:g,left:m*(o+n),top:p,width:o,height:d}});return {placements:c,height:Math.max(0,...c.map(d=>d.top+d.height)),width:a==="rail"?Math.max(0,e.length*(o+n)-n):t*(o+n)-n}}r(Bh,"placeWindowedItems");function Ph(e,t,o,n,a){let i=t-a,s=t+o+a;return e.filter(u=>{let c=n?u.left:u.top;return c<=s&&c+(n?u.width:u.height)>=i})}r(Ph,"visibleWindow");function bu({items:e,getKey:t,layout:o,cardWidth:n,estimateHeight:a,getScrollOwner:i,railRef:s,tailRef:u,containerProps:c,getItemProps:d,renderItem:g}){let m=o.mode==="rail",p=m?1:o.columnCount,f=Math.max(1,m?n??280:o.columnWidth),b=lt.useRef(null),v=lt.useRef(new Map),y=lt.useRef(),[x,w]=lt.useState({width:f,heights:{}}),[h,k]=lt.useState({start:0,length:m?1280:720}),[C,T]=lt.useState(),[S,I]=lt.useState(),R=e.map(t),W=JSON.stringify(R),H=R.map((D,B)=>x.heights[D]??Math.max(1,a(e[B],f))),L=lt.useMemo(()=>Bh(H,p,f,o.gap,m?"rail":o.mode==="grid"?"grid":"masonry"),[JSON.stringify(H),p,f,o.gap,m,o.mode]),F=lt.useCallback(()=>{let D=b.current,B=i();if(!D||!B)return;let K=D.getBoundingClientRect(),J=B.getBoundingClientRect(),V=B.offsetHeight>0?J.height/B.offsetHeight:1,Q=m?B.scrollLeft:(J.top-K.top)/(V||1)+B.clientTop,j=m?B.clientWidth:B.clientHeight;j<=0||k(Z=>Z.start===Q&&Z.length===j?Z:{start:Q,length:j});},[i,m]);lt.useLayoutEffect(()=>{F();},[F,L.height,L.width]),lt.useEffect(()=>{let D=i();if(!D)return;let B=0,K=r(()=>{B||(B=requestAnimationFrame(()=>{B=0,F();}));},"update");D.addEventListener("scroll",K,{passive:true}),window.addEventListener("resize",K);let J=typeof ResizeObserver=="function"?new ResizeObserver(K):void 0;return J?.observe(D),b.current&&J?.observe(b.current),()=>{D.removeEventListener("scroll",K),window.removeEventListener("resize",K),J?.disconnect(),cancelAnimationFrame(B);}},[i,F]),lt.useEffect(()=>{if(typeof ResizeObserver!="function")return;let D=new ResizeObserver(B=>{w(K=>{let J={...K.heights},V=K.width!==f;for(let Q of B){let j=Q.target.dataset.windowKey,Z=Q.borderBoxSize?.[0]?.blockSize??Q.target.offsetHeight;j!==void 0&&Z>0&&J[j]!==Z&&(J[j]=Z,V=true);}return V?{width:f,heights:J}:K});});return y.current=D,v.current.forEach(B=>D.observe(B)),()=>{D.disconnect(),y.current=void 0;}},[f]),lt.useEffect(()=>{let D=new Set(R);w(B=>({width:B.width,heights:Object.fromEntries(Object.entries(B.heights).filter(([K])=>D.has(K)))}));},[W]);let $=r((D,B)=>{let K=v.current.get(D);if(K&&y.current?.unobserve(K),!B){v.current.delete(D);return}B.dataset.windowKey=D,v.current.set(D,B),y.current?.observe(B);},"register"),M=h.length,G=Ph(L.placements,h.start,h.length,m,M),Y=new Set(G.map(D=>D.index));for(let D of [C,S]){let B=D===void 0?-1:R.indexOf(D);B>=0&&Y.add(B);}lt.useLayoutEffect(()=>{if(!S)return;let D=v.current.get(S)?.parentElement;D&&(D.focus(),D.scrollIntoView({block:"nearest",inline:"nearest"}),I(void 0));},[S]);let N={...o,columnWidth:f,itemWidth:f};return jsxRuntime.jsxs("div",{...c,ref:D=>{b.current=D,s&&(s.current=D);},"data-collection-windowed":"","data-collection-total":e.length,style:{...c.style,position:"relative",...m?{overflowX:"auto",overflowY:"hidden"}:{height:L.height},overflowAnchor:"none"},children:[m?jsxRuntime.jsx("div",{"aria-hidden":"true",style:{width:L.width,height:L.height,pointerEvents:"none"}}):null,Array.from(Y).sort((D,B)=>D-B).map(D=>{let B=e[D],K=R[D],J=L.placements[D],V=d(B,N);return jsxRuntime.jsx("div",{...V,"aria-posinset":D+1,"aria-setsize":e.length,onFocus:Q=>{T(K),V.onFocus?.(Q);},onBlur:Q=>{Q.currentTarget.contains(Q.relatedTarget)||T(void 0),V.onBlur?.(Q);},onKeyDown:Q=>{if(Q.target===Q.currentTarget){let j=m?1:p,Z=Q.key==="Home"?0:Q.key==="End"?e.length-1:Q.key==="ArrowRight"?D+1:Q.key==="ArrowLeft"?D-1:Q.key==="ArrowDown"?D+j:Q.key==="ArrowUp"?D-j:void 0;if(Z!==void 0){Q.preventDefault(),I(R[Math.min(e.length-1,Math.max(0,Z))]);return}}V.onKeyDown?.(Q);},style:{...V.style,position:"absolute",left:J.left,top:J.top,width:J.width},children:jsxRuntime.jsx("div",{ref:Q=>$(K,Q),children:g(B,N)})},K)}),u?jsxRuntime.jsx("div",{ref:u,"aria-hidden":"true",style:{position:"absolute",left:Math.max(0,L.width-1),top:0,width:1,height:1}}):null]})}r(bu,"WorkbenchWindowedLayout");var Wh=12,Lh=8,hu=280,vu=240,Ah=typeof window>"u"?lt.useEffect:lt.useLayoutEffect;function gi(e,t,o){return Math.min(Math.max(e,t),o)}r(gi,"clamp");function zh(e){if(typeof window>"u")return 16;let t=e||document.documentElement,o=Number.parseFloat(window.getComputedStyle(t).fontSize);return Number.isFinite(o)&&o>0?o:16}r(zh,"getRootFontSize");function bi(e,t,o){if(typeof e=="number"&&Number.isFinite(e)&&e>0)return e;if(typeof e!="string")return t;let n=e.trim().toLowerCase();if(!n)return t;if(/^\d+(\.\d+)?$/.test(n)){let a=Number.parseFloat(n);return Number.isFinite(a)&&a>0?a:t}if(n.endsWith("px")){let a=Number.parseFloat(n);return Number.isFinite(a)&&a>0?a:t}if(n.endsWith("rem")){let a=Number.parseFloat(n);return !Number.isFinite(a)||a<=0?t:a*zh(o)}return t}r(bi,"resolveLengthToPixels");function xu(e,t){let o=Object.keys(e),n=Object.keys(t);if(o.length!==n.length)return false;for(let a of n)if(e[a]!==t[a])return false;return true}r(xu,"areMeasurementMapsEqual");function Oh({containerWidth:e,itemCount:t,targetColumnWidth:o,gap:n}){if(!e)return 1;let a=Math.max(t,1),i=Math.max(1,Math.min(a,Math.ceil((e+n)/(Math.max(o*.58,1)+n)))),s=1,u=Number.POSITIVE_INFINITY;for(let c=1;c<=i;c+=1){let d=(e-n*Math.max(c-1,0))/c;if(!Number.isFinite(d)||d<=0)continue;let g=Math.max(0,o*.78-d),m=Math.max(0,d-o*1.35),p=Math.abs(d-o)+g*3+m*2;p<u&&(u=p,s=c);}return s}r(Oh,"getMasonryColumnCount");function Fh({size:e,columnWidth:t,columnCount:o,gap:n}){if(Number.isFinite(e?.columnSpan)&&Number(e?.columnSpan)>0)return gi(Math.round(Number(e?.columnSpan)),1,o);let a=bi(e?.width,t,null);return gi(Math.ceil((a+n)/(t+n)),1,o)}r(Fh,"getItemColumnSpan");function Hh({size:e,measuredHeight:t,rowHeight:o,gap:n}){if(Number.isFinite(e?.rowSpan)&&Number(e?.rowSpan)>0)return Math.max(1,Math.round(Number(e?.rowSpan)));let a=Number.isFinite(t)&&Number(t)>0?Number(t):bi(e?.height,vu,null);return Math.max(1,Math.ceil((a+n)/(o+n)))}r(Hh,"getItemRowSpan");function Vh({size:e,measuredHeight:t}){return Number.isFinite(t)&&Number(t)>0?Number(t):bi(e?.height,vu,null)}r(Vh,"getResolvedItemHeight");function Ur({items:e=[],renderItem:t,getItemKey:o=r((p,f)=>p?.id??p?.key??f,"getItemKey"),getItemSize:n,columnWidth:a=hu,columnCount:i,gap:s=Wh,rowHeight:u=Lh,placementStrategy:c="shelf",containerProps:d,getItemProps:g,className:m}){let p=lt.useRef(null),f=lt.useRef(new Map),b=lt.useRef(null),[v,y]=lt.useState(0),[x,w]=lt.useState({}),h=lt.useMemo(()=>e.map((L,F)=>String(o(L,F))),[o,e]),k=h.join("|");lt.useEffect(()=>{let L=p.current;if(!L)return;let F=r(()=>{let $=Math.round(L.getBoundingClientRect().width);y(M=>M===$?M:$);},"updateWidth");if(F(),typeof ResizeObserver=="function"){let $=new ResizeObserver(()=>F());return $.observe(L),()=>$.disconnect()}return window.addEventListener("resize",F),()=>window.removeEventListener("resize",F)},[]),lt.useEffect(()=>{w(L=>{let F=new Set(h),$=Object.fromEntries(Object.entries(L).filter(([M])=>F.has(M)));return xu(L,$)?L:$});},[h,k]);let C=bi(a,hu,p.current),T=c==="dense",I=(Number.isFinite(i)&&Number(i)>0?gi(Math.round(Number(i)),1,24):void 0)||Oh({containerWidth:v,itemCount:e.length,targetColumnWidth:C,gap:s}),R=v>0?(v-s*Math.max(I-1,0))/I:C,W=lt.useMemo(()=>e.map((L,F)=>{let $=h[F],M=typeof n=="function"?n(L,{columnCount:I,columnWidth:R,containerWidth:v,gap:s,placementStrategy:c,rowHeight:u})||{}:{};return {key:$,item:L,size:M,columnSpan:Fh({size:M,columnWidth:R,columnCount:I,gap:s}),rowSpan:Hh({size:M,measuredHeight:x[$],rowHeight:u,gap:s})}}),[I,v,s,n,h,e,x,c,R,u]);Ah(()=>{let L={};f.current.forEach((F,$)=>{let M=Math.ceil(F.getBoundingClientRect().height);Number.isFinite(M)&&M>0&&(L[$]=M);}),w(F=>{if(!Object.keys(L).length)return F;let $={...F,...L};return xu(F,$)?F:$});},[I,T,k,R]),lt.useEffect(()=>{if(typeof ResizeObserver!="function")return;let L=new ResizeObserver(F=>{w($=>{let M={...$},G=false;for(let Y of F){let N=Y.target.dataset.masonryKey;if(!N)continue;let D=Math.ceil(Y.contentRect.height);!Number.isFinite(D)||D<=0||M[N]===D||(M[N]=D,G=true);}return G?M:$});});return b.current=L,f.current.forEach(F=>L.observe(F)),()=>{L.disconnect(),b.current=null;}},[T,k]);let H=r((L,F)=>{let $=f.current,M=$.get(L);if(M&&M!==F&&b.current&&b.current.unobserve(M),!F){$.delete(L);return}F.dataset.masonryKey=L,$.set(L,F),b.current&&b.current.observe(F);},"registerItemNode");if(!T){let L=(()=>{let F=Array.from({length:I},()=>0),$=0,M=0,G=W.map(({key:Y,item:N,columnSpan:D,rowSpan:B,size:K})=>{let J=gi(D,1,I),V=$;if(c==="shortest"){let le=Number.POSITIVE_INFINITY;for(let A=0;A<=I-J;A+=1){let me=Math.max(...F.slice(A,A+J));me<le&&(le=me,V=A);}}else V+J>I&&(V=0),V=Math.min(V,I-J);let Q=R*J+s*Math.max(J-1,0),j=Vh({size:K,measuredHeight:x[Y]}),Z=Math.max(...F.slice(V,V+J)),te=V*(R+s),ae=Z+j;for(let le=V;le<V+J;le+=1)F[le]=ae+s;return M=Math.max(M,ae),c!=="shortest"&&($=V+J,$>=I&&($=0)),{key:Y,item:N,columnSpan:J,itemHeight:j,itemWidth:Q,left:te,rowSpan:B,size:K,top:Z}});return {containerHeight:Math.max(0,M),positionedItems:G}})();return jsxRuntime.jsx("div",{ref:p,...d,className:l("relative w-full",m,d?.className),style:{...d?.style,height:`${L.containerHeight}px`},children:L.positionedItems.map(({key:F,item:$,columnSpan:M,rowSpan:G,size:Y,itemWidth:N,left:D,top:B})=>{let K=v<=0&&I===1,J=K?"100%":`${N}px`,V={columnCount:I,columnSpan:M,columnWidth:R,containerWidth:v,gap:s,itemWidth:N,placementStrategy:c,rowSpan:G,rowHeight:u,size:Y},Q=g?.($,V);return jsxRuntime.jsx("div",{...Q,className:l("absolute min-w-0",Q?.className),style:{...Q?.style,left:K?0:`${D}px`,top:`${B}px`,width:J,maxWidth:J},children:jsxRuntime.jsx("div",{ref:j=>H(F,j),role:"presentation",className:"min-w-0",children:t($,V)})},F)})})}return jsxRuntime.jsx("div",{ref:p,...d,className:l("grid w-full items-start",m,d?.className),style:{...d?.style,gap:`${s}px`,gridAutoFlow:"row dense",gridAutoRows:`${u}px`,gridTemplateColumns:`repeat(${I}, minmax(0, 1fr))`},children:W.map(({key:L,item:F,columnSpan:$,rowSpan:M,size:G})=>{let Y={columnCount:I,columnSpan:$,columnWidth:R,containerWidth:v,gap:s,placementStrategy:c,rowSpan:M,rowHeight:u,size:G},N=g?.(F,Y);return jsxRuntime.jsx("div",{...N,className:l("min-w-0",N?.className),style:{...N?.style,gridColumn:`span ${$}`,gridRow:`span ${M}`},children:jsxRuntime.jsx("div",{ref:D=>H(L,D),role:"presentation",className:"min-w-0",children:t(F,Y)})},L)})})}r(Ur,"WorkbenchMasonryLayout");var _h=12,$h=[1],jh=[4/3],Kh=[1,4/5,3/2,3/4,5/4],Uh=.5,qh=2,Yh="hsl(var(--monkeys-color-muted, var(--muted)))";function fi(e,t,o){return Math.min(Math.max(e,t),o)}r(fi,"clamp");function al(e,t,o){return typeof e!="number"||!Number.isFinite(e)||e<=0?t:fi(Math.round(e),1,o)}r(al,"normalizeCount");function Jh(e){return e==="masonry"||e==="dense"?Kh:e==="rail"?jh:$h}r(Jh,"getDefaultAspectRatios");function Xh(e,t){let o=t?.filter(n=>typeof n=="number"&&Number.isFinite(n)&&n>0).map(n=>fi(n,Uh,qh));return o?.length?o:Jh(e)}r(Xh,"resolveAspectRatios");function wu(e){return al(e?.count,_h,48)}r(wu,"resolveWorkbenchCollectionSkeletonCapacity");function Cu(e){if(e===void 0)return "skeleton";if(e==="skeleton"||e==="spinner")return e;throw new TypeError('WorkbenchCollection loading.variant must be "skeleton" or "spinner".')}r(Cu,"resolveWorkbenchCollectionLoadingVariant");function Zh({columnCount:e,config:t,phase:o}){if(o==="initial"){let a=fi(e*2,6,24);return al(t?.count,a,48)}let n=fi(e,1,12);return al(t?.loadMoreCount,n,24)}r(Zh,"resolveSkeletonCount");function ku(e,t){return Math.max(1,e/t)}r(ku,"getSkeletonHeight");function il({mode:e,phase:t,columnCount:o,columnWidth:n,cardWidth:a,gap:i,rowHeight:s,config:u,ariaLabel:c,className:d}){let g=Zh({columnCount:o,config:u,phase:t}),m=Xh(e,u?.aspectRatios),p=u?.animated??true,f=lt.useMemo(()=>Array.from({length:g},(v,y)=>({aspectRatio:m[y%m.length],key:`${t}-${y}`,index:y})),[m,g,t]),b=r((v,y)=>jsxRuntime.jsx(En,{index:v.index,children:jsxRuntime.jsx(Wt,{variant:"block",animated:p,className:"h-auto w-full rounded-lg",style:{backgroundColor:Yh,...y??{aspectRatio:String(v.aspectRatio)}},"data-collection-skeleton-item":"","data-skeleton-aspect-ratio":v.aspectRatio})}),"renderSkeleton");return jsxRuntime.jsx(jo,{animation:u?.animation,animated:p,children:jsxRuntime.jsx("div",{role:"status","aria-label":c,"aria-atomic":"true","data-collection-loading":t,"data-layout-mode":e,className:"min-w-0",children:e==="masonry"||e==="dense"?jsxRuntime.jsx(Ur,{items:f,columnCount:o,columnWidth:n,gap:i,rowHeight:s,placementStrategy:e==="dense"?"dense":"shortest",className:d,containerProps:{"aria-hidden":true},getItemKey:v=>v.key,getItemSize:(v,y)=>({height:ku(y.columnWidth,v.aspectRatio)}),renderItem:(v,y)=>b(v,{height:`${ku(y.columnWidth,v.aspectRatio)}px`})}):e==="rail"?jsxRuntime.jsx("div",{"aria-hidden":"true",className:l("grid min-w-0 grid-flow-col items-start overflow-x-auto",d),style:{gap:i,gridAutoColumns:typeof a=="number"?`${a}px`:a??`${n}px`},children:f.map(v=>jsxRuntime.jsx("div",{children:b(v)},v.key))}):jsxRuntime.jsx("div",{"aria-hidden":"true",className:l("grid min-w-0 items-start",d),style:{gap:i,gridTemplateColumns:`repeat(${o}, minmax(0, 1fr))`},children:f.map(v=>jsxRuntime.jsx("div",{children:b(v)},v.key))})})})}r(il,"WorkbenchCollectionSkeleton");function ex(e,t){if(e.size!==t.size)return false;for(let o of e)if(!t.has(o))return false;return true}r(ex,"setsEqual");function tx(e){return String(e)}r(tx,"getComparableKey");function ox(e){return e==="multiple"?"toggle":"replace"}r(ox,"getDefaultBehavior");function cl({items:e,getItemKey:t,mode:o="none",behavior:n,selectedKeys:a,defaultSelectedKeys:i,isItemDisabled:s,onSelectionChange:u}){let c=a!==void 0,[d,g]=lt.useState(()=>new Set(i??[])),m=lt.useRef(null),p=lt.useRef(u);p.current=u;let f=lt.useMemo(()=>{let k=new Map;return e.map((C,T)=>{let S=t(C,T),I=tx(S),R=k.get(I);if(R!==void 0)throw new TypeError(`useWorkbenchCollectionSelection received duplicate item key "${I}" at indices ${R} and ${T}.`);return k.set(I,T),{item:C,index:T,key:S}})},[t,e]),b=lt.useMemo(()=>{let k=new Map;return f.forEach(C=>k.set(C.key,C)),k},[f]),v=lt.useMemo(()=>o==="none"?new Set:c?new Set(a??[]):d,[c,a,d,o]),y=lt.useRef(v);y.current=v;let x=lt.useCallback(()=>{m.current=null;},[]);lt.useEffect(()=>{if(c)return;let k=new Set(f.map(({key:C})=>C));g(C=>{let T=new Set(Array.from(C).filter(S=>k.has(S)));return ex(C,T)?C:(y.current=T,T)});},[c,f]),lt.useEffect(()=>{let k=m.current;if(o!=="multiple"||v.size===0||k===null){x();return}let C=b.get(k);(!C||s?.(C.item,C.index))&&x();},[s,b,o,x,v.size]);let w=lt.useCallback((k,C={})=>{if(o==="none")return;let T=b.get(k);if(!T||s?.(T.item,T.index))return;let S=new Set(y.current),I=n??ox(o),R=C.shiftKey&&o==="multiple"?"range":C.behavior??I;o==="single"&&(R=R==="toggle"?"toggle":"replace");let W=m.current===null?void 0:b.get(m.current),H=!!(W&&!s?.(W.item,W.index));o==="multiple"&&R==="range"&&!H&&(R=I==="range"?"toggle":I);let L=new Set;if(o==="single")R==="toggle"&&S.has(T.key)||L.add(T.key);else if(R==="range"&&W){S.forEach(M=>L.add(M));let F=Math.min(W.index,T.index),$=Math.max(W.index,T.index);f.slice(F,$+1).forEach(M=>{s?.(M.item,M.index)||L.add(M.key);});}else R==="replace"?L.add(T.key):(S.forEach(F=>L.add(F)),L.has(T.key)?L.delete(T.key):L.add(T.key));m.current=o==="multiple"?T.key:null,c||(y.current=L,g(L)),p.current?.(L,{item:T.item,index:T.index,key:T.key,behavior:R});},[n,c,s,b,o,f]),h=lt.useCallback(k=>v.has(k),[v]);return {mode:o,selectedKeys:v,isSelected:h,selectKey:w,resetAnchor:x}}r(cl,"useWorkbenchCollectionSelection");var pl=12,ax=8,hi=280,ix=640,sx=1024,Iu=24;function xi(e,t,o){return Math.min(Math.max(e,t),o)}r(xi,"clamp");function ro(e,t){return typeof e=="function"?e(t):e}r(ro,"resolveRenderableSlot");function Kn(e,t,o){if(typeof e=="number"&&Number.isFinite(e)&&e>0)return e;if(typeof e!="string")return t;let n=e.trim().toLowerCase();if(!n)return t;if(/^\d+(\.\d+)?(px)?$/.test(n)){let a=Number.parseFloat(n);return Number.isFinite(a)&&a>0?a:t}if(n.endsWith("rem")){let a=Number.parseFloat(n),i=typeof window>"u"?16:Number.parseFloat(window.getComputedStyle(o||document.documentElement).fontSize)||16;return Number.isFinite(a)&&a>0?a*i:t}return t}r(Kn,"resolveLengthToPixels");function yi(e){if(!(typeof e!="number"||!Number.isFinite(e)||e<=0))return xi(Math.round(e),1,Iu)}r(yi,"normalizeColumns");function Tu(e,t){if(e==="auto"||e===void 0)return;if(typeof e=="number")return yi(e);let o=yi(e.mobile),n=yi(e.tablet),a=yi(e.desktop);return t>=sx?a??n??o:t>=ix?n??o??a:o??n??a}r(Tu,"resolveResponsiveColumns");function lx({containerWidth:e,itemCount:t,gap:o,columns:n,underfilledBehavior:a,maxColumns:i,minCardWidth:s,idealCardWidth:u,maxCardWidth:c,node:d}){let g=Tu(n,e),m=Tu(i,e);if(g)return m?Math.min(g,m):g;if(!e)return 1;let p=Kn(u,hi,d),f=Kn(s,p*.78,d),b=Math.max(f,Kn(c,p*1.35,d)),v=Math.max(t,1),y=Math.max(1,Math.min(a==="preserve-columns"?Iu:v,Math.ceil((e+o)/(Math.max(f*.75,1)+o)))),x=1,w=Number.POSITIVE_INFINITY;for(let h=1;h<=y;h+=1){let k=(e-o*Math.max(h-1,0))/h;if(!Number.isFinite(k)||k<=0)continue;let C=Math.abs(k-p)+Math.max(0,f-k)*3+Math.max(0,k-b)*2;C<w&&(w=C,x=h);}return m?Math.min(x,m):x}r(lx,"resolveColumnCount");function Ru(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0?e:pl}r(Ru,"normalizeGap");function dx(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?e:ax}r(dx,"normalizeRowHeight");function cx(e){return typeof e=="number"&&Number.isFinite(e)?xi(e,0,1):0}r(cx,"normalizeThreshold");function ux(e,t,o){let n=Number.isFinite(t)&&Number(t)>0?Number(t):void 0,a=e?.height??(n?Math.max(1,o/n):void 0);return {...e,height:a}}r(ux,"normalizeItemSize");function mx(e,t){if(e&&typeof e=="object"){let o=e;if(typeof o.id=="string"||typeof o.id=="number")return o.id;if(typeof o.key=="string"||typeof o.key=="number")return o.key}return t}r(mx,"getDefaultItemKey");function px(e){return `@inf-monkeys-tech/monkeys-design:workbench-collection:${e}`}r(px,"getScrollStorageKey");function gx(e){let t=e?.parentElement??null;for(;t;){if(typeof window>"u")return t;let o=window.getComputedStyle(t).overflowY;if(o==="auto"||o==="scroll")return t;t=t.parentElement;}return null}r(gx,"getParentScrollOwner");function Nu(e,t){if(typeof Element>"u"||!(e instanceof Element)||e===t)return false;let o=e.closest('a, button, input, select, textarea, summary, [contenteditable="true"], [data-collection-action]');return !!(o&&t.contains(o))}r(Nu,"isInteractiveEventTarget");function bx(e){if(!(!Number.isFinite(e)||Number(e)<=0))return xi(Math.round(Number(e)),1,12)}r(bx,"normalizeTitleMaxLines");function on({items:e,config:t,renderItem:o,slots:n,callbacks:a,className:i,classNames:s,style:u,ariaLabel:c}){let d=Ne(),g=vt().workbench.collection,m=Ro(),p=dn(),f=lt.useId().replace(/:/g,""),b=lt.useRef(null),v=lt.useRef(null),y=lt.useRef(null),x=lt.useRef(null),w=lt.useRef(false),h=lt.useRef(false),k=lt.useRef(false),C=lt.useRef(false),T=lt.useRef(null),S=lt.useRef(null),I=lt.useRef(void 0),R=lt.useRef(false),[W,H]=lt.useState(0),[L,F]=lt.useState(pl),[$,M]=lt.useState(null),G=lt.useRef(a);G.current=a;let Y=lt.useCallback(ee=>{y.current=ee,M(ee);},[]),N=t.layout.mode;if(N!=="grid"&&N!=="masonry"&&N!=="dense"&&N!=="rail")throw new TypeError(`WorkbenchCollection layout.mode "${String(N)}" is not supported.`);let D=t.layout.gap===void 0?L:Ru(t.layout.gap),B=dx(t.layout.rowHeight),K=t.getItemKey??mx,J=lt.useMemo(()=>e.map((ee,ue)=>{let Pe=K(ee,ue);return {item:ee,index:ue,key:Pe,stringKey:String(Pe)}}),[K,e]),V=J.map(({stringKey:ee})=>ee).join(""),Q=t.state,j=Q?.loading===true,Z=Q?.loadingMore===true,te=Q?.hasMore===true,ae=Cu(t.loading?.variant),le=j&&J.length===0&&ae==="skeleton"?wu(t.loading?.skeleton):J.length,A=t.selection?.mode??"none",me=lt.useCallback(ee=>t.selection?.isItemDisabled?.(ee.item,ee.index)??false,[t.selection?.isItemDisabled]),P=lt.useCallback(ee=>ee.key,[]),_=lt.useCallback((ee,ue)=>{G.current?.onSelectionChange?.(ee,{item:ue.item.item,key:ue.key,behavior:ue.behavior});},[]),{selectedKeys:re,selectKey:fe}=cl({items:J,getItemKey:P,mode:A,behavior:t.selection?.behavior,selectedKeys:t.selection?.selectedKeys,defaultSelectedKeys:t.selection?.defaultSelectedKeys,isItemDisabled:me,onSelectionChange:_});lt.useEffect(()=>{let ee=$;if(!ee)return;let ue=r(()=>{if(t.layout.gap===void 0&&b.current){let he=Number.parseFloat(window.getComputedStyle(b.current).columnGap);F(Number.isFinite(he)&&he>=0?he:pl);}let Pe=ee.clientWidth;H(he=>he===Pe?he:Pe);},"updateWidth");if(ue(),typeof ResizeObserver=="function"){let Pe=new ResizeObserver(ue);return Pe.observe(ee),()=>Pe.disconnect()}if(!(typeof window>"u"))return window.addEventListener("resize",ue),()=>window.removeEventListener("resize",ue)},[$,t.layout.gap,u?.gap,p]);let ye=lx({containerWidth:W,itemCount:le,gap:D,columns:t.layout.columns,underfilledBehavior:t.layout.underfilledBehavior,maxColumns:t.layout.maxColumns,minCardWidth:t.layout.minCardWidth,idealCardWidth:t.layout.idealCardWidth??t.layout.columnWidth,maxCardWidth:t.layout.maxCardWidth,node:y.current}),xe=W>0?Math.max(0,(W-D*Math.max(ye-1,0))/ye):Kn(t.layout.cardWidth??t.layout.columnWidth??t.layout.idealCardWidth,hi,y.current),oe=t.layout.placementStrategy??(N==="dense"?"dense":N==="masonry"?"shortest":"shelf"),se=lt.useMemo(()=>({collection:t.labels?.collection??g.label,loading:t.labels?.loading??g.loading,empty:t.labels?.empty??g.empty,loadError:t.labels?.loadError??g.loadError,refreshError:t.labels?.refreshError??g.refreshError,retry:t.labels?.retry??g.retry,loadingMore:t.labels?.loadingMore??g.loadingMore,permission:t.labels?.permission??g.permission,offline:t.labels?.offline??g.offline,requestAccess:t.labels?.requestAccess??g.requestAccess}),[t.labels,g]),Re=lt.useMemo(()=>{let ee=t.virtualization;return ee?.enabled!==true||ee.fallback!=="error"?null:ee.adapter?ee.adapter.supports?.(N)===false?new Error(`WorkbenchCollection virtualization adapter does not support mode "${N}".`):null:new Error("WorkbenchCollection virtualization requires an adapter.")},[t.virtualization,N]),Ie=lt.useMemo(()=>({mode:N,columnCount:ye,columnWidth:xe,containerWidth:W,gap:D,itemCount:J.length}),[ye,xe,W,D,N,J.length]);lt.useEffect(()=>{G.current?.onLayoutChange?.(Ie),W>0&&!R.current&&(R.current=true,G.current?.onLayoutReady?.(Ie));},[Ie,W]),lt.useEffect(()=>{R.current=false;},[N]);let ze=lt.useCallback(()=>{let ee=t.layout.scrollOwner;return ee&&ee!=="self"&&ee!=="parent"?ee:N==="rail"?v.current:ee==="parent"?gx(b.current):b.current},[t.layout.scrollOwner,N]);lt.useEffect(()=>{let ee=t.scrollRestorationKey?.trim();if(!ee||typeof window>"u")return;let ue=ze();if(!ue)return;let Pe=px(ee);try{let ke=Number.parseFloat(window.sessionStorage.getItem(Pe)??"");Number.isFinite(ke)&&ke>=0&&(ue.scrollTop=ke);}catch{}let he=r(()=>{try{window.sessionStorage.setItem(Pe,String(ue.scrollTop));}catch{}},"saveScrollPosition");return ue.addEventListener("scroll",he,{passive:true}),()=>{he(),ue.removeEventListener("scroll",he);}},[t.scrollRestorationKey,ze]);let ce=typeof a?.onLoadMore=="function",U=Q?.error??Re;lt.useEffect(()=>{(!ce||!te)&&(h.current=false,k.current=false,C.current=false);},[ce,te]);let z=lt.useCallback(()=>{if(!ce||!te||Z||w.current)return;w.current=true;let ee=r(()=>{w.current=false;},"releaseRequest");try{let ue=G.current?.onLoadMore?.();ue&&typeof ue.then=="function"?ue.then(ee,ee):ee();}catch(ue){throw ee(),ue}},[ce,te,Z]);lt.useEffect(()=>{let ee=x.current;if((T.current!==ee||S.current!==V||I.current!==t.loading?.pageKey)&&(T.current=ee,S.current=V,I.current=t.loading?.pageKey,h.current=false,k.current=false,C.current=false),!ee||!ce||!te||typeof IntersectionObserver!="function")return;let ue=ze(),Pe=false,he=true,ke=new IntersectionObserver(He=>{if(!he)return;let ft=He.some(ar=>ar.isIntersecting);if(!(ft&&(Z||w.current))){if(C.current){if(Pe=true,C.current=false,h.current=ft,!ft){k.current=false;return}if(k.current)return;k.current=true,z();return}if(!Pe){Pe=true,h.current=ft,ft||(k.current=false),ft&&t.loading?.autoFill&&!k.current&&(k.current=true,z());return}if(!ft){h.current=false,k.current=false;return}h.current||(h.current=true,k.current=true,z());}},{root:ue===b.current?ue:ue||null,rootMargin:t.loading?.rootMargin??"240px",threshold:cx(t.loading?.threshold)}),Ee=ue??(typeof window>"u"?null:window),ge=r(()=>{!h.current||k.current||C.current||(C.current=true,ke.unobserve(ee),ke.takeRecords(),ke.observe(ee));},"validateActiveIntersection");return ke.observe(ee),Ee?.addEventListener("scroll",ge,{passive:true}),()=>{he=false,ke.disconnect(),Ee?.removeEventListener("scroll",ge);}},[ce,t.loading?.autoFill,t.loading?.pageKey,t.loading?.rootMargin,t.loading?.threshold,te,V,Z,J.length,z,ze]),lt.useEffect(()=>{if(!t.loading?.autoFill||!ce||!te||Z||k.current||w.current||!x.current)return;let ue=ze()??(t.layout.scrollOwner==="parent"?b.current?.parentElement??null:null)??b.current;if(!ue)return;let Pe=N==="rail"?ue.clientWidth:ue.clientHeight,he=N==="rail"?ue.scrollWidth:ue.scrollHeight;Pe<=0||he<=Pe+1&&(k.current=true,z());},[ce,t.layout.scrollOwner,t.loading?.autoFill,t.loading?.pageKey,te,V,Z,J.length,z,ze,N]);let X=lt.useMemo(()=>{if(!t.grouping)return [{key:"__all__",stringKey:"__all__",items:J}];let ee=new Map;return J.forEach(ue=>{let Pe=t.grouping?.getGroupKey(ue.item,ue.index)??"__all__",he=String(Pe),ke=ee.get(he);if(ke){ke.items.push(ue);return}ee.set(he,{key:Pe,stringKey:he,label:t.grouping?.getGroupLabel?.(Pe,ue.item),items:[ue]});}),Array.from(ee.values())},[t.grouping,J]),ie=lt.useCallback((ee,ue)=>{let Pe=t.selection?.isItemDisabled?.(ee.item,ee.index)??false,he={item:ee.item,index:ee.index,key:ee.key,status:t.getItemStatus?.(ee.item,ee.index)??"idle",disabled:Pe,selected:re.has(ee.key),selectionMode:A,layout:ue,select:r(ke=>fe(ee.key,{behavior:ke}),"select"),selectFromEvent:r((ke,Ee)=>fe(ee.key,{behavior:Ee,shiftKey:ke.shiftKey}),"selectFromEvent"),preview:r(()=>a?.onItemPreview?.(ee.item,he),"preview"),detail:r(()=>a?.onItemDetail?.(ee.item,he),"detail"),renderSlot:r(ke=>n?.item?.[ke]?.(ee.item,he),"renderSlot"),notifyMediaLoad:r(()=>a?.onMediaLoad?.(ee.item,he),"notifyMediaLoad"),notifyMediaError:r(ke=>a?.onMediaError?.(ee.item,he,ke),"notifyMediaError")};return he},[a,t.getItemStatus,t.selection,re,fe,A,n?.item]),q=lt.useCallback((ee,ue)=>{let Pe=r(he=>{he.target!==he.currentTarget||he.key!=="Enter"&&he.key!==" "||(he.preventDefault(),A!=="none"?ue.selectFromEvent(he):a?.onItemClick?.(ee.item,ue,he));},"handleKeyboard");return {id:`${f}-item-${ee.index}`,"data-monkeys-collection-item":"","data-item-key":ee.stringKey,"data-selected":ue.selected||void 0,"data-disabled":ue.disabled||void 0,"data-status":ue.status,role:A==="none"?"listitem":"option","aria-selected":A==="none"?void 0:ue.selected,"aria-disabled":ue.disabled||void 0,tabIndex:a?.onItemClick||A!=="none"||t.item?.title?.visibility==="hover"?0:void 0,draggable:a?.onItemDragStart?true:void 0,className:l("min-w-0 group/workbench-collection-item outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t.appearance?.hover&&t.appearance.hover!=="none"&&"transition-[transform,box-shadow,background-color] duration-200",t.appearance?.hover==="highlight"&&"hover:bg-muted/30",t.appearance?.hover==="lift"&&"hover:-translate-y-0.5 motion-reduce:transform-none",t.appearance?.hover==="scale"&&"hover:scale-[1.01] motion-reduce:transform-none",t.appearance?.hover==="shadow"&&"hover:shadow-md",t.appearance?.hover==="lift-shadow"&&"hover:-translate-y-0.5 hover:shadow-md motion-reduce:transform-none",t.appearance?.selection==="ring"&&ue.selected&&"ring-2 ring-primary",t.appearance?.selection==="outline"&&ue.selected&&"outline outline-2 outline-primary",s?.item),onClick:r(he=>{Nu(he.target,he.currentTarget)||(A!=="none"&&ue.selectFromEvent(he),a?.onItemClick?.(ee.item,ue,he));},"onClick"),onDoubleClick:r(he=>{Nu(he.target,he.currentTarget)||a?.onItemDoubleClick?.(ee.item,ue,he);},"onDoubleClick"),onMouseEnter:r(he=>a?.onItemHoverChange?.(ee.item,ue,true,he),"onMouseEnter"),onMouseLeave:r(he=>a?.onItemHoverChange?.(ee.item,ue,false,he),"onMouseLeave"),onKeyDown:Pe,onDragStart:r(he=>a?.onItemDragStart?.(ee.item,ue,he),"onDragStart"),onDragOver:a?.onItemDrop?he=>he.preventDefault():void 0,onDrop:r(he=>a?.onItemDrop?.(ee.item,ue,he),"onDrop")}},[a,s?.item,f,t.appearance,t.item?.title?.visibility,A]),de=lt.useCallback((ee,ue)=>{let Pe=o(ee.item,ue),he=t.item?.title,ke=he?.visibility??"always",Ee=he&&ke!=="never"?he.getContent?.(ee.item,ue)??ue.renderSlot("title"):null,ge=!!(he&&O(Ee)),He=he?.placement??"below",ft=ge&&He.startsWith("overlay-"),ar=bx(he?.maxLines),da=he?.surface??(ft?"scrim":"none"),_l=ge?jsxRuntime.jsx("div",{"data-collection-item-title":"","data-title-placement":He,"data-title-visibility":ke,className:l("min-w-0 px-1 py-2 text-sm font-medium text-foreground",he?.align==="center"&&"text-center",he?.align==="end"&&"text-right",ke==="hover"&&"!opacity-0 transition-opacity group-hover/workbench-collection-item:!opacity-100 group-focus-within/workbench-collection-item:!opacity-100",ft&&"pointer-events-none absolute inset-x-0 z-10 px-3 py-2",He==="overlay-top"&&"top-0",He==="overlay-center"&&"top-1/2 -translate-y-1/2 motion-reduce:transform-none",He==="overlay-bottom"&&"bottom-0",da==="surface"&&"bg-background/90 backdrop-blur-sm",da==="scrim"&&He==="overlay-top"&&"bg-gradient-to-b from-background/90 to-transparent pb-8",da==="scrim"&&He==="overlay-bottom"&&"bg-gradient-to-t from-background/90 to-transparent pt-8",da==="scrim"&&He==="overlay-center"&&"bg-background/75 backdrop-blur-sm",!!ar&&"overflow-hidden [display:-webkit-box] [-webkit-box-orient:vertical]",s?.itemTitle),style:ar?{WebkitLineClamp:ar}:void 0,children:Ee}):null,Xt=t.item?.actions,_i=Xt?.visibility??"always",$l=Xt&&_i!=="never"?ue.renderSlot("actions"):null,$i=!!(Xt&&O($l)),Nn=Xt?.placement??"overlay-bottom",ji=$i&&Nn.startsWith("overlay-"),jl=$i?jsxRuntime.jsx("div",{"data-collection-item-actions":"","data-actions-placement":Nn,"data-actions-align":Xt?.align??"center","data-actions-visibility":_i,className:l("flex min-w-0 items-center gap-2 px-2 py-2",Xt?.align==="start"&&"justify-start",(Xt?.align===void 0||Xt.align==="center")&&"justify-center",Xt?.align==="end"&&"justify-end",Xt?.wrap!==false&&"flex-wrap",_i==="hover"&&"!opacity-0 transition-opacity group-hover/workbench-collection-item:!opacity-100 group-focus-within/workbench-collection-item:!opacity-100 [@media(hover:none)]:!opacity-100",ji&&"pointer-events-none absolute inset-x-0 z-20",Nn==="overlay-top"&&"top-1",Nn==="overlay-bottom"&&"bottom-1",s?.itemActions),children:jsxRuntime.jsx("div",{className:l("pointer-events-auto flex items-center gap-2",Xt?.wrap!==false&&"flex-wrap"),children:$l})}):null;return !ge&&!$i?Pe:jsxRuntime.jsxs("div",{className:l("min-w-0",(ft||ji)&&"relative",s?.itemContent),"data-collection-item-content":"",children:[He==="above"?_l:null,Nn==="above"?jl:null,Pe,He==="below"||ft?_l:null,Nn==="below"||ji?jl:null]})},[s?.itemActions,s?.itemContent,s?.itemTitle,t.item,o]),we=lt.useCallback((ee,ue,Pe=true)=>{let he=ie(ee,ue),ke=de(ee,he);return Pe?jsxRuntime.jsx("div",{...q(ee,he),children:ke}):ke},[ie,q,de]),Ce=lt.useMemo(()=>({mode:N,columnCount:ye,columnWidth:xe,containerWidth:W,gap:D,placementStrategy:oe,rowHeight:B}),[ye,xe,W,D,N,oe,B]),Me=r(ee=>{if(t.windowed&&N!=="dense"){let ke=ee===X[X.length-1];return jsxRuntime.jsx(bu,{items:ee.items,getKey:Ee=>Ee.stringKey,layout:Ce,cardWidth:Kn(t.layout.cardWidth,hi,b.current),getScrollOwner:ze,railRef:N==="rail"&&ke?v:void 0,tailRef:N==="rail"&&ke?x:void 0,estimateHeight:(Ee,ge)=>{let He=t.layout.getItemSize?.(Ee.item,{...Ce,columnWidth:ge}),ft=t.layout.getItemAspectRatio?.(Ee.item,Ee.index);return Kn(He?.height,ft&&ft>0?ge/ft:300,b.current)},containerProps:{role:A==="none"?"list":"listbox","aria-label":c??se.collection,"aria-multiselectable":A==="multiple"||void 0,className:s?.layout},getItemProps:(Ee,ge)=>q(Ee,ie(Ee,ge)),renderItem:(Ee,ge)=>we(Ee,ge,false)})}let ue=t.virtualization,Pe=ue?.adapter,he=ue?.enabled===true;if(he&&(!Pe||Pe.supports?.(N)===false)&&ue?.fallback==="error")return null;if(he&&Pe&&Pe.supports?.(N)!==false)return Pe.render({items:ee.items.map(({item:ke})=>ke),keys:ee.items.map(({key:ke})=>ke),layout:t.layout,scrollOwner:ze(),renderItem:r((ke,Ee,ge)=>{let He=ee.items[Ee];return He?jsxRuntime.jsx(lt.Fragment,{children:we(He,ge)},He.stringKey):null},"renderItem")});if(N==="masonry"||N==="dense")return jsxRuntime.jsx(Ur,{items:ee.items,columnCount:ye,columnWidth:t.layout.cardWidth??t.layout.columnWidth??t.layout.idealCardWidth,gap:D,rowHeight:B,placementStrategy:N==="dense"?"dense":oe,className:s?.layout,containerProps:{role:A==="none"?"list":"listbox","aria-label":c??se.collection,"aria-multiselectable":A==="multiple"||void 0},getItemProps:(ke,Ee)=>{let ge=ie(ke,{...Ee,mode:N});return q(ke,ge)},getItemKey:ke=>ke.key,getItemSize:(ke,Ee)=>{let ge={...Ee,mode:N},He=t.layout.getItemSize?.(ke.item,ge),ft=t.layout.getItemAspectRatio?.(ke.item,ke.index);return ux(He,ft,Ee.columnWidth)},renderItem:(ke,Ee)=>we(ke,{...Ee,mode:N},false)});if(N==="rail"){let ke=t.layout.cardWidth??t.layout.idealCardWidth??hi,Ee=ee===X[X.length-1];return jsxRuntime.jsx("div",{ref:Ee?v:void 0,role:A==="none"?"list":"listbox","aria-label":c??se.collection,"aria-multiselectable":A==="multiple"||void 0,className:l("grid min-w-0 grid-flow-col items-start overflow-x-auto",s?.layout),style:{gap:D,gridAutoColumns:typeof ke=="number"?`${ke}px`:ke},children:ee.items.map((ge,He)=>jsxRuntime.jsx("div",{ref:Ee&&He===ee.items.length-1?x:void 0,className:"min-w-0",children:we(ge,Ce)},ge.stringKey))})}return jsxRuntime.jsx("div",{role:A==="none"?"list":"listbox","aria-label":c??se.collection,"aria-multiselectable":A==="multiple"||void 0,className:l("grid min-w-0 items-start",s?.layout),style:{gap:D,gridTemplateColumns:`repeat(${ye}, minmax(0, 1fr))`},children:ee.items.map(ke=>{let Ee=t.layout.getItemSize?.(ke.item,Ce),ge=xi(Math.round(Number(Ee?.columnSpan)||1),1,ye),He=t.layout.getItemAspectRatio?.(ke.item,ke.index);return jsxRuntime.jsx("div",{...q(ke,ie(ke,{...Ce,columnSpan:ge,size:Ee})),style:{gridColumn:ge>1?`span ${ge}`:void 0,aspectRatio:Number.isFinite(He)&&Number(He)>0?String(He):void 0},children:we(ke,{...Ce,columnSpan:ge,size:Ee},false)},ke.stringKey)})})},"renderGroupItems"),Be={items:e,error:U,loading:j,loadingMore:Z,selectedKeys:re,retry:r(()=>a?.onRetry?.(),"retry")},_e=ro(n?.header,Be),Ze=ro(n?.toolbar,Be),Fe=re.size>0?ro(n?.selectionToolbar,Be):null,ot=ro(n?.beforeItems,Be),We=ro(n?.footer,Be),Le=Q?.permission===true,ne=Q?.offline===true&&!Le,Se=j&&e.length===0&&!Le&&!ne,Ve=!!U&&e.length===0&&!Le&&!ne&&!Se,Ye=!Le&&!ne&&!Se&&!Ve&&(Q?.empty===true||e.length===0),nt=ro(n?.loading,Be),gt=ro(n?.error,Be),Pt=ro(n?.permission,Be),Ue=ro(n?.offline,Be),Ut=ro(n?.empty,Be),Ft=ro(n?.loadMore,Be),pe=t.layout.scrollOwner==="self"||t.layout.scrollOwner===void 0&&(t.layout.fillHeight||t.layout.maxHeight),Ge={...u,gap:t.layout.gap===void 0?u?.gap??"var(--monkeys-bento-gap, var(--global-spacing, 0.75rem))":Ru(t.layout.gap),padding:t.layout.padding??u?.padding,height:t.layout.fillHeight?"100%":u?.height,maxHeight:t.layout.maxHeight??u?.maxHeight,overflow:pe?"auto":u?.overflow};return jsxRuntime.jsxs("section",{ref:b,...d,"data-monkeys-component":"workbench-collection","data-layout-mode":N,"data-density":t.appearance?.density,"data-radius":t.appearance?.radius,"data-media-fit":t.appearance?.mediaFit,"data-hover-effect":t.appearance?.hover,"aria-label":c??se.collection,"aria-busy":j||Z||void 0,className:l("min-h-0 min-w-0",t.layout.fillHeight&&"h-full",s?.root,i),style:Ge,children:[O(_e)?jsxRuntime.jsx("div",{className:s?.header,children:_e}):null,O(Ze)?jsxRuntime.jsx("div",{className:s?.toolbar,children:Ze}):null,O(Fe)?jsxRuntime.jsx("div",{className:s?.selectionToolbar,children:Fe}):null,O(ot)?jsxRuntime.jsx("div",{className:s?.beforeItems,children:ot}):null,Le?O(Pt)?Pt:jsxRuntime.jsx(Sr,{kind:"permission",title:se.permission,actions:m.permission?.showRequestAccess!==false&&a?.onRequestAccess?jsxRuntime.jsx(ve,{size:"sm",label:se.requestAccess,onClick:a.onRequestAccess}):void 0}):ne?O(Ue)?Ue:jsxRuntime.jsx(Sr,{kind:"offline",title:se.offline,actions:m.error?.showRetry!==false&&a?.onRetry?jsxRuntime.jsx(ve,{size:"sm",label:se.retry,onClick:a.onRetry}):void 0}):Se?O(nt)?nt:ae==="spinner"?jsxRuntime.jsx(Yo,{title:se.loading,variant:"spinner"}):jsxRuntime.jsx("div",{ref:Y,className:l("min-w-0",s?.items),children:jsxRuntime.jsx(il,{mode:N,phase:"initial",columnCount:ye,columnWidth:xe,cardWidth:t.layout.cardWidth??t.layout.idealCardWidth,gap:D,rowHeight:B,config:t.loading?.skeleton,ariaLabel:se.loading,className:s?.layout})}):Ve?O(gt)?gt:jsxRuntime.jsx(Sr,{kind:"error",title:se.loadError,actions:m.error?.showRetry!==false&&a?.onRetry?jsxRuntime.jsx(ve,{size:"sm",label:se.retry,onClick:a.onRetry}):void 0}):Ye?O(Ut)?Ut:jsxRuntime.jsx(Ba,{title:se.empty}):jsxRuntime.jsx("div",{ref:Y,className:l("min-w-0",s?.items),children:X.map((ee,ue)=>{let Pe={key:ee.key,label:ee.label,items:ee.items.map(({item:Ee})=>Ee),groupIndex:ue},he=t.grouping?n?.groupHeading?.(Pe,Be)??ee.label:null,ke=`${f}-group-${ue}`;return jsxRuntime.jsxs("div",{"data-collection-group":ee.stringKey,className:s?.group,children:[O(he)?jsxRuntime.jsx("div",{id:ke,role:"heading","aria-level":2,className:s?.groupHeading,children:he}):null,Me(ee)]},ee.stringKey)})}),e.length>0&&U?jsxRuntime.jsx("div",{className:s?.status,children:O(gt)?gt:jsxRuntime.jsx(Sr,{kind:"error",title:se.refreshError,actions:m.error?.showRetry!==false&&a?.onRetry?jsxRuntime.jsx(ve,{size:"sm",label:se.retry,onClick:a.onRetry}):void 0})}):null,e.length>0&&(te||Z)?jsxRuntime.jsx("div",{ref:N==="rail"?void 0:x,className:s?.loadMore,"data-collection-load-more":"",children:O(Ft)?Ft:Z?ae==="spinner"?jsxRuntime.jsx(Yo,{title:se.loadingMore,variant:"spinner"}):jsxRuntime.jsx(il,{mode:N,phase:"load-more",columnCount:ye,columnWidth:xe,cardWidth:t.layout.cardWidth??t.layout.idealCardWidth,gap:D,rowHeight:B,config:t.loading?.skeleton,ariaLabel:se.loadingMore,className:s?.layout}):null}):null,O(We)?jsxRuntime.jsx("div",{className:s?.footer,children:We}):null]})}r(on,"WorkbenchCollection");function hx(e){if(typeof e=="number"&&Number.isFinite(e)&&e>0)return `${e}px`;if(typeof e=="string"&&e.trim())return e.trim()}r(hx,"getNormalizedGalleryGridCardWidth");function xx(e){return e==="compact"?2:e==="detailed"?6:4}r(xx,"getDefaultGalleryDetailLimit");function vx(e,t){return e===1||e===2||e===3?Number(e):t==="detailed"?1:2}r(vx,"getNormalizedGalleryBentoColumns");function kx({density:e,visibility:t,limit:o}){if(t==="all")return Number.POSITIVE_INFINITY;let n=Number.parseInt(String(o),10);return Number.isFinite(n)&&n>0?n:xx(e)}r(kx,"getNormalizedGalleryDetailLimit");function Mu(e){return e==="compact"?{min:220,ideal:244,max:268}:e==="detailed"?{min:320,ideal:372,max:420}:{min:260,ideal:304,max:348}}r(Mu,"getGalleryCardWidthMetrics");function wx(e){if(e==null||e===""||e==="auto")return;let t=Number.parseInt(String(e),10);if(!(!Number.isFinite(t)||t<=0))return Math.max(1,Math.min(t,8))}r(wx,"getNormalizedGalleryGridColumns");function Bu(e){if(e==null)return 0;let t=String(e).trim();return t&&t!=="\u2014"?t.length:0}r(Bu,"getGalleryTextLength");function qr({column:e,row:t,getFieldValue:o,getDisplayText:n}){if(!e)return "";let a=o(e,t);if(a==null||a==="")return "";let i=n(a);return i==="\u2014"?"":String(i)}r(qr,"getGalleryFieldText");function gl({text:e,charsPerLine:t,maxLines:o}){let n=Bu(e);return n?Math.max(1,Math.min(o,Math.ceil(n/t))):0}r(gl,"estimateLineCount");function Cx({text:e,density:t,bentoColumns:o}){let n=t==="detailed"?54:t==="compact"?44:48,s=gl({text:e,charsPerLine:o===1?t==="detailed"?32:26:t==="detailed"?18:15,maxLines:t==="detailed"?3:2});return s?n+Math.max(0,s-1)*16:n}r(Cx,"estimateGalleryDetailCellHeight");function Sx({columns:e,density:t,bentoColumns:o}){if(!e.length)return 0;let n=e.map(i=>Cx({text:i.text,density:t,bentoColumns:o}));if(o===1)return 12+n.reduce((i,s)=>i+s,0)+Math.max(0,e.length-1)*8;let a=12;for(let i=0;i<n.length;i+=o){let s=n.slice(i,i+o);a+=Math.max(...s),i+o<n.length&&(a+=8);}return a}r(Sx,"estimateGalleryDetailGridHeight");function Tx({row:e,columns:t,galleryFieldKey:o,galleryDensity:n,galleryBentoColumns:a,galleryDetailVisibility:i,galleryDetailLimit:s,getFieldValue:u,isMediaColumn:c,isTitleCandidate:d,isSummaryCandidate:g,getDisplayText:m,isImageField:p,isAudioField:f,cardVariant:b,renderPreview:v,renderLeadingVisual:y,hiddenDetailFieldKeys:x,layout:w,resolveRecordVisual:h}){let k=t.find(A=>A.renderType==="icon"),C=k&&h?h(e?.[k.key],e,k):null,S=(o!=="auto"?t.find(A=>A.key===o&&c(A,e)):null)||t.find(A=>c(A,e))||null,I=S?u(S,e):null,R=S?p(S,I):false,W=S?f(S,I):false,L=!!y||!!C,F=t.filter(A=>A.key!==S?.key&&A.renderType!=="icon"),M=F.filter(A=>{if(!A||c(A,e)||!d(A,e))return false;let me=u(A,e);return !(me==null||me==="")})[0]||null,G=M?qr({column:M,row:e,getFieldValue:u,getDisplayText:m}):String(m(e?.linkKey||e?.id||"")),Y=F.find(A=>!A||A.key===M?.key||c(A,e)||!g(A,e)?false:qr({column:A,row:e,getFieldValue:u,getDisplayText:m}).length>12)||F.find(A=>!A||A.key===M?.key||c(A,e)||!g(A,e)?false:Bu(qr({column:A,row:e,getFieldValue:u,getDisplayText:m}))>0)||null,N=Y?qr({column:Y,row:e,getFieldValue:u,getDisplayText:m}):"",D=new Set(x),B=F.filter(A=>A.key!==M?.key&&A.key!==Y?.key&&!D.has(A.key)).map(A=>({column:A,text:qr({column:A,row:e,getFieldValue:u,getDisplayText:m})})),K=kx({density:n,visibility:i,limit:s}),J=Number.isFinite(K)?B.slice(0,K):B,V=Math.max(B.length-J.length,0),Q=vx(a,n),j=w?.columnWidth||Mu(n).ideal;if(b==="image-only")return {width:j,height:Math.round(j*1.25)};if(b==="preview-only")return {width:j,height:Math.round(j*.82)};let Z=n==="detailed"?84:n==="compact"?64:72;typeof v=="function"?Z+=n==="detailed"?188:n==="compact"?140:164:R?Z+=Math.round(j*(n==="detailed"?.72:.62))+12:W&&(Z+=92);let te=gl({text:G,charsPerLine:n==="detailed"?26:24,maxLines:2})||1,ae=gl({text:N,charsPerLine:L?22:n==="detailed"?30:26,maxLines:n==="detailed"?4:2}),le=26+te*18+(ae>0?ae*16+4:0);return Z+=Math.max(L?56:0,le),Z+=Sx({columns:J,density:n,bentoColumns:Q}),V>0&&(Z+=18),!N&&J.length===0&&(Z+=24),{width:j,height:Z}}r(Tx,"getDefaultGalleryMasonryItemSize");function Rx({rows:e=[],children:t,columns:o=[],onRowClick:n,cardInteraction:a="button",selectedLinkKey:i,selectedRowKey:s,selectedRowKeys:u,className:c,isMasonry:d=false,galleryLayoutMode:g="auto",galleryRailCardWidth:m,galleryGap:p,galleryScrollDirection:f,galleryGridColumns:b,galleryGridColumnsResponsive:v,galleryCardWidthMetrics:y,galleryCardAspectRatio:x,galleryCardMinHeight:w,galleryGridCardWidth:h,galleryUnderfilledBehavior:k,galleryMasonryColumnWidth:C,masonryPlacementStrategy:T,pagination:S,onLoadMore:I,scrollOwner:R,windowed:W,galleryFieldKey:H="auto",galleryDensity:L="comfortable",galleryBentoColumns:F=2,galleryDetailVisibility:$="limit",galleryDetailLimit:M,shouldEnhanceMultimodal:G=true,getFieldValue:Y,isMediaColumn:N,isTitleCandidate:D,isSummaryCandidate:B,getDisplayText:K,renderFieldValue:J,getImagePreviewSrc:V,isImageField:Q,isAudioField:j,AudioPlayerComponent:Z,cardVariant:te="default",cardPresentation:ae,renderCardSlot:le,renderCoverTitle:A,galleryDetailPresentation:me,renderPreview:P,renderMeta:_,renderLeadingVisual:re,resolveRecordVisual:fe,hiddenDetailFieldKeys:ye=[],labels:xe,formatLabel:oe,getMasonryItemSize:se}){let{min:Re,ideal:Ie,max:ze}=y??Mu(L),ce=m||Re,U=wx(b),z=hx(h),X=C||Re,ie=g==="rail",q=Y||_n,de=K||$r,we=Q||jr,Ce=j||Kr,Me=N||((We,Le)=>li(We,Le,{getFieldValue:q,shouldEnhanceMultimodal:G,isImageField:we,isAudioField:Ce})),Be=D||((We,Le)=>di(We,Le,{isMediaColumn:Me})),_e=B||((We,Le)=>ci(We,Le,{isMediaColumn:Me})),Ze=J||((We,Le,{compact:ne}={})=>jsxRuntime.jsx("span",{children:de(q(We,Le))})),Fe=r((We,Le)=>jsxRuntime.jsx(tl,{row:We,columns:o,cardInteraction:a,onClick:n?()=>n(We,Le):void 0,isSelected:u?u.has(String(We?.linkKey||We?.id||"")):String(We?.linkKey||We?.id||"")===String(s||i||""),isMasonry:d,galleryFieldKey:H,galleryDensity:L,galleryBentoColumns:F,galleryDetailVisibility:$,galleryDetailLimit:M,galleryDetailPresentation:me,shouldEnhanceMultimodal:G,getFieldValue:q,isMediaColumn:Me,isTitleCandidate:Be,isSummaryCandidate:_e,getDisplayText:de,renderFieldValue:Ze,getImagePreviewSrc:V,isImageField:we,isAudioField:Ce,AudioPlayerComponent:Z,cardVariant:te,cardPresentation:ae,renderCardSlot:le,renderCoverTitle:A,renderPreview:P,renderMeta:_,renderLeadingVisual:re,resolveRecordVisual:fe,hiddenDetailFieldKeys:ye,labels:xe,formatLabel:oe},We?.id||We?.linkKey||Le),"renderGalleryCard"),ot=d?T==="dense"?"dense":"masonry":ie?"rail":"grid";if(pu(ot,f),t!==void 0){let We=lt.Children.toArray(t);return jsxRuntime.jsx(on,{items:We,callbacks:{onLoadMore:I},slots:{loadMore:S?.loadingMore?jsxRuntime.jsx(Yo,{variant:"spinner",className:"py-global",style:{minHeight:0}}):void 0},classNames:{layout:c},config:{windowed:W,state:S,loading:{autoFill:true},getItemKey:r((Le,ne)=>lt.isValidElement(Le)&&Le.key!=null?Le.key:ne,"getItemKey"),layout:{mode:ot,scrollOwner:R??"parent",gap:p,columns:v??(U?{mobile:1,tablet:Math.min(2,U),desktop:U}:"auto"),underfilledBehavior:k,cardWidth:ie?ce:void 0,minCardWidth:z??Re,idealCardWidth:z??Ie,maxCardWidth:z??ze}},renderItem:Le=>Le})}return jsxRuntime.jsx(on,{items:e,slots:{loadMore:S?.loadingMore?jsxRuntime.jsx(Yo,{variant:"spinner",className:"py-global",style:{minHeight:0}}):void 0},callbacks:{onLoadMore:I,onItemClick:a==="container"&&n?(We,Le)=>n(We,Le.index):void 0},classNames:{layout:c},config:{windowed:W,state:S,loading:{autoFill:true},getItemKey:r((We,Le)=>We?.id||We?.linkKey||Le,"getItemKey"),layout:{mode:ot,underfilledBehavior:k,scrollOwner:R,gap:p,columns:v??(U?{mobile:1,tablet:Math.min(2,U),desktop:U}:"auto"),cardWidth:ie?ce:void 0,minCardWidth:z??Re,idealCardWidth:d?X:z??Ie,maxCardWidth:z??ze,placementStrategy:T??(te==="image-only"?"shortest":"shelf"),getItemAspectRatio:te==="image-only"?We=>{let Le=o.find(nt=>nt.key===H)??o.find(nt=>Me(nt,We)),ne=Le?q(Le,We):void 0,Se=ne&&typeof ne=="object"&&"aspectRatio"in ne?ne.aspectRatio:void 0;if(typeof Se!="string"||!/^\d+(?:\.\d+)?:\d+(?:\.\d+)?$/.test(Se))return;let[Ve,Ye]=Se.split(":").map(Number);return Ve>0&&Ye>0?Ve/Ye:void 0}:void 0,getItemSize:te==="image-only"&&x&&x>0?(We,Le)=>({height:Math.max(w??0,Le.columnWidth/x)}):d?(We,Le)=>{let ne=Tx({row:We,columns:o,galleryFieldKey:H,galleryDensity:L,galleryBentoColumns:F,galleryDetailVisibility:$,galleryDetailLimit:M,getFieldValue:q,isMediaColumn:Me,isTitleCandidate:Be,isSummaryCandidate:_e,getDisplayText:de,isImageField:we,isAudioField:Ce,cardVariant:te,renderPreview:P,renderLeadingVisual:re,hiddenDetailFieldKeys:ye,layout:Le,resolveRecordVisual:fe});if(typeof se!="function")return ne;let Se=se(We,{...Le,placementStrategy:Le.placementStrategy==="dense"?"dense":"shelf",defaultSize:ne})||{};return {...ne,...Se}}:void 0}},renderItem:(We,Le)=>Fe(We,Le.index)})}r(Rx,"WorkbenchGalleryView");function Nx({layout:e="horizontal",mediaPosition:t="start",detailsSize:o="balanced",sizing:n="content",asidePosition:a="end",detailsVisible:i=true,heading:s,metadata:u,message:c,actions:d,media:g,toolbar:m,aside:p,secondary:f,children:b,className:v,...y}){let x=i&&(O(s)||O(u)||O(b)||O(c)||O(d)),w=e==="horizontal"&&O(g)&&x,h=n==="fill",k=O(f),C=w&&k,T=O(p)?jsxRuntime.jsx("div",{"data-record-part":"aside",className:"flex min-h-0 shrink-0 gap-global",children:p}):null;return jsxRuntime.jsxs("article",{...y,"data-monkeys-component":"record-view","data-record-layout":e,"data-record-sizing":n,className:l("@container flex min-h-0 min-w-0 flex-col gap-global font-[family-name:var(--font-sans)] text-sm leading-5 text-foreground",h&&"h-full",v),children:[O(m)&&jsxRuntime.jsx("div",{"data-record-part":"toolbar",className:"flex shrink-0 flex-wrap items-center gap-global",children:m}),jsxRuntime.jsxs("div",{className:l("flex min-h-0 min-w-0 gap-global",h&&"flex-1"),children:[a==="start"&&T,jsxRuntime.jsxs("div",{"data-record-part":"body",className:l("grid min-h-0 min-w-0 flex-1 grid-cols-1 gap-global",C?"@[48rem]:grid-cols-[minmax(0,2fr)_minmax(0,1fr)_minmax(0,1fr)]":w&&(o==="balanced"?"@[48rem]:grid-cols-2":t==="start"?"@[48rem]:grid-cols-[minmax(0,1fr)_minmax(16rem,24rem)]":"@[48rem]:grid-cols-[minmax(16rem,24rem)_minmax(0,1fr)]"),h&&"overflow-auto @[48rem]:overflow-hidden"),children:[O(g)&&jsxRuntime.jsx("div",{"data-record-part":"media",className:l("min-h-0 min-w-0",t==="end"&&w&&"@[48rem]:order-2",h&&"flex flex-col"),children:g}),x&&jsxRuntime.jsxs("div",{"data-record-part":"details",className:l("flex min-h-0 min-w-0 flex-col [&>section]:flex-1",h&&"@[48rem]:overflow-auto"),children:[O(s)&&jsxRuntime.jsx("div",{className:"mb-global flex flex-wrap items-center gap-global",children:s}),O(u)&&jsxRuntime.jsx("div",{className:"mb-global flex flex-wrap items-center gap-global text-sm tabular-nums text-muted-foreground [&_span]:text-inherit [&_time]:text-inherit",children:u}),b,O(c)&&jsxRuntime.jsx("div",{className:"mt-global break-words text-sm text-destructive-text",children:c}),O(d)&&jsxRuntime.jsx("div",{className:"mt-auto flex shrink-0 flex-wrap gap-global pt-global",children:d})]}),k&&jsxRuntime.jsx("div",{"data-record-part":"secondary",className:l("flex min-h-0 min-w-0 flex-col [&>section]:flex-1",h&&"@[48rem]:overflow-auto"),children:f})]}),a==="end"&&T]})]})}r(Nx,"RecordView");var Ix=[{id:"primary",layout:"rail",filterCount:2,cardCount:4,aspectRatios:[16/11]},{id:"secondary",layout:"grid",filterCount:3,cardCount:5,aspectRatios:[4/5,1,3/4,5/4,1]}];function Pu(e,t,o){return typeof e!="number"||!Number.isFinite(e)||e<0?t:Math.min(Math.round(e),o)}r(Pu,"normalizeCount");function Mx(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?1:Math.min(Math.max(e,.5),2)}r(Mx,"normalizeAspectRatio");function Bx({animated:e,filterCount:t}){return jsxRuntime.jsxs("div",{className:"flex min-h-10 flex-wrap items-center justify-between gap-4",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(Wt,{variant:"line",animated:e,className:"h-6 w-36 rounded-md"}),jsxRuntime.jsx(Wt,{variant:"line",animated:e,className:"h-3 w-12"})]}),jsxRuntime.jsx("div",{className:"flex flex-wrap justify-end gap-2",children:Array.from({length:t},(o,n)=>jsxRuntime.jsx(Wt,{variant:"block",animated:e,className:"h-9 w-28 rounded-lg"},n))})]})}r(Bx,"WorkbenchGallerySkeletonHeading");function Px({sections:e=Ix,animated:t=true,animation:o,className:n,...a}){return jsxRuntime.jsx(jo,{animation:o,animated:t,children:jsxRuntime.jsx("div",{...a,role:"status","aria-busy":"true","aria-label":"Loading gallery","data-monkeys-component":"workbench-gallery-skeleton",className:l("grid w-full gap-4",n),children:e.map((i,s)=>{let u=i.layout??"grid",c=Pu(i.filterCount,2,8),d=Pu(i.cardCount,u==="rail"?4:5,24),g=i.aspectRatios?.length?i.aspectRatios:[u==="rail"?16/11:1];return jsxRuntime.jsx(En,{index:s,children:jsxRuntime.jsxs("section",{className:"grid gap-4","data-skeleton-section":i.id,children:[jsxRuntime.jsx(Bx,{animated:t,filterCount:c}),jsxRuntime.jsx("div",{className:l("grid items-start gap-4",u==="rail"?"grid-cols-1 sm:grid-cols-2 xl:grid-cols-4":"grid-cols-2 md:grid-cols-3 xl:grid-cols-5"),"data-skeleton-layout":u,children:Array.from({length:d},(m,p)=>jsxRuntime.jsx("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:jsxRuntime.jsx(Wt,{variant:"block",animated:t,className:"h-auto w-full rounded-none",style:{aspectRatio:String(Mx(g[p%g.length]))}})},p))})]})},i.id||s)})})})}r(Px,"WorkbenchGallerySkeleton");function Ex({animated:e=true,animation:t,className:o,"aria-label":n,...a}){let i=vt().loading.spinner,s=r(u=>jsxRuntime.jsx(Wt,{variant:"block",animated:e,className:u}),"skeleton");return jsxRuntime.jsx(jo,{animation:t,animated:e,children:jsxRuntime.jsxs("div",{...a,role:"status","aria-busy":"true","aria-label":n??i,"data-monkeys-component":"workbench-page-skeleton",className:l("flex size-full min-h-0 flex-col gap-4 overflow-hidden",o),children:[jsxRuntime.jsxs("div",{className:"flex h-10 shrink-0 items-center justify-between gap-4 rounded-lg border border-border bg-card px-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[s("h-5 w-20"),s("h-5 w-16"),s("h-5 w-24")]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[s("h-7 w-20"),s("size-7")]})]}),jsxRuntime.jsxs("div",{className:"grid shrink-0 grid-cols-1 gap-4 md:grid-cols-3",children:[s("h-40 md:col-span-2"),s("h-40")]}),jsxRuntime.jsxs("div",{className:"grid min-h-0 flex-1 grid-cols-1 gap-4 lg:grid-cols-[minmax(0,2fr)_minmax(14rem,1fr)]",children:[jsxRuntime.jsxs("div",{className:"flex min-h-0 flex-col gap-4 rounded-lg border border-border bg-card p-4",children:[s("h-6 w-40"),jsxRuntime.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:6},(u,c)=>jsxRuntime.jsx(En,{index:c,children:jsxRuntime.jsxs("div",{className:"space-y-2",children:[s("h-4 w-20"),s("h-9 w-full")]})},c))}),s("min-h-32 flex-1")]}),jsxRuntime.jsxs("div",{className:"flex min-h-40 flex-col gap-4 rounded-lg border border-border bg-card p-4",children:[s("h-6 w-28"),s("min-h-28 flex-1"),s("h-9 w-full")]})]})]})})}r(Ex,"WorkbenchPageSkeleton");function Eu(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r(Eu,"toCssSize");function Vx(e,t){return String(e?.id??e?.key??t)}r(Vx,"defaultGetRowId");function Gx(e){return String(e?.columnId??e?.status??"")}r(Gx,"defaultGetColumnId");function _x(e){let t=e?.title??e?.name??e?.id??"Untitled";return jsxRuntime.jsx("div",{className:"rounded-lg border border-border/70 bg-card px-3 py-2 text-sm text-foreground shadow-sm",children:String(t)})}r(_x,"defaultRenderCard");function $x({row:e,rowId:t,rowIndex:o,column:n,classNames:a,renderCard:i}){let{attributes:s,listeners:u,setNodeRef:c,isDragging:d}=core.useDraggable({id:t});return jsxRuntime.jsx("div",{ref:c,...u,...s,className:l("touch-none",a?.cardWrapper),children:i(e,{row:e,rowIndex:o,column:n,isDragging:d,isOverlay:false})})}r($x,"WorkbenchLaneDraggableCard");function jx({column:e,columnRows:t,columnWidth:o,columnMinHeight:n,emptyColumn:a,classNames:i,renderCard:s}){let{setNodeRef:u,isOver:c}=core.useDroppable({id:e.id});return jsxRuntime.jsxs("section",{className:l("flex shrink-0 flex-col rounded-xl border border-border/60 bg-card p-2 shadow-sm",i?.column,e.className),style:{width:Eu(o)??"280px"},children:[jsxRuntime.jsxs("div",{className:l("flex h-10 items-center gap-2 px-1",i?.columnHeader,e.headerClassName),children:[e.icon?jsxRuntime.jsx("span",{className:l("inline-flex h-4 w-4 items-center justify-center text-muted-foreground",i?.columnIcon,e.iconClassName),children:e.icon}):null,jsxRuntime.jsx("span",{className:l("inline-flex items-center rounded px-2 py-0.5 text-xs font-semibold bg-muted text-muted-foreground",i?.columnBadge,e.badgeClassName),children:e.label??e.id}),jsxRuntime.jsx("span",{className:l("text-xs text-muted-foreground",i?.columnCount),children:t.length})]}),jsxRuntime.jsx("div",{ref:u,className:l("mt-1 flex min-h-[200px] flex-1 flex-col gap-2 overflow-y-auto rounded-lg p-1 transition-colors [scrollbar-width:thin]",c&&"bg-accent/60",i?.columnBody,e.bodyClassName),style:{minHeight:Eu(n)},children:t.length?t.map(({row:d,rowIndex:g,rowId:m})=>jsxRuntime.jsx($x,{row:d,rowId:m,rowIndex:g,column:e,classNames:i,renderCard:s},m)):a?jsxRuntime.jsx("div",{className:l("flex min-h-24 items-center justify-center rounded-lg border border-dashed border-border/60 px-3 py-4 text-xs text-muted-foreground",i?.emptyColumn),children:a}):null})]})}r(jx,"WorkbenchLaneColumnView");function Kx({rows:e=[],columns:t=[],getRowId:o=Vx,getColumnId:n=Gx,renderCard:a,renderOverlayCard:i,onMoveRow:s,onSelectRow:u,emptyColumn:c,activationDistance:d=5,columnWidth:g=280,columnMinHeight:m,className:p,classNames:f,style:b}){let v=a??((H,L)=>u?jsxRuntime.jsx(ve,{className:"w-full justify-start whitespace-normal text-left",onClick:()=>u({rowId:o(H,L.rowIndex)}),children:String(H?.title??H?.name??o(H,L.rowIndex))}):_x(H)),[y,x]=lt.useState(null),w=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:d}})),h=lt.useMemo(()=>new Map(t.map(H=>[H.id,H])),[t]),k=lt.useMemo(()=>e.map((H,L)=>({row:H,rowIndex:L,rowId:o(H,L),columnId:n(H,L)})),[n,o,e]),C=y?k.find(H=>H.rowId===y):void 0,T=lt.useMemo(()=>{let H=new Map;return t.forEach(L=>H.set(L.id,[])),k.forEach(({row:L,rowIndex:F,rowId:$,columnId:M})=>{H.get(M)?.push({row:L,rowIndex:F,rowId:$});}),H},[t,k]),S=C?h.get(C.columnId):void 0,I=lt.useCallback(H=>{x(String(H.active.id));},[]),R=lt.useCallback(H=>{x(null);let L=String(H.active.id),F=String(H.over?.id??""),$=k.find(M=>M.rowId===L);!$||!h.has(F)||$.columnId===F||s?.(L,F,$.row);},[h,s,k]),W=lt.useCallback(()=>{x(null);},[]);return jsxRuntime.jsxs(core.DndContext,{sensors:w,onDragStart:I,onDragEnd:R,onDragCancel:W,children:[jsxRuntime.jsx("div",{className:l("flex min-h-0 flex-1 gap-4 overflow-x-auto p-4 [scrollbar-width:thin]",f?.root,p),style:b,children:t.map(H=>jsxRuntime.jsx(jx,{column:H,columnRows:T.get(H.id)||[],columnWidth:g,columnMinHeight:m,emptyColumn:c,classNames:f,renderCard:v},H.id))}),jsxRuntime.jsx(core.DragOverlay,{children:C&&S?jsxRuntime.jsx("div",{className:l(f?.overlayWrapper),children:(i||v)(C.row,{row:C.row,rowIndex:C.rowIndex,column:S,isDragging:false,isOverlay:true})}):null})]})}r(Kx,"WorkbenchLaneView");var It=r((e,t,o,n)=>Number.isFinite(e)?Math.min(n,Math.max(o,e)):t,"bounded"),yo=r(e=>Math.round(e*1e3)/1e3,"coordinate");function qx(e,t=0){if(!e.length)return "";let o=e[0],n=`M${yo(o[0])},${yo(o[1])}`,a=It(t,0,0,1)/6;for(let i=0;i<e.length;i++){let s=e[(i+e.length-1)%e.length],u=e[i],c=e[(i+1)%e.length],d=e[(i+2)%e.length];a?n+=`C${yo(u[0]+(c[0]-s[0])*a)},${yo(u[1]+(c[1]-s[1])*a)} ${yo(c[0]-(d[0]-u[0])*a)},${yo(c[1]-(d[1]-u[1])*a)} ${yo(c[0])},${yo(c[1])}`:n+=`L${yo(c[0])},${yo(c[1])}`;}return n+"Z"}r(qx,"metricRadarPath");function Du({items:e,summary:t,ariaLabel:o="Metrics",className:n,itemClassName:a,radar:i={}}){let s="metric-radar-"+lt.useId().replace(/[^a-zA-Z0-9_-]/g,""),u=It(i.geometry?.radius,100,20,120),c=It(i.geometry?.labelRadius,131,u,155),d=It(i.geometry?.startAngle,-90,-360,360),g=Math.round(It(i.geometry?.levels,4,1,12)),m=r((S,I)=>{let R=(d+S*360/e.length)*Math.PI/180;return [180+Math.cos(R)*I,160+Math.sin(R)*I]},"point"),p=e.map((S,I)=>Number.isFinite(S.progress)?m(I,It(S.progress,0,0,1)*u):void 0),f=p.every(S=>S!==void 0),b=i.series,v=i.grid,y=i.labels,x=i.summary,w=b?.stroke??"hsl(var(--primary))",h=v?.color??"hsl(var(--border))",k=b?.gradient,C=It(k?.angle,0,-360,360)*Math.PI/180,T=k?`url(#${s})`:b?.fill??"hsl(var(--primary) / .18)";return jsxRuntime.jsxs("figure",{"aria-label":o,"data-monkeys-component":"workbench-metric-grid","data-metric-variant":"radar",className:["m-0 min-w-0",n].filter(Boolean).join(" "),children:[jsxRuntime.jsxs("svg",{viewBox:"0 0 360 320",role:"img","aria-label":t?`${o} \xB7 ${t.label} ${t.value}`:o,className:"mx-auto block w-full max-w-sm overflow-visible",children:[k?jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:s,x1:`${50-Math.cos(C)*50}%`,y1:`${50-Math.sin(C)*50}%`,x2:`${50+Math.cos(C)*50}%`,y2:`${50+Math.sin(C)*50}%`,children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:k.from}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:k.to})]})}):null,jsxRuntime.jsxs("g",{opacity:It(v?.opacity,1,0,1),stroke:h,strokeWidth:It(v?.strokeWidth,1,0,8),fill:"none",children:[Array.from({length:g},(S,I)=>jsxRuntime.jsx("polygon",{points:e.map((R,W)=>m(W,u*(I+1)/g).join(",")).join(" ")},I)),v?.showAxes===false?null:e.map((S,I)=>{let R=m(I,u);return jsxRuntime.jsx("line",{x1:"180",y1:"160",x2:R[0],y2:R[1]},S.id)})]}),e.map((S,I)=>{let R=m(I,c),W=y?.align==="outward"?R[0]<179?"end":R[0]>181?"start":"middle":"middle";return jsxRuntime.jsxs("g",{children:[typeof S.label=="string"||typeof S.label=="number"?jsxRuntime.jsx("text",{x:R[0],y:R[1]-(y?.showValues===false?0:7),textAnchor:W,dominantBaseline:"middle",fontSize:It(y?.fontSize,12,6,28),fill:y?.color??"hsl(var(--muted-foreground))",children:S.label}):null,y?.showValues!==false&&(typeof S.value=="string"||typeof S.value=="number")?jsxRuntime.jsx("text",{"data-metric-axis-value":S.id,x:R[0],y:R[1]+10,textAnchor:W,dominantBaseline:"middle",fontSize:It(y?.valueFontSize,13,6,28),fontWeight:"600",fill:y?.valueColor??"hsl(var(--foreground))",children:S.value}):null]},S.id)}),f?jsxRuntime.jsx("path",{"data-metric-radar-series":"complete",d:qx(p,i.geometry?.smoothing),fill:T,fillOpacity:It(b?.fillOpacity,1,0,1),stroke:w,strokeWidth:It(b?.strokeWidth,2.5,0,8)}):p.map((S,I)=>{let R=p[(I+1)%p.length];return S&&R?jsxRuntime.jsx("line",{"data-metric-radar-series":"partial",x1:S[0],y1:S[1],x2:R[0],y2:R[1],stroke:w,strokeWidth:It(b?.strokeWidth,2.5,0,8)},e[I].id):null}),b?.showPoints===false?null:p.map((S,I)=>S?jsxRuntime.jsx("circle",{cx:S[0],cy:S[1],r:It(b?.pointRadius,3,0,10),fill:w},e[I].id):null),t?jsxRuntime.jsxs("g",{"data-metric-radar-summary":"true",textAnchor:"middle",paintOrder:"stroke",stroke:x?.outline??"hsl(var(--card))",strokeWidth:"3",strokeLinejoin:"round",children:[x?.showLabel===false?null:jsxRuntime.jsx("text",{x:"180",y:"149",fontSize:It(x?.labelFontSize,12,6,28),fill:x?.labelColor??"hsl(var(--muted-foreground))",children:t.label}),jsxRuntime.jsx("text",{x:"180",y:x?.showLabel===false?160:174,dominantBaseline:x?.showLabel===false?"middle":void 0,fontSize:It(x?.fontSize,23,10,64),fontWeight:"700",fill:x?.color??"hsl(var(--foreground))",children:t.value})]}):null]}),jsxRuntime.jsx("dl",{className:"sr-only",children:e.map(S=>jsxRuntime.jsxs("div",{className:a,children:[jsxRuntime.jsx("dt",{children:S.label}),jsxRuntime.jsx("dd",{children:S.value})]},S.id))})]})}r(Du,"WorkbenchMetricRadar");var Wu=r(e=>{if(Number.isFinite(e))return Math.min(1,Math.max(0,Number(e)))},"normalizeProgress");function Yx({items:e,summary:t,variant:o="bars",density:n="comfortable",emptyState:a=null,ariaLabel:i="Metrics",className:s,itemClassName:u,radar:c}){if(!e.length)return O(a)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:a}):null;if(o==="radar"&&e.length>=3&&e.length<=12){if(c)return jsxRuntime.jsx(Du,{items:e,summary:t,ariaLabel:i,className:s,itemClassName:u,radar:c});let d=r((p,f)=>{let b=-Math.PI/2+p*Math.PI*2/e.length;return [180+Math.cos(b)*f,160+Math.sin(b)*f]},"point"),g=e.map((p,f)=>{let b=Wu(p.progress);return b===void 0?void 0:d(f,b*100)}),m=g.every(Boolean);return jsxRuntime.jsxs("figure",{"aria-label":i,"data-monkeys-component":"workbench-metric-grid","data-metric-variant":"radar",className:l("m-0 min-w-0",s),children:[jsxRuntime.jsxs("svg",{viewBox:"0 0 360 320",role:"img","aria-label":t?`${i} \xB7 ${t.label} ${t.value}`:i,className:"mx-auto block w-full max-w-sm overflow-visible",children:[[.25,.5,.75,1].map(p=>jsxRuntime.jsx("polygon",{points:e.map((f,b)=>d(b,p*100).join(",")).join(" "),fill:"none",stroke:"hsl(var(--border))"},p)),e.map((p,f)=>{let b=d(f,100),v=d(f,131);return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:"180",y1:"160",x2:b[0],y2:b[1],stroke:"hsl(var(--border))"}),typeof p.label=="string"||typeof p.label=="number"?jsxRuntime.jsx("text",{x:v[0],y:v[1]-7,textAnchor:"middle",dominantBaseline:"middle",fontSize:"12",fill:"hsl(var(--muted-foreground))",children:p.label}):null,typeof p.value=="string"||typeof p.value=="number"?jsxRuntime.jsx("text",{"data-metric-axis-value":p.id,x:v[0],y:v[1]+10,textAnchor:"middle",dominantBaseline:"middle",fontSize:"13",fontWeight:"600",fill:"hsl(var(--foreground))",children:p.value}):null]},p.id)}),m?jsxRuntime.jsx("polygon",{"data-metric-radar-series":"complete",points:g.map(p=>p.join(",")).join(" "),fill:"hsl(var(--primary) / .18)",stroke:"hsl(var(--primary))",strokeWidth:"2.5"}):g.map((p,f)=>{let b=g[(f+1)%g.length];return p&&b?jsxRuntime.jsx("line",{"data-metric-radar-series":"partial",x1:p[0],y1:p[1],x2:b[0],y2:b[1],stroke:"hsl(var(--primary))",strokeWidth:"2.5"},e[f].id):null}),g.map((p,f)=>p?jsxRuntime.jsx("circle",{cx:p[0],cy:p[1],r:"3",fill:"hsl(var(--primary))"},e[f].id):null),t?jsxRuntime.jsxs("g",{"data-metric-radar-summary":"true",textAnchor:"middle",paintOrder:"stroke",stroke:"hsl(var(--card))",strokeWidth:"3",strokeLinejoin:"round",children:[jsxRuntime.jsx("text",{x:"180",y:"149",fontSize:"12",fill:"hsl(var(--muted-foreground))",children:t.label}),jsxRuntime.jsx("text",{x:"180",y:"174",fontSize:"23",fontWeight:"700",fill:"hsl(var(--foreground))",children:t.value})]}):null]}),jsxRuntime.jsx("dl",{className:"sr-only",children:e.map(p=>jsxRuntime.jsxs("div",{className:l("flex min-w-0 justify-between gap-2",u),children:[jsxRuntime.jsx("dt",{className:"truncate text-muted-foreground",children:p.label}),jsxRuntime.jsx("dd",{className:"font-semibold tabular-nums",children:p.value})]},p.id))})]})}return o==="list"?jsxRuntime.jsx("dl",{"aria-label":i,"data-monkeys-component":"workbench-metric-grid","data-metric-variant":o,"data-metric-density":n,className:l("grid min-w-0",n==="compact"?"gap-2":"gap-3",s),children:e.map(d=>jsxRuntime.jsxs("div",{className:l("flex min-w-0 items-start justify-between gap-4",n==="compact"?"text-xs":"text-sm",u),children:[jsxRuntime.jsxs("dt",{className:"min-w-0 text-muted-foreground",children:[jsxRuntime.jsx("span",{className:"block truncate",children:d.label}),O(d.description)?jsxRuntime.jsx("span",{className:"mt-0.5 block text-xs leading-4 text-muted-foreground/80",children:d.description}):null]}),jsxRuntime.jsx("dd",{className:"shrink-0 font-semibold tabular-nums text-foreground",children:d.value})]},d.id))}):o==="cards"?jsxRuntime.jsx("dl",{"aria-label":i,"data-monkeys-component":"workbench-metric-grid","data-metric-variant":o,"data-metric-density":n,className:l("grid min-w-0 [grid-template-columns:repeat(auto-fit,minmax(9rem,1fr))]",n==="compact"?"gap-2":"gap-3",s),children:e.map(d=>jsxRuntime.jsxs("div",{className:l("min-w-0 rounded-lg border border-border/70 bg-card text-card-foreground",n==="compact"?"p-3":"p-4",u),children:[jsxRuntime.jsx("dt",{className:"truncate text-xs font-medium text-muted-foreground",children:d.label}),jsxRuntime.jsx("dd",{className:l("font-semibold tabular-nums text-foreground",n==="compact"?"mt-1.5 text-xl":"mt-2 text-2xl"),children:d.value}),O(d.description)?jsxRuntime.jsx("div",{className:"mt-2 text-xs leading-5 text-muted-foreground",children:d.description}):null]},d.id))}):jsxRuntime.jsx("dl",{"aria-label":i,"data-monkeys-component":"workbench-metric-grid","data-metric-variant":o,"data-metric-density":n,className:l("grid min-w-0 [grid-template-columns:repeat(auto-fit,minmax(5.5rem,1fr))]",n==="compact"?"gap-2":"gap-3",s),children:e.map(d=>{let g=Wu(d.progress);return jsxRuntime.jsxs("div",{className:l("min-w-0",u),children:[jsxRuntime.jsx("div",{role:g===void 0?void 0:"meter","aria-label":g===void 0?void 0:String(d.label),"aria-valuemin":g===void 0?void 0:0,"aria-valuemax":g===void 0?void 0:100,"aria-valuenow":g===void 0?void 0:Math.round(g*100),className:l("overflow-hidden rounded-full bg-muted",n==="compact"?"h-1.5":"h-2"),children:g===void 0?null:jsxRuntime.jsx("span",{className:"block h-full rounded-full bg-primary transition-[width] duration-200 motion-reduce:transition-none",style:{width:`${Math.max(g>0?4:0,g*100)}%`}})}),jsxRuntime.jsxs("div",{className:"mt-1.5 flex min-w-0 items-baseline justify-between gap-2",children:[jsxRuntime.jsx("dt",{className:"truncate text-xs text-muted-foreground",children:d.label}),jsxRuntime.jsx("dd",{className:"shrink-0 text-xs font-semibold tabular-nums text-foreground",children:d.value})]})]},d.id)})})}r(Yx,"WorkbenchMetricGrid");var Lu=Math.PI*(3-Math.sqrt(5)),Au=r(e=>Array.from(e).reduce((t,o)=>Math.imul(t^o.charCodeAt(0),16777619)>>>0,2166136261),"hash");function wi(e,t){let o=new Set(e.map(h=>h.id)),n=new Map,a=new Set,i=new Map(e.map(h=>[h.id,new Set])),s=t.filter(h=>o.has(h.sourceId)&&o.has(h.targetId));for(let h of s){let k=n.get(h.sourceId)??[];k.includes(h.targetId)||k.push(h.targetId),n.set(h.sourceId,k),a.add(h.targetId),i.get(h.sourceId).add(h.targetId),i.get(h.targetId).add(h.sourceId);}let c=e.filter(h=>!a.has(h.id))[0]?.id??e[0]?.id,d=new Map,g=c?[c]:[];c&&d.set(c,{depth:0,branch:c,cluster:c});for(let h=0;h<g.length;h++){let k=g[h],C=d.get(k);for(let T of n.get(k)??[])d.has(T)||(d.set(T,{depth:C.depth+1,branch:C.depth===0?T:C.branch,cluster:C.depth<2?T:C.cluster}),g.push(T));}for(let h of e)d.has(h.id)||d.set(h.id,{depth:1,branch:h.id,cluster:h.id});let m=[...new Set([...d.values()].filter(h=>h.depth>0).map(h=>h.branch))],p=new Map;for(let[h,k]of d){if(k.depth<2)continue;let C=p.get(k.cluster)??[];C.push(h),p.set(k.cluster,C);}let f=m.map(h=>Math.sqrt([...d.values()].filter(k=>k.branch===h).length+8)),b=f.reduce((h,k)=>h+k,0)||1,v=-Math.PI/2,y=new Map;m.forEach((h,k)=>{let C=Math.PI*2*f[k]/b,T=v+C/2;y.set(h,{x:Math.cos(T)*12,y:Math.sin(T)*10,z:Math.sin(T*2)*3.2,angle:T}),v+=C;});let x=new Map;for(let h of m){let k=y.get(h),C=[...p.keys()].filter(T=>d.get(T)?.branch===h);C.forEach((T,S)=>{let I=C.length>1?Math.max(3,Math.sqrt(C.length)*1.7):1.5,R=S*Lu+k.angle;x.set(T,{x:k.x+Math.cos(R)*I,y:k.y+Math.sin(R)*I,z:k.z+Math.sin(R)*2.5});});}let w=e.map(h=>{let k=d.get(h.id),C=k.depth<2?y.get(k.branch):x.get(k.cluster);if(k.depth===0||!C)return {...h,...k,x:0,y:0,z:0};if(k.depth===1)return {...h,...k,x:C.x*.76,y:C.y*.76,z:C.z};let S=p.get(k.cluster).indexOf(h.id),I=k.depth===2?0:1.5+Math.sqrt(S)*.72,R=S*Lu+Au(k.cluster)%360*Math.PI/180;return {...h,...k,x:C.x+Math.cos(R)*I,y:C.y+Math.sin(R)*I*.85,z:C.z+Math.sin(R*1.37)*Math.min(I,3.5)}});for(let h=0;h<30;h++)for(let k=0;k<w.length;k++)for(let C=k+1;C<w.length;C++){let T=w[k],S=w[C],I=S.x-T.x,R=S.y-T.y,W=Math.hypot(I,R),H=T.depth<3||S.depth<3?1.4:.85;if(W>=H)continue;let L=Au(T.id+S.id)%360*Math.PI/180,F=W>.001?I/W:Math.cos(L),$=W>.001?R/W:Math.sin(L),M=(H-W)*.25;T.depth>0&&(T.x-=F*M,T.y-=$*M),S.depth>0&&(S.x+=F*M,S.y+=$*M);}if(w.length)for(let h of ["x","y","z"]){let k=(Math.min(...w.map(C=>C[h]))+Math.max(...w.map(C=>C[h])))/2;w.forEach(C=>{C[h]-=k;});}return {points:w,links:s,neighbors:i,root:c}}r(wi,"buildRelationshipGalaxyLayout");function Ou({nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,ariaLabel:a,className:i}){let s=vt(),u=lt.useRef(null),c=lt.useRef(new Map),d=lt.useRef(o),g=lt.useRef(n),[m,p]=lt.useState(false),f=JSON.stringify([e,t]),b=lt.useMemo(()=>wi(e,t),[f]);return d.current=o,g.current=n,lt.useEffect(()=>{let v=u.current;if(!v)return;let y=false,x=r(()=>{},"cleanup");return p(false),Promise.all([import('three'),import('three/examples/jsm/controls/OrbitControls.js')]).then(([w,{OrbitControls:h}])=>{if(y)return;let k=[],C=new w.Scene,T=getComputedStyle(v),S=r((oe,se)=>{let Re=document.createElement("span");Re.style.color=`hsl(${T.getPropertyValue(oe).trim()||T.getPropertyValue(se).trim()})`,v.append(Re);let Ie=new w.Color(getComputedStyle(Re).color);return Re.remove(),Ie},"tokenColor"),I=S("--radar-canvas","--background");C.background=I;let R=new w.PerspectiveCamera(48,1,.1,250),W=new w.WebGLRenderer({antialias:true,alpha:false});W.setPixelRatio(Math.min(devicePixelRatio,2)),W.domElement.style.cssText="position:absolute;inset:0;width:100%;height:100%;touch-action:none",W.domElement.setAttribute("aria-hidden","true"),v.prepend(W.domElement);let H=new h(R,W.domElement);H.enableDamping=true,H.dampingFactor=.08,H.rotateSpeed=.45,H.minDistance=8,H.maxDistance=130,H.autoRotate=false;let L=new Map(b.points.map(oe=>[oe.id,new w.Vector3(oe.x,oe.y,oe.z)])),F={primary:S("--radar-series-one","--primary"),secondary:S("--radar-series-two","--success"),accent:S("--radar-series-three","--warning"),muted:S("--radar-series-four","--muted-foreground")},$=128,M=new Uint8Array($*$*4);for(let oe=0;oe<$;oe++)for(let se=0;se<$;se++){let Re=Math.hypot(se+.5-$/2,oe+.5-$/2)/($/2),Ie=Re<.09?1:Math.exp(-Re*7.5)*.85;M.set([255,255,255,Math.round(Ie*255)],(oe*$+se)*4);}let G=new w.DataTexture(M,$,$,w.RGBAFormat);G.minFilter=G.magFilter=w.LinearFilter,G.needsUpdate=true,k.push(G);let Y=b.points.map(oe=>{let se=new w.SpriteMaterial({map:G,color:F[oe.tone??"primary"],transparent:true,blending:w.AdditiveBlending,depthWrite:false}),Re=new w.Sprite(se);return Re.position.copy(L.get(oe.id)),C.add(Re),k.push(se),Re}),N=new w.BufferGeometry;N.setAttribute("position",new w.Float32BufferAttribute(b.links.flatMap(oe=>[...L.get(oe.sourceId).toArray(),...L.get(oe.targetId).toArray()]),3));let D=new Float32Array(b.links.length*6);N.setAttribute("color",new w.BufferAttribute(D,3));let B=new w.LineBasicMaterial({vertexColors:true,transparent:true,opacity:.5,depthWrite:false});C.add(new w.LineSegments(N,B)),k.push(N,B);let K=new Map;b.points.filter(oe=>oe.depth>0).forEach(oe=>{let se=K.get(oe.cluster)??[];se.push(oe),K.set(oe.cluster,se);});for(let oe of K.values()){if(oe.length<3)continue;let se=oe.reduce((ze,ce)=>ze.add(L.get(ce.id)),new w.Vector3).multiplyScalar(1/oe.length),Re=new w.SpriteMaterial({map:G,color:F[oe[0].tone??"primary"],transparent:true,opacity:.13,blending:w.AdditiveBlending,depthWrite:false}),Ie=new w.Sprite(Re);Ie.position.copy(se),Ie.position.z-=1,Ie.scale.setScalar(8+Math.sqrt(oe.length)*1.2),C.add(Ie),k.push(Re);}let J=Math.max(8,...b.points.map(oe=>Math.abs(oe.x)))+3,V=Math.max(6,...b.points.map(oe=>Math.abs(oe.y)))+3,Q=55,j=false,Z=new ResizeObserver(()=>{let{width:oe,height:se}=v.getBoundingClientRect();if(!oe||!se)return;R.aspect=oe/se;let Re=Math.max(V,J/R.aspect)/Math.tan(w.MathUtils.degToRad(R.fov/2))+7;j?R.position.sub(H.target).multiplyScalar(Re/Q).add(H.target):(R.position.set(0,0,Re),j=true),Q=Re,H.update(),R.updateProjectionMatrix(),W.setSize(oe,se,false);});Z.observe(v);let te=new w.Vector3,ae=new w.Vector2,le={x:0,y:0},A,me,P=r(oe=>{let se=W.domElement.getBoundingClientRect();ae.set(oe.clientX-se.left,oe.clientY-se.top);let Re,Ie=12;for(let ze of b.points){if(te.copy(L.get(ze.id)).project(R),te.z<-1||te.z>1)continue;let ce=Math.hypot((te.x+1)*se.width/2-ae.x,(-te.y+1)*se.height/2-ae.y);ce<Ie&&(Ie=ce,Re=ze);}return Re},"nodeAt"),_=r(oe=>{le={x:oe.clientX,y:oe.clientY};},"pointerDown"),re=r(oe=>{A=P(oe)?.id,W.domElement.style.cursor=A?"pointer":"grab";},"pointerMove"),fe=r(()=>{A=void 0;},"pointerLeave"),ye=r(oe=>{if(Math.hypot(oe.clientX-le.x,oe.clientY-le.y)>5)return;let se=P(oe);se&&g.current?.(se);},"pointerUp");W.domElement.addEventListener("pointerdown",_),W.domElement.addEventListener("pointermove",re),W.domElement.addEventListener("pointerleave",fe),W.domElement.addEventListener("pointerup",ye);let xe=[...b.points].sort((oe,se)=>oe.depth-se.depth||(b.neighbors.get(se.id)?.size??0)-(b.neighbors.get(oe.id)?.size??0));W.setAnimationLoop(()=>{H.update();let oe=d.current,se=oe?b.neighbors.get(oe):void 0;(me!==oe||!N.userData.initialized)&&(me=oe,N.userData.initialized=true,b.links.forEach((z,X)=>{let ie=z.sourceId===oe||z.targetId===oe,q=b.points.find(we=>we.id===z.targetId),de=F[q.tone??"primary"].clone().multiplyScalar(oe?ie?1.35:.12:.45);D.set([...de.toArray(),...de.toArray()],X*6);}),N.attributes.color.needsUpdate=true),Y.forEach((z,X)=>{let ie=b.points[X],q=oe===ie.id;z.scale.setScalar((ie.depth===0?2.2:ie.depth===1?1.8:ie.depth===2?1.2:.82)*(q?1.5:1)),z.material.opacity=!oe||q||se?.has(ie.id)?1:.25;});let Re=v.clientWidth,Ie=v.clientHeight,ze=Q/R.position.distanceTo(H.target),ce=[],U=[...xe].sort((z,X)=>+(X.id===oe||X.id===A)-+(z.id===oe||z.id===A));for(let z of U){let X=c.current.get(z.id);if(!X)continue;let ie=z.id===oe,q=z.id===A,de=se?.has(z.id);te.copy(L.get(z.id)).project(R);let we=(te.x+1)*Re/2,Ce=(-te.y+1)*Ie/2+10,Me={x:we-Math.min(z.label.length*13,170)/2,y:Ce,width:Math.min(z.label.length*13,170),height:21},Be=te.z>-1&&te.z<1&&Me.x>4&&Me.x+Me.width<Re-4&&Ce>4&&Ce+21<Ie-4,_e=ie||q||de||z.depth<=2||ze>1.65,Ze=ce.some(ot=>Me.x<ot.x+ot.width+8&&Me.x+Me.width+8>ot.x&&Me.y<ot.y+ot.height+5&&Me.y+Me.height+5>ot.y),Fe=Be&&_e&&(ie||q||!Ze)&&(!oe||ie||q||de||z.depth<2);X.style.display=Fe?"block":"none",X.tabIndex=Fe?0:-1,X.style.transform=`translate(${we}px,${Ce}px) translate(-50%,0)`,X.style.color="#"+F[z.tone??"primary"].clone().lerp(F.primary,.45).getHexString(),X.style.opacity=oe&&!ie&&!de&&!q?"0.45":"1",X.style.fontWeight=z.depth<2||ie?"var(--monkeys-semantic-font-weight-semibold, 600)":"var(--monkeys-semantic-font-weight-normal, 400)",X.style.zIndex=ie||q?"2":"1",Fe&&ce.push(Me);}W.render(C,R);}),x=r(()=>{W.domElement.removeEventListener("pointerdown",_),W.domElement.removeEventListener("pointermove",re),W.domElement.removeEventListener("pointerleave",fe),W.domElement.removeEventListener("pointerup",ye),Z.disconnect(),W.setAnimationLoop(null),H.dispose(),k.forEach(oe=>oe.dispose()),W.dispose(),W.domElement.remove();},"cleanup");}).catch(()=>{y||p(true);}),()=>{y=true,x();}},[b]),jsxRuntime.jsxs("div",{ref:u,className:i,role:"group","aria-label":a,"data-monkeys-component":"relationship-galaxy",style:{position:"relative",width:"100%",height:"100%",minHeight:400,overflow:"hidden",background:"hsl(var(--radar-canvas, var(--background)))"},children:[e.map(v=>jsxRuntime.jsx("button",{ref:y=>{y?c.current.set(v.id,y):c.current.delete(v.id);},"aria-pressed":o===v.id,className:"font-sans text-xs",title:v.meta,onClick:()=>g.current?.(v),style:{display:"none",position:"absolute",left:0,top:0,maxWidth:170,border:0,background:"transparent",padding:"calc(var(--global-spacing, 0.75rem) / 6)",cursor:"pointer",textShadow:"0 1px 4px hsl(var(--radar-canvas, var(--foreground)))",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:v.label},v.id)),m&&jsxRuntime.jsx("div",{role:"alert",className:"absolute inset-0 grid place-items-center bg-background text-foreground",children:s.workbench.collection.loadError})]})}r(Ou,"RelationshipGalaxy");var Yr={physics:{repulsion:18e3,linkDistance:100,weakLinkDistance:280,linkStrength:.014,strongLinkStrength:.025,centerStrength:.0015,velocityRetention:.72,maxVelocity:35,collisionPadding:18,collisionPasses:2,cooling:.975,minAlpha:.002,ticksPerFrame:2},nodes:{fontSize:13,iconSize:16,showIcons:true,showLabels:true,focusScale:1.08,borderRadius:999,glow:true,contextOpacity:null},edges:{visible:true,curved:true,widthScale:1,opacityScale:1,glow:true,color:null},interaction:{pan:true,zoom:true,dragNodes:true,keyboard:true,openNodes:true,dragThreshold:4,keyboardStep:15,keyboardFastStep:50},viewport:{minZoom:.08,maxZoom:8,fitMaxZoom:2,fitPadding:60,screenPadding:50,zoomSensitivity:.0012,zoomStep:180,fitOnResize:true},ui:{controls:true,minimap:true,minimapWidth:156,minimapHeight:108,dock:"bottom-left"}};for(let e of Object.values(Yr))Object.freeze(e);Object.freeze(Yr);var Fu={repulsion:[0,1e6],linkDistance:[0,2e3],weakLinkDistance:[0,3e3],linkStrength:[0,.2],strongLinkStrength:[0,.2],centerStrength:[0,.1],velocityRetention:[0,.99],maxVelocity:[1,100],collisionPadding:[0,200],collisionPasses:[0,8],cooling:[.5,.995],minAlpha:[.001,.1],ticksPerFrame:[1,10],fontSize:[8,48],iconSize:[8,64],focusScale:[.5,2],borderRadius:[0,999],contextOpacity:[0,1],widthScale:[0,8],opacityScale:[0,5],dragThreshold:[0,30],keyboardStep:[1,200],keyboardFastStep:[1,500],minZoom:[.01,20],maxZoom:[.01,20],fitMaxZoom:[.01,20],fitPadding:[0,500],screenPadding:[0,300],zoomSensitivity:[1e-4,.01],zoomStep:[1,1e3],minimapWidth:[140,360],minimapHeight:[60,300]},Hu=new Set(["collisionPasses","ticksPerFrame"]),Vu=r(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"record");function Si(e={}){if(!Vu(e))throw new Error("config must be an object");let t=structuredClone(Yr);for(let[o,n]of Object.entries(e)){if(!Object.prototype.hasOwnProperty.call(t,o))throw new Error(`Unknown config group: ${o}`);if(!Vu(n))throw new Error(`config.${o} must be an object`);let a=t[o];for(let[i,s]of Object.entries(n)){let u=`config.${o}.${i}`;if(!Object.prototype.hasOwnProperty.call(a,i))throw new Error(`Unknown field: ${u}`);if((i==="contextOpacity"||i==="color")&&s===null){a[i]=null;continue}if(i==="dock"){if(typeof s!="string"||!["bottom-left","bottom-right","top-left","top-right"].includes(s))throw new Error(`${u} must be a supported corner`)}else if(i==="color"){if(typeof s!="string"||!/^#[\da-f]{6}$/i.test(s))throw new Error(`${u} must be a #RRGGBB color or null`)}else if(Fu[i]){let[c,d]=Fu[i];if(typeof s!="number"||!Number.isFinite(s)||s<c||s>d||Hu.has(i)&&!Number.isInteger(s))throw new Error(`${u} must be ${Hu.has(i)?"an integer":"a number"} in [${c}, ${d}]`)}else if(typeof s!="boolean")throw new Error(`${u} must be a boolean`);a[i]=s;}}if(t.viewport.minZoom>t.viewport.maxZoom)throw new Error("config.viewport.minZoom must not exceed maxZoom");return t}r(Si,"resolveRelationshipGraphConfig");var xl=r((e,t,o)=>Math.min(o,Math.max(t,e)),"clamp");function Gu(e,t,o={}){let n=Si({physics:o.physics??{}}).physics,a=[...e].sort((m,p)=>m.id.localeCompare(p.id,"en")).map((m,p)=>({...m,x:Number.isFinite(m.x)?m.x:Math.cos(p*2.39996)*100,y:Number.isFinite(m.y)?m.y:Math.sin(p*2.39996)*100,vx:0,vy:0,...o.fixedNodes?.has(m.id)?{fx:o.fixedNodes.get(m.id).x,fy:o.fixedNodes.get(m.id).y}:{}})),i=new Map(a.map(m=>[m.id,m])),s=t.flatMap(m=>{let p=i.get(m.sourceId),f=i.get(m.targetId);if(!p||!f||p===f)return [];let b=Number.isFinite(m.associationStrength)?xl(m.associationStrength,0,1):0;return [{source:p,target:f,strength:b,distance:(p.width+f.width)/2+(n.linkDistance+(1-b)*n.weakLinkDistance)}]}).sort((m,p)=>`${m.source.id}:${m.target.id}`.localeCompare(`${p.source.id}:${p.target.id}`,"en")),u=o.center??{x:3800,y:2800},c=a.length?1:0,d=0;function g(m=1){for(let p=0;p<m&&c>0;p++){for(let f=0;f<a.length;f++)for(let b=f+1;b<a.length;b++){let v=a[f],y=a[b],x=y.x-v.x,w=y.y-v.y;if(Math.abs(x)+Math.abs(w)<.01){let S=(f+b+1)*2.39996;x=Math.cos(S),w=Math.sin(S);}let h=Math.max(1,Math.hypot(x,w)),k=Math.min(8,n.repulsion/Math.max(2500,h*h))*c,C=x/h*k,T=w/h*k;v.vx-=C,v.vy-=T,y.vx+=C,y.vy+=T;}for(let{source:f,target:b,strength:v,distance:y}of s){let x=b.x-f.x,w=b.y-f.y,h=Math.max(1,Math.hypot(x,w)),k=(h-y)*(n.linkStrength+v*n.strongLinkStrength)*c,C=x/h*k,T=w/h*k;f.vx+=C,f.vy+=T,b.vx-=C,b.vy-=T;}d=0;for(let f of a)f.vx=xl((f.vx+(u.x-f.x)*n.centerStrength*c)*n.velocityRetention,-n.maxVelocity,n.maxVelocity),f.vy=xl((f.vy+(u.y-f.y)*n.centerStrength*c)*n.velocityRetention,-n.maxVelocity,n.maxVelocity),f.fx!==void 0&&f.fy!==void 0?(f.x=f.fx,f.y=f.fy,f.vx=f.vy=0):(f.x+=f.vx,f.y+=f.vy,d+=f.vx*f.vx+f.vy*f.vy);for(let f=0;f<n.collisionPasses;f++)for(let b=0;b<a.length;b++)for(let v=b+1;v<a.length;v++){let y=a[b],x=a[v],w=x.x-y.x,h=x.y-y.y,k=(y.width+x.width)/2+n.collisionPadding-Math.abs(w),C=(y.height+x.height)/2+n.collisionPadding-Math.abs(h);if(k<=0||C<=0)continue;let T=y.fx===void 0,S=x.fx===void 0,I=Number(T)+Number(S);if(I)if(k<C){let R=Math.sign(w||1)*k/I;T&&(y.x-=R),S&&(x.x+=R);}else {let R=Math.sign(h||1)*C/I;T&&(y.y-=R),S&&(x.y+=R);}}c*=n.cooling,c<n.minAlpha&&(c=0);}return c>0}return r(g,"step"),{step:g,get active(){return c>0},get energy(){return d},positions:r(()=>new Map(a.map(({id:m,x:p,y:f})=>[m,{x:p,y:f}])),"positions"),reheat(){a.length&&(c=Math.max(c,.65));},pin(m,p,f){let b=i.get(m);!b||!Number.isFinite(p)||!Number.isFinite(f)||(b.x=b.fx=p,b.y=b.fy=f,b.vx=b.vy=0,c=Math.max(c,.65));},release(m){let p=i.get(m);if(!p)return;let f=o.fixedNodes?.get(m);p.fx=f?.x,p.fy=f?.y,c=Math.max(c,.65);}}}r(Gu,"createForceSimulation");var vl=r((e,t)=>{if(!e.length)return {x:0,y:0,width:2,height:2};let o=Math.min(...e.map(s=>s.x-s.width/2))-t,n=Math.max(...e.map(s=>s.x+s.width/2))+t,a=Math.min(...e.map(s=>s.y-s.height/2))-t,i=Math.max(...e.map(s=>s.y+s.height/2))+t;return {x:o,y:a,width:Math.max(2,n-o),height:Math.max(2,i-a)}},"calculateTrendRadarFocusTopologyBounds");var io={x:0,y:0,width:7600,height:5600};var tv=r((e,t,o)=>Math.min(o,Math.max(t,e)),"clamp");var _u=r(e=>{let t=Number.isFinite(e)?tv(e,0,1):0,o=.8+Math.pow(t,1.35)*7.2;return {strokeWidth:o,strokeOpacity:.26+t*.7,glowWidth:o+3+t*7,glowOpacity:t<.28?.02:.04+t*.14}},"getTrendRadarFocusTopologyFocusEdgeStyle"),Ti=r((e,t="dark")=>{let o=r((u,c,d)=>`color-mix(in srgb, ${c} ${d}%, ${u})`,"mix"),n=e.role==="context",a=e.role==="focus",i=o("hsl(var(--monkeys-color-background))",e.solidColor,t==="light"?a?16:n?4:10:a?48:40),s=t==="light"?o(n?"hsl(var(--monkeys-color-muted-foreground))":"hsl(var(--monkeys-color-foreground))",e.solidColor,n?10:38):o(e.color,"hsl(var(--monkeys-color-foreground))",a?45:34);return {background:i,foreground:s,border:o(i,s,a?82:67)}},"getTrendRadarFocusTopologyNodeTone"),ov=r((e,t)=>{let o=t.x-e.x,n=t.y-e.y,a=Math.max(Math.hypot(o,n),1),i=Math.min(72,Math.max(18,a*.13)),s=e.id.localeCompare(t.id)>=0?1:-1;return {x:(e.x+t.x)/2+n/a*i*s,y:(e.y+t.y)/2-o/a*i*s}},"getTrendRadarFocusTopologyEdgeControlPoint"),$u=r((e,t)=>{let o=ov(e,t);return `M ${e.x} ${e.y} Q ${o.x} ${o.y} ${t.x} ${t.y}`},"getTrendRadarFocusTopologyEdgePath");var vv={"align-justify":lucideReact.AlignJustify,grid:lucideReact.Grid3X3,layers:lucideReact.Layers,"map-pin":lucideReact.MapPin,mountain:lucideReact.Mountain,package:lucideReact.Package,paintbrush:lucideReact.Paintbrush,palette:lucideReact.Palette,scissors:lucideReact.Scissors,shield:lucideReact.Shield,"shield-check":lucideReact.ShieldCheck,shirt:lucideReact.Shirt,snowflake:lucideReact.Snowflake,sparkles:lucideReact.Sparkles,user:lucideReact.UserRound,users:lucideReact.UsersRound},kv=r((e,t)=>{if(e.role!=="focus")return "var(--trend-radar-muted-color)";let o=Math.pow(e.associationStrength,1.2)*86;return `color-mix(in srgb, var(--trend-radar-muted-color), ${t.color} ${o}%)`},"edgeStroke");function Ku({model:e,config:t=Yr,onOpenNode:o,renderNodeAction:n,relationshipLabel:a,colorMode:i="dark",onNodePointerDown:s,onNodeKeyDown:u}){let c=r((m,p)=>t.edges.curved?$u(m,p):`M ${m.x} ${m.y} L ${p.x} ${p.y}`,"edgePath"),d=lt.useId().replace(/:/g,""),g=lt.useMemo(()=>new Map(e.nodes.map(m=>[m.id,m])),[e.nodes]);return jsxRuntime.jsxs("div",{className:"trend-radar-focus-topology-background pointer-events-none relative size-full overflow-visible","data-radar-focus-topology-surface":"true","data-radar-focus-topology-color-mode":i,children:[t.edges.visible&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${io.width} ${io.height}`,className:"absolute inset-0 size-full overflow-visible","aria-hidden":"true",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("filter",{id:d,x:"-40%",y:"-40%",width:"180%",height:"180%",children:jsxRuntime.jsx("feGaussianBlur",{stdDeviation:"7"})})}),jsxRuntime.jsx("g",{"data-radar-focus-topology-edge-layer":"context",children:e.edges.filter(m=>m.role!=="focus").map(m=>{let p=g.get(m.sourceId),f=g.get(m.targetId);return !p||!f?null:jsxRuntime.jsx("path",{d:c(p,f),fill:"none",stroke:t.edges.color??"var(--trend-radar-muted-color)",strokeWidth:Math.max(.8,.72+Math.pow(m.associationStrength,1.08)*2.2)*t.edges.widthScale,strokeOpacity:Math.min(1,(m.role==="related"?.12:.045)*t.edges.opacityScale),strokeLinecap:"round",strokeLinejoin:"round"},m.id)})}),jsxRuntime.jsx("g",{"data-radar-focus-topology-edge-layer":"focus",children:e.edges.filter(m=>m.role==="focus").map(m=>{let p=g.get(m.sourceId),f=g.get(m.targetId);if(!p||!f)return null;let b=c(p,f),v=t.edges.color??kv(m,p.id===e.subjectId?f:p),y=_u(m.associationStrength);return jsxRuntime.jsxs("g",{"data-radar-focus-topology-focus-edge":m.id,"data-radar-focus-topology-association-strength":m.associationStrength.toFixed(4),children:[jsxRuntime.jsx("path",{d:b,fill:"none",stroke:v,strokeWidth:y.glowWidth*t.edges.widthScale,strokeOpacity:t.edges.glow?Math.min(1,y.glowOpacity*t.edges.opacityScale):0,strokeLinecap:"round",filter:`url(#${d})`}),jsxRuntime.jsx("path",{d:b,fill:"none",stroke:v,strokeWidth:y.strokeWidth*t.edges.widthScale,strokeOpacity:Math.min(1,y.strokeOpacity*t.edges.opacityScale),strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntime.jsx("title",{children:a(m)})})]},m.id)})})]}),e.nodes.map(m=>{let p=vv[m.iconName]??lucideReact.Palette,f=Ti(m,i),b=m.role==="focus",v=m.role==="context",y=!!(o&&!b);return jsxRuntime.jsxs("div",{className:l("absolute transition-[filter,opacity,transform] duration-200",b?"z-20":m.role==="related"?"z-10":"z-0",v&&i==="dark"&&"opacity-[0.18] brightness-[0.72] saturate-[0.3] hover:!opacity-100 hover:!filter-none"),style:{"--radar-node-background":f.background,"--radar-node-foreground":f.foreground,"--radar-node-border":f.border,left:m.x,opacity:v?t.nodes.contextOpacity??(i==="dark"?m.contextOpacity:void 0):void 0,top:m.y,width:m.width,height:m.height,transform:`translate(-50%, -50%) scale(${b?t.nodes.focusScale:1})`,transformOrigin:"center center"},"data-radar-focus-topology-node-anchor":m.ref.id,children:[jsxRuntime.jsxs("button",{type:"button",disabled:!y&&!s,"aria-label":m.label,title:m.taxonomy?.secondaryLabel?`${m.label} \xB7 ${m.taxonomy.secondaryLabel}`:m.label,onPointerDown:x=>{x.stopPropagation(),s?.(x,m);},onKeyDown:x=>u?.(x,m),onClick:x=>{x.stopPropagation(),y&&o?.(m);},className:l("focus-visible:ring-primary pointer-events-auto flex size-full items-center justify-center gap-2 rounded-full border-0 px-3 text-left text-[0.8125rem] leading-none font-semibold outline-hidden transition-[box-shadow,filter,transform] focus-visible:ring-2",y&&"cursor-pointer hover:brightness-110",!y&&"cursor-default disabled:opacity-100"),style:{fontSize:t.nodes.fontSize,borderRadius:t.nodes.borderRadius,color:f.foreground,backgroundColor:f.background,boxShadow:t.nodes.glow?b?`inset 0 0 0 2px ${f.border}, 0 0 34px ${m.color}66`:m.role==="related"?`inset 0 0 0 1px ${f.border}, 0 0 18px ${m.color}24`:`inset 0 0 0 1px ${f.border}`:`inset 0 0 0 ${b?2:1}px ${f.border}`},"data-radar-focus-topology-node":m.ref.id,"data-world-x":m.x.toFixed(2),"data-world-y":m.y.toFixed(2),"data-radar-focus-topology-node-role":m.role,children:[t.nodes.showIcons&&jsxRuntime.jsx(p,{className:"shrink-0",size:t.nodes.iconSize,color:f.foreground,strokeWidth:1.8,"aria-hidden":"true"}),t.nodes.showLabels&&jsxRuntime.jsx("span",{className:"min-w-0 truncate",style:{color:"inherit"},children:m.label})]}),n?.(m)]},m.id)})]})}r(Ku,"TrendRadarFocusTopologySurface");function qu({model:e,config:t,onCameraChange:o,colorMode:n="light",ariaLabel:a,onOpenNode:i,renderNodeAction:s,nodeAction:u,onNodeAction:c,relationshipLabel:d,controls:g,onNodePositionChange:m}){if(u?.maxActive!==void 0&&(!Number.isSafeInteger(u.maxActive)||u.maxActive<1))throw new TypeError("Node action maxActive must be a positive integer.");if(u?.size!==void 0&&(!Number.isFinite(u.size)||u.size<16||u.size>48))throw new TypeError("Node action size must be between 16 and 48.");let p=lt.useMemo(()=>Si(t),[t]),f=lt.useMemo(()=>new Set(u?.activeNodeIds??[]),[u?.activeNodeIds]),b=JSON.stringify(p.physics),v=lt.useMemo(()=>JSON.parse(b),[b]),y=JSON.stringify(p.viewport),x=lt.useMemo(()=>JSON.parse(y),[y]),{interaction:w,ui:h}=p,k=lt.useRef(null),C=lt.useRef(),T=JSON.stringify({nodes:e.nodes.map(({id:P,x:_,y:re,width:fe,height:ye})=>({id:P,x:_,y:re,width:fe,height:ye})),edges:e.edges.map(({sourceId:P,targetId:_,associationStrength:re})=>({sourceId:P,targetId:_,associationStrength:re}))}),S=lt.useMemo(()=>{let P=JSON.parse(T);return Gu(P.nodes,P.edges,{physics:v})},[T,v]),[I,R]=lt.useState(()=>S.positions()),[W,H]=lt.useState(false),[L,F]=lt.useState({x:0,y:0,z:1}),$=lt.useRef(o);$.current=o,lt.useEffect(()=>{$.current?.(L);},[L]);let M=lt.useRef(L),G=lt.useRef(),Y=lt.useRef(false),[N,D]=lt.useState({width:1,height:1}),B=lt.useRef(false),K=lt.useMemo(()=>e.nodes.map(P=>({...P,...I.get(P.id)??{}})),[e.nodes,I]),J=lt.useRef(K);J.current=K;let V=lt.useCallback(P=>{M.current=P,F(P);},[]),Q=lt.useCallback(()=>{if(C.current!==void 0)return;if(B.current&&!G.current){S.step(1400),R(S.positions()),H(false);return}H(S.active);let P=r(()=>{S.step(v.ticksPerFrame),R(S.positions()),S.active?C.current=requestAnimationFrame(P):(C.current=void 0,H(false));},"tick");C.current=requestAnimationFrame(P);},[S,v.ticksPerFrame]),j=lt.useCallback(()=>{let P=k.current;if(!P)return;let _=vl(J.current,x.fitPadding),re=Math.max(x.minZoom,Math.min(x.maxZoom,x.fitMaxZoom,(P.clientWidth-x.screenPadding*2)/_.width,(P.clientHeight-x.screenPadding*2)/_.height));V({x:P.clientWidth/(2*re)-_.x-_.width/2,y:P.clientHeight/(2*re)-_.y-_.height/2,z:re});},[V,x]);lt.useEffect(()=>{B.current=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??false;let P=S.positions();return R(P),J.current=J.current.map(_=>({..._,...P.get(_.id)})),j(),Q(),()=>{C.current!==void 0&&cancelAnimationFrame(C.current),C.current=void 0;let _=G.current;_?.target.hasPointerCapture?.(_.pointerId)&&_.target.releasePointerCapture(_.pointerId),G.current=void 0;}},[S,j,Q]),lt.useEffect(()=>{let P=k.current;if(!P)return;let _=new ResizeObserver(()=>{D({width:P.clientWidth,height:P.clientHeight}),x.fitOnResize&&j();});return _.observe(P),()=>_.disconnect()},[j,x.fitOnResize]);let Z=lt.useCallback((P,_,re)=>{if(!w.zoom)return;let fe=M.current,ye=Math.max(x.minZoom,Math.min(x.maxZoom,fe.z*Math.exp(-P*x.zoomSensitivity)));V({x:fe.x-_/fe.z+_/ye,y:fe.y-re/fe.z+re/ye,z:ye});},[V,x,w.zoom]);lt.useEffect(()=>{let P=k.current;if(!P)return;let _=r(re=>{if(G.current||!w.zoom)return;re.preventDefault();let fe=P.getBoundingClientRect();Z(re.deltaY,re.clientX-fe.left,re.clientY-fe.top);},"wheel");return P.addEventListener("wheel",_,{passive:false}),()=>P.removeEventListener("wheel",_)},[Z,w.zoom]);let te=r((P,_)=>{if(P.button!==0||G.current||(_?!w.dragNodes:!w.pan))return;Y.current=false;let re=M.current;G.current={pointerId:P.pointerId,id:_?.id,startX:P.clientX,startY:P.clientY,x:_?.x??re.x,y:_?.y??re.y,moved:false,target:P.currentTarget},P.currentTarget.setPointerCapture(P.pointerId),_&&(S.pin(_.id,_.x,_.y),Q());},"begin"),ae=r(P=>{let _=G.current;if(!(!_||_.pointerId!==P.pointerId)){if(G.current=void 0,Y.current=_.moved,_.id){let re=S.positions().get(_.id);S.release(_.id),Q(),_.moved&&re&&m?.(_.id,re);}_.target.hasPointerCapture(P.pointerId)&&_.target.releasePointerCapture(P.pointerId);}},"end"),le={...e,nodes:K},A=new Map(K.map(P=>[P.id,P])),me=vl([...e.nodes,...K],200);return jsxRuntime.jsxs("section",{ref:k,className:"relationship-graph bg-background relative size-full overflow-hidden",style:{cursor:w.pan?void 0:"default",touchAction:w.pan||w.dragNodes?"none":"auto"},role:"region","aria-label":a,"data-radar-focus-topology":"true","data-graph-engine":"native-force","data-force-running":W,"data-radar-focus-topology-camera":`${L.x.toFixed(2)},${L.y.toFixed(2)},${L.z.toFixed(3)}`,onPointerDown:P=>{P.target.closest("button")||te(P);},onPointerMove:P=>{let _=G.current;if(!_||_.pointerId!==P.pointerId)return;let re=P.clientX-_.startX,fe=P.clientY-_.startY;_.moved||(_.moved=Math.hypot(re,fe)>w.dragThreshold),_.moved&&(_.id?(S.pin(_.id,_.x+re/M.current.z,_.y+fe/M.current.z),R(S.positions()),Q()):V({...M.current,x:_.x+re/M.current.z,y:_.y+fe/M.current.z}));},onPointerUp:ae,onPointerCancel:ae,onLostPointerCapture:ae,onClickCapture:P=>{Y.current&&(P.preventDefault(),P.stopPropagation(),Y.current=false);},children:[jsxRuntime.jsx("div",{style:{position:"absolute",left:0,top:0,width:io.width,height:io.height,transformOrigin:"0 0",transform:`translate(${L.x*L.z}px, ${L.y*L.z}px) scale(${L.z})`},children:jsxRuntime.jsx(Ku,{model:le,config:p,colorMode:n,relationshipLabel:d,onOpenNode:w.openNodes?i:void 0,renderNodeAction:s??(u&&c?P=>{if(u.nodeKinds&&!u.nodeKinds.includes(P.ref.kind))return null;let _=f.has(P.id),re=u.disabled||!_&&u.maxActive!==void 0&&f.size>=u.maxActive,fe=`${_?u.activeLabel??u.label:u.label}: ${P.label}`,ye=_?lucideReact.Check:lucideReact.Plus,xe=u.size??24;return jsxRuntime.jsx("button",{type:"button","data-relationship-node-action":P.id,"aria-label":fe,title:fe,"aria-pressed":_,disabled:re,className:"pointer-events-auto grid place-items-center rounded-md border border-current bg-card text-foreground shadow-sm outline-none hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-40",style:{position:"absolute",right:0,top:0,width:xe,height:xe,color:Ti(P,n).foreground,transform:`translate(50%, -50%) scale(${u.keepScreenSize===false?1:1/L.z})`,transformOrigin:"center"},onPointerDown:oe=>oe.stopPropagation(),onKeyDown:oe=>oe.stopPropagation(),onClick:oe=>{oe.stopPropagation(),c(P);},children:jsxRuntime.jsx(ye,{size:xe*.6,"aria-hidden":"true"})})}:void 0),onNodePointerDown:w.dragNodes?(P,_)=>te(P,_):void 0,onNodeKeyDown:(P,_)=>{if(!w.keyboard||!w.dragNodes)return;let re={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]}[P.key];if(!re)return;P.preventDefault(),P.stopPropagation();let fe=(P.shiftKey?w.keyboardFastStep:w.keyboardStep)/M.current.z,ye={x:_.x+re[0]*fe,y:_.y+re[1]*fe};S.pin(_.id,ye.x,ye.y),R(S.positions()),S.release(_.id),Q(),m?.(_.id,ye);}})}),(h.controls||h.minimap)&&jsxRuntime.jsxs("div",{className:"relationship-minimap","data-radar-focus-topology-minimap":"true",style:{width:h.minimapWidth,left:h.dock.endsWith("left")?12:"auto",right:h.dock.endsWith("right")?12:"auto",top:h.dock.startsWith("top")?12:"auto",bottom:h.dock.startsWith("bottom")?12:"auto"},children:[h.controls&&jsxRuntime.jsxs("div",{className:"relationship-controls",children:[jsxRuntime.jsx("button",{type:"button","aria-label":g.zoomOut,onClick:()=>Z(x.zoomStep,N.width/2,N.height/2),disabled:!w.zoom||L.z<=x.minZoom,children:jsxRuntime.jsx(lucideReact.Minus,{size:15})}),jsxRuntime.jsxs("output",{children:[Math.round(L.z*100),"%"]}),jsxRuntime.jsx("button",{type:"button","aria-label":g.zoomIn,onClick:()=>Z(-x.zoomStep,N.width/2,N.height/2),disabled:!w.zoom||L.z>=x.maxZoom,children:jsxRuntime.jsx(lucideReact.Plus,{size:15})}),jsxRuntime.jsx("button",{type:"button","aria-label":g.zoomToFit,onClick:j,children:jsxRuntime.jsx(lucideReact.LocateFixed,{size:15})})]}),h.minimap&&jsxRuntime.jsx("button",{type:"button",className:"relationship-minimap-map",disabled:!w.pan,"aria-label":g.minimap,onClick:P=>{if(P.detail===0){j();return}let _=P.currentTarget.getBoundingClientRect(),re=(P.clientX-_.left)/_.width*me.width+me.x,fe=(P.clientY-_.top)/_.height*me.height+me.y;V({...L,x:N.width/(2*L.z)-re,y:N.height/(2*L.z)-fe});},children:jsxRuntime.jsxs("svg",{viewBox:`${me.x} ${me.y} ${me.width} ${me.height}`,style:{height:h.minimapHeight},preserveAspectRatio:"none","aria-hidden":"true",children:[e.edges.map(P=>{let _=A.get(P.sourceId),re=A.get(P.targetId);return _&&re?jsxRuntime.jsx("line",{x1:_.x,y1:_.y,x2:re.x,y2:re.y,stroke:"currentColor",strokeWidth:2,opacity:.2},P.id):null}),K.map(P=>jsxRuntime.jsx("circle",{cx:P.x,cy:P.y,r:P.role==="focus"?14:8,fill:P.color},P.id)),jsxRuntime.jsx("rect",{x:-L.x,y:-L.y,width:N.width/L.z,height:N.height/L.z,fill:"currentColor",fillOpacity:.07,stroke:"currentColor",strokeWidth:4})]})})]})]})}r(qu,"RelationshipGraph2D");var Tv={primary:"hsl(var(--radar-series-one, var(--primary)))",secondary:"hsl(var(--radar-series-two, var(--success)))",accent:"hsl(var(--radar-series-three, var(--warning)))",muted:"hsl(var(--radar-series-four, var(--muted-foreground)))"},Rv={nodes:{showIcons:false,glow:false,contextOpacity:1},edges:{glow:false,opacityScale:3,widthScale:.5}};function Ju({nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,ariaLabel:a="Relationship graph",className:i,height:s=440}){let u=vt(),c=dn(),d=JSON.stringify([e,t]),g=lt.useMemo(()=>wi(e,t),[d]),m=lt.useMemo(()=>({subjectId:o??"",bounds:io,focusBounds:io,nodes:g.points.map(b=>{let v=Math.max(88,Math.min(240,Array.from(b.label).length*14+32)),y=Tv[b.tone??"muted"];return {id:b.id,ref:{kind:"node",id:b.id},label:b.label,x:io.width/2+b.x*70,y:io.height/2+b.y*70,width:v,height:36,radius:v/2,score:0,degree:g.neighbors.get(b.id)?.size??0,colorKey:b.tone??"muted",color:y,solidColor:y,iconName:"layers",role:b.id===o?"focus":"related"}}),edges:g.links.map((b,v)=>({id:b.id??`${b.sourceId}:${b.targetId}:${v}`,sourceId:b.sourceId,targetId:b.targetId,evidenceRefs:[],evidenceCount:0,associationStrength:1,role:b.sourceId===o||b.targetId===o?"focus":"related"}))}),[g,o]),p=lt.useMemo(()=>new Map(e.map(b=>[b.id,b])),[d]),f=lt.useMemo(()=>new Map(g.links.map((b,v)=>[b.id??`${b.sourceId}:${b.targetId}:${v}`,b.label??`${p.get(b.sourceId)?.label} \u2192 ${p.get(b.targetId)?.label}`])),[g,p]);return jsxRuntime.jsx("div",{"data-monkeys-component":"workbench-relationship-graph","data-workbench-relationship-variant":"force-2d",className:l("relative h-[var(--relationship-height)] min-h-0 min-w-0 overflow-hidden",i),style:{"--relationship-height":`${s}px`},children:jsxRuntime.jsx(qu,{model:m,config:Rv,colorMode:c?.colorMode==="dark"?"dark":"light",ariaLabel:a,controls:u.workbench.relationshipGraph??{zoomOut:"Zoom out",zoomIn:"Zoom in",zoomToFit:"Fit graph",minimap:"Graph overview"},relationshipLabel:b=>f.get(b.id)??"",onOpenNode:n?b=>{let v=p.get(b.id);v&&n(v);}:void 0})})}r(Ju,"RelationshipForce2D");var Nv={primary:"fill-primary/10 stroke-primary text-primary",secondary:"fill-secondary stroke-secondary-foreground text-secondary-foreground",accent:"fill-accent stroke-accent-foreground text-accent-foreground",muted:"fill-muted stroke-muted-foreground text-muted-foreground"},Iv={primary:"--radar-series-one",secondary:"--radar-series-two",accent:"--radar-series-three",muted:"--radar-series-four"},Mv={primary:"var(--primary)",secondary:"var(--secondary-foreground)",accent:"var(--accent-foreground)",muted:"var(--muted-foreground)"},Bi=r((e,t=1)=>`hsl(var(${Iv[e]}, ${Mv[e]}) / ${t})`,"radarToneColor"),Bv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activateNode");function Pv({nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,width:a=900,height:i=440,emptyState:s=null,ariaLabel:u="Relationship graph",className:c,variant:d="default"}){if(!e.length)return O(s)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:s}):null;if(d==="galaxy")return jsxRuntime.jsx(Ou,{nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,ariaLabel:u,className:c});if(d==="force-2d")return jsxRuntime.jsx(Ju,{nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,ariaLabel:u,className:c,height:i});let g=d==="radar",m=Math.min(a,i)*(g?.37:.35),p=o?e.findIndex(v=>v.id===o):-1,f=p>=0?e.filter((v,y)=>y!==p):e,b=new Map(e.map((v,y)=>{if(e.length===1)return [v.id,{x:a/2,y:i/2}];if(g&&y===p)return [v.id,{x:a/2,y:i/2}];let x=f.findIndex(h=>h.id===v.id),w=Math.PI*2*x/f.length-Math.PI/2;return [v.id,{x:a/2+Math.cos(w)*m,y:i/2+Math.sin(w)*m}]}));return jsxRuntime.jsx("div",{"data-monkeys-component":"workbench-relationship-graph","data-workbench-relationship-variant":d,className:l("relative min-w-0 overflow-hidden rounded-lg border",g?"min-h-[42rem]":"overflow-x-auto border-border/70 bg-card",c),style:g?{backgroundColor:"hsl(var(--radar-canvas, var(--background)))",borderColor:"hsl(var(--radar-shell-border, var(--border)))",backgroundImage:"linear-gradient(hsl(var(--radar-grid, var(--border)) / 0.28) 1px, transparent 1px), linear-gradient(90deg, hsl(var(--radar-grid, var(--border)) / 0.28) 1px, transparent 1px), radial-gradient(circle at center, hsl(var(--primary) / 0.1), transparent 45%)",backgroundSize:"4rem 4rem, 4rem 4rem, 100% 100%"}:void 0,children:jsxRuntime.jsxs("svg",{viewBox:`0 0 ${a} ${i}`,className:l(g?"absolute inset-0 size-full":"min-w-[42rem]"),preserveAspectRatio:g?"xMidYMid meet":void 0,role:"img","aria-label":u,children:[t.map((v,y)=>{let x=b.get(v.sourceId),w=b.get(v.targetId);return !x||!w?null:jsxRuntime.jsx("line",{x1:x.x,y1:x.y,x2:w.x,y2:w.y,className:g?void 0:"stroke-border",strokeWidth:g?"2":"1.5",style:g?{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.46)",filter:"drop-shadow(0 0 0.35rem hsl(var(--primary) / 0.34))"}:void 0,children:jsxRuntime.jsx("title",{children:v.label||`${v.sourceId} to ${v.targetId}`})},v.id||`${v.sourceId}:${v.targetId}:${y}`)}),e.map(v=>{let y=b.get(v.id),x=v.id===o,w=v.tone||"muted",h=g?{color:Bi(w)}:void 0;return jsxRuntime.jsxs("g",{transform:`translate(${y.x}, ${y.y})`,role:n?"button":void 0,tabIndex:n?0:void 0,"aria-label":v.meta?`${v.label}, ${v.meta}`:v.label,"aria-pressed":n?x:void 0,onClick:n?()=>n(v):void 0,onKeyDown:k=>Bv(k,v,n),className:l(g?"outline-hidden":Nv[w],n&&"cursor-pointer outline-hidden"),style:h,children:[jsxRuntime.jsx("circle",{r:g&&x?"50":g?"40":"36",className:l("stroke-1 transition-[stroke-width] duration-150 motion-reduce:transition-none",x&&"stroke-[3]"),style:g?{fill:Bi(w,x?.22:.12),stroke:Bi(w,x?1:.78),filter:`drop-shadow(0 0 ${x?"1.4rem":"0.75rem"} ${Bi(w,.62)})`}:void 0}),jsxRuntime.jsx("text",{textAnchor:"middle",y:v.meta?-3:4,className:l("pointer-events-none fill-current font-semibold",g?"text-sm":"text-xs"),children:v.label.slice(0,18)}),v.meta?jsxRuntime.jsx("text",{textAnchor:"middle",y:"16",className:l("pointer-events-none text-xs",g?"fill-current opacity-70":"fill-muted-foreground"),children:v.meta.slice(0,22)}):null]},v.id)})]})})}r(Pv,"WorkbenchRelationshipGraph");var Dv={primary:"fill-primary stroke-primary",secondary:"fill-secondary stroke-secondary-foreground",accent:"fill-accent stroke-accent-foreground",muted:"fill-muted stroke-muted-foreground"},Wv=r(e=>e.filter(Number.isFinite),"finiteValues"),kl=r((e,t,o)=>{let n=Wv(e),a=Number.isFinite(t)?Number(t):Math.min(...n,0),i=Number.isFinite(o)?Number(o):Math.max(...n,1);return a===i?[a,i+1]:a<i?[a,i]:[i,a]},"getDomain"),Zr=r((e,t,o,n)=>o+(e-t[0])/(t[1]-t[0])*(n-o),"scale"),wn=r((e,t,o)=>Math.min(o,Math.max(t,e)),"clamp"),Lv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activatePoint");function Av({points:e,xAxis:t,yAxis:o,thresholds:n,selectedPointId:a,onPointSelect:i,width:s=900,height:u=420,emptyState:c=null,ariaLabel:d=`${t.label} by ${o.label}`,className:g}){let m=e.filter(T=>Number.isFinite(T.x)&&Number.isFinite(T.y));if(!m.length)return O(c)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:c}):null;let p=56,f=kl(m.map(T=>T.x),t.min,t.max),b=kl(m.map(T=>T.y),o.min,o.max),v=kl(m.map(T=>T.size??1)),y=p,x=s-p,w=p,h=u-p,k=Number.isFinite(n?.x)?Zr(Number(n?.x),f,y,x):void 0,C=Number.isFinite(n?.y)?Zr(Number(n?.y),b,h,w):void 0;return jsxRuntime.jsx("div",{"data-monkeys-component":"workbench-scatter-plot",className:l("min-w-0 overflow-x-auto rounded-lg border border-border/70 bg-card p-3",g),children:jsxRuntime.jsxs("svg",{viewBox:`0 0 ${s} ${u}`,className:"min-w-[42rem]",role:"img","aria-label":d,children:[jsxRuntime.jsx("line",{x1:y,y1:h,x2:x,y2:h,className:"stroke-border"}),jsxRuntime.jsx("line",{x1:y,y1:w,x2:y,y2:h,className:"stroke-border"}),k===void 0?null:jsxRuntime.jsx("line",{x1:wn(k,y,x),y1:w,x2:wn(k,y,x),y2:h,className:"stroke-muted-foreground/50",strokeDasharray:"5 5"}),C===void 0?null:jsxRuntime.jsx("line",{x1:y,y1:wn(C,w,h),x2:x,y2:wn(C,w,h),className:"stroke-muted-foreground/50",strokeDasharray:"5 5"}),jsxRuntime.jsx("text",{x:s/2,y:u-12,textAnchor:"middle",className:"fill-muted-foreground text-xs",children:t.label}),jsxRuntime.jsx("text",{x:"16",y:u/2,textAnchor:"middle",transform:`rotate(-90 16 ${u/2})`,className:"fill-muted-foreground text-xs",children:o.label}),m.map(T=>{let S=wn(Zr(T.x,f,y,x),y,x),I=wn(Zr(T.y,b,h,w),w,h),R=T.size===void 0?9:wn(Zr(T.size,v,7,18),7,18),W=a===T.id;return jsxRuntime.jsxs("g",{transform:`translate(${S}, ${I})`,role:i?"button":void 0,tabIndex:i?0:void 0,"aria-label":`${T.label}: ${t.label} ${T.x}, ${o.label} ${T.y}`,"aria-pressed":i?W:void 0,onClick:i?()=>i(T):void 0,onKeyDown:H=>Lv(H,T,i),className:l(i&&"cursor-pointer outline-hidden"),children:[jsxRuntime.jsx("circle",{r:R,className:l("stroke-1 opacity-80 transition-opacity duration-150 motion-reduce:transition-none",Dv[T.tone||"primary"],W?"opacity-100 stroke-[3]":"hover:opacity-100")}),jsxRuntime.jsx("text",{y:-R-7,textAnchor:"middle",className:"pointer-events-none fill-foreground text-[0.6875rem] font-semibold",children:T.label.slice(0,24)}),jsxRuntime.jsx("title",{children:T.description||T.label})]},T.id)})]})})}r(Av,"WorkbenchScatterPlot");var Ov=r((e,t,o)=>{!o||t.disabled||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activateItem");function Fv({items:e,onItemSelect:t,ariaLabel:o="Journey",className:n}){return jsxRuntime.jsx("nav",{"aria-label":o,"data-monkeys-component":"workbench-journey-navigation",className:l("min-w-0 overflow-x-auto rounded-lg border border-border/70 bg-card p-2",n),children:jsxRuntime.jsx("ol",{className:"flex min-w-max items-stretch gap-1",children:e.map((a,i)=>{let s=a.state||"upcoming";return jsxRuntime.jsxs("li",{className:"flex items-center",children:[i?jsxRuntime.jsx("span",{className:"mx-1 h-px w-5 bg-border","aria-hidden":"true"}):null,jsxRuntime.jsxs("button",{type:"button",disabled:a.disabled,"aria-current":s==="current"?"page":void 0,onClick:t&&!a.disabled?()=>t(a):void 0,onKeyDown:u=>Ov(u,a,t),className:l("min-w-28 rounded-md border px-3 py-2 text-left outline-hidden transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background motion-reduce:transition-none",s==="current"&&"border-primary bg-primary text-primary-foreground",s==="complete"&&"border-primary/30 bg-primary/10 text-foreground",s==="upcoming"&&"border-transparent bg-muted/50 text-muted-foreground",a.disabled&&"cursor-not-allowed opacity-50"),children:[O(a.eyebrow)?jsxRuntime.jsx("span",{className:l("block text-[0.625rem] font-semibold uppercase tracking-[0.14em]",s==="current"?"text-primary-foreground/75":"text-muted-foreground"),children:a.eyebrow}):null,jsxRuntime.jsx("span",{className:"mt-0.5 block text-xs font-semibold",children:a.label})]})]},a.id)})})})}r(Fv,"WorkbenchJourneyNavigation");var Hv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activateItem");function Vv({items:e,selectedItemId:t,onItemSelect:o,emptyState:n=null,ariaLabel:a="Ranked items",className:i}){return e.length?jsxRuntime.jsx("ol",{"aria-label":a,"data-monkeys-component":"workbench-ranked-list",className:l("grid min-w-0 gap-2",i),children:e.map((s,u)=>{let c=t===s.id;return jsxRuntime.jsx("li",{children:jsxRuntime.jsxs("button",{type:"button","aria-pressed":o?c:void 0,onClick:o?()=>o(s):void 0,onKeyDown:d=>Hv(d,s,o),className:l("grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-3 rounded-lg border bg-card p-3 text-left text-card-foreground outline-hidden transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",c?"border-primary bg-primary/5":"border-border/70 hover:border-primary/40 hover:bg-accent/50",!o&&"cursor-default"),children:[jsxRuntime.jsx("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-semibold tabular-nums text-muted-foreground",children:s.leading||u+1}),jsxRuntime.jsxs("span",{className:"min-w-0",children:[jsxRuntime.jsx("span",{className:"block truncate text-sm font-semibold text-foreground",children:s.label}),O(s.description)?jsxRuntime.jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:s.description}):null,s.tags?.length?jsxRuntime.jsx("span",{className:"mt-2 flex flex-wrap gap-1.5",children:s.tags.map((d,g)=>jsxRuntime.jsx("span",{className:"rounded-full bg-secondary px-2 py-0.5 text-[0.625rem] font-medium text-secondary-foreground",children:d},`${s.id}:tag:${g}`))}):null,s.metrics?.length?jsxRuntime.jsx("span",{className:"mt-2 grid grid-cols-2 gap-x-4 gap-y-1 sm:grid-cols-4",children:s.metrics.map(d=>jsxRuntime.jsxs("span",{className:"min-w-0",children:[jsxRuntime.jsx("span",{className:"block truncate text-[0.625rem] text-muted-foreground",children:d.label}),jsxRuntime.jsx("span",{className:"block text-xs font-semibold tabular-nums text-foreground",children:d.value})]},d.id))}):null]}),jsxRuntime.jsxs("span",{className:"shrink-0 text-right",children:[O(s.score)?jsxRuntime.jsx("span",{className:"block text-lg font-semibold tabular-nums text-primary",children:s.score}):null,O(s.trailing)?jsxRuntime.jsx("span",{className:"mt-1 block text-muted-foreground",children:s.trailing}):null]})]})},s.id)})}):O(n)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:n}):null}r(Vv,"WorkbenchRankedList");function _v({title:e,description:t,items:o,onRemove:n,removeLabel:a=r(()=>"Remove","removeLabel"),actions:i,emptyState:s=null,className:u}){return jsxRuntime.jsxs("section",{"data-monkeys-component":"workbench-selection-tray",className:l("rounded-lg border border-border/70 bg-card p-4 text-card-foreground",u),children:[jsxRuntime.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("h2",{className:"text-sm font-semibold text-foreground",children:e}),O(t)?jsxRuntime.jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground",children:t}):null]}),jsxRuntime.jsx("span",{className:"rounded-full bg-primary/10 px-2.5 py-1 text-xs font-semibold tabular-nums text-primary",children:o.length})]}),o.length?jsxRuntime.jsx("ul",{className:"mt-3 flex flex-wrap gap-2",children:o.map(c=>jsxRuntime.jsxs("li",{className:"flex max-w-full items-center gap-2 rounded-full border border-border bg-background px-3 py-1.5 text-xs text-foreground",children:[jsxRuntime.jsx("span",{className:"min-w-0 truncate font-medium",children:c.label}),O(c.meta)?jsxRuntime.jsx("span",{className:"shrink-0 text-muted-foreground",children:c.meta}):null,n?jsxRuntime.jsx("button",{type:"button","aria-label":a(c),onClick:()=>n(c),className:"rounded-md px-1 text-muted-foreground outline-hidden hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:"\xD7"}):null]},c.id))}):jsxRuntime.jsx("div",{className:"mt-3 rounded-md border border-dashed border-border px-4 py-5 text-center text-xs text-muted-foreground",children:s}),O(i)?jsxRuntime.jsx("div",{className:"mt-4 flex flex-wrap justify-end gap-2 border-t border-border pt-4",children:i}):null]})}r(_v,"WorkbenchSelectionTray");function Di(e,t="milliseconds",o){if(t!=="milliseconds"&&t!=="seconds")return "\u2014";let n;if(typeof e=="number")n=t==="seconds"?e*1e3:e;else if(typeof e=="string"){let i=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,3}))?(Z|[+-]\d{2}:\d{2})$/.exec(e);if(!i)return "\u2014";let s=Number(i[1]),u=Number(i[2]),c=Number(i[3]),d=Number(i[4]),g=Number(i[5]),m=Number(i[6]),p=new Date(0);if(p.setUTCFullYear(s,u-1,c),p.getUTCFullYear()!==s||p.getUTCMonth()!==u-1||p.getUTCDate()!==c||d>23||g>59||m>59)return "\u2014";n=Date.parse(e);}else return "\u2014";if(!Number.isFinite(n))return "\u2014";let a=new Date(n);if(!Number.isFinite(a.getTime()))return "\u2014";try{return a.toLocaleString(o)}catch{return "\u2014"}}r(Di,"renderDateTimeValue");function $v({items:e,emptyState:t=null,ariaLabel:o="Evidence",className:n,translate:a=r(i=>i,"translate")}){let{locale:i}=xt();return e.length?jsxRuntime.jsx("ol",{"aria-label":o,"data-monkeys-component":"workbench-evidence-list",className:l("grid min-w-0 gap-0",n),children:e.map((s,u)=>jsxRuntime.jsxs("li",{className:"grid min-w-0 grid-cols-[1.25rem_minmax(0,1fr)_auto] gap-3",children:[jsxRuntime.jsxs("span",{className:"flex flex-col items-center","aria-hidden":"true",children:[jsxRuntime.jsx("span",{className:"mt-1 flex size-5 items-center justify-center rounded-full border border-primary/40 bg-primary/10 text-[0.625rem] font-semibold text-primary",children:s.marker||u+1}),u<e.length-1?jsxRuntime.jsx("span",{className:"min-h-8 w-px flex-1 bg-border"}):null]}),jsxRuntime.jsxs("span",{className:"min-w-0 pb-5",children:[jsxRuntime.jsx("span",{className:"block text-sm font-semibold text-foreground",children:s.titleKey?a(s.titleKey):s.title}),O(s.description)||s.descriptionKey?jsxRuntime.jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:s.descriptionKey?a(s.descriptionKey):s.description}):null,O(s.source)||s.sourceKey||O(s.timestamp)||s.timestampValue!==void 0?jsxRuntime.jsxs("span",{className:"mt-1.5 flex flex-wrap gap-x-3 gap-y-1 text-[0.6875rem] text-muted-foreground",children:[O(s.source)||s.sourceKey?jsxRuntime.jsx("span",{children:s.sourceKey?a(s.sourceKey):s.source}):null,O(s.timestamp)||s.timestampValue!==void 0?jsxRuntime.jsx("time",{children:s.timestampValue!==void 0?Di(s.timestampValue,"milliseconds",i):s.timestamp}):null]}):null]}),O(s.action)?jsxRuntime.jsx("span",{className:"pb-5",children:s.action}):null]},s.id))}):O(t)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:t}):null}r($v,"WorkbenchEvidenceList");var Uv=lt.forwardRef(r(function({src:t,title:o,className:n,style:a,...i},s){let u=eo(t,"media"),c=u&&!u.startsWith("blob:")?u:void 0;return jsxRuntime.jsx("iframe",{...i,ref:s,src:c,title:o,"data-monkeys-component":"web-preview-frame","data-invalid-source":!c||void 0,sandbox:"allow-scripts allow-same-origin allow-forms allow-popups allow-presentation",referrerPolicy:"no-referrer",className:l("h-full min-h-80 w-full border-0 bg-background",n),style:a})},"WebPreviewFrame"));var Yv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activateItem");function Jv({items:e,selectedItemId:t,onItemSelect:o,emptyState:n=null,ariaLabel:a="Assets",className:i}){return e.length?jsxRuntime.jsx("div",{"data-monkeys-component":"workbench-asset-gallery",children:jsxRuntime.jsx(on,{items:e,config:{getItemKey:r(s=>s.id,"getItemKey"),layout:{mode:"grid",columns:"auto",minCardWidth:"12rem",idealCardWidth:"16rem",gap:12},appearance:{hover:"none"}},ariaLabel:a,className:i,renderItem:s=>{let u=t===s.id;return jsxRuntime.jsxs("button",{type:"button","aria-pressed":o?u:void 0,onClick:o?()=>o(s):void 0,onKeyDown:c=>Yv(c,s,o),className:l("group w-full overflow-hidden rounded-lg border bg-card text-left text-card-foreground outline-hidden transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",u?"border-primary ring-1 ring-primary":"border-border/70 hover:border-primary/40",!o&&"cursor-default"),children:[jsxRuntime.jsx("span",{className:"block aspect-[4/3] overflow-hidden bg-muted",children:jsxRuntime.jsx("img",{src:s.url,alt:s.alt,loading:"lazy",className:"size-full object-cover transition-transform duration-200 group-hover:scale-[1.02] motion-reduce:transition-none"})}),jsxRuntime.jsxs("span",{className:"block p-3",children:[O(s.title)?jsxRuntime.jsx("span",{className:"block truncate text-sm font-semibold text-foreground",children:s.title}):null,O(s.description)?jsxRuntime.jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:s.description}):null,s.badges?.length?jsxRuntime.jsx("span",{className:"mt-2 flex flex-wrap gap-1.5",children:s.badges.map((c,d)=>jsxRuntime.jsx("span",{className:"rounded-full bg-secondary px-2 py-0.5 text-[0.625rem] text-secondary-foreground",children:c},`${s.id}:badge:${d}`))}):null]})]})}})}):O(n)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:n}):null}r(Jv,"WorkbenchAssetGallery");var tm={primary:"--radar-series-one",secondary:"--radar-series-two",accent:"--radar-series-three",muted:"--radar-series-four"},om={primary:"var(--primary)",secondary:"var(--secondary-foreground)",accent:"var(--accent-foreground)",muted:"var(--muted-foreground)"},Cn=r(e=>`hsl(var(${tm[e]}, ${om[e]}))`,"workbenchVisualizationToneColor"),ea=r((e,t)=>`hsl(var(${tm[e]}, ${om[e]}) / ${t})`,"workbenchVisualizationToneColorWithAlpha");var Zv={backgroundColor:"hsl(var(--radar-canvas, var(--background)))",color:"hsl(var(--foreground))"},nm={backgroundColor:"hsl(var(--radar-panel, var(--card)))",borderColor:"hsl(var(--radar-border, var(--border)))"};function rm({items:e,activeItemId:t,activeChildId:o,onItemSelect:n,onChildSelect:a,footer:i,ariaLabel:s="Radar navigation"}){return jsxRuntime.jsx(Er,{kind:"route",routeItems:e.map(u=>({...u,children:u.children?.map(c=>({...c,domProps:{"data-radar-navigation-child-id":c.id}}))})),activeItemId:t,activeChildId:o,onItemSelect:n?u=>n(u):void 0,onChildSelect:a?(u,c)=>a(u,c):void 0,footer:i,ariaLabel:s,dataComponent:"workbench-radar-navigation",widthMode:"fill",resizable:false,collapsible:false,appearance:{density:"default",surface:"outlined",activeVariant:"solid"},className:"min-w-0 self-stretch rounded-lg",classNames:{content:"p-3",list:"gap-2",item:"min-h-11 px-3 py-2 text-sm font-semibold",itemActive:"bg-primary text-primary-foreground shadow-[0_0_1.25rem_hsl(var(--primary)/0.28)]",childList:"ml-5 gap-0.5 border-l border-border/70 py-1 pl-3",childItem:"min-h-9 px-2 text-xs font-medium",childItemActive:"border-primary/40 bg-primary/15 text-primary",footer:"p-3"},style:nm})}r(rm,"WorkbenchRadarNavigation");function Qv({navigationItems:e=[],activeNavigationId:t,activeNavigationChildId:o,onNavigationSelect:n,onNavigationChildSelect:a,navigationFooter:i,navigation:s,children:u,inspector:c,inspectorLabel:d="Context controls",className:g,contentClassName:m,minimumHeight:p="calc(100dvh - 1rem)",ariaLabel:f="Radar workspace"}){return jsxRuntime.jsxs("section",{"data-monkeys-component":"workbench-radar-workspace","data-radar-active-navigation-id":t,"aria-label":f,className:l("grid min-w-0 gap-3 overflow-hidden p-3 lg:grid-cols-[12.5rem_minmax(0,1fr)] xl:grid-cols-[12.5rem_minmax(0,1fr)_20rem]",g),style:{...Zv,minHeight:p},children:[O(s)?s:jsxRuntime.jsx(rm,{items:e,activeItemId:t,activeChildId:o,onItemSelect:n,onChildSelect:a,footer:i}),jsxRuntime.jsx("div",{"data-radar-workspace-region":"content",className:l("relative min-h-[42rem] min-w-0 overflow-hidden rounded-lg border",m),style:{backgroundColor:"hsl(var(--radar-canvas, var(--background)))",borderColor:"hsl(var(--radar-shell-border, var(--border)))",boxShadow:"inset 0 0 0 1px hsl(var(--radar-grid, var(--border)) / 0.22)"},children:u}),O(c)?jsxRuntime.jsx("aside",{"aria-label":d,"data-radar-workspace-region":"inspector",className:"min-h-0 overflow-y-auto rounded-lg border lg:col-span-2 xl:col-span-1",style:nm,children:c}):null]})}r(Qv,"WorkbenchRadarWorkspace");function ek({title:e,icon:t,description:o,children:n,className:a}){return jsxRuntime.jsxs("section",{"data-monkeys-component":"workbench-radar-inspector-section",className:l("border-b border-border/70 p-4 last:border-b-0",a),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold text-primary",children:[O(t)?jsxRuntime.jsx("span",{"aria-hidden":"true",children:t}):null,jsxRuntime.jsx("h2",{children:e})]}),O(o)?jsxRuntime.jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground",children:o}):null,O(n)?jsxRuntime.jsx("div",{className:"mt-3",children:n}):null]})}r(ek,"WorkbenchRadarInspectorSection");function tk(e){let{disclosure:t,onSelect:o}=e;if(!t&&!o||t?.mode==="integrated"&&(!!o||e.selected!==void 0)||t?.mode==="separate"&&!o)throw new Error("Invalid WorkbenchRadarFilterRow props.")}r(tk,"assertValidRadarFilterRowProps");function ok(e){tk(e);let{label:t,value:o,icon:n,selected:a,disabled:i=false,tone:s,onSelect:u,disclosure:c,className:d}=e,g=a??false,m=g?void 0:"monkeys-workbench-radar-filter-row--idle",p=i?"monkeys-workbench-radar-filter-disabled":void 0,f=s??"primary",b=Cn(f),v={"--workbench-radar-filter-tone":b,"--tw-ring-color":s?b:"hsl(var(--ring))",...g||s?{backgroundColor:ea(f,g?.14:.08),borderColor:b}:{}},y=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[O(n)?jsxRuntime.jsx("span",{className:l("flex size-4 shrink-0 items-center justify-center",s?"text-[var(--workbench-radar-filter-tone)]":"text-muted-foreground"),"aria-hidden":"true",children:n}):null,jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:t}),O(o)?jsxRuntime.jsx("span",{className:"ml-auto shrink-0 tabular-nums text-muted-foreground",children:o}):null]}),x=c?jsxRuntime.jsx("span",{"aria-hidden":"true",className:l("text-lg leading-none transition-transform motion-reduce:transition-none",c.expanded&&"rotate-90"),children:"\u203A"}):null;if(c?.mode==="separate"){let k=c.expanded?c.collapseLabel:c.expandLabel;return jsxRuntime.jsxs("div",{"data-monkeys-component":"workbench-radar-filter-row",className:l("monkeys-workbench-radar-filter-row monkeys-workbench-radar-filter-row--separate",m,p,d),style:v,children:[jsxRuntime.jsx("button",{type:"button","aria-pressed":a,disabled:i,onClick:u,className:l("monkeys-workbench-radar-filter-control monkeys-workbench-radar-filter-row__action",p),children:y}),jsxRuntime.jsx("button",{type:"button","aria-expanded":c.expanded,"aria-controls":c.controls,"aria-label":k,disabled:i,onClick:c.onToggle,className:l("monkeys-workbench-radar-filter-row__disclosure",p),children:x})]})}let w=c?.mode==="integrated"?c:void 0,h=w?w.expanded?w.collapseLabel:w.expandLabel:void 0;return jsxRuntime.jsxs("button",{type:"button","data-monkeys-component":"workbench-radar-filter-row","aria-label":h,"aria-pressed":w?void 0:a,"aria-expanded":w?.expanded,"aria-controls":w?.controls,disabled:i,onClick:w?.onToggle??u,className:l("monkeys-workbench-radar-filter-control monkeys-workbench-radar-filter-row",m,p,d),style:v,children:[y,w?jsxRuntime.jsx("span",{className:"ml-auto shrink-0 text-muted-foreground",children:x}):null]})}r(ok,"WorkbenchRadarFilterRow");function nk({label:e,value:t,icon:o,selected:n=false,disabled:a=false,onSelect:i,className:s}){let u=!!i||a;return jsxRuntime.jsxs(u?"button":"div",{type:u?"button":void 0,"aria-pressed":i&&!a?n:void 0,disabled:u?a:void 0,onClick:i,className:l("flex min-w-0 items-center border text-xs font-semibold outline-hidden transition-colors focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none","monkeys-workbench-radar-filter-control rounded-md",n?"border-primary bg-primary/20 text-primary":"border-border bg-background/40 text-foreground hover:border-primary/60 hover:bg-primary/10",a&&"cursor-not-allowed opacity-50",s),children:[O(o)?jsxRuntime.jsx("span",{className:"shrink-0","aria-hidden":"true",children:o}):null,jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:e}),O(t)?jsxRuntime.jsx("span",{className:"ml-auto shrink-0 text-muted-foreground",children:t}):null]})}r(nk,"WorkbenchRadarFilterChip");var ak=r(e=>e.filter(Number.isFinite),"finiteValues"),wl=r((e,t,o)=>{let n=ak(e),a=Number.isFinite(t)?Number(t):Math.min(...n,0),i=Number.isFinite(o)?Number(o):Math.max(...n,1);return a===i?[a,i+1]:a<i?[a,i]:[i,a]},"getDomain"),an=r((e,t,o,n)=>o+(e-t[0])/(t[1]-t[0])*(n-o),"scale"),sn=r((e,t,o)=>Math.min(o,Math.max(t,e)),"clamp"),ik=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activatePoint"),sk={"low-high":{x:26,y:8,anchor:"start"},"high-high":{x:974,y:8,anchor:"end"},"low-low":{x:26,y:660,anchor:"start"},"high-low":{x:974,y:660,anchor:"end"}};function lk({points:e,xAxis:t,yAxis:o,thresholds:n,quadrants:a=[],legend:i=[],selectedPointId:s,onPointSelect:u,width:c=1e3,height:d=700,labelLimit:g=18,emptyState:m=null,ariaLabel:p=`${t.label} by ${o.label} radar matrix`,className:f}){let b=e.filter(R=>Number.isFinite(R.x)&&Number.isFinite(R.y));if(!b.length)return O(m)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:m}):null;let v=wl(b.map(R=>R.x),t.min,t.max),y=wl(b.map(R=>R.y),o.min,o.max),x=wl(b.map(R=>R.size??1)),w=0,h=c,k=0,C=d,T=sn(an(Number.isFinite(n?.x)?Number(n?.x):(v[0]+v[1])/2,v,w,h),w,h),S=sn(an(Number.isFinite(n?.y)?Number(n?.y):(y[0]+y[1])/2,y,C,k),k,C),I=new Set([...b].sort((R,W)=>(W.size??0)-(R.size??0)).slice(0,g).map(R=>R.id));return jsxRuntime.jsxs("div",{"data-monkeys-component":"workbench-radar-matrix",className:l("relative size-full min-h-[42rem] min-w-0 overflow-hidden",f),style:{backgroundColor:"hsl(var(--radar-canvas, var(--background)))",backgroundImage:"radial-gradient(circle at 78% 20%, hsl(var(--primary) / 0.08), transparent 32%), radial-gradient(circle at 18% 82%, hsl(var(--radar-series-two, var(--accent-foreground)) / 0.06), transparent 30%)"},children:[jsxRuntime.jsxs("svg",{viewBox:`0 0 ${c} ${d}`,preserveAspectRatio:"none",className:"absolute inset-0 size-full",role:"img","aria-label":p,children:[jsxRuntime.jsxs("g",{"aria-hidden":"true",children:[Array.from({length:13},(R,W)=>{let H=c/12*W,L=d/12*W;return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:H,y1:0,x2:H,y2:d,style:{stroke:"hsl(var(--radar-grid, var(--border)) / 0.36)"}}),jsxRuntime.jsx("line",{x1:0,y1:L,x2:c,y2:L,style:{stroke:"hsl(var(--radar-grid, var(--border)) / 0.36)"}})]},W)}),jsxRuntime.jsx("line",{x1:T,y1:0,x2:T,y2:d,strokeWidth:"1.5",style:{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.64)"}}),jsxRuntime.jsx("line",{x1:0,y1:S,x2:c,y2:S,strokeWidth:"1.5",style:{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.64)"}})]}),a.map(R=>{let W=sk[R.id];return jsxRuntime.jsxs("g",{"aria-hidden":"true",children:[jsxRuntime.jsx("text",{x:W.x,y:W.y+20,textAnchor:W.anchor,className:"fill-muted-foreground text-[0.8125rem] font-semibold",children:R.title}),O(R.description)&&typeof R.description=="string"?jsxRuntime.jsx("text",{x:W.x,y:W.y+40,textAnchor:W.anchor,className:"fill-muted-foreground text-[0.6875rem]",children:R.description}):null]},R.id)}),b.map((R,W)=>{let H=sn(an(R.x,v,40,c-40),40,c-40),L=sn(an(R.y,y,d-48,54),54,d-48),F=R.tone||(W%2===0?"primary":"accent"),$=s===R.id,M=I.has(R.id),G=M?sn(an(R.size??1,x,5,9),5,9):3.5,Y=M?sn(an(R.size??1,x,14,31),14,31):0,N={fill:Cn(F),stroke:"hsl(var(--foreground) / 0.74)"},D={fill:Cn(F),filter:`drop-shadow(0 0 0.65rem ${ea(F,.72)})`};return jsxRuntime.jsxs("g",{transform:`translate(${H}, ${L})`,role:u?"button":void 0,tabIndex:u?0:void 0,"aria-label":`${R.label}: ${t.label} ${R.x}, ${o.label} ${R.y}`,"aria-pressed":u?$:void 0,onClick:u?()=>u(R):void 0,onKeyDown:B=>ik(B,R,u),className:l(u&&"cursor-pointer outline-hidden"),children:[$?jsxRuntime.jsx("circle",{r:G+10,fill:"none",strokeWidth:"2",style:{stroke:ea(F,.48)}}):null,jsxRuntime.jsx("circle",{r:G,strokeWidth:"1.25",style:N}),M?jsxRuntime.jsx("text",{y:-G-8,textAnchor:"middle",fontSize:Y,fontWeight:"700",style:D,className:"pointer-events-none",children:R.label.slice(0,22)}):null,jsxRuntime.jsx("title",{children:R.description||R.label})]},R.id)}),jsxRuntime.jsx("circle",{cx:T,cy:S,r:"10",style:{fill:"hsl(var(--radar-axis, var(--primary)))"}}),jsxRuntime.jsx("circle",{cx:T,cy:S,r:"3",className:"fill-primary-foreground"}),jsxRuntime.jsx("text",{x:c/2,y:d-12,textAnchor:"middle",className:"fill-muted-foreground text-[0.6875rem]",children:t.label}),jsxRuntime.jsx("text",{x:"14",y:d/2,textAnchor:"middle",transform:`rotate(-90 14 ${d/2})`,className:"fill-muted-foreground text-[0.6875rem]",children:o.label})]}),jsxRuntime.jsxs("div",{className:"absolute bottom-4 left-4 hidden w-44 overflow-hidden rounded-[var(--radius)] border bg-card/95 shadow-xl sm:block",style:{borderColor:"hsl(var(--radar-border, var(--border)))"},"aria-hidden":"true",children:[jsxRuntime.jsxs("div",{className:"flex h-9 items-center justify-between border-b border-border px-3 text-xs font-semibold text-muted-foreground",children:[jsxRuntime.jsx("span",{children:"\u2212"}),jsxRuntime.jsx("span",{children:"100%"}),jsxRuntime.jsx("span",{children:"\uFF0B"})]}),jsxRuntime.jsxs("svg",{viewBox:`0 0 ${c} ${d}`,className:"h-24 w-full",children:[jsxRuntime.jsx("rect",{width:c,height:d,style:{fill:"hsl(var(--radar-canvas, var(--background)))"}}),jsxRuntime.jsx("line",{x1:T,y1:0,x2:T,y2:d,style:{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.7)"},strokeWidth:"6"}),jsxRuntime.jsx("line",{x1:0,y1:S,x2:c,y2:S,style:{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.7)"},strokeWidth:"6"}),b.map((R,W)=>jsxRuntime.jsx("circle",{cx:sn(an(R.x,v,40,c-40),40,c-40),cy:sn(an(R.y,y,d-48,54),54,d-48),r:"8",style:{fill:Cn(R.tone||(W%2===0?"primary":"accent"))}},R.id)),jsxRuntime.jsx("rect",{x:c*.22,y:d*.12,width:c*.58,height:d*.62,fill:"none",strokeWidth:"8",style:{stroke:"hsl(var(--primary))"}})]})]}),i.length?jsxRuntime.jsx("div",{className:"absolute bottom-4 left-1/2 hidden -translate-x-1/2 items-center gap-4 rounded-full border border-border bg-card/95 px-4 py-2 text-xs font-semibold shadow-xl md:flex",children:i.map(R=>{let W=R.tone||"muted";return jsxRuntime.jsxs("span",{className:"flex items-center gap-2 text-muted-foreground",children:[jsxRuntime.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:Cn(W)}}),R.label]},R.id)})}):null]})}r(lk,"WorkbenchRadarMatrix");var im=2048,Sl=2*1024*1024,Tl=class Tl extends Error{constructor(o,n,a){super(o);this.code=o;this.expectedSequence=n;this.receivedSequence=a;this.name="RuntimeTerminalOutputError";}};r(Tl,"RuntimeTerminalOutputError");var ta=Tl;function lm(e,t){let o=r((m,p)=>{throw new ta(m,e.highWater+1,p)},"fail");if(!Array.isArray(t))return o("invalid-frame");if(t.length>im)return o("output-budget-exceeded");let n=new Map(e.frames.map(m=>[m.sequence,m])),a=[],i=e.highWater,s,u=0;for(let m of t){if(!m||!Number.isSafeInteger(m.sequence)||m.sequence<1||typeof m.data!="string")return o("invalid-frame");if(s!==void 0&&m.sequence===s)return o("duplicate-sequence",m.sequence);if(s!==void 0&&m.sequence!==s+1)return o("sequence-gap",m.sequence);if(s=m.sequence,m.data.length>Sl)return o("output-budget-exceeded",m.sequence);let p=new TextEncoder().encode(m.data).byteLength;if(u+=p,u>Sl)return o("output-budget-exceeded",m.sequence);if(m.sequence<=i){let f=n.get(m.sequence);if(!f)return o("history-expired",m.sequence);if(f.data!==m.data)return o("sequence-conflict",m.sequence)}else {if(m.sequence!==i+1)return o("sequence-gap",m.sequence);i=m.sequence,a.push({sequence:m.sequence,data:m.data,bytes:p});}}let c=[...e.frames,...a],d=e.bytes+a.reduce((m,p)=>m+p.bytes,0),g=0;for(;c.length-g>im||d>Sl;)d-=c[g++].bytes;return {history:{highWater:i,bytes:d,frames:c.slice(g)},append:a.map(({sequence:m,data:p})=>({sequence:m,data:p}))}}r(lm,"prepareRuntimeTerminalOutput");function ck(e){let t=lt.useRef(null),o=lt.useRef(e);o.current=e;let n=lt.useRef();return lt.useEffect(()=>{let a=e.sessionKey,i=t.current;if(!i||!a)return;let s=true,u,c,d=[],g=false,m=r(()=>{g||(g=true,c?.disconnect(),d.forEach(v=>v.dispose()),u?.dispose());},"cleanup"),p={highWater:0,bytes:0,frames:[]},f=r(()=>s&&o.current.sessionKey===a,"current"),b=r(v=>{if(!f())return;let y=v instanceof ta?v:new ta("load-failed",p.highWater+1);o.current.onOutputError?.({sessionKey:a,code:y.code,expectedSequence:y.expectedSequence,...y.receivedSequence===void 0?{}:{receivedSequence:y.receivedSequence}});},"report");return Promise.all([import('@xterm/xterm'),import('@xterm/addon-fit'),import('@xterm/addon-web-links')]).then(([{Terminal:v},{FitAddon:y},{WebLinksAddon:x}])=>{if(!f())return;let w=r((S,I)=>{let R=eo(I,"link");f()&&R&&/^https?:\/\//i.test(R)&&window.open(R,"_blank","noopener,noreferrer");},"openLink"),h=new v({linkHandler:{activate:w},cursorBlink:true,disableStdin:o.current.disabled===true,fontSize:13,fontFamily:'"JetBrains Mono", Menlo, Monaco, "Courier New", monospace'});u=h;let k=new y;h.loadAddon(k),h.loadAddon(new x(w)),h.open(i);let C=r(()=>{if(!f())return;k.fit();let S=k.proposeDimensions();S&&Number.isInteger(S.cols)&&Number.isInteger(S.rows)&&S.cols>0&&S.rows>0&&o.current.onResize?.({sessionKey:a,columns:S.cols,rows:S.rows});},"resize");d.push(h.onData(S=>{f()&&!o.current.disabled&&o.current.onInput?.({sessionKey:a,data:S});}));let T=r(S=>{if(f())try{let I=lm(p,S);I.append.length&&h.write(I.append.map(R=>R.data).join("")),p=I.history;}catch(I){b(I);}},"write");n.current={sessionKey:a,terminal:h,write:T},C(),typeof ResizeObserver<"u"&&(c=new ResizeObserver(C),c.observe(i)),T(o.current.output);}).catch(v=>{m(),u&&n.current?.terminal===u&&(n.current=void 0),b(v);}),()=>{s=false,m(),u&&n.current?.terminal===u&&(n.current=void 0);}},[e.sessionKey]),lt.useEffect(()=>{let a=n.current;a?.sessionKey===e.sessionKey&&(a.terminal.options.disableStdin=e.disabled===true,a.write(e.output));},[e.sessionKey,e.output,e.disabled]),jsxRuntime.jsxs("div",{className:e.className,style:e.style,children:[jsxRuntime.jsx("div",{role:"status",children:e.statusLabel}),jsxRuntime.jsx("div",{ref:t,className:"h-full min-h-48 w-full rounded-2xl"})]})}r(ck,"RuntimeTerminalView");var mk={operationFailed:{en:"The file operation failed. Review the input and try again.",zh:"\u6587\u4EF6\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u8F93\u5165\u540E\u91CD\u8BD5\u3002"},apply:{en:"Apply",zh:"\u5E94\u7528"},cancel:{en:"Cancel",zh:"\u53D6\u6D88"},compact:{en:"Compact",zh:"\u7D27\u51D1"},confirm:{en:"Confirm",zh:"\u786E\u8BA4"},confirmAction:{en:"Confirm file action",zh:"\u786E\u8BA4\u6587\u4EF6\u64CD\u4F5C"},create:{en:"Create",zh:"\u65B0\u5EFA"},delete:{en:"Delete",zh:"\u5220\u9664"},detailed:{en:"Detailed",zh:"\u8BE6\u7EC6"},diff:{en:"Diff",zh:"\u5DEE\u5F02"},directory:{en:"Directory",zh:"\u6587\u4EF6\u5939"},discardReload:{en:"Discard draft and reload",zh:"\u653E\u5F03\u4FEE\u6539\u5E76\u91CD\u65B0\u52A0\u8F7D"},download:{en:"Download",zh:"\u4E0B\u8F7D"},file:{en:"File",zh:"\u6587\u4EF6"},actions:{en:"File actions",zh:"\u6587\u4EF6\u64CD\u4F5C"},files:{en:"Files",zh:"\u6587\u4EF6"},kind:{en:"Kind",zh:"\u7C7B\u578B"},loadingDiff:{en:"Loading diff",zh:"\u6B63\u5728\u52A0\u8F7D\u5DEE\u5F02"},path:{en:"Path",zh:"\u8DEF\u5F84"},refresh:{en:"Refresh",zh:"\u5237\u65B0"},rename:{en:"Rename",zh:"\u91CD\u547D\u540D"},save:{en:"Save",zh:"\u4FDD\u5B58"},search:{en:"Search",zh:"\u641C\u7D22"},searchFiles:{en:"Search files",zh:"\u641C\u7D22\u6587\u4EF6"},simple:{en:"Simple",zh:"\u7B80\u6D01"},sourceControl:{en:"Source control",zh:"\u6E90\u4EE3\u7801\u7BA1\u7406"},viewMode:{en:"View mode",zh:"\u663E\u793A\u65B9\u5F0F"},binaryUnavailable:{en:"Binary file cannot be previewed.",zh:"\u65E0\u6CD5\u9884\u89C8\u4E8C\u8FDB\u5236\u6587\u4EF6\u3002"},diffTooLarge:{en:"Diff exceeds text editor limit.",zh:"\u5DEE\u5F02\u5185\u5BB9\u8D85\u8FC7\u7F16\u8F91\u5668\u5927\u5C0F\u9650\u5236\u3002"},diffUnavailable:{en:"Diff is unavailable.",zh:"\u6682\u65F6\u65E0\u6CD5\u67E5\u770B\u5DEE\u5F02\u3002"},changedExternally:{en:"File changed externally; your draft is preserved.",zh:"\u6587\u4EF6\u5DF2\u88AB\u5916\u90E8\u4FEE\u6539\uFF1B\u4F60\u7684\u8349\u7A3F\u5DF2\u4FDD\u7559\u3002"},tooLarge:{en:"File exceeds text editor limit.",zh:"\u6587\u4EF6\u8D85\u8FC7\u7F16\u8F91\u5668\u5927\u5C0F\u9650\u5236\u3002"},imageUnavailable:{en:"Image preview is unavailable.",zh:"\u6682\u65F6\u65E0\u6CD5\u9884\u89C8\u56FE\u7247\u3002"},tooManyExpanded:{en:"Too many expanded paths.",zh:"\u5C55\u5F00\u7684\u8DEF\u5F84\u6570\u91CF\u8FC7\u591A\u3002"},deleteConfirm:{en:"Delete the selected item?",zh:"\u5220\u9664\u6240\u9009\u9879\u76EE\uFF1F"},discardConfirm:{en:"Discard unsaved changes?",zh:"\u653E\u5F03\u672A\u4FDD\u5B58\u7684\u4FEE\u6539\uFF1F"},name:{en:"Name",zh:"\u540D\u79F0"},size:{en:"Size",zh:"\u5927\u5C0F"},modified:{en:"Modified",zh:"\u4FEE\u6539\u65F6\u95F4"},permissions:{en:"Permissions",zh:"\u6743\u9650"},type:{en:"Type",zh:"\u7C7B\u578B"},empty:{en:"Select a file to view or edit its contents.",zh:"\u9009\u62E9\u6587\u4EF6\u4EE5\u67E5\u770B\u6216\u7F16\u8F91\u5185\u5BB9\u3002"},emptyTree:{en:"No matching files.",zh:"\u6CA1\u6709\u5339\u914D\u7684\u6587\u4EF6\u3002"},renameItem:{en:"Rename {name}",zh:"\u91CD\u547D\u540D {name}"},deleteItem:{en:"Delete {name}",zh:"\u5220\u9664 {name}"},downloadItem:{en:"Download {name}",zh:"\u4E0B\u8F7D {name}"}};function dm(e){let{locale:t}=xt();return (o,n)=>{let a=`monkeys.design.runtimeFiles.${o}`,i=e?.(a);return (i&&i!==a?i:mk[o][t.toLowerCase().startsWith("zh")?"zh":"en"]).replace(/\{([A-Za-z]+)\}/g,(u,c)=>n?.[c]??u)}}r(dm,"useRuntimeFileCopy");var na=r(e=>new TextEncoder().encode(e).byteLength,"bytes"),Li=r(e=>({...e,value:e.content}),"fromFile");function xk(e){return jsxRuntime.jsx(vk,{...e},JSON.stringify([e.model.scopeId]))}r(xk,"RuntimeFileExplorer");function vk(e){let{model:t,onIntent:o,renderEditor:n,renderPreview:a,renderDiff:i,onDraftStateChange:s,translate:u}=e,{locale:c}=xt(),d=dm(u);if(t.openFile&&t.preview)throw new TypeError("openFile and preview are mutually exclusive.");if(t.preview?.kind==="image"&&t.preview.src!==void 0==(t.preview.contentBase64!==void 0))throw new TypeError("Image requires exactly one of src and contentBase64.");let g=lt.useRef(true);lt.useEffect(()=>(g.current=true,()=>{g.current=false;}),[]);let[m,p]=lt.useState(false),[f,b]=lt.useState(t.search??""),[v,y]=lt.useState(false);lt.useEffect(()=>b(t.search??""),[t.search]),lt.useEffect(()=>{if(typeof window.matchMedia!="function")return;let z=window.matchMedia("(max-width: 767px)"),X=r(()=>p(z.matches),"update");return X(),z.addEventListener("change",X),()=>z.removeEventListener("change",X)},[]);let[x,w]=lt.useState(()=>t.openFile?Li(t.openFile):null),[h,k]=lt.useState(null),[C,T]=lt.useState(false),[S,I]=lt.useState(""),[R,W]=lt.useState(null),[H,L]=lt.useState(""),[F,$]=lt.useState("file"),M=lt.useRef(null),G=lt.useRef(null),Y=x!==null&&x.value!==x.content,N=Number.isSafeInteger(t.maxTextBytes)&&t.maxTextBytes>0?Math.min(t.maxTextBytes,1024*1024):1024*1024,D=x!==null&&na(x.value)>N,B=t.disabled===true||t.saving===true,K=x?.readOnly===true||t.openFile?.path===x?.path&&t.openFile?.readOnly===true,J=lt.useRef({blocked:B,draft:x,readOnly:K,conflict:C,tooLarge:D});J.current={blocked:B,draft:x,readOnly:K,conflict:C,tooLarge:D};let V=t.preview?.path,Q=t.activeView==="diff",j=t.diff?.path??x?.path??t.selectedPath??"";lt.useEffect(()=>{if(Q||t.preview){let ie=Q?`diff:${j}`:V;if(Y&&G.current!==ie){T(true);return}x&&w(null),M.current=null,G.current=null,T(false);return}let z=t.openFile;if(!z){Y?T(true):(w(null),T(false));return}if(!x||z.path!==x.path){if(Y&&G.current!==z.path){T(true);return}G.current=null,M.current=null,w(Li(z)),T(false);return}if(z.revision===x.revision&&z.content===x.content)return;let X=M.current;if(X&&X.path===z.path&&z.revision!==X.revision&&z.content===X.content){w({...z,value:x.value}),M.current=null,T(false);return}if(Y){T(true);return}w(Li(z)),T(false);},[t.openFile?.path,t.openFile?.revision,t.openFile?.content,t.preview,Q,t.diff?.identity]),lt.useEffect(()=>{if(!Y)return;let z=r(X=>{X.preventDefault(),X.returnValue="";},"beforeUnload");return window.addEventListener("beforeunload",z),()=>window.removeEventListener("beforeunload",z)},[Y]);let Z=lt.useRef(s);Z.current=s,lt.useEffect(()=>{Z.current?.({path:x?.path??null,revision:x?.revision??null,dirty:Y});},[x?.path,x?.revision,Y]);let te=r(z=>{if(g.current){switch(z.type){case "select":if(e.onSelect)return e.onSelect(z);break;case "expand":if(e.onExpand)return e.onExpand(z);break;case "view-mode":if(e.onViewMode)return e.onViewMode(z);break;case "search":if(e.onSearch)return e.onSearch(z);break;case "edit":if(e.onEdit)return e.onEdit(z);break;case "save":if(e.onSave)return e.onSave(z);break;case "create":if(e.onCreate)return e.onCreate(z);break;case "rename":if(e.onRename)return e.onRename(z);break;case "delete":if(e.onDelete)return e.onDelete(z);break;case "download":if(e.onDownload)return e.onDownload(z);break;case "open-diff":if(e.onOpenDiff)return e.onOpenDiff(z);break;case "refresh":if(e.onRefresh)return e.onRefresh(z);break;case "sourcecontrol":if(e.onSourceControl)return e.onSourceControl(z);break}o?.(z);}},"route"),ae=r(z=>{if(!(B||!g.current)){if(z.type==="delete"||Y&&(z.type==="sourcecontrol"||z.type==="open-diff"||z.type==="select"&&z.path!==x?.path)){k(z);return}te(z);}},"send"),le=r(z=>{!g.current||J.current.draft!==x||!x||B||J.current.blocked||J.current.readOnly||J.current.conflict||K||C||na(z)>N||(w({...x,value:z}),te({type:"edit",path:x.path,expectedRevision:x.revision,content:z}));},"change"),A=r(()=>{!g.current||J.current.draft!==x||!x||B||J.current.blocked||J.current.readOnly||J.current.conflict||J.current.tooLarge||K||C||D||!Y||(M.current={path:x.path,revision:x.revision,content:x.value},te({type:"save",path:x.path,expectedRevision:x.revision,content:x.value}));},"save"),me=t.viewMode==="detailed"&&m?"compact":t.viewMode??"simple",P=new Set(t.expandedPaths??(()=>{let z=[],X=r(ie=>{for(let q of ie)q.expanded&&z.push(q.path),q.children&&X(q.children);},"visit");return X(t.nodes),z})()),_=(t.search??"").trim().toLocaleLowerCase(c),re=r(z=>z.flatMap(X=>{let ie=X.children?re(X.children):void 0;return !_||X.name.toLocaleLowerCase(c).includes(_)||X.path.toLocaleLowerCase(c).includes(_)||ie?.length?[{...X,children:ie}]:[]}),"filterTree"),fe=re(t.nodes),ye=r(z=>{let X=new Set(P);if(X.has(z.path)?X.delete(z.path):X.add(z.path),X.size>1e4||na(JSON.stringify([...X]))>1024*1024){y(true);return}y(false),ae({type:"expand",path:z.path,expandedPaths:[...X]});},"toggle"),xe=r(z=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{children:Number.isSafeInteger(z.size)&&z.size>=0?new Intl.NumberFormat(c).format(z.size):"\u2014"}),jsxRuntime.jsx("span",{children:z.modified?Di(z.modified,"milliseconds",c):"\u2014"}),jsxRuntime.jsx("span",{children:z.permissionsRwx??"\u2014"}),jsxRuntime.jsx("span",{children:z.mimeType??"\u2014"})]}),"metadata"),oe=r(z=>jsxRuntime.jsx("ul",{className:"space-y-1",children:z.map(X=>jsxRuntime.jsxs("li",{children:[jsxRuntime.jsxs("div",{className:me==="detailed"?"grid min-w-[44rem] grid-cols-[minmax(10rem,1fr)_6rem_10rem_6rem_8rem_auto] items-center gap-2":"flex min-w-0 items-center gap-2",children:[jsxRuntime.jsxs(ve,{className:"min-w-0 flex-1 justify-start truncate border-transparent",classNames:{label:"min-w-0 truncate"},icon:X.type==="directory"?P.has(X.path)?jsxRuntime.jsx(lucideReact.ChevronDown,{size:14}):jsxRuntime.jsx(lucideReact.ChevronRight,{size:14}):jsxRuntime.jsx(lucideReact.FileText,{size:14}),tone:t.selectedPath===X.path?"primary":"muted",size:"sm",type:"button",disabled:B||X.loading,"aria-current":t.selectedPath===X.path?"true":void 0,"aria-expanded":X.type==="directory"?P.has(X.path):void 0,onClick:()=>X.type==="directory"?ye(X):ae({type:"select",path:X.path}),children:[X.name,X.loading?"\u2026":""]}),me==="detailed"?xe(X):me==="compact"&&X.type==="file"?jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:X.mimeType??""}):null,jsxRuntime.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[jsxRuntime.jsx(ve,{size:"sm",tone:"muted","aria-label":d("renameItem",{name:X.name}),disabled:B||Y,onClick:()=>{L(X.path),I(X.path),W("rename");},children:jsxRuntime.jsx(lucideReact.Pencil,{size:12})}),jsxRuntime.jsx(ve,{size:"sm",tone:"muted","aria-label":d("downloadItem",{name:X.name}),disabled:B,onClick:()=>ae({type:"download",path:X.path,kind:X.type}),children:jsxRuntime.jsx(lucideReact.Download,{size:12})}),jsxRuntime.jsx(ve,{size:"sm",tone:"muted","aria-label":d("deleteItem",{name:X.name}),disabled:B||K,onClick:()=>ae({type:"delete",path:X.path,kind:X.type}),children:jsxRuntime.jsx(lucideReact.Trash2,{size:12})})]})]}),(P.has(X.path)||_)&&X.children?jsxRuntime.jsx("div",{className:"ml-3 border-l border-border pl-2",children:oe(X.children)}):null]},X.path))}),"tree"),se=x?.path??t.preview?.path??t.openFile?.path,Re=Q&&!x,Ie=!x&&!Re?t.preview:null,ze=t.diff,ce=ze?na(ze.original)>1024*1024||na(ze.modified)>1024*1024:false,U=r(()=>Re?t.diffStatus==="loading"?jsxRuntime.jsx("p",{role:"status",children:d("loadingDiff")}):t.diffStatus==="error"?jsxRuntime.jsx("p",{role:"alert",children:d(t.diffErrorCode==="declarative.runtimeFiles.diffTooLarge"?"diffTooLarge":"diffUnavailable")}):ce?jsxRuntime.jsx("p",{role:"status",children:d("diffTooLarge")}):!ze||ze.isBinary||!i?jsxRuntime.jsx("p",{role:"status",children:d("diffUnavailable")}):i({...ze,readOnly:true}):Ie?Ie.kind==="binary"?jsxRuntime.jsx("p",{role:"status",children:d("binaryUnavailable")}):Ie.kind==="too-large"?jsxRuntime.jsx("p",{role:"status",children:d("tooLarge")}):Ie.kind==="image"?a?a(Ie):jsxRuntime.jsx(qd,{kind:"image",src:Ie.src,alt:Ie.alt??Ie.path,empty:d("imageUnavailable"),error:d("imageUnavailable")}):null:D?jsxRuntime.jsx("div",{role:"status",children:d("tooLarge")}):x?n?n({path:x.path,value:x.value,language:x.language,readOnly:B||K||C,onChange:le,onSave:A}):jsxRuntime.jsx(Rr,{"aria-label":x.path,value:x.value,readOnly:B||K||C,onChange:z=>le(z.currentTarget.value),onKeyDown:z=>{(z.ctrlKey||z.metaKey)&&z.key.toLowerCase()==="s"&&(z.preventDefault(),A());}}):jsxRuntime.jsx("div",{className:"flex min-h-64 items-center justify-center p-6 text-sm text-muted-foreground",children:d("empty")}),"renderContent");return jsxRuntime.jsxs("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden rounded-md border border-border bg-background","data-monkeys-component":"runtime-file-explorer","data-view-mode":me,children:[jsxRuntime.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b border-border p-3",children:[t.viewMode!==void 0?jsxRuntime.jsxs(po,{"aria-label":d("viewMode"),value:t.viewMode,disabled:B,onChange:z=>{let X=z.currentTarget.value;(X==="simple"||X==="compact"||X==="detailed")&&ae({type:"view-mode",value:X});},children:[jsxRuntime.jsx("option",{value:"simple",children:d("simple")}),jsxRuntime.jsx("option",{value:"compact",children:d("compact")}),jsxRuntime.jsx("option",{value:"detailed",children:d("detailed")})]}):null,t.search!==void 0?jsxRuntime.jsxs("form",{className:"flex min-w-0 flex-1 items-center gap-2",onSubmit:z=>{z.preventDefault(),ae({type:"search",value:f});},children:[jsxRuntime.jsx(to,{className:"min-w-0 flex-1","aria-label":d("searchFiles"),value:f,disabled:B,onChange:z=>b(z.currentTarget.value)}),jsxRuntime.jsx(ve,{type:"submit",disabled:B,children:d("search")})]}):null]}),v?jsxRuntime.jsx("p",{className:"p-3 text-sm text-destructive-text",role:"alert",children:d("tooManyExpanded")}):null,t.errorCode?jsxRuntime.jsx("p",{className:"p-3 text-sm text-destructive-text",role:"alert",children:d("operationFailed")}):null,jsxRuntime.jsxs("div",{className:me==="detailed"?"grid min-h-0 flex-1 grid-cols-1":"grid min-h-0 flex-1 grid-cols-1 md:grid-cols-[minmax(16rem,24rem)_minmax(0,1fr)]",children:[jsxRuntime.jsxs("nav",{className:me==="detailed"?"max-h-80 min-w-0 overflow-auto border-b border-border p-2":"max-h-80 min-w-0 overflow-auto border-b border-border p-2 md:max-h-none md:border-b-0 md:border-r","aria-label":d("files"),children:[me==="detailed"?jsxRuntime.jsx("div",{className:"grid min-w-[44rem] grid-cols-[minmax(10rem,1fr)_6rem_10rem_6rem_8rem_auto] gap-2 text-xs text-muted-foreground",children:["name","size","modified","permissions","type","actions"].map(z=>jsxRuntime.jsx("span",{children:d(z)},z))}):null,fe.length?oe(fe):jsxRuntime.jsx("p",{className:"p-3 text-sm text-muted-foreground",children:d("emptyTree")})]}),jsxRuntime.jsxs("div",{className:"flex min-h-0 min-w-0 flex-col",children:[jsxRuntime.jsxs("div",{className:"flex flex-wrap items-center gap-1 border-b border-border p-2",role:"toolbar","aria-label":d("actions"),children:[jsxRuntime.jsx(ve,{disabled:B,onClick:()=>ae({type:"refresh"}),children:d("refresh")}),jsxRuntime.jsx(ve,{disabled:B,onClick:()=>ae({type:"sourcecontrol"}),children:d("sourceControl")}),jsxRuntime.jsx(ve,{disabled:B,onClick:()=>{W("create"),I("");},children:d("create")}),jsxRuntime.jsx(ve,{disabled:B||!x||K||Y,onClick:()=>{L(x?.path??""),W("rename"),I(x?.path??"");},children:d("rename")}),jsxRuntime.jsx(ve,{disabled:B||!x||K,onClick:()=>x&&ae({type:"delete",path:x.path,kind:"file"}),children:d("delete")}),jsxRuntime.jsx(ve,{disabled:B||!se,onClick:()=>se&&ae({type:"download",path:se,kind:"file"}),children:d("download")}),jsxRuntime.jsx(ve,{disabled:B||!se,onClick:()=>se&&ae({type:"open-diff",path:se}),children:d("diff")}),jsxRuntime.jsx(ve,{disabled:B||!Y||!x||K||C||D,onClick:A,children:d("save")})]}),R?jsxRuntime.jsxs("form",{className:"flex flex-wrap items-center gap-2 border-b border-border p-3",onSubmit:async z=>{if(z.preventDefault(),!(B||!S.trim()||R==="rename"&&(K||Y)))try{R==="rename"?await te({type:"rename",path:H,newPath:S.trim()}):await te({type:"create",path:S.trim(),kind:F}),W(null);}catch{}},children:[R==="create"?jsxRuntime.jsxs(po,{"aria-label":d("kind"),value:F,disabled:B,onChange:z=>$(z.currentTarget.value==="directory"?"directory":"file"),children:[jsxRuntime.jsx("option",{value:"file",children:d("file")}),jsxRuntime.jsx("option",{value:"directory",children:d("directory")})]}):null,jsxRuntime.jsx(to,{"aria-label":d("path"),value:S,disabled:B,onChange:z=>I(z.currentTarget.value)}),jsxRuntime.jsx(ve,{type:"submit",disabled:B||!S.trim(),children:d("apply")}),jsxRuntime.jsx(ve,{type:"button",onClick:()=>W(null),children:d("cancel")})]}):null,C?jsxRuntime.jsxs("div",{role:"alert",children:[d("changedExternally"),jsxRuntime.jsx(ve,{disabled:B,onClick:()=>k(Q?{type:"open-diff",path:j}:{type:"select",path:t.preview?.path??t.openFile?.path??x?.path??""}),children:d("discardReload")})]}):null,jsxRuntime.jsx("div",{className:"min-h-80 min-w-0 flex-1 overflow-auto",children:U()})]})]}),h?jsxRuntime.jsx(Ta,{open:true,onOpenChange:z=>{!z&&!B&&k(null);},children:jsxRuntime.jsxs(mn,{onEscapeKeyDown:z=>{B&&z.preventDefault();},onPointerDownOutside:z=>{B&&z.preventDefault();},children:[jsxRuntime.jsx(br,{children:d("confirmAction")}),t.errorCode?jsxRuntime.jsx("p",{role:"alert",children:d("operationFailed")}):null,jsxRuntime.jsx(fr,{children:d(h.type==="delete"?"deleteConfirm":"discardConfirm")}),jsxRuntime.jsx(ve,{disabled:B||h.type==="delete"&&K,onClick:async()=>{if(!(B||h.type==="delete"&&K)){h.type==="open-diff"&&(G.current=`diff:${h.path}`,Q&&h.path===j&&(w(null),T(false),G.current=null)),h.type==="select"&&(G.current=h.path,t.preview?.path===h.path?(w(null),T(false),G.current=null):t.openFile?.path===h.path&&(w(Li(t.openFile)),T(false),G.current=null));try{await te(h),k(null);}catch{}}},children:d("confirm")}),jsxRuntime.jsx(ve,{disabled:B,onClick:()=>k(null),children:d("cancel")})]})}):null]})}r(vk,"RuntimeFileExplorerSession");var E=Object.freeze({numericSeries:Object.freeze({inspect:"monkeys.design.capability.numericSeries.inspect",noPoints:"monkeys.design.capability.numericSeries.noPoints",point:"monkeys.design.capability.numericSeries.point",label:"monkeys.design.capability.numericSeries.label",description:"monkeys.design.capability.numericSeries.description",start:"monkeys.design.capability.numericSeries.start",end:"monkeys.design.capability.numericSeries.end",reset:"monkeys.design.capability.numericSeries.reset",expand:"monkeys.design.capability.numericSeries.expand",close:"monkeys.design.capability.numericSeries.close"}),catalog:Object.freeze({shellLayout:Object.freeze({label:"monkeys.design.catalog.shellLayout.label",description:"monkeys.design.catalog.shellLayout.description"}),sidebarFilter:Object.freeze({label:"monkeys.design.catalog.sidebarFilter.label",description:"monkeys.design.catalog.sidebarFilter.description"}),ontologyNavigator:Object.freeze({label:"monkeys.design.catalog.ontologyNavigator.label",description:"monkeys.design.catalog.ontologyNavigator.description"}),dataToolbar:Object.freeze({label:"monkeys.design.catalog.dataToolbar.label",description:"monkeys.design.catalog.dataToolbar.description"}),ontologyTable:Object.freeze({label:"monkeys.design.catalog.ontologyTable.label",description:"monkeys.design.catalog.ontologyTable.description"}),cardGrid:Object.freeze({label:"monkeys.design.catalog.cardGrid.label",description:"monkeys.design.catalog.cardGrid.description"}),pagination:Object.freeze({label:"monkeys.design.catalog.pagination.label",description:"monkeys.design.catalog.pagination.description"}),recordDetail:Object.freeze({label:"monkeys.design.catalog.recordDetail.label",description:"monkeys.design.catalog.recordDetail.description"}),recordEditor:Object.freeze({label:"monkeys.design.catalog.recordEditor.label",description:"monkeys.design.catalog.recordEditor.description"}),recordHistory:Object.freeze({label:"monkeys.design.catalog.recordHistory.label",description:"monkeys.design.catalog.recordHistory.description"}),ontologyManagement:Object.freeze({label:"monkeys.design.catalog.ontologyManagement.label",description:"monkeys.design.catalog.ontologyManagement.description"}),featureColumnManager:Object.freeze({label:"monkeys.design.catalog.featureColumnManager.label",description:"monkeys.design.catalog.featureColumnManager.description"}),ontologyTrendMatrix:Object.freeze({label:"monkeys.design.catalog.ontologyTrendMatrix.label",description:"monkeys.design.catalog.ontologyTrendMatrix.description"}),dataContextBar:Object.freeze({label:"monkeys.design.catalog.dataContextBar.label",description:"monkeys.design.catalog.dataContextBar.description"}),gallery:Object.freeze({label:"monkeys.design.catalog.gallery.label",description:"monkeys.design.catalog.gallery.description"}),sectionHeader:Object.freeze({label:"monkeys.design.catalog.sectionHeader.label",description:"monkeys.design.catalog.sectionHeader.description"}),notice:Object.freeze({label:"monkeys.design.catalog.notice.label",description:"monkeys.design.catalog.notice.description"}),descriptionList:Object.freeze({label:"monkeys.design.catalog.descriptionList.label",description:"monkeys.design.catalog.descriptionList.description"}),contentPanel:Object.freeze({label:"monkeys.design.catalog.contentPanel.label",description:"monkeys.design.catalog.contentPanel.description"}),toolbar:Object.freeze({label:"monkeys.design.catalog.toolbar.label",description:"monkeys.design.catalog.toolbar.description"}),status:Object.freeze({label:"monkeys.design.catalog.status.label",description:"monkeys.design.catalog.status.description"}),viewLeaf:Object.freeze({label:"monkeys.design.catalog.viewLeaf.label",description:"monkeys.design.catalog.viewLeaf.description"})}),status:Object.freeze({loading:Object.freeze({title:"monkeys.design.capability.status.loading.title",description:"monkeys.design.capability.status.loading.description"}),empty:Object.freeze({title:"monkeys.design.capability.status.empty.title",description:"monkeys.design.capability.status.empty.description"}),error:Object.freeze({title:"monkeys.design.capability.status.error.title",description:"monkeys.design.capability.status.error.description"}),forbidden:Object.freeze({title:"monkeys.design.capability.status.forbidden.title",description:"monkeys.design.capability.status.forbidden.description"}),retry:"monkeys.design.capability.status.retry.label"}),shellLayout:Object.freeze({resizeSidebar:"monkeys.design.capability.shellLayout.resizeSidebar",collapseSidebar:"monkeys.design.capability.shellLayout.collapseSidebar",expandSidebar:"monkeys.design.capability.shellLayout.expandSidebar",resizeAside:"monkeys.design.capability.shellLayout.resizeAside"}),sidebarFilter:Object.freeze({title:"monkeys.design.capability.sidebarFilter.title",searchLabel:"monkeys.design.capability.sidebarFilter.search.label",searchPlaceholder:"monkeys.design.capability.sidebarFilter.search.placeholder",groupLabel:"monkeys.design.capability.sidebarFilter.group.label",optionLabel:"monkeys.design.capability.sidebarFilter.option.label"}),gallery:Object.freeze({itemTitle:"monkeys.design.capability.gallery.item.title",itemActivate:"monkeys.design.capability.gallery.item.activate",loadMore:"monkeys.design.capability.gallery.pagination.loadMore",loadingMore:"monkeys.design.capability.gallery.pagination.loadingMore"}),ontologyNavigator:Object.freeze({empty:"monkeys.design.capability.ontologyNavigator.empty",moreActions:"monkeys.design.capability.ontologyNavigator.moreActions",searchLabel:"monkeys.design.capability.ontologyNavigator.search.label",searchPlaceholder:"monkeys.design.capability.ontologyNavigator.search.placeholder",loadMore:"monkeys.design.capability.ontologyNavigator.loadMore",loadingMore:"monkeys.design.capability.ontologyNavigator.loadingMore"}),dataToolbar:Object.freeze({addRow:"monkeys.design.capability.dataToolbar.addRow",blankRowName:"monkeys.design.capability.dataToolbar.blankRowName",searchPlaceholder:"monkeys.design.capability.dataToolbar.search.placeholder",selection:"monkeys.design.capability.dataToolbar.selection",gallerySettings:"monkeys.design.capability.dataToolbar.gallerySettings",galleryPresentation:{visibleColumns:"monkeys.design.capability.dataToolbar.galleryPresentation.visibleColumns",coverField:"monkeys.design.capability.dataToolbar.galleryPresentation.coverField",autoDetect:"monkeys.design.capability.dataToolbar.galleryPresentation.autoDetect",cardDensity:"monkeys.design.capability.dataToolbar.galleryPresentation.cardDensity",cardColumns:"monkeys.design.capability.dataToolbar.galleryPresentation.cardColumns",detailColumns:"monkeys.design.capability.dataToolbar.galleryPresentation.detailColumns",fieldVisibility:"monkeys.design.capability.dataToolbar.galleryPresentation.fieldVisibility",fieldLimit:"monkeys.design.capability.dataToolbar.galleryPresentation.fieldLimit",fieldLimitHint:"monkeys.design.capability.dataToolbar.galleryPresentation.fieldLimitHint",layout:"monkeys.design.capability.dataToolbar.galleryPresentation.layout",compact:"monkeys.design.capability.dataToolbar.galleryPresentation.compact",comfortable:"monkeys.design.capability.dataToolbar.galleryPresentation.comfortable",detailed:"monkeys.design.capability.dataToolbar.galleryPresentation.detailed",autoColumns:"monkeys.design.capability.dataToolbar.galleryPresentation.autoColumns",columns:"monkeys.design.capability.dataToolbar.galleryPresentation.columns",bentoColumns:"monkeys.design.capability.dataToolbar.galleryPresentation.bentoColumns",topLimit:"monkeys.design.capability.dataToolbar.galleryPresentation.topLimit",allFields:"monkeys.design.capability.dataToolbar.galleryPresentation.allFields",adaptiveGrid:"monkeys.design.capability.dataToolbar.galleryPresentation.adaptiveGrid",masonry:"monkeys.design.capability.dataToolbar.galleryPresentation.masonry",rail:"monkeys.design.capability.dataToolbar.galleryPresentation.rail"}}),ontologyTable:Object.freeze({label:"monkeys.design.capability.ontologyTable.label",empty:"monkeys.design.capability.ontologyTable.empty",activate:"monkeys.design.capability.ontologyTable.activate",select:"monkeys.design.capability.ontologyTable.select",sort:"monkeys.design.capability.ontologyTable.sort",loadMore:"monkeys.design.capability.ontologyTable.loadMore",loadingMore:"monkeys.design.capability.ontologyTable.loadingMore"}),cardGrid:Object.freeze({empty:"monkeys.design.capability.cardGrid.empty",activate:"monkeys.design.capability.cardGrid.activate",select:"monkeys.design.capability.cardGrid.select",loadMore:"monkeys.design.capability.cardGrid.loadMore",loadingMore:"monkeys.design.capability.cardGrid.loadingMore"}),pagination:Object.freeze({label:"monkeys.design.capability.pagination.label",loadMore:"monkeys.design.capability.pagination.loadMore",loadingMore:"monkeys.design.capability.pagination.loadingMore"}),recordDetail:Object.freeze({edit:"monkeys.design.capability.recordDetail.edit",close:"monkeys.design.capability.recordDetail.close",attachments:"monkeys.design.capability.recordDetail.attachments",previous:"monkeys.design.capability.recordDetail.previous",next:"monkeys.design.capability.recordDetail.next"}),recordEditor:Object.freeze({submit:"monkeys.design.capability.recordEditor.submit",cancel:"monkeys.design.capability.recordEditor.cancel",mapping:Object.freeze({targets:"monkeys.design.capability.recordEditor.mapping.targets",sources:"monkeys.design.capability.recordEditor.mapping.sources",actions:"monkeys.design.capability.recordEditor.mapping.actions",addTarget:"monkeys.design.capability.recordEditor.mapping.addTarget",removeTarget:"monkeys.design.capability.recordEditor.mapping.removeTarget",addSource:"monkeys.design.capability.recordEditor.mapping.addSource",removeSource:"monkeys.design.capability.recordEditor.mapping.removeSource",search:"monkeys.design.capability.recordEditor.mapping.search",emptyTargets:"monkeys.design.capability.recordEditor.mapping.emptyTargets",emptySources:"monkeys.design.capability.recordEditor.mapping.emptySources"}),optionsEmpty:"monkeys.design.capability.recordEditor.options.empty",optionsLoadMore:"monkeys.design.capability.recordEditor.options.loadMore",optionsLoadingMore:"monkeys.design.capability.recordEditor.options.loadingMore",jsonInvalid:"monkeys.design.capability.recordEditor.json.invalid"}),recordHistory:Object.freeze({title:"monkeys.design.capability.recordHistory.title",close:"monkeys.design.capability.recordHistory.close",commits:"monkeys.design.capability.recordHistory.commits",loadMore:"monkeys.design.capability.recordHistory.loadMore",loadingMore:"monkeys.design.capability.recordHistory.loadingMore",selected:"monkeys.design.capability.recordHistory.selected",diff:"monkeys.design.capability.recordHistory.diff",field:"monkeys.design.capability.recordHistory.diff.field",before:"monkeys.design.capability.recordHistory.diff.before",after:"monkeys.design.capability.recordHistory.diff.after",noDiff:"monkeys.design.capability.recordHistory.diff.empty",reason:"monkeys.design.capability.recordHistory.reason",reasonDescription:"monkeys.design.capability.recordHistory.reason.description",rollback:"monkeys.design.capability.recordHistory.rollback",delete:"monkeys.design.capability.recordHistory.delete"}),ontologyManagement:Object.freeze({title:"monkeys.design.capability.ontologyManagement.title",markerDescription:"monkeys.design.capability.ontologyManagement.markerDescription",create:"monkeys.design.capability.ontologyManagement.create",edit:"monkeys.design.capability.ontologyManagement.edit",delete:"monkeys.design.capability.ontologyManagement.delete",import:"monkeys.design.capability.ontologyManagement.import",description:"monkeys.design.capability.ontologyManagement.description",submit:"monkeys.design.capability.ontologyManagement.submit",cancel:"monkeys.design.capability.ontologyManagement.cancel",displayName:"monkeys.design.capability.ontologyManagement.field.displayName",label:"monkeys.design.capability.ontologyManagement.field.label",templateKey:"monkeys.design.capability.ontologyManagement.field.templateKey",templateName:"monkeys.design.capability.ontologyManagement.field.templateName",templateDescription:"monkeys.design.capability.ontologyManagement.field.templateDescription",templateTags:"monkeys.design.capability.ontologyManagement.field.templateTags",templateTagsDescription:"monkeys.design.capability.ontologyManagement.field.templateTagsDescription",creatorCurrentUser:"monkeys.design.capability.ontologyManagement.field.creatorCurrentUser",creatorCurrentUserShort:"monkeys.design.capability.ontologyManagement.field.creatorCurrentUserShort",defaultViewTemplatesDescription:"monkeys.design.capability.ontologyManagement.field.defaultViewTemplatesDescription",defaultViewTemplate:"monkeys.design.capability.ontologyManagement.field.defaultViewTemplate",defaultSelectedView:"monkeys.design.capability.ontologyManagement.field.defaultSelectedView",tagFilterEnabled:"monkeys.design.capability.ontologyManagement.field.tagFilterEnabled",tagFilterEmpty:"monkeys.design.capability.ontologyManagement.field.tagFilterEmpty",tableColumnsSummary:"monkeys.design.capability.ontologyManagement.field.tableColumnsSummary",editTemplateDetails:"monkeys.design.capability.ontologyManagement.field.editTemplateDetails",editTemplateDetailsDescription:"monkeys.design.capability.ontologyManagement.field.editTemplateDetailsDescription",filterInclude:"monkeys.design.capability.ontologyManagement.filter.include",filterAny:"monkeys.design.capability.ontologyManagement.filter.any",filterExclude:"monkeys.design.capability.ontologyManagement.filter.exclude",filterNoTags:"monkeys.design.capability.ontologyManagement.filter.noTags",filterSearch:"monkeys.design.capability.ontologyManagement.filter.search",filterTagGroup:"monkeys.design.capability.ontologyManagement.filter.tagGroup",filterAllGroups:"monkeys.design.capability.ontologyManagement.filter.allGroups",filterAddOrGroup:"monkeys.design.capability.ontologyManagement.filter.addOrGroup",filterNoOrGroups:"monkeys.design.capability.ontologyManagement.filter.noOrGroups",filterOrGroup:"monkeys.design.capability.ontologyManagement.filter.orGroup",filterDeleteGroup:"monkeys.design.capability.ontologyManagement.filter.deleteGroup",filterSupplement:"monkeys.design.capability.ontologyManagement.filter.supplement",filterConfigureSupplement:"monkeys.design.capability.ontologyManagement.filter.configureSupplement",filterClearSupplement:"monkeys.design.capability.ontologyManagement.filter.clearSupplement",filterSupplementMode:"monkeys.design.capability.ontologyManagement.filter.supplementMode",filterModeOr:"monkeys.design.capability.ontologyManagement.filter.modeOr",filterModeAnd:"monkeys.design.capability.ontologyManagement.filter.modeAnd",filterModeCombination:"monkeys.design.capability.ontologyManagement.filter.modeCombination",filterRequiredAll:"monkeys.design.capability.ontologyManagement.filter.requiredAll",filterRequiredAny:"monkeys.design.capability.ontologyManagement.filter.requiredAny",filterAdvancedRules:"monkeys.design.capability.ontologyManagement.filter.advancedRules",filterAdvancedRulesDescription:"monkeys.design.capability.ontologyManagement.filter.advancedRulesDescription",filterRemoveAdvancedRules:"monkeys.design.capability.ontologyManagement.filter.removeAdvancedRules",defaultViewTemplates:"monkeys.design.capability.ontologyManagement.field.defaultViewTemplates",markerExists:"monkeys.design.capability.ontologyManagement.field.markerExists",targetOntology:"monkeys.design.capability.ontologyManagement.field.targetOntology",deleteTemplate:"monkeys.design.capability.ontologyManagement.action.deleteTemplate",deleteMarker:"monkeys.design.capability.ontologyManagement.action.deleteMarker",createDefaultViews:"monkeys.design.capability.ontologyManagement.action.createDefaultViews",techpackPreset:"monkeys.design.capability.ontologyManagement.action.techpackPreset",trendPreset:"monkeys.design.capability.ontologyManagement.action.trendPreset",addTemplate:"monkeys.design.capability.ontologyManagement.action.addTemplate",noTemplates:"monkeys.design.capability.ontologyManagement.empty.noTemplates",descriptionField:"monkeys.design.capability.ontologyManagement.field.description",bodyKind:"monkeys.design.capability.ontologyManagement.field.bodyKind",visible:"monkeys.design.capability.ontologyManagement.field.visible",kernelReadAllTeams:"monkeys.design.capability.ontologyManagement.field.kernelReadAllTeams",publicRead:"monkeys.design.capability.ontologyManagement.field.publicRead",publicWrite:"monkeys.design.capability.ontologyManagement.field.publicWrite",customizeViewModes:"monkeys.design.capability.ontologyManagement.field.customizeViewModes",availableViewModes:"monkeys.design.capability.ontologyManagement.field.availableViewModes",defaultViewMode:"monkeys.design.capability.ontologyManagement.field.defaultViewMode",viewModeTable:"monkeys.design.capability.ontologyManagement.field.viewMode.table",viewModeCard:"monkeys.design.capability.ontologyManagement.field.viewMode.card",viewModeGallery:"monkeys.design.capability.ontologyManagement.field.viewMode.gallery",viewModeTrendMatrix:"monkeys.design.capability.ontologyManagement.field.viewMode.trendMatrix",selectAtLeastOneViewMode:"monkeys.design.capability.ontologyManagement.field.validation.selectAtLeastOneViewMode",profile:"monkeys.design.capability.ontologyManagement.field.profile",sourceOntologyId:"monkeys.design.capability.ontologyManagement.field.sourceOntologyId",viewId:"monkeys.design.capability.ontologyManagement.field.viewId",name:"monkeys.design.capability.ontologyManagement.field.name",targetTeamId:"monkeys.design.capability.ontologyManagement.field.targetTeamId",currentTeamId:"monkeys.design.capability.ontologyManagement.field.currentTeamId",count:"monkeys.design.capability.ontologyManagement.field.count",blankRowLabel:"monkeys.design.capability.ontologyManagement.field.blankRowLabel",indexMode:"monkeys.design.capability.ontologyManagement.field.indexMode",parentId:"monkeys.design.capability.ontologyManagement.field.parentId",viewType:"monkeys.design.capability.ontologyManagement.field.viewType.label",viewTypeFilter:"monkeys.design.capability.ontologyManagement.field.viewType.filter",viewTypeContainer:"monkeys.design.capability.ontologyManagement.field.viewType.container",sourceContainerViewId:"monkeys.design.capability.ontologyManagement.field.sourceContainerViewId",displayConfig:"monkeys.design.capability.ontologyManagement.field.displayConfig",sort:"monkeys.design.capability.ontologyManagement.field.sort",managedFileId:"monkeys.design.capability.ontologyManagement.field.managedFileId",mode:"monkeys.design.capability.ontologyManagement.field.mode",columnId:"monkeys.design.capability.ontologyManagement.field.columnId",containerViewId:"monkeys.design.capability.ontologyManagement.field.containerViewId",type:"monkeys.design.capability.ontologyManagement.field.type",config:"monkeys.design.capability.ontologyManagement.field.config",scopeContainerViewId:"monkeys.design.capability.ontologyManagement.field.scopeContainerViewId",attached:"monkeys.design.capability.ontologyManagement.field.attached.label",attachedTrue:"monkeys.design.capability.ontologyManagement.field.attached.true",attachedFalse:"monkeys.design.capability.ontologyManagement.field.attached.false",pageSize:"monkeys.design.capability.ontologyManagement.field.pageSize",tagGroupIds:"monkeys.design.capability.ontologyManagement.field.tagGroupIds",featureColumnIds:"monkeys.design.capability.ontologyManagement.field.featureColumnIds",basicFieldIds:"monkeys.design.capability.ontologyManagement.field.basicFieldIds",columnType:"monkeys.design.capability.ontologyManagement.field.columnType.label",columnTypeFeature:"monkeys.design.capability.ontologyManagement.field.columnType.feature",columnTypePreview:"monkeys.design.capability.ontologyManagement.field.columnType.preview",featureColumnId:"monkeys.design.capability.ontologyManagement.field.featureColumnId",itemLimit:"monkeys.design.capability.ontologyManagement.field.itemLimit",shareOperation:"monkeys.design.capability.ontologyManagement.field.shareOperation.label",shareOperationUpsert:"monkeys.design.capability.ontologyManagement.field.shareOperation.upsert",shareOperationRevoke:"monkeys.design.capability.ontologyManagement.field.shareOperation.revoke",targetType:"monkeys.design.capability.ontologyManagement.field.targetType.label",targetTypeUser:"monkeys.design.capability.ontologyManagement.field.targetType.user",targetTypeTeam:"monkeys.design.capability.ontologyManagement.field.targetType.team",targetId:"monkeys.design.capability.ontologyManagement.field.targetId",permissions:"monkeys.design.capability.ontologyManagement.field.permissions",expiresAt:"monkeys.design.capability.ontologyManagement.field.expiresAt",actions:Object.freeze({"ontology-create":"monkeys.design.capability.ontologyManagement.action.ontologyCreate","ontology-update":"monkeys.design.capability.ontologyManagement.action.ontologyUpdate","ontology-delete":"monkeys.design.capability.ontologyManagement.action.ontologyDelete","ontology-marker":"monkeys.design.capability.ontologyManagement.action.ontologyMarker","ontology-default-views":"monkeys.design.capability.ontologyManagement.action.ontologyDefaultViews","ontology-snapshot":"monkeys.design.capability.ontologyManagement.action.ontologySnapshot","ontology-import-jsonl":"monkeys.design.capability.ontologyManagement.action.ontologyImportJsonl","ontology-import-records-jsonl":"monkeys.design.capability.ontologyManagement.action.ontologyImportRecordsJsonl","ontology-import-tag-relations-jsonl":"monkeys.design.capability.ontologyManagement.action.ontologyImportTagRelationsJsonl","ontology-import-text-column-jsonl":"monkeys.design.capability.ontologyManagement.action.ontologyImportTextColumnJsonl","ontology-import-json-column-jsonl":"monkeys.design.capability.ontologyManagement.action.ontologyImportJsonColumnJsonl","ontology-import-relation-column-jsonl":"monkeys.design.capability.ontologyManagement.action.ontologyImportRelationColumnJsonl","feature-column-create":"monkeys.design.capability.ontologyManagement.action.featureColumnCreate","feature-column-update":"monkeys.design.capability.ontologyManagement.action.featureColumnUpdate","feature-column-attachment-set":"monkeys.design.capability.ontologyManagement.action.featureColumnAttachmentSet","view-export-jsonl":"monkeys.design.capability.ontologyManagement.action.viewExportJsonl","feature-column-images-export":"monkeys.design.capability.ontologyManagement.action.featureColumnImagesExport","view-create":"monkeys.design.capability.ontologyManagement.action.viewCreate","view-detail":"monkeys.design.capability.ontologyManagement.action.viewDetail","view-convert-to-container":"monkeys.design.capability.ontologyManagement.action.viewConvertToContainer","view-edit-team":"monkeys.design.capability.ontologyManagement.action.viewEditTeam","view-insert-blank-rows":"monkeys.design.capability.ontologyManagement.action.viewInsertBlankRows","view-snapshot":"monkeys.design.capability.ontologyManagement.action.viewSnapshot","view-update":"monkeys.design.capability.ontologyManagement.action.viewUpdate","view-delete":"monkeys.design.capability.ontologyManagement.action.viewDelete","view-share":"monkeys.design.capability.ontologyManagement.action.viewShare"})}),ontologyTrendMatrix:Object.freeze({label:"monkeys.design.capability.ontologyTrendMatrix.label",row:"monkeys.design.capability.ontologyTrendMatrix.row",window:"monkeys.design.capability.ontologyTrendMatrix.window",select:"monkeys.design.capability.ontologyTrendMatrix.select"}),dataContextBar:Object.freeze({label:"monkeys.design.capability.dataContextBar.label",filter:"monkeys.design.capability.dataContextBar.filter",searchLabel:"monkeys.design.capability.dataContextBar.search.label",searchPlaceholder:"monkeys.design.capability.dataContextBar.search.placeholder",clear:"monkeys.design.capability.dataContextBar.clear",clearAll:"monkeys.design.capability.dataContextBar.clearAll",tagFilterClear:"monkeys.design.capability.dataContextBar.tagFilterClear",filterDescription:"monkeys.design.capability.dataContextBar.filterDescription",tagScope:"monkeys.design.capability.dataContextBar.tagScope",currentViewTags:"monkeys.design.capability.dataContextBar.currentViewTags",allTags:"monkeys.design.capability.dataContextBar.allTags",panelFilter:"monkeys.design.capability.dataContextBar.panelFilter",searchTags:"monkeys.design.capability.dataContextBar.searchTags",noAvailableTags:"monkeys.design.capability.dataContextBar.noAvailableTags",loadedAll:"monkeys.design.capability.dataContextBar.loadedAll",refreshTags:"monkeys.design.capability.dataContextBar.refreshTags",confirm:"monkeys.design.capability.dataContextBar.confirm",tagPanel:"monkeys.design.capability.dataContextBar.tagPanel",selectPanel:"monkeys.design.capability.dataContextBar.selectPanel",noPanels:"monkeys.design.capability.dataContextBar.noPanels",noPanelGroups:"monkeys.design.capability.dataContextBar.noPanelGroups",singleSelect:"monkeys.design.capability.dataContextBar.singleSelect",multiSelect:"monkeys.design.capability.dataContextBar.multiSelect",defaultGroup:"monkeys.design.capability.dataContextBar.defaultGroup",more:"monkeys.design.capability.dataContextBar.more",dashboardContext:"monkeys.design.capability.dataContextBar.dashboardContext",contextCount:"monkeys.design.capability.dataContextBar.contextCount",fields:Object.freeze({search:"monkeys.design.capability.dataContextBar.field.search",tagIds:"monkeys.design.capability.dataContextBar.field.tagIds",tagGroupIds:"monkeys.design.capability.dataContextBar.field.tagGroupIds",timeFrom:"monkeys.design.capability.dataContextBar.field.timeFrom",timeTo:"monkeys.design.capability.dataContextBar.field.timeTo",clickedField:"monkeys.design.capability.dataContextBar.field.clickedField",clickedValue:"monkeys.design.capability.dataContextBar.field.clickedValue",dashboardDrilldown:"monkeys.design.capability.dataContextBar.field.dashboardDrilldown"})})}),Ai=Object.freeze({"en-US":Object.freeze({"monkeys.design.capability.agentConversation.label":"Agent conversation","monkeys.design.capability.agentConversation.description":"Persistent conversation through an authenticated Agent runtime.","monkeys.design.capability.reportDocument.label":"Report document","monkeys.design.capability.reportDocument.description":"Read a projected report with managed media.",[E.ontologyManagement.markerDescription]:"Configure the ontology marker and default views.",[E.ontologyManagement.label]:"Marker name",[E.ontologyManagement.targetOntology]:"Target ontology",[E.ontologyManagement.templateKey]:"Template key",[E.ontologyManagement.templateName]:"View name",[E.ontologyManagement.templateDescription]:"View description",[E.ontologyManagement.templateTags]:"Tag filters",[E.ontologyManagement.templateTagsDescription]:"Choose the tags included, matched, or excluded by this view.",[E.ontologyManagement.creatorCurrentUser]:"Only show records created by the current user",[E.ontologyManagement.creatorCurrentUserShort]:"Current user",[E.ontologyManagement.defaultViewTemplatesDescription]:"Configure default views and their filters for this ontology.",[E.ontologyManagement.defaultViewTemplate]:"Default view template",[E.ontologyManagement.defaultSelectedView]:"Open by default",[E.ontologyManagement.tagFilterEnabled]:"Tag filters configured",[E.ontologyManagement.tagFilterEmpty]:"No tag filters",[E.ontologyManagement.tableColumnsSummary]:"{count} table columns configured",[E.ontologyManagement.editTemplateDetails]:"Edit view template",[E.ontologyManagement.editTemplateDetailsDescription]:"Configure the name, order, and filters.",[E.ontologyManagement.defaultViewTemplates]:"Default view templates",[E.ontologyManagement.markerExists]:"Ontology marker exists",[E.ontologyManagement.filterInclude]:"Include all",[E.ontologyManagement.filterAny]:"Match any",[E.ontologyManagement.filterExclude]:"Exclude",[E.ontologyManagement.filterNoTags]:"No matching tags",[E.ontologyManagement.filterSearch]:"Search tags",[E.ontologyManagement.filterTagGroup]:"Tag group",[E.ontologyManagement.filterAllGroups]:"All tag groups",[E.ontologyManagement.filterAddOrGroup]:"Add OR group",[E.ontologyManagement.filterNoOrGroups]:"No OR groups",[E.ontologyManagement.filterOrGroup]:"OR group {n}",[E.ontologyManagement.filterDeleteGroup]:"Delete group",[E.ontologyManagement.filterSupplement]:"Supplement rules for {name}",[E.ontologyManagement.filterConfigureSupplement]:"Configure supplement rules",[E.ontologyManagement.filterClearSupplement]:"Clear supplement rules",[E.ontologyManagement.filterSupplementMode]:"Match mode",[E.ontologyManagement.filterModeOr]:"Any condition (OR)",[E.ontologyManagement.filterModeAnd]:"All conditions (AND)",[E.ontologyManagement.filterModeCombination]:"Combined conditions",[E.ontologyManagement.filterRequiredAll]:"Require all tags",[E.ontologyManagement.filterRequiredAny]:"Require at least one tag",[E.ontologyManagement.filterAdvancedRules]:"{count} advanced rules",[E.ontologyManagement.filterAdvancedRulesDescription]:"Existing rules are preserved unless explicitly removed.",[E.ontologyManagement.filterRemoveAdvancedRules]:"Remove advanced rules",[E.ontologyManagement.deleteTemplate]:"Delete template",[E.ontologyManagement.deleteMarker]:"Delete marker",[E.ontologyManagement.createDefaultViews]:"Create default views",[E.ontologyManagement.addTemplate]:"Add view template",[E.ontologyManagement.noTemplates]:"No default view templates",[E.ontologyManagement.actions["ontology-marker"]]:"Set ontology marker",[E.ontologyManagement.actions["view-detail"]]:"View details",[E.ontologyManagement.actions["view-convert-to-container"]]:"Convert to enhanced view",[E.ontologyManagement.actions["view-edit-team"]]:"Edit view team",[E.ontologyManagement.actions["view-insert-blank-rows"]]:"Insert blank rows",[E.ontologyManagement.actions["view-snapshot"]]:"Import to new Ontology",[E.ontologyManagement.targetTeamId]:"Target team ID",[E.ontologyManagement.currentTeamId]:"Current team ID",[E.ontologyManagement.count]:"Row count",[E.ontologyManagement.blankRowLabel]:"Blank row label","monkeys.design.capability.pagination.previous":"Previous page","monkeys.design.capability.pagination.next":"Next page","monkeys.design.iconPicker.confirm":"Confirm","monkeys.design.iconPicker.categories":"Categories","monkeys.design.iconPicker.icon":"Icon","monkeys.design.iconPicker.choose":"Choose an icon","monkeys.design.iconPicker.current":"Current icon","monkeys.design.iconPicker.reset":"Reset","monkeys.design.iconPicker.search":"Search icons","monkeys.design.iconPicker.category":"Category","monkeys.design.iconPicker.background":"Background color","monkeys.design.iconPicker.upload":"Upload icon","monkeys.design.iconPicker.uploadFailed":"Icon upload failed","monkeys.design.iconPicker.loading":"Loading icons","monkeys.design.iconPicker.retry":"Retry","monkeys.design.iconPicker.empty":"No matching icons","monkeys.design.iconPicker.close":"Close","monkeys.design.iconPicker.emoji":"Emoji","monkeys.design.iconPicker.catalogFailed":"Unable to load icons","monkeys.design.emojiPanel.loading":"Loading emoji","monkeys.design.emojiPanel.unavailable":"Unable to load emoji","monkeys.design.capability.choicePicker.label":"Choice picker","monkeys.design.capability.choicePicker.description":"Search and select a paginated collection.","monkeys.design.capability.runtimeTerminal.status":"Terminal","monkeys.design.capability.runtimeTerminal.waiting":"Connecting to terminal\u2026","monkeys.design.capability.recordEditor.add":"Add item","monkeys.design.capability.recordEditor.remove":"Remove item","monkeys.design.capability.recordEditor.moveUp":"Move up","monkeys.design.capability.recordEditor.moveDown":"Move down","monkeys.design.capability.recordEditor.reset":"Reset","monkeys.design.capability.imageUpload.sizeHint":"One image, up to {{size}} MB","monkeys.design.capability.imageUpload.title":"Click or drag an image here","monkeys.design.capability.imageUpload.hint":"Paste an image or image link","monkeys.design.capability.imageUpload.paste":"Paste from clipboard","monkeys.design.capability.imageUpload.replace":"Replace image","monkeys.design.capability.imageUpload.clipboardUnavailable":"Clipboard access is unavailable. Paste with your keyboard or choose a file.","monkeys.design.capability.imageUpload.clipboardEmpty":"No image or image link was found in the clipboard.","monkeys.design.capability.filePicker.label":"Choose file","monkeys.design.capability.mediaDraft.choose":"Add images","monkeys.design.capability.mediaDraft.hint":"Up to {count} images, {size} MB each. Uploaded when you save.","monkeys.design.capability.mediaDraft.replace":"Replace","monkeys.design.capability.mediaDraft.preview":"Preview image","monkeys.design.capability.mediaDraft.previewPrevious":"Previous image","monkeys.design.capability.mediaDraft.previewNext":"Next image","monkeys.design.capability.mediaDraft.count":"Too many images. Remove an image before adding more.","monkeys.design.capability.mediaDraft.type":"Choose image files.","monkeys.design.capability.mediaDraft.size":"An image is empty or exceeds the allowed size.","monkeys.design.capability.mediaDraft.failed":"Images could not be selected. Try again.","monkeys.design.capability.mediaDraft.unavailable":"Preview unavailable","monkeys.design.capability.mediaDraft.previous":"Move image earlier","monkeys.design.capability.mediaDraft.next":"Move image later","monkeys.design.capability.mediaDraft.remove":"Remove","monkeys.design.capability.filePicker.description":"Select a local file for a governed action.","monkeys.design.capability.filePicker.cancel":"Clear file","monkeys.design.capability.filePicker.tooLarge":"The file exceeds the allowed size.","monkeys.design.capability.filePicker.invalidType":"Choose a supported file type.","monkeys.design.capability.filePicker.registrationFailed":"The file could not be selected. Try again.","monkeys.design.capability.recordEditor.date.invalid":"Enter a valid date and time within the allowed range.","monkeys.design.capability.recordEditor.month.choose":"Choose year and month","monkeys.design.capability.recordEditor.month.previous":"Previous year or group of years","monkeys.design.capability.recordEditor.month.next":"Next year or group of years","monkeys.design.capability.recordEditor.month.clear":"Clear","monkeys.design.capability.recordEditor.clear":"Clear","monkeys.design.capability.recordEditor.notSet":"Not set","monkeys.design.capability.recordEditor.noOptions":"No matching options","monkeys.design.capability.recordEditor.pick":"Choose","monkeys.design.capability.recordEditor.selectionSummary":"Selected: {{count}}","monkeys.design.capability.recordEditor.sections":"Form sections","monkeys.design.capability.recordEditor.secretKeep":"Keep existing","monkeys.design.capability.recordEditor.treeReorderFailed":"Could not save the order. Reload the list and try again.","monkeys.design.capability.recordEditor.secretMode":"{field} update mode","monkeys.design.capability.recordEditor.secretReplace":"Replace","monkeys.design.capability.recordEditor.secretClear":"Clear","monkeys.design.capability.recordEditor.mapping.targets":"Targets","monkeys.design.capability.recordEditor.mapping.sources":"Sources","monkeys.design.capability.recordEditor.mapping.actions":"Mapping actions","monkeys.design.capability.recordEditor.mapping.addTarget":"Add target","monkeys.design.capability.recordEditor.mapping.removeTarget":"Remove target","monkeys.design.capability.recordEditor.mapping.addSource":"Add source","monkeys.design.capability.recordEditor.mapping.removeSource":"Remove source","monkeys.design.capability.recordEditor.mapping.search":"Search sources","monkeys.design.capability.recordEditor.mapping.emptyTargets":"No targets","monkeys.design.capability.recordEditor.mapping.emptySources":"No sources assigned","monkeys.design.capability.recordEditor.mapping.groupCount":"{count} grouped targets","monkeys.design.capability.recordEditor.mapping.memberCount":"({count})","monkeys.design.capability.recordEditor.mapping.newTarget":"Enter target name","monkeys.design.capability.recordEditor.mapping.rename":"Target name","monkeys.design.capability.recordEditor.mapping.unnamed":"Unnamed target","monkeys.design.capability.recordEditor.mapping.incomplete":"Enter a name and assign at least one source before saving.","monkeys.design.capability.recordEditor.mapping.deleteConfirmation":"Delete \u201C{name}\u201D?","monkeys.design.capability.recordEditor.mapping.confirmDelete":"Delete","monkeys.design.capability.recordEditor.mapping.cancel":"Cancel","monkeys.design.capability.recordEditor.mapping.selectTarget":"Select a target on the left first","monkeys.design.capability.recordEditor.mapping.sourceTabs":"Source list","monkeys.design.capability.recordEditor.mapping.assigned":"Included ({count})","monkeys.design.capability.recordEditor.mapping.available":"Available ({count})","monkeys.design.capability.recordEditor.mapping.selectVisible":"Select current list","monkeys.design.capability.recordEditor.mapping.selected":"{count} selected","monkeys.design.capability.recordEditor.mapping.noMatches":"No matches","monkeys.design.capability.recordEditor.mapping.noAvailable":"No available sources","monkeys.design.capability.recordEditor.mapping.customSource":"Add custom source","monkeys.design.capability.recordEditor.mapping.addCustom":"Add custom source","monkeys.design.capability.recordEditor.mapping.add":"Add","monkeys.design.capability.recordEditor.mapping.addHint":"Add selected sources to this target","monkeys.design.capability.recordEditor.mapping.removeHint":"Remove selected sources from this target","monkeys.design.capability.recordEditor.mapping.currentTarget":"Current target: {name}","monkeys.design.capability.recordEditor.mapping.invalid":"The mapping is invalid.","monkeys.design.capability.recordEditor.mapping.invalidName":"Enter a valid name.","monkeys.design.capability.recordEditor.mapping.alreadyAssigned":"This source belongs to another target.","monkeys.design.capability.recordEditor.mapping.unavailable":"This source is unavailable.","monkeys.design.capability.recordEditor.mapping.added":"Added {count} sources to \u201C{name}\u201D","monkeys.design.capability.recordEditor.mapping.removed":"Removed {count} sources from \u201C{name}\u201D","monkeys.design.capability.recordEditor.mapping.deleted":"Deleted \u201C{name}\u201D",[E.numericSeries.inspect]:"Inspect observation","monkeys.design.capability.summaryChart.label":"Summary chart","monkeys.design.capability.dataToolbar.moreActions":"More actions","monkeys.design.capability.summaryChart.description":"Compare numeric series and category totals.","monkeys.design.capability.sparkline.label":"Sparkline","monkeys.design.capability.sparkline.description":"Show a compact, axis-free trend inside dense surfaces such as metric tiles.",[E.numericSeries.noPoints]:"No observations in this range",[E.numericSeries.point]:"{xLabel} {x}, {yLabel} {y}",[E.numericSeries.label]:"Numeric series",[E.numericSeries.description]:"Inspect numeric observations with range zoom and expansion.",[E.numericSeries.start]:"Range start",[E.numericSeries.end]:"Range end",[E.numericSeries.reset]:"Reset range",[E.numericSeries.expand]:"Expand chart",[E.numericSeries.close]:"Close chart",[E.shellLayout.resizeSidebar]:"Resize sidebar",[E.shellLayout.collapseSidebar]:"Collapse sidebar",[E.shellLayout.expandSidebar]:"Expand sidebar",[E.shellLayout.resizeAside]:"Resize detail panel",[E.ontologyNavigator.moreActions]:"More actions",[E.dataToolbar.addRow]:"Add row",[E.dataToolbar.blankRowName]:"Blank Row",[E.ontologyTrendMatrix.label]:"Ontology trend matrix",[E.ontologyTrendMatrix.row]:"Row",[E.ontologyTrendMatrix.window]:"Visible rows {start}-{end} of {total}",[E.ontologyTrendMatrix.select]:"Select {row}, {column}, {value}",[E.dataContextBar.label]:"Data filters and drilldown context",[E.dataContextBar.filter]:"Filters",[E.dataContextBar.searchLabel]:"Search data",[E.dataContextBar.searchPlaceholder]:"Search",[E.dataContextBar.clear]:"Clear",[E.dataContextBar.clearAll]:"Clear all",[E.dataContextBar.tagFilterClear]:"Clear",[E.dataContextBar.filterDescription]:"Filter assets by selecting tags via tag panel or manual search.",[E.dataContextBar.tagScope]:"Tag scope",[E.dataContextBar.currentViewTags]:"Current view",[E.dataContextBar.allTags]:"All tags",[E.dataContextBar.panelFilter]:"Panel filter",[E.dataContextBar.searchTags]:"Search tags",[E.dataContextBar.noAvailableTags]:"No available tags",[E.dataContextBar.loadedAll]:"All loaded",[E.dataContextBar.refreshTags]:"Refresh tags",[E.dataContextBar.confirm]:"Confirm",[E.dataContextBar.tagPanel]:"Tag panel",[E.dataContextBar.selectPanel]:"Select a panel",[E.dataContextBar.noPanels]:"No available panels",[E.dataContextBar.noPanelGroups]:"No tag groups in this panel",[E.dataContextBar.singleSelect]:"Single select",[E.dataContextBar.multiSelect]:"Multi select",[E.dataContextBar.defaultGroup]:"Default group",[E.dataContextBar.more]:"+{count} more",[E.dataContextBar.dashboardContext]:"Dashboard context",[E.dataContextBar.contextCount]:"{count} context values",[E.dataContextBar.fields.search]:"Search",[E.dataContextBar.fields.tagIds]:"Tags",[E.dataContextBar.fields.tagGroupIds]:"Tag groups",[E.dataContextBar.fields.timeFrom]:"From",[E.dataContextBar.fields.timeTo]:"To",[E.dataContextBar.fields.clickedField]:"Drilldown field",[E.dataContextBar.fields.clickedValue]:"Drilldown value",[E.dataContextBar.fields.dashboardDrilldown]:"Dashboard drilldown"}),"zh-CN":Object.freeze({"monkeys.design.capability.agentConversation.label":"\u667A\u80FD\u4F53\u5BF9\u8BDD","monkeys.design.capability.agentConversation.description":"\u901A\u8FC7\u5DF2\u8BA4\u8BC1\u667A\u80FD\u4F53\u8FD0\u884C\u65F6\u8FDB\u884C\u6301\u4E45\u5316\u5BF9\u8BDD\u3002","monkeys.design.capability.reportDocument.label":"\u62A5\u544A\u6587\u6863","monkeys.design.capability.reportDocument.description":"\u9605\u8BFB\u5305\u542B\u6258\u7BA1\u5A92\u4F53\u7684\u62A5\u544A\u6295\u5F71\u3002",[E.ontologyManagement.markerDescription]:"\u914D\u7F6E\u4ED3\u5E93\u6807\u8BB0\u548C\u9ED8\u8BA4\u89C6\u56FE\u3002",[E.ontologyManagement.label]:"\u6807\u8BB0\u540D\u79F0",[E.ontologyManagement.targetOntology]:"\u76EE\u6807\u4ED3\u5E93",[E.ontologyManagement.templateKey]:"\u6A21\u677F\u6807\u8BC6",[E.ontologyManagement.templateName]:"\u89C6\u56FE\u540D\u79F0",[E.ontologyManagement.templateDescription]:"\u89C6\u56FE\u63CF\u8FF0",[E.ontologyManagement.templateTags]:"\u6807\u7B7E\u7B5B\u9009",[E.ontologyManagement.templateTagsDescription]:"\u8BBE\u7F6E\u8BE5\u89C6\u56FE\u5305\u542B\u3001\u5339\u914D\u6216\u6392\u9664\u7684\u6807\u7B7E\u3002",[E.ontologyManagement.creatorCurrentUser]:"\u4EC5\u663E\u793A\u5F53\u524D\u7528\u6237\u521B\u5EFA\u7684\u6570\u636E",[E.ontologyManagement.creatorCurrentUserShort]:"\u5F53\u524D\u7528\u6237",[E.ontologyManagement.defaultViewTemplatesDescription]:"\u4E3A\u4ED3\u5E93\u914D\u7F6E\u9ED8\u8BA4\u89C6\u56FE\u53CA\u5176\u7B5B\u9009\u6761\u4EF6\u3002",[E.ontologyManagement.defaultViewTemplate]:"\u9ED8\u8BA4\u89C6\u56FE\u6A21\u677F",[E.ontologyManagement.defaultSelectedView]:"\u9ED8\u8BA4\u6253\u5F00",[E.ontologyManagement.tagFilterEnabled]:"\u5DF2\u914D\u7F6E\u6807\u7B7E\u7B5B\u9009",[E.ontologyManagement.tagFilterEmpty]:"\u672A\u914D\u7F6E\u6807\u7B7E\u7B5B\u9009",[E.ontologyManagement.tableColumnsSummary]:"\u5DF2\u914D\u7F6E {count} \u4E2A\u8868\u683C\u5217",[E.ontologyManagement.editTemplateDetails]:"\u7F16\u8F91\u89C6\u56FE\u6A21\u677F",[E.ontologyManagement.editTemplateDetailsDescription]:"\u914D\u7F6E\u540D\u79F0\u3001\u6392\u5E8F\u548C\u7B5B\u9009\u6761\u4EF6\u3002",[E.ontologyManagement.defaultViewTemplates]:"\u9ED8\u8BA4\u89C6\u56FE\u6A21\u677F",[E.ontologyManagement.markerExists]:"\u5DF2\u6709\u4ED3\u5E93\u6807\u8BB0",[E.ontologyManagement.filterInclude]:"\u5168\u90E8\u5305\u542B",[E.ontologyManagement.filterAny]:"\u5339\u914D\u4EFB\u610F",[E.ontologyManagement.filterExclude]:"\u6392\u9664",[E.ontologyManagement.filterNoTags]:"\u6CA1\u6709\u5339\u914D\u7684\u6807\u7B7E",[E.ontologyManagement.filterSearch]:"\u641C\u7D22\u6807\u7B7E",[E.ontologyManagement.filterTagGroup]:"\u6807\u7B7E\u7EC4",[E.ontologyManagement.filterAllGroups]:"\u5168\u90E8\u6807\u7B7E\u7EC4",[E.ontologyManagement.filterAddOrGroup]:"\u6DFB\u52A0\u6216\u6761\u4EF6\u7EC4",[E.ontologyManagement.filterNoOrGroups]:"\u6682\u65E0\u6216\u6761\u4EF6\u7EC4",[E.ontologyManagement.filterOrGroup]:"\u6216\u6761\u4EF6\u7EC4 {n}",[E.ontologyManagement.filterDeleteGroup]:"\u5220\u9664\u6761\u4EF6\u7EC4",[E.ontologyManagement.filterSupplement]:"{name} \u7684\u8865\u5145\u89C4\u5219",[E.ontologyManagement.filterConfigureSupplement]:"\u914D\u7F6E\u8865\u5145\u89C4\u5219",[E.ontologyManagement.filterClearSupplement]:"\u6E05\u9664\u8865\u5145\u89C4\u5219",[E.ontologyManagement.filterSupplementMode]:"\u5339\u914D\u65B9\u5F0F",[E.ontologyManagement.filterModeOr]:"\u4EFB\u610F\u6761\u4EF6\uFF08OR\uFF09",[E.ontologyManagement.filterModeAnd]:"\u5168\u90E8\u6761\u4EF6\uFF08AND\uFF09",[E.ontologyManagement.filterModeCombination]:"\u7EC4\u5408\u6761\u4EF6",[E.ontologyManagement.filterRequiredAll]:"\u5FC5\u987B\u5305\u542B\u5168\u90E8\u6807\u7B7E",[E.ontologyManagement.filterRequiredAny]:"\u81F3\u5C11\u5305\u542B\u4E00\u4E2A\u6807\u7B7E",[E.ontologyManagement.filterAdvancedRules]:"{count} \u9879\u9AD8\u7EA7\u89C4\u5219",[E.ontologyManagement.filterAdvancedRulesDescription]:"\u5DF2\u6709\u89C4\u5219\u5C06\u4FDD\u7559\uFF0C\u9664\u975E\u660E\u786E\u79FB\u9664\u3002",[E.ontologyManagement.filterRemoveAdvancedRules]:"\u79FB\u9664\u9AD8\u7EA7\u89C4\u5219",[E.ontologyManagement.deleteTemplate]:"\u5220\u9664\u6A21\u677F",[E.ontologyManagement.deleteMarker]:"\u5220\u9664\u4ED3\u5E93\u6807\u8BB0",[E.ontologyManagement.createDefaultViews]:"\u521B\u5EFA\u9ED8\u8BA4\u89C6\u56FE",[E.ontologyManagement.addTemplate]:"\u6DFB\u52A0\u89C6\u56FE\u6A21\u677F",[E.ontologyManagement.noTemplates]:"\u6682\u65E0\u9ED8\u8BA4\u89C6\u56FE\u6A21\u677F",[E.ontologyManagement.actions["ontology-marker"]]:"\u8BBE\u7F6E\u4ED3\u5E93\u6807\u8BB0",[E.ontologyManagement.actions["view-detail"]]:"\u67E5\u770B\u8BE6\u60C5",[E.ontologyManagement.actions["view-convert-to-container"]]:"\u8F6C\u5316\u4E3A\u589E\u5F3A\u89C6\u56FE",[E.ontologyManagement.actions["view-edit-team"]]:"\u4FEE\u6539\u89C6\u56FE\u56E2\u961F",[E.ontologyManagement.actions["view-insert-blank-rows"]]:"\u63D2\u5165\u7A7A\u767D\u884C",[E.ontologyManagement.actions["view-snapshot"]]:"\u5BFC\u5165\u5230\u65B0 Ontology",[E.ontologyManagement.targetTeamId]:"\u76EE\u6807\u56E2\u961F ID",[E.ontologyManagement.currentTeamId]:"\u5F53\u524D\u56E2\u961F ID",[E.ontologyManagement.count]:"\u884C\u6570",[E.ontologyManagement.blankRowLabel]:"\u7A7A\u767D\u884C\u540D\u79F0","monkeys.design.capability.pagination.previous":"\u4E0A\u4E00\u9875","monkeys.design.capability.pagination.next":"\u4E0B\u4E00\u9875","monkeys.design.iconPicker.confirm":"\u786E\u8BA4","monkeys.design.iconPicker.categories":"\u5206\u7C7B","monkeys.design.iconPicker.icon":"\u56FE\u6807","monkeys.design.iconPicker.choose":"\u9009\u62E9\u56FE\u6807","monkeys.design.iconPicker.current":"\u5F53\u524D\u56FE\u6807","monkeys.design.iconPicker.reset":"\u91CD\u7F6E","monkeys.design.iconPicker.search":"\u641C\u7D22\u56FE\u6807","monkeys.design.iconPicker.category":"\u5206\u7C7B","monkeys.design.iconPicker.background":"\u80CC\u666F\u989C\u8272","monkeys.design.iconPicker.upload":"\u4E0A\u4F20\u56FE\u6807","monkeys.design.iconPicker.uploadFailed":"\u56FE\u6807\u4E0A\u4F20\u5931\u8D25","monkeys.design.iconPicker.loading":"\u6B63\u5728\u52A0\u8F7D\u56FE\u6807","monkeys.design.iconPicker.retry":"\u91CD\u8BD5","monkeys.design.iconPicker.empty":"\u6CA1\u6709\u5339\u914D\u7684\u56FE\u6807","monkeys.design.iconPicker.close":"\u5173\u95ED","monkeys.design.iconPicker.emoji":"\u8868\u60C5","monkeys.design.iconPicker.catalogFailed":"\u65E0\u6CD5\u52A0\u8F7D\u56FE\u6807","monkeys.design.emojiPanel.loading":"\u6B63\u5728\u52A0\u8F7D\u8868\u60C5","monkeys.design.emojiPanel.unavailable":"\u65E0\u6CD5\u52A0\u8F7D\u8868\u60C5","monkeys.design.capability.choicePicker.label":"\u9009\u9879\u9009\u62E9\u5668","monkeys.design.capability.choicePicker.description":"\u641C\u7D22\u5E76\u9009\u62E9\u5206\u9875\u96C6\u5408\u4E2D\u7684\u9009\u9879\u3002","monkeys.design.capability.summaryChart.label":"\u6C47\u603B\u56FE\u8868","monkeys.design.capability.dataToolbar.moreActions":"\u66F4\u591A\u64CD\u4F5C","monkeys.design.capability.summaryChart.description":"\u6BD4\u8F83\u6570\u503C\u5E8F\u5217\u4E0E\u5206\u7C7B\u6C47\u603B\u3002","monkeys.design.capability.sparkline.label":"\u8FF7\u4F60\u8D8B\u52BF\u7EBF","monkeys.design.capability.sparkline.description":"\u5728\u6307\u6807\u5361\u7B49\u7D27\u51D1\u533A\u57DF\u5C55\u793A\u65E0\u5750\u6807\u8F74\u7684\u8FF7\u4F60\u8D8B\u52BF\u3002","monkeys.design.capability.runtimeTerminal.status":"\u7EC8\u7AEF","monkeys.design.capability.runtimeTerminal.waiting":"\u6B63\u5728\u8FDE\u63A5\u7EC8\u7AEF\u2026","monkeys.design.capability.recordEditor.add":"\u6DFB\u52A0\u6761\u76EE","monkeys.design.capability.recordEditor.remove":"\u5220\u9664\u6761\u76EE","monkeys.design.capability.recordEditor.moveUp":"\u4E0A\u79FB","monkeys.design.capability.recordEditor.moveDown":"\u4E0B\u79FB","monkeys.design.capability.recordEditor.reset":"\u91CD\u7F6E","monkeys.design.capability.imageUpload.sizeHint":"\u5355\u5F20\u56FE\u7247\uFF0C\u6700\u5927 {{size}} MB","monkeys.design.capability.imageUpload.title":"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247","monkeys.design.capability.imageUpload.hint":"\u652F\u6301\u7C98\u8D34\u56FE\u7247\u6216\u56FE\u7247\u94FE\u63A5","monkeys.design.capability.imageUpload.paste":"\u4ECE\u526A\u8D34\u677F\u7C98\u8D34","monkeys.design.capability.imageUpload.replace":"\u66FF\u6362\u56FE\u7247","monkeys.design.capability.imageUpload.clipboardUnavailable":"\u65E0\u6CD5\u8BFB\u53D6\u526A\u8D34\u677F\uFF0C\u8BF7\u4F7F\u7528\u952E\u76D8\u7C98\u8D34\u6216\u9009\u62E9\u6587\u4EF6\u3002","monkeys.design.capability.imageUpload.clipboardEmpty":"\u526A\u8D34\u677F\u4E2D\u6CA1\u6709\u56FE\u7247\u6216\u56FE\u7247\u94FE\u63A5\u3002","monkeys.design.capability.filePicker.label":"\u9009\u62E9\u6587\u4EF6","monkeys.design.capability.mediaDraft.choose":"\u6DFB\u52A0\u56FE\u7247","monkeys.design.capability.mediaDraft.hint":"\u6BCF\u5F20\u4E0D\u8D85\u8FC7 {size} MB\uFF0C\u6700\u591A {count} \u5F20\u3002\u70B9\u51FB\u300C\u4FDD\u5B58\u300D\u540E\u4E0A\u4F20\u3002","monkeys.design.capability.mediaDraft.replace":"\u66FF\u6362","monkeys.design.capability.mediaDraft.preview":"\u9884\u89C8\u56FE\u7247","monkeys.design.capability.mediaDraft.previewPrevious":"\u4E0A\u4E00\u5F20","monkeys.design.capability.mediaDraft.previewNext":"\u4E0B\u4E00\u5F20","monkeys.design.capability.mediaDraft.count":"\u56FE\u7247\u6570\u91CF\u8D85\u8FC7\u9650\u5236\uFF0C\u8BF7\u79FB\u9664\u540E\u518D\u6DFB\u52A0\u3002","monkeys.design.capability.mediaDraft.type":"\u8BF7\u9009\u62E9\u56FE\u7247\u6587\u4EF6\u3002","monkeys.design.capability.mediaDraft.size":"\u56FE\u7247\u4E3A\u7A7A\u6216\u5927\u5C0F\u8D85\u8FC7\u5141\u8BB8\u8303\u56F4\u3002","monkeys.design.capability.mediaDraft.failed":"\u65E0\u6CD5\u9009\u62E9\u56FE\u7247\uFF0C\u8BF7\u91CD\u8BD5\u3002","monkeys.design.capability.mediaDraft.unavailable":"\u6682\u65E0\u9884\u89C8","monkeys.design.capability.mediaDraft.previous":"\u524D\u79FB\u56FE\u7247","monkeys.design.capability.mediaDraft.next":"\u540E\u79FB\u56FE\u7247","monkeys.design.capability.mediaDraft.remove":"\u79FB\u9664","monkeys.design.capability.filePicker.description":"\u9009\u62E9\u672C\u5730\u6587\u4EF6\u4EE5\u6267\u884C\u53D7\u6CBB\u7406\u64CD\u4F5C\u3002","monkeys.design.capability.filePicker.cancel":"\u6E05\u9664\u6587\u4EF6","monkeys.design.capability.filePicker.tooLarge":"\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u5141\u8BB8\u8303\u56F4\u3002","monkeys.design.capability.filePicker.invalidType":"\u8BF7\u9009\u62E9\u652F\u6301\u7684\u6587\u4EF6\u7C7B\u578B\u3002","monkeys.design.capability.filePicker.registrationFailed":"\u65E0\u6CD5\u9009\u62E9\u8BE5\u6587\u4EF6\uFF0C\u8BF7\u91CD\u8BD5\u3002","monkeys.design.capability.recordEditor.date.invalid":"\u8BF7\u8F93\u5165\u5141\u8BB8\u8303\u56F4\u5185\u7684\u6709\u6548\u65E5\u671F\u548C\u65F6\u95F4\u3002","monkeys.design.capability.recordEditor.month.choose":"\u9009\u62E9\u5E74\u6708","monkeys.design.capability.recordEditor.month.previous":"\u4E0A\u4E00\u5E74\u6216\u4E0A\u4E00\u7EC4\u5E74\u4EFD","monkeys.design.capability.recordEditor.month.next":"\u4E0B\u4E00\u5E74\u6216\u4E0B\u4E00\u7EC4\u5E74\u4EFD","monkeys.design.capability.recordEditor.month.clear":"\u6E05\u9664","monkeys.design.capability.recordEditor.clear":"\u6E05\u9664","monkeys.design.capability.recordEditor.notSet":"\u672A\u8BBE\u7F6E","monkeys.design.capability.recordEditor.noOptions":"\u6682\u65E0\u5339\u914D\u9009\u9879","monkeys.design.capability.recordEditor.pick":"\u9009\u62E9","monkeys.design.capability.recordEditor.selectionSummary":"\u5DF2\u9009 {{count}} \u9879","monkeys.design.capability.recordEditor.sections":"\u8868\u5355\u5206\u7C7B","monkeys.design.capability.recordEditor.secretKeep":"\u4FDD\u7559\u73B0\u6709\u503C","monkeys.design.capability.recordEditor.treeReorderFailed":"\u987A\u5E8F\u4FDD\u5B58\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u52A0\u8F7D\u5217\u8868\u540E\u91CD\u8BD5\u3002","monkeys.design.capability.recordEditor.secretMode":"{field} \u66F4\u65B0\u65B9\u5F0F","monkeys.design.capability.recordEditor.secretReplace":"\u66FF\u6362","monkeys.design.capability.recordEditor.secretClear":"\u6E05\u9664","monkeys.design.capability.recordEditor.mapping.targets":"\u5F52\u5E76\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.sources":"\u539F\u59CB\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.actions":"\u5F52\u5E76\u64CD\u4F5C","monkeys.design.capability.recordEditor.mapping.addTarget":"\u65B0\u589E\u5F52\u5E76\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.removeTarget":"\u5220\u9664\u5F52\u5E76\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.addSource":"\u52A0\u5165\u5F53\u524D\u5F52\u5E76","monkeys.design.capability.recordEditor.mapping.removeSource":"\u79FB\u51FA\u5F53\u524D\u5F52\u5E76","monkeys.design.capability.recordEditor.mapping.search":"\u641C\u7D22\u539F\u59CB\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.emptyTargets":"\u6682\u65E0\u5F52\u5E76\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.emptySources":"\u5F53\u524D\u5F52\u5E76\u90E8\u95E8\u6682\u65E0\u539F\u59CB\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.groupCount":"\u5171 {count} \u4E2A\u5F52\u5E76\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.memberCount":"\uFF08{count} \u4E2A\uFF09","monkeys.design.capability.recordEditor.mapping.newTarget":"\u8F93\u5165\u5F52\u5E76\u90E8\u95E8\u540D\u79F0","monkeys.design.capability.recordEditor.mapping.rename":"\u5F52\u5E76\u90E8\u95E8\u540D\u79F0","monkeys.design.capability.recordEditor.mapping.unnamed":"\u672A\u547D\u540D\u5F52\u5E76\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.incomplete":"\u8BF7\u586B\u5199\u540D\u79F0\u5E76\u81F3\u5C11\u52A0\u5165\u4E00\u4E2A\u539F\u59CB\u90E8\u95E8\u540E\u4FDD\u5B58\u3002","monkeys.design.capability.recordEditor.mapping.deleteConfirmation":"\u786E\u5B9A\u5220\u9664\u201C{name}\u201D\u5417\uFF1F","monkeys.design.capability.recordEditor.mapping.confirmDelete":"\u786E\u8BA4\u5220\u9664","monkeys.design.capability.recordEditor.mapping.cancel":"\u53D6\u6D88","monkeys.design.capability.recordEditor.mapping.selectTarget":"\u8BF7\u5148\u9009\u62E9\u5DE6\u4FA7\u5F52\u5E76\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.sourceTabs":"\u539F\u59CB\u90E8\u95E8\u5217\u8868","monkeys.design.capability.recordEditor.mapping.assigned":"\u5DF2\u5305\u542B\uFF08{count}\uFF09","monkeys.design.capability.recordEditor.mapping.available":"\u53EF\u6DFB\u52A0\uFF08{count}\uFF09","monkeys.design.capability.recordEditor.mapping.selectVisible":"\u5168\u9009\u5F53\u524D\u5217\u8868","monkeys.design.capability.recordEditor.mapping.selected":"\u5DF2\u9009 {count} \u4E2A","monkeys.design.capability.recordEditor.mapping.noMatches":"\u6CA1\u6709\u5339\u914D\u7684\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.noAvailable":"\u6CA1\u6709\u53EF\u6DFB\u52A0\u7684\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.customSource":"\u6DFB\u52A0\u81EA\u5B9A\u4E49\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.addCustom":"\u6DFB\u52A0\u81EA\u5B9A\u4E49\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.add":"\u6DFB\u52A0","monkeys.design.capability.recordEditor.mapping.addHint":"\u5C06\u9009\u4E2D\u7684\u90E8\u95E8\u52A0\u5165\u5F53\u524D\u5F52\u5E76","monkeys.design.capability.recordEditor.mapping.removeHint":"\u5C06\u9009\u4E2D\u7684\u90E8\u95E8\u79FB\u51FA\u5F53\u524D\u5F52\u5E76","monkeys.design.capability.recordEditor.mapping.currentTarget":"\u5F53\u524D\u5F52\u5E76\uFF1A{name}","monkeys.design.capability.recordEditor.mapping.invalid":"\u5F52\u5E76\u914D\u7F6E\u65E0\u6548\uFF0C\u8BF7\u68C0\u67E5\u540D\u79F0\u548C\u90E8\u95E8\u5F52\u5C5E\u3002","monkeys.design.capability.recordEditor.mapping.invalidName":"\u8BF7\u8F93\u5165\u6709\u6548\u540D\u79F0\u3002","monkeys.design.capability.recordEditor.mapping.alreadyAssigned":"\u8BE5\u90E8\u95E8\u5DF2\u7ECF\u5F52\u5165\u5176\u4ED6\u5F52\u5E76\u90E8\u95E8\u3002","monkeys.design.capability.recordEditor.mapping.unavailable":"\u8BE5\u90E8\u95E8\u5F53\u524D\u4E0D\u53EF\u6DFB\u52A0\u3002","monkeys.design.capability.recordEditor.mapping.added":"\u5DF2\u5411\u201C{name}\u201D\u52A0\u5165 {count} \u4E2A\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.removed":"\u5DF2\u4ECE\u201C{name}\u201D\u79FB\u51FA {count} \u4E2A\u90E8\u95E8","monkeys.design.capability.recordEditor.mapping.deleted":"\u5DF2\u5220\u9664\u201C{name}\u201D",[E.numericSeries.inspect]:"\u67E5\u770B\u89C2\u6D4B\u70B9",[E.numericSeries.noPoints]:"\u6B64\u8303\u56F4\u5185\u6CA1\u6709\u89C2\u6D4B\u70B9",[E.numericSeries.point]:"{xLabel} {x}, {yLabel} {y}",[E.numericSeries.label]:"\u6570\u503C\u5E8F\u5217",[E.numericSeries.description]:"\u67E5\u770B\u6570\u503C\u89C2\u6D4B\uFF0C\u7F29\u653E\u8303\u56F4\u5E76\u653E\u5927\u56FE\u8868\u3002",[E.numericSeries.start]:"\u8303\u56F4\u8D77\u70B9",[E.numericSeries.end]:"\u8303\u56F4\u7EC8\u70B9",[E.numericSeries.reset]:"\u91CD\u7F6E\u8303\u56F4",[E.numericSeries.expand]:"\u653E\u5927\u56FE\u8868",[E.numericSeries.close]:"\u5173\u95ED\u56FE\u8868",[E.shellLayout.resizeSidebar]:"\u8C03\u6574\u4FA7\u8FB9\u680F\u5BBD\u5EA6",[E.shellLayout.collapseSidebar]:"\u6536\u8D77\u4FA7\u8FB9\u680F",[E.shellLayout.expandSidebar]:"\u5C55\u5F00\u4FA7\u8FB9\u680F",[E.shellLayout.resizeAside]:"\u8C03\u6574\u8BE6\u60C5\u4FA7\u8FB9\u680F\u5BBD\u5EA6",[E.ontologyNavigator.moreActions]:"\u66F4\u591A\u64CD\u4F5C",[E.dataToolbar.addRow]:"\u6DFB\u52A0\u4E00\u884C",[E.dataToolbar.blankRowName]:"\u7A7A\u767D\u884C",[E.ontologyTrendMatrix.label]:"\u672C\u4F53\u8D8B\u52BF\u77E9\u9635",[E.ontologyTrendMatrix.row]:"\u884C",[E.ontologyTrendMatrix.window]:"\u5F53\u524D\u663E\u793A\u7B2C {start}-{end} \u884C\uFF0C\u5171 {total} \u884C",[E.ontologyTrendMatrix.select]:"\u9009\u62E9 {row}\u3001{column}\u3001{value}",[E.dataContextBar.label]:"\u6570\u636E\u7B5B\u9009\u4E0E\u94BB\u53D6\u4E0A\u4E0B\u6587",[E.dataContextBar.filter]:"\u7B5B\u9009",[E.dataContextBar.searchLabel]:"\u641C\u7D22\u6570\u636E",[E.dataContextBar.searchPlaceholder]:"\u641C\u7D22",[E.dataContextBar.clear]:"\u6E05\u9664",[E.dataContextBar.clearAll]:"\u5168\u90E8\u6E05\u9664",[E.dataContextBar.tagFilterClear]:"\u6E05\u7A7A",[E.dataContextBar.filterDescription]:"\u901A\u8FC7\u6807\u7B7E\u9762\u677F\u6216\u624B\u52A8\u641C\u7D22\uFF0C\u9009\u62E9\u7528\u4E8E\u8FC7\u6EE4\u8D44\u4EA7\u7684 Tag\u3002",[E.dataContextBar.tagScope]:"\u6807\u7B7E\u8303\u56F4",[E.dataContextBar.currentViewTags]:"\u5F53\u524D\u89C6\u56FE",[E.dataContextBar.allTags]:"\u5168\u90E8\u6807\u7B7E",[E.dataContextBar.panelFilter]:"\u9762\u677F\u7B5B\u9009",[E.dataContextBar.searchTags]:"\u641C\u7D22\u6807\u7B7E",[E.dataContextBar.noAvailableTags]:"\u6682\u65E0\u53EF\u7528\u6807\u7B7E",[E.dataContextBar.loadedAll]:"\u5DF2\u52A0\u8F7D\u5168\u90E8",[E.dataContextBar.refreshTags]:"\u5237\u65B0\u6807\u7B7E",[E.dataContextBar.confirm]:"\u786E\u5B9A",[E.dataContextBar.tagPanel]:"\u6807\u7B7E\u9762\u677F",[E.dataContextBar.selectPanel]:"\u9009\u62E9\u6807\u7B7E\u9762\u677F",[E.dataContextBar.noPanels]:"\u6682\u65E0\u53EF\u7528\u6807\u7B7E\u9762\u677F",[E.dataContextBar.noPanelGroups]:"\u5F53\u524D\u9762\u677F\u6CA1\u6709\u6807\u7B7E\u7EC4",[E.dataContextBar.singleSelect]:"\u5355\u9009",[E.dataContextBar.multiSelect]:"\u591A\u9009",[E.dataContextBar.defaultGroup]:"\u9ED8\u8BA4\u6807\u7B7E\u7EC4",[E.dataContextBar.more]:"\u53E6\u6709 {count} \u9879",[E.dataContextBar.dashboardContext]:"\u4EEA\u8868\u76D8\u4E0A\u4E0B\u6587",[E.dataContextBar.contextCount]:"{count} \u9879\u4E0A\u4E0B\u6587",[E.dataContextBar.fields.search]:"\u641C\u7D22",[E.dataContextBar.fields.tagIds]:"\u6807\u7B7E",[E.dataContextBar.fields.tagGroupIds]:"\u6807\u7B7E\u7EC4",[E.dataContextBar.fields.timeFrom]:"\u5F00\u59CB\u65F6\u95F4",[E.dataContextBar.fields.timeTo]:"\u7ED3\u675F\u65F6\u95F4",[E.dataContextBar.fields.clickedField]:"\u94BB\u53D6\u5B57\u6BB5",[E.dataContextBar.fields.clickedValue]:"\u94BB\u53D6\u503C",[E.dataContextBar.fields.dashboardDrilldown]:"\u4EEA\u8868\u76D8\u94BB\u53D6"})});var mm={ar:r(()=>import('@emoji-mart/data/i18n/ar.json'),"ar"),be:r(()=>import('@emoji-mart/data/i18n/be.json'),"be"),cs:r(()=>import('@emoji-mart/data/i18n/cs.json'),"cs"),de:r(()=>import('@emoji-mart/data/i18n/de.json'),"de"),en:r(()=>import('@emoji-mart/data/i18n/en.json'),"en"),es:r(()=>import('@emoji-mart/data/i18n/es.json'),"es"),fa:r(()=>import('@emoji-mart/data/i18n/fa.json'),"fa"),fi:r(()=>import('@emoji-mart/data/i18n/fi.json'),"fi"),fr:r(()=>import('@emoji-mart/data/i18n/fr.json'),"fr"),hi:r(()=>import('@emoji-mart/data/i18n/hi.json'),"hi"),it:r(()=>import('@emoji-mart/data/i18n/it.json'),"it"),ja:r(()=>import('@emoji-mart/data/i18n/ja.json'),"ja"),ko:r(()=>import('@emoji-mart/data/i18n/ko.json'),"ko"),nl:r(()=>import('@emoji-mart/data/i18n/nl.json'),"nl"),pl:r(()=>import('@emoji-mart/data/i18n/pl.json'),"pl"),pt:r(()=>import('@emoji-mart/data/i18n/pt.json'),"pt"),ru:r(()=>import('@emoji-mart/data/i18n/ru.json'),"ru"),sa:r(()=>import('@emoji-mart/data/i18n/sa.json'),"sa"),tr:r(()=>import('@emoji-mart/data/i18n/tr.json'),"tr"),uk:r(()=>import('@emoji-mart/data/i18n/uk.json'),"uk"),vi:r(()=>import('@emoji-mart/data/i18n/vi.json'),"vi"),zh:r(()=>import('@emoji-mart/data/i18n/zh.json'),"zh")};function wk({language:e,disabled:t,onSelect:o}){let n=Ne(),[a,i]=lt.useState(0),[s,u]=lt.useState(false),[c,d]=lt.useState(),g=lt.useRef({disabled:t,onSelect:o});g.current={disabled:t,onSelect:o};let m=lt.useRef(true);lt.useEffect(()=>(m.current=true,()=>{m.current=false;}),[]),lt.useEffect(()=>{let b=false;return u(false),Promise.all([import('@emoji-mart/react'),import('@emoji-mart/data'),mm[e]()]).then(([v,y,x])=>{b||d({Picker:v.default,data:y.default,i18n:x.default});}).catch(()=>{b||u(true);}),()=>{b=true;}},[e,a]);let p=Ai[e==="zh"?"zh-CN":"en-US"];if(s)return jsxRuntime.jsxs("div",{role:"alert",className:"flex items-center gap-2 text-sm",children:[p["monkeys.design.emojiPanel.unavailable"],jsxRuntime.jsx(ve,{disabled:t,onClick:()=>i(b=>b+1),children:p["monkeys.design.iconPicker.retry"]})]});if(!c)return jsxRuntime.jsx("div",{role:"status",className:"text-sm text-muted-foreground",children:p["monkeys.design.emojiPanel.loading"]});let{Picker:f}=c;return jsxRuntime.jsx("fieldset",{"data-monkeys-component":"emoji-panel",disabled:t,"aria-disabled":t,className:"min-w-0 [&_em-emoji-picker]:h-80 [&_em-emoji-picker]:w-full [&_em-emoji-picker]:shadow-none",style:{pointerEvents:t?"none":void 0},children:jsxRuntime.jsx(f,{locale:e,data:c.data,i18n:c.i18n,theme:n["data-monkeys-theme-mode"]==="dark"?"dark":"light",dynamicWidth:true,maxFrequentRows:1,navPosition:"bottom",previewPosition:"none",onEmojiSelect:b=>{m.current&&!g.current.disabled&&b&&typeof b=="object"&&"native"in b&&typeof b.native=="string"&&b.native.length>0&&b.native.length<=64&&g.current.onSelect(b.native);}})})}r(wk,"LocalizedEmojiPanel");function pm({locale:e,disabled:t=false,onSelect:o}){let n=xt(),a=(e??n.locale).toLowerCase().split("-")[0],i=Object.prototype.hasOwnProperty.call(mm,a)?a:"en";return jsxRuntime.jsx(wk,{language:i,disabled:t,onSelect:o},i)}r(pm,"EmojiPanel");function Nl(e){if(!e||typeof e!="object"||!("locale"in e)||typeof e.locale!="string"||!("disabled"in e)||typeof e.disabled!="boolean"||!("onSelect"in e)||typeof e.onSelect!="function")throw new TypeError("Invalid emoji picker context.");let t=e.onSelect;return jsxRuntime.jsx(pm,{locale:e.locale,disabled:e.disabled,onSelect:o=>t(o)})}r(Nl,"renderIconPickerEmoji");var ra=5*1024*1024*1024;function gm(e,t){if(!t?.trim())return true;let o=e.name.toLowerCase(),n=e.type.toLowerCase();return t.split(",").some(a=>{let i=a.trim().toLowerCase();return /^\.[a-z0-9][a-z0-9._-]*$/.test(i)?o.endsWith(i):/^[a-z0-9!#$&^_.+-]+\/\*$/.test(i)?n.startsWith(i.slice(0,-1)):/^[a-z0-9!#$&^_.+-]+\/[a-z0-9!#$&^_.+-]+$/.test(i)&&n===i})}r(gm,"filePickerAccepts");function bm(e){if(!e||typeof e!="object"||Array.isArray(e))return;let t=e;if(!(Object.keys(t).length!==4||typeof t.handleId!="string"||t.handleId.length<1||t.handleId.length>256||typeof t.fileName!="string"||t.fileName.length<1||t.fileName.length>1024||typeof t.mimeType!="string"||t.mimeType.length>256||typeof t.size!="number"||!Number.isInteger(t.size)||t.size<0||t.size>ra))return {handleId:t.handleId,fileName:t.fileName,size:t.size,mimeType:t.mimeType}}r(bm,"readTransientFileMetadata");var ym=".png,.jpg,.jpeg,.webp,.svg";function Pk({compactActions:e=false,model:t,onIntent:o,renderEmojiPicker:n=Nl,transientFiles:a,translate:i,catalogSource:s}){let{locale:u}=xt(),c=s??(!t.icons.length&&!t.categories.length?runtime.defaultIconPickerCatalogSource:void 0),d=r(N=>{let D=i?.(N);return D&&D!==N?D:Ai[u.toLowerCase().startsWith("zh")?"zh-CN":"en-US"][N]??N},"translate"),[g,m]=lt.useState(),[p,f]=lt.useState("idle"),[b,v]=lt.useState(0);lt.useEffect(()=>{if(!c||!t.open||t.mode!=="icon"||g?.source===c)return;let N=new AbortController;return f("loading"),c.load(N.signal).then(D=>{N.signal.aborted||(m({source:c,value:D}),f("idle"));}).catch(()=>{N.signal.aborted||f("error");}),()=>N.abort()},[c,t.open,t.mode,b]);let y=c?{...t,...g?.source===c?g.value:{},loading:t.loading||p==="loading",errorCode:t.errorCode??(p==="error"?"monkeys.design.iconPicker.catalogFailed":void 0)}:t,x=lt.useRef(null),w=lt.useRef(null),[h,k]=lt.useState(false),C=r(()=>{let N=w.current;w.current=null,N?.registry.discard(N.handleId);},"release");lt.useEffect(()=>()=>C(),[a]),lt.useEffect(()=>{y.open||C();},[y.open]);let T=y.disabled===true||y.uploading===true,S=r(N=>{T||o(N);},"emit"),I=r(()=>{T||(C(),o({type:"open-change",open:false,mode:y.mode}));},"close"),R=y.value.kind==="emoji"?y.value.value:y.defaultValue.kind==="emoji"?y.defaultValue.value:"\u{1F340}",W=y.value.kind==="emoji"?y.value.backgroundColor:y.backgroundColors[0],H=r((N,D=W)=>{!N||N.length>64||S({type:"change",value:{kind:"emoji",value:N,...D?{backgroundColor:D}:{}}});},"chooseEmoji"),L=[...new Map(y.customIcons.map(N=>[N.id,N])).values()].slice(0,50),F=y.search.trim().toLowerCase(),$=y.categoryId==="custom-upload",M=($?L:y.icons).filter(N=>($||y.categoryId==="all"||N.categoryIds?.includes(y.categoryId))&&(!F||N.id.toLowerCase().includes(F)||N.tags?.some(D=>D.toLowerCase().includes(F)))),G=r(N=>{T||o({type:"open-change",open:y.open,mode:N});},"changeMode"),Y=r((N,D,B,K)=>e?jsxRuntime.jsx(xr,{content:d(N),portal:true,children:jsxRuntime.jsx(ve,{label:d(N),iconOnly:true,icon:D,disabled:T,"aria-pressed":K,active:K,onClick:B})}):jsxRuntime.jsx(ve,{type:"button",disabled:T,"aria-pressed":K,active:K,onClick:B,children:d(N)}),"action");return jsxRuntime.jsx("section",{"data-monkeys-component":"icon-picker",className:"flex items-center",children:jsxRuntime.jsxs(Wd,{open:y.open,modal:false,onOpenChange:N=>{N?S({type:"open-change",open:true,mode:y.mode}):I();},children:[jsxRuntime.jsx(Ld,{asChild:true,children:jsxRuntime.jsx(ve,{type:"button","aria-label":d("monkeys.design.iconPicker.choose"),disabled:T,className:"gap-2 px-2",endIcon:jsxRuntime.jsx(lucideReact.ChevronDown,{"aria-hidden":"true",className:"h-3.5 w-3.5 text-muted-foreground"}),children:jsxRuntime.jsx(On,{icon:y.value,alt:d("monkeys.design.iconPicker.current"),className:"h-6 w-6 rounded-sm bg-transparent text-xl text-current"})})}),jsxRuntime.jsxs(as,{align:"start",sideOffset:8,collisionPadding:12,"aria-label":d("monkeys.design.iconPicker.choose"),className:"flex w-96 max-w-[calc(100vw-24px)] flex-col gap-3 overflow-y-auto p-3",style:{maxHeight:"var(--radix-popover-content-available-height)",transformOrigin:"var(--radix-popover-content-transform-origin)"},onOpenAutoFocus:N=>{y.mode==="icon"&&x.current&&(N.preventDefault(),x.current.focus());},onEscapeKeyDown:N=>{T&&N.preventDefault();},onInteractOutside:N=>{T&&N.preventDefault();},children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[Y("monkeys.design.iconPicker.emoji",jsxRuntime.jsx(lucideReact.Smile,{className:"h-4 w-4"}),()=>G("emoji"),y.mode==="emoji"),Y("monkeys.design.iconPicker.icon",jsxRuntime.jsx(lucideReact.Shapes,{className:"h-4 w-4"}),()=>G("icon"),y.mode==="icon"),jsxRuntime.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[Y("monkeys.design.iconPicker.reset",jsxRuntime.jsx(lucideReact.RotateCcw,{className:"h-4 w-4"}),()=>{T||(o({type:"change",value:y.defaultValue}),o({type:"reset"}),I());}),Y("monkeys.design.iconPicker.close",jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"}),I)]})]}),y.mode==="emoji"?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[n({locale:u,disabled:T,onSelect:r(N=>{T||!N||N.length>64||(H(N),I());},"onSelect")}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2 empty:hidden","aria-label":d("monkeys.design.iconPicker.background"),children:y.backgroundColors.map(N=>jsxRuntime.jsx(ve,{className:"h-7 w-7 rounded-md border p-0",type:"button",disabled:T,"aria-label":N,"aria-pressed":N===W,style:{backgroundColor:N},onClick:()=>H(R,N),children:jsxRuntime.jsx("span",{className:"sr-only",children:d("monkeys.design.iconPicker.background")})},N))})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(to,{ref:x,"aria-label":d("monkeys.design.iconPicker.search"),placeholder:d("monkeys.design.iconPicker.search"),disabled:T,value:y.search,onChange:N=>S({type:"search",value:N.currentTarget.value})}),jsxRuntime.jsx("div",{className:"flex shrink-0 gap-1 overflow-x-auto pb-1","aria-label":d("monkeys.design.iconPicker.categories"),children:y.categories.filter(N=>N.id!=="custom-upload"||a||y.customIcons.length).map(N=>jsxRuntime.jsx(ve,{type:"button",className:"shrink-0",size:"sm",variant:"ghost",disabled:T,active:N.id===y.categoryId,"aria-pressed":N.id===y.categoryId,onClick:()=>S({type:"category-change",categoryId:N.id}),children:Dn(N.labelI18n,u)},N.id))}),$?jsxRuntime.jsxs("label",{children:[d("monkeys.design.iconPicker.upload"),jsxRuntime.jsx(to,{type:"file",accept:ym,disabled:T||!a,onChange:N=>{let D=N.currentTarget.files?.[0];if(N.currentTarget.value="",!D||T||!a)return;let B=y.maxUploadBytes??ra;if(!Number.isInteger(B)||B<1||B>ra||D.size>B||!gm(D,ym)){k(true);return}C(),k(false);try{let K=a.register(D),J=bm(K);if(!J){typeof K?.handleId=="string"&&a.discard(K.handleId),k(!0);return}w.current={registry:a,handleId:J.handleId},o({type:"upload",...J});}catch{C(),k(true);}}})]}):null,h?jsxRuntime.jsx("div",{role:"alert",children:d("monkeys.design.iconPicker.uploadFailed")}):null,y.loading?jsxRuntime.jsx("div",{role:"status",children:d("monkeys.design.iconPicker.loading")}):y.errorCode?jsxRuntime.jsxs("div",{role:"alert",children:[d(y.errorCode),jsxRuntime.jsx(ve,{disabled:T,onClick:()=>{v(N=>N+1),S({type:"retry"});},children:d("monkeys.design.iconPicker.retry")})]}):jsxRuntime.jsxs("div",{className:"grid min-h-0 max-h-64 grid-cols-7 gap-1 overflow-auto",onKeyDown:N=>{let D=Array.from(N.currentTarget.querySelectorAll("button:not(:disabled)")),B=D.indexOf(N.target);if(B<0)return;let K={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7}[N.key],J=N.key==="Home"?0:N.key==="End"?D.length-1:K===void 0?void 0:Math.max(0,Math.min(D.length-1,B+K));J!==void 0&&(N.preventDefault(),D[J]?.focus());},children:[M.map(N=>jsxRuntime.jsxs(ve,{className:"relative h-10 min-w-0 p-1",variant:"ghost",active:JSON.stringify(N.icon)===JSON.stringify(y.value),type:"button",title:N.id,"aria-label":N.id,disabled:T,onClick:()=>{T||(o({type:"change",value:N.icon}),I());},children:[jsxRuntime.jsx(On,{icon:N.icon,alt:N.id,className:"h-7 w-7 rounded-sm bg-transparent text-2xl text-current"}),jsxRuntime.jsx("span",{className:"sr-only",children:N.id})]},N.id)),M.length?null:jsxRuntime.jsx("p",{className:"col-span-7 py-3 text-center text-sm text-muted-foreground",children:d("monkeys.design.iconPicker.empty")})]})]})]})]})})}r(Pk,"IconPicker");function Ml(e){return [...e].sort((t,o)=>t.layout.y-o.layout.y||t.layout.x-o.layout.x).slice(0,12).map(t=>t.id)}r(Ml,"initialLayoutCanvasMountedIds");function Ek(e,t,o){if(![e,t,o].every(Number.isFinite))throw new TypeError("Invalid layout mount count.");if(e=Math.max(0,Math.floor(e)),!e)return 0;t=Math.min(e,Math.max(0,Math.floor(t))),o=Math.min(e,Math.max(0,Math.floor(o)));let n=e>=120?24:e>=80?32:e>=48?40:48,a=Math.max(o,Math.min(t,n)),i=Math.max(8,Math.ceil(a*.75));return Math.min(e,Math.max(Math.min(e,18),Math.min(n,a+i)))}r(Ek,"layoutCanvasRetainedMountLimit");function xm(e){let t=new Set(e.items.map(s=>s.id));if(t.size!==e.items.length)throw new TypeError("Layout widget IDs must be unique.");let o=new Set(e.visibleIds.filter(s=>t.has(s))),n=Ml(e.items),a=Ek(t.size,o.size,n.length);if(e.mode==="run")return {retainedOrder:[],mountedIds:[...o],limit:a};let i=[...new Set(e.retainedOrder.filter(s=>t.has(s)))];i.length||i.push(...n);for(let s of [...o,e.selectedWidgetId,e.draggingWidgetId,e.resizingWidgetId]){if(!s||!t.has(s))continue;let u=i.indexOf(s);u>=0&&i.splice(u,1),i.push(s);}for(;i.length>a;){let s=i.findIndex(u=>!o.has(u));if(s<0)break;i.splice(s,1);}return {retainedOrder:i,mountedIds:[...new Set([...i,...o])],limit:a}}r(xm,"projectLayoutCanvasMounting");function Sm({items:e,mode:t,selectedWidgetId:o,draggingWidgetId:n,resizingWidgetId:a,renderItem:i}){let s=lt.useRef(null),u=JSON.stringify(e.map(v=>[v.id,v.layout.x,v.layout.y])),[c,d]=lt.useState(()=>Ml(e)),[g,m]=lt.useState([]),p=lt.useMemo(()=>xm({items:e,mode:t,visibleIds:c,retainedOrder:g,selectedWidgetId:o,draggingWidgetId:n,resizingWidgetId:a}),[u,t,c,g,o,n,a]),f=JSON.stringify(p.retainedOrder);lt.useEffect(()=>{m(v=>JSON.stringify(v)===f?v:p.retainedOrder);},[f]),lt.useEffect(()=>{let v=s.current;if(!v)return;if(typeof IntersectionObserver>"u"){d(e.map(h=>h.id));return}let y=true,x=new Map;d([]);let w=new IntersectionObserver(h=>{if(!y)return;for(let C of h){let T=C.target.dataset.layoutMountId;T&&x.set(T,C.isIntersecting);}let k=[...x].filter(([,C])=>C).map(([C])=>C);d(C=>JSON.stringify(C)===JSON.stringify(k)?C:k);},{root:null,rootMargin:`${720}px 0px ${720}px 0px`,threshold:0});for(let h of v.children)w.observe(h);return ()=>{y=false,w.disconnect();}},[u]);let b=new Set(p.mountedIds);return jsxRuntime.jsx("div",{ref:s,"data-layout-grid":true,className:"grid",style:{gridTemplateColumns:"repeat(24,minmax(0,1fr))",gridAutoRows:28,gap:12},children:e.map(v=>jsxRuntime.jsx("div",{"data-layout-mount-id":v.id,style:{gridColumn:`${v.layout.x+1} / span ${v.layout.w}`,gridRow:`${v.layout.y+1} / span ${v.layout.h}`,minWidth:0,minHeight:0},children:i(v,b.has(v.id))},v.id))})}r(Sm,"LayoutCanvasGrid");var Oi="application/x-monkeys-layout-catalog-item";var Zn={columns:24,rowHeight:28,gap:12,maxRows:100,minimum:4},Bl=r((e,t)=>e.x<t.x+t.w&&e.x+e.w>t.x&&e.y<t.y+t.h&&e.y+e.h>t.y,"overlap");function Hi(e,t=[]){let o=[],n=r(()=>{o.length&&t.push(o),o=[];},"flush");for(let a of e)a.type==="widget"?o.push(a.widgetId):(n(),a.type==="section"?Hi(a.children,t):a.tabs.forEach(i=>Hi(i.children,t)));return n(),t}r(Hi,"runs");var wo=zod.z.string().min(1).max(256).refine(e=>!["__proto__","constructor","prototype"].includes(e)),Fi=zod.z.string().max(8192),Lk=zod.z.union([zod.z.object({type:zod.z.enum(["widget","section","tabs"]),id:wo}).strict(),zod.z.object({type:zod.z.literal("tab"),id:wo,tabsId:wo}).strict()]),Pl=zod.z.lazy(()=>zod.z.union([zod.z.object({type:zod.z.literal("widget"),id:wo,widgetId:wo}).strict(),zod.z.object({type:zod.z.literal("section"),id:wo,title:Fi.optional(),description:Fi.optional(),children:zod.z.array(Pl)}).strict(),zod.z.object({type:zod.z.literal("tabs"),id:wo,title:Fi.optional(),size:zod.z.enum(["large","small"]).optional(),behavior:zod.z.enum(["switch","anchor"]).optional(),tabs:zod.z.array(zod.z.object({id:wo,label:Fi.optional(),target:Lk.optional(),children:zod.z.array(Pl)}).strict())}).strict()])),Ak=zod.z.object({x:zod.z.number().int().min(0),y:zod.z.number().int().min(0),w:zod.z.number().int().min(4).max(24),h:zod.z.number().int().min(4).max(100),minW:zod.z.number().int().min(4).max(24),minH:zod.z.number().int().min(4).max(100)}).strict().refine(e=>e.w>=e.minW&&e.h>=e.minH&&e.x+e.w<=24&&e.y+e.h<=100),zk=zod.z.object({version:zod.z.literal(1),revision:wo,root:zod.z.array(Pl),widgets:zod.z.record(wo,zod.z.object({layout:Ak}).strict())}).strict();function Xn(e){let t=0,o=new Set,n=r((g,m)=>{if(g&&typeof g=="object"){if(m>64||++t>8192||o.has(g))throw new TypeError("Layout nesting budget exceeded.");o.add(g);for(let p of Object.values(g))n(p,m+1);o.delete(g);}},"bound");n(e,0);let a=zk.parse(e),i=new Set,s=new Set,u=0,c=r(()=>{throw new TypeError("Invalid layout canvas model.")},"fail"),d=r((g,m)=>{m>16&&c();for(let p of g)if((i.has(p.id)||++u>512)&&c(),i.add(p.id),p.type==="widget")(s.has(p.widgetId)||!Object.prototype.hasOwnProperty.call(a.widgets,p.widgetId))&&c(),s.add(p.widgetId);else if(p.type==="section")d(p.children,m+1);else for(let f of p.tabs)(i.has(f.id)||++u>512)&&c(),i.add(f.id),d(f.children,m+1);},"visit");d(a.root,0),Object.keys(a.widgets).some(g=>!s.has(g))&&c();for(let g of Hi(a.root))for(let m=0;m<g.length;m++)for(let p=0;p<m;p++)Bl(a.widgets[g[m]].layout,a.widgets[g[p]].layout)&&c();}r(Xn,"validateLayoutCanvasModel");function Vi(e,t){if(Xn(e),t.type==="remove"){let u=[],c=false,d=r(b=>{for(let v of b)v.type==="widget"?u.push(v.widgetId):v.type==="section"?d(v.children):v.tabs.forEach(y=>d(y.children));},"collect"),g=r(b=>b.flatMap(v=>v.id===t.nodeId?(c=true,d([v]),[]):v.type==="section"?[{...v,children:g(v.children)}]:v.type==="tabs"?[{...v,tabs:v.tabs.flatMap(y=>y.id===t.nodeId?(c=true,d(y.children),[]):[{...y,children:g(y.children)}])}]:[v]),"remove"),m=g(e.root);if(!c)throw new TypeError("Unknown layout node.");let p=new Set(u),f={...e,root:m,widgets:Object.fromEntries(Object.entries(e.widgets).filter(([b])=>!p.has(b)))};return Xn(f),{model:f,removedWidgetIds:u}}let o=e.widgets[t.widgetId];if(!o)throw new TypeError("Unknown layout widget.");let n={...o.layout,...t.type==="move"?{x:t.x,y:t.y}:{w:t.w,h:t.h}};if(!Object.values(n).every(Number.isSafeInteger)||n.w<n.minW||n.h<n.minH||n.w>24||n.h>100||n.x<0||n.y<0||n.x+n.w>24||n.y+n.h>100)throw new RangeError("Layout operation exceeds grid bounds.");let a=(Hi(e.root).find(u=>u.includes(t.widgetId))??[]).filter(u=>u!==t.widgetId).map(u=>e.widgets[u].layout),i=a.some(u=>Bl(n,u))?void 0:n;if(!i){let u=1/0;for(let c=0;c<=100-n.h;c++)for(let d=0;d<=24-n.w;d++){let g={...n,x:d,y:c},m=Math.abs(c-n.y)*1e3+Math.abs(d-n.x)*100+c*10+d;m<u&&!a.some(p=>Bl(g,p))&&(i=g,u=m);}}if(!i)throw new RangeError("No available layout position.");let s={...e,widgets:{...e.widgets,[t.widgetId]:{...o,layout:i}}};return Xn(s),{model:s,removedWidgetIds:[]}}r(Vi,"applyLayoutCanvasOperation");function Hk({model:e,mode:t,widgetOrder:o,children:n,selectedNodeId:a,currentTabs:i={},disabled:s=false,labels:u,allowedCatalogItemIds:c=[],draggingCatalogItemId:d,onInsertRequest:g,onReorder:m,onSelect:p,onChange:f,onTabChange:b,onOperationError:v,className:y}){Xn(e);let x=lt.Children.toArray(n);if(o.length!==x.length||new Set(o).size!==o.length||o.length!==Object.keys(e.widgets).length||o.some(j=>!Object.prototype.hasOwnProperty.call(e.widgets,j)))throw new TypeError("Layout widget content must map each widget exactly once.");let w=new Map(o.map((j,Z)=>[j,x[Z]])),h=lt.useRef(null),k=lt.useRef(e);k.current=e;let C=lt.useRef({id:d,model:e});C.current.id!==d&&(C.current={id:d,model:e});let T=lt.useRef(),[S,I]=lt.useState(),R=lt.useRef(),[W,H]=lt.useState(),[L,F]=lt.useState(),$=lt.useRef();lt.useEffect(()=>{R.current=void 0,$.current=void 0,T.current=void 0,I(void 0),H(void 0),F(void 0);},[e,s,t]);let M=r(()=>!!(d&&d.trim().length>0&&d.length<=256&&!/[\u0000-\u001f\u007f-\u009f]/.test(d)&&!["__proto__","prototype","constructor"].includes(d)&&c.includes(d)&&C.current.model===e),"validCatalog"),G=r((j,Z,te,ae=e)=>{s||t!=="edit"||ae!==k.current||j===Z||!e.root.some(le=>le.id===j)||!e.root.some(le=>le.id===Z)||m?.({sourceNodeId:j,targetNodeId:Z,position:te,expectedRevision:ae.revision});},"reorder"),Y=r(j=>t==="edit"&&e.root.some(Z=>Z.id===j)&&m?jsxRuntime.jsx("button",{type:"button","data-layout-reorder":j,draggable:!s,disabled:s,"aria-label":u.reorder??u.move,onDragStart:Z=>{if(s){Z.preventDefault();return}T.current={id:j,model:e},Z.dataTransfer.setData("application/x-monkeys-layout-root-node",j),Z.dataTransfer.effectAllowed="move";},onDragEnd:()=>{T.current=void 0,I(void 0);},onKeyDown:Z=>{let te=e.root.findIndex(A=>A.id===j),ae=Z.key==="ArrowUp"?-1:Z.key==="ArrowDown"?1:0;if(!ae)return;Z.preventDefault();let le=e.root[te+ae];le&&G(j,le.id,ae<0?"before":"after");},children:u.reorder??u.move}):null,"reorderHandle"),N=r(j=>{if(t!=="edit"||!g&&!(j.type==="root"&&m))return null;let Z=JSON.stringify(j);return jsxRuntime.jsx("div",{"data-layout-insert-target":Z,"data-layout-insert-type":j.type,"data-layout-insert-index":j.index,"data-layout-section-id":j.type==="section"?j.sectionId:void 0,"data-layout-tabs-id":j.type==="tab"?j.tabsId:void 0,"data-layout-tab-id":j.type==="tab"?j.tabId:void 0,"data-drop-preview":S===Z||void 0,"aria-label":u.insert??u.move,className:S===Z?"min-h-4 border-2 border-primary bg-primary/10":"min-h-2",onDragOver:te=>{s||!(M()||j.type==="root"&&T.current?.model===e)||(te.preventDefault(),te.stopPropagation(),I(Z));},onDragLeave:()=>I(void 0),onDrop:te=>{if(te.preventDefault(),te.stopPropagation(),I(void 0),s||t!=="edit"||k.current!==e)return;let ae=T.current;if(ae&&j.type==="root"){if(T.current=void 0,te.dataTransfer.getData("application/x-monkeys-layout-root-node")!==ae.id)return;let A=e.root[j.index]??e.root[e.root.length-1];A&&G(ae.id,A.id,j.index<e.root.length?"before":"after",ae.model);return}let le=te.dataTransfer.getData(Oi);M()&&le===d&&g?.({catalogItemId:le,target:j,expectedRevision:e.revision});},children:S===Z?u.insert??u.move:null},`drop:${Z}`)},"dropZone"),D=r((j,Z)=>{if(!(s||t!=="edit"||R.current===j)){if(k.current!==j){v?.({code:"stale-model",revision:j.revision});return}try{let te=Vi(j,Z);f&&(R.current=j),f?.({expectedRevision:j.revision,...te,reason:Z.type});}catch{v?.({code:"invalid-operation",revision:j.revision});}}},"commit"),B=r((j,Z,te)=>{if(s||t!=="edit"||j.button!==0)return;let le=j.currentTarget.closest("[data-layout-grid]")?.getBoundingClientRect().width??0;if(le<=0)return;let A=e.widgets[Z].layout;$.current={pointerId:j.pointerId,x:j.clientX,y:j.clientY,width:le,model:e,operation:te==="move"?{type:te,widgetId:Z,x:A.x,y:A.y}:{type:te,widgetId:Z,w:A.w,h:A.h}},j.currentTarget.setPointerCapture(j.pointerId),j.preventDefault();},"begin"),K=r((j,Z)=>{let te=$.current;if(!te||te.pointerId!==j.pointerId)return;if(k.current!==te.model||s||t!=="edit"){$.current=void 0,H(void 0);return}let ae=Math.round((j.clientX-te.x)/((te.width+Zn.gap)/Zn.columns)),le=Math.round((j.clientY-te.y)/(Zn.rowHeight+Zn.gap)),A=te.operation,me=A.type==="move"?{...A,x:A.x+ae,y:A.y+le}:A.type==="resize"?{...A,w:A.w+ae,h:A.h+le}:A;if(Z)$.current=void 0,H(void 0),D(te.model,me);else try{H(Vi(te.model,me).model);}catch{H(void 0);}},"update"),J=W??e,V=r(j=>jsxRuntime.jsx("button",{type:"button",disabled:s,onClick:()=>F({nodeId:j,model:e}),children:u.remove}),"remove"),Q=r((j,Z)=>{let te=[],ae=[],le=r(()=>{if(!ae.length)return;let A=ae.flatMap(me=>me.type==="widget"?[{id:me.widgetId,node:me,layout:J.widgets[me.widgetId].layout}]:[]);ae=[],te.push(jsxRuntime.jsx(Sm,{items:A,mode:t,selectedWidgetId:A.find(me=>me.node.id===a)?.id,renderItem:({node:me},P)=>{let _=J.widgets[me.widgetId].layout,re=r(fe=>jsxRuntime.jsx("button",{type:"button",disabled:s,"aria-label":u[fe],style:{touchAction:"none"},onPointerDown:ye=>B(ye,me.widgetId,fe),onPointerMove:ye=>K(ye,false),onPointerUp:ye=>K(ye,true),onPointerCancel:()=>{$.current=void 0,H(void 0);},onKeyDown:ye=>{let xe={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]}[ye.key];xe&&(ye.preventDefault(),D(e,fe==="move"?{type:fe,widgetId:me.widgetId,x:_.x+xe[0],y:_.y+xe[1]}:{type:fe,widgetId:me.widgetId,w:_.w+xe[0],h:_.h+xe[1]}));},children:u[fe]}),"controls");return jsxRuntime.jsxs("div",{"data-layout-widget":me.widgetId,"data-selected":a===me.id||void 0,className:"h-full min-h-0 min-w-0 overflow-auto rounded border border-border","data-layout-node-id":me.id,children:[N({...Z,index:j.indexOf(me)}),t==="edit"?jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx("button",{type:"button",disabled:s,onClick:()=>p?.({nodeId:me.id,revision:e.revision}),children:me.widgetId}),Y(me.id),re("move"),re("resize"),V(me.id)]}):null,P?w.get(me.widgetId):null]},me.id)}},A[0].id));},"flush");for(let A of j){if(A.type==="widget"){ae.push(A);continue}if(le(),te.push(N({...Z,index:j.indexOf(A)})),A.type==="section")te.push(jsxRuntime.jsxs("section",{"data-layout-node-id":A.id,className:"space-y-3",children:[jsxRuntime.jsxs("header",{children:[jsxRuntime.jsx("h3",{children:t==="edit"?jsxRuntime.jsx("button",{disabled:s,onClick:()=>p?.({nodeId:A.id,revision:e.revision}),children:A.title??A.id}):A.title??A.id}),A.description?jsxRuntime.jsx("p",{children:A.description}):null,Y(A.id),t==="edit"?V(A.id):null]}),Q(A.children,{type:"section",sectionId:A.id})]},A.id));else {let me=i[A.id]??A.tabs[0]?.id;te.push(jsxRuntime.jsxs("section",{"data-layout-node-id":A.id,children:[jsxRuntime.jsx("h3",{children:t==="edit"?jsxRuntime.jsx("button",{disabled:s,onClick:()=>p?.({nodeId:A.id,revision:e.revision}),children:A.title??A.id}):A.title??A.id}),Y(A.id),t==="edit"?V(A.id):null,jsxRuntime.jsx("div",{role:"tablist",children:A.tabs.map(P=>jsxRuntime.jsx("button",{type:"button",role:"tab","aria-selected":me===P.id,disabled:s,onClick:()=>{if(t==="edit"&&p?.({nodeId:P.id,revision:e.revision}),b?.({tabsId:A.id,tabId:P.id,revision:e.revision}),A.behavior!=="anchor"||!P.target)return;let _=P.target;_.type==="tab"&&b?.({tabsId:_.tabsId,tabId:_.id,revision:e.revision}),requestAnimationFrame(()=>{let re=h.current?.querySelectorAll("[data-layout-node-id], [data-layout-widget], [data-layout-tab-id]");(re&&[...re].find(ye=>_.type==="widget"?ye.dataset.layoutWidget===_.id:_.type==="tab"?ye.dataset.layoutTabId===_.id&&ye.dataset.layoutTabsId===_.tabsId:ye.dataset.layoutNodeId===_.id))?.scrollIntoView({behavior:typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth",block:"start",inline:"nearest"});});},children:P.label??P.id},P.id))}),A.tabs.map(P=>jsxRuntime.jsx("div",{role:"tabpanel","data-layout-tab-id":P.id,"data-layout-tabs-id":A.id,hidden:A.behavior!=="anchor"&&me!==P.id,children:Q(P.children,{type:"tab",tabsId:A.id,tabId:P.id})},P.id))]},A.id));}}return le(),te.push(N({...Z,index:j.length})),te},"nodes");return jsxRuntime.jsxs("div",{ref:h,className:y,"data-layout-canvas":true,children:[Q(J.root,{type:"root"}),jsxRuntime.jsx(Ta,{open:!!L,onOpenChange:j=>{j||F(void 0);},children:jsxRuntime.jsxs(mn,{children:[jsxRuntime.jsx(br,{children:u.confirmRemove}),jsxRuntime.jsx(fr,{children:u.removeDescription}),jsxRuntime.jsx("button",{type:"button",onClick:()=>F(void 0),children:u.cancel}),jsxRuntime.jsx("button",{type:"button",disabled:s,onClick:()=>{L&&D(L.model,{type:"remove",nodeId:L.nodeId}),F(void 0);},children:u.remove})]})})]})}r(Hk,"LayoutCanvas");function Gk({catalogItemId:e,disabled:t=false,children:o,className:n,onInsertRequest:a,onDragStateChange:i}){if(typeof e!="string"||!e.trim()||e.length>256||/[\u0000-\u001f\u007f-\u009f]/.test(e)||["__proto__","prototype","constructor"].includes(e))throw new TypeError("Invalid layout catalog item ID.");let s=lt.useRef(),u=lt.useRef(false),c=r(()=>{let d=s.current;s.current=void 0,d&&d.notify?.({catalogItemId:d.catalogItemId,active:false});},"finish");return lt.useEffect(()=>()=>c(),[e,t]),jsxRuntime.jsx("button",{type:"button",className:n,disabled:t,draggable:!t,onPointerDown:()=>{s.current||(u.current=false);},onKeyDown:d=>{!s.current&&(d.key==="Enter"||d.key===" ")&&(u.current=false);},onClick:d=>{if(t||u.current){d.preventDefault();return}a?.({catalogItemId:e});},onDragStart:d=>{if(t){d.preventDefault();return}c(),d.dataTransfer.clearData(),d.dataTransfer.setData(Oi,e),d.dataTransfer.effectAllowed="copy",u.current=true,s.current={catalogItemId:e,notify:i},i?.({catalogItemId:e,active:true});},onDragEnd:c,children:o})}r(Gk,"LayoutCatalogItem");function $k({value:e,tokens:t,disabled:o=false,readOnly:n=false,ariaLabel:a,tokenGroupLabel:i,maxLength:s,onChange:u}){let c=lt.useRef(null),d=lt.useRef(false),g=lt.useRef();lt.useLayoutEffect(()=>{let p=g.current;p&&(o||n||e!==p.previous&&e!==p.value?g.current=void 0:e===p.value&&(g.current=void 0,c.current?.focus(),c.current?.setSelectionRange(p.caret,p.caret)));},[e,o,n]),lt.useLayoutEffect(()=>()=>{g.current=void 0;},[]);let m=r(p=>s===void 0||p.length<=s,"fits");return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("textarea",{ref:c,value:e,disabled:o,readOnly:n,"aria-label":a,maxLength:s,onCompositionStart:()=>{d.current=true,g.current=void 0;},onCompositionEnd:()=>{d.current=false;},onChange:p=>{g.current=void 0,!o&&!n&&m(p.currentTarget.value)&&u?.({value:p.currentTarget.value});}}),jsxRuntime.jsx("div",{role:"group","aria-label":i,children:t.map((p,f)=>jsxRuntime.jsx("button",{type:"button",disabled:o||n||p.disabled,onMouseDown:b=>b.preventDefault(),onClick:()=>{let b=c.current;if(!b||o||n||p.disabled||d.current||g.current)return;let v=b.selectionStart,y=b.selectionEnd,x=e.slice(0,v)+p.value+e.slice(y);!m(x)||x===e||(g.current={previous:e,value:x,caret:v+p.value.length},u?.({value:x}));},children:p.label},f))})]})}r($k,"TemplateTextEditor");function Kk({model:e,labels:t,locale:o,timeZone:n,disabled:a=false,loading:i=false,onIntent:s}){let{locale:u}=xt(),c=a||i,d=e.repositories.find(p=>p.id===e.selectedRepositoryId),g=r(p=>{c||s?.({...p,scopeId:e.scopeId,expectedRevision:e.revision});},"emit"),m;try{m=new Intl.DateTimeFormat(o??u,{dateStyle:"medium",timeStyle:"short",timeZone:n});}catch{}return jsxRuntime.jsxs("section",{"aria-busy":i,className:"flex min-h-0 flex-col gap-3 text-sm",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("label",{children:[t.repositories,jsxRuntime.jsxs(po,{"aria-label":t.repositories,disabled:c,value:e.selectedRepositoryId??"",onChange:p=>g({action:"select-repository",repositoryId:p.currentTarget.value}),children:[jsxRuntime.jsx("option",{value:"",disabled:true,children:t.repositories}),e.repositories.map(p=>jsxRuntime.jsx("option",{value:p.id,children:p.name},p.id))]})]}),jsxRuntime.jsx(ve,{size:"sm",disabled:c,onClick:()=>g({action:"refresh"}),children:t.refresh})]}),i&&jsxRuntime.jsx("p",{role:"status",children:t.loading}),d?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("dl",{className:"flex flex-wrap gap-3",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("dt",{children:t.branch}),jsxRuntime.jsx("dd",{children:d.branch??"\u2014"})]}),d.upstream&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("dt",{children:t.upstream}),jsxRuntime.jsx("dd",{children:d.upstream})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("dt",{children:t.ahead}),jsxRuntime.jsx("dd",{children:d.ahead??0})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("dt",{children:t.behind}),jsxRuntime.jsx("dd",{children:d.behind??0})]})]}),jsxRuntime.jsx("h3",{children:t.status}),d.changes.length===0&&jsxRuntime.jsx("p",{children:t.empty}),jsxRuntime.jsx("ul",{className:"flex flex-col gap-1",children:d.changes.map(p=>jsxRuntime.jsxs("li",{className:"flex flex-wrap items-center gap-2",children:[jsxRuntime.jsx(bn,{label:p.status}),jsxRuntime.jsx("span",{className:"min-w-0 break-all",children:p.path}),p.indexStatus&&jsxRuntime.jsx("code",{children:p.indexStatus}),p.worktreeStatus&&jsxRuntime.jsx("code",{children:p.worktreeStatus}),jsxRuntime.jsx(ve,{size:"sm",disabled:c,onClick:()=>g({action:"open-file",repositoryId:d.id,path:p.path}),children:t.openFile}),jsxRuntime.jsx(ve,{size:"sm",disabled:c,onClick:()=>g({action:"open-diff",repositoryId:d.id,path:p.path}),children:t.openDiff})]},p.path))}),jsxRuntime.jsx("h3",{children:t.history}),d.commits.length===0&&jsxRuntime.jsx("p",{children:t.empty}),jsxRuntime.jsx("ol",{className:"flex flex-col gap-2",children:d.commits.map(p=>{let f=e.expandedCommitIds.includes(p.id),b=p.date?new Date(p.date):void 0,v=b&&Number.isFinite(b.getTime());return jsxRuntime.jsxs("li",{children:[jsxRuntime.jsxs(ve,{size:"sm",disabled:c,"aria-expanded":f,onClick:()=>g({action:"toggle-commit",repositoryId:d.id,commitId:p.id,expanded:!f}),children:[p.shortId," ",p.message]}),jsxRuntime.jsxs("div",{className:"flex flex-wrap gap-2",children:[jsxRuntime.jsx("span",{children:p.author}),v&&m?jsxRuntime.jsx("time",{dateTime:b.toISOString(),children:m.format(b)}):jsxRuntime.jsx("span",{children:t.unknownDate}),p.refs?.map(y=>jsxRuntime.jsx(bn,{label:y},y))]}),f&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("ul",{children:p.files.slice(0,8).map(y=>jsxRuntime.jsxs("li",{className:"flex gap-2",children:[jsxRuntime.jsx("span",{className:"break-all",children:y.path}),y.status&&jsxRuntime.jsx(bn,{label:y.status})]},y.path))}),p.files.length>8&&jsxRuntime.jsxs("p",{children:[t.remainingFiles,": ",p.files.length-8]})]})]},p.id)})})]}):jsxRuntime.jsx("p",{children:t.empty})]})}r(Kk,"RuntimeSourceControlView");var Al=1e4,Uk=Al+2,Bm=1024*1024,Ll=r(e=>typeof e=="string"&&e.trim().length>0&&e.length<=256&&!/[\u0000-\u001f\u007f-\u009f]/.test(e),"validId");function Mm(e){if(e.length>Al)return "ORDERED_SELECTION_LIMIT_EXCEEDED";if(e.some(t=>!Ll(t))||new Set(e).size!==e.length)return "ORDERED_SELECTION_INVALID_MODEL";if(new TextEncoder().encode(JSON.stringify(e)).byteLength>Bm)return "ORDERED_SELECTION_BYTES_EXCEEDED"}r(Mm,"validateOrderedSelection");function qk(e){return jsxRuntime.jsx(Yk,{...e},JSON.stringify([e.model.scopeId,e.model.revision]))}r(qk,"OrderedSelection");function Yk({model:e,onIntent:t,translate:o}){let{locale:n}=xt(),[a,i]=lt.useState(()=>[...e.selectedIds]),[s,u]=lt.useState(e.search??""),[c,d]=lt.useState(""),[g,m]=lt.useState(()=>Mm(e.selectedIds)),[p,f]=lt.useState(0),b=lt.useRef(a),v=lt.useRef(new Set),y=lt.useRef(new Map),x=lt.useRef(true),w=lt.useRef();lt.useEffect(()=>(x.current=true,()=>{x.current=false;}),[]);let h=!!(e.pending||e.readOnly||e.loading),k=lt.useRef({blocked:h,model:e});k.current={blocked:h,model:e};let C=r(V=>{x.current&&!k.current.blocked&&t(V);},"emit"),T=e.append&&!v.current.has(e.append.revision)?e.append.rows:[],S=[...e.candidates??[],...T],I=new Set(b.current),R=(e.append?.rows??[]).filter(V=>I.has(V.id));for(let V of [...(e.selectedRows??[]).filter(Q=>I.has(Q.id)),...R,...S])Ll(V.id)&&y.current.set(V.id,V);let W=new Set([...b.current,...S.map(V=>V.id)]);for(let V of y.current.keys())W.has(V)||y.current.delete(V);let H=r(V=>{let Q=e.groups??[];if(Q.length>Uk||Q.some(te=>!Ll(te.id))||new Set(Q.map(te=>te.id)).size!==Q.length)return "ORDERED_SELECTION_INVALID_MODEL";let j=new Map;for(let te of V)j.set(te,y.current.get(te)??{id:te});for(let te of S)j.set(te.id,te);return new TextEncoder().encode(JSON.stringify({selectedIds:V,rows:[...j.values()],groups:Q})).byteLength>Bm?"ORDERED_SELECTION_BYTES_EXCEEDED":void 0},"displayIssue"),L=r(V=>{let Q=y.current.get(V);return Q?.labelI18n?Dn(Q.labelI18n,n):Q?.labelKey?o(Q.labelKey):Q?.label||V},"label"),F=r((V,Q=false)=>{let j=y.current.get(V),te=[j?.descriptionI18n?Dn(j.descriptionI18n,n):j?.descriptionKey?o(j.descriptionKey):j?.description,j?.showId?V:void 0].filter(ae=>ae!==void 0&&ae!=="").join(" \xB7 ");return jsxRuntime.jsxs("span",{className:"min-w-0 flex-1 overflow-hidden",children:[jsxRuntime.jsxs("span",{className:"block truncate",children:[L(V),Q&&j?.missing?` (${o("Unavailable")})`:""]}),te?jsxRuntime.jsx("span",{className:"block truncate text-xs text-muted-foreground",title:te,children:te}):null]})},"rowText"),$=e.selectionMode==="single"?1:Math.min(1e4,e.maxSelected??1e4),M=e.minSelected??0,G=r(V=>{if(k.current.blocked||!x.current)return false;let j=(V.length>$?"ORDERED_SELECTION_LIMIT_EXCEEDED":Mm(V))??H(V);return j?(m(j),C({type:"error",scopeId:e.scopeId,code:j}),false):(b.current=V,m(void 0),i(V),C({type:"change",scopeId:e.scopeId,expectedRevision:e.revision,selectedIds:[...V],selectedCount:V.length}),true)},"commit");lt.useEffect(()=>{!e.append||e.append.rows.length===0||h||v.current.has(e.append.revision)||G([...new Set([...a,...e.append.rows.map(V=>V.id)])])&&v.current.add(e.append.revision);},[e.append,h,a]);let Y=r((V,Q)=>{let j=a.indexOf(V);if(j<0||Q<0||Q>=a.length||j===Q)return;let Z=[...a];Z.splice(j,1),Z.splice(Q,0,V),G(Z);},"move"),N=r(()=>C({type:"search",scopeId:e.scopeId,value:s.trim()}),"searchNow"),B=!Number.isSafeInteger(M)||!Number.isSafeInteger($)||M<0||$<0||M>$?"ORDERED_SELECTION_INVALID_MODEL":H(a),K=B??g??(e.errorCode&&/^[A-Z][A-Z0-9_]{0,127}$/.test(e.errorCode)?e.errorCode:e.errorCode?"ORDERED_SELECTION_INVALID_MODEL":void 0),J=Math.min(p,Math.max(0,a.length-1));return jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-col gap-3","data-ordered-selection":e.scopeId,children:[K?jsxRuntime.jsx("p",{role:"alert",children:o(K)}):null,e.loading?jsxRuntime.jsx("p",{role:"status",children:o("Loading")}):null,e.mode==="ids"?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Rr,{"aria-label":o("IDs"),disabled:h,value:c,onChange:V=>d(V.target.value)}),jsxRuntime.jsx(ve,{disabled:h,onClick:()=>{G([...new Set([...a,...c.split(/[\s,;]+/).filter(Boolean)])]);},children:o("Add")})]}):jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[e.groupId!==void 0?jsxRuntime.jsx(po,{"aria-label":o("Group"),value:e.groupId,disabled:h||e.canBrowse===false,onChange:V=>C({type:"group-change",scopeId:e.scopeId,value:V.currentTarget.value}),children:(e.groups??[]).map(V=>jsxRuntime.jsx("option",{value:V.id,children:V.labelI18n?Dn(V.labelI18n,n):V.labelKey?o(V.labelKey):V.label||V.id},V.id))}):null,jsxRuntime.jsx(to,{"aria-label":o("Search"),value:s,disabled:h||e.canBrowse===false,onChange:V=>u(V.target.value),onKeyDown:V=>{V.key==="Enter"&&(V.preventDefault(),N());}}),jsxRuntime.jsx(ve,{disabled:h||e.canBrowse===false,onClick:N,children:o("Search")}),e.allowCreate?jsxRuntime.jsx(ve,{disabled:h,onClick:()=>C({type:"create",scopeId:e.scopeId}),children:o("Create")}):null,jsxRuntime.jsx("div",{className:"w-full space-y-2","data-ordered-candidates":true,style:{maxHeight:384,overflowY:"auto"},children:(e.candidates??[]).map(V=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("label",{className:"flex min-w-0 flex-1 items-center gap-2",children:[jsxRuntime.jsx(pn,{disabled:h||V.disabled,checked:a.includes(V.id),onChange:Q=>G(Q.currentTarget.checked?e.selectionMode==="single"?[V.id]:[...new Set([...a,V.id])]:a.filter(j=>j!==V.id))}),F(V.id)]}),e.allowCopy?jsxRuntime.jsx(ve,{disabled:h||V.disabled,onClick:()=>C({type:"copy",scopeId:e.scopeId,id:V.id}),children:o("Copy")}):null]},V.id))}),e.pagination?.hasMore&&e.pagination.nextCursor?jsxRuntime.jsx(ve,{disabled:h||e.canBrowse===false||e.pagination.loadingMore,onClick:()=>C({type:"load-more",scopeId:e.scopeId,cursor:e.pagination.nextCursor}),children:o("Load more")}):null]}),jsxRuntime.jsx(ve,{className:"self-start",disabled:h||a.length===0,onClick:()=>G([]),children:o("Clear")}),jsxRuntime.jsxs("div",{role:"status","aria-live":"polite",children:[a.length," / ",Al]}),jsxRuntime.jsx("div",{"data-ordered-viewport":true,style:{height:Math.min(384,a.length*48),overflowY:"auto"},onScroll:V=>f(Math.max(0,Math.floor(V.currentTarget.scrollTop/48)-2)),children:jsxRuntime.jsx("ol",{"aria-label":o("Selected"),style:{height:a.length*48,position:"relative",margin:0},children:a.slice(J,J+14).map((V,Q)=>{let j=J+Q;return jsxRuntime.jsxs("li",{"data-ordered-id":V,"aria-posinset":j+1,"aria-setsize":a.length,style:{position:"absolute",top:j*48,height:48,left:0,right:0,display:"flex",gap:8},onDragOver:Z=>{!h&&w.current&&Z.preventDefault();},onDrop:Z=>{Z.preventDefault(),w.current&&Z.dataTransfer.getData("application/x-monkeys-ordered-selection")===w.current&&Y(w.current,j),w.current=void 0;},children:[jsxRuntime.jsx(ve,{"data-ordered-drag":V,"aria-label":o("Move"),disabled:h,draggable:!h,onDragStart:Z=>{if(h)return Z.preventDefault();w.current=V,Z.dataTransfer.setData("application/x-monkeys-ordered-selection",V);},onDragEnd:()=>{w.current=void 0;},onKeyDown:Z=>{(Z.key==="ArrowUp"||Z.key==="ArrowDown")&&(Z.preventDefault(),Y(V,j+(Z.key==="ArrowUp"?-1:1)));},children:"\u2195"}),F(V,true),jsxRuntime.jsx(ve,{disabled:h||j===0,"aria-label":o("Move up"),onClick:()=>Y(V,j-1),children:"\u2191"}),jsxRuntime.jsx(ve,{disabled:h||j===a.length-1,"aria-label":o("Move down"),onClick:()=>Y(V,j+1),children:"\u2193"}),jsxRuntime.jsx(ve,{disabled:h,"aria-label":o("Remove"),onClick:()=>G(a.filter(Z=>Z!==V)),children:"\xD7"})]},V)})})}),jsxRuntime.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.showSubmit!==false?jsxRuntime.jsx(ve,{disabled:h||!!(g||B)||a.length<M||a.length>$,onClick:()=>C({type:"submit",scopeId:e.scopeId,expectedRevision:e.revision,selectedIds:[...a],selectedCount:a.length}),children:o("Save")}):null,e.showCancel!==false?jsxRuntime.jsx(ve,{disabled:h,onClick:()=>C({type:"cancel",scopeId:e.scopeId}),children:o("Cancel")}):null,e.errorCode?jsxRuntime.jsx(ve,{disabled:h,onClick:()=>C({type:"retry",scopeId:e.scopeId}),children:o("Retry")}):null]})]})}r(Yk,"SelectionDraft");var Qk={h1:r(({children:e})=>jsxRuntime.jsx("h1",{className:"mb-3 mt-6 text-xl font-bold first:mt-0",children:e}),"h1"),h2:r(({children:e})=>jsxRuntime.jsx("h2",{className:"mb-3 mt-6 text-lg font-semibold first:mt-0",children:e}),"h2"),h3:r(({children:e})=>jsxRuntime.jsx("h3",{className:"mb-2 mt-5 text-base font-semibold first:mt-0",children:e}),"h3"),h4:r(({children:e})=>jsxRuntime.jsx("h4",{className:"mb-2 mt-4 text-sm font-semibold first:mt-0",children:e}),"h4"),p:r(({children:e})=>jsxRuntime.jsx("p",{className:"my-3 break-words leading-6 first:mt-0 last:mb-0",children:e}),"p"),ul:r(({children:e})=>jsxRuntime.jsx("ul",{className:"my-3 list-disc space-y-1 pl-6",children:e}),"ul"),ol:r(({children:e})=>jsxRuntime.jsx("ol",{className:"my-3 list-decimal space-y-1 pl-6",children:e}),"ol"),li:r(({children:e})=>jsxRuntime.jsx("li",{className:"break-words leading-6",children:e}),"li"),blockquote:r(({children:e})=>jsxRuntime.jsx("blockquote",{className:"my-4 border-l-4 border-border bg-muted/35 px-4 py-1 text-muted-foreground",children:e}),"blockquote"),a:r(({children:e,href:t})=>jsxRuntime.jsx("a",{className:"break-all font-medium text-primary underline-offset-4 hover:underline",href:t,target:"_blank",rel:"noreferrer noopener",children:e}),"a"),pre:r(({children:e})=>jsxRuntime.jsx("pre",{className:"my-4 max-w-full overflow-x-auto rounded-lg border border-border/60 bg-muted/45 p-4 text-xs leading-5",children:e}),"pre"),code:r(({className:e,children:t})=>jsxRuntime.jsx("code",{className:l(e,"break-words rounded bg-muted px-1 py-0.5 font-mono text-[0.9em] [pre_&]:break-normal [pre_&]:bg-transparent [pre_&]:p-0"),children:t}),"code"),table:r(({children:e})=>jsxRuntime.jsx("div",{className:"my-4 max-w-full overflow-x-auto rounded-lg border border-border/60",children:jsxRuntime.jsx("table",{className:"min-w-full border-collapse text-sm",children:e})}),"table"),thead:r(({children:e})=>jsxRuntime.jsx("thead",{className:"bg-muted/55",children:e}),"thead"),tbody:r(({children:e})=>jsxRuntime.jsx("tbody",{className:"divide-y divide-border/60",children:e}),"tbody"),tr:r(({children:e})=>jsxRuntime.jsx("tr",{className:"divide-x divide-border/60",children:e}),"tr"),th:r(({children:e})=>jsxRuntime.jsx("th",{className:"whitespace-nowrap px-3 py-2 text-left font-semibold",children:e}),"th"),td:r(({children:e})=>jsxRuntime.jsx("td",{className:"min-w-32 px-3 py-2 align-top",children:e}),"td"),hr:r(()=>jsxRuntime.jsx("hr",{className:"my-6 border-border"}),"hr")};function ew({content:e,className:t}){let o=String(e||"").trim();return o?jsxRuntime.jsx("div",{className:l("min-w-0 max-w-full text-sm text-foreground",t),"data-monkeys-component":"markdown-content",children:jsxRuntime.jsx(Jk__default.default,{remarkPlugins:[Zk__default.default],components:Qk,skipHtml:true,urlTransform:Jk.defaultUrlTransform,children:o})}):jsxRuntime.jsx("div",{className:l("text-sm text-muted-foreground",t),children:"\u2014"})}r(ew,"MarkdownContent");function tw({viewMode:e="list",heading:t,metadata:o,message:n,actions:a,outputs:i,children:s,className:u,...c}){return jsxRuntime.jsxs("article",{...c,"data-monkeys-component":"workbench-task-card","data-view-mode":e,className:l("border-border/70 font-[family-name:var(--font-sans)] text-sm leading-5",e==="grid"?"flex h-full flex-col gap-global rounded-lg border bg-card p-global shadow-sm":"grid items-center gap-global border-b py-global last:border-b-0 lg:grid-cols-2",u),children:[jsxRuntime.jsxs("div",{"data-task-part":"details",className:l("flex min-w-0 flex-col",e==="grid"?"flex-1":"min-h-60"),children:[jsxRuntime.jsx("div",{className:"mb-global flex flex-wrap items-center gap-global",children:t}),o!=null&&jsxRuntime.jsx("div",{className:"mb-global flex flex-wrap items-center gap-global text-sm tabular-nums text-muted-foreground [&_span]:text-inherit [&_time]:text-inherit",children:o}),s,n!=null&&jsxRuntime.jsx("div",{className:"mt-global break-words text-sm text-destructive-text",children:n}),a!=null&&jsxRuntime.jsx("div",{className:"mt-auto flex flex-wrap gap-global pt-global",children:a})]}),i!=null&&jsxRuntime.jsx("div",{"data-task-part":"outputs",className:l("min-w-0 w-full",e==="grid"&&"-order-1"),children:i})]})}r(tw,"WorkbenchTaskCard");function iw({title:e,filters:t,sortOrder:o,viewMode:n,onSortOrderChange:a,onViewModeChange:i,labels:s,disabled:u,className:c}){return jsxRuntime.jsx(qs,{"data-monkeys-component":"workbench-task-toolbar",classNames:{root:"min-h-0 flex-row flex-wrap items-center gap-global border-0 p-0 font-[family-name:var(--font-sans)] text-sm leading-5",end:"max-w-full flex-wrap gap-global"},className:c,end:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[t,jsxRuntime.jsxs("div",{className:"flex items-center gap-global",children:[jsxRuntime.jsx(ve,{type:"button",variant:"outline",disabled:u,title:s.sort,icon:o==="latest"?jsxRuntime.jsx(lucideReact.ArrowDownWideNarrow,{}):jsxRuntime.jsx(lucideReact.ArrowUpNarrowWide,{}),className:"h-10 min-w-28 gap-global rounded-lg bg-muted/40 px-global py-global-1/2 text-sm font-medium shadow-none hover:bg-muted/70",onClick:()=>a(o==="latest"?"oldest":"latest"),children:o==="latest"?s.latest:s.oldest}),jsxRuntime.jsx(ve,{type:"button",variant:"outline",disabled:u,icon:n==="list"?jsxRuntime.jsx(lucideReact.Grid2X2,{}):jsxRuntime.jsx(lucideReact.LayoutList,{}),className:"h-10 gap-global rounded-lg bg-muted/40 px-global py-global-1/2 text-sm font-medium shadow-none hover:bg-muted/70",onClick:()=>i(n==="list"?"grid":"list"),children:n==="list"?s.gridView:s.listView})]})]}),children:e})}r(iw,"WorkbenchTaskToolbar");function lw({items:e=[],children:t,hasOutputs:o,viewMode:n="list",ariaLabel:a,previewLabel:i,processingLabel:s,processing:u=false,emptyState:c,onPreview:d,className:g}){let m=n==="grid"?"aspect-square w-full":"aspect-square w-[calc((100%-3*var(--global-spacing))/4)] min-w-32 max-w-48";return jsxRuntime.jsxs("div",{"data-monkeys-component":"workbench-task-outputs",role:"region","aria-label":a,tabIndex:0,className:l("flex w-full min-w-0 snap-x snap-proximity items-center gap-global overflow-x-auto py-global-1/2 font-[family-name:var(--font-sans)] text-sm leading-5 focus-visible:outline focus-visible:outline-2",g),children:[t,e.map(p=>p.kind==="media"?d?jsxRuntime.jsx("button",{type:"button",onClick:()=>d(p),"aria-label":p.previewLabel||i,className:l("flex shrink-0 snap-start items-center justify-center overflow-hidden rounded-lg border bg-muted/20 focus-visible:outline focus-visible:outline-2",m),children:p.content},p.id):jsxRuntime.jsx("div",{className:l("flex shrink-0 snap-start items-center justify-center overflow-hidden rounded-lg border bg-muted/20",m),children:p.content},p.id):jsxRuntime.jsx("pre",{className:"h-60 w-full min-w-0 shrink-0 snap-start overflow-auto whitespace-pre-wrap break-words rounded-lg border bg-muted/20 p-global font-[family-name:var(--font-sans)] text-sm leading-5",children:p.content},p.id)),!(o??(e.length>0||!!t))&&(u?jsxRuntime.jsx("div",{role:"status","aria-label":s,className:l("flex shrink-0 items-center justify-center rounded-lg border bg-gradient-to-br from-muted via-background to-muted",m),children:jsxRuntime.jsx("span",{"aria-hidden":"true",className:"size-16 animate-spin rounded-full border-[8px] border-muted-foreground/40 border-t-foreground motion-reduce:animate-none sm:size-20"})}):jsxRuntime.jsx("div",{className:"flex min-h-60 w-full items-center justify-center rounded-lg border border-dashed bg-muted/20 p-global text-center text-sm text-muted-foreground",children:c}))]})}r(lw,"WorkbenchTaskOutputs");function pw({src:e,kind:t,alt:o,expanded:n=false,loading:a=false,failed:i=false,loadingLabel:s,errorLabel:u,onError:c,renderMedia:d}){return d?jsxRuntime.jsx(jsxRuntime.Fragment,{children:d({src:e,kind:t,alt:o,expanded:n,loadingLabel:s,errorLabel:u})}):a?jsxRuntime.jsx("span",{role:"status","aria-label":s,children:jsxRuntime.jsx(lucideReact.Loader2,{"aria-hidden":"true",className:"size-6 animate-spin text-muted-foreground motion-reduce:animate-none"})}):i||!e||t==="3d"?jsxRuntime.jsx("span",{role:"img","aria-label":u,children:jsxRuntime.jsx(lucideReact.ImageOff,{"aria-hidden":"true",className:"size-6 text-muted-foreground"})}):t==="video"?jsxRuntime.jsxs("span",{className:n?"contents":"relative block size-full",children:[jsxRuntime.jsx("video",{src:e,"aria-label":o,controls:n,playsInline:true,preload:"metadata",onError:c,className:n?"max-h-[75vh] max-w-full":"size-full object-contain"}),!n&&jsxRuntime.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:jsxRuntime.jsx("span",{className:"flex size-12 items-center justify-center rounded-full bg-[hsl(var(--monkeys-color-media-overlay)/0.6)] shadow-md sm:size-14",children:jsxRuntime.jsx(lucideReact.Play,{className:"ml-0.5 size-5 !fill-[hsl(var(--monkeys-color-media-foreground))] !stroke-[hsl(var(--monkeys-color-media-foreground))] sm:size-6"})})})]}):jsxRuntime.jsx(gr,{src:e,alt:o,loading:"lazy",onError:c,className:n?"h-auto w-auto max-h-[75vh] max-w-full":void 0})}r(pw,"WorkbenchTaskMedia");function xw({text:e,labels:t,className:o}){let n=lt.useId(),a=lt.useRef(null),i=lt.useRef(null),[s,u]=lt.useState(false),[c,d]=lt.useState(false),[g,m]=lt.useState(false),[p,f]=lt.useState(false),[b,v]=lt.useState(3),y=e||t.empty;return lt.useEffect(()=>{u(false),m(false),f(false);},[y]),lt.useEffect(()=>{let x=i.current,w=a.current;if(!x||!w)return;let h=r(()=>{if(w.dataset.expanded==="true")return;let S=getComputedStyle(x),I=Number.parseFloat(S.lineHeight)||20,R=w.closest('[data-record-layout="horizontal"]'),W=!!R,H=W?w.closest('[data-record-part="details"]'):null,L=R?.querySelector('[data-record-part="media"]'),F=H?.getBoundingClientRect(),$=H?.offsetHeight&&F?.height?F.height/H.offsetHeight:1,M=H?Array.from(H.children).slice(Array.from(H.children).indexOf(w)+1).reduce((V,Q)=>{let j=getComputedStyle(Q),Z=j.marginTop==="auto"?0:Number.parseFloat(j.marginTop)||0,te=j.marginBottom==="auto"?0:Number.parseFloat(j.marginBottom)||0;return V+Q.getBoundingClientRect().height/$+Z+te},0):0,G=w.clientHeight||I*3+40;if(W&&H&&F){let V=w.getBoundingClientRect(),Q=getComputedStyle(H),j=Number.parseFloat(Q.minBlockSize)||H.clientHeight||F.height/$;G=Math.max(I,j-(V.top-F.top)/$-M);}else if(!W)G=w.clientHeight||I*3+40;else if(R&&L){let V=w.getBoundingClientRect(),Q=L.getBoundingClientRect(),j=V.top-Q.top;G=Math.max(G,Q.height-j);}let Y=W?x.clientWidth||x.getBoundingClientRect().width/$:x.getBoundingClientRect().width,N=x.cloneNode(true);N.style.cssText=["position:absolute","visibility:hidden","display:block","height:auto","max-height:none",`width:${Y}px`,"overflow:visible","flex:none","-webkit-line-clamp:unset"].join(";"),w.appendChild(N);let D=N.scrollHeight||x.scrollHeight;N.remove();let B=Math.max(I,G-40),K=W?3:Math.max(1,Math.floor(B/I)),J=W?D>I*3+1:D>B+1;v(K),d(J),f(W),m(true);},"measure");if(h(),typeof ResizeObserver>"u")return;let k=new ResizeObserver(h);k.observe(x),k.observe(w);let T=w.closest('[data-record-layout="horizontal"]')?.querySelector('[data-record-part="details"]');return T&&k.observe(T),()=>k.disconnect()},[y]),jsxRuntime.jsxs("div",{ref:a,"data-monkeys-component":"workbench-task-prompt","data-expanded":s||void 0,"data-overflowing":g&&p&&c?"true":void 0,className:l("flex min-h-0 min-w-0 flex-col font-[family-name:var(--font-sans)] text-sm leading-5",o),children:[jsxRuntime.jsx("p",{ref:i,id:n,className:l("min-h-0 flex-1 whitespace-pre-wrap break-words text-sm leading-5 text-foreground [overflow-wrap:anywhere]"),style:s||!c?void 0:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:b,overflow:"hidden"},children:y}),(c||s)&&jsxRuntime.jsxs("button",{type:"button","aria-expanded":s,"aria-controls":n,onClick:()=>u(x=>!x),className:"mt-global-1/2 inline-flex min-h-8 items-center gap-global-1/2 rounded-lg px-global-1/2 text-sm font-medium text-foreground underline underline-offset-4 hover:bg-muted focus-visible:outline focus-visible:outline-2",children:[s?t.less:t.more,s?jsxRuntime.jsx(lucideReact.ChevronUp,{"aria-hidden":"true",className:"size-4"}):jsxRuntime.jsx(lucideReact.ChevronDown,{"aria-hidden":"true",className:"size-4"})]})]})}r(xw,"WorkbenchTaskPrompt");function kw({kind:e="media",viewMode:t="list",text:o,previewLabel:n,downloadable:a=false,downloadLabel:i,downloading:s=false,children:u,onPreview:c,onDownload:d}){if(e==="text")return jsxRuntime.jsx("pre",{className:"h-60 w-full min-w-0 shrink-0 snap-start overflow-auto whitespace-pre-wrap break-words rounded-lg border bg-muted/20 p-global font-[family-name:var(--font-sans)] text-sm leading-5",children:o??u});let g=l("flex shrink-0 snap-start items-center justify-center overflow-hidden rounded-lg border bg-muted/20",t==="grid"?"aspect-square w-full":e==="file"?"aspect-square w-60 min-w-60 max-w-72":"aspect-square w-[calc((100%-3*var(--global-spacing))/4)] min-w-32 max-w-48");return e==="media"&&c&&!(a&&d)?jsxRuntime.jsx("button",{type:"button",className:l(g,"focus-visible:outline focus-visible:outline-2"),"aria-label":n,onClick:c,children:u}):jsxRuntime.jsx("div",{className:g,children:e==="media"&&a&&d?jsxRuntime.jsxs("div",{className:"group/task-output relative size-full",children:[c?jsxRuntime.jsx(ve,{type:"button",variant:"ghost",className:"flex size-full items-center justify-center rounded-none border-0 p-0 focus-visible:outline focus-visible:outline-2",classNames:{label:"size-full"},"aria-label":n,onClick:c,children:u}):u,jsxRuntime.jsx(ve,{icon:jsxRuntime.jsx(lucideReact.Download,{"aria-hidden":"true"}),iconOnly:true,size:"sm",ariaLabel:i,title:i,loading:s,disabled:s,stopPropagation:true,onClick:d,className:"absolute right-global-1/2 top-global-1/2 z-10 border shadow-sm opacity-0 transition-opacity group-hover/task-output:opacity-100 group-focus-within/task-output:opacity-100 data-[loading=true]:opacity-100 [@media(hover:none)]:opacity-100"})]}):u})}r(kw,"WorkbenchTaskOutputItem");function Rw({filename:e,preview:t,previewLabel:o,downloadLabel:n,downloading:a=false,disabled:i=false,onPreview:s,onDownload:u}){return jsxRuntime.jsxs("div",{className:"flex size-full min-h-0 flex-col font-[family-name:var(--font-sans)] text-sm leading-5","data-monkeys-component":"workbench-task-spreadsheet",children:[t?jsxRuntime.jsx("button",{type:"button",onClick:s,"aria-label":o,className:"flex min-h-0 flex-1 items-center justify-center p-global-1/2 focus-visible:outline focus-visible:outline-2",children:t}):jsxRuntime.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-global-1/2",children:jsxRuntime.jsx(lucideReact.FileSpreadsheet,{className:"size-10 text-green-600","aria-hidden":"true"})}),jsxRuntime.jsxs("div",{className:"flex shrink-0 items-center gap-global-1/2 border-t p-global-1/2",children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[jsxRuntime.jsx("p",{className:"line-clamp-2 break-all text-sm font-medium",title:e,children:e}),jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:"XLSX"})]}),jsxRuntime.jsx("button",{type:"button","aria-label":n,title:n,disabled:i||a||!u,onClick:u,className:"flex size-9 shrink-0 items-center justify-center rounded-lg border bg-background disabled:opacity-50 focus-visible:outline focus-visible:outline-2",children:a?jsxRuntime.jsx(lucideReact.Loader2,{className:"size-4 animate-spin motion-reduce:animate-none"}):jsxRuntime.jsx(lucideReact.Download,{className:"size-4"})})]})]})}r(Rw,"WorkbenchTaskSpreadsheet");function Mw({startTime:e,endTime:t,running:o=false,mode:n="absolute",className:a}){let{locale:i}=xt(),[s,u]=lt.useState(Date.now);lt.useEffect(()=>{if(n==="absolute"||n==="duration"&&!o)return;let f=setInterval(()=>{document.visibilityState==="visible"&&u(Date.now());},n==="duration"?1e3:1e4);return ()=>clearInterval(f)},[n,o]);let c=t&&t>0?t:e;if(!c||!Number.isFinite(c)||!Number.isFinite(new Date(c).getTime()))return null;if(n==="duration"){let f=t&&t>0?t:o?s:void 0;if(!e||!f||f<e)return null;let b=(f-e)/1e3;return jsxRuntime.jsx("span",{className:a,children:b<60?`${b.toFixed(2)}s`:b<3600?`${Math.floor(b/60)}m ${Math.floor(b%60)}s`:`${Math.floor(b/3600)}h ${Math.floor(b%3600/60)}m`})}let d=new Intl.DateTimeFormat(i,{dateStyle:"medium",timeStyle:"medium"}).format(c),g=Math.max(0,(s-c)/1e3),[m,p]=g<60?[g,"second"]:g<3600?[g/60,"minute"]:g<86400?[g/3600,"hour"]:[g/86400,"day"];return jsxRuntime.jsx("time",{className:a,dateTime:new Date(c).toISOString(),title:d,children:n==="absolute"?d:new Intl.RelativeTimeFormat(i,{numeric:"auto"}).format(-Math.floor(m),p)})}r(Mw,"WorkbenchTaskTime");function Ew({data:e,viewMode:t="list",title:o,openLabel:n,closeLabel:a,renderEditor:i}){let[s,u]=lt.useState(false),[c,d]=lt.useState(5),g=lt.useRef(null);return lt.useEffect(()=>{let m=g.current;if(!m)return;let p=r(()=>{let b=getComputedStyle(m),v=Number.parseFloat(b.lineHeight),y=Number.parseFloat(b.rowGap)||0;v>0&&d(Math.max(0,Math.floor((m.clientHeight+y)/(v+y))));},"measure");if(p(),typeof ResizeObserver>"u")return;let f=new ResizeObserver(p);return f.observe(m),()=>f.disconnect()},[]),jsxRuntime.jsxs("section",{className:"monkeys-task-measurements","data-view-mode":t,children:[jsxRuntime.jsxs("div",{className:"flex size-full flex-col gap-global overflow-hidden rounded-lg border border-border bg-background p-global text-left",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:e.garment_type||o}),jsxRuntime.jsx("dl",{ref:g,className:"grid min-h-0 w-full flex-1 grid-cols-[minmax(0,1fr)_auto] content-start gap-x-global gap-y-1 overflow-hidden text-sm leading-5",children:e.measurements_table.filter(m=>m.size!==null&&m.size!==0).slice(0,c).map((m,p)=>jsxRuntime.jsxs("div",{className:"contents",children:[jsxRuntime.jsx("dt",{className:"truncate",children:m.name}),jsxRuntime.jsxs("dd",{children:[m.size," ",m.unit]})]},p))}),jsxRuntime.jsx(ve,{label:n,onClick:()=>u(true)})]}),jsxRuntime.jsx(Ln,{open:s,onOpenChange:u,title:o,closeLabel:a,portal:true,className:"w-[min(60rem,95vw)] max-w-none",children:s&&jsxRuntime.jsx("div",{className:"max-h-[75vh] min-w-0 overflow-auto",children:i({data:e})})})]})}r(Ew,"WorkbenchMeasurementsPreview");function Fw({item:e,playLabel:t,selectionMode:o}){let[n,a]=lt.useState(false);if(lt.useEffect(()=>a(false),[e.thumbnailSrc,e.src]),e.notice||e.status==="blocked")return jsxRuntime.jsx("div",{className:"flex size-full items-center justify-center bg-muted p-2 text-center text-xs text-muted-foreground",children:e.notice});let i=n?e.src:e.thumbnailSrc||e.src;return i?e.mediaType==="video"?jsxRuntime.jsxs("div",{"data-history-video-surface":true,className:"group relative size-full bg-[hsl(var(--monkeys-color-media-surface))]",children:[jsxRuntime.jsx("video",{src:i,autoPlay:true,muted:true,playsInline:true,preload:"metadata",onLoadedMetadata:({currentTarget:s})=>{Number.isFinite(s.duration)&&s.duration>0&&(s.currentTime=Math.min(.1,s.duration/2));},onLoadedData:({currentTarget:s})=>{s.currentTime>0&&s.pause();},onSeeked:({currentTarget:s})=>s.pause(),className:"size-full object-contain","aria-label":e.alt}),jsxRuntime.jsx("div",{"data-history-video-overlay":true,"aria-hidden":"true",className:"pointer-events-none absolute inset-0 bg-[hsl(var(--monkeys-color-media-overlay)/0)] transition-colors duration-150 group-hover:bg-[hsl(var(--monkeys-color-media-overlay)/.25)] group-focus-within:bg-[hsl(var(--monkeys-color-media-overlay)/.25)]"}),jsxRuntime.jsx(ve,{ariaLabel:t,"data-history-play":true,tabIndex:o?-1:0,variant:"ghost",size:"lg",iconOnly:true,className:"monkeys-media-overlay-action absolute left-1/2 top-1/2 z-10 size-10 -translate-x-1/2 -translate-y-1/2 p-0 [--monkeys-component-media-action-radius:9999px] [--monkeys-component-media-action-opacity:.55] [--monkeys-component-media-action-hover-opacity:.7] focus-visible:ring-2 focus-visible:ring-[hsl(var(--monkeys-color-media-foreground))]",icon:jsxRuntime.jsx(lucideReact.Play,{className:"size-4 fill-current"})})]}):jsxRuntime.jsx("img",{src:i,alt:e.alt??"",loading:"lazy",onError:()=>{!n&&e.src&&i!==e.src&&a(true);},className:"size-full object-contain opacity-100"}):jsxRuntime.jsx("div",{className:"size-full bg-muted","aria-hidden":"true"})}r(Fw,"HistoryMedia");function Hw({items:e,loading:t=false,loadingMore:o=false,error:n,hasMore:a=false,pageKey:i,expanded:s,selectedIds:u,selectionMode:c,className:d,itemClassName:g,labels:m,busy:p=false,popupScale:f=1,panelClassName:b,buttonClassName:v,buttonVariant:y="outline",onRetry:x,onLoadMore:w,onExpandedChange:h,onSelectionModeChange:k,onSelectedIdsChange:C,onItemActivate:T,onDelete:S,onItemDragStart:I}){let R=lt.useRef(null),[W,H]=lt.useState(),[L,F]=lt.useState(false),[$,M]=lt.useState(false),[G,Y]=lt.useState([]),N=s??L,D=c??$,B=u??G,K=lt.useMemo(()=>new Set(B),[B]),J=lt.useRef(B);J.current=B;let V=Number.isFinite(f)&&f>0?f:1;lt.useLayoutEffect(()=>{if(!N||!R.current)return;let P=0,_=r(()=>{let ye=R.current?.getBoundingClientRect();ye&&H({left:ye.left,width:ye.width,bottom:Math.max(0,window.innerHeight-ye.bottom)});},"measure"),re=r(()=>{cancelAnimationFrame(P),P=requestAnimationFrame(_);},"schedule");_();let fe=typeof ResizeObserver=="function"?new ResizeObserver(re):void 0;return fe?.observe(R.current),window.addEventListener("resize",re),window.addEventListener("scroll",re,true),()=>{fe?.disconnect(),cancelAnimationFrame(P),window.removeEventListener("resize",re),window.removeEventListener("scroll",re,true);}},[N]),lt.useEffect(()=>{let P=new Set(e.map(re=>re.id)),_=B.filter(re=>P.has(re));_.length!==B.length&&(Y(_),C?.(_));},[e,B,C]);let Q=r(P=>{s===void 0&&F(P),h?.(P);},"setExpanded"),j=r(P=>{c===void 0&&M(P),k?.(P),P||Z([]);},"setSelection"),Z=r(P=>{J.current=P,u===void 0&&Y(P),C?.(P);},"updateSelection"),te=r(P=>{if(p||P.selectable===false)return;let _=J.current;Z(_.includes(P.id)?_.filter(re=>re!==P.id):[..._,P.id]);},"toggle"),ae=r(P=>{let _=K.has(P.id),re=P.selectable!==false&&!p;return jsxRuntime.jsxs("div",{"data-history-selection-key":P.id,"data-history-item-id":P.id,role:D?"checkbox":"button","aria-checked":D?_:void 0,"aria-label":D?P.label??m.selectItem:P.alt,"aria-disabled":(D?!re:P.disabled)||void 0,tabIndex:(D?re:!P.disabled)?0:void 0,draggable:!!(P.draggable&&!D&&!P.disabled),onDragStart:fe=>{if(!P.draggable||D||P.disabled){fe.preventDefault();return}I?.(fe,P);},onClick:fe=>{D?(fe.stopPropagation(),te(P)):P.disabled||T?.(P);},onKeyDown:fe=>{(fe.key===" "||fe.key==="Enter")&&(fe.preventDefault(),D?te(P):P.disabled||T?.(P));},...P.dataAttributes,className:l("group relative aspect-square min-w-0 overflow-hidden rounded-md border border-border/60 bg-transparent outline-hidden transition-[box-shadow,border-color,opacity] focus-visible:ring-2 focus-visible:ring-ring",_&&"border-primary ring-2 ring-primary/70",P.disabled&&"opacity-60",D&&re&&"cursor-pointer",g),children:[jsxRuntime.jsx(Fw,{item:P,playLabel:m.playVideo,selectionMode:D}),D&&re?jsxRuntime.jsx("span",{className:"pointer-events-none absolute right-1 top-1 z-10 flex items-center justify-center",children:jsxRuntime.jsx(pn,{checked:_,controlSize:"sm","aria-hidden":"true",tabIndex:-1,readOnly:true})}):null]},P.id)},"renderItem"),le=r(P=>jsxRuntime.jsx(on,{items:e,config:{getItemKey:r(_=>_.id,"getItemKey"),layout:{mode:P,cardWidth:P==="rail"?72:void 0,idealCardWidth:72,gap:8,getItemAspectRatio:r(()=>1,"getItemAspectRatio"),scrollOwner:"parent"},state:{loading:t,loadingMore:o&&a,hasMore:a},loading:{rootMargin:"1px",pageKey:i,variant:"spinner",autoFill:true},windowed:true,appearance:{hover:"none"},labels:{collection:m.ariaLabel,loading:m.loading,loadingMore:m.loadingMore,empty:m.empty}},classNames:{loadMore:"h-px min-h-0 overflow-hidden"},slots:{loadMore:jsxRuntime.jsx("span",{"aria-hidden":"true",className:"block h-px"})},callbacks:{onLoadMore:P==="grid"||!N?w:void 0},renderItem:ae}),"collection"),A=r((P,_,re,fe=false)=>jsxRuntime.jsx(ve,{icon:jsxRuntime.jsx(P,{className:"size-full"}),iconOnly:true,ariaLabel:_,size:"md",variant:y,className:v,disabled:fe,onClick:re}),"button"),me=jsxRuntime.jsxs("div",{role:"alert",className:"flex min-h-20 flex-col items-center justify-center gap-1 p-2 text-center text-sm",children:[jsxRuntime.jsx("span",{children:m.loadError}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:m.loadErrorDescription}),x?jsxRuntime.jsx(ve,{size:"sm",variant:"outline",label:m.retry,onClick:x}):null]});return jsxRuntime.jsxs("div",{ref:R,"data-workbench-history-result":true,className:l("relative w-full min-w-0 max-w-full rounded-lg",b,d),children:[e.length?jsxRuntime.jsxs("div",{className:"flex min-w-0 items-center gap-2 p-3",children:[A(N?lucideReact.Minimize2:lucideReact.Maximize2,N?m.collapse:m.expand,()=>Q(!N)),jsxRuntime.jsx("div",{className:"min-w-0 flex-1",children:le("rail")})]}):t?jsxRuntime.jsx(Yo,{title:m.loading,variant:"spinner",className:"min-h-20 p-2"}):n?me:jsxRuntime.jsx(Ba,{title:m.empty,className:"min-h-20 p-2"}),N&&typeof document<"u"?reactDom.createPortal(jsxRuntime.jsxs("div",{"data-history-expanded":true,className:l("fixed z-50 rounded-lg border border-border bg-card text-card-foreground shadow-xl",b),style:{left:W?.left??0,width:(W?.width??0)/V,bottom:W?.bottom??0,transform:`scale(${V})`,transformOrigin:"left bottom"},children:[jsxRuntime.jsxs("div",{className:"max-h-[50vh] overflow-y-auto p-3",style:{marginBottom:72,maxHeight:"50vh",overflowY:"auto"},children:[le("grid"),n&&e.length?jsxRuntime.jsxs("div",{role:"alert",className:"flex items-center gap-2 text-xs",children:[m.refreshError,x?jsxRuntime.jsx(ve,{size:"sm",label:m.retry,onClick:x}):null]}):null]}),jsxRuntime.jsxs("div",{className:"absolute inset-x-3 bottom-3 flex items-center justify-between gap-2",children:[A(lucideReact.Minimize2,m.collapse,()=>Q(false)),jsxRuntime.jsx("div",{className:"flex items-center gap-1.5",children:D?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"rounded-full border border-border px-2 py-1 text-xs",children:m.selectedCount}),A(lucideReact.X,m.exitSelection,()=>j(false),p),S?A(lucideReact.Trash2,m.deleteSelected,()=>{p||S(B);},!B.length||p):null]}):S?A(lucideReact.Trash2,m.enterSelection,()=>j(true),p):null})]})]}),document.body):null]})}r(Hw,"WorkbenchHistoryResult");function $w({open:e,title:t,description:o,name:n,nameLabel:a,namePlaceholder:i,createLabel:s,cancelLabel:u,closeLabel:c,creating:d=false,error:g,showError:m=true,className:p,onOpenChange:f,onNameChange:b,onCreate:v}){let y=lt.useId(),x=lt.useRef(null),[w,h]=lt.useState(false),[k,C]=lt.useState(null),T=lt.useRef(false),S=lt.useRef(false);lt.useEffect(()=>{e||(T.current=false,C(null),h(false));},[e]);let I=d,R=r(L=>{!I&&!S.current&&f?.(L);},"close"),W=r(async()=>{if(!(!n.trim()||I||S.current||T.current||!v)){S.current=true,h(true);try{await v();}finally{S.current=false;}}},"create"),H={radius:"lg"};return jsxRuntime.jsx(Ln,{open:e,onOpenChange:R,title:t,description:o,closeLabel:c,closeOnEscape:!I,closeOnOverlayClick:!I,showCloseButton:!I,portal:true,initialFocus:"explicit",initialFocusRef:x,className:p,classNames:{panel:"w-full max-w-[420px] gap-4 p-6",header:"border-0 p-0",title:"text-lg font-semibold leading-tight",description:"text-sm text-muted-foreground",body:"overflow-visible p-0",footer:"border-0 p-0"},footer:jsxRuntime.jsxs("div",{className:"flex justify-end gap-2",children:[jsxRuntime.jsx(ve,{size:"lg",appearance:H,className:"text-sm",disabled:I,onClick:()=>R(false),children:u}),jsxRuntime.jsx(ve,{size:"lg",tone:"primary",appearance:{...H,slots:{buttonPrimary:"border-primary bg-primary text-primary-foreground hover:bg-primary/90"}},className:"text-sm",loading:d,disabled:I||!n.trim(),onClick:W,children:s})]}),children:jsxRuntime.jsxs("div",{className:"space-y-4","data-monkeys-component":"create-collection-dialog",children:[jsxRuntime.jsxs("div",{className:"space-y-2 py-2",children:[jsxRuntime.jsx("label",{htmlFor:y,className:"text-sm font-medium leading-5",children:a}),jsxRuntime.jsx(pr,{ref:x,id:y,maxLength:80,"aria-label":a,placeholder:i,value:k??n,disabled:I,onCompositionStart:L=>{T.current=true,C(L.currentTarget.value);},onCompositionEnd:L=>{T.current=false,C(null),b?.(L.currentTarget.value);},onChange:L=>{T.current?C(L.currentTarget.value):b?.(L.currentTarget.value);},onKeyDown:L=>{L.key==="Enter"&&!L.nativeEvent.isComposing&&!T.current&&(L.preventDefault(),W());}})]}),w&&!d&&m&&g&&jsxRuntime.jsx("div",{role:"alert",className:"text-sm text-destructive-text",children:g})]})})}r($w,"WorkbenchCreateCollectionDialog");function Xw({open:e,items:t,selectedId:o,name:n,title:a,description:i,nameLabel:s,namePlaceholder:u,createLabel:c,confirmLabel:d,cancelLabel:g,closeLabel:m,loadingLabel:p,emptyLabel:f,loading:b=false,creating:v=false,adding:y=false,createError:x,confirmError:w,showCreateError:h=true,showConfirmError:k=true,className:C,onOpenChange:T,onSelectedIdChange:S,onNameChange:I,onCreate:R,onConfirm:W}){let H=lt.useId(),L=lt.useRef(null),F=lt.useRef(false),$=lt.useRef(false),[M,G]=lt.useState(null);lt.useEffect(()=>{e||(F.current=false);},[e]);let Y=v||y||M!==null,N=t.some(K=>K.id===o),D=r(K=>{!Y&&!$.current&&T?.(K);},"close"),B=r(async K=>{let J=K==="create"?R:W;if(!(Y||$.current||!J||(K==="create"?!n.trim()||F.current:!N))){$.current=true,G(K);try{await J();}catch{}finally{$.current=false,G(null);}}},"submit");return jsxRuntime.jsx(Ln,{open:e,onOpenChange:D,title:a,description:i,closeLabel:m,portal:true,closeOnEscape:!Y,closeOnOverlayClick:!Y,showCloseButton:!Y,initialFocus:"explicit",initialFocusRef:L,className:C,classNames:{panel:"w-full max-w-[480px] gap-global-2 p-6",header:"border-0 p-0",title:"text-lg font-semibold leading-tight",description:"text-sm text-muted-foreground",body:"-m-1 min-h-0 p-1",footer:"border-0 p-0"},footer:jsxRuntime.jsxs("div",{className:"flex justify-end gap-global",children:[jsxRuntime.jsx(ve,{variant:"outline",className:"h-10",appearance:{radius:"lg"},disabled:Y,onClick:()=>D(false),children:g}),jsxRuntime.jsx(ve,{variant:"outline",className:"h-10",appearance:{radius:"lg"},disabled:Y||!N,loading:y||M==="confirm",onClick:()=>B("confirm"),children:d})]}),children:jsxRuntime.jsxs("div",{className:"flex min-h-0 flex-col gap-global-2","data-monkeys-component":"add-to-collection-dialog","aria-busy":Y||b,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-global",children:[jsxRuntime.jsx(pr,{ref:L,id:H,"aria-label":s,placeholder:u,appearance:"shadow",className:"min-w-0 flex-1",value:n,disabled:Y,onChange:K=>I?.(K.currentTarget.value),onCompositionStart:()=>{F.current=true;},onCompositionEnd:()=>{F.current=false;},onKeyDown:K=>{K.key==="Enter"&&!K.nativeEvent.isComposing&&!F.current&&(K.preventDefault(),B("create"));}}),jsxRuntime.jsx(ve,{variant:"outline",appearance:{radius:"lg"},icon:jsxRuntime.jsx(lucideReact.FolderPlus,{}),className:"h-10 shrink-0",disabled:Y||!n.trim(),loading:v||M==="create",onClick:()=>B("create"),children:c})]}),h&&x&&jsxRuntime.jsx("p",{role:"alert",className:"text-sm text-destructive-text",children:x}),jsxRuntime.jsx("div",{className:"-m-1 flex max-h-80 min-h-0 flex-col gap-global overflow-y-auto p-1",role:"group","aria-label":a,children:t.length===0?jsxRuntime.jsx("p",{role:"status",className:"rounded-lg border border-dashed border-border px-global-2 py-global-2 text-center text-sm text-muted-foreground",children:b?p:f}):t.map(K=>jsxRuntime.jsx(ve,{variant:"outline",icon:jsxRuntime.jsx(lucideReact.FolderOpen,{className:"size-4 shrink-0","aria-hidden":"true"}),endIcon:o===K.id?jsxRuntime.jsx(lucideReact.Check,{className:"size-4 shrink-0","aria-hidden":"true"}):void 0,label:K.name,classNames:{label:"min-w-0 flex-1 truncate text-left"},"aria-pressed":o===K.id,disabled:Y,className:l("flex h-10 w-full shrink-0 items-center justify-start gap-global rounded-lg border px-global-2 py-global text-left text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",o===K.id?"border-foreground bg-muted text-foreground":"border-border bg-background text-foreground hover:bg-muted"),onClick:()=>S?.(K.id)},K.id))}),k&&w&&jsxRuntime.jsx("p",{role:"alert",className:"text-sm text-destructive-text",children:w})]})})}r(Xw,"WorkbenchAddToCollectionDialog");function Zw({renderPreview:e,...t}){return jsxRuntime.jsx(jsxRuntime.Fragment,{children:e(t)})}r(Zw,"WorkbenchMediaPreview");
|
|
65
65
|
|
|
66
66
|
Object.defineProperty(exports, "defaultIconPickerCatalogSource", {
|
|
67
67
|
enumerable: true,
|