@inf-monkeys-tech/monkeys-design 2.0.238 → 2.0.239
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/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/package.json +1 -1
|
@@ -26,7 +26,7 @@ import { z as z$1 } from 'zod';
|
|
|
26
26
|
import Dk, { defaultUrlTransform } from 'react-markdown';
|
|
27
27
|
import Lk from 'remark-gfm';
|
|
28
28
|
|
|
29
|
-
var Em=Object.defineProperty;var r=(e,t)=>Em(e,"name",{value:t,configurable:true});function l(...e){return twMerge(e.filter(Boolean).join(" "))}r(l,"cn");function z(e){return e!=null&&typeof e!="boolean"}r(z,"hasRenderableNode");function Al(e){return typeof e=="string"?e.trim().length>0:z(e)}r(Al,"hasNonEmptyRenderableNode");var zm=createContext(void 0);function zl(e){let t=useContext(zm);return useMemo(()=>e?t?{...t,...e,slots:{...t.slots,...e.slots},styles:{...t.styles,...e.styles}}:e:t,[e,t])}r(zl,"useDataExplorerAppearance");function Ot(...e){return e.filter(Boolean).join(" ")}r(Ot,"cn");function Zn(e,t){return typeof e=="function"?e(t):e}r(Zn,"resolveDataExplorerValue");var Om={},Fl={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"},Fm={flush:{surfaceRoot:"relative flex h-full min-h-0 w-full min-w-0 overflow-hidden"}},Hm={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"}},Vm={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"}},Gm={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"}},_m={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"}},Ol={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"}},jm={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"}},$m=Object.keys(Fl);function Km(...e){return $m.reduce((t,o)=>(t[o]=Ot(...e.map(n=>n?.[o])),t),{})}r(Km,"mergeSlots");function Um(...e){return e.reduce((t,o)=>({...t,...o}),{})}r(Um,"mergeStyles");function qm(e){let t=Ol[e];if(!t)throw new TypeError(`Unknown Data Explorer theme preset "${String(e)}". Expected one of: ${Object.keys(Ol).join(", ")}.`);return t}r(qm,"getPresetDefaults");function Hl(e){let t=e?.preset??"default",o=e?.surface??"card",n=qm(t),a=e?.density??n.density??"default",s=e?.radius??n.radius??"md",i=e?.border??n.border??"solid",m=e?.background??n.background??"plain",c=Km(Fl,jm[t],Hm[a],Vm[s],Gm[i],_m[m],e?.slots);return o==="flush"&&(c.surfaceRoot=Ot(Fm.flush.surfaceRoot,e?.slots?.surfaceRoot)),{surface:o,preset:t,density:a,radius:s,border:i,background:m,styles:Um(Om,e?.styles),slots:c}}r(Hl,"resolveDataExplorerAppearance");function Vl(e,t){if(t==="primary")return e.slots.menuItemPrimary;if(t==="danger")return e.slots.menuItemDanger;if(t==="muted")return e.slots.menuItemMuted}r(Vl,"getDataExplorerMenuItemToneClassName");var Ai={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",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 Gl(e,t){return t?{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(Gl,"mergeMonkeysLocaleMessages");var Qn={locale:Ai.locale,messages:Gl(Ai.messages)};var Ym=Object.freeze({}),Jm=Object.freeze({}),_l=Symbol.for("@inf-monkeys-tech/monkeys-design/provider-context@1");function Xm(){return Object.freeze({locale:createContext({...Qn,provided:false}),theme:createContext({provided:false}),direction:createContext({provided:false}),environment:createContext({provided:false,environment:Ym,portal:Jm})})}r(Xm,"createMonkeysProviderContexts");function Zm(){let e=globalThis,t=e[_l];if(t)return t;let o=Xm();return Object.defineProperty(e,_l,{value:o,enumerable:false,configurable:false,writable:false}),o}r(Zm,"getMonkeysProviderContexts");var oa=Zm(),zi=oa.locale,na=oa.theme,$l=oa.direction,ra=oa.environment;function Qm(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(Qm,"mergeAppearance");function xt(){try{return useContext(zi)??{...Qn,provided:!1}}catch{return {...Qn,provided:false}}}r(xt,"useMonkeysLocale");function vt(){return useContext(zi).messages}r(vt,"useMonkeysLocaleMessages");function nn(){return useContext(na).resolvedTheme}r(nn,"useMonkeysResolvedTheme");function Oe(e){let t=useContext(na).baseAppearance;return useMemo(()=>Qm(t,e),[e,t])}r(Oe,"useMonkeysBaseAppearance");function Co(){return useContext(na).statusStates??{}}r(Co,"useMonkeysStatusStates");function Oi(){return useContext($l).direction}r(Oi,"useMonkeysDirection");function Fi(){return useContext(ra).environment}r(Fi,"useMonkeysEnvironment");function Hi(){return useContext(ra).portal}r(Hi,"useMonkeysPortalOptions");function Ne(){let e=useContext(zi),t=useContext(na),o=useContext($l),n=e.provided||t.provided||o.provided;return 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 Vi(){return useContext(ra).iconResolver}r(Vi,"useMonkeysAssetIconResolver");function Kl(){return useContext(ra).imageResolver}r(Kl,"useMonkeysAssetImageResolver");function Ul(e,t){let o=new WeakMap,n=new Map,a=1;return (...s)=>{let i=s.slice(0,-1),m=s[s.length-1],c=i.map(u=>{if(!u)return 0;let p=o.get(u);return p===void 0&&(p=a++,o.set(u,p)),p}).join(":"),d=n.get(c);if(!d){let u={};for(let p of e)u[p]=t(...i.map(f=>f?.[p]));d=Object.freeze(u),n.size>=64&&n.delete(n.keys().next().value),n.set(c,d);}let g={...d};if(m)for(let u of e){let p=m[u];p&&(g[u]=t(...i.map(f=>f?.[u]),p));}return g}}r(Ul,"createStaticSlotMerger");var ep={},yt="motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",Jt="motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",aa="motion-safe:transition-transform motion-safe:duration-300 motion-safe:ease-out",ql=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"),tp=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)]"),Jl={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",Jt),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",Jt),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",aa),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",Jt),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",aa),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",Jt,"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",Jt),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",Jt),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",Jt),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",Jt),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",aa,"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",Jt),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",Jt),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)]",ql,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",tp),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]",ql),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",aa),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",Jt),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"},op={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"}},np={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"}},rp={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"}},ap={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"}},Yl={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"}},ip={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 sp(e){return Yl[e]??Yl.default}r(sp,"getPresetDefaults");var lp=Object.keys(Jl),dp=Ul(lp,l);function cp(...e){return Object.assign({},...e.filter(Boolean))}r(cp,"mergeStyles");function De(e){let t=e?.preset??"default",o=e?.variant??"default",n=sp(t),a=e?.density??n.density??"default",s=e?.state??"idle",i=e?.radius??n.radius??"md",m=e?.border??n.border??"solid",c=e?.background??n.background??"plain";return {preset:t,variant:o,density:a,state:s,radius:i,border:m,background:c,styles:cp(ep,e?.styles),slots:dp(Jl,ip[t],op[a],np[i],rp[m],ap[c],e?.slots)}}r(De,"resolveBaseAppearance");function ia(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(ia,"getBaseButtonToneClassName");function Xl(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(Xl,"getBaseBadgeToneClassName");function er(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(er,"getBaseMenuItemToneClassName");var Zl=Symbol.for("@inf-monkeys-tech/monkeys-design/bento-depth@1"),Ql=globalThis,ed=Ql[Zl]??(Ql[Zl]=createContext(0));function tr(){return useContext(ed)}r(tr,"useBentoDepth");function or({children:e,depth:t}){return jsx(ed.Provider,{value:t,children:e})}r(or,"BentoDepthProvider");function zo({children:e}){return jsx(or,{depth:0,children:e})}r(zo,"BentoScope");var sa=["background","glowColor","borderColor","borderWidth","borderStyle","radius","shadow","padding","gap"],pp={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)"},Gi=new WeakMap;function od(e,t){if(!Number.isSafeInteger(t)||t<1)throw new RangeError("Bento level must be a positive safe integer.");let o=e&&Gi.get(e)?.get(t);if(o)return o;let n={...pp},a=Object.fromEntries(sa.map(i=>[i,"builtin"]));for(let i of sa){let m=i==="padding"||i==="gap"?e?.density:e?.colorMode,c=i==="glowColor"?"component.bento":"semantic.bento",d=[`${c}.levels.level${t}.${i}`,`${c}.default.${i}`];for(let g of d){let u=m&&e?.cssValues[`${g}.${m}`]!==void 0?`${g}.${m}`:g,p=e?.cssValues[u];if(p!==void 0){n[i]=p,a[i]=u;break}}}let s=Object.freeze({values:Object.freeze(n),sources:Object.freeze(a)});if(e){let i=Gi.get(e)??new Map;i.set(t,s),Gi.set(e,i);}return s}r(od,"resolveBentoTokens");var nd="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 la(){let e=tr(),t=e+1,o=od(nn(),t),n=Object.fromEntries(sa.map(a=>[`--monkeys-bento-${a.replace(/[A-Z]/g,s=>`-${s.toLowerCase()}`)}`,o.values[a]]));return {parentDepth:e,level:t,variables:n}}r(la,"useBentoSurface");var rd="[data-monkeys-bento-level]",da="data-monkeys-scrollbar-active",ad='[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 ca(e,t=true){let o=useRef(),n=r(()=>{let s=o.current;s?.observer?.disconnect(),s?.marked.forEach(i=>i.removeAttribute(da)),o.current=void 0;},"clear");useEffect(()=>n,[t]);let a=r((s,i)=>{if(!t||!s.isConnected||!s.matches(rd))return;o.current?.root!==s&&(n(),o.current={root:s,hovered:false,marked:new Set});let m=o.current;if(i!==void 0&&(m.hovered=i),!(m.hovered||s.matches(":focus-visible")||!!s.querySelector(":focus-visible"))){m.observer?.disconnect(),m.observer=void 0,m.marked.forEach(g=>g.removeAttribute(da)),m.marked.clear();return}let d=new Set;for(let g of [s,...s.querySelectorAll(ad)])g.matches(ad)&&g.closest(rd)===s&&d.add(g);m.marked.forEach(g=>{d.has(g)||g.removeAttribute(da);}),d.forEach(g=>{m.marked.has(g)||g.setAttribute(da,"");}),m.marked=d,m.observer||(m.observer=new MutationObserver(()=>a(s)),m.observer.observe(s,{childList:true,subtree:true}));},"update");return {onPointerEnter(s){a(s.currentTarget,true),e.onPointerEnter?.(s);},onPointerLeave(s){a(s.currentTarget,false),e.onPointerLeave?.(s);},onFocusCapture(s){a(s.currentTarget),e.onFocusCapture?.(s);},onBlurCapture(s){let i=s.currentTarget;queueMicrotask(()=>a(i)),e.onBlurCapture?.(s);}}}r(ca,"useBentoScrollbarVisibility");function sd({as:e="article",title:t,description:o,media:n,header:a,footer:s,children:i,interactive:m,selected:c,disabled:d,appearance:g,variant:u,density:p,state:f,className:b,classNames:h,style:y,...v}){let k=De({...g,variant:u,density:p,state:f}),x=e,w=a!==void 0?z(a):z(t)||z(o),C=n!=null,S=!w&&!C;return jsxs(x,{...v,"aria-disabled":d||void 0,"data-variant":k.variant,"data-density":k.density,"data-state":f??(d?"disabled":c?"selected":"idle"),"data-monkeys-component":"panel","data-slot":"root","data-interactive":m||void 0,"data-selected":c||void 0,"data-disabled":d||void 0,className:l(k.slots.panelRoot,m&&!d&&k.slots.panelInteractive,c&&k.slots.panelSelected,d&&k.slots.panelDisabled,h?.root,b),style:{...k.styles.panel,...y},children:[C?jsx("div",{"data-slot":"media",className:l(k.slots.panelMedia,h?.media),children:n}):null,w?jsx("div",{"data-slot":"header",className:l(k.slots.panelHeader,h?.header),style:k.styles.panelHeader,children:a!==void 0?a:jsxs(Fragment,{children:[z(t)?jsx("div",{"data-slot":"title",className:l(k.slots.panelTitle,h?.title),children:t}):null,z(o)?jsx("div",{"data-slot":"description",className:l(k.slots.panelDescription,h?.description),children:o}):null]})}):null,i!=null?jsx("div",{"data-slot":"body",className:l(k.slots.panelBody,S&&k.slots.panelBodyStandalone,h?.body),style:k.styles.panelBody,children:i}):null,s!=null?jsx("div",{"data-slot":"footer",className:l(k.slots.panelFooter,h?.footer),style:k.styles.panelFooter,children:s}):null]})}r(sd,"BasePanel");var yp=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 ld({children:e,className:t,contentClassName:o,chrome:n="panel",headerWrap:a=false,title:s,titleIcon:i,action:m,appearance:c,classNames:d,...g}){let{parentDepth:u,level:p,variables:f}=la(),b=Oe(c),h=n==="panel",y=ca(g,h),v=yp(b?.styles?.panelBody,[d?.body,o,b?.slots?.panelBody].join(" "));return jsx(or,{depth:h?p:u,children:jsx(sd,{as:"section",appearance:{...b,slots:{...b?.slots,panelRoot:b?.slots?.panelRoot},styles:{...b?.styles,panelHeader:{...n==="plain"?{padding:0,paddingBlockEnd:"var(--global-spacing-lg, 1rem)"}:{},...b?.styles?.panelHeader},panelBody:{...!v||n==="plain"?{padding:0}:{},...b?.styles?.panelBody}}},classNames:{...d,root:l("min-h-0",h&&"gap-[var(--monkeys-bento-gap)]",h&&b?.radius===void 0&&!b?.preset&&"rounded-[var(--monkeys-bento-radius)]",h&&b?.border===void 0&&!b?.preset&&"border-[length:var(--monkeys-bento-border-width)] border-[color:var(--monkeys-bento-border-color)] [border-style:var(--monkeys-bento-border-style)]",h&&b?.background===void 0&&!b?.preset&&"bg-[var(--monkeys-bento-background)]",h&&!b?.preset&&b?.background===void 0&&"shadow-[shadow:var(--monkeys-bento-shadow)]",h&&!v&&"p-[var(--monkeys-bento-padding)]",!h&&"border-0 bg-transparent shadow-none",b?.slots?.panelRoot,d?.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",d?.header),body:l("flex min-h-0 flex-col gap-[var(--monkeys-bento-gap,var(--global-spacing,0.75rem))] p-0",b?.slots?.panelBody,d?.body,o),footer:l("px-0 pb-0 pt-[var(--monkeys-bento-gap)]",d?.footer)},header:s?jsxs("div",{style:{alignItems:b?.styles?.panelHeader?.alignItems},className:l("flex min-w-0 flex-1 items-center justify-between gap-token-md",a&&"flex-wrap"),children:[jsxs("div",{className:l("flex min-w-0 flex-1 items-center gap-token-sm",a&&"basis-auto"),children:[i?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:jsx(i,{className:"size-4 text-primary",color:"currentColor",stroke:"currentColor"})}):null,jsxs("div",{className:"min-w-0",children:[jsx("h2",{style:{margin:0},className:"truncate text-base font-semibold text-foreground",children:s}),g.description?jsx("div",{className:"mt-1 text-sm text-muted-foreground",children:g.description}):null]})]}),m?jsx("div",{className:l("shrink-0",a&&"max-w-full"),children:m}):null]}):void 0,...g,...y,"data-monkeys-bento-level":h?p:void 0,style:{...h?f:{},...g.style},children:e})})}r(ld,"BentoPanel");var hp={menu:"monkeys-overlay-surface--menu bg-menu-surface text-popover-foreground",dialog:"monkeys-overlay-surface--dialog bg-dialog-surface text-foreground"};function an(e,t={}){return ["monkeys-overlay-surface",hp[e],t.rounded===false?void 0:"monkeys-overlay-surface--rounded"].filter(Boolean).join(" ")}r(an,"getOverlaySurfaceClassName");var Cp=lt.forwardRef(({className:e,style:t,...o},n)=>jsx(So.Item,{ref:n,className:l("border-b",e),style:{borderColor:"var(--monkeys-component-accordion-item-border-color, hsl(var(--border)))",...t},...o}));Cp.displayName="AccordionItem";var Sp=lt.forwardRef(({className:e,children:t,...o},n)=>jsx(So.Header,{className:"flex",children:jsxs(So.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,jsx(ChevronDown,{"aria-hidden":"true",className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Sp.displayName="AccordionTrigger";var Tp=lt.forwardRef(({className:e,children:t,...o},n)=>jsx(So.Content,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o,children:jsx("div",{className:l("pb-4 pt-0",e),children:t})}));Tp.displayName="AccordionContent";var Rp=lt.forwardRef(({className:e,...t},o)=>jsx(ua.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:jsx(ua.Indicator,{className:"flex items-center justify-center text-current",children:jsx(Check,{"aria-hidden":"true",className:"h-4 w-4"})})}));Rp.displayName="Checkbox";var nr=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"}}),Np=lt.forwardRef(({className:e,variant:t,size:o,asChild:n=false,...a},s)=>jsx(n?Slot:"button",{ref:s,className:nr({variant:t,size:o,className:e}),...a}));Np.displayName="Button";var Ip=lt.forwardRef(({className:e,children:t,viewportClassName:o,viewportRef:n,onViewportScroll:a,scrollbar:s=true,scrollbarOrientation:i="vertical",scrollBarDisabled:m=false,type:c,...d},g)=>{let u=tr();return jsxs(so.Root,{ref:g,type:c??(u>0?"auto":void 0),className:l("group relative overflow-hidden",m&&"no-scrollbar",e),...d,children:[jsx(so.Viewport,{ref:n,onScroll:a,className:l("h-full w-full rounded-[inherit]",o),children:t}),s?jsx(dd,{orientation:i,className:l(m&&"size-0 p-0")}):null,jsx(so.Corner,{})]})});Ip.displayName="ScrollArea";var dd=lt.forwardRef(({className:e,orientation:t="vertical",...o},n)=>jsx(so.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:jsx(so.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));dd.displayName="ScrollBar";var Mp=lt.forwardRef(({className:e,...t},o)=>jsx(ma.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:jsx(ma.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"})}));Mp.displayName="Switch";var Bp=lt.forwardRef(({variant:e="default",...t},o)=>jsx(Oo.Root,{ref:o,"data-variant":e,...t}));Bp.displayName="Tabs";var Pp=lt.forwardRef(({className:e,gap:t,style:o,...n},a)=>jsx(Oo.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}));Pp.displayName="TabsList";var Ep=lt.forwardRef(({className:e,...t},o)=>jsx(Oo.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}));Ep.displayName="TabsTrigger";var Dp=lt.forwardRef(({className:e,...t},o)=>{let n=tr();return jsx(Oo.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})});Dp.displayName="TabsContent";var Wp=lt.forwardRef(({className:e,sideOffset:t=4,...o},n)=>{let a=Ne();return jsx(lo.Portal,{children:jsx(lo.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",an("menu"),e)})})});Wp.displayName="TooltipContent";var rr=lt.forwardRef(({className:e,appearance:t="standard",type:o,...n},a)=>jsx("input",{ref:a,type:o,className: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),...n}));rr.displayName="Input";var Lp=lt.forwardRef(({className:e,appearance:t="standard",...o},n)=>jsx("textarea",{ref:n,className: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),...o}));Lp.displayName="Textarea";function pa(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(pa,"svgPreviewSurface");var Ap=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"),Ki=lt.forwardRef(({aspectRatio:e="square",maxSquareHeight:t=true,className:o,...n},a)=>jsx("div",{ref:a,className:Ap({aspectRatio:e,maxSquareHeight:t,className:o}),...n}));Ki.displayName="MediaPreviewFrame";var ar=lt.forwardRef(({fit:e="contain",className:t,style:o,...n},a)=>{let s=pa(n.src);return jsx("img",{ref:a,className:l("block size-full",e==="contain"?"object-contain":"object-cover",t),style:{...s,...s?{objectFit:e}:{},...o},...n})});ar.displayName="MediaPreviewImage";var pd=Symbol.for("@inf-monkeys-tech/monkeys-design/dialog-dock@1"),gd=globalThis,Fp=gd[pd]??(gd[pd]=lt.createContext(null)),Lt=r(()=>lt.useContext(Fp),"useDialogDock");var Ui=lt.forwardRef(({children:e,className:t,style:o,closeLabel:n="Close",showCloseButton:a=true,onInteractOutside:s,...i},m)=>{let c=Lt(),d=lt.useId(),g=lt.useRef(null),u=lt.useRef(false);return lt.useEffect(()=>{u.current&&!c?.collapsed&&c?.activeId===d&&g.current?.focus(),u.current=!!c?.collapsed;},[c?.collapsed,c?.activeId,d]),lt.useEffect(()=>c?.register(d),[c?.register,d]),c?.container?jsx(bt.Portal,{container:c.container,children:jsx("div",{style:{display:"contents"},children:jsx(zo,{children:jsx(ld,{className:"monkeys-dialog-dock-panel overflow-auto",contentClassName:"shrink-0",style:{display:c.activeId===d?void 0:"none"},children:jsxs(bt.Content,{...i,ref:m,"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=>{s?.(p),p.preventDefault();},children:[e,c.collapsible&&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:jsx(PanelRightClose,{"aria-hidden":"true",className:"size-4"})}),a&&jsxs(bt.Close,{className:"monkeys-dialog-dock-close","aria-label":typeof n=="string"?n:void 0,children:[jsx(X,{"aria-hidden":"true",className:"size-4"}),jsx("span",{className:"sr-only",children:n})]})]})})})})}):null});Ui.displayName="DockedDialogContent";var fd=Symbol.for("@inf-monkeys-tech/monkeys-design/dialog-open@1"),yd=globalThis,hd=yd[fd]??(yd[fd]=lt.createContext(false));function ba({open:e,defaultOpen:t,onOpenChange:o,modal:n,...a}){let s=Lt(),[i,m]=lt.useState(t??false),c=e??i;return jsx(hd.Provider,{value:c,children:jsx(bt.Root,{...a,open:c,modal:s?false:n,onOpenChange:d=>{m(d),o?.(d);}})})}r(ba,"Dialog");var Vp=bt.Portal;var xd=lt.forwardRef(({className:e,...t},o)=>{let n=Ne();return jsx(bt.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})});xd.displayName="DialogOverlay";var vd=lt.forwardRef(({className:e,...t},o)=>{let n=Ne();return jsx(bt.Content,{...n,...t,ref:o,className:e,"data-monkeys-component":"dialog","data-slot":"content","data-surface":"dialog","data-monkeys-dialog-content":true})});vd.displayName="DialogSurfaceContent";var ln=lt.forwardRef(({className:e,children:t,showCloseButton:o=true,closeLabel:n="Close",overlayClassName:a,overlayStyle:s,...i},m)=>{let c=Lt(),d=lt.useContext(hd);return c?d?jsx(Ui,{...i,ref:m,className:e,showCloseButton:o,closeLabel:n,children:t}):null:jsxs(Vp,{children:[jsx(xd,{className:a,style:s}),jsxs(vd,{...i,ref:m,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",an("dialog"),e),children:[jsx(zo,{children:t}),o?jsxs(bt.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:[jsx(X,{"aria-hidden":"true",className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:n})]}):null]})]})});ln.displayName="DialogContent";var Gp=lt.forwardRef(({className:e,...t},o)=>jsx(ln,{ref:o,className:l("duration-0 data-[state=open]:animate-none data-[state=closed]:animate-none",e),...t}));Gp.displayName="DialogContentNoAnimation";var _p=r(({className:e,...t})=>jsx("div",{className:l(Lt()?.showTitle===false?"contents":"flex flex-col space-y-1.5 text-center sm:text-left",e),...t}),"DialogHeader");_p.displayName="DialogHeader";var jp=r(({className:e,...t})=>jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),"DialogFooter");jp.displayName="DialogFooter";var ir=lt.forwardRef(({className:e,...t},o)=>jsx(bt.Title,{ref:o,className:l("text-lg font-semibold leading-none tracking-tight",e,Lt()?.showTitle===false&&"sr-only"),...t}));ir.displayName="DialogTitle";var sr=lt.forwardRef(({className:e,...t},o)=>jsx(bt.Description,{ref:o,className:l("text-sm text-muted-foreground",e),...t}));sr.displayName="DialogDescription";lt.forwardRef((e,t)=>{let o=Lt()?bt.Trigger:wt.Trigger;return jsx(o,{...e,ref:t})});var $p=wt.Portal,kd=lt.forwardRef(({className:e,style:t,...o},n)=>{let a=Ne();return jsx(wt.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}})});kd.displayName="AlertDialogOverlay";var Kp=lt.forwardRef(({className:e,style:t,children:o,...n},a)=>{let s=Ne();return Lt()?jsx(ln,{...n,...s,ref:a,role:"alertdialog",showCloseButton:false,className:e,style:t,children:o}):jsxs($p,{children:[jsx(kd,{}),jsx(wt.Content,{...s,...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",an("dialog"),e),"data-monkeys-component":"alert-dialog","data-slot":"content","data-surface":"dialog","data-monkeys-dialog-content":true,style:{pointerEvents:"auto",...t},children:jsx(zo,{children:o})})]})});Kp.displayName="AlertDialogContent";var Up=r(({className:e,...t})=>jsx("div",{className:l("flex flex-col space-y-2 text-center sm:text-left",e),...t}),"AlertDialogHeader"),qp=r(({className:e,...t})=>jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),"AlertDialogFooter"),Yp=lt.forwardRef(({className:e,...t},o)=>{let n=Lt()?bt.Title:wt.Title;return jsx(n,{ref:o,className:l("text-lg font-semibold",e,Lt()?.showTitle===false&&"sr-only"),...t})}),Jp=lt.forwardRef(({className:e,...t},o)=>{let n=Lt()?bt.Description:wt.Description;return jsx(n,{ref:o,className:l("text-sm text-muted-foreground",e),...t})}),Xp=lt.forwardRef(({className:e,...t},o)=>{let n=Lt()?bt.Close:wt.Action;return jsx(n,{ref:o,className:l(nr(),e),...t})}),Zp=lt.forwardRef(({className:e,...t},o)=>{let n=Lt()?bt.Close:wt.Action;return jsx(n,{ref:o,className:l(nr({variant:"destructive"}),e),...t})}),Qp=lt.forwardRef(({className:e,...t},o)=>{let n=Lt()?bt.Close:wt.Cancel;return jsx(n,{ref:o,className:l(nr({variant:"outline"}),"mt-2 sm:mt-0",e),...t})});Up.displayName="AlertDialogHeader";qp.displayName="AlertDialogFooter";Yp.displayName="AlertDialogTitle";Jp.displayName="AlertDialogDescription";Xp.displayName="AlertDialogAction";Zp.displayName="AlertDialogDangerAction";Qp.displayName="AlertDialogCancel";var Sd=Xt.Root,Td=Xt.Trigger;var qi=lt.forwardRef(r(function({align:t="center",sideOffset:o=4,container:n,className:a,style:s,...i},m){let c=Ne(),d=typeof document<"u"?(()=>{let u=document.activeElement?.closest("[data-monkeys-dialog-content]");return u||Array.from(document.querySelectorAll('[data-monkeys-dialog-content][data-state="open"]')).at(-1)})():void 0;return jsx(Xt.Portal,{container:n??d,children:jsx(Xt.Content,{...c,...i,ref:m,align:t,sideOffset:o,"data-monkeys-component":"popover","data-slot":"content","data-surface":"menu",className:l("z-50 w-72 border p-4 outline-hidden",an("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",a),style:{pointerEvents:"auto",...s}})})},"PopoverContent"));qi.displayName=Xt.Content.displayName;var Rd=["pulse","shimmer","shimmer-soft","shimmer-diagonal","shimmer-vertical","drift","outline","none"];function Id(e,t=false){if(!(e===void 0||Rd.includes(e))&&!(t&&(e==="shimmer-shared"||e==="shimmer-stagger")))throw new TypeError(`Skeleton animation must be ${Rd.join(", ")}${t?", shimmer-shared, or shimmer-stagger":""}.`)}r(Id,"validateSkeletonAnimation");var Ji=createContext(null),dr=createContext(void 0);function Xi(e){delete e.dataset.skeletonReady;for(let t of ["width","offset","delay"])e.style.removeProperty(`--monkeys-skeleton-${t}`);}r(Xi,"clearGeometry");function tg(e,t,o,n){let a=useMemo(()=>({nodes:new Map,update:r(()=>{},"update")}),[]);return useEffect(()=>{if(!o||t||e!=="shimmer-shared"&&e!=="shimmer-stagger")return;let s=window.matchMedia("(prefers-reduced-motion: reduce)"),i,m,c=false,d=new Set,g=r(()=>{if(m=void 0,!c)return;let b=[...a.nodes.keys()].filter(C=>C.isConnected);if(b.sort((C,S)=>C.compareDocumentPosition(S)&2?1:-1),e==="shimmer-stagger"){b.forEach((C,S)=>{let T=a.nodes.get(C)?.item??S;C.style.setProperty("--monkeys-skeleton-delay",`${Math.min(T*80,400)}ms`);});return}let h=n?.current??b[0]?.parentElement;for(let C of b)for(;h&&!h.contains(C);)h=h.parentElement;let y=new Set(b);for(let C of b)for(let S=C.parentElement;S&&(y.add(S),S!==h);S=S.parentElement);h&&y.add(h);for(let C of d)y.has(C)||(i?.unobserve(C),d.delete(C));for(let C of y)d.has(C)||(i?.observe(C),d.add(C));let v=b.map(C=>C.getBoundingClientRect()),k=b.map((C,S)=>{let T=getComputedStyle(C),E=T.boxSizing==="border-box"?0:parseFloat(T.paddingLeft)+parseFloat(T.paddingRight)+parseFloat(T.borderLeftWidth)+parseFloat(T.borderRightWidth),N=parseFloat(T.width)+E,O=N?v[S].width/N:1;return Math.abs(O-1)<1e-4?1:O}),x=Math.min(...v.map(C=>C.left)),w=Math.max(...v.map(C=>C.right));b.forEach((C,S)=>{let T=v[S];if(!T.width||!T.height){Xi(C);return}let E=k[S];C.style.setProperty("--monkeys-skeleton-width",`${(w-x)/E}px`),C.style.setProperty("--monkeys-skeleton-offset",`${(x-T.left)/E}px`),C.dataset.skeletonReady||(C.style.setProperty("--monkeys-skeleton-delay",`${-(performance.now()%2600)}ms`),C.dataset.skeletonReady="true");});},"measure"),u=r(()=>{c&&m===void 0&&(m=window.requestAnimationFrame(g));},"schedule"),p=r(()=>{c=false,i?.disconnect(),i=void 0,d.clear(),m!==void 0&&window.cancelAnimationFrame(m),m=void 0,window.removeEventListener("resize",u),window.removeEventListener("scroll",u,true),a.nodes.forEach((b,h)=>Xi(h));},"stop"),f=r(()=>{p(),!(s.matches||e==="shimmer-shared"&&typeof ResizeObserver>"u")&&(c=true,e==="shimmer-shared"&&(i=new ResizeObserver(u),window.addEventListener("resize",u),window.addEventListener("scroll",u,{capture:true,passive:true})),u());},"start");return a.update=u,f(),s.addEventListener("change",f),()=>{p(),s.removeEventListener("change",f),a.update=()=>{};}},[e,t,o,a,n]),useEffect(()=>{a.update();}),a}r(tg,"useGroupRegistry");function Ho({animation:e,animated:t,children:o,independent:n=false,containerRef:a}){if(Id(e,true),t!==void 0&&typeof t!="boolean")throw new TypeError("SkeletonGroup animated must be a boolean.");let s=useContext(Ji),i=useContext(dr),m=n||e!==void 0||!s,c=e??s?.animation??"pulse",d=!!s?.disabled||t===false||c==="none",g=tg(c,d,m,a),u=useMemo(()=>({animation:c,disabled:d,registry:m?g:s.registry}),[c,d,m,g,s]),p=jsx(Ji.Provider,{value:u,children:o});return jsx(dr.Provider,{value:m?void 0:i,children:p})}r(Ho,"SkeletonScope");function Tn({index:e,children:t}){let o=useContext(dr);return jsx(dr.Provider,{value:o??e,children:t})}r(Tn,"SkeletonItem");function og(e,t){return 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(og,"useSkeletonRef");function Md(e,t=true,o){Id(e);let n=useContext(Ji),a=useContext(dr),s=!t||n?.disabled?"none":e??n?.animation??"pulse",[i,m]=useState(null),c=og(m,o),d=e===void 0&&(s==="shimmer-shared"||s==="shimmer-stagger")?n?.registry:void 0;return useEffect(()=>{if(!(!i||!d))return d.nodes.set(i,{item:a}),d.update(),()=>{d.nodes.delete(i),Xi(i),d.update();}},[i,d,a,s]),{ref:c,mode:s,style:s==="shimmer-stagger"&&a!==void 0?{"--monkeys-skeleton-delay":`${Math.min(a*80,400)}ms`}:void 0}}r(Md,"useSkeletonMotion");function Pd(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(Pd,"resolveBaseFieldValidationResult");var es=createContext(null);function Vo(){let e=useContext(es),t=useRef(null);t.current===null&&(t.current=Symbol("BaseFieldControl"));let o=e?.registerControl;useEffect(()=>{if(!(!o||t.current===null))return o(t.current)},[o]);let n=e?.notifyBlur,a=e?.notifyChange;return {invalid:e?.invalid??false,notifyBlur:useCallback(s=>n?.(s),[n]),notifyChange:useCallback(s=>a?.(s),[a])}}r(Vo,"useBaseFieldControl");var ug={sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"},mg={sm:"text-[10px]",md:"text-[11px]",lg:"text-xs"};function pg(e,...t){for(let o of t)if(o){if(typeof o=="function"){o(e);continue}o.current=e;}}r(pg,"setRefs");var dn=forwardRef(r(function({label:t,description:o,indeterminate:n=false,invalid:a=false,disabled:s=false,controlSize:i,appearance:m,className:c,classNames:d,style:g,checked:u,defaultChecked:p,onBlur:f,onChange:b,"aria-invalid":h,...y},v){for(let[D,M]of [["indeterminate",n],["invalid",a],["disabled",s]])if(typeof M!="boolean")throw new TypeError(`BaseCheckbox ${D} must be a boolean.`);if(i!==void 0&&i!=="sm"&&i!=="md"&&i!=="lg")throw new TypeError('BaseCheckbox controlSize must be "sm", "md", or "lg".');let k=Oe(m),x=Ne(),w=De(k),C=Vo(),S=a||C.invalid,T=z(t),E=Al(o),N=useRef(null),O=useRef(n);O.current=n;let[V,W]=useState(p??false),F=u!==void 0,H=!!(F?u:V),I=n||H,G=n?"mixed":H?"checked":"unchecked",q=useCallback(D=>{N.current=D,D&&(D.indeterminate=O.current),pg(D,v);},[v]);useEffect(()=>{N.current&&(N.current.indeterminate=n);},[n]);let R=r(D=>{s||(F||W(D.currentTarget.checked),b?.(D),C.notifyChange(D.currentTarget.checked),N.current&&(N.current.indeterminate=n));},"handleChange");return jsxs("label",{...x,"data-monkeys-component":"checkbox","data-slot":"root","data-state":G,"data-size":i,"data-invalid":S||void 0,"data-disabled":s||void 0,className:l(w.slots.checkboxRoot,!E&&"items-center",s&&w.slots.checkboxDisabled,d?.root,c),style:{...w.styles.checkboxRoot,...g},children:[jsxs("span",{"data-slot":"box","data-state":G,"data-size":i,className:l(w.slots.checkboxBox,!E&&"mt-0",I&&w.slots.checkboxBoxChecked,S&&w.slots.checkboxBoxInvalid,i&&ug[i],d?.box),style:{...w.styles.checkboxBox},children:[jsx("input",{...y,ref:q,type:"checkbox",disabled:s,checked:u,defaultChecked:p,"aria-invalid":h??(S||void 0),"aria-checked":n?"mixed":H,"data-slot":"input","data-state":G,"data-size":i,"data-invalid":S||void 0,"data-disabled":s||void 0,className:l(w.slots.checkboxInput,d?.input),onBlur:D=>{f?.(D),C.notifyBlur(D.currentTarget.checked);},onChange:R}),I?jsx("span",{"aria-hidden":"true","data-slot":"indicator","data-state":G,"data-size":i,className:l(w.slots.checkboxIndicator,i&&mg[i],d?.indicator),children:n?"\u2013":"\u2713"}):null]}),T||E?jsxs("span",{"data-slot":"content",className:l(w.slots.checkboxContent,d?.content),children:[T?jsx("span",{"data-slot":"label",className:l(w.slots.checkboxLabel,d?.label),children:t}):null,E?jsx("span",{"data-slot":"description",className:l(w.slots.checkboxDescription,d?.description),children:o}):null]}):null]})},"BaseCheckbox"));function os(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(os,"resolveContainerValue");function Dd({explicitProvided:e,explicitContainer:t,providerProvided:o,providerContainer:n,getDocument:a}){if(e)return os(t,"BasePortal container");if(o)return os(n,"MonkeysProvider portal.container");if(!a)return null;let s=a();if(s===null)return null;if(!s||typeof s!="object"||!("body"in s))throw new TypeError("MonkeysProvider environment.getDocument must resolve to a Document or null.");return os(s.body,"MonkeysProvider environment.getDocument().body")}r(Dd,"resolveBasePortalContainer");function yg({mounted:e,explicitDisabled:t,explicitContainer:o,providerDisabled:n,providerContainer:a,getDocument:s}){let i=t??n??false;if(!e||i)return {mounted:e,disabled:i,shouldPortal:false,container:null,radixPortalProps:void 0};let m=Dd({explicitProvided:o!==void 0,explicitContainer:o,providerProvided:a!==void 0,providerContainer:a,getDocument:s});return m?{mounted:true,disabled:false,shouldPortal:true,container:m,radixPortalProps:Object.freeze({container:m})}:{mounted:true,disabled:false,shouldPortal:false,container:null,radixPortalProps:void 0}}r(yg,"resolveBaseOverlayPortalState");function hg(){return globalThis.document??null}r(hg,"getDefaultDocument");function To(e={}){let t=Fi(),o=Hi(),[n,a]=useState(false);return useEffect(()=>{a(true);},[]),yg({mounted:n,explicitDisabled:e.disabled,explicitContainer:e.container,providerDisabled:o.disabled,providerContainer:o.container,getDocument:t.getDocument??hg})}r(To,"useBaseOverlayPortal");function Wd(e,t){return t.shouldPortal?createPortal(e,t.container):jsx(Fragment,{children:e})}r(Wd,"renderBaseOverlayPortalContent");function ya(e,t){if(typeof e!="boolean")throw new TypeError(`BaseTooltip ${t} must be a boolean.`)}r(ya,"validateBoolean");function Tg(e){if(e!=="top"&&e!=="bottom"&&e!=="left"&&e!=="right")throw new TypeError('BaseTooltip placement must be "top", "bottom", "left", or "right".')}r(Tg,"validatePlacement");function Rg(e,t){return isValidElement(e)&&e.type!==Fragment$1?e:jsx("span",{tabIndex:!t&&z(e)?0:void 0,children:e})}r(Rg,"normalizeTrigger");var cr=forwardRef(r(function({content:t,children:o,open:n,defaultOpen:a=false,placement:s="top",disabled:i=false,portal:m=false,appearance:c,className:d,classNames:g,style:u,onOpenChange:p,...f},b){n!==void 0&&ya(n,"open"),ya(a,"defaultOpen"),ya(i,"disabled"),ya(m,"portal"),Tg(s);let h=Oe(c),y=Ne(),v=De(h),k=To({disabled:!m}),[x,w]=useState(a),C=n!==void 0,S=!i&&z(t),E=S&&(C?n:x),N=m&&k.shouldPortal?"portaled":"inline",O=r(F=>{F&&!S||(C||w(F),p?.(F));},"handleOpenChange"),V=Rg(o,i),W=S?jsx(lo.Content,{...y,side:s,sideOffset:8,collisionPadding:8,"data-monkeys-component":"tooltip","data-slot":"content","data-placement":s,"data-portal":N,"data-disabled":i||void 0,className:l(v.slots.tooltipContent,g?.content),style:v.styles.tooltip,children:t}):null;return jsx("span",{...y,...f,ref:b,"data-monkeys-component":"tooltip","data-slot":"root","data-state":E?"open":"closed","data-placement":s,"data-portal":N,"data-disabled":i||void 0,className:l(v.slots.tooltipRoot,g?.root,d),style:u,children:jsx(lo.Provider,{delayDuration:0,skipDelayDuration:0,disableHoverableContent:true,children:jsxs(lo.Root,{open:E,onOpenChange:O,delayDuration:0,disableHoverableContent:true,children:[jsx("span",{...y,"data-monkeys-component":"tooltip","data-slot":"trigger-wrapper","data-state":E?"open":"closed","data-placement":s,"data-portal":N,"data-disabled":i||void 0,className:l(v.slots.tooltipTrigger,g?.trigger),children:jsx(lo.Trigger,{asChild:true,...y,"data-monkeys-component":"tooltip","data-slot":"trigger","data-placement":s,"data-portal":N,"data-disabled":i||void 0,children:V})}),m&&k.shouldPortal?jsx(lo.Portal,{...k.radixPortalProps,children:W}):W]})})})},"BaseTooltip"));function Zt(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(Zt,"safeDisplayUrl");function Ld(e){if(typeof e!="string"||!e.trim())return;let t=e.split(",");for(let o of t){let n=o.trim().split(/\s+/);if(!Zt(n[0],"media")||n.length>2||n.length===2&&!/^(?:[1-9]\d*w|(?:\d+(?:\.\d+)?|\.\d+)x)$/.test(n[1]))return}return e}r(Ld,"safeDisplaySrcSet");function Ad({kind:e}){return jsx(e==="image"?Image:e==="video"?Video:e==="audio"?Music2:FileText,{className:"h-6 w-6","aria-hidden":"true"})}r(Ad,"PreviewIcon");function Od({src:e,kind:t="image",alt:o="Preview",title:n,aspectRatio:a="auto",fit:s="contain",controls:i=true,loading:m=false,empty:c="No preview available",error:d="Preview is unavailable right now.",className:g,style:u,classNames:p,mediaAttributes:f,onLoad:b,onError:h}){let[y,v]=useState(false),k=Zt(e,"media")??"",x=Object.fromEntries(Object.entries(f??{}).flatMap(([T,E])=>{let N=T.toLowerCase();return N==="src"||N==="srcdoc"||N==="dangerouslysetinnerhtml"?[]:N==="srcset"?[["srcSet",Ld(E)]]:N==="poster"?[["poster",Zt(E,"media")]]:[[T,E]]}));useEffect(()=>{v(false);},[k,t]);let w=r((T,E)=>jsx("div",{className:Ot("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,E),role:m?"status":"img","aria-label":typeof T=="string"?T:void 0,children:T}),"renderPlaceholder");if(m)return jsx("div",{className:Ot("min-w-0 overflow-hidden",p?.root,g),style:u,"aria-busy":"true",children:jsxs("div",{className:Ot("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:[jsx(Loader2,{className:"h-5 w-5 animate-spin","aria-hidden":"true"}),n||"Loading preview..."]})});if(!k||y)return jsx("div",{className:Ot("min-w-0 overflow-hidden",p?.root,g),style:u,children:w(jsxs(Fragment,{children:[jsx(Ad,{kind:t}),jsx("span",{className:Ot("max-w-full truncate",y?p?.error:void 0),children:y?d:c}),n?jsx("span",{className:"max-w-full truncate text-xs",children:n}):null]}))});let C=r(()=>{v(true),h?.();},"handleError"),S=t==="image"?jsx(ar,{...x,src:k,alt:o,fit:s,className:p?.media,loading:"lazy",decoding:"async",draggable:false,onLoad:b,onError:C}):t==="video"?jsx("video",{...x,src:k,className:Ot("block h-auto w-full",s==="cover"?"object-cover":"object-contain",p?.media),controls:i,preload:"metadata",onLoadedData:b,onError:C}):t==="audio"?jsx("audio",{...x,src:k,className:Ot("w-full",p?.media),controls:i,preload:"metadata",onCanPlay:b,onError:C}):w(jsxs(Fragment,{children:[jsx(Ad,{kind:"file"}),jsx("span",{className:"max-w-full truncate",children:n||k})]}));return t==="image"?jsx(Ki,{aspectRatio:a,className:Ot(p?.root,g),style:u,children:S}):jsx("div",{className:Ot("min-w-0 overflow-hidden",p?.root,g),style:u,children:S})}r(Od,"DataExplorerMediaPreview");var un=forwardRef(r(function({children:t,label:o,icon:n,tone:a,appearance:s,variant:i,density:m,state:c,className:d,classNames:g,style:u,...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(s),h=Ne(),y=De({...b,variant:i,density:m,state:c}),v=t??o,k=a??"default";return jsxs("span",{...h,...p,ref:f,"data-monkeys-component":"badge","data-slot":"root","data-tone":k,"data-variant":y.variant,"data-density":y.density,"data-state":y.state,className:l(y.slots.badgeBase,Xl(y,a),g?.root,d),style:{...y.styles.badge,...u},children:[n?jsx("span",{"data-slot":"icon","data-tone":k,className:l(y.slots.badgeIcon,g?.icon),children:n}):null,v!=null?jsx("span",{"data-slot":"label","data-tone":k,className:l(y.slots.badgeLabel,g?.label),children:v}):null]})},"BaseBadge"));var Og={sm:"h-8 px-2.5 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-3.5 text-base"},Fg={sm:"h-8 w-8 px-0",md:"h-9 w-9 px-0",lg:"h-10 w-10 px-0"},rs={sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"};function ha(e){return typeof e=="string"&&e.trim()?e:void 0}r(ha,"nonEmptyText");function Hg(){return 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:[jsx("circle",{cx:"12",cy:"12",r:"9",className:"opacity-25",stroke:"currentColor",strokeWidth:"3"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M12 3a9 9 0 0 1 9 9h-3a6 6 0 0 0-6-6V3Z"})]})}r(Hg,"LoadingIcon");var ve=forwardRef(r(function({children:t,label:o,icon:n,endIcon:a,type:s="button",title:i,ariaLabel:m,tone:c,size:d,active:g=false,iconOnly:u=false,disabled:p=false,loading:f=false,stopPropagation:b=false,appearance:h,variant:y,density:v,state:k,className:x,classNames:w,style:C,onClick:S,"aria-label":T,"aria-pressed":E,...N},O){for(let[ee,K]of [["active",g],["iconOnly",u],["disabled",p],["loading",f],["stopPropagation",b]])if(typeof K!="boolean")throw new TypeError(`BaseButton ${ee} 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 V=Oe(h),W=Ne(),F=De({...V,variant:y,density:v,state:k}),H=t??o,I=z(H)&&(typeof H!="string"||!!H.trim()),G=ha(m)??ha(T),q=typeof H=="string"?ha(H):void 0,R=ha(i);if(u&&!I&&!G&&!R)throw new TypeError("BaseButton iconOnly requires ariaLabel, aria-label, title, or a renderable label.");let D=G??q??R,M=p||f,$=c??"default",J=k??(f?"loading":p?"disabled":g?"active":"idle"),_=r(ee=>{b&&ee.stopPropagation(),!M&&S?.(ee);},"handleClick");return jsxs("button",{...W,...N,ref:O,type:s,title:i,"aria-label":D,"aria-pressed":E??(g||void 0),"aria-busy":f||void 0,"data-variant":F.variant,"data-density":F.density,disabled:M,"data-monkeys-component":"button","data-slot":"root","data-state":J,"data-tone":$,"data-size":d,"data-active":g||void 0,"data-loading":f||void 0,"data-disabled":M||void 0,"data-icon-only":u||void 0,className:l(F.slots.buttonBase,u&&F.slots.buttonIconOnly,d&&Og[d],u&&d&&Fg[d],ia(F,c,g),M&&F.slots.buttonDisabled,w?.root,x),style:{...F.styles.button,...g?F.styles.buttonActive:void 0,...M?F.styles.buttonDisabled:void 0,...C},onClick:_,children:[f?jsx("span",{"data-slot":"icon","data-state":J,"data-tone":$,"data-size":d,className:l(F.slots.buttonIcon,d&&rs[d],w?.icon),children:jsx(Hg,{})}):n?jsx("span",{"data-slot":"icon","data-state":J,"data-tone":$,"data-size":d,className:l(F.slots.buttonIcon,d&&rs[d],w?.icon),children:n}):null,u?z(H)?jsx("span",{"data-slot":"label","data-state":J,"data-tone":$,"data-size":d,className:"sr-only",children:H}):null:z(H)?jsx("span",{"data-slot":"label","data-state":J,"data-tone":$,"data-size":d,className:l(F.slots.buttonLabel,w?.label),children:H}):null,!f&&a?jsx("span",{"data-slot":"end-icon","data-state":J,"data-tone":$,"data-size":d,className:l(F.slots.buttonIcon,d&&rs[d],w?.icon,w?.endIcon),children:a}):null]})},"BaseButton"));var Vg=["default","primary","success","warning","danger","muted"];function Kt(e,t){if(typeof e!="boolean")throw new TypeError(`BaseContextMenu ${t} must be a boolean.`)}r(Kt,"validateBoolean");function xa(e){if(e!==void 0&&!Vg.includes(e))throw new TypeError('BaseContextMenu tone must be "default", "primary", "success", "warning", "danger", or "muted".')}r(xa,"validateTone");function Gg(e){if(e!==void 0&&e!=="ltr"&&e!=="rtl")throw new TypeError('BaseContextMenu dir must be "ltr" or "rtl".')}r(Gg,"validateDirection");function _g(){return 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:jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 4.5"})})}r(_g,"CheckIcon");function jg(){return jsx("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3.5 w-3.5",fill:"currentColor",children:jsx("circle",{cx:"8",cy:"8",r:"3"})})}r(jg,"DotIcon");function $g(){return 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:jsx("path",{d:"m6 4 4 4-4 4"})})}r($g,"ChevronRightIcon");function as({label:e,icon:t,shortcut:o,children:n,classNames:a,inset:s,indicator:i}){let m=n??e;return jsxs(Fragment,{children:[i||null,z(t)?jsx("span",{"data-slot":"icon",className:l(a?.icon),children:t}):s?jsx("span",{"aria-hidden":"true","data-slot":"icon",className:"h-4 w-4 shrink-0"}):null,z(m)?jsx("span",{"data-slot":"label",className:l(a?.label),children:m}):null,z(o)?jsx("span",{"data-slot":"shortcut",className:l(a?.shortcut),children:o}):null]})}r(as,"renderItemContent");function Vd({children:e,trigger:t,content:o,disabled:n=false,modal:a=true,dir:s,appearance:i,className:m,classNames:c,onOpenChange:d}){Kt(n,"disabled"),Kt(a,"modal"),Gg(s);let g=Oi(),u=Oe(i);return jsxs(Qe.Root,{onOpenChange:d,modal:a,dir:s??g,children:[t?jsx(is,{disabled:n,appearance:u,className:l(c?.trigger,m),children:t}):null,o?jsx(ss,{appearance:u,className:c?.content,children:o}):null,e]})}r(Vd,"BaseContextMenu");var is=forwardRef(r(function({children:t,disabled:o=false,asChild:n=false,appearance:a,className:s,style:i,...m},c){Kt(o,"Trigger disabled"),Kt(n,"Trigger asChild");let d=Oe(a),g=Ne(),u=De(d);return jsx(Qe.Trigger,{...g,...m,ref:c,asChild:n,disabled:o,"data-monkeys-component":"context-menu","data-slot":"trigger","data-disabled":o||void 0,className:l(!n&&u.slots.menuTrigger,o&&!n&&u.slots.menuItemDisabled,s),style:i,children:t})},"BaseContextMenuTrigger")),ss=forwardRef(r(function({children:t,appearance:o,className:n,classNames:a,style:s,...i},m){let c=Oe(o),d=Ne(),g=De(c),u=To(),p=jsx(Qe.Content,{...d,...i,ref:m,"data-monkeys-component":"context-menu","data-slot":"content",className:l(g.slots.menuContent,a?.root,n),style:{...g.styles.menuContent,...s},children:t});return u.shouldPortal?jsx(Qe.Portal,{...u.radixPortalProps,children:p}):p},"BaseContextMenuContent")),Gd=forwardRef(r(function({children:t,appearance:o,className:n,style:a,...s},i){let m=Oe(o),c=Ne(),d=De(m);return jsx(Qe.Label,{...c,...s,ref:i,"data-monkeys-component":"context-menu","data-slot":"label",className:l(d.slots.menuLabel,n),style:a,children:t})},"BaseContextMenuLabel")),_d=forwardRef(r(function({appearance:t,className:o,style:n,...a},s){let i=Oe(t),m=Ne(),c=De(i);return jsx(Qe.Separator,{...m,...a,ref:s,"data-monkeys-component":"context-menu","data-slot":"separator",className:l(c.slots.menuSeparator,o),style:n})},"BaseContextMenuSeparator")),Rn=forwardRef(r(function({children:t,label:o,icon:n,shortcut:a,tone:s,disabled:i=false,inset:m=false,appearance:c,className:d,classNames:g,style:u,onSelect:p,...f},b){Kt(i,"Item disabled"),Kt(m,"Item inset"),xa(s);let h=s??"default",y=Oe(c),v=Ne(),k=De(y);return jsx(Qe.Item,{...v,...f,ref:b,disabled:i,"data-monkeys-component":"context-menu","data-slot":"item","data-tone":h,"data-disabled":i||void 0,className:l(k.slots.menuItem,er(k,s),i&&k.slots.menuItemDisabled,g?.root,d),style:{...k.styles.menuItem,...u},onSelect:x=>{if(i){x.preventDefault();return}p?.(x);},children:as({children:t,label:o,icon:n,shortcut:a,inset:m,classNames:{icon:l(k.slots.menuItemIcon,g?.icon),label:l(k.slots.menuItemLabel,g?.label),shortcut:l(k.slots.menuItemShortcut,g?.shortcut)}})})},"BaseContextMenuItem"));forwardRef(r(function({children:t,label:o,icon:n,shortcut:a,tone:s,disabled:i=false,inset:m=false,checked:c,onCheckedChange:d,appearance:g,className:u,classNames:p,style:f,onSelect:b,...h},y){if(Kt(i,"CheckboxItem disabled"),Kt(m,"CheckboxItem inset"),xa(s),c!==void 0&&c!=="indeterminate"&&typeof c!="boolean")throw new TypeError('BaseContextMenu CheckboxItem checked must be a boolean or "indeterminate".');let v=s??"default",k=Oe(g),x=Ne(),w=De(k);return jsx(Qe.CheckboxItem,{...x,...h,ref:y,checked:c,disabled:i,"data-monkeys-component":"context-menu","data-slot":"checkbox-item","data-tone":v,"data-disabled":i||void 0,"data-checked":c==="indeterminate"?"mixed":c===void 0?void 0:String(c),onCheckedChange:C=>{i||d?.(C);},className:l(w.slots.menuItem,"pl-8",er(w,s),i&&w.slots.menuItemDisabled,p?.root,u),style:{...w.styles.menuItem,...f},onSelect:C=>{if(i){C.preventDefault();return}b?.(C);},children:as({children:t,label:o,icon:n,shortcut:a,inset:m,classNames:{icon:l(w.slots.menuItemIcon,p?.icon),label:l(w.slots.menuItemLabel,p?.label),shortcut:l(w.slots.menuItemShortcut,p?.shortcut)},indicator:jsx(Qe.ItemIndicator,{"data-slot":"indicator",className:l(w.slots.menuCheckboxIndicator,p?.indicator),children:jsx(_g,{})})})})},"BaseContextMenuCheckboxItem"));forwardRef(r(function({children:t,label:o,icon:n,shortcut:a,tone:s,disabled:i=false,inset:m=false,value:c,appearance:d,className:g,classNames:u,style:p,onSelect:f,...b},h){Kt(i,"RadioItem disabled"),Kt(m,"RadioItem inset"),xa(s);let y=s??"default",v=Oe(d),k=Ne(),x=De(v);return jsx(Qe.RadioItem,{...k,...b,ref:h,value:c,disabled:i,"data-monkeys-component":"context-menu","data-slot":"radio-item","data-tone":y,"data-value":c,"data-disabled":i||void 0,className:l(x.slots.menuItem,"pl-8",er(x,s),i&&x.slots.menuItemDisabled,u?.root,g),style:{...x.styles.menuItem,...p},onSelect:w=>{if(i){w.preventDefault();return}f?.(w);},children:as({children:t,label:o,icon:n,shortcut:a,inset:m,classNames:{icon:l(x.slots.menuItemIcon,u?.icon),label:l(x.slots.menuItemLabel,u?.label),shortcut:l(x.slots.menuItemShortcut,u?.shortcut)},indicator:jsx(Qe.ItemIndicator,{"data-slot":"indicator",className:l(x.slots.menuRadioIndicator,u?.indicator),children:jsx(jg,{})})})})},"BaseContextMenuRadioItem"));forwardRef(r(function({children:t,label:o,icon:n,tone:a,disabled:s=false,inset:i=false,appearance:m,className:c,classNames:d,style:g,...u},p){Kt(s,"SubTrigger disabled"),Kt(i,"SubTrigger inset"),xa(a);let f=a??"default",b=Oe(m),h=Ne(),y=De(b),v=t??o;return jsxs(Qe.SubTrigger,{...h,...u,ref:p,disabled:s,"data-monkeys-component":"context-menu","data-slot":"sub-trigger","data-tone":f,"data-disabled":s||void 0,className:l(y.slots.menuSubTrigger,er(y,a),s&&y.slots.menuItemDisabled,d?.root,c),style:{...y.styles.menuItem,...g},children:[z(n)?jsx("span",{"data-slot":"icon",className:l(y.slots.menuItemIcon,d?.icon),children:n}):i?jsx("span",{"aria-hidden":"true","data-slot":"icon",className:"h-4 w-4 shrink-0"}):null,z(v)?jsx("span",{"data-slot":"label",className:l(y.slots.menuItemLabel,d?.label),children:v}):null,jsx("span",{"data-slot":"sub-indicator",className:l(y.slots.menuSubTriggerIcon,d?.shortcut,"rtl:rotate-180"),children:jsx($g,{})})]})},"BaseContextMenuSubTrigger"));forwardRef(r(function({children:t,appearance:o,className:n,classNames:a,style:s,sideOffset:i=6,...m},c){let d=Oe(o),g=Ne(),u=De(d),p=To(),f=jsx(Qe.SubContent,{...g,...m,ref:c,sideOffset:i,"data-monkeys-component":"context-menu","data-slot":"sub-content",className:l(u.slots.menuSubContent,a?.root,n),style:{...u.styles.menuContent,...s},children:t});return p.shouldPortal?jsx(Qe.Portal,{...p.radixPortalProps,children:f}):f},"BaseContextMenuSubContent"));var Ug={1:"grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-2 xl:grid-cols-3"};function ds({items:e,columns:t=1,appearance:o,className:n,classNames:a,style:s,children:i,...m}){let c=De(o);return jsxs("dl",{...m,className:l(c.slots.descriptionListRoot,Ug[t],a?.root,n),style:{...c.styles.descriptionList,...s},children:[e?.map((d,g)=>jsxs("div",{className:l(c.slots.descriptionListItem,a?.item),children:[jsx("dt",{className:l(c.slots.descriptionListTerm,a?.term),children:d.term}),jsx("dd",{className:l(c.slots.descriptionListValue,a?.value),children:d.value})]},g)),i]})}r(ds,"BaseDescriptionList");var Xg=["default","primary","success","warning","danger","muted"];function co(e,t){if(typeof e!="boolean")throw new TypeError(`BaseDialog ${t} must be a boolean.`)}r(co,"validateBoolean");function Zg(e){if(!Xg.includes(e))throw new TypeError('BaseDialog triggerTone must be "default", "primary", "success", "warning", "danger", or "muted".')}r(Zg,"validateTriggerTone");function Qg({trigger:e,triggerLabel:t,triggerIcon:o,triggerTone:n,triggerDisabled:a,theme:s}){return z(e)?jsx("span",{role:"button",tabIndex:a?-1:0,"aria-disabled":a||void 0,onKeyDown:i=>{a||(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),i.currentTarget.click());},children:e}):z(t)?jsxs("button",{type:"button",disabled:a,"aria-label":typeof t=="string"&&t.trim()?t:void 0,className:l(s.slots.buttonBase,ia(s,n),a&&s.slots.buttonDisabled),style:{...s.styles.button,...a?s.styles.buttonDisabled:void 0},children:[z(o)?jsx("span",{"data-slot":"icon",className:s.slots.buttonIcon,children:o}):null,jsx("span",{"data-slot":"label",className:s.slots.buttonLabel,children:t})]}):null}r(Qg,"renderTrigger");var Nn=forwardRef(r(function({open:t,defaultOpen:o=false,size:n="default",title:a,description:s,header:i,footer:m,trigger:c,triggerLabel:d,triggerIcon:g,triggerTone:u="default",triggerDisabled:p=false,closeLabel:f,closeOnEscape:b=true,closeOnOverlayClick:h=true,showCloseButton:y=true,keepMounted:v=false,trapFocus:k=true,restoreFocus:x=true,initialFocus:w="first-interactive",initialFocusRef:C,zIndex:S,portal:T=false,appearance:E,className:N,classNames:O,style:V,children:W,onOpenChange:F,id:H,...I},G){if(t!==void 0&&co(t,"open"),co(o,"defaultOpen"),!["default","viewport","page"].includes(n))throw new TypeError("BaseDialog size must be default, viewport or page.");if(co(p,"triggerDisabled"),co(b,"closeOnEscape"),co(h,"closeOnOverlayClick"),co(y,"showCloseButton"),co(v,"keepMounted"),co(k,"trapFocus"),co(x,"restoreFocus"),co(T,"portal"),Zg(u),w!=="first-interactive"&&w!=="container"&&w!=="explicit")throw new TypeError('BaseDialog initialFocus must be "first-interactive", "container", or "explicit".');if(S!==void 0&&!Number.isFinite(S))throw new TypeError("BaseDialog zIndex must be a finite number.");let q=vt().dialog,R=Oe(E),D=Ne(),M=f===void 0?q.close:f,$=De(R),J=To({disabled:!T}),[_,ee]=useState(o),K=useRef(null),Z=useRef(null),re=t!==void 0,ae=re?t:_,le=T&&J.shouldPortal?"portaled":"inline",L=z(a),me=z(s),B=z(i);if(y&&(typeof M!="string"||!M.trim()))throw new TypeError("BaseDialog closeLabel must be a non-empty string when showCloseButton is true.");let j=r(xe=>{re||ee(xe),F?.(xe);},"handleOpenChange");useEffect(()=>{if(!ae||!v)return;let xe=K.current,te=xe?.ownerDocument,se=te?.defaultView;if(!xe||!te||!se)return;Z.current=te.activeElement instanceof se.HTMLElement?te.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);(w==="container"?xe:w==="explicit"?C?.current??xe:U??xe).focus();},"focusInitial"),ze=se.requestAnimationFrame(Ie),ce=r(U=>{if(U.key==="Escape"&&b){U.preventDefault(),U.stopPropagation(),j(false);return}if(U.key!=="Tab"||!k)return;let A=Array.from(xe.querySelectorAll(Re));if(A.length===0){U.preventDefault(),xe.focus();return}let X=A[0],ie=A[A.length-1];U.shiftKey&&te.activeElement===X?(U.preventDefault(),ie.focus()):!U.shiftKey&&te.activeElement===ie&&(U.preventDefault(),X.focus());},"handleKeyDown");return se.addEventListener("keydown",ce),()=>{se.cancelAnimationFrame(ze),se.removeEventListener("keydown",ce),x&&Z.current?.isConnected&&Z.current.focus();}},[b,w,C,ae,v,x,k]);let ne=B||L||me?jsxs("div",{...D,"data-monkeys-component":"dialog","data-slot":"header","data-state":ae?"open":"closed","data-portal":le,className:l($.slots.dialogHeader,O?.header,n==="page"&&"sr-only"),children:[B?i:null,L?jsx(bt.Title,{...D,"data-monkeys-component":"dialog","data-slot":"title","data-state":ae?"open":"closed","data-portal":le,className:B?"sr-only":l($.slots.dialogTitle,O?.title),children:a}):null,me?jsx(bt.Description,{...D,"data-monkeys-component":"dialog","data-slot":"description","data-state":ae?"open":"closed","data-portal":le,className:B?"sr-only":l($.slots.dialogDescription,O?.description),children:s}):null]}):null,fe=Qg({trigger:c,triggerLabel:d,triggerIcon:g,triggerTone:u,triggerDisabled:p,theme:$}),ye=ae||v?jsxs(Fragment,{children:[jsx(bt.Overlay,{forceMount:v||void 0,hidden:!ae,...D,"aria-hidden":"true","data-monkeys-component":"dialog","data-slot":"overlay","data-portal":le,className:l($.slots.dialogOverlay,O?.overlay),style:{...$.styles.dialogOverlay,zIndex:S,...n==="page"?{background:"transparent",backdropFilter:"none"}:{}}}),jsx("div",{...D,hidden:!ae,"data-monkeys-component":"dialog","data-slot":"content","data-state":ae?"open":"closed","data-portal":le,className:l($.slots.dialogContent,O?.content),style:{zIndex:S,...n==="page"?{padding:0,inset:0}:{}},children:jsx(bt.Content,{forceMount:v||void 0,...D,...L?{}:{"aria-labelledby":void 0},...me?{}:{"aria-describedby":void 0},asChild:true,onOpenAutoFocus:xe=>{if(v){xe.preventDefault();return}let te=K.current;Z.current=te?.ownerDocument.activeElement,(w==="container"||w==="explicit")&&(xe.preventDefault(),(w==="explicit"?C?.current??te:te)?.focus({preventScroll:true}));},onCloseAutoFocus:xe=>{if(v||!x){xe.preventDefault();return}let te=Z.current;te?.isConnected&&(xe.preventDefault(),te.focus({preventScroll:true}));},onEscapeKeyDown:xe=>{(v||!b)&&xe.preventDefault();},onPointerDownOutside:xe=>{h||xe.preventDefault();},children:jsxs("div",{...D,ref:K,tabIndex:-1,"aria-modal":"true","data-monkeys-component":"dialog","data-slot":"panel","data-portal":le,className:l($.slots.dialogPanel,O?.panel),"data-presentation":n,style:{...$.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:[ne,y?jsx(bt.Close,{asChild:true,children:jsx("button",{...D,type:"button","aria-label":M,title:M,"data-monkeys-component":"dialog","data-slot":"close","data-state":ae?"open":"closed","data-portal":le,className:l($.slots.dialogClose,O?.close),children:"\xD7"})}):null,jsx("div",{...D,"data-monkeys-component":"dialog","data-slot":"body","data-state":ae?"open":"closed","data-portal":le,className:l($.slots.dialogBody,O?.body),style:n!=="default"?{minHeight:0,flex:"1 1 0%",overflow:"hidden",padding:0}:void 0,children:W}),z(m)?jsx("div",{...D,"data-monkeys-component":"dialog","data-slot":"footer","data-state":ae?"open":"closed","data-portal":le,className:l($.slots.dialogFooter,O?.footer),children:m}):null]})})})]}):null;return jsx("div",{...D,...I,ref:G,id:H,"data-monkeys-component":"dialog","data-slot":"root","data-state":ae?"open":"closed","data-portal":le,className:l($.slots.dialogRoot,O?.root,N),style:V,children:jsxs(bt.Root,{open:ae,onOpenChange:j,modal:!v&&k,children:[fe?jsx(bt.Trigger,{...D,asChild:true,disabled:p,"data-monkeys-component":"dialog","data-slot":"trigger","data-portal":le,"data-tone":u,"data-disabled":p||void 0,className:l($.slots.dialogTrigger,p&&$.slots.dialogTriggerDisabled,O?.trigger),children:fe}):null,T&&J.shouldPortal?jsx(zo,{children:jsx(bt.Portal,{...J.radixPortalProps,forceMount:v||void 0,children:ye})}):jsx(zo,{children:ye})]})})},"BaseDialog"));function ob(){return 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:[jsx("rect",{width:"16",height:"12",x:"4",y:"6",rx:"2"}),jsx("path",{d:"M8 10h8"}),jsx("path",{d:"M8 14h5"})]})}r(ob,"DefaultEmptyIcon");var va=forwardRef(r(function({icon:t=jsx(ob,{}),title:o,description:n,actions:a,variant:s,appearance:i,className:m,classNames:c,style:d,...g},u){let p=Oe(i),f=Ne(),b=Co(),h=s??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,v=De(p);return jsxs("div",{...f,...g,ref:u,"data-monkeys-component":"empty-state","data-slot":"root","data-state":"empty","data-variant":h,"data-density":b.density,className:l(v.slots.stateRoot,y,h==="compact"&&"min-h-0 gap-1 py-3",c?.root,m),style:{...v.styles.stateRoot,...d},children:[z(t)?jsx("div",{"data-slot":"icon","data-state":"empty",className:l(v.slots.stateIcon,c?.icon),style:v.styles.stateIcon,children:t}):null,z(o)?jsx("div",{"data-slot":"title","data-state":"empty",className:l(v.slots.stateTitle,c?.title),children:o}):null,z(n)?jsx("div",{"data-slot":"description","data-state":"empty",className:l(v.slots.stateDescription,c?.description),children:n}):null,z(a)?jsx("div",{"data-slot":"actions","data-state":"empty",className:l(v.slots.stateActions,c?.actions),children:a}):null]})},"BaseEmptyState"));var qd=createContext(false);function Yd({children:e}){let{locale:t}=xt();return e==null||e===""?null:jsx(cr,{content:e,portal:true,children: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:jsx(HelpCircle,{className:"h-4 w-4","aria-hidden":"true"})})})}r(Yd,"BaseFormHelp");function cb(...e){let t=e.flatMap(o=>o?.split(/\s+/).filter(Boolean)??[]);return t.length?Array.from(new Set(t)).join(" "):void 0}r(cb,"mergeAriaIds");function us(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(us,"resolveOptionalId");var No=forwardRef(r(function({label:t,description:o,message:n,error:a,required:s=false,disabled:i=false,htmlFor:m,descriptionId:c,messageId:d,errorId:g,validate:u,validationMode:p="onBlur",children:f,appearance:b,className:h,classNames:y,style:v,...k},x){for(let[j,ne]of [["required",s],["disabled",i]])if(typeof ne!="boolean")throw new TypeError(`BaseField ${j} must be a boolean.`);if(u!==void 0&&typeof u!="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 w=useContext(qd)?"tooltip":"inline",C=useId(),S=Oe(b),T=Ne(),E=De(S),N=z(o),[O,V]=useState(null),W=useRef(new Set),F=useRef(u),H=useRef(p),I=useRef(i);F.current=u,H.current=p,I.current=i;let G=u!==void 0;useEffect(()=>{(!G||i)&&V(null);},[i,G]),useEffect(()=>{if(G&&W.current.size!==1)throw new TypeError("BaseField with validate must contain exactly one compatible Base control.")},[G]);let q=useCallback(j=>{let ne=W.current;if(F.current!==void 0&&!ne.has(j)&&ne.size>0)throw new TypeError("BaseField with validate supports exactly one compatible Base control. Use BaseFieldset for control groups.");return ne.add(j),()=>{ne.delete(j);}},[]),R=useCallback((j,ne)=>{let fe=F.current;if(I.current||fe===void 0||H.current!==j)return;let ye=Pd(fe(ne));if(ye===null){V(null);return}V(ye);},[]),D=useCallback(j=>R("onBlur",j),[R]),M=useCallback(j=>R("onChange",j),[R]),J=z(a)?a:O,_=z(J),ee=!_&&z(n),K=_?J:n,Z=m??`${C}-control`,re=N?us(c,`${C}-description`,"descriptionId"):void 0,ae=ee?us(d,`${C}-message`,"messageId"):void 0,le=_?us(g,`${C}-error`,"errorId"):void 0,L={id:Z,"aria-describedby":cb(re,ae),"aria-errormessage":le,"aria-invalid":_?true:void 0,"aria-required":s?true:void 0,required:s||void 0,disabled:i||void 0},me=typeof f=="function"?f(L):f,B=useMemo(()=>({invalid:_,registerControl:q,notifyBlur:D,notifyChange:M}),[_,D,M,q]);return jsxs("div",{...T,...k,ref:x,"aria-disabled":i||void 0,"data-monkeys-component":"field","data-slot":"root","data-required":s||void 0,"data-disabled":i||void 0,"data-invalid":_||void 0,className:l(E.slots.fieldRoot,i&&E.slots.controlDisabled,y?.root,h),style:{...E.styles.field,...v},children:[z(t)?jsxs("div",{"data-slot":"label-row",className:l(E.slots.fieldLabelRow,y?.labelRow),children:[jsxs("label",{htmlFor:typeof f=="function"?Z:m,"data-slot":"label",className:l(E.slots.fieldLabel,y?.label),children:[t,s?jsxs("span",{"aria-hidden":"true","data-slot":"required-indicator",className:l(E.slots.fieldRequired,y?.required),children:[" ","*"]}):null]}),w==="tooltip"&&N?jsx(Yd,{children:o}):null]}):null,N?jsx("div",{id:re,"data-slot":"description",className:l(E.slots.fieldDescription,y?.description,w==="tooltip"&&"sr-only"),children:o}):null,z(me)?jsx("div",{"data-slot":"control",className:l(E.slots.fieldControl,y?.control),style:E.styles.fieldControl,children:jsx(es.Provider,{value:B,children:me})}):null,z(K)?jsx("div",{id:_?le:ae,role:_?"alert":void 0,"data-slot":_?"error":"message",className:l(E.slots.fieldMessage,_&&"text-destructive-text",y?.message),children:K}):null]})},"BaseField"));var mb={sm:"h-8 px-2.5 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-3.5 text-base"},Qt=forwardRef(r(function({icon:t,trailing:o,invalid:n=false,disabled:a=false,readOnly:s=false,controlSize:i,appearance:m,className:c,classNames:d,style:g,"aria-invalid":u,onBlur:p,onChange:f,...b},h){for(let[C,S]of [["invalid",n],["disabled",a],["readOnly",s]])if(typeof S!="boolean")throw new TypeError(`BaseInput ${C} must be a boolean.`);if(i!==void 0&&i!=="sm"&&i!=="md"&&i!=="lg")throw new TypeError('BaseInput controlSize must be "sm", "md", or "lg".');let y=Oe(m),v=Ne(),k=De(y),x=Vo(),w=n||x.invalid;return jsxs("div",{...v,"data-monkeys-component":"input","data-slot":"root","data-size":i,"data-invalid":w||void 0,"data-disabled":a||void 0,"data-readonly":s||void 0,className:l(k.slots.controlWrapper,w&&k.slots.controlInvalid,a&&k.slots.controlDisabled,s&&k.slots.controlReadOnly,d?.root,c),style:{...k.styles.control,...w?k.styles.controlInvalid:void 0,...a?k.styles.controlDisabled:void 0,...g},children:[z(t)?jsx("span",{"data-slot":"icon",className:l(k.slots.controlIcon,d?.icon),children:t}):null,jsx("input",{...b,ref:h,disabled:a,readOnly:s,"aria-invalid":u??(w||void 0),"data-slot":"control","data-size":i,"data-invalid":w||void 0,"data-disabled":a||void 0,"data-readonly":s||void 0,className:l(k.slots.controlBase,k.slots.controlInput,i&&mb[i],d?.control),onBlur:C=>{p?.(C),x.notifyBlur(C.currentTarget.value);},onChange:C=>{f?.(C),x.notifyChange(C.currentTarget.value);}}),z(o)?jsx("span",{"data-slot":"trailing",className:l(k.slots.controlTrailing,d?.trailing),children:o}):null]})},"BaseInput"));var bb={line:"h-4 w-full",block:"h-24 w-full",circle:"aspect-square h-10 rounded-full"},Dt=forwardRef(r(function({variant:t="line",animated:o=true,animation:n,appearance:a,className:s,classNames:i,style:m,...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),u=Ne(),p=De(g),f=Md(n,o,d);return jsx("div",{...u,...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,bb[t],f.mode==="pulse"&&"motion-safe:animate-pulse motion-reduce:animate-none",i?.root,s),style:{...p.styles.skeleton,...f.style,...m}})},"BaseSkeleton"));function hb({className:e}){return jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:e,fill:"none",children:[jsx("circle",{cx:"12",cy:"12",r:"9",className:"opacity-25",stroke:"currentColor",strokeWidth:"3"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M12 3a9 9 0 0 1 9 9h-3a6 6 0 0 0-6-6V3Z"})]})}r(hb,"DefaultLoadingIcon");var jo=forwardRef(r(function({icon:t,title:o,description:n,actions:a,variant:s,animation:i,appearance:m,className:c,classNames:d,style:g,role:u="status","aria-live":p="polite","aria-busy":f=true,"aria-label":b,"aria-labelledby":h,...y},v){let k=Oe(m),x=Ne(),{loading:w}=vt(),C=Co(),S=s??C.loading?.variant??"spinner",T=C.density==="compact"?"min-h-0 px-3 py-3":C.density==="comfortable"?"min-h-56 px-8 py-12":void 0,E=De(k),N=S==="skeleton"&&t===void 0?void 0:t===void 0?jsx(hb,{className:E.slots.loadingSpinner}):t,O=b??(h===void 0?typeof o=="string"?o:w.spinner:void 0);return jsxs("div",{...x,...y,ref:v,role:u,"aria-live":p,"aria-busy":f,"aria-label":O,"aria-labelledby":h,"data-monkeys-component":"loading-state","data-slot":"root","data-state":"loading","data-variant":S,"data-density":C.density,className:l(E.slots.stateRoot,T,d?.root,c),style:{...E.styles.stateRoot,...g},children:[S==="skeleton"?jsx(Ho,{animation:i,children:jsxs("div",{className:"flex w-full max-w-sm flex-col gap-3","data-slot":"skeleton",children:[jsx(Dt,{variant:"block",className:"h-20"}),jsx(Dt,{variant:"line",className:"w-4/5"}),jsx(Dt,{variant:"line",className:"w-3/5"})]})}):z(N)?jsx("div",{"data-slot":"icon","data-state":"loading",className:l(E.slots.stateIcon,d?.icon),style:E.styles.stateIcon,children:N}):null,S!=="skeleton"&&z(o)?jsx("div",{"data-slot":"title","data-state":"loading",className:l(E.slots.stateTitle,d?.title),children:o}):null,S!=="skeleton"&&z(n)?jsx("div",{"data-slot":"description","data-state":"loading",className:l(E.slots.stateDescription,d?.description),children:n}):null,z(a)?jsx("div",{"data-slot":"actions","data-state":"loading",className:l(E.slots.stateActions,d?.actions),children:a}):null]})},"BaseLoadingState"));var Ib=500;function Mb({options:e,value:t,defaultValue:o,invalid:n,disabled:a,openForPreview:s,portal:i,required:m}){for(let[c,d]of [["invalid",n],["disabled",a],["openForPreview",s],["portal",i]])if(typeof d!="boolean")throw new TypeError(`BaseSelect ${c} must be a boolean.`);if(m!==void 0&&typeof m!="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(Mb,"validateSelectProps");function gs(e){return typeof e=="string"||typeof e=="number"?String(e):""}r(gs,"normalizeValue");function Bb(e,t){if(t!==void 0)return e.find(o=>o.value===t)}r(Bb,"findOption");function pr(e,t){let o=e.findIndex(n=>n.value===t&&!n.disabled);return o>=0?o:e.findIndex(n=>!n.disabled)}r(pr,"getInitialActiveIndex");function Pb(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 s=(n+a*o+e.length)%e.length;if(!e[s]?.disabled)return s}return -1}r(Pb,"getNextEnabledIndex");function Eb(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(Eb,"getBoundaryEnabledIndex");function Xd(e){return e.textValue!==void 0?e.textValue:typeof e.label=="string"?e.label:e.value}r(Xd,"getOptionText");function Db(e){return e.replace(/[^a-zA-Z0-9_-]/g,"-")}r(Db,"toDomId");var uo=forwardRef(r(function({options:t,placeholder:o,icon:n,invalid:a=false,disabled:s=false,openForPreview:i=false,portal:m=false,appearance:c,className:d,classNames:g,style:u,children:p,value:f,defaultValue:b,onBlur:h,onChange:y,onFocus:v,onInvalid:k,name:x,id:w,required:C,"aria-invalid":S,"aria-label":T,"aria-labelledby":E,"aria-describedby":N,"aria-errormessage":O,"aria-required":V,...W},F){Mb({options:t,value:f,defaultValue:b,invalid:a,disabled:s,openForPreview:i,portal:m,required:C});let H=Oe(c),I=Ne(),G=De(H),q=Vo(),R=a||q.invalid,D=useId(),M=w??D,$=`${M}-button`,J=`${M}-listbox`,_=useRef(null),ee=useRef(null),K=useRef(null),Z=useRef([]),re=useRef(false),ae=useRef(""),le=useRef(null),L=t??[],me=L.length>0,B=i,[j,ne]=useState(false),[fe,ye]=useState(false),xe=B||j,te=To({disabled:B||!m?true:void 0}),{refs:se,floatingStyles:Re,isPositioned:Ie,placement:ze}=useFloating({transform:false,open:me&&xe&&te.shouldPortal,placement:"bottom-start",strategy:"fixed",whileElementsMounted:te.shouldPortal?autoUpdate:void 0,middleware:[offset(6),flip({padding:8}),shift({padding:8}),size({padding:8,apply({rects:pe,availableHeight:Ge,elements:Q}){Object.assign(Q.floating.style,{width:`${pe.reference.width}px`,maxHeight:`min(15rem, ${Math.max(0,Ge)}px)`});}})]}),ce=useCallback(pe=>{ee.current=pe,se.setReference(pe);},[se.setReference]),[U,A]=useState(()=>gs(b)),X=f!==void 0,ie=X?gs(f):U,Y=Bb(L,ie),[de,we]=useState(()=>pr(L,ie)),Ce=de>=0&&!L[de]?.disabled?de:pr(L,ie),Me=L.map((pe,Ge)=>`${M}-option-${Ge}-${Db(pe.value)}`),Be=Y?.label??o,_e=!Y,Ze=W.dir??I.dir,Fe=s?"disabled":R?"invalid":xe?"open":"closed",tt=r(pe=>{K.current=pe,typeof F=="function"?F(pe):F&&(F.current=pe);},"setSelectRef"),We=r(pe=>{h?.(pe),q.notifyBlur(pe.currentTarget.value);},"handleNativeBlur"),Le=r(pe=>{y?.(pe),q.notifyChange(pe.currentTarget.value);},"handleNativeChange"),oe=r(()=>{we(pr(L,ie));},"resetActiveIndex"),Se=r(()=>{oe(),B||ne(false);},"cancelAndClose"),Ve=r((pe,Ge=false)=>{ye(Ge),we(pe??pr(L,ie)),B||ne(true);},"openMenu"),Ye=r(pe=>{let Ge=K.current;if(!Ge)return;let Q=Ge.ownerDocument.defaultView;if(!Q)throw new Error("BaseSelect cannot dispatch change without an owning window.");let ue=Object.getOwnPropertyDescriptor(Q.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 Q.Event("change",{bubbles:true}));},"notifyChange"),ot=r(pe=>{let Ge=L[pe];!Ge||Ge.disabled||s||(we(pe),Ge.value!==ie&&(X||A(Ge.value),Ye(Ge.value)),B||ne(false));},"commitIndex"),gt=r(pe=>{pe<0||L[pe]?.disabled||(we(pe),xe||Ve(pe));},"moveActive"),Bt=r((pe,Ge)=>{let Q=pe.currentTarget.ownerDocument.defaultView;if(!Q)return;let ue=`${ae.current}${Ge}`.toLocaleLowerCase();ae.current=ue,le.current&&le.current.ownerWindow.clearTimeout(le.current.timerId),le.current={ownerWindow:Q,timerId:Q.setTimeout(()=>{ae.current="",le.current=null;},Ib)};let he=Array.from(ue).every(Ee=>Ee===ue[0])?Ge.toLocaleLowerCase():ue,ke=xe?Ce:L.findIndex(Ee=>Ee.value===ie&&!Ee.disabled);for(let Ee=1;Ee<=L.length;Ee+=1){let ge=(ke+Ee+L.length)%L.length,He=L[ge];if(!He?.disabled&&Xd(He).trim().toLocaleLowerCase().startsWith(he)){pe.preventDefault(),gt(ge);return}}},"handleTypeahead"),Ue=r(pe=>{if(!(s||re.current||pe.nativeEvent.isComposing)){if(pe.key==="ArrowDown"||pe.key==="ArrowUp"){pe.preventDefault();let Ge=L.findIndex(ue=>ue.value===ie&&!ue.disabled);gt(Pb(L,xe?Ce:Ge,pe.key==="ArrowDown"?1:-1));return}if(pe.key==="Home"||pe.key==="End"){pe.preventDefault(),gt(Eb(L,pe.key==="Home"?"first":"last"));return}if(pe.key==="Enter"||pe.key===" "){pe.preventDefault(),xe?ot(Ce):Ve();return}if(pe.key==="Escape"&&xe){pe.preventDefault(),Se();return}if(pe.key==="Tab"&&xe){ot(Ce);return}pe.key.length===1&&!pe.ctrlKey&&!pe.metaKey&&!pe.altKey&&!/\s/.test(pe.key)&&Bt(pe,pe.key);}},"handleKeyDown"),$t=r(pe=>{v?.(pe),pe.defaultPrevented||ee.current?.focus();},"handleCustomFocus"),zt=r(pe=>{k?.(pe),pe.preventDefault(),ee.current?.focus();},"handleCustomInvalid");return useEffect(()=>{if(!me||!xe||B)return;let pe=_.current?.ownerDocument;if(!pe)return;let Ge=r(Q=>{!_.current?.contains(Q.target)&&!se.floating.current?.contains(Q.target)&&Se();},"handlePointerDown");return pe.addEventListener("pointerdown",Ge),()=>{pe.removeEventListener("pointerdown",Ge);}},[B,me,xe,L,ie]),useEffect(()=>{!me||!xe||Ce<0||Z.current[Ce]?.scrollIntoView?.({block:"nearest"});},[me,xe,Ce]),useEffect(()=>{if(!me||X)return;let pe=K.current,Ge=pe?.form,Q=pe?.ownerDocument.defaultView;if(!Ge||!Q)return;let ue=r(()=>{Q.setTimeout(()=>{let Pe=gs(b);A(Pe),we(pr(L,Pe)),B||ne(false);},0);},"handleReset");return Ge.addEventListener("reset",ue),()=>Ge.removeEventListener("reset",ue)},[b,B,X,me,L]),useEffect(()=>()=>{le.current&&le.current.ownerWindow.clearTimeout(le.current.timerId);},[]),me?jsxs("div",{...I,ref:_,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",R&&G.slots.controlInvalid,s&&G.slots.controlDisabled,g?.root,d),style:{...G.styles.control,...R?G.styles.controlInvalid:void 0,...s?G.styles.controlDisabled:void 0,...u},children:[z(n)?jsx("span",{className:l(G.slots.controlIcon,g?.icon),children:n}):null,jsx("button",{...I,ref:ce,type:"button",id:$,role:"combobox",disabled:s,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":S??(R||void 0),"aria-label":T,"aria-labelledby":E,"aria-describedby":N,"aria-errormessage":O,"aria-required":V??(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=>{!_.current?.contains(pe.relatedTarget)&&!se.floating.current?.contains(pe.relatedTarget)&&(Se(),q.notifyBlur(ie));},onCompositionStart:()=>{re.current=true;},onCompositionEnd:()=>{re.current=false;},onKeyDown:Ue,children:jsx("span",{className:l("min-w-0 flex-1 truncate",_e&&G.slots.selectPlaceholder,_e&&g?.placeholder),children:Be})}),jsx("span",{className:l(G.slots.selectChevron,xe&&"rotate-[225deg]")}),jsxs("select",{...I,...W,ref:tt,id:w,name:x,value:ie,required:C,disabled:s,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:h,onFocus:$t,onInvalid:zt,onChange:Le,children:[z(o)?jsx("option",{value:"",disabled:true,children:o}):null,L.map(pe=>jsx("option",{value:pe.value,disabled:pe.disabled,children:Xd(pe)},pe.value))]}),xe?Wd(jsx("div",{...I,ref:te.shouldPortal?se.setFloating:void 0,id:J,role:"listbox",dir:Ze,"aria-labelledby":$,"data-monkeys-component":"select","data-slot":"menu","data-portal":te.shouldPortal?"portaled":"inline","data-state":"open","data-side":te.shouldPortal?ze.split("-")[0]:"bottom",className:l(G.slots.selectMenu,te.shouldPortal&&ze.startsWith("top")?"origin-bottom":"origin-top",fe&&!B&&(!te.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,...te.shouldPortal?{...Re,right:"auto",visibility:Ie?"visible":"hidden"}:void 0},children:L.map((pe,Ge)=>{let Q=pe.value===ie,ue=Ge===Ce,Pe=pe.disabled?"disabled":ue?"active":Q?"selected":"idle";return createElement("button",{...I,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":Q,"data-monkeys-component":"select","data-slot":"option","data-state":Pe,"data-active":ue||void 0,"data-selected":Q||void 0,"data-disabled":pe.disabled||void 0,className:l(G.slots.selectOption,ue&&G.slots.selectOptionActive,Q&&G.slots.selectOptionSelected,pe.disabled&&G.slots.selectOptionDisabled,g?.option),style:{...G.styles.selectOption,...ue?G.styles.selectOptionActive:void 0,...Q?G.styles.selectOptionSelected:void 0},onMouseDown:he=>he.preventDefault(),onClick:()=>ot(Ge)},jsx("span",{className:"min-w-0 flex-1 truncate",children:pe.label}))})}),te):null]}):jsxs("div",{...I,"data-monkeys-component":"select","data-slot":"root","data-state":Fe,"data-native":"true",className:l(G.slots.controlWrapper,R&&G.slots.controlInvalid,s&&G.slots.controlDisabled,g?.root,d),style:{...G.styles.control,...R?G.styles.controlInvalid:void 0,...s?G.styles.controlDisabled:void 0,...u},children:[z(n)?jsx("span",{className:l(G.slots.controlIcon,g?.icon),children:n}):null,jsxs("select",{...I,...W,id:w,ref:F,name:x,value:f,defaultValue:b,required:C,disabled:s,"aria-invalid":S??(R||void 0),"aria-label":T,"aria-labelledby":E,"aria-describedby":N,"aria-errormessage":O,"aria-required":V,"data-monkeys-component":"select","data-slot":"native","data-state":Fe,"data-native":"true",onBlur:We,onFocus:v,onInvalid:k,onChange:Le,className:l(G.slots.controlBase,G.slots.controlSelect,g?.control),children:[z(o)?jsx("option",{value:"",disabled:true,children:o}):null,p]}),jsx("span",{className:G.slots.selectChevron})]})},"BaseSelect"));function Ab(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(Ab,"getInitialSegmentValue");function pn({options:e=[],value:t,defaultValue:o,appearance:n,className:a,classNames:s,style:i,onValueChange:m,...c}){let d=De(n),[g,u]=useState(()=>Ab(e,o)),p=t!==void 0,f=p?t:g,b=r((y,v)=>{v||(p||u(y),m?.(y));},"handleSelect"),h=r(y=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(y.key))return;let v=e.filter(T=>!T.disabled);if(v.length===0)return;y.preventDefault();let k=Math.max(0,v.findIndex(T=>T.value===f)),x=y.key==="Home"?0:y.key==="End"?v.length-1:y.key==="ArrowLeft"||y.key==="ArrowUp"?(k-1+v.length)%v.length:(k+1)%v.length,w=v[x],C=y.currentTarget.querySelectorAll('[role="radio"]'),S=Array.from(C).find(T=>T.dataset.value===w.value);b(w.value),S?.focus();},"handleKeyDown");return jsx("div",{...c,role:"radiogroup","aria-orientation":"horizontal",className:l(d.slots.segmentedRoot,s?.root,a),style:{...d.styles.segmentedRoot,...i},onKeyDown:h,children:e.map(y=>{let v=y.value===f;return jsxs("button",{type:"button",role:"radio","data-value":y.value,"aria-checked":v,tabIndex:v?0:-1,disabled:y.disabled,className:l(d.slots.segmentedItem,v&&d.slots.segmentedItemActive,y.disabled&&d.slots.segmentedItemDisabled,s?.item),style:d.styles.segmentedItem,onClick:()=>b(y.value,y.disabled),children:[z(y.icon)?jsx("span",{className:l("inline-flex h-4 w-4 shrink-0",s?.icon),children:y.icon}):null,jsx("span",{className:l("min-w-0 truncate",s?.label),children:y.label})]},y.value)})})}r(pn,"BaseSegmentedControl");function Fb({kind:e}){return 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:jsxs(Fragment,{children:[jsx("circle",{cx:"12",cy:"12",r:"9"}),jsx("path",{d:"M12 7v6"}),jsx("path",{d:"M12 17h.01"})]}),permission:jsxs(Fragment,{children:[jsx("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2"}),jsx("path",{d:"M8 10V7a4 4 0 0 1 8 0v3"})]}),offline:jsxs(Fragment,{children:[jsx("path",{d:"M5 12.5a10 10 0 0 1 14 0"}),jsx("path",{d:"M8.5 16a5 5 0 0 1 7 0"}),jsx("path",{d:"M12 20h.01"}),jsx("path",{d:"m4 4 16 16"})]}),fallback:jsxs(Fragment,{children:[jsx("circle",{cx:"12",cy:"12",r:"9"}),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"}),jsx("path",{d:"M12 17h.01"})]})}[e]})}r(Fb,"SystemStateIcon");var br=forwardRef(r(function({kind:t="fallback",icon:o,title:n,description:a,actions:s,appearance:i,className:m,classNames:c,style:d,role:g,"aria-live":u,...p},f){let b=Oe(i),h=Ne(),y=Co(),v=y.density==="compact"?"min-h-0 px-3 py-3":y.density==="comfortable"?"min-h-56 px-8 py-12":void 0,k=De(b),x=o===void 0?jsx(Fb,{kind:t}):o,w=g??(t==="error"||t==="offline"?"alert":"status");return jsxs("div",{...h,...p,ref:f,role:w,"aria-live":u??(w==="alert"?"assertive":"polite"),"data-monkeys-component":"system-state","data-slot":"root","data-state":t,"data-density":y.density,className:l(k.slots.stateRoot,v,c?.root,m),style:{...k.styles.stateRoot,...d},children:[z(x)?jsx("div",{"data-slot":"icon","data-state":t,className:l(k.slots.stateIcon,c?.icon),style:k.styles.stateIcon,children:x}):null,z(n)?jsx("div",{"data-slot":"title","data-state":t,className:l(k.slots.stateTitle,c?.title),children:n}):null,z(a)?jsx("div",{"data-slot":"description","data-state":t,className:l(k.slots.stateDescription,c?.description),children:a}):null,z(s)?jsx("div",{"data-slot":"actions","data-state":t,className:l(k.slots.stateActions,c?.actions),children:s}):null]})},"BaseSystemState"));var fs="application/x-monkeys-base-table-column",Ia=8;function ws(e,t){typeof e=="function"?e(t):e&&(e.current=t);}r(ws,"assignRef");function Mo(e,t){if(t!==void 0&&typeof t!="boolean")throw new Error(`BaseTable ${e} must be a boolean.`)}r(Mo,"assertBoolean");function In(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(In,"assertEnum");function ys(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(ys,"assertOptionalLabel");function ks(e,t){if(t!==void 0&&typeof t!="function")throw new Error(`BaseTable ${e} must be a function when provided.`)}r(ks,"assertOptionalFunction");function Ko(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(Ko,"validateCssSizeValue");function jb(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 s=a.id.trim();if(a.id!==s)throw new Error(`BaseTable column id "${a.id}" must not contain surrounding whitespace.`);if(t.has(s))throw new Error(`BaseTable columns contain duplicate id "${s}".`);if(t.add(s),Ko(a.width,`column "${s}" width`,{stringAllowed:true}),Ko(a.minWidth,`column "${s}" minWidth`,{stringAllowed:true}),Ko(a.maxWidth,`column "${s}" maxWidth`,{stringAllowed:true}),typeof a.minWidth=="number"&&typeof a.maxWidth=="number"&&a.minWidth>a.maxWidth)throw new Error(`BaseTable column "${s}" minWidth cannot be greater than maxWidth.`)}),t}r(jb,"validateColumns");function $b(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 s=n.trim();if(n!==s)throw new Error(`BaseTable columnOrder entry "${n}" must not contain surrounding whitespace.`);if(o.has(s))throw new Error(`BaseTable columnOrder contains duplicate id "${s}".`);if(t&&!t.has(s))throw new Error(`BaseTable columnOrder contains unknown column id "${s}".`);o.add(s);}),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($b,"validateColumnOrder");function Kb(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}".`);Ko(n,`columnSizes["${o}"]`);});}}r(Kb,"validateColumnSizes");function Ma(e){let t=e.ownerDocument.defaultView;return t?t.getComputedStyle(e).direction==="rtl":e.closest('[dir="rtl"]')!==null}r(Ma,"isRtl");function Ub(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(Ub,"setPointerCaptureIfAvailable");var tc=createContext(null);function Uo(e){let t=useContext(tc),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(Uo,"useBaseTableContext");function oc(e){let t=false;return Children.forEach(e,o=>{if(t||!isValidElement(o))return;let n=o.props;if(n.layout==="split-scroll"){t=true;return}n.children&&(t=oc(n.children));}),t}r(oc,"hasSplitScrollTable");function hs(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r(hs,"toCssSize");function qb(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(qb,"validateTableCssSize");function xs(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(xs,"validateCssSize");function Qd(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(Qd,"validateNumericSize");function Yb(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,s)=>{let i=a.id.trim();if(!i)throw new Error(`BaseTable split-scroll column at index ${s} requires a non-empty id.`);if(o.has(i))throw new Error(`BaseTable layout="split-scroll" received duplicate column id "${i}".`);o.add(i);let m=t?.[i],c=Qd(a.minWidth,i,"minWidth"),d=Qd(a.maxWidth,i,"maxWidth");if(c!==void 0&&d!==void 0&&d<c)throw new Error(`BaseTable split-scroll column "${i}" has maxWidth smaller than minWidth.`);let g=xs(a.minWidth,i,"minWidth"),u=xs(a.maxWidth,i,"maxWidth"),p=m!==void 0?$o(m,c,d):a.width,f=xs(p,i,"width");return f||`minmax(${g??"0px"}, ${u??"1fr"})`}).join(" ")} var(--base-table-split-scrollbar-gutter)`}r(Yb,"buildSplitColumnTemplate");function $o(e,t,o){let n=t??48,a=o??Number.POSITIVE_INFINITY;return Math.min(Math.max(e,n),a)}r($o,"clampWidth");function vs(e,t,o){if(!e||t===o)return;let n=e.indexOf(t),a=e.indexOf(o);if(n<0||a<0)return;let s=[...e],[i]=s.splice(n,1);return s.splice(a,0,i),s}r(vs,"getNextColumnOrder");function Jb(e){switch(e){case "asc":return "ascending";case "desc":return "descending";default:return}}r(Jb,"sortAriaValue");function Xb(e){switch(e){case "center":return "center";case "right":return "flex-end";default:return "flex-start"}}r(Xb,"getSplitHeadJustifyContent");function Zb(e){switch(e){case "top":return "flex-start";case "bottom":return "flex-end";default:return "center"}}r(Zb,"getSplitHeadAlignItems");function Qb({direction:e,className:t}){return jsx("span",{"aria-hidden":"true",className:l(t,e==="desc"&&"rotate-180",(!e||e==="none")&&"opacity-45"),children:"\u25B2"})}r(Qb,"SortIndicator");function ef(){return jsxs("span",{"aria-hidden":"true",className:"grid gap-0.5",children:[jsx("span",{className:"h-0.5 w-0.5 rounded-full bg-current"}),jsx("span",{className:"h-0.5 w-0.5 rounded-full bg-current"}),jsx("span",{className:"h-0.5 w-0.5 rounded-full bg-current"})]})}r(ef,"DragHandleIcon");var Pa=forwardRef(r(function({appearance:t,attachedFooter:o=false,children:n,className:a,classNames:s,style:i,...m},c){Mo("attachedFooter",o);let d=Oe(t),g=Ne(),u=De(d),f=oc(n)?{overflow:"hidden",scrollbarGutter:"auto"}:void 0;return jsx("div",{...g,...m,ref:c,"data-monkeys-component":"table-container","data-slot":"container","data-base-table-container":"","data-attached-footer":o?"":void 0,className:l(u.slots.tableContainer,o&&u.slots.tableContainerFooterAttached,s?.root,a),style:{...u.styles.tableContainer,...o?u.styles.tableContainerFooterAttached:void 0,...f,...i},children:n})},"BaseTableContainer")),Ea=forwardRef(r(function({appearance:t,className:o,classNames:n,style:a,layout:s="native",columns:i,bodyMaxHeight:m,bodyClassName:c,columnOrder:d,columnSizes:g,columnDragEnabled:u=false,columnResizeEnabled:p=false,onColumnOrderChange:f,onColumnSizeChange:b,...h},y){In("layout",s,["native","split-scroll"]),Mo("columnDragEnabled",u),Mo("columnResizeEnabled",p),ks("onColumnOrderChange",f),ks("onColumnSizeChange",b),Ko(m,"bodyMaxHeight",{stringAllowed:true});let v=jb(i);$b(d,v),Kb(g,v);let k=Oe(t),x=Ne(),w=De(k),[C,S]=useState(),T=useRef(null),E=useRef(null),N=s==="split-scroll",O=N?Yb(i,g):void 0,V={appearance:k,theme:w,layout:s,columnTemplate:O,bodyMaxHeight:m,bodyClassName:c,splitHeaderRef:T,splitFooterRef:E,columnOrder:d,columnSizes:g,columnDragEnabled:u,columnResizeEnabled:p,onColumnOrderChange:f,onColumnSizeChange:b,draggingColumnId:C,setDraggingColumnId:S};return jsx(tc.Provider,{value:V,children:jsx("table",{...x,...h,ref:y,"data-monkeys-component":"table","data-slot":"root","data-base-table-layout":s,className:l(w.slots.tableRoot,N&&w.slots.tableSplitRoot,n?.root,o),style:{...w.styles.table,...N?w.styles.tableSplitRoot:void 0,...O?{"--base-table-column-template":O}:void 0,...a}})})},"BaseTable")),Da=forwardRef(r(function({appearance:t,className:o,classNames:n,style:a,...s},i){let{layout:m,splitHeaderRef:c,theme:d}=Uo(t),g=m==="split-scroll";return jsx("thead",{...s,ref:r(p=>{c&&(c.current=g?p:null),ws(i,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")),Wa=forwardRef(r(function({appearance:t,className:o,classNames:n,onScroll:a,style:s,...i},m){let{bodyClassName:c,bodyMaxHeight:d,layout:g,splitFooterRef:u,splitHeaderRef:p,theme:f}=Uo(t),b=g==="split-scroll";return jsx("tbody",{...i,ref:m,"data-slot":"body",onScroll:b?y=>{let v=y.currentTarget.scrollLeft;p?.current&&(p.current.scrollLeft=v),u?.current&&(u.current.scrollLeft=v),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:qb(d,"bodyMaxHeight")}:void 0,...s}})},"BaseTableBody"));forwardRef(r(function({appearance:t,className:o,classNames:n,style:a,...s},i){let{layout:m,splitFooterRef:c,theme:d}=Uo(t),g=m==="split-scroll";return jsx("tfoot",{...s,ref:r(p=>{c&&(c.current=g?p:null),ws(i,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 gn=forwardRef(r(function({interactive:t,selected:o,disabled:n,appearance:a,className:s,classNames:i,style:m,...c},d){Mo("interactive",t),Mo("selected",o),Mo("disabled",n);let{layout:g,theme:u}=Uo(a),p=g==="split-scroll";return jsx("tr",{...c,ref:d,"data-slot":"row","aria-disabled":n||void 0,"data-state":o?"selected":void 0,className:l(u.slots.tableRow,p&&u.slots.tableSplitRow,t&&!n&&u.slots.tableRowInteractive,o&&u.slots.tableRowSelected,n&&u.slots.tableRowDisabled,i?.root,s),style:{...u.styles.tableRow,...p?u.styles.tableSplitRow:void 0,...m}})},"BaseTableRow")),La=forwardRef(r(function({presentation:t,columnId:o,align:n,verticalAlign:a,icon:s,label:i,description:m,meta:c,actions:d,trailing:g,sortable:u,sortDirection:p="none",sortLabel:f,onSort:b,draggable:h,dragLabel:y,resizable:v,resizeLabel:k,width:x,minWidth:w,maxWidth:C,appearance:S,className:T,classNames:E,style:N,children:O,onDragOver:V,onDrop:W,...F},H){if(In("head presentation",t,["classic-data-grid"]),In("head align",n,["left","center","right"]),In("head verticalAlign",a,["top","middle","bottom"]),In("head sortDirection",p,["asc","desc","none"]),Mo("head sortable",u),Mo("head draggable",h),Mo("head resizable",v),ks("head onSort",b),ys("head sortLabel",f),ys("head dragLabel",y),ys("head resizeLabel",k),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(Ko(x,"head width",{stringAllowed:true}),Ko(w,"head minWidth"),Ko(C,"head maxWidth"),w!==void 0&&C!==void 0&&w>C)throw new Error("BaseTable head minWidth cannot be greater than maxWidth.");let I=Uo(S),{theme:G}=I,q=vt().table,R=I.layout==="split-scroll",D=t==="classic-data-grid",M=n??(R?"center":"left"),$=a??"middle",J=useRef(null),_=useRef(()=>{}),[ee,K]=useState(),Z=r(ce=>{J.current=ce,ws(H,ce);},"setHeadRef"),re=o&&I.columnSizes?.[o]!==void 0?I.columnSizes[o]:x,ae=!!(o&&h!==false&&(h||I.columnDragEnabled)&&I.columnOrder&&I.onColumnOrderChange),le=!!(o&&v!==false&&(v||I.columnResizeEnabled)&&I.onColumnSizeChange);if(le&&C!==void 0&&C<(w??48))throw new Error("BaseTable resizable head maxWidth cannot be smaller than its effective minWidth.");let L=!!(u||b),me=Jb(p),B=z(i)?i:O,j=z(B)||z(m),ne=f??(j?void 0:q.sortColumn({columnId:o?.trim()||void 0})),fe=ae||z(s)||z(i)||z(m)||z(c)||z(d)||z(g)||L,ye=D?jsx("div",{className:l("flex h-full min-w-0 select-none items-center",M==="center"?"justify-center":M==="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||!I.columnOrder||ce.key!=="ArrowLeft"&&ce.key!=="ArrowRight")return;let U=I.columnOrder.indexOf(o);if(U<0)return;let A=Ma(ce.currentTarget),X=ce.key==="ArrowLeft"?-1:1,ie=U+(A?-X:X),Y=I.columnOrder[ie];if(!Y)return;let de=vs(I.columnOrder,o,Y);de&&(ce.preventDefault(),I.onColumnOrderChange?.(de,{columnId:o,targetColumnId:Y}));},"onKeyDown"),onDragStart:r(ce=>{ce.stopPropagation(),I.setDraggingColumnId(o),ce.dataTransfer.effectAllowed="move",ce.dataTransfer.setData(fs,o);},"onDragStart"),onDragEnd:r(ce=>{ce.stopPropagation(),I.setDraggingColumnId(void 0);},"onDragEnd")}:{},children:B}):fe?jsxs("div",{className:l(G.slots.tableHeadContent,E?.content),children:[jsxs("div",{className:l(G.slots.tableHeadMain,E?.main),children:[ae?jsx("button",{type:"button",draggable:true,title:y,"aria-label":y??q.dragColumn({columnId:o}),className:l(G.slots.tableHeadDragHandle,E?.dragHandle),onClick:ce=>ce.stopPropagation(),onKeyDown:ce=>{if(!o||!I.columnOrder||ce.key!=="ArrowLeft"&&ce.key!=="ArrowRight")return;let U=I.columnOrder.indexOf(o);if(U<0)return;let A=Ma(ce.currentTarget),X=ce.key==="ArrowLeft"?-1:1,ie=U+(A?-X:X),Y=I.columnOrder[ie];if(!Y)return;let de=vs(I.columnOrder,o,Y);de&&(ce.preventDefault(),I.onColumnOrderChange?.(de,{columnId:o,targetColumnId:Y}));},onDragStart:ce=>{ce.stopPropagation(),I.setDraggingColumnId(o),ce.dataTransfer.effectAllowed="move",ce.dataTransfer.setData(fs,o);},onDragEnd:ce=>{ce.stopPropagation(),I.setDraggingColumnId(void 0);},children:jsx(ef,{})}):null,s?jsx("span",{className:l(G.slots.tableHeadIcon,E?.icon),children:s}):null,L?jsxs("button",{type:"button",disabled:!b,title:f,"aria-label":ne,className:l(G.slots.tableHeadSortButton,E?.sortButton),onClick:ce=>{ce.stopPropagation(),b?.(o);},children:[jsxs("span",{className:l(G.slots.tableHeadText,E?.text),children:[z(B)?jsx("span",{className:l(G.slots.tableHeadLabel,E?.label),children:B}):null,z(m)?jsx("span",{className:l(G.slots.tableHeadDescription,E?.description),children:m}):null]}),jsx(Qb,{direction:p,className:l(G.slots.tableHeadSortIcon,E?.sortIcon)})]}):jsxs("span",{className:l(G.slots.tableHeadText,E?.text),children:[z(B)?jsx("span",{className:l(G.slots.tableHeadLabel,E?.label),children:B}):null,z(m)?jsx("span",{className:l(G.slots.tableHeadDescription,E?.description),children:m}):null]})]}),z(c)||z(d)||z(g)?jsxs("div",{className:l(G.slots.tableHeadActions,E?.actions),children:[z(c)?jsx("span",{className:l(G.slots.tableHeadMeta,E?.meta),children:c}):null,d,g]}):null]}):O,xe=r(ce=>{V?.(ce),!(!ae||!I.draggingColumnId||I.draggingColumnId===o)&&(ce.preventDefault(),ce.dataTransfer.dropEffect="move");},"handleDragOver"),te=r(ce=>{if(W?.(ce),!ae||!o)return;let U=I.draggingColumnId||ce.dataTransfer.getData(fs);if(!U||U===o)return;let A=vs(I.columnOrder,U,o);A&&(ce.preventDefault(),I.onColumnOrderChange?.(A,{columnId:U,targetColumnId:o})),I.setDraggingColumnId(void 0);},"handleDrop"),se=r(ce=>{if(!le||!o||!I.onColumnSizeChange||ce.button!==0&&ce.pointerType!=="touch")return;ce.preventDefault(),ce.stopPropagation(),_.current();let U=ce.clientX,A=Re??J.current?.offsetWidth??w??48,X=$o(A,w,C),ie=ce.pointerId,Y=ce.currentTarget,de=Y.ownerDocument,we=Ma(Y),Ce=r(_e=>{if(_e.pointerId!==ie)return;let Ze=$o(X+(we?U-_e.clientX:_e.clientX-U),w,C);I.onColumnSizeChange?.(o,Ze,{columnId:o,previousWidth:X,minWidth:w,maxWidth:C});},"handlePointerMove"),Me=r(_e=>{_e.pointerId===ie&&_.current();},"handleStop"),Be=r(_e=>{_e.pointerId===ie&&_.current();},"handleLostCapture");_.current=()=>{de.removeEventListener("pointermove",Ce),de.removeEventListener("pointerup",Me),de.removeEventListener("pointercancel",Me),Y.removeEventListener("lostpointercapture",Be),Y.hasPointerCapture?.(ie)&&Y.releasePointerCapture?.(ie),_.current=()=>{};},Ub(Y,ie),de.addEventListener("pointermove",Ce),de.addEventListener("pointerup",Me),de.addEventListener("pointercancel",Me),Y.addEventListener("lostpointercapture",Be);},"handleResizePointerDown"),Re=typeof re=="number"?$o(re,w,C):ee,Ie=Re??$o(w??48,w,C),ze=r(ce=>{if(!le||!o||!I.onColumnSizeChange)return;let U=Ma(ce.currentTarget),A=Re??$o(J.current?.offsetWidth||w||48,w,C),X;ce.key==="ArrowLeft"&&(X=A+(U?Ia:-Ia)),ce.key==="ArrowRight"&&(X=A+(U?-Ia:Ia)),ce.key==="Home"&&w!==void 0&&(X=w),ce.key==="End"&&C!==void 0&&(X=C),X!==void 0&&(ce.preventDefault(),ce.stopPropagation(),I.onColumnSizeChange(o,$o(X,w,C),{columnId:o,previousWidth:A,minWidth:w,maxWidth:C}));},"handleResizeKeyDown");return useEffect(()=>{if(typeof re=="number"){K(void 0);return}let ce=J.current?.getBoundingClientRect().width;if(ce&&Number.isFinite(ce)){let U=$o(ce,w,C);K(A=>A===U?A:U);}},[re,w,C,le]),useEffect(()=>(le||_.current(),()=>_.current()),[le,o,I.onColumnSizeChange]),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,R&&G.slots.tableSplitHead,M==="center"&&G.slots.tableCellAlignCenter,M==="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-['']",E?.root,T),style:{...G.styles.tableHead,...R?G.styles.tableSplitHead:void 0,width:R?void 0:hs(re),minWidth:R?void 0:hs(w),maxWidth:R?void 0:hs(C),...R?{alignItems:Zb($),justifyContent:Xb(M),textAlign:M}:a?{verticalAlign:a}:void 0,...N},onDragOver:xe,onDrop:te,children:[ye,le&&D?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?jsx("button",{type:"button",role:"separator","aria-orientation":"vertical","aria-valuenow":Ie,"aria-valuemin":w??48,"aria-valuemax":C,"aria-valuetext":`${Ie}px`,title:k,"aria-label":k??q.resizeColumn({columnId:o}),className:l(G.slots.tableHeadResizeHandle,E?.resizeHandle),onClick:ce=>ce.stopPropagation(),onKeyDown:ze,onPointerDown:se}):null]})},"BaseTableHead")),fr=forwardRef(r(function({align:t="left",appearance:o,className:n,classNames:a,style:s,...i},m){In("cell align",t,["left","center","right"]);let{layout:c,theme:d}=Uo(o),g=c==="split-scroll";return jsx("td",{...i,ref:m,"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,...s}})},"BaseTableCell"));forwardRef(r(function({appearance:t,className:o,classNames:n,style:a,...s},i){let{theme:m}=Uo(t);return jsx("caption",{...s,ref:i,"data-slot":"caption",className:l(m.slots.tableCaption,n?.root,o),style:{...m.styles.tableCaption,...a}})},"BaseTableCaption"));var Aa=forwardRef(r(function({colSpan:t,icon:o,title:n,description:a,actions:s,children:i,appearance:m,className:c,classNames:d,style:g,...u},p){if(!Number.isSafeInteger(t)||t<1)throw new Error("BaseTable empty colSpan must be a positive safe integer.");let{layout:f,theme:b}=Uo(m),h=f==="split-scroll",y=z(o)||z(n)||z(a)||z(s);return jsx("tr",{...u,ref:p,"data-slot":"empty-row",className:l(b.slots.tableEmptyRow,h&&b.slots.tableSplitRow,d?.row,c),style:{...b.styles.tableEmpty,...h?b.styles.tableSplitRow:void 0,...g},children:jsx("td",{colSpan:t,"data-slot":"empty-cell",className:l(b.slots.tableEmptyCell,h&&b.slots.tableSplitCell,d?.cell),style:h?{gridColumn:"1 / -1"}:void 0,children:y?jsxs("div",{className:l(b.slots.tableEmptyContent,d?.content),children:[z(o)?jsx("div",{className:l(b.slots.tableEmptyIcon,d?.icon),children:o}):null,z(n)?jsx("div",{className:l(b.slots.tableEmptyTitle,d?.title),children:n}):null,z(a)?jsx("div",{className:l(b.slots.tableEmptyDescription,d?.description),children:a}):null,z(s)?jsx("div",{className:l(b.slots.tableEmptyActions,d?.actions),children:s}):null]}):i})})},"BaseTableEmpty"));var of={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"},yr=forwardRef(r(function({invalid:t=false,disabled:o=false,readOnly:n=false,controlSize:a,appearance:s,className:i,classNames:m,style:c,"aria-invalid":d,onBlur:g,onChange:u,...p},f){for(let[x,w]of [["invalid",t],["disabled",o],["readOnly",n]])if(typeof w!="boolean")throw new TypeError(`BaseTextarea ${x} 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(s),h=Ne(),y=De(b),v=Vo(),k=t||v.invalid;return jsx("textarea",{...h,...p,ref:f,disabled:o,readOnly:n,"aria-invalid":d??(k||void 0),"data-monkeys-component":"textarea","data-slot":"control","data-size":a,"data-invalid":k||void 0,"data-disabled":o||void 0,"data-readonly":n||void 0,className:l(y.slots.controlWrapper,y.slots.controlBase,y.slots.controlTextarea,k&&y.slots.controlInvalid,o&&y.slots.controlDisabled,n&&y.slots.controlReadOnly,a&&of[a],m?.control,i),style:{...y.styles.control,...k?y.styles.controlInvalid:void 0,...o?y.styles.controlDisabled:void 0,...c},onBlur:x=>{g?.(x),v.notifyBlur(x.currentTarget.value);},onChange:x=>{u?.(x),v.notifyChange(x.currentTarget.value);}})},"BaseTextarea"));var nc={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 Ns(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(nc,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 s={};for(let[i,m]of Object.entries(Object.getOwnPropertyDescriptors(a))){if(!("value"in m)||typeof m.value!="string")return;let c=m.value;if(i==="key"){if(c.length>256)return}else if(i==="fill"){if(c!=="currentColor"&&c!=="none")return}else if(nc[n].includes(i)){if(i==="d"){if(!c.length||c.length>8192||!/^[MmZzLlHhVvCcSsQqTtAa0-9eE+.,\s-]+$/.test(c))return}else if(i==="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;s[i]=c;}t.push([n,s]);}return t}r(Ns,"parseAssetIconNodes");var Bn=forwardRef(r(function({icon:t,alt:o,normalizeImageIcon:n=false,className:a,style:s,...i},m){let c=Ne(),d=Vi()??resolveAssetIconNodes,g=Kl(),u=t.kind==="image"?t.src:void 0,[p,f]=useState();useEffect(()=>{if(!u||!g)return;let F=new AbortController;return Promise.resolve().then(()=>g(u,F.signal)).then(H=>{F.signal.aborted||f({reference:u,resolver:g,src:Zt(H,"media")});}).catch(()=>{F.signal.aborted||f({reference:u,resolver:g});}),()=>F.abort()},[u,g]);let b=g?p&&p.reference===u&&p.resolver===g?p.src:void 0:Zt(u,"media"),[h,y]=useState(),v=useRef(null);useEffect(()=>{let F=v.current;b&&F?.complete&&y({source:b,resolver:g,ready:F.naturalWidth>0});},[b,g]);let k=t.kind==="lucide"?t.name:void 0,x=useMemo(()=>{if(k)try{return d.peek?Ns(d.peek(k)):void 0}catch{return}},[k,d]),[w,C]=useState();useEffect(()=>{let F=true;return k&&!x&&Promise.resolve().then(()=>d(k)).then(H=>{F&&C({name:k,resolver:d,nodes:Ns(H)});}).catch(()=>{F&&C({name:k,resolver:d,nodes:void 0});}),()=>{F=false;}},[k,d,x]);let S=w?.name===k&&w?.resolver===d,T=x??(S?w?.nodes:void 0),E=!!(u&&g&&!(p?.reference===u&&p?.resolver===g)),N=h?.source===b&&h?.resolver===g,O=!!(k&&!x&&!S),V=t.kind==="emoji"?"ready":t.kind==="image"?b?N?h?.ready?"ready":"error":"loading":E?"loading":"error":T?"ready":O?"loading":"error",W=V==="loading"?jsx(Dt,{variant:"block",className:"h-5 w-5 max-h-full max-w-full rounded"}):jsx(Wrench,{"aria-hidden":"true",className:"h-5 w-5 max-h-full max-w-full"});return jsx("div",{...c,...i,ref:m,role:"img","aria-label":o,"data-icon-state":V,"aria-busy":V==="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}:{},...s},children:t.kind==="image"?jsxs(Fragment,{children:[b&&V!=="error"&&jsx("img",{ref:v,src:b,alt:"","aria-hidden":"true",onLoad:F=>{F.currentTarget===v.current&&y({source:b,resolver:g,ready:true});},onError:F=>{F.currentTarget===v.current&&y({source:b,resolver:g,ready:false});},style:V==="loading"?{display:"none"}:void 0,className:n?"h-5 w-5 object-contain":"h-full w-full object-cover"},b),V!=="ready"&&W]}):t.kind==="emoji"?jsx("span",{"aria-hidden":"true",children:t.value}):T?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:T.map(([F,H],I)=>{let{key:G,...q}=H;return createElement(F,{...q,key:G??I})})}):W})},"BaseAssetIcon"));function ac({expanded:e}){return 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:jsx("path",{d:e?"m6 9 6 6 6-6":"m9 18 6-6-6-6"})})}r(ac,"ChevronIcon");function gf(){return 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:[jsx("circle",{cx:"12",cy:"12",r:"1"}),jsx("circle",{cx:"12",cy:"5",r:"1"}),jsx("circle",{cx:"12",cy:"19",r:"1"})]})}r(gf,"MoreIcon");function bf(){return 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:[jsx("circle",{cx:"9",cy:"6",r:"1"}),jsx("circle",{cx:"9",cy:"12",r:"1"}),jsx("circle",{cx:"9",cy:"18",r:"1"}),jsx("circle",{cx:"15",cy:"6",r:"1"}),jsx("circle",{cx:"15",cy:"12",r:"1"}),jsx("circle",{cx:"15",cy:"18",r:"1"})]})}r(bf,"GripIcon");function lc(e,t){for(let o of e??[])o.defaultExpanded&&t.add(o.id),lc(o.children,t);}r(lc,"collectDefaultExpandedNodeIds");function ic(e,t){let o=new Set(t??[]);for(let n of e)lc(n.nodes,o);return o}r(ic,"buildDefaultNodeExpandedSet");function sc(e,t){let o=new Set(t??[]);for(let n of e)(n.hideHeader||n.defaultExpanded!==false)&&o.add(n.id);return o}r(sc,"buildDefaultGroupExpandedSet");function dc(e,t,o,n){for(let[a,s]of (e??[]).entries())n.set(s.id,{node:s,group:t,parentId:o,index:a}),dc(s.children,t,s.id,n);}r(dc,"flattenNodes");function ff(e){let t=new Map;for(let o of e)dc(o.nodes,o,void 0,t);return t}r(ff,"buildFlattenedNodeMap");function yf(e,t){return [...t??[],...e.actions??[]]}r(yf,"getNodeActions");function hf(e,t){return [...t??[],...e.actions??[]]}r(hf,"getGroupActions");function Is({groups:e,nodes:t,context:o,selectedNodeId:n,selectedGroupId:a,expandedNodeIds:s,defaultExpandedNodeIds:i,expandedGroupIds:m,defaultExpandedGroupIds:c,resetExpansionKey:d,nodeActions:g,groupActions:u,indentSize:p=16,indentOffset:f=8,actionIcon:b,empty:h,loading:y=false,loadingNode:v,error:k,labels:x,reorderMode:w="none",appearance:C,className:S,classNames:T,onSelectNode:E,onSelectGroup:N,onExpandedNodeIdsChange:O,onExpandedGroupIdsChange:V,onAction:W,onReorderNodes:F}){let H=vt().dataExplorer.viewTree,I=Hl(zl(C)),G=x?.actions??H.actions,q=x?.expand??H.expand,R=x?.collapse??H.collapse,D=v??x?.loading??H.loading,M=h??x?.empty??H.empty,$=Array.isArray(e),J=useMemo(()=>$?e:[{id:"__root__",hideHeader:true,defaultExpanded:true,nodes:Array.isArray(t)?t:[]}],[e,$,t]),_=useMemo(()=>ff(J),[J]),[ee,K]=useState(()=>ic(J,i)),[Z,re]=useState(()=>sc(J,c)),[ae,le]=useState(),[L,me]=useState();useEffect(()=>{K(ic(J,i)),re(sc(J,c));},[c,i,d]);let B=s!==void 0?new Set(s):ee,j=m!==void 0?new Set(m):Z,ne=r((U,A)=>{let X=new Set(B);A?X.add(U):X.delete(U),s===void 0&&K(X),O?.([...X]);},"setNodeExpanded"),fe=r((U,A)=>{let X=new Set(j);A?X.add(U):X.delete(U),m===void 0&&re(X),V?.([...X]);},"setGroupExpanded"),ye=r((U,A)=>A.type==="node"?{type:"node",action:U,node:A.node,group:A.group,context:o}:{type:"group",action:U,group:A.group,context:o},"createActionContext"),xe=r((U,A)=>{let X=U.filter(ie=>{let Y=ye(ie,A);return Zn(ie.visible,Y)??true});return X.length===0?null:jsxs(Ht.Root,{children:[jsx(Ht.Trigger,{asChild:true,children:jsx("button",{type:"button",title:G,"aria-label":G,className:l(I.slots.menuTrigger,A.type==="group"?I.slots.treeGroupActions:I.slots.treeNodeActions,A.type==="group"?T?.groupActions:l(T?.nodeActions,T?.itemActions)),onClick:ie=>ie.stopPropagation(),children:b??jsx(gf,{})})}),jsx(Ht.Portal,{children:jsx(Ht.Content,{align:"end",sideOffset:6,className:l(I.slots.menuContent,T?.menuContent),style:I.styles.menuContent,onClick:ie=>ie.stopPropagation(),children:X.map(ie=>{let Y=ye(ie,A),de=(Zn(ie.disabled,Y)??false)||(Zn(ie.loading,Y)??false),we=Zn(ie.active,Y)??false;return ie.render?jsx("div",{children:ie.render(Y)},ie.id):jsxs("div",{children:[ie.separatorBefore?jsx(Ht.Separator,{className:I.slots.menuSeparator}):null,jsxs(Ht.Item,{title:ie.title,disabled:de,className:l(I.slots.menuItem,Vl(I,ie.tone),we&&"bg-accent text-accent-foreground",T?.menuItem),style:I.styles.menuItem,onSelect:()=>{de||(ie.onAction?.(Y),W?.(Y));},children:[ie.icon?jsx("span",{className:I.slots.menuItemIcon,children:ie.icon}):null,jsx("span",{className:I.slots.menuItemLabel,children:ie.label})]}),ie.separatorAfter?jsx(Ht.Separator,{className:I.slots.menuSeparator}):null]},ie.id)})})})]})},"renderActions"),te=r((U,A)=>{U.preventDefault();let X=ae||U.dataTransfer.getData("application/x-data-explorer-node");if(!X||X===A.id||!F){le(void 0),me(void 0);return}let ie=_.get(X),Y=_.get(A.id);if(!ie||!Y){le(void 0),me(void 0);return}let de=ie.parentId===Y.parentId&&ie.group?.id===Y.group?.id;if(w==="same-parent"&&!de){le(void 0),me(void 0);return}let we={activeNode:ie.node,overNode:Y.node,activeGroup:ie.group,overGroup:Y.group,activeParentId:ie.parentId,overParentId:Y.parentId,oldIndex:ie.index,newIndex:Y.index,sameParent:de,context:o};F(we),le(void 0),me(void 0);},"handleDrop"),se=r((U,A,X)=>{let ie=Array.isArray(U.children)?U.children:[],Y=ie.length>0,de=U.collapsible===false||B.has(U.id),we=n===U.id,Ce=U.selectable!==false&&!U.disabled,Me=w!=="none"&&!!F&&U.reorderable!==false,Be=ae===U.id,_e=L===U.id&&ae!==U.id,Ze=yf(U,g);return jsxs("div",{"data-data-explorer-entry":"node","data-data-explorer-node-id":U.id,"data-data-explorer-group-id":A?.id,className:l(I.slots.treeNode,T?.node,T?.item,U.className),onDragOver:Fe=>{!ae||!Me||(Fe.preventDefault(),me(U.id));},onDragLeave:()=>{L===U.id&&me(void 0);},onDrop:Fe=>te(Fe,U),children:[jsxs("div",{className:l(I.slots.treeNodeButton,we&&I.slots.treeNodeSelected,U.disabled&&I.slots.treeNodeDisabled,Be&&I.slots.treeNodeDragging,_e&&"ring-1 ring-primary/30",we&&T?.itemSelected,we&&T?.nodeSelected,U.disabled&&T?.nodeDisabled,Be&&T?.nodeDragging,T?.nodeButton,T?.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":Y?de:void 0,"aria-label":U.ariaLabel,tabIndex:Ce?0:-1,onClick:()=>{Ce&&E?.(U,o);},onKeyDown:Fe=>{Fe.target===Fe.currentTarget&&Ce&&(Fe.key!=="Enter"&&Fe.key!==" "||(Fe.preventDefault(),E?.(U,o)));},children:[Me?jsx("span",{draggable:true,className:l(I.slots.treeNodeDragHandle,T?.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:jsx(bf,{})}):null,Y?jsx("button",{type:"button",className:l(I.slots.treeNodeToggle,T?.nodeToggle,T?.expander),"aria-label":de?R:q,onClick:Fe=>{Fe.stopPropagation(),ne(U.id,!de);},children:jsx(ac,{expanded:de})}):jsx("span",{className:l(I.slots.treeNodeToggle,T?.nodeToggle)}),U.icon?jsx("span",{className:l(I.slots.treeNodeIcon,T?.nodeIcon,T?.itemIcon),children:U.icon}):null,jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[jsx("span",{className:l(I.slots.treeNodeLabel,T?.nodeLabel,T?.itemLabel),children:U.label}),U.description?jsx("span",{className:l(I.slots.treeNodeDescription,T?.nodeDescription),children:U.description}):null]}),U.meta?jsx("span",{className:l(I.slots.treeNodeMeta,T?.nodeMeta),children:U.meta}):null,U.badge?jsx("span",{className:l(I.slots.treeNodeBadge,T?.nodeBadge),children:U.badge}):null,xe(Ze,{type:"node",node:U,group:A})]}),Y&&de?jsx("div",{className:l(I.slots.treeNodeChildren,T?.nodeChildren,T?.list),children:ie.map(Fe=>se(Fe,A,X+1))}):null]},U.id)},"renderNode"),Re=r((U,A,X)=>U===false?null:jsx("div",{className:l(A,X),children:U}),"renderPlaceholder");if(y)return jsx("div",{className:l(I.slots.treeRoot,T?.root,S),children:Re(D,I.slots.treeLoading,T?.loading)});if(k)return jsx("div",{className:l(I.slots.treeRoot,T?.root,S),children:Re(k??x?.error,I.slots.treeError,T?.error)});let Ie=J.some(U=>(U.nodes??[]).length>0),ze=J.some(U=>U.status==="loading"||U.error);return !Ie&&!ze&&(!$||J.length===0)?jsx("div",{className:l(I.slots.treeRoot,T?.root,S),children:Re(M,I.slots.treeEmpty,T?.empty)}):jsx("div",{className:l(I.slots.treeRoot,T?.root,S),role:Ie||J.some(U=>!U.hideHeader)?"tree":void 0,children:J.map(U=>{let A=U.hideHeader||U.collapsible===false||j.has(U.id),X=U.nodes?.length??0,ie=hf(U,u),Y=a===U.id,de=U.collapsible!==false;return jsxs("section",{"data-data-explorer-entry":"group","data-data-explorer-group-id":U.id,className:l(I.slots.treeGroup,T?.group,U.className),children:[U.hideHeader?null:jsxs("div",{role:"treeitem","aria-label":typeof U.label=="string"?U.label:void 0,"aria-selected":U.selectable?Y:void 0,"aria-expanded":de?A:void 0,className:l(I.slots.treeGroupHeader,I.slots.treeGroupHeaderButton,Y&&I.slots.treeNodeSelected,T?.groupHeader,T?.groupHeaderButton,Y&&T?.itemSelected),children:[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",T?.groupLabel),"aria-pressed":U.selectable?Y:void 0,"aria-expanded":!U.selectable&&de?A:void 0,onClick:()=>{if(U.selectable){N?.(U,o);return}de&&fe(U.id,!A);},children:[U.icon?jsx("span",{className:l(I.slots.treeNodeIcon,T?.nodeIcon,T?.itemIcon),children:U.icon}):null,jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[U.label?jsx("span",{className:l(I.slots.treeNodeLabel,T?.nodeLabel,T?.itemLabel),children:U.label}):null,U.description?jsx("span",{className:l(I.slots.treeNodeDescription,T?.nodeDescription),children:U.description}):null]}),U.meta?jsx("span",{className:l(I.slots.treeNodeMeta,T?.nodeMeta),children:U.meta}):null,U.badge?jsx("span",{className:l(I.slots.treeNodeBadge,T?.nodeBadge),children:U.badge}):null]}),de?jsx("button",{type:"button",className:l(I.slots.treeNodeToggle,T?.expander),"aria-label":A?R:q,"aria-expanded":A,onClick:()=>fe(U.id,!A),children:jsx(ac,{expanded:A})}):jsx("span",{className:l(I.slots.treeNodeToggle,T?.expander)}),xe(ie,{type:"group",group:U})]}),A?jsx("div",{role:"group",className:l(I.slots.treeGroupContent,T?.groupContent,T?.list),children:U.loading||U.status==="loading"?Re(D,I.slots.treeLoading,T?.loading):U.error||U.status==="error"?Re(U.error??x?.error??H.error,I.slots.treeError,T?.error):X>0?U.nodes?.map(we=>se(we,U,0)):Re(U.empty??M,I.slots.treeEmpty,T?.empty)}):null]},U.id)})})}r(Is,"DataExplorerViewTree");var xr="gap-2 rounded-[var(--radius)] border border-transparent text-sm font-medium motion-reduce:transition-none",vr="size-[var(--monkeys-component-navigation-sidebar-icon-size,1.125rem)] shrink-0 text-inherit [&_svg]:size-full",Ms="text-foreground hover:border-transparent hover:bg-[var(--navigation-internal-hover-background)] hover:text-[var(--navigation-internal-hover-foreground)]",Bs="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)]",cc="[--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 uc(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(uc,"unifiedStyle");var xf="[--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)))))]",vf="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)]",hr="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 mc(e,t,o={}){let n=l(xr,e,t,Ms);return {...o,root:l(xf,"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,vf,o.nodeButton),itemSelected:l(Bs,o.itemSelected),nodeIcon:l(vr,"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(hr,"order-2 size-5 p-0 group-focus-within/tree-group:opacity-100",o.groupActions),nodeActions:l(hr,"order-2 size-5 p-0 group-focus-within/tree-node:opacity-100",o.nodeActions),nodeToggle:l(hr,"order-1 empty:hidden",o.nodeToggle),expander:l(hr,"order-1 empty:hidden",o.expander),nodeDragHandle:l(hr,o.nodeDragHandle)}}r(mc,"unifiedTreeClassNames");function Cf({collapsed:e}){return jsx("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-4 w-4",fill:"none",children: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(Cf,"CollapseIcon");function Sf(){return jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-4 w-4",fill:"none",children:[jsx("circle",{cx:"8.5",cy:"8.5",r:"5",stroke:"currentColor",strokeWidth:"1.6"}),jsx("path",{d:"m12.2 12.2 3.3 3.3",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})}r(Sf,"SearchIcon");function Tf(){return jsx("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-3.5 w-3.5",fill:"none",children:jsx("path",{d:"m6 6 8 8m0-8-8 8",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})})}r(Tf,"ClearIcon");function Rf(){return jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-4 w-4",fill:"currentColor",children:[jsx("circle",{cx:"5",cy:"10",r:"1.2"}),jsx("circle",{cx:"10",cy:"10",r:"1.2"}),jsx("circle",{cx:"15",cy:"10",r:"1.2"})]})}r(Rf,"MoreIcon");function Fa({expanded:e}){return 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:jsx("path",{d:"m6 8 4 4 4-4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}r(Fa,"DisclosureIcon");function Nf(e,t){typeof e=="function"?e(t):e&&(e.current=t);}r(Nf,"assignRef");function Pn(e,t){if(!Number.isFinite(t))throw new RangeError(`NavigationSidebar ${e} must be a finite number.`)}r(Pn,"requireFiniteNumber");function If(e){let t=e.minWidth??180,o=e.maxWidth??420,n=e.defaultWidth??256,a=e.collapsedWidth??60,s=e.collapseThreshold??140;if(Pn("minWidth",t),Pn("maxWidth",o),Pn("defaultWidth",n),Pn("collapsedWidth",a),Pn("collapseThreshold",s),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(s<0)throw new RangeError("NavigationSidebar collapseThreshold cannot be negative.");return {defaultWidth:n,minWidth:t,maxWidth:o,collapsedWidth:a,collapseThreshold:s}}r(If,"resolveLayoutBounds");function Ha(e,t){return Math.min(Math.max(e,t.minWidth),t.maxWidth)}r(Ha,"clampWidth");function yc(e,t){if(t){t(e);return}typeof console<"u"&&console.warn("NavigationSidebar could not persist layout state.",e);}r(yc,"reportStorageError");function hc(e){if(e)return e;if(!(typeof window>"u"))return window.localStorage}r(hc,"resolveStorage");function Mf(e,t){let o={collapsed:e.defaultCollapsed??false,width:Ha(t.defaultWidth,t)};if(!e.storageKey)return o;let n=hc(e.storage);if(!n)return o;try{let a=n.getItem(e.storageKey);if(!a)return o;let s=JSON.parse(a);return {collapsed:typeof s.collapsed=="boolean"?s.collapsed:o.collapsed,width:typeof s.width=="number"&&Number.isFinite(s.width)?Ha(s.width,t):o.width}}catch(a){return yc(a,e.onStorageError),o}}r(Mf,"readStoredLayout");function Es(e,t){return t||(typeof e=="string"?e:void 0)}r(Es,"getNodeTitle");function Bf(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(Bf,"activeVariantClassName");function Pf(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?Bs:Bf(a),inactive:t?Ms:"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&&cc,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(Pf,"resolveAppearance");var fc="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)))]",Ef="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)))]",kr="hover:!bg-transparent hover:!text-inherit focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring";function Df(e){return {...e,groupHeader:l(fc,e?.groupHeader),itemSelected:l(Ef,e?.itemSelected),nodeButton:l(fc,"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(kr,e?.expander),nodeToggle:l(kr,e?.nodeToggle),groupActions:l(kr,e?.groupActions),nodeActions:l(kr,e?.nodeActions),nodeDragHandle:l(kr,e?.nodeDragHandle)}}r(Df,"resolveNavigationTreeClassNames");function Ds({item:e,active:t,collapsed:o,mobile:n,embedded:a=false,appearance:s,classNames:i,domClassName:m}){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",s.itemHeight,s.itemPadding,s.unified&&xr,a?"min-h-0 self-stretch border-0 bg-transparent text-inherit hover:bg-transparent hover:text-inherit":t?s.selected:s.inactive,o&&!n&&"justify-center px-0",e.disabled&&"pointer-events-none opacity-50",i?.item,t&&i?.itemActive,n&&i?.mobileItem,m,e.className)}r(Ds,"entryClassName");function Ws({item:e,collapsed:t,mobile:o,classNames:n,endIndicator:a,appearance:s}){return jsxs(Fragment,{children:[z(e.icon)?jsx("span",{className:l("flex size-5 shrink-0 items-center justify-center [&_svg]:size-full",s.unified&&vr,n?.itemIcon),"aria-hidden":"true",children:e.icon}):null,o||!t?jsxs("span",{className:l("flex min-w-0 flex-1 flex-col",n?.itemContent),children:[jsx("span",{className:l("min-w-0 truncate font-semibold",s.unified&&"font-medium",n?.itemLabel),children:e.label}),z(e.description)?jsx("span",{className:l("mt-0.5 truncate text-xs font-normal",s.unified&&"text-inherit",n?.itemDescription),children:e.description}):null]}):null,(o||!t)&&z(e.meta)?jsx("span",{className:l("shrink-0 text-xs text-muted-foreground",n?.itemMeta),children:e.meta}):null,(o||!t)&&z(e.endContent)?jsx("span",{className:l("shrink-0",n?.itemEndContent),children:e.endContent}):null,(o||!t)&&z(a)?jsx("span",{className:"flex shrink-0 items-center justify-center",children:a}):null]})}r(Ws,"EntryContent");function Va({item:e,active:t,collapsed:o,itemAs:n,appearance:a,classNames:s,mobile:i=false,embedded:m=false,onSelect:c,ariaControls:d,ariaExpanded:g,endIndicator:u}){let p=n??(e.href?"a":"button"),f=Es(e.label,e.title),b=e.domProps??{},h=r(v=>{if(e.disabled){v.preventDefault();return}e.onClick?.(v),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:h};return 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:Ds({item:e,active:t,collapsed:o,mobile:i,embedded:m,appearance:a,classNames:s,domClassName:b.className}),children:jsx(Ws,{appearance:a,item:e,collapsed:o,mobile:i,classNames:s,endIndicator:u})})}r(Va,"EntryButton");function Wf({item:e,appearance:t,classNames:o}){let n=e.domProps??{};return jsx("div",{...n,"data-navigation-sidebar-item-id":e.id,"aria-disabled":e.disabled||void 0,title:Es(e.label,e.title),className:Ds({item:e,active:false,collapsed:false,mobile:true,embedded:true,appearance:t,classNames:o,domClassName:n.className}),children:jsx(Ws,{appearance:t,item:e,collapsed:false,mobile:true,classNames:o})})}r(Wf,"EntryPresentation");function Ga({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&&xr,e?t.selected:t.inactive)}r(Ga,"routeRowClassName");function _a(e,t){return t?e.filter(o=>!o.filterIds?.length||o.filterIds.includes(t)):e}r(_a,"filterCatalogItems");function Lf({props:e,collapsed:t,appearance:o}){let{items:n=[],sections:a=[],filters:s=[],activeFilterId:i,activeItemId:m,onFilterSelect:c,itemAs:d,layout:g="single",empty:u,ariaLabel:p,classNames:f}=e,b=_a(n,i),h=a.map(x=>({...x,items:_a(x.items,i)})).filter(x=>x.items.length>0),y=b.length>0||h.length>0,v=s.length>0&&!t?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:s.map(x=>{let w=x.id===i;return jsxs("button",{type:"button",title:x.title??(typeof x.label=="string"?x.label:void 0),"aria-pressed":w,disabled:x.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",w&&"bg-muted text-foreground",f?.filterItem,w&&f?.filterItemActive),onClick:()=>c?.(x),children:[z(x.icon)?jsx("span",{"aria-hidden":"true",children:x.icon}):null,jsx("span",{className:"truncate",children:x.label})]},x.id)})}):null,k=y?jsxs("div",{className:l("min-w-0 flex-1",f?.list),children:[b.length>0?jsx("ul",{className:"grid list-none gap-1 p-0",children:b.map(x=>jsx("li",{children:jsx(Va,{item:x,active:x.active??x.id===m,collapsed:t,itemAs:d,appearance:o,classNames:f})},x.id))}):null,h.map(x=>jsxs("section",{className:l("mt-3 first:mt-0",f?.section,x.className),children:[!t&&z(x.label)?jsx("div",{className:l("mb-1 px-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",f?.sectionLabel,x.labelClassName),children:x.label}):null,jsx("ul",{className:"grid list-none gap-1 p-0",children:x.items.map(w=>jsx("li",{children:jsx(Va,{item:w,active:w.active??w.id===m,collapsed:t,itemAs:d,appearance:o,classNames:f})},w.id))})]},x.id))]}):jsx("div",{className:"px-3 py-8 text-center text-sm text-muted-foreground",children:u});return jsxs("nav",{"aria-label":p,className:l(g==="split"&&!t&&"flex min-w-0 gap-2"),children:[v,k]})}r(Lf,"CatalogContent");function Af({child:e,parent:t,active:o,interactive:n,onSelect:a,appearance:s,classNames:i,embedded:m=false}){let c=n?"button":"div",d=e.domProps??{};return 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:Es(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",s.itemHeight,s.itemPadding,s.unified&&xr,m?"min-h-0 self-stretch border-0 bg-transparent text-inherit hover:bg-transparent hover:text-inherit":o?s.selected:s.inactive,e.disabled&&"pointer-events-none opacity-50",i?.childItem,o&&i?.childItemActive,d.className,e.className),onClick:n&&!e.disabled?()=>a?.(e,t):void 0,children:[z(e.icon)?jsx("span",{className:l("flex size-5 shrink-0 items-center justify-center [&_svg]:size-full",s.unified&&vr),"aria-hidden":"true",children:e.icon}):null,jsx("span",{className:"min-w-0 truncate",children:e.label})]})}r(Af,"ChildEntry");function ja({itemId:e,actions:t,kind:o,className:n,mobile:a=false}){return z(t)?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(ja,"RouteActions");function Ls(e){return e.interaction==="disclosure"}r(Ls,"isDisclosureRouteItem");function zf(e){let t=new Set,o=new Set,n=new Set;for(let a of e){let s=a.id;if(t.has(s))throw new RangeError(`NavigationSidebar route item ids must be unique; received "${s}" more than once.`);if(t.add(s),Ls(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 "${s}" 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 m of a.children??[]){if(o.has(m.id))throw new RangeError(`NavigationSidebar route child ids must be unique; received "${m.id}" more than once.`);o.add(m.id);}}return n}r(zf,"validateRouteItems");function Of({item:e,expanded:t,controls:o,label:n,onToggle:a,classNames:s}){let i=typeof e.label=="string"?e.label:e.id;return jsx("button",{type:"button",disabled:e.disabled,"aria-expanded":t,"aria-controls":o,"aria-label":`${n}: ${i}`,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",s?.childMenuTrigger),onClick:a,children:jsx(Fa,{expanded:t})})}r(Of,"RouteChildrenToggle");function $a({item:e,activeChildId:t,label:o,onChildSelect:n,classNames:a,appearance:s,triggerVariant:i="submenu",mobile:m=false}){let c=(e.children??[]).filter(p=>!p.disabled);if(!e.children?.length||i==="submenu"&&(!n||c.length===0))return null;let d=typeof e.label=="string"?e.label:e.id,g=!!e.disabled||!n||c.length===0,u=e.domProps??{};return jsxs(Ht.Root,{children:[jsx(Ht.Trigger,{asChild:true,children:i==="item"&&s?jsx("button",{...u,type:"button",disabled:g,"aria-label":`${o}: ${d}`,title:o,"data-navigation-sidebar-item-id":e.id,"data-navigation-sidebar-disclosure-menu":"true",className:Ds({item:e,active:false,collapsed:!m,mobile:m,appearance:s,classNames:a,domClassName:u.className}),children:jsx(Ws,{appearance:s,item:e,collapsed:!m,mobile:m,classNames:a,endIndicator:m?jsx(Fa,{expanded:false}):void 0})}):jsx("button",{type:"button",disabled:i==="disclosure"?g:void 0,"data-navigation-sidebar-disclosure-trigger":i==="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",i==="disclosure"?"w-7":"w-6",a?.childMenuTrigger),"aria-label":`${o}: ${d}`,title:o,children:i==="disclosure"?jsx(Fa,{expanded:false}):jsx(Rf,{})})}),jsx(Ht.Portal,{children:jsx(Ht.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=>jsxs(Ht.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:[z(p.icon)?jsx("span",{"aria-hidden":"true",children:p.icon}):null,jsx("span",{className:"truncate",children:p.label})]},p.id))})})]})}r($a,"CollapsedChildMenu");function Ff({props:e,collapsed:t,appearance:o}){let{routeItems:n,activeItemId:a,activeChildId:s,expandedItemIds:i,defaultExpandedItemIds:m=[],itemAs:c,onItemSelect:d,onChildSelect:g,onExpandedItemIdsChange:u,collapsedChildMenuLabel:p="Open submenu",disclosureLabel:f="Toggle submenu",ariaLabel:b,classNames:h}=e,y=useId(),v=useMemo(()=>zf(n),[n]),[k,x]=useState(()=>m),w=i!==void 0,C=i??k,S=useMemo(()=>C.filter(N=>v.has(N)),[v,C]),T=useMemo(()=>new Set(S),[S]),E=useCallback(N=>{if(N.disabled||!v.has(N.id))return;let O=T.has(N.id)?S.filter(V=>V!==N.id):[...S,N.id];w||x(O),u?.(O);},[v,T,w,S,u]);return jsx("nav",{"aria-label":b,children:jsx("ul",{className:l("grid list-none gap-2 p-0",o.unified&&"gap-0.5",h?.list),children:n.map((N,O)=>{let V=Ls(N),W=!V&&N.id===a,F=!!N.children?.length,H=v.has(N.id),I=!H||T.has(N.id),G=!t&&z(N.actions),q=t&&F&&!!g||!t&&H&&!V||G,R=`${y}-route-children-${O}`;return jsxs("li",{className:"grid min-w-0 gap-1",children:[t&&V?jsx($a,{item:N,activeChildId:s,label:p,onChildSelect:g,classNames:h,appearance:o,triggerVariant:"item"}):jsxs("div",{"data-navigation-sidebar-item-row":q?N.id:void 0,"data-active":q?String(W):void 0,className:q?Ga({active:W,appearance:o}):void 0,children:[jsx(Va,{item:N,active:W,collapsed:t,embedded:q,itemAs:V?"button":c,appearance:o,classNames:h,onSelect:V?()=>E(N):d?()=>d(N):void 0,ariaControls:!t&&H&&V?R:void 0,ariaExpanded:!t&&H&&V?I:void 0,endIndicator:!t&&V&&!G?jsx(Fa,{expanded:I}):void 0}),G?jsx(ja,{itemId:N.id,actions:N.actions,kind:"item",className:h?.itemActions}):null,t&&g?jsx($a,{item:N,activeChildId:s,label:p,onChildSelect:g,classNames:h}):null,!t&&H&&(!V||G)?jsx(Of,{item:N,expanded:I,controls:R,label:f,onToggle:()=>E(N),classNames:h}):null]}),!t&&F?jsx("ul",{id:R,hidden:!I,style:I?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",h?.childList),children:N.children?.map(D=>{let M=z(D.actions),$=D.id===s,J=jsx(Af,{child:D,parent:N,active:$,interactive:!!g,onSelect:g,appearance:o,classNames:h,embedded:M});return jsx("li",{children:M?jsxs("div",{"data-navigation-sidebar-child-row":D.id,"data-active":String($),className:Ga({active:$,appearance:o}),children:[J,jsx(ja,{itemId:D.id,actions:D.actions,kind:"child",className:h?.childActions})]}):J},D.id)})}):null]},N.id)})})})}r(Ff,"RouteContent");function Hf(e,t,o){return [..._a(e,o),...t.flatMap(n=>_a(n.items,o))]}r(Hf,"flattenCatalogItems");function Vf({props:e,appearance:t}){if(!e.mobile||e.mobile.mode!=="horizontal")return null;let o=e.classNames,n=e.kind==="catalog"?Hf(e.items??[],e.sections??[],e.activeFilterId):e.routeItems;return 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 s={...o,mobileItem:l(o?.mobileItem,e.mobile?.itemClassName)},i=e.kind==="route"?a:void 0,m=i!==void 0&&z(i.actions);if(e.kind==="route"&&Ls(a))return m?jsxs("div",{"data-navigation-sidebar-item-row":a.id,"data-active":"false",className:l(Ga({active:false,appearance:t}),"shrink-0"),children:[jsx(Wf,{item:a,appearance:t,classNames:s}),jsx(ja,{itemId:a.id,actions:a.actions,kind:"item",className:o?.itemActions,mobile:true}),jsx($a,{item:a,activeChildId:e.activeChildId,label:e.collapsedChildMenuLabel??"Open submenu",onChildSelect:e.onChildSelect,classNames:s,appearance:t,triggerVariant:"disclosure",mobile:true})]},a.id):jsx(Fragment$1,{children:jsx($a,{item:a,activeChildId:e.activeChildId,label:e.collapsedChildMenuLabel??"Open submenu",onChildSelect:e.onChildSelect,classNames:s,appearance:t,triggerVariant:"item",mobile:true})},a.id);let c=e.kind==="catalog"?a.active??a.id===e.activeItemId:a.id===e.activeItemId,d=jsx(Va,{item:a,active:c,collapsed:false,embedded:m,itemAs:e.itemAs,appearance:t,classNames:s,mobile:true,onSelect:e.kind==="route"&&e.onItemSelect?()=>e.onItemSelect?.(a):void 0});return m&&i?jsxs("div",{"data-navigation-sidebar-item-row":a.id,"data-active":String(c),className:l(Ga({active:c,appearance:t}),"shrink-0"),children:[d,jsx(ja,{itemId:i.id,actions:i.actions,kind:"item",className:o?.itemActions,mobile:true})]},a.id):jsx(Fragment$1,{children:d},a.id)})})}r(Vf,"MobileNavigation");function Gf(e,t){let o=If(e);e.width!==void 0&&Pn("width",e.width);let n=useRef(null);n.current||(n.current=Mf(e,o));let a=useRef(null),[s,i]=useState(n.current.collapsed),[m,c]=useState(n.current.width),[d,g]=useState(e.search?.defaultValue??""),[u,p]=useState(false),f=e.collapsed??s,b=Ha(e.width??m,o),h=e.search?.value??d,y=e.collapsed!==void 0,v=e.width!==void 0,k=useMemo(()=>Pf(e.appearance),[e.appearance]),x=e.collapsible??true,w=e.resizable??true,C=x?e.collapsePlacement??"header":"none",S=e.collapseLabel??"Collapse sidebar",T=e.expandLabel??"Expand sidebar",E=e.resizeLabel??"Resize sidebar",N=!f||o.collapsedWidth>0,O=r(q=>{a.current=q,Nf(t,q);},"setSidebarRef"),V=useCallback(q=>{!x&&q||(y||i(q),e.onCollapsedChange?.(q));},[x,y,e.onCollapsedChange]),W=useCallback(q=>{let R=Ha(q,o);v||c(R),e.onWidthChange?.(R);},[o.maxWidth,o.minWidth,v,e.onWidthChange]);useEffect(()=>{if(!e.storageKey)return;let q=hc(e.storage);if(q)try{q.setItem(e.storageKey,JSON.stringify({collapsed:f,width:b}));}catch(R){yc(R,e.onStorageError);}},[e.onStorageError,e.storage,e.storageKey,f,b]),useEffect(()=>{if(!u)return;let q=document.body.style.cursor,R=document.body.style.userSelect,D=r($=>{let J=a.current;if(!J)return;let _=$.clientX-J.getBoundingClientRect().left;if(x&&_<o.collapseThreshold){V(true);return}V(false),W(_);},"handlePointerMove"),M=r(()=>p(false),"handlePointerUp");return window.addEventListener("pointermove",D),window.addEventListener("pointerup",M),document.body.style.cursor="col-resize",document.body.style.userSelect="none",()=>{window.removeEventListener("pointermove",D),window.removeEventListener("pointerup",M),document.body.style.cursor=q,document.body.style.userSelect=R;}},[o.collapseThreshold,x,u,V,W]);let F=r(q=>{if(!(q.key!=="ArrowLeft"&&q.key!=="ArrowRight")){if(q.preventDefault(),q.key==="ArrowLeft"){let R=b-24;x&&R<o.collapseThreshold?V(true):W(R);return}f&&V(false),W(Math.max(b+24,o.minWidth));}},"handleResizeKeyDown"),H=r(q=>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,q),"aria-label":f?T:S,title:f?T:S,"aria-expanded":!f,onClick:()=>V(!f),children:jsx(Cf,{collapsed:f})}),"collapseButton"),I=z(e.title)||z(e.headerLeading)||z(e.headerActions)||C==="header",G=r(()=>{if(e.kind==="catalog")return jsx(Lf,{props:e,collapsed:f,appearance:k});if(e.kind==="route")return jsx(Ff,{props:e,collapsed:f,appearance:k});let q=e.tree;return jsx(Is,{...q,classNames:k.unified?mc(k.itemHeight,k.itemPadding,q.classNames):Df(q.classNames)})},"renderContent");return jsxs(Fragment,{children:[jsxs("aside",{...e.rootDomProps,ref:O,"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",k.root,e.desktopClassName,e.classNames?.root,e.rootDomProps?.className,e.className),style:{...k.unified?uc(e.appearance?.activeVariant):{},...e.style,width:e.widthMode==="fill"?void 0:f?o.collapsedWidth:b,transition:u?"none":e.style?.transition},children:[w?jsx("button",{type:"button",role:"separator","aria-orientation":"vertical","aria-valuemin":o.minWidth,"aria-valuemax":o.maxWidth,"aria-valuenow":b,"aria-label":E,title:E,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:q=>{q.preventDefault(),p(true);},onKeyDown:F,children: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"?H("absolute -right-3 top-1/2 z-50 -translate-y-1/2 border border-border bg-background shadow-sm"):null,N?jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-col overflow-hidden",children:[I?jsxs("div",{className:l("flex min-h-12 min-w-0 items-center gap-2 border-b border-border/60 px-3",k.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:[z(e.headerLeading)?jsx("span",{className:l("flex shrink-0 items-center justify-center",e.classNames?.headerLeading),children:e.headerLeading}):null,!f&&z(e.title)?jsx("div",{className:l("min-w-0 flex-1 truncate text-sm font-semibold",e.classNames?.title),children:e.title}):null,!f&&z(e.headerActions)?jsx("div",{className:l("flex shrink-0 items-center gap-1",e.classNames?.headerActions),children:e.headerActions}):null,C==="header"?H():null]}):null,!f&&e.search?jsx("div",{className:l("px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))] pb-2 pt-3",k.unified&&"pb-1",e.classNames?.search),children: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",k.searchHeight,k.unified&&"rounded-[var(--radius)] border-border bg-[var(--monkeys-component-navigation-sidebar-search-background,transparent)] px-2"),children:[jsx("span",{className:l("flex shrink-0",k.unified&&vr,e.classNames?.searchIcon),"aria-hidden":"true",children:e.search.icon??jsx(Sf,{})}),jsx("input",{type:"search",value:h,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:q=>{let R=q.currentTarget.value;e.search?.value===void 0&&g(R),e.search?.onValueChange?.(R);}}),h&&e.search.clearLabel?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:jsx(Tf,{})}):null]})}):null,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",k.unified&&e.search&&"pt-1",f&&"px-1.5",e.classNames?.content),children:G()}),z(e.footer)||C==="footer"?jsxs("div",{className:l("flex shrink-0 items-center gap-2 border-t border-border/70 p-3",k.unified&&"border-border",f&&"justify-center px-1",e.classNames?.footer),children:[!f&&z(e.footer)?jsx("div",{className:"min-w-0 flex-1",children:e.footer}):null,C==="footer"?H():null]}):null]}):null]}),e.kind!=="tree"?jsx(Vf,{props:e,appearance:k}):null]})}r(Gf,"NavigationSidebarInner");var Cr=forwardRef(Gf);var jf=forwardRef(r(function({title:t,items:o,sections:n=[],activeItemId:a,onItemSelect:s,itemAs:i,collapsed:m,defaultCollapsed:c=false,onCollapsedChange:d,width:g,onWidthChange:u,defaultWidth:p=220,minWidth:f=180,maxWidth:b=420,collapsedWidth:h=60,collapseThreshold:y=140,storageKey:v,resizable:k=true,collapsible:x=true,collapseLabel:w="Collapse sidebar",expandLabel:C="Expand sidebar",resizeLabel:S="Resize sidebar",desktopClassName:T="hidden md:flex",mobileClassName:E="flex md:hidden",className:N,classNames:O,style:V,...W},F){let{level:H,variables:I}=la(),G=ca(W),q=r(R=>({...R,icon:R.icon??(R.iconName?jsx(Bn,{icon:{kind:"lucide",name:R.iconName},alt:"",className:"h-4 w-4 rounded-none bg-transparent"}):void 0),endContent:R.endContent??(R.count!==void 0?jsx(un,{children:R.count}):void 0),onClick:r(D=>{R.disabled||(R.onClick?.(D),D.defaultPrevented||s?.({itemId:R.id}));},"onClick")}),"project");return jsx(or,{depth:H,children:jsx(Cr,{ref:F,kind:"catalog",title:t,items:o.map(q),sections:n.map(R=>({...R,items:R.items.map(q)})),activeItemId:a,itemAs:i,collapsed:m,defaultCollapsed:c,onCollapsedChange:d,width:g,onWidthChange:u,defaultWidth:p,minWidth:f,maxWidth:b,collapsedWidth:h,collapseThreshold:y,storageKey:v,resizable:k,collapsible:x,collapsePlacement:"header",collapseLabel:w,expandLabel:C,resizeLabel:S,desktopClassName:T,dataComponent:"workbench-resizable-sidebar",rootDomProps:{...W,...G,"data-workbench-resizable-sidebar":"","data-monkeys-bento-level":H},appearance:{density:"compact",surface:"panel",activeVariant:"soft"},mobile:{mode:"horizontal",className:E},className:l(nd,"[&>div]:gap-[var(--monkeys-bento-gap)] [--monkeys-sidebar-item-padding:var(--monkeys-bento-gap)] data-[collapsed=true]:[--monkeys-sidebar-item-padding:0px]",O?.root,N),classNames:{root:O?.root,header:l("min-h-0 gap-[var(--monkeys-bento-gap)] border-0 p-0",O?.header),title:l("text-xs font-medium uppercase text-muted-foreground",O?.title),collapseButton:l("h-8 w-8",O?.collapseButton),content:l("space-y-[var(--monkeys-bento-gap)] p-0",O?.list),list:"[&_ul]:gap-[var(--monkeys-bento-gap)]",section:l("mt-[var(--monkeys-bento-gap)]",O?.section),sectionLabel:l("mb-[var(--monkeys-bento-gap)] px-[var(--monkeys-bento-gap)]",O?.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",O?.item),itemIcon:l("[&_svg]:h-3.5 [&_svg]:w-3.5",O?.itemIcon),itemLabel:O?.itemLabel,resizeHandle:O?.resizeHandle,mobileNav:l("gap-[var(--monkeys-bento-gap,var(--global-spacing,0.75rem))] pb-0",O?.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",O?.mobileItem)},style:{...I,...V}})})},"WorkbenchResizableSidebar"));function Kf(e){return !!(e.header||e.footer||e.bodyAs||e.bodyClassName||e.bodyProps||e.classNames?.body)}r(Kf,"shouldRenderBodyWrapper");var Uf=forwardRef(r(function({as:t="section",bodyAs:o="div",header:n,footer:a,children:s,className:i,headerClassName:m,bodyClassName:c,footerClassName:d,bodyProps:g,classNames:u,style:p,...f},b){let h=Kf({header:n,footer:a,bodyAs:o==="div"?void 0:o,bodyClassName:c,bodyProps:g,classNames:u}),{className:y,...v}=g??{};return 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",u?.root,i),style:p,...f,children:[n?jsx("div",{className:l("shrink-0 border-b border-border/40 px-4 py-3 dark:border-border/30",u?.header,m),children:n}):null,h?jsx(o,{className:l("min-h-0 flex-1 overflow-hidden",u?.body,c,y),...v,children:s}):s,a?jsx("div",{className:l("shrink-0 border-t border-border/40 px-4 py-3 dark:border-border/30",u?.footer,d),children:a}):null]})},"WorkbenchContentPane"));var wc={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 Xf(e){return e.label??e.key}r(Xf,"getDefaultColumnLabel");function Zf(e){return e.filter(t=>qo(t)&&t.hidden!==true).map(t=>qo(t))}r(Zf,"getDefaultVisibleColumnKeys");function Qf({columns:e,visibleColumnKeys:t,allowEmptyVisibleColumns:o}){let n=new Set(e.map(qo).filter(Boolean)),a=Array.isArray(t)?t.filter(s=>n.has(String(s))):null;return a&&(a.length||o)?a:Zf(e)}r(Qf,"getResolvedVisibleColumnKeys");function ey(e){return [{value:"compact",label:e.compact},{value:"comfortable",label:e.comfortable},{value:"detailed",label:e.detailed}]}r(ey,"getDefaultDensityOptions");function ty(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(ty,"getDefaultGridColumnOptions");function oy(e){return [{value:1,label:e.bentoColumns(1)},{value:2,label:e.bentoColumns(2)},{value:3,label:e.bentoColumns(3)}]}r(oy,"getDefaultBentoColumnOptions");function ny(e){return [{value:"limit",label:e.topLimit},{value:"all",label:e.allFields}]}r(ny,"getDefaultDetailVisibilityOptions");function ry(e){return [{value:"fixed",label:e.adaptiveGrid},{value:"masonry",label:e.masonry}]}r(ry,"getDefaultLayoutOptions");function Sr(e){return String(e)}r(Sr,"normalizeOptionValue");function Tr(e,t,o){let n=String(t??o);return e.some(a=>String(a.value)===n)?n:String(o)}r(Tr,"getOptionValue");function kc(e){let t=Number.parseInt(e,10);return Number.isFinite(t)?t:1}r(kc,"parseNumberOption");var Rr={root:"flex w-full flex-wrap",item:"min-w-[58px] flex-1 px-2 text-[11px]",label:"text-[11px]"};function Cc({columns:e=[],galleryFieldOptions:t,value:o,onValueChange:n,labels:a,densityOptions:s,gridColumnOptions:i,bentoColumnOptions:m,detailVisibilityOptions:c,layoutOptions:d,getColumnLabel:g=Xf,getColumnDescription:u,showColumnVisibility:p=true,showGalleryControls:f=true,showLayoutControl:b=true,showGridColumns:h=true,showDetailColumns:y=true,allowEmptyVisibleColumns:v=false,className:k,classNames:x}){let w={...wc,...a},C=o||{},S=e.filter(M=>qo(M)),T=Qf({columns:S,visibleColumnKeys:C.visibleColumnKeys,allowEmptyVisibleColumns:v}),E=new Set(T),N=(t||S).filter(M=>qo(M)),O=s||ey(w),V=i||ty(w),W=m||oy(w),F=c||ny(w),H=d||ry(w),I=typeof n=="function",G=r(M=>{n?.({...C,...M},M);},"updateValue"),q=r(M=>{if(!I)return;let $=new Set(T);$.has(M)?$.delete(M):$.add(M);let J=S.map(qo).filter(_=>$.has(_));!J.length&&!v&&(J=[M]),G({visibleColumnKeys:J});},"toggleColumn"),R=p&&S.length>0,D=f;return jsxs("div",{className:l("space-y-3 text-foreground",x?.root,k),children:[R?jsxs("section",{className:l("space-y-2",x?.section),children:[jsx("div",{className:l("text-[10px] font-medium uppercase tracking-wide text-muted-foreground",x?.sectionHeader),children:w.visibleColumns}),jsx("div",{className:l("max-h-[220px] space-y-1 overflow-y-auto pr-1",x?.columnList),children:S.map(M=>{let $=qo(M);return jsx(dn,{checked:E.has($),disabled:!I,label:g(M),description:u?.(M),onChange:()=>q($),className:l("flex w-full rounded-lg px-2 py-1.5 hover:bg-muted/50",x?.columnItem)},`workbench-gallery-column-${$}`)})})]}):null,D?jsxs("section",{className:l("space-y-3 border-t border-border/60 pt-3",x?.section),children:[jsx(No,{label:w.coverField,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsx(uo,{value:String(C.galleryFieldKey||"auto"),options:[{value:"auto",label:w.autoDetect},...N.map(M=>({value:qo(M),label:g(M)}))],disabled:!I,onChange:M=>G({galleryFieldKey:M.currentTarget.value||"auto"}),className:x?.control})}),jsx(No,{label:w.cardDensity,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsx(pn,{value:Tr(O,C.galleryDensity,"comfortable"),options:O.map(M=>({value:Sr(M.value),label:M.label,disabled:M.disabled})),onValueChange:M=>G({galleryDensity:M}),className:l("w-full",x?.control),classNames:Rr})}),h?jsx(No,{label:w.cardColumns,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsx(pn,{value:Tr(V,C.galleryGridColumns,"auto"),options:V.map(M=>({value:Sr(M.value),label:M.label,disabled:M.disabled})),onValueChange:M=>G({galleryGridColumns:M==="auto"?"auto":kc(M)}),className:l("w-full",x?.control),classNames:Rr})}):null,y?jsx(No,{label:w.detailColumns,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsx(pn,{value:Tr(W,C.galleryBentoColumns,2),options:W.map(M=>({value:Sr(M.value),label:M.label,disabled:M.disabled})),onValueChange:M=>G({galleryBentoColumns:kc(M)}),className:l("w-full",x?.control),classNames:Rr})}):null,jsx(No,{label:w.fieldVisibility,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsx(pn,{value:Tr(F,C.galleryDetailVisibility,"limit"),options:F.map(M=>({value:Sr(M.value),label:M.label,disabled:M.disabled})),onValueChange:M=>G({galleryDetailVisibility:M}),className:l("w-full",x?.control),classNames:Rr})}),C.galleryDetailVisibility!=="all"?jsx(No,{label:w.fieldLimit,description:w.fieldLimitHint,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground",description:"text-[10px]"},children:jsx(Qt,{type:"number",min:1,step:1,value:String(C.galleryDetailLimit||4),disabled:!I,onChange:M=>G({galleryDetailLimit:M.currentTarget.value}),className:x?.control})}):null,b?jsx(No,{label:w.layout,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsx(pn,{value:Tr(H,C.galleryLayout,"fixed"),options:H.map(M=>({value:Sr(M.value),label:M.label,disabled:M.disabled})),onValueChange:M=>G({galleryLayout:M}),className:l("w-full",x?.control),classNames:Rr})}):null]}):null]})}r(Cc,"WorkbenchGallerySettingsPanel");function Ua({open:e,defaultOpen:t=false,onOpenChange:o,triggerIcon:n,triggerLabel:a,triggerTitle:s,align:i="end",popoverWidth:m=320,panelHeader:c,panelBefore:d,panelAfter:g,panelClassName:u,buttonClassName:p,popoverClassName:f,buttonClassNames:b,labels:h,className:y,classNames:v,...k}){let x={...wc,...h},w=useRef(null),[C,S]=useState(t),[T,E]=useState({}),N=e!==void 0,O=N?!!e:C,V=r(H=>{N||S(H),o?.(H);},"setOpen");useLayoutEffect(()=>{if(!O)return;let H=r(()=>{let q=w.current?.getBoundingClientRect();if(!q||typeof window>"u")return;let R=12,D=Math.max(window.innerWidth-R*2,0),M=Math.min(m,D||m),$=i==="start"?q.left:q.right-M,J=Math.min(Math.max($,R),Math.max(window.innerWidth-M-R,R)),_=Math.min(q.bottom+8,Math.max(window.innerHeight-80,R));E({left:J,top:_,width:M,maxHeight:`calc(100vh - ${Math.round(_+R)}px)`});},"updatePopoverPosition"),I=r(q=>{w.current?.contains(q.target)||V(false);},"handlePointerDown"),G=r(q=>{q.key==="Escape"&&V(false);},"handleKeyDown");return H(),window.addEventListener("resize",H),window.addEventListener("scroll",H,true),window.addEventListener("pointerdown",I),window.addEventListener("keydown",G),()=>{window.removeEventListener("resize",H),window.removeEventListener("scroll",H,true),window.removeEventListener("pointerdown",I),window.removeEventListener("keydown",G);}},[i,O,m]);let W=a??x.settingsButton,F=c??x.title;return jsxs("div",{ref:w,className:l("relative inline-flex",b?.root,y),children:[jsx(ve,{icon:n,label:W,title:s||(typeof W=="string"?W:void 0),iconOnly:!!n,active:O,tone:"muted","aria-haspopup":"dialog","aria-expanded":O,className:l(b?.trigger,p),onClick:()=>V(!O)}),O?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",i==="start"?"origin-top-left":"origin-top-right",b?.popover,f),style:T,children:[F?jsx("div",{className:l("mb-3 text-[11px] font-medium text-foreground",b?.header),children:F}):null,d,jsx(Cc,{...k,labels:x,className:l(b?.panel,u),classNames:v}),g]}):null]})}r(Ua,"WorkbenchGallerySettingsButton");function Nc(){return jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),jsx("path",{d:"M3 10h18M9 4v16"})]})}r(Nc,"TableViewIcon");function Ic(){return jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[jsx("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1.5"}),jsx("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1.5"}),jsx("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1.5"}),jsx("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1.5"})]})}r(Ic,"GalleryViewIcon");function Sc(){return jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[jsx("path",{d:"M20 7h-9M7 7H4M14 17H4M20 17h-3"}),jsx("circle",{cx:"9",cy:"7",r:"2"}),jsx("circle",{cx:"16",cy:"17",r:"2"})]})}r(Sc,"SettingsIcon");function dy({open:e}){return 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:jsx("path",{d:"m6 9 6 6 6-6"})})}r(dy,"ChevronDownIcon");var cy=[{value:"list",label:"Table view",icon:jsx(Nc,{})},{value:"gallery",label:"Gallery view",icon:jsx(Ic,{})}];function Tc(e){return e.icon!==void 0?e.icon:e.value==="list"||e.value==="table"?jsx(Nc,{}):e.value==="gallery"?jsx(Ic,{}):null}r(Tc,"getViewModeOptionIcon");function Rc(e){return e.triggerLabel??e.labels?.settingsButton??"Settings"}r(Rc,"getSettingsTriggerLabel");function uy({value:e,options:t,onValueChange:o,classNames:n}){let a=useRef(null),[s,i]=useState(false),m=t.find(d=>d.value===e)||t.find(d=>!d.disabled)||t[0],c=m?Tc(m):null;return useEffect(()=>{if(!s)return;let d=r(u=>{a.current?.contains(u.target)||i(false);},"handlePointerDown"),g=r(u=>{u.key==="Escape"&&i(false);},"handleKeyDown");return window.addEventListener("pointerdown",d),window.addEventListener("keydown",g),()=>{window.removeEventListener("pointerdown",d),window.removeEventListener("keydown",g);}},[s]),m?jsxs("div",{ref:a,className:l("relative inline-flex",n?.viewModeRoot),children:[jsxs("button",{type:"button","aria-haspopup":"listbox","aria-expanded":s,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:()=>i(d=>!d),children:[c?jsx("span",{className:"inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center text-muted-foreground",children:c}):null,jsx("span",{className:"min-w-0 truncate",children:m.label}),jsx(dy,{open:s})]}),s?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===m.value,u=Tc(d);return 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),i(false));},children:[u?jsx("span",{className:"inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:u}):null,jsx("span",{className:"min-w-0 truncate",children:d.label})]},d.value)})}):null]}):null}r(uy,"WorkbenchContentToolbarViewModeControl");var zs=forwardRef(r(function({as:t="div",children:o,end:n,viewMode:a,viewModeOptions:s,onViewModeChange:i,gallerySettings:m,gallerySettingsPlacement:c="start",className:d,startClassName:g,endClassName:u,classNames:p,...f},b){let h=s||(a?cy:[]),y=m&&typeof m=="object"?m:null,v=!!h.length,k=!!y,x=k&&c!=="end",w=k&&c==="end",C=v||x||!!o,S=!!n||w;return 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?jsxs("div",{className:l("flex flex-wrap items-center gap-2",p?.start,g),children:[v?jsx(uy,{value:a,options:h,onValueChange:i,classNames:p}):null,x&&y?jsx(Ua,{align:"end",triggerIcon:jsx(Sc,{}),triggerLabel:Rc(y),...y,buttonClassName:l("!h-7 !w-7 !min-h-0 !rounded-md !p-0 text-xs",p?.settings,y.buttonClassName)}):null,o]}):null,S?jsxs("div",{className:l("flex shrink-0 items-center gap-2",p?.end,u),children:[n,w&&y?jsx(Ua,{align:"end",triggerIcon:jsx(Sc,{}),triggerLabel:Rc(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 gy(e){return !!(e.header||e.footer||e.bodyAs||e.bodyClassName||e.bodyProps||e.classNames?.body)}r(gy,"shouldRenderBodyWrapper");function Ec(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(Ec);let t=Children.toArray(e);return t.length?t.some(o=>typeof o=="string"?o.trim().length>0:true):false}r(Ec,"hasRenderableChildren");function by(e,t){return t===void 0?{}:e===void 0?{width:t}:{width:e?t:0,opacity:e?1:0}}r(by,"resolveWidthStyle");function Mc(e){return e.label??e.key}r(Mc,"getFallbackFieldLabel");function fy(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(fy,"getObjectDisplayValue");function Bc(e){return e==null||e===""}r(Bc,"isEmptyDetailValue");function Pc(e){return ["string","number","boolean"].includes(typeof e)}r(Pc,"isPlainDisplayValue");function Dc(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"||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(Dc,"getMediaDisplayData");function yy(e,t){let o=String(e?.renderType||"").toLowerCase();return ["image","media","preview","thumbnail"].includes(o)||!!Dc(t)}r(yy,"shouldRenderAsMedia");function hy(e,t){return e?typeof e=="string"||typeof e=="number"?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:isValidElement(e)?e:jsx(e,{className:l("h-3.5 w-3.5 shrink-0 text-primary",t)}):jsxs("span",{className:l("relative inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center",t),children:[jsx("span",{className:"absolute inset-0 rounded-full border border-primary/25 bg-primary/10"}),jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-primary"})]})}r(hy,"renderMaybeFieldIcon");function xy(e,t,o){return jsxs("span",{className:l("inline-flex min-w-0 items-center gap-1.5 text-[11px] font-semibold text-foreground",o?.fieldLabel),children:[hy(t.labelIcon||t.icon,o?.fieldLabelIcon),jsx("span",{className:"min-w-0 truncate",children:e})]})}r(xy,"renderDetailFieldLabel");function vy({media:e,classNames:t}){return jsxs("div",{className:l("grid gap-2",t?.mediaValue),children:[jsx("div",{className:"overflow-hidden rounded-md border border-border/55 bg-muted/20 dark:border-border/45 dark:bg-muted/10",children:jsx("img",{src:e.src,alt:String(e.alt||""),className:l("block aspect-[16/9] w-full object-cover",t?.mediaImage)})}),e.caption?jsx("div",{className:l("truncate text-[11px] leading-4 text-muted-foreground",t?.mediaCaption),children:e.caption}):null]})}r(vy,"WorkbenchDetailSidebarMediaValue");function Os(e,t,o,n){if(Bc(e))return t;if(isValidElement(e))return e;if(yy(o,e)){let a=Dc(e);if(a)return jsx(vy,{media:a,classNames:n})}if(Array.isArray(e)){let a=e.map(s=>Os(s,"",void 0,n)).filter(s=>!Bc(s));return a.length?a.every(Pc)?a.map(String).join(" \xB7 "):jsx("span",{className:"inline-flex flex-wrap items-center gap-1",children:a.map((s,i)=>jsxs("span",{className:"inline-flex items-center gap-1",children:[i>0?jsx("span",{className:"text-muted-foreground",children:"\xB7"}):null,Pc(s)?String(s):s]},i))}):t}if(typeof e=="object"){let a=fy(e);return a===void 0?t:Os(a,t,o,n)}return String(e)}r(Os,"getDefaultDetailDisplayValue");function ky(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(ky,"getDefaultFieldValue");function wy(e,t){return typeof e.hidden=="function"?e.hidden(e,t):!!e.hidden}r(wy,"shouldHideField");function Cy(e,t){return typeof e.hidden=="function"?e.hidden(e,t):!!e.hidden}r(Cy,"shouldHideSection");function Sy({record:e,fields:t,sections:o,fieldColumns:n=1,emptyValue:a="\u2014",emptyState:s,getFieldValue:i,renderFieldValue:m,formatFieldValue:c,formatFieldLabel:d,classNames:g}){let p=(o?.length?o:t?.length?[{fields:t,columns:n}]:[]).filter(f=>!Cy(f,e));return p.length?jsx("div",{className:l("space-y-3",g?.autoBody),children:p.map((f,b)=>{let h=(f.fields||[]).filter(k=>!wy(k,e)),y=f.id||`section-${b}`;if(!h.length&&!f.emptyState)return null;let v=h.map((k,x)=>{let w={field:k,fieldIndex:x,section:f,sectionIndex:b,record:e},C=i?i(k,e,w):ky(k,e),S=m?m(k,e,w):c?c(C,w):Os(C,k.emptyValue??a,k,g),T=d?d(Mc(k),w):Mc(k);return {term:xy(T,k,g),value:S}});return jsxs("section",{className:l("min-w-0 space-y-3",g?.section),children:[f.title||f.description?jsxs("div",{className:l("min-w-0 space-y-1.5",g?.sectionHeader),children:[f.title?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?jsx("div",{className:l("text-[11px] leading-5 text-muted-foreground",g?.sectionDescription),children:f.description}):null]}):null,v.length?jsx(ds,{items:v,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)}}):jsx("div",{className:l("py-3 text-center text-xs text-muted-foreground",g?.emptyState),children:f.emptyState})]},y)})}):s?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:s}):null}r(Sy,"WorkbenchDetailSidebarAutoContent");var Ty=forwardRef(r(function({as:t="aside",bodyAs:o="div",open:n,width:a,header:s,footer:i,resizeHandle:m,children:c,record:d,fields:g,sections:u,fieldColumns:p,emptyValue:f,emptyState:b,getFieldValue:h,renderFieldValue:y,formatFieldValue:v,formatFieldLabel:k,className:x,headerClassName:w,bodyClassName:C,footerClassName:S,resizeHandleClassName:T,bodyProps:E,classNames:N,style:O,...V},W){let F=Ec(c)?c:jsx(Sy,{record:d,fields:g,sections:u,fieldColumns:p,emptyValue:f,emptyState:b,getFieldValue:h,renderFieldValue:y,formatFieldValue:v,formatFieldLabel:k,classNames:N}),H=gy({header:s,footer:i,bodyAs:o==="div"?void 0:o,bodyClassName:C,bodyProps:E,classNames:N}),{className:I,...G}=E??{};return jsxs(t,{ref:W,"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",N?.root,x),style:{...by(n,a),...O},...V,children:[m?jsx("div",{className:l(N?.resizeHandle,T),children:m}):null,s?jsx("div",{className:l("shrink-0 border-b border-border/40 px-4 py-3 dark:border-border/30",N?.header,w),children:s}):null,H?jsx(o,{className:l("min-h-0 flex-1 overflow-y-auto",N?.body,C,I),...G,children:F}):F,i?jsx("div",{className:l("shrink-0 border-t border-border/40 px-4 py-3 dark:border-border/30",N?.footer,S),children:i}):null]})},"WorkbenchDetailSidebar"));function Lc(e){return typeof e=="function"?true:typeof e=="object"&&e!==null&&!isValidElement(e)&&"$$typeof"in e}r(Lc,"isWorkbenchIconComponent");function Ir(e,t){return e?isValidElement(e)?e:Lc(e)?jsx(e,{className:t}):e:null}r(Ir,"renderWorkbenchIcon");function Ac(e){return !e||!Lc(e)?null:e}r(Ac,"getWorkbenchIconComponent");function Iy(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r(Iy,"toCssSize");var My=160,By=56,Py=128;function zc(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(zc,"numericCssSize");function Hc(e,t){return e.renderType==="icon"?By:t?Py:My}r(Hc,"defaultWorkbenchColumnWidth");function Oc(e,t,o){return t??zc(e.width)??zc(e.minWidth)??Hc(e,o)}r(Oc,"resolvedWorkbenchColumnWidth");function Ey(e){return e==null||e===false?null:e}r(Ey,"defaultFormatLabel");function Fc(e){if(typeof e=="string"||typeof e=="number")return String(e)}r(Fc,"toTitle");function Dy(e,t){return e?.id??e?.key??e?.linkKey??t}r(Dy,"defaultGetRowKey");function Wy(e){return e?.linkKey??e?.id??e?.key}r(Wy,"defaultGetRowSelectionKey");function Ly(e,t){if(!t?.length)return e;let o=new Map(e.map(i=>[i.key,i])),n=t.map(i=>o.get(i)).filter(Boolean),a=new Set(n.map(i=>i.key)),s=e.filter(i=>!a.has(i.key));return [...n,...s]}r(Ly,"getOrderedColumns");function Gs(e,t){let o=new Set(e),n=(t||[]).filter(i=>o.has(i)),a=new Set(n),s=e.filter(i=>!a.has(i));return [...n,...s]}r(Gs,"normalizeColumnOrder");function Ay({helperText:e,className:t}){return z(e)?jsxs("span",{className:l("group relative inline-flex items-center",t),children:[jsx("button",{type:"button",title:Fc(e),"aria-label":Fc(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:"?"}),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(Ay,"WorkbenchTableHeaderHelper");function zy({rows:e=[],columns:t=[],onRowClick:o,selectedRowKey:n,selectedLinkKey:a,activePrimaryColumn:s,activeTablePrimaryColumn:i,renderedRowCount:m,totalRowCount:c,tableMinWidth:d,minWidth:g,bodyMaxHeight:u="min(58vh, 38rem)",stickyFirstColumn:p=true,appearance:f,headerPresentation:b,fillRemainingWidthColumnKey:h,columnOrder:y,columnSizes:v,columnDragEnabled:k,columnResizeEnabled:x,className:w,tableClassName:C,rowClassName:S,classNames:T,style:E,renderCell:N,renderFieldValue:O,renderColumnHeader:V,onColumnOrderChange:W,onColumnSizeChange:F,onSort:H,formatLabel:I=Ey,getColumnDataType:G,getColumnIcon:q,getColumnTypeIcon:R,getRowKey:D=Dy,getRowSelectionKey:M=Wy,isActionColumn:$,isActionField:J,isRowDisabled:_,isWorkbenchPlaceholderRow:ee,emptyState:K="-",hiddenRowsMessage:Z,scrollFooter:re,scrollRestoration:ae}){let le=t.map(oe=>oe.key).join(""),L=useMemo(()=>le?le.split(""):[],[le]),[me,B]=useState(L),[j,ne]=useState({}),fe=useRef(null),ye=useRef(new Map),xe=useRef(ae);xe.current=ae;let te=useRef(void 0),se=useCallback(()=>{let oe=fe.current,Se=xe.current;if(!oe||!Se||te.current!==Se.key)return;let Ve=oe.getBoundingClientRect().top,Ye=Array.from(ye.current.entries()).find(([,ot])=>ot.getBoundingClientRect().bottom>Ve);Se.write({x:oe.scrollLeft,y:oe.scrollTop,...Ye?{rowKey:Ye[0],rowOffset:Ye[1].getBoundingClientRect().top-Ve}:{}});},[]);useEffect(()=>{let oe=fe.current,Se=xe.current;if(!oe||!Se||te.current===Se.key||e.length===0)return;let Ve=Se.read(),Ye=r(()=>{let Bt=Ve?.rowKey?ye.current.get(Ve.rowKey):void 0,Ue=Bt&&typeof Ve?.rowOffset=="number"?oe.scrollTop+Bt.getBoundingClientRect().top-oe.getBoundingClientRect().top-Ve.rowOffset:Ve?.y??0;oe.scrollTo({left:Ve?.x??0,top:Math.max(0,Ue),behavior:"auto"}),te.current=Se.key;},"restore"),ot=oe.ownerDocument.defaultView;if(!ot){Ye();return}let gt=ot.requestAnimationFrame(Ye);return ()=>ot.cancelAnimationFrame(gt)},[e,ae?.key]),useEffect(()=>{let oe=fe.current?.ownerDocument.defaultView;return oe?.addEventListener("pagehide",se),()=>{oe?.removeEventListener("pagehide",se),se();}},[se]);let[Re,Ie]=useState();useEffect(()=>{B(oe=>Gs(L,oe));},[L]);let ze=y?Gs(L,y):me,ce=v??j,U=useCallback((oe,Se)=>{let Ve=Gs(L,oe);y||B(Ve),W?.(Ve,Se);},[y,L,W]),A=useCallback((oe,Se,Ve)=>{v||ne(Ye=>({...Ye,[oe]:Se})),F?.(oe,Se,Ve);},[v,F]),X=n??a,ie=s??i,Y=Ly(t,ze),de=h?Y.reduce((oe,Se)=>Se.key===h?oe:oe+Oc(Se,ce[Se.key],$?.(Se)??J?.(Se)??false),0):void 0,we=h&&de!==void 0&&Re!==void 0?Math.max(0,Math.round(Re-de)):void 0,Ce=Y.flatMap(oe=>oe.key!==h?[oe]:we===0?[]:we===void 0?[oe]:[{...oe,width:we,minWidth:we,maxWidth:we}]),Me=Math.max(0,Number(c||e.length)-Number(m||e.length)),Be=N??O??((oe,Se)=>Se?.[oe.key]),_e=$??J??(()=>false),Ze=_??ee??(()=>false),Fe=q??R,tt=de!==void 0&&we!==void 0?de+we:void 0,We=tt??d??g??Math.max(760,Ce.reduce((oe,Se)=>oe+Oc(Se,ce[Se.key],_e(Se)),0));useEffect(()=>{if(!h){Ie(void 0);return}let oe=fe.current;if(!oe)return;let Se=oe.ownerDocument.defaultView,Ve=r(()=>{let gt=Math.round(oe.getBoundingClientRect().width);!Number.isFinite(gt)||gt<=0||Ie(Bt=>Bt===gt?Bt:gt);},"updateWidth");Ve();let Ye=Se?.ResizeObserver,ot=Ye?new Ye(Ve):void 0;return ot?.observe(oe),Se?.addEventListener("resize",Ve),()=>{ot?.disconnect(),Se?.removeEventListener("resize",Ve);}},[h]);let Le=Me>0&&Z?typeof Z=="function"?Z(Me,m||e.length,c||e.length):Z:null;return jsxs(Pa,{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",T?.root,w),style:u==="100%"?{display:"flex",minHeight:0,flex:1,flexDirection:"column",...E}:E,children:[jsxs("div",{ref:fe,onScroll:se,className:l("w-full overflow-auto",T?.scrollArea),style:{maxHeight:Iy(u),...u==="100%"?{minHeight:0,flex:1}:{}},children:[jsxs(Ea,{appearance:f,columnOrder:ze,columnSizes:ce,columnDragEnabled:k,columnResizeEnabled:x,onColumnOrderChange:U,onColumnSizeChange:A,className:l("w-full table-auto text-left text-xs",T?.table,C),style:{width:tt,minWidth:We},children:[jsx(Da,{appearance:f,className:l("z-20 text-xs font-sans text-muted-foreground",T?.header),children:jsx(gn,{className:l("hover:bg-transparent",T?.headerRow),children:Ce.map((oe,Se)=>{let Ve=Hc(oe,_e(oe)),Ye=oe.renderType||oe.type||G?.(oe.key,e,oe),ot=Ir(Fe?.(Ye,oe),"h-3.5 w-3.5 shrink-0 text-primary"),Bt=Ce[Se-1]?.renderType==="icon"&&oe.key===ie?.key,Ue=V?V(oe,{column:oe,columnIndex:Se,columns:Ce,rows:e,columnType:Ye}):I(oe.label,{column:oe}),$t=!V&&(z(oe.trailing)||z(oe.helperText))?jsxs("span",{className:"inline-flex items-center gap-1.5",children:[z(oe.trailing)?I(oe.trailing,{column:oe}):null,jsx(Ay,{helperText:I(oe.helperText,{column:oe}),className:T?.helper})]}):void 0,zt=!!oe.sortable,pe=zt&&H?()=>H(oe.key,oe):void 0;return jsx(La,{appearance:f,presentation:b,columnId:oe.key,align:oe.align,icon:V?void 0:ot,label:Ue,description:V?void 0:I(oe.description,{column:oe}),meta:V?void 0:I(oe.meta,{column:oe}),actions:oe.actions,trailing:$t,sortable:zt,sortDirection:oe.sortDirection,sortLabel:oe.sortLabel,onSort:pe,draggable:oe.draggable,dragLabel:oe.dragLabel,resizable:oe.resizable,resizeLabel:oe.resizeLabel,width:oe.width??Ve,minWidth:typeof oe.minWidth=="number"?oe.minWidth:void 0,maxWidth:typeof oe.maxWidth=="number"?oe.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)]",oe.compactHeaderClassName,oe.renderType==="icon"&&"pl-3 pr-1",Bt&&"pl-2",T?.headerCell,oe.headerClassName),style:{minWidth:typeof oe.minWidth=="string"?oe.minWidth:void 0,maxWidth:typeof oe.maxWidth=="string"?oe.maxWidth:void 0,...oe.headerStyle}},oe.key)})})}),jsx(Wa,{appearance:f,className:l("divide-y divide-border/35 dark:divide-border/30",T?.body),children:e.length?e.map((oe,Se)=>{let Ve=D(oe,Se),Ye=Ze(oe,Se),ot=M(oe,Se),gt=!!(X&&String(ot)===String(X)),Bt=typeof S=="function"?S(oe,Se):S;return jsx(gn,{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?.(oe,Se));},onKeyDown:Ue=>{Ue.target!==Ue.currentTarget||Ye||!o||!["Enter"," "].includes(Ue.key)||(Ue.preventDefault(),o(oe,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",T?.row,Bt),children:Ce.map((Ue,$t)=>{let zt=_e(Ue)||Ue.wrap===true,Ge=Ce[$t-1]?.renderType==="icon"&&Ue.key===ie?.key;return jsx(fr,{appearance:f,align:Ue.align,className:l(zt?"align-top whitespace-normal":"whitespace-nowrap","px-4 py-3 text-muted-foreground",!zt&&"overflow-hidden text-ellipsis",p&&$t===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",T?.cell,Ue.cellClassName),style:Ue.cellStyle,children:Be(Ue,oe,{row:oe,rowIndex:Se,column:Ue,columnIndex:$t,compact:true,surface:"list"})},`${Ve}-${Ue.key}`)})},Ve)}):jsx(Aa,{appearance:f,colSpan:Math.max(Ce.length,1),classNames:{cell:"px-4 py-10 text-center text-sm text-muted-foreground"},children:K})})]}),z(re)?jsx("div",{style:{minWidth:We},children:re}):null]}),Le?jsx("div",{className:l("border-t border-border/40 px-4 py-2 text-xs text-muted-foreground dark:border-border/30",T?.footer),children:Le}):null]})}r(zy,"WorkbenchTableView");function _s(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r(_s,"toCssSize");function Wn(){return typeof window<"u"}r(Wn,"isBrowser");function Gc(e,t){return e?.id??e?.key??t}r(Gc,"defaultGetRowKey");function Xa(e){return typeof e.width=="number"?e.width:typeof e.minWidth=="number"?e.minWidth:160}r(Xa,"getColumnDefaultSize");function Oy(e,t){return e.reduce((o,n)=>(o[n.key]=t?.[n.key]??Xa(n),o),{})}r(Oy,"buildDefaultColumnSizes");function _c(e,t){if(!e||!Wn())return t;try{let o=JSON.parse(window.localStorage.getItem(e)||"{}");return Object.keys(t).reduce((n,a)=>{let s=Number(o?.[a]);return n[a]=Number.isFinite(s)?s:t[a],n},{})}catch{return t}}r(_c,"loadStoredColumnSizes");function jc(e,t){!e||!Wn()||window.localStorage.setItem(e,JSON.stringify(t));}r(jc,"persistColumnSizes");function Jc(e){return e?`${e}.frozenColumnCount`:void 0}r(Jc,"getFrozenColumnStorageKey");function Xc(e){return e?`${e}.frozenEndColumnCount`:void 0}r(Xc,"getFrozenEndColumnStorageKey");function Yo(e,t){return Number.isFinite(e)?Math.max(0,Math.min(Math.round(e),t)):0}r(Yo,"clampFrozenColumnCount");function Fy(e,t,o){let n=Yo(e,o),a=Yo(t,Math.max(0,o-n));return {startCount:n,endCount:a}}r(Fy,"normalizeFrozenColumnCounts");function $c(e,t,o){let n=Yo(t,o),a=Jc(e);if(!a||!Wn())return n;try{let s=window.localStorage.getItem(a);if(s===null)return n;let i=Number(s);return Number.isFinite(i)?Yo(i,o):n}catch{return n}}r($c,"loadStoredFrozenColumnCount");function Hy(e,t){let o=Jc(e);!o||!Wn()||window.localStorage.setItem(o,String(t));}r(Hy,"persistFrozenColumnCount");function Kc(e,t,o){let n=Yo(t,o),a=Xc(e);if(!a||!Wn())return n;try{let s=window.localStorage.getItem(a);if(s===null)return n;let i=Number(s);return Number.isFinite(i)?Yo(i,o):n}catch{return n}}r(Kc,"loadStoredFrozenEndColumnCount");function Vy(e,t){let o=Xc(e);!o||!Wn()||window.localStorage.setItem(o,String(t));}r(Vy,"persistFrozenEndColumnCount");function Ja(e,t){let o=new Set(e),n=(t||[]).filter(i=>o.has(i)),a=new Set(n),s=e.filter(i=>!a.has(i));return [...n,...s]}r(Ja,"normalizeColumnOrder");function Gy(e,t){let o=Ja(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(Gy,"getOrderedColumns");function Er(e,t){let o=t[e.key];return typeof o=="number"?o:Xa(e)}r(Er,"getColumnNumericWidth");function _y(e,t,o){let n=new Map,a=0;return e.slice(0,Math.max(0,o)).forEach(s=>{n.set(s.key,a),a+=Er(s,t);}),n}r(_y,"buildFrozenOffsets");function jy(e,t,o){let n=new Map,a=0;return e.slice(Math.max(0,e.length-o)).reverse().forEach(s=>{n.set(s.key,a),a+=Er(s,t);}),n}r(jy,"buildFrozenEndOffsets");function Uc(e,t,o){return typeof e=="function"?e(t,o):e}r(Uc,"resolveRowClassName");function qc(e,t){let o=t?.[e.key];return o==null||o===""?"\u2014":String(o)}r(qc,"renderDefaultCell");function Yc({children:e,wrap:t}){return 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(Yc,"InteractiveTableCellContent");function $y({className:e}){return jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:e,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.75",children:[jsx("path",{d:"M5.25 2.75h5.5"}),jsx("path",{d:"M6.25 2.75v4L4.5 9.25h7L9.75 6.75v-4"}),jsx("path",{d:"M8 9.25v4"})]})}r($y,"PinIcon");function Ky({rows:e=[],columns:t=[],pinnedTopRows:o=[],getRowKey:n=Gc,getPinnedTopRowKey:a=Gc,renderCell:s,renderPinnedTopCell:i,renderColumnHeader:m,onRowClick:c,getRowState:d,rowClassName:g,pinnedTopRowClassName:u,emptyState:p="\u2014",columnMenuLabels:f,columnStorageKey:b,columnOrder:h,columnSizes:y,defaultColumnSizes:v,columnDragEnabled:k=false,columnResizeEnabled:x=true,frozenColumnCount:w=0,frozenEndColumnCount:C=0,tableMinWidth:S,bodyMaxHeight:T="min(60vh, 42rem)",appearance:E,className:N,tableClassName:O,classNames:V,style:W,onColumnOrderChange:F,onColumnSizeChange:H,onResetColumnSizes:I,onFrozenColumnCountChange:G,onFrozenEndColumnCountChange:q,onSort:R}){let D=vt().workbench.interactiveTable,M=t.map(Y=>Y.key).join(""),$=useMemo(()=>M?M.split(""):[],[M]),J=useMemo(()=>Oy(t,v),[t,v]),[_,ee]=useState($),[K,Z]=useState(()=>_c(b,J)),[re,ae]=useState(()=>$c(b,w,t.length)),[le,L]=useState(()=>Kc(b,C,t.length));useEffect(()=>{ee(Y=>Ja($,Y));},[$]),useEffect(()=>{y||Z(_c(b,J));},[y,b,J]),useEffect(()=>{ae($c(b,w,t.length));},[b,t.length,w]),useEffect(()=>{L(Kc(b,C,t.length));},[b,t.length,C]);let me=h?Ja($,h):_,B=y??K,j=Gy(t,me),{startCount:ne,endCount:fe}=Fy(re,le,j.length),ye=_y(j,B,ne),xe=jy(j,B,fe),te=S??Math.max(760,j.reduce((Y,de)=>Y+Er(de,B),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=useCallback((Y,de)=>{let we=Ja($,Y);h||ee(we),F?.(we,de);},[h,$,F]),Ie=useCallback((Y,de,we)=>{let Ce=t.find(Fe=>Fe.key===Y),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={...B,[Y]:_e};y||Z(Ze),jc(b,Ze),H?.(Y,_e,we);},[y,b,t,H,B]),ze=useCallback(Y=>{let de=J[Y.key]??Xa(Y),we=Er(Y,B),Ce={...B,[Y.key]:de};y||Z(Ce),jc(b,Ce),H?.(Y.key,de,{columnId:Y.key,previousWidth:we,minWidth:Y.minWidth,maxWidth:Y.maxWidth}),I?.(Ce);},[y,b,J,H,I,B]),ce=useCallback(Y=>{let de=Yo(Y,Math.max(0,j.length-fe));ae(de),Hy(b,de),G?.(de);},[b,G,j.length,fe]),U=useCallback(Y=>{let de=Yo(Y,Math.max(0,j.length-ne));L(de),Vy(b,de),q?.(de);},[b,q,j.length,ne]),A=r(Y=>{if(Y<ne)return "start";if(Y>=j.length-fe)return "end"},"getFrozenPosition"),X=r((Y,de,we=false)=>{let Ce=A(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===j.length-1)&&(we?"z-50":"z-30"))},"getFrozenClassName"),ie=r((Y,de)=>{let we=A(de);if(we==="start")return {left:ye.get(Y.key)??0};if(we==="end")return {right:xe.get(Y.key)??0}},"getFrozenStyle");return jsx(Pa,{appearance:E,className:l("flex h-full min-h-0 flex-col overflow-hidden rounded-lg border border-border/60 bg-card",V?.root,N),style:W,children:jsx("div",{className:l("min-h-0 flex-1 overflow-auto",V?.scrollArea),style:{maxHeight:_s(T)},children:jsxs(Ea,{appearance:E,columnOrder:me,columnSizes:B,columnDragEnabled:k,columnResizeEnabled:x,onColumnOrderChange:Re,onColumnSizeChange:Ie,className:l("w-full table-fixed text-left text-xs",V?.table,O),style:{minWidth:te},children:[jsx("colgroup",{children:j.map(Y=>jsx("col",{style:{width:_s(B[Y.key]??Y.width),minWidth:_s(Y.minWidth)}},Y.key))}),jsx(Da,{appearance:E,className:l("border-b border-border/60 bg-muted/60 text-[11px] font-medium text-muted-foreground",V?.tableHeader),children:jsx(gn,{appearance:E,className:l("hover:bg-transparent",V?.headerRow),children:j.map((Y,de)=>{let we=m?m(Y,{column:Y,columnIndex:de,columns:j,rows:e}):Y.label,Ce=!!Y.sortable,Me=Ce&&R?()=>R(Y.key,Y):void 0,Be=de<ne,_e=de>=j.length-fe,Ze=Be||_e,Fe=Er(Y,B)===(J[Y.key]??Xa(Y));return jsxs(Vd,{modal:false,children:[jsx(is,{asChild:true,appearance:E,children:jsx(La,{appearance:E,columnId:Y.key,align:Y.align,label:we,description:Y.description,trailing:Ze?jsx("span",{title:se.frozenColumnTitle,className:"inline-flex h-5 w-5 items-center justify-center rounded text-primary",children:jsx($y,{className:"h-3.5 w-3.5"})}):null,sortable:Ce,sortDirection:Y.sortDirection,sortLabel:Y.sortLabel,onSort:Me,draggable:Y.draggable,resizable:Y.resizable,width:Y.width,minWidth:Y.minWidth,maxWidth:Y.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(Y,de,true),Y.headerClassName,Y.className,V?.headerCell),style:ie(Y,de)})}),jsxs(ss,{appearance:E,alignOffset:-4,className:"min-w-44",children:[jsx(Gd,{appearance:E,children:se.columnActions}),Ze?jsx(Rn,{appearance:E,onSelect:()=>{_e?U(j.length-de-1):ce(de);},children:_e?se.unfreezeEndColumn:se.unfreezeColumn}):jsx(Rn,{appearance:E,onSelect:()=>ce(de+1),children:se.freezeColumn}),Ze?null:jsx(Rn,{appearance:E,onSelect:()=>U(j.length-de),children:se.freezeEndColumn}),jsx(Rn,{appearance:E,disabled:ne===0&&fe===0,onSelect:()=>{ce(0),U(0);},children:se.unfreezeAllColumns}),jsx(_d,{appearance:E}),jsx(Rn,{appearance:E,disabled:Fe,onSelect:()=>ze(Y),children:se.resetColumnWidth})]})]},Y.key)})})}),jsxs(Wa,{appearance:E,className:l("divide-y divide-border/50",V?.body),children:[o.map((Y,de)=>{let we=a(Y,de),Ce=Uc(u,Y,de);return jsx(gn,{appearance:E,className:l("bg-card/95",V?.pinnedTopRow,Ce),children:j.map((Me,Be)=>jsx(fr,{appearance:E,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,V?.cell),style:ie(Me,Be),children:jsx(Yc,{wrap:Me.wrap,children:i?i(Me,Y,{row:Y,rowIndex:de,column:Me,columnIndex:Be,isPinnedTopRow:true}):qc(Me,Y)})},`pinned-${we}-${Me.key}`))},`pinned-${we}`)}),e.length?e.map((Y,de)=>{let we=n(Y,de),Ce=d?.(Y,de)||{},Me=Uc(g,Y,de);return jsx(gn,{appearance:E,interactive:!!c&&!Ce.disabled,selected:Ce.selected,disabled:Ce.disabled,onClick:()=>{Ce.disabled||c?.(Y,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",V?.row,Me),children:j.map((Be,_e)=>jsx(fr,{appearance:E,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,V?.cell),style:ie(Be,_e),children:jsx(Yc,{wrap:Be.wrap,children:s?s(Be,Y,{row:Y,rowIndex:de,column:Be,columnIndex:_e,isPinnedTopRow:false}):qc(Be,Y)})},`${we}-${Be.key}`))},we)}):o.length?null:jsx(Aa,{appearance:E,colSpan:Math.max(j.length,1),className:V?.empty,children:p})]})]})})})}r(Ky,"InteractiveTable");function Uy({value:e,placeholder:t,disabled:o,multiline:n=false,commitOnBlur:a=true,className:s,inputClassName:i,onCommit:m}){let c=String(e||""),[d,g]=useState(c);useEffect(()=>{g(c);},[c]);let u=useCallback(async()=>{let f=String(d||"").trim(),b=String(c||"").trim();if(f!==b)try{await m?.(f);}catch{g(c);}},[d,c,m]),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",i);return n?jsx("textarea",{className:l(p,s),disabled:o,value:d,placeholder:t,onChange:f=>g(f.target.value),onBlur:()=>{a&&u();},onKeyDown:f=>{(f.metaKey||f.ctrlKey)&&f.key==="Enter"&&f.currentTarget.blur(),f.key==="Escape"&&(g(c),f.currentTarget.blur());}}):jsx("input",{className:l(p,s),disabled:o,value:d,placeholder:t,onChange:f=>g(f.target.value),onBlur:()=>{a&&u();},onKeyDown:f=>{f.key==="Enter"&&f.currentTarget.blur(),f.key==="Escape"&&(g(c),f.currentTarget.blur());}})}r(Uy,"InteractiveTableEditableTextCell");function qy({children:e,mono:t=false,className:o}){return jsx("div",{className:l("min-w-0 text-xs text-muted-foreground",t&&"font-mono",o),children:z(e)?e:"\u2014"})}r(qy,"InteractiveTableReadonlyCell");function Yy({value:e,options:t,disabled:o,ariaLabel:n,children:a,className:s,onChange:i}){return jsxs("div",{className:l("relative flex w-full items-center",s),children:[a,jsx("select",{"aria-label":n,disabled:o,value:e,onChange:m=>i?.(m.target.value),className:"absolute inset-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed",children:t.map(m=>jsx("option",{value:m.value,children:m.label},m.value))})]})}r(Yy,"InteractiveTableSelectCell");function Zc({children:e,title:t,presentation:o,renderSlot:n}){let a=o.title,s=a?.placement??"none",i=a?.background==="panel"?"div":"span",m=(o.slots??[]).map(g=>({slot:g,content:n?.(g)})).filter(g=>g.content!=null),c=s==="none"?null:jsx("div",{className:"monkeys-gallery-cover-title",title:typeof t=="string"||typeof t=="number"?String(t):void 0,"data-placement":s,"data-background":a?.background??(s.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:jsx(i,{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:a?.background==="panel"?void 0:a?.maxLines??2,overflow:"hidden"},children:t})}),d=r(g=>jsx("div",{className:"monkeys-gallery-slot-row","data-row":g,children:m.filter(({slot:u})=>u.position.startsWith(g)).map(({slot:u,content:p})=>jsx("div",{"data-card-slot":u.position,"data-visibility":u.visibility??"always",className:u.visibility==="hover"?"monkeys-gallery-hover-actions":void 0,style:{gridColumn:u.position.endsWith("left")?1:u.position.endsWith("center")?2:3,justifySelf:u.position.endsWith("left")?"start":u.position.endsWith("center")?"center":"end",padding:u.inset??12,gap:u.gap??8,flexDirection:u.direction==="vertical"?"column":"row"},children:p},u.position))}),"band");return 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:[s==="above"&&c,jsxs("div",{className:"monkeys-gallery-media-card",children:[jsx("div",{className:"monkeys-gallery-card-media",children:e}),jsxs("div",{className:"monkeys-gallery-card-overlay",children:[jsxs("div",{children:[s==="overlay-top"&&c,d("top")]}),d("middle"),jsxs("div",{children:[d("bottom"),s==="overlay-bottom"&&c]})]})]}),s==="below"&&c]})}r(Zc,"WorkbenchGalleryCardSurface");var Jy=/\.(png|jpe?g|webp|gif|svg|bmp|avif)$/i,Xy=/\.(wav|mp3|ogg|m4a|flac|aac)$/i,Zy=r(e=>/^https?:\/\//i.test(String(e||"")),"isLikelyUrl"),Qc=r(e=>String(e?.renderType||e?.type||"").toLowerCase(),"getColumnRenderKind"),Qy=r(e=>String(e||"").startsWith("data:image/")||Jy.test(String(e||"")),"isImageLikeValue"),eh=r(e=>String(e||"").startsWith("data:audio/")||Xy.test(String(e||"")),"isAudioLikeValue"),th=r(e=>String(e||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),"escapeSvgText"),Ln=r((e,t)=>e?t?.[e.key]??null:null,"getDefaultGalleryFieldValue"),Lr=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"),Ar=r((e={key:""},t)=>Qc(e)==="image"||Qy(t),"isDefaultGalleryImageField"),zr=r((e={key:""},t)=>Qc(e)==="audio"||eh(t),"isDefaultGalleryAudioField"),eu=r((e,t,o)=>{if(Zy(e)||String(e||"").startsWith("data:image/"))return String(e);let n=th(e||o||t||""),s=`<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(s)}`},"getDefaultGalleryImagePreviewSrc"),Za=r((e,t,{getFieldValue:o=Ln,shouldEnhanceMultimodal:n=true,isImageField:a=Ar,isAudioField:s=zr}={})=>{if(!e||!n)return false;let i=o(e,t);return a(e,i)||s(e,i)},"isDefaultGalleryMediaColumn"),Qa=r((e,t,{isMediaColumn:o=r(()=>false,"isMediaColumn")}={})=>!e||e.renderType==="icon"?false:!o(e,t),"isDefaultGalleryTitleCandidate"),ei=r((e,t,{isMediaColumn:o=r(()=>false,"isMediaColumn")}={})=>!e||e.renderType==="icon"?false:!o(e,t),"isDefaultGallerySummaryCandidate"),tu=r((e,t,{compact:o=false,getFieldValue:n=Ln,getDisplayText:a=Lr}={})=>{let s=n(e,t);return jsx("span",{className:l("leading-relaxed",o&&e?.wrap===true&&"line-clamp-2 block"),children:a(s)})},"renderDefaultGalleryFieldValue");var nh=r(e=>e==="compact"?2:e==="detailed"?6:4,"getDefaultGalleryDetailLimit"),rh=r((e,t)=>e===1||e===2||e===3?Number(e):t==="detailed"?1:2,"getNormalizedGalleryBentoColumns"),ah=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:nh(e)},"getNormalizedGalleryDetailLimit"),ih=r(e=>e==="compact"?"p-3":e==="detailed"?"p-4":"p-3.5","getGalleryCardPaddingClassName"),sh=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"),lh=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 dh(e){return Ac(e)}r(dh,"getIconComponent");function ch(e){return e}r(ch,"defaultFormatLabel");function uh(e){return typeof e=="string"||typeof e=="number"?String(e):""}r(uh,"getLabelText");function js({row:e,columns:t,onClick:o,cardInteraction:n="button",cardPresentation:a,renderCardSlot:s,renderCoverTitle:i,isSelected:m=false,isMasonry:c=false,galleryFieldKey:d="auto",galleryDensity:g="comfortable",galleryBentoColumns:u,galleryDetailVisibility:p="limit",galleryDetailLimit:f,galleryDetailPresentation:b="tiles",shouldEnhanceMultimodal:h=true,getFieldValue:y,isMediaColumn:v,isTitleCandidate:k,isSummaryCandidate:x,getDisplayText:w,renderFieldValue:C,getImagePreviewSrc:S,isImageField:T,isAudioField:E,AudioPlayerComponent:N,cardVariant:O="default",renderPreview:V,renderMeta:W,renderLeadingVisual:F,resolveRecordVisual:H,hiddenDetailFieldKeys:I=[],labels:G,formatLabel:q=ch,className:R}){let D=y||Ln,M=w||Lr,$=T||Ar,J=E||zr,_=S||eu,ee=v||((ge,He)=>Za(ge,He,{getFieldValue:D,shouldEnhanceMultimodal:h,isImageField:$,isAudioField:J})),K=k||((ge,He)=>Qa(ge,He,{isMediaColumn:ee})),Z=x||((ge,He)=>ei(ge,He,{isMediaColumn:ee})),re=C||((ge,He,{compact:ft}={})=>tu(ge,He,{compact:ft,getFieldValue:D,getDisplayText:M})),ae=O==="preview-only",le=O==="image-only",L=O==="chromatic-bento",B=(d!=="auto"?t.find(ge=>ge.key===d&&ee(ge,e)):null)||(h?t.find(ge=>ee(ge,e)):null),j=t.find(ge=>ge.renderType==="icon"),ne=j&&H?H(e[j.key],e,j):null,fe=dh(ne?.Icon||ne?.icon),ye=B?D(B,e):null,xe=B?$(B,ye):false,te=B?J(B,ye):false,se=t.filter(ge=>ge.key!==B?.key&&ge.renderType!=="icon"),Ie=se.filter(ge=>{if(!ge||ee(ge,e)||!K(ge,e))return false;let He=D(ge,e);return !(He==null||He==="")})[0]||null,ze=M(Ie?D(Ie,e):e.linkKey||e.id),U=se.filter(ge=>ge&&ge.key!==Ie?.key&&!ee(ge,e)&&Z(ge,e)).map(ge=>({column:ge,text:String(M(D(ge,e)))})),A=(U.find(({text:ge})=>ge!=="\u2014"&&ge.length>12)||U.find(({text:ge})=>ge!=="\u2014"))?.column||null,X=A?M(D(A,e)):"",ie=new Set(I),Y=se.filter(ge=>ge.key!==Ie?.key&&ge.key!==A?.key&&!ie.has(ge.key)),de=ah({density:g,visibility:p,limit:f}),we=Number.isFinite(de)?Y.slice(0,de):Y,Ce=g==="detailed",Me=rh(u,g),Be=ih(g),_e=lh(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]":sh(g,c),tt=a?.media?.aspectRatio,We=a?.media?.fit;if(tt!==void 0&&(!Number.isFinite(tt)||tt<=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 V=="function"?V({row:e,mediaColumn:B,mediaValue:ye,isImageMedia:xe,isAudioMedia:te,iconVisual:ne,IconComponent:fe,previewClassName:Fe}):null,oe={row:e,contentColumns:se,detailColumns:Y,titleColumn:Ie,summaryColumn:A,getDisplayText:M,getFieldValue:D},Se=W?.(oe)??null,Ve=F?.({...oe,iconVisual:ne})??null,Ye=!Ve&&ne?jsx("div",{className:l("flex h-9 w-9 items-center justify-center rounded-lg border",ne.chipClassName||"border-primary/20 bg-primary/10 text-primary"),children:Ir(ne.Icon||ne.icon,l("h-4 w-4",ne.iconClassName||"text-primary"))}):null,ot=Ve||Ye,gt=L?"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",Bt=L?"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=L?"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",$t=L?"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",zt=G?.fieldCount?.(se.length),pe=G?.coverOnlyHint,Ge=Le==null&&xe&&B?_(ye,e.id,B.label):void 0,Q=Le??jsxs(Fragment,{children:[xe&&B?jsx("div",{style:tt===void 0?void 0:{position:"relative",aspectRatio:tt},className:l("overflow-hidden bg-card/50",le?"rounded-[inherit] bg-transparent":ae?"rounded-[inherit]":"mb-3 rounded-lg border border-border/70"),children:jsx("img",{src:Ge,style:{...pa(Ge),...tt===void 0?{}:{position:"absolute",inset:0,width:"100%",height:"100%"},...We===void 0&&tt===void 0?{}:{objectFit:We??"cover"}},alt:typeof ye?.alt=="string"?ye.alt:typeof ye=="string"?ye:String(B.label||""),className:Fe,loading:"lazy",referrerPolicy:"no-referrer",onError:ge=>{ge.currentTarget.onerror=null,ge.currentTarget.src=_("",e.id,B.label);}})}):null,!xe&&ne&&ae?jsx("div",{className:l("flex items-center justify-center","rounded-[inherit] border py-10",ne.chipClassName||"border-primary/20 bg-primary/5"),children:Ir(ne.Icon||ne.icon,l("h-10 w-10",ne.iconClassName||"text-primary"))}):null,te&&N?jsx("div",{className:l(!ae&&"mb-3"),children:jsx(N,{filename:String(ye)})}):null]}),ue=a?Zc:null,Pe=a?.title?.fieldId?t.find(ge=>ge.key===a.title?.fieldId):Ie,he=i?i(e):Pe?M(D(Pe,e)):ze,ke=!!a?.slots?.length,Ee=ke||n==="container"?"div":"button";return 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":uh(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",L&&"shadow-none"),!ae&&!le&&Be,!ae&&!le&&(m?L?"border-primary/35 bg-background/85 ring-1 ring-primary/20":"border-primary/40 bg-primary/10 ring-1 ring-primary/30":L?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&&m&&"ring-1 ring-primary/30",le&&(m?"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",R),children:[L?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",m?"opacity-100":"group-hover:opacity-100")}):null,jsxs("div",{className:l("relative z-[1]",(le||ae)&&"rounded-[inherit]"),children:[ue&&a?jsx(ue,{presentation:a,title:he,renderSlot:ge=>s?.(ge,oe),children:Q}):Q,!ae&&!le?jsxs(Fragment,{children:[jsxs("div",{className:"flex items-start gap-3",children:[ot?jsx("div",{className:"shrink-0",children:ot}):null,jsxs("div",{className:"flex min-w-0 flex-1 items-start justify-between gap-3",children:[jsxs("div",{className:"min-w-0 flex-1",children:[!a?.title&&jsx("div",{className:l("flex items-center gap-2 text-sm font-semibold",L?"text-muted-foreground transition-colors duration-300 group-hover:text-foreground":"text-foreground"),children:jsx("span",{className:"truncate",children:n==="container"&&o?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?jsx("div",{className:l("mt-1 text-[11px] leading-5 text-muted-foreground",Ce?"line-clamp-4":"line-clamp-2",L&&"transition-colors duration-300 group-hover:text-foreground"),children:X}):null]}),Se??(z(zt)?jsx("span",{className:gt,children:zt}):null)]})]}),we.length>0?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=>jsxs("div",{className:Ze?"flex min-w-0 items-start gap-2 text-xs":Bt,children:[ge.label?jsx("div",{className:Ze?"shrink-0 text-muted-foreground":Ue,children:q(ge.label,{column:ge})}):null,jsx("div",{className:Ze?"min-w-0 text-foreground":l($t,!ge.label&&"mt-0"),children:re(ge,e,{compact:g!=="detailed",surface:"gallery"})})]},`${e.id||e.linkKey}-${ge.key}`))}):null,!Ie&&!X&&we.length===0&&z(pe)?jsx("div",{className:l("mt-3 text-[11px] text-muted-foreground",L&&"transition-colors duration-300 group-hover:text-foreground"),children:pe}):null]}):null]})]})}r(js,"WorkbenchGalleryCard");function nu(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(nu,"resolveGalleryScrollDirection");function gh(e,t,o,n,a){let s=Array.from({length:t},()=>0),i=0,m=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&&(i+=m+n,m=0),m=Math.max(m,d),{index:g,left:g%t*(o+n),top:i,width:o,height:d};let u=s.indexOf(Math.min(...s)),p=s[u];return s[u]=p+d+n,{index:g,left:u*(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(gh,"placeWindowedItems");function bh(e,t,o,n,a){let s=t-a,i=t+o+a;return e.filter(m=>{let c=n?m.left:m.top;return c<=i&&c+(n?m.width:m.height)>=s})}r(bh,"visibleWindow");function au({items:e,getKey:t,layout:o,cardWidth:n,estimateHeight:a,getScrollOwner:s,railRef:i,tailRef:m,containerProps:c,getItemProps:d,renderItem:g}){let u=o.mode==="rail",p=u?1:o.columnCount,f=Math.max(1,u?n??280:o.columnWidth),b=useRef(null),h=useRef(new Map),y=useRef(),[v,k]=useState({width:f,heights:{}}),[x,w]=useState({start:0,length:u?1280:720}),[C,S]=useState(),[T,E]=useState(),N=e.map(t),O=JSON.stringify(N),V=N.map((D,M)=>v.heights[D]??Math.max(1,a(e[M],f))),W=useMemo(()=>gh(V,p,f,o.gap,u?"rail":o.mode==="grid"?"grid":"masonry"),[JSON.stringify(V),p,f,o.gap,u,o.mode]),F=useCallback(()=>{let D=b.current,M=s();if(!D||!M)return;let $=D.getBoundingClientRect(),J=M.getBoundingClientRect(),_=M.offsetHeight>0?J.height/M.offsetHeight:1,ee=u?M.scrollLeft:(J.top-$.top)/(_||1)+M.clientTop,K=u?M.clientWidth:M.clientHeight;K<=0||w(Z=>Z.start===ee&&Z.length===K?Z:{start:ee,length:K});},[s,u]);useLayoutEffect(()=>{F();},[F,W.height,W.width]),useEffect(()=>{let D=s();if(!D)return;let M=0,$=r(()=>{M||(M=requestAnimationFrame(()=>{M=0,F();}));},"update");D.addEventListener("scroll",$,{passive:true}),window.addEventListener("resize",$);let J=typeof ResizeObserver=="function"?new ResizeObserver($):void 0;return J?.observe(D),b.current&&J?.observe(b.current),()=>{D.removeEventListener("scroll",$),window.removeEventListener("resize",$),J?.disconnect(),cancelAnimationFrame(M);}},[s,F]),useEffect(()=>{if(typeof ResizeObserver!="function")return;let D=new ResizeObserver(M=>{k($=>{let J={...$.heights},_=$.width!==f;for(let ee of M){let K=ee.target.dataset.windowKey,Z=ee.borderBoxSize?.[0]?.blockSize??ee.target.offsetHeight;K!==void 0&&Z>0&&J[K]!==Z&&(J[K]=Z,_=true);}return _?{width:f,heights:J}:$});});return y.current=D,h.current.forEach(M=>D.observe(M)),()=>{D.disconnect(),y.current=void 0;}},[f]),useEffect(()=>{let D=new Set(N);k(M=>({width:M.width,heights:Object.fromEntries(Object.entries(M.heights).filter(([$])=>D.has($)))}));},[O]);let H=r((D,M)=>{let $=h.current.get(D);if($&&y.current?.unobserve($),!M){h.current.delete(D);return}M.dataset.windowKey=D,h.current.set(D,M),y.current?.observe(M);},"register"),I=x.length,G=bh(W.placements,x.start,x.length,u,I),q=new Set(G.map(D=>D.index));for(let D of [C,T]){let M=D===void 0?-1:N.indexOf(D);M>=0&&q.add(M);}useLayoutEffect(()=>{if(!T)return;let D=h.current.get(T)?.parentElement;D&&(D.focus(),D.scrollIntoView({block:"nearest",inline:"nearest"}),E(void 0));},[T]);let R={...o,columnWidth:f,itemWidth:f};return jsxs("div",{...c,ref:D=>{b.current=D,i&&(i.current=D);},"data-collection-windowed":"","data-collection-total":e.length,style:{...c.style,position:"relative",...u?{overflowX:"auto",overflowY:"hidden"}:{height:W.height},overflowAnchor:"none"},children:[u?jsx("div",{"aria-hidden":"true",style:{width:W.width,height:W.height,pointerEvents:"none"}}):null,Array.from(q).sort((D,M)=>D-M).map(D=>{let M=e[D],$=N[D],J=W.placements[D],_=d(M,R);return jsx("div",{..._,"aria-posinset":D+1,"aria-setsize":e.length,onFocus:ee=>{S($),_.onFocus?.(ee);},onBlur:ee=>{ee.currentTarget.contains(ee.relatedTarget)||S(void 0),_.onBlur?.(ee);},onKeyDown:ee=>{if(ee.target===ee.currentTarget){let K=u?1:p,Z=ee.key==="Home"?0:ee.key==="End"?e.length-1:ee.key==="ArrowRight"?D+1:ee.key==="ArrowLeft"?D-1:ee.key==="ArrowDown"?D+K:ee.key==="ArrowUp"?D-K:void 0;if(Z!==void 0){ee.preventDefault(),E(N[Math.min(e.length-1,Math.max(0,Z))]);return}}_.onKeyDown?.(ee);},style:{..._.style,position:"absolute",left:J.left,top:J.top,width:J.width},children:jsx("div",{ref:ee=>H($,ee),children:g(M,R)})},$)}),m?jsx("div",{ref:m,"aria-hidden":"true",style:{position:"absolute",left:Math.max(0,W.width-1),top:0,width:1,height:1}}):null]})}r(au,"WorkbenchWindowedLayout");var hh=12,xh=8,lu=280,cu=240,vh=typeof window>"u"?useEffect:useLayoutEffect;function ri(e,t,o){return Math.min(Math.max(e,t),o)}r(ri,"clamp");function kh(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(kh,"getRootFontSize");function ai(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*kh(o)}return t}r(ai,"resolveLengthToPixels");function du(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(du,"areMeasurementMapsEqual");function wh({containerWidth:e,itemCount:t,targetColumnWidth:o,gap:n}){if(!e)return 1;let a=Math.max(t,1),s=Math.max(1,Math.min(a,Math.ceil((e+n)/(Math.max(o*.58,1)+n)))),i=1,m=Number.POSITIVE_INFINITY;for(let c=1;c<=s;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),u=Math.max(0,d-o*1.35),p=Math.abs(d-o)+g*3+u*2;p<m&&(m=p,i=c);}return i}r(wh,"getMasonryColumnCount");function Ch({size:e,columnWidth:t,columnCount:o,gap:n}){if(Number.isFinite(e?.columnSpan)&&Number(e?.columnSpan)>0)return ri(Math.round(Number(e?.columnSpan)),1,o);let a=ai(e?.width,t,null);return ri(Math.ceil((a+n)/(t+n)),1,o)}r(Ch,"getItemColumnSpan");function Sh({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):ai(e?.height,cu,null);return Math.max(1,Math.ceil((a+n)/(o+n)))}r(Sh,"getItemRowSpan");function Th({size:e,measuredHeight:t}){return Number.isFinite(t)&&Number(t)>0?Number(t):ai(e?.height,cu,null)}r(Th,"getResolvedItemHeight");function Or({items:e=[],renderItem:t,getItemKey:o=r((p,f)=>p?.id??p?.key??f,"getItemKey"),getItemSize:n,columnWidth:a=lu,columnCount:s,gap:i=hh,rowHeight:m=xh,placementStrategy:c="shelf",containerProps:d,getItemProps:g,className:u}){let p=useRef(null),f=useRef(new Map),b=useRef(null),[h,y]=useState(0),[v,k]=useState({}),x=useMemo(()=>e.map((W,F)=>String(o(W,F))),[o,e]),w=x.join("|");useEffect(()=>{let W=p.current;if(!W)return;let F=r(()=>{let H=Math.round(W.getBoundingClientRect().width);y(I=>I===H?I:H);},"updateWidth");if(F(),typeof ResizeObserver=="function"){let H=new ResizeObserver(()=>F());return H.observe(W),()=>H.disconnect()}return window.addEventListener("resize",F),()=>window.removeEventListener("resize",F)},[]),useEffect(()=>{k(W=>{let F=new Set(x),H=Object.fromEntries(Object.entries(W).filter(([I])=>F.has(I)));return du(W,H)?W:H});},[x,w]);let C=ai(a,lu,p.current),S=c==="dense",E=(Number.isFinite(s)&&Number(s)>0?ri(Math.round(Number(s)),1,24):void 0)||wh({containerWidth:h,itemCount:e.length,targetColumnWidth:C,gap:i}),N=h>0?(h-i*Math.max(E-1,0))/E:C,O=useMemo(()=>e.map((W,F)=>{let H=x[F],I=typeof n=="function"?n(W,{columnCount:E,columnWidth:N,containerWidth:h,gap:i,placementStrategy:c,rowHeight:m})||{}:{};return {key:H,item:W,size:I,columnSpan:Ch({size:I,columnWidth:N,columnCount:E,gap:i}),rowSpan:Sh({size:I,measuredHeight:v[H],rowHeight:m,gap:i})}}),[E,h,i,n,x,e,v,c,N,m]);vh(()=>{let W={};f.current.forEach((F,H)=>{let I=Math.ceil(F.getBoundingClientRect().height);Number.isFinite(I)&&I>0&&(W[H]=I);}),k(F=>{if(!Object.keys(W).length)return F;let H={...F,...W};return du(F,H)?F:H});},[E,S,w,N]),useEffect(()=>{if(typeof ResizeObserver!="function")return;let W=new ResizeObserver(F=>{k(H=>{let I={...H},G=false;for(let q of F){let R=q.target.dataset.masonryKey;if(!R)continue;let D=Math.ceil(q.contentRect.height);!Number.isFinite(D)||D<=0||I[R]===D||(I[R]=D,G=true);}return G?I:H});});return b.current=W,f.current.forEach(F=>W.observe(F)),()=>{W.disconnect(),b.current=null;}},[S,w]);let V=r((W,F)=>{let H=f.current,I=H.get(W);if(I&&I!==F&&b.current&&b.current.unobserve(I),!F){H.delete(W);return}F.dataset.masonryKey=W,H.set(W,F),b.current&&b.current.observe(F);},"registerItemNode");if(!S){let W=(()=>{let F=Array.from({length:E},()=>0),H=0,I=0,G=O.map(({key:q,item:R,columnSpan:D,rowSpan:M,size:$})=>{let J=ri(D,1,E),_=H;if(c==="shortest"){let le=Number.POSITIVE_INFINITY;for(let L=0;L<=E-J;L+=1){let me=Math.max(...F.slice(L,L+J));me<le&&(le=me,_=L);}}else _+J>E&&(_=0),_=Math.min(_,E-J);let ee=N*J+i*Math.max(J-1,0),K=Th({size:$,measuredHeight:v[q]}),Z=Math.max(...F.slice(_,_+J)),re=_*(N+i),ae=Z+K;for(let le=_;le<_+J;le+=1)F[le]=ae+i;return I=Math.max(I,ae),c!=="shortest"&&(H=_+J,H>=E&&(H=0)),{key:q,item:R,columnSpan:J,itemHeight:K,itemWidth:ee,left:re,rowSpan:M,size:$,top:Z}});return {containerHeight:Math.max(0,I),positionedItems:G}})();return jsx("div",{ref:p,...d,className:l("relative w-full",u,d?.className),style:{...d?.style,height:`${W.containerHeight}px`},children:W.positionedItems.map(({key:F,item:H,columnSpan:I,rowSpan:G,size:q,itemWidth:R,left:D,top:M})=>{let $=h<=0&&E===1,J=$?"100%":`${R}px`,_={columnCount:E,columnSpan:I,columnWidth:N,containerWidth:h,gap:i,itemWidth:R,placementStrategy:c,rowSpan:G,rowHeight:m,size:q},ee=g?.(H,_);return jsx("div",{...ee,className:l("absolute min-w-0",ee?.className),style:{...ee?.style,left:$?0:`${D}px`,top:`${M}px`,width:J,maxWidth:J},children:jsx("div",{ref:K=>V(F,K),role:"presentation",className:"min-w-0",children:t(H,_)})},F)})})}return jsx("div",{ref:p,...d,className:l("grid w-full items-start",u,d?.className),style:{...d?.style,gap:`${i}px`,gridAutoFlow:"row dense",gridAutoRows:`${m}px`,gridTemplateColumns:`repeat(${E}, minmax(0, 1fr))`},children:O.map(({key:W,item:F,columnSpan:H,rowSpan:I,size:G})=>{let q={columnCount:E,columnSpan:H,columnWidth:N,containerWidth:h,gap:i,placementStrategy:c,rowSpan:I,rowHeight:m,size:G},R=g?.(F,q);return jsx("div",{...R,className:l("min-w-0",R?.className),style:{...R?.style,gridColumn:`span ${H}`,gridRow:`span ${I}`},children:jsx("div",{ref:D=>V(W,D),role:"presentation",className:"min-w-0",children:t(F,q)})},W)})})}r(Or,"WorkbenchMasonryLayout");var Nh=12,Ih=[1],Mh=[4/3],Bh=[1,4/5,3/2,3/4,5/4],Ph=.5,Eh=2,Dh="hsl(var(--monkeys-color-muted, var(--muted)))";function ii(e,t,o){return Math.min(Math.max(e,t),o)}r(ii,"clamp");function qs(e,t,o){return typeof e!="number"||!Number.isFinite(e)||e<=0?t:ii(Math.round(e),1,o)}r(qs,"normalizeCount");function Wh(e){return e==="masonry"||e==="dense"?Bh:e==="rail"?Mh:Ih}r(Wh,"getDefaultAspectRatios");function Lh(e,t){let o=t?.filter(n=>typeof n=="number"&&Number.isFinite(n)&&n>0).map(n=>ii(n,Ph,Eh));return o?.length?o:Wh(e)}r(Lh,"resolveAspectRatios");function mu(e){return qs(e?.count,Nh,48)}r(mu,"resolveWorkbenchCollectionSkeletonCapacity");function pu(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(pu,"resolveWorkbenchCollectionLoadingVariant");function Ah({columnCount:e,config:t,phase:o}){if(o==="initial"){let a=ii(e*2,6,24);return qs(t?.count,a,48)}let n=ii(e,1,12);return qs(t?.loadMoreCount,n,24)}r(Ah,"resolveSkeletonCount");function uu(e,t){return Math.max(1,e/t)}r(uu,"getSkeletonHeight");function Ys({mode:e,phase:t,columnCount:o,columnWidth:n,cardWidth:a,gap:s,rowHeight:i,config:m,ariaLabel:c,className:d}){let g=Ah({columnCount:o,config:m,phase:t}),u=Lh(e,m?.aspectRatios),p=m?.animated??true,f=useMemo(()=>Array.from({length:g},(h,y)=>({aspectRatio:u[y%u.length],key:`${t}-${y}`,index:y})),[u,g,t]),b=r((h,y)=>jsx(Tn,{index:h.index,children:jsx(Dt,{variant:"block",animated:p,className:"h-auto w-full rounded-lg",style:{backgroundColor:Dh,...y??{aspectRatio:String(h.aspectRatio)}},"data-collection-skeleton-item":"","data-skeleton-aspect-ratio":h.aspectRatio})}),"renderSkeleton");return jsx(Ho,{animation:m?.animation,animated:p,children: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"?jsx(Or,{items:f,columnCount:o,columnWidth:n,gap:s,rowHeight:i,placementStrategy:e==="dense"?"dense":"shortest",className:d,containerProps:{"aria-hidden":true},getItemKey:h=>h.key,getItemSize:(h,y)=>({height:uu(y.columnWidth,h.aspectRatio)}),renderItem:(h,y)=>b(h,{height:`${uu(y.columnWidth,h.aspectRatio)}px`})}):e==="rail"?jsx("div",{"aria-hidden":"true",className:l("grid min-w-0 grid-flow-col items-start overflow-x-auto",d),style:{gap:s,gridAutoColumns:typeof a=="number"?`${a}px`:a??`${n}px`},children:f.map(h=>jsx("div",{children:b(h)},h.key))}):jsx("div",{"aria-hidden":"true",className:l("grid min-w-0 items-start",d),style:{gap:s,gridTemplateColumns:`repeat(${o}, minmax(0, 1fr))`},children:f.map(h=>jsx("div",{children:b(h)},h.key))})})})}r(Ys,"WorkbenchCollectionSkeleton");function Oh(e,t){if(e.size!==t.size)return false;for(let o of e)if(!t.has(o))return false;return true}r(Oh,"setsEqual");function Fh(e){return String(e)}r(Fh,"getComparableKey");function Hh(e){return e==="multiple"?"toggle":"replace"}r(Hh,"getDefaultBehavior");function Qs({items:e,getItemKey:t,mode:o="none",behavior:n,selectedKeys:a,defaultSelectedKeys:s,isItemDisabled:i,onSelectionChange:m}){let c=a!==void 0,[d,g]=useState(()=>new Set(s??[])),u=useRef(null),p=useRef(m);p.current=m;let f=useMemo(()=>{let w=new Map;return e.map((C,S)=>{let T=t(C,S),E=Fh(T),N=w.get(E);if(N!==void 0)throw new TypeError(`useWorkbenchCollectionSelection received duplicate item key "${E}" at indices ${N} and ${S}.`);return w.set(E,S),{item:C,index:S,key:T}})},[t,e]),b=useMemo(()=>{let w=new Map;return f.forEach(C=>w.set(C.key,C)),w},[f]),h=useMemo(()=>o==="none"?new Set:c?new Set(a??[]):d,[c,a,d,o]),y=useRef(h);y.current=h;let v=useCallback(()=>{u.current=null;},[]);useEffect(()=>{if(c)return;let w=new Set(f.map(({key:C})=>C));g(C=>{let S=new Set(Array.from(C).filter(T=>w.has(T)));return Oh(C,S)?C:(y.current=S,S)});},[c,f]),useEffect(()=>{let w=u.current;if(o!=="multiple"||h.size===0||w===null){v();return}let C=b.get(w);(!C||i?.(C.item,C.index))&&v();},[i,b,o,v,h.size]);let k=useCallback((w,C={})=>{if(o==="none")return;let S=b.get(w);if(!S||i?.(S.item,S.index))return;let T=new Set(y.current),E=n??Hh(o),N=C.shiftKey&&o==="multiple"?"range":C.behavior??E;o==="single"&&(N=N==="toggle"?"toggle":"replace");let O=u.current===null?void 0:b.get(u.current),V=!!(O&&!i?.(O.item,O.index));o==="multiple"&&N==="range"&&!V&&(N=E==="range"?"toggle":E);let W=new Set;if(o==="single")N==="toggle"&&T.has(S.key)||W.add(S.key);else if(N==="range"&&O){T.forEach(I=>W.add(I));let F=Math.min(O.index,S.index),H=Math.max(O.index,S.index);f.slice(F,H+1).forEach(I=>{i?.(I.item,I.index)||W.add(I.key);});}else N==="replace"?W.add(S.key):(T.forEach(F=>W.add(F)),W.has(S.key)?W.delete(S.key):W.add(S.key));u.current=o==="multiple"?S.key:null,c||(y.current=W,g(W)),p.current?.(W,{item:S.item,index:S.index,key:S.key,behavior:N});},[n,c,i,b,o,f]),x=useCallback(w=>h.has(w),[h]);return {mode:o,selectedKeys:h,isSelected:x,selectKey:k,resetAnchor:v}}r(Qs,"useWorkbenchCollectionSelection");var ol=12,_h=8,li=280,jh=640,$h=1024,hu=24;function di(e,t,o){return Math.min(Math.max(e,t),o)}r(di,"clamp");function oo(e,t){return typeof e=="function"?e(t):e}r(oo,"resolveRenderableSlot");function On(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),s=typeof window>"u"?16:Number.parseFloat(window.getComputedStyle(o||document.documentElement).fontSize)||16;return Number.isFinite(a)&&a>0?a*s:t}return t}r(On,"resolveLengthToPixels");function si(e){if(!(typeof e!="number"||!Number.isFinite(e)||e<=0))return di(Math.round(e),1,hu)}r(si,"normalizeColumns");function bu(e,t){if(e==="auto"||e===void 0)return;if(typeof e=="number")return si(e);let o=si(e.mobile),n=si(e.tablet),a=si(e.desktop);return t>=$h?a??n??o:t>=jh?n??o??a:o??n??a}r(bu,"resolveResponsiveColumns");function Kh({containerWidth:e,itemCount:t,gap:o,columns:n,underfilledBehavior:a,maxColumns:s,minCardWidth:i,idealCardWidth:m,maxCardWidth:c,node:d}){let g=bu(n,e),u=bu(s,e);if(g)return u?Math.min(g,u):g;if(!e)return 1;let p=On(m,li,d),f=On(i,p*.78,d),b=Math.max(f,On(c,p*1.35,d)),h=Math.max(t,1),y=Math.max(1,Math.min(a==="preserve-columns"?hu:h,Math.ceil((e+o)/(Math.max(f*.75,1)+o)))),v=1,k=Number.POSITIVE_INFINITY;for(let x=1;x<=y;x+=1){let w=(e-o*Math.max(x-1,0))/x;if(!Number.isFinite(w)||w<=0)continue;let C=Math.abs(w-p)+Math.max(0,f-w)*3+Math.max(0,w-b)*2;C<k&&(k=C,v=x);}return u?Math.min(v,u):v}r(Kh,"resolveColumnCount");function fu(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0?e:ol}r(fu,"normalizeGap");function Uh(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?e:_h}r(Uh,"normalizeRowHeight");function qh(e){return typeof e=="number"&&Number.isFinite(e)?di(e,0,1):0}r(qh,"normalizeThreshold");function Yh(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(Yh,"normalizeItemSize");function Jh(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(Jh,"getDefaultItemKey");function Xh(e){return `@inf-monkeys-tech/monkeys-design:workbench-collection:${e}`}r(Xh,"getScrollStorageKey");function Zh(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(Zh,"getParentScrollOwner");function yu(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(yu,"isInteractiveEventTarget");function Qh(e){if(!(!Number.isFinite(e)||Number(e)<=0))return di(Math.round(Number(e)),1,12)}r(Qh,"normalizeTitleMaxLines");function Xo({items:e,config:t,renderItem:o,slots:n,callbacks:a,className:s,classNames:i,style:m,ariaLabel:c}){let d=Ne(),g=vt().workbench.collection,u=Co(),p=nn(),f=useId().replace(/:/g,""),b=useRef(null),h=useRef(null),y=useRef(null),v=useRef(null),k=useRef(false),x=useRef(false),w=useRef(false),C=useRef(false),S=useRef(null),T=useRef(null),E=useRef(void 0),N=useRef(false),[O,V]=useState(0),[W,F]=useState(ol),[H,I]=useState(null),G=useRef(a);G.current=a;let q=useCallback(Q=>{y.current=Q,I(Q);},[]),R=t.layout.mode;if(R!=="grid"&&R!=="masonry"&&R!=="dense"&&R!=="rail")throw new TypeError(`WorkbenchCollection layout.mode "${String(R)}" is not supported.`);let D=t.layout.gap===void 0?W:fu(t.layout.gap),M=Uh(t.layout.rowHeight),$=t.getItemKey??Jh,J=useMemo(()=>e.map((Q,ue)=>{let Pe=$(Q,ue);return {item:Q,index:ue,key:Pe,stringKey:String(Pe)}}),[$,e]),_=J.map(({stringKey:Q})=>Q).join(""),ee=t.state,K=ee?.loading===true,Z=ee?.loadingMore===true,re=ee?.hasMore===true,ae=pu(t.loading?.variant),le=K&&J.length===0&&ae==="skeleton"?mu(t.loading?.skeleton):J.length,L=t.selection?.mode??"none",me=useCallback(Q=>t.selection?.isItemDisabled?.(Q.item,Q.index)??false,[t.selection?.isItemDisabled]),B=useCallback(Q=>Q.key,[]),j=useCallback((Q,ue)=>{G.current?.onSelectionChange?.(Q,{item:ue.item.item,key:ue.key,behavior:ue.behavior});},[]),{selectedKeys:ne,selectKey:fe}=Qs({items:J,getItemKey:B,mode:L,behavior:t.selection?.behavior,selectedKeys:t.selection?.selectedKeys,defaultSelectedKeys:t.selection?.defaultSelectedKeys,isItemDisabled:me,onSelectionChange:j});useEffect(()=>{let Q=H;if(!Q)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:ol);}let Pe=Q.clientWidth;V(he=>he===Pe?he:Pe);},"updateWidth");if(ue(),typeof ResizeObserver=="function"){let Pe=new ResizeObserver(ue);return Pe.observe(Q),()=>Pe.disconnect()}if(!(typeof window>"u"))return window.addEventListener("resize",ue),()=>window.removeEventListener("resize",ue)},[H,t.layout.gap,m?.gap,p]);let ye=Kh({containerWidth:O,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=O>0?Math.max(0,(O-D*Math.max(ye-1,0))/ye):On(t.layout.cardWidth??t.layout.columnWidth??t.layout.idealCardWidth,li,y.current),te=t.layout.placementStrategy??(R==="dense"?"dense":R==="masonry"?"shortest":"shelf"),se=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=useMemo(()=>{let Q=t.virtualization;return Q?.enabled!==true||Q.fallback!=="error"?null:Q.adapter?Q.adapter.supports?.(R)===false?new Error(`WorkbenchCollection virtualization adapter does not support mode "${R}".`):null:new Error("WorkbenchCollection virtualization requires an adapter.")},[t.virtualization,R]),Ie=useMemo(()=>({mode:R,columnCount:ye,columnWidth:xe,containerWidth:O,gap:D,itemCount:J.length}),[ye,xe,O,D,R,J.length]);useEffect(()=>{G.current?.onLayoutChange?.(Ie),O>0&&!N.current&&(N.current=true,G.current?.onLayoutReady?.(Ie));},[Ie,O]),useEffect(()=>{N.current=false;},[R]);let ze=useCallback(()=>{let Q=t.layout.scrollOwner;return Q&&Q!=="self"&&Q!=="parent"?Q:R==="rail"?h.current:Q==="parent"?Zh(b.current):b.current},[t.layout.scrollOwner,R]);useEffect(()=>{let Q=t.scrollRestorationKey?.trim();if(!Q||typeof window>"u")return;let ue=ze();if(!ue)return;let Pe=Xh(Q);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=ee?.error??Re;useEffect(()=>{(!ce||!re)&&(x.current=false,w.current=false,C.current=false);},[ce,re]);let A=useCallback(()=>{if(!ce||!re||Z||k.current)return;k.current=true;let Q=r(()=>{k.current=false;},"releaseRequest");try{let ue=G.current?.onLoadMore?.();ue&&typeof ue.then=="function"?ue.then(Q,Q):Q();}catch(ue){throw Q(),ue}},[ce,re,Z]);useEffect(()=>{let Q=v.current;if((S.current!==Q||T.current!==_||E.current!==t.loading?.pageKey)&&(S.current=Q,T.current=_,E.current=t.loading?.pageKey,x.current=false,w.current=false,C.current=false),!Q||!ce||!re||typeof IntersectionObserver!="function")return;let ue=ze(),Pe=false,he=true,ke=new IntersectionObserver(He=>{if(!he)return;let ft=He.some(Xn=>Xn.isIntersecting);if(!(ft&&(Z||k.current))){if(C.current){if(Pe=true,C.current=false,x.current=ft,!ft){w.current=false;return}if(w.current)return;w.current=true,A();return}if(!Pe){Pe=true,x.current=ft,ft||(w.current=false),ft&&t.loading?.autoFill&&!w.current&&(w.current=true,A());return}if(!ft){x.current=false,w.current=false;return}x.current||(x.current=true,w.current=true,A());}},{root:ue===b.current?ue:ue||null,rootMargin:t.loading?.rootMargin??"240px",threshold:qh(t.loading?.threshold)}),Ee=ue??(typeof window>"u"?null:window),ge=r(()=>{!x.current||w.current||C.current||(C.current=true,ke.unobserve(Q),ke.takeRecords(),ke.observe(Q));},"validateActiveIntersection");return ke.observe(Q),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,re,_,Z,J.length,A,ze]),useEffect(()=>{if(!t.loading?.autoFill||!ce||!re||Z||w.current||k.current||!v.current)return;let ue=ze()??(t.layout.scrollOwner==="parent"?b.current?.parentElement??null:null)??b.current;if(!ue)return;let Pe=R==="rail"?ue.clientWidth:ue.clientHeight,he=R==="rail"?ue.scrollWidth:ue.scrollHeight;Pe<=0||he<=Pe+1&&(w.current=true,A());},[ce,t.layout.scrollOwner,t.loading?.autoFill,t.loading?.pageKey,re,_,Z,J.length,A,ze,R]);let X=useMemo(()=>{if(!t.grouping)return [{key:"__all__",stringKey:"__all__",items:J}];let Q=new Map;return J.forEach(ue=>{let Pe=t.grouping?.getGroupKey(ue.item,ue.index)??"__all__",he=String(Pe),ke=Q.get(he);if(ke){ke.items.push(ue);return}Q.set(he,{key:Pe,stringKey:he,label:t.grouping?.getGroupLabel?.(Pe,ue.item),items:[ue]});}),Array.from(Q.values())},[t.grouping,J]),ie=useCallback((Q,ue)=>{let Pe=t.selection?.isItemDisabled?.(Q.item,Q.index)??false,he={item:Q.item,index:Q.index,key:Q.key,status:t.getItemStatus?.(Q.item,Q.index)??"idle",disabled:Pe,selected:ne.has(Q.key),selectionMode:L,layout:ue,select:r(ke=>fe(Q.key,{behavior:ke}),"select"),selectFromEvent:r((ke,Ee)=>fe(Q.key,{behavior:Ee,shiftKey:ke.shiftKey}),"selectFromEvent"),preview:r(()=>a?.onItemPreview?.(Q.item,he),"preview"),detail:r(()=>a?.onItemDetail?.(Q.item,he),"detail"),renderSlot:r(ke=>n?.item?.[ke]?.(Q.item,he),"renderSlot"),notifyMediaLoad:r(()=>a?.onMediaLoad?.(Q.item,he),"notifyMediaLoad"),notifyMediaError:r(ke=>a?.onMediaError?.(Q.item,he,ke),"notifyMediaError")};return he},[a,t.getItemStatus,t.selection,ne,fe,L,n?.item]),Y=useCallback((Q,ue)=>{let Pe=r(he=>{he.target!==he.currentTarget||he.key!=="Enter"&&he.key!==" "||(he.preventDefault(),L!=="none"?ue.selectFromEvent(he):a?.onItemClick?.(Q.item,ue,he));},"handleKeyboard");return {id:`${f}-item-${Q.index}`,"data-monkeys-collection-item":"","data-item-key":Q.stringKey,"data-selected":ue.selected||void 0,"data-disabled":ue.disabled||void 0,"data-status":ue.status,role:L==="none"?"listitem":"option","aria-selected":L==="none"?void 0:ue.selected,"aria-disabled":ue.disabled||void 0,tabIndex:a?.onItemClick||L!=="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",i?.item),onClick:r(he=>{yu(he.target,he.currentTarget)||(L!=="none"&&ue.selectFromEvent(he),a?.onItemClick?.(Q.item,ue,he));},"onClick"),onDoubleClick:r(he=>{yu(he.target,he.currentTarget)||a?.onItemDoubleClick?.(Q.item,ue,he);},"onDoubleClick"),onMouseEnter:r(he=>a?.onItemHoverChange?.(Q.item,ue,true,he),"onMouseEnter"),onMouseLeave:r(he=>a?.onItemHoverChange?.(Q.item,ue,false,he),"onMouseLeave"),onKeyDown:Pe,onDragStart:r(he=>a?.onItemDragStart?.(Q.item,ue,he),"onDragStart"),onDragOver:a?.onItemDrop?he=>he.preventDefault():void 0,onDrop:r(he=>a?.onItemDrop?.(Q.item,ue,he),"onDrop")}},[a,i?.item,f,t.appearance,t.item?.title?.visibility,L]),de=useCallback((Q,ue)=>{let Pe=o(Q.item,ue),he=t.item?.title,ke=he?.visibility??"always",Ee=he&&ke!=="never"?he.getContent?.(Q.item,ue)??ue.renderSlot("title"):null,ge=!!(he&&z(Ee)),He=he?.placement??"below",ft=ge&&He.startsWith("overlay-"),Xn=Qh(he?.maxLines),ea=he?.surface??(ft?"scrim":"none"),Dl=ge?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",ea==="surface"&&"bg-background/90 backdrop-blur-sm",ea==="scrim"&&He==="overlay-top"&&"bg-gradient-to-b from-background/90 to-transparent pb-8",ea==="scrim"&&He==="overlay-bottom"&&"bg-gradient-to-t from-background/90 to-transparent pt-8",ea==="scrim"&&He==="overlay-center"&&"bg-background/75 backdrop-blur-sm",!!Xn&&"overflow-hidden [display:-webkit-box] [-webkit-box-orient:vertical]",i?.itemTitle),style:Xn?{WebkitLineClamp:Xn}:void 0,children:Ee}):null,Yt=t.item?.actions,Di=Yt?.visibility??"always",Wl=Yt&&Di!=="never"?ue.renderSlot("actions"):null,Wi=!!(Yt&&z(Wl)),wn=Yt?.placement??"overlay-bottom",Li=Wi&&wn.startsWith("overlay-"),Ll=Wi?jsx("div",{"data-collection-item-actions":"","data-actions-placement":wn,"data-actions-align":Yt?.align??"center","data-actions-visibility":Di,className:l("flex min-w-0 items-center gap-2 px-2 py-2",Yt?.align==="start"&&"justify-start",(Yt?.align===void 0||Yt.align==="center")&&"justify-center",Yt?.align==="end"&&"justify-end",Yt?.wrap!==false&&"flex-wrap",Di==="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",Li&&"pointer-events-none absolute inset-x-0 z-20",wn==="overlay-top"&&"top-1",wn==="overlay-bottom"&&"bottom-1",i?.itemActions),children:jsx("div",{className:l("pointer-events-auto flex items-center gap-2",Yt?.wrap!==false&&"flex-wrap"),children:Wl})}):null;return !ge&&!Wi?Pe:jsxs("div",{className:l("min-w-0",(ft||Li)&&"relative",i?.itemContent),"data-collection-item-content":"",children:[He==="above"?Dl:null,wn==="above"?Ll:null,Pe,He==="below"||ft?Dl:null,wn==="below"||Li?Ll:null]})},[i?.itemActions,i?.itemContent,i?.itemTitle,t.item,o]),we=useCallback((Q,ue,Pe=true)=>{let he=ie(Q,ue),ke=de(Q,he);return Pe?jsx("div",{...Y(Q,he),children:ke}):ke},[ie,Y,de]),Ce=useMemo(()=>({mode:R,columnCount:ye,columnWidth:xe,containerWidth:O,gap:D,placementStrategy:te,rowHeight:M}),[ye,xe,O,D,R,te,M]),Me=r(Q=>{if(t.windowed&&R!=="dense"){let ke=Q===X[X.length-1];return jsx(au,{items:Q.items,getKey:Ee=>Ee.stringKey,layout:Ce,cardWidth:On(t.layout.cardWidth,li,b.current),getScrollOwner:ze,railRef:R==="rail"&&ke?h:void 0,tailRef:R==="rail"&&ke?v:void 0,estimateHeight:(Ee,ge)=>{let He=t.layout.getItemSize?.(Ee.item,{...Ce,columnWidth:ge}),ft=t.layout.getItemAspectRatio?.(Ee.item,Ee.index);return On(He?.height,ft&&ft>0?ge/ft:300,b.current)},containerProps:{role:L==="none"?"list":"listbox","aria-label":c??se.collection,"aria-multiselectable":L==="multiple"||void 0,className:i?.layout},getItemProps:(Ee,ge)=>Y(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?.(R)===false)&&ue?.fallback==="error")return null;if(he&&Pe&&Pe.supports?.(R)!==false)return Pe.render({items:Q.items.map(({item:ke})=>ke),keys:Q.items.map(({key:ke})=>ke),layout:t.layout,scrollOwner:ze(),renderItem:r((ke,Ee,ge)=>{let He=Q.items[Ee];return He?jsx(Fragment$1,{children:we(He,ge)},He.stringKey):null},"renderItem")});if(R==="masonry"||R==="dense")return jsx(Or,{items:Q.items,columnCount:ye,columnWidth:t.layout.cardWidth??t.layout.columnWidth??t.layout.idealCardWidth,gap:D,rowHeight:M,placementStrategy:R==="dense"?"dense":te,className:i?.layout,containerProps:{role:L==="none"?"list":"listbox","aria-label":c??se.collection,"aria-multiselectable":L==="multiple"||void 0},getItemProps:(ke,Ee)=>{let ge=ie(ke,{...Ee,mode:R});return Y(ke,ge)},getItemKey:ke=>ke.key,getItemSize:(ke,Ee)=>{let ge={...Ee,mode:R},He=t.layout.getItemSize?.(ke.item,ge),ft=t.layout.getItemAspectRatio?.(ke.item,ke.index);return Yh(He,ft,Ee.columnWidth)},renderItem:(ke,Ee)=>we(ke,{...Ee,mode:R},false)});if(R==="rail"){let ke=t.layout.cardWidth??t.layout.idealCardWidth??li,Ee=Q===X[X.length-1];return jsx("div",{ref:Ee?h:void 0,role:L==="none"?"list":"listbox","aria-label":c??se.collection,"aria-multiselectable":L==="multiple"||void 0,className:l("grid min-w-0 grid-flow-col items-start overflow-x-auto",i?.layout),style:{gap:D,gridAutoColumns:typeof ke=="number"?`${ke}px`:ke},children:Q.items.map((ge,He)=>jsx("div",{ref:Ee&&He===Q.items.length-1?v:void 0,className:"min-w-0",children:we(ge,Ce)},ge.stringKey))})}return jsx("div",{role:L==="none"?"list":"listbox","aria-label":c??se.collection,"aria-multiselectable":L==="multiple"||void 0,className:l("grid min-w-0 items-start",i?.layout),style:{gap:D,gridTemplateColumns:`repeat(${ye}, minmax(0, 1fr))`},children:Q.items.map(ke=>{let Ee=t.layout.getItemSize?.(ke.item,Ce),ge=di(Math.round(Number(Ee?.columnSpan)||1),1,ye),He=t.layout.getItemAspectRatio?.(ke.item,ke.index);return jsx("div",{...Y(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:K,loadingMore:Z,selectedKeys:ne,retry:r(()=>a?.onRetry?.(),"retry")},_e=oo(n?.header,Be),Ze=oo(n?.toolbar,Be),Fe=ne.size>0?oo(n?.selectionToolbar,Be):null,tt=oo(n?.beforeItems,Be),We=oo(n?.footer,Be),Le=ee?.permission===true,oe=ee?.offline===true&&!Le,Se=K&&e.length===0&&!Le&&!oe,Ve=!!U&&e.length===0&&!Le&&!oe&&!Se,Ye=!Le&&!oe&&!Se&&!Ve&&(ee?.empty===true||e.length===0),ot=oo(n?.loading,Be),gt=oo(n?.error,Be),Bt=oo(n?.permission,Be),Ue=oo(n?.offline,Be),$t=oo(n?.empty,Be),zt=oo(n?.loadMore,Be),pe=t.layout.scrollOwner==="self"||t.layout.scrollOwner===void 0&&(t.layout.fillHeight||t.layout.maxHeight),Ge={...m,gap:t.layout.gap===void 0?m?.gap??"var(--monkeys-bento-gap, var(--global-spacing, 0.75rem))":fu(t.layout.gap),padding:t.layout.padding??m?.padding,height:t.layout.fillHeight?"100%":m?.height,maxHeight:t.layout.maxHeight??m?.maxHeight,overflow:pe?"auto":m?.overflow};return jsxs("section",{ref:b,...d,"data-monkeys-component":"workbench-collection","data-layout-mode":R,"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":K||Z||void 0,className:l("min-h-0 min-w-0",t.layout.fillHeight&&"h-full",i?.root,s),style:Ge,children:[z(_e)?jsx("div",{className:i?.header,children:_e}):null,z(Ze)?jsx("div",{className:i?.toolbar,children:Ze}):null,z(Fe)?jsx("div",{className:i?.selectionToolbar,children:Fe}):null,z(tt)?jsx("div",{className:i?.beforeItems,children:tt}):null,Le?z(Bt)?Bt:jsx(br,{kind:"permission",title:se.permission,actions:u.permission?.showRequestAccess!==false&&a?.onRequestAccess?jsx(ve,{size:"sm",label:se.requestAccess,onClick:a.onRequestAccess}):void 0}):oe?z(Ue)?Ue:jsx(br,{kind:"offline",title:se.offline,actions:u.error?.showRetry!==false&&a?.onRetry?jsx(ve,{size:"sm",label:se.retry,onClick:a.onRetry}):void 0}):Se?z(ot)?ot:ae==="spinner"?jsx(jo,{title:se.loading,variant:"spinner"}):jsx("div",{ref:q,className:l("min-w-0",i?.items),children:jsx(Ys,{mode:R,phase:"initial",columnCount:ye,columnWidth:xe,cardWidth:t.layout.cardWidth??t.layout.idealCardWidth,gap:D,rowHeight:M,config:t.loading?.skeleton,ariaLabel:se.loading,className:i?.layout})}):Ve?z(gt)?gt:jsx(br,{kind:"error",title:se.loadError,actions:u.error?.showRetry!==false&&a?.onRetry?jsx(ve,{size:"sm",label:se.retry,onClick:a.onRetry}):void 0}):Ye?z($t)?$t:jsx(va,{title:se.empty}):jsx("div",{ref:q,className:l("min-w-0",i?.items),children:X.map((Q,ue)=>{let Pe={key:Q.key,label:Q.label,items:Q.items.map(({item:Ee})=>Ee),groupIndex:ue},he=t.grouping?n?.groupHeading?.(Pe,Be)??Q.label:null,ke=`${f}-group-${ue}`;return jsxs("div",{"data-collection-group":Q.stringKey,className:i?.group,children:[z(he)?jsx("div",{id:ke,role:"heading","aria-level":2,className:i?.groupHeading,children:he}):null,Me(Q)]},Q.stringKey)})}),e.length>0&&U?jsx("div",{className:i?.status,children:z(gt)?gt:jsx(br,{kind:"error",title:se.refreshError,actions:u.error?.showRetry!==false&&a?.onRetry?jsx(ve,{size:"sm",label:se.retry,onClick:a.onRetry}):void 0})}):null,e.length>0&&(re||Z)?jsx("div",{ref:R==="rail"?void 0:v,className:i?.loadMore,"data-collection-load-more":"",children:z(zt)?zt:Z?ae==="spinner"?jsx(jo,{title:se.loadingMore,variant:"spinner"}):jsx(Ys,{mode:R,phase:"load-more",columnCount:ye,columnWidth:xe,cardWidth:t.layout.cardWidth??t.layout.idealCardWidth,gap:D,rowHeight:M,config:t.loading?.skeleton,ariaLabel:se.loadingMore,className:i?.layout}):null}):null,z(We)?jsx("div",{className:i?.footer,children:We}):null]})}r(Xo,"WorkbenchCollection");function ox(e){if(typeof e=="number"&&Number.isFinite(e)&&e>0)return `${e}px`;if(typeof e=="string"&&e.trim())return e.trim()}r(ox,"getNormalizedGalleryGridCardWidth");function nx(e){return e==="compact"?2:e==="detailed"?6:4}r(nx,"getDefaultGalleryDetailLimit");function rx(e,t){return e===1||e===2||e===3?Number(e):t==="detailed"?1:2}r(rx,"getNormalizedGalleryBentoColumns");function ax({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:nx(e)}r(ax,"getNormalizedGalleryDetailLimit");function xu(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(xu,"getGalleryCardWidthMetrics");function ix(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(ix,"getNormalizedGalleryGridColumns");function vu(e){if(e==null)return 0;let t=String(e).trim();return t&&t!=="\u2014"?t.length:0}r(vu,"getGalleryTextLength");function Fr({column:e,row:t,getFieldValue:o,getDisplayText:n}){if(!e)return "";let a=o(e,t);if(a==null||a==="")return "";let s=n(a);return s==="\u2014"?"":String(s)}r(Fr,"getGalleryFieldText");function nl({text:e,charsPerLine:t,maxLines:o}){let n=vu(e);return n?Math.max(1,Math.min(o,Math.ceil(n/t))):0}r(nl,"estimateLineCount");function sx({text:e,density:t,bentoColumns:o}){let n=t==="detailed"?54:t==="compact"?44:48,i=nl({text:e,charsPerLine:o===1?t==="detailed"?32:26:t==="detailed"?18:15,maxLines:t==="detailed"?3:2});return i?n+Math.max(0,i-1)*16:n}r(sx,"estimateGalleryDetailCellHeight");function lx({columns:e,density:t,bentoColumns:o}){if(!e.length)return 0;let n=e.map(s=>sx({text:s.text,density:t,bentoColumns:o}));if(o===1)return 12+n.reduce((s,i)=>s+i,0)+Math.max(0,e.length-1)*8;let a=12;for(let s=0;s<n.length;s+=o){let i=n.slice(s,s+o);a+=Math.max(...i),s+o<n.length&&(a+=8);}return a}r(lx,"estimateGalleryDetailGridHeight");function dx({row:e,columns:t,galleryFieldKey:o,galleryDensity:n,galleryBentoColumns:a,galleryDetailVisibility:s,galleryDetailLimit:i,getFieldValue:m,isMediaColumn:c,isTitleCandidate:d,isSummaryCandidate:g,getDisplayText:u,isImageField:p,isAudioField:f,cardVariant:b,renderPreview:h,renderLeadingVisual:y,hiddenDetailFieldKeys:v,layout:k,resolveRecordVisual:x}){let w=t.find(L=>L.renderType==="icon"),C=w&&x?x(e?.[w.key],e,w):null,T=(o!=="auto"?t.find(L=>L.key===o&&c(L,e)):null)||t.find(L=>c(L,e))||null,E=T?m(T,e):null,N=T?p(T,E):false,O=T?f(T,E):false,W=!!y||!!C,F=t.filter(L=>L.key!==T?.key&&L.renderType!=="icon"),I=F.filter(L=>{if(!L||c(L,e)||!d(L,e))return false;let me=m(L,e);return !(me==null||me==="")})[0]||null,G=I?Fr({column:I,row:e,getFieldValue:m,getDisplayText:u}):String(u(e?.linkKey||e?.id||"")),q=F.find(L=>!L||L.key===I?.key||c(L,e)||!g(L,e)?false:Fr({column:L,row:e,getFieldValue:m,getDisplayText:u}).length>12)||F.find(L=>!L||L.key===I?.key||c(L,e)||!g(L,e)?false:vu(Fr({column:L,row:e,getFieldValue:m,getDisplayText:u}))>0)||null,R=q?Fr({column:q,row:e,getFieldValue:m,getDisplayText:u}):"",D=new Set(v),M=F.filter(L=>L.key!==I?.key&&L.key!==q?.key&&!D.has(L.key)).map(L=>({column:L,text:Fr({column:L,row:e,getFieldValue:m,getDisplayText:u})})),$=ax({density:n,visibility:s,limit:i}),J=Number.isFinite($)?M.slice(0,$):M,_=Math.max(M.length-J.length,0),ee=rx(a,n),K=k?.columnWidth||xu(n).ideal;if(b==="image-only")return {width:K,height:Math.round(K*1.25)};if(b==="preview-only")return {width:K,height:Math.round(K*.82)};let Z=n==="detailed"?84:n==="compact"?64:72;typeof h=="function"?Z+=n==="detailed"?188:n==="compact"?140:164:N?Z+=Math.round(K*(n==="detailed"?.72:.62))+12:O&&(Z+=92);let re=nl({text:G,charsPerLine:n==="detailed"?26:24,maxLines:2})||1,ae=nl({text:R,charsPerLine:W?22:n==="detailed"?30:26,maxLines:n==="detailed"?4:2}),le=26+re*18+(ae>0?ae*16+4:0);return Z+=Math.max(W?56:0,le),Z+=lx({columns:J,density:n,bentoColumns:ee}),_>0&&(Z+=18),!R&&J.length===0&&(Z+=24),{width:K,height:Z}}r(dx,"getDefaultGalleryMasonryItemSize");function cx({rows:e=[],children:t,columns:o=[],onRowClick:n,cardInteraction:a="button",selectedLinkKey:s,selectedRowKey:i,selectedRowKeys:m,className:c,isMasonry:d=false,galleryLayoutMode:g="auto",galleryRailCardWidth:u,galleryGap:p,galleryScrollDirection:f,galleryGridColumns:b,galleryGridColumnsResponsive:h,galleryCardWidthMetrics:y,galleryCardAspectRatio:v,galleryCardMinHeight:k,galleryGridCardWidth:x,galleryUnderfilledBehavior:w,galleryMasonryColumnWidth:C,masonryPlacementStrategy:S,pagination:T,onLoadMore:E,scrollOwner:N,windowed:O,galleryFieldKey:V="auto",galleryDensity:W="comfortable",galleryBentoColumns:F=2,galleryDetailVisibility:H="limit",galleryDetailLimit:I,shouldEnhanceMultimodal:G=true,getFieldValue:q,isMediaColumn:R,isTitleCandidate:D,isSummaryCandidate:M,getDisplayText:$,renderFieldValue:J,getImagePreviewSrc:_,isImageField:ee,isAudioField:K,AudioPlayerComponent:Z,cardVariant:re="default",cardPresentation:ae,renderCardSlot:le,renderCoverTitle:L,galleryDetailPresentation:me,renderPreview:B,renderMeta:j,renderLeadingVisual:ne,resolveRecordVisual:fe,hiddenDetailFieldKeys:ye=[],labels:xe,formatLabel:te,getMasonryItemSize:se}){let{min:Re,ideal:Ie,max:ze}=y??xu(W),ce=u||Re,U=ix(b),A=ox(x),X=C||Re,ie=g==="rail",Y=q||Ln,de=$||Lr,we=ee||Ar,Ce=K||zr,Me=R||((We,Le)=>Za(We,Le,{getFieldValue:Y,shouldEnhanceMultimodal:G,isImageField:we,isAudioField:Ce})),Be=D||((We,Le)=>Qa(We,Le,{isMediaColumn:Me})),_e=M||((We,Le)=>ei(We,Le,{isMediaColumn:Me})),Ze=J||((We,Le,{compact:oe}={})=>jsx("span",{children:de(Y(We,Le))})),Fe=r((We,Le)=>jsx(js,{row:We,columns:o,cardInteraction:a,onClick:n?()=>n(We,Le):void 0,isSelected:m?m.has(String(We?.linkKey||We?.id||"")):String(We?.linkKey||We?.id||"")===String(i||s||""),isMasonry:d,galleryFieldKey:V,galleryDensity:W,galleryBentoColumns:F,galleryDetailVisibility:H,galleryDetailLimit:I,galleryDetailPresentation:me,shouldEnhanceMultimodal:G,getFieldValue:Y,isMediaColumn:Me,isTitleCandidate:Be,isSummaryCandidate:_e,getDisplayText:de,renderFieldValue:Ze,getImagePreviewSrc:_,isImageField:we,isAudioField:Ce,AudioPlayerComponent:Z,cardVariant:re,cardPresentation:ae,renderCardSlot:le,renderCoverTitle:L,renderPreview:B,renderMeta:j,renderLeadingVisual:ne,resolveRecordVisual:fe,hiddenDetailFieldKeys:ye,labels:xe,formatLabel:te},We?.id||We?.linkKey||Le),"renderGalleryCard"),tt=d?S==="dense"?"dense":"masonry":ie?"rail":"grid";if(nu(tt,f),t!==void 0){let We=Children.toArray(t);return jsx(Xo,{items:We,callbacks:{onLoadMore:E},slots:{loadMore:T?.loadingMore?jsx(jo,{variant:"spinner",className:"py-global",style:{minHeight:0}}):void 0},classNames:{layout:c},config:{windowed:O,state:T,loading:{autoFill:true},getItemKey:r((Le,oe)=>isValidElement(Le)&&Le.key!=null?Le.key:oe,"getItemKey"),layout:{mode:tt,scrollOwner:N??"parent",gap:p,columns:h??(U?{mobile:1,tablet:Math.min(2,U),desktop:U}:"auto"),underfilledBehavior:w,cardWidth:ie?ce:void 0,minCardWidth:A??Re,idealCardWidth:A??Ie,maxCardWidth:A??ze}},renderItem:Le=>Le})}return jsx(Xo,{items:e,slots:{loadMore:T?.loadingMore?jsx(jo,{variant:"spinner",className:"py-global",style:{minHeight:0}}):void 0},callbacks:{onLoadMore:E,onItemClick:a==="container"&&n?(We,Le)=>n(We,Le.index):void 0},classNames:{layout:c},config:{windowed:O,state:T,loading:{autoFill:true},getItemKey:r((We,Le)=>We?.id||We?.linkKey||Le,"getItemKey"),layout:{mode:tt,underfilledBehavior:w,scrollOwner:N,gap:p,columns:h??(U?{mobile:1,tablet:Math.min(2,U),desktop:U}:"auto"),cardWidth:ie?ce:void 0,minCardWidth:A??Re,idealCardWidth:d?X:A??Ie,maxCardWidth:A??ze,placementStrategy:S??(re==="image-only"?"shortest":"shelf"),getItemAspectRatio:re==="image-only"?We=>{let Le=o.find(ot=>ot.key===V)??o.find(ot=>Me(ot,We)),oe=Le?Y(Le,We):void 0,Se=oe&&typeof oe=="object"&&"aspectRatio"in oe?oe.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:re==="image-only"&&v&&v>0?(We,Le)=>({height:Math.max(k??0,Le.columnWidth/v)}):d?(We,Le)=>{let oe=dx({row:We,columns:o,galleryFieldKey:V,galleryDensity:W,galleryBentoColumns:F,galleryDetailVisibility:H,galleryDetailLimit:I,getFieldValue:Y,isMediaColumn:Me,isTitleCandidate:Be,isSummaryCandidate:_e,getDisplayText:de,isImageField:we,isAudioField:Ce,cardVariant:re,renderPreview:B,renderLeadingVisual:ne,hiddenDetailFieldKeys:ye,layout:Le,resolveRecordVisual:fe});if(typeof se!="function")return oe;let Se=se(We,{...Le,placementStrategy:Le.placementStrategy==="dense"?"dense":"shelf",defaultSize:oe})||{};return {...oe,...Se}}:void 0}},renderItem:(We,Le)=>Fe(We,Le.index)})}r(cx,"WorkbenchGalleryView");function ux({layout:e="horizontal",mediaPosition:t="start",detailsSize:o="balanced",sizing:n="content",asidePosition:a="end",detailsVisible:s=true,heading:i,metadata:m,message:c,actions:d,media:g,toolbar:u,aside:p,secondary:f,children:b,className:h,...y}){let v=s&&(z(i)||z(m)||z(b)||z(c)||z(d)),k=e==="horizontal"&&z(g)&&v,x=n==="fill",w=z(f),C=k&&w,S=z(p)?jsx("div",{"data-record-part":"aside",className:"flex min-h-0 shrink-0 gap-global",children:p}):null;return 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",x&&"h-full",h),children:[z(u)&&jsx("div",{"data-record-part":"toolbar",className:"flex shrink-0 flex-wrap items-center gap-global",children:u}),jsxs("div",{className:l("flex min-h-0 min-w-0 gap-global",x&&"flex-1"),children:[a==="start"&&S,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)]":k&&(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)]"),x&&"overflow-auto @[48rem]:overflow-hidden"),children:[z(g)&&jsx("div",{"data-record-part":"media",className:l("min-h-0 min-w-0",t==="end"&&k&&"@[48rem]:order-2",x&&"flex flex-col"),children:g}),v&&jsxs("div",{"data-record-part":"details",className:l("flex min-h-0 min-w-0 flex-col [&>section]:flex-1",x&&"@[48rem]:overflow-auto"),children:[z(i)&&jsx("div",{className:"mb-global flex flex-wrap items-center gap-global",children:i}),z(m)&&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:m}),b,z(c)&&jsx("div",{className:"mt-global break-words text-sm text-destructive-text",children:c}),z(d)&&jsx("div",{className:"mt-auto flex shrink-0 flex-wrap gap-global pt-global",children:d})]}),w&&jsx("div",{"data-record-part":"secondary",className:l("flex min-h-0 min-w-0 flex-col [&>section]:flex-1",x&&"@[48rem]:overflow-auto"),children:f})]}),a==="end"&&S]})]})}r(ux,"RecordView");var mx=[{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 ku(e,t,o){return typeof e!="number"||!Number.isFinite(e)||e<0?t:Math.min(Math.round(e),o)}r(ku,"normalizeCount");function px(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?1:Math.min(Math.max(e,.5),2)}r(px,"normalizeAspectRatio");function gx({animated:e,filterCount:t}){return jsxs("div",{className:"flex min-h-10 flex-wrap items-center justify-between gap-4",children:[jsxs("div",{className:"space-y-2",children:[jsx(Dt,{variant:"line",animated:e,className:"h-6 w-36 rounded-md"}),jsx(Dt,{variant:"line",animated:e,className:"h-3 w-12"})]}),jsx("div",{className:"flex flex-wrap justify-end gap-2",children:Array.from({length:t},(o,n)=>jsx(Dt,{variant:"block",animated:e,className:"h-9 w-28 rounded-lg"},n))})]})}r(gx,"WorkbenchGallerySkeletonHeading");function bx({sections:e=mx,animated:t=true,animation:o,className:n,...a}){return jsx(Ho,{animation:o,animated:t,children: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((s,i)=>{let m=s.layout??"grid",c=ku(s.filterCount,2,8),d=ku(s.cardCount,m==="rail"?4:5,24),g=s.aspectRatios?.length?s.aspectRatios:[m==="rail"?16/11:1];return jsx(Tn,{index:i,children:jsxs("section",{className:"grid gap-4","data-skeleton-section":s.id,children:[jsx(gx,{animated:t,filterCount:c}),jsx("div",{className:l("grid items-start gap-4",m==="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":m,children:Array.from({length:d},(u,p)=>jsx("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:jsx(Dt,{variant:"block",animated:t,className:"h-auto w-full rounded-none",style:{aspectRatio:String(px(g[p%g.length]))}})},p))})]})},s.id||i)})})})}r(bx,"WorkbenchGallerySkeleton");function fx({animated:e=true,animation:t,className:o,"aria-label":n,...a}){let s=vt().loading.spinner,i=r(m=>jsx(Dt,{variant:"block",animated:e,className:m}),"skeleton");return jsx(Ho,{animation:t,animated:e,children:jsxs("div",{...a,role:"status","aria-busy":"true","aria-label":n??s,"data-monkeys-component":"workbench-page-skeleton",className:l("flex size-full min-h-0 flex-col gap-4 overflow-hidden",o),children:[jsxs("div",{className:"flex h-10 shrink-0 items-center justify-between gap-4 rounded-lg border border-border bg-card px-4",children:[jsxs("div",{className:"flex items-center gap-2",children:[i("h-5 w-20"),i("h-5 w-16"),i("h-5 w-24")]}),jsxs("div",{className:"flex items-center gap-2",children:[i("h-7 w-20"),i("size-7")]})]}),jsxs("div",{className:"grid shrink-0 grid-cols-1 gap-4 md:grid-cols-3",children:[i("h-40 md:col-span-2"),i("h-40")]}),jsxs("div",{className:"grid min-h-0 flex-1 grid-cols-1 gap-4 lg:grid-cols-[minmax(0,2fr)_minmax(14rem,1fr)]",children:[jsxs("div",{className:"flex min-h-0 flex-col gap-4 rounded-lg border border-border bg-card p-4",children:[i("h-6 w-40"),jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:6},(m,c)=>jsx(Tn,{index:c,children:jsxs("div",{className:"space-y-2",children:[i("h-4 w-20"),i("h-9 w-full")]})},c))}),i("min-h-32 flex-1")]}),jsxs("div",{className:"flex min-h-40 flex-col gap-4 rounded-lg border border-border bg-card p-4",children:[i("h-6 w-28"),i("min-h-28 flex-1"),i("h-9 w-full")]})]})]})})}r(fx,"WorkbenchPageSkeleton");function wu(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r(wu,"toCssSize");function Tx(e,t){return String(e?.id??e?.key??t)}r(Tx,"defaultGetRowId");function Rx(e){return String(e?.columnId??e?.status??"")}r(Rx,"defaultGetColumnId");function Nx(e){let t=e?.title??e?.name??e?.id??"Untitled";return 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(Nx,"defaultRenderCard");function Ix({row:e,rowId:t,rowIndex:o,column:n,classNames:a,renderCard:s}){let{attributes:i,listeners:m,setNodeRef:c,isDragging:d}=useDraggable({id:t});return jsx("div",{ref:c,...m,...i,className:l("touch-none",a?.cardWrapper),children:s(e,{row:e,rowIndex:o,column:n,isDragging:d,isOverlay:false})})}r(Ix,"WorkbenchLaneDraggableCard");function Mx({column:e,columnRows:t,columnWidth:o,columnMinHeight:n,emptyColumn:a,classNames:s,renderCard:i}){let{setNodeRef:m,isOver:c}=useDroppable({id:e.id});return jsxs("section",{className:l("flex shrink-0 flex-col rounded-xl border border-border/60 bg-card p-2 shadow-sm",s?.column,e.className),style:{width:wu(o)??"280px"},children:[jsxs("div",{className:l("flex h-10 items-center gap-2 px-1",s?.columnHeader,e.headerClassName),children:[e.icon?jsx("span",{className:l("inline-flex h-4 w-4 items-center justify-center text-muted-foreground",s?.columnIcon,e.iconClassName),children:e.icon}):null,jsx("span",{className:l("inline-flex items-center rounded px-2 py-0.5 text-xs font-semibold bg-muted text-muted-foreground",s?.columnBadge,e.badgeClassName),children:e.label??e.id}),jsx("span",{className:l("text-xs text-muted-foreground",s?.columnCount),children:t.length})]}),jsx("div",{ref:m,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",s?.columnBody,e.bodyClassName),style:{minHeight:wu(n)},children:t.length?t.map(({row:d,rowIndex:g,rowId:u})=>jsx(Ix,{row:d,rowId:u,rowIndex:g,column:e,classNames:s,renderCard:i},u)):a?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",s?.emptyColumn),children:a}):null})]})}r(Mx,"WorkbenchLaneColumnView");function Bx({rows:e=[],columns:t=[],getRowId:o=Tx,getColumnId:n=Rx,renderCard:a,renderOverlayCard:s,onMoveRow:i,onSelectRow:m,emptyColumn:c,activationDistance:d=5,columnWidth:g=280,columnMinHeight:u,className:p,classNames:f,style:b}){let h=a??((V,W)=>m?jsx(ve,{className:"w-full justify-start whitespace-normal text-left",onClick:()=>m({rowId:o(V,W.rowIndex)}),children:String(V?.title??V?.name??o(V,W.rowIndex))}):Nx(V)),[y,v]=useState(null),k=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:d}})),x=useMemo(()=>new Map(t.map(V=>[V.id,V])),[t]),w=useMemo(()=>e.map((V,W)=>({row:V,rowIndex:W,rowId:o(V,W),columnId:n(V,W)})),[n,o,e]),C=y?w.find(V=>V.rowId===y):void 0,S=useMemo(()=>{let V=new Map;return t.forEach(W=>V.set(W.id,[])),w.forEach(({row:W,rowIndex:F,rowId:H,columnId:I})=>{V.get(I)?.push({row:W,rowIndex:F,rowId:H});}),V},[t,w]),T=C?x.get(C.columnId):void 0,E=useCallback(V=>{v(String(V.active.id));},[]),N=useCallback(V=>{v(null);let W=String(V.active.id),F=String(V.over?.id??""),H=w.find(I=>I.rowId===W);!H||!x.has(F)||H.columnId===F||i?.(W,F,H.row);},[x,i,w]),O=useCallback(()=>{v(null);},[]);return jsxs(DndContext,{sensors:k,onDragStart:E,onDragEnd:N,onDragCancel:O,children:[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(V=>jsx(Mx,{column:V,columnRows:S.get(V.id)||[],columnWidth:g,columnMinHeight:u,emptyColumn:c,classNames:f,renderCard:h},V.id))}),jsx(DragOverlay,{children:C&&T?jsx("div",{className:l(f?.overlayWrapper),children:(s||h)(C.row,{row:C.row,rowIndex:C.rowIndex,column:T,isDragging:false,isOverlay:true})}):null})]})}r(Bx,"WorkbenchLaneView");var Cu=r(e=>{if(Number.isFinite(e))return Math.min(1,Math.max(0,Number(e)))},"normalizeProgress");function Px({items:e,summary:t,variant:o="bars",density:n="comfortable",emptyState:a=null,ariaLabel:s="Metrics",className:i,itemClassName:m}){if(!e.length)return z(a)?jsx(Fragment,{children:a}):null;if(o==="radar"&&e.length>=3&&e.length<=12){let c=r((u,p)=>{let f=-Math.PI/2+u*Math.PI*2/e.length;return [180+Math.cos(f)*p,160+Math.sin(f)*p]},"point"),d=e.map((u,p)=>{let f=Cu(u.progress);return f===void 0?void 0:c(p,f*100)}),g=d.every(Boolean);return jsxs("figure",{"aria-label":s,"data-monkeys-component":"workbench-metric-grid","data-metric-variant":"radar",className:l("m-0 min-w-0",i),children:[jsxs("svg",{viewBox:"0 0 360 320",role:"img","aria-label":t?`${s} \xB7 ${t.label} ${t.value}`:s,className:"mx-auto block w-full max-w-sm overflow-visible",children:[[.25,.5,.75,1].map(u=>jsx("polygon",{points:e.map((p,f)=>c(f,u*100).join(",")).join(" "),fill:"none",stroke:"hsl(var(--border))"},u)),e.map((u,p)=>{let f=c(p,100),b=c(p,131);return jsxs("g",{children:[jsx("line",{x1:"180",y1:"160",x2:f[0],y2:f[1],stroke:"hsl(var(--border))"}),typeof u.label=="string"||typeof u.label=="number"?jsx("text",{x:b[0],y:b[1]-7,textAnchor:"middle",dominantBaseline:"middle",fontSize:"12",fill:"hsl(var(--muted-foreground))",children:u.label}):null,typeof u.value=="string"||typeof u.value=="number"?jsx("text",{"data-metric-axis-value":u.id,x:b[0],y:b[1]+10,textAnchor:"middle",dominantBaseline:"middle",fontSize:"13",fontWeight:"600",fill:"hsl(var(--foreground))",children:u.value}):null]},u.id)}),g?jsx("polygon",{"data-metric-radar-series":"complete",points:d.map(u=>u.join(",")).join(" "),fill:"hsl(var(--primary) / .18)",stroke:"hsl(var(--primary))",strokeWidth:"2.5"}):d.map((u,p)=>{let f=d[(p+1)%d.length];return u&&f?jsx("line",{"data-metric-radar-series":"partial",x1:u[0],y1:u[1],x2:f[0],y2:f[1],stroke:"hsl(var(--primary))",strokeWidth:"2.5"},e[p].id):null}),d.map((u,p)=>u?jsx("circle",{cx:u[0],cy:u[1],r:"3",fill:"hsl(var(--primary))"},e[p].id):null),t?jsxs("g",{"data-metric-radar-summary":"true",textAnchor:"middle",paintOrder:"stroke",stroke:"hsl(var(--card))",strokeWidth:"3",strokeLinejoin:"round",children:[jsx("text",{x:"180",y:"149",fontSize:"12",fill:"hsl(var(--muted-foreground))",children:t.label}),jsx("text",{x:"180",y:"174",fontSize:"23",fontWeight:"700",fill:"hsl(var(--foreground))",children:t.value})]}):null]}),jsx("dl",{className:"sr-only",children:e.map(u=>jsxs("div",{className:l("flex min-w-0 justify-between gap-2",m),children:[jsx("dt",{className:"truncate text-muted-foreground",children:u.label}),jsx("dd",{className:"font-semibold tabular-nums",children:u.value})]},u.id))})]})}return o==="list"?jsx("dl",{"aria-label":s,"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",i),children:e.map(c=>jsxs("div",{className:l("flex min-w-0 items-start justify-between gap-4",n==="compact"?"text-xs":"text-sm",m),children:[jsxs("dt",{className:"min-w-0 text-muted-foreground",children:[jsx("span",{className:"block truncate",children:c.label}),z(c.description)?jsx("span",{className:"mt-0.5 block text-xs leading-4 text-muted-foreground/80",children:c.description}):null]}),jsx("dd",{className:"shrink-0 font-semibold tabular-nums text-foreground",children:c.value})]},c.id))}):o==="cards"?jsx("dl",{"aria-label":s,"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",i),children:e.map(c=>jsxs("div",{className:l("min-w-0 rounded-lg border border-border/70 bg-card text-card-foreground",n==="compact"?"p-3":"p-4",m),children:[jsx("dt",{className:"truncate text-xs font-medium text-muted-foreground",children:c.label}),jsx("dd",{className:l("font-semibold tabular-nums text-foreground",n==="compact"?"mt-1.5 text-xl":"mt-2 text-2xl"),children:c.value}),z(c.description)?jsx("div",{className:"mt-2 text-xs leading-5 text-muted-foreground",children:c.description}):null]},c.id))}):jsx("dl",{"aria-label":s,"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",i),children:e.map(c=>{let d=Cu(c.progress);return jsxs("div",{className:l("min-w-0",m),children:[jsx("div",{role:d===void 0?void 0:"meter","aria-label":d===void 0?void 0:String(c.label),"aria-valuemin":d===void 0?void 0:0,"aria-valuemax":d===void 0?void 0:100,"aria-valuenow":d===void 0?void 0:Math.round(d*100),className:l("overflow-hidden rounded-full bg-muted",n==="compact"?"h-1.5":"h-2"),children:d===void 0?null:jsx("span",{className:"block h-full rounded-full bg-primary transition-[width] duration-200 motion-reduce:transition-none",style:{width:`${Math.max(d>0?4:0,d*100)}%`}})}),jsxs("div",{className:"mt-1.5 flex min-w-0 items-baseline justify-between gap-2",children:[jsx("dt",{className:"truncate text-xs text-muted-foreground",children:c.label}),jsx("dd",{className:"shrink-0 text-xs font-semibold tabular-nums text-foreground",children:c.value})]})]},c.id)})})}r(Px,"WorkbenchMetricGrid");var Su=Math.PI*(3-Math.sqrt(5)),Tu=r(e=>Array.from(e).reduce((t,o)=>Math.imul(t^o.charCodeAt(0),16777619)>>>0,2166136261),"hash");function mi(e,t){let o=new Set(e.map(x=>x.id)),n=new Map,a=new Set,s=new Map(e.map(x=>[x.id,new Set])),i=t.filter(x=>o.has(x.sourceId)&&o.has(x.targetId));for(let x of i){let w=n.get(x.sourceId)??[];w.includes(x.targetId)||w.push(x.targetId),n.set(x.sourceId,w),a.add(x.targetId),s.get(x.sourceId).add(x.targetId),s.get(x.targetId).add(x.sourceId);}let c=e.filter(x=>!a.has(x.id))[0]?.id??e[0]?.id,d=new Map,g=c?[c]:[];c&&d.set(c,{depth:0,branch:c,cluster:c});for(let x=0;x<g.length;x++){let w=g[x],C=d.get(w);for(let S of n.get(w)??[])d.has(S)||(d.set(S,{depth:C.depth+1,branch:C.depth===0?S:C.branch,cluster:C.depth<2?S:C.cluster}),g.push(S));}for(let x of e)d.has(x.id)||d.set(x.id,{depth:1,branch:x.id,cluster:x.id});let u=[...new Set([...d.values()].filter(x=>x.depth>0).map(x=>x.branch))],p=new Map;for(let[x,w]of d){if(w.depth<2)continue;let C=p.get(w.cluster)??[];C.push(x),p.set(w.cluster,C);}let f=u.map(x=>Math.sqrt([...d.values()].filter(w=>w.branch===x).length+8)),b=f.reduce((x,w)=>x+w,0)||1,h=-Math.PI/2,y=new Map;u.forEach((x,w)=>{let C=Math.PI*2*f[w]/b,S=h+C/2;y.set(x,{x:Math.cos(S)*12,y:Math.sin(S)*10,z:Math.sin(S*2)*3.2,angle:S}),h+=C;});let v=new Map;for(let x of u){let w=y.get(x),C=[...p.keys()].filter(S=>d.get(S)?.branch===x);C.forEach((S,T)=>{let E=C.length>1?Math.max(3,Math.sqrt(C.length)*1.7):1.5,N=T*Su+w.angle;v.set(S,{x:w.x+Math.cos(N)*E,y:w.y+Math.sin(N)*E,z:w.z+Math.sin(N)*2.5});});}let k=e.map(x=>{let w=d.get(x.id),C=w.depth<2?y.get(w.branch):v.get(w.cluster);if(w.depth===0||!C)return {...x,...w,x:0,y:0,z:0};if(w.depth===1)return {...x,...w,x:C.x*.76,y:C.y*.76,z:C.z};let T=p.get(w.cluster).indexOf(x.id),E=w.depth===2?0:1.5+Math.sqrt(T)*.72,N=T*Su+Tu(w.cluster)%360*Math.PI/180;return {...x,...w,x:C.x+Math.cos(N)*E,y:C.y+Math.sin(N)*E*.85,z:C.z+Math.sin(N*1.37)*Math.min(E,3.5)}});for(let x=0;x<30;x++)for(let w=0;w<k.length;w++)for(let C=w+1;C<k.length;C++){let S=k[w],T=k[C],E=T.x-S.x,N=T.y-S.y,O=Math.hypot(E,N),V=S.depth<3||T.depth<3?1.4:.85;if(O>=V)continue;let W=Tu(S.id+T.id)%360*Math.PI/180,F=O>.001?E/O:Math.cos(W),H=O>.001?N/O:Math.sin(W),I=(V-O)*.25;S.depth>0&&(S.x-=F*I,S.y-=H*I),T.depth>0&&(T.x+=F*I,T.y+=H*I);}if(k.length)for(let x of ["x","y","z"]){let w=(Math.min(...k.map(C=>C[x]))+Math.max(...k.map(C=>C[x])))/2;k.forEach(C=>{C[x]-=w;});}return {points:k,links:i,neighbors:s,root:c}}r(mi,"buildRelationshipGalaxyLayout");function Nu({nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,ariaLabel:a,className:s}){let i=vt(),m=useRef(null),c=useRef(new Map),d=useRef(o),g=useRef(n),[u,p]=useState(false),f=JSON.stringify([e,t]),b=useMemo(()=>mi(e,t),[f]);return d.current=o,g.current=n,useEffect(()=>{let h=m.current;if(!h)return;let y=false,v=r(()=>{},"cleanup");return p(false),Promise.all([import('three'),import('three/examples/jsm/controls/OrbitControls.js')]).then(([k,{OrbitControls:x}])=>{if(y)return;let w=[],C=new k.Scene,S=getComputedStyle(h),T=r((te,se)=>{let Re=document.createElement("span");Re.style.color=`hsl(${S.getPropertyValue(te).trim()||S.getPropertyValue(se).trim()})`,h.append(Re);let Ie=new k.Color(getComputedStyle(Re).color);return Re.remove(),Ie},"tokenColor"),E=T("--radar-canvas","--background");C.background=E;let N=new k.PerspectiveCamera(48,1,.1,250),O=new k.WebGLRenderer({antialias:true,alpha:false});O.setPixelRatio(Math.min(devicePixelRatio,2)),O.domElement.style.cssText="position:absolute;inset:0;width:100%;height:100%;touch-action:none",O.domElement.setAttribute("aria-hidden","true"),h.prepend(O.domElement);let V=new x(N,O.domElement);V.enableDamping=true,V.dampingFactor=.08,V.rotateSpeed=.45,V.minDistance=8,V.maxDistance=130,V.autoRotate=false;let W=new Map(b.points.map(te=>[te.id,new k.Vector3(te.x,te.y,te.z)])),F={primary:T("--radar-series-one","--primary"),secondary:T("--radar-series-two","--success"),accent:T("--radar-series-three","--warning"),muted:T("--radar-series-four","--muted-foreground")},H=128,I=new Uint8Array(H*H*4);for(let te=0;te<H;te++)for(let se=0;se<H;se++){let Re=Math.hypot(se+.5-H/2,te+.5-H/2)/(H/2),Ie=Re<.09?1:Math.exp(-Re*7.5)*.85;I.set([255,255,255,Math.round(Ie*255)],(te*H+se)*4);}let G=new k.DataTexture(I,H,H,k.RGBAFormat);G.minFilter=G.magFilter=k.LinearFilter,G.needsUpdate=true,w.push(G);let q=b.points.map(te=>{let se=new k.SpriteMaterial({map:G,color:F[te.tone??"primary"],transparent:true,blending:k.AdditiveBlending,depthWrite:false}),Re=new k.Sprite(se);return Re.position.copy(W.get(te.id)),C.add(Re),w.push(se),Re}),R=new k.BufferGeometry;R.setAttribute("position",new k.Float32BufferAttribute(b.links.flatMap(te=>[...W.get(te.sourceId).toArray(),...W.get(te.targetId).toArray()]),3));let D=new Float32Array(b.links.length*6);R.setAttribute("color",new k.BufferAttribute(D,3));let M=new k.LineBasicMaterial({vertexColors:true,transparent:true,opacity:.5,depthWrite:false});C.add(new k.LineSegments(R,M)),w.push(R,M);let $=new Map;b.points.filter(te=>te.depth>0).forEach(te=>{let se=$.get(te.cluster)??[];se.push(te),$.set(te.cluster,se);});for(let te of $.values()){if(te.length<3)continue;let se=te.reduce((ze,ce)=>ze.add(W.get(ce.id)),new k.Vector3).multiplyScalar(1/te.length),Re=new k.SpriteMaterial({map:G,color:F[te[0].tone??"primary"],transparent:true,opacity:.13,blending:k.AdditiveBlending,depthWrite:false}),Ie=new k.Sprite(Re);Ie.position.copy(se),Ie.position.z-=1,Ie.scale.setScalar(8+Math.sqrt(te.length)*1.2),C.add(Ie),w.push(Re);}let J=Math.max(8,...b.points.map(te=>Math.abs(te.x)))+3,_=Math.max(6,...b.points.map(te=>Math.abs(te.y)))+3,ee=55,K=false,Z=new ResizeObserver(()=>{let{width:te,height:se}=h.getBoundingClientRect();if(!te||!se)return;N.aspect=te/se;let Re=Math.max(_,J/N.aspect)/Math.tan(k.MathUtils.degToRad(N.fov/2))+7;K?N.position.sub(V.target).multiplyScalar(Re/ee).add(V.target):(N.position.set(0,0,Re),K=true),ee=Re,V.update(),N.updateProjectionMatrix(),O.setSize(te,se,false);});Z.observe(h);let re=new k.Vector3,ae=new k.Vector2,le={x:0,y:0},L,me,B=r(te=>{let se=O.domElement.getBoundingClientRect();ae.set(te.clientX-se.left,te.clientY-se.top);let Re,Ie=12;for(let ze of b.points){if(re.copy(W.get(ze.id)).project(N),re.z<-1||re.z>1)continue;let ce=Math.hypot((re.x+1)*se.width/2-ae.x,(-re.y+1)*se.height/2-ae.y);ce<Ie&&(Ie=ce,Re=ze);}return Re},"nodeAt"),j=r(te=>{le={x:te.clientX,y:te.clientY};},"pointerDown"),ne=r(te=>{L=B(te)?.id,O.domElement.style.cursor=L?"pointer":"grab";},"pointerMove"),fe=r(()=>{L=void 0;},"pointerLeave"),ye=r(te=>{if(Math.hypot(te.clientX-le.x,te.clientY-le.y)>5)return;let se=B(te);se&&g.current?.(se);},"pointerUp");O.domElement.addEventListener("pointerdown",j),O.domElement.addEventListener("pointermove",ne),O.domElement.addEventListener("pointerleave",fe),O.domElement.addEventListener("pointerup",ye);let xe=[...b.points].sort((te,se)=>te.depth-se.depth||(b.neighbors.get(se.id)?.size??0)-(b.neighbors.get(te.id)?.size??0));O.setAnimationLoop(()=>{V.update();let te=d.current,se=te?b.neighbors.get(te):void 0;(me!==te||!R.userData.initialized)&&(me=te,R.userData.initialized=true,b.links.forEach((A,X)=>{let ie=A.sourceId===te||A.targetId===te,Y=b.points.find(we=>we.id===A.targetId),de=F[Y.tone??"primary"].clone().multiplyScalar(te?ie?1.35:.12:.45);D.set([...de.toArray(),...de.toArray()],X*6);}),R.attributes.color.needsUpdate=true),q.forEach((A,X)=>{let ie=b.points[X],Y=te===ie.id;A.scale.setScalar((ie.depth===0?2.2:ie.depth===1?1.8:ie.depth===2?1.2:.82)*(Y?1.5:1)),A.material.opacity=!te||Y||se?.has(ie.id)?1:.25;});let Re=h.clientWidth,Ie=h.clientHeight,ze=ee/N.position.distanceTo(V.target),ce=[],U=[...xe].sort((A,X)=>+(X.id===te||X.id===L)-+(A.id===te||A.id===L));for(let A of U){let X=c.current.get(A.id);if(!X)continue;let ie=A.id===te,Y=A.id===L,de=se?.has(A.id);re.copy(W.get(A.id)).project(N);let we=(re.x+1)*Re/2,Ce=(-re.y+1)*Ie/2+10,Me={x:we-Math.min(A.label.length*13,170)/2,y:Ce,width:Math.min(A.label.length*13,170),height:21},Be=re.z>-1&&re.z<1&&Me.x>4&&Me.x+Me.width<Re-4&&Ce>4&&Ce+21<Ie-4,_e=ie||Y||de||A.depth<=2||ze>1.65,Ze=ce.some(tt=>Me.x<tt.x+tt.width+8&&Me.x+Me.width+8>tt.x&&Me.y<tt.y+tt.height+5&&Me.y+Me.height+5>tt.y),Fe=Be&&_e&&(ie||Y||!Ze)&&(!te||ie||Y||de||A.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[A.tone??"primary"].clone().lerp(F.primary,.45).getHexString(),X.style.opacity=te&&!ie&&!de&&!Y?"0.45":"1",X.style.fontWeight=A.depth<2||ie?"var(--monkeys-semantic-font-weight-semibold, 600)":"var(--monkeys-semantic-font-weight-normal, 400)",X.style.zIndex=ie||Y?"2":"1",Fe&&ce.push(Me);}O.render(C,N);}),v=r(()=>{O.domElement.removeEventListener("pointerdown",j),O.domElement.removeEventListener("pointermove",ne),O.domElement.removeEventListener("pointerleave",fe),O.domElement.removeEventListener("pointerup",ye),Z.disconnect(),O.setAnimationLoop(null),V.dispose(),w.forEach(te=>te.dispose()),O.dispose(),O.domElement.remove();},"cleanup");}).catch(()=>{y||p(true);}),()=>{y=true,v();}},[b]),jsxs("div",{ref:m,className:s,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(h=>jsx("button",{ref:y=>{y?c.current.set(h.id,y):c.current.delete(h.id);},"aria-pressed":o===h.id,className:"font-sans text-xs",title:h.meta,onClick:()=>g.current?.(h),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:h.label},h.id)),u&&jsx("div",{role:"alert",className:"absolute inset-0 grid place-items-center bg-background text-foreground",children:i.workbench.collection.loadError})]})}r(Nu,"RelationshipGalaxy");var Hr={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(Hr))Object.freeze(e);Object.freeze(Hr);var Iu={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]},Mu=new Set(["collisionPasses","ticksPerFrame"]),Bu=r(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"record");function gi(e={}){if(!Bu(e))throw new Error("config must be an object");let t=structuredClone(Hr);for(let[o,n]of Object.entries(e)){if(!Object.prototype.hasOwnProperty.call(t,o))throw new Error(`Unknown config group: ${o}`);if(!Bu(n))throw new Error(`config.${o} must be an object`);let a=t[o];for(let[s,i]of Object.entries(n)){let m=`config.${o}.${s}`;if(!Object.prototype.hasOwnProperty.call(a,s))throw new Error(`Unknown field: ${m}`);if((s==="contextOpacity"||s==="color")&&i===null){a[s]=null;continue}if(s==="dock"){if(typeof i!="string"||!["bottom-left","bottom-right","top-left","top-right"].includes(i))throw new Error(`${m} must be a supported corner`)}else if(s==="color"){if(typeof i!="string"||!/^#[\da-f]{6}$/i.test(i))throw new Error(`${m} must be a #RRGGBB color or null`)}else if(Iu[s]){let[c,d]=Iu[s];if(typeof i!="number"||!Number.isFinite(i)||i<c||i>d||Mu.has(s)&&!Number.isInteger(i))throw new Error(`${m} must be ${Mu.has(s)?"an integer":"a number"} in [${c}, ${d}]`)}else if(typeof i!="boolean")throw new Error(`${m} must be a boolean`);a[s]=i;}}if(t.viewport.minZoom>t.viewport.maxZoom)throw new Error("config.viewport.minZoom must not exceed maxZoom");return t}r(gi,"resolveRelationshipGraphConfig");var ll=r((e,t,o)=>Math.min(o,Math.max(t,e)),"clamp");function Pu(e,t,o={}){let n=gi({physics:o.physics??{}}).physics,a=[...e].sort((u,p)=>u.id.localeCompare(p.id,"en")).map((u,p)=>({...u,x:Number.isFinite(u.x)?u.x:Math.cos(p*2.39996)*100,y:Number.isFinite(u.y)?u.y:Math.sin(p*2.39996)*100,vx:0,vy:0,...o.fixedNodes?.has(u.id)?{fx:o.fixedNodes.get(u.id).x,fy:o.fixedNodes.get(u.id).y}:{}})),s=new Map(a.map(u=>[u.id,u])),i=t.flatMap(u=>{let p=s.get(u.sourceId),f=s.get(u.targetId);if(!p||!f||p===f)return [];let b=Number.isFinite(u.associationStrength)?ll(u.associationStrength,0,1):0;return [{source:p,target:f,strength:b,distance:(p.width+f.width)/2+(n.linkDistance+(1-b)*n.weakLinkDistance)}]}).sort((u,p)=>`${u.source.id}:${u.target.id}`.localeCompare(`${p.source.id}:${p.target.id}`,"en")),m=o.center??{x:3800,y:2800},c=a.length?1:0,d=0;function g(u=1){for(let p=0;p<u&&c>0;p++){for(let f=0;f<a.length;f++)for(let b=f+1;b<a.length;b++){let h=a[f],y=a[b],v=y.x-h.x,k=y.y-h.y;if(Math.abs(v)+Math.abs(k)<.01){let T=(f+b+1)*2.39996;v=Math.cos(T),k=Math.sin(T);}let x=Math.max(1,Math.hypot(v,k)),w=Math.min(8,n.repulsion/Math.max(2500,x*x))*c,C=v/x*w,S=k/x*w;h.vx-=C,h.vy-=S,y.vx+=C,y.vy+=S;}for(let{source:f,target:b,strength:h,distance:y}of i){let v=b.x-f.x,k=b.y-f.y,x=Math.max(1,Math.hypot(v,k)),w=(x-y)*(n.linkStrength+h*n.strongLinkStrength)*c,C=v/x*w,S=k/x*w;f.vx+=C,f.vy+=S,b.vx-=C,b.vy-=S;}d=0;for(let f of a)f.vx=ll((f.vx+(m.x-f.x)*n.centerStrength*c)*n.velocityRetention,-n.maxVelocity,n.maxVelocity),f.vy=ll((f.vy+(m.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 h=b+1;h<a.length;h++){let y=a[b],v=a[h],k=v.x-y.x,x=v.y-y.y,w=(y.width+v.width)/2+n.collisionPadding-Math.abs(k),C=(y.height+v.height)/2+n.collisionPadding-Math.abs(x);if(w<=0||C<=0)continue;let S=y.fx===void 0,T=v.fx===void 0,E=Number(S)+Number(T);if(E)if(w<C){let N=Math.sign(k||1)*w/E;S&&(y.x-=N),T&&(v.x+=N);}else {let N=Math.sign(x||1)*C/E;S&&(y.y-=N),T&&(v.y+=N);}}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:u,x:p,y:f})=>[u,{x:p,y:f}])),"positions"),reheat(){a.length&&(c=Math.max(c,.65));},pin(u,p,f){let b=s.get(u);!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(u){let p=s.get(u);if(!p)return;let f=o.fixedNodes?.get(u);p.fx=f?.x,p.fy=f?.y,c=Math.max(c,.65);}}}r(Pu,"createForceSimulation");var dl=r((e,t)=>{if(!e.length)return {x:0,y:0,width:2,height:2};let o=Math.min(...e.map(i=>i.x-i.width/2))-t,n=Math.max(...e.map(i=>i.x+i.width/2))+t,a=Math.min(...e.map(i=>i.y-i.height/2))-t,s=Math.max(...e.map(i=>i.y+i.height/2))+t;return {x:o,y:a,width:Math.max(2,n-o),height:Math.max(2,s-a)}},"calculateTrendRadarFocusTopologyBounds");var ro={x:0,y:0,width:7600,height:5600};var zx=r((e,t,o)=>Math.min(o,Math.max(t,e)),"clamp");var Eu=r(e=>{let t=Number.isFinite(e)?zx(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"),bi=r((e,t="dark")=>{let o=r((m,c,d)=>`color-mix(in srgb, ${c} ${d}%, ${m})`,"mix"),n=e.role==="context",a=e.role==="focus",s=o("hsl(var(--monkeys-color-background))",e.solidColor,t==="light"?a?16:n?4:10:a?48:40),i=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:s,foreground:i,border:o(s,i,a?82:67)}},"getTrendRadarFocusTopologyNodeTone"),Ox=r((e,t)=>{let o=t.x-e.x,n=t.y-e.y,a=Math.max(Math.hypot(o,n),1),s=Math.min(72,Math.max(18,a*.13)),i=e.id.localeCompare(t.id)>=0?1:-1;return {x:(e.x+t.x)/2+n/a*s*i,y:(e.y+t.y)/2-o/a*s*i}},"getTrendRadarFocusTopologyEdgeControlPoint"),Du=r((e,t)=>{let o=Ox(e,t);return `M ${e.x} ${e.y} Q ${o.x} ${o.y} ${t.x} ${t.y}`},"getTrendRadarFocusTopologyEdgePath");var ov={"align-justify":AlignJustify,grid:Grid3X3,layers:Layers,"map-pin":MapPin,mountain:Mountain,package:Package,paintbrush:Paintbrush,palette:Palette,scissors:Scissors,shield:Shield,"shield-check":ShieldCheck,shirt:Shirt,snowflake:Snowflake,sparkles:Sparkles,user:UserRound,users:UsersRound},nv=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 Lu({model:e,config:t=Hr,onOpenNode:o,renderNodeAction:n,relationshipLabel:a,colorMode:s="dark",onNodePointerDown:i,onNodeKeyDown:m}){let c=r((u,p)=>t.edges.curved?Du(u,p):`M ${u.x} ${u.y} L ${p.x} ${p.y}`,"edgePath"),d=useId().replace(/:/g,""),g=useMemo(()=>new Map(e.nodes.map(u=>[u.id,u])),[e.nodes]);return 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":s,children:[t.edges.visible&&jsxs("svg",{viewBox:`0 0 ${ro.width} ${ro.height}`,className:"absolute inset-0 size-full overflow-visible","aria-hidden":"true",children:[jsx("defs",{children:jsx("filter",{id:d,x:"-40%",y:"-40%",width:"180%",height:"180%",children:jsx("feGaussianBlur",{stdDeviation:"7"})})}),jsx("g",{"data-radar-focus-topology-edge-layer":"context",children:e.edges.filter(u=>u.role!=="focus").map(u=>{let p=g.get(u.sourceId),f=g.get(u.targetId);return !p||!f?null:jsx("path",{d:c(p,f),fill:"none",stroke:t.edges.color??"var(--trend-radar-muted-color)",strokeWidth:Math.max(.8,.72+Math.pow(u.associationStrength,1.08)*2.2)*t.edges.widthScale,strokeOpacity:Math.min(1,(u.role==="related"?.12:.045)*t.edges.opacityScale),strokeLinecap:"round",strokeLinejoin:"round"},u.id)})}),jsx("g",{"data-radar-focus-topology-edge-layer":"focus",children:e.edges.filter(u=>u.role==="focus").map(u=>{let p=g.get(u.sourceId),f=g.get(u.targetId);if(!p||!f)return null;let b=c(p,f),h=t.edges.color??nv(u,p.id===e.subjectId?f:p),y=Eu(u.associationStrength);return jsxs("g",{"data-radar-focus-topology-focus-edge":u.id,"data-radar-focus-topology-association-strength":u.associationStrength.toFixed(4),children:[jsx("path",{d:b,fill:"none",stroke:h,strokeWidth:y.glowWidth*t.edges.widthScale,strokeOpacity:t.edges.glow?Math.min(1,y.glowOpacity*t.edges.opacityScale):0,strokeLinecap:"round",filter:`url(#${d})`}),jsx("path",{d:b,fill:"none",stroke:h,strokeWidth:y.strokeWidth*t.edges.widthScale,strokeOpacity:Math.min(1,y.strokeOpacity*t.edges.opacityScale),strokeLinecap:"round",strokeLinejoin:"round",children:jsx("title",{children:a(u)})})]},u.id)})})]}),e.nodes.map(u=>{let p=ov[u.iconName]??Palette,f=bi(u,s),b=u.role==="focus",h=u.role==="context",y=!!(o&&!b);return jsxs("div",{className:l("absolute transition-[filter,opacity,transform] duration-200",b?"z-20":u.role==="related"?"z-10":"z-0",h&&s==="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:u.x,opacity:h?t.nodes.contextOpacity??(s==="dark"?u.contextOpacity:void 0):void 0,top:u.y,width:u.width,height:u.height,transform:`translate(-50%, -50%) scale(${b?t.nodes.focusScale:1})`,transformOrigin:"center center"},"data-radar-focus-topology-node-anchor":u.ref.id,children:[jsxs("button",{type:"button",disabled:!y&&!i,"aria-label":u.label,title:u.taxonomy?.secondaryLabel?`${u.label} \xB7 ${u.taxonomy.secondaryLabel}`:u.label,onPointerDown:v=>{v.stopPropagation(),i?.(v,u);},onKeyDown:v=>m?.(v,u),onClick:v=>{v.stopPropagation(),y&&o?.(u);},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 ${u.color}66`:u.role==="related"?`inset 0 0 0 1px ${f.border}, 0 0 18px ${u.color}24`:`inset 0 0 0 1px ${f.border}`:`inset 0 0 0 ${b?2:1}px ${f.border}`},"data-radar-focus-topology-node":u.ref.id,"data-world-x":u.x.toFixed(2),"data-world-y":u.y.toFixed(2),"data-radar-focus-topology-node-role":u.role,children:[t.nodes.showIcons&&jsx(p,{className:"shrink-0",size:t.nodes.iconSize,color:f.foreground,strokeWidth:1.8,"aria-hidden":"true"}),t.nodes.showLabels&&jsx("span",{className:"min-w-0 truncate",style:{color:"inherit"},children:u.label})]}),n?.(u)]},u.id)})]})}r(Lu,"TrendRadarFocusTopologySurface");function zu({model:e,config:t,onCameraChange:o,colorMode:n="light",ariaLabel:a,onOpenNode:s,renderNodeAction:i,nodeAction:m,onNodeAction:c,relationshipLabel:d,controls:g,onNodePositionChange:u}){if(m?.maxActive!==void 0&&(!Number.isSafeInteger(m.maxActive)||m.maxActive<1))throw new TypeError("Node action maxActive must be a positive integer.");if(m?.size!==void 0&&(!Number.isFinite(m.size)||m.size<16||m.size>48))throw new TypeError("Node action size must be between 16 and 48.");let p=useMemo(()=>gi(t),[t]),f=useMemo(()=>new Set(m?.activeNodeIds??[]),[m?.activeNodeIds]),b=JSON.stringify(p.physics),h=useMemo(()=>JSON.parse(b),[b]),y=JSON.stringify(p.viewport),v=useMemo(()=>JSON.parse(y),[y]),{interaction:k,ui:x}=p,w=useRef(null),C=useRef(),S=JSON.stringify({nodes:e.nodes.map(({id:B,x:j,y:ne,width:fe,height:ye})=>({id:B,x:j,y:ne,width:fe,height:ye})),edges:e.edges.map(({sourceId:B,targetId:j,associationStrength:ne})=>({sourceId:B,targetId:j,associationStrength:ne}))}),T=useMemo(()=>{let B=JSON.parse(S);return Pu(B.nodes,B.edges,{physics:h})},[S,h]),[E,N]=useState(()=>T.positions()),[O,V]=useState(false),[W,F]=useState({x:0,y:0,z:1}),H=useRef(o);H.current=o,useEffect(()=>{H.current?.(W);},[W]);let I=useRef(W),G=useRef(),q=useRef(false),[R,D]=useState({width:1,height:1}),M=useRef(false),$=useMemo(()=>e.nodes.map(B=>({...B,...E.get(B.id)??{}})),[e.nodes,E]),J=useRef($);J.current=$;let _=useCallback(B=>{I.current=B,F(B);},[]),ee=useCallback(()=>{if(C.current!==void 0)return;if(M.current&&!G.current){T.step(1400),N(T.positions()),V(false);return}V(T.active);let B=r(()=>{T.step(h.ticksPerFrame),N(T.positions()),T.active?C.current=requestAnimationFrame(B):(C.current=void 0,V(false));},"tick");C.current=requestAnimationFrame(B);},[T,h.ticksPerFrame]),K=useCallback(()=>{let B=w.current;if(!B)return;let j=dl(J.current,v.fitPadding),ne=Math.max(v.minZoom,Math.min(v.maxZoom,v.fitMaxZoom,(B.clientWidth-v.screenPadding*2)/j.width,(B.clientHeight-v.screenPadding*2)/j.height));_({x:B.clientWidth/(2*ne)-j.x-j.width/2,y:B.clientHeight/(2*ne)-j.y-j.height/2,z:ne});},[_,v]);useEffect(()=>{M.current=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??false;let B=T.positions();return N(B),J.current=J.current.map(j=>({...j,...B.get(j.id)})),K(),ee(),()=>{C.current!==void 0&&cancelAnimationFrame(C.current),C.current=void 0;let j=G.current;j?.target.hasPointerCapture?.(j.pointerId)&&j.target.releasePointerCapture(j.pointerId),G.current=void 0;}},[T,K,ee]),useEffect(()=>{let B=w.current;if(!B)return;let j=new ResizeObserver(()=>{D({width:B.clientWidth,height:B.clientHeight}),v.fitOnResize&&K();});return j.observe(B),()=>j.disconnect()},[K,v.fitOnResize]);let Z=useCallback((B,j,ne)=>{if(!k.zoom)return;let fe=I.current,ye=Math.max(v.minZoom,Math.min(v.maxZoom,fe.z*Math.exp(-B*v.zoomSensitivity)));_({x:fe.x-j/fe.z+j/ye,y:fe.y-ne/fe.z+ne/ye,z:ye});},[_,v,k.zoom]);useEffect(()=>{let B=w.current;if(!B)return;let j=r(ne=>{if(G.current||!k.zoom)return;ne.preventDefault();let fe=B.getBoundingClientRect();Z(ne.deltaY,ne.clientX-fe.left,ne.clientY-fe.top);},"wheel");return B.addEventListener("wheel",j,{passive:false}),()=>B.removeEventListener("wheel",j)},[Z,k.zoom]);let re=r((B,j)=>{if(B.button!==0||G.current||(j?!k.dragNodes:!k.pan))return;q.current=false;let ne=I.current;G.current={pointerId:B.pointerId,id:j?.id,startX:B.clientX,startY:B.clientY,x:j?.x??ne.x,y:j?.y??ne.y,moved:false,target:B.currentTarget},B.currentTarget.setPointerCapture(B.pointerId),j&&(T.pin(j.id,j.x,j.y),ee());},"begin"),ae=r(B=>{let j=G.current;if(!(!j||j.pointerId!==B.pointerId)){if(G.current=void 0,q.current=j.moved,j.id){let ne=T.positions().get(j.id);T.release(j.id),ee(),j.moved&&ne&&u?.(j.id,ne);}j.target.hasPointerCapture(B.pointerId)&&j.target.releasePointerCapture(B.pointerId);}},"end"),le={...e,nodes:$},L=new Map($.map(B=>[B.id,B])),me=dl([...e.nodes,...$],200);return jsxs("section",{ref:w,className:"relationship-graph bg-background relative size-full overflow-hidden",style:{cursor:k.pan?void 0:"default",touchAction:k.pan||k.dragNodes?"none":"auto"},role:"region","aria-label":a,"data-radar-focus-topology":"true","data-graph-engine":"native-force","data-force-running":O,"data-radar-focus-topology-camera":`${W.x.toFixed(2)},${W.y.toFixed(2)},${W.z.toFixed(3)}`,onPointerDown:B=>{B.target.closest("button")||re(B);},onPointerMove:B=>{let j=G.current;if(!j||j.pointerId!==B.pointerId)return;let ne=B.clientX-j.startX,fe=B.clientY-j.startY;j.moved||(j.moved=Math.hypot(ne,fe)>k.dragThreshold),j.moved&&(j.id?(T.pin(j.id,j.x+ne/I.current.z,j.y+fe/I.current.z),N(T.positions()),ee()):_({...I.current,x:j.x+ne/I.current.z,y:j.y+fe/I.current.z}));},onPointerUp:ae,onPointerCancel:ae,onLostPointerCapture:ae,onClickCapture:B=>{q.current&&(B.preventDefault(),B.stopPropagation(),q.current=false);},children:[jsx("div",{style:{position:"absolute",left:0,top:0,width:ro.width,height:ro.height,transformOrigin:"0 0",transform:`translate(${W.x*W.z}px, ${W.y*W.z}px) scale(${W.z})`},children:jsx(Lu,{model:le,config:p,colorMode:n,relationshipLabel:d,onOpenNode:k.openNodes?s:void 0,renderNodeAction:i??(m&&c?B=>{if(m.nodeKinds&&!m.nodeKinds.includes(B.ref.kind))return null;let j=f.has(B.id),ne=m.disabled||!j&&m.maxActive!==void 0&&f.size>=m.maxActive,fe=`${j?m.activeLabel??m.label:m.label}: ${B.label}`,ye=j?Check:Plus,xe=m.size??24;return jsx("button",{type:"button","data-relationship-node-action":B.id,"aria-label":fe,title:fe,"aria-pressed":j,disabled:ne,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:bi(B,n).foreground,transform:`translate(50%, -50%) scale(${m.keepScreenSize===false?1:1/W.z})`,transformOrigin:"center"},onPointerDown:te=>te.stopPropagation(),onKeyDown:te=>te.stopPropagation(),onClick:te=>{te.stopPropagation(),c(B);},children:jsx(ye,{size:xe*.6,"aria-hidden":"true"})})}:void 0),onNodePointerDown:k.dragNodes?(B,j)=>re(B,j):void 0,onNodeKeyDown:(B,j)=>{if(!k.keyboard||!k.dragNodes)return;let ne={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]}[B.key];if(!ne)return;B.preventDefault(),B.stopPropagation();let fe=(B.shiftKey?k.keyboardFastStep:k.keyboardStep)/I.current.z,ye={x:j.x+ne[0]*fe,y:j.y+ne[1]*fe};T.pin(j.id,ye.x,ye.y),N(T.positions()),T.release(j.id),ee(),u?.(j.id,ye);}})}),(x.controls||x.minimap)&&jsxs("div",{className:"relationship-minimap","data-radar-focus-topology-minimap":"true",style:{width:x.minimapWidth,left:x.dock.endsWith("left")?12:"auto",right:x.dock.endsWith("right")?12:"auto",top:x.dock.startsWith("top")?12:"auto",bottom:x.dock.startsWith("bottom")?12:"auto"},children:[x.controls&&jsxs("div",{className:"relationship-controls",children:[jsx("button",{type:"button","aria-label":g.zoomOut,onClick:()=>Z(v.zoomStep,R.width/2,R.height/2),disabled:!k.zoom||W.z<=v.minZoom,children:jsx(Minus,{size:15})}),jsxs("output",{children:[Math.round(W.z*100),"%"]}),jsx("button",{type:"button","aria-label":g.zoomIn,onClick:()=>Z(-v.zoomStep,R.width/2,R.height/2),disabled:!k.zoom||W.z>=v.maxZoom,children:jsx(Plus,{size:15})}),jsx("button",{type:"button","aria-label":g.zoomToFit,onClick:K,children:jsx(LocateFixed,{size:15})})]}),x.minimap&&jsx("button",{type:"button",className:"relationship-minimap-map",disabled:!k.pan,"aria-label":g.minimap,onClick:B=>{if(B.detail===0){K();return}let j=B.currentTarget.getBoundingClientRect(),ne=(B.clientX-j.left)/j.width*me.width+me.x,fe=(B.clientY-j.top)/j.height*me.height+me.y;_({...W,x:R.width/(2*W.z)-ne,y:R.height/(2*W.z)-fe});},children:jsxs("svg",{viewBox:`${me.x} ${me.y} ${me.width} ${me.height}`,style:{height:x.minimapHeight},preserveAspectRatio:"none","aria-hidden":"true",children:[e.edges.map(B=>{let j=L.get(B.sourceId),ne=L.get(B.targetId);return j&&ne?jsx("line",{x1:j.x,y1:j.y,x2:ne.x,y2:ne.y,stroke:"currentColor",strokeWidth:2,opacity:.2},B.id):null}),$.map(B=>jsx("circle",{cx:B.x,cy:B.y,r:B.role==="focus"?14:8,fill:B.color},B.id)),jsx("rect",{x:-W.x,y:-W.y,width:R.width/W.z,height:R.height/W.z,fill:"currentColor",fillOpacity:.07,stroke:"currentColor",strokeWidth:4})]})})]})]})}r(zu,"RelationshipGraph2D");var sv={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)))"},lv={nodes:{showIcons:false,glow:false,contextOpacity:1},edges:{glow:false,opacityScale:3,widthScale:.5}};function Fu({nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,ariaLabel:a="Relationship graph",className:s,height:i=440}){let m=vt(),c=nn(),d=JSON.stringify([e,t]),g=useMemo(()=>mi(e,t),[d]),u=useMemo(()=>({subjectId:o??"",bounds:ro,focusBounds:ro,nodes:g.points.map(b=>{let h=Math.max(88,Math.min(240,Array.from(b.label).length*14+32)),y=sv[b.tone??"muted"];return {id:b.id,ref:{kind:"node",id:b.id},label:b.label,x:ro.width/2+b.x*70,y:ro.height/2+b.y*70,width:h,height:36,radius:h/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,h)=>({id:b.id??`${b.sourceId}:${b.targetId}:${h}`,sourceId:b.sourceId,targetId:b.targetId,evidenceRefs:[],evidenceCount:0,associationStrength:1,role:b.sourceId===o||b.targetId===o?"focus":"related"}))}),[g,o]),p=useMemo(()=>new Map(e.map(b=>[b.id,b])),[d]),f=useMemo(()=>new Map(g.links.map((b,h)=>[b.id??`${b.sourceId}:${b.targetId}:${h}`,b.label??`${p.get(b.sourceId)?.label} \u2192 ${p.get(b.targetId)?.label}`])),[g,p]);return 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",s),style:{"--relationship-height":`${i}px`},children:jsx(zu,{model:u,config:lv,colorMode:c?.colorMode==="dark"?"dark":"light",ariaLabel:a,controls:m.workbench.relationshipGraph??{zoomOut:"Zoom out",zoomIn:"Zoom in",zoomToFit:"Fit graph",minimap:"Graph overview"},relationshipLabel:b=>f.get(b.id)??"",onOpenNode:n?b=>{let h=p.get(b.id);h&&n(h);}:void 0})})}r(Fu,"RelationshipForce2D");var dv={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"},cv={primary:"--radar-series-one",secondary:"--radar-series-two",accent:"--radar-series-three",muted:"--radar-series-four"},uv={primary:"var(--primary)",secondary:"var(--secondary-foreground)",accent:"var(--accent-foreground)",muted:"var(--muted-foreground)"},vi=r((e,t=1)=>`hsl(var(${cv[e]}, ${uv[e]}) / ${t})`,"radarToneColor"),mv=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:s=440,emptyState:i=null,ariaLabel:m="Relationship graph",className:c,variant:d="default"}){if(!e.length)return z(i)?jsx(Fragment,{children:i}):null;if(d==="galaxy")return jsx(Nu,{nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,ariaLabel:m,className:c});if(d==="force-2d")return jsx(Fu,{nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,ariaLabel:m,className:c,height:s});let g=d==="radar",u=Math.min(a,s)*(g?.37:.35),p=o?e.findIndex(h=>h.id===o):-1,f=p>=0?e.filter((h,y)=>y!==p):e,b=new Map(e.map((h,y)=>{if(e.length===1)return [h.id,{x:a/2,y:s/2}];if(g&&y===p)return [h.id,{x:a/2,y:s/2}];let v=f.findIndex(x=>x.id===h.id),k=Math.PI*2*v/f.length-Math.PI/2;return [h.id,{x:a/2+Math.cos(k)*u,y:s/2+Math.sin(k)*u}]}));return 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:jsxs("svg",{viewBox:`0 0 ${a} ${s}`,className:l(g?"absolute inset-0 size-full":"min-w-[42rem]"),preserveAspectRatio:g?"xMidYMid meet":void 0,role:"img","aria-label":m,children:[t.map((h,y)=>{let v=b.get(h.sourceId),k=b.get(h.targetId);return !v||!k?null:jsx("line",{x1:v.x,y1:v.y,x2:k.x,y2:k.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:jsx("title",{children:h.label||`${h.sourceId} to ${h.targetId}`})},h.id||`${h.sourceId}:${h.targetId}:${y}`)}),e.map(h=>{let y=b.get(h.id),v=h.id===o,k=h.tone||"muted",x=g?{color:vi(k)}:void 0;return jsxs("g",{transform:`translate(${y.x}, ${y.y})`,role:n?"button":void 0,tabIndex:n?0:void 0,"aria-label":h.meta?`${h.label}, ${h.meta}`:h.label,"aria-pressed":n?v:void 0,onClick:n?()=>n(h):void 0,onKeyDown:w=>mv(w,h,n),className:l(g?"outline-hidden":dv[k],n&&"cursor-pointer outline-hidden"),style:x,children:[jsx("circle",{r:g&&v?"50":g?"40":"36",className:l("stroke-1 transition-[stroke-width] duration-150 motion-reduce:transition-none",v&&"stroke-[3]"),style:g?{fill:vi(k,v?.22:.12),stroke:vi(k,v?1:.78),filter:`drop-shadow(0 0 ${v?"1.4rem":"0.75rem"} ${vi(k,.62)})`}:void 0}),jsx("text",{textAnchor:"middle",y:h.meta?-3:4,className:l("pointer-events-none fill-current font-semibold",g?"text-sm":"text-xs"),children:h.label.slice(0,18)}),h.meta?jsx("text",{textAnchor:"middle",y:"16",className:l("pointer-events-none text-xs",g?"fill-current opacity-70":"fill-muted-foreground"),children:h.meta.slice(0,22)}):null]},h.id)})]})})}r(pv,"WorkbenchRelationshipGraph");var bv={primary:"fill-primary stroke-primary",secondary:"fill-secondary stroke-secondary-foreground",accent:"fill-accent stroke-accent-foreground",muted:"fill-muted stroke-muted-foreground"},fv=r(e=>e.filter(Number.isFinite),"finiteValues"),cl=r((e,t,o)=>{let n=fv(e),a=Number.isFinite(t)?Number(t):Math.min(...n,0),s=Number.isFinite(o)?Number(o):Math.max(...n,1);return a===s?[a,s+1]:a<s?[a,s]:[s,a]},"getDomain"),_r=r((e,t,o,n)=>o+(e-t[0])/(t[1]-t[0])*(n-o),"scale"),yn=r((e,t,o)=>Math.min(o,Math.max(t,e)),"clamp"),yv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activatePoint");function hv({points:e,xAxis:t,yAxis:o,thresholds:n,selectedPointId:a,onPointSelect:s,width:i=900,height:m=420,emptyState:c=null,ariaLabel:d=`${t.label} by ${o.label}`,className:g}){let u=e.filter(S=>Number.isFinite(S.x)&&Number.isFinite(S.y));if(!u.length)return z(c)?jsx(Fragment,{children:c}):null;let p=56,f=cl(u.map(S=>S.x),t.min,t.max),b=cl(u.map(S=>S.y),o.min,o.max),h=cl(u.map(S=>S.size??1)),y=p,v=i-p,k=p,x=m-p,w=Number.isFinite(n?.x)?_r(Number(n?.x),f,y,v):void 0,C=Number.isFinite(n?.y)?_r(Number(n?.y),b,x,k):void 0;return 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:jsxs("svg",{viewBox:`0 0 ${i} ${m}`,className:"min-w-[42rem]",role:"img","aria-label":d,children:[jsx("line",{x1:y,y1:x,x2:v,y2:x,className:"stroke-border"}),jsx("line",{x1:y,y1:k,x2:y,y2:x,className:"stroke-border"}),w===void 0?null:jsx("line",{x1:yn(w,y,v),y1:k,x2:yn(w,y,v),y2:x,className:"stroke-muted-foreground/50",strokeDasharray:"5 5"}),C===void 0?null:jsx("line",{x1:y,y1:yn(C,k,x),x2:v,y2:yn(C,k,x),className:"stroke-muted-foreground/50",strokeDasharray:"5 5"}),jsx("text",{x:i/2,y:m-12,textAnchor:"middle",className:"fill-muted-foreground text-xs",children:t.label}),jsx("text",{x:"16",y:m/2,textAnchor:"middle",transform:`rotate(-90 16 ${m/2})`,className:"fill-muted-foreground text-xs",children:o.label}),u.map(S=>{let T=yn(_r(S.x,f,y,v),y,v),E=yn(_r(S.y,b,x,k),k,x),N=S.size===void 0?9:yn(_r(S.size,h,7,18),7,18),O=a===S.id;return jsxs("g",{transform:`translate(${T}, ${E})`,role:s?"button":void 0,tabIndex:s?0:void 0,"aria-label":`${S.label}: ${t.label} ${S.x}, ${o.label} ${S.y}`,"aria-pressed":s?O:void 0,onClick:s?()=>s(S):void 0,onKeyDown:V=>yv(V,S,s),className:l(s&&"cursor-pointer outline-hidden"),children:[jsx("circle",{r:N,className:l("stroke-1 opacity-80 transition-opacity duration-150 motion-reduce:transition-none",bv[S.tone||"primary"],O?"opacity-100 stroke-[3]":"hover:opacity-100")}),jsx("text",{y:-N-7,textAnchor:"middle",className:"pointer-events-none fill-foreground text-[0.6875rem] font-semibold",children:S.label.slice(0,24)}),jsx("title",{children:S.description||S.label})]},S.id)})]})})}r(hv,"WorkbenchScatterPlot");var vv=r((e,t,o)=>{!o||t.disabled||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activateItem");function kv({items:e,onItemSelect:t,ariaLabel:o="Journey",className:n}){return 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:jsx("ol",{className:"flex min-w-max items-stretch gap-1",children:e.map((a,s)=>{let i=a.state||"upcoming";return jsxs("li",{className:"flex items-center",children:[s?jsx("span",{className:"mx-1 h-px w-5 bg-border","aria-hidden":"true"}):null,jsxs("button",{type:"button",disabled:a.disabled,"aria-current":i==="current"?"page":void 0,onClick:t&&!a.disabled?()=>t(a):void 0,onKeyDown:m=>vv(m,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",i==="current"&&"border-primary bg-primary text-primary-foreground",i==="complete"&&"border-primary/30 bg-primary/10 text-foreground",i==="upcoming"&&"border-transparent bg-muted/50 text-muted-foreground",a.disabled&&"cursor-not-allowed opacity-50"),children:[z(a.eyebrow)?jsx("span",{className:l("block text-[0.625rem] font-semibold uppercase tracking-[0.14em]",i==="current"?"text-primary-foreground/75":"text-muted-foreground"),children:a.eyebrow}):null,jsx("span",{className:"mt-0.5 block text-xs font-semibold",children:a.label})]})]},a.id)})})})}r(kv,"WorkbenchJourneyNavigation");var wv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activateItem");function Cv({items:e,selectedItemId:t,onItemSelect:o,emptyState:n=null,ariaLabel:a="Ranked items",className:s}){return e.length?jsx("ol",{"aria-label":a,"data-monkeys-component":"workbench-ranked-list",className:l("grid min-w-0 gap-2",s),children:e.map((i,m)=>{let c=t===i.id;return jsx("li",{children:jsxs("button",{type:"button","aria-pressed":o?c:void 0,onClick:o?()=>o(i):void 0,onKeyDown:d=>wv(d,i,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:[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:i.leading||m+1}),jsxs("span",{className:"min-w-0",children:[jsx("span",{className:"block truncate text-sm font-semibold text-foreground",children:i.label}),z(i.description)?jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:i.description}):null,i.tags?.length?jsx("span",{className:"mt-2 flex flex-wrap gap-1.5",children:i.tags.map((d,g)=>jsx("span",{className:"rounded-full bg-secondary px-2 py-0.5 text-[0.625rem] font-medium text-secondary-foreground",children:d},`${i.id}:tag:${g}`))}):null,i.metrics?.length?jsx("span",{className:"mt-2 grid grid-cols-2 gap-x-4 gap-y-1 sm:grid-cols-4",children:i.metrics.map(d=>jsxs("span",{className:"min-w-0",children:[jsx("span",{className:"block truncate text-[0.625rem] text-muted-foreground",children:d.label}),jsx("span",{className:"block text-xs font-semibold tabular-nums text-foreground",children:d.value})]},d.id))}):null]}),jsxs("span",{className:"shrink-0 text-right",children:[z(i.score)?jsx("span",{className:"block text-lg font-semibold tabular-nums text-primary",children:i.score}):null,z(i.trailing)?jsx("span",{className:"mt-1 block text-muted-foreground",children:i.trailing}):null]})]})},i.id)})}):z(n)?jsx(Fragment,{children:n}):null}r(Cv,"WorkbenchRankedList");function Tv({title:e,description:t,items:o,onRemove:n,removeLabel:a=r(()=>"Remove","removeLabel"),actions:s,emptyState:i=null,className:m}){return jsxs("section",{"data-monkeys-component":"workbench-selection-tray",className:l("rounded-lg border border-border/70 bg-card p-4 text-card-foreground",m),children:[jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[jsxs("div",{className:"min-w-0",children:[jsx("h2",{className:"text-sm font-semibold text-foreground",children:e}),z(t)?jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground",children:t}):null]}),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?jsx("ul",{className:"mt-3 flex flex-wrap gap-2",children:o.map(c=>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:[jsx("span",{className:"min-w-0 truncate font-medium",children:c.label}),z(c.meta)?jsx("span",{className:"shrink-0 text-muted-foreground",children:c.meta}):null,n?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))}):jsx("div",{className:"mt-3 rounded-md border border-dashed border-border px-4 py-5 text-center text-xs text-muted-foreground",children:i}),z(s)?jsx("div",{className:"mt-4 flex flex-wrap justify-end gap-2 border-t border-border pt-4",children:s}):null]})}r(Tv,"WorkbenchSelectionTray");function Ci(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 s=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,3}))?(Z|[+-]\d{2}:\d{2})$/.exec(e);if(!s)return "\u2014";let i=Number(s[1]),m=Number(s[2]),c=Number(s[3]),d=Number(s[4]),g=Number(s[5]),u=Number(s[6]),p=new Date(0);if(p.setUTCFullYear(i,m-1,c),p.getUTCFullYear()!==i||p.getUTCMonth()!==m-1||p.getUTCDate()!==c||d>23||g>59||u>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(Ci,"renderDateTimeValue");function Rv({items:e,emptyState:t=null,ariaLabel:o="Evidence",className:n,translate:a=r(s=>s,"translate")}){let{locale:s}=xt();return e.length?jsx("ol",{"aria-label":o,"data-monkeys-component":"workbench-evidence-list",className:l("grid min-w-0 gap-0",n),children:e.map((i,m)=>jsxs("li",{className:"grid min-w-0 grid-cols-[1.25rem_minmax(0,1fr)_auto] gap-3",children:[jsxs("span",{className:"flex flex-col items-center","aria-hidden":"true",children:[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:i.marker||m+1}),m<e.length-1?jsx("span",{className:"min-h-8 w-px flex-1 bg-border"}):null]}),jsxs("span",{className:"min-w-0 pb-5",children:[jsx("span",{className:"block text-sm font-semibold text-foreground",children:i.titleKey?a(i.titleKey):i.title}),z(i.description)||i.descriptionKey?jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:i.descriptionKey?a(i.descriptionKey):i.description}):null,z(i.source)||i.sourceKey||z(i.timestamp)||i.timestampValue!==void 0?jsxs("span",{className:"mt-1.5 flex flex-wrap gap-x-3 gap-y-1 text-[0.6875rem] text-muted-foreground",children:[z(i.source)||i.sourceKey?jsx("span",{children:i.sourceKey?a(i.sourceKey):i.source}):null,z(i.timestamp)||i.timestampValue!==void 0?jsx("time",{children:i.timestampValue!==void 0?Ci(i.timestampValue,"milliseconds",s):i.timestamp}):null]}):null]}),z(i.action)?jsx("span",{className:"pb-5",children:i.action}):null]},i.id))}):z(t)?jsx(Fragment,{children:t}):null}r(Rv,"WorkbenchEvidenceList");var Mv=forwardRef(r(function({src:t,title:o,className:n,style:a,...s},i){let m=Zt(t,"media"),c=m&&!m.startsWith("blob:")?m:void 0;return jsx("iframe",{...s,ref:i,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 Pv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activateItem");function Ev({items:e,selectedItemId:t,onItemSelect:o,emptyState:n=null,ariaLabel:a="Assets",className:s}){return e.length?jsx("div",{"data-monkeys-component":"workbench-asset-gallery",children:jsx(Xo,{items:e,config:{getItemKey:r(i=>i.id,"getItemKey"),layout:{mode:"grid",columns:"auto",minCardWidth:"12rem",idealCardWidth:"16rem",gap:12},appearance:{hover:"none"}},ariaLabel:a,className:s,renderItem:i=>{let m=t===i.id;return jsxs("button",{type:"button","aria-pressed":o?m:void 0,onClick:o?()=>o(i):void 0,onKeyDown:c=>Pv(c,i,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",m?"border-primary ring-1 ring-primary":"border-border/70 hover:border-primary/40",!o&&"cursor-default"),children:[jsx("span",{className:"block aspect-[4/3] overflow-hidden bg-muted",children:jsx("img",{src:i.url,alt:i.alt,loading:"lazy",className:"size-full object-cover transition-transform duration-200 group-hover:scale-[1.02] motion-reduce:transition-none"})}),jsxs("span",{className:"block p-3",children:[z(i.title)?jsx("span",{className:"block truncate text-sm font-semibold text-foreground",children:i.title}):null,z(i.description)?jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:i.description}):null,i.badges?.length?jsx("span",{className:"mt-2 flex flex-wrap gap-1.5",children:i.badges.map((c,d)=>jsx("span",{className:"rounded-full bg-secondary px-2 py-0.5 text-[0.625rem] text-secondary-foreground",children:c},`${i.id}:badge:${d}`))}):null]})]})}})}):z(n)?jsx(Fragment,{children:n}):null}r(Ev,"WorkbenchAssetGallery");var ju={primary:"--radar-series-one",secondary:"--radar-series-two",accent:"--radar-series-three",muted:"--radar-series-four"},$u={primary:"var(--primary)",secondary:"var(--secondary-foreground)",accent:"var(--accent-foreground)",muted:"var(--muted-foreground)"},hn=r(e=>`hsl(var(${ju[e]}, ${$u[e]}))`,"workbenchVisualizationToneColor"),$r=r((e,t)=>`hsl(var(${ju[e]}, ${$u[e]}) / ${t})`,"workbenchVisualizationToneColorWithAlpha");var Wv={backgroundColor:"hsl(var(--radar-canvas, var(--background)))",color:"hsl(var(--foreground))"},Ku={backgroundColor:"hsl(var(--radar-panel, var(--card)))",borderColor:"hsl(var(--radar-border, var(--border)))"};function Uu({items:e,activeItemId:t,activeChildId:o,onItemSelect:n,onChildSelect:a,footer:s,ariaLabel:i="Radar navigation"}){return jsx(Cr,{kind:"route",routeItems:e.map(m=>({...m,children:m.children?.map(c=>({...c,domProps:{"data-radar-navigation-child-id":c.id}}))})),activeItemId:t,activeChildId:o,onItemSelect:n?m=>n(m):void 0,onChildSelect:a?(m,c)=>a(m,c):void 0,footer:s,ariaLabel:i,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:Ku})}r(Uu,"WorkbenchRadarNavigation");function Lv({navigationItems:e=[],activeNavigationId:t,activeNavigationChildId:o,onNavigationSelect:n,onNavigationChildSelect:a,navigationFooter:s,navigation:i,children:m,inspector:c,inspectorLabel:d="Context controls",className:g,contentClassName:u,minimumHeight:p="calc(100dvh - 1rem)",ariaLabel:f="Radar workspace"}){return 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:{...Wv,minHeight:p},children:[z(i)?i:jsx(Uu,{items:e,activeItemId:t,activeChildId:o,onItemSelect:n,onChildSelect:a,footer:s}),jsx("div",{"data-radar-workspace-region":"content",className:l("relative min-h-[42rem] min-w-0 overflow-hidden rounded-lg border",u),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:m}),z(c)?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:Ku,children:c}):null]})}r(Lv,"WorkbenchRadarWorkspace");function Av({title:e,icon:t,description:o,children:n,className:a}){return jsxs("section",{"data-monkeys-component":"workbench-radar-inspector-section",className:l("border-b border-border/70 p-4 last:border-b-0",a),children:[jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold text-primary",children:[z(t)?jsx("span",{"aria-hidden":"true",children:t}):null,jsx("h2",{children:e})]}),z(o)?jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground",children:o}):null,z(n)?jsx("div",{className:"mt-3",children:n}):null]})}r(Av,"WorkbenchRadarInspectorSection");function zv(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(zv,"assertValidRadarFilterRowProps");function Ov(e){zv(e);let{label:t,value:o,icon:n,selected:a,disabled:s=false,tone:i,onSelect:m,disclosure:c,className:d}=e,g=a??false,u=g?void 0:"monkeys-workbench-radar-filter-row--idle",p=s?"monkeys-workbench-radar-filter-disabled":void 0,f=i??"primary",b=hn(f),h={"--workbench-radar-filter-tone":b,"--tw-ring-color":i?b:"hsl(var(--ring))",...g||i?{backgroundColor:$r(f,g?.14:.08),borderColor:b}:{}},y=jsxs(Fragment,{children:[z(n)?jsx("span",{className:l("flex size-4 shrink-0 items-center justify-center",i?"text-[var(--workbench-radar-filter-tone)]":"text-muted-foreground"),"aria-hidden":"true",children:n}):null,jsx("span",{className:"min-w-0 truncate",children:t}),z(o)?jsx("span",{className:"ml-auto shrink-0 tabular-nums text-muted-foreground",children:o}):null]}),v=c?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 w=c.expanded?c.collapseLabel:c.expandLabel;return jsxs("div",{"data-monkeys-component":"workbench-radar-filter-row",className:l("monkeys-workbench-radar-filter-row monkeys-workbench-radar-filter-row--separate",u,p,d),style:h,children:[jsx("button",{type:"button","aria-pressed":a,disabled:s,onClick:m,className:l("monkeys-workbench-radar-filter-control monkeys-workbench-radar-filter-row__action",p),children:y}),jsx("button",{type:"button","aria-expanded":c.expanded,"aria-controls":c.controls,"aria-label":w,disabled:s,onClick:c.onToggle,className:l("monkeys-workbench-radar-filter-row__disclosure",p),children:v})]})}let k=c?.mode==="integrated"?c:void 0,x=k?k.expanded?k.collapseLabel:k.expandLabel:void 0;return jsxs("button",{type:"button","data-monkeys-component":"workbench-radar-filter-row","aria-label":x,"aria-pressed":k?void 0:a,"aria-expanded":k?.expanded,"aria-controls":k?.controls,disabled:s,onClick:k?.onToggle??m,className:l("monkeys-workbench-radar-filter-control monkeys-workbench-radar-filter-row",u,p,d),style:h,children:[y,k?jsx("span",{className:"ml-auto shrink-0 text-muted-foreground",children:v}):null]})}r(Ov,"WorkbenchRadarFilterRow");function Fv({label:e,value:t,icon:o,selected:n=false,disabled:a=false,onSelect:s,className:i}){let m=!!s||a;return jsxs(m?"button":"div",{type:m?"button":void 0,"aria-pressed":s&&!a?n:void 0,disabled:m?a:void 0,onClick:s,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",i),children:[z(o)?jsx("span",{className:"shrink-0","aria-hidden":"true",children:o}):null,jsx("span",{className:"min-w-0 truncate",children:e}),z(t)?jsx("span",{className:"ml-auto shrink-0 text-muted-foreground",children:t}):null]})}r(Fv,"WorkbenchRadarFilterChip");var Vv=r(e=>e.filter(Number.isFinite),"finiteValues"),ul=r((e,t,o)=>{let n=Vv(e),a=Number.isFinite(t)?Number(t):Math.min(...n,0),s=Number.isFinite(o)?Number(o):Math.max(...n,1);return a===s?[a,s+1]:a<s?[a,s]:[s,a]},"getDomain"),en=r((e,t,o,n)=>o+(e-t[0])/(t[1]-t[0])*(n-o),"scale"),tn=r((e,t,o)=>Math.min(o,Math.max(t,e)),"clamp"),Gv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activatePoint"),_v={"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 jv({points:e,xAxis:t,yAxis:o,thresholds:n,quadrants:a=[],legend:s=[],selectedPointId:i,onPointSelect:m,width:c=1e3,height:d=700,labelLimit:g=18,emptyState:u=null,ariaLabel:p=`${t.label} by ${o.label} radar matrix`,className:f}){let b=e.filter(N=>Number.isFinite(N.x)&&Number.isFinite(N.y));if(!b.length)return z(u)?jsx(Fragment,{children:u}):null;let h=ul(b.map(N=>N.x),t.min,t.max),y=ul(b.map(N=>N.y),o.min,o.max),v=ul(b.map(N=>N.size??1)),k=0,x=c,w=0,C=d,S=tn(en(Number.isFinite(n?.x)?Number(n?.x):(h[0]+h[1])/2,h,k,x),k,x),T=tn(en(Number.isFinite(n?.y)?Number(n?.y):(y[0]+y[1])/2,y,C,w),w,C),E=new Set([...b].sort((N,O)=>(O.size??0)-(N.size??0)).slice(0,g).map(N=>N.id));return 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:[jsxs("svg",{viewBox:`0 0 ${c} ${d}`,preserveAspectRatio:"none",className:"absolute inset-0 size-full",role:"img","aria-label":p,children:[jsxs("g",{"aria-hidden":"true",children:[Array.from({length:13},(N,O)=>{let V=c/12*O,W=d/12*O;return jsxs("g",{children:[jsx("line",{x1:V,y1:0,x2:V,y2:d,style:{stroke:"hsl(var(--radar-grid, var(--border)) / 0.36)"}}),jsx("line",{x1:0,y1:W,x2:c,y2:W,style:{stroke:"hsl(var(--radar-grid, var(--border)) / 0.36)"}})]},O)}),jsx("line",{x1:S,y1:0,x2:S,y2:d,strokeWidth:"1.5",style:{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.64)"}}),jsx("line",{x1:0,y1:T,x2:c,y2:T,strokeWidth:"1.5",style:{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.64)"}})]}),a.map(N=>{let O=_v[N.id];return jsxs("g",{"aria-hidden":"true",children:[jsx("text",{x:O.x,y:O.y+20,textAnchor:O.anchor,className:"fill-muted-foreground text-[0.8125rem] font-semibold",children:N.title}),z(N.description)&&typeof N.description=="string"?jsx("text",{x:O.x,y:O.y+40,textAnchor:O.anchor,className:"fill-muted-foreground text-[0.6875rem]",children:N.description}):null]},N.id)}),b.map((N,O)=>{let V=tn(en(N.x,h,40,c-40),40,c-40),W=tn(en(N.y,y,d-48,54),54,d-48),F=N.tone||(O%2===0?"primary":"accent"),H=i===N.id,I=E.has(N.id),G=I?tn(en(N.size??1,v,5,9),5,9):3.5,q=I?tn(en(N.size??1,v,14,31),14,31):0,R={fill:hn(F),stroke:"hsl(var(--foreground) / 0.74)"},D={fill:hn(F),filter:`drop-shadow(0 0 0.65rem ${$r(F,.72)})`};return jsxs("g",{transform:`translate(${V}, ${W})`,role:m?"button":void 0,tabIndex:m?0:void 0,"aria-label":`${N.label}: ${t.label} ${N.x}, ${o.label} ${N.y}`,"aria-pressed":m?H:void 0,onClick:m?()=>m(N):void 0,onKeyDown:M=>Gv(M,N,m),className:l(m&&"cursor-pointer outline-hidden"),children:[H?jsx("circle",{r:G+10,fill:"none",strokeWidth:"2",style:{stroke:$r(F,.48)}}):null,jsx("circle",{r:G,strokeWidth:"1.25",style:R}),I?jsx("text",{y:-G-8,textAnchor:"middle",fontSize:q,fontWeight:"700",style:D,className:"pointer-events-none",children:N.label.slice(0,22)}):null,jsx("title",{children:N.description||N.label})]},N.id)}),jsx("circle",{cx:S,cy:T,r:"10",style:{fill:"hsl(var(--radar-axis, var(--primary)))"}}),jsx("circle",{cx:S,cy:T,r:"3",className:"fill-primary-foreground"}),jsx("text",{x:c/2,y:d-12,textAnchor:"middle",className:"fill-muted-foreground text-[0.6875rem]",children:t.label}),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})]}),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:[jsxs("div",{className:"flex h-9 items-center justify-between border-b border-border px-3 text-xs font-semibold text-muted-foreground",children:[jsx("span",{children:"\u2212"}),jsx("span",{children:"100%"}),jsx("span",{children:"\uFF0B"})]}),jsxs("svg",{viewBox:`0 0 ${c} ${d}`,className:"h-24 w-full",children:[jsx("rect",{width:c,height:d,style:{fill:"hsl(var(--radar-canvas, var(--background)))"}}),jsx("line",{x1:S,y1:0,x2:S,y2:d,style:{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.7)"},strokeWidth:"6"}),jsx("line",{x1:0,y1:T,x2:c,y2:T,style:{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.7)"},strokeWidth:"6"}),b.map((N,O)=>jsx("circle",{cx:tn(en(N.x,h,40,c-40),40,c-40),cy:tn(en(N.y,y,d-48,54),54,d-48),r:"8",style:{fill:hn(N.tone||(O%2===0?"primary":"accent"))}},N.id)),jsx("rect",{x:c*.22,y:d*.12,width:c*.58,height:d*.62,fill:"none",strokeWidth:"8",style:{stroke:"hsl(var(--primary))"}})]})]}),s.length?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:s.map(N=>{let O=N.tone||"muted";return jsxs("span",{className:"flex items-center gap-2 text-muted-foreground",children:[jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:hn(O)}}),N.label]},N.id)})}):null]})}r(jv,"WorkbenchRadarMatrix");var Yu=2048,pl=2*1024*1024,gl=class gl extends Error{constructor(o,n,a){super(o);this.code=o;this.expectedSequence=n;this.receivedSequence=a;this.name="RuntimeTerminalOutputError";}};r(gl,"RuntimeTerminalOutputError");var Kr=gl;function Xu(e,t){let o=r((u,p)=>{throw new Kr(u,e.highWater+1,p)},"fail");if(!Array.isArray(t))return o("invalid-frame");if(t.length>Yu)return o("output-budget-exceeded");let n=new Map(e.frames.map(u=>[u.sequence,u])),a=[],s=e.highWater,i,m=0;for(let u of t){if(!u||!Number.isSafeInteger(u.sequence)||u.sequence<1||typeof u.data!="string")return o("invalid-frame");if(i!==void 0&&u.sequence===i)return o("duplicate-sequence",u.sequence);if(i!==void 0&&u.sequence!==i+1)return o("sequence-gap",u.sequence);if(i=u.sequence,u.data.length>pl)return o("output-budget-exceeded",u.sequence);let p=new TextEncoder().encode(u.data).byteLength;if(m+=p,m>pl)return o("output-budget-exceeded",u.sequence);if(u.sequence<=s){let f=n.get(u.sequence);if(!f)return o("history-expired",u.sequence);if(f.data!==u.data)return o("sequence-conflict",u.sequence)}else {if(u.sequence!==s+1)return o("sequence-gap",u.sequence);s=u.sequence,a.push({sequence:u.sequence,data:u.data,bytes:p});}}let c=[...e.frames,...a],d=e.bytes+a.reduce((u,p)=>u+p.bytes,0),g=0;for(;c.length-g>Yu||d>pl;)d-=c[g++].bytes;return {history:{highWater:s,bytes:d,frames:c.slice(g)},append:a.map(({sequence:u,data:p})=>({sequence:u,data:p}))}}r(Xu,"prepareRuntimeTerminalOutput");function Kv(e){let t=useRef(null),o=useRef(e);o.current=e;let n=useRef();return useEffect(()=>{let a=e.sessionKey,s=t.current;if(!s||!a)return;let i=true,m,c,d=[],g=false,u=r(()=>{g||(g=true,c?.disconnect(),d.forEach(h=>h.dispose()),m?.dispose());},"cleanup"),p={highWater:0,bytes:0,frames:[]},f=r(()=>i&&o.current.sessionKey===a,"current"),b=r(h=>{if(!f())return;let y=h instanceof Kr?h:new Kr("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:h},{FitAddon:y},{WebLinksAddon:v}])=>{if(!f())return;let k=r((T,E)=>{let N=Zt(E,"link");f()&&N&&/^https?:\/\//i.test(N)&&window.open(N,"_blank","noopener,noreferrer");},"openLink"),x=new h({linkHandler:{activate:k},cursorBlink:true,disableStdin:o.current.disabled===true,fontSize:13,fontFamily:'"JetBrains Mono", Menlo, Monaco, "Courier New", monospace'});m=x;let w=new y;x.loadAddon(w),x.loadAddon(new v(k)),x.open(s);let C=r(()=>{if(!f())return;w.fit();let T=w.proposeDimensions();T&&Number.isInteger(T.cols)&&Number.isInteger(T.rows)&&T.cols>0&&T.rows>0&&o.current.onResize?.({sessionKey:a,columns:T.cols,rows:T.rows});},"resize");d.push(x.onData(T=>{f()&&!o.current.disabled&&o.current.onInput?.({sessionKey:a,data:T});}));let S=r(T=>{if(f())try{let E=Xu(p,T);E.append.length&&x.write(E.append.map(N=>N.data).join("")),p=E.history;}catch(E){b(E);}},"write");n.current={sessionKey:a,terminal:x,write:S},C(),typeof ResizeObserver<"u"&&(c=new ResizeObserver(C),c.observe(s)),S(o.current.output);}).catch(h=>{u(),m&&n.current?.terminal===m&&(n.current=void 0),b(h);}),()=>{i=false,u(),m&&n.current?.terminal===m&&(n.current=void 0);}},[e.sessionKey]),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]),jsxs("div",{className:e.className,style:e.style,children:[jsx("div",{role:"status",children:e.statusLabel}),jsx("div",{ref:t,className:"h-full min-h-48 w-full rounded-2xl"})]})}r(Kv,"RuntimeTerminalView");var qv={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 Zu(e){let{locale:t}=xt();return (o,n)=>{let a=`monkeys.design.runtimeFiles.${o}`,s=e?.(a);return (s&&s!==a?s:qv[o][t.toLowerCase().startsWith("zh")?"zh":"en"]).replace(/\{([A-Za-z]+)\}/g,(m,c)=>n?.[c]??m)}}r(Zu,"useRuntimeFileCopy");var qr=r(e=>new TextEncoder().encode(e).byteLength,"bytes"),Ti=r(e=>({...e,value:e.content}),"fromFile");function tk(e){return jsx(ok,{...e},JSON.stringify([e.model.scopeId]))}r(tk,"RuntimeFileExplorer");function ok(e){let{model:t,onIntent:o,renderEditor:n,renderPreview:a,renderDiff:s,onDraftStateChange:i,translate:m}=e,{locale:c}=xt(),d=Zu(m);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=useRef(true);useEffect(()=>(g.current=true,()=>{g.current=false;}),[]);let[u,p]=useState(false),[f,b]=useState(t.search??""),[h,y]=useState(false);useEffect(()=>b(t.search??""),[t.search]),useEffect(()=>{if(typeof window.matchMedia!="function")return;let A=window.matchMedia("(max-width: 767px)"),X=r(()=>p(A.matches),"update");return X(),A.addEventListener("change",X),()=>A.removeEventListener("change",X)},[]);let[v,k]=useState(()=>t.openFile?Ti(t.openFile):null),[x,w]=useState(null),[C,S]=useState(false),[T,E]=useState(""),[N,O]=useState(null),[V,W]=useState(""),[F,H]=useState("file"),I=useRef(null),G=useRef(null),q=v!==null&&v.value!==v.content,R=Number.isSafeInteger(t.maxTextBytes)&&t.maxTextBytes>0?Math.min(t.maxTextBytes,1024*1024):1024*1024,D=v!==null&&qr(v.value)>R,M=t.disabled===true||t.saving===true,$=v?.readOnly===true||t.openFile?.path===v?.path&&t.openFile?.readOnly===true,J=useRef({blocked:M,draft:v,readOnly:$,conflict:C,tooLarge:D});J.current={blocked:M,draft:v,readOnly:$,conflict:C,tooLarge:D};let _=t.preview?.path,ee=t.activeView==="diff",K=t.diff?.path??v?.path??t.selectedPath??"";useEffect(()=>{if(ee||t.preview){let ie=ee?`diff:${K}`:_;if(q&&G.current!==ie){S(true);return}v&&k(null),I.current=null,G.current=null,S(false);return}let A=t.openFile;if(!A){q?S(true):(k(null),S(false));return}if(!v||A.path!==v.path){if(q&&G.current!==A.path){S(true);return}G.current=null,I.current=null,k(Ti(A)),S(false);return}if(A.revision===v.revision&&A.content===v.content)return;let X=I.current;if(X&&X.path===A.path&&A.revision!==X.revision&&A.content===X.content){k({...A,value:v.value}),I.current=null,S(false);return}if(q){S(true);return}k(Ti(A)),S(false);},[t.openFile?.path,t.openFile?.revision,t.openFile?.content,t.preview,ee,t.diff?.identity]),useEffect(()=>{if(!q)return;let A=r(X=>{X.preventDefault(),X.returnValue="";},"beforeUnload");return window.addEventListener("beforeunload",A),()=>window.removeEventListener("beforeunload",A)},[q]);let Z=useRef(i);Z.current=i,useEffect(()=>{Z.current?.({path:v?.path??null,revision:v?.revision??null,dirty:q});},[v?.path,v?.revision,q]);let re=r(A=>{if(g.current){switch(A.type){case "select":if(e.onSelect)return e.onSelect(A);break;case "expand":if(e.onExpand)return e.onExpand(A);break;case "view-mode":if(e.onViewMode)return e.onViewMode(A);break;case "search":if(e.onSearch)return e.onSearch(A);break;case "edit":if(e.onEdit)return e.onEdit(A);break;case "save":if(e.onSave)return e.onSave(A);break;case "create":if(e.onCreate)return e.onCreate(A);break;case "rename":if(e.onRename)return e.onRename(A);break;case "delete":if(e.onDelete)return e.onDelete(A);break;case "download":if(e.onDownload)return e.onDownload(A);break;case "open-diff":if(e.onOpenDiff)return e.onOpenDiff(A);break;case "refresh":if(e.onRefresh)return e.onRefresh(A);break;case "sourcecontrol":if(e.onSourceControl)return e.onSourceControl(A);break}o?.(A);}},"route"),ae=r(A=>{if(!(M||!g.current)){if(A.type==="delete"||q&&(A.type==="sourcecontrol"||A.type==="open-diff"||A.type==="select"&&A.path!==v?.path)){w(A);return}re(A);}},"send"),le=r(A=>{!g.current||J.current.draft!==v||!v||M||J.current.blocked||J.current.readOnly||J.current.conflict||$||C||qr(A)>R||(k({...v,value:A}),re({type:"edit",path:v.path,expectedRevision:v.revision,content:A}));},"change"),L=r(()=>{!g.current||J.current.draft!==v||!v||M||J.current.blocked||J.current.readOnly||J.current.conflict||J.current.tooLarge||$||C||D||!q||(I.current={path:v.path,revision:v.revision,content:v.value},re({type:"save",path:v.path,expectedRevision:v.revision,content:v.value}));},"save"),me=t.viewMode==="detailed"&&u?"compact":t.viewMode??"simple",B=new Set(t.expandedPaths??(()=>{let A=[],X=r(ie=>{for(let Y of ie)Y.expanded&&A.push(Y.path),Y.children&&X(Y.children);},"visit");return X(t.nodes),A})()),j=(t.search??"").trim().toLocaleLowerCase(c),ne=r(A=>A.flatMap(X=>{let ie=X.children?ne(X.children):void 0;return !j||X.name.toLocaleLowerCase(c).includes(j)||X.path.toLocaleLowerCase(c).includes(j)||ie?.length?[{...X,children:ie}]:[]}),"filterTree"),fe=ne(t.nodes),ye=r(A=>{let X=new Set(B);if(X.has(A.path)?X.delete(A.path):X.add(A.path),X.size>1e4||qr(JSON.stringify([...X]))>1024*1024){y(true);return}y(false),ae({type:"expand",path:A.path,expandedPaths:[...X]});},"toggle"),xe=r(A=>jsxs(Fragment,{children:[jsx("span",{children:Number.isSafeInteger(A.size)&&A.size>=0?new Intl.NumberFormat(c).format(A.size):"\u2014"}),jsx("span",{children:A.modified?Ci(A.modified,"milliseconds",c):"\u2014"}),jsx("span",{children:A.permissionsRwx??"\u2014"}),jsx("span",{children:A.mimeType??"\u2014"})]}),"metadata"),te=r(A=>jsx("ul",{className:"space-y-1",children:A.map(X=>jsxs("li",{children:[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:[jsxs(ve,{className:"min-w-0 flex-1 justify-start truncate border-transparent",classNames:{label:"min-w-0 truncate"},icon:X.type==="directory"?B.has(X.path)?jsx(ChevronDown,{size:14}):jsx(ChevronRight,{size:14}):jsx(FileText,{size:14}),tone:t.selectedPath===X.path?"primary":"muted",size:"sm",type:"button",disabled:M||X.loading,"aria-current":t.selectedPath===X.path?"true":void 0,"aria-expanded":X.type==="directory"?B.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"?jsx("span",{className:"text-xs text-muted-foreground",children:X.mimeType??""}):null,jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[jsx(ve,{size:"sm",tone:"muted","aria-label":d("renameItem",{name:X.name}),disabled:M||q,onClick:()=>{W(X.path),E(X.path),O("rename");},children:jsx(Pencil,{size:12})}),jsx(ve,{size:"sm",tone:"muted","aria-label":d("downloadItem",{name:X.name}),disabled:M,onClick:()=>ae({type:"download",path:X.path,kind:X.type}),children:jsx(Download,{size:12})}),jsx(ve,{size:"sm",tone:"muted","aria-label":d("deleteItem",{name:X.name}),disabled:M||$,onClick:()=>ae({type:"delete",path:X.path,kind:X.type}),children:jsx(Trash2,{size:12})})]})]}),(B.has(X.path)||j)&&X.children?jsx("div",{className:"ml-3 border-l border-border pl-2",children:te(X.children)}):null]},X.path))}),"tree"),se=v?.path??t.preview?.path??t.openFile?.path,Re=ee&&!v,Ie=!v&&!Re?t.preview:null,ze=t.diff,ce=ze?qr(ze.original)>1024*1024||qr(ze.modified)>1024*1024:false,U=r(()=>Re?t.diffStatus==="loading"?jsx("p",{role:"status",children:d("loadingDiff")}):t.diffStatus==="error"?jsx("p",{role:"alert",children:d(t.diffErrorCode==="declarative.runtimeFiles.diffTooLarge"?"diffTooLarge":"diffUnavailable")}):ce?jsx("p",{role:"status",children:d("diffTooLarge")}):!ze||ze.isBinary||!s?jsx("p",{role:"status",children:d("diffUnavailable")}):s({...ze,readOnly:true}):Ie?Ie.kind==="binary"?jsx("p",{role:"status",children:d("binaryUnavailable")}):Ie.kind==="too-large"?jsx("p",{role:"status",children:d("tooLarge")}):Ie.kind==="image"?a?a(Ie):jsx(Od,{kind:"image",src:Ie.src,alt:Ie.alt??Ie.path,empty:d("imageUnavailable"),error:d("imageUnavailable")}):null:D?jsx("div",{role:"status",children:d("tooLarge")}):v?n?n({path:v.path,value:v.value,language:v.language,readOnly:M||$||C,onChange:le,onSave:L}):jsx(yr,{"aria-label":v.path,value:v.value,readOnly:M||$||C,onChange:A=>le(A.currentTarget.value),onKeyDown:A=>{(A.ctrlKey||A.metaKey)&&A.key.toLowerCase()==="s"&&(A.preventDefault(),L());}}):jsx("div",{className:"flex min-h-64 items-center justify-center p-6 text-sm text-muted-foreground",children:d("empty")}),"renderContent");return 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:[jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b border-border p-3",children:[t.viewMode!==void 0?jsxs(uo,{"aria-label":d("viewMode"),value:t.viewMode,disabled:M,onChange:A=>{let X=A.currentTarget.value;(X==="simple"||X==="compact"||X==="detailed")&&ae({type:"view-mode",value:X});},children:[jsx("option",{value:"simple",children:d("simple")}),jsx("option",{value:"compact",children:d("compact")}),jsx("option",{value:"detailed",children:d("detailed")})]}):null,t.search!==void 0?jsxs("form",{className:"flex min-w-0 flex-1 items-center gap-2",onSubmit:A=>{A.preventDefault(),ae({type:"search",value:f});},children:[jsx(Qt,{className:"min-w-0 flex-1","aria-label":d("searchFiles"),value:f,disabled:M,onChange:A=>b(A.currentTarget.value)}),jsx(ve,{type:"submit",disabled:M,children:d("search")})]}):null]}),h?jsx("p",{className:"p-3 text-sm text-destructive-text",role:"alert",children:d("tooManyExpanded")}):null,t.errorCode?jsx("p",{className:"p-3 text-sm text-destructive-text",role:"alert",children:d("operationFailed")}):null,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:[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"?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(A=>jsx("span",{children:d(A)},A))}):null,fe.length?te(fe):jsx("p",{className:"p-3 text-sm text-muted-foreground",children:d("emptyTree")})]}),jsxs("div",{className:"flex min-h-0 min-w-0 flex-col",children:[jsxs("div",{className:"flex flex-wrap items-center gap-1 border-b border-border p-2",role:"toolbar","aria-label":d("actions"),children:[jsx(ve,{disabled:M,onClick:()=>ae({type:"refresh"}),children:d("refresh")}),jsx(ve,{disabled:M,onClick:()=>ae({type:"sourcecontrol"}),children:d("sourceControl")}),jsx(ve,{disabled:M,onClick:()=>{O("create"),E("");},children:d("create")}),jsx(ve,{disabled:M||!v||$||q,onClick:()=>{W(v?.path??""),O("rename"),E(v?.path??"");},children:d("rename")}),jsx(ve,{disabled:M||!v||$,onClick:()=>v&&ae({type:"delete",path:v.path,kind:"file"}),children:d("delete")}),jsx(ve,{disabled:M||!se,onClick:()=>se&&ae({type:"download",path:se,kind:"file"}),children:d("download")}),jsx(ve,{disabled:M||!se,onClick:()=>se&&ae({type:"open-diff",path:se}),children:d("diff")}),jsx(ve,{disabled:M||!q||!v||$||C||D,onClick:L,children:d("save")})]}),N?jsxs("form",{className:"flex flex-wrap items-center gap-2 border-b border-border p-3",onSubmit:async A=>{if(A.preventDefault(),!(M||!T.trim()||N==="rename"&&($||q)))try{N==="rename"?await re({type:"rename",path:V,newPath:T.trim()}):await re({type:"create",path:T.trim(),kind:F}),O(null);}catch{}},children:[N==="create"?jsxs(uo,{"aria-label":d("kind"),value:F,disabled:M,onChange:A=>H(A.currentTarget.value==="directory"?"directory":"file"),children:[jsx("option",{value:"file",children:d("file")}),jsx("option",{value:"directory",children:d("directory")})]}):null,jsx(Qt,{"aria-label":d("path"),value:T,disabled:M,onChange:A=>E(A.currentTarget.value)}),jsx(ve,{type:"submit",disabled:M||!T.trim(),children:d("apply")}),jsx(ve,{type:"button",onClick:()=>O(null),children:d("cancel")})]}):null,C?jsxs("div",{role:"alert",children:[d("changedExternally"),jsx(ve,{disabled:M,onClick:()=>w(ee?{type:"open-diff",path:K}:{type:"select",path:t.preview?.path??t.openFile?.path??v?.path??""}),children:d("discardReload")})]}):null,jsx("div",{className:"min-h-80 min-w-0 flex-1 overflow-auto",children:U()})]})]}),x?jsx(ba,{open:true,onOpenChange:A=>{!A&&!M&&w(null);},children:jsxs(ln,{onEscapeKeyDown:A=>{M&&A.preventDefault();},onPointerDownOutside:A=>{M&&A.preventDefault();},children:[jsx(ir,{children:d("confirmAction")}),t.errorCode?jsx("p",{role:"alert",children:d("operationFailed")}):null,jsx(sr,{children:d(x.type==="delete"?"deleteConfirm":"discardConfirm")}),jsx(ve,{disabled:M||x.type==="delete"&&$,onClick:async()=>{if(!(M||x.type==="delete"&&$)){x.type==="open-diff"&&(G.current=`diff:${x.path}`,ee&&x.path===K&&(k(null),S(false),G.current=null)),x.type==="select"&&(G.current=x.path,t.preview?.path===x.path?(k(null),S(false),G.current=null):t.openFile?.path===x.path&&(k(Ti(t.openFile)),S(false),G.current=null));try{await re(x),w(null);}catch{}}},children:d("confirm")}),jsx(ve,{disabled:M,onClick:()=>w(null),children:d("cancel")})]})}):null]})}r(ok,"RuntimeFileExplorerSession");var P=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"})})}),Ri=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.",[P.ontologyManagement.markerDescription]:"Configure the ontology marker and default views.",[P.ontologyManagement.label]:"Marker name",[P.ontologyManagement.targetOntology]:"Target ontology",[P.ontologyManagement.templateKey]:"Template key",[P.ontologyManagement.templateName]:"View name",[P.ontologyManagement.templateDescription]:"View description",[P.ontologyManagement.templateTags]:"Tag filters",[P.ontologyManagement.templateTagsDescription]:"Choose the tags included, matched, or excluded by this view.",[P.ontologyManagement.creatorCurrentUser]:"Only show records created by the current user",[P.ontologyManagement.creatorCurrentUserShort]:"Current user",[P.ontologyManagement.defaultViewTemplatesDescription]:"Configure default views and their filters for this ontology.",[P.ontologyManagement.defaultViewTemplate]:"Default view template",[P.ontologyManagement.defaultSelectedView]:"Open by default",[P.ontologyManagement.tagFilterEnabled]:"Tag filters configured",[P.ontologyManagement.tagFilterEmpty]:"No tag filters",[P.ontologyManagement.tableColumnsSummary]:"{count} table columns configured",[P.ontologyManagement.editTemplateDetails]:"Edit view template",[P.ontologyManagement.editTemplateDetailsDescription]:"Configure the name, order, and filters.",[P.ontologyManagement.defaultViewTemplates]:"Default view templates",[P.ontologyManagement.markerExists]:"Ontology marker exists",[P.ontologyManagement.filterInclude]:"Include all",[P.ontologyManagement.filterAny]:"Match any",[P.ontologyManagement.filterExclude]:"Exclude",[P.ontologyManagement.filterNoTags]:"No matching tags",[P.ontologyManagement.filterSearch]:"Search tags",[P.ontologyManagement.filterTagGroup]:"Tag group",[P.ontologyManagement.filterAllGroups]:"All tag groups",[P.ontologyManagement.filterAddOrGroup]:"Add OR group",[P.ontologyManagement.filterNoOrGroups]:"No OR groups",[P.ontologyManagement.filterOrGroup]:"OR group {n}",[P.ontologyManagement.filterDeleteGroup]:"Delete group",[P.ontologyManagement.filterSupplement]:"Supplement rules for {name}",[P.ontologyManagement.filterConfigureSupplement]:"Configure supplement rules",[P.ontologyManagement.filterClearSupplement]:"Clear supplement rules",[P.ontologyManagement.filterSupplementMode]:"Match mode",[P.ontologyManagement.filterModeOr]:"Any condition (OR)",[P.ontologyManagement.filterModeAnd]:"All conditions (AND)",[P.ontologyManagement.filterModeCombination]:"Combined conditions",[P.ontologyManagement.filterRequiredAll]:"Require all tags",[P.ontologyManagement.filterRequiredAny]:"Require at least one tag",[P.ontologyManagement.filterAdvancedRules]:"{count} advanced rules",[P.ontologyManagement.filterAdvancedRulesDescription]:"Existing rules are preserved unless explicitly removed.",[P.ontologyManagement.filterRemoveAdvancedRules]:"Remove advanced rules",[P.ontologyManagement.deleteTemplate]:"Delete template",[P.ontologyManagement.deleteMarker]:"Delete marker",[P.ontologyManagement.createDefaultViews]:"Create default views",[P.ontologyManagement.addTemplate]:"Add view template",[P.ontologyManagement.noTemplates]:"No default view templates",[P.ontologyManagement.actions["ontology-marker"]]:"Set ontology marker",[P.ontologyManagement.actions["view-detail"]]:"View details",[P.ontologyManagement.actions["view-convert-to-container"]]:"Convert to enhanced view",[P.ontologyManagement.actions["view-edit-team"]]:"Edit view team",[P.ontologyManagement.actions["view-insert-blank-rows"]]:"Insert blank rows",[P.ontologyManagement.actions["view-snapshot"]]:"Import to new Ontology",[P.ontologyManagement.targetTeamId]:"Target team ID",[P.ontologyManagement.currentTeamId]:"Current team ID",[P.ontologyManagement.count]:"Row count",[P.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",[P.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.",[P.numericSeries.noPoints]:"No observations in this range",[P.numericSeries.point]:"{xLabel} {x}, {yLabel} {y}",[P.numericSeries.label]:"Numeric series",[P.numericSeries.description]:"Inspect numeric observations with range zoom and expansion.",[P.numericSeries.start]:"Range start",[P.numericSeries.end]:"Range end",[P.numericSeries.reset]:"Reset range",[P.numericSeries.expand]:"Expand chart",[P.numericSeries.close]:"Close chart",[P.shellLayout.resizeSidebar]:"Resize sidebar",[P.shellLayout.collapseSidebar]:"Collapse sidebar",[P.shellLayout.expandSidebar]:"Expand sidebar",[P.shellLayout.resizeAside]:"Resize detail panel",[P.ontologyNavigator.moreActions]:"More actions",[P.dataToolbar.addRow]:"Add row",[P.dataToolbar.blankRowName]:"Blank Row",[P.ontologyTrendMatrix.label]:"Ontology trend matrix",[P.ontologyTrendMatrix.row]:"Row",[P.ontologyTrendMatrix.window]:"Visible rows {start}-{end} of {total}",[P.ontologyTrendMatrix.select]:"Select {row}, {column}, {value}",[P.dataContextBar.label]:"Data filters and drilldown context",[P.dataContextBar.filter]:"Filters",[P.dataContextBar.searchLabel]:"Search data",[P.dataContextBar.searchPlaceholder]:"Search",[P.dataContextBar.clear]:"Clear",[P.dataContextBar.clearAll]:"Clear all",[P.dataContextBar.tagFilterClear]:"Clear",[P.dataContextBar.filterDescription]:"Filter assets by selecting tags via tag panel or manual search.",[P.dataContextBar.tagScope]:"Tag scope",[P.dataContextBar.currentViewTags]:"Current view",[P.dataContextBar.allTags]:"All tags",[P.dataContextBar.panelFilter]:"Panel filter",[P.dataContextBar.searchTags]:"Search tags",[P.dataContextBar.noAvailableTags]:"No available tags",[P.dataContextBar.loadedAll]:"All loaded",[P.dataContextBar.refreshTags]:"Refresh tags",[P.dataContextBar.confirm]:"Confirm",[P.dataContextBar.tagPanel]:"Tag panel",[P.dataContextBar.selectPanel]:"Select a panel",[P.dataContextBar.noPanels]:"No available panels",[P.dataContextBar.noPanelGroups]:"No tag groups in this panel",[P.dataContextBar.singleSelect]:"Single select",[P.dataContextBar.multiSelect]:"Multi select",[P.dataContextBar.defaultGroup]:"Default group",[P.dataContextBar.more]:"+{count} more",[P.dataContextBar.dashboardContext]:"Dashboard context",[P.dataContextBar.contextCount]:"{count} context values",[P.dataContextBar.fields.search]:"Search",[P.dataContextBar.fields.tagIds]:"Tags",[P.dataContextBar.fields.tagGroupIds]:"Tag groups",[P.dataContextBar.fields.timeFrom]:"From",[P.dataContextBar.fields.timeTo]:"To",[P.dataContextBar.fields.clickedField]:"Drilldown field",[P.dataContextBar.fields.clickedValue]:"Drilldown value",[P.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",[P.ontologyManagement.markerDescription]:"\u914D\u7F6E\u4ED3\u5E93\u6807\u8BB0\u548C\u9ED8\u8BA4\u89C6\u56FE\u3002",[P.ontologyManagement.label]:"\u6807\u8BB0\u540D\u79F0",[P.ontologyManagement.targetOntology]:"\u76EE\u6807\u4ED3\u5E93",[P.ontologyManagement.templateKey]:"\u6A21\u677F\u6807\u8BC6",[P.ontologyManagement.templateName]:"\u89C6\u56FE\u540D\u79F0",[P.ontologyManagement.templateDescription]:"\u89C6\u56FE\u63CF\u8FF0",[P.ontologyManagement.templateTags]:"\u6807\u7B7E\u7B5B\u9009",[P.ontologyManagement.templateTagsDescription]:"\u8BBE\u7F6E\u8BE5\u89C6\u56FE\u5305\u542B\u3001\u5339\u914D\u6216\u6392\u9664\u7684\u6807\u7B7E\u3002",[P.ontologyManagement.creatorCurrentUser]:"\u4EC5\u663E\u793A\u5F53\u524D\u7528\u6237\u521B\u5EFA\u7684\u6570\u636E",[P.ontologyManagement.creatorCurrentUserShort]:"\u5F53\u524D\u7528\u6237",[P.ontologyManagement.defaultViewTemplatesDescription]:"\u4E3A\u4ED3\u5E93\u914D\u7F6E\u9ED8\u8BA4\u89C6\u56FE\u53CA\u5176\u7B5B\u9009\u6761\u4EF6\u3002",[P.ontologyManagement.defaultViewTemplate]:"\u9ED8\u8BA4\u89C6\u56FE\u6A21\u677F",[P.ontologyManagement.defaultSelectedView]:"\u9ED8\u8BA4\u6253\u5F00",[P.ontologyManagement.tagFilterEnabled]:"\u5DF2\u914D\u7F6E\u6807\u7B7E\u7B5B\u9009",[P.ontologyManagement.tagFilterEmpty]:"\u672A\u914D\u7F6E\u6807\u7B7E\u7B5B\u9009",[P.ontologyManagement.tableColumnsSummary]:"\u5DF2\u914D\u7F6E {count} \u4E2A\u8868\u683C\u5217",[P.ontologyManagement.editTemplateDetails]:"\u7F16\u8F91\u89C6\u56FE\u6A21\u677F",[P.ontologyManagement.editTemplateDetailsDescription]:"\u914D\u7F6E\u540D\u79F0\u3001\u6392\u5E8F\u548C\u7B5B\u9009\u6761\u4EF6\u3002",[P.ontologyManagement.defaultViewTemplates]:"\u9ED8\u8BA4\u89C6\u56FE\u6A21\u677F",[P.ontologyManagement.markerExists]:"\u5DF2\u6709\u4ED3\u5E93\u6807\u8BB0",[P.ontologyManagement.filterInclude]:"\u5168\u90E8\u5305\u542B",[P.ontologyManagement.filterAny]:"\u5339\u914D\u4EFB\u610F",[P.ontologyManagement.filterExclude]:"\u6392\u9664",[P.ontologyManagement.filterNoTags]:"\u6CA1\u6709\u5339\u914D\u7684\u6807\u7B7E",[P.ontologyManagement.filterSearch]:"\u641C\u7D22\u6807\u7B7E",[P.ontologyManagement.filterTagGroup]:"\u6807\u7B7E\u7EC4",[P.ontologyManagement.filterAllGroups]:"\u5168\u90E8\u6807\u7B7E\u7EC4",[P.ontologyManagement.filterAddOrGroup]:"\u6DFB\u52A0\u6216\u6761\u4EF6\u7EC4",[P.ontologyManagement.filterNoOrGroups]:"\u6682\u65E0\u6216\u6761\u4EF6\u7EC4",[P.ontologyManagement.filterOrGroup]:"\u6216\u6761\u4EF6\u7EC4 {n}",[P.ontologyManagement.filterDeleteGroup]:"\u5220\u9664\u6761\u4EF6\u7EC4",[P.ontologyManagement.filterSupplement]:"{name} \u7684\u8865\u5145\u89C4\u5219",[P.ontologyManagement.filterConfigureSupplement]:"\u914D\u7F6E\u8865\u5145\u89C4\u5219",[P.ontologyManagement.filterClearSupplement]:"\u6E05\u9664\u8865\u5145\u89C4\u5219",[P.ontologyManagement.filterSupplementMode]:"\u5339\u914D\u65B9\u5F0F",[P.ontologyManagement.filterModeOr]:"\u4EFB\u610F\u6761\u4EF6\uFF08OR\uFF09",[P.ontologyManagement.filterModeAnd]:"\u5168\u90E8\u6761\u4EF6\uFF08AND\uFF09",[P.ontologyManagement.filterModeCombination]:"\u7EC4\u5408\u6761\u4EF6",[P.ontologyManagement.filterRequiredAll]:"\u5FC5\u987B\u5305\u542B\u5168\u90E8\u6807\u7B7E",[P.ontologyManagement.filterRequiredAny]:"\u81F3\u5C11\u5305\u542B\u4E00\u4E2A\u6807\u7B7E",[P.ontologyManagement.filterAdvancedRules]:"{count} \u9879\u9AD8\u7EA7\u89C4\u5219",[P.ontologyManagement.filterAdvancedRulesDescription]:"\u5DF2\u6709\u89C4\u5219\u5C06\u4FDD\u7559\uFF0C\u9664\u975E\u660E\u786E\u79FB\u9664\u3002",[P.ontologyManagement.filterRemoveAdvancedRules]:"\u79FB\u9664\u9AD8\u7EA7\u89C4\u5219",[P.ontologyManagement.deleteTemplate]:"\u5220\u9664\u6A21\u677F",[P.ontologyManagement.deleteMarker]:"\u5220\u9664\u4ED3\u5E93\u6807\u8BB0",[P.ontologyManagement.createDefaultViews]:"\u521B\u5EFA\u9ED8\u8BA4\u89C6\u56FE",[P.ontologyManagement.addTemplate]:"\u6DFB\u52A0\u89C6\u56FE\u6A21\u677F",[P.ontologyManagement.noTemplates]:"\u6682\u65E0\u9ED8\u8BA4\u89C6\u56FE\u6A21\u677F",[P.ontologyManagement.actions["ontology-marker"]]:"\u8BBE\u7F6E\u4ED3\u5E93\u6807\u8BB0",[P.ontologyManagement.actions["view-detail"]]:"\u67E5\u770B\u8BE6\u60C5",[P.ontologyManagement.actions["view-convert-to-container"]]:"\u8F6C\u5316\u4E3A\u589E\u5F3A\u89C6\u56FE",[P.ontologyManagement.actions["view-edit-team"]]:"\u4FEE\u6539\u89C6\u56FE\u56E2\u961F",[P.ontologyManagement.actions["view-insert-blank-rows"]]:"\u63D2\u5165\u7A7A\u767D\u884C",[P.ontologyManagement.actions["view-snapshot"]]:"\u5BFC\u5165\u5230\u65B0 Ontology",[P.ontologyManagement.targetTeamId]:"\u76EE\u6807\u56E2\u961F ID",[P.ontologyManagement.currentTeamId]:"\u5F53\u524D\u56E2\u961F ID",[P.ontologyManagement.count]:"\u884C\u6570",[P.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",[P.numericSeries.inspect]:"\u67E5\u770B\u89C2\u6D4B\u70B9",[P.numericSeries.noPoints]:"\u6B64\u8303\u56F4\u5185\u6CA1\u6709\u89C2\u6D4B\u70B9",[P.numericSeries.point]:"{xLabel} {x}, {yLabel} {y}",[P.numericSeries.label]:"\u6570\u503C\u5E8F\u5217",[P.numericSeries.description]:"\u67E5\u770B\u6570\u503C\u89C2\u6D4B\uFF0C\u7F29\u653E\u8303\u56F4\u5E76\u653E\u5927\u56FE\u8868\u3002",[P.numericSeries.start]:"\u8303\u56F4\u8D77\u70B9",[P.numericSeries.end]:"\u8303\u56F4\u7EC8\u70B9",[P.numericSeries.reset]:"\u91CD\u7F6E\u8303\u56F4",[P.numericSeries.expand]:"\u653E\u5927\u56FE\u8868",[P.numericSeries.close]:"\u5173\u95ED\u56FE\u8868",[P.shellLayout.resizeSidebar]:"\u8C03\u6574\u4FA7\u8FB9\u680F\u5BBD\u5EA6",[P.shellLayout.collapseSidebar]:"\u6536\u8D77\u4FA7\u8FB9\u680F",[P.shellLayout.expandSidebar]:"\u5C55\u5F00\u4FA7\u8FB9\u680F",[P.shellLayout.resizeAside]:"\u8C03\u6574\u8BE6\u60C5\u4FA7\u8FB9\u680F\u5BBD\u5EA6",[P.ontologyNavigator.moreActions]:"\u66F4\u591A\u64CD\u4F5C",[P.dataToolbar.addRow]:"\u6DFB\u52A0\u4E00\u884C",[P.dataToolbar.blankRowName]:"\u7A7A\u767D\u884C",[P.ontologyTrendMatrix.label]:"\u672C\u4F53\u8D8B\u52BF\u77E9\u9635",[P.ontologyTrendMatrix.row]:"\u884C",[P.ontologyTrendMatrix.window]:"\u5F53\u524D\u663E\u793A\u7B2C {start}-{end} \u884C\uFF0C\u5171 {total} \u884C",[P.ontologyTrendMatrix.select]:"\u9009\u62E9 {row}\u3001{column}\u3001{value}",[P.dataContextBar.label]:"\u6570\u636E\u7B5B\u9009\u4E0E\u94BB\u53D6\u4E0A\u4E0B\u6587",[P.dataContextBar.filter]:"\u7B5B\u9009",[P.dataContextBar.searchLabel]:"\u641C\u7D22\u6570\u636E",[P.dataContextBar.searchPlaceholder]:"\u641C\u7D22",[P.dataContextBar.clear]:"\u6E05\u9664",[P.dataContextBar.clearAll]:"\u5168\u90E8\u6E05\u9664",[P.dataContextBar.tagFilterClear]:"\u6E05\u7A7A",[P.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",[P.dataContextBar.tagScope]:"\u6807\u7B7E\u8303\u56F4",[P.dataContextBar.currentViewTags]:"\u5F53\u524D\u89C6\u56FE",[P.dataContextBar.allTags]:"\u5168\u90E8\u6807\u7B7E",[P.dataContextBar.panelFilter]:"\u9762\u677F\u7B5B\u9009",[P.dataContextBar.searchTags]:"\u641C\u7D22\u6807\u7B7E",[P.dataContextBar.noAvailableTags]:"\u6682\u65E0\u53EF\u7528\u6807\u7B7E",[P.dataContextBar.loadedAll]:"\u5DF2\u52A0\u8F7D\u5168\u90E8",[P.dataContextBar.refreshTags]:"\u5237\u65B0\u6807\u7B7E",[P.dataContextBar.confirm]:"\u786E\u5B9A",[P.dataContextBar.tagPanel]:"\u6807\u7B7E\u9762\u677F",[P.dataContextBar.selectPanel]:"\u9009\u62E9\u6807\u7B7E\u9762\u677F",[P.dataContextBar.noPanels]:"\u6682\u65E0\u53EF\u7528\u6807\u7B7E\u9762\u677F",[P.dataContextBar.noPanelGroups]:"\u5F53\u524D\u9762\u677F\u6CA1\u6709\u6807\u7B7E\u7EC4",[P.dataContextBar.singleSelect]:"\u5355\u9009",[P.dataContextBar.multiSelect]:"\u591A\u9009",[P.dataContextBar.defaultGroup]:"\u9ED8\u8BA4\u6807\u7B7E\u7EC4",[P.dataContextBar.more]:"\u53E6\u6709 {count} \u9879",[P.dataContextBar.dashboardContext]:"\u4EEA\u8868\u76D8\u4E0A\u4E0B\u6587",[P.dataContextBar.contextCount]:"{count} \u9879\u4E0A\u4E0B\u6587",[P.dataContextBar.fields.search]:"\u641C\u7D22",[P.dataContextBar.fields.tagIds]:"\u6807\u7B7E",[P.dataContextBar.fields.tagGroupIds]:"\u6807\u7B7E\u7EC4",[P.dataContextBar.fields.timeFrom]:"\u5F00\u59CB\u65F6\u95F4",[P.dataContextBar.fields.timeTo]:"\u7ED3\u675F\u65F6\u95F4",[P.dataContextBar.fields.clickedField]:"\u94BB\u53D6\u5B57\u6BB5",[P.dataContextBar.fields.clickedValue]:"\u94BB\u53D6\u503C",[P.dataContextBar.fields.dashboardDrilldown]:"\u4EEA\u8868\u76D8\u94BB\u53D6"})});var tm={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 rk({language:e,disabled:t,onSelect:o}){let n=Ne(),[a,s]=useState(0),[i,m]=useState(false),[c,d]=useState(),g=useRef({disabled:t,onSelect:o});g.current={disabled:t,onSelect:o};let u=useRef(true);useEffect(()=>(u.current=true,()=>{u.current=false;}),[]),useEffect(()=>{let b=false;return m(false),Promise.all([import('@emoji-mart/react'),import('@emoji-mart/data'),tm[e]()]).then(([h,y,v])=>{b||d({Picker:h.default,data:y.default,i18n:v.default});}).catch(()=>{b||m(true);}),()=>{b=true;}},[e,a]);let p=Ri[e==="zh"?"zh-CN":"en-US"];if(i)return jsxs("div",{role:"alert",className:"flex items-center gap-2 text-sm",children:[p["monkeys.design.emojiPanel.unavailable"],jsx(ve,{disabled:t,onClick:()=>s(b=>b+1),children:p["monkeys.design.iconPicker.retry"]})]});if(!c)return jsx("div",{role:"status",className:"text-sm text-muted-foreground",children:p["monkeys.design.emojiPanel.loading"]});let{Picker:f}=c;return 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: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=>{u.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(rk,"LocalizedEmojiPanel");function om({locale:e,disabled:t=false,onSelect:o}){let n=xt(),a=(e??n.locale).toLowerCase().split("-")[0],s=Object.prototype.hasOwnProperty.call(tm,a)?a:"en";return jsx(rk,{language:s,disabled:t,onSelect:o},s)}r(om,"EmojiPanel");function fl(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 jsx(om,{locale:e.locale,disabled:e.disabled,onSelect:o=>t(o)})}r(fl,"renderIconPickerEmoji");function _n(e,t){let o=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(_n,"resolveI18nDisplayText");var Yr=5*1024*1024*1024;function nm(e,t){if(!t?.trim())return true;let o=e.name.toLowerCase(),n=e.type.toLowerCase();return t.split(",").some(a=>{let s=a.trim().toLowerCase();return /^\.[a-z0-9][a-z0-9._-]*$/.test(s)?o.endsWith(s):/^[a-z0-9!#$&^_.+-]+\/\*$/.test(s)?n.startsWith(s.slice(0,-1)):/^[a-z0-9!#$&^_.+-]+\/[a-z0-9!#$&^_.+-]+$/.test(s)&&n===s})}r(nm,"filePickerAccepts");function rm(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>Yr))return {handleId:t.handleId,fileName:t.fileName,size:t.size,mimeType:t.mimeType}}r(rm,"readTransientFileMetadata");var im=".png,.jpg,.jpeg,.webp,.svg";function gk({compactActions:e=false,model:t,onIntent:o,renderEmojiPicker:n=fl,transientFiles:a,translate:s,catalogSource:i}){let{locale:m}=xt(),c=i??(!t.icons.length&&!t.categories.length?defaultIconPickerCatalogSource:void 0),d=r(R=>{let D=s?.(R);return D&&D!==R?D:Ri[m.toLowerCase().startsWith("zh")?"zh-CN":"en-US"][R]??R},"translate"),[g,u]=useState(),[p,f]=useState("idle"),[b,h]=useState(0);useEffect(()=>{if(!c||!t.open||t.mode!=="icon"||g?.source===c)return;let R=new AbortController;return f("loading"),c.load(R.signal).then(D=>{R.signal.aborted||(u({source:c,value:D}),f("idle"));}).catch(()=>{R.signal.aborted||f("error");}),()=>R.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,v=useRef(null),k=useRef(null),[x,w]=useState(false),C=r(()=>{let R=k.current;k.current=null,R?.registry.discard(R.handleId);},"release");useEffect(()=>()=>C(),[a]),useEffect(()=>{y.open||C();},[y.open]);let S=y.disabled===true||y.uploading===true,T=r(R=>{S||o(R);},"emit"),E=r(()=>{S||(C(),o({type:"open-change",open:false,mode:y.mode}));},"close"),N=y.value.kind==="emoji"?y.value.value:y.defaultValue.kind==="emoji"?y.defaultValue.value:"\u{1F340}",O=y.value.kind==="emoji"?y.value.backgroundColor:y.backgroundColors[0],V=r((R,D=O)=>{!R||R.length>64||T({type:"change",value:{kind:"emoji",value:R,...D?{backgroundColor:D}:{}}});},"chooseEmoji"),W=[...new Map(y.customIcons.map(R=>[R.id,R])).values()].slice(0,50),F=y.search.trim().toLowerCase(),H=y.categoryId==="custom-upload",I=(H?W:y.icons).filter(R=>(H||y.categoryId==="all"||R.categoryIds?.includes(y.categoryId))&&(!F||R.id.toLowerCase().includes(F)||R.tags?.some(D=>D.toLowerCase().includes(F)))),G=r(R=>{S||o({type:"open-change",open:y.open,mode:R});},"changeMode"),q=r((R,D,M,$)=>e?jsx(cr,{content:d(R),portal:true,children:jsx(ve,{label:d(R),iconOnly:true,icon:D,disabled:S,"aria-pressed":$,active:$,onClick:M})}):jsx(ve,{type:"button",disabled:S,"aria-pressed":$,active:$,onClick:M,children:d(R)}),"action");return jsx("section",{"data-monkeys-component":"icon-picker",className:"flex items-center",children:jsxs(Sd,{open:y.open,modal:false,onOpenChange:R=>{R?T({type:"open-change",open:true,mode:y.mode}):E();},children:[jsx(Td,{asChild:true,children:jsx(ve,{type:"button","aria-label":d("monkeys.design.iconPicker.choose"),disabled:S,className:"gap-2 px-2",endIcon:jsx(ChevronDown,{"aria-hidden":"true",className:"h-3.5 w-3.5 text-muted-foreground"}),children:jsx(Bn,{icon:y.value,alt:d("monkeys.design.iconPicker.current"),className:"h-6 w-6 rounded-sm bg-transparent text-xl text-current"})})}),jsxs(qi,{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:R=>{y.mode==="icon"&&v.current&&(R.preventDefault(),v.current.focus());},onEscapeKeyDown:R=>{S&&R.preventDefault();},onInteractOutside:R=>{S&&R.preventDefault();},children:[jsxs("div",{className:"flex items-center gap-2",children:[q("monkeys.design.iconPicker.emoji",jsx(Smile,{className:"h-4 w-4"}),()=>G("emoji"),y.mode==="emoji"),q("monkeys.design.iconPicker.icon",jsx(Shapes,{className:"h-4 w-4"}),()=>G("icon"),y.mode==="icon"),jsxs("div",{className:"ml-auto flex items-center gap-2",children:[q("monkeys.design.iconPicker.reset",jsx(RotateCcw,{className:"h-4 w-4"}),()=>{S||(o({type:"change",value:y.defaultValue}),o({type:"reset"}),E());}),q("monkeys.design.iconPicker.close",jsx(X,{className:"h-4 w-4"}),E)]})]}),y.mode==="emoji"?jsxs(Fragment,{children:[n({locale:m,disabled:S,onSelect:r(R=>{S||!R||R.length>64||(V(R),E());},"onSelect")}),jsx("div",{className:"flex flex-wrap gap-2 empty:hidden","aria-label":d("monkeys.design.iconPicker.background"),children:y.backgroundColors.map(R=>jsx(ve,{className:"h-7 w-7 rounded-md border p-0",type:"button",disabled:S,"aria-label":R,"aria-pressed":R===O,style:{backgroundColor:R},onClick:()=>V(N,R),children:jsx("span",{className:"sr-only",children:d("monkeys.design.iconPicker.background")})},R))})]}):jsxs(Fragment,{children:[jsx(Qt,{ref:v,"aria-label":d("monkeys.design.iconPicker.search"),placeholder:d("monkeys.design.iconPicker.search"),disabled:S,value:y.search,onChange:R=>T({type:"search",value:R.currentTarget.value})}),jsx("div",{className:"flex shrink-0 gap-1 overflow-x-auto pb-1","aria-label":d("monkeys.design.iconPicker.categories"),children:y.categories.filter(R=>R.id!=="custom-upload"||a||y.customIcons.length).map(R=>jsx(ve,{type:"button",className:"shrink-0",size:"sm",variant:"ghost",disabled:S,active:R.id===y.categoryId,"aria-pressed":R.id===y.categoryId,onClick:()=>T({type:"category-change",categoryId:R.id}),children:_n(R.labelI18n,m)},R.id))}),H?jsxs("label",{children:[d("monkeys.design.iconPicker.upload"),jsx(Qt,{type:"file",accept:im,disabled:S||!a,onChange:R=>{let D=R.currentTarget.files?.[0];if(R.currentTarget.value="",!D||S||!a)return;let M=y.maxUploadBytes??Yr;if(!Number.isInteger(M)||M<1||M>Yr||D.size>M||!nm(D,im)){w(true);return}C(),w(false);try{let $=a.register(D),J=rm($);if(!J){typeof $?.handleId=="string"&&a.discard($.handleId),w(!0);return}k.current={registry:a,handleId:J.handleId},o({type:"upload",...J});}catch{C(),w(true);}}})]}):null,x?jsx("div",{role:"alert",children:d("monkeys.design.iconPicker.uploadFailed")}):null,y.loading?jsx("div",{role:"status",children:d("monkeys.design.iconPicker.loading")}):y.errorCode?jsxs("div",{role:"alert",children:[d(y.errorCode),jsx(ve,{disabled:S,onClick:()=>{h(R=>R+1),T({type:"retry"});},children:d("monkeys.design.iconPicker.retry")})]}):jsxs("div",{className:"grid min-h-0 max-h-64 grid-cols-7 gap-1 overflow-auto",onKeyDown:R=>{let D=Array.from(R.currentTarget.querySelectorAll("button:not(:disabled)")),M=D.indexOf(R.target);if(M<0)return;let $={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7}[R.key],J=R.key==="Home"?0:R.key==="End"?D.length-1:$===void 0?void 0:Math.max(0,Math.min(D.length-1,M+$));J!==void 0&&(R.preventDefault(),D[J]?.focus());},children:[I.map(R=>jsxs(ve,{className:"relative h-10 min-w-0 p-1",variant:"ghost",active:JSON.stringify(R.icon)===JSON.stringify(y.value),type:"button",title:R.id,"aria-label":R.id,disabled:S,onClick:()=>{S||(o({type:"change",value:R.icon}),E());},children:[jsx(Bn,{icon:R.icon,alt:R.id,className:"h-7 w-7 rounded-sm bg-transparent text-2xl text-current"}),jsx("span",{className:"sr-only",children:R.id})]},R.id)),I.length?null:jsx("p",{className:"col-span-7 py-3 text-center text-sm text-muted-foreground",children:d("monkeys.design.iconPicker.empty")})]})]})]})]})})}r(gk,"IconPicker");function hl(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(hl,"initialLayoutCanvasMountedIds");function bk(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)),s=Math.max(8,Math.ceil(a*.75));return Math.min(e,Math.max(Math.min(e,18),Math.min(n,a+s)))}r(bk,"layoutCanvasRetainedMountLimit");function lm(e){let t=new Set(e.items.map(i=>i.id));if(t.size!==e.items.length)throw new TypeError("Layout widget IDs must be unique.");let o=new Set(e.visibleIds.filter(i=>t.has(i))),n=hl(e.items),a=bk(t.size,o.size,n.length);if(e.mode==="run")return {retainedOrder:[],mountedIds:[...o],limit:a};let s=[...new Set(e.retainedOrder.filter(i=>t.has(i)))];s.length||s.push(...n);for(let i of [...o,e.selectedWidgetId,e.draggingWidgetId,e.resizingWidgetId]){if(!i||!t.has(i))continue;let m=s.indexOf(i);m>=0&&s.splice(m,1),s.push(i);}for(;s.length>a;){let i=s.findIndex(m=>!o.has(m));if(i<0)break;s.splice(i,1);}return {retainedOrder:s,mountedIds:[...new Set([...s,...o])],limit:a}}r(lm,"projectLayoutCanvasMounting");function pm({items:e,mode:t,selectedWidgetId:o,draggingWidgetId:n,resizingWidgetId:a,renderItem:s}){let i=useRef(null),m=JSON.stringify(e.map(h=>[h.id,h.layout.x,h.layout.y])),[c,d]=useState(()=>hl(e)),[g,u]=useState([]),p=useMemo(()=>lm({items:e,mode:t,visibleIds:c,retainedOrder:g,selectedWidgetId:o,draggingWidgetId:n,resizingWidgetId:a}),[m,t,c,g,o,n,a]),f=JSON.stringify(p.retainedOrder);useEffect(()=>{u(h=>JSON.stringify(h)===f?h:p.retainedOrder);},[f]),useEffect(()=>{let h=i.current;if(!h)return;if(typeof IntersectionObserver>"u"){d(e.map(x=>x.id));return}let y=true,v=new Map;d([]);let k=new IntersectionObserver(x=>{if(!y)return;for(let C of x){let S=C.target.dataset.layoutMountId;S&&v.set(S,C.isIntersecting);}let w=[...v].filter(([,C])=>C).map(([C])=>C);d(C=>JSON.stringify(C)===JSON.stringify(w)?C:w);},{root:null,rootMargin:`${720}px 0px ${720}px 0px`,threshold:0});for(let x of h.children)k.observe(x);return ()=>{y=false,k.disconnect();}},[m]);let b=new Set(p.mountedIds);return jsx("div",{ref:i,"data-layout-grid":true,className:"grid",style:{gridTemplateColumns:"repeat(24,minmax(0,1fr))",gridAutoRows:28,gap:12},children:e.map(h=>jsx("div",{"data-layout-mount-id":h.id,style:{gridColumn:`${h.layout.x+1} / span ${h.layout.w}`,gridRow:`${h.layout.y+1} / span ${h.layout.h}`,minWidth:0,minHeight:0},children:s(h,b.has(h.id))},h.id))})}r(pm,"LayoutCanvasGrid");var Ii="application/x-monkeys-layout-catalog-item";var $n={columns:24,rowHeight:28,gap:12,maxRows:100,minimum:4},xl=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 Bi(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"?Bi(a.children,t):a.tabs.forEach(s=>Bi(s.children,t)));return n(),t}r(Bi,"runs");var xo=z$1.string().min(1).max(256).refine(e=>!["__proto__","constructor","prototype"].includes(e)),Mi=z$1.string().max(8192),hk=z$1.union([z$1.object({type:z$1.enum(["widget","section","tabs"]),id:xo}).strict(),z$1.object({type:z$1.literal("tab"),id:xo,tabsId:xo}).strict()]),vl=z$1.lazy(()=>z$1.union([z$1.object({type:z$1.literal("widget"),id:xo,widgetId:xo}).strict(),z$1.object({type:z$1.literal("section"),id:xo,title:Mi.optional(),description:Mi.optional(),children:z$1.array(vl)}).strict(),z$1.object({type:z$1.literal("tabs"),id:xo,title:Mi.optional(),size:z$1.enum(["large","small"]).optional(),behavior:z$1.enum(["switch","anchor"]).optional(),tabs:z$1.array(z$1.object({id:xo,label:Mi.optional(),target:hk.optional(),children:z$1.array(vl)}).strict())}).strict()])),xk=z$1.object({x:z$1.number().int().min(0),y:z$1.number().int().min(0),w:z$1.number().int().min(4).max(24),h:z$1.number().int().min(4).max(100),minW:z$1.number().int().min(4).max(24),minH:z$1.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),vk=z$1.object({version:z$1.literal(1),revision:xo,root:z$1.array(vl),widgets:z$1.record(xo,z$1.object({layout:xk}).strict())}).strict();function jn(e){let t=0,o=new Set,n=r((g,u)=>{if(g&&typeof g=="object"){if(u>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,u+1);o.delete(g);}},"bound");n(e,0);let a=vk.parse(e),s=new Set,i=new Set,m=0,c=r(()=>{throw new TypeError("Invalid layout canvas model.")},"fail"),d=r((g,u)=>{u>16&&c();for(let p of g)if((s.has(p.id)||++m>512)&&c(),s.add(p.id),p.type==="widget")(i.has(p.widgetId)||!Object.prototype.hasOwnProperty.call(a.widgets,p.widgetId))&&c(),i.add(p.widgetId);else if(p.type==="section")d(p.children,u+1);else for(let f of p.tabs)(s.has(f.id)||++m>512)&&c(),s.add(f.id),d(f.children,u+1);},"visit");d(a.root,0),Object.keys(a.widgets).some(g=>!i.has(g))&&c();for(let g of Bi(a.root))for(let u=0;u<g.length;u++)for(let p=0;p<u;p++)xl(a.widgets[g[u]].layout,a.widgets[g[p]].layout)&&c();}r(jn,"validateLayoutCanvasModel");function Pi(e,t){if(jn(e),t.type==="remove"){let m=[],c=false,d=r(b=>{for(let h of b)h.type==="widget"?m.push(h.widgetId):h.type==="section"?d(h.children):h.tabs.forEach(y=>d(y.children));},"collect"),g=r(b=>b.flatMap(h=>h.id===t.nodeId?(c=true,d([h]),[]):h.type==="section"?[{...h,children:g(h.children)}]:h.type==="tabs"?[{...h,tabs:h.tabs.flatMap(y=>y.id===t.nodeId?(c=true,d(y.children),[]):[{...y,children:g(y.children)}])}]:[h]),"remove"),u=g(e.root);if(!c)throw new TypeError("Unknown layout node.");let p=new Set(m),f={...e,root:u,widgets:Object.fromEntries(Object.entries(e.widgets).filter(([b])=>!p.has(b)))};return jn(f),{model:f,removedWidgetIds:m}}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=(Bi(e.root).find(m=>m.includes(t.widgetId))??[]).filter(m=>m!==t.widgetId).map(m=>e.widgets[m].layout),s=a.some(m=>xl(n,m))?void 0:n;if(!s){let m=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},u=Math.abs(c-n.y)*1e3+Math.abs(d-n.x)*100+c*10+d;u<m&&!a.some(p=>xl(g,p))&&(s=g,m=u);}}if(!s)throw new RangeError("No available layout position.");let i={...e,widgets:{...e.widgets,[t.widgetId]:{...o,layout:s}}};return jn(i),{model:i,removedWidgetIds:[]}}r(Pi,"applyLayoutCanvasOperation");function Ck({model:e,mode:t,widgetOrder:o,children:n,selectedNodeId:a,currentTabs:s={},disabled:i=false,labels:m,allowedCatalogItemIds:c=[],draggingCatalogItemId:d,onInsertRequest:g,onReorder:u,onSelect:p,onChange:f,onTabChange:b,onOperationError:h,className:y}){jn(e);let v=Children.toArray(n);if(o.length!==v.length||new Set(o).size!==o.length||o.length!==Object.keys(e.widgets).length||o.some(K=>!Object.prototype.hasOwnProperty.call(e.widgets,K)))throw new TypeError("Layout widget content must map each widget exactly once.");let k=new Map(o.map((K,Z)=>[K,v[Z]])),x=useRef(null),w=useRef(e);w.current=e;let C=useRef({id:d,model:e});C.current.id!==d&&(C.current={id:d,model:e});let S=useRef(),[T,E]=useState(),N=useRef(),[O,V]=useState(),[W,F]=useState(),H=useRef();useEffect(()=>{N.current=void 0,H.current=void 0,S.current=void 0,E(void 0),V(void 0),F(void 0);},[e,i,t]);let I=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((K,Z,re,ae=e)=>{i||t!=="edit"||ae!==w.current||K===Z||!e.root.some(le=>le.id===K)||!e.root.some(le=>le.id===Z)||u?.({sourceNodeId:K,targetNodeId:Z,position:re,expectedRevision:ae.revision});},"reorder"),q=r(K=>t==="edit"&&e.root.some(Z=>Z.id===K)&&u?jsx("button",{type:"button","data-layout-reorder":K,draggable:!i,disabled:i,"aria-label":m.reorder??m.move,onDragStart:Z=>{if(i){Z.preventDefault();return}S.current={id:K,model:e},Z.dataTransfer.setData("application/x-monkeys-layout-root-node",K),Z.dataTransfer.effectAllowed="move";},onDragEnd:()=>{S.current=void 0,E(void 0);},onKeyDown:Z=>{let re=e.root.findIndex(L=>L.id===K),ae=Z.key==="ArrowUp"?-1:Z.key==="ArrowDown"?1:0;if(!ae)return;Z.preventDefault();let le=e.root[re+ae];le&&G(K,le.id,ae<0?"before":"after");},children:m.reorder??m.move}):null,"reorderHandle"),R=r(K=>{if(t!=="edit"||!g&&!(K.type==="root"&&u))return null;let Z=JSON.stringify(K);return jsx("div",{"data-layout-insert-target":Z,"data-layout-insert-type":K.type,"data-layout-insert-index":K.index,"data-layout-section-id":K.type==="section"?K.sectionId:void 0,"data-layout-tabs-id":K.type==="tab"?K.tabsId:void 0,"data-layout-tab-id":K.type==="tab"?K.tabId:void 0,"data-drop-preview":T===Z||void 0,"aria-label":m.insert??m.move,className:T===Z?"min-h-4 border-2 border-primary bg-primary/10":"min-h-2",onDragOver:re=>{i||!(I()||K.type==="root"&&S.current?.model===e)||(re.preventDefault(),re.stopPropagation(),E(Z));},onDragLeave:()=>E(void 0),onDrop:re=>{if(re.preventDefault(),re.stopPropagation(),E(void 0),i||t!=="edit"||w.current!==e)return;let ae=S.current;if(ae&&K.type==="root"){if(S.current=void 0,re.dataTransfer.getData("application/x-monkeys-layout-root-node")!==ae.id)return;let L=e.root[K.index]??e.root[e.root.length-1];L&&G(ae.id,L.id,K.index<e.root.length?"before":"after",ae.model);return}let le=re.dataTransfer.getData(Ii);I()&&le===d&&g?.({catalogItemId:le,target:K,expectedRevision:e.revision});},children:T===Z?m.insert??m.move:null},`drop:${Z}`)},"dropZone"),D=r((K,Z)=>{if(!(i||t!=="edit"||N.current===K)){if(w.current!==K){h?.({code:"stale-model",revision:K.revision});return}try{let re=Pi(K,Z);f&&(N.current=K),f?.({expectedRevision:K.revision,...re,reason:Z.type});}catch{h?.({code:"invalid-operation",revision:K.revision});}}},"commit"),M=r((K,Z,re)=>{if(i||t!=="edit"||K.button!==0)return;let le=K.currentTarget.closest("[data-layout-grid]")?.getBoundingClientRect().width??0;if(le<=0)return;let L=e.widgets[Z].layout;H.current={pointerId:K.pointerId,x:K.clientX,y:K.clientY,width:le,model:e,operation:re==="move"?{type:re,widgetId:Z,x:L.x,y:L.y}:{type:re,widgetId:Z,w:L.w,h:L.h}},K.currentTarget.setPointerCapture(K.pointerId),K.preventDefault();},"begin"),$=r((K,Z)=>{let re=H.current;if(!re||re.pointerId!==K.pointerId)return;if(w.current!==re.model||i||t!=="edit"){H.current=void 0,V(void 0);return}let ae=Math.round((K.clientX-re.x)/((re.width+$n.gap)/$n.columns)),le=Math.round((K.clientY-re.y)/($n.rowHeight+$n.gap)),L=re.operation,me=L.type==="move"?{...L,x:L.x+ae,y:L.y+le}:L.type==="resize"?{...L,w:L.w+ae,h:L.h+le}:L;if(Z)H.current=void 0,V(void 0),D(re.model,me);else try{V(Pi(re.model,me).model);}catch{V(void 0);}},"update"),J=O??e,_=r(K=>jsx("button",{type:"button",disabled:i,onClick:()=>F({nodeId:K,model:e}),children:m.remove}),"remove"),ee=r((K,Z)=>{let re=[],ae=[],le=r(()=>{if(!ae.length)return;let L=ae.flatMap(me=>me.type==="widget"?[{id:me.widgetId,node:me,layout:J.widgets[me.widgetId].layout}]:[]);ae=[],re.push(jsx(pm,{items:L,mode:t,selectedWidgetId:L.find(me=>me.node.id===a)?.id,renderItem:({node:me},B)=>{let j=J.widgets[me.widgetId].layout,ne=r(fe=>jsx("button",{type:"button",disabled:i,"aria-label":m[fe],style:{touchAction:"none"},onPointerDown:ye=>M(ye,me.widgetId,fe),onPointerMove:ye=>$(ye,false),onPointerUp:ye=>$(ye,true),onPointerCancel:()=>{H.current=void 0,V(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:j.x+xe[0],y:j.y+xe[1]}:{type:fe,widgetId:me.widgetId,w:j.w+xe[0],h:j.h+xe[1]}));},children:m[fe]}),"controls");return 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:[R({...Z,index:K.indexOf(me)}),t==="edit"?jsxs("div",{className:"flex gap-2",children:[jsx("button",{type:"button",disabled:i,onClick:()=>p?.({nodeId:me.id,revision:e.revision}),children:me.widgetId}),q(me.id),ne("move"),ne("resize"),_(me.id)]}):null,B?k.get(me.widgetId):null]},me.id)}},L[0].id));},"flush");for(let L of K){if(L.type==="widget"){ae.push(L);continue}if(le(),re.push(R({...Z,index:K.indexOf(L)})),L.type==="section")re.push(jsxs("section",{"data-layout-node-id":L.id,className:"space-y-3",children:[jsxs("header",{children:[jsx("h3",{children:t==="edit"?jsx("button",{disabled:i,onClick:()=>p?.({nodeId:L.id,revision:e.revision}),children:L.title??L.id}):L.title??L.id}),L.description?jsx("p",{children:L.description}):null,q(L.id),t==="edit"?_(L.id):null]}),ee(L.children,{type:"section",sectionId:L.id})]},L.id));else {let me=s[L.id]??L.tabs[0]?.id;re.push(jsxs("section",{"data-layout-node-id":L.id,children:[jsx("h3",{children:t==="edit"?jsx("button",{disabled:i,onClick:()=>p?.({nodeId:L.id,revision:e.revision}),children:L.title??L.id}):L.title??L.id}),q(L.id),t==="edit"?_(L.id):null,jsx("div",{role:"tablist",children:L.tabs.map(B=>jsx("button",{type:"button",role:"tab","aria-selected":me===B.id,disabled:i,onClick:()=>{if(t==="edit"&&p?.({nodeId:B.id,revision:e.revision}),b?.({tabsId:L.id,tabId:B.id,revision:e.revision}),L.behavior!=="anchor"||!B.target)return;let j=B.target;j.type==="tab"&&b?.({tabsId:j.tabsId,tabId:j.id,revision:e.revision}),requestAnimationFrame(()=>{let ne=x.current?.querySelectorAll("[data-layout-node-id], [data-layout-widget], [data-layout-tab-id]");(ne&&[...ne].find(ye=>j.type==="widget"?ye.dataset.layoutWidget===j.id:j.type==="tab"?ye.dataset.layoutTabId===j.id&&ye.dataset.layoutTabsId===j.tabsId:ye.dataset.layoutNodeId===j.id))?.scrollIntoView({behavior:typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth",block:"start",inline:"nearest"});});},children:B.label??B.id},B.id))}),L.tabs.map(B=>jsx("div",{role:"tabpanel","data-layout-tab-id":B.id,"data-layout-tabs-id":L.id,hidden:L.behavior!=="anchor"&&me!==B.id,children:ee(B.children,{type:"tab",tabsId:L.id,tabId:B.id})},B.id))]},L.id));}}return le(),re.push(R({...Z,index:K.length})),re},"nodes");return jsxs("div",{ref:x,className:y,"data-layout-canvas":true,children:[ee(J.root,{type:"root"}),jsx(ba,{open:!!W,onOpenChange:K=>{K||F(void 0);},children:jsxs(ln,{children:[jsx(ir,{children:m.confirmRemove}),jsx(sr,{children:m.removeDescription}),jsx("button",{type:"button",onClick:()=>F(void 0),children:m.cancel}),jsx("button",{type:"button",disabled:i,onClick:()=>{W&&D(W.model,{type:"remove",nodeId:W.nodeId}),F(void 0);},children:m.remove})]})})]})}r(Ck,"LayoutCanvas");function Tk({catalogItemId:e,disabled:t=false,children:o,className:n,onInsertRequest:a,onDragStateChange:s}){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 i=useRef(),m=useRef(false),c=r(()=>{let d=i.current;i.current=void 0,d&&d.notify?.({catalogItemId:d.catalogItemId,active:false});},"finish");return useEffect(()=>()=>c(),[e,t]),jsx("button",{type:"button",className:n,disabled:t,draggable:!t,onPointerDown:()=>{i.current||(m.current=false);},onKeyDown:d=>{!i.current&&(d.key==="Enter"||d.key===" ")&&(m.current=false);},onClick:d=>{if(t||m.current){d.preventDefault();return}a?.({catalogItemId:e});},onDragStart:d=>{if(t){d.preventDefault();return}c(),d.dataTransfer.clearData(),d.dataTransfer.setData(Ii,e),d.dataTransfer.effectAllowed="copy",m.current=true,i.current={catalogItemId:e,notify:s},s?.({catalogItemId:e,active:true});},onDragEnd:c,children:o})}r(Tk,"LayoutCatalogItem");function Nk({value:e,tokens:t,disabled:o=false,readOnly:n=false,ariaLabel:a,tokenGroupLabel:s,maxLength:i,onChange:m}){let c=useRef(null),d=useRef(false),g=useRef();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]),useLayoutEffect(()=>()=>{g.current=void 0;},[]);let u=r(p=>i===void 0||p.length<=i,"fits");return jsxs("div",{children:[jsx("textarea",{ref:c,value:e,disabled:o,readOnly:n,"aria-label":a,maxLength:i,onCompositionStart:()=>{d.current=true,g.current=void 0;},onCompositionEnd:()=>{d.current=false;},onChange:p=>{g.current=void 0,!o&&!n&&u(p.currentTarget.value)&&m?.({value:p.currentTarget.value});}}),jsx("div",{role:"group","aria-label":s,children:t.map((p,f)=>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 h=b.selectionStart,y=b.selectionEnd,v=e.slice(0,h)+p.value+e.slice(y);!u(v)||v===e||(g.current={previous:e,value:v,caret:h+p.value.length},m?.({value:v}));},children:p.label},f))})]})}r(Nk,"TemplateTextEditor");function Mk({model:e,labels:t,locale:o,timeZone:n,disabled:a=false,loading:s=false,onIntent:i}){let{locale:m}=xt(),c=a||s,d=e.repositories.find(p=>p.id===e.selectedRepositoryId),g=r(p=>{c||i?.({...p,scopeId:e.scopeId,expectedRevision:e.revision});},"emit"),u;try{u=new Intl.DateTimeFormat(o??m,{dateStyle:"medium",timeStyle:"short",timeZone:n});}catch{}return jsxs("section",{"aria-busy":s,className:"flex min-h-0 flex-col gap-3 text-sm",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsxs("label",{children:[t.repositories,jsxs(uo,{"aria-label":t.repositories,disabled:c,value:e.selectedRepositoryId??"",onChange:p=>g({action:"select-repository",repositoryId:p.currentTarget.value}),children:[jsx("option",{value:"",disabled:true,children:t.repositories}),e.repositories.map(p=>jsx("option",{value:p.id,children:p.name},p.id))]})]}),jsx(ve,{size:"sm",disabled:c,onClick:()=>g({action:"refresh"}),children:t.refresh})]}),s&&jsx("p",{role:"status",children:t.loading}),d?jsxs(Fragment,{children:[jsxs("dl",{className:"flex flex-wrap gap-3",children:[jsxs("div",{children:[jsx("dt",{children:t.branch}),jsx("dd",{children:d.branch??"\u2014"})]}),d.upstream&&jsxs("div",{children:[jsx("dt",{children:t.upstream}),jsx("dd",{children:d.upstream})]}),jsxs("div",{children:[jsx("dt",{children:t.ahead}),jsx("dd",{children:d.ahead??0})]}),jsxs("div",{children:[jsx("dt",{children:t.behind}),jsx("dd",{children:d.behind??0})]})]}),jsx("h3",{children:t.status}),d.changes.length===0&&jsx("p",{children:t.empty}),jsx("ul",{className:"flex flex-col gap-1",children:d.changes.map(p=>jsxs("li",{className:"flex flex-wrap items-center gap-2",children:[jsx(un,{label:p.status}),jsx("span",{className:"min-w-0 break-all",children:p.path}),p.indexStatus&&jsx("code",{children:p.indexStatus}),p.worktreeStatus&&jsx("code",{children:p.worktreeStatus}),jsx(ve,{size:"sm",disabled:c,onClick:()=>g({action:"open-file",repositoryId:d.id,path:p.path}),children:t.openFile}),jsx(ve,{size:"sm",disabled:c,onClick:()=>g({action:"open-diff",repositoryId:d.id,path:p.path}),children:t.openDiff})]},p.path))}),jsx("h3",{children:t.history}),d.commits.length===0&&jsx("p",{children:t.empty}),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,h=b&&Number.isFinite(b.getTime());return jsxs("li",{children:[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]}),jsxs("div",{className:"flex flex-wrap gap-2",children:[jsx("span",{children:p.author}),h&&u?jsx("time",{dateTime:b.toISOString(),children:u.format(b)}):jsx("span",{children:t.unknownDate}),p.refs?.map(y=>jsx(un,{label:y},y))]}),f&&jsxs(Fragment,{children:[jsx("ul",{children:p.files.slice(0,8).map(y=>jsxs("li",{className:"flex gap-2",children:[jsx("span",{className:"break-all",children:y.path}),y.status&&jsx(un,{label:y.status})]},y.path))}),p.files.length>8&&jsxs("p",{children:[t.remainingFiles,": ",p.files.length-8]})]})]},p.id)})})]}):jsx("p",{children:t.empty})]})}r(Mk,"RuntimeSourceControlView");var Tl=1e4,Bk=Tl+2,xm=1024*1024,Sl=r(e=>typeof e=="string"&&e.trim().length>0&&e.length<=256&&!/[\u0000-\u001f\u007f-\u009f]/.test(e),"validId");function hm(e){if(e.length>Tl)return "ORDERED_SELECTION_LIMIT_EXCEEDED";if(e.some(t=>!Sl(t))||new Set(e).size!==e.length)return "ORDERED_SELECTION_INVALID_MODEL";if(new TextEncoder().encode(JSON.stringify(e)).byteLength>xm)return "ORDERED_SELECTION_BYTES_EXCEEDED"}r(hm,"validateOrderedSelection");function Pk(e){return jsx(Ek,{...e},JSON.stringify([e.model.scopeId,e.model.revision]))}r(Pk,"OrderedSelection");function Ek({model:e,onIntent:t,translate:o}){let{locale:n}=xt(),[a,s]=useState(()=>[...e.selectedIds]),[i,m]=useState(e.search??""),[c,d]=useState(""),[g,u]=useState(()=>hm(e.selectedIds)),[p,f]=useState(0),b=useRef(a),h=useRef(new Set),y=useRef(new Map),v=useRef(true),k=useRef();useEffect(()=>(v.current=true,()=>{v.current=false;}),[]);let x=!!(e.pending||e.readOnly||e.loading),w=useRef({blocked:x,model:e});w.current={blocked:x,model:e};let C=r(_=>{v.current&&!w.current.blocked&&t(_);},"emit"),S=e.append&&!h.current.has(e.append.revision)?e.append.rows:[],T=[...e.candidates??[],...S],E=new Set(b.current),N=(e.append?.rows??[]).filter(_=>E.has(_.id));for(let _ of [...(e.selectedRows??[]).filter(ee=>E.has(ee.id)),...N,...T])Sl(_.id)&&y.current.set(_.id,_);let O=new Set([...b.current,...T.map(_=>_.id)]);for(let _ of y.current.keys())O.has(_)||y.current.delete(_);let V=r(_=>{let ee=e.groups??[];if(ee.length>Bk||ee.some(re=>!Sl(re.id))||new Set(ee.map(re=>re.id)).size!==ee.length)return "ORDERED_SELECTION_INVALID_MODEL";let K=new Map;for(let re of _)K.set(re,y.current.get(re)??{id:re});for(let re of T)K.set(re.id,re);return new TextEncoder().encode(JSON.stringify({selectedIds:_,rows:[...K.values()],groups:ee})).byteLength>xm?"ORDERED_SELECTION_BYTES_EXCEEDED":void 0},"displayIssue"),W=r(_=>{let ee=y.current.get(_);return ee?.labelI18n?_n(ee.labelI18n,n):ee?.labelKey?o(ee.labelKey):ee?.label||_},"label"),F=r((_,ee=false)=>{let K=y.current.get(_),re=[K?.descriptionI18n?_n(K.descriptionI18n,n):K?.descriptionKey?o(K.descriptionKey):K?.description,K?.showId?_:void 0].filter(ae=>ae!==void 0&&ae!=="").join(" \xB7 ");return jsxs("span",{className:"min-w-0 flex-1 overflow-hidden",children:[jsxs("span",{className:"block truncate",children:[W(_),ee&&K?.missing?` (${o("Unavailable")})`:""]}),re?jsx("span",{className:"block truncate text-xs text-muted-foreground",title:re,children:re}):null]})},"rowText"),H=e.selectionMode==="single"?1:Math.min(1e4,e.maxSelected??1e4),I=e.minSelected??0,G=r(_=>{if(w.current.blocked||!v.current)return false;let K=(_.length>H?"ORDERED_SELECTION_LIMIT_EXCEEDED":hm(_))??V(_);return K?(u(K),C({type:"error",scopeId:e.scopeId,code:K}),false):(b.current=_,u(void 0),s(_),C({type:"change",scopeId:e.scopeId,expectedRevision:e.revision,selectedIds:[..._],selectedCount:_.length}),true)},"commit");useEffect(()=>{!e.append||e.append.rows.length===0||x||h.current.has(e.append.revision)||G([...new Set([...a,...e.append.rows.map(_=>_.id)])])&&h.current.add(e.append.revision);},[e.append,x,a]);let q=r((_,ee)=>{let K=a.indexOf(_);if(K<0||ee<0||ee>=a.length||K===ee)return;let Z=[...a];Z.splice(K,1),Z.splice(ee,0,_),G(Z);},"move"),R=r(()=>C({type:"search",scopeId:e.scopeId,value:i.trim()}),"searchNow"),M=!Number.isSafeInteger(I)||!Number.isSafeInteger(H)||I<0||H<0||I>H?"ORDERED_SELECTION_INVALID_MODEL":V(a),$=M??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 jsxs("div",{className:"flex min-w-0 flex-col gap-3","data-ordered-selection":e.scopeId,children:[$?jsx("p",{role:"alert",children:o($)}):null,e.loading?jsx("p",{role:"status",children:o("Loading")}):null,e.mode==="ids"?jsxs("div",{children:[jsx(yr,{"aria-label":o("IDs"),disabled:x,value:c,onChange:_=>d(_.target.value)}),jsx(ve,{disabled:x,onClick:()=>{G([...new Set([...a,...c.split(/[\s,;]+/).filter(Boolean)])]);},children:o("Add")})]}):jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[e.groupId!==void 0?jsx(uo,{"aria-label":o("Group"),value:e.groupId,disabled:x||e.canBrowse===false,onChange:_=>C({type:"group-change",scopeId:e.scopeId,value:_.currentTarget.value}),children:(e.groups??[]).map(_=>jsx("option",{value:_.id,children:_.labelI18n?_n(_.labelI18n,n):_.labelKey?o(_.labelKey):_.label||_.id},_.id))}):null,jsx(Qt,{"aria-label":o("Search"),value:i,disabled:x||e.canBrowse===false,onChange:_=>m(_.target.value),onKeyDown:_=>{_.key==="Enter"&&(_.preventDefault(),R());}}),jsx(ve,{disabled:x||e.canBrowse===false,onClick:R,children:o("Search")}),e.allowCreate?jsx(ve,{disabled:x,onClick:()=>C({type:"create",scopeId:e.scopeId}),children:o("Create")}):null,jsx("div",{className:"w-full space-y-2","data-ordered-candidates":true,style:{maxHeight:384,overflowY:"auto"},children:(e.candidates??[]).map(_=>jsxs("div",{className:"flex items-center gap-2",children:[jsxs("label",{className:"flex min-w-0 flex-1 items-center gap-2",children:[jsx(dn,{disabled:x||_.disabled,checked:a.includes(_.id),onChange:ee=>G(ee.currentTarget.checked?e.selectionMode==="single"?[_.id]:[...new Set([...a,_.id])]:a.filter(K=>K!==_.id))}),F(_.id)]}),e.allowCopy?jsx(ve,{disabled:x||_.disabled,onClick:()=>C({type:"copy",scopeId:e.scopeId,id:_.id}),children:o("Copy")}):null]},_.id))}),e.pagination?.hasMore&&e.pagination.nextCursor?jsx(ve,{disabled:x||e.canBrowse===false||e.pagination.loadingMore,onClick:()=>C({type:"load-more",scopeId:e.scopeId,cursor:e.pagination.nextCursor}),children:o("Load more")}):null]}),jsx(ve,{className:"self-start",disabled:x||a.length===0,onClick:()=>G([]),children:o("Clear")}),jsxs("div",{role:"status","aria-live":"polite",children:[a.length," / ",Tl]}),jsx("div",{"data-ordered-viewport":true,style:{height:Math.min(384,a.length*48),overflowY:"auto"},onScroll:_=>f(Math.max(0,Math.floor(_.currentTarget.scrollTop/48)-2)),children:jsx("ol",{"aria-label":o("Selected"),style:{height:a.length*48,position:"relative",margin:0},children:a.slice(J,J+14).map((_,ee)=>{let K=J+ee;return jsxs("li",{"data-ordered-id":_,"aria-posinset":K+1,"aria-setsize":a.length,style:{position:"absolute",top:K*48,height:48,left:0,right:0,display:"flex",gap:8},onDragOver:Z=>{!x&&k.current&&Z.preventDefault();},onDrop:Z=>{Z.preventDefault(),k.current&&Z.dataTransfer.getData("application/x-monkeys-ordered-selection")===k.current&&q(k.current,K),k.current=void 0;},children:[jsx(ve,{"data-ordered-drag":_,"aria-label":o("Move"),disabled:x,draggable:!x,onDragStart:Z=>{if(x)return Z.preventDefault();k.current=_,Z.dataTransfer.setData("application/x-monkeys-ordered-selection",_);},onDragEnd:()=>{k.current=void 0;},onKeyDown:Z=>{(Z.key==="ArrowUp"||Z.key==="ArrowDown")&&(Z.preventDefault(),q(_,K+(Z.key==="ArrowUp"?-1:1)));},children:"\u2195"}),F(_,true),jsx(ve,{disabled:x||K===0,"aria-label":o("Move up"),onClick:()=>q(_,K-1),children:"\u2191"}),jsx(ve,{disabled:x||K===a.length-1,"aria-label":o("Move down"),onClick:()=>q(_,K+1),children:"\u2193"}),jsx(ve,{disabled:x,"aria-label":o("Remove"),onClick:()=>G(a.filter(Z=>Z!==_)),children:"\xD7"})]},_)})})}),jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.showSubmit!==false?jsx(ve,{disabled:x||!!(g||M)||a.length<I||a.length>H,onClick:()=>C({type:"submit",scopeId:e.scopeId,expectedRevision:e.revision,selectedIds:[...a],selectedCount:a.length}),children:o("Save")}):null,e.showCancel!==false?jsx(ve,{disabled:x,onClick:()=>C({type:"cancel",scopeId:e.scopeId}),children:o("Cancel")}):null,e.errorCode?jsx(ve,{disabled:x,onClick:()=>C({type:"retry",scopeId:e.scopeId}),children:o("Retry")}):null]})]})}r(Ek,"SelectionDraft");var Ak={h1:r(({children:e})=>jsx("h1",{className:"mb-3 mt-6 text-xl font-bold first:mt-0",children:e}),"h1"),h2:r(({children:e})=>jsx("h2",{className:"mb-3 mt-6 text-lg font-semibold first:mt-0",children:e}),"h2"),h3:r(({children:e})=>jsx("h3",{className:"mb-2 mt-5 text-base font-semibold first:mt-0",children:e}),"h3"),h4:r(({children:e})=>jsx("h4",{className:"mb-2 mt-4 text-sm font-semibold first:mt-0",children:e}),"h4"),p:r(({children:e})=>jsx("p",{className:"my-3 break-words leading-6 first:mt-0 last:mb-0",children:e}),"p"),ul:r(({children:e})=>jsx("ul",{className:"my-3 list-disc space-y-1 pl-6",children:e}),"ul"),ol:r(({children:e})=>jsx("ol",{className:"my-3 list-decimal space-y-1 pl-6",children:e}),"ol"),li:r(({children:e})=>jsx("li",{className:"break-words leading-6",children:e}),"li"),blockquote:r(({children:e})=>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})=>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})=>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})=>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})=>jsx("div",{className:"my-4 max-w-full overflow-x-auto rounded-lg border border-border/60",children:jsx("table",{className:"min-w-full border-collapse text-sm",children:e})}),"table"),thead:r(({children:e})=>jsx("thead",{className:"bg-muted/55",children:e}),"thead"),tbody:r(({children:e})=>jsx("tbody",{className:"divide-y divide-border/60",children:e}),"tbody"),tr:r(({children:e})=>jsx("tr",{className:"divide-x divide-border/60",children:e}),"tr"),th:r(({children:e})=>jsx("th",{className:"whitespace-nowrap px-3 py-2 text-left font-semibold",children:e}),"th"),td:r(({children:e})=>jsx("td",{className:"min-w-32 px-3 py-2 align-top",children:e}),"td"),hr:r(()=>jsx("hr",{className:"my-6 border-border"}),"hr")};function zk({content:e,className:t}){let o=String(e||"").trim();return o?jsx("div",{className:l("min-w-0 max-w-full text-sm text-foreground",t),"data-monkeys-component":"markdown-content",children:jsx(Dk,{remarkPlugins:[Lk],components:Ak,skipHtml:true,urlTransform:defaultUrlTransform,children:o})}):jsx("div",{className:l("text-sm text-muted-foreground",t),children:"\u2014"})}r(zk,"MarkdownContent");function Ok({viewMode:e="list",heading:t,metadata:o,message:n,actions:a,outputs:s,children:i,className:m,...c}){return 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",m),children:[jsxs("div",{"data-task-part":"details",className:l("flex min-w-0 flex-col",e==="grid"?"flex-1":"min-h-60"),children:[jsx("div",{className:"mb-global flex flex-wrap items-center gap-global",children:t}),o!=null&&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}),i,n!=null&&jsx("div",{className:"mt-global break-words text-sm text-destructive-text",children:n}),a!=null&&jsx("div",{className:"mt-auto flex flex-wrap gap-global pt-global",children:a})]}),s!=null&&jsx("div",{"data-task-part":"outputs",className:l("min-w-0 w-full",e==="grid"&&"-order-1"),children:s})]})}r(Ok,"WorkbenchTaskCard");function _k({title:e,filters:t,sortOrder:o,viewMode:n,onSortOrderChange:a,onViewModeChange:s,labels:i,disabled:m,className:c}){return jsx(zs,{"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:jsxs(Fragment,{children:[t,jsxs("div",{className:"flex items-center gap-global",children:[jsx(ve,{type:"button",variant:"outline",disabled:m,title:i.sort,icon:o==="latest"?jsx(ArrowDownWideNarrow,{}):jsx(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"?i.latest:i.oldest}),jsx(ve,{type:"button",variant:"outline",disabled:m,icon:n==="list"?jsx(Grid2X2,{}):jsx(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:()=>s(n==="list"?"grid":"list"),children:n==="list"?i.gridView:i.listView})]})]}),children:e})}r(_k,"WorkbenchTaskToolbar");function $k({items:e=[],children:t,hasOutputs:o,viewMode:n="list",ariaLabel:a,previewLabel:s,processingLabel:i,processing:m=false,emptyState:c,onPreview:d,className:g}){let u=n==="grid"?"aspect-square w-full":"aspect-square w-[calc((100%-3*var(--global-spacing))/4)] min-w-32 max-w-48";return 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?jsx("button",{type:"button",onClick:()=>d(p),"aria-label":p.previewLabel||s,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",u),children:p.content},p.id):jsx("div",{className:l("flex shrink-0 snap-start items-center justify-center overflow-hidden rounded-lg border bg-muted/20",u),children:p.content},p.id):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))&&(m?jsx("div",{role:"status","aria-label":i,className:l("flex shrink-0 items-center justify-center rounded-lg border bg-gradient-to-br from-muted via-background to-muted",u),children: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"})}):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($k,"WorkbenchTaskOutputs");function Jk({src:e,kind:t,alt:o,expanded:n=false,loading:a=false,failed:s=false,loadingLabel:i,errorLabel:m,onError:c,renderMedia:d}){return d?jsx(Fragment,{children:d({src:e,kind:t,alt:o,expanded:n,loadingLabel:i,errorLabel:m})}):a?jsx("span",{role:"status","aria-label":i,children:jsx(Loader2,{"aria-hidden":"true",className:"size-6 animate-spin text-muted-foreground motion-reduce:animate-none"})}):s||!e||t==="3d"?jsx("span",{role:"img","aria-label":m,children:jsx(ImageOff,{"aria-hidden":"true",className:"size-6 text-muted-foreground"})}):t==="video"?jsxs("span",{className:n?"contents":"relative block size-full",children:[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&&jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 flex items-center justify-center",children: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:jsx(Play,{className:"ml-0.5 size-5 !fill-[hsl(var(--monkeys-color-media-foreground))] !stroke-[hsl(var(--monkeys-color-media-foreground))] sm:size-6"})})})]}):jsx(ar,{src:e,alt:o,loading:"lazy",onError:c,className:n?"h-auto w-auto max-h-[75vh] max-w-full":void 0})}r(Jk,"WorkbenchTaskMedia");function ow({text:e,labels:t,className:o}){let n=useId(),a=useRef(null),s=useRef(null),[i,m]=useState(false),[c,d]=useState(false),[g,u]=useState(false),[p,f]=useState(false),[b,h]=useState(3),y=e||t.empty;return useEffect(()=>{m(false),u(false),f(false);},[y]),useEffect(()=>{let v=s.current,k=a.current;if(!v||!k)return;let x=r(()=>{let T=getComputedStyle(v),E=Number.parseFloat(T.lineHeight)||20,N=k.closest('[data-record-layout="horizontal"]'),O=!!N,V=O?k.closest('[data-record-part="details"]'):null,W=N?.querySelector('[data-record-part="media"]'),F=V?Array.from(V.children).slice(Array.from(V.children).indexOf(k)+1).reduce((M,$)=>{let J=getComputedStyle($),_=Number.parseFloat(J.marginTop)||0,ee=Number.parseFloat(J.marginBottom)||0;return M+$.getBoundingClientRect().height+_+ee},0):0,H=k.clientHeight||E*3+40;if(O&&V){let M=k.getBoundingClientRect(),$=V.getBoundingClientRect();H=Math.max(H,$.bottom-M.top-F);}else if(!O)H=k.clientHeight||E*3+40;else if(N&&W){let M=k.getBoundingClientRect(),$=W.getBoundingClientRect(),J=M.top-$.top;H=Math.max(H,$.height-J);}let I=v.cloneNode(true);I.style.cssText=["position:absolute","visibility:hidden","display:block","height:auto","max-height:none",`width:${v.getBoundingClientRect().width}px`,"overflow:visible","flex:none","-webkit-line-clamp:unset"].join(";"),k.appendChild(I);let G=I.scrollHeight||v.scrollHeight;I.remove();let q=Math.max(E,H-40),R=O?G>H+1:G>q+1,D=Math.max(1,Math.floor(q/E));h(D),d(R),f(O),u(true);},"measure");if(x(),typeof ResizeObserver>"u")return;let w=new ResizeObserver(x);w.observe(v),w.observe(k);let S=k.closest('[data-record-layout="horizontal"]')?.querySelector('[data-record-part="details"]');return S&&w.observe(S),()=>w.disconnect()},[y]),jsxs("div",{ref:a,"data-monkeys-component":"workbench-task-prompt","data-expanded":i||void 0,"data-overflowing":g&&p&&c?"true":void 0,style:g&&p&&!c?{blockSize:"auto",minBlockSize:0}: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:[jsx("p",{ref:s,id:n,className:l("min-h-0 flex-1 whitespace-pre-wrap break-words text-sm leading-5 text-foreground [overflow-wrap:anywhere]"),style:i||!c?void 0:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:b,overflow:"hidden"},children:y}),(c||i)&&jsxs("button",{type:"button","aria-expanded":i,"aria-controls":n,onClick:()=>m(v=>!v),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:[i?t.less:t.more,i?jsx(ChevronUp,{"aria-hidden":"true",className:"size-4"}):jsx(ChevronDown,{"aria-hidden":"true",className:"size-4"})]})]})}r(ow,"WorkbenchTaskPrompt");function nw({kind:e="media",viewMode:t="list",text:o,previewLabel:n,children:a,onPreview:s}){if(e==="text")return 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??a});let i=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"&&s?jsx("button",{type:"button",className:l(i,"focus-visible:outline focus-visible:outline-2"),"aria-label":n,onClick:s,children:a}):jsx("div",{className:i,children:a})}r(nw,"WorkbenchTaskOutputItem");function sw({filename:e,preview:t,previewLabel:o,downloadLabel:n,downloading:a=false,disabled:s=false,onPreview:i,onDownload:m}){return 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?jsx("button",{type:"button",onClick:i,"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}):jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-global-1/2",children:jsx(FileSpreadsheet,{className:"size-10 text-green-600","aria-hidden":"true"})}),jsxs("div",{className:"flex shrink-0 items-center gap-global-1/2 border-t p-global-1/2",children:[jsxs("div",{className:"min-w-0 flex-1",children:[jsx("p",{className:"line-clamp-2 break-all text-sm font-medium",title:e,children:e}),jsx("p",{className:"text-sm text-muted-foreground",children:"XLSX"})]}),jsx("button",{type:"button","aria-label":n,title:n,disabled:s||a||!m,onClick:m,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?jsx(Loader2,{className:"size-4 animate-spin motion-reduce:animate-none"}):jsx(Download,{className:"size-4"})})]})]})}r(sw,"WorkbenchTaskSpreadsheet");function cw({startTime:e,endTime:t,running:o=false,mode:n="absolute",className:a}){let{locale:s}=xt(),[i,m]=useState(Date.now);useEffect(()=>{if(n==="absolute"||n==="duration"&&!o)return;let f=setInterval(()=>{document.visibilityState==="visible"&&m(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?i:void 0;if(!e||!f||f<e)return null;let b=(f-e)/1e3;return 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(s,{dateStyle:"medium",timeStyle:"medium"}).format(c),g=Math.max(0,(i-c)/1e3),[u,p]=g<60?[g,"second"]:g<3600?[g/60,"minute"]:g<86400?[g/3600,"hour"]:[g/86400,"day"];return jsx("time",{className:a,dateTime:new Date(c).toISOString(),title:d,children:n==="absolute"?d:new Intl.RelativeTimeFormat(s,{numeric:"auto"}).format(-Math.floor(u),p)})}r(cw,"WorkbenchTaskTime");function pw({data:e,viewMode:t="list",title:o,openLabel:n,closeLabel:a,renderEditor:s}){let[i,m]=useState(false),[c,d]=useState(5),g=useRef(null);return useEffect(()=>{let u=g.current;if(!u)return;let p=r(()=>{let b=getComputedStyle(u),h=Number.parseFloat(b.lineHeight),y=Number.parseFloat(b.rowGap)||0;h>0&&d(Math.max(0,Math.floor((u.clientHeight+y)/(h+y))));},"measure");if(p(),typeof ResizeObserver>"u")return;let f=new ResizeObserver(p);return f.observe(u),()=>f.disconnect()},[]),jsxs("section",{className:"monkeys-task-measurements","data-view-mode":t,children:[jsxs("div",{className:"flex size-full flex-col gap-global overflow-hidden rounded-lg border border-border bg-background p-global text-left",children:[jsx("span",{className:"text-sm font-medium",children:e.garment_type||o}),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(u=>u.size!==null&&u.size!==0).slice(0,c).map((u,p)=>jsxs("div",{className:"contents",children:[jsx("dt",{className:"truncate",children:u.name}),jsxs("dd",{children:[u.size," ",u.unit]})]},p))}),jsx(ve,{label:n,onClick:()=>m(true)})]}),jsx(Nn,{open:i,onOpenChange:m,title:o,closeLabel:a,portal:true,className:"w-[min(60rem,95vw)] max-w-none",children:i&&jsx("div",{className:"max-h-[75vh] min-w-0 overflow-auto",children:s({data:e})})})]})}r(pw,"WorkbenchMeasurementsPreview");function vw({item:e,playLabel:t,selectionMode:o}){let[n,a]=useState(false);if(useEffect(()=>a(false),[e.thumbnailSrc,e.src]),e.notice||e.status==="blocked")return 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 s=n?e.src:e.thumbnailSrc||e.src;return s?e.mediaType==="video"?jsxs("div",{"data-history-video-surface":true,className:"group relative size-full bg-[hsl(var(--monkeys-color-media-surface))]",children:[jsx("video",{src:s,autoPlay:true,muted:true,playsInline:true,preload:"metadata",onLoadedMetadata:({currentTarget:i})=>{Number.isFinite(i.duration)&&i.duration>0&&(i.currentTime=Math.min(.1,i.duration/2));},onLoadedData:({currentTarget:i})=>{i.currentTime>0&&i.pause();},onSeeked:({currentTarget:i})=>i.pause(),className:"size-full object-contain","aria-label":e.alt}),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)]"}),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:jsx(Play,{className:"size-4 fill-current"})})]}):jsx("img",{src:s,alt:e.alt??"",loading:"lazy",onError:()=>{!n&&e.src&&s!==e.src&&a(true);},className:"size-full object-contain opacity-100"}):jsx("div",{className:"size-full bg-muted","aria-hidden":"true"})}r(vw,"HistoryMedia");function kw({items:e,loading:t=false,loadingMore:o=false,error:n,hasMore:a=false,pageKey:s,expanded:i,selectedIds:m,selectionMode:c,className:d,itemClassName:g,labels:u,busy:p=false,popupScale:f=1,panelClassName:b,buttonClassName:h,buttonVariant:y="outline",onRetry:v,onLoadMore:k,onExpandedChange:x,onSelectionModeChange:w,onSelectedIdsChange:C,onItemActivate:S,onDelete:T,onItemDragStart:E}){let N=useRef(null),[O,V]=useState(),[W,F]=useState(false),[H,I]=useState(false),[G,q]=useState([]),R=i??W,D=c??H,M=m??G,$=useMemo(()=>new Set(M),[M]),J=useRef(M);J.current=M;let _=Number.isFinite(f)&&f>0?f:1;useLayoutEffect(()=>{if(!R||!N.current)return;let B=0,j=r(()=>{let ye=N.current?.getBoundingClientRect();ye&&V({left:ye.left,width:ye.width,bottom:Math.max(0,window.innerHeight-ye.bottom)});},"measure"),ne=r(()=>{cancelAnimationFrame(B),B=requestAnimationFrame(j);},"schedule");j();let fe=typeof ResizeObserver=="function"?new ResizeObserver(ne):void 0;return fe?.observe(N.current),window.addEventListener("resize",ne),window.addEventListener("scroll",ne,true),()=>{fe?.disconnect(),cancelAnimationFrame(B),window.removeEventListener("resize",ne),window.removeEventListener("scroll",ne,true);}},[R]),useEffect(()=>{let B=new Set(e.map(ne=>ne.id)),j=M.filter(ne=>B.has(ne));j.length!==M.length&&(q(j),C?.(j));},[e,M,C]);let ee=r(B=>{i===void 0&&F(B),x?.(B);},"setExpanded"),K=r(B=>{c===void 0&&I(B),w?.(B),B||Z([]);},"setSelection"),Z=r(B=>{J.current=B,m===void 0&&q(B),C?.(B);},"updateSelection"),re=r(B=>{if(p||B.selectable===false)return;let j=J.current;Z(j.includes(B.id)?j.filter(ne=>ne!==B.id):[...j,B.id]);},"toggle"),ae=r(B=>{let j=$.has(B.id),ne=B.selectable!==false&&!p;return jsxs("div",{"data-history-selection-key":B.id,"data-history-item-id":B.id,role:D?"checkbox":"button","aria-checked":D?j:void 0,"aria-label":D?B.label??u.selectItem:B.alt,"aria-disabled":(D?!ne:B.disabled)||void 0,tabIndex:(D?ne:!B.disabled)?0:void 0,draggable:!!(B.draggable&&!D&&!B.disabled),onDragStart:fe=>{if(!B.draggable||D||B.disabled){fe.preventDefault();return}E?.(fe,B);},onClick:fe=>{D?(fe.stopPropagation(),re(B)):B.disabled||S?.(B);},onKeyDown:fe=>{(fe.key===" "||fe.key==="Enter")&&(fe.preventDefault(),D?re(B):B.disabled||S?.(B));},...B.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",j&&"border-primary ring-2 ring-primary/70",B.disabled&&"opacity-60",D&&ne&&"cursor-pointer",g),children:[jsx(vw,{item:B,playLabel:u.playVideo,selectionMode:D}),D&&ne?jsx("span",{className:"pointer-events-none absolute right-1 top-1 z-10 flex items-center justify-center",children:jsx(dn,{checked:j,controlSize:"sm","aria-hidden":"true",tabIndex:-1,readOnly:true})}):null]},B.id)},"renderItem"),le=r(B=>jsx(Xo,{items:e,config:{getItemKey:r(j=>j.id,"getItemKey"),layout:{mode:B,cardWidth:B==="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:s,variant:"spinner",autoFill:true},windowed:true,appearance:{hover:"none"},labels:{collection:u.ariaLabel,loading:u.loading,loadingMore:u.loadingMore,empty:u.empty}},classNames:{loadMore:"h-px min-h-0 overflow-hidden"},slots:{loadMore:jsx("span",{"aria-hidden":"true",className:"block h-px"})},callbacks:{onLoadMore:B==="grid"||!R?k:void 0},renderItem:ae}),"collection"),L=r((B,j,ne,fe=false)=>jsx(ve,{icon:jsx(B,{className:"size-full"}),iconOnly:true,ariaLabel:j,size:"md",variant:y,className:h,disabled:fe,onClick:ne}),"button"),me=jsxs("div",{role:"alert",className:"flex min-h-20 flex-col items-center justify-center gap-1 p-2 text-center text-sm",children:[jsx("span",{children:u.loadError}),jsx("span",{className:"text-xs text-muted-foreground",children:u.loadErrorDescription}),v?jsx(ve,{size:"sm",variant:"outline",label:u.retry,onClick:v}):null]});return jsxs("div",{ref:N,"data-workbench-history-result":true,className:l("relative w-full min-w-0 max-w-full rounded-lg",b,d),children:[e.length?jsxs("div",{className:"flex min-w-0 items-center gap-2 p-3",children:[L(R?Minimize2:Maximize2,R?u.collapse:u.expand,()=>ee(!R)),jsx("div",{className:"min-w-0 flex-1",children:le("rail")})]}):t?jsx(jo,{title:u.loading,variant:"spinner",className:"min-h-20 p-2"}):n?me:jsx(va,{title:u.empty,className:"min-h-20 p-2"}),R&&typeof document<"u"?createPortal(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:O?.left??0,width:(O?.width??0)/_,bottom:O?.bottom??0,transform:`scale(${_})`,transformOrigin:"left bottom"},children:[jsxs("div",{className:"max-h-[50vh] overflow-y-auto p-3",style:{marginBottom:72,maxHeight:"50vh",overflowY:"auto"},children:[le("grid"),n&&e.length?jsxs("div",{role:"alert",className:"flex items-center gap-2 text-xs",children:[u.refreshError,v?jsx(ve,{size:"sm",label:u.retry,onClick:v}):null]}):null]}),jsxs("div",{className:"absolute inset-x-3 bottom-3 flex items-center justify-between gap-2",children:[L(Minimize2,u.collapse,()=>ee(false)),jsx("div",{className:"flex items-center gap-1.5",children:D?jsxs(Fragment,{children:[jsx("span",{className:"rounded-full border border-border px-2 py-1 text-xs",children:u.selectedCount}),L(X,u.exitSelection,()=>K(false),p),T?L(Trash2,u.deleteSelected,()=>{p||T(M);},!M.length||p):null]}):T?L(Trash2,u.enterSelection,()=>K(true),p):null})]})]}),document.body):null]})}r(kw,"WorkbenchHistoryResult");function Tw({open:e,title:t,description:o,name:n,nameLabel:a,namePlaceholder:s,createLabel:i,cancelLabel:m,closeLabel:c,creating:d=false,error:g,showError:u=true,className:p,onOpenChange:f,onNameChange:b,onCreate:h}){let y=useId(),v=useRef(null),[k,x]=useState(false),[w,C]=useState(null),S=useRef(false),T=useRef(false);useEffect(()=>{e||(S.current=false,C(null),x(false));},[e]);let E=d,N=r(W=>{!E&&!T.current&&f?.(W);},"close"),O=r(async()=>{if(!(!n.trim()||E||T.current||S.current||!h)){T.current=true,x(true);try{await h();}finally{T.current=false;}}},"create"),V={radius:"lg"};return jsx(Nn,{open:e,onOpenChange:N,title:t,description:o,closeLabel:c,closeOnEscape:!E,closeOnOverlayClick:!E,showCloseButton:!E,portal:true,initialFocus:"explicit",initialFocusRef:v,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:jsxs("div",{className:"flex justify-end gap-2",children:[jsx(ve,{size:"lg",appearance:V,className:"text-sm",disabled:E,onClick:()=>N(false),children:m}),jsx(ve,{size:"lg",tone:"primary",appearance:{...V,slots:{buttonPrimary:"border-primary bg-primary text-primary-foreground hover:bg-primary/90"}},className:"text-sm",loading:d,disabled:E||!n.trim(),onClick:O,children:i})]}),children:jsxs("div",{className:"space-y-4","data-monkeys-component":"create-collection-dialog",children:[jsxs("div",{className:"space-y-2 py-2",children:[jsx("label",{htmlFor:y,className:"text-sm font-medium leading-5",children:a}),jsx(rr,{ref:v,id:y,maxLength:80,"aria-label":a,placeholder:s,value:w??n,disabled:E,onCompositionStart:W=>{S.current=true,C(W.currentTarget.value);},onCompositionEnd:W=>{S.current=false,C(null),b?.(W.currentTarget.value);},onChange:W=>{S.current?C(W.currentTarget.value):b?.(W.currentTarget.value);},onKeyDown:W=>{W.key==="Enter"&&!W.nativeEvent.isComposing&&!S.current&&(W.preventDefault(),O());}})]}),k&&!d&&u&&g&&jsx("div",{role:"alert",className:"text-sm text-destructive-text",children:g})]})})}r(Tw,"WorkbenchCreateCollectionDialog");function Ew({open:e,items:t,selectedId:o,name:n,title:a,description:s,nameLabel:i,namePlaceholder:m,createLabel:c,confirmLabel:d,cancelLabel:g,closeLabel:u,loadingLabel:p,emptyLabel:f,loading:b=false,creating:h=false,adding:y=false,createError:v,confirmError:k,showCreateError:x=true,showConfirmError:w=true,className:C,onOpenChange:S,onSelectedIdChange:T,onNameChange:E,onCreate:N,onConfirm:O}){let V=useId(),W=useRef(null),F=useRef(false),H=useRef(false),[I,G]=useState(null);useEffect(()=>{e||(F.current=false);},[e]);let q=h||y||I!==null,R=t.some($=>$.id===o),D=r($=>{!q&&!H.current&&S?.($);},"close"),M=r(async $=>{let J=$==="create"?N:O;if(!(q||H.current||!J||($==="create"?!n.trim()||F.current:!R))){H.current=true,G($);try{await J();}catch{}finally{H.current=false,G(null);}}},"submit");return jsx(Nn,{open:e,onOpenChange:D,title:a,description:s,closeLabel:u,portal:true,closeOnEscape:!q,closeOnOverlayClick:!q,showCloseButton:!q,initialFocus:"explicit",initialFocusRef:W,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:jsxs("div",{className:"flex justify-end gap-global",children:[jsx(ve,{variant:"outline",className:"h-10",appearance:{radius:"lg"},disabled:q,onClick:()=>D(false),children:g}),jsx(ve,{variant:"outline",className:"h-10",appearance:{radius:"lg"},disabled:q||!R,loading:y||I==="confirm",onClick:()=>M("confirm"),children:d})]}),children:jsxs("div",{className:"flex min-h-0 flex-col gap-global-2","data-monkeys-component":"add-to-collection-dialog","aria-busy":q||b,children:[jsxs("div",{className:"flex items-center gap-global",children:[jsx(rr,{ref:W,id:V,"aria-label":i,placeholder:m,appearance:"shadow",className:"min-w-0 flex-1",value:n,disabled:q,onChange:$=>E?.($.currentTarget.value),onCompositionStart:()=>{F.current=true;},onCompositionEnd:()=>{F.current=false;},onKeyDown:$=>{$.key==="Enter"&&!$.nativeEvent.isComposing&&!F.current&&($.preventDefault(),M("create"));}}),jsx(ve,{variant:"outline",appearance:{radius:"lg"},icon:jsx(FolderPlus,{}),className:"h-10 shrink-0",disabled:q||!n.trim(),loading:h||I==="create",onClick:()=>M("create"),children:c})]}),x&&v&&jsx("p",{role:"alert",className:"text-sm text-destructive-text",children:v}),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?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($=>jsx(ve,{variant:"outline",icon:jsx(FolderOpen,{className:"size-4 shrink-0","aria-hidden":"true"}),endIcon:o===$.id?jsx(Check,{className:"size-4 shrink-0","aria-hidden":"true"}):void 0,label:$.name,classNames:{label:"min-w-0 flex-1 truncate text-left"},"aria-pressed":o===$.id,disabled:q,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===$.id?"border-foreground bg-muted text-foreground":"border-border bg-background text-foreground hover:bg-muted"),onClick:()=>T?.($.id)},$.id))}),w&&k&&jsx("p",{role:"alert",className:"text-sm text-destructive-text",children:k})]})})}r(Ew,"WorkbenchAddToCollectionDialog");function Dw({renderPreview:e,...t}){return jsx(Fragment,{children:e(t)})}r(Dw,"WorkbenchMediaPreview");
|
|
29
|
+
var Em=Object.defineProperty;var r=(e,t)=>Em(e,"name",{value:t,configurable:true});function l(...e){return twMerge(e.filter(Boolean).join(" "))}r(l,"cn");function z(e){return e!=null&&typeof e!="boolean"}r(z,"hasRenderableNode");function Al(e){return typeof e=="string"?e.trim().length>0:z(e)}r(Al,"hasNonEmptyRenderableNode");var zm=createContext(void 0);function zl(e){let t=useContext(zm);return useMemo(()=>e?t?{...t,...e,slots:{...t.slots,...e.slots},styles:{...t.styles,...e.styles}}:e:t,[e,t])}r(zl,"useDataExplorerAppearance");function Ot(...e){return e.filter(Boolean).join(" ")}r(Ot,"cn");function Zn(e,t){return typeof e=="function"?e(t):e}r(Zn,"resolveDataExplorerValue");var Om={},Fl={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"},Fm={flush:{surfaceRoot:"relative flex h-full min-h-0 w-full min-w-0 overflow-hidden"}},Hm={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"}},Vm={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"}},Gm={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"}},_m={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"}},Ol={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"}},jm={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"}},$m=Object.keys(Fl);function Km(...e){return $m.reduce((t,o)=>(t[o]=Ot(...e.map(n=>n?.[o])),t),{})}r(Km,"mergeSlots");function Um(...e){return e.reduce((t,o)=>({...t,...o}),{})}r(Um,"mergeStyles");function qm(e){let t=Ol[e];if(!t)throw new TypeError(`Unknown Data Explorer theme preset "${String(e)}". Expected one of: ${Object.keys(Ol).join(", ")}.`);return t}r(qm,"getPresetDefaults");function Hl(e){let t=e?.preset??"default",o=e?.surface??"card",n=qm(t),a=e?.density??n.density??"default",s=e?.radius??n.radius??"md",i=e?.border??n.border??"solid",m=e?.background??n.background??"plain",c=Km(Fl,jm[t],Hm[a],Vm[s],Gm[i],_m[m],e?.slots);return o==="flush"&&(c.surfaceRoot=Ot(Fm.flush.surfaceRoot,e?.slots?.surfaceRoot)),{surface:o,preset:t,density:a,radius:s,border:i,background:m,styles:Um(Om,e?.styles),slots:c}}r(Hl,"resolveDataExplorerAppearance");function Vl(e,t){if(t==="primary")return e.slots.menuItemPrimary;if(t==="danger")return e.slots.menuItemDanger;if(t==="muted")return e.slots.menuItemMuted}r(Vl,"getDataExplorerMenuItemToneClassName");var Ai={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",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 Gl(e,t){return t?{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(Gl,"mergeMonkeysLocaleMessages");var Qn={locale:Ai.locale,messages:Gl(Ai.messages)};var Ym=Object.freeze({}),Jm=Object.freeze({}),_l=Symbol.for("@inf-monkeys-tech/monkeys-design/provider-context@1");function Xm(){return Object.freeze({locale:createContext({...Qn,provided:false}),theme:createContext({provided:false}),direction:createContext({provided:false}),environment:createContext({provided:false,environment:Ym,portal:Jm})})}r(Xm,"createMonkeysProviderContexts");function Zm(){let e=globalThis,t=e[_l];if(t)return t;let o=Xm();return Object.defineProperty(e,_l,{value:o,enumerable:false,configurable:false,writable:false}),o}r(Zm,"getMonkeysProviderContexts");var oa=Zm(),zi=oa.locale,na=oa.theme,$l=oa.direction,ra=oa.environment;function Qm(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(Qm,"mergeAppearance");function xt(){try{return useContext(zi)??{...Qn,provided:!1}}catch{return {...Qn,provided:false}}}r(xt,"useMonkeysLocale");function vt(){return useContext(zi).messages}r(vt,"useMonkeysLocaleMessages");function nn(){return useContext(na).resolvedTheme}r(nn,"useMonkeysResolvedTheme");function Oe(e){let t=useContext(na).baseAppearance;return useMemo(()=>Qm(t,e),[e,t])}r(Oe,"useMonkeysBaseAppearance");function Co(){return useContext(na).statusStates??{}}r(Co,"useMonkeysStatusStates");function Oi(){return useContext($l).direction}r(Oi,"useMonkeysDirection");function Fi(){return useContext(ra).environment}r(Fi,"useMonkeysEnvironment");function Hi(){return useContext(ra).portal}r(Hi,"useMonkeysPortalOptions");function Ne(){let e=useContext(zi),t=useContext(na),o=useContext($l),n=e.provided||t.provided||o.provided;return 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 Vi(){return useContext(ra).iconResolver}r(Vi,"useMonkeysAssetIconResolver");function Kl(){return useContext(ra).imageResolver}r(Kl,"useMonkeysAssetImageResolver");function Ul(e,t){let o=new WeakMap,n=new Map,a=1;return (...s)=>{let i=s.slice(0,-1),m=s[s.length-1],c=i.map(u=>{if(!u)return 0;let p=o.get(u);return p===void 0&&(p=a++,o.set(u,p)),p}).join(":"),d=n.get(c);if(!d){let u={};for(let p of e)u[p]=t(...i.map(f=>f?.[p]));d=Object.freeze(u),n.size>=64&&n.delete(n.keys().next().value),n.set(c,d);}let g={...d};if(m)for(let u of e){let p=m[u];p&&(g[u]=t(...i.map(f=>f?.[u]),p));}return g}}r(Ul,"createStaticSlotMerger");var ep={},yt="motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",Jt="motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",aa="motion-safe:transition-transform motion-safe:duration-300 motion-safe:ease-out",ql=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"),tp=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)]"),Jl={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",Jt),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",Jt),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",aa),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",Jt),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",aa),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",Jt,"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",Jt),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",Jt),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",Jt),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",Jt),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",aa,"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",Jt),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",Jt),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)]",ql,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",tp),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]",ql),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",aa),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",Jt),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"},op={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"}},np={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"}},rp={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"}},ap={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"}},Yl={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"}},ip={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 sp(e){return Yl[e]??Yl.default}r(sp,"getPresetDefaults");var lp=Object.keys(Jl),dp=Ul(lp,l);function cp(...e){return Object.assign({},...e.filter(Boolean))}r(cp,"mergeStyles");function De(e){let t=e?.preset??"default",o=e?.variant??"default",n=sp(t),a=e?.density??n.density??"default",s=e?.state??"idle",i=e?.radius??n.radius??"md",m=e?.border??n.border??"solid",c=e?.background??n.background??"plain";return {preset:t,variant:o,density:a,state:s,radius:i,border:m,background:c,styles:cp(ep,e?.styles),slots:dp(Jl,ip[t],op[a],np[i],rp[m],ap[c],e?.slots)}}r(De,"resolveBaseAppearance");function ia(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(ia,"getBaseButtonToneClassName");function Xl(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(Xl,"getBaseBadgeToneClassName");function er(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(er,"getBaseMenuItemToneClassName");var Zl=Symbol.for("@inf-monkeys-tech/monkeys-design/bento-depth@1"),Ql=globalThis,ed=Ql[Zl]??(Ql[Zl]=createContext(0));function tr(){return useContext(ed)}r(tr,"useBentoDepth");function or({children:e,depth:t}){return jsx(ed.Provider,{value:t,children:e})}r(or,"BentoDepthProvider");function zo({children:e}){return jsx(or,{depth:0,children:e})}r(zo,"BentoScope");var sa=["background","glowColor","borderColor","borderWidth","borderStyle","radius","shadow","padding","gap"],pp={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)"},Gi=new WeakMap;function od(e,t){if(!Number.isSafeInteger(t)||t<1)throw new RangeError("Bento level must be a positive safe integer.");let o=e&&Gi.get(e)?.get(t);if(o)return o;let n={...pp},a=Object.fromEntries(sa.map(i=>[i,"builtin"]));for(let i of sa){let m=i==="padding"||i==="gap"?e?.density:e?.colorMode,c=i==="glowColor"?"component.bento":"semantic.bento",d=[`${c}.levels.level${t}.${i}`,`${c}.default.${i}`];for(let g of d){let u=m&&e?.cssValues[`${g}.${m}`]!==void 0?`${g}.${m}`:g,p=e?.cssValues[u];if(p!==void 0){n[i]=p,a[i]=u;break}}}let s=Object.freeze({values:Object.freeze(n),sources:Object.freeze(a)});if(e){let i=Gi.get(e)??new Map;i.set(t,s),Gi.set(e,i);}return s}r(od,"resolveBentoTokens");var nd="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 la(){let e=tr(),t=e+1,o=od(nn(),t),n=Object.fromEntries(sa.map(a=>[`--monkeys-bento-${a.replace(/[A-Z]/g,s=>`-${s.toLowerCase()}`)}`,o.values[a]]));return {parentDepth:e,level:t,variables:n}}r(la,"useBentoSurface");var rd="[data-monkeys-bento-level]",da="data-monkeys-scrollbar-active",ad='[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 ca(e,t=true){let o=useRef(),n=r(()=>{let s=o.current;s?.observer?.disconnect(),s?.marked.forEach(i=>i.removeAttribute(da)),o.current=void 0;},"clear");useEffect(()=>n,[t]);let a=r((s,i)=>{if(!t||!s.isConnected||!s.matches(rd))return;o.current?.root!==s&&(n(),o.current={root:s,hovered:false,marked:new Set});let m=o.current;if(i!==void 0&&(m.hovered=i),!(m.hovered||s.matches(":focus-visible")||!!s.querySelector(":focus-visible"))){m.observer?.disconnect(),m.observer=void 0,m.marked.forEach(g=>g.removeAttribute(da)),m.marked.clear();return}let d=new Set;for(let g of [s,...s.querySelectorAll(ad)])g.matches(ad)&&g.closest(rd)===s&&d.add(g);m.marked.forEach(g=>{d.has(g)||g.removeAttribute(da);}),d.forEach(g=>{m.marked.has(g)||g.setAttribute(da,"");}),m.marked=d,m.observer||(m.observer=new MutationObserver(()=>a(s)),m.observer.observe(s,{childList:true,subtree:true}));},"update");return {onPointerEnter(s){a(s.currentTarget,true),e.onPointerEnter?.(s);},onPointerLeave(s){a(s.currentTarget,false),e.onPointerLeave?.(s);},onFocusCapture(s){a(s.currentTarget),e.onFocusCapture?.(s);},onBlurCapture(s){let i=s.currentTarget;queueMicrotask(()=>a(i)),e.onBlurCapture?.(s);}}}r(ca,"useBentoScrollbarVisibility");function sd({as:e="article",title:t,description:o,media:n,header:a,footer:s,children:i,interactive:m,selected:c,disabled:d,appearance:g,variant:u,density:p,state:f,className:b,classNames:h,style:y,...v}){let k=De({...g,variant:u,density:p,state:f}),x=e,w=a!==void 0?z(a):z(t)||z(o),C=n!=null,S=!w&&!C;return jsxs(x,{...v,"aria-disabled":d||void 0,"data-variant":k.variant,"data-density":k.density,"data-state":f??(d?"disabled":c?"selected":"idle"),"data-monkeys-component":"panel","data-slot":"root","data-interactive":m||void 0,"data-selected":c||void 0,"data-disabled":d||void 0,className:l(k.slots.panelRoot,m&&!d&&k.slots.panelInteractive,c&&k.slots.panelSelected,d&&k.slots.panelDisabled,h?.root,b),style:{...k.styles.panel,...y},children:[C?jsx("div",{"data-slot":"media",className:l(k.slots.panelMedia,h?.media),children:n}):null,w?jsx("div",{"data-slot":"header",className:l(k.slots.panelHeader,h?.header),style:k.styles.panelHeader,children:a!==void 0?a:jsxs(Fragment,{children:[z(t)?jsx("div",{"data-slot":"title",className:l(k.slots.panelTitle,h?.title),children:t}):null,z(o)?jsx("div",{"data-slot":"description",className:l(k.slots.panelDescription,h?.description),children:o}):null]})}):null,i!=null?jsx("div",{"data-slot":"body",className:l(k.slots.panelBody,S&&k.slots.panelBodyStandalone,h?.body),style:k.styles.panelBody,children:i}):null,s!=null?jsx("div",{"data-slot":"footer",className:l(k.slots.panelFooter,h?.footer),style:k.styles.panelFooter,children:s}):null]})}r(sd,"BasePanel");var yp=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 ld({children:e,className:t,contentClassName:o,chrome:n="panel",headerWrap:a=false,title:s,titleIcon:i,action:m,appearance:c,classNames:d,...g}){let{parentDepth:u,level:p,variables:f}=la(),b=Oe(c),h=n==="panel",y=ca(g,h),v=yp(b?.styles?.panelBody,[d?.body,o,b?.slots?.panelBody].join(" "));return jsx(or,{depth:h?p:u,children:jsx(sd,{as:"section",appearance:{...b,slots:{...b?.slots,panelRoot:b?.slots?.panelRoot},styles:{...b?.styles,panelHeader:{...n==="plain"?{padding:0,paddingBlockEnd:"var(--global-spacing-lg, 1rem)"}:{},...b?.styles?.panelHeader},panelBody:{...!v||n==="plain"?{padding:0}:{},...b?.styles?.panelBody}}},classNames:{...d,root:l("min-h-0",h&&"gap-[var(--monkeys-bento-gap)]",h&&b?.radius===void 0&&!b?.preset&&"rounded-[var(--monkeys-bento-radius)]",h&&b?.border===void 0&&!b?.preset&&"border-[length:var(--monkeys-bento-border-width)] border-[color:var(--monkeys-bento-border-color)] [border-style:var(--monkeys-bento-border-style)]",h&&b?.background===void 0&&!b?.preset&&"bg-[var(--monkeys-bento-background)]",h&&!b?.preset&&b?.background===void 0&&"shadow-[shadow:var(--monkeys-bento-shadow)]",h&&!v&&"p-[var(--monkeys-bento-padding)]",!h&&"border-0 bg-transparent shadow-none",b?.slots?.panelRoot,d?.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",d?.header),body:l("flex min-h-0 flex-col gap-[var(--monkeys-bento-gap,var(--global-spacing,0.75rem))] p-0",b?.slots?.panelBody,d?.body,o),footer:l("px-0 pb-0 pt-[var(--monkeys-bento-gap)]",d?.footer)},header:s?jsxs("div",{style:{alignItems:b?.styles?.panelHeader?.alignItems},className:l("flex min-w-0 flex-1 items-center justify-between gap-token-md",a&&"flex-wrap"),children:[jsxs("div",{className:l("flex min-w-0 flex-1 items-center gap-token-sm",a&&"basis-auto"),children:[i?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:jsx(i,{className:"size-4 text-primary",color:"currentColor",stroke:"currentColor"})}):null,jsxs("div",{className:"min-w-0",children:[jsx("h2",{style:{margin:0},className:"truncate text-base font-semibold text-foreground",children:s}),g.description?jsx("div",{className:"mt-1 text-sm text-muted-foreground",children:g.description}):null]})]}),m?jsx("div",{className:l("shrink-0",a&&"max-w-full"),children:m}):null]}):void 0,...g,...y,"data-monkeys-bento-level":h?p:void 0,style:{...h?f:{},...g.style},children:e})})}r(ld,"BentoPanel");var hp={menu:"monkeys-overlay-surface--menu bg-menu-surface text-popover-foreground",dialog:"monkeys-overlay-surface--dialog bg-dialog-surface text-foreground"};function an(e,t={}){return ["monkeys-overlay-surface",hp[e],t.rounded===false?void 0:"monkeys-overlay-surface--rounded"].filter(Boolean).join(" ")}r(an,"getOverlaySurfaceClassName");var Cp=lt.forwardRef(({className:e,style:t,...o},n)=>jsx(So.Item,{ref:n,className:l("border-b",e),style:{borderColor:"var(--monkeys-component-accordion-item-border-color, hsl(var(--border)))",...t},...o}));Cp.displayName="AccordionItem";var Sp=lt.forwardRef(({className:e,children:t,...o},n)=>jsx(So.Header,{className:"flex",children:jsxs(So.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,jsx(ChevronDown,{"aria-hidden":"true",className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Sp.displayName="AccordionTrigger";var Tp=lt.forwardRef(({className:e,children:t,...o},n)=>jsx(So.Content,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o,children:jsx("div",{className:l("pb-4 pt-0",e),children:t})}));Tp.displayName="AccordionContent";var Rp=lt.forwardRef(({className:e,...t},o)=>jsx(ua.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:jsx(ua.Indicator,{className:"flex items-center justify-center text-current",children:jsx(Check,{"aria-hidden":"true",className:"h-4 w-4"})})}));Rp.displayName="Checkbox";var nr=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"}}),Np=lt.forwardRef(({className:e,variant:t,size:o,asChild:n=false,...a},s)=>jsx(n?Slot:"button",{ref:s,className:nr({variant:t,size:o,className:e}),...a}));Np.displayName="Button";var Ip=lt.forwardRef(({className:e,children:t,viewportClassName:o,viewportRef:n,onViewportScroll:a,scrollbar:s=true,scrollbarOrientation:i="vertical",scrollBarDisabled:m=false,type:c,...d},g)=>{let u=tr();return jsxs(so.Root,{ref:g,type:c??(u>0?"auto":void 0),className:l("group relative overflow-hidden",m&&"no-scrollbar",e),...d,children:[jsx(so.Viewport,{ref:n,onScroll:a,className:l("h-full w-full rounded-[inherit]",o),children:t}),s?jsx(dd,{orientation:i,className:l(m&&"size-0 p-0")}):null,jsx(so.Corner,{})]})});Ip.displayName="ScrollArea";var dd=lt.forwardRef(({className:e,orientation:t="vertical",...o},n)=>jsx(so.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:jsx(so.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));dd.displayName="ScrollBar";var Mp=lt.forwardRef(({className:e,...t},o)=>jsx(ma.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:jsx(ma.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"})}));Mp.displayName="Switch";var Bp=lt.forwardRef(({variant:e="default",...t},o)=>jsx(Oo.Root,{ref:o,"data-variant":e,...t}));Bp.displayName="Tabs";var Pp=lt.forwardRef(({className:e,gap:t,style:o,...n},a)=>jsx(Oo.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}));Pp.displayName="TabsList";var Ep=lt.forwardRef(({className:e,...t},o)=>jsx(Oo.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}));Ep.displayName="TabsTrigger";var Dp=lt.forwardRef(({className:e,...t},o)=>{let n=tr();return jsx(Oo.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})});Dp.displayName="TabsContent";var Wp=lt.forwardRef(({className:e,sideOffset:t=4,...o},n)=>{let a=Ne();return jsx(lo.Portal,{children:jsx(lo.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",an("menu"),e)})})});Wp.displayName="TooltipContent";var rr=lt.forwardRef(({className:e,appearance:t="standard",type:o,...n},a)=>jsx("input",{ref:a,type:o,className: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),...n}));rr.displayName="Input";var Lp=lt.forwardRef(({className:e,appearance:t="standard",...o},n)=>jsx("textarea",{ref:n,className: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),...o}));Lp.displayName="Textarea";function pa(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(pa,"svgPreviewSurface");var Ap=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"),Ki=lt.forwardRef(({aspectRatio:e="square",maxSquareHeight:t=true,className:o,...n},a)=>jsx("div",{ref:a,className:Ap({aspectRatio:e,maxSquareHeight:t,className:o}),...n}));Ki.displayName="MediaPreviewFrame";var ar=lt.forwardRef(({fit:e="contain",className:t,style:o,...n},a)=>{let s=pa(n.src);return jsx("img",{ref:a,className:l("block size-full",e==="contain"?"object-contain":"object-cover",t),style:{...s,...s?{objectFit:e}:{},...o},...n})});ar.displayName="MediaPreviewImage";var pd=Symbol.for("@inf-monkeys-tech/monkeys-design/dialog-dock@1"),gd=globalThis,Fp=gd[pd]??(gd[pd]=lt.createContext(null)),Lt=r(()=>lt.useContext(Fp),"useDialogDock");var Ui=lt.forwardRef(({children:e,className:t,style:o,closeLabel:n="Close",showCloseButton:a=true,onInteractOutside:s,...i},m)=>{let c=Lt(),d=lt.useId(),g=lt.useRef(null),u=lt.useRef(false);return lt.useEffect(()=>{u.current&&!c?.collapsed&&c?.activeId===d&&g.current?.focus(),u.current=!!c?.collapsed;},[c?.collapsed,c?.activeId,d]),lt.useEffect(()=>c?.register(d),[c?.register,d]),c?.container?jsx(bt.Portal,{container:c.container,children:jsx("div",{style:{display:"contents"},children:jsx(zo,{children:jsx(ld,{className:"monkeys-dialog-dock-panel overflow-auto",contentClassName:"shrink-0",style:{display:c.activeId===d?void 0:"none"},children:jsxs(bt.Content,{...i,ref:m,"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=>{s?.(p),p.preventDefault();},children:[e,c.collapsible&&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:jsx(PanelRightClose,{"aria-hidden":"true",className:"size-4"})}),a&&jsxs(bt.Close,{className:"monkeys-dialog-dock-close","aria-label":typeof n=="string"?n:void 0,children:[jsx(X,{"aria-hidden":"true",className:"size-4"}),jsx("span",{className:"sr-only",children:n})]})]})})})})}):null});Ui.displayName="DockedDialogContent";var fd=Symbol.for("@inf-monkeys-tech/monkeys-design/dialog-open@1"),yd=globalThis,hd=yd[fd]??(yd[fd]=lt.createContext(false));function ba({open:e,defaultOpen:t,onOpenChange:o,modal:n,...a}){let s=Lt(),[i,m]=lt.useState(t??false),c=e??i;return jsx(hd.Provider,{value:c,children:jsx(bt.Root,{...a,open:c,modal:s?false:n,onOpenChange:d=>{m(d),o?.(d);}})})}r(ba,"Dialog");var Vp=bt.Portal;var xd=lt.forwardRef(({className:e,...t},o)=>{let n=Ne();return jsx(bt.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})});xd.displayName="DialogOverlay";var vd=lt.forwardRef(({className:e,...t},o)=>{let n=Ne();return jsx(bt.Content,{...n,...t,ref:o,className:e,"data-monkeys-component":"dialog","data-slot":"content","data-surface":"dialog","data-monkeys-dialog-content":true})});vd.displayName="DialogSurfaceContent";var ln=lt.forwardRef(({className:e,children:t,showCloseButton:o=true,closeLabel:n="Close",overlayClassName:a,overlayStyle:s,...i},m)=>{let c=Lt(),d=lt.useContext(hd);return c?d?jsx(Ui,{...i,ref:m,className:e,showCloseButton:o,closeLabel:n,children:t}):null:jsxs(Vp,{children:[jsx(xd,{className:a,style:s}),jsxs(vd,{...i,ref:m,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",an("dialog"),e),children:[jsx(zo,{children:t}),o?jsxs(bt.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:[jsx(X,{"aria-hidden":"true",className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:n})]}):null]})]})});ln.displayName="DialogContent";var Gp=lt.forwardRef(({className:e,...t},o)=>jsx(ln,{ref:o,className:l("duration-0 data-[state=open]:animate-none data-[state=closed]:animate-none",e),...t}));Gp.displayName="DialogContentNoAnimation";var _p=r(({className:e,...t})=>jsx("div",{className:l(Lt()?.showTitle===false?"contents":"flex flex-col space-y-1.5 text-center sm:text-left",e),...t}),"DialogHeader");_p.displayName="DialogHeader";var jp=r(({className:e,...t})=>jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),"DialogFooter");jp.displayName="DialogFooter";var ir=lt.forwardRef(({className:e,...t},o)=>jsx(bt.Title,{ref:o,className:l("text-lg font-semibold leading-none tracking-tight",e,Lt()?.showTitle===false&&"sr-only"),...t}));ir.displayName="DialogTitle";var sr=lt.forwardRef(({className:e,...t},o)=>jsx(bt.Description,{ref:o,className:l("text-sm text-muted-foreground",e),...t}));sr.displayName="DialogDescription";lt.forwardRef((e,t)=>{let o=Lt()?bt.Trigger:wt.Trigger;return jsx(o,{...e,ref:t})});var $p=wt.Portal,kd=lt.forwardRef(({className:e,style:t,...o},n)=>{let a=Ne();return jsx(wt.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}})});kd.displayName="AlertDialogOverlay";var Kp=lt.forwardRef(({className:e,style:t,children:o,...n},a)=>{let s=Ne();return Lt()?jsx(ln,{...n,...s,ref:a,role:"alertdialog",showCloseButton:false,className:e,style:t,children:o}):jsxs($p,{children:[jsx(kd,{}),jsx(wt.Content,{...s,...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",an("dialog"),e),"data-monkeys-component":"alert-dialog","data-slot":"content","data-surface":"dialog","data-monkeys-dialog-content":true,style:{pointerEvents:"auto",...t},children:jsx(zo,{children:o})})]})});Kp.displayName="AlertDialogContent";var Up=r(({className:e,...t})=>jsx("div",{className:l("flex flex-col space-y-2 text-center sm:text-left",e),...t}),"AlertDialogHeader"),qp=r(({className:e,...t})=>jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),"AlertDialogFooter"),Yp=lt.forwardRef(({className:e,...t},o)=>{let n=Lt()?bt.Title:wt.Title;return jsx(n,{ref:o,className:l("text-lg font-semibold",e,Lt()?.showTitle===false&&"sr-only"),...t})}),Jp=lt.forwardRef(({className:e,...t},o)=>{let n=Lt()?bt.Description:wt.Description;return jsx(n,{ref:o,className:l("text-sm text-muted-foreground",e),...t})}),Xp=lt.forwardRef(({className:e,...t},o)=>{let n=Lt()?bt.Close:wt.Action;return jsx(n,{ref:o,className:l(nr(),e),...t})}),Zp=lt.forwardRef(({className:e,...t},o)=>{let n=Lt()?bt.Close:wt.Action;return jsx(n,{ref:o,className:l(nr({variant:"destructive"}),e),...t})}),Qp=lt.forwardRef(({className:e,...t},o)=>{let n=Lt()?bt.Close:wt.Cancel;return jsx(n,{ref:o,className:l(nr({variant:"outline"}),"mt-2 sm:mt-0",e),...t})});Up.displayName="AlertDialogHeader";qp.displayName="AlertDialogFooter";Yp.displayName="AlertDialogTitle";Jp.displayName="AlertDialogDescription";Xp.displayName="AlertDialogAction";Zp.displayName="AlertDialogDangerAction";Qp.displayName="AlertDialogCancel";var Sd=Xt.Root,Td=Xt.Trigger;var qi=lt.forwardRef(r(function({align:t="center",sideOffset:o=4,container:n,className:a,style:s,...i},m){let c=Ne(),d=typeof document<"u"?(()=>{let u=document.activeElement?.closest("[data-monkeys-dialog-content]");return u||Array.from(document.querySelectorAll('[data-monkeys-dialog-content][data-state="open"]')).at(-1)})():void 0;return jsx(Xt.Portal,{container:n??d,children:jsx(Xt.Content,{...c,...i,ref:m,align:t,sideOffset:o,"data-monkeys-component":"popover","data-slot":"content","data-surface":"menu",className:l("z-50 w-72 border p-4 outline-hidden",an("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",a),style:{pointerEvents:"auto",...s}})})},"PopoverContent"));qi.displayName=Xt.Content.displayName;var Rd=["pulse","shimmer","shimmer-soft","shimmer-diagonal","shimmer-vertical","drift","outline","none"];function Id(e,t=false){if(!(e===void 0||Rd.includes(e))&&!(t&&(e==="shimmer-shared"||e==="shimmer-stagger")))throw new TypeError(`Skeleton animation must be ${Rd.join(", ")}${t?", shimmer-shared, or shimmer-stagger":""}.`)}r(Id,"validateSkeletonAnimation");var Ji=createContext(null),dr=createContext(void 0);function Xi(e){delete e.dataset.skeletonReady;for(let t of ["width","offset","delay"])e.style.removeProperty(`--monkeys-skeleton-${t}`);}r(Xi,"clearGeometry");function tg(e,t,o,n){let a=useMemo(()=>({nodes:new Map,update:r(()=>{},"update")}),[]);return useEffect(()=>{if(!o||t||e!=="shimmer-shared"&&e!=="shimmer-stagger")return;let s=window.matchMedia("(prefers-reduced-motion: reduce)"),i,m,c=false,d=new Set,g=r(()=>{if(m=void 0,!c)return;let b=[...a.nodes.keys()].filter(C=>C.isConnected);if(b.sort((C,S)=>C.compareDocumentPosition(S)&2?1:-1),e==="shimmer-stagger"){b.forEach((C,S)=>{let T=a.nodes.get(C)?.item??S;C.style.setProperty("--monkeys-skeleton-delay",`${Math.min(T*80,400)}ms`);});return}let h=n?.current??b[0]?.parentElement;for(let C of b)for(;h&&!h.contains(C);)h=h.parentElement;let y=new Set(b);for(let C of b)for(let S=C.parentElement;S&&(y.add(S),S!==h);S=S.parentElement);h&&y.add(h);for(let C of d)y.has(C)||(i?.unobserve(C),d.delete(C));for(let C of y)d.has(C)||(i?.observe(C),d.add(C));let v=b.map(C=>C.getBoundingClientRect()),k=b.map((C,S)=>{let T=getComputedStyle(C),E=T.boxSizing==="border-box"?0:parseFloat(T.paddingLeft)+parseFloat(T.paddingRight)+parseFloat(T.borderLeftWidth)+parseFloat(T.borderRightWidth),N=parseFloat(T.width)+E,O=N?v[S].width/N:1;return Math.abs(O-1)<1e-4?1:O}),x=Math.min(...v.map(C=>C.left)),w=Math.max(...v.map(C=>C.right));b.forEach((C,S)=>{let T=v[S];if(!T.width||!T.height){Xi(C);return}let E=k[S];C.style.setProperty("--monkeys-skeleton-width",`${(w-x)/E}px`),C.style.setProperty("--monkeys-skeleton-offset",`${(x-T.left)/E}px`),C.dataset.skeletonReady||(C.style.setProperty("--monkeys-skeleton-delay",`${-(performance.now()%2600)}ms`),C.dataset.skeletonReady="true");});},"measure"),u=r(()=>{c&&m===void 0&&(m=window.requestAnimationFrame(g));},"schedule"),p=r(()=>{c=false,i?.disconnect(),i=void 0,d.clear(),m!==void 0&&window.cancelAnimationFrame(m),m=void 0,window.removeEventListener("resize",u),window.removeEventListener("scroll",u,true),a.nodes.forEach((b,h)=>Xi(h));},"stop"),f=r(()=>{p(),!(s.matches||e==="shimmer-shared"&&typeof ResizeObserver>"u")&&(c=true,e==="shimmer-shared"&&(i=new ResizeObserver(u),window.addEventListener("resize",u),window.addEventListener("scroll",u,{capture:true,passive:true})),u());},"start");return a.update=u,f(),s.addEventListener("change",f),()=>{p(),s.removeEventListener("change",f),a.update=()=>{};}},[e,t,o,a,n]),useEffect(()=>{a.update();}),a}r(tg,"useGroupRegistry");function Ho({animation:e,animated:t,children:o,independent:n=false,containerRef:a}){if(Id(e,true),t!==void 0&&typeof t!="boolean")throw new TypeError("SkeletonGroup animated must be a boolean.");let s=useContext(Ji),i=useContext(dr),m=n||e!==void 0||!s,c=e??s?.animation??"pulse",d=!!s?.disabled||t===false||c==="none",g=tg(c,d,m,a),u=useMemo(()=>({animation:c,disabled:d,registry:m?g:s.registry}),[c,d,m,g,s]),p=jsx(Ji.Provider,{value:u,children:o});return jsx(dr.Provider,{value:m?void 0:i,children:p})}r(Ho,"SkeletonScope");function Tn({index:e,children:t}){let o=useContext(dr);return jsx(dr.Provider,{value:o??e,children:t})}r(Tn,"SkeletonItem");function og(e,t){return 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(og,"useSkeletonRef");function Md(e,t=true,o){Id(e);let n=useContext(Ji),a=useContext(dr),s=!t||n?.disabled?"none":e??n?.animation??"pulse",[i,m]=useState(null),c=og(m,o),d=e===void 0&&(s==="shimmer-shared"||s==="shimmer-stagger")?n?.registry:void 0;return useEffect(()=>{if(!(!i||!d))return d.nodes.set(i,{item:a}),d.update(),()=>{d.nodes.delete(i),Xi(i),d.update();}},[i,d,a,s]),{ref:c,mode:s,style:s==="shimmer-stagger"&&a!==void 0?{"--monkeys-skeleton-delay":`${Math.min(a*80,400)}ms`}:void 0}}r(Md,"useSkeletonMotion");function Pd(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(Pd,"resolveBaseFieldValidationResult");var es=createContext(null);function Vo(){let e=useContext(es),t=useRef(null);t.current===null&&(t.current=Symbol("BaseFieldControl"));let o=e?.registerControl;useEffect(()=>{if(!(!o||t.current===null))return o(t.current)},[o]);let n=e?.notifyBlur,a=e?.notifyChange;return {invalid:e?.invalid??false,notifyBlur:useCallback(s=>n?.(s),[n]),notifyChange:useCallback(s=>a?.(s),[a])}}r(Vo,"useBaseFieldControl");var ug={sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"},mg={sm:"text-[10px]",md:"text-[11px]",lg:"text-xs"};function pg(e,...t){for(let o of t)if(o){if(typeof o=="function"){o(e);continue}o.current=e;}}r(pg,"setRefs");var dn=forwardRef(r(function({label:t,description:o,indeterminate:n=false,invalid:a=false,disabled:s=false,controlSize:i,appearance:m,className:c,classNames:d,style:g,checked:u,defaultChecked:p,onBlur:f,onChange:b,"aria-invalid":h,...y},v){for(let[D,M]of [["indeterminate",n],["invalid",a],["disabled",s]])if(typeof M!="boolean")throw new TypeError(`BaseCheckbox ${D} must be a boolean.`);if(i!==void 0&&i!=="sm"&&i!=="md"&&i!=="lg")throw new TypeError('BaseCheckbox controlSize must be "sm", "md", or "lg".');let k=Oe(m),x=Ne(),w=De(k),C=Vo(),S=a||C.invalid,T=z(t),E=Al(o),N=useRef(null),O=useRef(n);O.current=n;let[V,W]=useState(p??false),F=u!==void 0,H=!!(F?u:V),I=n||H,G=n?"mixed":H?"checked":"unchecked",q=useCallback(D=>{N.current=D,D&&(D.indeterminate=O.current),pg(D,v);},[v]);useEffect(()=>{N.current&&(N.current.indeterminate=n);},[n]);let R=r(D=>{s||(F||W(D.currentTarget.checked),b?.(D),C.notifyChange(D.currentTarget.checked),N.current&&(N.current.indeterminate=n));},"handleChange");return jsxs("label",{...x,"data-monkeys-component":"checkbox","data-slot":"root","data-state":G,"data-size":i,"data-invalid":S||void 0,"data-disabled":s||void 0,className:l(w.slots.checkboxRoot,!E&&"items-center",s&&w.slots.checkboxDisabled,d?.root,c),style:{...w.styles.checkboxRoot,...g},children:[jsxs("span",{"data-slot":"box","data-state":G,"data-size":i,className:l(w.slots.checkboxBox,!E&&"mt-0",I&&w.slots.checkboxBoxChecked,S&&w.slots.checkboxBoxInvalid,i&&ug[i],d?.box),style:{...w.styles.checkboxBox},children:[jsx("input",{...y,ref:q,type:"checkbox",disabled:s,checked:u,defaultChecked:p,"aria-invalid":h??(S||void 0),"aria-checked":n?"mixed":H,"data-slot":"input","data-state":G,"data-size":i,"data-invalid":S||void 0,"data-disabled":s||void 0,className:l(w.slots.checkboxInput,d?.input),onBlur:D=>{f?.(D),C.notifyBlur(D.currentTarget.checked);},onChange:R}),I?jsx("span",{"aria-hidden":"true","data-slot":"indicator","data-state":G,"data-size":i,className:l(w.slots.checkboxIndicator,i&&mg[i],d?.indicator),children:n?"\u2013":"\u2713"}):null]}),T||E?jsxs("span",{"data-slot":"content",className:l(w.slots.checkboxContent,d?.content),children:[T?jsx("span",{"data-slot":"label",className:l(w.slots.checkboxLabel,d?.label),children:t}):null,E?jsx("span",{"data-slot":"description",className:l(w.slots.checkboxDescription,d?.description),children:o}):null]}):null]})},"BaseCheckbox"));function os(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(os,"resolveContainerValue");function Dd({explicitProvided:e,explicitContainer:t,providerProvided:o,providerContainer:n,getDocument:a}){if(e)return os(t,"BasePortal container");if(o)return os(n,"MonkeysProvider portal.container");if(!a)return null;let s=a();if(s===null)return null;if(!s||typeof s!="object"||!("body"in s))throw new TypeError("MonkeysProvider environment.getDocument must resolve to a Document or null.");return os(s.body,"MonkeysProvider environment.getDocument().body")}r(Dd,"resolveBasePortalContainer");function yg({mounted:e,explicitDisabled:t,explicitContainer:o,providerDisabled:n,providerContainer:a,getDocument:s}){let i=t??n??false;if(!e||i)return {mounted:e,disabled:i,shouldPortal:false,container:null,radixPortalProps:void 0};let m=Dd({explicitProvided:o!==void 0,explicitContainer:o,providerProvided:a!==void 0,providerContainer:a,getDocument:s});return m?{mounted:true,disabled:false,shouldPortal:true,container:m,radixPortalProps:Object.freeze({container:m})}:{mounted:true,disabled:false,shouldPortal:false,container:null,radixPortalProps:void 0}}r(yg,"resolveBaseOverlayPortalState");function hg(){return globalThis.document??null}r(hg,"getDefaultDocument");function To(e={}){let t=Fi(),o=Hi(),[n,a]=useState(false);return useEffect(()=>{a(true);},[]),yg({mounted:n,explicitDisabled:e.disabled,explicitContainer:e.container,providerDisabled:o.disabled,providerContainer:o.container,getDocument:t.getDocument??hg})}r(To,"useBaseOverlayPortal");function Wd(e,t){return t.shouldPortal?createPortal(e,t.container):jsx(Fragment,{children:e})}r(Wd,"renderBaseOverlayPortalContent");function ya(e,t){if(typeof e!="boolean")throw new TypeError(`BaseTooltip ${t} must be a boolean.`)}r(ya,"validateBoolean");function Tg(e){if(e!=="top"&&e!=="bottom"&&e!=="left"&&e!=="right")throw new TypeError('BaseTooltip placement must be "top", "bottom", "left", or "right".')}r(Tg,"validatePlacement");function Rg(e,t){return isValidElement(e)&&e.type!==Fragment$1?e:jsx("span",{tabIndex:!t&&z(e)?0:void 0,children:e})}r(Rg,"normalizeTrigger");var cr=forwardRef(r(function({content:t,children:o,open:n,defaultOpen:a=false,placement:s="top",disabled:i=false,portal:m=false,appearance:c,className:d,classNames:g,style:u,onOpenChange:p,...f},b){n!==void 0&&ya(n,"open"),ya(a,"defaultOpen"),ya(i,"disabled"),ya(m,"portal"),Tg(s);let h=Oe(c),y=Ne(),v=De(h),k=To({disabled:!m}),[x,w]=useState(a),C=n!==void 0,S=!i&&z(t),E=S&&(C?n:x),N=m&&k.shouldPortal?"portaled":"inline",O=r(F=>{F&&!S||(C||w(F),p?.(F));},"handleOpenChange"),V=Rg(o,i),W=S?jsx(lo.Content,{...y,side:s,sideOffset:8,collisionPadding:8,"data-monkeys-component":"tooltip","data-slot":"content","data-placement":s,"data-portal":N,"data-disabled":i||void 0,className:l(v.slots.tooltipContent,g?.content),style:v.styles.tooltip,children:t}):null;return jsx("span",{...y,...f,ref:b,"data-monkeys-component":"tooltip","data-slot":"root","data-state":E?"open":"closed","data-placement":s,"data-portal":N,"data-disabled":i||void 0,className:l(v.slots.tooltipRoot,g?.root,d),style:u,children:jsx(lo.Provider,{delayDuration:0,skipDelayDuration:0,disableHoverableContent:true,children:jsxs(lo.Root,{open:E,onOpenChange:O,delayDuration:0,disableHoverableContent:true,children:[jsx("span",{...y,"data-monkeys-component":"tooltip","data-slot":"trigger-wrapper","data-state":E?"open":"closed","data-placement":s,"data-portal":N,"data-disabled":i||void 0,className:l(v.slots.tooltipTrigger,g?.trigger),children:jsx(lo.Trigger,{asChild:true,...y,"data-monkeys-component":"tooltip","data-slot":"trigger","data-placement":s,"data-portal":N,"data-disabled":i||void 0,children:V})}),m&&k.shouldPortal?jsx(lo.Portal,{...k.radixPortalProps,children:W}):W]})})})},"BaseTooltip"));function Zt(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(Zt,"safeDisplayUrl");function Ld(e){if(typeof e!="string"||!e.trim())return;let t=e.split(",");for(let o of t){let n=o.trim().split(/\s+/);if(!Zt(n[0],"media")||n.length>2||n.length===2&&!/^(?:[1-9]\d*w|(?:\d+(?:\.\d+)?|\.\d+)x)$/.test(n[1]))return}return e}r(Ld,"safeDisplaySrcSet");function Ad({kind:e}){return jsx(e==="image"?Image:e==="video"?Video:e==="audio"?Music2:FileText,{className:"h-6 w-6","aria-hidden":"true"})}r(Ad,"PreviewIcon");function Od({src:e,kind:t="image",alt:o="Preview",title:n,aspectRatio:a="auto",fit:s="contain",controls:i=true,loading:m=false,empty:c="No preview available",error:d="Preview is unavailable right now.",className:g,style:u,classNames:p,mediaAttributes:f,onLoad:b,onError:h}){let[y,v]=useState(false),k=Zt(e,"media")??"",x=Object.fromEntries(Object.entries(f??{}).flatMap(([T,E])=>{let N=T.toLowerCase();return N==="src"||N==="srcdoc"||N==="dangerouslysetinnerhtml"?[]:N==="srcset"?[["srcSet",Ld(E)]]:N==="poster"?[["poster",Zt(E,"media")]]:[[T,E]]}));useEffect(()=>{v(false);},[k,t]);let w=r((T,E)=>jsx("div",{className:Ot("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,E),role:m?"status":"img","aria-label":typeof T=="string"?T:void 0,children:T}),"renderPlaceholder");if(m)return jsx("div",{className:Ot("min-w-0 overflow-hidden",p?.root,g),style:u,"aria-busy":"true",children:jsxs("div",{className:Ot("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:[jsx(Loader2,{className:"h-5 w-5 animate-spin","aria-hidden":"true"}),n||"Loading preview..."]})});if(!k||y)return jsx("div",{className:Ot("min-w-0 overflow-hidden",p?.root,g),style:u,children:w(jsxs(Fragment,{children:[jsx(Ad,{kind:t}),jsx("span",{className:Ot("max-w-full truncate",y?p?.error:void 0),children:y?d:c}),n?jsx("span",{className:"max-w-full truncate text-xs",children:n}):null]}))});let C=r(()=>{v(true),h?.();},"handleError"),S=t==="image"?jsx(ar,{...x,src:k,alt:o,fit:s,className:p?.media,loading:"lazy",decoding:"async",draggable:false,onLoad:b,onError:C}):t==="video"?jsx("video",{...x,src:k,className:Ot("block h-auto w-full",s==="cover"?"object-cover":"object-contain",p?.media),controls:i,preload:"metadata",onLoadedData:b,onError:C}):t==="audio"?jsx("audio",{...x,src:k,className:Ot("w-full",p?.media),controls:i,preload:"metadata",onCanPlay:b,onError:C}):w(jsxs(Fragment,{children:[jsx(Ad,{kind:"file"}),jsx("span",{className:"max-w-full truncate",children:n||k})]}));return t==="image"?jsx(Ki,{aspectRatio:a,className:Ot(p?.root,g),style:u,children:S}):jsx("div",{className:Ot("min-w-0 overflow-hidden",p?.root,g),style:u,children:S})}r(Od,"DataExplorerMediaPreview");var un=forwardRef(r(function({children:t,label:o,icon:n,tone:a,appearance:s,variant:i,density:m,state:c,className:d,classNames:g,style:u,...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(s),h=Ne(),y=De({...b,variant:i,density:m,state:c}),v=t??o,k=a??"default";return jsxs("span",{...h,...p,ref:f,"data-monkeys-component":"badge","data-slot":"root","data-tone":k,"data-variant":y.variant,"data-density":y.density,"data-state":y.state,className:l(y.slots.badgeBase,Xl(y,a),g?.root,d),style:{...y.styles.badge,...u},children:[n?jsx("span",{"data-slot":"icon","data-tone":k,className:l(y.slots.badgeIcon,g?.icon),children:n}):null,v!=null?jsx("span",{"data-slot":"label","data-tone":k,className:l(y.slots.badgeLabel,g?.label),children:v}):null]})},"BaseBadge"));var Og={sm:"h-8 px-2.5 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-3.5 text-base"},Fg={sm:"h-8 w-8 px-0",md:"h-9 w-9 px-0",lg:"h-10 w-10 px-0"},rs={sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"};function ha(e){return typeof e=="string"&&e.trim()?e:void 0}r(ha,"nonEmptyText");function Hg(){return 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:[jsx("circle",{cx:"12",cy:"12",r:"9",className:"opacity-25",stroke:"currentColor",strokeWidth:"3"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M12 3a9 9 0 0 1 9 9h-3a6 6 0 0 0-6-6V3Z"})]})}r(Hg,"LoadingIcon");var ve=forwardRef(r(function({children:t,label:o,icon:n,endIcon:a,type:s="button",title:i,ariaLabel:m,tone:c,size:d,active:g=false,iconOnly:u=false,disabled:p=false,loading:f=false,stopPropagation:b=false,appearance:h,variant:y,density:v,state:k,className:x,classNames:w,style:C,onClick:S,"aria-label":T,"aria-pressed":E,...N},O){for(let[ee,K]of [["active",g],["iconOnly",u],["disabled",p],["loading",f],["stopPropagation",b]])if(typeof K!="boolean")throw new TypeError(`BaseButton ${ee} 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 V=Oe(h),W=Ne(),F=De({...V,variant:y,density:v,state:k}),H=t??o,I=z(H)&&(typeof H!="string"||!!H.trim()),G=ha(m)??ha(T),q=typeof H=="string"?ha(H):void 0,R=ha(i);if(u&&!I&&!G&&!R)throw new TypeError("BaseButton iconOnly requires ariaLabel, aria-label, title, or a renderable label.");let D=G??q??R,M=p||f,$=c??"default",J=k??(f?"loading":p?"disabled":g?"active":"idle"),_=r(ee=>{b&&ee.stopPropagation(),!M&&S?.(ee);},"handleClick");return jsxs("button",{...W,...N,ref:O,type:s,title:i,"aria-label":D,"aria-pressed":E??(g||void 0),"aria-busy":f||void 0,"data-variant":F.variant,"data-density":F.density,disabled:M,"data-monkeys-component":"button","data-slot":"root","data-state":J,"data-tone":$,"data-size":d,"data-active":g||void 0,"data-loading":f||void 0,"data-disabled":M||void 0,"data-icon-only":u||void 0,className:l(F.slots.buttonBase,u&&F.slots.buttonIconOnly,d&&Og[d],u&&d&&Fg[d],ia(F,c,g),M&&F.slots.buttonDisabled,w?.root,x),style:{...F.styles.button,...g?F.styles.buttonActive:void 0,...M?F.styles.buttonDisabled:void 0,...C},onClick:_,children:[f?jsx("span",{"data-slot":"icon","data-state":J,"data-tone":$,"data-size":d,className:l(F.slots.buttonIcon,d&&rs[d],w?.icon),children:jsx(Hg,{})}):n?jsx("span",{"data-slot":"icon","data-state":J,"data-tone":$,"data-size":d,className:l(F.slots.buttonIcon,d&&rs[d],w?.icon),children:n}):null,u?z(H)?jsx("span",{"data-slot":"label","data-state":J,"data-tone":$,"data-size":d,className:"sr-only",children:H}):null:z(H)?jsx("span",{"data-slot":"label","data-state":J,"data-tone":$,"data-size":d,className:l(F.slots.buttonLabel,w?.label),children:H}):null,!f&&a?jsx("span",{"data-slot":"end-icon","data-state":J,"data-tone":$,"data-size":d,className:l(F.slots.buttonIcon,d&&rs[d],w?.icon,w?.endIcon),children:a}):null]})},"BaseButton"));var Vg=["default","primary","success","warning","danger","muted"];function Kt(e,t){if(typeof e!="boolean")throw new TypeError(`BaseContextMenu ${t} must be a boolean.`)}r(Kt,"validateBoolean");function xa(e){if(e!==void 0&&!Vg.includes(e))throw new TypeError('BaseContextMenu tone must be "default", "primary", "success", "warning", "danger", or "muted".')}r(xa,"validateTone");function Gg(e){if(e!==void 0&&e!=="ltr"&&e!=="rtl")throw new TypeError('BaseContextMenu dir must be "ltr" or "rtl".')}r(Gg,"validateDirection");function _g(){return 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:jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 4.5"})})}r(_g,"CheckIcon");function jg(){return jsx("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3.5 w-3.5",fill:"currentColor",children:jsx("circle",{cx:"8",cy:"8",r:"3"})})}r(jg,"DotIcon");function $g(){return 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:jsx("path",{d:"m6 4 4 4-4 4"})})}r($g,"ChevronRightIcon");function as({label:e,icon:t,shortcut:o,children:n,classNames:a,inset:s,indicator:i}){let m=n??e;return jsxs(Fragment,{children:[i||null,z(t)?jsx("span",{"data-slot":"icon",className:l(a?.icon),children:t}):s?jsx("span",{"aria-hidden":"true","data-slot":"icon",className:"h-4 w-4 shrink-0"}):null,z(m)?jsx("span",{"data-slot":"label",className:l(a?.label),children:m}):null,z(o)?jsx("span",{"data-slot":"shortcut",className:l(a?.shortcut),children:o}):null]})}r(as,"renderItemContent");function Vd({children:e,trigger:t,content:o,disabled:n=false,modal:a=true,dir:s,appearance:i,className:m,classNames:c,onOpenChange:d}){Kt(n,"disabled"),Kt(a,"modal"),Gg(s);let g=Oi(),u=Oe(i);return jsxs(Qe.Root,{onOpenChange:d,modal:a,dir:s??g,children:[t?jsx(is,{disabled:n,appearance:u,className:l(c?.trigger,m),children:t}):null,o?jsx(ss,{appearance:u,className:c?.content,children:o}):null,e]})}r(Vd,"BaseContextMenu");var is=forwardRef(r(function({children:t,disabled:o=false,asChild:n=false,appearance:a,className:s,style:i,...m},c){Kt(o,"Trigger disabled"),Kt(n,"Trigger asChild");let d=Oe(a),g=Ne(),u=De(d);return jsx(Qe.Trigger,{...g,...m,ref:c,asChild:n,disabled:o,"data-monkeys-component":"context-menu","data-slot":"trigger","data-disabled":o||void 0,className:l(!n&&u.slots.menuTrigger,o&&!n&&u.slots.menuItemDisabled,s),style:i,children:t})},"BaseContextMenuTrigger")),ss=forwardRef(r(function({children:t,appearance:o,className:n,classNames:a,style:s,...i},m){let c=Oe(o),d=Ne(),g=De(c),u=To(),p=jsx(Qe.Content,{...d,...i,ref:m,"data-monkeys-component":"context-menu","data-slot":"content",className:l(g.slots.menuContent,a?.root,n),style:{...g.styles.menuContent,...s},children:t});return u.shouldPortal?jsx(Qe.Portal,{...u.radixPortalProps,children:p}):p},"BaseContextMenuContent")),Gd=forwardRef(r(function({children:t,appearance:o,className:n,style:a,...s},i){let m=Oe(o),c=Ne(),d=De(m);return jsx(Qe.Label,{...c,...s,ref:i,"data-monkeys-component":"context-menu","data-slot":"label",className:l(d.slots.menuLabel,n),style:a,children:t})},"BaseContextMenuLabel")),_d=forwardRef(r(function({appearance:t,className:o,style:n,...a},s){let i=Oe(t),m=Ne(),c=De(i);return jsx(Qe.Separator,{...m,...a,ref:s,"data-monkeys-component":"context-menu","data-slot":"separator",className:l(c.slots.menuSeparator,o),style:n})},"BaseContextMenuSeparator")),Rn=forwardRef(r(function({children:t,label:o,icon:n,shortcut:a,tone:s,disabled:i=false,inset:m=false,appearance:c,className:d,classNames:g,style:u,onSelect:p,...f},b){Kt(i,"Item disabled"),Kt(m,"Item inset"),xa(s);let h=s??"default",y=Oe(c),v=Ne(),k=De(y);return jsx(Qe.Item,{...v,...f,ref:b,disabled:i,"data-monkeys-component":"context-menu","data-slot":"item","data-tone":h,"data-disabled":i||void 0,className:l(k.slots.menuItem,er(k,s),i&&k.slots.menuItemDisabled,g?.root,d),style:{...k.styles.menuItem,...u},onSelect:x=>{if(i){x.preventDefault();return}p?.(x);},children:as({children:t,label:o,icon:n,shortcut:a,inset:m,classNames:{icon:l(k.slots.menuItemIcon,g?.icon),label:l(k.slots.menuItemLabel,g?.label),shortcut:l(k.slots.menuItemShortcut,g?.shortcut)}})})},"BaseContextMenuItem"));forwardRef(r(function({children:t,label:o,icon:n,shortcut:a,tone:s,disabled:i=false,inset:m=false,checked:c,onCheckedChange:d,appearance:g,className:u,classNames:p,style:f,onSelect:b,...h},y){if(Kt(i,"CheckboxItem disabled"),Kt(m,"CheckboxItem inset"),xa(s),c!==void 0&&c!=="indeterminate"&&typeof c!="boolean")throw new TypeError('BaseContextMenu CheckboxItem checked must be a boolean or "indeterminate".');let v=s??"default",k=Oe(g),x=Ne(),w=De(k);return jsx(Qe.CheckboxItem,{...x,...h,ref:y,checked:c,disabled:i,"data-monkeys-component":"context-menu","data-slot":"checkbox-item","data-tone":v,"data-disabled":i||void 0,"data-checked":c==="indeterminate"?"mixed":c===void 0?void 0:String(c),onCheckedChange:C=>{i||d?.(C);},className:l(w.slots.menuItem,"pl-8",er(w,s),i&&w.slots.menuItemDisabled,p?.root,u),style:{...w.styles.menuItem,...f},onSelect:C=>{if(i){C.preventDefault();return}b?.(C);},children:as({children:t,label:o,icon:n,shortcut:a,inset:m,classNames:{icon:l(w.slots.menuItemIcon,p?.icon),label:l(w.slots.menuItemLabel,p?.label),shortcut:l(w.slots.menuItemShortcut,p?.shortcut)},indicator:jsx(Qe.ItemIndicator,{"data-slot":"indicator",className:l(w.slots.menuCheckboxIndicator,p?.indicator),children:jsx(_g,{})})})})},"BaseContextMenuCheckboxItem"));forwardRef(r(function({children:t,label:o,icon:n,shortcut:a,tone:s,disabled:i=false,inset:m=false,value:c,appearance:d,className:g,classNames:u,style:p,onSelect:f,...b},h){Kt(i,"RadioItem disabled"),Kt(m,"RadioItem inset"),xa(s);let y=s??"default",v=Oe(d),k=Ne(),x=De(v);return jsx(Qe.RadioItem,{...k,...b,ref:h,value:c,disabled:i,"data-monkeys-component":"context-menu","data-slot":"radio-item","data-tone":y,"data-value":c,"data-disabled":i||void 0,className:l(x.slots.menuItem,"pl-8",er(x,s),i&&x.slots.menuItemDisabled,u?.root,g),style:{...x.styles.menuItem,...p},onSelect:w=>{if(i){w.preventDefault();return}f?.(w);},children:as({children:t,label:o,icon:n,shortcut:a,inset:m,classNames:{icon:l(x.slots.menuItemIcon,u?.icon),label:l(x.slots.menuItemLabel,u?.label),shortcut:l(x.slots.menuItemShortcut,u?.shortcut)},indicator:jsx(Qe.ItemIndicator,{"data-slot":"indicator",className:l(x.slots.menuRadioIndicator,u?.indicator),children:jsx(jg,{})})})})},"BaseContextMenuRadioItem"));forwardRef(r(function({children:t,label:o,icon:n,tone:a,disabled:s=false,inset:i=false,appearance:m,className:c,classNames:d,style:g,...u},p){Kt(s,"SubTrigger disabled"),Kt(i,"SubTrigger inset"),xa(a);let f=a??"default",b=Oe(m),h=Ne(),y=De(b),v=t??o;return jsxs(Qe.SubTrigger,{...h,...u,ref:p,disabled:s,"data-monkeys-component":"context-menu","data-slot":"sub-trigger","data-tone":f,"data-disabled":s||void 0,className:l(y.slots.menuSubTrigger,er(y,a),s&&y.slots.menuItemDisabled,d?.root,c),style:{...y.styles.menuItem,...g},children:[z(n)?jsx("span",{"data-slot":"icon",className:l(y.slots.menuItemIcon,d?.icon),children:n}):i?jsx("span",{"aria-hidden":"true","data-slot":"icon",className:"h-4 w-4 shrink-0"}):null,z(v)?jsx("span",{"data-slot":"label",className:l(y.slots.menuItemLabel,d?.label),children:v}):null,jsx("span",{"data-slot":"sub-indicator",className:l(y.slots.menuSubTriggerIcon,d?.shortcut,"rtl:rotate-180"),children:jsx($g,{})})]})},"BaseContextMenuSubTrigger"));forwardRef(r(function({children:t,appearance:o,className:n,classNames:a,style:s,sideOffset:i=6,...m},c){let d=Oe(o),g=Ne(),u=De(d),p=To(),f=jsx(Qe.SubContent,{...g,...m,ref:c,sideOffset:i,"data-monkeys-component":"context-menu","data-slot":"sub-content",className:l(u.slots.menuSubContent,a?.root,n),style:{...u.styles.menuContent,...s},children:t});return p.shouldPortal?jsx(Qe.Portal,{...p.radixPortalProps,children:f}):f},"BaseContextMenuSubContent"));var Ug={1:"grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-2 xl:grid-cols-3"};function ds({items:e,columns:t=1,appearance:o,className:n,classNames:a,style:s,children:i,...m}){let c=De(o);return jsxs("dl",{...m,className:l(c.slots.descriptionListRoot,Ug[t],a?.root,n),style:{...c.styles.descriptionList,...s},children:[e?.map((d,g)=>jsxs("div",{className:l(c.slots.descriptionListItem,a?.item),children:[jsx("dt",{className:l(c.slots.descriptionListTerm,a?.term),children:d.term}),jsx("dd",{className:l(c.slots.descriptionListValue,a?.value),children:d.value})]},g)),i]})}r(ds,"BaseDescriptionList");var Xg=["default","primary","success","warning","danger","muted"];function co(e,t){if(typeof e!="boolean")throw new TypeError(`BaseDialog ${t} must be a boolean.`)}r(co,"validateBoolean");function Zg(e){if(!Xg.includes(e))throw new TypeError('BaseDialog triggerTone must be "default", "primary", "success", "warning", "danger", or "muted".')}r(Zg,"validateTriggerTone");function Qg({trigger:e,triggerLabel:t,triggerIcon:o,triggerTone:n,triggerDisabled:a,theme:s}){return z(e)?jsx("span",{role:"button",tabIndex:a?-1:0,"aria-disabled":a||void 0,onKeyDown:i=>{a||(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),i.currentTarget.click());},children:e}):z(t)?jsxs("button",{type:"button",disabled:a,"aria-label":typeof t=="string"&&t.trim()?t:void 0,className:l(s.slots.buttonBase,ia(s,n),a&&s.slots.buttonDisabled),style:{...s.styles.button,...a?s.styles.buttonDisabled:void 0},children:[z(o)?jsx("span",{"data-slot":"icon",className:s.slots.buttonIcon,children:o}):null,jsx("span",{"data-slot":"label",className:s.slots.buttonLabel,children:t})]}):null}r(Qg,"renderTrigger");var Nn=forwardRef(r(function({open:t,defaultOpen:o=false,size:n="default",title:a,description:s,header:i,footer:m,trigger:c,triggerLabel:d,triggerIcon:g,triggerTone:u="default",triggerDisabled:p=false,closeLabel:f,closeOnEscape:b=true,closeOnOverlayClick:h=true,showCloseButton:y=true,keepMounted:v=false,trapFocus:k=true,restoreFocus:x=true,initialFocus:w="first-interactive",initialFocusRef:C,zIndex:S,portal:T=false,appearance:E,className:N,classNames:O,style:V,children:W,onOpenChange:F,id:H,...I},G){if(t!==void 0&&co(t,"open"),co(o,"defaultOpen"),!["default","viewport","page"].includes(n))throw new TypeError("BaseDialog size must be default, viewport or page.");if(co(p,"triggerDisabled"),co(b,"closeOnEscape"),co(h,"closeOnOverlayClick"),co(y,"showCloseButton"),co(v,"keepMounted"),co(k,"trapFocus"),co(x,"restoreFocus"),co(T,"portal"),Zg(u),w!=="first-interactive"&&w!=="container"&&w!=="explicit")throw new TypeError('BaseDialog initialFocus must be "first-interactive", "container", or "explicit".');if(S!==void 0&&!Number.isFinite(S))throw new TypeError("BaseDialog zIndex must be a finite number.");let q=vt().dialog,R=Oe(E),D=Ne(),M=f===void 0?q.close:f,$=De(R),J=To({disabled:!T}),[_,ee]=useState(o),K=useRef(null),Z=useRef(null),re=t!==void 0,ae=re?t:_,le=T&&J.shouldPortal?"portaled":"inline",L=z(a),me=z(s),B=z(i);if(y&&(typeof M!="string"||!M.trim()))throw new TypeError("BaseDialog closeLabel must be a non-empty string when showCloseButton is true.");let j=r(xe=>{re||ee(xe),F?.(xe);},"handleOpenChange");useEffect(()=>{if(!ae||!v)return;let xe=K.current,te=xe?.ownerDocument,se=te?.defaultView;if(!xe||!te||!se)return;Z.current=te.activeElement instanceof se.HTMLElement?te.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);(w==="container"?xe:w==="explicit"?C?.current??xe:U??xe).focus();},"focusInitial"),ze=se.requestAnimationFrame(Ie),ce=r(U=>{if(U.key==="Escape"&&b){U.preventDefault(),U.stopPropagation(),j(false);return}if(U.key!=="Tab"||!k)return;let A=Array.from(xe.querySelectorAll(Re));if(A.length===0){U.preventDefault(),xe.focus();return}let X=A[0],ie=A[A.length-1];U.shiftKey&&te.activeElement===X?(U.preventDefault(),ie.focus()):!U.shiftKey&&te.activeElement===ie&&(U.preventDefault(),X.focus());},"handleKeyDown");return se.addEventListener("keydown",ce),()=>{se.cancelAnimationFrame(ze),se.removeEventListener("keydown",ce),x&&Z.current?.isConnected&&Z.current.focus();}},[b,w,C,ae,v,x,k]);let ne=B||L||me?jsxs("div",{...D,"data-monkeys-component":"dialog","data-slot":"header","data-state":ae?"open":"closed","data-portal":le,className:l($.slots.dialogHeader,O?.header,n==="page"&&"sr-only"),children:[B?i:null,L?jsx(bt.Title,{...D,"data-monkeys-component":"dialog","data-slot":"title","data-state":ae?"open":"closed","data-portal":le,className:B?"sr-only":l($.slots.dialogTitle,O?.title),children:a}):null,me?jsx(bt.Description,{...D,"data-monkeys-component":"dialog","data-slot":"description","data-state":ae?"open":"closed","data-portal":le,className:B?"sr-only":l($.slots.dialogDescription,O?.description),children:s}):null]}):null,fe=Qg({trigger:c,triggerLabel:d,triggerIcon:g,triggerTone:u,triggerDisabled:p,theme:$}),ye=ae||v?jsxs(Fragment,{children:[jsx(bt.Overlay,{forceMount:v||void 0,hidden:!ae,...D,"aria-hidden":"true","data-monkeys-component":"dialog","data-slot":"overlay","data-portal":le,className:l($.slots.dialogOverlay,O?.overlay),style:{...$.styles.dialogOverlay,zIndex:S,...n==="page"?{background:"transparent",backdropFilter:"none"}:{}}}),jsx("div",{...D,hidden:!ae,"data-monkeys-component":"dialog","data-slot":"content","data-state":ae?"open":"closed","data-portal":le,className:l($.slots.dialogContent,O?.content),style:{zIndex:S,...n==="page"?{padding:0,inset:0}:{}},children:jsx(bt.Content,{forceMount:v||void 0,...D,...L?{}:{"aria-labelledby":void 0},...me?{}:{"aria-describedby":void 0},asChild:true,onOpenAutoFocus:xe=>{if(v){xe.preventDefault();return}let te=K.current;Z.current=te?.ownerDocument.activeElement,(w==="container"||w==="explicit")&&(xe.preventDefault(),(w==="explicit"?C?.current??te:te)?.focus({preventScroll:true}));},onCloseAutoFocus:xe=>{if(v||!x){xe.preventDefault();return}let te=Z.current;te?.isConnected&&(xe.preventDefault(),te.focus({preventScroll:true}));},onEscapeKeyDown:xe=>{(v||!b)&&xe.preventDefault();},onPointerDownOutside:xe=>{h||xe.preventDefault();},children:jsxs("div",{...D,ref:K,tabIndex:-1,"aria-modal":"true","data-monkeys-component":"dialog","data-slot":"panel","data-portal":le,className:l($.slots.dialogPanel,O?.panel),"data-presentation":n,style:{...$.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:[ne,y?jsx(bt.Close,{asChild:true,children:jsx("button",{...D,type:"button","aria-label":M,title:M,"data-monkeys-component":"dialog","data-slot":"close","data-state":ae?"open":"closed","data-portal":le,className:l($.slots.dialogClose,O?.close),children:"\xD7"})}):null,jsx("div",{...D,"data-monkeys-component":"dialog","data-slot":"body","data-state":ae?"open":"closed","data-portal":le,className:l($.slots.dialogBody,O?.body),style:n!=="default"?{minHeight:0,flex:"1 1 0%",overflow:"hidden",padding:0}:void 0,children:W}),z(m)?jsx("div",{...D,"data-monkeys-component":"dialog","data-slot":"footer","data-state":ae?"open":"closed","data-portal":le,className:l($.slots.dialogFooter,O?.footer),children:m}):null]})})})]}):null;return jsx("div",{...D,...I,ref:G,id:H,"data-monkeys-component":"dialog","data-slot":"root","data-state":ae?"open":"closed","data-portal":le,className:l($.slots.dialogRoot,O?.root,N),style:V,children:jsxs(bt.Root,{open:ae,onOpenChange:j,modal:!v&&k,children:[fe?jsx(bt.Trigger,{...D,asChild:true,disabled:p,"data-monkeys-component":"dialog","data-slot":"trigger","data-portal":le,"data-tone":u,"data-disabled":p||void 0,className:l($.slots.dialogTrigger,p&&$.slots.dialogTriggerDisabled,O?.trigger),children:fe}):null,T&&J.shouldPortal?jsx(zo,{children:jsx(bt.Portal,{...J.radixPortalProps,forceMount:v||void 0,children:ye})}):jsx(zo,{children:ye})]})})},"BaseDialog"));function ob(){return 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:[jsx("rect",{width:"16",height:"12",x:"4",y:"6",rx:"2"}),jsx("path",{d:"M8 10h8"}),jsx("path",{d:"M8 14h5"})]})}r(ob,"DefaultEmptyIcon");var va=forwardRef(r(function({icon:t=jsx(ob,{}),title:o,description:n,actions:a,variant:s,appearance:i,className:m,classNames:c,style:d,...g},u){let p=Oe(i),f=Ne(),b=Co(),h=s??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,v=De(p);return jsxs("div",{...f,...g,ref:u,"data-monkeys-component":"empty-state","data-slot":"root","data-state":"empty","data-variant":h,"data-density":b.density,className:l(v.slots.stateRoot,y,h==="compact"&&"min-h-0 gap-1 py-3",c?.root,m),style:{...v.styles.stateRoot,...d},children:[z(t)?jsx("div",{"data-slot":"icon","data-state":"empty",className:l(v.slots.stateIcon,c?.icon),style:v.styles.stateIcon,children:t}):null,z(o)?jsx("div",{"data-slot":"title","data-state":"empty",className:l(v.slots.stateTitle,c?.title),children:o}):null,z(n)?jsx("div",{"data-slot":"description","data-state":"empty",className:l(v.slots.stateDescription,c?.description),children:n}):null,z(a)?jsx("div",{"data-slot":"actions","data-state":"empty",className:l(v.slots.stateActions,c?.actions),children:a}):null]})},"BaseEmptyState"));var qd=createContext(false);function Yd({children:e}){let{locale:t}=xt();return e==null||e===""?null:jsx(cr,{content:e,portal:true,children: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:jsx(HelpCircle,{className:"h-4 w-4","aria-hidden":"true"})})})}r(Yd,"BaseFormHelp");function cb(...e){let t=e.flatMap(o=>o?.split(/\s+/).filter(Boolean)??[]);return t.length?Array.from(new Set(t)).join(" "):void 0}r(cb,"mergeAriaIds");function us(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(us,"resolveOptionalId");var No=forwardRef(r(function({label:t,description:o,message:n,error:a,required:s=false,disabled:i=false,htmlFor:m,descriptionId:c,messageId:d,errorId:g,validate:u,validationMode:p="onBlur",children:f,appearance:b,className:h,classNames:y,style:v,...k},x){for(let[j,ne]of [["required",s],["disabled",i]])if(typeof ne!="boolean")throw new TypeError(`BaseField ${j} must be a boolean.`);if(u!==void 0&&typeof u!="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 w=useContext(qd)?"tooltip":"inline",C=useId(),S=Oe(b),T=Ne(),E=De(S),N=z(o),[O,V]=useState(null),W=useRef(new Set),F=useRef(u),H=useRef(p),I=useRef(i);F.current=u,H.current=p,I.current=i;let G=u!==void 0;useEffect(()=>{(!G||i)&&V(null);},[i,G]),useEffect(()=>{if(G&&W.current.size!==1)throw new TypeError("BaseField with validate must contain exactly one compatible Base control.")},[G]);let q=useCallback(j=>{let ne=W.current;if(F.current!==void 0&&!ne.has(j)&&ne.size>0)throw new TypeError("BaseField with validate supports exactly one compatible Base control. Use BaseFieldset for control groups.");return ne.add(j),()=>{ne.delete(j);}},[]),R=useCallback((j,ne)=>{let fe=F.current;if(I.current||fe===void 0||H.current!==j)return;let ye=Pd(fe(ne));if(ye===null){V(null);return}V(ye);},[]),D=useCallback(j=>R("onBlur",j),[R]),M=useCallback(j=>R("onChange",j),[R]),J=z(a)?a:O,_=z(J),ee=!_&&z(n),K=_?J:n,Z=m??`${C}-control`,re=N?us(c,`${C}-description`,"descriptionId"):void 0,ae=ee?us(d,`${C}-message`,"messageId"):void 0,le=_?us(g,`${C}-error`,"errorId"):void 0,L={id:Z,"aria-describedby":cb(re,ae),"aria-errormessage":le,"aria-invalid":_?true:void 0,"aria-required":s?true:void 0,required:s||void 0,disabled:i||void 0},me=typeof f=="function"?f(L):f,B=useMemo(()=>({invalid:_,registerControl:q,notifyBlur:D,notifyChange:M}),[_,D,M,q]);return jsxs("div",{...T,...k,ref:x,"aria-disabled":i||void 0,"data-monkeys-component":"field","data-slot":"root","data-required":s||void 0,"data-disabled":i||void 0,"data-invalid":_||void 0,className:l(E.slots.fieldRoot,i&&E.slots.controlDisabled,y?.root,h),style:{...E.styles.field,...v},children:[z(t)?jsxs("div",{"data-slot":"label-row",className:l(E.slots.fieldLabelRow,y?.labelRow),children:[jsxs("label",{htmlFor:typeof f=="function"?Z:m,"data-slot":"label",className:l(E.slots.fieldLabel,y?.label),children:[t,s?jsxs("span",{"aria-hidden":"true","data-slot":"required-indicator",className:l(E.slots.fieldRequired,y?.required),children:[" ","*"]}):null]}),w==="tooltip"&&N?jsx(Yd,{children:o}):null]}):null,N?jsx("div",{id:re,"data-slot":"description",className:l(E.slots.fieldDescription,y?.description,w==="tooltip"&&"sr-only"),children:o}):null,z(me)?jsx("div",{"data-slot":"control",className:l(E.slots.fieldControl,y?.control),style:E.styles.fieldControl,children:jsx(es.Provider,{value:B,children:me})}):null,z(K)?jsx("div",{id:_?le:ae,role:_?"alert":void 0,"data-slot":_?"error":"message",className:l(E.slots.fieldMessage,_&&"text-destructive-text",y?.message),children:K}):null]})},"BaseField"));var mb={sm:"h-8 px-2.5 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-3.5 text-base"},Qt=forwardRef(r(function({icon:t,trailing:o,invalid:n=false,disabled:a=false,readOnly:s=false,controlSize:i,appearance:m,className:c,classNames:d,style:g,"aria-invalid":u,onBlur:p,onChange:f,...b},h){for(let[C,S]of [["invalid",n],["disabled",a],["readOnly",s]])if(typeof S!="boolean")throw new TypeError(`BaseInput ${C} must be a boolean.`);if(i!==void 0&&i!=="sm"&&i!=="md"&&i!=="lg")throw new TypeError('BaseInput controlSize must be "sm", "md", or "lg".');let y=Oe(m),v=Ne(),k=De(y),x=Vo(),w=n||x.invalid;return jsxs("div",{...v,"data-monkeys-component":"input","data-slot":"root","data-size":i,"data-invalid":w||void 0,"data-disabled":a||void 0,"data-readonly":s||void 0,className:l(k.slots.controlWrapper,w&&k.slots.controlInvalid,a&&k.slots.controlDisabled,s&&k.slots.controlReadOnly,d?.root,c),style:{...k.styles.control,...w?k.styles.controlInvalid:void 0,...a?k.styles.controlDisabled:void 0,...g},children:[z(t)?jsx("span",{"data-slot":"icon",className:l(k.slots.controlIcon,d?.icon),children:t}):null,jsx("input",{...b,ref:h,disabled:a,readOnly:s,"aria-invalid":u??(w||void 0),"data-slot":"control","data-size":i,"data-invalid":w||void 0,"data-disabled":a||void 0,"data-readonly":s||void 0,className:l(k.slots.controlBase,k.slots.controlInput,i&&mb[i],d?.control),onBlur:C=>{p?.(C),x.notifyBlur(C.currentTarget.value);},onChange:C=>{f?.(C),x.notifyChange(C.currentTarget.value);}}),z(o)?jsx("span",{"data-slot":"trailing",className:l(k.slots.controlTrailing,d?.trailing),children:o}):null]})},"BaseInput"));var bb={line:"h-4 w-full",block:"h-24 w-full",circle:"aspect-square h-10 rounded-full"},Dt=forwardRef(r(function({variant:t="line",animated:o=true,animation:n,appearance:a,className:s,classNames:i,style:m,...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),u=Ne(),p=De(g),f=Md(n,o,d);return jsx("div",{...u,...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,bb[t],f.mode==="pulse"&&"motion-safe:animate-pulse motion-reduce:animate-none",i?.root,s),style:{...p.styles.skeleton,...f.style,...m}})},"BaseSkeleton"));function hb({className:e}){return jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:e,fill:"none",children:[jsx("circle",{cx:"12",cy:"12",r:"9",className:"opacity-25",stroke:"currentColor",strokeWidth:"3"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M12 3a9 9 0 0 1 9 9h-3a6 6 0 0 0-6-6V3Z"})]})}r(hb,"DefaultLoadingIcon");var jo=forwardRef(r(function({icon:t,title:o,description:n,actions:a,variant:s,animation:i,appearance:m,className:c,classNames:d,style:g,role:u="status","aria-live":p="polite","aria-busy":f=true,"aria-label":b,"aria-labelledby":h,...y},v){let k=Oe(m),x=Ne(),{loading:w}=vt(),C=Co(),S=s??C.loading?.variant??"spinner",T=C.density==="compact"?"min-h-0 px-3 py-3":C.density==="comfortable"?"min-h-56 px-8 py-12":void 0,E=De(k),N=S==="skeleton"&&t===void 0?void 0:t===void 0?jsx(hb,{className:E.slots.loadingSpinner}):t,O=b??(h===void 0?typeof o=="string"?o:w.spinner:void 0);return jsxs("div",{...x,...y,ref:v,role:u,"aria-live":p,"aria-busy":f,"aria-label":O,"aria-labelledby":h,"data-monkeys-component":"loading-state","data-slot":"root","data-state":"loading","data-variant":S,"data-density":C.density,className:l(E.slots.stateRoot,T,d?.root,c),style:{...E.styles.stateRoot,...g},children:[S==="skeleton"?jsx(Ho,{animation:i,children:jsxs("div",{className:"flex w-full max-w-sm flex-col gap-3","data-slot":"skeleton",children:[jsx(Dt,{variant:"block",className:"h-20"}),jsx(Dt,{variant:"line",className:"w-4/5"}),jsx(Dt,{variant:"line",className:"w-3/5"})]})}):z(N)?jsx("div",{"data-slot":"icon","data-state":"loading",className:l(E.slots.stateIcon,d?.icon),style:E.styles.stateIcon,children:N}):null,S!=="skeleton"&&z(o)?jsx("div",{"data-slot":"title","data-state":"loading",className:l(E.slots.stateTitle,d?.title),children:o}):null,S!=="skeleton"&&z(n)?jsx("div",{"data-slot":"description","data-state":"loading",className:l(E.slots.stateDescription,d?.description),children:n}):null,z(a)?jsx("div",{"data-slot":"actions","data-state":"loading",className:l(E.slots.stateActions,d?.actions),children:a}):null]})},"BaseLoadingState"));var Ib=500;function Mb({options:e,value:t,defaultValue:o,invalid:n,disabled:a,openForPreview:s,portal:i,required:m}){for(let[c,d]of [["invalid",n],["disabled",a],["openForPreview",s],["portal",i]])if(typeof d!="boolean")throw new TypeError(`BaseSelect ${c} must be a boolean.`);if(m!==void 0&&typeof m!="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(Mb,"validateSelectProps");function gs(e){return typeof e=="string"||typeof e=="number"?String(e):""}r(gs,"normalizeValue");function Bb(e,t){if(t!==void 0)return e.find(o=>o.value===t)}r(Bb,"findOption");function pr(e,t){let o=e.findIndex(n=>n.value===t&&!n.disabled);return o>=0?o:e.findIndex(n=>!n.disabled)}r(pr,"getInitialActiveIndex");function Pb(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 s=(n+a*o+e.length)%e.length;if(!e[s]?.disabled)return s}return -1}r(Pb,"getNextEnabledIndex");function Eb(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(Eb,"getBoundaryEnabledIndex");function Xd(e){return e.textValue!==void 0?e.textValue:typeof e.label=="string"?e.label:e.value}r(Xd,"getOptionText");function Db(e){return e.replace(/[^a-zA-Z0-9_-]/g,"-")}r(Db,"toDomId");var uo=forwardRef(r(function({options:t,placeholder:o,icon:n,invalid:a=false,disabled:s=false,openForPreview:i=false,portal:m=false,appearance:c,className:d,classNames:g,style:u,children:p,value:f,defaultValue:b,onBlur:h,onChange:y,onFocus:v,onInvalid:k,name:x,id:w,required:C,"aria-invalid":S,"aria-label":T,"aria-labelledby":E,"aria-describedby":N,"aria-errormessage":O,"aria-required":V,...W},F){Mb({options:t,value:f,defaultValue:b,invalid:a,disabled:s,openForPreview:i,portal:m,required:C});let H=Oe(c),I=Ne(),G=De(H),q=Vo(),R=a||q.invalid,D=useId(),M=w??D,$=`${M}-button`,J=`${M}-listbox`,_=useRef(null),ee=useRef(null),K=useRef(null),Z=useRef([]),re=useRef(false),ae=useRef(""),le=useRef(null),L=t??[],me=L.length>0,B=i,[j,ne]=useState(false),[fe,ye]=useState(false),xe=B||j,te=To({disabled:B||!m?true:void 0}),{refs:se,floatingStyles:Re,isPositioned:Ie,placement:ze}=useFloating({transform:false,open:me&&xe&&te.shouldPortal,placement:"bottom-start",strategy:"fixed",whileElementsMounted:te.shouldPortal?autoUpdate:void 0,middleware:[offset(6),flip({padding:8}),shift({padding:8}),size({padding:8,apply({rects:pe,availableHeight:Ge,elements:Q}){Object.assign(Q.floating.style,{width:`${pe.reference.width}px`,maxHeight:`min(15rem, ${Math.max(0,Ge)}px)`});}})]}),ce=useCallback(pe=>{ee.current=pe,se.setReference(pe);},[se.setReference]),[U,A]=useState(()=>gs(b)),X=f!==void 0,ie=X?gs(f):U,Y=Bb(L,ie),[de,we]=useState(()=>pr(L,ie)),Ce=de>=0&&!L[de]?.disabled?de:pr(L,ie),Me=L.map((pe,Ge)=>`${M}-option-${Ge}-${Db(pe.value)}`),Be=Y?.label??o,_e=!Y,Ze=W.dir??I.dir,Fe=s?"disabled":R?"invalid":xe?"open":"closed",tt=r(pe=>{K.current=pe,typeof F=="function"?F(pe):F&&(F.current=pe);},"setSelectRef"),We=r(pe=>{h?.(pe),q.notifyBlur(pe.currentTarget.value);},"handleNativeBlur"),Le=r(pe=>{y?.(pe),q.notifyChange(pe.currentTarget.value);},"handleNativeChange"),oe=r(()=>{we(pr(L,ie));},"resetActiveIndex"),Se=r(()=>{oe(),B||ne(false);},"cancelAndClose"),Ve=r((pe,Ge=false)=>{ye(Ge),we(pe??pr(L,ie)),B||ne(true);},"openMenu"),Ye=r(pe=>{let Ge=K.current;if(!Ge)return;let Q=Ge.ownerDocument.defaultView;if(!Q)throw new Error("BaseSelect cannot dispatch change without an owning window.");let ue=Object.getOwnPropertyDescriptor(Q.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 Q.Event("change",{bubbles:true}));},"notifyChange"),ot=r(pe=>{let Ge=L[pe];!Ge||Ge.disabled||s||(we(pe),Ge.value!==ie&&(X||A(Ge.value),Ye(Ge.value)),B||ne(false));},"commitIndex"),gt=r(pe=>{pe<0||L[pe]?.disabled||(we(pe),xe||Ve(pe));},"moveActive"),Bt=r((pe,Ge)=>{let Q=pe.currentTarget.ownerDocument.defaultView;if(!Q)return;let ue=`${ae.current}${Ge}`.toLocaleLowerCase();ae.current=ue,le.current&&le.current.ownerWindow.clearTimeout(le.current.timerId),le.current={ownerWindow:Q,timerId:Q.setTimeout(()=>{ae.current="",le.current=null;},Ib)};let he=Array.from(ue).every(Ee=>Ee===ue[0])?Ge.toLocaleLowerCase():ue,ke=xe?Ce:L.findIndex(Ee=>Ee.value===ie&&!Ee.disabled);for(let Ee=1;Ee<=L.length;Ee+=1){let ge=(ke+Ee+L.length)%L.length,He=L[ge];if(!He?.disabled&&Xd(He).trim().toLocaleLowerCase().startsWith(he)){pe.preventDefault(),gt(ge);return}}},"handleTypeahead"),Ue=r(pe=>{if(!(s||re.current||pe.nativeEvent.isComposing)){if(pe.key==="ArrowDown"||pe.key==="ArrowUp"){pe.preventDefault();let Ge=L.findIndex(ue=>ue.value===ie&&!ue.disabled);gt(Pb(L,xe?Ce:Ge,pe.key==="ArrowDown"?1:-1));return}if(pe.key==="Home"||pe.key==="End"){pe.preventDefault(),gt(Eb(L,pe.key==="Home"?"first":"last"));return}if(pe.key==="Enter"||pe.key===" "){pe.preventDefault(),xe?ot(Ce):Ve();return}if(pe.key==="Escape"&&xe){pe.preventDefault(),Se();return}if(pe.key==="Tab"&&xe){ot(Ce);return}pe.key.length===1&&!pe.ctrlKey&&!pe.metaKey&&!pe.altKey&&!/\s/.test(pe.key)&&Bt(pe,pe.key);}},"handleKeyDown"),$t=r(pe=>{v?.(pe),pe.defaultPrevented||ee.current?.focus();},"handleCustomFocus"),zt=r(pe=>{k?.(pe),pe.preventDefault(),ee.current?.focus();},"handleCustomInvalid");return useEffect(()=>{if(!me||!xe||B)return;let pe=_.current?.ownerDocument;if(!pe)return;let Ge=r(Q=>{!_.current?.contains(Q.target)&&!se.floating.current?.contains(Q.target)&&Se();},"handlePointerDown");return pe.addEventListener("pointerdown",Ge),()=>{pe.removeEventListener("pointerdown",Ge);}},[B,me,xe,L,ie]),useEffect(()=>{!me||!xe||Ce<0||Z.current[Ce]?.scrollIntoView?.({block:"nearest"});},[me,xe,Ce]),useEffect(()=>{if(!me||X)return;let pe=K.current,Ge=pe?.form,Q=pe?.ownerDocument.defaultView;if(!Ge||!Q)return;let ue=r(()=>{Q.setTimeout(()=>{let Pe=gs(b);A(Pe),we(pr(L,Pe)),B||ne(false);},0);},"handleReset");return Ge.addEventListener("reset",ue),()=>Ge.removeEventListener("reset",ue)},[b,B,X,me,L]),useEffect(()=>()=>{le.current&&le.current.ownerWindow.clearTimeout(le.current.timerId);},[]),me?jsxs("div",{...I,ref:_,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",R&&G.slots.controlInvalid,s&&G.slots.controlDisabled,g?.root,d),style:{...G.styles.control,...R?G.styles.controlInvalid:void 0,...s?G.styles.controlDisabled:void 0,...u},children:[z(n)?jsx("span",{className:l(G.slots.controlIcon,g?.icon),children:n}):null,jsx("button",{...I,ref:ce,type:"button",id:$,role:"combobox",disabled:s,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":S??(R||void 0),"aria-label":T,"aria-labelledby":E,"aria-describedby":N,"aria-errormessage":O,"aria-required":V??(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=>{!_.current?.contains(pe.relatedTarget)&&!se.floating.current?.contains(pe.relatedTarget)&&(Se(),q.notifyBlur(ie));},onCompositionStart:()=>{re.current=true;},onCompositionEnd:()=>{re.current=false;},onKeyDown:Ue,children:jsx("span",{className:l("min-w-0 flex-1 truncate",_e&&G.slots.selectPlaceholder,_e&&g?.placeholder),children:Be})}),jsx("span",{className:l(G.slots.selectChevron,xe&&"rotate-[225deg]")}),jsxs("select",{...I,...W,ref:tt,id:w,name:x,value:ie,required:C,disabled:s,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:h,onFocus:$t,onInvalid:zt,onChange:Le,children:[z(o)?jsx("option",{value:"",disabled:true,children:o}):null,L.map(pe=>jsx("option",{value:pe.value,disabled:pe.disabled,children:Xd(pe)},pe.value))]}),xe?Wd(jsx("div",{...I,ref:te.shouldPortal?se.setFloating:void 0,id:J,role:"listbox",dir:Ze,"aria-labelledby":$,"data-monkeys-component":"select","data-slot":"menu","data-portal":te.shouldPortal?"portaled":"inline","data-state":"open","data-side":te.shouldPortal?ze.split("-")[0]:"bottom",className:l(G.slots.selectMenu,te.shouldPortal&&ze.startsWith("top")?"origin-bottom":"origin-top",fe&&!B&&(!te.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,...te.shouldPortal?{...Re,right:"auto",visibility:Ie?"visible":"hidden"}:void 0},children:L.map((pe,Ge)=>{let Q=pe.value===ie,ue=Ge===Ce,Pe=pe.disabled?"disabled":ue?"active":Q?"selected":"idle";return createElement("button",{...I,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":Q,"data-monkeys-component":"select","data-slot":"option","data-state":Pe,"data-active":ue||void 0,"data-selected":Q||void 0,"data-disabled":pe.disabled||void 0,className:l(G.slots.selectOption,ue&&G.slots.selectOptionActive,Q&&G.slots.selectOptionSelected,pe.disabled&&G.slots.selectOptionDisabled,g?.option),style:{...G.styles.selectOption,...ue?G.styles.selectOptionActive:void 0,...Q?G.styles.selectOptionSelected:void 0},onMouseDown:he=>he.preventDefault(),onClick:()=>ot(Ge)},jsx("span",{className:"min-w-0 flex-1 truncate",children:pe.label}))})}),te):null]}):jsxs("div",{...I,"data-monkeys-component":"select","data-slot":"root","data-state":Fe,"data-native":"true",className:l(G.slots.controlWrapper,R&&G.slots.controlInvalid,s&&G.slots.controlDisabled,g?.root,d),style:{...G.styles.control,...R?G.styles.controlInvalid:void 0,...s?G.styles.controlDisabled:void 0,...u},children:[z(n)?jsx("span",{className:l(G.slots.controlIcon,g?.icon),children:n}):null,jsxs("select",{...I,...W,id:w,ref:F,name:x,value:f,defaultValue:b,required:C,disabled:s,"aria-invalid":S??(R||void 0),"aria-label":T,"aria-labelledby":E,"aria-describedby":N,"aria-errormessage":O,"aria-required":V,"data-monkeys-component":"select","data-slot":"native","data-state":Fe,"data-native":"true",onBlur:We,onFocus:v,onInvalid:k,onChange:Le,className:l(G.slots.controlBase,G.slots.controlSelect,g?.control),children:[z(o)?jsx("option",{value:"",disabled:true,children:o}):null,p]}),jsx("span",{className:G.slots.selectChevron})]})},"BaseSelect"));function Ab(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(Ab,"getInitialSegmentValue");function pn({options:e=[],value:t,defaultValue:o,appearance:n,className:a,classNames:s,style:i,onValueChange:m,...c}){let d=De(n),[g,u]=useState(()=>Ab(e,o)),p=t!==void 0,f=p?t:g,b=r((y,v)=>{v||(p||u(y),m?.(y));},"handleSelect"),h=r(y=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(y.key))return;let v=e.filter(T=>!T.disabled);if(v.length===0)return;y.preventDefault();let k=Math.max(0,v.findIndex(T=>T.value===f)),x=y.key==="Home"?0:y.key==="End"?v.length-1:y.key==="ArrowLeft"||y.key==="ArrowUp"?(k-1+v.length)%v.length:(k+1)%v.length,w=v[x],C=y.currentTarget.querySelectorAll('[role="radio"]'),S=Array.from(C).find(T=>T.dataset.value===w.value);b(w.value),S?.focus();},"handleKeyDown");return jsx("div",{...c,role:"radiogroup","aria-orientation":"horizontal",className:l(d.slots.segmentedRoot,s?.root,a),style:{...d.styles.segmentedRoot,...i},onKeyDown:h,children:e.map(y=>{let v=y.value===f;return jsxs("button",{type:"button",role:"radio","data-value":y.value,"aria-checked":v,tabIndex:v?0:-1,disabled:y.disabled,className:l(d.slots.segmentedItem,v&&d.slots.segmentedItemActive,y.disabled&&d.slots.segmentedItemDisabled,s?.item),style:d.styles.segmentedItem,onClick:()=>b(y.value,y.disabled),children:[z(y.icon)?jsx("span",{className:l("inline-flex h-4 w-4 shrink-0",s?.icon),children:y.icon}):null,jsx("span",{className:l("min-w-0 truncate",s?.label),children:y.label})]},y.value)})})}r(pn,"BaseSegmentedControl");function Fb({kind:e}){return 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:jsxs(Fragment,{children:[jsx("circle",{cx:"12",cy:"12",r:"9"}),jsx("path",{d:"M12 7v6"}),jsx("path",{d:"M12 17h.01"})]}),permission:jsxs(Fragment,{children:[jsx("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2"}),jsx("path",{d:"M8 10V7a4 4 0 0 1 8 0v3"})]}),offline:jsxs(Fragment,{children:[jsx("path",{d:"M5 12.5a10 10 0 0 1 14 0"}),jsx("path",{d:"M8.5 16a5 5 0 0 1 7 0"}),jsx("path",{d:"M12 20h.01"}),jsx("path",{d:"m4 4 16 16"})]}),fallback:jsxs(Fragment,{children:[jsx("circle",{cx:"12",cy:"12",r:"9"}),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"}),jsx("path",{d:"M12 17h.01"})]})}[e]})}r(Fb,"SystemStateIcon");var br=forwardRef(r(function({kind:t="fallback",icon:o,title:n,description:a,actions:s,appearance:i,className:m,classNames:c,style:d,role:g,"aria-live":u,...p},f){let b=Oe(i),h=Ne(),y=Co(),v=y.density==="compact"?"min-h-0 px-3 py-3":y.density==="comfortable"?"min-h-56 px-8 py-12":void 0,k=De(b),x=o===void 0?jsx(Fb,{kind:t}):o,w=g??(t==="error"||t==="offline"?"alert":"status");return jsxs("div",{...h,...p,ref:f,role:w,"aria-live":u??(w==="alert"?"assertive":"polite"),"data-monkeys-component":"system-state","data-slot":"root","data-state":t,"data-density":y.density,className:l(k.slots.stateRoot,v,c?.root,m),style:{...k.styles.stateRoot,...d},children:[z(x)?jsx("div",{"data-slot":"icon","data-state":t,className:l(k.slots.stateIcon,c?.icon),style:k.styles.stateIcon,children:x}):null,z(n)?jsx("div",{"data-slot":"title","data-state":t,className:l(k.slots.stateTitle,c?.title),children:n}):null,z(a)?jsx("div",{"data-slot":"description","data-state":t,className:l(k.slots.stateDescription,c?.description),children:a}):null,z(s)?jsx("div",{"data-slot":"actions","data-state":t,className:l(k.slots.stateActions,c?.actions),children:s}):null]})},"BaseSystemState"));var fs="application/x-monkeys-base-table-column",Ia=8;function ws(e,t){typeof e=="function"?e(t):e&&(e.current=t);}r(ws,"assignRef");function Mo(e,t){if(t!==void 0&&typeof t!="boolean")throw new Error(`BaseTable ${e} must be a boolean.`)}r(Mo,"assertBoolean");function In(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(In,"assertEnum");function ys(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(ys,"assertOptionalLabel");function ks(e,t){if(t!==void 0&&typeof t!="function")throw new Error(`BaseTable ${e} must be a function when provided.`)}r(ks,"assertOptionalFunction");function Ko(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(Ko,"validateCssSizeValue");function jb(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 s=a.id.trim();if(a.id!==s)throw new Error(`BaseTable column id "${a.id}" must not contain surrounding whitespace.`);if(t.has(s))throw new Error(`BaseTable columns contain duplicate id "${s}".`);if(t.add(s),Ko(a.width,`column "${s}" width`,{stringAllowed:true}),Ko(a.minWidth,`column "${s}" minWidth`,{stringAllowed:true}),Ko(a.maxWidth,`column "${s}" maxWidth`,{stringAllowed:true}),typeof a.minWidth=="number"&&typeof a.maxWidth=="number"&&a.minWidth>a.maxWidth)throw new Error(`BaseTable column "${s}" minWidth cannot be greater than maxWidth.`)}),t}r(jb,"validateColumns");function $b(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 s=n.trim();if(n!==s)throw new Error(`BaseTable columnOrder entry "${n}" must not contain surrounding whitespace.`);if(o.has(s))throw new Error(`BaseTable columnOrder contains duplicate id "${s}".`);if(t&&!t.has(s))throw new Error(`BaseTable columnOrder contains unknown column id "${s}".`);o.add(s);}),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($b,"validateColumnOrder");function Kb(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}".`);Ko(n,`columnSizes["${o}"]`);});}}r(Kb,"validateColumnSizes");function Ma(e){let t=e.ownerDocument.defaultView;return t?t.getComputedStyle(e).direction==="rtl":e.closest('[dir="rtl"]')!==null}r(Ma,"isRtl");function Ub(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(Ub,"setPointerCaptureIfAvailable");var tc=createContext(null);function Uo(e){let t=useContext(tc),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(Uo,"useBaseTableContext");function oc(e){let t=false;return Children.forEach(e,o=>{if(t||!isValidElement(o))return;let n=o.props;if(n.layout==="split-scroll"){t=true;return}n.children&&(t=oc(n.children));}),t}r(oc,"hasSplitScrollTable");function hs(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r(hs,"toCssSize");function qb(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(qb,"validateTableCssSize");function xs(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(xs,"validateCssSize");function Qd(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(Qd,"validateNumericSize");function Yb(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,s)=>{let i=a.id.trim();if(!i)throw new Error(`BaseTable split-scroll column at index ${s} requires a non-empty id.`);if(o.has(i))throw new Error(`BaseTable layout="split-scroll" received duplicate column id "${i}".`);o.add(i);let m=t?.[i],c=Qd(a.minWidth,i,"minWidth"),d=Qd(a.maxWidth,i,"maxWidth");if(c!==void 0&&d!==void 0&&d<c)throw new Error(`BaseTable split-scroll column "${i}" has maxWidth smaller than minWidth.`);let g=xs(a.minWidth,i,"minWidth"),u=xs(a.maxWidth,i,"maxWidth"),p=m!==void 0?$o(m,c,d):a.width,f=xs(p,i,"width");return f||`minmax(${g??"0px"}, ${u??"1fr"})`}).join(" ")} var(--base-table-split-scrollbar-gutter)`}r(Yb,"buildSplitColumnTemplate");function $o(e,t,o){let n=t??48,a=o??Number.POSITIVE_INFINITY;return Math.min(Math.max(e,n),a)}r($o,"clampWidth");function vs(e,t,o){if(!e||t===o)return;let n=e.indexOf(t),a=e.indexOf(o);if(n<0||a<0)return;let s=[...e],[i]=s.splice(n,1);return s.splice(a,0,i),s}r(vs,"getNextColumnOrder");function Jb(e){switch(e){case "asc":return "ascending";case "desc":return "descending";default:return}}r(Jb,"sortAriaValue");function Xb(e){switch(e){case "center":return "center";case "right":return "flex-end";default:return "flex-start"}}r(Xb,"getSplitHeadJustifyContent");function Zb(e){switch(e){case "top":return "flex-start";case "bottom":return "flex-end";default:return "center"}}r(Zb,"getSplitHeadAlignItems");function Qb({direction:e,className:t}){return jsx("span",{"aria-hidden":"true",className:l(t,e==="desc"&&"rotate-180",(!e||e==="none")&&"opacity-45"),children:"\u25B2"})}r(Qb,"SortIndicator");function ef(){return jsxs("span",{"aria-hidden":"true",className:"grid gap-0.5",children:[jsx("span",{className:"h-0.5 w-0.5 rounded-full bg-current"}),jsx("span",{className:"h-0.5 w-0.5 rounded-full bg-current"}),jsx("span",{className:"h-0.5 w-0.5 rounded-full bg-current"})]})}r(ef,"DragHandleIcon");var Pa=forwardRef(r(function({appearance:t,attachedFooter:o=false,children:n,className:a,classNames:s,style:i,...m},c){Mo("attachedFooter",o);let d=Oe(t),g=Ne(),u=De(d),f=oc(n)?{overflow:"hidden",scrollbarGutter:"auto"}:void 0;return jsx("div",{...g,...m,ref:c,"data-monkeys-component":"table-container","data-slot":"container","data-base-table-container":"","data-attached-footer":o?"":void 0,className:l(u.slots.tableContainer,o&&u.slots.tableContainerFooterAttached,s?.root,a),style:{...u.styles.tableContainer,...o?u.styles.tableContainerFooterAttached:void 0,...f,...i},children:n})},"BaseTableContainer")),Ea=forwardRef(r(function({appearance:t,className:o,classNames:n,style:a,layout:s="native",columns:i,bodyMaxHeight:m,bodyClassName:c,columnOrder:d,columnSizes:g,columnDragEnabled:u=false,columnResizeEnabled:p=false,onColumnOrderChange:f,onColumnSizeChange:b,...h},y){In("layout",s,["native","split-scroll"]),Mo("columnDragEnabled",u),Mo("columnResizeEnabled",p),ks("onColumnOrderChange",f),ks("onColumnSizeChange",b),Ko(m,"bodyMaxHeight",{stringAllowed:true});let v=jb(i);$b(d,v),Kb(g,v);let k=Oe(t),x=Ne(),w=De(k),[C,S]=useState(),T=useRef(null),E=useRef(null),N=s==="split-scroll",O=N?Yb(i,g):void 0,V={appearance:k,theme:w,layout:s,columnTemplate:O,bodyMaxHeight:m,bodyClassName:c,splitHeaderRef:T,splitFooterRef:E,columnOrder:d,columnSizes:g,columnDragEnabled:u,columnResizeEnabled:p,onColumnOrderChange:f,onColumnSizeChange:b,draggingColumnId:C,setDraggingColumnId:S};return jsx(tc.Provider,{value:V,children:jsx("table",{...x,...h,ref:y,"data-monkeys-component":"table","data-slot":"root","data-base-table-layout":s,className:l(w.slots.tableRoot,N&&w.slots.tableSplitRoot,n?.root,o),style:{...w.styles.table,...N?w.styles.tableSplitRoot:void 0,...O?{"--base-table-column-template":O}:void 0,...a}})})},"BaseTable")),Da=forwardRef(r(function({appearance:t,className:o,classNames:n,style:a,...s},i){let{layout:m,splitHeaderRef:c,theme:d}=Uo(t),g=m==="split-scroll";return jsx("thead",{...s,ref:r(p=>{c&&(c.current=g?p:null),ws(i,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")),Wa=forwardRef(r(function({appearance:t,className:o,classNames:n,onScroll:a,style:s,...i},m){let{bodyClassName:c,bodyMaxHeight:d,layout:g,splitFooterRef:u,splitHeaderRef:p,theme:f}=Uo(t),b=g==="split-scroll";return jsx("tbody",{...i,ref:m,"data-slot":"body",onScroll:b?y=>{let v=y.currentTarget.scrollLeft;p?.current&&(p.current.scrollLeft=v),u?.current&&(u.current.scrollLeft=v),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:qb(d,"bodyMaxHeight")}:void 0,...s}})},"BaseTableBody"));forwardRef(r(function({appearance:t,className:o,classNames:n,style:a,...s},i){let{layout:m,splitFooterRef:c,theme:d}=Uo(t),g=m==="split-scroll";return jsx("tfoot",{...s,ref:r(p=>{c&&(c.current=g?p:null),ws(i,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 gn=forwardRef(r(function({interactive:t,selected:o,disabled:n,appearance:a,className:s,classNames:i,style:m,...c},d){Mo("interactive",t),Mo("selected",o),Mo("disabled",n);let{layout:g,theme:u}=Uo(a),p=g==="split-scroll";return jsx("tr",{...c,ref:d,"data-slot":"row","aria-disabled":n||void 0,"data-state":o?"selected":void 0,className:l(u.slots.tableRow,p&&u.slots.tableSplitRow,t&&!n&&u.slots.tableRowInteractive,o&&u.slots.tableRowSelected,n&&u.slots.tableRowDisabled,i?.root,s),style:{...u.styles.tableRow,...p?u.styles.tableSplitRow:void 0,...m}})},"BaseTableRow")),La=forwardRef(r(function({presentation:t,columnId:o,align:n,verticalAlign:a,icon:s,label:i,description:m,meta:c,actions:d,trailing:g,sortable:u,sortDirection:p="none",sortLabel:f,onSort:b,draggable:h,dragLabel:y,resizable:v,resizeLabel:k,width:x,minWidth:w,maxWidth:C,appearance:S,className:T,classNames:E,style:N,children:O,onDragOver:V,onDrop:W,...F},H){if(In("head presentation",t,["classic-data-grid"]),In("head align",n,["left","center","right"]),In("head verticalAlign",a,["top","middle","bottom"]),In("head sortDirection",p,["asc","desc","none"]),Mo("head sortable",u),Mo("head draggable",h),Mo("head resizable",v),ks("head onSort",b),ys("head sortLabel",f),ys("head dragLabel",y),ys("head resizeLabel",k),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(Ko(x,"head width",{stringAllowed:true}),Ko(w,"head minWidth"),Ko(C,"head maxWidth"),w!==void 0&&C!==void 0&&w>C)throw new Error("BaseTable head minWidth cannot be greater than maxWidth.");let I=Uo(S),{theme:G}=I,q=vt().table,R=I.layout==="split-scroll",D=t==="classic-data-grid",M=n??(R?"center":"left"),$=a??"middle",J=useRef(null),_=useRef(()=>{}),[ee,K]=useState(),Z=r(ce=>{J.current=ce,ws(H,ce);},"setHeadRef"),re=o&&I.columnSizes?.[o]!==void 0?I.columnSizes[o]:x,ae=!!(o&&h!==false&&(h||I.columnDragEnabled)&&I.columnOrder&&I.onColumnOrderChange),le=!!(o&&v!==false&&(v||I.columnResizeEnabled)&&I.onColumnSizeChange);if(le&&C!==void 0&&C<(w??48))throw new Error("BaseTable resizable head maxWidth cannot be smaller than its effective minWidth.");let L=!!(u||b),me=Jb(p),B=z(i)?i:O,j=z(B)||z(m),ne=f??(j?void 0:q.sortColumn({columnId:o?.trim()||void 0})),fe=ae||z(s)||z(i)||z(m)||z(c)||z(d)||z(g)||L,ye=D?jsx("div",{className:l("flex h-full min-w-0 select-none items-center",M==="center"?"justify-center":M==="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||!I.columnOrder||ce.key!=="ArrowLeft"&&ce.key!=="ArrowRight")return;let U=I.columnOrder.indexOf(o);if(U<0)return;let A=Ma(ce.currentTarget),X=ce.key==="ArrowLeft"?-1:1,ie=U+(A?-X:X),Y=I.columnOrder[ie];if(!Y)return;let de=vs(I.columnOrder,o,Y);de&&(ce.preventDefault(),I.onColumnOrderChange?.(de,{columnId:o,targetColumnId:Y}));},"onKeyDown"),onDragStart:r(ce=>{ce.stopPropagation(),I.setDraggingColumnId(o),ce.dataTransfer.effectAllowed="move",ce.dataTransfer.setData(fs,o);},"onDragStart"),onDragEnd:r(ce=>{ce.stopPropagation(),I.setDraggingColumnId(void 0);},"onDragEnd")}:{},children:B}):fe?jsxs("div",{className:l(G.slots.tableHeadContent,E?.content),children:[jsxs("div",{className:l(G.slots.tableHeadMain,E?.main),children:[ae?jsx("button",{type:"button",draggable:true,title:y,"aria-label":y??q.dragColumn({columnId:o}),className:l(G.slots.tableHeadDragHandle,E?.dragHandle),onClick:ce=>ce.stopPropagation(),onKeyDown:ce=>{if(!o||!I.columnOrder||ce.key!=="ArrowLeft"&&ce.key!=="ArrowRight")return;let U=I.columnOrder.indexOf(o);if(U<0)return;let A=Ma(ce.currentTarget),X=ce.key==="ArrowLeft"?-1:1,ie=U+(A?-X:X),Y=I.columnOrder[ie];if(!Y)return;let de=vs(I.columnOrder,o,Y);de&&(ce.preventDefault(),I.onColumnOrderChange?.(de,{columnId:o,targetColumnId:Y}));},onDragStart:ce=>{ce.stopPropagation(),I.setDraggingColumnId(o),ce.dataTransfer.effectAllowed="move",ce.dataTransfer.setData(fs,o);},onDragEnd:ce=>{ce.stopPropagation(),I.setDraggingColumnId(void 0);},children:jsx(ef,{})}):null,s?jsx("span",{className:l(G.slots.tableHeadIcon,E?.icon),children:s}):null,L?jsxs("button",{type:"button",disabled:!b,title:f,"aria-label":ne,className:l(G.slots.tableHeadSortButton,E?.sortButton),onClick:ce=>{ce.stopPropagation(),b?.(o);},children:[jsxs("span",{className:l(G.slots.tableHeadText,E?.text),children:[z(B)?jsx("span",{className:l(G.slots.tableHeadLabel,E?.label),children:B}):null,z(m)?jsx("span",{className:l(G.slots.tableHeadDescription,E?.description),children:m}):null]}),jsx(Qb,{direction:p,className:l(G.slots.tableHeadSortIcon,E?.sortIcon)})]}):jsxs("span",{className:l(G.slots.tableHeadText,E?.text),children:[z(B)?jsx("span",{className:l(G.slots.tableHeadLabel,E?.label),children:B}):null,z(m)?jsx("span",{className:l(G.slots.tableHeadDescription,E?.description),children:m}):null]})]}),z(c)||z(d)||z(g)?jsxs("div",{className:l(G.slots.tableHeadActions,E?.actions),children:[z(c)?jsx("span",{className:l(G.slots.tableHeadMeta,E?.meta),children:c}):null,d,g]}):null]}):O,xe=r(ce=>{V?.(ce),!(!ae||!I.draggingColumnId||I.draggingColumnId===o)&&(ce.preventDefault(),ce.dataTransfer.dropEffect="move");},"handleDragOver"),te=r(ce=>{if(W?.(ce),!ae||!o)return;let U=I.draggingColumnId||ce.dataTransfer.getData(fs);if(!U||U===o)return;let A=vs(I.columnOrder,U,o);A&&(ce.preventDefault(),I.onColumnOrderChange?.(A,{columnId:U,targetColumnId:o})),I.setDraggingColumnId(void 0);},"handleDrop"),se=r(ce=>{if(!le||!o||!I.onColumnSizeChange||ce.button!==0&&ce.pointerType!=="touch")return;ce.preventDefault(),ce.stopPropagation(),_.current();let U=ce.clientX,A=Re??J.current?.offsetWidth??w??48,X=$o(A,w,C),ie=ce.pointerId,Y=ce.currentTarget,de=Y.ownerDocument,we=Ma(Y),Ce=r(_e=>{if(_e.pointerId!==ie)return;let Ze=$o(X+(we?U-_e.clientX:_e.clientX-U),w,C);I.onColumnSizeChange?.(o,Ze,{columnId:o,previousWidth:X,minWidth:w,maxWidth:C});},"handlePointerMove"),Me=r(_e=>{_e.pointerId===ie&&_.current();},"handleStop"),Be=r(_e=>{_e.pointerId===ie&&_.current();},"handleLostCapture");_.current=()=>{de.removeEventListener("pointermove",Ce),de.removeEventListener("pointerup",Me),de.removeEventListener("pointercancel",Me),Y.removeEventListener("lostpointercapture",Be),Y.hasPointerCapture?.(ie)&&Y.releasePointerCapture?.(ie),_.current=()=>{};},Ub(Y,ie),de.addEventListener("pointermove",Ce),de.addEventListener("pointerup",Me),de.addEventListener("pointercancel",Me),Y.addEventListener("lostpointercapture",Be);},"handleResizePointerDown"),Re=typeof re=="number"?$o(re,w,C):ee,Ie=Re??$o(w??48,w,C),ze=r(ce=>{if(!le||!o||!I.onColumnSizeChange)return;let U=Ma(ce.currentTarget),A=Re??$o(J.current?.offsetWidth||w||48,w,C),X;ce.key==="ArrowLeft"&&(X=A+(U?Ia:-Ia)),ce.key==="ArrowRight"&&(X=A+(U?-Ia:Ia)),ce.key==="Home"&&w!==void 0&&(X=w),ce.key==="End"&&C!==void 0&&(X=C),X!==void 0&&(ce.preventDefault(),ce.stopPropagation(),I.onColumnSizeChange(o,$o(X,w,C),{columnId:o,previousWidth:A,minWidth:w,maxWidth:C}));},"handleResizeKeyDown");return useEffect(()=>{if(typeof re=="number"){K(void 0);return}let ce=J.current?.getBoundingClientRect().width;if(ce&&Number.isFinite(ce)){let U=$o(ce,w,C);K(A=>A===U?A:U);}},[re,w,C,le]),useEffect(()=>(le||_.current(),()=>_.current()),[le,o,I.onColumnSizeChange]),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,R&&G.slots.tableSplitHead,M==="center"&&G.slots.tableCellAlignCenter,M==="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-['']",E?.root,T),style:{...G.styles.tableHead,...R?G.styles.tableSplitHead:void 0,width:R?void 0:hs(re),minWidth:R?void 0:hs(w),maxWidth:R?void 0:hs(C),...R?{alignItems:Zb($),justifyContent:Xb(M),textAlign:M}:a?{verticalAlign:a}:void 0,...N},onDragOver:xe,onDrop:te,children:[ye,le&&D?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?jsx("button",{type:"button",role:"separator","aria-orientation":"vertical","aria-valuenow":Ie,"aria-valuemin":w??48,"aria-valuemax":C,"aria-valuetext":`${Ie}px`,title:k,"aria-label":k??q.resizeColumn({columnId:o}),className:l(G.slots.tableHeadResizeHandle,E?.resizeHandle),onClick:ce=>ce.stopPropagation(),onKeyDown:ze,onPointerDown:se}):null]})},"BaseTableHead")),fr=forwardRef(r(function({align:t="left",appearance:o,className:n,classNames:a,style:s,...i},m){In("cell align",t,["left","center","right"]);let{layout:c,theme:d}=Uo(o),g=c==="split-scroll";return jsx("td",{...i,ref:m,"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,...s}})},"BaseTableCell"));forwardRef(r(function({appearance:t,className:o,classNames:n,style:a,...s},i){let{theme:m}=Uo(t);return jsx("caption",{...s,ref:i,"data-slot":"caption",className:l(m.slots.tableCaption,n?.root,o),style:{...m.styles.tableCaption,...a}})},"BaseTableCaption"));var Aa=forwardRef(r(function({colSpan:t,icon:o,title:n,description:a,actions:s,children:i,appearance:m,className:c,classNames:d,style:g,...u},p){if(!Number.isSafeInteger(t)||t<1)throw new Error("BaseTable empty colSpan must be a positive safe integer.");let{layout:f,theme:b}=Uo(m),h=f==="split-scroll",y=z(o)||z(n)||z(a)||z(s);return jsx("tr",{...u,ref:p,"data-slot":"empty-row",className:l(b.slots.tableEmptyRow,h&&b.slots.tableSplitRow,d?.row,c),style:{...b.styles.tableEmpty,...h?b.styles.tableSplitRow:void 0,...g},children:jsx("td",{colSpan:t,"data-slot":"empty-cell",className:l(b.slots.tableEmptyCell,h&&b.slots.tableSplitCell,d?.cell),style:h?{gridColumn:"1 / -1"}:void 0,children:y?jsxs("div",{className:l(b.slots.tableEmptyContent,d?.content),children:[z(o)?jsx("div",{className:l(b.slots.tableEmptyIcon,d?.icon),children:o}):null,z(n)?jsx("div",{className:l(b.slots.tableEmptyTitle,d?.title),children:n}):null,z(a)?jsx("div",{className:l(b.slots.tableEmptyDescription,d?.description),children:a}):null,z(s)?jsx("div",{className:l(b.slots.tableEmptyActions,d?.actions),children:s}):null]}):i})})},"BaseTableEmpty"));var of={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"},yr=forwardRef(r(function({invalid:t=false,disabled:o=false,readOnly:n=false,controlSize:a,appearance:s,className:i,classNames:m,style:c,"aria-invalid":d,onBlur:g,onChange:u,...p},f){for(let[x,w]of [["invalid",t],["disabled",o],["readOnly",n]])if(typeof w!="boolean")throw new TypeError(`BaseTextarea ${x} 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(s),h=Ne(),y=De(b),v=Vo(),k=t||v.invalid;return jsx("textarea",{...h,...p,ref:f,disabled:o,readOnly:n,"aria-invalid":d??(k||void 0),"data-monkeys-component":"textarea","data-slot":"control","data-size":a,"data-invalid":k||void 0,"data-disabled":o||void 0,"data-readonly":n||void 0,className:l(y.slots.controlWrapper,y.slots.controlBase,y.slots.controlTextarea,k&&y.slots.controlInvalid,o&&y.slots.controlDisabled,n&&y.slots.controlReadOnly,a&&of[a],m?.control,i),style:{...y.styles.control,...k?y.styles.controlInvalid:void 0,...o?y.styles.controlDisabled:void 0,...c},onBlur:x=>{g?.(x),v.notifyBlur(x.currentTarget.value);},onChange:x=>{u?.(x),v.notifyChange(x.currentTarget.value);}})},"BaseTextarea"));var nc={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 Ns(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(nc,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 s={};for(let[i,m]of Object.entries(Object.getOwnPropertyDescriptors(a))){if(!("value"in m)||typeof m.value!="string")return;let c=m.value;if(i==="key"){if(c.length>256)return}else if(i==="fill"){if(c!=="currentColor"&&c!=="none")return}else if(nc[n].includes(i)){if(i==="d"){if(!c.length||c.length>8192||!/^[MmZzLlHhVvCcSsQqTtAa0-9eE+.,\s-]+$/.test(c))return}else if(i==="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;s[i]=c;}t.push([n,s]);}return t}r(Ns,"parseAssetIconNodes");var Bn=forwardRef(r(function({icon:t,alt:o,normalizeImageIcon:n=false,className:a,style:s,...i},m){let c=Ne(),d=Vi()??resolveAssetIconNodes,g=Kl(),u=t.kind==="image"?t.src:void 0,[p,f]=useState();useEffect(()=>{if(!u||!g)return;let F=new AbortController;return Promise.resolve().then(()=>g(u,F.signal)).then(H=>{F.signal.aborted||f({reference:u,resolver:g,src:Zt(H,"media")});}).catch(()=>{F.signal.aborted||f({reference:u,resolver:g});}),()=>F.abort()},[u,g]);let b=g?p&&p.reference===u&&p.resolver===g?p.src:void 0:Zt(u,"media"),[h,y]=useState(),v=useRef(null);useEffect(()=>{let F=v.current;b&&F?.complete&&y({source:b,resolver:g,ready:F.naturalWidth>0});},[b,g]);let k=t.kind==="lucide"?t.name:void 0,x=useMemo(()=>{if(k)try{return d.peek?Ns(d.peek(k)):void 0}catch{return}},[k,d]),[w,C]=useState();useEffect(()=>{let F=true;return k&&!x&&Promise.resolve().then(()=>d(k)).then(H=>{F&&C({name:k,resolver:d,nodes:Ns(H)});}).catch(()=>{F&&C({name:k,resolver:d,nodes:void 0});}),()=>{F=false;}},[k,d,x]);let S=w?.name===k&&w?.resolver===d,T=x??(S?w?.nodes:void 0),E=!!(u&&g&&!(p?.reference===u&&p?.resolver===g)),N=h?.source===b&&h?.resolver===g,O=!!(k&&!x&&!S),V=t.kind==="emoji"?"ready":t.kind==="image"?b?N?h?.ready?"ready":"error":"loading":E?"loading":"error":T?"ready":O?"loading":"error",W=V==="loading"?jsx(Dt,{variant:"block",className:"h-5 w-5 max-h-full max-w-full rounded"}):jsx(Wrench,{"aria-hidden":"true",className:"h-5 w-5 max-h-full max-w-full"});return jsx("div",{...c,...i,ref:m,role:"img","aria-label":o,"data-icon-state":V,"aria-busy":V==="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}:{},...s},children:t.kind==="image"?jsxs(Fragment,{children:[b&&V!=="error"&&jsx("img",{ref:v,src:b,alt:"","aria-hidden":"true",onLoad:F=>{F.currentTarget===v.current&&y({source:b,resolver:g,ready:true});},onError:F=>{F.currentTarget===v.current&&y({source:b,resolver:g,ready:false});},style:V==="loading"?{display:"none"}:void 0,className:n?"h-5 w-5 object-contain":"h-full w-full object-cover"},b),V!=="ready"&&W]}):t.kind==="emoji"?jsx("span",{"aria-hidden":"true",children:t.value}):T?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:T.map(([F,H],I)=>{let{key:G,...q}=H;return createElement(F,{...q,key:G??I})})}):W})},"BaseAssetIcon"));function ac({expanded:e}){return 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:jsx("path",{d:e?"m6 9 6 6 6-6":"m9 18 6-6-6-6"})})}r(ac,"ChevronIcon");function gf(){return 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:[jsx("circle",{cx:"12",cy:"12",r:"1"}),jsx("circle",{cx:"12",cy:"5",r:"1"}),jsx("circle",{cx:"12",cy:"19",r:"1"})]})}r(gf,"MoreIcon");function bf(){return 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:[jsx("circle",{cx:"9",cy:"6",r:"1"}),jsx("circle",{cx:"9",cy:"12",r:"1"}),jsx("circle",{cx:"9",cy:"18",r:"1"}),jsx("circle",{cx:"15",cy:"6",r:"1"}),jsx("circle",{cx:"15",cy:"12",r:"1"}),jsx("circle",{cx:"15",cy:"18",r:"1"})]})}r(bf,"GripIcon");function lc(e,t){for(let o of e??[])o.defaultExpanded&&t.add(o.id),lc(o.children,t);}r(lc,"collectDefaultExpandedNodeIds");function ic(e,t){let o=new Set(t??[]);for(let n of e)lc(n.nodes,o);return o}r(ic,"buildDefaultNodeExpandedSet");function sc(e,t){let o=new Set(t??[]);for(let n of e)(n.hideHeader||n.defaultExpanded!==false)&&o.add(n.id);return o}r(sc,"buildDefaultGroupExpandedSet");function dc(e,t,o,n){for(let[a,s]of (e??[]).entries())n.set(s.id,{node:s,group:t,parentId:o,index:a}),dc(s.children,t,s.id,n);}r(dc,"flattenNodes");function ff(e){let t=new Map;for(let o of e)dc(o.nodes,o,void 0,t);return t}r(ff,"buildFlattenedNodeMap");function yf(e,t){return [...t??[],...e.actions??[]]}r(yf,"getNodeActions");function hf(e,t){return [...t??[],...e.actions??[]]}r(hf,"getGroupActions");function Is({groups:e,nodes:t,context:o,selectedNodeId:n,selectedGroupId:a,expandedNodeIds:s,defaultExpandedNodeIds:i,expandedGroupIds:m,defaultExpandedGroupIds:c,resetExpansionKey:d,nodeActions:g,groupActions:u,indentSize:p=16,indentOffset:f=8,actionIcon:b,empty:h,loading:y=false,loadingNode:v,error:k,labels:x,reorderMode:w="none",appearance:C,className:S,classNames:T,onSelectNode:E,onSelectGroup:N,onExpandedNodeIdsChange:O,onExpandedGroupIdsChange:V,onAction:W,onReorderNodes:F}){let H=vt().dataExplorer.viewTree,I=Hl(zl(C)),G=x?.actions??H.actions,q=x?.expand??H.expand,R=x?.collapse??H.collapse,D=v??x?.loading??H.loading,M=h??x?.empty??H.empty,$=Array.isArray(e),J=useMemo(()=>$?e:[{id:"__root__",hideHeader:true,defaultExpanded:true,nodes:Array.isArray(t)?t:[]}],[e,$,t]),_=useMemo(()=>ff(J),[J]),[ee,K]=useState(()=>ic(J,i)),[Z,re]=useState(()=>sc(J,c)),[ae,le]=useState(),[L,me]=useState();useEffect(()=>{K(ic(J,i)),re(sc(J,c));},[c,i,d]);let B=s!==void 0?new Set(s):ee,j=m!==void 0?new Set(m):Z,ne=r((U,A)=>{let X=new Set(B);A?X.add(U):X.delete(U),s===void 0&&K(X),O?.([...X]);},"setNodeExpanded"),fe=r((U,A)=>{let X=new Set(j);A?X.add(U):X.delete(U),m===void 0&&re(X),V?.([...X]);},"setGroupExpanded"),ye=r((U,A)=>A.type==="node"?{type:"node",action:U,node:A.node,group:A.group,context:o}:{type:"group",action:U,group:A.group,context:o},"createActionContext"),xe=r((U,A)=>{let X=U.filter(ie=>{let Y=ye(ie,A);return Zn(ie.visible,Y)??true});return X.length===0?null:jsxs(Ht.Root,{children:[jsx(Ht.Trigger,{asChild:true,children:jsx("button",{type:"button",title:G,"aria-label":G,className:l(I.slots.menuTrigger,A.type==="group"?I.slots.treeGroupActions:I.slots.treeNodeActions,A.type==="group"?T?.groupActions:l(T?.nodeActions,T?.itemActions)),onClick:ie=>ie.stopPropagation(),children:b??jsx(gf,{})})}),jsx(Ht.Portal,{children:jsx(Ht.Content,{align:"end",sideOffset:6,className:l(I.slots.menuContent,T?.menuContent),style:I.styles.menuContent,onClick:ie=>ie.stopPropagation(),children:X.map(ie=>{let Y=ye(ie,A),de=(Zn(ie.disabled,Y)??false)||(Zn(ie.loading,Y)??false),we=Zn(ie.active,Y)??false;return ie.render?jsx("div",{children:ie.render(Y)},ie.id):jsxs("div",{children:[ie.separatorBefore?jsx(Ht.Separator,{className:I.slots.menuSeparator}):null,jsxs(Ht.Item,{title:ie.title,disabled:de,className:l(I.slots.menuItem,Vl(I,ie.tone),we&&"bg-accent text-accent-foreground",T?.menuItem),style:I.styles.menuItem,onSelect:()=>{de||(ie.onAction?.(Y),W?.(Y));},children:[ie.icon?jsx("span",{className:I.slots.menuItemIcon,children:ie.icon}):null,jsx("span",{className:I.slots.menuItemLabel,children:ie.label})]}),ie.separatorAfter?jsx(Ht.Separator,{className:I.slots.menuSeparator}):null]},ie.id)})})})]})},"renderActions"),te=r((U,A)=>{U.preventDefault();let X=ae||U.dataTransfer.getData("application/x-data-explorer-node");if(!X||X===A.id||!F){le(void 0),me(void 0);return}let ie=_.get(X),Y=_.get(A.id);if(!ie||!Y){le(void 0),me(void 0);return}let de=ie.parentId===Y.parentId&&ie.group?.id===Y.group?.id;if(w==="same-parent"&&!de){le(void 0),me(void 0);return}let we={activeNode:ie.node,overNode:Y.node,activeGroup:ie.group,overGroup:Y.group,activeParentId:ie.parentId,overParentId:Y.parentId,oldIndex:ie.index,newIndex:Y.index,sameParent:de,context:o};F(we),le(void 0),me(void 0);},"handleDrop"),se=r((U,A,X)=>{let ie=Array.isArray(U.children)?U.children:[],Y=ie.length>0,de=U.collapsible===false||B.has(U.id),we=n===U.id,Ce=U.selectable!==false&&!U.disabled,Me=w!=="none"&&!!F&&U.reorderable!==false,Be=ae===U.id,_e=L===U.id&&ae!==U.id,Ze=yf(U,g);return jsxs("div",{"data-data-explorer-entry":"node","data-data-explorer-node-id":U.id,"data-data-explorer-group-id":A?.id,className:l(I.slots.treeNode,T?.node,T?.item,U.className),onDragOver:Fe=>{!ae||!Me||(Fe.preventDefault(),me(U.id));},onDragLeave:()=>{L===U.id&&me(void 0);},onDrop:Fe=>te(Fe,U),children:[jsxs("div",{className:l(I.slots.treeNodeButton,we&&I.slots.treeNodeSelected,U.disabled&&I.slots.treeNodeDisabled,Be&&I.slots.treeNodeDragging,_e&&"ring-1 ring-primary/30",we&&T?.itemSelected,we&&T?.nodeSelected,U.disabled&&T?.nodeDisabled,Be&&T?.nodeDragging,T?.nodeButton,T?.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":Y?de:void 0,"aria-label":U.ariaLabel,tabIndex:Ce?0:-1,onClick:()=>{Ce&&E?.(U,o);},onKeyDown:Fe=>{Fe.target===Fe.currentTarget&&Ce&&(Fe.key!=="Enter"&&Fe.key!==" "||(Fe.preventDefault(),E?.(U,o)));},children:[Me?jsx("span",{draggable:true,className:l(I.slots.treeNodeDragHandle,T?.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:jsx(bf,{})}):null,Y?jsx("button",{type:"button",className:l(I.slots.treeNodeToggle,T?.nodeToggle,T?.expander),"aria-label":de?R:q,onClick:Fe=>{Fe.stopPropagation(),ne(U.id,!de);},children:jsx(ac,{expanded:de})}):jsx("span",{className:l(I.slots.treeNodeToggle,T?.nodeToggle)}),U.icon?jsx("span",{className:l(I.slots.treeNodeIcon,T?.nodeIcon,T?.itemIcon),children:U.icon}):null,jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[jsx("span",{className:l(I.slots.treeNodeLabel,T?.nodeLabel,T?.itemLabel),children:U.label}),U.description?jsx("span",{className:l(I.slots.treeNodeDescription,T?.nodeDescription),children:U.description}):null]}),U.meta?jsx("span",{className:l(I.slots.treeNodeMeta,T?.nodeMeta),children:U.meta}):null,U.badge?jsx("span",{className:l(I.slots.treeNodeBadge,T?.nodeBadge),children:U.badge}):null,xe(Ze,{type:"node",node:U,group:A})]}),Y&&de?jsx("div",{className:l(I.slots.treeNodeChildren,T?.nodeChildren,T?.list),children:ie.map(Fe=>se(Fe,A,X+1))}):null]},U.id)},"renderNode"),Re=r((U,A,X)=>U===false?null:jsx("div",{className:l(A,X),children:U}),"renderPlaceholder");if(y)return jsx("div",{className:l(I.slots.treeRoot,T?.root,S),children:Re(D,I.slots.treeLoading,T?.loading)});if(k)return jsx("div",{className:l(I.slots.treeRoot,T?.root,S),children:Re(k??x?.error,I.slots.treeError,T?.error)});let Ie=J.some(U=>(U.nodes??[]).length>0),ze=J.some(U=>U.status==="loading"||U.error);return !Ie&&!ze&&(!$||J.length===0)?jsx("div",{className:l(I.slots.treeRoot,T?.root,S),children:Re(M,I.slots.treeEmpty,T?.empty)}):jsx("div",{className:l(I.slots.treeRoot,T?.root,S),role:Ie||J.some(U=>!U.hideHeader)?"tree":void 0,children:J.map(U=>{let A=U.hideHeader||U.collapsible===false||j.has(U.id),X=U.nodes?.length??0,ie=hf(U,u),Y=a===U.id,de=U.collapsible!==false;return jsxs("section",{"data-data-explorer-entry":"group","data-data-explorer-group-id":U.id,className:l(I.slots.treeGroup,T?.group,U.className),children:[U.hideHeader?null:jsxs("div",{role:"treeitem","aria-label":typeof U.label=="string"?U.label:void 0,"aria-selected":U.selectable?Y:void 0,"aria-expanded":de?A:void 0,className:l(I.slots.treeGroupHeader,I.slots.treeGroupHeaderButton,Y&&I.slots.treeNodeSelected,T?.groupHeader,T?.groupHeaderButton,Y&&T?.itemSelected),children:[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",T?.groupLabel),"aria-pressed":U.selectable?Y:void 0,"aria-expanded":!U.selectable&&de?A:void 0,onClick:()=>{if(U.selectable){N?.(U,o);return}de&&fe(U.id,!A);},children:[U.icon?jsx("span",{className:l(I.slots.treeNodeIcon,T?.nodeIcon,T?.itemIcon),children:U.icon}):null,jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[U.label?jsx("span",{className:l(I.slots.treeNodeLabel,T?.nodeLabel,T?.itemLabel),children:U.label}):null,U.description?jsx("span",{className:l(I.slots.treeNodeDescription,T?.nodeDescription),children:U.description}):null]}),U.meta?jsx("span",{className:l(I.slots.treeNodeMeta,T?.nodeMeta),children:U.meta}):null,U.badge?jsx("span",{className:l(I.slots.treeNodeBadge,T?.nodeBadge),children:U.badge}):null]}),de?jsx("button",{type:"button",className:l(I.slots.treeNodeToggle,T?.expander),"aria-label":A?R:q,"aria-expanded":A,onClick:()=>fe(U.id,!A),children:jsx(ac,{expanded:A})}):jsx("span",{className:l(I.slots.treeNodeToggle,T?.expander)}),xe(ie,{type:"group",group:U})]}),A?jsx("div",{role:"group",className:l(I.slots.treeGroupContent,T?.groupContent,T?.list),children:U.loading||U.status==="loading"?Re(D,I.slots.treeLoading,T?.loading):U.error||U.status==="error"?Re(U.error??x?.error??H.error,I.slots.treeError,T?.error):X>0?U.nodes?.map(we=>se(we,U,0)):Re(U.empty??M,I.slots.treeEmpty,T?.empty)}):null]},U.id)})})}r(Is,"DataExplorerViewTree");var xr="gap-2 rounded-[var(--radius)] border border-transparent text-sm font-medium motion-reduce:transition-none",vr="size-[var(--monkeys-component-navigation-sidebar-icon-size,1.125rem)] shrink-0 text-inherit [&_svg]:size-full",Ms="text-foreground hover:border-transparent hover:bg-[var(--navigation-internal-hover-background)] hover:text-[var(--navigation-internal-hover-foreground)]",Bs="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)]",cc="[--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 uc(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(uc,"unifiedStyle");var xf="[--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)))))]",vf="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)]",hr="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 mc(e,t,o={}){let n=l(xr,e,t,Ms);return {...o,root:l(xf,"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,vf,o.nodeButton),itemSelected:l(Bs,o.itemSelected),nodeIcon:l(vr,"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(hr,"order-2 size-5 p-0 group-focus-within/tree-group:opacity-100",o.groupActions),nodeActions:l(hr,"order-2 size-5 p-0 group-focus-within/tree-node:opacity-100",o.nodeActions),nodeToggle:l(hr,"order-1 empty:hidden",o.nodeToggle),expander:l(hr,"order-1 empty:hidden",o.expander),nodeDragHandle:l(hr,o.nodeDragHandle)}}r(mc,"unifiedTreeClassNames");function Cf({collapsed:e}){return jsx("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-4 w-4",fill:"none",children: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(Cf,"CollapseIcon");function Sf(){return jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-4 w-4",fill:"none",children:[jsx("circle",{cx:"8.5",cy:"8.5",r:"5",stroke:"currentColor",strokeWidth:"1.6"}),jsx("path",{d:"m12.2 12.2 3.3 3.3",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})}r(Sf,"SearchIcon");function Tf(){return jsx("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-3.5 w-3.5",fill:"none",children:jsx("path",{d:"m6 6 8 8m0-8-8 8",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})})}r(Tf,"ClearIcon");function Rf(){return jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-4 w-4",fill:"currentColor",children:[jsx("circle",{cx:"5",cy:"10",r:"1.2"}),jsx("circle",{cx:"10",cy:"10",r:"1.2"}),jsx("circle",{cx:"15",cy:"10",r:"1.2"})]})}r(Rf,"MoreIcon");function Fa({expanded:e}){return 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:jsx("path",{d:"m6 8 4 4 4-4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}r(Fa,"DisclosureIcon");function Nf(e,t){typeof e=="function"?e(t):e&&(e.current=t);}r(Nf,"assignRef");function Pn(e,t){if(!Number.isFinite(t))throw new RangeError(`NavigationSidebar ${e} must be a finite number.`)}r(Pn,"requireFiniteNumber");function If(e){let t=e.minWidth??180,o=e.maxWidth??420,n=e.defaultWidth??256,a=e.collapsedWidth??60,s=e.collapseThreshold??140;if(Pn("minWidth",t),Pn("maxWidth",o),Pn("defaultWidth",n),Pn("collapsedWidth",a),Pn("collapseThreshold",s),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(s<0)throw new RangeError("NavigationSidebar collapseThreshold cannot be negative.");return {defaultWidth:n,minWidth:t,maxWidth:o,collapsedWidth:a,collapseThreshold:s}}r(If,"resolveLayoutBounds");function Ha(e,t){return Math.min(Math.max(e,t.minWidth),t.maxWidth)}r(Ha,"clampWidth");function yc(e,t){if(t){t(e);return}typeof console<"u"&&console.warn("NavigationSidebar could not persist layout state.",e);}r(yc,"reportStorageError");function hc(e){if(e)return e;if(!(typeof window>"u"))return window.localStorage}r(hc,"resolveStorage");function Mf(e,t){let o={collapsed:e.defaultCollapsed??false,width:Ha(t.defaultWidth,t)};if(!e.storageKey)return o;let n=hc(e.storage);if(!n)return o;try{let a=n.getItem(e.storageKey);if(!a)return o;let s=JSON.parse(a);return {collapsed:typeof s.collapsed=="boolean"?s.collapsed:o.collapsed,width:typeof s.width=="number"&&Number.isFinite(s.width)?Ha(s.width,t):o.width}}catch(a){return yc(a,e.onStorageError),o}}r(Mf,"readStoredLayout");function Es(e,t){return t||(typeof e=="string"?e:void 0)}r(Es,"getNodeTitle");function Bf(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(Bf,"activeVariantClassName");function Pf(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?Bs:Bf(a),inactive:t?Ms:"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&&cc,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(Pf,"resolveAppearance");var fc="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)))]",Ef="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)))]",kr="hover:!bg-transparent hover:!text-inherit focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring";function Df(e){return {...e,groupHeader:l(fc,e?.groupHeader),itemSelected:l(Ef,e?.itemSelected),nodeButton:l(fc,"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(kr,e?.expander),nodeToggle:l(kr,e?.nodeToggle),groupActions:l(kr,e?.groupActions),nodeActions:l(kr,e?.nodeActions),nodeDragHandle:l(kr,e?.nodeDragHandle)}}r(Df,"resolveNavigationTreeClassNames");function Ds({item:e,active:t,collapsed:o,mobile:n,embedded:a=false,appearance:s,classNames:i,domClassName:m}){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",s.itemHeight,s.itemPadding,s.unified&&xr,a?"min-h-0 self-stretch border-0 bg-transparent text-inherit hover:bg-transparent hover:text-inherit":t?s.selected:s.inactive,o&&!n&&"justify-center px-0",e.disabled&&"pointer-events-none opacity-50",i?.item,t&&i?.itemActive,n&&i?.mobileItem,m,e.className)}r(Ds,"entryClassName");function Ws({item:e,collapsed:t,mobile:o,classNames:n,endIndicator:a,appearance:s}){return jsxs(Fragment,{children:[z(e.icon)?jsx("span",{className:l("flex size-5 shrink-0 items-center justify-center [&_svg]:size-full",s.unified&&vr,n?.itemIcon),"aria-hidden":"true",children:e.icon}):null,o||!t?jsxs("span",{className:l("flex min-w-0 flex-1 flex-col",n?.itemContent),children:[jsx("span",{className:l("min-w-0 truncate font-semibold",s.unified&&"font-medium",n?.itemLabel),children:e.label}),z(e.description)?jsx("span",{className:l("mt-0.5 truncate text-xs font-normal",s.unified&&"text-inherit",n?.itemDescription),children:e.description}):null]}):null,(o||!t)&&z(e.meta)?jsx("span",{className:l("shrink-0 text-xs text-muted-foreground",n?.itemMeta),children:e.meta}):null,(o||!t)&&z(e.endContent)?jsx("span",{className:l("shrink-0",n?.itemEndContent),children:e.endContent}):null,(o||!t)&&z(a)?jsx("span",{className:"flex shrink-0 items-center justify-center",children:a}):null]})}r(Ws,"EntryContent");function Va({item:e,active:t,collapsed:o,itemAs:n,appearance:a,classNames:s,mobile:i=false,embedded:m=false,onSelect:c,ariaControls:d,ariaExpanded:g,endIndicator:u}){let p=n??(e.href?"a":"button"),f=Es(e.label,e.title),b=e.domProps??{},h=r(v=>{if(e.disabled){v.preventDefault();return}e.onClick?.(v),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:h};return 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:Ds({item:e,active:t,collapsed:o,mobile:i,embedded:m,appearance:a,classNames:s,domClassName:b.className}),children:jsx(Ws,{appearance:a,item:e,collapsed:o,mobile:i,classNames:s,endIndicator:u})})}r(Va,"EntryButton");function Wf({item:e,appearance:t,classNames:o}){let n=e.domProps??{};return jsx("div",{...n,"data-navigation-sidebar-item-id":e.id,"aria-disabled":e.disabled||void 0,title:Es(e.label,e.title),className:Ds({item:e,active:false,collapsed:false,mobile:true,embedded:true,appearance:t,classNames:o,domClassName:n.className}),children:jsx(Ws,{appearance:t,item:e,collapsed:false,mobile:true,classNames:o})})}r(Wf,"EntryPresentation");function Ga({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&&xr,e?t.selected:t.inactive)}r(Ga,"routeRowClassName");function _a(e,t){return t?e.filter(o=>!o.filterIds?.length||o.filterIds.includes(t)):e}r(_a,"filterCatalogItems");function Lf({props:e,collapsed:t,appearance:o}){let{items:n=[],sections:a=[],filters:s=[],activeFilterId:i,activeItemId:m,onFilterSelect:c,itemAs:d,layout:g="single",empty:u,ariaLabel:p,classNames:f}=e,b=_a(n,i),h=a.map(x=>({...x,items:_a(x.items,i)})).filter(x=>x.items.length>0),y=b.length>0||h.length>0,v=s.length>0&&!t?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:s.map(x=>{let w=x.id===i;return jsxs("button",{type:"button",title:x.title??(typeof x.label=="string"?x.label:void 0),"aria-pressed":w,disabled:x.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",w&&"bg-muted text-foreground",f?.filterItem,w&&f?.filterItemActive),onClick:()=>c?.(x),children:[z(x.icon)?jsx("span",{"aria-hidden":"true",children:x.icon}):null,jsx("span",{className:"truncate",children:x.label})]},x.id)})}):null,k=y?jsxs("div",{className:l("min-w-0 flex-1",f?.list),children:[b.length>0?jsx("ul",{className:"grid list-none gap-1 p-0",children:b.map(x=>jsx("li",{children:jsx(Va,{item:x,active:x.active??x.id===m,collapsed:t,itemAs:d,appearance:o,classNames:f})},x.id))}):null,h.map(x=>jsxs("section",{className:l("mt-3 first:mt-0",f?.section,x.className),children:[!t&&z(x.label)?jsx("div",{className:l("mb-1 px-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",f?.sectionLabel,x.labelClassName),children:x.label}):null,jsx("ul",{className:"grid list-none gap-1 p-0",children:x.items.map(w=>jsx("li",{children:jsx(Va,{item:w,active:w.active??w.id===m,collapsed:t,itemAs:d,appearance:o,classNames:f})},w.id))})]},x.id))]}):jsx("div",{className:"px-3 py-8 text-center text-sm text-muted-foreground",children:u});return jsxs("nav",{"aria-label":p,className:l(g==="split"&&!t&&"flex min-w-0 gap-2"),children:[v,k]})}r(Lf,"CatalogContent");function Af({child:e,parent:t,active:o,interactive:n,onSelect:a,appearance:s,classNames:i,embedded:m=false}){let c=n?"button":"div",d=e.domProps??{};return 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:Es(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",s.itemHeight,s.itemPadding,s.unified&&xr,m?"min-h-0 self-stretch border-0 bg-transparent text-inherit hover:bg-transparent hover:text-inherit":o?s.selected:s.inactive,e.disabled&&"pointer-events-none opacity-50",i?.childItem,o&&i?.childItemActive,d.className,e.className),onClick:n&&!e.disabled?()=>a?.(e,t):void 0,children:[z(e.icon)?jsx("span",{className:l("flex size-5 shrink-0 items-center justify-center [&_svg]:size-full",s.unified&&vr),"aria-hidden":"true",children:e.icon}):null,jsx("span",{className:"min-w-0 truncate",children:e.label})]})}r(Af,"ChildEntry");function ja({itemId:e,actions:t,kind:o,className:n,mobile:a=false}){return z(t)?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(ja,"RouteActions");function Ls(e){return e.interaction==="disclosure"}r(Ls,"isDisclosureRouteItem");function zf(e){let t=new Set,o=new Set,n=new Set;for(let a of e){let s=a.id;if(t.has(s))throw new RangeError(`NavigationSidebar route item ids must be unique; received "${s}" more than once.`);if(t.add(s),Ls(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 "${s}" 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 m of a.children??[]){if(o.has(m.id))throw new RangeError(`NavigationSidebar route child ids must be unique; received "${m.id}" more than once.`);o.add(m.id);}}return n}r(zf,"validateRouteItems");function Of({item:e,expanded:t,controls:o,label:n,onToggle:a,classNames:s}){let i=typeof e.label=="string"?e.label:e.id;return jsx("button",{type:"button",disabled:e.disabled,"aria-expanded":t,"aria-controls":o,"aria-label":`${n}: ${i}`,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",s?.childMenuTrigger),onClick:a,children:jsx(Fa,{expanded:t})})}r(Of,"RouteChildrenToggle");function $a({item:e,activeChildId:t,label:o,onChildSelect:n,classNames:a,appearance:s,triggerVariant:i="submenu",mobile:m=false}){let c=(e.children??[]).filter(p=>!p.disabled);if(!e.children?.length||i==="submenu"&&(!n||c.length===0))return null;let d=typeof e.label=="string"?e.label:e.id,g=!!e.disabled||!n||c.length===0,u=e.domProps??{};return jsxs(Ht.Root,{children:[jsx(Ht.Trigger,{asChild:true,children:i==="item"&&s?jsx("button",{...u,type:"button",disabled:g,"aria-label":`${o}: ${d}`,title:o,"data-navigation-sidebar-item-id":e.id,"data-navigation-sidebar-disclosure-menu":"true",className:Ds({item:e,active:false,collapsed:!m,mobile:m,appearance:s,classNames:a,domClassName:u.className}),children:jsx(Ws,{appearance:s,item:e,collapsed:!m,mobile:m,classNames:a,endIndicator:m?jsx(Fa,{expanded:false}):void 0})}):jsx("button",{type:"button",disabled:i==="disclosure"?g:void 0,"data-navigation-sidebar-disclosure-trigger":i==="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",i==="disclosure"?"w-7":"w-6",a?.childMenuTrigger),"aria-label":`${o}: ${d}`,title:o,children:i==="disclosure"?jsx(Fa,{expanded:false}):jsx(Rf,{})})}),jsx(Ht.Portal,{children:jsx(Ht.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=>jsxs(Ht.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:[z(p.icon)?jsx("span",{"aria-hidden":"true",children:p.icon}):null,jsx("span",{className:"truncate",children:p.label})]},p.id))})})]})}r($a,"CollapsedChildMenu");function Ff({props:e,collapsed:t,appearance:o}){let{routeItems:n,activeItemId:a,activeChildId:s,expandedItemIds:i,defaultExpandedItemIds:m=[],itemAs:c,onItemSelect:d,onChildSelect:g,onExpandedItemIdsChange:u,collapsedChildMenuLabel:p="Open submenu",disclosureLabel:f="Toggle submenu",ariaLabel:b,classNames:h}=e,y=useId(),v=useMemo(()=>zf(n),[n]),[k,x]=useState(()=>m),w=i!==void 0,C=i??k,S=useMemo(()=>C.filter(N=>v.has(N)),[v,C]),T=useMemo(()=>new Set(S),[S]),E=useCallback(N=>{if(N.disabled||!v.has(N.id))return;let O=T.has(N.id)?S.filter(V=>V!==N.id):[...S,N.id];w||x(O),u?.(O);},[v,T,w,S,u]);return jsx("nav",{"aria-label":b,children:jsx("ul",{className:l("grid list-none gap-2 p-0",o.unified&&"gap-0.5",h?.list),children:n.map((N,O)=>{let V=Ls(N),W=!V&&N.id===a,F=!!N.children?.length,H=v.has(N.id),I=!H||T.has(N.id),G=!t&&z(N.actions),q=t&&F&&!!g||!t&&H&&!V||G,R=`${y}-route-children-${O}`;return jsxs("li",{className:"grid min-w-0 gap-1",children:[t&&V?jsx($a,{item:N,activeChildId:s,label:p,onChildSelect:g,classNames:h,appearance:o,triggerVariant:"item"}):jsxs("div",{"data-navigation-sidebar-item-row":q?N.id:void 0,"data-active":q?String(W):void 0,className:q?Ga({active:W,appearance:o}):void 0,children:[jsx(Va,{item:N,active:W,collapsed:t,embedded:q,itemAs:V?"button":c,appearance:o,classNames:h,onSelect:V?()=>E(N):d?()=>d(N):void 0,ariaControls:!t&&H&&V?R:void 0,ariaExpanded:!t&&H&&V?I:void 0,endIndicator:!t&&V&&!G?jsx(Fa,{expanded:I}):void 0}),G?jsx(ja,{itemId:N.id,actions:N.actions,kind:"item",className:h?.itemActions}):null,t&&g?jsx($a,{item:N,activeChildId:s,label:p,onChildSelect:g,classNames:h}):null,!t&&H&&(!V||G)?jsx(Of,{item:N,expanded:I,controls:R,label:f,onToggle:()=>E(N),classNames:h}):null]}),!t&&F?jsx("ul",{id:R,hidden:!I,style:I?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",h?.childList),children:N.children?.map(D=>{let M=z(D.actions),$=D.id===s,J=jsx(Af,{child:D,parent:N,active:$,interactive:!!g,onSelect:g,appearance:o,classNames:h,embedded:M});return jsx("li",{children:M?jsxs("div",{"data-navigation-sidebar-child-row":D.id,"data-active":String($),className:Ga({active:$,appearance:o}),children:[J,jsx(ja,{itemId:D.id,actions:D.actions,kind:"child",className:h?.childActions})]}):J},D.id)})}):null]},N.id)})})})}r(Ff,"RouteContent");function Hf(e,t,o){return [..._a(e,o),...t.flatMap(n=>_a(n.items,o))]}r(Hf,"flattenCatalogItems");function Vf({props:e,appearance:t}){if(!e.mobile||e.mobile.mode!=="horizontal")return null;let o=e.classNames,n=e.kind==="catalog"?Hf(e.items??[],e.sections??[],e.activeFilterId):e.routeItems;return 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 s={...o,mobileItem:l(o?.mobileItem,e.mobile?.itemClassName)},i=e.kind==="route"?a:void 0,m=i!==void 0&&z(i.actions);if(e.kind==="route"&&Ls(a))return m?jsxs("div",{"data-navigation-sidebar-item-row":a.id,"data-active":"false",className:l(Ga({active:false,appearance:t}),"shrink-0"),children:[jsx(Wf,{item:a,appearance:t,classNames:s}),jsx(ja,{itemId:a.id,actions:a.actions,kind:"item",className:o?.itemActions,mobile:true}),jsx($a,{item:a,activeChildId:e.activeChildId,label:e.collapsedChildMenuLabel??"Open submenu",onChildSelect:e.onChildSelect,classNames:s,appearance:t,triggerVariant:"disclosure",mobile:true})]},a.id):jsx(Fragment$1,{children:jsx($a,{item:a,activeChildId:e.activeChildId,label:e.collapsedChildMenuLabel??"Open submenu",onChildSelect:e.onChildSelect,classNames:s,appearance:t,triggerVariant:"item",mobile:true})},a.id);let c=e.kind==="catalog"?a.active??a.id===e.activeItemId:a.id===e.activeItemId,d=jsx(Va,{item:a,active:c,collapsed:false,embedded:m,itemAs:e.itemAs,appearance:t,classNames:s,mobile:true,onSelect:e.kind==="route"&&e.onItemSelect?()=>e.onItemSelect?.(a):void 0});return m&&i?jsxs("div",{"data-navigation-sidebar-item-row":a.id,"data-active":String(c),className:l(Ga({active:c,appearance:t}),"shrink-0"),children:[d,jsx(ja,{itemId:i.id,actions:i.actions,kind:"item",className:o?.itemActions,mobile:true})]},a.id):jsx(Fragment$1,{children:d},a.id)})})}r(Vf,"MobileNavigation");function Gf(e,t){let o=If(e);e.width!==void 0&&Pn("width",e.width);let n=useRef(null);n.current||(n.current=Mf(e,o));let a=useRef(null),[s,i]=useState(n.current.collapsed),[m,c]=useState(n.current.width),[d,g]=useState(e.search?.defaultValue??""),[u,p]=useState(false),f=e.collapsed??s,b=Ha(e.width??m,o),h=e.search?.value??d,y=e.collapsed!==void 0,v=e.width!==void 0,k=useMemo(()=>Pf(e.appearance),[e.appearance]),x=e.collapsible??true,w=e.resizable??true,C=x?e.collapsePlacement??"header":"none",S=e.collapseLabel??"Collapse sidebar",T=e.expandLabel??"Expand sidebar",E=e.resizeLabel??"Resize sidebar",N=!f||o.collapsedWidth>0,O=r(q=>{a.current=q,Nf(t,q);},"setSidebarRef"),V=useCallback(q=>{!x&&q||(y||i(q),e.onCollapsedChange?.(q));},[x,y,e.onCollapsedChange]),W=useCallback(q=>{let R=Ha(q,o);v||c(R),e.onWidthChange?.(R);},[o.maxWidth,o.minWidth,v,e.onWidthChange]);useEffect(()=>{if(!e.storageKey)return;let q=hc(e.storage);if(q)try{q.setItem(e.storageKey,JSON.stringify({collapsed:f,width:b}));}catch(R){yc(R,e.onStorageError);}},[e.onStorageError,e.storage,e.storageKey,f,b]),useEffect(()=>{if(!u)return;let q=document.body.style.cursor,R=document.body.style.userSelect,D=r($=>{let J=a.current;if(!J)return;let _=$.clientX-J.getBoundingClientRect().left;if(x&&_<o.collapseThreshold){V(true);return}V(false),W(_);},"handlePointerMove"),M=r(()=>p(false),"handlePointerUp");return window.addEventListener("pointermove",D),window.addEventListener("pointerup",M),document.body.style.cursor="col-resize",document.body.style.userSelect="none",()=>{window.removeEventListener("pointermove",D),window.removeEventListener("pointerup",M),document.body.style.cursor=q,document.body.style.userSelect=R;}},[o.collapseThreshold,x,u,V,W]);let F=r(q=>{if(!(q.key!=="ArrowLeft"&&q.key!=="ArrowRight")){if(q.preventDefault(),q.key==="ArrowLeft"){let R=b-24;x&&R<o.collapseThreshold?V(true):W(R);return}f&&V(false),W(Math.max(b+24,o.minWidth));}},"handleResizeKeyDown"),H=r(q=>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,q),"aria-label":f?T:S,title:f?T:S,"aria-expanded":!f,onClick:()=>V(!f),children:jsx(Cf,{collapsed:f})}),"collapseButton"),I=z(e.title)||z(e.headerLeading)||z(e.headerActions)||C==="header",G=r(()=>{if(e.kind==="catalog")return jsx(Lf,{props:e,collapsed:f,appearance:k});if(e.kind==="route")return jsx(Ff,{props:e,collapsed:f,appearance:k});let q=e.tree;return jsx(Is,{...q,classNames:k.unified?mc(k.itemHeight,k.itemPadding,q.classNames):Df(q.classNames)})},"renderContent");return jsxs(Fragment,{children:[jsxs("aside",{...e.rootDomProps,ref:O,"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",k.root,e.desktopClassName,e.classNames?.root,e.rootDomProps?.className,e.className),style:{...k.unified?uc(e.appearance?.activeVariant):{},...e.style,width:e.widthMode==="fill"?void 0:f?o.collapsedWidth:b,transition:u?"none":e.style?.transition},children:[w?jsx("button",{type:"button",role:"separator","aria-orientation":"vertical","aria-valuemin":o.minWidth,"aria-valuemax":o.maxWidth,"aria-valuenow":b,"aria-label":E,title:E,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:q=>{q.preventDefault(),p(true);},onKeyDown:F,children: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"?H("absolute -right-3 top-1/2 z-50 -translate-y-1/2 border border-border bg-background shadow-sm"):null,N?jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-col overflow-hidden",children:[I?jsxs("div",{className:l("flex min-h-12 min-w-0 items-center gap-2 border-b border-border/60 px-3",k.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:[z(e.headerLeading)?jsx("span",{className:l("flex shrink-0 items-center justify-center",e.classNames?.headerLeading),children:e.headerLeading}):null,!f&&z(e.title)?jsx("div",{className:l("min-w-0 flex-1 truncate text-sm font-semibold",e.classNames?.title),children:e.title}):null,!f&&z(e.headerActions)?jsx("div",{className:l("flex shrink-0 items-center gap-1",e.classNames?.headerActions),children:e.headerActions}):null,C==="header"?H():null]}):null,!f&&e.search?jsx("div",{className:l("px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))] pb-2 pt-3",k.unified&&"pb-1",e.classNames?.search),children: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",k.searchHeight,k.unified&&"rounded-[var(--radius)] border-border bg-[var(--monkeys-component-navigation-sidebar-search-background,transparent)] px-2"),children:[jsx("span",{className:l("flex shrink-0",k.unified&&vr,e.classNames?.searchIcon),"aria-hidden":"true",children:e.search.icon??jsx(Sf,{})}),jsx("input",{type:"search",value:h,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:q=>{let R=q.currentTarget.value;e.search?.value===void 0&&g(R),e.search?.onValueChange?.(R);}}),h&&e.search.clearLabel?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:jsx(Tf,{})}):null]})}):null,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",k.unified&&e.search&&"pt-1",f&&"px-1.5",e.classNames?.content),children:G()}),z(e.footer)||C==="footer"?jsxs("div",{className:l("flex shrink-0 items-center gap-2 border-t border-border/70 p-3",k.unified&&"border-border",f&&"justify-center px-1",e.classNames?.footer),children:[!f&&z(e.footer)?jsx("div",{className:"min-w-0 flex-1",children:e.footer}):null,C==="footer"?H():null]}):null]}):null]}),e.kind!=="tree"?jsx(Vf,{props:e,appearance:k}):null]})}r(Gf,"NavigationSidebarInner");var Cr=forwardRef(Gf);var jf=forwardRef(r(function({title:t,items:o,sections:n=[],activeItemId:a,onItemSelect:s,itemAs:i,collapsed:m,defaultCollapsed:c=false,onCollapsedChange:d,width:g,onWidthChange:u,defaultWidth:p=220,minWidth:f=180,maxWidth:b=420,collapsedWidth:h=60,collapseThreshold:y=140,storageKey:v,resizable:k=true,collapsible:x=true,collapseLabel:w="Collapse sidebar",expandLabel:C="Expand sidebar",resizeLabel:S="Resize sidebar",desktopClassName:T="hidden md:flex",mobileClassName:E="flex md:hidden",className:N,classNames:O,style:V,...W},F){let{level:H,variables:I}=la(),G=ca(W),q=r(R=>({...R,icon:R.icon??(R.iconName?jsx(Bn,{icon:{kind:"lucide",name:R.iconName},alt:"",className:"h-4 w-4 rounded-none bg-transparent"}):void 0),endContent:R.endContent??(R.count!==void 0?jsx(un,{children:R.count}):void 0),onClick:r(D=>{R.disabled||(R.onClick?.(D),D.defaultPrevented||s?.({itemId:R.id}));},"onClick")}),"project");return jsx(or,{depth:H,children:jsx(Cr,{ref:F,kind:"catalog",title:t,items:o.map(q),sections:n.map(R=>({...R,items:R.items.map(q)})),activeItemId:a,itemAs:i,collapsed:m,defaultCollapsed:c,onCollapsedChange:d,width:g,onWidthChange:u,defaultWidth:p,minWidth:f,maxWidth:b,collapsedWidth:h,collapseThreshold:y,storageKey:v,resizable:k,collapsible:x,collapsePlacement:"header",collapseLabel:w,expandLabel:C,resizeLabel:S,desktopClassName:T,dataComponent:"workbench-resizable-sidebar",rootDomProps:{...W,...G,"data-workbench-resizable-sidebar":"","data-monkeys-bento-level":H},appearance:{density:"compact",surface:"panel",activeVariant:"soft"},mobile:{mode:"horizontal",className:E},className:l(nd,"[&>div]:gap-[var(--monkeys-bento-gap)] [--monkeys-sidebar-item-padding:var(--monkeys-bento-gap)] data-[collapsed=true]:[--monkeys-sidebar-item-padding:0px]",O?.root,N),classNames:{root:O?.root,header:l("min-h-0 gap-[var(--monkeys-bento-gap)] border-0 p-0",O?.header),title:l("text-xs font-medium uppercase text-muted-foreground",O?.title),collapseButton:l("h-8 w-8",O?.collapseButton),content:l("space-y-[var(--monkeys-bento-gap)] p-0",O?.list),list:"[&_ul]:gap-[var(--monkeys-bento-gap)]",section:l("mt-[var(--monkeys-bento-gap)]",O?.section),sectionLabel:l("mb-[var(--monkeys-bento-gap)] px-[var(--monkeys-bento-gap)]",O?.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",O?.item),itemIcon:l("[&_svg]:h-3.5 [&_svg]:w-3.5",O?.itemIcon),itemLabel:O?.itemLabel,resizeHandle:O?.resizeHandle,mobileNav:l("gap-[var(--monkeys-bento-gap,var(--global-spacing,0.75rem))] pb-0",O?.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",O?.mobileItem)},style:{...I,...V}})})},"WorkbenchResizableSidebar"));function Kf(e){return !!(e.header||e.footer||e.bodyAs||e.bodyClassName||e.bodyProps||e.classNames?.body)}r(Kf,"shouldRenderBodyWrapper");var Uf=forwardRef(r(function({as:t="section",bodyAs:o="div",header:n,footer:a,children:s,className:i,headerClassName:m,bodyClassName:c,footerClassName:d,bodyProps:g,classNames:u,style:p,...f},b){let h=Kf({header:n,footer:a,bodyAs:o==="div"?void 0:o,bodyClassName:c,bodyProps:g,classNames:u}),{className:y,...v}=g??{};return 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",u?.root,i),style:p,...f,children:[n?jsx("div",{className:l("shrink-0 border-b border-border/40 px-4 py-3 dark:border-border/30",u?.header,m),children:n}):null,h?jsx(o,{className:l("min-h-0 flex-1 overflow-hidden",u?.body,c,y),...v,children:s}):s,a?jsx("div",{className:l("shrink-0 border-t border-border/40 px-4 py-3 dark:border-border/30",u?.footer,d),children:a}):null]})},"WorkbenchContentPane"));var wc={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 Xf(e){return e.label??e.key}r(Xf,"getDefaultColumnLabel");function Zf(e){return e.filter(t=>qo(t)&&t.hidden!==true).map(t=>qo(t))}r(Zf,"getDefaultVisibleColumnKeys");function Qf({columns:e,visibleColumnKeys:t,allowEmptyVisibleColumns:o}){let n=new Set(e.map(qo).filter(Boolean)),a=Array.isArray(t)?t.filter(s=>n.has(String(s))):null;return a&&(a.length||o)?a:Zf(e)}r(Qf,"getResolvedVisibleColumnKeys");function ey(e){return [{value:"compact",label:e.compact},{value:"comfortable",label:e.comfortable},{value:"detailed",label:e.detailed}]}r(ey,"getDefaultDensityOptions");function ty(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(ty,"getDefaultGridColumnOptions");function oy(e){return [{value:1,label:e.bentoColumns(1)},{value:2,label:e.bentoColumns(2)},{value:3,label:e.bentoColumns(3)}]}r(oy,"getDefaultBentoColumnOptions");function ny(e){return [{value:"limit",label:e.topLimit},{value:"all",label:e.allFields}]}r(ny,"getDefaultDetailVisibilityOptions");function ry(e){return [{value:"fixed",label:e.adaptiveGrid},{value:"masonry",label:e.masonry}]}r(ry,"getDefaultLayoutOptions");function Sr(e){return String(e)}r(Sr,"normalizeOptionValue");function Tr(e,t,o){let n=String(t??o);return e.some(a=>String(a.value)===n)?n:String(o)}r(Tr,"getOptionValue");function kc(e){let t=Number.parseInt(e,10);return Number.isFinite(t)?t:1}r(kc,"parseNumberOption");var Rr={root:"flex w-full flex-wrap",item:"min-w-[58px] flex-1 px-2 text-[11px]",label:"text-[11px]"};function Cc({columns:e=[],galleryFieldOptions:t,value:o,onValueChange:n,labels:a,densityOptions:s,gridColumnOptions:i,bentoColumnOptions:m,detailVisibilityOptions:c,layoutOptions:d,getColumnLabel:g=Xf,getColumnDescription:u,showColumnVisibility:p=true,showGalleryControls:f=true,showLayoutControl:b=true,showGridColumns:h=true,showDetailColumns:y=true,allowEmptyVisibleColumns:v=false,className:k,classNames:x}){let w={...wc,...a},C=o||{},S=e.filter(M=>qo(M)),T=Qf({columns:S,visibleColumnKeys:C.visibleColumnKeys,allowEmptyVisibleColumns:v}),E=new Set(T),N=(t||S).filter(M=>qo(M)),O=s||ey(w),V=i||ty(w),W=m||oy(w),F=c||ny(w),H=d||ry(w),I=typeof n=="function",G=r(M=>{n?.({...C,...M},M);},"updateValue"),q=r(M=>{if(!I)return;let $=new Set(T);$.has(M)?$.delete(M):$.add(M);let J=S.map(qo).filter(_=>$.has(_));!J.length&&!v&&(J=[M]),G({visibleColumnKeys:J});},"toggleColumn"),R=p&&S.length>0,D=f;return jsxs("div",{className:l("space-y-3 text-foreground",x?.root,k),children:[R?jsxs("section",{className:l("space-y-2",x?.section),children:[jsx("div",{className:l("text-[10px] font-medium uppercase tracking-wide text-muted-foreground",x?.sectionHeader),children:w.visibleColumns}),jsx("div",{className:l("max-h-[220px] space-y-1 overflow-y-auto pr-1",x?.columnList),children:S.map(M=>{let $=qo(M);return jsx(dn,{checked:E.has($),disabled:!I,label:g(M),description:u?.(M),onChange:()=>q($),className:l("flex w-full rounded-lg px-2 py-1.5 hover:bg-muted/50",x?.columnItem)},`workbench-gallery-column-${$}`)})})]}):null,D?jsxs("section",{className:l("space-y-3 border-t border-border/60 pt-3",x?.section),children:[jsx(No,{label:w.coverField,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsx(uo,{value:String(C.galleryFieldKey||"auto"),options:[{value:"auto",label:w.autoDetect},...N.map(M=>({value:qo(M),label:g(M)}))],disabled:!I,onChange:M=>G({galleryFieldKey:M.currentTarget.value||"auto"}),className:x?.control})}),jsx(No,{label:w.cardDensity,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsx(pn,{value:Tr(O,C.galleryDensity,"comfortable"),options:O.map(M=>({value:Sr(M.value),label:M.label,disabled:M.disabled})),onValueChange:M=>G({galleryDensity:M}),className:l("w-full",x?.control),classNames:Rr})}),h?jsx(No,{label:w.cardColumns,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsx(pn,{value:Tr(V,C.galleryGridColumns,"auto"),options:V.map(M=>({value:Sr(M.value),label:M.label,disabled:M.disabled})),onValueChange:M=>G({galleryGridColumns:M==="auto"?"auto":kc(M)}),className:l("w-full",x?.control),classNames:Rr})}):null,y?jsx(No,{label:w.detailColumns,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsx(pn,{value:Tr(W,C.galleryBentoColumns,2),options:W.map(M=>({value:Sr(M.value),label:M.label,disabled:M.disabled})),onValueChange:M=>G({galleryBentoColumns:kc(M)}),className:l("w-full",x?.control),classNames:Rr})}):null,jsx(No,{label:w.fieldVisibility,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsx(pn,{value:Tr(F,C.galleryDetailVisibility,"limit"),options:F.map(M=>({value:Sr(M.value),label:M.label,disabled:M.disabled})),onValueChange:M=>G({galleryDetailVisibility:M}),className:l("w-full",x?.control),classNames:Rr})}),C.galleryDetailVisibility!=="all"?jsx(No,{label:w.fieldLimit,description:w.fieldLimitHint,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground",description:"text-[10px]"},children:jsx(Qt,{type:"number",min:1,step:1,value:String(C.galleryDetailLimit||4),disabled:!I,onChange:M=>G({galleryDetailLimit:M.currentTarget.value}),className:x?.control})}):null,b?jsx(No,{label:w.layout,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsx(pn,{value:Tr(H,C.galleryLayout,"fixed"),options:H.map(M=>({value:Sr(M.value),label:M.label,disabled:M.disabled})),onValueChange:M=>G({galleryLayout:M}),className:l("w-full",x?.control),classNames:Rr})}):null]}):null]})}r(Cc,"WorkbenchGallerySettingsPanel");function Ua({open:e,defaultOpen:t=false,onOpenChange:o,triggerIcon:n,triggerLabel:a,triggerTitle:s,align:i="end",popoverWidth:m=320,panelHeader:c,panelBefore:d,panelAfter:g,panelClassName:u,buttonClassName:p,popoverClassName:f,buttonClassNames:b,labels:h,className:y,classNames:v,...k}){let x={...wc,...h},w=useRef(null),[C,S]=useState(t),[T,E]=useState({}),N=e!==void 0,O=N?!!e:C,V=r(H=>{N||S(H),o?.(H);},"setOpen");useLayoutEffect(()=>{if(!O)return;let H=r(()=>{let q=w.current?.getBoundingClientRect();if(!q||typeof window>"u")return;let R=12,D=Math.max(window.innerWidth-R*2,0),M=Math.min(m,D||m),$=i==="start"?q.left:q.right-M,J=Math.min(Math.max($,R),Math.max(window.innerWidth-M-R,R)),_=Math.min(q.bottom+8,Math.max(window.innerHeight-80,R));E({left:J,top:_,width:M,maxHeight:`calc(100vh - ${Math.round(_+R)}px)`});},"updatePopoverPosition"),I=r(q=>{w.current?.contains(q.target)||V(false);},"handlePointerDown"),G=r(q=>{q.key==="Escape"&&V(false);},"handleKeyDown");return H(),window.addEventListener("resize",H),window.addEventListener("scroll",H,true),window.addEventListener("pointerdown",I),window.addEventListener("keydown",G),()=>{window.removeEventListener("resize",H),window.removeEventListener("scroll",H,true),window.removeEventListener("pointerdown",I),window.removeEventListener("keydown",G);}},[i,O,m]);let W=a??x.settingsButton,F=c??x.title;return jsxs("div",{ref:w,className:l("relative inline-flex",b?.root,y),children:[jsx(ve,{icon:n,label:W,title:s||(typeof W=="string"?W:void 0),iconOnly:!!n,active:O,tone:"muted","aria-haspopup":"dialog","aria-expanded":O,className:l(b?.trigger,p),onClick:()=>V(!O)}),O?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",i==="start"?"origin-top-left":"origin-top-right",b?.popover,f),style:T,children:[F?jsx("div",{className:l("mb-3 text-[11px] font-medium text-foreground",b?.header),children:F}):null,d,jsx(Cc,{...k,labels:x,className:l(b?.panel,u),classNames:v}),g]}):null]})}r(Ua,"WorkbenchGallerySettingsButton");function Nc(){return jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),jsx("path",{d:"M3 10h18M9 4v16"})]})}r(Nc,"TableViewIcon");function Ic(){return jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[jsx("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1.5"}),jsx("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1.5"}),jsx("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1.5"}),jsx("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1.5"})]})}r(Ic,"GalleryViewIcon");function Sc(){return jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[jsx("path",{d:"M20 7h-9M7 7H4M14 17H4M20 17h-3"}),jsx("circle",{cx:"9",cy:"7",r:"2"}),jsx("circle",{cx:"16",cy:"17",r:"2"})]})}r(Sc,"SettingsIcon");function dy({open:e}){return 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:jsx("path",{d:"m6 9 6 6 6-6"})})}r(dy,"ChevronDownIcon");var cy=[{value:"list",label:"Table view",icon:jsx(Nc,{})},{value:"gallery",label:"Gallery view",icon:jsx(Ic,{})}];function Tc(e){return e.icon!==void 0?e.icon:e.value==="list"||e.value==="table"?jsx(Nc,{}):e.value==="gallery"?jsx(Ic,{}):null}r(Tc,"getViewModeOptionIcon");function Rc(e){return e.triggerLabel??e.labels?.settingsButton??"Settings"}r(Rc,"getSettingsTriggerLabel");function uy({value:e,options:t,onValueChange:o,classNames:n}){let a=useRef(null),[s,i]=useState(false),m=t.find(d=>d.value===e)||t.find(d=>!d.disabled)||t[0],c=m?Tc(m):null;return useEffect(()=>{if(!s)return;let d=r(u=>{a.current?.contains(u.target)||i(false);},"handlePointerDown"),g=r(u=>{u.key==="Escape"&&i(false);},"handleKeyDown");return window.addEventListener("pointerdown",d),window.addEventListener("keydown",g),()=>{window.removeEventListener("pointerdown",d),window.removeEventListener("keydown",g);}},[s]),m?jsxs("div",{ref:a,className:l("relative inline-flex",n?.viewModeRoot),children:[jsxs("button",{type:"button","aria-haspopup":"listbox","aria-expanded":s,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:()=>i(d=>!d),children:[c?jsx("span",{className:"inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center text-muted-foreground",children:c}):null,jsx("span",{className:"min-w-0 truncate",children:m.label}),jsx(dy,{open:s})]}),s?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===m.value,u=Tc(d);return 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),i(false));},children:[u?jsx("span",{className:"inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:u}):null,jsx("span",{className:"min-w-0 truncate",children:d.label})]},d.value)})}):null]}):null}r(uy,"WorkbenchContentToolbarViewModeControl");var zs=forwardRef(r(function({as:t="div",children:o,end:n,viewMode:a,viewModeOptions:s,onViewModeChange:i,gallerySettings:m,gallerySettingsPlacement:c="start",className:d,startClassName:g,endClassName:u,classNames:p,...f},b){let h=s||(a?cy:[]),y=m&&typeof m=="object"?m:null,v=!!h.length,k=!!y,x=k&&c!=="end",w=k&&c==="end",C=v||x||!!o,S=!!n||w;return 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?jsxs("div",{className:l("flex flex-wrap items-center gap-2",p?.start,g),children:[v?jsx(uy,{value:a,options:h,onValueChange:i,classNames:p}):null,x&&y?jsx(Ua,{align:"end",triggerIcon:jsx(Sc,{}),triggerLabel:Rc(y),...y,buttonClassName:l("!h-7 !w-7 !min-h-0 !rounded-md !p-0 text-xs",p?.settings,y.buttonClassName)}):null,o]}):null,S?jsxs("div",{className:l("flex shrink-0 items-center gap-2",p?.end,u),children:[n,w&&y?jsx(Ua,{align:"end",triggerIcon:jsx(Sc,{}),triggerLabel:Rc(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 gy(e){return !!(e.header||e.footer||e.bodyAs||e.bodyClassName||e.bodyProps||e.classNames?.body)}r(gy,"shouldRenderBodyWrapper");function Ec(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(Ec);let t=Children.toArray(e);return t.length?t.some(o=>typeof o=="string"?o.trim().length>0:true):false}r(Ec,"hasRenderableChildren");function by(e,t){return t===void 0?{}:e===void 0?{width:t}:{width:e?t:0,opacity:e?1:0}}r(by,"resolveWidthStyle");function Mc(e){return e.label??e.key}r(Mc,"getFallbackFieldLabel");function fy(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(fy,"getObjectDisplayValue");function Bc(e){return e==null||e===""}r(Bc,"isEmptyDetailValue");function Pc(e){return ["string","number","boolean"].includes(typeof e)}r(Pc,"isPlainDisplayValue");function Dc(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"||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(Dc,"getMediaDisplayData");function yy(e,t){let o=String(e?.renderType||"").toLowerCase();return ["image","media","preview","thumbnail"].includes(o)||!!Dc(t)}r(yy,"shouldRenderAsMedia");function hy(e,t){return e?typeof e=="string"||typeof e=="number"?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:isValidElement(e)?e:jsx(e,{className:l("h-3.5 w-3.5 shrink-0 text-primary",t)}):jsxs("span",{className:l("relative inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center",t),children:[jsx("span",{className:"absolute inset-0 rounded-full border border-primary/25 bg-primary/10"}),jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-primary"})]})}r(hy,"renderMaybeFieldIcon");function xy(e,t,o){return jsxs("span",{className:l("inline-flex min-w-0 items-center gap-1.5 text-[11px] font-semibold text-foreground",o?.fieldLabel),children:[hy(t.labelIcon||t.icon,o?.fieldLabelIcon),jsx("span",{className:"min-w-0 truncate",children:e})]})}r(xy,"renderDetailFieldLabel");function vy({media:e,classNames:t}){return jsxs("div",{className:l("grid gap-2",t?.mediaValue),children:[jsx("div",{className:"overflow-hidden rounded-md border border-border/55 bg-muted/20 dark:border-border/45 dark:bg-muted/10",children:jsx("img",{src:e.src,alt:String(e.alt||""),className:l("block aspect-[16/9] w-full object-cover",t?.mediaImage)})}),e.caption?jsx("div",{className:l("truncate text-[11px] leading-4 text-muted-foreground",t?.mediaCaption),children:e.caption}):null]})}r(vy,"WorkbenchDetailSidebarMediaValue");function Os(e,t,o,n){if(Bc(e))return t;if(isValidElement(e))return e;if(yy(o,e)){let a=Dc(e);if(a)return jsx(vy,{media:a,classNames:n})}if(Array.isArray(e)){let a=e.map(s=>Os(s,"",void 0,n)).filter(s=>!Bc(s));return a.length?a.every(Pc)?a.map(String).join(" \xB7 "):jsx("span",{className:"inline-flex flex-wrap items-center gap-1",children:a.map((s,i)=>jsxs("span",{className:"inline-flex items-center gap-1",children:[i>0?jsx("span",{className:"text-muted-foreground",children:"\xB7"}):null,Pc(s)?String(s):s]},i))}):t}if(typeof e=="object"){let a=fy(e);return a===void 0?t:Os(a,t,o,n)}return String(e)}r(Os,"getDefaultDetailDisplayValue");function ky(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(ky,"getDefaultFieldValue");function wy(e,t){return typeof e.hidden=="function"?e.hidden(e,t):!!e.hidden}r(wy,"shouldHideField");function Cy(e,t){return typeof e.hidden=="function"?e.hidden(e,t):!!e.hidden}r(Cy,"shouldHideSection");function Sy({record:e,fields:t,sections:o,fieldColumns:n=1,emptyValue:a="\u2014",emptyState:s,getFieldValue:i,renderFieldValue:m,formatFieldValue:c,formatFieldLabel:d,classNames:g}){let p=(o?.length?o:t?.length?[{fields:t,columns:n}]:[]).filter(f=>!Cy(f,e));return p.length?jsx("div",{className:l("space-y-3",g?.autoBody),children:p.map((f,b)=>{let h=(f.fields||[]).filter(k=>!wy(k,e)),y=f.id||`section-${b}`;if(!h.length&&!f.emptyState)return null;let v=h.map((k,x)=>{let w={field:k,fieldIndex:x,section:f,sectionIndex:b,record:e},C=i?i(k,e,w):ky(k,e),S=m?m(k,e,w):c?c(C,w):Os(C,k.emptyValue??a,k,g),T=d?d(Mc(k),w):Mc(k);return {term:xy(T,k,g),value:S}});return jsxs("section",{className:l("min-w-0 space-y-3",g?.section),children:[f.title||f.description?jsxs("div",{className:l("min-w-0 space-y-1.5",g?.sectionHeader),children:[f.title?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?jsx("div",{className:l("text-[11px] leading-5 text-muted-foreground",g?.sectionDescription),children:f.description}):null]}):null,v.length?jsx(ds,{items:v,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)}}):jsx("div",{className:l("py-3 text-center text-xs text-muted-foreground",g?.emptyState),children:f.emptyState})]},y)})}):s?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:s}):null}r(Sy,"WorkbenchDetailSidebarAutoContent");var Ty=forwardRef(r(function({as:t="aside",bodyAs:o="div",open:n,width:a,header:s,footer:i,resizeHandle:m,children:c,record:d,fields:g,sections:u,fieldColumns:p,emptyValue:f,emptyState:b,getFieldValue:h,renderFieldValue:y,formatFieldValue:v,formatFieldLabel:k,className:x,headerClassName:w,bodyClassName:C,footerClassName:S,resizeHandleClassName:T,bodyProps:E,classNames:N,style:O,...V},W){let F=Ec(c)?c:jsx(Sy,{record:d,fields:g,sections:u,fieldColumns:p,emptyValue:f,emptyState:b,getFieldValue:h,renderFieldValue:y,formatFieldValue:v,formatFieldLabel:k,classNames:N}),H=gy({header:s,footer:i,bodyAs:o==="div"?void 0:o,bodyClassName:C,bodyProps:E,classNames:N}),{className:I,...G}=E??{};return jsxs(t,{ref:W,"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",N?.root,x),style:{...by(n,a),...O},...V,children:[m?jsx("div",{className:l(N?.resizeHandle,T),children:m}):null,s?jsx("div",{className:l("shrink-0 border-b border-border/40 px-4 py-3 dark:border-border/30",N?.header,w),children:s}):null,H?jsx(o,{className:l("min-h-0 flex-1 overflow-y-auto",N?.body,C,I),...G,children:F}):F,i?jsx("div",{className:l("shrink-0 border-t border-border/40 px-4 py-3 dark:border-border/30",N?.footer,S),children:i}):null]})},"WorkbenchDetailSidebar"));function Lc(e){return typeof e=="function"?true:typeof e=="object"&&e!==null&&!isValidElement(e)&&"$$typeof"in e}r(Lc,"isWorkbenchIconComponent");function Ir(e,t){return e?isValidElement(e)?e:Lc(e)?jsx(e,{className:t}):e:null}r(Ir,"renderWorkbenchIcon");function Ac(e){return !e||!Lc(e)?null:e}r(Ac,"getWorkbenchIconComponent");function Iy(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r(Iy,"toCssSize");var My=160,By=56,Py=128;function zc(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(zc,"numericCssSize");function Hc(e,t){return e.renderType==="icon"?By:t?Py:My}r(Hc,"defaultWorkbenchColumnWidth");function Oc(e,t,o){return t??zc(e.width)??zc(e.minWidth)??Hc(e,o)}r(Oc,"resolvedWorkbenchColumnWidth");function Ey(e){return e==null||e===false?null:e}r(Ey,"defaultFormatLabel");function Fc(e){if(typeof e=="string"||typeof e=="number")return String(e)}r(Fc,"toTitle");function Dy(e,t){return e?.id??e?.key??e?.linkKey??t}r(Dy,"defaultGetRowKey");function Wy(e){return e?.linkKey??e?.id??e?.key}r(Wy,"defaultGetRowSelectionKey");function Ly(e,t){if(!t?.length)return e;let o=new Map(e.map(i=>[i.key,i])),n=t.map(i=>o.get(i)).filter(Boolean),a=new Set(n.map(i=>i.key)),s=e.filter(i=>!a.has(i.key));return [...n,...s]}r(Ly,"getOrderedColumns");function Gs(e,t){let o=new Set(e),n=(t||[]).filter(i=>o.has(i)),a=new Set(n),s=e.filter(i=>!a.has(i));return [...n,...s]}r(Gs,"normalizeColumnOrder");function Ay({helperText:e,className:t}){return z(e)?jsxs("span",{className:l("group relative inline-flex items-center",t),children:[jsx("button",{type:"button",title:Fc(e),"aria-label":Fc(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:"?"}),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(Ay,"WorkbenchTableHeaderHelper");function zy({rows:e=[],columns:t=[],onRowClick:o,selectedRowKey:n,selectedLinkKey:a,activePrimaryColumn:s,activeTablePrimaryColumn:i,renderedRowCount:m,totalRowCount:c,tableMinWidth:d,minWidth:g,bodyMaxHeight:u="min(58vh, 38rem)",stickyFirstColumn:p=true,appearance:f,headerPresentation:b,fillRemainingWidthColumnKey:h,columnOrder:y,columnSizes:v,columnDragEnabled:k,columnResizeEnabled:x,className:w,tableClassName:C,rowClassName:S,classNames:T,style:E,renderCell:N,renderFieldValue:O,renderColumnHeader:V,onColumnOrderChange:W,onColumnSizeChange:F,onSort:H,formatLabel:I=Ey,getColumnDataType:G,getColumnIcon:q,getColumnTypeIcon:R,getRowKey:D=Dy,getRowSelectionKey:M=Wy,isActionColumn:$,isActionField:J,isRowDisabled:_,isWorkbenchPlaceholderRow:ee,emptyState:K="-",hiddenRowsMessage:Z,scrollFooter:re,scrollRestoration:ae}){let le=t.map(oe=>oe.key).join(""),L=useMemo(()=>le?le.split(""):[],[le]),[me,B]=useState(L),[j,ne]=useState({}),fe=useRef(null),ye=useRef(new Map),xe=useRef(ae);xe.current=ae;let te=useRef(void 0),se=useCallback(()=>{let oe=fe.current,Se=xe.current;if(!oe||!Se||te.current!==Se.key)return;let Ve=oe.getBoundingClientRect().top,Ye=Array.from(ye.current.entries()).find(([,ot])=>ot.getBoundingClientRect().bottom>Ve);Se.write({x:oe.scrollLeft,y:oe.scrollTop,...Ye?{rowKey:Ye[0],rowOffset:Ye[1].getBoundingClientRect().top-Ve}:{}});},[]);useEffect(()=>{let oe=fe.current,Se=xe.current;if(!oe||!Se||te.current===Se.key||e.length===0)return;let Ve=Se.read(),Ye=r(()=>{let Bt=Ve?.rowKey?ye.current.get(Ve.rowKey):void 0,Ue=Bt&&typeof Ve?.rowOffset=="number"?oe.scrollTop+Bt.getBoundingClientRect().top-oe.getBoundingClientRect().top-Ve.rowOffset:Ve?.y??0;oe.scrollTo({left:Ve?.x??0,top:Math.max(0,Ue),behavior:"auto"}),te.current=Se.key;},"restore"),ot=oe.ownerDocument.defaultView;if(!ot){Ye();return}let gt=ot.requestAnimationFrame(Ye);return ()=>ot.cancelAnimationFrame(gt)},[e,ae?.key]),useEffect(()=>{let oe=fe.current?.ownerDocument.defaultView;return oe?.addEventListener("pagehide",se),()=>{oe?.removeEventListener("pagehide",se),se();}},[se]);let[Re,Ie]=useState();useEffect(()=>{B(oe=>Gs(L,oe));},[L]);let ze=y?Gs(L,y):me,ce=v??j,U=useCallback((oe,Se)=>{let Ve=Gs(L,oe);y||B(Ve),W?.(Ve,Se);},[y,L,W]),A=useCallback((oe,Se,Ve)=>{v||ne(Ye=>({...Ye,[oe]:Se})),F?.(oe,Se,Ve);},[v,F]),X=n??a,ie=s??i,Y=Ly(t,ze),de=h?Y.reduce((oe,Se)=>Se.key===h?oe:oe+Oc(Se,ce[Se.key],$?.(Se)??J?.(Se)??false),0):void 0,we=h&&de!==void 0&&Re!==void 0?Math.max(0,Math.round(Re-de)):void 0,Ce=Y.flatMap(oe=>oe.key!==h?[oe]:we===0?[]:we===void 0?[oe]:[{...oe,width:we,minWidth:we,maxWidth:we}]),Me=Math.max(0,Number(c||e.length)-Number(m||e.length)),Be=N??O??((oe,Se)=>Se?.[oe.key]),_e=$??J??(()=>false),Ze=_??ee??(()=>false),Fe=q??R,tt=de!==void 0&&we!==void 0?de+we:void 0,We=tt??d??g??Math.max(760,Ce.reduce((oe,Se)=>oe+Oc(Se,ce[Se.key],_e(Se)),0));useEffect(()=>{if(!h){Ie(void 0);return}let oe=fe.current;if(!oe)return;let Se=oe.ownerDocument.defaultView,Ve=r(()=>{let gt=Math.round(oe.getBoundingClientRect().width);!Number.isFinite(gt)||gt<=0||Ie(Bt=>Bt===gt?Bt:gt);},"updateWidth");Ve();let Ye=Se?.ResizeObserver,ot=Ye?new Ye(Ve):void 0;return ot?.observe(oe),Se?.addEventListener("resize",Ve),()=>{ot?.disconnect(),Se?.removeEventListener("resize",Ve);}},[h]);let Le=Me>0&&Z?typeof Z=="function"?Z(Me,m||e.length,c||e.length):Z:null;return jsxs(Pa,{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",T?.root,w),style:u==="100%"?{display:"flex",minHeight:0,flex:1,flexDirection:"column",...E}:E,children:[jsxs("div",{ref:fe,onScroll:se,className:l("w-full overflow-auto",T?.scrollArea),style:{maxHeight:Iy(u),...u==="100%"?{minHeight:0,flex:1}:{}},children:[jsxs(Ea,{appearance:f,columnOrder:ze,columnSizes:ce,columnDragEnabled:k,columnResizeEnabled:x,onColumnOrderChange:U,onColumnSizeChange:A,className:l("w-full table-auto text-left text-xs",T?.table,C),style:{width:tt,minWidth:We},children:[jsx(Da,{appearance:f,className:l("z-20 text-xs font-sans text-muted-foreground",T?.header),children:jsx(gn,{className:l("hover:bg-transparent",T?.headerRow),children:Ce.map((oe,Se)=>{let Ve=Hc(oe,_e(oe)),Ye=oe.renderType||oe.type||G?.(oe.key,e,oe),ot=Ir(Fe?.(Ye,oe),"h-3.5 w-3.5 shrink-0 text-primary"),Bt=Ce[Se-1]?.renderType==="icon"&&oe.key===ie?.key,Ue=V?V(oe,{column:oe,columnIndex:Se,columns:Ce,rows:e,columnType:Ye}):I(oe.label,{column:oe}),$t=!V&&(z(oe.trailing)||z(oe.helperText))?jsxs("span",{className:"inline-flex items-center gap-1.5",children:[z(oe.trailing)?I(oe.trailing,{column:oe}):null,jsx(Ay,{helperText:I(oe.helperText,{column:oe}),className:T?.helper})]}):void 0,zt=!!oe.sortable,pe=zt&&H?()=>H(oe.key,oe):void 0;return jsx(La,{appearance:f,presentation:b,columnId:oe.key,align:oe.align,icon:V?void 0:ot,label:Ue,description:V?void 0:I(oe.description,{column:oe}),meta:V?void 0:I(oe.meta,{column:oe}),actions:oe.actions,trailing:$t,sortable:zt,sortDirection:oe.sortDirection,sortLabel:oe.sortLabel,onSort:pe,draggable:oe.draggable,dragLabel:oe.dragLabel,resizable:oe.resizable,resizeLabel:oe.resizeLabel,width:oe.width??Ve,minWidth:typeof oe.minWidth=="number"?oe.minWidth:void 0,maxWidth:typeof oe.maxWidth=="number"?oe.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)]",oe.compactHeaderClassName,oe.renderType==="icon"&&"pl-3 pr-1",Bt&&"pl-2",T?.headerCell,oe.headerClassName),style:{minWidth:typeof oe.minWidth=="string"?oe.minWidth:void 0,maxWidth:typeof oe.maxWidth=="string"?oe.maxWidth:void 0,...oe.headerStyle}},oe.key)})})}),jsx(Wa,{appearance:f,className:l("divide-y divide-border/35 dark:divide-border/30",T?.body),children:e.length?e.map((oe,Se)=>{let Ve=D(oe,Se),Ye=Ze(oe,Se),ot=M(oe,Se),gt=!!(X&&String(ot)===String(X)),Bt=typeof S=="function"?S(oe,Se):S;return jsx(gn,{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?.(oe,Se));},onKeyDown:Ue=>{Ue.target!==Ue.currentTarget||Ye||!o||!["Enter"," "].includes(Ue.key)||(Ue.preventDefault(),o(oe,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",T?.row,Bt),children:Ce.map((Ue,$t)=>{let zt=_e(Ue)||Ue.wrap===true,Ge=Ce[$t-1]?.renderType==="icon"&&Ue.key===ie?.key;return jsx(fr,{appearance:f,align:Ue.align,className:l(zt?"align-top whitespace-normal":"whitespace-nowrap","px-4 py-3 text-muted-foreground",!zt&&"overflow-hidden text-ellipsis",p&&$t===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",T?.cell,Ue.cellClassName),style:Ue.cellStyle,children:Be(Ue,oe,{row:oe,rowIndex:Se,column:Ue,columnIndex:$t,compact:true,surface:"list"})},`${Ve}-${Ue.key}`)})},Ve)}):jsx(Aa,{appearance:f,colSpan:Math.max(Ce.length,1),classNames:{cell:"px-4 py-10 text-center text-sm text-muted-foreground"},children:K})})]}),z(re)?jsx("div",{style:{minWidth:We},children:re}):null]}),Le?jsx("div",{className:l("border-t border-border/40 px-4 py-2 text-xs text-muted-foreground dark:border-border/30",T?.footer),children:Le}):null]})}r(zy,"WorkbenchTableView");function _s(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r(_s,"toCssSize");function Wn(){return typeof window<"u"}r(Wn,"isBrowser");function Gc(e,t){return e?.id??e?.key??t}r(Gc,"defaultGetRowKey");function Xa(e){return typeof e.width=="number"?e.width:typeof e.minWidth=="number"?e.minWidth:160}r(Xa,"getColumnDefaultSize");function Oy(e,t){return e.reduce((o,n)=>(o[n.key]=t?.[n.key]??Xa(n),o),{})}r(Oy,"buildDefaultColumnSizes");function _c(e,t){if(!e||!Wn())return t;try{let o=JSON.parse(window.localStorage.getItem(e)||"{}");return Object.keys(t).reduce((n,a)=>{let s=Number(o?.[a]);return n[a]=Number.isFinite(s)?s:t[a],n},{})}catch{return t}}r(_c,"loadStoredColumnSizes");function jc(e,t){!e||!Wn()||window.localStorage.setItem(e,JSON.stringify(t));}r(jc,"persistColumnSizes");function Jc(e){return e?`${e}.frozenColumnCount`:void 0}r(Jc,"getFrozenColumnStorageKey");function Xc(e){return e?`${e}.frozenEndColumnCount`:void 0}r(Xc,"getFrozenEndColumnStorageKey");function Yo(e,t){return Number.isFinite(e)?Math.max(0,Math.min(Math.round(e),t)):0}r(Yo,"clampFrozenColumnCount");function Fy(e,t,o){let n=Yo(e,o),a=Yo(t,Math.max(0,o-n));return {startCount:n,endCount:a}}r(Fy,"normalizeFrozenColumnCounts");function $c(e,t,o){let n=Yo(t,o),a=Jc(e);if(!a||!Wn())return n;try{let s=window.localStorage.getItem(a);if(s===null)return n;let i=Number(s);return Number.isFinite(i)?Yo(i,o):n}catch{return n}}r($c,"loadStoredFrozenColumnCount");function Hy(e,t){let o=Jc(e);!o||!Wn()||window.localStorage.setItem(o,String(t));}r(Hy,"persistFrozenColumnCount");function Kc(e,t,o){let n=Yo(t,o),a=Xc(e);if(!a||!Wn())return n;try{let s=window.localStorage.getItem(a);if(s===null)return n;let i=Number(s);return Number.isFinite(i)?Yo(i,o):n}catch{return n}}r(Kc,"loadStoredFrozenEndColumnCount");function Vy(e,t){let o=Xc(e);!o||!Wn()||window.localStorage.setItem(o,String(t));}r(Vy,"persistFrozenEndColumnCount");function Ja(e,t){let o=new Set(e),n=(t||[]).filter(i=>o.has(i)),a=new Set(n),s=e.filter(i=>!a.has(i));return [...n,...s]}r(Ja,"normalizeColumnOrder");function Gy(e,t){let o=Ja(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(Gy,"getOrderedColumns");function Er(e,t){let o=t[e.key];return typeof o=="number"?o:Xa(e)}r(Er,"getColumnNumericWidth");function _y(e,t,o){let n=new Map,a=0;return e.slice(0,Math.max(0,o)).forEach(s=>{n.set(s.key,a),a+=Er(s,t);}),n}r(_y,"buildFrozenOffsets");function jy(e,t,o){let n=new Map,a=0;return e.slice(Math.max(0,e.length-o)).reverse().forEach(s=>{n.set(s.key,a),a+=Er(s,t);}),n}r(jy,"buildFrozenEndOffsets");function Uc(e,t,o){return typeof e=="function"?e(t,o):e}r(Uc,"resolveRowClassName");function qc(e,t){let o=t?.[e.key];return o==null||o===""?"\u2014":String(o)}r(qc,"renderDefaultCell");function Yc({children:e,wrap:t}){return 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(Yc,"InteractiveTableCellContent");function $y({className:e}){return jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:e,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.75",children:[jsx("path",{d:"M5.25 2.75h5.5"}),jsx("path",{d:"M6.25 2.75v4L4.5 9.25h7L9.75 6.75v-4"}),jsx("path",{d:"M8 9.25v4"})]})}r($y,"PinIcon");function Ky({rows:e=[],columns:t=[],pinnedTopRows:o=[],getRowKey:n=Gc,getPinnedTopRowKey:a=Gc,renderCell:s,renderPinnedTopCell:i,renderColumnHeader:m,onRowClick:c,getRowState:d,rowClassName:g,pinnedTopRowClassName:u,emptyState:p="\u2014",columnMenuLabels:f,columnStorageKey:b,columnOrder:h,columnSizes:y,defaultColumnSizes:v,columnDragEnabled:k=false,columnResizeEnabled:x=true,frozenColumnCount:w=0,frozenEndColumnCount:C=0,tableMinWidth:S,bodyMaxHeight:T="min(60vh, 42rem)",appearance:E,className:N,tableClassName:O,classNames:V,style:W,onColumnOrderChange:F,onColumnSizeChange:H,onResetColumnSizes:I,onFrozenColumnCountChange:G,onFrozenEndColumnCountChange:q,onSort:R}){let D=vt().workbench.interactiveTable,M=t.map(Y=>Y.key).join(""),$=useMemo(()=>M?M.split(""):[],[M]),J=useMemo(()=>Oy(t,v),[t,v]),[_,ee]=useState($),[K,Z]=useState(()=>_c(b,J)),[re,ae]=useState(()=>$c(b,w,t.length)),[le,L]=useState(()=>Kc(b,C,t.length));useEffect(()=>{ee(Y=>Ja($,Y));},[$]),useEffect(()=>{y||Z(_c(b,J));},[y,b,J]),useEffect(()=>{ae($c(b,w,t.length));},[b,t.length,w]),useEffect(()=>{L(Kc(b,C,t.length));},[b,t.length,C]);let me=h?Ja($,h):_,B=y??K,j=Gy(t,me),{startCount:ne,endCount:fe}=Fy(re,le,j.length),ye=_y(j,B,ne),xe=jy(j,B,fe),te=S??Math.max(760,j.reduce((Y,de)=>Y+Er(de,B),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=useCallback((Y,de)=>{let we=Ja($,Y);h||ee(we),F?.(we,de);},[h,$,F]),Ie=useCallback((Y,de,we)=>{let Ce=t.find(Fe=>Fe.key===Y),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={...B,[Y]:_e};y||Z(Ze),jc(b,Ze),H?.(Y,_e,we);},[y,b,t,H,B]),ze=useCallback(Y=>{let de=J[Y.key]??Xa(Y),we=Er(Y,B),Ce={...B,[Y.key]:de};y||Z(Ce),jc(b,Ce),H?.(Y.key,de,{columnId:Y.key,previousWidth:we,minWidth:Y.minWidth,maxWidth:Y.maxWidth}),I?.(Ce);},[y,b,J,H,I,B]),ce=useCallback(Y=>{let de=Yo(Y,Math.max(0,j.length-fe));ae(de),Hy(b,de),G?.(de);},[b,G,j.length,fe]),U=useCallback(Y=>{let de=Yo(Y,Math.max(0,j.length-ne));L(de),Vy(b,de),q?.(de);},[b,q,j.length,ne]),A=r(Y=>{if(Y<ne)return "start";if(Y>=j.length-fe)return "end"},"getFrozenPosition"),X=r((Y,de,we=false)=>{let Ce=A(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===j.length-1)&&(we?"z-50":"z-30"))},"getFrozenClassName"),ie=r((Y,de)=>{let we=A(de);if(we==="start")return {left:ye.get(Y.key)??0};if(we==="end")return {right:xe.get(Y.key)??0}},"getFrozenStyle");return jsx(Pa,{appearance:E,className:l("flex h-full min-h-0 flex-col overflow-hidden rounded-lg border border-border/60 bg-card",V?.root,N),style:W,children:jsx("div",{className:l("min-h-0 flex-1 overflow-auto",V?.scrollArea),style:{maxHeight:_s(T)},children:jsxs(Ea,{appearance:E,columnOrder:me,columnSizes:B,columnDragEnabled:k,columnResizeEnabled:x,onColumnOrderChange:Re,onColumnSizeChange:Ie,className:l("w-full table-fixed text-left text-xs",V?.table,O),style:{minWidth:te},children:[jsx("colgroup",{children:j.map(Y=>jsx("col",{style:{width:_s(B[Y.key]??Y.width),minWidth:_s(Y.minWidth)}},Y.key))}),jsx(Da,{appearance:E,className:l("border-b border-border/60 bg-muted/60 text-[11px] font-medium text-muted-foreground",V?.tableHeader),children:jsx(gn,{appearance:E,className:l("hover:bg-transparent",V?.headerRow),children:j.map((Y,de)=>{let we=m?m(Y,{column:Y,columnIndex:de,columns:j,rows:e}):Y.label,Ce=!!Y.sortable,Me=Ce&&R?()=>R(Y.key,Y):void 0,Be=de<ne,_e=de>=j.length-fe,Ze=Be||_e,Fe=Er(Y,B)===(J[Y.key]??Xa(Y));return jsxs(Vd,{modal:false,children:[jsx(is,{asChild:true,appearance:E,children:jsx(La,{appearance:E,columnId:Y.key,align:Y.align,label:we,description:Y.description,trailing:Ze?jsx("span",{title:se.frozenColumnTitle,className:"inline-flex h-5 w-5 items-center justify-center rounded text-primary",children:jsx($y,{className:"h-3.5 w-3.5"})}):null,sortable:Ce,sortDirection:Y.sortDirection,sortLabel:Y.sortLabel,onSort:Me,draggable:Y.draggable,resizable:Y.resizable,width:Y.width,minWidth:Y.minWidth,maxWidth:Y.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(Y,de,true),Y.headerClassName,Y.className,V?.headerCell),style:ie(Y,de)})}),jsxs(ss,{appearance:E,alignOffset:-4,className:"min-w-44",children:[jsx(Gd,{appearance:E,children:se.columnActions}),Ze?jsx(Rn,{appearance:E,onSelect:()=>{_e?U(j.length-de-1):ce(de);},children:_e?se.unfreezeEndColumn:se.unfreezeColumn}):jsx(Rn,{appearance:E,onSelect:()=>ce(de+1),children:se.freezeColumn}),Ze?null:jsx(Rn,{appearance:E,onSelect:()=>U(j.length-de),children:se.freezeEndColumn}),jsx(Rn,{appearance:E,disabled:ne===0&&fe===0,onSelect:()=>{ce(0),U(0);},children:se.unfreezeAllColumns}),jsx(_d,{appearance:E}),jsx(Rn,{appearance:E,disabled:Fe,onSelect:()=>ze(Y),children:se.resetColumnWidth})]})]},Y.key)})})}),jsxs(Wa,{appearance:E,className:l("divide-y divide-border/50",V?.body),children:[o.map((Y,de)=>{let we=a(Y,de),Ce=Uc(u,Y,de);return jsx(gn,{appearance:E,className:l("bg-card/95",V?.pinnedTopRow,Ce),children:j.map((Me,Be)=>jsx(fr,{appearance:E,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,V?.cell),style:ie(Me,Be),children:jsx(Yc,{wrap:Me.wrap,children:i?i(Me,Y,{row:Y,rowIndex:de,column:Me,columnIndex:Be,isPinnedTopRow:true}):qc(Me,Y)})},`pinned-${we}-${Me.key}`))},`pinned-${we}`)}),e.length?e.map((Y,de)=>{let we=n(Y,de),Ce=d?.(Y,de)||{},Me=Uc(g,Y,de);return jsx(gn,{appearance:E,interactive:!!c&&!Ce.disabled,selected:Ce.selected,disabled:Ce.disabled,onClick:()=>{Ce.disabled||c?.(Y,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",V?.row,Me),children:j.map((Be,_e)=>jsx(fr,{appearance:E,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,V?.cell),style:ie(Be,_e),children:jsx(Yc,{wrap:Be.wrap,children:s?s(Be,Y,{row:Y,rowIndex:de,column:Be,columnIndex:_e,isPinnedTopRow:false}):qc(Be,Y)})},`${we}-${Be.key}`))},we)}):o.length?null:jsx(Aa,{appearance:E,colSpan:Math.max(j.length,1),className:V?.empty,children:p})]})]})})})}r(Ky,"InteractiveTable");function Uy({value:e,placeholder:t,disabled:o,multiline:n=false,commitOnBlur:a=true,className:s,inputClassName:i,onCommit:m}){let c=String(e||""),[d,g]=useState(c);useEffect(()=>{g(c);},[c]);let u=useCallback(async()=>{let f=String(d||"").trim(),b=String(c||"").trim();if(f!==b)try{await m?.(f);}catch{g(c);}},[d,c,m]),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",i);return n?jsx("textarea",{className:l(p,s),disabled:o,value:d,placeholder:t,onChange:f=>g(f.target.value),onBlur:()=>{a&&u();},onKeyDown:f=>{(f.metaKey||f.ctrlKey)&&f.key==="Enter"&&f.currentTarget.blur(),f.key==="Escape"&&(g(c),f.currentTarget.blur());}}):jsx("input",{className:l(p,s),disabled:o,value:d,placeholder:t,onChange:f=>g(f.target.value),onBlur:()=>{a&&u();},onKeyDown:f=>{f.key==="Enter"&&f.currentTarget.blur(),f.key==="Escape"&&(g(c),f.currentTarget.blur());}})}r(Uy,"InteractiveTableEditableTextCell");function qy({children:e,mono:t=false,className:o}){return jsx("div",{className:l("min-w-0 text-xs text-muted-foreground",t&&"font-mono",o),children:z(e)?e:"\u2014"})}r(qy,"InteractiveTableReadonlyCell");function Yy({value:e,options:t,disabled:o,ariaLabel:n,children:a,className:s,onChange:i}){return jsxs("div",{className:l("relative flex w-full items-center",s),children:[a,jsx("select",{"aria-label":n,disabled:o,value:e,onChange:m=>i?.(m.target.value),className:"absolute inset-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed",children:t.map(m=>jsx("option",{value:m.value,children:m.label},m.value))})]})}r(Yy,"InteractiveTableSelectCell");function Zc({children:e,title:t,presentation:o,renderSlot:n}){let a=o.title,s=a?.placement??"none",i=a?.background==="panel"?"div":"span",m=(o.slots??[]).map(g=>({slot:g,content:n?.(g)})).filter(g=>g.content!=null),c=s==="none"?null:jsx("div",{className:"monkeys-gallery-cover-title",title:typeof t=="string"||typeof t=="number"?String(t):void 0,"data-placement":s,"data-background":a?.background??(s.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:jsx(i,{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:a?.background==="panel"?void 0:a?.maxLines??2,overflow:"hidden"},children:t})}),d=r(g=>jsx("div",{className:"monkeys-gallery-slot-row","data-row":g,children:m.filter(({slot:u})=>u.position.startsWith(g)).map(({slot:u,content:p})=>jsx("div",{"data-card-slot":u.position,"data-visibility":u.visibility??"always",className:u.visibility==="hover"?"monkeys-gallery-hover-actions":void 0,style:{gridColumn:u.position.endsWith("left")?1:u.position.endsWith("center")?2:3,justifySelf:u.position.endsWith("left")?"start":u.position.endsWith("center")?"center":"end",padding:u.inset??12,gap:u.gap??8,flexDirection:u.direction==="vertical"?"column":"row"},children:p},u.position))}),"band");return 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:[s==="above"&&c,jsxs("div",{className:"monkeys-gallery-media-card",children:[jsx("div",{className:"monkeys-gallery-card-media",children:e}),jsxs("div",{className:"monkeys-gallery-card-overlay",children:[jsxs("div",{children:[s==="overlay-top"&&c,d("top")]}),d("middle"),jsxs("div",{children:[d("bottom"),s==="overlay-bottom"&&c]})]})]}),s==="below"&&c]})}r(Zc,"WorkbenchGalleryCardSurface");var Jy=/\.(png|jpe?g|webp|gif|svg|bmp|avif)$/i,Xy=/\.(wav|mp3|ogg|m4a|flac|aac)$/i,Zy=r(e=>/^https?:\/\//i.test(String(e||"")),"isLikelyUrl"),Qc=r(e=>String(e?.renderType||e?.type||"").toLowerCase(),"getColumnRenderKind"),Qy=r(e=>String(e||"").startsWith("data:image/")||Jy.test(String(e||"")),"isImageLikeValue"),eh=r(e=>String(e||"").startsWith("data:audio/")||Xy.test(String(e||"")),"isAudioLikeValue"),th=r(e=>String(e||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),"escapeSvgText"),Ln=r((e,t)=>e?t?.[e.key]??null:null,"getDefaultGalleryFieldValue"),Lr=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"),Ar=r((e={key:""},t)=>Qc(e)==="image"||Qy(t),"isDefaultGalleryImageField"),zr=r((e={key:""},t)=>Qc(e)==="audio"||eh(t),"isDefaultGalleryAudioField"),eu=r((e,t,o)=>{if(Zy(e)||String(e||"").startsWith("data:image/"))return String(e);let n=th(e||o||t||""),s=`<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(s)}`},"getDefaultGalleryImagePreviewSrc"),Za=r((e,t,{getFieldValue:o=Ln,shouldEnhanceMultimodal:n=true,isImageField:a=Ar,isAudioField:s=zr}={})=>{if(!e||!n)return false;let i=o(e,t);return a(e,i)||s(e,i)},"isDefaultGalleryMediaColumn"),Qa=r((e,t,{isMediaColumn:o=r(()=>false,"isMediaColumn")}={})=>!e||e.renderType==="icon"?false:!o(e,t),"isDefaultGalleryTitleCandidate"),ei=r((e,t,{isMediaColumn:o=r(()=>false,"isMediaColumn")}={})=>!e||e.renderType==="icon"?false:!o(e,t),"isDefaultGallerySummaryCandidate"),tu=r((e,t,{compact:o=false,getFieldValue:n=Ln,getDisplayText:a=Lr}={})=>{let s=n(e,t);return jsx("span",{className:l("leading-relaxed",o&&e?.wrap===true&&"line-clamp-2 block"),children:a(s)})},"renderDefaultGalleryFieldValue");var nh=r(e=>e==="compact"?2:e==="detailed"?6:4,"getDefaultGalleryDetailLimit"),rh=r((e,t)=>e===1||e===2||e===3?Number(e):t==="detailed"?1:2,"getNormalizedGalleryBentoColumns"),ah=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:nh(e)},"getNormalizedGalleryDetailLimit"),ih=r(e=>e==="compact"?"p-3":e==="detailed"?"p-4":"p-3.5","getGalleryCardPaddingClassName"),sh=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"),lh=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 dh(e){return Ac(e)}r(dh,"getIconComponent");function ch(e){return e}r(ch,"defaultFormatLabel");function uh(e){return typeof e=="string"||typeof e=="number"?String(e):""}r(uh,"getLabelText");function js({row:e,columns:t,onClick:o,cardInteraction:n="button",cardPresentation:a,renderCardSlot:s,renderCoverTitle:i,isSelected:m=false,isMasonry:c=false,galleryFieldKey:d="auto",galleryDensity:g="comfortable",galleryBentoColumns:u,galleryDetailVisibility:p="limit",galleryDetailLimit:f,galleryDetailPresentation:b="tiles",shouldEnhanceMultimodal:h=true,getFieldValue:y,isMediaColumn:v,isTitleCandidate:k,isSummaryCandidate:x,getDisplayText:w,renderFieldValue:C,getImagePreviewSrc:S,isImageField:T,isAudioField:E,AudioPlayerComponent:N,cardVariant:O="default",renderPreview:V,renderMeta:W,renderLeadingVisual:F,resolveRecordVisual:H,hiddenDetailFieldKeys:I=[],labels:G,formatLabel:q=ch,className:R}){let D=y||Ln,M=w||Lr,$=T||Ar,J=E||zr,_=S||eu,ee=v||((ge,He)=>Za(ge,He,{getFieldValue:D,shouldEnhanceMultimodal:h,isImageField:$,isAudioField:J})),K=k||((ge,He)=>Qa(ge,He,{isMediaColumn:ee})),Z=x||((ge,He)=>ei(ge,He,{isMediaColumn:ee})),re=C||((ge,He,{compact:ft}={})=>tu(ge,He,{compact:ft,getFieldValue:D,getDisplayText:M})),ae=O==="preview-only",le=O==="image-only",L=O==="chromatic-bento",B=(d!=="auto"?t.find(ge=>ge.key===d&&ee(ge,e)):null)||(h?t.find(ge=>ee(ge,e)):null),j=t.find(ge=>ge.renderType==="icon"),ne=j&&H?H(e[j.key],e,j):null,fe=dh(ne?.Icon||ne?.icon),ye=B?D(B,e):null,xe=B?$(B,ye):false,te=B?J(B,ye):false,se=t.filter(ge=>ge.key!==B?.key&&ge.renderType!=="icon"),Ie=se.filter(ge=>{if(!ge||ee(ge,e)||!K(ge,e))return false;let He=D(ge,e);return !(He==null||He==="")})[0]||null,ze=M(Ie?D(Ie,e):e.linkKey||e.id),U=se.filter(ge=>ge&&ge.key!==Ie?.key&&!ee(ge,e)&&Z(ge,e)).map(ge=>({column:ge,text:String(M(D(ge,e)))})),A=(U.find(({text:ge})=>ge!=="\u2014"&&ge.length>12)||U.find(({text:ge})=>ge!=="\u2014"))?.column||null,X=A?M(D(A,e)):"",ie=new Set(I),Y=se.filter(ge=>ge.key!==Ie?.key&&ge.key!==A?.key&&!ie.has(ge.key)),de=ah({density:g,visibility:p,limit:f}),we=Number.isFinite(de)?Y.slice(0,de):Y,Ce=g==="detailed",Me=rh(u,g),Be=ih(g),_e=lh(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]":sh(g,c),tt=a?.media?.aspectRatio,We=a?.media?.fit;if(tt!==void 0&&(!Number.isFinite(tt)||tt<=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 V=="function"?V({row:e,mediaColumn:B,mediaValue:ye,isImageMedia:xe,isAudioMedia:te,iconVisual:ne,IconComponent:fe,previewClassName:Fe}):null,oe={row:e,contentColumns:se,detailColumns:Y,titleColumn:Ie,summaryColumn:A,getDisplayText:M,getFieldValue:D},Se=W?.(oe)??null,Ve=F?.({...oe,iconVisual:ne})??null,Ye=!Ve&&ne?jsx("div",{className:l("flex h-9 w-9 items-center justify-center rounded-lg border",ne.chipClassName||"border-primary/20 bg-primary/10 text-primary"),children:Ir(ne.Icon||ne.icon,l("h-4 w-4",ne.iconClassName||"text-primary"))}):null,ot=Ve||Ye,gt=L?"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",Bt=L?"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=L?"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",$t=L?"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",zt=G?.fieldCount?.(se.length),pe=G?.coverOnlyHint,Ge=Le==null&&xe&&B?_(ye,e.id,B.label):void 0,Q=Le??jsxs(Fragment,{children:[xe&&B?jsx("div",{style:tt===void 0?void 0:{position:"relative",aspectRatio:tt},className:l("overflow-hidden bg-card/50",le?"rounded-[inherit] bg-transparent":ae?"rounded-[inherit]":"mb-3 rounded-lg border border-border/70"),children:jsx("img",{src:Ge,style:{...pa(Ge),...tt===void 0?{}:{position:"absolute",inset:0,width:"100%",height:"100%"},...We===void 0&&tt===void 0?{}:{objectFit:We??"cover"}},alt:typeof ye?.alt=="string"?ye.alt:typeof ye=="string"?ye:String(B.label||""),className:Fe,loading:"lazy",referrerPolicy:"no-referrer",onError:ge=>{ge.currentTarget.onerror=null,ge.currentTarget.src=_("",e.id,B.label);}})}):null,!xe&&ne&&ae?jsx("div",{className:l("flex items-center justify-center","rounded-[inherit] border py-10",ne.chipClassName||"border-primary/20 bg-primary/5"),children:Ir(ne.Icon||ne.icon,l("h-10 w-10",ne.iconClassName||"text-primary"))}):null,te&&N?jsx("div",{className:l(!ae&&"mb-3"),children:jsx(N,{filename:String(ye)})}):null]}),ue=a?Zc:null,Pe=a?.title?.fieldId?t.find(ge=>ge.key===a.title?.fieldId):Ie,he=i?i(e):Pe?M(D(Pe,e)):ze,ke=!!a?.slots?.length,Ee=ke||n==="container"?"div":"button";return 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":uh(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",L&&"shadow-none"),!ae&&!le&&Be,!ae&&!le&&(m?L?"border-primary/35 bg-background/85 ring-1 ring-primary/20":"border-primary/40 bg-primary/10 ring-1 ring-primary/30":L?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&&m&&"ring-1 ring-primary/30",le&&(m?"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",R),children:[L?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",m?"opacity-100":"group-hover:opacity-100")}):null,jsxs("div",{className:l("relative z-[1]",(le||ae)&&"rounded-[inherit]"),children:[ue&&a?jsx(ue,{presentation:a,title:he,renderSlot:ge=>s?.(ge,oe),children:Q}):Q,!ae&&!le?jsxs(Fragment,{children:[jsxs("div",{className:"flex items-start gap-3",children:[ot?jsx("div",{className:"shrink-0",children:ot}):null,jsxs("div",{className:"flex min-w-0 flex-1 items-start justify-between gap-3",children:[jsxs("div",{className:"min-w-0 flex-1",children:[!a?.title&&jsx("div",{className:l("flex items-center gap-2 text-sm font-semibold",L?"text-muted-foreground transition-colors duration-300 group-hover:text-foreground":"text-foreground"),children:jsx("span",{className:"truncate",children:n==="container"&&o?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?jsx("div",{className:l("mt-1 text-[11px] leading-5 text-muted-foreground",Ce?"line-clamp-4":"line-clamp-2",L&&"transition-colors duration-300 group-hover:text-foreground"),children:X}):null]}),Se??(z(zt)?jsx("span",{className:gt,children:zt}):null)]})]}),we.length>0?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=>jsxs("div",{className:Ze?"flex min-w-0 items-start gap-2 text-xs":Bt,children:[ge.label?jsx("div",{className:Ze?"shrink-0 text-muted-foreground":Ue,children:q(ge.label,{column:ge})}):null,jsx("div",{className:Ze?"min-w-0 text-foreground":l($t,!ge.label&&"mt-0"),children:re(ge,e,{compact:g!=="detailed",surface:"gallery"})})]},`${e.id||e.linkKey}-${ge.key}`))}):null,!Ie&&!X&&we.length===0&&z(pe)?jsx("div",{className:l("mt-3 text-[11px] text-muted-foreground",L&&"transition-colors duration-300 group-hover:text-foreground"),children:pe}):null]}):null]})]})}r(js,"WorkbenchGalleryCard");function nu(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(nu,"resolveGalleryScrollDirection");function gh(e,t,o,n,a){let s=Array.from({length:t},()=>0),i=0,m=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&&(i+=m+n,m=0),m=Math.max(m,d),{index:g,left:g%t*(o+n),top:i,width:o,height:d};let u=s.indexOf(Math.min(...s)),p=s[u];return s[u]=p+d+n,{index:g,left:u*(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(gh,"placeWindowedItems");function bh(e,t,o,n,a){let s=t-a,i=t+o+a;return e.filter(m=>{let c=n?m.left:m.top;return c<=i&&c+(n?m.width:m.height)>=s})}r(bh,"visibleWindow");function au({items:e,getKey:t,layout:o,cardWidth:n,estimateHeight:a,getScrollOwner:s,railRef:i,tailRef:m,containerProps:c,getItemProps:d,renderItem:g}){let u=o.mode==="rail",p=u?1:o.columnCount,f=Math.max(1,u?n??280:o.columnWidth),b=useRef(null),h=useRef(new Map),y=useRef(),[v,k]=useState({width:f,heights:{}}),[x,w]=useState({start:0,length:u?1280:720}),[C,S]=useState(),[T,E]=useState(),N=e.map(t),O=JSON.stringify(N),V=N.map((D,M)=>v.heights[D]??Math.max(1,a(e[M],f))),W=useMemo(()=>gh(V,p,f,o.gap,u?"rail":o.mode==="grid"?"grid":"masonry"),[JSON.stringify(V),p,f,o.gap,u,o.mode]),F=useCallback(()=>{let D=b.current,M=s();if(!D||!M)return;let $=D.getBoundingClientRect(),J=M.getBoundingClientRect(),_=M.offsetHeight>0?J.height/M.offsetHeight:1,ee=u?M.scrollLeft:(J.top-$.top)/(_||1)+M.clientTop,K=u?M.clientWidth:M.clientHeight;K<=0||w(Z=>Z.start===ee&&Z.length===K?Z:{start:ee,length:K});},[s,u]);useLayoutEffect(()=>{F();},[F,W.height,W.width]),useEffect(()=>{let D=s();if(!D)return;let M=0,$=r(()=>{M||(M=requestAnimationFrame(()=>{M=0,F();}));},"update");D.addEventListener("scroll",$,{passive:true}),window.addEventListener("resize",$);let J=typeof ResizeObserver=="function"?new ResizeObserver($):void 0;return J?.observe(D),b.current&&J?.observe(b.current),()=>{D.removeEventListener("scroll",$),window.removeEventListener("resize",$),J?.disconnect(),cancelAnimationFrame(M);}},[s,F]),useEffect(()=>{if(typeof ResizeObserver!="function")return;let D=new ResizeObserver(M=>{k($=>{let J={...$.heights},_=$.width!==f;for(let ee of M){let K=ee.target.dataset.windowKey,Z=ee.borderBoxSize?.[0]?.blockSize??ee.target.offsetHeight;K!==void 0&&Z>0&&J[K]!==Z&&(J[K]=Z,_=true);}return _?{width:f,heights:J}:$});});return y.current=D,h.current.forEach(M=>D.observe(M)),()=>{D.disconnect(),y.current=void 0;}},[f]),useEffect(()=>{let D=new Set(N);k(M=>({width:M.width,heights:Object.fromEntries(Object.entries(M.heights).filter(([$])=>D.has($)))}));},[O]);let H=r((D,M)=>{let $=h.current.get(D);if($&&y.current?.unobserve($),!M){h.current.delete(D);return}M.dataset.windowKey=D,h.current.set(D,M),y.current?.observe(M);},"register"),I=x.length,G=bh(W.placements,x.start,x.length,u,I),q=new Set(G.map(D=>D.index));for(let D of [C,T]){let M=D===void 0?-1:N.indexOf(D);M>=0&&q.add(M);}useLayoutEffect(()=>{if(!T)return;let D=h.current.get(T)?.parentElement;D&&(D.focus(),D.scrollIntoView({block:"nearest",inline:"nearest"}),E(void 0));},[T]);let R={...o,columnWidth:f,itemWidth:f};return jsxs("div",{...c,ref:D=>{b.current=D,i&&(i.current=D);},"data-collection-windowed":"","data-collection-total":e.length,style:{...c.style,position:"relative",...u?{overflowX:"auto",overflowY:"hidden"}:{height:W.height},overflowAnchor:"none"},children:[u?jsx("div",{"aria-hidden":"true",style:{width:W.width,height:W.height,pointerEvents:"none"}}):null,Array.from(q).sort((D,M)=>D-M).map(D=>{let M=e[D],$=N[D],J=W.placements[D],_=d(M,R);return jsx("div",{..._,"aria-posinset":D+1,"aria-setsize":e.length,onFocus:ee=>{S($),_.onFocus?.(ee);},onBlur:ee=>{ee.currentTarget.contains(ee.relatedTarget)||S(void 0),_.onBlur?.(ee);},onKeyDown:ee=>{if(ee.target===ee.currentTarget){let K=u?1:p,Z=ee.key==="Home"?0:ee.key==="End"?e.length-1:ee.key==="ArrowRight"?D+1:ee.key==="ArrowLeft"?D-1:ee.key==="ArrowDown"?D+K:ee.key==="ArrowUp"?D-K:void 0;if(Z!==void 0){ee.preventDefault(),E(N[Math.min(e.length-1,Math.max(0,Z))]);return}}_.onKeyDown?.(ee);},style:{..._.style,position:"absolute",left:J.left,top:J.top,width:J.width},children:jsx("div",{ref:ee=>H($,ee),children:g(M,R)})},$)}),m?jsx("div",{ref:m,"aria-hidden":"true",style:{position:"absolute",left:Math.max(0,W.width-1),top:0,width:1,height:1}}):null]})}r(au,"WorkbenchWindowedLayout");var hh=12,xh=8,lu=280,cu=240,vh=typeof window>"u"?useEffect:useLayoutEffect;function ri(e,t,o){return Math.min(Math.max(e,t),o)}r(ri,"clamp");function kh(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(kh,"getRootFontSize");function ai(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*kh(o)}return t}r(ai,"resolveLengthToPixels");function du(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(du,"areMeasurementMapsEqual");function wh({containerWidth:e,itemCount:t,targetColumnWidth:o,gap:n}){if(!e)return 1;let a=Math.max(t,1),s=Math.max(1,Math.min(a,Math.ceil((e+n)/(Math.max(o*.58,1)+n)))),i=1,m=Number.POSITIVE_INFINITY;for(let c=1;c<=s;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),u=Math.max(0,d-o*1.35),p=Math.abs(d-o)+g*3+u*2;p<m&&(m=p,i=c);}return i}r(wh,"getMasonryColumnCount");function Ch({size:e,columnWidth:t,columnCount:o,gap:n}){if(Number.isFinite(e?.columnSpan)&&Number(e?.columnSpan)>0)return ri(Math.round(Number(e?.columnSpan)),1,o);let a=ai(e?.width,t,null);return ri(Math.ceil((a+n)/(t+n)),1,o)}r(Ch,"getItemColumnSpan");function Sh({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):ai(e?.height,cu,null);return Math.max(1,Math.ceil((a+n)/(o+n)))}r(Sh,"getItemRowSpan");function Th({size:e,measuredHeight:t}){return Number.isFinite(t)&&Number(t)>0?Number(t):ai(e?.height,cu,null)}r(Th,"getResolvedItemHeight");function Or({items:e=[],renderItem:t,getItemKey:o=r((p,f)=>p?.id??p?.key??f,"getItemKey"),getItemSize:n,columnWidth:a=lu,columnCount:s,gap:i=hh,rowHeight:m=xh,placementStrategy:c="shelf",containerProps:d,getItemProps:g,className:u}){let p=useRef(null),f=useRef(new Map),b=useRef(null),[h,y]=useState(0),[v,k]=useState({}),x=useMemo(()=>e.map((W,F)=>String(o(W,F))),[o,e]),w=x.join("|");useEffect(()=>{let W=p.current;if(!W)return;let F=r(()=>{let H=Math.round(W.getBoundingClientRect().width);y(I=>I===H?I:H);},"updateWidth");if(F(),typeof ResizeObserver=="function"){let H=new ResizeObserver(()=>F());return H.observe(W),()=>H.disconnect()}return window.addEventListener("resize",F),()=>window.removeEventListener("resize",F)},[]),useEffect(()=>{k(W=>{let F=new Set(x),H=Object.fromEntries(Object.entries(W).filter(([I])=>F.has(I)));return du(W,H)?W:H});},[x,w]);let C=ai(a,lu,p.current),S=c==="dense",E=(Number.isFinite(s)&&Number(s)>0?ri(Math.round(Number(s)),1,24):void 0)||wh({containerWidth:h,itemCount:e.length,targetColumnWidth:C,gap:i}),N=h>0?(h-i*Math.max(E-1,0))/E:C,O=useMemo(()=>e.map((W,F)=>{let H=x[F],I=typeof n=="function"?n(W,{columnCount:E,columnWidth:N,containerWidth:h,gap:i,placementStrategy:c,rowHeight:m})||{}:{};return {key:H,item:W,size:I,columnSpan:Ch({size:I,columnWidth:N,columnCount:E,gap:i}),rowSpan:Sh({size:I,measuredHeight:v[H],rowHeight:m,gap:i})}}),[E,h,i,n,x,e,v,c,N,m]);vh(()=>{let W={};f.current.forEach((F,H)=>{let I=Math.ceil(F.getBoundingClientRect().height);Number.isFinite(I)&&I>0&&(W[H]=I);}),k(F=>{if(!Object.keys(W).length)return F;let H={...F,...W};return du(F,H)?F:H});},[E,S,w,N]),useEffect(()=>{if(typeof ResizeObserver!="function")return;let W=new ResizeObserver(F=>{k(H=>{let I={...H},G=false;for(let q of F){let R=q.target.dataset.masonryKey;if(!R)continue;let D=Math.ceil(q.contentRect.height);!Number.isFinite(D)||D<=0||I[R]===D||(I[R]=D,G=true);}return G?I:H});});return b.current=W,f.current.forEach(F=>W.observe(F)),()=>{W.disconnect(),b.current=null;}},[S,w]);let V=r((W,F)=>{let H=f.current,I=H.get(W);if(I&&I!==F&&b.current&&b.current.unobserve(I),!F){H.delete(W);return}F.dataset.masonryKey=W,H.set(W,F),b.current&&b.current.observe(F);},"registerItemNode");if(!S){let W=(()=>{let F=Array.from({length:E},()=>0),H=0,I=0,G=O.map(({key:q,item:R,columnSpan:D,rowSpan:M,size:$})=>{let J=ri(D,1,E),_=H;if(c==="shortest"){let le=Number.POSITIVE_INFINITY;for(let L=0;L<=E-J;L+=1){let me=Math.max(...F.slice(L,L+J));me<le&&(le=me,_=L);}}else _+J>E&&(_=0),_=Math.min(_,E-J);let ee=N*J+i*Math.max(J-1,0),K=Th({size:$,measuredHeight:v[q]}),Z=Math.max(...F.slice(_,_+J)),re=_*(N+i),ae=Z+K;for(let le=_;le<_+J;le+=1)F[le]=ae+i;return I=Math.max(I,ae),c!=="shortest"&&(H=_+J,H>=E&&(H=0)),{key:q,item:R,columnSpan:J,itemHeight:K,itemWidth:ee,left:re,rowSpan:M,size:$,top:Z}});return {containerHeight:Math.max(0,I),positionedItems:G}})();return jsx("div",{ref:p,...d,className:l("relative w-full",u,d?.className),style:{...d?.style,height:`${W.containerHeight}px`},children:W.positionedItems.map(({key:F,item:H,columnSpan:I,rowSpan:G,size:q,itemWidth:R,left:D,top:M})=>{let $=h<=0&&E===1,J=$?"100%":`${R}px`,_={columnCount:E,columnSpan:I,columnWidth:N,containerWidth:h,gap:i,itemWidth:R,placementStrategy:c,rowSpan:G,rowHeight:m,size:q},ee=g?.(H,_);return jsx("div",{...ee,className:l("absolute min-w-0",ee?.className),style:{...ee?.style,left:$?0:`${D}px`,top:`${M}px`,width:J,maxWidth:J},children:jsx("div",{ref:K=>V(F,K),role:"presentation",className:"min-w-0",children:t(H,_)})},F)})})}return jsx("div",{ref:p,...d,className:l("grid w-full items-start",u,d?.className),style:{...d?.style,gap:`${i}px`,gridAutoFlow:"row dense",gridAutoRows:`${m}px`,gridTemplateColumns:`repeat(${E}, minmax(0, 1fr))`},children:O.map(({key:W,item:F,columnSpan:H,rowSpan:I,size:G})=>{let q={columnCount:E,columnSpan:H,columnWidth:N,containerWidth:h,gap:i,placementStrategy:c,rowSpan:I,rowHeight:m,size:G},R=g?.(F,q);return jsx("div",{...R,className:l("min-w-0",R?.className),style:{...R?.style,gridColumn:`span ${H}`,gridRow:`span ${I}`},children:jsx("div",{ref:D=>V(W,D),role:"presentation",className:"min-w-0",children:t(F,q)})},W)})})}r(Or,"WorkbenchMasonryLayout");var Nh=12,Ih=[1],Mh=[4/3],Bh=[1,4/5,3/2,3/4,5/4],Ph=.5,Eh=2,Dh="hsl(var(--monkeys-color-muted, var(--muted)))";function ii(e,t,o){return Math.min(Math.max(e,t),o)}r(ii,"clamp");function qs(e,t,o){return typeof e!="number"||!Number.isFinite(e)||e<=0?t:ii(Math.round(e),1,o)}r(qs,"normalizeCount");function Wh(e){return e==="masonry"||e==="dense"?Bh:e==="rail"?Mh:Ih}r(Wh,"getDefaultAspectRatios");function Lh(e,t){let o=t?.filter(n=>typeof n=="number"&&Number.isFinite(n)&&n>0).map(n=>ii(n,Ph,Eh));return o?.length?o:Wh(e)}r(Lh,"resolveAspectRatios");function mu(e){return qs(e?.count,Nh,48)}r(mu,"resolveWorkbenchCollectionSkeletonCapacity");function pu(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(pu,"resolveWorkbenchCollectionLoadingVariant");function Ah({columnCount:e,config:t,phase:o}){if(o==="initial"){let a=ii(e*2,6,24);return qs(t?.count,a,48)}let n=ii(e,1,12);return qs(t?.loadMoreCount,n,24)}r(Ah,"resolveSkeletonCount");function uu(e,t){return Math.max(1,e/t)}r(uu,"getSkeletonHeight");function Ys({mode:e,phase:t,columnCount:o,columnWidth:n,cardWidth:a,gap:s,rowHeight:i,config:m,ariaLabel:c,className:d}){let g=Ah({columnCount:o,config:m,phase:t}),u=Lh(e,m?.aspectRatios),p=m?.animated??true,f=useMemo(()=>Array.from({length:g},(h,y)=>({aspectRatio:u[y%u.length],key:`${t}-${y}`,index:y})),[u,g,t]),b=r((h,y)=>jsx(Tn,{index:h.index,children:jsx(Dt,{variant:"block",animated:p,className:"h-auto w-full rounded-lg",style:{backgroundColor:Dh,...y??{aspectRatio:String(h.aspectRatio)}},"data-collection-skeleton-item":"","data-skeleton-aspect-ratio":h.aspectRatio})}),"renderSkeleton");return jsx(Ho,{animation:m?.animation,animated:p,children: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"?jsx(Or,{items:f,columnCount:o,columnWidth:n,gap:s,rowHeight:i,placementStrategy:e==="dense"?"dense":"shortest",className:d,containerProps:{"aria-hidden":true},getItemKey:h=>h.key,getItemSize:(h,y)=>({height:uu(y.columnWidth,h.aspectRatio)}),renderItem:(h,y)=>b(h,{height:`${uu(y.columnWidth,h.aspectRatio)}px`})}):e==="rail"?jsx("div",{"aria-hidden":"true",className:l("grid min-w-0 grid-flow-col items-start overflow-x-auto",d),style:{gap:s,gridAutoColumns:typeof a=="number"?`${a}px`:a??`${n}px`},children:f.map(h=>jsx("div",{children:b(h)},h.key))}):jsx("div",{"aria-hidden":"true",className:l("grid min-w-0 items-start",d),style:{gap:s,gridTemplateColumns:`repeat(${o}, minmax(0, 1fr))`},children:f.map(h=>jsx("div",{children:b(h)},h.key))})})})}r(Ys,"WorkbenchCollectionSkeleton");function Oh(e,t){if(e.size!==t.size)return false;for(let o of e)if(!t.has(o))return false;return true}r(Oh,"setsEqual");function Fh(e){return String(e)}r(Fh,"getComparableKey");function Hh(e){return e==="multiple"?"toggle":"replace"}r(Hh,"getDefaultBehavior");function Qs({items:e,getItemKey:t,mode:o="none",behavior:n,selectedKeys:a,defaultSelectedKeys:s,isItemDisabled:i,onSelectionChange:m}){let c=a!==void 0,[d,g]=useState(()=>new Set(s??[])),u=useRef(null),p=useRef(m);p.current=m;let f=useMemo(()=>{let w=new Map;return e.map((C,S)=>{let T=t(C,S),E=Fh(T),N=w.get(E);if(N!==void 0)throw new TypeError(`useWorkbenchCollectionSelection received duplicate item key "${E}" at indices ${N} and ${S}.`);return w.set(E,S),{item:C,index:S,key:T}})},[t,e]),b=useMemo(()=>{let w=new Map;return f.forEach(C=>w.set(C.key,C)),w},[f]),h=useMemo(()=>o==="none"?new Set:c?new Set(a??[]):d,[c,a,d,o]),y=useRef(h);y.current=h;let v=useCallback(()=>{u.current=null;},[]);useEffect(()=>{if(c)return;let w=new Set(f.map(({key:C})=>C));g(C=>{let S=new Set(Array.from(C).filter(T=>w.has(T)));return Oh(C,S)?C:(y.current=S,S)});},[c,f]),useEffect(()=>{let w=u.current;if(o!=="multiple"||h.size===0||w===null){v();return}let C=b.get(w);(!C||i?.(C.item,C.index))&&v();},[i,b,o,v,h.size]);let k=useCallback((w,C={})=>{if(o==="none")return;let S=b.get(w);if(!S||i?.(S.item,S.index))return;let T=new Set(y.current),E=n??Hh(o),N=C.shiftKey&&o==="multiple"?"range":C.behavior??E;o==="single"&&(N=N==="toggle"?"toggle":"replace");let O=u.current===null?void 0:b.get(u.current),V=!!(O&&!i?.(O.item,O.index));o==="multiple"&&N==="range"&&!V&&(N=E==="range"?"toggle":E);let W=new Set;if(o==="single")N==="toggle"&&T.has(S.key)||W.add(S.key);else if(N==="range"&&O){T.forEach(I=>W.add(I));let F=Math.min(O.index,S.index),H=Math.max(O.index,S.index);f.slice(F,H+1).forEach(I=>{i?.(I.item,I.index)||W.add(I.key);});}else N==="replace"?W.add(S.key):(T.forEach(F=>W.add(F)),W.has(S.key)?W.delete(S.key):W.add(S.key));u.current=o==="multiple"?S.key:null,c||(y.current=W,g(W)),p.current?.(W,{item:S.item,index:S.index,key:S.key,behavior:N});},[n,c,i,b,o,f]),x=useCallback(w=>h.has(w),[h]);return {mode:o,selectedKeys:h,isSelected:x,selectKey:k,resetAnchor:v}}r(Qs,"useWorkbenchCollectionSelection");var ol=12,_h=8,li=280,jh=640,$h=1024,hu=24;function di(e,t,o){return Math.min(Math.max(e,t),o)}r(di,"clamp");function oo(e,t){return typeof e=="function"?e(t):e}r(oo,"resolveRenderableSlot");function On(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),s=typeof window>"u"?16:Number.parseFloat(window.getComputedStyle(o||document.documentElement).fontSize)||16;return Number.isFinite(a)&&a>0?a*s:t}return t}r(On,"resolveLengthToPixels");function si(e){if(!(typeof e!="number"||!Number.isFinite(e)||e<=0))return di(Math.round(e),1,hu)}r(si,"normalizeColumns");function bu(e,t){if(e==="auto"||e===void 0)return;if(typeof e=="number")return si(e);let o=si(e.mobile),n=si(e.tablet),a=si(e.desktop);return t>=$h?a??n??o:t>=jh?n??o??a:o??n??a}r(bu,"resolveResponsiveColumns");function Kh({containerWidth:e,itemCount:t,gap:o,columns:n,underfilledBehavior:a,maxColumns:s,minCardWidth:i,idealCardWidth:m,maxCardWidth:c,node:d}){let g=bu(n,e),u=bu(s,e);if(g)return u?Math.min(g,u):g;if(!e)return 1;let p=On(m,li,d),f=On(i,p*.78,d),b=Math.max(f,On(c,p*1.35,d)),h=Math.max(t,1),y=Math.max(1,Math.min(a==="preserve-columns"?hu:h,Math.ceil((e+o)/(Math.max(f*.75,1)+o)))),v=1,k=Number.POSITIVE_INFINITY;for(let x=1;x<=y;x+=1){let w=(e-o*Math.max(x-1,0))/x;if(!Number.isFinite(w)||w<=0)continue;let C=Math.abs(w-p)+Math.max(0,f-w)*3+Math.max(0,w-b)*2;C<k&&(k=C,v=x);}return u?Math.min(v,u):v}r(Kh,"resolveColumnCount");function fu(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0?e:ol}r(fu,"normalizeGap");function Uh(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?e:_h}r(Uh,"normalizeRowHeight");function qh(e){return typeof e=="number"&&Number.isFinite(e)?di(e,0,1):0}r(qh,"normalizeThreshold");function Yh(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(Yh,"normalizeItemSize");function Jh(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(Jh,"getDefaultItemKey");function Xh(e){return `@inf-monkeys-tech/monkeys-design:workbench-collection:${e}`}r(Xh,"getScrollStorageKey");function Zh(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(Zh,"getParentScrollOwner");function yu(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(yu,"isInteractiveEventTarget");function Qh(e){if(!(!Number.isFinite(e)||Number(e)<=0))return di(Math.round(Number(e)),1,12)}r(Qh,"normalizeTitleMaxLines");function Xo({items:e,config:t,renderItem:o,slots:n,callbacks:a,className:s,classNames:i,style:m,ariaLabel:c}){let d=Ne(),g=vt().workbench.collection,u=Co(),p=nn(),f=useId().replace(/:/g,""),b=useRef(null),h=useRef(null),y=useRef(null),v=useRef(null),k=useRef(false),x=useRef(false),w=useRef(false),C=useRef(false),S=useRef(null),T=useRef(null),E=useRef(void 0),N=useRef(false),[O,V]=useState(0),[W,F]=useState(ol),[H,I]=useState(null),G=useRef(a);G.current=a;let q=useCallback(Q=>{y.current=Q,I(Q);},[]),R=t.layout.mode;if(R!=="grid"&&R!=="masonry"&&R!=="dense"&&R!=="rail")throw new TypeError(`WorkbenchCollection layout.mode "${String(R)}" is not supported.`);let D=t.layout.gap===void 0?W:fu(t.layout.gap),M=Uh(t.layout.rowHeight),$=t.getItemKey??Jh,J=useMemo(()=>e.map((Q,ue)=>{let Pe=$(Q,ue);return {item:Q,index:ue,key:Pe,stringKey:String(Pe)}}),[$,e]),_=J.map(({stringKey:Q})=>Q).join(""),ee=t.state,K=ee?.loading===true,Z=ee?.loadingMore===true,re=ee?.hasMore===true,ae=pu(t.loading?.variant),le=K&&J.length===0&&ae==="skeleton"?mu(t.loading?.skeleton):J.length,L=t.selection?.mode??"none",me=useCallback(Q=>t.selection?.isItemDisabled?.(Q.item,Q.index)??false,[t.selection?.isItemDisabled]),B=useCallback(Q=>Q.key,[]),j=useCallback((Q,ue)=>{G.current?.onSelectionChange?.(Q,{item:ue.item.item,key:ue.key,behavior:ue.behavior});},[]),{selectedKeys:ne,selectKey:fe}=Qs({items:J,getItemKey:B,mode:L,behavior:t.selection?.behavior,selectedKeys:t.selection?.selectedKeys,defaultSelectedKeys:t.selection?.defaultSelectedKeys,isItemDisabled:me,onSelectionChange:j});useEffect(()=>{let Q=H;if(!Q)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:ol);}let Pe=Q.clientWidth;V(he=>he===Pe?he:Pe);},"updateWidth");if(ue(),typeof ResizeObserver=="function"){let Pe=new ResizeObserver(ue);return Pe.observe(Q),()=>Pe.disconnect()}if(!(typeof window>"u"))return window.addEventListener("resize",ue),()=>window.removeEventListener("resize",ue)},[H,t.layout.gap,m?.gap,p]);let ye=Kh({containerWidth:O,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=O>0?Math.max(0,(O-D*Math.max(ye-1,0))/ye):On(t.layout.cardWidth??t.layout.columnWidth??t.layout.idealCardWidth,li,y.current),te=t.layout.placementStrategy??(R==="dense"?"dense":R==="masonry"?"shortest":"shelf"),se=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=useMemo(()=>{let Q=t.virtualization;return Q?.enabled!==true||Q.fallback!=="error"?null:Q.adapter?Q.adapter.supports?.(R)===false?new Error(`WorkbenchCollection virtualization adapter does not support mode "${R}".`):null:new Error("WorkbenchCollection virtualization requires an adapter.")},[t.virtualization,R]),Ie=useMemo(()=>({mode:R,columnCount:ye,columnWidth:xe,containerWidth:O,gap:D,itemCount:J.length}),[ye,xe,O,D,R,J.length]);useEffect(()=>{G.current?.onLayoutChange?.(Ie),O>0&&!N.current&&(N.current=true,G.current?.onLayoutReady?.(Ie));},[Ie,O]),useEffect(()=>{N.current=false;},[R]);let ze=useCallback(()=>{let Q=t.layout.scrollOwner;return Q&&Q!=="self"&&Q!=="parent"?Q:R==="rail"?h.current:Q==="parent"?Zh(b.current):b.current},[t.layout.scrollOwner,R]);useEffect(()=>{let Q=t.scrollRestorationKey?.trim();if(!Q||typeof window>"u")return;let ue=ze();if(!ue)return;let Pe=Xh(Q);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=ee?.error??Re;useEffect(()=>{(!ce||!re)&&(x.current=false,w.current=false,C.current=false);},[ce,re]);let A=useCallback(()=>{if(!ce||!re||Z||k.current)return;k.current=true;let Q=r(()=>{k.current=false;},"releaseRequest");try{let ue=G.current?.onLoadMore?.();ue&&typeof ue.then=="function"?ue.then(Q,Q):Q();}catch(ue){throw Q(),ue}},[ce,re,Z]);useEffect(()=>{let Q=v.current;if((S.current!==Q||T.current!==_||E.current!==t.loading?.pageKey)&&(S.current=Q,T.current=_,E.current=t.loading?.pageKey,x.current=false,w.current=false,C.current=false),!Q||!ce||!re||typeof IntersectionObserver!="function")return;let ue=ze(),Pe=false,he=true,ke=new IntersectionObserver(He=>{if(!he)return;let ft=He.some(Xn=>Xn.isIntersecting);if(!(ft&&(Z||k.current))){if(C.current){if(Pe=true,C.current=false,x.current=ft,!ft){w.current=false;return}if(w.current)return;w.current=true,A();return}if(!Pe){Pe=true,x.current=ft,ft||(w.current=false),ft&&t.loading?.autoFill&&!w.current&&(w.current=true,A());return}if(!ft){x.current=false,w.current=false;return}x.current||(x.current=true,w.current=true,A());}},{root:ue===b.current?ue:ue||null,rootMargin:t.loading?.rootMargin??"240px",threshold:qh(t.loading?.threshold)}),Ee=ue??(typeof window>"u"?null:window),ge=r(()=>{!x.current||w.current||C.current||(C.current=true,ke.unobserve(Q),ke.takeRecords(),ke.observe(Q));},"validateActiveIntersection");return ke.observe(Q),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,re,_,Z,J.length,A,ze]),useEffect(()=>{if(!t.loading?.autoFill||!ce||!re||Z||w.current||k.current||!v.current)return;let ue=ze()??(t.layout.scrollOwner==="parent"?b.current?.parentElement??null:null)??b.current;if(!ue)return;let Pe=R==="rail"?ue.clientWidth:ue.clientHeight,he=R==="rail"?ue.scrollWidth:ue.scrollHeight;Pe<=0||he<=Pe+1&&(w.current=true,A());},[ce,t.layout.scrollOwner,t.loading?.autoFill,t.loading?.pageKey,re,_,Z,J.length,A,ze,R]);let X=useMemo(()=>{if(!t.grouping)return [{key:"__all__",stringKey:"__all__",items:J}];let Q=new Map;return J.forEach(ue=>{let Pe=t.grouping?.getGroupKey(ue.item,ue.index)??"__all__",he=String(Pe),ke=Q.get(he);if(ke){ke.items.push(ue);return}Q.set(he,{key:Pe,stringKey:he,label:t.grouping?.getGroupLabel?.(Pe,ue.item),items:[ue]});}),Array.from(Q.values())},[t.grouping,J]),ie=useCallback((Q,ue)=>{let Pe=t.selection?.isItemDisabled?.(Q.item,Q.index)??false,he={item:Q.item,index:Q.index,key:Q.key,status:t.getItemStatus?.(Q.item,Q.index)??"idle",disabled:Pe,selected:ne.has(Q.key),selectionMode:L,layout:ue,select:r(ke=>fe(Q.key,{behavior:ke}),"select"),selectFromEvent:r((ke,Ee)=>fe(Q.key,{behavior:Ee,shiftKey:ke.shiftKey}),"selectFromEvent"),preview:r(()=>a?.onItemPreview?.(Q.item,he),"preview"),detail:r(()=>a?.onItemDetail?.(Q.item,he),"detail"),renderSlot:r(ke=>n?.item?.[ke]?.(Q.item,he),"renderSlot"),notifyMediaLoad:r(()=>a?.onMediaLoad?.(Q.item,he),"notifyMediaLoad"),notifyMediaError:r(ke=>a?.onMediaError?.(Q.item,he,ke),"notifyMediaError")};return he},[a,t.getItemStatus,t.selection,ne,fe,L,n?.item]),Y=useCallback((Q,ue)=>{let Pe=r(he=>{he.target!==he.currentTarget||he.key!=="Enter"&&he.key!==" "||(he.preventDefault(),L!=="none"?ue.selectFromEvent(he):a?.onItemClick?.(Q.item,ue,he));},"handleKeyboard");return {id:`${f}-item-${Q.index}`,"data-monkeys-collection-item":"","data-item-key":Q.stringKey,"data-selected":ue.selected||void 0,"data-disabled":ue.disabled||void 0,"data-status":ue.status,role:L==="none"?"listitem":"option","aria-selected":L==="none"?void 0:ue.selected,"aria-disabled":ue.disabled||void 0,tabIndex:a?.onItemClick||L!=="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",i?.item),onClick:r(he=>{yu(he.target,he.currentTarget)||(L!=="none"&&ue.selectFromEvent(he),a?.onItemClick?.(Q.item,ue,he));},"onClick"),onDoubleClick:r(he=>{yu(he.target,he.currentTarget)||a?.onItemDoubleClick?.(Q.item,ue,he);},"onDoubleClick"),onMouseEnter:r(he=>a?.onItemHoverChange?.(Q.item,ue,true,he),"onMouseEnter"),onMouseLeave:r(he=>a?.onItemHoverChange?.(Q.item,ue,false,he),"onMouseLeave"),onKeyDown:Pe,onDragStart:r(he=>a?.onItemDragStart?.(Q.item,ue,he),"onDragStart"),onDragOver:a?.onItemDrop?he=>he.preventDefault():void 0,onDrop:r(he=>a?.onItemDrop?.(Q.item,ue,he),"onDrop")}},[a,i?.item,f,t.appearance,t.item?.title?.visibility,L]),de=useCallback((Q,ue)=>{let Pe=o(Q.item,ue),he=t.item?.title,ke=he?.visibility??"always",Ee=he&&ke!=="never"?he.getContent?.(Q.item,ue)??ue.renderSlot("title"):null,ge=!!(he&&z(Ee)),He=he?.placement??"below",ft=ge&&He.startsWith("overlay-"),Xn=Qh(he?.maxLines),ea=he?.surface??(ft?"scrim":"none"),Dl=ge?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",ea==="surface"&&"bg-background/90 backdrop-blur-sm",ea==="scrim"&&He==="overlay-top"&&"bg-gradient-to-b from-background/90 to-transparent pb-8",ea==="scrim"&&He==="overlay-bottom"&&"bg-gradient-to-t from-background/90 to-transparent pt-8",ea==="scrim"&&He==="overlay-center"&&"bg-background/75 backdrop-blur-sm",!!Xn&&"overflow-hidden [display:-webkit-box] [-webkit-box-orient:vertical]",i?.itemTitle),style:Xn?{WebkitLineClamp:Xn}:void 0,children:Ee}):null,Yt=t.item?.actions,Di=Yt?.visibility??"always",Wl=Yt&&Di!=="never"?ue.renderSlot("actions"):null,Wi=!!(Yt&&z(Wl)),wn=Yt?.placement??"overlay-bottom",Li=Wi&&wn.startsWith("overlay-"),Ll=Wi?jsx("div",{"data-collection-item-actions":"","data-actions-placement":wn,"data-actions-align":Yt?.align??"center","data-actions-visibility":Di,className:l("flex min-w-0 items-center gap-2 px-2 py-2",Yt?.align==="start"&&"justify-start",(Yt?.align===void 0||Yt.align==="center")&&"justify-center",Yt?.align==="end"&&"justify-end",Yt?.wrap!==false&&"flex-wrap",Di==="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",Li&&"pointer-events-none absolute inset-x-0 z-20",wn==="overlay-top"&&"top-1",wn==="overlay-bottom"&&"bottom-1",i?.itemActions),children:jsx("div",{className:l("pointer-events-auto flex items-center gap-2",Yt?.wrap!==false&&"flex-wrap"),children:Wl})}):null;return !ge&&!Wi?Pe:jsxs("div",{className:l("min-w-0",(ft||Li)&&"relative",i?.itemContent),"data-collection-item-content":"",children:[He==="above"?Dl:null,wn==="above"?Ll:null,Pe,He==="below"||ft?Dl:null,wn==="below"||Li?Ll:null]})},[i?.itemActions,i?.itemContent,i?.itemTitle,t.item,o]),we=useCallback((Q,ue,Pe=true)=>{let he=ie(Q,ue),ke=de(Q,he);return Pe?jsx("div",{...Y(Q,he),children:ke}):ke},[ie,Y,de]),Ce=useMemo(()=>({mode:R,columnCount:ye,columnWidth:xe,containerWidth:O,gap:D,placementStrategy:te,rowHeight:M}),[ye,xe,O,D,R,te,M]),Me=r(Q=>{if(t.windowed&&R!=="dense"){let ke=Q===X[X.length-1];return jsx(au,{items:Q.items,getKey:Ee=>Ee.stringKey,layout:Ce,cardWidth:On(t.layout.cardWidth,li,b.current),getScrollOwner:ze,railRef:R==="rail"&&ke?h:void 0,tailRef:R==="rail"&&ke?v:void 0,estimateHeight:(Ee,ge)=>{let He=t.layout.getItemSize?.(Ee.item,{...Ce,columnWidth:ge}),ft=t.layout.getItemAspectRatio?.(Ee.item,Ee.index);return On(He?.height,ft&&ft>0?ge/ft:300,b.current)},containerProps:{role:L==="none"?"list":"listbox","aria-label":c??se.collection,"aria-multiselectable":L==="multiple"||void 0,className:i?.layout},getItemProps:(Ee,ge)=>Y(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?.(R)===false)&&ue?.fallback==="error")return null;if(he&&Pe&&Pe.supports?.(R)!==false)return Pe.render({items:Q.items.map(({item:ke})=>ke),keys:Q.items.map(({key:ke})=>ke),layout:t.layout,scrollOwner:ze(),renderItem:r((ke,Ee,ge)=>{let He=Q.items[Ee];return He?jsx(Fragment$1,{children:we(He,ge)},He.stringKey):null},"renderItem")});if(R==="masonry"||R==="dense")return jsx(Or,{items:Q.items,columnCount:ye,columnWidth:t.layout.cardWidth??t.layout.columnWidth??t.layout.idealCardWidth,gap:D,rowHeight:M,placementStrategy:R==="dense"?"dense":te,className:i?.layout,containerProps:{role:L==="none"?"list":"listbox","aria-label":c??se.collection,"aria-multiselectable":L==="multiple"||void 0},getItemProps:(ke,Ee)=>{let ge=ie(ke,{...Ee,mode:R});return Y(ke,ge)},getItemKey:ke=>ke.key,getItemSize:(ke,Ee)=>{let ge={...Ee,mode:R},He=t.layout.getItemSize?.(ke.item,ge),ft=t.layout.getItemAspectRatio?.(ke.item,ke.index);return Yh(He,ft,Ee.columnWidth)},renderItem:(ke,Ee)=>we(ke,{...Ee,mode:R},false)});if(R==="rail"){let ke=t.layout.cardWidth??t.layout.idealCardWidth??li,Ee=Q===X[X.length-1];return jsx("div",{ref:Ee?h:void 0,role:L==="none"?"list":"listbox","aria-label":c??se.collection,"aria-multiselectable":L==="multiple"||void 0,className:l("grid min-w-0 grid-flow-col items-start overflow-x-auto",i?.layout),style:{gap:D,gridAutoColumns:typeof ke=="number"?`${ke}px`:ke},children:Q.items.map((ge,He)=>jsx("div",{ref:Ee&&He===Q.items.length-1?v:void 0,className:"min-w-0",children:we(ge,Ce)},ge.stringKey))})}return jsx("div",{role:L==="none"?"list":"listbox","aria-label":c??se.collection,"aria-multiselectable":L==="multiple"||void 0,className:l("grid min-w-0 items-start",i?.layout),style:{gap:D,gridTemplateColumns:`repeat(${ye}, minmax(0, 1fr))`},children:Q.items.map(ke=>{let Ee=t.layout.getItemSize?.(ke.item,Ce),ge=di(Math.round(Number(Ee?.columnSpan)||1),1,ye),He=t.layout.getItemAspectRatio?.(ke.item,ke.index);return jsx("div",{...Y(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:K,loadingMore:Z,selectedKeys:ne,retry:r(()=>a?.onRetry?.(),"retry")},_e=oo(n?.header,Be),Ze=oo(n?.toolbar,Be),Fe=ne.size>0?oo(n?.selectionToolbar,Be):null,tt=oo(n?.beforeItems,Be),We=oo(n?.footer,Be),Le=ee?.permission===true,oe=ee?.offline===true&&!Le,Se=K&&e.length===0&&!Le&&!oe,Ve=!!U&&e.length===0&&!Le&&!oe&&!Se,Ye=!Le&&!oe&&!Se&&!Ve&&(ee?.empty===true||e.length===0),ot=oo(n?.loading,Be),gt=oo(n?.error,Be),Bt=oo(n?.permission,Be),Ue=oo(n?.offline,Be),$t=oo(n?.empty,Be),zt=oo(n?.loadMore,Be),pe=t.layout.scrollOwner==="self"||t.layout.scrollOwner===void 0&&(t.layout.fillHeight||t.layout.maxHeight),Ge={...m,gap:t.layout.gap===void 0?m?.gap??"var(--monkeys-bento-gap, var(--global-spacing, 0.75rem))":fu(t.layout.gap),padding:t.layout.padding??m?.padding,height:t.layout.fillHeight?"100%":m?.height,maxHeight:t.layout.maxHeight??m?.maxHeight,overflow:pe?"auto":m?.overflow};return jsxs("section",{ref:b,...d,"data-monkeys-component":"workbench-collection","data-layout-mode":R,"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":K||Z||void 0,className:l("min-h-0 min-w-0",t.layout.fillHeight&&"h-full",i?.root,s),style:Ge,children:[z(_e)?jsx("div",{className:i?.header,children:_e}):null,z(Ze)?jsx("div",{className:i?.toolbar,children:Ze}):null,z(Fe)?jsx("div",{className:i?.selectionToolbar,children:Fe}):null,z(tt)?jsx("div",{className:i?.beforeItems,children:tt}):null,Le?z(Bt)?Bt:jsx(br,{kind:"permission",title:se.permission,actions:u.permission?.showRequestAccess!==false&&a?.onRequestAccess?jsx(ve,{size:"sm",label:se.requestAccess,onClick:a.onRequestAccess}):void 0}):oe?z(Ue)?Ue:jsx(br,{kind:"offline",title:se.offline,actions:u.error?.showRetry!==false&&a?.onRetry?jsx(ve,{size:"sm",label:se.retry,onClick:a.onRetry}):void 0}):Se?z(ot)?ot:ae==="spinner"?jsx(jo,{title:se.loading,variant:"spinner"}):jsx("div",{ref:q,className:l("min-w-0",i?.items),children:jsx(Ys,{mode:R,phase:"initial",columnCount:ye,columnWidth:xe,cardWidth:t.layout.cardWidth??t.layout.idealCardWidth,gap:D,rowHeight:M,config:t.loading?.skeleton,ariaLabel:se.loading,className:i?.layout})}):Ve?z(gt)?gt:jsx(br,{kind:"error",title:se.loadError,actions:u.error?.showRetry!==false&&a?.onRetry?jsx(ve,{size:"sm",label:se.retry,onClick:a.onRetry}):void 0}):Ye?z($t)?$t:jsx(va,{title:se.empty}):jsx("div",{ref:q,className:l("min-w-0",i?.items),children:X.map((Q,ue)=>{let Pe={key:Q.key,label:Q.label,items:Q.items.map(({item:Ee})=>Ee),groupIndex:ue},he=t.grouping?n?.groupHeading?.(Pe,Be)??Q.label:null,ke=`${f}-group-${ue}`;return jsxs("div",{"data-collection-group":Q.stringKey,className:i?.group,children:[z(he)?jsx("div",{id:ke,role:"heading","aria-level":2,className:i?.groupHeading,children:he}):null,Me(Q)]},Q.stringKey)})}),e.length>0&&U?jsx("div",{className:i?.status,children:z(gt)?gt:jsx(br,{kind:"error",title:se.refreshError,actions:u.error?.showRetry!==false&&a?.onRetry?jsx(ve,{size:"sm",label:se.retry,onClick:a.onRetry}):void 0})}):null,e.length>0&&(re||Z)?jsx("div",{ref:R==="rail"?void 0:v,className:i?.loadMore,"data-collection-load-more":"",children:z(zt)?zt:Z?ae==="spinner"?jsx(jo,{title:se.loadingMore,variant:"spinner"}):jsx(Ys,{mode:R,phase:"load-more",columnCount:ye,columnWidth:xe,cardWidth:t.layout.cardWidth??t.layout.idealCardWidth,gap:D,rowHeight:M,config:t.loading?.skeleton,ariaLabel:se.loadingMore,className:i?.layout}):null}):null,z(We)?jsx("div",{className:i?.footer,children:We}):null]})}r(Xo,"WorkbenchCollection");function ox(e){if(typeof e=="number"&&Number.isFinite(e)&&e>0)return `${e}px`;if(typeof e=="string"&&e.trim())return e.trim()}r(ox,"getNormalizedGalleryGridCardWidth");function nx(e){return e==="compact"?2:e==="detailed"?6:4}r(nx,"getDefaultGalleryDetailLimit");function rx(e,t){return e===1||e===2||e===3?Number(e):t==="detailed"?1:2}r(rx,"getNormalizedGalleryBentoColumns");function ax({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:nx(e)}r(ax,"getNormalizedGalleryDetailLimit");function xu(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(xu,"getGalleryCardWidthMetrics");function ix(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(ix,"getNormalizedGalleryGridColumns");function vu(e){if(e==null)return 0;let t=String(e).trim();return t&&t!=="\u2014"?t.length:0}r(vu,"getGalleryTextLength");function Fr({column:e,row:t,getFieldValue:o,getDisplayText:n}){if(!e)return "";let a=o(e,t);if(a==null||a==="")return "";let s=n(a);return s==="\u2014"?"":String(s)}r(Fr,"getGalleryFieldText");function nl({text:e,charsPerLine:t,maxLines:o}){let n=vu(e);return n?Math.max(1,Math.min(o,Math.ceil(n/t))):0}r(nl,"estimateLineCount");function sx({text:e,density:t,bentoColumns:o}){let n=t==="detailed"?54:t==="compact"?44:48,i=nl({text:e,charsPerLine:o===1?t==="detailed"?32:26:t==="detailed"?18:15,maxLines:t==="detailed"?3:2});return i?n+Math.max(0,i-1)*16:n}r(sx,"estimateGalleryDetailCellHeight");function lx({columns:e,density:t,bentoColumns:o}){if(!e.length)return 0;let n=e.map(s=>sx({text:s.text,density:t,bentoColumns:o}));if(o===1)return 12+n.reduce((s,i)=>s+i,0)+Math.max(0,e.length-1)*8;let a=12;for(let s=0;s<n.length;s+=o){let i=n.slice(s,s+o);a+=Math.max(...i),s+o<n.length&&(a+=8);}return a}r(lx,"estimateGalleryDetailGridHeight");function dx({row:e,columns:t,galleryFieldKey:o,galleryDensity:n,galleryBentoColumns:a,galleryDetailVisibility:s,galleryDetailLimit:i,getFieldValue:m,isMediaColumn:c,isTitleCandidate:d,isSummaryCandidate:g,getDisplayText:u,isImageField:p,isAudioField:f,cardVariant:b,renderPreview:h,renderLeadingVisual:y,hiddenDetailFieldKeys:v,layout:k,resolveRecordVisual:x}){let w=t.find(L=>L.renderType==="icon"),C=w&&x?x(e?.[w.key],e,w):null,T=(o!=="auto"?t.find(L=>L.key===o&&c(L,e)):null)||t.find(L=>c(L,e))||null,E=T?m(T,e):null,N=T?p(T,E):false,O=T?f(T,E):false,W=!!y||!!C,F=t.filter(L=>L.key!==T?.key&&L.renderType!=="icon"),I=F.filter(L=>{if(!L||c(L,e)||!d(L,e))return false;let me=m(L,e);return !(me==null||me==="")})[0]||null,G=I?Fr({column:I,row:e,getFieldValue:m,getDisplayText:u}):String(u(e?.linkKey||e?.id||"")),q=F.find(L=>!L||L.key===I?.key||c(L,e)||!g(L,e)?false:Fr({column:L,row:e,getFieldValue:m,getDisplayText:u}).length>12)||F.find(L=>!L||L.key===I?.key||c(L,e)||!g(L,e)?false:vu(Fr({column:L,row:e,getFieldValue:m,getDisplayText:u}))>0)||null,R=q?Fr({column:q,row:e,getFieldValue:m,getDisplayText:u}):"",D=new Set(v),M=F.filter(L=>L.key!==I?.key&&L.key!==q?.key&&!D.has(L.key)).map(L=>({column:L,text:Fr({column:L,row:e,getFieldValue:m,getDisplayText:u})})),$=ax({density:n,visibility:s,limit:i}),J=Number.isFinite($)?M.slice(0,$):M,_=Math.max(M.length-J.length,0),ee=rx(a,n),K=k?.columnWidth||xu(n).ideal;if(b==="image-only")return {width:K,height:Math.round(K*1.25)};if(b==="preview-only")return {width:K,height:Math.round(K*.82)};let Z=n==="detailed"?84:n==="compact"?64:72;typeof h=="function"?Z+=n==="detailed"?188:n==="compact"?140:164:N?Z+=Math.round(K*(n==="detailed"?.72:.62))+12:O&&(Z+=92);let re=nl({text:G,charsPerLine:n==="detailed"?26:24,maxLines:2})||1,ae=nl({text:R,charsPerLine:W?22:n==="detailed"?30:26,maxLines:n==="detailed"?4:2}),le=26+re*18+(ae>0?ae*16+4:0);return Z+=Math.max(W?56:0,le),Z+=lx({columns:J,density:n,bentoColumns:ee}),_>0&&(Z+=18),!R&&J.length===0&&(Z+=24),{width:K,height:Z}}r(dx,"getDefaultGalleryMasonryItemSize");function cx({rows:e=[],children:t,columns:o=[],onRowClick:n,cardInteraction:a="button",selectedLinkKey:s,selectedRowKey:i,selectedRowKeys:m,className:c,isMasonry:d=false,galleryLayoutMode:g="auto",galleryRailCardWidth:u,galleryGap:p,galleryScrollDirection:f,galleryGridColumns:b,galleryGridColumnsResponsive:h,galleryCardWidthMetrics:y,galleryCardAspectRatio:v,galleryCardMinHeight:k,galleryGridCardWidth:x,galleryUnderfilledBehavior:w,galleryMasonryColumnWidth:C,masonryPlacementStrategy:S,pagination:T,onLoadMore:E,scrollOwner:N,windowed:O,galleryFieldKey:V="auto",galleryDensity:W="comfortable",galleryBentoColumns:F=2,galleryDetailVisibility:H="limit",galleryDetailLimit:I,shouldEnhanceMultimodal:G=true,getFieldValue:q,isMediaColumn:R,isTitleCandidate:D,isSummaryCandidate:M,getDisplayText:$,renderFieldValue:J,getImagePreviewSrc:_,isImageField:ee,isAudioField:K,AudioPlayerComponent:Z,cardVariant:re="default",cardPresentation:ae,renderCardSlot:le,renderCoverTitle:L,galleryDetailPresentation:me,renderPreview:B,renderMeta:j,renderLeadingVisual:ne,resolveRecordVisual:fe,hiddenDetailFieldKeys:ye=[],labels:xe,formatLabel:te,getMasonryItemSize:se}){let{min:Re,ideal:Ie,max:ze}=y??xu(W),ce=u||Re,U=ix(b),A=ox(x),X=C||Re,ie=g==="rail",Y=q||Ln,de=$||Lr,we=ee||Ar,Ce=K||zr,Me=R||((We,Le)=>Za(We,Le,{getFieldValue:Y,shouldEnhanceMultimodal:G,isImageField:we,isAudioField:Ce})),Be=D||((We,Le)=>Qa(We,Le,{isMediaColumn:Me})),_e=M||((We,Le)=>ei(We,Le,{isMediaColumn:Me})),Ze=J||((We,Le,{compact:oe}={})=>jsx("span",{children:de(Y(We,Le))})),Fe=r((We,Le)=>jsx(js,{row:We,columns:o,cardInteraction:a,onClick:n?()=>n(We,Le):void 0,isSelected:m?m.has(String(We?.linkKey||We?.id||"")):String(We?.linkKey||We?.id||"")===String(i||s||""),isMasonry:d,galleryFieldKey:V,galleryDensity:W,galleryBentoColumns:F,galleryDetailVisibility:H,galleryDetailLimit:I,galleryDetailPresentation:me,shouldEnhanceMultimodal:G,getFieldValue:Y,isMediaColumn:Me,isTitleCandidate:Be,isSummaryCandidate:_e,getDisplayText:de,renderFieldValue:Ze,getImagePreviewSrc:_,isImageField:we,isAudioField:Ce,AudioPlayerComponent:Z,cardVariant:re,cardPresentation:ae,renderCardSlot:le,renderCoverTitle:L,renderPreview:B,renderMeta:j,renderLeadingVisual:ne,resolveRecordVisual:fe,hiddenDetailFieldKeys:ye,labels:xe,formatLabel:te},We?.id||We?.linkKey||Le),"renderGalleryCard"),tt=d?S==="dense"?"dense":"masonry":ie?"rail":"grid";if(nu(tt,f),t!==void 0){let We=Children.toArray(t);return jsx(Xo,{items:We,callbacks:{onLoadMore:E},slots:{loadMore:T?.loadingMore?jsx(jo,{variant:"spinner",className:"py-global",style:{minHeight:0}}):void 0},classNames:{layout:c},config:{windowed:O,state:T,loading:{autoFill:true},getItemKey:r((Le,oe)=>isValidElement(Le)&&Le.key!=null?Le.key:oe,"getItemKey"),layout:{mode:tt,scrollOwner:N??"parent",gap:p,columns:h??(U?{mobile:1,tablet:Math.min(2,U),desktop:U}:"auto"),underfilledBehavior:w,cardWidth:ie?ce:void 0,minCardWidth:A??Re,idealCardWidth:A??Ie,maxCardWidth:A??ze}},renderItem:Le=>Le})}return jsx(Xo,{items:e,slots:{loadMore:T?.loadingMore?jsx(jo,{variant:"spinner",className:"py-global",style:{minHeight:0}}):void 0},callbacks:{onLoadMore:E,onItemClick:a==="container"&&n?(We,Le)=>n(We,Le.index):void 0},classNames:{layout:c},config:{windowed:O,state:T,loading:{autoFill:true},getItemKey:r((We,Le)=>We?.id||We?.linkKey||Le,"getItemKey"),layout:{mode:tt,underfilledBehavior:w,scrollOwner:N,gap:p,columns:h??(U?{mobile:1,tablet:Math.min(2,U),desktop:U}:"auto"),cardWidth:ie?ce:void 0,minCardWidth:A??Re,idealCardWidth:d?X:A??Ie,maxCardWidth:A??ze,placementStrategy:S??(re==="image-only"?"shortest":"shelf"),getItemAspectRatio:re==="image-only"?We=>{let Le=o.find(ot=>ot.key===V)??o.find(ot=>Me(ot,We)),oe=Le?Y(Le,We):void 0,Se=oe&&typeof oe=="object"&&"aspectRatio"in oe?oe.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:re==="image-only"&&v&&v>0?(We,Le)=>({height:Math.max(k??0,Le.columnWidth/v)}):d?(We,Le)=>{let oe=dx({row:We,columns:o,galleryFieldKey:V,galleryDensity:W,galleryBentoColumns:F,galleryDetailVisibility:H,galleryDetailLimit:I,getFieldValue:Y,isMediaColumn:Me,isTitleCandidate:Be,isSummaryCandidate:_e,getDisplayText:de,isImageField:we,isAudioField:Ce,cardVariant:re,renderPreview:B,renderLeadingVisual:ne,hiddenDetailFieldKeys:ye,layout:Le,resolveRecordVisual:fe});if(typeof se!="function")return oe;let Se=se(We,{...Le,placementStrategy:Le.placementStrategy==="dense"?"dense":"shelf",defaultSize:oe})||{};return {...oe,...Se}}:void 0}},renderItem:(We,Le)=>Fe(We,Le.index)})}r(cx,"WorkbenchGalleryView");function ux({layout:e="horizontal",mediaPosition:t="start",detailsSize:o="balanced",sizing:n="content",asidePosition:a="end",detailsVisible:s=true,heading:i,metadata:m,message:c,actions:d,media:g,toolbar:u,aside:p,secondary:f,children:b,className:h,...y}){let v=s&&(z(i)||z(m)||z(b)||z(c)||z(d)),k=e==="horizontal"&&z(g)&&v,x=n==="fill",w=z(f),C=k&&w,S=z(p)?jsx("div",{"data-record-part":"aside",className:"flex min-h-0 shrink-0 gap-global",children:p}):null;return 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",x&&"h-full",h),children:[z(u)&&jsx("div",{"data-record-part":"toolbar",className:"flex shrink-0 flex-wrap items-center gap-global",children:u}),jsxs("div",{className:l("flex min-h-0 min-w-0 gap-global",x&&"flex-1"),children:[a==="start"&&S,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)]":k&&(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)]"),x&&"overflow-auto @[48rem]:overflow-hidden"),children:[z(g)&&jsx("div",{"data-record-part":"media",className:l("min-h-0 min-w-0",t==="end"&&k&&"@[48rem]:order-2",x&&"flex flex-col"),children:g}),v&&jsxs("div",{"data-record-part":"details",className:l("flex min-h-0 min-w-0 flex-col [&>section]:flex-1",x&&"@[48rem]:overflow-auto"),children:[z(i)&&jsx("div",{className:"mb-global flex flex-wrap items-center gap-global",children:i}),z(m)&&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:m}),b,z(c)&&jsx("div",{className:"mt-global break-words text-sm text-destructive-text",children:c}),z(d)&&jsx("div",{className:"mt-auto flex shrink-0 flex-wrap gap-global pt-global",children:d})]}),w&&jsx("div",{"data-record-part":"secondary",className:l("flex min-h-0 min-w-0 flex-col [&>section]:flex-1",x&&"@[48rem]:overflow-auto"),children:f})]}),a==="end"&&S]})]})}r(ux,"RecordView");var mx=[{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 ku(e,t,o){return typeof e!="number"||!Number.isFinite(e)||e<0?t:Math.min(Math.round(e),o)}r(ku,"normalizeCount");function px(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?1:Math.min(Math.max(e,.5),2)}r(px,"normalizeAspectRatio");function gx({animated:e,filterCount:t}){return jsxs("div",{className:"flex min-h-10 flex-wrap items-center justify-between gap-4",children:[jsxs("div",{className:"space-y-2",children:[jsx(Dt,{variant:"line",animated:e,className:"h-6 w-36 rounded-md"}),jsx(Dt,{variant:"line",animated:e,className:"h-3 w-12"})]}),jsx("div",{className:"flex flex-wrap justify-end gap-2",children:Array.from({length:t},(o,n)=>jsx(Dt,{variant:"block",animated:e,className:"h-9 w-28 rounded-lg"},n))})]})}r(gx,"WorkbenchGallerySkeletonHeading");function bx({sections:e=mx,animated:t=true,animation:o,className:n,...a}){return jsx(Ho,{animation:o,animated:t,children: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((s,i)=>{let m=s.layout??"grid",c=ku(s.filterCount,2,8),d=ku(s.cardCount,m==="rail"?4:5,24),g=s.aspectRatios?.length?s.aspectRatios:[m==="rail"?16/11:1];return jsx(Tn,{index:i,children:jsxs("section",{className:"grid gap-4","data-skeleton-section":s.id,children:[jsx(gx,{animated:t,filterCount:c}),jsx("div",{className:l("grid items-start gap-4",m==="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":m,children:Array.from({length:d},(u,p)=>jsx("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:jsx(Dt,{variant:"block",animated:t,className:"h-auto w-full rounded-none",style:{aspectRatio:String(px(g[p%g.length]))}})},p))})]})},s.id||i)})})})}r(bx,"WorkbenchGallerySkeleton");function fx({animated:e=true,animation:t,className:o,"aria-label":n,...a}){let s=vt().loading.spinner,i=r(m=>jsx(Dt,{variant:"block",animated:e,className:m}),"skeleton");return jsx(Ho,{animation:t,animated:e,children:jsxs("div",{...a,role:"status","aria-busy":"true","aria-label":n??s,"data-monkeys-component":"workbench-page-skeleton",className:l("flex size-full min-h-0 flex-col gap-4 overflow-hidden",o),children:[jsxs("div",{className:"flex h-10 shrink-0 items-center justify-between gap-4 rounded-lg border border-border bg-card px-4",children:[jsxs("div",{className:"flex items-center gap-2",children:[i("h-5 w-20"),i("h-5 w-16"),i("h-5 w-24")]}),jsxs("div",{className:"flex items-center gap-2",children:[i("h-7 w-20"),i("size-7")]})]}),jsxs("div",{className:"grid shrink-0 grid-cols-1 gap-4 md:grid-cols-3",children:[i("h-40 md:col-span-2"),i("h-40")]}),jsxs("div",{className:"grid min-h-0 flex-1 grid-cols-1 gap-4 lg:grid-cols-[minmax(0,2fr)_minmax(14rem,1fr)]",children:[jsxs("div",{className:"flex min-h-0 flex-col gap-4 rounded-lg border border-border bg-card p-4",children:[i("h-6 w-40"),jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:6},(m,c)=>jsx(Tn,{index:c,children:jsxs("div",{className:"space-y-2",children:[i("h-4 w-20"),i("h-9 w-full")]})},c))}),i("min-h-32 flex-1")]}),jsxs("div",{className:"flex min-h-40 flex-col gap-4 rounded-lg border border-border bg-card p-4",children:[i("h-6 w-28"),i("min-h-28 flex-1"),i("h-9 w-full")]})]})]})})}r(fx,"WorkbenchPageSkeleton");function wu(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r(wu,"toCssSize");function Tx(e,t){return String(e?.id??e?.key??t)}r(Tx,"defaultGetRowId");function Rx(e){return String(e?.columnId??e?.status??"")}r(Rx,"defaultGetColumnId");function Nx(e){let t=e?.title??e?.name??e?.id??"Untitled";return 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(Nx,"defaultRenderCard");function Ix({row:e,rowId:t,rowIndex:o,column:n,classNames:a,renderCard:s}){let{attributes:i,listeners:m,setNodeRef:c,isDragging:d}=useDraggable({id:t});return jsx("div",{ref:c,...m,...i,className:l("touch-none",a?.cardWrapper),children:s(e,{row:e,rowIndex:o,column:n,isDragging:d,isOverlay:false})})}r(Ix,"WorkbenchLaneDraggableCard");function Mx({column:e,columnRows:t,columnWidth:o,columnMinHeight:n,emptyColumn:a,classNames:s,renderCard:i}){let{setNodeRef:m,isOver:c}=useDroppable({id:e.id});return jsxs("section",{className:l("flex shrink-0 flex-col rounded-xl border border-border/60 bg-card p-2 shadow-sm",s?.column,e.className),style:{width:wu(o)??"280px"},children:[jsxs("div",{className:l("flex h-10 items-center gap-2 px-1",s?.columnHeader,e.headerClassName),children:[e.icon?jsx("span",{className:l("inline-flex h-4 w-4 items-center justify-center text-muted-foreground",s?.columnIcon,e.iconClassName),children:e.icon}):null,jsx("span",{className:l("inline-flex items-center rounded px-2 py-0.5 text-xs font-semibold bg-muted text-muted-foreground",s?.columnBadge,e.badgeClassName),children:e.label??e.id}),jsx("span",{className:l("text-xs text-muted-foreground",s?.columnCount),children:t.length})]}),jsx("div",{ref:m,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",s?.columnBody,e.bodyClassName),style:{minHeight:wu(n)},children:t.length?t.map(({row:d,rowIndex:g,rowId:u})=>jsx(Ix,{row:d,rowId:u,rowIndex:g,column:e,classNames:s,renderCard:i},u)):a?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",s?.emptyColumn),children:a}):null})]})}r(Mx,"WorkbenchLaneColumnView");function Bx({rows:e=[],columns:t=[],getRowId:o=Tx,getColumnId:n=Rx,renderCard:a,renderOverlayCard:s,onMoveRow:i,onSelectRow:m,emptyColumn:c,activationDistance:d=5,columnWidth:g=280,columnMinHeight:u,className:p,classNames:f,style:b}){let h=a??((V,W)=>m?jsx(ve,{className:"w-full justify-start whitespace-normal text-left",onClick:()=>m({rowId:o(V,W.rowIndex)}),children:String(V?.title??V?.name??o(V,W.rowIndex))}):Nx(V)),[y,v]=useState(null),k=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:d}})),x=useMemo(()=>new Map(t.map(V=>[V.id,V])),[t]),w=useMemo(()=>e.map((V,W)=>({row:V,rowIndex:W,rowId:o(V,W),columnId:n(V,W)})),[n,o,e]),C=y?w.find(V=>V.rowId===y):void 0,S=useMemo(()=>{let V=new Map;return t.forEach(W=>V.set(W.id,[])),w.forEach(({row:W,rowIndex:F,rowId:H,columnId:I})=>{V.get(I)?.push({row:W,rowIndex:F,rowId:H});}),V},[t,w]),T=C?x.get(C.columnId):void 0,E=useCallback(V=>{v(String(V.active.id));},[]),N=useCallback(V=>{v(null);let W=String(V.active.id),F=String(V.over?.id??""),H=w.find(I=>I.rowId===W);!H||!x.has(F)||H.columnId===F||i?.(W,F,H.row);},[x,i,w]),O=useCallback(()=>{v(null);},[]);return jsxs(DndContext,{sensors:k,onDragStart:E,onDragEnd:N,onDragCancel:O,children:[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(V=>jsx(Mx,{column:V,columnRows:S.get(V.id)||[],columnWidth:g,columnMinHeight:u,emptyColumn:c,classNames:f,renderCard:h},V.id))}),jsx(DragOverlay,{children:C&&T?jsx("div",{className:l(f?.overlayWrapper),children:(s||h)(C.row,{row:C.row,rowIndex:C.rowIndex,column:T,isDragging:false,isOverlay:true})}):null})]})}r(Bx,"WorkbenchLaneView");var Cu=r(e=>{if(Number.isFinite(e))return Math.min(1,Math.max(0,Number(e)))},"normalizeProgress");function Px({items:e,summary:t,variant:o="bars",density:n="comfortable",emptyState:a=null,ariaLabel:s="Metrics",className:i,itemClassName:m}){if(!e.length)return z(a)?jsx(Fragment,{children:a}):null;if(o==="radar"&&e.length>=3&&e.length<=12){let c=r((u,p)=>{let f=-Math.PI/2+u*Math.PI*2/e.length;return [180+Math.cos(f)*p,160+Math.sin(f)*p]},"point"),d=e.map((u,p)=>{let f=Cu(u.progress);return f===void 0?void 0:c(p,f*100)}),g=d.every(Boolean);return jsxs("figure",{"aria-label":s,"data-monkeys-component":"workbench-metric-grid","data-metric-variant":"radar",className:l("m-0 min-w-0",i),children:[jsxs("svg",{viewBox:"0 0 360 320",role:"img","aria-label":t?`${s} \xB7 ${t.label} ${t.value}`:s,className:"mx-auto block w-full max-w-sm overflow-visible",children:[[.25,.5,.75,1].map(u=>jsx("polygon",{points:e.map((p,f)=>c(f,u*100).join(",")).join(" "),fill:"none",stroke:"hsl(var(--border))"},u)),e.map((u,p)=>{let f=c(p,100),b=c(p,131);return jsxs("g",{children:[jsx("line",{x1:"180",y1:"160",x2:f[0],y2:f[1],stroke:"hsl(var(--border))"}),typeof u.label=="string"||typeof u.label=="number"?jsx("text",{x:b[0],y:b[1]-7,textAnchor:"middle",dominantBaseline:"middle",fontSize:"12",fill:"hsl(var(--muted-foreground))",children:u.label}):null,typeof u.value=="string"||typeof u.value=="number"?jsx("text",{"data-metric-axis-value":u.id,x:b[0],y:b[1]+10,textAnchor:"middle",dominantBaseline:"middle",fontSize:"13",fontWeight:"600",fill:"hsl(var(--foreground))",children:u.value}):null]},u.id)}),g?jsx("polygon",{"data-metric-radar-series":"complete",points:d.map(u=>u.join(",")).join(" "),fill:"hsl(var(--primary) / .18)",stroke:"hsl(var(--primary))",strokeWidth:"2.5"}):d.map((u,p)=>{let f=d[(p+1)%d.length];return u&&f?jsx("line",{"data-metric-radar-series":"partial",x1:u[0],y1:u[1],x2:f[0],y2:f[1],stroke:"hsl(var(--primary))",strokeWidth:"2.5"},e[p].id):null}),d.map((u,p)=>u?jsx("circle",{cx:u[0],cy:u[1],r:"3",fill:"hsl(var(--primary))"},e[p].id):null),t?jsxs("g",{"data-metric-radar-summary":"true",textAnchor:"middle",paintOrder:"stroke",stroke:"hsl(var(--card))",strokeWidth:"3",strokeLinejoin:"round",children:[jsx("text",{x:"180",y:"149",fontSize:"12",fill:"hsl(var(--muted-foreground))",children:t.label}),jsx("text",{x:"180",y:"174",fontSize:"23",fontWeight:"700",fill:"hsl(var(--foreground))",children:t.value})]}):null]}),jsx("dl",{className:"sr-only",children:e.map(u=>jsxs("div",{className:l("flex min-w-0 justify-between gap-2",m),children:[jsx("dt",{className:"truncate text-muted-foreground",children:u.label}),jsx("dd",{className:"font-semibold tabular-nums",children:u.value})]},u.id))})]})}return o==="list"?jsx("dl",{"aria-label":s,"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",i),children:e.map(c=>jsxs("div",{className:l("flex min-w-0 items-start justify-between gap-4",n==="compact"?"text-xs":"text-sm",m),children:[jsxs("dt",{className:"min-w-0 text-muted-foreground",children:[jsx("span",{className:"block truncate",children:c.label}),z(c.description)?jsx("span",{className:"mt-0.5 block text-xs leading-4 text-muted-foreground/80",children:c.description}):null]}),jsx("dd",{className:"shrink-0 font-semibold tabular-nums text-foreground",children:c.value})]},c.id))}):o==="cards"?jsx("dl",{"aria-label":s,"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",i),children:e.map(c=>jsxs("div",{className:l("min-w-0 rounded-lg border border-border/70 bg-card text-card-foreground",n==="compact"?"p-3":"p-4",m),children:[jsx("dt",{className:"truncate text-xs font-medium text-muted-foreground",children:c.label}),jsx("dd",{className:l("font-semibold tabular-nums text-foreground",n==="compact"?"mt-1.5 text-xl":"mt-2 text-2xl"),children:c.value}),z(c.description)?jsx("div",{className:"mt-2 text-xs leading-5 text-muted-foreground",children:c.description}):null]},c.id))}):jsx("dl",{"aria-label":s,"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",i),children:e.map(c=>{let d=Cu(c.progress);return jsxs("div",{className:l("min-w-0",m),children:[jsx("div",{role:d===void 0?void 0:"meter","aria-label":d===void 0?void 0:String(c.label),"aria-valuemin":d===void 0?void 0:0,"aria-valuemax":d===void 0?void 0:100,"aria-valuenow":d===void 0?void 0:Math.round(d*100),className:l("overflow-hidden rounded-full bg-muted",n==="compact"?"h-1.5":"h-2"),children:d===void 0?null:jsx("span",{className:"block h-full rounded-full bg-primary transition-[width] duration-200 motion-reduce:transition-none",style:{width:`${Math.max(d>0?4:0,d*100)}%`}})}),jsxs("div",{className:"mt-1.5 flex min-w-0 items-baseline justify-between gap-2",children:[jsx("dt",{className:"truncate text-xs text-muted-foreground",children:c.label}),jsx("dd",{className:"shrink-0 text-xs font-semibold tabular-nums text-foreground",children:c.value})]})]},c.id)})})}r(Px,"WorkbenchMetricGrid");var Su=Math.PI*(3-Math.sqrt(5)),Tu=r(e=>Array.from(e).reduce((t,o)=>Math.imul(t^o.charCodeAt(0),16777619)>>>0,2166136261),"hash");function mi(e,t){let o=new Set(e.map(x=>x.id)),n=new Map,a=new Set,s=new Map(e.map(x=>[x.id,new Set])),i=t.filter(x=>o.has(x.sourceId)&&o.has(x.targetId));for(let x of i){let w=n.get(x.sourceId)??[];w.includes(x.targetId)||w.push(x.targetId),n.set(x.sourceId,w),a.add(x.targetId),s.get(x.sourceId).add(x.targetId),s.get(x.targetId).add(x.sourceId);}let c=e.filter(x=>!a.has(x.id))[0]?.id??e[0]?.id,d=new Map,g=c?[c]:[];c&&d.set(c,{depth:0,branch:c,cluster:c});for(let x=0;x<g.length;x++){let w=g[x],C=d.get(w);for(let S of n.get(w)??[])d.has(S)||(d.set(S,{depth:C.depth+1,branch:C.depth===0?S:C.branch,cluster:C.depth<2?S:C.cluster}),g.push(S));}for(let x of e)d.has(x.id)||d.set(x.id,{depth:1,branch:x.id,cluster:x.id});let u=[...new Set([...d.values()].filter(x=>x.depth>0).map(x=>x.branch))],p=new Map;for(let[x,w]of d){if(w.depth<2)continue;let C=p.get(w.cluster)??[];C.push(x),p.set(w.cluster,C);}let f=u.map(x=>Math.sqrt([...d.values()].filter(w=>w.branch===x).length+8)),b=f.reduce((x,w)=>x+w,0)||1,h=-Math.PI/2,y=new Map;u.forEach((x,w)=>{let C=Math.PI*2*f[w]/b,S=h+C/2;y.set(x,{x:Math.cos(S)*12,y:Math.sin(S)*10,z:Math.sin(S*2)*3.2,angle:S}),h+=C;});let v=new Map;for(let x of u){let w=y.get(x),C=[...p.keys()].filter(S=>d.get(S)?.branch===x);C.forEach((S,T)=>{let E=C.length>1?Math.max(3,Math.sqrt(C.length)*1.7):1.5,N=T*Su+w.angle;v.set(S,{x:w.x+Math.cos(N)*E,y:w.y+Math.sin(N)*E,z:w.z+Math.sin(N)*2.5});});}let k=e.map(x=>{let w=d.get(x.id),C=w.depth<2?y.get(w.branch):v.get(w.cluster);if(w.depth===0||!C)return {...x,...w,x:0,y:0,z:0};if(w.depth===1)return {...x,...w,x:C.x*.76,y:C.y*.76,z:C.z};let T=p.get(w.cluster).indexOf(x.id),E=w.depth===2?0:1.5+Math.sqrt(T)*.72,N=T*Su+Tu(w.cluster)%360*Math.PI/180;return {...x,...w,x:C.x+Math.cos(N)*E,y:C.y+Math.sin(N)*E*.85,z:C.z+Math.sin(N*1.37)*Math.min(E,3.5)}});for(let x=0;x<30;x++)for(let w=0;w<k.length;w++)for(let C=w+1;C<k.length;C++){let S=k[w],T=k[C],E=T.x-S.x,N=T.y-S.y,O=Math.hypot(E,N),V=S.depth<3||T.depth<3?1.4:.85;if(O>=V)continue;let W=Tu(S.id+T.id)%360*Math.PI/180,F=O>.001?E/O:Math.cos(W),H=O>.001?N/O:Math.sin(W),I=(V-O)*.25;S.depth>0&&(S.x-=F*I,S.y-=H*I),T.depth>0&&(T.x+=F*I,T.y+=H*I);}if(k.length)for(let x of ["x","y","z"]){let w=(Math.min(...k.map(C=>C[x]))+Math.max(...k.map(C=>C[x])))/2;k.forEach(C=>{C[x]-=w;});}return {points:k,links:i,neighbors:s,root:c}}r(mi,"buildRelationshipGalaxyLayout");function Nu({nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,ariaLabel:a,className:s}){let i=vt(),m=useRef(null),c=useRef(new Map),d=useRef(o),g=useRef(n),[u,p]=useState(false),f=JSON.stringify([e,t]),b=useMemo(()=>mi(e,t),[f]);return d.current=o,g.current=n,useEffect(()=>{let h=m.current;if(!h)return;let y=false,v=r(()=>{},"cleanup");return p(false),Promise.all([import('three'),import('three/examples/jsm/controls/OrbitControls.js')]).then(([k,{OrbitControls:x}])=>{if(y)return;let w=[],C=new k.Scene,S=getComputedStyle(h),T=r((te,se)=>{let Re=document.createElement("span");Re.style.color=`hsl(${S.getPropertyValue(te).trim()||S.getPropertyValue(se).trim()})`,h.append(Re);let Ie=new k.Color(getComputedStyle(Re).color);return Re.remove(),Ie},"tokenColor"),E=T("--radar-canvas","--background");C.background=E;let N=new k.PerspectiveCamera(48,1,.1,250),O=new k.WebGLRenderer({antialias:true,alpha:false});O.setPixelRatio(Math.min(devicePixelRatio,2)),O.domElement.style.cssText="position:absolute;inset:0;width:100%;height:100%;touch-action:none",O.domElement.setAttribute("aria-hidden","true"),h.prepend(O.domElement);let V=new x(N,O.domElement);V.enableDamping=true,V.dampingFactor=.08,V.rotateSpeed=.45,V.minDistance=8,V.maxDistance=130,V.autoRotate=false;let W=new Map(b.points.map(te=>[te.id,new k.Vector3(te.x,te.y,te.z)])),F={primary:T("--radar-series-one","--primary"),secondary:T("--radar-series-two","--success"),accent:T("--radar-series-three","--warning"),muted:T("--radar-series-four","--muted-foreground")},H=128,I=new Uint8Array(H*H*4);for(let te=0;te<H;te++)for(let se=0;se<H;se++){let Re=Math.hypot(se+.5-H/2,te+.5-H/2)/(H/2),Ie=Re<.09?1:Math.exp(-Re*7.5)*.85;I.set([255,255,255,Math.round(Ie*255)],(te*H+se)*4);}let G=new k.DataTexture(I,H,H,k.RGBAFormat);G.minFilter=G.magFilter=k.LinearFilter,G.needsUpdate=true,w.push(G);let q=b.points.map(te=>{let se=new k.SpriteMaterial({map:G,color:F[te.tone??"primary"],transparent:true,blending:k.AdditiveBlending,depthWrite:false}),Re=new k.Sprite(se);return Re.position.copy(W.get(te.id)),C.add(Re),w.push(se),Re}),R=new k.BufferGeometry;R.setAttribute("position",new k.Float32BufferAttribute(b.links.flatMap(te=>[...W.get(te.sourceId).toArray(),...W.get(te.targetId).toArray()]),3));let D=new Float32Array(b.links.length*6);R.setAttribute("color",new k.BufferAttribute(D,3));let M=new k.LineBasicMaterial({vertexColors:true,transparent:true,opacity:.5,depthWrite:false});C.add(new k.LineSegments(R,M)),w.push(R,M);let $=new Map;b.points.filter(te=>te.depth>0).forEach(te=>{let se=$.get(te.cluster)??[];se.push(te),$.set(te.cluster,se);});for(let te of $.values()){if(te.length<3)continue;let se=te.reduce((ze,ce)=>ze.add(W.get(ce.id)),new k.Vector3).multiplyScalar(1/te.length),Re=new k.SpriteMaterial({map:G,color:F[te[0].tone??"primary"],transparent:true,opacity:.13,blending:k.AdditiveBlending,depthWrite:false}),Ie=new k.Sprite(Re);Ie.position.copy(se),Ie.position.z-=1,Ie.scale.setScalar(8+Math.sqrt(te.length)*1.2),C.add(Ie),w.push(Re);}let J=Math.max(8,...b.points.map(te=>Math.abs(te.x)))+3,_=Math.max(6,...b.points.map(te=>Math.abs(te.y)))+3,ee=55,K=false,Z=new ResizeObserver(()=>{let{width:te,height:se}=h.getBoundingClientRect();if(!te||!se)return;N.aspect=te/se;let Re=Math.max(_,J/N.aspect)/Math.tan(k.MathUtils.degToRad(N.fov/2))+7;K?N.position.sub(V.target).multiplyScalar(Re/ee).add(V.target):(N.position.set(0,0,Re),K=true),ee=Re,V.update(),N.updateProjectionMatrix(),O.setSize(te,se,false);});Z.observe(h);let re=new k.Vector3,ae=new k.Vector2,le={x:0,y:0},L,me,B=r(te=>{let se=O.domElement.getBoundingClientRect();ae.set(te.clientX-se.left,te.clientY-se.top);let Re,Ie=12;for(let ze of b.points){if(re.copy(W.get(ze.id)).project(N),re.z<-1||re.z>1)continue;let ce=Math.hypot((re.x+1)*se.width/2-ae.x,(-re.y+1)*se.height/2-ae.y);ce<Ie&&(Ie=ce,Re=ze);}return Re},"nodeAt"),j=r(te=>{le={x:te.clientX,y:te.clientY};},"pointerDown"),ne=r(te=>{L=B(te)?.id,O.domElement.style.cursor=L?"pointer":"grab";},"pointerMove"),fe=r(()=>{L=void 0;},"pointerLeave"),ye=r(te=>{if(Math.hypot(te.clientX-le.x,te.clientY-le.y)>5)return;let se=B(te);se&&g.current?.(se);},"pointerUp");O.domElement.addEventListener("pointerdown",j),O.domElement.addEventListener("pointermove",ne),O.domElement.addEventListener("pointerleave",fe),O.domElement.addEventListener("pointerup",ye);let xe=[...b.points].sort((te,se)=>te.depth-se.depth||(b.neighbors.get(se.id)?.size??0)-(b.neighbors.get(te.id)?.size??0));O.setAnimationLoop(()=>{V.update();let te=d.current,se=te?b.neighbors.get(te):void 0;(me!==te||!R.userData.initialized)&&(me=te,R.userData.initialized=true,b.links.forEach((A,X)=>{let ie=A.sourceId===te||A.targetId===te,Y=b.points.find(we=>we.id===A.targetId),de=F[Y.tone??"primary"].clone().multiplyScalar(te?ie?1.35:.12:.45);D.set([...de.toArray(),...de.toArray()],X*6);}),R.attributes.color.needsUpdate=true),q.forEach((A,X)=>{let ie=b.points[X],Y=te===ie.id;A.scale.setScalar((ie.depth===0?2.2:ie.depth===1?1.8:ie.depth===2?1.2:.82)*(Y?1.5:1)),A.material.opacity=!te||Y||se?.has(ie.id)?1:.25;});let Re=h.clientWidth,Ie=h.clientHeight,ze=ee/N.position.distanceTo(V.target),ce=[],U=[...xe].sort((A,X)=>+(X.id===te||X.id===L)-+(A.id===te||A.id===L));for(let A of U){let X=c.current.get(A.id);if(!X)continue;let ie=A.id===te,Y=A.id===L,de=se?.has(A.id);re.copy(W.get(A.id)).project(N);let we=(re.x+1)*Re/2,Ce=(-re.y+1)*Ie/2+10,Me={x:we-Math.min(A.label.length*13,170)/2,y:Ce,width:Math.min(A.label.length*13,170),height:21},Be=re.z>-1&&re.z<1&&Me.x>4&&Me.x+Me.width<Re-4&&Ce>4&&Ce+21<Ie-4,_e=ie||Y||de||A.depth<=2||ze>1.65,Ze=ce.some(tt=>Me.x<tt.x+tt.width+8&&Me.x+Me.width+8>tt.x&&Me.y<tt.y+tt.height+5&&Me.y+Me.height+5>tt.y),Fe=Be&&_e&&(ie||Y||!Ze)&&(!te||ie||Y||de||A.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[A.tone??"primary"].clone().lerp(F.primary,.45).getHexString(),X.style.opacity=te&&!ie&&!de&&!Y?"0.45":"1",X.style.fontWeight=A.depth<2||ie?"var(--monkeys-semantic-font-weight-semibold, 600)":"var(--monkeys-semantic-font-weight-normal, 400)",X.style.zIndex=ie||Y?"2":"1",Fe&&ce.push(Me);}O.render(C,N);}),v=r(()=>{O.domElement.removeEventListener("pointerdown",j),O.domElement.removeEventListener("pointermove",ne),O.domElement.removeEventListener("pointerleave",fe),O.domElement.removeEventListener("pointerup",ye),Z.disconnect(),O.setAnimationLoop(null),V.dispose(),w.forEach(te=>te.dispose()),O.dispose(),O.domElement.remove();},"cleanup");}).catch(()=>{y||p(true);}),()=>{y=true,v();}},[b]),jsxs("div",{ref:m,className:s,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(h=>jsx("button",{ref:y=>{y?c.current.set(h.id,y):c.current.delete(h.id);},"aria-pressed":o===h.id,className:"font-sans text-xs",title:h.meta,onClick:()=>g.current?.(h),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:h.label},h.id)),u&&jsx("div",{role:"alert",className:"absolute inset-0 grid place-items-center bg-background text-foreground",children:i.workbench.collection.loadError})]})}r(Nu,"RelationshipGalaxy");var Hr={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(Hr))Object.freeze(e);Object.freeze(Hr);var Iu={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]},Mu=new Set(["collisionPasses","ticksPerFrame"]),Bu=r(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"record");function gi(e={}){if(!Bu(e))throw new Error("config must be an object");let t=structuredClone(Hr);for(let[o,n]of Object.entries(e)){if(!Object.prototype.hasOwnProperty.call(t,o))throw new Error(`Unknown config group: ${o}`);if(!Bu(n))throw new Error(`config.${o} must be an object`);let a=t[o];for(let[s,i]of Object.entries(n)){let m=`config.${o}.${s}`;if(!Object.prototype.hasOwnProperty.call(a,s))throw new Error(`Unknown field: ${m}`);if((s==="contextOpacity"||s==="color")&&i===null){a[s]=null;continue}if(s==="dock"){if(typeof i!="string"||!["bottom-left","bottom-right","top-left","top-right"].includes(i))throw new Error(`${m} must be a supported corner`)}else if(s==="color"){if(typeof i!="string"||!/^#[\da-f]{6}$/i.test(i))throw new Error(`${m} must be a #RRGGBB color or null`)}else if(Iu[s]){let[c,d]=Iu[s];if(typeof i!="number"||!Number.isFinite(i)||i<c||i>d||Mu.has(s)&&!Number.isInteger(i))throw new Error(`${m} must be ${Mu.has(s)?"an integer":"a number"} in [${c}, ${d}]`)}else if(typeof i!="boolean")throw new Error(`${m} must be a boolean`);a[s]=i;}}if(t.viewport.minZoom>t.viewport.maxZoom)throw new Error("config.viewport.minZoom must not exceed maxZoom");return t}r(gi,"resolveRelationshipGraphConfig");var ll=r((e,t,o)=>Math.min(o,Math.max(t,e)),"clamp");function Pu(e,t,o={}){let n=gi({physics:o.physics??{}}).physics,a=[...e].sort((u,p)=>u.id.localeCompare(p.id,"en")).map((u,p)=>({...u,x:Number.isFinite(u.x)?u.x:Math.cos(p*2.39996)*100,y:Number.isFinite(u.y)?u.y:Math.sin(p*2.39996)*100,vx:0,vy:0,...o.fixedNodes?.has(u.id)?{fx:o.fixedNodes.get(u.id).x,fy:o.fixedNodes.get(u.id).y}:{}})),s=new Map(a.map(u=>[u.id,u])),i=t.flatMap(u=>{let p=s.get(u.sourceId),f=s.get(u.targetId);if(!p||!f||p===f)return [];let b=Number.isFinite(u.associationStrength)?ll(u.associationStrength,0,1):0;return [{source:p,target:f,strength:b,distance:(p.width+f.width)/2+(n.linkDistance+(1-b)*n.weakLinkDistance)}]}).sort((u,p)=>`${u.source.id}:${u.target.id}`.localeCompare(`${p.source.id}:${p.target.id}`,"en")),m=o.center??{x:3800,y:2800},c=a.length?1:0,d=0;function g(u=1){for(let p=0;p<u&&c>0;p++){for(let f=0;f<a.length;f++)for(let b=f+1;b<a.length;b++){let h=a[f],y=a[b],v=y.x-h.x,k=y.y-h.y;if(Math.abs(v)+Math.abs(k)<.01){let T=(f+b+1)*2.39996;v=Math.cos(T),k=Math.sin(T);}let x=Math.max(1,Math.hypot(v,k)),w=Math.min(8,n.repulsion/Math.max(2500,x*x))*c,C=v/x*w,S=k/x*w;h.vx-=C,h.vy-=S,y.vx+=C,y.vy+=S;}for(let{source:f,target:b,strength:h,distance:y}of i){let v=b.x-f.x,k=b.y-f.y,x=Math.max(1,Math.hypot(v,k)),w=(x-y)*(n.linkStrength+h*n.strongLinkStrength)*c,C=v/x*w,S=k/x*w;f.vx+=C,f.vy+=S,b.vx-=C,b.vy-=S;}d=0;for(let f of a)f.vx=ll((f.vx+(m.x-f.x)*n.centerStrength*c)*n.velocityRetention,-n.maxVelocity,n.maxVelocity),f.vy=ll((f.vy+(m.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 h=b+1;h<a.length;h++){let y=a[b],v=a[h],k=v.x-y.x,x=v.y-y.y,w=(y.width+v.width)/2+n.collisionPadding-Math.abs(k),C=(y.height+v.height)/2+n.collisionPadding-Math.abs(x);if(w<=0||C<=0)continue;let S=y.fx===void 0,T=v.fx===void 0,E=Number(S)+Number(T);if(E)if(w<C){let N=Math.sign(k||1)*w/E;S&&(y.x-=N),T&&(v.x+=N);}else {let N=Math.sign(x||1)*C/E;S&&(y.y-=N),T&&(v.y+=N);}}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:u,x:p,y:f})=>[u,{x:p,y:f}])),"positions"),reheat(){a.length&&(c=Math.max(c,.65));},pin(u,p,f){let b=s.get(u);!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(u){let p=s.get(u);if(!p)return;let f=o.fixedNodes?.get(u);p.fx=f?.x,p.fy=f?.y,c=Math.max(c,.65);}}}r(Pu,"createForceSimulation");var dl=r((e,t)=>{if(!e.length)return {x:0,y:0,width:2,height:2};let o=Math.min(...e.map(i=>i.x-i.width/2))-t,n=Math.max(...e.map(i=>i.x+i.width/2))+t,a=Math.min(...e.map(i=>i.y-i.height/2))-t,s=Math.max(...e.map(i=>i.y+i.height/2))+t;return {x:o,y:a,width:Math.max(2,n-o),height:Math.max(2,s-a)}},"calculateTrendRadarFocusTopologyBounds");var ro={x:0,y:0,width:7600,height:5600};var zx=r((e,t,o)=>Math.min(o,Math.max(t,e)),"clamp");var Eu=r(e=>{let t=Number.isFinite(e)?zx(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"),bi=r((e,t="dark")=>{let o=r((m,c,d)=>`color-mix(in srgb, ${c} ${d}%, ${m})`,"mix"),n=e.role==="context",a=e.role==="focus",s=o("hsl(var(--monkeys-color-background))",e.solidColor,t==="light"?a?16:n?4:10:a?48:40),i=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:s,foreground:i,border:o(s,i,a?82:67)}},"getTrendRadarFocusTopologyNodeTone"),Ox=r((e,t)=>{let o=t.x-e.x,n=t.y-e.y,a=Math.max(Math.hypot(o,n),1),s=Math.min(72,Math.max(18,a*.13)),i=e.id.localeCompare(t.id)>=0?1:-1;return {x:(e.x+t.x)/2+n/a*s*i,y:(e.y+t.y)/2-o/a*s*i}},"getTrendRadarFocusTopologyEdgeControlPoint"),Du=r((e,t)=>{let o=Ox(e,t);return `M ${e.x} ${e.y} Q ${o.x} ${o.y} ${t.x} ${t.y}`},"getTrendRadarFocusTopologyEdgePath");var ov={"align-justify":AlignJustify,grid:Grid3X3,layers:Layers,"map-pin":MapPin,mountain:Mountain,package:Package,paintbrush:Paintbrush,palette:Palette,scissors:Scissors,shield:Shield,"shield-check":ShieldCheck,shirt:Shirt,snowflake:Snowflake,sparkles:Sparkles,user:UserRound,users:UsersRound},nv=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 Lu({model:e,config:t=Hr,onOpenNode:o,renderNodeAction:n,relationshipLabel:a,colorMode:s="dark",onNodePointerDown:i,onNodeKeyDown:m}){let c=r((u,p)=>t.edges.curved?Du(u,p):`M ${u.x} ${u.y} L ${p.x} ${p.y}`,"edgePath"),d=useId().replace(/:/g,""),g=useMemo(()=>new Map(e.nodes.map(u=>[u.id,u])),[e.nodes]);return 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":s,children:[t.edges.visible&&jsxs("svg",{viewBox:`0 0 ${ro.width} ${ro.height}`,className:"absolute inset-0 size-full overflow-visible","aria-hidden":"true",children:[jsx("defs",{children:jsx("filter",{id:d,x:"-40%",y:"-40%",width:"180%",height:"180%",children:jsx("feGaussianBlur",{stdDeviation:"7"})})}),jsx("g",{"data-radar-focus-topology-edge-layer":"context",children:e.edges.filter(u=>u.role!=="focus").map(u=>{let p=g.get(u.sourceId),f=g.get(u.targetId);return !p||!f?null:jsx("path",{d:c(p,f),fill:"none",stroke:t.edges.color??"var(--trend-radar-muted-color)",strokeWidth:Math.max(.8,.72+Math.pow(u.associationStrength,1.08)*2.2)*t.edges.widthScale,strokeOpacity:Math.min(1,(u.role==="related"?.12:.045)*t.edges.opacityScale),strokeLinecap:"round",strokeLinejoin:"round"},u.id)})}),jsx("g",{"data-radar-focus-topology-edge-layer":"focus",children:e.edges.filter(u=>u.role==="focus").map(u=>{let p=g.get(u.sourceId),f=g.get(u.targetId);if(!p||!f)return null;let b=c(p,f),h=t.edges.color??nv(u,p.id===e.subjectId?f:p),y=Eu(u.associationStrength);return jsxs("g",{"data-radar-focus-topology-focus-edge":u.id,"data-radar-focus-topology-association-strength":u.associationStrength.toFixed(4),children:[jsx("path",{d:b,fill:"none",stroke:h,strokeWidth:y.glowWidth*t.edges.widthScale,strokeOpacity:t.edges.glow?Math.min(1,y.glowOpacity*t.edges.opacityScale):0,strokeLinecap:"round",filter:`url(#${d})`}),jsx("path",{d:b,fill:"none",stroke:h,strokeWidth:y.strokeWidth*t.edges.widthScale,strokeOpacity:Math.min(1,y.strokeOpacity*t.edges.opacityScale),strokeLinecap:"round",strokeLinejoin:"round",children:jsx("title",{children:a(u)})})]},u.id)})})]}),e.nodes.map(u=>{let p=ov[u.iconName]??Palette,f=bi(u,s),b=u.role==="focus",h=u.role==="context",y=!!(o&&!b);return jsxs("div",{className:l("absolute transition-[filter,opacity,transform] duration-200",b?"z-20":u.role==="related"?"z-10":"z-0",h&&s==="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:u.x,opacity:h?t.nodes.contextOpacity??(s==="dark"?u.contextOpacity:void 0):void 0,top:u.y,width:u.width,height:u.height,transform:`translate(-50%, -50%) scale(${b?t.nodes.focusScale:1})`,transformOrigin:"center center"},"data-radar-focus-topology-node-anchor":u.ref.id,children:[jsxs("button",{type:"button",disabled:!y&&!i,"aria-label":u.label,title:u.taxonomy?.secondaryLabel?`${u.label} \xB7 ${u.taxonomy.secondaryLabel}`:u.label,onPointerDown:v=>{v.stopPropagation(),i?.(v,u);},onKeyDown:v=>m?.(v,u),onClick:v=>{v.stopPropagation(),y&&o?.(u);},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 ${u.color}66`:u.role==="related"?`inset 0 0 0 1px ${f.border}, 0 0 18px ${u.color}24`:`inset 0 0 0 1px ${f.border}`:`inset 0 0 0 ${b?2:1}px ${f.border}`},"data-radar-focus-topology-node":u.ref.id,"data-world-x":u.x.toFixed(2),"data-world-y":u.y.toFixed(2),"data-radar-focus-topology-node-role":u.role,children:[t.nodes.showIcons&&jsx(p,{className:"shrink-0",size:t.nodes.iconSize,color:f.foreground,strokeWidth:1.8,"aria-hidden":"true"}),t.nodes.showLabels&&jsx("span",{className:"min-w-0 truncate",style:{color:"inherit"},children:u.label})]}),n?.(u)]},u.id)})]})}r(Lu,"TrendRadarFocusTopologySurface");function zu({model:e,config:t,onCameraChange:o,colorMode:n="light",ariaLabel:a,onOpenNode:s,renderNodeAction:i,nodeAction:m,onNodeAction:c,relationshipLabel:d,controls:g,onNodePositionChange:u}){if(m?.maxActive!==void 0&&(!Number.isSafeInteger(m.maxActive)||m.maxActive<1))throw new TypeError("Node action maxActive must be a positive integer.");if(m?.size!==void 0&&(!Number.isFinite(m.size)||m.size<16||m.size>48))throw new TypeError("Node action size must be between 16 and 48.");let p=useMemo(()=>gi(t),[t]),f=useMemo(()=>new Set(m?.activeNodeIds??[]),[m?.activeNodeIds]),b=JSON.stringify(p.physics),h=useMemo(()=>JSON.parse(b),[b]),y=JSON.stringify(p.viewport),v=useMemo(()=>JSON.parse(y),[y]),{interaction:k,ui:x}=p,w=useRef(null),C=useRef(),S=JSON.stringify({nodes:e.nodes.map(({id:B,x:j,y:ne,width:fe,height:ye})=>({id:B,x:j,y:ne,width:fe,height:ye})),edges:e.edges.map(({sourceId:B,targetId:j,associationStrength:ne})=>({sourceId:B,targetId:j,associationStrength:ne}))}),T=useMemo(()=>{let B=JSON.parse(S);return Pu(B.nodes,B.edges,{physics:h})},[S,h]),[E,N]=useState(()=>T.positions()),[O,V]=useState(false),[W,F]=useState({x:0,y:0,z:1}),H=useRef(o);H.current=o,useEffect(()=>{H.current?.(W);},[W]);let I=useRef(W),G=useRef(),q=useRef(false),[R,D]=useState({width:1,height:1}),M=useRef(false),$=useMemo(()=>e.nodes.map(B=>({...B,...E.get(B.id)??{}})),[e.nodes,E]),J=useRef($);J.current=$;let _=useCallback(B=>{I.current=B,F(B);},[]),ee=useCallback(()=>{if(C.current!==void 0)return;if(M.current&&!G.current){T.step(1400),N(T.positions()),V(false);return}V(T.active);let B=r(()=>{T.step(h.ticksPerFrame),N(T.positions()),T.active?C.current=requestAnimationFrame(B):(C.current=void 0,V(false));},"tick");C.current=requestAnimationFrame(B);},[T,h.ticksPerFrame]),K=useCallback(()=>{let B=w.current;if(!B)return;let j=dl(J.current,v.fitPadding),ne=Math.max(v.minZoom,Math.min(v.maxZoom,v.fitMaxZoom,(B.clientWidth-v.screenPadding*2)/j.width,(B.clientHeight-v.screenPadding*2)/j.height));_({x:B.clientWidth/(2*ne)-j.x-j.width/2,y:B.clientHeight/(2*ne)-j.y-j.height/2,z:ne});},[_,v]);useEffect(()=>{M.current=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??false;let B=T.positions();return N(B),J.current=J.current.map(j=>({...j,...B.get(j.id)})),K(),ee(),()=>{C.current!==void 0&&cancelAnimationFrame(C.current),C.current=void 0;let j=G.current;j?.target.hasPointerCapture?.(j.pointerId)&&j.target.releasePointerCapture(j.pointerId),G.current=void 0;}},[T,K,ee]),useEffect(()=>{let B=w.current;if(!B)return;let j=new ResizeObserver(()=>{D({width:B.clientWidth,height:B.clientHeight}),v.fitOnResize&&K();});return j.observe(B),()=>j.disconnect()},[K,v.fitOnResize]);let Z=useCallback((B,j,ne)=>{if(!k.zoom)return;let fe=I.current,ye=Math.max(v.minZoom,Math.min(v.maxZoom,fe.z*Math.exp(-B*v.zoomSensitivity)));_({x:fe.x-j/fe.z+j/ye,y:fe.y-ne/fe.z+ne/ye,z:ye});},[_,v,k.zoom]);useEffect(()=>{let B=w.current;if(!B)return;let j=r(ne=>{if(G.current||!k.zoom)return;ne.preventDefault();let fe=B.getBoundingClientRect();Z(ne.deltaY,ne.clientX-fe.left,ne.clientY-fe.top);},"wheel");return B.addEventListener("wheel",j,{passive:false}),()=>B.removeEventListener("wheel",j)},[Z,k.zoom]);let re=r((B,j)=>{if(B.button!==0||G.current||(j?!k.dragNodes:!k.pan))return;q.current=false;let ne=I.current;G.current={pointerId:B.pointerId,id:j?.id,startX:B.clientX,startY:B.clientY,x:j?.x??ne.x,y:j?.y??ne.y,moved:false,target:B.currentTarget},B.currentTarget.setPointerCapture(B.pointerId),j&&(T.pin(j.id,j.x,j.y),ee());},"begin"),ae=r(B=>{let j=G.current;if(!(!j||j.pointerId!==B.pointerId)){if(G.current=void 0,q.current=j.moved,j.id){let ne=T.positions().get(j.id);T.release(j.id),ee(),j.moved&&ne&&u?.(j.id,ne);}j.target.hasPointerCapture(B.pointerId)&&j.target.releasePointerCapture(B.pointerId);}},"end"),le={...e,nodes:$},L=new Map($.map(B=>[B.id,B])),me=dl([...e.nodes,...$],200);return jsxs("section",{ref:w,className:"relationship-graph bg-background relative size-full overflow-hidden",style:{cursor:k.pan?void 0:"default",touchAction:k.pan||k.dragNodes?"none":"auto"},role:"region","aria-label":a,"data-radar-focus-topology":"true","data-graph-engine":"native-force","data-force-running":O,"data-radar-focus-topology-camera":`${W.x.toFixed(2)},${W.y.toFixed(2)},${W.z.toFixed(3)}`,onPointerDown:B=>{B.target.closest("button")||re(B);},onPointerMove:B=>{let j=G.current;if(!j||j.pointerId!==B.pointerId)return;let ne=B.clientX-j.startX,fe=B.clientY-j.startY;j.moved||(j.moved=Math.hypot(ne,fe)>k.dragThreshold),j.moved&&(j.id?(T.pin(j.id,j.x+ne/I.current.z,j.y+fe/I.current.z),N(T.positions()),ee()):_({...I.current,x:j.x+ne/I.current.z,y:j.y+fe/I.current.z}));},onPointerUp:ae,onPointerCancel:ae,onLostPointerCapture:ae,onClickCapture:B=>{q.current&&(B.preventDefault(),B.stopPropagation(),q.current=false);},children:[jsx("div",{style:{position:"absolute",left:0,top:0,width:ro.width,height:ro.height,transformOrigin:"0 0",transform:`translate(${W.x*W.z}px, ${W.y*W.z}px) scale(${W.z})`},children:jsx(Lu,{model:le,config:p,colorMode:n,relationshipLabel:d,onOpenNode:k.openNodes?s:void 0,renderNodeAction:i??(m&&c?B=>{if(m.nodeKinds&&!m.nodeKinds.includes(B.ref.kind))return null;let j=f.has(B.id),ne=m.disabled||!j&&m.maxActive!==void 0&&f.size>=m.maxActive,fe=`${j?m.activeLabel??m.label:m.label}: ${B.label}`,ye=j?Check:Plus,xe=m.size??24;return jsx("button",{type:"button","data-relationship-node-action":B.id,"aria-label":fe,title:fe,"aria-pressed":j,disabled:ne,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:bi(B,n).foreground,transform:`translate(50%, -50%) scale(${m.keepScreenSize===false?1:1/W.z})`,transformOrigin:"center"},onPointerDown:te=>te.stopPropagation(),onKeyDown:te=>te.stopPropagation(),onClick:te=>{te.stopPropagation(),c(B);},children:jsx(ye,{size:xe*.6,"aria-hidden":"true"})})}:void 0),onNodePointerDown:k.dragNodes?(B,j)=>re(B,j):void 0,onNodeKeyDown:(B,j)=>{if(!k.keyboard||!k.dragNodes)return;let ne={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]}[B.key];if(!ne)return;B.preventDefault(),B.stopPropagation();let fe=(B.shiftKey?k.keyboardFastStep:k.keyboardStep)/I.current.z,ye={x:j.x+ne[0]*fe,y:j.y+ne[1]*fe};T.pin(j.id,ye.x,ye.y),N(T.positions()),T.release(j.id),ee(),u?.(j.id,ye);}})}),(x.controls||x.minimap)&&jsxs("div",{className:"relationship-minimap","data-radar-focus-topology-minimap":"true",style:{width:x.minimapWidth,left:x.dock.endsWith("left")?12:"auto",right:x.dock.endsWith("right")?12:"auto",top:x.dock.startsWith("top")?12:"auto",bottom:x.dock.startsWith("bottom")?12:"auto"},children:[x.controls&&jsxs("div",{className:"relationship-controls",children:[jsx("button",{type:"button","aria-label":g.zoomOut,onClick:()=>Z(v.zoomStep,R.width/2,R.height/2),disabled:!k.zoom||W.z<=v.minZoom,children:jsx(Minus,{size:15})}),jsxs("output",{children:[Math.round(W.z*100),"%"]}),jsx("button",{type:"button","aria-label":g.zoomIn,onClick:()=>Z(-v.zoomStep,R.width/2,R.height/2),disabled:!k.zoom||W.z>=v.maxZoom,children:jsx(Plus,{size:15})}),jsx("button",{type:"button","aria-label":g.zoomToFit,onClick:K,children:jsx(LocateFixed,{size:15})})]}),x.minimap&&jsx("button",{type:"button",className:"relationship-minimap-map",disabled:!k.pan,"aria-label":g.minimap,onClick:B=>{if(B.detail===0){K();return}let j=B.currentTarget.getBoundingClientRect(),ne=(B.clientX-j.left)/j.width*me.width+me.x,fe=(B.clientY-j.top)/j.height*me.height+me.y;_({...W,x:R.width/(2*W.z)-ne,y:R.height/(2*W.z)-fe});},children:jsxs("svg",{viewBox:`${me.x} ${me.y} ${me.width} ${me.height}`,style:{height:x.minimapHeight},preserveAspectRatio:"none","aria-hidden":"true",children:[e.edges.map(B=>{let j=L.get(B.sourceId),ne=L.get(B.targetId);return j&&ne?jsx("line",{x1:j.x,y1:j.y,x2:ne.x,y2:ne.y,stroke:"currentColor",strokeWidth:2,opacity:.2},B.id):null}),$.map(B=>jsx("circle",{cx:B.x,cy:B.y,r:B.role==="focus"?14:8,fill:B.color},B.id)),jsx("rect",{x:-W.x,y:-W.y,width:R.width/W.z,height:R.height/W.z,fill:"currentColor",fillOpacity:.07,stroke:"currentColor",strokeWidth:4})]})})]})]})}r(zu,"RelationshipGraph2D");var sv={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)))"},lv={nodes:{showIcons:false,glow:false,contextOpacity:1},edges:{glow:false,opacityScale:3,widthScale:.5}};function Fu({nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,ariaLabel:a="Relationship graph",className:s,height:i=440}){let m=vt(),c=nn(),d=JSON.stringify([e,t]),g=useMemo(()=>mi(e,t),[d]),u=useMemo(()=>({subjectId:o??"",bounds:ro,focusBounds:ro,nodes:g.points.map(b=>{let h=Math.max(88,Math.min(240,Array.from(b.label).length*14+32)),y=sv[b.tone??"muted"];return {id:b.id,ref:{kind:"node",id:b.id},label:b.label,x:ro.width/2+b.x*70,y:ro.height/2+b.y*70,width:h,height:36,radius:h/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,h)=>({id:b.id??`${b.sourceId}:${b.targetId}:${h}`,sourceId:b.sourceId,targetId:b.targetId,evidenceRefs:[],evidenceCount:0,associationStrength:1,role:b.sourceId===o||b.targetId===o?"focus":"related"}))}),[g,o]),p=useMemo(()=>new Map(e.map(b=>[b.id,b])),[d]),f=useMemo(()=>new Map(g.links.map((b,h)=>[b.id??`${b.sourceId}:${b.targetId}:${h}`,b.label??`${p.get(b.sourceId)?.label} \u2192 ${p.get(b.targetId)?.label}`])),[g,p]);return 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",s),style:{"--relationship-height":`${i}px`},children:jsx(zu,{model:u,config:lv,colorMode:c?.colorMode==="dark"?"dark":"light",ariaLabel:a,controls:m.workbench.relationshipGraph??{zoomOut:"Zoom out",zoomIn:"Zoom in",zoomToFit:"Fit graph",minimap:"Graph overview"},relationshipLabel:b=>f.get(b.id)??"",onOpenNode:n?b=>{let h=p.get(b.id);h&&n(h);}:void 0})})}r(Fu,"RelationshipForce2D");var dv={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"},cv={primary:"--radar-series-one",secondary:"--radar-series-two",accent:"--radar-series-three",muted:"--radar-series-four"},uv={primary:"var(--primary)",secondary:"var(--secondary-foreground)",accent:"var(--accent-foreground)",muted:"var(--muted-foreground)"},vi=r((e,t=1)=>`hsl(var(${cv[e]}, ${uv[e]}) / ${t})`,"radarToneColor"),mv=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:s=440,emptyState:i=null,ariaLabel:m="Relationship graph",className:c,variant:d="default"}){if(!e.length)return z(i)?jsx(Fragment,{children:i}):null;if(d==="galaxy")return jsx(Nu,{nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,ariaLabel:m,className:c});if(d==="force-2d")return jsx(Fu,{nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,ariaLabel:m,className:c,height:s});let g=d==="radar",u=Math.min(a,s)*(g?.37:.35),p=o?e.findIndex(h=>h.id===o):-1,f=p>=0?e.filter((h,y)=>y!==p):e,b=new Map(e.map((h,y)=>{if(e.length===1)return [h.id,{x:a/2,y:s/2}];if(g&&y===p)return [h.id,{x:a/2,y:s/2}];let v=f.findIndex(x=>x.id===h.id),k=Math.PI*2*v/f.length-Math.PI/2;return [h.id,{x:a/2+Math.cos(k)*u,y:s/2+Math.sin(k)*u}]}));return 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:jsxs("svg",{viewBox:`0 0 ${a} ${s}`,className:l(g?"absolute inset-0 size-full":"min-w-[42rem]"),preserveAspectRatio:g?"xMidYMid meet":void 0,role:"img","aria-label":m,children:[t.map((h,y)=>{let v=b.get(h.sourceId),k=b.get(h.targetId);return !v||!k?null:jsx("line",{x1:v.x,y1:v.y,x2:k.x,y2:k.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:jsx("title",{children:h.label||`${h.sourceId} to ${h.targetId}`})},h.id||`${h.sourceId}:${h.targetId}:${y}`)}),e.map(h=>{let y=b.get(h.id),v=h.id===o,k=h.tone||"muted",x=g?{color:vi(k)}:void 0;return jsxs("g",{transform:`translate(${y.x}, ${y.y})`,role:n?"button":void 0,tabIndex:n?0:void 0,"aria-label":h.meta?`${h.label}, ${h.meta}`:h.label,"aria-pressed":n?v:void 0,onClick:n?()=>n(h):void 0,onKeyDown:w=>mv(w,h,n),className:l(g?"outline-hidden":dv[k],n&&"cursor-pointer outline-hidden"),style:x,children:[jsx("circle",{r:g&&v?"50":g?"40":"36",className:l("stroke-1 transition-[stroke-width] duration-150 motion-reduce:transition-none",v&&"stroke-[3]"),style:g?{fill:vi(k,v?.22:.12),stroke:vi(k,v?1:.78),filter:`drop-shadow(0 0 ${v?"1.4rem":"0.75rem"} ${vi(k,.62)})`}:void 0}),jsx("text",{textAnchor:"middle",y:h.meta?-3:4,className:l("pointer-events-none fill-current font-semibold",g?"text-sm":"text-xs"),children:h.label.slice(0,18)}),h.meta?jsx("text",{textAnchor:"middle",y:"16",className:l("pointer-events-none text-xs",g?"fill-current opacity-70":"fill-muted-foreground"),children:h.meta.slice(0,22)}):null]},h.id)})]})})}r(pv,"WorkbenchRelationshipGraph");var bv={primary:"fill-primary stroke-primary",secondary:"fill-secondary stroke-secondary-foreground",accent:"fill-accent stroke-accent-foreground",muted:"fill-muted stroke-muted-foreground"},fv=r(e=>e.filter(Number.isFinite),"finiteValues"),cl=r((e,t,o)=>{let n=fv(e),a=Number.isFinite(t)?Number(t):Math.min(...n,0),s=Number.isFinite(o)?Number(o):Math.max(...n,1);return a===s?[a,s+1]:a<s?[a,s]:[s,a]},"getDomain"),_r=r((e,t,o,n)=>o+(e-t[0])/(t[1]-t[0])*(n-o),"scale"),yn=r((e,t,o)=>Math.min(o,Math.max(t,e)),"clamp"),yv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activatePoint");function hv({points:e,xAxis:t,yAxis:o,thresholds:n,selectedPointId:a,onPointSelect:s,width:i=900,height:m=420,emptyState:c=null,ariaLabel:d=`${t.label} by ${o.label}`,className:g}){let u=e.filter(S=>Number.isFinite(S.x)&&Number.isFinite(S.y));if(!u.length)return z(c)?jsx(Fragment,{children:c}):null;let p=56,f=cl(u.map(S=>S.x),t.min,t.max),b=cl(u.map(S=>S.y),o.min,o.max),h=cl(u.map(S=>S.size??1)),y=p,v=i-p,k=p,x=m-p,w=Number.isFinite(n?.x)?_r(Number(n?.x),f,y,v):void 0,C=Number.isFinite(n?.y)?_r(Number(n?.y),b,x,k):void 0;return 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:jsxs("svg",{viewBox:`0 0 ${i} ${m}`,className:"min-w-[42rem]",role:"img","aria-label":d,children:[jsx("line",{x1:y,y1:x,x2:v,y2:x,className:"stroke-border"}),jsx("line",{x1:y,y1:k,x2:y,y2:x,className:"stroke-border"}),w===void 0?null:jsx("line",{x1:yn(w,y,v),y1:k,x2:yn(w,y,v),y2:x,className:"stroke-muted-foreground/50",strokeDasharray:"5 5"}),C===void 0?null:jsx("line",{x1:y,y1:yn(C,k,x),x2:v,y2:yn(C,k,x),className:"stroke-muted-foreground/50",strokeDasharray:"5 5"}),jsx("text",{x:i/2,y:m-12,textAnchor:"middle",className:"fill-muted-foreground text-xs",children:t.label}),jsx("text",{x:"16",y:m/2,textAnchor:"middle",transform:`rotate(-90 16 ${m/2})`,className:"fill-muted-foreground text-xs",children:o.label}),u.map(S=>{let T=yn(_r(S.x,f,y,v),y,v),E=yn(_r(S.y,b,x,k),k,x),N=S.size===void 0?9:yn(_r(S.size,h,7,18),7,18),O=a===S.id;return jsxs("g",{transform:`translate(${T}, ${E})`,role:s?"button":void 0,tabIndex:s?0:void 0,"aria-label":`${S.label}: ${t.label} ${S.x}, ${o.label} ${S.y}`,"aria-pressed":s?O:void 0,onClick:s?()=>s(S):void 0,onKeyDown:V=>yv(V,S,s),className:l(s&&"cursor-pointer outline-hidden"),children:[jsx("circle",{r:N,className:l("stroke-1 opacity-80 transition-opacity duration-150 motion-reduce:transition-none",bv[S.tone||"primary"],O?"opacity-100 stroke-[3]":"hover:opacity-100")}),jsx("text",{y:-N-7,textAnchor:"middle",className:"pointer-events-none fill-foreground text-[0.6875rem] font-semibold",children:S.label.slice(0,24)}),jsx("title",{children:S.description||S.label})]},S.id)})]})})}r(hv,"WorkbenchScatterPlot");var vv=r((e,t,o)=>{!o||t.disabled||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activateItem");function kv({items:e,onItemSelect:t,ariaLabel:o="Journey",className:n}){return 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:jsx("ol",{className:"flex min-w-max items-stretch gap-1",children:e.map((a,s)=>{let i=a.state||"upcoming";return jsxs("li",{className:"flex items-center",children:[s?jsx("span",{className:"mx-1 h-px w-5 bg-border","aria-hidden":"true"}):null,jsxs("button",{type:"button",disabled:a.disabled,"aria-current":i==="current"?"page":void 0,onClick:t&&!a.disabled?()=>t(a):void 0,onKeyDown:m=>vv(m,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",i==="current"&&"border-primary bg-primary text-primary-foreground",i==="complete"&&"border-primary/30 bg-primary/10 text-foreground",i==="upcoming"&&"border-transparent bg-muted/50 text-muted-foreground",a.disabled&&"cursor-not-allowed opacity-50"),children:[z(a.eyebrow)?jsx("span",{className:l("block text-[0.625rem] font-semibold uppercase tracking-[0.14em]",i==="current"?"text-primary-foreground/75":"text-muted-foreground"),children:a.eyebrow}):null,jsx("span",{className:"mt-0.5 block text-xs font-semibold",children:a.label})]})]},a.id)})})})}r(kv,"WorkbenchJourneyNavigation");var wv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activateItem");function Cv({items:e,selectedItemId:t,onItemSelect:o,emptyState:n=null,ariaLabel:a="Ranked items",className:s}){return e.length?jsx("ol",{"aria-label":a,"data-monkeys-component":"workbench-ranked-list",className:l("grid min-w-0 gap-2",s),children:e.map((i,m)=>{let c=t===i.id;return jsx("li",{children:jsxs("button",{type:"button","aria-pressed":o?c:void 0,onClick:o?()=>o(i):void 0,onKeyDown:d=>wv(d,i,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:[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:i.leading||m+1}),jsxs("span",{className:"min-w-0",children:[jsx("span",{className:"block truncate text-sm font-semibold text-foreground",children:i.label}),z(i.description)?jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:i.description}):null,i.tags?.length?jsx("span",{className:"mt-2 flex flex-wrap gap-1.5",children:i.tags.map((d,g)=>jsx("span",{className:"rounded-full bg-secondary px-2 py-0.5 text-[0.625rem] font-medium text-secondary-foreground",children:d},`${i.id}:tag:${g}`))}):null,i.metrics?.length?jsx("span",{className:"mt-2 grid grid-cols-2 gap-x-4 gap-y-1 sm:grid-cols-4",children:i.metrics.map(d=>jsxs("span",{className:"min-w-0",children:[jsx("span",{className:"block truncate text-[0.625rem] text-muted-foreground",children:d.label}),jsx("span",{className:"block text-xs font-semibold tabular-nums text-foreground",children:d.value})]},d.id))}):null]}),jsxs("span",{className:"shrink-0 text-right",children:[z(i.score)?jsx("span",{className:"block text-lg font-semibold tabular-nums text-primary",children:i.score}):null,z(i.trailing)?jsx("span",{className:"mt-1 block text-muted-foreground",children:i.trailing}):null]})]})},i.id)})}):z(n)?jsx(Fragment,{children:n}):null}r(Cv,"WorkbenchRankedList");function Tv({title:e,description:t,items:o,onRemove:n,removeLabel:a=r(()=>"Remove","removeLabel"),actions:s,emptyState:i=null,className:m}){return jsxs("section",{"data-monkeys-component":"workbench-selection-tray",className:l("rounded-lg border border-border/70 bg-card p-4 text-card-foreground",m),children:[jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[jsxs("div",{className:"min-w-0",children:[jsx("h2",{className:"text-sm font-semibold text-foreground",children:e}),z(t)?jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground",children:t}):null]}),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?jsx("ul",{className:"mt-3 flex flex-wrap gap-2",children:o.map(c=>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:[jsx("span",{className:"min-w-0 truncate font-medium",children:c.label}),z(c.meta)?jsx("span",{className:"shrink-0 text-muted-foreground",children:c.meta}):null,n?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))}):jsx("div",{className:"mt-3 rounded-md border border-dashed border-border px-4 py-5 text-center text-xs text-muted-foreground",children:i}),z(s)?jsx("div",{className:"mt-4 flex flex-wrap justify-end gap-2 border-t border-border pt-4",children:s}):null]})}r(Tv,"WorkbenchSelectionTray");function Ci(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 s=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,3}))?(Z|[+-]\d{2}:\d{2})$/.exec(e);if(!s)return "\u2014";let i=Number(s[1]),m=Number(s[2]),c=Number(s[3]),d=Number(s[4]),g=Number(s[5]),u=Number(s[6]),p=new Date(0);if(p.setUTCFullYear(i,m-1,c),p.getUTCFullYear()!==i||p.getUTCMonth()!==m-1||p.getUTCDate()!==c||d>23||g>59||u>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(Ci,"renderDateTimeValue");function Rv({items:e,emptyState:t=null,ariaLabel:o="Evidence",className:n,translate:a=r(s=>s,"translate")}){let{locale:s}=xt();return e.length?jsx("ol",{"aria-label":o,"data-monkeys-component":"workbench-evidence-list",className:l("grid min-w-0 gap-0",n),children:e.map((i,m)=>jsxs("li",{className:"grid min-w-0 grid-cols-[1.25rem_minmax(0,1fr)_auto] gap-3",children:[jsxs("span",{className:"flex flex-col items-center","aria-hidden":"true",children:[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:i.marker||m+1}),m<e.length-1?jsx("span",{className:"min-h-8 w-px flex-1 bg-border"}):null]}),jsxs("span",{className:"min-w-0 pb-5",children:[jsx("span",{className:"block text-sm font-semibold text-foreground",children:i.titleKey?a(i.titleKey):i.title}),z(i.description)||i.descriptionKey?jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:i.descriptionKey?a(i.descriptionKey):i.description}):null,z(i.source)||i.sourceKey||z(i.timestamp)||i.timestampValue!==void 0?jsxs("span",{className:"mt-1.5 flex flex-wrap gap-x-3 gap-y-1 text-[0.6875rem] text-muted-foreground",children:[z(i.source)||i.sourceKey?jsx("span",{children:i.sourceKey?a(i.sourceKey):i.source}):null,z(i.timestamp)||i.timestampValue!==void 0?jsx("time",{children:i.timestampValue!==void 0?Ci(i.timestampValue,"milliseconds",s):i.timestamp}):null]}):null]}),z(i.action)?jsx("span",{className:"pb-5",children:i.action}):null]},i.id))}):z(t)?jsx(Fragment,{children:t}):null}r(Rv,"WorkbenchEvidenceList");var Mv=forwardRef(r(function({src:t,title:o,className:n,style:a,...s},i){let m=Zt(t,"media"),c=m&&!m.startsWith("blob:")?m:void 0;return jsx("iframe",{...s,ref:i,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 Pv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activateItem");function Ev({items:e,selectedItemId:t,onItemSelect:o,emptyState:n=null,ariaLabel:a="Assets",className:s}){return e.length?jsx("div",{"data-monkeys-component":"workbench-asset-gallery",children:jsx(Xo,{items:e,config:{getItemKey:r(i=>i.id,"getItemKey"),layout:{mode:"grid",columns:"auto",minCardWidth:"12rem",idealCardWidth:"16rem",gap:12},appearance:{hover:"none"}},ariaLabel:a,className:s,renderItem:i=>{let m=t===i.id;return jsxs("button",{type:"button","aria-pressed":o?m:void 0,onClick:o?()=>o(i):void 0,onKeyDown:c=>Pv(c,i,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",m?"border-primary ring-1 ring-primary":"border-border/70 hover:border-primary/40",!o&&"cursor-default"),children:[jsx("span",{className:"block aspect-[4/3] overflow-hidden bg-muted",children:jsx("img",{src:i.url,alt:i.alt,loading:"lazy",className:"size-full object-cover transition-transform duration-200 group-hover:scale-[1.02] motion-reduce:transition-none"})}),jsxs("span",{className:"block p-3",children:[z(i.title)?jsx("span",{className:"block truncate text-sm font-semibold text-foreground",children:i.title}):null,z(i.description)?jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:i.description}):null,i.badges?.length?jsx("span",{className:"mt-2 flex flex-wrap gap-1.5",children:i.badges.map((c,d)=>jsx("span",{className:"rounded-full bg-secondary px-2 py-0.5 text-[0.625rem] text-secondary-foreground",children:c},`${i.id}:badge:${d}`))}):null]})]})}})}):z(n)?jsx(Fragment,{children:n}):null}r(Ev,"WorkbenchAssetGallery");var ju={primary:"--radar-series-one",secondary:"--radar-series-two",accent:"--radar-series-three",muted:"--radar-series-four"},$u={primary:"var(--primary)",secondary:"var(--secondary-foreground)",accent:"var(--accent-foreground)",muted:"var(--muted-foreground)"},hn=r(e=>`hsl(var(${ju[e]}, ${$u[e]}))`,"workbenchVisualizationToneColor"),$r=r((e,t)=>`hsl(var(${ju[e]}, ${$u[e]}) / ${t})`,"workbenchVisualizationToneColorWithAlpha");var Wv={backgroundColor:"hsl(var(--radar-canvas, var(--background)))",color:"hsl(var(--foreground))"},Ku={backgroundColor:"hsl(var(--radar-panel, var(--card)))",borderColor:"hsl(var(--radar-border, var(--border)))"};function Uu({items:e,activeItemId:t,activeChildId:o,onItemSelect:n,onChildSelect:a,footer:s,ariaLabel:i="Radar navigation"}){return jsx(Cr,{kind:"route",routeItems:e.map(m=>({...m,children:m.children?.map(c=>({...c,domProps:{"data-radar-navigation-child-id":c.id}}))})),activeItemId:t,activeChildId:o,onItemSelect:n?m=>n(m):void 0,onChildSelect:a?(m,c)=>a(m,c):void 0,footer:s,ariaLabel:i,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:Ku})}r(Uu,"WorkbenchRadarNavigation");function Lv({navigationItems:e=[],activeNavigationId:t,activeNavigationChildId:o,onNavigationSelect:n,onNavigationChildSelect:a,navigationFooter:s,navigation:i,children:m,inspector:c,inspectorLabel:d="Context controls",className:g,contentClassName:u,minimumHeight:p="calc(100dvh - 1rem)",ariaLabel:f="Radar workspace"}){return 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:{...Wv,minHeight:p},children:[z(i)?i:jsx(Uu,{items:e,activeItemId:t,activeChildId:o,onItemSelect:n,onChildSelect:a,footer:s}),jsx("div",{"data-radar-workspace-region":"content",className:l("relative min-h-[42rem] min-w-0 overflow-hidden rounded-lg border",u),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:m}),z(c)?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:Ku,children:c}):null]})}r(Lv,"WorkbenchRadarWorkspace");function Av({title:e,icon:t,description:o,children:n,className:a}){return jsxs("section",{"data-monkeys-component":"workbench-radar-inspector-section",className:l("border-b border-border/70 p-4 last:border-b-0",a),children:[jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold text-primary",children:[z(t)?jsx("span",{"aria-hidden":"true",children:t}):null,jsx("h2",{children:e})]}),z(o)?jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground",children:o}):null,z(n)?jsx("div",{className:"mt-3",children:n}):null]})}r(Av,"WorkbenchRadarInspectorSection");function zv(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(zv,"assertValidRadarFilterRowProps");function Ov(e){zv(e);let{label:t,value:o,icon:n,selected:a,disabled:s=false,tone:i,onSelect:m,disclosure:c,className:d}=e,g=a??false,u=g?void 0:"monkeys-workbench-radar-filter-row--idle",p=s?"monkeys-workbench-radar-filter-disabled":void 0,f=i??"primary",b=hn(f),h={"--workbench-radar-filter-tone":b,"--tw-ring-color":i?b:"hsl(var(--ring))",...g||i?{backgroundColor:$r(f,g?.14:.08),borderColor:b}:{}},y=jsxs(Fragment,{children:[z(n)?jsx("span",{className:l("flex size-4 shrink-0 items-center justify-center",i?"text-[var(--workbench-radar-filter-tone)]":"text-muted-foreground"),"aria-hidden":"true",children:n}):null,jsx("span",{className:"min-w-0 truncate",children:t}),z(o)?jsx("span",{className:"ml-auto shrink-0 tabular-nums text-muted-foreground",children:o}):null]}),v=c?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 w=c.expanded?c.collapseLabel:c.expandLabel;return jsxs("div",{"data-monkeys-component":"workbench-radar-filter-row",className:l("monkeys-workbench-radar-filter-row monkeys-workbench-radar-filter-row--separate",u,p,d),style:h,children:[jsx("button",{type:"button","aria-pressed":a,disabled:s,onClick:m,className:l("monkeys-workbench-radar-filter-control monkeys-workbench-radar-filter-row__action",p),children:y}),jsx("button",{type:"button","aria-expanded":c.expanded,"aria-controls":c.controls,"aria-label":w,disabled:s,onClick:c.onToggle,className:l("monkeys-workbench-radar-filter-row__disclosure",p),children:v})]})}let k=c?.mode==="integrated"?c:void 0,x=k?k.expanded?k.collapseLabel:k.expandLabel:void 0;return jsxs("button",{type:"button","data-monkeys-component":"workbench-radar-filter-row","aria-label":x,"aria-pressed":k?void 0:a,"aria-expanded":k?.expanded,"aria-controls":k?.controls,disabled:s,onClick:k?.onToggle??m,className:l("monkeys-workbench-radar-filter-control monkeys-workbench-radar-filter-row",u,p,d),style:h,children:[y,k?jsx("span",{className:"ml-auto shrink-0 text-muted-foreground",children:v}):null]})}r(Ov,"WorkbenchRadarFilterRow");function Fv({label:e,value:t,icon:o,selected:n=false,disabled:a=false,onSelect:s,className:i}){let m=!!s||a;return jsxs(m?"button":"div",{type:m?"button":void 0,"aria-pressed":s&&!a?n:void 0,disabled:m?a:void 0,onClick:s,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",i),children:[z(o)?jsx("span",{className:"shrink-0","aria-hidden":"true",children:o}):null,jsx("span",{className:"min-w-0 truncate",children:e}),z(t)?jsx("span",{className:"ml-auto shrink-0 text-muted-foreground",children:t}):null]})}r(Fv,"WorkbenchRadarFilterChip");var Vv=r(e=>e.filter(Number.isFinite),"finiteValues"),ul=r((e,t,o)=>{let n=Vv(e),a=Number.isFinite(t)?Number(t):Math.min(...n,0),s=Number.isFinite(o)?Number(o):Math.max(...n,1);return a===s?[a,s+1]:a<s?[a,s]:[s,a]},"getDomain"),en=r((e,t,o,n)=>o+(e-t[0])/(t[1]-t[0])*(n-o),"scale"),tn=r((e,t,o)=>Math.min(o,Math.max(t,e)),"clamp"),Gv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activatePoint"),_v={"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 jv({points:e,xAxis:t,yAxis:o,thresholds:n,quadrants:a=[],legend:s=[],selectedPointId:i,onPointSelect:m,width:c=1e3,height:d=700,labelLimit:g=18,emptyState:u=null,ariaLabel:p=`${t.label} by ${o.label} radar matrix`,className:f}){let b=e.filter(N=>Number.isFinite(N.x)&&Number.isFinite(N.y));if(!b.length)return z(u)?jsx(Fragment,{children:u}):null;let h=ul(b.map(N=>N.x),t.min,t.max),y=ul(b.map(N=>N.y),o.min,o.max),v=ul(b.map(N=>N.size??1)),k=0,x=c,w=0,C=d,S=tn(en(Number.isFinite(n?.x)?Number(n?.x):(h[0]+h[1])/2,h,k,x),k,x),T=tn(en(Number.isFinite(n?.y)?Number(n?.y):(y[0]+y[1])/2,y,C,w),w,C),E=new Set([...b].sort((N,O)=>(O.size??0)-(N.size??0)).slice(0,g).map(N=>N.id));return 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:[jsxs("svg",{viewBox:`0 0 ${c} ${d}`,preserveAspectRatio:"none",className:"absolute inset-0 size-full",role:"img","aria-label":p,children:[jsxs("g",{"aria-hidden":"true",children:[Array.from({length:13},(N,O)=>{let V=c/12*O,W=d/12*O;return jsxs("g",{children:[jsx("line",{x1:V,y1:0,x2:V,y2:d,style:{stroke:"hsl(var(--radar-grid, var(--border)) / 0.36)"}}),jsx("line",{x1:0,y1:W,x2:c,y2:W,style:{stroke:"hsl(var(--radar-grid, var(--border)) / 0.36)"}})]},O)}),jsx("line",{x1:S,y1:0,x2:S,y2:d,strokeWidth:"1.5",style:{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.64)"}}),jsx("line",{x1:0,y1:T,x2:c,y2:T,strokeWidth:"1.5",style:{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.64)"}})]}),a.map(N=>{let O=_v[N.id];return jsxs("g",{"aria-hidden":"true",children:[jsx("text",{x:O.x,y:O.y+20,textAnchor:O.anchor,className:"fill-muted-foreground text-[0.8125rem] font-semibold",children:N.title}),z(N.description)&&typeof N.description=="string"?jsx("text",{x:O.x,y:O.y+40,textAnchor:O.anchor,className:"fill-muted-foreground text-[0.6875rem]",children:N.description}):null]},N.id)}),b.map((N,O)=>{let V=tn(en(N.x,h,40,c-40),40,c-40),W=tn(en(N.y,y,d-48,54),54,d-48),F=N.tone||(O%2===0?"primary":"accent"),H=i===N.id,I=E.has(N.id),G=I?tn(en(N.size??1,v,5,9),5,9):3.5,q=I?tn(en(N.size??1,v,14,31),14,31):0,R={fill:hn(F),stroke:"hsl(var(--foreground) / 0.74)"},D={fill:hn(F),filter:`drop-shadow(0 0 0.65rem ${$r(F,.72)})`};return jsxs("g",{transform:`translate(${V}, ${W})`,role:m?"button":void 0,tabIndex:m?0:void 0,"aria-label":`${N.label}: ${t.label} ${N.x}, ${o.label} ${N.y}`,"aria-pressed":m?H:void 0,onClick:m?()=>m(N):void 0,onKeyDown:M=>Gv(M,N,m),className:l(m&&"cursor-pointer outline-hidden"),children:[H?jsx("circle",{r:G+10,fill:"none",strokeWidth:"2",style:{stroke:$r(F,.48)}}):null,jsx("circle",{r:G,strokeWidth:"1.25",style:R}),I?jsx("text",{y:-G-8,textAnchor:"middle",fontSize:q,fontWeight:"700",style:D,className:"pointer-events-none",children:N.label.slice(0,22)}):null,jsx("title",{children:N.description||N.label})]},N.id)}),jsx("circle",{cx:S,cy:T,r:"10",style:{fill:"hsl(var(--radar-axis, var(--primary)))"}}),jsx("circle",{cx:S,cy:T,r:"3",className:"fill-primary-foreground"}),jsx("text",{x:c/2,y:d-12,textAnchor:"middle",className:"fill-muted-foreground text-[0.6875rem]",children:t.label}),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})]}),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:[jsxs("div",{className:"flex h-9 items-center justify-between border-b border-border px-3 text-xs font-semibold text-muted-foreground",children:[jsx("span",{children:"\u2212"}),jsx("span",{children:"100%"}),jsx("span",{children:"\uFF0B"})]}),jsxs("svg",{viewBox:`0 0 ${c} ${d}`,className:"h-24 w-full",children:[jsx("rect",{width:c,height:d,style:{fill:"hsl(var(--radar-canvas, var(--background)))"}}),jsx("line",{x1:S,y1:0,x2:S,y2:d,style:{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.7)"},strokeWidth:"6"}),jsx("line",{x1:0,y1:T,x2:c,y2:T,style:{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.7)"},strokeWidth:"6"}),b.map((N,O)=>jsx("circle",{cx:tn(en(N.x,h,40,c-40),40,c-40),cy:tn(en(N.y,y,d-48,54),54,d-48),r:"8",style:{fill:hn(N.tone||(O%2===0?"primary":"accent"))}},N.id)),jsx("rect",{x:c*.22,y:d*.12,width:c*.58,height:d*.62,fill:"none",strokeWidth:"8",style:{stroke:"hsl(var(--primary))"}})]})]}),s.length?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:s.map(N=>{let O=N.tone||"muted";return jsxs("span",{className:"flex items-center gap-2 text-muted-foreground",children:[jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:hn(O)}}),N.label]},N.id)})}):null]})}r(jv,"WorkbenchRadarMatrix");var Yu=2048,pl=2*1024*1024,gl=class gl extends Error{constructor(o,n,a){super(o);this.code=o;this.expectedSequence=n;this.receivedSequence=a;this.name="RuntimeTerminalOutputError";}};r(gl,"RuntimeTerminalOutputError");var Kr=gl;function Xu(e,t){let o=r((u,p)=>{throw new Kr(u,e.highWater+1,p)},"fail");if(!Array.isArray(t))return o("invalid-frame");if(t.length>Yu)return o("output-budget-exceeded");let n=new Map(e.frames.map(u=>[u.sequence,u])),a=[],s=e.highWater,i,m=0;for(let u of t){if(!u||!Number.isSafeInteger(u.sequence)||u.sequence<1||typeof u.data!="string")return o("invalid-frame");if(i!==void 0&&u.sequence===i)return o("duplicate-sequence",u.sequence);if(i!==void 0&&u.sequence!==i+1)return o("sequence-gap",u.sequence);if(i=u.sequence,u.data.length>pl)return o("output-budget-exceeded",u.sequence);let p=new TextEncoder().encode(u.data).byteLength;if(m+=p,m>pl)return o("output-budget-exceeded",u.sequence);if(u.sequence<=s){let f=n.get(u.sequence);if(!f)return o("history-expired",u.sequence);if(f.data!==u.data)return o("sequence-conflict",u.sequence)}else {if(u.sequence!==s+1)return o("sequence-gap",u.sequence);s=u.sequence,a.push({sequence:u.sequence,data:u.data,bytes:p});}}let c=[...e.frames,...a],d=e.bytes+a.reduce((u,p)=>u+p.bytes,0),g=0;for(;c.length-g>Yu||d>pl;)d-=c[g++].bytes;return {history:{highWater:s,bytes:d,frames:c.slice(g)},append:a.map(({sequence:u,data:p})=>({sequence:u,data:p}))}}r(Xu,"prepareRuntimeTerminalOutput");function Kv(e){let t=useRef(null),o=useRef(e);o.current=e;let n=useRef();return useEffect(()=>{let a=e.sessionKey,s=t.current;if(!s||!a)return;let i=true,m,c,d=[],g=false,u=r(()=>{g||(g=true,c?.disconnect(),d.forEach(h=>h.dispose()),m?.dispose());},"cleanup"),p={highWater:0,bytes:0,frames:[]},f=r(()=>i&&o.current.sessionKey===a,"current"),b=r(h=>{if(!f())return;let y=h instanceof Kr?h:new Kr("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:h},{FitAddon:y},{WebLinksAddon:v}])=>{if(!f())return;let k=r((T,E)=>{let N=Zt(E,"link");f()&&N&&/^https?:\/\//i.test(N)&&window.open(N,"_blank","noopener,noreferrer");},"openLink"),x=new h({linkHandler:{activate:k},cursorBlink:true,disableStdin:o.current.disabled===true,fontSize:13,fontFamily:'"JetBrains Mono", Menlo, Monaco, "Courier New", monospace'});m=x;let w=new y;x.loadAddon(w),x.loadAddon(new v(k)),x.open(s);let C=r(()=>{if(!f())return;w.fit();let T=w.proposeDimensions();T&&Number.isInteger(T.cols)&&Number.isInteger(T.rows)&&T.cols>0&&T.rows>0&&o.current.onResize?.({sessionKey:a,columns:T.cols,rows:T.rows});},"resize");d.push(x.onData(T=>{f()&&!o.current.disabled&&o.current.onInput?.({sessionKey:a,data:T});}));let S=r(T=>{if(f())try{let E=Xu(p,T);E.append.length&&x.write(E.append.map(N=>N.data).join("")),p=E.history;}catch(E){b(E);}},"write");n.current={sessionKey:a,terminal:x,write:S},C(),typeof ResizeObserver<"u"&&(c=new ResizeObserver(C),c.observe(s)),S(o.current.output);}).catch(h=>{u(),m&&n.current?.terminal===m&&(n.current=void 0),b(h);}),()=>{i=false,u(),m&&n.current?.terminal===m&&(n.current=void 0);}},[e.sessionKey]),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]),jsxs("div",{className:e.className,style:e.style,children:[jsx("div",{role:"status",children:e.statusLabel}),jsx("div",{ref:t,className:"h-full min-h-48 w-full rounded-2xl"})]})}r(Kv,"RuntimeTerminalView");var qv={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 Zu(e){let{locale:t}=xt();return (o,n)=>{let a=`monkeys.design.runtimeFiles.${o}`,s=e?.(a);return (s&&s!==a?s:qv[o][t.toLowerCase().startsWith("zh")?"zh":"en"]).replace(/\{([A-Za-z]+)\}/g,(m,c)=>n?.[c]??m)}}r(Zu,"useRuntimeFileCopy");var qr=r(e=>new TextEncoder().encode(e).byteLength,"bytes"),Ti=r(e=>({...e,value:e.content}),"fromFile");function tk(e){return jsx(ok,{...e},JSON.stringify([e.model.scopeId]))}r(tk,"RuntimeFileExplorer");function ok(e){let{model:t,onIntent:o,renderEditor:n,renderPreview:a,renderDiff:s,onDraftStateChange:i,translate:m}=e,{locale:c}=xt(),d=Zu(m);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=useRef(true);useEffect(()=>(g.current=true,()=>{g.current=false;}),[]);let[u,p]=useState(false),[f,b]=useState(t.search??""),[h,y]=useState(false);useEffect(()=>b(t.search??""),[t.search]),useEffect(()=>{if(typeof window.matchMedia!="function")return;let A=window.matchMedia("(max-width: 767px)"),X=r(()=>p(A.matches),"update");return X(),A.addEventListener("change",X),()=>A.removeEventListener("change",X)},[]);let[v,k]=useState(()=>t.openFile?Ti(t.openFile):null),[x,w]=useState(null),[C,S]=useState(false),[T,E]=useState(""),[N,O]=useState(null),[V,W]=useState(""),[F,H]=useState("file"),I=useRef(null),G=useRef(null),q=v!==null&&v.value!==v.content,R=Number.isSafeInteger(t.maxTextBytes)&&t.maxTextBytes>0?Math.min(t.maxTextBytes,1024*1024):1024*1024,D=v!==null&&qr(v.value)>R,M=t.disabled===true||t.saving===true,$=v?.readOnly===true||t.openFile?.path===v?.path&&t.openFile?.readOnly===true,J=useRef({blocked:M,draft:v,readOnly:$,conflict:C,tooLarge:D});J.current={blocked:M,draft:v,readOnly:$,conflict:C,tooLarge:D};let _=t.preview?.path,ee=t.activeView==="diff",K=t.diff?.path??v?.path??t.selectedPath??"";useEffect(()=>{if(ee||t.preview){let ie=ee?`diff:${K}`:_;if(q&&G.current!==ie){S(true);return}v&&k(null),I.current=null,G.current=null,S(false);return}let A=t.openFile;if(!A){q?S(true):(k(null),S(false));return}if(!v||A.path!==v.path){if(q&&G.current!==A.path){S(true);return}G.current=null,I.current=null,k(Ti(A)),S(false);return}if(A.revision===v.revision&&A.content===v.content)return;let X=I.current;if(X&&X.path===A.path&&A.revision!==X.revision&&A.content===X.content){k({...A,value:v.value}),I.current=null,S(false);return}if(q){S(true);return}k(Ti(A)),S(false);},[t.openFile?.path,t.openFile?.revision,t.openFile?.content,t.preview,ee,t.diff?.identity]),useEffect(()=>{if(!q)return;let A=r(X=>{X.preventDefault(),X.returnValue="";},"beforeUnload");return window.addEventListener("beforeunload",A),()=>window.removeEventListener("beforeunload",A)},[q]);let Z=useRef(i);Z.current=i,useEffect(()=>{Z.current?.({path:v?.path??null,revision:v?.revision??null,dirty:q});},[v?.path,v?.revision,q]);let re=r(A=>{if(g.current){switch(A.type){case "select":if(e.onSelect)return e.onSelect(A);break;case "expand":if(e.onExpand)return e.onExpand(A);break;case "view-mode":if(e.onViewMode)return e.onViewMode(A);break;case "search":if(e.onSearch)return e.onSearch(A);break;case "edit":if(e.onEdit)return e.onEdit(A);break;case "save":if(e.onSave)return e.onSave(A);break;case "create":if(e.onCreate)return e.onCreate(A);break;case "rename":if(e.onRename)return e.onRename(A);break;case "delete":if(e.onDelete)return e.onDelete(A);break;case "download":if(e.onDownload)return e.onDownload(A);break;case "open-diff":if(e.onOpenDiff)return e.onOpenDiff(A);break;case "refresh":if(e.onRefresh)return e.onRefresh(A);break;case "sourcecontrol":if(e.onSourceControl)return e.onSourceControl(A);break}o?.(A);}},"route"),ae=r(A=>{if(!(M||!g.current)){if(A.type==="delete"||q&&(A.type==="sourcecontrol"||A.type==="open-diff"||A.type==="select"&&A.path!==v?.path)){w(A);return}re(A);}},"send"),le=r(A=>{!g.current||J.current.draft!==v||!v||M||J.current.blocked||J.current.readOnly||J.current.conflict||$||C||qr(A)>R||(k({...v,value:A}),re({type:"edit",path:v.path,expectedRevision:v.revision,content:A}));},"change"),L=r(()=>{!g.current||J.current.draft!==v||!v||M||J.current.blocked||J.current.readOnly||J.current.conflict||J.current.tooLarge||$||C||D||!q||(I.current={path:v.path,revision:v.revision,content:v.value},re({type:"save",path:v.path,expectedRevision:v.revision,content:v.value}));},"save"),me=t.viewMode==="detailed"&&u?"compact":t.viewMode??"simple",B=new Set(t.expandedPaths??(()=>{let A=[],X=r(ie=>{for(let Y of ie)Y.expanded&&A.push(Y.path),Y.children&&X(Y.children);},"visit");return X(t.nodes),A})()),j=(t.search??"").trim().toLocaleLowerCase(c),ne=r(A=>A.flatMap(X=>{let ie=X.children?ne(X.children):void 0;return !j||X.name.toLocaleLowerCase(c).includes(j)||X.path.toLocaleLowerCase(c).includes(j)||ie?.length?[{...X,children:ie}]:[]}),"filterTree"),fe=ne(t.nodes),ye=r(A=>{let X=new Set(B);if(X.has(A.path)?X.delete(A.path):X.add(A.path),X.size>1e4||qr(JSON.stringify([...X]))>1024*1024){y(true);return}y(false),ae({type:"expand",path:A.path,expandedPaths:[...X]});},"toggle"),xe=r(A=>jsxs(Fragment,{children:[jsx("span",{children:Number.isSafeInteger(A.size)&&A.size>=0?new Intl.NumberFormat(c).format(A.size):"\u2014"}),jsx("span",{children:A.modified?Ci(A.modified,"milliseconds",c):"\u2014"}),jsx("span",{children:A.permissionsRwx??"\u2014"}),jsx("span",{children:A.mimeType??"\u2014"})]}),"metadata"),te=r(A=>jsx("ul",{className:"space-y-1",children:A.map(X=>jsxs("li",{children:[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:[jsxs(ve,{className:"min-w-0 flex-1 justify-start truncate border-transparent",classNames:{label:"min-w-0 truncate"},icon:X.type==="directory"?B.has(X.path)?jsx(ChevronDown,{size:14}):jsx(ChevronRight,{size:14}):jsx(FileText,{size:14}),tone:t.selectedPath===X.path?"primary":"muted",size:"sm",type:"button",disabled:M||X.loading,"aria-current":t.selectedPath===X.path?"true":void 0,"aria-expanded":X.type==="directory"?B.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"?jsx("span",{className:"text-xs text-muted-foreground",children:X.mimeType??""}):null,jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[jsx(ve,{size:"sm",tone:"muted","aria-label":d("renameItem",{name:X.name}),disabled:M||q,onClick:()=>{W(X.path),E(X.path),O("rename");},children:jsx(Pencil,{size:12})}),jsx(ve,{size:"sm",tone:"muted","aria-label":d("downloadItem",{name:X.name}),disabled:M,onClick:()=>ae({type:"download",path:X.path,kind:X.type}),children:jsx(Download,{size:12})}),jsx(ve,{size:"sm",tone:"muted","aria-label":d("deleteItem",{name:X.name}),disabled:M||$,onClick:()=>ae({type:"delete",path:X.path,kind:X.type}),children:jsx(Trash2,{size:12})})]})]}),(B.has(X.path)||j)&&X.children?jsx("div",{className:"ml-3 border-l border-border pl-2",children:te(X.children)}):null]},X.path))}),"tree"),se=v?.path??t.preview?.path??t.openFile?.path,Re=ee&&!v,Ie=!v&&!Re?t.preview:null,ze=t.diff,ce=ze?qr(ze.original)>1024*1024||qr(ze.modified)>1024*1024:false,U=r(()=>Re?t.diffStatus==="loading"?jsx("p",{role:"status",children:d("loadingDiff")}):t.diffStatus==="error"?jsx("p",{role:"alert",children:d(t.diffErrorCode==="declarative.runtimeFiles.diffTooLarge"?"diffTooLarge":"diffUnavailable")}):ce?jsx("p",{role:"status",children:d("diffTooLarge")}):!ze||ze.isBinary||!s?jsx("p",{role:"status",children:d("diffUnavailable")}):s({...ze,readOnly:true}):Ie?Ie.kind==="binary"?jsx("p",{role:"status",children:d("binaryUnavailable")}):Ie.kind==="too-large"?jsx("p",{role:"status",children:d("tooLarge")}):Ie.kind==="image"?a?a(Ie):jsx(Od,{kind:"image",src:Ie.src,alt:Ie.alt??Ie.path,empty:d("imageUnavailable"),error:d("imageUnavailable")}):null:D?jsx("div",{role:"status",children:d("tooLarge")}):v?n?n({path:v.path,value:v.value,language:v.language,readOnly:M||$||C,onChange:le,onSave:L}):jsx(yr,{"aria-label":v.path,value:v.value,readOnly:M||$||C,onChange:A=>le(A.currentTarget.value),onKeyDown:A=>{(A.ctrlKey||A.metaKey)&&A.key.toLowerCase()==="s"&&(A.preventDefault(),L());}}):jsx("div",{className:"flex min-h-64 items-center justify-center p-6 text-sm text-muted-foreground",children:d("empty")}),"renderContent");return 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:[jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b border-border p-3",children:[t.viewMode!==void 0?jsxs(uo,{"aria-label":d("viewMode"),value:t.viewMode,disabled:M,onChange:A=>{let X=A.currentTarget.value;(X==="simple"||X==="compact"||X==="detailed")&&ae({type:"view-mode",value:X});},children:[jsx("option",{value:"simple",children:d("simple")}),jsx("option",{value:"compact",children:d("compact")}),jsx("option",{value:"detailed",children:d("detailed")})]}):null,t.search!==void 0?jsxs("form",{className:"flex min-w-0 flex-1 items-center gap-2",onSubmit:A=>{A.preventDefault(),ae({type:"search",value:f});},children:[jsx(Qt,{className:"min-w-0 flex-1","aria-label":d("searchFiles"),value:f,disabled:M,onChange:A=>b(A.currentTarget.value)}),jsx(ve,{type:"submit",disabled:M,children:d("search")})]}):null]}),h?jsx("p",{className:"p-3 text-sm text-destructive-text",role:"alert",children:d("tooManyExpanded")}):null,t.errorCode?jsx("p",{className:"p-3 text-sm text-destructive-text",role:"alert",children:d("operationFailed")}):null,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:[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"?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(A=>jsx("span",{children:d(A)},A))}):null,fe.length?te(fe):jsx("p",{className:"p-3 text-sm text-muted-foreground",children:d("emptyTree")})]}),jsxs("div",{className:"flex min-h-0 min-w-0 flex-col",children:[jsxs("div",{className:"flex flex-wrap items-center gap-1 border-b border-border p-2",role:"toolbar","aria-label":d("actions"),children:[jsx(ve,{disabled:M,onClick:()=>ae({type:"refresh"}),children:d("refresh")}),jsx(ve,{disabled:M,onClick:()=>ae({type:"sourcecontrol"}),children:d("sourceControl")}),jsx(ve,{disabled:M,onClick:()=>{O("create"),E("");},children:d("create")}),jsx(ve,{disabled:M||!v||$||q,onClick:()=>{W(v?.path??""),O("rename"),E(v?.path??"");},children:d("rename")}),jsx(ve,{disabled:M||!v||$,onClick:()=>v&&ae({type:"delete",path:v.path,kind:"file"}),children:d("delete")}),jsx(ve,{disabled:M||!se,onClick:()=>se&&ae({type:"download",path:se,kind:"file"}),children:d("download")}),jsx(ve,{disabled:M||!se,onClick:()=>se&&ae({type:"open-diff",path:se}),children:d("diff")}),jsx(ve,{disabled:M||!q||!v||$||C||D,onClick:L,children:d("save")})]}),N?jsxs("form",{className:"flex flex-wrap items-center gap-2 border-b border-border p-3",onSubmit:async A=>{if(A.preventDefault(),!(M||!T.trim()||N==="rename"&&($||q)))try{N==="rename"?await re({type:"rename",path:V,newPath:T.trim()}):await re({type:"create",path:T.trim(),kind:F}),O(null);}catch{}},children:[N==="create"?jsxs(uo,{"aria-label":d("kind"),value:F,disabled:M,onChange:A=>H(A.currentTarget.value==="directory"?"directory":"file"),children:[jsx("option",{value:"file",children:d("file")}),jsx("option",{value:"directory",children:d("directory")})]}):null,jsx(Qt,{"aria-label":d("path"),value:T,disabled:M,onChange:A=>E(A.currentTarget.value)}),jsx(ve,{type:"submit",disabled:M||!T.trim(),children:d("apply")}),jsx(ve,{type:"button",onClick:()=>O(null),children:d("cancel")})]}):null,C?jsxs("div",{role:"alert",children:[d("changedExternally"),jsx(ve,{disabled:M,onClick:()=>w(ee?{type:"open-diff",path:K}:{type:"select",path:t.preview?.path??t.openFile?.path??v?.path??""}),children:d("discardReload")})]}):null,jsx("div",{className:"min-h-80 min-w-0 flex-1 overflow-auto",children:U()})]})]}),x?jsx(ba,{open:true,onOpenChange:A=>{!A&&!M&&w(null);},children:jsxs(ln,{onEscapeKeyDown:A=>{M&&A.preventDefault();},onPointerDownOutside:A=>{M&&A.preventDefault();},children:[jsx(ir,{children:d("confirmAction")}),t.errorCode?jsx("p",{role:"alert",children:d("operationFailed")}):null,jsx(sr,{children:d(x.type==="delete"?"deleteConfirm":"discardConfirm")}),jsx(ve,{disabled:M||x.type==="delete"&&$,onClick:async()=>{if(!(M||x.type==="delete"&&$)){x.type==="open-diff"&&(G.current=`diff:${x.path}`,ee&&x.path===K&&(k(null),S(false),G.current=null)),x.type==="select"&&(G.current=x.path,t.preview?.path===x.path?(k(null),S(false),G.current=null):t.openFile?.path===x.path&&(k(Ti(t.openFile)),S(false),G.current=null));try{await re(x),w(null);}catch{}}},children:d("confirm")}),jsx(ve,{disabled:M,onClick:()=>w(null),children:d("cancel")})]})}):null]})}r(ok,"RuntimeFileExplorerSession");var P=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"})})}),Ri=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.",[P.ontologyManagement.markerDescription]:"Configure the ontology marker and default views.",[P.ontologyManagement.label]:"Marker name",[P.ontologyManagement.targetOntology]:"Target ontology",[P.ontologyManagement.templateKey]:"Template key",[P.ontologyManagement.templateName]:"View name",[P.ontologyManagement.templateDescription]:"View description",[P.ontologyManagement.templateTags]:"Tag filters",[P.ontologyManagement.templateTagsDescription]:"Choose the tags included, matched, or excluded by this view.",[P.ontologyManagement.creatorCurrentUser]:"Only show records created by the current user",[P.ontologyManagement.creatorCurrentUserShort]:"Current user",[P.ontologyManagement.defaultViewTemplatesDescription]:"Configure default views and their filters for this ontology.",[P.ontologyManagement.defaultViewTemplate]:"Default view template",[P.ontologyManagement.defaultSelectedView]:"Open by default",[P.ontologyManagement.tagFilterEnabled]:"Tag filters configured",[P.ontologyManagement.tagFilterEmpty]:"No tag filters",[P.ontologyManagement.tableColumnsSummary]:"{count} table columns configured",[P.ontologyManagement.editTemplateDetails]:"Edit view template",[P.ontologyManagement.editTemplateDetailsDescription]:"Configure the name, order, and filters.",[P.ontologyManagement.defaultViewTemplates]:"Default view templates",[P.ontologyManagement.markerExists]:"Ontology marker exists",[P.ontologyManagement.filterInclude]:"Include all",[P.ontologyManagement.filterAny]:"Match any",[P.ontologyManagement.filterExclude]:"Exclude",[P.ontologyManagement.filterNoTags]:"No matching tags",[P.ontologyManagement.filterSearch]:"Search tags",[P.ontologyManagement.filterTagGroup]:"Tag group",[P.ontologyManagement.filterAllGroups]:"All tag groups",[P.ontologyManagement.filterAddOrGroup]:"Add OR group",[P.ontologyManagement.filterNoOrGroups]:"No OR groups",[P.ontologyManagement.filterOrGroup]:"OR group {n}",[P.ontologyManagement.filterDeleteGroup]:"Delete group",[P.ontologyManagement.filterSupplement]:"Supplement rules for {name}",[P.ontologyManagement.filterConfigureSupplement]:"Configure supplement rules",[P.ontologyManagement.filterClearSupplement]:"Clear supplement rules",[P.ontologyManagement.filterSupplementMode]:"Match mode",[P.ontologyManagement.filterModeOr]:"Any condition (OR)",[P.ontologyManagement.filterModeAnd]:"All conditions (AND)",[P.ontologyManagement.filterModeCombination]:"Combined conditions",[P.ontologyManagement.filterRequiredAll]:"Require all tags",[P.ontologyManagement.filterRequiredAny]:"Require at least one tag",[P.ontologyManagement.filterAdvancedRules]:"{count} advanced rules",[P.ontologyManagement.filterAdvancedRulesDescription]:"Existing rules are preserved unless explicitly removed.",[P.ontologyManagement.filterRemoveAdvancedRules]:"Remove advanced rules",[P.ontologyManagement.deleteTemplate]:"Delete template",[P.ontologyManagement.deleteMarker]:"Delete marker",[P.ontologyManagement.createDefaultViews]:"Create default views",[P.ontologyManagement.addTemplate]:"Add view template",[P.ontologyManagement.noTemplates]:"No default view templates",[P.ontologyManagement.actions["ontology-marker"]]:"Set ontology marker",[P.ontologyManagement.actions["view-detail"]]:"View details",[P.ontologyManagement.actions["view-convert-to-container"]]:"Convert to enhanced view",[P.ontologyManagement.actions["view-edit-team"]]:"Edit view team",[P.ontologyManagement.actions["view-insert-blank-rows"]]:"Insert blank rows",[P.ontologyManagement.actions["view-snapshot"]]:"Import to new Ontology",[P.ontologyManagement.targetTeamId]:"Target team ID",[P.ontologyManagement.currentTeamId]:"Current team ID",[P.ontologyManagement.count]:"Row count",[P.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",[P.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.",[P.numericSeries.noPoints]:"No observations in this range",[P.numericSeries.point]:"{xLabel} {x}, {yLabel} {y}",[P.numericSeries.label]:"Numeric series",[P.numericSeries.description]:"Inspect numeric observations with range zoom and expansion.",[P.numericSeries.start]:"Range start",[P.numericSeries.end]:"Range end",[P.numericSeries.reset]:"Reset range",[P.numericSeries.expand]:"Expand chart",[P.numericSeries.close]:"Close chart",[P.shellLayout.resizeSidebar]:"Resize sidebar",[P.shellLayout.collapseSidebar]:"Collapse sidebar",[P.shellLayout.expandSidebar]:"Expand sidebar",[P.shellLayout.resizeAside]:"Resize detail panel",[P.ontologyNavigator.moreActions]:"More actions",[P.dataToolbar.addRow]:"Add row",[P.dataToolbar.blankRowName]:"Blank Row",[P.ontologyTrendMatrix.label]:"Ontology trend matrix",[P.ontologyTrendMatrix.row]:"Row",[P.ontologyTrendMatrix.window]:"Visible rows {start}-{end} of {total}",[P.ontologyTrendMatrix.select]:"Select {row}, {column}, {value}",[P.dataContextBar.label]:"Data filters and drilldown context",[P.dataContextBar.filter]:"Filters",[P.dataContextBar.searchLabel]:"Search data",[P.dataContextBar.searchPlaceholder]:"Search",[P.dataContextBar.clear]:"Clear",[P.dataContextBar.clearAll]:"Clear all",[P.dataContextBar.tagFilterClear]:"Clear",[P.dataContextBar.filterDescription]:"Filter assets by selecting tags via tag panel or manual search.",[P.dataContextBar.tagScope]:"Tag scope",[P.dataContextBar.currentViewTags]:"Current view",[P.dataContextBar.allTags]:"All tags",[P.dataContextBar.panelFilter]:"Panel filter",[P.dataContextBar.searchTags]:"Search tags",[P.dataContextBar.noAvailableTags]:"No available tags",[P.dataContextBar.loadedAll]:"All loaded",[P.dataContextBar.refreshTags]:"Refresh tags",[P.dataContextBar.confirm]:"Confirm",[P.dataContextBar.tagPanel]:"Tag panel",[P.dataContextBar.selectPanel]:"Select a panel",[P.dataContextBar.noPanels]:"No available panels",[P.dataContextBar.noPanelGroups]:"No tag groups in this panel",[P.dataContextBar.singleSelect]:"Single select",[P.dataContextBar.multiSelect]:"Multi select",[P.dataContextBar.defaultGroup]:"Default group",[P.dataContextBar.more]:"+{count} more",[P.dataContextBar.dashboardContext]:"Dashboard context",[P.dataContextBar.contextCount]:"{count} context values",[P.dataContextBar.fields.search]:"Search",[P.dataContextBar.fields.tagIds]:"Tags",[P.dataContextBar.fields.tagGroupIds]:"Tag groups",[P.dataContextBar.fields.timeFrom]:"From",[P.dataContextBar.fields.timeTo]:"To",[P.dataContextBar.fields.clickedField]:"Drilldown field",[P.dataContextBar.fields.clickedValue]:"Drilldown value",[P.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",[P.ontologyManagement.markerDescription]:"\u914D\u7F6E\u4ED3\u5E93\u6807\u8BB0\u548C\u9ED8\u8BA4\u89C6\u56FE\u3002",[P.ontologyManagement.label]:"\u6807\u8BB0\u540D\u79F0",[P.ontologyManagement.targetOntology]:"\u76EE\u6807\u4ED3\u5E93",[P.ontologyManagement.templateKey]:"\u6A21\u677F\u6807\u8BC6",[P.ontologyManagement.templateName]:"\u89C6\u56FE\u540D\u79F0",[P.ontologyManagement.templateDescription]:"\u89C6\u56FE\u63CF\u8FF0",[P.ontologyManagement.templateTags]:"\u6807\u7B7E\u7B5B\u9009",[P.ontologyManagement.templateTagsDescription]:"\u8BBE\u7F6E\u8BE5\u89C6\u56FE\u5305\u542B\u3001\u5339\u914D\u6216\u6392\u9664\u7684\u6807\u7B7E\u3002",[P.ontologyManagement.creatorCurrentUser]:"\u4EC5\u663E\u793A\u5F53\u524D\u7528\u6237\u521B\u5EFA\u7684\u6570\u636E",[P.ontologyManagement.creatorCurrentUserShort]:"\u5F53\u524D\u7528\u6237",[P.ontologyManagement.defaultViewTemplatesDescription]:"\u4E3A\u4ED3\u5E93\u914D\u7F6E\u9ED8\u8BA4\u89C6\u56FE\u53CA\u5176\u7B5B\u9009\u6761\u4EF6\u3002",[P.ontologyManagement.defaultViewTemplate]:"\u9ED8\u8BA4\u89C6\u56FE\u6A21\u677F",[P.ontologyManagement.defaultSelectedView]:"\u9ED8\u8BA4\u6253\u5F00",[P.ontologyManagement.tagFilterEnabled]:"\u5DF2\u914D\u7F6E\u6807\u7B7E\u7B5B\u9009",[P.ontologyManagement.tagFilterEmpty]:"\u672A\u914D\u7F6E\u6807\u7B7E\u7B5B\u9009",[P.ontologyManagement.tableColumnsSummary]:"\u5DF2\u914D\u7F6E {count} \u4E2A\u8868\u683C\u5217",[P.ontologyManagement.editTemplateDetails]:"\u7F16\u8F91\u89C6\u56FE\u6A21\u677F",[P.ontologyManagement.editTemplateDetailsDescription]:"\u914D\u7F6E\u540D\u79F0\u3001\u6392\u5E8F\u548C\u7B5B\u9009\u6761\u4EF6\u3002",[P.ontologyManagement.defaultViewTemplates]:"\u9ED8\u8BA4\u89C6\u56FE\u6A21\u677F",[P.ontologyManagement.markerExists]:"\u5DF2\u6709\u4ED3\u5E93\u6807\u8BB0",[P.ontologyManagement.filterInclude]:"\u5168\u90E8\u5305\u542B",[P.ontologyManagement.filterAny]:"\u5339\u914D\u4EFB\u610F",[P.ontologyManagement.filterExclude]:"\u6392\u9664",[P.ontologyManagement.filterNoTags]:"\u6CA1\u6709\u5339\u914D\u7684\u6807\u7B7E",[P.ontologyManagement.filterSearch]:"\u641C\u7D22\u6807\u7B7E",[P.ontologyManagement.filterTagGroup]:"\u6807\u7B7E\u7EC4",[P.ontologyManagement.filterAllGroups]:"\u5168\u90E8\u6807\u7B7E\u7EC4",[P.ontologyManagement.filterAddOrGroup]:"\u6DFB\u52A0\u6216\u6761\u4EF6\u7EC4",[P.ontologyManagement.filterNoOrGroups]:"\u6682\u65E0\u6216\u6761\u4EF6\u7EC4",[P.ontologyManagement.filterOrGroup]:"\u6216\u6761\u4EF6\u7EC4 {n}",[P.ontologyManagement.filterDeleteGroup]:"\u5220\u9664\u6761\u4EF6\u7EC4",[P.ontologyManagement.filterSupplement]:"{name} \u7684\u8865\u5145\u89C4\u5219",[P.ontologyManagement.filterConfigureSupplement]:"\u914D\u7F6E\u8865\u5145\u89C4\u5219",[P.ontologyManagement.filterClearSupplement]:"\u6E05\u9664\u8865\u5145\u89C4\u5219",[P.ontologyManagement.filterSupplementMode]:"\u5339\u914D\u65B9\u5F0F",[P.ontologyManagement.filterModeOr]:"\u4EFB\u610F\u6761\u4EF6\uFF08OR\uFF09",[P.ontologyManagement.filterModeAnd]:"\u5168\u90E8\u6761\u4EF6\uFF08AND\uFF09",[P.ontologyManagement.filterModeCombination]:"\u7EC4\u5408\u6761\u4EF6",[P.ontologyManagement.filterRequiredAll]:"\u5FC5\u987B\u5305\u542B\u5168\u90E8\u6807\u7B7E",[P.ontologyManagement.filterRequiredAny]:"\u81F3\u5C11\u5305\u542B\u4E00\u4E2A\u6807\u7B7E",[P.ontologyManagement.filterAdvancedRules]:"{count} \u9879\u9AD8\u7EA7\u89C4\u5219",[P.ontologyManagement.filterAdvancedRulesDescription]:"\u5DF2\u6709\u89C4\u5219\u5C06\u4FDD\u7559\uFF0C\u9664\u975E\u660E\u786E\u79FB\u9664\u3002",[P.ontologyManagement.filterRemoveAdvancedRules]:"\u79FB\u9664\u9AD8\u7EA7\u89C4\u5219",[P.ontologyManagement.deleteTemplate]:"\u5220\u9664\u6A21\u677F",[P.ontologyManagement.deleteMarker]:"\u5220\u9664\u4ED3\u5E93\u6807\u8BB0",[P.ontologyManagement.createDefaultViews]:"\u521B\u5EFA\u9ED8\u8BA4\u89C6\u56FE",[P.ontologyManagement.addTemplate]:"\u6DFB\u52A0\u89C6\u56FE\u6A21\u677F",[P.ontologyManagement.noTemplates]:"\u6682\u65E0\u9ED8\u8BA4\u89C6\u56FE\u6A21\u677F",[P.ontologyManagement.actions["ontology-marker"]]:"\u8BBE\u7F6E\u4ED3\u5E93\u6807\u8BB0",[P.ontologyManagement.actions["view-detail"]]:"\u67E5\u770B\u8BE6\u60C5",[P.ontologyManagement.actions["view-convert-to-container"]]:"\u8F6C\u5316\u4E3A\u589E\u5F3A\u89C6\u56FE",[P.ontologyManagement.actions["view-edit-team"]]:"\u4FEE\u6539\u89C6\u56FE\u56E2\u961F",[P.ontologyManagement.actions["view-insert-blank-rows"]]:"\u63D2\u5165\u7A7A\u767D\u884C",[P.ontologyManagement.actions["view-snapshot"]]:"\u5BFC\u5165\u5230\u65B0 Ontology",[P.ontologyManagement.targetTeamId]:"\u76EE\u6807\u56E2\u961F ID",[P.ontologyManagement.currentTeamId]:"\u5F53\u524D\u56E2\u961F ID",[P.ontologyManagement.count]:"\u884C\u6570",[P.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",[P.numericSeries.inspect]:"\u67E5\u770B\u89C2\u6D4B\u70B9",[P.numericSeries.noPoints]:"\u6B64\u8303\u56F4\u5185\u6CA1\u6709\u89C2\u6D4B\u70B9",[P.numericSeries.point]:"{xLabel} {x}, {yLabel} {y}",[P.numericSeries.label]:"\u6570\u503C\u5E8F\u5217",[P.numericSeries.description]:"\u67E5\u770B\u6570\u503C\u89C2\u6D4B\uFF0C\u7F29\u653E\u8303\u56F4\u5E76\u653E\u5927\u56FE\u8868\u3002",[P.numericSeries.start]:"\u8303\u56F4\u8D77\u70B9",[P.numericSeries.end]:"\u8303\u56F4\u7EC8\u70B9",[P.numericSeries.reset]:"\u91CD\u7F6E\u8303\u56F4",[P.numericSeries.expand]:"\u653E\u5927\u56FE\u8868",[P.numericSeries.close]:"\u5173\u95ED\u56FE\u8868",[P.shellLayout.resizeSidebar]:"\u8C03\u6574\u4FA7\u8FB9\u680F\u5BBD\u5EA6",[P.shellLayout.collapseSidebar]:"\u6536\u8D77\u4FA7\u8FB9\u680F",[P.shellLayout.expandSidebar]:"\u5C55\u5F00\u4FA7\u8FB9\u680F",[P.shellLayout.resizeAside]:"\u8C03\u6574\u8BE6\u60C5\u4FA7\u8FB9\u680F\u5BBD\u5EA6",[P.ontologyNavigator.moreActions]:"\u66F4\u591A\u64CD\u4F5C",[P.dataToolbar.addRow]:"\u6DFB\u52A0\u4E00\u884C",[P.dataToolbar.blankRowName]:"\u7A7A\u767D\u884C",[P.ontologyTrendMatrix.label]:"\u672C\u4F53\u8D8B\u52BF\u77E9\u9635",[P.ontologyTrendMatrix.row]:"\u884C",[P.ontologyTrendMatrix.window]:"\u5F53\u524D\u663E\u793A\u7B2C {start}-{end} \u884C\uFF0C\u5171 {total} \u884C",[P.ontologyTrendMatrix.select]:"\u9009\u62E9 {row}\u3001{column}\u3001{value}",[P.dataContextBar.label]:"\u6570\u636E\u7B5B\u9009\u4E0E\u94BB\u53D6\u4E0A\u4E0B\u6587",[P.dataContextBar.filter]:"\u7B5B\u9009",[P.dataContextBar.searchLabel]:"\u641C\u7D22\u6570\u636E",[P.dataContextBar.searchPlaceholder]:"\u641C\u7D22",[P.dataContextBar.clear]:"\u6E05\u9664",[P.dataContextBar.clearAll]:"\u5168\u90E8\u6E05\u9664",[P.dataContextBar.tagFilterClear]:"\u6E05\u7A7A",[P.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",[P.dataContextBar.tagScope]:"\u6807\u7B7E\u8303\u56F4",[P.dataContextBar.currentViewTags]:"\u5F53\u524D\u89C6\u56FE",[P.dataContextBar.allTags]:"\u5168\u90E8\u6807\u7B7E",[P.dataContextBar.panelFilter]:"\u9762\u677F\u7B5B\u9009",[P.dataContextBar.searchTags]:"\u641C\u7D22\u6807\u7B7E",[P.dataContextBar.noAvailableTags]:"\u6682\u65E0\u53EF\u7528\u6807\u7B7E",[P.dataContextBar.loadedAll]:"\u5DF2\u52A0\u8F7D\u5168\u90E8",[P.dataContextBar.refreshTags]:"\u5237\u65B0\u6807\u7B7E",[P.dataContextBar.confirm]:"\u786E\u5B9A",[P.dataContextBar.tagPanel]:"\u6807\u7B7E\u9762\u677F",[P.dataContextBar.selectPanel]:"\u9009\u62E9\u6807\u7B7E\u9762\u677F",[P.dataContextBar.noPanels]:"\u6682\u65E0\u53EF\u7528\u6807\u7B7E\u9762\u677F",[P.dataContextBar.noPanelGroups]:"\u5F53\u524D\u9762\u677F\u6CA1\u6709\u6807\u7B7E\u7EC4",[P.dataContextBar.singleSelect]:"\u5355\u9009",[P.dataContextBar.multiSelect]:"\u591A\u9009",[P.dataContextBar.defaultGroup]:"\u9ED8\u8BA4\u6807\u7B7E\u7EC4",[P.dataContextBar.more]:"\u53E6\u6709 {count} \u9879",[P.dataContextBar.dashboardContext]:"\u4EEA\u8868\u76D8\u4E0A\u4E0B\u6587",[P.dataContextBar.contextCount]:"{count} \u9879\u4E0A\u4E0B\u6587",[P.dataContextBar.fields.search]:"\u641C\u7D22",[P.dataContextBar.fields.tagIds]:"\u6807\u7B7E",[P.dataContextBar.fields.tagGroupIds]:"\u6807\u7B7E\u7EC4",[P.dataContextBar.fields.timeFrom]:"\u5F00\u59CB\u65F6\u95F4",[P.dataContextBar.fields.timeTo]:"\u7ED3\u675F\u65F6\u95F4",[P.dataContextBar.fields.clickedField]:"\u94BB\u53D6\u5B57\u6BB5",[P.dataContextBar.fields.clickedValue]:"\u94BB\u53D6\u503C",[P.dataContextBar.fields.dashboardDrilldown]:"\u4EEA\u8868\u76D8\u94BB\u53D6"})});var tm={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 rk({language:e,disabled:t,onSelect:o}){let n=Ne(),[a,s]=useState(0),[i,m]=useState(false),[c,d]=useState(),g=useRef({disabled:t,onSelect:o});g.current={disabled:t,onSelect:o};let u=useRef(true);useEffect(()=>(u.current=true,()=>{u.current=false;}),[]),useEffect(()=>{let b=false;return m(false),Promise.all([import('@emoji-mart/react'),import('@emoji-mart/data'),tm[e]()]).then(([h,y,v])=>{b||d({Picker:h.default,data:y.default,i18n:v.default});}).catch(()=>{b||m(true);}),()=>{b=true;}},[e,a]);let p=Ri[e==="zh"?"zh-CN":"en-US"];if(i)return jsxs("div",{role:"alert",className:"flex items-center gap-2 text-sm",children:[p["monkeys.design.emojiPanel.unavailable"],jsx(ve,{disabled:t,onClick:()=>s(b=>b+1),children:p["monkeys.design.iconPicker.retry"]})]});if(!c)return jsx("div",{role:"status",className:"text-sm text-muted-foreground",children:p["monkeys.design.emojiPanel.loading"]});let{Picker:f}=c;return 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: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=>{u.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(rk,"LocalizedEmojiPanel");function om({locale:e,disabled:t=false,onSelect:o}){let n=xt(),a=(e??n.locale).toLowerCase().split("-")[0],s=Object.prototype.hasOwnProperty.call(tm,a)?a:"en";return jsx(rk,{language:s,disabled:t,onSelect:o},s)}r(om,"EmojiPanel");function fl(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 jsx(om,{locale:e.locale,disabled:e.disabled,onSelect:o=>t(o)})}r(fl,"renderIconPickerEmoji");function _n(e,t){let o=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(_n,"resolveI18nDisplayText");var Yr=5*1024*1024*1024;function nm(e,t){if(!t?.trim())return true;let o=e.name.toLowerCase(),n=e.type.toLowerCase();return t.split(",").some(a=>{let s=a.trim().toLowerCase();return /^\.[a-z0-9][a-z0-9._-]*$/.test(s)?o.endsWith(s):/^[a-z0-9!#$&^_.+-]+\/\*$/.test(s)?n.startsWith(s.slice(0,-1)):/^[a-z0-9!#$&^_.+-]+\/[a-z0-9!#$&^_.+-]+$/.test(s)&&n===s})}r(nm,"filePickerAccepts");function rm(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>Yr))return {handleId:t.handleId,fileName:t.fileName,size:t.size,mimeType:t.mimeType}}r(rm,"readTransientFileMetadata");var im=".png,.jpg,.jpeg,.webp,.svg";function gk({compactActions:e=false,model:t,onIntent:o,renderEmojiPicker:n=fl,transientFiles:a,translate:s,catalogSource:i}){let{locale:m}=xt(),c=i??(!t.icons.length&&!t.categories.length?defaultIconPickerCatalogSource:void 0),d=r(R=>{let D=s?.(R);return D&&D!==R?D:Ri[m.toLowerCase().startsWith("zh")?"zh-CN":"en-US"][R]??R},"translate"),[g,u]=useState(),[p,f]=useState("idle"),[b,h]=useState(0);useEffect(()=>{if(!c||!t.open||t.mode!=="icon"||g?.source===c)return;let R=new AbortController;return f("loading"),c.load(R.signal).then(D=>{R.signal.aborted||(u({source:c,value:D}),f("idle"));}).catch(()=>{R.signal.aborted||f("error");}),()=>R.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,v=useRef(null),k=useRef(null),[x,w]=useState(false),C=r(()=>{let R=k.current;k.current=null,R?.registry.discard(R.handleId);},"release");useEffect(()=>()=>C(),[a]),useEffect(()=>{y.open||C();},[y.open]);let S=y.disabled===true||y.uploading===true,T=r(R=>{S||o(R);},"emit"),E=r(()=>{S||(C(),o({type:"open-change",open:false,mode:y.mode}));},"close"),N=y.value.kind==="emoji"?y.value.value:y.defaultValue.kind==="emoji"?y.defaultValue.value:"\u{1F340}",O=y.value.kind==="emoji"?y.value.backgroundColor:y.backgroundColors[0],V=r((R,D=O)=>{!R||R.length>64||T({type:"change",value:{kind:"emoji",value:R,...D?{backgroundColor:D}:{}}});},"chooseEmoji"),W=[...new Map(y.customIcons.map(R=>[R.id,R])).values()].slice(0,50),F=y.search.trim().toLowerCase(),H=y.categoryId==="custom-upload",I=(H?W:y.icons).filter(R=>(H||y.categoryId==="all"||R.categoryIds?.includes(y.categoryId))&&(!F||R.id.toLowerCase().includes(F)||R.tags?.some(D=>D.toLowerCase().includes(F)))),G=r(R=>{S||o({type:"open-change",open:y.open,mode:R});},"changeMode"),q=r((R,D,M,$)=>e?jsx(cr,{content:d(R),portal:true,children:jsx(ve,{label:d(R),iconOnly:true,icon:D,disabled:S,"aria-pressed":$,active:$,onClick:M})}):jsx(ve,{type:"button",disabled:S,"aria-pressed":$,active:$,onClick:M,children:d(R)}),"action");return jsx("section",{"data-monkeys-component":"icon-picker",className:"flex items-center",children:jsxs(Sd,{open:y.open,modal:false,onOpenChange:R=>{R?T({type:"open-change",open:true,mode:y.mode}):E();},children:[jsx(Td,{asChild:true,children:jsx(ve,{type:"button","aria-label":d("monkeys.design.iconPicker.choose"),disabled:S,className:"gap-2 px-2",endIcon:jsx(ChevronDown,{"aria-hidden":"true",className:"h-3.5 w-3.5 text-muted-foreground"}),children:jsx(Bn,{icon:y.value,alt:d("monkeys.design.iconPicker.current"),className:"h-6 w-6 rounded-sm bg-transparent text-xl text-current"})})}),jsxs(qi,{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:R=>{y.mode==="icon"&&v.current&&(R.preventDefault(),v.current.focus());},onEscapeKeyDown:R=>{S&&R.preventDefault();},onInteractOutside:R=>{S&&R.preventDefault();},children:[jsxs("div",{className:"flex items-center gap-2",children:[q("monkeys.design.iconPicker.emoji",jsx(Smile,{className:"h-4 w-4"}),()=>G("emoji"),y.mode==="emoji"),q("monkeys.design.iconPicker.icon",jsx(Shapes,{className:"h-4 w-4"}),()=>G("icon"),y.mode==="icon"),jsxs("div",{className:"ml-auto flex items-center gap-2",children:[q("monkeys.design.iconPicker.reset",jsx(RotateCcw,{className:"h-4 w-4"}),()=>{S||(o({type:"change",value:y.defaultValue}),o({type:"reset"}),E());}),q("monkeys.design.iconPicker.close",jsx(X,{className:"h-4 w-4"}),E)]})]}),y.mode==="emoji"?jsxs(Fragment,{children:[n({locale:m,disabled:S,onSelect:r(R=>{S||!R||R.length>64||(V(R),E());},"onSelect")}),jsx("div",{className:"flex flex-wrap gap-2 empty:hidden","aria-label":d("monkeys.design.iconPicker.background"),children:y.backgroundColors.map(R=>jsx(ve,{className:"h-7 w-7 rounded-md border p-0",type:"button",disabled:S,"aria-label":R,"aria-pressed":R===O,style:{backgroundColor:R},onClick:()=>V(N,R),children:jsx("span",{className:"sr-only",children:d("monkeys.design.iconPicker.background")})},R))})]}):jsxs(Fragment,{children:[jsx(Qt,{ref:v,"aria-label":d("monkeys.design.iconPicker.search"),placeholder:d("monkeys.design.iconPicker.search"),disabled:S,value:y.search,onChange:R=>T({type:"search",value:R.currentTarget.value})}),jsx("div",{className:"flex shrink-0 gap-1 overflow-x-auto pb-1","aria-label":d("monkeys.design.iconPicker.categories"),children:y.categories.filter(R=>R.id!=="custom-upload"||a||y.customIcons.length).map(R=>jsx(ve,{type:"button",className:"shrink-0",size:"sm",variant:"ghost",disabled:S,active:R.id===y.categoryId,"aria-pressed":R.id===y.categoryId,onClick:()=>T({type:"category-change",categoryId:R.id}),children:_n(R.labelI18n,m)},R.id))}),H?jsxs("label",{children:[d("monkeys.design.iconPicker.upload"),jsx(Qt,{type:"file",accept:im,disabled:S||!a,onChange:R=>{let D=R.currentTarget.files?.[0];if(R.currentTarget.value="",!D||S||!a)return;let M=y.maxUploadBytes??Yr;if(!Number.isInteger(M)||M<1||M>Yr||D.size>M||!nm(D,im)){w(true);return}C(),w(false);try{let $=a.register(D),J=rm($);if(!J){typeof $?.handleId=="string"&&a.discard($.handleId),w(!0);return}k.current={registry:a,handleId:J.handleId},o({type:"upload",...J});}catch{C(),w(true);}}})]}):null,x?jsx("div",{role:"alert",children:d("monkeys.design.iconPicker.uploadFailed")}):null,y.loading?jsx("div",{role:"status",children:d("monkeys.design.iconPicker.loading")}):y.errorCode?jsxs("div",{role:"alert",children:[d(y.errorCode),jsx(ve,{disabled:S,onClick:()=>{h(R=>R+1),T({type:"retry"});},children:d("monkeys.design.iconPicker.retry")})]}):jsxs("div",{className:"grid min-h-0 max-h-64 grid-cols-7 gap-1 overflow-auto",onKeyDown:R=>{let D=Array.from(R.currentTarget.querySelectorAll("button:not(:disabled)")),M=D.indexOf(R.target);if(M<0)return;let $={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7}[R.key],J=R.key==="Home"?0:R.key==="End"?D.length-1:$===void 0?void 0:Math.max(0,Math.min(D.length-1,M+$));J!==void 0&&(R.preventDefault(),D[J]?.focus());},children:[I.map(R=>jsxs(ve,{className:"relative h-10 min-w-0 p-1",variant:"ghost",active:JSON.stringify(R.icon)===JSON.stringify(y.value),type:"button",title:R.id,"aria-label":R.id,disabled:S,onClick:()=>{S||(o({type:"change",value:R.icon}),E());},children:[jsx(Bn,{icon:R.icon,alt:R.id,className:"h-7 w-7 rounded-sm bg-transparent text-2xl text-current"}),jsx("span",{className:"sr-only",children:R.id})]},R.id)),I.length?null:jsx("p",{className:"col-span-7 py-3 text-center text-sm text-muted-foreground",children:d("monkeys.design.iconPicker.empty")})]})]})]})]})})}r(gk,"IconPicker");function hl(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(hl,"initialLayoutCanvasMountedIds");function bk(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)),s=Math.max(8,Math.ceil(a*.75));return Math.min(e,Math.max(Math.min(e,18),Math.min(n,a+s)))}r(bk,"layoutCanvasRetainedMountLimit");function lm(e){let t=new Set(e.items.map(i=>i.id));if(t.size!==e.items.length)throw new TypeError("Layout widget IDs must be unique.");let o=new Set(e.visibleIds.filter(i=>t.has(i))),n=hl(e.items),a=bk(t.size,o.size,n.length);if(e.mode==="run")return {retainedOrder:[],mountedIds:[...o],limit:a};let s=[...new Set(e.retainedOrder.filter(i=>t.has(i)))];s.length||s.push(...n);for(let i of [...o,e.selectedWidgetId,e.draggingWidgetId,e.resizingWidgetId]){if(!i||!t.has(i))continue;let m=s.indexOf(i);m>=0&&s.splice(m,1),s.push(i);}for(;s.length>a;){let i=s.findIndex(m=>!o.has(m));if(i<0)break;s.splice(i,1);}return {retainedOrder:s,mountedIds:[...new Set([...s,...o])],limit:a}}r(lm,"projectLayoutCanvasMounting");function pm({items:e,mode:t,selectedWidgetId:o,draggingWidgetId:n,resizingWidgetId:a,renderItem:s}){let i=useRef(null),m=JSON.stringify(e.map(h=>[h.id,h.layout.x,h.layout.y])),[c,d]=useState(()=>hl(e)),[g,u]=useState([]),p=useMemo(()=>lm({items:e,mode:t,visibleIds:c,retainedOrder:g,selectedWidgetId:o,draggingWidgetId:n,resizingWidgetId:a}),[m,t,c,g,o,n,a]),f=JSON.stringify(p.retainedOrder);useEffect(()=>{u(h=>JSON.stringify(h)===f?h:p.retainedOrder);},[f]),useEffect(()=>{let h=i.current;if(!h)return;if(typeof IntersectionObserver>"u"){d(e.map(x=>x.id));return}let y=true,v=new Map;d([]);let k=new IntersectionObserver(x=>{if(!y)return;for(let C of x){let S=C.target.dataset.layoutMountId;S&&v.set(S,C.isIntersecting);}let w=[...v].filter(([,C])=>C).map(([C])=>C);d(C=>JSON.stringify(C)===JSON.stringify(w)?C:w);},{root:null,rootMargin:`${720}px 0px ${720}px 0px`,threshold:0});for(let x of h.children)k.observe(x);return ()=>{y=false,k.disconnect();}},[m]);let b=new Set(p.mountedIds);return jsx("div",{ref:i,"data-layout-grid":true,className:"grid",style:{gridTemplateColumns:"repeat(24,minmax(0,1fr))",gridAutoRows:28,gap:12},children:e.map(h=>jsx("div",{"data-layout-mount-id":h.id,style:{gridColumn:`${h.layout.x+1} / span ${h.layout.w}`,gridRow:`${h.layout.y+1} / span ${h.layout.h}`,minWidth:0,minHeight:0},children:s(h,b.has(h.id))},h.id))})}r(pm,"LayoutCanvasGrid");var Ii="application/x-monkeys-layout-catalog-item";var $n={columns:24,rowHeight:28,gap:12,maxRows:100,minimum:4},xl=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 Bi(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"?Bi(a.children,t):a.tabs.forEach(s=>Bi(s.children,t)));return n(),t}r(Bi,"runs");var xo=z$1.string().min(1).max(256).refine(e=>!["__proto__","constructor","prototype"].includes(e)),Mi=z$1.string().max(8192),hk=z$1.union([z$1.object({type:z$1.enum(["widget","section","tabs"]),id:xo}).strict(),z$1.object({type:z$1.literal("tab"),id:xo,tabsId:xo}).strict()]),vl=z$1.lazy(()=>z$1.union([z$1.object({type:z$1.literal("widget"),id:xo,widgetId:xo}).strict(),z$1.object({type:z$1.literal("section"),id:xo,title:Mi.optional(),description:Mi.optional(),children:z$1.array(vl)}).strict(),z$1.object({type:z$1.literal("tabs"),id:xo,title:Mi.optional(),size:z$1.enum(["large","small"]).optional(),behavior:z$1.enum(["switch","anchor"]).optional(),tabs:z$1.array(z$1.object({id:xo,label:Mi.optional(),target:hk.optional(),children:z$1.array(vl)}).strict())}).strict()])),xk=z$1.object({x:z$1.number().int().min(0),y:z$1.number().int().min(0),w:z$1.number().int().min(4).max(24),h:z$1.number().int().min(4).max(100),minW:z$1.number().int().min(4).max(24),minH:z$1.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),vk=z$1.object({version:z$1.literal(1),revision:xo,root:z$1.array(vl),widgets:z$1.record(xo,z$1.object({layout:xk}).strict())}).strict();function jn(e){let t=0,o=new Set,n=r((g,u)=>{if(g&&typeof g=="object"){if(u>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,u+1);o.delete(g);}},"bound");n(e,0);let a=vk.parse(e),s=new Set,i=new Set,m=0,c=r(()=>{throw new TypeError("Invalid layout canvas model.")},"fail"),d=r((g,u)=>{u>16&&c();for(let p of g)if((s.has(p.id)||++m>512)&&c(),s.add(p.id),p.type==="widget")(i.has(p.widgetId)||!Object.prototype.hasOwnProperty.call(a.widgets,p.widgetId))&&c(),i.add(p.widgetId);else if(p.type==="section")d(p.children,u+1);else for(let f of p.tabs)(s.has(f.id)||++m>512)&&c(),s.add(f.id),d(f.children,u+1);},"visit");d(a.root,0),Object.keys(a.widgets).some(g=>!i.has(g))&&c();for(let g of Bi(a.root))for(let u=0;u<g.length;u++)for(let p=0;p<u;p++)xl(a.widgets[g[u]].layout,a.widgets[g[p]].layout)&&c();}r(jn,"validateLayoutCanvasModel");function Pi(e,t){if(jn(e),t.type==="remove"){let m=[],c=false,d=r(b=>{for(let h of b)h.type==="widget"?m.push(h.widgetId):h.type==="section"?d(h.children):h.tabs.forEach(y=>d(y.children));},"collect"),g=r(b=>b.flatMap(h=>h.id===t.nodeId?(c=true,d([h]),[]):h.type==="section"?[{...h,children:g(h.children)}]:h.type==="tabs"?[{...h,tabs:h.tabs.flatMap(y=>y.id===t.nodeId?(c=true,d(y.children),[]):[{...y,children:g(y.children)}])}]:[h]),"remove"),u=g(e.root);if(!c)throw new TypeError("Unknown layout node.");let p=new Set(m),f={...e,root:u,widgets:Object.fromEntries(Object.entries(e.widgets).filter(([b])=>!p.has(b)))};return jn(f),{model:f,removedWidgetIds:m}}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=(Bi(e.root).find(m=>m.includes(t.widgetId))??[]).filter(m=>m!==t.widgetId).map(m=>e.widgets[m].layout),s=a.some(m=>xl(n,m))?void 0:n;if(!s){let m=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},u=Math.abs(c-n.y)*1e3+Math.abs(d-n.x)*100+c*10+d;u<m&&!a.some(p=>xl(g,p))&&(s=g,m=u);}}if(!s)throw new RangeError("No available layout position.");let i={...e,widgets:{...e.widgets,[t.widgetId]:{...o,layout:s}}};return jn(i),{model:i,removedWidgetIds:[]}}r(Pi,"applyLayoutCanvasOperation");function Ck({model:e,mode:t,widgetOrder:o,children:n,selectedNodeId:a,currentTabs:s={},disabled:i=false,labels:m,allowedCatalogItemIds:c=[],draggingCatalogItemId:d,onInsertRequest:g,onReorder:u,onSelect:p,onChange:f,onTabChange:b,onOperationError:h,className:y}){jn(e);let v=Children.toArray(n);if(o.length!==v.length||new Set(o).size!==o.length||o.length!==Object.keys(e.widgets).length||o.some(K=>!Object.prototype.hasOwnProperty.call(e.widgets,K)))throw new TypeError("Layout widget content must map each widget exactly once.");let k=new Map(o.map((K,Z)=>[K,v[Z]])),x=useRef(null),w=useRef(e);w.current=e;let C=useRef({id:d,model:e});C.current.id!==d&&(C.current={id:d,model:e});let S=useRef(),[T,E]=useState(),N=useRef(),[O,V]=useState(),[W,F]=useState(),H=useRef();useEffect(()=>{N.current=void 0,H.current=void 0,S.current=void 0,E(void 0),V(void 0),F(void 0);},[e,i,t]);let I=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((K,Z,re,ae=e)=>{i||t!=="edit"||ae!==w.current||K===Z||!e.root.some(le=>le.id===K)||!e.root.some(le=>le.id===Z)||u?.({sourceNodeId:K,targetNodeId:Z,position:re,expectedRevision:ae.revision});},"reorder"),q=r(K=>t==="edit"&&e.root.some(Z=>Z.id===K)&&u?jsx("button",{type:"button","data-layout-reorder":K,draggable:!i,disabled:i,"aria-label":m.reorder??m.move,onDragStart:Z=>{if(i){Z.preventDefault();return}S.current={id:K,model:e},Z.dataTransfer.setData("application/x-monkeys-layout-root-node",K),Z.dataTransfer.effectAllowed="move";},onDragEnd:()=>{S.current=void 0,E(void 0);},onKeyDown:Z=>{let re=e.root.findIndex(L=>L.id===K),ae=Z.key==="ArrowUp"?-1:Z.key==="ArrowDown"?1:0;if(!ae)return;Z.preventDefault();let le=e.root[re+ae];le&&G(K,le.id,ae<0?"before":"after");},children:m.reorder??m.move}):null,"reorderHandle"),R=r(K=>{if(t!=="edit"||!g&&!(K.type==="root"&&u))return null;let Z=JSON.stringify(K);return jsx("div",{"data-layout-insert-target":Z,"data-layout-insert-type":K.type,"data-layout-insert-index":K.index,"data-layout-section-id":K.type==="section"?K.sectionId:void 0,"data-layout-tabs-id":K.type==="tab"?K.tabsId:void 0,"data-layout-tab-id":K.type==="tab"?K.tabId:void 0,"data-drop-preview":T===Z||void 0,"aria-label":m.insert??m.move,className:T===Z?"min-h-4 border-2 border-primary bg-primary/10":"min-h-2",onDragOver:re=>{i||!(I()||K.type==="root"&&S.current?.model===e)||(re.preventDefault(),re.stopPropagation(),E(Z));},onDragLeave:()=>E(void 0),onDrop:re=>{if(re.preventDefault(),re.stopPropagation(),E(void 0),i||t!=="edit"||w.current!==e)return;let ae=S.current;if(ae&&K.type==="root"){if(S.current=void 0,re.dataTransfer.getData("application/x-monkeys-layout-root-node")!==ae.id)return;let L=e.root[K.index]??e.root[e.root.length-1];L&&G(ae.id,L.id,K.index<e.root.length?"before":"after",ae.model);return}let le=re.dataTransfer.getData(Ii);I()&&le===d&&g?.({catalogItemId:le,target:K,expectedRevision:e.revision});},children:T===Z?m.insert??m.move:null},`drop:${Z}`)},"dropZone"),D=r((K,Z)=>{if(!(i||t!=="edit"||N.current===K)){if(w.current!==K){h?.({code:"stale-model",revision:K.revision});return}try{let re=Pi(K,Z);f&&(N.current=K),f?.({expectedRevision:K.revision,...re,reason:Z.type});}catch{h?.({code:"invalid-operation",revision:K.revision});}}},"commit"),M=r((K,Z,re)=>{if(i||t!=="edit"||K.button!==0)return;let le=K.currentTarget.closest("[data-layout-grid]")?.getBoundingClientRect().width??0;if(le<=0)return;let L=e.widgets[Z].layout;H.current={pointerId:K.pointerId,x:K.clientX,y:K.clientY,width:le,model:e,operation:re==="move"?{type:re,widgetId:Z,x:L.x,y:L.y}:{type:re,widgetId:Z,w:L.w,h:L.h}},K.currentTarget.setPointerCapture(K.pointerId),K.preventDefault();},"begin"),$=r((K,Z)=>{let re=H.current;if(!re||re.pointerId!==K.pointerId)return;if(w.current!==re.model||i||t!=="edit"){H.current=void 0,V(void 0);return}let ae=Math.round((K.clientX-re.x)/((re.width+$n.gap)/$n.columns)),le=Math.round((K.clientY-re.y)/($n.rowHeight+$n.gap)),L=re.operation,me=L.type==="move"?{...L,x:L.x+ae,y:L.y+le}:L.type==="resize"?{...L,w:L.w+ae,h:L.h+le}:L;if(Z)H.current=void 0,V(void 0),D(re.model,me);else try{V(Pi(re.model,me).model);}catch{V(void 0);}},"update"),J=O??e,_=r(K=>jsx("button",{type:"button",disabled:i,onClick:()=>F({nodeId:K,model:e}),children:m.remove}),"remove"),ee=r((K,Z)=>{let re=[],ae=[],le=r(()=>{if(!ae.length)return;let L=ae.flatMap(me=>me.type==="widget"?[{id:me.widgetId,node:me,layout:J.widgets[me.widgetId].layout}]:[]);ae=[],re.push(jsx(pm,{items:L,mode:t,selectedWidgetId:L.find(me=>me.node.id===a)?.id,renderItem:({node:me},B)=>{let j=J.widgets[me.widgetId].layout,ne=r(fe=>jsx("button",{type:"button",disabled:i,"aria-label":m[fe],style:{touchAction:"none"},onPointerDown:ye=>M(ye,me.widgetId,fe),onPointerMove:ye=>$(ye,false),onPointerUp:ye=>$(ye,true),onPointerCancel:()=>{H.current=void 0,V(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:j.x+xe[0],y:j.y+xe[1]}:{type:fe,widgetId:me.widgetId,w:j.w+xe[0],h:j.h+xe[1]}));},children:m[fe]}),"controls");return 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:[R({...Z,index:K.indexOf(me)}),t==="edit"?jsxs("div",{className:"flex gap-2",children:[jsx("button",{type:"button",disabled:i,onClick:()=>p?.({nodeId:me.id,revision:e.revision}),children:me.widgetId}),q(me.id),ne("move"),ne("resize"),_(me.id)]}):null,B?k.get(me.widgetId):null]},me.id)}},L[0].id));},"flush");for(let L of K){if(L.type==="widget"){ae.push(L);continue}if(le(),re.push(R({...Z,index:K.indexOf(L)})),L.type==="section")re.push(jsxs("section",{"data-layout-node-id":L.id,className:"space-y-3",children:[jsxs("header",{children:[jsx("h3",{children:t==="edit"?jsx("button",{disabled:i,onClick:()=>p?.({nodeId:L.id,revision:e.revision}),children:L.title??L.id}):L.title??L.id}),L.description?jsx("p",{children:L.description}):null,q(L.id),t==="edit"?_(L.id):null]}),ee(L.children,{type:"section",sectionId:L.id})]},L.id));else {let me=s[L.id]??L.tabs[0]?.id;re.push(jsxs("section",{"data-layout-node-id":L.id,children:[jsx("h3",{children:t==="edit"?jsx("button",{disabled:i,onClick:()=>p?.({nodeId:L.id,revision:e.revision}),children:L.title??L.id}):L.title??L.id}),q(L.id),t==="edit"?_(L.id):null,jsx("div",{role:"tablist",children:L.tabs.map(B=>jsx("button",{type:"button",role:"tab","aria-selected":me===B.id,disabled:i,onClick:()=>{if(t==="edit"&&p?.({nodeId:B.id,revision:e.revision}),b?.({tabsId:L.id,tabId:B.id,revision:e.revision}),L.behavior!=="anchor"||!B.target)return;let j=B.target;j.type==="tab"&&b?.({tabsId:j.tabsId,tabId:j.id,revision:e.revision}),requestAnimationFrame(()=>{let ne=x.current?.querySelectorAll("[data-layout-node-id], [data-layout-widget], [data-layout-tab-id]");(ne&&[...ne].find(ye=>j.type==="widget"?ye.dataset.layoutWidget===j.id:j.type==="tab"?ye.dataset.layoutTabId===j.id&&ye.dataset.layoutTabsId===j.tabsId:ye.dataset.layoutNodeId===j.id))?.scrollIntoView({behavior:typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth",block:"start",inline:"nearest"});});},children:B.label??B.id},B.id))}),L.tabs.map(B=>jsx("div",{role:"tabpanel","data-layout-tab-id":B.id,"data-layout-tabs-id":L.id,hidden:L.behavior!=="anchor"&&me!==B.id,children:ee(B.children,{type:"tab",tabsId:L.id,tabId:B.id})},B.id))]},L.id));}}return le(),re.push(R({...Z,index:K.length})),re},"nodes");return jsxs("div",{ref:x,className:y,"data-layout-canvas":true,children:[ee(J.root,{type:"root"}),jsx(ba,{open:!!W,onOpenChange:K=>{K||F(void 0);},children:jsxs(ln,{children:[jsx(ir,{children:m.confirmRemove}),jsx(sr,{children:m.removeDescription}),jsx("button",{type:"button",onClick:()=>F(void 0),children:m.cancel}),jsx("button",{type:"button",disabled:i,onClick:()=>{W&&D(W.model,{type:"remove",nodeId:W.nodeId}),F(void 0);},children:m.remove})]})})]})}r(Ck,"LayoutCanvas");function Tk({catalogItemId:e,disabled:t=false,children:o,className:n,onInsertRequest:a,onDragStateChange:s}){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 i=useRef(),m=useRef(false),c=r(()=>{let d=i.current;i.current=void 0,d&&d.notify?.({catalogItemId:d.catalogItemId,active:false});},"finish");return useEffect(()=>()=>c(),[e,t]),jsx("button",{type:"button",className:n,disabled:t,draggable:!t,onPointerDown:()=>{i.current||(m.current=false);},onKeyDown:d=>{!i.current&&(d.key==="Enter"||d.key===" ")&&(m.current=false);},onClick:d=>{if(t||m.current){d.preventDefault();return}a?.({catalogItemId:e});},onDragStart:d=>{if(t){d.preventDefault();return}c(),d.dataTransfer.clearData(),d.dataTransfer.setData(Ii,e),d.dataTransfer.effectAllowed="copy",m.current=true,i.current={catalogItemId:e,notify:s},s?.({catalogItemId:e,active:true});},onDragEnd:c,children:o})}r(Tk,"LayoutCatalogItem");function Nk({value:e,tokens:t,disabled:o=false,readOnly:n=false,ariaLabel:a,tokenGroupLabel:s,maxLength:i,onChange:m}){let c=useRef(null),d=useRef(false),g=useRef();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]),useLayoutEffect(()=>()=>{g.current=void 0;},[]);let u=r(p=>i===void 0||p.length<=i,"fits");return jsxs("div",{children:[jsx("textarea",{ref:c,value:e,disabled:o,readOnly:n,"aria-label":a,maxLength:i,onCompositionStart:()=>{d.current=true,g.current=void 0;},onCompositionEnd:()=>{d.current=false;},onChange:p=>{g.current=void 0,!o&&!n&&u(p.currentTarget.value)&&m?.({value:p.currentTarget.value});}}),jsx("div",{role:"group","aria-label":s,children:t.map((p,f)=>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 h=b.selectionStart,y=b.selectionEnd,v=e.slice(0,h)+p.value+e.slice(y);!u(v)||v===e||(g.current={previous:e,value:v,caret:h+p.value.length},m?.({value:v}));},children:p.label},f))})]})}r(Nk,"TemplateTextEditor");function Mk({model:e,labels:t,locale:o,timeZone:n,disabled:a=false,loading:s=false,onIntent:i}){let{locale:m}=xt(),c=a||s,d=e.repositories.find(p=>p.id===e.selectedRepositoryId),g=r(p=>{c||i?.({...p,scopeId:e.scopeId,expectedRevision:e.revision});},"emit"),u;try{u=new Intl.DateTimeFormat(o??m,{dateStyle:"medium",timeStyle:"short",timeZone:n});}catch{}return jsxs("section",{"aria-busy":s,className:"flex min-h-0 flex-col gap-3 text-sm",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsxs("label",{children:[t.repositories,jsxs(uo,{"aria-label":t.repositories,disabled:c,value:e.selectedRepositoryId??"",onChange:p=>g({action:"select-repository",repositoryId:p.currentTarget.value}),children:[jsx("option",{value:"",disabled:true,children:t.repositories}),e.repositories.map(p=>jsx("option",{value:p.id,children:p.name},p.id))]})]}),jsx(ve,{size:"sm",disabled:c,onClick:()=>g({action:"refresh"}),children:t.refresh})]}),s&&jsx("p",{role:"status",children:t.loading}),d?jsxs(Fragment,{children:[jsxs("dl",{className:"flex flex-wrap gap-3",children:[jsxs("div",{children:[jsx("dt",{children:t.branch}),jsx("dd",{children:d.branch??"\u2014"})]}),d.upstream&&jsxs("div",{children:[jsx("dt",{children:t.upstream}),jsx("dd",{children:d.upstream})]}),jsxs("div",{children:[jsx("dt",{children:t.ahead}),jsx("dd",{children:d.ahead??0})]}),jsxs("div",{children:[jsx("dt",{children:t.behind}),jsx("dd",{children:d.behind??0})]})]}),jsx("h3",{children:t.status}),d.changes.length===0&&jsx("p",{children:t.empty}),jsx("ul",{className:"flex flex-col gap-1",children:d.changes.map(p=>jsxs("li",{className:"flex flex-wrap items-center gap-2",children:[jsx(un,{label:p.status}),jsx("span",{className:"min-w-0 break-all",children:p.path}),p.indexStatus&&jsx("code",{children:p.indexStatus}),p.worktreeStatus&&jsx("code",{children:p.worktreeStatus}),jsx(ve,{size:"sm",disabled:c,onClick:()=>g({action:"open-file",repositoryId:d.id,path:p.path}),children:t.openFile}),jsx(ve,{size:"sm",disabled:c,onClick:()=>g({action:"open-diff",repositoryId:d.id,path:p.path}),children:t.openDiff})]},p.path))}),jsx("h3",{children:t.history}),d.commits.length===0&&jsx("p",{children:t.empty}),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,h=b&&Number.isFinite(b.getTime());return jsxs("li",{children:[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]}),jsxs("div",{className:"flex flex-wrap gap-2",children:[jsx("span",{children:p.author}),h&&u?jsx("time",{dateTime:b.toISOString(),children:u.format(b)}):jsx("span",{children:t.unknownDate}),p.refs?.map(y=>jsx(un,{label:y},y))]}),f&&jsxs(Fragment,{children:[jsx("ul",{children:p.files.slice(0,8).map(y=>jsxs("li",{className:"flex gap-2",children:[jsx("span",{className:"break-all",children:y.path}),y.status&&jsx(un,{label:y.status})]},y.path))}),p.files.length>8&&jsxs("p",{children:[t.remainingFiles,": ",p.files.length-8]})]})]},p.id)})})]}):jsx("p",{children:t.empty})]})}r(Mk,"RuntimeSourceControlView");var Tl=1e4,Bk=Tl+2,xm=1024*1024,Sl=r(e=>typeof e=="string"&&e.trim().length>0&&e.length<=256&&!/[\u0000-\u001f\u007f-\u009f]/.test(e),"validId");function hm(e){if(e.length>Tl)return "ORDERED_SELECTION_LIMIT_EXCEEDED";if(e.some(t=>!Sl(t))||new Set(e).size!==e.length)return "ORDERED_SELECTION_INVALID_MODEL";if(new TextEncoder().encode(JSON.stringify(e)).byteLength>xm)return "ORDERED_SELECTION_BYTES_EXCEEDED"}r(hm,"validateOrderedSelection");function Pk(e){return jsx(Ek,{...e},JSON.stringify([e.model.scopeId,e.model.revision]))}r(Pk,"OrderedSelection");function Ek({model:e,onIntent:t,translate:o}){let{locale:n}=xt(),[a,s]=useState(()=>[...e.selectedIds]),[i,m]=useState(e.search??""),[c,d]=useState(""),[g,u]=useState(()=>hm(e.selectedIds)),[p,f]=useState(0),b=useRef(a),h=useRef(new Set),y=useRef(new Map),v=useRef(true),k=useRef();useEffect(()=>(v.current=true,()=>{v.current=false;}),[]);let x=!!(e.pending||e.readOnly||e.loading),w=useRef({blocked:x,model:e});w.current={blocked:x,model:e};let C=r(_=>{v.current&&!w.current.blocked&&t(_);},"emit"),S=e.append&&!h.current.has(e.append.revision)?e.append.rows:[],T=[...e.candidates??[],...S],E=new Set(b.current),N=(e.append?.rows??[]).filter(_=>E.has(_.id));for(let _ of [...(e.selectedRows??[]).filter(ee=>E.has(ee.id)),...N,...T])Sl(_.id)&&y.current.set(_.id,_);let O=new Set([...b.current,...T.map(_=>_.id)]);for(let _ of y.current.keys())O.has(_)||y.current.delete(_);let V=r(_=>{let ee=e.groups??[];if(ee.length>Bk||ee.some(re=>!Sl(re.id))||new Set(ee.map(re=>re.id)).size!==ee.length)return "ORDERED_SELECTION_INVALID_MODEL";let K=new Map;for(let re of _)K.set(re,y.current.get(re)??{id:re});for(let re of T)K.set(re.id,re);return new TextEncoder().encode(JSON.stringify({selectedIds:_,rows:[...K.values()],groups:ee})).byteLength>xm?"ORDERED_SELECTION_BYTES_EXCEEDED":void 0},"displayIssue"),W=r(_=>{let ee=y.current.get(_);return ee?.labelI18n?_n(ee.labelI18n,n):ee?.labelKey?o(ee.labelKey):ee?.label||_},"label"),F=r((_,ee=false)=>{let K=y.current.get(_),re=[K?.descriptionI18n?_n(K.descriptionI18n,n):K?.descriptionKey?o(K.descriptionKey):K?.description,K?.showId?_:void 0].filter(ae=>ae!==void 0&&ae!=="").join(" \xB7 ");return jsxs("span",{className:"min-w-0 flex-1 overflow-hidden",children:[jsxs("span",{className:"block truncate",children:[W(_),ee&&K?.missing?` (${o("Unavailable")})`:""]}),re?jsx("span",{className:"block truncate text-xs text-muted-foreground",title:re,children:re}):null]})},"rowText"),H=e.selectionMode==="single"?1:Math.min(1e4,e.maxSelected??1e4),I=e.minSelected??0,G=r(_=>{if(w.current.blocked||!v.current)return false;let K=(_.length>H?"ORDERED_SELECTION_LIMIT_EXCEEDED":hm(_))??V(_);return K?(u(K),C({type:"error",scopeId:e.scopeId,code:K}),false):(b.current=_,u(void 0),s(_),C({type:"change",scopeId:e.scopeId,expectedRevision:e.revision,selectedIds:[..._],selectedCount:_.length}),true)},"commit");useEffect(()=>{!e.append||e.append.rows.length===0||x||h.current.has(e.append.revision)||G([...new Set([...a,...e.append.rows.map(_=>_.id)])])&&h.current.add(e.append.revision);},[e.append,x,a]);let q=r((_,ee)=>{let K=a.indexOf(_);if(K<0||ee<0||ee>=a.length||K===ee)return;let Z=[...a];Z.splice(K,1),Z.splice(ee,0,_),G(Z);},"move"),R=r(()=>C({type:"search",scopeId:e.scopeId,value:i.trim()}),"searchNow"),M=!Number.isSafeInteger(I)||!Number.isSafeInteger(H)||I<0||H<0||I>H?"ORDERED_SELECTION_INVALID_MODEL":V(a),$=M??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 jsxs("div",{className:"flex min-w-0 flex-col gap-3","data-ordered-selection":e.scopeId,children:[$?jsx("p",{role:"alert",children:o($)}):null,e.loading?jsx("p",{role:"status",children:o("Loading")}):null,e.mode==="ids"?jsxs("div",{children:[jsx(yr,{"aria-label":o("IDs"),disabled:x,value:c,onChange:_=>d(_.target.value)}),jsx(ve,{disabled:x,onClick:()=>{G([...new Set([...a,...c.split(/[\s,;]+/).filter(Boolean)])]);},children:o("Add")})]}):jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[e.groupId!==void 0?jsx(uo,{"aria-label":o("Group"),value:e.groupId,disabled:x||e.canBrowse===false,onChange:_=>C({type:"group-change",scopeId:e.scopeId,value:_.currentTarget.value}),children:(e.groups??[]).map(_=>jsx("option",{value:_.id,children:_.labelI18n?_n(_.labelI18n,n):_.labelKey?o(_.labelKey):_.label||_.id},_.id))}):null,jsx(Qt,{"aria-label":o("Search"),value:i,disabled:x||e.canBrowse===false,onChange:_=>m(_.target.value),onKeyDown:_=>{_.key==="Enter"&&(_.preventDefault(),R());}}),jsx(ve,{disabled:x||e.canBrowse===false,onClick:R,children:o("Search")}),e.allowCreate?jsx(ve,{disabled:x,onClick:()=>C({type:"create",scopeId:e.scopeId}),children:o("Create")}):null,jsx("div",{className:"w-full space-y-2","data-ordered-candidates":true,style:{maxHeight:384,overflowY:"auto"},children:(e.candidates??[]).map(_=>jsxs("div",{className:"flex items-center gap-2",children:[jsxs("label",{className:"flex min-w-0 flex-1 items-center gap-2",children:[jsx(dn,{disabled:x||_.disabled,checked:a.includes(_.id),onChange:ee=>G(ee.currentTarget.checked?e.selectionMode==="single"?[_.id]:[...new Set([...a,_.id])]:a.filter(K=>K!==_.id))}),F(_.id)]}),e.allowCopy?jsx(ve,{disabled:x||_.disabled,onClick:()=>C({type:"copy",scopeId:e.scopeId,id:_.id}),children:o("Copy")}):null]},_.id))}),e.pagination?.hasMore&&e.pagination.nextCursor?jsx(ve,{disabled:x||e.canBrowse===false||e.pagination.loadingMore,onClick:()=>C({type:"load-more",scopeId:e.scopeId,cursor:e.pagination.nextCursor}),children:o("Load more")}):null]}),jsx(ve,{className:"self-start",disabled:x||a.length===0,onClick:()=>G([]),children:o("Clear")}),jsxs("div",{role:"status","aria-live":"polite",children:[a.length," / ",Tl]}),jsx("div",{"data-ordered-viewport":true,style:{height:Math.min(384,a.length*48),overflowY:"auto"},onScroll:_=>f(Math.max(0,Math.floor(_.currentTarget.scrollTop/48)-2)),children:jsx("ol",{"aria-label":o("Selected"),style:{height:a.length*48,position:"relative",margin:0},children:a.slice(J,J+14).map((_,ee)=>{let K=J+ee;return jsxs("li",{"data-ordered-id":_,"aria-posinset":K+1,"aria-setsize":a.length,style:{position:"absolute",top:K*48,height:48,left:0,right:0,display:"flex",gap:8},onDragOver:Z=>{!x&&k.current&&Z.preventDefault();},onDrop:Z=>{Z.preventDefault(),k.current&&Z.dataTransfer.getData("application/x-monkeys-ordered-selection")===k.current&&q(k.current,K),k.current=void 0;},children:[jsx(ve,{"data-ordered-drag":_,"aria-label":o("Move"),disabled:x,draggable:!x,onDragStart:Z=>{if(x)return Z.preventDefault();k.current=_,Z.dataTransfer.setData("application/x-monkeys-ordered-selection",_);},onDragEnd:()=>{k.current=void 0;},onKeyDown:Z=>{(Z.key==="ArrowUp"||Z.key==="ArrowDown")&&(Z.preventDefault(),q(_,K+(Z.key==="ArrowUp"?-1:1)));},children:"\u2195"}),F(_,true),jsx(ve,{disabled:x||K===0,"aria-label":o("Move up"),onClick:()=>q(_,K-1),children:"\u2191"}),jsx(ve,{disabled:x||K===a.length-1,"aria-label":o("Move down"),onClick:()=>q(_,K+1),children:"\u2193"}),jsx(ve,{disabled:x,"aria-label":o("Remove"),onClick:()=>G(a.filter(Z=>Z!==_)),children:"\xD7"})]},_)})})}),jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.showSubmit!==false?jsx(ve,{disabled:x||!!(g||M)||a.length<I||a.length>H,onClick:()=>C({type:"submit",scopeId:e.scopeId,expectedRevision:e.revision,selectedIds:[...a],selectedCount:a.length}),children:o("Save")}):null,e.showCancel!==false?jsx(ve,{disabled:x,onClick:()=>C({type:"cancel",scopeId:e.scopeId}),children:o("Cancel")}):null,e.errorCode?jsx(ve,{disabled:x,onClick:()=>C({type:"retry",scopeId:e.scopeId}),children:o("Retry")}):null]})]})}r(Ek,"SelectionDraft");var Ak={h1:r(({children:e})=>jsx("h1",{className:"mb-3 mt-6 text-xl font-bold first:mt-0",children:e}),"h1"),h2:r(({children:e})=>jsx("h2",{className:"mb-3 mt-6 text-lg font-semibold first:mt-0",children:e}),"h2"),h3:r(({children:e})=>jsx("h3",{className:"mb-2 mt-5 text-base font-semibold first:mt-0",children:e}),"h3"),h4:r(({children:e})=>jsx("h4",{className:"mb-2 mt-4 text-sm font-semibold first:mt-0",children:e}),"h4"),p:r(({children:e})=>jsx("p",{className:"my-3 break-words leading-6 first:mt-0 last:mb-0",children:e}),"p"),ul:r(({children:e})=>jsx("ul",{className:"my-3 list-disc space-y-1 pl-6",children:e}),"ul"),ol:r(({children:e})=>jsx("ol",{className:"my-3 list-decimal space-y-1 pl-6",children:e}),"ol"),li:r(({children:e})=>jsx("li",{className:"break-words leading-6",children:e}),"li"),blockquote:r(({children:e})=>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})=>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})=>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})=>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})=>jsx("div",{className:"my-4 max-w-full overflow-x-auto rounded-lg border border-border/60",children:jsx("table",{className:"min-w-full border-collapse text-sm",children:e})}),"table"),thead:r(({children:e})=>jsx("thead",{className:"bg-muted/55",children:e}),"thead"),tbody:r(({children:e})=>jsx("tbody",{className:"divide-y divide-border/60",children:e}),"tbody"),tr:r(({children:e})=>jsx("tr",{className:"divide-x divide-border/60",children:e}),"tr"),th:r(({children:e})=>jsx("th",{className:"whitespace-nowrap px-3 py-2 text-left font-semibold",children:e}),"th"),td:r(({children:e})=>jsx("td",{className:"min-w-32 px-3 py-2 align-top",children:e}),"td"),hr:r(()=>jsx("hr",{className:"my-6 border-border"}),"hr")};function zk({content:e,className:t}){let o=String(e||"").trim();return o?jsx("div",{className:l("min-w-0 max-w-full text-sm text-foreground",t),"data-monkeys-component":"markdown-content",children:jsx(Dk,{remarkPlugins:[Lk],components:Ak,skipHtml:true,urlTransform:defaultUrlTransform,children:o})}):jsx("div",{className:l("text-sm text-muted-foreground",t),children:"\u2014"})}r(zk,"MarkdownContent");function Ok({viewMode:e="list",heading:t,metadata:o,message:n,actions:a,outputs:s,children:i,className:m,...c}){return 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",m),children:[jsxs("div",{"data-task-part":"details",className:l("flex min-w-0 flex-col",e==="grid"?"flex-1":"min-h-60"),children:[jsx("div",{className:"mb-global flex flex-wrap items-center gap-global",children:t}),o!=null&&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}),i,n!=null&&jsx("div",{className:"mt-global break-words text-sm text-destructive-text",children:n}),a!=null&&jsx("div",{className:"mt-auto flex flex-wrap gap-global pt-global",children:a})]}),s!=null&&jsx("div",{"data-task-part":"outputs",className:l("min-w-0 w-full",e==="grid"&&"-order-1"),children:s})]})}r(Ok,"WorkbenchTaskCard");function _k({title:e,filters:t,sortOrder:o,viewMode:n,onSortOrderChange:a,onViewModeChange:s,labels:i,disabled:m,className:c}){return jsx(zs,{"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:jsxs(Fragment,{children:[t,jsxs("div",{className:"flex items-center gap-global",children:[jsx(ve,{type:"button",variant:"outline",disabled:m,title:i.sort,icon:o==="latest"?jsx(ArrowDownWideNarrow,{}):jsx(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"?i.latest:i.oldest}),jsx(ve,{type:"button",variant:"outline",disabled:m,icon:n==="list"?jsx(Grid2X2,{}):jsx(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:()=>s(n==="list"?"grid":"list"),children:n==="list"?i.gridView:i.listView})]})]}),children:e})}r(_k,"WorkbenchTaskToolbar");function $k({items:e=[],children:t,hasOutputs:o,viewMode:n="list",ariaLabel:a,previewLabel:s,processingLabel:i,processing:m=false,emptyState:c,onPreview:d,className:g}){let u=n==="grid"?"aspect-square w-full":"aspect-square w-[calc((100%-3*var(--global-spacing))/4)] min-w-32 max-w-48";return 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?jsx("button",{type:"button",onClick:()=>d(p),"aria-label":p.previewLabel||s,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",u),children:p.content},p.id):jsx("div",{className:l("flex shrink-0 snap-start items-center justify-center overflow-hidden rounded-lg border bg-muted/20",u),children:p.content},p.id):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))&&(m?jsx("div",{role:"status","aria-label":i,className:l("flex shrink-0 items-center justify-center rounded-lg border bg-gradient-to-br from-muted via-background to-muted",u),children: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"})}):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($k,"WorkbenchTaskOutputs");function Jk({src:e,kind:t,alt:o,expanded:n=false,loading:a=false,failed:s=false,loadingLabel:i,errorLabel:m,onError:c,renderMedia:d}){return d?jsx(Fragment,{children:d({src:e,kind:t,alt:o,expanded:n,loadingLabel:i,errorLabel:m})}):a?jsx("span",{role:"status","aria-label":i,children:jsx(Loader2,{"aria-hidden":"true",className:"size-6 animate-spin text-muted-foreground motion-reduce:animate-none"})}):s||!e||t==="3d"?jsx("span",{role:"img","aria-label":m,children:jsx(ImageOff,{"aria-hidden":"true",className:"size-6 text-muted-foreground"})}):t==="video"?jsxs("span",{className:n?"contents":"relative block size-full",children:[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&&jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 flex items-center justify-center",children: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:jsx(Play,{className:"ml-0.5 size-5 !fill-[hsl(var(--monkeys-color-media-foreground))] !stroke-[hsl(var(--monkeys-color-media-foreground))] sm:size-6"})})})]}):jsx(ar,{src:e,alt:o,loading:"lazy",onError:c,className:n?"h-auto w-auto max-h-[75vh] max-w-full":void 0})}r(Jk,"WorkbenchTaskMedia");function ow({text:e,labels:t,className:o}){let n=useId(),a=useRef(null),s=useRef(null),[i,m]=useState(false),[c,d]=useState(false),[g,u]=useState(false),[p,f]=useState(false),[b,h]=useState(3),y=e||t.empty;return useEffect(()=>{m(false),u(false),f(false);},[y]),useEffect(()=>{let v=s.current,k=a.current;if(!v||!k)return;let x=r(()=>{let T=getComputedStyle(v),E=Number.parseFloat(T.lineHeight)||20,N=k.closest('[data-record-layout="horizontal"]'),O=!!N,V=O?k.closest('[data-record-part="details"]'):null,W=N?.querySelector('[data-record-part="media"]'),F=V?Array.from(V.children).slice(Array.from(V.children).indexOf(k)+1).reduce((M,$)=>{let J=getComputedStyle($),_=J.marginTop==="auto"?0:Number.parseFloat(J.marginTop)||0,ee=J.marginBottom==="auto"?0:Number.parseFloat(J.marginBottom)||0;return M+$.getBoundingClientRect().height+_+ee},0):0,H=k.clientHeight||E*3+40;if(O&&V){let M=k.getBoundingClientRect(),$=V.getBoundingClientRect();H=Math.max(H,$.bottom-M.top-F);}else if(!O)H=k.clientHeight||E*3+40;else if(N&&W){let M=k.getBoundingClientRect(),$=W.getBoundingClientRect(),J=M.top-$.top;H=Math.max(H,$.height-J);}let I=v.cloneNode(true);I.style.cssText=["position:absolute","visibility:hidden","display:block","height:auto","max-height:none",`width:${v.getBoundingClientRect().width}px`,"overflow:visible","flex:none","-webkit-line-clamp:unset"].join(";"),k.appendChild(I);let G=I.scrollHeight||v.scrollHeight;I.remove();let q=Math.max(E,H-40),R=O?G>H+1:G>q+1,D=Math.max(1,Math.floor(q/E));h(D),d(R),f(O),u(true);},"measure");if(x(),typeof ResizeObserver>"u")return;let w=new ResizeObserver(x);w.observe(v),w.observe(k);let S=k.closest('[data-record-layout="horizontal"]')?.querySelector('[data-record-part="details"]');return S&&w.observe(S),()=>w.disconnect()},[y]),jsxs("div",{ref:a,"data-monkeys-component":"workbench-task-prompt","data-expanded":i||void 0,"data-overflowing":g&&p&&c?"true":void 0,style:g&&p&&!c?{blockSize:"auto",minBlockSize:0}: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:[jsx("p",{ref:s,id:n,className:l("min-h-0 flex-1 whitespace-pre-wrap break-words text-sm leading-5 text-foreground [overflow-wrap:anywhere]"),style:i||!c?void 0:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:b,overflow:"hidden"},children:y}),(c||i)&&jsxs("button",{type:"button","aria-expanded":i,"aria-controls":n,onClick:()=>m(v=>!v),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:[i?t.less:t.more,i?jsx(ChevronUp,{"aria-hidden":"true",className:"size-4"}):jsx(ChevronDown,{"aria-hidden":"true",className:"size-4"})]})]})}r(ow,"WorkbenchTaskPrompt");function nw({kind:e="media",viewMode:t="list",text:o,previewLabel:n,children:a,onPreview:s}){if(e==="text")return 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??a});let i=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"&&s?jsx("button",{type:"button",className:l(i,"focus-visible:outline focus-visible:outline-2"),"aria-label":n,onClick:s,children:a}):jsx("div",{className:i,children:a})}r(nw,"WorkbenchTaskOutputItem");function sw({filename:e,preview:t,previewLabel:o,downloadLabel:n,downloading:a=false,disabled:s=false,onPreview:i,onDownload:m}){return 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?jsx("button",{type:"button",onClick:i,"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}):jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-global-1/2",children:jsx(FileSpreadsheet,{className:"size-10 text-green-600","aria-hidden":"true"})}),jsxs("div",{className:"flex shrink-0 items-center gap-global-1/2 border-t p-global-1/2",children:[jsxs("div",{className:"min-w-0 flex-1",children:[jsx("p",{className:"line-clamp-2 break-all text-sm font-medium",title:e,children:e}),jsx("p",{className:"text-sm text-muted-foreground",children:"XLSX"})]}),jsx("button",{type:"button","aria-label":n,title:n,disabled:s||a||!m,onClick:m,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?jsx(Loader2,{className:"size-4 animate-spin motion-reduce:animate-none"}):jsx(Download,{className:"size-4"})})]})]})}r(sw,"WorkbenchTaskSpreadsheet");function cw({startTime:e,endTime:t,running:o=false,mode:n="absolute",className:a}){let{locale:s}=xt(),[i,m]=useState(Date.now);useEffect(()=>{if(n==="absolute"||n==="duration"&&!o)return;let f=setInterval(()=>{document.visibilityState==="visible"&&m(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?i:void 0;if(!e||!f||f<e)return null;let b=(f-e)/1e3;return 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(s,{dateStyle:"medium",timeStyle:"medium"}).format(c),g=Math.max(0,(i-c)/1e3),[u,p]=g<60?[g,"second"]:g<3600?[g/60,"minute"]:g<86400?[g/3600,"hour"]:[g/86400,"day"];return jsx("time",{className:a,dateTime:new Date(c).toISOString(),title:d,children:n==="absolute"?d:new Intl.RelativeTimeFormat(s,{numeric:"auto"}).format(-Math.floor(u),p)})}r(cw,"WorkbenchTaskTime");function pw({data:e,viewMode:t="list",title:o,openLabel:n,closeLabel:a,renderEditor:s}){let[i,m]=useState(false),[c,d]=useState(5),g=useRef(null);return useEffect(()=>{let u=g.current;if(!u)return;let p=r(()=>{let b=getComputedStyle(u),h=Number.parseFloat(b.lineHeight),y=Number.parseFloat(b.rowGap)||0;h>0&&d(Math.max(0,Math.floor((u.clientHeight+y)/(h+y))));},"measure");if(p(),typeof ResizeObserver>"u")return;let f=new ResizeObserver(p);return f.observe(u),()=>f.disconnect()},[]),jsxs("section",{className:"monkeys-task-measurements","data-view-mode":t,children:[jsxs("div",{className:"flex size-full flex-col gap-global overflow-hidden rounded-lg border border-border bg-background p-global text-left",children:[jsx("span",{className:"text-sm font-medium",children:e.garment_type||o}),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(u=>u.size!==null&&u.size!==0).slice(0,c).map((u,p)=>jsxs("div",{className:"contents",children:[jsx("dt",{className:"truncate",children:u.name}),jsxs("dd",{children:[u.size," ",u.unit]})]},p))}),jsx(ve,{label:n,onClick:()=>m(true)})]}),jsx(Nn,{open:i,onOpenChange:m,title:o,closeLabel:a,portal:true,className:"w-[min(60rem,95vw)] max-w-none",children:i&&jsx("div",{className:"max-h-[75vh] min-w-0 overflow-auto",children:s({data:e})})})]})}r(pw,"WorkbenchMeasurementsPreview");function vw({item:e,playLabel:t,selectionMode:o}){let[n,a]=useState(false);if(useEffect(()=>a(false),[e.thumbnailSrc,e.src]),e.notice||e.status==="blocked")return 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 s=n?e.src:e.thumbnailSrc||e.src;return s?e.mediaType==="video"?jsxs("div",{"data-history-video-surface":true,className:"group relative size-full bg-[hsl(var(--monkeys-color-media-surface))]",children:[jsx("video",{src:s,autoPlay:true,muted:true,playsInline:true,preload:"metadata",onLoadedMetadata:({currentTarget:i})=>{Number.isFinite(i.duration)&&i.duration>0&&(i.currentTime=Math.min(.1,i.duration/2));},onLoadedData:({currentTarget:i})=>{i.currentTime>0&&i.pause();},onSeeked:({currentTarget:i})=>i.pause(),className:"size-full object-contain","aria-label":e.alt}),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)]"}),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:jsx(Play,{className:"size-4 fill-current"})})]}):jsx("img",{src:s,alt:e.alt??"",loading:"lazy",onError:()=>{!n&&e.src&&s!==e.src&&a(true);},className:"size-full object-contain opacity-100"}):jsx("div",{className:"size-full bg-muted","aria-hidden":"true"})}r(vw,"HistoryMedia");function kw({items:e,loading:t=false,loadingMore:o=false,error:n,hasMore:a=false,pageKey:s,expanded:i,selectedIds:m,selectionMode:c,className:d,itemClassName:g,labels:u,busy:p=false,popupScale:f=1,panelClassName:b,buttonClassName:h,buttonVariant:y="outline",onRetry:v,onLoadMore:k,onExpandedChange:x,onSelectionModeChange:w,onSelectedIdsChange:C,onItemActivate:S,onDelete:T,onItemDragStart:E}){let N=useRef(null),[O,V]=useState(),[W,F]=useState(false),[H,I]=useState(false),[G,q]=useState([]),R=i??W,D=c??H,M=m??G,$=useMemo(()=>new Set(M),[M]),J=useRef(M);J.current=M;let _=Number.isFinite(f)&&f>0?f:1;useLayoutEffect(()=>{if(!R||!N.current)return;let B=0,j=r(()=>{let ye=N.current?.getBoundingClientRect();ye&&V({left:ye.left,width:ye.width,bottom:Math.max(0,window.innerHeight-ye.bottom)});},"measure"),ne=r(()=>{cancelAnimationFrame(B),B=requestAnimationFrame(j);},"schedule");j();let fe=typeof ResizeObserver=="function"?new ResizeObserver(ne):void 0;return fe?.observe(N.current),window.addEventListener("resize",ne),window.addEventListener("scroll",ne,true),()=>{fe?.disconnect(),cancelAnimationFrame(B),window.removeEventListener("resize",ne),window.removeEventListener("scroll",ne,true);}},[R]),useEffect(()=>{let B=new Set(e.map(ne=>ne.id)),j=M.filter(ne=>B.has(ne));j.length!==M.length&&(q(j),C?.(j));},[e,M,C]);let ee=r(B=>{i===void 0&&F(B),x?.(B);},"setExpanded"),K=r(B=>{c===void 0&&I(B),w?.(B),B||Z([]);},"setSelection"),Z=r(B=>{J.current=B,m===void 0&&q(B),C?.(B);},"updateSelection"),re=r(B=>{if(p||B.selectable===false)return;let j=J.current;Z(j.includes(B.id)?j.filter(ne=>ne!==B.id):[...j,B.id]);},"toggle"),ae=r(B=>{let j=$.has(B.id),ne=B.selectable!==false&&!p;return jsxs("div",{"data-history-selection-key":B.id,"data-history-item-id":B.id,role:D?"checkbox":"button","aria-checked":D?j:void 0,"aria-label":D?B.label??u.selectItem:B.alt,"aria-disabled":(D?!ne:B.disabled)||void 0,tabIndex:(D?ne:!B.disabled)?0:void 0,draggable:!!(B.draggable&&!D&&!B.disabled),onDragStart:fe=>{if(!B.draggable||D||B.disabled){fe.preventDefault();return}E?.(fe,B);},onClick:fe=>{D?(fe.stopPropagation(),re(B)):B.disabled||S?.(B);},onKeyDown:fe=>{(fe.key===" "||fe.key==="Enter")&&(fe.preventDefault(),D?re(B):B.disabled||S?.(B));},...B.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",j&&"border-primary ring-2 ring-primary/70",B.disabled&&"opacity-60",D&&ne&&"cursor-pointer",g),children:[jsx(vw,{item:B,playLabel:u.playVideo,selectionMode:D}),D&&ne?jsx("span",{className:"pointer-events-none absolute right-1 top-1 z-10 flex items-center justify-center",children:jsx(dn,{checked:j,controlSize:"sm","aria-hidden":"true",tabIndex:-1,readOnly:true})}):null]},B.id)},"renderItem"),le=r(B=>jsx(Xo,{items:e,config:{getItemKey:r(j=>j.id,"getItemKey"),layout:{mode:B,cardWidth:B==="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:s,variant:"spinner",autoFill:true},windowed:true,appearance:{hover:"none"},labels:{collection:u.ariaLabel,loading:u.loading,loadingMore:u.loadingMore,empty:u.empty}},classNames:{loadMore:"h-px min-h-0 overflow-hidden"},slots:{loadMore:jsx("span",{"aria-hidden":"true",className:"block h-px"})},callbacks:{onLoadMore:B==="grid"||!R?k:void 0},renderItem:ae}),"collection"),L=r((B,j,ne,fe=false)=>jsx(ve,{icon:jsx(B,{className:"size-full"}),iconOnly:true,ariaLabel:j,size:"md",variant:y,className:h,disabled:fe,onClick:ne}),"button"),me=jsxs("div",{role:"alert",className:"flex min-h-20 flex-col items-center justify-center gap-1 p-2 text-center text-sm",children:[jsx("span",{children:u.loadError}),jsx("span",{className:"text-xs text-muted-foreground",children:u.loadErrorDescription}),v?jsx(ve,{size:"sm",variant:"outline",label:u.retry,onClick:v}):null]});return jsxs("div",{ref:N,"data-workbench-history-result":true,className:l("relative w-full min-w-0 max-w-full rounded-lg",b,d),children:[e.length?jsxs("div",{className:"flex min-w-0 items-center gap-2 p-3",children:[L(R?Minimize2:Maximize2,R?u.collapse:u.expand,()=>ee(!R)),jsx("div",{className:"min-w-0 flex-1",children:le("rail")})]}):t?jsx(jo,{title:u.loading,variant:"spinner",className:"min-h-20 p-2"}):n?me:jsx(va,{title:u.empty,className:"min-h-20 p-2"}),R&&typeof document<"u"?createPortal(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:O?.left??0,width:(O?.width??0)/_,bottom:O?.bottom??0,transform:`scale(${_})`,transformOrigin:"left bottom"},children:[jsxs("div",{className:"max-h-[50vh] overflow-y-auto p-3",style:{marginBottom:72,maxHeight:"50vh",overflowY:"auto"},children:[le("grid"),n&&e.length?jsxs("div",{role:"alert",className:"flex items-center gap-2 text-xs",children:[u.refreshError,v?jsx(ve,{size:"sm",label:u.retry,onClick:v}):null]}):null]}),jsxs("div",{className:"absolute inset-x-3 bottom-3 flex items-center justify-between gap-2",children:[L(Minimize2,u.collapse,()=>ee(false)),jsx("div",{className:"flex items-center gap-1.5",children:D?jsxs(Fragment,{children:[jsx("span",{className:"rounded-full border border-border px-2 py-1 text-xs",children:u.selectedCount}),L(X,u.exitSelection,()=>K(false),p),T?L(Trash2,u.deleteSelected,()=>{p||T(M);},!M.length||p):null]}):T?L(Trash2,u.enterSelection,()=>K(true),p):null})]})]}),document.body):null]})}r(kw,"WorkbenchHistoryResult");function Tw({open:e,title:t,description:o,name:n,nameLabel:a,namePlaceholder:s,createLabel:i,cancelLabel:m,closeLabel:c,creating:d=false,error:g,showError:u=true,className:p,onOpenChange:f,onNameChange:b,onCreate:h}){let y=useId(),v=useRef(null),[k,x]=useState(false),[w,C]=useState(null),S=useRef(false),T=useRef(false);useEffect(()=>{e||(S.current=false,C(null),x(false));},[e]);let E=d,N=r(W=>{!E&&!T.current&&f?.(W);},"close"),O=r(async()=>{if(!(!n.trim()||E||T.current||S.current||!h)){T.current=true,x(true);try{await h();}finally{T.current=false;}}},"create"),V={radius:"lg"};return jsx(Nn,{open:e,onOpenChange:N,title:t,description:o,closeLabel:c,closeOnEscape:!E,closeOnOverlayClick:!E,showCloseButton:!E,portal:true,initialFocus:"explicit",initialFocusRef:v,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:jsxs("div",{className:"flex justify-end gap-2",children:[jsx(ve,{size:"lg",appearance:V,className:"text-sm",disabled:E,onClick:()=>N(false),children:m}),jsx(ve,{size:"lg",tone:"primary",appearance:{...V,slots:{buttonPrimary:"border-primary bg-primary text-primary-foreground hover:bg-primary/90"}},className:"text-sm",loading:d,disabled:E||!n.trim(),onClick:O,children:i})]}),children:jsxs("div",{className:"space-y-4","data-monkeys-component":"create-collection-dialog",children:[jsxs("div",{className:"space-y-2 py-2",children:[jsx("label",{htmlFor:y,className:"text-sm font-medium leading-5",children:a}),jsx(rr,{ref:v,id:y,maxLength:80,"aria-label":a,placeholder:s,value:w??n,disabled:E,onCompositionStart:W=>{S.current=true,C(W.currentTarget.value);},onCompositionEnd:W=>{S.current=false,C(null),b?.(W.currentTarget.value);},onChange:W=>{S.current?C(W.currentTarget.value):b?.(W.currentTarget.value);},onKeyDown:W=>{W.key==="Enter"&&!W.nativeEvent.isComposing&&!S.current&&(W.preventDefault(),O());}})]}),k&&!d&&u&&g&&jsx("div",{role:"alert",className:"text-sm text-destructive-text",children:g})]})})}r(Tw,"WorkbenchCreateCollectionDialog");function Ew({open:e,items:t,selectedId:o,name:n,title:a,description:s,nameLabel:i,namePlaceholder:m,createLabel:c,confirmLabel:d,cancelLabel:g,closeLabel:u,loadingLabel:p,emptyLabel:f,loading:b=false,creating:h=false,adding:y=false,createError:v,confirmError:k,showCreateError:x=true,showConfirmError:w=true,className:C,onOpenChange:S,onSelectedIdChange:T,onNameChange:E,onCreate:N,onConfirm:O}){let V=useId(),W=useRef(null),F=useRef(false),H=useRef(false),[I,G]=useState(null);useEffect(()=>{e||(F.current=false);},[e]);let q=h||y||I!==null,R=t.some($=>$.id===o),D=r($=>{!q&&!H.current&&S?.($);},"close"),M=r(async $=>{let J=$==="create"?N:O;if(!(q||H.current||!J||($==="create"?!n.trim()||F.current:!R))){H.current=true,G($);try{await J();}catch{}finally{H.current=false,G(null);}}},"submit");return jsx(Nn,{open:e,onOpenChange:D,title:a,description:s,closeLabel:u,portal:true,closeOnEscape:!q,closeOnOverlayClick:!q,showCloseButton:!q,initialFocus:"explicit",initialFocusRef:W,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:jsxs("div",{className:"flex justify-end gap-global",children:[jsx(ve,{variant:"outline",className:"h-10",appearance:{radius:"lg"},disabled:q,onClick:()=>D(false),children:g}),jsx(ve,{variant:"outline",className:"h-10",appearance:{radius:"lg"},disabled:q||!R,loading:y||I==="confirm",onClick:()=>M("confirm"),children:d})]}),children:jsxs("div",{className:"flex min-h-0 flex-col gap-global-2","data-monkeys-component":"add-to-collection-dialog","aria-busy":q||b,children:[jsxs("div",{className:"flex items-center gap-global",children:[jsx(rr,{ref:W,id:V,"aria-label":i,placeholder:m,appearance:"shadow",className:"min-w-0 flex-1",value:n,disabled:q,onChange:$=>E?.($.currentTarget.value),onCompositionStart:()=>{F.current=true;},onCompositionEnd:()=>{F.current=false;},onKeyDown:$=>{$.key==="Enter"&&!$.nativeEvent.isComposing&&!F.current&&($.preventDefault(),M("create"));}}),jsx(ve,{variant:"outline",appearance:{radius:"lg"},icon:jsx(FolderPlus,{}),className:"h-10 shrink-0",disabled:q||!n.trim(),loading:h||I==="create",onClick:()=>M("create"),children:c})]}),x&&v&&jsx("p",{role:"alert",className:"text-sm text-destructive-text",children:v}),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?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($=>jsx(ve,{variant:"outline",icon:jsx(FolderOpen,{className:"size-4 shrink-0","aria-hidden":"true"}),endIcon:o===$.id?jsx(Check,{className:"size-4 shrink-0","aria-hidden":"true"}):void 0,label:$.name,classNames:{label:"min-w-0 flex-1 truncate text-left"},"aria-pressed":o===$.id,disabled:q,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===$.id?"border-foreground bg-muted text-foreground":"border-border bg-background text-foreground hover:bg-muted"),onClick:()=>T?.($.id)},$.id))}),w&&k&&jsx("p",{role:"alert",className:"text-sm text-destructive-text",children:k})]})})}r(Ew,"WorkbenchAddToCollectionDialog");function Dw({renderPreview:e,...t}){return jsx(Fragment,{children:e(t)})}r(Dw,"WorkbenchMediaPreview");
|
|
30
30
|
|
|
31
31
|
export { om as EmojiPanel, gk as IconPicker, Ky as InteractiveTable, Uy as InteractiveTableEditableTextCell, qy as InteractiveTableReadonlyCell, Yy as InteractiveTableSelectCell, $n as LAYOUT_CANVAS_GRID, Ck as LayoutCanvas, Tk as LayoutCatalogItem, zk as MarkdownContent, Pk as OrderedSelection, ux as RecordView, tk as RuntimeFileExplorer, Mk as RuntimeSourceControlView, Kv as RuntimeTerminalView, Nk as TemplateTextEditor, Mv as WebPreviewFrame, Ew as WorkbenchAddToCollectionDialog, Ev as WorkbenchAssetGallery, Xo as WorkbenchCollection, Uf as WorkbenchContentPane, zs as WorkbenchContentToolbar, Tw as WorkbenchCreateCollectionDialog, Ty as WorkbenchDetailSidebar, Rv as WorkbenchEvidenceList, js as WorkbenchGalleryCard, Ua as WorkbenchGallerySettingsButton, Cc as WorkbenchGallerySettingsPanel, bx as WorkbenchGallerySkeleton, cx as WorkbenchGalleryView, kw as WorkbenchHistoryResult, kv as WorkbenchJourneyNavigation, Bx as WorkbenchLaneView, Or as WorkbenchMasonryLayout, pw as WorkbenchMeasurementsPreview, Dw as WorkbenchMediaPreview, Px as WorkbenchMetricGrid, fx as WorkbenchPageSkeleton, Fv as WorkbenchRadarFilterChip, Ov as WorkbenchRadarFilterRow, Av as WorkbenchRadarInspectorSection, jv as WorkbenchRadarMatrix, Uu as WorkbenchRadarNavigation, Lv as WorkbenchRadarWorkspace, Cv as WorkbenchRankedList, pv as WorkbenchRelationshipGraph, jf as WorkbenchResizableSidebar, hv as WorkbenchScatterPlot, Tv as WorkbenchSelectionTray, zy as WorkbenchTableView, Ok as WorkbenchTaskCard, Jk as WorkbenchTaskMedia, nw as WorkbenchTaskOutputItem, $k as WorkbenchTaskOutputs, ow as WorkbenchTaskPrompt, sw as WorkbenchTaskSpreadsheet, cw as WorkbenchTaskTime, _k as WorkbenchTaskToolbar, Pi as applyLayoutCanvasOperation, Xu as prepareRuntimeTerminalOutput, fl as renderIconPickerEmoji, Qs as useWorkbenchCollectionSelection, jn as validateLayoutCanvasModel };
|
|
32
32
|
//# sourceMappingURL=index.mjs.map
|