@llmops/app 0.1.8 → 0.1.9-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/.vite/manifest.json +285 -366
  2. package/dist/assets/Form-DHA5ZPmK.js +1 -0
  3. package/dist/assets/_environment-Bj632BW3.js +1 -0
  4. package/dist/assets/_observability-Bsw31e8i.js +1 -0
  5. package/dist/assets/_settings-MuCcKpRb.js +1 -0
  6. package/dist/assets/{_tabs-DaucGqpx.js → _tabs-DR5WY23M.js} +1 -1
  7. package/dist/assets/{_tabs-D9USU0yw.js → _tabs-Osf37WI9.js} +1 -1
  8. package/dist/assets/_variant-DGrwitKk.js +30 -0
  9. package/dist/assets/{_variants-Bjp8ZEvO.js → _variants-C7fc4T8_.js} +1 -1
  10. package/dist/assets/{area.css-CSjofvHM.js → area.css-ByjMFuMe.js} +1 -1
  11. package/dist/assets/auth-BkNQi67-.css +1 -0
  12. package/dist/assets/auth.css-CbKu-iME.js +1 -0
  13. package/dist/assets/button-J5fxAIyE.js +1 -0
  14. package/dist/assets/check-BdOT-uCr.js +1 -0
  15. package/dist/assets/{chevron-right-fMWRsRLZ.js → chevron-right-CcvZen9O.js} +1 -1
  16. package/dist/assets/combobox-BKEpKROu.js +1 -0
  17. package/dist/assets/configs-BEKTOPIS.js +1 -0
  18. package/dist/assets/{copy-DADLeZ69.js → copy-Btrg1ewH.js} +1 -1
  19. package/dist/assets/{costs-Fh0OPnEw.js → costs-C0sD1amq.js} +1 -1
  20. package/dist/assets/environments-CZ6PX9PA.js +1 -0
  21. package/dist/assets/index-C1Qc7Z7W.js +27 -0
  22. package/dist/assets/index-C8Gwa2Ui.js +1 -0
  23. package/dist/assets/{index-DeuSY0Yv.js → index-CAScpK2G.js} +1 -1
  24. package/dist/assets/{index-DW-cTzEh.js → index-CPQ3xdGh.js} +1 -1
  25. package/dist/assets/index-CPokRl9v.js +1 -0
  26. package/dist/assets/index-CQALuvff.js +1 -0
  27. package/dist/assets/{index-BFe2NM3q.css → index-CgbnU9Zg.css} +1 -1
  28. package/dist/assets/{index-Cns5MLjo.js → index-ChLdrp-m.js} +1 -1
  29. package/dist/assets/{index.esm-oCSEvUVx.js → index.esm-BVbruXk6.js} +1 -1
  30. package/dist/assets/info-box.css-BzqwxgQm.js +1 -0
  31. package/dist/assets/logo-D4ybjOzp.css +1 -0
  32. package/dist/assets/logo.css-BHDDnlVa.js +1 -0
  33. package/dist/assets/new-config-state-B8sMe-TC.css +1 -0
  34. package/dist/assets/new-config-state.css-DccH1TI0.js +1 -0
  35. package/dist/assets/{observability.css-wgjHtY3p.js → observability.css-D5kKsJ4z.js} +1 -1
  36. package/dist/assets/{overview-D1QIYPBL.js → overview-Czui5UTZ.js} +5 -5
  37. package/dist/assets/plus-DqiZvCBU.js +1 -0
  38. package/dist/assets/popover-BndR7yWD.js +1 -0
  39. package/dist/assets/requests-DrSJLtrE.js +1 -0
  40. package/dist/assets/{route-Df57lqxl.js → route-22shZRiS.js} +1 -1
  41. package/dist/assets/route-7Tn2yELm.js +1 -0
  42. package/dist/assets/{route-CjAw8hSU.js → route-CqIm0KnA.js} +1 -1
  43. package/dist/assets/{route-timDYxX2.js → route-D_QnUz7-.js} +1 -1
  44. package/dist/assets/{route-DmWZbVk6.js → route-DwYQMwtZ.js} +1 -1
  45. package/dist/assets/secrets-DnWQ2F0V.js +1 -0
  46. package/dist/assets/settings-c6c9IYPa.js +1 -0
  47. package/dist/assets/settings-sisslKb5.js +1 -0
  48. package/dist/assets/setup-G_oS-RU-.js +1 -0
  49. package/dist/assets/signin-B-qadLup.js +1 -0
  50. package/dist/assets/table-jMzD3FNy.js +1 -0
  51. package/dist/assets/{tabs.css-CG5ugi0p.js → tabs.css-CkcP1Ksc.js} +1 -1
  52. package/dist/assets/targeting-CaE84Lx8.js +1 -0
  53. package/dist/assets/tooltip-BiUUXiGj.js +1 -0
  54. package/dist/assets/{update-or-create-name-B-M46wHl.js → update-or-create-name-DGt2MGEI.js} +1 -1
  55. package/dist/assets/useAnalytics-CHDelHQa.js +1 -0
  56. package/dist/assets/useConfigList-Bx9xKceA.js +1 -0
  57. package/dist/assets/{useConfigVariants-CLc_hPw1.js → useConfigVariants-CB0S5gfJ.js} +1 -1
  58. package/dist/assets/useEnvironments-DILRhv_b.js +1 -0
  59. package/dist/assets/{useMutation-D4JglXWk.js → useMutation-CNzYa4ST.js} +1 -1
  60. package/dist/assets/usePopupAutoResize-CaO9EPHk.js +1 -0
  61. package/dist/assets/{useSetTargeting-bk0Ixhqq.js → useSetTargeting-DY3jI95T.js} +1 -1
  62. package/dist/assets/useTargetingRules-D10mXxut.js +1 -0
  63. package/dist/assets/useValueChanged-8LsiEynk.js +1 -0
  64. package/dist/assets/{user-profile-BB3dPOc5.js → user-profile-8xq1f7_D.js} +1 -1
  65. package/dist/assets/variants-rQQlpgeF.js +1 -0
  66. package/dist/assets/variants.css-Dzb38Nu1.js +1 -0
  67. package/dist/assets/{workspace-general-DYXfOF9H.js → workspace-general-dH65Sm8D.js} +1 -1
  68. package/dist/index.cjs +136 -59
  69. package/dist/index.d.cts +8 -5
  70. package/dist/index.d.mts +8 -5
  71. package/dist/index.mjs +138 -61
  72. package/package.json +4 -3
  73. package/dist/assets/Form-Bh6BPtQ_.js +0 -1
  74. package/dist/assets/InternalBackdrop-Za9lpJi7.js +0 -12
  75. package/dist/assets/_environment-COxSWJ9w.js +0 -1
  76. package/dist/assets/_observability-C8wSXZk2.js +0 -1
  77. package/dist/assets/_settings-DOmj1R7I.js +0 -1
  78. package/dist/assets/_variant-DxME2BL0.js +0 -30
  79. package/dist/assets/button-CMZqhyXB.js +0 -1
  80. package/dist/assets/check-D9E8RKB4.js +0 -1
  81. package/dist/assets/chevron-down-BJFxhYkh.js +0 -1
  82. package/dist/assets/combobox-iSbUYz0A.js +0 -1
  83. package/dist/assets/configs-BflhBVlY.js +0 -1
  84. package/dist/assets/environments-ChldQPyq.js +0 -1
  85. package/dist/assets/getDisabledMountTransitionStyles-TZFYxPIU.js +0 -1
  86. package/dist/assets/index-BDsrc1Q7.js +0 -1
  87. package/dist/assets/index-BWU02PnY.js +0 -1
  88. package/dist/assets/index-DYoud8po.js +0 -1
  89. package/dist/assets/index-FrTQ7TcS.js +0 -16
  90. package/dist/assets/info-box.css-DuVI9M9-.js +0 -1
  91. package/dist/assets/llmops-B3IIte87.css +0 -1
  92. package/dist/assets/llmops-CdOQq40D.js +0 -1
  93. package/dist/assets/plus-JQ0TORpd.js +0 -1
  94. package/dist/assets/popover-DXj4s-ni.js +0 -1
  95. package/dist/assets/popupStateMapping-DolkyTT3.js +0 -1
  96. package/dist/assets/requests-CzvYwfwV.js +0 -1
  97. package/dist/assets/reselect-DVmmTZGf.js +0 -1
  98. package/dist/assets/secrets-BxFGEuKj.js +0 -1
  99. package/dist/assets/settings-DpSRw7LL.js +0 -1
  100. package/dist/assets/settings-pgWZnVf6.js +0 -1
  101. package/dist/assets/table-DggTSlPh.js +0 -1
  102. package/dist/assets/targeting-CkqRTjnZ.js +0 -1
  103. package/dist/assets/tooltip-BuSsMQ8P.js +0 -1
  104. package/dist/assets/useAnalytics-DTf81POS.js +0 -1
  105. package/dist/assets/useButton-CsZ8hBM8.js +0 -1
  106. package/dist/assets/useConfigList-CAf01_dV.js +0 -1
  107. package/dist/assets/useEnvironments-Bu_0SIUj.js +0 -1
  108. package/dist/assets/useFocus-9TCY0h5x.js +0 -1
  109. package/dist/assets/usePopupAutoResize-D6RSlB-m.js +0 -1
  110. package/dist/assets/useRole-CiSaVva3.js +0 -1
  111. package/dist/assets/useSyncedFloatingRootContext-BKbVh8Gq.js +0 -1
  112. package/dist/assets/useTargetingRules-BrgaEdxR.js +0 -1
  113. package/dist/assets/useValueChanged-CTjBqaGs.js +0 -1
  114. package/dist/assets/variants-BH682hHM.js +0 -1
  115. package/dist/assets/variants.css-rCWHZycz.js +0 -1
@@ -1 +1 @@
1
- import{a as o,j as n,O as m}from"./index-FrTQ7TcS.js";/* empty css */function c(){const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(m,{}),e[0]=t):t=e[0],t}export{c as component};
1
+ import{c as o,j as n,O as m}from"./index-C1Qc7Z7W.js";/* empty css */function c(){const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(m,{}),e[0]=t):t=e[0],t}export{c as component};
@@ -1 +1 @@
1
- import{a as u,e as v,j as i,l as _}from"./index-FrTQ7TcS.js";var x="na2u4m1 na2u4m0 _1lg22bkw0",g="na2u4m2",h="na2u4m3",f="na2u4m4";const y=r=>{const a=u.c(17);let s,e,l,n;a[0]!==r?({items:e,separator:n,className:s,...l}=r,a[0]=r,a[1]=s,a[2]=e,a[3]=l,a[4]=n):(s=a[1],e=a[2],l=a[3],n=a[4]);const m=n===void 0?"/":n;let t;a[5]!==s?(t=v(x,s),a[5]=s,a[6]=t):t=a[6];let c;if(a[7]!==e||a[8]!==m){let b;a[10]!==e.length||a[11]!==m?(b=(o,k)=>i.jsxs("div",{className:g,children:[o.prefix,i.jsx("div",{className:h,children:o.label}),k<e.length-1&&i.jsx("span",{className:f,"aria-hidden":"true",children:m})]},o.key),a[10]=e.length,a[11]=m,a[12]=b):b=a[12],c=e.map(b),a[7]=e,a[8]=m,a[9]=c}else c=a[9];let d;return a[13]!==l||a[14]!==t||a[15]!==c?(d=i.jsx("nav",{...l,className:t,"aria-label":"Breadcrumb",children:c}),a[13]=l,a[14]=t,a[15]=c,a[16]=d):d=a[16],d};var j="f7jxdn0";const q=r=>{const a=u.c(5);let s;a[0]!==r.className?(s=v(j,r.className),a[0]=r.className,a[1]=s):s=a[1];let e;return a[2]!==r||a[3]!==s?(e=i.jsx("header",{...r,className:s}),a[2]=r,a[3]=s,a[4]=e):e=a[4],e};const p=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],w=_("columns-2",p);var B="_6smcqd0",C="_6smcqd1",E="_6smcqd3",L="_6smcqd4",S="_1aj0kmd0",$="_1aj0kmd2 _1aj0kmd1 _1lg22bkdo _1lg22bkuf _1lg22bk107 _1lg22bk10a _1lg22bkpr _1lg22bk10k";export{y as B,w as C,q as H,B as a,L as b,E as c,S as g,C as h,$ as w};
1
+ import{c as u,h as v,j as i,s as _}from"./index-C1Qc7Z7W.js";var x="na2u4m1 na2u4m0 _1lg22bkw0",g="na2u4m2",h="na2u4m3",f="na2u4m4";const y=r=>{const a=u.c(17);let s,e,l,n;a[0]!==r?({items:e,separator:n,className:s,...l}=r,a[0]=r,a[1]=s,a[2]=e,a[3]=l,a[4]=n):(s=a[1],e=a[2],l=a[3],n=a[4]);const m=n===void 0?"/":n;let t;a[5]!==s?(t=v(x,s),a[5]=s,a[6]=t):t=a[6];let c;if(a[7]!==e||a[8]!==m){let b;a[10]!==e.length||a[11]!==m?(b=(o,k)=>i.jsxs("div",{className:g,children:[o.prefix,i.jsx("div",{className:h,children:o.label}),k<e.length-1&&i.jsx("span",{className:f,"aria-hidden":"true",children:m})]},o.key),a[10]=e.length,a[11]=m,a[12]=b):b=a[12],c=e.map(b),a[7]=e,a[8]=m,a[9]=c}else c=a[9];let d;return a[13]!==l||a[14]!==t||a[15]!==c?(d=i.jsx("nav",{...l,className:t,"aria-label":"Breadcrumb",children:c}),a[13]=l,a[14]=t,a[15]=c,a[16]=d):d=a[16],d};var j="f7jxdn0";const q=r=>{const a=u.c(5);let s;a[0]!==r.className?(s=v(j,r.className),a[0]=r.className,a[1]=s):s=a[1];let e;return a[2]!==r||a[3]!==s?(e=i.jsx("header",{...r,className:s}),a[2]=r,a[3]=s,a[4]=e):e=a[4],e};const p=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],w=_("columns-2",p);var B="_6smcqd0",C="_6smcqd1",E="_6smcqd3",L="_6smcqd4",S="_1aj0kmd0",$="_1aj0kmd2 _1aj0kmd1 _1lg22bkdo _1lg22bkuf _1lg22bk107 _1lg22bk10a _1lg22bkpr _1lg22bk10k";export{y as B,w as C,q as H,B as a,L as b,E as c,S as g,C as h,$ as w};
@@ -0,0 +1 @@
1
+ @keyframes _1trl7bij{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._1trl7bi0{display:flex;min-height:100vh;background-color:var(--tyy9ow1k)}._1trl7bi1{display:none;flex:1;flex-direction:column;justify-content:space-between;padding:3rem;background-color:var(--tyy9ow1l);border-right:1px solid var(--tyy9ow1n)}._1trl7bi2{display:flex;align-items:center;gap:.5rem;font-size:1.125rem;font-weight:600;color:var(--tyy9ow1v);line-height:1}._1trl7bi3{font-size:1rem;line-height:1.6;color:var(--tyy9ow1u);max-width:400px}._1trl7bi4{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:3rem;position:relative}._1trl7bi5{position:absolute;top:3rem;right:3rem;font-size:.875rem;color:var(--tyy9ow1u);text-decoration:none}._1trl7bi5:hover{color:var(--tyy9ow1v)}._1trl7bi6{width:100%;max-width:350px;display:flex;flex-direction:column;gap:1.5rem}._1trl7bi7{display:flex;flex-direction:column;align-items:start;gap:.5rem}._1trl7bi9{font-size:1.5rem;font-weight:600;color:var(--tyy9ow1v);margin:0}._1trl7bia{font-size:.875rem;color:var(--tyy9ow1s);margin:0}._1trl7bib{display:flex;flex-direction:column;gap:1rem}._1trl7bic{display:flex;flex-direction:column;gap:.25rem}._1trl7bid{font-size:.875rem;font-weight:500;color:var(--tyy9ow1u)}._1trl7bie{font-size:.875rem;color:var(--tyy9ow10);text-align:center;padding:.5rem;background-color:#ff00001a;border-radius:6px}._1trl7bif{height:44px;width:100%;font-size:.875rem;font-weight:500}._1trl7big{display:flex;align-items:center;gap:1rem;color:var(--tyy9ow1r);font-size:.75rem;text-transform:uppercase;letter-spacing:.05em}._1trl7big:before{content:"";flex:1;height:1px;background-color:var(--tyy9ow1o)}._1trl7big:after{content:"";flex:1;height:1px;background-color:var(--tyy9ow1o)}._1trl7bih{text-align:center;font-size:.875rem;color:var(--tyy9ow1s)}._1trl7bii{color:var(--tyy9ow1u);text-decoration:underline;text-underline-offset:2px}._1trl7bii:hover{color:var(--tyy9ow1v)}._1trl7bik{display:flex;align-items:center;justify-content:center;min-height:100vh;background-color:var(--tyy9ow1k)}._1trl7bil{width:32px;height:32px;border:3px solid var(--tyy9ow1n);border-top-color:var(--tyy9ow8);border-radius:50%;animation:_1trl7bij .8s linear infinite}@media(min-width:768px){._1trl7bi1{display:flex}}
@@ -0,0 +1 @@
1
+ import"./index-C1Qc7Z7W.js";var r="_1trl7bi0",t="_1trl7bi1",i="_1trl7bi2",l="_1trl7bi4",b="_1trl7bi5",_="_1trl7bi6",s="_1trl7bi7",v="_1trl7bi9 _1trl7bi8 _1lg22bkw0",e="_1trl7bia",h="_1trl7bib",o="_1trl7bic",u="_1trl7bid",n="_1trl7bie",d="_1trl7bif",f="_1trl7bih",g="_1trl7bii";export{r as a,i as b,s as c,v as d,e,_ as f,h as g,o as h,u as i,n as j,d as k,t as l,f as m,g as n,l as r,b as t};
@@ -0,0 +1 @@
1
+ import{r as i,aT as m,as as b,c as B,h as x,bW as R,j as h}from"./index-C1Qc7Z7W.js";const E=i.forwardRef(function(e,t){const{render:r,className:c,disabled:s=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,...n}=e,l=!!s,{getButtonProps:f,buttonRef:p}=m({disabled:l,focusableWhenDisabled:a,native:o}),d=i.useMemo(()=>({disabled:l}),[l]);return b("button",e,{state:d,ref:[t,p],props:[n,f]})}),v=u=>{const e=B.c(16);let t,r,c,s,a,o;e[0]!==u?({variant:o,scheme:s,size:a,className:r,children:t,...c}=u,e[0]=u,e[1]=t,e[2]=r,e[3]=c,e[4]=s,e[5]=a,e[6]=o):(t=e[1],r=e[2],c=e[3],s=e[4],a=e[5],o=e[6]);let n;e[7]!==r||e[8]!==s||e[9]!==a||e[10]!==o?(n=x(R({variant:o,size:a,scheme:s}),r),e[7]=r,e[8]=s,e[9]=a,e[10]=o,e[11]=n):n=e[11];let l;return e[12]!==t||e[13]!==c||e[14]!==n?(l=h.jsx(E,{...c,className:n,children:t}),e[12]=t,e[13]=c,e[14]=n,e[15]=l):l=e[15],l};export{v as B};
@@ -0,0 +1 @@
1
+ import{s as c}from"./index-C1Qc7Z7W.js";const e=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],t=c("check",e);export{t as C};
@@ -1 +1 @@
1
- import{l as o}from"./index-FrTQ7TcS.js";const t=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],c=o("chevron-right",t);export{c as C};
1
+ import{s as o}from"./index-C1Qc7Z7W.js";const t=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],c=o("chevron-right",t);export{c as C};
@@ -0,0 +1 @@
1
+ import{r as o,a5 as De,a8 as E,c2 as se,b1 as Bt,$ as ue,V as pe,H as qt,ao as fn,bi as Ro,aa as sn,c3 as nt,c4 as Vo,c5 as l,bc as Po,c6 as Ut,aQ as Eo,b2 as ot,c7 as Ne,bh as Ue,X as K,a2 as It,c8 as So,Y as Se,aA as vt,c9 as wo,a$ as pn,al as Mo,a3 as Ke,ca as ko,am as Ao,bv as jo,j as p,bn as Oo,Z as To,cb as No,aT as Ct,as as Ve,bJ as mn,cc as Oe,cd as hn,be as Do,ce as Fo,az as Lo,cf as rn,ag as Ho,cg as Bo,at as _o,aC as Kt,ch as ln,bf as bn,aY as qo,ci as Uo,av as Ko,aS as zo,ay as gn,aZ as Wo,a_ as Go,ax as $o,aX as Yo,b7 as xn,cj as Qo,ck as an,c as Je,h as it,cl as Jo,cm as Xo,cn as Zo,co as es,cp as ts,cq as ns,cr as os,cs as ss,ct as is,cu as In,cv as rs,cw as ls,cx as as,cy as cn,cz as cs,cA as vn,cB as Cn,cC as yn,cD as Rn,cE as Vn,cF as Pn,cG as En,cH as Sn,cI as wn,cJ as us,cK as ds,cL as fs,cM as ps,cN as ms}from"./index-C1Qc7Z7W.js";import{a as Mn,u as bt}from"./useValueChanged-8LsiEynk.js";function Ht({controlled:t,default:e,name:s,state:r="value"}){const{current:u}=o.useRef(t!==void 0),[h,d]=o.useState(e),c=u?t:h,i=o.useCallback(v=>{u||d(v)},[]);return[c,i]}function hs(t){const e=o.useRef(!0);e.current&&(e.current=!1,t())}const kn=o.createContext(void 0),An=o.createContext(void 0),jn=o.createContext(void 0),On=o.createContext("");function Ie(){const t=o.useContext(kn);if(!t)throw new Error(De(22));return t}function yt(){const t=o.useContext(An);if(!t)throw new Error(De(23));return t}function ze(){const t=o.useContext(jn);if(!t)throw new Error(De(24));return t}function zt(){return o.useContext(On)}const bs=(t,e)=>Object.is(t,e);function Qe(t,e,s){return t==null||e==null?Object.is(t,e):s(t,e)}function gt(t,e,s){return!t||t.length===0?!1:t.some(r=>r===void 0?!1:Qe(r,e,s))}function rt(t,e,s){return!t||t.length===0?-1:t.findIndex(r=>r===void 0?!1:Qe(r,e,s))}function gs(t,e,s){return t.filter(r=>!Qe(r,e,s))}const a={id:E(t=>t.id),query:E(t=>t.query),items:E(t=>t.items),selectedValue:E(t=>t.selectedValue),open:E(t=>t.open),mounted:E(t=>t.mounted),forceMounted:E(t=>t.forceMounted),inline:E(t=>t.inline),activeIndex:E(t=>t.activeIndex),selectedIndex:E(t=>t.selectedIndex),isActive:E((t,e)=>t.activeIndex===e),isSelected:E((t,e)=>{const s=t.isItemEqualToValue,r=t.selectedValue;return Array.isArray(r)?r.some(u=>Qe(u,e,s)):Qe(r,e,s)}),transitionStatus:E(t=>t.transitionStatus),popupProps:E(t=>t.popupProps),inputProps:E(t=>t.inputProps),triggerProps:E(t=>t.triggerProps),getItemProps:E(t=>t.getItemProps),positionerElement:E(t=>t.positionerElement),listElement:E(t=>t.listElement),triggerElement:E(t=>t.triggerElement),inputElement:E(t=>t.inputElement),popupSide:E(t=>t.popupSide),openMethod:E(t=>t.openMethod),inputInsidePopup:E(t=>t.inputInsidePopup),selectionMode:E(t=>t.selectionMode),listRef:E(t=>t.listRef),labelsRef:E(t=>t.labelsRef),popupRef:E(t=>t.popupRef),emptyRef:E(t=>t.emptyRef),inputRef:E(t=>t.inputRef),keyboardActiveRef:E(t=>t.keyboardActiveRef),chipsContainerRef:E(t=>t.chipsContainerRef),clearRef:E(t=>t.clearRef),valuesRef:E(t=>t.valuesRef),allValuesRef:E(t=>t.allValuesRef),name:E(t=>t.name),disabled:E(t=>t.disabled),readOnly:E(t=>t.readOnly),required:E(t=>t.required),grid:E(t=>t.grid),isGrouped:E(t=>t.isGrouped),virtualized:E(t=>t.virtualized),onOpenChangeComplete:E(t=>t.onOpenChangeComplete),openOnInputClick:E(t=>t.openOnInputClick),itemToStringLabel:E(t=>t.itemToStringLabel),isItemEqualToValue:E(t=>t.isItemEqualToValue),modal:E(t=>t.modal),autoHighlight:E(t=>t.autoHighlight),submitOnItemClick:E(t=>t.submitOnItemClick)};let un=(function(t){return t.disabled="data-disabled",t.valid="data-valid",t.invalid="data-invalid",t.touched="data-touched",t.dirty="data-dirty",t.filled="data-filled",t.focused="data-focused",t})({});const xs={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Tn={valid(t){return t===null?null:t?{[un.valid]:""}:{[un.invalid]:""}}},Is=o.createContext({invalid:void 0,name:void 0,validityData:{state:xs,errors:[],error:"",value:"",initialValue:null},setValidityData:se,disabled:void 0,touched:!1,setTouched:se,dirty:!1,setDirty:se,filled:!1,setFilled:se,focused:!1,setFocused:se,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(t=Bt)=>t,getInputValidationProps:(t=Bt)=>t,inputRef:{current:null},commit:async()=>{}}});function lt(t=!0){const e=o.useContext(Is);if(e.setValidityData===se&&!t)throw new Error(De(28));return e}function vs(t,e){return{...t,state:{...t.state,valid:!e&&t.state.valid}}}function Cs(t){const{enabled:e=!0,value:s,id:r,name:u,controlRef:h,commit:d}=t,{formRef:c}=Mn(),{invalid:i,markedDirtyRef:v,validityData:b,setValidityData:x}=lt(),P=ue(t.getValue);pe(()=>{if(!e)return;let f=s;f===void 0&&(f=P()),b.initialValue===null&&f!==null&&x(U=>({...U,initialValue:f}))},[e,x,s,b.initialValue,P]),pe(()=>{!e||!r||c.current.fields.set(r,{getValue:P,name:u,controlRef:h,validityData:vs(b,i),validate(){let f=s;f===void 0&&(f=P()),v.current=!0,qt.flushSync(()=>d(f))}})},[d,h,e,c,P,r,i,v,u,b,s]),pe(()=>{const f=c.current.fields;return()=>{r&&f.delete(r)}},[c,r])}const ys=o.createContext({controlId:void 0,setControlId:se,labelId:void 0,setLabelId:se,messageIds:[],setMessageIds:se,getDescriptionProps:t=>t});function Wt(){return o.useContext(ys)}function Rs(t={}){const{id:e,implicit:s=!1,controlRef:r}=t,{controlId:u,setControlId:h}=Wt(),d=fn(e);return pe(()=>{if(!(!s&&!e||h===se)){if(s){const c=r?.current;Ro(c)&&c.closest("label")!=null?h(e??null):h(u??d)}else e&&h(e);return()=>{e&&h(void 0)}}},[e,r,u,h,s,d]),u??d}function _t(t){if(t==null)return"";if(typeof t=="string")return t;try{return JSON.stringify(t)}catch{return String(t)}}function Nn(t){return t!=null&&t.length>0&&typeof t[0]=="object"&&t[0]!=null&&"items"in t[0]}function re(t,e){if(e&&t!=null)return e(t)??"";if(t&&typeof t=="object"){if("label"in t&&t.label!=null)return String(t.label);if("value"in t)return String(t.value)}return _t(t)}function st(t,e){return e&&t!=null?e(t)??"":t&&typeof t=="object"&&"value"in t&&"label"in t?_t(t.value):_t(t)}function Vs(t,e,s){if(s&&t!=null)return s(t);if(t&&typeof t=="object"&&"label"in t&&t.label!=null)return t.label;if(e&&!Array.isArray(e))return e[t]??re(t,s);if(Array.isArray(e)){const r=Nn(e)?e.flatMap(u=>u.items):e;if(t==null){const u=r.find(h=>h.value==null);return u&&u.label!=null?u.label:re(t,s)}if(typeof t!="object"){const u=r.find(h=>h&&h.value===t);return u&&u.label!=null?u.label:re(t,s)}if("value"in t){const u=r.find(h=>h&&h.value===t.value);if(u&&u.label!=null)return u.label}}return re(t,s)}function Ps(t,e){return(s,r)=>{if(s==null)return!1;const u=re(s,e);return t.contains(u,r)}}function Es(t,e,s){return(r,u)=>{if(r==null)return!1;if(!u)return!0;const h=re(r,e),d=s!=null?re(s,e):"";return d&&t.contains(d,u)&&d.length===u.length?!0:t.contains(h,u)}}const dn=new Map;function Dn(t){return Array.isArray(t)?t.map(e=>Dn(e)).join(","):t==null?"":String(t)}function Ss(t={}){const e={usage:"search",sensitivity:"base",ignorePunctuation:!0,...t},s=`${Dn(t.locale)}|${JSON.stringify(e)}`,r=dn.get(s);if(r)return r;const u=new Intl.Collator(t.locale,e),h={contains(d,c,i){if(!c)return!0;const v=re(d,i);for(let b=0;b<=v.length-c.length;b+=1)if(u.compare(v.slice(b,b+c.length),c)===0)return!0;return!1},startsWith(d,c,i){if(!c)return!0;const v=re(d,i);return u.compare(v.slice(0,c.length),c)===0},endsWith(d,c,i){if(!c)return!0;const v=re(d,i),b=c.length;return v.length>=b&&u.compare(v.slice(v.length-b),c)===0}};return dn.set(s,h),h}const ws=Ss,Fn=Symbol("none"),qe={value:Fn,index:-1};function Ms(t){const{id:e,onOpenChangeComplete:s,defaultSelectedValue:r=null,selectedValue:u,onSelectedValueChange:h,defaultInputValue:d,inputValue:c,selectionMode:i="none",onItemHighlighted:v,name:b,disabled:x=!1,readOnly:P=!1,required:f=!1,inputRef:U,grid:I=!1,items:R,filteredItems:j,filter:n,openOnInputClick:y=!0,autoHighlight:L=!1,keepHighlight:N=!1,highlightItemOnHover:w=!0,itemToStringLabel:g,itemToStringValue:k,isItemEqualToValue:F=bs,virtualized:q=!1,inline:H=!1,fillInputOnItemPress:Q=!0,modal:_=!1,limit:B=-1,autoComplete:M="list",locale:G,submitOnItemClick:ie=!1}=t,{clearErrors:me}=Mn(),{setDirty:X,validityData:Z,shouldValidateOnChange:Y,setFilled:de,name:ve,disabled:z,validation:S}=lt(),te=Rs({id:e}),fe=ws({locale:G}),[ee,le]=o.useState(!1),[C,O]=o.useState(null),$=o.useRef([]),he=o.useRef([]),xe=o.useRef(null),W=o.useRef(null),we=o.useRef(null),Fe=o.useRef(!0),$t=o.useRef(!1),Yt=o.useRef(null),Qt=o.useRef(null),Rt=o.useRef(null),Me=o.useRef(qe),Vt=o.useRef(null),We=o.useRef([]),Jt=o.useRef([]),Le=z||x,ke=ve??b,ae=i==="multiple",Pe=i==="single",Ge=c!==void 0||d!==void 0,$e=R!==void 0,Pt=j!==void 0;let be;L==="always"?be="always":be=L?"input-change":!1;const[A,at]=Ht({controlled:u,default:ae?r??nt:r,name:"Combobox",state:"selectedValue"}),ct=o.useMemo(()=>n===null?()=>!0:n!==void 0?n:Pe&&!ee?Es(fe,g,A):Ps(fe,g),[n,Pe,A,ee,fe,g]),Xt=sn(()=>Ge?d??"":Pe?re(A,g):"").current,[Ce,to]=Ht({controlled:c,default:Xt,name:"Combobox",state:"inputValue"}),[oe,no]=Ht({controlled:t.open,default:t.defaultOpen,name:"Combobox",state:"open"}),Ae=Nn(R),ge=C??(Ce===""?"":String(Ce).trim()),Et=Pe?re(A,g):"",Zt=Pe&&!ee&&ge!==""&&Et!==""&&Et.length===ge.length&&fe.contains(Et,ge),Xe=Zt?"":ge,en=$e&&Pt&&Zt,Te=o.useMemo(()=>R?Ae?R.flatMap(m=>m.items):R:nt,[R,Ae]),Ze=o.useMemo(()=>{if(j&&!en)return j;if(!R)return nt;if(Ae){const V=R,T=[];let J=0;for(const ne of V){if(B>-1&&J>=B)break;const ce=Xe===""?ne.items:ne.items.filter(ht=>ct(ht,Xe,g));if(ce.length===0)continue;const Be=B>-1?B-J:1/0,_e=ce.slice(0,Be);if(_e.length>0){const ht={...ne,items:_e};T.push(ht),J+=_e.length}}return T}if(Xe==="")return B>-1?Te.slice(0,B):Te;const m=[];for(const V of Te){if(B>-1&&m.length>=B)break;ct(V,Xe,g)&&m.push(V)}return m},[j,en,R,Ae,Xe,B,ct,g,Te]),Ee=o.useMemo(()=>Ae?Ze.flatMap(V=>V.items):Ze,[Ze,Ae]),D=sn(()=>new Vo({id:te,selectedValue:A,open:oe,filter:ct,query:ge,items:R,selectionMode:i,listRef:$,labelsRef:he,popupRef:xe,emptyRef:we,inputRef:W,keyboardActiveRef:Fe,chipsContainerRef:Yt,clearRef:Qt,valuesRef:We,allValuesRef:Jt,selectionEventRef:Rt,name:ke,disabled:Le,readOnly:P,required:f,grid:I,isGrouped:Ae,virtualized:q,openOnInputClick:y,itemToStringLabel:g,isItemEqualToValue:F,modal:_,autoHighlight:be,submitOnItemClick:ie,hasInputValue:Ge,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:H,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},positionerElement:null,listElement:null,triggerElement:null,inputElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,onOpenChangeComplete:s||se,setOpen:se,setInputValue:se,setSelectedValue:se,setIndices:se,onItemHighlighted:se,handleSelection:se,getItemProps:()=>Bt,forceMount:se,requestSubmit:se})).current,Ye=i==="none"?Ce:A,oo=o.useMemo(()=>i==="none"?Ye:Array.isArray(A)?A.map(m=>st(m,k)):st(A,k),[Ye,k,i,A]),St=ue(v),wt=ue(s),ut=l(D,a.activeIndex),so=l(D,a.selectedIndex),dt=l(D,a.positionerElement),tn=l(D,a.listElement),et=l(D,a.triggerElement),Mt=l(D,a.inputElement),je=l(D,a.inline),He=l(D,a.inputInsidePopup),io=Po(et),{mounted:nn,setMounted:ro,transitionStatus:kt}=Ut(oe),{openMethod:on,triggerProps:At,reset:lo}=Eo(oe);Cs({id:te,name:ke,commit:S.commit,value:Ye,controlRef:He?io:W,getValue:()=>oo});const ft=ue(()=>{R?he.current=Ee.map(m=>re(m,g)):D.set("forceMounted",!0)}),ao=o.useRef(A);pe(()=>{A!==ao.current&&ft()},[ft,A]);const ye=ue(m=>{D.update(m);const V=m.type||"none";if(m.activeIndex!==void 0)if(m.activeIndex===null)Me.current!==qe&&(Me.current=qe,St(void 0,ot(V,void 0,{index:-1})));else{const T=We.current[m.activeIndex];Me.current={value:T,index:m.activeIndex},St(T,ot(V,void 0,{index:m.activeIndex}))}}),Re=ue((m,V)=>{if($t.current=V.reason===Ne,t.onInputValueChange?.(m,V),!V.isCanceled){if(V.reason===Ue){const T=m.trim()!=="";T&&le(!0),Vt.current={hasQuery:T},T&&be&&D.state.activeIndex==null&&D.set("activeIndex",0)}to(m)}}),tt=ue((m,V)=>{oe!==m&&(V.reason==="escape-key"&&$e&&Ee.length===0&&!D.state.emptyRef.current&&V.allowPropagation(),t.onOpenChange?.(m,V),!V.isCanceled&&(!m&&ee&&(Pe?(O(ge),ge===""&&le(!1)):ae&&(je||He?ye({activeIndex:null}):O(ge),Re("",K(Ne,V.event)))),no(m)))}),pt=ue((m,V)=>{if(h?.(m,V),V.isCanceled)return;at(m),(i==="none"&&xe.current&&Q||Pe&&!D.state.inputInsidePopup)&&Re(re(m,g),K(V.reason,V.event)),Pe&&m!=null&&V.reason!==Ue&&ee&&O(ge)}),co=ue((m,V)=>{let T=V;if(T===void 0){if(ut===null)return;T=We.current[ut]}const J=It(m),ne=Rt.current??m;Rt.current=null;const ce=K(So,ne),Be=J?.closest("a")?.getAttribute("href");if(Be){Be.startsWith("#")&&tt(!1,ce);return}if(ae){const _e=Array.isArray(A)?A:[],yo=gt(_e,T,D.state.isItemEqualToValue)?gs(_e,T,D.state.isItemEqualToValue):[..._e,T];if(pt(yo,ce),!(W.current?W.current.value.trim()!=="":!1))return;D.state.inputInsidePopup?Re("",K(Ne,ce.event)):tt(!1,ce)}else pt(T,ce),tt(!1,ce)}),jt=ue(()=>{if(!D.state.submitOnItemClick)return;const m=D.state.inputElement?.form;m&&typeof m.requestSubmit=="function"&&m.requestSubmit()}),Ot=ue(()=>{if(ro(!1),wt?.(!1),le(!1),lo(),O(null),ye(i==="none"?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),ae&&W.current&&W.current.value!==""&&!$t.current&&Re("",K(Ne)),Pe)if(D.state.inputInsidePopup)W.current&&W.current.value!==""&&Re("",K(Ne));else{const m=re(A,g);W.current&&W.current.value!==m&&Re(m,K(m===""?Ne:Se))}}),uo=o.useMemo(()=>je&&dt?{current:dt.closest('[role="dialog"]')}:xe,[je,dt]);vt({enabled:!t.actionsRef,open:oe,ref:uo,onComplete(){oe||Ot()}}),o.useImperativeHandle(t.actionsRef,()=>({unmount:Ot}),[Ot]),pe(function(){if(oe||i==="none")return;const V=R?Te:Jt.current;if(ae){const T=Array.isArray(A)?A:[],J=T[T.length-1],ne=rt(V,J,F);ye({selectedIndex:ne===-1?null:ne})}else{const T=rt(V,A,F);ye({selectedIndex:T===-1?null:T})}},[oe,A,R,i,Te,ae,F,ye]),pe(()=>{R&&(We.current=Ee,$.current.length=Ee.length)},[R,Ee]),pe(()=>{const m=Vt.current;if(m&&(m.hasQuery?be&&D.set("activeIndex",0):be==="always"&&D.set("activeIndex",0),Vt.current=null),!oe&&!je)return;const T=$e||Pt?Ee:We.current,J=D.state.activeIndex;if(J==null){if(be==="always"&&T.length>0){D.set("activeIndex",0);return}Me.current!==qe&&(Me.current=qe,D.state.onItemHighlighted(void 0,ot(Se,void 0,{index:-1})));return}if(J>=T.length){Me.current!==qe&&(Me.current=qe,D.state.onItemHighlighted(void 0,ot(Se,void 0,{index:-1}))),D.set("activeIndex",null);return}const ne=T[J],ce=Me.current.value,Be=ce!==Fn&&D.state.isItemEqualToValue(ne,ce);(Me.current.index!==J||!Be)&&(Me.current={value:ne,index:J},D.state.onItemHighlighted(ne,ot(Se,void 0,{index:J})))},[ut,be,Pt,$e,Ee,je,oe,D]),pe(()=>{if(!R||i==="none")return;const m=Te;if(ae){const J=Array.isArray(A)?A:nt,ne=J.filter(ce=>gt(m,ce,D.state.isItemEqualToValue));ne.length!==J.length&&at(ne);return}if(A==null?!0:gt(m,A,D.state.isItemEqualToValue))return;let T=null;if(r!=null&&gt(m,r,D.state.isItemEqualToValue)&&(T=r),at(T),!D.state.inputInsidePopup){const J=re(T,g);W.current&&W.current.value!==J&&Re(J,K(Se))}},[R,Te,ae,i,A,r,at,g,D,Re]),pe(()=>{if(i==="none"){de(String(Ce)!=="");return}de(ae?Array.isArray(A)&&A.length>0:A!=null)},[de,i,Ce,A,ae]),o.useEffect(()=>{$e&&be&&Ee.length===0&&ye({activeIndex:null})},[$e,be,Ee.length,ye]),bt(ge,()=>{!oe||ge===""||ge===String(Xt)||le(!0)}),bt(A,()=>{if(i!=="none"&&(me(ke),X(A!==Z.initialValue),Y()?S.commit(A):S.commit(A,!0),ae&&D.state.selectedIndex!==null&&(!Array.isArray(A)||A.length===0)&&ye({activeIndex:null,selectedIndex:null}),Pe&&!Ge&&!He)){const m=re(A,g);Ce!==m&&Re(m,K(Se))}}),bt(Ce,()=>{i==="none"&&(me(ke),X(Ce!==Z.initialValue),Y()?S.commit(Ce):S.commit(Ce,!0))}),bt(R,()=>{if(!Pe||Ge||He||ee)return;const m=re(A,g);Ce!==m&&Re(m,K(Se))});const mt=wo({open:je?!0:oe,onOpenChange:tt,elements:{reference:He?et:Mt,floating:dt}});let Tt,Nt;je||(Tt=I?"grid":"listbox",Nt=oe?"true":"false");const fo=o.useMemo(()=>{const m=Mt?.tagName==="INPUT",V=m||oe,T=m?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return V&&(T.role="combobox",T["aria-expanded"]=Nt,T["aria-haspopup"]=Tt,T["aria-controls"]=oe?tn?.id:void 0,T["aria-autocomplete"]=M),{reference:T,floating:{role:"presentation"}}},[Mt,oe,Nt,Tt,tn?.id,M]),po=pn(mt,{enabled:!P&&!Le&&y,event:"mousedown-only",toggle:!1,touchOpenDelay:He?0:50}),mo=Mo(mt,{enabled:!P&&!Le&&!je,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:je?!0:void 0,outsidePress(m){const V=It(m);return!Ke(et,V)&&!Ke(Qt.current,V)&&!Ke(Yt.current,V)}}),ho=ko(mt,{enabled:!P&&!Le,id:te,listRef:$,activeIndex:ut,selectedIndex:so,virtual:!0,loopFocus:!0,allowEscape:!be,focusItemOnOpen:ee||i==="none"&&!be?!1:"auto",focusItemOnHover:w,resetOnPointerLeave:!N,cols:I?2:1,orientation:I?"horizontal":void 0,disabledIndices:nt,onNavigate(m,V){!V&&!oe||kt==="ending"||ye(V?{activeIndex:m,type:Fe.current?"keyboard":"pointer"}:{activeIndex:m})}}),{getReferenceProps:Dt,getFloatingProps:Ft,getItemProps:Lt}=Ao([fo,po,mo,ho]);hs(()=>{D.update({inline:H,popupProps:Ft(),inputProps:Dt(),triggerProps:At,getItemProps:Lt,setOpen:tt,setInputValue:Re,setSelectedValue:pt,setIndices:ye,onItemHighlighted:St,handleSelection:co,forceMount:ft,requestSubmit:jt})}),pe(()=>{D.update({id:te,selectedValue:A,open:oe,mounted:nn,transitionStatus:kt,items:R,inline:H,popupProps:Ft(),inputProps:Dt(),triggerProps:At,openMethod:on,getItemProps:Lt,selectionMode:i,name:ke,disabled:Le,readOnly:P,required:f,grid:I,isGrouped:Ae,virtualized:q,onOpenChangeComplete:wt,openOnInputClick:y,itemToStringLabel:g,modal:_,autoHighlight:be,isItemEqualToValue:F,submitOnItemClick:ie,hasInputValue:Ge,requestSubmit:jt})},[D,te,A,oe,nn,kt,R,Ft,Dt,Lt,on,At,i,ke,Le,P,f,S,I,Ae,q,wt,y,g,_,F,ie,Ge,H,jt,be]);const bo=jo(U,S.inputRef),go=o.useMemo(()=>({query:ge,filteredItems:Ze,flatFilteredItems:Ee}),[ge,Ze,Ee]),xo=o.useMemo(()=>Array.isArray(Ye)?"":st(Ye,k),[Ye,k]),Io=ae&&Array.isArray(A)&&A.length>0,vo=o.useMemo(()=>!ae||!Array.isArray(A)||!ke?null:A.map(m=>{const V=st(m,k);return p.jsx("input",{type:"hidden",name:ke,value:V},V)}),[ae,A,ke,k]),Co=p.jsxs(o.Fragment,{children:[t.children,p.jsx("input",{...S.getInputValidationProps({onFocus(){if(He){et?.focus();return}(W.current||et)?.focus()},onChange(m){if(m.nativeEvent.defaultPrevented)return;const V=m.target.value,T=K(Ue,m.nativeEvent);function J(){if(ae)return;if(i==="none"){X(V!==Z.initialValue),Re(V,T),Y()&&S.commit(V);return}const ne=We.current.find(ce=>st(ce,k).toLowerCase()===V.toLowerCase());ne!=null&&(X(ne!==Z.initialValue),pt?.(ne,T),Y()&&S.commit(ne))}R?J():(ft(),queueMicrotask(J))}}),id:te,name:ae||i==="none"?void 0:ke,disabled:Le,required:f&&!Io,readOnly:P,value:xo,ref:bo,style:Oo,tabIndex:-1,"aria-hidden":!0}),vo]});return p.jsx(kn.Provider,{value:D,children:p.jsx(An.Provider,{value:mt,children:p.jsx(jn.Provider,{value:go,children:p.jsx(On.Provider,{value:Ce,children:Co})})})})}const xt=2,ks={...mn,...Tn},As=o.forwardRef(function(e,s){const{render:r,className:u,nativeButton:h=!0,disabled:d=!1,...c}=e,{state:i,disabled:v,setTouched:b,setFocused:x,validationMode:P,validation:f}=lt(),{labelId:U}=Wt(),I=Ie(),R=l(I,a.selectionMode),j=l(I,a.disabled),n=l(I,a.readOnly),y=l(I,a.listElement),L=l(I,a.triggerProps),N=l(I,a.triggerElement),w=l(I,a.inputInsidePopup),g=l(I,a.open),k=l(I,a.selectedValue),F=l(I,a.activeIndex),q=l(I,a.selectedIndex),H=yt(),Q=zt(),_=To(),B=v||j||d,M=o.useRef("");function G(S){M.current=S.pointerType}const ie=H.select("domReferenceElement");o.useEffect(()=>{w&&N&&N!==ie&&H.set("domReferenceElement",N)},[N,ie,H,w]);const{reference:me}=No(H,{enabled:!g&&!n&&!j&&R==="single",listRef:I.state.labelsRef,activeIndex:F,selectedIndex:q,onMatch(S){const te=I.state.valuesRef.current[S];te!==void 0&&I.state.setSelectedValue(te,K("none"))}}),{reference:X}=pn(H,{enabled:!n&&!j,event:"mousedown"}),{buttonRef:Z,getButtonProps:Y}=Ct({native:h,disabled:B}),de=o.useMemo(()=>({...i,open:g,disabled:B}),[i,g,B]),ve=ue(S=>{I.set("triggerElement",S)});return Ve("button",e,{ref:[s,Z,ve],state:de,props:[L,X,me,{tabIndex:w?0:-1,disabled:B,role:w?"combobox":void 0,"aria-expanded":g?"true":"false","aria-haspopup":w?"dialog":"listbox","aria-controls":g?y?.id:void 0,"aria-readonly":n||void 0,"aria-labelledby":U,onPointerDown:G,onPointerEnter:G,onFocus(){x(!0),!(B||n)&&_.start(0,I.state.forceMount)},onBlur(){if(b(!0),x(!1),P==="onBlur"){const S=R==="none"?Q:k;f.commit(S)}},onMouseDown(S){if(B||n||(w||H.set("domReferenceElement",S.currentTarget),I.state.forceMount(),M.current!=="touch"&&(I.state.inputRef.current?.focus(),w||S.preventDefault()),g))return;const te=Do(S.currentTarget);function fe(ee){if(!N)return;const le=It(ee),C=I.state.positionerElement,O=I.state.listElement;if(Ke(N,le)||Ke(C,le)||Ke(O,le)||le===N)return;const $=Fo(N),he=ee.clientX>=$.left-xt&&ee.clientX<=$.right+xt,xe=ee.clientY>=$.top-xt&&ee.clientY<=$.bottom+xt;he&&xe||I.state.setOpen(!1,K("cancel-open",ee))}w&&te.addEventListener("mouseup",fe,{once:!0})},onKeyDown(S){B||n||(S.key==="ArrowDown"||S.key==="ArrowUp")&&(Oe(S),I.state.setOpen(!0,K(hn,S.nativeEvent)),I.state.inputRef.current?.focus())}},f?f.getValidationProps(c):c,Y],stateAttributesMapping:ks})}),Ln=o.createContext(void 0);function Hn(){return o.useContext(Ln)}const Bn=o.createContext(void 0);function Gt(t){const e=o.useContext(Bn);if(e===void 0&&!t)throw new Error(De(21));return e}const js={...mn,...Tn,popupSide:t=>t?{"data-popup-side":t}:null,listEmpty:t=>t?{"data-list-empty":""}:null},_n=o.forwardRef(function(e,s){const{render:r,className:u,disabled:h=!1,id:d,...c}=e,{state:i,disabled:v,setTouched:b,setFocused:x,validationMode:P,validation:f}=lt(),{labelId:U}=Wt(),I=Hn(),j=!!Gt(!0),n=Ie(),{filteredItems:y}=ze(),L=zt(),N=fn(d),w=Lo(),g=l(n,a.disabled),k=l(n,a.readOnly),F=l(n,a.name),q=l(n,a.selectionMode),H=l(n,a.autoHighlight),Q=l(n,a.inputProps),_=l(n,a.triggerProps),B=l(n,a.open),M=l(n,a.mounted),G=l(n,a.selectedValue),ie=l(n,a.popupSide),me=l(n,a.positionerElement),X=!!H,Z=M&&me?ie:null,Y=v||g||h,de=y.length===0,[ve,z]=o.useState(null),S=o.useRef(!1),te=ue(C=>{const O=j||n.state.inline;O&&!n.state.hasInputValue&&n.state.setInputValue("",K(Se)),n.update({inputElement:C,inputInsidePopup:O})}),fe=o.useMemo(()=>({...i,open:B,disabled:Y,readOnly:k,popupSide:Z,listEmpty:de}),[i,B,Y,k,Z,de]);function ee(C){if(!I)return;let O;const{highlightedChipIndex:$}=I;if($!==void 0){if(C.key==="ArrowLeft")C.preventDefault(),$>0?O=$-1:O=void 0;else if(C.key==="ArrowRight")C.preventDefault(),$<G.length-1?O=$+1:O=void 0;else if(C.key==="Backspace"||C.key==="Delete"){C.preventDefault();const he=$>=G.length-1?G.length-2:$;O=he>=0?he:void 0,n.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"})}return O}return C.key==="ArrowLeft"&&(C.currentTarget.selectionStart??0)===0&&G.length>0?(C.preventDefault(),O=Math.max(G.length-1,0)):C.key==="Backspace"&&C.currentTarget.value===""&&G.length>0&&(n.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),C.preventDefault()),O}return Ve("input",e,{state:fe,ref:[s,n.state.inputRef,te],props:[Q,_,{type:"text",value:e.value??ve??L,"aria-readonly":k||void 0,"aria-labelledby":U,disabled:Y,readOnly:k,...q==="none"&&F&&{name:F},id:N,onFocus(){x(!0)},onBlur(){if(b(!0),x(!1),P==="onBlur"){const C=q==="none"?L:G;f.commit(C)}},onCompositionStart(C){Bo||(S.current=!0,z(C.currentTarget.value))},onCompositionEnd(C){S.current=!1;const O=C.currentTarget.value;z(null),n.state.setInputValue(O,K(Ue,C.nativeEvent))},onChange(C){if(S.current){const xe=C.currentTarget.value;z(xe),xe===""&&!n.state.openOnInputClick&&!n.state.inputInsidePopup&&n.state.setOpen(!1,K(Ne,C.nativeEvent));const W=xe.trim(),we=X&&W!=="";!k&&!Y&&W!==""&&(n.state.setOpen(!0,K(Ue,C.nativeEvent)),X||n.state.setIndices({activeIndex:null,selectedIndex:null,type:n.state.keyboardActiveRef.current?"keyboard":"pointer"})),B&&n.state.activeIndex!==null&&!we&&n.state.setIndices({activeIndex:null,selectedIndex:null,type:n.state.keyboardActiveRef.current?"keyboard":"pointer"});return}n.state.setInputValue(C.currentTarget.value,K(Ue,C.nativeEvent));const O=C.currentTarget.value==="",$=K(Ne,C.nativeEvent);O&&!n.state.inputInsidePopup&&(q==="single"&&n.state.setSelectedValue(null,$),n.state.openOnInputClick||n.state.setOpen(!1,$));const he=C.currentTarget.value.trim();!k&&!Y&&he!==""&&(n.state.setOpen(!0,K(Ue,C.nativeEvent)),X||n.state.setIndices({activeIndex:null,selectedIndex:null,type:n.state.keyboardActiveRef.current?"keyboard":"pointer"})),B&&n.state.activeIndex!==null&&!X&&n.state.setIndices({activeIndex:null,selectedIndex:null,type:n.state.keyboardActiveRef.current?"keyboard":"pointer"})},onKeyDown(C){if(Y||k||C.ctrlKey||C.shiftKey||C.altKey||C.metaKey)return;n.state.keyboardActiveRef.current=!0;const O=C.currentTarget,$=O.scrollWidth-O.clientWidth,he=w==="rtl";if(C.key==="Home"){Oe(C);const W=rn&&he?O.value.length:0;O.setSelectionRange(W,W),O.scrollLeft=0;return}if(C.key==="End"){Oe(C);const W=rn&&he?0:O.value.length;O.setSelectionRange(W,W),O.scrollLeft=he?-$:$;return}if(!M&&C.key==="Escape"){const W=q==="multiple"&&Array.isArray(G)?G.length===0:G===null,we=K(Ho,C.nativeEvent),Fe=q==="multiple"?[]:null;n.state.setInputValue("",we),n.state.setSelectedValue(Fe,we),!W&&!n.state.inline&&!we.isPropagationAllowed&&C.stopPropagation();return}if(I&&C.key==="Backspace"&&O.value===""&&I.highlightedChipIndex===void 0&&Array.isArray(G)&&G.length>0){const W=G.slice(0,-1);n.state.setIndices({activeIndex:null,selectedIndex:null,type:n.state.keyboardActiveRef.current?"keyboard":"pointer"}),n.state.setSelectedValue(W,K(Se,C.nativeEvent));return}const xe=ee(C);if(I?.setHighlightedChipIndex(xe),xe!==void 0?I?.chipsRef.current[xe]?.focus():n.state.inputRef.current?.focus(),C.which!==229&&C.key==="Enter"&&B){const W=n.state.activeIndex,we=C.nativeEvent;if(W===null){n.state.setOpen(!1,K(Se,we));return}Oe(C);const Fe=n.state.listRef.current[W];Fe&&(n.state.selectionEventRef.current=we,Fe.click(),n.state.selectionEventRef.current=null)}},onPointerMove(){n.state.keyboardActiveRef.current=!1},onPointerDown(){n.state.keyboardActiveRef.current=!1}},f?f.getValidationProps(c):c],stateAttributesMapping:js})}),Os={...Kt,..._o},Ts=o.forwardRef(function(e,s){const{render:r,className:u,disabled:h=!1,nativeButton:d=!0,keepMounted:c=!1,...i}=e,{disabled:v}=lt(),b=Ie(),x=l(b,a.selectionMode),P=l(b,a.disabled),f=l(b,a.readOnly),U=l(b,a.open),I=l(b,a.selectedValue),R=zt();let j=!1;x==="none"?j=R!=="":x==="single"?j=I!=null:j=Array.isArray(I)&&I.length>0;const n=v||P||h,{buttonRef:y,getButtonProps:L}=Ct({native:d,disabled:n}),{mounted:N,transitionStatus:w,setMounted:g}=Ut(j),k=o.useMemo(()=>({disabled:n,open:U,transitionStatus:w}),[n,U,w]);vt({open:j,ref:b.state.clearRef,onComplete(){j||g(!1)}});const F=Ve("button",e,{state:k,ref:[s,y,b.state.clearRef],props:[{tabIndex:-1,children:"x",disabled:n,"aria-readonly":f||void 0,onMouseDown(H){H.preventDefault()},onClick(H){if(n||f)return;const Q=b.state.keyboardActiveRef;b.state.setInputValue("",K(ln,H.nativeEvent)),x!=="none"?(b.state.setSelectedValue(Array.isArray(I)?[]:null,K(ln,H.nativeEvent)),b.state.setIndices({activeIndex:null,selectedIndex:null,type:Q.current?"keyboard":"pointer"})):b.state.setIndices({activeIndex:null,type:Q.current?"keyboard":"pointer"}),b.state.inputRef.current?.focus()}},i,L],stateAttributesMapping:Os});return c||N?F:null}),Ns=o.createContext(null);function Ds(){return o.useContext(Ns)}function Fs(t){const{children:e}=t,{filteredItems:s}=ze(),r=Ds(),u=r?r.items:s;return u?p.jsx(o.Fragment,{children:u.map(e)}):null}const qn=o.forwardRef(function(e,s){var r;const{render:u,className:h,children:d,...c}=e,i=Ie(),v=yt(),b=!!Gt(!0),{filteredItems:x}=ze(),P=l(i,a.items),f=l(i,a.labelsRef),U=l(i,a.listRef),I=l(i,a.selectionMode),R=l(i,a.grid),j=l(i,a.popupProps),n=l(i,a.disabled),y=l(i,a.readOnly),L=l(i,a.virtualized),N=I==="multiple",w=x.length===0,g=ue(_=>{i.set("positionerElement",_)}),k=ue(_=>{i.set("listElement",_)}),F=o.useMemo(()=>typeof d=="function"?r||(r=p.jsx(Fs,{children:d})):d,[d]),q=o.useMemo(()=>({empty:w}),[w]),H=v.useState("floatingId"),Q=Ve("div",e,{state:q,ref:[s,k,b?null:g],props:[j,{children:F,tabIndex:-1,id:H,role:R?"grid":"listbox","aria-multiselectable":N?"true":void 0,onKeyDown(_){if(!(n||y)&&_.key==="Enter"){const B=i.state.activeIndex;if(B==null)return;Oe(_);const M=_.nativeEvent,G=i.state.listRef.current[B];G&&(i.state.selectionEventRef.current=M,G.click(),i.state.selectionEventRef.current=null)}},onKeyDownCapture(){i.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){i.state.keyboardActiveRef.current=!1}},c]});return L?Q:p.jsx(bn,{elementsRef:U,labelsRef:P?void 0:f,children:Q})}),Un=o.createContext(void 0);function Ls(){const t=o.useContext(Un);if(t===void 0)throw new Error(De(20));return t}const Kn=o.forwardRef(function(e,s){const{keepMounted:r=!1,...u}=e,h=Ie(),d=l(h,a.mounted),c=l(h,a.forceMounted);return d||r||c?p.jsx(Un.Provider,{value:r,children:p.jsx(qo,{ref:s,...u})}):null}),zn=o.forwardRef(function(e,s){const{render:r,className:u,anchor:h,positionMethod:d="absolute",side:c="bottom",align:i="center",sideOffset:v=0,alignOffset:b=0,collisionBoundary:x="clipping-ancestors",collisionPadding:P=5,arrowPadding:f=5,sticky:U=!1,disableAnchorTracking:I=!1,collisionAvoidance:R=Uo,...j}=e,n=Ie(),{filteredItems:y}=ze(),L=yt(),N=Ls(),w=l(n,a.modal),g=l(n,a.open),k=l(n,a.mounted),F=l(n,a.openMethod),q=l(n,a.triggerElement),H=l(n,a.inputElement),Q=l(n,a.inputInsidePopup),_=y.length===0,M=Ko({anchor:h??(Q?q:H),floatingRootContext:L,positionMethod:d,mounted:k,side:c,sideOffset:v,align:i,alignOffset:b,arrowPadding:f,collisionBoundary:x,collisionPadding:P,sticky:U,disableAnchorTracking:I,keepMounted:N,collisionAvoidance:R,lazyFlip:!0});zo(g&&w&&F!=="touch",q);const G=o.useMemo(()=>{const Y={...M.positionerStyles};return g||(Y.pointerEvents="none"),{role:"presentation",hidden:!k,style:Y}},[g,k,M.positionerStyles]),ie=o.useMemo(()=>({open:g,side:M.side,align:M.align,anchorHidden:M.anchorHidden,empty:_}),[g,M.side,M.align,M.anchorHidden,_]);pe(()=>{n.set("popupSide",M.side)},[n,M.side]);const me=o.useMemo(()=>({side:M.side,align:M.align,arrowRef:M.arrowRef,arrowUncentered:M.arrowUncentered,arrowStyles:M.arrowStyles,anchorHidden:M.anchorHidden,isPositioned:M.isPositioned}),[M.side,M.align,M.arrowRef,M.arrowUncentered,M.arrowStyles,M.anchorHidden,M.isPositioned]),X=ue(Y=>{n.set("positionerElement",Y)}),Z=Ve("div",e,{state:ie,ref:[s,X],props:[G,j],stateAttributesMapping:gn});return p.jsxs(Bn.Provider,{value:me,children:[k&&w&&p.jsx(Wo,{inert:Go(!g),cutout:H??q}),Z]})}),Hs={...gn,...Kt},Wn=o.forwardRef(function(e,s){const{render:r,className:u,initialFocus:h,finalFocus:d,...c}=e,i=Ie(),v=Gt(),b=yt(),{filteredItems:x}=ze(),P=l(i,a.mounted),f=l(i,a.open),U=l(i,a.openMethod),I=l(i,a.transitionStatus),R=l(i,a.inputInsidePopup),j=l(i,a.inputElement),n=x.length===0;vt({open:f,ref:i.state.popupRef,onComplete(){f&&i.state.onOpenChangeComplete(!0)}});const y=o.useMemo(()=>({open:f,side:v.side,align:v.align,anchorHidden:v.anchorHidden,transitionStatus:I,empty:n}),[f,v.side,v.align,v.anchorHidden,I,n]),L=Ve("div",e,{state:y,ref:[s,i.state.popupRef],props:[{role:R?"dialog":"presentation",tabIndex:-1,onFocus(k){const F=It(k.nativeEvent);U!=="touch"&&(Ke(i.state.listElement,F)||F===k.currentTarget)&&i.state.inputRef.current?.focus()}},$o(I),c],stateAttributesMapping:Hs}),w=h===void 0?R?k=>k==="touch"?i.state.popupRef.current:j:!1:h;let g;return d!=null?g=d:g=R?void 0:!1,p.jsx(Yo,{context:b,disabled:!P,modal:!R,openInteractionType:U,initialFocus:w,returnFocus:g,children:L})}),Gn=o.createContext(void 0);function $n(){const t=o.useContext(Gn);if(!t)throw new Error(De(19));return t}const Bs=o.createContext(!1);function _s(){return o.useContext(Bs)}const Yn=o.memo(o.forwardRef(function(e,s){const{render:r,className:u,value:h=null,index:d,disabled:c=!1,nativeButton:i=!1,...v}=e,b=o.useRef(!1),x=o.useRef(null),P=xn({index:d,textRef:x,indexGuessBehavior:Qo.GuessFromOrder}),f=Ie(),U=_s(),{flatFilteredItems:I}=ze(),R=l(f,a.open),j=l(f,a.selectionMode),n=l(f,a.readOnly),y=l(f,a.virtualized),L=l(f,a.isItemEqualToValue),N=j!=="none",w=d??(y?rt(I,h,L):P.index),g=P.index!==-1,k=l(f,a.id),F=l(f,a.isActive,w),q=l(f,a.isSelected,h),H=l(f,a.items),Q=l(f,a.getItemProps),_=o.useRef(null),B=k!=null&&g?`${k}-${w}`:void 0,M=q&&N;pe(()=>{if(!(g&&(y||d!=null)))return;const S=f.state.listRef.current;return S[w]=_.current,()=>{delete S[w]}},[g,y,w,d,f]),pe(()=>{if(!g||H)return;const z=f.state.valuesRef.current;return z[w]=h,j!=="none"&&f.state.allValuesRef.current.push(h),()=>{delete z[w]}},[g,H,w,h,f,j]),pe(()=>{if(!R){b.current=!1;return}if(!g||H)return;const z=f.state.selectedValue,S=Array.isArray(z)?z[z.length-1]:z;Qe(S,h,L)&&f.set("selectedIndex",w)},[g,H,R,f,w,h,L]);const G=o.useMemo(()=>({disabled:c,selected:M,highlighted:F}),[c,M,F]),ie=Q({active:F,selected:M});ie.id=void 0,ie.onFocus=void 0;const{getButtonProps:me,buttonRef:X}=Ct({disabled:c,focusableWhenDisabled:!0,native:i});function Z(z){function S(){f.state.handleSelection(z,h)}f.state.submitOnItemClick?(qt.flushSync(S),f.state.requestSubmit()):S()}const Y={id:B,role:U?"gridcell":"option","aria-disabled":c||void 0,"aria-selected":N?M:void 0,tabIndex:void 0,onPointerDownCapture(z){b.current=!0,z.preventDefault()},onClick(z){c||n||Z(z.nativeEvent)},onMouseUp(z){const S=b.current;b.current=!1,!(c||n||z.button!==0||S||!F)&&Z(z.nativeEvent)}},de=Ve("div",e,{ref:[X,s,P.ref,_],state:G,props:[ie,Y,v,me]}),ve=o.useMemo(()=>({selected:M,textRef:x}),[M,x]);return p.jsx(Gn.Provider,{value:ve,children:de})})),Qn=o.forwardRef(function(e,s){const{render:r,className:u,children:h,...d}=e,{filteredItems:c}=ze(),i=Ie(),v=c.length===0?h:null;return Ve("div",e,{ref:[s,i.state.emptyRef],props:[{children:v,role:"status","aria-live":"polite","aria-atomic":!0},d]})});function Jn(t){const{multiple:e=!1,defaultValue:s,value:r,onValueChange:u,...h}=t;return p.jsx(Ms,{...h,selectionMode:e?"multiple":"single",selectedValue:r,defaultSelectedValue:s,onSelectedValueChange:u})}function qs(t){const{children:e}=t,s=Ie(),r=l(s,a.itemToStringLabel),u=l(s,a.selectedValue),h=l(s,a.items);let d=null;return typeof e=="function"?d=e(u):e!=null?d=e:d=Vs(u,h,r),p.jsx(o.Fragment,{children:d})}const Xn=o.forwardRef(function(e,s){const r=e.keepMounted??!1,{selected:u}=$n();return r||u?p.jsx(Us,{...e,ref:s}):null}),Us=o.memo(o.forwardRef((t,e)=>{const{render:s,className:r,keepMounted:u,...h}=t,{selected:d}=$n(),c=o.useRef(null),{transitionStatus:i,setMounted:v}=Ut(d),b=o.useMemo(()=>({selected:d,transitionStatus:i}),[d,i]),x=Ve("span",t,{ref:[e,c],state:b,props:[{"aria-hidden":!0,children:"✔️"},h],stateAttributesMapping:Kt});return vt({open:d,ref:c,onComplete(){d||v(!1)}}),x})),Ks=o.forwardRef(function(e,s){const{render:r,className:u,...h}=e,d=Ie(),c=l(d,a.open),[i,v]=o.useState(void 0);c&&i!==void 0&&v(void 0);const b=o.useRef([]),x=Ve("div",e,{ref:[s,d.state.chipsContainerRef],props:h}),P=o.useMemo(()=>({highlightedChipIndex:i,setHighlightedChipIndex:v,chipsRef:b}),[i,v,b]);return p.jsx(Ln.Provider,{value:P,children:p.jsx(bn,{elementsRef:b,children:x})})}),Zn=o.createContext(void 0);function zs(){const t=o.useContext(Zn);if(!t)throw new Error(De(17));return t}const Ws=o.forwardRef(function(e,s){const{render:r,className:u,...h}=e,d=Ie(),{setHighlightedChipIndex:c,chipsRef:i}=Hn(),v=l(d,a.disabled),b=l(d,a.readOnly),x=l(d,a.selectedValue),{ref:P,index:f}=xn();function U(n){let y=f;if(n.key==="ArrowLeft")n.preventDefault(),f>0?y=f-1:y=void 0;else if(n.key==="ArrowRight")n.preventDefault(),f<x.length-1?y=f+1:y=void 0;else if(n.key==="Backspace"||n.key==="Delete"){const L=f>=x.length-1?x.length-2:f;y=L>=0?L:void 0,Oe(n),d.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),d.state.setSelectedValue(x.filter((N,w)=>w!==f),K(Se,n.nativeEvent))}else n.key==="Enter"||n.key===" "?(Oe(n),y=void 0):n.key==="ArrowDown"||n.key==="ArrowUp"?(Oe(n),d.state.setOpen(!0,K(hn,n.nativeEvent)),y=void 0):n.key.length===1&&!n.ctrlKey&&!n.metaKey&&!n.altKey&&(y=void 0);return y}const I=o.useMemo(()=>({disabled:v}),[v]),R=Ve("div",e,{ref:[s,P],state:I,props:[{tabIndex:-1,"aria-disabled":v||void 0,"aria-readonly":b||void 0,onKeyDown(n){if(v||b)return;const y=U(n);qt.flushSync(()=>{c(y)}),y===void 0?d.state.inputRef.current?.focus():i.current[y]?.focus()},onMouseDown(n){v||b||(n.preventDefault(),d.state.inputRef.current?.focus())}},h]}),j=o.useMemo(()=>({index:f}),[f]);return p.jsx(Zn.Provider,{value:j,children:R})}),Gs=o.forwardRef(function(e,s){const{render:r,className:u,nativeButton:h=!0,...d}=e,c=Ie(),{index:i}=zs(),v=l(c,a.disabled),b=l(c,a.readOnly),x=l(c,a.selectedValue),P=l(c,a.isItemEqualToValue),{buttonRef:f,getButtonProps:U}=Ct({native:h,disabled:v||b,focusableWhenDisabled:!0}),I=o.useMemo(()=>({disabled:v}),[v]);return Ve("button",e,{ref:[s,f],state:I,props:[{tabIndex:-1,disabled:v,"aria-readonly":b||void 0,onClick(j){if(v||b)return;const n=K(an,j.nativeEvent),y=c.state.activeIndex,L=x[i],N=rt(c.state.valuesRef.current,L,P);N!==-1&&y===N&&c.state.setIndices({activeIndex:null,type:c.state.keyboardActiveRef.current?"pointer":"keyboard"}),c.state.setSelectedValue(x.filter((w,g)=>g!==i),n),n.isPropagationAllowed||j.stopPropagation(),c.state.inputRef.current?.focus()},onKeyDown(j){if(v||b)return;const n=K(an,j.nativeEvent);if(j.key==="Enter"||j.key===" "){const y=c.state.activeIndex,L=x[i],N=rt(c.state.valuesRef.current,L,P);N!==-1&&y===N&&c.state.setIndices({activeIndex:null,type:c.state.keyboardActiveRef.current?"pointer":"keyboard"}),c.state.setSelectedValue(x.filter((w,g)=>g!==i),n),n.isPropagationAllowed||Oe(j),c.state.inputRef.current?.focus()}}},d,U]})});function eo(t){const e=Je.c(3);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=p.jsx("path",{d:"M9.1603 1.12218C9.50684 1.34873 9.60427 1.81354 9.37792 2.16038L5.13603 8.66012C5.01614 8.8438 4.82192 8.96576 4.60451 8.99384C4.3871 9.02194 4.1683 8.95335 4.00574 8.80615L1.24664 6.30769C0.939709 6.02975 0.916013 5.55541 1.19372 5.24822C1.47142 4.94102 1.94536 4.91731 2.2523 5.19524L4.36085 7.10461L8.12299 1.33999C8.34934 0.993152 8.81376 0.895638 9.1603 1.12218Z"}),e[0]=s):s=e[0];let r;return e[1]!==t?(r=p.jsx("svg",{fill:"currentcolor",width:"10",height:"10",viewBox:"0 0 10 10",...t,children:s}),e[1]=t,e[2]=r):r=e[2],r}function $s(t){const e=Je.c(4);let s,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=p.jsx("path",{d:"M18 6L6 18"}),r=p.jsx("path",{d:"M6 6l12 12"}),e[0]=s,e[1]=r):(s=e[0],r=e[1]);let u;return e[2]!==t?(u=p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...t,children:[s,r]}),e[2]=t,e[3]=u):u=e[3],u}function Ys(t){const e=Je.c(3);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=p.jsx("path",{d:"M6 9l6 6 6-6"}),e[0]=s):s=e[0];let r;return e[1]!==t?(r=p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...t,children:s}),e[1]=t,e[2]=r):r=e[2],r}function Qs(t){const e=Je.c(4);let s,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=p.jsx("path",{d:"M18 6 6 18"}),r=p.jsx("path",{d:"m6 6 12 12"}),e[0]=s,e[1]=r):(s=e[0],r=e[1]);let u;return e[2]!==t?(u=p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,...t,children:[s,r]}),e[2]=t,e[3]=u):u=e[3],u}function ei(t){const e=Je.c(44),{items:s,label:r,placeholder:u,id:h,value:d,defaultValue:c,onValueChange:i,disabled:v,className:b,itemToString:x,itemToIcon:P,variant:f}=t,U=u===void 0?"Search...":u,I=v===void 0?!1:v,R=f===void 0?"default":f,j=o.useId(),n=h||j,y=R==="inline",L=y?is:In,N=y?Jo:Xo,w=I&&(y?Zo:es);let g;e[0]!==N||e[1]!==w?(g=it(N,w),e[0]=N,e[1]=w,e[2]=g):g=e[2];const k=g,F=y?ts:ns,q=I&&(y?os:ss);let H;e[3]!==F||e[4]!==q?(H=it(F,q),e[3]=F,e[4]=q,e[5]=H):H=e[5];const Q=H,_=y?ls:as;let B;e[6]!==i?(B=(O,$)=>{i?.(O)},e[6]=i,e[7]=B):B=e[7];const M=B,G=d!==void 0,ie=G?d??void 0:void 0,me=G?void 0:c??void 0;let X;e[8]!==b||e[9]!==L?(X=it(L,b),e[8]=b,e[9]=L,e[10]=X):X=e[10];let Z;e[11]!==n||e[12]!==r?(Z=r&&p.jsx("label",{htmlFor:n,children:r}),e[11]=n,e[12]=r,e[13]=Z):Z=e[13];let Y;e[14]!==n||e[15]!==Q||e[16]!==U?(Y=p.jsx(_n,{placeholder:U,id:n,className:Q}),e[14]=n,e[15]=Q,e[16]=U,e[17]=Y):Y=e[17];let de;e[18]===Symbol.for("react.memo_cache_sentinel")?(de=it(rs,"combobox-clear"),e[18]=de):de=e[18];let ve;e[19]===Symbol.for("react.memo_cache_sentinel")?(ve=p.jsx(Ts,{className:de,"aria-label":"Clear selection",children:p.jsx($s,{className:cn})}),e[19]=ve):ve=e[19];let z;e[20]===Symbol.for("react.memo_cache_sentinel")?(z=p.jsx(As,{className:cs,"aria-label":"Open popup",children:p.jsx(Ys,{className:cn})}),e[20]=z):z=e[20];let S;e[21]!==_?(S=p.jsxs("div",{className:_,children:[ve,z]}),e[21]=_,e[22]=S):S=e[22];let te;e[23]!==Y||e[24]!==S||e[25]!==k?(te=p.jsxs("div",{className:k,children:[Y,S]}),e[23]=Y,e[24]=S,e[25]=k,e[26]=te):te=e[26];let fe;e[27]!==X||e[28]!==Z||e[29]!==te?(fe=p.jsxs("div",{className:X,children:[Z,te]}),e[27]=X,e[28]=Z,e[29]=te,e[30]=fe):fe=e[30];let ee;e[31]===Symbol.for("react.memo_cache_sentinel")?(ee=p.jsx(Qn,{className:vn,children:"No items found."}),e[31]=ee):ee=e[31];let le;e[32]!==P||e[33]!==x?(le=p.jsx(Kn,{children:p.jsx(zn,{className:Cn,sideOffset:4,children:p.jsxs(Wn,{className:yn,children:[ee,p.jsx(qn,{className:Rn,children:O=>{const $=!!P;return p.jsxs(Yn,{value:O,className:Vn({withIcon:$}),children:[p.jsx(Xn,{className:Pn({withIcon:$}),children:p.jsx(eo,{className:En})}),P&&p.jsx("div",{className:Sn({withIcon:$}),children:P(O)}),p.jsx("div",{className:wn({withIcon:$}),children:x?x(O):String(O)})]},x?x(O):String(O))}})]})})}),e[32]=P,e[33]=x,e[34]=le):le=e[34];let C;return e[35]!==I||e[36]!==M||e[37]!==x||e[38]!==s||e[39]!==ie||e[40]!==me||e[41]!==fe||e[42]!==le?(C=p.jsxs(Jn,{items:s,value:ie,defaultValue:me,onValueChange:M,disabled:I,itemToStringLabel:x,children:[fe,le]}),e[35]=I,e[36]=M,e[37]=x,e[38]=s,e[39]=ie,e[40]=me,e[41]=fe,e[42]=le,e[43]=C):C=e[43],C}function ti(t){const e=Je.c(27),{items:s,label:r,placeholder:u,id:h,value:d,defaultValue:c,onValueChange:i,disabled:v,className:b,itemToString:x,itemToIcon:P}=t,f=u===void 0?"Search...":u,U=v===void 0?!1:v,I=o.useId(),R=h||I,j=o.useRef(null);let n;e[0]!==b?(n=it(In,b),e[0]=b,e[1]=n):n=e[1];let y;e[2]!==R||e[3]!==r?(y=r&&p.jsx("label",{htmlFor:R,children:r}),e[2]=R,e[3]=r,e[4]=y):y=e[4];let L;e[5]!==R||e[6]!==P||e[7]!==x||e[8]!==f?(L=p.jsx(Ks,{className:us,ref:j,children:p.jsx(qs,{children:F=>p.jsxs(o.Fragment,{children:[F.map(q=>{const H=x?x(q):String(q),Q=x?x(q):String(q),_=P?.(q);return p.jsxs(Ws,{className:ds,"aria-label":Q,children:[_&&p.jsx("div",{className:fs,children:_}),Q,p.jsx(Gs,{className:ps,"aria-label":"Remove",children:p.jsx(Qs,{})})]},H)}),p.jsx(_n,{id:R,placeholder:F.length>0?"":f,className:ms})]})})}),e[5]=R,e[6]=P,e[7]=x,e[8]=f,e[9]=L):L=e[9];let N;e[10]!==n||e[11]!==y||e[12]!==L?(N=p.jsxs("div",{className:n,children:[y,L]}),e[10]=n,e[11]=y,e[12]=L,e[13]=N):N=e[13];let w;e[14]===Symbol.for("react.memo_cache_sentinel")?(w=p.jsx(Qn,{className:vn,children:"No items found."}),e[14]=w):w=e[14];let g;e[15]!==P||e[16]!==x?(g=p.jsx(Kn,{children:p.jsx(zn,{className:Cn,sideOffset:4,anchor:j,children:p.jsxs(Wn,{className:yn,children:[w,p.jsx(qn,{className:Rn,children:F=>{const q=x?x(F):String(F),H=x?x(F):String(F),Q=P?.(F),_=!!P;return p.jsxs(Yn,{value:F,className:Vn({withIcon:_}),children:[p.jsx(Xn,{className:Pn({withIcon:_}),children:p.jsx(eo,{className:En})}),Q&&p.jsx("div",{className:Sn({withIcon:_}),children:Q}),p.jsx("div",{className:wn({withIcon:_}),children:H})]},q)}})]})})}),e[15]=P,e[16]=x,e[17]=g):g=e[17];let k;return e[18]!==c||e[19]!==U||e[20]!==x||e[21]!==s||e[22]!==i||e[23]!==N||e[24]!==g||e[25]!==d?(k=p.jsxs(Jn,{items:s,value:d,defaultValue:c,onValueChange:i,disabled:U,multiple:!0,itemToStringLabel:x,children:[N,g]}),e[18]=c,e[19]=U,e[20]=x,e[21]=s,e[22]=i,e[23]=N,e[24]=g,e[25]=d,e[26]=k):k=e[26],k}export{ti as C,Wt as a,Ht as b,Cs as c,Rs as d,ei as e,lt as u};
@@ -0,0 +1 @@
1
+ import{s as J,c as D,j as s,r as w,g as B,m as L,n as z,t as Y,k as G,v as Z,I as H,f as ee,e as te,h as P,L as se,O as ae}from"./index-C1Qc7Z7W.js";import{U as ie,X as ne,u as oe,l as le,r as ce,t as re}from"./update-or-create-name-DGt2MGEI.js";import{w as q,b as de,C as me,c as A,B as fe,h as O,H as ue,a as ge,g as pe}from"./area.css-ByjMFuMe.js";import{c as he,u as Ce,g as xe,a as je,b as ye,d as be,f as Q}from"./index-CAScpK2G.js";import{T as ve,a as Se,b as U,c as we,d as Ne,e as Te}from"./table-jMzD3FNy.js";import{u as Re,q as W}from"./useConfigList-Bx9xKceA.js";import{f as _e}from"./formatDistance-Bok3-MB1.js";import{B as E}from"./button-J5fxAIyE.js";import{c as De,a as ke,b as $e,d as Me,h as K}from"./index.esm-BVbruXk6.js";import{u as X}from"./useMutation-CNzYa4ST.js";import{C as Fe}from"./check-BdOT-uCr.js";import{C as He}from"./copy-Btrg1ewH.js";import{C as Be}from"./chevron-right-CcvZen9O.js";import{P as Ie}from"./plus-DqiZvCBU.js";/* empty css */import"./tooltip-BiUUXiGj.js";import"./usePopupAutoResize-CaO9EPHk.js";import"./en-US-C8ut0f5H.js";/* empty css */const Ee=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Le=J("arrow-left",Ee);var ze="_1xwfgwi0",Pe="_1xwfgwi1",qe="_1xwfgwi2";const Ae=()=>{const e=D.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("div",{className:ze,children:s.jsx("div",{className:Pe,children:s.jsx("h2",{className:qe,children:"No configs yet. Create your first config to get started."})})}),e[0]=t):t=e[0],t},V=he();function Oe(){const[e,t]=w.useState([]),[a,n]=w.useState([]),[i,r]=w.useState(""),u=B(),{id:c}=L({strict:!1}),{data:p}=Re(),h=z(),C=w.useCallback(o=>{h.prefetchQuery(Y(o))},[h]),b=w.useMemo(()=>[V.accessor("name",{header:"Name",cell:o=>o.getValue()}),V.accessor("createdAt",{header:"Creation Date",cell:o=>_e(new Date(o.getValue()),new Date,{addSuffix:!0})})],[]),g=Ce({data:p||[],columns:b,state:{sorting:e,columnFilters:a,globalFilter:i},onSortingChange:t,onColumnFiltersChange:n,onGlobalFilterChange:r,getCoreRowModel:be(),getFilteredRowModel:ye(),getSortedRowModel:je(),getPaginationRowModel:xe(),initialState:{pagination:{pageSize:100}}});return!p||p.length===0?s.jsx(Ae,{}):s.jsx("div",{children:s.jsxs(ve,{children:[s.jsx(Se,{children:g.getHeaderGroups().map(o=>s.jsx(U,{children:o.headers.map(l=>{const d=l.column.getIsSorted();return s.jsx(we,{sortable:l.column.getCanSort(),onClick:l.column.getToggleSortingHandler(),sortDirection:d==="asc"?"asc":d==="desc"?"desc":null,children:l.isPlaceholder?null:Q(l.column.columnDef.header,l.getContext())},l.id)})},o.id))}),s.jsx(Ne,{children:g.getRowModel().rows.map(o=>s.jsx(U,{interactive:!0,selected:o.original.id===c,onMouseEnter:()=>C(o.original.id),onClick:()=>u({to:"/configs/$id",params:{id:o.original.id}}),children:o.getVisibleCells().map(l=>s.jsx(Te,{children:Q(l.column.columnDef.cell,l.getContext())},l.id))},o.id))})]})})}const Qe=()=>{const e=D.c(3),t=B(),a=z();let n;return e[0]!==t||e[1]!==a?(n={mutationFn:Ue,onSuccess:async i=>{await a.invalidateQueries({queryKey:W}),i?.id&&t({to:"/configs/$id",params:{id:i?.id}})}},e[0]=t,e[1]=a,e[2]=n):n=e[2],X(n)};async function Ue(e){const a=await(await G.v1.configs.$post({json:{name:e.name}})).json();return"data"in a?a.data:void 0}const Ve=()=>{const e=D.c(2),t=z();let a;return e[0]!==t?(a={mutationFn:Ge,onSuccess:()=>{t.invalidateQueries({queryKey:W})}},e[0]=t,e[1]=a):a=e[1],X(a)};async function Ge(e){const a=await(await G.v1.configs[":id"].$patch({param:{id:e.id},json:{name:e.name}})).json();return"data"in a?a.data:void 0}const We=e=>{const t=D.c(6),{id:a,config:n,disabled:i}=e,{mutateAsync:r}=Qe(),{mutateAsync:u}=Ve();let c;return t[0]!==n||t[1]!==r||t[2]!==i||t[3]!==a||t[4]!==u?(c=s.jsx(ie,{id:a,entity:n,placeholder:"Config Name",onCreate:r,onUpdate:u,disabled:i}),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=u,t[5]=c):c=t[5],c},Ke=e=>{const t=D.c(25),{id:a}=e,n=B(),{data:i}=Z(a),[r,u]=w.useState(!1);let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},t[0]=c):c=t[0];const p=L(c),h="variant"in p,C="environment"in p,b=h||C;let g;t[1]!==a||t[2]!==C||t[3]!==h||t[4]!==n?(g=()=>{n(h?{to:"/configs/$id/variants",params:{id:a}}:C?{to:"/configs/$id/targeting",params:{id:a}}:{to:"/configs"})},t[1]=a,t[2]=C,t[3]=h,t[4]=n,t[5]=g):g=t[5];const o=g;let l;t[6]!==i?(l=async()=>{i?.slug&&(await navigator.clipboard.writeText(i.slug),u(!0),setTimeout(()=>u(!1),2e3))},t[6]=i,t[7]=l):l=t[7];const d=l,S=b?Le:ne;let m;t[8]!==S?(m=s.jsx(H,{icon:S}),t[8]=S,t[9]=m):m=t[9];let x;t[10]!==o||t[11]!==m?(x=s.jsx(E,{onClick:o,size:"icon",scheme:"gray",variant:"ghost",children:m}),t[10]=o,t[11]=m,t[12]=x):x=t[12];const v=i??void 0;let f;t[13]!==a||t[14]!==b||t[15]!==v?(f=s.jsx(We,{id:a,config:v,disabled:b},a),t[13]=a,t[14]=b,t[15]=v,t[16]=f):f=t[16];let j;t[17]!==r||t[18]!==i||t[19]!==d?(j=i?.slug&&s.jsxs("div",{className:De,children:[s.jsx("span",{className:ke,children:"Config Id"}),s.jsx("span",{className:$e,children:i.slug}),s.jsx("button",{type:"button",className:Me,onClick:d,"aria-label":"Copy config ID",children:r?s.jsx(Fe,{size:14}):s.jsx(He,{size:14})})]}),t[17]=r,t[18]=i,t[19]=d,t[20]=j):j=t[20];let y;return t[21]!==x||t[22]!==f||t[23]!==j?(y=s.jsxs("div",{className:K,children:[x,f,j]}),t[21]=x,t[22]=f,t[23]=j,t[24]=y):y=t[24],y};function Ct(){const e=D.c(40),{containerRef:t,setTileWidth:a}=oe();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const i=L(n),r=B(),u=ee(),{toggleSidebar:c}=te();let p;e[1]!==u?(p=u.filter(Je).map(Xe),e[1]=u,e[2]=p):p=e[2];const h=p;let C;e[3]!==r?(C=()=>{r({to:"/configs/$id",params:{id:"new"}})},e[3]=r,e[4]=C):C=e[4];const b=C;let g;e[5]!==i.id||e[6]!==a?(g=()=>{i?.id?a("25%"):a("100%")},e[5]=i.id,e[6]=a,e[7]=g):g=e[7];const o=i?.id;let l;e[8]!==o?(l=[o],e[8]=o,e[9]=l):l=e[9],w.useEffect(g,l);let d;e[10]!==c?(d=()=>{c()},e[10]=c,e[11]=d):d=e[11];let S;e[12]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(H,{icon:me}),e[12]=S):S=e[12];let m;e[13]!==d?(m=s.jsx(E,{onClick:d,size:"icon",variant:"ghost",scheme:"gray",children:S}),e[13]=d,e[14]=m):m=e[14];let x;e[15]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(H,{icon:Be,className:A}),e[15]=x):x=e[15];let v;e[16]!==h?(v=s.jsx(fe,{items:h}),e[16]=h,e[17]=v):v=e[17];let f;e[18]!==v||e[19]!==m?(f=s.jsxs("div",{className:O,children:[m,x,v]}),e[18]=v,e[19]=m,e[20]=f):f=e[20];let j;e[21]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(H,{icon:Ie,className:A}),e[21]=j):j=e[21];let y;e[22]!==b?(y=s.jsx("div",{className:O,children:s.jsxs(E,{variant:"outline",scheme:"gray",onClick:b,children:[j,"New Config"]})}),e[22]=b,e[23]=y):y=e[23];let N;e[24]!==f||e[25]!==y?(N=s.jsxs(ue,{className:ge,children:[f,y]}),e[24]=f,e[25]=y,e[26]=N):N=e[26];let k,$;e[27]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsxs("div",{className:P(q,le),children:[s.jsx("div",{className:K}),s.jsx(Oe,{})]}),$=P(q,ce),e[27]=k,e[28]=$):(k=e[27],$=e[28]);const I=i.id;let T;e[29]!==I?(T=s.jsx(Ke,{id:I}),e[29]=I,e[30]=T):T=e[30];let M;e[31]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(ae,{}),e[31]=M):M=e[31];let R;e[32]!==T?(R=s.jsx("div",{className:$,children:s.jsxs("div",{children:[T,M]})}),e[32]=T,e[33]=R):R=e[33];let _;e[34]!==t||e[35]!==R?(_=s.jsx("div",{className:pe,children:s.jsxs("div",{ref:t,className:re,children:[k,R]})}),e[34]=t,e[35]=R,e[36]=_):_=e[36];let F;return e[37]!==N||e[38]!==_?(F=s.jsxs(s.Fragment,{children:[N,_]}),e[37]=N,e[38]=_,e[39]=F):F=e[39],F}function Xe(e){const t=e.loaderData?.title,a=e.staticData.customData?.title,n=t??a;return{key:e.id,label:s.jsx(se,{to:e.pathname,className:de,children:n}),prefix:e.staticData.customData?.icon}}function Je(e){return!!e.staticData.customData?.title||!!e.loaderData?.title}export{Ct as component};
@@ -1 +1 @@
1
- import{l as c}from"./index-FrTQ7TcS.js";const e=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],t=c("copy",e);export{t as C};
1
+ import{s as c}from"./index-C1Qc7Z7W.js";const e=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],t=c("copy",e);export{t as C};
@@ -1 +1 @@
1
- import{a as z,p as A,j as t}from"./index-FrTQ7TcS.js";import{b as G}from"./useAnalytics-DTf81POS.js";import{l as J,L as M,e as V,u as y,x as _,v as k,w as F,y as $}from"./observability.css-wgjHtY3p.js";/* empty css */function W(){const e=z.c(47);let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x={from:"/(app)/observability"},e[0]=x):x=e[0];const s=A(x),T=s.from??"",L=s.to??"";let v;e[1]!==T||e[2]!==L?(v={startDate:T,endDate:L},e[1]=T,e[2]=L,e[3]=v):v=e[3];const q=v;let j;e:{if(!s.tags){j=void 0;break e}try{let l;e[4]!==s.tags?(l=JSON.parse(s.tags),e[4]=s.tags,e[5]=l):l=e[5],j=l}catch{j=void 0}}const P=j;let C;e[6]!==q||e[7]!==P||e[8]!==s.configId||e[9]!==s.environmentId||e[10]!==s.variantId?(C={...q,configId:s.configId,variantId:s.variantId,environmentId:s.environmentId,tags:P},e[6]=q,e[7]=P,e[8]=s.configId,e[9]=s.environmentId,e[10]=s.variantId,e[11]=C):C=e[11];const O=C,{data:a,isLoading:E}=G(O);if(E){let l;return e[12]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:J,children:t.jsx(M,{className:"animate-spin",size:24})}),e[12]=l):l=e[12],l}if(!(a&&a.requestCount>0)){let l;return e[13]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsxs("div",{className:V,children:[t.jsx("p",{children:"No cost data available yet."}),t.jsx("p",{children:"Make some API requests through the gateway to see cost breakdowns here."})]}),e[13]=l):l=e[13],l}let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("span",{className:y,children:"Total Cost"}),e[14]=N):N=e[14];const R=a?.totalCostFormatted;let o;e[15]!==R?(o=t.jsxs("div",{className:_,children:[N,t.jsx("p",{className:k,children:R})]}),e[15]=R,e[16]=o):o=e[16];let g;e[17]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("span",{className:y,children:"Input Cost"}),e[17]=g):g=e[17];const w=a?.totalInputCostFormatted;let n;e[18]!==w?(n=t.jsx("p",{className:k,children:w}),e[18]=w,e[19]=n):n=e[19];let i;e[20]!==a?.totalPromptTokens?(i=a?.totalPromptTokens.toLocaleString(),e[20]=a?.totalPromptTokens,e[21]=i):i=e[21];let r;e[22]!==i?(r=t.jsxs("span",{className:F,children:[i," tokens"]}),e[22]=i,e[23]=r):r=e[23];let c;e[24]!==n||e[25]!==r?(c=t.jsxs("div",{className:_,children:[g,n,r]}),e[24]=n,e[25]=r,e[26]=c):c=e[26];let b;e[27]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("span",{className:y,children:"Output Cost"}),e[27]=b):b=e[27];const D=a?.totalOutputCostFormatted;let m;e[28]!==D?(m=t.jsx("p",{className:k,children:D}),e[28]=D,e[29]=m):m=e[29];let d;e[30]!==a?.totalCompletionTokens?(d=a?.totalCompletionTokens.toLocaleString(),e[30]=a?.totalCompletionTokens,e[31]=d):d=e[31];let f;e[32]!==d?(f=t.jsxs("span",{className:F,children:[d," tokens"]}),e[32]=d,e[33]=f):f=e[33];let p;e[34]!==m||e[35]!==f?(p=t.jsxs("div",{className:_,children:[b,m,f]}),e[34]=m,e[35]=f,e[36]=p):p=e[36];let I;e[37]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx("span",{className:y,children:"Requests"}),e[37]=I):I=e[37];let h;e[38]!==a?.requestCount?(h=a?.requestCount.toLocaleString(),e[38]=a?.requestCount,e[39]=h):h=e[39];let u;e[40]!==h?(u=t.jsxs("div",{className:_,children:[I,t.jsx("p",{className:k,children:h})]}),e[40]=h,e[41]=u):u=e[41];let S;return e[42]!==c||e[43]!==p||e[44]!==u||e[45]!==o?(S=t.jsx("div",{children:t.jsxs("div",{className:$,children:[o,c,p,u]})}),e[42]=c,e[43]=p,e[44]=u,e[45]=o,e[46]=S):S=e[46],S}export{W as component};
1
+ import{c as z,x as A,j as t}from"./index-C1Qc7Z7W.js";import{b as G}from"./useAnalytics-CHDelHQa.js";import{l as J,L as M,e as V,u as y,x as _,v as k,w as F,y as $}from"./observability.css-D5kKsJ4z.js";/* empty css */function W(){const e=z.c(47);let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x={from:"/(app)/observability"},e[0]=x):x=e[0];const s=A(x),T=s.from??"",L=s.to??"";let v;e[1]!==T||e[2]!==L?(v={startDate:T,endDate:L},e[1]=T,e[2]=L,e[3]=v):v=e[3];const q=v;let j;e:{if(!s.tags){j=void 0;break e}try{let l;e[4]!==s.tags?(l=JSON.parse(s.tags),e[4]=s.tags,e[5]=l):l=e[5],j=l}catch{j=void 0}}const P=j;let C;e[6]!==q||e[7]!==P||e[8]!==s.configId||e[9]!==s.environmentId||e[10]!==s.variantId?(C={...q,configId:s.configId,variantId:s.variantId,environmentId:s.environmentId,tags:P},e[6]=q,e[7]=P,e[8]=s.configId,e[9]=s.environmentId,e[10]=s.variantId,e[11]=C):C=e[11];const O=C,{data:a,isLoading:E}=G(O);if(E){let l;return e[12]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:J,children:t.jsx(M,{className:"animate-spin",size:24})}),e[12]=l):l=e[12],l}if(!(a&&a.requestCount>0)){let l;return e[13]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsxs("div",{className:V,children:[t.jsx("p",{children:"No cost data available yet."}),t.jsx("p",{children:"Make some API requests through the gateway to see cost breakdowns here."})]}),e[13]=l):l=e[13],l}let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("span",{className:y,children:"Total Cost"}),e[14]=N):N=e[14];const R=a?.totalCostFormatted;let o;e[15]!==R?(o=t.jsxs("div",{className:_,children:[N,t.jsx("p",{className:k,children:R})]}),e[15]=R,e[16]=o):o=e[16];let g;e[17]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("span",{className:y,children:"Input Cost"}),e[17]=g):g=e[17];const w=a?.totalInputCostFormatted;let n;e[18]!==w?(n=t.jsx("p",{className:k,children:w}),e[18]=w,e[19]=n):n=e[19];let i;e[20]!==a?.totalPromptTokens?(i=a?.totalPromptTokens.toLocaleString(),e[20]=a?.totalPromptTokens,e[21]=i):i=e[21];let r;e[22]!==i?(r=t.jsxs("span",{className:F,children:[i," tokens"]}),e[22]=i,e[23]=r):r=e[23];let c;e[24]!==n||e[25]!==r?(c=t.jsxs("div",{className:_,children:[g,n,r]}),e[24]=n,e[25]=r,e[26]=c):c=e[26];let b;e[27]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("span",{className:y,children:"Output Cost"}),e[27]=b):b=e[27];const D=a?.totalOutputCostFormatted;let m;e[28]!==D?(m=t.jsx("p",{className:k,children:D}),e[28]=D,e[29]=m):m=e[29];let d;e[30]!==a?.totalCompletionTokens?(d=a?.totalCompletionTokens.toLocaleString(),e[30]=a?.totalCompletionTokens,e[31]=d):d=e[31];let f;e[32]!==d?(f=t.jsxs("span",{className:F,children:[d," tokens"]}),e[32]=d,e[33]=f):f=e[33];let p;e[34]!==m||e[35]!==f?(p=t.jsxs("div",{className:_,children:[b,m,f]}),e[34]=m,e[35]=f,e[36]=p):p=e[36];let I;e[37]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx("span",{className:y,children:"Requests"}),e[37]=I):I=e[37];let h;e[38]!==a?.requestCount?(h=a?.requestCount.toLocaleString(),e[38]=a?.requestCount,e[39]=h):h=e[39];let u;e[40]!==h?(u=t.jsxs("div",{className:_,children:[I,t.jsx("p",{className:k,children:h})]}),e[40]=h,e[41]=u):u=e[41];let S;return e[42]!==c||e[43]!==p||e[44]!==u||e[45]!==o?(S=t.jsx("div",{children:t.jsxs("div",{className:$,children:[o,c,p,u]})}),e[42]=c,e[43]=p,e[44]=u,e[45]=o,e[46]=S):S=e[46],S}export{W as component};
@@ -0,0 +1 @@
1
+ import{r as w,g as F,m as z,n as I,o as Y,j as n,c as R,k as L,p as X,I as k,e as J,f as Z,h as Q,L as ee,O as te}from"./index-C1Qc7Z7W.js";import{w as q,b as ne,C as se,c as A,B as oe,h as O,H as ae,a as ie,g as re}from"./area.css-ByjMFuMe.js";import{B}from"./button-J5fxAIyE.js";import{U as le,X as ce,u as me,l as de,r as ue,t as fe}from"./update-or-create-name-DGt2MGEI.js";import{c as ve,u as ge,f as U,g as pe,a as he,b as xe,d as je}from"./index-CAScpK2G.js";import{T as Ce,a as ye,b as V,c as be,d as Se,e as we}from"./table-jMzD3FNy.js";import{u as Ne,g as G}from"./useEnvironments-DILRhv_b.js";import{f as Re}from"./formatDistance-Bok3-MB1.js";import{h as K}from"./index.esm-BVbruXk6.js";import{u as W}from"./useMutation-CNzYa4ST.js";import{C as De}from"./chevron-right-CcvZen9O.js";import{P as Ee}from"./plus-DqiZvCBU.js";/* empty css */import"./tooltip-BiUUXiGj.js";import"./usePopupAutoResize-CaO9EPHk.js";import"./en-US-C8ut0f5H.js";/* empty css */const H=ve();function Te(){const[e,t]=w.useState([{id:"createdAt",desc:!1}]),[s,o]=w.useState([]),[l,i]=w.useState(""),{data:d}=Ne(),m=F(),{environment:r}=z({strict:!1}),u=I(),f=w.useCallback(a=>{u.prefetchQuery(Y(a))},[u]),N=w.useMemo(()=>[H.accessor("name",{header:"Name",cell:a=>a.row.original.isProd?`${a.getValue()} (this environment)`:a.getValue()}),H.accessor("isProd",{header:"Production",cell:a=>a.getValue()?"Yes":"No"}),H.accessor("createdAt",{header:"Creation Date",cell:a=>Re(new Date(a.getValue()),new Date,{addSuffix:!0})})],[]),g=ge({data:d||[],columns:N,state:{sorting:e,columnFilters:s,globalFilter:l},onSortingChange:t,onColumnFiltersChange:o,onGlobalFilterChange:i,getCoreRowModel:je(),getFilteredRowModel:xe(),getSortedRowModel:he(),getPaginationRowModel:pe(),initialState:{pagination:{pageSize:100}}});return n.jsx("div",{children:n.jsxs(Ce,{children:[n.jsx(ye,{children:g.getHeaderGroups().map(a=>n.jsx(V,{children:a.headers.map(c=>{const v=c.column.getIsSorted();return n.jsx(be,{sortable:c.column.getCanSort(),onClick:c.column.getToggleSortingHandler(),sortDirection:v==="asc"?"asc":v==="desc"?"desc":null,children:c.isPlaceholder?null:U(c.column.columnDef.header,c.getContext())},c.id)})},a.id))}),n.jsx(Se,{children:g.getRowModel().rows.map(a=>n.jsx(V,{interactive:!0,selected:a.original.id===r,onMouseEnter:()=>f(a.original.id),onClick:()=>m({to:"/environments/$environment",params:{environment:a.original.id}}),children:a.getVisibleCells().map(c=>n.jsx(we,{children:U(c.column.columnDef.cell,c.getContext())},c.id))},a.id))})]})})}const Pe=()=>{const e=R.c(3),t=F(),s=I();let o;return e[0]!==t||e[1]!==s?(o={mutationFn:$e,onSuccess:async l=>{await s.invalidateQueries({queryKey:G()}),l?.id&&t({to:"/environments/$environment",params:{environment:l?.id}})}},e[0]=t,e[1]=s,e[2]=o):o=e[2],W(o)};async function $e(e){const t=e.name.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""),o=await(await L.v1.environments.$post({json:{name:e.name,slug:t,isProd:e.isProd}})).json();return"data"in o?o.data:void 0}const Me=()=>{const e=R.c(2),t=I();let s;return e[0]!==t?(s={mutationFn:_e,onSuccess:()=>{t.invalidateQueries({queryKey:G()})}},e[0]=t,e[1]=s):s=e[1],W(s)};async function _e(e){const s=await(await L.v1.environments[":id"].$patch({param:{id:e.id},json:{name:e.name}})).json();return"data"in s?s.data:void 0}const ke=e=>{const t=R.c(7),{id:s,environment:o}=e,{mutateAsync:l}=Pe(),{mutateAsync:i}=Me(),d=o?.isProd,m=o?.isProd?"You can't rename Production environment.":void 0;let r;return t[0]!==l||t[1]!==o||t[2]!==s||t[3]!==d||t[4]!==m||t[5]!==i?(r=n.jsx(le,{id:s,disabled:d,tooltip:m,entity:o,placeholder:"Environment Name",onCreate:l,onUpdate:i}),t[0]=l,t[1]=o,t[2]=s,t[3]=d,t[4]=m,t[5]=i,t[6]=r):r=t[6],r},Fe=e=>{const t=R.c(11),{id:s}=e,o=F(),{data:l}=X(s);let i;t[0]!==o?(i=()=>{o({to:"/environments"})},t[0]=o,t[1]=i):i=t[1];const d=i;let m;t[2]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(k,{icon:ce}),t[2]=m):m=t[2];let r;t[3]!==d?(r=n.jsx(B,{onClick:d,size:"icon",scheme:"gray",variant:"ghost",children:m}),t[3]=d,t[4]=r):r=t[4];let u;t[5]!==l||t[6]!==s?(u=s?n.jsx(ke,{id:s,environment:l??void 0},s):null,t[5]=l,t[6]=s,t[7]=u):u=t[7];let f;return t[8]!==r||t[9]!==u?(f=n.jsxs("div",{className:K,children:[r,u]}),t[8]=r,t[9]=u,t[10]=f):f=t[10],f};function tt(){const e=R.c(40),{toggleSidebar:t}=J(),{containerRef:s,setTileWidth:o}=me();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},e[0]=l):l=e[0];const i=z(l),d=Z(),m=F();let r;e[1]!==d?(r=d.filter(Be).map(He),e[1]=d,e[2]=r):r=e[2];const u=r;let f;e[3]!==m?(f=()=>{m({to:"/environments/$environment",params:{environment:"new"}})},e[3]=m,e[4]=f):f=e[4];const N=f;let g;e[5]!==i.environment||e[6]!==o?(g=()=>{i?.environment?o("25%"):o("100%")},e[5]=i.environment,e[6]=o,e[7]=g):g=e[7];const a=i?.environment;let c;e[8]!==a?(c=[a],e[8]=a,e[9]=c):c=e[9],w.useEffect(g,c);let v;e[10]!==t?(v=()=>{t()},e[10]=t,e[11]=v):v=e[11];let D;e[12]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(k,{icon:se}),e[12]=D):D=e[12];let p;e[13]!==v?(p=n.jsx(B,{onClick:v,size:"icon",variant:"ghost",scheme:"gray",children:D}),e[13]=v,e[14]=p):p=e[14];let E;e[15]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(k,{icon:De,className:A}),e[15]=E):E=e[15];let h;e[16]!==u?(h=n.jsx(oe,{items:u}),e[16]=u,e[17]=h):h=e[17];let x;e[18]!==h||e[19]!==p?(x=n.jsxs("div",{className:O,children:[p,E,h]}),e[18]=h,e[19]=p,e[20]=x):x=e[20];let T;e[21]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(k,{icon:Ee,className:A}),e[21]=T):T=e[21];let j;e[22]!==N?(j=n.jsx("div",{className:O,children:n.jsxs(B,{variant:"outline",scheme:"gray",onClick:N,children:[T,"New Environment"]})}),e[22]=N,e[23]=j):j=e[23];let C;e[24]!==x||e[25]!==j?(C=n.jsxs(ae,{className:ie,children:[x,j]}),e[24]=x,e[25]=j,e[26]=C):C=e[26];let P,$;e[27]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsxs("div",{className:Q(q,de),children:[n.jsx("div",{className:K}),n.jsx(Te,{})]}),$=Q(q,ue),e[27]=P,e[28]=$):(P=e[27],$=e[28]);let y;e[29]!==i.environment?(y=n.jsx(Fe,{id:i.environment}),e[29]=i.environment,e[30]=y):y=e[30];let M;e[31]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsx(te,{}),e[31]=M):M=e[31];let b;e[32]!==y?(b=n.jsx("div",{className:$,children:n.jsxs("div",{children:[y,M]})}),e[32]=y,e[33]=b):b=e[33];let S;e[34]!==s||e[35]!==b?(S=n.jsx("div",{className:re,children:n.jsxs("div",{ref:s,className:fe,children:[P,b]})}),e[34]=s,e[35]=b,e[36]=S):S=e[36];let _;return e[37]!==C||e[38]!==S?(_=n.jsxs(n.Fragment,{children:[C,S]}),e[37]=C,e[38]=S,e[39]=_):_=e[39],_}function He(e){const t=e.loaderData?.title,s=e.staticData.customData?.title,o=t??s;return{key:e.id,label:n.jsx(ee,{to:e.pathname,className:ne,children:o}),prefix:e.staticData.customData?.icon}}function Be(e){return!!e.staticData.customData?.title||!!e.loaderData?.title}export{tt as component};