@lunora/studio 1.0.0-alpha.37 → 1.0.0-alpha.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -10
- package/dist/mount.js +1 -1
- package/dist/packem_chunks/ApiTab.js +3 -3
- package/dist/packem_chunks/AuditPanel.js +3 -3
- package/dist/packem_chunks/ExportImportPanel.js +2 -2
- package/dist/packem_chunks/FileBrowser.js +2 -2
- package/dist/packem_chunks/FunctionRunner.js +1 -1
- package/dist/packem_chunks/FunctionStatsPanel.js +3 -3
- package/dist/packem_chunks/HealthPanel.js +2 -2
- package/dist/packem_chunks/InsightsPanel.js +3 -3
- package/dist/packem_chunks/LogsPanel.js +2 -2
- package/dist/packem_chunks/MailPanel.js +3 -3
- package/dist/packem_chunks/MetricsPanel.js +2 -2
- package/dist/packem_chunks/MigrationsPanel.js +3 -3
- package/dist/packem_chunks/PitrPanel.js +1 -1
- package/dist/packem_chunks/SchemaViewer.js +1 -1
- package/dist/packem_chunks/SecurityAdvisorPanel.js +2 -2
- package/dist/packem_chunks/SettingsPanel.js +2 -2
- package/dist/packem_chunks/SqlEditorPanel.js +149 -139
- package/dist/packem_chunks/TableEditor.js +3 -3
- package/dist/packem_chunks/analytics-panel.js +1 -1
- package/dist/packem_chunks/auth-config-panel.js +291 -105
- package/dist/packem_chunks/auth-sessions-panel.js +2 -2
- package/dist/packem_chunks/containers-panel.js +1 -1
- package/dist/packem_chunks/dashboards-panel.js +2 -2
- package/dist/packem_chunks/fanout-panel.js +2 -2
- package/dist/packem_chunks/flags-panel.js +2 -2
- package/dist/packem_chunks/kv-browser.js +2 -2
- package/dist/packem_chunks/log-drains-panel.js +1 -1
- package/dist/packem_chunks/organizations-panel.js +3003 -495
- package/dist/packem_chunks/payments-panel.js +3 -3
- package/dist/packem_chunks/permissions-panel.js +3 -3
- package/dist/packem_chunks/queues-panel.js +242 -219
- package/dist/packem_chunks/rls-panel.js +2 -2
- package/dist/packem_chunks/schedule-panel.js +3 -3
- package/dist/packem_chunks/storage-rules-panel.js +2 -2
- package/dist/packem_chunks/subscriptions-panel.js +2 -2
- package/dist/packem_chunks/users-panel.js +577 -111
- package/dist/packem_chunks/vector-browser.js +1 -1
- package/dist/packem_chunks/workflows-panel.js +2 -2
- package/dist/packem_shared/{ApiDocsPanel-D4CJf2ad.js → ApiDocsPanel-CBma-lnp.js} +1 -1
- package/dist/packem_shared/{ApiReferencePanel-Co_wpRF2.js → ApiReferencePanel-CQM3pPN7.js} +1 -1
- package/dist/packem_shared/{CommandPalette-BUPpbpMc.js → CommandPalette-X2tkbyHk.js} +1 -1
- package/dist/packem_shared/{DataBrowser-BeVNxSVm.js → DataBrowser-D2ywrdId.js} +5 -5
- package/dist/packem_shared/{GlobalDataBrowser-ErfvIs1S.js → GlobalDataBrowser-BkTPLzAY.js} +3 -3
- package/dist/packem_shared/{HomePanel-D9MQk8I7.js → HomePanel-D1Q9LZgK.js} +3 -3
- package/dist/packem_shared/{OpenRpcReferencePanel-DLWzrIx9.js → OpenRpcReferencePanel-Dno-hfDb.js} +1 -1
- package/dist/packem_shared/{ScheduledJobs-ClaNpZsg.js → ScheduledJobs-Ctw4jYtU.js} +2 -2
- package/dist/packem_shared/{Studio-C48P1K5W.js → Studio-lJhzDAze.js} +4 -4
- package/dist/packem_shared/{StudioApp-Cqh-SYm2.js → StudioApp-DiMkupvZ.js} +3 -12
- package/dist/packem_shared/{advisor-view-D3-U4kRR.js → advisor-view-BX8OhG0w.js} +1 -1
- package/dist/packem_shared/{browser-storage-tLOxkIHd.js → browser-storage-BTrX4y3B.js} +32 -2
- package/dist/packem_shared/{data-grid-Jz8FqQ2C.js → data-grid-CdXztApG.js} +1 -1
- package/dist/packem_shared/{error-alert-BBT6D22d.js → error-alert-CXjqyGw9.js} +1 -1
- package/dist/packem_shared/{grid-features-CUr8Z1_O.js → grid-features-BF-KBDFz.js} +128 -65
- package/dist/packem_shared/{home-panel-CoGxi-oj.js → home-panel-TFcRf9Ui.js} +272 -22
- package/dist/packem_shared/{internal-DTsYVn-g.js → internal-CYcbqMjX.js} +15 -3
- package/dist/packem_shared/{reference-view-CSKyUyPl.js → reference-view-DUiJcILV.js} +1 -1
- package/dist/packem_shared/{studio-CPHA_-3I.js → studio-Dh9UlaF_.js} +3 -3
- package/dist/packem_shared/{table-list-sidebar-B5psdSV1.js → table-list-sidebar-UVIXQJdU.js} +1 -1
- package/dist/packem_shared/{use-admin-query-BHPKmPuj.js → use-admin-query-CfHYWx5n.js} +1 -1
- package/dist/packem_shared/use-async-submit-DJQiPc-_.js +91 -0
- package/dist/standalone/{chunk-M55U7NHO.js → chunk-23C4TCRO.js} +1 -1
- package/dist/standalone/{chunk-TO4JQX7W.js → chunk-5ZAA2PVR.js} +1 -1
- package/dist/standalone/{chunk-MPTM7ZU3.js → chunk-676HEBIR.js} +1 -1
- package/dist/standalone/{chunk-Y2ZPNDL7.js → chunk-6VO23MMW.js} +1 -1
- package/dist/standalone/{chunk-OIZ4CHPN.js → chunk-7RE5UW27.js} +1 -1
- package/dist/standalone/chunk-7YXOPTWI.js +1 -0
- package/dist/standalone/{chunk-QLM6FYZW.js → chunk-AAVIFQ4Y.js} +1 -1
- package/dist/standalone/{chunk-ATYUMPDM.js → chunk-AJFQ3LNM.js} +1 -1
- package/dist/standalone/chunk-AJULNB46.js +4 -0
- package/dist/standalone/{chunk-6GFEVKJP.js → chunk-BGXOXASQ.js} +1 -1
- package/dist/standalone/{chunk-2THHW7BC.js → chunk-BKW7FFEO.js} +1 -1
- package/dist/standalone/{chunk-YEVCU7TB.js → chunk-BXOYVWJR.js} +1 -1
- package/dist/standalone/{chunk-DVKPRFIJ.js → chunk-C7WTJLC3.js} +1 -1
- package/dist/standalone/{chunk-AJIUI7DD.js → chunk-CACB34RQ.js} +1 -1
- package/dist/standalone/{chunk-DVC6YWVP.js → chunk-CICVBMEN.js} +1 -1
- package/dist/standalone/{chunk-DWTBY343.js → chunk-CWEAJUHW.js} +1 -1
- package/dist/standalone/{chunk-TOJ3TC35.js → chunk-DECHEGIC.js} +1 -1
- package/dist/standalone/{chunk-PVZI3CXP.js → chunk-E75ANNWX.js} +7 -7
- package/dist/standalone/{chunk-OCHNCAXJ.js → chunk-ERJNDIXC.js} +1 -1
- package/dist/standalone/{chunk-RRAFQ5G2.js → chunk-FKACHRWO.js} +1 -1
- package/dist/standalone/{chunk-46K3NKPA.js → chunk-FSGCANAU.js} +1 -1
- package/dist/standalone/chunk-GLUNBZRI.js +1 -0
- package/dist/standalone/{chunk-5OH3VPZF.js → chunk-H6RKXQZU.js} +1 -1
- package/dist/standalone/chunk-HZTGDL4L.js +1 -0
- package/dist/standalone/{chunk-FCSPAJW4.js → chunk-I7ZZRM7I.js} +1 -1
- package/dist/standalone/{chunk-764T6X6X.js → chunk-IXDH4GL5.js} +1 -1
- package/dist/standalone/{chunk-ZU4DZ6NK.js → chunk-J46WXQYL.js} +1 -1
- package/dist/standalone/{chunk-PACH5AHG.js → chunk-JVODY4EP.js} +1 -1
- package/dist/standalone/chunk-KSKXW5PX.js +1 -0
- package/dist/standalone/chunk-L7SK4ZZD.js +1 -0
- package/dist/standalone/chunk-LNZIB2MD.js +1 -0
- package/dist/standalone/{chunk-LD2R263D.js → chunk-LYB5L53X.js} +1 -1
- package/dist/standalone/chunk-MJWVMKQ4.js +6 -0
- package/dist/standalone/chunk-MT2J3H7O.js +3 -0
- package/dist/standalone/{chunk-VTGBPW24.js → chunk-N746FOQP.js} +1 -1
- package/dist/standalone/{chunk-U4OAQPBT.js → chunk-NC6MBMSI.js} +1 -1
- package/dist/standalone/chunk-NN27EDQB.js +1 -0
- package/dist/standalone/chunk-NY6GDADQ.js +1 -0
- package/dist/standalone/{chunk-JE2YOAB7.js → chunk-OY3HD7BJ.js} +1 -1
- package/dist/standalone/{chunk-ILCTSAOB.js → chunk-P5HJXCZS.js} +1 -1
- package/dist/standalone/chunk-PTS5TW3J.js +1 -0
- package/dist/standalone/chunk-QDBOPDJ7.js +1 -0
- package/dist/standalone/{chunk-7SLSB2TS.js → chunk-QHFTGJPS.js} +2 -2
- package/dist/standalone/chunk-SSI4G2MY.js +1 -0
- package/dist/standalone/chunk-TH45YG6Q.js +1 -0
- package/dist/standalone/{chunk-WXPWVBIY.js → chunk-UGUEC6BC.js} +1 -1
- package/dist/standalone/{chunk-K3GNLVYK.js → chunk-UKDJ4H7I.js} +1 -1
- package/dist/standalone/chunk-V6IWFYAQ.js +1 -0
- package/dist/standalone/{chunk-BQUQS7QN.js → chunk-V7SRH36W.js} +1 -1
- package/dist/standalone/chunk-VON7JUPG.js +1 -0
- package/dist/standalone/{chunk-X5P2WRYI.js → chunk-WPNXY7IS.js} +1 -1
- package/dist/standalone/{chunk-PZ7HD5T2.js → chunk-X33MSJPP.js} +1 -1
- package/dist/standalone/{chunk-BI35RXKQ.js → chunk-XRNXOIVZ.js} +1 -1
- package/dist/standalone/{chunk-TDL7NEWA.js → chunk-YBGC4PPD.js} +1 -1
- package/dist/standalone/{chunk-XLQ4BHBD.js → chunk-YNZ7ARWW.js} +1 -1
- package/dist/standalone/{chunk-SLKF2L74.js → chunk-YTO65GHS.js} +1 -1
- package/dist/standalone/{chunk-6WRZP62V.js → chunk-ZE6FT5Z3.js} +1 -1
- package/dist/standalone/studio.js +31 -31
- package/dist/styles.css +1 -1
- package/package.json +4 -4
- package/dist/packem_shared/use-auth-capabilities-C-VH0oJJ.js +0 -32
- package/dist/standalone/chunk-22W5VKZ6.js +0 -1
- package/dist/standalone/chunk-2GGMGPEP.js +0 -1
- package/dist/standalone/chunk-7VF3IAAW.js +0 -2
- package/dist/standalone/chunk-BACPICH6.js +0 -1
- package/dist/standalone/chunk-DORBUITF.js +0 -1
- package/dist/standalone/chunk-EUIHTPKI.js +0 -1
- package/dist/standalone/chunk-IOFMK4D7.js +0 -1
- package/dist/standalone/chunk-LI43EKM6.js +0 -1
- package/dist/standalone/chunk-MPYFGAOW.js +0 -1
- package/dist/standalone/chunk-NKJDGOM3.js +0 -1
- package/dist/standalone/chunk-OY3GVYS7.js +0 -4
- package/dist/standalone/chunk-PN5NCZDX.js +0 -1
- package/dist/standalone/chunk-RSEEHNFI.js +0 -1
- package/dist/standalone/chunk-X7MMBSNW.js +0 -1
- package/dist/standalone/chunk-XUGSA2NG.js +0 -1
- package/dist/standalone/chunk-ZYRGPDZB.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as U}from"./chunk-J6J54MBP.js";import{a as G}from"./chunk-TDL7NEWA.js";import{a as W,b as H,c as K,d as F,e as p,f as x}from"./chunk-GTM65MVX.js";import{c as te}from"./chunk-UK64ZSUW.js";import"./chunk-O3NAGRTR.js";import{a as R}from"./chunk-TAD43CG5.js";import{a as Q}from"./chunk-DVKPRFIJ.js";import{a as A,e as D}from"./chunk-SEU5V7I6.js";import{b as ee}from"./chunk-ZPP2KOR4.js";import"./chunk-CKSHCYGC.js";import{f as P}from"./chunk-X7MMBSNW.js";import"./chunk-ZHVTQ37P.js";import"./chunk-3OA7PECS.js";import{d as q,g as Y,k as V,n as j}from"./chunk-PVZI3CXP.js";import"./chunk-GMSGZDDH.js";import{a as f,e as M,f as oe,g as se,h as re}from"./chunk-RRCPZMC2.js";var Z=M(se(),1),z=M(oe(),1);var t=M(re(),1);var ae=M(se(),1);var X=M(oe(),1);var u=M(re(),1);var ce=f(s=>Number.isFinite(s)?j(s,"\u2014"):"\u2014","formatScheduledFor"),ie=f(s=>s.toSorted((e,c)=>e.scheduledFor-c.scheduledFor),"sortByDue"),de=f(s=>{let e=(0,ae.c)(33),c;e[0]!==s?(c=s===void 0?{}:s,e[0]=s,e[1]=c):c=e[1];let{cancelJob:n,loadJobs:m}=c,r=P(),o=q(),l=m===void 0,k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k=["lunora-scheduled-jobs"],e[2]=k):k=e[2];let v;e[3]!==r||e[4]!==m?(v=f(async()=>{let d=await(m??(()=>r.listScheduledJobs()))();return ie(d)},"t3"),e[3]=r,e[4]=m,e[5]=v):v=e[5];let a=Q(k,v),[i,h]=(0,X.useState)(void 0),[S,C]=(0,X.useState)(void 0),g,T;e[6]!==r||e[7]!==l?(g=f(()=>{if(l)return r.subscribeScheduledJobs(d=>{C(void 0),h(ie(d))})},"t4"),T=[l,r],e[6]=r,e[7]=l,e[8]=g,e[9]=T):(g=e[8],T=e[9]),(0,X.useEffect)(g,T);let b;e[10]!==a?(b=f(()=>{a.refetch()},"t6"),e[10]=a,e[11]=b):b=e[11],U(b,!l);let J;e:{if(n!==void 0){J=n;break e}let d;e[12]!==r||e[13]!==m?(d=m===void 0?O=>r.cancelScheduledJob(O):void 0,e[12]=r,e[13]=m,e[14]=d):d=e[14],J=d}let y=J,w=i??a.data,$=S??a.error,I;e[15]!==y||e[16]!==a||e[17]!==l?(I=f(async d=>{if(y!==void 0){C(void 0);try{await y(d),l||a.refetch()}catch(O){C(Y(O))}}},"t8"),e[15]=y,e[16]=a,e[17]=l,e[18]=I):I=e[18];let E=I,L;e[19]!==$?(L=$!==null&&(0,u.jsxDEV)("p",{className:"text-sm text-destructive","data-testid":"sj-error",role:"alert",children:$},void 0,!1),e[19]=$,e[20]=L):L=e[20];let N;e[21]!==w?.length||e[22]!==o?(N=w?.length===0&&(0,u.jsxDEV)(R,{description:o("Jobs queued with runAfter / runAt will appear here."),icon:(0,u.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,u.jsxDEV)("circle",{cx:"12",cy:"12",r:"9"},void 0,!1),(0,u.jsxDEV)("path",{d:"M12 7.5V12l4 2"},void 0,!1)]},void 0,!0),testId:"sj-empty",title:o("No scheduled jobs.")},void 0,!1),e[21]=w?.length,e[22]=o,e[23]=N):N=e[23];let B;e[24]!==E||e[25]!==y||e[26]!==w||e[27]!==o?(B=w!==void 0&&w.length>0&&(0,u.jsxDEV)(A,{className:"overflow-hidden py-0",children:(0,u.jsxDEV)(D,{className:"px-0",children:(0,u.jsxDEV)(W,{"data-testid":"sj-table",children:[(0,u.jsxDEV)(H,{children:(0,u.jsxDEV)(F,{children:[(0,u.jsxDEV)(p,{children:o("function")},void 0,!1),(0,u.jsxDEV)(p,{children:o("scheduled for")},void 0,!1),(0,u.jsxDEV)(p,{children:o("pool")},void 0,!1),(0,u.jsxDEV)(p,{children:o("attempts")},void 0,!1),(0,u.jsxDEV)(p,{children:o("shard")},void 0,!1),(0,u.jsxDEV)(p,{children:o("id")},void 0,!1),y!==void 0&&(0,u.jsxDEV)(p,{"aria-label":o("Actions")},void 0,!1)]},void 0,!0)},void 0,!1),(0,u.jsxDEV)(K,{children:w.map(d=>(0,u.jsxDEV)(F,{"data-testid":`sj-row-${d.id}`,children:[(0,u.jsxDEV)(x,{className:"font-mono text-xs",children:d.functionPath},void 0,!1),(0,u.jsxDEV)(x,{className:"text-muted-foreground tabular-nums",children:ce(d.scheduledFor)},void 0,!1),(0,u.jsxDEV)(x,{className:"font-mono text-xs",children:d.pool??""},void 0,!1),(0,u.jsxDEV)(x,{className:"tabular-nums",children:d.attempts??0},void 0,!1),(0,u.jsxDEV)(x,{children:d.shardKey??""},void 0,!1),(0,u.jsxDEV)(x,{className:"font-mono text-xs",children:d.id},void 0,!1),y!==void 0&&(0,u.jsxDEV)(x,{className:"text-right",children:(0,u.jsxDEV)(G,{confirmLabel:o("Cancel job?"),onConfirm:f(()=>{V(E(d.id))},"onConfirm"),testId:`sj-cancel-${d.id}`,children:o("Cancel")},void 0,!1)},void 0,!1)]},d.id,!0))},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1),e[24]=E,e[25]=y,e[26]=w,e[27]=o,e[28]=B):B=e[28];let _;return e[29]!==N||e[30]!==B||e[31]!==L?(_=(0,u.jsxDEV)("div",{className:"flex flex-col gap-3","data-testid":"lunora-scheduled-jobs",children:[L,N,B]},void 0,!0),e[29]=N,e[30]=B,e[31]=L,e[32]=_):_=e[32],_},"ScheduledJobs");var fe={kind:"idle"},ue=f(({loadCronJobs:s,runCronJob:e}={})=>{let c=P(),n=q(),[m,r]=(0,z.useState)({}),o=Q(["lunora-cron-jobs",s?"custom":"default"],()=>(s??(()=>c.getCronJobs()))()),{data:l,error:k}=o,v=(0,z.useMemo)(()=>e!==void 0?e:s===void 0?i=>c.runCronJob(i):void 0,[c,s,e]),a=f(async i=>{if(v!==void 0){r(h=>({...h,[i]:{kind:"running"}}));try{await v(i),r(h=>({...h,[i]:{kind:"ok"}})),o.refetch()}catch(h){r(S=>({...S,[i]:{kind:"error",message:Y(h)}}))}}},"run");return(0,t.jsxDEV)("div",{className:"flex flex-col gap-3","data-testid":"lunora-cron-triggers",children:[k!==null&&(0,t.jsxDEV)("p",{className:"text-sm text-destructive","data-testid":"cron-error",role:"alert",children:k},void 0,!1),l?.length===0&&(0,t.jsxDEV)(R,{description:n("Triggers declared with the cronJobs() builder appear here."),icon:(0,t.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,t.jsxDEV)("circle",{cx:"12",cy:"12",r:"9"},void 0,!1),(0,t.jsxDEV)("path",{d:"M12 7.5V12l4 2"},void 0,!1)]},void 0,!0),testId:"cron-empty",title:n("No cron triggers.")},void 0,!1),l!==void 0&&l.length>0&&(0,t.jsxDEV)(A,{className:"overflow-hidden py-0",children:(0,t.jsxDEV)(D,{className:"px-0",children:(0,t.jsxDEV)(W,{"data-testid":"cron-table",children:[(0,t.jsxDEV)(H,{children:(0,t.jsxDEV)(F,{children:[(0,t.jsxDEV)(p,{children:n("name")},void 0,!1),(0,t.jsxDEV)(p,{children:n("schedule")},void 0,!1),(0,t.jsxDEV)(p,{children:n("target")},void 0,!1),(0,t.jsxDEV)(p,{children:n("shard")},void 0,!1),v!==void 0&&(0,t.jsxDEV)(p,{"aria-label":n("Actions")},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)(K,{children:l.map(i=>{let h=m[i.name]??fe;return(0,t.jsxDEV)(F,{"data-testid":`cron-row-${i.name}`,children:[(0,t.jsxDEV)(x,{children:i.name},void 0,!1),(0,t.jsxDEV)(x,{className:"font-mono text-xs tabular-nums",children:i.cron},void 0,!1),(0,t.jsxDEV)(x,{children:(0,t.jsxDEV)("span",{className:"flex items-center gap-2",children:[i.workflow===void 0?(0,t.jsxDEV)(ee,{variant:"outline",children:n("function")},void 0,!1):(0,t.jsxDEV)(ee,{variant:"secondary",children:n("workflow")},void 0,!1),(0,t.jsxDEV)("span",{className:"font-mono text-xs",children:i.workflow??i.functionPath},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)(x,{children:i.shardKey??""},void 0,!1),v!==void 0&&(0,t.jsxDEV)(x,{className:"text-right",children:(0,t.jsxDEV)("span",{className:"flex items-center justify-end gap-2",children:[h.kind==="ok"&&(0,t.jsxDEV)("span",{className:"text-xs text-muted-foreground","data-testid":`cron-ran-${i.name}`,children:n("ran")},void 0,!1),h.kind==="error"&&(0,t.jsxDEV)("span",{className:"text-xs text-destructive","data-testid":`cron-run-error-${i.name}`,role:"alert",children:h.message},void 0,!1),(0,t.jsxDEV)(G,{confirmLabel:n("Run now?"),disabled:h.kind==="running",onConfirm:f(()=>{V(a(i.name))},"onConfirm"),testId:`cron-run-${i.name}`,children:h.kind==="running"?n("Running\u2026"):n("Run now")},void 0,!1)]},void 0,!0)},void 0,!1)]},`${i.cron}:${i.name}`,!0)})},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1)]},void 0,!0)},"CronTriggersPanel"),he=f(s=>Number.isFinite(s)?j(s,"\u2014"):"\u2014","formatScheduledFor"),ve=f(s=>{let e=(0,Z.c)(34),c;e[0]!==s?(c=s===void 0?{}:s,e[0]=s,e[1]=c):c=e[1];let{loadJobs:n,removeJob:m,retryJob:r}=c,o=P(),l=q(),k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k=["lunora-dead-jobs"],e[2]=k):k=e[2];let v;e[3]!==o||e[4]!==n?(v=f(async()=>(await(n??(()=>o.listDeadJobs()))()).toSorted(me),"t3"),e[3]=o,e[4]=n,e[5]=v):v=e[5];let a=Q(k,v),i=a.data,[h,S]=(0,z.useState)(void 0),C=a.error??h,g=n===void 0,T;e[6]!==o||e[7]!==g||e[8]!==r?(T=r??(g?d=>o.retryDeadJob(d):void 0),e[6]=o,e[7]=g,e[8]=r,e[9]=T):T=e[9];let b=T,J;e[10]!==o||e[11]!==g||e[12]!==m?(J=m??(g?d=>o.removeDeadJob(d):void 0),e[10]=o,e[11]=g,e[12]=m,e[13]=J):J=e[13];let y=J,w;e[14]!==a?(w=f(()=>{a.refetch()},"t6"),e[14]=a,e[15]=w):w=e[15],U(w,!0);let $;e[16]!==a?($=f(async d=>{S(void 0);try{await d,a.refetch()}catch(O){S(Y(O))}},"t7"),e[16]=a,e[17]=$):$=e[17];let I=$,E=b!==void 0||y!==void 0,L;e[18]!==C?(L=C!==void 0&&(0,t.jsxDEV)("p",{className:"text-sm text-destructive","data-testid":"dlq-error",role:"alert",children:C},void 0,!1),e[18]=C,e[19]=L):L=e[19];let N;e[20]!==i?.length||e[21]!==l?(N=i?.length===0&&(0,t.jsxDEV)(R,{description:l("Jobs that exhaust their retry budget are parked here instead of being dropped."),icon:(0,t.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,t.jsxDEV)("path",{d:"M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14"},void 0,!1)},void 0,!1),testId:"dlq-empty",title:l("No dead-letter jobs.")},void 0,!1),e[20]=i?.length,e[21]=l,e[22]=N):N=e[22];let B;e[23]!==I||e[24]!==E||e[25]!==i||e[26]!==y||e[27]!==b||e[28]!==l?(B=i!==void 0&&i.length>0&&(0,t.jsxDEV)(A,{className:"overflow-hidden py-0",children:(0,t.jsxDEV)(D,{className:"px-0",children:(0,t.jsxDEV)(W,{"data-testid":"dlq-table",children:[(0,t.jsxDEV)(H,{children:(0,t.jsxDEV)(F,{children:[(0,t.jsxDEV)(p,{children:l("function")},void 0,!1),(0,t.jsxDEV)(p,{children:l("attempts")},void 0,!1),(0,t.jsxDEV)(p,{children:l("last tried")},void 0,!1),(0,t.jsxDEV)(p,{children:l("pool")},void 0,!1),(0,t.jsxDEV)(p,{children:l("shard")},void 0,!1),(0,t.jsxDEV)(p,{children:l("id")},void 0,!1),E&&(0,t.jsxDEV)(p,{"aria-label":l("Actions")},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)(K,{children:i.map(d=>(0,t.jsxDEV)(F,{"data-testid":`dlq-row-${d.id}`,children:[(0,t.jsxDEV)(x,{className:"font-mono text-xs",children:d.functionPath},void 0,!1),(0,t.jsxDEV)(x,{className:"tabular-nums",children:d.attempts??0},void 0,!1),(0,t.jsxDEV)(x,{className:"text-muted-foreground tabular-nums",children:he(d.scheduledFor)},void 0,!1),(0,t.jsxDEV)(x,{className:"font-mono text-xs",children:d.pool??""},void 0,!1),(0,t.jsxDEV)(x,{children:d.shardKey??""},void 0,!1),(0,t.jsxDEV)(x,{className:"font-mono text-xs",children:d.id},void 0,!1),E&&(0,t.jsxDEV)(x,{className:"text-right",children:(0,t.jsxDEV)("div",{className:"flex justify-end gap-1.5",children:[b!==void 0&&(0,t.jsxDEV)(te,{"data-testid":`dlq-retry-${d.id}`,onClick:f(()=>{V(I(b(d.id)))},"onClick"),size:"sm",type:"button",variant:"outline",children:l("Retry")},void 0,!1),y!==void 0&&(0,t.jsxDEV)(G,{confirmLabel:l("Drop job?"),onConfirm:f(()=>{V(I(y(d.id)))},"onConfirm"),testId:`dlq-remove-${d.id}`,children:l("Drop")},void 0,!1)]},void 0,!0)},void 0,!1)]},d.id,!0))},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1),e[23]=I,e[24]=E,e[25]=i,e[26]=y,e[27]=b,e[28]=l,e[29]=B):B=e[29];let _;return e[30]!==B||e[31]!==L||e[32]!==N?(_=(0,t.jsxDEV)("div",{className:"flex flex-col gap-3","data-testid":"lunora-dead-letter",children:[L,N,B]},void 0,!0),e[30]=B,e[31]=L,e[32]=N,e[33]=_):_=e[33],_},"DeadLetterJobs");function me(s,e){return(e.attempts??0)-(s.attempts??0)}f(me,"_temp$1");var le=f(s=>{let e=(0,Z.c)(8),{label:c,testId:n,value:m}=s,r;e[0]!==c?(r=(0,t.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:c},void 0,!1),e[0]=c,e[1]=r):r=e[1];let o;e[2]!==n||e[3]!==m?(o=(0,t.jsxDEV)("span",{className:"text-2xl font-semibold tabular-nums","data-testid":n,children:m},void 0,!1),e[2]=n,e[3]=m,e[4]=o):o=e[4];let l;return e[5]!==r||e[6]!==o?(l=(0,t.jsxDEV)(A,{className:"flex-1 py-0",children:(0,t.jsxDEV)(D,{className:"flex flex-col gap-1 p-4",children:[r,o]},void 0,!0)},void 0,!1),e[5]=r,e[6]=o,e[7]=l):l=e[7],l},"StatTile"),pe=f(s=>{let e=(0,Z.c)(25),c;e[0]!==s?(c=s===void 0?{}:s,e[0]=s,e[1]=c):c=e[1];let{loadStatus:n}=c,m=P(),r=q(),o=n===void 0,l;e[2]!==o?(l=["lunora-scheduler-status",o],e[2]=o,e[3]=l):l=e[3];let k;e[4]!==m||e[5]!==n?(k=f(async()=>{let J=await(n??(()=>m.schedulerStatus()))();return{...J,pools:J.pools.toSorted(xe)}},"t4"),e[4]=m,e[5]=n,e[6]=k):k=e[6];let v=Q(l,k),{data:a,error:i}=v,h;e[7]!==v?(h=f(()=>{v.refetch()},"t5"),e[7]=v,e[8]=h):h=e[8],U(h,!0);let S;e[9]!==i?(S=i!==null&&(0,t.jsxDEV)("p",{className:"text-sm text-destructive","data-testid":"pools-error",role:"alert",children:i},void 0,!1),e[9]=i,e[10]=S):S=e[10];let C;e[11]!==a||e[12]!==r?(C=a!==void 0&&(0,t.jsxDEV)("div",{className:"flex gap-3","data-testid":"pools-totals",children:[(0,t.jsxDEV)(le,{label:r("backlog"),testId:"pools-backlog",value:a.backlog},void 0,!1),(0,t.jsxDEV)(le,{label:r("in flight"),testId:"pools-inflight",value:a.inFlight},void 0,!1),(0,t.jsxDEV)(le,{label:r("pools"),testId:"pools-count",value:a.pools.length},void 0,!1)]},void 0,!0),e[11]=a,e[12]=r,e[13]=C):C=e[13];let g;e[14]!==a?.pools.length||e[15]!==r?(g=a?.pools.length===0&&(0,t.jsxDEV)(R,{description:r("Pools created with createWorkpool appear here once they have activity."),icon:(0,t.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,t.jsxDEV)("path",{d:"M4 7h16M4 12h16M4 17h16"},void 0,!1)},void 0,!1),testId:"pools-empty",title:r("No workpools.")},void 0,!1),e[14]=a?.pools.length,e[15]=r,e[16]=g):g=e[16];let T;e[17]!==a||e[18]!==r?(T=a!==void 0&&a.pools.length>0&&(0,t.jsxDEV)(A,{className:"overflow-hidden py-0",children:(0,t.jsxDEV)(D,{className:"px-0",children:(0,t.jsxDEV)(W,{"data-testid":"pools-table",children:[(0,t.jsxDEV)(H,{children:(0,t.jsxDEV)(F,{children:[(0,t.jsxDEV)(p,{children:r("pool")},void 0,!1),(0,t.jsxDEV)(p,{children:r("queued")},void 0,!1),(0,t.jsxDEV)(p,{children:r("in flight")},void 0,!1),(0,t.jsxDEV)(p,{children:r("max concurrency")},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)(K,{children:a.pools.map(ge)},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1),e[17]=a,e[18]=r,e[19]=T):T=e[19];let b;return e[20]!==S||e[21]!==C||e[22]!==g||e[23]!==T?(b=(0,t.jsxDEV)("div",{className:"flex flex-col gap-3","data-testid":"lunora-scheduler-pools",children:[S,C,g,T]},void 0,!0),e[20]=S,e[21]=C,e[22]=g,e[23]=T,e[24]=b):b=e[24],b},"SchedulerPoolsPanel");function xe(s,e){return e.queued-s.queued}f(xe,"_temp");function ge(s){return(0,t.jsxDEV)(F,{"data-testid":`pools-row-${s.name}`,children:[(0,t.jsxDEV)(x,{className:"font-mono text-xs",children:s.name},void 0,!1),(0,t.jsxDEV)(x,{className:"tabular-nums",children:s.queued},void 0,!1),(0,t.jsxDEV)(x,{className:"tabular-nums",children:[s.inFlight," / ",s.maxConcurrency]},void 0,!0),(0,t.jsxDEV)(x,{className:"tabular-nums",children:s.maxConcurrency},void 0,!1)]},s.name,!0)}f(ge,"_temp2");var be=["jobs","dead","pools","cron"],We=f(s=>{let e=(0,Z.c)(41),c;e[0]!==s?(c=s===void 0?{}:s,e[0]=s,e[1]=c):c=e[1];let{loadCronJobs:n,scheduledCancel:m,scheduledLoad:r}=c,o=q(),[l,k]=(0,z.useState)("jobs"),v;e[2]!==o?(v=o("Cron triggers"),e[2]=o,e[3]=v):v=e[3];let a;e[4]!==o?(a=o("Dead letter"),e[4]=o,e[5]=a):a=e[5];let i;e[6]!==o?(i=o("Scheduled jobs"),e[6]=o,e[7]=i):i=e[7];let h;e[8]!==o?(h=o("Pools"),e[8]=o,e[9]=h):h=e[9];let S;e[10]!==v||e[11]!==a||e[12]!==i||e[13]!==h?(S={cron:v,dead:a,jobs:i,pools:h},e[10]=v,e[11]=a,e[12]=i,e[13]=h,e[14]=S):S=e[14];let C=S,g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=f(N=>{k(N.currentTarget.dataset.view)},"t7"),e[15]=g):g=e[15];let T=g,b;e[16]!==o?(b=o("Schedule view"),e[16]=o,e[17]=b):b=e[17];let J;e[18]!==l||e[19]!==C?(J=be.map(N=>(0,t.jsxDEV)(te,{"aria-selected":l===N,"data-testid":`schedule-view-${N}`,"data-view":N,onClick:T,role:"tab",size:"sm",type:"button",variant:l===N?"default":"outline",children:C[N]},N,!1)),e[18]=l,e[19]=C,e[20]=J):J=e[20];let y;e[21]!==b||e[22]!==J?(y=(0,t.jsxDEV)("div",{"aria-label":b,className:"flex gap-1.5","data-testid":"schedule-view-toggle",role:"tablist",children:J},void 0,!1),e[21]=b,e[22]=J,e[23]=y):y=e[23];let w;e[24]!==m||e[25]!==r||e[26]!==l?(w=l==="jobs"&&(0,t.jsxDEV)(de,{cancelJob:m,loadJobs:r},void 0,!1),e[24]=m,e[25]=r,e[26]=l,e[27]=w):w=e[27];let $;e[28]!==l?($=l==="dead"&&(0,t.jsxDEV)(ve,{},void 0,!1),e[28]=l,e[29]=$):$=e[29];let I;e[30]!==l?(I=l==="pools"&&(0,t.jsxDEV)(pe,{},void 0,!1),e[30]=l,e[31]=I):I=e[31];let E;e[32]!==n||e[33]!==l?(E=l==="cron"&&(0,t.jsxDEV)(ue,{loadCronJobs:n},void 0,!1),e[32]=n,e[33]=l,e[34]=E):E=e[34];let L;return e[35]!==y||e[36]!==w||e[37]!==$||e[38]!==I||e[39]!==E?(L=(0,t.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"lunora-schedule",children:[y,w,$,I,E]},void 0,!0),e[35]=y,e[36]=w,e[37]=$,e[38]=I,e[39]=E,e[40]=L):L=e[40],L},"SchedulePanel");export{We as SchedulePanel};
|
|
1
|
+
import{a as U}from"./chunk-J6J54MBP.js";import{a as G}from"./chunk-YBGC4PPD.js";import{a as W,b as H,c as K,d as F,e as p,f as x}from"./chunk-GTM65MVX.js";import{c as te}from"./chunk-UK64ZSUW.js";import"./chunk-O3NAGRTR.js";import{a as R}from"./chunk-TAD43CG5.js";import{a as Q}from"./chunk-C7WTJLC3.js";import{a as A,e as D}from"./chunk-SEU5V7I6.js";import{b as ee}from"./chunk-ZPP2KOR4.js";import"./chunk-CKSHCYGC.js";import{f as P}from"./chunk-GLUNBZRI.js";import"./chunk-ZHVTQ37P.js";import"./chunk-3OA7PECS.js";import{d as q,g as Y,k as V,o as j}from"./chunk-E75ANNWX.js";import"./chunk-GMSGZDDH.js";import{a as f,e as M,f as oe,g as se,h as re}from"./chunk-RRCPZMC2.js";var Z=M(se(),1),z=M(oe(),1);var t=M(re(),1);var ae=M(se(),1);var X=M(oe(),1);var u=M(re(),1);var ce=f(s=>Number.isFinite(s)?j(s,"\u2014"):"\u2014","formatScheduledFor"),ie=f(s=>s.toSorted((e,c)=>e.scheduledFor-c.scheduledFor),"sortByDue"),de=f(s=>{let e=(0,ae.c)(33),c;e[0]!==s?(c=s===void 0?{}:s,e[0]=s,e[1]=c):c=e[1];let{cancelJob:n,loadJobs:m}=c,r=P(),o=q(),l=m===void 0,k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k=["lunora-scheduled-jobs"],e[2]=k):k=e[2];let v;e[3]!==r||e[4]!==m?(v=f(async()=>{let d=await(m??(()=>r.listScheduledJobs()))();return ie(d)},"t3"),e[3]=r,e[4]=m,e[5]=v):v=e[5];let a=Q(k,v),[i,h]=(0,X.useState)(void 0),[S,C]=(0,X.useState)(void 0),g,T;e[6]!==r||e[7]!==l?(g=f(()=>{if(l)return r.subscribeScheduledJobs(d=>{C(void 0),h(ie(d))})},"t4"),T=[l,r],e[6]=r,e[7]=l,e[8]=g,e[9]=T):(g=e[8],T=e[9]),(0,X.useEffect)(g,T);let b;e[10]!==a?(b=f(()=>{a.refetch()},"t6"),e[10]=a,e[11]=b):b=e[11],U(b,!l);let J;e:{if(n!==void 0){J=n;break e}let d;e[12]!==r||e[13]!==m?(d=m===void 0?O=>r.cancelScheduledJob(O):void 0,e[12]=r,e[13]=m,e[14]=d):d=e[14],J=d}let y=J,w=i??a.data,$=S??a.error,I;e[15]!==y||e[16]!==a||e[17]!==l?(I=f(async d=>{if(y!==void 0){C(void 0);try{await y(d),l||a.refetch()}catch(O){C(Y(O))}}},"t8"),e[15]=y,e[16]=a,e[17]=l,e[18]=I):I=e[18];let E=I,L;e[19]!==$?(L=$!==null&&(0,u.jsxDEV)("p",{className:"text-sm text-destructive","data-testid":"sj-error",role:"alert",children:$},void 0,!1),e[19]=$,e[20]=L):L=e[20];let N;e[21]!==w?.length||e[22]!==o?(N=w?.length===0&&(0,u.jsxDEV)(R,{description:o("Jobs queued with runAfter / runAt will appear here."),icon:(0,u.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,u.jsxDEV)("circle",{cx:"12",cy:"12",r:"9"},void 0,!1),(0,u.jsxDEV)("path",{d:"M12 7.5V12l4 2"},void 0,!1)]},void 0,!0),testId:"sj-empty",title:o("No scheduled jobs.")},void 0,!1),e[21]=w?.length,e[22]=o,e[23]=N):N=e[23];let B;e[24]!==E||e[25]!==y||e[26]!==w||e[27]!==o?(B=w!==void 0&&w.length>0&&(0,u.jsxDEV)(A,{className:"overflow-hidden py-0",children:(0,u.jsxDEV)(D,{className:"px-0",children:(0,u.jsxDEV)(W,{"data-testid":"sj-table",children:[(0,u.jsxDEV)(H,{children:(0,u.jsxDEV)(F,{children:[(0,u.jsxDEV)(p,{children:o("function")},void 0,!1),(0,u.jsxDEV)(p,{children:o("scheduled for")},void 0,!1),(0,u.jsxDEV)(p,{children:o("pool")},void 0,!1),(0,u.jsxDEV)(p,{children:o("attempts")},void 0,!1),(0,u.jsxDEV)(p,{children:o("shard")},void 0,!1),(0,u.jsxDEV)(p,{children:o("id")},void 0,!1),y!==void 0&&(0,u.jsxDEV)(p,{"aria-label":o("Actions")},void 0,!1)]},void 0,!0)},void 0,!1),(0,u.jsxDEV)(K,{children:w.map(d=>(0,u.jsxDEV)(F,{"data-testid":`sj-row-${d.id}`,children:[(0,u.jsxDEV)(x,{className:"font-mono text-xs",children:d.functionPath},void 0,!1),(0,u.jsxDEV)(x,{className:"text-muted-foreground tabular-nums",children:ce(d.scheduledFor)},void 0,!1),(0,u.jsxDEV)(x,{className:"font-mono text-xs",children:d.pool??""},void 0,!1),(0,u.jsxDEV)(x,{className:"tabular-nums",children:d.attempts??0},void 0,!1),(0,u.jsxDEV)(x,{children:d.shardKey??""},void 0,!1),(0,u.jsxDEV)(x,{className:"font-mono text-xs",children:d.id},void 0,!1),y!==void 0&&(0,u.jsxDEV)(x,{className:"text-right",children:(0,u.jsxDEV)(G,{confirmLabel:o("Cancel job?"),onConfirm:f(()=>{V(E(d.id))},"onConfirm"),testId:`sj-cancel-${d.id}`,children:o("Cancel")},void 0,!1)},void 0,!1)]},d.id,!0))},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1),e[24]=E,e[25]=y,e[26]=w,e[27]=o,e[28]=B):B=e[28];let _;return e[29]!==N||e[30]!==B||e[31]!==L?(_=(0,u.jsxDEV)("div",{className:"flex flex-col gap-3","data-testid":"lunora-scheduled-jobs",children:[L,N,B]},void 0,!0),e[29]=N,e[30]=B,e[31]=L,e[32]=_):_=e[32],_},"ScheduledJobs");var fe={kind:"idle"},ue=f(({loadCronJobs:s,runCronJob:e}={})=>{let c=P(),n=q(),[m,r]=(0,z.useState)({}),o=Q(["lunora-cron-jobs",s?"custom":"default"],()=>(s??(()=>c.getCronJobs()))()),{data:l,error:k}=o,v=(0,z.useMemo)(()=>e!==void 0?e:s===void 0?i=>c.runCronJob(i):void 0,[c,s,e]),a=f(async i=>{if(v!==void 0){r(h=>({...h,[i]:{kind:"running"}}));try{await v(i),r(h=>({...h,[i]:{kind:"ok"}})),o.refetch()}catch(h){r(S=>({...S,[i]:{kind:"error",message:Y(h)}}))}}},"run");return(0,t.jsxDEV)("div",{className:"flex flex-col gap-3","data-testid":"lunora-cron-triggers",children:[k!==null&&(0,t.jsxDEV)("p",{className:"text-sm text-destructive","data-testid":"cron-error",role:"alert",children:k},void 0,!1),l?.length===0&&(0,t.jsxDEV)(R,{description:n("Triggers declared with the cronJobs() builder appear here."),icon:(0,t.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,t.jsxDEV)("circle",{cx:"12",cy:"12",r:"9"},void 0,!1),(0,t.jsxDEV)("path",{d:"M12 7.5V12l4 2"},void 0,!1)]},void 0,!0),testId:"cron-empty",title:n("No cron triggers.")},void 0,!1),l!==void 0&&l.length>0&&(0,t.jsxDEV)(A,{className:"overflow-hidden py-0",children:(0,t.jsxDEV)(D,{className:"px-0",children:(0,t.jsxDEV)(W,{"data-testid":"cron-table",children:[(0,t.jsxDEV)(H,{children:(0,t.jsxDEV)(F,{children:[(0,t.jsxDEV)(p,{children:n("name")},void 0,!1),(0,t.jsxDEV)(p,{children:n("schedule")},void 0,!1),(0,t.jsxDEV)(p,{children:n("target")},void 0,!1),(0,t.jsxDEV)(p,{children:n("shard")},void 0,!1),v!==void 0&&(0,t.jsxDEV)(p,{"aria-label":n("Actions")},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)(K,{children:l.map(i=>{let h=m[i.name]??fe;return(0,t.jsxDEV)(F,{"data-testid":`cron-row-${i.name}`,children:[(0,t.jsxDEV)(x,{children:i.name},void 0,!1),(0,t.jsxDEV)(x,{className:"font-mono text-xs tabular-nums",children:i.cron},void 0,!1),(0,t.jsxDEV)(x,{children:(0,t.jsxDEV)("span",{className:"flex items-center gap-2",children:[i.workflow===void 0?(0,t.jsxDEV)(ee,{variant:"outline",children:n("function")},void 0,!1):(0,t.jsxDEV)(ee,{variant:"secondary",children:n("workflow")},void 0,!1),(0,t.jsxDEV)("span",{className:"font-mono text-xs",children:i.workflow??i.functionPath},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)(x,{children:i.shardKey??""},void 0,!1),v!==void 0&&(0,t.jsxDEV)(x,{className:"text-right",children:(0,t.jsxDEV)("span",{className:"flex items-center justify-end gap-2",children:[h.kind==="ok"&&(0,t.jsxDEV)("span",{className:"text-xs text-muted-foreground","data-testid":`cron-ran-${i.name}`,children:n("ran")},void 0,!1),h.kind==="error"&&(0,t.jsxDEV)("span",{className:"text-xs text-destructive","data-testid":`cron-run-error-${i.name}`,role:"alert",children:h.message},void 0,!1),(0,t.jsxDEV)(G,{confirmLabel:n("Run now?"),disabled:h.kind==="running",onConfirm:f(()=>{V(a(i.name))},"onConfirm"),testId:`cron-run-${i.name}`,children:h.kind==="running"?n("Running\u2026"):n("Run now")},void 0,!1)]},void 0,!0)},void 0,!1)]},`${i.cron}:${i.name}`,!0)})},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1)]},void 0,!0)},"CronTriggersPanel"),he=f(s=>Number.isFinite(s)?j(s,"\u2014"):"\u2014","formatScheduledFor"),ve=f(s=>{let e=(0,Z.c)(34),c;e[0]!==s?(c=s===void 0?{}:s,e[0]=s,e[1]=c):c=e[1];let{loadJobs:n,removeJob:m,retryJob:r}=c,o=P(),l=q(),k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k=["lunora-dead-jobs"],e[2]=k):k=e[2];let v;e[3]!==o||e[4]!==n?(v=f(async()=>(await(n??(()=>o.listDeadJobs()))()).toSorted(me),"t3"),e[3]=o,e[4]=n,e[5]=v):v=e[5];let a=Q(k,v),i=a.data,[h,S]=(0,z.useState)(void 0),C=a.error??h,g=n===void 0,T;e[6]!==o||e[7]!==g||e[8]!==r?(T=r??(g?d=>o.retryDeadJob(d):void 0),e[6]=o,e[7]=g,e[8]=r,e[9]=T):T=e[9];let b=T,J;e[10]!==o||e[11]!==g||e[12]!==m?(J=m??(g?d=>o.removeDeadJob(d):void 0),e[10]=o,e[11]=g,e[12]=m,e[13]=J):J=e[13];let y=J,w;e[14]!==a?(w=f(()=>{a.refetch()},"t6"),e[14]=a,e[15]=w):w=e[15],U(w,!0);let $;e[16]!==a?($=f(async d=>{S(void 0);try{await d,a.refetch()}catch(O){S(Y(O))}},"t7"),e[16]=a,e[17]=$):$=e[17];let I=$,E=b!==void 0||y!==void 0,L;e[18]!==C?(L=C!==void 0&&(0,t.jsxDEV)("p",{className:"text-sm text-destructive","data-testid":"dlq-error",role:"alert",children:C},void 0,!1),e[18]=C,e[19]=L):L=e[19];let N;e[20]!==i?.length||e[21]!==l?(N=i?.length===0&&(0,t.jsxDEV)(R,{description:l("Jobs that exhaust their retry budget are parked here instead of being dropped."),icon:(0,t.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,t.jsxDEV)("path",{d:"M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14"},void 0,!1)},void 0,!1),testId:"dlq-empty",title:l("No dead-letter jobs.")},void 0,!1),e[20]=i?.length,e[21]=l,e[22]=N):N=e[22];let B;e[23]!==I||e[24]!==E||e[25]!==i||e[26]!==y||e[27]!==b||e[28]!==l?(B=i!==void 0&&i.length>0&&(0,t.jsxDEV)(A,{className:"overflow-hidden py-0",children:(0,t.jsxDEV)(D,{className:"px-0",children:(0,t.jsxDEV)(W,{"data-testid":"dlq-table",children:[(0,t.jsxDEV)(H,{children:(0,t.jsxDEV)(F,{children:[(0,t.jsxDEV)(p,{children:l("function")},void 0,!1),(0,t.jsxDEV)(p,{children:l("attempts")},void 0,!1),(0,t.jsxDEV)(p,{children:l("last tried")},void 0,!1),(0,t.jsxDEV)(p,{children:l("pool")},void 0,!1),(0,t.jsxDEV)(p,{children:l("shard")},void 0,!1),(0,t.jsxDEV)(p,{children:l("id")},void 0,!1),E&&(0,t.jsxDEV)(p,{"aria-label":l("Actions")},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)(K,{children:i.map(d=>(0,t.jsxDEV)(F,{"data-testid":`dlq-row-${d.id}`,children:[(0,t.jsxDEV)(x,{className:"font-mono text-xs",children:d.functionPath},void 0,!1),(0,t.jsxDEV)(x,{className:"tabular-nums",children:d.attempts??0},void 0,!1),(0,t.jsxDEV)(x,{className:"text-muted-foreground tabular-nums",children:he(d.scheduledFor)},void 0,!1),(0,t.jsxDEV)(x,{className:"font-mono text-xs",children:d.pool??""},void 0,!1),(0,t.jsxDEV)(x,{children:d.shardKey??""},void 0,!1),(0,t.jsxDEV)(x,{className:"font-mono text-xs",children:d.id},void 0,!1),E&&(0,t.jsxDEV)(x,{className:"text-right",children:(0,t.jsxDEV)("div",{className:"flex justify-end gap-1.5",children:[b!==void 0&&(0,t.jsxDEV)(te,{"data-testid":`dlq-retry-${d.id}`,onClick:f(()=>{V(I(b(d.id)))},"onClick"),size:"sm",type:"button",variant:"outline",children:l("Retry")},void 0,!1),y!==void 0&&(0,t.jsxDEV)(G,{confirmLabel:l("Drop job?"),onConfirm:f(()=>{V(I(y(d.id)))},"onConfirm"),testId:`dlq-remove-${d.id}`,children:l("Drop")},void 0,!1)]},void 0,!0)},void 0,!1)]},d.id,!0))},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1),e[23]=I,e[24]=E,e[25]=i,e[26]=y,e[27]=b,e[28]=l,e[29]=B):B=e[29];let _;return e[30]!==B||e[31]!==L||e[32]!==N?(_=(0,t.jsxDEV)("div",{className:"flex flex-col gap-3","data-testid":"lunora-dead-letter",children:[L,N,B]},void 0,!0),e[30]=B,e[31]=L,e[32]=N,e[33]=_):_=e[33],_},"DeadLetterJobs");function me(s,e){return(e.attempts??0)-(s.attempts??0)}f(me,"_temp$1");var le=f(s=>{let e=(0,Z.c)(8),{label:c,testId:n,value:m}=s,r;e[0]!==c?(r=(0,t.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:c},void 0,!1),e[0]=c,e[1]=r):r=e[1];let o;e[2]!==n||e[3]!==m?(o=(0,t.jsxDEV)("span",{className:"text-2xl font-semibold tabular-nums","data-testid":n,children:m},void 0,!1),e[2]=n,e[3]=m,e[4]=o):o=e[4];let l;return e[5]!==r||e[6]!==o?(l=(0,t.jsxDEV)(A,{className:"flex-1 py-0",children:(0,t.jsxDEV)(D,{className:"flex flex-col gap-1 p-4",children:[r,o]},void 0,!0)},void 0,!1),e[5]=r,e[6]=o,e[7]=l):l=e[7],l},"StatTile"),pe=f(s=>{let e=(0,Z.c)(25),c;e[0]!==s?(c=s===void 0?{}:s,e[0]=s,e[1]=c):c=e[1];let{loadStatus:n}=c,m=P(),r=q(),o=n===void 0,l;e[2]!==o?(l=["lunora-scheduler-status",o],e[2]=o,e[3]=l):l=e[3];let k;e[4]!==m||e[5]!==n?(k=f(async()=>{let J=await(n??(()=>m.schedulerStatus()))();return{...J,pools:J.pools.toSorted(xe)}},"t4"),e[4]=m,e[5]=n,e[6]=k):k=e[6];let v=Q(l,k),{data:a,error:i}=v,h;e[7]!==v?(h=f(()=>{v.refetch()},"t5"),e[7]=v,e[8]=h):h=e[8],U(h,!0);let S;e[9]!==i?(S=i!==null&&(0,t.jsxDEV)("p",{className:"text-sm text-destructive","data-testid":"pools-error",role:"alert",children:i},void 0,!1),e[9]=i,e[10]=S):S=e[10];let C;e[11]!==a||e[12]!==r?(C=a!==void 0&&(0,t.jsxDEV)("div",{className:"flex gap-3","data-testid":"pools-totals",children:[(0,t.jsxDEV)(le,{label:r("backlog"),testId:"pools-backlog",value:a.backlog},void 0,!1),(0,t.jsxDEV)(le,{label:r("in flight"),testId:"pools-inflight",value:a.inFlight},void 0,!1),(0,t.jsxDEV)(le,{label:r("pools"),testId:"pools-count",value:a.pools.length},void 0,!1)]},void 0,!0),e[11]=a,e[12]=r,e[13]=C):C=e[13];let g;e[14]!==a?.pools.length||e[15]!==r?(g=a?.pools.length===0&&(0,t.jsxDEV)(R,{description:r("Pools created with createWorkpool appear here once they have activity."),icon:(0,t.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,t.jsxDEV)("path",{d:"M4 7h16M4 12h16M4 17h16"},void 0,!1)},void 0,!1),testId:"pools-empty",title:r("No workpools.")},void 0,!1),e[14]=a?.pools.length,e[15]=r,e[16]=g):g=e[16];let T;e[17]!==a||e[18]!==r?(T=a!==void 0&&a.pools.length>0&&(0,t.jsxDEV)(A,{className:"overflow-hidden py-0",children:(0,t.jsxDEV)(D,{className:"px-0",children:(0,t.jsxDEV)(W,{"data-testid":"pools-table",children:[(0,t.jsxDEV)(H,{children:(0,t.jsxDEV)(F,{children:[(0,t.jsxDEV)(p,{children:r("pool")},void 0,!1),(0,t.jsxDEV)(p,{children:r("queued")},void 0,!1),(0,t.jsxDEV)(p,{children:r("in flight")},void 0,!1),(0,t.jsxDEV)(p,{children:r("max concurrency")},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)(K,{children:a.pools.map(ge)},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1),e[17]=a,e[18]=r,e[19]=T):T=e[19];let b;return e[20]!==S||e[21]!==C||e[22]!==g||e[23]!==T?(b=(0,t.jsxDEV)("div",{className:"flex flex-col gap-3","data-testid":"lunora-scheduler-pools",children:[S,C,g,T]},void 0,!0),e[20]=S,e[21]=C,e[22]=g,e[23]=T,e[24]=b):b=e[24],b},"SchedulerPoolsPanel");function xe(s,e){return e.queued-s.queued}f(xe,"_temp");function ge(s){return(0,t.jsxDEV)(F,{"data-testid":`pools-row-${s.name}`,children:[(0,t.jsxDEV)(x,{className:"font-mono text-xs",children:s.name},void 0,!1),(0,t.jsxDEV)(x,{className:"tabular-nums",children:s.queued},void 0,!1),(0,t.jsxDEV)(x,{className:"tabular-nums",children:[s.inFlight," / ",s.maxConcurrency]},void 0,!0),(0,t.jsxDEV)(x,{className:"tabular-nums",children:s.maxConcurrency},void 0,!1)]},s.name,!0)}f(ge,"_temp2");var be=["jobs","dead","pools","cron"],We=f(s=>{let e=(0,Z.c)(41),c;e[0]!==s?(c=s===void 0?{}:s,e[0]=s,e[1]=c):c=e[1];let{loadCronJobs:n,scheduledCancel:m,scheduledLoad:r}=c,o=q(),[l,k]=(0,z.useState)("jobs"),v;e[2]!==o?(v=o("Cron triggers"),e[2]=o,e[3]=v):v=e[3];let a;e[4]!==o?(a=o("Dead letter"),e[4]=o,e[5]=a):a=e[5];let i;e[6]!==o?(i=o("Scheduled jobs"),e[6]=o,e[7]=i):i=e[7];let h;e[8]!==o?(h=o("Pools"),e[8]=o,e[9]=h):h=e[9];let S;e[10]!==v||e[11]!==a||e[12]!==i||e[13]!==h?(S={cron:v,dead:a,jobs:i,pools:h},e[10]=v,e[11]=a,e[12]=i,e[13]=h,e[14]=S):S=e[14];let C=S,g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=f(N=>{k(N.currentTarget.dataset.view)},"t7"),e[15]=g):g=e[15];let T=g,b;e[16]!==o?(b=o("Schedule view"),e[16]=o,e[17]=b):b=e[17];let J;e[18]!==l||e[19]!==C?(J=be.map(N=>(0,t.jsxDEV)(te,{"aria-selected":l===N,"data-testid":`schedule-view-${N}`,"data-view":N,onClick:T,role:"tab",size:"sm",type:"button",variant:l===N?"default":"outline",children:C[N]},N,!1)),e[18]=l,e[19]=C,e[20]=J):J=e[20];let y;e[21]!==b||e[22]!==J?(y=(0,t.jsxDEV)("div",{"aria-label":b,className:"flex gap-1.5","data-testid":"schedule-view-toggle",role:"tablist",children:J},void 0,!1),e[21]=b,e[22]=J,e[23]=y):y=e[23];let w;e[24]!==m||e[25]!==r||e[26]!==l?(w=l==="jobs"&&(0,t.jsxDEV)(de,{cancelJob:m,loadJobs:r},void 0,!1),e[24]=m,e[25]=r,e[26]=l,e[27]=w):w=e[27];let $;e[28]!==l?($=l==="dead"&&(0,t.jsxDEV)(ve,{},void 0,!1),e[28]=l,e[29]=$):$=e[29];let I;e[30]!==l?(I=l==="pools"&&(0,t.jsxDEV)(pe,{},void 0,!1),e[30]=l,e[31]=I):I=e[31];let E;e[32]!==n||e[33]!==l?(E=l==="cron"&&(0,t.jsxDEV)(ue,{loadCronJobs:n},void 0,!1),e[32]=n,e[33]=l,e[34]=E):E=e[34];let L;return e[35]!==y||e[36]!==w||e[37]!==$||e[38]!==I||e[39]!==E?(L=(0,t.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"lunora-schedule",children:[y,w,$,I,E]},void 0,!0),e[35]=y,e[36]=w,e[37]=$,e[38]=I,e[39]=E,e[40]=L):L=e[40],L},"SchedulePanel");export{We as SchedulePanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as He}from"./chunk-YAECF5LW.js";import"./chunk-DWDILV2E.js";import{a as je}from"./chunk-J6J54MBP.js";import"./chunk-5OIBXYZM.js";import{a as Pe}from"./chunk-CACB34RQ.js";import{a as Ge}from"./chunk-XNJNSCLM.js";import{a as Be,b as Re,c as $e,d as j,e as E,f as _}from"./chunk-GTM65MVX.js";import{a as Ve}from"./chunk-VLXV72QE.js";import{R as We}from"./chunk-3CJW6NWG.js";import{c as V}from"./chunk-UK64ZSUW.js";import"./chunk-O3NAGRTR.js";import"./chunk-HV7G6DFP.js";import{a as J}from"./chunk-BOXSWNXZ.js";import{a as ie}from"./chunk-TAD43CG5.js";import{b as De}from"./chunk-C7WTJLC3.js";import{a as Le,e as Me}from"./chunk-SEU5V7I6.js";import{b as de}from"./chunk-ZPP2KOR4.js";import"./chunk-CKSHCYGC.js";import{f as Fe}from"./chunk-GLUNBZRI.js";import"./chunk-ZHVTQ37P.js";import"./chunk-3OA7PECS.js";import{d as U,e as ce,f as ue,g as me,k as fe,o as ze}from"./chunk-E75ANNWX.js";import"./chunk-GMSGZDDH.js";import{a as f,e as Ie,f as at,g as ot,h as rt}from"./chunk-RRCPZMC2.js";var F=Ie(ot(),1);var w=Ie(at(),1);var t=Ie(rt(),1);var lt=f((o,e)=>{let s=new Set(o.map(a=>a.deadLetterQueue).filter(a=>typeof a=="string"&&a!=="")),i=o.filter(a=>(a.deadLetterQueue===void 0||a.deadLetterQueue==="")&&!s.has(a.name)),n=e.filter(a=>a.deadLettered).length;return{deadLetteredCount:n,queuesWithoutDlq:i,showReliabilityWarning:i.length>0||n>0}},"computeQueueReliability"),nt=200,dt=ce(J.sendQueueMessage),it=ce(J.replayQueueMessage),ct=ce(J.clearQueueMessages),Ye=96,ut=f(o=>{if(o===void 0)return"\u2014";try{return JSON.stringify(o)}catch{return"[unserializable]"}},"formatBody"),mt=f(o=>o.length>Ye?`${o.slice(0,Ye)}\u2026`:o,"truncate"),ft=f(o=>o==="error"?"destructive":o==="retry"?"outline":"secondary","outcomeVariant"),ht=f((o,e)=>e(o==="messages"?"Messages":o==="send"?"Send":"Declared"),"tabLabel"),pt=f(o=>{let e=(0,F.c)(11),{loaded:s,queues:i}=o,n=U(),a;e[0]!==n?(a=n("Queues are declared in code with defineQueue. Enqueue from a mutation or action with ctx.queues.<name>.send(...); push consumers process batches in the worker."),e[0]=n,e[1]=a):a=e[1];let l;e[2]!==a?(l=(0,t.jsxDEV)("p",{className:"text-sm text-muted-foreground",children:a},void 0,!1),e[2]=a,e[3]=l):l=e[3];let r;e[4]!==s||e[5]!==i||e[6]!==n?(r=s&&i.length===0?(0,t.jsxDEV)(ie,{description:n("No defineQueue is declared in lunora/queues.ts in this deployment. Add one to offload async work to a Cloudflare Queue."),testId:"queues-empty",title:n("No queues defined")},void 0,!1):(0,t.jsxDEV)(Le,{className:"overflow-hidden py-0",children:(0,t.jsxDEV)(Me,{className:"px-0",children:(0,t.jsxDEV)(Be,{"data-testid":"queues-table",children:[(0,t.jsxDEV)(Re,{children:(0,t.jsxDEV)(j,{children:[(0,t.jsxDEV)(E,{children:n("Export")},void 0,!1),(0,t.jsxDEV)(E,{children:n("Queue")},void 0,!1),(0,t.jsxDEV)(E,{children:n("Mode")},void 0,!1),(0,t.jsxDEV)(E,{children:n("Binding")},void 0,!1),(0,t.jsxDEV)(E,{children:n("Dead-letter")},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)($e,{children:i.map(yt)},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1),e[4]=s,e[5]=i,e[6]=n,e[7]=r):r=e[7];let h;return e[8]!==l||e[9]!==r?(h=(0,t.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"queues-declared",children:[l,r]},void 0,!0),e[8]=l,e[9]=r,e[10]=h):h=e[10],h},"QueuesDeclaredTab"),gt=f(o=>{let e=(0,F.c)(67),{message:s,onReplay:i,replayingId:n}=o,a=U(),l,r,h,u,y,p,x,d,m,g;if(e[0]!==s.attempts||e[1]!==s.body||e[2]!==s.deadLettered||e[3]!==s.exportName||e[4]!==s.id||e[5]!==s.messageId||e[6]!==s.outcome||e[7]!==s.queue||e[8]!==a){let W=ut(s.body);r=j,p=`queues-message-${s.id}`;let z=s.exportName??s.queue;e[19]!==z?(x=(0,t.jsxDEV)(_,{className:"font-mono text-xs",children:z},void 0,!1),e[19]=z,e[20]=x):x=e[20],e[21]!==s.messageId?(d=(0,t.jsxDEV)(_,{className:"max-w-[16ch] truncate font-mono text-xs text-muted-foreground",title:s.messageId,children:s.messageId},void 0,!1),e[21]=s.messageId,e[22]=d):d=e[22],e[23]!==s.attempts?(m=(0,t.jsxDEV)(_,{className:"font-mono text-xs tabular-nums",children:s.attempts},void 0,!1),e[23]=s.attempts,e[24]=m):m=e[24];let I=`queues-outcome-${s.id}`,L;e[25]!==s.outcome?(L=ft(s.outcome),e[25]=s.outcome,e[26]=L):L=e[26];let T;e[27]!==s.outcome||e[28]!==I||e[29]!==L?(T=(0,t.jsxDEV)(de,{"data-testid":I,variant:L,children:s.outcome},void 0,!1),e[27]=s.outcome,e[28]=I,e[29]=L,e[30]=T):T=e[30];let M;e[31]!==s.deadLettered||e[32]!==s.id||e[33]!==a?(M=s.deadLettered&&(0,t.jsxDEV)(de,{"data-testid":`queues-dlq-${s.id}`,variant:"destructive",children:a("DLQ")},void 0,!1),e[31]=s.deadLettered,e[32]=s.id,e[33]=a,e[34]=M):M=e[34],e[35]!==T||e[36]!==M?(g=(0,t.jsxDEV)(_,{children:(0,t.jsxDEV)("span",{className:"inline-flex items-center gap-1",children:[T,M]},void 0,!0)},void 0,!1),e[35]=T,e[36]=M,e[37]=g):g=e[37],l=_,h="max-w-[32ch] truncate font-mono text-xs text-muted-foreground",u=W,y=mt(W),e[0]=s.attempts,e[1]=s.body,e[2]=s.deadLettered,e[3]=s.exportName,e[4]=s.id,e[5]=s.messageId,e[6]=s.outcome,e[7]=s.queue,e[8]=a,e[9]=l,e[10]=r,e[11]=h,e[12]=u,e[13]=y,e[14]=p,e[15]=x,e[16]=d,e[17]=m,e[18]=g}else l=e[9],r=e[10],h=e[11],u=e[12],y=e[13],p=e[14],x=e[15],d=e[16],m=e[17],g=e[18];let v;e[38]!==l||e[39]!==h||e[40]!==u||e[41]!==y?(v=(0,t.jsxDEV)(l,{className:h,title:u,children:y},void 0,!1),e[38]=l,e[39]=h,e[40]=u,e[41]=y,e[42]=v):v=e[42];let N;e[43]!==s.capturedAt?(N=ze(s.capturedAt,"\u2014"),e[43]=s.capturedAt,e[44]=N):N=e[44];let b;e[45]!==N?(b=(0,t.jsxDEV)(_,{className:"text-xs text-muted-foreground tabular-nums",children:N},void 0,!1),e[45]=N,e[46]=b):b=e[46];let S=`queues-replay-${s.id}`,A=n!==null,C;e[47]!==s.id||e[48]!==n||e[49]!==a?(C=n===s.id?a("Replaying\u2026"):a("Replay"),e[47]=s.id,e[48]=n,e[49]=a,e[50]=C):C=e[50];let Q;e[51]!==s.id||e[52]!==i||e[53]!==S||e[54]!==A||e[55]!==C?(Q=(0,t.jsxDEV)(_,{children:(0,t.jsxDEV)(V,{"data-id":s.id,"data-testid":S,disabled:A,onClick:i,size:"xs",type:"button",variant:"outline",children:C},void 0,!1)},void 0,!1),e[51]=s.id,e[52]=i,e[53]=S,e[54]=A,e[55]=C,e[56]=Q):Q=e[56];let D;return e[57]!==r||e[58]!==b||e[59]!==Q||e[60]!==p||e[61]!==x||e[62]!==d||e[63]!==m||e[64]!==g||e[65]!==v?(D=(0,t.jsxDEV)(r,{"data-testid":p,children:[x,d,m,g,v,b,Q]},void 0,!0),e[57]=r,e[58]=b,e[59]=Q,e[60]=p,e[61]=x,e[62]=d,e[63]=m,e[64]=g,e[65]=v,e[66]=D):D=e[66],D},"QueueLogRow"),vt=f(o=>{let e=(0,F.c)(26),{hasError:s,messages:i,onClear:n,onReplay:a,replayingId:l}=o,r=U(),h;e[0]!==r?(h=r("Cloudflare Queues have no peek API, so this is what push consumers actually processed \u2014 not pending depth."),e[0]=r,e[1]=h):h=e[1];let u;e[2]!==h?(u=(0,t.jsxDEV)("p",{className:"text-sm text-muted-foreground",children:h},void 0,!1),e[2]=h,e[3]=u):u=e[3];let y=i.length===0,p;e[4]!==r?(p=r("Clear log"),e[4]=r,e[5]=p):p=e[5];let x;e[6]!==n||e[7]!==y||e[8]!==p?(x=(0,t.jsxDEV)(V,{className:"ml-auto","data-testid":"queues-clear",disabled:y,onClick:n,size:"sm",type:"button",variant:"outline",children:p},void 0,!1),e[6]=n,e[7]=y,e[8]=p,e[9]=x):x=e[9];let d;e[10]!==i.length||e[11]!==r?(d=i.length>0&&(0,t.jsxDEV)(de,{"data-testid":"queues-count",variant:"secondary",children:r("{count} messages",{count:i.length})},void 0,!1),e[10]=i.length,e[11]=r,e[12]=d):d=e[12];let m;e[13]!==u||e[14]!==x||e[15]!==d?(m=(0,t.jsxDEV)("div",{className:"flex flex-wrap items-center gap-2",children:[u,x,d]},void 0,!0),e[13]=u,e[14]=x,e[15]=d,e[16]=m):m=e[16];let g;e[17]!==s||e[18]!==i||e[19]!==a||e[20]!==l||e[21]!==r?(g=!s&&i.length===0?(0,t.jsxDEV)(ie,{description:r("Consumed messages appear here once a push consumer processes a batch in dev. Send one from the Send tab to see it captured."),testId:"queues-messages-empty",title:r("No consumed messages yet.")},void 0,!1):(0,t.jsxDEV)(Le,{className:"overflow-hidden py-0",children:(0,t.jsxDEV)(Me,{className:"px-0",children:(0,t.jsxDEV)(He,{className:"max-h-[32rem]","data-testid":"queues-messages-scroll",children:(0,t.jsxDEV)(Be,{"data-testid":"queues-messages-table",children:[(0,t.jsxDEV)(Re,{children:(0,t.jsxDEV)(j,{children:[(0,t.jsxDEV)(E,{children:r("Export")},void 0,!1),(0,t.jsxDEV)(E,{children:r("Message")},void 0,!1),(0,t.jsxDEV)(E,{children:r("Attempts")},void 0,!1),(0,t.jsxDEV)(E,{children:r("Outcome")},void 0,!1),(0,t.jsxDEV)(E,{children:r("Body")},void 0,!1),(0,t.jsxDEV)(E,{children:r("Captured")},void 0,!1),(0,t.jsxDEV)(E,{},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)($e,{children:i.map(N=>(0,t.jsxDEV)(gt,{message:N,onReplay:a,replayingId:l},N.id,!1))},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1)},void 0,!1),e[17]=s,e[18]=i,e[19]=a,e[20]=l,e[21]=r,e[22]=g):g=e[22];let v;return e[23]!==m||e[24]!==g?(v=(0,t.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"queues-messages",children:[m,g]},void 0,!0),e[23]=m,e[24]=g,e[25]=v):v=e[25],v},"QueuesMessagesTab"),xt=f(o=>{let e=(0,F.c)(20),{batchMode:s,bodyText:i,delayText:n,onBatchModeChange:a,onBodyChange:l,onDelayChange:r,onSelectExport:h,onSend:u,queues:y,selectedExportName:p,sending:x}=o,d=U(),m;e[0]!==d?(m=d("Enqueue a JSON message to a declared producer to exercise its consumer. Nothing is captured until the consumer processes it."),e[0]=d,e[1]=m):m=e[1];let g;e[2]!==m?(g=(0,t.jsxDEV)("p",{className:"text-sm text-muted-foreground",children:m},void 0,!1),e[2]=m,e[3]=g):g=e[3];let v;e[4]!==s||e[5]!==i||e[6]!==n||e[7]!==a||e[8]!==l||e[9]!==r||e[10]!==h||e[11]!==u||e[12]!==y||e[13]!==p||e[14]!==x||e[15]!==d?(v=y.length===0?(0,t.jsxDEV)(ie,{description:d("Declare a queue with defineQueue in lunora/queues.ts to enqueue a test message."),testId:"queues-send-empty",title:d("No queues to send to")},void 0,!1):(0,t.jsxDEV)(t.Fragment,{children:[(0,t.jsxDEV)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsxDEV)("select",{"aria-label":d("Queue"),className:"h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50","data-testid":"queues-send-select",onChange:h,value:p,children:y.map(bt)},void 0,!1),(0,t.jsxDEV)(We,{"aria-label":d("Delay (seconds)"),className:"max-w-36","data-testid":"queues-send-delay",min:0,onChange:r,placeholder:d("Delay (s)"),type:"number",value:n},void 0,!1),(0,t.jsxDEV)("label",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",htmlFor:"queues-send-batch",children:[(0,t.jsxDEV)("input",{checked:s,"data-testid":"queues-send-batch",id:"queues-send-batch",onChange:a,type:"checkbox"},void 0,!1),d("Send as batch (JSON array)")]},void 0,!0),(0,t.jsxDEV)(V,{className:"ml-auto","data-testid":"queues-send-button",disabled:x||p==="",onClick:u,type:"button",children:d(x?"Sending\u2026":"Send message")},void 0,!1)]},void 0,!0),(0,t.jsxDEV)(Ve,{"aria-label":d("Message body (JSON)"),className:"font-mono","data-testid":"queues-send-body",onChange:l,placeholder:s?'[ { "hello": "world" } ]':'{ "hello": "world" }',value:i},void 0,!1)]},void 0,!0),e[4]=s,e[5]=i,e[6]=n,e[7]=a,e[8]=l,e[9]=r,e[10]=h,e[11]=u,e[12]=y,e[13]=p,e[14]=x,e[15]=d,e[16]=v):v=e[16];let N;return e[17]!==g||e[18]!==v?(N=(0,t.jsxDEV)("div",{className:"flex flex-col gap-3","data-testid":"queues-send",children:[g,v]},void 0,!0),e[17]=g,e[18]=v,e[19]=N):N=e[19],N},"QueuesSendTab"),Ut=f(o=>{let e=(0,F.c)(59),{limit:s}=o,i=s??nt,n=Fe(),a=U(),[l,r]=(0,w.useState)("declared"),[h,u]=(0,w.useState)(null),y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y={},e[0]=y):y=e[0];let{data:p,error:x,errorSource:d}=De(J.listQueues,y),m;e[1]!==i?(m={limit:i},e[1]=i,e[2]=m):m=e[2];let{data:g,error:v,errorSource:N,refetch:b}=De(J.getQueueMessages,m),S=Array.isArray(p?.queues)?[...p.queues].toSorted(Nt):[],A=g?.entries??[],{deadLetteredCount:C,queuesWithoutDlq:Q,showReliabilityWarning:D}=lt(S,A),[W,z]=(0,w.useState)(""),[I,L]=(0,w.useState)(""),[T,M]=(0,w.useState)(""),[G,Xe]=(0,w.useState)(!1),[he,Oe]=(0,w.useState)(!1),[pe,ke]=(0,w.useState)(null),H=S.some(c=>c.exportName===W)?W:S[0]?.exportName??"",Ue=l==="messages"?v:x,Ke=l==="messages"?N:d,ge=Ue??h,ve=Ue===null?h:Ke,Y;e[3]!==b?(Y=f(()=>{b()},"t3"),e[3]=b,e[4]=Y):Y=e[4],je(Y,l==="messages");let xe=f(async()=>{u(null);let c=H;if(c==="")return;let q=null,we=I.trim();if(we!=="")try{q=JSON.parse(we)}catch{u(a("Body must be valid JSON."));return}let Ae,Je=T.trim();if(Je!==""){let P=Number(Je);if(!Number.isFinite(P)||P<0){u(a("Delay must be a non-negative number of seconds."));return}Ae=P}if(G&&!Array.isArray(q)){u(a("Batch mode needs a JSON array body \u2014 each element is enqueued as one message."));return}Oe(!0);let st=G?{batch:q,delaySeconds:Ae,exportName:c}:{body:q,delaySeconds:Ae,exportName:c};try{await n.query(dt,st,ue("")),b()}catch(P){u(me(P))}Oe(!1)},"send"),X;e[5]!==n||e[6]!==b?(X=f(async c=>{u(null),ke(c);try{await n.query(it,{id:c},ue("")),b()}catch(q){u(me(q))}ke(null)},"t5"),e[5]=n,e[6]=b,e[7]=X):X=e[7];let ye=X,K;e[8]!==n||e[9]!==b?(K=f(async()=>{u(null);try{await n.query(ct,{},ue("")),b()}catch(c){u(me(c))}},"t6"),e[8]=n,e[9]=b,e[10]=K):K=e[10];let be=K,Z;e[11]===Symbol.for("react.memo_cache_sentinel")?(Z=f(c=>{let q=c.currentTarget.dataset.tab;(q==="declared"||q==="messages"||q==="send")&&r(q)},"t7"),e[11]=Z):Z=e[11];let Ze=Z,ee;e[12]===Symbol.for("react.memo_cache_sentinel")?(ee=f(c=>{z(c.currentTarget.value)},"t8"),e[12]=ee):ee=e[12];let Ne=ee,te;e[13]===Symbol.for("react.memo_cache_sentinel")?(te=f(c=>{L(c.currentTarget.value)},"t9"),e[13]=te):te=e[13];let qe=te,se;e[14]===Symbol.for("react.memo_cache_sentinel")?(se=f(c=>{M(c.currentTarget.value)},"t10"),e[14]=se):se=e[14];let Se=se,ae;e[15]===Symbol.for("react.memo_cache_sentinel")?(ae=f(c=>{Xe(c.currentTarget.checked)},"t11"),e[15]=ae):ae=e[15];let Ee=ae,oe;e[16]!==xe?(oe=f(()=>{fe(xe())},"t12"),e[16]=xe,e[17]=oe):oe=e[17];let _e=oe,re;e[18]!==ye?(re=f(c=>{let{id:q}=c.currentTarget.dataset;q!==void 0&&fe(ye(q))},"t13"),e[18]=ye,e[19]=re):re=e[19];let Te=re,le;e[20]!==be?(le=f(()=>{fe(be())},"t14"),e[20]=be,e[21]=le):le=e[21];let Ce=le,et="flex flex-col gap-6",tt="lunora-queues-panel",B;e[22]!==a||e[23]!==l?(B=(0,t.jsxDEV)("div",{className:"flex items-center gap-1","data-testid":"queues-tabs",role:"tablist",children:["declared","messages","send"].map(c=>(0,t.jsxDEV)(V,{"aria-selected":l===c,"data-tab":c,"data-testid":`queues-tab-${c}`,onClick:Ze,role:"tab",size:"sm",type:"button",variant:l===c?"secondary":"ghost",children:ht(c,a)},c,!1))},void 0,!1),e[22]=a,e[23]=l,e[24]=B):B=e[24];let R;e[25]!==ge||e[26]!==ve?(R=ge!==null&&(0,t.jsxDEV)(Pe,{error:ve,testId:"queues-error"},void 0,!1),e[25]=ge,e[26]=ve,e[27]=R):R=e[27];let Qe=D&&(0,t.jsxDEV)(Ge,{icon:(0,t.jsxDEV)("span",{"aria-hidden":"true",className:"text-base leading-none",children:"\u26A0"},void 0,!1),testId:"queues-dlq-warning",variant:"warning",children:(0,t.jsxDEV)("div",{className:"flex flex-col gap-1",children:[Q.length>0&&(0,t.jsxDEV)(t.Fragment,{children:[(0,t.jsxDEV)("p",{className:"font-medium",children:a("No dead-letter queue on {queues}.",{queues:Q.map(qt).join(", ")})},void 0,!1),(0,t.jsxDEV)("p",{className:"text-muted-foreground",children:a("Exhausted messages are dropped after retries. Add a deadLetterQueue to capture them.")},void 0,!1)]},void 0,!0),C>0&&(0,t.jsxDEV)("p",{className:Q.length>0?"text-muted-foreground":"font-medium",children:C===1?a("1 message was recently dead-lettered."):a("{count} messages were recently dead-lettered.",{count:C})},void 0,!1)]},void 0,!0)},void 0,!1),$;e[28]!==S||e[29]!==p||e[30]!==l?($=l==="declared"&&(0,t.jsxDEV)(pt,{loaded:p!==void 0,queues:S},void 0,!1),e[28]=S,e[29]=p,e[30]=l,e[31]=$):$=e[31];let O;e[32]!==A||e[33]!==v||e[34]!==Ce||e[35]!==Te||e[36]!==pe||e[37]!==l?(O=l==="messages"&&(0,t.jsxDEV)(vt,{hasError:v!==null,messages:A,onClear:Ce,onReplay:Te,replayingId:pe},void 0,!1),e[32]=A,e[33]=v,e[34]=Ce,e[35]=Te,e[36]=pe,e[37]=l,e[38]=O):O=e[38];let k;e[39]!==G||e[40]!==I||e[41]!==T||e[42]!==Ee||e[43]!==qe||e[44]!==Se||e[45]!==Ne||e[46]!==_e||e[47]!==S||e[48]!==H||e[49]!==he||e[50]!==l?(k=l==="send"&&(0,t.jsxDEV)(xt,{batchMode:G,bodyText:I,delayText:T,onBatchModeChange:Ee,onBodyChange:qe,onDelayChange:Se,onSelectExport:Ne,onSend:_e,queues:S,selectedExportName:H,sending:he},void 0,!1),e[39]=G,e[40]=I,e[41]=T,e[42]=Ee,e[43]=qe,e[44]=Se,e[45]=Ne,e[46]=_e,e[47]=S,e[48]=H,e[49]=he,e[50]=l,e[51]=k):k=e[51];let ne;return e[52]!==B||e[53]!==R||e[54]!==Qe||e[55]!==$||e[56]!==O||e[57]!==k?(ne=(0,t.jsxDEV)("div",{className:et,"data-testid":tt,children:[B,R,Qe,$,O,k]},void 0,!0),e[52]=B,e[53]=R,e[54]=Qe,e[55]=$,e[56]=O,e[57]=k,e[58]=ne):ne=e[58],ne},"QueuesPanel");function yt(o){return(0,t.jsxDEV)(j,{"data-testid":`queues-row-${o.exportName}`,children:[(0,t.jsxDEV)(_,{className:"font-mono text-xs",children:o.exportName},void 0,!1),(0,t.jsxDEV)(_,{className:"font-mono text-xs text-muted-foreground",children:o.name},void 0,!1),(0,t.jsxDEV)(_,{className:"font-mono text-xs text-muted-foreground",children:o.mode},void 0,!1),(0,t.jsxDEV)(_,{className:"font-mono text-xs text-muted-foreground",children:o.binding},void 0,!1),(0,t.jsxDEV)(_,{className:"font-mono text-xs text-muted-foreground",children:o.deadLetterQueue??"\u2014"},void 0,!1)]},o.exportName,!0)}f(yt,"_temp");function bt(o){return(0,t.jsxDEV)("option",{value:o.exportName,children:o.exportName},o.exportName,!1)}f(bt,"_temp2");function Nt(o,e){return o.exportName.localeCompare(e.exportName)}f(Nt,"_temp3");function qt(o){return o.name}f(qt,"_temp4");export{Ut as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k,b as N,c as O,d as x,e as q,f as D}from"./chunk-GTM65MVX.js";import{a as C}from"./chunk-TAD43CG5.js";import{a as g}from"./chunk-SEU5V7I6.js";import{d as T,g as I,j as _,k as w}from"./chunk-
|
|
1
|
+
import{a as k,b as N,c as O,d as x,e as q,f as D}from"./chunk-GTM65MVX.js";import{a as C}from"./chunk-TAD43CG5.js";import{a as g}from"./chunk-SEU5V7I6.js";import{d as T,g as I,j as _,k as w}from"./chunk-E75ANNWX.js";import{b as L}from"./chunk-GMSGZDDH.js";import{a as d,e as b,f as U,g as Y,h as F}from"./chunk-RRCPZMC2.js";var M=b(Y(),1);var H="https://api.cloudflare.com/client/v4/accounts",E=class extends L{static{d(this,"AnalyticsSqlError")}constructor(e,f){super("ANALYTICS_SQL_ERROR",`Analytics Engine SQL API returned ${String(e)}: ${f}`,{name:"AnalyticsSqlError",status:e})}},v=d(t=>{let e=t.fetch??globalThis.fetch,f=`${H}/${encodeURIComponent(t.accountId)}/analytics_engine/sql`;return{query:d(async s=>{let l=await e(f,{body:s,headers:{Authorization:`Bearer ${t.apiToken}`,"Content-Type":"text/plain"},method:"POST"});if(!l.ok)throw new E(l.status,await l.text());let n;try{n=await l.json()}catch{throw new E(l.status,"Analytics Engine SQL API returned a non-JSON body.")}let o=n,a=o.data??[];return{columns:o.meta??[],rowCount:o.rows??a.length,rows:a}},"query")}},"createAnalyticsSqlClient");var m=b(U(),1);var r=b(F(),1);var W="ANALYTICS",P=[{key:"volume",sql:d(t=>`SELECT blob2 AS fn, count() AS calls FROM ${t} WHERE blob1 = 'function_call' GROUP BY fn ORDER BY calls DESC LIMIT 25`,"sql"),title:"Request volume per function"},{key:"latency",sql:d(t=>`SELECT blob2 AS fn, quantileWeighted(0.50)(double1, _sample_interval) AS p50, quantileWeighted(0.95)(double1, _sample_interval) AS p95 FROM ${t} WHERE blob1 = 'function_call' GROUP BY fn ORDER BY p95 DESC LIMIT 25`,"sql"),title:"Latency p50 / p95 per function"},{key:"hotShards",sql:d(t=>`SELECT blob3 AS shard, count() AS calls FROM ${t} WHERE blob1 = 'function_call' GROUP BY shard ORDER BY calls DESC LIMIT 25`,"sql"),title:"Hot shards"}],j={error:null,loading:!0,result:null},G=d(t=>{let e=(0,M.c)(27),{state:f,title:p}=t,s=T(),{error:l,loading:n,result:o}=f,a=`analytics-panel-${p}`,i;e[0]!==s||e[1]!==p?(i=s(p),e[0]=s,e[1]=p,e[2]=i):i=e[2];let c;e[3]!==i?(c=(0,r.jsxDEV)("header",{className:"border-b border-border px-4 py-3",children:(0,r.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:i},void 0,!1)},void 0,!1),e[3]=i,e[4]=c):c=e[4];let u;e[5]!==n||e[6]!==s?(u=n&&(0,r.jsxDEV)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"analytics-loading",children:s("Loading\u2026")},void 0,!1),e[5]=n,e[6]=s,e[7]=u):u=e[7];let y;e[8]!==l||e[9]!==n?(y=!n&&l!==null&&(0,r.jsxDEV)("p",{className:"px-4 py-8 text-center text-sm text-destructive","data-testid":"analytics-error",role:"alert",children:l},void 0,!1),e[8]=l,e[9]=n,e[10]=y):y=e[10];let h;e[11]!==l||e[12]!==n||e[13]!==o||e[14]!==s?(h=!n&&l===null&&o!==null&&o.rows.length===0&&(0,r.jsxDEV)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"analytics-empty-rows",children:s("No data points yet.")},void 0,!1),e[11]=l,e[12]=n,e[13]=o,e[14]=s,e[15]=h):h=e[15];let A;e[16]!==l||e[17]!==n||e[18]!==o?(A=!n&&l===null&&o!==null&&o.rows.length>0&&(0,r.jsxDEV)(k,{children:[(0,r.jsxDEV)(N,{children:(0,r.jsxDEV)(x,{children:o.columns.map(Q)},void 0,!1)},void 0,!1),(0,r.jsxDEV)(O,{children:o.rows.map((B,$)=>(0,r.jsxDEV)(x,{children:o.columns.map(R=>(0,r.jsxDEV)(D,{className:"font-mono text-xs",children:_(B[R.name])},R.name,!1))},$,!1))},void 0,!1)]},void 0,!0),e[16]=l,e[17]=n,e[18]=o,e[19]=A):A=e[19];let S;return e[20]!==a||e[21]!==c||e[22]!==u||e[23]!==y||e[24]!==h||e[25]!==A?(S=(0,r.jsxDEV)(g,{className:"gap-0 py-0","data-testid":a,children:[c,u,y,h,A]},void 0,!0),e[20]=a,e[21]=c,e[22]=u,e[23]=y,e[24]=h,e[25]=A,e[26]=S):S=e[26],S},"PanelResult"),re=d(({config:t,dataset:e=W,runQuery:f}={})=>{let p=T(),[s,l]=(0,m.useState)({}),n=(0,m.useMemo)(()=>{if(f!==void 0)return f;if(t===void 0)return null;let a=v({accountId:t.accountId,apiToken:t.apiToken});return i=>a.query(i)},[t,f]),o=(0,m.useCallback)(async a=>{if(n!==null)for(let i of P){if(a.cancelled)return;l(c=>({...c,[i.key]:{error:null,loading:!0,result:null}}));try{let c=await n(i.sql(e));a.cancelled||l(u=>({...u,[i.key]:{error:null,loading:!1,result:c}}))}catch(c){a.cancelled||l(u=>({...u,[i.key]:{error:I(c),loading:!1,result:null}}))}}},[n,e]);return(0,m.useEffect)(()=>{let a={cancelled:!1};return w(o(a)),()=>{a.cancelled=!0}},[o]),n===null?(0,r.jsxDEV)(C,{description:p("Set CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN (Analytics Read) in your .dev.vars to enable usage panels."),icon:(0,r.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,r.jsxDEV)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"},void 0,!1)},void 0,!1),testId:"analytics-not-configured",title:p("Analytics is not configured.")},void 0,!1):(0,r.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"lunora-analytics-panel",children:P.map(a=>(0,r.jsxDEV)(G,{state:s[a.key]??j,title:a.title},a.key,!1))},void 0,!1)},"AnalyticsPanel");function Q(t){return(0,r.jsxDEV)(q,{children:t.name},t.name,!1)}d(Q,"_temp");export{re as AnalyticsPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{D as a,J as j,Y as de,c as J,e as ce,f as le,g as pe,h as fe,ma as me,wa as ge}from"./chunk-KSKXW5PX.js";import{b as H}from"./chunk-5OIBXYZM.js";import{F as B,J as k,O as Y,P as z,h as ue,p as ae}from"./chunk-3CJW6NWG.js";import{a as P,c as F,i as ie,r as se}from"./chunk-O3NAGRTR.js";import{a as re}from"./chunk-HV7G6DFP.js";import{g as O,i as w}from"./chunk-CKSHCYGC.js";import{a as we}from"./chunk-3OA7PECS.js";import{a as r,e as b,f as q}from"./chunk-RRCPZMC2.js";var he=b(q(),1),Q=b(re(),1);function $e(e,t){let n=he.useRef(null);function o(u){Q.flushSync(()=>{e.setOpen(!1,z(Y.focusOut,u.nativeEvent,u.currentTarget))}),pe(n.current)?.focus()}r(o,"handlePreFocusGuardFocus");function c(u){let i=e.select("positionerElement");if(i&&fe(u,i))e.context.beforeContentFocusGuardRef.current?.focus();else{Q.flushSync(()=>{e.setOpen(!1,z(Y.focusOut,u.nativeEvent,u.currentTarget))});let s=le(e.context.triggerFocusTargetRef.current||t.current);for(;s!==null&&ae(i,s);){let m=s;if(s=ce(s),s===m)break}s?.focus()}}return r(c,"handleFocusTargetFocus"),{preFocusGuardRef:n,handlePreFocusGuardFocus:o,handleFocusTargetFocus:c}}r($e,"useTriggerFocusGuards");var l=b(q(),1),ve=b(re(),1);var M=b(q(),1);function X(e){let t=se(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,c=ie(e),u=c?e.offsetWidth:n,i=c?e.offsetHeight:o;return(J(n)!==u||J(o)!==i)&&(n=u,o=i),{width:n,height:o}}r(X,"getCssDimensions");function Re(e){let{popupElement:t,positionerElement:n,content:o,mounted:c,onMeasureLayout:u,onMeasureLayoutComplete:i,side:s,direction:m}=e,x=k(t,!0,!1),g=B(),p=M.useRef(null),D=M.useRef(!0),f=M.useRef(O),I=F(u),v=F(i),C=M.useMemo(()=>{let h=s==="top",R=s==="left";return m==="rtl"?(h=h||s==="inline-end",R=R||s==="inline-end"):(h=h||s==="inline-start",R=R||s==="inline-start"),h?{position:"absolute",[s==="top"?"bottom":"top"]:"0",[R?"right":"left"]:"0"}:w},[s,m]);P(()=>{if(!c){f.current=O,D.current=!0,p.current=null;return}if(!t||!n)return;f.current=ye(t,C),Z(t,"auto");let h=K(t,"position","static"),R=K(t,"transform","none"),U=K(t,"scale","1"),y=ye(n,{"--available-width":"max-content","--available-height":"max-content"});function T(){h(),R(),y()}r(T,"restoreMeasurementOverrides");function L(){T(),U()}if(r(L,"restoreMeasurementOverridesIncludingScale"),I?.(),D.current||p.current===null){G(n,"max-content");let E=X(t);return p.current=E,G(n,E),L(),v?.(null,E),D.current=!1,()=>{f.current(),f.current=O}}G(n,"max-content");let N=p.current,S=X(t);p.current=S,Z(t,N),L(),v?.(N,S),G(n,S);let $=new AbortController;return g.request(()=>{Z(t,S),x(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},$.signal)}),()=>{$.abort(),g.cancel(),f.current(),f.current=O}},[o,t,n,x,g,c,I,v,C])}r(Re,"usePopupAutoResize");function K(e,t,n){let o=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,o)}}r(K,"overrideElementStyle");function ye(e,t){let n=[];for(let[o,c]of Object.entries(t))n.push(K(e,o,c));return n.length?()=>{n.forEach(o=>o())}:O}r(ye,"applyElementStyles");function Z(e,t){let n=t==="auto"?"auto":`${t.width}px`,o=t==="auto"?"auto":`${t.height}px`;e.style.setProperty("--popup-width",n),e.style.setProperty("--popup-height",o)}r(Z,"setPopupCssSize");function G(e,t){let n=t==="max-content"?"max-content":`${t.width}px`,o=t==="max-content"?"max-content":`${t.height}px`;e.style.setProperty("--positioner-width",n),e.style.setProperty("--positioner-height",o)}r(G,"setPositionerCssSize");var A=b(we(),1);function pt(e){let{store:t,side:n,cssVars:o,children:c}=e,u=H(),i=t.useState("activeTriggerElement"),s=t.useState("activeTriggerId"),m=t.useState("open"),x=t.useState("payload"),g=t.useState("mounted"),p=t.useState("popupElement"),D=t.useState("positionerElement"),f=ge(m?i:null),I=Ae(s,x),v=l.useRef(null),[C,h]=l.useState(null),[R,U]=l.useState(null),y=l.useRef(null),T=l.useRef(null),L=k(y,!0,!1),N=B(),[S,$]=l.useState(null),[E,te]=l.useState(!1);P(()=>(t.set("hasViewport",!0),()=>{t.set("hasViewport",!1)}),[t]);let Te=F(()=>{y.current?.style.setProperty("animation","none"),y.current?.style.setProperty("transition","none"),T.current?.style.setProperty("display","none")}),Ee=F(d=>{y.current?.style.removeProperty("animation"),y.current?.style.removeProperty("transition"),T.current?.style.removeProperty("display"),d&&$(d)}),W=l.useRef(null);P(()=>{(!m||!g)&&(W.current=null)},[m,g]),P(()=>{if(i&&f&&i!==f&&W.current!==i&&v.current){h(v.current),te(!0);let d=Me(f,i);U(d),N.request(()=>{ve.flushSync(()=>{te(!1)}),L(()=>{h(null),$(null),v.current=null})}),W.current=i}},[i,f,C,L,N]),P(()=>{let d=y.current;if(!d)return;let oe=ue(d).createElement("div");for(let Oe of Array.from(d.childNodes))oe.appendChild(Oe.cloneNode(!0));v.current=oe});let ne=C!=null,_;ne?_=(0,A.jsxs)(l.Fragment,{children:[(0,A.jsx)("div",{"data-previous":!0,inert:me(!0),ref:T,style:{...S?{[o.popupWidth]:`${S.width}px`,[o.popupHeight]:`${S.height}px`}:null,position:"absolute"},"data-ending-style":E?void 0:""},"previous"),(0,A.jsx)("div",{"data-current":!0,ref:y,"data-starting-style":E?"":void 0,children:c},I)]}):_=(0,A.jsx)("div",{"data-current":!0,ref:y,children:c},I),P(()=>{let d=T.current;!d||!C||d.replaceChildren(...Array.from(C.childNodes))},[C]),Re({popupElement:p,positionerElement:D,mounted:g,content:x,onMeasureLayout:Te,onMeasureLayoutComplete:Ee,side:n,direction:u});let be={activationDirection:Fe(R),transitioning:ne};return{children:_,state:be}}r(pt,"usePopupViewport");function Fe(e){if(e)return`${Pe(e.horizontal,5,"right","left")} ${Pe(e.vertical,5,"down","up")}`}r(Fe,"getActivationDirection");function Pe(e,t,n,o){return e>t?n:e<-t?o:""}r(Pe,"getValueWithTolerance");function Me(e,t){let n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),c={x:n.left+n.width/2,y:n.top+n.height/2},u={x:o.left+o.width/2,y:o.top+o.height/2};return{horizontal:u.x-c.x,vertical:u.y-c.y}}r(Me,"calculateRelativePosition");function Ae(e,t){let[n,o]=l.useState(0),c=l.useRef(e),u=l.useRef(t),i=l.useRef(!1);return P(()=>{let s=c.current,m=u.current,x=e!==s,g=t!==m;x?(o(p=>p+1),i.current=!g):i.current&&g&&(o(p=>p+1),i.current=!1),c.current=e,u.current=t},[e,t]),`${e??"current"}-${n}`}r(Ae,"usePopupContentKey");function Ce(){return new j({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new de,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}r(Ce,"getEmptyRootContext");function St(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:Ce(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:w,inactiveTriggerProps:w,popupProps:w}}r(St,"createInitialPopupStoreState");function xt(e,t,n=!1){return new j({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}r(xt,"createPopupFloatingRootContext");var V=a(e=>e.triggerIdProp??e.activeTriggerId),ee=a(e=>e.openProp??e.open),Se=a(e=>(e.popupElement?.id??e.floatingId)||void 0);function xe(e,t){return t!==void 0&&ee(e)&&V(e)===t}r(xe,"triggerOwnsOpenPopup");function De(e,t){return xe(e,t)?!0:t!==void 0&&ee(e)&&V(e)==null&&e.triggerCount===1}r(De,"triggerOwnsOpenPopupOrIsOnlyTrigger");var Tt={open:ee,mounted:a(e=>e.mounted),transitionStatus:a(e=>e.transitionStatus),floatingRootContext:a(e=>e.floatingRootContext),triggerCount:a(e=>e.triggerCount),preventUnmountingOnClose:a(e=>e.preventUnmountingOnClose),payload:a(e=>e.payload),activeTriggerId:V,activeTriggerElement:a(e=>e.mounted?e.activeTriggerElement:null),popupId:Se,isTriggerActive:a((e,t)=>t!==void 0&&V(e)===t),isOpenedByTrigger:a((e,t)=>xe(e,t)),isMountedByTrigger:a((e,t)=>t!==void 0&&V(e)===t&&e.mounted),triggerProps:a((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:a((e,t)=>De(e,t)?Se(e):void 0),popupProps:a(e=>e.popupProps),popupElement:a(e=>e.popupElement),positionerElement:a(e=>e.positionerElement)};export{St as a,xt as b,Tt as c,$e as d,pt as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as le}from"./chunk-
|
|
1
|
+
import{a as le}from"./chunk-UGUEC6BC.js";import{a as Y}from"./chunk-2K47A3P6.js";import{a as Z}from"./chunk-CACB34RQ.js";import"./chunk-XNJNSCLM.js";import{a as ee,b as te,c as re,d as j,e as o,f as i}from"./chunk-GTM65MVX.js";import{a as X}from"./chunk-UKDJ4H7I.js";import"./chunk-TBMYIZIO.js";import"./chunk-3CJW6NWG.js";import{c as V}from"./chunk-UK64ZSUW.js";import"./chunk-O3NAGRTR.js";import"./chunk-HV7G6DFP.js";import{a as J}from"./chunk-BOXSWNXZ.js";import{a as U}from"./chunk-TAD43CG5.js";import{b as G}from"./chunk-C7WTJLC3.js";import{a as z,e as Q}from"./chunk-SEU5V7I6.js";import{b as O}from"./chunk-ZPP2KOR4.js";import"./chunk-CKSHCYGC.js";import"./chunk-GLUNBZRI.js";import"./chunk-ZHVTQ37P.js";import"./chunk-3OA7PECS.js";import{d as H,o as W}from"./chunk-E75ANNWX.js";import"./chunk-GMSGZDDH.js";import{a,e as L,f as fe,g as me,h as ue,j as P}from"./chunk-RRCPZMC2.js";var ae=L(me(),1),q=L(fe(),1);var t=L(ue(),1);var he={action:"outline",mutation:"default",query:"secondary"},se=a(r=>r<1e3?`${r<10?r.toFixed(1):Math.round(r).toString()}ms`:`${(r/1e3).toFixed(2)}s`,"formatMs"),ve=a(r=>r.calls===0?"\u2014":r.errors===0?"0":`${r.errors.toString()} (${(r.errors/r.calls*100).toFixed(1)}%)`,"errorCell"),pe=a(r=>{let e=r.conflicts??0;return r.calls===0?"\u2014":e===0?"0":`${e.toString()} (${(e/r.calls*100).toFixed(1)}%)`},"conflictCell"),xe={calls:a((r,e)=>e.calls-r.calls,"calls"),recent:a((r,e)=>e.lastCalledAt-r.lastCalledAt,"recent"),slowest:a((r,e)=>e.maxDurationMs-r.maxDurationMs,"slowest")},Ie=a(r=>{let e=(0,ae.c)(47),{functions:I,initialShardKey:oe}=r,s=H(),[n,ie]=(0,q.useState)(oe??""),[d,ne]=(0,q.useState)("recent"),C;e[0]!==n?(C=n.trim(),e[0]=n,e[1]=C):C=e[1];let F=Y(C,400),M;e[2]===Symbol.for("react.memo_cache_sentinel")?(M={},e[2]=M):M=e[2];let T;e[3]!==F?(T={live:!0,shardKey:F},e[3]=F,e[4]=T):T=e[4];let{data:de,error:c,errorSource:N,liveError:b}=G(J.getFunctionStats,M,T),S=de?.functions??null,w;e[5]!==I?(w=new Map((I??[]).map(ge)),e[5]=I,e[6]=w):w=e[6];let K=w,E;e[7]===Symbol.for("react.memo_cache_sentinel")?(E=a(k=>{ne(k.currentTarget.dataset.sort)},"t5"),e[7]=E):E=e[7];let ce=E,$;if(e[8]!==c||e[9]!==N||e[10]!==K||e[11]!==b||e[12]!==n||e[13]!==d||e[14]!==S||e[15]!==s){let k=S===null?[]:S.toSorted(xe[d]),f;e[17]!==s?(f=s("Recent"),e[17]=s,e[18]=f):f=e[18];let m;e[19]!==f?(m={key:"recent",label:f},e[19]=f,e[20]=m):m=e[20];let u;e[21]!==s?(u=s("Most called"),e[21]=s,e[22]=u):u=e[22];let h;e[23]!==u?(h={key:"calls",label:u},e[23]=u,e[24]=h):h=e[24];let v;e[25]!==s?(v=s("Slowest"),e[25]=s,e[26]=v):v=e[26];let p;e[27]!==v?(p={key:"slowest",label:v},e[27]=v,e[28]=p):p=e[28];let A;e[29]!==h||e[30]!==p||e[31]!==m?(A=[m,h,p],e[29]=h,e[30]=p,e[31]=m,e[32]=A):A=e[32];let _=A,x;e[33]!==n?(x=(0,t.jsxDEV)(X,{onChange:ie,testId:"fs-shard-input",value:n},void 0,!1),e[33]=n,e[34]=x):x=e[34];let g;e[35]!==b?(g=(0,t.jsxDEV)(le,{message:b,prefix:"fs"},void 0,!1),e[35]=b,e[36]=g):g=e[36];let y;e[37]!==_||e[38]!==d?(y=(0,t.jsxDEV)("div",{className:"ml-auto flex items-center gap-1",role:"group",children:_.map(l=>(0,t.jsxDEV)(V,{"data-sort":l.key,"data-testid":`fs-sort-${l.key}`,onClick:ce,size:"sm",type:"button",variant:d===l.key?"secondary":"ghost",children:l.label},l.key,!1))},void 0,!1),e[37]=_,e[38]=d,e[39]=y):y=e[39];let B;e[40]!==x||e[41]!==g||e[42]!==y?(B=(0,t.jsxDEV)("div",{className:"flex flex-wrap items-center gap-2",children:[x,g,y]},void 0,!0),e[40]=x,e[41]=g,e[42]=y,e[43]=B):B=e[43];let D;e[44]!==c||e[45]!==N?(D=c!==null&&(0,t.jsxDEV)(Z,{error:N,testId:"fs-error"},void 0,!1),e[44]=c,e[45]=N,e[46]=D):D=e[46],$=(0,t.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"lunora-function-stats",children:[B,D,S!==null&&k.length===0&&c===null&&(0,t.jsxDEV)(U,{description:s("Per-function call counts, error rates, and latency land here after your first request."),icon:(0,t.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,t.jsxDEV)("path",{d:"M3 3v18h18"},void 0,!1),(0,t.jsxDEV)("path",{d:"M7 14l4-4 3 3 5-6"},void 0,!1)]},void 0,!0),testId:"fs-empty",title:s("No functions have run on this shard yet.")},void 0,!1),k.length>0&&(0,t.jsxDEV)(z,{className:"overflow-hidden py-0",children:(0,t.jsxDEV)(Q,{className:"px-0",children:(0,t.jsxDEV)(ee,{"data-testid":"fs-table",children:[(0,t.jsxDEV)(te,{children:(0,t.jsxDEV)(j,{children:[(0,t.jsxDEV)(o,{children:s("function")},void 0,!1),(0,t.jsxDEV)(o,{children:s("kind")},void 0,!1),(0,t.jsxDEV)(o,{className:"text-right",children:s("calls")},void 0,!1),(0,t.jsxDEV)(o,{className:"text-right",children:s("errors")},void 0,!1),(0,t.jsxDEV)(o,{className:"text-right",children:s("conflicts")},void 0,!1),(0,t.jsxDEV)(o,{className:"text-right",children:s("avg")},void 0,!1),(0,t.jsxDEV)(o,{className:"text-right",children:s("max")},void 0,!1),(0,t.jsxDEV)(o,{children:s("last run")},void 0,!1),(0,t.jsxDEV)(o,{children:s("last error")},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)(re,{children:k.map(l=>{let R=K.get(l.path);return(0,t.jsxDEV)(j,{"data-testid":`fs-row-${l.path}`,children:[(0,t.jsxDEV)(i,{className:"font-medium",children:l.path},void 0,!1),(0,t.jsxDEV)(i,{children:R===void 0?(0,t.jsxDEV)("span",{className:"text-muted-foreground",children:"\u2014"},void 0,!1):(0,t.jsxDEV)(O,{variant:he[R],children:R},void 0,!1)},void 0,!1),(0,t.jsxDEV)(i,{className:"text-right tabular-nums",children:l.calls},void 0,!1),(0,t.jsxDEV)(i,{className:P("text-right tabular-nums",l.errors>0&&"text-destructive"),children:ve(l)},void 0,!1),(0,t.jsxDEV)(i,{className:P("text-right tabular-nums",(l.conflicts??0)>0&&"text-warning"),children:pe(l)},void 0,!1),(0,t.jsxDEV)(i,{className:"text-right tabular-nums",children:l.calls===0?"\u2014":se(l.totalDurationMs/l.calls)},void 0,!1),(0,t.jsxDEV)(i,{className:"text-right tabular-nums",children:l.calls===0?"\u2014":se(l.maxDurationMs)},void 0,!1),(0,t.jsxDEV)(i,{className:"text-muted-foreground",children:W(l.lastCalledAt,"\u2014")},void 0,!1),(0,t.jsxDEV)(i,{className:"max-w-[24ch] truncate text-destructive",title:l.lastErrorMessage??void 0,children:l.lastErrorMessage??(0,t.jsxDEV)("span",{className:"text-muted-foreground",children:"\u2014"},void 0,!1)},void 0,!1)]},l.path,!0)})},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1)]},void 0,!0),e[8]=c,e[9]=N,e[10]=K,e[11]=b,e[12]=n,e[13]=d,e[14]=S,e[15]=s,e[16]=$}else $=e[16];return $},"FunctionStatsPanel");function ge(r){return[r.path,r.kind]}a(ge,"_temp");export{Ie as FunctionStatsPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as O}from"./chunk-J6J54MBP.js";import{a as j}from"./chunk-2K47A3P6.js";import{a as H}from"./chunk-
|
|
1
|
+
import{a as O}from"./chunk-J6J54MBP.js";import{a as j}from"./chunk-2K47A3P6.js";import{a as H}from"./chunk-CACB34RQ.js";import"./chunk-XNJNSCLM.js";import{a as P,b as F,c as L,d as k,e as u,f as m}from"./chunk-GTM65MVX.js";import{a as _}from"./chunk-UKDJ4H7I.js";import"./chunk-TBMYIZIO.js";import"./chunk-3CJW6NWG.js";import"./chunk-O3NAGRTR.js";import"./chunk-HV7G6DFP.js";import{a as R}from"./chunk-BOXSWNXZ.js";import{a as B}from"./chunk-TAD43CG5.js";import{b as K}from"./chunk-C7WTJLC3.js";import{a as M,e as $}from"./chunk-SEU5V7I6.js";import{b as y}from"./chunk-ZPP2KOR4.js";import"./chunk-CKSHCYGC.js";import"./chunk-GLUNBZRI.js";import"./chunk-ZHVTQ37P.js";import"./chunk-3OA7PECS.js";import{d as D}from"./chunk-E75ANNWX.js";import"./chunk-GMSGZDDH.js";import{a as S,e as T,f as U,g as V,h as X}from"./chunk-RRCPZMC2.js";var G=T(V(),1),J=T(U(),1);var t=T(X(),1);var W=80,Z=S(a=>{if(a===void 0)return"";let e=JSON.stringify(a);return e.length>W?`${e.slice(0,W)}\u2026`:e},"formatArguments"),q=S(a=>{let e=[];for(let n of a){let o=n.id.toString();if(n.subscriptions.length===0){e.push({admin:n.admin,connectionId:n.id,key:`c${o}`,subscription:null});continue}n.subscriptions.forEach((s,N)=>{e.push({admin:n.admin,connectionId:n.id,key:`c${o}-s${N.toString()}`,subscription:s})})}return e},"toRows"),w=(0,t.jsxDEV)("span",{className:"text-muted-foreground",children:"\u2014"},void 0,!1),de=S(a=>{let e=(0,G.c)(22),{initialShardKey:n}=a,o=D(),[s,N]=(0,J.useState)(n??""),f;e[0]!==s?(f=s.trim(),e[0]=s,e[1]=f):f=e[1];let A=j(f,400),h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h={},e[2]=h):h=e[2];let p;e[3]!==A?(p={keepPreviousData:!0,shardKey:A},e[3]=A,e[4]=p):p=e[4];let{data:i,error:r,errorSource:c,refetch:Q}=K(R.listSubscriptions,h,p);O(Q,!0);let v;if(e[5]!==r||e[6]!==c||e[7]!==i||e[8]!==s||e[9]!==o){let C=i===void 0?[]:q(i.connections),l;e[11]!==s?(l=(0,t.jsxDEV)(_,{onChange:N,testId:"subs-shard-input",value:s},void 0,!1),e[11]=s,e[12]=l):l=e[12];let d;e[13]!==i||e[14]!==o?(d=i!==void 0&&(0,t.jsxDEV)("div",{className:"ml-auto flex items-center gap-2 text-sm text-muted-foreground","data-testid":"subs-count",children:[(0,t.jsxDEV)(y,{variant:"secondary",children:o("{count} connections",{count:i.totalConnections})},void 0,!1),(0,t.jsxDEV)(y,{variant:"secondary",children:o("{count} subscriptions",{count:i.totalSubscriptions})},void 0,!1)]},void 0,!0),e[13]=i,e[14]=o,e[15]=d):d=e[15];let b;e[16]!==l||e[17]!==d?(b=(0,t.jsxDEV)("div",{className:"flex flex-wrap items-center gap-2",children:[l,d]},void 0,!0),e[16]=l,e[17]=d,e[18]=b):b=e[18];let g;e[19]!==r||e[20]!==c?(g=r!==null&&(0,t.jsxDEV)(H,{error:c,testId:"subs-error"},void 0,!1),e[19]=r,e[20]=c,e[21]=g):g=e[21],v=(0,t.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"subs-panel",children:[b,g,r===null&&i!==void 0&&C.length===0&&(0,t.jsxDEV)(B,{description:o("Active WebSocket subscriptions on this shard."),icon:(0,t.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,t.jsxDEV)("path",{d:"M5 12a7 7 0 0 1 14 0M8 12a4 4 0 0 1 8 0M12 12v8m0-8a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"},void 0,!1)},void 0,!1),testId:"subs-empty",title:o("No active subscriptions.")},void 0,!1),r===null&&C.length>0&&(0,t.jsxDEV)(M,{className:"overflow-hidden py-0",children:(0,t.jsxDEV)($,{className:"px-0",children:(0,t.jsxDEV)(P,{"data-testid":"subs-table",children:[(0,t.jsxDEV)(F,{children:(0,t.jsxDEV)(k,{children:[(0,t.jsxDEV)(u,{children:o("Connection")},void 0,!1),(0,t.jsxDEV)(u,{children:o("Function path")},void 0,!1),(0,t.jsxDEV)(u,{children:o("Table")},void 0,!1),(0,t.jsxDEV)(u,{children:o("Arguments")},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)(L,{children:C.map(x=>{let{subscription:I}=x,E=Z(I?.args);return(0,t.jsxDEV)(k,{"data-testid":"subs-row",children:[(0,t.jsxDEV)(m,{className:"font-medium tabular-nums",children:(0,t.jsxDEV)("span",{className:"inline-flex items-center gap-1.5",children:["#",x.connectionId,x.admin&&(0,t.jsxDEV)(y,{variant:"outline",children:o("admin")},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)(m,{className:"font-mono text-xs",children:I?.functionPath??w},void 0,!1),(0,t.jsxDEV)(m,{children:I?.table??w},void 0,!1),(0,t.jsxDEV)(m,{className:"max-w-[32ch] truncate font-mono text-xs text-muted-foreground",title:E||void 0,children:E||w},void 0,!1)]},x.key,!0)})},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1)]},void 0,!0),e[5]=r,e[6]=c,e[7]=i,e[8]=s,e[9]=o,e[10]=v}else v=e[10];return v},"SubscriptionsPanel");export{de as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as q,b as wo}from"./chunk-5OIBXYZM.js";import{a as xo,c as bo}from"./chunk-L7SK4ZZD.js";import{a as hs,b as Rs}from"./chunk-KEGAWN6Y.js";import{A as ho,B as ze,C as Ne,E as Ro,F as It,G as ht,H as hr,K as Eo,L as yo,O as te,P as fe,d as xt,h as Z,i as Pe,j as mo,k as Zt,l as en,m as pr,n as Cn,o as Ae,p as Y,q as be,r as St,s as Pn,t as po,u as Xt,v as gr,w as tn,x as go,y as nn}from"./chunk-3CJW6NWG.js";import{a as V,c as U,d as Me,e as Oe,f as ft,g as uo,h as Q,i as Re,j as Yt,k as bt,l as ao,m as Tn,n as fr,o as fo,p as dr,q as gt,r as Le,s as Qt,t as wt,u as $t,v as mr}from"./chunk-O3NAGRTR.js";import{a as Sn}from"./chunk-HV7G6DFP.js";import{c as ut,d as ar,e as vn,g as Bt,h as lo,i as at,j as On}from"./chunk-CKSHCYGC.js";import{a as Wt}from"./chunk-3OA7PECS.js";import{a as i,e as ee,f as me}from"./chunk-RRCPZMC2.js";function je(e){e.preventDefault(),e.stopPropagation()}i(je,"stopEvent");function So(e){return"nativeEvent"in e}i(So,"isReactEvent");function In(e){return e.pointerType===""&&e.isTrusted?!0:Pe.os.android&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}i(In,"isVirtualClick");function Mn(e){return Pe.env.jsdom?!1:!Pe.os.android&&e.width===0&&e.height===0||Pe.os.android&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}i(Mn,"isVirtualPointerEvent");function dt(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}i(dt,"isMouseLikePointerType");function vo(e){let t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}i(vo,"isClickLikeEvent");var Co=["top","right","bottom","left"];var vt=Math.min,Ye=Math.max,on=Math.round,sn=Math.floor,nt=i(e=>({x:e,y:e}),"createCoords"),Es={left:"right",right:"left",bottom:"top",top:"bottom"};function cn(e,t,n){return Ye(e,vt(t,n))}i(cn,"clamp");function rt(e,t){return typeof e=="function"?e(t):e}i(rt,"evaluate");function ke(e){return e.split("-")[0]}i(ke,"getSide");function ot(e){return e.split("-")[1]}i(ot,"getAlignment");function kn(e){return e==="x"?"y":"x"}i(kn,"getOppositeAxis");function ln(e){return e==="y"?"height":"width"}i(ln,"getAxisLength");function Xe(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}i(Xe,"getSideAxis");function un(e){return kn(Xe(e))}i(un,"getAlignmentAxis");function Po(e,t,n){n===void 0&&(n=!1);let r=ot(e),o=un(e),s=ln(o),c=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=rn(c)),[c,rn(c)]}i(Po,"getAlignmentSides");function Io(e){let t=rn(e);return[An(e),t,An(t)]}i(Io,"getExpandedPlacements");function An(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}i(An,"getOppositeAlignmentPlacement");var Oo=["left","right"],To=["right","left"],ys=["top","bottom"],xs=["bottom","top"];function bs(e,t,n){switch(e){case"top":case"bottom":return n?t?To:Oo:t?Oo:To;case"left":case"right":return t?ys:xs;default:return[]}}i(bs,"getSideList");function Mo(e,t,n,r){let o=ot(e),s=bs(ke(e),n==="start",r);return o&&(s=s.map(c=>c+"-"+o),t&&(s=s.concat(s.map(An)))),s}i(Mo,"getOppositeAxisPlacements");function rn(e){let t=ke(e);return Es[t]+e.slice(t.length)}i(rn,"getOppositePlacement");function ws(e){return{top:0,right:0,bottom:0,left:0,...e}}i(ws,"expandPaddingObject");function Fn(e){return typeof e!="number"?ws(e):{top:e,right:e,bottom:e,left:e}}i(Fn,"getPaddingObject");function Mt(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}i(Mt,"rectToClientRect");var _e=ee(me(),1);function Ss(e,t){return t!=null&&!dt(t)?0:typeof e=="function"?e():e}i(Ss,"resolveValue");function Rt(e,t,n){let r=Ss(e,n);return typeof r=="number"?r:r?.[t]}i(Rt,"getDelay");function Rr(e){return typeof e=="function"?e():e}i(Rr,"getRestMs");function Dn(e,t){return t||e==="click"||e==="mousedown"}i(Dn,"isClickLikeOpenEvent");function Ao(e){return e?.includes("mouse")&&e!=="mousedown"}i(Ao,"isHoverOpenEvent");var ko=ee(Wt(),1);var Er=_e.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new ze,currentIdRef:{current:null},currentContextRef:{current:null}});Er.displayName="FloatingDelayGroupContext";function vs(e,t){e.current=t.current}i(vs,"resetDelayRef");function Os(e){let{children:t,delay:n,timeoutMs:r=0}=e,o=_e.useRef(n),s=_e.useRef(n),c=_e.useRef(null),l=_e.useRef(null),d=Ne();return V(()=>{if(s.current=n,!c.current){o.current=n;return}o.current={open:Rt(o.current,"open"),close:Rt(n,"close")}},[n,c,o,s]),(0,ko.jsx)(Er.Provider,{value:_e.useMemo(()=>({hasProvider:!0,delayRef:o,initialDelayRef:s,currentIdRef:c,timeoutMs:r,currentContextRef:l,timeout:d}),[r,d]),children:t})}i(Os,"FloatingDelayGroup");function Ts(e,t={open:!1}){let{open:n}=t,r="rootStore"in e?e.rootStore:e,o=r.useState("floatingId"),s=_e.useContext(Er),{currentIdRef:c,delayRef:l,timeoutMs:d,initialDelayRef:a,currentContextRef:u,hasProvider:m,timeout:f}=s,[g,p]=_e.useState(!1),R=_e.useRef(n),E=_e.useRef(!1);return V(()=>{R.current=n},[n]),V(()=>()=>{E.current=!0},[]),V(()=>{function y(){E.current||p(!1),u.current?.setIsInstantPhase(!1),c.current=null,u.current=null,l.current=a.current,f.clear()}if(i(y,"unset"),!!c.current&&!n&&c.current===o){if(p(!1),d){let h=o;return f.start(d,()=>{r.select("open")||c.current&&c.current!==h||y()}),()=>{(R.current||c.current!==h)&&f.clear()}}y()}},[n,o,c,l,d,a,u,f,r]),V(()=>{if(!n)return;let y=u.current,h=c.current;f.clear(),u.current={onOpenChange:r.setOpen,setIsInstantPhase:p},c.current=o,l.current={open:0,close:Rt(a.current,"close")},h!==null&&h!==o?(p(!0),y?.setIsInstantPhase(!0),y?.onOpenChange(!1,fe(te.none))):(p(!1),y?.setIsInstantPhase(!1))},[n,o,r,c,l,a,u,f]),V(()=>()=>{if(c.current===o){if(u.current=null,!R.current)return;c.current=null,vs(l,a),f.clear()}},[u,c,l,o,a,f]),_e.useMemo(()=>({hasProvider:m,delayRef:l,isInstantPhase:g}),[m,l,g])}i(Ts,"useDelayGroup");function we(e){let t=ut(Cs,e).current;return t.next=e,V(t.effect),t}i(we,"useValueAsRef");function Cs(e){let t={current:e,next:e,effect:i(()=>{t.current=t.next},"effect")};return t}i(Cs,"createLatestRef");var Ln=ee(me(),1);var Fo=ee(Wt(),1);var At=Ln.forwardRef(i(function(t,n){let[r,o]=Ln.useState();return V(()=>{Pe.screenReader.voiceOver&&Pe.engine.webkit&&o("button")},[]),(0,Fo.jsx)("span",{...t,ref:n,style:xo,"aria-hidden":r?void 0:!0,...{tabIndex:0,role:r},"data-base-ui-focus-guard":""})},"FocusGuard"));At.displayName="FocusGuard";var Do={style:{transition:"none"}},Lo="data-base-ui-click-trigger",Ps="data-base-ui-swipe-ignore",Is="data-swipe-ignore",Dl=`[${Ps}]`,Ll=`[${Is}]`,Nl={fallbackAxisSide:"none"},_l={fallbackAxisSide:"end"},No={clipPath:"inset(50%)",position:"fixed",top:0,left:0};var Se=ee(me(),1),Tr=ee(Sn(),1);function He(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}i(He,"mergeCleanups");function yr(e,t){return t<0||t>=e.length}i(yr,"isIndexOutOfListBounds");function Nn(e,t){return kt(e.current,{disabledIndices:t})}i(Nn,"getMinListIndex");function xr(e,t){return kt(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}i(xr,"getMaxListIndex");function kt(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let s=t;do s+=n?-o:o;while(s>=0&&s<=e.length-1&&br(e,s,r));return s}i(kt,"findNonDisabledListIndex");function br(e,t,n){if(typeof n=="function"?n(t):n?.includes(t)??!1)return!0;let o=e[t];return o?Ft(o)?!n&&(o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true"):!0:!1}i(br,"isListIndexDisabled");function Ms(e){return e.visibility==="hidden"||e.visibility==="collapse"}i(Ms,"isHiddenByStyles");function Ft(e,t=e?Le(e):null){return!e||!e.isConnected||!t||Ms(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}i(Ft,"isElementVisible");var As='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function ks(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return Yt(n)?n.host:null}i(ks,"getParentElement");function Sr(e){for(let t of Array.from(e.children))if(Me(t)==="summary")return t;return null}i(Sr,"getDetailsSummary");function Fs(e,t){let n=Sr(t);return!!n&&(e===n||Y(n,e))}i(Fs,"isWithinOpenDetailsSummary");function _o(e){let t=e?Me(e):"";return e!=null&&e.matches(As)&&(t!=="summary"||e.parentElement!=null&&Me(e.parentElement)==="details"&&Sr(e.parentElement)===e)&&(t!=="details"||Sr(e)==null)&&(t!=="input"||e.type!=="hidden")}i(_o,"isFocusableCandidate");function Ho(e){if(!_o(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=ks(t)){let n=t!==e,r=Me(t)==="slot";if(t.hasAttribute("inert")||n&&Me(t)==="details"&&!t.open&&!Fs(e,t)||t.hasAttribute("hidden")||!r&&!Ds(t,n))return!1}return!0}i(Ho,"isFocusableElement");function Ds(e,t){let n=Le(e);return t?n.display!=="none":Ft(e,n)}i(Ds,"isVisibleInTabbableTree");function Vo(e){let t=e.tabIndex;if(t<0){let n=Me(e);if(n==="details"||n==="audio"||n==="video"||Re(e)&&e.isContentEditable)return 0}return t}i(Vo,"getTabIndex");function wr(e){if(Me(e)!=="input")return null;let t=e;return t.type==="radio"&&t.name!==""?t:null}i(wr,"getNamedRadioInput");function Ls(e,t){let n=wr(e);if(!n)return!0;let r=t.find(o=>{let s=wr(o);return s?.name===n.name&&s.form===n.form&&s.checked});return r?r===n:t.find(o=>{let s=wr(o);return s?.name===n.name&&s.form===n.form})===n}i(Ls,"isTabbableRadio");function Wo(e){if(Re(e)&&Me(e)==="slot"){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Re(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}i(Wo,"getComposedChildren");function Bo(e,t){Wo(e).forEach(n=>{_o(n)&&t.push(n),Bo(n,t)})}i(Bo,"appendCandidates");function Yo(e,t,n){Wo(e).forEach(r=>{Re(r)&&r.matches(t)&&n.push(r),Yo(r,t,n)})}i(Yo,"appendMatchingElements");function _n(e){return Ho(e)&&Vo(e)>=0}i(_n,"isTabbable");function vr(e){let t=[];return Bo(e,t),t.filter(Ho)}i(vr,"focusable");function Gt(e){let t=vr(e);return t.filter(n=>Vo(n)>=0&&Ls(n,t))}i(Gt,"tabbable");function $o(e,t){let n=Gt(e),r=n.length;if(r===0)return;let o=Ae(Z(e)),s=n.indexOf(o),c=s===-1?t===1?0:r-1:s+t;return n[c]}i($o,"getTabbableIn");function Hn(e){return $o(Z(e).body,1)||e}i(Hn,"getNextTabbable");function Vn(e){return $o(Z(e).body,-1)||e}i(Vn,"getPreviousTabbable");function Xo(e,t){if(!e)return null;let n=Gt(Z(e).body),r=n.length;if(r===0)return null;let o=n.indexOf(e);if(o===-1)return null;let s=(o+t+r)%r;return n[s]}i(Xo,"getTabbableNearElement");function zl(e){return Xo(e,1)}i(zl,"getTabbableAfterElement");function jl(e){return Xo(e,-1)}i(jl,"getTabbableBeforeElement");function Dt(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Y(n,r)}i(Dt,"isOutsideEvent");function Go(e){Gt(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}i(Go,"disableFocusInside");function Or(e){let t=[];Yo(e,"[data-tabindex]",t),t.forEach(n=>{let r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}i(Or,"enableFocusInside");function Et(e){return`data-base-ui-${e}`}i(Et,"createAttribute");var Lt=ee(Wt(),1);var Cr=Se.createContext(null);Cr.displayName="PortalContext";var Pr=i(()=>Se.useContext(Cr),"usePortalContext"),Ns=Et("portal");function Uo(e={}){let{ref:t,container:n,componentProps:r=at,elementProps:o}=e,s=xt(),l=Pr()?.portalNode,[d,a]=Se.useState(null),[u,m]=Se.useState(null),f=U(E=>{E!==null&&m(E)}),g=Se.useRef(null);V(()=>{if(n===null){g.current&&(g.current=null,m(null),a(null));return}if(s==null)return;let E=(n&&(uo(n)?n:n.current))??l??document.body;if(E==null){g.current&&(g.current=null,m(null),a(null));return}g.current!==E&&(g.current=E,m(null),a(E))},[n,l,s]);let p=On("div",r,{ref:[t,f],props:[{id:s,[Ns]:""},o]});return{portalNode:u,portalSubtree:d&&p?Tr.createPortal(p,d):null}}i(Uo,"useFloatingPortalNode");var Ko=Se.forwardRef(i(function(t,n){let{render:r,className:o,style:s,children:c,container:l,renderGuards:d,...a}=t,{portalNode:u,portalSubtree:m}=Uo({container:l,ref:n,componentProps:t,elementProps:a}),f=Se.useRef(null),g=Se.useRef(null),p=Se.useRef(null),R=Se.useRef(null),[E,y]=Se.useState(null),h=Se.useRef(!1),b=E?.modal,x=E?.open,T=typeof d=="boolean"?d:!!E&&!E.modal&&E.open&&!!u;Se.useEffect(()=>{if(!u||b)return;function S(P){u&&P.relatedTarget&&Dt(P)&&(P.type==="focusin"?h.current&&(Or(u),h.current=!1):(Go(u),h.current=!0))}return i(S,"onFocus"),He(q(u,"focusin",S,!0),q(u,"focusout",S,!0))},[u,b]),V(()=>{!u||x!==!0||!h.current||(Or(u),h.current=!1)},[x,u]);let I=Se.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:g,beforeInsideRef:p,afterInsideRef:R,portalNode:u,setFocusManagerState:y}),[u]);return(0,Lt.jsxs)(Se.Fragment,{children:[m,(0,Lt.jsxs)(Cr.Provider,{value:I,children:[T&&u&&(0,Lt.jsx)(At,{"data-type":"outside",ref:f,onFocus:i(S=>{if(Dt(S,u))p.current?.focus();else{let P=E?E.domReference:null;Vn(P)?.focus()}},"onFocus")}),T&&u&&(0,Lt.jsx)("span",{"aria-owns":u.id,style:No}),u&&Tr.createPortal(c,u),T&&u&&(0,Lt.jsx)(At,{"data-type":"outside",ref:g,onFocus:i(S=>{if(Dt(S,u))R.current?.focus();else{let P=E?E.domReference:null;Hn(P)?.focus(),E?.closeOnFocusOut&&E?.onOpenChange(!1,fe(te.focusOut,S.nativeEvent))}},"onFocus")})]})]})},"FloatingPortal"));Ko.displayName="FloatingPortal";function Wn(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}i(Wn,"createEventEmitter");var Bn=class{static{i(this,"FloatingTreeStore")}nodesRef={current:[]};events=Wn();addNode(t){this.nodesRef.current.push(t)}removeNode(t){let n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}};var Ot=ee(me(),1);var Ir=ee(Wt(),1);var Mr=Ot.createContext(null);Mr.displayName="FloatingNodeContext";var Ar=Ot.createContext(null);Ar.displayName="FloatingTreeContext";var it=i(()=>Ot.useContext(Mr)?.id||null,"useFloatingParentNodeId"),Ge=i(e=>{let t=Ot.useContext(Ar);return e??t},"useFloatingTree");function _s(e){let t=xt(),n=Ge(e),r=it();return V(()=>{if(!t)return;let o={id:t,parentId:r};return n?.addNode(o),()=>{n?.removeNode(o)}},[n,t,r]),t}i(_s,"useFloatingNodeId");function Hs(e){let{children:t,id:n}=e,r=it();return(0,Ir.jsx)(Mr.Provider,{value:Ot.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}i(Hs,"FloatingNode");function Vs(e){let{children:t,externalTree:n}=e,r=ut(()=>n??new Bn).current;return(0,Ir.jsx)(Ar.Provider,{value:r,children:t})}i(Vs,"FloatingTree");var Ve=ee(me(),1);function Ze(e,t,n=!0){return e.filter(o=>o.parentId===t).flatMap(o=>[...!n||o.context?.open?[o]:[],...Ze(e,o.id,n)])}i(Ze,"getNodeChildren");function kr(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){let o=e.find(s=>s.id===r);r=o?.parentId,o&&(n=n.concat(o))}return n}i(kr,"getNodeAncestors");var Yn=0;function Ut(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:o}=t;cancelAnimationFrame(Yn);function s(){o&&!o()||e?.focus({preventScroll:n})}if(i(s,"exec"),r)return s(),Bt;let c=requestAnimationFrame(s);return Yn=c,()=>{Yn===c&&(cancelAnimationFrame(c),Yn=0)}}i(Ut,"enqueueFocus");var Fr={inert:new WeakMap,"aria-hidden":new WeakMap},zo="data-base-ui-inert",Lr={inert:new WeakSet,"aria-hidden":new WeakSet},an=new WeakMap,Dr=0;function Ws(e){return Lr[e]}i(Ws,"getUncontrolledElementsSet");function Qo(e){return e?Yt(e)?e.host:Qo(e.parentNode):null}i(Qo,"unwrapHost");var jo=i((e,t)=>t.map(n=>{if(e.contains(n))return n;let r=Qo(n);return e.contains(r)?r:null}).filter(n=>n!=null),"correctElements"),qo=i(e=>{let t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},"buildKeepSet"),Jo=i((e,t,n)=>{let r=[],o=i(s=>{!s||n.has(s)||Array.from(s.children).forEach(c=>{Me(c)!=="script"&&(t.has(c)?o(c):r.push(c))})},"walk");return o(e),r},"collectOutsideElements");function Bs(e,t,n,r,{mark:o=!0}){let s=null;r?s="inert":n&&(s="aria-hidden");let c=null,l=null,d=jo(t,e),a=o?Jo(t,qo(d),new Set(d)):[],u=[],m=[];if(s){let f=Fr[s],g=Ws(s);l=g,c=f;let p=jo(t,Array.from(t.querySelectorAll("[aria-live]"))),R=d.concat(p);Jo(t,qo(R),new Set(R)).forEach(y=>{let h=y.getAttribute(s),b=h!==null&&h!=="false",x=(f.get(y)||0)+1;f.set(y,x),u.push(y),x===1&&b&&g.add(y),b||y.setAttribute(s,s==="inert"?"":"true")})}return o&&a.forEach(f=>{let g=(an.get(f)||0)+1;an.set(f,g),m.push(f),g===1&&f.setAttribute(zo,"")}),Dr+=1,()=>{c&&u.forEach(f=>{let p=(c.get(f)||0)-1;c.set(f,p),p||(!l?.has(f)&&s&&f.removeAttribute(s),l?.delete(f))}),o&&m.forEach(f=>{let g=(an.get(f)||0)-1;an.set(f,g),g||f.removeAttribute(zo)}),Dr-=1,Dr||(Fr.inert=new WeakMap,Fr["aria-hidden"]=new WeakMap,Lr.inert=new WeakSet,Lr["aria-hidden"]=new WeakSet,an=new WeakMap)}}i(Bs,"applyAttributeToOthers");function Nr(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:o=!0}=t,s=Z(e[0]).body;return Bs(e,s,n,r,{mark:o})}i(Nr,"markOthers");var fn=ee(Wt(),1);function Ys(e,t){let n=Oe(be(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}i(Ys,"getEventType");var Zo=20,Tt=[];function _r(){Tt=Tt.filter(e=>e.deref()?.isConnected)}i(_r,"clearDisconnectedPreviouslyFocusedElements");function ei(e){_r(),e&&Me(e)!=="body"&&(Tt.push(new WeakRef(e)),Tt.length>Zo&&(Tt=Tt.slice(-Zo)))}i(ei,"addPreviouslyFocusedElement");function ti(){return _r(),Tt[Tt.length-1]?.deref()}i(ti,"getPreviouslyFocusedElement");function $s(e){return e?_n(e)?e:Gt(e)[0]||e:null}i($s,"getFirstTabbableElement");function ni(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;let n=vr(e).filter(o=>{let s=o.getAttribute("data-tabindex")||"";return _n(o)||o.hasAttribute("data-tabindex")&&!s.startsWith("-")}),r=e.getAttribute("tabindex");n.length===0?r!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(r!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}i(ni,"handleTabIndex");function Xs(e){let{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:s=!0,restoreFocus:c=!1,modal:l=!0,closeOnFocusOut:d=!0,openInteractionType:a="",nextFocusableElement:u,previousFocusableElement:m,beforeContentFocusGuardRef:f,externalTree:g,getInsideElements:p}=e,R="rootStore"in t?t.rootStore:t,E=R.useState("open"),y=R.useState("domReferenceElement"),h=R.useState("floatingElement"),{events:b,dataRef:x}=R.context,T=U(()=>x.current.floatingContext?.nodeId),I=o===!1,S=tn(y)&&I,P=we(o),A=we(s),H=we(a),ne=we(E),N=Ge(g),k=Pr(),M=Ve.useRef(!1),v=Ve.useRef(!1),L=Ve.useRef(!1),W=Ve.useRef(null),O=Ve.useRef(""),D=Ve.useRef(""),_=Ve.useRef(null),$=Ve.useRef(null),X=ar(_,f,k?.beforeInsideRef),ue=ar($,k?.afterInsideRef),J=Ne(),ce=Ne(),j=It(),ye=k!=null,B=nn(h),le=U((z=B)=>z?Gt(z):[]),Ee=U(()=>p?.().filter(z=>z!=null)??[]);Ve.useEffect(()=>{if(r||!l)return;function z(pe){pe.key==="Tab"&&Y(B,Ae(Z(B)))&&le().length===0&&!S&&je(pe)}i(z,"onKeyDown");let ae=Z(B);return q(ae,"keydown",z)},[r,B,l,S,le]),Ve.useEffect(()=>{if(r||!E)return;let z=Z(B);function ae(){L.current=!1}i(ae,"clearPointerDownOutside");function pe(Ce){let K=be(Ce),re=Ee(),G=Y(h,K)||Y(y,K)||Y(k?.portalNode,K)||re.some(de=>de===K||Y(de,K));L.current=!G,D.current=Ce.pointerType||"keyboard",K?.closest(`[${Lo}]`)&&(v.current=!0,ce.start(0,()=>{v.current=!1}))}i(pe,"onPointerDown");function xe(){D.current="keyboard"}return i(xe,"onKeyDown"),He(q(z,"pointerdown",pe,!0),q(z,"pointerup",ae,!0),q(z,"pointercancel",ae,!0),q(z,"keydown",xe,!0),ae)},[r,h,y,B,E,k,ce,Ee]),Ve.useEffect(()=>{if(r||!d)return;let z=Z(B);function ae(){v.current=!0,ce.start(0,()=>{v.current=!1})}i(ae,"handlePointerDown");function pe(re){let G=be(re);_n(G)&&(W.current=G)}i(pe,"handleFocusIn");function xe(re){let G=re.relatedTarget,de=re.currentTarget,ve=be(re);l&&G==null&&ve!=null&&Y(h,ve)&&ei(ve),queueMicrotask(()=>{let se=T(),$e=R.context.triggerElements,w=Ee(),C=G?.hasAttribute(Et("focus-guard"))&&[_.current,$.current,k?.beforeInsideRef.current,k?.afterInsideRef.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,ht(m),ht(u)].includes(G),oe=!(Y(y,G)||Y(h,G)||Y(G,h)||Y(k?.portalNode,G)||w.some(F=>F===G||Y(F,G))||G!=null&&$e.hasElement(G)||$e.hasMatchingElement(F=>Y(F,G))||C||N&&(Ze(N.nodesRef.current,se).find(F=>Y(F.context?.elements.floating,G)||Y(F.context?.elements.domReference,G))||kr(N.nodesRef.current,se).find(F=>[F.context?.elements.floating,nn(F.context?.elements.floating)].includes(G)||F.context?.elements.domReference===G)));if(de===y&&B&&ni(B),c&&de!==y&&!Ft(ve)&&Ae(z)===z.body){if(Re(B)&&(B.focus(),c==="popup")){j.request(()=>{B.focus()});return}let F=le(),ie=W.current,et=(ie&&F.includes(ie)?ie:null)||F[F.length-1]||B;Re(et)&&et.focus()}if(x.current.insideReactTree){x.current.insideReactTree=!1;return}(S||!l)&&G&&oe&&!v.current&&(S||G!==ti())&&(M.current=!0,R.setOpen(!1,fe(te.focusOut,re)))})}i(xe,"handleFocusOutside");function Ce(){L.current||(x.current.insideReactTree=!0,J.start(0,()=>{x.current.insideReactTree=!1}))}i(Ce,"markInsideReactTree");let K=Re(y)?y:null;if(!(!h&&!K))return He(K&&q(K,"focusout",xe),K&&q(K,"pointerdown",ae),h&&q(h,"focusin",pe),h&&q(h,"focusout",xe),h&&k&&q(h,"focusout",Ce,!0))},[r,y,h,B,l,N,k,R,d,c,le,S,T,x,J,ce,j,u,m,Ee]),Ve.useEffect(()=>{if(r||!h||!E)return;let z=Array.from(k?.portalNode?.querySelectorAll(`[${Et("portal")}]`)||[]),pe=(N?kr(N.nodesRef.current,T()):[]).find(de=>tn(de.context?.elements.domReference||null))?.context?.elements.domReference,Ce=[...[h,...z,_.current,$.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,...Ee()],pe,ht(m),ht(u),S?y:null].filter(de=>de!=null),K=Nr(Ce,{ariaHidden:l||S,mark:!1}),re=[h,...z].filter(de=>de!=null),G=Nr(re);return()=>{G(),K()}},[E,r,y,h,l,k,S,N,T,u,m,Ee]),V(()=>{if(!E||r||!Re(B))return;let z=Z(B),ae=Ae(z);queueMicrotask(()=>{let pe=P.current,xe=typeof pe=="function"?pe(H.current||""):pe;if(xe===void 0||xe===!1||Y(B,ae))return;let K=null,re=i(()=>(K==null&&(K=le(B)),K[0]||B),"getDefaultFocusElement"),G;xe===!0||xe===null?G=re():G=ht(xe),G=G||re();let de=Y(B,Ae(z));Ut(G,{preventScroll:G===B,shouldFocus(){if(!ne.current)return!1;if(de)return!0;let ve=Ae(z);return!(ve!==G&&Y(B,ve))}})})},[r,E,B,le,P,H,ne]),V(()=>{if(r||!B)return;let z=Z(B),ae=Ae(z),pe=H.current==null;ei(ae);function xe(K){if(K.open||(O.current=Ys(K.nativeEvent,D.current)),K.reason===te.triggerHover&&K.nativeEvent.type==="mouseleave"&&(M.current=!0),K.reason===te.outsidePress)if(K.nested)M.current=!1;else if(In(K.nativeEvent)||Mn(K.nativeEvent))M.current=!1;else{let re=!1;Z(B).createElement("div").focus({get preventScroll(){return re=!0,!1}}),re?M.current=!1:M.current=!0}}i(xe,"onOpenChangeLocal"),b.on("openchange",xe);function Ce(){let K=A.current,re=typeof K=="function"?K(O.current):K;if(re===void 0||re===!1)return null;re===null&&(re=!0);let G=y?.isConnected?y:null,de=ae?.isConnected&&Me(ae)!=="body"?ae:null,ve=pe?de||G:G||de;return ve||(ve=ti()||null),typeof re=="boolean"?ve:ht(re)||ve||null}return i(Ce,"getReturnElement"),()=>{b.off("openchange",xe);let K=Ae(z),re=Ee(),G=Y(h,K)||re.some(se=>se===K||Y(se,K))||N&&Ze(N.nodesRef.current,T(),!1).some(se=>Y(se.context?.elements.floating,K)),de=A.current,ve=Ce();queueMicrotask(()=>{let se=$s(ve),$e=typeof de!="boolean";de&&!M.current&&Re(se)&&(!(!$e&&se!==K&&K!==z.body)||G)&&se.focus({preventScroll:!0}),M.current=!1})}},[r,h,B,A,H,b,N,y,T,Ee]),V(()=>{if(!Pe.engine.webkit||E||!h)return;let z=Ae(Z(h));!Re(z)||!Xt(z)||Y(h,z)&&z.blur()},[E,h]),V(()=>{if(!(r||!k))return k.setFocusManagerState({modal:l,closeOnFocusOut:d,open:E,onOpenChange:R.setOpen,domReference:y}),()=>{k.setFocusManagerState(null)}},[r,k,l,E,R,d,y]),V(()=>{if(!(r||!B))return ni(B),()=>{queueMicrotask(_r)}},[r,B]);let Te=!r&&(l?!S:!0)&&(ye||l);return(0,fn.jsxs)(Ve.Fragment,{children:[Te&&(0,fn.jsx)(At,{"data-type":"inside",ref:X,onFocus:i(z=>{if(l){let ae=le();Ut(ae[ae.length-1])}else k?.portalNode&&(M.current=!1,Dt(z,k.portalNode)?Hn(y)?.focus():ht(m??k.beforeOutsideRef)?.focus())},"onFocus")}),n,Te&&(0,fn.jsx)(At,{"data-type":"inside",ref:ue,onFocus:i(z=>{l?Ut(le()[0]):k?.portalNode&&(d&&(M.current=!0),Dt(z,k.portalNode)?Vn(y)?.focus():ht(u??k.afterOutsideRef)?.focus())},"onFocus")})]})}i(Xs,"FloatingFocusManager");var dn=ee(me(),1);function Gs(e,t={}){let{enabled:n=!0,event:r="click",toggle:o=!0,ignoreMouse:s=!1,stickIfOpen:c=!0,touchOpenDelay:l=0,reason:d=te.triggerPress}=t,a="rootStore"in e?e.rootStore:e,u=a.context.dataRef,m=dn.useRef(void 0),f=It(),g=Ne(),p=dn.useMemo(()=>{function R(y,h,b,x){let T=fe(d,h,b);y&&x==="touch"&&l>0?g.start(l,()=>{a.setOpen(!0,T)}):a.setOpen(y,T)}i(R,"setOpenWithTouchDelay");function E(y,h,b){let x=u.current.openEvent,T=a.select("domReferenceElement")!==h;return y&&T||!y||!o?!0:x&&c?!b(x.type):!1}return i(E,"getNextOpen"),{onPointerDown(y){m.current=y.pointerType},onMouseDown(y){let h=m.current,b=y.nativeEvent,x=a.select("open");if(y.button!==0||r==="click"||dt(h,!0)&&s)return;let T=E(x,y.currentTarget,P=>P==="click"||P==="mousedown"),I=be(b);if(Xt(I)){R(T,b,I,h);return}let S=y.currentTarget;f.request(()=>{R(T,b,S,h)})},onClick(y){if(r==="mousedown-only")return;let h=m.current;if(r==="mousedown"&&h){m.current=void 0;return}if(dt(h,!0)&&s)return;let b=a.select("open"),x=E(b,y.currentTarget,T=>T==="click"||T==="mousedown"||T==="keydown"||T==="keyup");R(x,y.nativeEvent,y.currentTarget,h)},onKeyDown(){m.current=void 0}}},[u,r,s,d,a,c,o,f,g,l]);return dn.useMemo(()=>n?{reference:p}:at,[n,p])}i(Gs,"useClick");var Ue=ee(me(),1);function Us(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){let s=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},c=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",d=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch",a=s.width,u=s.height,m=s.x,f=s.y;return n==null&&t.x&&c&&(n=s.x-t.x),r==null&&t.y&&l&&(r=s.y-t.y),m-=n||0,f-=r||0,a=0,u=0,!o||d?(a=t.axis==="y"?s.width:0,u=t.axis==="x"?s.height:0,m=c&&t.x!=null?t.x:m,f=l&&t.y!=null?t.y:f):o&&!d&&(u=t.axis==="x"?s.height:u,a=t.axis==="y"?s.width:a),o=!0,{width:a,height:u,x:m,y:f,top:f,right:m+a,bottom:f+u,left:m}}}}i(Us,"createVirtualElement");function ri(e){return e!=null&&e.clientX!=null}i(ri,"isMouseBasedEvent");function Ks(e,t={}){let{enabled:n=!0,axis:r="both"}=t,o="rootStore"in e?e.rootStore:e,s=o.useState("open"),c=o.useState("floatingElement"),l=o.useState("domReferenceElement"),d=o.context.dataRef,a=Ue.useRef(!1),u=Ue.useRef(null),[m,f]=Ue.useState(),[g,p]=Ue.useState([]),R=U(x=>{o.set("positionReference",x)}),E=U((x,T,I)=>{a.current||d.current.openEvent&&!ri(d.current.openEvent)||o.set("positionReference",Us(I??l,{x,y:T,axis:r,dataRef:d,pointerType:m}))}),y=U(x=>{s?u.current||(E(x.clientX,x.clientY,x.currentTarget),p([])):E(x.clientX,x.clientY,x.currentTarget)}),h=dt(m)?c:s;Ue.useEffect(()=>{if(!n){R(l);return}if(!h)return;function x(){u.current?.(),u.current=null}i(x,"cleanupListener");let T=Oe(c);function I(S){let P=be(S);Y(c,P)?x():E(S.clientX,S.clientY)}return i(I,"handleMouseMove"),!d.current.openEvent||ri(d.current.openEvent)?u.current=q(T,"mousemove",I):R(l),x},[h,n,c,d,l,o,E,R,g]),Ue.useEffect(()=>()=>{o.set("positionReference",null)},[o]),Ue.useEffect(()=>{n&&!c&&(a.current=!1)},[n,c]),Ue.useEffect(()=>{!n&&s&&(a.current=!0)},[n,s]);let b=Ue.useMemo(()=>{function x(T){f(T.pointerType)}return i(x,"setPointerTypeRef"),{onPointerDown:x,onPointerEnter:x,onMouseMove:y,onMouseEnter:y}},[y]);return Ue.useMemo(()=>n?{reference:b,trigger:b}:{},[n,b])}i(Ks,"useClientPoint");var Ke=ee(me(),1);function zs(){return!1}i(zs,"alwaysFalse");function js(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}i(js,"normalizeProp");function qs(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:o=!0,outsidePressEvent:s="sloppy",referencePress:c=zs,bubbles:l,externalTree:d}=t,a="rootStore"in e?e.rootStore:e,u=a.useState("open"),m=a.useState("floatingElement"),{dataRef:f}=a.context,g=Ge(d),p=U(typeof o=="function"?o:()=>!1),R=typeof o=="function"?p:o,E=R!==!1,y=U(()=>s),{escapeKey:h,outsidePress:b}=js(l),x=Ke.useRef(!1),T=Ke.useRef(!1),I=Ke.useRef(!1),S=Ke.useRef(!1),P=Ke.useRef(""),A=Ke.useRef(null),H=Ne(),ne=Ne(),N=U(()=>{ne.clear(),f.current.insideReactTree=!1}),k=U(X=>{let ue=f.current.floatingContext?.nodeId;return(g?Ze(g.nodesRef.current,ue):[]).some(ce=>ce.context?.open&&!ce.context.dataRef.current[X])}),M=U(X=>Pn(X,a.select("floatingElement"))||Pn(X,a.select("domReferenceElement"))),v=U(X=>{c()&&a.setOpen(!1,fe(te.triggerPress,X.nativeEvent))}),L=U(X=>{if(!u||!n||!r||X.key!=="Escape"||S.current||!h&&k("__escapeKeyBubbles"))return;let ue=So(X)?X.nativeEvent:X,J=fe(te.escapeKey,ue);a.setOpen(!1,J),J.isCanceled||X.preventDefault(),!h&&!J.isPropagationAllowed&&X.stopPropagation()}),W=U(()=>{f.current.insideReactTree=!0,ne.start(0,N)}),O=U(X=>{if(!u||!n||X.button!==0)return;let ue=be(X.nativeEvent);Y(a.select("floatingElement"),ue)&&(x.current||(x.current=!0,T.current=!1))}),D=U(X=>{!u||!n||(X.defaultPrevented||X.nativeEvent.defaultPrevented)&&x.current&&(T.current=!0)});Ke.useEffect(()=>{if(!u||!n)return;f.current.__escapeKeyBubbles=h,f.current.__outsidePressBubbles=b;let X=new ze,ue=new ze;function J(){X.clear(),S.current=!0}i(J,"handleCompositionStart");function ce(){X.start(Pe.engine.webkit?5:0,()=>{S.current=!1})}i(ce,"handleCompositionEnd");function j(){I.current=!0,ue.start(0,()=>{I.current=!1})}i(j,"suppressImmediateOutsideClickAfterPreventedStart");function ye(){x.current=!1,T.current=!1}i(ye,"resetPressStartState");function B(){let w=P.current,C=w==="pen"||!w?"mouse":w,oe=y(),F=typeof oe=="function"?oe():oe;return typeof F=="string"?F:F[C]}i(B,"getOutsidePressEvent");function le(w){let C=B();return C==="intentional"&&w.type!=="click"||C==="sloppy"&&w.type==="click"}i(le,"shouldIgnoreEvent");function Ee(w){let C=f.current.floatingContext?.nodeId,oe=g&&Ze(g.nodesRef.current,C).some(F=>Pn(w,F.context?.elements.floating));return M(w)||oe}i(Ee,"isEventWithinFloatingTree");function Te(w){if(le(w)){w.type!=="click"&&!M(w)&&(ue.clear(),I.current=!1),N();return}if(f.current.insideReactTree){N();return}let C=be(w),oe=`[${Et("inert")}]`,F=Q(C)?C.getRootNode():null,ie=Array.from((Yt(F)?F:Z(a.select("floatingElement"))).querySelectorAll(oe)),et=a.context.triggerElements;if(C&&(et.hasElement(C)||et.hasMatchingElement(De=>Y(De,C))))return;let Je=Q(C)?C:null;for(;Je&&!gt(Je);){let De=wt(Je);if(gt(De)||!Q(De))break;Je=De}if(!(ie.length&&Q(C)&&!po(C)&&!Y(C,a.select("floatingElement"))&&ie.every(De=>!Y(Je,De)))){if(Re(C)&&!("touches"in w)){let De=gt(C),st=Le(C),ct=/auto|scroll/,Rn=De||ct.test(st.overflowX),En=De||ct.test(st.overflowY),yn=Rn&&C.clientWidth>0&&C.scrollWidth>C.clientWidth,xn=En&&C.clientHeight>0&&C.scrollHeight>C.clientHeight,bn=st.direction==="rtl",ge=xn&&(bn?w.offsetX<=C.offsetWidth-C.clientWidth:w.offsetX>C.clientWidth),Be=yn&&w.offsetY>C.clientHeight;if(ge||Be)return}if(!Ee(w)){if(B()==="intentional"&&I.current){ue.clear(),I.current=!1;return}typeof R=="function"&&!R(w)||k("__outsidePressBubbles")||(a.setOpen(!1,fe(te.outsidePress,w)),N())}}}i(Te,"closeOnPressOutside");function z(w){B()!=="sloppy"||w.pointerType==="touch"||!a.select("open")||!n||M(w)||Te(w)}i(z,"handlePointerDown");function ae(w){if(B()!=="sloppy"||!a.select("open")||!n||M(w))return;let C=w.touches[0];C&&(A.current={startTime:Date.now(),startX:C.clientX,startY:C.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},H.start(1e3,()=>{A.current&&(A.current.dismissOnTouchEnd=!1,A.current.dismissOnMouseDown=!1)}))}i(ae,"handleTouchStart");function pe(w,C){let oe=be(w);if(!oe)return;let F=q(oe,w.type,()=>{C(w),F()})}i(pe,"addTargetEventListenerOnce");function xe(w){P.current="touch",pe(w,ae)}i(xe,"handleTouchStartCapture");function Ce(w){H.clear(),w.type==="pointerdown"&&(P.current=w.pointerType),!(w.type==="mousedown"&&A.current&&!A.current.dismissOnMouseDown)&&pe(w,C=>{C.type==="pointerdown"?z(C):Te(C)})}i(Ce,"closeOnPressOutsideCapture");function K(w){if(!x.current)return;let C=T.current;if(ye(),B()==="intentional"){if(w.type==="pointercancel"){C&&j();return}if(!Ee(w)){if(C){j();return}typeof R=="function"&&!R(w)||(ue.clear(),I.current=!0,N())}}}i(K,"handlePressEndCapture");function re(w){if(B()!=="sloppy"||!A.current||M(w))return;let C=w.touches[0];if(!C)return;let oe=Math.abs(C.clientX-A.current.startX),F=Math.abs(C.clientY-A.current.startY),ie=Math.sqrt(oe*oe+F*F);ie>5&&(A.current.dismissOnTouchEnd=!0),ie>10&&(Te(w),H.clear(),A.current=null)}i(re,"handleTouchMove");function G(w){pe(w,re)}i(G,"handleTouchMoveCapture");function de(w){B()!=="sloppy"||!A.current||M(w)||(A.current.dismissOnTouchEnd&&Te(w),H.clear(),A.current=null)}i(de,"handleTouchEnd");function ve(w){pe(w,de)}i(ve,"handleTouchEndCapture");let se=Z(m),$e=He(r&&He(q(se,"keydown",L),q(se,"compositionstart",J),q(se,"compositionend",ce)),E&&He(q(se,"click",Ce,!0),q(se,"pointerdown",Ce,!0),q(se,"pointerup",K,!0),q(se,"pointercancel",K,!0),q(se,"mousedown",Ce,!0),q(se,"mouseup",K,!0),q(se,"touchstart",xe,!0),q(se,"touchmove",G,!0),q(se,"touchend",ve,!0)));return()=>{$e(),X.clear(),ue.clear(),ye(),I.current=!1}},[f,m,r,E,R,u,n,h,b,L,N,y,k,M,g,a,H]),Ke.useEffect(N,[R,N]);let _=Ke.useMemo(()=>({onKeyDown:L,onPointerDown:v,onClick:v}),[L,v]),$=Ke.useMemo(()=>({onKeyDown:L,onPointerDown:D,onMouseDown:D,onClickCapture:W,onMouseDownCapture(X){W(),O(X)},onPointerDownCapture(X){W(),O(X)},onMouseUpCapture:W,onTouchEndCapture:W,onTouchMoveCapture:W}),[L,W,O,D]);return Ke.useMemo(()=>n?{reference:_,floating:$,trigger:_}:{},[n,_,$])}i(qs,"useDismiss");function oi(e,t,n){let{reference:r,floating:o}=e,s=Xe(t),c=un(t),l=ln(c),d=ke(t),a=s==="y",u=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2,g;switch(d){case"top":g={x:u,y:r.y-o.height};break;case"bottom":g={x:u,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:m};break;case"left":g={x:r.x-o.width,y:m};break;default:g={x:r.x,y:r.y}}switch(ot(t)){case"start":g[c]-=f*(n&&a?-1:1);break;case"end":g[c]+=f*(n&&a?-1:1);break}return g}i(oi,"computeCoordsFromPlacement");async function ci(e,t){var n;t===void 0&&(t={});let{x:r,y:o,platform:s,rects:c,elements:l,strategy:d}=e,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:m="floating",altBoundary:f=!1,padding:g=0}=rt(t,e),p=Fn(g),E=l[f?m==="floating"?"reference":"floating":m],y=Mt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(E)))==null||n?E:E.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:a,rootBoundary:u,strategy:d})),h=m==="floating"?{x:r,y:o,width:c.floating.width,height:c.floating.height}:c.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),x=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},T=Mt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:h,offsetParent:b,strategy:d}):h);return{top:(y.top-T.top+p.top)/x.y,bottom:(T.bottom-y.bottom+p.bottom)/x.y,left:(y.left-T.left+p.left)/x.x,right:(T.right-y.right+p.right)/x.x}}i(ci,"detectOverflow");var Js=50,li=i(async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:c}=n,l=c.detectOverflow?c:{...c,detectOverflow:ci},d=await(c.isRTL==null?void 0:c.isRTL(t)),a=await c.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:m}=oi(a,r,d),f=r,g=0,p={};for(let R=0;R<s.length;R++){let E=s[R];if(!E)continue;let{name:y,fn:h}=E,{x:b,y:x,data:T,reset:I}=await h({x:u,y:m,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:a,platform:l,elements:{reference:e,floating:t}});u=b??u,m=x??m,p[y]={...p[y],...T},I&&g<Js&&(g++,typeof I=="object"&&(I.placement&&(f=I.placement),I.rects&&(a=I.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:u,y:m}=oi(a,f,d)),R=-1)}return{x:u,y:m,placement:f,strategy:o,middlewareData:p}},"computePosition");var ui=i(function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;let{placement:o,middlewareData:s,rects:c,initialPlacement:l,platform:d,elements:a}=t,{mainAxis:u=!0,crossAxis:m=!0,fallbackPlacements:f,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:R=!0,...E}=rt(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};let y=ke(o),h=Xe(l),b=ke(l)===l,x=await(d.isRTL==null?void 0:d.isRTL(a.floating)),T=f||(b||!R?[rn(l)]:Io(l)),I=p!=="none";!f&&I&&T.push(...Mo(l,R,p,x));let S=[l,...T],P=await d.detectOverflow(t,E),A=[],H=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&A.push(P[y]),m){let M=Po(o,c,x);A.push(P[M[0]],P[M[1]])}if(H=[...H,{placement:o,overflows:A}],!A.every(M=>M<=0)){var ne,N;let M=(((ne=s.flip)==null?void 0:ne.index)||0)+1,v=S[M];if(v&&(!(m==="alignment"?h!==Xe(v):!1)||H.every(O=>Xe(O.placement)===h?O.overflows[0]>0:!0)))return{data:{index:M,overflows:H},reset:{placement:v}};let L=(N=H.filter(W=>W.overflows[0]<=0).sort((W,O)=>W.overflows[1]-O.overflows[1])[0])==null?void 0:N.placement;if(!L)switch(g){case"bestFit":{var k;let W=(k=H.filter(O=>{if(I){let D=Xe(O.placement);return D===h||D==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(D=>D>0).reduce((D,_)=>D+_,0)]).sort((O,D)=>O[1]-D[1])[0])==null?void 0:k[0];W&&(L=W);break}case"initialPlacement":L=l;break}if(o!==L)return{reset:{placement:L}}}return{}}}},"flip");function ii(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}i(ii,"getSideOffsets");function si(e){return Co.some(t=>e[t]>=0)}i(si,"isAnySideFullyClipped");var ai=i(function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=rt(e,t);switch(o){case"referenceHidden":{let c=await r.detectOverflow(t,{...s,elementContext:"reference"}),l=ii(c,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:si(l)}}}case"escaped":{let c=await r.detectOverflow(t,{...s,altBoundary:!0}),l=ii(c,n.floating);return{data:{escapedOffsets:l,escaped:si(l)}}}default:return{}}}}},"hide");var fi=new Set(["left","top"]);async function Qs(e,t){let{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),c=ke(n),l=ot(n),d=Xe(n)==="y",a=fi.has(c)?-1:1,u=s&&d?-1:1,m=rt(t,e),{mainAxis:f,crossAxis:g,alignmentAxis:p}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof p=="number"&&(g=l==="end"?p*-1:p),d?{x:g*u,y:f*a}:{x:f*a,y:g*u}}i(Qs,"convertValueToCoords");var di=i(function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:s,placement:c,middlewareData:l}=t,d=await Qs(t,e);return c===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+d.x,y:s+d.y,data:{...d,placement:c}}}}},"offset"),mi=i(function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o,platform:s}=t,{mainAxis:c=!0,crossAxis:l=!1,limiter:d={fn:i(y=>{let{x:h,y:b}=y;return{x:h,y:b}},"fn")},...a}=rt(e,t),u={x:n,y:r},m=await s.detectOverflow(t,a),f=Xe(ke(o)),g=kn(f),p=u[g],R=u[f];if(c){let y=g==="y"?"top":"left",h=g==="y"?"bottom":"right",b=p+m[y],x=p-m[h];p=cn(b,p,x)}if(l){let y=f==="y"?"top":"left",h=f==="y"?"bottom":"right",b=R+m[y],x=R-m[h];R=cn(b,R,x)}let E=d.fn({...t,[g]:p,[f]:R});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[g]:c,[f]:l}}}}}},"shift"),pi=i(function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:o,rects:s,middlewareData:c}=t,{offset:l=0,mainAxis:d=!0,crossAxis:a=!0}=rt(e,t),u={x:n,y:r},m=Xe(o),f=kn(m),g=u[f],p=u[m],R=rt(l,t),E=typeof R=="number"?{mainAxis:R,crossAxis:0}:{mainAxis:0,crossAxis:0,...R};if(d){let b=f==="y"?"height":"width",x=s.reference[f]-s.floating[b]+E.mainAxis,T=s.reference[f]+s.reference[b]-E.mainAxis;g<x?g=x:g>T&&(g=T)}if(a){var y,h;let b=f==="y"?"width":"height",x=fi.has(ke(o)),T=s.reference[m]-s.floating[b]+(x&&((y=c.offset)==null?void 0:y[m])||0)+(x?0:E.crossAxis),I=s.reference[m]+s.reference[b]+(x?0:((h=c.offset)==null?void 0:h[m])||0)-(x?E.crossAxis:0);p<T?p=T:p>I&&(p=I)}return{[f]:g,[m]:p}}}},"limitShift"),gi=i(function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;let{placement:o,rects:s,platform:c,elements:l}=t,{apply:d=i(()=>{},"apply"),...a}=rt(e,t),u=await c.detectOverflow(t,a),m=ke(o),f=ot(o),g=Xe(o)==="y",{width:p,height:R}=s.floating,E,y;m==="top"||m==="bottom"?(E=m,y=f===(await(c.isRTL==null?void 0:c.isRTL(l.floating))?"start":"end")?"left":"right"):(y=m,E=f==="end"?"top":"bottom");let h=R-u.top-u.bottom,b=p-u.left-u.right,x=vt(R-u[E],h),T=vt(p-u[y],b),I=!t.middlewareData.shift,S=x,P=T;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(S=h),I&&!f){let H=Ye(u.left,0),ne=Ye(u.right,0),N=Ye(u.top,0),k=Ye(u.bottom,0);g?P=p-2*(H!==0||ne!==0?H+ne:Ye(u.left,u.right)):S=R-2*(N!==0||k!==0?N+k:Ye(u.top,u.bottom))}await d({...t,availableWidth:P,availableHeight:S});let A=await c.getDimensions(l.floating);return p!==A.width||R!==A.height?{reset:{rects:!0}}:{}}}},"size");function yi(e){let t=Le(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=Re(e),s=o?e.offsetWidth:n,c=o?e.offsetHeight:r,l=on(n)!==s||on(r)!==c;return l&&(n=s,r=c),{width:n,height:r,$:l}}i(yi,"getCssDimensions");function Vr(e){return Q(e)?e:e.contextElement}i(Vr,"unwrapElement");function Kt(e){let t=Vr(e);if(!Re(t))return nt(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:s}=yi(t),c=(s?on(n.width):n.width)/r,l=(s?on(n.height):n.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!l||!Number.isFinite(l))&&(l=1),{x:c,y:l}}i(Kt,"getScale");var Zs=nt(0);function xi(e){let t=Oe(e);return!dr()||!t.visualViewport?Zs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}i(xi,"getVisualOffsets");function ec(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Oe(e)?!1:t}i(ec,"shouldAddVisualOffsets");function Nt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),s=Vr(e),c=nt(1);t&&(r?Q(r)&&(c=Kt(r)):c=Kt(e));let l=ec(s,n,r)?xi(s):nt(0),d=(o.left+l.x)/c.x,a=(o.top+l.y)/c.y,u=o.width/c.x,m=o.height/c.y;if(s){let f=Oe(s),g=r&&Q(r)?Oe(r):r,p=f,R=mr(p);for(;R&&r&&g!==p;){let E=Kt(R),y=R.getBoundingClientRect(),h=Le(R),b=y.left+(R.clientLeft+parseFloat(h.paddingLeft))*E.x,x=y.top+(R.clientTop+parseFloat(h.paddingTop))*E.y;d*=E.x,a*=E.y,u*=E.x,m*=E.y,d+=b,a+=x,p=Oe(R),R=mr(p)}}return Mt({width:u,height:m,x:d,y:a})}i(Nt,"getBoundingClientRect");function $n(e,t){let n=Qt(e).scrollLeft;return t?t.left+n:Nt(ft(e)).left+n}i($n,"getWindowScrollBarX");function bi(e,t){let n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-$n(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}i(bi,"getHTMLOffset");function tc(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,s=o==="fixed",c=ft(r),l=t?Tn(t.floating):!1;if(r===c||l&&s)return n;let d={scrollLeft:0,scrollTop:0},a=nt(1),u=nt(0),m=Re(r);if((m||!m&&!s)&&((Me(r)!=="body"||bt(c))&&(d=Qt(r)),m)){let g=Nt(r);a=Kt(r),u.x=g.x+r.clientLeft,u.y=g.y+r.clientTop}let f=c&&!m&&!s?bi(c,d):nt(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-d.scrollLeft*a.x+u.x+f.x,y:n.y*a.y-d.scrollTop*a.y+u.y+f.y}}i(tc,"convertOffsetParentRelativeRectToViewportRelativeRect");function nc(e){return Array.from(e.getClientRects())}i(nc,"getClientRects");function rc(e){let t=ft(e),n=Qt(e),r=e.ownerDocument.body,o=Ye(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ye(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),c=-n.scrollLeft+$n(e),l=-n.scrollTop;return Le(r).direction==="rtl"&&(c+=Ye(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:c,y:l}}i(rc,"getDocumentRect");var hi=25;function oc(e,t){let n=Oe(e),r=ft(e),o=n.visualViewport,s=r.clientWidth,c=r.clientHeight,l=0,d=0;if(o){s=o.width,c=o.height;let u=dr();(!u||u&&t==="fixed")&&(l=o.offsetLeft,d=o.offsetTop)}let a=$n(r);if(a<=0){let u=r.ownerDocument,m=u.body,f=getComputedStyle(m),g=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,p=Math.abs(r.clientWidth-m.clientWidth-g);p<=hi&&(s-=p)}else a<=hi&&(s+=a);return{width:s,height:c,x:l,y:d}}i(oc,"getViewportRect");function ic(e,t){let n=Nt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Re(e)?Kt(e):nt(1),c=e.clientWidth*s.x,l=e.clientHeight*s.y,d=o*s.x,a=r*s.y;return{width:c,height:l,x:d,y:a}}i(ic,"getInnerBoundingClientRect");function Ri(e,t,n){let r;if(t==="viewport")r=oc(e,n);else if(t==="document")r=rc(ft(e));else if(Q(t))r=ic(t,n);else{let o=xi(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Mt(r)}i(Ri,"getClientRectFromClippingAncestor");function wi(e,t){let n=wt(e);return n===t||!Q(n)||gt(n)?!1:Le(n).position==="fixed"||wi(n,t)}i(wi,"hasFixedPositionAncestor");function sc(e,t){let n=t.get(e);if(n)return n;let r=$t(e,[],!1).filter(l=>Q(l)&&Me(l)!=="body"),o=null,s=Le(e).position==="fixed",c=s?wt(e):e;for(;Q(c)&&!gt(c);){let l=Le(c),d=fr(c);!d&&l.position==="fixed"&&(o=null),(s?!d&&!o:!d&&l.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||bt(c)&&!d&&wi(e,c))?r=r.filter(u=>u!==c):o=l,c=wt(c)}return t.set(e,r),r}i(sc,"getClippingElementAncestors");function cc(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,c=[...n==="clippingAncestors"?Tn(t)?[]:sc(t,this._c):[].concat(n),r],l=Ri(t,c[0],o),d=l.top,a=l.right,u=l.bottom,m=l.left;for(let f=1;f<c.length;f++){let g=Ri(t,c[f],o);d=Ye(g.top,d),a=vt(g.right,a),u=vt(g.bottom,u),m=Ye(g.left,m)}return{width:a-m,height:u-d,x:m,y:d}}i(cc,"getClippingRect");function lc(e){let{width:t,height:n}=yi(e);return{width:t,height:n}}i(lc,"getDimensions");function uc(e,t,n){let r=Re(t),o=ft(t),s=n==="fixed",c=Nt(e,!0,s,t),l={scrollLeft:0,scrollTop:0},d=nt(0);function a(){d.x=$n(o)}if(i(a,"setLeftRTLScrollbarOffset"),r||!r&&!s)if((Me(t)!=="body"||bt(o))&&(l=Qt(t)),r){let g=Nt(t,!0,s,t);d.x=g.x+t.clientLeft,d.y=g.y+t.clientTop}else o&&a();s&&!r&&o&&a();let u=o&&!r&&!s?bi(o,l):nt(0),m=c.left+l.scrollLeft-d.x-u.x,f=c.top+l.scrollTop-d.y-u.y;return{x:m,y:f,width:c.width,height:c.height}}i(uc,"getRectRelativeToOffsetParent");function Hr(e){return Le(e).position==="static"}i(Hr,"isStaticPositioned");function Ei(e,t){if(!Re(e)||Le(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ft(e)===n&&(n=n.ownerDocument.body),n}i(Ei,"getTrueOffsetParent");function Si(e,t){let n=Oe(e);if(Tn(e))return n;if(!Re(e)){let o=wt(e);for(;o&&!gt(o);){if(Q(o)&&!Hr(o))return o;o=wt(o)}return n}let r=Ei(e,t);for(;r&&ao(r)&&Hr(r);)r=Ei(r,t);return r&>(r)&&Hr(r)&&!fr(r)?n:r||fo(e)||n}i(Si,"getOffsetParent");var ac=i(async function(e){let t=this.getOffsetParent||Si,n=this.getDimensions,r=await n(e.floating);return{reference:uc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},"getElementRects");function fc(e){return Le(e).direction==="rtl"}i(fc,"isRTL");var Wr={convertOffsetParentRelativeRectToViewportRelativeRect:tc,getDocumentElement:ft,getClippingRect:cc,getOffsetParent:Si,getElementRects:ac,getClientRects:nc,getDimensions:lc,getScale:Kt,isElement:Q,isRTL:fc};function vi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}i(vi,"rectsAreEqual");function dc(e,t){let n=null,r,o=ft(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}i(s,"cleanup");function c(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),s();let a=e.getBoundingClientRect(),{left:u,top:m,width:f,height:g}=a;if(l||t(),!f||!g)return;let p=sn(m),R=sn(o.clientWidth-(u+f)),E=sn(o.clientHeight-(m+g)),y=sn(u),b={rootMargin:-p+"px "+-R+"px "+-E+"px "+-y+"px",threshold:Ye(0,vt(1,d))||1},x=!0;function T(I){let S=I[0].intersectionRatio;if(S!==d){if(!x)return c();S?c(!1,S):r=setTimeout(()=>{c(!1,1e-7)},1e3)}S===1&&!vi(a,e.getBoundingClientRect())&&c(),x=!1}i(T,"handleObserve");try{n=new IntersectionObserver(T,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,b)}n.observe(e)}return i(c,"refresh"),c(!0),s}i(dc,"observeMove");function mn(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,a=Vr(e),u=o||s?[...a?$t(a):[],...t?$t(t):[]]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});let m=a&&l?dc(a,n):null,f=-1,g=null;c&&(g=new ResizeObserver(y=>{let[h]=y;h&&h.target===a&&g&&t&&(g.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=g)==null||b.observe(t)})),n()}),a&&!d&&g.observe(a),t&&g.observe(t));let p,R=d?Nt(e):null;d&&E();function E(){let y=Nt(e);R&&!vi(R,y)&&n(),R=y,p=requestAnimationFrame(E)}return i(E,"frameLoop"),n(),()=>{var y;u.forEach(h=>{o&&h.removeEventListener("scroll",n),s&&h.removeEventListener("resize",n)}),m?.(),(y=g)==null||y.disconnect(),g=null,d&&cancelAnimationFrame(p)}}i(mn,"autoUpdate");var Oi=di;var Ti=mi,Ci=ui,Pi=gi,Ii=ai;var Mi=pi,Xn=i((e,t,n)=>{let r=new Map,o={platform:Wr,...n},s={...o.platform,_c:r};return li(e,t,{...o,platform:s})},"computePosition");var Ie=ee(me(),1),ki=ee(me(),1),Fi=ee(Sn(),1);var pc=typeof document<"u",gc=i(function(){},"noop"),Gn=pc?ki.useLayoutEffect:gc;function Un(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Un(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){let s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Un(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}i(Un,"deepEqual");function Di(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}i(Di,"getDPR");function Ai(e,t){let n=Di(e);return Math.round(t*n)/n}i(Ai,"roundByDPR");function Br(e){let t=Ie.useRef(e);return Gn(()=>{t.current=e}),t}i(Br,"useLatestRef");function Li(e){e===void 0&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:c}={},transform:l=!0,whileElementsMounted:d,open:a}=e,[u,m]=Ie.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,g]=Ie.useState(r);Un(f,r)||g(r);let[p,R]=Ie.useState(null),[E,y]=Ie.useState(null),h=Ie.useCallback(O=>{O!==I.current&&(I.current=O,R(O))},[]),b=Ie.useCallback(O=>{O!==S.current&&(S.current=O,y(O))},[]),x=s||p,T=c||E,I=Ie.useRef(null),S=Ie.useRef(null),P=Ie.useRef(u),A=d!=null,H=Br(d),ne=Br(o),N=Br(a),k=Ie.useCallback(()=>{if(!I.current||!S.current)return;let O={placement:t,strategy:n,middleware:f};ne.current&&(O.platform=ne.current),Xn(I.current,S.current,O).then(D=>{let _={...D,isPositioned:N.current!==!1};M.current&&!Un(P.current,_)&&(P.current=_,Fi.flushSync(()=>{m(_)}))})},[f,t,n,ne,N]);Gn(()=>{a===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,m(O=>({...O,isPositioned:!1})))},[a]);let M=Ie.useRef(!1);Gn(()=>(M.current=!0,()=>{M.current=!1}),[]),Gn(()=>{if(x&&(I.current=x),T&&(S.current=T),x&&T){if(H.current)return H.current(x,T,k);k()}},[x,T,k,H,A]);let v=Ie.useMemo(()=>({reference:I,floating:S,setReference:h,setFloating:b}),[h,b]),L=Ie.useMemo(()=>({reference:x,floating:T}),[x,T]),W=Ie.useMemo(()=>{let O={position:n,left:0,top:0};if(!L.floating)return O;let D=Ai(L.floating,u.x),_=Ai(L.floating,u.y);return l?{...O,transform:"translate("+D+"px, "+_+"px)",...Di(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:D,top:_}},[n,l,L.floating,u.x,u.y]);return Ie.useMemo(()=>({...u,update:k,refs:v,elements:L,floatingStyles:W}),[u,k,v,L,W])}i(Li,"useFloating");var Yr=i((e,t)=>{let n=Oi(e);return{name:n.name,fn:n.fn,options:[e,t]}},"offset"),$r=i((e,t)=>{let n=Ti(e);return{name:n.name,fn:n.fn,options:[e,t]}},"shift"),Xr=i((e,t)=>({fn:Mi(e).fn,options:[e,t]}),"limitShift"),Gr=i((e,t)=>{let n=Ci(e);return{name:n.name,fn:n.fn,options:[e,t]}},"flip"),Ur=i((e,t)=>{let n=Pi(e);return{name:n.name,fn:n.fn,options:[e,t]}},"size");var Kr=i((e,t)=>{let n=Ii(e);return{name:n.name,fn:n.fn,options:[e,t]}},"hide");var Ni=ee(me(),1);function _i(e){let t=Ni.useRef(!0);t.current&&(t.current=!1,e())}i(_i,"useOnFirstRender");var Hi=ee(me(),1);var zr=[],jr;function Vi(){return jr}i(Vi,"getInstance");function Wi(e){zr.push(e)}i(Wi,"register");function hc(e){let t=i((n,r)=>{let o=ut(Rc).current,s;try{jr=o;for(let c of zr)c.before(o);s=e(n,r);for(let c of zr)c.after(o);o.didInitialize=!0}finally{jr=void 0}return s},"FastComponent");return t.displayName=e.displayName||e.name,t}i(hc,"fastComponent");function df(e){return Hi.forwardRef(hc(e))}i(df,"fastComponentRef");function Rc(){return{didInitialize:!1}}i(Rc,"createInstance");var Bi=ee(me(),1),qr=ee(hs(),1),Yi=ee(Rs(),1);var Ec=vn(19),yc=Ec?bc:wc;function Kn(e,t,n,r,o){return yc(e,t,n,r,o)}i(Kn,"useStore");function xc(e,t,n,r,o){let s=Bi.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return(0,qr.useSyncExternalStore)(e.subscribe,s,s)}i(xc,"useStoreR19");Wi({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],o=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,o)||(t=!0,r.value=o)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let o of e.syncHooks)n.add(o.store);let r=[];for(let o of n)r.push(o.subscribe(t));return()=>{for(let o of r)o()}}),(0,qr.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function bc(e,t,n,r,o){let s=Vi();if(!s)return xc(e,t,n,r,o);let c=s.syncIndex;s.syncIndex+=1;let l;return s.didInitialize?(l=s.syncHooks[c],(l.store!==e||l.selector!==t||!Object.is(l.a1,n)||!Object.is(l.a2,r)||!Object.is(l.a3,o))&&(l.store!==e&&(s.didChangeStore=!0),l.store=e,l.selector=t,l.a1=n,l.a2=r,l.a3=o,l.value=t(e.getSnapshot(),n,r,o))):(l={store:e,selector:t,a1:n,a2:r,a3:o,value:t(e.getSnapshot(),n,r,o)},s.syncHooks.push(l)),l.value}i(bc,"useStoreFast");function wc(e,t,n,r,o){return(0,Yi.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,n,r,o))}i(wc,"useStoreLegacy");var zn=class{static{i(this,"Store")}constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=i(t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}),"subscribe");getSnapshot=i(()=>this.state,"getSnapshot");setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;let n=this.updateTick;for(let r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(let n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){let t={...this.state};this.setState(t)}use(t,n,r,o){return Kn(this,t,n,r,o)}};var $i=ee(me(),1);var _t=i((e,t,n,r,o,s,...c)=>{if(c.length>0)throw new Error("Unsupported number of selectors");let l;if(e&&t&&n&&r&&o&&s)l=i((d,a,u,m)=>{let f=e(d,a,u,m),g=t(d,a,u,m),p=n(d,a,u,m),R=r(d,a,u,m),E=o(d,a,u,m);return s(f,g,p,R,E,a,u,m)},"selector");else if(e&&t&&n&&r&&o)l=i((d,a,u,m)=>{let f=e(d,a,u,m),g=t(d,a,u,m),p=n(d,a,u,m),R=r(d,a,u,m);return o(f,g,p,R,a,u,m)},"selector");else if(e&&t&&n&&r)l=i((d,a,u,m)=>{let f=e(d,a,u,m),g=t(d,a,u,m),p=n(d,a,u,m);return r(f,g,p,a,u,m)},"selector");else if(e&&t&&n)l=i((d,a,u,m)=>{let f=e(d,a,u,m),g=t(d,a,u,m);return n(f,g,a,u,m)},"selector");else if(e&&t)l=i((d,a,u,m)=>{let f=e(d,a,u,m);return t(f,a,u,m)},"selector");else if(e)l=e;else throw new Error("Missing arguments");return l},"createSelector");var yt=ee(me(),1);var jn=class extends zn{static{i(this,"ReactStore")}constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){yt.useDebugValue(t);let r=this;V(()=>{r.state[t]!==n&&r.set(t,n)},[r,t,n])}useSyncedValueWithCleanup(t,n){let r=this;V(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){let n=this;{yt.useDebugValue(t,c=>Object.keys(c));let o=yt.useRef(Object.keys(t)).current,s=Object.keys(t);(o.length!==s.length||o.some((c,l)=>c!==s[l]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}let r=Object.values(t);V(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){yt.useDebugValue(t);let r=this,o=n!==void 0;V(()=>{o&&!Object.is(r.state[t],n)&&r.setState({...r.state,[t]:n})},[r,t,n,o]);{let s=this.controlledValues??=new Map;s.has(t)||s.set(t,o);let c=s.get(t);c!==void 0&&c!==o&&console.error(`A component is changing the ${o?"":"un"}controlled state of ${t.toString()} to be ${o?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(t,n,r,o){let s=this.selectors[t];return s(this.state,n,r,o)}useState(t,n,r,o){return yt.useDebugValue(t),Kn(this,this.selectors[t],n,r,o)}useContextCallback(t,n){yt.useDebugValue(t);let r=U(n??Bt);this.context[t]=r}useStateSetter(t){let n=yt.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let o=r(this.state);return n(o,o,this),this.subscribe(s=>{let c=r(s);if(!Object.is(o,c)){let l=o;o=c,n(c,l,this)}})}};var Sc={open:_t(e=>e.open),transitionStatus:_t(e=>e.transitionStatus),domReferenceElement:_t(e=>e.domReferenceElement),referenceElement:_t(e=>e.positionReference??e.referenceElement),floatingElement:_t(e=>e.floatingElement),floatingId:_t(e=>e.floatingId)},zt=class extends jn{static{i(this,"FloatingRootStore")}constructor(t){let{syncOnly:n,nested:r,onOpenChange:o,triggerElements:s,...c}=t;super({...c,positionReference:c.referenceElement,domReferenceElement:c.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:Wn(),nested:r,triggerElements:s},Sc),this.syncOnly=n}syncOpenEvent=i((t,n)=>{(!t||!this.state.open||n!=null&&vo(n))&&(this.context.dataRef.current.openEvent=t?n:void 0)},"syncOpenEvent");dispatchOpenChange=i((t,n)=>{this.syncOpenEvent(t,n.event);let r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)},"dispatchOpenChange");setOpen=i((t,n)=>{if(this.syncOnly){this.context.onOpenChange?.(t,n);return}this.dispatchOpenChange(t,n),this.context.onOpenChange?.(t,n)},"setOpen")};function Jr(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:o,nested:s,onOpenChange:c}=e,l=t.useState("open"),d=t.useState("activeTriggerElement"),a=t.useState(n?"popupElement":"positionerElement"),u=t.context.triggerElements,m=c,f=$i.useRef(null);r===void 0&&f.current===null&&(f.current=new zt({open:l,transitionStatus:void 0,referenceElement:d,floatingElement:a,triggerElements:u,onOpenChange:m,floatingId:o,syncOnly:!0,nested:s}));let g=r??f.current;return t.useSyncedValue("floatingId",o),V(()=>{let p={open:l,floatingId:o,referenceElement:d,floatingElement:a};Q(d)&&(p.domReferenceElement=d),g.state.positionReference===g.state.referenceElement&&(p.positionReference=d),g.update(p)},[l,o,d,a,g]),g.context.onOpenChange=m,g.context.nested=s,g}i(Jr,"useSyncedFloatingRootContext");var jt=ee(me(),1),Xi=ee(Sn(),1);var Zf={tabIndex:-1,[mo]:""};function ed(e){return t=>t==="touch"?e.current:!0}i(ed,"createDefaultInitialFocus");function td(e,t,n=!1){let r=xt(),o=it()!=null,s=jt.useRef(null);e===void 0&&s.current===null&&(s.current=t(r,o));let c=e??s.current;return Jr({popupStore:c,treatPopupAsFloatingElement:n,floatingRootContext:c.state.floatingRootContext,floatingId:r,nested:o,onOpenChange:c.setOpen}),{store:c,internalStore:s.current}}i(td,"usePopupStore");function vc(e,t){let n=jt.useRef(null),r=jt.useRef(null);return jt.useCallback(o=>{if(e===void 0)return;let s=!1;if(n.current!==null){let c=n.current,l=r.current,d=t.context.triggerElements.getById(c);l&&d===l&&(t.context.triggerElements.delete(c),s=!0),n.current=null,r.current=null}if(o!==null&&(n.current=e,r.current=o,t.context.triggerElements.add(e,o),s=!0),s){let c=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==c&&t.set("triggerCount",c)}},[t,e])}i(vc,"useTriggerRegistration");function Oc(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);let o=n?.id??null;(o||t)&&(e.activeTriggerId=o,e.activeTriggerElement=n??null)}i(Oc,"setPopupOpenState");function Tc(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}i(Tc,"attachPreventUnmountOnClose");function nd(e,t,n,r={}){let o=n.reason,s=o===te.triggerHover,c=t&&o===te.triggerFocus,l=!t&&(o===te.triggerPress||o===te.escapeKey),d=Tc(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let a=i(()=>{let u={...r.extraState,open:t};c?u.instantType="focus":l?u.instantType="dismiss":s&&(u.instantType=void 0),Oc(u,t,n.trigger,d()),e.update(u)},"changeState");s?Xi.flushSync(a):a()}i(nd,"applyPopupOpenChange");function rd(e,t,n,r){_i(()=>{t===void 0&&e.state.open===!1&&n&&(e.state={...e.state,open:!0,activeTriggerId:r,preventUnmountingOnClose:!1})})}i(rd,"useInitialOpenSync");function od(e,t,n,r){let o=n.useState("isMountedByTrigger",e),s=vc(e,n),c=U(l=>{if(s(l),!l)return;let d=n.select("open"),a=n.select("activeTriggerId");if(a===e){n.update({activeTriggerElement:l,...d?r:null});return}a==null&&d&&n.update({activeTriggerId:e,activeTriggerElement:l,...r})});return V(()=>{o&&n.update({activeTriggerElement:t.current,...r})},[o,n,t,...Object.values(r)]),{registerTrigger:c,isMountedByThisTrigger:o}}i(od,"useTriggerDataForwarding");function id(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState("open"),o=e.useState("triggerCount");V(()=>{if(!r){e.state.triggerCount!==0&&e.set("triggerCount",0);return}let s=e.context.triggerElements.size,c={};e.state.triggerCount!==s&&(c.triggerCount=s);let l=e.select("activeTriggerId"),d=null;if(l){let a=e.context.triggerElements.getById(l);a?a!==e.state.activeTriggerElement&&(c.activeTriggerElement=a):d=l}if(!d&&!l&&s===1){let a=e.context.triggerElements.entries().next();if(!a.done){let[u,m]=a.value;c.activeTriggerId=u,c.activeTriggerElement=m}}(c.triggerCount!==void 0||c.activeTriggerId!==void 0||c.activeTriggerElement!==void 0)&&e.update(c),d&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===d&&!e.context.triggerElements.getById(d)){let a=fe(te.none);e.setOpen(!1,a),a.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,o,n])}i(id,"useImplicitActiveTrigger");function sd(e,t,n){let{mounted:r,setMounted:o,transitionStatus:s}=yo(e),c=t.useState("preventUnmountingOnClose"),l=e?!1:c;t.useSyncedValues({mounted:r,transitionStatus:s,preventUnmountingOnClose:l});let d=U(()=>{o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return Eo({enabled:r&&!e&&!l,open:e,ref:t.context.popupRef,onComplete(){e||d()}}),{forceUnmount:d,transitionStatus:s}}i(sd,"useOpenStateTransitions");function cd(e,t){e.useSyncedValues(t),V(()=>()=>{e.update({activeTriggerProps:at,inactiveTriggerProps:at,popupProps:at})},[e])}i(cd,"usePopupInteractionProps");function ld(e,t){V(()=>{!t&&e.state.openMethod!==null&&e.set("openMethod",null)},[t,e]),V(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}i(ld,"usePopupRootSync");var qn=class{static{i(this,"PopupTriggerMap")}constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){let r=this.idMap.get(t);if(r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n),this.elementsSet.size!==this.idMap.size))throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.")}delete(t){let n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(let n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function Qr(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,o=xt(),s=it()!=null;{let l=r.reference;l&&!Q(l)&&console.error("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `context.setPositionReference()`","instead.")}let c=ut(()=>new zt({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new qn,floatingId:o,syncOnly:!1,nested:s})).current;return V(()=>{let l={open:t,floatingId:o};r.reference!==void 0&&(l.referenceElement=r.reference,l.domReferenceElement=Q(r.reference)?r.reference:null),r.floating!==void 0&&(l.floatingElement=r.floating),c.update(l)},[t,o,r.reference,r.floating,c]),c.context.onOpenChange=n,c.context.nested=s,c}i(Qr,"useFloatingRootContext");var mt=ee(me(),1);var Zr=Pe.os.mac&&Pe.engine.webkit;function Cc(e,t={}){let{enabled:n=!0,delay:r}=t,o="rootStore"in e?e.rootStore:e,{events:s,dataRef:c}=o.context,l=mt.useRef(!1),d=mt.useRef(null),a=mt.useRef(!0),u=Ne();mt.useEffect(()=>{let f=o.select("domReferenceElement");if(!n)return;let g=Oe(f);function p(){let y=o.select("domReferenceElement");!o.select("open")&&Re(y)&&y===Ae(Z(y))&&(l.current=!0)}i(p,"onBlur");function R(){a.current=!0}i(R,"onKeyDown");function E(){a.current=!1}return i(E,"onPointerDown"),He(q(g,"blur",p),Zr&&q(g,"keydown",R,!0),Zr&&q(g,"pointerdown",E,!0))},[o,n]),mt.useEffect(()=>{if(!n)return;function f(g){if(g.reason===te.triggerPress||g.reason===te.escapeKey){let p=o.select("domReferenceElement");Q(p)&&(d.current=p,l.current=!0)}}return i(f,"onOpenChangeLocal"),s.on("openchange",f),()=>{s.off("openchange",f)}},[s,n,o]);let m=mt.useMemo(()=>{function f(){l.current=!1,d.current=null}return i(f,"resetBlockedFocus"),{onMouseLeave(){f()},onFocus(g){let p=g.currentTarget;if(l.current){if(d.current===p)return;f()}let R=be(g.nativeEvent);if(Q(R)){if(Zr&&!g.relatedTarget){if(!a.current&&!Xt(R))return}else if(!go(R))return}let E=St(g.relatedTarget,o.context.triggerElements),{nativeEvent:y,currentTarget:h}=g,b=typeof r=="function"?r():r;if(o.select("open")&&E||b===0||b===void 0){o.setOpen(!0,fe(te.triggerFocus,y,h));return}u.start(b,()=>{l.current||o.setOpen(!0,fe(te.triggerFocus,y,h))})},onBlur(g){f();let p=g.relatedTarget,R=g.nativeEvent,E=Q(p)&&p.hasAttribute(Et("focus-guard"))&&p.getAttribute("data-type")==="outside";u.start(0,()=>{let y=o.select("domReferenceElement"),h=Ae(Z(y));!p&&h===y||Y(c.current.floatingContext?.refs.floating.current,h)||Y(y,h)||E||St(p??h,o.context.triggerElements)||o.setOpen(!1,fe(te.triggerFocus,R))})}}},[c,r,o,u]);return mt.useMemo(()=>n?{reference:m,trigger:m}:{},[n,m])}i(Cc,"useFocus");var eo=class e{static{i(this,"HoverInteraction")}constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new ze,this.restTimeout=new ze,this.handleCloseOptions=void 0}static create(){return new e}dispose=i(()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()},"dispose");disposeEffect=i(()=>this.dispose,"disposeEffect")},Jn=new WeakMap;function qt(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&Jn.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Jn.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}i(qt,"clearSafePolygonPointerEventsMutation");function Qn(e,t){let{scopeElement:n,referenceElement:r,floatingElement:o}=t,s=Jn.get(n);s&&s!==e&&qt(s),qt(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=o,Jn.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",o.style.pointerEvents="auto"}i(Qn,"applySafePolygonPointerEventsMutation");function Zn(e){let t=e.context.dataRef.current,n=ut(()=>t.hoverInteractionState??eo.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=n),ho(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}i(Zn,"useHoverInteractionSharedState");var to=ee(me(),1);function Pc(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:o}=t,s="rootStore"in e?e.rootStore:e,c=s.useState("open"),l=s.useState("floatingElement"),d=s.useState("domReferenceElement"),{dataRef:a}=s.context,u=Ge(),m=it(),f=Zn(s),g=Ne(),p=U(()=>Dn(a.current.openEvent?.type,f.interactedInside)),R=U(()=>Ao(a.current.openEvent?.type)),E=U(()=>{qt(f)});V(()=>{c||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,E())},[c,f,E]),to.useEffect(()=>E,[E]),V(()=>{if(n&&c&&f.handleCloseOptions?.blockPointerEvents&&R()&&Q(d)&&l){let y=d,h=l,b=Z(l),x=u?.nodesRef.current.find(P=>P.id===m)?.context?.elements.floating;x&&(x.style.pointerEvents="");let T=f.pointerEventsScopeElement!==h?f.pointerEventsScopeElement:null,I=x!==h?x:null,S=f.handleCloseOptions?.getScope?.()??T??I??y.closest("[data-rootownerid]")??b.body;return Qn(f,{scopeElement:S,referenceElement:y,floatingElement:h}),()=>{E()}}},[n,c,d,l,f,R,u,m,E]),to.useEffect(()=>{if(!n)return;function y(){return!!(u&&m&&Ze(u.nodesRef.current,m).length>0)}i(y,"hasParentChildren");function h(P){let A=Rt(r,"close",f.pointerType),H=i(()=>{s.setOpen(!1,fe(te.triggerHover,P)),u?.events.emit("floating.closed",P)},"close");A?f.openChangeTimeout.start(A,H):(f.openChangeTimeout.clear(),H())}i(h,"closeWithDelay");function b(P){let A=be(P);if(!gr(A)){f.interactedInside=!1;return}f.interactedInside=A?.closest("[aria-haspopup]")!=null}i(b,"handleInteractInside");function x(){f.openChangeTimeout.clear(),g.clear(),u?.events.off("floating.closed",I),E()}i(x,"onFloatingMouseEnter");function T(P){if(y()&&u){u.events.on("floating.closed",I);return}if(St(P.relatedTarget,s.context.triggerElements))return;let A=a.current.floatingContext?.nodeId??o,H=P.relatedTarget;if(!(u&&A&&Q(H)&&Ze(u.nodesRef.current,A,!1).some(N=>Y(N.context?.elements.floating,H)))){if(f.handler){f.handler(P);return}E(),R()&&!p()&&h(P)}}i(T,"onFloatingMouseLeave");function I(P){!u||!m||y()||g.start(0,()=>{u.events.off("floating.closed",I),s.setOpen(!1,fe(te.triggerHover,P)),u.events.emit("floating.closed",P)})}i(I,"onNodeClosed");let S=l;return He(S&&q(S,"mouseenter",x),S&&q(S,"mouseleave",T),S&&q(S,"pointerdown",b,!0),()=>{u?.events.off("floating.closed",I)})},[n,l,s,a,r,o,R,p,E,f,u,m,g])}i(Pc,"useHoverFloatingInteraction");var Ct=ee(me(),1),Gi=ee(Sn(),1);var Ic={current:null};function Mc(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:o=null,mouseOnly:s=!1,restMs:c=0,move:l=!0,triggerElementRef:d=Ic,externalTree:a,isActiveTrigger:u=!0,getHandleCloseContext:m,isClosing:f,shouldOpen:g}=t,p="rootStore"in e?e.rootStore:e,{dataRef:R,events:E}=p.context,y=Ge(a),h=Zn(p),b=Ct.useRef(!1),x=we(o),T=we(r),I=we(c),S=we(n),P=we(g),A=we(f),H=U(()=>Dn(R.current.openEvent?.type,h.interactedInside)),ne=U(()=>P.current?.()!==!1),N=U((v,L,W)=>{let O=p.context.triggerElements;if(O.hasElement(L))return!v||!Y(v,L);if(!Q(W))return!1;let D=W;return O.hasMatchingElement(_=>Y(_,D))&&(!v||!Y(v,D))}),k=U(()=>{if(!h.handler)return;Z(p.select("domReferenceElement")).removeEventListener("mousemove",h.handler),h.handler=void 0}),M=U(()=>{qt(h)});return u&&(h.handleCloseOptions=x.current?.__options),Ct.useEffect(()=>k,[k]),Ct.useEffect(()=>{if(!n)return;function v(L){L.open?b.current=!1:(b.current=L.reason===te.triggerHover,k(),h.openChangeTimeout.clear(),h.restTimeout.clear(),h.blockMouseMove=!0,h.restTimeoutPending=!1)}return i(v,"onOpenChangeLocal"),E.on("openchange",v),()=>{E.off("openchange",v)}},[n,E,h,k]),Ct.useEffect(()=>{if(!n)return;function v(D,_=!0){let $=Rt(T.current,"close",h.pointerType);$?h.openChangeTimeout.start($,()=>{p.setOpen(!1,fe(te.triggerHover,D)),y?.events.emit("floating.closed",D)}):_&&(h.openChangeTimeout.clear(),p.setOpen(!1,fe(te.triggerHover,D)),y?.events.emit("floating.closed",D))}i(v,"closeWithDelay");let L=d.current??(u?p.select("domReferenceElement"):null);if(!Q(L))return;function W(D){if(h.openChangeTimeout.clear(),h.blockMouseMove=!1,s&&!dt(h.pointerType))return;let _=Rr(I.current),$=Rt(T.current,"open",h.pointerType),X=be(D),ue=D.currentTarget??null,J=p.select("domReferenceElement"),ce=ue;if(Q(X)&&!p.context.triggerElements.hasElement(X)){for(let pe of p.context.triggerElements.elements())if(Y(pe,X)){ce=pe;break}}Q(ue)&&Q(J)&&!p.context.triggerElements.hasElement(ue)&&Y(ue,J)&&(ce=J);let j=ce==null?!1:N(J,ce,X),ye=p.select("open"),B=A.current?.()??p.select("transitionStatus")==="ending",le=!ye&&B&&b.current,Ee=!j&&Q(ce)&&Q(J)&&Y(J,ce)&&le,Te=_>0&&!$,z=j&&(ye||le)||Ee,ae=!ye||j;if(z){ne()&&p.setOpen(!0,fe(te.triggerHover,D,ce));return}Te||($?h.openChangeTimeout.start($,()=>{ae&&ne()&&p.setOpen(!0,fe(te.triggerHover,D,ce))}):ae&&ne()&&p.setOpen(!0,fe(te.triggerHover,D,ce)))}i(W,"onMouseEnter");function O(D){if(H()){M();return}k();let _=p.select("domReferenceElement"),$=Z(_);h.restTimeout.clear(),h.restTimeoutPending=!1;let X=R.current.floatingContext??m?.();if(St(D.relatedTarget,p.context.triggerElements))return;if(x.current&&X){p.select("open")||h.openChangeTimeout.clear();let J=d.current;h.handler=x.current({...X,tree:y,x:D.clientX,y:D.clientY,onClose(){M(),k(),S.current&&!H()&&J===p.select("domReferenceElement")&&v(D,!0)}}),$.addEventListener("mousemove",h.handler),h.handler(D);return}(h.pointerType!=="touch"||!Y(p.select("floatingElement"),D.relatedTarget))&&v(D)}return i(O,"onMouseLeave"),l?He(q(L,"mousemove",W,{once:!0}),q(L,"mouseenter",W),q(L,"mouseleave",O)):He(q(L,"mouseenter",W),q(L,"mouseleave",O))},[k,M,R,T,p,n,x,h,u,N,H,s,l,I,d,y,S,m,A,ne]),Ct.useMemo(()=>{if(!n)return;function v(L){h.pointerType=L.pointerType}return i(v,"setPointerRef"),{onPointerDown:v,onPointerEnter:v,onMouseMove(L){let{nativeEvent:W}=L,O=L.currentTarget,D=p.select("domReferenceElement"),_=p.select("open"),$=N(D,O,L.target);if(s&&!dt(h.pointerType))return;if(_&&$&&h.handleCloseOptions?.blockPointerEvents){let J=p.select("floatingElement");if(J){let ce=h.handleCloseOptions?.getScope?.()??O.ownerDocument.body;Qn(h,{scopeElement:ce,referenceElement:O,floatingElement:J})}}let X=Rr(I.current);if(_&&!$||X===0||!$&&h.restTimeoutPending&&L.movementX**2+L.movementY**2<2)return;h.restTimeout.clear();function ue(){if(h.restTimeoutPending=!1,H())return;let J=p.select("open");!h.blockMouseMove&&(!J||$)&&ne()&&p.setOpen(!0,fe(te.triggerHover,W,O))}i(ue,"handleMouseMove"),h.pointerType==="touch"?Gi.flushSync(()=>{ue()}):$&&_?ue():(h.restTimeoutPending=!0,h.restTimeout.start(X,ue))}}},[n,h,H,N,s,p,I,ne])}i(Mc,"useHoverReferenceInteraction");var Fe=ee(me(),1);var Ac="Escape";function tr(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}i(tr,"doSwitch");function er(e,t){return tr(t,e===pr||e===Cn,e===Zt||e===en)}i(er,"isMainOrientationKey");function no(e,t,n){return tr(t,e===Cn,n?e===Zt:e===en)||e==="Enter"||e===" "||e===""}i(no,"isMainOrientationToEndKey");function kc(e,t,n){return tr(t,n?e===Zt:e===en,e===Cn)}i(kc,"isCrossOrientationOpenKey");function Fc(e,t,n,r){let o=n?e===en:e===Zt,s=e===pr;return t==="both"||t==="horizontal"&&r?e===Ac:tr(t,o,s)}i(Fc,"isCrossOrientationCloseKey");function Dc(e,t){let{listRef:n,activeIndex:r,onNavigate:o=i(()=>{},"onNavigateProp"),enabled:s=!0,selectedIndex:c=null,allowEscape:l=!1,loopFocus:d=!1,nested:a=!1,rtl:u=!1,virtual:m=!1,focusItemOnOpen:f="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:p=!0,disabledIndices:R=void 0,orientation:E="vertical",parentOrientation:y,id:h,resetOnPointerLeave:b=!0,externalTree:x,grid:T}=t,I=T!=null;l&&(d||console.warn("`useListNavigation` looping must be enabled to allow escaping."),m||console.warn("`useListNavigation` must be virtual to allow escaping.")),E==="vertical"&&I&&console.warn("In grid list navigation mode, the `orientation` should",'be either "horizontal" or "both".');let S="rootStore"in e?e.rootStore:e,P=S.useState("open"),A=S.useState("floatingElement"),H=S.useState("domReferenceElement"),ne=S.context.dataRef,N=nn(A),k=tn(H),M=we(N),v=it(),L=Ge(x),W=Fe.useRef(f),O=Fe.useRef(c??-1),D=Fe.useRef(null),_=Fe.useRef(!0),$=U(w=>{o(O.current===-1?null:O.current,w)}),X=Fe.useRef(!!A),ue=Fe.useRef(P),J=Fe.useRef(!1),ce=Fe.useRef(!1),j=Fe.useRef(null),ye=we(R),B=we(P),le=we(c),Ee=we(b),Te=It(),z=It(),ae=U(()=>{function w(ie){m?L?.events.emit("virtualfocus",ie):j.current=Ut(ie,{sync:J.current,preventScroll:!0})}i(w,"runFocus");let C=n.current[O.current],oe=ce.current;C&&w(C),(J.current?ie=>ie():ie=>Te.request(ie))(()=>{let ie=n.current[O.current]||C;if(!ie)return;C||w(ie),G&&(oe||!_.current)&&ie.scrollIntoView?.({block:"nearest",inline:"nearest"})})});V(()=>{ne.current.orientation=E},[ne,E]),V(()=>{s&&(P&&A?(O.current=c??-1,W.current&&c!=null&&(ce.current=!0,$())):X.current&&(O.current=-1,$()))},[s,P,A,c,$]),V(()=>{if(s){if(!P){J.current=!1;return}if(A)if(r==null){if(J.current=!1,le.current!=null)return;if(X.current&&(O.current=-1,ae()),(!ue.current||!X.current)&&W.current&&(D.current!=null||W.current===!0&&D.current==null)){let w=0,C=i(()=>{n.current[0]==null?(w<2&&(w?F=>z.request(F):queueMicrotask)(C),w+=1):(O.current=D.current==null||no(D.current,E,u)||a?Nn(n):xr(n),D.current=null,$())},"waitForListPopulated");C()}}else yr(n.current,r)||(O.current=r,ae(),ce.current=!1)}},[s,P,A,r,le,a,n,E,u,$,ae,z]),V(()=>{if(!s||A||!L||m||!X.current)return;let w=L.nodesRef.current,C=w.find(ie=>ie.id===v)?.context?.elements.floating,oe=Ae(Z(H??C??null)),F=w.some(ie=>ie.context&&Y(ie.context.elements.floating,oe));C&&!F&&_.current&&C.focus({preventScroll:!0})},[s,A,H,L,v,m]),V(()=>{ue.current=P,X.current=!!A}),V(()=>{P||(D.current=null,W.current=f)},[P,f]);let pe=r!=null,xe=U(w=>{if(!B.current)return;let C=n.current.indexOf(w.currentTarget);C!==-1&&(O.current!==C||r!==C)&&(O.current=C,$(w))}),Ce=U(()=>y??L?.nodesRef.current.find(w=>w.id===v)?.context?.dataRef?.current.orientation),K=U(()=>Nn(n,ye.current)),re=U(w=>{if(_.current=!1,J.current=!0,w.which===229||!B.current&&w.currentTarget===M.current)return;if(a&&Fc(w.key,E,u,I)){er(w.key,Ce())||je(w),S.setOpen(!1,fe(te.listNavigation,w.nativeEvent)),Re(H)&&(m?L?.events.emit("virtualfocus",H):H.focus());return}let C=O.current,oe=Nn(n,R),F=xr(n,R);if(k||(w.key==="Home"&&(je(w),O.current=oe,$(w)),w.key==="End"&&(je(w),O.current=F,$(w))),T!=null){let ie=T(w,O.current,n,E,d,u,R,oe,F);if(ie!=null&&(O.current=ie,$(w)),E==="both")return}if(er(w.key,E)){if(je(w),P&&!m&&Ae(w.currentTarget.ownerDocument)===w.currentTarget){O.current=no(w.key,E,u)?oe:F,$(w);return}no(w.key,E,u)?d?C>=F?l&&C!==n.current.length?O.current=-1:(J.current=!1,O.current=oe):O.current=kt(n.current,{startingIndex:C,disabledIndices:R}):O.current=Math.min(F,kt(n.current,{startingIndex:C,disabledIndices:R})):d?C<=oe?l&&C!==-1?O.current=n.current.length:(J.current=!1,O.current=F):O.current=kt(n.current,{startingIndex:C,decrement:!0,disabledIndices:R}):O.current=Math.max(oe,kt(n.current,{startingIndex:C,decrement:!0,disabledIndices:R})),yr(n.current,O.current)&&(O.current=-1),$(w)}}),G=Fe.useMemo(()=>({onFocus(C){J.current=!0,xe(C)},onClick:i(({currentTarget:C})=>C.focus({preventScroll:!0}),"onClick"),onMouseMove(C){J.current=!0,ce.current=!1,g&&xe(C)},onPointerLeave(C){if(!B.current||!_.current||C.pointerType==="touch")return;J.current=!0;let oe=C.relatedTarget;if(!(!g||n.current.includes(oe))&&Ee.current&&(j.current?.(),j.current=null,O.current=-1,$(C),!m)){let F=M.current,ie=Ae(Z(F));F&&Y(F,ie)&&F.focus({preventScroll:!0})}}}),[xe,B,M,g,n,$,Ee,m]),de=Fe.useMemo(()=>m&&P&&pe&&{"aria-activedescendant":`${h}-${r}`},[m,P,pe,h,r]),ve=Fe.useMemo(()=>({"aria-orientation":E==="both"?void 0:E,...k?{}:de,onKeyDown(w){if(w.key==="Tab"&&w.shiftKey&&P&&!m){let C=be(w.nativeEvent);if(C&&!Y(M.current,C))return;je(w),S.setOpen(!1,fe(te.focusOut,w.nativeEvent)),Re(H)&&H.focus();return}re(w)},onPointerMove(){_.current=!0}}),[de,re,M,E,k,S,P,m,H]),se=Fe.useMemo(()=>{function w(F){S.setOpen(!0,fe(te.listNavigation,F.nativeEvent,F.currentTarget))}i(w,"openOnNavigationKeyDown");function C(F){f==="auto"&&In(F.nativeEvent)&&(W.current=!m)}i(C,"checkVirtualMouse");function oe(F){W.current=f,f==="auto"&&Mn(F.nativeEvent)&&(W.current=!0)}return i(oe,"checkVirtualPointer"),{onKeyDown(F){let ie=S.select("open");_.current=!1;let et=F.key.startsWith("Arrow"),Je=kc(F.key,Ce(),u),De=er(F.key,E),st=(a?Je:De)||F.key==="Enter"||F.key.trim()==="";if(m&&ie)return re(F);if(!(!ie&&!p&&et)){if(st){let ct=er(F.key,Ce());D.current=a&&ct?null:F.key}if(a){Je&&(je(F),ie?(O.current=K(),$(F)):w(F));return}De&&(le.current!=null&&(O.current=le.current),je(F),!ie&&p?w(F):re(F),ie&&$(F))}},onFocus(F){S.select("open")&&!m&&(O.current=-1,$(F))},onPointerDown:oe,onPointerEnter:oe,onMouseDown:C,onClick:C}},[re,f,K,a,$,S,p,E,Ce,u,le,m]),$e=Fe.useMemo(()=>({...de,...se}),[de,se]);return Fe.useMemo(()=>s?{reference:$e,floating:ve,item:G,trigger:se}:{},[s,$e,ve,se,G])}i(Dc,"useListNavigation");var Ht=ee(me(),1);function Lc(e,t){let{listRef:n,elementsRef:r,activeIndex:o,onMatch:s,disabledIndices:c,onTyping:l,enabled:d=!0,resetMs:a=750,selectedIndex:u=null}=t,m="rootStore"in e?e.rootStore:e,f=m.useState("open"),g=Ne(),p=Ht.useRef(""),R=Ht.useRef(u??o??-1),E=Ht.useRef(null),y=U(x=>{function T(M){let v=r?.current[M];return!v||Ft(v)}i(T,"isVisible");function I(M){return T(M)?c==null||!br(lo,M,c):!1}i(I,"isItemAvailable");function S(M,v,L=0){if(M.length===0)return-1;let W=(L%M.length+M.length)%M.length,O=v.toLowerCase();for(let D=0;D<M.length;D+=1){let _=(W+D)%M.length;if(!(!M[_]?.toLowerCase().startsWith(O)||!I(_)))return _}return-1}i(S,"getMatchingIndex");let P=n.current;if(p.current.length>0&&x.key===" "&&(je(x),l?.(!0)),p.current.length>0&&p.current[0]!==" "&&S(P,p.current)===-1&&x.key!==" "&&l?.(!1),P==null||x.key.length!==1||x.ctrlKey||x.metaKey||x.altKey)return;f&&x.key!==" "&&(je(x),l?.(!0));let A=p.current==="";A&&(R.current=u??o??-1),P.every((M,v)=>M&&I(v)?M[0]?.toLowerCase()!==M[1]?.toLowerCase():!0)&&p.current===x.key&&(p.current="",R.current=E.current),p.current+=x.key,g.start(a,()=>{p.current="",R.current=E.current,l?.(!1)});let N=((A?u??o??-1:R.current)??0)+1,k=S(P,p.current,N);k!==-1?(s?.(k),E.current=k):x.key!==" "&&(p.current="",l?.(!1))}),h=U(x=>{let T=x.relatedTarget,I=m.select("domReferenceElement"),S=m.select("floatingElement");Y(I,T)||Y(S,T)||(g.clear(),p.current="",R.current=E.current,l?.(!1))});V(()=>{!f&&u!==null||(g.clear(),E.current=null,p.current!==""&&(p.current=""))},[f,u,g]),V(()=>{f&&p.current===""&&(R.current=u??o??-1)},[f,u,o]);let b=Ht.useMemo(()=>({onKeyDown:y,onBlur:h}),[y,h]);return Ht.useMemo(()=>d?{reference:b,floating:b}:{},[d,b])}i(Lc,"useTypeahead");var Ui=.1,Nc=Ui*Ui,he=.5;function nr(e,t,n,r,o,s){return r>=t!=s>=t&&e<=(o-n)*(t-r)/(s-r)+n}i(nr,"hasIntersectingEdge");function rr(e,t,n,r,o,s,c,l,d,a){let u=!1;return nr(e,t,n,r,o,s)&&(u=!u),nr(e,t,o,s,c,l)&&(u=!u),nr(e,t,c,l,d,a)&&(u=!u),nr(e,t,d,a,n,r)&&(u=!u),u}i(rr,"isPointInQuadrilateral");function _c(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}i(_c,"isInsideRect");function or(e,t,n,r,o,s){let c=Math.min(n,o),l=Math.max(n,o),d=Math.min(r,s),a=Math.max(r,s);return e>=c&&e<=l&&t>=d&&t<=a}i(or,"isInsideAxisAlignedRect");function Hc(e={}){let{blockPointerEvents:t=!1}=e,n=new ze,r=i(({x:o,y:s,placement:c,elements:l,onClose:d,nodeId:a,tree:u})=>{let m=c?.split("-")[0],f=!1,g=null,p=null,R=typeof performance<"u"?performance.now():0;function E(h,b){let x=performance.now(),T=x-R;if(g===null||p===null||T===0)return g=h,p=b,R=x,!1;let I=h-g,S=b-p,P=I*I+S*S,A=T*T*Nc;return g=h,p=b,R=x,P<A}i(E,"isCursorMovingSlowly");function y(){n.clear(),d()}return i(y,"close"),i(function(b){n.clear();let x=l.domReference,T=l.floating;if(!x||!T||m==null||o==null||s==null)return;let{clientX:I,clientY:S}=b,P=be(b),A=b.type==="mouseleave",H=Y(T,P),ne=Y(x,P);if(H&&(f=!0,!A))return;if(ne&&(f=!1,!A)){f=!0;return}if(A&&Q(b.relatedTarget)&&Y(T,b.relatedTarget))return;function N(){return!!(u&&Ze(u.nodesRef.current,a).length>0)}i(N,"hasOpenChildNode");function k(){N()||y()}if(i(k,"closeIfNoOpenChild"),N())return;let M=x.getBoundingClientRect(),v=T.getBoundingClientRect(),L=o>v.right-v.width/2,W=s>v.bottom-v.height/2,O=v.width>M.width,D=v.height>M.height,_=(O?M:v).left,$=(O?M:v).right,X=(D?M:v).top,ue=(D?M:v).bottom;if(m==="top"&&s>=M.bottom-1||m==="bottom"&&s<=M.top+1||m==="left"&&o>=M.right-1||m==="right"&&o<=M.left+1){k();return}let J=!1;switch(m){case"top":J=or(I,S,_,M.top+1,$,v.bottom-1);break;case"bottom":J=or(I,S,_,v.top+1,$,M.bottom-1);break;case"left":J=or(I,S,v.right-1,ue,M.left+1,X);break;case"right":J=or(I,S,M.right-1,ue,v.left+1,X);break;default:}if(J)return;if(f&&!_c(I,S,M)){k();return}if(!A&&E(I,S)){k();return}let ce=!1;switch(m){case"top":{let j=O?he/2:he*4,ye=O||L?o+j:o-j,B=O?o-j:L?o+j:o-j,le=s+he+1,Ee=L||O?v.bottom-he:v.top,Te=L?O?v.bottom-he:v.top:v.bottom-he;ce=rr(I,S,ye,le,B,le,v.left,Ee,v.right,Te);break}case"bottom":{let j=O?he/2:he*4,ye=O||L?o+j:o-j,B=O?o-j:L?o+j:o-j,le=s-he,Ee=L||O?v.top+he:v.bottom,Te=L?O?v.top+he:v.bottom:v.top+he;ce=rr(I,S,ye,le,B,le,v.left,Ee,v.right,Te);break}case"left":{let j=D?he/2:he*4,ye=D||W?s+j:s-j,B=D?s-j:W?s+j:s-j,le=o+he+1,Ee=W||D?v.right-he:v.left,Te=W?D?v.right-he:v.left:v.right-he;ce=rr(I,S,Ee,v.top,Te,v.bottom,le,ye,le,B);break}case"right":{let j=D?he/2:he*4,ye=D||W?s+j:s-j,B=D?s-j:W?s+j:s-j,le=o-he,Ee=W||D?v.left+he:v.right,Te=W?D?v.left+he:v.right:v.left+he;ce=rr(I,S,le,ye,le,B,Ee,v.top,Te,v.bottom);break}default:}ce?f||n.start(40,k):k()},"onMouseMove")},"fn");return r.__options={...e,blockPointerEvents:t},r}i(Hc,"safePolygon");var We=ee(me(),1);function ro(e={}){let{nodeId:t,externalTree:n}=e,r=Qr(e),o=e.rootContext||r,s=o.useState("referenceElement"),c=o.useState("floatingElement"),l=o.useState("domReferenceElement"),d=o.useState("open"),a=o.useState("floatingId"),[u,m]=We.useState(null),[f,g]=We.useState(void 0),[p,R]=We.useState(void 0),E=We.useRef(null),y=Ge(n),h=We.useMemo(()=>({reference:s,floating:c,domReference:l}),[s,c,l]),b=Li({...e,elements:{...h,...u&&{reference:u}}}),x=Q(f)?f:null,T=p===void 0?o.state.floatingElement:p;o.useSyncedValue("referenceElement",f??null),o.useSyncedValue("domReferenceElement",f===void 0?l:x),o.useSyncedValue("floatingElement",T);let I=We.useCallback(N=>{let k=Q(N)?{getBoundingClientRect:i(()=>N.getBoundingClientRect(),"getBoundingClientRect"),getClientRects:i(()=>N.getClientRects(),"getClientRects"),contextElement:N}:N;m(k),b.refs.setReference(k)},[b.refs]),S=We.useCallback(N=>{(Q(N)||N===null)&&(E.current=N,g(N)),(Q(b.refs.reference.current)||b.refs.reference.current===null||N!==null&&!Q(N))&&b.refs.setReference(N)},[b.refs,g]),P=We.useCallback(N=>{R(N),b.refs.setFloating(N)},[b.refs]),A=We.useMemo(()=>({...b.refs,setReference:S,setFloating:P,setPositionReference:I,domReference:E}),[b.refs,S,P,I]),H=We.useMemo(()=>({...b.elements,domReference:l}),[b.elements,l]),ne=We.useMemo(()=>({...b,dataRef:o.context.dataRef,open:d,onOpenChange:o.setOpen,events:o.context.events,floatingId:a,refs:A,elements:H,nodeId:t,rootStore:o}),[b,A,H,t,o,d,a]);return V(()=>{l&&(E.current=l)},[l]),V(()=>{o.context.dataRef.current.floatingContext=ne;let N=y?.nodesRef.current.find(k=>k.id===t);N&&(N.context=ne)}),We.useMemo(()=>({...b,context:ne,refs:A,elements:H,rootStore:o}),[b,A,H,ne,o])}i(ro,"useFloating");var io=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=hr.startingStyle]="startingStyle",e[e.endingStyle=hr.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),oo=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({}),Vc={[oo.popupOpen]:""},Wc={[oo.popupOpen]:"",[oo.pressed]:""},Bc={[io.open]:""},Yc={[io.closed]:""},$c={[io.anchorHidden]:""},Sp={open(e){return e?Vc:null}},vp={open(e){return e?Wc:null}},Ki={open(e){return e?Bc:Yc},anchorHidden(e){return e?$c:null}};var gn=ee(me(),1);var pn=ee(me(),1);function zi(e){let t=pn.useRef(""),n=pn.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:pn.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o?e(o,o.pointerType):e(o,t.current),t.current=""},[e]),onPointerDown:n}}i(zi,"useEnhancedClickHandler");function Xc(e,t){let n=U((s,c)=>{(typeof e=="function"?e():e)||t(c||(Pe.os.ios?"touch":""))}),{onClick:r,onPointerDown:o}=zi(n);return gn.useMemo(()=>({onClick:r,onPointerDown:o}),[r,o])}i(Xc,"useOpenMethodTriggerProps");function kp(e){let[t,n]=gn.useState(null),r=Xc(e,n);return bo(e,o=>{o&&!e&&n(null)}),gn.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}i(kp,"useOpenInteractionType");function Np(e){return vn(19)?e:e?"true":void 0}i(Np,"inertValue");var hn={sideX:"left",sideY:"top"},Bp={name:"adaptiveOrigin",async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:o},platform:s,strategy:c,placement:l}=e,d=Oe(o),a=d.getComputedStyle(o);if(!(a.transitionDuration!=="0s"&&a.transitionDuration!==""))return{x:t,y:n,data:hn};let m=await s.getOffsetParent?.(o),f={width:0,height:0};if(c==="fixed"&&d?.visualViewport)f={width:d.visualViewport.width,height:d.visualViewport.height};else if(m===d){let h=Z(o);f={width:h.documentElement.clientWidth,height:h.documentElement.clientHeight}}else await s.isElement?.(m)&&(f=await s.getDimensions(m));let g=ke(l),p=t,R=n;g==="left"&&(p=f.width-(t+r.width)),g==="top"&&(R=f.height-(n+r.height));let E=g==="left"?"right":hn.sideX,y=g==="top"?"bottom":hn.sideY;return{x:p,y:R,data:{sideX:E,sideY:y}}}};var qe=ee(me(),1);var Gc=i(e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:s,platform:c,elements:l,middlewareData:d}=t,{element:a,padding:u=0,offsetParent:m="real"}=rt(e,t)||{};if(a==null)return{};let f=Fn(u),g={x:n,y:r},p=un(o),R=ln(p),E=await c.getDimensions(a),y=p==="y",h=y?"top":"left",b=y?"bottom":"right",x=y?"clientHeight":"clientWidth",T=s.reference[R]+s.reference[p]-g[p]-s.floating[R],I=g[p]-s.reference[p],S=m==="real"?await c.getOffsetParent?.(a):l.floating,P=l.floating[x]||s.floating[R];(!P||!await c.isElement?.(S))&&(P=l.floating[x]||s.floating[R]);let A=T/2-I/2,H=P/2-E[R]/2-1,ne=Math.min(f[h],H),N=Math.min(f[b],H),k=ne,M=P-E[R]-N,v=P/2-E[R]/2+A,L=cn(k,v,M),W=!d.arrow&&ot(o)!=null&&v!==L&&s.reference[R]/2-(v<k?ne:N)-E[R]/2<0,O=W?v<k?v-k:v-M:0;return{[p]:g[p]+O,data:{[p]:L,centerOffset:v-L-O,...W&&{alignmentOffset:O}},reset:W}}}),"baseArrow"),ji=i((e,t)=>({...Gc(e),options:[e,t]}),"arrow");var Uc=Kr().fn,qi={name:"hide",async fn(e){let{width:t,height:n,x:r,y:o}=e.rects.reference,s=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:(await Uc(e)).data?.referenceHidden||s}}}};function Zi(e,t,n){let r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}i(Zi,"getLogicalSide");function Ji(e,t,n){let{rects:r,placement:o}=e;return{side:Zi(t,ke(o),n),align:ot(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}i(Ji,"getOffsetData");function og(e){let{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:c=0,collisionBoundary:l,collisionPadding:d=5,sticky:a=!1,arrowPadding:u=5,disableAnchorTracking:m=!1,inline:f,keepMounted:g=!1,floatingRootContext:p,mounted:R,collisionAvoidance:E,shiftCrossAxis:y=!1,nodeId:h,adaptiveOrigin:b,lazyFlip:x=!1,externalTree:T}=e,[I,S]=qe.useState(null);!R&&I!==null&&S(null);let P=E.side||"flip",A=E.align||"flip",H=E.fallbackAxisSide||"end",ne=typeof t=="function"?t:void 0,N=U(ne),k=ne?N:t,M=we(t),v=we(R),W=wo()==="rtl",O=I||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":W?"left":"right","inline-start":W?"right":"left"}[r],D=s==="center"?O:`${O}-${s}`,_=d,$=1,X=r==="bottom"?$:0,ue=r==="top"?$:0,J=r==="right"?$:0,ce=r==="left"?$:0;typeof _=="number"?_={top:_+X,right:_+ce,bottom:_+ue,left:_+J}:_&&(_={top:(_.top||0)+X,right:(_.right||0)+ce,bottom:(_.bottom||0)+ue,left:(_.left||0)+J});let j={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:_},ye=qe.useRef(null),B=we(o),le=we(c),Ee=typeof o!="function"?o:0,Te=typeof c!="function"?c:0,z=[];f&&z.push(f),z.push(Yr(ge=>{let Be=Ji(ge,r,W),lt=typeof B.current=="function"?B.current(Be):B.current,Qe=typeof le.current=="function"?le.current(Be):le.current;return{mainAxis:lt,crossAxis:Qe,alignmentAxis:Qe}},[Ee,Te,W,r]));let ae=A==="none"&&P!=="shift",pe=!ae&&(a||y||P==="shift"),xe=P==="none"?null:Gr({...j,padding:{top:_.top+$,right:_.right+$,bottom:_.bottom+$,left:_.left+$},mainAxis:!y&&P==="flip",crossAxis:A==="flip"?"alignment":!1,fallbackAxisSideDirection:H}),Ce=ae?null:$r(ge=>{let Be=Z(ge.elements.floating).documentElement;return{...j,rootBoundary:y?{x:0,y:0,width:Be.clientWidth,height:Be.clientHeight}:void 0,mainAxis:A!=="none",crossAxis:pe,limiter:a||y?void 0:Xr(lt=>{if(!ye.current)return{};let{width:Qe,height:pt}=ye.current.getBoundingClientRect(),tt=Xe(ke(lt.placement)),Pt=tt==="y"?Qe:pt,Vt=tt==="y"?_.left+_.right:_.top+_.bottom;return{offset:Pt/2+Vt/2}})}},[j,a,y,_,A]);P==="shift"||A==="shift"||s==="center"?z.push(Ce,xe):z.push(xe,Ce),z.push(Ur({...j,apply({elements:{floating:ge},availableWidth:Be,availableHeight:lt,rects:Qe}){if(!v.current)return;let pt=ge.style;pt.setProperty("--available-width",`${Be}px`),pt.setProperty("--available-height",`${lt}px`);let tt=Oe(ge).devicePixelRatio||1,{x:Pt,y:Vt,width:wn,height:sr}=Qe.reference,cr=(Math.round((Pt+wn)*tt)-Math.round(Pt*tt))/tt,lr=(Math.round((Vt+sr)*tt)-Math.round(Vt*tt))/tt;pt.setProperty("--anchor-width",`${cr}px`),pt.setProperty("--anchor-height",`${lr}px`)}}),ji(ge=>({element:ye.current||Z(ge.elements.floating).createElement("div"),padding:u,offsetParent:"floating"}),[u]),{name:"transformOrigin",fn(ge){let{elements:Be,middlewareData:lt,placement:Qe,rects:pt,y:tt}=ge,Pt=ke(Qe),Vt=Xe(Pt),wn=ye.current,sr=lt.arrow?.x||0,cr=lt.arrow?.y||0,lr=wn?.clientWidth||0,as=wn?.clientHeight||0,ur=sr+lr/2,co=cr+as/2,fs=Math.abs(lt.shift?.y||0),ds=pt.reference.height/2,Jt=typeof o=="function"?o(Ji(ge,r,W)):o,ms=fs>Jt,ps={top:`${ur}px calc(100% + ${Jt}px)`,bottom:`${ur}px ${-Jt}px`,left:`calc(100% + ${Jt}px) ${co}px`,right:`${-Jt}px ${co}px`}[Pt],gs=`${ur}px ${pt.reference.y+ds-tt}px`;return Be.floating.style.setProperty("--transform-origin",pe&&Vt==="y"&&ms?gs:ps),{}}},qi,b),V(()=>{!R&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[R,p]);let K=qe.useMemo(()=>({elementResize:!m&&typeof ResizeObserver<"u",layoutShift:!m&&typeof IntersectionObserver<"u"}),[m]),{refs:re,elements:G,x:de,y:ve,middlewareData:se,update:$e,placement:w,context:C,isPositioned:oe,floatingStyles:F}=ro({rootContext:p,open:g?R:void 0,placement:D,middleware:z,strategy:n,whileElementsMounted:g?void 0:(...ge)=>mn(...ge,K),nodeId:h,externalTree:T}),{sideX:ie,sideY:et}=se.adaptiveOrigin||hn,Je=oe?n:"fixed",De=qe.useMemo(()=>{let ge=b?{position:Je,[ie]:de,[et]:ve}:{position:Je,...F};return oe||(ge.opacity=0),ge},[b,Je,ie,de,et,ve,F,oe]),st=qe.useRef(null);V(()=>{if(!R)return;let ge=M.current,Be=typeof ge=="function"?ge():ge,Qe=(Qi(Be)?Be.current:Be)||null||null;Qe!==st.current&&(re.setPositionReference(Qe),st.current=Qe)},[R,re,k,M]),qe.useEffect(()=>{if(!R)return;let ge=M.current;typeof ge!="function"&&Qi(ge)&&ge.current!==st.current&&(re.setPositionReference(ge.current),st.current=ge.current)},[R,re,k,M]),qe.useEffect(()=>{if(g&&R&&G.reference&&G.floating)return mn(G.reference,G.floating,$e,K)},[g,R,G,$e,K]);let ct=ke(w),Rn=Zi(r,ct,W),En=ot(w)||"center",yn=!!se.hide?.referenceHidden;V(()=>{x&&R&&oe&&S(ct)},[x,R,oe,ct]);let xn=qe.useMemo(()=>({position:"absolute",top:se.arrow?.y,left:se.arrow?.x}),[se.arrow]),bn=se.arrow?.centerOffset!==0;return qe.useMemo(()=>({positionerStyles:De,arrowStyles:xn,arrowRef:ye,arrowUncentered:bn,side:Rn,align:En,physicalSide:ct,anchorHidden:yn,refs:re,context:C,isPositioned:oe,update:$e}),[De,xn,ye,bn,Rn,En,ct,yn,re,C,oe,$e])}i(og,"useAnchorPositioning");function Qi(e){return e!=null&&"current"in e}i(Qi,"isRef");var es=ee(me(),1),ts=ee(Wt(),1);var Kc=es.forwardRef(i(function(t,n){let{cutout:r,...o}=t,s;if(r){let c=r.getBoundingClientRect();s=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${c.left}px ${c.top}px,${c.left}px ${c.bottom}px,${c.right}px ${c.bottom}px,${c.right}px ${c.top}px,${c.left}px ${c.top}px)`}return(0,ts.jsx)("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})},"InternalBackdrop"));Kc.displayName="InternalBackdrop";function ns(e){return e==="starting"?Do:at}i(ns,"getDisabledMountTransitionStyles");function hg(e,t,{styles:n,transitionStatus:r,props:o,refs:s,hidden:c,inert:l=!1}){let d={...n};return l&&(d.pointerEvents="none"),On("div",e,{state:t,ref:s,props:[{role:"presentation",hidden:c,style:d},ns(r),o],stateAttributesMapping:Ki})}i(hg,"usePositioner");var cs=ee(me(),1);var rs={},os={},is="";function zc(e){if(typeof document>"u")return!1;let t=Z(e);return Oe(t).innerWidth-t.documentElement.clientWidth>0}i(zc,"hasInsetScrollbars");function jc(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;let n=Z(e),r=n.documentElement,o=n.body,s=bt(r)?r:o,c=s.style.overflowY,l=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",s.style.overflowY="scroll";let d=s.offsetWidth;s.style.overflowY="hidden";let a=s.offsetWidth;return s.style.overflowY=c,r.style.scrollbarGutter=l,d===a}i(jc,"supportsStableScrollbarGutter");function qc(e){let t=Z(e),n=t.documentElement,r=t.body,o=bt(n)?n:r,s={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,s)}}i(qc,"preventScrollOverlayScrollbars");function Jc(e){let t=Z(e),n=t.documentElement,r=t.body,o=Oe(n),s=0,c=0,l=!1,d=Ro.create();if(Pe.engine.webkit&&(o.visualViewport?.scale??1)!==1)return()=>{};function a(){let g=o.getComputedStyle(n),p=o.getComputedStyle(r),y=(g.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=n.scrollTop,c=n.scrollLeft,rs={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},is=n.style.scrollBehavior,os={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let h=n.scrollHeight>n.clientHeight,b=n.scrollWidth>n.clientWidth,x=g.overflowY==="scroll"||p.overflowY==="scroll",T=g.overflowX==="scroll"||p.overflowX==="scroll",I=Math.max(0,o.innerWidth-r.clientWidth),S=Math.max(0,o.innerHeight-r.clientHeight),P=parseFloat(p.marginTop)+parseFloat(p.marginBottom),A=parseFloat(p.marginLeft)+parseFloat(p.marginRight),H=bt(n)?n:r;if(l=jc(e),l){n.style.scrollbarGutter=y,H.style.overflowY="hidden",H.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:y,overflowY:"hidden",overflowX:"hidden"}),(h||x)&&(n.style.overflowY="scroll"),(b||T)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:P||S?`calc(100dvh - ${P+S}px)`:"100dvh",width:A||I?`calc(100vw - ${A+I}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=s,r.scrollLeft=c,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}i(a,"lockScroll");function u(){Object.assign(n.style,rs),Object.assign(r.style,os),l||(n.scrollTop=s,n.scrollLeft=c,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=is)}i(u,"cleanup");function m(){u(),d.request(a)}i(m,"handleResize"),a();let f=q(o,"resize",m);return()=>{d.cancel(),u(),typeof o.removeEventListener=="function"&&f()}}i(Jc,"preventScrollInsetScrollbars");var so=class{static{i(this,"ScrollLocker")}lockCount=0;restore=null;timeoutLock=ze.create();timeoutUnlock=ze.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=i(()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)},"release");unlock=i(()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)},"unlock");lock(t){if(this.lockCount===0||this.restore!==null)return;let r=Z(t).documentElement,o=Oe(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=Bt;return}let s=Pe.os.ios||!zc(t);this.restore=s?qc(t):Jc(t)}},Qc=new so;function ss(e=!0,t=null){V(()=>{if(e)return Qc.acquire(t)},[e,t])}i(ss,"useScrollLock");var Zc=20;function kg(e,t,n,r){let[o,s]=cs.useState(!1);V(()=>{if(!e||!t||n==null){s(!1);return}let c=Z(n).documentElement.clientWidth,l=n.offsetWidth;s(c>0&&l>0&&l>=c-Zc)},[e,t,n]),ss(e&&(!t||o),r)}i(kg,"useAnchoredPopupScrollLock");var el="ArrowUp",tl="ArrowDown",nl="ArrowLeft",rl="ArrowRight",ol="Home",il="End";var sl=new Set([nl,rl]);var cl=new Set([el,tl]);var ll=new Set([...sl,...cl]),Lg=new Set([...ll,ol,il]);var ir=ee(me(),1);var ls=ir.createContext(void 0);ls.displayName="ToolbarRootContext";function Hg(e){let t=ir.useContext(ls);if(t===void 0&&!e)throw new Error("Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.");return t}i(Hg,"useToolbarRootContext");var us=ee(me(),1);function Xg(e){let[t,n]=us.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}i(Xg,"usePreviousValue");export{In as a,dt as b,on as c,Mt as d,Hn as e,zl as f,jl as g,Dt as h,Os as i,Ts as j,we as k,At as l,Lo as m,Nl as n,_l as o,Uo as p,Ko as q,Bn as r,it as s,Ge as t,_s as u,Hs as v,Vs as w,Xs as x,Gs as y,Ks as z,qs as A,Wr as B,_i as C,_t as D,hc as E,df as F,Kn as G,zn as H,jn as I,zt as J,Jr as K,Zf as L,ed as M,td as N,vc as O,Oc as P,Tc as Q,nd as R,rd as S,od as T,id as U,sd as V,cd as W,ld as X,qn as Y,Qr as Z,Cc as _,Zn as $,Pc as aa,Mc as ba,Dc as ca,Lc as da,Hc as ea,io as fa,oo as ga,Sp as ha,vp as ia,Ki as ja,Xc as ka,kp as la,Np as ma,Bp as na,og as oa,Kc as pa,ns as qa,hg as ra,ss as sa,kg as ta,Lg as ua,Hg as va,Xg as wa};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o,c as r}from"./chunk-O3NAGRTR.js";import{a as i,e as d,f as l}from"./chunk-RRCPZMC2.js";var s={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},p={...s,position:"fixed",top:0,left:0},u={...s,position:"absolute"};var a=d(l(),1);function b(e,c){let t=a.useRef(e),n=r(c);o(()=>{t.current!==e&&n(t.current)},[e,n]),o(()=>{t.current=e},[e])}i(b,"useValueChanged");export{p as a,u as b,b as c};
|