@inf-monkeys-tech/monkeys-design 2.0.202 → 2.0.203
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
|
@@ -61,7 +61,7 @@ var Qe__namespace = /*#__PURE__*/_interopNamespace(Qe);
|
|
|
61
61
|
var wk__default = /*#__PURE__*/_interopDefault(wk);
|
|
62
62
|
var Sk__default = /*#__PURE__*/_interopDefault(Sk);
|
|
63
63
|
|
|
64
|
-
var Cm=Object.defineProperty;var r=(e,t)=>Cm(e,"name",{value:t,configurable:true});function l(...e){return tailwindMerge.twMerge(e.filter(Boolean).join(" "))}r(l,"cn");function A(e){return e!=null&&typeof e!="boolean"}r(A,"hasRenderableNode");function Pl(e){return typeof e=="string"?e.trim().length>0:A(e)}r(Pl,"hasNonEmptyRenderableNode");var Im=st.createContext(void 0);function El(e){let t=st.useContext(Im);return st.useMemo(()=>e?t?{...t,...e,slots:{...t.slots,...e.slots},styles:{...t.styles,...e.styles}}:e:t,[e,t])}r(El,"useDataExplorerAppearance");function Ft(...e){return e.filter(Boolean).join(" ")}r(Ft,"cn");function Jn(e,t){return typeof e=="function"?e(t):e}r(Jn,"resolveDataExplorerValue");var Mm={},Wl={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"},Bm={flush:{surfaceRoot:"relative flex h-full min-h-0 w-full min-w-0 overflow-hidden"}},Pm={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"}},Em={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"}},Dm={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"}},Wm={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"}},Dl={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"}},Lm={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"}},Am=Object.keys(Wl);function zm(...e){return Am.reduce((t,o)=>(t[o]=Ft(...e.map(n=>n?.[o])),t),{})}r(zm,"mergeSlots");function Om(...e){return e.reduce((t,o)=>({...t,...o}),{})}r(Om,"mergeStyles");function Fm(e){let t=Dl[e];if(!t)throw new TypeError(`Unknown Data Explorer theme preset "${String(e)}". Expected one of: ${Object.keys(Dl).join(", ")}.`);return t}r(Fm,"getPresetDefaults");function Ll(e){let t=e?.preset??"default",o=e?.surface??"card",n=Fm(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=zm(Wl,Lm[t],Pm[a],Em[s],Dm[i],Wm[m],e?.slots);return o==="flush"&&(c.surfaceRoot=Ft(Bm.flush.surfaceRoot,e?.slots?.surfaceRoot)),{surface:o,preset:t,density:a,radius:s,border:i,background:m,styles:Om(Mm,e?.styles),slots:c}}r(Ll,"resolveDataExplorerAppearance");function Al(e,t){if(t==="primary")return e.slots.menuItemPrimary;if(t==="danger")return e.slots.menuItemDanger;if(t==="muted")return e.slots.menuItemMuted}r(Al,"getDataExplorerMenuItemToneClassName");var Pi={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 zl(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(zl,"mergeMonkeysLocaleMessages");var Xn={locale:Pi.locale,messages:zl(Pi.messages)};var Hm=Object.freeze({}),Vm=Object.freeze({}),Ol=Symbol.for("@inf-monkeys-tech/monkeys-design/provider-context@1");function Gm(){return Object.freeze({locale:st.createContext({...Xn,provided:false}),theme:st.createContext({provided:false}),direction:st.createContext({provided:false}),environment:st.createContext({provided:false,environment:Hm,portal:Vm})})}r(Gm,"createMonkeysProviderContexts");function _m(){let e=globalThis,t=e[Ol];if(t)return t;let o=Gm();return Object.defineProperty(e,Ol,{value:o,enumerable:false,configurable:false,writable:false}),o}r(_m,"getMonkeysProviderContexts");var Qr=_m(),Ei=Qr.locale,ea=Qr.theme,Hl=Qr.direction,ta=Qr.environment;function jm(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(jm,"mergeAppearance");function ht(){try{return st.useContext(Ei)??{...Xn,provided:!1}}catch{return {...Xn,provided:false}}}r(ht,"useMonkeysLocale");function xt(){return st.useContext(Ei).messages}r(xt,"useMonkeysLocaleMessages");function nn(){return st.useContext(ea).resolvedTheme}r(nn,"useMonkeysResolvedTheme");function ze(e){let t=st.useContext(ea).baseAppearance;return st.useMemo(()=>jm(t,e),[e,t])}r(ze,"useMonkeysBaseAppearance");function Co(){return st.useContext(ea).statusStates??{}}r(Co,"useMonkeysStatusStates");function Di(){return st.useContext(Hl).direction}r(Di,"useMonkeysDirection");function Wi(){return st.useContext(ta).environment}r(Wi,"useMonkeysEnvironment");function Li(){return st.useContext(ta).portal}r(Li,"useMonkeysPortalOptions");function Ne(){let e=st.useContext(Ei),t=st.useContext(ea),o=st.useContext(Hl),n=e.provided||t.provided||o.provided;return st.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 Ai(){return st.useContext(ta).iconResolver}r(Ai,"useMonkeysAssetIconResolver");function Vl(){return st.useContext(ta).imageResolver}r(Vl,"useMonkeysAssetImageResolver");var $m={},ft="motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",Jt="motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",oa="motion-safe:transition-transform motion-safe:duration-300 motion-safe:ease-out",Gl=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"),Km=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",ft),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",ft),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",ft),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",ft),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",oa),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",ft),switchThumb:l("h-4 w-4 translate-x-1 rounded-full bg-background shadow-sm",oa),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",ft),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",ft),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",ft,"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",ft),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",ft),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",ft),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",ft),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",oa,"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)]",Gl,ft),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",Km),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",ft),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]",Gl),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",ft),tableRowInteractive:"cursor-pointer [--base-table-row-hover-bg:hsl(var(--muted)_/_0.35)] hover:bg-[var(--base-table-row-hover-bg)] hover:[&>*]: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",ft),tableHeadSortIcon:l("inline-flex h-3 w-3 shrink-0 items-center justify-center text-muted-foreground",oa),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",ft),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",ft),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",ft),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",ft),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"},Um={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"}},qm={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"}},Ym={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"}},Jm={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"}},_l={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"}},Xm={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 Zm(e){return _l[e]??_l.default}r(Zm,"getPresetDefaults");var Qm=Object.keys(jl);function ep(...e){return Qm.reduce((t,o)=>(t[o]=l(...e.map(n=>n?.[o])),t),{})}r(ep,"mergeSlots");function tp(...e){return Object.assign({},...e.filter(Boolean))}r(tp,"mergeStyles");function Ee(e){let t=e?.preset??"default",o=e?.variant??"default",n=Zm(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:tp($m,e?.styles),slots:ep(jl,Xm[t],Um[a],qm[i],Ym[m],Jm[c],e?.slots)}}r(Ee,"resolveBaseAppearance");function na(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(na,"getBaseButtonToneClassName");function $l(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($l,"getBaseBadgeToneClassName");function Zn(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(Zn,"getBaseMenuItemToneClassName");var Kl=Symbol.for("@inf-monkeys-tech/monkeys-design/bento-depth@1"),Ul=globalThis,ql=Ul[Kl]??(Ul[Kl]=st.createContext(0));function Qn(){return st.useContext(ql)}r(Qn,"useBentoDepth");function er({children:e,depth:t}){return jsxRuntime.jsx(ql.Provider,{value:t,children:e})}r(er,"BentoDepthProvider");function zo({children:e}){return jsxRuntime.jsx(er,{depth:0,children:e})}r(zo,"BentoScope");var ra=["background","glowColor","borderColor","borderWidth","borderStyle","radius","shadow","padding","gap"],rp={background:"hsl(var(--card, 0 0% 100%))",glowColor:"var(--monkeys-bento-glow-default)",borderColor:"hsl(var(--border, 214.3 31.8% 91.4%))",borderWidth:"1px",borderStyle:"solid",radius:"var(--radius, 0.75rem)",shadow:"none",padding:"var(--global-spacing, 0.75rem)",gap:"var(--global-spacing, 0.75rem)"},zi=new WeakMap;function Jl(e,t){if(!Number.isSafeInteger(t)||t<1)throw new RangeError("Bento level must be a positive safe integer.");let o=e&&zi.get(e)?.get(t);if(o)return o;let n={...rp},a=Object.fromEntries(ra.map(i=>[i,"builtin"]));for(let i of ra){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=zi.get(e)??new Map;i.set(t,s),zi.set(e,i);}return s}r(Jl,"resolveBentoTokens");var Xl="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 aa(){let e=Qn(),t=e+1,o=Jl(nn(),t),n=Object.fromEntries(ra.map(a=>[`--monkeys-bento-${a.replace(/[A-Z]/g,s=>`-${s.toLowerCase()}`)}`,o.values[a]]));return {parentDepth:e,level:t,variables:n}}r(aa,"useBentoSurface");function Ql({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 w=Ee({...g,variant:u,density:p,state:f}),x=e,k=a!==void 0?A(a):A(t)||A(o),C=n!=null,S=!k&&!C;return jsxRuntime.jsxs(x,{...v,"aria-disabled":d||void 0,"data-variant":w.variant,"data-density":w.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(w.slots.panelRoot,m&&!d&&w.slots.panelInteractive,c&&w.slots.panelSelected,d&&w.slots.panelDisabled,h?.root,b),style:{...w.styles.panel,...y},children:[C?jsxRuntime.jsx("div",{"data-slot":"media",className:l(w.slots.panelMedia,h?.media),children:n}):null,k?jsxRuntime.jsx("div",{"data-slot":"header",className:l(w.slots.panelHeader,h?.header),style:w.styles.panelHeader,children:a!==void 0?a:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[A(t)?jsxRuntime.jsx("div",{"data-slot":"title",className:l(w.slots.panelTitle,h?.title),children:t}):null,A(o)?jsxRuntime.jsx("div",{"data-slot":"description",className:l(w.slots.panelDescription,h?.description),children:o}):null]})}):null,i!=null?jsxRuntime.jsx("div",{"data-slot":"body",className:l(w.slots.panelBody,S&&w.slots.panelBodyStandalone,h?.body),style:w.styles.panelBody,children:i}):null,s!=null?jsxRuntime.jsx("div",{"data-slot":"footer",className:l(w.slots.panelFooter,h?.footer),style:w.styles.panelFooter,children:s}):null]})}r(Ql,"BasePanel");var ip=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 ed({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}=aa(),b=ze(c),h=n==="panel",y=ip(b?.styles?.panelBody,[d?.body,o,b?.slots?.panelBody].join(" "));return jsxRuntime.jsx(er,{depth:h?p:u,children:jsxRuntime.jsx(Ql,{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:{...!y||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&&!y&&"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?jsxRuntime.jsxs("div",{className:l("flex min-w-0 flex-1 items-center justify-between gap-token-md",a&&"flex-wrap"),children:[jsxRuntime.jsxs("div",{className:l("flex min-w-0 flex-1 items-center gap-token-sm",a&&"basis-auto"),children:[i?jsxRuntime.jsx("span",{className:"inline-flex size-8 shrink-0 items-center justify-center rounded-md border border-primary/30 bg-primary/10 text-primary",children:jsxRuntime.jsx(i,{className:"size-4 text-primary",color:"currentColor",stroke:"currentColor"})}):null,jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("h2",{className:"truncate text-base font-semibold text-foreground",children:s}),g.description?jsxRuntime.jsx("div",{className:"mt-1 text-sm text-muted-foreground",children:g.description}):null]})]}),m?jsxRuntime.jsx("div",{className:l("shrink-0",a&&"max-w-full"),children:m}):null]}):void 0,...g,"data-monkeys-bento-level":h?p:void 0,style:{...h?f:{},...g.style},children:e})})}r(ed,"BentoPanel");var sp={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",sp[e],t.rounded===false?void 0:"monkeys-overlay-surface--rounded"].filter(Boolean).join(" ")}r(an,"getOverlaySurfaceClassName");var mp=st__namespace.forwardRef(({className:e,style:t,...o},n)=>jsxRuntime.jsx(So__namespace.Item,{ref:n,className:l("border-b",e),style:{borderColor:"var(--monkeys-component-accordion-item-border-color, hsl(var(--border)))",...t},...o}));mp.displayName="AccordionItem";var pp=st__namespace.forwardRef(({className:e,children:t,...o},n)=>jsxRuntime.jsx(So__namespace.Header,{className:"flex",children:jsxRuntime.jsxs(So__namespace.Trigger,{ref:n,className:l("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...o,children:[t,jsxRuntime.jsx(lucideReact.ChevronDown,{"aria-hidden":"true",className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));pp.displayName="AccordionTrigger";var gp=st__namespace.forwardRef(({className:e,children:t,...o},n)=>jsxRuntime.jsx(So__namespace.Content,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o,children:jsxRuntime.jsx("div",{className:l("pb-4 pt-0",e),children:t})}));gp.displayName="AccordionContent";var bp=st__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(ia__namespace.Root,{ref:o,className:l("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:jsxRuntime.jsx(ia__namespace.Indicator,{className:"flex items-center justify-center text-current",children:jsxRuntime.jsx(lucideReact.Check,{"aria-hidden":"true",className:"h-4 w-4"})})}));bp.displayName="Checkbox";var tr=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_[data-slot=icon]]:text-[inherit] [&_[data-slot=icon]_*]:!text-[inherit] [&_[data-slot=icon]_svg]:!stroke-current [&_[data-slot=icon]_svg_*]:!stroke-current [&_[data-slot=end-icon]]:text-[inherit] [&_[data-slot=end-icon]_*]:!text-[inherit] [&_[data-slot=end-icon]_svg]:!stroke-current [&_[data-slot=end-icon]_svg_*]:!stroke-current [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-control-surface shadow-sm ring-offset-control-surface hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-sm px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),fp=st__namespace.forwardRef(({className:e,variant:t,size:o,asChild:n=false,...a},s)=>jsxRuntime.jsx(n?reactSlot.Slot:"button",{ref:s,className:tr({variant:t,size:o,className:e}),...a}));fp.displayName="Button";var yp=st__namespace.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=Qn();return jsxRuntime.jsxs(so__namespace.Root,{ref:g,type:c??(u>0?"auto":void 0),className:l("group relative overflow-hidden",m&&"no-scrollbar",e),...d,children:[jsxRuntime.jsx(so__namespace.Viewport,{ref:n,onScroll:a,className:l("h-full w-full rounded-[inherit]",o),children:t}),s?jsxRuntime.jsx(td,{orientation:i,className:l(m&&"size-0 p-0")}):null,jsxRuntime.jsx(so__namespace.Corner,{})]})});yp.displayName="ScrollArea";var td=st__namespace.forwardRef(({className:e,orientation:t="vertical",...o},n)=>jsxRuntime.jsx(so__namespace.ScrollAreaScrollbar,{ref:n,"data-monkeys-scrollbar":"",orientation:t,className:l("flex touch-none select-none opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100 data-[state=visible]:opacity-100",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-px",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-px",e),...o,children:jsxRuntime.jsx(so__namespace.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));td.displayName="ScrollBar";var hp=st__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(sa__namespace.Root,{ref:o,className:l("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,children:jsxRuntime.jsx(sa__namespace.Thumb,{className:"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"})}));hp.displayName="Switch";var xp=st__namespace.forwardRef(({variant:e="default",...t},o)=>jsxRuntime.jsx(Oo__namespace.Root,{ref:o,"data-variant":e,...t}));xp.displayName="Tabs";var vp=st__namespace.forwardRef(({className:e,gap:t,style:o,...n},a)=>jsxRuntime.jsx(Oo__namespace.List,{ref:a,className:l("inline-flex h-10 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),style:{gap:t,...o},...n}));vp.displayName="TabsList";var kp=st__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(Oo__namespace.Trigger,{ref:o,className:l("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));kp.displayName="TabsTrigger";var wp=st__namespace.forwardRef(({className:e,...t},o)=>{let n=Qn();return jsxRuntime.jsx(Oo__namespace.Content,{ref:o,className:l("mt-2 ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n>0&&"gap-[var(--monkeys-bento-gap)]",e),...t})});wp.displayName="TabsContent";var Cp=st__namespace.forwardRef(({className:e,sideOffset:t=4,...o},n)=>{let a=Ne();return jsxRuntime.jsx(lo__namespace.Portal,{children:jsxRuntime.jsx(lo__namespace.Content,{...a,...o,ref:n,sideOffset:t,"data-monkeys-component":"tooltip","data-slot":"content","data-surface":"menu",className:l("z-50 overflow-hidden border px-3 py-1.5 text-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",an("menu"),e)})})});Cp.displayName="TooltipContent";var or=st__namespace.forwardRef(({className:e,appearance:t="standard",type:o,...n},a)=>jsxRuntime.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}));or.displayName="Input";var Sp=st__namespace.forwardRef(({className:e,appearance:t="standard",...o},n)=>jsxRuntime.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}));Sp.displayName="Textarea";function la(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(la,"svgPreviewSurface");var Tp=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"),Vi=st__namespace.forwardRef(({aspectRatio:e="square",maxSquareHeight:t=true,className:o,...n},a)=>jsxRuntime.jsx("div",{ref:a,className:Tp({aspectRatio:e,maxSquareHeight:t,className:o}),...n}));Vi.displayName="MediaPreviewFrame";var nr=st__namespace.forwardRef(({fit:e="contain",className:t,style:o,...n},a)=>{let s=la(n.src);return jsxRuntime.jsx("img",{ref:a,className:l("block size-full",e==="contain"?"object-contain":"object-cover",t),style:{...s,...s?{objectFit:e}:{},...o},...n})});nr.displayName="MediaPreviewImage";var ad=Symbol.for("@inf-monkeys-tech/monkeys-design/dialog-dock@1"),id=globalThis,Ip=id[ad]??(id[ad]=st__namespace.createContext(null)),Lt=r(()=>st__namespace.useContext(Ip),"useDialogDock");var Gi=st__namespace.forwardRef(({children:e,className:t,style:o,closeLabel:n="Close",showCloseButton:a=true,onInteractOutside:s,...i},m)=>{let c=Lt(),d=st__namespace.useId(),g=st__namespace.useRef(null),u=st__namespace.useRef(false);return st__namespace.useEffect(()=>{u.current&&!c?.collapsed&&c?.activeId===d&&g.current?.focus(),u.current=!!c?.collapsed;},[c?.collapsed,c?.activeId,d]),st__namespace.useEffect(()=>c?.register(d),[c?.register,d]),c?.container?jsxRuntime.jsx(bt__namespace.Portal,{container:c.container,children:jsxRuntime.jsx("div",{style:{display:"contents"},children:jsxRuntime.jsx(zo,{children:jsxRuntime.jsx(ed,{className:"monkeys-dialog-dock-panel overflow-auto",contentClassName:"shrink-0",style:{display:c.activeId===d?void 0:"none"},children:jsxRuntime.jsxs(bt__namespace.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&&jsxRuntime.jsx("button",{ref:g,type:"button",className:"monkeys-dialog-dock-collapse","aria-label":c.collapseLabel,title:c.collapseLabel,"aria-expanded":!c.collapsed,onClick:()=>c.setCollapsed(true),children:jsxRuntime.jsx(lucideReact.PanelRightClose,{"aria-hidden":"true",className:"size-4"})}),a&&jsxRuntime.jsxs(bt__namespace.Close,{className:"monkeys-dialog-dock-close","aria-label":typeof n=="string"?n:void 0,children:[jsxRuntime.jsx(lucideReact.X,{"aria-hidden":"true",className:"size-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:n})]})]})})})})}):null});Gi.displayName="DockedDialogContent";var ld=Symbol.for("@inf-monkeys-tech/monkeys-design/dialog-open@1"),dd=globalThis,cd=dd[ld]??(dd[ld]=st__namespace.createContext(false));function ca({open:e,defaultOpen:t,onOpenChange:o,modal:n,...a}){let s=Lt(),[i,m]=st__namespace.useState(t??false),c=e??i;return jsxRuntime.jsx(cd.Provider,{value:c,children:jsxRuntime.jsx(bt__namespace.Root,{...a,open:c,modal:s?false:n,onOpenChange:d=>{m(d),o?.(d);}})})}r(ca,"Dialog");var Bp=bt__namespace.Portal;var ud=st__namespace.forwardRef(({className:e,...t},o)=>{let n=Ne();return jsxRuntime.jsx(bt__namespace.Overlay,{...n,...t,ref:o,className:l("theme-overlay-backdrop fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),"data-monkeys-component":"dialog","data-slot":"overlay","data-monkeys-overlay":true})});ud.displayName="DialogOverlay";var md=st__namespace.forwardRef(({className:e,...t},o)=>{let n=Ne();return jsxRuntime.jsx(bt__namespace.Content,{...n,...t,ref:o,className:e,"data-monkeys-component":"dialog","data-slot":"content","data-surface":"dialog","data-monkeys-dialog-content":true})});md.displayName="DialogSurfaceContent";var ln=st__namespace.forwardRef(({className:e,children:t,showCloseButton:o=true,closeLabel:n="Close",overlayClassName:a,overlayStyle:s,...i},m)=>{let c=Lt(),d=st__namespace.useContext(cd);return c?d?jsxRuntime.jsx(Gi,{...i,ref:m,className:e,showCloseButton:o,closeLabel:n,children:t}):null:jsxRuntime.jsxs(Bp,{children:[jsxRuntime.jsx(ud,{className:a,style:s}),jsxRuntime.jsxs(md,{...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:[jsxRuntime.jsx(zo,{children:t}),o?jsxRuntime.jsxs(bt__namespace.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-dialog-surface transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[jsxRuntime.jsx(lucideReact.X,{"aria-hidden":"true",className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:n})]}):null]})]})});ln.displayName="DialogContent";var Pp=st__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(ln,{ref:o,className:l("duration-0 data-[state=open]:animate-none data-[state=closed]:animate-none",e),...t}));Pp.displayName="DialogContentNoAnimation";var Ep=r(({className:e,...t})=>jsxRuntime.jsx("div",{className:l(Lt()?.showTitle===false?"contents":"flex flex-col space-y-1.5 text-center sm:text-left",e),...t}),"DialogHeader");Ep.displayName="DialogHeader";var Dp=r(({className:e,...t})=>jsxRuntime.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),"DialogFooter");Dp.displayName="DialogFooter";var rr=st__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(bt__namespace.Title,{ref:o,className:l("text-lg font-semibold leading-none tracking-tight",e,Lt()?.showTitle===false&&"sr-only"),...t}));rr.displayName="DialogTitle";var ar=st__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(bt__namespace.Description,{ref:o,className:l("text-sm text-muted-foreground",e),...t}));ar.displayName="DialogDescription";st__namespace.forwardRef((e,t)=>{let o=Lt()?bt__namespace.Trigger:wt__namespace.Trigger;return jsxRuntime.jsx(o,{...e,ref:t})});var Wp=wt__namespace.Portal,pd=st__namespace.forwardRef(({className:e,style:t,...o},n)=>{let a=Ne();return jsxRuntime.jsx(wt__namespace.Overlay,{...a,...o,ref:n,className:l("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),"data-monkeys-component":"alert-dialog","data-slot":"overlay","data-monkeys-overlay":true,style:{pointerEvents:"auto",...t}})});pd.displayName="AlertDialogOverlay";var Lp=st__namespace.forwardRef(({className:e,style:t,children:o,...n},a)=>{let s=Ne();return Lt()?jsxRuntime.jsx(ln,{...n,...s,ref:a,role:"alertdialog",showCloseButton:false,className:e,style:t,children:o}):jsxRuntime.jsxs(Wp,{children:[jsxRuntime.jsx(pd,{}),jsxRuntime.jsx(wt__namespace.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:jsxRuntime.jsx(zo,{children:o})})]})});Lp.displayName="AlertDialogContent";var Ap=r(({className:e,...t})=>jsxRuntime.jsx("div",{className:l("flex flex-col space-y-2 text-center sm:text-left",e),...t}),"AlertDialogHeader"),zp=r(({className:e,...t})=>jsxRuntime.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),"AlertDialogFooter"),Op=st__namespace.forwardRef(({className:e,...t},o)=>{let n=Lt()?bt__namespace.Title:wt__namespace.Title;return jsxRuntime.jsx(n,{ref:o,className:l("text-lg font-semibold",e,Lt()?.showTitle===false&&"sr-only"),...t})}),Fp=st__namespace.forwardRef(({className:e,...t},o)=>{let n=Lt()?bt__namespace.Description:wt__namespace.Description;return jsxRuntime.jsx(n,{ref:o,className:l("text-sm text-muted-foreground",e),...t})}),Hp=st__namespace.forwardRef(({className:e,...t},o)=>{let n=Lt()?bt__namespace.Close:wt__namespace.Action;return jsxRuntime.jsx(n,{ref:o,className:l(tr(),e),...t})}),Vp=st__namespace.forwardRef(({className:e,...t},o)=>{let n=Lt()?bt__namespace.Close:wt__namespace.Action;return jsxRuntime.jsx(n,{ref:o,className:l(tr({variant:"destructive"}),e),...t})}),Gp=st__namespace.forwardRef(({className:e,...t},o)=>{let n=Lt()?bt__namespace.Close:wt__namespace.Cancel;return jsxRuntime.jsx(n,{ref:o,className:l(tr({variant:"outline"}),"mt-2 sm:mt-0",e),...t})});Ap.displayName="AlertDialogHeader";zp.displayName="AlertDialogFooter";Op.displayName="AlertDialogTitle";Fp.displayName="AlertDialogDescription";Hp.displayName="AlertDialogAction";Vp.displayName="AlertDialogDangerAction";Gp.displayName="AlertDialogCancel";var fd=Xt__namespace.Root,yd=Xt__namespace.Trigger;var _i=st__namespace.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 jsxRuntime.jsx(Xt__namespace.Portal,{container:n??d,children:jsxRuntime.jsx(Xt__namespace.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"));_i.displayName=Xt__namespace.Content.displayName;var hd=["pulse","shimmer","shimmer-soft","shimmer-diagonal","shimmer-vertical","drift","outline","none"];function vd(e,t=false){if(!(e===void 0||hd.includes(e))&&!(t&&(e==="shimmer-shared"||e==="shimmer-stagger")))throw new TypeError(`Skeleton animation must be ${hd.join(", ")}${t?", shimmer-shared, or shimmer-stagger":""}.`)}r(vd,"validateSkeletonAnimation");var $i=st.createContext(null),sr=st.createContext(void 0);function Ki(e){delete e.dataset.skeletonReady;for(let t of ["width","offset","delay"])e.style.removeProperty(`--monkeys-skeleton-${t}`);}r(Ki,"clearGeometry");function jp(e,t,o,n){let a=st.useMemo(()=>({nodes:new Map,update:r(()=>{},"update")}),[]);return st.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()),w=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),R=parseFloat(T.width)+E,F=R?v[S].width/R:1;return Math.abs(F-1)<1e-4?1:F}),x=Math.min(...v.map(C=>C.left)),k=Math.max(...v.map(C=>C.right));b.forEach((C,S)=>{let T=v[S];if(!T.width||!T.height){Ki(C);return}let E=w[S];C.style.setProperty("--monkeys-skeleton-width",`${(k-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)=>Ki(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]),st.useEffect(()=>{a.update();}),a}r(jp,"useGroupRegistry");function Ho({animation:e,animated:t,children:o,independent:n=false,containerRef:a}){if(vd(e,true),t!==void 0&&typeof t!="boolean")throw new TypeError("SkeletonGroup animated must be a boolean.");let s=st.useContext($i),i=st.useContext(sr),m=n||e!==void 0||!s,c=e??s?.animation??"pulse",d=!!s?.disabled||t===false||c==="none",g=jp(c,d,m,a),u=st.useMemo(()=>({animation:c,disabled:d,registry:m?g:s.registry}),[c,d,m,g,s]),p=jsxRuntime.jsx($i.Provider,{value:u,children:o});return jsxRuntime.jsx(sr.Provider,{value:m?void 0:i,children:p})}r(Ho,"SkeletonScope");function Tn({index:e,children:t}){let o=st.useContext(sr);return jsxRuntime.jsx(sr.Provider,{value:o??e,children:t})}r(Tn,"SkeletonItem");function $p(e,t){return st.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($p,"useSkeletonRef");function kd(e,t=true,o){vd(e);let n=st.useContext($i),a=st.useContext(sr),s=!t||n?.disabled?"none":e??n?.animation??"pulse",[i,m]=st.useState(null),c=$p(m,o),d=e===void 0&&(s==="shimmer-shared"||s==="shimmer-stagger")?n?.registry:void 0;return st.useEffect(()=>{if(!(!i||!d))return d.nodes.set(i,{item:a}),d.update(),()=>{d.nodes.delete(i),Ki(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(kd,"useSkeletonMotion");function Cd(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(Cd,"resolveBaseFieldValidationResult");var Yi=st.createContext(null);function Vo(){let e=st.useContext(Yi),t=st.useRef(null);t.current===null&&(t.current=Symbol("BaseFieldControl"));let o=e?.registerControl;st.useEffect(()=>{if(!(!o||t.current===null))return o(t.current)},[o]);let n=e?.notifyBlur,a=e?.notifyChange;return {invalid:e?.invalid??false,notifyBlur:st.useCallback(s=>n?.(s),[n]),notifyChange:st.useCallback(s=>a?.(s),[a])}}r(Vo,"useBaseFieldControl");var eg={sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"},tg={sm:"text-[10px]",md:"text-[11px]",lg:"text-xs"};function og(e,...t){for(let o of t)if(o){if(typeof o=="function"){o(e);continue}o.current=e;}}r(og,"setRefs");var dn=st.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 w=ze(m),x=Ne(),k=Ee(w),C=Vo(),S=a||C.invalid,T=A(t),E=Pl(o),R=st.useRef(null),F=st.useRef(n);F.current=n;let[_,z]=st.useState(p??false),O=u!==void 0,j=!!(O?u:_),I=n||j,V=n?"mixed":j?"checked":"unchecked",$=st.useCallback(D=>{R.current=D,D&&(D.indeterminate=F.current),og(D,v);},[v]);st.useEffect(()=>{R.current&&(R.current.indeterminate=n);},[n]);let N=r(D=>{s||(O||z(D.currentTarget.checked),b?.(D),C.notifyChange(D.currentTarget.checked),R.current&&(R.current.indeterminate=n));},"handleChange");return jsxRuntime.jsxs("label",{...x,"data-monkeys-component":"checkbox","data-slot":"root","data-state":V,"data-size":i,"data-invalid":S||void 0,"data-disabled":s||void 0,className:l(k.slots.checkboxRoot,!E&&"items-center",s&&k.slots.checkboxDisabled,d?.root,c),style:{...k.styles.checkboxRoot,...g},children:[jsxRuntime.jsxs("span",{"data-slot":"box","data-state":V,"data-size":i,className:l(k.slots.checkboxBox,!E&&"mt-0",I&&k.slots.checkboxBoxChecked,S&&k.slots.checkboxBoxInvalid,i&&eg[i],d?.box),style:{...k.styles.checkboxBox},children:[jsxRuntime.jsx("input",{...y,ref:$,type:"checkbox",disabled:s,checked:u,defaultChecked:p,"aria-invalid":h??(S||void 0),"aria-checked":n?"mixed":j,"data-slot":"input","data-state":V,"data-size":i,"data-invalid":S||void 0,"data-disabled":s||void 0,className:l(k.slots.checkboxInput,d?.input),onBlur:D=>{f?.(D),C.notifyBlur(D.currentTarget.checked);},onChange:N}),I?jsxRuntime.jsx("span",{"aria-hidden":"true","data-slot":"indicator","data-state":V,"data-size":i,className:l(k.slots.checkboxIndicator,i&&tg[i],d?.indicator),children:n?"\u2013":"\u2713"}):null]}),T||E?jsxRuntime.jsxs("span",{"data-slot":"content",className:l(k.slots.checkboxContent,d?.content),children:[T?jsxRuntime.jsx("span",{"data-slot":"label",className:l(k.slots.checkboxLabel,d?.label),children:t}):null,E?jsxRuntime.jsx("span",{"data-slot":"description",className:l(k.slots.checkboxDescription,d?.description),children:o}):null]}):null]})},"BaseCheckbox"));function Xi(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(Xi,"resolveContainerValue");function Td({explicitProvided:e,explicitContainer:t,providerProvided:o,providerContainer:n,getDocument:a}){if(e)return Xi(t,"BasePortal container");if(o)return Xi(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 Xi(s.body,"MonkeysProvider environment.getDocument().body")}r(Td,"resolveBasePortalContainer");function ig({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=Td({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(ig,"resolveBaseOverlayPortalState");function sg(){return globalThis.document??null}r(sg,"getDefaultDocument");function To(e={}){let t=Wi(),o=Li(),[n,a]=st.useState(false);return st.useEffect(()=>{a(true);},[]),ig({mounted:n,explicitDisabled:e.disabled,explicitContainer:e.container,providerDisabled:o.disabled,providerContainer:o.container,getDocument:t.getDocument??sg})}r(To,"useBaseOverlayPortal");function Rd(e,t){return t.shouldPortal?reactDom.createPortal(e,t.container):jsxRuntime.jsx(jsxRuntime.Fragment,{children:e})}r(Rd,"renderBaseOverlayPortalContent");function ma(e,t){if(typeof e!="boolean")throw new TypeError(`BaseTooltip ${t} must be a boolean.`)}r(ma,"validateBoolean");function gg(e){if(e!=="top"&&e!=="bottom"&&e!=="left"&&e!=="right")throw new TypeError('BaseTooltip placement must be "top", "bottom", "left", or "right".')}r(gg,"validatePlacement");function bg(e,t){return st.isValidElement(e)&&e.type!==st.Fragment?e:jsxRuntime.jsx("span",{tabIndex:!t&&A(e)?0:void 0,children:e})}r(bg,"normalizeTrigger");var lr=st.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&&ma(n,"open"),ma(a,"defaultOpen"),ma(i,"disabled"),ma(m,"portal"),gg(s);let h=ze(c),y=Ne(),v=Ee(h),w=To({disabled:!m}),[x,k]=st.useState(a),C=n!==void 0,S=!i&&A(t),E=S&&(C?n:x),R=m&&w.shouldPortal?"portaled":"inline",F=r(O=>{O&&!S||(C||k(O),p?.(O));},"handleOpenChange"),_=bg(o,i),z=S?jsxRuntime.jsx(lo__namespace.Content,{...y,side:s,sideOffset:8,collisionPadding:8,"data-monkeys-component":"tooltip","data-slot":"content","data-placement":s,"data-portal":R,"data-disabled":i||void 0,className:l(v.slots.tooltipContent,g?.content),style:v.styles.tooltip,children:t}):null;return jsxRuntime.jsx("span",{...y,...f,ref:b,"data-monkeys-component":"tooltip","data-slot":"root","data-state":E?"open":"closed","data-placement":s,"data-portal":R,"data-disabled":i||void 0,className:l(v.slots.tooltipRoot,g?.root,d),style:u,children:jsxRuntime.jsx(lo__namespace.Provider,{delayDuration:0,skipDelayDuration:0,disableHoverableContent:true,children:jsxRuntime.jsxs(lo__namespace.Root,{open:E,onOpenChange:F,delayDuration:0,disableHoverableContent:true,children:[jsxRuntime.jsx("span",{...y,"data-monkeys-component":"tooltip","data-slot":"trigger-wrapper","data-state":E?"open":"closed","data-placement":s,"data-portal":R,"data-disabled":i||void 0,className:l(v.slots.tooltipTrigger,g?.trigger),children:jsxRuntime.jsx(lo__namespace.Trigger,{asChild:true,...y,"data-monkeys-component":"tooltip","data-slot":"trigger","data-placement":s,"data-portal":R,"data-disabled":i||void 0,children:_})}),m&&w.shouldPortal?jsxRuntime.jsx(lo__namespace.Portal,{...w.radixPortalProps,children:z}):z]})})})},"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 Nd(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(Nd,"safeDisplaySrcSet");function Id({kind:e}){return jsxRuntime.jsx(e==="image"?lucideReact.Image:e==="video"?lucideReact.Video:e==="audio"?lucideReact.Music2:lucideReact.FileText,{className:"h-6 w-6","aria-hidden":"true"})}r(Id,"PreviewIcon");function Bd({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]=st.useState(false),w=Zt(e,"media")??"",x=Object.fromEntries(Object.entries(f??{}).flatMap(([T,E])=>{let R=T.toLowerCase();return R==="src"||R==="srcdoc"||R==="dangerouslysetinnerhtml"?[]:R==="srcset"?[["srcSet",Nd(E)]]:R==="poster"?[["poster",Zt(E,"media")]]:[[T,E]]}));st.useEffect(()=>{v(false);},[w,t]);let k=r((T,E)=>jsxRuntime.jsx("div",{className:Ft("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 jsxRuntime.jsx("div",{className:Ft("min-w-0 overflow-hidden",p?.root,g),style:u,"aria-busy":"true",children:jsxRuntime.jsxs("div",{className:Ft("flex min-h-24 flex-col items-center justify-center gap-2 bg-muted/30 p-4 text-sm text-muted-foreground",p?.loading),children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"h-5 w-5 animate-spin","aria-hidden":"true"}),n||"Loading preview..."]})});if(!w||y)return jsxRuntime.jsx("div",{className:Ft("min-w-0 overflow-hidden",p?.root,g),style:u,children:k(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Id,{kind:t}),jsxRuntime.jsx("span",{className:Ft("max-w-full truncate",y?p?.error:void 0),children:y?d:c}),n?jsxRuntime.jsx("span",{className:"max-w-full truncate text-xs",children:n}):null]}))});let C=r(()=>{v(true),h?.();},"handleError"),S=t==="image"?jsxRuntime.jsx(nr,{...x,src:w,alt:o,fit:s,className:p?.media,loading:"lazy",decoding:"async",draggable:false,onLoad:b,onError:C}):t==="video"?jsxRuntime.jsx("video",{...x,src:w,className:Ft("block h-auto w-full",s==="cover"?"object-cover":"object-contain",p?.media),controls:i,preload:"metadata",onLoadedData:b,onError:C}):t==="audio"?jsxRuntime.jsx("audio",{...x,src:w,className:Ft("w-full",p?.media),controls:i,preload:"metadata",onCanPlay:b,onError:C}):k(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Id,{kind:"file"}),jsxRuntime.jsx("span",{className:"max-w-full truncate",children:n||w})]}));return t==="image"?jsxRuntime.jsx(Vi,{aspectRatio:a,className:Ft(p?.root,g),style:u,children:S}):jsxRuntime.jsx("div",{className:Ft("min-w-0 overflow-hidden",p?.root,g),style:u,children:S})}r(Bd,"DataExplorerMediaPreview");var un=st.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=ze(s),h=Ne(),y=Ee({...b,variant:i,density:m,state:c}),v=t??o,w=a??"default";return jsxRuntime.jsxs("span",{...h,...p,ref:f,"data-monkeys-component":"badge","data-slot":"root","data-tone":w,"data-variant":y.variant,"data-density":y.density,"data-state":y.state,className:l(y.slots.badgeBase,$l(y,a),g?.root,d),style:{...y.styles.badge,...u},children:[n?jsxRuntime.jsx("span",{"data-slot":"icon","data-tone":w,className:l(y.slots.badgeIcon,g?.icon),children:n}):null,v!=null?jsxRuntime.jsx("span",{"data-slot":"label","data-tone":w,className:l(y.slots.badgeLabel,g?.label),children:v}):null]})},"BaseBadge"));var Ng={sm:"h-8 px-2.5 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-3.5 text-base"},Ig={sm:"h-8 w-8 px-0",md:"h-9 w-9 px-0",lg:"h-10 w-10 px-0"},Qi={sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"};function pa(e){return typeof e=="string"&&e.trim()?e:void 0}r(pa,"nonEmptyText");function Mg(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-full w-full motion-safe:animate-spin motion-reduce:animate-none",fill:"none",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"9",className:"opacity-25",stroke:"currentColor",strokeWidth:"3"}),jsxRuntime.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M12 3a9 9 0 0 1 9 9h-3a6 6 0 0 0-6-6V3Z"})]})}r(Mg,"LoadingIcon");var ve=st.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:w,className:x,classNames:k,style:C,onClick:S,"aria-label":T,"aria-pressed":E,...R},F){for(let[te,U]of [["active",g],["iconOnly",u],["disabled",p],["loading",f],["stopPropagation",b]])if(typeof U!="boolean")throw new TypeError(`BaseButton ${te} 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 _=ze(h),z=Ne(),O=Ee({..._,variant:y,density:v,state:w}),j=t??o,I=A(j)&&(typeof j!="string"||!!j.trim()),V=pa(m)??pa(T),$=typeof j=="string"?pa(j):void 0,N=pa(i);if(u&&!I&&!V&&!N)throw new TypeError("BaseButton iconOnly requires ariaLabel, aria-label, title, or a renderable label.");let D=V??$??N,M=p||f,K=c??"default",J=w??(f?"loading":p?"disabled":g?"active":"idle"),G=r(te=>{b&&te.stopPropagation(),!M&&S?.(te);},"handleClick");return jsxRuntime.jsxs("button",{...z,...R,ref:F,type:s,title:i,"aria-label":D,"aria-pressed":E??(g||void 0),"aria-busy":f||void 0,"data-variant":O.variant,"data-density":O.density,disabled:M,"data-monkeys-component":"button","data-slot":"root","data-state":J,"data-tone":K,"data-size":d,"data-active":g||void 0,"data-loading":f||void 0,"data-disabled":M||void 0,"data-icon-only":u||void 0,className:l(O.slots.buttonBase,u&&O.slots.buttonIconOnly,d&&Ng[d],u&&d&&Ig[d],na(O,c,g),M&&O.slots.buttonDisabled,k?.root,x),style:{...O.styles.button,...g?O.styles.buttonActive:void 0,...M?O.styles.buttonDisabled:void 0,...C},onClick:G,children:[f?jsxRuntime.jsx("span",{"data-slot":"icon","data-state":J,"data-tone":K,"data-size":d,className:l(O.slots.buttonIcon,d&&Qi[d],k?.icon),children:jsxRuntime.jsx(Mg,{})}):n?jsxRuntime.jsx("span",{"data-slot":"icon","data-state":J,"data-tone":K,"data-size":d,className:l(O.slots.buttonIcon,d&&Qi[d],k?.icon),children:n}):null,u?A(j)?jsxRuntime.jsx("span",{"data-slot":"label","data-state":J,"data-tone":K,"data-size":d,className:"sr-only",children:j}):null:A(j)?jsxRuntime.jsx("span",{"data-slot":"label","data-state":J,"data-tone":K,"data-size":d,className:l(O.slots.buttonLabel,k?.label),children:j}):null,!f&&a?jsxRuntime.jsx("span",{"data-slot":"end-icon","data-state":J,"data-tone":K,"data-size":d,className:l(O.slots.buttonIcon,d&&Qi[d],k?.icon,k?.endIcon),children:a}):null]})},"BaseButton"));var Bg=["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 ga(e){if(e!==void 0&&!Bg.includes(e))throw new TypeError('BaseContextMenu tone must be "default", "primary", "success", "warning", "danger", or "muted".')}r(ga,"validateTone");function Pg(e){if(e!==void 0&&e!=="ltr"&&e!=="rtl")throw new TypeError('BaseContextMenu dir must be "ltr" or "rtl".')}r(Pg,"validateDirection");function Eg(){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:jsxRuntime.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 4.5"})})}r(Eg,"CheckIcon");function Dg(){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3.5 w-3.5",fill:"currentColor",children:jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"3"})})}r(Dg,"DotIcon");function Wg(){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:jsxRuntime.jsx("path",{d:"m6 4 4 4-4 4"})})}r(Wg,"ChevronRightIcon");function es({label:e,icon:t,shortcut:o,children:n,classNames:a,inset:s,indicator:i}){let m=n??e;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[i||null,A(t)?jsxRuntime.jsx("span",{"data-slot":"icon",className:l(a?.icon),children:t}):s?jsxRuntime.jsx("span",{"aria-hidden":"true","data-slot":"icon",className:"h-4 w-4 shrink-0"}):null,A(m)?jsxRuntime.jsx("span",{"data-slot":"label",className:l(a?.label),children:m}):null,A(o)?jsxRuntime.jsx("span",{"data-slot":"shortcut",className:l(a?.shortcut),children:o}):null]})}r(es,"renderItemContent");function Dd({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"),Pg(s);let g=Di(),u=ze(i);return jsxRuntime.jsxs(Qe__namespace.Root,{onOpenChange:d,modal:a,dir:s??g,children:[t?jsxRuntime.jsx(ts,{disabled:n,appearance:u,className:l(c?.trigger,m),children:t}):null,o?jsxRuntime.jsx(os,{appearance:u,className:c?.content,children:o}):null,e]})}r(Dd,"BaseContextMenu");var ts=st.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=ze(a),g=Ne(),u=Ee(d);return jsxRuntime.jsx(Qe__namespace.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")),os=st.forwardRef(r(function({children:t,appearance:o,className:n,classNames:a,style:s,...i},m){let c=ze(o),d=Ne(),g=Ee(c),u=To(),p=jsxRuntime.jsx(Qe__namespace.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?jsxRuntime.jsx(Qe__namespace.Portal,{...u.radixPortalProps,children:p}):p},"BaseContextMenuContent")),Wd=st.forwardRef(r(function({children:t,appearance:o,className:n,style:a,...s},i){let m=ze(o),c=Ne(),d=Ee(m);return jsxRuntime.jsx(Qe__namespace.Label,{...c,...s,ref:i,"data-monkeys-component":"context-menu","data-slot":"label",className:l(d.slots.menuLabel,n),style:a,children:t})},"BaseContextMenuLabel")),Ld=st.forwardRef(r(function({appearance:t,className:o,style:n,...a},s){let i=ze(t),m=Ne(),c=Ee(i);return jsxRuntime.jsx(Qe__namespace.Separator,{...m,...a,ref:s,"data-monkeys-component":"context-menu","data-slot":"separator",className:l(c.slots.menuSeparator,o),style:n})},"BaseContextMenuSeparator")),Rn=st.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"),ga(s);let h=s??"default",y=ze(c),v=Ne(),w=Ee(y);return jsxRuntime.jsx(Qe__namespace.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(w.slots.menuItem,Zn(w,s),i&&w.slots.menuItemDisabled,g?.root,d),style:{...w.styles.menuItem,...u},onSelect:x=>{if(i){x.preventDefault();return}p?.(x);},children:es({children:t,label:o,icon:n,shortcut:a,inset:m,classNames:{icon:l(w.slots.menuItemIcon,g?.icon),label:l(w.slots.menuItemLabel,g?.label),shortcut:l(w.slots.menuItemShortcut,g?.shortcut)}})})},"BaseContextMenuItem"));st.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"),ga(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",w=ze(g),x=Ne(),k=Ee(w);return jsxRuntime.jsx(Qe__namespace.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(k.slots.menuItem,"pl-8",Zn(k,s),i&&k.slots.menuItemDisabled,p?.root,u),style:{...k.styles.menuItem,...f},onSelect:C=>{if(i){C.preventDefault();return}b?.(C);},children:es({children:t,label:o,icon:n,shortcut:a,inset:m,classNames:{icon:l(k.slots.menuItemIcon,p?.icon),label:l(k.slots.menuItemLabel,p?.label),shortcut:l(k.slots.menuItemShortcut,p?.shortcut)},indicator:jsxRuntime.jsx(Qe__namespace.ItemIndicator,{"data-slot":"indicator",className:l(k.slots.menuCheckboxIndicator,p?.indicator),children:jsxRuntime.jsx(Eg,{})})})})},"BaseContextMenuCheckboxItem"));st.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"),ga(s);let y=s??"default",v=ze(d),w=Ne(),x=Ee(v);return jsxRuntime.jsx(Qe__namespace.RadioItem,{...w,...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",Zn(x,s),i&&x.slots.menuItemDisabled,u?.root,g),style:{...x.styles.menuItem,...p},onSelect:k=>{if(i){k.preventDefault();return}f?.(k);},children:es({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:jsxRuntime.jsx(Qe__namespace.ItemIndicator,{"data-slot":"indicator",className:l(x.slots.menuRadioIndicator,u?.indicator),children:jsxRuntime.jsx(Dg,{})})})})},"BaseContextMenuRadioItem"));st.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"),ga(a);let f=a??"default",b=ze(m),h=Ne(),y=Ee(b),v=t??o;return jsxRuntime.jsxs(Qe__namespace.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,Zn(y,a),s&&y.slots.menuItemDisabled,d?.root,c),style:{...y.styles.menuItem,...g},children:[A(n)?jsxRuntime.jsx("span",{"data-slot":"icon",className:l(y.slots.menuItemIcon,d?.icon),children:n}):i?jsxRuntime.jsx("span",{"aria-hidden":"true","data-slot":"icon",className:"h-4 w-4 shrink-0"}):null,A(v)?jsxRuntime.jsx("span",{"data-slot":"label",className:l(y.slots.menuItemLabel,d?.label),children:v}):null,jsxRuntime.jsx("span",{"data-slot":"sub-indicator",className:l(y.slots.menuSubTriggerIcon,d?.shortcut,"rtl:rotate-180"),children:jsxRuntime.jsx(Wg,{})})]})},"BaseContextMenuSubTrigger"));st.forwardRef(r(function({children:t,appearance:o,className:n,classNames:a,style:s,sideOffset:i=6,...m},c){let d=ze(o),g=Ne(),u=Ee(d),p=To(),f=jsxRuntime.jsx(Qe__namespace.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?jsxRuntime.jsx(Qe__namespace.Portal,{...p.radixPortalProps,children:f}):f},"BaseContextMenuSubContent"));var Ag={1:"grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-2 xl:grid-cols-3"};function rs({items:e,columns:t=1,appearance:o,className:n,classNames:a,style:s,children:i,...m}){let c=Ee(o);return jsxRuntime.jsxs("dl",{...m,className:l(c.slots.descriptionListRoot,Ag[t],a?.root,n),style:{...c.styles.descriptionList,...s},children:[e?.map((d,g)=>jsxRuntime.jsxs("div",{className:l(c.slots.descriptionListItem,a?.item),children:[jsxRuntime.jsx("dt",{className:l(c.slots.descriptionListTerm,a?.term),children:d.term}),jsxRuntime.jsx("dd",{className:l(c.slots.descriptionListValue,a?.value),children:d.value})]},g)),i]})}r(rs,"BaseDescriptionList");var Hg=["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 Vg(e){if(!Hg.includes(e))throw new TypeError('BaseDialog triggerTone must be "default", "primary", "success", "warning", "danger", or "muted".')}r(Vg,"validateTriggerTone");function Gg({trigger:e,triggerLabel:t,triggerIcon:o,triggerTone:n,triggerDisabled:a,theme:s}){return A(e)?jsxRuntime.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}):A(t)?jsxRuntime.jsxs("button",{type:"button",disabled:a,"aria-label":typeof t=="string"&&t.trim()?t:void 0,className:l(s.slots.buttonBase,na(s,n),a&&s.slots.buttonDisabled),style:{...s.styles.button,...a?s.styles.buttonDisabled:void 0},children:[A(o)?jsxRuntime.jsx("span",{"data-slot":"icon",className:s.slots.buttonIcon,children:o}):null,jsxRuntime.jsx("span",{"data-slot":"label",className:s.slots.buttonLabel,children:t})]}):null}r(Gg,"renderTrigger");var ba=st.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:w=true,restoreFocus:x=true,initialFocus:k="first-interactive",initialFocusRef:C,zIndex:S,portal:T=false,appearance:E,className:R,classNames:F,style:_,children:z,onOpenChange:O,id:j,...I},V){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(w,"trapFocus"),co(x,"restoreFocus"),co(T,"portal"),Vg(u),k!=="first-interactive"&&k!=="container"&&k!=="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 $=xt().dialog,N=ze(E),D=Ne(),M=f===void 0?$.close:f,K=Ee(N),J=To({disabled:!T}),[G,te]=st.useState(o),U=st.useRef(null),Z=st.useRef(null),ae=t!==void 0,ie=ae?t:G,de=T&&J.shouldPortal?"portaled":"inline",W=A(a),pe=A(s),B=A(i);if(y&&(typeof M!="string"||!M.trim()))throw new TypeError("BaseDialog closeLabel must be a non-empty string when showCloseButton is true.");let H=r(xe=>{ae||te(xe),O?.(xe);},"handleOpenChange");st.useEffect(()=>{if(!ie||!v)return;let xe=U.current,oe=xe?.ownerDocument,le=oe?.defaultView;if(!xe||!oe||!le)return;Z.current=oe.activeElement instanceof le.HTMLElement?oe.activeElement:null;let Re=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),Ie=r(()=>{let q=xe.querySelector(Re);(k==="container"?xe:k==="explicit"?C?.current??xe:q??xe).focus();},"focusInitial"),We=le.requestAnimationFrame(Ie),ue=r(q=>{if(q.key==="Escape"&&b){q.preventDefault(),q.stopPropagation(),H(false);return}if(q.key!=="Tab"||!w)return;let L=Array.from(xe.querySelectorAll(Re));if(L.length===0){q.preventDefault(),xe.focus();return}let X=L[0],se=L[L.length-1];q.shiftKey&&oe.activeElement===X?(q.preventDefault(),se.focus()):!q.shiftKey&&oe.activeElement===se&&(q.preventDefault(),X.focus());},"handleKeyDown");return le.addEventListener("keydown",ue),()=>{le.cancelAnimationFrame(We),le.removeEventListener("keydown",ue),x&&Z.current?.isConnected&&Z.current.focus();}},[b,k,C,ie,v,x,w]);let ne=B||W||pe?jsxRuntime.jsxs("div",{...D,"data-monkeys-component":"dialog","data-slot":"header","data-state":ie?"open":"closed","data-portal":de,className:l(K.slots.dialogHeader,F?.header,n==="page"&&"sr-only"),children:[B?i:null,W?jsxRuntime.jsx(bt__namespace.Title,{...D,"data-monkeys-component":"dialog","data-slot":"title","data-state":ie?"open":"closed","data-portal":de,className:B?"sr-only":l(K.slots.dialogTitle,F?.title),children:a}):null,pe?jsxRuntime.jsx(bt__namespace.Description,{...D,"data-monkeys-component":"dialog","data-slot":"description","data-state":ie?"open":"closed","data-portal":de,className:B?"sr-only":l(K.slots.dialogDescription,F?.description),children:s}):null]}):null,fe=Gg({trigger:c,triggerLabel:d,triggerIcon:g,triggerTone:u,triggerDisabled:p,theme:K}),ye=ie||v?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(bt__namespace.Overlay,{forceMount:v||void 0,hidden:!ie,...D,"aria-hidden":"true","data-monkeys-component":"dialog","data-slot":"overlay","data-portal":de,className:l(K.slots.dialogOverlay,F?.overlay),style:{...K.styles.dialogOverlay,zIndex:S,...n==="page"?{background:"transparent",backdropFilter:"none"}:{}}}),jsxRuntime.jsx("div",{...D,hidden:!ie,"data-monkeys-component":"dialog","data-slot":"content","data-state":ie?"open":"closed","data-portal":de,className:l(K.slots.dialogContent,F?.content),style:{zIndex:S,...n==="page"?{padding:0,inset:0}:{}},children:jsxRuntime.jsx(bt__namespace.Content,{forceMount:v||void 0,...D,...W?{}:{"aria-labelledby":void 0},...pe?{}:{"aria-describedby":void 0},asChild:true,onOpenAutoFocus:xe=>{if(v){xe.preventDefault();return}let oe=U.current;Z.current=oe?.ownerDocument.activeElement,(k==="container"||k==="explicit")&&(xe.preventDefault(),(k==="explicit"?C?.current??oe:oe)?.focus({preventScroll:true}));},onCloseAutoFocus:xe=>{if(v||!x){xe.preventDefault();return}let oe=Z.current;oe?.isConnected&&(xe.preventDefault(),oe.focus({preventScroll:true}));},onEscapeKeyDown:xe=>{(v||!b)&&xe.preventDefault();},onPointerDownOutside:xe=>{h||xe.preventDefault();},children:jsxRuntime.jsxs("div",{...D,ref:U,tabIndex:-1,"aria-modal":"true","data-monkeys-component":"dialog","data-slot":"panel","data-portal":de,className:l(K.slots.dialogPanel,F?.panel),"data-presentation":n,style:{...K.styles.dialogPanel,...n!=="default"?{width:n==="page"?"100vw":"96vw",maxWidth:"none",height:n==="page"?"100dvh":"94dvh",maxHeight:n==="page"?"100dvh":"94dvh",display:"flex",flexDirection:"column"}:{},...n==="page"?{borderRadius:0,border:0,boxShadow:"none",margin:0,animation:"none"}:{}},children:[ne,y?jsxRuntime.jsx(bt__namespace.Close,{asChild:true,children:jsxRuntime.jsx("button",{...D,type:"button","aria-label":M,title:M,"data-monkeys-component":"dialog","data-slot":"close","data-state":ie?"open":"closed","data-portal":de,className:l(K.slots.dialogClose,F?.close),children:"\xD7"})}):null,jsxRuntime.jsx("div",{...D,"data-monkeys-component":"dialog","data-slot":"body","data-state":ie?"open":"closed","data-portal":de,className:l(K.slots.dialogBody,F?.body),style:n!=="default"?{minHeight:0,flex:"1 1 0%",overflow:"hidden",padding:0}:void 0,children:z}),A(m)?jsxRuntime.jsx("div",{...D,"data-monkeys-component":"dialog","data-slot":"footer","data-state":ie?"open":"closed","data-portal":de,className:l(K.slots.dialogFooter,F?.footer),children:m}):null]})})})]}):null;return jsxRuntime.jsx("div",{...D,...I,ref:V,id:j,"data-monkeys-component":"dialog","data-slot":"root","data-state":ie?"open":"closed","data-portal":de,className:l(K.slots.dialogRoot,F?.root,R),style:_,children:jsxRuntime.jsxs(bt__namespace.Root,{open:ie,onOpenChange:H,modal:!v&&w,children:[fe?jsxRuntime.jsx(bt__namespace.Trigger,{...D,asChild:true,disabled:p,"data-monkeys-component":"dialog","data-slot":"trigger","data-portal":de,"data-tone":u,"data-disabled":p||void 0,className:l(K.slots.dialogTrigger,p&&K.slots.dialogTriggerDisabled,F?.trigger),children:fe}):null,T&&J.shouldPortal?jsxRuntime.jsx(zo,{children:jsxRuntime.jsx(bt__namespace.Portal,{...J.radixPortalProps,forceMount:v||void 0,children:ye})}):jsxRuntime.jsx(zo,{children:ye})]})})},"BaseDialog"));function $g(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",children:[jsxRuntime.jsx("rect",{width:"16",height:"12",x:"4",y:"6",rx:"2"}),jsxRuntime.jsx("path",{d:"M8 10h8"}),jsxRuntime.jsx("path",{d:"M8 14h5"})]})}r($g,"DefaultEmptyIcon");var fa=st.forwardRef(r(function({icon:t=jsxRuntime.jsx($g,{}),title:o,description:n,actions:a,variant:s,appearance:i,className:m,classNames:c,style:d,...g},u){let p=ze(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=Ee(p);return jsxRuntime.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:[A(t)?jsxRuntime.jsx("div",{"data-slot":"icon","data-state":"empty",className:l(v.slots.stateIcon,c?.icon),style:v.styles.stateIcon,children:t}):null,A(o)?jsxRuntime.jsx("div",{"data-slot":"title","data-state":"empty",className:l(v.slots.stateTitle,c?.title),children:o}):null,A(n)?jsxRuntime.jsx("div",{"data-slot":"description","data-state":"empty",className:l(v.slots.stateDescription,c?.description),children:n}):null,A(a)?jsxRuntime.jsx("div",{"data-slot":"actions","data-state":"empty",className:l(v.slots.stateActions,c?.actions),children:a}):null]})},"BaseEmptyState"));var Hd=st.createContext(false);function Vd({children:e}){let{locale:t}=ht();return e==null||e===""?null:jsxRuntime.jsx(lr,{content:e,portal:true,children:jsxRuntime.jsx("button",{type:"button","aria-label":typeof e=="string"?e:t.startsWith("zh")?"\u8BF4\u660E":"Help","data-form-help":true,className:"inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:jsxRuntime.jsx(lucideReact.HelpCircle,{className:"h-4 w-4","aria-hidden":"true"})})})}r(Vd,"BaseFormHelp");function Qg(...e){let t=e.flatMap(o=>o?.split(/\s+/).filter(Boolean)??[]);return t.length?Array.from(new Set(t)).join(" "):void 0}r(Qg,"mergeAriaIds");function is(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(is,"resolveOptionalId");var No=st.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,...w},x){for(let[H,ne]of [["required",s],["disabled",i]])if(typeof ne!="boolean")throw new TypeError(`BaseField ${H} 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 k=st.useContext(Hd)?"tooltip":"inline",C=st.useId(),S=ze(b),T=Ne(),E=Ee(S),R=A(o),[F,_]=st.useState(null),z=st.useRef(new Set),O=st.useRef(u),j=st.useRef(p),I=st.useRef(i);O.current=u,j.current=p,I.current=i;let V=u!==void 0;st.useEffect(()=>{(!V||i)&&_(null);},[i,V]),st.useEffect(()=>{if(V&&z.current.size!==1)throw new TypeError("BaseField with validate must contain exactly one compatible Base control.")},[V]);let $=st.useCallback(H=>{let ne=z.current;if(O.current!==void 0&&!ne.has(H)&&ne.size>0)throw new TypeError("BaseField with validate supports exactly one compatible Base control. Use BaseFieldset for control groups.");return ne.add(H),()=>{ne.delete(H);}},[]),N=st.useCallback((H,ne)=>{let fe=O.current;if(I.current||fe===void 0||j.current!==H)return;let ye=Cd(fe(ne));if(ye===null){_(null);return}_(ye);},[]),D=st.useCallback(H=>N("onBlur",H),[N]),M=st.useCallback(H=>N("onChange",H),[N]),J=A(a)?a:F,G=A(J),te=!G&&A(n),U=G?J:n,Z=m??`${C}-control`,ae=R?is(c,`${C}-description`,"descriptionId"):void 0,ie=te?is(d,`${C}-message`,"messageId"):void 0,de=G?is(g,`${C}-error`,"errorId"):void 0,W={id:Z,"aria-describedby":Qg(ae,ie),"aria-errormessage":de,"aria-invalid":G?true:void 0,"aria-required":s?true:void 0,required:s||void 0,disabled:i||void 0},pe=typeof f=="function"?f(W):f,B=st.useMemo(()=>({invalid:G,registerControl:$,notifyBlur:D,notifyChange:M}),[G,D,M,$]);return jsxRuntime.jsxs("div",{...T,...w,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":G||void 0,className:l(E.slots.fieldRoot,i&&E.slots.controlDisabled,y?.root,h),style:{...E.styles.field,...v},children:[A(t)?jsxRuntime.jsxs("div",{"data-slot":"label-row",className:l(E.slots.fieldLabelRow,y?.labelRow),children:[jsxRuntime.jsxs("label",{htmlFor:typeof f=="function"?Z:m,"data-slot":"label",className:l(E.slots.fieldLabel,y?.label),children:[t,s?jsxRuntime.jsxs("span",{"aria-hidden":"true","data-slot":"required-indicator",className:l(E.slots.fieldRequired,y?.required),children:[" ","*"]}):null]}),k==="tooltip"&&R?jsxRuntime.jsx(Vd,{children:o}):null]}):null,R?jsxRuntime.jsx("div",{id:ae,"data-slot":"description",className:l(E.slots.fieldDescription,y?.description,k==="tooltip"&&"sr-only"),children:o}):null,A(pe)?jsxRuntime.jsx("div",{"data-slot":"control",className:l(E.slots.fieldControl,y?.control),style:E.styles.fieldControl,children:jsxRuntime.jsx(Yi.Provider,{value:B,children:pe})}):null,A(U)?jsxRuntime.jsx("div",{id:G?de:ie,role:G?"alert":void 0,"data-slot":G?"error":"message",className:l(E.slots.fieldMessage,G&&"text-destructive-text",y?.message),children:U}):null]})},"BaseField"));var tb={sm:"h-8 px-2.5 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-3.5 text-base"},Qt=st.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=ze(m),v=Ne(),w=Ee(y),x=Vo(),k=n||x.invalid;return jsxRuntime.jsxs("div",{...v,"data-monkeys-component":"input","data-slot":"root","data-size":i,"data-invalid":k||void 0,"data-disabled":a||void 0,"data-readonly":s||void 0,className:l(w.slots.controlWrapper,k&&w.slots.controlInvalid,a&&w.slots.controlDisabled,s&&w.slots.controlReadOnly,d?.root,c),style:{...w.styles.control,...k?w.styles.controlInvalid:void 0,...a?w.styles.controlDisabled:void 0,...g},children:[A(t)?jsxRuntime.jsx("span",{"data-slot":"icon",className:l(w.slots.controlIcon,d?.icon),children:t}):null,jsxRuntime.jsx("input",{...b,ref:h,disabled:a,readOnly:s,"aria-invalid":u??(k||void 0),"data-slot":"control","data-size":i,"data-invalid":k||void 0,"data-disabled":a||void 0,"data-readonly":s||void 0,className:l(w.slots.controlBase,w.slots.controlInput,i&&tb[i],d?.control),onBlur:C=>{p?.(C),x.notifyBlur(C.currentTarget.value);},onChange:C=>{f?.(C),x.notifyChange(C.currentTarget.value);}}),A(o)?jsxRuntime.jsx("span",{"data-slot":"trailing",className:l(w.slots.controlTrailing,d?.trailing),children:o}):null]})},"BaseInput"));var rb={line:"h-4 w-full",block:"h-24 w-full",circle:"aspect-square h-10 rounded-full"},Dt=st.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=ze(a),u=Ne(),p=Ee(g),f=kd(n,o,d);return jsxRuntime.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,rb[t],f.mode==="pulse"&&"motion-safe:animate-pulse motion-reduce:animate-none",i?.root,s),style:{...p.styles.skeleton,...f.style,...m}})},"BaseSkeleton"));function sb({className:e}){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:e,fill:"none",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"9",className:"opacity-25",stroke:"currentColor",strokeWidth:"3"}),jsxRuntime.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M12 3a9 9 0 0 1 9 9h-3a6 6 0 0 0-6-6V3Z"})]})}r(sb,"DefaultLoadingIcon");var jo=st.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 w=ze(m),x=Ne(),{loading:k}=xt(),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=Ee(w),R=S==="skeleton"&&t===void 0?void 0:t===void 0?jsxRuntime.jsx(sb,{className:E.slots.loadingSpinner}):t,F=b??(h===void 0?typeof o=="string"?o:k.spinner:void 0);return jsxRuntime.jsxs("div",{...x,...y,ref:v,role:u,"aria-live":p,"aria-busy":f,"aria-label":F,"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"?jsxRuntime.jsx(Ho,{animation:i,children:jsxRuntime.jsxs("div",{className:"flex w-full max-w-sm flex-col gap-3","data-slot":"skeleton",children:[jsxRuntime.jsx(Dt,{variant:"block",className:"h-20"}),jsxRuntime.jsx(Dt,{variant:"line",className:"w-4/5"}),jsxRuntime.jsx(Dt,{variant:"line",className:"w-3/5"})]})}):A(R)?jsxRuntime.jsx("div",{"data-slot":"icon","data-state":"loading",className:l(E.slots.stateIcon,d?.icon),style:E.styles.stateIcon,children:R}):null,S!=="skeleton"&&A(o)?jsxRuntime.jsx("div",{"data-slot":"title","data-state":"loading",className:l(E.slots.stateTitle,d?.title),children:o}):null,S!=="skeleton"&&A(n)?jsxRuntime.jsx("div",{"data-slot":"description","data-state":"loading",className:l(E.slots.stateDescription,d?.description),children:n}):null,A(a)?jsxRuntime.jsx("div",{"data-slot":"actions","data-state":"loading",className:l(E.slots.stateActions,d?.actions),children:a}):null]})},"BaseLoadingState"));var yb=500;function hb({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(hb,"validateSelectProps");function ds(e){return typeof e=="string"||typeof e=="number"?String(e):""}r(ds,"normalizeValue");function xb(e,t){if(t!==void 0)return e.find(o=>o.value===t)}r(xb,"findOption");function ur(e,t){let o=e.findIndex(n=>n.value===t&&!n.disabled);return o>=0?o:e.findIndex(n=>!n.disabled)}r(ur,"getInitialActiveIndex");function vb(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(vb,"getNextEnabledIndex");function kb(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(kb,"getBoundaryEnabledIndex");function _d(e){return e.textValue!==void 0?e.textValue:typeof e.label=="string"?e.label:e.value}r(_d,"getOptionText");function wb(e){return e.replace(/[^a-zA-Z0-9_-]/g,"-")}r(wb,"toDomId");var uo=st.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:w,name:x,id:k,required:C,"aria-invalid":S,"aria-label":T,"aria-labelledby":E,"aria-describedby":R,"aria-errormessage":F,"aria-required":_,...z},O){hb({options:t,value:f,defaultValue:b,invalid:a,disabled:s,openForPreview:i,portal:m,required:C});let j=ze(c),I=Ne(),V=Ee(j),$=Vo(),N=a||$.invalid,D=st.useId(),M=k??D,K=`${M}-button`,J=`${M}-listbox`,G=st.useRef(null),te=st.useRef(null),U=st.useRef(null),Z=st.useRef([]),ae=st.useRef(false),ie=st.useRef(""),de=st.useRef(null),W=t??[],pe=W.length>0,B=i,[H,ne]=st.useState(false),[fe,ye]=st.useState(false),xe=B||H,oe=To({disabled:B||!m?true:void 0}),{refs:le,floatingStyles:Re,isPositioned:Ie,placement:We}=react.useFloating({transform:false,open:pe&&xe&&oe.shouldPortal,placement:"bottom-start",strategy:"fixed",whileElementsMounted:oe.shouldPortal?react.autoUpdate:void 0,middleware:[react.offset(6),react.flip({padding:8}),react.shift({padding:8}),react.size({padding:8,apply({rects:ge,availableHeight:He,elements:Q}){Object.assign(Q.floating.style,{width:`${ge.reference.width}px`,maxHeight:`min(15rem, ${Math.max(0,He)}px)`});}})]}),ue=st.useCallback(ge=>{te.current=ge,le.setReference(ge);},[le.setReference]),[q,L]=st.useState(()=>ds(b)),X=f!==void 0,se=X?ds(f):q,Y=xb(W,se),[ce,ke]=st.useState(()=>ur(W,se)),we=ce>=0&&!W[ce]?.disabled?ce:ur(W,se),Me=W.map((ge,He)=>`${M}-option-${He}-${wb(ge.value)}`),Pe=Y?.label??o,Ve=!Y,Xe=z.dir??I.dir,Oe=s?"disabled":N?"invalid":xe?"open":"closed",pt=r(ge=>{U.current=ge,typeof O=="function"?O(ge):O&&(O.current=ge);},"setSelectRef"),Ae=r(ge=>{h?.(ge),$.notifyBlur(ge.currentTarget.value);},"handleNativeBlur"),Le=r(ge=>{y?.(ge),$.notifyChange(ge.currentTarget.value);},"handleNativeChange"),re=r(()=>{ke(ur(W,se));},"resetActiveIndex"),Ce=r(()=>{re(),B||ne(false);},"cancelAndClose"),Fe=r((ge,He=false)=>{ye(He),ke(ge??ur(W,se)),B||ne(true);},"openMenu"),qe=r(ge=>{let He=U.current;if(!He)return;let Q=He.ownerDocument.defaultView;if(!Q)throw new Error("BaseSelect cannot dispatch change without an owning window.");let me=Object.getOwnPropertyDescriptor(Q.HTMLSelectElement.prototype,"value")?.set;if(!me)throw new Error("BaseSelect could not resolve the native select value setter.");me.call(He,ge),He.dispatchEvent(new Q.Event("change",{bubbles:true}));},"notifyChange"),nt=r(ge=>{let He=W[ge];!He||He.disabled||s||(ke(ge),He.value!==se&&(X||L(He.value),qe(He.value)),B||ne(false));},"commitIndex"),gt=r(ge=>{ge<0||W[ge]?.disabled||(ke(ge),xe||Fe(ge));},"moveActive"),Bt=r((ge,He)=>{let Q=ge.currentTarget.ownerDocument.defaultView;if(!Q)return;let me=`${ie.current}${He}`.toLocaleLowerCase();ie.current=me,de.current&&de.current.ownerWindow.clearTimeout(de.current.timerId),de.current={ownerWindow:Q,timerId:Q.setTimeout(()=>{ie.current="",de.current=null;},yb)};let he=Array.from(me).every(Te=>Te===me[0])?He.toLocaleLowerCase():me,ee=xe?we:W.findIndex(Te=>Te.value===se&&!Te.disabled);for(let Te=1;Te<=W.length;Te+=1){let Ke=(ee+Te+W.length)%W.length,Ze=W[Ke];if(!Ze?.disabled&&_d(Ze).trim().toLocaleLowerCase().startsWith(he)){ge.preventDefault(),gt(Ke);return}}},"handleTypeahead"),_e=r(ge=>{if(!(s||ae.current||ge.nativeEvent.isComposing)){if(ge.key==="ArrowDown"||ge.key==="ArrowUp"){ge.preventDefault();let He=W.findIndex(me=>me.value===se&&!me.disabled);gt(vb(W,xe?we:He,ge.key==="ArrowDown"?1:-1));return}if(ge.key==="Home"||ge.key==="End"){ge.preventDefault(),gt(kb(W,ge.key==="Home"?"first":"last"));return}if(ge.key==="Enter"||ge.key===" "){ge.preventDefault(),xe?nt(we):Fe();return}if(ge.key==="Escape"&&xe){ge.preventDefault(),Ce();return}if(ge.key==="Tab"&&xe){nt(we);return}ge.key.length===1&&!ge.ctrlKey&&!ge.metaKey&&!ge.altKey&&!/\s/.test(ge.key)&&Bt(ge,ge.key);}},"handleKeyDown"),zt=r(ge=>{v?.(ge),ge.defaultPrevented||te.current?.focus();},"handleCustomFocus"),Ot=r(ge=>{w?.(ge),ge.preventDefault(),te.current?.focus();},"handleCustomInvalid");return st.useEffect(()=>{if(!pe||!xe||B)return;let ge=G.current?.ownerDocument;if(!ge)return;let He=r(Q=>{!G.current?.contains(Q.target)&&!le.floating.current?.contains(Q.target)&&Ce();},"handlePointerDown");return ge.addEventListener("pointerdown",He),()=>{ge.removeEventListener("pointerdown",He);}},[B,pe,xe,W,se]),st.useEffect(()=>{!pe||!xe||we<0||Z.current[we]?.scrollIntoView?.({block:"nearest"});},[pe,xe,we]),st.useEffect(()=>{if(!pe||X)return;let ge=U.current,He=ge?.form,Q=ge?.ownerDocument.defaultView;if(!He||!Q)return;let me=r(()=>{Q.setTimeout(()=>{let Be=ds(b);L(Be),ke(ur(W,Be)),B||ne(false);},0);},"handleReset");return He.addEventListener("reset",me),()=>He.removeEventListener("reset",me)},[b,B,X,pe,W]),st.useEffect(()=>()=>{de.current&&de.current.ownerWindow.clearTimeout(de.current.timerId);},[]),pe?jsxRuntime.jsxs("div",{...I,ref:G,dir:Xe,"data-monkeys-component":"select","data-slot":"root","data-state":Oe,"data-native":"false",className:l(V.slots.controlWrapper,"overflow-visible",xe&&"z-50",N&&V.slots.controlInvalid,s&&V.slots.controlDisabled,g?.root,d),style:{...V.styles.control,...N?V.styles.controlInvalid:void 0,...s?V.styles.controlDisabled:void 0,...u},children:[A(n)?jsxRuntime.jsx("span",{className:l(V.slots.controlIcon,g?.icon),children:n}):null,jsxRuntime.jsx("button",{...I,ref:ue,type:"button",id:K,role:"combobox",disabled:s,dir:Xe,"aria-haspopup":"listbox","aria-expanded":xe,"aria-controls":J,"aria-activedescendant":xe&&we>=0?Me[we]:void 0,"aria-autocomplete":"none","aria-invalid":S??(N||void 0),"aria-label":T,"aria-labelledby":E,"aria-describedby":R,"aria-errormessage":F,"aria-required":_??(C||void 0),"data-monkeys-component":"select","data-slot":"trigger","data-state":Oe,className:l(V.slots.controlBase,V.slots.controlSelect,"flex items-center text-left",g?.control),onClick:ge=>{xe?Ce():Fe(void 0,ge.detail>0);},onBlur:ge=>{!G.current?.contains(ge.relatedTarget)&&!le.floating.current?.contains(ge.relatedTarget)&&(Ce(),$.notifyBlur(se));},onCompositionStart:()=>{ae.current=true;},onCompositionEnd:()=>{ae.current=false;},onKeyDown:_e,children:jsxRuntime.jsx("span",{className:l("min-w-0 flex-1 truncate",Ve&&V.slots.selectPlaceholder,Ve&&g?.placeholder),children:Pe})}),jsxRuntime.jsx("span",{className:l(V.slots.selectChevron,xe&&"rotate-[225deg]")}),jsxRuntime.jsxs("select",{...I,...z,ref:pt,id:k,name:x,value:se,required:C,disabled:s,dir:Xe,"aria-hidden":"true",tabIndex:-1,"data-monkeys-component":"select","data-slot":"native","data-state":Oe,"data-native":"false",className:V.slots.selectNative,onBlur:h,onFocus:zt,onInvalid:Ot,onChange:Le,children:[A(o)?jsxRuntime.jsx("option",{value:"",disabled:true,children:o}):null,W.map(ge=>jsxRuntime.jsx("option",{value:ge.value,disabled:ge.disabled,children:_d(ge)},ge.value))]}),xe?Rd(jsxRuntime.jsx("div",{...I,ref:oe.shouldPortal?le.setFloating:void 0,id:J,role:"listbox",dir:Xe,"aria-labelledby":K,"data-monkeys-component":"select","data-slot":"menu","data-portal":oe.shouldPortal?"portaled":"inline","data-state":"open","data-side":oe.shouldPortal?We.split("-")[0]:"bottom",className:l(V.slots.selectMenu,oe.shouldPortal&&We.startsWith("top")?"origin-bottom":"origin-top",fe&&!B&&(!oe.shouldPortal||Ie)&&"motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95 motion-safe:duration-150 motion-safe:ease-out",g?.menu),style:{...V.styles.selectMenu,...oe.shouldPortal?{...Re,right:"auto",visibility:Ie?"visible":"hidden"}:void 0},children:W.map((ge,He)=>{let Q=ge.value===se,me=He===we,Be=ge.disabled?"disabled":me?"active":Q?"selected":"idle";return st.createElement("button",{...I,ref:he=>{Z.current[He]=he;},key:ge.value,id:Me[He],type:"button",role:"option",tabIndex:-1,disabled:ge.disabled,dir:Xe,"aria-selected":Q,"data-monkeys-component":"select","data-slot":"option","data-state":Be,"data-active":me||void 0,"data-selected":Q||void 0,"data-disabled":ge.disabled||void 0,className:l(V.slots.selectOption,me&&V.slots.selectOptionActive,Q&&V.slots.selectOptionSelected,ge.disabled&&V.slots.selectOptionDisabled,g?.option),style:{...V.styles.selectOption,...me?V.styles.selectOptionActive:void 0,...Q?V.styles.selectOptionSelected:void 0},onMouseDown:he=>he.preventDefault(),onClick:()=>nt(He)},jsxRuntime.jsx("span",{className:"min-w-0 flex-1 truncate",children:ge.label}))})}),oe):null]}):jsxRuntime.jsxs("div",{...I,"data-monkeys-component":"select","data-slot":"root","data-state":Oe,"data-native":"true",className:l(V.slots.controlWrapper,N&&V.slots.controlInvalid,s&&V.slots.controlDisabled,g?.root,d),style:{...V.styles.control,...N?V.styles.controlInvalid:void 0,...s?V.styles.controlDisabled:void 0,...u},children:[A(n)?jsxRuntime.jsx("span",{className:l(V.slots.controlIcon,g?.icon),children:n}):null,jsxRuntime.jsxs("select",{...I,...z,id:k,ref:O,name:x,value:f,defaultValue:b,required:C,disabled:s,"aria-invalid":S??(N||void 0),"aria-label":T,"aria-labelledby":E,"aria-describedby":R,"aria-errormessage":F,"aria-required":_,"data-monkeys-component":"select","data-slot":"native","data-state":Oe,"data-native":"true",onBlur:Ae,onFocus:v,onInvalid:w,onChange:Le,className:l(V.slots.controlBase,V.slots.controlSelect,g?.control),children:[A(o)?jsxRuntime.jsx("option",{value:"",disabled:true,children:o}):null,p]}),jsxRuntime.jsx("span",{className:V.slots.selectChevron})]})},"BaseSelect"));function Tb(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(Tb,"getInitialSegmentValue");function pn({options:e=[],value:t,defaultValue:o,appearance:n,className:a,classNames:s,style:i,onValueChange:m,...c}){let d=Ee(n),[g,u]=st.useState(()=>Tb(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 w=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"?(w-1+v.length)%v.length:(w+1)%v.length,k=v[x],C=y.currentTarget.querySelectorAll('[role="radio"]'),S=Array.from(C).find(T=>T.dataset.value===k.value);b(k.value),S?.focus();},"handleKeyDown");return jsxRuntime.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 jsxRuntime.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:[A(y.icon)?jsxRuntime.jsx("span",{className:l("inline-flex h-4 w-4 shrink-0",s?.icon),children:y.icon}):null,jsxRuntime.jsx("span",{className:l("min-w-0 truncate",s?.label),children:y.label})]},y.value)})})}r(pn,"BaseSegmentedControl");function Ib({kind:e}){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-7 w-7",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",children:{error:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"9"}),jsxRuntime.jsx("path",{d:"M12 7v6"}),jsxRuntime.jsx("path",{d:"M12 17h.01"})]}),permission:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2"}),jsxRuntime.jsx("path",{d:"M8 10V7a4 4 0 0 1 8 0v3"})]}),offline:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M5 12.5a10 10 0 0 1 14 0"}),jsxRuntime.jsx("path",{d:"M8.5 16a5 5 0 0 1 7 0"}),jsxRuntime.jsx("path",{d:"M12 20h.01"}),jsxRuntime.jsx("path",{d:"m4 4 16 16"})]}),fallback:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"9"}),jsxRuntime.jsx("path",{d:"M9.5 9a2.5 2.5 0 1 1 4.2 1.8c-1 .8-1.7 1.2-1.7 2.7"}),jsxRuntime.jsx("path",{d:"M12 17h.01"})]})}[e]})}r(Ib,"SystemStateIcon");var pr=st.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=ze(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,w=Ee(b),x=o===void 0?jsxRuntime.jsx(Ib,{kind:t}):o,k=g??(t==="error"||t==="offline"?"alert":"status");return jsxRuntime.jsxs("div",{...h,...p,ref:f,role:k,"aria-live":u??(k==="alert"?"assertive":"polite"),"data-monkeys-component":"system-state","data-slot":"root","data-state":t,"data-density":y.density,className:l(w.slots.stateRoot,v,c?.root,m),style:{...w.styles.stateRoot,...d},children:[A(x)?jsxRuntime.jsx("div",{"data-slot":"icon","data-state":t,className:l(w.slots.stateIcon,c?.icon),style:w.styles.stateIcon,children:x}):null,A(n)?jsxRuntime.jsx("div",{"data-slot":"title","data-state":t,className:l(w.slots.stateTitle,c?.title),children:n}):null,A(a)?jsxRuntime.jsx("div",{"data-slot":"description","data-state":t,className:l(w.slots.stateDescription,c?.description),children:a}):null,A(s)?jsxRuntime.jsx("div",{"data-slot":"actions","data-state":t,className:l(w.slots.stateActions,c?.actions),children:s}):null]})},"BaseSystemState"));var us="application/x-monkeys-base-table-column",Sa=8;function ys(e,t){typeof e=="function"?e(t):e&&(e.current=t);}r(ys,"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 Nn(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(Nn,"assertEnum");function ms(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(ms,"assertOptionalLabel");function fs(e,t){if(t!==void 0&&typeof t!="function")throw new Error(`BaseTable ${e} must be a function when provided.`)}r(fs,"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 Db(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(Db,"validateColumns");function Wb(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(Wb,"validateColumnOrder");function Lb(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(Lb,"validateColumnSizes");function Ta(e){let t=e.ownerDocument.defaultView;return t?t.getComputedStyle(e).direction==="rtl":e.closest('[dir="rtl"]')!==null}r(Ta,"isRtl");function Ab(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(Ab,"setPointerCaptureIfAvailable");var Ud=st.createContext(null);function Uo(e){let t=st.useContext(Ud),o=ze(e);if(t){let a=e===void 0?t.appearance:o;return {...t,theme:e===void 0?t.theme:Ee(a),appearance:a}}let n=Ee(o);return {appearance:o,theme:n,layout:"native",setDraggingColumnId:r(()=>{},"setDraggingColumnId")}}r(Uo,"useBaseTableContext");function qd(e){let t=false;return st.Children.forEach(e,o=>{if(t||!st.isValidElement(o))return;let n=o.props;if(n.layout==="split-scroll"){t=true;return}n.children&&(t=qd(n.children));}),t}r(qd,"hasSplitScrollTable");function ps(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r(ps,"toCssSize");function zb(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(zb,"validateTableCssSize");function gs(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(gs,"validateCssSize");function $d(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($d,"validateNumericSize");function Ob(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=$d(a.minWidth,i,"minWidth"),d=$d(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=gs(a.minWidth,i,"minWidth"),u=gs(a.maxWidth,i,"maxWidth"),p=m!==void 0?$o(m,c,d):a.width,f=gs(p,i,"width");return f||`minmax(${g??"0px"}, ${u??"1fr"})`}).join(" ")} var(--base-table-split-scrollbar-gutter)`}r(Ob,"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 bs(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(bs,"getNextColumnOrder");function Fb(e){switch(e){case "asc":return "ascending";case "desc":return "descending";default:return}}r(Fb,"sortAriaValue");function Hb(e){switch(e){case "center":return "center";case "right":return "flex-end";default:return "flex-start"}}r(Hb,"getSplitHeadJustifyContent");function Vb(e){switch(e){case "top":return "flex-start";case "bottom":return "flex-end";default:return "center"}}r(Vb,"getSplitHeadAlignItems");function Gb({direction:e,className:t}){return jsxRuntime.jsx("span",{"aria-hidden":"true",className:l(t,e==="desc"&&"rotate-180",(!e||e==="none")&&"opacity-45"),children:"\u25B2"})}r(Gb,"SortIndicator");function _b(){return jsxRuntime.jsxs("span",{"aria-hidden":"true",className:"grid gap-0.5",children:[jsxRuntime.jsx("span",{className:"h-0.5 w-0.5 rounded-full bg-current"}),jsxRuntime.jsx("span",{className:"h-0.5 w-0.5 rounded-full bg-current"}),jsxRuntime.jsx("span",{className:"h-0.5 w-0.5 rounded-full bg-current"})]})}r(_b,"DragHandleIcon");var Na=st.forwardRef(r(function({appearance:t,attachedFooter:o=false,children:n,className:a,classNames:s,style:i,...m},c){Mo("attachedFooter",o);let d=ze(t),g=Ne(),u=Ee(d),f=qd(n)?{overflow:"hidden",scrollbarGutter:"auto"}:void 0;return jsxRuntime.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")),Ia=st.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){Nn("layout",s,["native","split-scroll"]),Mo("columnDragEnabled",u),Mo("columnResizeEnabled",p),fs("onColumnOrderChange",f),fs("onColumnSizeChange",b),Ko(m,"bodyMaxHeight",{stringAllowed:true});let v=Db(i);Wb(d,v),Lb(g,v);let w=ze(t),x=Ne(),k=Ee(w),[C,S]=st.useState(),T=st.useRef(null),E=st.useRef(null),R=s==="split-scroll",F=R?Ob(i,g):void 0,_={appearance:w,theme:k,layout:s,columnTemplate:F,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 jsxRuntime.jsx(Ud.Provider,{value:_,children:jsxRuntime.jsx("table",{...x,...h,ref:y,"data-monkeys-component":"table","data-slot":"root","data-base-table-layout":s,className:l(k.slots.tableRoot,R&&k.slots.tableSplitRoot,n?.root,o),style:{...k.styles.table,...R?k.styles.tableSplitRoot:void 0,...F?{"--base-table-column-template":F}:void 0,...a}})})},"BaseTable")),Ma=st.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 jsxRuntime.jsx("thead",{...s,ref:r(p=>{c&&(c.current=g?p:null),ys(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")),Ba=st.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 jsxRuntime.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:zb(d,"bodyMaxHeight")}:void 0,...s}})},"BaseTableBody"));st.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 jsxRuntime.jsx("tfoot",{...s,ref:r(p=>{c&&(c.current=g?p:null),ys(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=st.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 jsxRuntime.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")),Pa=st.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:w,width:x,minWidth:k,maxWidth:C,appearance:S,className:T,classNames:E,style:R,children:F,onDragOver:_,onDrop:z,...O},j){if(Nn("head presentation",t,["classic-data-grid"]),Nn("head align",n,["left","center","right"]),Nn("head verticalAlign",a,["top","middle","bottom"]),Nn("head sortDirection",p,["asc","desc","none"]),Mo("head sortable",u),Mo("head draggable",h),Mo("head resizable",v),fs("head onSort",b),ms("head sortLabel",f),ms("head dragLabel",y),ms("head resizeLabel",w),o!==void 0&&(typeof o!="string"||o.trim().length===0))throw new Error("BaseTable head columnId must be a non-empty string when provided.");if(Ko(x,"head width",{stringAllowed:true}),Ko(k,"head minWidth"),Ko(C,"head maxWidth"),k!==void 0&&C!==void 0&&k>C)throw new Error("BaseTable head minWidth cannot be greater than maxWidth.");let I=Uo(S),{theme:V}=I,$=xt().table,N=I.layout==="split-scroll",D=t==="classic-data-grid",M=n??(N?"center":"left"),K=a??"middle",J=st.useRef(null),G=st.useRef(()=>{}),[te,U]=st.useState(),Z=r(ue=>{J.current=ue,ys(j,ue);},"setHeadRef"),ae=o&&I.columnSizes?.[o]!==void 0?I.columnSizes[o]:x,ie=!!(o&&h!==false&&(h||I.columnDragEnabled)&&I.columnOrder&&I.onColumnOrderChange),de=!!(o&&v!==false&&(v||I.columnResizeEnabled)&&I.onColumnSizeChange);if(de&&C!==void 0&&C<(k??48))throw new Error("BaseTable resizable head maxWidth cannot be smaller than its effective minWidth.");let W=!!(u||b),pe=Fb(p),B=A(i)?i:F,H=A(B)||A(m),ne=f??(H?void 0:$.sortColumn({columnId:o?.trim()||void 0})),fe=ie||A(s)||A(i)||A(m)||A(c)||A(d)||A(g)||W,ye=D?jsxRuntime.jsx("div",{className:l("flex h-full min-w-0 select-none items-center",M==="center"?"justify-center":M==="right"?"justify-end":"justify-start",ie&&"cursor-grab active:cursor-grabbing"),...ie?{draggable:true,role:"button",tabIndex:0,"aria-disabled":false,"aria-roledescription":"sortable",onKeyDown:r(ue=>{if(!o||!I.columnOrder||ue.key!=="ArrowLeft"&&ue.key!=="ArrowRight")return;let q=I.columnOrder.indexOf(o);if(q<0)return;let L=Ta(ue.currentTarget),X=ue.key==="ArrowLeft"?-1:1,se=q+(L?-X:X),Y=I.columnOrder[se];if(!Y)return;let ce=bs(I.columnOrder,o,Y);ce&&(ue.preventDefault(),I.onColumnOrderChange?.(ce,{columnId:o,targetColumnId:Y}));},"onKeyDown"),onDragStart:r(ue=>{ue.stopPropagation(),I.setDraggingColumnId(o),ue.dataTransfer.effectAllowed="move",ue.dataTransfer.setData(us,o);},"onDragStart"),onDragEnd:r(ue=>{ue.stopPropagation(),I.setDraggingColumnId(void 0);},"onDragEnd")}:{},children:B}):fe?jsxRuntime.jsxs("div",{className:l(V.slots.tableHeadContent,E?.content),children:[jsxRuntime.jsxs("div",{className:l(V.slots.tableHeadMain,E?.main),children:[ie?jsxRuntime.jsx("button",{type:"button",draggable:true,title:y,"aria-label":y??$.dragColumn({columnId:o}),className:l(V.slots.tableHeadDragHandle,E?.dragHandle),onClick:ue=>ue.stopPropagation(),onKeyDown:ue=>{if(!o||!I.columnOrder||ue.key!=="ArrowLeft"&&ue.key!=="ArrowRight")return;let q=I.columnOrder.indexOf(o);if(q<0)return;let L=Ta(ue.currentTarget),X=ue.key==="ArrowLeft"?-1:1,se=q+(L?-X:X),Y=I.columnOrder[se];if(!Y)return;let ce=bs(I.columnOrder,o,Y);ce&&(ue.preventDefault(),I.onColumnOrderChange?.(ce,{columnId:o,targetColumnId:Y}));},onDragStart:ue=>{ue.stopPropagation(),I.setDraggingColumnId(o),ue.dataTransfer.effectAllowed="move",ue.dataTransfer.setData(us,o);},onDragEnd:ue=>{ue.stopPropagation(),I.setDraggingColumnId(void 0);},children:jsxRuntime.jsx(_b,{})}):null,s?jsxRuntime.jsx("span",{className:l(V.slots.tableHeadIcon,E?.icon),children:s}):null,W?jsxRuntime.jsxs("button",{type:"button",disabled:!b,title:f,"aria-label":ne,className:l(V.slots.tableHeadSortButton,E?.sortButton),onClick:ue=>{ue.stopPropagation(),b?.(o);},children:[jsxRuntime.jsxs("span",{className:l(V.slots.tableHeadText,E?.text),children:[A(B)?jsxRuntime.jsx("span",{className:l(V.slots.tableHeadLabel,E?.label),children:B}):null,A(m)?jsxRuntime.jsx("span",{className:l(V.slots.tableHeadDescription,E?.description),children:m}):null]}),jsxRuntime.jsx(Gb,{direction:p,className:l(V.slots.tableHeadSortIcon,E?.sortIcon)})]}):jsxRuntime.jsxs("span",{className:l(V.slots.tableHeadText,E?.text),children:[A(B)?jsxRuntime.jsx("span",{className:l(V.slots.tableHeadLabel,E?.label),children:B}):null,A(m)?jsxRuntime.jsx("span",{className:l(V.slots.tableHeadDescription,E?.description),children:m}):null]})]}),A(c)||A(d)||A(g)?jsxRuntime.jsxs("div",{className:l(V.slots.tableHeadActions,E?.actions),children:[A(c)?jsxRuntime.jsx("span",{className:l(V.slots.tableHeadMeta,E?.meta),children:c}):null,d,g]}):null]}):F,xe=r(ue=>{_?.(ue),!(!ie||!I.draggingColumnId||I.draggingColumnId===o)&&(ue.preventDefault(),ue.dataTransfer.dropEffect="move");},"handleDragOver"),oe=r(ue=>{if(z?.(ue),!ie||!o)return;let q=I.draggingColumnId||ue.dataTransfer.getData(us);if(!q||q===o)return;let L=bs(I.columnOrder,q,o);L&&(ue.preventDefault(),I.onColumnOrderChange?.(L,{columnId:q,targetColumnId:o})),I.setDraggingColumnId(void 0);},"handleDrop"),le=r(ue=>{if(!de||!o||!I.onColumnSizeChange||ue.button!==0&&ue.pointerType!=="touch")return;ue.preventDefault(),ue.stopPropagation(),G.current();let q=ue.clientX,L=Re??J.current?.offsetWidth??k??48,X=$o(L,k,C),se=ue.pointerId,Y=ue.currentTarget,ce=Y.ownerDocument,ke=Ta(Y),we=r(Ve=>{if(Ve.pointerId!==se)return;let Xe=$o(X+(ke?q-Ve.clientX:Ve.clientX-q),k,C);I.onColumnSizeChange?.(o,Xe,{columnId:o,previousWidth:X,minWidth:k,maxWidth:C});},"handlePointerMove"),Me=r(Ve=>{Ve.pointerId===se&&G.current();},"handleStop"),Pe=r(Ve=>{Ve.pointerId===se&&G.current();},"handleLostCapture");G.current=()=>{ce.removeEventListener("pointermove",we),ce.removeEventListener("pointerup",Me),ce.removeEventListener("pointercancel",Me),Y.removeEventListener("lostpointercapture",Pe),Y.hasPointerCapture?.(se)&&Y.releasePointerCapture?.(se),G.current=()=>{};},Ab(Y,se),ce.addEventListener("pointermove",we),ce.addEventListener("pointerup",Me),ce.addEventListener("pointercancel",Me),Y.addEventListener("lostpointercapture",Pe);},"handleResizePointerDown"),Re=typeof ae=="number"?$o(ae,k,C):te,Ie=Re??$o(k??48,k,C),We=r(ue=>{if(!de||!o||!I.onColumnSizeChange)return;let q=Ta(ue.currentTarget),L=Re??$o(J.current?.offsetWidth||k||48,k,C),X;ue.key==="ArrowLeft"&&(X=L+(q?Sa:-Sa)),ue.key==="ArrowRight"&&(X=L+(q?-Sa:Sa)),ue.key==="Home"&&k!==void 0&&(X=k),ue.key==="End"&&C!==void 0&&(X=C),X!==void 0&&(ue.preventDefault(),ue.stopPropagation(),I.onColumnSizeChange(o,$o(X,k,C),{columnId:o,previousWidth:L,minWidth:k,maxWidth:C}));},"handleResizeKeyDown");return st.useEffect(()=>{if(typeof ae=="number"){U(void 0);return}let ue=J.current?.getBoundingClientRect().width;if(ue&&Number.isFinite(ue)){let q=$o(ue,k,C);U(L=>L===q?L:q);}},[ae,k,C,de]),st.useEffect(()=>(de||G.current(),()=>G.current()),[de,o,I.onColumnSizeChange]),jsxRuntime.jsxs("th",{...O,ref:Z,"data-slot":"head","data-v2-header-drag-id":D&&ie?o:void 0,scope:O.scope??"col","aria-sort":pe,className:l(V.slots.tableHead,N&&V.slots.tableSplitHead,M==="center"&&V.slots.tableCellAlignCenter,M==="right"&&V.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:{...V.styles.tableHead,...N?V.styles.tableSplitHead:void 0,width:N?void 0:ps(ae),minWidth:N?void 0:ps(k),maxWidth:N?void 0:ps(C),...N?{alignItems:Vb(K),justifyContent:Hb(M),textAlign:M}:a?{verticalAlign:a}:void 0,...R},onDragOver:xe,onDrop:oe,children:[ye,de&&D?jsxRuntime.jsx("div",{"data-column-resize-handle":"true",className:"absolute right-0 top-0 z-20 h-full w-2 cursor-col-resize touch-none select-none hover:bg-muted",onPointerDown:le}):de?jsxRuntime.jsx("button",{type:"button",role:"separator","aria-orientation":"vertical","aria-valuenow":Ie,"aria-valuemin":k??48,"aria-valuemax":C,"aria-valuetext":`${Ie}px`,title:w,"aria-label":w??$.resizeColumn({columnId:o}),className:l(V.slots.tableHeadResizeHandle,E?.resizeHandle),onClick:ue=>ue.stopPropagation(),onKeyDown:We,onPointerDown:le}):null]})},"BaseTableHead")),gr=st.forwardRef(r(function({align:t="left",appearance:o,className:n,classNames:a,style:s,...i},m){Nn("cell align",t,["left","center","right"]);let{layout:c,theme:d}=Uo(o),g=c==="split-scroll";return jsxRuntime.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"));st.forwardRef(r(function({appearance:t,className:o,classNames:n,style:a,...s},i){let{theme:m}=Uo(t);return jsxRuntime.jsx("caption",{...s,ref:i,"data-slot":"caption",className:l(m.slots.tableCaption,n?.root,o),style:{...m.styles.tableCaption,...a}})},"BaseTableCaption"));var Ea=st.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=A(o)||A(n)||A(a)||A(s);return jsxRuntime.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:jsxRuntime.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?jsxRuntime.jsxs("div",{className:l(b.slots.tableEmptyContent,d?.content),children:[A(o)?jsxRuntime.jsx("div",{className:l(b.slots.tableEmptyIcon,d?.icon),children:o}):null,A(n)?jsxRuntime.jsx("div",{className:l(b.slots.tableEmptyTitle,d?.title),children:n}):null,A(a)?jsxRuntime.jsx("div",{className:l(b.slots.tableEmptyDescription,d?.description),children:a}):null,A(s)?jsxRuntime.jsx("div",{className:l(b.slots.tableEmptyActions,d?.actions),children:s}):null]}):i})})},"BaseTableEmpty"));var $b={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"},br=st.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,k]of [["invalid",t],["disabled",o],["readOnly",n]])if(typeof k!="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=ze(s),h=Ne(),y=Ee(b),v=Vo(),w=t||v.invalid;return jsxRuntime.jsx("textarea",{...h,...p,ref:f,disabled:o,readOnly:n,"aria-invalid":d??(w||void 0),"data-monkeys-component":"textarea","data-slot":"control","data-size":a,"data-invalid":w||void 0,"data-disabled":o||void 0,"data-readonly":n||void 0,className:l(y.slots.controlWrapper,y.slots.controlBase,y.slots.controlTextarea,w&&y.slots.controlInvalid,o&&y.slots.controlDisabled,n&&y.slots.controlReadOnly,a&&$b[a],m?.control,i),style:{...y.styles.control,...w?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 Yd={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 ws(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(Yd,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(Yd[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(ws,"parseAssetIconNodes");var Mn=st.forwardRef(r(function({icon:t,alt:o,normalizeImageIcon:n=false,className:a,style:s,...i},m){let c=Ne(),d=Ai()??runtime.resolveAssetIconNodes,g=Vl(),u=t.kind==="image"?t.src:void 0,[p,f]=st.useState();st.useEffect(()=>{if(!u||!g)return;let O=new AbortController;return Promise.resolve().then(()=>g(u,O.signal)).then(j=>{O.signal.aborted||f({reference:u,resolver:g,src:Zt(j,"media")});}).catch(()=>{O.signal.aborted||f({reference:u,resolver:g});}),()=>O.abort()},[u,g]);let b=g?p&&p.reference===u&&p.resolver===g?p.src:void 0:Zt(u,"media"),[h,y]=st.useState(),v=st.useRef(null);st.useEffect(()=>{let O=v.current;b&&O?.complete&&y({source:b,resolver:g,ready:O.naturalWidth>0});},[b,g]);let w=t.kind==="lucide"?t.name:void 0,x=st.useMemo(()=>{if(w)try{return d.peek?ws(d.peek(w)):void 0}catch{return}},[w,d]),[k,C]=st.useState();st.useEffect(()=>{let O=true;return w&&!x&&Promise.resolve().then(()=>d(w)).then(j=>{O&&C({name:w,resolver:d,nodes:ws(j)});}).catch(()=>{O&&C({name:w,resolver:d,nodes:void 0});}),()=>{O=false;}},[w,d,x]);let S=k?.name===w&&k?.resolver===d,T=x??(S?k?.nodes:void 0),E=!!(u&&g&&!(p?.reference===u&&p?.resolver===g)),R=h?.source===b&&h?.resolver===g,F=!!(w&&!x&&!S),_=t.kind==="emoji"?"ready":t.kind==="image"?b?R?h?.ready?"ready":"error":"loading":E?"loading":"error":T?"ready":F?"loading":"error",z=_==="loading"?jsxRuntime.jsx(Dt,{variant:"block",className:"h-5 w-5 max-h-full max-w-full rounded"}):jsxRuntime.jsx(lucideReact.Wrench,{"aria-hidden":"true",className:"h-5 w-5 max-h-full max-w-full"});return jsxRuntime.jsx("div",{...c,...i,ref:m,role:"img","aria-label":o,"data-icon-state":_,"aria-busy":_==="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"?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[b&&_!=="error"&&jsxRuntime.jsx("img",{ref:v,src:b,alt:"","aria-hidden":"true",onLoad:O=>{O.currentTarget===v.current&&y({source:b,resolver:g,ready:true});},onError:O=>{O.currentTarget===v.current&&y({source:b,resolver:g,ready:false});},style:_==="loading"?{display:"none"}:void 0,className:n?"h-5 w-5 object-contain":"h-full w-full object-cover"},b),_!=="ready"&&z]}):t.kind==="emoji"?jsxRuntime.jsx("span",{"aria-hidden":"true",children:t.value}):T?jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"h-5 w-5 max-h-full max-w-full",children:T.map(([O,j],I)=>{let{key:V,...$}=j;return st.createElement(O,{...$,key:V??I})})}):z})},"BaseAssetIcon"));function Xd({expanded:e}){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:jsxRuntime.jsx("path",{d:e?"m6 9 6 6 6-6":"m9 18 6-6-6-6"})})}r(Xd,"ChevronIcon");function of(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"12",cy:"5",r:"1"}),jsxRuntime.jsx("circle",{cx:"12",cy:"19",r:"1"})]})}r(of,"MoreIcon");function nf(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[jsxRuntime.jsx("circle",{cx:"9",cy:"6",r:"1"}),jsxRuntime.jsx("circle",{cx:"9",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"9",cy:"18",r:"1"}),jsxRuntime.jsx("circle",{cx:"15",cy:"6",r:"1"}),jsxRuntime.jsx("circle",{cx:"15",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"15",cy:"18",r:"1"})]})}r(nf,"GripIcon");function ec(e,t){for(let o of e??[])o.defaultExpanded&&t.add(o.id),ec(o.children,t);}r(ec,"collectDefaultExpandedNodeIds");function Zd(e,t){let o=new Set(t??[]);for(let n of e)ec(n.nodes,o);return o}r(Zd,"buildDefaultNodeExpandedSet");function Qd(e,t){let o=new Set(t??[]);for(let n of e)(n.hideHeader||n.defaultExpanded!==false)&&o.add(n.id);return o}r(Qd,"buildDefaultGroupExpandedSet");function tc(e,t,o,n){for(let[a,s]of (e??[]).entries())n.set(s.id,{node:s,group:t,parentId:o,index:a}),tc(s.children,t,s.id,n);}r(tc,"flattenNodes");function rf(e){let t=new Map;for(let o of e)tc(o.nodes,o,void 0,t);return t}r(rf,"buildFlattenedNodeMap");function af(e,t){return [...t??[],...e.actions??[]]}r(af,"getNodeActions");function sf(e,t){return [...t??[],...e.actions??[]]}r(sf,"getGroupActions");function Cs({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:w,labels:x,reorderMode:k="none",appearance:C,className:S,classNames:T,onSelectNode:E,onSelectGroup:R,onExpandedNodeIdsChange:F,onExpandedGroupIdsChange:_,onAction:z,onReorderNodes:O}){let j=xt().dataExplorer.viewTree,I=Ll(El(C)),V=x?.actions??j.actions,$=x?.expand??j.expand,N=x?.collapse??j.collapse,D=v??x?.loading??j.loading,M=h??x?.empty??j.empty,K=Array.isArray(e),J=st.useMemo(()=>K?e:[{id:"__root__",hideHeader:true,defaultExpanded:true,nodes:Array.isArray(t)?t:[]}],[e,K,t]),G=st.useMemo(()=>rf(J),[J]),[te,U]=st.useState(()=>Zd(J,i)),[Z,ae]=st.useState(()=>Qd(J,c)),[ie,de]=st.useState(),[W,pe]=st.useState();st.useEffect(()=>{U(Zd(J,i)),ae(Qd(J,c));},[c,i,d]);let B=s!==void 0?new Set(s):te,H=m!==void 0?new Set(m):Z,ne=r((q,L)=>{let X=new Set(B);L?X.add(q):X.delete(q),s===void 0&&U(X),F?.([...X]);},"setNodeExpanded"),fe=r((q,L)=>{let X=new Set(H);L?X.add(q):X.delete(q),m===void 0&&ae(X),_?.([...X]);},"setGroupExpanded"),ye=r((q,L)=>L.type==="node"?{type:"node",action:q,node:L.node,group:L.group,context:o}:{type:"group",action:q,group:L.group,context:o},"createActionContext"),xe=r((q,L)=>{let X=q.filter(se=>{let Y=ye(se,L);return Jn(se.visible,Y)??true});return X.length===0?null:jsxRuntime.jsxs(Vt__namespace.Root,{children:[jsxRuntime.jsx(Vt__namespace.Trigger,{asChild:true,children:jsxRuntime.jsx("button",{type:"button",title:V,"aria-label":V,className:l(I.slots.menuTrigger,L.type==="group"?I.slots.treeGroupActions:I.slots.treeNodeActions,L.type==="group"?T?.groupActions:l(T?.nodeActions,T?.itemActions)),onClick:se=>se.stopPropagation(),children:b??jsxRuntime.jsx(of,{})})}),jsxRuntime.jsx(Vt__namespace.Portal,{children:jsxRuntime.jsx(Vt__namespace.Content,{align:"end",sideOffset:6,className:l(I.slots.menuContent,T?.menuContent),style:I.styles.menuContent,onClick:se=>se.stopPropagation(),children:X.map(se=>{let Y=ye(se,L),ce=(Jn(se.disabled,Y)??false)||(Jn(se.loading,Y)??false),ke=Jn(se.active,Y)??false;return se.render?jsxRuntime.jsx("div",{children:se.render(Y)},se.id):jsxRuntime.jsxs("div",{children:[se.separatorBefore?jsxRuntime.jsx(Vt__namespace.Separator,{className:I.slots.menuSeparator}):null,jsxRuntime.jsxs(Vt__namespace.Item,{title:se.title,disabled:ce,className:l(I.slots.menuItem,Al(I,se.tone),ke&&"bg-accent text-accent-foreground",T?.menuItem),style:I.styles.menuItem,onSelect:()=>{ce||(se.onAction?.(Y),z?.(Y));},children:[se.icon?jsxRuntime.jsx("span",{className:I.slots.menuItemIcon,children:se.icon}):null,jsxRuntime.jsx("span",{className:I.slots.menuItemLabel,children:se.label})]}),se.separatorAfter?jsxRuntime.jsx(Vt__namespace.Separator,{className:I.slots.menuSeparator}):null]},se.id)})})})]})},"renderActions"),oe=r((q,L)=>{q.preventDefault();let X=ie||q.dataTransfer.getData("application/x-data-explorer-node");if(!X||X===L.id||!O){de(void 0),pe(void 0);return}let se=G.get(X),Y=G.get(L.id);if(!se||!Y){de(void 0),pe(void 0);return}let ce=se.parentId===Y.parentId&&se.group?.id===Y.group?.id;if(k==="same-parent"&&!ce){de(void 0),pe(void 0);return}let ke={activeNode:se.node,overNode:Y.node,activeGroup:se.group,overGroup:Y.group,activeParentId:se.parentId,overParentId:Y.parentId,oldIndex:se.index,newIndex:Y.index,sameParent:ce,context:o};O(ke),de(void 0),pe(void 0);},"handleDrop"),le=r((q,L,X)=>{let se=Array.isArray(q.children)?q.children:[],Y=se.length>0,ce=q.collapsible===false||B.has(q.id),ke=n===q.id,we=q.selectable!==false&&!q.disabled,Me=k!=="none"&&!!O&&q.reorderable!==false,Pe=ie===q.id,Ve=W===q.id&&ie!==q.id,Xe=af(q,g);return jsxRuntime.jsxs("div",{"data-data-explorer-entry":"node","data-data-explorer-node-id":q.id,"data-data-explorer-group-id":L?.id,className:l(I.slots.treeNode,T?.node,T?.item,q.className),onDragOver:Oe=>{!ie||!Me||(Oe.preventDefault(),pe(q.id));},onDragLeave:()=>{W===q.id&&pe(void 0);},onDrop:Oe=>oe(Oe,q),children:[jsxRuntime.jsxs("div",{className:l(I.slots.treeNodeButton,ke&&I.slots.treeNodeSelected,q.disabled&&I.slots.treeNodeDisabled,Pe&&I.slots.treeNodeDragging,Ve&&"ring-1 ring-primary/30",ke&&T?.itemSelected,ke&&T?.nodeSelected,q.disabled&&T?.nodeDisabled,Pe&&T?.nodeDragging,T?.nodeButton,T?.itemButton),style:{paddingLeft:`calc(${(q.indentLevel??X)*p+f}px + var(--data-explorer-tree-group-indent, 0px))`},role:"treeitem","aria-selected":ke||void 0,"aria-disabled":q.disabled||void 0,"aria-expanded":Y?ce:void 0,"aria-label":q.ariaLabel,tabIndex:we?0:-1,onClick:()=>{we&&E?.(q,o);},onKeyDown:Oe=>{Oe.target===Oe.currentTarget&&we&&(Oe.key!=="Enter"&&Oe.key!==" "||(Oe.preventDefault(),E?.(q,o)));},children:[Me?jsxRuntime.jsx("span",{draggable:true,className:l(I.slots.treeNodeDragHandle,T?.nodeDragHandle),onClick:Oe=>Oe.stopPropagation(),onDragStart:Oe=>{Oe.stopPropagation(),Oe.dataTransfer.effectAllowed="move",Oe.dataTransfer.setData("application/x-data-explorer-node",q.id),de(q.id);},onDragEnd:()=>{de(void 0),pe(void 0);},children:jsxRuntime.jsx(nf,{})}):null,Y?jsxRuntime.jsx("button",{type:"button",className:l(I.slots.treeNodeToggle,T?.nodeToggle,T?.expander),"aria-label":ce?N:$,onClick:Oe=>{Oe.stopPropagation(),ne(q.id,!ce);},children:jsxRuntime.jsx(Xd,{expanded:ce})}):jsxRuntime.jsx("span",{className:l(I.slots.treeNodeToggle,T?.nodeToggle)}),q.icon?jsxRuntime.jsx("span",{className:l(I.slots.treeNodeIcon,T?.nodeIcon,T?.itemIcon),children:q.icon}):null,jsxRuntime.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[jsxRuntime.jsx("span",{className:l(I.slots.treeNodeLabel,T?.nodeLabel,T?.itemLabel),children:q.label}),q.description?jsxRuntime.jsx("span",{className:l(I.slots.treeNodeDescription,T?.nodeDescription),children:q.description}):null]}),q.meta?jsxRuntime.jsx("span",{className:l(I.slots.treeNodeMeta,T?.nodeMeta),children:q.meta}):null,q.badge?jsxRuntime.jsx("span",{className:l(I.slots.treeNodeBadge,T?.nodeBadge),children:q.badge}):null,xe(Xe,{type:"node",node:q,group:L})]}),Y&&ce?jsxRuntime.jsx("div",{className:l(I.slots.treeNodeChildren,T?.nodeChildren,T?.list),children:se.map(Oe=>le(Oe,L,X+1))}):null]},q.id)},"renderNode"),Re=r((q,L,X)=>q===false?null:jsxRuntime.jsx("div",{className:l(L,X),children:q}),"renderPlaceholder");if(y)return jsxRuntime.jsx("div",{className:l(I.slots.treeRoot,T?.root,S),children:Re(D,I.slots.treeLoading,T?.loading)});if(w)return jsxRuntime.jsx("div",{className:l(I.slots.treeRoot,T?.root,S),children:Re(w??x?.error,I.slots.treeError,T?.error)});let Ie=J.some(q=>(q.nodes??[]).length>0),We=J.some(q=>q.status==="loading"||q.error);return !Ie&&!We&&(!K||J.length===0)?jsxRuntime.jsx("div",{className:l(I.slots.treeRoot,T?.root,S),children:Re(M,I.slots.treeEmpty,T?.empty)}):jsxRuntime.jsx("div",{className:l(I.slots.treeRoot,T?.root,S),role:Ie||J.some(q=>!q.hideHeader)?"tree":void 0,children:J.map(q=>{let L=q.hideHeader||q.collapsible===false||H.has(q.id),X=q.nodes?.length??0,se=sf(q,u),Y=a===q.id,ce=q.collapsible!==false;return jsxRuntime.jsxs("section",{"data-data-explorer-entry":"group","data-data-explorer-group-id":q.id,className:l(I.slots.treeGroup,T?.group,q.className),children:[q.hideHeader?null:jsxRuntime.jsxs("div",{role:"treeitem","aria-label":typeof q.label=="string"?q.label:void 0,"aria-selected":q.selectable?Y:void 0,"aria-expanded":ce?L:void 0,className:l(I.slots.treeGroupHeader,I.slots.treeGroupHeaderButton,Y&&I.slots.treeNodeSelected,T?.groupHeader,T?.groupHeaderButton,Y&&T?.itemSelected),children:[jsxRuntime.jsxs("button",{type:"button",className:l("flex min-w-0 flex-1 items-center gap-2 text-left outline-hidden focus-visible:ring-2 focus-visible:ring-ring",T?.groupLabel),"aria-pressed":q.selectable?Y:void 0,"aria-expanded":!q.selectable&&ce?L:void 0,onClick:()=>{if(q.selectable){R?.(q,o);return}ce&&fe(q.id,!L);},children:[q.icon?jsxRuntime.jsx("span",{className:l(I.slots.treeNodeIcon,T?.nodeIcon,T?.itemIcon),children:q.icon}):null,jsxRuntime.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[q.label?jsxRuntime.jsx("span",{className:l(I.slots.treeNodeLabel,T?.nodeLabel,T?.itemLabel),children:q.label}):null,q.description?jsxRuntime.jsx("span",{className:l(I.slots.treeNodeDescription,T?.nodeDescription),children:q.description}):null]}),q.meta?jsxRuntime.jsx("span",{className:l(I.slots.treeNodeMeta,T?.nodeMeta),children:q.meta}):null,q.badge?jsxRuntime.jsx("span",{className:l(I.slots.treeNodeBadge,T?.nodeBadge),children:q.badge}):null]}),ce?jsxRuntime.jsx("button",{type:"button",className:l(I.slots.treeNodeToggle,T?.expander),"aria-label":L?N:$,"aria-expanded":L,onClick:()=>fe(q.id,!L),children:jsxRuntime.jsx(Xd,{expanded:L})}):jsxRuntime.jsx("span",{className:l(I.slots.treeNodeToggle,T?.expander)}),xe(se,{type:"group",group:q})]}),L?jsxRuntime.jsx("div",{role:"group",className:l(I.slots.treeGroupContent,T?.groupContent,T?.list),children:q.loading||q.status==="loading"?Re(D,I.slots.treeLoading,T?.loading):q.error||q.status==="error"?Re(q.error??x?.error??j.error,I.slots.treeError,T?.error):X>0?q.nodes?.map(ke=>le(ke,q,0)):Re(q.empty??M,I.slots.treeEmpty,T?.empty)}):null]},q.id)})})}r(Cs,"DataExplorerViewTree");var yr="gap-2 rounded-[var(--radius)] border border-transparent text-sm font-medium motion-reduce:transition-none",hr="size-[var(--monkeys-component-navigation-sidebar-icon-size,1.125rem)] shrink-0 text-inherit [&_svg]:size-full",Ss="text-foreground hover:border-transparent hover:bg-[var(--navigation-internal-hover-background)] hover:text-[var(--navigation-internal-hover-foreground)]",Ts="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)]",oc="[--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 nc(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(nc,"unifiedStyle");var lf="[--navigation-internal-selected-background:var(--monkeys-component-navigation-sidebar-row-selected-background,var(--monkeys-component-navigation-sidebar-tree-row-selected-background,var(--navigation-internal-default-selected-background)))] [--navigation-internal-selected-foreground:var(--monkeys-component-navigation-sidebar-row-selected-foreground,var(--monkeys-component-navigation-sidebar-tree-row-selected-foreground,var(--navigation-internal-default-selected-foreground)))] [--navigation-internal-hover-background:var(--monkeys-component-navigation-sidebar-row-hover-background,var(--monkeys-component-navigation-sidebar-tree-row-hover-background,color-mix(in_srgb,hsl(var(--monkeys-color-accent,var(--accent)))_65%,transparent)))] [--navigation-internal-hover-foreground:var(--monkeys-component-navigation-sidebar-row-hover-foreground,var(--monkeys-component-navigation-sidebar-tree-row-hover-foreground,hsl(var(--monkeys-color-foreground,var(--foreground)))))]",df="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)]",fr="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 rc(e,t,o={}){let n=l(yr,e,t,Ss);return {...o,root:l(lf,"space-y-0.5",o.root),group:l("space-y-0.5","[&>[role=treeitem]+[role=group]]:[--data-explorer-tree-group-indent:var(--monkeys-component-navigation-sidebar-tree-group-indent,1rem)]",o.group),groupHeaderButton:l("h-auto",n,o.groupHeaderButton),nodeButton:l(n,df,o.nodeButton),itemSelected:l(Ts,o.itemSelected),nodeIcon:l(hr,"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(fr,"order-2 size-5 p-0 group-focus-within/tree-group:opacity-100",o.groupActions),nodeActions:l(fr,"order-2 size-5 p-0 group-focus-within/tree-node:opacity-100",o.nodeActions),nodeToggle:l(fr,"order-1 empty:hidden",o.nodeToggle),expander:l(fr,"order-1 empty:hidden",o.expander),nodeDragHandle:l(fr,o.nodeDragHandle)}}r(rc,"unifiedTreeClassNames");function mf({collapsed:e}){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-4 w-4",fill:"none",children:jsxRuntime.jsx("path",{d:e?"M4 4.5h12M4 15.5h12M5 7.5 7.5 10 5 12.5M15 7.5 12.5 10l2.5 2.5":"M4 4.5h12M4 15.5h12M7.5 7.5 5 10l2.5 2.5M12.5 7.5 15 10l-2.5 2.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}r(mf,"CollapseIcon");function pf(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-4 w-4",fill:"none",children:[jsxRuntime.jsx("circle",{cx:"8.5",cy:"8.5",r:"5",stroke:"currentColor",strokeWidth:"1.6"}),jsxRuntime.jsx("path",{d:"m12.2 12.2 3.3 3.3",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})}r(pf,"SearchIcon");function gf(){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-3.5 w-3.5",fill:"none",children:jsxRuntime.jsx("path",{d:"m6 6 8 8m0-8-8 8",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})})}r(gf,"ClearIcon");function bf(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-4 w-4",fill:"currentColor",children:[jsxRuntime.jsx("circle",{cx:"5",cy:"10",r:"1.2"}),jsxRuntime.jsx("circle",{cx:"10",cy:"10",r:"1.2"}),jsxRuntime.jsx("circle",{cx:"15",cy:"10",r:"1.2"})]})}r(bf,"MoreIcon");function La({expanded:e}){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:l("h-4 w-4 transition-transform motion-reduce:transition-none",e&&"rotate-180"),fill:"none",children:jsxRuntime.jsx("path",{d:"m6 8 4 4 4-4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}r(La,"DisclosureIcon");function ff(e,t){typeof e=="function"?e(t):e&&(e.current=t);}r(ff,"assignRef");function Bn(e,t){if(!Number.isFinite(t))throw new RangeError(`NavigationSidebar ${e} must be a finite number.`)}r(Bn,"requireFiniteNumber");function yf(e){let t=e.minWidth??180,o=e.maxWidth??420,n=e.defaultWidth??256,a=e.collapsedWidth??60,s=e.collapseThreshold??140;if(Bn("minWidth",t),Bn("maxWidth",o),Bn("defaultWidth",n),Bn("collapsedWidth",a),Bn("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(yf,"resolveLayoutBounds");function Aa(e,t){return Math.min(Math.max(e,t.minWidth),t.maxWidth)}r(Aa,"clampWidth");function dc(e,t){if(t){t(e);return}typeof console<"u"&&console.warn("NavigationSidebar could not persist layout state.",e);}r(dc,"reportStorageError");function cc(e){if(e)return e;if(!(typeof window>"u"))return window.localStorage}r(cc,"resolveStorage");function hf(e,t){let o={collapsed:e.defaultCollapsed??false,width:Aa(t.defaultWidth,t)};if(!e.storageKey)return o;let n=cc(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)?Aa(s.width,t):o.width}}catch(a){return dc(a,e.onStorageError),o}}r(hf,"readStoredLayout");function Ns(e,t){return t||(typeof e=="string"?e:void 0)}r(Ns,"getNodeTitle");function xf(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(xf,"activeVariantClassName");function vf(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?Ts:xf(a),inactive:t?Ss:"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&&oc,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(vf,"resolveAppearance");var lc="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)))]",kf="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)))]",xr="hover:!bg-transparent hover:!text-inherit focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring";function wf(e){return {...e,groupHeader:l(lc,e?.groupHeader),itemSelected:l(kf,e?.itemSelected),nodeButton:l(lc,"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(xr,e?.expander),nodeToggle:l(xr,e?.nodeToggle),groupActions:l(xr,e?.groupActions),nodeActions:l(xr,e?.nodeActions),nodeDragHandle:l(xr,e?.nodeDragHandle)}}r(wf,"resolveNavigationTreeClassNames");function Is({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&&yr,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(Is,"entryClassName");function Ms({item:e,collapsed:t,mobile:o,classNames:n,endIndicator:a,appearance:s}){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[A(e.icon)?jsxRuntime.jsx("span",{className:l("flex size-5 shrink-0 items-center justify-center [&_svg]:size-full",s.unified&&hr,n?.itemIcon),"aria-hidden":"true",children:e.icon}):null,o||!t?jsxRuntime.jsxs("span",{className:l("flex min-w-0 flex-1 flex-col",n?.itemContent),children:[jsxRuntime.jsx("span",{className:l("min-w-0 truncate font-semibold",s.unified&&"font-medium",n?.itemLabel),children:e.label}),A(e.description)?jsxRuntime.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)&&A(e.meta)?jsxRuntime.jsx("span",{className:l("shrink-0 text-xs text-muted-foreground",n?.itemMeta),children:e.meta}):null,(o||!t)&&A(e.endContent)?jsxRuntime.jsx("span",{className:l("shrink-0",n?.itemEndContent),children:e.endContent}):null,(o||!t)&&A(a)?jsxRuntime.jsx("span",{className:"flex shrink-0 items-center justify-center",children:a}):null]})}r(Ms,"EntryContent");function za({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=Ns(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 jsxRuntime.jsx(p,{...y,"data-navigation-sidebar-item-id":e.id,"data-active":t?"true":"false","data-expanded":g===void 0?void 0:String(g),className:Is({item:e,active:t,collapsed:o,mobile:i,embedded:m,appearance:a,classNames:s,domClassName:b.className}),children:jsxRuntime.jsx(Ms,{appearance:a,item:e,collapsed:o,mobile:i,classNames:s,endIndicator:u})})}r(za,"EntryButton");function Cf({item:e,appearance:t,classNames:o}){let n=e.domProps??{};return jsxRuntime.jsx("div",{...n,"data-navigation-sidebar-item-id":e.id,"aria-disabled":e.disabled||void 0,title:Ns(e.label,e.title),className:Is({item:e,active:false,collapsed:false,mobile:true,embedded:true,appearance:t,classNames:o,domClassName:n.className}),children:jsxRuntime.jsx(Ms,{appearance:t,item:e,collapsed:false,mobile:true,classNames:o})})}r(Cf,"EntryPresentation");function Oa({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&&yr,e?t.selected:t.inactive)}r(Oa,"routeRowClassName");function Fa(e,t){return t?e.filter(o=>!o.filterIds?.length||o.filterIds.includes(t)):e}r(Fa,"filterCatalogItems");function Sf({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=Fa(n,i),h=a.map(x=>({...x,items:Fa(x.items,i)})).filter(x=>x.items.length>0),y=b.length>0||h.length>0,v=s.length>0&&!t?jsxRuntime.jsx("div",{role:"group",className:l(g==="split"?"flex min-w-32 flex-col gap-1 border-r border-border/60 pr-2":"flex flex-wrap gap-1",f?.filterList),"aria-label":p?`${p} filters`:void 0,children:s.map(x=>{let k=x.id===i;return jsxRuntime.jsxs("button",{type:"button",title:x.title??(typeof x.label=="string"?x.label:void 0),"aria-pressed":k,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",k&&"bg-muted text-foreground",f?.filterItem,k&&f?.filterItemActive),onClick:()=>c?.(x),children:[A(x.icon)?jsxRuntime.jsx("span",{"aria-hidden":"true",children:x.icon}):null,jsxRuntime.jsx("span",{className:"truncate",children:x.label})]},x.id)})}):null,w=y?jsxRuntime.jsxs("div",{className:l("min-w-0 flex-1",f?.list),children:[b.length>0?jsxRuntime.jsx("ul",{className:"grid list-none gap-1 p-0",children:b.map(x=>jsxRuntime.jsx("li",{children:jsxRuntime.jsx(za,{item:x,active:x.active??x.id===m,collapsed:t,itemAs:d,appearance:o,classNames:f})},x.id))}):null,h.map(x=>jsxRuntime.jsxs("section",{className:l("mt-3 first:mt-0",f?.section,x.className),children:[!t&&A(x.label)?jsxRuntime.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,jsxRuntime.jsx("ul",{className:"grid list-none gap-1 p-0",children:x.items.map(k=>jsxRuntime.jsx("li",{children:jsxRuntime.jsx(za,{item:k,active:k.active??k.id===m,collapsed:t,itemAs:d,appearance:o,classNames:f})},k.id))})]},x.id))]}):jsxRuntime.jsx("div",{className:"px-3 py-8 text-center text-sm text-muted-foreground",children:u});return jsxRuntime.jsxs("nav",{"aria-label":p,className:l(g==="split"&&!t&&"flex min-w-0 gap-2"),children:[v,w]})}r(Sf,"CatalogContent");function Tf({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 jsxRuntime.jsxs(c,{...d,...n?{type:"button"}:{},"data-navigation-sidebar-child-id":e.id,"aria-current":n&&o?"page":void 0,"aria-disabled":e.disabled||void 0,title:Ns(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&&yr,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:[A(e.icon)?jsxRuntime.jsx("span",{className:l("flex size-5 shrink-0 items-center justify-center [&_svg]:size-full",s.unified&&hr),"aria-hidden":"true",children:e.icon}):null,jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:e.label})]})}r(Tf,"ChildEntry");function Ha({itemId:e,actions:t,kind:o,className:n,mobile:a=false}){return A(t)?jsxRuntime.jsx("div",{"data-navigation-sidebar-item-actions":o==="item"?e:void 0,"data-navigation-sidebar-child-actions":o==="child"?e:void 0,"data-navigation-sidebar-actions-mobile":a?"true":void 0,className:l("ml-auto flex shrink-0 items-center gap-1 [&>button]:border-0 [&>button]:bg-transparent [&>button]:shadow-none [&>button:hover]:bg-muted",n),children:t}):null}r(Ha,"RouteActions");function Bs(e){return e.interaction==="disclosure"}r(Bs,"isDisclosureRouteItem");function Rf(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),Bs(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(Rf,"validateRouteItems");function Nf({item:e,expanded:t,controls:o,label:n,onToggle:a,classNames:s}){let i=typeof e.label=="string"?e.label:e.id;return jsxRuntime.jsx("button",{type:"button",disabled:e.disabled,"aria-expanded":t,"aria-controls":o,"aria-label":`${n}: ${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:jsxRuntime.jsx(La,{expanded:t})})}r(Nf,"RouteChildrenToggle");function Va({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 jsxRuntime.jsxs(Vt__namespace.Root,{children:[jsxRuntime.jsx(Vt__namespace.Trigger,{asChild:true,children:i==="item"&&s?jsxRuntime.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:Is({item:e,active:false,collapsed:!m,mobile:m,appearance:s,classNames:a,domClassName:u.className}),children:jsxRuntime.jsx(Ms,{appearance:s,item:e,collapsed:!m,mobile:m,classNames:a,endIndicator:m?jsxRuntime.jsx(La,{expanded:false}):void 0})}):jsxRuntime.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"?jsxRuntime.jsx(La,{expanded:false}):jsxRuntime.jsx(bf,{})})}),jsxRuntime.jsx(Vt__namespace.Portal,{children:jsxRuntime.jsx(Vt__namespace.Content,{side:"right",align:"start",sideOffset:8,className:l("z-50 min-w-40 rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md outline-hidden",a?.childMenuContent),children:e.children?.map(p=>jsxRuntime.jsxs(Vt__namespace.Item,{disabled:p.disabled,"data-navigation-sidebar-child-id":p.id,"data-active":p.id===t?"true":"false",className:l("flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",p.id===t&&"bg-accent text-accent-foreground"),onSelect:()=>n?.(p,e),children:[A(p.icon)?jsxRuntime.jsx("span",{"aria-hidden":"true",children:p.icon}):null,jsxRuntime.jsx("span",{className:"truncate",children:p.label})]},p.id))})})]})}r(Va,"CollapsedChildMenu");function If({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=st.useId(),v=st.useMemo(()=>Rf(n),[n]),[w,x]=st.useState(()=>m),k=i!==void 0,C=i??w,S=st.useMemo(()=>C.filter(R=>v.has(R)),[v,C]),T=st.useMemo(()=>new Set(S),[S]),E=st.useCallback(R=>{if(R.disabled||!v.has(R.id))return;let F=T.has(R.id)?S.filter(_=>_!==R.id):[...S,R.id];k||x(F),u?.(F);},[v,T,k,S,u]);return jsxRuntime.jsx("nav",{"aria-label":b,children:jsxRuntime.jsx("ul",{className:l("grid list-none gap-2 p-0",o.unified&&"gap-0.5",h?.list),children:n.map((R,F)=>{let _=Bs(R),z=!_&&R.id===a,O=!!R.children?.length,j=v.has(R.id),I=!j||T.has(R.id),V=!t&&A(R.actions),$=t&&O&&!!g||!t&&j&&!_||V,N=`${y}-route-children-${F}`;return jsxRuntime.jsxs("li",{className:"grid min-w-0 gap-1",children:[t&&_?jsxRuntime.jsx(Va,{item:R,activeChildId:s,label:p,onChildSelect:g,classNames:h,appearance:o,triggerVariant:"item"}):jsxRuntime.jsxs("div",{"data-navigation-sidebar-item-row":$?R.id:void 0,"data-active":$?String(z):void 0,className:$?Oa({active:z,appearance:o}):void 0,children:[jsxRuntime.jsx(za,{item:R,active:z,collapsed:t,embedded:$,itemAs:_?"button":c,appearance:o,classNames:h,onSelect:_?()=>E(R):d?()=>d(R):void 0,ariaControls:!t&&j&&_?N:void 0,ariaExpanded:!t&&j&&_?I:void 0,endIndicator:!t&&_&&!V?jsxRuntime.jsx(La,{expanded:I}):void 0}),V?jsxRuntime.jsx(Ha,{itemId:R.id,actions:R.actions,kind:"item",className:h?.itemActions}):null,t&&g?jsxRuntime.jsx(Va,{item:R,activeChildId:s,label:p,onChildSelect:g,classNames:h}):null,!t&&j&&(!_||V)?jsxRuntime.jsx(Nf,{item:R,expanded:I,controls:N,label:f,onToggle:()=>E(R),classNames:h}):null]}),!t&&O?jsxRuntime.jsx("ul",{id:N,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:R.children?.map(D=>{let M=A(D.actions),K=D.id===s,J=jsxRuntime.jsx(Tf,{child:D,parent:R,active:K,interactive:!!g,onSelect:g,appearance:o,classNames:h,embedded:M});return jsxRuntime.jsx("li",{children:M?jsxRuntime.jsxs("div",{"data-navigation-sidebar-child-row":D.id,"data-active":String(K),className:Oa({active:K,appearance:o}),children:[J,jsxRuntime.jsx(Ha,{itemId:D.id,actions:D.actions,kind:"child",className:h?.childActions})]}):J},D.id)})}):null]},R.id)})})})}r(If,"RouteContent");function Mf(e,t,o){return [...Fa(e,o),...t.flatMap(n=>Fa(n.items,o))]}r(Mf,"flattenCatalogItems");function Bf({props:e,appearance:t}){if(!e.mobile||e.mobile.mode!=="horizontal")return null;let o=e.classNames,n=e.kind==="catalog"?Mf(e.items??[],e.sections??[],e.activeFilterId):e.routeItems;return jsxRuntime.jsx("nav",{"aria-label":e.ariaLabel,className:l("flex gap-2 overflow-x-auto pb-1",o?.mobileNav,e.mobile.className),children:n.map(a=>{let s={...o,mobileItem:l(o?.mobileItem,e.mobile?.itemClassName)},i=e.kind==="route"?a:void 0,m=i!==void 0&&A(i.actions);if(e.kind==="route"&&Bs(a))return m?jsxRuntime.jsxs("div",{"data-navigation-sidebar-item-row":a.id,"data-active":"false",className:l(Oa({active:false,appearance:t}),"shrink-0"),children:[jsxRuntime.jsx(Cf,{item:a,appearance:t,classNames:s}),jsxRuntime.jsx(Ha,{itemId:a.id,actions:a.actions,kind:"item",className:o?.itemActions,mobile:true}),jsxRuntime.jsx(Va,{item:a,activeChildId:e.activeChildId,label:e.collapsedChildMenuLabel??"Open submenu",onChildSelect:e.onChildSelect,classNames:s,appearance:t,triggerVariant:"disclosure",mobile:true})]},a.id):jsxRuntime.jsx(st.Fragment,{children:jsxRuntime.jsx(Va,{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=jsxRuntime.jsx(za,{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?jsxRuntime.jsxs("div",{"data-navigation-sidebar-item-row":a.id,"data-active":String(c),className:l(Oa({active:c,appearance:t}),"shrink-0"),children:[d,jsxRuntime.jsx(Ha,{itemId:i.id,actions:i.actions,kind:"item",className:o?.itemActions,mobile:true})]},a.id):jsxRuntime.jsx(st.Fragment,{children:d},a.id)})})}r(Bf,"MobileNavigation");function Pf(e,t){let o=yf(e);e.width!==void 0&&Bn("width",e.width);let n=st.useRef(null);n.current||(n.current=hf(e,o));let a=st.useRef(null),[s,i]=st.useState(n.current.collapsed),[m,c]=st.useState(n.current.width),[d,g]=st.useState(e.search?.defaultValue??""),[u,p]=st.useState(false),f=e.collapsed??s,b=Aa(e.width??m,o),h=e.search?.value??d,y=e.collapsed!==void 0,v=e.width!==void 0,w=st.useMemo(()=>vf(e.appearance),[e.appearance]),x=e.collapsible??true,k=e.resizable??true,C=x?e.collapsePlacement??"header":"none",S=e.collapseLabel??"Collapse sidebar",T=e.expandLabel??"Expand sidebar",E=e.resizeLabel??"Resize sidebar",R=!f||o.collapsedWidth>0,F=r($=>{a.current=$,ff(t,$);},"setSidebarRef"),_=st.useCallback($=>{!x&&$||(y||i($),e.onCollapsedChange?.($));},[x,y,e.onCollapsedChange]),z=st.useCallback($=>{let N=Aa($,o);v||c(N),e.onWidthChange?.(N);},[o.maxWidth,o.minWidth,v,e.onWidthChange]);st.useEffect(()=>{if(!e.storageKey)return;let $=cc(e.storage);if($)try{$.setItem(e.storageKey,JSON.stringify({collapsed:f,width:b}));}catch(N){dc(N,e.onStorageError);}},[e.onStorageError,e.storage,e.storageKey,f,b]),st.useEffect(()=>{if(!u)return;let $=document.body.style.cursor,N=document.body.style.userSelect,D=r(K=>{let J=a.current;if(!J)return;let G=K.clientX-J.getBoundingClientRect().left;if(x&&G<o.collapseThreshold){_(true);return}_(false),z(G);},"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=$,document.body.style.userSelect=N;}},[o.collapseThreshold,x,u,_,z]);let O=r($=>{if(!($.key!=="ArrowLeft"&&$.key!=="ArrowRight")){if($.preventDefault(),$.key==="ArrowLeft"){let N=b-24;x&&N<o.collapseThreshold?_(true):z(N);return}f&&_(false),z(Math.max(b+24,o.minWidth));}},"handleResizeKeyDown"),j=r($=>jsxRuntime.jsx("button",{type:"button",className:l("inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-md text-muted-foreground outline-hidden transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",e.classNames?.collapseButton,$),"aria-label":f?T:S,title:f?T:S,"aria-expanded":!f,onClick:()=>_(!f),children:jsxRuntime.jsx(mf,{collapsed:f})}),"collapseButton"),I=A(e.title)||A(e.headerLeading)||A(e.headerActions)||C==="header",V=r(()=>{if(e.kind==="catalog")return jsxRuntime.jsx(Sf,{props:e,collapsed:f,appearance:w});if(e.kind==="route")return jsxRuntime.jsx(If,{props:e,collapsed:f,appearance:w});let $=e.tree;return jsxRuntime.jsx(Cs,{...$,classNames:w.unified?rc(w.itemHeight,w.itemPadding,$.classNames):wf($.classNames)})},"renderContent");return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("aside",{...e.rootDomProps,ref:F,"aria-label":e.ariaLabel,"data-monkeys-component":e.dataComponent??"navigation-sidebar","data-navigation-sidebar-kind":e.kind,"data-navigation-sidebar-preset":e.appearance?.preset,"data-collapsed":f?"true":"false",className:l("relative flex h-full min-h-0 shrink-0 flex-col overflow-visible rounded-[calc(var(--radius)+0.25rem)] border transition-[width,opacity] duration-300 motion-reduce:transition-none",w.root,e.desktopClassName,e.classNames?.root,e.rootDomProps?.className,e.className),style:{...w.unified?nc(e.appearance?.activeVariant):{},...e.style,width:e.widthMode==="fill"?void 0:f?o.collapsedWidth:b,transition:u?"none":e.style?.transition},children:[k?jsxRuntime.jsx("button",{type:"button",role:"separator","aria-orientation":"vertical","aria-valuemin":o.minWidth,"aria-valuemax":o.maxWidth,"aria-valuenow":b,"aria-label":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:$=>{$.preventDefault(),p(true);},onKeyDown:O,children:jsxRuntime.jsx("span",{className:"pointer-events-none absolute bottom-3 right-1/2 top-3 w-px translate-x-1/2 rounded-full bg-border opacity-0 transition-opacity group-hover/resize:opacity-100 group-focus-visible/resize:opacity-100"})}):null,C==="edge"?j("absolute -right-3 top-1/2 z-50 -translate-y-1/2 border border-border bg-background shadow-sm"):null,R?jsxRuntime.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-col overflow-hidden",children:[I?jsxRuntime.jsxs("div",{className:l("flex min-h-12 min-w-0 items-center gap-2 border-b border-border/60 px-3",w.unified&&"min-h-14 border-border px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))]",f&&"justify-center px-1",e.classNames?.header),children:[A(e.headerLeading)?jsxRuntime.jsx("span",{className:l("flex shrink-0 items-center justify-center",e.classNames?.headerLeading),children:e.headerLeading}):null,!f&&A(e.title)?jsxRuntime.jsx("div",{className:l("min-w-0 flex-1 truncate text-sm font-semibold",e.classNames?.title),children:e.title}):null,!f&&A(e.headerActions)?jsxRuntime.jsx("div",{className:l("flex shrink-0 items-center gap-1",e.classNames?.headerActions),children:e.headerActions}):null,C==="header"?j():null]}):null,!f&&e.search?jsxRuntime.jsx("div",{className:l("px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))] pb-2 pt-3",w.unified&&"pb-1",e.classNames?.search),children:jsxRuntime.jsxs("div",{className:l("flex items-center gap-2 rounded-md border border-input bg-[var(--monkeys-component-navigation-sidebar-search-background,hsl(var(--monkeys-color-control-surface)))] px-3 text-muted-foreground ring-offset-control-surface focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",w.searchHeight,w.unified&&"rounded-[var(--radius)] border-border bg-[var(--monkeys-component-navigation-sidebar-search-background,transparent)] px-2"),children:[jsxRuntime.jsx("span",{className:l("flex shrink-0",w.unified&&hr,e.classNames?.searchIcon),"aria-hidden":"true",children:e.search.icon??jsxRuntime.jsx(pf,{})}),jsxRuntime.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:$=>{let N=$.currentTarget.value;e.search?.value===void 0&&g(N),e.search?.onValueChange?.(N);}}),h&&e.search.clearLabel?jsxRuntime.jsx("button",{type:"button",className:l("inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",e.classNames?.searchClear),"aria-label":e.search.clearLabel,title:e.search.clearLabel,onClick:()=>{e.search?.value===void 0&&g(""),e.search?.onValueChange?.("");},children:jsxRuntime.jsx(gf,{})}):null]})}):null,jsxRuntime.jsx("div",{className:l("min-h-0 flex-1 overflow-y-auto px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))] py-3",w.unified&&e.search&&"pt-1",f&&"px-1.5",e.classNames?.content),children:V()}),A(e.footer)||C==="footer"?jsxRuntime.jsxs("div",{className:l("flex shrink-0 items-center gap-2 border-t border-border/70 p-3",w.unified&&"border-border",f&&"justify-center px-1",e.classNames?.footer),children:[!f&&A(e.footer)?jsxRuntime.jsx("div",{className:"min-w-0 flex-1",children:e.footer}):null,C==="footer"?j():null]}):null]}):null]}),e.kind!=="tree"?jsxRuntime.jsx(Bf,{props:e,appearance:w}):null]})}r(Pf,"NavigationSidebarInner");var kr=st.forwardRef(Pf);var Df=st.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:w=true,collapsible:x=true,collapseLabel:k="Collapse sidebar",expandLabel:C="Expand sidebar",resizeLabel:S="Resize sidebar",desktopClassName:T="hidden md:flex",mobileClassName:E="flex md:hidden",className:R,classNames:F,style:_,...z},O){let{level:j,variables:I}=aa(),V=r($=>({...$,icon:$.icon??($.iconName?jsxRuntime.jsx(Mn,{icon:{kind:"lucide",name:$.iconName},alt:"",className:"h-4 w-4 rounded-none bg-transparent"}):void 0),endContent:$.endContent??($.count!==void 0?jsxRuntime.jsx(un,{children:$.count}):void 0),onClick:r(N=>{$.disabled||($.onClick?.(N),N.defaultPrevented||s?.({itemId:$.id}));},"onClick")}),"project");return jsxRuntime.jsx(er,{depth:j,children:jsxRuntime.jsx(kr,{ref:O,kind:"catalog",title:t,items:o.map(V),sections:n.map($=>({...$,items:$.items.map(V)})),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:w,collapsible:x,collapsePlacement:"header",collapseLabel:k,expandLabel:C,resizeLabel:S,desktopClassName:T,dataComponent:"workbench-resizable-sidebar",rootDomProps:{...z,"data-workbench-resizable-sidebar":"","data-monkeys-bento-level":j},appearance:{density:"compact",surface:"panel",activeVariant:"soft"},mobile:{mode:"horizontal",className:E},className:l(Xl,"[&>div]:gap-[var(--monkeys-bento-gap)] [--monkeys-sidebar-item-padding:var(--monkeys-bento-gap)] data-[collapsed=true]:[--monkeys-sidebar-item-padding:0px]",F?.root,R),classNames:{root:F?.root,header:l("min-h-0 gap-[var(--monkeys-bento-gap)] border-0 p-0",F?.header),title:l("text-xs font-medium uppercase text-muted-foreground",F?.title),collapseButton:l("h-8 w-8",F?.collapseButton),content:l("space-y-[var(--monkeys-bento-gap)] p-0",F?.list),list:"[&_ul]:gap-[var(--monkeys-bento-gap)]",section:l("mt-[var(--monkeys-bento-gap)]",F?.section),sectionLabel:l("mb-[var(--monkeys-bento-gap)] px-[var(--monkeys-bento-gap)]",F?.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",F?.item),itemIcon:l("[&_svg]:h-3.5 [&_svg]:w-3.5",F?.itemIcon),itemLabel:F?.itemLabel,resizeHandle:F?.resizeHandle,mobileNav:l("gap-[var(--monkeys-bento-gap,var(--global-spacing,0.75rem))] pb-0",F?.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",F?.mobileItem)},style:{...I,..._}})})},"WorkbenchResizableSidebar"));function Lf(e){return !!(e.header||e.footer||e.bodyAs||e.bodyClassName||e.bodyProps||e.classNames?.body)}r(Lf,"shouldRenderBodyWrapper");var Af=st.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=Lf({header:n,footer:a,bodyAs:o==="div"?void 0:o,bodyClassName:c,bodyProps:g,classNames:u}),{className:y,...v}=g??{};return jsxRuntime.jsxs(t,{ref:b,"data-workbench-content-pane":true,className:l("workbench-surface-subtle flex h-full min-w-0 flex-1 flex-col overflow-hidden rounded-lg border border-border/50 transition-all duration-300 dark:border-border/40",u?.root,i),style:p,...f,children:[n?jsxRuntime.jsx("div",{className:l("shrink-0 border-b border-border/40 px-4 py-3 dark:border-border/30",u?.header,m),children:n}):null,h?jsxRuntime.jsx(o,{className:l("min-h-0 flex-1 overflow-hidden",u?.body,c,y),...v,children:s}):s,a?jsxRuntime.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 gc={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 Hf(e){return e.label??e.key}r(Hf,"getDefaultColumnLabel");function Vf(e){return e.filter(t=>qo(t)&&t.hidden!==true).map(t=>qo(t))}r(Vf,"getDefaultVisibleColumnKeys");function Gf({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:Vf(e)}r(Gf,"getResolvedVisibleColumnKeys");function _f(e){return [{value:"compact",label:e.compact},{value:"comfortable",label:e.comfortable},{value:"detailed",label:e.detailed}]}r(_f,"getDefaultDensityOptions");function jf(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(jf,"getDefaultGridColumnOptions");function $f(e){return [{value:1,label:e.bentoColumns(1)},{value:2,label:e.bentoColumns(2)},{value:3,label:e.bentoColumns(3)}]}r($f,"getDefaultBentoColumnOptions");function Kf(e){return [{value:"limit",label:e.topLimit},{value:"all",label:e.allFields}]}r(Kf,"getDefaultDetailVisibilityOptions");function Uf(e){return [{value:"fixed",label:e.adaptiveGrid},{value:"masonry",label:e.masonry}]}r(Uf,"getDefaultLayoutOptions");function wr(e){return String(e)}r(wr,"normalizeOptionValue");function Cr(e,t,o){let n=String(t??o);return e.some(a=>String(a.value)===n)?n:String(o)}r(Cr,"getOptionValue");function pc(e){let t=Number.parseInt(e,10);return Number.isFinite(t)?t:1}r(pc,"parseNumberOption");var Sr={root:"flex w-full flex-wrap",item:"min-w-[58px] flex-1 px-2 text-[11px]",label:"text-[11px]"};function bc({columns:e=[],galleryFieldOptions:t,value:o,onValueChange:n,labels:a,densityOptions:s,gridColumnOptions:i,bentoColumnOptions:m,detailVisibilityOptions:c,layoutOptions:d,getColumnLabel:g=Hf,getColumnDescription:u,showColumnVisibility:p=true,showGalleryControls:f=true,showLayoutControl:b=true,showGridColumns:h=true,showDetailColumns:y=true,allowEmptyVisibleColumns:v=false,className:w,classNames:x}){let k={...gc,...a},C=o||{},S=e.filter(M=>qo(M)),T=Gf({columns:S,visibleColumnKeys:C.visibleColumnKeys,allowEmptyVisibleColumns:v}),E=new Set(T),R=(t||S).filter(M=>qo(M)),F=s||_f(k),_=i||jf(k),z=m||$f(k),O=c||Kf(k),j=d||Uf(k),I=typeof n=="function",V=r(M=>{n?.({...C,...M},M);},"updateValue"),$=r(M=>{if(!I)return;let K=new Set(T);K.has(M)?K.delete(M):K.add(M);let J=S.map(qo).filter(G=>K.has(G));!J.length&&!v&&(J=[M]),V({visibleColumnKeys:J});},"toggleColumn"),N=p&&S.length>0,D=f;return jsxRuntime.jsxs("div",{className:l("space-y-3 text-foreground",x?.root,w),children:[N?jsxRuntime.jsxs("section",{className:l("space-y-2",x?.section),children:[jsxRuntime.jsx("div",{className:l("text-[10px] font-medium uppercase tracking-wide text-muted-foreground",x?.sectionHeader),children:k.visibleColumns}),jsxRuntime.jsx("div",{className:l("max-h-[220px] space-y-1 overflow-y-auto pr-1",x?.columnList),children:S.map(M=>{let K=qo(M);return jsxRuntime.jsx(dn,{checked:E.has(K),disabled:!I,label:g(M),description:u?.(M),onChange:()=>$(K),className:l("flex w-full rounded-lg px-2 py-1.5 hover:bg-muted/50",x?.columnItem)},`workbench-gallery-column-${K}`)})})]}):null,D?jsxRuntime.jsxs("section",{className:l("space-y-3 border-t border-border/60 pt-3",x?.section),children:[jsxRuntime.jsx(No,{label:k.coverField,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(uo,{value:String(C.galleryFieldKey||"auto"),options:[{value:"auto",label:k.autoDetect},...R.map(M=>({value:qo(M),label:g(M)}))],disabled:!I,onChange:M=>V({galleryFieldKey:M.currentTarget.value||"auto"}),className:x?.control})}),jsxRuntime.jsx(No,{label:k.cardDensity,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(pn,{value:Cr(F,C.galleryDensity,"comfortable"),options:F.map(M=>({value:wr(M.value),label:M.label,disabled:M.disabled})),onValueChange:M=>V({galleryDensity:M}),className:l("w-full",x?.control),classNames:Sr})}),h?jsxRuntime.jsx(No,{label:k.cardColumns,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(pn,{value:Cr(_,C.galleryGridColumns,"auto"),options:_.map(M=>({value:wr(M.value),label:M.label,disabled:M.disabled})),onValueChange:M=>V({galleryGridColumns:M==="auto"?"auto":pc(M)}),className:l("w-full",x?.control),classNames:Sr})}):null,y?jsxRuntime.jsx(No,{label:k.detailColumns,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(pn,{value:Cr(z,C.galleryBentoColumns,2),options:z.map(M=>({value:wr(M.value),label:M.label,disabled:M.disabled})),onValueChange:M=>V({galleryBentoColumns:pc(M)}),className:l("w-full",x?.control),classNames:Sr})}):null,jsxRuntime.jsx(No,{label:k.fieldVisibility,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(pn,{value:Cr(O,C.galleryDetailVisibility,"limit"),options:O.map(M=>({value:wr(M.value),label:M.label,disabled:M.disabled})),onValueChange:M=>V({galleryDetailVisibility:M}),className:l("w-full",x?.control),classNames:Sr})}),C.galleryDetailVisibility!=="all"?jsxRuntime.jsx(No,{label:k.fieldLimit,description:k.fieldLimitHint,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground",description:"text-[10px]"},children:jsxRuntime.jsx(Qt,{type:"number",min:1,step:1,value:String(C.galleryDetailLimit||4),disabled:!I,onChange:M=>V({galleryDetailLimit:M.currentTarget.value}),className:x?.control})}):null,b?jsxRuntime.jsx(No,{label:k.layout,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(pn,{value:Cr(j,C.galleryLayout,"fixed"),options:j.map(M=>({value:wr(M.value),label:M.label,disabled:M.disabled})),onValueChange:M=>V({galleryLayout:M}),className:l("w-full",x?.control),classNames:Sr})}):null]}):null]})}r(bc,"WorkbenchGallerySettingsPanel");function _a({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,...w}){let x={...gc,...h},k=st.useRef(null),[C,S]=st.useState(t),[T,E]=st.useState({}),R=e!==void 0,F=R?!!e:C,_=r(j=>{R||S(j),o?.(j);},"setOpen");st.useLayoutEffect(()=>{if(!F)return;let j=r(()=>{let $=k.current?.getBoundingClientRect();if(!$||typeof window>"u")return;let N=12,D=Math.max(window.innerWidth-N*2,0),M=Math.min(m,D||m),K=i==="start"?$.left:$.right-M,J=Math.min(Math.max(K,N),Math.max(window.innerWidth-M-N,N)),G=Math.min($.bottom+8,Math.max(window.innerHeight-80,N));E({left:J,top:G,width:M,maxHeight:`calc(100vh - ${Math.round(G+N)}px)`});},"updatePopoverPosition"),I=r($=>{k.current?.contains($.target)||_(false);},"handlePointerDown"),V=r($=>{$.key==="Escape"&&_(false);},"handleKeyDown");return j(),window.addEventListener("resize",j),window.addEventListener("scroll",j,true),window.addEventListener("pointerdown",I),window.addEventListener("keydown",V),()=>{window.removeEventListener("resize",j),window.removeEventListener("scroll",j,true),window.removeEventListener("pointerdown",I),window.removeEventListener("keydown",V);}},[i,F,m]);let z=a??x.settingsButton,O=c??x.title;return jsxRuntime.jsxs("div",{ref:k,className:l("relative inline-flex",b?.root,y),children:[jsxRuntime.jsx(ve,{icon:n,label:z,title:s||(typeof z=="string"?z:void 0),iconOnly:!!n,active:F,tone:"muted","aria-haspopup":"dialog","aria-expanded":F,className:l(b?.trigger,p),onClick:()=>_(!F)}),F?jsxRuntime.jsxs("div",{role:"dialog","aria-label":typeof O=="string"?O: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:[O?jsxRuntime.jsx("div",{className:l("mb-3 text-[11px] font-medium text-foreground",b?.header),children:O}):null,d,jsxRuntime.jsx(bc,{...w,labels:x,className:l(b?.panel,u),classNames:v}),g]}):null]})}r(_a,"WorkbenchGallerySettingsButton");function xc(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[jsxRuntime.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),jsxRuntime.jsx("path",{d:"M3 10h18M9 4v16"})]})}r(xc,"TableViewIcon");function vc(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[jsxRuntime.jsx("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1.5"})]})}r(vc,"GalleryViewIcon");function fc(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[jsxRuntime.jsx("path",{d:"M20 7h-9M7 7H4M14 17H4M20 17h-3"}),jsxRuntime.jsx("circle",{cx:"9",cy:"7",r:"2"}),jsxRuntime.jsx("circle",{cx:"16",cy:"17",r:"2"})]})}r(fc,"SettingsIcon");function Zf({open:e}){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:l("h-3 w-3 opacity-55 transition-transform",e&&"rotate-180"),fill:"none",stroke:"currentColor",strokeWidth:"2",children:jsxRuntime.jsx("path",{d:"m6 9 6 6 6-6"})})}r(Zf,"ChevronDownIcon");var Qf=[{value:"list",label:"Table view",icon:jsxRuntime.jsx(xc,{})},{value:"gallery",label:"Gallery view",icon:jsxRuntime.jsx(vc,{})}];function yc(e){return e.icon!==void 0?e.icon:e.value==="list"||e.value==="table"?jsxRuntime.jsx(xc,{}):e.value==="gallery"?jsxRuntime.jsx(vc,{}):null}r(yc,"getViewModeOptionIcon");function hc(e){return e.triggerLabel??e.labels?.settingsButton??"Settings"}r(hc,"getSettingsTriggerLabel");function ey({value:e,options:t,onValueChange:o,classNames:n}){let a=st.useRef(null),[s,i]=st.useState(false),m=t.find(d=>d.value===e)||t.find(d=>!d.disabled)||t[0],c=m?yc(m):null;return st.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?jsxRuntime.jsxs("div",{ref:a,className:l("relative inline-flex",n?.viewModeRoot),children:[jsxRuntime.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?jsxRuntime.jsx("span",{className:"inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center text-muted-foreground",children:c}):null,jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:m.label}),jsxRuntime.jsx(Zf,{open:s})]}),s?jsxRuntime.jsx("div",{role:"listbox",className:l("absolute left-0 top-full z-50 mt-2 min-w-[160px] overflow-hidden rounded-xl border border-border/60 bg-card/95 p-1.5 text-xs text-foreground shadow-lg backdrop-blur-xl",n?.viewModeMenu),children:t.map(d=>{let g=d.value===m.value,u=yc(d);return jsxRuntime.jsxs("button",{type:"button",role:"option","aria-selected":g,disabled:d.disabled,className:l("flex min-h-8 w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left text-xs font-medium text-muted-foreground transition-colors hover:bg-muted/55 hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",g&&"bg-muted/60 text-foreground",n?.viewModeItem),onClick:()=>{d.disabled||(o?.(d.value,d),i(false));},children:[u?jsxRuntime.jsx("span",{className:"inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:u}):null,jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:d.label})]},d.value)})}):null]}):null}r(ey,"WorkbenchContentToolbarViewModeControl");var Es=st.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?Qf:[]),y=m&&typeof m=="object"?m:null,v=!!h.length,w=!!y,x=w&&c!=="end",k=w&&c==="end",C=v||x||!!o,S=!!n||k;return jsxRuntime.jsxs(t,{ref:b,"data-workbench-content-toolbar":true,className:l("flex min-h-[46px] shrink-0 flex-col gap-2 border-b border-border/60 px-4 py-2 md:flex-row md:items-center md:justify-between",p?.root,d),...f,children:[C?jsxRuntime.jsxs("div",{className:l("flex flex-wrap items-center gap-2",p?.start,g),children:[v?jsxRuntime.jsx(ey,{value:a,options:h,onValueChange:i,classNames:p}):null,x&&y?jsxRuntime.jsx(_a,{align:"end",triggerIcon:jsxRuntime.jsx(fc,{}),triggerLabel:hc(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?jsxRuntime.jsxs("div",{className:l("flex shrink-0 items-center gap-2",p?.end,u),children:[n,k&&y?jsxRuntime.jsx(_a,{align:"end",triggerIcon:jsxRuntime.jsx(fc,{}),triggerLabel:hc(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 ny(e){return !!(e.header||e.footer||e.bodyAs||e.bodyClassName||e.bodyProps||e.classNames?.body)}r(ny,"shouldRenderBodyWrapper");function Sc(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(Sc);let t=st.Children.toArray(e);return t.length?t.some(o=>typeof o=="string"?o.trim().length>0:true):false}r(Sc,"hasRenderableChildren");function ry(e,t){return t===void 0?{}:e===void 0?{width:t}:{width:e?t:0,opacity:e?1:0}}r(ry,"resolveWidthStyle");function kc(e){return e.label??e.key}r(kc,"getFallbackFieldLabel");function ay(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(ay,"getObjectDisplayValue");function wc(e){return e==null||e===""}r(wc,"isEmptyDetailValue");function Cc(e){return ["string","number","boolean"].includes(typeof e)}r(Cc,"isPlainDisplayValue");function Tc(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"||st.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(Tc,"getMediaDisplayData");function iy(e,t){let o=String(e?.renderType||"").toLowerCase();return ["image","media","preview","thumbnail"].includes(o)||!!Tc(t)}r(iy,"shouldRenderAsMedia");function sy(e,t){return e?typeof e=="string"||typeof e=="number"?jsxRuntime.jsx("span",{className:l("inline-flex h-3.5 min-w-3.5 shrink-0 items-center justify-center rounded-sm text-[10px] font-semibold text-primary",t),children:e}):typeof e=="boolean"?null:st.isValidElement(e)?e:jsxRuntime.jsx(e,{className:l("h-3.5 w-3.5 shrink-0 text-primary",t)}):jsxRuntime.jsxs("span",{className:l("relative inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center",t),children:[jsxRuntime.jsx("span",{className:"absolute inset-0 rounded-full border border-primary/25 bg-primary/10"}),jsxRuntime.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-primary"})]})}r(sy,"renderMaybeFieldIcon");function ly(e,t,o){return jsxRuntime.jsxs("span",{className:l("inline-flex min-w-0 items-center gap-1.5 text-[11px] font-semibold text-foreground",o?.fieldLabel),children:[sy(t.labelIcon||t.icon,o?.fieldLabelIcon),jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:e})]})}r(ly,"renderDetailFieldLabel");function dy({media:e,classNames:t}){return jsxRuntime.jsxs("div",{className:l("grid gap-2",t?.mediaValue),children:[jsxRuntime.jsx("div",{className:"overflow-hidden rounded-md border border-border/55 bg-muted/20 dark:border-border/45 dark:bg-muted/10",children:jsxRuntime.jsx("img",{src:e.src,alt:String(e.alt||""),className:l("block aspect-[16/9] w-full object-cover",t?.mediaImage)})}),e.caption?jsxRuntime.jsx("div",{className:l("truncate text-[11px] leading-4 text-muted-foreground",t?.mediaCaption),children:e.caption}):null]})}r(dy,"WorkbenchDetailSidebarMediaValue");function Ds(e,t,o,n){if(wc(e))return t;if(st.isValidElement(e))return e;if(iy(o,e)){let a=Tc(e);if(a)return jsxRuntime.jsx(dy,{media:a,classNames:n})}if(Array.isArray(e)){let a=e.map(s=>Ds(s,"",void 0,n)).filter(s=>!wc(s));return a.length?a.every(Cc)?a.map(String).join(" \xB7 "):jsxRuntime.jsx("span",{className:"inline-flex flex-wrap items-center gap-1",children:a.map((s,i)=>jsxRuntime.jsxs("span",{className:"inline-flex items-center gap-1",children:[i>0?jsxRuntime.jsx("span",{className:"text-muted-foreground",children:"\xB7"}):null,Cc(s)?String(s):s]},i))}):t}if(typeof e=="object"){let a=ay(e);return a===void 0?t:Ds(a,t,o,n)}return String(e)}r(Ds,"getDefaultDetailDisplayValue");function cy(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(cy,"getDefaultFieldValue");function uy(e,t){return typeof e.hidden=="function"?e.hidden(e,t):!!e.hidden}r(uy,"shouldHideField");function my(e,t){return typeof e.hidden=="function"?e.hidden(e,t):!!e.hidden}r(my,"shouldHideSection");function py({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=>!my(f,e));return p.length?jsxRuntime.jsx("div",{className:l("space-y-3",g?.autoBody),children:p.map((f,b)=>{let h=(f.fields||[]).filter(w=>!uy(w,e)),y=f.id||`section-${b}`;if(!h.length&&!f.emptyState)return null;let v=h.map((w,x)=>{let k={field:w,fieldIndex:x,section:f,sectionIndex:b,record:e},C=i?i(w,e,k):cy(w,e),S=m?m(w,e,k):c?c(C,k):Ds(C,w.emptyValue??a,w,g),T=d?d(kc(w),k):kc(w);return {term:ly(T,w,g),value:S}});return jsxRuntime.jsxs("section",{className:l("min-w-0 space-y-3",g?.section),children:[f.title||f.description?jsxRuntime.jsxs("div",{className:l("min-w-0 space-y-1.5",g?.sectionHeader),children:[f.title?jsxRuntime.jsx("div",{className:l("inline-flex max-w-full items-center gap-2 rounded-md border border-primary/20 bg-primary/5 px-2.5 py-1.5 text-xs font-medium text-primary dark:border-primary/25 dark:bg-primary/10",g?.sectionTitle),children:f.title}):null,f.description?jsxRuntime.jsx("div",{className:l("text-[11px] leading-5 text-muted-foreground",g?.sectionDescription),children:f.description}):null]}):null,v.length?jsxRuntime.jsx(rs,{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)}}):jsxRuntime.jsx("div",{className:l("py-3 text-center text-xs text-muted-foreground",g?.emptyState),children:f.emptyState})]},y)})}):s?jsxRuntime.jsx("div",{className:l("rounded-lg border border-dashed border-border/60 px-3 py-6 text-center text-xs text-muted-foreground",g?.emptyState),children:s}):null}r(py,"WorkbenchDetailSidebarAutoContent");var gy=st.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:w,className:x,headerClassName:k,bodyClassName:C,footerClassName:S,resizeHandleClassName:T,bodyProps:E,classNames:R,style:F,..._},z){let O=Sc(c)?c:jsxRuntime.jsx(py,{record:d,fields:g,sections:u,fieldColumns:p,emptyValue:f,emptyState:b,getFieldValue:h,renderFieldValue:y,formatFieldValue:v,formatFieldLabel:w,classNames:R}),j=ny({header:s,footer:i,bodyAs:o==="div"?void 0:o,bodyClassName:C,bodyProps:E,classNames:R}),{className:I,...V}=E??{};return jsxRuntime.jsxs(t,{ref:z,"data-workbench-detail-sidebar":true,"data-open":n===void 0?void 0:n?"true":"false",className:l("workbench-surface-subtle relative flex flex-shrink-0 flex-col self-stretch overflow-hidden rounded-lg border border-border/50 transition-all duration-300 dark:border-border/40",n===false&&"pointer-events-none",R?.root,x),style:{...ry(n,a),...F},..._,children:[m?jsxRuntime.jsx("div",{className:l(R?.resizeHandle,T),children:m}):null,s?jsxRuntime.jsx("div",{className:l("shrink-0 border-b border-border/40 px-4 py-3 dark:border-border/30",R?.header,k),children:s}):null,j?jsxRuntime.jsx(o,{className:l("min-h-0 flex-1 overflow-y-auto",R?.body,C,I),...V,children:O}):O,i?jsxRuntime.jsx("div",{className:l("shrink-0 border-t border-border/40 px-4 py-3 dark:border-border/30",R?.footer,S),children:i}):null]})},"WorkbenchDetailSidebar"));function Nc(e){return typeof e=="function"?true:typeof e=="object"&&e!==null&&!st.isValidElement(e)&&"$$typeof"in e}r(Nc,"isWorkbenchIconComponent");function Rr(e,t){return e?st.isValidElement(e)?e:Nc(e)?jsxRuntime.jsx(e,{className:t}):e:null}r(Rr,"renderWorkbenchIcon");function Ic(e){return !e||!Nc(e)?null:e}r(Ic,"getWorkbenchIconComponent");function yy(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r(yy,"toCssSize");var hy=160,xy=56,vy=128;function Mc(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(Mc,"numericCssSize");function Ec(e,t){return e.renderType==="icon"?xy:t?vy:hy}r(Ec,"defaultWorkbenchColumnWidth");function Bc(e,t,o){return t??Mc(e.width)??Mc(e.minWidth)??Ec(e,o)}r(Bc,"resolvedWorkbenchColumnWidth");function ky(e){return e==null||e===false?null:e}r(ky,"defaultFormatLabel");function Pc(e){if(typeof e=="string"||typeof e=="number")return String(e)}r(Pc,"toTitle");function wy(e,t){return e?.id??e?.key??e?.linkKey??t}r(wy,"defaultGetRowKey");function Cy(e){return e?.linkKey??e?.id??e?.key}r(Cy,"defaultGetRowSelectionKey");function Sy(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(Sy,"getOrderedColumns");function zs(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(zs,"normalizeColumnOrder");function Ty({helperText:e,className:t}){return A(e)?jsxRuntime.jsxs("span",{className:l("group relative inline-flex items-center",t),children:[jsxRuntime.jsx("button",{type:"button",title:Pc(e),"aria-label":Pc(e)||"Field help",className:"inline-flex h-4 w-4 items-center justify-center rounded-md border border-border/60 bg-background text-xs font-semibold normal-case tracking-normal text-muted-foreground shadow-sm transition-colors hover:border-primary/40 hover:text-primary focus-visible:border-primary/40 focus-visible:text-primary focus-visible:outline-hidden",onClick:o=>o.stopPropagation(),children:"?"}),jsxRuntime.jsx("span",{role:"tooltip",className:"pointer-events-none absolute left-1/2 top-full z-40 mt-2 hidden w-72 -translate-x-1/2 whitespace-pre-line rounded-lg border border-border/60 bg-card px-3 py-2 text-xs font-normal normal-case leading-5 tracking-normal text-foreground shadow-sm backdrop-blur-sm group-hover:block group-focus-within:block",children:e})]}):null}r(Ty,"WorkbenchTableHeaderHelper");function Ry({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:w,columnResizeEnabled:x,className:k,tableClassName:C,rowClassName:S,classNames:T,style:E,renderCell:R,renderFieldValue:F,renderColumnHeader:_,onColumnOrderChange:z,onColumnSizeChange:O,onSort:j,formatLabel:I=ky,getColumnDataType:V,getColumnIcon:$,getColumnTypeIcon:N,getRowKey:D=wy,getRowSelectionKey:M=Cy,isActionColumn:K,isActionField:J,isRowDisabled:G,isWorkbenchPlaceholderRow:te,emptyState:U="-",hiddenRowsMessage:Z,scrollFooter:ae,scrollRestoration:ie}){let de=t.map(re=>re.key).join(""),W=st.useMemo(()=>de?de.split(""):[],[de]),[pe,B]=st.useState(W),[H,ne]=st.useState({}),fe=st.useRef(null),ye=st.useRef(new Map),xe=st.useRef(ie);xe.current=ie;let oe=st.useRef(void 0),le=st.useCallback(()=>{let re=fe.current,Ce=xe.current;if(!re||!Ce||oe.current!==Ce.key)return;let Fe=re.getBoundingClientRect().top,qe=Array.from(ye.current.entries()).find(([,nt])=>nt.getBoundingClientRect().bottom>Fe);Ce.write({x:re.scrollLeft,y:re.scrollTop,...qe?{rowKey:qe[0],rowOffset:qe[1].getBoundingClientRect().top-Fe}:{}});},[]);st.useEffect(()=>{let re=fe.current,Ce=xe.current;if(!re||!Ce||oe.current===Ce.key||e.length===0)return;let Fe=Ce.read(),qe=r(()=>{let Bt=Fe?.rowKey?ye.current.get(Fe.rowKey):void 0,_e=Bt&&typeof Fe?.rowOffset=="number"?re.scrollTop+Bt.getBoundingClientRect().top-re.getBoundingClientRect().top-Fe.rowOffset:Fe?.y??0;re.scrollTo({left:Fe?.x??0,top:Math.max(0,_e),behavior:"auto"}),oe.current=Ce.key;},"restore"),nt=re.ownerDocument.defaultView;if(!nt){qe();return}let gt=nt.requestAnimationFrame(qe);return ()=>nt.cancelAnimationFrame(gt)},[e,ie?.key]),st.useEffect(()=>{let re=fe.current?.ownerDocument.defaultView;return re?.addEventListener("pagehide",le),()=>{re?.removeEventListener("pagehide",le),le();}},[le]);let[Re,Ie]=st.useState();st.useEffect(()=>{B(re=>zs(W,re));},[W]);let We=y?zs(W,y):pe,ue=v??H,q=st.useCallback((re,Ce)=>{let Fe=zs(W,re);y||B(Fe),z?.(Fe,Ce);},[y,W,z]),L=st.useCallback((re,Ce,Fe)=>{v||ne(qe=>({...qe,[re]:Ce})),O?.(re,Ce,Fe);},[v,O]),X=n??a,se=s??i,Y=Sy(t,We),ce=h?Y.reduce((re,Ce)=>Ce.key===h?re:re+Bc(Ce,ue[Ce.key],K?.(Ce)??J?.(Ce)??false),0):void 0,ke=h&&ce!==void 0&&Re!==void 0?Math.max(0,Math.round(Re-ce)):void 0,we=Y.flatMap(re=>re.key!==h?[re]:ke===0?[]:ke===void 0?[re]:[{...re,width:ke,minWidth:ke,maxWidth:ke}]),Me=Math.max(0,Number(c||e.length)-Number(m||e.length)),Pe=R??F??((re,Ce)=>Ce?.[re.key]),Ve=K??J??(()=>false),Xe=G??te??(()=>false),Oe=$??N,pt=ce!==void 0&&ke!==void 0?ce+ke:void 0,Ae=pt??d??g??Math.max(760,we.reduce((re,Ce)=>re+Bc(Ce,ue[Ce.key],Ve(Ce)),0));st.useEffect(()=>{if(!h){Ie(void 0);return}let re=fe.current;if(!re)return;let Ce=re.ownerDocument.defaultView,Fe=r(()=>{let gt=Math.round(re.getBoundingClientRect().width);!Number.isFinite(gt)||gt<=0||Ie(Bt=>Bt===gt?Bt:gt);},"updateWidth");Fe();let qe=Ce?.ResizeObserver,nt=qe?new qe(Fe):void 0;return nt?.observe(re),Ce?.addEventListener("resize",Fe),()=>{nt?.disconnect(),Ce?.removeEventListener("resize",Fe);}},[h]);let Le=Me>0&&Z?typeof Z=="function"?Z(Me,m||e.length,c||e.length):Z:null;return jsxRuntime.jsxs(Na,{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,k),style:u==="100%"?{display:"flex",minHeight:0,flex:1,flexDirection:"column",...E}:E,children:[jsxRuntime.jsxs("div",{ref:fe,onScroll:le,className:l("w-full overflow-auto",T?.scrollArea),style:{maxHeight:yy(u),...u==="100%"?{minHeight:0,flex:1}:{}},children:[jsxRuntime.jsxs(Ia,{appearance:f,columnOrder:We,columnSizes:ue,columnDragEnabled:w,columnResizeEnabled:x,onColumnOrderChange:q,onColumnSizeChange:L,className:l("w-full table-auto text-left text-xs",T?.table,C),style:{width:pt,minWidth:Ae},children:[jsxRuntime.jsx(Ma,{appearance:f,className:l("z-20 text-xs font-sans text-muted-foreground",T?.header),children:jsxRuntime.jsx(gn,{className:l("hover:bg-transparent",T?.headerRow),children:we.map((re,Ce)=>{let Fe=Ec(re,Ve(re)),qe=re.renderType||re.type||V?.(re.key,e,re),nt=Rr(Oe?.(qe,re),"h-3.5 w-3.5 shrink-0 text-primary"),Bt=we[Ce-1]?.renderType==="icon"&&re.key===se?.key,_e=_?_(re,{column:re,columnIndex:Ce,columns:we,rows:e,columnType:qe}):I(re.label,{column:re}),zt=!_&&(A(re.trailing)||A(re.helperText))?jsxRuntime.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[A(re.trailing)?I(re.trailing,{column:re}):null,jsxRuntime.jsx(Ty,{helperText:I(re.helperText,{column:re}),className:T?.helper})]}):void 0,Ot=!!re.sortable,ge=Ot&&j?()=>j(re.key,re):void 0;return jsxRuntime.jsx(Pa,{appearance:f,presentation:b,columnId:re.key,align:re.align,icon:_?void 0:nt,label:_e,description:_?void 0:I(re.description,{column:re}),meta:_?void 0:I(re.meta,{column:re}),actions:re.actions,trailing:zt,sortable:Ot,sortDirection:re.sortDirection,sortLabel:re.sortLabel,onSort:ge,draggable:re.draggable,dragLabel:re.dragLabel,resizable:re.resizable,resizeLabel:re.resizeLabel,width:re.width??Fe,minWidth:typeof re.minWidth=="number"?re.minWidth:void 0,maxWidth:typeof re.maxWidth=="number"?re.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&&Ce===0&&"md:left-0 md:z-30 md:shadow-[1px_0_0_0_hsl(var(--border)/0.35)]",re.compactHeaderClassName,re.renderType==="icon"&&"pl-3 pr-1",Bt&&"pl-2",T?.headerCell,re.headerClassName),style:{minWidth:typeof re.minWidth=="string"?re.minWidth:void 0,maxWidth:typeof re.maxWidth=="string"?re.maxWidth:void 0,...re.headerStyle}},re.key)})})}),jsxRuntime.jsx(Ba,{appearance:f,className:l("divide-y divide-border/35 dark:divide-border/30",T?.body),children:e.length?e.map((re,Ce)=>{let Fe=D(re,Ce),qe=Xe(re,Ce),nt=M(re,Ce),gt=!!(X&&String(nt)===String(X)),Bt=typeof S=="function"?S(re,Ce):S;return jsxRuntime.jsx(gn,{appearance:f,ref:_e=>{_e?ye.current.set(String(Fe),_e):ye.current.delete(String(Fe));},interactive:!!o&&!qe,"data-item-key":String(Fe),tabIndex:o&&!qe?0:void 0,selected:gt,disabled:qe,onClick:_e=>{qe||(o&&_e.currentTarget.focus({preventScroll:true}),o?.(re,Ce));},onKeyDown:_e=>{_e.target!==_e.currentTarget||qe||!o||!["Enter"," "].includes(_e.key)||(_e.preventDefault(),o(re,Ce));},className:l(o&&!qe?"cursor-pointer":"cursor-default",gt?"bg-primary/10 hover:bg-primary/15":qe?"":"hover:bg-muted/25 dark:hover:bg-muted/15",T?.row,Bt),children:we.map((_e,zt)=>{let Ot=Ve(_e)||_e.wrap===true,He=we[zt-1]?.renderType==="icon"&&_e.key===se?.key;return jsxRuntime.jsx(gr,{appearance:f,align:_e.align,className:l(Ot?"align-top whitespace-normal":"whitespace-nowrap","px-4 py-3 text-muted-foreground",!Ot&&"overflow-hidden text-ellipsis",p&&zt===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)]",_e.compactCellClassName,_e.renderType==="icon"&&"pl-3 pr-1",He&&"pl-2",T?.cell,_e.cellClassName),style:_e.cellStyle,children:Pe(_e,re,{row:re,rowIndex:Ce,column:_e,columnIndex:zt,compact:true,surface:"list"})},`${Fe}-${_e.key}`)})},Fe)}):jsxRuntime.jsx(Ea,{appearance:f,colSpan:Math.max(we.length,1),classNames:{cell:"px-4 py-10 text-center text-sm text-muted-foreground"},children:U})})]}),A(ae)?jsxRuntime.jsx("div",{style:{minWidth:Ae},children:ae}):null]}),Le?jsxRuntime.jsx("div",{className:l("border-t border-border/40 px-4 py-2 text-xs text-muted-foreground dark:border-border/30",T?.footer),children:Le}):null]})}r(Ry,"WorkbenchTableView");function Os(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r(Os,"toCssSize");function Dn(){return typeof window<"u"}r(Dn,"isBrowser");function Wc(e,t){return e?.id??e?.key??t}r(Wc,"defaultGetRowKey");function Ua(e){return typeof e.width=="number"?e.width:typeof e.minWidth=="number"?e.minWidth:160}r(Ua,"getColumnDefaultSize");function Ny(e,t){return e.reduce((o,n)=>(o[n.key]=t?.[n.key]??Ua(n),o),{})}r(Ny,"buildDefaultColumnSizes");function Lc(e,t){if(!e||!Dn())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(Lc,"loadStoredColumnSizes");function Ac(e,t){!e||!Dn()||window.localStorage.setItem(e,JSON.stringify(t));}r(Ac,"persistColumnSizes");function Gc(e){return e?`${e}.frozenColumnCount`:void 0}r(Gc,"getFrozenColumnStorageKey");function _c(e){return e?`${e}.frozenEndColumnCount`:void 0}r(_c,"getFrozenEndColumnStorageKey");function Yo(e,t){return Number.isFinite(e)?Math.max(0,Math.min(Math.round(e),t)):0}r(Yo,"clampFrozenColumnCount");function Iy(e,t,o){let n=Yo(e,o),a=Yo(t,Math.max(0,o-n));return {startCount:n,endCount:a}}r(Iy,"normalizeFrozenColumnCounts");function zc(e,t,o){let n=Yo(t,o),a=Gc(e);if(!a||!Dn())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(zc,"loadStoredFrozenColumnCount");function My(e,t){let o=Gc(e);!o||!Dn()||window.localStorage.setItem(o,String(t));}r(My,"persistFrozenColumnCount");function Oc(e,t,o){let n=Yo(t,o),a=_c(e);if(!a||!Dn())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(Oc,"loadStoredFrozenEndColumnCount");function By(e,t){let o=_c(e);!o||!Dn()||window.localStorage.setItem(o,String(t));}r(By,"persistFrozenEndColumnCount");function Ka(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(Ka,"normalizeColumnOrder");function Py(e,t){let o=Ka(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(Py,"getOrderedColumns");function Br(e,t){let o=t[e.key];return typeof o=="number"?o:Ua(e)}r(Br,"getColumnNumericWidth");function Ey(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+=Br(s,t);}),n}r(Ey,"buildFrozenOffsets");function Dy(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+=Br(s,t);}),n}r(Dy,"buildFrozenEndOffsets");function Fc(e,t,o){return typeof e=="function"?e(t,o):e}r(Fc,"resolveRowClassName");function Hc(e,t){let o=t?.[e.key];return o==null||o===""?"\u2014":String(o)}r(Hc,"renderDefaultCell");function Vc({children:e,wrap:t}){return jsxRuntime.jsx("div",{className:l("min-w-0 max-w-full overflow-auto overscroll-contain [scrollbar-width:thin]",t?"max-h-20 whitespace-pre-wrap break-words leading-5":"whitespace-nowrap"),children:e})}r(Vc,"InteractiveTableCellContent");function Wy({className:e}){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:e,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.75",children:[jsxRuntime.jsx("path",{d:"M5.25 2.75h5.5"}),jsxRuntime.jsx("path",{d:"M6.25 2.75v4L4.5 9.25h7L9.75 6.75v-4"}),jsxRuntime.jsx("path",{d:"M8 9.25v4"})]})}r(Wy,"PinIcon");function Ly({rows:e=[],columns:t=[],pinnedTopRows:o=[],getRowKey:n=Wc,getPinnedTopRowKey:a=Wc,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:w=false,columnResizeEnabled:x=true,frozenColumnCount:k=0,frozenEndColumnCount:C=0,tableMinWidth:S,bodyMaxHeight:T="min(60vh, 42rem)",appearance:E,className:R,tableClassName:F,classNames:_,style:z,onColumnOrderChange:O,onColumnSizeChange:j,onResetColumnSizes:I,onFrozenColumnCountChange:V,onFrozenEndColumnCountChange:$,onSort:N}){let D=xt().workbench.interactiveTable,M=t.map(Y=>Y.key).join(""),K=st.useMemo(()=>M?M.split(""):[],[M]),J=st.useMemo(()=>Ny(t,v),[t,v]),[G,te]=st.useState(K),[U,Z]=st.useState(()=>Lc(b,J)),[ae,ie]=st.useState(()=>zc(b,k,t.length)),[de,W]=st.useState(()=>Oc(b,C,t.length));st.useEffect(()=>{te(Y=>Ka(K,Y));},[K]),st.useEffect(()=>{y||Z(Lc(b,J));},[y,b,J]),st.useEffect(()=>{ie(zc(b,k,t.length));},[b,t.length,k]),st.useEffect(()=>{W(Oc(b,C,t.length));},[b,t.length,C]);let pe=h?Ka(K,h):G,B=y??U,H=Py(t,pe),{startCount:ne,endCount:fe}=Iy(ae,de,H.length),ye=Ey(H,B,ne),xe=Dy(H,B,fe),oe=S??Math.max(760,H.reduce((Y,ce)=>Y+Br(ce,B),0)),le={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=st.useCallback((Y,ce)=>{let ke=Ka(K,Y);h||te(ke),O?.(ke,ce);},[h,K,O]),Ie=st.useCallback((Y,ce,ke)=>{let we=t.find(Oe=>Oe.key===Y),Me=we?.minWidth,Pe=we?.maxWidth,Ve=Math.max(typeof Me=="number"?Me:0,Math.min(ce,typeof Pe=="number"?Pe:Number.POSITIVE_INFINITY)),Xe={...B,[Y]:Ve};y||Z(Xe),Ac(b,Xe),j?.(Y,Ve,ke);},[y,b,t,j,B]),We=st.useCallback(Y=>{let ce=J[Y.key]??Ua(Y),ke=Br(Y,B),we={...B,[Y.key]:ce};y||Z(we),Ac(b,we),j?.(Y.key,ce,{columnId:Y.key,previousWidth:ke,minWidth:Y.minWidth,maxWidth:Y.maxWidth}),I?.(we);},[y,b,J,j,I,B]),ue=st.useCallback(Y=>{let ce=Yo(Y,Math.max(0,H.length-fe));ie(ce),My(b,ce),V?.(ce);},[b,V,H.length,fe]),q=st.useCallback(Y=>{let ce=Yo(Y,Math.max(0,H.length-ne));W(ce),By(b,ce),$?.(ce);},[b,$,H.length,ne]),L=r(Y=>{if(Y<ne)return "start";if(Y>=H.length-fe)return "end"},"getFrozenPosition"),X=r((Y,ce,ke=false)=>{let we=L(ce);if(we)return l("sticky",we==="start"?"shadow-[1px_0_0_0_hsl(var(--border)/0.45)]":"shadow-[-1px_0_0_0_hsl(var(--border)/0.45)]",ke?"bg-muted/60":"bg-inherit",ke?"z-40":"z-20",(ce===0||ce===H.length-1)&&(ke?"z-50":"z-30"))},"getFrozenClassName"),se=r((Y,ce)=>{let ke=L(ce);if(ke==="start")return {left:ye.get(Y.key)??0};if(ke==="end")return {right:xe.get(Y.key)??0}},"getFrozenStyle");return jsxRuntime.jsx(Na,{appearance:E,className:l("flex h-full min-h-0 flex-col overflow-hidden rounded-lg border border-border/60 bg-card",_?.root,R),style:z,children:jsxRuntime.jsx("div",{className:l("min-h-0 flex-1 overflow-auto",_?.scrollArea),style:{maxHeight:Os(T)},children:jsxRuntime.jsxs(Ia,{appearance:E,columnOrder:pe,columnSizes:B,columnDragEnabled:w,columnResizeEnabled:x,onColumnOrderChange:Re,onColumnSizeChange:Ie,className:l("w-full table-fixed text-left text-xs",_?.table,F),style:{minWidth:oe},children:[jsxRuntime.jsx("colgroup",{children:H.map(Y=>jsxRuntime.jsx("col",{style:{width:Os(B[Y.key]??Y.width),minWidth:Os(Y.minWidth)}},Y.key))}),jsxRuntime.jsx(Ma,{appearance:E,className:l("border-b border-border/60 bg-muted/60 text-[11px] font-medium text-muted-foreground",_?.tableHeader),children:jsxRuntime.jsx(gn,{appearance:E,className:l("hover:bg-transparent",_?.headerRow),children:H.map((Y,ce)=>{let ke=m?m(Y,{column:Y,columnIndex:ce,columns:H,rows:e}):Y.label,we=!!Y.sortable,Me=we&&N?()=>N(Y.key,Y):void 0,Pe=ce<ne,Ve=ce>=H.length-fe,Xe=Pe||Ve,Oe=Br(Y,B)===(J[Y.key]??Ua(Y));return jsxRuntime.jsxs(Dd,{modal:false,children:[jsxRuntime.jsx(ts,{asChild:true,appearance:E,children:jsxRuntime.jsx(Pa,{appearance:E,columnId:Y.key,align:Y.align,label:ke,description:Y.description,trailing:Xe?jsxRuntime.jsx("span",{title:le.frozenColumnTitle,className:"inline-flex h-5 w-5 items-center justify-center rounded text-primary",children:jsxRuntime.jsx(Wy,{className:"h-3.5 w-3.5"})}):null,sortable:we,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,ce,true),Y.headerClassName,Y.className,_?.headerCell),style:se(Y,ce)})}),jsxRuntime.jsxs(os,{appearance:E,alignOffset:-4,className:"min-w-44",children:[jsxRuntime.jsx(Wd,{appearance:E,children:le.columnActions}),Xe?jsxRuntime.jsx(Rn,{appearance:E,onSelect:()=>{Ve?q(H.length-ce-1):ue(ce);},children:Ve?le.unfreezeEndColumn:le.unfreezeColumn}):jsxRuntime.jsx(Rn,{appearance:E,onSelect:()=>ue(ce+1),children:le.freezeColumn}),Xe?null:jsxRuntime.jsx(Rn,{appearance:E,onSelect:()=>q(H.length-ce),children:le.freezeEndColumn}),jsxRuntime.jsx(Rn,{appearance:E,disabled:ne===0&&fe===0,onSelect:()=>{ue(0),q(0);},children:le.unfreezeAllColumns}),jsxRuntime.jsx(Ld,{appearance:E}),jsxRuntime.jsx(Rn,{appearance:E,disabled:Oe,onSelect:()=>We(Y),children:le.resetColumnWidth})]})]},Y.key)})})}),jsxRuntime.jsxs(Ba,{appearance:E,className:l("divide-y divide-border/50",_?.body),children:[o.map((Y,ce)=>{let ke=a(Y,ce),we=Fc(u,Y,ce);return jsxRuntime.jsx(gn,{appearance:E,className:l("bg-card/95",_?.pinnedTopRow,we),children:H.map((Me,Pe)=>jsxRuntime.jsx(gr,{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,Pe),Me.cellClassName,_?.cell),style:se(Me,Pe),children:jsxRuntime.jsx(Vc,{wrap:Me.wrap,children:i?i(Me,Y,{row:Y,rowIndex:ce,column:Me,columnIndex:Pe,isPinnedTopRow:true}):Hc(Me,Y)})},`pinned-${ke}-${Me.key}`))},`pinned-${ke}`)}),e.length?e.map((Y,ce)=>{let ke=n(Y,ce),we=d?.(Y,ce)||{},Me=Fc(g,Y,ce);return jsxRuntime.jsx(gn,{appearance:E,interactive:!!c&&!we.disabled,selected:we.selected,disabled:we.disabled,onClick:()=>{we.disabled||c?.(Y,ce);},className:l("min-h-[52px] bg-card transition-colors",we.saving&&"bg-primary/5",we.pending&&"opacity-80",c&&!we.disabled?"cursor-pointer hover:bg-muted/30":"hover:bg-muted/30",_?.row,Me),children:H.map((Pe,Ve)=>jsxRuntime.jsx(gr,{appearance:E,align:Pe.align,className:l("h-[52px] border-r border-border/50 px-2.5 py-1.5 align-middle",Pe.wrap?"whitespace-normal":"whitespace-nowrap",X(Pe,Ve),Pe.cellClassName,_?.cell),style:se(Pe,Ve),children:jsxRuntime.jsx(Vc,{wrap:Pe.wrap,children:s?s(Pe,Y,{row:Y,rowIndex:ce,column:Pe,columnIndex:Ve,isPinnedTopRow:false}):Hc(Pe,Y)})},`${ke}-${Pe.key}`))},ke)}):o.length?null:jsxRuntime.jsx(Ea,{appearance:E,colSpan:Math.max(H.length,1),className:_?.empty,children:p})]})]})})})}r(Ly,"InteractiveTable");function Ay({value:e,placeholder:t,disabled:o,multiline:n=false,commitOnBlur:a=true,className:s,inputClassName:i,onCommit:m}){let c=String(e||""),[d,g]=st.useState(c);st.useEffect(()=>{g(c);},[c]);let u=st.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?jsxRuntime.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());}}):jsxRuntime.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(Ay,"InteractiveTableEditableTextCell");function zy({children:e,mono:t=false,className:o}){return jsxRuntime.jsx("div",{className:l("min-w-0 text-xs text-muted-foreground",t&&"font-mono",o),children:A(e)?e:"\u2014"})}r(zy,"InteractiveTableReadonlyCell");function Oy({value:e,options:t,disabled:o,ariaLabel:n,children:a,className:s,onChange:i}){return jsxRuntime.jsxs("div",{className:l("relative flex w-full items-center",s),children:[a,jsxRuntime.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=>jsxRuntime.jsx("option",{value:m.value,children:m.label},m.value))})]})}r(Oy,"InteractiveTableSelectCell");function jc({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:jsxRuntime.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:jsxRuntime.jsx(i,{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:a?.background==="panel"?void 0:a?.maxLines??2,overflow:"hidden"},children:t})}),d=r(g=>jsxRuntime.jsx("div",{className:"monkeys-gallery-slot-row","data-row":g,children:m.filter(({slot:u})=>u.position.startsWith(g)).map(({slot:u,content:p})=>jsxRuntime.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 jsxRuntime.jsxs("div",{className:"monkeys-gallery-card-surface","data-hover-effect":o.hover?.effect??"none",style:{"--monkeys-gallery-hover-scale":o.hover?.scale??1.02},children:[s==="above"&&c,jsxRuntime.jsxs("div",{className:"monkeys-gallery-media-card",children:[jsxRuntime.jsx("div",{className:"monkeys-gallery-card-media",children:e}),jsxRuntime.jsxs("div",{className:"monkeys-gallery-card-overlay",children:[jsxRuntime.jsxs("div",{children:[s==="overlay-top"&&c,d("top")]}),d("middle"),jsxRuntime.jsxs("div",{children:[d("bottom"),s==="overlay-bottom"&&c]})]})]}),s==="below"&&c]})}r(jc,"WorkbenchGalleryCardSurface");var Fy=/\.(png|jpe?g|webp|gif|svg|bmp|avif)$/i,Hy=/\.(wav|mp3|ogg|m4a|flac|aac)$/i,Vy=r(e=>/^https?:\/\//i.test(String(e||"")),"isLikelyUrl"),$c=r(e=>String(e?.renderType||e?.type||"").toLowerCase(),"getColumnRenderKind"),Gy=r(e=>String(e||"").startsWith("data:image/")||Fy.test(String(e||"")),"isImageLikeValue"),_y=r(e=>String(e||"").startsWith("data:audio/")||Hy.test(String(e||"")),"isAudioLikeValue"),jy=r(e=>String(e||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),"escapeSvgText"),Wn=r((e,t)=>e?t?.[e.key]??null:null,"getDefaultGalleryFieldValue"),Dr=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"),Wr=r((e={key:""},t)=>$c(e)==="image"||Gy(t),"isDefaultGalleryImageField"),Lr=r((e={key:""},t)=>$c(e)==="audio"||_y(t),"isDefaultGalleryAudioField"),Kc=r((e,t,o)=>{if(Vy(e)||String(e||"").startsWith("data:image/"))return String(e);let n=jy(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"),qa=r((e,t,{getFieldValue:o=Wn,shouldEnhanceMultimodal:n=true,isImageField:a=Wr,isAudioField:s=Lr}={})=>{if(!e||!n)return false;let i=o(e,t);return a(e,i)||s(e,i)},"isDefaultGalleryMediaColumn"),Ya=r((e,t,{isMediaColumn:o=r(()=>false,"isMediaColumn")}={})=>!e||e.renderType==="icon"?false:!o(e,t),"isDefaultGalleryTitleCandidate"),Ja=r((e,t,{isMediaColumn:o=r(()=>false,"isMediaColumn")}={})=>!e||e.renderType==="icon"?false:!o(e,t),"isDefaultGallerySummaryCandidate"),Uc=r((e,t,{compact:o=false,getFieldValue:n=Wn,getDisplayText:a=Dr}={})=>{let s=n(e,t);return jsxRuntime.jsx("span",{className:l("leading-relaxed",o&&e?.wrap===true&&"line-clamp-2 block"),children:a(s)})},"renderDefaultGalleryFieldValue");var Ky=r(e=>e==="compact"?2:e==="detailed"?6:4,"getDefaultGalleryDetailLimit"),Uy=r((e,t)=>e===1||e===2||e===3?Number(e):t==="detailed"?1:2,"getNormalizedGalleryBentoColumns"),qy=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:Ky(e)},"getNormalizedGalleryDetailLimit"),Yy=r(e=>e==="compact"?"p-3":e==="detailed"?"p-4":"p-3.5","getGalleryCardPaddingClassName"),Jy=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"),Xy=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 Zy(e){return Ic(e)}r(Zy,"getIconComponent");function Qy(e){return e}r(Qy,"defaultFormatLabel");function eh(e){return typeof e=="string"||typeof e=="number"?String(e):""}r(eh,"getLabelText");function Fs({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:w,isSummaryCandidate:x,getDisplayText:k,renderFieldValue:C,getImagePreviewSrc:S,isImageField:T,isAudioField:E,AudioPlayerComponent:R,cardVariant:F="default",renderPreview:_,renderMeta:z,renderLeadingVisual:O,resolveRecordVisual:j,hiddenDetailFieldKeys:I=[],labels:V,formatLabel:$=Qy,className:N}){let D=y||Wn,M=k||Dr,K=T||Wr,J=E||Lr,G=S||Kc,te=v||((ee,Te)=>qa(ee,Te,{getFieldValue:D,shouldEnhanceMultimodal:h,isImageField:K,isAudioField:J})),U=w||((ee,Te)=>Ya(ee,Te,{isMediaColumn:te})),Z=x||((ee,Te)=>Ja(ee,Te,{isMediaColumn:te})),ae=C||((ee,Te,{compact:Ke}={})=>Uc(ee,Te,{compact:Ke,getFieldValue:D,getDisplayText:M})),ie=F==="preview-only",de=F==="image-only",W=F==="chromatic-bento",B=(d!=="auto"?t.find(ee=>ee.key===d&&te(ee,e)):null)||(h?t.find(ee=>te(ee,e)):null),H=t.find(ee=>ee.renderType==="icon"),ne=H&&j?j(e[H.key],e,H):null,fe=Zy(ne?.Icon||ne?.icon),ye=B?D(B,e):null,xe=B?K(B,ye):false,oe=B?J(B,ye):false,le=t.filter(ee=>ee.key!==B?.key&&ee.renderType!=="icon"),Ie=le.filter(ee=>{if(!ee||te(ee,e)||!U(ee,e))return false;let Te=D(ee,e);return !(Te==null||Te==="")})[0]||null,We=M(Ie?D(Ie,e):e.linkKey||e.id),q=le.filter(ee=>ee&&ee.key!==Ie?.key&&!te(ee,e)&&Z(ee,e)).map(ee=>({column:ee,text:String(M(D(ee,e)))})),L=(q.find(({text:ee})=>ee!=="\u2014"&&ee.length>12)||q.find(({text:ee})=>ee!=="\u2014"))?.column||null,X=L?M(D(L,e)):"",se=new Set(I),Y=le.filter(ee=>ee.key!==Ie?.key&&ee.key!==L?.key&&!se.has(ee.key)),ce=qy({density:g,visibility:p,limit:f}),ke=Number.isFinite(ce)?Y.slice(0,ce):Y,we=g==="detailed",Me=Uy(u,g),Pe=Yy(g),Ve=Xy(Me),Xe=b==="lines",Oe=de?a?"block h-auto w-full":"block h-auto w-full transition-transform duration-500 group-hover:scale-[1.02]":Jy(g,c),pt=typeof _=="function"?_({row:e,mediaColumn:B,mediaValue:ye,isImageMedia:xe,isAudioMedia:oe,iconVisual:ne,IconComponent:fe,previewClassName:Oe}):null,Ae={row:e,contentColumns:le,detailColumns:Y,titleColumn:Ie,summaryColumn:L,getDisplayText:M,getFieldValue:D},Le=z?.(Ae)??null,re=O?.({...Ae,iconVisual:ne})??null,Ce=!re&&ne?jsxRuntime.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:Rr(ne.Icon||ne.icon,l("h-4 w-4",ne.iconClassName||"text-primary"))}):null,Fe=re||Ce,qe=W?"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",nt=W?"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",gt=W?"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",Bt=W?"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",_e=V?.fieldCount?.(le.length),zt=V?.coverOnlyHint,Ot=pt==null&&xe&&B?G(ye,e.id,B.label):void 0,ge=pt??jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[xe&&B?jsxRuntime.jsx("div",{className:l("overflow-hidden bg-card/50",de?"rounded-[inherit] bg-transparent":ie?"rounded-[inherit]":"mb-3 rounded-lg border border-border/70"),children:jsxRuntime.jsx("img",{src:Ot,style:la(Ot),alt:typeof ye?.alt=="string"?ye.alt:typeof ye=="string"?ye:String(B.label||""),className:Oe,loading:"lazy",referrerPolicy:"no-referrer",onError:ee=>{ee.currentTarget.onerror=null,ee.currentTarget.src=G("",e.id,B.label);}})}):null,!xe&&ne&&ie?jsxRuntime.jsx("div",{className:l("flex items-center justify-center","rounded-[inherit] border py-10",ne.chipClassName||"border-primary/20 bg-primary/5"),children:Rr(ne.Icon||ne.icon,l("h-10 w-10",ne.iconClassName||"text-primary"))}):null,oe&&R?jsxRuntime.jsx("div",{className:l(!ie&&"mb-3"),children:jsxRuntime.jsx(R,{filename:String(ye)})}):null]}),He=a?jc:null,Q=a?.title?.fieldId?t.find(ee=>ee.key===a.title?.fieldId):Ie,me=i?i(e):Q?M(D(Q,e)):We,Be=!!a?.slots?.length,he=Be||n==="container"?"div":"button";return jsxRuntime.jsxs(he,{"data-gallery-card":true,"data-card-hover-effect":a?.hover?.effect,type:he==="button"?"button":void 0,role:Be&&n==="button"&&o?"group":void 0,tabIndex:Be&&n==="button"&&o?0:void 0,onKeyDown:Be&&n==="button"&&o?ee=>{ee.target===ee.currentTarget&&(ee.key==="Enter"||ee.key===" ")&&(ee.preventDefault(),o());}:void 0,onClick:n==="button"?ee=>{(!Be||!ee.target.closest("button,a,input,select,textarea,[role=button],[role=menuitem]"))&&o?.();}:void 0,"aria-label":eh(We),className:l("group relative w-full rounded-lg text-left transition-all duration-300",de?"overflow-hidden bg-transparent p-0 shadow-none":ie?"overflow-hidden bg-transparent p-0":l("overflow-hidden border",W&&"shadow-none"),!ie&&!de&&Pe,!ie&&!de&&(m?W?"border-primary/35 bg-background/85 ring-1 ring-primary/20":"border-primary/40 bg-primary/10 ring-1 ring-primary/30":W?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"),ie&&m&&"ring-1 ring-primary/30",de&&(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",N),children:[W?jsxRuntime.jsx("div",{"aria-hidden":"true",className:l("pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_top_right,hsl(var(--primary)/0.18),transparent_40%),radial-gradient(circle_at_bottom_left,hsl(var(--accent)/0.18),transparent_45%)] opacity-0 transition-opacity duration-300",m?"opacity-100":"group-hover:opacity-100")}):null,jsxRuntime.jsxs("div",{className:l("relative z-[1]",(de||ie)&&"rounded-[inherit]"),children:[He&&a?jsxRuntime.jsx(He,{presentation:a,title:me,renderSlot:ee=>s?.(ee,Ae),children:ge}):ge,!ie&&!de?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-start gap-3",children:[Fe?jsxRuntime.jsx("div",{className:"shrink-0",children:Fe}):null,jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-1 items-start justify-between gap-3",children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[!a?.title&&jsxRuntime.jsx("div",{className:l("flex items-center gap-2 text-sm font-semibold",W?"text-muted-foreground transition-colors duration-300 group-hover:text-foreground":"text-foreground"),children:jsxRuntime.jsx("span",{className:"truncate",children:n==="container"&&o?jsxRuntime.jsx("button",{type:"button",onClick:o,className:"border-0 bg-transparent p-0 text-left hover:underline",style:{font:"inherit",color:"inherit"},children:We}):We})}),X&&X!==We?jsxRuntime.jsx("div",{className:l("mt-1 text-[11px] leading-5 text-muted-foreground",we?"line-clamp-4":"line-clamp-2",W&&"transition-colors duration-300 group-hover:text-foreground"),children:X}):null]}),Le??(A(_e)?jsxRuntime.jsx("span",{className:qe,children:_e}):null)]})]}),ke.length>0?jsxRuntime.jsx("div",{"data-gallery-detail-presentation":b,className:l("mt-3 grid grid-flow-row gap-2",Xe?"grid-cols-1":Ve),children:ke.map(ee=>jsxRuntime.jsxs("div",{className:Xe?"flex min-w-0 items-start gap-2 text-xs":nt,children:[ee.label?jsxRuntime.jsx("div",{className:Xe?"shrink-0 text-muted-foreground":gt,children:$(ee.label,{column:ee})}):null,jsxRuntime.jsx("div",{className:Xe?"min-w-0 text-foreground":l(Bt,!ee.label&&"mt-0"),children:ae(ee,e,{compact:g!=="detailed",surface:"gallery"})})]},`${e.id||e.linkKey}-${ee.key}`))}):null,!Ie&&!X&&ke.length===0&&A(zt)?jsxRuntime.jsx("div",{className:l("mt-3 text-[11px] text-muted-foreground",W&&"transition-colors duration-300 group-hover:text-foreground"),children:zt}):null]}):null]})]})}r(Fs,"WorkbenchGalleryCard");function Yc(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(Yc,"resolveGalleryScrollDirection");function nh(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(nh,"placeWindowedItems");function rh(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(rh,"visibleWindow");function Xc({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=st.useRef(null),h=st.useRef(new Map),y=st.useRef(),[v,w]=st.useState({width:f,heights:{}}),[x,k]=st.useState({start:0,length:u?1280:720}),[C,S]=st.useState(),[T,E]=st.useState(),R=e.map(t),F=JSON.stringify(R),_=R.map((D,M)=>v.heights[D]??Math.max(1,a(e[M],f))),z=st.useMemo(()=>nh(_,p,f,o.gap,u?"rail":o.mode==="grid"?"grid":"masonry"),[JSON.stringify(_),p,f,o.gap,u,o.mode]),O=st.useCallback(()=>{let D=b.current,M=s();if(!D||!M)return;let K=D.getBoundingClientRect(),J=M.getBoundingClientRect(),G=M.offsetHeight>0?J.height/M.offsetHeight:1,te=u?M.scrollLeft:(J.top-K.top)/(G||1)+M.clientTop,U=u?M.clientWidth:M.clientHeight;U<=0||k(Z=>Z.start===te&&Z.length===U?Z:{start:te,length:U});},[s,u]);st.useLayoutEffect(()=>{O();},[O,z.height,z.width]),st.useEffect(()=>{let D=s();if(!D)return;let M=0,K=r(()=>{M||(M=requestAnimationFrame(()=>{M=0,O();}));},"update");D.addEventListener("scroll",K,{passive:true}),window.addEventListener("resize",K);let J=typeof ResizeObserver=="function"?new ResizeObserver(K):void 0;return J?.observe(D),b.current&&J?.observe(b.current),()=>{D.removeEventListener("scroll",K),window.removeEventListener("resize",K),J?.disconnect(),cancelAnimationFrame(M);}},[s,O]),st.useEffect(()=>{if(typeof ResizeObserver!="function")return;let D=new ResizeObserver(M=>{w(K=>{let J={...K.heights},G=K.width!==f;for(let te of M){let U=te.target.dataset.windowKey,Z=te.borderBoxSize?.[0]?.blockSize??te.target.offsetHeight;U!==void 0&&Z>0&&J[U]!==Z&&(J[U]=Z,G=true);}return G?{width:f,heights:J}:K});});return y.current=D,h.current.forEach(M=>D.observe(M)),()=>{D.disconnect(),y.current=void 0;}},[f]),st.useEffect(()=>{let D=new Set(R);w(M=>({width:M.width,heights:Object.fromEntries(Object.entries(M.heights).filter(([K])=>D.has(K)))}));},[F]);let j=r((D,M)=>{let K=h.current.get(D);if(K&&y.current?.unobserve(K),!M){h.current.delete(D);return}M.dataset.windowKey=D,h.current.set(D,M),y.current?.observe(M);},"register"),I=x.length,V=rh(z.placements,x.start,x.length,u,I),$=new Set(V.map(D=>D.index));for(let D of [C,T]){let M=D===void 0?-1:R.indexOf(D);M>=0&&$.add(M);}st.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 N={...o,columnWidth:f,itemWidth:f};return jsxRuntime.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:z.height},overflowAnchor:"none"},children:[u?jsxRuntime.jsx("div",{"aria-hidden":"true",style:{width:z.width,height:z.height,pointerEvents:"none"}}):null,Array.from($).sort((D,M)=>D-M).map(D=>{let M=e[D],K=R[D],J=z.placements[D],G=d(M,N);return jsxRuntime.jsx("div",{...G,"aria-posinset":D+1,"aria-setsize":e.length,onFocus:te=>{S(K),G.onFocus?.(te);},onBlur:te=>{te.currentTarget.contains(te.relatedTarget)||S(void 0),G.onBlur?.(te);},onKeyDown:te=>{if(te.target===te.currentTarget){let U=u?1:p,Z=te.key==="Home"?0:te.key==="End"?e.length-1:te.key==="ArrowRight"?D+1:te.key==="ArrowLeft"?D-1:te.key==="ArrowDown"?D+U:te.key==="ArrowUp"?D-U:void 0;if(Z!==void 0){te.preventDefault(),E(R[Math.min(e.length-1,Math.max(0,Z))]);return}}G.onKeyDown?.(te);},style:{...G.style,position:"absolute",left:J.left,top:J.top,width:J.width},children:jsxRuntime.jsx("div",{ref:te=>j(K,te),children:g(M,N)})},K)}),m?jsxRuntime.jsx("div",{ref:m,"aria-hidden":"true",style:{position:"absolute",left:Math.max(0,z.width-1),top:0,width:1,height:1}}):null]})}r(Xc,"WorkbenchWindowedLayout");var sh=12,lh=8,eu=280,ou=240,dh=typeof window>"u"?st.useEffect:st.useLayoutEffect;function ei(e,t,o){return Math.min(Math.max(e,t),o)}r(ei,"clamp");function ch(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(ch,"getRootFontSize");function ti(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*ch(o)}return t}r(ti,"resolveLengthToPixels");function tu(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(tu,"areMeasurementMapsEqual");function uh({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(uh,"getMasonryColumnCount");function mh({size:e,columnWidth:t,columnCount:o,gap:n}){if(Number.isFinite(e?.columnSpan)&&Number(e?.columnSpan)>0)return ei(Math.round(Number(e?.columnSpan)),1,o);let a=ti(e?.width,t,null);return ei(Math.ceil((a+n)/(t+n)),1,o)}r(mh,"getItemColumnSpan");function ph({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):ti(e?.height,ou,null);return Math.max(1,Math.ceil((a+n)/(o+n)))}r(ph,"getItemRowSpan");function gh({size:e,measuredHeight:t}){return Number.isFinite(t)&&Number(t)>0?Number(t):ti(e?.height,ou,null)}r(gh,"getResolvedItemHeight");function Ar({items:e=[],renderItem:t,getItemKey:o=r((p,f)=>p?.id??p?.key??f,"getItemKey"),getItemSize:n,columnWidth:a=eu,columnCount:s,gap:i=sh,rowHeight:m=lh,placementStrategy:c="shelf",containerProps:d,getItemProps:g,className:u}){let p=st.useRef(null),f=st.useRef(new Map),b=st.useRef(null),[h,y]=st.useState(0),[v,w]=st.useState({}),x=st.useMemo(()=>e.map((z,O)=>String(o(z,O))),[o,e]),k=x.join("|");st.useEffect(()=>{let z=p.current;if(!z)return;let O=r(()=>{let j=Math.round(z.getBoundingClientRect().width);y(I=>I===j?I:j);},"updateWidth");if(O(),typeof ResizeObserver=="function"){let j=new ResizeObserver(()=>O());return j.observe(z),()=>j.disconnect()}return window.addEventListener("resize",O),()=>window.removeEventListener("resize",O)},[]),st.useEffect(()=>{w(z=>{let O=new Set(x),j=Object.fromEntries(Object.entries(z).filter(([I])=>O.has(I)));return tu(z,j)?z:j});},[x,k]);let C=ti(a,eu,p.current),S=c==="dense",E=(Number.isFinite(s)&&Number(s)>0?ei(Math.round(Number(s)),1,24):void 0)||uh({containerWidth:h,itemCount:e.length,targetColumnWidth:C,gap:i}),R=h>0?(h-i*Math.max(E-1,0))/E:C,F=st.useMemo(()=>e.map((z,O)=>{let j=x[O],I=typeof n=="function"?n(z,{columnCount:E,columnWidth:R,containerWidth:h,gap:i,placementStrategy:c,rowHeight:m})||{}:{};return {key:j,item:z,size:I,columnSpan:mh({size:I,columnWidth:R,columnCount:E,gap:i}),rowSpan:ph({size:I,measuredHeight:v[j],rowHeight:m,gap:i})}}),[E,h,i,n,x,e,v,c,R,m]);dh(()=>{let z={};f.current.forEach((O,j)=>{let I=Math.ceil(O.getBoundingClientRect().height);Number.isFinite(I)&&I>0&&(z[j]=I);}),w(O=>{if(!Object.keys(z).length)return O;let j={...O,...z};return tu(O,j)?O:j});},[E,S,k,R]),st.useEffect(()=>{if(typeof ResizeObserver!="function")return;let z=new ResizeObserver(O=>{w(j=>{let I={...j},V=false;for(let $ of O){let N=$.target.dataset.masonryKey;if(!N)continue;let D=Math.ceil($.contentRect.height);!Number.isFinite(D)||D<=0||I[N]===D||(I[N]=D,V=true);}return V?I:j});});return b.current=z,f.current.forEach(O=>z.observe(O)),()=>{z.disconnect(),b.current=null;}},[S,k]);let _=r((z,O)=>{let j=f.current,I=j.get(z);if(I&&I!==O&&b.current&&b.current.unobserve(I),!O){j.delete(z);return}O.dataset.masonryKey=z,j.set(z,O),b.current&&b.current.observe(O);},"registerItemNode");if(!S){let z=(()=>{let O=Array.from({length:E},()=>0),j=0,I=0,V=F.map(({key:$,item:N,columnSpan:D,rowSpan:M,size:K})=>{let J=ei(D,1,E),G=j;if(c==="shortest"){let de=Number.POSITIVE_INFINITY;for(let W=0;W<=E-J;W+=1){let pe=Math.max(...O.slice(W,W+J));pe<de&&(de=pe,G=W);}}else G+J>E&&(G=0),G=Math.min(G,E-J);let te=R*J+i*Math.max(J-1,0),U=gh({size:K,measuredHeight:v[$]}),Z=Math.max(...O.slice(G,G+J)),ae=G*(R+i),ie=Z+U;for(let de=G;de<G+J;de+=1)O[de]=ie+i;return I=Math.max(I,ie),c!=="shortest"&&(j=G+J,j>=E&&(j=0)),{key:$,item:N,columnSpan:J,itemHeight:U,itemWidth:te,left:ae,rowSpan:M,size:K,top:Z}});return {containerHeight:Math.max(0,I),positionedItems:V}})();return jsxRuntime.jsx("div",{ref:p,...d,className:l("relative w-full",u,d?.className),style:{...d?.style,height:`${z.containerHeight}px`},children:z.positionedItems.map(({key:O,item:j,columnSpan:I,rowSpan:V,size:$,itemWidth:N,left:D,top:M})=>{let K=h<=0&&E===1,J=K?"100%":`${N}px`,G={columnCount:E,columnSpan:I,columnWidth:R,containerWidth:h,gap:i,itemWidth:N,placementStrategy:c,rowSpan:V,rowHeight:m,size:$},te=g?.(j,G);return jsxRuntime.jsx("div",{...te,className:l("absolute min-w-0",te?.className),style:{...te?.style,left:K?0:`${D}px`,top:`${M}px`,width:J,maxWidth:J},children:jsxRuntime.jsx("div",{ref:U=>_(O,U),role:"presentation",className:"min-w-0",children:t(j,G)})},O)})})}return jsxRuntime.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:F.map(({key:z,item:O,columnSpan:j,rowSpan:I,size:V})=>{let $={columnCount:E,columnSpan:j,columnWidth:R,containerWidth:h,gap:i,placementStrategy:c,rowSpan:I,rowHeight:m,size:V},N=g?.(O,$);return jsxRuntime.jsx("div",{...N,className:l("min-w-0",N?.className),style:{...N?.style,gridColumn:`span ${j}`,gridRow:`span ${I}`},children:jsxRuntime.jsx("div",{ref:D=>_(z,D),role:"presentation",className:"min-w-0",children:t(O,$)})},z)})})}r(Ar,"WorkbenchMasonryLayout");var fh=12,yh=[1],hh=[4/3],xh=[1,4/5,3/2,3/4,5/4],vh=.5,kh=2,wh="hsl(var(--monkeys-color-muted, var(--muted)))";function oi(e,t,o){return Math.min(Math.max(e,t),o)}r(oi,"clamp");function _s(e,t,o){return typeof e!="number"||!Number.isFinite(e)||e<=0?t:oi(Math.round(e),1,o)}r(_s,"normalizeCount");function Ch(e){return e==="masonry"||e==="dense"?xh:e==="rail"?hh:yh}r(Ch,"getDefaultAspectRatios");function Sh(e,t){let o=t?.filter(n=>typeof n=="number"&&Number.isFinite(n)&&n>0).map(n=>oi(n,vh,kh));return o?.length?o:Ch(e)}r(Sh,"resolveAspectRatios");function ru(e){return _s(e?.count,fh,48)}r(ru,"resolveWorkbenchCollectionSkeletonCapacity");function au(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(au,"resolveWorkbenchCollectionLoadingVariant");function Th({columnCount:e,config:t,phase:o}){if(o==="initial"){let a=oi(e*2,6,24);return _s(t?.count,a,48)}let n=oi(e,1,12);return _s(t?.loadMoreCount,n,24)}r(Th,"resolveSkeletonCount");function nu(e,t){return Math.max(1,e/t)}r(nu,"getSkeletonHeight");function js({mode:e,phase:t,columnCount:o,columnWidth:n,cardWidth:a,gap:s,rowHeight:i,config:m,ariaLabel:c,className:d}){let g=Th({columnCount:o,config:m,phase:t}),u=Sh(e,m?.aspectRatios),p=m?.animated??true,f=st.useMemo(()=>Array.from({length:g},(h,y)=>({aspectRatio:u[y%u.length],key:`${t}-${y}`,index:y})),[u,g,t]),b=r((h,y)=>jsxRuntime.jsx(Tn,{index:h.index,children:jsxRuntime.jsx(Dt,{variant:"block",animated:p,className:"h-auto w-full rounded-lg",style:{backgroundColor:wh,...y??{aspectRatio:String(h.aspectRatio)}},"data-collection-skeleton-item":"","data-skeleton-aspect-ratio":h.aspectRatio})}),"renderSkeleton");return jsxRuntime.jsx(Ho,{animation:m?.animation,animated:p,children:jsxRuntime.jsx("div",{role:"status","aria-label":c,"aria-atomic":"true","data-collection-loading":t,"data-layout-mode":e,className:"min-w-0",children:e==="masonry"||e==="dense"?jsxRuntime.jsx(Ar,{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:nu(y.columnWidth,h.aspectRatio)}),renderItem:(h,y)=>b(h,{height:`${nu(y.columnWidth,h.aspectRatio)}px`})}):e==="rail"?jsxRuntime.jsx("div",{"aria-hidden":"true",className:l("grid min-w-0 grid-flow-col items-start overflow-x-auto",d),style:{gap:s,gridAutoColumns:typeof a=="number"?`${a}px`:a??`${n}px`},children:f.map(h=>jsxRuntime.jsx("div",{children:b(h)},h.key))}):jsxRuntime.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=>jsxRuntime.jsx("div",{children:b(h)},h.key))})})})}r(js,"WorkbenchCollectionSkeleton");function Nh(e,t){if(e.size!==t.size)return false;for(let o of e)if(!t.has(o))return false;return true}r(Nh,"setsEqual");function Ih(e){return String(e)}r(Ih,"getComparableKey");function Mh(e){return e==="multiple"?"toggle":"replace"}r(Mh,"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]=st.useState(()=>new Set(s??[])),u=st.useRef(null),p=st.useRef(m);p.current=m;let f=st.useMemo(()=>{let k=new Map;return e.map((C,S)=>{let T=t(C,S),E=Ih(T),R=k.get(E);if(R!==void 0)throw new TypeError(`useWorkbenchCollectionSelection received duplicate item key "${E}" at indices ${R} and ${S}.`);return k.set(E,S),{item:C,index:S,key:T}})},[t,e]),b=st.useMemo(()=>{let k=new Map;return f.forEach(C=>k.set(C.key,C)),k},[f]),h=st.useMemo(()=>o==="none"?new Set:c?new Set(a??[]):d,[c,a,d,o]),y=st.useRef(h);y.current=h;let v=st.useCallback(()=>{u.current=null;},[]);st.useEffect(()=>{if(c)return;let k=new Set(f.map(({key:C})=>C));g(C=>{let S=new Set(Array.from(C).filter(T=>k.has(T)));return Nh(C,S)?C:(y.current=S,S)});},[c,f]),st.useEffect(()=>{let k=u.current;if(o!=="multiple"||h.size===0||k===null){v();return}let C=b.get(k);(!C||i?.(C.item,C.index))&&v();},[i,b,o,v,h.size]);let w=st.useCallback((k,C={})=>{if(o==="none")return;let S=b.get(k);if(!S||i?.(S.item,S.index))return;let T=new Set(y.current),E=n??Mh(o),R=C.shiftKey&&o==="multiple"?"range":C.behavior??E;o==="single"&&(R=R==="toggle"?"toggle":"replace");let F=u.current===null?void 0:b.get(u.current),_=!!(F&&!i?.(F.item,F.index));o==="multiple"&&R==="range"&&!_&&(R=E==="range"?"toggle":E);let z=new Set;if(o==="single")R==="toggle"&&T.has(S.key)||z.add(S.key);else if(R==="range"&&F){T.forEach(I=>z.add(I));let O=Math.min(F.index,S.index),j=Math.max(F.index,S.index);f.slice(O,j+1).forEach(I=>{i?.(I.item,I.index)||z.add(I.key);});}else R==="replace"?z.add(S.key):(T.forEach(O=>z.add(O)),z.has(S.key)?z.delete(S.key):z.add(S.key));u.current=o==="multiple"?S.key:null,c||(y.current=z,g(z)),p.current?.(z,{item:S.item,index:S.index,key:S.key,behavior:R});},[n,c,i,b,o,f]),x=st.useCallback(k=>h.has(k),[h]);return {mode:o,selectedKeys:h,isSelected:x,selectKey:w,resetAnchor:v}}r(qs,"useWorkbenchCollectionSelection");var Xs=12,Eh=8,ri=280,Dh=640,Wh=1024,cu=24;function ai(e,t,o){return Math.min(Math.max(e,t),o)}r(ai,"clamp");function oo(e,t){return typeof e=="function"?e(t):e}r(oo,"resolveRenderableSlot");function zn(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(zn,"resolveLengthToPixels");function ni(e){if(!(typeof e!="number"||!Number.isFinite(e)||e<=0))return ai(Math.round(e),1,cu)}r(ni,"normalizeColumns");function su(e,t){if(e==="auto"||e===void 0)return;if(typeof e=="number")return ni(e);let o=ni(e.mobile),n=ni(e.tablet),a=ni(e.desktop);return t>=Wh?a??n??o:t>=Dh?n??o??a:o??n??a}r(su,"resolveResponsiveColumns");function Lh({containerWidth:e,itemCount:t,gap:o,columns:n,underfilledBehavior:a,maxColumns:s,minCardWidth:i,idealCardWidth:m,maxCardWidth:c,node:d}){let g=su(n,e),u=su(s,e);if(g)return u?Math.min(g,u):g;if(!e)return 1;let p=zn(m,ri,d),f=zn(i,p*.78,d),b=Math.max(f,zn(c,p*1.35,d)),h=Math.max(t,1),y=Math.max(1,Math.min(a==="preserve-columns"?cu:h,Math.ceil((e+o)/(Math.max(f*.75,1)+o)))),v=1,w=Number.POSITIVE_INFINITY;for(let x=1;x<=y;x+=1){let k=(e-o*Math.max(x-1,0))/x;if(!Number.isFinite(k)||k<=0)continue;let C=Math.abs(k-p)+Math.max(0,f-k)*3+Math.max(0,k-b)*2;C<w&&(w=C,v=x);}return u?Math.min(v,u):v}r(Lh,"resolveColumnCount");function lu(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0?e:Xs}r(lu,"normalizeGap");function Ah(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?e:Eh}r(Ah,"normalizeRowHeight");function zh(e){return typeof e=="number"&&Number.isFinite(e)?ai(e,0,1):0}r(zh,"normalizeThreshold");function Oh(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(Oh,"normalizeItemSize");function Fh(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(Fh,"getDefaultItemKey");function Hh(e){return `@inf-monkeys-tech/monkeys-design:workbench-collection:${e}`}r(Hh,"getScrollStorageKey");function Vh(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(Vh,"getParentScrollOwner");function du(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(du,"isInteractiveEventTarget");function Gh(e){if(!(!Number.isFinite(e)||Number(e)<=0))return ai(Math.round(Number(e)),1,12)}r(Gh,"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=xt().workbench.collection,u=Co(),p=nn(),f=st.useId().replace(/:/g,""),b=st.useRef(null),h=st.useRef(null),y=st.useRef(null),v=st.useRef(null),w=st.useRef(false),x=st.useRef(false),k=st.useRef(false),C=st.useRef(false),S=st.useRef(null),T=st.useRef(null),E=st.useRef(void 0),R=st.useRef(false),[F,_]=st.useState(0),[z,O]=st.useState(Xs),[j,I]=st.useState(null),V=st.useRef(a);V.current=a;let $=st.useCallback(Q=>{y.current=Q,I(Q);},[]),N=t.layout.mode;if(N!=="grid"&&N!=="masonry"&&N!=="dense"&&N!=="rail")throw new TypeError(`WorkbenchCollection layout.mode "${String(N)}" is not supported.`);let D=t.layout.gap===void 0?z:lu(t.layout.gap),M=Ah(t.layout.rowHeight),K=t.getItemKey??Fh,J=st.useMemo(()=>e.map((Q,me)=>{let Be=K(Q,me);return {item:Q,index:me,key:Be,stringKey:String(Be)}}),[K,e]),G=J.map(({stringKey:Q})=>Q).join(""),te=t.state,U=te?.loading===true,Z=te?.loadingMore===true,ae=te?.hasMore===true,ie=au(t.loading?.variant),de=U&&J.length===0&&ie==="skeleton"?ru(t.loading?.skeleton):J.length,W=t.selection?.mode??"none",pe=st.useCallback(Q=>t.selection?.isItemDisabled?.(Q.item,Q.index)??false,[t.selection?.isItemDisabled]),B=st.useCallback(Q=>Q.key,[]),H=st.useCallback((Q,me)=>{V.current?.onSelectionChange?.(Q,{item:me.item.item,key:me.key,behavior:me.behavior});},[]),{selectedKeys:ne,selectKey:fe}=qs({items:J,getItemKey:B,mode:W,behavior:t.selection?.behavior,selectedKeys:t.selection?.selectedKeys,defaultSelectedKeys:t.selection?.defaultSelectedKeys,isItemDisabled:pe,onSelectionChange:H});st.useEffect(()=>{let Q=j;if(!Q)return;let me=r(()=>{if(t.layout.gap===void 0&&b.current){let he=Number.parseFloat(window.getComputedStyle(b.current).columnGap);O(Number.isFinite(he)&&he>=0?he:Xs);}let Be=Q.clientWidth;_(he=>he===Be?he:Be);},"updateWidth");if(me(),typeof ResizeObserver=="function"){let Be=new ResizeObserver(me);return Be.observe(Q),()=>Be.disconnect()}if(!(typeof window>"u"))return window.addEventListener("resize",me),()=>window.removeEventListener("resize",me)},[j,t.layout.gap,m?.gap,p]);let ye=Lh({containerWidth:F,itemCount:de,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=F>0?Math.max(0,(F-D*Math.max(ye-1,0))/ye):zn(t.layout.cardWidth??t.layout.columnWidth??t.layout.idealCardWidth,ri,y.current),oe=t.layout.placementStrategy??(N==="dense"?"dense":N==="masonry"?"shortest":"shelf"),le=st.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=st.useMemo(()=>{let Q=t.virtualization;return Q?.enabled!==true||Q.fallback!=="error"?null:Q.adapter?Q.adapter.supports?.(N)===false?new Error(`WorkbenchCollection virtualization adapter does not support mode "${N}".`):null:new Error("WorkbenchCollection virtualization requires an adapter.")},[t.virtualization,N]),Ie=st.useMemo(()=>({mode:N,columnCount:ye,columnWidth:xe,containerWidth:F,gap:D,itemCount:J.length}),[ye,xe,F,D,N,J.length]);st.useEffect(()=>{V.current?.onLayoutChange?.(Ie),F>0&&!R.current&&(R.current=true,V.current?.onLayoutReady?.(Ie));},[Ie,F]),st.useEffect(()=>{R.current=false;},[N]);let We=st.useCallback(()=>{let Q=t.layout.scrollOwner;return Q&&Q!=="self"&&Q!=="parent"?Q:N==="rail"?h.current:Q==="parent"?Vh(b.current):b.current},[t.layout.scrollOwner,N]);st.useEffect(()=>{let Q=t.scrollRestorationKey?.trim();if(!Q||typeof window>"u")return;let me=We();if(!me)return;let Be=Hh(Q);try{let ee=Number.parseFloat(window.sessionStorage.getItem(Be)??"");Number.isFinite(ee)&&ee>=0&&(me.scrollTop=ee);}catch{}let he=r(()=>{try{window.sessionStorage.setItem(Be,String(me.scrollTop));}catch{}},"saveScrollPosition");return me.addEventListener("scroll",he,{passive:true}),()=>{he(),me.removeEventListener("scroll",he);}},[t.scrollRestorationKey,We]);let ue=typeof a?.onLoadMore=="function",q=te?.error??Re;st.useEffect(()=>{(!ue||!ae)&&(x.current=false,k.current=false,C.current=false);},[ue,ae]);let L=st.useCallback(()=>{if(!ue||!ae||Z||w.current)return;w.current=true;let Q=r(()=>{w.current=false;},"releaseRequest");try{let me=V.current?.onLoadMore?.();me&&typeof me.then=="function"?me.then(Q,Q):Q();}catch(me){throw Q(),me}},[ue,ae,Z]);st.useEffect(()=>{let Q=v.current;if((S.current!==Q||T.current!==G||E.current!==t.loading?.pageKey)&&(S.current=Q,T.current=G,E.current=t.loading?.pageKey,x.current=false,k.current=false,C.current=false),!Q||!ue||!ae||typeof IntersectionObserver!="function")return;let me=We(),Be=false,he=true,ee=new IntersectionObserver(Ze=>{if(!he)return;let kt=Ze.some(Yn=>Yn.isIntersecting);if(!(kt&&(Z||w.current))){if(C.current){if(Be=true,C.current=false,x.current=kt,!kt){k.current=false;return}if(k.current)return;k.current=true,L();return}if(!Be){Be=true,x.current=kt,kt||(k.current=false),kt&&t.loading?.autoFill&&!k.current&&(k.current=true,L());return}if(!kt){x.current=false,k.current=false;return}x.current||(x.current=true,k.current=true,L());}},{root:me===b.current?me:me||null,rootMargin:t.loading?.rootMargin??"240px",threshold:zh(t.loading?.threshold)}),Te=me??(typeof window>"u"?null:window),Ke=r(()=>{!x.current||k.current||C.current||(C.current=true,ee.unobserve(Q),ee.takeRecords(),ee.observe(Q));},"validateActiveIntersection");return ee.observe(Q),Te?.addEventListener("scroll",Ke,{passive:true}),()=>{he=false,ee.disconnect(),Te?.removeEventListener("scroll",Ke);}},[ue,t.loading?.autoFill,t.loading?.pageKey,t.loading?.rootMargin,t.loading?.threshold,ae,G,Z,J.length,L,We]),st.useEffect(()=>{if(!t.loading?.autoFill||!ue||!ae||Z||k.current||w.current||!v.current)return;let me=We()??(t.layout.scrollOwner==="parent"?b.current?.parentElement??null:null)??b.current;if(!me)return;let Be=N==="rail"?me.clientWidth:me.clientHeight,he=N==="rail"?me.scrollWidth:me.scrollHeight;Be<=0||he<=Be+1&&(k.current=true,L());},[ue,t.layout.scrollOwner,t.loading?.autoFill,t.loading?.pageKey,ae,G,Z,J.length,L,We,N]);let X=st.useMemo(()=>{if(!t.grouping)return [{key:"__all__",stringKey:"__all__",items:J}];let Q=new Map;return J.forEach(me=>{let Be=t.grouping?.getGroupKey(me.item,me.index)??"__all__",he=String(Be),ee=Q.get(he);if(ee){ee.items.push(me);return}Q.set(he,{key:Be,stringKey:he,label:t.grouping?.getGroupLabel?.(Be,me.item),items:[me]});}),Array.from(Q.values())},[t.grouping,J]),se=st.useCallback((Q,me)=>{let Be=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:Be,selected:ne.has(Q.key),selectionMode:W,layout:me,select:r(ee=>fe(Q.key,{behavior:ee}),"select"),selectFromEvent:r((ee,Te)=>fe(Q.key,{behavior:Te,shiftKey:ee.shiftKey}),"selectFromEvent"),preview:r(()=>a?.onItemPreview?.(Q.item,he),"preview"),detail:r(()=>a?.onItemDetail?.(Q.item,he),"detail"),renderSlot:r(ee=>n?.item?.[ee]?.(Q.item,he),"renderSlot"),notifyMediaLoad:r(()=>a?.onMediaLoad?.(Q.item,he),"notifyMediaLoad"),notifyMediaError:r(ee=>a?.onMediaError?.(Q.item,he,ee),"notifyMediaError")};return he},[a,t.getItemStatus,t.selection,ne,fe,W,n?.item]),Y=st.useCallback((Q,me)=>{let Be=r(he=>{he.target!==he.currentTarget||he.key!=="Enter"&&he.key!==" "||(he.preventDefault(),W!=="none"?me.selectFromEvent(he):a?.onItemClick?.(Q.item,me,he));},"handleKeyboard");return {id:`${f}-item-${Q.index}`,"data-monkeys-collection-item":"","data-item-key":Q.stringKey,"data-selected":me.selected||void 0,"data-disabled":me.disabled||void 0,"data-status":me.status,role:W==="none"?"listitem":"option","aria-selected":W==="none"?void 0:me.selected,"aria-disabled":me.disabled||void 0,tabIndex:a?.onItemClick||W!=="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"&&me.selected&&"ring-2 ring-primary",t.appearance?.selection==="outline"&&me.selected&&"outline outline-2 outline-primary",i?.item),onClick:r(he=>{du(he.target,he.currentTarget)||(W!=="none"&&me.selectFromEvent(he),a?.onItemClick?.(Q.item,me,he));},"onClick"),onDoubleClick:r(he=>{du(he.target,he.currentTarget)||a?.onItemDoubleClick?.(Q.item,me,he);},"onDoubleClick"),onMouseEnter:r(he=>a?.onItemHoverChange?.(Q.item,me,true,he),"onMouseEnter"),onMouseLeave:r(he=>a?.onItemHoverChange?.(Q.item,me,false,he),"onMouseLeave"),onKeyDown:Be,onDragStart:r(he=>a?.onItemDragStart?.(Q.item,me,he),"onDragStart"),onDragOver:a?.onItemDrop?he=>he.preventDefault():void 0,onDrop:r(he=>a?.onItemDrop?.(Q.item,me,he),"onDrop")}},[a,i?.item,f,t.appearance,t.item?.title?.visibility,W]),ce=st.useCallback((Q,me)=>{let Be=o(Q.item,me),he=t.item?.title,ee=he?.visibility??"always",Te=he&&ee!=="never"?he.getContent?.(Q.item,me)??me.renderSlot("title"):null,Ke=!!(he&&A(Te)),Ze=he?.placement??"below",kt=Ke&&Ze.startsWith("overlay-"),Yn=Gh(he?.maxLines),Xr=he?.surface??(kt?"scrim":"none"),Il=Ke?jsxRuntime.jsx("div",{"data-collection-item-title":"","data-title-placement":Ze,"data-title-visibility":ee,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",ee==="hover"&&"!opacity-0 transition-opacity group-hover/workbench-collection-item:!opacity-100 group-focus-within/workbench-collection-item:!opacity-100",kt&&"pointer-events-none absolute inset-x-0 z-10 px-3 py-2",Ze==="overlay-top"&&"top-0",Ze==="overlay-center"&&"top-1/2 -translate-y-1/2 motion-reduce:transform-none",Ze==="overlay-bottom"&&"bottom-0",Xr==="surface"&&"bg-background/90 backdrop-blur-sm",Xr==="scrim"&&Ze==="overlay-top"&&"bg-gradient-to-b from-background/90 to-transparent pb-8",Xr==="scrim"&&Ze==="overlay-bottom"&&"bg-gradient-to-t from-background/90 to-transparent pt-8",Xr==="scrim"&&Ze==="overlay-center"&&"bg-background/75 backdrop-blur-sm",!!Yn&&"overflow-hidden [display:-webkit-box] [-webkit-box-orient:vertical]",i?.itemTitle),style:Yn?{WebkitLineClamp:Yn}:void 0,children:Te}):null,Yt=t.item?.actions,Ii=Yt?.visibility??"always",Ml=Yt&&Ii!=="never"?me.renderSlot("actions"):null,Mi=!!(Yt&&A(Ml)),wn=Yt?.placement??"overlay-bottom",Bi=Mi&&wn.startsWith("overlay-"),Bl=Mi?jsxRuntime.jsx("div",{"data-collection-item-actions":"","data-actions-placement":wn,"data-actions-align":Yt?.align??"center","data-actions-visibility":Ii,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",Ii==="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",Bi&&"pointer-events-none absolute inset-x-0 z-20",wn==="overlay-top"&&"top-1",wn==="overlay-bottom"&&"bottom-1",i?.itemActions),children:jsxRuntime.jsx("div",{className:l("pointer-events-auto flex items-center gap-2",Yt?.wrap!==false&&"flex-wrap"),children:Ml})}):null;return !Ke&&!Mi?Be:jsxRuntime.jsxs("div",{className:l("min-w-0",(kt||Bi)&&"relative",i?.itemContent),"data-collection-item-content":"",children:[Ze==="above"?Il:null,wn==="above"?Bl:null,Be,Ze==="below"||kt?Il:null,wn==="below"||Bi?Bl:null]})},[i?.itemActions,i?.itemContent,i?.itemTitle,t.item,o]),ke=st.useCallback((Q,me,Be=true)=>{let he=se(Q,me),ee=ce(Q,he);return Be?jsxRuntime.jsx("div",{...Y(Q,he),children:ee}):ee},[se,Y,ce]),we=st.useMemo(()=>({mode:N,columnCount:ye,columnWidth:xe,containerWidth:F,gap:D,placementStrategy:oe,rowHeight:M}),[ye,xe,F,D,N,oe,M]),Me=r(Q=>{if(t.windowed&&N!=="dense"){let ee=Q===X[X.length-1];return jsxRuntime.jsx(Xc,{items:Q.items,getKey:Te=>Te.stringKey,layout:we,cardWidth:zn(t.layout.cardWidth,ri,b.current),getScrollOwner:We,railRef:N==="rail"&&ee?h:void 0,tailRef:N==="rail"&&ee?v:void 0,estimateHeight:(Te,Ke)=>{let Ze=t.layout.getItemSize?.(Te.item,{...we,columnWidth:Ke}),kt=t.layout.getItemAspectRatio?.(Te.item,Te.index);return zn(Ze?.height,kt&&kt>0?Ke/kt:300,b.current)},containerProps:{role:W==="none"?"list":"listbox","aria-label":c??le.collection,"aria-multiselectable":W==="multiple"||void 0,className:i?.layout},getItemProps:(Te,Ke)=>Y(Te,se(Te,Ke)),renderItem:(Te,Ke)=>ke(Te,Ke,false)})}let me=t.virtualization,Be=me?.adapter,he=me?.enabled===true;if(he&&(!Be||Be.supports?.(N)===false)&&me?.fallback==="error")return null;if(he&&Be&&Be.supports?.(N)!==false)return Be.render({items:Q.items.map(({item:ee})=>ee),keys:Q.items.map(({key:ee})=>ee),layout:t.layout,scrollOwner:We(),renderItem:r((ee,Te,Ke)=>{let Ze=Q.items[Te];return Ze?jsxRuntime.jsx(st.Fragment,{children:ke(Ze,Ke)},Ze.stringKey):null},"renderItem")});if(N==="masonry"||N==="dense")return jsxRuntime.jsx(Ar,{items:Q.items,columnCount:ye,columnWidth:t.layout.cardWidth??t.layout.columnWidth??t.layout.idealCardWidth,gap:D,rowHeight:M,placementStrategy:N==="dense"?"dense":oe,className:i?.layout,containerProps:{role:W==="none"?"list":"listbox","aria-label":c??le.collection,"aria-multiselectable":W==="multiple"||void 0},getItemProps:(ee,Te)=>{let Ke=se(ee,{...Te,mode:N});return Y(ee,Ke)},getItemKey:ee=>ee.key,getItemSize:(ee,Te)=>{let Ke={...Te,mode:N},Ze=t.layout.getItemSize?.(ee.item,Ke),kt=t.layout.getItemAspectRatio?.(ee.item,ee.index);return Oh(Ze,kt,Te.columnWidth)},renderItem:(ee,Te)=>ke(ee,{...Te,mode:N},false)});if(N==="rail"){let ee=t.layout.cardWidth??t.layout.idealCardWidth??ri,Te=Q===X[X.length-1];return jsxRuntime.jsx("div",{ref:Te?h:void 0,role:W==="none"?"list":"listbox","aria-label":c??le.collection,"aria-multiselectable":W==="multiple"||void 0,className:l("grid min-w-0 grid-flow-col items-start overflow-x-auto",i?.layout),style:{gap:D,gridAutoColumns:typeof ee=="number"?`${ee}px`:ee},children:Q.items.map((Ke,Ze)=>jsxRuntime.jsx("div",{ref:Te&&Ze===Q.items.length-1?v:void 0,className:"min-w-0",children:ke(Ke,we)},Ke.stringKey))})}return jsxRuntime.jsx("div",{role:W==="none"?"list":"listbox","aria-label":c??le.collection,"aria-multiselectable":W==="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(ee=>{let Te=t.layout.getItemSize?.(ee.item,we),Ke=ai(Math.round(Number(Te?.columnSpan)||1),1,ye),Ze=t.layout.getItemAspectRatio?.(ee.item,ee.index);return jsxRuntime.jsx("div",{...Y(ee,se(ee,{...we,columnSpan:Ke,size:Te})),style:{gridColumn:Ke>1?`span ${Ke}`:void 0,aspectRatio:Number.isFinite(Ze)&&Number(Ze)>0?String(Ze):void 0},children:ke(ee,{...we,columnSpan:Ke,size:Te},false)},ee.stringKey)})})},"renderGroupItems"),Pe={items:e,error:q,loading:U,loadingMore:Z,selectedKeys:ne,retry:r(()=>a?.onRetry?.(),"retry")},Ve=oo(n?.header,Pe),Xe=oo(n?.toolbar,Pe),Oe=ne.size>0?oo(n?.selectionToolbar,Pe):null,pt=oo(n?.beforeItems,Pe),Ae=oo(n?.footer,Pe),Le=te?.permission===true,re=te?.offline===true&&!Le,Ce=U&&e.length===0&&!Le&&!re,Fe=!!q&&e.length===0&&!Le&&!re&&!Ce,qe=!Le&&!re&&!Ce&&!Fe&&(te?.empty===true||e.length===0),nt=oo(n?.loading,Pe),gt=oo(n?.error,Pe),Bt=oo(n?.permission,Pe),_e=oo(n?.offline,Pe),zt=oo(n?.empty,Pe),Ot=oo(n?.loadMore,Pe),ge=t.layout.scrollOwner==="self"||t.layout.scrollOwner===void 0&&(t.layout.fillHeight||t.layout.maxHeight),He={...m,gap:t.layout.gap===void 0?m?.gap??"var(--monkeys-bento-gap, var(--global-spacing, 0.75rem))":lu(t.layout.gap),padding:t.layout.padding??m?.padding,height:t.layout.fillHeight?"100%":m?.height,maxHeight:t.layout.maxHeight??m?.maxHeight,overflow:ge?"auto":m?.overflow};return jsxRuntime.jsxs("section",{ref:b,...d,"data-monkeys-component":"workbench-collection","data-layout-mode":N,"data-density":t.appearance?.density,"data-radius":t.appearance?.radius,"data-media-fit":t.appearance?.mediaFit,"data-hover-effect":t.appearance?.hover,"aria-label":c??le.collection,"aria-busy":U||Z||void 0,className:l("min-h-0 min-w-0",t.layout.fillHeight&&"h-full",i?.root,s),style:He,children:[A(Ve)?jsxRuntime.jsx("div",{className:i?.header,children:Ve}):null,A(Xe)?jsxRuntime.jsx("div",{className:i?.toolbar,children:Xe}):null,A(Oe)?jsxRuntime.jsx("div",{className:i?.selectionToolbar,children:Oe}):null,A(pt)?jsxRuntime.jsx("div",{className:i?.beforeItems,children:pt}):null,Le?A(Bt)?Bt:jsxRuntime.jsx(pr,{kind:"permission",title:le.permission,actions:u.permission?.showRequestAccess!==false&&a?.onRequestAccess?jsxRuntime.jsx(ve,{size:"sm",label:le.requestAccess,onClick:a.onRequestAccess}):void 0}):re?A(_e)?_e:jsxRuntime.jsx(pr,{kind:"offline",title:le.offline,actions:u.error?.showRetry!==false&&a?.onRetry?jsxRuntime.jsx(ve,{size:"sm",label:le.retry,onClick:a.onRetry}):void 0}):Ce?A(nt)?nt:ie==="spinner"?jsxRuntime.jsx(jo,{title:le.loading,variant:"spinner"}):jsxRuntime.jsx("div",{ref:$,className:l("min-w-0",i?.items),children:jsxRuntime.jsx(js,{mode:N,phase:"initial",columnCount:ye,columnWidth:xe,cardWidth:t.layout.cardWidth??t.layout.idealCardWidth,gap:D,rowHeight:M,config:t.loading?.skeleton,ariaLabel:le.loading,className:i?.layout})}):Fe?A(gt)?gt:jsxRuntime.jsx(pr,{kind:"error",title:le.loadError,actions:u.error?.showRetry!==false&&a?.onRetry?jsxRuntime.jsx(ve,{size:"sm",label:le.retry,onClick:a.onRetry}):void 0}):qe?A(zt)?zt:jsxRuntime.jsx(fa,{title:le.empty}):jsxRuntime.jsx("div",{ref:$,className:l("min-w-0",i?.items),children:X.map((Q,me)=>{let Be={key:Q.key,label:Q.label,items:Q.items.map(({item:Te})=>Te),groupIndex:me},he=t.grouping?n?.groupHeading?.(Be,Pe)??Q.label:null,ee=`${f}-group-${me}`;return jsxRuntime.jsxs("div",{"data-collection-group":Q.stringKey,className:i?.group,children:[A(he)?jsxRuntime.jsx("div",{id:ee,role:"heading","aria-level":2,className:i?.groupHeading,children:he}):null,Me(Q)]},Q.stringKey)})}),e.length>0&&q?jsxRuntime.jsx("div",{className:i?.status,children:A(gt)?gt:jsxRuntime.jsx(pr,{kind:"error",title:le.refreshError,actions:u.error?.showRetry!==false&&a?.onRetry?jsxRuntime.jsx(ve,{size:"sm",label:le.retry,onClick:a.onRetry}):void 0})}):null,e.length>0&&(ae||Z)?jsxRuntime.jsx("div",{ref:N==="rail"?void 0:v,className:i?.loadMore,"data-collection-load-more":"",children:A(Ot)?Ot:Z?ie==="spinner"?jsxRuntime.jsx(jo,{title:le.loadingMore,variant:"spinner"}):jsxRuntime.jsx(js,{mode:N,phase:"load-more",columnCount:ye,columnWidth:xe,cardWidth:t.layout.cardWidth??t.layout.idealCardWidth,gap:D,rowHeight:M,config:t.loading?.skeleton,ariaLabel:le.loadingMore,className:i?.layout}):null}):null,A(Ae)?jsxRuntime.jsx("div",{className:i?.footer,children:Ae}):null]})}r(Xo,"WorkbenchCollection");function $h(e){if(typeof e=="number"&&Number.isFinite(e)&&e>0)return `${e}px`;if(typeof e=="string"&&e.trim())return e.trim()}r($h,"getNormalizedGalleryGridCardWidth");function Kh(e){return e==="compact"?2:e==="detailed"?6:4}r(Kh,"getDefaultGalleryDetailLimit");function Uh(e,t){return e===1||e===2||e===3?Number(e):t==="detailed"?1:2}r(Uh,"getNormalizedGalleryBentoColumns");function qh({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:Kh(e)}r(qh,"getNormalizedGalleryDetailLimit");function uu(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(uu,"getGalleryCardWidthMetrics");function Yh(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(Yh,"getNormalizedGalleryGridColumns");function mu(e){if(e==null)return 0;let t=String(e).trim();return t&&t!=="\u2014"?t.length:0}r(mu,"getGalleryTextLength");function zr({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(zr,"getGalleryFieldText");function Zs({text:e,charsPerLine:t,maxLines:o}){let n=mu(e);return n?Math.max(1,Math.min(o,Math.ceil(n/t))):0}r(Zs,"estimateLineCount");function Jh({text:e,density:t,bentoColumns:o}){let n=t==="detailed"?54:t==="compact"?44:48,i=Zs({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(Jh,"estimateGalleryDetailCellHeight");function Xh({columns:e,density:t,bentoColumns:o}){if(!e.length)return 0;let n=e.map(s=>Jh({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(Xh,"estimateGalleryDetailGridHeight");function Zh({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:w,resolveRecordVisual:x}){let k=t.find(W=>W.renderType==="icon"),C=k&&x?x(e?.[k.key],e,k):null,T=(o!=="auto"?t.find(W=>W.key===o&&c(W,e)):null)||t.find(W=>c(W,e))||null,E=T?m(T,e):null,R=T?p(T,E):false,F=T?f(T,E):false,z=!!y||!!C,O=t.filter(W=>W.key!==T?.key&&W.renderType!=="icon"),I=O.filter(W=>{if(!W||c(W,e)||!d(W,e))return false;let pe=m(W,e);return !(pe==null||pe==="")})[0]||null,V=I?zr({column:I,row:e,getFieldValue:m,getDisplayText:u}):String(u(e?.linkKey||e?.id||"")),$=O.find(W=>!W||W.key===I?.key||c(W,e)||!g(W,e)?false:zr({column:W,row:e,getFieldValue:m,getDisplayText:u}).length>12)||O.find(W=>!W||W.key===I?.key||c(W,e)||!g(W,e)?false:mu(zr({column:W,row:e,getFieldValue:m,getDisplayText:u}))>0)||null,N=$?zr({column:$,row:e,getFieldValue:m,getDisplayText:u}):"",D=new Set(v),M=O.filter(W=>W.key!==I?.key&&W.key!==$?.key&&!D.has(W.key)).map(W=>({column:W,text:zr({column:W,row:e,getFieldValue:m,getDisplayText:u})})),K=qh({density:n,visibility:s,limit:i}),J=Number.isFinite(K)?M.slice(0,K):M,G=Math.max(M.length-J.length,0),te=Uh(a,n),U=w?.columnWidth||uu(n).ideal;if(b==="image-only")return {width:U,height:Math.round(U*1.25)};if(b==="preview-only")return {width:U,height:Math.round(U*.82)};let Z=n==="detailed"?84:n==="compact"?64:72;typeof h=="function"?Z+=n==="detailed"?188:n==="compact"?140:164:R?Z+=Math.round(U*(n==="detailed"?.72:.62))+12:F&&(Z+=92);let ae=Zs({text:V,charsPerLine:n==="detailed"?26:24,maxLines:2})||1,ie=Zs({text:N,charsPerLine:z?22:n==="detailed"?30:26,maxLines:n==="detailed"?4:2}),de=26+ae*18+(ie>0?ie*16+4:0);return Z+=Math.max(z?56:0,de),Z+=Xh({columns:J,density:n,bentoColumns:te}),G>0&&(Z+=18),!N&&J.length===0&&(Z+=24),{width:U,height:Z}}r(Zh,"getDefaultGalleryMasonryItemSize");function Qh({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:w,galleryGridCardWidth:x,galleryUnderfilledBehavior:k,galleryMasonryColumnWidth:C,masonryPlacementStrategy:S,pagination:T,onLoadMore:E,scrollOwner:R,windowed:F,galleryFieldKey:_="auto",galleryDensity:z="comfortable",galleryBentoColumns:O=2,galleryDetailVisibility:j="limit",galleryDetailLimit:I,shouldEnhanceMultimodal:V=true,getFieldValue:$,isMediaColumn:N,isTitleCandidate:D,isSummaryCandidate:M,getDisplayText:K,renderFieldValue:J,getImagePreviewSrc:G,isImageField:te,isAudioField:U,AudioPlayerComponent:Z,cardVariant:ae="default",cardPresentation:ie,renderCardSlot:de,renderCoverTitle:W,galleryDetailPresentation:pe,renderPreview:B,renderMeta:H,renderLeadingVisual:ne,resolveRecordVisual:fe,hiddenDetailFieldKeys:ye=[],labels:xe,formatLabel:oe,getMasonryItemSize:le}){let{min:Re,ideal:Ie,max:We}=y??uu(z),ue=u||Re,q=Yh(b),L=$h(x),X=C||Re,se=g==="rail",Y=$||Wn,ce=K||Dr,ke=te||Wr,we=U||Lr,Me=N||((Ae,Le)=>qa(Ae,Le,{getFieldValue:Y,shouldEnhanceMultimodal:V,isImageField:ke,isAudioField:we})),Pe=D||((Ae,Le)=>Ya(Ae,Le,{isMediaColumn:Me})),Ve=M||((Ae,Le)=>Ja(Ae,Le,{isMediaColumn:Me})),Xe=J||((Ae,Le,{compact:re}={})=>jsxRuntime.jsx("span",{children:ce(Y(Ae,Le))})),Oe=r((Ae,Le)=>jsxRuntime.jsx(Fs,{row:Ae,columns:o,cardInteraction:a,onClick:n?()=>n(Ae,Le):void 0,isSelected:m?m.has(String(Ae?.linkKey||Ae?.id||"")):String(Ae?.linkKey||Ae?.id||"")===String(i||s||""),isMasonry:d,galleryFieldKey:_,galleryDensity:z,galleryBentoColumns:O,galleryDetailVisibility:j,galleryDetailLimit:I,galleryDetailPresentation:pe,shouldEnhanceMultimodal:V,getFieldValue:Y,isMediaColumn:Me,isTitleCandidate:Pe,isSummaryCandidate:Ve,getDisplayText:ce,renderFieldValue:Xe,getImagePreviewSrc:G,isImageField:ke,isAudioField:we,AudioPlayerComponent:Z,cardVariant:ae,cardPresentation:ie,renderCardSlot:de,renderCoverTitle:W,renderPreview:B,renderMeta:H,renderLeadingVisual:ne,resolveRecordVisual:fe,hiddenDetailFieldKeys:ye,labels:xe,formatLabel:oe},Ae?.id||Ae?.linkKey||Le),"renderGalleryCard"),pt=d?S==="dense"?"dense":"masonry":se?"rail":"grid";if(Yc(pt,f),t!==void 0){let Ae=st.Children.toArray(t);return jsxRuntime.jsx(Xo,{items:Ae,callbacks:{onLoadMore:E},slots:{loadMore:T?.loadingMore?jsxRuntime.jsx(jo,{variant:"spinner",className:"py-global",style:{minHeight:0}}):void 0},classNames:{layout:c},config:{windowed:F,state:T,loading:{autoFill:true},getItemKey:r((Le,re)=>st.isValidElement(Le)&&Le.key!=null?Le.key:re,"getItemKey"),layout:{mode:pt,scrollOwner:R??"parent",gap:p,columns:h??(q?{mobile:1,tablet:Math.min(2,q),desktop:q}:"auto"),underfilledBehavior:k,cardWidth:se?ue:void 0,minCardWidth:L??Re,idealCardWidth:L??Ie,maxCardWidth:L??We}},renderItem:Le=>Le})}return jsxRuntime.jsx(Xo,{items:e,slots:{loadMore:T?.loadingMore?jsxRuntime.jsx(jo,{variant:"spinner",className:"py-global",style:{minHeight:0}}):void 0},callbacks:{onLoadMore:E,onItemClick:a==="container"&&n?(Ae,Le)=>n(Ae,Le.index):void 0},classNames:{layout:c},config:{windowed:F,state:T,loading:{autoFill:true},getItemKey:r((Ae,Le)=>Ae?.id||Ae?.linkKey||Le,"getItemKey"),layout:{mode:pt,underfilledBehavior:k,scrollOwner:R,gap:p,columns:h??(q?{mobile:1,tablet:Math.min(2,q),desktop:q}:"auto"),cardWidth:se?ue:void 0,minCardWidth:L??Re,idealCardWidth:d?X:L??Ie,maxCardWidth:L??We,placementStrategy:S??(ae==="image-only"?"shortest":"shelf"),getItemAspectRatio:ae==="image-only"?Ae=>{let Le=o.find(nt=>nt.key===_)??o.find(nt=>Me(nt,Ae)),re=Le?Y(Le,Ae):void 0,Ce=re&&typeof re=="object"&&"aspectRatio"in re?re.aspectRatio:void 0;if(typeof Ce!="string"||!/^\d+(?:\.\d+)?:\d+(?:\.\d+)?$/.test(Ce))return;let[Fe,qe]=Ce.split(":").map(Number);return Fe>0&&qe>0?Fe/qe:void 0}:void 0,getItemSize:ae==="image-only"&&v&&v>0?(Ae,Le)=>({height:Math.max(w??0,Le.columnWidth/v)}):d?(Ae,Le)=>{let re=Zh({row:Ae,columns:o,galleryFieldKey:_,galleryDensity:z,galleryBentoColumns:O,galleryDetailVisibility:j,galleryDetailLimit:I,getFieldValue:Y,isMediaColumn:Me,isTitleCandidate:Pe,isSummaryCandidate:Ve,getDisplayText:ce,isImageField:ke,isAudioField:we,cardVariant:ae,renderPreview:B,renderLeadingVisual:ne,hiddenDetailFieldKeys:ye,layout:Le,resolveRecordVisual:fe});if(typeof le!="function")return re;let Ce=le(Ae,{...Le,placementStrategy:Le.placementStrategy==="dense"?"dense":"shelf",defaultSize:re})||{};return {...re,...Ce}}:void 0}},renderItem:(Ae,Le)=>Oe(Ae,Le.index)})}r(Qh,"WorkbenchGalleryView");function ex({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&&(A(i)||A(m)||A(b)||A(c)||A(d)),w=e==="horizontal"&&A(g)&&v,x=n==="fill",k=A(f),C=w&&k,S=A(p)?jsxRuntime.jsx("div",{"data-record-part":"aside",className:"flex min-h-0 shrink-0 gap-global",children:p}):null;return jsxRuntime.jsxs("article",{...y,"data-monkeys-component":"record-view","data-record-layout":e,"data-record-sizing":n,className:l("@container flex min-h-0 min-w-0 flex-col gap-global font-[family-name:var(--font-sans)] text-sm leading-5 text-foreground",x&&"h-full",h),children:[A(u)&&jsxRuntime.jsx("div",{"data-record-part":"toolbar",className:"flex shrink-0 flex-wrap items-center gap-global",children:u}),jsxRuntime.jsxs("div",{className:l("flex min-h-0 min-w-0 gap-global",x&&"flex-1"),children:[a==="start"&&S,jsxRuntime.jsxs("div",{"data-record-part":"body",className:l("grid min-h-0 min-w-0 flex-1 grid-cols-1 gap-global",C?"@[48rem]:grid-cols-[minmax(0,2fr)_minmax(0,1fr)_minmax(0,1fr)]":w&&(o==="balanced"?"@[48rem]:grid-cols-2":t==="start"?"@[48rem]:grid-cols-[minmax(0,1fr)_minmax(16rem,24rem)]":"@[48rem]:grid-cols-[minmax(16rem,24rem)_minmax(0,1fr)]"),x&&"overflow-auto @[48rem]:overflow-hidden"),children:[A(g)&&jsxRuntime.jsx("div",{"data-record-part":"media",className:l("min-h-0 min-w-0",t==="end"&&w&&"@[48rem]:order-2",x&&"flex flex-col"),children:g}),v&&jsxRuntime.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:[A(i)&&jsxRuntime.jsx("div",{className:"mb-global flex flex-wrap items-center gap-global",children:i}),A(m)&&jsxRuntime.jsx("div",{className:"mb-global flex flex-wrap items-center gap-global text-sm tabular-nums text-muted-foreground [&_span]:text-inherit [&_time]:text-inherit",children:m}),b,A(c)&&jsxRuntime.jsx("div",{className:"mt-global break-words text-sm text-destructive-text",children:c}),A(d)&&jsxRuntime.jsx("div",{className:"mt-auto flex shrink-0 flex-wrap gap-global pt-global",children:d})]}),k&&jsxRuntime.jsx("div",{"data-record-part":"secondary",className:l("flex min-h-0 min-w-0 flex-col [&>section]:flex-1",x&&"@[48rem]:overflow-auto"),children:f})]}),a==="end"&&S]})]})}r(ex,"RecordView");var tx=[{id:"primary",layout:"rail",filterCount:2,cardCount:4,aspectRatios:[16/11]},{id:"secondary",layout:"grid",filterCount:3,cardCount:5,aspectRatios:[4/5,1,3/4,5/4,1]}];function pu(e,t,o){return typeof e!="number"||!Number.isFinite(e)||e<0?t:Math.min(Math.round(e),o)}r(pu,"normalizeCount");function ox(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?1:Math.min(Math.max(e,.5),2)}r(ox,"normalizeAspectRatio");function nx({animated:e,filterCount:t}){return jsxRuntime.jsxs("div",{className:"flex min-h-10 flex-wrap items-center justify-between gap-4",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(Dt,{variant:"line",animated:e,className:"h-6 w-36 rounded-md"}),jsxRuntime.jsx(Dt,{variant:"line",animated:e,className:"h-3 w-12"})]}),jsxRuntime.jsx("div",{className:"flex flex-wrap justify-end gap-2",children:Array.from({length:t},(o,n)=>jsxRuntime.jsx(Dt,{variant:"block",animated:e,className:"h-9 w-28 rounded-lg"},n))})]})}r(nx,"WorkbenchGallerySkeletonHeading");function rx({sections:e=tx,animated:t=true,animation:o,className:n,...a}){return jsxRuntime.jsx(Ho,{animation:o,animated:t,children:jsxRuntime.jsx("div",{...a,role:"status","aria-busy":"true","aria-label":"Loading gallery","data-monkeys-component":"workbench-gallery-skeleton",className:l("grid w-full gap-4",n),children:e.map((s,i)=>{let m=s.layout??"grid",c=pu(s.filterCount,2,8),d=pu(s.cardCount,m==="rail"?4:5,24),g=s.aspectRatios?.length?s.aspectRatios:[m==="rail"?16/11:1];return jsxRuntime.jsx(Tn,{index:i,children:jsxRuntime.jsxs("section",{className:"grid gap-4","data-skeleton-section":s.id,children:[jsxRuntime.jsx(nx,{animated:t,filterCount:c}),jsxRuntime.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)=>jsxRuntime.jsx("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:jsxRuntime.jsx(Dt,{variant:"block",animated:t,className:"h-auto w-full rounded-none",style:{aspectRatio:String(ox(g[p%g.length]))}})},p))})]})},s.id||i)})})})}r(rx,"WorkbenchGallerySkeleton");function ax({animated:e=true,animation:t,className:o,"aria-label":n,...a}){let s=xt().loading.spinner,i=r(m=>jsxRuntime.jsx(Dt,{variant:"block",animated:e,className:m}),"skeleton");return jsxRuntime.jsx(Ho,{animation:t,animated:e,children:jsxRuntime.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:[jsxRuntime.jsxs("div",{className:"flex h-10 shrink-0 items-center justify-between gap-4 rounded-lg border border-border bg-card px-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[i("h-5 w-20"),i("h-5 w-16"),i("h-5 w-24")]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[i("h-7 w-20"),i("size-7")]})]}),jsxRuntime.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")]}),jsxRuntime.jsxs("div",{className:"grid min-h-0 flex-1 grid-cols-1 gap-4 lg:grid-cols-[minmax(0,2fr)_minmax(14rem,1fr)]",children:[jsxRuntime.jsxs("div",{className:"flex min-h-0 flex-col gap-4 rounded-lg border border-border bg-card p-4",children:[i("h-6 w-40"),jsxRuntime.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:6},(m,c)=>jsxRuntime.jsx(Tn,{index:c,children:jsxRuntime.jsxs("div",{className:"space-y-2",children:[i("h-4 w-20"),i("h-9 w-full")]})},c))}),i("min-h-32 flex-1")]}),jsxRuntime.jsxs("div",{className:"flex min-h-40 flex-col gap-4 rounded-lg border border-border bg-card p-4",children:[i("h-6 w-28"),i("min-h-28 flex-1"),i("h-9 w-full")]})]})]})})}r(ax,"WorkbenchPageSkeleton");function gu(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r(gu,"toCssSize");function gx(e,t){return String(e?.id??e?.key??t)}r(gx,"defaultGetRowId");function bx(e){return String(e?.columnId??e?.status??"")}r(bx,"defaultGetColumnId");function fx(e){let t=e?.title??e?.name??e?.id??"Untitled";return jsxRuntime.jsx("div",{className:"rounded-lg border border-border/70 bg-card px-3 py-2 text-sm text-foreground shadow-sm",children:String(t)})}r(fx,"defaultRenderCard");function yx({row:e,rowId:t,rowIndex:o,column:n,classNames:a,renderCard:s}){let{attributes:i,listeners:m,setNodeRef:c,isDragging:d}=core.useDraggable({id:t});return jsxRuntime.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(yx,"WorkbenchLaneDraggableCard");function hx({column:e,columnRows:t,columnWidth:o,columnMinHeight:n,emptyColumn:a,classNames:s,renderCard:i}){let{setNodeRef:m,isOver:c}=core.useDroppable({id:e.id});return jsxRuntime.jsxs("section",{className:l("flex shrink-0 flex-col rounded-xl border border-border/60 bg-card p-2 shadow-sm",s?.column,e.className),style:{width:gu(o)??"280px"},children:[jsxRuntime.jsxs("div",{className:l("flex h-10 items-center gap-2 px-1",s?.columnHeader,e.headerClassName),children:[e.icon?jsxRuntime.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,jsxRuntime.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}),jsxRuntime.jsx("span",{className:l("text-xs text-muted-foreground",s?.columnCount),children:t.length})]}),jsxRuntime.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:gu(n)},children:t.length?t.map(({row:d,rowIndex:g,rowId:u})=>jsxRuntime.jsx(yx,{row:d,rowId:u,rowIndex:g,column:e,classNames:s,renderCard:i},u)):a?jsxRuntime.jsx("div",{className:l("flex min-h-24 items-center justify-center rounded-lg border border-dashed border-border/60 px-3 py-4 text-xs text-muted-foreground",s?.emptyColumn),children:a}):null})]})}r(hx,"WorkbenchLaneColumnView");function xx({rows:e=[],columns:t=[],getRowId:o=gx,getColumnId:n=bx,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??((_,z)=>m?jsxRuntime.jsx(ve,{className:"w-full justify-start whitespace-normal text-left",onClick:()=>m({rowId:o(_,z.rowIndex)}),children:String(_?.title??_?.name??o(_,z.rowIndex))}):fx(_)),[y,v]=st.useState(null),w=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:d}})),x=st.useMemo(()=>new Map(t.map(_=>[_.id,_])),[t]),k=st.useMemo(()=>e.map((_,z)=>({row:_,rowIndex:z,rowId:o(_,z),columnId:n(_,z)})),[n,o,e]),C=y?k.find(_=>_.rowId===y):void 0,S=st.useMemo(()=>{let _=new Map;return t.forEach(z=>_.set(z.id,[])),k.forEach(({row:z,rowIndex:O,rowId:j,columnId:I})=>{_.get(I)?.push({row:z,rowIndex:O,rowId:j});}),_},[t,k]),T=C?x.get(C.columnId):void 0,E=st.useCallback(_=>{v(String(_.active.id));},[]),R=st.useCallback(_=>{v(null);let z=String(_.active.id),O=String(_.over?.id??""),j=k.find(I=>I.rowId===z);!j||!x.has(O)||j.columnId===O||i?.(z,O,j.row);},[x,i,k]),F=st.useCallback(()=>{v(null);},[]);return jsxRuntime.jsxs(core.DndContext,{sensors:w,onDragStart:E,onDragEnd:R,onDragCancel:F,children:[jsxRuntime.jsx("div",{className:l("flex min-h-0 flex-1 gap-4 overflow-x-auto p-4 [scrollbar-width:thin]",f?.root,p),style:b,children:t.map(_=>jsxRuntime.jsx(hx,{column:_,columnRows:S.get(_.id)||[],columnWidth:g,columnMinHeight:u,emptyColumn:c,classNames:f,renderCard:h},_.id))}),jsxRuntime.jsx(core.DragOverlay,{children:C&&T?jsxRuntime.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(xx,"WorkbenchLaneView");var bu=r(e=>{if(Number.isFinite(e))return Math.min(1,Math.max(0,Number(e)))},"normalizeProgress");function vx({items:e,summary:t,variant:o="bars",density:n="comfortable",emptyState:a=null,ariaLabel:s="Metrics",className:i,itemClassName:m}){if(!e.length)return A(a)?jsxRuntime.jsx(jsxRuntime.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=bu(u.progress);return f===void 0?void 0:c(p,f*100)}),g=d.every(Boolean);return jsxRuntime.jsxs("figure",{"aria-label":s,"data-monkeys-component":"workbench-metric-grid","data-metric-variant":"radar",className:l("m-0 min-w-0",i),children:[jsxRuntime.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=>jsxRuntime.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 jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:"180",y1:"160",x2:f[0],y2:f[1],stroke:"hsl(var(--border))"}),typeof u.label=="string"||typeof u.label=="number"?jsxRuntime.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"?jsxRuntime.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?jsxRuntime.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?jsxRuntime.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?jsxRuntime.jsx("circle",{cx:u[0],cy:u[1],r:"3",fill:"hsl(var(--primary))"},e[p].id):null),t?jsxRuntime.jsxs("g",{"data-metric-radar-summary":"true",textAnchor:"middle",paintOrder:"stroke",stroke:"hsl(var(--card))",strokeWidth:"3",strokeLinejoin:"round",children:[jsxRuntime.jsx("text",{x:"180",y:"149",fontSize:"12",fill:"hsl(var(--muted-foreground))",children:t.label}),jsxRuntime.jsx("text",{x:"180",y:"174",fontSize:"23",fontWeight:"700",fill:"hsl(var(--foreground))",children:t.value})]}):null]}),jsxRuntime.jsx("dl",{className:"sr-only",children:e.map(u=>jsxRuntime.jsxs("div",{className:l("flex min-w-0 justify-between gap-2",m),children:[jsxRuntime.jsx("dt",{className:"truncate text-muted-foreground",children:u.label}),jsxRuntime.jsx("dd",{className:"font-semibold tabular-nums",children:u.value})]},u.id))})]})}return o==="list"?jsxRuntime.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=>jsxRuntime.jsxs("div",{className:l("flex min-w-0 items-start justify-between gap-4",n==="compact"?"text-xs":"text-sm",m),children:[jsxRuntime.jsxs("dt",{className:"min-w-0 text-muted-foreground",children:[jsxRuntime.jsx("span",{className:"block truncate",children:c.label}),A(c.description)?jsxRuntime.jsx("span",{className:"mt-0.5 block text-xs leading-4 text-muted-foreground/80",children:c.description}):null]}),jsxRuntime.jsx("dd",{className:"shrink-0 font-semibold tabular-nums text-foreground",children:c.value})]},c.id))}):o==="cards"?jsxRuntime.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=>jsxRuntime.jsxs("div",{className:l("min-w-0 rounded-lg border border-border/70 bg-card text-card-foreground",n==="compact"?"p-3":"p-4",m),children:[jsxRuntime.jsx("dt",{className:"truncate text-xs font-medium text-muted-foreground",children:c.label}),jsxRuntime.jsx("dd",{className:l("font-semibold tabular-nums text-foreground",n==="compact"?"mt-1.5 text-xl":"mt-2 text-2xl"),children:c.value}),A(c.description)?jsxRuntime.jsx("div",{className:"mt-2 text-xs leading-5 text-muted-foreground",children:c.description}):null]},c.id))}):jsxRuntime.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=bu(c.progress);return jsxRuntime.jsxs("div",{className:l("min-w-0",m),children:[jsxRuntime.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:jsxRuntime.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)}%`}})}),jsxRuntime.jsxs("div",{className:"mt-1.5 flex min-w-0 items-baseline justify-between gap-2",children:[jsxRuntime.jsx("dt",{className:"truncate text-xs text-muted-foreground",children:c.label}),jsxRuntime.jsx("dd",{className:"shrink-0 text-xs font-semibold tabular-nums text-foreground",children:c.value})]})]},c.id)})})}r(vx,"WorkbenchMetricGrid");var fu=Math.PI*(3-Math.sqrt(5)),yu=r(e=>Array.from(e).reduce((t,o)=>Math.imul(t^o.charCodeAt(0),16777619)>>>0,2166136261),"hash");function li(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 k=n.get(x.sourceId)??[];k.includes(x.targetId)||k.push(x.targetId),n.set(x.sourceId,k),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 k=g[x],C=d.get(k);for(let S of n.get(k)??[])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,k]of d){if(k.depth<2)continue;let C=p.get(k.cluster)??[];C.push(x),p.set(k.cluster,C);}let f=u.map(x=>Math.sqrt([...d.values()].filter(k=>k.branch===x).length+8)),b=f.reduce((x,k)=>x+k,0)||1,h=-Math.PI/2,y=new Map;u.forEach((x,k)=>{let C=Math.PI*2*f[k]/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 k=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,R=T*fu+k.angle;v.set(S,{x:k.x+Math.cos(R)*E,y:k.y+Math.sin(R)*E,z:k.z+Math.sin(R)*2.5});});}let w=e.map(x=>{let k=d.get(x.id),C=k.depth<2?y.get(k.branch):v.get(k.cluster);if(k.depth===0||!C)return {...x,...k,x:0,y:0,z:0};if(k.depth===1)return {...x,...k,x:C.x*.76,y:C.y*.76,z:C.z};let T=p.get(k.cluster).indexOf(x.id),E=k.depth===2?0:1.5+Math.sqrt(T)*.72,R=T*fu+yu(k.cluster)%360*Math.PI/180;return {...x,...k,x:C.x+Math.cos(R)*E,y:C.y+Math.sin(R)*E*.85,z:C.z+Math.sin(R*1.37)*Math.min(E,3.5)}});for(let x=0;x<30;x++)for(let k=0;k<w.length;k++)for(let C=k+1;C<w.length;C++){let S=w[k],T=w[C],E=T.x-S.x,R=T.y-S.y,F=Math.hypot(E,R),_=S.depth<3||T.depth<3?1.4:.85;if(F>=_)continue;let z=yu(S.id+T.id)%360*Math.PI/180,O=F>.001?E/F:Math.cos(z),j=F>.001?R/F:Math.sin(z),I=(_-F)*.25;S.depth>0&&(S.x-=O*I,S.y-=j*I),T.depth>0&&(T.x+=O*I,T.y+=j*I);}if(w.length)for(let x of ["x","y","z"]){let k=(Math.min(...w.map(C=>C[x]))+Math.max(...w.map(C=>C[x])))/2;w.forEach(C=>{C[x]-=k;});}return {points:w,links:i,neighbors:s,root:c}}r(li,"buildRelationshipGalaxyLayout");function xu({nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,ariaLabel:a,className:s}){let i=xt(),m=st.useRef(null),c=st.useRef(new Map),d=st.useRef(o),g=st.useRef(n),[u,p]=st.useState(false),f=JSON.stringify([e,t]),b=st.useMemo(()=>li(e,t),[f]);return d.current=o,g.current=n,st.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(([w,{OrbitControls:x}])=>{if(y)return;let k=[],C=new w.Scene,S=getComputedStyle(h),T=r((oe,le)=>{let Re=document.createElement("span");Re.style.color=`hsl(${S.getPropertyValue(oe).trim()||S.getPropertyValue(le).trim()})`,h.append(Re);let Ie=new w.Color(getComputedStyle(Re).color);return Re.remove(),Ie},"tokenColor"),E=T("--radar-canvas","--background");C.background=E;let R=new w.PerspectiveCamera(48,1,.1,250),F=new w.WebGLRenderer({antialias:true,alpha:false});F.setPixelRatio(Math.min(devicePixelRatio,2)),F.domElement.style.cssText="position:absolute;inset:0;width:100%;height:100%;touch-action:none",F.domElement.setAttribute("aria-hidden","true"),h.prepend(F.domElement);let _=new x(R,F.domElement);_.enableDamping=true,_.dampingFactor=.08,_.rotateSpeed=.45,_.minDistance=8,_.maxDistance=130,_.autoRotate=false;let z=new Map(b.points.map(oe=>[oe.id,new w.Vector3(oe.x,oe.y,oe.z)])),O={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")},j=128,I=new Uint8Array(j*j*4);for(let oe=0;oe<j;oe++)for(let le=0;le<j;le++){let Re=Math.hypot(le+.5-j/2,oe+.5-j/2)/(j/2),Ie=Re<.09?1:Math.exp(-Re*7.5)*.85;I.set([255,255,255,Math.round(Ie*255)],(oe*j+le)*4);}let V=new w.DataTexture(I,j,j,w.RGBAFormat);V.minFilter=V.magFilter=w.LinearFilter,V.needsUpdate=true,k.push(V);let $=b.points.map(oe=>{let le=new w.SpriteMaterial({map:V,color:O[oe.tone??"primary"],transparent:true,blending:w.AdditiveBlending,depthWrite:false}),Re=new w.Sprite(le);return Re.position.copy(z.get(oe.id)),C.add(Re),k.push(le),Re}),N=new w.BufferGeometry;N.setAttribute("position",new w.Float32BufferAttribute(b.links.flatMap(oe=>[...z.get(oe.sourceId).toArray(),...z.get(oe.targetId).toArray()]),3));let D=new Float32Array(b.links.length*6);N.setAttribute("color",new w.BufferAttribute(D,3));let M=new w.LineBasicMaterial({vertexColors:true,transparent:true,opacity:.5,depthWrite:false});C.add(new w.LineSegments(N,M)),k.push(N,M);let K=new Map;b.points.filter(oe=>oe.depth>0).forEach(oe=>{let le=K.get(oe.cluster)??[];le.push(oe),K.set(oe.cluster,le);});for(let oe of K.values()){if(oe.length<3)continue;let le=oe.reduce((We,ue)=>We.add(z.get(ue.id)),new w.Vector3).multiplyScalar(1/oe.length),Re=new w.SpriteMaterial({map:V,color:O[oe[0].tone??"primary"],transparent:true,opacity:.13,blending:w.AdditiveBlending,depthWrite:false}),Ie=new w.Sprite(Re);Ie.position.copy(le),Ie.position.z-=1,Ie.scale.setScalar(8+Math.sqrt(oe.length)*1.2),C.add(Ie),k.push(Re);}let J=Math.max(8,...b.points.map(oe=>Math.abs(oe.x)))+3,G=Math.max(6,...b.points.map(oe=>Math.abs(oe.y)))+3,te=55,U=false,Z=new ResizeObserver(()=>{let{width:oe,height:le}=h.getBoundingClientRect();if(!oe||!le)return;R.aspect=oe/le;let Re=Math.max(G,J/R.aspect)/Math.tan(w.MathUtils.degToRad(R.fov/2))+7;U?R.position.sub(_.target).multiplyScalar(Re/te).add(_.target):(R.position.set(0,0,Re),U=true),te=Re,_.update(),R.updateProjectionMatrix(),F.setSize(oe,le,false);});Z.observe(h);let ae=new w.Vector3,ie=new w.Vector2,de={x:0,y:0},W,pe,B=r(oe=>{let le=F.domElement.getBoundingClientRect();ie.set(oe.clientX-le.left,oe.clientY-le.top);let Re,Ie=12;for(let We of b.points){if(ae.copy(z.get(We.id)).project(R),ae.z<-1||ae.z>1)continue;let ue=Math.hypot((ae.x+1)*le.width/2-ie.x,(-ae.y+1)*le.height/2-ie.y);ue<Ie&&(Ie=ue,Re=We);}return Re},"nodeAt"),H=r(oe=>{de={x:oe.clientX,y:oe.clientY};},"pointerDown"),ne=r(oe=>{W=B(oe)?.id,F.domElement.style.cursor=W?"pointer":"grab";},"pointerMove"),fe=r(()=>{W=void 0;},"pointerLeave"),ye=r(oe=>{if(Math.hypot(oe.clientX-de.x,oe.clientY-de.y)>5)return;let le=B(oe);le&&g.current?.(le);},"pointerUp");F.domElement.addEventListener("pointerdown",H),F.domElement.addEventListener("pointermove",ne),F.domElement.addEventListener("pointerleave",fe),F.domElement.addEventListener("pointerup",ye);let xe=[...b.points].sort((oe,le)=>oe.depth-le.depth||(b.neighbors.get(le.id)?.size??0)-(b.neighbors.get(oe.id)?.size??0));F.setAnimationLoop(()=>{_.update();let oe=d.current,le=oe?b.neighbors.get(oe):void 0;(pe!==oe||!N.userData.initialized)&&(pe=oe,N.userData.initialized=true,b.links.forEach((L,X)=>{let se=L.sourceId===oe||L.targetId===oe,Y=b.points.find(ke=>ke.id===L.targetId),ce=O[Y.tone??"primary"].clone().multiplyScalar(oe?se?1.35:.12:.45);D.set([...ce.toArray(),...ce.toArray()],X*6);}),N.attributes.color.needsUpdate=true),$.forEach((L,X)=>{let se=b.points[X],Y=oe===se.id;L.scale.setScalar((se.depth===0?2.2:se.depth===1?1.8:se.depth===2?1.2:.82)*(Y?1.5:1)),L.material.opacity=!oe||Y||le?.has(se.id)?1:.25;});let Re=h.clientWidth,Ie=h.clientHeight,We=te/R.position.distanceTo(_.target),ue=[],q=[...xe].sort((L,X)=>+(X.id===oe||X.id===W)-+(L.id===oe||L.id===W));for(let L of q){let X=c.current.get(L.id);if(!X)continue;let se=L.id===oe,Y=L.id===W,ce=le?.has(L.id);ae.copy(z.get(L.id)).project(R);let ke=(ae.x+1)*Re/2,we=(-ae.y+1)*Ie/2+10,Me={x:ke-Math.min(L.label.length*13,170)/2,y:we,width:Math.min(L.label.length*13,170),height:21},Pe=ae.z>-1&&ae.z<1&&Me.x>4&&Me.x+Me.width<Re-4&&we>4&&we+21<Ie-4,Ve=se||Y||ce||L.depth<=2||We>1.65,Xe=ue.some(pt=>Me.x<pt.x+pt.width+8&&Me.x+Me.width+8>pt.x&&Me.y<pt.y+pt.height+5&&Me.y+Me.height+5>pt.y),Oe=Pe&&Ve&&(se||Y||!Xe)&&(!oe||se||Y||ce||L.depth<2);X.style.display=Oe?"block":"none",X.tabIndex=Oe?0:-1,X.style.transform=`translate(${ke}px,${we}px) translate(-50%,0)`,X.style.color="#"+O[L.tone??"primary"].clone().lerp(O.primary,.45).getHexString(),X.style.opacity=oe&&!se&&!ce&&!Y?"0.45":"1",X.style.fontWeight=L.depth<2||se?"var(--monkeys-semantic-font-weight-semibold, 600)":"var(--monkeys-semantic-font-weight-normal, 400)",X.style.zIndex=se||Y?"2":"1",Oe&&ue.push(Me);}F.render(C,R);}),v=r(()=>{F.domElement.removeEventListener("pointerdown",H),F.domElement.removeEventListener("pointermove",ne),F.domElement.removeEventListener("pointerleave",fe),F.domElement.removeEventListener("pointerup",ye),Z.disconnect(),F.setAnimationLoop(null),_.dispose(),k.forEach(oe=>oe.dispose()),F.dispose(),F.domElement.remove();},"cleanup");}).catch(()=>{y||p(true);}),()=>{y=true,v();}},[b]),jsxRuntime.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=>jsxRuntime.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&&jsxRuntime.jsx("div",{role:"alert",className:"absolute inset-0 grid place-items-center bg-background text-foreground",children:i.workbench.collection.loadError})]})}r(xu,"RelationshipGalaxy");var Or={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(Or))Object.freeze(e);Object.freeze(Or);var vu={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]},ku=new Set(["collisionPasses","ticksPerFrame"]),wu=r(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"record");function ci(e={}){if(!wu(e))throw new Error("config must be an object");let t=structuredClone(Or);for(let[o,n]of Object.entries(e)){if(!Object.prototype.hasOwnProperty.call(t,o))throw new Error(`Unknown config group: ${o}`);if(!wu(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(vu[s]){let[c,d]=vu[s];if(typeof i!="number"||!Number.isFinite(i)||i<c||i>d||ku.has(s)&&!Number.isInteger(i))throw new Error(`${m} must be ${ku.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(ci,"resolveRelationshipGraphConfig");var nl=r((e,t,o)=>Math.min(o,Math.max(t,e)),"clamp");function Cu(e,t,o={}){let n=ci({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)?nl(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,w=y.y-h.y;if(Math.abs(v)+Math.abs(w)<.01){let T=(f+b+1)*2.39996;v=Math.cos(T),w=Math.sin(T);}let x=Math.max(1,Math.hypot(v,w)),k=Math.min(8,n.repulsion/Math.max(2500,x*x))*c,C=v/x*k,S=w/x*k;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,w=b.y-f.y,x=Math.max(1,Math.hypot(v,w)),k=(x-y)*(n.linkStrength+h*n.strongLinkStrength)*c,C=v/x*k,S=w/x*k;f.vx+=C,f.vy+=S,b.vx-=C,b.vy-=S;}d=0;for(let f of a)f.vx=nl((f.vx+(m.x-f.x)*n.centerStrength*c)*n.velocityRetention,-n.maxVelocity,n.maxVelocity),f.vy=nl((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],w=v.x-y.x,x=v.y-y.y,k=(y.width+v.width)/2+n.collisionPadding-Math.abs(w),C=(y.height+v.height)/2+n.collisionPadding-Math.abs(x);if(k<=0||C<=0)continue;let S=y.fx===void 0,T=v.fx===void 0,E=Number(S)+Number(T);if(E)if(k<C){let R=Math.sign(w||1)*k/E;S&&(y.x-=R),T&&(v.x+=R);}else {let R=Math.sign(x||1)*C/E;S&&(y.y-=R),T&&(v.y+=R);}}c*=n.cooling,c<n.minAlpha&&(c=0);}return c>0}return r(g,"step"),{step:g,get active(){return c>0},get energy(){return d},positions:r(()=>new Map(a.map(({id: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(Cu,"createForceSimulation");var rl=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 Rx=r((e,t,o)=>Math.min(o,Math.max(t,e)),"clamp");var Su=r(e=>{let t=Number.isFinite(e)?Rx(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"),ui=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"),Nx=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"),Tu=r((e,t)=>{let o=Nx(e,t);return `M ${e.x} ${e.y} Q ${o.x} ${o.y} ${t.x} ${t.y}`},"getTrendRadarFocusTopologyEdgePath");var $x={"align-justify":lucideReact.AlignJustify,grid:lucideReact.Grid3X3,layers:lucideReact.Layers,"map-pin":lucideReact.MapPin,mountain:lucideReact.Mountain,package:lucideReact.Package,paintbrush:lucideReact.Paintbrush,palette:lucideReact.Palette,scissors:lucideReact.Scissors,shield:lucideReact.Shield,"shield-check":lucideReact.ShieldCheck,shirt:lucideReact.Shirt,snowflake:lucideReact.Snowflake,sparkles:lucideReact.Sparkles,user:lucideReact.UserRound,users:lucideReact.UsersRound},Kx=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 Nu({model:e,config:t=Or,onOpenNode:o,renderNodeAction:n,relationshipLabel:a,colorMode:s="dark",onNodePointerDown:i,onNodeKeyDown:m}){let c=r((u,p)=>t.edges.curved?Tu(u,p):`M ${u.x} ${u.y} L ${p.x} ${p.y}`,"edgePath"),d=st.useId().replace(/:/g,""),g=st.useMemo(()=>new Map(e.nodes.map(u=>[u.id,u])),[e.nodes]);return jsxRuntime.jsxs("div",{className:"trend-radar-focus-topology-background pointer-events-none relative size-full overflow-visible","data-radar-focus-topology-surface":"true","data-radar-focus-topology-color-mode":s,children:[t.edges.visible&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${ro.width} ${ro.height}`,className:"absolute inset-0 size-full overflow-visible","aria-hidden":"true",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("filter",{id:d,x:"-40%",y:"-40%",width:"180%",height:"180%",children:jsxRuntime.jsx("feGaussianBlur",{stdDeviation:"7"})})}),jsxRuntime.jsx("g",{"data-radar-focus-topology-edge-layer":"context",children:e.edges.filter(u=>u.role!=="focus").map(u=>{let p=g.get(u.sourceId),f=g.get(u.targetId);return !p||!f?null:jsxRuntime.jsx("path",{d:c(p,f),fill:"none",stroke:t.edges.color??"var(--trend-radar-muted-color)",strokeWidth:Math.max(.8,.72+Math.pow(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)})}),jsxRuntime.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??Kx(u,p.id===e.subjectId?f:p),y=Su(u.associationStrength);return jsxRuntime.jsxs("g",{"data-radar-focus-topology-focus-edge":u.id,"data-radar-focus-topology-association-strength":u.associationStrength.toFixed(4),children:[jsxRuntime.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})`}),jsxRuntime.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:jsxRuntime.jsx("title",{children:a(u)})})]},u.id)})})]}),e.nodes.map(u=>{let p=$x[u.iconName]??lucideReact.Palette,f=ui(u,s),b=u.role==="focus",h=u.role==="context",y=!!(o&&!b);return jsxRuntime.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:[jsxRuntime.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&&jsxRuntime.jsx(p,{className:"shrink-0",size:t.nodes.iconSize,color:f.foreground,strokeWidth:1.8,"aria-hidden":"true"}),t.nodes.showLabels&&jsxRuntime.jsx("span",{className:"min-w-0 truncate",style:{color:"inherit"},children:u.label})]}),n?.(u)]},u.id)})]})}r(Nu,"TrendRadarFocusTopologySurface");function Mu({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=st.useMemo(()=>ci(t),[t]),f=st.useMemo(()=>new Set(m?.activeNodeIds??[]),[m?.activeNodeIds]),b=JSON.stringify(p.physics),h=st.useMemo(()=>JSON.parse(b),[b]),y=JSON.stringify(p.viewport),v=st.useMemo(()=>JSON.parse(y),[y]),{interaction:w,ui:x}=p,k=st.useRef(null),C=st.useRef(),S=JSON.stringify({nodes:e.nodes.map(({id:B,x:H,y:ne,width:fe,height:ye})=>({id:B,x:H,y:ne,width:fe,height:ye})),edges:e.edges.map(({sourceId:B,targetId:H,associationStrength:ne})=>({sourceId:B,targetId:H,associationStrength:ne}))}),T=st.useMemo(()=>{let B=JSON.parse(S);return Cu(B.nodes,B.edges,{physics:h})},[S,h]),[E,R]=st.useState(()=>T.positions()),[F,_]=st.useState(false),[z,O]=st.useState({x:0,y:0,z:1}),j=st.useRef(o);j.current=o,st.useEffect(()=>{j.current?.(z);},[z]);let I=st.useRef(z),V=st.useRef(),$=st.useRef(false),[N,D]=st.useState({width:1,height:1}),M=st.useRef(false),K=st.useMemo(()=>e.nodes.map(B=>({...B,...E.get(B.id)??{}})),[e.nodes,E]),J=st.useRef(K);J.current=K;let G=st.useCallback(B=>{I.current=B,O(B);},[]),te=st.useCallback(()=>{if(C.current!==void 0)return;if(M.current&&!V.current){T.step(1400),R(T.positions()),_(false);return}_(T.active);let B=r(()=>{T.step(h.ticksPerFrame),R(T.positions()),T.active?C.current=requestAnimationFrame(B):(C.current=void 0,_(false));},"tick");C.current=requestAnimationFrame(B);},[T,h.ticksPerFrame]),U=st.useCallback(()=>{let B=k.current;if(!B)return;let H=rl(J.current,v.fitPadding),ne=Math.max(v.minZoom,Math.min(v.maxZoom,v.fitMaxZoom,(B.clientWidth-v.screenPadding*2)/H.width,(B.clientHeight-v.screenPadding*2)/H.height));G({x:B.clientWidth/(2*ne)-H.x-H.width/2,y:B.clientHeight/(2*ne)-H.y-H.height/2,z:ne});},[G,v]);st.useEffect(()=>{M.current=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??false;let B=T.positions();return R(B),J.current=J.current.map(H=>({...H,...B.get(H.id)})),U(),te(),()=>{C.current!==void 0&&cancelAnimationFrame(C.current),C.current=void 0;let H=V.current;H?.target.hasPointerCapture?.(H.pointerId)&&H.target.releasePointerCapture(H.pointerId),V.current=void 0;}},[T,U,te]),st.useEffect(()=>{let B=k.current;if(!B)return;let H=new ResizeObserver(()=>{D({width:B.clientWidth,height:B.clientHeight}),v.fitOnResize&&U();});return H.observe(B),()=>H.disconnect()},[U,v.fitOnResize]);let Z=st.useCallback((B,H,ne)=>{if(!w.zoom)return;let fe=I.current,ye=Math.max(v.minZoom,Math.min(v.maxZoom,fe.z*Math.exp(-B*v.zoomSensitivity)));G({x:fe.x-H/fe.z+H/ye,y:fe.y-ne/fe.z+ne/ye,z:ye});},[G,v,w.zoom]);st.useEffect(()=>{let B=k.current;if(!B)return;let H=r(ne=>{if(V.current||!w.zoom)return;ne.preventDefault();let fe=B.getBoundingClientRect();Z(ne.deltaY,ne.clientX-fe.left,ne.clientY-fe.top);},"wheel");return B.addEventListener("wheel",H,{passive:false}),()=>B.removeEventListener("wheel",H)},[Z,w.zoom]);let ae=r((B,H)=>{if(B.button!==0||V.current||(H?!w.dragNodes:!w.pan))return;$.current=false;let ne=I.current;V.current={pointerId:B.pointerId,id:H?.id,startX:B.clientX,startY:B.clientY,x:H?.x??ne.x,y:H?.y??ne.y,moved:false,target:B.currentTarget},B.currentTarget.setPointerCapture(B.pointerId),H&&(T.pin(H.id,H.x,H.y),te());},"begin"),ie=r(B=>{let H=V.current;if(!(!H||H.pointerId!==B.pointerId)){if(V.current=void 0,$.current=H.moved,H.id){let ne=T.positions().get(H.id);T.release(H.id),te(),H.moved&&ne&&u?.(H.id,ne);}H.target.hasPointerCapture(B.pointerId)&&H.target.releasePointerCapture(B.pointerId);}},"end"),de={...e,nodes:K},W=new Map(K.map(B=>[B.id,B])),pe=rl([...e.nodes,...K],200);return jsxRuntime.jsxs("section",{ref:k,className:"relationship-graph bg-background relative size-full overflow-hidden",style:{cursor:w.pan?void 0:"default",touchAction:w.pan||w.dragNodes?"none":"auto"},role:"region","aria-label":a,"data-radar-focus-topology":"true","data-graph-engine":"native-force","data-force-running":F,"data-radar-focus-topology-camera":`${z.x.toFixed(2)},${z.y.toFixed(2)},${z.z.toFixed(3)}`,onPointerDown:B=>{B.target.closest("button")||ae(B);},onPointerMove:B=>{let H=V.current;if(!H||H.pointerId!==B.pointerId)return;let ne=B.clientX-H.startX,fe=B.clientY-H.startY;H.moved||(H.moved=Math.hypot(ne,fe)>w.dragThreshold),H.moved&&(H.id?(T.pin(H.id,H.x+ne/I.current.z,H.y+fe/I.current.z),R(T.positions()),te()):G({...I.current,x:H.x+ne/I.current.z,y:H.y+fe/I.current.z}));},onPointerUp:ie,onPointerCancel:ie,onLostPointerCapture:ie,onClickCapture:B=>{$.current&&(B.preventDefault(),B.stopPropagation(),$.current=false);},children:[jsxRuntime.jsx("div",{style:{position:"absolute",left:0,top:0,width:ro.width,height:ro.height,transformOrigin:"0 0",transform:`translate(${z.x*z.z}px, ${z.y*z.z}px) scale(${z.z})`},children:jsxRuntime.jsx(Nu,{model:de,config:p,colorMode:n,relationshipLabel:d,onOpenNode:w.openNodes?s:void 0,renderNodeAction:i??(m&&c?B=>{if(m.nodeKinds&&!m.nodeKinds.includes(B.ref.kind))return null;let H=f.has(B.id),ne=m.disabled||!H&&m.maxActive!==void 0&&f.size>=m.maxActive,fe=`${H?m.activeLabel??m.label:m.label}: ${B.label}`,ye=H?lucideReact.Check:lucideReact.Plus,xe=m.size??24;return jsxRuntime.jsx("button",{type:"button","data-relationship-node-action":B.id,"aria-label":fe,title:fe,"aria-pressed":H,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:ui(B,n).foreground,transform:`translate(50%, -50%) scale(${m.keepScreenSize===false?1:1/z.z})`,transformOrigin:"center"},onPointerDown:oe=>oe.stopPropagation(),onKeyDown:oe=>oe.stopPropagation(),onClick:oe=>{oe.stopPropagation(),c(B);},children:jsxRuntime.jsx(ye,{size:xe*.6,"aria-hidden":"true"})})}:void 0),onNodePointerDown:w.dragNodes?(B,H)=>ae(B,H):void 0,onNodeKeyDown:(B,H)=>{if(!w.keyboard||!w.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?w.keyboardFastStep:w.keyboardStep)/I.current.z,ye={x:H.x+ne[0]*fe,y:H.y+ne[1]*fe};T.pin(H.id,ye.x,ye.y),R(T.positions()),T.release(H.id),te(),u?.(H.id,ye);}})}),(x.controls||x.minimap)&&jsxRuntime.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&&jsxRuntime.jsxs("div",{className:"relationship-controls",children:[jsxRuntime.jsx("button",{type:"button","aria-label":g.zoomOut,onClick:()=>Z(v.zoomStep,N.width/2,N.height/2),disabled:!w.zoom||z.z<=v.minZoom,children:jsxRuntime.jsx(lucideReact.Minus,{size:15})}),jsxRuntime.jsxs("output",{children:[Math.round(z.z*100),"%"]}),jsxRuntime.jsx("button",{type:"button","aria-label":g.zoomIn,onClick:()=>Z(-v.zoomStep,N.width/2,N.height/2),disabled:!w.zoom||z.z>=v.maxZoom,children:jsxRuntime.jsx(lucideReact.Plus,{size:15})}),jsxRuntime.jsx("button",{type:"button","aria-label":g.zoomToFit,onClick:U,children:jsxRuntime.jsx(lucideReact.LocateFixed,{size:15})})]}),x.minimap&&jsxRuntime.jsx("button",{type:"button",className:"relationship-minimap-map",disabled:!w.pan,"aria-label":g.minimap,onClick:B=>{if(B.detail===0){U();return}let H=B.currentTarget.getBoundingClientRect(),ne=(B.clientX-H.left)/H.width*pe.width+pe.x,fe=(B.clientY-H.top)/H.height*pe.height+pe.y;G({...z,x:N.width/(2*z.z)-ne,y:N.height/(2*z.z)-fe});},children:jsxRuntime.jsxs("svg",{viewBox:`${pe.x} ${pe.y} ${pe.width} ${pe.height}`,style:{height:x.minimapHeight},preserveAspectRatio:"none","aria-hidden":"true",children:[e.edges.map(B=>{let H=W.get(B.sourceId),ne=W.get(B.targetId);return H&&ne?jsxRuntime.jsx("line",{x1:H.x,y1:H.y,x2:ne.x,y2:ne.y,stroke:"currentColor",strokeWidth:2,opacity:.2},B.id):null}),K.map(B=>jsxRuntime.jsx("circle",{cx:B.x,cy:B.y,r:B.role==="focus"?14:8,fill:B.color},B.id)),jsxRuntime.jsx("rect",{x:-z.x,y:-z.y,width:N.width/z.z,height:N.height/z.z,fill:"currentColor",fillOpacity:.07,stroke:"currentColor",strokeWidth:4})]})})]})]})}r(Mu,"RelationshipGraph2D");var Jx={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)))"},Xx={nodes:{showIcons:false,glow:false,contextOpacity:1},edges:{glow:false,opacityScale:3,widthScale:.5}};function Pu({nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,ariaLabel:a="Relationship graph",className:s,height:i=440}){let m=xt(),c=nn(),d=JSON.stringify([e,t]),g=st.useMemo(()=>li(e,t),[d]),u=st.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=Jx[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=st.useMemo(()=>new Map(e.map(b=>[b.id,b])),[d]),f=st.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 jsxRuntime.jsx("div",{"data-monkeys-component":"workbench-relationship-graph","data-workbench-relationship-variant":"force-2d",className:l("relative h-[var(--relationship-height)] min-h-0 min-w-0 overflow-hidden",s),style:{"--relationship-height":`${i}px`},children:jsxRuntime.jsx(Mu,{model:u,config:Xx,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(Pu,"RelationshipForce2D");var Zx={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"},Qx={primary:"--radar-series-one",secondary:"--radar-series-two",accent:"--radar-series-three",muted:"--radar-series-four"},ev={primary:"var(--primary)",secondary:"var(--secondary-foreground)",accent:"var(--accent-foreground)",muted:"var(--muted-foreground)"},fi=r((e,t=1)=>`hsl(var(${Qx[e]}, ${ev[e]}) / ${t})`,"radarToneColor"),tv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activateNode");function ov({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 A(i)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:i}):null;if(d==="galaxy")return jsxRuntime.jsx(xu,{nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,ariaLabel:m,className:c});if(d==="force-2d")return jsxRuntime.jsx(Pu,{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),w=Math.PI*2*v/f.length-Math.PI/2;return [h.id,{x:a/2+Math.cos(w)*u,y:s/2+Math.sin(w)*u}]}));return jsxRuntime.jsx("div",{"data-monkeys-component":"workbench-relationship-graph","data-workbench-relationship-variant":d,className:l("relative min-w-0 overflow-hidden rounded-lg border",g?"min-h-[42rem]":"overflow-x-auto border-border/70 bg-card",c),style:g?{backgroundColor:"hsl(var(--radar-canvas, var(--background)))",borderColor:"hsl(var(--radar-shell-border, var(--border)))",backgroundImage:"linear-gradient(hsl(var(--radar-grid, var(--border)) / 0.28) 1px, transparent 1px), linear-gradient(90deg, hsl(var(--radar-grid, var(--border)) / 0.28) 1px, transparent 1px), radial-gradient(circle at center, hsl(var(--primary) / 0.1), transparent 45%)",backgroundSize:"4rem 4rem, 4rem 4rem, 100% 100%"}:void 0,children:jsxRuntime.jsxs("svg",{viewBox:`0 0 ${a} ${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),w=b.get(h.targetId);return !v||!w?null:jsxRuntime.jsx("line",{x1:v.x,y1:v.y,x2:w.x,y2:w.y,className:g?void 0:"stroke-border",strokeWidth:g?"2":"1.5",style:g?{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.46)",filter:"drop-shadow(0 0 0.35rem hsl(var(--primary) / 0.34))"}:void 0,children:jsxRuntime.jsx("title",{children: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,w=h.tone||"muted",x=g?{color:fi(w)}:void 0;return jsxRuntime.jsxs("g",{transform:`translate(${y.x}, ${y.y})`,role:n?"button":void 0,tabIndex:n?0:void 0,"aria-label":h.meta?`${h.label}, ${h.meta}`:h.label,"aria-pressed":n?v:void 0,onClick:n?()=>n(h):void 0,onKeyDown:k=>tv(k,h,n),className:l(g?"outline-hidden":Zx[w],n&&"cursor-pointer outline-hidden"),style:x,children:[jsxRuntime.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:fi(w,v?.22:.12),stroke:fi(w,v?1:.78),filter:`drop-shadow(0 0 ${v?"1.4rem":"0.75rem"} ${fi(w,.62)})`}:void 0}),jsxRuntime.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?jsxRuntime.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(ov,"WorkbenchRelationshipGraph");var rv={primary:"fill-primary stroke-primary",secondary:"fill-secondary stroke-secondary-foreground",accent:"fill-accent stroke-accent-foreground",muted:"fill-muted stroke-muted-foreground"},av=r(e=>e.filter(Number.isFinite),"finiteValues"),al=r((e,t,o)=>{let n=av(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"),Vr=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"),iv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activatePoint");function sv({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 A(c)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:c}):null;let p=56,f=al(u.map(S=>S.x),t.min,t.max),b=al(u.map(S=>S.y),o.min,o.max),h=al(u.map(S=>S.size??1)),y=p,v=i-p,w=p,x=m-p,k=Number.isFinite(n?.x)?Vr(Number(n?.x),f,y,v):void 0,C=Number.isFinite(n?.y)?Vr(Number(n?.y),b,x,w):void 0;return jsxRuntime.jsx("div",{"data-monkeys-component":"workbench-scatter-plot",className:l("min-w-0 overflow-x-auto rounded-lg border border-border/70 bg-card p-3",g),children:jsxRuntime.jsxs("svg",{viewBox:`0 0 ${i} ${m}`,className:"min-w-[42rem]",role:"img","aria-label":d,children:[jsxRuntime.jsx("line",{x1:y,y1:x,x2:v,y2:x,className:"stroke-border"}),jsxRuntime.jsx("line",{x1:y,y1:w,x2:y,y2:x,className:"stroke-border"}),k===void 0?null:jsxRuntime.jsx("line",{x1:yn(k,y,v),y1:w,x2:yn(k,y,v),y2:x,className:"stroke-muted-foreground/50",strokeDasharray:"5 5"}),C===void 0?null:jsxRuntime.jsx("line",{x1:y,y1:yn(C,w,x),x2:v,y2:yn(C,w,x),className:"stroke-muted-foreground/50",strokeDasharray:"5 5"}),jsxRuntime.jsx("text",{x:i/2,y:m-12,textAnchor:"middle",className:"fill-muted-foreground text-xs",children:t.label}),jsxRuntime.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(Vr(S.x,f,y,v),y,v),E=yn(Vr(S.y,b,x,w),w,x),R=S.size===void 0?9:yn(Vr(S.size,h,7,18),7,18),F=a===S.id;return jsxRuntime.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?F:void 0,onClick:s?()=>s(S):void 0,onKeyDown:_=>iv(_,S,s),className:l(s&&"cursor-pointer outline-hidden"),children:[jsxRuntime.jsx("circle",{r:R,className:l("stroke-1 opacity-80 transition-opacity duration-150 motion-reduce:transition-none",rv[S.tone||"primary"],F?"opacity-100 stroke-[3]":"hover:opacity-100")}),jsxRuntime.jsx("text",{y:-R-7,textAnchor:"middle",className:"pointer-events-none fill-foreground text-[0.6875rem] font-semibold",children:S.label.slice(0,24)}),jsxRuntime.jsx("title",{children:S.description||S.label})]},S.id)})]})})}r(sv,"WorkbenchScatterPlot");var dv=r((e,t,o)=>{!o||t.disabled||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activateItem");function cv({items:e,onItemSelect:t,ariaLabel:o="Journey",className:n}){return jsxRuntime.jsx("nav",{"aria-label":o,"data-monkeys-component":"workbench-journey-navigation",className:l("min-w-0 overflow-x-auto rounded-lg border border-border/70 bg-card p-2",n),children:jsxRuntime.jsx("ol",{className:"flex min-w-max items-stretch gap-1",children:e.map((a,s)=>{let i=a.state||"upcoming";return jsxRuntime.jsxs("li",{className:"flex items-center",children:[s?jsxRuntime.jsx("span",{className:"mx-1 h-px w-5 bg-border","aria-hidden":"true"}):null,jsxRuntime.jsxs("button",{type:"button",disabled:a.disabled,"aria-current":i==="current"?"page":void 0,onClick:t&&!a.disabled?()=>t(a):void 0,onKeyDown:m=>dv(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:[A(a.eyebrow)?jsxRuntime.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,jsxRuntime.jsx("span",{className:"mt-0.5 block text-xs font-semibold",children:a.label})]})]},a.id)})})})}r(cv,"WorkbenchJourneyNavigation");var uv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activateItem");function mv({items:e,selectedItemId:t,onItemSelect:o,emptyState:n=null,ariaLabel:a="Ranked items",className:s}){return e.length?jsxRuntime.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 jsxRuntime.jsx("li",{children:jsxRuntime.jsxs("button",{type:"button","aria-pressed":o?c:void 0,onClick:o?()=>o(i):void 0,onKeyDown:d=>uv(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:[jsxRuntime.jsx("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-semibold tabular-nums text-muted-foreground",children:i.leading||m+1}),jsxRuntime.jsxs("span",{className:"min-w-0",children:[jsxRuntime.jsx("span",{className:"block truncate text-sm font-semibold text-foreground",children:i.label}),A(i.description)?jsxRuntime.jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:i.description}):null,i.tags?.length?jsxRuntime.jsx("span",{className:"mt-2 flex flex-wrap gap-1.5",children:i.tags.map((d,g)=>jsxRuntime.jsx("span",{className:"rounded-full bg-secondary px-2 py-0.5 text-[0.625rem] font-medium text-secondary-foreground",children:d},`${i.id}:tag:${g}`))}):null,i.metrics?.length?jsxRuntime.jsx("span",{className:"mt-2 grid grid-cols-2 gap-x-4 gap-y-1 sm:grid-cols-4",children:i.metrics.map(d=>jsxRuntime.jsxs("span",{className:"min-w-0",children:[jsxRuntime.jsx("span",{className:"block truncate text-[0.625rem] text-muted-foreground",children:d.label}),jsxRuntime.jsx("span",{className:"block text-xs font-semibold tabular-nums text-foreground",children:d.value})]},d.id))}):null]}),jsxRuntime.jsxs("span",{className:"shrink-0 text-right",children:[A(i.score)?jsxRuntime.jsx("span",{className:"block text-lg font-semibold tabular-nums text-primary",children:i.score}):null,A(i.trailing)?jsxRuntime.jsx("span",{className:"mt-1 block text-muted-foreground",children:i.trailing}):null]})]})},i.id)})}):A(n)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:n}):null}r(mv,"WorkbenchRankedList");function gv({title:e,description:t,items:o,onRemove:n,removeLabel:a=r(()=>"Remove","removeLabel"),actions:s,emptyState:i=null,className:m}){return jsxRuntime.jsxs("section",{"data-monkeys-component":"workbench-selection-tray",className:l("rounded-lg border border-border/70 bg-card p-4 text-card-foreground",m),children:[jsxRuntime.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("h2",{className:"text-sm font-semibold text-foreground",children:e}),A(t)?jsxRuntime.jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground",children:t}):null]}),jsxRuntime.jsx("span",{className:"rounded-full bg-primary/10 px-2.5 py-1 text-xs font-semibold tabular-nums text-primary",children:o.length})]}),o.length?jsxRuntime.jsx("ul",{className:"mt-3 flex flex-wrap gap-2",children:o.map(c=>jsxRuntime.jsxs("li",{className:"flex max-w-full items-center gap-2 rounded-full border border-border bg-background px-3 py-1.5 text-xs text-foreground",children:[jsxRuntime.jsx("span",{className:"min-w-0 truncate font-medium",children:c.label}),A(c.meta)?jsxRuntime.jsx("span",{className:"shrink-0 text-muted-foreground",children:c.meta}):null,n?jsxRuntime.jsx("button",{type:"button","aria-label":a(c),onClick:()=>n(c),className:"rounded-md px-1 text-muted-foreground outline-hidden hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:"\xD7"}):null]},c.id))}):jsxRuntime.jsx("div",{className:"mt-3 rounded-md border border-dashed border-border px-4 py-5 text-center text-xs text-muted-foreground",children:i}),A(s)?jsxRuntime.jsx("div",{className:"mt-4 flex flex-wrap justify-end gap-2 border-t border-border pt-4",children:s}):null]})}r(gv,"WorkbenchSelectionTray");function xi(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(xi,"renderDateTimeValue");function bv({items:e,emptyState:t=null,ariaLabel:o="Evidence",className:n,translate:a=r(s=>s,"translate")}){let{locale:s}=ht();return e.length?jsxRuntime.jsx("ol",{"aria-label":o,"data-monkeys-component":"workbench-evidence-list",className:l("grid min-w-0 gap-0",n),children:e.map((i,m)=>jsxRuntime.jsxs("li",{className:"grid min-w-0 grid-cols-[1.25rem_minmax(0,1fr)_auto] gap-3",children:[jsxRuntime.jsxs("span",{className:"flex flex-col items-center","aria-hidden":"true",children:[jsxRuntime.jsx("span",{className:"mt-1 flex size-5 items-center justify-center rounded-full border border-primary/40 bg-primary/10 text-[0.625rem] font-semibold text-primary",children:i.marker||m+1}),m<e.length-1?jsxRuntime.jsx("span",{className:"min-h-8 w-px flex-1 bg-border"}):null]}),jsxRuntime.jsxs("span",{className:"min-w-0 pb-5",children:[jsxRuntime.jsx("span",{className:"block text-sm font-semibold text-foreground",children:i.titleKey?a(i.titleKey):i.title}),A(i.description)||i.descriptionKey?jsxRuntime.jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:i.descriptionKey?a(i.descriptionKey):i.description}):null,A(i.source)||i.sourceKey||A(i.timestamp)||i.timestampValue!==void 0?jsxRuntime.jsxs("span",{className:"mt-1.5 flex flex-wrap gap-x-3 gap-y-1 text-[0.6875rem] text-muted-foreground",children:[A(i.source)||i.sourceKey?jsxRuntime.jsx("span",{children:i.sourceKey?a(i.sourceKey):i.source}):null,A(i.timestamp)||i.timestampValue!==void 0?jsxRuntime.jsx("time",{children:i.timestampValue!==void 0?xi(i.timestampValue,"milliseconds",s):i.timestamp}):null]}):null]}),A(i.action)?jsxRuntime.jsx("span",{className:"pb-5",children:i.action}):null]},i.id))}):A(t)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:t}):null}r(bv,"WorkbenchEvidenceList");var hv=st.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 jsxRuntime.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 vv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activateItem");function kv({items:e,selectedItemId:t,onItemSelect:o,emptyState:n=null,ariaLabel:a="Assets",className:s}){return e.length?jsxRuntime.jsx("div",{"data-monkeys-component":"workbench-asset-gallery",children:jsxRuntime.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 jsxRuntime.jsxs("button",{type:"button","aria-pressed":o?m:void 0,onClick:o?()=>o(i):void 0,onKeyDown:c=>vv(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:[jsxRuntime.jsx("span",{className:"block aspect-[4/3] overflow-hidden bg-muted",children:jsxRuntime.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"})}),jsxRuntime.jsxs("span",{className:"block p-3",children:[A(i.title)?jsxRuntime.jsx("span",{className:"block truncate text-sm font-semibold text-foreground",children:i.title}):null,A(i.description)?jsxRuntime.jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:i.description}):null,i.badges?.length?jsxRuntime.jsx("span",{className:"mt-2 flex flex-wrap gap-1.5",children:i.badges.map((c,d)=>jsxRuntime.jsx("span",{className:"rounded-full bg-secondary px-2 py-0.5 text-[0.625rem] text-secondary-foreground",children:c},`${i.id}:badge:${d}`))}):null]})]})}})}):A(n)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:n}):null}r(kv,"WorkbenchAssetGallery");var Au={primary:"--radar-series-one",secondary:"--radar-series-two",accent:"--radar-series-three",muted:"--radar-series-four"},zu={primary:"var(--primary)",secondary:"var(--secondary-foreground)",accent:"var(--accent-foreground)",muted:"var(--muted-foreground)"},hn=r(e=>`hsl(var(${Au[e]}, ${zu[e]}))`,"workbenchVisualizationToneColor"),_r=r((e,t)=>`hsl(var(${Au[e]}, ${zu[e]}) / ${t})`,"workbenchVisualizationToneColorWithAlpha");var Cv={backgroundColor:"hsl(var(--radar-canvas, var(--background)))",color:"hsl(var(--foreground))"},Ou={backgroundColor:"hsl(var(--radar-panel, var(--card)))",borderColor:"hsl(var(--radar-border, var(--border)))"};function Fu({items:e,activeItemId:t,activeChildId:o,onItemSelect:n,onChildSelect:a,footer:s,ariaLabel:i="Radar navigation"}){return jsxRuntime.jsx(kr,{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:Ou})}r(Fu,"WorkbenchRadarNavigation");function Sv({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 jsxRuntime.jsxs("section",{"data-monkeys-component":"workbench-radar-workspace","data-radar-active-navigation-id":t,"aria-label":f,className:l("grid min-w-0 gap-3 overflow-hidden p-3 lg:grid-cols-[12.5rem_minmax(0,1fr)] xl:grid-cols-[12.5rem_minmax(0,1fr)_20rem]",g),style:{...Cv,minHeight:p},children:[A(i)?i:jsxRuntime.jsx(Fu,{items:e,activeItemId:t,activeChildId:o,onItemSelect:n,onChildSelect:a,footer:s}),jsxRuntime.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}),A(c)?jsxRuntime.jsx("aside",{"aria-label":d,"data-radar-workspace-region":"inspector",className:"min-h-0 overflow-y-auto rounded-lg border lg:col-span-2 xl:col-span-1",style:Ou,children:c}):null]})}r(Sv,"WorkbenchRadarWorkspace");function Tv({title:e,icon:t,description:o,children:n,className:a}){return jsxRuntime.jsxs("section",{"data-monkeys-component":"workbench-radar-inspector-section",className:l("border-b border-border/70 p-4 last:border-b-0",a),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold text-primary",children:[A(t)?jsxRuntime.jsx("span",{"aria-hidden":"true",children:t}):null,jsxRuntime.jsx("h2",{children:e})]}),A(o)?jsxRuntime.jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground",children:o}):null,A(n)?jsxRuntime.jsx("div",{className:"mt-3",children:n}):null]})}r(Tv,"WorkbenchRadarInspectorSection");function Rv(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(Rv,"assertValidRadarFilterRowProps");function Nv(e){Rv(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=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[A(n)?jsxRuntime.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,jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:t}),A(o)?jsxRuntime.jsx("span",{className:"ml-auto shrink-0 tabular-nums text-muted-foreground",children:o}):null]}),v=c?jsxRuntime.jsx("span",{"aria-hidden":"true",className:l("text-lg leading-none transition-transform motion-reduce:transition-none",c.expanded&&"rotate-90"),children:"\u203A"}):null;if(c?.mode==="separate"){let k=c.expanded?c.collapseLabel:c.expandLabel;return jsxRuntime.jsxs("div",{"data-monkeys-component":"workbench-radar-filter-row",className:l("monkeys-workbench-radar-filter-row monkeys-workbench-radar-filter-row--separate",u,p,d),style:h,children:[jsxRuntime.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}),jsxRuntime.jsx("button",{type:"button","aria-expanded":c.expanded,"aria-controls":c.controls,"aria-label":k,disabled:s,onClick:c.onToggle,className:l("monkeys-workbench-radar-filter-row__disclosure",p),children:v})]})}let w=c?.mode==="integrated"?c:void 0,x=w?w.expanded?w.collapseLabel:w.expandLabel:void 0;return jsxRuntime.jsxs("button",{type:"button","data-monkeys-component":"workbench-radar-filter-row","aria-label":x,"aria-pressed":w?void 0:a,"aria-expanded":w?.expanded,"aria-controls":w?.controls,disabled:s,onClick:w?.onToggle??m,className:l("monkeys-workbench-radar-filter-control monkeys-workbench-radar-filter-row",u,p,d),style:h,children:[y,w?jsxRuntime.jsx("span",{className:"ml-auto shrink-0 text-muted-foreground",children:v}):null]})}r(Nv,"WorkbenchRadarFilterRow");function Iv({label:e,value:t,icon:o,selected:n=false,disabled:a=false,onSelect:s,className:i}){let m=!!s||a;return jsxRuntime.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:[A(o)?jsxRuntime.jsx("span",{className:"shrink-0","aria-hidden":"true",children:o}):null,jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:e}),A(t)?jsxRuntime.jsx("span",{className:"ml-auto shrink-0 text-muted-foreground",children:t}):null]})}r(Iv,"WorkbenchRadarFilterChip");var Bv=r(e=>e.filter(Number.isFinite),"finiteValues"),il=r((e,t,o)=>{let n=Bv(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"),Pv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activatePoint"),Ev={"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 Dv({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(R=>Number.isFinite(R.x)&&Number.isFinite(R.y));if(!b.length)return A(u)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:u}):null;let h=il(b.map(R=>R.x),t.min,t.max),y=il(b.map(R=>R.y),o.min,o.max),v=il(b.map(R=>R.size??1)),w=0,x=c,k=0,C=d,S=tn(en(Number.isFinite(n?.x)?Number(n?.x):(h[0]+h[1])/2,h,w,x),w,x),T=tn(en(Number.isFinite(n?.y)?Number(n?.y):(y[0]+y[1])/2,y,C,k),k,C),E=new Set([...b].sort((R,F)=>(F.size??0)-(R.size??0)).slice(0,g).map(R=>R.id));return jsxRuntime.jsxs("div",{"data-monkeys-component":"workbench-radar-matrix",className:l("relative size-full min-h-[42rem] min-w-0 overflow-hidden",f),style:{backgroundColor:"hsl(var(--radar-canvas, var(--background)))",backgroundImage:"radial-gradient(circle at 78% 20%, hsl(var(--primary) / 0.08), transparent 32%), radial-gradient(circle at 18% 82%, hsl(var(--radar-series-two, var(--accent-foreground)) / 0.06), transparent 30%)"},children:[jsxRuntime.jsxs("svg",{viewBox:`0 0 ${c} ${d}`,preserveAspectRatio:"none",className:"absolute inset-0 size-full",role:"img","aria-label":p,children:[jsxRuntime.jsxs("g",{"aria-hidden":"true",children:[Array.from({length:13},(R,F)=>{let _=c/12*F,z=d/12*F;return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:_,y1:0,x2:_,y2:d,style:{stroke:"hsl(var(--radar-grid, var(--border)) / 0.36)"}}),jsxRuntime.jsx("line",{x1:0,y1:z,x2:c,y2:z,style:{stroke:"hsl(var(--radar-grid, var(--border)) / 0.36)"}})]},F)}),jsxRuntime.jsx("line",{x1:S,y1:0,x2:S,y2:d,strokeWidth:"1.5",style:{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.64)"}}),jsxRuntime.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(R=>{let F=Ev[R.id];return jsxRuntime.jsxs("g",{"aria-hidden":"true",children:[jsxRuntime.jsx("text",{x:F.x,y:F.y+20,textAnchor:F.anchor,className:"fill-muted-foreground text-[0.8125rem] font-semibold",children:R.title}),A(R.description)&&typeof R.description=="string"?jsxRuntime.jsx("text",{x:F.x,y:F.y+40,textAnchor:F.anchor,className:"fill-muted-foreground text-[0.6875rem]",children:R.description}):null]},R.id)}),b.map((R,F)=>{let _=tn(en(R.x,h,40,c-40),40,c-40),z=tn(en(R.y,y,d-48,54),54,d-48),O=R.tone||(F%2===0?"primary":"accent"),j=i===R.id,I=E.has(R.id),V=I?tn(en(R.size??1,v,5,9),5,9):3.5,$=I?tn(en(R.size??1,v,14,31),14,31):0,N={fill:hn(O),stroke:"hsl(var(--foreground) / 0.74)"},D={fill:hn(O),filter:`drop-shadow(0 0 0.65rem ${_r(O,.72)})`};return jsxRuntime.jsxs("g",{transform:`translate(${_}, ${z})`,role:m?"button":void 0,tabIndex:m?0:void 0,"aria-label":`${R.label}: ${t.label} ${R.x}, ${o.label} ${R.y}`,"aria-pressed":m?j:void 0,onClick:m?()=>m(R):void 0,onKeyDown:M=>Pv(M,R,m),className:l(m&&"cursor-pointer outline-hidden"),children:[j?jsxRuntime.jsx("circle",{r:V+10,fill:"none",strokeWidth:"2",style:{stroke:_r(O,.48)}}):null,jsxRuntime.jsx("circle",{r:V,strokeWidth:"1.25",style:N}),I?jsxRuntime.jsx("text",{y:-V-8,textAnchor:"middle",fontSize:$,fontWeight:"700",style:D,className:"pointer-events-none",children:R.label.slice(0,22)}):null,jsxRuntime.jsx("title",{children:R.description||R.label})]},R.id)}),jsxRuntime.jsx("circle",{cx:S,cy:T,r:"10",style:{fill:"hsl(var(--radar-axis, var(--primary)))"}}),jsxRuntime.jsx("circle",{cx:S,cy:T,r:"3",className:"fill-primary-foreground"}),jsxRuntime.jsx("text",{x:c/2,y:d-12,textAnchor:"middle",className:"fill-muted-foreground text-[0.6875rem]",children:t.label}),jsxRuntime.jsx("text",{x:"14",y:d/2,textAnchor:"middle",transform:`rotate(-90 14 ${d/2})`,className:"fill-muted-foreground text-[0.6875rem]",children:o.label})]}),jsxRuntime.jsxs("div",{className:"absolute bottom-4 left-4 hidden w-44 overflow-hidden rounded-[var(--radius)] border bg-card/95 shadow-xl sm:block",style:{borderColor:"hsl(var(--radar-border, var(--border)))"},"aria-hidden":"true",children:[jsxRuntime.jsxs("div",{className:"flex h-9 items-center justify-between border-b border-border px-3 text-xs font-semibold text-muted-foreground",children:[jsxRuntime.jsx("span",{children:"\u2212"}),jsxRuntime.jsx("span",{children:"100%"}),jsxRuntime.jsx("span",{children:"\uFF0B"})]}),jsxRuntime.jsxs("svg",{viewBox:`0 0 ${c} ${d}`,className:"h-24 w-full",children:[jsxRuntime.jsx("rect",{width:c,height:d,style:{fill:"hsl(var(--radar-canvas, var(--background)))"}}),jsxRuntime.jsx("line",{x1:S,y1:0,x2:S,y2:d,style:{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.7)"},strokeWidth:"6"}),jsxRuntime.jsx("line",{x1:0,y1:T,x2:c,y2:T,style:{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.7)"},strokeWidth:"6"}),b.map((R,F)=>jsxRuntime.jsx("circle",{cx:tn(en(R.x,h,40,c-40),40,c-40),cy:tn(en(R.y,y,d-48,54),54,d-48),r:"8",style:{fill:hn(R.tone||(F%2===0?"primary":"accent"))}},R.id)),jsxRuntime.jsx("rect",{x:c*.22,y:d*.12,width:c*.58,height:d*.62,fill:"none",strokeWidth:"8",style:{stroke:"hsl(var(--primary))"}})]})]}),s.length?jsxRuntime.jsx("div",{className:"absolute bottom-4 left-1/2 hidden -translate-x-1/2 items-center gap-4 rounded-full border border-border bg-card/95 px-4 py-2 text-xs font-semibold shadow-xl md:flex",children:s.map(R=>{let F=R.tone||"muted";return jsxRuntime.jsxs("span",{className:"flex items-center gap-2 text-muted-foreground",children:[jsxRuntime.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:hn(F)}}),R.label]},R.id)})}):null]})}r(Dv,"WorkbenchRadarMatrix");var Vu=2048,ll=2*1024*1024,dl=class dl extends Error{constructor(o,n,a){super(o);this.code=o;this.expectedSequence=n;this.receivedSequence=a;this.name="RuntimeTerminalOutputError";}};r(dl,"RuntimeTerminalOutputError");var jr=dl;function _u(e,t){let o=r((u,p)=>{throw new jr(u,e.highWater+1,p)},"fail");if(!Array.isArray(t))return o("invalid-frame");if(t.length>Vu)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>ll)return o("output-budget-exceeded",u.sequence);let p=new TextEncoder().encode(u.data).byteLength;if(m+=p,m>ll)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>Vu||d>ll;)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(_u,"prepareRuntimeTerminalOutput");function Lv(e){let t=st.useRef(null),o=st.useRef(e);o.current=e;let n=st.useRef();return st.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 jr?h:new jr("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 w=r((T,E)=>{let R=Zt(E,"link");f()&&R&&/^https?:\/\//i.test(R)&&window.open(R,"_blank","noopener,noreferrer");},"openLink"),x=new h({linkHandler:{activate:w},cursorBlink:true,disableStdin:o.current.disabled===true,fontSize:13,fontFamily:'"JetBrains Mono", Menlo, Monaco, "Courier New", monospace'});m=x;let k=new y;x.loadAddon(k),x.loadAddon(new v(w)),x.open(s);let C=r(()=>{if(!f())return;k.fit();let T=k.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=_u(p,T);E.append.length&&x.write(E.append.map(R=>R.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]),st.useEffect(()=>{let a=n.current;a?.sessionKey===e.sessionKey&&(a.terminal.options.disableStdin=e.disabled===true,a.write(e.output));},[e.sessionKey,e.output,e.disabled]),jsxRuntime.jsxs("div",{className:e.className,style:e.style,children:[jsxRuntime.jsx("div",{role:"status",children:e.statusLabel}),jsxRuntime.jsx("div",{ref:t,className:"h-full min-h-48 w-full rounded-2xl"})]})}r(Lv,"RuntimeTerminalView");var zv={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 ju(e){let{locale:t}=ht();return (o,n)=>{let a=`monkeys.design.runtimeFiles.${o}`,s=e?.(a);return (s&&s!==a?s:zv[o][t.toLowerCase().startsWith("zh")?"zh":"en"]).replace(/\{([A-Za-z]+)\}/g,(m,c)=>n?.[c]??m)}}r(ju,"useRuntimeFileCopy");var Kr=r(e=>new TextEncoder().encode(e).byteLength,"bytes"),ki=r(e=>({...e,value:e.content}),"fromFile");function jv(e){return jsxRuntime.jsx($v,{...e},JSON.stringify([e.model.scopeId]))}r(jv,"RuntimeFileExplorer");function $v(e){let{model:t,onIntent:o,renderEditor:n,renderPreview:a,renderDiff:s,onDraftStateChange:i,translate:m}=e,{locale:c}=ht(),d=ju(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=st.useRef(true);st.useEffect(()=>(g.current=true,()=>{g.current=false;}),[]);let[u,p]=st.useState(false),[f,b]=st.useState(t.search??""),[h,y]=st.useState(false);st.useEffect(()=>b(t.search??""),[t.search]),st.useEffect(()=>{if(typeof window.matchMedia!="function")return;let L=window.matchMedia("(max-width: 767px)"),X=r(()=>p(L.matches),"update");return X(),L.addEventListener("change",X),()=>L.removeEventListener("change",X)},[]);let[v,w]=st.useState(()=>t.openFile?ki(t.openFile):null),[x,k]=st.useState(null),[C,S]=st.useState(false),[T,E]=st.useState(""),[R,F]=st.useState(null),[_,z]=st.useState(""),[O,j]=st.useState("file"),I=st.useRef(null),V=st.useRef(null),$=v!==null&&v.value!==v.content,N=Number.isSafeInteger(t.maxTextBytes)&&t.maxTextBytes>0?Math.min(t.maxTextBytes,1024*1024):1024*1024,D=v!==null&&Kr(v.value)>N,M=t.disabled===true||t.saving===true,K=v?.readOnly===true||t.openFile?.path===v?.path&&t.openFile?.readOnly===true,J=st.useRef({blocked:M,draft:v,readOnly:K,conflict:C,tooLarge:D});J.current={blocked:M,draft:v,readOnly:K,conflict:C,tooLarge:D};let G=t.preview?.path,te=t.activeView==="diff",U=t.diff?.path??v?.path??t.selectedPath??"";st.useEffect(()=>{if(te||t.preview){let se=te?`diff:${U}`:G;if($&&V.current!==se){S(true);return}v&&w(null),I.current=null,V.current=null,S(false);return}let L=t.openFile;if(!L){$?S(true):(w(null),S(false));return}if(!v||L.path!==v.path){if($&&V.current!==L.path){S(true);return}V.current=null,I.current=null,w(ki(L)),S(false);return}if(L.revision===v.revision&&L.content===v.content)return;let X=I.current;if(X&&X.path===L.path&&L.revision!==X.revision&&L.content===X.content){w({...L,value:v.value}),I.current=null,S(false);return}if($){S(true);return}w(ki(L)),S(false);},[t.openFile?.path,t.openFile?.revision,t.openFile?.content,t.preview,te,t.diff?.identity]),st.useEffect(()=>{if(!$)return;let L=r(X=>{X.preventDefault(),X.returnValue="";},"beforeUnload");return window.addEventListener("beforeunload",L),()=>window.removeEventListener("beforeunload",L)},[$]);let Z=st.useRef(i);Z.current=i,st.useEffect(()=>{Z.current?.({path:v?.path??null,revision:v?.revision??null,dirty:$});},[v?.path,v?.revision,$]);let ae=r(L=>{if(g.current){switch(L.type){case "select":if(e.onSelect)return e.onSelect(L);break;case "expand":if(e.onExpand)return e.onExpand(L);break;case "view-mode":if(e.onViewMode)return e.onViewMode(L);break;case "search":if(e.onSearch)return e.onSearch(L);break;case "edit":if(e.onEdit)return e.onEdit(L);break;case "save":if(e.onSave)return e.onSave(L);break;case "create":if(e.onCreate)return e.onCreate(L);break;case "rename":if(e.onRename)return e.onRename(L);break;case "delete":if(e.onDelete)return e.onDelete(L);break;case "download":if(e.onDownload)return e.onDownload(L);break;case "open-diff":if(e.onOpenDiff)return e.onOpenDiff(L);break;case "refresh":if(e.onRefresh)return e.onRefresh(L);break;case "sourcecontrol":if(e.onSourceControl)return e.onSourceControl(L);break}o?.(L);}},"route"),ie=r(L=>{if(!(M||!g.current)){if(L.type==="delete"||$&&(L.type==="sourcecontrol"||L.type==="open-diff"||L.type==="select"&&L.path!==v?.path)){k(L);return}ae(L);}},"send"),de=r(L=>{!g.current||J.current.draft!==v||!v||M||J.current.blocked||J.current.readOnly||J.current.conflict||K||C||Kr(L)>N||(w({...v,value:L}),ae({type:"edit",path:v.path,expectedRevision:v.revision,content:L}));},"change"),W=r(()=>{!g.current||J.current.draft!==v||!v||M||J.current.blocked||J.current.readOnly||J.current.conflict||J.current.tooLarge||K||C||D||!$||(I.current={path:v.path,revision:v.revision,content:v.value},ae({type:"save",path:v.path,expectedRevision:v.revision,content:v.value}));},"save"),pe=t.viewMode==="detailed"&&u?"compact":t.viewMode??"simple",B=new Set(t.expandedPaths??(()=>{let L=[],X=r(se=>{for(let Y of se)Y.expanded&&L.push(Y.path),Y.children&&X(Y.children);},"visit");return X(t.nodes),L})()),H=(t.search??"").trim().toLocaleLowerCase(c),ne=r(L=>L.flatMap(X=>{let se=X.children?ne(X.children):void 0;return !H||X.name.toLocaleLowerCase(c).includes(H)||X.path.toLocaleLowerCase(c).includes(H)||se?.length?[{...X,children:se}]:[]}),"filterTree"),fe=ne(t.nodes),ye=r(L=>{let X=new Set(B);if(X.has(L.path)?X.delete(L.path):X.add(L.path),X.size>1e4||Kr(JSON.stringify([...X]))>1024*1024){y(true);return}y(false),ie({type:"expand",path:L.path,expandedPaths:[...X]});},"toggle"),xe=r(L=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{children:Number.isSafeInteger(L.size)&&L.size>=0?new Intl.NumberFormat(c).format(L.size):"\u2014"}),jsxRuntime.jsx("span",{children:L.modified?xi(L.modified,"milliseconds",c):"\u2014"}),jsxRuntime.jsx("span",{children:L.permissionsRwx??"\u2014"}),jsxRuntime.jsx("span",{children:L.mimeType??"\u2014"})]}),"metadata"),oe=r(L=>jsxRuntime.jsx("ul",{className:"space-y-1",children:L.map(X=>jsxRuntime.jsxs("li",{children:[jsxRuntime.jsxs("div",{className:pe==="detailed"?"grid min-w-[44rem] grid-cols-[minmax(10rem,1fr)_6rem_10rem_6rem_8rem_auto] items-center gap-2":"flex min-w-0 items-center gap-2",children:[jsxRuntime.jsxs(ve,{className:"min-w-0 flex-1 justify-start truncate border-transparent",classNames:{label:"min-w-0 truncate"},icon:X.type==="directory"?B.has(X.path)?jsxRuntime.jsx(lucideReact.ChevronDown,{size:14}):jsxRuntime.jsx(lucideReact.ChevronRight,{size:14}):jsxRuntime.jsx(lucideReact.FileText,{size:14}),tone:t.selectedPath===X.path?"primary":"muted",size:"sm",type:"button",disabled: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):ie({type:"select",path:X.path}),children:[X.name,X.loading?"\u2026":""]}),pe==="detailed"?xe(X):pe==="compact"&&X.type==="file"?jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:X.mimeType??""}):null,jsxRuntime.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[jsxRuntime.jsx(ve,{size:"sm",tone:"muted","aria-label":d("renameItem",{name:X.name}),disabled:M||$,onClick:()=>{z(X.path),E(X.path),F("rename");},children:jsxRuntime.jsx(lucideReact.Pencil,{size:12})}),jsxRuntime.jsx(ve,{size:"sm",tone:"muted","aria-label":d("downloadItem",{name:X.name}),disabled:M,onClick:()=>ie({type:"download",path:X.path,kind:X.type}),children:jsxRuntime.jsx(lucideReact.Download,{size:12})}),jsxRuntime.jsx(ve,{size:"sm",tone:"muted","aria-label":d("deleteItem",{name:X.name}),disabled:M||K,onClick:()=>ie({type:"delete",path:X.path,kind:X.type}),children:jsxRuntime.jsx(lucideReact.Trash2,{size:12})})]})]}),(B.has(X.path)||H)&&X.children?jsxRuntime.jsx("div",{className:"ml-3 border-l border-border pl-2",children:oe(X.children)}):null]},X.path))}),"tree"),le=v?.path??t.preview?.path??t.openFile?.path,Re=te&&!v,Ie=!v&&!Re?t.preview:null,We=t.diff,ue=We?Kr(We.original)>1024*1024||Kr(We.modified)>1024*1024:false,q=r(()=>Re?t.diffStatus==="loading"?jsxRuntime.jsx("p",{role:"status",children:d("loadingDiff")}):t.diffStatus==="error"?jsxRuntime.jsx("p",{role:"alert",children:d(t.diffErrorCode==="declarative.runtimeFiles.diffTooLarge"?"diffTooLarge":"diffUnavailable")}):ue?jsxRuntime.jsx("p",{role:"status",children:d("diffTooLarge")}):!We||We.isBinary||!s?jsxRuntime.jsx("p",{role:"status",children:d("diffUnavailable")}):s({...We,readOnly:true}):Ie?Ie.kind==="binary"?jsxRuntime.jsx("p",{role:"status",children:d("binaryUnavailable")}):Ie.kind==="too-large"?jsxRuntime.jsx("p",{role:"status",children:d("tooLarge")}):Ie.kind==="image"?a?a(Ie):jsxRuntime.jsx(Bd,{kind:"image",src:Ie.src,alt:Ie.alt??Ie.path,empty:d("imageUnavailable"),error:d("imageUnavailable")}):null:D?jsxRuntime.jsx("div",{role:"status",children:d("tooLarge")}):v?n?n({path:v.path,value:v.value,language:v.language,readOnly:M||K||C,onChange:de,onSave:W}):jsxRuntime.jsx(br,{"aria-label":v.path,value:v.value,readOnly:M||K||C,onChange:L=>de(L.currentTarget.value),onKeyDown:L=>{(L.ctrlKey||L.metaKey)&&L.key.toLowerCase()==="s"&&(L.preventDefault(),W());}}):jsxRuntime.jsx("div",{className:"flex min-h-64 items-center justify-center p-6 text-sm text-muted-foreground",children:d("empty")}),"renderContent");return jsxRuntime.jsxs("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden rounded-md border border-border bg-background","data-monkeys-component":"runtime-file-explorer","data-view-mode":pe,children:[jsxRuntime.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b border-border p-3",children:[t.viewMode!==void 0?jsxRuntime.jsxs(uo,{"aria-label":d("viewMode"),value:t.viewMode,disabled:M,onChange:L=>{let X=L.currentTarget.value;(X==="simple"||X==="compact"||X==="detailed")&&ie({type:"view-mode",value:X});},children:[jsxRuntime.jsx("option",{value:"simple",children:d("simple")}),jsxRuntime.jsx("option",{value:"compact",children:d("compact")}),jsxRuntime.jsx("option",{value:"detailed",children:d("detailed")})]}):null,t.search!==void 0?jsxRuntime.jsxs("form",{className:"flex min-w-0 flex-1 items-center gap-2",onSubmit:L=>{L.preventDefault(),ie({type:"search",value:f});},children:[jsxRuntime.jsx(Qt,{className:"min-w-0 flex-1","aria-label":d("searchFiles"),value:f,disabled:M,onChange:L=>b(L.currentTarget.value)}),jsxRuntime.jsx(ve,{type:"submit",disabled:M,children:d("search")})]}):null]}),h?jsxRuntime.jsx("p",{className:"p-3 text-sm text-destructive-text",role:"alert",children:d("tooManyExpanded")}):null,t.errorCode?jsxRuntime.jsx("p",{className:"p-3 text-sm text-destructive-text",role:"alert",children:d("operationFailed")}):null,jsxRuntime.jsxs("div",{className:pe==="detailed"?"grid min-h-0 flex-1 grid-cols-1":"grid min-h-0 flex-1 grid-cols-1 md:grid-cols-[minmax(16rem,24rem)_minmax(0,1fr)]",children:[jsxRuntime.jsxs("nav",{className:pe==="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:[pe==="detailed"?jsxRuntime.jsx("div",{className:"grid min-w-[44rem] grid-cols-[minmax(10rem,1fr)_6rem_10rem_6rem_8rem_auto] gap-2 text-xs text-muted-foreground",children:["name","size","modified","permissions","type","actions"].map(L=>jsxRuntime.jsx("span",{children:d(L)},L))}):null,fe.length?oe(fe):jsxRuntime.jsx("p",{className:"p-3 text-sm text-muted-foreground",children:d("emptyTree")})]}),jsxRuntime.jsxs("div",{className:"flex min-h-0 min-w-0 flex-col",children:[jsxRuntime.jsxs("div",{className:"flex flex-wrap items-center gap-1 border-b border-border p-2",role:"toolbar","aria-label":d("actions"),children:[jsxRuntime.jsx(ve,{disabled:M,onClick:()=>ie({type:"refresh"}),children:d("refresh")}),jsxRuntime.jsx(ve,{disabled:M,onClick:()=>ie({type:"sourcecontrol"}),children:d("sourceControl")}),jsxRuntime.jsx(ve,{disabled:M,onClick:()=>{F("create"),E("");},children:d("create")}),jsxRuntime.jsx(ve,{disabled:M||!v||K||$,onClick:()=>{z(v?.path??""),F("rename"),E(v?.path??"");},children:d("rename")}),jsxRuntime.jsx(ve,{disabled:M||!v||K,onClick:()=>v&&ie({type:"delete",path:v.path,kind:"file"}),children:d("delete")}),jsxRuntime.jsx(ve,{disabled:M||!le,onClick:()=>le&&ie({type:"download",path:le,kind:"file"}),children:d("download")}),jsxRuntime.jsx(ve,{disabled:M||!le,onClick:()=>le&&ie({type:"open-diff",path:le}),children:d("diff")}),jsxRuntime.jsx(ve,{disabled:M||!$||!v||K||C||D,onClick:W,children:d("save")})]}),R?jsxRuntime.jsxs("form",{className:"flex flex-wrap items-center gap-2 border-b border-border p-3",onSubmit:async L=>{if(L.preventDefault(),!(M||!T.trim()||R==="rename"&&(K||$)))try{R==="rename"?await ae({type:"rename",path:_,newPath:T.trim()}):await ae({type:"create",path:T.trim(),kind:O}),F(null);}catch{}},children:[R==="create"?jsxRuntime.jsxs(uo,{"aria-label":d("kind"),value:O,disabled:M,onChange:L=>j(L.currentTarget.value==="directory"?"directory":"file"),children:[jsxRuntime.jsx("option",{value:"file",children:d("file")}),jsxRuntime.jsx("option",{value:"directory",children:d("directory")})]}):null,jsxRuntime.jsx(Qt,{"aria-label":d("path"),value:T,disabled:M,onChange:L=>E(L.currentTarget.value)}),jsxRuntime.jsx(ve,{type:"submit",disabled:M||!T.trim(),children:d("apply")}),jsxRuntime.jsx(ve,{type:"button",onClick:()=>F(null),children:d("cancel")})]}):null,C?jsxRuntime.jsxs("div",{role:"alert",children:[d("changedExternally"),jsxRuntime.jsx(ve,{disabled:M,onClick:()=>k(te?{type:"open-diff",path:U}:{type:"select",path:t.preview?.path??t.openFile?.path??v?.path??""}),children:d("discardReload")})]}):null,jsxRuntime.jsx("div",{className:"min-h-80 min-w-0 flex-1 overflow-auto",children:q()})]})]}),x?jsxRuntime.jsx(ca,{open:true,onOpenChange:L=>{!L&&!M&&k(null);},children:jsxRuntime.jsxs(ln,{onEscapeKeyDown:L=>{M&&L.preventDefault();},onPointerDownOutside:L=>{M&&L.preventDefault();},children:[jsxRuntime.jsx(rr,{children:d("confirmAction")}),t.errorCode?jsxRuntime.jsx("p",{role:"alert",children:d("operationFailed")}):null,jsxRuntime.jsx(ar,{children:d(x.type==="delete"?"deleteConfirm":"discardConfirm")}),jsxRuntime.jsx(ve,{disabled:M||x.type==="delete"&&K,onClick:async()=>{if(!(M||x.type==="delete"&&K)){x.type==="open-diff"&&(V.current=`diff:${x.path}`,te&&x.path===U&&(w(null),S(false),V.current=null)),x.type==="select"&&(V.current=x.path,t.preview?.path===x.path?(w(null),S(false),V.current=null):t.openFile?.path===x.path&&(w(ki(t.openFile)),S(false),V.current=null));try{await ae(x),k(null);}catch{}}},children:d("confirm")}),jsxRuntime.jsx(ve,{disabled:M,onClick:()=>k(null),children:d("cancel")})]})}):null]})}r($v,"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"})})}),wi=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.",[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.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 Uu={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 Uv({language:e,disabled:t,onSelect:o}){let n=Ne(),[a,s]=st.useState(0),[i,m]=st.useState(false),[c,d]=st.useState(),g=st.useRef({disabled:t,onSelect:o});g.current={disabled:t,onSelect:o};let u=st.useRef(true);st.useEffect(()=>(u.current=true,()=>{u.current=false;}),[]),st.useEffect(()=>{let b=false;return m(false),Promise.all([import('@emoji-mart/react'),import('@emoji-mart/data'),Uu[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=wi[e==="zh"?"zh-CN":"en-US"];if(i)return jsxRuntime.jsxs("div",{role:"alert",className:"flex items-center gap-2 text-sm",children:[p["monkeys.design.emojiPanel.unavailable"],jsxRuntime.jsx(ve,{disabled:t,onClick:()=>s(b=>b+1),children:p["monkeys.design.iconPicker.retry"]})]});if(!c)return jsxRuntime.jsx("div",{role:"status",className:"text-sm text-muted-foreground",children:p["monkeys.design.emojiPanel.loading"]});let{Picker:f}=c;return jsxRuntime.jsx("fieldset",{"data-monkeys-component":"emoji-panel",disabled:t,"aria-disabled":t,className:"min-w-0 [&_em-emoji-picker]:h-80 [&_em-emoji-picker]:w-full [&_em-emoji-picker]:shadow-none",style:{pointerEvents:t?"none":void 0},children:jsxRuntime.jsx(f,{locale:e,data:c.data,i18n:c.i18n,theme:n["data-monkeys-theme-mode"]==="dark"?"dark":"light",dynamicWidth:true,maxFrequentRows:1,navPosition:"bottom",previewPosition:"none",onEmojiSelect:b=>{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(Uv,"LocalizedEmojiPanel");function qu({locale:e,disabled:t=false,onSelect:o}){let n=ht(),a=(e??n.locale).toLowerCase().split("-")[0],s=Object.prototype.hasOwnProperty.call(Uu,a)?a:"en";return jsxRuntime.jsx(Uv,{language:s,disabled:t,onSelect:o},s)}r(qu,"EmojiPanel");function ul(e){if(!e||typeof e!="object"||!("locale"in e)||typeof e.locale!="string"||!("disabled"in e)||typeof e.disabled!="boolean"||!("onSelect"in e)||typeof e.onSelect!="function")throw new TypeError("Invalid emoji picker context.");let t=e.onSelect;return jsxRuntime.jsx(qu,{locale:e.locale,disabled:e.disabled,onSelect:o=>t(o)})}r(ul,"renderIconPickerEmoji");function Gn(e,t){let o=monkeys.I18nTextSchema.safeParse(e);if(!o.success)throw new TypeError("Invalid I18n display text");let n;try{n=Intl.getCanonicalLocales(t)[0]??"";}catch{n="";}let a=n.split("-")[0]??"";return o.data.values[n]??o.data.values[a]??o.data.values[o.data.defaultLocale]}r(Gn,"resolveI18nDisplayText");var Ur=5*1024*1024*1024;function Yu(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(Yu,"filePickerAccepts");function Ju(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>Ur))return {handleId:t.handleId,fileName:t.fileName,size:t.size,mimeType:t.mimeType}}r(Ju,"readTransientFileMetadata");var Zu=".png,.jpg,.jpeg,.webp,.svg";function nk({compactActions:e=false,model:t,onIntent:o,renderEmojiPicker:n=ul,transientFiles:a,translate:s,catalogSource:i}){let{locale:m}=ht(),c=i??(!t.icons.length&&!t.categories.length?runtime.defaultIconPickerCatalogSource:void 0),d=r(N=>{let D=s?.(N);return D&&D!==N?D:wi[m.toLowerCase().startsWith("zh")?"zh-CN":"en-US"][N]??N},"translate"),[g,u]=st.useState(),[p,f]=st.useState("idle"),[b,h]=st.useState(0);st.useEffect(()=>{if(!c||!t.open||t.mode!=="icon"||g?.source===c)return;let N=new AbortController;return f("loading"),c.load(N.signal).then(D=>{N.signal.aborted||(u({source:c,value:D}),f("idle"));}).catch(()=>{N.signal.aborted||f("error");}),()=>N.abort()},[c,t.open,t.mode,b]);let y=c?{...t,...g?.source===c?g.value:{},loading:t.loading||p==="loading",errorCode:t.errorCode??(p==="error"?"monkeys.design.iconPicker.catalogFailed":void 0)}:t,v=st.useRef(null),w=st.useRef(null),[x,k]=st.useState(false),C=r(()=>{let N=w.current;w.current=null,N?.registry.discard(N.handleId);},"release");st.useEffect(()=>()=>C(),[a]),st.useEffect(()=>{y.open||C();},[y.open]);let S=y.disabled===true||y.uploading===true,T=r(N=>{S||o(N);},"emit"),E=r(()=>{S||(C(),o({type:"open-change",open:false,mode:y.mode}));},"close"),R=y.value.kind==="emoji"?y.value.value:y.defaultValue.kind==="emoji"?y.defaultValue.value:"\u{1F340}",F=y.value.kind==="emoji"?y.value.backgroundColor:y.backgroundColors[0],_=r((N,D=F)=>{!N||N.length>64||T({type:"change",value:{kind:"emoji",value:N,...D?{backgroundColor:D}:{}}});},"chooseEmoji"),z=[...new Map(y.customIcons.map(N=>[N.id,N])).values()].slice(0,50),O=y.search.trim().toLowerCase(),j=y.categoryId==="custom-upload",I=(j?z:y.icons).filter(N=>(j||y.categoryId==="all"||N.categoryIds?.includes(y.categoryId))&&(!O||N.id.toLowerCase().includes(O)||N.tags?.some(D=>D.toLowerCase().includes(O)))),V=r(N=>{S||o({type:"open-change",open:y.open,mode:N});},"changeMode"),$=r((N,D,M,K)=>e?jsxRuntime.jsx(lr,{content:d(N),portal:true,children:jsxRuntime.jsx(ve,{label:d(N),iconOnly:true,icon:D,disabled:S,"aria-pressed":K,active:K,onClick:M})}):jsxRuntime.jsx(ve,{type:"button",disabled:S,"aria-pressed":K,active:K,onClick:M,children:d(N)}),"action");return jsxRuntime.jsx("section",{"data-monkeys-component":"icon-picker",className:"flex items-center",children:jsxRuntime.jsxs(fd,{open:y.open,modal:false,onOpenChange:N=>{N?T({type:"open-change",open:true,mode:y.mode}):E();},children:[jsxRuntime.jsx(yd,{asChild:true,children:jsxRuntime.jsx(ve,{type:"button","aria-label":d("monkeys.design.iconPicker.choose"),disabled:S,className:"gap-2 px-2",endIcon:jsxRuntime.jsx(lucideReact.ChevronDown,{"aria-hidden":"true",className:"h-3.5 w-3.5 text-muted-foreground"}),children:jsxRuntime.jsx(Mn,{icon:y.value,alt:d("monkeys.design.iconPicker.current"),className:"h-6 w-6 rounded-sm bg-transparent text-xl text-current"})})}),jsxRuntime.jsxs(_i,{align:"start",sideOffset:8,collisionPadding:12,"aria-label":d("monkeys.design.iconPicker.choose"),className:"flex w-96 max-w-[calc(100vw-24px)] flex-col gap-3 overflow-y-auto p-3",style:{maxHeight:"var(--radix-popover-content-available-height)",transformOrigin:"var(--radix-popover-content-transform-origin)"},onOpenAutoFocus:N=>{y.mode==="icon"&&v.current&&(N.preventDefault(),v.current.focus());},onEscapeKeyDown:N=>{S&&N.preventDefault();},onInteractOutside:N=>{S&&N.preventDefault();},children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[$("monkeys.design.iconPicker.emoji",jsxRuntime.jsx(lucideReact.Smile,{className:"h-4 w-4"}),()=>V("emoji"),y.mode==="emoji"),$("monkeys.design.iconPicker.icon",jsxRuntime.jsx(lucideReact.Shapes,{className:"h-4 w-4"}),()=>V("icon"),y.mode==="icon"),jsxRuntime.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[$("monkeys.design.iconPicker.reset",jsxRuntime.jsx(lucideReact.RotateCcw,{className:"h-4 w-4"}),()=>{S||(o({type:"change",value:y.defaultValue}),o({type:"reset"}),E());}),$("monkeys.design.iconPicker.close",jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"}),E)]})]}),y.mode==="emoji"?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[n({locale:m,disabled:S,onSelect:r(N=>{S||!N||N.length>64||(_(N),E());},"onSelect")}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2 empty:hidden","aria-label":d("monkeys.design.iconPicker.background"),children:y.backgroundColors.map(N=>jsxRuntime.jsx(ve,{className:"h-7 w-7 rounded-md border p-0",type:"button",disabled:S,"aria-label":N,"aria-pressed":N===F,style:{backgroundColor:N},onClick:()=>_(R,N),children:jsxRuntime.jsx("span",{className:"sr-only",children:d("monkeys.design.iconPicker.background")})},N))})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Qt,{ref:v,"aria-label":d("monkeys.design.iconPicker.search"),placeholder:d("monkeys.design.iconPicker.search"),disabled:S,value:y.search,onChange:N=>T({type:"search",value:N.currentTarget.value})}),jsxRuntime.jsx("div",{className:"flex shrink-0 gap-1 overflow-x-auto pb-1","aria-label":d("monkeys.design.iconPicker.categories"),children:y.categories.filter(N=>N.id!=="custom-upload"||a||y.customIcons.length).map(N=>jsxRuntime.jsx(ve,{type:"button",className:"shrink-0",size:"sm",variant:"ghost",disabled:S,active:N.id===y.categoryId,"aria-pressed":N.id===y.categoryId,onClick:()=>T({type:"category-change",categoryId:N.id}),children:Gn(N.labelI18n,m)},N.id))}),j?jsxRuntime.jsxs("label",{children:[d("monkeys.design.iconPicker.upload"),jsxRuntime.jsx(Qt,{type:"file",accept:Zu,disabled:S||!a,onChange:N=>{let D=N.currentTarget.files?.[0];if(N.currentTarget.value="",!D||S||!a)return;let M=y.maxUploadBytes??Ur;if(!Number.isInteger(M)||M<1||M>Ur||D.size>M||!Yu(D,Zu)){k(true);return}C(),k(false);try{let K=a.register(D),J=Ju(K);if(!J){typeof K?.handleId=="string"&&a.discard(K.handleId),k(!0);return}w.current={registry:a,handleId:J.handleId},o({type:"upload",...J});}catch{C(),k(true);}}})]}):null,x?jsxRuntime.jsx("div",{role:"alert",children:d("monkeys.design.iconPicker.uploadFailed")}):null,y.loading?jsxRuntime.jsx("div",{role:"status",children:d("monkeys.design.iconPicker.loading")}):y.errorCode?jsxRuntime.jsxs("div",{role:"alert",children:[d(y.errorCode),jsxRuntime.jsx(ve,{disabled:S,onClick:()=>{h(N=>N+1),T({type:"retry"});},children:d("monkeys.design.iconPicker.retry")})]}):jsxRuntime.jsxs("div",{className:"grid min-h-0 max-h-64 grid-cols-7 gap-1 overflow-auto",onKeyDown:N=>{let D=Array.from(N.currentTarget.querySelectorAll("button:not(:disabled)")),M=D.indexOf(N.target);if(M<0)return;let K={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7}[N.key],J=N.key==="Home"?0:N.key==="End"?D.length-1:K===void 0?void 0:Math.max(0,Math.min(D.length-1,M+K));J!==void 0&&(N.preventDefault(),D[J]?.focus());},children:[I.map(N=>jsxRuntime.jsxs(ve,{className:"relative h-10 min-w-0 p-1",variant:"ghost",active:JSON.stringify(N.icon)===JSON.stringify(y.value),type:"button",title:N.id,"aria-label":N.id,disabled:S,onClick:()=>{S||(o({type:"change",value:N.icon}),E());},children:[jsxRuntime.jsx(Mn,{icon:N.icon,alt:N.id,className:"h-7 w-7 rounded-sm bg-transparent text-2xl text-current"}),jsxRuntime.jsx("span",{className:"sr-only",children:N.id})]},N.id)),I.length?null:jsxRuntime.jsx("p",{className:"col-span-7 py-3 text-center text-sm text-muted-foreground",children:d("monkeys.design.iconPicker.empty")})]})]})]})]})})}r(nk,"IconPicker");function pl(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(pl,"initialLayoutCanvasMountedIds");function rk(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(rk,"layoutCanvasRetainedMountLimit");function em(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=pl(e.items),a=rk(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(em,"projectLayoutCanvasMounting");function am({items:e,mode:t,selectedWidgetId:o,draggingWidgetId:n,resizingWidgetId:a,renderItem:s}){let i=st.useRef(null),m=JSON.stringify(e.map(h=>[h.id,h.layout.x,h.layout.y])),[c,d]=st.useState(()=>pl(e)),[g,u]=st.useState([]),p=st.useMemo(()=>em({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);st.useEffect(()=>{u(h=>JSON.stringify(h)===f?h:p.retainedOrder);},[f]),st.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 w=new IntersectionObserver(x=>{if(!y)return;for(let C of x){let S=C.target.dataset.layoutMountId;S&&v.set(S,C.isIntersecting);}let k=[...v].filter(([,C])=>C).map(([C])=>C);d(C=>JSON.stringify(C)===JSON.stringify(k)?C:k);},{root:null,rootMargin:`${720}px 0px ${720}px 0px`,threshold:0});for(let x of h.children)w.observe(x);return ()=>{y=false,w.disconnect();}},[m]);let b=new Set(p.mountedIds);return jsxRuntime.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=>jsxRuntime.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(am,"LayoutCanvasGrid");var Si="application/x-monkeys-layout-catalog-item";var jn={columns:24,rowHeight:28,gap:12,maxRows:100,minimum:4},gl=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 Ri(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"?Ri(a.children,t):a.tabs.forEach(s=>Ri(s.children,t)));return n(),t}r(Ri,"runs");var xo=zod.z.string().min(1).max(256).refine(e=>!["__proto__","constructor","prototype"].includes(e)),Ti=zod.z.string().max(8192),sk=zod.z.union([zod.z.object({type:zod.z.enum(["widget","section","tabs"]),id:xo}).strict(),zod.z.object({type:zod.z.literal("tab"),id:xo,tabsId:xo}).strict()]),bl=zod.z.lazy(()=>zod.z.union([zod.z.object({type:zod.z.literal("widget"),id:xo,widgetId:xo}).strict(),zod.z.object({type:zod.z.literal("section"),id:xo,title:Ti.optional(),description:Ti.optional(),children:zod.z.array(bl)}).strict(),zod.z.object({type:zod.z.literal("tabs"),id:xo,title:Ti.optional(),size:zod.z.enum(["large","small"]).optional(),behavior:zod.z.enum(["switch","anchor"]).optional(),tabs:zod.z.array(zod.z.object({id:xo,label:Ti.optional(),target:sk.optional(),children:zod.z.array(bl)}).strict())}).strict()])),lk=zod.z.object({x:zod.z.number().int().min(0),y:zod.z.number().int().min(0),w:zod.z.number().int().min(4).max(24),h:zod.z.number().int().min(4).max(100),minW:zod.z.number().int().min(4).max(24),minH:zod.z.number().int().min(4).max(100)}).strict().refine(e=>e.w>=e.minW&&e.h>=e.minH&&e.x+e.w<=24&&e.y+e.h<=100),dk=zod.z.object({version:zod.z.literal(1),revision:xo,root:zod.z.array(bl),widgets:zod.z.record(xo,zod.z.object({layout:lk}).strict())}).strict();function _n(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=dk.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 Ri(a.root))for(let u=0;u<g.length;u++)for(let p=0;p<u;p++)gl(a.widgets[g[u]].layout,a.widgets[g[p]].layout)&&c();}r(_n,"validateLayoutCanvasModel");function Ni(e,t){if(_n(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 _n(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=(Ri(e.root).find(m=>m.includes(t.widgetId))??[]).filter(m=>m!==t.widgetId).map(m=>e.widgets[m].layout),s=a.some(m=>gl(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=>gl(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 _n(i),{model:i,removedWidgetIds:[]}}r(Ni,"applyLayoutCanvasOperation");function mk({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}){_n(e);let v=st.Children.toArray(n);if(o.length!==v.length||new Set(o).size!==o.length||o.length!==Object.keys(e.widgets).length||o.some(U=>!Object.prototype.hasOwnProperty.call(e.widgets,U)))throw new TypeError("Layout widget content must map each widget exactly once.");let w=new Map(o.map((U,Z)=>[U,v[Z]])),x=st.useRef(null),k=st.useRef(e);k.current=e;let C=st.useRef({id:d,model:e});C.current.id!==d&&(C.current={id:d,model:e});let S=st.useRef(),[T,E]=st.useState(),R=st.useRef(),[F,_]=st.useState(),[z,O]=st.useState(),j=st.useRef();st.useEffect(()=>{R.current=void 0,j.current=void 0,S.current=void 0,E(void 0),_(void 0),O(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"),V=r((U,Z,ae,ie=e)=>{i||t!=="edit"||ie!==k.current||U===Z||!e.root.some(de=>de.id===U)||!e.root.some(de=>de.id===Z)||u?.({sourceNodeId:U,targetNodeId:Z,position:ae,expectedRevision:ie.revision});},"reorder"),$=r(U=>t==="edit"&&e.root.some(Z=>Z.id===U)&&u?jsxRuntime.jsx("button",{type:"button","data-layout-reorder":U,draggable:!i,disabled:i,"aria-label":m.reorder??m.move,onDragStart:Z=>{if(i){Z.preventDefault();return}S.current={id:U,model:e},Z.dataTransfer.setData("application/x-monkeys-layout-root-node",U),Z.dataTransfer.effectAllowed="move";},onDragEnd:()=>{S.current=void 0,E(void 0);},onKeyDown:Z=>{let ae=e.root.findIndex(W=>W.id===U),ie=Z.key==="ArrowUp"?-1:Z.key==="ArrowDown"?1:0;if(!ie)return;Z.preventDefault();let de=e.root[ae+ie];de&&V(U,de.id,ie<0?"before":"after");},children:m.reorder??m.move}):null,"reorderHandle"),N=r(U=>{if(t!=="edit"||!g&&!(U.type==="root"&&u))return null;let Z=JSON.stringify(U);return jsxRuntime.jsx("div",{"data-layout-insert-target":Z,"data-layout-insert-type":U.type,"data-layout-insert-index":U.index,"data-layout-section-id":U.type==="section"?U.sectionId:void 0,"data-layout-tabs-id":U.type==="tab"?U.tabsId:void 0,"data-layout-tab-id":U.type==="tab"?U.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:ae=>{i||!(I()||U.type==="root"&&S.current?.model===e)||(ae.preventDefault(),ae.stopPropagation(),E(Z));},onDragLeave:()=>E(void 0),onDrop:ae=>{if(ae.preventDefault(),ae.stopPropagation(),E(void 0),i||t!=="edit"||k.current!==e)return;let ie=S.current;if(ie&&U.type==="root"){if(S.current=void 0,ae.dataTransfer.getData("application/x-monkeys-layout-root-node")!==ie.id)return;let W=e.root[U.index]??e.root[e.root.length-1];W&&V(ie.id,W.id,U.index<e.root.length?"before":"after",ie.model);return}let de=ae.dataTransfer.getData(Si);I()&&de===d&&g?.({catalogItemId:de,target:U,expectedRevision:e.revision});},children:T===Z?m.insert??m.move:null},`drop:${Z}`)},"dropZone"),D=r((U,Z)=>{if(!(i||t!=="edit"||R.current===U)){if(k.current!==U){h?.({code:"stale-model",revision:U.revision});return}try{let ae=Ni(U,Z);f&&(R.current=U),f?.({expectedRevision:U.revision,...ae,reason:Z.type});}catch{h?.({code:"invalid-operation",revision:U.revision});}}},"commit"),M=r((U,Z,ae)=>{if(i||t!=="edit"||U.button!==0)return;let de=U.currentTarget.closest("[data-layout-grid]")?.getBoundingClientRect().width??0;if(de<=0)return;let W=e.widgets[Z].layout;j.current={pointerId:U.pointerId,x:U.clientX,y:U.clientY,width:de,model:e,operation:ae==="move"?{type:ae,widgetId:Z,x:W.x,y:W.y}:{type:ae,widgetId:Z,w:W.w,h:W.h}},U.currentTarget.setPointerCapture(U.pointerId),U.preventDefault();},"begin"),K=r((U,Z)=>{let ae=j.current;if(!ae||ae.pointerId!==U.pointerId)return;if(k.current!==ae.model||i||t!=="edit"){j.current=void 0,_(void 0);return}let ie=Math.round((U.clientX-ae.x)/((ae.width+jn.gap)/jn.columns)),de=Math.round((U.clientY-ae.y)/(jn.rowHeight+jn.gap)),W=ae.operation,pe=W.type==="move"?{...W,x:W.x+ie,y:W.y+de}:W.type==="resize"?{...W,w:W.w+ie,h:W.h+de}:W;if(Z)j.current=void 0,_(void 0),D(ae.model,pe);else try{_(Ni(ae.model,pe).model);}catch{_(void 0);}},"update"),J=F??e,G=r(U=>jsxRuntime.jsx("button",{type:"button",disabled:i,onClick:()=>O({nodeId:U,model:e}),children:m.remove}),"remove"),te=r((U,Z)=>{let ae=[],ie=[],de=r(()=>{if(!ie.length)return;let W=ie.flatMap(pe=>pe.type==="widget"?[{id:pe.widgetId,node:pe,layout:J.widgets[pe.widgetId].layout}]:[]);ie=[],ae.push(jsxRuntime.jsx(am,{items:W,mode:t,selectedWidgetId:W.find(pe=>pe.node.id===a)?.id,renderItem:({node:pe},B)=>{let H=J.widgets[pe.widgetId].layout,ne=r(fe=>jsxRuntime.jsx("button",{type:"button",disabled:i,"aria-label":m[fe],style:{touchAction:"none"},onPointerDown:ye=>M(ye,pe.widgetId,fe),onPointerMove:ye=>K(ye,false),onPointerUp:ye=>K(ye,true),onPointerCancel:()=>{j.current=void 0,_(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:pe.widgetId,x:H.x+xe[0],y:H.y+xe[1]}:{type:fe,widgetId:pe.widgetId,w:H.w+xe[0],h:H.h+xe[1]}));},children:m[fe]}),"controls");return jsxRuntime.jsxs("div",{"data-layout-widget":pe.widgetId,"data-selected":a===pe.id||void 0,className:"h-full min-h-0 min-w-0 overflow-auto rounded border border-border","data-layout-node-id":pe.id,children:[N({...Z,index:U.indexOf(pe)}),t==="edit"?jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx("button",{type:"button",disabled:i,onClick:()=>p?.({nodeId:pe.id,revision:e.revision}),children:pe.widgetId}),$(pe.id),ne("move"),ne("resize"),G(pe.id)]}):null,B?w.get(pe.widgetId):null]},pe.id)}},W[0].id));},"flush");for(let W of U){if(W.type==="widget"){ie.push(W);continue}if(de(),ae.push(N({...Z,index:U.indexOf(W)})),W.type==="section")ae.push(jsxRuntime.jsxs("section",{"data-layout-node-id":W.id,className:"space-y-3",children:[jsxRuntime.jsxs("header",{children:[jsxRuntime.jsx("h3",{children:t==="edit"?jsxRuntime.jsx("button",{disabled:i,onClick:()=>p?.({nodeId:W.id,revision:e.revision}),children:W.title??W.id}):W.title??W.id}),W.description?jsxRuntime.jsx("p",{children:W.description}):null,$(W.id),t==="edit"?G(W.id):null]}),te(W.children,{type:"section",sectionId:W.id})]},W.id));else {let pe=s[W.id]??W.tabs[0]?.id;ae.push(jsxRuntime.jsxs("section",{"data-layout-node-id":W.id,children:[jsxRuntime.jsx("h3",{children:t==="edit"?jsxRuntime.jsx("button",{disabled:i,onClick:()=>p?.({nodeId:W.id,revision:e.revision}),children:W.title??W.id}):W.title??W.id}),$(W.id),t==="edit"?G(W.id):null,jsxRuntime.jsx("div",{role:"tablist",children:W.tabs.map(B=>jsxRuntime.jsx("button",{type:"button",role:"tab","aria-selected":pe===B.id,disabled:i,onClick:()=>{if(t==="edit"&&p?.({nodeId:B.id,revision:e.revision}),b?.({tabsId:W.id,tabId:B.id,revision:e.revision}),W.behavior!=="anchor"||!B.target)return;let H=B.target;H.type==="tab"&&b?.({tabsId:H.tabsId,tabId:H.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=>H.type==="widget"?ye.dataset.layoutWidget===H.id:H.type==="tab"?ye.dataset.layoutTabId===H.id&&ye.dataset.layoutTabsId===H.tabsId:ye.dataset.layoutNodeId===H.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))}),W.tabs.map(B=>jsxRuntime.jsx("div",{role:"tabpanel","data-layout-tab-id":B.id,"data-layout-tabs-id":W.id,hidden:W.behavior!=="anchor"&&pe!==B.id,children:te(B.children,{type:"tab",tabsId:W.id,tabId:B.id})},B.id))]},W.id));}}return de(),ae.push(N({...Z,index:U.length})),ae},"nodes");return jsxRuntime.jsxs("div",{ref:x,className:y,"data-layout-canvas":true,children:[te(J.root,{type:"root"}),jsxRuntime.jsx(ca,{open:!!z,onOpenChange:U=>{U||O(void 0);},children:jsxRuntime.jsxs(ln,{children:[jsxRuntime.jsx(rr,{children:m.confirmRemove}),jsxRuntime.jsx(ar,{children:m.removeDescription}),jsxRuntime.jsx("button",{type:"button",onClick:()=>O(void 0),children:m.cancel}),jsxRuntime.jsx("button",{type:"button",disabled:i,onClick:()=>{z&&D(z.model,{type:"remove",nodeId:z.nodeId}),O(void 0);},children:m.remove})]})})]})}r(mk,"LayoutCanvas");function gk({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=st.useRef(),m=st.useRef(false),c=r(()=>{let d=i.current;i.current=void 0,d&&d.notify?.({catalogItemId:d.catalogItemId,active:false});},"finish");return st.useEffect(()=>()=>c(),[e,t]),jsxRuntime.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(Si,e),d.dataTransfer.effectAllowed="copy",m.current=true,i.current={catalogItemId:e,notify:s},s?.({catalogItemId:e,active:true});},onDragEnd:c,children:o})}r(gk,"LayoutCatalogItem");function fk({value:e,tokens:t,disabled:o=false,readOnly:n=false,ariaLabel:a,tokenGroupLabel:s,maxLength:i,onChange:m}){let c=st.useRef(null),d=st.useRef(false),g=st.useRef();st.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]),st.useLayoutEffect(()=>()=>{g.current=void 0;},[]);let u=r(p=>i===void 0||p.length<=i,"fits");return jsxRuntime.jsxs("div",{children:[jsxRuntime.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});}}),jsxRuntime.jsx("div",{role:"group","aria-label":s,children:t.map((p,f)=>jsxRuntime.jsx("button",{type:"button",disabled:o||n||p.disabled,onMouseDown:b=>b.preventDefault(),onClick:()=>{let b=c.current;if(!b||o||n||p.disabled||d.current||g.current)return;let 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(fk,"TemplateTextEditor");function hk({model:e,labels:t,locale:o,timeZone:n,disabled:a=false,loading:s=false,onIntent:i}){let{locale:m}=ht(),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 jsxRuntime.jsxs("section",{"aria-busy":s,className:"flex min-h-0 flex-col gap-3 text-sm",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("label",{children:[t.repositories,jsxRuntime.jsxs(uo,{"aria-label":t.repositories,disabled:c,value:e.selectedRepositoryId??"",onChange:p=>g({action:"select-repository",repositoryId:p.currentTarget.value}),children:[jsxRuntime.jsx("option",{value:"",disabled:true,children:t.repositories}),e.repositories.map(p=>jsxRuntime.jsx("option",{value:p.id,children:p.name},p.id))]})]}),jsxRuntime.jsx(ve,{size:"sm",disabled:c,onClick:()=>g({action:"refresh"}),children:t.refresh})]}),s&&jsxRuntime.jsx("p",{role:"status",children:t.loading}),d?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("dl",{className:"flex flex-wrap gap-3",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("dt",{children:t.branch}),jsxRuntime.jsx("dd",{children:d.branch??"\u2014"})]}),d.upstream&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("dt",{children:t.upstream}),jsxRuntime.jsx("dd",{children:d.upstream})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("dt",{children:t.ahead}),jsxRuntime.jsx("dd",{children:d.ahead??0})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("dt",{children:t.behind}),jsxRuntime.jsx("dd",{children:d.behind??0})]})]}),jsxRuntime.jsx("h3",{children:t.status}),d.changes.length===0&&jsxRuntime.jsx("p",{children:t.empty}),jsxRuntime.jsx("ul",{className:"flex flex-col gap-1",children:d.changes.map(p=>jsxRuntime.jsxs("li",{className:"flex flex-wrap items-center gap-2",children:[jsxRuntime.jsx(un,{label:p.status}),jsxRuntime.jsx("span",{className:"min-w-0 break-all",children:p.path}),p.indexStatus&&jsxRuntime.jsx("code",{children:p.indexStatus}),p.worktreeStatus&&jsxRuntime.jsx("code",{children:p.worktreeStatus}),jsxRuntime.jsx(ve,{size:"sm",disabled:c,onClick:()=>g({action:"open-file",repositoryId:d.id,path:p.path}),children:t.openFile}),jsxRuntime.jsx(ve,{size:"sm",disabled:c,onClick:()=>g({action:"open-diff",repositoryId:d.id,path:p.path}),children:t.openDiff})]},p.path))}),jsxRuntime.jsx("h3",{children:t.history}),d.commits.length===0&&jsxRuntime.jsx("p",{children:t.empty}),jsxRuntime.jsx("ol",{className:"flex flex-col gap-2",children:d.commits.map(p=>{let f=e.expandedCommitIds.includes(p.id),b=p.date?new Date(p.date):void 0,h=b&&Number.isFinite(b.getTime());return jsxRuntime.jsxs("li",{children:[jsxRuntime.jsxs(ve,{size:"sm",disabled:c,"aria-expanded":f,onClick:()=>g({action:"toggle-commit",repositoryId:d.id,commitId:p.id,expanded:!f}),children:[p.shortId," ",p.message]}),jsxRuntime.jsxs("div",{className:"flex flex-wrap gap-2",children:[jsxRuntime.jsx("span",{children:p.author}),h&&u?jsxRuntime.jsx("time",{dateTime:b.toISOString(),children:u.format(b)}):jsxRuntime.jsx("span",{children:t.unknownDate}),p.refs?.map(y=>jsxRuntime.jsx(un,{label:y},y))]}),f&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("ul",{children:p.files.slice(0,8).map(y=>jsxRuntime.jsxs("li",{className:"flex gap-2",children:[jsxRuntime.jsx("span",{className:"break-all",children:y.path}),y.status&&jsxRuntime.jsx(un,{label:y.status})]},y.path))}),p.files.length>8&&jsxRuntime.jsxs("p",{children:[t.remainingFiles,": ",p.files.length-8]})]})]},p.id)})})]}):jsxRuntime.jsx("p",{children:t.empty})]})}r(hk,"RuntimeSourceControlView");var vl=1e4,xk=vl+2,um=1024*1024,xl=r(e=>typeof e=="string"&&e.trim().length>0&&e.length<=256&&!/[\u0000-\u001f\u007f-\u009f]/.test(e),"validId");function cm(e){if(e.length>vl)return "ORDERED_SELECTION_LIMIT_EXCEEDED";if(e.some(t=>!xl(t))||new Set(e).size!==e.length)return "ORDERED_SELECTION_INVALID_MODEL";if(new TextEncoder().encode(JSON.stringify(e)).byteLength>um)return "ORDERED_SELECTION_BYTES_EXCEEDED"}r(cm,"validateOrderedSelection");function vk(e){return jsxRuntime.jsx(kk,{...e},JSON.stringify([e.model.scopeId,e.model.revision]))}r(vk,"OrderedSelection");function kk({model:e,onIntent:t,translate:o}){let{locale:n}=ht(),[a,s]=st.useState(()=>[...e.selectedIds]),[i,m]=st.useState(e.search??""),[c,d]=st.useState(""),[g,u]=st.useState(()=>cm(e.selectedIds)),[p,f]=st.useState(0),b=st.useRef(a),h=st.useRef(new Set),y=st.useRef(new Map),v=st.useRef(true),w=st.useRef();st.useEffect(()=>(v.current=true,()=>{v.current=false;}),[]);let x=!!(e.pending||e.readOnly||e.loading),k=st.useRef({blocked:x,model:e});k.current={blocked:x,model:e};let C=r(G=>{v.current&&!k.current.blocked&&t(G);},"emit"),S=e.append&&!h.current.has(e.append.revision)?e.append.rows:[],T=[...e.candidates??[],...S],E=new Set(b.current),R=(e.append?.rows??[]).filter(G=>E.has(G.id));for(let G of [...(e.selectedRows??[]).filter(te=>E.has(te.id)),...R,...T])xl(G.id)&&y.current.set(G.id,G);let F=new Set([...b.current,...T.map(G=>G.id)]);for(let G of y.current.keys())F.has(G)||y.current.delete(G);let _=r(G=>{let te=e.groups??[];if(te.length>xk||te.some(ae=>!xl(ae.id))||new Set(te.map(ae=>ae.id)).size!==te.length)return "ORDERED_SELECTION_INVALID_MODEL";let U=new Map;for(let ae of G)U.set(ae,y.current.get(ae)??{id:ae});for(let ae of T)U.set(ae.id,ae);return new TextEncoder().encode(JSON.stringify({selectedIds:G,rows:[...U.values()],groups:te})).byteLength>um?"ORDERED_SELECTION_BYTES_EXCEEDED":void 0},"displayIssue"),z=r(G=>{let te=y.current.get(G);return te?.labelI18n?Gn(te.labelI18n,n):te?.labelKey?o(te.labelKey):te?.label||G},"label"),O=r((G,te=false)=>{let U=y.current.get(G),ae=[U?.descriptionI18n?Gn(U.descriptionI18n,n):U?.descriptionKey?o(U.descriptionKey):U?.description,U?.showId?G:void 0].filter(ie=>ie!==void 0&&ie!=="").join(" \xB7 ");return jsxRuntime.jsxs("span",{className:"min-w-0 flex-1 overflow-hidden",children:[jsxRuntime.jsxs("span",{className:"block truncate",children:[z(G),te&&U?.missing?` (${o("Unavailable")})`:""]}),ae?jsxRuntime.jsx("span",{className:"block truncate text-xs text-muted-foreground",title:ae,children:ae}):null]})},"rowText"),j=e.selectionMode==="single"?1:Math.min(1e4,e.maxSelected??1e4),I=e.minSelected??0,V=r(G=>{if(k.current.blocked||!v.current)return false;let U=(G.length>j?"ORDERED_SELECTION_LIMIT_EXCEEDED":cm(G))??_(G);return U?(u(U),C({type:"error",scopeId:e.scopeId,code:U}),false):(b.current=G,u(void 0),s(G),C({type:"change",scopeId:e.scopeId,expectedRevision:e.revision,selectedIds:[...G],selectedCount:G.length}),true)},"commit");st.useEffect(()=>{!e.append||e.append.rows.length===0||x||h.current.has(e.append.revision)||V([...new Set([...a,...e.append.rows.map(G=>G.id)])])&&h.current.add(e.append.revision);},[e.append,x,a]);let $=r((G,te)=>{let U=a.indexOf(G);if(U<0||te<0||te>=a.length||U===te)return;let Z=[...a];Z.splice(U,1),Z.splice(te,0,G),V(Z);},"move"),N=r(()=>C({type:"search",scopeId:e.scopeId,value:i.trim()}),"searchNow"),M=!Number.isSafeInteger(I)||!Number.isSafeInteger(j)||I<0||j<0||I>j?"ORDERED_SELECTION_INVALID_MODEL":_(a),K=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 jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-col gap-3","data-ordered-selection":e.scopeId,children:[K?jsxRuntime.jsx("p",{role:"alert",children:o(K)}):null,e.loading?jsxRuntime.jsx("p",{role:"status",children:o("Loading")}):null,e.mode==="ids"?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(br,{"aria-label":o("IDs"),disabled:x,value:c,onChange:G=>d(G.target.value)}),jsxRuntime.jsx(ve,{disabled:x,onClick:()=>{V([...new Set([...a,...c.split(/[\s,;]+/).filter(Boolean)])]);},children:o("Add")})]}):jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[e.groupId!==void 0?jsxRuntime.jsx(uo,{"aria-label":o("Group"),value:e.groupId,disabled:x||e.canBrowse===false,onChange:G=>C({type:"group-change",scopeId:e.scopeId,value:G.currentTarget.value}),children:(e.groups??[]).map(G=>jsxRuntime.jsx("option",{value:G.id,children:G.labelI18n?Gn(G.labelI18n,n):G.labelKey?o(G.labelKey):G.label||G.id},G.id))}):null,jsxRuntime.jsx(Qt,{"aria-label":o("Search"),value:i,disabled:x||e.canBrowse===false,onChange:G=>m(G.target.value),onKeyDown:G=>{G.key==="Enter"&&(G.preventDefault(),N());}}),jsxRuntime.jsx(ve,{disabled:x||e.canBrowse===false,onClick:N,children:o("Search")}),e.allowCreate?jsxRuntime.jsx(ve,{disabled:x,onClick:()=>C({type:"create",scopeId:e.scopeId}),children:o("Create")}):null,jsxRuntime.jsx("div",{className:"w-full space-y-2","data-ordered-candidates":true,style:{maxHeight:384,overflowY:"auto"},children:(e.candidates??[]).map(G=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("label",{className:"flex min-w-0 flex-1 items-center gap-2",children:[jsxRuntime.jsx(dn,{disabled:x||G.disabled,checked:a.includes(G.id),onChange:te=>V(te.currentTarget.checked?e.selectionMode==="single"?[G.id]:[...new Set([...a,G.id])]:a.filter(U=>U!==G.id))}),O(G.id)]}),e.allowCopy?jsxRuntime.jsx(ve,{disabled:x||G.disabled,onClick:()=>C({type:"copy",scopeId:e.scopeId,id:G.id}),children:o("Copy")}):null]},G.id))}),e.pagination?.hasMore&&e.pagination.nextCursor?jsxRuntime.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]}),jsxRuntime.jsx(ve,{className:"self-start",disabled:x||a.length===0,onClick:()=>V([]),children:o("Clear")}),jsxRuntime.jsxs("div",{role:"status","aria-live":"polite",children:[a.length," / ",vl]}),jsxRuntime.jsx("div",{"data-ordered-viewport":true,style:{height:Math.min(384,a.length*48),overflowY:"auto"},onScroll:G=>f(Math.max(0,Math.floor(G.currentTarget.scrollTop/48)-2)),children:jsxRuntime.jsx("ol",{"aria-label":o("Selected"),style:{height:a.length*48,position:"relative",margin:0},children:a.slice(J,J+14).map((G,te)=>{let U=J+te;return jsxRuntime.jsxs("li",{"data-ordered-id":G,"aria-posinset":U+1,"aria-setsize":a.length,style:{position:"absolute",top:U*48,height:48,left:0,right:0,display:"flex",gap:8},onDragOver:Z=>{!x&&w.current&&Z.preventDefault();},onDrop:Z=>{Z.preventDefault(),w.current&&Z.dataTransfer.getData("application/x-monkeys-ordered-selection")===w.current&&$(w.current,U),w.current=void 0;},children:[jsxRuntime.jsx(ve,{"data-ordered-drag":G,"aria-label":o("Move"),disabled:x,draggable:!x,onDragStart:Z=>{if(x)return Z.preventDefault();w.current=G,Z.dataTransfer.setData("application/x-monkeys-ordered-selection",G);},onDragEnd:()=>{w.current=void 0;},onKeyDown:Z=>{(Z.key==="ArrowUp"||Z.key==="ArrowDown")&&(Z.preventDefault(),$(G,U+(Z.key==="ArrowUp"?-1:1)));},children:"\u2195"}),O(G,true),jsxRuntime.jsx(ve,{disabled:x||U===0,"aria-label":o("Move up"),onClick:()=>$(G,U-1),children:"\u2191"}),jsxRuntime.jsx(ve,{disabled:x||U===a.length-1,"aria-label":o("Move down"),onClick:()=>$(G,U+1),children:"\u2193"}),jsxRuntime.jsx(ve,{disabled:x,"aria-label":o("Remove"),onClick:()=>V(a.filter(Z=>Z!==G)),children:"\xD7"})]},G)})})}),jsxRuntime.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.showSubmit!==false?jsxRuntime.jsx(ve,{disabled:x||!!(g||M)||a.length<I||a.length>j,onClick:()=>C({type:"submit",scopeId:e.scopeId,expectedRevision:e.revision,selectedIds:[...a],selectedCount:a.length}),children:o("Save")}):null,e.showCancel!==false?jsxRuntime.jsx(ve,{disabled:x,onClick:()=>C({type:"cancel",scopeId:e.scopeId}),children:o("Cancel")}):null,e.errorCode?jsxRuntime.jsx(ve,{disabled:x,onClick:()=>C({type:"retry",scopeId:e.scopeId}),children:o("Retry")}):null]})]})}r(kk,"SelectionDraft");var Tk={h1:r(({children:e})=>jsxRuntime.jsx("h1",{className:"mb-3 mt-6 text-xl font-bold first:mt-0",children:e}),"h1"),h2:r(({children:e})=>jsxRuntime.jsx("h2",{className:"mb-3 mt-6 text-lg font-semibold first:mt-0",children:e}),"h2"),h3:r(({children:e})=>jsxRuntime.jsx("h3",{className:"mb-2 mt-5 text-base font-semibold first:mt-0",children:e}),"h3"),h4:r(({children:e})=>jsxRuntime.jsx("h4",{className:"mb-2 mt-4 text-sm font-semibold first:mt-0",children:e}),"h4"),p:r(({children:e})=>jsxRuntime.jsx("p",{className:"my-3 break-words leading-6 first:mt-0 last:mb-0",children:e}),"p"),ul:r(({children:e})=>jsxRuntime.jsx("ul",{className:"my-3 list-disc space-y-1 pl-6",children:e}),"ul"),ol:r(({children:e})=>jsxRuntime.jsx("ol",{className:"my-3 list-decimal space-y-1 pl-6",children:e}),"ol"),li:r(({children:e})=>jsxRuntime.jsx("li",{className:"break-words leading-6",children:e}),"li"),blockquote:r(({children:e})=>jsxRuntime.jsx("blockquote",{className:"my-4 border-l-4 border-border bg-muted/35 px-4 py-1 text-muted-foreground",children:e}),"blockquote"),a:r(({children:e,href:t})=>jsxRuntime.jsx("a",{className:"break-all font-medium text-primary underline-offset-4 hover:underline",href:t,target:"_blank",rel:"noreferrer noopener",children:e}),"a"),pre:r(({children:e})=>jsxRuntime.jsx("pre",{className:"my-4 max-w-full overflow-x-auto rounded-lg border border-border/60 bg-muted/45 p-4 text-xs leading-5",children:e}),"pre"),code:r(({className:e,children:t})=>jsxRuntime.jsx("code",{className:l(e,"break-words rounded bg-muted px-1 py-0.5 font-mono text-[0.9em] [pre_&]:break-normal [pre_&]:bg-transparent [pre_&]:p-0"),children:t}),"code"),table:r(({children:e})=>jsxRuntime.jsx("div",{className:"my-4 max-w-full overflow-x-auto rounded-lg border border-border/60",children:jsxRuntime.jsx("table",{className:"min-w-full border-collapse text-sm",children:e})}),"table"),thead:r(({children:e})=>jsxRuntime.jsx("thead",{className:"bg-muted/55",children:e}),"thead"),tbody:r(({children:e})=>jsxRuntime.jsx("tbody",{className:"divide-y divide-border/60",children:e}),"tbody"),tr:r(({children:e})=>jsxRuntime.jsx("tr",{className:"divide-x divide-border/60",children:e}),"tr"),th:r(({children:e})=>jsxRuntime.jsx("th",{className:"whitespace-nowrap px-3 py-2 text-left font-semibold",children:e}),"th"),td:r(({children:e})=>jsxRuntime.jsx("td",{className:"min-w-32 px-3 py-2 align-top",children:e}),"td"),hr:r(()=>jsxRuntime.jsx("hr",{className:"my-6 border-border"}),"hr")};function Rk({content:e,className:t}){let o=String(e||"").trim();return o?jsxRuntime.jsx("div",{className:l("min-w-0 max-w-full text-sm text-foreground",t),"data-monkeys-component":"markdown-content",children:jsxRuntime.jsx(wk__default.default,{remarkPlugins:[Sk__default.default],components:Tk,skipHtml:true,urlTransform:wk.defaultUrlTransform,children:o})}):jsxRuntime.jsx("div",{className:l("text-sm text-muted-foreground",t),children:"\u2014"})}r(Rk,"MarkdownContent");function Nk({viewMode:e="list",heading:t,metadata:o,message:n,actions:a,outputs:s,children:i,className:m,...c}){return jsxRuntime.jsxs("article",{...c,"data-monkeys-component":"workbench-task-card","data-view-mode":e,className:l("border-border/70 font-[family-name:var(--font-sans)] text-sm leading-5",e==="grid"?"flex h-full flex-col gap-global rounded-lg border bg-card p-global shadow-sm":"grid items-center gap-global border-b py-global last:border-b-0 lg:grid-cols-2",m),children:[jsxRuntime.jsxs("div",{"data-task-part":"details",className:l("flex min-w-0 flex-col",e==="grid"?"flex-1":"min-h-60"),children:[jsxRuntime.jsx("div",{className:"mb-global flex flex-wrap items-center gap-global",children:t}),o!=null&&jsxRuntime.jsx("div",{className:"mb-global flex flex-wrap items-center gap-global text-sm tabular-nums text-muted-foreground [&_span]:text-inherit [&_time]:text-inherit",children:o}),i,n!=null&&jsxRuntime.jsx("div",{className:"mt-global break-words text-sm text-destructive-text",children:n}),a!=null&&jsxRuntime.jsx("div",{className:"mt-auto flex flex-wrap gap-global pt-global",children:a})]}),s!=null&&jsxRuntime.jsx("div",{"data-task-part":"outputs",className:l("min-w-0 w-full",e==="grid"&&"-order-1"),children:s})]})}r(Nk,"WorkbenchTaskCard");function Ek({title:e,filters:t,sortOrder:o,viewMode:n,onSortOrderChange:a,onViewModeChange:s,labels:i,disabled:m,className:c}){return jsxRuntime.jsx(Es,{"data-monkeys-component":"workbench-task-toolbar",classNames:{root:"min-h-0 flex-row flex-wrap items-center gap-global border-0 p-0 font-[family-name:var(--font-sans)] text-sm leading-5",end:"max-w-full flex-wrap gap-global"},className:c,end:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[t,jsxRuntime.jsxs("div",{className:"flex items-center gap-global",children:[jsxRuntime.jsx(ve,{type:"button",variant:"outline",disabled:m,title:i.sort,icon:o==="latest"?jsxRuntime.jsx(lucideReact.ArrowDownWideNarrow,{}):jsxRuntime.jsx(lucideReact.ArrowUpNarrowWide,{}),className:"h-10 min-w-28 gap-global rounded-lg bg-muted/40 px-global py-global-1/2 text-sm font-medium shadow-none hover:bg-muted/70",onClick:()=>a(o==="latest"?"oldest":"latest"),children:o==="latest"?i.latest:i.oldest}),jsxRuntime.jsx(ve,{type:"button",variant:"outline",disabled:m,icon:n==="list"?jsxRuntime.jsx(lucideReact.Grid2X2,{}):jsxRuntime.jsx(lucideReact.LayoutList,{}),className:"h-10 gap-global rounded-lg bg-muted/40 px-global py-global-1/2 text-sm font-medium shadow-none hover:bg-muted/70",onClick:()=>s(n==="list"?"grid":"list"),children:n==="list"?i.gridView:i.listView})]})]}),children:e})}r(Ek,"WorkbenchTaskToolbar");function Wk({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 jsxRuntime.jsxs("div",{"data-monkeys-component":"workbench-task-outputs",role:"region","aria-label":a,tabIndex:0,className:l("flex w-full min-w-0 snap-x snap-proximity items-center gap-global overflow-x-auto py-global-1/2 font-[family-name:var(--font-sans)] text-sm leading-5 focus-visible:outline focus-visible:outline-2",g),children:[t,e.map(p=>p.kind==="media"?d?jsxRuntime.jsx("button",{type:"button",onClick:()=>d(p),"aria-label":p.previewLabel||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):jsxRuntime.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):jsxRuntime.jsx("pre",{className:"h-60 w-full min-w-0 shrink-0 snap-start overflow-auto whitespace-pre-wrap break-words rounded-lg border bg-muted/20 p-global font-[family-name:var(--font-sans)] text-sm leading-5",children:p.content},p.id)),!(o??(e.length>0||!!t))&&(m?jsxRuntime.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:jsxRuntime.jsx("span",{"aria-hidden":"true",className:"size-16 animate-spin rounded-full border-[8px] border-muted-foreground/40 border-t-foreground motion-reduce:animate-none sm:size-20"})}):jsxRuntime.jsx("div",{className:"flex min-h-60 w-full items-center justify-center rounded-lg border border-dashed bg-muted/20 p-global text-center text-sm text-muted-foreground",children:c}))]})}r(Wk,"WorkbenchTaskOutputs");function Fk({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?jsxRuntime.jsx(jsxRuntime.Fragment,{children:d({src:e,kind:t,alt:o,expanded:n,loadingLabel:i,errorLabel:m})}):a?jsxRuntime.jsx("span",{role:"status","aria-label":i,children:jsxRuntime.jsx(lucideReact.Loader2,{"aria-hidden":"true",className:"size-6 animate-spin text-muted-foreground motion-reduce:animate-none"})}):s||!e||t==="3d"?jsxRuntime.jsx("span",{role:"img","aria-label":m,children:jsxRuntime.jsx(lucideReact.ImageOff,{"aria-hidden":"true",className:"size-6 text-muted-foreground"})}):t==="video"?jsxRuntime.jsxs("span",{className:n?"contents":"relative block size-full",children:[jsxRuntime.jsx("video",{src:e,"aria-label":o,controls:n,playsInline:true,preload:"metadata",onError:c,className:n?"max-h-[75vh] max-w-full":"size-full object-contain"}),!n&&jsxRuntime.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:jsxRuntime.jsx("span",{className:"flex size-12 items-center justify-center rounded-full bg-[hsl(var(--monkeys-color-media-overlay)/0.6)] shadow-md sm:size-14",children:jsxRuntime.jsx(lucideReact.Play,{className:"ml-0.5 size-5 !fill-[hsl(var(--monkeys-color-media-foreground))] !stroke-[hsl(var(--monkeys-color-media-foreground))] sm:size-6"})})})]}):jsxRuntime.jsx(nr,{src:e,alt:o,loading:"lazy",onError:c,className:n?"h-auto w-auto max-h-[75vh] max-w-full":void 0})}r(Fk,"WorkbenchTaskMedia");function Kk({text:e,labels:t,className:o}){let n=st.useId(),a=st.useRef(null),[s,i]=st.useState(false),[m,c]=st.useState(false),d=e||t.empty;return st.useEffect(()=>{i(false);},[d]),st.useEffect(()=>{let g=a.current;if(!g)return;let u=r(()=>{let f=Number.parseFloat(getComputedStyle(g).lineHeight);c(g.scrollHeight>f*3+1);},"measure");if(u(),typeof ResizeObserver>"u")return;let p=new ResizeObserver(u);return p.observe(g),()=>p.disconnect()},[d]),jsxRuntime.jsxs("div",{"data-monkeys-component":"workbench-task-prompt",className:l("min-w-0 font-[family-name:var(--font-sans)] text-sm leading-5",o),children:[jsxRuntime.jsx("p",{ref:a,id:n,className:l("whitespace-pre-wrap break-words text-sm leading-5 text-foreground [overflow-wrap:anywhere]",!s&&"line-clamp-3"),children:d}),m&&jsxRuntime.jsxs("button",{type:"button","aria-expanded":s,"aria-controls":n,onClick:()=>i(g=>!g),className:"mt-global-1/2 inline-flex min-h-8 items-center gap-global-1/2 rounded-lg px-global-1/2 text-sm font-medium text-foreground underline underline-offset-4 hover:bg-muted focus-visible:outline focus-visible:outline-2",children:[s?t.less:t.more,s?jsxRuntime.jsx(lucideReact.ChevronUp,{"aria-hidden":"true",className:"size-4"}):jsxRuntime.jsx(lucideReact.ChevronDown,{"aria-hidden":"true",className:"size-4"})]})]})}r(Kk,"WorkbenchTaskPrompt");function Uk({kind:e="media",viewMode:t="list",text:o,previewLabel:n,children:a,onPreview:s}){if(e==="text")return jsxRuntime.jsx("pre",{className:"h-60 w-full min-w-0 shrink-0 snap-start overflow-auto whitespace-pre-wrap break-words rounded-lg border bg-muted/20 p-global font-[family-name:var(--font-sans)] text-sm leading-5",children:o??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?jsxRuntime.jsx("button",{type:"button",className:l(i,"focus-visible:outline focus-visible:outline-2"),"aria-label":n,onClick:s,children:a}):jsxRuntime.jsx("div",{className:i,children:a})}r(Uk,"WorkbenchTaskOutputItem");function Xk({filename:e,preview:t,previewLabel:o,downloadLabel:n,downloading:a=false,disabled:s=false,onPreview:i,onDownload:m}){return jsxRuntime.jsxs("div",{className:"flex size-full min-h-0 flex-col font-[family-name:var(--font-sans)] text-sm leading-5","data-monkeys-component":"workbench-task-spreadsheet",children:[t?jsxRuntime.jsx("button",{type:"button",onClick: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}):jsxRuntime.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-global-1/2",children:jsxRuntime.jsx(lucideReact.FileSpreadsheet,{className:"size-10 text-green-600","aria-hidden":"true"})}),jsxRuntime.jsxs("div",{className:"flex shrink-0 items-center gap-global-1/2 border-t p-global-1/2",children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[jsxRuntime.jsx("p",{className:"line-clamp-2 break-all text-sm font-medium",title:e,children:e}),jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:"XLSX"})]}),jsxRuntime.jsx("button",{type:"button","aria-label":n,title:n,disabled: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?jsxRuntime.jsx(lucideReact.Loader2,{className:"size-4 animate-spin motion-reduce:animate-none"}):jsxRuntime.jsx(lucideReact.Download,{className:"size-4"})})]})]})}r(Xk,"WorkbenchTaskSpreadsheet");function ew({startTime:e,endTime:t,running:o=false,mode:n="absolute",className:a}){let{locale:s}=ht(),[i,m]=st.useState(Date.now);st.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 jsxRuntime.jsx("span",{className:a,children:b<60?`${b.toFixed(2)}s`:b<3600?`${Math.floor(b/60)}m ${Math.floor(b%60)}s`:`${Math.floor(b/3600)}h ${Math.floor(b%3600/60)}m`})}let d=new Intl.DateTimeFormat(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 jsxRuntime.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(ew,"WorkbenchTaskTime");function sw({item:e,playLabel:t,selectionMode:o}){let[n,a]=st.useState(false);if(st.useEffect(()=>a(false),[e.thumbnailSrc,e.src]),e.notice||e.status==="blocked")return jsxRuntime.jsx("div",{className:"flex size-full items-center justify-center bg-muted p-2 text-center text-xs text-muted-foreground",children:e.notice});let s=n?e.src:e.thumbnailSrc||e.src;if(!s)return jsxRuntime.jsx("div",{className:"size-full bg-muted","aria-hidden":"true"});if(e.mediaType==="video"){let i=jsxRuntime.jsx("span",{className:"rounded-full bg-foreground/60 p-2 text-background",children:jsxRuntime.jsx(lucideReact.Play,{className:"size-4 fill-current"})});return jsxRuntime.jsxs("div",{className:"relative size-full",children:[jsxRuntime.jsx("video",{src:s,muted:true,playsInline:true,preload:"metadata",className:"size-full object-cover","aria-label":e.alt}),jsxRuntime.jsx(ve,{ariaLabel:t,tabIndex:o?-1:0,variant:"ghost",className:"absolute inset-0 size-full rounded-none border-0 p-0",icon:i})]})}return jsxRuntime.jsx("img",{src:s,alt:e.alt??"",loading:"lazy",onError:()=>{!n&&e.src&&s!==e.src&&a(true);},className:"size-full object-cover opacity-100"})}r(sw,"HistoryMedia");function lw({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:w,onExpandedChange:x,onSelectionModeChange:k,onSelectedIdsChange:C,onItemActivate:S,onDelete:T,onItemDragStart:E}){let R=st.useRef(null),[F,_]=st.useState(),[z,O]=st.useState(false),[j,I]=st.useState(false),[V,$]=st.useState([]),N=i??z,D=c??j,M=m??V,K=st.useMemo(()=>new Set(M),[M]),J=st.useRef(M);J.current=M;let G=Number.isFinite(f)&&f>0?f:1;st.useLayoutEffect(()=>{if(!N||!R.current)return;let B=0,H=r(()=>{let ye=R.current?.getBoundingClientRect();ye&&_({left:ye.left,width:ye.width,bottom:Math.max(0,window.innerHeight-ye.bottom)});},"measure"),ne=r(()=>{cancelAnimationFrame(B),B=requestAnimationFrame(H);},"schedule");H();let fe=typeof ResizeObserver=="function"?new ResizeObserver(ne):void 0;return fe?.observe(R.current),window.addEventListener("resize",ne),window.addEventListener("scroll",ne,true),()=>{fe?.disconnect(),cancelAnimationFrame(B),window.removeEventListener("resize",ne),window.removeEventListener("scroll",ne,true);}},[N]),st.useEffect(()=>{let B=new Set(e.map(ne=>ne.id)),H=M.filter(ne=>B.has(ne));H.length!==M.length&&($(H),C?.(H));},[e,M,C]);let te=r(B=>{i===void 0&&O(B),x?.(B);},"setExpanded"),U=r(B=>{c===void 0&&I(B),k?.(B),B||Z([]);},"setSelection"),Z=r(B=>{J.current=B,m===void 0&&$(B),C?.(B);},"updateSelection"),ae=r(B=>{if(p||B.selectable===false)return;let H=J.current;Z(H.includes(B.id)?H.filter(ne=>ne!==B.id):[...H,B.id]);},"toggle"),ie=r(B=>{let H=K.has(B.id),ne=B.selectable!==false&&!p;return jsxRuntime.jsxs("div",{"data-history-selection-key":B.id,"data-history-item-id":B.id,role:D?"checkbox":"button","aria-checked":D?H: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(),ae(B)):B.disabled||S?.(B);},onKeyDown:fe=>{(fe.key===" "||fe.key==="Enter")&&(fe.preventDefault(),D?ae(B):B.disabled||S?.(B));},...B.dataAttributes,className:l("relative aspect-square min-w-0 overflow-hidden rounded-md border border-border/60 bg-muted outline-hidden transition-[box-shadow,border-color,opacity] focus-visible:ring-2 focus-visible:ring-ring",H&&"border-primary ring-2 ring-primary/70",B.disabled&&"opacity-60",D&&ne&&"cursor-pointer",g),children:[jsxRuntime.jsx(sw,{item:B,playLabel:u.playVideo,selectionMode:D}),D&&ne?jsxRuntime.jsx("span",{className:"pointer-events-none absolute right-1 top-1 z-10 rounded-full bg-background/85 p-0.5",children:jsxRuntime.jsx(dn,{checked:H,controlSize:"sm","aria-hidden":"true",tabIndex:-1,readOnly:true})}):null]},B.id)},"renderItem"),de=r(B=>jsxRuntime.jsx(Xo,{items:e,config:{getItemKey:r(H=>H.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:jsxRuntime.jsx("span",{"aria-hidden":"true",className:"block h-px"})},callbacks:{onLoadMore:B==="grid"||!N?w:void 0},renderItem:ie}),"collection"),W=r((B,H,ne,fe=false)=>jsxRuntime.jsx(ve,{icon:jsxRuntime.jsx(B,{}),iconOnly:true,ariaLabel:H,size:"md",variant:y,className:h,disabled:fe,onClick:ne}),"button"),pe=jsxRuntime.jsxs("div",{role:"alert",className:"flex min-h-20 flex-col items-center justify-center gap-1 p-2 text-center text-sm",children:[jsxRuntime.jsx("span",{children:u.loadError}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:u.loadErrorDescription}),v?jsxRuntime.jsx(ve,{size:"sm",variant:"outline",label:u.retry,onClick:v}):null]});return jsxRuntime.jsxs("div",{ref:R,"data-workbench-history-result":true,className:l("relative w-full min-w-0 max-w-full rounded-lg",b,d),children:[e.length?jsxRuntime.jsxs("div",{className:"flex min-w-0 items-center gap-2 p-3",children:[W(N?lucideReact.Minimize2:lucideReact.Maximize2,N?u.collapse:u.expand,()=>te(!N)),jsxRuntime.jsx("div",{className:"min-w-0 flex-1",children:de("rail")})]}):t?jsxRuntime.jsx(jo,{title:u.loading,variant:"spinner",className:"min-h-20 p-2"}):n?pe:jsxRuntime.jsx(fa,{title:u.empty,className:"min-h-20 p-2"}),N&&typeof document<"u"?reactDom.createPortal(jsxRuntime.jsxs("div",{"data-history-expanded":true,className:l("fixed z-50 rounded-lg border border-border bg-card text-card-foreground shadow-xl",b),style:{left:F?.left??0,width:(F?.width??0)/G,bottom:F?.bottom??0,transform:`scale(${G})`,transformOrigin:"left bottom"},children:[jsxRuntime.jsxs("div",{className:"max-h-[50vh] overflow-y-auto p-3",style:{marginBottom:72,maxHeight:"50vh",overflowY:"auto"},children:[de("grid"),n&&e.length?jsxRuntime.jsxs("div",{role:"alert",className:"flex items-center gap-2 text-xs",children:[u.refreshError,v?jsxRuntime.jsx(ve,{size:"sm",label:u.retry,onClick:v}):null]}):null]}),jsxRuntime.jsxs("div",{className:"absolute inset-x-3 bottom-3 flex items-center justify-between gap-2",children:[W(lucideReact.Minimize2,u.collapse,()=>te(false)),jsxRuntime.jsx("div",{className:"flex items-center gap-1.5",children:D?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"rounded-full border border-border px-2 py-1 text-xs",children:u.selectedCount}),W(lucideReact.X,u.exitSelection,()=>U(false),p),T?W(lucideReact.Trash2,u.deleteSelected,()=>{p||T(M);},!M.length||p):null]}):T?W(lucideReact.Trash2,u.enterSelection,()=>U(true),p):null})]})]}),document.body):null]})}r(lw,"WorkbenchHistoryResult");function mw({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=st.useId(),v=st.useRef(null),[w,x]=st.useState(false),[k,C]=st.useState(null),S=st.useRef(false),T=st.useRef(false);st.useEffect(()=>{e||(S.current=false,C(null),x(false));},[e]);let E=d,R=r(z=>{!E&&!T.current&&f?.(z);},"close"),F=r(async()=>{if(!(!n.trim()||E||T.current||S.current||!h)){T.current=true,x(true);try{await h();}finally{T.current=false;}}},"create"),_={radius:"lg"};return jsxRuntime.jsx(ba,{open:e,onOpenChange:R,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:jsxRuntime.jsxs("div",{className:"flex justify-end gap-2",children:[jsxRuntime.jsx(ve,{size:"lg",appearance:_,className:"text-sm",disabled:E,onClick:()=>R(false),children:m}),jsxRuntime.jsx(ve,{size:"lg",tone:"primary",appearance:{..._,slots:{buttonPrimary:"border-primary bg-primary text-primary-foreground hover:bg-primary/90"}},className:"text-sm",loading:d,disabled:E||!n.trim(),onClick:F,children:i})]}),children:jsxRuntime.jsxs("div",{className:"space-y-4","data-monkeys-component":"create-collection-dialog",children:[jsxRuntime.jsxs("div",{className:"space-y-2 py-2",children:[jsxRuntime.jsx("label",{htmlFor:y,className:"text-sm font-medium leading-5",children:a}),jsxRuntime.jsx(or,{ref:v,id:y,maxLength:80,"aria-label":a,placeholder:s,value:k??n,disabled:E,onCompositionStart:z=>{S.current=true,C(z.currentTarget.value);},onCompositionEnd:z=>{S.current=false,C(null),b?.(z.currentTarget.value);},onChange:z=>{S.current?C(z.currentTarget.value):b?.(z.currentTarget.value);},onKeyDown:z=>{z.key==="Enter"&&!z.nativeEvent.isComposing&&!S.current&&(z.preventDefault(),F());}})]}),w&&!d&&u&&g&&jsxRuntime.jsx("div",{role:"alert",className:"text-sm text-destructive-text",children:g})]})})}r(mw,"WorkbenchCreateCollectionDialog");function xw({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:w,showCreateError:x=true,showConfirmError:k=true,className:C,onOpenChange:S,onSelectedIdChange:T,onNameChange:E,onCreate:R,onConfirm:F}){let _=st.useId(),z=st.useRef(null),O=st.useRef(false),j=st.useRef(false),[I,V]=st.useState(null);st.useEffect(()=>{e||(O.current=false);},[e]);let $=h||y||I!==null,N=t.some(K=>K.id===o),D=r(K=>{!$&&!j.current&&S?.(K);},"close"),M=r(async K=>{let J=K==="create"?R:F;if(!($||j.current||!J||(K==="create"?!n.trim()||O.current:!N))){j.current=true,V(K);try{await J();}catch{}finally{j.current=false,V(null);}}},"submit");return jsxRuntime.jsx(ba,{open:e,onOpenChange:D,title:a,description:s,closeLabel:u,portal:true,closeOnEscape:!$,closeOnOverlayClick:!$,showCloseButton:!$,initialFocus:"explicit",initialFocusRef:z,className:C,classNames:{panel:"w-full max-w-[480px] gap-global-2 p-6",header:"border-0 p-0",title:"text-lg font-semibold leading-tight",description:"text-sm text-muted-foreground",body:"-m-1 min-h-0 p-1",footer:"border-0 p-0"},footer:jsxRuntime.jsxs("div",{className:"flex justify-end gap-global",children:[jsxRuntime.jsx(ve,{variant:"outline",className:"h-10",appearance:{radius:"lg"},disabled:$,onClick:()=>D(false),children:g}),jsxRuntime.jsx(ve,{variant:"outline",className:"h-10",appearance:{radius:"lg"},disabled:$||!N,loading:y||I==="confirm",onClick:()=>M("confirm"),children:d})]}),children:jsxRuntime.jsxs("div",{className:"flex min-h-0 flex-col gap-global-2","data-monkeys-component":"add-to-collection-dialog","aria-busy":$||b,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-global",children:[jsxRuntime.jsx(or,{ref:z,id:_,"aria-label":i,placeholder:m,appearance:"shadow",className:"min-w-0 flex-1",value:n,disabled:$,onChange:K=>E?.(K.currentTarget.value),onCompositionStart:()=>{O.current=true;},onCompositionEnd:()=>{O.current=false;},onKeyDown:K=>{K.key==="Enter"&&!K.nativeEvent.isComposing&&!O.current&&(K.preventDefault(),M("create"));}}),jsxRuntime.jsx(ve,{variant:"outline",appearance:{radius:"lg"},icon:jsxRuntime.jsx(lucideReact.FolderPlus,{}),className:"h-10 shrink-0",disabled:$||!n.trim(),loading:h||I==="create",onClick:()=>M("create"),children:c})]}),x&&v&&jsxRuntime.jsx("p",{role:"alert",className:"text-sm text-destructive-text",children:v}),jsxRuntime.jsx("div",{className:"-m-1 flex max-h-80 min-h-0 flex-col gap-global overflow-y-auto p-1",role:"group","aria-label":a,children:t.length===0?jsxRuntime.jsx("p",{role:"status",className:"rounded-lg border border-dashed border-border px-global-2 py-global-2 text-center text-sm text-muted-foreground",children:b?p:f}):t.map(K=>jsxRuntime.jsx(ve,{variant:"outline",icon:jsxRuntime.jsx(lucideReact.FolderOpen,{className:"size-4 shrink-0","aria-hidden":"true"}),endIcon:o===K.id?jsxRuntime.jsx(lucideReact.Check,{className:"size-4 shrink-0","aria-hidden":"true"}):void 0,label:K.name,classNames:{label:"min-w-0 flex-1 truncate text-left"},"aria-pressed":o===K.id,disabled:$,className:l("flex h-10 w-full shrink-0 items-center justify-start gap-global rounded-lg border px-global-2 py-global text-left text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",o===K.id?"border-foreground bg-muted text-foreground":"border-border bg-background text-foreground hover:bg-muted"),onClick:()=>T?.(K.id)},K.id))}),k&&w&&jsxRuntime.jsx("p",{role:"alert",className:"text-sm text-destructive-text",children:w})]})})}r(xw,"WorkbenchAddToCollectionDialog");
|
|
64
|
+
var Cm=Object.defineProperty;var r=(e,t)=>Cm(e,"name",{value:t,configurable:true});function l(...e){return tailwindMerge.twMerge(e.filter(Boolean).join(" "))}r(l,"cn");function A(e){return e!=null&&typeof e!="boolean"}r(A,"hasRenderableNode");function Pl(e){return typeof e=="string"?e.trim().length>0:A(e)}r(Pl,"hasNonEmptyRenderableNode");var Im=st.createContext(void 0);function El(e){let t=st.useContext(Im);return st.useMemo(()=>e?t?{...t,...e,slots:{...t.slots,...e.slots},styles:{...t.styles,...e.styles}}:e:t,[e,t])}r(El,"useDataExplorerAppearance");function Ft(...e){return e.filter(Boolean).join(" ")}r(Ft,"cn");function Jn(e,t){return typeof e=="function"?e(t):e}r(Jn,"resolveDataExplorerValue");var Mm={},Wl={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"},Bm={flush:{surfaceRoot:"relative flex h-full min-h-0 w-full min-w-0 overflow-hidden"}},Pm={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"}},Em={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"}},Dm={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"}},Wm={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"}},Dl={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"}},Lm={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"}},Am=Object.keys(Wl);function zm(...e){return Am.reduce((t,o)=>(t[o]=Ft(...e.map(n=>n?.[o])),t),{})}r(zm,"mergeSlots");function Om(...e){return e.reduce((t,o)=>({...t,...o}),{})}r(Om,"mergeStyles");function Fm(e){let t=Dl[e];if(!t)throw new TypeError(`Unknown Data Explorer theme preset "${String(e)}". Expected one of: ${Object.keys(Dl).join(", ")}.`);return t}r(Fm,"getPresetDefaults");function Ll(e){let t=e?.preset??"default",o=e?.surface??"card",n=Fm(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=zm(Wl,Lm[t],Pm[a],Em[s],Dm[i],Wm[m],e?.slots);return o==="flush"&&(c.surfaceRoot=Ft(Bm.flush.surfaceRoot,e?.slots?.surfaceRoot)),{surface:o,preset:t,density:a,radius:s,border:i,background:m,styles:Om(Mm,e?.styles),slots:c}}r(Ll,"resolveDataExplorerAppearance");function Al(e,t){if(t==="primary")return e.slots.menuItemPrimary;if(t==="danger")return e.slots.menuItemDanger;if(t==="muted")return e.slots.menuItemMuted}r(Al,"getDataExplorerMenuItemToneClassName");var Pi={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 zl(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(zl,"mergeMonkeysLocaleMessages");var Xn={locale:Pi.locale,messages:zl(Pi.messages)};var Hm=Object.freeze({}),Vm=Object.freeze({}),Ol=Symbol.for("@inf-monkeys-tech/monkeys-design/provider-context@1");function Gm(){return Object.freeze({locale:st.createContext({...Xn,provided:false}),theme:st.createContext({provided:false}),direction:st.createContext({provided:false}),environment:st.createContext({provided:false,environment:Hm,portal:Vm})})}r(Gm,"createMonkeysProviderContexts");function _m(){let e=globalThis,t=e[Ol];if(t)return t;let o=Gm();return Object.defineProperty(e,Ol,{value:o,enumerable:false,configurable:false,writable:false}),o}r(_m,"getMonkeysProviderContexts");var Qr=_m(),Ei=Qr.locale,ea=Qr.theme,Hl=Qr.direction,ta=Qr.environment;function jm(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(jm,"mergeAppearance");function ht(){try{return st.useContext(Ei)??{...Xn,provided:!1}}catch{return {...Xn,provided:false}}}r(ht,"useMonkeysLocale");function xt(){return st.useContext(Ei).messages}r(xt,"useMonkeysLocaleMessages");function nn(){return st.useContext(ea).resolvedTheme}r(nn,"useMonkeysResolvedTheme");function ze(e){let t=st.useContext(ea).baseAppearance;return st.useMemo(()=>jm(t,e),[e,t])}r(ze,"useMonkeysBaseAppearance");function Co(){return st.useContext(ea).statusStates??{}}r(Co,"useMonkeysStatusStates");function Di(){return st.useContext(Hl).direction}r(Di,"useMonkeysDirection");function Wi(){return st.useContext(ta).environment}r(Wi,"useMonkeysEnvironment");function Li(){return st.useContext(ta).portal}r(Li,"useMonkeysPortalOptions");function Ne(){let e=st.useContext(Ei),t=st.useContext(ea),o=st.useContext(Hl),n=e.provided||t.provided||o.provided;return st.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 Ai(){return st.useContext(ta).iconResolver}r(Ai,"useMonkeysAssetIconResolver");function Vl(){return st.useContext(ta).imageResolver}r(Vl,"useMonkeysAssetImageResolver");var $m={},ft="motion-safe:transition motion-safe:duration-300 motion-safe:ease-out",Jt="motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",oa="motion-safe:transition-transform motion-safe:duration-300 motion-safe:ease-out",Gl=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"),Km=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",ft),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",ft),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",ft),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",ft),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",oa),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",ft),switchThumb:l("h-4 w-4 translate-x-1 rounded-full bg-background shadow-sm",oa),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",ft),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",ft),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",ft,"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",ft),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",ft),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",ft),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",ft),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",oa,"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)]",Gl,ft),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",Km),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",ft),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]",Gl),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",ft),tableRowInteractive:"cursor-pointer [--base-table-row-hover-bg:hsl(var(--muted)_/_0.35)] hover:bg-[var(--base-table-row-hover-bg)] hover:[&>*]: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",ft),tableHeadSortIcon:l("inline-flex h-3 w-3 shrink-0 items-center justify-center text-muted-foreground",oa),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",ft),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",ft),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",ft),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",ft),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"},Um={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"}},qm={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"}},Ym={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"}},Jm={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"}},_l={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"}},Xm={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 Zm(e){return _l[e]??_l.default}r(Zm,"getPresetDefaults");var Qm=Object.keys(jl);function ep(...e){return Qm.reduce((t,o)=>(t[o]=l(...e.map(n=>n?.[o])),t),{})}r(ep,"mergeSlots");function tp(...e){return Object.assign({},...e.filter(Boolean))}r(tp,"mergeStyles");function Ee(e){let t=e?.preset??"default",o=e?.variant??"default",n=Zm(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:tp($m,e?.styles),slots:ep(jl,Xm[t],Um[a],qm[i],Ym[m],Jm[c],e?.slots)}}r(Ee,"resolveBaseAppearance");function na(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(na,"getBaseButtonToneClassName");function $l(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($l,"getBaseBadgeToneClassName");function Zn(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(Zn,"getBaseMenuItemToneClassName");var Kl=Symbol.for("@inf-monkeys-tech/monkeys-design/bento-depth@1"),Ul=globalThis,ql=Ul[Kl]??(Ul[Kl]=st.createContext(0));function Qn(){return st.useContext(ql)}r(Qn,"useBentoDepth");function er({children:e,depth:t}){return jsxRuntime.jsx(ql.Provider,{value:t,children:e})}r(er,"BentoDepthProvider");function zo({children:e}){return jsxRuntime.jsx(er,{depth:0,children:e})}r(zo,"BentoScope");var ra=["background","glowColor","borderColor","borderWidth","borderStyle","radius","shadow","padding","gap"],rp={background:"hsl(var(--card, 0 0% 100%))",glowColor:"var(--monkeys-bento-glow-default)",borderColor:"hsl(var(--border, 214.3 31.8% 91.4%))",borderWidth:"1px",borderStyle:"solid",radius:"var(--radius, 0.75rem)",shadow:"none",padding:"var(--global-spacing, 0.75rem)",gap:"var(--global-spacing, 0.75rem)"},zi=new WeakMap;function Jl(e,t){if(!Number.isSafeInteger(t)||t<1)throw new RangeError("Bento level must be a positive safe integer.");let o=e&&zi.get(e)?.get(t);if(o)return o;let n={...rp},a=Object.fromEntries(ra.map(i=>[i,"builtin"]));for(let i of ra){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=zi.get(e)??new Map;i.set(t,s),zi.set(e,i);}return s}r(Jl,"resolveBentoTokens");var Xl="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 aa(){let e=Qn(),t=e+1,o=Jl(nn(),t),n=Object.fromEntries(ra.map(a=>[`--monkeys-bento-${a.replace(/[A-Z]/g,s=>`-${s.toLowerCase()}`)}`,o.values[a]]));return {parentDepth:e,level:t,variables:n}}r(aa,"useBentoSurface");function Ql({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 w=Ee({...g,variant:u,density:p,state:f}),x=e,k=a!==void 0?A(a):A(t)||A(o),C=n!=null,S=!k&&!C;return jsxRuntime.jsxs(x,{...v,"aria-disabled":d||void 0,"data-variant":w.variant,"data-density":w.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(w.slots.panelRoot,m&&!d&&w.slots.panelInteractive,c&&w.slots.panelSelected,d&&w.slots.panelDisabled,h?.root,b),style:{...w.styles.panel,...y},children:[C?jsxRuntime.jsx("div",{"data-slot":"media",className:l(w.slots.panelMedia,h?.media),children:n}):null,k?jsxRuntime.jsx("div",{"data-slot":"header",className:l(w.slots.panelHeader,h?.header),style:w.styles.panelHeader,children:a!==void 0?a:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[A(t)?jsxRuntime.jsx("div",{"data-slot":"title",className:l(w.slots.panelTitle,h?.title),children:t}):null,A(o)?jsxRuntime.jsx("div",{"data-slot":"description",className:l(w.slots.panelDescription,h?.description),children:o}):null]})}):null,i!=null?jsxRuntime.jsx("div",{"data-slot":"body",className:l(w.slots.panelBody,S&&w.slots.panelBodyStandalone,h?.body),style:w.styles.panelBody,children:i}):null,s!=null?jsxRuntime.jsx("div",{"data-slot":"footer",className:l(w.slots.panelFooter,h?.footer),style:w.styles.panelFooter,children:s}):null]})}r(Ql,"BasePanel");var ip=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 ed({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}=aa(),b=ze(c),h=n==="panel",y=ip(b?.styles?.panelBody,[d?.body,o,b?.slots?.panelBody].join(" "));return jsxRuntime.jsx(er,{depth:h?p:u,children:jsxRuntime.jsx(Ql,{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:{...!y||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&&!y&&"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?jsxRuntime.jsxs("div",{className:l("flex min-w-0 flex-1 items-center justify-between gap-token-md",a&&"flex-wrap"),children:[jsxRuntime.jsxs("div",{className:l("flex min-w-0 flex-1 items-center gap-token-sm",a&&"basis-auto"),children:[i?jsxRuntime.jsx("span",{className:"inline-flex size-8 shrink-0 items-center justify-center rounded-md border border-primary/30 bg-primary/10 text-primary",children:jsxRuntime.jsx(i,{className:"size-4 text-primary",color:"currentColor",stroke:"currentColor"})}):null,jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("h2",{className:"truncate text-base font-semibold text-foreground",children:s}),g.description?jsxRuntime.jsx("div",{className:"mt-1 text-sm text-muted-foreground",children:g.description}):null]})]}),m?jsxRuntime.jsx("div",{className:l("shrink-0",a&&"max-w-full"),children:m}):null]}):void 0,...g,"data-monkeys-bento-level":h?p:void 0,style:{...h?f:{},...g.style},children:e})})}r(ed,"BentoPanel");var sp={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",sp[e],t.rounded===false?void 0:"monkeys-overlay-surface--rounded"].filter(Boolean).join(" ")}r(an,"getOverlaySurfaceClassName");var mp=st__namespace.forwardRef(({className:e,style:t,...o},n)=>jsxRuntime.jsx(So__namespace.Item,{ref:n,className:l("border-b",e),style:{borderColor:"var(--monkeys-component-accordion-item-border-color, hsl(var(--border)))",...t},...o}));mp.displayName="AccordionItem";var pp=st__namespace.forwardRef(({className:e,children:t,...o},n)=>jsxRuntime.jsx(So__namespace.Header,{className:"flex",children:jsxRuntime.jsxs(So__namespace.Trigger,{ref:n,className:l("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...o,children:[t,jsxRuntime.jsx(lucideReact.ChevronDown,{"aria-hidden":"true",className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));pp.displayName="AccordionTrigger";var gp=st__namespace.forwardRef(({className:e,children:t,...o},n)=>jsxRuntime.jsx(So__namespace.Content,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o,children:jsxRuntime.jsx("div",{className:l("pb-4 pt-0",e),children:t})}));gp.displayName="AccordionContent";var bp=st__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(ia__namespace.Root,{ref:o,className:l("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:jsxRuntime.jsx(ia__namespace.Indicator,{className:"flex items-center justify-center text-current",children:jsxRuntime.jsx(lucideReact.Check,{"aria-hidden":"true",className:"h-4 w-4"})})}));bp.displayName="Checkbox";var tr=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_[data-slot=icon]]:text-[inherit] [&_[data-slot=icon]_*]:!text-[inherit] [&_[data-slot=icon]_svg]:!stroke-current [&_[data-slot=icon]_svg_*]:!stroke-current [&_[data-slot=end-icon]]:text-[inherit] [&_[data-slot=end-icon]_*]:!text-[inherit] [&_[data-slot=end-icon]_svg]:!stroke-current [&_[data-slot=end-icon]_svg_*]:!stroke-current [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-control-surface shadow-sm ring-offset-control-surface hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-sm px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),fp=st__namespace.forwardRef(({className:e,variant:t,size:o,asChild:n=false,...a},s)=>jsxRuntime.jsx(n?reactSlot.Slot:"button",{ref:s,className:tr({variant:t,size:o,className:e}),...a}));fp.displayName="Button";var yp=st__namespace.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=Qn();return jsxRuntime.jsxs(so__namespace.Root,{ref:g,type:c??(u>0?"auto":void 0),className:l("group relative overflow-hidden",m&&"no-scrollbar",e),...d,children:[jsxRuntime.jsx(so__namespace.Viewport,{ref:n,onScroll:a,className:l("h-full w-full rounded-[inherit]",o),children:t}),s?jsxRuntime.jsx(td,{orientation:i,className:l(m&&"size-0 p-0")}):null,jsxRuntime.jsx(so__namespace.Corner,{})]})});yp.displayName="ScrollArea";var td=st__namespace.forwardRef(({className:e,orientation:t="vertical",...o},n)=>jsxRuntime.jsx(so__namespace.ScrollAreaScrollbar,{ref:n,"data-monkeys-scrollbar":"",orientation:t,className:l("flex touch-none select-none opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100 data-[state=visible]:opacity-100",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-px",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-px",e),...o,children:jsxRuntime.jsx(so__namespace.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));td.displayName="ScrollBar";var hp=st__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(sa__namespace.Root,{ref:o,className:l("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,children:jsxRuntime.jsx(sa__namespace.Thumb,{className:"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"})}));hp.displayName="Switch";var xp=st__namespace.forwardRef(({variant:e="default",...t},o)=>jsxRuntime.jsx(Oo__namespace.Root,{ref:o,"data-variant":e,...t}));xp.displayName="Tabs";var vp=st__namespace.forwardRef(({className:e,gap:t,style:o,...n},a)=>jsxRuntime.jsx(Oo__namespace.List,{ref:a,className:l("inline-flex h-10 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),style:{gap:t,...o},...n}));vp.displayName="TabsList";var kp=st__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(Oo__namespace.Trigger,{ref:o,className:l("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));kp.displayName="TabsTrigger";var wp=st__namespace.forwardRef(({className:e,...t},o)=>{let n=Qn();return jsxRuntime.jsx(Oo__namespace.Content,{ref:o,className:l("mt-2 ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n>0&&"gap-[var(--monkeys-bento-gap)]",e),...t})});wp.displayName="TabsContent";var Cp=st__namespace.forwardRef(({className:e,sideOffset:t=4,...o},n)=>{let a=Ne();return jsxRuntime.jsx(lo__namespace.Portal,{children:jsxRuntime.jsx(lo__namespace.Content,{...a,...o,ref:n,sideOffset:t,"data-monkeys-component":"tooltip","data-slot":"content","data-surface":"menu",className:l("z-50 overflow-hidden border px-3 py-1.5 text-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",an("menu"),e)})})});Cp.displayName="TooltipContent";var or=st__namespace.forwardRef(({className:e,appearance:t="standard",type:o,...n},a)=>jsxRuntime.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}));or.displayName="Input";var Sp=st__namespace.forwardRef(({className:e,appearance:t="standard",...o},n)=>jsxRuntime.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}));Sp.displayName="Textarea";function la(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(la,"svgPreviewSurface");var Tp=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"),Vi=st__namespace.forwardRef(({aspectRatio:e="square",maxSquareHeight:t=true,className:o,...n},a)=>jsxRuntime.jsx("div",{ref:a,className:Tp({aspectRatio:e,maxSquareHeight:t,className:o}),...n}));Vi.displayName="MediaPreviewFrame";var nr=st__namespace.forwardRef(({fit:e="contain",className:t,style:o,...n},a)=>{let s=la(n.src);return jsxRuntime.jsx("img",{ref:a,className:l("block size-full",e==="contain"?"object-contain":"object-cover",t),style:{...s,...s?{objectFit:e}:{},...o},...n})});nr.displayName="MediaPreviewImage";var ad=Symbol.for("@inf-monkeys-tech/monkeys-design/dialog-dock@1"),id=globalThis,Ip=id[ad]??(id[ad]=st__namespace.createContext(null)),Lt=r(()=>st__namespace.useContext(Ip),"useDialogDock");var Gi=st__namespace.forwardRef(({children:e,className:t,style:o,closeLabel:n="Close",showCloseButton:a=true,onInteractOutside:s,...i},m)=>{let c=Lt(),d=st__namespace.useId(),g=st__namespace.useRef(null),u=st__namespace.useRef(false);return st__namespace.useEffect(()=>{u.current&&!c?.collapsed&&c?.activeId===d&&g.current?.focus(),u.current=!!c?.collapsed;},[c?.collapsed,c?.activeId,d]),st__namespace.useEffect(()=>c?.register(d),[c?.register,d]),c?.container?jsxRuntime.jsx(bt__namespace.Portal,{container:c.container,children:jsxRuntime.jsx("div",{style:{display:"contents"},children:jsxRuntime.jsx(zo,{children:jsxRuntime.jsx(ed,{className:"monkeys-dialog-dock-panel overflow-auto",contentClassName:"shrink-0",style:{display:c.activeId===d?void 0:"none"},children:jsxRuntime.jsxs(bt__namespace.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&&jsxRuntime.jsx("button",{ref:g,type:"button",className:"monkeys-dialog-dock-collapse","aria-label":c.collapseLabel,title:c.collapseLabel,"aria-expanded":!c.collapsed,onClick:()=>c.setCollapsed(true),children:jsxRuntime.jsx(lucideReact.PanelRightClose,{"aria-hidden":"true",className:"size-4"})}),a&&jsxRuntime.jsxs(bt__namespace.Close,{className:"monkeys-dialog-dock-close","aria-label":typeof n=="string"?n:void 0,children:[jsxRuntime.jsx(lucideReact.X,{"aria-hidden":"true",className:"size-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:n})]})]})})})})}):null});Gi.displayName="DockedDialogContent";var ld=Symbol.for("@inf-monkeys-tech/monkeys-design/dialog-open@1"),dd=globalThis,cd=dd[ld]??(dd[ld]=st__namespace.createContext(false));function ca({open:e,defaultOpen:t,onOpenChange:o,modal:n,...a}){let s=Lt(),[i,m]=st__namespace.useState(t??false),c=e??i;return jsxRuntime.jsx(cd.Provider,{value:c,children:jsxRuntime.jsx(bt__namespace.Root,{...a,open:c,modal:s?false:n,onOpenChange:d=>{m(d),o?.(d);}})})}r(ca,"Dialog");var Bp=bt__namespace.Portal;var ud=st__namespace.forwardRef(({className:e,...t},o)=>{let n=Ne();return jsxRuntime.jsx(bt__namespace.Overlay,{...n,...t,ref:o,className:l("theme-overlay-backdrop fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),"data-monkeys-component":"dialog","data-slot":"overlay","data-monkeys-overlay":true})});ud.displayName="DialogOverlay";var md=st__namespace.forwardRef(({className:e,...t},o)=>{let n=Ne();return jsxRuntime.jsx(bt__namespace.Content,{...n,...t,ref:o,className:e,"data-monkeys-component":"dialog","data-slot":"content","data-surface":"dialog","data-monkeys-dialog-content":true})});md.displayName="DialogSurfaceContent";var ln=st__namespace.forwardRef(({className:e,children:t,showCloseButton:o=true,closeLabel:n="Close",overlayClassName:a,overlayStyle:s,...i},m)=>{let c=Lt(),d=st__namespace.useContext(cd);return c?d?jsxRuntime.jsx(Gi,{...i,ref:m,className:e,showCloseButton:o,closeLabel:n,children:t}):null:jsxRuntime.jsxs(Bp,{children:[jsxRuntime.jsx(ud,{className:a,style:s}),jsxRuntime.jsxs(md,{...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:[jsxRuntime.jsx(zo,{children:t}),o?jsxRuntime.jsxs(bt__namespace.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-dialog-surface transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[jsxRuntime.jsx(lucideReact.X,{"aria-hidden":"true",className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:n})]}):null]})]})});ln.displayName="DialogContent";var Pp=st__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(ln,{ref:o,className:l("duration-0 data-[state=open]:animate-none data-[state=closed]:animate-none",e),...t}));Pp.displayName="DialogContentNoAnimation";var Ep=r(({className:e,...t})=>jsxRuntime.jsx("div",{className:l(Lt()?.showTitle===false?"contents":"flex flex-col space-y-1.5 text-center sm:text-left",e),...t}),"DialogHeader");Ep.displayName="DialogHeader";var Dp=r(({className:e,...t})=>jsxRuntime.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),"DialogFooter");Dp.displayName="DialogFooter";var rr=st__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(bt__namespace.Title,{ref:o,className:l("text-lg font-semibold leading-none tracking-tight",e,Lt()?.showTitle===false&&"sr-only"),...t}));rr.displayName="DialogTitle";var ar=st__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(bt__namespace.Description,{ref:o,className:l("text-sm text-muted-foreground",e),...t}));ar.displayName="DialogDescription";st__namespace.forwardRef((e,t)=>{let o=Lt()?bt__namespace.Trigger:wt__namespace.Trigger;return jsxRuntime.jsx(o,{...e,ref:t})});var Wp=wt__namespace.Portal,pd=st__namespace.forwardRef(({className:e,style:t,...o},n)=>{let a=Ne();return jsxRuntime.jsx(wt__namespace.Overlay,{...a,...o,ref:n,className:l("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),"data-monkeys-component":"alert-dialog","data-slot":"overlay","data-monkeys-overlay":true,style:{pointerEvents:"auto",...t}})});pd.displayName="AlertDialogOverlay";var Lp=st__namespace.forwardRef(({className:e,style:t,children:o,...n},a)=>{let s=Ne();return Lt()?jsxRuntime.jsx(ln,{...n,...s,ref:a,role:"alertdialog",showCloseButton:false,className:e,style:t,children:o}):jsxRuntime.jsxs(Wp,{children:[jsxRuntime.jsx(pd,{}),jsxRuntime.jsx(wt__namespace.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:jsxRuntime.jsx(zo,{children:o})})]})});Lp.displayName="AlertDialogContent";var Ap=r(({className:e,...t})=>jsxRuntime.jsx("div",{className:l("flex flex-col space-y-2 text-center sm:text-left",e),...t}),"AlertDialogHeader"),zp=r(({className:e,...t})=>jsxRuntime.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),"AlertDialogFooter"),Op=st__namespace.forwardRef(({className:e,...t},o)=>{let n=Lt()?bt__namespace.Title:wt__namespace.Title;return jsxRuntime.jsx(n,{ref:o,className:l("text-lg font-semibold",e,Lt()?.showTitle===false&&"sr-only"),...t})}),Fp=st__namespace.forwardRef(({className:e,...t},o)=>{let n=Lt()?bt__namespace.Description:wt__namespace.Description;return jsxRuntime.jsx(n,{ref:o,className:l("text-sm text-muted-foreground",e),...t})}),Hp=st__namespace.forwardRef(({className:e,...t},o)=>{let n=Lt()?bt__namespace.Close:wt__namespace.Action;return jsxRuntime.jsx(n,{ref:o,className:l(tr(),e),...t})}),Vp=st__namespace.forwardRef(({className:e,...t},o)=>{let n=Lt()?bt__namespace.Close:wt__namespace.Action;return jsxRuntime.jsx(n,{ref:o,className:l(tr({variant:"destructive"}),e),...t})}),Gp=st__namespace.forwardRef(({className:e,...t},o)=>{let n=Lt()?bt__namespace.Close:wt__namespace.Cancel;return jsxRuntime.jsx(n,{ref:o,className:l(tr({variant:"outline"}),"mt-2 sm:mt-0",e),...t})});Ap.displayName="AlertDialogHeader";zp.displayName="AlertDialogFooter";Op.displayName="AlertDialogTitle";Fp.displayName="AlertDialogDescription";Hp.displayName="AlertDialogAction";Vp.displayName="AlertDialogDangerAction";Gp.displayName="AlertDialogCancel";var fd=Xt__namespace.Root,yd=Xt__namespace.Trigger;var _i=st__namespace.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 jsxRuntime.jsx(Xt__namespace.Portal,{container:n??d,children:jsxRuntime.jsx(Xt__namespace.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"));_i.displayName=Xt__namespace.Content.displayName;var hd=["pulse","shimmer","shimmer-soft","shimmer-diagonal","shimmer-vertical","drift","outline","none"];function vd(e,t=false){if(!(e===void 0||hd.includes(e))&&!(t&&(e==="shimmer-shared"||e==="shimmer-stagger")))throw new TypeError(`Skeleton animation must be ${hd.join(", ")}${t?", shimmer-shared, or shimmer-stagger":""}.`)}r(vd,"validateSkeletonAnimation");var $i=st.createContext(null),sr=st.createContext(void 0);function Ki(e){delete e.dataset.skeletonReady;for(let t of ["width","offset","delay"])e.style.removeProperty(`--monkeys-skeleton-${t}`);}r(Ki,"clearGeometry");function jp(e,t,o,n){let a=st.useMemo(()=>({nodes:new Map,update:r(()=>{},"update")}),[]);return st.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()),w=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),R=parseFloat(T.width)+E,F=R?v[S].width/R:1;return Math.abs(F-1)<1e-4?1:F}),x=Math.min(...v.map(C=>C.left)),k=Math.max(...v.map(C=>C.right));b.forEach((C,S)=>{let T=v[S];if(!T.width||!T.height){Ki(C);return}let E=w[S];C.style.setProperty("--monkeys-skeleton-width",`${(k-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)=>Ki(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]),st.useEffect(()=>{a.update();}),a}r(jp,"useGroupRegistry");function Ho({animation:e,animated:t,children:o,independent:n=false,containerRef:a}){if(vd(e,true),t!==void 0&&typeof t!="boolean")throw new TypeError("SkeletonGroup animated must be a boolean.");let s=st.useContext($i),i=st.useContext(sr),m=n||e!==void 0||!s,c=e??s?.animation??"pulse",d=!!s?.disabled||t===false||c==="none",g=jp(c,d,m,a),u=st.useMemo(()=>({animation:c,disabled:d,registry:m?g:s.registry}),[c,d,m,g,s]),p=jsxRuntime.jsx($i.Provider,{value:u,children:o});return jsxRuntime.jsx(sr.Provider,{value:m?void 0:i,children:p})}r(Ho,"SkeletonScope");function Tn({index:e,children:t}){let o=st.useContext(sr);return jsxRuntime.jsx(sr.Provider,{value:o??e,children:t})}r(Tn,"SkeletonItem");function $p(e,t){return st.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($p,"useSkeletonRef");function kd(e,t=true,o){vd(e);let n=st.useContext($i),a=st.useContext(sr),s=!t||n?.disabled?"none":e??n?.animation??"pulse",[i,m]=st.useState(null),c=$p(m,o),d=e===void 0&&(s==="shimmer-shared"||s==="shimmer-stagger")?n?.registry:void 0;return st.useEffect(()=>{if(!(!i||!d))return d.nodes.set(i,{item:a}),d.update(),()=>{d.nodes.delete(i),Ki(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(kd,"useSkeletonMotion");function Cd(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(Cd,"resolveBaseFieldValidationResult");var Yi=st.createContext(null);function Vo(){let e=st.useContext(Yi),t=st.useRef(null);t.current===null&&(t.current=Symbol("BaseFieldControl"));let o=e?.registerControl;st.useEffect(()=>{if(!(!o||t.current===null))return o(t.current)},[o]);let n=e?.notifyBlur,a=e?.notifyChange;return {invalid:e?.invalid??false,notifyBlur:st.useCallback(s=>n?.(s),[n]),notifyChange:st.useCallback(s=>a?.(s),[a])}}r(Vo,"useBaseFieldControl");var eg={sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"},tg={sm:"text-[10px]",md:"text-[11px]",lg:"text-xs"};function og(e,...t){for(let o of t)if(o){if(typeof o=="function"){o(e);continue}o.current=e;}}r(og,"setRefs");var dn=st.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 w=ze(m),x=Ne(),k=Ee(w),C=Vo(),S=a||C.invalid,T=A(t),E=Pl(o),R=st.useRef(null),F=st.useRef(n);F.current=n;let[_,z]=st.useState(p??false),O=u!==void 0,j=!!(O?u:_),I=n||j,V=n?"mixed":j?"checked":"unchecked",$=st.useCallback(D=>{R.current=D,D&&(D.indeterminate=F.current),og(D,v);},[v]);st.useEffect(()=>{R.current&&(R.current.indeterminate=n);},[n]);let N=r(D=>{s||(O||z(D.currentTarget.checked),b?.(D),C.notifyChange(D.currentTarget.checked),R.current&&(R.current.indeterminate=n));},"handleChange");return jsxRuntime.jsxs("label",{...x,"data-monkeys-component":"checkbox","data-slot":"root","data-state":V,"data-size":i,"data-invalid":S||void 0,"data-disabled":s||void 0,className:l(k.slots.checkboxRoot,!E&&"items-center",s&&k.slots.checkboxDisabled,d?.root,c),style:{...k.styles.checkboxRoot,...g},children:[jsxRuntime.jsxs("span",{"data-slot":"box","data-state":V,"data-size":i,className:l(k.slots.checkboxBox,!E&&"mt-0",I&&k.slots.checkboxBoxChecked,S&&k.slots.checkboxBoxInvalid,i&&eg[i],d?.box),style:{...k.styles.checkboxBox},children:[jsxRuntime.jsx("input",{...y,ref:$,type:"checkbox",disabled:s,checked:u,defaultChecked:p,"aria-invalid":h??(S||void 0),"aria-checked":n?"mixed":j,"data-slot":"input","data-state":V,"data-size":i,"data-invalid":S||void 0,"data-disabled":s||void 0,className:l(k.slots.checkboxInput,d?.input),onBlur:D=>{f?.(D),C.notifyBlur(D.currentTarget.checked);},onChange:N}),I?jsxRuntime.jsx("span",{"aria-hidden":"true","data-slot":"indicator","data-state":V,"data-size":i,className:l(k.slots.checkboxIndicator,i&&tg[i],d?.indicator),children:n?"\u2013":"\u2713"}):null]}),T||E?jsxRuntime.jsxs("span",{"data-slot":"content",className:l(k.slots.checkboxContent,d?.content),children:[T?jsxRuntime.jsx("span",{"data-slot":"label",className:l(k.slots.checkboxLabel,d?.label),children:t}):null,E?jsxRuntime.jsx("span",{"data-slot":"description",className:l(k.slots.checkboxDescription,d?.description),children:o}):null]}):null]})},"BaseCheckbox"));function Xi(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(Xi,"resolveContainerValue");function Td({explicitProvided:e,explicitContainer:t,providerProvided:o,providerContainer:n,getDocument:a}){if(e)return Xi(t,"BasePortal container");if(o)return Xi(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 Xi(s.body,"MonkeysProvider environment.getDocument().body")}r(Td,"resolveBasePortalContainer");function ig({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=Td({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(ig,"resolveBaseOverlayPortalState");function sg(){return globalThis.document??null}r(sg,"getDefaultDocument");function To(e={}){let t=Wi(),o=Li(),[n,a]=st.useState(false);return st.useEffect(()=>{a(true);},[]),ig({mounted:n,explicitDisabled:e.disabled,explicitContainer:e.container,providerDisabled:o.disabled,providerContainer:o.container,getDocument:t.getDocument??sg})}r(To,"useBaseOverlayPortal");function Rd(e,t){return t.shouldPortal?reactDom.createPortal(e,t.container):jsxRuntime.jsx(jsxRuntime.Fragment,{children:e})}r(Rd,"renderBaseOverlayPortalContent");function ma(e,t){if(typeof e!="boolean")throw new TypeError(`BaseTooltip ${t} must be a boolean.`)}r(ma,"validateBoolean");function gg(e){if(e!=="top"&&e!=="bottom"&&e!=="left"&&e!=="right")throw new TypeError('BaseTooltip placement must be "top", "bottom", "left", or "right".')}r(gg,"validatePlacement");function bg(e,t){return st.isValidElement(e)&&e.type!==st.Fragment?e:jsxRuntime.jsx("span",{tabIndex:!t&&A(e)?0:void 0,children:e})}r(bg,"normalizeTrigger");var lr=st.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&&ma(n,"open"),ma(a,"defaultOpen"),ma(i,"disabled"),ma(m,"portal"),gg(s);let h=ze(c),y=Ne(),v=Ee(h),w=To({disabled:!m}),[x,k]=st.useState(a),C=n!==void 0,S=!i&&A(t),E=S&&(C?n:x),R=m&&w.shouldPortal?"portaled":"inline",F=r(O=>{O&&!S||(C||k(O),p?.(O));},"handleOpenChange"),_=bg(o,i),z=S?jsxRuntime.jsx(lo__namespace.Content,{...y,side:s,sideOffset:8,collisionPadding:8,"data-monkeys-component":"tooltip","data-slot":"content","data-placement":s,"data-portal":R,"data-disabled":i||void 0,className:l(v.slots.tooltipContent,g?.content),style:v.styles.tooltip,children:t}):null;return jsxRuntime.jsx("span",{...y,...f,ref:b,"data-monkeys-component":"tooltip","data-slot":"root","data-state":E?"open":"closed","data-placement":s,"data-portal":R,"data-disabled":i||void 0,className:l(v.slots.tooltipRoot,g?.root,d),style:u,children:jsxRuntime.jsx(lo__namespace.Provider,{delayDuration:0,skipDelayDuration:0,disableHoverableContent:true,children:jsxRuntime.jsxs(lo__namespace.Root,{open:E,onOpenChange:F,delayDuration:0,disableHoverableContent:true,children:[jsxRuntime.jsx("span",{...y,"data-monkeys-component":"tooltip","data-slot":"trigger-wrapper","data-state":E?"open":"closed","data-placement":s,"data-portal":R,"data-disabled":i||void 0,className:l(v.slots.tooltipTrigger,g?.trigger),children:jsxRuntime.jsx(lo__namespace.Trigger,{asChild:true,...y,"data-monkeys-component":"tooltip","data-slot":"trigger","data-placement":s,"data-portal":R,"data-disabled":i||void 0,children:_})}),m&&w.shouldPortal?jsxRuntime.jsx(lo__namespace.Portal,{...w.radixPortalProps,children:z}):z]})})})},"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 Nd(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(Nd,"safeDisplaySrcSet");function Id({kind:e}){return jsxRuntime.jsx(e==="image"?lucideReact.Image:e==="video"?lucideReact.Video:e==="audio"?lucideReact.Music2:lucideReact.FileText,{className:"h-6 w-6","aria-hidden":"true"})}r(Id,"PreviewIcon");function Bd({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]=st.useState(false),w=Zt(e,"media")??"",x=Object.fromEntries(Object.entries(f??{}).flatMap(([T,E])=>{let R=T.toLowerCase();return R==="src"||R==="srcdoc"||R==="dangerouslysetinnerhtml"?[]:R==="srcset"?[["srcSet",Nd(E)]]:R==="poster"?[["poster",Zt(E,"media")]]:[[T,E]]}));st.useEffect(()=>{v(false);},[w,t]);let k=r((T,E)=>jsxRuntime.jsx("div",{className:Ft("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 jsxRuntime.jsx("div",{className:Ft("min-w-0 overflow-hidden",p?.root,g),style:u,"aria-busy":"true",children:jsxRuntime.jsxs("div",{className:Ft("flex min-h-24 flex-col items-center justify-center gap-2 bg-muted/30 p-4 text-sm text-muted-foreground",p?.loading),children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"h-5 w-5 animate-spin","aria-hidden":"true"}),n||"Loading preview..."]})});if(!w||y)return jsxRuntime.jsx("div",{className:Ft("min-w-0 overflow-hidden",p?.root,g),style:u,children:k(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Id,{kind:t}),jsxRuntime.jsx("span",{className:Ft("max-w-full truncate",y?p?.error:void 0),children:y?d:c}),n?jsxRuntime.jsx("span",{className:"max-w-full truncate text-xs",children:n}):null]}))});let C=r(()=>{v(true),h?.();},"handleError"),S=t==="image"?jsxRuntime.jsx(nr,{...x,src:w,alt:o,fit:s,className:p?.media,loading:"lazy",decoding:"async",draggable:false,onLoad:b,onError:C}):t==="video"?jsxRuntime.jsx("video",{...x,src:w,className:Ft("block h-auto w-full",s==="cover"?"object-cover":"object-contain",p?.media),controls:i,preload:"metadata",onLoadedData:b,onError:C}):t==="audio"?jsxRuntime.jsx("audio",{...x,src:w,className:Ft("w-full",p?.media),controls:i,preload:"metadata",onCanPlay:b,onError:C}):k(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Id,{kind:"file"}),jsxRuntime.jsx("span",{className:"max-w-full truncate",children:n||w})]}));return t==="image"?jsxRuntime.jsx(Vi,{aspectRatio:a,className:Ft(p?.root,g),style:u,children:S}):jsxRuntime.jsx("div",{className:Ft("min-w-0 overflow-hidden",p?.root,g),style:u,children:S})}r(Bd,"DataExplorerMediaPreview");var un=st.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=ze(s),h=Ne(),y=Ee({...b,variant:i,density:m,state:c}),v=t??o,w=a??"default";return jsxRuntime.jsxs("span",{...h,...p,ref:f,"data-monkeys-component":"badge","data-slot":"root","data-tone":w,"data-variant":y.variant,"data-density":y.density,"data-state":y.state,className:l(y.slots.badgeBase,$l(y,a),g?.root,d),style:{...y.styles.badge,...u},children:[n?jsxRuntime.jsx("span",{"data-slot":"icon","data-tone":w,className:l(y.slots.badgeIcon,g?.icon),children:n}):null,v!=null?jsxRuntime.jsx("span",{"data-slot":"label","data-tone":w,className:l(y.slots.badgeLabel,g?.label),children:v}):null]})},"BaseBadge"));var Ng={sm:"h-8 px-2.5 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-3.5 text-base"},Ig={sm:"h-8 w-8 px-0",md:"h-9 w-9 px-0",lg:"h-10 w-10 px-0"},Qi={sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"};function pa(e){return typeof e=="string"&&e.trim()?e:void 0}r(pa,"nonEmptyText");function Mg(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-full w-full motion-safe:animate-spin motion-reduce:animate-none",fill:"none",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"9",className:"opacity-25",stroke:"currentColor",strokeWidth:"3"}),jsxRuntime.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M12 3a9 9 0 0 1 9 9h-3a6 6 0 0 0-6-6V3Z"})]})}r(Mg,"LoadingIcon");var ve=st.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:w,className:x,classNames:k,style:C,onClick:S,"aria-label":T,"aria-pressed":E,...R},F){for(let[te,U]of [["active",g],["iconOnly",u],["disabled",p],["loading",f],["stopPropagation",b]])if(typeof U!="boolean")throw new TypeError(`BaseButton ${te} 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 _=ze(h),z=Ne(),O=Ee({..._,variant:y,density:v,state:w}),j=t??o,I=A(j)&&(typeof j!="string"||!!j.trim()),V=pa(m)??pa(T),$=typeof j=="string"?pa(j):void 0,N=pa(i);if(u&&!I&&!V&&!N)throw new TypeError("BaseButton iconOnly requires ariaLabel, aria-label, title, or a renderable label.");let D=V??$??N,M=p||f,K=c??"default",J=w??(f?"loading":p?"disabled":g?"active":"idle"),G=r(te=>{b&&te.stopPropagation(),!M&&S?.(te);},"handleClick");return jsxRuntime.jsxs("button",{...z,...R,ref:F,type:s,title:i,"aria-label":D,"aria-pressed":E??(g||void 0),"aria-busy":f||void 0,"data-variant":O.variant,"data-density":O.density,disabled:M,"data-monkeys-component":"button","data-slot":"root","data-state":J,"data-tone":K,"data-size":d,"data-active":g||void 0,"data-loading":f||void 0,"data-disabled":M||void 0,"data-icon-only":u||void 0,className:l(O.slots.buttonBase,u&&O.slots.buttonIconOnly,d&&Ng[d],u&&d&&Ig[d],na(O,c,g),M&&O.slots.buttonDisabled,k?.root,x),style:{...O.styles.button,...g?O.styles.buttonActive:void 0,...M?O.styles.buttonDisabled:void 0,...C},onClick:G,children:[f?jsxRuntime.jsx("span",{"data-slot":"icon","data-state":J,"data-tone":K,"data-size":d,className:l(O.slots.buttonIcon,d&&Qi[d],k?.icon),children:jsxRuntime.jsx(Mg,{})}):n?jsxRuntime.jsx("span",{"data-slot":"icon","data-state":J,"data-tone":K,"data-size":d,className:l(O.slots.buttonIcon,d&&Qi[d],k?.icon),children:n}):null,u?A(j)?jsxRuntime.jsx("span",{"data-slot":"label","data-state":J,"data-tone":K,"data-size":d,className:"sr-only",children:j}):null:A(j)?jsxRuntime.jsx("span",{"data-slot":"label","data-state":J,"data-tone":K,"data-size":d,className:l(O.slots.buttonLabel,k?.label),children:j}):null,!f&&a?jsxRuntime.jsx("span",{"data-slot":"end-icon","data-state":J,"data-tone":K,"data-size":d,className:l(O.slots.buttonIcon,d&&Qi[d],k?.icon,k?.endIcon),children:a}):null]})},"BaseButton"));var Bg=["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 ga(e){if(e!==void 0&&!Bg.includes(e))throw new TypeError('BaseContextMenu tone must be "default", "primary", "success", "warning", "danger", or "muted".')}r(ga,"validateTone");function Pg(e){if(e!==void 0&&e!=="ltr"&&e!=="rtl")throw new TypeError('BaseContextMenu dir must be "ltr" or "rtl".')}r(Pg,"validateDirection");function Eg(){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:jsxRuntime.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 4.5"})})}r(Eg,"CheckIcon");function Dg(){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3.5 w-3.5",fill:"currentColor",children:jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"3"})})}r(Dg,"DotIcon");function Wg(){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:jsxRuntime.jsx("path",{d:"m6 4 4 4-4 4"})})}r(Wg,"ChevronRightIcon");function es({label:e,icon:t,shortcut:o,children:n,classNames:a,inset:s,indicator:i}){let m=n??e;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[i||null,A(t)?jsxRuntime.jsx("span",{"data-slot":"icon",className:l(a?.icon),children:t}):s?jsxRuntime.jsx("span",{"aria-hidden":"true","data-slot":"icon",className:"h-4 w-4 shrink-0"}):null,A(m)?jsxRuntime.jsx("span",{"data-slot":"label",className:l(a?.label),children:m}):null,A(o)?jsxRuntime.jsx("span",{"data-slot":"shortcut",className:l(a?.shortcut),children:o}):null]})}r(es,"renderItemContent");function Dd({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"),Pg(s);let g=Di(),u=ze(i);return jsxRuntime.jsxs(Qe__namespace.Root,{onOpenChange:d,modal:a,dir:s??g,children:[t?jsxRuntime.jsx(ts,{disabled:n,appearance:u,className:l(c?.trigger,m),children:t}):null,o?jsxRuntime.jsx(os,{appearance:u,className:c?.content,children:o}):null,e]})}r(Dd,"BaseContextMenu");var ts=st.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=ze(a),g=Ne(),u=Ee(d);return jsxRuntime.jsx(Qe__namespace.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")),os=st.forwardRef(r(function({children:t,appearance:o,className:n,classNames:a,style:s,...i},m){let c=ze(o),d=Ne(),g=Ee(c),u=To(),p=jsxRuntime.jsx(Qe__namespace.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?jsxRuntime.jsx(Qe__namespace.Portal,{...u.radixPortalProps,children:p}):p},"BaseContextMenuContent")),Wd=st.forwardRef(r(function({children:t,appearance:o,className:n,style:a,...s},i){let m=ze(o),c=Ne(),d=Ee(m);return jsxRuntime.jsx(Qe__namespace.Label,{...c,...s,ref:i,"data-monkeys-component":"context-menu","data-slot":"label",className:l(d.slots.menuLabel,n),style:a,children:t})},"BaseContextMenuLabel")),Ld=st.forwardRef(r(function({appearance:t,className:o,style:n,...a},s){let i=ze(t),m=Ne(),c=Ee(i);return jsxRuntime.jsx(Qe__namespace.Separator,{...m,...a,ref:s,"data-monkeys-component":"context-menu","data-slot":"separator",className:l(c.slots.menuSeparator,o),style:n})},"BaseContextMenuSeparator")),Rn=st.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"),ga(s);let h=s??"default",y=ze(c),v=Ne(),w=Ee(y);return jsxRuntime.jsx(Qe__namespace.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(w.slots.menuItem,Zn(w,s),i&&w.slots.menuItemDisabled,g?.root,d),style:{...w.styles.menuItem,...u},onSelect:x=>{if(i){x.preventDefault();return}p?.(x);},children:es({children:t,label:o,icon:n,shortcut:a,inset:m,classNames:{icon:l(w.slots.menuItemIcon,g?.icon),label:l(w.slots.menuItemLabel,g?.label),shortcut:l(w.slots.menuItemShortcut,g?.shortcut)}})})},"BaseContextMenuItem"));st.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"),ga(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",w=ze(g),x=Ne(),k=Ee(w);return jsxRuntime.jsx(Qe__namespace.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(k.slots.menuItem,"pl-8",Zn(k,s),i&&k.slots.menuItemDisabled,p?.root,u),style:{...k.styles.menuItem,...f},onSelect:C=>{if(i){C.preventDefault();return}b?.(C);},children:es({children:t,label:o,icon:n,shortcut:a,inset:m,classNames:{icon:l(k.slots.menuItemIcon,p?.icon),label:l(k.slots.menuItemLabel,p?.label),shortcut:l(k.slots.menuItemShortcut,p?.shortcut)},indicator:jsxRuntime.jsx(Qe__namespace.ItemIndicator,{"data-slot":"indicator",className:l(k.slots.menuCheckboxIndicator,p?.indicator),children:jsxRuntime.jsx(Eg,{})})})})},"BaseContextMenuCheckboxItem"));st.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"),ga(s);let y=s??"default",v=ze(d),w=Ne(),x=Ee(v);return jsxRuntime.jsx(Qe__namespace.RadioItem,{...w,...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",Zn(x,s),i&&x.slots.menuItemDisabled,u?.root,g),style:{...x.styles.menuItem,...p},onSelect:k=>{if(i){k.preventDefault();return}f?.(k);},children:es({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:jsxRuntime.jsx(Qe__namespace.ItemIndicator,{"data-slot":"indicator",className:l(x.slots.menuRadioIndicator,u?.indicator),children:jsxRuntime.jsx(Dg,{})})})})},"BaseContextMenuRadioItem"));st.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"),ga(a);let f=a??"default",b=ze(m),h=Ne(),y=Ee(b),v=t??o;return jsxRuntime.jsxs(Qe__namespace.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,Zn(y,a),s&&y.slots.menuItemDisabled,d?.root,c),style:{...y.styles.menuItem,...g},children:[A(n)?jsxRuntime.jsx("span",{"data-slot":"icon",className:l(y.slots.menuItemIcon,d?.icon),children:n}):i?jsxRuntime.jsx("span",{"aria-hidden":"true","data-slot":"icon",className:"h-4 w-4 shrink-0"}):null,A(v)?jsxRuntime.jsx("span",{"data-slot":"label",className:l(y.slots.menuItemLabel,d?.label),children:v}):null,jsxRuntime.jsx("span",{"data-slot":"sub-indicator",className:l(y.slots.menuSubTriggerIcon,d?.shortcut,"rtl:rotate-180"),children:jsxRuntime.jsx(Wg,{})})]})},"BaseContextMenuSubTrigger"));st.forwardRef(r(function({children:t,appearance:o,className:n,classNames:a,style:s,sideOffset:i=6,...m},c){let d=ze(o),g=Ne(),u=Ee(d),p=To(),f=jsxRuntime.jsx(Qe__namespace.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?jsxRuntime.jsx(Qe__namespace.Portal,{...p.radixPortalProps,children:f}):f},"BaseContextMenuSubContent"));var Ag={1:"grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-2 xl:grid-cols-3"};function rs({items:e,columns:t=1,appearance:o,className:n,classNames:a,style:s,children:i,...m}){let c=Ee(o);return jsxRuntime.jsxs("dl",{...m,className:l(c.slots.descriptionListRoot,Ag[t],a?.root,n),style:{...c.styles.descriptionList,...s},children:[e?.map((d,g)=>jsxRuntime.jsxs("div",{className:l(c.slots.descriptionListItem,a?.item),children:[jsxRuntime.jsx("dt",{className:l(c.slots.descriptionListTerm,a?.term),children:d.term}),jsxRuntime.jsx("dd",{className:l(c.slots.descriptionListValue,a?.value),children:d.value})]},g)),i]})}r(rs,"BaseDescriptionList");var Hg=["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 Vg(e){if(!Hg.includes(e))throw new TypeError('BaseDialog triggerTone must be "default", "primary", "success", "warning", "danger", or "muted".')}r(Vg,"validateTriggerTone");function Gg({trigger:e,triggerLabel:t,triggerIcon:o,triggerTone:n,triggerDisabled:a,theme:s}){return A(e)?jsxRuntime.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}):A(t)?jsxRuntime.jsxs("button",{type:"button",disabled:a,"aria-label":typeof t=="string"&&t.trim()?t:void 0,className:l(s.slots.buttonBase,na(s,n),a&&s.slots.buttonDisabled),style:{...s.styles.button,...a?s.styles.buttonDisabled:void 0},children:[A(o)?jsxRuntime.jsx("span",{"data-slot":"icon",className:s.slots.buttonIcon,children:o}):null,jsxRuntime.jsx("span",{"data-slot":"label",className:s.slots.buttonLabel,children:t})]}):null}r(Gg,"renderTrigger");var ba=st.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:w=true,restoreFocus:x=true,initialFocus:k="first-interactive",initialFocusRef:C,zIndex:S,portal:T=false,appearance:E,className:R,classNames:F,style:_,children:z,onOpenChange:O,id:j,...I},V){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(w,"trapFocus"),co(x,"restoreFocus"),co(T,"portal"),Vg(u),k!=="first-interactive"&&k!=="container"&&k!=="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 $=xt().dialog,N=ze(E),D=Ne(),M=f===void 0?$.close:f,K=Ee(N),J=To({disabled:!T}),[G,te]=st.useState(o),U=st.useRef(null),Z=st.useRef(null),ae=t!==void 0,ie=ae?t:G,de=T&&J.shouldPortal?"portaled":"inline",W=A(a),pe=A(s),B=A(i);if(y&&(typeof M!="string"||!M.trim()))throw new TypeError("BaseDialog closeLabel must be a non-empty string when showCloseButton is true.");let H=r(xe=>{ae||te(xe),O?.(xe);},"handleOpenChange");st.useEffect(()=>{if(!ie||!v)return;let xe=U.current,oe=xe?.ownerDocument,le=oe?.defaultView;if(!xe||!oe||!le)return;Z.current=oe.activeElement instanceof le.HTMLElement?oe.activeElement:null;let Re=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),Ie=r(()=>{let q=xe.querySelector(Re);(k==="container"?xe:k==="explicit"?C?.current??xe:q??xe).focus();},"focusInitial"),We=le.requestAnimationFrame(Ie),ue=r(q=>{if(q.key==="Escape"&&b){q.preventDefault(),q.stopPropagation(),H(false);return}if(q.key!=="Tab"||!w)return;let L=Array.from(xe.querySelectorAll(Re));if(L.length===0){q.preventDefault(),xe.focus();return}let X=L[0],se=L[L.length-1];q.shiftKey&&oe.activeElement===X?(q.preventDefault(),se.focus()):!q.shiftKey&&oe.activeElement===se&&(q.preventDefault(),X.focus());},"handleKeyDown");return le.addEventListener("keydown",ue),()=>{le.cancelAnimationFrame(We),le.removeEventListener("keydown",ue),x&&Z.current?.isConnected&&Z.current.focus();}},[b,k,C,ie,v,x,w]);let ne=B||W||pe?jsxRuntime.jsxs("div",{...D,"data-monkeys-component":"dialog","data-slot":"header","data-state":ie?"open":"closed","data-portal":de,className:l(K.slots.dialogHeader,F?.header,n==="page"&&"sr-only"),children:[B?i:null,W?jsxRuntime.jsx(bt__namespace.Title,{...D,"data-monkeys-component":"dialog","data-slot":"title","data-state":ie?"open":"closed","data-portal":de,className:B?"sr-only":l(K.slots.dialogTitle,F?.title),children:a}):null,pe?jsxRuntime.jsx(bt__namespace.Description,{...D,"data-monkeys-component":"dialog","data-slot":"description","data-state":ie?"open":"closed","data-portal":de,className:B?"sr-only":l(K.slots.dialogDescription,F?.description),children:s}):null]}):null,fe=Gg({trigger:c,triggerLabel:d,triggerIcon:g,triggerTone:u,triggerDisabled:p,theme:K}),ye=ie||v?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(bt__namespace.Overlay,{forceMount:v||void 0,hidden:!ie,...D,"aria-hidden":"true","data-monkeys-component":"dialog","data-slot":"overlay","data-portal":de,className:l(K.slots.dialogOverlay,F?.overlay),style:{...K.styles.dialogOverlay,zIndex:S,...n==="page"?{background:"transparent",backdropFilter:"none"}:{}}}),jsxRuntime.jsx("div",{...D,hidden:!ie,"data-monkeys-component":"dialog","data-slot":"content","data-state":ie?"open":"closed","data-portal":de,className:l(K.slots.dialogContent,F?.content),style:{zIndex:S,...n==="page"?{padding:0,inset:0}:{}},children:jsxRuntime.jsx(bt__namespace.Content,{forceMount:v||void 0,...D,...W?{}:{"aria-labelledby":void 0},...pe?{}:{"aria-describedby":void 0},asChild:true,onOpenAutoFocus:xe=>{if(v){xe.preventDefault();return}let oe=U.current;Z.current=oe?.ownerDocument.activeElement,(k==="container"||k==="explicit")&&(xe.preventDefault(),(k==="explicit"?C?.current??oe:oe)?.focus({preventScroll:true}));},onCloseAutoFocus:xe=>{if(v||!x){xe.preventDefault();return}let oe=Z.current;oe?.isConnected&&(xe.preventDefault(),oe.focus({preventScroll:true}));},onEscapeKeyDown:xe=>{(v||!b)&&xe.preventDefault();},onPointerDownOutside:xe=>{h||xe.preventDefault();},children:jsxRuntime.jsxs("div",{...D,ref:U,tabIndex:-1,"aria-modal":"true","data-monkeys-component":"dialog","data-slot":"panel","data-portal":de,className:l(K.slots.dialogPanel,F?.panel),"data-presentation":n,style:{...K.styles.dialogPanel,...n!=="default"?{width:n==="page"?"100vw":"96vw",maxWidth:"none",height:n==="page"?"100dvh":"94dvh",maxHeight:n==="page"?"100dvh":"94dvh",display:"flex",flexDirection:"column"}:{},...n==="page"?{borderRadius:0,border:0,boxShadow:"none",margin:0,animation:"none"}:{}},children:[ne,y?jsxRuntime.jsx(bt__namespace.Close,{asChild:true,children:jsxRuntime.jsx("button",{...D,type:"button","aria-label":M,title:M,"data-monkeys-component":"dialog","data-slot":"close","data-state":ie?"open":"closed","data-portal":de,className:l(K.slots.dialogClose,F?.close),children:"\xD7"})}):null,jsxRuntime.jsx("div",{...D,"data-monkeys-component":"dialog","data-slot":"body","data-state":ie?"open":"closed","data-portal":de,className:l(K.slots.dialogBody,F?.body),style:n!=="default"?{minHeight:0,flex:"1 1 0%",overflow:"hidden",padding:0}:void 0,children:z}),A(m)?jsxRuntime.jsx("div",{...D,"data-monkeys-component":"dialog","data-slot":"footer","data-state":ie?"open":"closed","data-portal":de,className:l(K.slots.dialogFooter,F?.footer),children:m}):null]})})})]}):null;return jsxRuntime.jsx("div",{...D,...I,ref:V,id:j,"data-monkeys-component":"dialog","data-slot":"root","data-state":ie?"open":"closed","data-portal":de,className:l(K.slots.dialogRoot,F?.root,R),style:_,children:jsxRuntime.jsxs(bt__namespace.Root,{open:ie,onOpenChange:H,modal:!v&&w,children:[fe?jsxRuntime.jsx(bt__namespace.Trigger,{...D,asChild:true,disabled:p,"data-monkeys-component":"dialog","data-slot":"trigger","data-portal":de,"data-tone":u,"data-disabled":p||void 0,className:l(K.slots.dialogTrigger,p&&K.slots.dialogTriggerDisabled,F?.trigger),children:fe}):null,T&&J.shouldPortal?jsxRuntime.jsx(zo,{children:jsxRuntime.jsx(bt__namespace.Portal,{...J.radixPortalProps,forceMount:v||void 0,children:ye})}):jsxRuntime.jsx(zo,{children:ye})]})})},"BaseDialog"));function $g(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",children:[jsxRuntime.jsx("rect",{width:"16",height:"12",x:"4",y:"6",rx:"2"}),jsxRuntime.jsx("path",{d:"M8 10h8"}),jsxRuntime.jsx("path",{d:"M8 14h5"})]})}r($g,"DefaultEmptyIcon");var fa=st.forwardRef(r(function({icon:t=jsxRuntime.jsx($g,{}),title:o,description:n,actions:a,variant:s,appearance:i,className:m,classNames:c,style:d,...g},u){let p=ze(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=Ee(p);return jsxRuntime.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:[A(t)?jsxRuntime.jsx("div",{"data-slot":"icon","data-state":"empty",className:l(v.slots.stateIcon,c?.icon),style:v.styles.stateIcon,children:t}):null,A(o)?jsxRuntime.jsx("div",{"data-slot":"title","data-state":"empty",className:l(v.slots.stateTitle,c?.title),children:o}):null,A(n)?jsxRuntime.jsx("div",{"data-slot":"description","data-state":"empty",className:l(v.slots.stateDescription,c?.description),children:n}):null,A(a)?jsxRuntime.jsx("div",{"data-slot":"actions","data-state":"empty",className:l(v.slots.stateActions,c?.actions),children:a}):null]})},"BaseEmptyState"));var Hd=st.createContext(false);function Vd({children:e}){let{locale:t}=ht();return e==null||e===""?null:jsxRuntime.jsx(lr,{content:e,portal:true,children:jsxRuntime.jsx("button",{type:"button","aria-label":typeof e=="string"?e:t.startsWith("zh")?"\u8BF4\u660E":"Help","data-form-help":true,className:"inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:jsxRuntime.jsx(lucideReact.HelpCircle,{className:"h-4 w-4","aria-hidden":"true"})})})}r(Vd,"BaseFormHelp");function Qg(...e){let t=e.flatMap(o=>o?.split(/\s+/).filter(Boolean)??[]);return t.length?Array.from(new Set(t)).join(" "):void 0}r(Qg,"mergeAriaIds");function is(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(is,"resolveOptionalId");var No=st.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,...w},x){for(let[H,ne]of [["required",s],["disabled",i]])if(typeof ne!="boolean")throw new TypeError(`BaseField ${H} 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 k=st.useContext(Hd)?"tooltip":"inline",C=st.useId(),S=ze(b),T=Ne(),E=Ee(S),R=A(o),[F,_]=st.useState(null),z=st.useRef(new Set),O=st.useRef(u),j=st.useRef(p),I=st.useRef(i);O.current=u,j.current=p,I.current=i;let V=u!==void 0;st.useEffect(()=>{(!V||i)&&_(null);},[i,V]),st.useEffect(()=>{if(V&&z.current.size!==1)throw new TypeError("BaseField with validate must contain exactly one compatible Base control.")},[V]);let $=st.useCallback(H=>{let ne=z.current;if(O.current!==void 0&&!ne.has(H)&&ne.size>0)throw new TypeError("BaseField with validate supports exactly one compatible Base control. Use BaseFieldset for control groups.");return ne.add(H),()=>{ne.delete(H);}},[]),N=st.useCallback((H,ne)=>{let fe=O.current;if(I.current||fe===void 0||j.current!==H)return;let ye=Cd(fe(ne));if(ye===null){_(null);return}_(ye);},[]),D=st.useCallback(H=>N("onBlur",H),[N]),M=st.useCallback(H=>N("onChange",H),[N]),J=A(a)?a:F,G=A(J),te=!G&&A(n),U=G?J:n,Z=m??`${C}-control`,ae=R?is(c,`${C}-description`,"descriptionId"):void 0,ie=te?is(d,`${C}-message`,"messageId"):void 0,de=G?is(g,`${C}-error`,"errorId"):void 0,W={id:Z,"aria-describedby":Qg(ae,ie),"aria-errormessage":de,"aria-invalid":G?true:void 0,"aria-required":s?true:void 0,required:s||void 0,disabled:i||void 0},pe=typeof f=="function"?f(W):f,B=st.useMemo(()=>({invalid:G,registerControl:$,notifyBlur:D,notifyChange:M}),[G,D,M,$]);return jsxRuntime.jsxs("div",{...T,...w,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":G||void 0,className:l(E.slots.fieldRoot,i&&E.slots.controlDisabled,y?.root,h),style:{...E.styles.field,...v},children:[A(t)?jsxRuntime.jsxs("div",{"data-slot":"label-row",className:l(E.slots.fieldLabelRow,y?.labelRow),children:[jsxRuntime.jsxs("label",{htmlFor:typeof f=="function"?Z:m,"data-slot":"label",className:l(E.slots.fieldLabel,y?.label),children:[t,s?jsxRuntime.jsxs("span",{"aria-hidden":"true","data-slot":"required-indicator",className:l(E.slots.fieldRequired,y?.required),children:[" ","*"]}):null]}),k==="tooltip"&&R?jsxRuntime.jsx(Vd,{children:o}):null]}):null,R?jsxRuntime.jsx("div",{id:ae,"data-slot":"description",className:l(E.slots.fieldDescription,y?.description,k==="tooltip"&&"sr-only"),children:o}):null,A(pe)?jsxRuntime.jsx("div",{"data-slot":"control",className:l(E.slots.fieldControl,y?.control),style:E.styles.fieldControl,children:jsxRuntime.jsx(Yi.Provider,{value:B,children:pe})}):null,A(U)?jsxRuntime.jsx("div",{id:G?de:ie,role:G?"alert":void 0,"data-slot":G?"error":"message",className:l(E.slots.fieldMessage,G&&"text-destructive-text",y?.message),children:U}):null]})},"BaseField"));var tb={sm:"h-8 px-2.5 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-3.5 text-base"},Qt=st.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=ze(m),v=Ne(),w=Ee(y),x=Vo(),k=n||x.invalid;return jsxRuntime.jsxs("div",{...v,"data-monkeys-component":"input","data-slot":"root","data-size":i,"data-invalid":k||void 0,"data-disabled":a||void 0,"data-readonly":s||void 0,className:l(w.slots.controlWrapper,k&&w.slots.controlInvalid,a&&w.slots.controlDisabled,s&&w.slots.controlReadOnly,d?.root,c),style:{...w.styles.control,...k?w.styles.controlInvalid:void 0,...a?w.styles.controlDisabled:void 0,...g},children:[A(t)?jsxRuntime.jsx("span",{"data-slot":"icon",className:l(w.slots.controlIcon,d?.icon),children:t}):null,jsxRuntime.jsx("input",{...b,ref:h,disabled:a,readOnly:s,"aria-invalid":u??(k||void 0),"data-slot":"control","data-size":i,"data-invalid":k||void 0,"data-disabled":a||void 0,"data-readonly":s||void 0,className:l(w.slots.controlBase,w.slots.controlInput,i&&tb[i],d?.control),onBlur:C=>{p?.(C),x.notifyBlur(C.currentTarget.value);},onChange:C=>{f?.(C),x.notifyChange(C.currentTarget.value);}}),A(o)?jsxRuntime.jsx("span",{"data-slot":"trailing",className:l(w.slots.controlTrailing,d?.trailing),children:o}):null]})},"BaseInput"));var rb={line:"h-4 w-full",block:"h-24 w-full",circle:"aspect-square h-10 rounded-full"},Dt=st.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=ze(a),u=Ne(),p=Ee(g),f=kd(n,o,d);return jsxRuntime.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,rb[t],f.mode==="pulse"&&"motion-safe:animate-pulse motion-reduce:animate-none",i?.root,s),style:{...p.styles.skeleton,...f.style,...m}})},"BaseSkeleton"));function sb({className:e}){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:e,fill:"none",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"9",className:"opacity-25",stroke:"currentColor",strokeWidth:"3"}),jsxRuntime.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M12 3a9 9 0 0 1 9 9h-3a6 6 0 0 0-6-6V3Z"})]})}r(sb,"DefaultLoadingIcon");var jo=st.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 w=ze(m),x=Ne(),{loading:k}=xt(),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=Ee(w),R=S==="skeleton"&&t===void 0?void 0:t===void 0?jsxRuntime.jsx(sb,{className:E.slots.loadingSpinner}):t,F=b??(h===void 0?typeof o=="string"?o:k.spinner:void 0);return jsxRuntime.jsxs("div",{...x,...y,ref:v,role:u,"aria-live":p,"aria-busy":f,"aria-label":F,"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"?jsxRuntime.jsx(Ho,{animation:i,children:jsxRuntime.jsxs("div",{className:"flex w-full max-w-sm flex-col gap-3","data-slot":"skeleton",children:[jsxRuntime.jsx(Dt,{variant:"block",className:"h-20"}),jsxRuntime.jsx(Dt,{variant:"line",className:"w-4/5"}),jsxRuntime.jsx(Dt,{variant:"line",className:"w-3/5"})]})}):A(R)?jsxRuntime.jsx("div",{"data-slot":"icon","data-state":"loading",className:l(E.slots.stateIcon,d?.icon),style:E.styles.stateIcon,children:R}):null,S!=="skeleton"&&A(o)?jsxRuntime.jsx("div",{"data-slot":"title","data-state":"loading",className:l(E.slots.stateTitle,d?.title),children:o}):null,S!=="skeleton"&&A(n)?jsxRuntime.jsx("div",{"data-slot":"description","data-state":"loading",className:l(E.slots.stateDescription,d?.description),children:n}):null,A(a)?jsxRuntime.jsx("div",{"data-slot":"actions","data-state":"loading",className:l(E.slots.stateActions,d?.actions),children:a}):null]})},"BaseLoadingState"));var yb=500;function hb({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(hb,"validateSelectProps");function ds(e){return typeof e=="string"||typeof e=="number"?String(e):""}r(ds,"normalizeValue");function xb(e,t){if(t!==void 0)return e.find(o=>o.value===t)}r(xb,"findOption");function ur(e,t){let o=e.findIndex(n=>n.value===t&&!n.disabled);return o>=0?o:e.findIndex(n=>!n.disabled)}r(ur,"getInitialActiveIndex");function vb(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(vb,"getNextEnabledIndex");function kb(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(kb,"getBoundaryEnabledIndex");function _d(e){return e.textValue!==void 0?e.textValue:typeof e.label=="string"?e.label:e.value}r(_d,"getOptionText");function wb(e){return e.replace(/[^a-zA-Z0-9_-]/g,"-")}r(wb,"toDomId");var uo=st.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:w,name:x,id:k,required:C,"aria-invalid":S,"aria-label":T,"aria-labelledby":E,"aria-describedby":R,"aria-errormessage":F,"aria-required":_,...z},O){hb({options:t,value:f,defaultValue:b,invalid:a,disabled:s,openForPreview:i,portal:m,required:C});let j=ze(c),I=Ne(),V=Ee(j),$=Vo(),N=a||$.invalid,D=st.useId(),M=k??D,K=`${M}-button`,J=`${M}-listbox`,G=st.useRef(null),te=st.useRef(null),U=st.useRef(null),Z=st.useRef([]),ae=st.useRef(false),ie=st.useRef(""),de=st.useRef(null),W=t??[],pe=W.length>0,B=i,[H,ne]=st.useState(false),[fe,ye]=st.useState(false),xe=B||H,oe=To({disabled:B||!m?true:void 0}),{refs:le,floatingStyles:Re,isPositioned:Ie,placement:We}=react.useFloating({transform:false,open:pe&&xe&&oe.shouldPortal,placement:"bottom-start",strategy:"fixed",whileElementsMounted:oe.shouldPortal?react.autoUpdate:void 0,middleware:[react.offset(6),react.flip({padding:8}),react.shift({padding:8}),react.size({padding:8,apply({rects:ge,availableHeight:He,elements:Q}){Object.assign(Q.floating.style,{width:`${ge.reference.width}px`,maxHeight:`min(15rem, ${Math.max(0,He)}px)`});}})]}),ue=st.useCallback(ge=>{te.current=ge,le.setReference(ge);},[le.setReference]),[q,L]=st.useState(()=>ds(b)),X=f!==void 0,se=X?ds(f):q,Y=xb(W,se),[ce,ke]=st.useState(()=>ur(W,se)),we=ce>=0&&!W[ce]?.disabled?ce:ur(W,se),Me=W.map((ge,He)=>`${M}-option-${He}-${wb(ge.value)}`),Pe=Y?.label??o,Ve=!Y,Xe=z.dir??I.dir,Oe=s?"disabled":N?"invalid":xe?"open":"closed",pt=r(ge=>{U.current=ge,typeof O=="function"?O(ge):O&&(O.current=ge);},"setSelectRef"),Ae=r(ge=>{h?.(ge),$.notifyBlur(ge.currentTarget.value);},"handleNativeBlur"),Le=r(ge=>{y?.(ge),$.notifyChange(ge.currentTarget.value);},"handleNativeChange"),re=r(()=>{ke(ur(W,se));},"resetActiveIndex"),Ce=r(()=>{re(),B||ne(false);},"cancelAndClose"),Fe=r((ge,He=false)=>{ye(He),ke(ge??ur(W,se)),B||ne(true);},"openMenu"),qe=r(ge=>{let He=U.current;if(!He)return;let Q=He.ownerDocument.defaultView;if(!Q)throw new Error("BaseSelect cannot dispatch change without an owning window.");let me=Object.getOwnPropertyDescriptor(Q.HTMLSelectElement.prototype,"value")?.set;if(!me)throw new Error("BaseSelect could not resolve the native select value setter.");me.call(He,ge),He.dispatchEvent(new Q.Event("change",{bubbles:true}));},"notifyChange"),nt=r(ge=>{let He=W[ge];!He||He.disabled||s||(ke(ge),He.value!==se&&(X||L(He.value),qe(He.value)),B||ne(false));},"commitIndex"),gt=r(ge=>{ge<0||W[ge]?.disabled||(ke(ge),xe||Fe(ge));},"moveActive"),Bt=r((ge,He)=>{let Q=ge.currentTarget.ownerDocument.defaultView;if(!Q)return;let me=`${ie.current}${He}`.toLocaleLowerCase();ie.current=me,de.current&&de.current.ownerWindow.clearTimeout(de.current.timerId),de.current={ownerWindow:Q,timerId:Q.setTimeout(()=>{ie.current="",de.current=null;},yb)};let he=Array.from(me).every(Te=>Te===me[0])?He.toLocaleLowerCase():me,ee=xe?we:W.findIndex(Te=>Te.value===se&&!Te.disabled);for(let Te=1;Te<=W.length;Te+=1){let Ke=(ee+Te+W.length)%W.length,Ze=W[Ke];if(!Ze?.disabled&&_d(Ze).trim().toLocaleLowerCase().startsWith(he)){ge.preventDefault(),gt(Ke);return}}},"handleTypeahead"),_e=r(ge=>{if(!(s||ae.current||ge.nativeEvent.isComposing)){if(ge.key==="ArrowDown"||ge.key==="ArrowUp"){ge.preventDefault();let He=W.findIndex(me=>me.value===se&&!me.disabled);gt(vb(W,xe?we:He,ge.key==="ArrowDown"?1:-1));return}if(ge.key==="Home"||ge.key==="End"){ge.preventDefault(),gt(kb(W,ge.key==="Home"?"first":"last"));return}if(ge.key==="Enter"||ge.key===" "){ge.preventDefault(),xe?nt(we):Fe();return}if(ge.key==="Escape"&&xe){ge.preventDefault(),Ce();return}if(ge.key==="Tab"&&xe){nt(we);return}ge.key.length===1&&!ge.ctrlKey&&!ge.metaKey&&!ge.altKey&&!/\s/.test(ge.key)&&Bt(ge,ge.key);}},"handleKeyDown"),zt=r(ge=>{v?.(ge),ge.defaultPrevented||te.current?.focus();},"handleCustomFocus"),Ot=r(ge=>{w?.(ge),ge.preventDefault(),te.current?.focus();},"handleCustomInvalid");return st.useEffect(()=>{if(!pe||!xe||B)return;let ge=G.current?.ownerDocument;if(!ge)return;let He=r(Q=>{!G.current?.contains(Q.target)&&!le.floating.current?.contains(Q.target)&&Ce();},"handlePointerDown");return ge.addEventListener("pointerdown",He),()=>{ge.removeEventListener("pointerdown",He);}},[B,pe,xe,W,se]),st.useEffect(()=>{!pe||!xe||we<0||Z.current[we]?.scrollIntoView?.({block:"nearest"});},[pe,xe,we]),st.useEffect(()=>{if(!pe||X)return;let ge=U.current,He=ge?.form,Q=ge?.ownerDocument.defaultView;if(!He||!Q)return;let me=r(()=>{Q.setTimeout(()=>{let Be=ds(b);L(Be),ke(ur(W,Be)),B||ne(false);},0);},"handleReset");return He.addEventListener("reset",me),()=>He.removeEventListener("reset",me)},[b,B,X,pe,W]),st.useEffect(()=>()=>{de.current&&de.current.ownerWindow.clearTimeout(de.current.timerId);},[]),pe?jsxRuntime.jsxs("div",{...I,ref:G,dir:Xe,"data-monkeys-component":"select","data-slot":"root","data-state":Oe,"data-native":"false",className:l(V.slots.controlWrapper,"overflow-visible",xe&&"z-50",N&&V.slots.controlInvalid,s&&V.slots.controlDisabled,g?.root,d),style:{...V.styles.control,...N?V.styles.controlInvalid:void 0,...s?V.styles.controlDisabled:void 0,...u},children:[A(n)?jsxRuntime.jsx("span",{className:l(V.slots.controlIcon,g?.icon),children:n}):null,jsxRuntime.jsx("button",{...I,ref:ue,type:"button",id:K,role:"combobox",disabled:s,dir:Xe,"aria-haspopup":"listbox","aria-expanded":xe,"aria-controls":J,"aria-activedescendant":xe&&we>=0?Me[we]:void 0,"aria-autocomplete":"none","aria-invalid":S??(N||void 0),"aria-label":T,"aria-labelledby":E,"aria-describedby":R,"aria-errormessage":F,"aria-required":_??(C||void 0),"data-monkeys-component":"select","data-slot":"trigger","data-state":Oe,className:l(V.slots.controlBase,V.slots.controlSelect,"flex items-center text-left",g?.control),onClick:ge=>{xe?Ce():Fe(void 0,ge.detail>0);},onBlur:ge=>{!G.current?.contains(ge.relatedTarget)&&!le.floating.current?.contains(ge.relatedTarget)&&(Ce(),$.notifyBlur(se));},onCompositionStart:()=>{ae.current=true;},onCompositionEnd:()=>{ae.current=false;},onKeyDown:_e,children:jsxRuntime.jsx("span",{className:l("min-w-0 flex-1 truncate",Ve&&V.slots.selectPlaceholder,Ve&&g?.placeholder),children:Pe})}),jsxRuntime.jsx("span",{className:l(V.slots.selectChevron,xe&&"rotate-[225deg]")}),jsxRuntime.jsxs("select",{...I,...z,ref:pt,id:k,name:x,value:se,required:C,disabled:s,dir:Xe,"aria-hidden":"true",tabIndex:-1,"data-monkeys-component":"select","data-slot":"native","data-state":Oe,"data-native":"false",className:V.slots.selectNative,onBlur:h,onFocus:zt,onInvalid:Ot,onChange:Le,children:[A(o)?jsxRuntime.jsx("option",{value:"",disabled:true,children:o}):null,W.map(ge=>jsxRuntime.jsx("option",{value:ge.value,disabled:ge.disabled,children:_d(ge)},ge.value))]}),xe?Rd(jsxRuntime.jsx("div",{...I,ref:oe.shouldPortal?le.setFloating:void 0,id:J,role:"listbox",dir:Xe,"aria-labelledby":K,"data-monkeys-component":"select","data-slot":"menu","data-portal":oe.shouldPortal?"portaled":"inline","data-state":"open","data-side":oe.shouldPortal?We.split("-")[0]:"bottom",className:l(V.slots.selectMenu,oe.shouldPortal&&We.startsWith("top")?"origin-bottom":"origin-top",fe&&!B&&(!oe.shouldPortal||Ie)&&"motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95 motion-safe:duration-150 motion-safe:ease-out",g?.menu),style:{...V.styles.selectMenu,...oe.shouldPortal?{...Re,right:"auto",visibility:Ie?"visible":"hidden"}:void 0},children:W.map((ge,He)=>{let Q=ge.value===se,me=He===we,Be=ge.disabled?"disabled":me?"active":Q?"selected":"idle";return st.createElement("button",{...I,ref:he=>{Z.current[He]=he;},key:ge.value,id:Me[He],type:"button",role:"option",tabIndex:-1,disabled:ge.disabled,dir:Xe,"aria-selected":Q,"data-monkeys-component":"select","data-slot":"option","data-state":Be,"data-active":me||void 0,"data-selected":Q||void 0,"data-disabled":ge.disabled||void 0,className:l(V.slots.selectOption,me&&V.slots.selectOptionActive,Q&&V.slots.selectOptionSelected,ge.disabled&&V.slots.selectOptionDisabled,g?.option),style:{...V.styles.selectOption,...me?V.styles.selectOptionActive:void 0,...Q?V.styles.selectOptionSelected:void 0},onMouseDown:he=>he.preventDefault(),onClick:()=>nt(He)},jsxRuntime.jsx("span",{className:"min-w-0 flex-1 truncate",children:ge.label}))})}),oe):null]}):jsxRuntime.jsxs("div",{...I,"data-monkeys-component":"select","data-slot":"root","data-state":Oe,"data-native":"true",className:l(V.slots.controlWrapper,N&&V.slots.controlInvalid,s&&V.slots.controlDisabled,g?.root,d),style:{...V.styles.control,...N?V.styles.controlInvalid:void 0,...s?V.styles.controlDisabled:void 0,...u},children:[A(n)?jsxRuntime.jsx("span",{className:l(V.slots.controlIcon,g?.icon),children:n}):null,jsxRuntime.jsxs("select",{...I,...z,id:k,ref:O,name:x,value:f,defaultValue:b,required:C,disabled:s,"aria-invalid":S??(N||void 0),"aria-label":T,"aria-labelledby":E,"aria-describedby":R,"aria-errormessage":F,"aria-required":_,"data-monkeys-component":"select","data-slot":"native","data-state":Oe,"data-native":"true",onBlur:Ae,onFocus:v,onInvalid:w,onChange:Le,className:l(V.slots.controlBase,V.slots.controlSelect,g?.control),children:[A(o)?jsxRuntime.jsx("option",{value:"",disabled:true,children:o}):null,p]}),jsxRuntime.jsx("span",{className:V.slots.selectChevron})]})},"BaseSelect"));function Tb(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(Tb,"getInitialSegmentValue");function pn({options:e=[],value:t,defaultValue:o,appearance:n,className:a,classNames:s,style:i,onValueChange:m,...c}){let d=Ee(n),[g,u]=st.useState(()=>Tb(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 w=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"?(w-1+v.length)%v.length:(w+1)%v.length,k=v[x],C=y.currentTarget.querySelectorAll('[role="radio"]'),S=Array.from(C).find(T=>T.dataset.value===k.value);b(k.value),S?.focus();},"handleKeyDown");return jsxRuntime.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 jsxRuntime.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:[A(y.icon)?jsxRuntime.jsx("span",{className:l("inline-flex h-4 w-4 shrink-0",s?.icon),children:y.icon}):null,jsxRuntime.jsx("span",{className:l("min-w-0 truncate",s?.label),children:y.label})]},y.value)})})}r(pn,"BaseSegmentedControl");function Ib({kind:e}){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-7 w-7",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",children:{error:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"9"}),jsxRuntime.jsx("path",{d:"M12 7v6"}),jsxRuntime.jsx("path",{d:"M12 17h.01"})]}),permission:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2"}),jsxRuntime.jsx("path",{d:"M8 10V7a4 4 0 0 1 8 0v3"})]}),offline:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M5 12.5a10 10 0 0 1 14 0"}),jsxRuntime.jsx("path",{d:"M8.5 16a5 5 0 0 1 7 0"}),jsxRuntime.jsx("path",{d:"M12 20h.01"}),jsxRuntime.jsx("path",{d:"m4 4 16 16"})]}),fallback:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"9"}),jsxRuntime.jsx("path",{d:"M9.5 9a2.5 2.5 0 1 1 4.2 1.8c-1 .8-1.7 1.2-1.7 2.7"}),jsxRuntime.jsx("path",{d:"M12 17h.01"})]})}[e]})}r(Ib,"SystemStateIcon");var pr=st.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=ze(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,w=Ee(b),x=o===void 0?jsxRuntime.jsx(Ib,{kind:t}):o,k=g??(t==="error"||t==="offline"?"alert":"status");return jsxRuntime.jsxs("div",{...h,...p,ref:f,role:k,"aria-live":u??(k==="alert"?"assertive":"polite"),"data-monkeys-component":"system-state","data-slot":"root","data-state":t,"data-density":y.density,className:l(w.slots.stateRoot,v,c?.root,m),style:{...w.styles.stateRoot,...d},children:[A(x)?jsxRuntime.jsx("div",{"data-slot":"icon","data-state":t,className:l(w.slots.stateIcon,c?.icon),style:w.styles.stateIcon,children:x}):null,A(n)?jsxRuntime.jsx("div",{"data-slot":"title","data-state":t,className:l(w.slots.stateTitle,c?.title),children:n}):null,A(a)?jsxRuntime.jsx("div",{"data-slot":"description","data-state":t,className:l(w.slots.stateDescription,c?.description),children:a}):null,A(s)?jsxRuntime.jsx("div",{"data-slot":"actions","data-state":t,className:l(w.slots.stateActions,c?.actions),children:s}):null]})},"BaseSystemState"));var us="application/x-monkeys-base-table-column",Sa=8;function ys(e,t){typeof e=="function"?e(t):e&&(e.current=t);}r(ys,"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 Nn(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(Nn,"assertEnum");function ms(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(ms,"assertOptionalLabel");function fs(e,t){if(t!==void 0&&typeof t!="function")throw new Error(`BaseTable ${e} must be a function when provided.`)}r(fs,"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 Db(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(Db,"validateColumns");function Wb(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(Wb,"validateColumnOrder");function Lb(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(Lb,"validateColumnSizes");function Ta(e){let t=e.ownerDocument.defaultView;return t?t.getComputedStyle(e).direction==="rtl":e.closest('[dir="rtl"]')!==null}r(Ta,"isRtl");function Ab(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(Ab,"setPointerCaptureIfAvailable");var Ud=st.createContext(null);function Uo(e){let t=st.useContext(Ud),o=ze(e);if(t){let a=e===void 0?t.appearance:o;return {...t,theme:e===void 0?t.theme:Ee(a),appearance:a}}let n=Ee(o);return {appearance:o,theme:n,layout:"native",setDraggingColumnId:r(()=>{},"setDraggingColumnId")}}r(Uo,"useBaseTableContext");function qd(e){let t=false;return st.Children.forEach(e,o=>{if(t||!st.isValidElement(o))return;let n=o.props;if(n.layout==="split-scroll"){t=true;return}n.children&&(t=qd(n.children));}),t}r(qd,"hasSplitScrollTable");function ps(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r(ps,"toCssSize");function zb(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(zb,"validateTableCssSize");function gs(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(gs,"validateCssSize");function $d(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($d,"validateNumericSize");function Ob(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=$d(a.minWidth,i,"minWidth"),d=$d(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=gs(a.minWidth,i,"minWidth"),u=gs(a.maxWidth,i,"maxWidth"),p=m!==void 0?$o(m,c,d):a.width,f=gs(p,i,"width");return f||`minmax(${g??"0px"}, ${u??"1fr"})`}).join(" ")} var(--base-table-split-scrollbar-gutter)`}r(Ob,"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 bs(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(bs,"getNextColumnOrder");function Fb(e){switch(e){case "asc":return "ascending";case "desc":return "descending";default:return}}r(Fb,"sortAriaValue");function Hb(e){switch(e){case "center":return "center";case "right":return "flex-end";default:return "flex-start"}}r(Hb,"getSplitHeadJustifyContent");function Vb(e){switch(e){case "top":return "flex-start";case "bottom":return "flex-end";default:return "center"}}r(Vb,"getSplitHeadAlignItems");function Gb({direction:e,className:t}){return jsxRuntime.jsx("span",{"aria-hidden":"true",className:l(t,e==="desc"&&"rotate-180",(!e||e==="none")&&"opacity-45"),children:"\u25B2"})}r(Gb,"SortIndicator");function _b(){return jsxRuntime.jsxs("span",{"aria-hidden":"true",className:"grid gap-0.5",children:[jsxRuntime.jsx("span",{className:"h-0.5 w-0.5 rounded-full bg-current"}),jsxRuntime.jsx("span",{className:"h-0.5 w-0.5 rounded-full bg-current"}),jsxRuntime.jsx("span",{className:"h-0.5 w-0.5 rounded-full bg-current"})]})}r(_b,"DragHandleIcon");var Na=st.forwardRef(r(function({appearance:t,attachedFooter:o=false,children:n,className:a,classNames:s,style:i,...m},c){Mo("attachedFooter",o);let d=ze(t),g=Ne(),u=Ee(d),f=qd(n)?{overflow:"hidden",scrollbarGutter:"auto"}:void 0;return jsxRuntime.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")),Ia=st.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){Nn("layout",s,["native","split-scroll"]),Mo("columnDragEnabled",u),Mo("columnResizeEnabled",p),fs("onColumnOrderChange",f),fs("onColumnSizeChange",b),Ko(m,"bodyMaxHeight",{stringAllowed:true});let v=Db(i);Wb(d,v),Lb(g,v);let w=ze(t),x=Ne(),k=Ee(w),[C,S]=st.useState(),T=st.useRef(null),E=st.useRef(null),R=s==="split-scroll",F=R?Ob(i,g):void 0,_={appearance:w,theme:k,layout:s,columnTemplate:F,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 jsxRuntime.jsx(Ud.Provider,{value:_,children:jsxRuntime.jsx("table",{...x,...h,ref:y,"data-monkeys-component":"table","data-slot":"root","data-base-table-layout":s,className:l(k.slots.tableRoot,R&&k.slots.tableSplitRoot,n?.root,o),style:{...k.styles.table,...R?k.styles.tableSplitRoot:void 0,...F?{"--base-table-column-template":F}:void 0,...a}})})},"BaseTable")),Ma=st.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 jsxRuntime.jsx("thead",{...s,ref:r(p=>{c&&(c.current=g?p:null),ys(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")),Ba=st.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 jsxRuntime.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:zb(d,"bodyMaxHeight")}:void 0,...s}})},"BaseTableBody"));st.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 jsxRuntime.jsx("tfoot",{...s,ref:r(p=>{c&&(c.current=g?p:null),ys(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=st.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 jsxRuntime.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")),Pa=st.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:w,width:x,minWidth:k,maxWidth:C,appearance:S,className:T,classNames:E,style:R,children:F,onDragOver:_,onDrop:z,...O},j){if(Nn("head presentation",t,["classic-data-grid"]),Nn("head align",n,["left","center","right"]),Nn("head verticalAlign",a,["top","middle","bottom"]),Nn("head sortDirection",p,["asc","desc","none"]),Mo("head sortable",u),Mo("head draggable",h),Mo("head resizable",v),fs("head onSort",b),ms("head sortLabel",f),ms("head dragLabel",y),ms("head resizeLabel",w),o!==void 0&&(typeof o!="string"||o.trim().length===0))throw new Error("BaseTable head columnId must be a non-empty string when provided.");if(Ko(x,"head width",{stringAllowed:true}),Ko(k,"head minWidth"),Ko(C,"head maxWidth"),k!==void 0&&C!==void 0&&k>C)throw new Error("BaseTable head minWidth cannot be greater than maxWidth.");let I=Uo(S),{theme:V}=I,$=xt().table,N=I.layout==="split-scroll",D=t==="classic-data-grid",M=n??(N?"center":"left"),K=a??"middle",J=st.useRef(null),G=st.useRef(()=>{}),[te,U]=st.useState(),Z=r(ue=>{J.current=ue,ys(j,ue);},"setHeadRef"),ae=o&&I.columnSizes?.[o]!==void 0?I.columnSizes[o]:x,ie=!!(o&&h!==false&&(h||I.columnDragEnabled)&&I.columnOrder&&I.onColumnOrderChange),de=!!(o&&v!==false&&(v||I.columnResizeEnabled)&&I.onColumnSizeChange);if(de&&C!==void 0&&C<(k??48))throw new Error("BaseTable resizable head maxWidth cannot be smaller than its effective minWidth.");let W=!!(u||b),pe=Fb(p),B=A(i)?i:F,H=A(B)||A(m),ne=f??(H?void 0:$.sortColumn({columnId:o?.trim()||void 0})),fe=ie||A(s)||A(i)||A(m)||A(c)||A(d)||A(g)||W,ye=D?jsxRuntime.jsx("div",{className:l("flex h-full min-w-0 select-none items-center",M==="center"?"justify-center":M==="right"?"justify-end":"justify-start",ie&&"cursor-grab active:cursor-grabbing"),...ie?{draggable:true,role:"button",tabIndex:0,"aria-disabled":false,"aria-roledescription":"sortable",onKeyDown:r(ue=>{if(!o||!I.columnOrder||ue.key!=="ArrowLeft"&&ue.key!=="ArrowRight")return;let q=I.columnOrder.indexOf(o);if(q<0)return;let L=Ta(ue.currentTarget),X=ue.key==="ArrowLeft"?-1:1,se=q+(L?-X:X),Y=I.columnOrder[se];if(!Y)return;let ce=bs(I.columnOrder,o,Y);ce&&(ue.preventDefault(),I.onColumnOrderChange?.(ce,{columnId:o,targetColumnId:Y}));},"onKeyDown"),onDragStart:r(ue=>{ue.stopPropagation(),I.setDraggingColumnId(o),ue.dataTransfer.effectAllowed="move",ue.dataTransfer.setData(us,o);},"onDragStart"),onDragEnd:r(ue=>{ue.stopPropagation(),I.setDraggingColumnId(void 0);},"onDragEnd")}:{},children:B}):fe?jsxRuntime.jsxs("div",{className:l(V.slots.tableHeadContent,E?.content),children:[jsxRuntime.jsxs("div",{className:l(V.slots.tableHeadMain,E?.main),children:[ie?jsxRuntime.jsx("button",{type:"button",draggable:true,title:y,"aria-label":y??$.dragColumn({columnId:o}),className:l(V.slots.tableHeadDragHandle,E?.dragHandle),onClick:ue=>ue.stopPropagation(),onKeyDown:ue=>{if(!o||!I.columnOrder||ue.key!=="ArrowLeft"&&ue.key!=="ArrowRight")return;let q=I.columnOrder.indexOf(o);if(q<0)return;let L=Ta(ue.currentTarget),X=ue.key==="ArrowLeft"?-1:1,se=q+(L?-X:X),Y=I.columnOrder[se];if(!Y)return;let ce=bs(I.columnOrder,o,Y);ce&&(ue.preventDefault(),I.onColumnOrderChange?.(ce,{columnId:o,targetColumnId:Y}));},onDragStart:ue=>{ue.stopPropagation(),I.setDraggingColumnId(o),ue.dataTransfer.effectAllowed="move",ue.dataTransfer.setData(us,o);},onDragEnd:ue=>{ue.stopPropagation(),I.setDraggingColumnId(void 0);},children:jsxRuntime.jsx(_b,{})}):null,s?jsxRuntime.jsx("span",{className:l(V.slots.tableHeadIcon,E?.icon),children:s}):null,W?jsxRuntime.jsxs("button",{type:"button",disabled:!b,title:f,"aria-label":ne,className:l(V.slots.tableHeadSortButton,E?.sortButton),onClick:ue=>{ue.stopPropagation(),b?.(o);},children:[jsxRuntime.jsxs("span",{className:l(V.slots.tableHeadText,E?.text),children:[A(B)?jsxRuntime.jsx("span",{className:l(V.slots.tableHeadLabel,E?.label),children:B}):null,A(m)?jsxRuntime.jsx("span",{className:l(V.slots.tableHeadDescription,E?.description),children:m}):null]}),jsxRuntime.jsx(Gb,{direction:p,className:l(V.slots.tableHeadSortIcon,E?.sortIcon)})]}):jsxRuntime.jsxs("span",{className:l(V.slots.tableHeadText,E?.text),children:[A(B)?jsxRuntime.jsx("span",{className:l(V.slots.tableHeadLabel,E?.label),children:B}):null,A(m)?jsxRuntime.jsx("span",{className:l(V.slots.tableHeadDescription,E?.description),children:m}):null]})]}),A(c)||A(d)||A(g)?jsxRuntime.jsxs("div",{className:l(V.slots.tableHeadActions,E?.actions),children:[A(c)?jsxRuntime.jsx("span",{className:l(V.slots.tableHeadMeta,E?.meta),children:c}):null,d,g]}):null]}):F,xe=r(ue=>{_?.(ue),!(!ie||!I.draggingColumnId||I.draggingColumnId===o)&&(ue.preventDefault(),ue.dataTransfer.dropEffect="move");},"handleDragOver"),oe=r(ue=>{if(z?.(ue),!ie||!o)return;let q=I.draggingColumnId||ue.dataTransfer.getData(us);if(!q||q===o)return;let L=bs(I.columnOrder,q,o);L&&(ue.preventDefault(),I.onColumnOrderChange?.(L,{columnId:q,targetColumnId:o})),I.setDraggingColumnId(void 0);},"handleDrop"),le=r(ue=>{if(!de||!o||!I.onColumnSizeChange||ue.button!==0&&ue.pointerType!=="touch")return;ue.preventDefault(),ue.stopPropagation(),G.current();let q=ue.clientX,L=Re??J.current?.offsetWidth??k??48,X=$o(L,k,C),se=ue.pointerId,Y=ue.currentTarget,ce=Y.ownerDocument,ke=Ta(Y),we=r(Ve=>{if(Ve.pointerId!==se)return;let Xe=$o(X+(ke?q-Ve.clientX:Ve.clientX-q),k,C);I.onColumnSizeChange?.(o,Xe,{columnId:o,previousWidth:X,minWidth:k,maxWidth:C});},"handlePointerMove"),Me=r(Ve=>{Ve.pointerId===se&&G.current();},"handleStop"),Pe=r(Ve=>{Ve.pointerId===se&&G.current();},"handleLostCapture");G.current=()=>{ce.removeEventListener("pointermove",we),ce.removeEventListener("pointerup",Me),ce.removeEventListener("pointercancel",Me),Y.removeEventListener("lostpointercapture",Pe),Y.hasPointerCapture?.(se)&&Y.releasePointerCapture?.(se),G.current=()=>{};},Ab(Y,se),ce.addEventListener("pointermove",we),ce.addEventListener("pointerup",Me),ce.addEventListener("pointercancel",Me),Y.addEventListener("lostpointercapture",Pe);},"handleResizePointerDown"),Re=typeof ae=="number"?$o(ae,k,C):te,Ie=Re??$o(k??48,k,C),We=r(ue=>{if(!de||!o||!I.onColumnSizeChange)return;let q=Ta(ue.currentTarget),L=Re??$o(J.current?.offsetWidth||k||48,k,C),X;ue.key==="ArrowLeft"&&(X=L+(q?Sa:-Sa)),ue.key==="ArrowRight"&&(X=L+(q?-Sa:Sa)),ue.key==="Home"&&k!==void 0&&(X=k),ue.key==="End"&&C!==void 0&&(X=C),X!==void 0&&(ue.preventDefault(),ue.stopPropagation(),I.onColumnSizeChange(o,$o(X,k,C),{columnId:o,previousWidth:L,minWidth:k,maxWidth:C}));},"handleResizeKeyDown");return st.useEffect(()=>{if(typeof ae=="number"){U(void 0);return}let ue=J.current?.getBoundingClientRect().width;if(ue&&Number.isFinite(ue)){let q=$o(ue,k,C);U(L=>L===q?L:q);}},[ae,k,C,de]),st.useEffect(()=>(de||G.current(),()=>G.current()),[de,o,I.onColumnSizeChange]),jsxRuntime.jsxs("th",{...O,ref:Z,"data-slot":"head","data-v2-header-drag-id":D&&ie?o:void 0,scope:O.scope??"col","aria-sort":pe,className:l(V.slots.tableHead,N&&V.slots.tableSplitHead,M==="center"&&V.slots.tableCellAlignCenter,M==="right"&&V.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:{...V.styles.tableHead,...N?V.styles.tableSplitHead:void 0,width:N?void 0:ps(ae),minWidth:N?void 0:ps(k),maxWidth:N?void 0:ps(C),...N?{alignItems:Vb(K),justifyContent:Hb(M),textAlign:M}:a?{verticalAlign:a}:void 0,...R},onDragOver:xe,onDrop:oe,children:[ye,de&&D?jsxRuntime.jsx("div",{"data-column-resize-handle":"true",className:"absolute right-0 top-0 z-20 h-full w-2 cursor-col-resize touch-none select-none hover:bg-muted",onPointerDown:le}):de?jsxRuntime.jsx("button",{type:"button",role:"separator","aria-orientation":"vertical","aria-valuenow":Ie,"aria-valuemin":k??48,"aria-valuemax":C,"aria-valuetext":`${Ie}px`,title:w,"aria-label":w??$.resizeColumn({columnId:o}),className:l(V.slots.tableHeadResizeHandle,E?.resizeHandle),onClick:ue=>ue.stopPropagation(),onKeyDown:We,onPointerDown:le}):null]})},"BaseTableHead")),gr=st.forwardRef(r(function({align:t="left",appearance:o,className:n,classNames:a,style:s,...i},m){Nn("cell align",t,["left","center","right"]);let{layout:c,theme:d}=Uo(o),g=c==="split-scroll";return jsxRuntime.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"));st.forwardRef(r(function({appearance:t,className:o,classNames:n,style:a,...s},i){let{theme:m}=Uo(t);return jsxRuntime.jsx("caption",{...s,ref:i,"data-slot":"caption",className:l(m.slots.tableCaption,n?.root,o),style:{...m.styles.tableCaption,...a}})},"BaseTableCaption"));var Ea=st.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=A(o)||A(n)||A(a)||A(s);return jsxRuntime.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:jsxRuntime.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?jsxRuntime.jsxs("div",{className:l(b.slots.tableEmptyContent,d?.content),children:[A(o)?jsxRuntime.jsx("div",{className:l(b.slots.tableEmptyIcon,d?.icon),children:o}):null,A(n)?jsxRuntime.jsx("div",{className:l(b.slots.tableEmptyTitle,d?.title),children:n}):null,A(a)?jsxRuntime.jsx("div",{className:l(b.slots.tableEmptyDescription,d?.description),children:a}):null,A(s)?jsxRuntime.jsx("div",{className:l(b.slots.tableEmptyActions,d?.actions),children:s}):null]}):i})})},"BaseTableEmpty"));var $b={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"},br=st.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,k]of [["invalid",t],["disabled",o],["readOnly",n]])if(typeof k!="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=ze(s),h=Ne(),y=Ee(b),v=Vo(),w=t||v.invalid;return jsxRuntime.jsx("textarea",{...h,...p,ref:f,disabled:o,readOnly:n,"aria-invalid":d??(w||void 0),"data-monkeys-component":"textarea","data-slot":"control","data-size":a,"data-invalid":w||void 0,"data-disabled":o||void 0,"data-readonly":n||void 0,className:l(y.slots.controlWrapper,y.slots.controlBase,y.slots.controlTextarea,w&&y.slots.controlInvalid,o&&y.slots.controlDisabled,n&&y.slots.controlReadOnly,a&&$b[a],m?.control,i),style:{...y.styles.control,...w?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 Yd={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 ws(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(Yd,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(Yd[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(ws,"parseAssetIconNodes");var Mn=st.forwardRef(r(function({icon:t,alt:o,normalizeImageIcon:n=false,className:a,style:s,...i},m){let c=Ne(),d=Ai()??runtime.resolveAssetIconNodes,g=Vl(),u=t.kind==="image"?t.src:void 0,[p,f]=st.useState();st.useEffect(()=>{if(!u||!g)return;let O=new AbortController;return Promise.resolve().then(()=>g(u,O.signal)).then(j=>{O.signal.aborted||f({reference:u,resolver:g,src:Zt(j,"media")});}).catch(()=>{O.signal.aborted||f({reference:u,resolver:g});}),()=>O.abort()},[u,g]);let b=g?p&&p.reference===u&&p.resolver===g?p.src:void 0:Zt(u,"media"),[h,y]=st.useState(),v=st.useRef(null);st.useEffect(()=>{let O=v.current;b&&O?.complete&&y({source:b,resolver:g,ready:O.naturalWidth>0});},[b,g]);let w=t.kind==="lucide"?t.name:void 0,x=st.useMemo(()=>{if(w)try{return d.peek?ws(d.peek(w)):void 0}catch{return}},[w,d]),[k,C]=st.useState();st.useEffect(()=>{let O=true;return w&&!x&&Promise.resolve().then(()=>d(w)).then(j=>{O&&C({name:w,resolver:d,nodes:ws(j)});}).catch(()=>{O&&C({name:w,resolver:d,nodes:void 0});}),()=>{O=false;}},[w,d,x]);let S=k?.name===w&&k?.resolver===d,T=x??(S?k?.nodes:void 0),E=!!(u&&g&&!(p?.reference===u&&p?.resolver===g)),R=h?.source===b&&h?.resolver===g,F=!!(w&&!x&&!S),_=t.kind==="emoji"?"ready":t.kind==="image"?b?R?h?.ready?"ready":"error":"loading":E?"loading":"error":T?"ready":F?"loading":"error",z=_==="loading"?jsxRuntime.jsx(Dt,{variant:"block",className:"h-5 w-5 max-h-full max-w-full rounded"}):jsxRuntime.jsx(lucideReact.Wrench,{"aria-hidden":"true",className:"h-5 w-5 max-h-full max-w-full"});return jsxRuntime.jsx("div",{...c,...i,ref:m,role:"img","aria-label":o,"data-icon-state":_,"aria-busy":_==="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"?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[b&&_!=="error"&&jsxRuntime.jsx("img",{ref:v,src:b,alt:"","aria-hidden":"true",onLoad:O=>{O.currentTarget===v.current&&y({source:b,resolver:g,ready:true});},onError:O=>{O.currentTarget===v.current&&y({source:b,resolver:g,ready:false});},style:_==="loading"?{display:"none"}:void 0,className:n?"h-5 w-5 object-contain":"h-full w-full object-cover"},b),_!=="ready"&&z]}):t.kind==="emoji"?jsxRuntime.jsx("span",{"aria-hidden":"true",children:t.value}):T?jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"h-5 w-5 max-h-full max-w-full",children:T.map(([O,j],I)=>{let{key:V,...$}=j;return st.createElement(O,{...$,key:V??I})})}):z})},"BaseAssetIcon"));function Xd({expanded:e}){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:jsxRuntime.jsx("path",{d:e?"m6 9 6 6 6-6":"m9 18 6-6-6-6"})})}r(Xd,"ChevronIcon");function of(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"12",cy:"5",r:"1"}),jsxRuntime.jsx("circle",{cx:"12",cy:"19",r:"1"})]})}r(of,"MoreIcon");function nf(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[jsxRuntime.jsx("circle",{cx:"9",cy:"6",r:"1"}),jsxRuntime.jsx("circle",{cx:"9",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"9",cy:"18",r:"1"}),jsxRuntime.jsx("circle",{cx:"15",cy:"6",r:"1"}),jsxRuntime.jsx("circle",{cx:"15",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"15",cy:"18",r:"1"})]})}r(nf,"GripIcon");function ec(e,t){for(let o of e??[])o.defaultExpanded&&t.add(o.id),ec(o.children,t);}r(ec,"collectDefaultExpandedNodeIds");function Zd(e,t){let o=new Set(t??[]);for(let n of e)ec(n.nodes,o);return o}r(Zd,"buildDefaultNodeExpandedSet");function Qd(e,t){let o=new Set(t??[]);for(let n of e)(n.hideHeader||n.defaultExpanded!==false)&&o.add(n.id);return o}r(Qd,"buildDefaultGroupExpandedSet");function tc(e,t,o,n){for(let[a,s]of (e??[]).entries())n.set(s.id,{node:s,group:t,parentId:o,index:a}),tc(s.children,t,s.id,n);}r(tc,"flattenNodes");function rf(e){let t=new Map;for(let o of e)tc(o.nodes,o,void 0,t);return t}r(rf,"buildFlattenedNodeMap");function af(e,t){return [...t??[],...e.actions??[]]}r(af,"getNodeActions");function sf(e,t){return [...t??[],...e.actions??[]]}r(sf,"getGroupActions");function Cs({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:w,labels:x,reorderMode:k="none",appearance:C,className:S,classNames:T,onSelectNode:E,onSelectGroup:R,onExpandedNodeIdsChange:F,onExpandedGroupIdsChange:_,onAction:z,onReorderNodes:O}){let j=xt().dataExplorer.viewTree,I=Ll(El(C)),V=x?.actions??j.actions,$=x?.expand??j.expand,N=x?.collapse??j.collapse,D=v??x?.loading??j.loading,M=h??x?.empty??j.empty,K=Array.isArray(e),J=st.useMemo(()=>K?e:[{id:"__root__",hideHeader:true,defaultExpanded:true,nodes:Array.isArray(t)?t:[]}],[e,K,t]),G=st.useMemo(()=>rf(J),[J]),[te,U]=st.useState(()=>Zd(J,i)),[Z,ae]=st.useState(()=>Qd(J,c)),[ie,de]=st.useState(),[W,pe]=st.useState();st.useEffect(()=>{U(Zd(J,i)),ae(Qd(J,c));},[c,i,d]);let B=s!==void 0?new Set(s):te,H=m!==void 0?new Set(m):Z,ne=r((q,L)=>{let X=new Set(B);L?X.add(q):X.delete(q),s===void 0&&U(X),F?.([...X]);},"setNodeExpanded"),fe=r((q,L)=>{let X=new Set(H);L?X.add(q):X.delete(q),m===void 0&&ae(X),_?.([...X]);},"setGroupExpanded"),ye=r((q,L)=>L.type==="node"?{type:"node",action:q,node:L.node,group:L.group,context:o}:{type:"group",action:q,group:L.group,context:o},"createActionContext"),xe=r((q,L)=>{let X=q.filter(se=>{let Y=ye(se,L);return Jn(se.visible,Y)??true});return X.length===0?null:jsxRuntime.jsxs(Vt__namespace.Root,{children:[jsxRuntime.jsx(Vt__namespace.Trigger,{asChild:true,children:jsxRuntime.jsx("button",{type:"button",title:V,"aria-label":V,className:l(I.slots.menuTrigger,L.type==="group"?I.slots.treeGroupActions:I.slots.treeNodeActions,L.type==="group"?T?.groupActions:l(T?.nodeActions,T?.itemActions)),onClick:se=>se.stopPropagation(),children:b??jsxRuntime.jsx(of,{})})}),jsxRuntime.jsx(Vt__namespace.Portal,{children:jsxRuntime.jsx(Vt__namespace.Content,{align:"end",sideOffset:6,className:l(I.slots.menuContent,T?.menuContent),style:I.styles.menuContent,onClick:se=>se.stopPropagation(),children:X.map(se=>{let Y=ye(se,L),ce=(Jn(se.disabled,Y)??false)||(Jn(se.loading,Y)??false),ke=Jn(se.active,Y)??false;return se.render?jsxRuntime.jsx("div",{children:se.render(Y)},se.id):jsxRuntime.jsxs("div",{children:[se.separatorBefore?jsxRuntime.jsx(Vt__namespace.Separator,{className:I.slots.menuSeparator}):null,jsxRuntime.jsxs(Vt__namespace.Item,{title:se.title,disabled:ce,className:l(I.slots.menuItem,Al(I,se.tone),ke&&"bg-accent text-accent-foreground",T?.menuItem),style:I.styles.menuItem,onSelect:()=>{ce||(se.onAction?.(Y),z?.(Y));},children:[se.icon?jsxRuntime.jsx("span",{className:I.slots.menuItemIcon,children:se.icon}):null,jsxRuntime.jsx("span",{className:I.slots.menuItemLabel,children:se.label})]}),se.separatorAfter?jsxRuntime.jsx(Vt__namespace.Separator,{className:I.slots.menuSeparator}):null]},se.id)})})})]})},"renderActions"),oe=r((q,L)=>{q.preventDefault();let X=ie||q.dataTransfer.getData("application/x-data-explorer-node");if(!X||X===L.id||!O){de(void 0),pe(void 0);return}let se=G.get(X),Y=G.get(L.id);if(!se||!Y){de(void 0),pe(void 0);return}let ce=se.parentId===Y.parentId&&se.group?.id===Y.group?.id;if(k==="same-parent"&&!ce){de(void 0),pe(void 0);return}let ke={activeNode:se.node,overNode:Y.node,activeGroup:se.group,overGroup:Y.group,activeParentId:se.parentId,overParentId:Y.parentId,oldIndex:se.index,newIndex:Y.index,sameParent:ce,context:o};O(ke),de(void 0),pe(void 0);},"handleDrop"),le=r((q,L,X)=>{let se=Array.isArray(q.children)?q.children:[],Y=se.length>0,ce=q.collapsible===false||B.has(q.id),ke=n===q.id,we=q.selectable!==false&&!q.disabled,Me=k!=="none"&&!!O&&q.reorderable!==false,Pe=ie===q.id,Ve=W===q.id&&ie!==q.id,Xe=af(q,g);return jsxRuntime.jsxs("div",{"data-data-explorer-entry":"node","data-data-explorer-node-id":q.id,"data-data-explorer-group-id":L?.id,className:l(I.slots.treeNode,T?.node,T?.item,q.className),onDragOver:Oe=>{!ie||!Me||(Oe.preventDefault(),pe(q.id));},onDragLeave:()=>{W===q.id&&pe(void 0);},onDrop:Oe=>oe(Oe,q),children:[jsxRuntime.jsxs("div",{className:l(I.slots.treeNodeButton,ke&&I.slots.treeNodeSelected,q.disabled&&I.slots.treeNodeDisabled,Pe&&I.slots.treeNodeDragging,Ve&&"ring-1 ring-primary/30",ke&&T?.itemSelected,ke&&T?.nodeSelected,q.disabled&&T?.nodeDisabled,Pe&&T?.nodeDragging,T?.nodeButton,T?.itemButton),style:{paddingLeft:`calc(${(q.indentLevel??X)*p+f}px + var(--data-explorer-tree-group-indent, 0px))`},role:"treeitem","aria-selected":ke||void 0,"aria-disabled":q.disabled||void 0,"aria-expanded":Y?ce:void 0,"aria-label":q.ariaLabel,tabIndex:we?0:-1,onClick:()=>{we&&E?.(q,o);},onKeyDown:Oe=>{Oe.target===Oe.currentTarget&&we&&(Oe.key!=="Enter"&&Oe.key!==" "||(Oe.preventDefault(),E?.(q,o)));},children:[Me?jsxRuntime.jsx("span",{draggable:true,className:l(I.slots.treeNodeDragHandle,T?.nodeDragHandle),onClick:Oe=>Oe.stopPropagation(),onDragStart:Oe=>{Oe.stopPropagation(),Oe.dataTransfer.effectAllowed="move",Oe.dataTransfer.setData("application/x-data-explorer-node",q.id),de(q.id);},onDragEnd:()=>{de(void 0),pe(void 0);},children:jsxRuntime.jsx(nf,{})}):null,Y?jsxRuntime.jsx("button",{type:"button",className:l(I.slots.treeNodeToggle,T?.nodeToggle,T?.expander),"aria-label":ce?N:$,onClick:Oe=>{Oe.stopPropagation(),ne(q.id,!ce);},children:jsxRuntime.jsx(Xd,{expanded:ce})}):jsxRuntime.jsx("span",{className:l(I.slots.treeNodeToggle,T?.nodeToggle)}),q.icon?jsxRuntime.jsx("span",{className:l(I.slots.treeNodeIcon,T?.nodeIcon,T?.itemIcon),children:q.icon}):null,jsxRuntime.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[jsxRuntime.jsx("span",{className:l(I.slots.treeNodeLabel,T?.nodeLabel,T?.itemLabel),children:q.label}),q.description?jsxRuntime.jsx("span",{className:l(I.slots.treeNodeDescription,T?.nodeDescription),children:q.description}):null]}),q.meta?jsxRuntime.jsx("span",{className:l(I.slots.treeNodeMeta,T?.nodeMeta),children:q.meta}):null,q.badge?jsxRuntime.jsx("span",{className:l(I.slots.treeNodeBadge,T?.nodeBadge),children:q.badge}):null,xe(Xe,{type:"node",node:q,group:L})]}),Y&&ce?jsxRuntime.jsx("div",{className:l(I.slots.treeNodeChildren,T?.nodeChildren,T?.list),children:se.map(Oe=>le(Oe,L,X+1))}):null]},q.id)},"renderNode"),Re=r((q,L,X)=>q===false?null:jsxRuntime.jsx("div",{className:l(L,X),children:q}),"renderPlaceholder");if(y)return jsxRuntime.jsx("div",{className:l(I.slots.treeRoot,T?.root,S),children:Re(D,I.slots.treeLoading,T?.loading)});if(w)return jsxRuntime.jsx("div",{className:l(I.slots.treeRoot,T?.root,S),children:Re(w??x?.error,I.slots.treeError,T?.error)});let Ie=J.some(q=>(q.nodes??[]).length>0),We=J.some(q=>q.status==="loading"||q.error);return !Ie&&!We&&(!K||J.length===0)?jsxRuntime.jsx("div",{className:l(I.slots.treeRoot,T?.root,S),children:Re(M,I.slots.treeEmpty,T?.empty)}):jsxRuntime.jsx("div",{className:l(I.slots.treeRoot,T?.root,S),role:Ie||J.some(q=>!q.hideHeader)?"tree":void 0,children:J.map(q=>{let L=q.hideHeader||q.collapsible===false||H.has(q.id),X=q.nodes?.length??0,se=sf(q,u),Y=a===q.id,ce=q.collapsible!==false;return jsxRuntime.jsxs("section",{"data-data-explorer-entry":"group","data-data-explorer-group-id":q.id,className:l(I.slots.treeGroup,T?.group,q.className),children:[q.hideHeader?null:jsxRuntime.jsxs("div",{role:"treeitem","aria-label":typeof q.label=="string"?q.label:void 0,"aria-selected":q.selectable?Y:void 0,"aria-expanded":ce?L:void 0,className:l(I.slots.treeGroupHeader,I.slots.treeGroupHeaderButton,Y&&I.slots.treeNodeSelected,T?.groupHeader,T?.groupHeaderButton,Y&&T?.itemSelected),children:[jsxRuntime.jsxs("button",{type:"button",className:l("flex min-w-0 flex-1 items-center gap-2 text-left outline-hidden focus-visible:ring-2 focus-visible:ring-ring",T?.groupLabel),"aria-pressed":q.selectable?Y:void 0,"aria-expanded":!q.selectable&&ce?L:void 0,onClick:()=>{if(q.selectable){R?.(q,o);return}ce&&fe(q.id,!L);},children:[q.icon?jsxRuntime.jsx("span",{className:l(I.slots.treeNodeIcon,T?.nodeIcon,T?.itemIcon),children:q.icon}):null,jsxRuntime.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[q.label?jsxRuntime.jsx("span",{className:l(I.slots.treeNodeLabel,T?.nodeLabel,T?.itemLabel),children:q.label}):null,q.description?jsxRuntime.jsx("span",{className:l(I.slots.treeNodeDescription,T?.nodeDescription),children:q.description}):null]}),q.meta?jsxRuntime.jsx("span",{className:l(I.slots.treeNodeMeta,T?.nodeMeta),children:q.meta}):null,q.badge?jsxRuntime.jsx("span",{className:l(I.slots.treeNodeBadge,T?.nodeBadge),children:q.badge}):null]}),ce?jsxRuntime.jsx("button",{type:"button",className:l(I.slots.treeNodeToggle,T?.expander),"aria-label":L?N:$,"aria-expanded":L,onClick:()=>fe(q.id,!L),children:jsxRuntime.jsx(Xd,{expanded:L})}):jsxRuntime.jsx("span",{className:l(I.slots.treeNodeToggle,T?.expander)}),xe(se,{type:"group",group:q})]}),L?jsxRuntime.jsx("div",{role:"group",className:l(I.slots.treeGroupContent,T?.groupContent,T?.list),children:q.loading||q.status==="loading"?Re(D,I.slots.treeLoading,T?.loading):q.error||q.status==="error"?Re(q.error??x?.error??j.error,I.slots.treeError,T?.error):X>0?q.nodes?.map(ke=>le(ke,q,0)):Re(q.empty??M,I.slots.treeEmpty,T?.empty)}):null]},q.id)})})}r(Cs,"DataExplorerViewTree");var yr="gap-2 rounded-[var(--radius)] border border-transparent text-sm font-medium motion-reduce:transition-none",hr="size-[var(--monkeys-component-navigation-sidebar-icon-size,1.125rem)] shrink-0 text-inherit [&_svg]:size-full",Ss="text-foreground hover:border-transparent hover:bg-[var(--navigation-internal-hover-background)] hover:text-[var(--navigation-internal-hover-foreground)]",Ts="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)]",oc="[--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 nc(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(nc,"unifiedStyle");var lf="[--navigation-internal-selected-background:var(--monkeys-component-navigation-sidebar-row-selected-background,var(--monkeys-component-navigation-sidebar-tree-row-selected-background,var(--navigation-internal-default-selected-background)))] [--navigation-internal-selected-foreground:var(--monkeys-component-navigation-sidebar-row-selected-foreground,var(--monkeys-component-navigation-sidebar-tree-row-selected-foreground,var(--navigation-internal-default-selected-foreground)))] [--navigation-internal-hover-background:var(--monkeys-component-navigation-sidebar-row-hover-background,var(--monkeys-component-navigation-sidebar-tree-row-hover-background,color-mix(in_srgb,hsl(var(--monkeys-color-accent,var(--accent)))_65%,transparent)))] [--navigation-internal-hover-foreground:var(--monkeys-component-navigation-sidebar-row-hover-foreground,var(--monkeys-component-navigation-sidebar-tree-row-hover-foreground,hsl(var(--monkeys-color-foreground,var(--foreground)))))]",df="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)]",fr="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 rc(e,t,o={}){let n=l(yr,e,t,Ss);return {...o,root:l(lf,"space-y-0.5",o.root),group:l("space-y-0.5","[&>[role=treeitem]+[role=group]]:[--data-explorer-tree-group-indent:var(--monkeys-component-navigation-sidebar-tree-group-indent,1rem)]",o.group),groupHeaderButton:l("h-auto",n,o.groupHeaderButton),nodeButton:l(n,df,o.nodeButton),itemSelected:l(Ts,o.itemSelected),nodeIcon:l(hr,"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(fr,"order-2 size-5 p-0 group-focus-within/tree-group:opacity-100",o.groupActions),nodeActions:l(fr,"order-2 size-5 p-0 group-focus-within/tree-node:opacity-100",o.nodeActions),nodeToggle:l(fr,"order-1 empty:hidden",o.nodeToggle),expander:l(fr,"order-1 empty:hidden",o.expander),nodeDragHandle:l(fr,o.nodeDragHandle)}}r(rc,"unifiedTreeClassNames");function mf({collapsed:e}){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-4 w-4",fill:"none",children:jsxRuntime.jsx("path",{d:e?"M4 4.5h12M4 15.5h12M5 7.5 7.5 10 5 12.5M15 7.5 12.5 10l2.5 2.5":"M4 4.5h12M4 15.5h12M7.5 7.5 5 10l2.5 2.5M12.5 7.5 15 10l-2.5 2.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}r(mf,"CollapseIcon");function pf(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-4 w-4",fill:"none",children:[jsxRuntime.jsx("circle",{cx:"8.5",cy:"8.5",r:"5",stroke:"currentColor",strokeWidth:"1.6"}),jsxRuntime.jsx("path",{d:"m12.2 12.2 3.3 3.3",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})}r(pf,"SearchIcon");function gf(){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-3.5 w-3.5",fill:"none",children:jsxRuntime.jsx("path",{d:"m6 6 8 8m0-8-8 8",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})})}r(gf,"ClearIcon");function bf(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:"h-4 w-4",fill:"currentColor",children:[jsxRuntime.jsx("circle",{cx:"5",cy:"10",r:"1.2"}),jsxRuntime.jsx("circle",{cx:"10",cy:"10",r:"1.2"}),jsxRuntime.jsx("circle",{cx:"15",cy:"10",r:"1.2"})]})}r(bf,"MoreIcon");function La({expanded:e}){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",className:l("h-4 w-4 transition-transform motion-reduce:transition-none",e&&"rotate-180"),fill:"none",children:jsxRuntime.jsx("path",{d:"m6 8 4 4 4-4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}r(La,"DisclosureIcon");function ff(e,t){typeof e=="function"?e(t):e&&(e.current=t);}r(ff,"assignRef");function Bn(e,t){if(!Number.isFinite(t))throw new RangeError(`NavigationSidebar ${e} must be a finite number.`)}r(Bn,"requireFiniteNumber");function yf(e){let t=e.minWidth??180,o=e.maxWidth??420,n=e.defaultWidth??256,a=e.collapsedWidth??60,s=e.collapseThreshold??140;if(Bn("minWidth",t),Bn("maxWidth",o),Bn("defaultWidth",n),Bn("collapsedWidth",a),Bn("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(yf,"resolveLayoutBounds");function Aa(e,t){return Math.min(Math.max(e,t.minWidth),t.maxWidth)}r(Aa,"clampWidth");function dc(e,t){if(t){t(e);return}typeof console<"u"&&console.warn("NavigationSidebar could not persist layout state.",e);}r(dc,"reportStorageError");function cc(e){if(e)return e;if(!(typeof window>"u"))return window.localStorage}r(cc,"resolveStorage");function hf(e,t){let o={collapsed:e.defaultCollapsed??false,width:Aa(t.defaultWidth,t)};if(!e.storageKey)return o;let n=cc(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)?Aa(s.width,t):o.width}}catch(a){return dc(a,e.onStorageError),o}}r(hf,"readStoredLayout");function Ns(e,t){return t||(typeof e=="string"?e:void 0)}r(Ns,"getNodeTitle");function xf(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(xf,"activeVariantClassName");function vf(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?Ts:xf(a),inactive:t?Ss:"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&&oc,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(vf,"resolveAppearance");var lc="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)))]",kf="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)))]",xr="hover:!bg-transparent hover:!text-inherit focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring";function wf(e){return {...e,groupHeader:l(lc,e?.groupHeader),itemSelected:l(kf,e?.itemSelected),nodeButton:l(lc,"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(xr,e?.expander),nodeToggle:l(xr,e?.nodeToggle),groupActions:l(xr,e?.groupActions),nodeActions:l(xr,e?.nodeActions),nodeDragHandle:l(xr,e?.nodeDragHandle)}}r(wf,"resolveNavigationTreeClassNames");function Is({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&&yr,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(Is,"entryClassName");function Ms({item:e,collapsed:t,mobile:o,classNames:n,endIndicator:a,appearance:s}){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[A(e.icon)?jsxRuntime.jsx("span",{className:l("flex size-5 shrink-0 items-center justify-center [&_svg]:size-full",s.unified&&hr,n?.itemIcon),"aria-hidden":"true",children:e.icon}):null,o||!t?jsxRuntime.jsxs("span",{className:l("flex min-w-0 flex-1 flex-col",n?.itemContent),children:[jsxRuntime.jsx("span",{className:l("min-w-0 truncate font-semibold",s.unified&&"font-medium",n?.itemLabel),children:e.label}),A(e.description)?jsxRuntime.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)&&A(e.meta)?jsxRuntime.jsx("span",{className:l("shrink-0 text-xs text-muted-foreground",n?.itemMeta),children:e.meta}):null,(o||!t)&&A(e.endContent)?jsxRuntime.jsx("span",{className:l("shrink-0",n?.itemEndContent),children:e.endContent}):null,(o||!t)&&A(a)?jsxRuntime.jsx("span",{className:"flex shrink-0 items-center justify-center",children:a}):null]})}r(Ms,"EntryContent");function za({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=Ns(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 jsxRuntime.jsx(p,{...y,"data-navigation-sidebar-item-id":e.id,"data-active":t?"true":"false","data-expanded":g===void 0?void 0:String(g),className:Is({item:e,active:t,collapsed:o,mobile:i,embedded:m,appearance:a,classNames:s,domClassName:b.className}),children:jsxRuntime.jsx(Ms,{appearance:a,item:e,collapsed:o,mobile:i,classNames:s,endIndicator:u})})}r(za,"EntryButton");function Cf({item:e,appearance:t,classNames:o}){let n=e.domProps??{};return jsxRuntime.jsx("div",{...n,"data-navigation-sidebar-item-id":e.id,"aria-disabled":e.disabled||void 0,title:Ns(e.label,e.title),className:Is({item:e,active:false,collapsed:false,mobile:true,embedded:true,appearance:t,classNames:o,domClassName:n.className}),children:jsxRuntime.jsx(Ms,{appearance:t,item:e,collapsed:false,mobile:true,classNames:o})})}r(Cf,"EntryPresentation");function Oa({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&&yr,e?t.selected:t.inactive)}r(Oa,"routeRowClassName");function Fa(e,t){return t?e.filter(o=>!o.filterIds?.length||o.filterIds.includes(t)):e}r(Fa,"filterCatalogItems");function Sf({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=Fa(n,i),h=a.map(x=>({...x,items:Fa(x.items,i)})).filter(x=>x.items.length>0),y=b.length>0||h.length>0,v=s.length>0&&!t?jsxRuntime.jsx("div",{role:"group",className:l(g==="split"?"flex min-w-32 flex-col gap-1 border-r border-border/60 pr-2":"flex flex-wrap gap-1",f?.filterList),"aria-label":p?`${p} filters`:void 0,children:s.map(x=>{let k=x.id===i;return jsxRuntime.jsxs("button",{type:"button",title:x.title??(typeof x.label=="string"?x.label:void 0),"aria-pressed":k,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",k&&"bg-muted text-foreground",f?.filterItem,k&&f?.filterItemActive),onClick:()=>c?.(x),children:[A(x.icon)?jsxRuntime.jsx("span",{"aria-hidden":"true",children:x.icon}):null,jsxRuntime.jsx("span",{className:"truncate",children:x.label})]},x.id)})}):null,w=y?jsxRuntime.jsxs("div",{className:l("min-w-0 flex-1",f?.list),children:[b.length>0?jsxRuntime.jsx("ul",{className:"grid list-none gap-1 p-0",children:b.map(x=>jsxRuntime.jsx("li",{children:jsxRuntime.jsx(za,{item:x,active:x.active??x.id===m,collapsed:t,itemAs:d,appearance:o,classNames:f})},x.id))}):null,h.map(x=>jsxRuntime.jsxs("section",{className:l("mt-3 first:mt-0",f?.section,x.className),children:[!t&&A(x.label)?jsxRuntime.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,jsxRuntime.jsx("ul",{className:"grid list-none gap-1 p-0",children:x.items.map(k=>jsxRuntime.jsx("li",{children:jsxRuntime.jsx(za,{item:k,active:k.active??k.id===m,collapsed:t,itemAs:d,appearance:o,classNames:f})},k.id))})]},x.id))]}):jsxRuntime.jsx("div",{className:"px-3 py-8 text-center text-sm text-muted-foreground",children:u});return jsxRuntime.jsxs("nav",{"aria-label":p,className:l(g==="split"&&!t&&"flex min-w-0 gap-2"),children:[v,w]})}r(Sf,"CatalogContent");function Tf({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 jsxRuntime.jsxs(c,{...d,...n?{type:"button"}:{},"data-navigation-sidebar-child-id":e.id,"aria-current":n&&o?"page":void 0,"aria-disabled":e.disabled||void 0,title:Ns(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&&yr,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:[A(e.icon)?jsxRuntime.jsx("span",{className:l("flex size-5 shrink-0 items-center justify-center [&_svg]:size-full",s.unified&&hr),"aria-hidden":"true",children:e.icon}):null,jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:e.label})]})}r(Tf,"ChildEntry");function Ha({itemId:e,actions:t,kind:o,className:n,mobile:a=false}){return A(t)?jsxRuntime.jsx("div",{"data-navigation-sidebar-item-actions":o==="item"?e:void 0,"data-navigation-sidebar-child-actions":o==="child"?e:void 0,"data-navigation-sidebar-actions-mobile":a?"true":void 0,className:l("ml-auto flex shrink-0 items-center gap-1 [&>button]:border-0 [&>button]:bg-transparent [&>button]:shadow-none [&>button:hover]:bg-muted",n),children:t}):null}r(Ha,"RouteActions");function Bs(e){return e.interaction==="disclosure"}r(Bs,"isDisclosureRouteItem");function Rf(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),Bs(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(Rf,"validateRouteItems");function Nf({item:e,expanded:t,controls:o,label:n,onToggle:a,classNames:s}){let i=typeof e.label=="string"?e.label:e.id;return jsxRuntime.jsx("button",{type:"button",disabled:e.disabled,"aria-expanded":t,"aria-controls":o,"aria-label":`${n}: ${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:jsxRuntime.jsx(La,{expanded:t})})}r(Nf,"RouteChildrenToggle");function Va({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 jsxRuntime.jsxs(Vt__namespace.Root,{children:[jsxRuntime.jsx(Vt__namespace.Trigger,{asChild:true,children:i==="item"&&s?jsxRuntime.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:Is({item:e,active:false,collapsed:!m,mobile:m,appearance:s,classNames:a,domClassName:u.className}),children:jsxRuntime.jsx(Ms,{appearance:s,item:e,collapsed:!m,mobile:m,classNames:a,endIndicator:m?jsxRuntime.jsx(La,{expanded:false}):void 0})}):jsxRuntime.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"?jsxRuntime.jsx(La,{expanded:false}):jsxRuntime.jsx(bf,{})})}),jsxRuntime.jsx(Vt__namespace.Portal,{children:jsxRuntime.jsx(Vt__namespace.Content,{side:"right",align:"start",sideOffset:8,className:l("z-50 min-w-40 rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md outline-hidden",a?.childMenuContent),children:e.children?.map(p=>jsxRuntime.jsxs(Vt__namespace.Item,{disabled:p.disabled,"data-navigation-sidebar-child-id":p.id,"data-active":p.id===t?"true":"false",className:l("flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",p.id===t&&"bg-accent text-accent-foreground"),onSelect:()=>n?.(p,e),children:[A(p.icon)?jsxRuntime.jsx("span",{"aria-hidden":"true",children:p.icon}):null,jsxRuntime.jsx("span",{className:"truncate",children:p.label})]},p.id))})})]})}r(Va,"CollapsedChildMenu");function If({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=st.useId(),v=st.useMemo(()=>Rf(n),[n]),[w,x]=st.useState(()=>m),k=i!==void 0,C=i??w,S=st.useMemo(()=>C.filter(R=>v.has(R)),[v,C]),T=st.useMemo(()=>new Set(S),[S]),E=st.useCallback(R=>{if(R.disabled||!v.has(R.id))return;let F=T.has(R.id)?S.filter(_=>_!==R.id):[...S,R.id];k||x(F),u?.(F);},[v,T,k,S,u]);return jsxRuntime.jsx("nav",{"aria-label":b,children:jsxRuntime.jsx("ul",{className:l("grid list-none gap-2 p-0",o.unified&&"gap-0.5",h?.list),children:n.map((R,F)=>{let _=Bs(R),z=!_&&R.id===a,O=!!R.children?.length,j=v.has(R.id),I=!j||T.has(R.id),V=!t&&A(R.actions),$=t&&O&&!!g||!t&&j&&!_||V,N=`${y}-route-children-${F}`;return jsxRuntime.jsxs("li",{className:"grid min-w-0 gap-1",children:[t&&_?jsxRuntime.jsx(Va,{item:R,activeChildId:s,label:p,onChildSelect:g,classNames:h,appearance:o,triggerVariant:"item"}):jsxRuntime.jsxs("div",{"data-navigation-sidebar-item-row":$?R.id:void 0,"data-active":$?String(z):void 0,className:$?Oa({active:z,appearance:o}):void 0,children:[jsxRuntime.jsx(za,{item:R,active:z,collapsed:t,embedded:$,itemAs:_?"button":c,appearance:o,classNames:h,onSelect:_?()=>E(R):d?()=>d(R):void 0,ariaControls:!t&&j&&_?N:void 0,ariaExpanded:!t&&j&&_?I:void 0,endIndicator:!t&&_&&!V?jsxRuntime.jsx(La,{expanded:I}):void 0}),V?jsxRuntime.jsx(Ha,{itemId:R.id,actions:R.actions,kind:"item",className:h?.itemActions}):null,t&&g?jsxRuntime.jsx(Va,{item:R,activeChildId:s,label:p,onChildSelect:g,classNames:h}):null,!t&&j&&(!_||V)?jsxRuntime.jsx(Nf,{item:R,expanded:I,controls:N,label:f,onToggle:()=>E(R),classNames:h}):null]}),!t&&O?jsxRuntime.jsx("ul",{id:N,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:R.children?.map(D=>{let M=A(D.actions),K=D.id===s,J=jsxRuntime.jsx(Tf,{child:D,parent:R,active:K,interactive:!!g,onSelect:g,appearance:o,classNames:h,embedded:M});return jsxRuntime.jsx("li",{children:M?jsxRuntime.jsxs("div",{"data-navigation-sidebar-child-row":D.id,"data-active":String(K),className:Oa({active:K,appearance:o}),children:[J,jsxRuntime.jsx(Ha,{itemId:D.id,actions:D.actions,kind:"child",className:h?.childActions})]}):J},D.id)})}):null]},R.id)})})})}r(If,"RouteContent");function Mf(e,t,o){return [...Fa(e,o),...t.flatMap(n=>Fa(n.items,o))]}r(Mf,"flattenCatalogItems");function Bf({props:e,appearance:t}){if(!e.mobile||e.mobile.mode!=="horizontal")return null;let o=e.classNames,n=e.kind==="catalog"?Mf(e.items??[],e.sections??[],e.activeFilterId):e.routeItems;return jsxRuntime.jsx("nav",{"aria-label":e.ariaLabel,className:l("flex gap-2 overflow-x-auto pb-1",o?.mobileNav,e.mobile.className),children:n.map(a=>{let s={...o,mobileItem:l(o?.mobileItem,e.mobile?.itemClassName)},i=e.kind==="route"?a:void 0,m=i!==void 0&&A(i.actions);if(e.kind==="route"&&Bs(a))return m?jsxRuntime.jsxs("div",{"data-navigation-sidebar-item-row":a.id,"data-active":"false",className:l(Oa({active:false,appearance:t}),"shrink-0"),children:[jsxRuntime.jsx(Cf,{item:a,appearance:t,classNames:s}),jsxRuntime.jsx(Ha,{itemId:a.id,actions:a.actions,kind:"item",className:o?.itemActions,mobile:true}),jsxRuntime.jsx(Va,{item:a,activeChildId:e.activeChildId,label:e.collapsedChildMenuLabel??"Open submenu",onChildSelect:e.onChildSelect,classNames:s,appearance:t,triggerVariant:"disclosure",mobile:true})]},a.id):jsxRuntime.jsx(st.Fragment,{children:jsxRuntime.jsx(Va,{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=jsxRuntime.jsx(za,{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?jsxRuntime.jsxs("div",{"data-navigation-sidebar-item-row":a.id,"data-active":String(c),className:l(Oa({active:c,appearance:t}),"shrink-0"),children:[d,jsxRuntime.jsx(Ha,{itemId:i.id,actions:i.actions,kind:"item",className:o?.itemActions,mobile:true})]},a.id):jsxRuntime.jsx(st.Fragment,{children:d},a.id)})})}r(Bf,"MobileNavigation");function Pf(e,t){let o=yf(e);e.width!==void 0&&Bn("width",e.width);let n=st.useRef(null);n.current||(n.current=hf(e,o));let a=st.useRef(null),[s,i]=st.useState(n.current.collapsed),[m,c]=st.useState(n.current.width),[d,g]=st.useState(e.search?.defaultValue??""),[u,p]=st.useState(false),f=e.collapsed??s,b=Aa(e.width??m,o),h=e.search?.value??d,y=e.collapsed!==void 0,v=e.width!==void 0,w=st.useMemo(()=>vf(e.appearance),[e.appearance]),x=e.collapsible??true,k=e.resizable??true,C=x?e.collapsePlacement??"header":"none",S=e.collapseLabel??"Collapse sidebar",T=e.expandLabel??"Expand sidebar",E=e.resizeLabel??"Resize sidebar",R=!f||o.collapsedWidth>0,F=r($=>{a.current=$,ff(t,$);},"setSidebarRef"),_=st.useCallback($=>{!x&&$||(y||i($),e.onCollapsedChange?.($));},[x,y,e.onCollapsedChange]),z=st.useCallback($=>{let N=Aa($,o);v||c(N),e.onWidthChange?.(N);},[o.maxWidth,o.minWidth,v,e.onWidthChange]);st.useEffect(()=>{if(!e.storageKey)return;let $=cc(e.storage);if($)try{$.setItem(e.storageKey,JSON.stringify({collapsed:f,width:b}));}catch(N){dc(N,e.onStorageError);}},[e.onStorageError,e.storage,e.storageKey,f,b]),st.useEffect(()=>{if(!u)return;let $=document.body.style.cursor,N=document.body.style.userSelect,D=r(K=>{let J=a.current;if(!J)return;let G=K.clientX-J.getBoundingClientRect().left;if(x&&G<o.collapseThreshold){_(true);return}_(false),z(G);},"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=$,document.body.style.userSelect=N;}},[o.collapseThreshold,x,u,_,z]);let O=r($=>{if(!($.key!=="ArrowLeft"&&$.key!=="ArrowRight")){if($.preventDefault(),$.key==="ArrowLeft"){let N=b-24;x&&N<o.collapseThreshold?_(true):z(N);return}f&&_(false),z(Math.max(b+24,o.minWidth));}},"handleResizeKeyDown"),j=r($=>jsxRuntime.jsx("button",{type:"button",className:l("inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-md text-muted-foreground outline-hidden transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",e.classNames?.collapseButton,$),"aria-label":f?T:S,title:f?T:S,"aria-expanded":!f,onClick:()=>_(!f),children:jsxRuntime.jsx(mf,{collapsed:f})}),"collapseButton"),I=A(e.title)||A(e.headerLeading)||A(e.headerActions)||C==="header",V=r(()=>{if(e.kind==="catalog")return jsxRuntime.jsx(Sf,{props:e,collapsed:f,appearance:w});if(e.kind==="route")return jsxRuntime.jsx(If,{props:e,collapsed:f,appearance:w});let $=e.tree;return jsxRuntime.jsx(Cs,{...$,classNames:w.unified?rc(w.itemHeight,w.itemPadding,$.classNames):wf($.classNames)})},"renderContent");return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("aside",{...e.rootDomProps,ref:F,"aria-label":e.ariaLabel,"data-monkeys-component":e.dataComponent??"navigation-sidebar","data-navigation-sidebar-kind":e.kind,"data-navigation-sidebar-preset":e.appearance?.preset,"data-collapsed":f?"true":"false",className:l("relative flex h-full min-h-0 shrink-0 flex-col overflow-visible rounded-[calc(var(--radius)+0.25rem)] border transition-[width,opacity] duration-300 motion-reduce:transition-none",w.root,e.desktopClassName,e.classNames?.root,e.rootDomProps?.className,e.className),style:{...w.unified?nc(e.appearance?.activeVariant):{},...e.style,width:e.widthMode==="fill"?void 0:f?o.collapsedWidth:b,transition:u?"none":e.style?.transition},children:[k?jsxRuntime.jsx("button",{type:"button",role:"separator","aria-orientation":"vertical","aria-valuemin":o.minWidth,"aria-valuemax":o.maxWidth,"aria-valuenow":b,"aria-label":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:$=>{$.preventDefault(),p(true);},onKeyDown:O,children:jsxRuntime.jsx("span",{className:"pointer-events-none absolute bottom-3 right-1/2 top-3 w-px translate-x-1/2 rounded-full bg-border opacity-0 transition-opacity group-hover/resize:opacity-100 group-focus-visible/resize:opacity-100"})}):null,C==="edge"?j("absolute -right-3 top-1/2 z-50 -translate-y-1/2 border border-border bg-background shadow-sm"):null,R?jsxRuntime.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-col overflow-hidden",children:[I?jsxRuntime.jsxs("div",{className:l("flex min-h-12 min-w-0 items-center gap-2 border-b border-border/60 px-3",w.unified&&"min-h-14 border-border px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))]",f&&"justify-center px-1",e.classNames?.header),children:[A(e.headerLeading)?jsxRuntime.jsx("span",{className:l("flex shrink-0 items-center justify-center",e.classNames?.headerLeading),children:e.headerLeading}):null,!f&&A(e.title)?jsxRuntime.jsx("div",{className:l("min-w-0 flex-1 truncate text-sm font-semibold",e.classNames?.title),children:e.title}):null,!f&&A(e.headerActions)?jsxRuntime.jsx("div",{className:l("flex shrink-0 items-center gap-1",e.classNames?.headerActions),children:e.headerActions}):null,C==="header"?j():null]}):null,!f&&e.search?jsxRuntime.jsx("div",{className:l("px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))] pb-2 pt-3",w.unified&&"pb-1",e.classNames?.search),children:jsxRuntime.jsxs("div",{className:l("flex items-center gap-2 rounded-md border border-input bg-[var(--monkeys-component-navigation-sidebar-search-background,hsl(var(--monkeys-color-control-surface)))] px-3 text-muted-foreground ring-offset-control-surface focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",w.searchHeight,w.unified&&"rounded-[var(--radius)] border-border bg-[var(--monkeys-component-navigation-sidebar-search-background,transparent)] px-2"),children:[jsxRuntime.jsx("span",{className:l("flex shrink-0",w.unified&&hr,e.classNames?.searchIcon),"aria-hidden":"true",children:e.search.icon??jsxRuntime.jsx(pf,{})}),jsxRuntime.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:$=>{let N=$.currentTarget.value;e.search?.value===void 0&&g(N),e.search?.onValueChange?.(N);}}),h&&e.search.clearLabel?jsxRuntime.jsx("button",{type:"button",className:l("inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",e.classNames?.searchClear),"aria-label":e.search.clearLabel,title:e.search.clearLabel,onClick:()=>{e.search?.value===void 0&&g(""),e.search?.onValueChange?.("");},children:jsxRuntime.jsx(gf,{})}):null]})}):null,jsxRuntime.jsx("div",{className:l("min-h-0 flex-1 overflow-y-auto px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))] py-3",w.unified&&e.search&&"pt-1",f&&"px-1.5",e.classNames?.content),children:V()}),A(e.footer)||C==="footer"?jsxRuntime.jsxs("div",{className:l("flex shrink-0 items-center gap-2 border-t border-border/70 p-3",w.unified&&"border-border",f&&"justify-center px-1",e.classNames?.footer),children:[!f&&A(e.footer)?jsxRuntime.jsx("div",{className:"min-w-0 flex-1",children:e.footer}):null,C==="footer"?j():null]}):null]}):null]}),e.kind!=="tree"?jsxRuntime.jsx(Bf,{props:e,appearance:w}):null]})}r(Pf,"NavigationSidebarInner");var kr=st.forwardRef(Pf);var Df=st.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:w=true,collapsible:x=true,collapseLabel:k="Collapse sidebar",expandLabel:C="Expand sidebar",resizeLabel:S="Resize sidebar",desktopClassName:T="hidden md:flex",mobileClassName:E="flex md:hidden",className:R,classNames:F,style:_,...z},O){let{level:j,variables:I}=aa(),V=r($=>({...$,icon:$.icon??($.iconName?jsxRuntime.jsx(Mn,{icon:{kind:"lucide",name:$.iconName},alt:"",className:"h-4 w-4 rounded-none bg-transparent"}):void 0),endContent:$.endContent??($.count!==void 0?jsxRuntime.jsx(un,{children:$.count}):void 0),onClick:r(N=>{$.disabled||($.onClick?.(N),N.defaultPrevented||s?.({itemId:$.id}));},"onClick")}),"project");return jsxRuntime.jsx(er,{depth:j,children:jsxRuntime.jsx(kr,{ref:O,kind:"catalog",title:t,items:o.map(V),sections:n.map($=>({...$,items:$.items.map(V)})),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:w,collapsible:x,collapsePlacement:"header",collapseLabel:k,expandLabel:C,resizeLabel:S,desktopClassName:T,dataComponent:"workbench-resizable-sidebar",rootDomProps:{...z,"data-workbench-resizable-sidebar":"","data-monkeys-bento-level":j},appearance:{density:"compact",surface:"panel",activeVariant:"soft"},mobile:{mode:"horizontal",className:E},className:l(Xl,"[&>div]:gap-[var(--monkeys-bento-gap)] [--monkeys-sidebar-item-padding:var(--monkeys-bento-gap)] data-[collapsed=true]:[--monkeys-sidebar-item-padding:0px]",F?.root,R),classNames:{root:F?.root,header:l("min-h-0 gap-[var(--monkeys-bento-gap)] border-0 p-0",F?.header),title:l("text-xs font-medium uppercase text-muted-foreground",F?.title),collapseButton:l("h-8 w-8",F?.collapseButton),content:l("space-y-[var(--monkeys-bento-gap)] p-0",F?.list),list:"[&_ul]:gap-[var(--monkeys-bento-gap)]",section:l("mt-[var(--monkeys-bento-gap)]",F?.section),sectionLabel:l("mb-[var(--monkeys-bento-gap)] px-[var(--monkeys-bento-gap)]",F?.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",F?.item),itemIcon:l("[&_svg]:h-3.5 [&_svg]:w-3.5",F?.itemIcon),itemLabel:F?.itemLabel,resizeHandle:F?.resizeHandle,mobileNav:l("gap-[var(--monkeys-bento-gap,var(--global-spacing,0.75rem))] pb-0",F?.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",F?.mobileItem)},style:{...I,..._}})})},"WorkbenchResizableSidebar"));function Lf(e){return !!(e.header||e.footer||e.bodyAs||e.bodyClassName||e.bodyProps||e.classNames?.body)}r(Lf,"shouldRenderBodyWrapper");var Af=st.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=Lf({header:n,footer:a,bodyAs:o==="div"?void 0:o,bodyClassName:c,bodyProps:g,classNames:u}),{className:y,...v}=g??{};return jsxRuntime.jsxs(t,{ref:b,"data-workbench-content-pane":true,className:l("workbench-surface-subtle flex h-full min-w-0 flex-1 flex-col overflow-hidden rounded-lg border border-border/50 transition-all duration-300 dark:border-border/40",u?.root,i),style:p,...f,children:[n?jsxRuntime.jsx("div",{className:l("shrink-0 border-b border-border/40 px-4 py-3 dark:border-border/30",u?.header,m),children:n}):null,h?jsxRuntime.jsx(o,{className:l("min-h-0 flex-1 overflow-hidden",u?.body,c,y),...v,children:s}):s,a?jsxRuntime.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 gc={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 Hf(e){return e.label??e.key}r(Hf,"getDefaultColumnLabel");function Vf(e){return e.filter(t=>qo(t)&&t.hidden!==true).map(t=>qo(t))}r(Vf,"getDefaultVisibleColumnKeys");function Gf({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:Vf(e)}r(Gf,"getResolvedVisibleColumnKeys");function _f(e){return [{value:"compact",label:e.compact},{value:"comfortable",label:e.comfortable},{value:"detailed",label:e.detailed}]}r(_f,"getDefaultDensityOptions");function jf(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(jf,"getDefaultGridColumnOptions");function $f(e){return [{value:1,label:e.bentoColumns(1)},{value:2,label:e.bentoColumns(2)},{value:3,label:e.bentoColumns(3)}]}r($f,"getDefaultBentoColumnOptions");function Kf(e){return [{value:"limit",label:e.topLimit},{value:"all",label:e.allFields}]}r(Kf,"getDefaultDetailVisibilityOptions");function Uf(e){return [{value:"fixed",label:e.adaptiveGrid},{value:"masonry",label:e.masonry}]}r(Uf,"getDefaultLayoutOptions");function wr(e){return String(e)}r(wr,"normalizeOptionValue");function Cr(e,t,o){let n=String(t??o);return e.some(a=>String(a.value)===n)?n:String(o)}r(Cr,"getOptionValue");function pc(e){let t=Number.parseInt(e,10);return Number.isFinite(t)?t:1}r(pc,"parseNumberOption");var Sr={root:"flex w-full flex-wrap",item:"min-w-[58px] flex-1 px-2 text-[11px]",label:"text-[11px]"};function bc({columns:e=[],galleryFieldOptions:t,value:o,onValueChange:n,labels:a,densityOptions:s,gridColumnOptions:i,bentoColumnOptions:m,detailVisibilityOptions:c,layoutOptions:d,getColumnLabel:g=Hf,getColumnDescription:u,showColumnVisibility:p=true,showGalleryControls:f=true,showLayoutControl:b=true,showGridColumns:h=true,showDetailColumns:y=true,allowEmptyVisibleColumns:v=false,className:w,classNames:x}){let k={...gc,...a},C=o||{},S=e.filter(M=>qo(M)),T=Gf({columns:S,visibleColumnKeys:C.visibleColumnKeys,allowEmptyVisibleColumns:v}),E=new Set(T),R=(t||S).filter(M=>qo(M)),F=s||_f(k),_=i||jf(k),z=m||$f(k),O=c||Kf(k),j=d||Uf(k),I=typeof n=="function",V=r(M=>{n?.({...C,...M},M);},"updateValue"),$=r(M=>{if(!I)return;let K=new Set(T);K.has(M)?K.delete(M):K.add(M);let J=S.map(qo).filter(G=>K.has(G));!J.length&&!v&&(J=[M]),V({visibleColumnKeys:J});},"toggleColumn"),N=p&&S.length>0,D=f;return jsxRuntime.jsxs("div",{className:l("space-y-3 text-foreground",x?.root,w),children:[N?jsxRuntime.jsxs("section",{className:l("space-y-2",x?.section),children:[jsxRuntime.jsx("div",{className:l("text-[10px] font-medium uppercase tracking-wide text-muted-foreground",x?.sectionHeader),children:k.visibleColumns}),jsxRuntime.jsx("div",{className:l("max-h-[220px] space-y-1 overflow-y-auto pr-1",x?.columnList),children:S.map(M=>{let K=qo(M);return jsxRuntime.jsx(dn,{checked:E.has(K),disabled:!I,label:g(M),description:u?.(M),onChange:()=>$(K),className:l("flex w-full rounded-lg px-2 py-1.5 hover:bg-muted/50",x?.columnItem)},`workbench-gallery-column-${K}`)})})]}):null,D?jsxRuntime.jsxs("section",{className:l("space-y-3 border-t border-border/60 pt-3",x?.section),children:[jsxRuntime.jsx(No,{label:k.coverField,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(uo,{value:String(C.galleryFieldKey||"auto"),options:[{value:"auto",label:k.autoDetect},...R.map(M=>({value:qo(M),label:g(M)}))],disabled:!I,onChange:M=>V({galleryFieldKey:M.currentTarget.value||"auto"}),className:x?.control})}),jsxRuntime.jsx(No,{label:k.cardDensity,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(pn,{value:Cr(F,C.galleryDensity,"comfortable"),options:F.map(M=>({value:wr(M.value),label:M.label,disabled:M.disabled})),onValueChange:M=>V({galleryDensity:M}),className:l("w-full",x?.control),classNames:Sr})}),h?jsxRuntime.jsx(No,{label:k.cardColumns,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(pn,{value:Cr(_,C.galleryGridColumns,"auto"),options:_.map(M=>({value:wr(M.value),label:M.label,disabled:M.disabled})),onValueChange:M=>V({galleryGridColumns:M==="auto"?"auto":pc(M)}),className:l("w-full",x?.control),classNames:Sr})}):null,y?jsxRuntime.jsx(No,{label:k.detailColumns,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(pn,{value:Cr(z,C.galleryBentoColumns,2),options:z.map(M=>({value:wr(M.value),label:M.label,disabled:M.disabled})),onValueChange:M=>V({galleryBentoColumns:pc(M)}),className:l("w-full",x?.control),classNames:Sr})}):null,jsxRuntime.jsx(No,{label:k.fieldVisibility,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(pn,{value:Cr(O,C.galleryDetailVisibility,"limit"),options:O.map(M=>({value:wr(M.value),label:M.label,disabled:M.disabled})),onValueChange:M=>V({galleryDetailVisibility:M}),className:l("w-full",x?.control),classNames:Sr})}),C.galleryDetailVisibility!=="all"?jsxRuntime.jsx(No,{label:k.fieldLimit,description:k.fieldLimitHint,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground",description:"text-[10px]"},children:jsxRuntime.jsx(Qt,{type:"number",min:1,step:1,value:String(C.galleryDetailLimit||4),disabled:!I,onChange:M=>V({galleryDetailLimit:M.currentTarget.value}),className:x?.control})}):null,b?jsxRuntime.jsx(No,{label:k.layout,classNames:{label:"text-[10px] uppercase tracking-wide text-muted-foreground"},children:jsxRuntime.jsx(pn,{value:Cr(j,C.galleryLayout,"fixed"),options:j.map(M=>({value:wr(M.value),label:M.label,disabled:M.disabled})),onValueChange:M=>V({galleryLayout:M}),className:l("w-full",x?.control),classNames:Sr})}):null]}):null]})}r(bc,"WorkbenchGallerySettingsPanel");function _a({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,...w}){let x={...gc,...h},k=st.useRef(null),[C,S]=st.useState(t),[T,E]=st.useState({}),R=e!==void 0,F=R?!!e:C,_=r(j=>{R||S(j),o?.(j);},"setOpen");st.useLayoutEffect(()=>{if(!F)return;let j=r(()=>{let $=k.current?.getBoundingClientRect();if(!$||typeof window>"u")return;let N=12,D=Math.max(window.innerWidth-N*2,0),M=Math.min(m,D||m),K=i==="start"?$.left:$.right-M,J=Math.min(Math.max(K,N),Math.max(window.innerWidth-M-N,N)),G=Math.min($.bottom+8,Math.max(window.innerHeight-80,N));E({left:J,top:G,width:M,maxHeight:`calc(100vh - ${Math.round(G+N)}px)`});},"updatePopoverPosition"),I=r($=>{k.current?.contains($.target)||_(false);},"handlePointerDown"),V=r($=>{$.key==="Escape"&&_(false);},"handleKeyDown");return j(),window.addEventListener("resize",j),window.addEventListener("scroll",j,true),window.addEventListener("pointerdown",I),window.addEventListener("keydown",V),()=>{window.removeEventListener("resize",j),window.removeEventListener("scroll",j,true),window.removeEventListener("pointerdown",I),window.removeEventListener("keydown",V);}},[i,F,m]);let z=a??x.settingsButton,O=c??x.title;return jsxRuntime.jsxs("div",{ref:k,className:l("relative inline-flex",b?.root,y),children:[jsxRuntime.jsx(ve,{icon:n,label:z,title:s||(typeof z=="string"?z:void 0),iconOnly:!!n,active:F,tone:"muted","aria-haspopup":"dialog","aria-expanded":F,className:l(b?.trigger,p),onClick:()=>_(!F)}),F?jsxRuntime.jsxs("div",{role:"dialog","aria-label":typeof O=="string"?O: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:[O?jsxRuntime.jsx("div",{className:l("mb-3 text-[11px] font-medium text-foreground",b?.header),children:O}):null,d,jsxRuntime.jsx(bc,{...w,labels:x,className:l(b?.panel,u),classNames:v}),g]}):null]})}r(_a,"WorkbenchGallerySettingsButton");function xc(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[jsxRuntime.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),jsxRuntime.jsx("path",{d:"M3 10h18M9 4v16"})]})}r(xc,"TableViewIcon");function vc(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[jsxRuntime.jsx("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1.5"}),jsxRuntime.jsx("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1.5"})]})}r(vc,"GalleryViewIcon");function fc(){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[jsxRuntime.jsx("path",{d:"M20 7h-9M7 7H4M14 17H4M20 17h-3"}),jsxRuntime.jsx("circle",{cx:"9",cy:"7",r:"2"}),jsxRuntime.jsx("circle",{cx:"16",cy:"17",r:"2"})]})}r(fc,"SettingsIcon");function Zf({open:e}){return jsxRuntime.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",className:l("h-3 w-3 opacity-55 transition-transform",e&&"rotate-180"),fill:"none",stroke:"currentColor",strokeWidth:"2",children:jsxRuntime.jsx("path",{d:"m6 9 6 6 6-6"})})}r(Zf,"ChevronDownIcon");var Qf=[{value:"list",label:"Table view",icon:jsxRuntime.jsx(xc,{})},{value:"gallery",label:"Gallery view",icon:jsxRuntime.jsx(vc,{})}];function yc(e){return e.icon!==void 0?e.icon:e.value==="list"||e.value==="table"?jsxRuntime.jsx(xc,{}):e.value==="gallery"?jsxRuntime.jsx(vc,{}):null}r(yc,"getViewModeOptionIcon");function hc(e){return e.triggerLabel??e.labels?.settingsButton??"Settings"}r(hc,"getSettingsTriggerLabel");function ey({value:e,options:t,onValueChange:o,classNames:n}){let a=st.useRef(null),[s,i]=st.useState(false),m=t.find(d=>d.value===e)||t.find(d=>!d.disabled)||t[0],c=m?yc(m):null;return st.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?jsxRuntime.jsxs("div",{ref:a,className:l("relative inline-flex",n?.viewModeRoot),children:[jsxRuntime.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?jsxRuntime.jsx("span",{className:"inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center text-muted-foreground",children:c}):null,jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:m.label}),jsxRuntime.jsx(Zf,{open:s})]}),s?jsxRuntime.jsx("div",{role:"listbox",className:l("absolute left-0 top-full z-50 mt-2 min-w-[160px] overflow-hidden rounded-xl border border-border/60 bg-card/95 p-1.5 text-xs text-foreground shadow-lg backdrop-blur-xl",n?.viewModeMenu),children:t.map(d=>{let g=d.value===m.value,u=yc(d);return jsxRuntime.jsxs("button",{type:"button",role:"option","aria-selected":g,disabled:d.disabled,className:l("flex min-h-8 w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left text-xs font-medium text-muted-foreground transition-colors hover:bg-muted/55 hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",g&&"bg-muted/60 text-foreground",n?.viewModeItem),onClick:()=>{d.disabled||(o?.(d.value,d),i(false));},children:[u?jsxRuntime.jsx("span",{className:"inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:u}):null,jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:d.label})]},d.value)})}):null]}):null}r(ey,"WorkbenchContentToolbarViewModeControl");var Es=st.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?Qf:[]),y=m&&typeof m=="object"?m:null,v=!!h.length,w=!!y,x=w&&c!=="end",k=w&&c==="end",C=v||x||!!o,S=!!n||k;return jsxRuntime.jsxs(t,{ref:b,"data-workbench-content-toolbar":true,className:l("flex min-h-[46px] shrink-0 flex-col gap-2 border-b border-border/60 px-4 py-2 md:flex-row md:items-center md:justify-between",p?.root,d),...f,children:[C?jsxRuntime.jsxs("div",{className:l("flex flex-wrap items-center gap-2",p?.start,g),children:[v?jsxRuntime.jsx(ey,{value:a,options:h,onValueChange:i,classNames:p}):null,x&&y?jsxRuntime.jsx(_a,{align:"end",triggerIcon:jsxRuntime.jsx(fc,{}),triggerLabel:hc(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?jsxRuntime.jsxs("div",{className:l("flex shrink-0 items-center gap-2",p?.end,u),children:[n,k&&y?jsxRuntime.jsx(_a,{align:"end",triggerIcon:jsxRuntime.jsx(fc,{}),triggerLabel:hc(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 ny(e){return !!(e.header||e.footer||e.bodyAs||e.bodyClassName||e.bodyProps||e.classNames?.body)}r(ny,"shouldRenderBodyWrapper");function Sc(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(Sc);let t=st.Children.toArray(e);return t.length?t.some(o=>typeof o=="string"?o.trim().length>0:true):false}r(Sc,"hasRenderableChildren");function ry(e,t){return t===void 0?{}:e===void 0?{width:t}:{width:e?t:0,opacity:e?1:0}}r(ry,"resolveWidthStyle");function kc(e){return e.label??e.key}r(kc,"getFallbackFieldLabel");function ay(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(ay,"getObjectDisplayValue");function wc(e){return e==null||e===""}r(wc,"isEmptyDetailValue");function Cc(e){return ["string","number","boolean"].includes(typeof e)}r(Cc,"isPlainDisplayValue");function Tc(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"||st.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(Tc,"getMediaDisplayData");function iy(e,t){let o=String(e?.renderType||"").toLowerCase();return ["image","media","preview","thumbnail"].includes(o)||!!Tc(t)}r(iy,"shouldRenderAsMedia");function sy(e,t){return e?typeof e=="string"||typeof e=="number"?jsxRuntime.jsx("span",{className:l("inline-flex h-3.5 min-w-3.5 shrink-0 items-center justify-center rounded-sm text-[10px] font-semibold text-primary",t),children:e}):typeof e=="boolean"?null:st.isValidElement(e)?e:jsxRuntime.jsx(e,{className:l("h-3.5 w-3.5 shrink-0 text-primary",t)}):jsxRuntime.jsxs("span",{className:l("relative inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center",t),children:[jsxRuntime.jsx("span",{className:"absolute inset-0 rounded-full border border-primary/25 bg-primary/10"}),jsxRuntime.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-primary"})]})}r(sy,"renderMaybeFieldIcon");function ly(e,t,o){return jsxRuntime.jsxs("span",{className:l("inline-flex min-w-0 items-center gap-1.5 text-[11px] font-semibold text-foreground",o?.fieldLabel),children:[sy(t.labelIcon||t.icon,o?.fieldLabelIcon),jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:e})]})}r(ly,"renderDetailFieldLabel");function dy({media:e,classNames:t}){return jsxRuntime.jsxs("div",{className:l("grid gap-2",t?.mediaValue),children:[jsxRuntime.jsx("div",{className:"overflow-hidden rounded-md border border-border/55 bg-muted/20 dark:border-border/45 dark:bg-muted/10",children:jsxRuntime.jsx("img",{src:e.src,alt:String(e.alt||""),className:l("block aspect-[16/9] w-full object-cover",t?.mediaImage)})}),e.caption?jsxRuntime.jsx("div",{className:l("truncate text-[11px] leading-4 text-muted-foreground",t?.mediaCaption),children:e.caption}):null]})}r(dy,"WorkbenchDetailSidebarMediaValue");function Ds(e,t,o,n){if(wc(e))return t;if(st.isValidElement(e))return e;if(iy(o,e)){let a=Tc(e);if(a)return jsxRuntime.jsx(dy,{media:a,classNames:n})}if(Array.isArray(e)){let a=e.map(s=>Ds(s,"",void 0,n)).filter(s=>!wc(s));return a.length?a.every(Cc)?a.map(String).join(" \xB7 "):jsxRuntime.jsx("span",{className:"inline-flex flex-wrap items-center gap-1",children:a.map((s,i)=>jsxRuntime.jsxs("span",{className:"inline-flex items-center gap-1",children:[i>0?jsxRuntime.jsx("span",{className:"text-muted-foreground",children:"\xB7"}):null,Cc(s)?String(s):s]},i))}):t}if(typeof e=="object"){let a=ay(e);return a===void 0?t:Ds(a,t,o,n)}return String(e)}r(Ds,"getDefaultDetailDisplayValue");function cy(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(cy,"getDefaultFieldValue");function uy(e,t){return typeof e.hidden=="function"?e.hidden(e,t):!!e.hidden}r(uy,"shouldHideField");function my(e,t){return typeof e.hidden=="function"?e.hidden(e,t):!!e.hidden}r(my,"shouldHideSection");function py({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=>!my(f,e));return p.length?jsxRuntime.jsx("div",{className:l("space-y-3",g?.autoBody),children:p.map((f,b)=>{let h=(f.fields||[]).filter(w=>!uy(w,e)),y=f.id||`section-${b}`;if(!h.length&&!f.emptyState)return null;let v=h.map((w,x)=>{let k={field:w,fieldIndex:x,section:f,sectionIndex:b,record:e},C=i?i(w,e,k):cy(w,e),S=m?m(w,e,k):c?c(C,k):Ds(C,w.emptyValue??a,w,g),T=d?d(kc(w),k):kc(w);return {term:ly(T,w,g),value:S}});return jsxRuntime.jsxs("section",{className:l("min-w-0 space-y-3",g?.section),children:[f.title||f.description?jsxRuntime.jsxs("div",{className:l("min-w-0 space-y-1.5",g?.sectionHeader),children:[f.title?jsxRuntime.jsx("div",{className:l("inline-flex max-w-full items-center gap-2 rounded-md border border-primary/20 bg-primary/5 px-2.5 py-1.5 text-xs font-medium text-primary dark:border-primary/25 dark:bg-primary/10",g?.sectionTitle),children:f.title}):null,f.description?jsxRuntime.jsx("div",{className:l("text-[11px] leading-5 text-muted-foreground",g?.sectionDescription),children:f.description}):null]}):null,v.length?jsxRuntime.jsx(rs,{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)}}):jsxRuntime.jsx("div",{className:l("py-3 text-center text-xs text-muted-foreground",g?.emptyState),children:f.emptyState})]},y)})}):s?jsxRuntime.jsx("div",{className:l("rounded-lg border border-dashed border-border/60 px-3 py-6 text-center text-xs text-muted-foreground",g?.emptyState),children:s}):null}r(py,"WorkbenchDetailSidebarAutoContent");var gy=st.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:w,className:x,headerClassName:k,bodyClassName:C,footerClassName:S,resizeHandleClassName:T,bodyProps:E,classNames:R,style:F,..._},z){let O=Sc(c)?c:jsxRuntime.jsx(py,{record:d,fields:g,sections:u,fieldColumns:p,emptyValue:f,emptyState:b,getFieldValue:h,renderFieldValue:y,formatFieldValue:v,formatFieldLabel:w,classNames:R}),j=ny({header:s,footer:i,bodyAs:o==="div"?void 0:o,bodyClassName:C,bodyProps:E,classNames:R}),{className:I,...V}=E??{};return jsxRuntime.jsxs(t,{ref:z,"data-workbench-detail-sidebar":true,"data-open":n===void 0?void 0:n?"true":"false",className:l("workbench-surface-subtle relative flex flex-shrink-0 flex-col self-stretch overflow-hidden rounded-lg border border-border/50 transition-all duration-300 dark:border-border/40",n===false&&"pointer-events-none",R?.root,x),style:{...ry(n,a),...F},..._,children:[m?jsxRuntime.jsx("div",{className:l(R?.resizeHandle,T),children:m}):null,s?jsxRuntime.jsx("div",{className:l("shrink-0 border-b border-border/40 px-4 py-3 dark:border-border/30",R?.header,k),children:s}):null,j?jsxRuntime.jsx(o,{className:l("min-h-0 flex-1 overflow-y-auto",R?.body,C,I),...V,children:O}):O,i?jsxRuntime.jsx("div",{className:l("shrink-0 border-t border-border/40 px-4 py-3 dark:border-border/30",R?.footer,S),children:i}):null]})},"WorkbenchDetailSidebar"));function Nc(e){return typeof e=="function"?true:typeof e=="object"&&e!==null&&!st.isValidElement(e)&&"$$typeof"in e}r(Nc,"isWorkbenchIconComponent");function Rr(e,t){return e?st.isValidElement(e)?e:Nc(e)?jsxRuntime.jsx(e,{className:t}):e:null}r(Rr,"renderWorkbenchIcon");function Ic(e){return !e||!Nc(e)?null:e}r(Ic,"getWorkbenchIconComponent");function yy(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r(yy,"toCssSize");var hy=160,xy=56,vy=128;function Mc(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(Mc,"numericCssSize");function Ec(e,t){return e.renderType==="icon"?xy:t?vy:hy}r(Ec,"defaultWorkbenchColumnWidth");function Bc(e,t,o){return t??Mc(e.width)??Mc(e.minWidth)??Ec(e,o)}r(Bc,"resolvedWorkbenchColumnWidth");function ky(e){return e==null||e===false?null:e}r(ky,"defaultFormatLabel");function Pc(e){if(typeof e=="string"||typeof e=="number")return String(e)}r(Pc,"toTitle");function wy(e,t){return e?.id??e?.key??e?.linkKey??t}r(wy,"defaultGetRowKey");function Cy(e){return e?.linkKey??e?.id??e?.key}r(Cy,"defaultGetRowSelectionKey");function Sy(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(Sy,"getOrderedColumns");function zs(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(zs,"normalizeColumnOrder");function Ty({helperText:e,className:t}){return A(e)?jsxRuntime.jsxs("span",{className:l("group relative inline-flex items-center",t),children:[jsxRuntime.jsx("button",{type:"button",title:Pc(e),"aria-label":Pc(e)||"Field help",className:"inline-flex h-4 w-4 items-center justify-center rounded-md border border-border/60 bg-background text-xs font-semibold normal-case tracking-normal text-muted-foreground shadow-sm transition-colors hover:border-primary/40 hover:text-primary focus-visible:border-primary/40 focus-visible:text-primary focus-visible:outline-hidden",onClick:o=>o.stopPropagation(),children:"?"}),jsxRuntime.jsx("span",{role:"tooltip",className:"pointer-events-none absolute left-1/2 top-full z-40 mt-2 hidden w-72 -translate-x-1/2 whitespace-pre-line rounded-lg border border-border/60 bg-card px-3 py-2 text-xs font-normal normal-case leading-5 tracking-normal text-foreground shadow-sm backdrop-blur-sm group-hover:block group-focus-within:block",children:e})]}):null}r(Ty,"WorkbenchTableHeaderHelper");function Ry({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:w,columnResizeEnabled:x,className:k,tableClassName:C,rowClassName:S,classNames:T,style:E,renderCell:R,renderFieldValue:F,renderColumnHeader:_,onColumnOrderChange:z,onColumnSizeChange:O,onSort:j,formatLabel:I=ky,getColumnDataType:V,getColumnIcon:$,getColumnTypeIcon:N,getRowKey:D=wy,getRowSelectionKey:M=Cy,isActionColumn:K,isActionField:J,isRowDisabled:G,isWorkbenchPlaceholderRow:te,emptyState:U="-",hiddenRowsMessage:Z,scrollFooter:ae,scrollRestoration:ie}){let de=t.map(re=>re.key).join(""),W=st.useMemo(()=>de?de.split(""):[],[de]),[pe,B]=st.useState(W),[H,ne]=st.useState({}),fe=st.useRef(null),ye=st.useRef(new Map),xe=st.useRef(ie);xe.current=ie;let oe=st.useRef(void 0),le=st.useCallback(()=>{let re=fe.current,Ce=xe.current;if(!re||!Ce||oe.current!==Ce.key)return;let Fe=re.getBoundingClientRect().top,qe=Array.from(ye.current.entries()).find(([,nt])=>nt.getBoundingClientRect().bottom>Fe);Ce.write({x:re.scrollLeft,y:re.scrollTop,...qe?{rowKey:qe[0],rowOffset:qe[1].getBoundingClientRect().top-Fe}:{}});},[]);st.useEffect(()=>{let re=fe.current,Ce=xe.current;if(!re||!Ce||oe.current===Ce.key||e.length===0)return;let Fe=Ce.read(),qe=r(()=>{let Bt=Fe?.rowKey?ye.current.get(Fe.rowKey):void 0,_e=Bt&&typeof Fe?.rowOffset=="number"?re.scrollTop+Bt.getBoundingClientRect().top-re.getBoundingClientRect().top-Fe.rowOffset:Fe?.y??0;re.scrollTo({left:Fe?.x??0,top:Math.max(0,_e),behavior:"auto"}),oe.current=Ce.key;},"restore"),nt=re.ownerDocument.defaultView;if(!nt){qe();return}let gt=nt.requestAnimationFrame(qe);return ()=>nt.cancelAnimationFrame(gt)},[e,ie?.key]),st.useEffect(()=>{let re=fe.current?.ownerDocument.defaultView;return re?.addEventListener("pagehide",le),()=>{re?.removeEventListener("pagehide",le),le();}},[le]);let[Re,Ie]=st.useState();st.useEffect(()=>{B(re=>zs(W,re));},[W]);let We=y?zs(W,y):pe,ue=v??H,q=st.useCallback((re,Ce)=>{let Fe=zs(W,re);y||B(Fe),z?.(Fe,Ce);},[y,W,z]),L=st.useCallback((re,Ce,Fe)=>{v||ne(qe=>({...qe,[re]:Ce})),O?.(re,Ce,Fe);},[v,O]),X=n??a,se=s??i,Y=Sy(t,We),ce=h?Y.reduce((re,Ce)=>Ce.key===h?re:re+Bc(Ce,ue[Ce.key],K?.(Ce)??J?.(Ce)??false),0):void 0,ke=h&&ce!==void 0&&Re!==void 0?Math.max(0,Math.round(Re-ce)):void 0,we=Y.flatMap(re=>re.key!==h?[re]:ke===0?[]:ke===void 0?[re]:[{...re,width:ke,minWidth:ke,maxWidth:ke}]),Me=Math.max(0,Number(c||e.length)-Number(m||e.length)),Pe=R??F??((re,Ce)=>Ce?.[re.key]),Ve=K??J??(()=>false),Xe=G??te??(()=>false),Oe=$??N,pt=ce!==void 0&&ke!==void 0?ce+ke:void 0,Ae=pt??d??g??Math.max(760,we.reduce((re,Ce)=>re+Bc(Ce,ue[Ce.key],Ve(Ce)),0));st.useEffect(()=>{if(!h){Ie(void 0);return}let re=fe.current;if(!re)return;let Ce=re.ownerDocument.defaultView,Fe=r(()=>{let gt=Math.round(re.getBoundingClientRect().width);!Number.isFinite(gt)||gt<=0||Ie(Bt=>Bt===gt?Bt:gt);},"updateWidth");Fe();let qe=Ce?.ResizeObserver,nt=qe?new qe(Fe):void 0;return nt?.observe(re),Ce?.addEventListener("resize",Fe),()=>{nt?.disconnect(),Ce?.removeEventListener("resize",Fe);}},[h]);let Le=Me>0&&Z?typeof Z=="function"?Z(Me,m||e.length,c||e.length):Z:null;return jsxRuntime.jsxs(Na,{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,k),style:u==="100%"?{display:"flex",minHeight:0,flex:1,flexDirection:"column",...E}:E,children:[jsxRuntime.jsxs("div",{ref:fe,onScroll:le,className:l("w-full overflow-auto",T?.scrollArea),style:{maxHeight:yy(u),...u==="100%"?{minHeight:0,flex:1}:{}},children:[jsxRuntime.jsxs(Ia,{appearance:f,columnOrder:We,columnSizes:ue,columnDragEnabled:w,columnResizeEnabled:x,onColumnOrderChange:q,onColumnSizeChange:L,className:l("w-full table-auto text-left text-xs",T?.table,C),style:{width:pt,minWidth:Ae},children:[jsxRuntime.jsx(Ma,{appearance:f,className:l("z-20 text-xs font-sans text-muted-foreground",T?.header),children:jsxRuntime.jsx(gn,{className:l("hover:bg-transparent",T?.headerRow),children:we.map((re,Ce)=>{let Fe=Ec(re,Ve(re)),qe=re.renderType||re.type||V?.(re.key,e,re),nt=Rr(Oe?.(qe,re),"h-3.5 w-3.5 shrink-0 text-primary"),Bt=we[Ce-1]?.renderType==="icon"&&re.key===se?.key,_e=_?_(re,{column:re,columnIndex:Ce,columns:we,rows:e,columnType:qe}):I(re.label,{column:re}),zt=!_&&(A(re.trailing)||A(re.helperText))?jsxRuntime.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[A(re.trailing)?I(re.trailing,{column:re}):null,jsxRuntime.jsx(Ty,{helperText:I(re.helperText,{column:re}),className:T?.helper})]}):void 0,Ot=!!re.sortable,ge=Ot&&j?()=>j(re.key,re):void 0;return jsxRuntime.jsx(Pa,{appearance:f,presentation:b,columnId:re.key,align:re.align,icon:_?void 0:nt,label:_e,description:_?void 0:I(re.description,{column:re}),meta:_?void 0:I(re.meta,{column:re}),actions:re.actions,trailing:zt,sortable:Ot,sortDirection:re.sortDirection,sortLabel:re.sortLabel,onSort:ge,draggable:re.draggable,dragLabel:re.dragLabel,resizable:re.resizable,resizeLabel:re.resizeLabel,width:re.width??Fe,minWidth:typeof re.minWidth=="number"?re.minWidth:void 0,maxWidth:typeof re.maxWidth=="number"?re.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&&Ce===0&&"md:left-0 md:z-30 md:shadow-[1px_0_0_0_hsl(var(--border)/0.35)]",re.compactHeaderClassName,re.renderType==="icon"&&"pl-3 pr-1",Bt&&"pl-2",T?.headerCell,re.headerClassName),style:{minWidth:typeof re.minWidth=="string"?re.minWidth:void 0,maxWidth:typeof re.maxWidth=="string"?re.maxWidth:void 0,...re.headerStyle}},re.key)})})}),jsxRuntime.jsx(Ba,{appearance:f,className:l("divide-y divide-border/35 dark:divide-border/30",T?.body),children:e.length?e.map((re,Ce)=>{let Fe=D(re,Ce),qe=Xe(re,Ce),nt=M(re,Ce),gt=!!(X&&String(nt)===String(X)),Bt=typeof S=="function"?S(re,Ce):S;return jsxRuntime.jsx(gn,{appearance:f,ref:_e=>{_e?ye.current.set(String(Fe),_e):ye.current.delete(String(Fe));},interactive:!!o&&!qe,"data-item-key":String(Fe),tabIndex:o&&!qe?0:void 0,selected:gt,disabled:qe,onClick:_e=>{qe||(o&&_e.currentTarget.focus({preventScroll:true}),o?.(re,Ce));},onKeyDown:_e=>{_e.target!==_e.currentTarget||qe||!o||!["Enter"," "].includes(_e.key)||(_e.preventDefault(),o(re,Ce));},className:l(o&&!qe?"cursor-pointer":"cursor-default",gt?"bg-primary/10 hover:bg-primary/15":qe?"":"hover:bg-muted/25 dark:hover:bg-muted/15",T?.row,Bt),children:we.map((_e,zt)=>{let Ot=Ve(_e)||_e.wrap===true,He=we[zt-1]?.renderType==="icon"&&_e.key===se?.key;return jsxRuntime.jsx(gr,{appearance:f,align:_e.align,className:l(Ot?"align-top whitespace-normal":"whitespace-nowrap","px-4 py-3 text-muted-foreground",!Ot&&"overflow-hidden text-ellipsis",p&&zt===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)]",_e.compactCellClassName,_e.renderType==="icon"&&"pl-3 pr-1",He&&"pl-2",T?.cell,_e.cellClassName),style:_e.cellStyle,children:Pe(_e,re,{row:re,rowIndex:Ce,column:_e,columnIndex:zt,compact:true,surface:"list"})},`${Fe}-${_e.key}`)})},Fe)}):jsxRuntime.jsx(Ea,{appearance:f,colSpan:Math.max(we.length,1),classNames:{cell:"px-4 py-10 text-center text-sm text-muted-foreground"},children:U})})]}),A(ae)?jsxRuntime.jsx("div",{style:{minWidth:Ae},children:ae}):null]}),Le?jsxRuntime.jsx("div",{className:l("border-t border-border/40 px-4 py-2 text-xs text-muted-foreground dark:border-border/30",T?.footer),children:Le}):null]})}r(Ry,"WorkbenchTableView");function Os(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r(Os,"toCssSize");function Dn(){return typeof window<"u"}r(Dn,"isBrowser");function Wc(e,t){return e?.id??e?.key??t}r(Wc,"defaultGetRowKey");function Ua(e){return typeof e.width=="number"?e.width:typeof e.minWidth=="number"?e.minWidth:160}r(Ua,"getColumnDefaultSize");function Ny(e,t){return e.reduce((o,n)=>(o[n.key]=t?.[n.key]??Ua(n),o),{})}r(Ny,"buildDefaultColumnSizes");function Lc(e,t){if(!e||!Dn())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(Lc,"loadStoredColumnSizes");function Ac(e,t){!e||!Dn()||window.localStorage.setItem(e,JSON.stringify(t));}r(Ac,"persistColumnSizes");function Gc(e){return e?`${e}.frozenColumnCount`:void 0}r(Gc,"getFrozenColumnStorageKey");function _c(e){return e?`${e}.frozenEndColumnCount`:void 0}r(_c,"getFrozenEndColumnStorageKey");function Yo(e,t){return Number.isFinite(e)?Math.max(0,Math.min(Math.round(e),t)):0}r(Yo,"clampFrozenColumnCount");function Iy(e,t,o){let n=Yo(e,o),a=Yo(t,Math.max(0,o-n));return {startCount:n,endCount:a}}r(Iy,"normalizeFrozenColumnCounts");function zc(e,t,o){let n=Yo(t,o),a=Gc(e);if(!a||!Dn())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(zc,"loadStoredFrozenColumnCount");function My(e,t){let o=Gc(e);!o||!Dn()||window.localStorage.setItem(o,String(t));}r(My,"persistFrozenColumnCount");function Oc(e,t,o){let n=Yo(t,o),a=_c(e);if(!a||!Dn())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(Oc,"loadStoredFrozenEndColumnCount");function By(e,t){let o=_c(e);!o||!Dn()||window.localStorage.setItem(o,String(t));}r(By,"persistFrozenEndColumnCount");function Ka(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(Ka,"normalizeColumnOrder");function Py(e,t){let o=Ka(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(Py,"getOrderedColumns");function Br(e,t){let o=t[e.key];return typeof o=="number"?o:Ua(e)}r(Br,"getColumnNumericWidth");function Ey(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+=Br(s,t);}),n}r(Ey,"buildFrozenOffsets");function Dy(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+=Br(s,t);}),n}r(Dy,"buildFrozenEndOffsets");function Fc(e,t,o){return typeof e=="function"?e(t,o):e}r(Fc,"resolveRowClassName");function Hc(e,t){let o=t?.[e.key];return o==null||o===""?"\u2014":String(o)}r(Hc,"renderDefaultCell");function Vc({children:e,wrap:t}){return jsxRuntime.jsx("div",{className:l("min-w-0 max-w-full overflow-auto overscroll-contain [scrollbar-width:thin]",t?"max-h-20 whitespace-pre-wrap break-words leading-5":"whitespace-nowrap"),children:e})}r(Vc,"InteractiveTableCellContent");function Wy({className:e}){return jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:e,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.75",children:[jsxRuntime.jsx("path",{d:"M5.25 2.75h5.5"}),jsxRuntime.jsx("path",{d:"M6.25 2.75v4L4.5 9.25h7L9.75 6.75v-4"}),jsxRuntime.jsx("path",{d:"M8 9.25v4"})]})}r(Wy,"PinIcon");function Ly({rows:e=[],columns:t=[],pinnedTopRows:o=[],getRowKey:n=Wc,getPinnedTopRowKey:a=Wc,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:w=false,columnResizeEnabled:x=true,frozenColumnCount:k=0,frozenEndColumnCount:C=0,tableMinWidth:S,bodyMaxHeight:T="min(60vh, 42rem)",appearance:E,className:R,tableClassName:F,classNames:_,style:z,onColumnOrderChange:O,onColumnSizeChange:j,onResetColumnSizes:I,onFrozenColumnCountChange:V,onFrozenEndColumnCountChange:$,onSort:N}){let D=xt().workbench.interactiveTable,M=t.map(Y=>Y.key).join(""),K=st.useMemo(()=>M?M.split(""):[],[M]),J=st.useMemo(()=>Ny(t,v),[t,v]),[G,te]=st.useState(K),[U,Z]=st.useState(()=>Lc(b,J)),[ae,ie]=st.useState(()=>zc(b,k,t.length)),[de,W]=st.useState(()=>Oc(b,C,t.length));st.useEffect(()=>{te(Y=>Ka(K,Y));},[K]),st.useEffect(()=>{y||Z(Lc(b,J));},[y,b,J]),st.useEffect(()=>{ie(zc(b,k,t.length));},[b,t.length,k]),st.useEffect(()=>{W(Oc(b,C,t.length));},[b,t.length,C]);let pe=h?Ka(K,h):G,B=y??U,H=Py(t,pe),{startCount:ne,endCount:fe}=Iy(ae,de,H.length),ye=Ey(H,B,ne),xe=Dy(H,B,fe),oe=S??Math.max(760,H.reduce((Y,ce)=>Y+Br(ce,B),0)),le={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=st.useCallback((Y,ce)=>{let ke=Ka(K,Y);h||te(ke),O?.(ke,ce);},[h,K,O]),Ie=st.useCallback((Y,ce,ke)=>{let we=t.find(Oe=>Oe.key===Y),Me=we?.minWidth,Pe=we?.maxWidth,Ve=Math.max(typeof Me=="number"?Me:0,Math.min(ce,typeof Pe=="number"?Pe:Number.POSITIVE_INFINITY)),Xe={...B,[Y]:Ve};y||Z(Xe),Ac(b,Xe),j?.(Y,Ve,ke);},[y,b,t,j,B]),We=st.useCallback(Y=>{let ce=J[Y.key]??Ua(Y),ke=Br(Y,B),we={...B,[Y.key]:ce};y||Z(we),Ac(b,we),j?.(Y.key,ce,{columnId:Y.key,previousWidth:ke,minWidth:Y.minWidth,maxWidth:Y.maxWidth}),I?.(we);},[y,b,J,j,I,B]),ue=st.useCallback(Y=>{let ce=Yo(Y,Math.max(0,H.length-fe));ie(ce),My(b,ce),V?.(ce);},[b,V,H.length,fe]),q=st.useCallback(Y=>{let ce=Yo(Y,Math.max(0,H.length-ne));W(ce),By(b,ce),$?.(ce);},[b,$,H.length,ne]),L=r(Y=>{if(Y<ne)return "start";if(Y>=H.length-fe)return "end"},"getFrozenPosition"),X=r((Y,ce,ke=false)=>{let we=L(ce);if(we)return l("sticky",we==="start"?"shadow-[1px_0_0_0_hsl(var(--border)/0.45)]":"shadow-[-1px_0_0_0_hsl(var(--border)/0.45)]",ke?"bg-muted/60":"bg-inherit",ke?"z-40":"z-20",(ce===0||ce===H.length-1)&&(ke?"z-50":"z-30"))},"getFrozenClassName"),se=r((Y,ce)=>{let ke=L(ce);if(ke==="start")return {left:ye.get(Y.key)??0};if(ke==="end")return {right:xe.get(Y.key)??0}},"getFrozenStyle");return jsxRuntime.jsx(Na,{appearance:E,className:l("flex h-full min-h-0 flex-col overflow-hidden rounded-lg border border-border/60 bg-card",_?.root,R),style:z,children:jsxRuntime.jsx("div",{className:l("min-h-0 flex-1 overflow-auto",_?.scrollArea),style:{maxHeight:Os(T)},children:jsxRuntime.jsxs(Ia,{appearance:E,columnOrder:pe,columnSizes:B,columnDragEnabled:w,columnResizeEnabled:x,onColumnOrderChange:Re,onColumnSizeChange:Ie,className:l("w-full table-fixed text-left text-xs",_?.table,F),style:{minWidth:oe},children:[jsxRuntime.jsx("colgroup",{children:H.map(Y=>jsxRuntime.jsx("col",{style:{width:Os(B[Y.key]??Y.width),minWidth:Os(Y.minWidth)}},Y.key))}),jsxRuntime.jsx(Ma,{appearance:E,className:l("border-b border-border/60 bg-muted/60 text-[11px] font-medium text-muted-foreground",_?.tableHeader),children:jsxRuntime.jsx(gn,{appearance:E,className:l("hover:bg-transparent",_?.headerRow),children:H.map((Y,ce)=>{let ke=m?m(Y,{column:Y,columnIndex:ce,columns:H,rows:e}):Y.label,we=!!Y.sortable,Me=we&&N?()=>N(Y.key,Y):void 0,Pe=ce<ne,Ve=ce>=H.length-fe,Xe=Pe||Ve,Oe=Br(Y,B)===(J[Y.key]??Ua(Y));return jsxRuntime.jsxs(Dd,{modal:false,children:[jsxRuntime.jsx(ts,{asChild:true,appearance:E,children:jsxRuntime.jsx(Pa,{appearance:E,columnId:Y.key,align:Y.align,label:ke,description:Y.description,trailing:Xe?jsxRuntime.jsx("span",{title:le.frozenColumnTitle,className:"inline-flex h-5 w-5 items-center justify-center rounded text-primary",children:jsxRuntime.jsx(Wy,{className:"h-3.5 w-3.5"})}):null,sortable:we,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,ce,true),Y.headerClassName,Y.className,_?.headerCell),style:se(Y,ce)})}),jsxRuntime.jsxs(os,{appearance:E,alignOffset:-4,className:"min-w-44",children:[jsxRuntime.jsx(Wd,{appearance:E,children:le.columnActions}),Xe?jsxRuntime.jsx(Rn,{appearance:E,onSelect:()=>{Ve?q(H.length-ce-1):ue(ce);},children:Ve?le.unfreezeEndColumn:le.unfreezeColumn}):jsxRuntime.jsx(Rn,{appearance:E,onSelect:()=>ue(ce+1),children:le.freezeColumn}),Xe?null:jsxRuntime.jsx(Rn,{appearance:E,onSelect:()=>q(H.length-ce),children:le.freezeEndColumn}),jsxRuntime.jsx(Rn,{appearance:E,disabled:ne===0&&fe===0,onSelect:()=>{ue(0),q(0);},children:le.unfreezeAllColumns}),jsxRuntime.jsx(Ld,{appearance:E}),jsxRuntime.jsx(Rn,{appearance:E,disabled:Oe,onSelect:()=>We(Y),children:le.resetColumnWidth})]})]},Y.key)})})}),jsxRuntime.jsxs(Ba,{appearance:E,className:l("divide-y divide-border/50",_?.body),children:[o.map((Y,ce)=>{let ke=a(Y,ce),we=Fc(u,Y,ce);return jsxRuntime.jsx(gn,{appearance:E,className:l("bg-card/95",_?.pinnedTopRow,we),children:H.map((Me,Pe)=>jsxRuntime.jsx(gr,{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,Pe),Me.cellClassName,_?.cell),style:se(Me,Pe),children:jsxRuntime.jsx(Vc,{wrap:Me.wrap,children:i?i(Me,Y,{row:Y,rowIndex:ce,column:Me,columnIndex:Pe,isPinnedTopRow:true}):Hc(Me,Y)})},`pinned-${ke}-${Me.key}`))},`pinned-${ke}`)}),e.length?e.map((Y,ce)=>{let ke=n(Y,ce),we=d?.(Y,ce)||{},Me=Fc(g,Y,ce);return jsxRuntime.jsx(gn,{appearance:E,interactive:!!c&&!we.disabled,selected:we.selected,disabled:we.disabled,onClick:()=>{we.disabled||c?.(Y,ce);},className:l("min-h-[52px] bg-card transition-colors",we.saving&&"bg-primary/5",we.pending&&"opacity-80",c&&!we.disabled?"cursor-pointer hover:bg-muted/30":"hover:bg-muted/30",_?.row,Me),children:H.map((Pe,Ve)=>jsxRuntime.jsx(gr,{appearance:E,align:Pe.align,className:l("h-[52px] border-r border-border/50 px-2.5 py-1.5 align-middle",Pe.wrap?"whitespace-normal":"whitespace-nowrap",X(Pe,Ve),Pe.cellClassName,_?.cell),style:se(Pe,Ve),children:jsxRuntime.jsx(Vc,{wrap:Pe.wrap,children:s?s(Pe,Y,{row:Y,rowIndex:ce,column:Pe,columnIndex:Ve,isPinnedTopRow:false}):Hc(Pe,Y)})},`${ke}-${Pe.key}`))},ke)}):o.length?null:jsxRuntime.jsx(Ea,{appearance:E,colSpan:Math.max(H.length,1),className:_?.empty,children:p})]})]})})})}r(Ly,"InteractiveTable");function Ay({value:e,placeholder:t,disabled:o,multiline:n=false,commitOnBlur:a=true,className:s,inputClassName:i,onCommit:m}){let c=String(e||""),[d,g]=st.useState(c);st.useEffect(()=>{g(c);},[c]);let u=st.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?jsxRuntime.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());}}):jsxRuntime.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(Ay,"InteractiveTableEditableTextCell");function zy({children:e,mono:t=false,className:o}){return jsxRuntime.jsx("div",{className:l("min-w-0 text-xs text-muted-foreground",t&&"font-mono",o),children:A(e)?e:"\u2014"})}r(zy,"InteractiveTableReadonlyCell");function Oy({value:e,options:t,disabled:o,ariaLabel:n,children:a,className:s,onChange:i}){return jsxRuntime.jsxs("div",{className:l("relative flex w-full items-center",s),children:[a,jsxRuntime.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=>jsxRuntime.jsx("option",{value:m.value,children:m.label},m.value))})]})}r(Oy,"InteractiveTableSelectCell");function jc({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:jsxRuntime.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:jsxRuntime.jsx(i,{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:a?.background==="panel"?void 0:a?.maxLines??2,overflow:"hidden"},children:t})}),d=r(g=>jsxRuntime.jsx("div",{className:"monkeys-gallery-slot-row","data-row":g,children:m.filter(({slot:u})=>u.position.startsWith(g)).map(({slot:u,content:p})=>jsxRuntime.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 jsxRuntime.jsxs("div",{className:"monkeys-gallery-card-surface","data-hover-effect":o.hover?.effect??"none",style:{"--monkeys-gallery-hover-scale":o.hover?.scale??1.02},children:[s==="above"&&c,jsxRuntime.jsxs("div",{className:"monkeys-gallery-media-card",children:[jsxRuntime.jsx("div",{className:"monkeys-gallery-card-media",children:e}),jsxRuntime.jsxs("div",{className:"monkeys-gallery-card-overlay",children:[jsxRuntime.jsxs("div",{children:[s==="overlay-top"&&c,d("top")]}),d("middle"),jsxRuntime.jsxs("div",{children:[d("bottom"),s==="overlay-bottom"&&c]})]})]}),s==="below"&&c]})}r(jc,"WorkbenchGalleryCardSurface");var Fy=/\.(png|jpe?g|webp|gif|svg|bmp|avif)$/i,Hy=/\.(wav|mp3|ogg|m4a|flac|aac)$/i,Vy=r(e=>/^https?:\/\//i.test(String(e||"")),"isLikelyUrl"),$c=r(e=>String(e?.renderType||e?.type||"").toLowerCase(),"getColumnRenderKind"),Gy=r(e=>String(e||"").startsWith("data:image/")||Fy.test(String(e||"")),"isImageLikeValue"),_y=r(e=>String(e||"").startsWith("data:audio/")||Hy.test(String(e||"")),"isAudioLikeValue"),jy=r(e=>String(e||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),"escapeSvgText"),Wn=r((e,t)=>e?t?.[e.key]??null:null,"getDefaultGalleryFieldValue"),Dr=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"),Wr=r((e={key:""},t)=>$c(e)==="image"||Gy(t),"isDefaultGalleryImageField"),Lr=r((e={key:""},t)=>$c(e)==="audio"||_y(t),"isDefaultGalleryAudioField"),Kc=r((e,t,o)=>{if(Vy(e)||String(e||"").startsWith("data:image/"))return String(e);let n=jy(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"),qa=r((e,t,{getFieldValue:o=Wn,shouldEnhanceMultimodal:n=true,isImageField:a=Wr,isAudioField:s=Lr}={})=>{if(!e||!n)return false;let i=o(e,t);return a(e,i)||s(e,i)},"isDefaultGalleryMediaColumn"),Ya=r((e,t,{isMediaColumn:o=r(()=>false,"isMediaColumn")}={})=>!e||e.renderType==="icon"?false:!o(e,t),"isDefaultGalleryTitleCandidate"),Ja=r((e,t,{isMediaColumn:o=r(()=>false,"isMediaColumn")}={})=>!e||e.renderType==="icon"?false:!o(e,t),"isDefaultGallerySummaryCandidate"),Uc=r((e,t,{compact:o=false,getFieldValue:n=Wn,getDisplayText:a=Dr}={})=>{let s=n(e,t);return jsxRuntime.jsx("span",{className:l("leading-relaxed",o&&e?.wrap===true&&"line-clamp-2 block"),children:a(s)})},"renderDefaultGalleryFieldValue");var Ky=r(e=>e==="compact"?2:e==="detailed"?6:4,"getDefaultGalleryDetailLimit"),Uy=r((e,t)=>e===1||e===2||e===3?Number(e):t==="detailed"?1:2,"getNormalizedGalleryBentoColumns"),qy=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:Ky(e)},"getNormalizedGalleryDetailLimit"),Yy=r(e=>e==="compact"?"p-3":e==="detailed"?"p-4":"p-3.5","getGalleryCardPaddingClassName"),Jy=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"),Xy=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 Zy(e){return Ic(e)}r(Zy,"getIconComponent");function Qy(e){return e}r(Qy,"defaultFormatLabel");function eh(e){return typeof e=="string"||typeof e=="number"?String(e):""}r(eh,"getLabelText");function Fs({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:w,isSummaryCandidate:x,getDisplayText:k,renderFieldValue:C,getImagePreviewSrc:S,isImageField:T,isAudioField:E,AudioPlayerComponent:R,cardVariant:F="default",renderPreview:_,renderMeta:z,renderLeadingVisual:O,resolveRecordVisual:j,hiddenDetailFieldKeys:I=[],labels:V,formatLabel:$=Qy,className:N}){let D=y||Wn,M=k||Dr,K=T||Wr,J=E||Lr,G=S||Kc,te=v||((ee,Te)=>qa(ee,Te,{getFieldValue:D,shouldEnhanceMultimodal:h,isImageField:K,isAudioField:J})),U=w||((ee,Te)=>Ya(ee,Te,{isMediaColumn:te})),Z=x||((ee,Te)=>Ja(ee,Te,{isMediaColumn:te})),ae=C||((ee,Te,{compact:Ke}={})=>Uc(ee,Te,{compact:Ke,getFieldValue:D,getDisplayText:M})),ie=F==="preview-only",de=F==="image-only",W=F==="chromatic-bento",B=(d!=="auto"?t.find(ee=>ee.key===d&&te(ee,e)):null)||(h?t.find(ee=>te(ee,e)):null),H=t.find(ee=>ee.renderType==="icon"),ne=H&&j?j(e[H.key],e,H):null,fe=Zy(ne?.Icon||ne?.icon),ye=B?D(B,e):null,xe=B?K(B,ye):false,oe=B?J(B,ye):false,le=t.filter(ee=>ee.key!==B?.key&&ee.renderType!=="icon"),Ie=le.filter(ee=>{if(!ee||te(ee,e)||!U(ee,e))return false;let Te=D(ee,e);return !(Te==null||Te==="")})[0]||null,We=M(Ie?D(Ie,e):e.linkKey||e.id),q=le.filter(ee=>ee&&ee.key!==Ie?.key&&!te(ee,e)&&Z(ee,e)).map(ee=>({column:ee,text:String(M(D(ee,e)))})),L=(q.find(({text:ee})=>ee!=="\u2014"&&ee.length>12)||q.find(({text:ee})=>ee!=="\u2014"))?.column||null,X=L?M(D(L,e)):"",se=new Set(I),Y=le.filter(ee=>ee.key!==Ie?.key&&ee.key!==L?.key&&!se.has(ee.key)),ce=qy({density:g,visibility:p,limit:f}),ke=Number.isFinite(ce)?Y.slice(0,ce):Y,we=g==="detailed",Me=Uy(u,g),Pe=Yy(g),Ve=Xy(Me),Xe=b==="lines",Oe=de?a?"block h-auto w-full":"block h-auto w-full transition-transform duration-500 group-hover:scale-[1.02]":Jy(g,c),pt=typeof _=="function"?_({row:e,mediaColumn:B,mediaValue:ye,isImageMedia:xe,isAudioMedia:oe,iconVisual:ne,IconComponent:fe,previewClassName:Oe}):null,Ae={row:e,contentColumns:le,detailColumns:Y,titleColumn:Ie,summaryColumn:L,getDisplayText:M,getFieldValue:D},Le=z?.(Ae)??null,re=O?.({...Ae,iconVisual:ne})??null,Ce=!re&&ne?jsxRuntime.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:Rr(ne.Icon||ne.icon,l("h-4 w-4",ne.iconClassName||"text-primary"))}):null,Fe=re||Ce,qe=W?"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",nt=W?"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",gt=W?"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",Bt=W?"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",_e=V?.fieldCount?.(le.length),zt=V?.coverOnlyHint,Ot=pt==null&&xe&&B?G(ye,e.id,B.label):void 0,ge=pt??jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[xe&&B?jsxRuntime.jsx("div",{className:l("overflow-hidden bg-card/50",de?"rounded-[inherit] bg-transparent":ie?"rounded-[inherit]":"mb-3 rounded-lg border border-border/70"),children:jsxRuntime.jsx("img",{src:Ot,style:la(Ot),alt:typeof ye?.alt=="string"?ye.alt:typeof ye=="string"?ye:String(B.label||""),className:Oe,loading:"lazy",referrerPolicy:"no-referrer",onError:ee=>{ee.currentTarget.onerror=null,ee.currentTarget.src=G("",e.id,B.label);}})}):null,!xe&&ne&&ie?jsxRuntime.jsx("div",{className:l("flex items-center justify-center","rounded-[inherit] border py-10",ne.chipClassName||"border-primary/20 bg-primary/5"),children:Rr(ne.Icon||ne.icon,l("h-10 w-10",ne.iconClassName||"text-primary"))}):null,oe&&R?jsxRuntime.jsx("div",{className:l(!ie&&"mb-3"),children:jsxRuntime.jsx(R,{filename:String(ye)})}):null]}),He=a?jc:null,Q=a?.title?.fieldId?t.find(ee=>ee.key===a.title?.fieldId):Ie,me=i?i(e):Q?M(D(Q,e)):We,Be=!!a?.slots?.length,he=Be||n==="container"?"div":"button";return jsxRuntime.jsxs(he,{"data-gallery-card":true,"data-card-hover-effect":a?.hover?.effect,type:he==="button"?"button":void 0,role:Be&&n==="button"&&o?"group":void 0,tabIndex:Be&&n==="button"&&o?0:void 0,onKeyDown:Be&&n==="button"&&o?ee=>{ee.target===ee.currentTarget&&(ee.key==="Enter"||ee.key===" ")&&(ee.preventDefault(),o());}:void 0,onClick:n==="button"?ee=>{(!Be||!ee.target.closest("button,a,input,select,textarea,[role=button],[role=menuitem]"))&&o?.();}:void 0,"aria-label":eh(We),className:l("group relative w-full rounded-lg text-left transition-all duration-300",de?"overflow-hidden bg-transparent p-0 shadow-none":ie?"overflow-hidden bg-transparent p-0":l("overflow-hidden border",W&&"shadow-none"),!ie&&!de&&Pe,!ie&&!de&&(m?W?"border-primary/35 bg-background/85 ring-1 ring-primary/20":"border-primary/40 bg-primary/10 ring-1 ring-primary/30":W?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"),ie&&m&&"ring-1 ring-primary/30",de&&(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",N),children:[W?jsxRuntime.jsx("div",{"aria-hidden":"true",className:l("pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_top_right,hsl(var(--primary)/0.18),transparent_40%),radial-gradient(circle_at_bottom_left,hsl(var(--accent)/0.18),transparent_45%)] opacity-0 transition-opacity duration-300",m?"opacity-100":"group-hover:opacity-100")}):null,jsxRuntime.jsxs("div",{className:l("relative z-[1]",(de||ie)&&"rounded-[inherit]"),children:[He&&a?jsxRuntime.jsx(He,{presentation:a,title:me,renderSlot:ee=>s?.(ee,Ae),children:ge}):ge,!ie&&!de?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-start gap-3",children:[Fe?jsxRuntime.jsx("div",{className:"shrink-0",children:Fe}):null,jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-1 items-start justify-between gap-3",children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[!a?.title&&jsxRuntime.jsx("div",{className:l("flex items-center gap-2 text-sm font-semibold",W?"text-muted-foreground transition-colors duration-300 group-hover:text-foreground":"text-foreground"),children:jsxRuntime.jsx("span",{className:"truncate",children:n==="container"&&o?jsxRuntime.jsx("button",{type:"button",onClick:o,className:"border-0 bg-transparent p-0 text-left hover:underline",style:{font:"inherit",color:"inherit"},children:We}):We})}),X&&X!==We?jsxRuntime.jsx("div",{className:l("mt-1 text-[11px] leading-5 text-muted-foreground",we?"line-clamp-4":"line-clamp-2",W&&"transition-colors duration-300 group-hover:text-foreground"),children:X}):null]}),Le??(A(_e)?jsxRuntime.jsx("span",{className:qe,children:_e}):null)]})]}),ke.length>0?jsxRuntime.jsx("div",{"data-gallery-detail-presentation":b,className:l("mt-3 grid grid-flow-row gap-2",Xe?"grid-cols-1":Ve),children:ke.map(ee=>jsxRuntime.jsxs("div",{className:Xe?"flex min-w-0 items-start gap-2 text-xs":nt,children:[ee.label?jsxRuntime.jsx("div",{className:Xe?"shrink-0 text-muted-foreground":gt,children:$(ee.label,{column:ee})}):null,jsxRuntime.jsx("div",{className:Xe?"min-w-0 text-foreground":l(Bt,!ee.label&&"mt-0"),children:ae(ee,e,{compact:g!=="detailed",surface:"gallery"})})]},`${e.id||e.linkKey}-${ee.key}`))}):null,!Ie&&!X&&ke.length===0&&A(zt)?jsxRuntime.jsx("div",{className:l("mt-3 text-[11px] text-muted-foreground",W&&"transition-colors duration-300 group-hover:text-foreground"),children:zt}):null]}):null]})]})}r(Fs,"WorkbenchGalleryCard");function Yc(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(Yc,"resolveGalleryScrollDirection");function nh(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(nh,"placeWindowedItems");function rh(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(rh,"visibleWindow");function Xc({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=st.useRef(null),h=st.useRef(new Map),y=st.useRef(),[v,w]=st.useState({width:f,heights:{}}),[x,k]=st.useState({start:0,length:u?1280:720}),[C,S]=st.useState(),[T,E]=st.useState(),R=e.map(t),F=JSON.stringify(R),_=R.map((D,M)=>v.heights[D]??Math.max(1,a(e[M],f))),z=st.useMemo(()=>nh(_,p,f,o.gap,u?"rail":o.mode==="grid"?"grid":"masonry"),[JSON.stringify(_),p,f,o.gap,u,o.mode]),O=st.useCallback(()=>{let D=b.current,M=s();if(!D||!M)return;let K=D.getBoundingClientRect(),J=M.getBoundingClientRect(),G=M.offsetHeight>0?J.height/M.offsetHeight:1,te=u?M.scrollLeft:(J.top-K.top)/(G||1)+M.clientTop,U=u?M.clientWidth:M.clientHeight;U<=0||k(Z=>Z.start===te&&Z.length===U?Z:{start:te,length:U});},[s,u]);st.useLayoutEffect(()=>{O();},[O,z.height,z.width]),st.useEffect(()=>{let D=s();if(!D)return;let M=0,K=r(()=>{M||(M=requestAnimationFrame(()=>{M=0,O();}));},"update");D.addEventListener("scroll",K,{passive:true}),window.addEventListener("resize",K);let J=typeof ResizeObserver=="function"?new ResizeObserver(K):void 0;return J?.observe(D),b.current&&J?.observe(b.current),()=>{D.removeEventListener("scroll",K),window.removeEventListener("resize",K),J?.disconnect(),cancelAnimationFrame(M);}},[s,O]),st.useEffect(()=>{if(typeof ResizeObserver!="function")return;let D=new ResizeObserver(M=>{w(K=>{let J={...K.heights},G=K.width!==f;for(let te of M){let U=te.target.dataset.windowKey,Z=te.borderBoxSize?.[0]?.blockSize??te.target.offsetHeight;U!==void 0&&Z>0&&J[U]!==Z&&(J[U]=Z,G=true);}return G?{width:f,heights:J}:K});});return y.current=D,h.current.forEach(M=>D.observe(M)),()=>{D.disconnect(),y.current=void 0;}},[f]),st.useEffect(()=>{let D=new Set(R);w(M=>({width:M.width,heights:Object.fromEntries(Object.entries(M.heights).filter(([K])=>D.has(K)))}));},[F]);let j=r((D,M)=>{let K=h.current.get(D);if(K&&y.current?.unobserve(K),!M){h.current.delete(D);return}M.dataset.windowKey=D,h.current.set(D,M),y.current?.observe(M);},"register"),I=x.length,V=rh(z.placements,x.start,x.length,u,I),$=new Set(V.map(D=>D.index));for(let D of [C,T]){let M=D===void 0?-1:R.indexOf(D);M>=0&&$.add(M);}st.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 N={...o,columnWidth:f,itemWidth:f};return jsxRuntime.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:z.height},overflowAnchor:"none"},children:[u?jsxRuntime.jsx("div",{"aria-hidden":"true",style:{width:z.width,height:z.height,pointerEvents:"none"}}):null,Array.from($).sort((D,M)=>D-M).map(D=>{let M=e[D],K=R[D],J=z.placements[D],G=d(M,N);return jsxRuntime.jsx("div",{...G,"aria-posinset":D+1,"aria-setsize":e.length,onFocus:te=>{S(K),G.onFocus?.(te);},onBlur:te=>{te.currentTarget.contains(te.relatedTarget)||S(void 0),G.onBlur?.(te);},onKeyDown:te=>{if(te.target===te.currentTarget){let U=u?1:p,Z=te.key==="Home"?0:te.key==="End"?e.length-1:te.key==="ArrowRight"?D+1:te.key==="ArrowLeft"?D-1:te.key==="ArrowDown"?D+U:te.key==="ArrowUp"?D-U:void 0;if(Z!==void 0){te.preventDefault(),E(R[Math.min(e.length-1,Math.max(0,Z))]);return}}G.onKeyDown?.(te);},style:{...G.style,position:"absolute",left:J.left,top:J.top,width:J.width},children:jsxRuntime.jsx("div",{ref:te=>j(K,te),children:g(M,N)})},K)}),m?jsxRuntime.jsx("div",{ref:m,"aria-hidden":"true",style:{position:"absolute",left:Math.max(0,z.width-1),top:0,width:1,height:1}}):null]})}r(Xc,"WorkbenchWindowedLayout");var sh=12,lh=8,eu=280,ou=240,dh=typeof window>"u"?st.useEffect:st.useLayoutEffect;function ei(e,t,o){return Math.min(Math.max(e,t),o)}r(ei,"clamp");function ch(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(ch,"getRootFontSize");function ti(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*ch(o)}return t}r(ti,"resolveLengthToPixels");function tu(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(tu,"areMeasurementMapsEqual");function uh({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(uh,"getMasonryColumnCount");function mh({size:e,columnWidth:t,columnCount:o,gap:n}){if(Number.isFinite(e?.columnSpan)&&Number(e?.columnSpan)>0)return ei(Math.round(Number(e?.columnSpan)),1,o);let a=ti(e?.width,t,null);return ei(Math.ceil((a+n)/(t+n)),1,o)}r(mh,"getItemColumnSpan");function ph({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):ti(e?.height,ou,null);return Math.max(1,Math.ceil((a+n)/(o+n)))}r(ph,"getItemRowSpan");function gh({size:e,measuredHeight:t}){return Number.isFinite(t)&&Number(t)>0?Number(t):ti(e?.height,ou,null)}r(gh,"getResolvedItemHeight");function Ar({items:e=[],renderItem:t,getItemKey:o=r((p,f)=>p?.id??p?.key??f,"getItemKey"),getItemSize:n,columnWidth:a=eu,columnCount:s,gap:i=sh,rowHeight:m=lh,placementStrategy:c="shelf",containerProps:d,getItemProps:g,className:u}){let p=st.useRef(null),f=st.useRef(new Map),b=st.useRef(null),[h,y]=st.useState(0),[v,w]=st.useState({}),x=st.useMemo(()=>e.map((z,O)=>String(o(z,O))),[o,e]),k=x.join("|");st.useEffect(()=>{let z=p.current;if(!z)return;let O=r(()=>{let j=Math.round(z.getBoundingClientRect().width);y(I=>I===j?I:j);},"updateWidth");if(O(),typeof ResizeObserver=="function"){let j=new ResizeObserver(()=>O());return j.observe(z),()=>j.disconnect()}return window.addEventListener("resize",O),()=>window.removeEventListener("resize",O)},[]),st.useEffect(()=>{w(z=>{let O=new Set(x),j=Object.fromEntries(Object.entries(z).filter(([I])=>O.has(I)));return tu(z,j)?z:j});},[x,k]);let C=ti(a,eu,p.current),S=c==="dense",E=(Number.isFinite(s)&&Number(s)>0?ei(Math.round(Number(s)),1,24):void 0)||uh({containerWidth:h,itemCount:e.length,targetColumnWidth:C,gap:i}),R=h>0?(h-i*Math.max(E-1,0))/E:C,F=st.useMemo(()=>e.map((z,O)=>{let j=x[O],I=typeof n=="function"?n(z,{columnCount:E,columnWidth:R,containerWidth:h,gap:i,placementStrategy:c,rowHeight:m})||{}:{};return {key:j,item:z,size:I,columnSpan:mh({size:I,columnWidth:R,columnCount:E,gap:i}),rowSpan:ph({size:I,measuredHeight:v[j],rowHeight:m,gap:i})}}),[E,h,i,n,x,e,v,c,R,m]);dh(()=>{let z={};f.current.forEach((O,j)=>{let I=Math.ceil(O.getBoundingClientRect().height);Number.isFinite(I)&&I>0&&(z[j]=I);}),w(O=>{if(!Object.keys(z).length)return O;let j={...O,...z};return tu(O,j)?O:j});},[E,S,k,R]),st.useEffect(()=>{if(typeof ResizeObserver!="function")return;let z=new ResizeObserver(O=>{w(j=>{let I={...j},V=false;for(let $ of O){let N=$.target.dataset.masonryKey;if(!N)continue;let D=Math.ceil($.contentRect.height);!Number.isFinite(D)||D<=0||I[N]===D||(I[N]=D,V=true);}return V?I:j});});return b.current=z,f.current.forEach(O=>z.observe(O)),()=>{z.disconnect(),b.current=null;}},[S,k]);let _=r((z,O)=>{let j=f.current,I=j.get(z);if(I&&I!==O&&b.current&&b.current.unobserve(I),!O){j.delete(z);return}O.dataset.masonryKey=z,j.set(z,O),b.current&&b.current.observe(O);},"registerItemNode");if(!S){let z=(()=>{let O=Array.from({length:E},()=>0),j=0,I=0,V=F.map(({key:$,item:N,columnSpan:D,rowSpan:M,size:K})=>{let J=ei(D,1,E),G=j;if(c==="shortest"){let de=Number.POSITIVE_INFINITY;for(let W=0;W<=E-J;W+=1){let pe=Math.max(...O.slice(W,W+J));pe<de&&(de=pe,G=W);}}else G+J>E&&(G=0),G=Math.min(G,E-J);let te=R*J+i*Math.max(J-1,0),U=gh({size:K,measuredHeight:v[$]}),Z=Math.max(...O.slice(G,G+J)),ae=G*(R+i),ie=Z+U;for(let de=G;de<G+J;de+=1)O[de]=ie+i;return I=Math.max(I,ie),c!=="shortest"&&(j=G+J,j>=E&&(j=0)),{key:$,item:N,columnSpan:J,itemHeight:U,itemWidth:te,left:ae,rowSpan:M,size:K,top:Z}});return {containerHeight:Math.max(0,I),positionedItems:V}})();return jsxRuntime.jsx("div",{ref:p,...d,className:l("relative w-full",u,d?.className),style:{...d?.style,height:`${z.containerHeight}px`},children:z.positionedItems.map(({key:O,item:j,columnSpan:I,rowSpan:V,size:$,itemWidth:N,left:D,top:M})=>{let K=h<=0&&E===1,J=K?"100%":`${N}px`,G={columnCount:E,columnSpan:I,columnWidth:R,containerWidth:h,gap:i,itemWidth:N,placementStrategy:c,rowSpan:V,rowHeight:m,size:$},te=g?.(j,G);return jsxRuntime.jsx("div",{...te,className:l("absolute min-w-0",te?.className),style:{...te?.style,left:K?0:`${D}px`,top:`${M}px`,width:J,maxWidth:J},children:jsxRuntime.jsx("div",{ref:U=>_(O,U),role:"presentation",className:"min-w-0",children:t(j,G)})},O)})})}return jsxRuntime.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:F.map(({key:z,item:O,columnSpan:j,rowSpan:I,size:V})=>{let $={columnCount:E,columnSpan:j,columnWidth:R,containerWidth:h,gap:i,placementStrategy:c,rowSpan:I,rowHeight:m,size:V},N=g?.(O,$);return jsxRuntime.jsx("div",{...N,className:l("min-w-0",N?.className),style:{...N?.style,gridColumn:`span ${j}`,gridRow:`span ${I}`},children:jsxRuntime.jsx("div",{ref:D=>_(z,D),role:"presentation",className:"min-w-0",children:t(O,$)})},z)})})}r(Ar,"WorkbenchMasonryLayout");var fh=12,yh=[1],hh=[4/3],xh=[1,4/5,3/2,3/4,5/4],vh=.5,kh=2,wh="hsl(var(--monkeys-color-muted, var(--muted)))";function oi(e,t,o){return Math.min(Math.max(e,t),o)}r(oi,"clamp");function _s(e,t,o){return typeof e!="number"||!Number.isFinite(e)||e<=0?t:oi(Math.round(e),1,o)}r(_s,"normalizeCount");function Ch(e){return e==="masonry"||e==="dense"?xh:e==="rail"?hh:yh}r(Ch,"getDefaultAspectRatios");function Sh(e,t){let o=t?.filter(n=>typeof n=="number"&&Number.isFinite(n)&&n>0).map(n=>oi(n,vh,kh));return o?.length?o:Ch(e)}r(Sh,"resolveAspectRatios");function ru(e){return _s(e?.count,fh,48)}r(ru,"resolveWorkbenchCollectionSkeletonCapacity");function au(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(au,"resolveWorkbenchCollectionLoadingVariant");function Th({columnCount:e,config:t,phase:o}){if(o==="initial"){let a=oi(e*2,6,24);return _s(t?.count,a,48)}let n=oi(e,1,12);return _s(t?.loadMoreCount,n,24)}r(Th,"resolveSkeletonCount");function nu(e,t){return Math.max(1,e/t)}r(nu,"getSkeletonHeight");function js({mode:e,phase:t,columnCount:o,columnWidth:n,cardWidth:a,gap:s,rowHeight:i,config:m,ariaLabel:c,className:d}){let g=Th({columnCount:o,config:m,phase:t}),u=Sh(e,m?.aspectRatios),p=m?.animated??true,f=st.useMemo(()=>Array.from({length:g},(h,y)=>({aspectRatio:u[y%u.length],key:`${t}-${y}`,index:y})),[u,g,t]),b=r((h,y)=>jsxRuntime.jsx(Tn,{index:h.index,children:jsxRuntime.jsx(Dt,{variant:"block",animated:p,className:"h-auto w-full rounded-lg",style:{backgroundColor:wh,...y??{aspectRatio:String(h.aspectRatio)}},"data-collection-skeleton-item":"","data-skeleton-aspect-ratio":h.aspectRatio})}),"renderSkeleton");return jsxRuntime.jsx(Ho,{animation:m?.animation,animated:p,children:jsxRuntime.jsx("div",{role:"status","aria-label":c,"aria-atomic":"true","data-collection-loading":t,"data-layout-mode":e,className:"min-w-0",children:e==="masonry"||e==="dense"?jsxRuntime.jsx(Ar,{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:nu(y.columnWidth,h.aspectRatio)}),renderItem:(h,y)=>b(h,{height:`${nu(y.columnWidth,h.aspectRatio)}px`})}):e==="rail"?jsxRuntime.jsx("div",{"aria-hidden":"true",className:l("grid min-w-0 grid-flow-col items-start overflow-x-auto",d),style:{gap:s,gridAutoColumns:typeof a=="number"?`${a}px`:a??`${n}px`},children:f.map(h=>jsxRuntime.jsx("div",{children:b(h)},h.key))}):jsxRuntime.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=>jsxRuntime.jsx("div",{children:b(h)},h.key))})})})}r(js,"WorkbenchCollectionSkeleton");function Nh(e,t){if(e.size!==t.size)return false;for(let o of e)if(!t.has(o))return false;return true}r(Nh,"setsEqual");function Ih(e){return String(e)}r(Ih,"getComparableKey");function Mh(e){return e==="multiple"?"toggle":"replace"}r(Mh,"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]=st.useState(()=>new Set(s??[])),u=st.useRef(null),p=st.useRef(m);p.current=m;let f=st.useMemo(()=>{let k=new Map;return e.map((C,S)=>{let T=t(C,S),E=Ih(T),R=k.get(E);if(R!==void 0)throw new TypeError(`useWorkbenchCollectionSelection received duplicate item key "${E}" at indices ${R} and ${S}.`);return k.set(E,S),{item:C,index:S,key:T}})},[t,e]),b=st.useMemo(()=>{let k=new Map;return f.forEach(C=>k.set(C.key,C)),k},[f]),h=st.useMemo(()=>o==="none"?new Set:c?new Set(a??[]):d,[c,a,d,o]),y=st.useRef(h);y.current=h;let v=st.useCallback(()=>{u.current=null;},[]);st.useEffect(()=>{if(c)return;let k=new Set(f.map(({key:C})=>C));g(C=>{let S=new Set(Array.from(C).filter(T=>k.has(T)));return Nh(C,S)?C:(y.current=S,S)});},[c,f]),st.useEffect(()=>{let k=u.current;if(o!=="multiple"||h.size===0||k===null){v();return}let C=b.get(k);(!C||i?.(C.item,C.index))&&v();},[i,b,o,v,h.size]);let w=st.useCallback((k,C={})=>{if(o==="none")return;let S=b.get(k);if(!S||i?.(S.item,S.index))return;let T=new Set(y.current),E=n??Mh(o),R=C.shiftKey&&o==="multiple"?"range":C.behavior??E;o==="single"&&(R=R==="toggle"?"toggle":"replace");let F=u.current===null?void 0:b.get(u.current),_=!!(F&&!i?.(F.item,F.index));o==="multiple"&&R==="range"&&!_&&(R=E==="range"?"toggle":E);let z=new Set;if(o==="single")R==="toggle"&&T.has(S.key)||z.add(S.key);else if(R==="range"&&F){T.forEach(I=>z.add(I));let O=Math.min(F.index,S.index),j=Math.max(F.index,S.index);f.slice(O,j+1).forEach(I=>{i?.(I.item,I.index)||z.add(I.key);});}else R==="replace"?z.add(S.key):(T.forEach(O=>z.add(O)),z.has(S.key)?z.delete(S.key):z.add(S.key));u.current=o==="multiple"?S.key:null,c||(y.current=z,g(z)),p.current?.(z,{item:S.item,index:S.index,key:S.key,behavior:R});},[n,c,i,b,o,f]),x=st.useCallback(k=>h.has(k),[h]);return {mode:o,selectedKeys:h,isSelected:x,selectKey:w,resetAnchor:v}}r(qs,"useWorkbenchCollectionSelection");var Xs=12,Eh=8,ri=280,Dh=640,Wh=1024,cu=24;function ai(e,t,o){return Math.min(Math.max(e,t),o)}r(ai,"clamp");function oo(e,t){return typeof e=="function"?e(t):e}r(oo,"resolveRenderableSlot");function zn(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(zn,"resolveLengthToPixels");function ni(e){if(!(typeof e!="number"||!Number.isFinite(e)||e<=0))return ai(Math.round(e),1,cu)}r(ni,"normalizeColumns");function su(e,t){if(e==="auto"||e===void 0)return;if(typeof e=="number")return ni(e);let o=ni(e.mobile),n=ni(e.tablet),a=ni(e.desktop);return t>=Wh?a??n??o:t>=Dh?n??o??a:o??n??a}r(su,"resolveResponsiveColumns");function Lh({containerWidth:e,itemCount:t,gap:o,columns:n,underfilledBehavior:a,maxColumns:s,minCardWidth:i,idealCardWidth:m,maxCardWidth:c,node:d}){let g=su(n,e),u=su(s,e);if(g)return u?Math.min(g,u):g;if(!e)return 1;let p=zn(m,ri,d),f=zn(i,p*.78,d),b=Math.max(f,zn(c,p*1.35,d)),h=Math.max(t,1),y=Math.max(1,Math.min(a==="preserve-columns"?cu:h,Math.ceil((e+o)/(Math.max(f*.75,1)+o)))),v=1,w=Number.POSITIVE_INFINITY;for(let x=1;x<=y;x+=1){let k=(e-o*Math.max(x-1,0))/x;if(!Number.isFinite(k)||k<=0)continue;let C=Math.abs(k-p)+Math.max(0,f-k)*3+Math.max(0,k-b)*2;C<w&&(w=C,v=x);}return u?Math.min(v,u):v}r(Lh,"resolveColumnCount");function lu(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0?e:Xs}r(lu,"normalizeGap");function Ah(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?e:Eh}r(Ah,"normalizeRowHeight");function zh(e){return typeof e=="number"&&Number.isFinite(e)?ai(e,0,1):0}r(zh,"normalizeThreshold");function Oh(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(Oh,"normalizeItemSize");function Fh(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(Fh,"getDefaultItemKey");function Hh(e){return `@inf-monkeys-tech/monkeys-design:workbench-collection:${e}`}r(Hh,"getScrollStorageKey");function Vh(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(Vh,"getParentScrollOwner");function du(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(du,"isInteractiveEventTarget");function Gh(e){if(!(!Number.isFinite(e)||Number(e)<=0))return ai(Math.round(Number(e)),1,12)}r(Gh,"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=xt().workbench.collection,u=Co(),p=nn(),f=st.useId().replace(/:/g,""),b=st.useRef(null),h=st.useRef(null),y=st.useRef(null),v=st.useRef(null),w=st.useRef(false),x=st.useRef(false),k=st.useRef(false),C=st.useRef(false),S=st.useRef(null),T=st.useRef(null),E=st.useRef(void 0),R=st.useRef(false),[F,_]=st.useState(0),[z,O]=st.useState(Xs),[j,I]=st.useState(null),V=st.useRef(a);V.current=a;let $=st.useCallback(Q=>{y.current=Q,I(Q);},[]),N=t.layout.mode;if(N!=="grid"&&N!=="masonry"&&N!=="dense"&&N!=="rail")throw new TypeError(`WorkbenchCollection layout.mode "${String(N)}" is not supported.`);let D=t.layout.gap===void 0?z:lu(t.layout.gap),M=Ah(t.layout.rowHeight),K=t.getItemKey??Fh,J=st.useMemo(()=>e.map((Q,me)=>{let Be=K(Q,me);return {item:Q,index:me,key:Be,stringKey:String(Be)}}),[K,e]),G=J.map(({stringKey:Q})=>Q).join(""),te=t.state,U=te?.loading===true,Z=te?.loadingMore===true,ae=te?.hasMore===true,ie=au(t.loading?.variant),de=U&&J.length===0&&ie==="skeleton"?ru(t.loading?.skeleton):J.length,W=t.selection?.mode??"none",pe=st.useCallback(Q=>t.selection?.isItemDisabled?.(Q.item,Q.index)??false,[t.selection?.isItemDisabled]),B=st.useCallback(Q=>Q.key,[]),H=st.useCallback((Q,me)=>{V.current?.onSelectionChange?.(Q,{item:me.item.item,key:me.key,behavior:me.behavior});},[]),{selectedKeys:ne,selectKey:fe}=qs({items:J,getItemKey:B,mode:W,behavior:t.selection?.behavior,selectedKeys:t.selection?.selectedKeys,defaultSelectedKeys:t.selection?.defaultSelectedKeys,isItemDisabled:pe,onSelectionChange:H});st.useEffect(()=>{let Q=j;if(!Q)return;let me=r(()=>{if(t.layout.gap===void 0&&b.current){let he=Number.parseFloat(window.getComputedStyle(b.current).columnGap);O(Number.isFinite(he)&&he>=0?he:Xs);}let Be=Q.clientWidth;_(he=>he===Be?he:Be);},"updateWidth");if(me(),typeof ResizeObserver=="function"){let Be=new ResizeObserver(me);return Be.observe(Q),()=>Be.disconnect()}if(!(typeof window>"u"))return window.addEventListener("resize",me),()=>window.removeEventListener("resize",me)},[j,t.layout.gap,m?.gap,p]);let ye=Lh({containerWidth:F,itemCount:de,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=F>0?Math.max(0,(F-D*Math.max(ye-1,0))/ye):zn(t.layout.cardWidth??t.layout.columnWidth??t.layout.idealCardWidth,ri,y.current),oe=t.layout.placementStrategy??(N==="dense"?"dense":N==="masonry"?"shortest":"shelf"),le=st.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=st.useMemo(()=>{let Q=t.virtualization;return Q?.enabled!==true||Q.fallback!=="error"?null:Q.adapter?Q.adapter.supports?.(N)===false?new Error(`WorkbenchCollection virtualization adapter does not support mode "${N}".`):null:new Error("WorkbenchCollection virtualization requires an adapter.")},[t.virtualization,N]),Ie=st.useMemo(()=>({mode:N,columnCount:ye,columnWidth:xe,containerWidth:F,gap:D,itemCount:J.length}),[ye,xe,F,D,N,J.length]);st.useEffect(()=>{V.current?.onLayoutChange?.(Ie),F>0&&!R.current&&(R.current=true,V.current?.onLayoutReady?.(Ie));},[Ie,F]),st.useEffect(()=>{R.current=false;},[N]);let We=st.useCallback(()=>{let Q=t.layout.scrollOwner;return Q&&Q!=="self"&&Q!=="parent"?Q:N==="rail"?h.current:Q==="parent"?Vh(b.current):b.current},[t.layout.scrollOwner,N]);st.useEffect(()=>{let Q=t.scrollRestorationKey?.trim();if(!Q||typeof window>"u")return;let me=We();if(!me)return;let Be=Hh(Q);try{let ee=Number.parseFloat(window.sessionStorage.getItem(Be)??"");Number.isFinite(ee)&&ee>=0&&(me.scrollTop=ee);}catch{}let he=r(()=>{try{window.sessionStorage.setItem(Be,String(me.scrollTop));}catch{}},"saveScrollPosition");return me.addEventListener("scroll",he,{passive:true}),()=>{he(),me.removeEventListener("scroll",he);}},[t.scrollRestorationKey,We]);let ue=typeof a?.onLoadMore=="function",q=te?.error??Re;st.useEffect(()=>{(!ue||!ae)&&(x.current=false,k.current=false,C.current=false);},[ue,ae]);let L=st.useCallback(()=>{if(!ue||!ae||Z||w.current)return;w.current=true;let Q=r(()=>{w.current=false;},"releaseRequest");try{let me=V.current?.onLoadMore?.();me&&typeof me.then=="function"?me.then(Q,Q):Q();}catch(me){throw Q(),me}},[ue,ae,Z]);st.useEffect(()=>{let Q=v.current;if((S.current!==Q||T.current!==G||E.current!==t.loading?.pageKey)&&(S.current=Q,T.current=G,E.current=t.loading?.pageKey,x.current=false,k.current=false,C.current=false),!Q||!ue||!ae||typeof IntersectionObserver!="function")return;let me=We(),Be=false,he=true,ee=new IntersectionObserver(Ze=>{if(!he)return;let kt=Ze.some(Yn=>Yn.isIntersecting);if(!(kt&&(Z||w.current))){if(C.current){if(Be=true,C.current=false,x.current=kt,!kt){k.current=false;return}if(k.current)return;k.current=true,L();return}if(!Be){Be=true,x.current=kt,kt||(k.current=false),kt&&t.loading?.autoFill&&!k.current&&(k.current=true,L());return}if(!kt){x.current=false,k.current=false;return}x.current||(x.current=true,k.current=true,L());}},{root:me===b.current?me:me||null,rootMargin:t.loading?.rootMargin??"240px",threshold:zh(t.loading?.threshold)}),Te=me??(typeof window>"u"?null:window),Ke=r(()=>{!x.current||k.current||C.current||(C.current=true,ee.unobserve(Q),ee.takeRecords(),ee.observe(Q));},"validateActiveIntersection");return ee.observe(Q),Te?.addEventListener("scroll",Ke,{passive:true}),()=>{he=false,ee.disconnect(),Te?.removeEventListener("scroll",Ke);}},[ue,t.loading?.autoFill,t.loading?.pageKey,t.loading?.rootMargin,t.loading?.threshold,ae,G,Z,J.length,L,We]),st.useEffect(()=>{if(!t.loading?.autoFill||!ue||!ae||Z||k.current||w.current||!v.current)return;let me=We()??(t.layout.scrollOwner==="parent"?b.current?.parentElement??null:null)??b.current;if(!me)return;let Be=N==="rail"?me.clientWidth:me.clientHeight,he=N==="rail"?me.scrollWidth:me.scrollHeight;Be<=0||he<=Be+1&&(k.current=true,L());},[ue,t.layout.scrollOwner,t.loading?.autoFill,t.loading?.pageKey,ae,G,Z,J.length,L,We,N]);let X=st.useMemo(()=>{if(!t.grouping)return [{key:"__all__",stringKey:"__all__",items:J}];let Q=new Map;return J.forEach(me=>{let Be=t.grouping?.getGroupKey(me.item,me.index)??"__all__",he=String(Be),ee=Q.get(he);if(ee){ee.items.push(me);return}Q.set(he,{key:Be,stringKey:he,label:t.grouping?.getGroupLabel?.(Be,me.item),items:[me]});}),Array.from(Q.values())},[t.grouping,J]),se=st.useCallback((Q,me)=>{let Be=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:Be,selected:ne.has(Q.key),selectionMode:W,layout:me,select:r(ee=>fe(Q.key,{behavior:ee}),"select"),selectFromEvent:r((ee,Te)=>fe(Q.key,{behavior:Te,shiftKey:ee.shiftKey}),"selectFromEvent"),preview:r(()=>a?.onItemPreview?.(Q.item,he),"preview"),detail:r(()=>a?.onItemDetail?.(Q.item,he),"detail"),renderSlot:r(ee=>n?.item?.[ee]?.(Q.item,he),"renderSlot"),notifyMediaLoad:r(()=>a?.onMediaLoad?.(Q.item,he),"notifyMediaLoad"),notifyMediaError:r(ee=>a?.onMediaError?.(Q.item,he,ee),"notifyMediaError")};return he},[a,t.getItemStatus,t.selection,ne,fe,W,n?.item]),Y=st.useCallback((Q,me)=>{let Be=r(he=>{he.target!==he.currentTarget||he.key!=="Enter"&&he.key!==" "||(he.preventDefault(),W!=="none"?me.selectFromEvent(he):a?.onItemClick?.(Q.item,me,he));},"handleKeyboard");return {id:`${f}-item-${Q.index}`,"data-monkeys-collection-item":"","data-item-key":Q.stringKey,"data-selected":me.selected||void 0,"data-disabled":me.disabled||void 0,"data-status":me.status,role:W==="none"?"listitem":"option","aria-selected":W==="none"?void 0:me.selected,"aria-disabled":me.disabled||void 0,tabIndex:a?.onItemClick||W!=="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"&&me.selected&&"ring-2 ring-primary",t.appearance?.selection==="outline"&&me.selected&&"outline outline-2 outline-primary",i?.item),onClick:r(he=>{du(he.target,he.currentTarget)||(W!=="none"&&me.selectFromEvent(he),a?.onItemClick?.(Q.item,me,he));},"onClick"),onDoubleClick:r(he=>{du(he.target,he.currentTarget)||a?.onItemDoubleClick?.(Q.item,me,he);},"onDoubleClick"),onMouseEnter:r(he=>a?.onItemHoverChange?.(Q.item,me,true,he),"onMouseEnter"),onMouseLeave:r(he=>a?.onItemHoverChange?.(Q.item,me,false,he),"onMouseLeave"),onKeyDown:Be,onDragStart:r(he=>a?.onItemDragStart?.(Q.item,me,he),"onDragStart"),onDragOver:a?.onItemDrop?he=>he.preventDefault():void 0,onDrop:r(he=>a?.onItemDrop?.(Q.item,me,he),"onDrop")}},[a,i?.item,f,t.appearance,t.item?.title?.visibility,W]),ce=st.useCallback((Q,me)=>{let Be=o(Q.item,me),he=t.item?.title,ee=he?.visibility??"always",Te=he&&ee!=="never"?he.getContent?.(Q.item,me)??me.renderSlot("title"):null,Ke=!!(he&&A(Te)),Ze=he?.placement??"below",kt=Ke&&Ze.startsWith("overlay-"),Yn=Gh(he?.maxLines),Xr=he?.surface??(kt?"scrim":"none"),Il=Ke?jsxRuntime.jsx("div",{"data-collection-item-title":"","data-title-placement":Ze,"data-title-visibility":ee,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",ee==="hover"&&"!opacity-0 transition-opacity group-hover/workbench-collection-item:!opacity-100 group-focus-within/workbench-collection-item:!opacity-100",kt&&"pointer-events-none absolute inset-x-0 z-10 px-3 py-2",Ze==="overlay-top"&&"top-0",Ze==="overlay-center"&&"top-1/2 -translate-y-1/2 motion-reduce:transform-none",Ze==="overlay-bottom"&&"bottom-0",Xr==="surface"&&"bg-background/90 backdrop-blur-sm",Xr==="scrim"&&Ze==="overlay-top"&&"bg-gradient-to-b from-background/90 to-transparent pb-8",Xr==="scrim"&&Ze==="overlay-bottom"&&"bg-gradient-to-t from-background/90 to-transparent pt-8",Xr==="scrim"&&Ze==="overlay-center"&&"bg-background/75 backdrop-blur-sm",!!Yn&&"overflow-hidden [display:-webkit-box] [-webkit-box-orient:vertical]",i?.itemTitle),style:Yn?{WebkitLineClamp:Yn}:void 0,children:Te}):null,Yt=t.item?.actions,Ii=Yt?.visibility??"always",Ml=Yt&&Ii!=="never"?me.renderSlot("actions"):null,Mi=!!(Yt&&A(Ml)),wn=Yt?.placement??"overlay-bottom",Bi=Mi&&wn.startsWith("overlay-"),Bl=Mi?jsxRuntime.jsx("div",{"data-collection-item-actions":"","data-actions-placement":wn,"data-actions-align":Yt?.align??"center","data-actions-visibility":Ii,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",Ii==="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",Bi&&"pointer-events-none absolute inset-x-0 z-20",wn==="overlay-top"&&"top-1",wn==="overlay-bottom"&&"bottom-1",i?.itemActions),children:jsxRuntime.jsx("div",{className:l("pointer-events-auto flex items-center gap-2",Yt?.wrap!==false&&"flex-wrap"),children:Ml})}):null;return !Ke&&!Mi?Be:jsxRuntime.jsxs("div",{className:l("min-w-0",(kt||Bi)&&"relative",i?.itemContent),"data-collection-item-content":"",children:[Ze==="above"?Il:null,wn==="above"?Bl:null,Be,Ze==="below"||kt?Il:null,wn==="below"||Bi?Bl:null]})},[i?.itemActions,i?.itemContent,i?.itemTitle,t.item,o]),ke=st.useCallback((Q,me,Be=true)=>{let he=se(Q,me),ee=ce(Q,he);return Be?jsxRuntime.jsx("div",{...Y(Q,he),children:ee}):ee},[se,Y,ce]),we=st.useMemo(()=>({mode:N,columnCount:ye,columnWidth:xe,containerWidth:F,gap:D,placementStrategy:oe,rowHeight:M}),[ye,xe,F,D,N,oe,M]),Me=r(Q=>{if(t.windowed&&N!=="dense"){let ee=Q===X[X.length-1];return jsxRuntime.jsx(Xc,{items:Q.items,getKey:Te=>Te.stringKey,layout:we,cardWidth:zn(t.layout.cardWidth,ri,b.current),getScrollOwner:We,railRef:N==="rail"&&ee?h:void 0,tailRef:N==="rail"&&ee?v:void 0,estimateHeight:(Te,Ke)=>{let Ze=t.layout.getItemSize?.(Te.item,{...we,columnWidth:Ke}),kt=t.layout.getItemAspectRatio?.(Te.item,Te.index);return zn(Ze?.height,kt&&kt>0?Ke/kt:300,b.current)},containerProps:{role:W==="none"?"list":"listbox","aria-label":c??le.collection,"aria-multiselectable":W==="multiple"||void 0,className:i?.layout},getItemProps:(Te,Ke)=>Y(Te,se(Te,Ke)),renderItem:(Te,Ke)=>ke(Te,Ke,false)})}let me=t.virtualization,Be=me?.adapter,he=me?.enabled===true;if(he&&(!Be||Be.supports?.(N)===false)&&me?.fallback==="error")return null;if(he&&Be&&Be.supports?.(N)!==false)return Be.render({items:Q.items.map(({item:ee})=>ee),keys:Q.items.map(({key:ee})=>ee),layout:t.layout,scrollOwner:We(),renderItem:r((ee,Te,Ke)=>{let Ze=Q.items[Te];return Ze?jsxRuntime.jsx(st.Fragment,{children:ke(Ze,Ke)},Ze.stringKey):null},"renderItem")});if(N==="masonry"||N==="dense")return jsxRuntime.jsx(Ar,{items:Q.items,columnCount:ye,columnWidth:t.layout.cardWidth??t.layout.columnWidth??t.layout.idealCardWidth,gap:D,rowHeight:M,placementStrategy:N==="dense"?"dense":oe,className:i?.layout,containerProps:{role:W==="none"?"list":"listbox","aria-label":c??le.collection,"aria-multiselectable":W==="multiple"||void 0},getItemProps:(ee,Te)=>{let Ke=se(ee,{...Te,mode:N});return Y(ee,Ke)},getItemKey:ee=>ee.key,getItemSize:(ee,Te)=>{let Ke={...Te,mode:N},Ze=t.layout.getItemSize?.(ee.item,Ke),kt=t.layout.getItemAspectRatio?.(ee.item,ee.index);return Oh(Ze,kt,Te.columnWidth)},renderItem:(ee,Te)=>ke(ee,{...Te,mode:N},false)});if(N==="rail"){let ee=t.layout.cardWidth??t.layout.idealCardWidth??ri,Te=Q===X[X.length-1];return jsxRuntime.jsx("div",{ref:Te?h:void 0,role:W==="none"?"list":"listbox","aria-label":c??le.collection,"aria-multiselectable":W==="multiple"||void 0,className:l("grid min-w-0 grid-flow-col items-start overflow-x-auto",i?.layout),style:{gap:D,gridAutoColumns:typeof ee=="number"?`${ee}px`:ee},children:Q.items.map((Ke,Ze)=>jsxRuntime.jsx("div",{ref:Te&&Ze===Q.items.length-1?v:void 0,className:"min-w-0",children:ke(Ke,we)},Ke.stringKey))})}return jsxRuntime.jsx("div",{role:W==="none"?"list":"listbox","aria-label":c??le.collection,"aria-multiselectable":W==="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(ee=>{let Te=t.layout.getItemSize?.(ee.item,we),Ke=ai(Math.round(Number(Te?.columnSpan)||1),1,ye),Ze=t.layout.getItemAspectRatio?.(ee.item,ee.index);return jsxRuntime.jsx("div",{...Y(ee,se(ee,{...we,columnSpan:Ke,size:Te})),style:{gridColumn:Ke>1?`span ${Ke}`:void 0,aspectRatio:Number.isFinite(Ze)&&Number(Ze)>0?String(Ze):void 0},children:ke(ee,{...we,columnSpan:Ke,size:Te},false)},ee.stringKey)})})},"renderGroupItems"),Pe={items:e,error:q,loading:U,loadingMore:Z,selectedKeys:ne,retry:r(()=>a?.onRetry?.(),"retry")},Ve=oo(n?.header,Pe),Xe=oo(n?.toolbar,Pe),Oe=ne.size>0?oo(n?.selectionToolbar,Pe):null,pt=oo(n?.beforeItems,Pe),Ae=oo(n?.footer,Pe),Le=te?.permission===true,re=te?.offline===true&&!Le,Ce=U&&e.length===0&&!Le&&!re,Fe=!!q&&e.length===0&&!Le&&!re&&!Ce,qe=!Le&&!re&&!Ce&&!Fe&&(te?.empty===true||e.length===0),nt=oo(n?.loading,Pe),gt=oo(n?.error,Pe),Bt=oo(n?.permission,Pe),_e=oo(n?.offline,Pe),zt=oo(n?.empty,Pe),Ot=oo(n?.loadMore,Pe),ge=t.layout.scrollOwner==="self"||t.layout.scrollOwner===void 0&&(t.layout.fillHeight||t.layout.maxHeight),He={...m,gap:t.layout.gap===void 0?m?.gap??"var(--monkeys-bento-gap, var(--global-spacing, 0.75rem))":lu(t.layout.gap),padding:t.layout.padding??m?.padding,height:t.layout.fillHeight?"100%":m?.height,maxHeight:t.layout.maxHeight??m?.maxHeight,overflow:ge?"auto":m?.overflow};return jsxRuntime.jsxs("section",{ref:b,...d,"data-monkeys-component":"workbench-collection","data-layout-mode":N,"data-density":t.appearance?.density,"data-radius":t.appearance?.radius,"data-media-fit":t.appearance?.mediaFit,"data-hover-effect":t.appearance?.hover,"aria-label":c??le.collection,"aria-busy":U||Z||void 0,className:l("min-h-0 min-w-0",t.layout.fillHeight&&"h-full",i?.root,s),style:He,children:[A(Ve)?jsxRuntime.jsx("div",{className:i?.header,children:Ve}):null,A(Xe)?jsxRuntime.jsx("div",{className:i?.toolbar,children:Xe}):null,A(Oe)?jsxRuntime.jsx("div",{className:i?.selectionToolbar,children:Oe}):null,A(pt)?jsxRuntime.jsx("div",{className:i?.beforeItems,children:pt}):null,Le?A(Bt)?Bt:jsxRuntime.jsx(pr,{kind:"permission",title:le.permission,actions:u.permission?.showRequestAccess!==false&&a?.onRequestAccess?jsxRuntime.jsx(ve,{size:"sm",label:le.requestAccess,onClick:a.onRequestAccess}):void 0}):re?A(_e)?_e:jsxRuntime.jsx(pr,{kind:"offline",title:le.offline,actions:u.error?.showRetry!==false&&a?.onRetry?jsxRuntime.jsx(ve,{size:"sm",label:le.retry,onClick:a.onRetry}):void 0}):Ce?A(nt)?nt:ie==="spinner"?jsxRuntime.jsx(jo,{title:le.loading,variant:"spinner"}):jsxRuntime.jsx("div",{ref:$,className:l("min-w-0",i?.items),children:jsxRuntime.jsx(js,{mode:N,phase:"initial",columnCount:ye,columnWidth:xe,cardWidth:t.layout.cardWidth??t.layout.idealCardWidth,gap:D,rowHeight:M,config:t.loading?.skeleton,ariaLabel:le.loading,className:i?.layout})}):Fe?A(gt)?gt:jsxRuntime.jsx(pr,{kind:"error",title:le.loadError,actions:u.error?.showRetry!==false&&a?.onRetry?jsxRuntime.jsx(ve,{size:"sm",label:le.retry,onClick:a.onRetry}):void 0}):qe?A(zt)?zt:jsxRuntime.jsx(fa,{title:le.empty}):jsxRuntime.jsx("div",{ref:$,className:l("min-w-0",i?.items),children:X.map((Q,me)=>{let Be={key:Q.key,label:Q.label,items:Q.items.map(({item:Te})=>Te),groupIndex:me},he=t.grouping?n?.groupHeading?.(Be,Pe)??Q.label:null,ee=`${f}-group-${me}`;return jsxRuntime.jsxs("div",{"data-collection-group":Q.stringKey,className:i?.group,children:[A(he)?jsxRuntime.jsx("div",{id:ee,role:"heading","aria-level":2,className:i?.groupHeading,children:he}):null,Me(Q)]},Q.stringKey)})}),e.length>0&&q?jsxRuntime.jsx("div",{className:i?.status,children:A(gt)?gt:jsxRuntime.jsx(pr,{kind:"error",title:le.refreshError,actions:u.error?.showRetry!==false&&a?.onRetry?jsxRuntime.jsx(ve,{size:"sm",label:le.retry,onClick:a.onRetry}):void 0})}):null,e.length>0&&(ae||Z)?jsxRuntime.jsx("div",{ref:N==="rail"?void 0:v,className:i?.loadMore,"data-collection-load-more":"",children:A(Ot)?Ot:Z?ie==="spinner"?jsxRuntime.jsx(jo,{title:le.loadingMore,variant:"spinner"}):jsxRuntime.jsx(js,{mode:N,phase:"load-more",columnCount:ye,columnWidth:xe,cardWidth:t.layout.cardWidth??t.layout.idealCardWidth,gap:D,rowHeight:M,config:t.loading?.skeleton,ariaLabel:le.loadingMore,className:i?.layout}):null}):null,A(Ae)?jsxRuntime.jsx("div",{className:i?.footer,children:Ae}):null]})}r(Xo,"WorkbenchCollection");function $h(e){if(typeof e=="number"&&Number.isFinite(e)&&e>0)return `${e}px`;if(typeof e=="string"&&e.trim())return e.trim()}r($h,"getNormalizedGalleryGridCardWidth");function Kh(e){return e==="compact"?2:e==="detailed"?6:4}r(Kh,"getDefaultGalleryDetailLimit");function Uh(e,t){return e===1||e===2||e===3?Number(e):t==="detailed"?1:2}r(Uh,"getNormalizedGalleryBentoColumns");function qh({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:Kh(e)}r(qh,"getNormalizedGalleryDetailLimit");function uu(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(uu,"getGalleryCardWidthMetrics");function Yh(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(Yh,"getNormalizedGalleryGridColumns");function mu(e){if(e==null)return 0;let t=String(e).trim();return t&&t!=="\u2014"?t.length:0}r(mu,"getGalleryTextLength");function zr({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(zr,"getGalleryFieldText");function Zs({text:e,charsPerLine:t,maxLines:o}){let n=mu(e);return n?Math.max(1,Math.min(o,Math.ceil(n/t))):0}r(Zs,"estimateLineCount");function Jh({text:e,density:t,bentoColumns:o}){let n=t==="detailed"?54:t==="compact"?44:48,i=Zs({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(Jh,"estimateGalleryDetailCellHeight");function Xh({columns:e,density:t,bentoColumns:o}){if(!e.length)return 0;let n=e.map(s=>Jh({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(Xh,"estimateGalleryDetailGridHeight");function Zh({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:w,resolveRecordVisual:x}){let k=t.find(W=>W.renderType==="icon"),C=k&&x?x(e?.[k.key],e,k):null,T=(o!=="auto"?t.find(W=>W.key===o&&c(W,e)):null)||t.find(W=>c(W,e))||null,E=T?m(T,e):null,R=T?p(T,E):false,F=T?f(T,E):false,z=!!y||!!C,O=t.filter(W=>W.key!==T?.key&&W.renderType!=="icon"),I=O.filter(W=>{if(!W||c(W,e)||!d(W,e))return false;let pe=m(W,e);return !(pe==null||pe==="")})[0]||null,V=I?zr({column:I,row:e,getFieldValue:m,getDisplayText:u}):String(u(e?.linkKey||e?.id||"")),$=O.find(W=>!W||W.key===I?.key||c(W,e)||!g(W,e)?false:zr({column:W,row:e,getFieldValue:m,getDisplayText:u}).length>12)||O.find(W=>!W||W.key===I?.key||c(W,e)||!g(W,e)?false:mu(zr({column:W,row:e,getFieldValue:m,getDisplayText:u}))>0)||null,N=$?zr({column:$,row:e,getFieldValue:m,getDisplayText:u}):"",D=new Set(v),M=O.filter(W=>W.key!==I?.key&&W.key!==$?.key&&!D.has(W.key)).map(W=>({column:W,text:zr({column:W,row:e,getFieldValue:m,getDisplayText:u})})),K=qh({density:n,visibility:s,limit:i}),J=Number.isFinite(K)?M.slice(0,K):M,G=Math.max(M.length-J.length,0),te=Uh(a,n),U=w?.columnWidth||uu(n).ideal;if(b==="image-only")return {width:U,height:Math.round(U*1.25)};if(b==="preview-only")return {width:U,height:Math.round(U*.82)};let Z=n==="detailed"?84:n==="compact"?64:72;typeof h=="function"?Z+=n==="detailed"?188:n==="compact"?140:164:R?Z+=Math.round(U*(n==="detailed"?.72:.62))+12:F&&(Z+=92);let ae=Zs({text:V,charsPerLine:n==="detailed"?26:24,maxLines:2})||1,ie=Zs({text:N,charsPerLine:z?22:n==="detailed"?30:26,maxLines:n==="detailed"?4:2}),de=26+ae*18+(ie>0?ie*16+4:0);return Z+=Math.max(z?56:0,de),Z+=Xh({columns:J,density:n,bentoColumns:te}),G>0&&(Z+=18),!N&&J.length===0&&(Z+=24),{width:U,height:Z}}r(Zh,"getDefaultGalleryMasonryItemSize");function Qh({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:w,galleryGridCardWidth:x,galleryUnderfilledBehavior:k,galleryMasonryColumnWidth:C,masonryPlacementStrategy:S,pagination:T,onLoadMore:E,scrollOwner:R,windowed:F,galleryFieldKey:_="auto",galleryDensity:z="comfortable",galleryBentoColumns:O=2,galleryDetailVisibility:j="limit",galleryDetailLimit:I,shouldEnhanceMultimodal:V=true,getFieldValue:$,isMediaColumn:N,isTitleCandidate:D,isSummaryCandidate:M,getDisplayText:K,renderFieldValue:J,getImagePreviewSrc:G,isImageField:te,isAudioField:U,AudioPlayerComponent:Z,cardVariant:ae="default",cardPresentation:ie,renderCardSlot:de,renderCoverTitle:W,galleryDetailPresentation:pe,renderPreview:B,renderMeta:H,renderLeadingVisual:ne,resolveRecordVisual:fe,hiddenDetailFieldKeys:ye=[],labels:xe,formatLabel:oe,getMasonryItemSize:le}){let{min:Re,ideal:Ie,max:We}=y??uu(z),ue=u||Re,q=Yh(b),L=$h(x),X=C||Re,se=g==="rail",Y=$||Wn,ce=K||Dr,ke=te||Wr,we=U||Lr,Me=N||((Ae,Le)=>qa(Ae,Le,{getFieldValue:Y,shouldEnhanceMultimodal:V,isImageField:ke,isAudioField:we})),Pe=D||((Ae,Le)=>Ya(Ae,Le,{isMediaColumn:Me})),Ve=M||((Ae,Le)=>Ja(Ae,Le,{isMediaColumn:Me})),Xe=J||((Ae,Le,{compact:re}={})=>jsxRuntime.jsx("span",{children:ce(Y(Ae,Le))})),Oe=r((Ae,Le)=>jsxRuntime.jsx(Fs,{row:Ae,columns:o,cardInteraction:a,onClick:n?()=>n(Ae,Le):void 0,isSelected:m?m.has(String(Ae?.linkKey||Ae?.id||"")):String(Ae?.linkKey||Ae?.id||"")===String(i||s||""),isMasonry:d,galleryFieldKey:_,galleryDensity:z,galleryBentoColumns:O,galleryDetailVisibility:j,galleryDetailLimit:I,galleryDetailPresentation:pe,shouldEnhanceMultimodal:V,getFieldValue:Y,isMediaColumn:Me,isTitleCandidate:Pe,isSummaryCandidate:Ve,getDisplayText:ce,renderFieldValue:Xe,getImagePreviewSrc:G,isImageField:ke,isAudioField:we,AudioPlayerComponent:Z,cardVariant:ae,cardPresentation:ie,renderCardSlot:de,renderCoverTitle:W,renderPreview:B,renderMeta:H,renderLeadingVisual:ne,resolveRecordVisual:fe,hiddenDetailFieldKeys:ye,labels:xe,formatLabel:oe},Ae?.id||Ae?.linkKey||Le),"renderGalleryCard"),pt=d?S==="dense"?"dense":"masonry":se?"rail":"grid";if(Yc(pt,f),t!==void 0){let Ae=st.Children.toArray(t);return jsxRuntime.jsx(Xo,{items:Ae,callbacks:{onLoadMore:E},slots:{loadMore:T?.loadingMore?jsxRuntime.jsx(jo,{variant:"spinner",className:"py-global",style:{minHeight:0}}):void 0},classNames:{layout:c},config:{windowed:F,state:T,loading:{autoFill:true},getItemKey:r((Le,re)=>st.isValidElement(Le)&&Le.key!=null?Le.key:re,"getItemKey"),layout:{mode:pt,scrollOwner:R??"parent",gap:p,columns:h??(q?{mobile:1,tablet:Math.min(2,q),desktop:q}:"auto"),underfilledBehavior:k,cardWidth:se?ue:void 0,minCardWidth:L??Re,idealCardWidth:L??Ie,maxCardWidth:L??We}},renderItem:Le=>Le})}return jsxRuntime.jsx(Xo,{items:e,slots:{loadMore:T?.loadingMore?jsxRuntime.jsx(jo,{variant:"spinner",className:"py-global",style:{minHeight:0}}):void 0},callbacks:{onLoadMore:E,onItemClick:a==="container"&&n?(Ae,Le)=>n(Ae,Le.index):void 0},classNames:{layout:c},config:{windowed:F,state:T,loading:{autoFill:true},getItemKey:r((Ae,Le)=>Ae?.id||Ae?.linkKey||Le,"getItemKey"),layout:{mode:pt,underfilledBehavior:k,scrollOwner:R,gap:p,columns:h??(q?{mobile:1,tablet:Math.min(2,q),desktop:q}:"auto"),cardWidth:se?ue:void 0,minCardWidth:L??Re,idealCardWidth:d?X:L??Ie,maxCardWidth:L??We,placementStrategy:S??(ae==="image-only"?"shortest":"shelf"),getItemAspectRatio:ae==="image-only"?Ae=>{let Le=o.find(nt=>nt.key===_)??o.find(nt=>Me(nt,Ae)),re=Le?Y(Le,Ae):void 0,Ce=re&&typeof re=="object"&&"aspectRatio"in re?re.aspectRatio:void 0;if(typeof Ce!="string"||!/^\d+(?:\.\d+)?:\d+(?:\.\d+)?$/.test(Ce))return;let[Fe,qe]=Ce.split(":").map(Number);return Fe>0&&qe>0?Fe/qe:void 0}:void 0,getItemSize:ae==="image-only"&&v&&v>0?(Ae,Le)=>({height:Math.max(w??0,Le.columnWidth/v)}):d?(Ae,Le)=>{let re=Zh({row:Ae,columns:o,galleryFieldKey:_,galleryDensity:z,galleryBentoColumns:O,galleryDetailVisibility:j,galleryDetailLimit:I,getFieldValue:Y,isMediaColumn:Me,isTitleCandidate:Pe,isSummaryCandidate:Ve,getDisplayText:ce,isImageField:ke,isAudioField:we,cardVariant:ae,renderPreview:B,renderLeadingVisual:ne,hiddenDetailFieldKeys:ye,layout:Le,resolveRecordVisual:fe});if(typeof le!="function")return re;let Ce=le(Ae,{...Le,placementStrategy:Le.placementStrategy==="dense"?"dense":"shelf",defaultSize:re})||{};return {...re,...Ce}}:void 0}},renderItem:(Ae,Le)=>Oe(Ae,Le.index)})}r(Qh,"WorkbenchGalleryView");function ex({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&&(A(i)||A(m)||A(b)||A(c)||A(d)),w=e==="horizontal"&&A(g)&&v,x=n==="fill",k=A(f),C=w&&k,S=A(p)?jsxRuntime.jsx("div",{"data-record-part":"aside",className:"flex min-h-0 shrink-0 gap-global",children:p}):null;return jsxRuntime.jsxs("article",{...y,"data-monkeys-component":"record-view","data-record-layout":e,"data-record-sizing":n,className:l("@container flex min-h-0 min-w-0 flex-col gap-global font-[family-name:var(--font-sans)] text-sm leading-5 text-foreground",x&&"h-full",h),children:[A(u)&&jsxRuntime.jsx("div",{"data-record-part":"toolbar",className:"flex shrink-0 flex-wrap items-center gap-global",children:u}),jsxRuntime.jsxs("div",{className:l("flex min-h-0 min-w-0 gap-global",x&&"flex-1"),children:[a==="start"&&S,jsxRuntime.jsxs("div",{"data-record-part":"body",className:l("grid min-h-0 min-w-0 flex-1 grid-cols-1 gap-global",C?"@[48rem]:grid-cols-[minmax(0,2fr)_minmax(0,1fr)_minmax(0,1fr)]":w&&(o==="balanced"?"@[48rem]:grid-cols-2":t==="start"?"@[48rem]:grid-cols-[minmax(0,1fr)_minmax(16rem,24rem)]":"@[48rem]:grid-cols-[minmax(16rem,24rem)_minmax(0,1fr)]"),x&&"overflow-auto @[48rem]:overflow-hidden"),children:[A(g)&&jsxRuntime.jsx("div",{"data-record-part":"media",className:l("min-h-0 min-w-0",t==="end"&&w&&"@[48rem]:order-2",x&&"flex flex-col"),children:g}),v&&jsxRuntime.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:[A(i)&&jsxRuntime.jsx("div",{className:"mb-global flex flex-wrap items-center gap-global",children:i}),A(m)&&jsxRuntime.jsx("div",{className:"mb-global flex flex-wrap items-center gap-global text-sm tabular-nums text-muted-foreground [&_span]:text-inherit [&_time]:text-inherit",children:m}),b,A(c)&&jsxRuntime.jsx("div",{className:"mt-global break-words text-sm text-destructive-text",children:c}),A(d)&&jsxRuntime.jsx("div",{className:"mt-auto flex shrink-0 flex-wrap gap-global pt-global",children:d})]}),k&&jsxRuntime.jsx("div",{"data-record-part":"secondary",className:l("flex min-h-0 min-w-0 flex-col [&>section]:flex-1",x&&"@[48rem]:overflow-auto"),children:f})]}),a==="end"&&S]})]})}r(ex,"RecordView");var tx=[{id:"primary",layout:"rail",filterCount:2,cardCount:4,aspectRatios:[16/11]},{id:"secondary",layout:"grid",filterCount:3,cardCount:5,aspectRatios:[4/5,1,3/4,5/4,1]}];function pu(e,t,o){return typeof e!="number"||!Number.isFinite(e)||e<0?t:Math.min(Math.round(e),o)}r(pu,"normalizeCount");function ox(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?1:Math.min(Math.max(e,.5),2)}r(ox,"normalizeAspectRatio");function nx({animated:e,filterCount:t}){return jsxRuntime.jsxs("div",{className:"flex min-h-10 flex-wrap items-center justify-between gap-4",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(Dt,{variant:"line",animated:e,className:"h-6 w-36 rounded-md"}),jsxRuntime.jsx(Dt,{variant:"line",animated:e,className:"h-3 w-12"})]}),jsxRuntime.jsx("div",{className:"flex flex-wrap justify-end gap-2",children:Array.from({length:t},(o,n)=>jsxRuntime.jsx(Dt,{variant:"block",animated:e,className:"h-9 w-28 rounded-lg"},n))})]})}r(nx,"WorkbenchGallerySkeletonHeading");function rx({sections:e=tx,animated:t=true,animation:o,className:n,...a}){return jsxRuntime.jsx(Ho,{animation:o,animated:t,children:jsxRuntime.jsx("div",{...a,role:"status","aria-busy":"true","aria-label":"Loading gallery","data-monkeys-component":"workbench-gallery-skeleton",className:l("grid w-full gap-4",n),children:e.map((s,i)=>{let m=s.layout??"grid",c=pu(s.filterCount,2,8),d=pu(s.cardCount,m==="rail"?4:5,24),g=s.aspectRatios?.length?s.aspectRatios:[m==="rail"?16/11:1];return jsxRuntime.jsx(Tn,{index:i,children:jsxRuntime.jsxs("section",{className:"grid gap-4","data-skeleton-section":s.id,children:[jsxRuntime.jsx(nx,{animated:t,filterCount:c}),jsxRuntime.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)=>jsxRuntime.jsx("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:jsxRuntime.jsx(Dt,{variant:"block",animated:t,className:"h-auto w-full rounded-none",style:{aspectRatio:String(ox(g[p%g.length]))}})},p))})]})},s.id||i)})})})}r(rx,"WorkbenchGallerySkeleton");function ax({animated:e=true,animation:t,className:o,"aria-label":n,...a}){let s=xt().loading.spinner,i=r(m=>jsxRuntime.jsx(Dt,{variant:"block",animated:e,className:m}),"skeleton");return jsxRuntime.jsx(Ho,{animation:t,animated:e,children:jsxRuntime.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:[jsxRuntime.jsxs("div",{className:"flex h-10 shrink-0 items-center justify-between gap-4 rounded-lg border border-border bg-card px-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[i("h-5 w-20"),i("h-5 w-16"),i("h-5 w-24")]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[i("h-7 w-20"),i("size-7")]})]}),jsxRuntime.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")]}),jsxRuntime.jsxs("div",{className:"grid min-h-0 flex-1 grid-cols-1 gap-4 lg:grid-cols-[minmax(0,2fr)_minmax(14rem,1fr)]",children:[jsxRuntime.jsxs("div",{className:"flex min-h-0 flex-col gap-4 rounded-lg border border-border bg-card p-4",children:[i("h-6 w-40"),jsxRuntime.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:6},(m,c)=>jsxRuntime.jsx(Tn,{index:c,children:jsxRuntime.jsxs("div",{className:"space-y-2",children:[i("h-4 w-20"),i("h-9 w-full")]})},c))}),i("min-h-32 flex-1")]}),jsxRuntime.jsxs("div",{className:"flex min-h-40 flex-col gap-4 rounded-lg border border-border bg-card p-4",children:[i("h-6 w-28"),i("min-h-28 flex-1"),i("h-9 w-full")]})]})]})})}r(ax,"WorkbenchPageSkeleton");function gu(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}r(gu,"toCssSize");function gx(e,t){return String(e?.id??e?.key??t)}r(gx,"defaultGetRowId");function bx(e){return String(e?.columnId??e?.status??"")}r(bx,"defaultGetColumnId");function fx(e){let t=e?.title??e?.name??e?.id??"Untitled";return jsxRuntime.jsx("div",{className:"rounded-lg border border-border/70 bg-card px-3 py-2 text-sm text-foreground shadow-sm",children:String(t)})}r(fx,"defaultRenderCard");function yx({row:e,rowId:t,rowIndex:o,column:n,classNames:a,renderCard:s}){let{attributes:i,listeners:m,setNodeRef:c,isDragging:d}=core.useDraggable({id:t});return jsxRuntime.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(yx,"WorkbenchLaneDraggableCard");function hx({column:e,columnRows:t,columnWidth:o,columnMinHeight:n,emptyColumn:a,classNames:s,renderCard:i}){let{setNodeRef:m,isOver:c}=core.useDroppable({id:e.id});return jsxRuntime.jsxs("section",{className:l("flex shrink-0 flex-col rounded-xl border border-border/60 bg-card p-2 shadow-sm",s?.column,e.className),style:{width:gu(o)??"280px"},children:[jsxRuntime.jsxs("div",{className:l("flex h-10 items-center gap-2 px-1",s?.columnHeader,e.headerClassName),children:[e.icon?jsxRuntime.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,jsxRuntime.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}),jsxRuntime.jsx("span",{className:l("text-xs text-muted-foreground",s?.columnCount),children:t.length})]}),jsxRuntime.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:gu(n)},children:t.length?t.map(({row:d,rowIndex:g,rowId:u})=>jsxRuntime.jsx(yx,{row:d,rowId:u,rowIndex:g,column:e,classNames:s,renderCard:i},u)):a?jsxRuntime.jsx("div",{className:l("flex min-h-24 items-center justify-center rounded-lg border border-dashed border-border/60 px-3 py-4 text-xs text-muted-foreground",s?.emptyColumn),children:a}):null})]})}r(hx,"WorkbenchLaneColumnView");function xx({rows:e=[],columns:t=[],getRowId:o=gx,getColumnId:n=bx,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??((_,z)=>m?jsxRuntime.jsx(ve,{className:"w-full justify-start whitespace-normal text-left",onClick:()=>m({rowId:o(_,z.rowIndex)}),children:String(_?.title??_?.name??o(_,z.rowIndex))}):fx(_)),[y,v]=st.useState(null),w=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:d}})),x=st.useMemo(()=>new Map(t.map(_=>[_.id,_])),[t]),k=st.useMemo(()=>e.map((_,z)=>({row:_,rowIndex:z,rowId:o(_,z),columnId:n(_,z)})),[n,o,e]),C=y?k.find(_=>_.rowId===y):void 0,S=st.useMemo(()=>{let _=new Map;return t.forEach(z=>_.set(z.id,[])),k.forEach(({row:z,rowIndex:O,rowId:j,columnId:I})=>{_.get(I)?.push({row:z,rowIndex:O,rowId:j});}),_},[t,k]),T=C?x.get(C.columnId):void 0,E=st.useCallback(_=>{v(String(_.active.id));},[]),R=st.useCallback(_=>{v(null);let z=String(_.active.id),O=String(_.over?.id??""),j=k.find(I=>I.rowId===z);!j||!x.has(O)||j.columnId===O||i?.(z,O,j.row);},[x,i,k]),F=st.useCallback(()=>{v(null);},[]);return jsxRuntime.jsxs(core.DndContext,{sensors:w,onDragStart:E,onDragEnd:R,onDragCancel:F,children:[jsxRuntime.jsx("div",{className:l("flex min-h-0 flex-1 gap-4 overflow-x-auto p-4 [scrollbar-width:thin]",f?.root,p),style:b,children:t.map(_=>jsxRuntime.jsx(hx,{column:_,columnRows:S.get(_.id)||[],columnWidth:g,columnMinHeight:u,emptyColumn:c,classNames:f,renderCard:h},_.id))}),jsxRuntime.jsx(core.DragOverlay,{children:C&&T?jsxRuntime.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(xx,"WorkbenchLaneView");var bu=r(e=>{if(Number.isFinite(e))return Math.min(1,Math.max(0,Number(e)))},"normalizeProgress");function vx({items:e,summary:t,variant:o="bars",density:n="comfortable",emptyState:a=null,ariaLabel:s="Metrics",className:i,itemClassName:m}){if(!e.length)return A(a)?jsxRuntime.jsx(jsxRuntime.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=bu(u.progress);return f===void 0?void 0:c(p,f*100)}),g=d.every(Boolean);return jsxRuntime.jsxs("figure",{"aria-label":s,"data-monkeys-component":"workbench-metric-grid","data-metric-variant":"radar",className:l("m-0 min-w-0",i),children:[jsxRuntime.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=>jsxRuntime.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 jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:"180",y1:"160",x2:f[0],y2:f[1],stroke:"hsl(var(--border))"}),typeof u.label=="string"||typeof u.label=="number"?jsxRuntime.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"?jsxRuntime.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?jsxRuntime.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?jsxRuntime.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?jsxRuntime.jsx("circle",{cx:u[0],cy:u[1],r:"3",fill:"hsl(var(--primary))"},e[p].id):null),t?jsxRuntime.jsxs("g",{"data-metric-radar-summary":"true",textAnchor:"middle",paintOrder:"stroke",stroke:"hsl(var(--card))",strokeWidth:"3",strokeLinejoin:"round",children:[jsxRuntime.jsx("text",{x:"180",y:"149",fontSize:"12",fill:"hsl(var(--muted-foreground))",children:t.label}),jsxRuntime.jsx("text",{x:"180",y:"174",fontSize:"23",fontWeight:"700",fill:"hsl(var(--foreground))",children:t.value})]}):null]}),jsxRuntime.jsx("dl",{className:"sr-only",children:e.map(u=>jsxRuntime.jsxs("div",{className:l("flex min-w-0 justify-between gap-2",m),children:[jsxRuntime.jsx("dt",{className:"truncate text-muted-foreground",children:u.label}),jsxRuntime.jsx("dd",{className:"font-semibold tabular-nums",children:u.value})]},u.id))})]})}return o==="list"?jsxRuntime.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=>jsxRuntime.jsxs("div",{className:l("flex min-w-0 items-start justify-between gap-4",n==="compact"?"text-xs":"text-sm",m),children:[jsxRuntime.jsxs("dt",{className:"min-w-0 text-muted-foreground",children:[jsxRuntime.jsx("span",{className:"block truncate",children:c.label}),A(c.description)?jsxRuntime.jsx("span",{className:"mt-0.5 block text-xs leading-4 text-muted-foreground/80",children:c.description}):null]}),jsxRuntime.jsx("dd",{className:"shrink-0 font-semibold tabular-nums text-foreground",children:c.value})]},c.id))}):o==="cards"?jsxRuntime.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=>jsxRuntime.jsxs("div",{className:l("min-w-0 rounded-lg border border-border/70 bg-card text-card-foreground",n==="compact"?"p-3":"p-4",m),children:[jsxRuntime.jsx("dt",{className:"truncate text-xs font-medium text-muted-foreground",children:c.label}),jsxRuntime.jsx("dd",{className:l("font-semibold tabular-nums text-foreground",n==="compact"?"mt-1.5 text-xl":"mt-2 text-2xl"),children:c.value}),A(c.description)?jsxRuntime.jsx("div",{className:"mt-2 text-xs leading-5 text-muted-foreground",children:c.description}):null]},c.id))}):jsxRuntime.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=bu(c.progress);return jsxRuntime.jsxs("div",{className:l("min-w-0",m),children:[jsxRuntime.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:jsxRuntime.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)}%`}})}),jsxRuntime.jsxs("div",{className:"mt-1.5 flex min-w-0 items-baseline justify-between gap-2",children:[jsxRuntime.jsx("dt",{className:"truncate text-xs text-muted-foreground",children:c.label}),jsxRuntime.jsx("dd",{className:"shrink-0 text-xs font-semibold tabular-nums text-foreground",children:c.value})]})]},c.id)})})}r(vx,"WorkbenchMetricGrid");var fu=Math.PI*(3-Math.sqrt(5)),yu=r(e=>Array.from(e).reduce((t,o)=>Math.imul(t^o.charCodeAt(0),16777619)>>>0,2166136261),"hash");function li(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 k=n.get(x.sourceId)??[];k.includes(x.targetId)||k.push(x.targetId),n.set(x.sourceId,k),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 k=g[x],C=d.get(k);for(let S of n.get(k)??[])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,k]of d){if(k.depth<2)continue;let C=p.get(k.cluster)??[];C.push(x),p.set(k.cluster,C);}let f=u.map(x=>Math.sqrt([...d.values()].filter(k=>k.branch===x).length+8)),b=f.reduce((x,k)=>x+k,0)||1,h=-Math.PI/2,y=new Map;u.forEach((x,k)=>{let C=Math.PI*2*f[k]/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 k=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,R=T*fu+k.angle;v.set(S,{x:k.x+Math.cos(R)*E,y:k.y+Math.sin(R)*E,z:k.z+Math.sin(R)*2.5});});}let w=e.map(x=>{let k=d.get(x.id),C=k.depth<2?y.get(k.branch):v.get(k.cluster);if(k.depth===0||!C)return {...x,...k,x:0,y:0,z:0};if(k.depth===1)return {...x,...k,x:C.x*.76,y:C.y*.76,z:C.z};let T=p.get(k.cluster).indexOf(x.id),E=k.depth===2?0:1.5+Math.sqrt(T)*.72,R=T*fu+yu(k.cluster)%360*Math.PI/180;return {...x,...k,x:C.x+Math.cos(R)*E,y:C.y+Math.sin(R)*E*.85,z:C.z+Math.sin(R*1.37)*Math.min(E,3.5)}});for(let x=0;x<30;x++)for(let k=0;k<w.length;k++)for(let C=k+1;C<w.length;C++){let S=w[k],T=w[C],E=T.x-S.x,R=T.y-S.y,F=Math.hypot(E,R),_=S.depth<3||T.depth<3?1.4:.85;if(F>=_)continue;let z=yu(S.id+T.id)%360*Math.PI/180,O=F>.001?E/F:Math.cos(z),j=F>.001?R/F:Math.sin(z),I=(_-F)*.25;S.depth>0&&(S.x-=O*I,S.y-=j*I),T.depth>0&&(T.x+=O*I,T.y+=j*I);}if(w.length)for(let x of ["x","y","z"]){let k=(Math.min(...w.map(C=>C[x]))+Math.max(...w.map(C=>C[x])))/2;w.forEach(C=>{C[x]-=k;});}return {points:w,links:i,neighbors:s,root:c}}r(li,"buildRelationshipGalaxyLayout");function xu({nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,ariaLabel:a,className:s}){let i=xt(),m=st.useRef(null),c=st.useRef(new Map),d=st.useRef(o),g=st.useRef(n),[u,p]=st.useState(false),f=JSON.stringify([e,t]),b=st.useMemo(()=>li(e,t),[f]);return d.current=o,g.current=n,st.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(([w,{OrbitControls:x}])=>{if(y)return;let k=[],C=new w.Scene,S=getComputedStyle(h),T=r((oe,le)=>{let Re=document.createElement("span");Re.style.color=`hsl(${S.getPropertyValue(oe).trim()||S.getPropertyValue(le).trim()})`,h.append(Re);let Ie=new w.Color(getComputedStyle(Re).color);return Re.remove(),Ie},"tokenColor"),E=T("--radar-canvas","--background");C.background=E;let R=new w.PerspectiveCamera(48,1,.1,250),F=new w.WebGLRenderer({antialias:true,alpha:false});F.setPixelRatio(Math.min(devicePixelRatio,2)),F.domElement.style.cssText="position:absolute;inset:0;width:100%;height:100%;touch-action:none",F.domElement.setAttribute("aria-hidden","true"),h.prepend(F.domElement);let _=new x(R,F.domElement);_.enableDamping=true,_.dampingFactor=.08,_.rotateSpeed=.45,_.minDistance=8,_.maxDistance=130,_.autoRotate=false;let z=new Map(b.points.map(oe=>[oe.id,new w.Vector3(oe.x,oe.y,oe.z)])),O={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")},j=128,I=new Uint8Array(j*j*4);for(let oe=0;oe<j;oe++)for(let le=0;le<j;le++){let Re=Math.hypot(le+.5-j/2,oe+.5-j/2)/(j/2),Ie=Re<.09?1:Math.exp(-Re*7.5)*.85;I.set([255,255,255,Math.round(Ie*255)],(oe*j+le)*4);}let V=new w.DataTexture(I,j,j,w.RGBAFormat);V.minFilter=V.magFilter=w.LinearFilter,V.needsUpdate=true,k.push(V);let $=b.points.map(oe=>{let le=new w.SpriteMaterial({map:V,color:O[oe.tone??"primary"],transparent:true,blending:w.AdditiveBlending,depthWrite:false}),Re=new w.Sprite(le);return Re.position.copy(z.get(oe.id)),C.add(Re),k.push(le),Re}),N=new w.BufferGeometry;N.setAttribute("position",new w.Float32BufferAttribute(b.links.flatMap(oe=>[...z.get(oe.sourceId).toArray(),...z.get(oe.targetId).toArray()]),3));let D=new Float32Array(b.links.length*6);N.setAttribute("color",new w.BufferAttribute(D,3));let M=new w.LineBasicMaterial({vertexColors:true,transparent:true,opacity:.5,depthWrite:false});C.add(new w.LineSegments(N,M)),k.push(N,M);let K=new Map;b.points.filter(oe=>oe.depth>0).forEach(oe=>{let le=K.get(oe.cluster)??[];le.push(oe),K.set(oe.cluster,le);});for(let oe of K.values()){if(oe.length<3)continue;let le=oe.reduce((We,ue)=>We.add(z.get(ue.id)),new w.Vector3).multiplyScalar(1/oe.length),Re=new w.SpriteMaterial({map:V,color:O[oe[0].tone??"primary"],transparent:true,opacity:.13,blending:w.AdditiveBlending,depthWrite:false}),Ie=new w.Sprite(Re);Ie.position.copy(le),Ie.position.z-=1,Ie.scale.setScalar(8+Math.sqrt(oe.length)*1.2),C.add(Ie),k.push(Re);}let J=Math.max(8,...b.points.map(oe=>Math.abs(oe.x)))+3,G=Math.max(6,...b.points.map(oe=>Math.abs(oe.y)))+3,te=55,U=false,Z=new ResizeObserver(()=>{let{width:oe,height:le}=h.getBoundingClientRect();if(!oe||!le)return;R.aspect=oe/le;let Re=Math.max(G,J/R.aspect)/Math.tan(w.MathUtils.degToRad(R.fov/2))+7;U?R.position.sub(_.target).multiplyScalar(Re/te).add(_.target):(R.position.set(0,0,Re),U=true),te=Re,_.update(),R.updateProjectionMatrix(),F.setSize(oe,le,false);});Z.observe(h);let ae=new w.Vector3,ie=new w.Vector2,de={x:0,y:0},W,pe,B=r(oe=>{let le=F.domElement.getBoundingClientRect();ie.set(oe.clientX-le.left,oe.clientY-le.top);let Re,Ie=12;for(let We of b.points){if(ae.copy(z.get(We.id)).project(R),ae.z<-1||ae.z>1)continue;let ue=Math.hypot((ae.x+1)*le.width/2-ie.x,(-ae.y+1)*le.height/2-ie.y);ue<Ie&&(Ie=ue,Re=We);}return Re},"nodeAt"),H=r(oe=>{de={x:oe.clientX,y:oe.clientY};},"pointerDown"),ne=r(oe=>{W=B(oe)?.id,F.domElement.style.cursor=W?"pointer":"grab";},"pointerMove"),fe=r(()=>{W=void 0;},"pointerLeave"),ye=r(oe=>{if(Math.hypot(oe.clientX-de.x,oe.clientY-de.y)>5)return;let le=B(oe);le&&g.current?.(le);},"pointerUp");F.domElement.addEventListener("pointerdown",H),F.domElement.addEventListener("pointermove",ne),F.domElement.addEventListener("pointerleave",fe),F.domElement.addEventListener("pointerup",ye);let xe=[...b.points].sort((oe,le)=>oe.depth-le.depth||(b.neighbors.get(le.id)?.size??0)-(b.neighbors.get(oe.id)?.size??0));F.setAnimationLoop(()=>{_.update();let oe=d.current,le=oe?b.neighbors.get(oe):void 0;(pe!==oe||!N.userData.initialized)&&(pe=oe,N.userData.initialized=true,b.links.forEach((L,X)=>{let se=L.sourceId===oe||L.targetId===oe,Y=b.points.find(ke=>ke.id===L.targetId),ce=O[Y.tone??"primary"].clone().multiplyScalar(oe?se?1.35:.12:.45);D.set([...ce.toArray(),...ce.toArray()],X*6);}),N.attributes.color.needsUpdate=true),$.forEach((L,X)=>{let se=b.points[X],Y=oe===se.id;L.scale.setScalar((se.depth===0?2.2:se.depth===1?1.8:se.depth===2?1.2:.82)*(Y?1.5:1)),L.material.opacity=!oe||Y||le?.has(se.id)?1:.25;});let Re=h.clientWidth,Ie=h.clientHeight,We=te/R.position.distanceTo(_.target),ue=[],q=[...xe].sort((L,X)=>+(X.id===oe||X.id===W)-+(L.id===oe||L.id===W));for(let L of q){let X=c.current.get(L.id);if(!X)continue;let se=L.id===oe,Y=L.id===W,ce=le?.has(L.id);ae.copy(z.get(L.id)).project(R);let ke=(ae.x+1)*Re/2,we=(-ae.y+1)*Ie/2+10,Me={x:ke-Math.min(L.label.length*13,170)/2,y:we,width:Math.min(L.label.length*13,170),height:21},Pe=ae.z>-1&&ae.z<1&&Me.x>4&&Me.x+Me.width<Re-4&&we>4&&we+21<Ie-4,Ve=se||Y||ce||L.depth<=2||We>1.65,Xe=ue.some(pt=>Me.x<pt.x+pt.width+8&&Me.x+Me.width+8>pt.x&&Me.y<pt.y+pt.height+5&&Me.y+Me.height+5>pt.y),Oe=Pe&&Ve&&(se||Y||!Xe)&&(!oe||se||Y||ce||L.depth<2);X.style.display=Oe?"block":"none",X.tabIndex=Oe?0:-1,X.style.transform=`translate(${ke}px,${we}px) translate(-50%,0)`,X.style.color="#"+O[L.tone??"primary"].clone().lerp(O.primary,.45).getHexString(),X.style.opacity=oe&&!se&&!ce&&!Y?"0.45":"1",X.style.fontWeight=L.depth<2||se?"var(--monkeys-semantic-font-weight-semibold, 600)":"var(--monkeys-semantic-font-weight-normal, 400)",X.style.zIndex=se||Y?"2":"1",Oe&&ue.push(Me);}F.render(C,R);}),v=r(()=>{F.domElement.removeEventListener("pointerdown",H),F.domElement.removeEventListener("pointermove",ne),F.domElement.removeEventListener("pointerleave",fe),F.domElement.removeEventListener("pointerup",ye),Z.disconnect(),F.setAnimationLoop(null),_.dispose(),k.forEach(oe=>oe.dispose()),F.dispose(),F.domElement.remove();},"cleanup");}).catch(()=>{y||p(true);}),()=>{y=true,v();}},[b]),jsxRuntime.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=>jsxRuntime.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&&jsxRuntime.jsx("div",{role:"alert",className:"absolute inset-0 grid place-items-center bg-background text-foreground",children:i.workbench.collection.loadError})]})}r(xu,"RelationshipGalaxy");var Or={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(Or))Object.freeze(e);Object.freeze(Or);var vu={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]},ku=new Set(["collisionPasses","ticksPerFrame"]),wu=r(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"record");function ci(e={}){if(!wu(e))throw new Error("config must be an object");let t=structuredClone(Or);for(let[o,n]of Object.entries(e)){if(!Object.prototype.hasOwnProperty.call(t,o))throw new Error(`Unknown config group: ${o}`);if(!wu(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(vu[s]){let[c,d]=vu[s];if(typeof i!="number"||!Number.isFinite(i)||i<c||i>d||ku.has(s)&&!Number.isInteger(i))throw new Error(`${m} must be ${ku.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(ci,"resolveRelationshipGraphConfig");var nl=r((e,t,o)=>Math.min(o,Math.max(t,e)),"clamp");function Cu(e,t,o={}){let n=ci({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)?nl(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,w=y.y-h.y;if(Math.abs(v)+Math.abs(w)<.01){let T=(f+b+1)*2.39996;v=Math.cos(T),w=Math.sin(T);}let x=Math.max(1,Math.hypot(v,w)),k=Math.min(8,n.repulsion/Math.max(2500,x*x))*c,C=v/x*k,S=w/x*k;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,w=b.y-f.y,x=Math.max(1,Math.hypot(v,w)),k=(x-y)*(n.linkStrength+h*n.strongLinkStrength)*c,C=v/x*k,S=w/x*k;f.vx+=C,f.vy+=S,b.vx-=C,b.vy-=S;}d=0;for(let f of a)f.vx=nl((f.vx+(m.x-f.x)*n.centerStrength*c)*n.velocityRetention,-n.maxVelocity,n.maxVelocity),f.vy=nl((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],w=v.x-y.x,x=v.y-y.y,k=(y.width+v.width)/2+n.collisionPadding-Math.abs(w),C=(y.height+v.height)/2+n.collisionPadding-Math.abs(x);if(k<=0||C<=0)continue;let S=y.fx===void 0,T=v.fx===void 0,E=Number(S)+Number(T);if(E)if(k<C){let R=Math.sign(w||1)*k/E;S&&(y.x-=R),T&&(v.x+=R);}else {let R=Math.sign(x||1)*C/E;S&&(y.y-=R),T&&(v.y+=R);}}c*=n.cooling,c<n.minAlpha&&(c=0);}return c>0}return r(g,"step"),{step:g,get active(){return c>0},get energy(){return d},positions:r(()=>new Map(a.map(({id: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(Cu,"createForceSimulation");var rl=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 Rx=r((e,t,o)=>Math.min(o,Math.max(t,e)),"clamp");var Su=r(e=>{let t=Number.isFinite(e)?Rx(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"),ui=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"),Nx=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"),Tu=r((e,t)=>{let o=Nx(e,t);return `M ${e.x} ${e.y} Q ${o.x} ${o.y} ${t.x} ${t.y}`},"getTrendRadarFocusTopologyEdgePath");var $x={"align-justify":lucideReact.AlignJustify,grid:lucideReact.Grid3X3,layers:lucideReact.Layers,"map-pin":lucideReact.MapPin,mountain:lucideReact.Mountain,package:lucideReact.Package,paintbrush:lucideReact.Paintbrush,palette:lucideReact.Palette,scissors:lucideReact.Scissors,shield:lucideReact.Shield,"shield-check":lucideReact.ShieldCheck,shirt:lucideReact.Shirt,snowflake:lucideReact.Snowflake,sparkles:lucideReact.Sparkles,user:lucideReact.UserRound,users:lucideReact.UsersRound},Kx=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 Nu({model:e,config:t=Or,onOpenNode:o,renderNodeAction:n,relationshipLabel:a,colorMode:s="dark",onNodePointerDown:i,onNodeKeyDown:m}){let c=r((u,p)=>t.edges.curved?Tu(u,p):`M ${u.x} ${u.y} L ${p.x} ${p.y}`,"edgePath"),d=st.useId().replace(/:/g,""),g=st.useMemo(()=>new Map(e.nodes.map(u=>[u.id,u])),[e.nodes]);return jsxRuntime.jsxs("div",{className:"trend-radar-focus-topology-background pointer-events-none relative size-full overflow-visible","data-radar-focus-topology-surface":"true","data-radar-focus-topology-color-mode":s,children:[t.edges.visible&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${ro.width} ${ro.height}`,className:"absolute inset-0 size-full overflow-visible","aria-hidden":"true",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("filter",{id:d,x:"-40%",y:"-40%",width:"180%",height:"180%",children:jsxRuntime.jsx("feGaussianBlur",{stdDeviation:"7"})})}),jsxRuntime.jsx("g",{"data-radar-focus-topology-edge-layer":"context",children:e.edges.filter(u=>u.role!=="focus").map(u=>{let p=g.get(u.sourceId),f=g.get(u.targetId);return !p||!f?null:jsxRuntime.jsx("path",{d:c(p,f),fill:"none",stroke:t.edges.color??"var(--trend-radar-muted-color)",strokeWidth:Math.max(.8,.72+Math.pow(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)})}),jsxRuntime.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??Kx(u,p.id===e.subjectId?f:p),y=Su(u.associationStrength);return jsxRuntime.jsxs("g",{"data-radar-focus-topology-focus-edge":u.id,"data-radar-focus-topology-association-strength":u.associationStrength.toFixed(4),children:[jsxRuntime.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})`}),jsxRuntime.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:jsxRuntime.jsx("title",{children:a(u)})})]},u.id)})})]}),e.nodes.map(u=>{let p=$x[u.iconName]??lucideReact.Palette,f=ui(u,s),b=u.role==="focus",h=u.role==="context",y=!!(o&&!b);return jsxRuntime.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:[jsxRuntime.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&&jsxRuntime.jsx(p,{className:"shrink-0",size:t.nodes.iconSize,color:f.foreground,strokeWidth:1.8,"aria-hidden":"true"}),t.nodes.showLabels&&jsxRuntime.jsx("span",{className:"min-w-0 truncate",style:{color:"inherit"},children:u.label})]}),n?.(u)]},u.id)})]})}r(Nu,"TrendRadarFocusTopologySurface");function Mu({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=st.useMemo(()=>ci(t),[t]),f=st.useMemo(()=>new Set(m?.activeNodeIds??[]),[m?.activeNodeIds]),b=JSON.stringify(p.physics),h=st.useMemo(()=>JSON.parse(b),[b]),y=JSON.stringify(p.viewport),v=st.useMemo(()=>JSON.parse(y),[y]),{interaction:w,ui:x}=p,k=st.useRef(null),C=st.useRef(),S=JSON.stringify({nodes:e.nodes.map(({id:B,x:H,y:ne,width:fe,height:ye})=>({id:B,x:H,y:ne,width:fe,height:ye})),edges:e.edges.map(({sourceId:B,targetId:H,associationStrength:ne})=>({sourceId:B,targetId:H,associationStrength:ne}))}),T=st.useMemo(()=>{let B=JSON.parse(S);return Cu(B.nodes,B.edges,{physics:h})},[S,h]),[E,R]=st.useState(()=>T.positions()),[F,_]=st.useState(false),[z,O]=st.useState({x:0,y:0,z:1}),j=st.useRef(o);j.current=o,st.useEffect(()=>{j.current?.(z);},[z]);let I=st.useRef(z),V=st.useRef(),$=st.useRef(false),[N,D]=st.useState({width:1,height:1}),M=st.useRef(false),K=st.useMemo(()=>e.nodes.map(B=>({...B,...E.get(B.id)??{}})),[e.nodes,E]),J=st.useRef(K);J.current=K;let G=st.useCallback(B=>{I.current=B,O(B);},[]),te=st.useCallback(()=>{if(C.current!==void 0)return;if(M.current&&!V.current){T.step(1400),R(T.positions()),_(false);return}_(T.active);let B=r(()=>{T.step(h.ticksPerFrame),R(T.positions()),T.active?C.current=requestAnimationFrame(B):(C.current=void 0,_(false));},"tick");C.current=requestAnimationFrame(B);},[T,h.ticksPerFrame]),U=st.useCallback(()=>{let B=k.current;if(!B)return;let H=rl(J.current,v.fitPadding),ne=Math.max(v.minZoom,Math.min(v.maxZoom,v.fitMaxZoom,(B.clientWidth-v.screenPadding*2)/H.width,(B.clientHeight-v.screenPadding*2)/H.height));G({x:B.clientWidth/(2*ne)-H.x-H.width/2,y:B.clientHeight/(2*ne)-H.y-H.height/2,z:ne});},[G,v]);st.useEffect(()=>{M.current=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??false;let B=T.positions();return R(B),J.current=J.current.map(H=>({...H,...B.get(H.id)})),U(),te(),()=>{C.current!==void 0&&cancelAnimationFrame(C.current),C.current=void 0;let H=V.current;H?.target.hasPointerCapture?.(H.pointerId)&&H.target.releasePointerCapture(H.pointerId),V.current=void 0;}},[T,U,te]),st.useEffect(()=>{let B=k.current;if(!B)return;let H=new ResizeObserver(()=>{D({width:B.clientWidth,height:B.clientHeight}),v.fitOnResize&&U();});return H.observe(B),()=>H.disconnect()},[U,v.fitOnResize]);let Z=st.useCallback((B,H,ne)=>{if(!w.zoom)return;let fe=I.current,ye=Math.max(v.minZoom,Math.min(v.maxZoom,fe.z*Math.exp(-B*v.zoomSensitivity)));G({x:fe.x-H/fe.z+H/ye,y:fe.y-ne/fe.z+ne/ye,z:ye});},[G,v,w.zoom]);st.useEffect(()=>{let B=k.current;if(!B)return;let H=r(ne=>{if(V.current||!w.zoom)return;ne.preventDefault();let fe=B.getBoundingClientRect();Z(ne.deltaY,ne.clientX-fe.left,ne.clientY-fe.top);},"wheel");return B.addEventListener("wheel",H,{passive:false}),()=>B.removeEventListener("wheel",H)},[Z,w.zoom]);let ae=r((B,H)=>{if(B.button!==0||V.current||(H?!w.dragNodes:!w.pan))return;$.current=false;let ne=I.current;V.current={pointerId:B.pointerId,id:H?.id,startX:B.clientX,startY:B.clientY,x:H?.x??ne.x,y:H?.y??ne.y,moved:false,target:B.currentTarget},B.currentTarget.setPointerCapture(B.pointerId),H&&(T.pin(H.id,H.x,H.y),te());},"begin"),ie=r(B=>{let H=V.current;if(!(!H||H.pointerId!==B.pointerId)){if(V.current=void 0,$.current=H.moved,H.id){let ne=T.positions().get(H.id);T.release(H.id),te(),H.moved&&ne&&u?.(H.id,ne);}H.target.hasPointerCapture(B.pointerId)&&H.target.releasePointerCapture(B.pointerId);}},"end"),de={...e,nodes:K},W=new Map(K.map(B=>[B.id,B])),pe=rl([...e.nodes,...K],200);return jsxRuntime.jsxs("section",{ref:k,className:"relationship-graph bg-background relative size-full overflow-hidden",style:{cursor:w.pan?void 0:"default",touchAction:w.pan||w.dragNodes?"none":"auto"},role:"region","aria-label":a,"data-radar-focus-topology":"true","data-graph-engine":"native-force","data-force-running":F,"data-radar-focus-topology-camera":`${z.x.toFixed(2)},${z.y.toFixed(2)},${z.z.toFixed(3)}`,onPointerDown:B=>{B.target.closest("button")||ae(B);},onPointerMove:B=>{let H=V.current;if(!H||H.pointerId!==B.pointerId)return;let ne=B.clientX-H.startX,fe=B.clientY-H.startY;H.moved||(H.moved=Math.hypot(ne,fe)>w.dragThreshold),H.moved&&(H.id?(T.pin(H.id,H.x+ne/I.current.z,H.y+fe/I.current.z),R(T.positions()),te()):G({...I.current,x:H.x+ne/I.current.z,y:H.y+fe/I.current.z}));},onPointerUp:ie,onPointerCancel:ie,onLostPointerCapture:ie,onClickCapture:B=>{$.current&&(B.preventDefault(),B.stopPropagation(),$.current=false);},children:[jsxRuntime.jsx("div",{style:{position:"absolute",left:0,top:0,width:ro.width,height:ro.height,transformOrigin:"0 0",transform:`translate(${z.x*z.z}px, ${z.y*z.z}px) scale(${z.z})`},children:jsxRuntime.jsx(Nu,{model:de,config:p,colorMode:n,relationshipLabel:d,onOpenNode:w.openNodes?s:void 0,renderNodeAction:i??(m&&c?B=>{if(m.nodeKinds&&!m.nodeKinds.includes(B.ref.kind))return null;let H=f.has(B.id),ne=m.disabled||!H&&m.maxActive!==void 0&&f.size>=m.maxActive,fe=`${H?m.activeLabel??m.label:m.label}: ${B.label}`,ye=H?lucideReact.Check:lucideReact.Plus,xe=m.size??24;return jsxRuntime.jsx("button",{type:"button","data-relationship-node-action":B.id,"aria-label":fe,title:fe,"aria-pressed":H,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:ui(B,n).foreground,transform:`translate(50%, -50%) scale(${m.keepScreenSize===false?1:1/z.z})`,transformOrigin:"center"},onPointerDown:oe=>oe.stopPropagation(),onKeyDown:oe=>oe.stopPropagation(),onClick:oe=>{oe.stopPropagation(),c(B);},children:jsxRuntime.jsx(ye,{size:xe*.6,"aria-hidden":"true"})})}:void 0),onNodePointerDown:w.dragNodes?(B,H)=>ae(B,H):void 0,onNodeKeyDown:(B,H)=>{if(!w.keyboard||!w.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?w.keyboardFastStep:w.keyboardStep)/I.current.z,ye={x:H.x+ne[0]*fe,y:H.y+ne[1]*fe};T.pin(H.id,ye.x,ye.y),R(T.positions()),T.release(H.id),te(),u?.(H.id,ye);}})}),(x.controls||x.minimap)&&jsxRuntime.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&&jsxRuntime.jsxs("div",{className:"relationship-controls",children:[jsxRuntime.jsx("button",{type:"button","aria-label":g.zoomOut,onClick:()=>Z(v.zoomStep,N.width/2,N.height/2),disabled:!w.zoom||z.z<=v.minZoom,children:jsxRuntime.jsx(lucideReact.Minus,{size:15})}),jsxRuntime.jsxs("output",{children:[Math.round(z.z*100),"%"]}),jsxRuntime.jsx("button",{type:"button","aria-label":g.zoomIn,onClick:()=>Z(-v.zoomStep,N.width/2,N.height/2),disabled:!w.zoom||z.z>=v.maxZoom,children:jsxRuntime.jsx(lucideReact.Plus,{size:15})}),jsxRuntime.jsx("button",{type:"button","aria-label":g.zoomToFit,onClick:U,children:jsxRuntime.jsx(lucideReact.LocateFixed,{size:15})})]}),x.minimap&&jsxRuntime.jsx("button",{type:"button",className:"relationship-minimap-map",disabled:!w.pan,"aria-label":g.minimap,onClick:B=>{if(B.detail===0){U();return}let H=B.currentTarget.getBoundingClientRect(),ne=(B.clientX-H.left)/H.width*pe.width+pe.x,fe=(B.clientY-H.top)/H.height*pe.height+pe.y;G({...z,x:N.width/(2*z.z)-ne,y:N.height/(2*z.z)-fe});},children:jsxRuntime.jsxs("svg",{viewBox:`${pe.x} ${pe.y} ${pe.width} ${pe.height}`,style:{height:x.minimapHeight},preserveAspectRatio:"none","aria-hidden":"true",children:[e.edges.map(B=>{let H=W.get(B.sourceId),ne=W.get(B.targetId);return H&&ne?jsxRuntime.jsx("line",{x1:H.x,y1:H.y,x2:ne.x,y2:ne.y,stroke:"currentColor",strokeWidth:2,opacity:.2},B.id):null}),K.map(B=>jsxRuntime.jsx("circle",{cx:B.x,cy:B.y,r:B.role==="focus"?14:8,fill:B.color},B.id)),jsxRuntime.jsx("rect",{x:-z.x,y:-z.y,width:N.width/z.z,height:N.height/z.z,fill:"currentColor",fillOpacity:.07,stroke:"currentColor",strokeWidth:4})]})})]})]})}r(Mu,"RelationshipGraph2D");var Jx={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)))"},Xx={nodes:{showIcons:false,glow:false,contextOpacity:1},edges:{glow:false,opacityScale:3,widthScale:.5}};function Pu({nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,ariaLabel:a="Relationship graph",className:s,height:i=440}){let m=xt(),c=nn(),d=JSON.stringify([e,t]),g=st.useMemo(()=>li(e,t),[d]),u=st.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=Jx[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=st.useMemo(()=>new Map(e.map(b=>[b.id,b])),[d]),f=st.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 jsxRuntime.jsx("div",{"data-monkeys-component":"workbench-relationship-graph","data-workbench-relationship-variant":"force-2d",className:l("relative h-[var(--relationship-height)] min-h-0 min-w-0 overflow-hidden",s),style:{"--relationship-height":`${i}px`},children:jsxRuntime.jsx(Mu,{model:u,config:Xx,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(Pu,"RelationshipForce2D");var Zx={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"},Qx={primary:"--radar-series-one",secondary:"--radar-series-two",accent:"--radar-series-three",muted:"--radar-series-four"},ev={primary:"var(--primary)",secondary:"var(--secondary-foreground)",accent:"var(--accent-foreground)",muted:"var(--muted-foreground)"},fi=r((e,t=1)=>`hsl(var(${Qx[e]}, ${ev[e]}) / ${t})`,"radarToneColor"),tv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activateNode");function ov({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 A(i)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:i}):null;if(d==="galaxy")return jsxRuntime.jsx(xu,{nodes:e,edges:t,selectedNodeId:o,onNodeSelect:n,ariaLabel:m,className:c});if(d==="force-2d")return jsxRuntime.jsx(Pu,{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),w=Math.PI*2*v/f.length-Math.PI/2;return [h.id,{x:a/2+Math.cos(w)*u,y:s/2+Math.sin(w)*u}]}));return jsxRuntime.jsx("div",{"data-monkeys-component":"workbench-relationship-graph","data-workbench-relationship-variant":d,className:l("relative min-w-0 overflow-hidden rounded-lg border",g?"min-h-[42rem]":"overflow-x-auto border-border/70 bg-card",c),style:g?{backgroundColor:"hsl(var(--radar-canvas, var(--background)))",borderColor:"hsl(var(--radar-shell-border, var(--border)))",backgroundImage:"linear-gradient(hsl(var(--radar-grid, var(--border)) / 0.28) 1px, transparent 1px), linear-gradient(90deg, hsl(var(--radar-grid, var(--border)) / 0.28) 1px, transparent 1px), radial-gradient(circle at center, hsl(var(--primary) / 0.1), transparent 45%)",backgroundSize:"4rem 4rem, 4rem 4rem, 100% 100%"}:void 0,children:jsxRuntime.jsxs("svg",{viewBox:`0 0 ${a} ${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),w=b.get(h.targetId);return !v||!w?null:jsxRuntime.jsx("line",{x1:v.x,y1:v.y,x2:w.x,y2:w.y,className:g?void 0:"stroke-border",strokeWidth:g?"2":"1.5",style:g?{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.46)",filter:"drop-shadow(0 0 0.35rem hsl(var(--primary) / 0.34))"}:void 0,children:jsxRuntime.jsx("title",{children: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,w=h.tone||"muted",x=g?{color:fi(w)}:void 0;return jsxRuntime.jsxs("g",{transform:`translate(${y.x}, ${y.y})`,role:n?"button":void 0,tabIndex:n?0:void 0,"aria-label":h.meta?`${h.label}, ${h.meta}`:h.label,"aria-pressed":n?v:void 0,onClick:n?()=>n(h):void 0,onKeyDown:k=>tv(k,h,n),className:l(g?"outline-hidden":Zx[w],n&&"cursor-pointer outline-hidden"),style:x,children:[jsxRuntime.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:fi(w,v?.22:.12),stroke:fi(w,v?1:.78),filter:`drop-shadow(0 0 ${v?"1.4rem":"0.75rem"} ${fi(w,.62)})`}:void 0}),jsxRuntime.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?jsxRuntime.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(ov,"WorkbenchRelationshipGraph");var rv={primary:"fill-primary stroke-primary",secondary:"fill-secondary stroke-secondary-foreground",accent:"fill-accent stroke-accent-foreground",muted:"fill-muted stroke-muted-foreground"},av=r(e=>e.filter(Number.isFinite),"finiteValues"),al=r((e,t,o)=>{let n=av(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"),Vr=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"),iv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activatePoint");function sv({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 A(c)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:c}):null;let p=56,f=al(u.map(S=>S.x),t.min,t.max),b=al(u.map(S=>S.y),o.min,o.max),h=al(u.map(S=>S.size??1)),y=p,v=i-p,w=p,x=m-p,k=Number.isFinite(n?.x)?Vr(Number(n?.x),f,y,v):void 0,C=Number.isFinite(n?.y)?Vr(Number(n?.y),b,x,w):void 0;return jsxRuntime.jsx("div",{"data-monkeys-component":"workbench-scatter-plot",className:l("min-w-0 overflow-x-auto rounded-lg border border-border/70 bg-card p-3",g),children:jsxRuntime.jsxs("svg",{viewBox:`0 0 ${i} ${m}`,className:"min-w-[42rem]",role:"img","aria-label":d,children:[jsxRuntime.jsx("line",{x1:y,y1:x,x2:v,y2:x,className:"stroke-border"}),jsxRuntime.jsx("line",{x1:y,y1:w,x2:y,y2:x,className:"stroke-border"}),k===void 0?null:jsxRuntime.jsx("line",{x1:yn(k,y,v),y1:w,x2:yn(k,y,v),y2:x,className:"stroke-muted-foreground/50",strokeDasharray:"5 5"}),C===void 0?null:jsxRuntime.jsx("line",{x1:y,y1:yn(C,w,x),x2:v,y2:yn(C,w,x),className:"stroke-muted-foreground/50",strokeDasharray:"5 5"}),jsxRuntime.jsx("text",{x:i/2,y:m-12,textAnchor:"middle",className:"fill-muted-foreground text-xs",children:t.label}),jsxRuntime.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(Vr(S.x,f,y,v),y,v),E=yn(Vr(S.y,b,x,w),w,x),R=S.size===void 0?9:yn(Vr(S.size,h,7,18),7,18),F=a===S.id;return jsxRuntime.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?F:void 0,onClick:s?()=>s(S):void 0,onKeyDown:_=>iv(_,S,s),className:l(s&&"cursor-pointer outline-hidden"),children:[jsxRuntime.jsx("circle",{r:R,className:l("stroke-1 opacity-80 transition-opacity duration-150 motion-reduce:transition-none",rv[S.tone||"primary"],F?"opacity-100 stroke-[3]":"hover:opacity-100")}),jsxRuntime.jsx("text",{y:-R-7,textAnchor:"middle",className:"pointer-events-none fill-foreground text-[0.6875rem] font-semibold",children:S.label.slice(0,24)}),jsxRuntime.jsx("title",{children:S.description||S.label})]},S.id)})]})})}r(sv,"WorkbenchScatterPlot");var dv=r((e,t,o)=>{!o||t.disabled||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activateItem");function cv({items:e,onItemSelect:t,ariaLabel:o="Journey",className:n}){return jsxRuntime.jsx("nav",{"aria-label":o,"data-monkeys-component":"workbench-journey-navigation",className:l("min-w-0 overflow-x-auto rounded-lg border border-border/70 bg-card p-2",n),children:jsxRuntime.jsx("ol",{className:"flex min-w-max items-stretch gap-1",children:e.map((a,s)=>{let i=a.state||"upcoming";return jsxRuntime.jsxs("li",{className:"flex items-center",children:[s?jsxRuntime.jsx("span",{className:"mx-1 h-px w-5 bg-border","aria-hidden":"true"}):null,jsxRuntime.jsxs("button",{type:"button",disabled:a.disabled,"aria-current":i==="current"?"page":void 0,onClick:t&&!a.disabled?()=>t(a):void 0,onKeyDown:m=>dv(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:[A(a.eyebrow)?jsxRuntime.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,jsxRuntime.jsx("span",{className:"mt-0.5 block text-xs font-semibold",children:a.label})]})]},a.id)})})})}r(cv,"WorkbenchJourneyNavigation");var uv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activateItem");function mv({items:e,selectedItemId:t,onItemSelect:o,emptyState:n=null,ariaLabel:a="Ranked items",className:s}){return e.length?jsxRuntime.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 jsxRuntime.jsx("li",{children:jsxRuntime.jsxs("button",{type:"button","aria-pressed":o?c:void 0,onClick:o?()=>o(i):void 0,onKeyDown:d=>uv(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:[jsxRuntime.jsx("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-semibold tabular-nums text-muted-foreground",children:i.leading||m+1}),jsxRuntime.jsxs("span",{className:"min-w-0",children:[jsxRuntime.jsx("span",{className:"block truncate text-sm font-semibold text-foreground",children:i.label}),A(i.description)?jsxRuntime.jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:i.description}):null,i.tags?.length?jsxRuntime.jsx("span",{className:"mt-2 flex flex-wrap gap-1.5",children:i.tags.map((d,g)=>jsxRuntime.jsx("span",{className:"rounded-full bg-secondary px-2 py-0.5 text-[0.625rem] font-medium text-secondary-foreground",children:d},`${i.id}:tag:${g}`))}):null,i.metrics?.length?jsxRuntime.jsx("span",{className:"mt-2 grid grid-cols-2 gap-x-4 gap-y-1 sm:grid-cols-4",children:i.metrics.map(d=>jsxRuntime.jsxs("span",{className:"min-w-0",children:[jsxRuntime.jsx("span",{className:"block truncate text-[0.625rem] text-muted-foreground",children:d.label}),jsxRuntime.jsx("span",{className:"block text-xs font-semibold tabular-nums text-foreground",children:d.value})]},d.id))}):null]}),jsxRuntime.jsxs("span",{className:"shrink-0 text-right",children:[A(i.score)?jsxRuntime.jsx("span",{className:"block text-lg font-semibold tabular-nums text-primary",children:i.score}):null,A(i.trailing)?jsxRuntime.jsx("span",{className:"mt-1 block text-muted-foreground",children:i.trailing}):null]})]})},i.id)})}):A(n)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:n}):null}r(mv,"WorkbenchRankedList");function gv({title:e,description:t,items:o,onRemove:n,removeLabel:a=r(()=>"Remove","removeLabel"),actions:s,emptyState:i=null,className:m}){return jsxRuntime.jsxs("section",{"data-monkeys-component":"workbench-selection-tray",className:l("rounded-lg border border-border/70 bg-card p-4 text-card-foreground",m),children:[jsxRuntime.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("h2",{className:"text-sm font-semibold text-foreground",children:e}),A(t)?jsxRuntime.jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground",children:t}):null]}),jsxRuntime.jsx("span",{className:"rounded-full bg-primary/10 px-2.5 py-1 text-xs font-semibold tabular-nums text-primary",children:o.length})]}),o.length?jsxRuntime.jsx("ul",{className:"mt-3 flex flex-wrap gap-2",children:o.map(c=>jsxRuntime.jsxs("li",{className:"flex max-w-full items-center gap-2 rounded-full border border-border bg-background px-3 py-1.5 text-xs text-foreground",children:[jsxRuntime.jsx("span",{className:"min-w-0 truncate font-medium",children:c.label}),A(c.meta)?jsxRuntime.jsx("span",{className:"shrink-0 text-muted-foreground",children:c.meta}):null,n?jsxRuntime.jsx("button",{type:"button","aria-label":a(c),onClick:()=>n(c),className:"rounded-md px-1 text-muted-foreground outline-hidden hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:"\xD7"}):null]},c.id))}):jsxRuntime.jsx("div",{className:"mt-3 rounded-md border border-dashed border-border px-4 py-5 text-center text-xs text-muted-foreground",children:i}),A(s)?jsxRuntime.jsx("div",{className:"mt-4 flex flex-wrap justify-end gap-2 border-t border-border pt-4",children:s}):null]})}r(gv,"WorkbenchSelectionTray");function xi(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(xi,"renderDateTimeValue");function bv({items:e,emptyState:t=null,ariaLabel:o="Evidence",className:n,translate:a=r(s=>s,"translate")}){let{locale:s}=ht();return e.length?jsxRuntime.jsx("ol",{"aria-label":o,"data-monkeys-component":"workbench-evidence-list",className:l("grid min-w-0 gap-0",n),children:e.map((i,m)=>jsxRuntime.jsxs("li",{className:"grid min-w-0 grid-cols-[1.25rem_minmax(0,1fr)_auto] gap-3",children:[jsxRuntime.jsxs("span",{className:"flex flex-col items-center","aria-hidden":"true",children:[jsxRuntime.jsx("span",{className:"mt-1 flex size-5 items-center justify-center rounded-full border border-primary/40 bg-primary/10 text-[0.625rem] font-semibold text-primary",children:i.marker||m+1}),m<e.length-1?jsxRuntime.jsx("span",{className:"min-h-8 w-px flex-1 bg-border"}):null]}),jsxRuntime.jsxs("span",{className:"min-w-0 pb-5",children:[jsxRuntime.jsx("span",{className:"block text-sm font-semibold text-foreground",children:i.titleKey?a(i.titleKey):i.title}),A(i.description)||i.descriptionKey?jsxRuntime.jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:i.descriptionKey?a(i.descriptionKey):i.description}):null,A(i.source)||i.sourceKey||A(i.timestamp)||i.timestampValue!==void 0?jsxRuntime.jsxs("span",{className:"mt-1.5 flex flex-wrap gap-x-3 gap-y-1 text-[0.6875rem] text-muted-foreground",children:[A(i.source)||i.sourceKey?jsxRuntime.jsx("span",{children:i.sourceKey?a(i.sourceKey):i.source}):null,A(i.timestamp)||i.timestampValue!==void 0?jsxRuntime.jsx("time",{children:i.timestampValue!==void 0?xi(i.timestampValue,"milliseconds",s):i.timestamp}):null]}):null]}),A(i.action)?jsxRuntime.jsx("span",{className:"pb-5",children:i.action}):null]},i.id))}):A(t)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:t}):null}r(bv,"WorkbenchEvidenceList");var hv=st.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 jsxRuntime.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 vv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activateItem");function kv({items:e,selectedItemId:t,onItemSelect:o,emptyState:n=null,ariaLabel:a="Assets",className:s}){return e.length?jsxRuntime.jsx("div",{"data-monkeys-component":"workbench-asset-gallery",children:jsxRuntime.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 jsxRuntime.jsxs("button",{type:"button","aria-pressed":o?m:void 0,onClick:o?()=>o(i):void 0,onKeyDown:c=>vv(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:[jsxRuntime.jsx("span",{className:"block aspect-[4/3] overflow-hidden bg-muted",children:jsxRuntime.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"})}),jsxRuntime.jsxs("span",{className:"block p-3",children:[A(i.title)?jsxRuntime.jsx("span",{className:"block truncate text-sm font-semibold text-foreground",children:i.title}):null,A(i.description)?jsxRuntime.jsx("span",{className:"mt-1 block text-xs leading-5 text-muted-foreground",children:i.description}):null,i.badges?.length?jsxRuntime.jsx("span",{className:"mt-2 flex flex-wrap gap-1.5",children:i.badges.map((c,d)=>jsxRuntime.jsx("span",{className:"rounded-full bg-secondary px-2 py-0.5 text-[0.625rem] text-secondary-foreground",children:c},`${i.id}:badge:${d}`))}):null]})]})}})}):A(n)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:n}):null}r(kv,"WorkbenchAssetGallery");var Au={primary:"--radar-series-one",secondary:"--radar-series-two",accent:"--radar-series-three",muted:"--radar-series-four"},zu={primary:"var(--primary)",secondary:"var(--secondary-foreground)",accent:"var(--accent-foreground)",muted:"var(--muted-foreground)"},hn=r(e=>`hsl(var(${Au[e]}, ${zu[e]}))`,"workbenchVisualizationToneColor"),_r=r((e,t)=>`hsl(var(${Au[e]}, ${zu[e]}) / ${t})`,"workbenchVisualizationToneColorWithAlpha");var Cv={backgroundColor:"hsl(var(--radar-canvas, var(--background)))",color:"hsl(var(--foreground))"},Ou={backgroundColor:"hsl(var(--radar-panel, var(--card)))",borderColor:"hsl(var(--radar-border, var(--border)))"};function Fu({items:e,activeItemId:t,activeChildId:o,onItemSelect:n,onChildSelect:a,footer:s,ariaLabel:i="Radar navigation"}){return jsxRuntime.jsx(kr,{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:Ou})}r(Fu,"WorkbenchRadarNavigation");function Sv({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 jsxRuntime.jsxs("section",{"data-monkeys-component":"workbench-radar-workspace","data-radar-active-navigation-id":t,"aria-label":f,className:l("grid min-w-0 gap-3 overflow-hidden p-3 lg:grid-cols-[12.5rem_minmax(0,1fr)] xl:grid-cols-[12.5rem_minmax(0,1fr)_20rem]",g),style:{...Cv,minHeight:p},children:[A(i)?i:jsxRuntime.jsx(Fu,{items:e,activeItemId:t,activeChildId:o,onItemSelect:n,onChildSelect:a,footer:s}),jsxRuntime.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}),A(c)?jsxRuntime.jsx("aside",{"aria-label":d,"data-radar-workspace-region":"inspector",className:"min-h-0 overflow-y-auto rounded-lg border lg:col-span-2 xl:col-span-1",style:Ou,children:c}):null]})}r(Sv,"WorkbenchRadarWorkspace");function Tv({title:e,icon:t,description:o,children:n,className:a}){return jsxRuntime.jsxs("section",{"data-monkeys-component":"workbench-radar-inspector-section",className:l("border-b border-border/70 p-4 last:border-b-0",a),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold text-primary",children:[A(t)?jsxRuntime.jsx("span",{"aria-hidden":"true",children:t}):null,jsxRuntime.jsx("h2",{children:e})]}),A(o)?jsxRuntime.jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground",children:o}):null,A(n)?jsxRuntime.jsx("div",{className:"mt-3",children:n}):null]})}r(Tv,"WorkbenchRadarInspectorSection");function Rv(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(Rv,"assertValidRadarFilterRowProps");function Nv(e){Rv(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=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[A(n)?jsxRuntime.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,jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:t}),A(o)?jsxRuntime.jsx("span",{className:"ml-auto shrink-0 tabular-nums text-muted-foreground",children:o}):null]}),v=c?jsxRuntime.jsx("span",{"aria-hidden":"true",className:l("text-lg leading-none transition-transform motion-reduce:transition-none",c.expanded&&"rotate-90"),children:"\u203A"}):null;if(c?.mode==="separate"){let k=c.expanded?c.collapseLabel:c.expandLabel;return jsxRuntime.jsxs("div",{"data-monkeys-component":"workbench-radar-filter-row",className:l("monkeys-workbench-radar-filter-row monkeys-workbench-radar-filter-row--separate",u,p,d),style:h,children:[jsxRuntime.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}),jsxRuntime.jsx("button",{type:"button","aria-expanded":c.expanded,"aria-controls":c.controls,"aria-label":k,disabled:s,onClick:c.onToggle,className:l("monkeys-workbench-radar-filter-row__disclosure",p),children:v})]})}let w=c?.mode==="integrated"?c:void 0,x=w?w.expanded?w.collapseLabel:w.expandLabel:void 0;return jsxRuntime.jsxs("button",{type:"button","data-monkeys-component":"workbench-radar-filter-row","aria-label":x,"aria-pressed":w?void 0:a,"aria-expanded":w?.expanded,"aria-controls":w?.controls,disabled:s,onClick:w?.onToggle??m,className:l("monkeys-workbench-radar-filter-control monkeys-workbench-radar-filter-row",u,p,d),style:h,children:[y,w?jsxRuntime.jsx("span",{className:"ml-auto shrink-0 text-muted-foreground",children:v}):null]})}r(Nv,"WorkbenchRadarFilterRow");function Iv({label:e,value:t,icon:o,selected:n=false,disabled:a=false,onSelect:s,className:i}){let m=!!s||a;return jsxRuntime.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:[A(o)?jsxRuntime.jsx("span",{className:"shrink-0","aria-hidden":"true",children:o}):null,jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:e}),A(t)?jsxRuntime.jsx("span",{className:"ml-auto shrink-0 text-muted-foreground",children:t}):null]})}r(Iv,"WorkbenchRadarFilterChip");var Bv=r(e=>e.filter(Number.isFinite),"finiteValues"),il=r((e,t,o)=>{let n=Bv(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"),Pv=r((e,t,o)=>{!o||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),o(t));},"activatePoint"),Ev={"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 Dv({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(R=>Number.isFinite(R.x)&&Number.isFinite(R.y));if(!b.length)return A(u)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:u}):null;let h=il(b.map(R=>R.x),t.min,t.max),y=il(b.map(R=>R.y),o.min,o.max),v=il(b.map(R=>R.size??1)),w=0,x=c,k=0,C=d,S=tn(en(Number.isFinite(n?.x)?Number(n?.x):(h[0]+h[1])/2,h,w,x),w,x),T=tn(en(Number.isFinite(n?.y)?Number(n?.y):(y[0]+y[1])/2,y,C,k),k,C),E=new Set([...b].sort((R,F)=>(F.size??0)-(R.size??0)).slice(0,g).map(R=>R.id));return jsxRuntime.jsxs("div",{"data-monkeys-component":"workbench-radar-matrix",className:l("relative size-full min-h-[42rem] min-w-0 overflow-hidden",f),style:{backgroundColor:"hsl(var(--radar-canvas, var(--background)))",backgroundImage:"radial-gradient(circle at 78% 20%, hsl(var(--primary) / 0.08), transparent 32%), radial-gradient(circle at 18% 82%, hsl(var(--radar-series-two, var(--accent-foreground)) / 0.06), transparent 30%)"},children:[jsxRuntime.jsxs("svg",{viewBox:`0 0 ${c} ${d}`,preserveAspectRatio:"none",className:"absolute inset-0 size-full",role:"img","aria-label":p,children:[jsxRuntime.jsxs("g",{"aria-hidden":"true",children:[Array.from({length:13},(R,F)=>{let _=c/12*F,z=d/12*F;return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:_,y1:0,x2:_,y2:d,style:{stroke:"hsl(var(--radar-grid, var(--border)) / 0.36)"}}),jsxRuntime.jsx("line",{x1:0,y1:z,x2:c,y2:z,style:{stroke:"hsl(var(--radar-grid, var(--border)) / 0.36)"}})]},F)}),jsxRuntime.jsx("line",{x1:S,y1:0,x2:S,y2:d,strokeWidth:"1.5",style:{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.64)"}}),jsxRuntime.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(R=>{let F=Ev[R.id];return jsxRuntime.jsxs("g",{"aria-hidden":"true",children:[jsxRuntime.jsx("text",{x:F.x,y:F.y+20,textAnchor:F.anchor,className:"fill-muted-foreground text-[0.8125rem] font-semibold",children:R.title}),A(R.description)&&typeof R.description=="string"?jsxRuntime.jsx("text",{x:F.x,y:F.y+40,textAnchor:F.anchor,className:"fill-muted-foreground text-[0.6875rem]",children:R.description}):null]},R.id)}),b.map((R,F)=>{let _=tn(en(R.x,h,40,c-40),40,c-40),z=tn(en(R.y,y,d-48,54),54,d-48),O=R.tone||(F%2===0?"primary":"accent"),j=i===R.id,I=E.has(R.id),V=I?tn(en(R.size??1,v,5,9),5,9):3.5,$=I?tn(en(R.size??1,v,14,31),14,31):0,N={fill:hn(O),stroke:"hsl(var(--foreground) / 0.74)"},D={fill:hn(O),filter:`drop-shadow(0 0 0.65rem ${_r(O,.72)})`};return jsxRuntime.jsxs("g",{transform:`translate(${_}, ${z})`,role:m?"button":void 0,tabIndex:m?0:void 0,"aria-label":`${R.label}: ${t.label} ${R.x}, ${o.label} ${R.y}`,"aria-pressed":m?j:void 0,onClick:m?()=>m(R):void 0,onKeyDown:M=>Pv(M,R,m),className:l(m&&"cursor-pointer outline-hidden"),children:[j?jsxRuntime.jsx("circle",{r:V+10,fill:"none",strokeWidth:"2",style:{stroke:_r(O,.48)}}):null,jsxRuntime.jsx("circle",{r:V,strokeWidth:"1.25",style:N}),I?jsxRuntime.jsx("text",{y:-V-8,textAnchor:"middle",fontSize:$,fontWeight:"700",style:D,className:"pointer-events-none",children:R.label.slice(0,22)}):null,jsxRuntime.jsx("title",{children:R.description||R.label})]},R.id)}),jsxRuntime.jsx("circle",{cx:S,cy:T,r:"10",style:{fill:"hsl(var(--radar-axis, var(--primary)))"}}),jsxRuntime.jsx("circle",{cx:S,cy:T,r:"3",className:"fill-primary-foreground"}),jsxRuntime.jsx("text",{x:c/2,y:d-12,textAnchor:"middle",className:"fill-muted-foreground text-[0.6875rem]",children:t.label}),jsxRuntime.jsx("text",{x:"14",y:d/2,textAnchor:"middle",transform:`rotate(-90 14 ${d/2})`,className:"fill-muted-foreground text-[0.6875rem]",children:o.label})]}),jsxRuntime.jsxs("div",{className:"absolute bottom-4 left-4 hidden w-44 overflow-hidden rounded-[var(--radius)] border bg-card/95 shadow-xl sm:block",style:{borderColor:"hsl(var(--radar-border, var(--border)))"},"aria-hidden":"true",children:[jsxRuntime.jsxs("div",{className:"flex h-9 items-center justify-between border-b border-border px-3 text-xs font-semibold text-muted-foreground",children:[jsxRuntime.jsx("span",{children:"\u2212"}),jsxRuntime.jsx("span",{children:"100%"}),jsxRuntime.jsx("span",{children:"\uFF0B"})]}),jsxRuntime.jsxs("svg",{viewBox:`0 0 ${c} ${d}`,className:"h-24 w-full",children:[jsxRuntime.jsx("rect",{width:c,height:d,style:{fill:"hsl(var(--radar-canvas, var(--background)))"}}),jsxRuntime.jsx("line",{x1:S,y1:0,x2:S,y2:d,style:{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.7)"},strokeWidth:"6"}),jsxRuntime.jsx("line",{x1:0,y1:T,x2:c,y2:T,style:{stroke:"hsl(var(--radar-axis, var(--primary)) / 0.7)"},strokeWidth:"6"}),b.map((R,F)=>jsxRuntime.jsx("circle",{cx:tn(en(R.x,h,40,c-40),40,c-40),cy:tn(en(R.y,y,d-48,54),54,d-48),r:"8",style:{fill:hn(R.tone||(F%2===0?"primary":"accent"))}},R.id)),jsxRuntime.jsx("rect",{x:c*.22,y:d*.12,width:c*.58,height:d*.62,fill:"none",strokeWidth:"8",style:{stroke:"hsl(var(--primary))"}})]})]}),s.length?jsxRuntime.jsx("div",{className:"absolute bottom-4 left-1/2 hidden -translate-x-1/2 items-center gap-4 rounded-full border border-border bg-card/95 px-4 py-2 text-xs font-semibold shadow-xl md:flex",children:s.map(R=>{let F=R.tone||"muted";return jsxRuntime.jsxs("span",{className:"flex items-center gap-2 text-muted-foreground",children:[jsxRuntime.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:hn(F)}}),R.label]},R.id)})}):null]})}r(Dv,"WorkbenchRadarMatrix");var Vu=2048,ll=2*1024*1024,dl=class dl extends Error{constructor(o,n,a){super(o);this.code=o;this.expectedSequence=n;this.receivedSequence=a;this.name="RuntimeTerminalOutputError";}};r(dl,"RuntimeTerminalOutputError");var jr=dl;function _u(e,t){let o=r((u,p)=>{throw new jr(u,e.highWater+1,p)},"fail");if(!Array.isArray(t))return o("invalid-frame");if(t.length>Vu)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>ll)return o("output-budget-exceeded",u.sequence);let p=new TextEncoder().encode(u.data).byteLength;if(m+=p,m>ll)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>Vu||d>ll;)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(_u,"prepareRuntimeTerminalOutput");function Lv(e){let t=st.useRef(null),o=st.useRef(e);o.current=e;let n=st.useRef();return st.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 jr?h:new jr("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 w=r((T,E)=>{let R=Zt(E,"link");f()&&R&&/^https?:\/\//i.test(R)&&window.open(R,"_blank","noopener,noreferrer");},"openLink"),x=new h({linkHandler:{activate:w},cursorBlink:true,disableStdin:o.current.disabled===true,fontSize:13,fontFamily:'"JetBrains Mono", Menlo, Monaco, "Courier New", monospace'});m=x;let k=new y;x.loadAddon(k),x.loadAddon(new v(w)),x.open(s);let C=r(()=>{if(!f())return;k.fit();let T=k.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=_u(p,T);E.append.length&&x.write(E.append.map(R=>R.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]),st.useEffect(()=>{let a=n.current;a?.sessionKey===e.sessionKey&&(a.terminal.options.disableStdin=e.disabled===true,a.write(e.output));},[e.sessionKey,e.output,e.disabled]),jsxRuntime.jsxs("div",{className:e.className,style:e.style,children:[jsxRuntime.jsx("div",{role:"status",children:e.statusLabel}),jsxRuntime.jsx("div",{ref:t,className:"h-full min-h-48 w-full rounded-2xl"})]})}r(Lv,"RuntimeTerminalView");var zv={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 ju(e){let{locale:t}=ht();return (o,n)=>{let a=`monkeys.design.runtimeFiles.${o}`,s=e?.(a);return (s&&s!==a?s:zv[o][t.toLowerCase().startsWith("zh")?"zh":"en"]).replace(/\{([A-Za-z]+)\}/g,(m,c)=>n?.[c]??m)}}r(ju,"useRuntimeFileCopy");var Kr=r(e=>new TextEncoder().encode(e).byteLength,"bytes"),ki=r(e=>({...e,value:e.content}),"fromFile");function jv(e){return jsxRuntime.jsx($v,{...e},JSON.stringify([e.model.scopeId]))}r(jv,"RuntimeFileExplorer");function $v(e){let{model:t,onIntent:o,renderEditor:n,renderPreview:a,renderDiff:s,onDraftStateChange:i,translate:m}=e,{locale:c}=ht(),d=ju(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=st.useRef(true);st.useEffect(()=>(g.current=true,()=>{g.current=false;}),[]);let[u,p]=st.useState(false),[f,b]=st.useState(t.search??""),[h,y]=st.useState(false);st.useEffect(()=>b(t.search??""),[t.search]),st.useEffect(()=>{if(typeof window.matchMedia!="function")return;let L=window.matchMedia("(max-width: 767px)"),X=r(()=>p(L.matches),"update");return X(),L.addEventListener("change",X),()=>L.removeEventListener("change",X)},[]);let[v,w]=st.useState(()=>t.openFile?ki(t.openFile):null),[x,k]=st.useState(null),[C,S]=st.useState(false),[T,E]=st.useState(""),[R,F]=st.useState(null),[_,z]=st.useState(""),[O,j]=st.useState("file"),I=st.useRef(null),V=st.useRef(null),$=v!==null&&v.value!==v.content,N=Number.isSafeInteger(t.maxTextBytes)&&t.maxTextBytes>0?Math.min(t.maxTextBytes,1024*1024):1024*1024,D=v!==null&&Kr(v.value)>N,M=t.disabled===true||t.saving===true,K=v?.readOnly===true||t.openFile?.path===v?.path&&t.openFile?.readOnly===true,J=st.useRef({blocked:M,draft:v,readOnly:K,conflict:C,tooLarge:D});J.current={blocked:M,draft:v,readOnly:K,conflict:C,tooLarge:D};let G=t.preview?.path,te=t.activeView==="diff",U=t.diff?.path??v?.path??t.selectedPath??"";st.useEffect(()=>{if(te||t.preview){let se=te?`diff:${U}`:G;if($&&V.current!==se){S(true);return}v&&w(null),I.current=null,V.current=null,S(false);return}let L=t.openFile;if(!L){$?S(true):(w(null),S(false));return}if(!v||L.path!==v.path){if($&&V.current!==L.path){S(true);return}V.current=null,I.current=null,w(ki(L)),S(false);return}if(L.revision===v.revision&&L.content===v.content)return;let X=I.current;if(X&&X.path===L.path&&L.revision!==X.revision&&L.content===X.content){w({...L,value:v.value}),I.current=null,S(false);return}if($){S(true);return}w(ki(L)),S(false);},[t.openFile?.path,t.openFile?.revision,t.openFile?.content,t.preview,te,t.diff?.identity]),st.useEffect(()=>{if(!$)return;let L=r(X=>{X.preventDefault(),X.returnValue="";},"beforeUnload");return window.addEventListener("beforeunload",L),()=>window.removeEventListener("beforeunload",L)},[$]);let Z=st.useRef(i);Z.current=i,st.useEffect(()=>{Z.current?.({path:v?.path??null,revision:v?.revision??null,dirty:$});},[v?.path,v?.revision,$]);let ae=r(L=>{if(g.current){switch(L.type){case "select":if(e.onSelect)return e.onSelect(L);break;case "expand":if(e.onExpand)return e.onExpand(L);break;case "view-mode":if(e.onViewMode)return e.onViewMode(L);break;case "search":if(e.onSearch)return e.onSearch(L);break;case "edit":if(e.onEdit)return e.onEdit(L);break;case "save":if(e.onSave)return e.onSave(L);break;case "create":if(e.onCreate)return e.onCreate(L);break;case "rename":if(e.onRename)return e.onRename(L);break;case "delete":if(e.onDelete)return e.onDelete(L);break;case "download":if(e.onDownload)return e.onDownload(L);break;case "open-diff":if(e.onOpenDiff)return e.onOpenDiff(L);break;case "refresh":if(e.onRefresh)return e.onRefresh(L);break;case "sourcecontrol":if(e.onSourceControl)return e.onSourceControl(L);break}o?.(L);}},"route"),ie=r(L=>{if(!(M||!g.current)){if(L.type==="delete"||$&&(L.type==="sourcecontrol"||L.type==="open-diff"||L.type==="select"&&L.path!==v?.path)){k(L);return}ae(L);}},"send"),de=r(L=>{!g.current||J.current.draft!==v||!v||M||J.current.blocked||J.current.readOnly||J.current.conflict||K||C||Kr(L)>N||(w({...v,value:L}),ae({type:"edit",path:v.path,expectedRevision:v.revision,content:L}));},"change"),W=r(()=>{!g.current||J.current.draft!==v||!v||M||J.current.blocked||J.current.readOnly||J.current.conflict||J.current.tooLarge||K||C||D||!$||(I.current={path:v.path,revision:v.revision,content:v.value},ae({type:"save",path:v.path,expectedRevision:v.revision,content:v.value}));},"save"),pe=t.viewMode==="detailed"&&u?"compact":t.viewMode??"simple",B=new Set(t.expandedPaths??(()=>{let L=[],X=r(se=>{for(let Y of se)Y.expanded&&L.push(Y.path),Y.children&&X(Y.children);},"visit");return X(t.nodes),L})()),H=(t.search??"").trim().toLocaleLowerCase(c),ne=r(L=>L.flatMap(X=>{let se=X.children?ne(X.children):void 0;return !H||X.name.toLocaleLowerCase(c).includes(H)||X.path.toLocaleLowerCase(c).includes(H)||se?.length?[{...X,children:se}]:[]}),"filterTree"),fe=ne(t.nodes),ye=r(L=>{let X=new Set(B);if(X.has(L.path)?X.delete(L.path):X.add(L.path),X.size>1e4||Kr(JSON.stringify([...X]))>1024*1024){y(true);return}y(false),ie({type:"expand",path:L.path,expandedPaths:[...X]});},"toggle"),xe=r(L=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{children:Number.isSafeInteger(L.size)&&L.size>=0?new Intl.NumberFormat(c).format(L.size):"\u2014"}),jsxRuntime.jsx("span",{children:L.modified?xi(L.modified,"milliseconds",c):"\u2014"}),jsxRuntime.jsx("span",{children:L.permissionsRwx??"\u2014"}),jsxRuntime.jsx("span",{children:L.mimeType??"\u2014"})]}),"metadata"),oe=r(L=>jsxRuntime.jsx("ul",{className:"space-y-1",children:L.map(X=>jsxRuntime.jsxs("li",{children:[jsxRuntime.jsxs("div",{className:pe==="detailed"?"grid min-w-[44rem] grid-cols-[minmax(10rem,1fr)_6rem_10rem_6rem_8rem_auto] items-center gap-2":"flex min-w-0 items-center gap-2",children:[jsxRuntime.jsxs(ve,{className:"min-w-0 flex-1 justify-start truncate border-transparent",classNames:{label:"min-w-0 truncate"},icon:X.type==="directory"?B.has(X.path)?jsxRuntime.jsx(lucideReact.ChevronDown,{size:14}):jsxRuntime.jsx(lucideReact.ChevronRight,{size:14}):jsxRuntime.jsx(lucideReact.FileText,{size:14}),tone:t.selectedPath===X.path?"primary":"muted",size:"sm",type:"button",disabled: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):ie({type:"select",path:X.path}),children:[X.name,X.loading?"\u2026":""]}),pe==="detailed"?xe(X):pe==="compact"&&X.type==="file"?jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:X.mimeType??""}):null,jsxRuntime.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[jsxRuntime.jsx(ve,{size:"sm",tone:"muted","aria-label":d("renameItem",{name:X.name}),disabled:M||$,onClick:()=>{z(X.path),E(X.path),F("rename");},children:jsxRuntime.jsx(lucideReact.Pencil,{size:12})}),jsxRuntime.jsx(ve,{size:"sm",tone:"muted","aria-label":d("downloadItem",{name:X.name}),disabled:M,onClick:()=>ie({type:"download",path:X.path,kind:X.type}),children:jsxRuntime.jsx(lucideReact.Download,{size:12})}),jsxRuntime.jsx(ve,{size:"sm",tone:"muted","aria-label":d("deleteItem",{name:X.name}),disabled:M||K,onClick:()=>ie({type:"delete",path:X.path,kind:X.type}),children:jsxRuntime.jsx(lucideReact.Trash2,{size:12})})]})]}),(B.has(X.path)||H)&&X.children?jsxRuntime.jsx("div",{className:"ml-3 border-l border-border pl-2",children:oe(X.children)}):null]},X.path))}),"tree"),le=v?.path??t.preview?.path??t.openFile?.path,Re=te&&!v,Ie=!v&&!Re?t.preview:null,We=t.diff,ue=We?Kr(We.original)>1024*1024||Kr(We.modified)>1024*1024:false,q=r(()=>Re?t.diffStatus==="loading"?jsxRuntime.jsx("p",{role:"status",children:d("loadingDiff")}):t.diffStatus==="error"?jsxRuntime.jsx("p",{role:"alert",children:d(t.diffErrorCode==="declarative.runtimeFiles.diffTooLarge"?"diffTooLarge":"diffUnavailable")}):ue?jsxRuntime.jsx("p",{role:"status",children:d("diffTooLarge")}):!We||We.isBinary||!s?jsxRuntime.jsx("p",{role:"status",children:d("diffUnavailable")}):s({...We,readOnly:true}):Ie?Ie.kind==="binary"?jsxRuntime.jsx("p",{role:"status",children:d("binaryUnavailable")}):Ie.kind==="too-large"?jsxRuntime.jsx("p",{role:"status",children:d("tooLarge")}):Ie.kind==="image"?a?a(Ie):jsxRuntime.jsx(Bd,{kind:"image",src:Ie.src,alt:Ie.alt??Ie.path,empty:d("imageUnavailable"),error:d("imageUnavailable")}):null:D?jsxRuntime.jsx("div",{role:"status",children:d("tooLarge")}):v?n?n({path:v.path,value:v.value,language:v.language,readOnly:M||K||C,onChange:de,onSave:W}):jsxRuntime.jsx(br,{"aria-label":v.path,value:v.value,readOnly:M||K||C,onChange:L=>de(L.currentTarget.value),onKeyDown:L=>{(L.ctrlKey||L.metaKey)&&L.key.toLowerCase()==="s"&&(L.preventDefault(),W());}}):jsxRuntime.jsx("div",{className:"flex min-h-64 items-center justify-center p-6 text-sm text-muted-foreground",children:d("empty")}),"renderContent");return jsxRuntime.jsxs("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden rounded-md border border-border bg-background","data-monkeys-component":"runtime-file-explorer","data-view-mode":pe,children:[jsxRuntime.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b border-border p-3",children:[t.viewMode!==void 0?jsxRuntime.jsxs(uo,{"aria-label":d("viewMode"),value:t.viewMode,disabled:M,onChange:L=>{let X=L.currentTarget.value;(X==="simple"||X==="compact"||X==="detailed")&&ie({type:"view-mode",value:X});},children:[jsxRuntime.jsx("option",{value:"simple",children:d("simple")}),jsxRuntime.jsx("option",{value:"compact",children:d("compact")}),jsxRuntime.jsx("option",{value:"detailed",children:d("detailed")})]}):null,t.search!==void 0?jsxRuntime.jsxs("form",{className:"flex min-w-0 flex-1 items-center gap-2",onSubmit:L=>{L.preventDefault(),ie({type:"search",value:f});},children:[jsxRuntime.jsx(Qt,{className:"min-w-0 flex-1","aria-label":d("searchFiles"),value:f,disabled:M,onChange:L=>b(L.currentTarget.value)}),jsxRuntime.jsx(ve,{type:"submit",disabled:M,children:d("search")})]}):null]}),h?jsxRuntime.jsx("p",{className:"p-3 text-sm text-destructive-text",role:"alert",children:d("tooManyExpanded")}):null,t.errorCode?jsxRuntime.jsx("p",{className:"p-3 text-sm text-destructive-text",role:"alert",children:d("operationFailed")}):null,jsxRuntime.jsxs("div",{className:pe==="detailed"?"grid min-h-0 flex-1 grid-cols-1":"grid min-h-0 flex-1 grid-cols-1 md:grid-cols-[minmax(16rem,24rem)_minmax(0,1fr)]",children:[jsxRuntime.jsxs("nav",{className:pe==="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:[pe==="detailed"?jsxRuntime.jsx("div",{className:"grid min-w-[44rem] grid-cols-[minmax(10rem,1fr)_6rem_10rem_6rem_8rem_auto] gap-2 text-xs text-muted-foreground",children:["name","size","modified","permissions","type","actions"].map(L=>jsxRuntime.jsx("span",{children:d(L)},L))}):null,fe.length?oe(fe):jsxRuntime.jsx("p",{className:"p-3 text-sm text-muted-foreground",children:d("emptyTree")})]}),jsxRuntime.jsxs("div",{className:"flex min-h-0 min-w-0 flex-col",children:[jsxRuntime.jsxs("div",{className:"flex flex-wrap items-center gap-1 border-b border-border p-2",role:"toolbar","aria-label":d("actions"),children:[jsxRuntime.jsx(ve,{disabled:M,onClick:()=>ie({type:"refresh"}),children:d("refresh")}),jsxRuntime.jsx(ve,{disabled:M,onClick:()=>ie({type:"sourcecontrol"}),children:d("sourceControl")}),jsxRuntime.jsx(ve,{disabled:M,onClick:()=>{F("create"),E("");},children:d("create")}),jsxRuntime.jsx(ve,{disabled:M||!v||K||$,onClick:()=>{z(v?.path??""),F("rename"),E(v?.path??"");},children:d("rename")}),jsxRuntime.jsx(ve,{disabled:M||!v||K,onClick:()=>v&&ie({type:"delete",path:v.path,kind:"file"}),children:d("delete")}),jsxRuntime.jsx(ve,{disabled:M||!le,onClick:()=>le&&ie({type:"download",path:le,kind:"file"}),children:d("download")}),jsxRuntime.jsx(ve,{disabled:M||!le,onClick:()=>le&&ie({type:"open-diff",path:le}),children:d("diff")}),jsxRuntime.jsx(ve,{disabled:M||!$||!v||K||C||D,onClick:W,children:d("save")})]}),R?jsxRuntime.jsxs("form",{className:"flex flex-wrap items-center gap-2 border-b border-border p-3",onSubmit:async L=>{if(L.preventDefault(),!(M||!T.trim()||R==="rename"&&(K||$)))try{R==="rename"?await ae({type:"rename",path:_,newPath:T.trim()}):await ae({type:"create",path:T.trim(),kind:O}),F(null);}catch{}},children:[R==="create"?jsxRuntime.jsxs(uo,{"aria-label":d("kind"),value:O,disabled:M,onChange:L=>j(L.currentTarget.value==="directory"?"directory":"file"),children:[jsxRuntime.jsx("option",{value:"file",children:d("file")}),jsxRuntime.jsx("option",{value:"directory",children:d("directory")})]}):null,jsxRuntime.jsx(Qt,{"aria-label":d("path"),value:T,disabled:M,onChange:L=>E(L.currentTarget.value)}),jsxRuntime.jsx(ve,{type:"submit",disabled:M||!T.trim(),children:d("apply")}),jsxRuntime.jsx(ve,{type:"button",onClick:()=>F(null),children:d("cancel")})]}):null,C?jsxRuntime.jsxs("div",{role:"alert",children:[d("changedExternally"),jsxRuntime.jsx(ve,{disabled:M,onClick:()=>k(te?{type:"open-diff",path:U}:{type:"select",path:t.preview?.path??t.openFile?.path??v?.path??""}),children:d("discardReload")})]}):null,jsxRuntime.jsx("div",{className:"min-h-80 min-w-0 flex-1 overflow-auto",children:q()})]})]}),x?jsxRuntime.jsx(ca,{open:true,onOpenChange:L=>{!L&&!M&&k(null);},children:jsxRuntime.jsxs(ln,{onEscapeKeyDown:L=>{M&&L.preventDefault();},onPointerDownOutside:L=>{M&&L.preventDefault();},children:[jsxRuntime.jsx(rr,{children:d("confirmAction")}),t.errorCode?jsxRuntime.jsx("p",{role:"alert",children:d("operationFailed")}):null,jsxRuntime.jsx(ar,{children:d(x.type==="delete"?"deleteConfirm":"discardConfirm")}),jsxRuntime.jsx(ve,{disabled:M||x.type==="delete"&&K,onClick:async()=>{if(!(M||x.type==="delete"&&K)){x.type==="open-diff"&&(V.current=`diff:${x.path}`,te&&x.path===U&&(w(null),S(false),V.current=null)),x.type==="select"&&(V.current=x.path,t.preview?.path===x.path?(w(null),S(false),V.current=null):t.openFile?.path===x.path&&(w(ki(t.openFile)),S(false),V.current=null));try{await ae(x),k(null);}catch{}}},children:d("confirm")}),jsxRuntime.jsx(ve,{disabled:M,onClick:()=>k(null),children:d("cancel")})]})}):null]})}r($v,"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"})})}),wi=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.",[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.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 Uu={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 Uv({language:e,disabled:t,onSelect:o}){let n=Ne(),[a,s]=st.useState(0),[i,m]=st.useState(false),[c,d]=st.useState(),g=st.useRef({disabled:t,onSelect:o});g.current={disabled:t,onSelect:o};let u=st.useRef(true);st.useEffect(()=>(u.current=true,()=>{u.current=false;}),[]),st.useEffect(()=>{let b=false;return m(false),Promise.all([import('@emoji-mart/react'),import('@emoji-mart/data'),Uu[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=wi[e==="zh"?"zh-CN":"en-US"];if(i)return jsxRuntime.jsxs("div",{role:"alert",className:"flex items-center gap-2 text-sm",children:[p["monkeys.design.emojiPanel.unavailable"],jsxRuntime.jsx(ve,{disabled:t,onClick:()=>s(b=>b+1),children:p["monkeys.design.iconPicker.retry"]})]});if(!c)return jsxRuntime.jsx("div",{role:"status",className:"text-sm text-muted-foreground",children:p["monkeys.design.emojiPanel.loading"]});let{Picker:f}=c;return jsxRuntime.jsx("fieldset",{"data-monkeys-component":"emoji-panel",disabled:t,"aria-disabled":t,className:"min-w-0 [&_em-emoji-picker]:h-80 [&_em-emoji-picker]:w-full [&_em-emoji-picker]:shadow-none",style:{pointerEvents:t?"none":void 0},children:jsxRuntime.jsx(f,{locale:e,data:c.data,i18n:c.i18n,theme:n["data-monkeys-theme-mode"]==="dark"?"dark":"light",dynamicWidth:true,maxFrequentRows:1,navPosition:"bottom",previewPosition:"none",onEmojiSelect:b=>{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(Uv,"LocalizedEmojiPanel");function qu({locale:e,disabled:t=false,onSelect:o}){let n=ht(),a=(e??n.locale).toLowerCase().split("-")[0],s=Object.prototype.hasOwnProperty.call(Uu,a)?a:"en";return jsxRuntime.jsx(Uv,{language:s,disabled:t,onSelect:o},s)}r(qu,"EmojiPanel");function ul(e){if(!e||typeof e!="object"||!("locale"in e)||typeof e.locale!="string"||!("disabled"in e)||typeof e.disabled!="boolean"||!("onSelect"in e)||typeof e.onSelect!="function")throw new TypeError("Invalid emoji picker context.");let t=e.onSelect;return jsxRuntime.jsx(qu,{locale:e.locale,disabled:e.disabled,onSelect:o=>t(o)})}r(ul,"renderIconPickerEmoji");function Gn(e,t){let o=monkeys.I18nTextSchema.safeParse(e);if(!o.success)throw new TypeError("Invalid I18n display text");let n;try{n=Intl.getCanonicalLocales(t)[0]??"";}catch{n="";}let a=n.split("-")[0]??"";return o.data.values[n]??o.data.values[a]??o.data.values[o.data.defaultLocale]}r(Gn,"resolveI18nDisplayText");var Ur=5*1024*1024*1024;function Yu(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(Yu,"filePickerAccepts");function Ju(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>Ur))return {handleId:t.handleId,fileName:t.fileName,size:t.size,mimeType:t.mimeType}}r(Ju,"readTransientFileMetadata");var Zu=".png,.jpg,.jpeg,.webp,.svg";function nk({compactActions:e=false,model:t,onIntent:o,renderEmojiPicker:n=ul,transientFiles:a,translate:s,catalogSource:i}){let{locale:m}=ht(),c=i??(!t.icons.length&&!t.categories.length?runtime.defaultIconPickerCatalogSource:void 0),d=r(N=>{let D=s?.(N);return D&&D!==N?D:wi[m.toLowerCase().startsWith("zh")?"zh-CN":"en-US"][N]??N},"translate"),[g,u]=st.useState(),[p,f]=st.useState("idle"),[b,h]=st.useState(0);st.useEffect(()=>{if(!c||!t.open||t.mode!=="icon"||g?.source===c)return;let N=new AbortController;return f("loading"),c.load(N.signal).then(D=>{N.signal.aborted||(u({source:c,value:D}),f("idle"));}).catch(()=>{N.signal.aborted||f("error");}),()=>N.abort()},[c,t.open,t.mode,b]);let y=c?{...t,...g?.source===c?g.value:{},loading:t.loading||p==="loading",errorCode:t.errorCode??(p==="error"?"monkeys.design.iconPicker.catalogFailed":void 0)}:t,v=st.useRef(null),w=st.useRef(null),[x,k]=st.useState(false),C=r(()=>{let N=w.current;w.current=null,N?.registry.discard(N.handleId);},"release");st.useEffect(()=>()=>C(),[a]),st.useEffect(()=>{y.open||C();},[y.open]);let S=y.disabled===true||y.uploading===true,T=r(N=>{S||o(N);},"emit"),E=r(()=>{S||(C(),o({type:"open-change",open:false,mode:y.mode}));},"close"),R=y.value.kind==="emoji"?y.value.value:y.defaultValue.kind==="emoji"?y.defaultValue.value:"\u{1F340}",F=y.value.kind==="emoji"?y.value.backgroundColor:y.backgroundColors[0],_=r((N,D=F)=>{!N||N.length>64||T({type:"change",value:{kind:"emoji",value:N,...D?{backgroundColor:D}:{}}});},"chooseEmoji"),z=[...new Map(y.customIcons.map(N=>[N.id,N])).values()].slice(0,50),O=y.search.trim().toLowerCase(),j=y.categoryId==="custom-upload",I=(j?z:y.icons).filter(N=>(j||y.categoryId==="all"||N.categoryIds?.includes(y.categoryId))&&(!O||N.id.toLowerCase().includes(O)||N.tags?.some(D=>D.toLowerCase().includes(O)))),V=r(N=>{S||o({type:"open-change",open:y.open,mode:N});},"changeMode"),$=r((N,D,M,K)=>e?jsxRuntime.jsx(lr,{content:d(N),portal:true,children:jsxRuntime.jsx(ve,{label:d(N),iconOnly:true,icon:D,disabled:S,"aria-pressed":K,active:K,onClick:M})}):jsxRuntime.jsx(ve,{type:"button",disabled:S,"aria-pressed":K,active:K,onClick:M,children:d(N)}),"action");return jsxRuntime.jsx("section",{"data-monkeys-component":"icon-picker",className:"flex items-center",children:jsxRuntime.jsxs(fd,{open:y.open,modal:false,onOpenChange:N=>{N?T({type:"open-change",open:true,mode:y.mode}):E();},children:[jsxRuntime.jsx(yd,{asChild:true,children:jsxRuntime.jsx(ve,{type:"button","aria-label":d("monkeys.design.iconPicker.choose"),disabled:S,className:"gap-2 px-2",endIcon:jsxRuntime.jsx(lucideReact.ChevronDown,{"aria-hidden":"true",className:"h-3.5 w-3.5 text-muted-foreground"}),children:jsxRuntime.jsx(Mn,{icon:y.value,alt:d("monkeys.design.iconPicker.current"),className:"h-6 w-6 rounded-sm bg-transparent text-xl text-current"})})}),jsxRuntime.jsxs(_i,{align:"start",sideOffset:8,collisionPadding:12,"aria-label":d("monkeys.design.iconPicker.choose"),className:"flex w-96 max-w-[calc(100vw-24px)] flex-col gap-3 overflow-y-auto p-3",style:{maxHeight:"var(--radix-popover-content-available-height)",transformOrigin:"var(--radix-popover-content-transform-origin)"},onOpenAutoFocus:N=>{y.mode==="icon"&&v.current&&(N.preventDefault(),v.current.focus());},onEscapeKeyDown:N=>{S&&N.preventDefault();},onInteractOutside:N=>{S&&N.preventDefault();},children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[$("monkeys.design.iconPicker.emoji",jsxRuntime.jsx(lucideReact.Smile,{className:"h-4 w-4"}),()=>V("emoji"),y.mode==="emoji"),$("monkeys.design.iconPicker.icon",jsxRuntime.jsx(lucideReact.Shapes,{className:"h-4 w-4"}),()=>V("icon"),y.mode==="icon"),jsxRuntime.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[$("monkeys.design.iconPicker.reset",jsxRuntime.jsx(lucideReact.RotateCcw,{className:"h-4 w-4"}),()=>{S||(o({type:"change",value:y.defaultValue}),o({type:"reset"}),E());}),$("monkeys.design.iconPicker.close",jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"}),E)]})]}),y.mode==="emoji"?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[n({locale:m,disabled:S,onSelect:r(N=>{S||!N||N.length>64||(_(N),E());},"onSelect")}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2 empty:hidden","aria-label":d("monkeys.design.iconPicker.background"),children:y.backgroundColors.map(N=>jsxRuntime.jsx(ve,{className:"h-7 w-7 rounded-md border p-0",type:"button",disabled:S,"aria-label":N,"aria-pressed":N===F,style:{backgroundColor:N},onClick:()=>_(R,N),children:jsxRuntime.jsx("span",{className:"sr-only",children:d("monkeys.design.iconPicker.background")})},N))})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Qt,{ref:v,"aria-label":d("monkeys.design.iconPicker.search"),placeholder:d("monkeys.design.iconPicker.search"),disabled:S,value:y.search,onChange:N=>T({type:"search",value:N.currentTarget.value})}),jsxRuntime.jsx("div",{className:"flex shrink-0 gap-1 overflow-x-auto pb-1","aria-label":d("monkeys.design.iconPicker.categories"),children:y.categories.filter(N=>N.id!=="custom-upload"||a||y.customIcons.length).map(N=>jsxRuntime.jsx(ve,{type:"button",className:"shrink-0",size:"sm",variant:"ghost",disabled:S,active:N.id===y.categoryId,"aria-pressed":N.id===y.categoryId,onClick:()=>T({type:"category-change",categoryId:N.id}),children:Gn(N.labelI18n,m)},N.id))}),j?jsxRuntime.jsxs("label",{children:[d("monkeys.design.iconPicker.upload"),jsxRuntime.jsx(Qt,{type:"file",accept:Zu,disabled:S||!a,onChange:N=>{let D=N.currentTarget.files?.[0];if(N.currentTarget.value="",!D||S||!a)return;let M=y.maxUploadBytes??Ur;if(!Number.isInteger(M)||M<1||M>Ur||D.size>M||!Yu(D,Zu)){k(true);return}C(),k(false);try{let K=a.register(D),J=Ju(K);if(!J){typeof K?.handleId=="string"&&a.discard(K.handleId),k(!0);return}w.current={registry:a,handleId:J.handleId},o({type:"upload",...J});}catch{C(),k(true);}}})]}):null,x?jsxRuntime.jsx("div",{role:"alert",children:d("monkeys.design.iconPicker.uploadFailed")}):null,y.loading?jsxRuntime.jsx("div",{role:"status",children:d("monkeys.design.iconPicker.loading")}):y.errorCode?jsxRuntime.jsxs("div",{role:"alert",children:[d(y.errorCode),jsxRuntime.jsx(ve,{disabled:S,onClick:()=>{h(N=>N+1),T({type:"retry"});},children:d("monkeys.design.iconPicker.retry")})]}):jsxRuntime.jsxs("div",{className:"grid min-h-0 max-h-64 grid-cols-7 gap-1 overflow-auto",onKeyDown:N=>{let D=Array.from(N.currentTarget.querySelectorAll("button:not(:disabled)")),M=D.indexOf(N.target);if(M<0)return;let K={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7}[N.key],J=N.key==="Home"?0:N.key==="End"?D.length-1:K===void 0?void 0:Math.max(0,Math.min(D.length-1,M+K));J!==void 0&&(N.preventDefault(),D[J]?.focus());},children:[I.map(N=>jsxRuntime.jsxs(ve,{className:"relative h-10 min-w-0 p-1",variant:"ghost",active:JSON.stringify(N.icon)===JSON.stringify(y.value),type:"button",title:N.id,"aria-label":N.id,disabled:S,onClick:()=>{S||(o({type:"change",value:N.icon}),E());},children:[jsxRuntime.jsx(Mn,{icon:N.icon,alt:N.id,className:"h-7 w-7 rounded-sm bg-transparent text-2xl text-current"}),jsxRuntime.jsx("span",{className:"sr-only",children:N.id})]},N.id)),I.length?null:jsxRuntime.jsx("p",{className:"col-span-7 py-3 text-center text-sm text-muted-foreground",children:d("monkeys.design.iconPicker.empty")})]})]})]})]})})}r(nk,"IconPicker");function pl(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(pl,"initialLayoutCanvasMountedIds");function rk(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(rk,"layoutCanvasRetainedMountLimit");function em(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=pl(e.items),a=rk(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(em,"projectLayoutCanvasMounting");function am({items:e,mode:t,selectedWidgetId:o,draggingWidgetId:n,resizingWidgetId:a,renderItem:s}){let i=st.useRef(null),m=JSON.stringify(e.map(h=>[h.id,h.layout.x,h.layout.y])),[c,d]=st.useState(()=>pl(e)),[g,u]=st.useState([]),p=st.useMemo(()=>em({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);st.useEffect(()=>{u(h=>JSON.stringify(h)===f?h:p.retainedOrder);},[f]),st.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 w=new IntersectionObserver(x=>{if(!y)return;for(let C of x){let S=C.target.dataset.layoutMountId;S&&v.set(S,C.isIntersecting);}let k=[...v].filter(([,C])=>C).map(([C])=>C);d(C=>JSON.stringify(C)===JSON.stringify(k)?C:k);},{root:null,rootMargin:`${720}px 0px ${720}px 0px`,threshold:0});for(let x of h.children)w.observe(x);return ()=>{y=false,w.disconnect();}},[m]);let b=new Set(p.mountedIds);return jsxRuntime.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=>jsxRuntime.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(am,"LayoutCanvasGrid");var Si="application/x-monkeys-layout-catalog-item";var jn={columns:24,rowHeight:28,gap:12,maxRows:100,minimum:4},gl=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 Ri(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"?Ri(a.children,t):a.tabs.forEach(s=>Ri(s.children,t)));return n(),t}r(Ri,"runs");var xo=zod.z.string().min(1).max(256).refine(e=>!["__proto__","constructor","prototype"].includes(e)),Ti=zod.z.string().max(8192),sk=zod.z.union([zod.z.object({type:zod.z.enum(["widget","section","tabs"]),id:xo}).strict(),zod.z.object({type:zod.z.literal("tab"),id:xo,tabsId:xo}).strict()]),bl=zod.z.lazy(()=>zod.z.union([zod.z.object({type:zod.z.literal("widget"),id:xo,widgetId:xo}).strict(),zod.z.object({type:zod.z.literal("section"),id:xo,title:Ti.optional(),description:Ti.optional(),children:zod.z.array(bl)}).strict(),zod.z.object({type:zod.z.literal("tabs"),id:xo,title:Ti.optional(),size:zod.z.enum(["large","small"]).optional(),behavior:zod.z.enum(["switch","anchor"]).optional(),tabs:zod.z.array(zod.z.object({id:xo,label:Ti.optional(),target:sk.optional(),children:zod.z.array(bl)}).strict())}).strict()])),lk=zod.z.object({x:zod.z.number().int().min(0),y:zod.z.number().int().min(0),w:zod.z.number().int().min(4).max(24),h:zod.z.number().int().min(4).max(100),minW:zod.z.number().int().min(4).max(24),minH:zod.z.number().int().min(4).max(100)}).strict().refine(e=>e.w>=e.minW&&e.h>=e.minH&&e.x+e.w<=24&&e.y+e.h<=100),dk=zod.z.object({version:zod.z.literal(1),revision:xo,root:zod.z.array(bl),widgets:zod.z.record(xo,zod.z.object({layout:lk}).strict())}).strict();function _n(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=dk.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 Ri(a.root))for(let u=0;u<g.length;u++)for(let p=0;p<u;p++)gl(a.widgets[g[u]].layout,a.widgets[g[p]].layout)&&c();}r(_n,"validateLayoutCanvasModel");function Ni(e,t){if(_n(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 _n(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=(Ri(e.root).find(m=>m.includes(t.widgetId))??[]).filter(m=>m!==t.widgetId).map(m=>e.widgets[m].layout),s=a.some(m=>gl(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=>gl(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 _n(i),{model:i,removedWidgetIds:[]}}r(Ni,"applyLayoutCanvasOperation");function mk({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}){_n(e);let v=st.Children.toArray(n);if(o.length!==v.length||new Set(o).size!==o.length||o.length!==Object.keys(e.widgets).length||o.some(U=>!Object.prototype.hasOwnProperty.call(e.widgets,U)))throw new TypeError("Layout widget content must map each widget exactly once.");let w=new Map(o.map((U,Z)=>[U,v[Z]])),x=st.useRef(null),k=st.useRef(e);k.current=e;let C=st.useRef({id:d,model:e});C.current.id!==d&&(C.current={id:d,model:e});let S=st.useRef(),[T,E]=st.useState(),R=st.useRef(),[F,_]=st.useState(),[z,O]=st.useState(),j=st.useRef();st.useEffect(()=>{R.current=void 0,j.current=void 0,S.current=void 0,E(void 0),_(void 0),O(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"),V=r((U,Z,ae,ie=e)=>{i||t!=="edit"||ie!==k.current||U===Z||!e.root.some(de=>de.id===U)||!e.root.some(de=>de.id===Z)||u?.({sourceNodeId:U,targetNodeId:Z,position:ae,expectedRevision:ie.revision});},"reorder"),$=r(U=>t==="edit"&&e.root.some(Z=>Z.id===U)&&u?jsxRuntime.jsx("button",{type:"button","data-layout-reorder":U,draggable:!i,disabled:i,"aria-label":m.reorder??m.move,onDragStart:Z=>{if(i){Z.preventDefault();return}S.current={id:U,model:e},Z.dataTransfer.setData("application/x-monkeys-layout-root-node",U),Z.dataTransfer.effectAllowed="move";},onDragEnd:()=>{S.current=void 0,E(void 0);},onKeyDown:Z=>{let ae=e.root.findIndex(W=>W.id===U),ie=Z.key==="ArrowUp"?-1:Z.key==="ArrowDown"?1:0;if(!ie)return;Z.preventDefault();let de=e.root[ae+ie];de&&V(U,de.id,ie<0?"before":"after");},children:m.reorder??m.move}):null,"reorderHandle"),N=r(U=>{if(t!=="edit"||!g&&!(U.type==="root"&&u))return null;let Z=JSON.stringify(U);return jsxRuntime.jsx("div",{"data-layout-insert-target":Z,"data-layout-insert-type":U.type,"data-layout-insert-index":U.index,"data-layout-section-id":U.type==="section"?U.sectionId:void 0,"data-layout-tabs-id":U.type==="tab"?U.tabsId:void 0,"data-layout-tab-id":U.type==="tab"?U.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:ae=>{i||!(I()||U.type==="root"&&S.current?.model===e)||(ae.preventDefault(),ae.stopPropagation(),E(Z));},onDragLeave:()=>E(void 0),onDrop:ae=>{if(ae.preventDefault(),ae.stopPropagation(),E(void 0),i||t!=="edit"||k.current!==e)return;let ie=S.current;if(ie&&U.type==="root"){if(S.current=void 0,ae.dataTransfer.getData("application/x-monkeys-layout-root-node")!==ie.id)return;let W=e.root[U.index]??e.root[e.root.length-1];W&&V(ie.id,W.id,U.index<e.root.length?"before":"after",ie.model);return}let de=ae.dataTransfer.getData(Si);I()&&de===d&&g?.({catalogItemId:de,target:U,expectedRevision:e.revision});},children:T===Z?m.insert??m.move:null},`drop:${Z}`)},"dropZone"),D=r((U,Z)=>{if(!(i||t!=="edit"||R.current===U)){if(k.current!==U){h?.({code:"stale-model",revision:U.revision});return}try{let ae=Ni(U,Z);f&&(R.current=U),f?.({expectedRevision:U.revision,...ae,reason:Z.type});}catch{h?.({code:"invalid-operation",revision:U.revision});}}},"commit"),M=r((U,Z,ae)=>{if(i||t!=="edit"||U.button!==0)return;let de=U.currentTarget.closest("[data-layout-grid]")?.getBoundingClientRect().width??0;if(de<=0)return;let W=e.widgets[Z].layout;j.current={pointerId:U.pointerId,x:U.clientX,y:U.clientY,width:de,model:e,operation:ae==="move"?{type:ae,widgetId:Z,x:W.x,y:W.y}:{type:ae,widgetId:Z,w:W.w,h:W.h}},U.currentTarget.setPointerCapture(U.pointerId),U.preventDefault();},"begin"),K=r((U,Z)=>{let ae=j.current;if(!ae||ae.pointerId!==U.pointerId)return;if(k.current!==ae.model||i||t!=="edit"){j.current=void 0,_(void 0);return}let ie=Math.round((U.clientX-ae.x)/((ae.width+jn.gap)/jn.columns)),de=Math.round((U.clientY-ae.y)/(jn.rowHeight+jn.gap)),W=ae.operation,pe=W.type==="move"?{...W,x:W.x+ie,y:W.y+de}:W.type==="resize"?{...W,w:W.w+ie,h:W.h+de}:W;if(Z)j.current=void 0,_(void 0),D(ae.model,pe);else try{_(Ni(ae.model,pe).model);}catch{_(void 0);}},"update"),J=F??e,G=r(U=>jsxRuntime.jsx("button",{type:"button",disabled:i,onClick:()=>O({nodeId:U,model:e}),children:m.remove}),"remove"),te=r((U,Z)=>{let ae=[],ie=[],de=r(()=>{if(!ie.length)return;let W=ie.flatMap(pe=>pe.type==="widget"?[{id:pe.widgetId,node:pe,layout:J.widgets[pe.widgetId].layout}]:[]);ie=[],ae.push(jsxRuntime.jsx(am,{items:W,mode:t,selectedWidgetId:W.find(pe=>pe.node.id===a)?.id,renderItem:({node:pe},B)=>{let H=J.widgets[pe.widgetId].layout,ne=r(fe=>jsxRuntime.jsx("button",{type:"button",disabled:i,"aria-label":m[fe],style:{touchAction:"none"},onPointerDown:ye=>M(ye,pe.widgetId,fe),onPointerMove:ye=>K(ye,false),onPointerUp:ye=>K(ye,true),onPointerCancel:()=>{j.current=void 0,_(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:pe.widgetId,x:H.x+xe[0],y:H.y+xe[1]}:{type:fe,widgetId:pe.widgetId,w:H.w+xe[0],h:H.h+xe[1]}));},children:m[fe]}),"controls");return jsxRuntime.jsxs("div",{"data-layout-widget":pe.widgetId,"data-selected":a===pe.id||void 0,className:"h-full min-h-0 min-w-0 overflow-auto rounded border border-border","data-layout-node-id":pe.id,children:[N({...Z,index:U.indexOf(pe)}),t==="edit"?jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx("button",{type:"button",disabled:i,onClick:()=>p?.({nodeId:pe.id,revision:e.revision}),children:pe.widgetId}),$(pe.id),ne("move"),ne("resize"),G(pe.id)]}):null,B?w.get(pe.widgetId):null]},pe.id)}},W[0].id));},"flush");for(let W of U){if(W.type==="widget"){ie.push(W);continue}if(de(),ae.push(N({...Z,index:U.indexOf(W)})),W.type==="section")ae.push(jsxRuntime.jsxs("section",{"data-layout-node-id":W.id,className:"space-y-3",children:[jsxRuntime.jsxs("header",{children:[jsxRuntime.jsx("h3",{children:t==="edit"?jsxRuntime.jsx("button",{disabled:i,onClick:()=>p?.({nodeId:W.id,revision:e.revision}),children:W.title??W.id}):W.title??W.id}),W.description?jsxRuntime.jsx("p",{children:W.description}):null,$(W.id),t==="edit"?G(W.id):null]}),te(W.children,{type:"section",sectionId:W.id})]},W.id));else {let pe=s[W.id]??W.tabs[0]?.id;ae.push(jsxRuntime.jsxs("section",{"data-layout-node-id":W.id,children:[jsxRuntime.jsx("h3",{children:t==="edit"?jsxRuntime.jsx("button",{disabled:i,onClick:()=>p?.({nodeId:W.id,revision:e.revision}),children:W.title??W.id}):W.title??W.id}),$(W.id),t==="edit"?G(W.id):null,jsxRuntime.jsx("div",{role:"tablist",children:W.tabs.map(B=>jsxRuntime.jsx("button",{type:"button",role:"tab","aria-selected":pe===B.id,disabled:i,onClick:()=>{if(t==="edit"&&p?.({nodeId:B.id,revision:e.revision}),b?.({tabsId:W.id,tabId:B.id,revision:e.revision}),W.behavior!=="anchor"||!B.target)return;let H=B.target;H.type==="tab"&&b?.({tabsId:H.tabsId,tabId:H.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=>H.type==="widget"?ye.dataset.layoutWidget===H.id:H.type==="tab"?ye.dataset.layoutTabId===H.id&&ye.dataset.layoutTabsId===H.tabsId:ye.dataset.layoutNodeId===H.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))}),W.tabs.map(B=>jsxRuntime.jsx("div",{role:"tabpanel","data-layout-tab-id":B.id,"data-layout-tabs-id":W.id,hidden:W.behavior!=="anchor"&&pe!==B.id,children:te(B.children,{type:"tab",tabsId:W.id,tabId:B.id})},B.id))]},W.id));}}return de(),ae.push(N({...Z,index:U.length})),ae},"nodes");return jsxRuntime.jsxs("div",{ref:x,className:y,"data-layout-canvas":true,children:[te(J.root,{type:"root"}),jsxRuntime.jsx(ca,{open:!!z,onOpenChange:U=>{U||O(void 0);},children:jsxRuntime.jsxs(ln,{children:[jsxRuntime.jsx(rr,{children:m.confirmRemove}),jsxRuntime.jsx(ar,{children:m.removeDescription}),jsxRuntime.jsx("button",{type:"button",onClick:()=>O(void 0),children:m.cancel}),jsxRuntime.jsx("button",{type:"button",disabled:i,onClick:()=>{z&&D(z.model,{type:"remove",nodeId:z.nodeId}),O(void 0);},children:m.remove})]})})]})}r(mk,"LayoutCanvas");function gk({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=st.useRef(),m=st.useRef(false),c=r(()=>{let d=i.current;i.current=void 0,d&&d.notify?.({catalogItemId:d.catalogItemId,active:false});},"finish");return st.useEffect(()=>()=>c(),[e,t]),jsxRuntime.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(Si,e),d.dataTransfer.effectAllowed="copy",m.current=true,i.current={catalogItemId:e,notify:s},s?.({catalogItemId:e,active:true});},onDragEnd:c,children:o})}r(gk,"LayoutCatalogItem");function fk({value:e,tokens:t,disabled:o=false,readOnly:n=false,ariaLabel:a,tokenGroupLabel:s,maxLength:i,onChange:m}){let c=st.useRef(null),d=st.useRef(false),g=st.useRef();st.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]),st.useLayoutEffect(()=>()=>{g.current=void 0;},[]);let u=r(p=>i===void 0||p.length<=i,"fits");return jsxRuntime.jsxs("div",{children:[jsxRuntime.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});}}),jsxRuntime.jsx("div",{role:"group","aria-label":s,children:t.map((p,f)=>jsxRuntime.jsx("button",{type:"button",disabled:o||n||p.disabled,onMouseDown:b=>b.preventDefault(),onClick:()=>{let b=c.current;if(!b||o||n||p.disabled||d.current||g.current)return;let 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(fk,"TemplateTextEditor");function hk({model:e,labels:t,locale:o,timeZone:n,disabled:a=false,loading:s=false,onIntent:i}){let{locale:m}=ht(),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 jsxRuntime.jsxs("section",{"aria-busy":s,className:"flex min-h-0 flex-col gap-3 text-sm",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("label",{children:[t.repositories,jsxRuntime.jsxs(uo,{"aria-label":t.repositories,disabled:c,value:e.selectedRepositoryId??"",onChange:p=>g({action:"select-repository",repositoryId:p.currentTarget.value}),children:[jsxRuntime.jsx("option",{value:"",disabled:true,children:t.repositories}),e.repositories.map(p=>jsxRuntime.jsx("option",{value:p.id,children:p.name},p.id))]})]}),jsxRuntime.jsx(ve,{size:"sm",disabled:c,onClick:()=>g({action:"refresh"}),children:t.refresh})]}),s&&jsxRuntime.jsx("p",{role:"status",children:t.loading}),d?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("dl",{className:"flex flex-wrap gap-3",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("dt",{children:t.branch}),jsxRuntime.jsx("dd",{children:d.branch??"\u2014"})]}),d.upstream&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("dt",{children:t.upstream}),jsxRuntime.jsx("dd",{children:d.upstream})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("dt",{children:t.ahead}),jsxRuntime.jsx("dd",{children:d.ahead??0})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("dt",{children:t.behind}),jsxRuntime.jsx("dd",{children:d.behind??0})]})]}),jsxRuntime.jsx("h3",{children:t.status}),d.changes.length===0&&jsxRuntime.jsx("p",{children:t.empty}),jsxRuntime.jsx("ul",{className:"flex flex-col gap-1",children:d.changes.map(p=>jsxRuntime.jsxs("li",{className:"flex flex-wrap items-center gap-2",children:[jsxRuntime.jsx(un,{label:p.status}),jsxRuntime.jsx("span",{className:"min-w-0 break-all",children:p.path}),p.indexStatus&&jsxRuntime.jsx("code",{children:p.indexStatus}),p.worktreeStatus&&jsxRuntime.jsx("code",{children:p.worktreeStatus}),jsxRuntime.jsx(ve,{size:"sm",disabled:c,onClick:()=>g({action:"open-file",repositoryId:d.id,path:p.path}),children:t.openFile}),jsxRuntime.jsx(ve,{size:"sm",disabled:c,onClick:()=>g({action:"open-diff",repositoryId:d.id,path:p.path}),children:t.openDiff})]},p.path))}),jsxRuntime.jsx("h3",{children:t.history}),d.commits.length===0&&jsxRuntime.jsx("p",{children:t.empty}),jsxRuntime.jsx("ol",{className:"flex flex-col gap-2",children:d.commits.map(p=>{let f=e.expandedCommitIds.includes(p.id),b=p.date?new Date(p.date):void 0,h=b&&Number.isFinite(b.getTime());return jsxRuntime.jsxs("li",{children:[jsxRuntime.jsxs(ve,{size:"sm",disabled:c,"aria-expanded":f,onClick:()=>g({action:"toggle-commit",repositoryId:d.id,commitId:p.id,expanded:!f}),children:[p.shortId," ",p.message]}),jsxRuntime.jsxs("div",{className:"flex flex-wrap gap-2",children:[jsxRuntime.jsx("span",{children:p.author}),h&&u?jsxRuntime.jsx("time",{dateTime:b.toISOString(),children:u.format(b)}):jsxRuntime.jsx("span",{children:t.unknownDate}),p.refs?.map(y=>jsxRuntime.jsx(un,{label:y},y))]}),f&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("ul",{children:p.files.slice(0,8).map(y=>jsxRuntime.jsxs("li",{className:"flex gap-2",children:[jsxRuntime.jsx("span",{className:"break-all",children:y.path}),y.status&&jsxRuntime.jsx(un,{label:y.status})]},y.path))}),p.files.length>8&&jsxRuntime.jsxs("p",{children:[t.remainingFiles,": ",p.files.length-8]})]})]},p.id)})})]}):jsxRuntime.jsx("p",{children:t.empty})]})}r(hk,"RuntimeSourceControlView");var vl=1e4,xk=vl+2,um=1024*1024,xl=r(e=>typeof e=="string"&&e.trim().length>0&&e.length<=256&&!/[\u0000-\u001f\u007f-\u009f]/.test(e),"validId");function cm(e){if(e.length>vl)return "ORDERED_SELECTION_LIMIT_EXCEEDED";if(e.some(t=>!xl(t))||new Set(e).size!==e.length)return "ORDERED_SELECTION_INVALID_MODEL";if(new TextEncoder().encode(JSON.stringify(e)).byteLength>um)return "ORDERED_SELECTION_BYTES_EXCEEDED"}r(cm,"validateOrderedSelection");function vk(e){return jsxRuntime.jsx(kk,{...e},JSON.stringify([e.model.scopeId,e.model.revision]))}r(vk,"OrderedSelection");function kk({model:e,onIntent:t,translate:o}){let{locale:n}=ht(),[a,s]=st.useState(()=>[...e.selectedIds]),[i,m]=st.useState(e.search??""),[c,d]=st.useState(""),[g,u]=st.useState(()=>cm(e.selectedIds)),[p,f]=st.useState(0),b=st.useRef(a),h=st.useRef(new Set),y=st.useRef(new Map),v=st.useRef(true),w=st.useRef();st.useEffect(()=>(v.current=true,()=>{v.current=false;}),[]);let x=!!(e.pending||e.readOnly||e.loading),k=st.useRef({blocked:x,model:e});k.current={blocked:x,model:e};let C=r(G=>{v.current&&!k.current.blocked&&t(G);},"emit"),S=e.append&&!h.current.has(e.append.revision)?e.append.rows:[],T=[...e.candidates??[],...S],E=new Set(b.current),R=(e.append?.rows??[]).filter(G=>E.has(G.id));for(let G of [...(e.selectedRows??[]).filter(te=>E.has(te.id)),...R,...T])xl(G.id)&&y.current.set(G.id,G);let F=new Set([...b.current,...T.map(G=>G.id)]);for(let G of y.current.keys())F.has(G)||y.current.delete(G);let _=r(G=>{let te=e.groups??[];if(te.length>xk||te.some(ae=>!xl(ae.id))||new Set(te.map(ae=>ae.id)).size!==te.length)return "ORDERED_SELECTION_INVALID_MODEL";let U=new Map;for(let ae of G)U.set(ae,y.current.get(ae)??{id:ae});for(let ae of T)U.set(ae.id,ae);return new TextEncoder().encode(JSON.stringify({selectedIds:G,rows:[...U.values()],groups:te})).byteLength>um?"ORDERED_SELECTION_BYTES_EXCEEDED":void 0},"displayIssue"),z=r(G=>{let te=y.current.get(G);return te?.labelI18n?Gn(te.labelI18n,n):te?.labelKey?o(te.labelKey):te?.label||G},"label"),O=r((G,te=false)=>{let U=y.current.get(G),ae=[U?.descriptionI18n?Gn(U.descriptionI18n,n):U?.descriptionKey?o(U.descriptionKey):U?.description,U?.showId?G:void 0].filter(ie=>ie!==void 0&&ie!=="").join(" \xB7 ");return jsxRuntime.jsxs("span",{className:"min-w-0 flex-1 overflow-hidden",children:[jsxRuntime.jsxs("span",{className:"block truncate",children:[z(G),te&&U?.missing?` (${o("Unavailable")})`:""]}),ae?jsxRuntime.jsx("span",{className:"block truncate text-xs text-muted-foreground",title:ae,children:ae}):null]})},"rowText"),j=e.selectionMode==="single"?1:Math.min(1e4,e.maxSelected??1e4),I=e.minSelected??0,V=r(G=>{if(k.current.blocked||!v.current)return false;let U=(G.length>j?"ORDERED_SELECTION_LIMIT_EXCEEDED":cm(G))??_(G);return U?(u(U),C({type:"error",scopeId:e.scopeId,code:U}),false):(b.current=G,u(void 0),s(G),C({type:"change",scopeId:e.scopeId,expectedRevision:e.revision,selectedIds:[...G],selectedCount:G.length}),true)},"commit");st.useEffect(()=>{!e.append||e.append.rows.length===0||x||h.current.has(e.append.revision)||V([...new Set([...a,...e.append.rows.map(G=>G.id)])])&&h.current.add(e.append.revision);},[e.append,x,a]);let $=r((G,te)=>{let U=a.indexOf(G);if(U<0||te<0||te>=a.length||U===te)return;let Z=[...a];Z.splice(U,1),Z.splice(te,0,G),V(Z);},"move"),N=r(()=>C({type:"search",scopeId:e.scopeId,value:i.trim()}),"searchNow"),M=!Number.isSafeInteger(I)||!Number.isSafeInteger(j)||I<0||j<0||I>j?"ORDERED_SELECTION_INVALID_MODEL":_(a),K=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 jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-col gap-3","data-ordered-selection":e.scopeId,children:[K?jsxRuntime.jsx("p",{role:"alert",children:o(K)}):null,e.loading?jsxRuntime.jsx("p",{role:"status",children:o("Loading")}):null,e.mode==="ids"?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(br,{"aria-label":o("IDs"),disabled:x,value:c,onChange:G=>d(G.target.value)}),jsxRuntime.jsx(ve,{disabled:x,onClick:()=>{V([...new Set([...a,...c.split(/[\s,;]+/).filter(Boolean)])]);},children:o("Add")})]}):jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[e.groupId!==void 0?jsxRuntime.jsx(uo,{"aria-label":o("Group"),value:e.groupId,disabled:x||e.canBrowse===false,onChange:G=>C({type:"group-change",scopeId:e.scopeId,value:G.currentTarget.value}),children:(e.groups??[]).map(G=>jsxRuntime.jsx("option",{value:G.id,children:G.labelI18n?Gn(G.labelI18n,n):G.labelKey?o(G.labelKey):G.label||G.id},G.id))}):null,jsxRuntime.jsx(Qt,{"aria-label":o("Search"),value:i,disabled:x||e.canBrowse===false,onChange:G=>m(G.target.value),onKeyDown:G=>{G.key==="Enter"&&(G.preventDefault(),N());}}),jsxRuntime.jsx(ve,{disabled:x||e.canBrowse===false,onClick:N,children:o("Search")}),e.allowCreate?jsxRuntime.jsx(ve,{disabled:x,onClick:()=>C({type:"create",scopeId:e.scopeId}),children:o("Create")}):null,jsxRuntime.jsx("div",{className:"w-full space-y-2","data-ordered-candidates":true,style:{maxHeight:384,overflowY:"auto"},children:(e.candidates??[]).map(G=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("label",{className:"flex min-w-0 flex-1 items-center gap-2",children:[jsxRuntime.jsx(dn,{disabled:x||G.disabled,checked:a.includes(G.id),onChange:te=>V(te.currentTarget.checked?e.selectionMode==="single"?[G.id]:[...new Set([...a,G.id])]:a.filter(U=>U!==G.id))}),O(G.id)]}),e.allowCopy?jsxRuntime.jsx(ve,{disabled:x||G.disabled,onClick:()=>C({type:"copy",scopeId:e.scopeId,id:G.id}),children:o("Copy")}):null]},G.id))}),e.pagination?.hasMore&&e.pagination.nextCursor?jsxRuntime.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]}),jsxRuntime.jsx(ve,{className:"self-start",disabled:x||a.length===0,onClick:()=>V([]),children:o("Clear")}),jsxRuntime.jsxs("div",{role:"status","aria-live":"polite",children:[a.length," / ",vl]}),jsxRuntime.jsx("div",{"data-ordered-viewport":true,style:{height:Math.min(384,a.length*48),overflowY:"auto"},onScroll:G=>f(Math.max(0,Math.floor(G.currentTarget.scrollTop/48)-2)),children:jsxRuntime.jsx("ol",{"aria-label":o("Selected"),style:{height:a.length*48,position:"relative",margin:0},children:a.slice(J,J+14).map((G,te)=>{let U=J+te;return jsxRuntime.jsxs("li",{"data-ordered-id":G,"aria-posinset":U+1,"aria-setsize":a.length,style:{position:"absolute",top:U*48,height:48,left:0,right:0,display:"flex",gap:8},onDragOver:Z=>{!x&&w.current&&Z.preventDefault();},onDrop:Z=>{Z.preventDefault(),w.current&&Z.dataTransfer.getData("application/x-monkeys-ordered-selection")===w.current&&$(w.current,U),w.current=void 0;},children:[jsxRuntime.jsx(ve,{"data-ordered-drag":G,"aria-label":o("Move"),disabled:x,draggable:!x,onDragStart:Z=>{if(x)return Z.preventDefault();w.current=G,Z.dataTransfer.setData("application/x-monkeys-ordered-selection",G);},onDragEnd:()=>{w.current=void 0;},onKeyDown:Z=>{(Z.key==="ArrowUp"||Z.key==="ArrowDown")&&(Z.preventDefault(),$(G,U+(Z.key==="ArrowUp"?-1:1)));},children:"\u2195"}),O(G,true),jsxRuntime.jsx(ve,{disabled:x||U===0,"aria-label":o("Move up"),onClick:()=>$(G,U-1),children:"\u2191"}),jsxRuntime.jsx(ve,{disabled:x||U===a.length-1,"aria-label":o("Move down"),onClick:()=>$(G,U+1),children:"\u2193"}),jsxRuntime.jsx(ve,{disabled:x,"aria-label":o("Remove"),onClick:()=>V(a.filter(Z=>Z!==G)),children:"\xD7"})]},G)})})}),jsxRuntime.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.showSubmit!==false?jsxRuntime.jsx(ve,{disabled:x||!!(g||M)||a.length<I||a.length>j,onClick:()=>C({type:"submit",scopeId:e.scopeId,expectedRevision:e.revision,selectedIds:[...a],selectedCount:a.length}),children:o("Save")}):null,e.showCancel!==false?jsxRuntime.jsx(ve,{disabled:x,onClick:()=>C({type:"cancel",scopeId:e.scopeId}),children:o("Cancel")}):null,e.errorCode?jsxRuntime.jsx(ve,{disabled:x,onClick:()=>C({type:"retry",scopeId:e.scopeId}),children:o("Retry")}):null]})]})}r(kk,"SelectionDraft");var Tk={h1:r(({children:e})=>jsxRuntime.jsx("h1",{className:"mb-3 mt-6 text-xl font-bold first:mt-0",children:e}),"h1"),h2:r(({children:e})=>jsxRuntime.jsx("h2",{className:"mb-3 mt-6 text-lg font-semibold first:mt-0",children:e}),"h2"),h3:r(({children:e})=>jsxRuntime.jsx("h3",{className:"mb-2 mt-5 text-base font-semibold first:mt-0",children:e}),"h3"),h4:r(({children:e})=>jsxRuntime.jsx("h4",{className:"mb-2 mt-4 text-sm font-semibold first:mt-0",children:e}),"h4"),p:r(({children:e})=>jsxRuntime.jsx("p",{className:"my-3 break-words leading-6 first:mt-0 last:mb-0",children:e}),"p"),ul:r(({children:e})=>jsxRuntime.jsx("ul",{className:"my-3 list-disc space-y-1 pl-6",children:e}),"ul"),ol:r(({children:e})=>jsxRuntime.jsx("ol",{className:"my-3 list-decimal space-y-1 pl-6",children:e}),"ol"),li:r(({children:e})=>jsxRuntime.jsx("li",{className:"break-words leading-6",children:e}),"li"),blockquote:r(({children:e})=>jsxRuntime.jsx("blockquote",{className:"my-4 border-l-4 border-border bg-muted/35 px-4 py-1 text-muted-foreground",children:e}),"blockquote"),a:r(({children:e,href:t})=>jsxRuntime.jsx("a",{className:"break-all font-medium text-primary underline-offset-4 hover:underline",href:t,target:"_blank",rel:"noreferrer noopener",children:e}),"a"),pre:r(({children:e})=>jsxRuntime.jsx("pre",{className:"my-4 max-w-full overflow-x-auto rounded-lg border border-border/60 bg-muted/45 p-4 text-xs leading-5",children:e}),"pre"),code:r(({className:e,children:t})=>jsxRuntime.jsx("code",{className:l(e,"break-words rounded bg-muted px-1 py-0.5 font-mono text-[0.9em] [pre_&]:break-normal [pre_&]:bg-transparent [pre_&]:p-0"),children:t}),"code"),table:r(({children:e})=>jsxRuntime.jsx("div",{className:"my-4 max-w-full overflow-x-auto rounded-lg border border-border/60",children:jsxRuntime.jsx("table",{className:"min-w-full border-collapse text-sm",children:e})}),"table"),thead:r(({children:e})=>jsxRuntime.jsx("thead",{className:"bg-muted/55",children:e}),"thead"),tbody:r(({children:e})=>jsxRuntime.jsx("tbody",{className:"divide-y divide-border/60",children:e}),"tbody"),tr:r(({children:e})=>jsxRuntime.jsx("tr",{className:"divide-x divide-border/60",children:e}),"tr"),th:r(({children:e})=>jsxRuntime.jsx("th",{className:"whitespace-nowrap px-3 py-2 text-left font-semibold",children:e}),"th"),td:r(({children:e})=>jsxRuntime.jsx("td",{className:"min-w-32 px-3 py-2 align-top",children:e}),"td"),hr:r(()=>jsxRuntime.jsx("hr",{className:"my-6 border-border"}),"hr")};function Rk({content:e,className:t}){let o=String(e||"").trim();return o?jsxRuntime.jsx("div",{className:l("min-w-0 max-w-full text-sm text-foreground",t),"data-monkeys-component":"markdown-content",children:jsxRuntime.jsx(wk__default.default,{remarkPlugins:[Sk__default.default],components:Tk,skipHtml:true,urlTransform:wk.defaultUrlTransform,children:o})}):jsxRuntime.jsx("div",{className:l("text-sm text-muted-foreground",t),children:"\u2014"})}r(Rk,"MarkdownContent");function Nk({viewMode:e="list",heading:t,metadata:o,message:n,actions:a,outputs:s,children:i,className:m,...c}){return jsxRuntime.jsxs("article",{...c,"data-monkeys-component":"workbench-task-card","data-view-mode":e,className:l("border-border/70 font-[family-name:var(--font-sans)] text-sm leading-5",e==="grid"?"flex h-full flex-col gap-global rounded-lg border bg-card p-global shadow-sm":"grid items-center gap-global border-b py-global last:border-b-0 lg:grid-cols-2",m),children:[jsxRuntime.jsxs("div",{"data-task-part":"details",className:l("flex min-w-0 flex-col",e==="grid"?"flex-1":"min-h-60"),children:[jsxRuntime.jsx("div",{className:"mb-global flex flex-wrap items-center gap-global",children:t}),o!=null&&jsxRuntime.jsx("div",{className:"mb-global flex flex-wrap items-center gap-global text-sm tabular-nums text-muted-foreground [&_span]:text-inherit [&_time]:text-inherit",children:o}),i,n!=null&&jsxRuntime.jsx("div",{className:"mt-global break-words text-sm text-destructive-text",children:n}),a!=null&&jsxRuntime.jsx("div",{className:"mt-auto flex flex-wrap gap-global pt-global",children:a})]}),s!=null&&jsxRuntime.jsx("div",{"data-task-part":"outputs",className:l("min-w-0 w-full",e==="grid"&&"-order-1"),children:s})]})}r(Nk,"WorkbenchTaskCard");function Ek({title:e,filters:t,sortOrder:o,viewMode:n,onSortOrderChange:a,onViewModeChange:s,labels:i,disabled:m,className:c}){return jsxRuntime.jsx(Es,{"data-monkeys-component":"workbench-task-toolbar",classNames:{root:"min-h-0 flex-row flex-wrap items-center gap-global border-0 p-0 font-[family-name:var(--font-sans)] text-sm leading-5",end:"max-w-full flex-wrap gap-global"},className:c,end:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[t,jsxRuntime.jsxs("div",{className:"flex items-center gap-global",children:[jsxRuntime.jsx(ve,{type:"button",variant:"outline",disabled:m,title:i.sort,icon:o==="latest"?jsxRuntime.jsx(lucideReact.ArrowDownWideNarrow,{}):jsxRuntime.jsx(lucideReact.ArrowUpNarrowWide,{}),className:"h-10 min-w-28 gap-global rounded-lg bg-muted/40 px-global py-global-1/2 text-sm font-medium shadow-none hover:bg-muted/70",onClick:()=>a(o==="latest"?"oldest":"latest"),children:o==="latest"?i.latest:i.oldest}),jsxRuntime.jsx(ve,{type:"button",variant:"outline",disabled:m,icon:n==="list"?jsxRuntime.jsx(lucideReact.Grid2X2,{}):jsxRuntime.jsx(lucideReact.LayoutList,{}),className:"h-10 gap-global rounded-lg bg-muted/40 px-global py-global-1/2 text-sm font-medium shadow-none hover:bg-muted/70",onClick:()=>s(n==="list"?"grid":"list"),children:n==="list"?i.gridView:i.listView})]})]}),children:e})}r(Ek,"WorkbenchTaskToolbar");function Wk({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 jsxRuntime.jsxs("div",{"data-monkeys-component":"workbench-task-outputs",role:"region","aria-label":a,tabIndex:0,className:l("flex w-full min-w-0 snap-x snap-proximity items-center gap-global overflow-x-auto py-global-1/2 font-[family-name:var(--font-sans)] text-sm leading-5 focus-visible:outline focus-visible:outline-2",g),children:[t,e.map(p=>p.kind==="media"?d?jsxRuntime.jsx("button",{type:"button",onClick:()=>d(p),"aria-label":p.previewLabel||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):jsxRuntime.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):jsxRuntime.jsx("pre",{className:"h-60 w-full min-w-0 shrink-0 snap-start overflow-auto whitespace-pre-wrap break-words rounded-lg border bg-muted/20 p-global font-[family-name:var(--font-sans)] text-sm leading-5",children:p.content},p.id)),!(o??(e.length>0||!!t))&&(m?jsxRuntime.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:jsxRuntime.jsx("span",{"aria-hidden":"true",className:"size-16 animate-spin rounded-full border-[8px] border-muted-foreground/40 border-t-foreground motion-reduce:animate-none sm:size-20"})}):jsxRuntime.jsx("div",{className:"flex min-h-60 w-full items-center justify-center rounded-lg border border-dashed bg-muted/20 p-global text-center text-sm text-muted-foreground",children:c}))]})}r(Wk,"WorkbenchTaskOutputs");function Fk({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?jsxRuntime.jsx(jsxRuntime.Fragment,{children:d({src:e,kind:t,alt:o,expanded:n,loadingLabel:i,errorLabel:m})}):a?jsxRuntime.jsx("span",{role:"status","aria-label":i,children:jsxRuntime.jsx(lucideReact.Loader2,{"aria-hidden":"true",className:"size-6 animate-spin text-muted-foreground motion-reduce:animate-none"})}):s||!e||t==="3d"?jsxRuntime.jsx("span",{role:"img","aria-label":m,children:jsxRuntime.jsx(lucideReact.ImageOff,{"aria-hidden":"true",className:"size-6 text-muted-foreground"})}):t==="video"?jsxRuntime.jsxs("span",{className:n?"contents":"relative block size-full",children:[jsxRuntime.jsx("video",{src:e,"aria-label":o,controls:n,playsInline:true,preload:"metadata",onError:c,className:n?"max-h-[75vh] max-w-full":"size-full object-contain"}),!n&&jsxRuntime.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:jsxRuntime.jsx("span",{className:"flex size-12 items-center justify-center rounded-full bg-[hsl(var(--monkeys-color-media-overlay)/0.6)] shadow-md sm:size-14",children:jsxRuntime.jsx(lucideReact.Play,{className:"ml-0.5 size-5 !fill-[hsl(var(--monkeys-color-media-foreground))] !stroke-[hsl(var(--monkeys-color-media-foreground))] sm:size-6"})})})]}):jsxRuntime.jsx(nr,{src:e,alt:o,loading:"lazy",onError:c,className:n?"h-auto w-auto max-h-[75vh] max-w-full":void 0})}r(Fk,"WorkbenchTaskMedia");function Kk({text:e,labels:t,className:o}){let n=st.useId(),a=st.useRef(null),[s,i]=st.useState(false),[m,c]=st.useState(false),d=e||t.empty;return st.useEffect(()=>{i(false);},[d]),st.useEffect(()=>{let g=a.current;if(!g)return;let u=r(()=>{let f=Number.parseFloat(getComputedStyle(g).lineHeight);c(g.scrollHeight>f*3+1);},"measure");if(u(),typeof ResizeObserver>"u")return;let p=new ResizeObserver(u);return p.observe(g),()=>p.disconnect()},[d]),jsxRuntime.jsxs("div",{"data-monkeys-component":"workbench-task-prompt",className:l("min-w-0 font-[family-name:var(--font-sans)] text-sm leading-5",o),children:[jsxRuntime.jsx("p",{ref:a,id:n,className:l("whitespace-pre-wrap break-words text-sm leading-5 text-foreground [overflow-wrap:anywhere]",!s&&"line-clamp-3"),children:d}),m&&jsxRuntime.jsxs("button",{type:"button","aria-expanded":s,"aria-controls":n,onClick:()=>i(g=>!g),className:"mt-global-1/2 inline-flex min-h-8 items-center gap-global-1/2 rounded-lg px-global-1/2 text-sm font-medium text-foreground underline underline-offset-4 hover:bg-muted focus-visible:outline focus-visible:outline-2",children:[s?t.less:t.more,s?jsxRuntime.jsx(lucideReact.ChevronUp,{"aria-hidden":"true",className:"size-4"}):jsxRuntime.jsx(lucideReact.ChevronDown,{"aria-hidden":"true",className:"size-4"})]})]})}r(Kk,"WorkbenchTaskPrompt");function Uk({kind:e="media",viewMode:t="list",text:o,previewLabel:n,children:a,onPreview:s}){if(e==="text")return jsxRuntime.jsx("pre",{className:"h-60 w-full min-w-0 shrink-0 snap-start overflow-auto whitespace-pre-wrap break-words rounded-lg border bg-muted/20 p-global font-[family-name:var(--font-sans)] text-sm leading-5",children:o??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?jsxRuntime.jsx("button",{type:"button",className:l(i,"focus-visible:outline focus-visible:outline-2"),"aria-label":n,onClick:s,children:a}):jsxRuntime.jsx("div",{className:i,children:a})}r(Uk,"WorkbenchTaskOutputItem");function Xk({filename:e,preview:t,previewLabel:o,downloadLabel:n,downloading:a=false,disabled:s=false,onPreview:i,onDownload:m}){return jsxRuntime.jsxs("div",{className:"flex size-full min-h-0 flex-col font-[family-name:var(--font-sans)] text-sm leading-5","data-monkeys-component":"workbench-task-spreadsheet",children:[t?jsxRuntime.jsx("button",{type:"button",onClick: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}):jsxRuntime.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-global-1/2",children:jsxRuntime.jsx(lucideReact.FileSpreadsheet,{className:"size-10 text-green-600","aria-hidden":"true"})}),jsxRuntime.jsxs("div",{className:"flex shrink-0 items-center gap-global-1/2 border-t p-global-1/2",children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[jsxRuntime.jsx("p",{className:"line-clamp-2 break-all text-sm font-medium",title:e,children:e}),jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:"XLSX"})]}),jsxRuntime.jsx("button",{type:"button","aria-label":n,title:n,disabled: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?jsxRuntime.jsx(lucideReact.Loader2,{className:"size-4 animate-spin motion-reduce:animate-none"}):jsxRuntime.jsx(lucideReact.Download,{className:"size-4"})})]})]})}r(Xk,"WorkbenchTaskSpreadsheet");function ew({startTime:e,endTime:t,running:o=false,mode:n="absolute",className:a}){let{locale:s}=ht(),[i,m]=st.useState(Date.now);st.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 jsxRuntime.jsx("span",{className:a,children:b<60?`${b.toFixed(2)}s`:b<3600?`${Math.floor(b/60)}m ${Math.floor(b%60)}s`:`${Math.floor(b/3600)}h ${Math.floor(b%3600/60)}m`})}let d=new Intl.DateTimeFormat(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 jsxRuntime.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(ew,"WorkbenchTaskTime");function sw({item:e,playLabel:t,selectionMode:o}){let[n,a]=st.useState(false);if(st.useEffect(()=>a(false),[e.thumbnailSrc,e.src]),e.notice||e.status==="blocked")return jsxRuntime.jsx("div",{className:"flex size-full items-center justify-center bg-muted p-2 text-center text-xs text-muted-foreground",children:e.notice});let s=n?e.src:e.thumbnailSrc||e.src;if(!s)return jsxRuntime.jsx("div",{className:"size-full bg-muted","aria-hidden":"true"});if(e.mediaType==="video"){let i=jsxRuntime.jsx("span",{className:"rounded-full bg-foreground/60 p-2 text-background",children:jsxRuntime.jsx(lucideReact.Play,{className:"size-4 fill-current"})});return jsxRuntime.jsxs("div",{className:"relative size-full",children:[jsxRuntime.jsx("video",{src:s,muted:true,playsInline:true,preload:"metadata",className:"size-full object-cover","aria-label":e.alt}),jsxRuntime.jsx(ve,{ariaLabel:t,tabIndex:o?-1:0,variant:"ghost",className:"absolute inset-0 size-full rounded-none border-0 p-0",icon:i})]})}return jsxRuntime.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"})}r(sw,"HistoryMedia");function lw({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:w,onExpandedChange:x,onSelectionModeChange:k,onSelectedIdsChange:C,onItemActivate:S,onDelete:T,onItemDragStart:E}){let R=st.useRef(null),[F,_]=st.useState(),[z,O]=st.useState(false),[j,I]=st.useState(false),[V,$]=st.useState([]),N=i??z,D=c??j,M=m??V,K=st.useMemo(()=>new Set(M),[M]),J=st.useRef(M);J.current=M;let G=Number.isFinite(f)&&f>0?f:1;st.useLayoutEffect(()=>{if(!N||!R.current)return;let B=0,H=r(()=>{let ye=R.current?.getBoundingClientRect();ye&&_({left:ye.left,width:ye.width,bottom:Math.max(0,window.innerHeight-ye.bottom)});},"measure"),ne=r(()=>{cancelAnimationFrame(B),B=requestAnimationFrame(H);},"schedule");H();let fe=typeof ResizeObserver=="function"?new ResizeObserver(ne):void 0;return fe?.observe(R.current),window.addEventListener("resize",ne),window.addEventListener("scroll",ne,true),()=>{fe?.disconnect(),cancelAnimationFrame(B),window.removeEventListener("resize",ne),window.removeEventListener("scroll",ne,true);}},[N]),st.useEffect(()=>{let B=new Set(e.map(ne=>ne.id)),H=M.filter(ne=>B.has(ne));H.length!==M.length&&($(H),C?.(H));},[e,M,C]);let te=r(B=>{i===void 0&&O(B),x?.(B);},"setExpanded"),U=r(B=>{c===void 0&&I(B),k?.(B),B||Z([]);},"setSelection"),Z=r(B=>{J.current=B,m===void 0&&$(B),C?.(B);},"updateSelection"),ae=r(B=>{if(p||B.selectable===false)return;let H=J.current;Z(H.includes(B.id)?H.filter(ne=>ne!==B.id):[...H,B.id]);},"toggle"),ie=r(B=>{let H=K.has(B.id),ne=B.selectable!==false&&!p;return jsxRuntime.jsxs("div",{"data-history-selection-key":B.id,"data-history-item-id":B.id,role:D?"checkbox":"button","aria-checked":D?H: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(),ae(B)):B.disabled||S?.(B);},onKeyDown:fe=>{(fe.key===" "||fe.key==="Enter")&&(fe.preventDefault(),D?ae(B):B.disabled||S?.(B));},...B.dataAttributes,className:l("relative aspect-square min-w-0 overflow-hidden rounded-md border border-border/60 bg-muted outline-hidden transition-[box-shadow,border-color,opacity] focus-visible:ring-2 focus-visible:ring-ring",H&&"border-primary ring-2 ring-primary/70",B.disabled&&"opacity-60",D&&ne&&"cursor-pointer",g),children:[jsxRuntime.jsx(sw,{item:B,playLabel:u.playVideo,selectionMode:D}),D&&ne?jsxRuntime.jsx("span",{className:"pointer-events-none absolute right-1 top-1 z-10 rounded-full bg-background/85 p-0.5",children:jsxRuntime.jsx(dn,{checked:H,controlSize:"sm","aria-hidden":"true",tabIndex:-1,readOnly:true})}):null]},B.id)},"renderItem"),de=r(B=>jsxRuntime.jsx(Xo,{items:e,config:{getItemKey:r(H=>H.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:jsxRuntime.jsx("span",{"aria-hidden":"true",className:"block h-px"})},callbacks:{onLoadMore:B==="grid"||!N?w:void 0},renderItem:ie}),"collection"),W=r((B,H,ne,fe=false)=>jsxRuntime.jsx(ve,{icon:jsxRuntime.jsx(B,{}),iconOnly:true,ariaLabel:H,size:"md",variant:y,className:h,disabled:fe,onClick:ne}),"button"),pe=jsxRuntime.jsxs("div",{role:"alert",className:"flex min-h-20 flex-col items-center justify-center gap-1 p-2 text-center text-sm",children:[jsxRuntime.jsx("span",{children:u.loadError}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:u.loadErrorDescription}),v?jsxRuntime.jsx(ve,{size:"sm",variant:"outline",label:u.retry,onClick:v}):null]});return jsxRuntime.jsxs("div",{ref:R,"data-workbench-history-result":true,className:l("relative w-full min-w-0 max-w-full rounded-lg",b,d),children:[e.length?jsxRuntime.jsxs("div",{className:"flex min-w-0 items-center gap-2 p-3",children:[W(N?lucideReact.Minimize2:lucideReact.Maximize2,N?u.collapse:u.expand,()=>te(!N)),jsxRuntime.jsx("div",{className:"min-w-0 flex-1",children:de("rail")})]}):t?jsxRuntime.jsx(jo,{title:u.loading,variant:"spinner",className:"min-h-20 p-2"}):n?pe:jsxRuntime.jsx(fa,{title:u.empty,className:"min-h-20 p-2"}),N&&typeof document<"u"?reactDom.createPortal(jsxRuntime.jsxs("div",{"data-history-expanded":true,className:l("fixed z-50 rounded-lg border border-border bg-card text-card-foreground shadow-xl",b),style:{left:F?.left??0,width:(F?.width??0)/G,bottom:F?.bottom??0,transform:`scale(${G})`,transformOrigin:"left bottom"},children:[jsxRuntime.jsxs("div",{className:"max-h-[50vh] overflow-y-auto p-3",style:{marginBottom:72,maxHeight:"50vh",overflowY:"auto"},children:[de("grid"),n&&e.length?jsxRuntime.jsxs("div",{role:"alert",className:"flex items-center gap-2 text-xs",children:[u.refreshError,v?jsxRuntime.jsx(ve,{size:"sm",label:u.retry,onClick:v}):null]}):null]}),jsxRuntime.jsxs("div",{className:"absolute inset-x-3 bottom-3 flex items-center justify-between gap-2",children:[W(lucideReact.Minimize2,u.collapse,()=>te(false)),jsxRuntime.jsx("div",{className:"flex items-center gap-1.5",children:D?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"rounded-full border border-border px-2 py-1 text-xs",children:u.selectedCount}),W(lucideReact.X,u.exitSelection,()=>U(false),p),T?W(lucideReact.Trash2,u.deleteSelected,()=>{p||T(M);},!M.length||p):null]}):T?W(lucideReact.Trash2,u.enterSelection,()=>U(true),p):null})]})]}),document.body):null]})}r(lw,"WorkbenchHistoryResult");function mw({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=st.useId(),v=st.useRef(null),[w,x]=st.useState(false),[k,C]=st.useState(null),S=st.useRef(false),T=st.useRef(false);st.useEffect(()=>{e||(S.current=false,C(null),x(false));},[e]);let E=d,R=r(z=>{!E&&!T.current&&f?.(z);},"close"),F=r(async()=>{if(!(!n.trim()||E||T.current||S.current||!h)){T.current=true,x(true);try{await h();}finally{T.current=false;}}},"create"),_={radius:"lg"};return jsxRuntime.jsx(ba,{open:e,onOpenChange:R,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:jsxRuntime.jsxs("div",{className:"flex justify-end gap-2",children:[jsxRuntime.jsx(ve,{size:"lg",appearance:_,className:"text-sm",disabled:E,onClick:()=>R(false),children:m}),jsxRuntime.jsx(ve,{size:"lg",tone:"primary",appearance:{..._,slots:{buttonPrimary:"border-primary bg-primary text-primary-foreground hover:bg-primary/90"}},className:"text-sm",loading:d,disabled:E||!n.trim(),onClick:F,children:i})]}),children:jsxRuntime.jsxs("div",{className:"space-y-4","data-monkeys-component":"create-collection-dialog",children:[jsxRuntime.jsxs("div",{className:"space-y-2 py-2",children:[jsxRuntime.jsx("label",{htmlFor:y,className:"text-sm font-medium leading-5",children:a}),jsxRuntime.jsx(or,{ref:v,id:y,maxLength:80,"aria-label":a,placeholder:s,value:k??n,disabled:E,onCompositionStart:z=>{S.current=true,C(z.currentTarget.value);},onCompositionEnd:z=>{S.current=false,C(null),b?.(z.currentTarget.value);},onChange:z=>{S.current?C(z.currentTarget.value):b?.(z.currentTarget.value);},onKeyDown:z=>{z.key==="Enter"&&!z.nativeEvent.isComposing&&!S.current&&(z.preventDefault(),F());}})]}),w&&!d&&u&&g&&jsxRuntime.jsx("div",{role:"alert",className:"text-sm text-destructive-text",children:g})]})})}r(mw,"WorkbenchCreateCollectionDialog");function xw({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:w,showCreateError:x=true,showConfirmError:k=true,className:C,onOpenChange:S,onSelectedIdChange:T,onNameChange:E,onCreate:R,onConfirm:F}){let _=st.useId(),z=st.useRef(null),O=st.useRef(false),j=st.useRef(false),[I,V]=st.useState(null);st.useEffect(()=>{e||(O.current=false);},[e]);let $=h||y||I!==null,N=t.some(K=>K.id===o),D=r(K=>{!$&&!j.current&&S?.(K);},"close"),M=r(async K=>{let J=K==="create"?R:F;if(!($||j.current||!J||(K==="create"?!n.trim()||O.current:!N))){j.current=true,V(K);try{await J();}catch{}finally{j.current=false,V(null);}}},"submit");return jsxRuntime.jsx(ba,{open:e,onOpenChange:D,title:a,description:s,closeLabel:u,portal:true,closeOnEscape:!$,closeOnOverlayClick:!$,showCloseButton:!$,initialFocus:"explicit",initialFocusRef:z,className:C,classNames:{panel:"w-full max-w-[480px] gap-global-2 p-6",header:"border-0 p-0",title:"text-lg font-semibold leading-tight",description:"text-sm text-muted-foreground",body:"-m-1 min-h-0 p-1",footer:"border-0 p-0"},footer:jsxRuntime.jsxs("div",{className:"flex justify-end gap-global",children:[jsxRuntime.jsx(ve,{variant:"outline",className:"h-10",appearance:{radius:"lg"},disabled:$,onClick:()=>D(false),children:g}),jsxRuntime.jsx(ve,{variant:"outline",className:"h-10",appearance:{radius:"lg"},disabled:$||!N,loading:y||I==="confirm",onClick:()=>M("confirm"),children:d})]}),children:jsxRuntime.jsxs("div",{className:"flex min-h-0 flex-col gap-global-2","data-monkeys-component":"add-to-collection-dialog","aria-busy":$||b,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-global",children:[jsxRuntime.jsx(or,{ref:z,id:_,"aria-label":i,placeholder:m,appearance:"shadow",className:"min-w-0 flex-1",value:n,disabled:$,onChange:K=>E?.(K.currentTarget.value),onCompositionStart:()=>{O.current=true;},onCompositionEnd:()=>{O.current=false;},onKeyDown:K=>{K.key==="Enter"&&!K.nativeEvent.isComposing&&!O.current&&(K.preventDefault(),M("create"));}}),jsxRuntime.jsx(ve,{variant:"outline",appearance:{radius:"lg"},icon:jsxRuntime.jsx(lucideReact.FolderPlus,{}),className:"h-10 shrink-0",disabled:$||!n.trim(),loading:h||I==="create",onClick:()=>M("create"),children:c})]}),x&&v&&jsxRuntime.jsx("p",{role:"alert",className:"text-sm text-destructive-text",children:v}),jsxRuntime.jsx("div",{className:"-m-1 flex max-h-80 min-h-0 flex-col gap-global overflow-y-auto p-1",role:"group","aria-label":a,children:t.length===0?jsxRuntime.jsx("p",{role:"status",className:"rounded-lg border border-dashed border-border px-global-2 py-global-2 text-center text-sm text-muted-foreground",children:b?p:f}):t.map(K=>jsxRuntime.jsx(ve,{variant:"outline",icon:jsxRuntime.jsx(lucideReact.FolderOpen,{className:"size-4 shrink-0","aria-hidden":"true"}),endIcon:o===K.id?jsxRuntime.jsx(lucideReact.Check,{className:"size-4 shrink-0","aria-hidden":"true"}):void 0,label:K.name,classNames:{label:"min-w-0 flex-1 truncate text-left"},"aria-pressed":o===K.id,disabled:$,className:l("flex h-10 w-full shrink-0 items-center justify-start gap-global rounded-lg border px-global-2 py-global text-left text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",o===K.id?"border-foreground bg-muted text-foreground":"border-border bg-background text-foreground hover:bg-muted"),onClick:()=>T?.(K.id)},K.id))}),k&&w&&jsxRuntime.jsx("p",{role:"alert",className:"text-sm text-destructive-text",children:w})]})})}r(xw,"WorkbenchAddToCollectionDialog");
|
|
65
65
|
|
|
66
66
|
Object.defineProperty(exports, "defaultIconPickerCatalogSource", {
|
|
67
67
|
enumerable: true,
|