@collective-intelligence/ui-react 0.7.0 → 0.7.1
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/README.md +201 -170
- package/dist/components/ai-elements/index.d.ts +445 -4
- package/dist/components/ai-elements/index.js +3 -1
- package/dist/components/icons/index.js +1 -1
- package/dist/components/illustrations/index.js +1 -1
- package/dist/components/ui/index.d.ts +293 -235
- package/dist/components/ui/index.js +2 -4
- package/dist/components/ui-extensions/atoms/ThemeToggle/index.js +1 -1
- package/dist/components/ui-extensions/hooks/use-mobile.js +1 -1
- package/dist/components/ui-extensions/index.d.ts +36 -21
- package/dist/components/ui-extensions/index.js +6 -6
- package/dist/components/ui-extensions/molecules/LabeledField/index.js +1 -1
- package/dist/components/ui-extensions/molecules/VideoPlayer/index.js +2 -2
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/operations.js +1 -1
- package/dist/hooks/use-debounced-callback.js +1 -1
- package/dist/hooks/use-mount-action.js +1 -1
- package/dist/index-0dt7qv78.js +2 -0
- package/dist/index-33ef93f6.js +2 -0
- package/dist/index-410hza8j.js +2 -0
- package/dist/index-78w37zqq.js +2 -0
- package/dist/{index-yp7dwqdt.js → index-9tdk1jd5.js} +2 -2
- package/dist/index-ampejsqd.js +2 -0
- package/dist/index-aq49ztmj.js +2 -0
- package/dist/index-brb2fssx.js +4 -0
- package/dist/index-c4aack9s.js +2 -0
- package/dist/index-e0qytqhh.js +2 -0
- package/dist/index-eh2w7m4e.js +2 -0
- package/dist/index-ftn430ea.js +2 -0
- package/dist/{index-xmk5as68.js → index-fzn1f905.js} +2 -2
- package/dist/{index-q5rfnpnm.js → index-jmgcfmxe.js} +2 -2
- package/dist/index-jzyzapvz.js +2 -0
- package/dist/{index-1amahhaz.js → index-kzykjydw.js} +2 -2
- package/dist/{index-m7gvtt3h.js → index-p2yzw0qb.js} +2 -2
- package/dist/index-pe89kg1j.js +2 -0
- package/dist/index-pkw46hwt.js +2 -0
- package/dist/index-q560eskm.js +2 -0
- package/dist/{index-e503pv3f.js → index-r9trsk22.js} +2 -2
- package/dist/{index-5x3deeat.js → index-shpd3834.js} +2 -2
- package/dist/index-t2rwc8rk.js +2 -0
- package/dist/index-tb9dhges.js +2 -0
- package/dist/{index-r2keb0zb.js → index-w3zn83g3.js} +2 -2
- package/dist/index-w7hwsck8.js +2 -0
- package/dist/index-wnkq9nn0.js +2 -0
- package/dist/index-xy8a2fr7.js +2 -0
- package/dist/index-yaf9t9w5.js +42 -0
- package/dist/index-yh7sjgdy.js +2 -0
- package/dist/index.js +1 -1
- package/dist/resources.js +1 -1
- package/dist/shadcn.css +3 -4
- package/dist/tokens/theme.js +1 -1
- package/dist/utils/cn.js +1 -1
- package/package.json +6 -45
- package/dist/chat.d.ts +0 -579
- package/dist/chat.js +0 -2
- package/dist/index-05ch8g3p.js +0 -2
- package/dist/index-2136bczj.js +0 -2
- package/dist/index-4r9c455p.js +0 -2
- package/dist/index-4vk89see.js +0 -2
- package/dist/index-4xymfb7h.js +0 -2
- package/dist/index-50pv1cer.js +0 -2
- package/dist/index-6aftpcjv.js +0 -2
- package/dist/index-74qkvrg9.js +0 -2
- package/dist/index-79sav2qr.js +0 -2
- package/dist/index-ar540v2r.js +0 -2
- package/dist/index-bpnj24pg.js +0 -2
- package/dist/index-d6srr7et.js +0 -2
- package/dist/index-dea72se6.js +0 -2
- package/dist/index-drbb68sv.js +0 -2
- package/dist/index-eccj25rh.js +0 -2
- package/dist/index-em3kg0cy.js +0 -2
- package/dist/index-eyr85r2d.js +0 -2
- package/dist/index-f22spsh5.js +0 -2
- package/dist/index-h7m6anb3.js +0 -7
- package/dist/index-hmd0rx9g.js +0 -2
- package/dist/index-j136rmty.js +0 -1
- package/dist/index-k1f6eehk.js +0 -2
- package/dist/index-ncrdjrq1.js +0 -2
- package/dist/index-ndjegtyf.js +0 -2
- package/dist/index-ra03yvht.js +0 -2
- package/dist/index-rqqztw4a.js +0 -42
- package/dist/index-s3nshy6x.js +0 -2
- package/dist/index-xqct5yan.js +0 -2
- package/dist/index-yqjasa46.js +0 -2
- package/dist/index-z6vdzwb1.js +0 -2
- package/dist/index-z9tsk9ev.js +0 -2
- package/dist/index-zwm9cyre.js +0 -2
- package/dist/styles.css +0 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{Po,Ct,Ve,Io,Lo,To,Eo,Mo,zt,Gt,St,Ao,Do,Rt}from"../../index-zwm9cyre.js";import"../../index-xqct5yan.js";import{n}from"../../index-rqqztw4a.js";import"../../index-j136rmty.js";import{N,_,U,Qt,O,Q,g}from"../../index-yqjasa46.js";import{lr,cr,dr,No,Xe,ur,ge,Qe,fr,Pt,pr,He,ve,q,j,K,Br,Oo,Fo,Bo,Vo,Ho,Uo,Wt,mr,hr,gr,Go,$o,Hr,Ur,qo,jo}from"../../index-h7m6anb3.js";import{Fr,wt,wa}from"../../index-6aftpcjv.js";import"../../index-ar540v2r.js";import"../../index-4xymfb7h.js";import{Zt,Jt,er}from"../../index-05ch8g3p.js";import{Zo}from"../../index-z6vdzwb1.js";import{L}from"../../index-74qkvrg9.js";import{Ie,Le,Te}from"../../index-50pv1cer.js";import{P}from"../../index-drbb68sv.js";import{Y,Gr,$r,Wr,Yt,Xt}from"../../index-ncrdjrq1.js";import{vr}from"../../index-r2keb0zb.js";import{aa}from"../../index-ndjegtyf.js";import{H,he,$t,kt,Ye}from"../../index-dea72se6.js";import{qt,jt,Ze,Je,ae,Kt,et}from"../../index-79sav2qr.js";import{b}from"../../index-bpnj24pg.js";import{I}from"../../index-hmd0rx9g.js";import{v}from"../../index-4vk89see.js";import"../../index-yp7dwqdt.js";import{y,C}from"../../index-em3kg0cy.js";import"../../index-z9tsk9ev.js";import{i}from"../../index-eccj25rh.js";import{e}from"../../index-1amahhaz.js";import{jsx as oc,jsxs as ac}from"react/jsx-runtime";var nc=({children:t,loading:r=!1,fullWidth:o=!1,className:a,disabled:s,variant:l,size:c,...d})=>ac(n,{variant:l,size:c,className:e(o&&"w-full",a),disabled:s===!0||r,...d,children:[r&&oc(Rt,{size:20,className:"mr-2"}),t]}),sc=nc;import*as Wa from"react";import{jsx as Ga,jsxs as lc}from"react/jsx-runtime";var ic=({children:t,className:r,type:o="button",...a},s)=>lc(n,{ref:s,type:o,variant:"ghost",size:"sm",className:e("h-9 rounded-full border border-dashed border-border/80 bg-background px-3 text-xs font-medium text-muted-foreground shadow-xs transition-[transform,color,background-color,border-color] hover:border-primary/35 hover:bg-muted/45 hover:text-foreground active:scale-[0.98]",r),...a,children:[Ga("span",{className:"mr-2 inline-flex size-5 items-center justify-center rounded-full border border-border/70 bg-muted/45 text-foreground",children:Ga(St,{className:"size-3.5"})}),t]}),En=Wa.forwardRef(ic);En.displayName="AddItemButton";var cc=En;import{forwardRef as dc}from"react";import{jsx as pc}from"react/jsx-runtime";var Xa=(t,r,o)=>{if(r<1||r>12||o<1||o>31)return!1;let a=new Date(t,r-1,o);return a.getFullYear()===t&&a.getMonth()===r-1&&a.getDate()===o},uc=(t)=>{let r=t.trim();if(!r)return null;let o=/^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$/u.exec(r);if(o){let{year:s,month:l,day:c}=o.groups??{};return Xa(Number(s),Number(l),Number(c))?`${s}-${l}-${c}`:null}let a=/^(?<day>\d{1,2})[/\-.](?<month>\d{1,2})[/\-.](?<year>\d{4})$/u.exec(r);if(a){let{day:s,month:l,year:c}=a.groups??{},d=Number(s),u=Number(l),p=Number(c);if(!Xa(p,u,d))return null;return`${p}-${String(u).padStart(2,"0")}-${String(d).padStart(2,"0")}`}return null},Ua=dc(function({onPaste:r,...o},a){return pc(g,{ref:a,type:"date",onPaste:(l)=>{let c=l.clipboardData.getData("text"),d=uc(c);if(d!==null&&d!==""){l.preventDefault();let u=l.currentTarget,p=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value")?.set?.bind(u);if(p!==void 0)p(d),u.dispatchEvent(new Event("input",{bubbles:!0}))}r?.(l)},...o})});Ua.displayName="DateInput";var mc=Ua;import*as Ka from"react";import{jsx as gc}from"react/jsx-runtime";var Ya=i("font-display font-bold leading-[1.06] tracking-tight text-foreground",{defaultVariants:{size:"lg"},variants:{size:{lg:"text-[1.5rem] sm:text-[1.85rem]",md:"text-[1.15rem] sm:text-[1.25rem]",sm:"text-[1rem]",xl:"text-[2.1rem] sm:text-[2.5rem]"}}}),fc=({as:t="h2",size:r,className:o,...a},s)=>gc(t,{ref:s,className:e(Ya({size:r}),o),...a}),qa=Ka.forwardRef(fc);qa.displayName="DisplayHeading";var bc=qa;import*as Vt from"react";import{jsx as Ir,jsxs as Qa,Fragment as Za}from"react/jsx-runtime";var Mn=Vt.forwardRef(function({value:r,label:o,variant:a="icon",copyLabel:s="Copy",copiedLabel:l="Copied",errorMessage:c="Failed to copy to clipboard",resetDelay:d=1500,className:u,onClick:p,...m},f){let[h,R]=Vt.useState(!1),x=Vt.useRef(null);Vt.useEffect(()=>()=>{if(x.current!==null)clearTimeout(x.current)},[]);let S=async(V)=>{p?.(V);try{if(await navigator.clipboard.writeText(r),R(!0),x.current!==null)clearTimeout(x.current);x.current=setTimeout(()=>{R(!1)},d)}catch{ge.error(c)}};if(a==="button")return Ir(n,{ref:f,type:"button",variant:"outline",onClick:(V)=>{S(V)},"aria-label":`Copy ${o}`,className:e("shrink-0",u),...m,children:h?Qa(Za,{children:[Ir(y,{className:"mr-1 size-4"}),l]}):Qa(Za,{children:[Ir(ae,{className:"mr-1 size-4"}),s]})});return Ir("button",{ref:f,type:"button",onClick:(V)=>{S(V)},"aria-label":`Copy ${o}`,className:e("flex size-8 shrink-0 items-center justify-center rounded-md border border-border bg-card text-muted-foreground transition hover:border-primary/40 hover:text-primary",u),...m,children:h?Ir(y,{className:"size-3.5 text-primary"}):Ir(ae,{className:"size-3.5"})})});Mn.displayName="CopyButton";var vc=Mn;import{jsx as Jo,jsxs as hc}from"react/jsx-runtime";var es="#a3d54a",ts=({className:t,...r})=>hc("svg",{...r,"aria-hidden":"true",className:e("size-6 shrink-0",t),"data-slot":"collective-intelligence-loader",fill:"none",viewBox:"0 0 24 24",children:[Jo("polyline",{className:"origin-center motion-safe:animate-[ci-breathe-left_1.8s_ease-in-out_infinite]",points:"10,5.5 4.5,12 10,18.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.2}),Jo("polyline",{className:"origin-center motion-safe:animate-[ci-breathe-right_1.8s_ease-in-out_infinite]",points:"14,5.5 19.5,12 14,18.5",stroke:es,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.2}),Jo("circle",{className:"origin-center [transform-box:fill-box] motion-safe:animate-[ci-pulse-dot_1.8s_ease-in-out_infinite]",cx:12,cy:12,fill:es,r:2.3})]});ts.displayName="CollectiveIntelligenceLoader";var xc=ts;import{jsx as wc}from"react/jsx-runtime";var yc=({children:t,className:r})=>wc("div",{className:e("text-destructive text-sm text-center",r),children:t}),Nc=yc;import*as rs from"react";import{jsx as Cc}from"react/jsx-runtime";var Rc=({value:t,fallback:r="—",locale:o,className:a,...s},l)=>Cc("span",{ref:l,className:e("tabular-nums",a),...s,children:t===null||t===void 0?r:new Intl.NumberFormat(o).format(t)}),ns=rs.forwardRef(Rc);ns.displayName="FormattedNumber";var Sc=ns;import*as os from"react";import{jsx as kc}from"react/jsx-runtime";var Pc={accent:"bg-[color-mix(in_oklab,var(--chart-1)_12%,var(--card))] text-[color-mix(in_oklab,var(--chart-1)_85%,var(--foreground))] border-[color-mix(in_oklab,var(--chart-1)_22%,var(--border))]",gold:"bg-[color-mix(in_oklab,var(--chart-3)_15%,var(--card))] text-[color-mix(in_oklab,var(--chart-3)_65%,var(--foreground))] border-[color-mix(in_oklab,var(--chart-3)_28%,var(--border))]",neutral:"bg-(--bg-surface-alt)/70 text-(--text-secondary) border-(--border-subtle)",sage:"bg-[color-mix(in_oklab,var(--chart-2)_14%,var(--card))] text-[color-mix(in_oklab,var(--chart-2)_70%,var(--foreground))] border-[color-mix(in_oklab,var(--chart-2)_26%,var(--border))]",sky:"bg-[color-mix(in_oklab,var(--chart-4)_14%,var(--card))] text-[color-mix(in_oklab,var(--chart-4)_70%,var(--foreground))] border-[color-mix(in_oklab,var(--chart-4)_26%,var(--border))]",violet:"bg-[color-mix(in_oklab,var(--chart-5)_14%,var(--card))] text-[color-mix(in_oklab,var(--chart-5)_70%,var(--foreground))] border-[color-mix(in_oklab,var(--chart-5)_26%,var(--border))]"},Tc={lg:"size-12 rounded-lg text-[17px] [&_svg]:size-6",md:"size-10 rounded-lg text-[15px] [&_svg]:size-5",sm:"size-8 rounded-md text-[13px] [&_svg]:size-4"},as=os.forwardRef(function({tone:r="neutral",size:o="md",initial:a,className:s,children:l,...c},d){return kc("span",{ref:d,"aria-hidden":!0,className:e("inline-flex shrink-0 select-none items-center justify-center border font-display font-bold",Tc[o],Pc[r],s),...c,children:l??(a!==void 0&&a!==""?a.slice(0,2).toUpperCase():null)})});as.displayName="IconTile";var Lc=as;import*as ss from"react";import{jsx as Mc}from"react/jsx-runtime";var Dc={accent:"text-(--accent)",copper:"text-(--text-muted)",default:"text-(--text-muted)",muted:"text-(--text-muted)"},Ec=({as:t="span",tone:r="default",className:o,...a},s)=>Mc(t,{ref:s,className:e("inline-block text-[11px] font-semibold uppercase tracking-[0.06em]",Dc[r],o),...a}),Ar=ss.forwardRef(Ec);Ar.displayName="Kicker";var Ic=Ar;import*as is from"react";import{jsx as Hc}from"react/jsx-runtime";var Ac=(t)=>`+${t}`,Oc=({expanded:t,hiddenCount:r,collapsedLabel:o=Ac,expandedLabel:a="Show less",onToggle:s,className:l,...c},d)=>Hc("button",{ref:d,type:"button",onClick:s,className:e("inline-flex items-center gap-1 rounded-full border border-dashed border-muted-foreground/40 bg-muted/20 px-2.5 py-1 text-[11px] font-medium text-muted-foreground hover:bg-muted/40 hover:text-foreground transition-colors",l),...c,children:t?a:o(r)}),ls=is.forwardRef(Oc);ls.displayName="ShowMoreTag";var Vc=ls;import*as cs from"react";import{jsx as _c}from"react/jsx-runtime";var Bc=i("font-sans leading-none tabular-nums text-primary",{defaultVariants:{size:"md"},variants:{size:{lg:"text-[1.4rem]",md:"text-[1.1rem]",sm:"text-[0.95rem]",xl:"text-[2rem]"}}}),Fc=({size:t,className:r,...o},a)=>_c("span",{ref:a,className:e(Bc({size:t}),r),...o}),Or=cs.forwardRef(Fc);Or.displayName="SerifNumeral";var zc=Or;import*as ps from"react";import{jsx as us,jsxs as ds}from"react/jsx-runtime";var $c={neutral:"border-(--border-subtle) bg-card text-muted-foreground",warning:"border-[color-mix(in_oklab,var(--warning)_40%,var(--border))] bg-[color-mix(in_oklab,var(--warning)_12%,var(--card))] text-[color-mix(in_oklab,var(--warning)_75%,var(--foreground))]"},jc=({tooltip:t,tone:r="neutral",icon:o,className:a,children:s,...l},c)=>ds(mr,{children:[us(hr,{asChild:!0,children:ds(L,{ref:c,variant:"outline",className:e($c[r],a),...l,children:[o,s]})}),us(gr,{children:t})]}),ms=ps.forwardRef(jc);ms.displayName="TooltipBadge";var Jc=ms;import*as fs from"react";import{jsx as Wc}from"react/jsx-runtime";var Gc={body1:{className:"text-base",tag:"p"},body2:{className:"text-sm",tag:"p"},h1:{className:"text-2xl font-semibold",tag:"h1"},h2:{className:"text-xl font-bold",tag:"h2"},h3:{className:"text-lg font-semibold",tag:"h3"},h4:{className:"text-base font-medium",tag:"h4"},subtitle1:{className:"text-base font-normal text-muted-foreground",tag:"h6"},subtitle2:{className:"text-sm font-medium text-muted-foreground",tag:"h6"}},In=fs.forwardRef(function({variant:r="body1",as:o,className:a,...s},l){let{tag:c,className:d}=Gc[r];return Wc(o??c,{ref:l,className:e(d,a),...s})});In.displayName="Typography";import{jsx as Uc}from"react/jsx-runtime";var Xc=({children:t,as:r="form",className:o,onSubmit:a,...s})=>{let l=(c)=>{c.preventDefault(),a?.(c)};return Uc(r,{className:e("flex flex-col gap-4 min-w-[300px]",o),onSubmit:l,...s,children:t})},Kc=Xc;import{jsx as Qc}from"react/jsx-runtime";var gs={},Vr=(...t)=>{for(let r of t)if(r!==void 0)return r;return 1},Yc=(t=gs)=>({"--list-cols":Vr(t.cols),"--list-cols-2xl":Vr(t.cols2xl,t.colsXl,t.colsLg,t.colsMd,t.colsSm,t.cols),"--list-cols-lg":Vr(t.colsLg,t.colsMd,t.colsSm,t.cols),"--list-cols-md":Vr(t.colsMd,t.colsSm,t.cols),"--list-cols-sm":Vr(t.colsSm,t.cols),"--list-cols-xl":Vr(t.colsXl,t.colsLg,t.colsMd,t.colsSm,t.cols)}),qc=["grid","gap-4","[grid-template-columns:repeat(var(--list-cols),minmax(0,1fr))]","sm:[grid-template-columns:repeat(var(--list-cols-sm),minmax(0,1fr))]","md:[grid-template-columns:repeat(var(--list-cols-md),minmax(0,1fr))]","lg:[grid-template-columns:repeat(var(--list-cols-lg),minmax(0,1fr))]","xl:[grid-template-columns:repeat(var(--list-cols-xl),minmax(0,1fr))]","2xl:[grid-template-columns:repeat(var(--list-cols-2xl),minmax(0,1fr))]"].join(" "),Zc=({cols:t=gs,children:r,...o})=>Qc("div",{className:qc,style:Yc(t),...o,children:r});import{jsx as td}from"react/jsx-runtime";var ed=({className:t,spaced:r=!1,...o})=>td("div",{className:e("animate-[rise-in_500ms_cubic-bezier(0.16,1,0.3,1)_both]",r&&"space-y-6",t),...o});var rd=ed;import{jsx as pn,jsxs as _r}from"react/jsx-runtime";var nd=(t)=>t!==null&&t!==void 0&&t.constructor===String,un=(t)=>t!==null&&t!==void 0&&t!==!1&&t!==""&&t!==0,od=({title:t,description:r,icon:o,kicker:a,status:s,actions:l,className:c})=>_r("header",{className:e("space-y-2",c),children:[un(a)?_r("div",{className:"flex items-center gap-2 text-(--text-muted) [&_svg]:h-3.5 [&_svg]:w-3.5",children:[un(o)?pn("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-sm bg-(--bg-accent-soft) text-(--accent)",children:o}):null,pn("span",{className:"text-[12px] font-medium tracking-tight [&_span.sep]:mx-1.5 [&_span.sep]:text-(--accent)",children:nd(a)?a.split("·").map((d,u,p)=>_r("span",{children:[d.trim(),u<p.length-1?pn("span",{className:"sep","aria-hidden":!0,children:"·"}):null]},u)):a})]}):null,_r("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[_r("div",{className:"min-w-0 flex-1 basis-64 space-y-1.5",children:[pn("h1",{className:"font-display text-[27px] font-bold leading-tight tracking-[-0.02em] text-(--text-primary)",children:t}),un(r)?pn("p",{className:"max-w-2xl text-[14px] leading-relaxed text-(--text-secondary)",children:r}):null]}),un(l)||un(s)?_r("div",{className:"flex shrink-0 items-center gap-2 pt-1",children:[s,l]}):null]})]}),ad=od;import*as vs from"react";import{jsx as An,jsxs as bs}from"react/jsx-runtime";var Wo=(t)=>t!==void 0&&t!==null&&t!==!1&&t!==0&&t!==""&&!Number.isNaN(t),hs=vs.forwardRef(function({icon:r,title:o,description:a,action:s,className:l,...c},d){return bs("div",{ref:d,className:e("flex items-start gap-3",l),...c,children:[Wo(r)?An("span",{"aria-hidden":!0,className:"mt-0.5 inline-flex shrink-0 items-center justify-center rounded-md bg-muted p-2 text-muted-foreground [&_svg]:h-4 [&_svg]:w-4",children:r}):null,bs("div",{className:"min-w-0 flex-1",children:[An("h3",{className:"text-[15px] font-semibold leading-snug text-foreground",children:o}),Wo(a)?An("p",{className:"mt-0.5 text-sm leading-relaxed text-muted-foreground",children:a}):null]}),Wo(s)?An("div",{className:"shrink-0",children:s}):null]})});hs.displayName="SectionHeader";var sd=hs;import{jsx as xs,jsxs as ld}from"react/jsx-runtime";var id=({title:t,toolbar:r})=>ld("div",{className:"flex items-center justify-between mb-12",children:[xs(In,{variant:"h2",children:t}),Boolean(r)&&xs("div",{className:"flex items-center gap-2",children:r})]}),cd=id;import*as Hn from"react";import{jsx as qe,jsxs as On}from"react/jsx-runtime";var ys=(t,r,o)=>{if(t.length>=r)return t;return[...t,...Array.from({length:r-t.length},o)]},dd=[],Xo=({values:t,defaultValues:r=dd,onValuesChange:o,addLabel:a,getRemoveLabel:s,actions:l,minItems:c=0,disabled:d=!1,renderItem:u,createItem:p,validateItem:m,classes:f,className:h,id:R,...x})=>{let S=Hn.useId(),[V,E]=Hn.useState(()=>ys(r,c,p)),T=ys(t??V,c,p),k=Boolean(l),M=(F)=>{if(t===void 0)E(F);o?.(F)};return On("div",{"data-slot":"array-input",className:e("space-y-2",f?.root,h),...x,children:[qe("div",{className:"space-y-2",children:T.map((F,D)=>{let A=D===0&&R!==void 0&&R!==""?R:`${S}-${D}`,B=m?.(F,D);return On("div",{className:e("flex items-center gap-3",f?.row),children:[u({disabled:d,id:A,index:D,onValueChange:(Z)=>{let J=[...T];J[D]=Z,M(J)},validationMessage:B,value:F}),T.length>c?qe(n,{type:"button",variant:"ghost",size:"icon",disabled:d,"aria-label":s(D),className:e("size-10 shrink-0 text-muted-foreground hover:text-destructive",f?.removeButton),onClick:()=>{M(T.filter((Z,J)=>J!==D))},children:qe(Ao,{"aria-hidden":"true",className:"size-4"})}):null]},D)})}),On("div",{className:e("flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",f?.actionRow),children:[qe(En,{disabled:d,className:f?.addButton,onClick:()=>{M([...T,p()])},children:a}),k?qe("div",{className:e("sm:ml-auto",f?.actions),children:l}):null]})]})},ud=(t)=>{let{createItem:r,getItemLabel:o,inputProps:a,placeholder:s,required:l=!1,renderItem:c,...d}=t,{className:u,...p}=a??{};if(c!==void 0)return qe(Xo,{...d,createItem:r??(()=>""),renderItem:c});return qe(Xo,{...d,createItem:r??(()=>""),renderItem:(m)=>{let{disabled:f,id:h,index:R,onValueChange:x,validationMessage:S,value:V}=m;return On("div",{className:"min-w-0 flex-1",children:[qe(g,{...p,id:h,"aria-label":o(R),"aria-invalid":Boolean(S),value:V,placeholder:s,required:l,disabled:f,className:e("w-full",u,d.classes?.input),onChange:(E)=>{x(E.target.value)}}),S!==void 0&&S!==""?qe("p",{className:"mt-1 text-xs text-destructive",role:"alert",children:S}):null]})}})},pd=(t)=>qe(Xo,{...t}),md=(t)=>t.createItem!==void 0&&t.renderItem!==void 0,ws=(t)=>{if(md(t))return qe(pd,{...t});return qe(ud,{...t})};ws.displayName="ArrayInput";var fd=ws;import*as zr from"react";var Bt=(t,r)=>{let o=[];for(let a of t){let s=o.findIndex((l)=>r(a,l)<0);if(s===-1)o.push(a);else o.splice(s,0,a)}return o};var tt={hour:9,interval:1,minute:0,mode:"day",monthday:1,weekdays:[1,2,3,4,5]},Ko=/^\*\/(?<step>\d+)$/u,gd=(t)=>{let r=[];for(let o of t.split(",")){let a=/^(?<start>\d+)-(?<end>\d+)$/u.exec(o);if(a){let s=Number(a.groups?.start),l=Number(a.groups?.end);if(s>l)return null;for(let c=s;c<=l;c+=1)r.push(c)}else if(/^\d+$/u.test(o))r.push(Number(o));else return null}return r},bd=(t,r,o,a)=>{if(r==="*"&&o==="*"&&a==="*"){let s=Ko.exec(t),l=Number(s?.groups?.step);return s&&l>=1&&l<=59?{...tt,interval:l,mode:"minutes"}:null}return},vd=(t,r,o,a)=>{if(r!=="*"||o!=="*")return;let s=Ko.exec(t);if(s){let l=Number(s.groups?.step);return l>=1&&l<=23?{...tt,interval:l,minute:a,mode:"hours"}:null}return},hd=(t,r,o)=>{let a=Ko.exec(t);if(a){let l=Number(a.groups?.step);if(l%7===0&&l>=7&&l<=28)return{...tt,hour:r,interval:l/7,minute:o,mode:"weeks"};return l>=1&&l<=31?{...tt,hour:r,interval:l,minute:o,mode:"days"}:null}let s=Number(t);return/^\d+$/u.test(t)&&s>=1&&s<=31?{...tt,hour:r,minute:o,mode:"month",monthday:s}:null},xd=(t,r,o)=>{let a=gd(t);if(!a||a.some((l)=>l<0||l>7))return null;let s=Bt(new Set(a.map((l)=>l===7?0:l)),(l,c)=>l-c);return{...tt,hour:r,minute:o,mode:"week",weekdays:s}},mn=(t)=>{let r=t.trim().split(/\s+/u);if(r.length!==5)return null;let[o,a,s,l,c]=r;if(l!=="*")return null;let d=bd(o,a,s,c);if(d!==void 0)return d;if(!/^\d+$/u.test(o))return null;let u=Number(o);if(u<0||u>59)return null;let p=vd(a,s,c,u);if(p!==void 0)return p;if(!/^\d+$/u.test(a))return null;let m=Number(a);if(m<0||m>23)return null;if(s==="*"&&c==="*")return{...tt,hour:m,minute:u,mode:"day"};if(c==="*")return hd(s,m,u);if(s==="*")return xd(c,m,u);return null},Ft=(t)=>{let r=Math.max(1,Math.floor(t.interval));switch(t.mode){case"minutes":return`*/${Math.min(r,59)} * * * *`;case"hours":return`${t.minute} */${Math.min(r,23)} * * *`;case"day":return`${t.minute} ${t.hour} * * *`;case"days":return`${t.minute} ${t.hour} */${Math.min(r,31)} * *`;case"week":{let o=t.weekdays.length>0?Bt(new Set(t.weekdays),(a,s)=>a-s).join(","):"*";return`${t.minute} ${t.hour} * * ${o}`}case"weeks":return`${t.minute} ${t.hour} */${Math.min(r*7,28)} * *`;case"month":return`${t.minute} ${t.hour} ${Math.min(Math.max(t.monthday,1),31)} * *`;default:throw Error("Unsupported cron mode")}},Ns=(t,r,o)=>{if(t==="*")return!0;for(let a of t.split(",")){let s=/^(?<base>\*|\d+|\d+-\d+)\/(?<increment>\d+)$/u.exec(a);if(s){let c=s.groups?.base??"";if(c!=="*"&&!Ns(c,r,o))return!1;let d=Number(s.groups?.increment);if(!Number.isFinite(d)||d<1)return!1;continue}let l=/^(?<start>\d+)-(?<end>\d+)$/u.exec(a);if(l){let c=Number(l.groups?.start),d=Number(l.groups?.end);if(c<r||d>o||c>d)return!1;continue}if(/^\d+$/u.test(a)){let c=Number(a);if(c<r||c>o)return!1;continue}return!1}return!0},yd=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],wd=(t,r)=>{let o=String(t).padStart(2,"0"),a=String(r).padStart(2,"0");return`${o}:${a}`},Vn=(t)=>{let r=mn(t);if(!r)return t;let o=wd(r.hour,r.minute);switch(r.mode){case"minutes":return r.interval===1?"Every minute":`Every ${r.interval} minutes`;case"hours":return r.interval===1?`Every hour at :${String(r.minute).padStart(2,"0")}`:`Every ${r.interval} hours at :${String(r.minute).padStart(2,"0")}`;case"day":return`Every day at ${o}`;case"days":return r.interval===1?`Every day at ${o}`:`Every ${r.interval} days at ${o}`;case"week":{if(r.weekdays.length===0)return`Weekly at ${o}`;let a=Bt(r.weekdays,(d,u)=>d-u),s=a.length===5&&a.every((d,u)=>d===u+1),l=a.length===2&&a[0]===0&&a[1]===6;if(s)return`Weekdays at ${o}`;if(l)return`Weekends at ${o}`;return`${a.map((d)=>yd[d].slice(0,3)).join(", ")} at ${o}`}case"weeks":return r.interval===1?`Every week at ${o}`:`Every ${r.interval} weeks at ${o}`;case"month":return`Day ${r.monthday} of every month at ${o}`;default:throw Error("Unsupported cron mode")}},Yo=(t)=>{let r=t.trim().split(/\s+/u);if(r.length!==5)return!1;let o=[[0,59],[0,23],[1,31],[1,12],[0,7]];return r.every((a,s)=>Ns(a,o[s][0],o[s][1]))};import*as Cs from"react";var Rs=(t)=>{let a=new Intl.DateTimeFormat("en-US",{timeZone:t,timeZoneName:"shortOffset"}).formatToParts(new Date).find((u)=>u.type==="timeZoneName")?.value??"GMT",s=/(?<sign>[+-])(?<hours>\d{1,2})(?::(?<minutes>\d{2}))?/u.exec(a);if(!s)return 0;let l=s.groups?.sign==="-"?-1:1,c=Number(s.groups?.hours??0),d=Number(s.groups?.minutes??0);return l*(c*60+d)},Nd=(t)=>{let r=Rs(t),o=r>=0?"+":"-",a=Math.abs(r),s=String(Math.floor(a/60)).padStart(2,"0"),l=String(a%60).padStart(2,"0");return`${o}${s}:${l}`},Bn=null,Qo=()=>{if(Bn)return Bn;let t="supportedValuesOf"in Intl?Intl.supportedValuesOf("timeZone"):["UTC"];return Bn=Bt(["UTC",...t].map((r)=>({label:`${r} (UTC${Nd(r)})`,offset:Rs(r),value:r})),(r,o)=>r.offset-o.offset||r.value.localeCompare(o.value)).map(({value:r,label:o})=>({label:o,value:r})),Bn};import{jsx as Rd}from"react/jsx-runtime";var Fn=({value:t,onChange:r,className:o,width:a="100%",disabled:s,placeholder:l="Select timezone"})=>{let c=Cs.useMemo(()=>Qo(),[]);return Rd(Br,{options:c,value:t,onChange:(d)=>{r(d||"UTC")},placeholder:l,searchPlaceholder:"Search timezone...",emptyMessage:"No timezone found.",className:e("bg-transparent font-normal",o),width:a,disabled:s})};import{jsx as te,jsxs as Se,Fragment as Dd}from"react/jsx-runtime";var Ts=[{label:"X minutes",value:"minutes"},{label:"X hours",value:"hours"},{label:"Day",value:"day"},{label:"X days",value:"days"},{label:"Week",value:"week"},{label:"X weeks",value:"weeks"},{label:"Month",value:"month"}],Cd=[{label:"Monday",short:"Mon",value:1},{label:"Tuesday",short:"Tue",value:2},{label:"Wednesday",short:"Wed",value:3},{label:"Thursday",short:"Thu",value:4},{label:"Friday",short:"Fri",value:5},{label:"Saturday",short:"Sat",value:6},{label:"Sunday",short:"Sun",value:0}],Sd=(t)=>Ts.some((r)=>r.value===t),Ss=(t)=>{let r=t.trim();if(!r)return{custom:Ft(tt),simple:tt,view:"simple"};let o=mn(r);if(o)return{custom:r,simple:o,view:"simple"};return{custom:r,simple:tt,view:"advanced"}},Pd=(t,r)=>{let o=r===1;switch(t.value){case"minutes":return o?"minute":"minutes";case"hours":return o?"hour":"hours";case"day":return"day";case"days":return o?"day":"days";case"week":return"week";case"weeks":return o?"week":"weeks";case"month":return"month";default:throw Error("Unsupported cron mode")}},_n=(t,r,o)=>Math.max(r,Math.min(o,t)),Ps=(t)=>String(t).padStart(2,"0"),Td=({hour:t,minute:r,onChange:o})=>Se("div",{className:"flex items-center gap-1",children:[te(g,{type:"number",min:0,max:23,value:Ps(t),onChange:(a)=>{o(_n(Number(a.target.value)||0,0,23),r)},className:"w-16 text-center font-mono"}),te("span",{className:"text-muted-foreground",children:":"}),te(g,{type:"number",min:0,max:59,value:Ps(r),onChange:(a)=>{o(t,_n(Number(a.target.value)||0,0,59))},className:"w-16 text-center font-mono"})]}),kd=({state:t,onChange:r,timezone:o,onTimezoneChange:a})=>{let s=t.mode==="minutes"||t.mode==="hours"||t.mode==="days"||t.mode==="weeks",l=t.mode!=="minutes"&&t.mode!=="hours",c=t.mode==="hours",d=t.mode==="week",u=t.mode==="month";return Se("div",{className:"space-y-3",children:[te("div",{className:"grid gap-2 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-end",children:Se("div",{className:"space-y-2",children:[te("span",{className:"text-xs font-medium text-muted-foreground",children:"Every"}),Se("div",{className:e("grid gap-2",s?"grid-cols-[88px_minmax(0,1fr)]":"grid-cols-1"),children:[s&&te(g,{type:"number",min:1,value:t.interval,onChange:(p)=>{r({interval:Math.max(1,Number(p.target.value)||1)})},className:"font-mono"}),Se(Fo,{value:t.mode,onValueChange:(p)=>{if(Sd(p))r({mode:p})},children:[te(Vo,{className:"flex-1",children:te(Bo,{})}),te(Uo,{children:Ts.map((p)=>te(Ho,{value:p.value,children:Pd(p,t.interval)},p.value))})]})]})]})}),d&&Se("div",{className:"space-y-2",children:[te("span",{className:"text-xs font-medium text-muted-foreground",children:"On"}),te(qo,{type:"multiple",variant:"outline",size:"sm",value:t.weekdays.map(String),onValueChange:(p)=>{r({weekdays:p.length?Bt(p.map(Number),(m,f)=>m-f):[1]})},className:"w-full",children:Cd.map((p)=>te(jo,{value:String(p.value),"aria-label":p.label,className:"text-xs",children:p.short},p.value))})]}),u&&Se("div",{className:"space-y-2",children:[te("span",{className:"text-xs font-medium text-muted-foreground",children:"On day"}),te(g,{type:"number",min:1,max:31,value:t.monthday,onChange:(p)=>{r({monthday:_n(Number(p.target.value)||1,1,31)})},className:"w-24"})]}),(l||o!==void 0&&a)&&Se("div",{className:e("grid gap-3",l&&o!==void 0&&a?"lg:grid-cols-[auto_minmax(0,1fr)] lg:items-end":"grid-cols-1"),children:[l&&Se("div",{className:"space-y-2",children:[te("span",{className:"text-xs font-medium text-muted-foreground",children:"At"}),te(Td,{hour:t.hour,minute:t.minute,onChange:(p,m)=>{r({hour:p,minute:m})}})]}),o!==void 0&&a&&Se("div",{className:"space-y-2",children:[te("span",{className:"text-xs font-medium text-muted-foreground",children:"Timezone"}),te(Fn,{value:o,onChange:a})]})]}),c&&Se("div",{className:"space-y-2",children:[te("span",{className:"text-xs font-medium text-muted-foreground",children:"At minute"}),te(g,{type:"number",min:0,max:59,value:t.minute,onChange:(p)=>{r({minute:_n(Number(p.target.value)||0,0,59)})},className:"w-24"})]})]})},Ld=({value:t,onChange:r,className:o,showPreview:a=!0,timezone:s,onTimezoneChange:l})=>{let[c,d]=zr.useState(()=>Ss(t)),[u,p]=zr.useState(t),[m,f]=zr.useState(t);if(t!==u){if(p(t),t!==m)f(t),d(Ss(t))}let h=zr.useCallback((T)=>{let k=T.view==="simple"?Ft(T.simple):T.custom;f(k),r(k)},[r]),R=(T)=>{d((k)=>{let M={...k.simple,...T},F={...k,custom:Ft(M),simple:M};return h(F),F})},x=(T)=>{d((k)=>{let M={...k,custom:T};return h(M),M})},S=(T)=>{d((k)=>{if(T===k.view)return k;if(T==="advanced"){let D=Ft(k.simple),A={...k,custom:D,view:T};return h(A),A}let M=mn(k.custom),F=M?{...k,simple:M,view:T}:{...k,view:T};return h(F),F})},V=Yo(c.custom),E=null;if(c.view==="simple")E=Vn(Ft(c.simple));else if(V)E=Vn(c.custom);return Se("div",{className:e("space-y-4",o),children:[Se(Go,{value:c.view,onValueChange:(T)=>{if(T==="simple"||T==="advanced")S(T)},children:[Se($o,{className:"grid w-full grid-cols-2 rounded-md bg-muted/70 p-1 sm:w-[320px]",children:[te(Hr,{value:"simple",className:"text-xs",children:"Simple"}),te(Hr,{value:"advanced",className:"text-xs",children:"Advanced"})]}),te(Ur,{value:"simple",className:"space-y-3 pt-3",children:te(kd,{state:c.simple,onChange:R,timezone:s,onTimezoneChange:l})}),Se(Ur,{value:"advanced",className:"space-y-2 pt-3",children:[te("span",{className:"text-xs font-medium text-muted-foreground",children:"Cron Expression"}),te(g,{value:c.custom,onChange:(T)=>{x(T.target.value)},placeholder:"0 9 * * 1-5",className:e("font-mono text-sm",!V&&c.custom.trim()&&"border-destructive focus-visible:ring-destructive/40"),spellCheck:!1}),te("p",{className:"text-[11px] text-muted-foreground",children:"Format: minute hour day-of-month month day-of-week"})]})]}),c.view==="advanced"&&s!==void 0&&l&&Se("div",{className:"space-y-2",children:[te("span",{className:"text-xs font-medium text-muted-foreground",children:"Timezone"}),te(Fn,{value:s,onChange:l})]}),a&&te("div",{className:"flex min-h-8 flex-wrap items-center gap-2 rounded-md bg-muted/35 px-3 py-2 text-xs",children:E===null?te("span",{className:"text-destructive",children:"Invalid cron expression"}):Se(Dd,{children:[te("span",{className:"text-muted-foreground",children:E}),te(L,{variant:"secondary",className:"ml-auto font-mono text-[11px]",children:c.view==="simple"?Ft(c.simple):c.custom})]})})]})};import{jsx as ea}from"react/jsx-runtime";var Ed={both:"w-full h-full",horizontal:"w-full h-auto",none:"",vertical:"h-full w-auto"},Md=({src:t,alt:r="",className:o="",width:a,height:s,fill:l="horizontal",style:c})=>{if(l==="both")return ea("div",{className:e("relative overflow-hidden rounded-lg shadow-md",o),style:{height:s,width:a,...c},children:ea("img",{src:t,alt:r,className:"object-cover w-full h-full absolute inset-0"})});return ea("img",{src:t,alt:r,width:a,height:s,className:e("object-cover rounded-lg shadow-md",Ed[l],o),style:{height:l==="vertical"?"100%":s,width:l==="horizontal"?"100%":a,...c}})},Id=Md;import{jsx as zn,jsxs as ks}from"react/jsx-runtime";var Ad=({title:t,className:r,children:o,...a})=>ks("section",{"data-slot":"summary-list",className:e("space-y-2",r),...a,children:[t?zn("h3",{className:"text-sm font-semibold tracking-tight",children:t}):null,zn("dl",{className:"divide-y divide-border overflow-hidden rounded-lg border border-border bg-card",children:o})]}),Od=({label:t,value:r,muted:o=!1,className:a,...s})=>ks("div",{"data-slot":"summary-item",className:e("grid gap-1 px-4 py-3 sm:grid-cols-[minmax(8rem,14rem)_1fr] sm:gap-4",a),...s,children:[zn("dt",{className:"text-sm text-muted-foreground",children:t}),zn("dd",{className:e("min-w-0 break-words text-sm",o?"text-muted-foreground":"font-medium text-foreground"),children:r})]});import*as ta from"react";import{jsx as sr,jsxs as Ls}from"react/jsx-runtime";var Hd=({className:t,...r})=>sr(Gr,{"data-slot":"choice-card-group",className:e("grid gap-3",t),...r}),Vd=({title:t,description:r,media:o,footer:a,className:s,...l})=>{let c=ta.useId(),d=ta.useId(),u=Boolean(r);return Ls($r,{"data-slot":"choice-card","aria-labelledby":c,"aria-describedby":u?d:void 0,className:e("group/choice relative flex h-full min-w-0 flex-col items-start gap-4 rounded-lg border border-border bg-card p-5 text-left shadow-(--shadow-sm) outline-none transition-[border-color,background-color,box-shadow] dark:shadow-none","hover:border-foreground/25 focus-visible:ring-[3px] focus-visible:ring-ring/50","data-[state=checked]:border-primary data-[state=checked]:bg-primary/[0.04] data-[state=checked]:ring-1 data-[state=checked]:ring-primary/25","disabled:cursor-not-allowed disabled:bg-muted/30 disabled:opacity-65 disabled:hover:border-border",s),...l,children:[sr("span",{"aria-hidden":!0,className:"absolute top-4 right-4 flex size-5 items-center justify-center rounded-full border border-input bg-background text-primary-foreground transition-colors group-data-[state=checked]/choice:border-primary group-data-[state=checked]/choice:bg-primary",children:sr(Wr,{children:sr(y,{className:"size-3",strokeWidth:3})})}),o,Ls("span",{className:"block min-w-0 space-y-1 pr-7",children:[sr("span",{id:c,className:"block font-semibold tracking-tight",children:t}),u?sr("span",{id:d,className:"block text-sm leading-relaxed text-muted-foreground",children:r}):null]}),a?sr("span",{className:"mt-auto block w-full",children:a}):null]})};import*as _t from"react";import{jsx as Ut,jsxs as Ds}from"react/jsx-runtime";var Es=_t.forwardRef(function({className:r,...o},a){return Ut("div",{ref:a,className:e("grid gap-2",r),...o})}),Ms=({className:t,...r})=>Ut(Yt,{className:e("grid gap-2",t),...r}),ra=(t)=>t!==void 0&&t!==null&&t!==!1&&t!==0&&t!==""&&!Number.isNaN(t),$n=_t.forwardRef(function({title:r,description:o,descriptionId:a,wrapDescription:s=!1,disabled:l=!1,control:c,className:d,children:u,...p},m){return Ds("label",{ref:m,className:e("flex min-w-0 items-start gap-3 rounded-md border border-border p-3","has-[[data-state=checked]]:border-primary/50 has-[[data-state=checked]]:bg-primary/5",l?"cursor-not-allowed bg-muted/30 opacity-65":"cursor-pointer hover:bg-muted/50",d),...p,children:[c,Ds("span",{className:"min-w-0 flex-1",children:[Ut("span",{className:"block truncate text-sm font-medium",children:r}),ra(o)?Ut("span",{id:a,className:e("mt-1 block text-xs text-muted-foreground",!s&&"truncate"),children:o}):null,u]})]})}),Is=(t)=>Object.prototype.toString.call(t)==="[object String]",As=(t,r)=>t!==null&&r instanceof Node&&(t.contains(r)||r instanceof HTMLInputElement&&r.getAttribute("aria-hidden")==="true"),Bd=({value:t,title:r,description:o,radioLabel:a,disabled:s=!1,onClick:l,...c})=>{let d=_t.useId(),u=_t.useId(),p=a??(Is(r)?r:void 0);return Ut($n,{description:o,descriptionId:u,disabled:s,title:r,onClick:(m)=>{if(l?.(m),m.defaultPrevented||s)return;let f=document.querySelector(`#${d}`);if(As(f,m.target))return;m.preventDefault(),f?.click()},control:Ut(Xt,{"aria-describedby":ra(o)?u:void 0,"aria-label":p,className:"mt-1",disabled:s,id:d,value:t}),...c})},Fd=({checked:t,title:r,description:o,checkboxLabel:a,disabled:s=!1,onClick:l,onCheckedChange:c,...d})=>{let u=_t.useId(),p=_t.useId(),m=a??(Is(r)?r:void 0);return Ut($n,{description:o,descriptionId:p,disabled:s,title:r,onClick:(f)=>{if(l?.(f),f.defaultPrevented||s)return;if(As(document.querySelector(`#${u}`),f.target))return;f.preventDefault(),c(!t)},control:Ut(ur,{"aria-describedby":ra(o)?p:void 0,"aria-label":m,checked:t,className:"mt-0.5",disabled:s,id:u,onCheckedChange:(f)=>{if(!s)c(f===!0)}}),...d})};Es.displayName="CardOptionsBlock";Ms.displayName="RadioCardOptionsBlock";$n.displayName="CardOption";import*as Os from"react";import{jsx as fn,jsxs as na}from"react/jsx-runtime";var _d=({title:t,description:r,command:o,copyLabel:a=t??o,copyErrorMessage:s,className:l,...c},d)=>na("div",{ref:d,className:e("space-y-2",l),...c,children:[t===void 0&&r===void 0?null:na("div",{children:[t===void 0?null:fn("p",{className:"text-sm font-medium",children:t}),r===void 0?null:fn("p",{className:"text-sm text-muted-foreground",children:r})]}),na("div",{className:"flex items-start gap-2",children:[fn("pre",{className:"flex-1 overflow-x-auto rounded-md border bg-muted px-3 py-2 font-mono text-xs",children:fn("code",{children:o})}),fn(Mn,{value:o,label:a,errorMessage:s})]})]}),Hs=Os.forwardRef(_d);Hs.displayName="CommandStep";var zd=Hs;import{forwardRef as $d,useId as jd}from"react";import{jsx as gn,jsxs as Vs}from"react/jsx-runtime";var Bs=$d(function({currency:r,label:o="Amount",hint:a,hideLabel:s=!1,hideHint:l=!1,error:c,className:d,wrapperClassName:u,id:p,decimals:m=2,step:f,placeholder:h,...R},x){let S=jd(),V=p??S,E=`Enter amount in ${r}`,T=f??1/10**m,k=h??(m>0?`0.${"0".repeat(m)}`:"0"),M=c!==null&&c!==void 0&&c.length>0;return Vs("div",{className:e("w-full space-y-2",u),children:[!s&&gn(P,{htmlFor:V,children:o}),Vs("div",{className:"relative",children:[gn("span",{className:"-translate-y-1/2 absolute top-1/2 left-3 text-sm text-muted-foreground",children:r}),gn(g,{ref:x,className:e("bg-background pl-12",M&&"border-destructive",d),id:V,min:"0",placeholder:k,step:T,type:"number",...R})]}),M?gn("p",{className:"text-xs text-destructive",children:c}):!l&&gn("p",{className:"text-xs text-muted-foreground",children:a??E})]})});Bs.displayName="CurrencyInput";var Jd=Bs;import*as Fs from"react";import{jsx as jn,jsxs as oa}from"react/jsx-runtime";var _s=Fs.forwardRef(function({index:r,label:o,hint:a,className:s,children:l,...c},d){let u=Boolean(r),p=Boolean(a);return oa("div",{ref:d,className:e("grid gap-x-4",u?"grid-cols-[2.25rem_1fr] sm:grid-cols-[2.5rem_1fr]":"grid-cols-1",s),...c,children:[u?jn("div",{className:"flex h-6 items-center justify-end pt-[2px]",children:jn(Or,{children:r})}):null,oa("div",{className:"min-w-0 space-y-1.5",children:[oa("div",{className:"flex items-baseline justify-between gap-2",children:[jn(Ar,{children:o}),p?jn("span",{className:"text-[10px] text-muted-foreground",children:a}):null]}),l]})]})});_s.displayName="FieldRow";var Gd=_s;import{jsx as ie,jsxs as at,Fragment as Zd}from"react/jsx-runtime";var Wd=(t)=>{if(t===0)return"0 Bytes";let r=1024,o=["Bytes","KB","MB","GB"],a=Math.floor(Math.log(t)/Math.log(r));return`${Math.round(t/r**a*100)/100} ${o[a]}`},Xd={downloadFile:"Download file",downloadingFile:"Downloading file",dragActive:"Drop the file here",dragInactive:"Drag & drop a file here, or click to select",errorRetry:"Please try again",fileTypeHint:"PDF, DOC, DOCX up to 10MB"},Ud=({active:t,activeLabel:r,inactiveLabel:o,hint:a})=>at("div",{className:"flex w-full items-center gap-3",children:[ie("div",{className:e("flex h-10 w-10 shrink-0 items-center justify-center rounded-full transition-colors",t?"bg-[color-mix(in_oklab,var(--primary)_14%,var(--card))]":"bg-muted"),children:ie(Do,{className:e("h-5 w-5",t?"text-primary":"text-muted-foreground")})}),at("div",{children:[ie("p",{className:"text-sm font-medium text-foreground",children:t?r:o}),ie("p",{className:"text-xs text-muted-foreground",children:a})]})]}),Kd=({message:t,retryLabel:r})=>at("div",{className:"flex w-full items-center gap-3",children:[ie("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-destructive/10",children:ie(I,{className:"h-5 w-5 text-destructive"})}),at("div",{children:[ie("p",{className:"text-sm font-medium text-destructive",children:t}),ie("p",{className:"text-xs text-destructive/80",children:r})]})]}),Yd=({file:t,downloading:r,downloadLabel:o,downloadingLabel:a,onDownload:s,onRemove:l})=>at("div",{className:"flex w-full items-center justify-between",children:[at("div",{className:"flex items-center gap-3",children:[t.previewUrl!==void 0&&t.previewUrl!==null&&t.previewUrl!==""?at(Zd,{children:[ie("span",{"aria-hidden":"true",className:"h-20 w-28 shrink-0 rounded-md border border-input bg-background bg-contain bg-center bg-no-repeat",style:{backgroundImage:`url(${t.previewUrl})`}}),ie("span",{className:"sr-only",children:t.name})]}):ie("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-[color-mix(in_oklab,var(--success)_14%,var(--card))]",children:ie(H,{className:"h-5 w-5 text-(--success)"})}),at("div",{className:"flex flex-col",children:[at("div",{className:"flex items-center gap-2",children:[ie(Io,{className:"h-4 w-4 text-muted-foreground"}),ie("span",{className:"text-sm font-medium text-foreground",children:t.name})]}),ie("span",{className:"text-xs text-muted-foreground",children:Wd(t.size)})]})]}),at("div",{className:"flex shrink-0 items-center gap-1",children:[s?ie(n,{"aria-label":r?a:o,className:"h-8 w-8 rounded-full p-0",disabled:r,onClick:s,size:"sm",title:r?a:o,type:"button",variant:"ghost",children:r?ie(b,{className:"h-4 w-4 animate-spin"}):ie($t,{className:"h-4 w-4"})}):null,l?ie(n,{className:"h-8 w-8 rounded-full p-0 hover:bg-destructive/10",onClick:l,size:"sm",type:"button",variant:"ghost",children:ie(I,{className:"h-4 w-4 text-destructive"})}):null]})]}),qd=(t)=>{let{rootProps:r,inputProps:o,isDragActive:a,selectedFile:s,error:l,onRemoveFile:c,onDownloadFile:d,isDownloadingFile:u,disabled:p,className:m,labels:f}=t,h={...Xd,...f},R=s!==void 0&&s!==null,x=l!==void 0&&l!==null&&l!=="";return ie("div",{className:e("w-full",m),children:at("div",{...r,className:e("relative flex min-h-24 cursor-pointer items-center justify-center rounded-lg border-2 border-dashed bg-transparent px-4 py-5 transition-all",a===!0?"border-primary bg-[color-mix(in_oklab,var(--primary)_8%,var(--card))]":"border-input hover:border-input",R&&"border-[color-mix(in_oklab,var(--success)_60%,var(--border))] bg-[color-mix(in_oklab,var(--success)_10%,transparent)]",x&&"border-destructive bg-[color-mix(in_oklab,var(--destructive)_10%,var(--card))]",p===!0&&"cursor-not-allowed opacity-60",r?.className),children:[ie("input",{...o}),!R&&!x?ie(Ud,{active:Boolean(a),activeLabel:h.dragActive,hint:h.fileTypeHint,inactiveLabel:h.dragInactive}):null,s!==void 0&&s!==null&&!x?ie(Yd,{downloadLabel:h.downloadFile,downloading:Boolean(u),downloadingLabel:h.downloadingFile,file:s,onDownload:d,onRemove:c}):null,l!==void 0&&l!==null&&l!==""?ie(Kd,{message:l,retryLabel:h.errorRetry}):null]})})},Qd=qd;import{jsx as zs,jsxs as tu}from"react/jsx-runtime";var eu=i("inline-flex shrink-0 cursor-pointer items-center gap-1.5 rounded-full border font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{active:!1,size:"md"},variants:{active:{false:"border-(--border-subtle) bg-(--bg-surface)/60 text-(--text-secondary) hover:border-(--border-default) hover:text-(--text-primary)",true:"border-[color-mix(in_oklab,var(--accent)_35%,var(--border))] bg-(--bg-accent-soft) text-(--text-primary)"},size:{md:"h-8 px-3.5 text-[13px]",sm:"h-7 px-3 text-[12px]"}}}),$s=({options:t,value:r,onValueChange:o,label:a,size:s,className:l,classes:c,...d})=>zs("div",{"aria-label":a,className:e("flex flex-wrap items-center gap-1.5",c?.root,l),...d,children:t.map((u)=>{let p=u.value===r;return tu("button",{type:"button","aria-pressed":p,disabled:u.disabled,onClick:()=>{o(u.value)},className:e(eu({active:p,size:s}),c?.chip),children:[u.label,u.count===void 0?null:zs("span",{className:e("tabular-nums text-[11px] text-(--text-muted)",c?.count),children:u.count})]},u.value)})});$s.displayName="FilterChips";var ru=$s;import*as jr from"react";import{jsx as yt,jsxs as du}from"react/jsx-runtime";var nu=52,ou=26,Gn=4,Jn=20,au=(t)=>({"--flow-lane":t}),Js=jr.createContext(null),Gs=(t)=>{let r=jr.useContext(Js);if(!r)throw Error(`${t} must be rendered inside a FlowBand.`);return r},su=({lanes:t=1,stepHeight:r=nu,laneHeight:o=ou,className:a,style:s,children:l,...c})=>{let d=Math.max(r,t*o+(t-1)*Gn),u=jr.useMemo(()=>({height:d,stepHeight:r}),[d,r]);return yt(Js.Provider,{value:u,children:yt("div",{className:e("flex min-w-0 items-stretch gap-1",a),style:{height:d,...s},...c,children:l})})},iu=({className:t,style:r,children:o,...a})=>{let{stepHeight:s}=Gs("FlowStep");return yt("div",{className:e("flex min-w-0 flex-1 items-stretch self-center",t),style:{height:s,...r},...a,children:o})},js=({centers:t,height:r,colors:o,merge:a=!1})=>{let s=r/2,l=7;return yt("svg",{"aria-hidden":!0,width:Jn,height:r,viewBox:`0 0 ${Jn} ${r}`,className:"shrink-0",style:a?{transform:"scaleX(-1)"}:void 0,children:t.map((c,d)=>{let u=o[d];return yt("path",{style:au(u),d:`M0 ${s}H7C13 ${s} ${Jn-6} ${c} ${Jn} ${c}`,fill:"none",strokeWidth:1.5,strokeLinecap:"round",className:u!==void 0&&u!==""?"stroke-[color-mix(in_oklab,var(--flow-lane)_45%,var(--border))]":"stroke-border"},d)})})},lu=(t,r)=>{let o=(r-Gn*(t-1))/t;return Array.from({length:t},(a,s)=>s*(o+Gn)+o/2)},cu=({lanes:t,fork:r=!0,rejoin:o=!0,label:a,className:s,...l})=>{let{height:c}=Gs("FlowBranch"),d=lu(t.length,c),u=t.map((p)=>p.color);return du("div",{"aria-label":a,className:e("flex min-w-0 flex-1 items-stretch",s),...l,children:[r&&yt(js,{centers:d,height:c,colors:u}),yt("div",{className:"flex min-w-0 flex-1 flex-col",style:{gap:Gn},children:t.map((p)=>yt("div",{className:"flex min-w-0 flex-1 items-stretch overflow-hidden",children:p.content},p.key))}),o&&yt(js,{centers:d,height:c,colors:u,merge:!0})]})};import*as Ws from"react";import{jsx as sa,jsxs as pu}from"react/jsx-runtime";var uu=({index:t,className:r,children:o,...a},s)=>pu("div",{ref:s,className:e("grid grid-cols-[1.75rem_1fr] gap-x-3 leading-relaxed",r),...a,children:[sa("div",{className:"pt-[1px] text-right",children:sa(Or,{className:"opacity-80",children:t})}),sa("p",{className:"text-[13px] text-muted-foreground",children:o})]}),Xs=Ws.forwardRef(uu);Xs.displayName="GuideStep";var mu=Xs;import*as Xr from"react";import{jsx as Be,jsxs as Jr,Fragment as gu}from"react/jsx-runtime";var Us=Xr.forwardRef(function({className:r,variant:o="island",...a},s){return Be(Xe,{ref:s,variant:o,className:e("gap-0 p-0",r),...a})});Us.displayName="HierarchyTree";var Ks=Xr.forwardRef(function({title:r,icon:o,count:a,actions:s,className:l,...c},d){return Jr("div",{ref:d,"data-slot":"hierarchy-tree-header",className:e("flex flex-wrap items-center gap-3 border-b border-border px-4 py-3",l),...c,children:[Jr("div",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",children:[o!==void 0&&o!==null?Be("span",{className:"shrink-0 text-muted-foreground [&_svg]:h-4 [&_svg]:w-4",children:o}):null,Be("span",{className:"min-w-0 truncate",children:r}),a!==void 0&&a!==null?Be("span",{className:"rounded-full bg-muted px-2 py-0.5 text-xs font-normal text-muted-foreground",children:a}):null]}),s!==void 0&&s!==null?Be("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:s}):null]})});Ks.displayName="HierarchyTreeHeader";var Ys=Xr.forwardRef(function({className:r,...o},a){return Be("div",{ref:a,"data-slot":"hierarchy-tree-body",className:e("min-w-0",r),...o})});Ys.displayName="HierarchyTreeBody";var fu=[],qs=Xr.forwardRef(function({depth:r,rails:o=fu,isLastChild:a=!1,hasChildren:s=!1,contentClassName:l,className:c,children:d,...u},p){let m=Math.max(1,r);return Jr("div",{ref:p,"data-slot":"hierarchy-tree-row","data-depth":m,className:e("group flex items-stretch transition-colors hover:bg-muted/40",m===1&&"border-t border-border first:border-t-0",c),...u,children:[m>1?Jr("div",{"aria-hidden":!0,className:"flex shrink-0 pl-5",children:[o.map((f,h)=>Be("span",{className:"relative w-5",children:f?Be("span",{className:"absolute inset-y-0 left-0 border-l border-(--border-subtle)"}):null},h)),Be("span",{className:"relative w-5",children:a?Be("span",{className:e("absolute left-0 top-0 h-[22px] rounded-bl-md border-b border-l border-(--border-subtle)",s?"w-full":"w-14")}):Jr(gu,{children:[Be("span",{className:"absolute inset-y-0 left-0 border-l border-(--border-subtle)"}),Be("span",{className:e("absolute left-0 top-[22px] border-t border-(--border-subtle)",s?"w-full":"w-14")})]})})]}):null,Be("div",{className:e("flex min-w-0 flex-1 items-start gap-2 py-3 pl-2 pr-3",l),children:d})]})});qs.displayName="HierarchyTreeRow";var Zs=Xr.forwardRef(function({expanded:r,count:o,visible:a=!0,className:s,...l},c){return Jr(n,{ref:c,type:"button",variant:"ghost",size:"sm",className:e("h-6 shrink-0 gap-0.5 px-1 text-xs text-muted-foreground",!a&&"invisible",s),...l,children:[Be(C,{className:e("h-3.5 w-3.5 transition-transform",r&&"rotate-90")}),o]})});Zs.displayName="HierarchyTreeToggle";var bu=Us;import vu,{useState as hu}from"react";import{jsx as we,jsxs as We}from"react/jsx-runtime";var xu=i("font-mono text-sm rounded-md overflow-hidden flex flex-col",{defaultVariants:{size:"md",variant:"default"},variants:{size:{lg:"p-4 text-base",md:"p-3",sm:"p-2 text-xs"},variant:{default:"bg-card border border-border",filled:"bg-muted",outlined:"border border-border"}}}),ia=({value:t,ancestors:r})=>{if(t===null||t===void 0)return t;if(t===!0||t===!1)return t;let o=Object.prototype.toString.call(t);if(o==="[object String]"){let a=JSON.stringify(t);return a===void 0?o:a.slice(1,-1)}if(o==="[object Number]")return Number(t);if(Array.isArray(t)){if(r.has(t))return"[Circular]";r.add(t);let a=t.map((s)=>ia({ancestors:r,value:s}));return r.delete(t),a}if(t instanceof Object){if(r.has(t))return"[Circular]";r.add(t);let a=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,ia({ancestors:r,value:l})]));return r.delete(t),a}return o},yu=(t)=>{if(t===null||t===void 0)return"text-gray-500 dark:text-gray-400";if(String(t)===t)return"text-green-600 dark:text-green-400";if(t===!0||t===!1)return"text-amber-600 dark:text-amber-400";return"text-blue-600 dark:text-blue-400"},wu=(t)=>{if(t===null)return"null";if(t===void 0)return"undefined";if(String(t)===t)return`"${t}"`;return String(t)},Nu=(t)=>t,Ru=(t)=>t!==null&&Object(t)===t,Cu=(t,r)=>{if(t)return we("span",{className:"w-4"});return r?we(v,{className:"w-4 h-4"}):we(C,{className:"w-4 h-4"})},Su=(t)=>t?{close:"]",open:"["}:{close:"}",open:"{"},Pu=(t,r,o)=>t?{name:null,path:`${o}[${r}]`}:{name:String(r),path:`${o}.${r}`},Tu=({data:t,className:r,classes:o,variant:a,size:s,expandAll:l=!1,expandRoot:c=!0,indentSize:d=16,showLineNumbers:u=!1,showToolbar:p=!1,maxHeight:m,maxWidth:f,renderValue:h})=>{let R=vu.useMemo(()=>ia({ancestors:new WeakSet,value:t}),[t]),[x,S]=hu(()=>{let A={};if(c)A.root=!0;return A}),V=(A,B)=>{if(A==="root"&&x[A]===void 0)return c;return x[A]??B},E=(A)=>{S((B)=>({...B,[A]:!V(A,l)}))},T=(A)=>{S({})},k=()=>{try{let A=JSON.stringify(R,null,2);navigator.clipboard.writeText(A),ge.success("Copied to clipboard",{description:"JSON data has been copied to clipboard",duration:3000})}catch(A){console.error("Failed to copy JSON to clipboard",A),ge.error("Copy failed",{description:"Failed to copy JSON to clipboard",duration:3000})}},M={maxWidth:f??"auto"},F=(A,B,Z,J,ne)=>{let pe=[],ce=Ru(B),be=Array.isArray(B),ke=ce&&Object.keys(B).length===0,Ee=Su(be),le={marginLeft:Z*d},Fe=Nu(J),de=ne;if(!ce){let re=h?.(B,J);return pe.push(We("div",{className:"flex",children:[u&&we("div",{className:"text-gray-400 dark:text-gray-600 select-none w-8 text-right pr-2",children:de}),We("div",{className:"flex min-w-0",style:le,children:[we("span",{"aria-hidden":!0,className:"mr-1 w-4 shrink-0"}),A!==null&&We("span",{className:"shrink-0 text-purple-600 dark:text-purple-400",children:[`"${A}":`,we("span",{className:"text-gray-600 dark:text-gray-400 mr-1",children:" "})]}),re??we("span",{className:e("min-w-0 break-all",yu(B)),children:wu(B)})]})]},Fe)),[pe,de+1]}let Me=V(J,l),W=Cu(ke,Me);if(pe.push(We("div",{className:"flex items-start group",children:[u&&we("div",{className:"text-gray-400 dark:text-gray-600 select-none w-8 text-right pr-2",children:de}),We("div",{className:"flex items-start",style:le,children:[we("button",{onClick:()=>{E(J)},className:"mr-1 w-4 h-4 mt-0.5 focus:outline-none opacity-60 hover:opacity-100","aria-label":Me?"Collapse":"Expand",tabIndex:0,type:"button",children:W}),We("div",{children:[A!==null&&We("span",{className:"text-purple-600 dark:text-purple-400",children:[`"${A}":`,we("span",{className:"text-gray-600 dark:text-gray-400 mr-1",children:" "})]}),we("span",{className:"text-gray-600 dark:text-gray-400",children:Ee.open}),ke||!Me?We("span",{className:"text-gray-600 dark:text-gray-400",children:[ke?"":"...",Ee.close]}):null]})]})]},`${Fe}-open`)),de+=1,Me&&!ke){let re=de,ee=be?B.map((xe,_e)=>[_e,xe]):Object.entries(B);for(let[xe,_e]of ee){let ye=Pu(be,xe,J),[Et,G]=F(ye.name,_e,Z+1,ye.path,re);pe.push(...Et),re=G}return pe.push(We("div",{className:"flex",children:[u&&we("div",{className:"text-gray-400 dark:text-gray-600 select-none w-8 text-right pr-2",children:re}),we("div",{className:"text-gray-600 dark:text-gray-400",style:le,children:Ee.close})]},`${Fe}-close`)),re+=1,[pe,re]}return[pe,de]},[D]=F(null,R,0,"root",1);return We("div",{className:e(xu({size:s,variant:a}),o?.root,r),style:M,children:[p&&We("div",{className:e("flex justify-between items-center px-3 py-2 border-b border-border bg-muted/50",o?.toolbar),children:[we("div",{className:"text-sm font-medium",children:"JSON Viewer"}),We("div",{className:"flex gap-2",children:[we(n,{size:"sm",variant:"outline",onClick:()=>{T(!0)},children:"Expand All"}),we(n,{size:"sm",variant:"outline",onClick:()=>{T(!1)},children:"Collapse All"}),We(n,{size:"sm",variant:"outline",onClick:k,children:[we(ae,{className:"w-4 h-4 mr-1"}),"Copy"]})]})]}),we("div",{className:e("overflow-auto flex-1",o?.content),style:{maxHeight:m??void 0},children:D})]})},la=Tu;import{useId as ku,useState as Lu}from"react";import Du from"react-markdown";import{jsx as Nt,jsxs as ca,Fragment as Mu}from"react/jsx-runtime";var Qs=({mode:t,onModeChange:r,labels:o,disabled:a=!1,className:s})=>{let l=t==="write"?"preview":"write",c=l==="write"?o.write:o.preview,d=l==="write"?o.writeTitle??o.write:o.previewTitle??o.preview;return Nt(n,{type:"button",variant:"ghost",size:"icon",className:e("size-7",s),disabled:a,"aria-label":c,title:d,onClick:()=>{r(l)},children:l==="preview"?Nt(Ve,{className:"size-3.5 text-muted-foreground"}):Nt(Po,{className:"size-3.5 text-muted-foreground"})})},Eu=({label:t,value:r,onValueChange:o,emptyPreview:a,toggleLabels:s,mode:l,defaultMode:c="write",onModeChange:d,previewValue:u=r,disabled:p=!1,placeholder:m,editorId:f,showHeader:h=!0,footer:R,className:x,editorClassName:S,previewClassName:V,textareaProps:E})=>{let T=ku(),k=f??T,[M,F]=Lu(c),D=l??M,A=(B)=>{if(l===void 0)F(B);d?.(B)};return ca("div",{className:e("grid gap-2",x),children:[h&&ca("div",{className:"flex items-center justify-between gap-3",children:[Nt(P,{htmlFor:D==="write"?k:void 0,children:t}),Nt(Qs,{mode:D,onModeChange:A,labels:s,disabled:p})]}),D==="write"?ca(Mu,{children:[Nt(Y,{...E,id:k,value:r,disabled:p,placeholder:m,"aria-label":h?E?.["aria-label"]:E?.["aria-label"]??t,className:e("min-h-48 resize-y font-mono text-sm",S),onChange:(B)=>{o(B.target.value)}}),R]}):Nt("div",{"aria-label":`${t} ${s.preview}`,className:e("prose prose-sm max-w-none rounded-lg border bg-muted/30 p-4 dark:prose-invert [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",V),children:u.trim()?Nt(Du,{children:u}):Nt("div",{className:"not-prose text-muted-foreground",children:a})})]})};import{jsx as Wn,jsxs as Au}from"react/jsx-runtime";var Iu=({open:t,onOpenChange:r,title:o="JSON Viewer",data:a,jsonViewerProps:s})=>Wn(N,{open:t,onOpenChange:r,children:Au(_,{className:"max-w-2xl max-h-[80vh] flex flex-col",children:[Wn(U,{children:Wn(O,{children:o})}),Wn(la,{data:a,className:"min-h-0 flex-1",variant:"filled",size:"sm",showToolbar:!0,expandAll:!1,expandRoot:!0,...s})]})});import{jsx as ei,jsxs as ti}from"react/jsx-runtime";var Ou=({href:t,children:r,className:o,external:a=!1,linkComponent:s})=>{let l=e("inline-flex items-center gap-1 text-primary hover:underline",o);if(a||!s)return ti("a",{href:t,...a?{rel:"noopener noreferrer",target:"_blank"}:{},className:l,children:[r,ei(kt,{className:"h-3 w-3"})]});return ti(s,{to:t,className:l,children:[r,ei(kt,{className:"h-3 w-3"})]})};import{useState as Hu}from"react";import{jsx as Xn,jsxs as Bu}from"react/jsx-runtime";var Vu=({value:t,isSensitive:r=!1,className:o,maskChar:a="•",showToggle:s=!0,showLabel:l="Show value",hideLabel:c="Hide value",truncate:d=!0,children:u})=>{let[p,m]=Hu(!r),h=p?t:(()=>{if(t.startsWith("{")||t.startsWith("["))return`{ ${a.repeat(10)} }`;return a.repeat(Math.min(t.length,20))})(),R=d?h.slice(0,50)+(h.length>50?"...":""):h,x=p?c:l,S=r&&s?Xn(n,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>{m(!p)},title:x,"aria-label":x,children:p?Xn(Ct,{className:"h-3 w-3"}):Xn(Ve,{className:"h-3 w-3"})}):null;if(u!==void 0)return u({displayValue:R,toggle:S});return Bu("div",{className:e("flex items-center gap-2",o),children:[Xn("code",{className:"text-sm bg-muted px-2 py-1 rounded flex-1 break-all",children:R}),S]})};import*as oi from"react";import{jsx as ri,jsxs as ni}from"react/jsx-runtime";var ai=oi.forwardRef(function({icon:r,text:o,trailing:a,className:s,...l},c){return ni("div",{ref:c,className:e("flex min-w-0 items-center gap-2",s),...l,children:[ni("div",{className:"flex min-w-0 flex-1 items-center gap-2 border-b border-dashed border-border py-2 text-[13px] text-muted-foreground",children:[r!==null&&r!==void 0?ri("span",{className:"text-primary/70",children:r}):null,ri("span",{className:"min-w-0 truncate",children:o})]}),a]})});ai.displayName="MutedPlaceholder";var Fu=ai;import{useMemo as _u,useState as zu}from"react";import{jsx as Ue,jsxs as Un}from"react/jsx-runtime";var da=({value:t,ancestors:r})=>{if(t===null||t===void 0)return t;if(t===!0||t===!1)return t;let o=Object.prototype.toString.call(t);if(o==="[object String]")return String.prototype.valueOf.call(t);if(o==="[object Number]")return Number(t);if(Array.isArray(t)){if(r.has(t))return;r.add(t);let a=t.map((s)=>da({ancestors:r,value:s}));return r.delete(t),a}if(t instanceof Object){if(r.has(t))return;r.add(t);let a=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,da({ancestors:r,value:l})]));return r.delete(t),a}return},mt=(t)=>{if(t instanceof Object&&!Array.isArray(t))return t;return},tr=(t)=>Array.isArray(t)?t:void 0,si=(t)=>Object.prototype.toString.call(t)==="[object String]"&&t===String.prototype.valueOf.call(t),ua=(t)=>si(t)?t:void 0,$u=(t)=>tr(t)?.filter(si)??[],ju=(t)=>{let r=tr(t.anyOf);if(!r)return t;let o=r.filter((a)=>mt(a)?.type!=="null");return o.length===1?mt(o[0])??t:t},ii=(t)=>{let r=ua(t.type);if(r!==void 0&&r!=="")return r;if(tr(t.enum))return"enum";if(tr(t.oneOf)||tr(t.anyOf))return"variant";if(mt(t.properties))return"object";return"value"},li=(t,r="schema")=>{let o=mt(t.properties);if(o){let s=new Set($u(t.required));return Object.entries(o).flatMap(([l,c])=>{let d=mt(c);return d?[{name:l,path:`${r}.properties.${l}`,required:s.has(l),schema:d}]:[]})}if(ii(t)==="array"){let s=mt(t.items);return s?[{name:"Items",path:`${r}.items`,required:!0,schema:s}]:[]}let a=tr(t.oneOf)??tr(t.anyOf)??tr(t.allOf);if(!a)return[];return a.flatMap((s,l)=>{let c=mt(s);return c?[{name:`Option ${l+1}`,path:`${r}.option.${l}`,required:!0,schema:c}]:[]})},pa=(t,r,o=new Set)=>{let a=ju(t),s=ua(a.$ref);if(s===void 0||s===""||!s.startsWith("#/$defs/")||o.has(s))return a;let l=mt(mt(r.$defs)?.[s.slice(8)]);if(!l)return a;return pa(l,r,new Set([...o,s]))},ci=({child:t,depth:r,root:o,defaultExpandedDepth:a})=>{let s=pa(t.schema,o),l=li(s,t.path),[c,d]=zu(r<a),u=ii(s),p=ua(s.description),m=l.length>0,f=c?`Collapse ${t.name}`:`Expand ${t.name}`;return Un(Ie,{open:c,onOpenChange:d,children:[Un("div",{className:e("flex min-w-0 items-start border-b border-border/70 bg-background px-2.5 py-2 last:border-b-0",m&&"gap-2"),style:{paddingLeft:`${10+r*16}px`},children:[m?Ue(Le,{"aria-label":f,className:"mt-0.5 shrink-0 rounded-sm text-muted-foreground outline-none transition hover:text-foreground focus-visible:ring-2 focus-visible:ring-primary/40",children:Ue(C,{className:e("size-3.5 transition-transform",c&&"rotate-90")})}):null,Un("div",{className:"min-w-0 flex-1",children:[Un("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[Ue("span",{className:"break-all text-xs font-medium text-foreground",children:t.name}),Ue("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:u}),t.required?Ue("span",{className:"text-[10px] font-medium text-destructive",children:"required"}):null]}),p!==void 0&&p!==""?Ue("p",{className:"mt-0.5 text-xs leading-snug text-muted-foreground",children:p}):null]})]}),m?Ue(Te,{children:Ue("div",{className:"border-l border-border/70",children:l.map((h)=>Ue(ci,{child:h,defaultExpandedDepth:a,depth:r+1,root:o},h.path))})}):null]})},Ju=({schema:t,className:r,defaultExpandedDepth:o=1,emptyLabel:a="No fields"})=>{let s=_u(()=>da({ancestors:new WeakSet,value:t}),[t]),l=mt(s);if(!l)return Ue("p",{className:e("text-xs text-muted-foreground",r),children:a});let c=pa(l,l),d=li(c);if(!d.length)return Ue("p",{className:e("text-xs text-muted-foreground",r),children:a});return Ue("div",{"aria-label":"Object schema",className:e("overflow-hidden rounded-lg border border-border",r),children:d.map((u)=>Ue(ci,{child:u,defaultExpandedDepth:o,depth:0,root:l},u.path))})};import ft,{createContext as wn,useContext as tn,useEffect as ue,useState as st,useCallback as it,useMemo as fe,useRef as Pe,memo as qu,useReducer as Zu,cloneElement as Hh,forwardRef as Vh}from"react";import{createPortal as Qu,unstable_batchedUpdates as to}from"react-dom";import{useMemo as fa,useLayoutEffect as Gu,useEffect as ui,useRef as Kr,useCallback as Kn}from"react";function pi(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return fa(()=>(a)=>{r.forEach((s)=>s(a))},r)}var bn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ir(t){let r=Object.prototype.toString.call(t);return r==="[object Window]"||r==="[object global]"}function Yn(t){return"nodeType"in t}function Ae(t){var r,o;if(!t)return window;if(ir(t))return t;if(!Yn(t))return window;return(r=(o=t.ownerDocument)==null?void 0:o.defaultView)!=null?r:window}function qn(t){let{Document:r}=Ae(t);return t instanceof r}function Yr(t){if(ir(t))return!1;return t instanceof Ae(t).HTMLElement}function ga(t){return t instanceof Ae(t).SVGElement}function br(t){if(!t)return document;if(ir(t))return t.document;if(!Yn(t))return document;if(qn(t))return t;if(Yr(t)||ga(t))return t.ownerDocument;return document}var rt=bn?Gu:ui;function Zn(t){let r=Kr(t);return rt(()=>{r.current=t}),Kn(function(){for(var o=arguments.length,a=Array(o),s=0;s<o;s++)a[s]=arguments[s];return r.current==null?void 0:r.current(...a)},[])}function mi(){let t=Kr(null),r=Kn((a,s)=>{t.current=setInterval(a,s)},[]),o=Kn(()=>{if(t.current!==null)clearInterval(t.current),t.current=null},[]);return[r,o]}function qr(t,r){if(r===void 0)r=[t];let o=Kr(t);return rt(()=>{if(o.current!==t)o.current=t},r),o}function Zr(t,r){let o=Kr();return fa(()=>{let a=t(o.current);return o.current=a,a},[...r])}function vn(t){let r=Zn(t),o=Kr(null),a=Kn((s)=>{if(s!==o.current)r==null||r(s,o.current);o.current=s},[]);return[o,a]}function Qn(t){let r=Kr();return ui(()=>{r.current=t},[t]),r.current}var ma={};function xr(t,r){return fa(()=>{if(r)return r;let o=ma[t]==null?0:ma[t]+1;return ma[t]=o,t+"-"+o},[t,r])}function fi(t){return function(r){for(var o=arguments.length,a=Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];return a.reduce((l,c)=>{let d=Object.entries(c);for(let[u,p]of d){let m=l[u];if(m!=null)l[u]=m+t*p}return l},{...r})}}var yr=fi(1),wr=fi(-1);function Wu(t){return"clientX"in t&&"clientY"in t}function hn(t){if(!t)return!1;let{KeyboardEvent:r}=Ae(t.target);return r&&t instanceof r}function Xu(t){if(!t)return!1;let{TouchEvent:r}=Ae(t.target);return r&&t instanceof r}function eo(t){if(Xu(t)){if(t.touches&&t.touches.length){let{clientX:r,clientY:o}=t.touches[0];return{x:r,y:o}}else if(t.changedTouches&&t.changedTouches.length){let{clientX:r,clientY:o}=t.changedTouches[0];return{x:r,y:o}}}if(Wu(t))return{x:t.clientX,y:t.clientY};return null}var rr=Object.freeze({Translate:{toString(t){if(!t)return;let{x:r,y:o}=t;return"translate3d("+(r?Math.round(r):0)+"px, "+(o?Math.round(o):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;let{scaleX:r,scaleY:o}=t;return"scaleX("+r+") scaleY("+o+")"}},Transform:{toString(t){if(!t)return;return[rr.Translate.toString(t),rr.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:r,duration:o,easing:a}=t;return r+" "+o+"ms "+a}}}),di="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function gi(t){if(t.matches(di))return t;return t.querySelector(di)}import bi,{useState as Uu,useCallback as Ku}from"react";var Yu={display:"none"};function vi(t){let{id:r,value:o}=t;return bi.createElement("div",{id:r,style:Yu},o)}function hi(t){let{id:r,announcement:o,ariaLiveType:a="assertive"}=t,s={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return bi.createElement("div",{id:r,style:s,role:"status","aria-live":a,"aria-atomic":!0},o)}function xi(){let[t,r]=Uu("");return{announce:Ku((a)=>{if(a!=null)r(a)},[]),announcement:t}}var Mi=wn(null);function ep(t){let r=tn(Mi);ue(()=>{if(!r)throw Error("useDndMonitor must be used within a children of <DndContext>");return r(t)},[t,r])}function tp(){let[t]=st(()=>new Set),r=it((a)=>(t.add(a),()=>t.delete(a)),[t]);return[it((a)=>{let{type:s,event:l}=a;t.forEach((c)=>{var d;return(d=c[s])==null?void 0:d.call(c,l)})},[t]),r]}var rp={draggable:`
|
|
2
|
+
import{Ja,Xo,es,$n,Ar,Qt,ts,rs,os,ns,as,xo,Qo,vo,ss,is,Dr}from"../../index-e0qytqhh.js";import{x,l}from"../../index-33ef93f6.js";import{S,k}from"../../index-410hza8j.js";import{nt,at,zt,Cs,st,rr,M,ke,Y,K,Q}from"../../index-q560eskm.js";import{ls,dr,Zo,yt,Be,Ae,Ve,qn,cs,us,Jo,ds,fs,yo,ps,ms,jn,Yn,gs,xs}from"../../index-pkw46hwt.js";import{mr,tn,hr,rn,Pt,Zt,wt,Jt,rt,Ne,Eo,Lo,Mo,Ao,Do,No,Bt,Vt,Ht}from"../../index-yaf9t9w5.js";import{kt,Et,vt}from"../../index-t2rwc8rk.js";import{Ss}from"../../index-ftn430ea.js";import{ue}from"../../index-tb9dhges.js";import{en}from"../../index-w3zn83g3.js";import{zs}from"../../index-78w37zqq.js";import{Co,So,fr,pr,Ro}from"../../index-w7hwsck8.js";import{Po,Ft}from"../../index-0dt7qv78.js";import{de,ot,gr}from"../../index-eh2w7m4e.js";import{E,B}from"../../index-aq49ztmj.js";import"../../index-9tdk1jd5.js";import{e}from"../../index-kzykjydw.js";import{jsx as dc,jsxs as uc}from"react/jsx-runtime";var cc=({children:t,loading:r=!1,fullWidth:n=!1,className:o,disabled:a,variant:s,size:i,...c})=>uc(l,{variant:s,size:i,className:e(n&&"w-full",o),disabled:a===!0||r,...c,children:[r&&dc(Dr,{size:20,className:"mr-2"}),t]}),pc=cc;import*as Pa from"react";import{jsx as Sa,jsxs as fc}from"react/jsx-runtime";var mc=({children:t,className:r,type:n="button",...o},a)=>fc(l,{ref:a,type:n,variant:"ghost",size:"sm",className:e("h-9 rounded-full border border-dashed border-border/80 bg-background px-3 text-xs font-medium text-muted-foreground shadow-xs transition-[transform,color,background-color,border-color] hover:border-primary/35 hover:bg-muted/45 hover:text-foreground active:scale-[0.98]",r),...o,children:[Sa("span",{className:"mr-2 inline-flex size-5 items-center justify-center rounded-full border border-border/70 bg-muted/45 text-foreground",children:Sa(Ft,{className:"size-3.5"})}),t]}),ln=Pa.forwardRef(mc);ln.displayName="AddItemButton";var gc=ln;import{forwardRef as bc}from"react";import{jsx as hc}from"react/jsx-runtime";var Ta=(t,r,n)=>{if(r<1||r>12||n<1||n>31)return!1;let o=new Date(t,r-1,n);return o.getFullYear()===t&&o.getMonth()===r-1&&o.getDate()===n},vc=(t)=>{let r=t.trim();if(!r)return null;let n=/^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$/u.exec(r);if(n){let{year:a,month:s,day:i}=n.groups??{};return Ta(Number(a),Number(s),Number(i))?`${a}-${s}-${i}`:null}let o=/^(?<day>\d{1,2})[/\-.](?<month>\d{1,2})[/\-.](?<year>\d{4})$/u.exec(r);if(o){let{day:a,month:s,year:i}=o.groups??{},c=Number(a),d=Number(s),u=Number(i);if(!Ta(u,d,c))return null;return`${u}-${String(d).padStart(2,"0")}-${String(c).padStart(2,"0")}`}return null},ka=bc(function({onPaste:r,...n},o){return hc(M,{ref:o,type:"date",onPaste:(s)=>{let i=s.clipboardData.getData("text"),c=vc(i);if(c!==null&&c!==""){s.preventDefault();let d=s.currentTarget,u=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value")?.set?.bind(d);if(u!==void 0)u(c),d.dispatchEvent(new Event("input",{bubbles:!0}))}r?.(s)},...n})});ka.displayName="DateInput";var xc=ka;import*as La from"react";import{jsx as wc}from"react/jsx-runtime";var Da=x("font-display font-bold leading-[1.06] tracking-tight text-foreground",{defaultVariants:{size:"lg"},variants:{size:{lg:"text-[1.5rem] sm:text-[1.85rem]",md:"text-[1.15rem] sm:text-[1.25rem]",sm:"text-[1rem]",xl:"text-[2.1rem] sm:text-[2.5rem]"}}}),yc=({as:t="h2",size:r,className:n,...o},a)=>wc(t,{ref:a,className:e(Da({size:r}),n),...o}),Ea=La.forwardRef(yc);Ea.displayName="DisplayHeading";var Nc=Ea;import*as xt from"react";import{jsx as sr,jsxs as Ia,Fragment as Ma}from"react/jsx-runtime";var cn=xt.forwardRef(function({value:r,label:n,variant:o="icon",copyLabel:a="Copy",copiedLabel:s="Copied",errorMessage:i="Failed to copy to clipboard",resetDelay:c=1500,className:d,onClick:u,...p},m){let[f,b]=xt.useState(!1),g=xt.useRef(null);xt.useEffect(()=>()=>{if(g.current!==null)clearTimeout(g.current)},[]);let h=async(T)=>{u?.(T);try{if(await navigator.clipboard.writeText(r),b(!0),g.current!==null)clearTimeout(g.current);g.current=setTimeout(()=>{b(!1)},c)}catch{yt.error(i)}};if(o==="button")return sr(l,{ref:m,type:"button",variant:"outline",onClick:(T)=>{h(T)},"aria-label":`Copy ${n}`,className:e("shrink-0",d),...p,children:f?Ia(Ma,{children:[sr(S,{className:"mr-1 size-4"}),s]}):Ia(Ma,{children:[sr(ot,{className:"mr-1 size-4"}),a]})});return sr("button",{ref:m,type:"button",onClick:(T)=>{h(T)},"aria-label":`Copy ${n}`,className:e("flex size-8 shrink-0 items-center justify-center rounded-md border border-border bg-card text-muted-foreground transition hover:border-primary/40 hover:text-primary",d),...p,children:f?sr(S,{className:"size-3.5 text-primary"}):sr(ot,{className:"size-3.5"})})});cn.displayName="CopyButton";var Rc=cn;import{jsx as co,jsxs as Cc}from"react/jsx-runtime";var Aa="#a3d54a",Oa=({className:t,...r})=>Cc("svg",{...r,"aria-hidden":"true",className:e("size-6 shrink-0",t),"data-slot":"collective-intelligence-loader",fill:"none",viewBox:"0 0 24 24",children:[co("polyline",{className:"origin-center motion-safe:animate-[ci-breathe-left_1.8s_ease-in-out_infinite]",points:"10,5.5 4.5,12 10,18.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.2}),co("polyline",{className:"origin-center motion-safe:animate-[ci-breathe-right_1.8s_ease-in-out_infinite]",points:"14,5.5 19.5,12 14,18.5",stroke:Aa,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.2}),co("circle",{className:"origin-center [transform-box:fill-box] motion-safe:animate-[ci-pulse-dot_1.8s_ease-in-out_infinite]",cx:12,cy:12,fill:Aa,r:2.3})]});Oa.displayName="CollectiveIntelligenceLoader";var Sc=Oa;import{jsx as Tc}from"react/jsx-runtime";var Pc=({children:t,className:r})=>Tc("div",{className:e("text-destructive text-sm text-center",r),children:t}),kc=Pc;import*as Ha from"react";import{jsx as Dc}from"react/jsx-runtime";var Lc=({value:t,fallback:r="—",locale:n,className:o,...a},s)=>Dc("span",{ref:s,className:e("tabular-nums",o),...a,children:t===null||t===void 0?r:new Intl.NumberFormat(n).format(t)}),Va=Ha.forwardRef(Lc);Va.displayName="FormattedNumber";var Ec=Va;import*as Ba from"react";import{jsx as Ac}from"react/jsx-runtime";var Mc={accent:"bg-[color-mix(in_oklab,var(--chart-1)_12%,var(--card))] text-[color-mix(in_oklab,var(--chart-1)_85%,var(--foreground))] border-[color-mix(in_oklab,var(--chart-1)_22%,var(--border))]",gold:"bg-[color-mix(in_oklab,var(--chart-3)_15%,var(--card))] text-[color-mix(in_oklab,var(--chart-3)_65%,var(--foreground))] border-[color-mix(in_oklab,var(--chart-3)_28%,var(--border))]",neutral:"bg-(--bg-surface-alt)/70 text-(--text-secondary) border-(--border-subtle)",sage:"bg-[color-mix(in_oklab,var(--chart-2)_14%,var(--card))] text-[color-mix(in_oklab,var(--chart-2)_70%,var(--foreground))] border-[color-mix(in_oklab,var(--chart-2)_26%,var(--border))]",sky:"bg-[color-mix(in_oklab,var(--chart-4)_14%,var(--card))] text-[color-mix(in_oklab,var(--chart-4)_70%,var(--foreground))] border-[color-mix(in_oklab,var(--chart-4)_26%,var(--border))]",violet:"bg-[color-mix(in_oklab,var(--chart-5)_14%,var(--card))] text-[color-mix(in_oklab,var(--chart-5)_70%,var(--foreground))] border-[color-mix(in_oklab,var(--chart-5)_26%,var(--border))]"},Ic={lg:"size-12 rounded-lg text-[17px] [&_svg]:size-6",md:"size-10 rounded-lg text-[15px] [&_svg]:size-5",sm:"size-8 rounded-md text-[13px] [&_svg]:size-4"},Fa=Ba.forwardRef(function({tone:r="neutral",size:n="md",initial:o,className:a,children:s,...i},c){return Ac("span",{ref:c,"aria-hidden":!0,className:e("inline-flex shrink-0 select-none items-center justify-center border font-display font-bold",Ic[n],Mc[r],a),...i,children:s??(o!==void 0&&o!==""?o.slice(0,2).toUpperCase():null)})});Fa.displayName="IconTile";var Oc=Fa;import*as _a from"react";import{jsx as Bc}from"react/jsx-runtime";var Hc={accent:"text-(--brand)",copper:"text-(--text-muted)",default:"text-(--text-muted)",muted:"text-(--text-muted)"},Vc=({as:t="span",tone:r="default",className:n,...o},a)=>Bc(t,{ref:a,className:e("inline-block text-[11px] font-semibold uppercase tracking-[0.06em]",Hc[r],n),...o}),ir=_a.forwardRef(Vc);ir.displayName="Kicker";var Fc=ir;import*as za from"react";import{jsx as $c}from"react/jsx-runtime";var _c=(t)=>`+${t}`,zc=({expanded:t,hiddenCount:r,collapsedLabel:n=_c,expandedLabel:o="Show less",onToggle:a,className:s,...i},c)=>$c("button",{ref:c,type:"button",onClick:a,className:e("inline-flex items-center gap-1 rounded-full border border-dashed border-muted-foreground/40 bg-muted/20 px-2.5 py-1 text-[11px] font-medium text-muted-foreground hover:bg-muted/40 hover:text-foreground transition-colors",s),...i,children:t?o:n(r)}),$a=za.forwardRef(zc);$a.displayName="ShowMoreTag";var Jc=$a;import*as ja from"react";import{jsx as Wc}from"react/jsx-runtime";var jc=x("font-sans leading-none tabular-nums text-primary",{defaultVariants:{size:"md"},variants:{size:{lg:"text-[1.4rem]",md:"text-[1.1rem]",sm:"text-[0.95rem]",xl:"text-[2rem]"}}}),Gc=({size:t,className:r,...n},o)=>Wc("span",{ref:o,className:e(jc({size:t}),r),...n}),lr=ja.forwardRef(Gc);lr.displayName="SerifNumeral";var Xc=lr;import{jsx as uo,jsxs as Kc}from"react/jsx-runtime";var po=9,Ga=2*Math.PI*po,Uc=(t,r,n)=>{if(!Number.isFinite(t)||!Number.isFinite(r)||!Number.isFinite(n))return 0;if(n<=r)return 0;return Math.min(1,Math.max(0,(t-r)/(n-r)))},Wa=({className:t,classes:r,label:n,max:o=100,min:a=0,title:s,value:i,"aria-label":c,...d})=>{let u=Uc(i,a,o),p=Math.round(u*100),m=a+u*(o-a),f=Ga*(1-u);return uo("span",{"aria-label":c??`${n}: ${p}%`,"aria-valuemax":o,"aria-valuemin":a,"aria-valuenow":m,className:e("grid size-8 shrink-0 place-items-center text-muted-foreground",r?.root,t),title:s??`${n} ${p}%`,...d,children:Kc("svg",{"aria-hidden":"true",className:e("size-6 -rotate-90",r?.svg),viewBox:"0 0 24 24",children:[uo("circle",{className:e("stroke-muted",r?.track),cx:"12",cy:"12",fill:"none",r:po,strokeWidth:"3"}),uo("circle",{className:e("stroke-foreground transition-[stroke-dashoffset]",r?.indicator),cx:"12",cy:"12",fill:"none",r:po,strokeDasharray:Ga,strokeDashoffset:f,strokeLinecap:"round",strokeWidth:"3"})]})})};Wa.displayName="Ring";var Yc=Wa;import*as Ka from"react";import{jsx as Ua,jsxs as Qc}from"react/jsx-runtime";var Xa={danger:"bg-destructive",neutral:"bg-muted-foreground/40",primary:"bg-primary",success:"bg-emerald-500",warning:"bg-amber-500"},qc={md:"size-2",sm:"size-1.5"},Zc=({tone:t="neutral",pulse:r=!1,size:n="sm",className:o,...a},s)=>Qc("span",{ref:s,className:e("relative inline-flex shrink-0",qc[n],o),...a,children:[r&&Ua("span",{"aria-hidden":!0,className:e("absolute inline-flex h-full w-full animate-ping rounded-full opacity-60",Xa[t])}),Ua("span",{"aria-hidden":!0,className:e("relative inline-flex h-full w-full rounded-full",Xa[t])})]}),dn=Ka.forwardRef(Zc);dn.displayName="StatusDot";var ed=dn;import*as Za from"react";import{jsx as Ya,jsxs as qa}from"react/jsx-runtime";var td={neutral:"border-(--border-subtle) bg-card text-muted-foreground",warning:"border-[color-mix(in_oklab,var(--warning)_40%,var(--border))] bg-[color-mix(in_oklab,var(--warning)_12%,var(--card))] text-[color-mix(in_oklab,var(--warning)_75%,var(--foreground))]"},rd=({tooltip:t,tone:r="neutral",icon:n,className:o,children:a,...s},i)=>qa(Bt,{children:[qa(Vt,{render:Ya(ke,{ref:i,variant:"outline",className:e(td[r],o),...s}),children:[n,a]}),Ya(Ht,{children:t})]}),Qa=Za.forwardRef(rd);Qa.displayName="TooltipBadge";var nd=Qa;import*as bs from"react";import{jsx as ad}from"react/jsx-runtime";var od={body1:{className:"text-base",tag:"p"},body2:{className:"text-sm",tag:"p"},h1:{className:"text-2xl font-semibold",tag:"h1"},h2:{className:"text-xl font-bold",tag:"h2"},h3:{className:"text-lg font-semibold",tag:"h3"},h4:{className:"text-base font-medium",tag:"h4"},subtitle1:{className:"text-base font-normal text-muted-foreground",tag:"h6"},subtitle2:{className:"text-sm font-medium text-muted-foreground",tag:"h6"}},un=bs.forwardRef(function({variant:r="body1",as:n,className:o,...a},s){let{tag:i,className:c}=od[r];return ad(n??i,{ref:s,className:e(c,o),...a})});un.displayName="Typography";import{jsx as id}from"react/jsx-runtime";var sd=({children:t,as:r="form",className:n,onSubmit:o,...a})=>{let s=(i)=>{i.preventDefault(),o?.(i)};return id(r,{className:e("flex flex-col gap-4 min-w-[300px]",n),onSubmit:s,...a,children:t})},ld=sd;import{jsx as pd}from"react/jsx-runtime";var vs={},cr=(...t)=>{for(let r of t)if(r!==void 0)return r;return 1},cd=(t=vs)=>({"--list-cols":cr(t.cols),"--list-cols-2xl":cr(t.cols2xl,t.colsXl,t.colsLg,t.colsMd,t.colsSm,t.cols),"--list-cols-lg":cr(t.colsLg,t.colsMd,t.colsSm,t.cols),"--list-cols-md":cr(t.colsMd,t.colsSm,t.cols),"--list-cols-sm":cr(t.colsSm,t.cols),"--list-cols-xl":cr(t.colsXl,t.colsLg,t.colsMd,t.colsSm,t.cols)}),dd=["grid","gap-4","[grid-template-columns:repeat(var(--list-cols),minmax(0,1fr))]","sm:[grid-template-columns:repeat(var(--list-cols-sm),minmax(0,1fr))]","md:[grid-template-columns:repeat(var(--list-cols-md),minmax(0,1fr))]","lg:[grid-template-columns:repeat(var(--list-cols-lg),minmax(0,1fr))]","xl:[grid-template-columns:repeat(var(--list-cols-xl),minmax(0,1fr))]","2xl:[grid-template-columns:repeat(var(--list-cols-2xl),minmax(0,1fr))]"].join(" "),ud=({cols:t=vs,children:r,...n})=>pd("div",{className:dd,style:cd(t),...n,children:r});import{jsx as fd}from"react/jsx-runtime";var md=({className:t,spaced:r=!1,...n})=>fd("div",{className:e("animate-[rise-in_500ms_cubic-bezier(0.16,1,0.3,1)_both]",r&&"space-y-6",t),...n});var gd=md;import{jsx as Fr,jsxs as ur}from"react/jsx-runtime";var bd=(t)=>t!==null&&t!==void 0&&t.constructor===String,Br=(t)=>t!==null&&t!==void 0&&t!==!1&&t!==""&&t!==0,vd=({title:t,description:r,icon:n,kicker:o,status:a,actions:s,className:i})=>ur("header",{className:e("space-y-2",i),children:[Br(o)?ur("div",{className:"flex items-center gap-2 text-(--text-muted) [&_svg]:h-3.5 [&_svg]:w-3.5",children:[Br(n)?Fr("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-sm bg-(--bg-accent-soft) text-(--brand)",children:n}):null,Fr("span",{className:"text-[12px] font-medium tracking-tight [&_span.sep]:mx-1.5 [&_span.sep]:text-(--brand)",children:bd(o)?o.split("·").map((c,d,u)=>ur("span",{children:[c.trim(),d<u.length-1?Fr("span",{className:"sep","aria-hidden":!0,children:"·"}):null]},d)):o})]}):null,ur("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[ur("div",{className:"min-w-0 flex-1 basis-64 space-y-1.5",children:[Fr("h1",{className:"font-display text-[27px] font-bold leading-tight tracking-[-0.02em] text-(--text-primary)",children:t}),Br(r)?Fr("p",{className:"max-w-2xl text-[14px] leading-relaxed text-(--text-secondary)",children:r}):null]}),Br(s)||Br(a)?ur("div",{className:"flex shrink-0 items-center gap-2 pt-1",children:[a,s]}):null]})]}),hd=vd;import*as ys from"react";import{jsx as pn,jsxs as hs}from"react/jsx-runtime";var mo=(t)=>t!==void 0&&t!==null&&t!==!1&&t!==0&&t!==""&&!Number.isNaN(t),ws=ys.forwardRef(function({icon:r,title:n,description:o,action:a,className:s,...i},c){return hs("div",{ref:c,className:e("flex items-start gap-3",s),...i,children:[mo(r)?pn("span",{"aria-hidden":!0,className:"mt-0.5 inline-flex shrink-0 items-center justify-center rounded-md bg-muted p-2 text-muted-foreground [&_svg]:h-4 [&_svg]:w-4",children:r}):null,hs("div",{className:"min-w-0 flex-1",children:[pn("h3",{className:"text-[15px] font-semibold leading-snug text-foreground",children:n}),mo(o)?pn("p",{className:"mt-0.5 text-sm leading-relaxed text-muted-foreground",children:o}):null]}),mo(a)?pn("div",{className:"shrink-0",children:a}):null]})});ws.displayName="SectionHeader";var xd=ws;import{jsx as Ns,jsxs as wd}from"react/jsx-runtime";var yd=({title:t,toolbar:r})=>wd("div",{className:"flex items-center justify-between mb-12",children:[Ns(un,{variant:"h2",children:t}),Boolean(r)&&Ns("div",{className:"flex items-center gap-2",children:r})]}),Nd=yd;import*as fn from"react";import{jsx as Ie,jsxs as mn}from"react/jsx-runtime";var Rs=(t,r,n)=>{if(t.length>=r)return t;return[...t,...Array.from({length:r-t.length},n)]},Rd=[],fo=({values:t,defaultValues:r=Rd,onValuesChange:n,addLabel:o,getRemoveLabel:a,actions:s,minItems:i=0,disabled:c=!1,renderItem:d,createItem:u,validateItem:p,classes:m,className:f,id:b,...g})=>{let h=fn.useId(),[T,R]=fn.useState(()=>Rs(r,i,u)),y=Rs(t??T,i,u),w=Boolean(s),C=(D)=>{if(t===void 0)R(D);n?.(D)};return mn("div",{"data-slot":"array-input",className:e("space-y-2",m?.root,f),...g,children:[Ie("div",{className:"space-y-2",children:y.map((D,N)=>{let P=N===0&&b!==void 0&&b!==""?b:`${h}-${N}`,L=p?.(D,N);return mn("div",{className:e("flex items-center gap-3",m?.row),children:[d({disabled:c,id:P,index:N,onValueChange:(F)=>{let A=[...y];A[N]=F,C(A)},validationMessage:L,value:D}),y.length>i?Ie(l,{type:"button",variant:"ghost",size:"icon",disabled:c,"aria-label":a(N),className:e("size-10 shrink-0 text-muted-foreground hover:text-destructive",m?.removeButton),onClick:()=>{C(y.filter((F,A)=>A!==N))},children:Ie(ss,{"aria-hidden":"true",className:"size-4"})}):null]},N)})}),mn("div",{className:e("flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",m?.actionRow),children:[Ie(ln,{disabled:c,className:m?.addButton,onClick:()=>{C([...y,u()])},children:o}),w?Ie("div",{className:e("sm:ml-auto",m?.actions),children:s}):null]})]})},Cd=(t)=>{let{createItem:r,getItemLabel:n,inputProps:o,placeholder:a,required:s=!1,renderItem:i,...c}=t,{className:d,...u}=o??{};if(i!==void 0)return Ie(fo,{...c,createItem:r??(()=>""),renderItem:i});return Ie(fo,{...c,createItem:r??(()=>""),renderItem:(p)=>{let{disabled:m,id:f,index:b,onValueChange:g,validationMessage:h,value:T}=p;return mn("div",{className:"min-w-0 flex-1",children:[Ie(M,{...u,id:f,"aria-label":n(b),"aria-invalid":Boolean(h),value:T,placeholder:a,required:s,disabled:m,className:e("w-full",d,c.classes?.input),onChange:(R)=>{g(R.target.value)}}),h!==void 0&&h!==""?Ie("p",{className:"mt-1 text-xs text-destructive",role:"alert",children:h}):null]})}})},Sd=(t)=>Ie(fo,{...t}),Pd=(t)=>t.createItem!==void 0&&t.renderItem!==void 0,Ps=(t)=>{if(Pd(t))return Ie(Sd,{...t});return Ie(Cd,{...t})};Ps.displayName="ArrayInput";var Td=Ps;import*as br from"react";var Nt=(t,r)=>{let n=[];for(let o of t){let a=n.findIndex((s)=>r(o,s)<0);if(a===-1)n.push(o);else n.splice(a,0,o)}return n};var Oe={hour:9,interval:1,minute:0,mode:"day",monthday:1,weekdays:[1,2,3,4,5]},go=/^\*\/(?<step>\d+)$/u,kd=(t)=>{let r=[];for(let n of t.split(",")){let o=/^(?<start>\d+)-(?<end>\d+)$/u.exec(n);if(o){let a=Number(o.groups?.start),s=Number(o.groups?.end);if(a>s)return null;for(let i=a;i<=s;i+=1)r.push(i)}else if(/^\d+$/u.test(n))r.push(Number(n));else return null}return r},Ld=(t,r,n,o)=>{if(r==="*"&&n==="*"&&o==="*"){let a=go.exec(t),s=Number(a?.groups?.step);return a&&s>=1&&s<=59?{...Oe,interval:s,mode:"minutes"}:null}return},Dd=(t,r,n,o)=>{if(r!=="*"||n!=="*")return;let a=go.exec(t);if(a){let s=Number(a.groups?.step);return s>=1&&s<=23?{...Oe,interval:s,minute:o,mode:"hours"}:null}return},Ed=(t,r,n)=>{let o=go.exec(t);if(o){let s=Number(o.groups?.step);if(s%7===0&&s>=7&&s<=28)return{...Oe,hour:r,interval:s/7,minute:n,mode:"weeks"};return s>=1&&s<=31?{...Oe,hour:r,interval:s,minute:n,mode:"days"}:null}let a=Number(t);return/^\d+$/u.test(t)&&a>=1&&a<=31?{...Oe,hour:r,minute:n,mode:"month",monthday:a}:null},Md=(t,r,n)=>{let o=kd(t);if(!o||o.some((s)=>s<0||s>7))return null;let a=Nt(new Set(o.map((s)=>s===7?0:s)),(s,i)=>s-i);return{...Oe,hour:r,minute:n,mode:"week",weekdays:a}},_r=(t)=>{let r=t.trim().split(/\s+/u);if(r.length!==5)return null;let[n,o,a,s,i]=r;if(s!=="*")return null;let c=Ld(n,o,a,i);if(c!==void 0)return c;if(!/^\d+$/u.test(n))return null;let d=Number(n);if(d<0||d>59)return null;let u=Dd(o,a,i,d);if(u!==void 0)return u;if(!/^\d+$/u.test(o))return null;let p=Number(o);if(p<0||p>23)return null;if(a==="*"&&i==="*")return{...Oe,hour:p,minute:d,mode:"day"};if(i==="*")return Ed(a,p,d);if(a==="*")return Md(i,p,d);return null},Rt=(t)=>{let r=Math.max(1,Math.floor(t.interval));switch(t.mode){case"minutes":return`*/${Math.min(r,59)} * * * *`;case"hours":return`${t.minute} */${Math.min(r,23)} * * *`;case"day":return`${t.minute} ${t.hour} * * *`;case"days":return`${t.minute} ${t.hour} */${Math.min(r,31)} * *`;case"week":{let n=t.weekdays.length>0?Nt(new Set(t.weekdays),(o,a)=>o-a).join(","):"*";return`${t.minute} ${t.hour} * * ${n}`}case"weeks":return`${t.minute} ${t.hour} */${Math.min(r*7,28)} * *`;case"month":return`${t.minute} ${t.hour} ${Math.min(Math.max(t.monthday,1),31)} * *`;default:throw Error("Unsupported cron mode")}},Ts=(t,r,n)=>{if(t==="*")return!0;for(let o of t.split(",")){let a=/^(?<base>\*|\d+|\d+-\d+)\/(?<increment>\d+)$/u.exec(o);if(a){let i=a.groups?.base??"";if(i!=="*"&&!Ts(i,r,n))return!1;let c=Number(a.groups?.increment);if(!Number.isFinite(c)||c<1)return!1;continue}let s=/^(?<start>\d+)-(?<end>\d+)$/u.exec(o);if(s){let i=Number(s.groups?.start),c=Number(s.groups?.end);if(i<r||c>n||i>c)return!1;continue}if(/^\d+$/u.test(o)){let i=Number(o);if(i<r||i>n)return!1;continue}return!1}return!0},Id=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ad=(t,r)=>{let n=String(t).padStart(2,"0"),o=String(r).padStart(2,"0");return`${n}:${o}`},gn=(t)=>{let r=_r(t);if(!r)return t;let n=Ad(r.hour,r.minute);switch(r.mode){case"minutes":return r.interval===1?"Every minute":`Every ${r.interval} minutes`;case"hours":return r.interval===1?`Every hour at :${String(r.minute).padStart(2,"0")}`:`Every ${r.interval} hours at :${String(r.minute).padStart(2,"0")}`;case"day":return`Every day at ${n}`;case"days":return r.interval===1?`Every day at ${n}`:`Every ${r.interval} days at ${n}`;case"week":{if(r.weekdays.length===0)return`Weekly at ${n}`;let o=Nt(r.weekdays,(c,d)=>c-d),a=o.length===5&&o.every((c,d)=>c===d+1),s=o.length===2&&o[0]===0&&o[1]===6;if(a)return`Weekdays at ${n}`;if(s)return`Weekends at ${n}`;return`${o.map((c)=>Id[c].slice(0,3)).join(", ")} at ${n}`}case"weeks":return r.interval===1?`Every week at ${n}`:`Every ${r.interval} weeks at ${n}`;case"month":return`Day ${r.monthday} of every month at ${n}`;default:throw Error("Unsupported cron mode")}},bo=(t)=>{let r=t.trim().split(/\s+/u);if(r.length!==5)return!1;let n=[[0,59],[0,23],[1,31],[1,12],[0,7]];return r.every((o,a)=>Ts(o,n[a][0],n[a][1]))};import*as Ls from"react";var ks=(t)=>{let o=new Intl.DateTimeFormat("en-US",{timeZone:t,timeZoneName:"shortOffset"}).formatToParts(new Date).find((d)=>d.type==="timeZoneName")?.value??"GMT",a=/(?<sign>[+-])(?<hours>\d{1,2})(?::(?<minutes>\d{2}))?/u.exec(o);if(!a)return 0;let s=a.groups?.sign==="-"?-1:1,i=Number(a.groups?.hours??0),c=Number(a.groups?.minutes??0);return s*(i*60+c)},Od=(t)=>{let r=ks(t),n=r>=0?"+":"-",o=Math.abs(r),a=String(Math.floor(o/60)).padStart(2,"0"),s=String(o%60).padStart(2,"0");return`${n}${a}:${s}`},bn=null,ho=()=>{if(bn)return bn;let t="supportedValuesOf"in Intl?Intl.supportedValuesOf("timeZone"):["UTC"];return bn=Nt(["UTC",...t].map((r)=>({label:`${r} (UTC${Od(r)})`,offset:ks(r),value:r})),(r,n)=>r.offset-n.offset||r.value.localeCompare(n.value)).map(({value:r,label:n})=>({label:n,value:r})),bn};import{jsx as Hd}from"react/jsx-runtime";var vn=({value:t,onChange:r,className:n,width:o="100%",disabled:a,placeholder:s="Select timezone"})=>{let i=Ls.useMemo(()=>ho(),[]);return Hd(qn,{options:i,value:t,onChange:(c)=>{r(c||"UTC")},placeholder:s,searchPlaceholder:"Search timezone...",emptyMessage:"No timezone found.",className:e("bg-transparent font-normal",n),width:o,disabled:a})};import{jsx as z,jsxs as me,Fragment as $d}from"react/jsx-runtime";var wo=[{label:"X minutes",value:"minutes"},{label:"X hours",value:"hours"},{label:"Day",value:"day"},{label:"X days",value:"days"},{label:"Week",value:"week"},{label:"X weeks",value:"weeks"},{label:"Month",value:"month"}],Vd=[{label:"Monday",short:"Mon",value:1},{label:"Tuesday",short:"Tue",value:2},{label:"Wednesday",short:"Wed",value:3},{label:"Thursday",short:"Thu",value:4},{label:"Friday",short:"Fri",value:5},{label:"Saturday",short:"Sat",value:6},{label:"Sunday",short:"Sun",value:0}],Bd=(t)=>wo.some((r)=>r.value===t),Ds=(t)=>{let r=t.trim();if(!r)return{custom:Rt(Oe),simple:Oe,view:"simple"};let n=_r(r);if(n)return{custom:r,simple:n,view:"simple"};return{custom:r,simple:Oe,view:"advanced"}},Es=(t,r)=>{let n=r===1;switch(t.value){case"minutes":return n?"minute":"minutes";case"hours":return n?"hour":"hours";case"day":return"day";case"days":return n?"day":"days";case"week":return"week";case"weeks":return n?"week":"weeks";case"month":return"month";default:throw Error("Unsupported cron mode")}},hn=(t,r,n)=>Math.max(r,Math.min(n,t)),Ms=(t)=>String(t).padStart(2,"0"),Fd=({hour:t,minute:r,onChange:n})=>me("div",{className:"flex items-center gap-1",children:[z(M,{type:"number",min:0,max:23,value:Ms(t),onChange:(o)=>{n(hn(Number(o.target.value)||0,0,23),r)},className:"w-16 text-center font-mono"}),z("span",{className:"text-muted-foreground",children:":"}),z(M,{type:"number",min:0,max:59,value:Ms(r),onChange:(o)=>{n(t,hn(Number(o.target.value)||0,0,59))},className:"w-16 text-center font-mono"})]}),_d=({state:t,onChange:r,timezone:n,onTimezoneChange:o})=>{let a=t.mode==="minutes"||t.mode==="hours"||t.mode==="days"||t.mode==="weeks",s=t.mode!=="minutes"&&t.mode!=="hours",i=t.mode==="hours",c=t.mode==="week",d=t.mode==="month";return me("div",{className:"space-y-3",children:[z("div",{className:"grid gap-2 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-end",children:me("div",{className:"space-y-2",children:[z("span",{className:"text-xs font-medium text-muted-foreground",children:"Every"}),me("div",{className:e("grid gap-2",a?"grid-cols-[88px_minmax(0,1fr)]":"grid-cols-1"),children:[a&&z(M,{type:"number",min:1,value:t.interval,onChange:(u)=>{r({interval:Math.max(1,Number(u.target.value)||1)})},className:"font-mono"}),me(Lo,{items:wo.map((u)=>({label:Es(u,t.interval),value:u.value})),value:t.mode,onValueChange:(u)=>{if(Bd(u))r({mode:u})},children:[z(Ao,{className:"flex-1",children:z(Mo,{})}),z(Do,{children:wo.map((u)=>z(No,{value:u.value,children:Es(u,t.interval)},u.value))})]})]})]})}),c&&me("div",{className:"space-y-2",children:[z("span",{className:"text-xs font-medium text-muted-foreground",children:"On"}),z(gs,{multiple:!0,variant:"outline",size:"sm",value:t.weekdays.map(String),onValueChange:(u)=>{r({weekdays:u.length?Nt(u.map(Number),(p,m)=>p-m):[1]})},className:"w-full",children:Vd.map((u)=>z(xs,{value:String(u.value),"aria-label":u.label,className:"text-xs",children:u.short},u.value))})]}),d&&me("div",{className:"space-y-2",children:[z("span",{className:"text-xs font-medium text-muted-foreground",children:"On day"}),z(M,{type:"number",min:1,max:31,value:t.monthday,onChange:(u)=>{r({monthday:hn(Number(u.target.value)||1,1,31)})},className:"w-24"})]}),(s||n!==void 0&&o)&&me("div",{className:e("grid gap-3",s&&n!==void 0&&o?"lg:grid-cols-[auto_minmax(0,1fr)] lg:items-end":"grid-cols-1"),children:[s&&me("div",{className:"space-y-2",children:[z("span",{className:"text-xs font-medium text-muted-foreground",children:"At"}),z(Fd,{hour:t.hour,minute:t.minute,onChange:(u,p)=>{r({hour:u,minute:p})}})]}),n!==void 0&&o&&me("div",{className:"space-y-2",children:[z("span",{className:"text-xs font-medium text-muted-foreground",children:"Timezone"}),z(vn,{value:n,onChange:o})]})]}),i&&me("div",{className:"space-y-2",children:[z("span",{className:"text-xs font-medium text-muted-foreground",children:"At minute"}),z(M,{type:"number",min:0,max:59,value:t.minute,onChange:(u)=>{r({minute:hn(Number(u.target.value)||0,0,59)})},className:"w-24"})]})]})},zd=({value:t,onChange:r,className:n,showPreview:o=!0,timezone:a,onTimezoneChange:s})=>{let[i,c]=br.useState(()=>Ds(t)),[d,u]=br.useState(t),[p,m]=br.useState(t);if(t!==d){if(u(t),t!==p)m(t),c(Ds(t))}let f=br.useCallback((y)=>{let w=y.view==="simple"?Rt(y.simple):y.custom;m(w),r(w)},[r]),b=(y)=>{c((w)=>{let C={...w.simple,...y},D={...w,custom:Rt(C),simple:C};return f(D),D})},g=(y)=>{c((w)=>{let C={...w,custom:y};return f(C),C})},h=(y)=>{c((w)=>{if(y===w.view)return w;if(y==="advanced"){let N=Rt(w.simple),P={...w,custom:N,view:y};return f(P),P}let C=_r(w.custom),D=C?{...w,simple:C,view:y}:{...w,view:y};return f(D),D})},T=bo(i.custom),R=null;if(i.view==="simple")R=gn(Rt(i.simple));else if(T)R=gn(i.custom);return me("div",{className:e("space-y-4",n),children:[me(ps,{value:i.view,onValueChange:(y)=>{if(y==="simple"||y==="advanced")h(y)},children:[me(ms,{className:"grid w-full grid-cols-2 rounded-md bg-muted/70 p-1 sm:w-[320px]",children:[z(jn,{value:"simple",className:"text-xs",children:"Simple"}),z(jn,{value:"advanced",className:"text-xs",children:"Advanced"})]}),z(Yn,{value:"simple",className:"space-y-3 pt-3",children:z(_d,{state:i.simple,onChange:b,timezone:a,onTimezoneChange:s})}),me(Yn,{value:"advanced",className:"space-y-2 pt-3",children:[z("span",{className:"text-xs font-medium text-muted-foreground",children:"Cron Expression"}),z(M,{value:i.custom,onChange:(y)=>{g(y.target.value)},placeholder:"0 9 * * 1-5",className:e("font-mono text-sm",!T&&i.custom.trim()&&"border-destructive focus-visible:ring-destructive/40"),spellCheck:!1}),z("p",{className:"text-[11px] text-muted-foreground",children:"Format: minute hour day-of-month month day-of-week"})]})]}),i.view==="advanced"&&a!==void 0&&s&&me("div",{className:"space-y-2",children:[z("span",{className:"text-xs font-medium text-muted-foreground",children:"Timezone"}),z(vn,{value:a,onChange:s})]}),o&&z("div",{className:"flex min-h-8 flex-wrap items-center gap-2 rounded-md bg-muted/35 px-3 py-2 text-xs",children:R===null?z("span",{className:"text-destructive",children:"Invalid cron expression"}):me($d,{children:[z("span",{className:"text-muted-foreground",children:R}),z(ke,{variant:"secondary",className:"ml-auto font-mono text-[11px]",children:i.view==="simple"?Rt(i.simple):i.custom})]})})]})};import{jsx as To}from"react/jsx-runtime";var Jd={both:"w-full h-full",horizontal:"w-full h-auto",none:"",vertical:"h-full w-auto"},jd=({src:t,alt:r="",className:n="",width:o,height:a,fill:s="horizontal",style:i})=>{if(s==="both")return To("div",{className:e("relative overflow-hidden rounded-lg shadow-md",n),style:{height:a,width:o,...i},children:To("img",{src:t,alt:r,className:"object-cover w-full h-full absolute inset-0"})});return To("img",{src:t,alt:r,width:o,height:a,className:e("object-cover rounded-lg shadow-md",Jd[s],n),style:{height:s==="vertical"?"100%":a,width:s==="horizontal"?"100%":o,...i}})},Gd=jd;import{jsx as xn,jsxs as Is}from"react/jsx-runtime";var Wd=({title:t,className:r,children:n,...o})=>Is("section",{"data-slot":"summary-list",className:e("space-y-2",r),...o,children:[t?xn("h3",{className:"text-sm font-semibold tracking-tight",children:t}):null,xn("dl",{className:"divide-y divide-border overflow-hidden rounded-lg border border-border bg-card",children:n})]}),Xd=({label:t,value:r,muted:n=!1,className:o,...a})=>Is("div",{"data-slot":"summary-item",className:e("grid gap-1 px-4 py-3 sm:grid-cols-[minmax(8rem,14rem)_1fr] sm:gap-4",o),...a,children:[xn("dt",{className:"text-sm text-muted-foreground",children:t}),xn("dd",{className:e("min-w-0 break-words text-sm",n?"text-muted-foreground":"font-medium text-foreground"),children:r})]});import*as ko from"react";import{jsx as At,jsxs as As}from"react/jsx-runtime";var Ud=({className:t,...r})=>At(Jo,{"data-slot":"choice-card-group",className:e("grid gap-3",t),...r}),Kd=({title:t,description:r,media:n,footer:o,className:a,...s})=>{let i=ko.useId(),c=ko.useId(),d=Boolean(r);return As(cs,{"data-slot":"choice-card","aria-labelledby":i,"aria-describedby":d?c:void 0,className:e("group/choice relative flex h-full min-w-0 flex-col items-start gap-4 rounded-lg border border-border bg-card p-5 text-left shadow-(--shadow-sm) outline-none transition-[border-color,background-color,box-shadow] dark:shadow-none","hover:border-foreground/25 focus-visible:ring-[3px] focus-visible:ring-ring/50","data-checked:border-primary data-checked:bg-primary/[0.04] data-checked:ring-1 data-checked:ring-primary/25","data-disabled:cursor-not-allowed data-disabled:bg-muted/30 data-disabled:opacity-65 data-disabled:hover:border-border",a),...s,children:[At("span",{"aria-hidden":!0,className:"absolute top-4 right-4 flex size-5 items-center justify-center rounded-full border border-input bg-background text-primary-foreground transition-colors group-data-checked/choice:border-primary group-data-checked/choice:bg-primary",children:At(us,{children:At(S,{className:"size-3",strokeWidth:3})})}),n,As("span",{className:"block min-w-0 space-y-1 pr-7",children:[At("span",{id:i,className:"block font-semibold tracking-tight",children:t}),d?At("span",{id:c,className:"block text-sm leading-relaxed text-muted-foreground",children:r}):null]}),o?At("span",{className:"mt-auto block w-full",children:o}):null]})};import*as Ct from"react";import{jsx as St,jsxs as Os}from"react/jsx-runtime";var Hs=Ct.forwardRef(function({className:r,...n},o){return St("div",{ref:o,className:e("grid gap-2",r),...n})}),Vs=({className:t,...r})=>St(ds,{className:e("grid gap-2",t),...r}),Io=(t)=>t!==void 0&&t!==null&&t!==!1&&t!==0&&t!==""&&!Number.isNaN(t),yn=Ct.forwardRef(function({title:r,description:n,descriptionId:o,wrapDescription:a=!1,disabled:s=!1,control:i,className:c,children:d,...u},p){return Os("label",{ref:p,className:e("flex min-w-0 items-start gap-3 rounded-md border border-border p-3","has-data-checked:border-primary/50 has-data-checked:bg-primary/5",s?"cursor-not-allowed bg-muted/30 opacity-65":"cursor-pointer hover:bg-muted/50",c),...u,children:[i,Os("span",{className:"min-w-0 flex-1",children:[St("span",{className:"block truncate text-sm font-medium",children:r}),Io(n)?St("span",{id:o,className:e("mt-1 block text-xs text-muted-foreground",!a&&"truncate"),children:n}):null,d]})]})}),Bs=(t)=>Object.prototype.toString.call(t)==="[object String]",Fs=(t,r)=>t!==null&&r instanceof Node&&(t.contains(r)||r instanceof HTMLInputElement&&r.getAttribute("aria-hidden")==="true"),Yd=({value:t,title:r,description:n,radioLabel:o,disabled:a=!1,onClick:s,...i})=>{let c=Ct.useId(),d=Ct.useId(),u=o??(Bs(r)?r:void 0);return St(yn,{description:n,descriptionId:d,disabled:a,title:r,onClick:(p)=>{if(s?.(p),p.defaultPrevented||a)return;let m=document.querySelector(`#${c}`);if(Fs(m,p.target))return;p.preventDefault(),m?.click()},control:St(fs,{"aria-describedby":Io(n)?d:void 0,"aria-label":u,className:"mt-1",disabled:a,id:c,value:t}),...i})},qd=({checked:t,title:r,description:n,checkboxLabel:o,disabled:a=!1,onClick:s,onCheckedChange:i,...c})=>{let d=Ct.useId(),u=Ct.useId(),p=o??(Bs(r)?r:void 0);return St(yn,{description:n,descriptionId:u,disabled:a,title:r,onClick:(m)=>{if(s?.(m),m.defaultPrevented||a)return;if(Fs(document.querySelector(`#${d}`),m.target))return;m.preventDefault(),i(!t)},control:St(Zo,{"aria-describedby":Io(n)?u:void 0,"aria-label":p,checked:t,className:"mt-0.5",disabled:a,id:d,onCheckedChange:(m)=>{if(!a)i(m===!0)}}),...c})};Hs.displayName="CardOptionsBlock";Vs.displayName="RadioCardOptionsBlock";yn.displayName="CardOption";import*as _s from"react";import{jsx as zr,jsxs as Oo}from"react/jsx-runtime";var Zd=({title:t,description:r,command:n,copyLabel:o=t??n,copyErrorMessage:a,className:s,...i},c)=>Oo("div",{ref:c,className:e("space-y-2",s),...i,children:[t===void 0&&r===void 0?null:Oo("div",{children:[t===void 0?null:zr("p",{className:"text-sm font-medium",children:t}),r===void 0?null:zr("p",{className:"text-sm text-muted-foreground",children:r})]}),Oo("div",{className:"flex items-start gap-2",children:[zr("pre",{className:"flex-1 overflow-x-auto rounded-md border bg-muted px-3 py-2 font-mono text-xs",children:zr("code",{children:n})}),zr(cn,{value:n,label:o,errorMessage:a})]})]}),$s=_s.forwardRef(Zd);$s.displayName="CommandStep";var Qd=$s;import{forwardRef as eu,useId as tu}from"react";import{jsx as $r,jsxs as Js}from"react/jsx-runtime";var js=eu(function({currency:r,label:n="Amount",hint:o,hideLabel:a=!1,hideHint:s=!1,error:i,className:c,wrapperClassName:d,id:u,decimals:p=2,step:m,placeholder:f,...b},g){let h=tu(),T=u??h,R=`Enter amount in ${r}`,y=m??1/10**p,w=f??(p>0?`0.${"0".repeat(p)}`:"0"),C=i!==null&&i!==void 0&&i.length>0;return Js("div",{className:e("w-full space-y-2",d),children:[!a&&$r(ue,{htmlFor:T,children:n}),Js("div",{className:"relative",children:[$r("span",{className:"-translate-y-1/2 absolute top-1/2 left-3 text-sm text-muted-foreground",children:r}),$r(M,{ref:g,className:e("bg-background pl-12",C&&"border-destructive",c),id:T,min:"0",placeholder:w,step:y,type:"number",...b})]}),C?$r("p",{className:"text-xs text-destructive",children:i}):!s&&$r("p",{className:"text-xs text-muted-foreground",children:o??R})]})});js.displayName="CurrencyInput";var ru=js;import*as Gs from"react";import{jsx as wn,jsxs as Ho}from"react/jsx-runtime";var Ws=Gs.forwardRef(function({index:r,label:n,hint:o,className:a,children:s,...i},c){let d=Boolean(r),u=Boolean(o);return Ho("div",{ref:c,className:e("grid gap-x-4",d?"grid-cols-[2.25rem_1fr] sm:grid-cols-[2.5rem_1fr]":"grid-cols-1",a),...i,children:[d?wn("div",{className:"flex h-6 items-center justify-end pt-[2px]",children:wn(lr,{children:r})}):null,Ho("div",{className:"min-w-0 space-y-1.5",children:[Ho("div",{className:"flex items-baseline justify-between gap-2",children:[wn(ir,{children:n}),u?wn("span",{className:"text-[10px] text-muted-foreground",children:o}):null]}),s]})]})});Ws.displayName="FieldRow";var nu=Ws;import{jsx as X,jsxs as ze,Fragment as du}from"react/jsx-runtime";var ou=(t)=>{if(t===0)return"0 Bytes";let r=1024,n=["Bytes","KB","MB","GB"],o=Math.floor(Math.log(t)/Math.log(r));return`${Math.round(t/r**o*100)/100} ${n[o]}`},au={downloadFile:"Download file",downloadingFile:"Downloading file",dragActive:"Drop the file here",dragInactive:"Drag & drop a file here, or click to select",errorRetry:"Please try again",fileTypeHint:"PDF, DOC, DOCX up to 10MB"},su=({active:t,activeLabel:r,inactiveLabel:n,hint:o})=>ze("div",{className:"flex w-full items-center gap-3",children:[X("div",{className:e("flex h-10 w-10 shrink-0 items-center justify-center rounded-full transition-colors",t?"bg-[color-mix(in_oklab,var(--primary)_14%,var(--card))]":"bg-muted"),children:X(is,{className:e("h-5 w-5",t?"text-primary":"text-muted-foreground")})}),ze("div",{children:[X("p",{className:"text-sm font-medium text-foreground",children:t?r:n}),X("p",{className:"text-xs text-muted-foreground",children:o})]})]}),iu=({message:t,retryLabel:r})=>ze("div",{className:"flex w-full items-center gap-3",children:[X("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-destructive/10",children:X(B,{className:"h-5 w-5 text-destructive"})}),ze("div",{children:[X("p",{className:"text-sm font-medium text-destructive",children:t}),X("p",{className:"text-xs text-destructive/80",children:r})]})]}),lu=({file:t,downloading:r,downloadLabel:n,downloadingLabel:o,onDownload:a,onRemove:s})=>ze("div",{className:"flex w-full items-center justify-between",children:[ze("div",{className:"flex items-center gap-3",children:[t.previewUrl!==void 0&&t.previewUrl!==null&&t.previewUrl!==""?ze(du,{children:[X("span",{"aria-hidden":"true",className:"h-20 w-28 shrink-0 rounded-md border border-input bg-background bg-contain bg-center bg-no-repeat",style:{backgroundImage:`url(${t.previewUrl})`}}),X("span",{className:"sr-only",children:t.name})]}):X("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-[color-mix(in_oklab,var(--success)_14%,var(--card))]",children:X(Ja,{className:"h-5 w-5 text-(--success)"})}),ze("div",{className:"flex flex-col",children:[ze("div",{className:"flex items-center gap-2",children:[X(ts,{className:"h-4 w-4 text-muted-foreground"}),X("span",{className:"text-sm font-medium text-foreground",children:t.name})]}),X("span",{className:"text-xs text-muted-foreground",children:ou(t.size)})]})]}),ze("div",{className:"flex shrink-0 items-center gap-1",children:[a?X(l,{"aria-label":r?o:n,className:"h-8 w-8 rounded-full p-0",disabled:r,onClick:a,size:"sm",title:r?o:n,type:"button",variant:"ghost",children:r?X(de,{className:"h-4 w-4 animate-spin"}):X(Po,{className:"h-4 w-4"})}):null,s?X(l,{className:"h-8 w-8 rounded-full p-0 hover:bg-destructive/10",onClick:s,size:"sm",type:"button",variant:"ghost",children:X(B,{className:"h-4 w-4 text-destructive"})}):null]})]}),cu=(t)=>{let{rootProps:r,inputProps:n,isDragActive:o,selectedFile:a,error:s,onRemoveFile:i,onDownloadFile:c,isDownloadingFile:d,disabled:u,className:p,labels:m}=t,f={...au,...m},b=a!==void 0&&a!==null,g=s!==void 0&&s!==null&&s!=="";return X("div",{className:e("w-full",p),children:ze("div",{...r,className:e("relative flex min-h-24 cursor-pointer items-center justify-center rounded-lg border-2 border-dashed bg-transparent px-4 py-5 transition-all",o===!0?"border-primary bg-[color-mix(in_oklab,var(--primary)_8%,var(--card))]":"border-input hover:border-input",b&&"border-[color-mix(in_oklab,var(--success)_60%,var(--border))] bg-[color-mix(in_oklab,var(--success)_10%,transparent)]",g&&"border-destructive bg-[color-mix(in_oklab,var(--destructive)_10%,var(--card))]",u===!0&&"cursor-not-allowed opacity-60",r?.className),children:[X("input",{...n}),!b&&!g?X(su,{active:Boolean(o),activeLabel:f.dragActive,hint:f.fileTypeHint,inactiveLabel:f.dragInactive}):null,a!==void 0&&a!==null&&!g?X(lu,{downloadLabel:f.downloadFile,downloading:Boolean(d),downloadingLabel:f.downloadingFile,file:a,onDownload:c,onRemove:i}):null,s!==void 0&&s!==null&&s!==""?X(iu,{message:s,retryLabel:f.errorRetry}):null]})})},uu=cu;import{jsx as Xs,jsxs as mu}from"react/jsx-runtime";var pu=x("inline-flex shrink-0 cursor-pointer items-center gap-1.5 rounded-full border font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{active:!1,size:"md"},variants:{active:{false:"border-(--border-subtle) bg-(--bg-surface)/60 text-(--text-secondary) hover:border-(--border-default) hover:text-(--text-primary)",true:"border-[color-mix(in_oklab,var(--brand)_35%,var(--border))] bg-(--bg-accent-soft) text-(--text-primary)"},size:{md:"h-8 px-3.5 text-[13px]",sm:"h-7 px-3 text-[12px]"}}}),Us=({options:t,value:r,onValueChange:n,label:o,size:a,className:s,classes:i,...c})=>Xs("div",{"aria-label":o,className:e("flex flex-wrap items-center gap-1.5",i?.root,s),...c,children:t.map((d)=>{let u=d.value===r;return mu("button",{type:"button","aria-pressed":u,disabled:d.disabled,onClick:()=>{n(d.value)},className:e(pu({active:u,size:a}),i?.chip),children:[d.label,d.count===void 0?null:Xs("span",{className:e("tabular-nums text-[11px] text-(--text-muted)",i?.count),children:d.count})]},d.value)})});Us.displayName="FilterChips";var fu=Us;import*as vr from"react";import{jsx as it,jsxs as Nu}from"react/jsx-runtime";var gu=52,bu=26,Rn=4,Nn=20,vu=(t)=>({"--flow-lane":t}),Ys=vr.createContext(null),qs=(t)=>{let r=vr.useContext(Ys);if(!r)throw Error(`${t} must be rendered inside a FlowBand.`);return r},hu=({lanes:t=1,stepHeight:r=gu,laneHeight:n=bu,className:o,style:a,children:s,...i})=>{let c=Math.max(r,t*n+(t-1)*Rn),d=vr.useMemo(()=>({height:c,stepHeight:r}),[c,r]);return it(Ys.Provider,{value:d,children:it("div",{className:e("flex min-w-0 items-stretch gap-1",o),style:{height:c,...a},...i,children:s})})},xu=({className:t,style:r,children:n,...o})=>{let{stepHeight:a}=qs("FlowStep");return it("div",{className:e("flex min-w-0 flex-1 items-stretch self-center",t),style:{height:a,...r},...o,children:n})},Ks=({centers:t,height:r,colors:n,merge:o=!1})=>{let a=r/2,s=7;return it("svg",{"aria-hidden":!0,width:Nn,height:r,viewBox:`0 0 ${Nn} ${r}`,className:"shrink-0",style:o?{transform:"scaleX(-1)"}:void 0,children:t.map((i,c)=>{let d=n[c];return it("path",{style:vu(d),d:`M0 ${a}H7C13 ${a} ${Nn-6} ${i} ${Nn} ${i}`,fill:"none",strokeWidth:1.5,strokeLinecap:"round",className:d!==void 0&&d!==""?"stroke-[color-mix(in_oklab,var(--flow-lane)_45%,var(--border))]":"stroke-border"},c)})})},yu=(t,r)=>{let n=(r-Rn*(t-1))/t;return Array.from({length:t},(o,a)=>a*(n+Rn)+n/2)},wu=({lanes:t,fork:r=!0,rejoin:n=!0,label:o,className:a,...s})=>{let{height:i}=qs("FlowBranch"),c=yu(t.length,i),d=t.map((u)=>u.color);return Nu("div",{"aria-label":o,className:e("flex min-w-0 flex-1 items-stretch",a),...s,children:[r&&it(Ks,{centers:c,height:i,colors:d}),it("div",{className:"flex min-w-0 flex-1 flex-col",style:{gap:Rn},children:t.map((u)=>it("div",{className:"flex min-w-0 flex-1 items-stretch overflow-hidden",children:u.content},u.key))}),n&&it(Ks,{centers:c,height:i,colors:d,merge:!0})]})};import*as Zs from"react";import{jsx as Vo,jsxs as Cu}from"react/jsx-runtime";var Ru=({index:t,className:r,children:n,...o},a)=>Cu("div",{ref:a,className:e("grid grid-cols-[1.75rem_1fr] gap-x-3 leading-relaxed",r),...o,children:[Vo("div",{className:"pt-[1px] text-right",children:Vo(lr,{className:"opacity-80",children:t})}),Vo("p",{className:"text-[13px] text-muted-foreground",children:n})]}),Qs=Zs.forwardRef(Ru);Qs.displayName="GuideStep";var Su=Qs;import*as yr from"react";import{jsx as we,jsxs as xr,Fragment as Tu}from"react/jsx-runtime";var ei=yr.forwardRef(function({className:r,variant:n="island",...o},a){return we(dr,{ref:a,variant:n,className:e("gap-0 p-0",r),...o})});ei.displayName="HierarchyTree";var ti=yr.forwardRef(function({title:r,icon:n,count:o,actions:a,className:s,...i},c){return xr("div",{ref:c,"data-slot":"hierarchy-tree-header",className:e("flex flex-wrap items-center gap-3 border-b border-border px-4 py-3",s),...i,children:[xr("div",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",children:[n!==void 0&&n!==null?we("span",{className:"shrink-0 text-muted-foreground [&_svg]:h-4 [&_svg]:w-4",children:n}):null,we("span",{className:"min-w-0 truncate",children:r}),o!==void 0&&o!==null?we("span",{className:"rounded-full bg-muted px-2 py-0.5 text-xs font-normal text-muted-foreground",children:o}):null]}),a!==void 0&&a!==null?we("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:a}):null]})});ti.displayName="HierarchyTreeHeader";var ri=yr.forwardRef(function({className:r,...n},o){return we("div",{ref:o,"data-slot":"hierarchy-tree-body",className:e("min-w-0",r),...n})});ri.displayName="HierarchyTreeBody";var Pu=[],ni=yr.forwardRef(function({depth:r,rails:n=Pu,isLastChild:o=!1,hasChildren:a=!1,contentClassName:s,className:i,children:c,...d},u){let p=Math.max(1,r);return xr("div",{ref:u,"data-slot":"hierarchy-tree-row","data-depth":p,className:e("group flex items-stretch transition-colors hover:bg-muted/40",p===1&&"border-t border-border first:border-t-0",i),...d,children:[p>1?xr("div",{"aria-hidden":!0,className:"flex shrink-0 pl-5",children:[n.map((m,f)=>we("span",{className:"relative w-5",children:m?we("span",{className:"absolute inset-y-0 left-0 border-l border-(--border-subtle)"}):null},f)),we("span",{className:"relative w-5",children:o?we("span",{className:e("absolute left-0 top-0 h-[22px] rounded-bl-md border-b border-l border-(--border-subtle)",a?"w-full":"w-14")}):xr(Tu,{children:[we("span",{className:"absolute inset-y-0 left-0 border-l border-(--border-subtle)"}),we("span",{className:e("absolute left-0 top-[22px] border-t border-(--border-subtle)",a?"w-full":"w-14")})]})})]}):null,we("div",{className:e("flex min-w-0 flex-1 items-start gap-2 py-3 pl-2 pr-3",s),children:c})]})});ni.displayName="HierarchyTreeRow";var oi=yr.forwardRef(function({expanded:r,count:n,visible:o=!0,className:a,...s},i){return xr(l,{ref:i,type:"button",variant:"ghost",size:"sm",className:e("h-6 shrink-0 gap-0.5 px-1 text-xs text-muted-foreground",!o&&"invisible",a),...s,children:[we(k,{className:e("h-3.5 w-3.5 transition-transform",r&&"rotate-90")}),n]})});oi.displayName="HierarchyTreeToggle";var ku=ei;import Lu,{useState as Du}from"react";import{jsx as ie,jsxs as De}from"react/jsx-runtime";var Eu=x("font-mono text-sm rounded-md overflow-hidden flex flex-col",{defaultVariants:{size:"md",variant:"default"},variants:{size:{lg:"p-4 text-base",md:"p-3",sm:"p-2 text-xs"},variant:{default:"bg-card border border-border",filled:"bg-muted",outlined:"border border-border"}}}),Bo=({value:t,ancestors:r})=>{if(t===null||t===void 0)return t;if(t===!0||t===!1)return t;let n=Object.prototype.toString.call(t);if(n==="[object String]"){let o=JSON.stringify(t);return o===void 0?n:o.slice(1,-1)}if(n==="[object Number]")return Number(t);if(Array.isArray(t)){if(r.has(t))return"[Circular]";r.add(t);let o=t.map((a)=>Bo({ancestors:r,value:a}));return r.delete(t),o}if(t instanceof Object){if(r.has(t))return"[Circular]";r.add(t);let o=Object.fromEntries(Object.entries(t).map(([a,s])=>[a,Bo({ancestors:r,value:s})]));return r.delete(t),o}return n},Mu=(t)=>{if(t===null||t===void 0)return"text-gray-500 dark:text-gray-400";if(String(t)===t)return"text-green-600 dark:text-green-400";if(t===!0||t===!1)return"text-amber-600 dark:text-amber-400";return"text-blue-600 dark:text-blue-400"},Iu=(t)=>{if(t===null)return"null";if(t===void 0)return"undefined";if(String(t)===t)return`"${t}"`;return String(t)},Au=(t)=>t,Ou=(t)=>t!==null&&Object(t)===t,Hu=(t,r)=>{if(t)return ie("span",{className:"w-4"});return r?ie(E,{className:"w-4 h-4"}):ie(k,{className:"w-4 h-4"})},Vu=(t)=>t?{close:"]",open:"["}:{close:"}",open:"{"},Bu=(t,r,n)=>t?{name:null,path:`${n}[${r}]`}:{name:String(r),path:`${n}.${r}`},Fu=({data:t,className:r,classes:n,variant:o,size:a,expandAll:s=!1,expandRoot:i=!0,indentSize:c=16,showLineNumbers:d=!1,showToolbar:u=!1,maxHeight:p,maxWidth:m,renderValue:f})=>{let b=Lu.useMemo(()=>Bo({ancestors:new WeakSet,value:t}),[t]),[g,h]=Du(()=>{let P={};if(i)P.root=!0;return P}),T=(P,L)=>{if(P==="root"&&g[P]===void 0)return i;return g[P]??L},R=(P)=>{h((L)=>({...L,[P]:!T(P,s)}))},y=(P)=>{h({})},w=()=>{try{let P=JSON.stringify(b,null,2);navigator.clipboard.writeText(P),yt.success("Copied to clipboard",{description:"JSON data has been copied to clipboard",duration:3000})}catch(P){console.error("Failed to copy JSON to clipboard",P),yt.error("Copy failed",{description:"Failed to copy JSON to clipboard",duration:3000})}},C={maxWidth:m??"auto"},D=(P,L,F,A,j)=>{let te=[],q=Ou(L),oe=Array.isArray(L),ge=q&&Object.keys(L).length===0,ve=Vu(oe),U={marginLeft:F*c},Re=Au(A),Z=j;if(!q){let J=f?.(L,A);return te.push(De("div",{className:"flex",children:[d&&ie("div",{className:"text-gray-400 dark:text-gray-600 select-none w-8 text-right pr-2",children:Z}),De("div",{className:"flex min-w-0",style:U,children:[ie("span",{"aria-hidden":!0,className:"mr-1 w-4 shrink-0"}),P!==null&&De("span",{className:"shrink-0 text-purple-600 dark:text-purple-400",children:[`"${P}":`,ie("span",{className:"text-gray-600 dark:text-gray-400 mr-1",children:" "})]}),J??ie("span",{className:e("min-w-0 break-all",Mu(L)),children:Iu(L)})]})]},Re)),[te,Z+1]}let he=T(A,s),H=Hu(ge,he);if(te.push(De("div",{className:"flex items-start group",children:[d&&ie("div",{className:"text-gray-400 dark:text-gray-600 select-none w-8 text-right pr-2",children:Z}),De("div",{className:"flex items-start",style:U,children:[ie("button",{onClick:()=>{R(A)},className:"mr-1 w-4 h-4 mt-0.5 focus:outline-none opacity-60 hover:opacity-100","aria-label":he?"Collapse":"Expand",tabIndex:0,type:"button",children:H}),De("div",{children:[P!==null&&De("span",{className:"text-purple-600 dark:text-purple-400",children:[`"${P}":`,ie("span",{className:"text-gray-600 dark:text-gray-400 mr-1",children:" "})]}),ie("span",{className:"text-gray-600 dark:text-gray-400",children:ve.open}),ge||!he?De("span",{className:"text-gray-600 dark:text-gray-400",children:[ge?"":"...",ve.close]}):null]})]})]},`${Re}-open`)),Z+=1,he&&!ge){let J=Z,_=oe?L.map((ae,Ce)=>[Ce,ae]):Object.entries(L);for(let[ae,Ce]of _){let se=Bu(oe,ae,A),[pt,O]=D(se.name,Ce,F+1,se.path,J);te.push(...pt),J=O}return te.push(De("div",{className:"flex",children:[d&&ie("div",{className:"text-gray-400 dark:text-gray-600 select-none w-8 text-right pr-2",children:J}),ie("div",{className:"text-gray-600 dark:text-gray-400",style:U,children:ve.close})]},`${Re}-close`)),J+=1,[te,J]}return[te,Z]},[N]=D(null,b,0,"root",1);return De("div",{className:e(Eu({size:a,variant:o}),n?.root,r),style:C,children:[u&&De("div",{className:e("flex justify-between items-center px-3 py-2 border-b border-border bg-muted/50",n?.toolbar),children:[ie("div",{className:"text-sm font-medium",children:"JSON Viewer"}),De("div",{className:"flex gap-2",children:[ie(l,{size:"sm",variant:"outline",onClick:()=>{y(!0)},children:"Expand All"}),ie(l,{size:"sm",variant:"outline",onClick:()=>{y(!1)},children:"Collapse All"}),De(l,{size:"sm",variant:"outline",onClick:w,children:[ie(ot,{className:"w-4 h-4 mr-1"}),"Copy"]})]})]}),ie("div",{className:e("overflow-auto flex-1",n?.content),style:{maxHeight:p??void 0},children:N})]})},Fo=Fu;import{useId as _u,useState as zu}from"react";import{Streamdown as $u}from"streamdown";import{jsx as lt,jsxs as _o,Fragment as ju}from"react/jsx-runtime";var ai=({mode:t,onModeChange:r,labels:n,disabled:o=!1,className:a})=>{let s=t==="write"?"preview":"write",i=s==="write"?n.write:n.preview,c=s==="write"?n.writeTitle??n.write:n.previewTitle??n.preview;return lt(l,{type:"button",variant:"ghost",size:"icon",className:e("size-7",a),disabled:o,"aria-label":i,title:c,onClick:()=>{r(s)},children:s==="preview"?lt(Qt,{className:"size-3.5 text-muted-foreground"}):lt(es,{className:"size-3.5 text-muted-foreground"})})},Ju=({label:t,value:r,onValueChange:n,emptyPreview:o,toggleLabels:a,mode:s,defaultMode:i="write",onModeChange:c,previewValue:d=r,disabled:u=!1,placeholder:p,editorId:m,showHeader:f=!0,footer:b,className:g,editorClassName:h,previewClassName:T,textareaProps:R})=>{let y=_u(),w=m??y,[C,D]=zu(i),N=s??C,P=(L)=>{if(s===void 0)D(L);c?.(L)};return _o("div",{className:e("grid gap-2",g),children:[f&&_o("div",{className:"flex items-center justify-between gap-3",children:[lt(ue,{htmlFor:N==="write"?w:void 0,children:t}),lt(ai,{mode:N,onModeChange:P,labels:a,disabled:u})]}),N==="write"?_o(ju,{children:[lt(rn,{...R,id:w,value:r,disabled:u,placeholder:p,"aria-label":f?R?.["aria-label"]:R?.["aria-label"]??t,className:e("min-h-48 resize-y font-mono text-sm",h),onChange:(L)=>{n(L.target.value)}}),b]}):lt("div",{"aria-label":`${t} ${a.preview}`,className:e("prose prose-sm max-w-none rounded-lg border bg-muted/30 p-4 dark:prose-invert [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",T),children:d.trim()?lt($u,{mode:"static",className:"[&>*:first-child]:mt-0 [&>*:last-child]:mb-0",children:d}):lt("div",{className:"not-prose text-muted-foreground",children:o})})]})};import{jsx as Cn,jsxs as Wu}from"react/jsx-runtime";var Gu=({open:t,onOpenChange:r,title:n="JSON Viewer",data:o,jsonViewerProps:a})=>Cn(nt,{open:t,onOpenChange:r,children:Wu(at,{className:"max-w-2xl max-h-[80vh] flex flex-col",children:[Cn(zt,{children:Cn(st,{children:n})}),Cn(Fo,{data:o,className:"min-h-0 flex-1",variant:"filled",size:"sm",showToolbar:!0,expandAll:!1,expandRoot:!0,...a})]})});import{jsx as si,jsxs as ii}from"react/jsx-runtime";var Xu=({href:t,children:r,className:n,external:o=!1,linkComponent:a})=>{let s=e("inline-flex items-center gap-1 text-primary hover:underline",n);if(o||!a)return ii("a",{href:t,...o?{rel:"noopener noreferrer",target:"_blank"}:{},className:s,children:[r,si($n,{className:"h-3 w-3"})]});return ii(a,{to:t,className:s,children:[r,si($n,{className:"h-3 w-3"})]})};import{useState as Uu}from"react";import{jsx as Sn,jsxs as Yu}from"react/jsx-runtime";var Ku=({value:t,isSensitive:r=!1,className:n,maskChar:o="•",showToggle:a=!0,showLabel:s="Show value",hideLabel:i="Hide value",truncate:c=!0,children:d})=>{let[u,p]=Uu(!r),f=u?t:(()=>{if(t.startsWith("{")||t.startsWith("["))return`{ ${o.repeat(10)} }`;return o.repeat(Math.min(t.length,20))})(),b=c?f.slice(0,50)+(f.length>50?"...":""):f,g=u?i:s,h=r&&a?Sn(l,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>{p(!u)},title:g,"aria-label":g,children:u?Sn(Ar,{className:"h-3 w-3"}):Sn(Qt,{className:"h-3 w-3"})}):null;if(d!==void 0)return d({displayValue:b,toggle:h});return Yu("div",{className:e("flex items-center gap-2",n),children:[Sn("code",{className:"text-sm bg-muted px-2 py-1 rounded flex-1 break-all",children:b}),h]})};import*as di from"react";import{jsx as li,jsxs as ci}from"react/jsx-runtime";var ui=di.forwardRef(function({icon:r,text:n,trailing:o,className:a,...s},i){return ci("div",{ref:i,className:e("flex min-w-0 items-center gap-2",a),...s,children:[ci("div",{className:"flex min-w-0 flex-1 items-center gap-2 border-b border-dashed border-border py-2 text-[13px] text-muted-foreground",children:[r!==null&&r!==void 0?li("span",{className:"text-primary/70",children:r}):null,li("span",{className:"min-w-0 truncate",children:n})]}),o]})});ui.displayName="MutedPlaceholder";var qu=ui;import{useMemo as Zu,useState as Qu}from"react";import{jsx as Ee,jsxs as Pn}from"react/jsx-runtime";var zo=({value:t,ancestors:r})=>{if(t===null||t===void 0)return t;if(t===!0||t===!1)return t;let n=Object.prototype.toString.call(t);if(n==="[object String]")return String.prototype.valueOf.call(t);if(n==="[object Number]")return Number(t);if(Array.isArray(t)){if(r.has(t))return;r.add(t);let o=t.map((a)=>zo({ancestors:r,value:a}));return r.delete(t),o}if(t instanceof Object){if(r.has(t))return;r.add(t);let o=Object.fromEntries(Object.entries(t).map(([a,s])=>[a,zo({ancestors:r,value:s})]));return r.delete(t),o}return},Ye=(t)=>{if(t instanceof Object&&!Array.isArray(t))return t;return},Tt=(t)=>Array.isArray(t)?t:void 0,pi=(t)=>Object.prototype.toString.call(t)==="[object String]"&&t===String.prototype.valueOf.call(t),$o=(t)=>pi(t)?t:void 0,ep=(t)=>Tt(t)?.filter(pi)??[],tp=(t)=>{let r=Tt(t.anyOf);if(!r)return t;let n=r.filter((o)=>Ye(o)?.type!=="null");return n.length===1?Ye(n[0])??t:t},mi=(t)=>{let r=$o(t.type);if(r!==void 0&&r!=="")return r;if(Tt(t.enum))return"enum";if(Tt(t.oneOf)||Tt(t.anyOf))return"variant";if(Ye(t.properties))return"object";return"value"},fi=(t,r="schema")=>{let n=Ye(t.properties);if(n){let a=new Set(ep(t.required));return Object.entries(n).flatMap(([s,i])=>{let c=Ye(i);return c?[{name:s,path:`${r}.properties.${s}`,required:a.has(s),schema:c}]:[]})}if(mi(t)==="array"){let a=Ye(t.items);return a?[{name:"Items",path:`${r}.items`,required:!0,schema:a}]:[]}let o=Tt(t.oneOf)??Tt(t.anyOf)??Tt(t.allOf);if(!o)return[];return o.flatMap((a,s)=>{let i=Ye(a);return i?[{name:`Option ${s+1}`,path:`${r}.option.${s}`,required:!0,schema:i}]:[]})},jo=(t,r,n=new Set)=>{let o=tp(t),a=$o(o.$ref);if(a===void 0||a===""||!a.startsWith("#/$defs/")||n.has(a))return o;let s=Ye(Ye(r.$defs)?.[a.slice(8)]);if(!s)return o;return jo(s,r,new Set([...n,a]))},gi=({child:t,depth:r,root:n,defaultExpandedDepth:o})=>{let a=jo(t.schema,n),s=fi(a,t.path),[i,c]=Qu(r<o),d=mi(a),u=$o(a.description),p=s.length>0,m=i?`Collapse ${t.name}`:`Expand ${t.name}`;return Pn(Y,{open:i,onOpenChange:c,children:[Pn("div",{className:e("flex min-w-0 items-start border-b border-border/70 bg-background px-2.5 py-2 last:border-b-0",p&&"gap-2"),style:{paddingLeft:`${10+r*16}px`},children:[p?Ee(K,{"aria-label":m,className:"mt-0.5 shrink-0 rounded-sm text-muted-foreground outline-none transition hover:text-foreground focus-visible:ring-2 focus-visible:ring-primary/40",children:Ee(k,{className:e("size-3.5 transition-transform",i&&"rotate-90")})}):null,Pn("div",{className:"min-w-0 flex-1",children:[Pn("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[Ee("span",{className:"break-all text-xs font-medium text-foreground",children:t.name}),Ee("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:d}),t.required?Ee("span",{className:"text-[10px] font-medium text-destructive",children:"required"}):null]}),u!==void 0&&u!==""?Ee("p",{className:"mt-0.5 text-xs leading-snug text-muted-foreground",children:u}):null]})]}),p?Ee(Q,{children:Ee("div",{className:"border-l border-border/70",children:s.map((f)=>Ee(gi,{child:f,defaultExpandedDepth:o,depth:r+1,root:n},f.path))})}):null]})},rp=({schema:t,className:r,defaultExpandedDepth:n=1,emptyLabel:o="No fields"})=>{let a=Zu(()=>zo({ancestors:new WeakSet,value:t}),[t]),s=Ye(a);if(!s)return Ee("p",{className:e("text-xs text-muted-foreground",r),children:o});let i=jo(s,s),c=fi(i);if(!c.length)return Ee("p",{className:e("text-xs text-muted-foreground",r),children:o});return Ee("div",{"aria-label":"Object schema",className:e("overflow-hidden rounded-lg border border-border",r),children:c.map((d)=>Ee(gi,{child:d,defaultExpandedDepth:n,depth:0,root:s},d.path))})};import qe,{createContext as Ur,useContext as Tr,useEffect as ee,useState as $e,useCallback as Je,useMemo as ne,useRef as fe,memo as cp,useReducer as dp,cloneElement as rx,forwardRef as nx}from"react";import{createPortal as up,unstable_batchedUpdates as In}from"react-dom";import{useMemo as Wo,useLayoutEffect as np,useEffect as vi,useRef as wr,useCallback as Tn}from"react";function hi(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return Wo(()=>(o)=>{r.forEach((a)=>a(o))},r)}var Jr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ot(t){let r=Object.prototype.toString.call(t);return r==="[object Window]"||r==="[object global]"}function kn(t){return"nodeType"in t}function xe(t){var r,n;if(!t)return window;if(Ot(t))return t;if(!kn(t))return window;return(r=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Ln(t){let{Document:r}=xe(t);return t instanceof r}function Nr(t){if(Ot(t))return!1;return t instanceof xe(t).HTMLElement}function Uo(t){return t instanceof xe(t).SVGElement}function _t(t){if(!t)return document;if(Ot(t))return t.document;if(!kn(t))return document;if(Ln(t))return t;if(Nr(t)||Uo(t))return t.ownerDocument;return document}var He=Jr?np:vi;function Dn(t){let r=wr(t);return He(()=>{r.current=t}),Tn(function(){for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];return r.current==null?void 0:r.current(...o)},[])}function xi(){let t=wr(null),r=Tn((o,a)=>{t.current=setInterval(o,a)},[]),n=Tn(()=>{if(t.current!==null)clearInterval(t.current),t.current=null},[]);return[r,n]}function Rr(t,r){if(r===void 0)r=[t];let n=wr(t);return He(()=>{if(n.current!==t)n.current=t},r),n}function Cr(t,r){let n=wr();return Wo(()=>{let o=t(n.current);return n.current=o,o},[...r])}function jr(t){let r=Dn(t),n=wr(null),o=Tn((a)=>{if(a!==n.current)r==null||r(a,n.current);n.current=a},[]);return[n,o]}function En(t){let r=wr();return vi(()=>{r.current=t},[t]),r.current}var Go={};function $t(t,r){return Wo(()=>{if(r)return r;let n=Go[t]==null?0:Go[t]+1;return Go[t]=n,t+"-"+n},[t,r])}function yi(t){return function(r){for(var n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return o.reduce((s,i)=>{let c=Object.entries(i);for(let[d,u]of c){let p=s[d];if(p!=null)s[d]=p+t*u}return s},{...r})}}var jt=yi(1),Gt=yi(-1);function op(t){return"clientX"in t&&"clientY"in t}function Gr(t){if(!t)return!1;let{KeyboardEvent:r}=xe(t.target);return r&&t instanceof r}function ap(t){if(!t)return!1;let{TouchEvent:r}=xe(t.target);return r&&t instanceof r}function Mn(t){if(ap(t)){if(t.touches&&t.touches.length){let{clientX:r,clientY:n}=t.touches[0];return{x:r,y:n}}else if(t.changedTouches&&t.changedTouches.length){let{clientX:r,clientY:n}=t.changedTouches[0];return{x:r,y:n}}}if(op(t))return{x:t.clientX,y:t.clientY};return null}var Lt=Object.freeze({Translate:{toString(t){if(!t)return;let{x:r,y:n}=t;return"translate3d("+(r?Math.round(r):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;let{scaleX:r,scaleY:n}=t;return"scaleX("+r+") scaleY("+n+")"}},Transform:{toString(t){if(!t)return;return[Lt.Translate.toString(t),Lt.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:r,duration:n,easing:o}=t;return r+" "+n+"ms "+o}}}),bi="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function wi(t){if(t.matches(bi))return t;return t.querySelector(bi)}import Ni,{useState as sp,useCallback as ip}from"react";var lp={display:"none"};function Ri(t){let{id:r,value:n}=t;return Ni.createElement("div",{id:r,style:lp},n)}function Ci(t){let{id:r,announcement:n,ariaLiveType:o="assertive"}=t,a={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Ni.createElement("div",{id:r,style:a,role:"status","aria-live":o,"aria-atomic":!0},n)}function Si(){let[t,r]=sp("");return{announce:ip((o)=>{if(o!=null)r(o)},[]),announcement:t}}var Bi=Ur(null);function pp(t){let r=Tr(Bi);ee(()=>{if(!r)throw Error("useDndMonitor must be used within a children of <DndContext>");return r(t)},[t,r])}function mp(){let[t]=$e(()=>new Set),r=Je((o)=>(t.add(o),()=>t.delete(o)),[t]);return[Je((o)=>{let{type:a,event:s}=o;t.forEach((i)=>{var c;return(c=i[a])==null?void 0:c.call(i,s)})},[t]),r]}var fp={draggable:`
|
|
3
3
|
To pick up a draggable item, press the space bar.
|
|
4
4
|
While dragging, use the arrow keys to move the item.
|
|
5
5
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
6
|
-
`},np={onDragStart(t){let{active:r}=t;return"Picked up draggable item "+r.id+"."},onDragOver(t){let{active:r,over:o}=t;if(o)return"Draggable item "+r.id+" was moved over droppable area "+o.id+".";return"Draggable item "+r.id+" is no longer over a droppable area."},onDragEnd(t){let{active:r,over:o}=t;if(o)return"Draggable item "+r.id+" was dropped over droppable area "+o.id;return"Draggable item "+r.id+" was dropped."},onDragCancel(t){let{active:r}=t;return"Dragging was cancelled. Draggable item "+r.id+" was dropped."}};function op(t){let{announcements:r=np,container:o,hiddenTextDescribedById:a,screenReaderInstructions:s=rp}=t,{announce:l,announcement:c}=xi(),d=xr("DndLiveRegion"),[u,p]=st(!1);if(ue(()=>{p(!0)},[]),ep(fe(()=>({onDragStart(f){let{active:h}=f;l(r.onDragStart({active:h}))},onDragMove(f){let{active:h,over:R}=f;if(r.onDragMove)l(r.onDragMove({active:h,over:R}))},onDragOver(f){let{active:h,over:R}=f;l(r.onDragOver({active:h,over:R}))},onDragEnd(f){let{active:h,over:R}=f;l(r.onDragEnd({active:h,over:R}))},onDragCancel(f){let{active:h,over:R}=f;l(r.onDragCancel({active:h,over:R}))}}),[l,r])),!u)return null;let m=ft.createElement(ft.Fragment,null,ft.createElement(vi,{id:a,value:s.draggable}),ft.createElement(hi,{id:d,announcement:c}));return o?Qu(m,o):m}var me;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(me||(me={}));function no(){}function Ra(t,r){return fe(()=>({sensor:t,options:r!=null?r:{}}),[t,r])}function Ii(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return fe(()=>[...r].filter((a)=>a!=null),[...r])}var lt=Object.freeze({x:0,y:0});function Ai(t,r){return Math.sqrt(Math.pow(t.x-r.x,2)+Math.pow(t.y-r.y,2))}function Oi(t,r){let{data:{value:o}}=t,{data:{value:a}}=r;return o-a}function ap(t,r){let{data:{value:o}}=t,{data:{value:a}}=r;return a-o}function yi(t){let{left:r,top:o,height:a,width:s}=t;return[{x:r,y:o},{x:r+s,y:o},{x:r,y:o+a},{x:r+s,y:o+a}]}function Ca(t,r){if(!t||t.length===0)return null;let[o]=t;return r?o[r]:o}function wi(t,r,o){if(r===void 0)r=t.left;if(o===void 0)o=t.top;return{x:r+t.width*0.5,y:o+t.height*0.5}}var Hi=(t)=>{let{collisionRect:r,droppableRects:o,droppableContainers:a}=t,s=wi(r,r.left,r.top),l=[];for(let c of a){let{id:d}=c,u=o.get(d);if(u){let p=Ai(wi(u),s);l.push({id:d,data:{droppableContainer:c,value:p}})}}return l.sort(Oi)},Vi=(t)=>{let{collisionRect:r,droppableRects:o,droppableContainers:a}=t,s=yi(r),l=[];for(let c of a){let{id:d}=c,u=o.get(d);if(u){let p=yi(u),m=s.reduce((h,R,x)=>h+Ai(p[x],R),0),f=Number((m/4).toFixed(4));l.push({id:d,data:{droppableContainer:c,value:f}})}}return l.sort(Oi)};function sp(t,r){let o=Math.max(r.top,t.top),a=Math.max(r.left,t.left),s=Math.min(r.left+r.width,t.left+t.width),l=Math.min(r.top+r.height,t.top+t.height),c=s-a,d=l-o;if(a<s&&o<l){let u=r.width*r.height,p=t.width*t.height,m=c*d,f=m/(u+p-m);return Number(f.toFixed(4))}return 0}var ip=(t)=>{let{collisionRect:r,droppableRects:o,droppableContainers:a}=t,s=[];for(let l of a){let{id:c}=l,d=o.get(c);if(d){let u=sp(d,r);if(u>0)s.push({id:c,data:{droppableContainer:l,value:u}})}}return s.sort(ap)};function lp(t,r,o){return{...t,scaleX:r&&o?r.width/o.width:1,scaleY:r&&o?r.height/o.height:1}}function Bi(t,r){return t&&r?{x:t.left-r.left,y:t.top-r.top}:lt}function cp(t){return function(o){for(var a=arguments.length,s=Array(a>1?a-1:0),l=1;l<a;l++)s[l-1]=arguments[l];return s.reduce((c,d)=>({...c,top:c.top+t*d.y,bottom:c.bottom+t*d.y,left:c.left+t*d.x,right:c.right+t*d.x}),{...o})}}var dp=cp(1);function up(t){if(t.startsWith("matrix3d(")){let r=t.slice(9,-1).split(/, /);return{x:+r[12],y:+r[13],scaleX:+r[0],scaleY:+r[5]}}else if(t.startsWith("matrix(")){let r=t.slice(7,-1).split(/, /);return{x:+r[4],y:+r[5],scaleX:+r[0],scaleY:+r[3]}}return null}function pp(t,r,o){let a=up(r);if(!a)return t;let{scaleX:s,scaleY:l,x:c,y:d}=a,u=t.left-c-(1-s)*parseFloat(o),p=t.top-d-(1-l)*parseFloat(o.slice(o.indexOf(" ")+1)),m=s?t.width/s:t.width,f=l?t.height/l:t.height;return{width:m,height:f,top:p,right:u+m,bottom:p+f,left:u}}var mp={ignoreTransform:!1};function Nr(t,r){if(r===void 0)r=mp;let o=t.getBoundingClientRect();if(r.ignoreTransform){let{transform:p,transformOrigin:m}=Ae(t).getComputedStyle(t);if(p)o=pp(o,p,m)}let{top:a,left:s,width:l,height:c,bottom:d,right:u}=o;return{top:a,left:s,width:l,height:c,bottom:d,right:u}}function Ni(t){return Nr(t,{ignoreTransform:!0})}function fp(t){let{innerWidth:r,innerHeight:o}=t;return{top:0,left:0,right:r,bottom:o,width:r,height:o}}function gp(t,r){if(r===void 0)r=Ae(t).getComputedStyle(t);return r.position==="fixed"}function bp(t,r){if(r===void 0)r=Ae(t).getComputedStyle(t);let o=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((s)=>{let l=r[s];return typeof l==="string"?o.test(l):!1})}function Nn(t,r){let o=[];function a(s){if(r!=null&&o.length>=r)return o;if(!s)return o;if(qn(s)&&s.scrollingElement!=null&&!o.includes(s.scrollingElement))return o.push(s.scrollingElement),o;if(!Yr(s)||ga(s))return o;if(o.includes(s))return o;let l=Ae(t).getComputedStyle(s);if(s!==t){if(bp(s,l))o.push(s)}if(gp(s,l))return o;return a(s.parentNode)}if(!t)return o;return a(t)}function Fi(t){let[r]=Nn(t,1);return r!=null?r:null}function ba(t){if(!bn||!t)return null;if(ir(t))return t;if(!Yn(t))return null;if(qn(t)||t===br(t).scrollingElement)return window;if(Yr(t))return t;return null}function _i(t){if(ir(t))return t.scrollX;return t.scrollLeft}function zi(t){if(ir(t))return t.scrollY;return t.scrollTop}function xa(t){return{x:_i(t),y:zi(t)}}var Ne;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(Ne||(Ne={}));function $i(t){if(!bn||!t)return!1;return t===document.scrollingElement}function ji(t){let r={x:0,y:0},o=$i(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},a={x:t.scrollWidth-o.width,y:t.scrollHeight-o.height},s=t.scrollTop<=r.y,l=t.scrollLeft<=r.x,c=t.scrollTop>=a.y,d=t.scrollLeft>=a.x;return{isTop:s,isLeft:l,isBottom:c,isRight:d,maxScroll:a,minScroll:r}}var vp={x:0.2,y:0.2};function hp(t,r,o,a,s){let{top:l,left:c,right:d,bottom:u}=o;if(a===void 0)a=10;if(s===void 0)s=vp;let{isTop:p,isBottom:m,isLeft:f,isRight:h}=ji(t),R={x:0,y:0},x={x:0,y:0},S={height:r.height*s.y,width:r.width*s.x};if(!p&&l<=r.top+S.height)R.y=Ne.Backward,x.y=a*Math.abs((r.top+S.height-l)/S.height);else if(!m&&u>=r.bottom-S.height)R.y=Ne.Forward,x.y=a*Math.abs((r.bottom-S.height-u)/S.height);if(!h&&d>=r.right-S.width)R.x=Ne.Forward,x.x=a*Math.abs((r.right-S.width-d)/S.width);else if(!f&&c<=r.left+S.width)R.x=Ne.Backward,x.x=a*Math.abs((r.left+S.width-c)/S.width);return{direction:R,speed:x}}function xp(t){if(t===document.scrollingElement){let{innerWidth:l,innerHeight:c}=window;return{top:0,left:0,right:l,bottom:c,width:l,height:c}}let{top:r,left:o,right:a,bottom:s}=t.getBoundingClientRect();return{top:r,left:o,right:a,bottom:s,width:t.clientWidth,height:t.clientHeight}}function Ji(t){return t.reduce((r,o)=>yr(r,xa(o)),lt)}function yp(t){return t.reduce((r,o)=>r+_i(o),0)}function wp(t){return t.reduce((r,o)=>r+zi(o),0)}function Np(t,r){if(r===void 0)r=Nr;if(!t)return;let{top:o,left:a,bottom:s,right:l}=r(t);if(!Fi(t))return;if(s<=0||l<=0||o>=window.innerHeight||a>=window.innerWidth)t.scrollIntoView({block:"center",inline:"center"})}var Rp=[["x",["left","right"],yp],["y",["top","bottom"],wp]];class ao{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let o=Nn(r),a=Ji(o);this.rect={...t},this.width=t.width,this.height=t.height;for(let[s,l,c]of Rp)for(let d of l)Object.defineProperty(this,d,{get:()=>{let u=c(o),p=a[s]-u;return this.rect[d]+p},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Qr{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((r)=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...r)})},this.target=t}add(t,r,o){var a;(a=this.target)==null||a.addEventListener(t,r,o),this.listeners.push([t,r,o])}}function Cp(t){let{EventTarget:r}=Ae(t);return t instanceof r?t:br(t)}function va(t,r){let o=Math.abs(t.x),a=Math.abs(t.y);if(typeof r==="number")return Math.sqrt(o**2+a**2)>r;if("x"in r&&"y"in r)return o>r.x&&a>r.y;if("x"in r)return o>r.x;if("y"in r)return a>r.y;return!1}var nt;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(nt||(nt={}));function Ri(t){t.preventDefault()}function Sp(t){t.stopPropagation()}var X;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(X||(X={}));var Gi={start:[X.Space,X.Enter],cancel:[X.Esc],end:[X.Space,X.Enter,X.Tab]},Pp=(t,r)=>{let{currentCoordinates:o}=r;switch(t.code){case X.Right:return{...o,x:o.x+25};case X.Left:return{...o,x:o.x-25};case X.Down:return{...o,y:o.y+25};case X.Up:return{...o,y:o.y-25}}return};class Rn{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;let{event:{target:r}}=t;this.props=t,this.listeners=new Qr(br(r)),this.windowListeners=new Qr(Ae(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(nt.Resize,this.handleCancel),this.windowListeners.add(nt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(nt.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:t,onStart:r}=this.props,o=t.node.current;if(o)Np(o);r(lt)}handleKeyDown(t){if(hn(t)){let{active:r,context:o,options:a}=this.props,{keyboardCodes:s=Gi,coordinateGetter:l=Pp,scrollBehavior:c="smooth"}=a,{code:d}=t;if(s.end.includes(d)){this.handleEnd(t);return}if(s.cancel.includes(d)){this.handleCancel(t);return}let{collisionRect:u}=o.current,p=u?{x:u.left,y:u.top}:lt;if(!this.referenceCoordinates)this.referenceCoordinates=p;let m=l(t,{active:r,context:o.current,currentCoordinates:p});if(m){let f=wr(m,p),h={x:0,y:0},{scrollableAncestors:R}=o.current;for(let x of R){let S=t.code,{isTop:V,isRight:E,isLeft:T,isBottom:k,maxScroll:M,minScroll:F}=ji(x),D=xp(x),A={x:Math.min(S===X.Right?D.right-D.width/2:D.right,Math.max(S===X.Right?D.left:D.left+D.width/2,m.x)),y:Math.min(S===X.Down?D.bottom-D.height/2:D.bottom,Math.max(S===X.Down?D.top:D.top+D.height/2,m.y))},B=S===X.Right&&!E||S===X.Left&&!T,Z=S===X.Down&&!k||S===X.Up&&!V;if(B&&A.x!==m.x){let J=x.scrollLeft+f.x,ne=S===X.Right&&J<=M.x||S===X.Left&&J>=F.x;if(ne&&!f.y){x.scrollTo({left:J,behavior:c});return}if(ne)h.x=x.scrollLeft-J;else h.x=S===X.Right?x.scrollLeft-M.x:x.scrollLeft-F.x;if(h.x)x.scrollBy({left:-h.x,behavior:c});break}else if(Z&&A.y!==m.y){let J=x.scrollTop+f.y,ne=S===X.Down&&J<=M.y||S===X.Up&&J>=F.y;if(ne&&!f.x){x.scrollTo({top:J,behavior:c});return}if(ne)h.y=x.scrollTop-J;else h.y=S===X.Down?x.scrollTop-M.y:x.scrollTop-F.y;if(h.y)x.scrollBy({top:-h.y,behavior:c});break}}this.handleMove(t,yr(wr(m,this.referenceCoordinates),h))}}}handleMove(t,r){let{onMove:o}=this.props;t.preventDefault(),o(r)}handleEnd(t){let{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){let{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Rn.activators=[{eventName:"onKeyDown",handler:(t,r,o)=>{let{keyboardCodes:a=Gi,onActivation:s}=r,{active:l}=o,{code:c}=t.nativeEvent;if(a.start.includes(c)){let d=l.activatorNode.current;if(d&&t.target!==d)return!1;return t.preventDefault(),s==null||s({event:t.nativeEvent}),!0}return!1}}];function Ci(t){return Boolean(t&&"distance"in t)}function Si(t){return Boolean(t&&"delay"in t)}class so{constructor(t,r,o){var a;if(o===void 0)o=Cp(t.event.target);this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;let{event:s}=t,{target:l}=s;this.props=t,this.events=r,this.document=br(l),this.documentListeners=new Qr(this.document),this.listeners=new Qr(o),this.windowListeners=new Qr(Ae(l)),this.initialCoordinates=(a=eo(s))!=null?a:lt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:o}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel)this.listeners.add(t.cancel.name,this.handleCancel);if(this.windowListeners.add(nt.Resize,this.handleCancel),this.windowListeners.add(nt.DragStart,Ri),this.windowListeners.add(nt.VisibilityChange,this.handleCancel),this.windowListeners.add(nt.ContextMenu,Ri),this.documentListeners.add(nt.Keydown,this.handleKeydown),r){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Si(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(Ci(r)){this.handlePending(r);return}}this.handleStart()}detach(){if(this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null)clearTimeout(this.timeoutId),this.timeoutId=null}handlePending(t,r){let{active:o,onPending:a}=this.props;a(o,t,this.initialCoordinates,r)}handleStart(){let{initialCoordinates:t}=this,{onStart:r}=this.props;if(t)this.activated=!0,this.documentListeners.add(nt.Click,Sp,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(nt.SelectionChange,this.removeTextSelection),r(t)}handleMove(t){var r;let{activated:o,initialCoordinates:a,props:s}=this,{onMove:l,options:{activationConstraint:c}}=s;if(!a)return;let d=(r=eo(t))!=null?r:lt,u=wr(a,d);if(!o&&c){if(Ci(c)){if(c.tolerance!=null&&va(u,c.tolerance))return this.handleCancel();if(va(u,c.distance))return this.handleStart()}if(Si(c)){if(va(u,c.tolerance))return this.handleCancel()}this.handlePending(c,u);return}if(t.cancelable)t.preventDefault();l(d)}handleEnd(){let{onAbort:t,onEnd:r}=this.props;if(this.detach(),!this.activated)t(this.props.active);r()}handleCancel(){let{onAbort:t,onCancel:r}=this.props;if(this.detach(),!this.activated)t(this.props.active);r()}handleKeydown(t){if(t.code===X.Esc)this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}var Tp={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Cn extends so{constructor(t){let{event:r}=t,o=br(r.target);super(t,Tp,o)}}Cn.activators=[{eventName:"onPointerDown",handler:(t,r)=>{let{nativeEvent:o}=t,{onActivation:a}=r;if(!o.isPrimary||o.button!==0)return!1;return a==null||a({event:o}),!0}}];var kp={move:{name:"mousemove"},end:{name:"mouseup"}},ya;(function(t){t[t.RightClick=2]="RightClick"})(ya||(ya={}));class Wi extends so{constructor(t){super(t,kp,br(t.event.target))}}Wi.activators=[{eventName:"onMouseDown",handler:(t,r)=>{let{nativeEvent:o}=t,{onActivation:a}=r;if(o.button===ya.RightClick)return!1;return a==null||a({event:o}),!0}}];var ha={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Xi extends so{constructor(t){super(t,ha)}static setup(){return window.addEventListener(ha.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(ha.move.name,t)};function t(){}}}Xi.activators=[{eventName:"onTouchStart",handler:(t,r)=>{let{nativeEvent:o}=t,{onActivation:a}=r,{touches:s}=o;if(s.length>1)return!1;return a==null||a({event:o}),!0}}];var xn;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(xn||(xn={}));var oo;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(oo||(oo={}));function Lp(t){let{acceleration:r,activator:o=xn.Pointer,canScroll:a,draggingRect:s,enabled:l,interval:c=5,order:d=oo.TreeOrder,pointerCoordinates:u,scrollableAncestors:p,scrollableAncestorRects:m,delta:f,threshold:h}=t,R=Ep({delta:f,disabled:!l}),[x,S]=mi(),V=Pe({x:0,y:0}),E=Pe({x:0,y:0}),T=fe(()=>{switch(o){case xn.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case xn.DraggableRect:return s}},[o,s,u]),k=Pe(null),M=it(()=>{let D=k.current;if(!D)return;let A=V.current.x*E.current.x,B=V.current.y*E.current.y;D.scrollBy(A,B)},[]),F=fe(()=>d===oo.TreeOrder?[...p].reverse():p,[d,p]);ue(()=>{if(!l||!p.length||!T){S();return}for(let D of F){if((a==null?void 0:a(D))===!1)continue;let A=p.indexOf(D),B=m[A];if(!B)continue;let{direction:Z,speed:J}=hp(D,B,T,r,h);for(let ne of["x","y"])if(!R[ne][Z[ne]])J[ne]=0,Z[ne]=0;if(J.x>0||J.y>0){S(),k.current=D,x(M,c),V.current=J,E.current=Z;return}}V.current={x:0,y:0},E.current={x:0,y:0},S()},[r,M,a,S,l,c,JSON.stringify(T),JSON.stringify(R),x,p,F,m,JSON.stringify(h)])}var Dp={x:{[Ne.Backward]:!1,[Ne.Forward]:!1},y:{[Ne.Backward]:!1,[Ne.Forward]:!1}};function Ep(t){let{delta:r,disabled:o}=t,a=Qn(r);return Zr((s)=>{if(o||!a||!s)return Dp;let l={x:Math.sign(r.x-a.x),y:Math.sign(r.y-a.y)};return{x:{[Ne.Backward]:s.x[Ne.Backward]||l.x===-1,[Ne.Forward]:s.x[Ne.Forward]||l.x===1},y:{[Ne.Backward]:s.y[Ne.Backward]||l.y===-1,[Ne.Forward]:s.y[Ne.Forward]||l.y===1}}},[o,r,a])}function Mp(t,r){let o=r!=null?t.get(r):void 0,a=o?o.node.current:null;return Zr((s)=>{var l;if(r==null)return null;return(l=a!=null?a:s)!=null?l:null},[a,r])}function Ip(t,r){return fe(()=>t.reduce((o,a)=>{let{sensor:s}=a,l=s.activators.map((c)=>({eventName:c.eventName,handler:r(c.handler,a)}));return[...o,...l]},[]),[t,r])}var yn;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(yn||(yn={}));var Na;(function(t){t.Optimized="optimized"})(Na||(Na={}));var Pi=new Map;function Ap(t,r){let{dragging:o,dependencies:a,config:s}=r,[l,c]=st(null),{frequency:d,measure:u,strategy:p}=s,m=Pe(t),f=V(),h=qr(f),R=it(function(E){if(E===void 0)E=[];if(h.current)return;c((T)=>{if(T===null)return E;return T.concat(E.filter((k)=>!T.includes(k)))})},[h]),x=Pe(null),S=Zr((E)=>{if(f&&!o)return Pi;if(!E||E===Pi||m.current!==t||l!=null){let T=new Map;for(let k of t){if(!k)continue;if(l&&l.length>0&&!l.includes(k.id)&&k.rect.current){T.set(k.id,k.rect.current);continue}let M=k.node.current,F=M?new ao(u(M),M):null;if(k.rect.current=F,F)T.set(k.id,F)}return T}return E},[t,l,o,f,u]);return ue(()=>{m.current=t},[t]),ue(()=>{if(f)return;R()},[o,f]),ue(()=>{if(l&&l.length>0)c(null)},[JSON.stringify(l)]),ue(()=>{if(f||typeof d!=="number"||x.current!==null)return;x.current=setTimeout(()=>{R(),x.current=null},d)},[d,f,R,...a]),{droppableRects:S,measureDroppableContainers:R,measuringScheduled:l!=null};function V(){switch(p){case yn.Always:return!1;case yn.BeforeDragging:return o;default:return!o}}}function Ui(t,r){return Zr((o)=>{if(!t)return null;if(o)return o;return typeof r==="function"?r(t):t},[r,t])}function Op(t,r){return Ui(t,r)}function Hp(t){let{callback:r,disabled:o}=t,a=Zn(r),s=fe(()=>{if(o||typeof window>"u"||typeof window.MutationObserver>"u")return;let{MutationObserver:l}=window;return new l(a)},[a,o]);return ue(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function io(t){let{callback:r,disabled:o}=t,a=Zn(r),s=fe(()=>{if(o||typeof window>"u"||typeof window.ResizeObserver>"u")return;let{ResizeObserver:l}=window;return new l(a)},[o]);return ue(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function Vp(t){return new ao(Nr(t),t)}function Ti(t,r,o){if(r===void 0)r=Vp;let[a,s]=st(null);function l(){s((u)=>{if(!t)return null;if(t.isConnected===!1){var p;return(p=u!=null?u:o)!=null?p:null}let m=r(t);if(JSON.stringify(u)===JSON.stringify(m))return u;return m})}let c=Hp({callback(u){if(!t)return;for(let p of u){let{type:m,target:f}=p;if(m==="childList"&&f instanceof HTMLElement&&f.contains(t)){l();break}}}}),d=io({callback:l});return rt(()=>{if(l(),t)d==null||d.observe(t),c==null||c.observe(document.body,{childList:!0,subtree:!0});else d==null||d.disconnect(),c==null||c.disconnect()},[t]),a}function Bp(t){let r=Ui(t);return Bi(t,r)}var ki=[];function Fp(t){let r=Pe(t),o=Zr((a)=>{if(!t)return ki;if(a&&a!==ki&&t&&r.current&&t.parentNode===r.current.parentNode)return a;return Nn(t)},[t]);return ue(()=>{r.current=t},[t]),o}function _p(t){let[r,o]=st(null),a=Pe(t),s=it((l)=>{let c=ba(l.target);if(!c)return;o((d)=>{if(!d)return null;return d.set(c,xa(c)),new Map(d)})},[]);return ue(()=>{let l=a.current;if(t!==l){c(l);let d=t.map((u)=>{let p=ba(u);if(p)return p.addEventListener("scroll",s,{passive:!0}),[p,xa(p)];return null}).filter((u)=>u!=null);o(d.length?new Map(d):null),a.current=t}return()=>{c(t),c(l)};function c(d){d.forEach((u)=>{let p=ba(u);p==null||p.removeEventListener("scroll",s)})}},[s,t]),fe(()=>{if(t.length)return r?Array.from(r.values()).reduce((l,c)=>yr(l,c),lt):Ji(t);return lt},[t,r])}function Li(t,r){if(r===void 0)r=[];let o=Pe(null);return ue(()=>{o.current=null},r),ue(()=>{let a=t!==lt;if(a&&!o.current)o.current=t;if(!a&&o.current)o.current=null},[t]),o.current?wr(t,o.current):lt}function zp(t){ue(()=>{if(!bn)return;let r=t.map((o)=>{let{sensor:a}=o;return a.setup==null?void 0:a.setup()});return()=>{for(let o of r)o==null||o()}},t.map((r)=>{let{sensor:o}=r;return o}))}function $p(t,r){return fe(()=>t.reduce((o,a)=>{let{eventName:s,handler:l}=a;return o[s]=(c)=>{l(c,r)},o},{}),[t,r])}function Ki(t){return fe(()=>t?fp(t):null,[t])}var Di=[];function jp(t,r){if(r===void 0)r=Nr;let[o]=t,a=Ki(o?Ae(o):null),[s,l]=st(Di);function c(){l(()=>{if(!t.length)return Di;return t.map((u)=>$i(u)?a:new ao(r(u),u))})}let d=io({callback:c});return rt(()=>{d==null||d.disconnect(),c(),t.forEach((u)=>d==null?void 0:d.observe(u))},[t]),s}function Jp(t){if(!t)return null;if(t.children.length>1)return t;let r=t.children[0];return Yr(r)?r:t}function Gp(t){let{measure:r}=t,[o,a]=st(null),s=it((p)=>{for(let{target:m}of p)if(Yr(m)){a((f)=>{let h=r(m);return f?{...f,width:h.width,height:h.height}:h});break}},[r]),l=io({callback:s}),c=it((p)=>{let m=Jp(p);if(l==null||l.disconnect(),m)l==null||l.observe(m);a(m?r(m):null)},[r,l]),[d,u]=vn(c);return fe(()=>({nodeRef:d,rect:o,setRef:u}),[o,d,u])}var Wp=[{sensor:Cn,options:{}},{sensor:Rn,options:{}}],Xp={current:{}},ro={draggable:{measure:Ni},droppable:{measure:Ni,strategy:yn.WhileDragging,frequency:Na.Optimized},dragOverlay:{measure:Nr}};class en extends Map{get(t){var r;return t!=null?(r=super.get(t))!=null?r:void 0:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((t)=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,o;return(r=(o=this.get(t))==null?void 0:o.node.current)!=null?r:void 0}}var Up={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new en,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:no},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ro,measureDroppableContainers:no,windowRect:null,measuringScheduled:!1},Kp={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:no,draggableNodes:new Map,over:null,measureDroppableContainers:no},lo=wn(Kp),Yi=wn(Up);function Yp(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new en}}}function qp(t,r){switch(r.type){case me.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:r.initialCoordinates,active:r.active}};case me.DragMove:if(t.draggable.active==null)return t;return{...t,draggable:{...t.draggable,translate:{x:r.coordinates.x-t.draggable.initialCoordinates.x,y:r.coordinates.y-t.draggable.initialCoordinates.y}}};case me.DragEnd:case me.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case me.RegisterDroppable:{let{element:o}=r,{id:a}=o,s=new en(t.droppable.containers);return s.set(a,o),{...t,droppable:{...t.droppable,containers:s}}}case me.SetDroppableDisabled:{let{id:o,key:a,disabled:s}=r,l=t.droppable.containers.get(o);if(!l||a!==l.key)return t;let c=new en(t.droppable.containers);return c.set(o,{...l,disabled:s}),{...t,droppable:{...t.droppable,containers:c}}}case me.UnregisterDroppable:{let{id:o,key:a}=r,s=t.droppable.containers.get(o);if(!s||a!==s.key)return t;let l=new en(t.droppable.containers);return l.delete(o),{...t,droppable:{...t.droppable,containers:l}}}default:return t}}function Zp(t){let{disabled:r}=t,{active:o,activatorEvent:a,draggableNodes:s}=tn(lo),l=Qn(a),c=Qn(o==null?void 0:o.id);return ue(()=>{if(r)return;if(!a&&l&&c!=null){if(!hn(l))return;if(document.activeElement===l.target)return;let d=s.get(c);if(!d)return;let{activatorNode:u,node:p}=d;if(!u.current&&!p.current)return;requestAnimationFrame(()=>{for(let m of[u.current,p.current]){if(!m)continue;let f=gi(m);if(f){f.focus();break}}})}},[a,r,s,c,l]),null}function Qp(t,r){let{transform:o,...a}=r;return t!=null&&t.length?t.reduce((s,l)=>l({transform:s,...a}),o):o}function em(t){return fe(()=>({draggable:{...ro.draggable,...t==null?void 0:t.draggable},droppable:{...ro.droppable,...t==null?void 0:t.droppable},dragOverlay:{...ro.dragOverlay,...t==null?void 0:t.dragOverlay}}),[t==null?void 0:t.draggable,t==null?void 0:t.droppable,t==null?void 0:t.dragOverlay])}function tm(t){let{activeNode:r,measure:o,initialRect:a,config:s=!0}=t,l=Pe(!1),{x:c,y:d}=typeof s==="boolean"?{x:s,y:s}:s;rt(()=>{if(!c&&!d||!r){l.current=!1;return}if(l.current||!a)return;let p=r==null?void 0:r.node.current;if(!p||p.isConnected===!1)return;let m=o(p),f=Bi(m,a);if(!c)f.x=0;if(!d)f.y=0;if(l.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){let h=Fi(p);if(h)h.scrollBy({top:f.y,left:f.x})}},[r,c,d,a,o])}var qi=wn({...lt,scaleX:1,scaleY:1}),nr;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(nr||(nr={}));var Zi=qu(function(r){var o,a,s,l;let{id:c,accessibility:d,autoScroll:u=!0,children:p,sensors:m=Wp,collisionDetection:f=ip,measuring:h,modifiers:R,...x}=r,S=Zu(qp,void 0,Yp),[V,E]=S,[T,k]=tp(),[M,F]=st(nr.Uninitialized),D=M===nr.Initialized,{draggable:{active:A,nodes:B,translate:Z},droppable:{containers:J}}=V,ne=A!=null?B.get(A):null,pe=Pe({initial:null,translated:null}),ce=fe(()=>{var De;return A!=null?{id:A,data:(De=ne==null?void 0:ne.data)!=null?De:Xp,rect:pe}:null},[A,ne]),be=Pe(null),[ke,Ee]=st(null),[le,Fe]=st(null),de=qr(x,Object.values(x)),Me=xr("DndDescribedBy",c),W=fe(()=>J.getEnabled(),[J]),re=em(h),{droppableRects:ee,measureDroppableContainers:xe,measuringScheduled:_e}=Ap(W,{dragging:D,dependencies:[Z.x,Z.y],config:re.droppable}),ye=Mp(B,A),Et=fe(()=>le?eo(le):null,[le]),G=rc(),ze=Op(ye,re.draggable.measure);tm({activeNode:A!=null?B.get(A):null,config:G.layoutShiftCompensation,initialRect:ze,measure:re.draggable.measure});let se=Ti(ye,re.draggable.measure,ze),an=Ti(ye?ye.parentElement:null),dt=Pe({activatorEvent:null,active:null,activeNode:ye,collisionRect:null,collisions:null,droppableRects:ee,draggableNodes:B,draggingNode:null,draggingNodeRect:null,droppableContainers:J,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Tr=J.getNodeFor((o=dt.current.over)==null?void 0:o.id),ht=Gp({measure:re.dragOverlay.measure}),kr=(a=ht.nodeRef.current)!=null?a:ye,Lr=D?(s=ht.rect)!=null?s:se:null,Va=Boolean(ht.nodeRef.current&&ht.rect),Ba=Bp(Va?null:se),ko=Ki(kr?Ae(kr):null),Mt=Fp(D?Tr!=null?Tr:ye:null),Ln=jp(Mt),Dn=Qp(R,{transform:{x:Z.x-Ba.x,y:Z.y-Ba.y,scaleX:1,scaleY:1},activatorEvent:le,active:ce,activeNodeRect:se,containerNodeRect:an,draggingNodeRect:Lr,over:dt.current.over,overlayNodeRect:ht.rect,scrollableAncestors:Mt,scrollableAncestorRects:Ln,windowRect:ko}),Fa=Et?yr(Et,Z):null,_a=_p(Mt),Kl=Li(_a),Yl=Li(_a,[se]),Dr=yr(Dn,Kl),Er=Lr?dp(Lr,Dn):null,sn=ce&&Er?f({active:ce,collisionRect:Er,droppableRects:ee,droppableContainers:W,pointerCoordinates:Fa}):null,za=Ca(sn,"id"),[It,$a]=st(null),ql=Va?Dn:yr(Dn,Yl),Zl=lp(ql,(l=It==null?void 0:It.rect)!=null?l:null,se),_o=Pe(null),ja=it((De,$e)=>{let{sensor:je,options:At}=$e;if(be.current==null)return;let Ke=B.get(be.current);if(!Ke)return;let Ge=De.nativeEvent,ut=new je({active:be.current,activeNode:Ke,event:Ge,options:At,context:dt,onAbort(Ce){if(!B.get(Ce))return;let{onDragAbort:pt}=de.current,xt={id:Ce};pt==null||pt(xt),T({type:"onDragAbort",event:xt})},onPending(Ce,Ot,pt,xt){if(!B.get(Ce))return;let{onDragPending:cn}=de.current,Ht={id:Ce,constraint:Ot,initialCoordinates:pt,offset:xt};cn==null||cn(Ht),T({type:"onDragPending",event:Ht})},onStart(Ce){let Ot=be.current;if(Ot==null)return;let pt=B.get(Ot);if(!pt)return;let{onDragStart:xt}=de.current,ln={activatorEvent:Ge,active:{id:Ot,data:pt.data,rect:pe}};to(()=>{xt==null||xt(ln),F(nr.Initializing),E({type:me.DragStart,initialCoordinates:Ce,active:Ot}),T({type:"onDragStart",event:ln}),Ee(_o.current),Fe(Ge)})},onMove(Ce){E({type:me.DragMove,coordinates:Ce})},onEnd:Mr(me.DragEnd),onCancel:Mr(me.DragCancel)});_o.current=ut;function Mr(Ce){return async function(){let{active:pt,collisions:xt,over:ln,scrollAdjustedTranslate:cn}=dt.current,Ht=null;if(pt&&cn){let{cancelDrop:dn}=de.current;if(Ht={activatorEvent:Ge,active:pt,collisions:xt,delta:cn,over:ln},Ce===me.DragEnd&&typeof dn==="function"){if(await Promise.resolve(dn(Ht)))Ce=me.DragCancel}}be.current=null,to(()=>{E({type:Ce}),F(nr.Uninitialized),$a(null),Ee(null),Fe(null),_o.current=null;let dn=Ce===me.DragEnd?"onDragEnd":"onDragCancel";if(Ht){let zo=de.current[dn];zo==null||zo(Ht),T({type:dn,event:Ht})}})}}},[B]),Ql=it((De,$e)=>(je,At)=>{let Ke=je.nativeEvent,Ge=B.get(At);if(be.current!==null||!Ge||Ke.dndKit||Ke.defaultPrevented)return;let ut={active:Ge};if(De(je,$e.options,ut)===!0)Ke.dndKit={capturedBy:$e.sensor},be.current=At,ja(je,$e)},[B,ja]),Ja=Ip(m,Ql);zp(m),rt(()=>{if(se&&M===nr.Initializing)F(nr.Initialized)},[se,M]),ue(()=>{let{onDragMove:De}=de.current,{active:$e,activatorEvent:je,collisions:At,over:Ke}=dt.current;if(!$e||!je)return;let Ge={active:$e,activatorEvent:je,collisions:At,delta:{x:Dr.x,y:Dr.y},over:Ke};to(()=>{De==null||De(Ge),T({type:"onDragMove",event:Ge})})},[Dr.x,Dr.y]),ue(()=>{let{active:De,activatorEvent:$e,collisions:je,droppableContainers:At,scrollAdjustedTranslate:Ke}=dt.current;if(!De||be.current==null||!$e||!Ke)return;let{onDragOver:Ge}=de.current,ut=At.get(za),Mr=ut&&ut.rect.current?{id:ut.id,rect:ut.rect.current,data:ut.data,disabled:ut.disabled}:null,Ce={active:De,activatorEvent:$e,collisions:je,delta:{x:Ke.x,y:Ke.y},over:Mr};to(()=>{$a(Mr),Ge==null||Ge(Ce),T({type:"onDragOver",event:Ce})})},[za]),rt(()=>{dt.current={activatorEvent:le,active:ce,activeNode:ye,collisionRect:Er,collisions:sn,droppableRects:ee,draggableNodes:B,draggingNode:kr,draggingNodeRect:Lr,droppableContainers:J,over:It,scrollableAncestors:Mt,scrollAdjustedTranslate:Dr},pe.current={initial:Lr,translated:Er}},[ce,ye,sn,Er,B,kr,Lr,ee,J,It,Mt,Dr]),Lp({...G,delta:Z,draggingRect:Er,pointerCoordinates:Fa,scrollableAncestors:Mt,scrollableAncestorRects:Ln});let ec=fe(()=>({active:ce,activeNode:ye,activeNodeRect:se,activatorEvent:le,collisions:sn,containerNodeRect:an,dragOverlay:ht,draggableNodes:B,droppableContainers:J,droppableRects:ee,over:It,measureDroppableContainers:xe,scrollableAncestors:Mt,scrollableAncestorRects:Ln,measuringConfiguration:re,measuringScheduled:_e,windowRect:ko}),[ce,ye,se,le,sn,an,ht,B,J,ee,It,xe,Mt,Ln,re,_e,ko]),tc=fe(()=>({activatorEvent:le,activators:Ja,active:ce,activeNodeRect:se,ariaDescribedById:{draggable:Me},dispatch:E,draggableNodes:B,over:It,measureDroppableContainers:xe}),[le,Ja,ce,se,E,Me,B,It,xe]);return ft.createElement(Mi.Provider,{value:k},ft.createElement(lo.Provider,{value:tc},ft.createElement(Yi.Provider,{value:ec},ft.createElement(qi.Provider,{value:Zl},p)),ft.createElement(Zp,{disabled:(d==null?void 0:d.restoreFocus)===!1})),ft.createElement(op,{...d,hiddenTextDescribedById:Me}));function rc(){let De=(ke==null?void 0:ke.autoScrollEnabled)===!1,$e=typeof u==="object"?u.enabled===!1:u===!1,je=D&&!De&&!$e;if(typeof u==="object")return{...u,enabled:je};return{enabled:je}}}),rm=wn(null),Ei="button",nm="Draggable";function Qi(t){let{id:r,data:o,disabled:a=!1,attributes:s}=t,l=xr(nm),{activators:c,activatorEvent:d,active:u,activeNodeRect:p,ariaDescribedById:m,draggableNodes:f,over:h}=tn(lo),{role:R=Ei,roleDescription:x="draggable",tabIndex:S=0}=s!=null?s:{},V=(u==null?void 0:u.id)===r,E=tn(V?qi:rm),[T,k]=vn(),[M,F]=vn(),D=$p(c,r),A=qr(o);rt(()=>(f.set(r,{id:r,key:l,node:T,activatorNode:M,data:A}),()=>{let Z=f.get(r);if(Z&&Z.key===l)f.delete(r)}),[f,r]);let B=fe(()=>({role:R,tabIndex:S,"aria-disabled":a,"aria-pressed":V&&R===Ei?!0:void 0,"aria-roledescription":x,"aria-describedby":m.draggable}),[a,R,S,V,x,m.draggable]);return{active:u,activatorEvent:d,activeNodeRect:p,attributes:B,isDragging:V,listeners:a?void 0:D,node:T,over:h,setNodeRef:k,setActivatorNodeRef:F,transform:E}}function el(){return tn(Yi)}var om="Droppable",am={timeout:25};function tl(t){let{data:r,disabled:o=!1,id:a,resizeObserverConfig:s}=t,l=xr(om),{active:c,dispatch:d,over:u,measureDroppableContainers:p}=tn(lo),m=Pe({disabled:o}),f=Pe(!1),h=Pe(null),R=Pe(null),{disabled:x,updateMeasurementsFor:S,timeout:V}={...am,...s},E=qr(S!=null?S:a),T=it(()=>{if(!f.current){f.current=!0;return}if(R.current!=null)clearTimeout(R.current);R.current=setTimeout(()=>{p(Array.isArray(E.current)?E.current:[E.current]),R.current=null},V)},[V]),k=io({callback:T,disabled:x||!c}),M=it((B,Z)=>{if(!k)return;if(Z)k.unobserve(Z),f.current=!1;if(B)k.observe(B)},[k]),[F,D]=vn(M),A=qr(r);return ue(()=>{if(!k||!F.current)return;k.disconnect(),f.current=!1,k.observe(F.current)},[F,k]),ue(()=>(d({type:me.RegisterDroppable,element:{id:a,key:l,disabled:o,node:F,rect:h,data:A}}),()=>d({type:me.UnregisterDroppable,key:l,id:a})),[a]),ue(()=>{if(o!==m.current.disabled)d({type:me.SetDroppableDisabled,id:a,key:l,disabled:o}),m.current.disabled=o},[a,l,o,d]),{active:c,rect:h,isOver:(u==null?void 0:u.id)===a,node:F,over:u,setNodeRef:D}}import rl,{useMemo as po,useRef as Sa,useEffect as mo,useState as sm,useContext as im}from"react";function go(t,r,o){let a=t.slice();return a.splice(o<0?a.length+o:o,0,a.splice(r,1)[0]),a}function lm(t,r){return t.reduce((o,a,s)=>{let l=r.get(a);if(l)o[s]=l;return o},Array(t.length))}function co(t){return t!==null&&t>=0}function cm(t,r){if(t===r)return!0;if(t.length!==r.length)return!1;for(let o=0;o<t.length;o++)if(t[o]!==r[o])return!1;return!0}function dm(t){if(typeof t==="boolean")return{draggable:t,droppable:t};return t}var nl=(t)=>{let{rects:r,activeIndex:o,overIndex:a,index:s}=t,l=go(r,a,o),c=r[s],d=l[s];if(!d||!c)return null;return{x:d.left-c.left,y:d.top-c.top,scaleX:d.width/c.width,scaleY:d.height/c.height}};var uo={scaleX:1,scaleY:1},ol=(t)=>{var r;let{activeIndex:o,activeNodeRect:a,index:s,rects:l,overIndex:c}=t,d=(r=l[o])!=null?r:a;if(!d)return null;if(s===o){let p=l[c];if(!p)return null;return{x:0,y:o<c?p.top+p.height-(d.top+d.height):p.top-d.top,...uo}}let u=um(l,s,o);if(s>o&&s<=c)return{x:0,y:-d.height-u,...uo};if(s<o&&s>=c)return{x:0,y:d.height+u,...uo};return{x:0,y:0,...uo}};function um(t,r,o){let a=t[r],s=t[r-1],l=t[r+1];if(!a)return 0;if(o<r)return s?a.top-(s.top+s.height):l?l.top-(a.top+a.height):0;return l?l.top-(a.top+a.height):s?a.top-(s.top+s.height):0}var al="Sortable",sl=rl.createContext({activeIndex:-1,containerId:al,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:nl,disabled:{draggable:!1,droppable:!1}});function il(t){let{children:r,id:o,items:a,strategy:s=nl,disabled:l=!1}=t,{active:c,dragOverlay:d,droppableRects:u,over:p,measureDroppableContainers:m}=el(),f=xr(al,o),h=Boolean(d.rect!==null),R=po(()=>a.map((D)=>typeof D==="object"&&("id"in D)?D.id:D),[a]),x=c!=null,S=c?R.indexOf(c.id):-1,V=p?R.indexOf(p.id):-1,E=Sa(R),T=!cm(R,E.current),k=V!==-1&&S===-1||T,M=dm(l);rt(()=>{if(T&&x)m(R)},[T,R,x,m]),mo(()=>{E.current=R},[R]);let F=po(()=>({activeIndex:S,containerId:f,disabled:M,disableTransforms:k,items:R,overIndex:V,useDragOverlay:h,sortedRects:lm(R,u),strategy:s}),[S,f,M.draggable,M.droppable,k,R,V,u,h,s]);return rl.createElement(sl.Provider,{value:F},r)}var pm=(t)=>{let{id:r,items:o,activeIndex:a,overIndex:s}=t;return go(o,a,s).indexOf(r)},mm=(t)=>{let{containerId:r,isSorting:o,wasDragging:a,index:s,items:l,newIndex:c,previousItems:d,previousContainerId:u,transition:p}=t;if(!p||!a)return!1;if(d!==l&&s===c)return!1;if(o)return!0;return c!==s&&r===u},fm={duration:200,easing:"ease"},ll="transform",gm=rr.Transition.toString({property:ll,duration:0,easing:"linear"}),bm={roleDescription:"sortable"};function vm(t){let{disabled:r,index:o,node:a,rect:s}=t,[l,c]=sm(null),d=Sa(o);return rt(()=>{if(!r&&o!==d.current&&a.current){let u=s.current;if(u){let p=Nr(a.current,{ignoreTransform:!0}),m={x:u.left-p.left,y:u.top-p.top,scaleX:u.width/p.width,scaleY:u.height/p.height};if(m.x||m.y)c(m)}}if(o!==d.current)d.current=o},[r,o,a,s]),mo(()=>{if(l)c(null)},[l]),l}function cl(t){let{animateLayoutChanges:r=mm,attributes:o,disabled:a,data:s,getNewIndex:l=pm,id:c,strategy:d,resizeObserverConfig:u,transition:p=fm}=t,{items:m,containerId:f,activeIndex:h,disabled:R,disableTransforms:x,sortedRects:S,overIndex:V,useDragOverlay:E,strategy:T}=im(sl),k=hm(a,R),M=m.indexOf(c),F=po(()=>({sortable:{containerId:f,index:M,items:m},...s}),[f,s,M,m]),D=po(()=>m.slice(m.indexOf(c)),[m,c]),{rect:A,node:B,isOver:Z,setNodeRef:J}=tl({id:c,data:F,disabled:k.droppable,resizeObserverConfig:{updateMeasurementsFor:D,...u}}),{active:ne,activatorEvent:pe,activeNodeRect:ce,attributes:be,setNodeRef:ke,listeners:Ee,isDragging:le,over:Fe,setActivatorNodeRef:de,transform:Me}=Qi({id:c,data:F,attributes:{...bm,...o},disabled:k.draggable}),W=pi(J,ke),re=Boolean(ne),ee=re&&!x&&co(h)&&co(V),xe=!E&&le,_e=xe&&ee?Me:null,ye=d!=null?d:T,Et=ee?_e!=null?_e:ye({rects:S,activeNodeRect:ce,activeIndex:h,overIndex:V,index:M}):null,G=co(h)&&co(V)?l({id:c,items:m,activeIndex:h,overIndex:V}):M,ze=ne==null?void 0:ne.id,se=Sa({activeId:ze,items:m,newIndex:G,containerId:f}),an=m!==se.current.items,dt=r({active:ne,containerId:f,isDragging:le,isSorting:re,id:c,index:M,items:m,newIndex:se.current.newIndex,previousItems:se.current.items,previousContainerId:se.current.containerId,transition:p,wasDragging:se.current.activeId!=null}),Tr=vm({disabled:!dt,index:M,node:B,rect:A});return mo(()=>{if(re&&se.current.newIndex!==G)se.current.newIndex=G;if(f!==se.current.containerId)se.current.containerId=f;if(m!==se.current.items)se.current.items=m},[re,G,f,m]),mo(()=>{if(ze===se.current.activeId)return;if(ze!=null&&se.current.activeId==null){se.current.activeId=ze;return}let kr=setTimeout(()=>{se.current.activeId=ze},50);return()=>clearTimeout(kr)},[ze]),{active:ne,activeIndex:h,attributes:be,data:F,rect:A,index:M,newIndex:G,items:m,isOver:Z,isSorting:re,isDragging:le,listeners:Ee,node:B,overIndex:V,over:Fe,setNodeRef:W,setActivatorNodeRef:de,setDroppableNodeRef:J,setDraggableNodeRef:ke,transform:Tr!=null?Tr:Et,transition:ht()};function ht(){if(Tr||an&&se.current.newIndex===M)return gm;if(xe&&!hn(pe)||!p)return;if(re||dt)return rr.Transition.toString({...p,property:ll});return}}function hm(t,r){var o,a;if(typeof t==="boolean")return{draggable:t,droppable:!1};return{draggable:(o=t==null?void 0:t.draggable)!=null?o:r.draggable,droppable:(a=t==null?void 0:t.droppable)!=null?a:r.droppable}}function fo(t){if(!t)return!1;let r=t.data.current;if(r&&"sortable"in r&&typeof r.sortable==="object"&&"containerId"in r.sortable&&"items"in r.sortable&&"index"in r.sortable)return!0;return!1}var xm=[X.Down,X.Right,X.Up,X.Left],dl=(t,r)=>{let{context:{active:o,collisionRect:a,droppableRects:s,droppableContainers:l,over:c,scrollableAncestors:d}}=r;if(xm.includes(t.code)){if(t.preventDefault(),!o||!a)return;let u=[];l.getEnabled().forEach((f)=>{if(!f||f!=null&&f.disabled)return;let h=s.get(f.id);if(!h)return;switch(t.code){case X.Down:if(a.top<h.top)u.push(f);break;case X.Up:if(a.top>h.top)u.push(f);break;case X.Left:if(a.left>h.left)u.push(f);break;case X.Right:if(a.left<h.left)u.push(f);break}});let p=Vi({active:o,collisionRect:a,droppableRects:s,droppableContainers:u,pointerCoordinates:null}),m=Ca(p,"id");if(m===(c==null?void 0:c.id)&&p.length>1)m=p[1].id;if(m!=null){let f=l.get(o.id),h=l.get(m),R=h?s.get(h.id):null,x=h==null?void 0:h.node.current;if(x&&R&&f&&h){let V=Nn(x).some((D,A)=>d[A]!==D),E=ul(f,h),T=ym(f,h),k=V||!E?{x:0,y:0}:{x:T?a.width-R.width:0,y:T?a.height-R.height:0},M={x:R.left,y:R.top};return k.x&&k.y?M:wr(M,k)}}}return};function ul(t,r){if(!fo(t)||!fo(r))return!1;return t.data.current.sortable.containerId===r.data.current.sortable.containerId}function ym(t,r){if(!fo(t)||!fo(r))return!1;if(!ul(t,r))return!1;return t.data.current.sortable.index<r.data.current.sortable.index}import{Fragment as wm}from"react";import{jsx as or,Fragment as Cm}from"react/jsx-runtime";var Nm=({id:t,label:r,children:o})=>{let{attributes:a,listeners:s,setNodeRef:l,transform:c,transition:d,isDragging:u}=cl({id:t}),p={opacity:u?0.5:1,position:"relative",transform:rr.Transform.toString(c),transition:d,zIndex:u?10:"auto"},m=or("button",{type:"button",className:"touch-none cursor-grab text-muted-foreground/40 hover:text-muted-foreground active:cursor-grabbing",...a,...s,title:r!==void 0&&r!==""?`Drag ${r} to reorder`:"Drag to reorder","aria-label":r!==void 0&&r!==""?`Drag ${r} to reorder`:"Drag handle",children:or(Kt,{className:"h-3.5 w-3.5"})});return or("div",{ref:l,style:p,children:o(m)})},Rm=({items:t,onReorder:r,getItemLabel:o,renderItem:a,disabled:s=!1})=>{let l=Ii(Ra(Cn,{activationConstraint:{distance:4}}),Ra(Rn,{coordinateGetter:dl})),c=(d)=>{let{active:u,over:p}=d;if(!p||u.id===p.id)return;let m=t.findIndex((h)=>h.id===u.id),f=t.findIndex((h)=>h.id===p.id);if(m===-1||f===-1)return;r(go(t,m,f))};if(s)return t.map((d)=>or(wm,{children:a(d,null)},d.id));return or(Zi,{sensors:l,collisionDetection:Hi,onDragEnd:c,children:or(il,{items:t.map((d)=>d.id),strategy:ol,children:t.map((d)=>or(Nm,{id:d.id,label:o?.(d),children:(u)=>or(Cm,{children:a(d,u)})},d.id))})})},Sm=Rm;import*as pl from"react";import{jsx as Sn,jsxs as Pa}from"react/jsx-runtime";var ml=({open:t,onOpenChange:r,title:o,description:a,confirmLabel:s,cancelLabel:l="Cancel",confirmVariant:c="default",pendingLabel:d="Processing...",errorContent:u,keepOpenWhilePending:p=!1,onConfirm:m})=>{let[f,h]=pl.useState(!1),R=async()=>{h(!0);try{if(await m()!==!1)r(!1)}catch(x){throw h(!1),x}h(!1)};return Sn(N,{open:t,onOpenChange:(x)=>{if(!(p&&f))r(x)},children:Pa(_,{children:[Pa(U,{children:[Sn(O,{children:o}),Sn(Q,{children:a})]}),u,Pa(Qt,{children:[Sn(n,{variant:"outline",onClick:()=>{r(!1)},disabled:f,children:l}),Sn(n,{variant:c,onClick:()=>{R()},disabled:f,children:f?d:s})]})]})})};ml.displayName="ConfirmDialog";var Pm=ml;import*as gl from"react";import{jsx as bo,jsxs as fl}from"react/jsx-runtime";var bl=gl.forwardRef(function({step:r,total:o,title:a,helper:s,action:l,className:c,...d},u){let p=Boolean(l);return fl("div",{ref:u,className:e("flex flex-wrap items-start justify-between gap-4",c),...d,children:[fl("div",{className:"min-w-0 space-y-1.5",children:[bo(Ar,{tone:"accent",className:"tracking-[0.16em]",children:`Step ${r} of ${o}`}),bo("h2",{className:"text-lg font-semibold tracking-tight",children:a}),bo("p",{className:"max-w-xl text-sm leading-relaxed text-muted-foreground",children:s})]}),p?bo("div",{className:"shrink-0",children:l}):null]})});bl.displayName="StageHeader";var Tm=bl;import{jsx as ar,jsxs as Ta}from"react/jsx-runtime";var km=i("flex h-10 w-10 shrink-0 items-center justify-center rounded-lg border [&_svg]:h-[18px] [&_svg]:w-[18px]",{defaultVariants:{tone:"default"},variants:{tone:{accent:"border-[color-mix(in_oklab,var(--accent)_28%,var(--border))] bg-[color-mix(in_oklab,var(--accent)_10%,var(--card))] text-(--accent)",danger:"border-[color-mix(in_oklab,var(--danger)_30%,var(--border))] bg-[color-mix(in_oklab,var(--danger)_12%,var(--card))] text-(--danger)",default:"border-border bg-muted/40 text-(--text-muted)",success:"border-[color-mix(in_oklab,var(--success)_30%,var(--border))] bg-[color-mix(in_oklab,var(--success)_12%,var(--card))] text-(--success)",warning:"border-[color-mix(in_oklab,var(--warning)_30%,var(--border))] bg-[color-mix(in_oklab,var(--warning)_12%,var(--card))] text-(--warning)"}}}),Lm=i("shrink-0 [&_svg]:h-4 [&_svg]:w-4",{defaultVariants:{tone:"default"},variants:{tone:{accent:"text-(--accent)",danger:"text-(--danger)",default:"text-(--text-muted)",success:"text-(--success)",warning:"text-(--warning)"}}}),vo=(t)=>t!==null&&t!==void 0&&t!==!1&&t!==0&&t!==0n&&t!==""&&!Number.isNaN(t),vl=({variant:t="tile",icon:r,label:o,value:a,detail:s,tone:l,className:c,...d})=>{if(t==="compact")return Ta(Xe,{className:e("gap-1 px-4 py-3.5",c),...d,children:[Ta("span",{className:"flex items-center justify-between gap-2",children:[ar("span",{className:"text-[11px] font-medium uppercase tracking-[0.14em] text-(--text-muted)",children:o}),vo(r)?ar("span",{className:e(Lm({tone:l})),"aria-hidden":!0,children:r}):null]}),ar("span",{className:"text-[22px] font-semibold leading-none tabular-nums tracking-tight text-(--text-primary)",children:a}),vo(s)?ar("span",{className:"text-xs text-(--text-muted)",children:s}):null]});return Ta(Xe,{className:e("flex flex-col items-center gap-2.5 px-4 py-5 text-center","transition-colors hover:border-[color-mix(in_oklab,var(--accent)_22%,var(--border))]",c),...d,children:[vo(r)?ar("span",{className:e(km({tone:l})),"aria-hidden":!0,children:r}):null,ar("span",{className:"text-[26px] font-semibold leading-none tabular-nums tracking-tight text-(--text-primary)",children:a}),ar("span",{className:"text-[11px] font-medium uppercase tracking-[0.14em] text-(--text-muted)",children:o}),vo(s)?ar("span",{className:"text-xs text-(--text-muted)",children:s}):null]})};vl.displayName="StatTile";var Dm=vl;import*as xl from"react";import{jsx as hl,jsxs as Am}from"react/jsx-runtime";var Em={danger:"border-[color-mix(in_oklab,var(--danger)_40%,var(--border))] bg-[color-mix(in_oklab,var(--danger)_8%,var(--card))] text-(--danger)",live:"border-[color-mix(in_oklab,var(--primary)_45%,var(--border))] bg-[color-mix(in_oklab,var(--primary)_8%,var(--card))] text-primary",neutral:"border-border bg-card text-muted-foreground",success:"border-[color-mix(in_oklab,var(--success)_38%,var(--border))] bg-[color-mix(in_oklab,var(--success)_8%,var(--card))] text-(--success)",warning:"border-[color-mix(in_oklab,var(--warning)_42%,var(--border))] bg-[color-mix(in_oklab,var(--warning)_9%,var(--card))] text-(--warning)"},Mm={danger:"danger",live:"primary",neutral:"neutral",success:"success",warning:"warning"},Im=({tone:t,active:r=!1,label:o,className:a,children:s,...l},c)=>{let d="border-border bg-card text-muted-foreground";if(t)d=Em[t];else if(r)d="border-[color-mix(in_oklab,var(--primary)_45%,var(--border))] bg-[color-mix(in_oklab,var(--primary)_8%,var(--card))] text-primary";return Am("div",{ref:c,className:e("inline-flex items-center gap-2 rounded-full border px-3 py-1 text-[10px] font-semibold uppercase tracking-[0.16em]",d,a),...l,children:[t?hl(wt,{tone:Mm[t],pulse:t==="live"}):hl("span",{"aria-hidden":!0,className:e("h-1.5 w-1.5 rounded-full",r?"bg-primary shadow-[0_0_0_3px_color-mix(in_oklab,var(--primary)_22%,transparent)]":"bg-muted-foreground")}),s??o]})},yl=xl.forwardRef(Im);yl.displayName="StatusPill";var Om=yl;import*as xo from"react";import{jsx as ho,jsxs as Bm}from"react/jsx-runtime";var Hm=i("relative min-w-0",{defaultVariants:{size:"md",variant:"pill"},variants:{size:{md:"",sm:""},variant:{pill:"",plain:""}}}),Vm=i("pl-9 [&::-webkit-search-cancel-button]:appearance-none",{defaultVariants:{size:"md",variant:"pill"},variants:{size:{md:"",sm:"h-8 text-[13px]"},variant:{pill:"rounded-full bg-(--bg-surface)",plain:"bg-(--bg-surface)"}}}),wl=({value:t,defaultValue:r,onValueChange:o,clearLabel:a,variant:s,size:l,className:c,classes:d,...u})=>{let[p,m]=xo.useState(r??""),f=t!==void 0,h=f?t:p,R=xo.useRef(null),x=(S)=>{if(!f)m(S);o?.(S)};return Bm("div",{className:e(Hm({size:l,variant:s}),d?.root,c),children:[ho(et,{"aria-hidden":!0,className:e("pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground",d?.icon)}),ho(g,{ref:R,type:"search",value:h,onChange:(S)=>{x(S.target.value)},className:e(Vm({size:l,variant:s}),h!==void 0&&h!==""&&a!==void 0?"pr-9":void 0,d?.input),...u}),h!==void 0&&h!==""&&a!==void 0?ho("button",{type:"button","aria-label":a,onClick:()=>{x(""),R.current?.focus()},className:e("absolute right-2.5 top-1/2 flex size-5 -translate-y-1/2 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-(--bg-surface-alt) hover:text-(--text-primary) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",d?.clear),children:ho(I,{className:"h-3.5 w-3.5"})}):null]})};wl.displayName="SearchField";var Fm=wl;import{createContext as _m,useContext as Nl,useMemo as zm,useState as $m}from"react";import{createPortal as jm}from"react-dom";import{jsx as yo,jsxs as Um}from"react/jsx-runtime";var ka=_m(null),Jm=({children:t})=>{let[r,o]=$m(null),a=zm(()=>({container:r,setContainer:o}),[r]);return yo(ka.Provider,{value:a,children:t})},Rl=({className:t})=>{let r=Nl(ka);return yo("div",{ref:r?.setContainer,className:e("ml-auto flex items-center gap-2 empty:hidden",t)})},Gm=({children:t})=>{let r=Nl(ka);if(r===null)return t;return r.container===null?null:jm(t,r.container)},Wm=({count:t})=>t===void 0?null:yo("span",{className:"text-xs text-muted-foreground tabular-nums",children:t}),Xm=({children:t,className:r})=>Um("div",{className:e("flex flex-wrap items-center gap-3",r),children:[t,yo(Rl,{})]});import{jsx as wo,jsxs as Cl}from"react/jsx-runtime";var Sl=({title:t,description:r,value:o,options:a,onValueChange:s,align:l="center",className:c,...d})=>Cl("section",{className:e("flex min-w-0 flex-col gap-3 sm:flex-row sm:justify-between",l==="center"?"sm:items-center":"sm:items-start",c),...d,children:[Cl("div",{className:"min-w-0",children:[wo("h3",{className:"truncate text-sm font-semibold",children:t}),r!==void 0&&r!==null&&r!==!1&&r!==""&&r!==0?wo("p",{className:"mt-1 text-sm text-muted-foreground",children:r}):null]}),wo("div",{className:"inline-flex shrink-0 rounded-md border border-border bg-background p-1 shadow-xs",children:a.map((u)=>wo(n,{type:"button",size:"sm",variant:u.value===o?"secondary":"ghost",disabled:u.disabled,className:e("h-8 rounded-sm px-3",u.value===o&&"bg-primary/10 text-primary hover:bg-primary/15"),"aria-label":u.ariaLabel,"aria-pressed":u.value===o,onClick:()=>{s(u.value)},children:u.label},u.value))})]});Sl.displayName="SectionSwitcher";import*as gt from"react";import{jsx as ct}from"react/jsx-runtime";var Pl=gt.createContext({value:1}),La=()=>gt.useContext(Pl),Km=({value:t,defaultValue:r=1,indicators:o,className:a,...s})=>{let l=t??r,c=gt.useMemo(()=>({indicators:o,value:l}),[l,o]);return ct(Pl.Provider,{value:c,children:ct("div",{"data-slot":"stepper",className:e("space-y-8",a),...s})})},Ym=({className:t,...r})=>ct("nav",{"data-slot":"stepper-nav","data-orientation":"horizontal",className:e("group/stepper-nav flex items-start justify-between gap-2",t),...r}),Da=gt.createContext({state:"inactive",step:1}),qm=({step:t,loading:r,className:o,...a})=>{let{value:s}=La(),l="inactive";if(r===!0)l="loading";else if(t<s)l="completed";else if(t===s)l="active";let c=gt.useMemo(()=>({state:l,step:t}),[l,t]);return ct(Da.Provider,{value:c,children:ct("div",{"data-slot":"stepper-item","data-state":l,"data-step":t,className:e("group/step relative flex-1 items-start",o),...a})})},Zm=({className:t,...r})=>ct("div",{"data-slot":"stepper-trigger",className:e("flex flex-col items-center gap-2.5",t),...r}),Qm=({className:t,children:r,...o})=>{let{indicators:a}=La(),{state:s}=gt.useContext(Da),l=a?.completed,c=a?.loading,d=r;if(s==="completed"&&Boolean(l))d=l;else if(s==="loading"&&Boolean(c))d=c;return ct("div",{"data-slot":"stepper-indicator","data-state":s,className:e("flex size-7 shrink-0 items-center justify-center rounded-full border-2 text-xs font-semibold transition-colors",s==="completed"&&"border-primary bg-primary text-primary-foreground",s==="active"&&"border-primary bg-primary text-primary-foreground",s==="loading"&&"border-primary bg-primary text-primary-foreground",s==="inactive"&&"border-muted-foreground/30 bg-background text-muted-foreground",t),...o,children:d})},ef=({className:t,...r})=>{let{state:o}=gt.useContext(Da);return ct("span",{"data-slot":"stepper-title","data-state":o,className:e("text-sm font-medium",(o==="completed"||o==="active")&&"text-foreground",o==="inactive"&&"text-muted-foreground",t),...r})},tf=({className:t,...r})=>ct("div",{"data-slot":"stepper-separator",className:e("h-0.5 rounded-full bg-muted-foreground/30 transition-colors","group-data-[state=completed]/step:bg-primary",t),...r}),rf=({className:t,...r})=>ct("div",{"data-slot":"stepper-panel",className:e(t),...r}),nf=({value:t,className:r,...o})=>{let{value:a}=La();if(t!==a)return null;return ct("div",{"data-slot":"stepper-content",className:e(r),...o})};import*as Cr from"react";import{jsx as Rr,jsxs as lf}from"react/jsx-runtime";var Ea=Cr.createContext({}),of=({className:t,size:r,variant:o,...a})=>{let s=Cr.useMemo(()=>({size:r,variant:o}),[r,o]);return Rr(Ea.Provider,{value:s,children:Rr("fieldset",{"data-slot":"split-button",className:e("inline-flex min-w-0 items-stretch",t),...a})})},af=({className:t,...r})=>{let{size:o,variant:a}=Cr.useContext(Ea);return Rr(n,{"data-slot":"split-button-action",className:e("rounded-r-none",t),size:o,variant:a,...r})},sf=({align:t="end",children:r,contentClassName:o,disabled:a,label:s,...l})=>{let{size:c,variant:d}=Cr.useContext(Ea);return lf(Zt,{...l,children:[Rr(Jt,{asChild:!0,children:Rr(n,{"aria-label":s,"data-slot":"split-button-menu",className:"-ml-px rounded-l-none border-l border-l-current/20 px-2",disabled:a,size:c,variant:d,children:Rr(v,{})})}),Rr(er,{align:t,className:o,children:r})]})};import*as rn from"react";import{jsx as bt,jsxs as Ro}from"react/jsx-runtime";var cf=({items:t,title:r,triggerAriaLabel:o="Technical details",copyLabel:a="Copy",trigger:s,align:l="end",side:c="bottom",onCopy:d,className:u,classes:p})=>{let[m,f]=rn.useState(null),h=rn.useRef(null);rn.useEffect(()=>()=>{if(h.current!==null)window.clearTimeout(h.current)},[]);let R=(x)=>{if(navigator.clipboard.writeText(x.value),f(x.label),h.current!==null)window.clearTimeout(h.current);h.current=window.setTimeout(()=>{f(null)},1500),d?.(x)};return Ro(q,{children:[bt(j,{asChild:!0,children:s??bt(n,{type:"button",variant:"ghost",size:"icon","aria-label":o,className:e("h-8 w-8 text-muted-foreground hover:text-foreground",p?.root,p?.trigger,u),children:bt(Mo,{className:"h-4 w-4"})})}),Ro(K,{align:l,side:c,className:e("w-80 p-3",p?.content),children:[r!==void 0&&r!==null?bt("div",{className:"mb-2 text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:r}):null,bt("dl",{className:"space-y-2.5",children:t.map((x)=>Ro("div",{className:e("min-w-0",p?.row),children:[bt("dt",{className:e("text-[11px] font-medium text-muted-foreground",p?.label),children:x.label}),Ro("dd",{className:"mt-0.5 flex min-w-0 items-start gap-1",children:[bt("code",{className:e("min-w-0 flex-1 select-all break-all rounded bg-muted/60 px-1.5 py-1 font-mono text-xs leading-relaxed text-foreground",p?.value),children:x.value}),x.copyable===!1?null:bt(n,{type:"button",variant:"ghost",size:"icon","aria-label":`${a} ${x.label}`,className:"h-6 w-6 shrink-0 text-muted-foreground hover:text-foreground",onClick:()=>{R(x)},children:m===x.label?bt(y,{className:"h-3.5 w-3.5"}):bt(ae,{className:"h-3.5 w-3.5"})})]})]},x.label))})]})]})};var df=cf;import*as nn from"react";import{jsx as Re,jsxs as Tt,Fragment as kl}from"react/jsx-runtime";var uf={disabled:!1,emptyMessage:"No option found.",loading:!1,loadingMessage:"Loading options...",modal:!1,placeholder:"Select option...",searchPlaceholder:"Search...",width:"200px"},pf=1,mf=0.5,ff=(t)=>t.children!==void 0,Ll=(t)=>t.flatMap((r)=>{if(!r.children)return[r];let o=Ll(r.children);return o.length>0?[{...r,children:o}]:[]}),Dl=(t,r=[])=>t.flatMap((o)=>o.children?Dl(o.children,[...r,o]):[{ancestorIds:r.map((a)=>a.id),node:o,path:r.map((a)=>a.label).join(" / ")}]),Tl=(t)=>({paddingLeft:`${mf+t*pf}rem`}),El=nn.forwardRef(function(r,o){let a={...uf,...r},{nodes:s,value:l,onChange:c,selectedLabel:d,placeholder:u,searchPlaceholder:p,emptyMessage:m,id:f,className:h,width:R,disabled:x,loading:S,loadingMessage:V,onSearchChange:E,modal:T}=a,[k,M]=nn.useState(!1),[F,D]=nn.useState(""),[A,B]=nn.useState(()=>new Set),Z=Ll(s),J=Dl(Z),ne=J.find((W)=>W.node.id===l),pe=F.trim().toLowerCase(),ce=(W)=>{if(W)B(new Set(ne?.ancestorIds));else if(F!=="")D(""),E?.("");M(W)},be=(W)=>{D(W),E?.(W)},ke=(W)=>{B((re)=>{let ee=new Set(re);if(!ee.delete(W))ee.add(W);return ee})},Ee=(W)=>{c(W),ce(!1)},le=(W)=>Tt(kl,{children:[Re(y,{"aria-hidden":!0,className:e(l===W.id?"opacity-100":"opacity-0")}),W.icon]}),Fe=(W,re)=>W.flatMap((ee)=>{if(!ff(ee))return[Tt(ve,{value:ee.id,style:Tl(re),onSelect:()=>{Ee(ee.id)},children:[le(ee),Re("span",{className:"min-w-0 truncate",title:ee.label,children:ee.label})]},ee.id)];let xe=A.has(ee.id),_e=xe?Lo:To;return[Tt(ve,{value:ee.id,"aria-expanded":xe,style:Tl(re),onSelect:()=>{ke(ee.id)},children:[Re(C,{"aria-hidden":!0,className:e(xe&&"rotate-90")}),ee.icon??Re(_e,{"aria-hidden":!0}),Re("span",{className:"min-w-0 truncate",title:ee.label,children:ee.label})]},ee.id),...xe&&ee.children?Fe(ee.children,re+1):[]]}),de=pe===""?[]:J.filter((W)=>E!==void 0||`${W.path} / ${W.node.label}`.toLowerCase().includes(pe)),Me=ne?.node.label??d;return Tt(q,{modal:T,open:k,onOpenChange:ce,children:[Re(j,{asChild:!0,children:Tt(n,{ref:o,id:f,variant:"outline","aria-expanded":k,"aria-busy":S,className:e("justify-between",h),style:{width:R},disabled:x,children:[Me===void 0?Re("span",{className:"min-w-0 truncate text-muted-foreground",children:u}):Re("span",{className:"min-w-0 truncate",children:Me}),S?Re(b,{"aria-hidden":!0,className:"ml-2 size-4 shrink-0 animate-spin text-muted-foreground"}):Re(Je,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),Re(K,{className:"p-0",style:{width:"var(--radix-popover-trigger-width)"},children:Tt(Qe,{shouldFilter:!1,children:[Re(fr,{"aria-label":p,placeholder:p,value:F,onValueChange:be}),Re(Pt,{className:"max-h-[min(300px,calc(var(--radix-popover-content-available-height)-2.5rem))]",children:S?Tt("div",{"aria-live":"polite",className:"flex items-center justify-center gap-2 px-3 py-6 text-sm text-muted-foreground",children:[Re(b,{"aria-hidden":!0,className:"size-4 animate-spin"}),V]}):Tt(kl,{children:[Re(pr,{children:m}),Re(He,{children:pe===""?Fe(Z,0):de.map((W)=>Tt(ve,{value:W.node.id,onSelect:()=>{Ee(W.node.id)},children:[le(W.node),Re("span",{className:"min-w-0 truncate",title:W.node.label,children:W.node.label}),W.path===""?null:Re("span",{className:"ml-auto min-w-0 shrink truncate pl-2 text-xs text-muted-foreground",title:W.path,children:W.path})]},W.node.id))})]})})]})})]})});El.displayName="TreeSelect";import*as Il from"react";import{jsx as Ml,jsxs as bf}from"react/jsx-runtime";var gf=({value:t,state:r="value",trailing:o,monospace:a=!0,className:s,...l},c)=>{let d=r==="secret";return bf("div",{ref:c,className:e("flex min-w-0 items-center gap-2",s),...l,children:[Ml("div",{className:e("flex min-w-0 flex-1 items-center border-b py-2",d?"border-[color-mix(in_oklab,var(--primary)_45%,var(--border))]":"border-border"),children:Ml("code",{className:e("block min-w-0 flex-1 overflow-x-auto whitespace-nowrap text-[13px] text-foreground",a?"font-mono":"font-sans"),children:t})}),o]})},Al=Il.forwardRef(gf);Al.displayName="ValueRow";var vf=Al;import{forwardRef as Ol,useCallback as Sr,useLayoutEffect as Hl,useId as hf,useRef as Vl,useState as Oe}from"react";import{jsx as w,jsxs as z,Fragment as Pn}from"react/jsx-runtime";var xf=({mode:t,onModeChange:r,disabled:o})=>z("div",{role:"tablist","aria-label":"Value source",className:"relative inline-flex h-7 items-center rounded-full border border-border/70 bg-muted/40 p-0.5 text-[10px] font-medium tracking-[0.08em] uppercase shadow-inner",children:[w("span",{"aria-hidden":!0,className:e("absolute top-0.5 bottom-0.5 w-[calc(50%-2px)] rounded-full bg-background shadow-xs ring-1 ring-border/60 transition-transform duration-200 ease-out",t==="inline"&&"translate-x-[calc(100%+0px)]")}),z("button",{type:"button",role:"tab","aria-selected":t==="linked",disabled:o,onClick:()=>{r("linked")},className:e("relative z-10 flex items-center gap-1 rounded-full px-2.5 py-1 transition-colors",t==="linked"?"text-foreground":"text-muted-foreground hover:text-foreground"),children:[w(Ye,{className:"h-3 w-3"}),"Linked"]}),z("button",{type:"button",role:"tab","aria-selected":t==="inline",disabled:o,onClick:()=>{r("inline")},className:e("relative z-10 flex items-center gap-1 rounded-full px-2.5 py-1 transition-colors",t==="inline"?"text-foreground":"text-muted-foreground hover:text-foreground"),children:[w(Gt,{className:"h-3 w-3"}),"Inline"]})]}),yf=({variableKey:t,initialValue:r,isSecret:o,loading:a,saving:s,onSubmit:l,onCancel:c})=>{let[d,u]=Oe(r),[p,m]=Oe(!1),f=Vl(null);return Hl(()=>{if(!a)f.current?.focus()},[a]),z("form",{role:"presentation",onSubmit:(h)=>{h.preventDefault(),l(d)},onKeyDown:(h)=>{if(h.key==="Escape")h.preventDefault(),c()},className:"space-y-3 p-3",children:[z("div",{className:"flex items-start justify-between gap-2",children:[z("div",{className:"min-w-0",children:[w("p",{className:"text-[10px] font-medium uppercase tracking-[0.1em] text-muted-foreground",children:"Editing linked variable"}),w("p",{className:"mt-0.5 truncate font-mono text-xs text-foreground",children:t})]}),w("button",{type:"button",onClick:c,"aria-label":"Close editor",className:"rounded p-0.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:w(I,{className:"h-3.5 w-3.5"})})]}),z("div",{className:"space-y-1",children:[w(P,{htmlFor:"linked-value",className:"text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground",children:o?"Secret value":"Value"}),z("div",{className:"relative",children:[w(g,{ref:f,id:"linked-value",type:p?"text":"password",value:d,onChange:(h)=>{u(h.target.value)},placeholder:a?"Loading current value…":"Enter value",disabled:a||s,className:"h-8 pr-8 font-mono text-xs",autoComplete:"off",spellCheck:!1}),w("button",{type:"button",onClick:()=>{m((h)=>!h)},"aria-label":p?"Hide value":"Reveal value",className:"absolute inset-y-0 right-1 my-auto flex h-6 w-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:p?w(Ct,{className:"h-3.5 w-3.5"}):w(Ve,{className:"h-3.5 w-3.5"})})]})]}),z("div",{className:"flex items-center justify-between gap-2 pt-1",children:[z("p",{className:"text-[10px] leading-relaxed text-muted-foreground",children:["Updates the linked secret. Other connectors using"," ",w("span",{className:"font-mono",children:t})," will pick it up on their next run."]}),w(n,{type:"submit",size:"sm",disabled:a||s,className:"h-7 px-3 text-xs",children:s?z(Pn,{children:[w(b,{className:"h-3 w-3 animate-spin"}),"Saving"]}):"Save"})]})]})},wf=({suggestedName:t,onSubmit:r,onCancel:o})=>{let[a,s]=Oe(t),[l,c]=Oe(""),[d,u]=Oe(!0),[p,m]=Oe(!1),f=Vl(null);Hl(()=>{f.current?.focus(),f.current?.select()},[]);let h=a.trim(),R=h.length>0;return z("form",{role:"presentation",onSubmit:(x)=>{if(x.preventDefault(),R)r({key:h,secret:d,value:l})},onClick:(x)=>{x.stopPropagation()},onKeyDown:(x)=>{if(x.key==="Escape")x.preventDefault(),x.stopPropagation(),o()},className:"flex flex-col",children:[z("div",{className:"flex items-center gap-2 border-b border-border/60 bg-muted/15 px-3 py-2",children:[w("button",{type:"button",onClick:o,"aria-label":"Back to picker",className:"-ml-1 flex h-5 w-5 shrink-0 items-center justify-center rounded text-muted-foreground/70 transition-colors hover:bg-muted hover:text-foreground",children:w(jt,{className:"h-3.5 w-3.5"})}),w("span",{className:"flex-1 text-[10.5px] font-medium uppercase tracking-[0.12em] text-muted-foreground/80",children:"New variable"}),w(St,{className:"h-3 w-3 text-muted-foreground/60"})]}),z("div",{className:"space-y-2.5 px-3 py-2.5",children:[z("div",{className:"space-y-1",children:[w(P,{htmlFor:"var-key",className:"text-[10px] font-medium uppercase tracking-[0.1em] text-muted-foreground/70",children:"Name"}),z("div",{className:"relative",children:[w("span",{"aria-hidden":!0,className:"pointer-events-none absolute inset-y-0 left-2.5 flex items-center text-muted-foreground/60",children:w(zt,{className:"h-3 w-3"})}),w(g,{ref:f,id:"var-key",value:a,onChange:(x)=>{s(x.target.value.toUpperCase())},placeholder:"VARIABLE_NAME",className:"h-8 pl-7 font-mono text-[12.5px] tracking-tight",autoComplete:"off",spellCheck:!1})]})]}),z("div",{className:"space-y-1",children:[w(P,{htmlFor:"var-value",className:"text-[10px] font-medium uppercase tracking-[0.1em] text-muted-foreground/70",children:"Value"}),z("div",{className:"relative",children:[w(g,{id:"var-value",type:p?"text":"password",value:l,onChange:(x)=>{c(x.target.value)},placeholder:"Encrypted at rest",className:"h-8 pr-8 font-mono text-[12.5px]",autoComplete:"off",spellCheck:!1}),w("button",{type:"button",onClick:()=>{m((x)=>!x)},"aria-label":p?"Hide value":"Reveal value",className:"absolute inset-y-0 right-1 my-auto flex h-6 w-6 items-center justify-center rounded text-muted-foreground/70 transition-colors hover:bg-muted hover:text-foreground",children:p?w(Ct,{className:"h-3.5 w-3.5"}):w(Ve,{className:"h-3.5 w-3.5"})})]})]}),z("label",{className:"flex cursor-pointer items-center gap-2 select-none text-[11px] text-muted-foreground",children:[w("input",{type:"checkbox",checked:d,onChange:(x)=>{u(x.target.checked)},className:"h-3 w-3 accent-primary"}),z("span",{className:"flex items-center gap-1",children:[w(zt,{className:"h-3 w-3"}),"Mark as secret"]})]})]}),z("button",{type:"submit",disabled:!R,className:"group/save flex w-full items-center gap-2.5 border-t border-border/60 bg-gradient-to-r from-muted/30 to-muted/10 px-3 py-2.5 text-left text-xs transition-colors hover:from-muted/50 hover:to-muted/30 disabled:cursor-not-allowed disabled:opacity-50",children:[w("span",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary ring-1 ring-primary/15",children:w(y,{className:"h-3 w-3"})}),z("span",{className:"flex min-w-0 flex-1 flex-col",children:[w("span",{className:"text-[12px] font-medium leading-tight",children:"Create variable"}),w("span",{className:"truncate text-[10px] leading-tight text-muted-foreground",children:R?z(Pn,{children:["Link this field to"," ",w("span",{className:"font-mono text-foreground/80",children:h})]}):"Enter a name to continue"})]}),w(Ze,{className:"h-3.5 w-3.5 text-muted-foreground/60 transition-transform group-hover/save:translate-x-0.5 group-disabled/save:translate-x-0"})]})]})},Bl=Ol(function({selected:r,value:o,placeholder:a,disabled:s,open:l,onOpen:c},d){let u=Boolean(o),p=Boolean(r);return z("button",{ref:d,type:"button","aria-expanded":l,disabled:s,onClick:c,className:e("group/trigger relative flex h-9 w-full items-center gap-2 rounded-md border bg-background px-2.5 text-left text-sm shadow-xs transition-all outline-none","hover:border-ring/50","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:cursor-not-allowed disabled:opacity-50",u?"border-primary/20 bg-primary/[0.03]":"border-input"),children:[w("span",{"aria-hidden":!0,className:e("flex h-5 w-5 shrink-0 items-center justify-center rounded-sm transition-colors",u?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"),children:w(Ye,{className:"h-3 w-3"})}),u?z("span",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:[w("span",{className:"truncate font-mono text-[12.5px] tracking-tight",children:o}),!p&&w("span",{title:"Not in your variables list",className:"rounded-sm border border-dashed border-muted-foreground/40 px-1 py-px text-[9px] uppercase tracking-wider text-muted-foreground",children:"Unresolved"})]}):w("span",{className:"flex-1 truncate text-muted-foreground",children:a}),w(Je,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground/60 transition-colors group-hover/trigger:text-muted-foreground"})]})});Bl.displayName="LinkedTrigger";var Nf=({value:t,onChange:r,onBlur:o,placeholder:a,disabled:s,masked:l,inputId:c})=>{let[d,u]=Oe(!1),p=l&&!d?"password":"text";return z("div",{className:e("group/inline relative flex h-9 w-full items-center rounded-md border border-input bg-background pl-2.5 pr-1 shadow-xs transition-all","focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]"),children:[w("span",{"aria-hidden":!0,className:"mr-2 flex h-5 w-5 shrink-0 items-center justify-center rounded-sm bg-muted text-muted-foreground",children:w(Gt,{className:"h-3 w-3"})}),w("input",{id:c,type:p,value:t,onChange:(m)=>{r(m.target.value)},onBlur:o,placeholder:a,disabled:s,autoComplete:"off",spellCheck:!1,className:"flex-1 bg-transparent font-mono text-[12.5px] tracking-tight outline-none placeholder:font-sans placeholder:tracking-normal placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"}),l&&w("button",{type:"button",onClick:()=>{u((m)=>!m)},"aria-label":d?"Hide value":"Reveal value",className:"flex h-7 w-7 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:d?w(Ct,{className:"h-3.5 w-3.5"}):w(Ve,{className:"h-3.5 w-3.5"})})]})},Rf=({options:t,value:r,onSelect:o})=>z("div",{className:"px-1",children:[z("div",{className:"flex items-center justify-between px-2 pt-2 pb-1",children:[w("span",{className:"text-[10px] font-medium uppercase tracking-[0.12em] text-muted-foreground/80",children:"Linked variables"}),w("span",{className:"text-[10px] tabular-nums text-muted-foreground/60",children:t.length})]}),w(He,{className:"!p-0 [&_[cmdk-group-heading]]:hidden",children:t.map((a)=>{let s=r===a.key;return z(ve,{value:a.key,keywords:[a.key,a.description??""],onSelect:()=>{o(a.key)},className:e("group/row relative my-px cursor-pointer rounded-md px-2 py-1.5 transition-colors","data-[selected=true]:bg-muted/60 data-[selected=true]:text-foreground",s&&"bg-primary/[0.05]"),children:[s&&w("span",{"aria-hidden":!0,className:"absolute inset-y-1.5 left-0 w-[2px] rounded-r bg-primary"}),w("span",{"aria-hidden":!0,className:e("flex h-5 w-5 shrink-0 items-center justify-center rounded-sm transition-colors",s?"bg-primary/15 text-primary":"bg-muted/60 text-muted-foreground/70 group-hover/row:bg-muted"),children:w(zt,{className:"h-3 w-3"})}),z("div",{className:"flex min-w-0 flex-1 flex-col",children:[w("span",{className:e("truncate font-mono text-[12.5px] tracking-tight",s&&"text-primary"),children:a.key}),a.description!==void 0&&a.description!==""&&w("span",{className:"truncate text-[10.5px] leading-tight text-muted-foreground",children:a.description})]}),s?w(y,{className:"h-3.5 w-3.5 shrink-0 text-primary"}):w("span",{"aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 text-transparent transition-colors group-data-[selected=true]/row:text-muted-foreground/40",children:w(Ze,{className:"h-3.5 w-3.5"})})]},a.key)})})]}),Cf=()=>z("div",{className:"space-y-1.5 px-2 py-3",children:[z("div",{className:"flex items-center justify-between px-1 pb-1",children:[w("span",{className:"text-[10px] font-medium uppercase tracking-[0.12em] text-muted-foreground/60",children:"Loading"}),w(b,{className:"h-3 w-3 animate-spin text-muted-foreground/60"})]}),[0.95,0.7,0.85].map((t,r)=>z("div",{className:"flex items-center gap-2 rounded-md px-2 py-1.5",style:{opacity:1-r*0.18},children:[w("div",{className:"h-5 w-5 shrink-0 animate-pulse rounded-sm bg-muted/70"}),w("div",{className:"h-3 animate-pulse rounded bg-muted/70",style:{width:`${t*100}%`}})]},r))]}),Sf=({query:t,canCreate:r,onCreate:o})=>{let a=t.trim();return z("div",{className:"flex flex-col items-center gap-2 px-4 py-7 text-center",children:[w("span",{"aria-hidden":!0,className:"flex h-9 w-9 items-center justify-center rounded-full bg-muted/60 text-muted-foreground/70",children:w(zt,{className:"h-4 w-4"})}),z("div",{className:"space-y-0.5",children:[w("p",{className:"text-[12px] font-medium text-foreground",children:a?z(Pn,{children:["No variables match"," ",z("span",{className:"font-mono text-foreground",children:['"',a,'"']})]}):"No variables yet"}),w("p",{className:"text-[10.5px] leading-snug text-muted-foreground",children:"Variables let you reuse secrets across connectors and rotate them in one place."})]}),r&&z(n,{type:"button",size:"sm",variant:"outline",onClick:o,className:"mt-1 h-7 text-[11px]",children:[w(St,{className:"h-3 w-3"}),a?`Create "${a.toUpperCase().replaceAll(/[^A-Z0-9_]/gu,"_")}"`:"Create variable"]})]})},Pf=({options:t,optionsLoading:r,optionsFetching:o,value:a,query:s,onQueryChange:l,onSelect:c,onCreate:d,suggestedName:u,showCreate:p,onShowCreate:m})=>{if(p&&d)return w(wf,{suggestedName:u??s.trim(),onSubmit:(h)=>{d(h)},onCancel:()=>{m(!1)}});let f=w(Rf,{options:t,value:a,onSelect:c});if(r)f=w(Cf,{});else if(t.length===0)f=w(Sf,{query:s,canCreate:Boolean(d),onCreate:()=>{m(!0)}});return z("div",{className:"flex flex-col",children:[z("div",{className:"relative flex items-center gap-2 border-b border-border/60 bg-muted/15 px-3 py-2",children:[w(et,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground/70"}),w("input",{autoFocus:!0,type:"text",value:s,onChange:(h)=>{l(h.target.value)},placeholder:"Search variables…",autoComplete:"off",spellCheck:!1,className:"flex-1 bg-transparent text-xs tracking-tight outline-none placeholder:text-muted-foreground/60"}),z("div",{className:"flex h-4 w-4 items-center justify-center",children:[o&&!r&&w(b,{className:"h-3 w-3 animate-spin text-muted-foreground/70"}),!o&&s&&w("button",{type:"button",onClick:()=>{l("")},"aria-label":"Clear search",className:"rounded p-0.5 text-muted-foreground/60 transition-colors hover:bg-muted hover:text-foreground",children:w(I,{className:"h-3 w-3"})})]})]}),w(Qe,{shouldFilter:!1,className:"rounded-none bg-transparent",loop:!0,children:w(Pt,{className:"max-h-[280px] py-1",children:f})}),d&&z("button",{type:"button",onClick:()=>{m(!0)},className:"group/cta flex w-full items-center gap-2.5 border-t border-border/60 bg-gradient-to-r from-muted/30 to-muted/10 px-3 py-2.5 text-left text-xs transition-colors hover:from-muted/50 hover:to-muted/30",children:[w("span",{className:"flex h-6 w-6 items-center justify-center rounded-md bg-primary/10 text-primary ring-1 ring-primary/15",children:w(St,{className:"h-3 w-3"})}),z("span",{className:"flex min-w-0 flex-1 flex-col",children:[w("span",{className:"text-[12px] font-medium leading-tight",children:"Create new variable"}),w("span",{className:"text-[10px] leading-tight text-muted-foreground",children:"Encrypted at rest · reusable across connectors"})]}),w(Ze,{className:"h-3.5 w-3.5 text-muted-foreground/60 transition-transform group-hover/cta:translate-x-0.5"})]})]})},Tf=Ol(function({value:r,mode:o,onChange:a,onBlur:s,options:l,optionsLoading:c,optionsFetching:d,onSearch:u,onCreate:p,onResolve:m,onUpdate:f,suggestedName:h,placeholder:R="Select variable…",disabled:x=!1,masked:S=!0,className:V},E){let[T,k]=Oe(!1),[M,F]=Oe(""),[D,A]=Oe(!1),[B,Z]=Oe(!1),[J,ne]=Oe(null),[pe,ce]=Oe(!1),[be,ke]=Oe(!1),[Ee,le]=Oe(null),Fe=hf(),de=Sr((G)=>{if(G===o)return;a("",G),A(!1),F("")},[o,a]),Me=Sr((G)=>{a(G===r?"":G,"linked"),k(!1),A(!1)},[r,a]),W=Sr((G)=>{a(G,"inline")},[a]),re=Sr(async(G)=>{if(!p)return;let ze=await p(G);A(!1),k(!1),a(ze.key,"linked")},[p,a]),ee=Sr(async()=>{if(!r||!m)return;Z(!0),ce(!0),le(null);try{let G=await m(r);ne(G??{key:r,secret:!0,value:null})}catch(G){le(G instanceof Error?G.message:"Failed to load variable"),ne({key:r,secret:!0,value:null})}ce(!1)},[r,m]),xe=Sr(async(G)=>{if(!f||!r)return;ke(!0);try{await f({key:r,value:G}),Z(!1)}catch(ze){throw ke(!1),ze}ke(!1)},[f,r]),_e=Sr((G)=>{F(G),u?.(G)},[u]),ye=l.find((G)=>G.key===r),Et=o==="linked"&&Boolean(r)&&Boolean(f);return z("div",{className:e("space-y-1.5",V),children:[z("div",{className:"flex items-center gap-1.5",children:[w("div",{className:"min-w-0 flex-1",children:o==="linked"?z(q,{open:T,onOpenChange:(G)=>{if(k(G),!G)A(!1),s?.()},modal:!0,children:[w(j,{asChild:!0,children:w(Bl,{ref:E,selected:ye,value:r,placeholder:R,disabled:x,open:T,onOpen:()=>{k(!0)}})}),w(K,{className:"w-[--radix-popover-trigger-width] min-w-[300px] overflow-hidden border-border/80 p-0 shadow-xl",side:"bottom",align:"start",sideOffset:6,children:w(Pf,{options:l,optionsLoading:Boolean(c),optionsFetching:Boolean(d),value:r,query:M,onQueryChange:_e,onSelect:Me,onCreate:p?re:void 0,suggestedName:h,showCreate:D,onShowCreate:A})})]}):w(Nf,{inputId:Fe,value:r,onChange:W,onBlur:()=>s?.(),placeholder:R||"Enter value",disabled:x,masked:S})}),Et&&z(q,{open:B,onOpenChange:(G)=>{if(Z(G),!G)ne(null),le(null);else if(!J)ee()},modal:!0,children:[w(j,{asChild:!0,children:w(n,{type:"button",variant:"outline",size:"icon",disabled:x,"aria-label":"Edit linked variable value",title:"Edit linked variable value",className:"h-9 w-9 shrink-0 border-input text-muted-foreground hover:text-foreground",children:w(Gt,{className:"h-3.5 w-3.5"})})}),z(K,{align:"end",side:"bottom",sideOffset:6,className:"w-80 p-0 shadow-lg",children:[Ee!==null&&Ee!==""&&w("div",{className:"border-b border-destructive/30 bg-destructive/5 px-3 py-2 text-[11px] text-destructive",children:Ee}),w(yf,{variableKey:r,initialValue:J?.value??"",isSecret:J?.secret??!0,loading:pe,saving:be,onSubmit:(G)=>{xe(G)},onCancel:()=>{Z(!1)}},`${r}:${J?.value??""}`)]})]}),w(xf,{mode:o,onModeChange:de,disabled:x})]}),w("p",{className:"flex items-center gap-1.5 text-[10.5px] leading-tight text-muted-foreground/80",children:o==="linked"?z(Pn,{children:[w(Ye,{className:"h-3 w-3"}),w("span",{children:"Reads from an org variable. Rotate values in one place; every connector picks it up."})]}):z(Pn,{children:[w(Gt,{className:"h-3 w-3"}),z("span",{children:["Stored inline on this connector. Use"," ",w("span",{className:"font-medium text-foreground/80",children:"Linked"})," ","to share across connectors."]})]})})]})});import{useMemo as kf}from"react";import{jsx as Co,jsxs as Ma}from"react/jsx-runtime";var Lf=(t)=>{let r="",o=0,a=" ",s=t.replaceAll(/>\s*</gu,`>
|
|
6
|
+
`},gp={onDragStart(t){let{active:r}=t;return"Picked up draggable item "+r.id+"."},onDragOver(t){let{active:r,over:n}=t;if(n)return"Draggable item "+r.id+" was moved over droppable area "+n.id+".";return"Draggable item "+r.id+" is no longer over a droppable area."},onDragEnd(t){let{active:r,over:n}=t;if(n)return"Draggable item "+r.id+" was dropped over droppable area "+n.id;return"Draggable item "+r.id+" was dropped."},onDragCancel(t){let{active:r}=t;return"Dragging was cancelled. Draggable item "+r.id+" was dropped."}};function bp(t){let{announcements:r=gp,container:n,hiddenTextDescribedById:o,screenReaderInstructions:a=fp}=t,{announce:s,announcement:i}=Si(),c=$t("DndLiveRegion"),[d,u]=$e(!1);if(ee(()=>{u(!0)},[]),pp(ne(()=>({onDragStart(m){let{active:f}=m;s(r.onDragStart({active:f}))},onDragMove(m){let{active:f,over:b}=m;if(r.onDragMove)s(r.onDragMove({active:f,over:b}))},onDragOver(m){let{active:f,over:b}=m;s(r.onDragOver({active:f,over:b}))},onDragEnd(m){let{active:f,over:b}=m;s(r.onDragEnd({active:f,over:b}))},onDragCancel(m){let{active:f,over:b}=m;s(r.onDragCancel({active:f,over:b}))}}),[s,r])),!d)return null;let p=qe.createElement(qe.Fragment,null,qe.createElement(Ri,{id:o,value:a.draggable}),qe.createElement(Ci,{id:c,announcement:i}));return n?up(p,n):p}var re;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(re||(re={}));function On(){}function na(t,r){return ne(()=>({sensor:t,options:r!=null?r:{}}),[t,r])}function Fi(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return ne(()=>[...r].filter((o)=>o!=null),[...r])}var je=Object.freeze({x:0,y:0});function _i(t,r){return Math.sqrt(Math.pow(t.x-r.x,2)+Math.pow(t.y-r.y,2))}function zi(t,r){let{data:{value:n}}=t,{data:{value:o}}=r;return n-o}function vp(t,r){let{data:{value:n}}=t,{data:{value:o}}=r;return o-n}function Pi(t){let{left:r,top:n,height:o,width:a}=t;return[{x:r,y:n},{x:r+a,y:n},{x:r,y:n+o},{x:r+a,y:n+o}]}function oa(t,r){if(!t||t.length===0)return null;let[n]=t;return r?n[r]:n}function Ti(t,r,n){if(r===void 0)r=t.left;if(n===void 0)n=t.top;return{x:r+t.width*0.5,y:n+t.height*0.5}}var $i=(t)=>{let{collisionRect:r,droppableRects:n,droppableContainers:o}=t,a=Ti(r,r.left,r.top),s=[];for(let i of o){let{id:c}=i,d=n.get(c);if(d){let u=_i(Ti(d),a);s.push({id:c,data:{droppableContainer:i,value:u}})}}return s.sort(zi)},Ji=(t)=>{let{collisionRect:r,droppableRects:n,droppableContainers:o}=t,a=Pi(r),s=[];for(let i of o){let{id:c}=i,d=n.get(c);if(d){let u=Pi(d),p=a.reduce((f,b,g)=>f+_i(u[g],b),0),m=Number((p/4).toFixed(4));s.push({id:c,data:{droppableContainer:i,value:m}})}}return s.sort(zi)};function hp(t,r){let n=Math.max(r.top,t.top),o=Math.max(r.left,t.left),a=Math.min(r.left+r.width,t.left+t.width),s=Math.min(r.top+r.height,t.top+t.height),i=a-o,c=s-n;if(o<a&&n<s){let d=r.width*r.height,u=t.width*t.height,p=i*c,m=p/(d+u-p);return Number(m.toFixed(4))}return 0}var xp=(t)=>{let{collisionRect:r,droppableRects:n,droppableContainers:o}=t,a=[];for(let s of o){let{id:i}=s,c=n.get(i);if(c){let d=hp(c,r);if(d>0)a.push({id:i,data:{droppableContainer:s,value:d}})}}return a.sort(vp)};function yp(t,r,n){return{...t,scaleX:r&&n?r.width/n.width:1,scaleY:r&&n?r.height/n.height:1}}function ji(t,r){return t&&r?{x:t.left-r.left,y:t.top-r.top}:je}function wp(t){return function(n){for(var o=arguments.length,a=Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];return a.reduce((i,c)=>({...i,top:i.top+t*c.y,bottom:i.bottom+t*c.y,left:i.left+t*c.x,right:i.right+t*c.x}),{...n})}}var Np=wp(1);function Rp(t){if(t.startsWith("matrix3d(")){let r=t.slice(9,-1).split(/, /);return{x:+r[12],y:+r[13],scaleX:+r[0],scaleY:+r[5]}}else if(t.startsWith("matrix(")){let r=t.slice(7,-1).split(/, /);return{x:+r[4],y:+r[5],scaleX:+r[0],scaleY:+r[3]}}return null}function Cp(t,r,n){let o=Rp(r);if(!o)return t;let{scaleX:a,scaleY:s,x:i,y:c}=o,d=t.left-i-(1-a)*parseFloat(n),u=t.top-c-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),p=a?t.width/a:t.width,m=s?t.height/s:t.height;return{width:p,height:m,top:u,right:d+p,bottom:u+m,left:d}}var Sp={ignoreTransform:!1};function Wt(t,r){if(r===void 0)r=Sp;let n=t.getBoundingClientRect();if(r.ignoreTransform){let{transform:u,transformOrigin:p}=xe(t).getComputedStyle(t);if(u)n=Cp(n,u,p)}let{top:o,left:a,width:s,height:i,bottom:c,right:d}=n;return{top:o,left:a,width:s,height:i,bottom:c,right:d}}function ki(t){return Wt(t,{ignoreTransform:!0})}function Pp(t){let{innerWidth:r,innerHeight:n}=t;return{top:0,left:0,right:r,bottom:n,width:r,height:n}}function Tp(t,r){if(r===void 0)r=xe(t).getComputedStyle(t);return r.position==="fixed"}function kp(t,r){if(r===void 0)r=xe(t).getComputedStyle(t);let n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((a)=>{let s=r[a];return typeof s==="string"?n.test(s):!1})}function Kr(t,r){let n=[];function o(a){if(r!=null&&n.length>=r)return n;if(!a)return n;if(Ln(a)&&a.scrollingElement!=null&&!n.includes(a.scrollingElement))return n.push(a.scrollingElement),n;if(!Nr(a)||Uo(a))return n;if(n.includes(a))return n;let s=xe(t).getComputedStyle(a);if(a!==t){if(kp(a,s))n.push(a)}if(Tp(a,s))return n;return o(a.parentNode)}if(!t)return n;return o(t)}function Gi(t){let[r]=Kr(t,1);return r!=null?r:null}function Ko(t){if(!Jr||!t)return null;if(Ot(t))return t;if(!kn(t))return null;if(Ln(t)||t===_t(t).scrollingElement)return window;if(Nr(t))return t;return null}function Wi(t){if(Ot(t))return t.scrollX;return t.scrollLeft}function Xi(t){if(Ot(t))return t.scrollY;return t.scrollTop}function ea(t){return{x:Wi(t),y:Xi(t)}}var le;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(le||(le={}));function Ui(t){if(!Jr||!t)return!1;return t===document.scrollingElement}function Ki(t){let r={x:0,y:0},n=Ui(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},o={x:t.scrollWidth-n.width,y:t.scrollHeight-n.height},a=t.scrollTop<=r.y,s=t.scrollLeft<=r.x,i=t.scrollTop>=o.y,c=t.scrollLeft>=o.x;return{isTop:a,isLeft:s,isBottom:i,isRight:c,maxScroll:o,minScroll:r}}var Lp={x:0.2,y:0.2};function Dp(t,r,n,o,a){let{top:s,left:i,right:c,bottom:d}=n;if(o===void 0)o=10;if(a===void 0)a=Lp;let{isTop:u,isBottom:p,isLeft:m,isRight:f}=Ki(t),b={x:0,y:0},g={x:0,y:0},h={height:r.height*a.y,width:r.width*a.x};if(!u&&s<=r.top+h.height)b.y=le.Backward,g.y=o*Math.abs((r.top+h.height-s)/h.height);else if(!p&&d>=r.bottom-h.height)b.y=le.Forward,g.y=o*Math.abs((r.bottom-h.height-d)/h.height);if(!f&&c>=r.right-h.width)b.x=le.Forward,g.x=o*Math.abs((r.right-h.width-c)/h.width);else if(!m&&i<=r.left+h.width)b.x=le.Backward,g.x=o*Math.abs((r.left+h.width-i)/h.width);return{direction:b,speed:g}}function Ep(t){if(t===document.scrollingElement){let{innerWidth:s,innerHeight:i}=window;return{top:0,left:0,right:s,bottom:i,width:s,height:i}}let{top:r,left:n,right:o,bottom:a}=t.getBoundingClientRect();return{top:r,left:n,right:o,bottom:a,width:t.clientWidth,height:t.clientHeight}}function Yi(t){return t.reduce((r,n)=>jt(r,ea(n)),je)}function Mp(t){return t.reduce((r,n)=>r+Wi(n),0)}function Ip(t){return t.reduce((r,n)=>r+Xi(n),0)}function Ap(t,r){if(r===void 0)r=Wt;if(!t)return;let{top:n,left:o,bottom:a,right:s}=r(t);if(!Gi(t))return;if(a<=0||s<=0||n>=window.innerHeight||o>=window.innerWidth)t.scrollIntoView({block:"center",inline:"center"})}var Op=[["x",["left","right"],Mp],["y",["top","bottom"],Ip]];class Vn{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=Kr(r),o=Yi(n);this.rect={...t},this.width=t.width,this.height=t.height;for(let[a,s,i]of Op)for(let c of s)Object.defineProperty(this,c,{get:()=>{let d=i(n),u=o[a]-d;return this.rect[c]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Sr{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((r)=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var o;(o=this.target)==null||o.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function Hp(t){let{EventTarget:r}=xe(t);return t instanceof r?t:_t(t)}function Yo(t,r){let n=Math.abs(t.x),o=Math.abs(t.y);if(typeof r==="number")return Math.sqrt(n**2+o**2)>r;if("x"in r&&"y"in r)return n>r.x&&o>r.y;if("x"in r)return n>r.x;if("y"in r)return o>r.y;return!1}var Fe;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(Fe||(Fe={}));function Li(t){t.preventDefault()}function Vp(t){t.stopPropagation()}var V;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(V||(V={}));var qi={start:[V.Space,V.Enter],cancel:[V.Esc],end:[V.Space,V.Enter,V.Tab]},Bp=(t,r)=>{let{currentCoordinates:n}=r;switch(t.code){case V.Right:return{...n,x:n.x+25};case V.Left:return{...n,x:n.x-25};case V.Down:return{...n,y:n.y+25};case V.Up:return{...n,y:n.y-25}}return};class Yr{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;let{event:{target:r}}=t;this.props=t,this.listeners=new Sr(_t(r)),this.windowListeners=new Sr(xe(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Fe.Resize,this.handleCancel),this.windowListeners.add(Fe.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Fe.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:t,onStart:r}=this.props,n=t.node.current;if(n)Ap(n);r(je)}handleKeyDown(t){if(Gr(t)){let{active:r,context:n,options:o}=this.props,{keyboardCodes:a=qi,coordinateGetter:s=Bp,scrollBehavior:i="smooth"}=o,{code:c}=t;if(a.end.includes(c)){this.handleEnd(t);return}if(a.cancel.includes(c)){this.handleCancel(t);return}let{collisionRect:d}=n.current,u=d?{x:d.left,y:d.top}:je;if(!this.referenceCoordinates)this.referenceCoordinates=u;let p=s(t,{active:r,context:n.current,currentCoordinates:u});if(p){let m=Gt(p,u),f={x:0,y:0},{scrollableAncestors:b}=n.current;for(let g of b){let h=t.code,{isTop:T,isRight:R,isLeft:y,isBottom:w,maxScroll:C,minScroll:D}=Ki(g),N=Ep(g),P={x:Math.min(h===V.Right?N.right-N.width/2:N.right,Math.max(h===V.Right?N.left:N.left+N.width/2,p.x)),y:Math.min(h===V.Down?N.bottom-N.height/2:N.bottom,Math.max(h===V.Down?N.top:N.top+N.height/2,p.y))},L=h===V.Right&&!R||h===V.Left&&!y,F=h===V.Down&&!w||h===V.Up&&!T;if(L&&P.x!==p.x){let A=g.scrollLeft+m.x,j=h===V.Right&&A<=C.x||h===V.Left&&A>=D.x;if(j&&!m.y){g.scrollTo({left:A,behavior:i});return}if(j)f.x=g.scrollLeft-A;else f.x=h===V.Right?g.scrollLeft-C.x:g.scrollLeft-D.x;if(f.x)g.scrollBy({left:-f.x,behavior:i});break}else if(F&&P.y!==p.y){let A=g.scrollTop+m.y,j=h===V.Down&&A<=C.y||h===V.Up&&A>=D.y;if(j&&!m.x){g.scrollTo({top:A,behavior:i});return}if(j)f.y=g.scrollTop-A;else f.y=h===V.Down?g.scrollTop-C.y:g.scrollTop-D.y;if(f.y)g.scrollBy({top:-f.y,behavior:i});break}}this.handleMove(t,jt(Gt(p,this.referenceCoordinates),f))}}}handleMove(t,r){let{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){let{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){let{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Yr.activators=[{eventName:"onKeyDown",handler:(t,r,n)=>{let{keyboardCodes:o=qi,onActivation:a}=r,{active:s}=n,{code:i}=t.nativeEvent;if(o.start.includes(i)){let c=s.activatorNode.current;if(c&&t.target!==c)return!1;return t.preventDefault(),a==null||a({event:t.nativeEvent}),!0}return!1}}];function Di(t){return Boolean(t&&"distance"in t)}function Ei(t){return Boolean(t&&"delay"in t)}class Bn{constructor(t,r,n){var o;if(n===void 0)n=Hp(t.event.target);this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;let{event:a}=t,{target:s}=a;this.props=t,this.events=r,this.document=_t(s),this.documentListeners=new Sr(this.document),this.listeners=new Sr(n),this.windowListeners=new Sr(xe(s)),this.initialCoordinates=(o=Mn(a))!=null?o:je,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel)this.listeners.add(t.cancel.name,this.handleCancel);if(this.windowListeners.add(Fe.Resize,this.handleCancel),this.windowListeners.add(Fe.DragStart,Li),this.windowListeners.add(Fe.VisibilityChange,this.handleCancel),this.windowListeners.add(Fe.ContextMenu,Li),this.documentListeners.add(Fe.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ei(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(Di(r)){this.handlePending(r);return}}this.handleStart()}detach(){if(this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null)clearTimeout(this.timeoutId),this.timeoutId=null}handlePending(t,r){let{active:n,onPending:o}=this.props;o(n,t,this.initialCoordinates,r)}handleStart(){let{initialCoordinates:t}=this,{onStart:r}=this.props;if(t)this.activated=!0,this.documentListeners.add(Fe.Click,Vp,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Fe.SelectionChange,this.removeTextSelection),r(t)}handleMove(t){var r;let{activated:n,initialCoordinates:o,props:a}=this,{onMove:s,options:{activationConstraint:i}}=a;if(!o)return;let c=(r=Mn(t))!=null?r:je,d=Gt(o,c);if(!n&&i){if(Di(i)){if(i.tolerance!=null&&Yo(d,i.tolerance))return this.handleCancel();if(Yo(d,i.distance))return this.handleStart()}if(Ei(i)){if(Yo(d,i.tolerance))return this.handleCancel()}this.handlePending(i,d);return}if(t.cancelable)t.preventDefault();s(c)}handleEnd(){let{onAbort:t,onEnd:r}=this.props;if(this.detach(),!this.activated)t(this.props.active);r()}handleCancel(){let{onAbort:t,onCancel:r}=this.props;if(this.detach(),!this.activated)t(this.props.active);r()}handleKeydown(t){if(t.code===V.Esc)this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}var Fp={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class qr extends Bn{constructor(t){let{event:r}=t,n=_t(r.target);super(t,Fp,n)}}qr.activators=[{eventName:"onPointerDown",handler:(t,r)=>{let{nativeEvent:n}=t,{onActivation:o}=r;if(!n.isPrimary||n.button!==0)return!1;return o==null||o({event:n}),!0}}];var _p={move:{name:"mousemove"},end:{name:"mouseup"}},ta;(function(t){t[t.RightClick=2]="RightClick"})(ta||(ta={}));class Zi extends Bn{constructor(t){super(t,_p,_t(t.event.target))}}Zi.activators=[{eventName:"onMouseDown",handler:(t,r)=>{let{nativeEvent:n}=t,{onActivation:o}=r;if(n.button===ta.RightClick)return!1;return o==null||o({event:n}),!0}}];var qo={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Qi extends Bn{constructor(t){super(t,qo)}static setup(){return window.addEventListener(qo.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(qo.move.name,t)};function t(){}}}Qi.activators=[{eventName:"onTouchStart",handler:(t,r)=>{let{nativeEvent:n}=t,{onActivation:o}=r,{touches:a}=n;if(a.length>1)return!1;return o==null||o({event:n}),!0}}];var Wr;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(Wr||(Wr={}));var Hn;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(Hn||(Hn={}));function zp(t){let{acceleration:r,activator:n=Wr.Pointer,canScroll:o,draggingRect:a,enabled:s,interval:i=5,order:c=Hn.TreeOrder,pointerCoordinates:d,scrollableAncestors:u,scrollableAncestorRects:p,delta:m,threshold:f}=t,b=Jp({delta:m,disabled:!s}),[g,h]=xi(),T=fe({x:0,y:0}),R=fe({x:0,y:0}),y=ne(()=>{switch(n){case Wr.Pointer:return d?{top:d.y,bottom:d.y,left:d.x,right:d.x}:null;case Wr.DraggableRect:return a}},[n,a,d]),w=fe(null),C=Je(()=>{let N=w.current;if(!N)return;let P=T.current.x*R.current.x,L=T.current.y*R.current.y;N.scrollBy(P,L)},[]),D=ne(()=>c===Hn.TreeOrder?[...u].reverse():u,[c,u]);ee(()=>{if(!s||!u.length||!y){h();return}for(let N of D){if((o==null?void 0:o(N))===!1)continue;let P=u.indexOf(N),L=p[P];if(!L)continue;let{direction:F,speed:A}=Dp(N,L,y,r,f);for(let j of["x","y"])if(!b[j][F[j]])A[j]=0,F[j]=0;if(A.x>0||A.y>0){h(),w.current=N,g(C,i),T.current=A,R.current=F;return}}T.current={x:0,y:0},R.current={x:0,y:0},h()},[r,C,o,h,s,i,JSON.stringify(y),JSON.stringify(b),g,u,D,p,JSON.stringify(f)])}var $p={x:{[le.Backward]:!1,[le.Forward]:!1},y:{[le.Backward]:!1,[le.Forward]:!1}};function Jp(t){let{delta:r,disabled:n}=t,o=En(r);return Cr((a)=>{if(n||!o||!a)return $p;let s={x:Math.sign(r.x-o.x),y:Math.sign(r.y-o.y)};return{x:{[le.Backward]:a.x[le.Backward]||s.x===-1,[le.Forward]:a.x[le.Forward]||s.x===1},y:{[le.Backward]:a.y[le.Backward]||s.y===-1,[le.Forward]:a.y[le.Forward]||s.y===1}}},[n,r,o])}function jp(t,r){let n=r!=null?t.get(r):void 0,o=n?n.node.current:null;return Cr((a)=>{var s;if(r==null)return null;return(s=o!=null?o:a)!=null?s:null},[o,r])}function Gp(t,r){return ne(()=>t.reduce((n,o)=>{let{sensor:a}=o,s=a.activators.map((i)=>({eventName:i.eventName,handler:r(i.handler,o)}));return[...n,...s]},[]),[t,r])}var Xr;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(Xr||(Xr={}));var ra;(function(t){t.Optimized="optimized"})(ra||(ra={}));var Mi=new Map;function Wp(t,r){let{dragging:n,dependencies:o,config:a}=r,[s,i]=$e(null),{frequency:c,measure:d,strategy:u}=a,p=fe(t),m=T(),f=Rr(m),b=Je(function(R){if(R===void 0)R=[];if(f.current)return;i((y)=>{if(y===null)return R;return y.concat(R.filter((w)=>!y.includes(w)))})},[f]),g=fe(null),h=Cr((R)=>{if(m&&!n)return Mi;if(!R||R===Mi||p.current!==t||s!=null){let y=new Map;for(let w of t){if(!w)continue;if(s&&s.length>0&&!s.includes(w.id)&&w.rect.current){y.set(w.id,w.rect.current);continue}let C=w.node.current,D=C?new Vn(d(C),C):null;if(w.rect.current=D,D)y.set(w.id,D)}return y}return R},[t,s,n,m,d]);return ee(()=>{p.current=t},[t]),ee(()=>{if(m)return;b()},[n,m]),ee(()=>{if(s&&s.length>0)i(null)},[JSON.stringify(s)]),ee(()=>{if(m||typeof c!=="number"||g.current!==null)return;g.current=setTimeout(()=>{b(),g.current=null},c)},[c,m,b,...o]),{droppableRects:h,measureDroppableContainers:b,measuringScheduled:s!=null};function T(){switch(u){case Xr.Always:return!1;case Xr.BeforeDragging:return n;default:return!n}}}function el(t,r){return Cr((n)=>{if(!t)return null;if(n)return n;return typeof r==="function"?r(t):t},[r,t])}function Xp(t,r){return el(t,r)}function Up(t){let{callback:r,disabled:n}=t,o=Dn(r),a=ne(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;let{MutationObserver:s}=window;return new s(o)},[o,n]);return ee(()=>()=>a==null?void 0:a.disconnect(),[a]),a}function Fn(t){let{callback:r,disabled:n}=t,o=Dn(r),a=ne(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;let{ResizeObserver:s}=window;return new s(o)},[n]);return ee(()=>()=>a==null?void 0:a.disconnect(),[a]),a}function Kp(t){return new Vn(Wt(t),t)}function Ii(t,r,n){if(r===void 0)r=Kp;let[o,a]=$e(null);function s(){a((d)=>{if(!t)return null;if(t.isConnected===!1){var u;return(u=d!=null?d:n)!=null?u:null}let p=r(t);if(JSON.stringify(d)===JSON.stringify(p))return d;return p})}let i=Up({callback(d){if(!t)return;for(let u of d){let{type:p,target:m}=u;if(p==="childList"&&m instanceof HTMLElement&&m.contains(t)){s();break}}}}),c=Fn({callback:s});return He(()=>{if(s(),t)c==null||c.observe(t),i==null||i.observe(document.body,{childList:!0,subtree:!0});else c==null||c.disconnect(),i==null||i.disconnect()},[t]),o}function Yp(t){let r=el(t);return ji(t,r)}var Ai=[];function qp(t){let r=fe(t),n=Cr((o)=>{if(!t)return Ai;if(o&&o!==Ai&&t&&r.current&&t.parentNode===r.current.parentNode)return o;return Kr(t)},[t]);return ee(()=>{r.current=t},[t]),n}function Zp(t){let[r,n]=$e(null),o=fe(t),a=Je((s)=>{let i=Ko(s.target);if(!i)return;n((c)=>{if(!c)return null;return c.set(i,ea(i)),new Map(c)})},[]);return ee(()=>{let s=o.current;if(t!==s){i(s);let c=t.map((d)=>{let u=Ko(d);if(u)return u.addEventListener("scroll",a,{passive:!0}),[u,ea(u)];return null}).filter((d)=>d!=null);n(c.length?new Map(c):null),o.current=t}return()=>{i(t),i(s)};function i(c){c.forEach((d)=>{let u=Ko(d);u==null||u.removeEventListener("scroll",a)})}},[a,t]),ne(()=>{if(t.length)return r?Array.from(r.values()).reduce((s,i)=>jt(s,i),je):Yi(t);return je},[t,r])}function Oi(t,r){if(r===void 0)r=[];let n=fe(null);return ee(()=>{n.current=null},r),ee(()=>{let o=t!==je;if(o&&!n.current)n.current=t;if(!o&&n.current)n.current=null},[t]),n.current?Gt(t,n.current):je}function Qp(t){ee(()=>{if(!Jr)return;let r=t.map((n)=>{let{sensor:o}=n;return o.setup==null?void 0:o.setup()});return()=>{for(let n of r)n==null||n()}},t.map((r)=>{let{sensor:n}=r;return n}))}function em(t,r){return ne(()=>t.reduce((n,o)=>{let{eventName:a,handler:s}=o;return n[a]=(i)=>{s(i,r)},n},{}),[t,r])}function tl(t){return ne(()=>t?Pp(t):null,[t])}var Hi=[];function tm(t,r){if(r===void 0)r=Wt;let[n]=t,o=tl(n?xe(n):null),[a,s]=$e(Hi);function i(){s(()=>{if(!t.length)return Hi;return t.map((d)=>Ui(d)?o:new Vn(r(d),d))})}let c=Fn({callback:i});return He(()=>{c==null||c.disconnect(),i(),t.forEach((d)=>c==null?void 0:c.observe(d))},[t]),a}function rm(t){if(!t)return null;if(t.children.length>1)return t;let r=t.children[0];return Nr(r)?r:t}function nm(t){let{measure:r}=t,[n,o]=$e(null),a=Je((u)=>{for(let{target:p}of u)if(Nr(p)){o((m)=>{let f=r(p);return m?{...m,width:f.width,height:f.height}:f});break}},[r]),s=Fn({callback:a}),i=Je((u)=>{let p=rm(u);if(s==null||s.disconnect(),p)s==null||s.observe(p);o(p?r(p):null)},[r,s]),[c,d]=jr(i);return ne(()=>({nodeRef:c,rect:n,setRef:d}),[n,c,d])}var om=[{sensor:qr,options:{}},{sensor:Yr,options:{}}],am={current:{}},An={draggable:{measure:ki},droppable:{measure:ki,strategy:Xr.WhileDragging,frequency:ra.Optimized},dragOverlay:{measure:Wt}};class Pr extends Map{get(t){var r;return t!=null?(r=super.get(t))!=null?r:void 0:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((t)=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}var sm={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Pr,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:On},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:An,measureDroppableContainers:On,windowRect:null,measuringScheduled:!1},im={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:On,draggableNodes:new Map,over:null,measureDroppableContainers:On},_n=Ur(im),rl=Ur(sm);function lm(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Pr}}}function cm(t,r){switch(r.type){case re.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:r.initialCoordinates,active:r.active}};case re.DragMove:if(t.draggable.active==null)return t;return{...t,draggable:{...t.draggable,translate:{x:r.coordinates.x-t.draggable.initialCoordinates.x,y:r.coordinates.y-t.draggable.initialCoordinates.y}}};case re.DragEnd:case re.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case re.RegisterDroppable:{let{element:n}=r,{id:o}=n,a=new Pr(t.droppable.containers);return a.set(o,n),{...t,droppable:{...t.droppable,containers:a}}}case re.SetDroppableDisabled:{let{id:n,key:o,disabled:a}=r,s=t.droppable.containers.get(n);if(!s||o!==s.key)return t;let i=new Pr(t.droppable.containers);return i.set(n,{...s,disabled:a}),{...t,droppable:{...t.droppable,containers:i}}}case re.UnregisterDroppable:{let{id:n,key:o}=r,a=t.droppable.containers.get(n);if(!a||o!==a.key)return t;let s=new Pr(t.droppable.containers);return s.delete(n),{...t,droppable:{...t.droppable,containers:s}}}default:return t}}function dm(t){let{disabled:r}=t,{active:n,activatorEvent:o,draggableNodes:a}=Tr(_n),s=En(o),i=En(n==null?void 0:n.id);return ee(()=>{if(r)return;if(!o&&s&&i!=null){if(!Gr(s))return;if(document.activeElement===s.target)return;let c=a.get(i);if(!c)return;let{activatorNode:d,node:u}=c;if(!d.current&&!u.current)return;requestAnimationFrame(()=>{for(let p of[d.current,u.current]){if(!p)continue;let m=wi(p);if(m){m.focus();break}}})}},[o,r,a,i,s]),null}function um(t,r){let{transform:n,...o}=r;return t!=null&&t.length?t.reduce((a,s)=>s({transform:a,...o}),n):n}function pm(t){return ne(()=>({draggable:{...An.draggable,...t==null?void 0:t.draggable},droppable:{...An.droppable,...t==null?void 0:t.droppable},dragOverlay:{...An.dragOverlay,...t==null?void 0:t.dragOverlay}}),[t==null?void 0:t.draggable,t==null?void 0:t.droppable,t==null?void 0:t.dragOverlay])}function mm(t){let{activeNode:r,measure:n,initialRect:o,config:a=!0}=t,s=fe(!1),{x:i,y:c}=typeof a==="boolean"?{x:a,y:a}:a;He(()=>{if(!i&&!c||!r){s.current=!1;return}if(s.current||!o)return;let u=r==null?void 0:r.node.current;if(!u||u.isConnected===!1)return;let p=n(u),m=ji(p,o);if(!i)m.x=0;if(!c)m.y=0;if(s.current=!0,Math.abs(m.x)>0||Math.abs(m.y)>0){let f=Gi(u);if(f)f.scrollBy({top:m.y,left:m.x})}},[r,i,c,o,n])}var nl=Ur({...je,scaleX:1,scaleY:1}),Dt;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(Dt||(Dt={}));var ol=cp(function(r){var n,o,a,s;let{id:i,accessibility:c,autoScroll:d=!0,children:u,sensors:p=om,collisionDetection:m=xp,measuring:f,modifiers:b,...g}=r,h=dp(cm,void 0,lm),[T,R]=h,[y,w]=mp(),[C,D]=$e(Dt.Uninitialized),N=C===Dt.Initialized,{draggable:{active:P,nodes:L,translate:F},droppable:{containers:A}}=T,j=P!=null?L.get(P):null,te=fe({initial:null,translated:null}),q=ne(()=>{var be;return P!=null?{id:P,data:(be=j==null?void 0:j.data)!=null?be:am,rect:te}:null},[P,j]),oe=fe(null),[ge,ve]=$e(null),[U,Re]=$e(null),Z=Rr(g,Object.values(g)),he=$t("DndDescribedBy",i),H=ne(()=>A.getEnabled(),[A]),J=pm(f),{droppableRects:_,measureDroppableContainers:ae,measuringScheduled:Ce}=Wp(H,{dragging:N,dependencies:[F.x,F.y],config:J.droppable}),se=jp(L,P),pt=ne(()=>U?Mn(U):null,[U]),O=lc(),Se=Xp(se,J.draggable.measure);mm({activeNode:P!=null?L.get(P):null,config:O.layoutShiftCompensation,initialRect:Se,measure:J.draggable.measure});let W=Ii(se,J.draggable.measure,Se),Mr=Ii(se?se.parentElement:null),Xe=fe({activatorEvent:null,active:null,activeNode:se,collisionRect:null,collisions:null,droppableRects:_,draggableNodes:L,draggingNode:null,draggingNodeRect:null,droppableContainers:A,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),qt=A.getNodeFor((n=Xe.current.over)==null?void 0:n.id),et=nm({measure:J.dragOverlay.measure}),er=(o=et.nodeRef.current)!=null?o:se,tr=N?(a=et.rect)!=null?a:W:null,va=Boolean(et.nodeRef.current&&et.rect),ha=Yp(va?null:W),so=tl(er?xe(er):null),mt=qp(N?qt!=null?qt:se:null),an=tm(mt),sn=um(b,{transform:{x:F.x-ha.x,y:F.y-ha.y,scaleX:1,scaleY:1},activatorEvent:U,active:q,activeNodeRect:W,containerNodeRect:Mr,draggingNodeRect:tr,over:Xe.current.over,overlayNodeRect:et.rect,scrollableAncestors:mt,scrollableAncestorRects:an,windowRect:so}),xa=pt?jt(pt,F):null,ya=Zp(mt),tc=Oi(ya),rc=Oi(ya,[W]),nr=jt(sn,tc),or=tr?Np(tr,sn):null,Ir=q&&or?m({active:q,collisionRect:or,droppableRects:_,droppableContainers:H,pointerCoordinates:xa}):null,wa=oa(Ir,"id"),[ft,Na]=$e(null),nc=va?sn:jt(sn,rc),oc=yp(nc,(s=ft==null?void 0:ft.rect)!=null?s:null,W),io=fe(null),Ra=Je((be,Pe)=>{let{sensor:Te,options:gt}=Pe;if(oe.current==null)return;let Me=L.get(oe.current);if(!Me)return;let Le=be.nativeEvent,Ue=new Te({active:oe.current,activeNode:Me,event:Le,options:gt,context:Xe,onAbort(pe){if(!L.get(pe))return;let{onDragAbort:Ke}=Z.current,tt={id:pe};Ke==null||Ke(tt),y({type:"onDragAbort",event:tt})},onPending(pe,bt,Ke,tt){if(!L.get(pe))return;let{onDragPending:Hr}=Z.current,ht={id:pe,constraint:bt,initialCoordinates:Ke,offset:tt};Hr==null||Hr(ht),y({type:"onDragPending",event:ht})},onStart(pe){let bt=oe.current;if(bt==null)return;let Ke=L.get(bt);if(!Ke)return;let{onDragStart:tt}=Z.current,Or={activatorEvent:Le,active:{id:bt,data:Ke.data,rect:te}};In(()=>{tt==null||tt(Or),D(Dt.Initializing),R({type:re.DragStart,initialCoordinates:pe,active:bt}),y({type:"onDragStart",event:Or}),ve(io.current),Re(Le)})},onMove(pe){R({type:re.DragMove,coordinates:pe})},onEnd:ar(re.DragEnd),onCancel:ar(re.DragCancel)});io.current=Ue;function ar(pe){return async function(){let{active:Ke,collisions:tt,over:Or,scrollAdjustedTranslate:Hr}=Xe.current,ht=null;if(Ke&&Hr){let{cancelDrop:Vr}=Z.current;if(ht={activatorEvent:Le,active:Ke,collisions:tt,delta:Hr,over:Or},pe===re.DragEnd&&typeof Vr==="function"){if(await Promise.resolve(Vr(ht)))pe=re.DragCancel}}oe.current=null,In(()=>{R({type:pe}),D(Dt.Uninitialized),Na(null),ve(null),Re(null),io.current=null;let Vr=pe===re.DragEnd?"onDragEnd":"onDragCancel";if(ht){let lo=Z.current[Vr];lo==null||lo(ht),y({type:Vr,event:ht})}})}}},[L]),ac=Je((be,Pe)=>(Te,gt)=>{let Me=Te.nativeEvent,Le=L.get(gt);if(oe.current!==null||!Le||Me.dndKit||Me.defaultPrevented)return;let Ue={active:Le};if(be(Te,Pe.options,Ue)===!0)Me.dndKit={capturedBy:Pe.sensor},oe.current=gt,Ra(Te,Pe)},[L,Ra]),Ca=Gp(p,ac);Qp(p),He(()=>{if(W&&C===Dt.Initializing)D(Dt.Initialized)},[W,C]),ee(()=>{let{onDragMove:be}=Z.current,{active:Pe,activatorEvent:Te,collisions:gt,over:Me}=Xe.current;if(!Pe||!Te)return;let Le={active:Pe,activatorEvent:Te,collisions:gt,delta:{x:nr.x,y:nr.y},over:Me};In(()=>{be==null||be(Le),y({type:"onDragMove",event:Le})})},[nr.x,nr.y]),ee(()=>{let{active:be,activatorEvent:Pe,collisions:Te,droppableContainers:gt,scrollAdjustedTranslate:Me}=Xe.current;if(!be||oe.current==null||!Pe||!Me)return;let{onDragOver:Le}=Z.current,Ue=gt.get(wa),ar=Ue&&Ue.rect.current?{id:Ue.id,rect:Ue.rect.current,data:Ue.data,disabled:Ue.disabled}:null,pe={active:be,activatorEvent:Pe,collisions:Te,delta:{x:Me.x,y:Me.y},over:ar};In(()=>{Na(ar),Le==null||Le(pe),y({type:"onDragOver",event:pe})})},[wa]),He(()=>{Xe.current={activatorEvent:U,active:q,activeNode:se,collisionRect:or,collisions:Ir,droppableRects:_,draggableNodes:L,draggingNode:er,draggingNodeRect:tr,droppableContainers:A,over:ft,scrollableAncestors:mt,scrollAdjustedTranslate:nr},te.current={initial:tr,translated:or}},[q,se,Ir,or,L,er,tr,_,A,ft,mt,nr]),zp({...O,delta:F,draggingRect:or,pointerCoordinates:xa,scrollableAncestors:mt,scrollableAncestorRects:an});let sc=ne(()=>({active:q,activeNode:se,activeNodeRect:W,activatorEvent:U,collisions:Ir,containerNodeRect:Mr,dragOverlay:et,draggableNodes:L,droppableContainers:A,droppableRects:_,over:ft,measureDroppableContainers:ae,scrollableAncestors:mt,scrollableAncestorRects:an,measuringConfiguration:J,measuringScheduled:Ce,windowRect:so}),[q,se,W,U,Ir,Mr,et,L,A,_,ft,ae,mt,an,J,Ce,so]),ic=ne(()=>({activatorEvent:U,activators:Ca,active:q,activeNodeRect:W,ariaDescribedById:{draggable:he},dispatch:R,draggableNodes:L,over:ft,measureDroppableContainers:ae}),[U,Ca,q,W,R,he,L,ft,ae]);return qe.createElement(Bi.Provider,{value:w},qe.createElement(_n.Provider,{value:ic},qe.createElement(rl.Provider,{value:sc},qe.createElement(nl.Provider,{value:oc},u)),qe.createElement(dm,{disabled:(c==null?void 0:c.restoreFocus)===!1})),qe.createElement(bp,{...c,hiddenTextDescribedById:he}));function lc(){let be=(ge==null?void 0:ge.autoScrollEnabled)===!1,Pe=typeof d==="object"?d.enabled===!1:d===!1,Te=N&&!be&&!Pe;if(typeof d==="object")return{...d,enabled:Te};return{enabled:Te}}}),fm=Ur(null),Vi="button",gm="Draggable";function al(t){let{id:r,data:n,disabled:o=!1,attributes:a}=t,s=$t(gm),{activators:i,activatorEvent:c,active:d,activeNodeRect:u,ariaDescribedById:p,draggableNodes:m,over:f}=Tr(_n),{role:b=Vi,roleDescription:g="draggable",tabIndex:h=0}=a!=null?a:{},T=(d==null?void 0:d.id)===r,R=Tr(T?nl:fm),[y,w]=jr(),[C,D]=jr(),N=em(i,r),P=Rr(n);He(()=>(m.set(r,{id:r,key:s,node:y,activatorNode:C,data:P}),()=>{let F=m.get(r);if(F&&F.key===s)m.delete(r)}),[m,r]);let L=ne(()=>({role:b,tabIndex:h,"aria-disabled":o,"aria-pressed":T&&b===Vi?!0:void 0,"aria-roledescription":g,"aria-describedby":p.draggable}),[o,b,h,T,g,p.draggable]);return{active:d,activatorEvent:c,activeNodeRect:u,attributes:L,isDragging:T,listeners:o?void 0:N,node:y,over:f,setNodeRef:w,setActivatorNodeRef:D,transform:R}}function sl(){return Tr(rl)}var bm="Droppable",vm={timeout:25};function il(t){let{data:r,disabled:n=!1,id:o,resizeObserverConfig:a}=t,s=$t(bm),{active:i,dispatch:c,over:d,measureDroppableContainers:u}=Tr(_n),p=fe({disabled:n}),m=fe(!1),f=fe(null),b=fe(null),{disabled:g,updateMeasurementsFor:h,timeout:T}={...vm,...a},R=Rr(h!=null?h:o),y=Je(()=>{if(!m.current){m.current=!0;return}if(b.current!=null)clearTimeout(b.current);b.current=setTimeout(()=>{u(Array.isArray(R.current)?R.current:[R.current]),b.current=null},T)},[T]),w=Fn({callback:y,disabled:g||!i}),C=Je((L,F)=>{if(!w)return;if(F)w.unobserve(F),m.current=!1;if(L)w.observe(L)},[w]),[D,N]=jr(C),P=Rr(r);return ee(()=>{if(!w||!D.current)return;w.disconnect(),m.current=!1,w.observe(D.current)},[D,w]),ee(()=>(c({type:re.RegisterDroppable,element:{id:o,key:s,disabled:n,node:D,rect:f,data:P}}),()=>c({type:re.UnregisterDroppable,key:s,id:o})),[o]),ee(()=>{if(n!==p.current.disabled)c({type:re.SetDroppableDisabled,id:o,key:s,disabled:n}),p.current.disabled=n},[o,s,n,c]),{active:i,rect:f,isOver:(d==null?void 0:d.id)===o,node:D,over:d,setNodeRef:N}}import ll,{useMemo as Gn,useRef as aa,useEffect as Wn,useState as hm,useContext as xm}from"react";function Un(t,r,n){let o=t.slice();return o.splice(n<0?o.length+n:n,0,o.splice(r,1)[0]),o}function ym(t,r){return t.reduce((n,o,a)=>{let s=r.get(o);if(s)n[a]=s;return n},Array(t.length))}function zn(t){return t!==null&&t>=0}function wm(t,r){if(t===r)return!0;if(t.length!==r.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==r[n])return!1;return!0}function Nm(t){if(typeof t==="boolean")return{draggable:t,droppable:t};return t}var cl=(t)=>{let{rects:r,activeIndex:n,overIndex:o,index:a}=t,s=Un(r,o,n),i=r[a],c=s[a];if(!c||!i)return null;return{x:c.left-i.left,y:c.top-i.top,scaleX:c.width/i.width,scaleY:c.height/i.height}};var Jn={scaleX:1,scaleY:1},dl=(t)=>{var r;let{activeIndex:n,activeNodeRect:o,index:a,rects:s,overIndex:i}=t,c=(r=s[n])!=null?r:o;if(!c)return null;if(a===n){let u=s[i];if(!u)return null;return{x:0,y:n<i?u.top+u.height-(c.top+c.height):u.top-c.top,...Jn}}let d=Rm(s,a,n);if(a>n&&a<=i)return{x:0,y:-c.height-d,...Jn};if(a<n&&a>=i)return{x:0,y:c.height+d,...Jn};return{x:0,y:0,...Jn}};function Rm(t,r,n){let o=t[r],a=t[r-1],s=t[r+1];if(!o)return 0;if(n<r)return a?o.top-(a.top+a.height):s?s.top-(o.top+o.height):0;return s?s.top-(o.top+o.height):a?o.top-(a.top+a.height):0}var ul="Sortable",pl=ll.createContext({activeIndex:-1,containerId:ul,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:cl,disabled:{draggable:!1,droppable:!1}});function ml(t){let{children:r,id:n,items:o,strategy:a=cl,disabled:s=!1}=t,{active:i,dragOverlay:c,droppableRects:d,over:u,measureDroppableContainers:p}=sl(),m=$t(ul,n),f=Boolean(c.rect!==null),b=Gn(()=>o.map((N)=>typeof N==="object"&&("id"in N)?N.id:N),[o]),g=i!=null,h=i?b.indexOf(i.id):-1,T=u?b.indexOf(u.id):-1,R=aa(b),y=!wm(b,R.current),w=T!==-1&&h===-1||y,C=Nm(s);He(()=>{if(y&&g)p(b)},[y,b,g,p]),Wn(()=>{R.current=b},[b]);let D=Gn(()=>({activeIndex:h,containerId:m,disabled:C,disableTransforms:w,items:b,overIndex:T,useDragOverlay:f,sortedRects:ym(b,d),strategy:a}),[h,m,C.draggable,C.droppable,w,b,T,d,f,a]);return ll.createElement(pl.Provider,{value:D},r)}var Cm=(t)=>{let{id:r,items:n,activeIndex:o,overIndex:a}=t;return Un(n,o,a).indexOf(r)},Sm=(t)=>{let{containerId:r,isSorting:n,wasDragging:o,index:a,items:s,newIndex:i,previousItems:c,previousContainerId:d,transition:u}=t;if(!u||!o)return!1;if(c!==s&&a===i)return!1;if(n)return!0;return i!==a&&r===d},Pm={duration:200,easing:"ease"},fl="transform",Tm=Lt.Transition.toString({property:fl,duration:0,easing:"linear"}),km={roleDescription:"sortable"};function Lm(t){let{disabled:r,index:n,node:o,rect:a}=t,[s,i]=hm(null),c=aa(n);return He(()=>{if(!r&&n!==c.current&&o.current){let d=a.current;if(d){let u=Wt(o.current,{ignoreTransform:!0}),p={x:d.left-u.left,y:d.top-u.top,scaleX:d.width/u.width,scaleY:d.height/u.height};if(p.x||p.y)i(p)}}if(n!==c.current)c.current=n},[r,n,o,a]),Wn(()=>{if(s)i(null)},[s]),s}function gl(t){let{animateLayoutChanges:r=Sm,attributes:n,disabled:o,data:a,getNewIndex:s=Cm,id:i,strategy:c,resizeObserverConfig:d,transition:u=Pm}=t,{items:p,containerId:m,activeIndex:f,disabled:b,disableTransforms:g,sortedRects:h,overIndex:T,useDragOverlay:R,strategy:y}=xm(pl),w=Dm(o,b),C=p.indexOf(i),D=Gn(()=>({sortable:{containerId:m,index:C,items:p},...a}),[m,a,C,p]),N=Gn(()=>p.slice(p.indexOf(i)),[p,i]),{rect:P,node:L,isOver:F,setNodeRef:A}=il({id:i,data:D,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:N,...d}}),{active:j,activatorEvent:te,activeNodeRect:q,attributes:oe,setNodeRef:ge,listeners:ve,isDragging:U,over:Re,setActivatorNodeRef:Z,transform:he}=al({id:i,data:D,attributes:{...km,...n},disabled:w.draggable}),H=hi(A,ge),J=Boolean(j),_=J&&!g&&zn(f)&&zn(T),ae=!R&&U,Ce=ae&&_?he:null,se=c!=null?c:y,pt=_?Ce!=null?Ce:se({rects:h,activeNodeRect:q,activeIndex:f,overIndex:T,index:C}):null,O=zn(f)&&zn(T)?s({id:i,items:p,activeIndex:f,overIndex:T}):C,Se=j==null?void 0:j.id,W=aa({activeId:Se,items:p,newIndex:O,containerId:m}),Mr=p!==W.current.items,Xe=r({active:j,containerId:m,isDragging:U,isSorting:J,id:i,index:C,items:p,newIndex:W.current.newIndex,previousItems:W.current.items,previousContainerId:W.current.containerId,transition:u,wasDragging:W.current.activeId!=null}),qt=Lm({disabled:!Xe,index:C,node:L,rect:P});return Wn(()=>{if(J&&W.current.newIndex!==O)W.current.newIndex=O;if(m!==W.current.containerId)W.current.containerId=m;if(p!==W.current.items)W.current.items=p},[J,O,m,p]),Wn(()=>{if(Se===W.current.activeId)return;if(Se!=null&&W.current.activeId==null){W.current.activeId=Se;return}let er=setTimeout(()=>{W.current.activeId=Se},50);return()=>clearTimeout(er)},[Se]),{active:j,activeIndex:f,attributes:oe,data:D,rect:P,index:C,newIndex:O,items:p,isOver:F,isSorting:J,isDragging:U,listeners:ve,node:L,overIndex:T,over:Re,setNodeRef:H,setActivatorNodeRef:Z,setDroppableNodeRef:A,setDraggableNodeRef:ge,transform:qt!=null?qt:pt,transition:et()};function et(){if(qt||Mr&&W.current.newIndex===C)return Tm;if(ae&&!Gr(te)||!u)return;if(J||Xe)return Lt.Transition.toString({...u,property:fl});return}}function Dm(t,r){var n,o;if(typeof t==="boolean")return{draggable:t,droppable:!1};return{draggable:(n=t==null?void 0:t.draggable)!=null?n:r.draggable,droppable:(o=t==null?void 0:t.droppable)!=null?o:r.droppable}}function Xn(t){if(!t)return!1;let r=t.data.current;if(r&&"sortable"in r&&typeof r.sortable==="object"&&"containerId"in r.sortable&&"items"in r.sortable&&"index"in r.sortable)return!0;return!1}var Em=[V.Down,V.Right,V.Up,V.Left],bl=(t,r)=>{let{context:{active:n,collisionRect:o,droppableRects:a,droppableContainers:s,over:i,scrollableAncestors:c}}=r;if(Em.includes(t.code)){if(t.preventDefault(),!n||!o)return;let d=[];s.getEnabled().forEach((m)=>{if(!m||m!=null&&m.disabled)return;let f=a.get(m.id);if(!f)return;switch(t.code){case V.Down:if(o.top<f.top)d.push(m);break;case V.Up:if(o.top>f.top)d.push(m);break;case V.Left:if(o.left>f.left)d.push(m);break;case V.Right:if(o.left<f.left)d.push(m);break}});let u=Ji({active:n,collisionRect:o,droppableRects:a,droppableContainers:d,pointerCoordinates:null}),p=oa(u,"id");if(p===(i==null?void 0:i.id)&&u.length>1)p=u[1].id;if(p!=null){let m=s.get(n.id),f=s.get(p),b=f?a.get(f.id):null,g=f==null?void 0:f.node.current;if(g&&b&&m&&f){let T=Kr(g).some((N,P)=>c[P]!==N),R=vl(m,f),y=Mm(m,f),w=T||!R?{x:0,y:0}:{x:y?o.width-b.width:0,y:y?o.height-b.height:0},C={x:b.left,y:b.top};return w.x&&w.y?C:Gt(C,w)}}}return};function vl(t,r){if(!Xn(t)||!Xn(r))return!1;return t.data.current.sortable.containerId===r.data.current.sortable.containerId}function Mm(t,r){if(!Xn(t)||!Xn(r))return!1;if(!vl(t,r))return!1;return t.data.current.sortable.index<r.data.current.sortable.index}import{Fragment as Im}from"react";import{jsx as Mt,Fragment as Hm}from"react/jsx-runtime";var Am=({id:t,label:r,children:n})=>{let{attributes:o,listeners:a,setNodeRef:s,transform:i,transition:c,isDragging:d}=gl({id:t}),u={opacity:d?0.5:1,position:"relative",transform:Lt.Transform.toString(i),transition:c,zIndex:d?10:"auto"},p=Mt("button",{type:"button",className:"touch-none cursor-grab text-muted-foreground/40 hover:text-muted-foreground active:cursor-grabbing",...o,...a,title:r!==void 0&&r!==""?`Drag ${r} to reorder`:"Drag to reorder","aria-label":r!==void 0&&r!==""?`Drag ${r} to reorder`:"Drag handle",children:Mt(Ro,{className:"h-3.5 w-3.5"})});return Mt("div",{ref:s,style:u,children:n(p)})},Om=({items:t,onReorder:r,getItemLabel:n,renderItem:o,disabled:a=!1})=>{let s=Fi(na(qr,{activationConstraint:{distance:4}}),na(Yr,{coordinateGetter:bl})),i=(c)=>{let{active:d,over:u}=c;if(!u||d.id===u.id)return;let p=t.findIndex((f)=>f.id===d.id),m=t.findIndex((f)=>f.id===u.id);if(p===-1||m===-1)return;r(Un(t,p,m))};if(a)return t.map((c)=>Mt(Im,{children:o(c,null)},c.id));return Mt(ol,{sensors:s,collisionDetection:$i,onDragEnd:i,children:Mt(ml,{items:t.map((c)=>c.id),strategy:dl,children:t.map((c)=>Mt(Am,{id:c.id,label:n?.(c),children:(d)=>Mt(Hm,{children:o(c,d)})},c.id))})})},Vm=Om;import*as hl from"react";import{jsx as Zr,jsxs as sa}from"react/jsx-runtime";var xl=({open:t,onOpenChange:r,title:n,description:o,confirmLabel:a,cancelLabel:s="Cancel",confirmVariant:i="default",pendingLabel:c="Processing...",errorContent:d,keepOpenWhilePending:u=!1,onConfirm:p})=>{let[m,f]=hl.useState(!1),b=async()=>{f(!0);try{if(await p()!==!1)r(!1)}catch(g){throw f(!1),g}f(!1)};return Zr(nt,{open:t,onOpenChange:(g)=>{if(!(u&&m))r(g)},children:sa(at,{children:[sa(zt,{children:[Zr(st,{children:n}),Zr(rr,{children:o})]}),d,sa(Cs,{children:[Zr(l,{variant:"outline",onClick:()=>{r(!1)},disabled:m,children:s}),Zr(l,{variant:i,onClick:()=>{b()},disabled:m,children:m?c:a})]})]})})};xl.displayName="ConfirmDialog";var Bm=xl;import*as wl from"react";import{jsx as Kn,jsxs as yl}from"react/jsx-runtime";var Nl=wl.forwardRef(function({step:r,total:n,title:o,helper:a,action:s,className:i,...c},d){let u=Boolean(s);return yl("div",{ref:d,className:e("flex flex-wrap items-start justify-between gap-4",i),...c,children:[yl("div",{className:"min-w-0 space-y-1.5",children:[Kn(ir,{tone:"accent",className:"tracking-[0.16em]",children:`Step ${r} of ${n}`}),Kn("h2",{className:"text-lg font-semibold tracking-tight",children:o}),Kn("p",{className:"max-w-xl text-sm leading-relaxed text-muted-foreground",children:a})]}),u?Kn("div",{className:"shrink-0",children:s}):null]})});Nl.displayName="StageHeader";var Fm=Nl;import{jsx as It,jsxs as ia}from"react/jsx-runtime";var _m=x("flex h-10 w-10 shrink-0 items-center justify-center rounded-lg border [&_svg]:h-[18px] [&_svg]:w-[18px]",{defaultVariants:{tone:"default"},variants:{tone:{accent:"border-[color-mix(in_oklab,var(--brand)_28%,var(--border))] bg-[color-mix(in_oklab,var(--brand)_10%,var(--card))] text-(--brand)",danger:"border-[color-mix(in_oklab,var(--danger)_30%,var(--border))] bg-[color-mix(in_oklab,var(--danger)_12%,var(--card))] text-(--danger)",default:"border-border bg-muted/40 text-(--text-muted)",success:"border-[color-mix(in_oklab,var(--success)_30%,var(--border))] bg-[color-mix(in_oklab,var(--success)_12%,var(--card))] text-(--success)",warning:"border-[color-mix(in_oklab,var(--warning)_30%,var(--border))] bg-[color-mix(in_oklab,var(--warning)_12%,var(--card))] text-(--warning)"}}}),zm=x("shrink-0 [&_svg]:h-4 [&_svg]:w-4",{defaultVariants:{tone:"default"},variants:{tone:{accent:"text-(--brand)",danger:"text-(--danger)",default:"text-(--text-muted)",success:"text-(--success)",warning:"text-(--warning)"}}}),Zn=(t)=>t!==null&&t!==void 0&&t!==!1&&t!==0&&t!==0n&&t!==""&&!Number.isNaN(t),Rl=({variant:t="tile",icon:r,label:n,value:o,detail:a,tone:s,className:i,...c})=>{if(t==="compact")return ia(dr,{className:e("gap-1 px-4 py-3.5",i),...c,children:[ia("span",{className:"flex items-center justify-between gap-2",children:[It("span",{className:"text-[11px] font-medium uppercase tracking-[0.14em] text-(--text-muted)",children:n}),Zn(r)?It("span",{className:e(zm({tone:s})),"aria-hidden":!0,children:r}):null]}),It("span",{className:"text-[22px] font-semibold leading-none tabular-nums tracking-tight text-(--text-primary)",children:o}),Zn(a)?It("span",{className:"text-xs text-(--text-muted)",children:a}):null]});return ia(dr,{className:e("flex flex-col items-center gap-2.5 px-4 py-5 text-center","transition-colors hover:border-[color-mix(in_oklab,var(--brand)_22%,var(--border))]",i),...c,children:[Zn(r)?It("span",{className:e(_m({tone:s})),"aria-hidden":!0,children:r}):null,It("span",{className:"text-[26px] font-semibold leading-none tabular-nums tracking-tight text-(--text-primary)",children:o}),It("span",{className:"text-[11px] font-medium uppercase tracking-[0.14em] text-(--text-muted)",children:n}),Zn(a)?It("span",{className:"text-xs text-(--text-muted)",children:a}):null]})};Rl.displayName="StatTile";var $m=Rl;import*as Sl from"react";import{jsx as Cl,jsxs as Wm}from"react/jsx-runtime";var Jm={danger:"border-[color-mix(in_oklab,var(--danger)_40%,var(--border))] bg-[color-mix(in_oklab,var(--danger)_8%,var(--card))] text-(--danger)",live:"border-[color-mix(in_oklab,var(--primary)_45%,var(--border))] bg-[color-mix(in_oklab,var(--primary)_8%,var(--card))] text-primary",neutral:"border-border bg-card text-muted-foreground",success:"border-[color-mix(in_oklab,var(--success)_38%,var(--border))] bg-[color-mix(in_oklab,var(--success)_8%,var(--card))] text-(--success)",warning:"border-[color-mix(in_oklab,var(--warning)_42%,var(--border))] bg-[color-mix(in_oklab,var(--warning)_9%,var(--card))] text-(--warning)"},jm={danger:"danger",live:"primary",neutral:"neutral",success:"success",warning:"warning"},Gm=({tone:t,active:r=!1,label:n,className:o,children:a,...s},i)=>{let c="border-border bg-card text-muted-foreground";if(t)c=Jm[t];else if(r)c="border-[color-mix(in_oklab,var(--primary)_45%,var(--border))] bg-[color-mix(in_oklab,var(--primary)_8%,var(--card))] text-primary";return Wm("div",{ref:i,className:e("inline-flex items-center gap-2 rounded-full border px-3 py-1 text-[10px] font-semibold uppercase tracking-[0.16em]",c,o),...s,children:[t?Cl(dn,{tone:jm[t],pulse:t==="live"}):Cl("span",{"aria-hidden":!0,className:e("h-1.5 w-1.5 rounded-full",r?"bg-primary shadow-[0_0_0_3px_color-mix(in_oklab,var(--primary)_22%,transparent)]":"bg-muted-foreground")}),a??n]})},Pl=Sl.forwardRef(Gm);Pl.displayName="StatusPill";var Xm=Pl;import*as eo from"react";import{jsx as Qn,jsxs as Ym}from"react/jsx-runtime";var Um=x("relative min-w-0",{defaultVariants:{size:"md",variant:"pill"},variants:{size:{md:"",sm:""},variant:{pill:"",plain:""}}}),Km=x("pl-9 [&::-webkit-search-cancel-button]:appearance-none",{defaultVariants:{size:"md",variant:"pill"},variants:{size:{md:"",sm:"h-8 text-[13px]"},variant:{pill:"rounded-full bg-(--bg-surface)",plain:"bg-(--bg-surface)"}}}),Tl=({value:t,defaultValue:r,onValueChange:n,clearLabel:o,variant:a,size:s,className:i,classes:c,...d})=>{let[u,p]=eo.useState(r??""),m=t!==void 0,f=m?t:u,b=eo.useRef(null),g=(h)=>{if(!m)p(h);n?.(h)};return Ym("div",{className:e(Um({size:s,variant:a}),c?.root,i),children:[Qn(gr,{"aria-hidden":!0,className:e("pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground",c?.icon)}),Qn(M,{ref:b,type:"search",value:f,onChange:(h)=>{g(h.target.value)},className:e(Km({size:s,variant:a}),f!==void 0&&f!==""&&o!==void 0?"pr-9":void 0,c?.input),...d}),f!==void 0&&f!==""&&o!==void 0?Qn("button",{type:"button","aria-label":o,onClick:()=>{g(""),b.current?.focus()},className:e("absolute right-2.5 top-1/2 flex size-5 -translate-y-1/2 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-(--bg-surface-alt) hover:text-(--text-primary) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",c?.clear),children:Qn(B,{className:"h-3.5 w-3.5"})}):null]})};Tl.displayName="SearchField";var qm=Tl;import{createContext as Zm,useContext as kl,useMemo as Qm,useState as ef}from"react";import{createPortal as tf}from"react-dom";import{jsx as to,jsxs as sf}from"react/jsx-runtime";var la=Zm(null),rf=({children:t})=>{let[r,n]=ef(null),o=Qm(()=>({container:r,setContainer:n}),[r]);return to(la.Provider,{value:o,children:t})},Ll=({className:t})=>{let r=kl(la);return to("div",{ref:r?.setContainer,className:e("ml-auto flex items-center gap-2 empty:hidden",t)})},nf=({children:t})=>{let r=kl(la);if(r===null)return t;return r.container===null?null:tf(t,r.container)},of=({count:t})=>t===void 0?null:to("span",{className:"text-xs text-muted-foreground tabular-nums",children:t}),af=({children:t,className:r})=>sf("div",{className:e("flex flex-wrap items-center gap-3",r),children:[t,to(Ll,{})]});import{jsx as ro,jsxs as Dl}from"react/jsx-runtime";var El=({title:t,description:r,value:n,options:o,onValueChange:a,align:s="center",className:i,...c})=>Dl("section",{className:e("flex min-w-0 flex-col gap-3 sm:flex-row sm:justify-between",s==="center"?"sm:items-center":"sm:items-start",i),...c,children:[Dl("div",{className:"min-w-0",children:[ro("h3",{className:"truncate text-sm font-semibold",children:t}),r!==void 0&&r!==null&&r!==!1&&r!==""&&r!==0?ro("p",{className:"mt-1 text-sm text-muted-foreground",children:r}):null]}),ro("div",{className:"inline-flex shrink-0 rounded-md border border-border bg-background p-1 shadow-xs",children:o.map((d)=>ro(l,{type:"button",size:"sm",variant:d.value===n?"secondary":"ghost",disabled:d.disabled,className:e("h-8 rounded-sm px-3",d.value===n&&"bg-primary/10 text-primary hover:bg-primary/15"),"aria-label":d.ariaLabel,"aria-pressed":d.value===n,onClick:()=>{a(d.value)},children:d.label},d.value))})]});El.displayName="SectionSwitcher";import*as Ze from"react";import{jsx as Ge}from"react/jsx-runtime";var Ml=Ze.createContext({value:1}),ca=()=>Ze.useContext(Ml),lf=({value:t,defaultValue:r=1,indicators:n,className:o,...a})=>{let s=t??r,i=Ze.useMemo(()=>({indicators:n,value:s}),[s,n]);return Ge(Ml.Provider,{value:i,children:Ge("div",{"data-slot":"stepper",className:e("space-y-8",o),...a})})},cf=({className:t,...r})=>Ge("nav",{"data-slot":"stepper-nav","data-orientation":"horizontal",className:e("group/stepper-nav flex items-start justify-between gap-2",t),...r}),da=Ze.createContext({state:"inactive",step:1}),df=({step:t,loading:r,className:n,...o})=>{let{value:a}=ca(),s="inactive";if(r===!0)s="loading";else if(t<a)s="completed";else if(t===a)s="active";let i=Ze.useMemo(()=>({state:s,step:t}),[s,t]);return Ge(da.Provider,{value:i,children:Ge("div",{"data-slot":"stepper-item","data-state":s,"data-step":t,className:e("group/step relative flex-1 items-start",n),...o})})},uf=({className:t,...r})=>Ge("div",{"data-slot":"stepper-trigger",className:e("flex flex-col items-center gap-2.5",t),...r}),pf=({className:t,children:r,...n})=>{let{indicators:o}=ca(),{state:a}=Ze.useContext(da),s=o?.completed,i=o?.loading,c=r;if(a==="completed"&&Boolean(s))c=s;else if(a==="loading"&&Boolean(i))c=i;return Ge("div",{"data-slot":"stepper-indicator","data-state":a,className:e("flex size-7 shrink-0 items-center justify-center rounded-full border-2 text-xs font-semibold transition-colors",a==="completed"&&"border-primary bg-primary text-primary-foreground",a==="active"&&"border-primary bg-primary text-primary-foreground",a==="loading"&&"border-primary bg-primary text-primary-foreground",a==="inactive"&&"border-muted-foreground/30 bg-background text-muted-foreground",t),...n,children:c})},mf=({className:t,...r})=>{let{state:n}=Ze.useContext(da);return Ge("span",{"data-slot":"stepper-title","data-state":n,className:e("text-sm font-medium",(n==="completed"||n==="active")&&"text-foreground",n==="inactive"&&"text-muted-foreground",t),...r})},ff=({className:t,...r})=>Ge("div",{"data-slot":"stepper-separator",className:e("h-0.5 rounded-full bg-muted-foreground/30 transition-colors","group-data-[state=completed]/step:bg-primary",t),...r}),gf=({className:t,...r})=>Ge("div",{"data-slot":"stepper-panel",className:e(t),...r}),bf=({value:t,className:r,...n})=>{let{value:o}=ca();if(t!==o)return null;return Ge("div",{"data-slot":"stepper-content",className:e(r),...n})};import*as Ut from"react";import{jsx as Xt,jsxs as yf}from"react/jsx-runtime";var ua=Ut.createContext({}),vf=({className:t,size:r,variant:n,...o})=>{let a=Ut.useMemo(()=>({size:r,variant:n}),[r,n]);return Xt(ua.Provider,{value:a,children:Xt("fieldset",{"data-slot":"split-button",className:e("inline-flex min-w-0 items-stretch",t),...o})})},hf=({className:t,...r})=>{let{size:n,variant:o}=Ut.useContext(ua);return Xt(l,{"data-slot":"split-button-action",className:e("rounded-r-none",t),size:n,variant:o,...r})},xf=({align:t="end",children:r,contentClassName:n,disabled:o,label:a,...s})=>{let{size:i,variant:c}=Ut.useContext(ua);return yf(kt,{...s,children:[Xt(Et,{render:Xt(l,{"aria-label":a,"data-slot":"split-button-menu",className:"-ml-px rounded-l-none border-l border-l-current/20 px-2",size:i,variant:c}),disabled:o,children:Xt(E,{})}),Xt(vt,{align:t,className:n,children:r})]})};import*as kr from"react";import{jsx as We,jsxs as no}from"react/jsx-runtime";var wf=({items:t,title:r,triggerAriaLabel:n="Technical details",copyLabel:o="Copy",trigger:a,triggerNativeButton:s=!0,align:i="end",side:c="bottom",onCopy:d,className:u,classes:p})=>{let[m,f]=kr.useState(null),b=kr.useRef(null);kr.useEffect(()=>()=>{if(b.current!==null)window.clearTimeout(b.current)},[]);let g=(h)=>{if(navigator.clipboard.writeText(h.value),f(h.label),b.current!==null)window.clearTimeout(b.current);b.current=window.setTimeout(()=>{f(null)},1500),d?.(h)};return no(Be,{children:[a===void 0?We(Ae,{render:We(l,{variant:"ghost",size:"icon","aria-label":n,className:e("h-8 w-8 text-muted-foreground hover:text-foreground",p?.root,p?.trigger,u)}),children:We(as,{className:"h-4 w-4"})}):We(Ae,{render:a,nativeButton:s}),no(Ve,{align:i,side:c,className:e("w-80 p-3",p?.content),children:[r!==void 0&&r!==null?We("div",{className:"mb-2 text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:r}):null,We("dl",{className:"space-y-2.5",children:t.map((h)=>no("div",{className:e("min-w-0",p?.row),children:[We("dt",{className:e("text-[11px] font-medium text-muted-foreground",p?.label),children:h.label}),no("dd",{className:"mt-0.5 flex min-w-0 items-start gap-1",children:[We("code",{className:e("min-w-0 flex-1 select-all break-all rounded bg-muted/60 px-1.5 py-1 font-mono text-xs leading-relaxed text-foreground",p?.value),children:h.value}),h.copyable===!1?null:We(l,{type:"button",variant:"ghost",size:"icon","aria-label":`${o} ${h.label}`,className:"h-6 w-6 shrink-0 text-muted-foreground hover:text-foreground",onClick:()=>{g(h)},children:m===h.label?We(S,{className:"h-3.5 w-3.5"}):We(ot,{className:"h-3.5 w-3.5"})})]})]},h.label))})]})]})};var Nf=wf;import*as Lr from"react";import{jsx as ce,jsxs as ct,Fragment as Al}from"react/jsx-runtime";var Rf={disabled:!1,emptyMessage:"No option found.",loading:!1,loadingMessage:"Loading options...",modal:!1,placeholder:"Select option...",searchPlaceholder:"Search...",width:"200px"},Cf=1,Sf=0.5,Pf=(t)=>t.children!==void 0,Ol=(t)=>t.flatMap((r)=>{if(!r.children)return[r];let n=Ol(r.children);return n.length>0?[{...r,children:n}]:[]}),Hl=(t,r=[])=>t.flatMap((n)=>n.children?Hl(n.children,[...r,n]):[{ancestorIds:r.map((o)=>o.id),node:n,path:r.map((o)=>o.label).join(" / ")}]),Il=(t)=>({paddingLeft:`${Sf+t*Cf}rem`}),Vl=Lr.forwardRef(function(r,n){let o={...Rf,...r},{nodes:a,value:s,onChange:i,selectedLabel:c,placeholder:d,searchPlaceholder:u,emptyMessage:p,id:m,className:f,width:b,disabled:g,loading:h,loadingMessage:T,onSearchChange:R,modal:y}=o,[w,C]=Lr.useState(!1),[D,N]=Lr.useState(""),[P,L]=Lr.useState(()=>new Set),F=Ol(a),A=Hl(F),j=A.find((H)=>H.node.id===s),te=D.trim().toLowerCase(),q=(H)=>{if(H)L(new Set(j?.ancestorIds));else if(D!=="")N(""),R?.("");C(H)},oe=(H)=>{N(H),R?.(H)},ge=(H)=>{L((J)=>{let _=new Set(J);if(!_.delete(H))_.add(H);return _})},ve=(H)=>{i(H),q(!1)},U=(H)=>ct(Al,{children:[ce(S,{"aria-hidden":!0,className:e(s===H.id?"opacity-100":"opacity-0")}),H.icon]}),Re=(H,J)=>H.flatMap((_)=>{if(!Pf(_))return[ct(Ne,{value:_.id,style:Il(J),onSelect:()=>{ve(_.id)},children:[U(_),ce("span",{className:"min-w-0 truncate",title:_.label,children:_.label})]},_.id)];let ae=P.has(_.id),Ce=ae?rs:os;return[ct(Ne,{value:_.id,"aria-expanded":ae,style:Il(J),onSelect:()=>{ge(_.id)},children:[ce(k,{"aria-hidden":!0,className:e(ae&&"rotate-90")}),_.icon??ce(Ce,{"aria-hidden":!0}),ce("span",{className:"min-w-0 truncate",title:_.label,children:_.label})]},_.id),...ae&&_.children?Re(_.children,J+1):[]]}),Z=te===""?[]:A.filter((H)=>R!==void 0||`${H.path} / ${H.node.label}`.toLowerCase().includes(te)),he=j?.node.label??c;return ct(Be,{modal:y,open:w,onOpenChange:q,children:[ct(Ae,{ref:n,id:m,"aria-busy":h,disabled:g,render:ce(l,{variant:"outline",className:e("justify-between",f),style:{width:b}}),children:[he===void 0?ce("span",{className:"min-w-0 truncate text-muted-foreground",children:d}):ce("span",{className:"min-w-0 truncate",children:he}),h?ce(de,{"aria-hidden":!0,className:"ml-2 size-4 shrink-0 animate-spin text-muted-foreground"}):ce(pr,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]}),ce(Ve,{className:"w-(--anchor-width) p-0",children:ct(Pt,{shouldFilter:!1,children:[ce(Zt,{"aria-label":u,placeholder:u,value:D,onValueChange:oe}),ce(wt,{className:"max-h-[min(300px,calc(var(--available-height)-2.5rem))]",children:h?ct("div",{"aria-live":"polite",className:"flex items-center justify-center gap-2 px-3 py-6 text-sm text-muted-foreground",children:[ce(de,{"aria-hidden":!0,className:"size-4 animate-spin"}),T]}):ct(Al,{children:[ce(Jt,{children:p}),ce(rt,{children:te===""?Re(F,0):Z.map((H)=>ct(Ne,{value:H.node.id,onSelect:()=>{ve(H.node.id)},children:[U(H.node),ce("span",{className:"min-w-0 truncate",title:H.node.label,children:H.node.label}),H.path===""?null:ce("span",{className:"ml-auto min-w-0 shrink truncate pl-2 text-xs text-muted-foreground",title:H.path,children:H.path})]},H.node.id))})]})})]})})]})});Vl.displayName="TreeSelect";import*as Fl from"react";import{jsx as Bl,jsxs as kf}from"react/jsx-runtime";var Tf=({value:t,state:r="value",trailing:n,monospace:o=!0,className:a,...s},i)=>{let c=r==="secret";return kf("div",{ref:i,className:e("flex min-w-0 items-center gap-2",a),...s,children:[Bl("div",{className:e("flex min-w-0 flex-1 items-center border-b py-2",c?"border-[color-mix(in_oklab,var(--primary)_45%,var(--border))]":"border-border"),children:Bl("code",{className:e("block min-w-0 flex-1 overflow-x-auto whitespace-nowrap text-[13px] text-foreground",o?"font-mono":"font-sans"),children:t})}),n]})},_l=Fl.forwardRef(Tf);_l.displayName="ValueRow";var Lf=_l;import{forwardRef as zl,useCallback as Kt,useLayoutEffect as $l,useId as Df,useRef as Jl,useState as ye}from"react";import{jsx as v,jsxs as I,Fragment as Qr}from"react/jsx-runtime";var Ef=({mode:t,onModeChange:r,disabled:n})=>I("div",{role:"tablist","aria-label":"Value source",className:"relative inline-flex h-7 items-center rounded-full border border-border/70 bg-muted/40 p-0.5 text-[10px] font-medium tracking-[0.08em] uppercase shadow-inner",children:[v("span",{"aria-hidden":!0,className:e("absolute top-0.5 bottom-0.5 w-[calc(50%-2px)] rounded-full bg-background shadow-xs ring-1 ring-border/60 transition-transform duration-200 ease-out",t==="inline"&&"translate-x-[calc(100%+0px)]")}),I("button",{type:"button",role:"tab","aria-selected":t==="linked",disabled:n,onClick:()=>{r("linked")},className:e("relative z-10 flex items-center gap-1 rounded-full px-2.5 py-1 transition-colors",t==="linked"?"text-foreground":"text-muted-foreground hover:text-foreground"),children:[v(Qo,{className:"h-3 w-3"}),"Linked"]}),I("button",{type:"button",role:"tab","aria-selected":t==="inline",disabled:n,onClick:()=>{r("inline")},className:e("relative z-10 flex items-center gap-1 rounded-full px-2.5 py-1 transition-colors",t==="inline"?"text-foreground":"text-muted-foreground hover:text-foreground"),children:[v(vo,{className:"h-3 w-3"}),"Inline"]})]}),Mf=({variableKey:t,initialValue:r,isSecret:n,loading:o,saving:a,onSubmit:s,onCancel:i})=>{let[c,d]=ye(r),[u,p]=ye(!1),m=Jl(null);return $l(()=>{if(!o)m.current?.focus()},[o]),I("form",{role:"presentation",onSubmit:(f)=>{f.preventDefault(),s(c)},onKeyDown:(f)=>{if(f.key==="Escape")f.preventDefault(),i()},className:"space-y-3 p-3",children:[I("div",{className:"flex items-start justify-between gap-2",children:[I("div",{className:"min-w-0",children:[v("p",{className:"text-[10px] font-medium uppercase tracking-[0.1em] text-muted-foreground",children:"Editing linked variable"}),v("p",{className:"mt-0.5 truncate font-mono text-xs text-foreground",children:t})]}),v("button",{type:"button",onClick:i,"aria-label":"Close editor",className:"rounded p-0.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:v(B,{className:"h-3.5 w-3.5"})})]}),I("div",{className:"space-y-1",children:[v(ue,{htmlFor:"linked-value",className:"text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground",children:n?"Secret value":"Value"}),I("div",{className:"relative",children:[v(M,{ref:m,id:"linked-value",type:u?"text":"password",value:c,onChange:(f)=>{d(f.target.value)},placeholder:o?"Loading current value…":"Enter value",disabled:o||a,className:"h-8 pr-8 font-mono text-xs",autoComplete:"off",spellCheck:!1}),v("button",{type:"button",onClick:()=>{p((f)=>!f)},"aria-label":u?"Hide value":"Reveal value",className:"absolute inset-y-0 right-1 my-auto flex h-6 w-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:u?v(Ar,{className:"h-3.5 w-3.5"}):v(Qt,{className:"h-3.5 w-3.5"})})]})]}),I("div",{className:"flex items-center justify-between gap-2 pt-1",children:[I("p",{className:"text-[10px] leading-relaxed text-muted-foreground",children:["Updates the linked secret. Other connectors using"," ",v("span",{className:"font-mono",children:t})," will pick it up on their next run."]}),v(l,{type:"submit",size:"sm",disabled:o||a,className:"h-7 px-3 text-xs",children:a?I(Qr,{children:[v(de,{className:"h-3 w-3 animate-spin"}),"Saving"]}):"Save"})]})]})},If=({suggestedName:t,onSubmit:r,onCancel:n})=>{let[o,a]=ye(t),[s,i]=ye(""),[c,d]=ye(!0),[u,p]=ye(!1),m=Jl(null);$l(()=>{m.current?.focus(),m.current?.select()},[]);let f=o.trim(),b=f.length>0;return I("form",{role:"presentation",onSubmit:(g)=>{if(g.preventDefault(),b)r({key:f,secret:c,value:s})},onClick:(g)=>{g.stopPropagation()},onKeyDown:(g)=>{if(g.key==="Escape")g.preventDefault(),g.stopPropagation(),n()},className:"flex flex-col",children:[I("div",{className:"flex items-center gap-2 border-b border-border/60 bg-muted/15 px-3 py-2",children:[v("button",{type:"button",onClick:n,"aria-label":"Back to picker",className:"-ml-1 flex h-5 w-5 shrink-0 items-center justify-center rounded text-muted-foreground/70 transition-colors hover:bg-muted hover:text-foreground",children:v(So,{className:"h-3.5 w-3.5"})}),v("span",{className:"flex-1 text-[10.5px] font-medium uppercase tracking-[0.12em] text-muted-foreground/80",children:"New variable"}),v(Ft,{className:"h-3 w-3 text-muted-foreground/60"})]}),I("div",{className:"space-y-2.5 px-3 py-2.5",children:[I("div",{className:"space-y-1",children:[v(ue,{htmlFor:"var-key",className:"text-[10px] font-medium uppercase tracking-[0.1em] text-muted-foreground/70",children:"Name"}),I("div",{className:"relative",children:[v("span",{"aria-hidden":!0,className:"pointer-events-none absolute inset-y-0 left-2.5 flex items-center text-muted-foreground/60",children:v(xo,{className:"h-3 w-3"})}),v(M,{ref:m,id:"var-key",value:o,onChange:(g)=>{a(g.target.value.toUpperCase())},placeholder:"VARIABLE_NAME",className:"h-8 pl-7 font-mono text-[12.5px] tracking-tight",autoComplete:"off",spellCheck:!1})]})]}),I("div",{className:"space-y-1",children:[v(ue,{htmlFor:"var-value",className:"text-[10px] font-medium uppercase tracking-[0.1em] text-muted-foreground/70",children:"Value"}),I("div",{className:"relative",children:[v(M,{id:"var-value",type:u?"text":"password",value:s,onChange:(g)=>{i(g.target.value)},placeholder:"Encrypted at rest",className:"h-8 pr-8 font-mono text-[12.5px]",autoComplete:"off",spellCheck:!1}),v("button",{type:"button",onClick:()=>{p((g)=>!g)},"aria-label":u?"Hide value":"Reveal value",className:"absolute inset-y-0 right-1 my-auto flex h-6 w-6 items-center justify-center rounded text-muted-foreground/70 transition-colors hover:bg-muted hover:text-foreground",children:u?v(Ar,{className:"h-3.5 w-3.5"}):v(Qt,{className:"h-3.5 w-3.5"})})]})]}),I("label",{className:"flex cursor-pointer items-center gap-2 select-none text-[11px] text-muted-foreground",children:[v("input",{type:"checkbox",checked:c,onChange:(g)=>{d(g.target.checked)},className:"h-3 w-3 accent-primary"}),I("span",{className:"flex items-center gap-1",children:[v(xo,{className:"h-3 w-3"}),"Mark as secret"]})]})]}),I("button",{type:"submit",disabled:!b,className:"group/save flex w-full items-center gap-2.5 border-t border-border/60 bg-gradient-to-r from-muted/30 to-muted/10 px-3 py-2.5 text-left text-xs transition-colors hover:from-muted/50 hover:to-muted/30 disabled:cursor-not-allowed disabled:opacity-50",children:[v("span",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary ring-1 ring-primary/15",children:v(S,{className:"h-3 w-3"})}),I("span",{className:"flex min-w-0 flex-1 flex-col",children:[v("span",{className:"text-[12px] font-medium leading-tight",children:"Create variable"}),v("span",{className:"truncate text-[10px] leading-tight text-muted-foreground",children:b?I(Qr,{children:["Link this field to"," ",v("span",{className:"font-mono text-foreground/80",children:f})]}):"Enter a name to continue"})]}),v(fr,{className:"h-3.5 w-3.5 text-muted-foreground/60 transition-transform group-hover/save:translate-x-0.5 group-disabled/save:translate-x-0"})]})]})},jl=zl(function({selected:r,value:n,placeholder:o,className:a,...s},i){let c=Boolean(n),d=Boolean(r);return I("button",{ref:i,type:"button",...s,className:e("group/trigger relative flex h-9 w-full items-center gap-2 rounded-md border bg-background px-2.5 text-left text-sm shadow-xs transition-all outline-none","hover:border-ring/50","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:cursor-not-allowed disabled:opacity-50",c?"border-primary/20 bg-primary/[0.03]":"border-input",a),children:[v("span",{"aria-hidden":!0,className:e("flex h-5 w-5 shrink-0 items-center justify-center rounded-sm transition-colors",c?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"),children:v(Qo,{className:"h-3 w-3"})}),c?I("span",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:[v("span",{className:"truncate font-mono text-[12.5px] tracking-tight",children:n}),!d&&v("span",{title:"Not in your variables list",className:"rounded-sm border border-dashed border-muted-foreground/40 px-1 py-px text-[9px] uppercase tracking-wider text-muted-foreground",children:"Unresolved"})]}):v("span",{className:"flex-1 truncate text-muted-foreground",children:o}),v(pr,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground/60 transition-colors group-hover/trigger:text-muted-foreground"})]})});jl.displayName="LinkedTrigger";var Af=({value:t,onChange:r,onBlur:n,placeholder:o,disabled:a,masked:s,inputId:i})=>{let[c,d]=ye(!1),u=s&&!c?"password":"text";return I("div",{className:e("group/inline relative flex h-9 w-full items-center rounded-md border border-input bg-background pl-2.5 pr-1 shadow-xs transition-all","focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]"),children:[v("span",{"aria-hidden":!0,className:"mr-2 flex h-5 w-5 shrink-0 items-center justify-center rounded-sm bg-muted text-muted-foreground",children:v(vo,{className:"h-3 w-3"})}),v("input",{id:i,type:u,value:t,onChange:(p)=>{r(p.target.value)},onBlur:n,placeholder:o,disabled:a,autoComplete:"off",spellCheck:!1,className:"flex-1 bg-transparent font-mono text-[12.5px] tracking-tight outline-none placeholder:font-sans placeholder:tracking-normal placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"}),s&&v("button",{type:"button",onClick:()=>{d((p)=>!p)},"aria-label":c?"Hide value":"Reveal value",className:"flex h-7 w-7 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:c?v(Ar,{className:"h-3.5 w-3.5"}):v(Qt,{className:"h-3.5 w-3.5"})})]})},Of=({options:t,value:r,onSelect:n})=>I("div",{className:"px-1",children:[I("div",{className:"flex items-center justify-between px-2 pt-2 pb-1",children:[v("span",{className:"text-[10px] font-medium uppercase tracking-[0.12em] text-muted-foreground/80",children:"Linked variables"}),v("span",{className:"text-[10px] tabular-nums text-muted-foreground/60",children:t.length})]}),v(rt,{className:"!p-0 [&_[cmdk-group-heading]]:hidden",children:t.map((o)=>{let a=r===o.key;return I(Ne,{value:o.key,keywords:[o.key,o.description??""],onSelect:()=>{n(o.key)},className:e("group/row relative my-px cursor-pointer rounded-md px-2 py-1.5 transition-colors","data-[selected=true]:bg-muted/60 data-[selected=true]:text-foreground",a&&"bg-primary/[0.05]"),children:[a&&v("span",{"aria-hidden":!0,className:"absolute inset-y-1.5 left-0 w-[2px] rounded-r bg-primary"}),v("span",{"aria-hidden":!0,className:e("flex h-5 w-5 shrink-0 items-center justify-center rounded-sm transition-colors",a?"bg-primary/15 text-primary":"bg-muted/60 text-muted-foreground/70 group-hover/row:bg-muted"),children:v(xo,{className:"h-3 w-3"})}),I("div",{className:"flex min-w-0 flex-1 flex-col",children:[v("span",{className:e("truncate font-mono text-[12.5px] tracking-tight",a&&"text-primary"),children:o.key}),o.description!==void 0&&o.description!==""&&v("span",{className:"truncate text-[10.5px] leading-tight text-muted-foreground",children:o.description})]}),a?v(S,{className:"h-3.5 w-3.5 shrink-0 text-primary"}):v("span",{"aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 text-transparent transition-colors group-data-[selected=true]/row:text-muted-foreground/40",children:v(fr,{className:"h-3.5 w-3.5"})})]},o.key)})})]}),Hf=()=>I("div",{className:"space-y-1.5 px-2 py-3",children:[I("div",{className:"flex items-center justify-between px-1 pb-1",children:[v("span",{className:"text-[10px] font-medium uppercase tracking-[0.12em] text-muted-foreground/60",children:"Loading"}),v(de,{className:"h-3 w-3 animate-spin text-muted-foreground/60"})]}),[0.95,0.7,0.85].map((t,r)=>I("div",{className:"flex items-center gap-2 rounded-md px-2 py-1.5",style:{opacity:1-r*0.18},children:[v("div",{className:"h-5 w-5 shrink-0 animate-pulse rounded-sm bg-muted/70"}),v("div",{className:"h-3 animate-pulse rounded bg-muted/70",style:{width:`${t*100}%`}})]},r))]}),Vf=({query:t,canCreate:r,onCreate:n})=>{let o=t.trim();return I("div",{className:"flex flex-col items-center gap-2 px-4 py-7 text-center",children:[v("span",{"aria-hidden":!0,className:"flex h-9 w-9 items-center justify-center rounded-full bg-muted/60 text-muted-foreground/70",children:v(xo,{className:"h-4 w-4"})}),I("div",{className:"space-y-0.5",children:[v("p",{className:"text-[12px] font-medium text-foreground",children:o?I(Qr,{children:["No variables match"," ",I("span",{className:"font-mono text-foreground",children:['"',o,'"']})]}):"No variables yet"}),v("p",{className:"text-[10.5px] leading-snug text-muted-foreground",children:"Variables let you reuse secrets across connectors and rotate them in one place."})]}),r&&I(l,{type:"button",size:"sm",variant:"outline",onClick:n,className:"mt-1 h-7 text-[11px]",children:[v(Ft,{className:"h-3 w-3"}),o?`Create "${o.toUpperCase().replaceAll(/[^A-Z0-9_]/gu,"_")}"`:"Create variable"]})]})},Bf=({options:t,optionsLoading:r,optionsFetching:n,value:o,query:a,onQueryChange:s,onSelect:i,onCreate:c,suggestedName:d,showCreate:u,onShowCreate:p})=>{if(u&&c)return v(If,{suggestedName:d??a.trim(),onSubmit:(f)=>{c(f)},onCancel:()=>{p(!1)}});let m=v(Of,{options:t,value:o,onSelect:i});if(r)m=v(Hf,{});else if(t.length===0)m=v(Vf,{query:a,canCreate:Boolean(c),onCreate:()=>{p(!0)}});return I("div",{className:"flex flex-col",children:[I("div",{className:"relative flex items-center gap-2 border-b border-border/60 bg-muted/15 px-3 py-2",children:[v(gr,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground/70"}),v("input",{autoFocus:!0,type:"text",value:a,onChange:(f)=>{s(f.target.value)},placeholder:"Search variables…",autoComplete:"off",spellCheck:!1,className:"flex-1 bg-transparent text-xs tracking-tight outline-none placeholder:text-muted-foreground/60"}),I("div",{className:"flex h-4 w-4 items-center justify-center",children:[n&&!r&&v(de,{className:"h-3 w-3 animate-spin text-muted-foreground/70"}),!n&&a&&v("button",{type:"button",onClick:()=>{s("")},"aria-label":"Clear search",className:"rounded p-0.5 text-muted-foreground/60 transition-colors hover:bg-muted hover:text-foreground",children:v(B,{className:"h-3 w-3"})})]})]}),v(Pt,{shouldFilter:!1,className:"rounded-none bg-transparent",loop:!0,children:v(wt,{className:"max-h-[280px] py-1",children:m})}),c&&I("button",{type:"button",onClick:()=>{p(!0)},className:"group/cta flex w-full items-center gap-2.5 border-t border-border/60 bg-gradient-to-r from-muted/30 to-muted/10 px-3 py-2.5 text-left text-xs transition-colors hover:from-muted/50 hover:to-muted/30",children:[v("span",{className:"flex h-6 w-6 items-center justify-center rounded-md bg-primary/10 text-primary ring-1 ring-primary/15",children:v(Ft,{className:"h-3 w-3"})}),I("span",{className:"flex min-w-0 flex-1 flex-col",children:[v("span",{className:"text-[12px] font-medium leading-tight",children:"Create new variable"}),v("span",{className:"text-[10px] leading-tight text-muted-foreground",children:"Encrypted at rest · reusable across connectors"})]}),v(fr,{className:"h-3.5 w-3.5 text-muted-foreground/60 transition-transform group-hover/cta:translate-x-0.5"})]})]})},Ff=zl(function({value:r,mode:n,onChange:o,onBlur:a,options:s,optionsLoading:i,optionsFetching:c,onSearch:d,onCreate:u,onResolve:p,onUpdate:m,suggestedName:f,placeholder:b="Select variable…",disabled:g=!1,masked:h=!0,className:T},R){let[y,w]=ye(!1),[C,D]=ye(""),[N,P]=ye(!1),[L,F]=ye(!1),[A,j]=ye(null),[te,q]=ye(!1),[oe,ge]=ye(!1),[ve,U]=ye(null),Re=Df(),Z=Kt((O)=>{if(O===n)return;o("",O),P(!1),D("")},[n,o]),he=Kt((O)=>{o(O===r?"":O,"linked"),w(!1),P(!1)},[r,o]),H=Kt((O)=>{o(O,"inline")},[o]),J=Kt(async(O)=>{if(!u)return;let Se=await u(O);P(!1),w(!1),o(Se.key,"linked")},[u,o]),_=Kt(async()=>{if(!r||!p)return;F(!0),q(!0),U(null);try{let O=await p(r);j(O??{key:r,secret:!0,value:null})}catch(O){U(O instanceof Error?O.message:"Failed to load variable"),j({key:r,secret:!0,value:null})}q(!1)},[r,p]),ae=Kt(async(O)=>{if(!m||!r)return;ge(!0);try{await m({key:r,value:O}),F(!1)}catch(Se){throw ge(!1),Se}ge(!1)},[m,r]),Ce=Kt((O)=>{D(O),d?.(O)},[d]),se=s.find((O)=>O.key===r),pt=n==="linked"&&Boolean(r)&&Boolean(m);return I("div",{className:e("space-y-1.5",T),children:[I("div",{className:"flex items-center gap-1.5",children:[v("div",{className:"min-w-0 flex-1",children:n==="linked"?I(Be,{open:y,onOpenChange:(O)=>{if(w(O),!O)P(!1),a?.()},modal:!0,children:[v(Ae,{ref:R,disabled:g,render:v(jl,{selected:se,value:r,placeholder:b})}),v(Ve,{className:"w-(--anchor-width) min-w-[300px] overflow-hidden border-border/80 p-0 shadow-xl",side:"bottom",align:"start",sideOffset:6,children:v(Bf,{options:s,optionsLoading:Boolean(i),optionsFetching:Boolean(c),value:r,query:C,onQueryChange:Ce,onSelect:he,onCreate:u?J:void 0,suggestedName:f,showCreate:N,onShowCreate:P})})]}):v(Af,{inputId:Re,value:r,onChange:H,onBlur:()=>a?.(),placeholder:b||"Enter value",disabled:g,masked:h})}),pt&&I(Be,{open:L,onOpenChange:(O)=>{if(F(O),!O)j(null),U(null);else if(!A)_()},modal:!0,children:[v(Ae,{disabled:g,"aria-label":"Edit linked variable value",title:"Edit linked variable value",render:v(l,{variant:"outline",size:"icon",className:"h-9 w-9 shrink-0 border-input text-muted-foreground hover:text-foreground"}),children:v(vo,{className:"h-3.5 w-3.5"})}),I(Ve,{align:"end",side:"bottom",sideOffset:6,className:"w-80 p-0 shadow-lg",children:[ve!==null&&ve!==""&&v("div",{className:"border-b border-destructive/30 bg-destructive/5 px-3 py-2 text-[11px] text-destructive",children:ve}),v(Mf,{variableKey:r,initialValue:A?.value??"",isSecret:A?.secret??!0,loading:te,saving:oe,onSubmit:(O)=>{ae(O)},onCancel:()=>{F(!1)}},`${r}:${A?.value??""}`)]})]}),v(Ef,{mode:n,onModeChange:Z,disabled:g})]}),v("p",{className:"flex items-center gap-1.5 text-[10.5px] leading-tight text-muted-foreground/80",children:n==="linked"?I(Qr,{children:[v(Qo,{className:"h-3 w-3"}),v("span",{children:"Reads from an org variable. Rotate values in one place; every connector picks it up."})]}):I(Qr,{children:[v(vo,{className:"h-3 w-3"}),I("span",{children:["Stored inline on this connector. Use"," ",v("span",{className:"font-medium text-foreground/80",children:"Linked"})," ","to share across connectors."]})]})})]})});import{useMemo as _f}from"react";import{jsx as oo,jsxs as pa}from"react/jsx-runtime";var zf=(t)=>{let r="",n=0,o=" ",a=t.replaceAll(/>\s*</gu,`>
|
|
7
7
|
<`).split(`
|
|
8
|
-
`);for(let
|
|
9
|
-
`,
|
|
8
|
+
`);for(let s of a){let i=s.trim();if(!i)continue;if(i.startsWith("</"))n=Math.max(0,n-1);if(r+=`${o.repeat(n)+i}
|
|
9
|
+
`,i.startsWith("<")&&!i.startsWith("</")&&!i.startsWith("<?")&&!i.endsWith("/>")&&!/<\/[^>]+>$/u.test(i))n+=1}return r.trim()},$f=({open:t,onOpenChange:r,title:n="XML Viewer",data:o})=>{let a=_f(()=>zf(o??""),[o]);return oo(nt,{open:t,onOpenChange:r,children:pa(at,{className:"max-w-2xl max-h-[80vh] flex flex-col",children:[pa(zt,{className:"flex flex-row items-center justify-between gap-2",children:[oo(st,{children:n}),pa(l,{type:"button",variant:"outline",size:"sm",onClick:()=>{navigator.clipboard.writeText(a),yt.success("Copied to clipboard")},children:[oo(ot,{className:"h-3.5 w-3.5 mr-1"}),"Copy"]})]}),oo("pre",{className:"min-h-0 flex-1 overflow-auto rounded-md bg-muted p-4 text-xs font-mono whitespace-pre",children:a})]})})};import{jsx as Er,jsxs as ma}from"react/jsx-runtime";var Jf=({title:t,children:r,details:n,className:o,defaultOpen:a=!1,classes:s,...i})=>ma(mr,{variant:"destructive",className:e("border-destructive/25 bg-destructive/5","has-[>svg]:grid-cols-[1rem_minmax(0,1fr)]",s?.root,o),children:[Er(Co,{"aria-hidden":"true"}),t!==void 0&&t!==null&&Er(tn,{className:e("line-clamp-none min-w-0 break-words text-foreground",s?.title),children:t}),Er(hr,{className:e("min-w-0 break-words",s?.message),children:r}),n!==void 0&&ma(Y,{...i,defaultOpen:a,className:e("col-start-2 mt-3 min-w-0",s?.details),children:[ma(K,{type:"button",className:e("group inline-flex max-w-full items-center gap-1.5 rounded-sm text-left","text-xs font-medium text-foreground underline-offset-4 hover:underline","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",s?.trigger),children:[Er(E,{"aria-hidden":"true",className:"size-3.5 shrink-0 transition-transform group-data-panel-open:rotate-180 motion-reduce:transition-none"}),n.label]}),Er(Q,{children:Er("div",{className:e("mt-3 min-w-0 rounded-md border border-border bg-background/70 p-3 text-sm text-foreground",s?.content),children:n.content})})]})]});import{jsx as dt,jsxs as fa,Fragment as Xf}from"react/jsx-runtime";var Gl=(t)=>Math.max(0,Math.min(100,Math.round(t))),ga=(t)=>Gl(t.value??0),jf=(t)=>{if(t.length===0)return 0;return Gl(t.reduce((r,n)=>r+ga(n),0)/t.length)},Gf=({lane:t})=>{let r=t.fillClassName??"bg-primary";if(t.mode==="indeterminate")return fa(Xf,{children:[dt("div",{className:e("absolute inset-y-0 w-1/3 rounded-full motion-reduce:w-full motion-reduce:opacity-40",r),"data-slot":"lane-progress-indeterminate",style:{animation:"lane-progress-indeterminate 1.35s linear infinite"}}),dt("style",{children:`@keyframes lane-progress-indeterminate {
|
|
10
10
|
0% { transform: translateX(-120%); }
|
|
11
11
|
100% { transform: translateX(320%); }
|
|
12
12
|
}
|
|
@@ -17,8 +17,8 @@ import{Po,Ct,Ve,Io,Lo,To,Eo,Mo,zt,Gt,St,Ao,Do,Rt}from"../../index-zwm9cyre.js";i
|
|
|
17
17
|
transform: none;
|
|
18
18
|
width: 100%;
|
|
19
19
|
}
|
|
20
|
-
}`})]});return
|
|
20
|
+
}`})]});return dt("div",{className:e("h-full transition-all",r),style:{width:`${ga(t)}%`}})},Wf=({className:t,detail:r,label:n,lanes:o})=>{let a=o.some((i)=>i.mode==="indeterminate"),s=jf(o);return fa("div",{className:e("flex w-full min-w-0 max-w-full flex-col gap-1.5",t),children:[fa("div",{className:"grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-baseline gap-3",children:[dt("span",{className:"truncate text-xs font-medium",title:n,children:n}),r!==null&&r!==void 0&&r!==""?dt("span",{className:"shrink-0 text-[11px] text-muted-foreground",title:r,children:r}):null]}),dt("progress",{"aria-label":n,className:"sr-only",max:100,value:a?void 0:s}),dt("div",{"aria-hidden":"true",className:"flex h-2 w-full gap-0.5","data-slot":"lane-progress",children:o.map((i,c)=>dt("div",{className:"relative min-w-0 flex-1 overflow-hidden rounded-full bg-muted","data-mode":i.mode??"determinate","data-slot":"lane-progress-lane","data-value":ga(i),children:dt(Gf,{lane:i})},c))})]})};import*as Wl from"react";import{jsx as G,jsxs as _e}from"react/jsx-runtime";var Yt=(t)=>Boolean(t)&&t!==0,Uf=({context:t})=>G("div",{className:"sr-only","data-slot":"lifecycle-status-card-status","aria-live":"polite",children:t.statusLabel}),Kf=({error:t})=>{let[r,n]=Wl.useState(!1);return _e(mr,{variant:t.tone==="destructive"?"destructive":"default","data-slot":"lifecycle-status-card-error",children:[G(Xo,{"aria-hidden":!0}),Yt(t.title)?G(tn,{children:t.title}):null,_e(hr,{children:[Yt(t.summary)?G("p",{children:t.summary}):null,Yt(t.detail)?_e("div",{className:"mt-2 space-y-2",children:[G(l,{"aria-expanded":r,onClick:()=>{n((o)=>!o)},size:"sm",type:"button",variant:"link",children:r?"Hide details":"Show details"}),r?G("p",{className:"whitespace-pre-wrap break-words rounded-md bg-muted/50 p-2 text-foreground",children:t.detail}):null]}):null]})]})},Yf=(t)=>Object.prototype.toString.call(t)==="[object Function]",ut=(t,r)=>Yf(t)?t(r):t,qf=(t)=>{let r;if(t?.mode!=="indeterminate"){if(t?.value!==void 0)({value:r}=t);else if(t?.completed!==void 0&&t.total!==void 0&&t.total>0)r=Math.round(t.completed/t.total*100)}return r},Zf=(t)=>{if(t==="danger")return"destructive";return t==="success"?"soft":"outline"},Qf=(t)=>{switch(t){case"success":return"border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-900/60 dark:bg-emerald-950/30 dark:text-emerald-300";case"danger":return"border-destructive/25 bg-destructive/10 text-destructive";case"warning":return"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-900/60 dark:bg-amber-950/30 dark:text-amber-300";case"muted":return"border-border bg-muted text-muted-foreground";case void 0:case"active":case"default":return"border-primary/20 bg-primary/10 text-primary";default:return"border-primary/20 bg-primary/10 text-primary"}},eg=(t)=>{switch(t){case"success":return"bg-emerald-500";case"danger":return"bg-destructive";case"warning":return"bg-amber-500";case"muted":return"bg-muted-foreground";case void 0:case"active":case"default":return"bg-primary";default:return"bg-primary"}},tg=({model:t})=>G("span",{className:e("flex size-9 items-center justify-center rounded-md border",Qf(t.tone)),children:G("span",{className:e("flex size-4 items-center justify-center",t.iconAnimated===!0&&"animate-spin"),"aria-hidden":!0,children:t.icon})}),rg=({model:t})=>{let{progress:r}=t,n=qf(r),o=r?.label??t.currentStep;if(!r&&!Yt(o))return null;return _e("div",{className:"space-y-2","data-slot":"lifecycle-status-card-progress",children:[_e("div",{className:"flex min-h-5 items-center justify-between gap-3 text-sm",children:[G("span",{className:"min-w-0 truncate text-muted-foreground",children:o??"Waiting for updates"}),r?.completed!==void 0&&r.total!==void 0?_e("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:[r.completed," of ",r.total]}):null]}),n===void 0?_e("div",{"aria-label":"Progress",className:"relative h-2 overflow-hidden rounded-full bg-primary/15","data-progress-mode":"indeterminate",children:[G("div",{className:"absolute inset-y-0 w-1/3 rounded-full bg-primary/45",style:{animation:"lifecycle-status-card-indeterminate 1.35s ease-in-out infinite"}}),G("style",{children:`@keyframes lifecycle-status-card-indeterminate {
|
|
21
21
|
0% { transform: translateX(-120%); }
|
|
22
22
|
55% { transform: translateX(150%); }
|
|
23
23
|
100% { transform: translateX(330%); }
|
|
24
|
-
}`})]}):
|
|
24
|
+
}`})]}):G(Eo,{"aria-label":"Progress","data-progress-mode":"determinate",value:n})]})},ng=({milestones:t})=>{if(t===void 0||t.length===0)return null;return G("ol",{className:"space-y-3","data-slot":"lifecycle-status-card-milestones",children:t.map((r)=>_e("li",{className:"grid grid-cols-[auto_1fr] gap-3",children:[G("span",{"aria-hidden":!0,className:e("mt-1.5 size-2 rounded-full",eg(r.tone))}),_e("div",{className:"min-w-0",children:[G("div",{className:"text-sm font-medium leading-5 text-foreground",children:r.label}),Yt(r.description)?G("div",{className:"text-sm leading-5 text-muted-foreground",children:r.description}):null]})]},r.id))})},og=({context:t,slots:r})=>_e("div",{className:"grid grid-cols-[auto_1fr] gap-3 sm:grid-cols-[auto_1fr_auto]",children:[G("div",{className:"pt-0.5",children:ut(r?.icon,t)??G(tg,{model:t.model})}),_e("div",{className:"min-w-0 space-y-1",children:[G("h3",{className:"text-[15px] font-semibold leading-6 text-foreground",children:ut(r?.title,t)??t.title}),G("div",{className:"text-sm leading-6 text-muted-foreground",children:ut(r?.description,t)??t.description})]}),G(ke,{className:"col-start-2 w-fit sm:col-start-auto",variant:Zf(t.model.tone),children:t.statusLabel})]}),ag=({model:t,slots:r,className:n,...o})=>{let a={description:t.description,model:t,statusLabel:t.statusLabel,title:t.title},s=ut(r?.actions,a),i=ut(r?.completedState,a)??t.completedState,c=G(dr,{className:e("w-full gap-0 overflow-hidden py-0",n),"data-status-tone":t.tone??"default",...o,children:_e(ls,{className:"space-y-5 p-5 sm:p-6",children:[G(Uf,{context:a}),ut(r?.header,a)??G(og,{context:a,slots:r}),ut(r?.progressBody,a)??G(rg,{model:t}),ut(r?.milestoneList,a)??G(ng,{milestones:t.milestones}),Yt(i)?G("div",{"data-slot":"lifecycle-status-card-completed",children:i}):null,t.error?ut(r?.errorPanel,a)??G(Kf,{error:t.error}):null,Yt(s)?G("div",{className:"flex min-h-9 flex-wrap items-center gap-2 border-t border-border pt-4","data-slot":"lifecycle-status-card-actions",children:s}):null]})});return r?.shell?r.shell({...a,children:c}):c};import*as Ul from"react";import{jsx as Xl}from"react/jsx-runtime";var sg=({rows:t=5,rowClassName:r,className:n,...o},a)=>Xl("div",{ref:a,"aria-label":"Loading",className:e("flex flex-col gap-2",n),...o,children:Array.from({length:t}).map((s,i)=>Xl(yo,{className:e("h-10 w-full",r)},i))}),Kl=Ul.forwardRef(sg);Kl.displayName="SkeletonRows";var ig=Kl;import*as ql from"react";import{jsx as nn,jsxs as Yl}from"react/jsx-runtime";var Zl=ql.forwardRef(function({icon:r,illustration:n,title:o,description:a,action:s,secondaryAction:i,size:c="md",variant:d="bare",className:u,...p},m){let f=c==="sm",b=Boolean(n),g=!f&&!b,h=r??nn(ns,{className:"h-6 w-6"}),T=Boolean(a),R=Boolean(s)||Boolean(i),y=null;if(b)y=nn("div",{className:e("flex items-center justify-center","[&_svg]:w-auto",f?"mb-3 [&_svg]:h-16":"mb-5 [&_svg]:h-24"),children:n});else if(g)y=nn("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-md bg-(--bg-accent-soft) text-(--brand)",children:h});return Yl("div",{ref:m,"data-slot":"empty-state","data-size":c,"data-variant":d,className:e("mx-auto flex w-full max-w-130 flex-col items-center justify-center rounded-lg px-6 text-center",d==="framed"&&"border border-dashed border-(--border-default)",f?"py-8":"px-8 py-14",u),...p,children:[y,nn("h3",{className:e("font-semibold text-(--text-primary)",f?"text-[14px]":"text-[15px]"),children:o}),T?nn("p",{className:e("mt-1 max-w-sm leading-relaxed text-(--text-secondary)",f?"text-[12px]":"text-[13px]"),children:a}):null,R?Yl("div",{className:e("flex flex-wrap items-center justify-center gap-2",f?"mt-4":"mt-5"),children:[s,i]}):null]})});Zl.displayName="EmptyState";var lg=Zl;import*as Ql from"react";import{jsx as Qe,jsxs as on,Fragment as dg}from"react/jsx-runtime";var cg=(t)=>Object.prototype.toString.call(t)==="[object String]",ec=Ql.forwardRef(function({title:r="Something went wrong",message:n,detail:o,detailLabel:a="Show technical details",detailHeading:s="Inner error detail",defaultOpen:i=!1,className:c,...d},u){let p=Boolean(o);return Qe(Y,{ref:u,defaultOpen:i&&p,"data-slot":"technical-error-disclosure",className:e("rounded-md border border-destructive/25 bg-destructive/[0.035] p-4 text-sm","shadow-[inset_0_1px_0_rgba(255,255,255,0.48)]",c),...d,children:on("div",{className:"grid grid-cols-[auto_minmax(0,1fr)] gap-3",children:[Qe("span",{className:"mt-0.5 flex size-7 items-center justify-center rounded-md bg-destructive/10 text-destructive",children:Qe(Xo,{className:"size-4","aria-hidden":"true"})}),on("div",{className:"min-w-0",children:[Qe("div",{className:"font-semibold text-foreground",children:r}),Qe("div",{className:"mt-1 leading-6 text-muted-foreground",children:n}),p?on(dg,{children:[on(K,{className:e("group mt-3 inline-flex items-center gap-1.5 rounded-md","text-xs font-medium text-destructive underline-offset-4","transition-[color,transform] hover:underline","focus-visible:outline-none focus-visible:ring-2","focus-visible:ring-ring focus-visible:ring-offset-2","active:translate-y-px"),children:[Qe(E,{className:"size-3.5 transition-transform group-data-panel-open:rotate-180","aria-hidden":"true"}),a]}),Qe(Q,{children:on("div",{className:"mt-3 rounded-md border border-destructive/15 bg-background/70 p-3",children:[Qe("div",{className:"mb-2 text-[11px] font-medium uppercase tracking-[0.08em] text-muted-foreground",children:s}),cg(o)?Qe("pre",{className:"max-h-52 overflow-auto whitespace-pre-wrap break-words font-mono text-xs leading-5 text-foreground",children:o}):Qe("div",{className:"text-xs leading-5 text-foreground",children:o})]})})]}):null]})]})})});ec.displayName="TechnicalErrorDisclosure";var ug=ec;import{jsx as ba,jsxs as mg}from"react/jsx-runtime";var pg=({icon:t,title:r="Loading...",className:n,spinnerSize:o=30})=>mg("div",{className:e("min-h-screen flex flex-col items-center justify-center gap-6 bg-background",n),children:[t!==void 0&&t!==null&&t!==!1&&t!==""&&t!==0&&ba("div",{children:t}),ba("h1",{className:"text-2xl font-semibold text-center",children:r}),ba(Dr,{size:o})]}),fg=pg;import{jsx as ao,jsxs as bg}from"react/jsx-runtime";var gg=({children:t,className:r,classes:n,loading:o=!1,coverImage:a})=>ao("div",{className:e("min-h-screen flex items-center justify-center",n?.root,r),children:bg("div",{className:e("flex flex-col md:flex-row w-full min-h-[100vh] max-h-[100vh] overflow-hidden",n?.content),children:[ao("div",{className:e("hidden md:flex flex-1 items-center justify-center overflow-hidden bg-black",n?.left),children:a}),ao("div",{className:e("flex-1 flex flex-col items-center justify-center gap-4 bg-background p-6 md:p-8",n?.right),children:o?ao(Dr,{size:48}):t})]})}),vg=gg;export{pc as ActionButton,gc as AddItemButton,fg as AppLoadingLayout,Td as ArrayInput,yn as CardOption,Hs as CardOptionsBlock,qd as CheckboxCardOption,Kd as ChoiceCard,Ud as ChoiceCardGroup,Sc as CollectiveIntelligenceLoader,Qd as CommandStep,Bm as ConfirmDialog,Rc as CopyButton,Gd as CoverImage,zd as CronBuilder,ru as CurrencyInput,xc as DateInput,Nc as DisplayHeading,lg as EmptyState,Jf as ErrorAlert,kc as ErrorMessage,nu as FieldRow,uu as FileDropArea,fu as FilterChips,hu as FlowBand,wu as FlowBranch,xu as FlowStep,ld as FormFrame,Ec as FormattedNumber,ud as Grid,Su as GuideStep,ku as HierarchyTree,ri as HierarchyTreeBody,ti as HierarchyTreeHeader,ni as HierarchyTreeRow,oi as HierarchyTreeToggle,Oc as IconTile,Fo as JsonViewer,Gu as JsonViewerDialog,Fc as Kicker,zs as LabeledField,Wf as LaneProgress,ag as LifecycleStatusCard,Xu as LinkedItem,Ju as MarkdownEditorPreview,ai as MarkdownEditorPreviewToggle,Ku as MaskedValue,qu as MutedPlaceholder,rp as ObjectSchemaExplorer,gd as PageRoot,hd as PageTitle,Yd as RadioCardOption,Vs as RadioCardOptionsBlock,Yc as Ring,qm as SearchField,xd as SectionHeader,El as SectionSwitcher,Xc as SerifNumeral,Jc as ShowMoreTag,ig as SkeletonRows,Vm as SortableList,vg as SplashScreenLayout,vf as SplitButton,hf as SplitButtonAction,xf as SplitButtonMenu,Fm as StageHeader,$m as StatTile,ed as StatusDot,Xm as StatusPill,lf as Stepper,bf as StepperContent,pf as StepperIndicator,df as StepperItem,cf as StepperNav,gf as StepperPanel,ff as StepperSeparator,mf as StepperTitle,uf as StepperTrigger,Xd as SummaryItem,Wd as SummaryList,nf as TabActions,af as TabActionsRow,rf as TabActionsScope,Ll as TabActionsSlot,of as TabCount,Nd as TableHead,Nf as TechnicalDetailsPopover,ug as TechnicalErrorDisclosure,Ss as ThemeToggle,vn as TimezonePicker,nd as TooltipBadge,Vl as TreeSelect,un as Typography,Lf as ValueRow,Ff as VariableReferenceField,$f as XmlViewerDialog,Rt as buildCron,Oe as defaultSimpleState,gn as describeCron,Da as displayHeadingVariants,ho as getTimezoneOptions,bo as isValidCron,_r as parseCron,en as useIsMobile};
|