@nextclaw/ui 0.12.27 → 0.12.29

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 (41) hide show
  1. package/CHANGELOG.md +133 -0
  2. package/dist/assets/api-CKKNxbsy.js +15 -0
  3. package/dist/assets/{app-manager-provider-oYdeYPSv.js → app-manager-provider-BM1hziPv.js} +1 -1
  4. package/dist/assets/{channels-list-page-DkPvpAqc.js → channels-list-page-CQGbbPJz.js} +2 -2
  5. package/dist/assets/{chat-page-b7Zf32fF.js → chat-page-A5_heqOE.js} +1 -1
  6. package/dist/assets/{desktop-DVUbOWbR.js → desktop-CmIbyIrg.js} +1 -1
  7. package/dist/assets/{desktop-update-config-CP8dFYXK.js → desktop-update-config-jWt63bXG.js} +1 -1
  8. package/dist/assets/{dialog-BKo0RItd.js → dialog-DWZeMf9V.js} +1 -1
  9. package/dist/assets/{dist-CFiwgaLs.js → dist-DN-YM_0Y.js} +1 -1
  10. package/dist/assets/{es2015-BhznEEyJ.js → es2015-ZJ-nWL4L.js} +1 -1
  11. package/dist/assets/{index-DqJ3CYwi.js → index-zYi4W031.js} +3 -3
  12. package/dist/assets/{marketplace-page-BVqFjnEB.js → marketplace-page-BO74RmDP.js} +1 -1
  13. package/dist/assets/marketplace-page-DmeV1ihQ.js +1 -0
  14. package/dist/assets/mcp-marketplace-page-Bk3uY3No.js +1 -0
  15. package/dist/assets/{mcp-marketplace-page-BOYJO0kp.js → mcp-marketplace-page-CoTYEIEI.js} +1 -1
  16. package/dist/assets/{model-config-Bg2yycmn.js → model-config-Bzk1sqTS.js} +1 -1
  17. package/dist/assets/{notice-card-Dr6xCwva.js → notice-card-BM2_YNoc.js} +1 -1
  18. package/dist/assets/{popover-BDFNiLlg.js → popover-2H9DS7Cv.js} +1 -1
  19. package/dist/assets/{provider-scoped-model-input-BMTp4BEH.js → provider-scoped-model-input-DsZJ44ZV.js} +1 -1
  20. package/dist/assets/{providers-list-DC1q3fvC.js → providers-list-CjkQwdQf.js} +1 -1
  21. package/dist/assets/remote-Dm6hKGew.js +1 -0
  22. package/dist/assets/{runtime-config-page-q-nC0C5i.js → runtime-config-page-DXNa4Xa-.js} +1 -1
  23. package/dist/assets/{search-config-CcKHif8O.js → search-config-D5laxxn9.js} +1 -1
  24. package/dist/assets/{secrets-config-DSg6O92a.js → secrets-config-CNsbCI2d.js} +1 -1
  25. package/dist/assets/{select-BUTwE_lC.js → select-C2c10F3e.js} +1 -1
  26. package/dist/assets/{setting-row-BavcnXw1.js → setting-row-CB_ZFbIZ.js} +1 -1
  27. package/dist/assets/{tag-chip-Dm2Lqnpu.js → tag-chip-CrQfVN3A.js} +1 -1
  28. package/dist/assets/{use-config-Cyv5IuSt.js → use-config-jAYudJxy.js} +1 -1
  29. package/dist/assets/{use-infinite-scroll-loader-DF2e6nQ2.js → use-infinite-scroll-loader-C_j5u-rR.js} +1 -1
  30. package/dist/index.html +11 -11
  31. package/package.json +9 -9
  32. package/src/features/channels/utils/channel-form-fields.utils.ts +0 -9
  33. package/src/features/marketplace/components/marketplace-page.test.tsx +29 -29
  34. package/src/features/marketplace/utils/marketplace-installed-cache.utils.test.ts +11 -11
  35. package/src/shared/lib/logos/index.ts +0 -1
  36. package/dist/assets/api-DGD9_Bg4.js +0 -15
  37. package/dist/assets/marketplace-page-DkQ2hTs1.js +0 -1
  38. package/dist/assets/mcp-marketplace-page-DSML7NN0.js +0 -1
  39. package/dist/assets/remote-Dr3jcfWP.js +0 -1
  40. package/dist/logos/mochat.svg +0 -6
  41. package/public/logos/mochat.svg +0 -6
@@ -1 +1 @@
1
- import{_ as e,m as t,p as n,u as r}from"./i18n-D1144VAA.js";import{on as i}from"./api-DGD9_Bg4.js";import{_ as a,a as o,c as s,d as c,f as l,g as u,h as d,i as f,l as p,n as m,o as h,p as g,r as _,s as v,t as y}from"./es2015-BhznEEyJ.js";import{t as b}from"./createLucideIcon-DzY6wN61.js";var x=b(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),S=b(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),C=b(`ChevronUp`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),w=[`top`,`right`,`bottom`,`left`],T=Math.min,E=Math.max,D=Math.round,O=Math.floor,k=e=>({x:e,y:e}),A={left:`right`,right:`left`,bottom:`top`,top:`bottom`},j={start:`end`,end:`start`};function M(e,t,n){return E(e,T(t,n))}function N(e,t){return typeof e==`function`?e(t):e}function P(e){return e.split(`-`)[0]}function F(e){return e.split(`-`)[1]}function I(e){return e===`x`?`y`:`x`}function L(e){return e===`y`?`height`:`width`}var R=new Set([`top`,`bottom`]);function z(e){return R.has(P(e))?`y`:`x`}function ee(e){return I(z(e))}function te(e,t,n){n===void 0&&(n=!1);let r=F(e),i=ee(e),a=L(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ue(o)),[o,ue(o)]}function ne(e){let t=ue(e);return[re(e),t,re(t)]}function re(e){return e.replace(/start|end/g,e=>j[e])}var ie=[`left`,`right`],ae=[`right`,`left`],oe=[`top`,`bottom`],se=[`bottom`,`top`];function ce(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ae:ie:t?ie:ae;case`left`:case`right`:return t?oe:se;default:return[]}}function le(e,t,n,r){let i=F(e),a=ce(P(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(re)))),a}function ue(e){return e.replace(/left|right|bottom|top/g,e=>A[e])}function de(e){return{top:0,right:0,bottom:0,left:0,...e}}function fe(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:de(e)}function pe(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function me(e,t,n){let{reference:r,floating:i}=e,a=z(t),o=ee(t),s=L(o),c=P(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(F(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function he(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=N(t,e),p=fe(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=pe(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=pe(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ge=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=me(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:{...o,detectOverflow:o.detectOverflow??he},elements:{reference:e,floating:t}});u=g??u,d=_??d,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=me(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}},_e=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=N(e,t)||{};if(l==null)return{};let d=fe(u),f={x:n,y:r},p=ee(i),m=L(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,E=C/2-h[m]/2-1,D=T(d[_],E),O=T(d[v],E),k=D,A=C-h[m]-O,j=C/2-h[m]/2+w,P=M(k,j,A),I=!c.arrow&&F(i)!=null&&j!==P&&a.reference[m]/2-(j<k?D:O)-h[m]/2<0,R=I?j<k?j-k:j-A:0;return{[p]:f[p]+R,data:{[p]:P,centerOffset:j-P-R,...I&&{alignmentOffset:R}},reset:I}}}),ve=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=N(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=P(r),_=z(o),v=P(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[ue(o)]:ne(o)),x=p!==`none`;!d&&x&&b.push(...le(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=te(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==z(t))||T.every(e=>z(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=z(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function ye(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function be(e){return w.some(t=>e[t]>=0)}var xe=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=N(e,t);switch(i){case`referenceHidden`:{let e=ye(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:be(e)}}}case`escaped`:{let e=ye(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:be(e)}}}default:return{}}}}},Se=new Set([`left`,`top`]);async function Ce(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=P(n),s=F(n),c=z(n)===`y`,l=Se.has(o)?-1:1,u=a&&c?-1:1,d=N(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var we=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Ce(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Te=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=N(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=z(P(i)),p=I(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=M(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=M(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Ee=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=N(e,t),u={x:n,y:r},d=z(i),f=I(d),p=u[f],m=u[d],h=N(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Se.has(P(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},De=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=N(e,t),u=await o.detectOverflow(t,l),d=P(i),f=F(i),p=z(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=T(h-u[g],v),x=T(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=E(u.left,0),t=E(u.right,0),n=E(u.top,0),r=E(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:E(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:E(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let D=await o.getDimensions(s.floating);return m!==D.width||h!==D.height?{reset:{rects:!0}}:{}}}};function Oe(){return typeof window<`u`}function ke(e){return Ae(e)?(e.nodeName||``).toLowerCase():`#document`}function B(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function V(e){return((Ae(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Ae(e){return Oe()?e instanceof Node||e instanceof B(e).Node:!1}function H(e){return Oe()?e instanceof Element||e instanceof B(e).Element:!1}function U(e){return Oe()?e instanceof HTMLElement||e instanceof B(e).HTMLElement:!1}function je(e){return!Oe()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof B(e).ShadowRoot}var Me=new Set([`inline`,`contents`]);function Ne(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=W(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Me.has(i)}var Pe=new Set([`table`,`td`,`th`]);function Fe(e){return Pe.has(ke(e))}var Ie=[`:popover-open`,`:modal`];function Le(e){return Ie.some(t=>{try{return e.matches(t)}catch{return!1}})}var Re=[`transform`,`translate`,`scale`,`rotate`,`perspective`],ze=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],Be=[`paint`,`layout`,`strict`,`content`];function Ve(e){let t=Ue(),n=H(e)?W(e):e;return Re.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||ze.some(e=>(n.willChange||``).includes(e))||Be.some(e=>(n.contain||``).includes(e))}function He(e){let t=G(e);for(;U(t)&&!Ge(t);){if(Ve(t))return t;if(Le(t))return null;t=G(t)}return null}function Ue(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var We=new Set([`html`,`body`,`#document`]);function Ge(e){return We.has(ke(e))}function W(e){return B(e).getComputedStyle(e)}function Ke(e){return H(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function G(e){if(ke(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||je(e)&&e.host||V(e);return je(t)?t.host:t}function qe(e){let t=G(e);return Ge(t)?e.ownerDocument?e.ownerDocument.body:e.body:U(t)&&Ne(t)?t:qe(t)}function Je(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=qe(e),i=r===e.ownerDocument?.body,a=B(r);if(i){let e=Ye(a);return t.concat(a,a.visualViewport||[],Ne(r)?r:[],e&&n?Je(e):[])}return t.concat(r,Je(r,[],n))}function Ye(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xe(e){let t=W(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=U(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=D(n)!==a||D(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ze(e){return H(e)?e:e.contextElement}function Qe(e){let t=Ze(e);if(!U(t))return k(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Xe(t),o=(a?D(n.width):n.width)/r,s=(a?D(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var $e=k(0);function et(e){let t=B(e);return!Ue()||!t.visualViewport?$e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tt(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==B(e)?!1:t}function K(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ze(e),o=k(1);t&&(r?H(r)&&(o=Qe(r)):o=Qe(e));let s=tt(a,n,r)?et(a):k(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=B(a),t=r&&H(r)?B(r):r,n=e,i=Ye(n);for(;i&&r&&t!==n;){let e=Qe(i),t=i.getBoundingClientRect(),r=W(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=B(i),i=Ye(n)}}return pe({width:u,height:d,x:c,y:l})}function nt(e,t){let n=Ke(e).scrollLeft;return t?t.left+n:K(V(e)).left+n}function rt(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-nt(e,n),y:n.top+t.scrollTop}}function it(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=V(r),s=t?Le(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=k(1),u=k(0),d=U(r);if((d||!d&&!a)&&((ke(r)!==`body`||Ne(o))&&(c=Ke(r)),U(r))){let e=K(r);l=Qe(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?rt(o,c):k(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function at(e){return Array.from(e.getClientRects())}function ot(e){let t=V(e),n=Ke(e),r=e.ownerDocument.body,i=E(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=E(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+nt(e),s=-n.scrollTop;return W(r).direction===`rtl`&&(o+=E(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var st=25;function ct(e,t){let n=B(e),r=V(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Ue();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=nt(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=st&&(a-=o)}else l<=st&&(a+=l);return{width:a,height:o,x:s,y:c}}var lt=new Set([`absolute`,`fixed`]);function ut(e,t){let n=K(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=U(e)?Qe(e):k(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function dt(e,t,n){let r;if(t===`viewport`)r=ct(e,n);else if(t===`document`)r=ot(V(e));else if(H(t))r=ut(t,n);else{let n=et(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return pe(r)}function ft(e,t){let n=G(e);return n===t||!H(n)||Ge(n)?!1:W(n).position===`fixed`||ft(n,t)}function pt(e,t){let n=t.get(e);if(n)return n;let r=Je(e,[],!1).filter(e=>H(e)&&ke(e)!==`body`),i=null,a=W(e).position===`fixed`,o=a?G(e):e;for(;H(o)&&!Ge(o);){let t=W(o),n=Ve(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&lt.has(i.position)||Ne(o)&&!n&&ft(e,o))?r=r.filter(e=>e!==o):i=t,o=G(o)}return t.set(e,r),r}function mt(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Le(t)?[]:pt(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=dt(t,n,i);return e.top=E(r.top,e.top),e.right=T(r.right,e.right),e.bottom=T(r.bottom,e.bottom),e.left=E(r.left,e.left),e},dt(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function ht(e){let{width:t,height:n}=Xe(e);return{width:t,height:n}}function gt(e,t,n){let r=U(t),i=V(t),a=n===`fixed`,o=K(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=k(0);function l(){c.x=nt(i)}if(r||!r&&!a)if((ke(t)!==`body`||Ne(i))&&(s=Ke(t)),r){let e=K(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?rt(i,s):k(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function _t(e){return W(e).position===`static`}function vt(e,t){if(!U(e)||W(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return V(e)===n&&(n=n.ownerDocument.body),n}function yt(e,t){let n=B(e);if(Le(e))return n;if(!U(e)){let t=G(e);for(;t&&!Ge(t);){if(H(t)&&!_t(t))return t;t=G(t)}return n}let r=vt(e,t);for(;r&&Fe(r)&&_t(r);)r=vt(r,t);return r&&Ge(r)&&_t(r)&&!Ve(r)?n:r||He(e)||n}var bt=async function(e){let t=this.getOffsetParent||yt,n=this.getDimensions,r=await n(e.floating);return{reference:gt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function xt(e){return W(e).direction===`rtl`}var St={convertOffsetParentRelativeRectToViewportRelativeRect:it,getDocumentElement:V,getClippingRect:mt,getOffsetParent:yt,getElementRects:bt,getClientRects:at,getDimensions:ht,getScale:Qe,isElement:H,isRTL:xt};function Ct(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function wt(e,t){let n=null,r,i=V(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=O(d),h=O(i.clientWidth-(u+f)),g=O(i.clientHeight-(d+p)),_=O(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:E(0,T(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Ct(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Tt(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ze(e),u=i||a?[...l?Je(l):[],...Je(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?wt(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?K(e):null;c&&g();function g(){let t=K(e);h&&!Ct(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Et=we,Dt=Te,Ot=ve,kt=De,At=xe,jt=_e,Mt=Ee,Nt=(e,t,n)=>{let r=new Map,i={platform:St,...n},a={...i.platform,_c:r};return ge(e,t,{...i,platform:a})},q=e(t(),1),Pt=e(i(),1),Ft=typeof document<`u`?q.useLayoutEffect:function(){};function It(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,i;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(!It(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!It(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Lt(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Rt(e,t){let n=Lt(e);return Math.round(t*n)/n}function zt(e){let t=q.useRef(e);return Ft(()=>{t.current=e}),t}function Bt(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=q.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=q.useState(r);It(f,r)||p(r);let[m,h]=q.useState(null),[g,_]=q.useState(null),v=q.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=q.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=q.useRef(null),C=q.useRef(null),w=q.useRef(u),T=c!=null,E=zt(c),D=zt(i),O=zt(l),k=q.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Nt(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!It(w.current,t)&&(w.current=t,Pt.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Ft(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=q.useRef(!1);Ft(()=>(A.current=!0,()=>{A.current=!1}),[]),Ft(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=q.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=q.useMemo(()=>({reference:b,floating:x}),[b,x]),N=q.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Rt(M.floating,u.x),r=Rt(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Lt(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return q.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var Vt=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:jt({element:r.current,padding:i}).fn(n):r?jt({element:r,padding:i}).fn(n):{}}}},Ht=(e,t)=>({...Et(e),options:[e,t]}),Ut=(e,t)=>({...Dt(e),options:[e,t]}),Wt=(e,t)=>({...Mt(e),options:[e,t]}),Gt=(e,t)=>({...Ot(e),options:[e,t]}),Kt=(e,t)=>({...kt(e),options:[e,t]}),qt=(e,t)=>({...At(e),options:[e,t]}),Jt=(e,t)=>({...Vt(e),options:[e,t]}),J=n(),Yt=`Arrow`,Xt=q.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,J.jsx)(s.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,J.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Xt.displayName=Yt;var Zt=Xt;function Qt(e){let[t,n]=q.useState(void 0);return g(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var $t=`Popper`,[en,tn]=d($t),[nn,rn]=en($t),an=e=>{let{__scopePopper:t,children:n}=e,[r,i]=q.useState(null);return(0,J.jsx)(nn,{scope:t,anchor:r,onAnchorChange:i,children:n})};an.displayName=$t;var on=`PopperAnchor`,sn=q.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=rn(on,n),o=q.useRef(null),c=u(t,o),l=q.useRef(null);return q.useEffect(()=>{let e=l.current;l.current=r?.current||o.current,e!==l.current&&a.onAnchorChange(l.current)}),r?null:(0,J.jsx)(s.div,{...i,ref:c})});sn.displayName=on;var cn=`PopperContent`,[ln,un]=en(cn),dn=q.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p=`partial`,hideWhenDetached:m=!1,updatePositionStrategy:h=`optimized`,onPlaced:_,...y}=e,b=rn(cn,n),[x,S]=q.useState(null),C=u(t,e=>S(e)),[w,T]=q.useState(null),E=Qt(w),D=E?.width??0,O=E?.height??0,k=r+(a===`center`?``:`-`+a),A=typeof f==`number`?f:{top:0,right:0,bottom:0,left:0,...f},j=Array.isArray(d)?d:[d],M=j.length>0,N={padding:A,boundary:j.filter(hn),altBoundary:M},{refs:P,floatingStyles:F,placement:I,isPositioned:L,middlewareData:R}=Bt({strategy:`fixed`,placement:k,whileElementsMounted:(...e)=>Tt(...e,{animationFrame:h===`always`}),elements:{reference:b.anchor},middleware:[Ht({mainAxis:i+O,alignmentAxis:o}),l&&Ut({mainAxis:!0,crossAxis:!1,limiter:p===`partial`?Wt():void 0,...N}),l&&Gt({...N}),Kt({...N,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),w&&Jt({element:w,padding:c}),gn({arrowWidth:D,arrowHeight:O}),m&&qt({strategy:`referenceHidden`,...N})]}),[z,ee]=_n(I),te=v(_);g(()=>{L&&te?.()},[L,te]);let ne=R.arrow?.x,re=R.arrow?.y,ie=R.arrow?.centerOffset!==0,[ae,oe]=q.useState();return g(()=>{x&&oe(window.getComputedStyle(x).zIndex)},[x]),(0,J.jsx)(`div`,{ref:P.setFloating,"data-radix-popper-content-wrapper":``,style:{...F,transform:L?F.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ae,"--radix-popper-transform-origin":[R.transformOrigin?.x,R.transformOrigin?.y].join(` `),...R.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,J.jsx)(ln,{scope:n,placedSide:z,onArrowChange:T,arrowX:ne,arrowY:re,shouldHideArrow:ie,children:(0,J.jsx)(s.div,{"data-side":z,"data-align":ee,...y,ref:C,style:{...y.style,animation:L?void 0:`none`}})})})});dn.displayName=cn;var fn=`PopperArrow`,pn={top:`bottom`,right:`left`,bottom:`top`,left:`right`},mn=q.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=un(fn,n),a=pn[i.placedSide];return(0,J.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,J.jsx)(Zt,{...r,ref:t,style:{...r.style,display:`block`}})})});mn.displayName=fn;function hn(e){return e!==null}var gn=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=_n(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function _n(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var vn=an,yn=sn,bn=dn,xn=mn;function Sn(e,[t,n]){return Math.min(n,Math.max(t,e))}function Cn(e){let t=e+`CollectionProvider`,[n,r]=d(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=q.useRef(null),a=q.useRef(new Map).current;return(0,J.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=p(s),l=q.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,J.jsx)(c,{ref:u(t,a(s,n).collectionRef),children:r})});l.displayName=s;let f=e+`CollectionItemSlot`,m=`data-radix-collection-item`,h=p(f),g=q.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=q.useRef(null),s=u(t,o),c=a(f,n);return q.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,J.jsx)(h,{[m]:``,ref:s,children:r})});g.displayName=f;function _(t){let n=a(e+`CollectionConsumer`,t);return q.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:g},_,r]}var wn=q.createContext(void 0);function Tn(e){let t=q.useContext(wn);return e||t||`ltr`}function En(e){let t=q.useRef({value:e,previous:e});return q.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Dn=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),On=`VisuallyHidden`,kn=q.forwardRef((e,t)=>(0,J.jsx)(s.span,{...e,ref:t,style:{...Dn,...e.style}}));kn.displayName=On;var An=kn,jn=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Mn=[` `,`Enter`],Y=`Select`,[Nn,Pn,Fn]=Cn(Y),[In,Ln]=d(Y,[Fn,tn]),Rn=tn(),[zn,X]=In(Y),[Bn,Vn]=In(Y),Hn=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:m,required:h,form:g}=e,_=Rn(t),[v,y]=q.useState(null),[b,x]=q.useState(null),[S,C]=q.useState(!1),w=Tn(d),[T,E]=c({prop:r,defaultProp:i??!1,onChange:a,caller:Y}),[D,O]=c({prop:o,defaultProp:s,onChange:u,caller:Y}),k=q.useRef(null),A=v?g||!!v.closest(`form`):!0,[j,M]=q.useState(new Set),N=Array.from(j).map(e=>e.props.value).join(`;`);return(0,J.jsx)(vn,{..._,children:(0,J.jsxs)(zn,{required:h,scope:t,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:l(),value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:m,children:[(0,J.jsx)(Nn.Provider,{scope:t,children:(0,J.jsx)(Bn,{scope:e.__scopeSelect,onNativeOptionAdd:q.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:q.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),A?(0,J.jsxs)(Pr,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:p,value:D,onChange:e=>O(e.target.value),disabled:m,form:g,children:[D===void 0?(0,J.jsx)(`option`,{value:``}):null,Array.from(j)]},N):null]})})};Hn.displayName=Y;var Un=`SelectTrigger`,Wn=q.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,o=Rn(n),c=X(Un,n),l=c.disabled||r,d=u(t,c.onTriggerChange),f=Pn(n),p=q.useRef(`touch`),[m,h,g]=Ir(e=>{let t=f().filter(e=>!e.disabled),n=Lr(t,e,t.find(e=>e.value===c.value));n!==void 0&&c.onValueChange(n.value)}),_=e=>{l||(c.onOpenChange(!0),g()),e&&(c.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,J.jsx)(yn,{asChild:!0,...o,children:(0,J.jsx)(s.button,{type:`button`,role:`combobox`,"aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":`none`,dir:c.dir,"data-state":c.open?`open`:`closed`,disabled:l,"data-disabled":l?``:void 0,"data-placeholder":Fr(c.value)?``:void 0,...i,ref:d,onClick:a(i.onClick,e=>{e.currentTarget.focus(),p.current!==`mouse`&&_(e)}),onPointerDown:a(i.onPointerDown,e=>{p.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(_(e),e.preventDefault())}),onKeyDown:a(i.onKeyDown,e=>{let t=m.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&h(e.key),!(t&&e.key===` `)&&jn.includes(e.key)&&(_(),e.preventDefault())})})})});Wn.displayName=Un;var Gn=`SelectValue`,Kn=q.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...c}=e,l=X(Gn,n),{onValueNodeHasChildrenChange:d}=l,f=a!==void 0,p=u(t,l.onValueNodeChange);return g(()=>{d(f)},[d,f]),(0,J.jsx)(s.span,{...c,ref:p,style:{pointerEvents:`none`},children:Fr(l.value)?(0,J.jsx)(J.Fragment,{children:o}):a})});Kn.displayName=Gn;var qn=`SelectIcon`,Jn=q.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,J.jsx)(s.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});Jn.displayName=qn;var Yn=`SelectPortal`,Xn=e=>(0,J.jsx)(f,{asChild:!0,...e});Xn.displayName=Yn;var Z=`SelectContent`,Zn=q.forwardRef((e,t)=>{let n=X(Z,e.__scopeSelect),[r,i]=q.useState();if(g(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?Pt.createPortal((0,J.jsx)(Qn,{scope:e.__scopeSelect,children:(0,J.jsx)(Nn.Slot,{scope:e.__scopeSelect,children:(0,J.jsx)(`div`,{children:e.children})})}),t):null}return(0,J.jsx)(tr,{...e,ref:t})});Zn.displayName=Z;var Q=10,[Qn,$]=In(Z),$n=`SelectContentImpl`,er=p(`SelectContent.RemoveScroll`),tr=q.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:c,side:l,sideOffset:d,align:f,alignOffset:p,arrowPadding:g,collisionBoundary:v,collisionPadding:b,sticky:x,hideWhenDetached:S,avoidCollisions:C,...w}=e,T=X(Z,n),[E,D]=q.useState(null),[O,k]=q.useState(null),A=u(t,e=>D(e)),[j,M]=q.useState(null),[N,P]=q.useState(null),F=Pn(n),[I,L]=q.useState(!1),R=q.useRef(!1);q.useEffect(()=>{if(E)return y(E)},[E]),_();let z=q.useCallback(e=>{let[t,...n]=F().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&O&&(O.scrollTop=0),n===r&&O&&(O.scrollTop=O.scrollHeight),n?.focus(),document.activeElement!==i))return},[F,O]),ee=q.useCallback(()=>z([j,E]),[z,j,E]);q.useEffect(()=>{I&&ee()},[I,ee]);let{onOpenChange:te,triggerPointerDownPosRef:ne}=T;q.useEffect(()=>{if(E){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(ne.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ne.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():E.contains(n.target)||te(!1),document.removeEventListener(`pointermove`,t),ne.current=null};return ne.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[E,te,ne]),q.useEffect(()=>{let e=()=>te(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[te]);let[re,ie]=Ir(e=>{let t=F().filter(e=>!e.disabled),n=Lr(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),ae=q.useCallback((e,t,n)=>{let r=!R.current&&!n;(T.value!==void 0&&T.value===t||r)&&(M(e),r&&(R.current=!0))},[T.value]),oe=q.useCallback(()=>E?.focus(),[E]),se=q.useCallback((e,t,n)=>{let r=!R.current&&!n;(T.value!==void 0&&T.value===t||r)&&P(e)},[T.value]),ce=r===`popper`?ar:rr,le=ce===ar?{side:l,sideOffset:d,align:f,alignOffset:p,arrowPadding:g,collisionBoundary:v,collisionPadding:b,sticky:x,hideWhenDetached:S,avoidCollisions:C}:{};return(0,J.jsx)(Qn,{scope:n,content:E,viewport:O,onViewportChange:k,itemRefCallback:ae,selectedItem:j,onItemLeave:oe,itemTextRefCallback:se,focusSelectedItem:ee,selectedItemText:N,position:r,isPositioned:I,searchRef:re,children:(0,J.jsx)(m,{as:er,allowPinchZoom:!0,children:(0,J.jsx)(o,{asChild:!0,trapped:T.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:a(i,e=>{T.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,J.jsx)(h,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:(0,J.jsx)(ce,{role:`listbox`,id:T.contentId,"data-state":T.open?`open`:`closed`,dir:T.dir,onContextMenu:e=>e.preventDefault(),...w,...le,onPlaced:()=>L(!0),ref:A,style:{display:`flex`,flexDirection:`column`,outline:`none`,...w.style},onKeyDown:a(w.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ie(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=F().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>z(t)),e.preventDefault()}})})})})})})});tr.displayName=$n;var nr=`SelectItemAlignedPosition`,rr=q.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=X(Z,n),o=$(Z,n),[c,l]=q.useState(null),[d,f]=q.useState(null),p=u(t,e=>f(e)),m=Pn(n),h=q.useRef(!1),_=q.useRef(!0),{viewport:v,selectedItem:y,selectedItemText:b,focusSelectedItem:x}=o,S=q.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&d&&v&&y&&b){let e=a.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=b.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-Q,d=Sn(a,[Q,Math.max(Q,u-l)]);c.style.minWidth=s+`px`,c.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-Q,d=Sn(a,[Q,Math.max(Q,u-l)]);c.style.minWidth=s+`px`,c.style.right=d+`px`}let o=m(),s=window.innerHeight-Q*2,l=v.scrollHeight,u=window.getComputedStyle(d),f=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),g=parseInt(u.borderBottomWidth,10),_=parseInt(u.paddingBottom,10),x=f+p+l+_+g,S=Math.min(y.offsetHeight*5,x),C=window.getComputedStyle(v),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Q,D=s-E,O=y.offsetHeight/2,k=y.offsetTop+O,A=f+p+k,j=x-A;if(A<=E){let e=o.length>0&&y===o[o.length-1].ref.current;c.style.bottom=`0px`;let t=d.clientHeight-v.offsetTop-v.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+g);c.style.height=n+`px`}else{let e=o.length>0&&y===o[0].ref.current;c.style.top=`0px`;let t=Math.max(E,f+v.offsetTop+(e?w:0)+O)+j;c.style.height=t+`px`,v.scrollTop=A-E+v.offsetTop}c.style.margin=`${Q}px 0`,c.style.minHeight=S+`px`,c.style.maxHeight=s+`px`,r?.(),requestAnimationFrame(()=>h.current=!0)}},[m,a.trigger,a.valueNode,c,d,v,y,b,a.dir,r]);g(()=>S(),[S]);let[C,w]=q.useState();return g(()=>{d&&w(window.getComputedStyle(d).zIndex)},[d]),(0,J.jsx)(or,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:h,onScrollButtonChange:q.useCallback(e=>{e&&_.current===!0&&(S(),x?.(),_.current=!1)},[S,x]),children:(0,J.jsx)(`div`,{ref:l,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:C},children:(0,J.jsx)(s.div,{...i,ref:p,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});rr.displayName=nr;var ir=`SelectPopperPosition`,ar=q.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Q,...a}=e,o=Rn(n);return(0,J.jsx)(bn,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});ar.displayName=ir;var[or,sr]=In(Z,{}),cr=`SelectViewport`,lr=q.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,o=$(cr,n),c=sr(cr,n),l=u(t,o.onViewportChange),d=q.useRef(0);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,J.jsx)(Nn.Slot,{scope:n,children:(0,J.jsx)(s.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:l,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:a(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=c;if(r?.current&&n){let e=Math.abs(d.current-t.scrollTop);if(e>0){let r=window.innerHeight-Q*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}d.current=t.scrollTop})})})]})});lr.displayName=cr;var ur=`SelectGroup`,[dr,fr]=In(ur),pr=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=l();return(0,J.jsx)(dr,{scope:n,id:i,children:(0,J.jsx)(s.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});pr.displayName=ur;var mr=`SelectLabel`,hr=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=fr(mr,n);return(0,J.jsx)(s.div,{id:i.id,...r,ref:t})});hr.displayName=mr;var gr=`SelectItem`,[_r,vr]=In(gr),yr=q.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...c}=e,d=X(gr,n),f=$(gr,n),p=d.value===r,[m,h]=q.useState(o??``),[g,_]=q.useState(!1),v=u(t,e=>f.itemRefCallback?.(e,r,i)),y=l(),b=q.useRef(`touch`),x=()=>{i||(d.onValueChange(r),d.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,J.jsx)(_r,{scope:n,value:r,disabled:i,textId:y,isSelected:p,onItemTextChange:q.useCallback(e=>{h(t=>t||(e?.textContent??``).trim())},[]),children:(0,J.jsx)(Nn.ItemSlot,{scope:n,value:r,disabled:i,textValue:m,children:(0,J.jsx)(s.div,{role:`option`,"aria-labelledby":y,"data-highlighted":g?``:void 0,"aria-selected":p&&g,"data-state":p?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...c,ref:v,onFocus:a(c.onFocus,()=>_(!0)),onBlur:a(c.onBlur,()=>_(!1)),onClick:a(c.onClick,()=>{b.current!==`mouse`&&x()}),onPointerUp:a(c.onPointerUp,()=>{b.current===`mouse`&&x()}),onPointerDown:a(c.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:a(c.onPointerMove,e=>{b.current=e.pointerType,i?f.onItemLeave?.():b.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:a(c.onPointerLeave,e=>{e.currentTarget===document.activeElement&&f.onItemLeave?.()}),onKeyDown:a(c.onKeyDown,e=>{f.searchRef?.current!==``&&e.key===` `||(Mn.includes(e.key)&&x(),e.key===` `&&e.preventDefault())})})})})});yr.displayName=gr;var br=`SelectItemText`,xr=q.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=X(br,n),c=$(br,n),l=vr(br,n),d=Vn(br,n),[f,p]=q.useState(null),m=u(t,e=>p(e),l.onItemTextChange,e=>c.itemTextRefCallback?.(e,l.value,l.disabled)),h=f?.textContent,_=q.useMemo(()=>(0,J.jsx)(`option`,{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=d;return g(()=>(v(_),()=>y(_)),[v,y,_]),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(s.span,{id:l.textId,...a,ref:m}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Pt.createPortal(a.children,o.valueNode):null]})});xr.displayName=br;var Sr=`SelectItemIndicator`,Cr=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return vr(Sr,n).isSelected?(0,J.jsx)(s.span,{"aria-hidden":!0,...r,ref:t}):null});Cr.displayName=Sr;var wr=`SelectScrollUpButton`,Tr=q.forwardRef((e,t)=>{let n=$(wr,e.__scopeSelect),r=sr(wr,e.__scopeSelect),[i,a]=q.useState(!1),o=u(t,r.onScrollButtonChange);return g(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,J.jsx)(Or,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Tr.displayName=wr;var Er=`SelectScrollDownButton`,Dr=q.forwardRef((e,t)=>{let n=$(Er,e.__scopeSelect),r=sr(Er,e.__scopeSelect),[i,a]=q.useState(!1),o=u(t,r.onScrollButtonChange);return g(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,J.jsx)(Or,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});Dr.displayName=Er;var Or=q.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,o=$(`SelectScrollButton`,n),c=q.useRef(null),l=Pn(n),u=q.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return q.useEffect(()=>()=>u(),[u]),g(()=>{l().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[l]),(0,J.jsx)(s.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:a(i.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(r,50))}),onPointerMove:a(i.onPointerMove,()=>{o.onItemLeave?.(),c.current===null&&(c.current=window.setInterval(r,50))}),onPointerLeave:a(i.onPointerLeave,()=>{u()})})}),kr=`SelectSeparator`,Ar=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,J.jsx)(s.div,{"aria-hidden":!0,...r,ref:t})});Ar.displayName=kr;var jr=`SelectArrow`,Mr=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Rn(n),a=X(jr,n),o=$(jr,n);return a.open&&o.position===`popper`?(0,J.jsx)(xn,{...i,...r,ref:t}):null});Mr.displayName=jr;var Nr=`SelectBubbleInput`,Pr=q.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=q.useRef(null),a=u(r,i),o=En(t);return q.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,J.jsx)(s.select,{...n,style:{...Dn,...n.style},ref:a,defaultValue:t})});Pr.displayName=Nr;function Fr(e){return e===``||e===void 0}function Ir(e){let t=v(e),n=q.useRef(``),r=q.useRef(0),i=q.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=q.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return q.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function Lr(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Rr(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Rr(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var zr=Hn,Br=Wn,Vr=Kn,Hr=Jn,Ur=Xn,Wr=Zn,Gr=lr,Kr=pr,qr=hr,Jr=yr,Yr=xr,Xr=Cr,Zr=Tr,Qr=Dr,$r=Ar,ei=zr,ti=Vr,ni=q.forwardRef(({className:e,children:t,indicator:n,...i},a)=>(0,J.jsxs)(Br,{ref:a,className:r(`flex h-9 w-full items-center justify-between whitespace-nowrap rounded-xl border border-gray-200/80 bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary/40 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 bg-white`,e),...i,children:[t,(0,J.jsx)(Hr,{asChild:!0,children:n??(0,J.jsx)(S,{className:`h-4 w-4 opacity-50`})})]}));ni.displayName=Br.displayName;var ri=q.forwardRef(({className:e,...t},n)=>(0,J.jsx)(Zr,{ref:n,className:r(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,J.jsx)(C,{className:`h-4 w-4`})}));ri.displayName=Zr.displayName;var ii=q.forwardRef(({className:e,...t},n)=>(0,J.jsx)(Qr,{ref:n,className:r(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,J.jsx)(S,{className:`h-4 w-4`})}));ii.displayName=Qr.displayName;var ai=q.forwardRef(({className:e,children:t,position:n=`popper`,viewportClassName:i,...a},o)=>(0,J.jsx)(Ur,{children:(0,J.jsxs)(Wr,{ref:o,className:r(`relative z-[var(--z-popover,50)] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-white`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,...a,children:[(0,J.jsx)(ri,{}),(0,J.jsx)(Gr,{className:r(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]`,i),children:t}),(0,J.jsx)(ii,{})]})}));ai.displayName=Wr.displayName;var oi=q.forwardRef(({className:e,...t},n)=>(0,J.jsx)(qr,{ref:n,className:r(`px-2 py-1.5 text-sm font-semibold`,e),...t}));oi.displayName=qr.displayName;var si=q.forwardRef(({className:e,children:t,...n},i)=>(0,J.jsxs)(Jr,{ref:i,className:r(`relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-gray-100 focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 hover:bg-gray-100`,e),...n,children:[(0,J.jsx)(`span`,{className:`absolute right-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,J.jsx)(Xr,{children:(0,J.jsx)(x,{className:`h-4 w-4`})})}),(0,J.jsx)(Yr,{children:t})]}));si.displayName=Jr.displayName;var ci=q.forwardRef(({className:e,...t},n)=>(0,J.jsx)($r,{ref:n,className:r(`-mx-1 my-1 h-px bg-muted`,e),...t}));ci.displayName=$r.displayName;export{xn as C,C as D,tn as E,S as O,yn as S,vn as T,$r as _,ti as a,Gr as b,Hr as c,Yr as d,qr as f,Zr as g,Qr as h,ni as i,x as k,Jr as l,zr as m,ai as n,Wr as o,Ur as p,si as r,Kr as s,ei as t,Xr as u,Br as v,bn as w,An as x,Vr as y};
1
+ import{_ as e,m as t,p as n,u as r}from"./i18n-D1144VAA.js";import{on as i}from"./api-CKKNxbsy.js";import{_ as a,a as o,c as s,d as c,f as l,g as u,h as d,i as f,l as p,n as m,o as h,p as g,r as _,s as v,t as y}from"./es2015-ZJ-nWL4L.js";import{t as b}from"./createLucideIcon-DzY6wN61.js";var x=b(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),S=b(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),C=b(`ChevronUp`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),w=[`top`,`right`,`bottom`,`left`],T=Math.min,E=Math.max,D=Math.round,O=Math.floor,k=e=>({x:e,y:e}),A={left:`right`,right:`left`,bottom:`top`,top:`bottom`},j={start:`end`,end:`start`};function M(e,t,n){return E(e,T(t,n))}function N(e,t){return typeof e==`function`?e(t):e}function P(e){return e.split(`-`)[0]}function F(e){return e.split(`-`)[1]}function I(e){return e===`x`?`y`:`x`}function L(e){return e===`y`?`height`:`width`}var R=new Set([`top`,`bottom`]);function z(e){return R.has(P(e))?`y`:`x`}function ee(e){return I(z(e))}function te(e,t,n){n===void 0&&(n=!1);let r=F(e),i=ee(e),a=L(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ue(o)),[o,ue(o)]}function ne(e){let t=ue(e);return[re(e),t,re(t)]}function re(e){return e.replace(/start|end/g,e=>j[e])}var ie=[`left`,`right`],ae=[`right`,`left`],oe=[`top`,`bottom`],se=[`bottom`,`top`];function ce(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ae:ie:t?ie:ae;case`left`:case`right`:return t?oe:se;default:return[]}}function le(e,t,n,r){let i=F(e),a=ce(P(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(re)))),a}function ue(e){return e.replace(/left|right|bottom|top/g,e=>A[e])}function de(e){return{top:0,right:0,bottom:0,left:0,...e}}function fe(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:de(e)}function pe(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function me(e,t,n){let{reference:r,floating:i}=e,a=z(t),o=ee(t),s=L(o),c=P(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(F(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function he(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=N(t,e),p=fe(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=pe(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=pe(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ge=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=me(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:{...o,detectOverflow:o.detectOverflow??he},elements:{reference:e,floating:t}});u=g??u,d=_??d,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=me(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}},_e=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=N(e,t)||{};if(l==null)return{};let d=fe(u),f={x:n,y:r},p=ee(i),m=L(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,E=C/2-h[m]/2-1,D=T(d[_],E),O=T(d[v],E),k=D,A=C-h[m]-O,j=C/2-h[m]/2+w,P=M(k,j,A),I=!c.arrow&&F(i)!=null&&j!==P&&a.reference[m]/2-(j<k?D:O)-h[m]/2<0,R=I?j<k?j-k:j-A:0;return{[p]:f[p]+R,data:{[p]:P,centerOffset:j-P-R,...I&&{alignmentOffset:R}},reset:I}}}),ve=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=N(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=P(r),_=z(o),v=P(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[ue(o)]:ne(o)),x=p!==`none`;!d&&x&&b.push(...le(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=te(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==z(t))||T.every(e=>z(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=z(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function ye(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function be(e){return w.some(t=>e[t]>=0)}var xe=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=N(e,t);switch(i){case`referenceHidden`:{let e=ye(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:be(e)}}}case`escaped`:{let e=ye(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:be(e)}}}default:return{}}}}},Se=new Set([`left`,`top`]);async function Ce(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=P(n),s=F(n),c=z(n)===`y`,l=Se.has(o)?-1:1,u=a&&c?-1:1,d=N(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var we=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Ce(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Te=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=N(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=z(P(i)),p=I(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=M(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=M(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Ee=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=N(e,t),u={x:n,y:r},d=z(i),f=I(d),p=u[f],m=u[d],h=N(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Se.has(P(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},De=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=N(e,t),u=await o.detectOverflow(t,l),d=P(i),f=F(i),p=z(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=T(h-u[g],v),x=T(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=E(u.left,0),t=E(u.right,0),n=E(u.top,0),r=E(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:E(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:E(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let D=await o.getDimensions(s.floating);return m!==D.width||h!==D.height?{reset:{rects:!0}}:{}}}};function Oe(){return typeof window<`u`}function ke(e){return Ae(e)?(e.nodeName||``).toLowerCase():`#document`}function B(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function V(e){return((Ae(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Ae(e){return Oe()?e instanceof Node||e instanceof B(e).Node:!1}function H(e){return Oe()?e instanceof Element||e instanceof B(e).Element:!1}function U(e){return Oe()?e instanceof HTMLElement||e instanceof B(e).HTMLElement:!1}function je(e){return!Oe()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof B(e).ShadowRoot}var Me=new Set([`inline`,`contents`]);function Ne(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=W(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Me.has(i)}var Pe=new Set([`table`,`td`,`th`]);function Fe(e){return Pe.has(ke(e))}var Ie=[`:popover-open`,`:modal`];function Le(e){return Ie.some(t=>{try{return e.matches(t)}catch{return!1}})}var Re=[`transform`,`translate`,`scale`,`rotate`,`perspective`],ze=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],Be=[`paint`,`layout`,`strict`,`content`];function Ve(e){let t=Ue(),n=H(e)?W(e):e;return Re.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||ze.some(e=>(n.willChange||``).includes(e))||Be.some(e=>(n.contain||``).includes(e))}function He(e){let t=G(e);for(;U(t)&&!Ge(t);){if(Ve(t))return t;if(Le(t))return null;t=G(t)}return null}function Ue(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var We=new Set([`html`,`body`,`#document`]);function Ge(e){return We.has(ke(e))}function W(e){return B(e).getComputedStyle(e)}function Ke(e){return H(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function G(e){if(ke(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||je(e)&&e.host||V(e);return je(t)?t.host:t}function qe(e){let t=G(e);return Ge(t)?e.ownerDocument?e.ownerDocument.body:e.body:U(t)&&Ne(t)?t:qe(t)}function Je(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=qe(e),i=r===e.ownerDocument?.body,a=B(r);if(i){let e=Ye(a);return t.concat(a,a.visualViewport||[],Ne(r)?r:[],e&&n?Je(e):[])}return t.concat(r,Je(r,[],n))}function Ye(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xe(e){let t=W(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=U(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=D(n)!==a||D(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ze(e){return H(e)?e:e.contextElement}function Qe(e){let t=Ze(e);if(!U(t))return k(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Xe(t),o=(a?D(n.width):n.width)/r,s=(a?D(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var $e=k(0);function et(e){let t=B(e);return!Ue()||!t.visualViewport?$e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tt(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==B(e)?!1:t}function K(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ze(e),o=k(1);t&&(r?H(r)&&(o=Qe(r)):o=Qe(e));let s=tt(a,n,r)?et(a):k(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=B(a),t=r&&H(r)?B(r):r,n=e,i=Ye(n);for(;i&&r&&t!==n;){let e=Qe(i),t=i.getBoundingClientRect(),r=W(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=B(i),i=Ye(n)}}return pe({width:u,height:d,x:c,y:l})}function nt(e,t){let n=Ke(e).scrollLeft;return t?t.left+n:K(V(e)).left+n}function rt(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-nt(e,n),y:n.top+t.scrollTop}}function it(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=V(r),s=t?Le(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=k(1),u=k(0),d=U(r);if((d||!d&&!a)&&((ke(r)!==`body`||Ne(o))&&(c=Ke(r)),U(r))){let e=K(r);l=Qe(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?rt(o,c):k(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function at(e){return Array.from(e.getClientRects())}function ot(e){let t=V(e),n=Ke(e),r=e.ownerDocument.body,i=E(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=E(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+nt(e),s=-n.scrollTop;return W(r).direction===`rtl`&&(o+=E(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var st=25;function ct(e,t){let n=B(e),r=V(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Ue();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=nt(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=st&&(a-=o)}else l<=st&&(a+=l);return{width:a,height:o,x:s,y:c}}var lt=new Set([`absolute`,`fixed`]);function ut(e,t){let n=K(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=U(e)?Qe(e):k(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function dt(e,t,n){let r;if(t===`viewport`)r=ct(e,n);else if(t===`document`)r=ot(V(e));else if(H(t))r=ut(t,n);else{let n=et(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return pe(r)}function ft(e,t){let n=G(e);return n===t||!H(n)||Ge(n)?!1:W(n).position===`fixed`||ft(n,t)}function pt(e,t){let n=t.get(e);if(n)return n;let r=Je(e,[],!1).filter(e=>H(e)&&ke(e)!==`body`),i=null,a=W(e).position===`fixed`,o=a?G(e):e;for(;H(o)&&!Ge(o);){let t=W(o),n=Ve(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&lt.has(i.position)||Ne(o)&&!n&&ft(e,o))?r=r.filter(e=>e!==o):i=t,o=G(o)}return t.set(e,r),r}function mt(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Le(t)?[]:pt(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=dt(t,n,i);return e.top=E(r.top,e.top),e.right=T(r.right,e.right),e.bottom=T(r.bottom,e.bottom),e.left=E(r.left,e.left),e},dt(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function ht(e){let{width:t,height:n}=Xe(e);return{width:t,height:n}}function gt(e,t,n){let r=U(t),i=V(t),a=n===`fixed`,o=K(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=k(0);function l(){c.x=nt(i)}if(r||!r&&!a)if((ke(t)!==`body`||Ne(i))&&(s=Ke(t)),r){let e=K(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?rt(i,s):k(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function _t(e){return W(e).position===`static`}function vt(e,t){if(!U(e)||W(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return V(e)===n&&(n=n.ownerDocument.body),n}function yt(e,t){let n=B(e);if(Le(e))return n;if(!U(e)){let t=G(e);for(;t&&!Ge(t);){if(H(t)&&!_t(t))return t;t=G(t)}return n}let r=vt(e,t);for(;r&&Fe(r)&&_t(r);)r=vt(r,t);return r&&Ge(r)&&_t(r)&&!Ve(r)?n:r||He(e)||n}var bt=async function(e){let t=this.getOffsetParent||yt,n=this.getDimensions,r=await n(e.floating);return{reference:gt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function xt(e){return W(e).direction===`rtl`}var St={convertOffsetParentRelativeRectToViewportRelativeRect:it,getDocumentElement:V,getClippingRect:mt,getOffsetParent:yt,getElementRects:bt,getClientRects:at,getDimensions:ht,getScale:Qe,isElement:H,isRTL:xt};function Ct(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function wt(e,t){let n=null,r,i=V(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=O(d),h=O(i.clientWidth-(u+f)),g=O(i.clientHeight-(d+p)),_=O(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:E(0,T(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Ct(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Tt(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ze(e),u=i||a?[...l?Je(l):[],...Je(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?wt(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?K(e):null;c&&g();function g(){let t=K(e);h&&!Ct(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Et=we,Dt=Te,Ot=ve,kt=De,At=xe,jt=_e,Mt=Ee,Nt=(e,t,n)=>{let r=new Map,i={platform:St,...n},a={...i.platform,_c:r};return ge(e,t,{...i,platform:a})},q=e(t(),1),Pt=e(i(),1),Ft=typeof document<`u`?q.useLayoutEffect:function(){};function It(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,i;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(!It(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!It(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Lt(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Rt(e,t){let n=Lt(e);return Math.round(t*n)/n}function zt(e){let t=q.useRef(e);return Ft(()=>{t.current=e}),t}function Bt(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=q.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=q.useState(r);It(f,r)||p(r);let[m,h]=q.useState(null),[g,_]=q.useState(null),v=q.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=q.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=q.useRef(null),C=q.useRef(null),w=q.useRef(u),T=c!=null,E=zt(c),D=zt(i),O=zt(l),k=q.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Nt(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!It(w.current,t)&&(w.current=t,Pt.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Ft(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=q.useRef(!1);Ft(()=>(A.current=!0,()=>{A.current=!1}),[]),Ft(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=q.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=q.useMemo(()=>({reference:b,floating:x}),[b,x]),N=q.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Rt(M.floating,u.x),r=Rt(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Lt(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return q.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var Vt=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:jt({element:r.current,padding:i}).fn(n):r?jt({element:r,padding:i}).fn(n):{}}}},Ht=(e,t)=>({...Et(e),options:[e,t]}),Ut=(e,t)=>({...Dt(e),options:[e,t]}),Wt=(e,t)=>({...Mt(e),options:[e,t]}),Gt=(e,t)=>({...Ot(e),options:[e,t]}),Kt=(e,t)=>({...kt(e),options:[e,t]}),qt=(e,t)=>({...At(e),options:[e,t]}),Jt=(e,t)=>({...Vt(e),options:[e,t]}),J=n(),Yt=`Arrow`,Xt=q.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,J.jsx)(s.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,J.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Xt.displayName=Yt;var Zt=Xt;function Qt(e){let[t,n]=q.useState(void 0);return g(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var $t=`Popper`,[en,tn]=d($t),[nn,rn]=en($t),an=e=>{let{__scopePopper:t,children:n}=e,[r,i]=q.useState(null);return(0,J.jsx)(nn,{scope:t,anchor:r,onAnchorChange:i,children:n})};an.displayName=$t;var on=`PopperAnchor`,sn=q.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=rn(on,n),o=q.useRef(null),c=u(t,o),l=q.useRef(null);return q.useEffect(()=>{let e=l.current;l.current=r?.current||o.current,e!==l.current&&a.onAnchorChange(l.current)}),r?null:(0,J.jsx)(s.div,{...i,ref:c})});sn.displayName=on;var cn=`PopperContent`,[ln,un]=en(cn),dn=q.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p=`partial`,hideWhenDetached:m=!1,updatePositionStrategy:h=`optimized`,onPlaced:_,...y}=e,b=rn(cn,n),[x,S]=q.useState(null),C=u(t,e=>S(e)),[w,T]=q.useState(null),E=Qt(w),D=E?.width??0,O=E?.height??0,k=r+(a===`center`?``:`-`+a),A=typeof f==`number`?f:{top:0,right:0,bottom:0,left:0,...f},j=Array.isArray(d)?d:[d],M=j.length>0,N={padding:A,boundary:j.filter(hn),altBoundary:M},{refs:P,floatingStyles:F,placement:I,isPositioned:L,middlewareData:R}=Bt({strategy:`fixed`,placement:k,whileElementsMounted:(...e)=>Tt(...e,{animationFrame:h===`always`}),elements:{reference:b.anchor},middleware:[Ht({mainAxis:i+O,alignmentAxis:o}),l&&Ut({mainAxis:!0,crossAxis:!1,limiter:p===`partial`?Wt():void 0,...N}),l&&Gt({...N}),Kt({...N,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),w&&Jt({element:w,padding:c}),gn({arrowWidth:D,arrowHeight:O}),m&&qt({strategy:`referenceHidden`,...N})]}),[z,ee]=_n(I),te=v(_);g(()=>{L&&te?.()},[L,te]);let ne=R.arrow?.x,re=R.arrow?.y,ie=R.arrow?.centerOffset!==0,[ae,oe]=q.useState();return g(()=>{x&&oe(window.getComputedStyle(x).zIndex)},[x]),(0,J.jsx)(`div`,{ref:P.setFloating,"data-radix-popper-content-wrapper":``,style:{...F,transform:L?F.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ae,"--radix-popper-transform-origin":[R.transformOrigin?.x,R.transformOrigin?.y].join(` `),...R.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,J.jsx)(ln,{scope:n,placedSide:z,onArrowChange:T,arrowX:ne,arrowY:re,shouldHideArrow:ie,children:(0,J.jsx)(s.div,{"data-side":z,"data-align":ee,...y,ref:C,style:{...y.style,animation:L?void 0:`none`}})})})});dn.displayName=cn;var fn=`PopperArrow`,pn={top:`bottom`,right:`left`,bottom:`top`,left:`right`},mn=q.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=un(fn,n),a=pn[i.placedSide];return(0,J.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,J.jsx)(Zt,{...r,ref:t,style:{...r.style,display:`block`}})})});mn.displayName=fn;function hn(e){return e!==null}var gn=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=_n(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function _n(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var vn=an,yn=sn,bn=dn,xn=mn;function Sn(e,[t,n]){return Math.min(n,Math.max(t,e))}function Cn(e){let t=e+`CollectionProvider`,[n,r]=d(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=q.useRef(null),a=q.useRef(new Map).current;return(0,J.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=p(s),l=q.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,J.jsx)(c,{ref:u(t,a(s,n).collectionRef),children:r})});l.displayName=s;let f=e+`CollectionItemSlot`,m=`data-radix-collection-item`,h=p(f),g=q.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=q.useRef(null),s=u(t,o),c=a(f,n);return q.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,J.jsx)(h,{[m]:``,ref:s,children:r})});g.displayName=f;function _(t){let n=a(e+`CollectionConsumer`,t);return q.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:g},_,r]}var wn=q.createContext(void 0);function Tn(e){let t=q.useContext(wn);return e||t||`ltr`}function En(e){let t=q.useRef({value:e,previous:e});return q.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Dn=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),On=`VisuallyHidden`,kn=q.forwardRef((e,t)=>(0,J.jsx)(s.span,{...e,ref:t,style:{...Dn,...e.style}}));kn.displayName=On;var An=kn,jn=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Mn=[` `,`Enter`],Y=`Select`,[Nn,Pn,Fn]=Cn(Y),[In,Ln]=d(Y,[Fn,tn]),Rn=tn(),[zn,X]=In(Y),[Bn,Vn]=In(Y),Hn=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:m,required:h,form:g}=e,_=Rn(t),[v,y]=q.useState(null),[b,x]=q.useState(null),[S,C]=q.useState(!1),w=Tn(d),[T,E]=c({prop:r,defaultProp:i??!1,onChange:a,caller:Y}),[D,O]=c({prop:o,defaultProp:s,onChange:u,caller:Y}),k=q.useRef(null),A=v?g||!!v.closest(`form`):!0,[j,M]=q.useState(new Set),N=Array.from(j).map(e=>e.props.value).join(`;`);return(0,J.jsx)(vn,{..._,children:(0,J.jsxs)(zn,{required:h,scope:t,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:l(),value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:m,children:[(0,J.jsx)(Nn.Provider,{scope:t,children:(0,J.jsx)(Bn,{scope:e.__scopeSelect,onNativeOptionAdd:q.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:q.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),A?(0,J.jsxs)(Pr,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:p,value:D,onChange:e=>O(e.target.value),disabled:m,form:g,children:[D===void 0?(0,J.jsx)(`option`,{value:``}):null,Array.from(j)]},N):null]})})};Hn.displayName=Y;var Un=`SelectTrigger`,Wn=q.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,o=Rn(n),c=X(Un,n),l=c.disabled||r,d=u(t,c.onTriggerChange),f=Pn(n),p=q.useRef(`touch`),[m,h,g]=Ir(e=>{let t=f().filter(e=>!e.disabled),n=Lr(t,e,t.find(e=>e.value===c.value));n!==void 0&&c.onValueChange(n.value)}),_=e=>{l||(c.onOpenChange(!0),g()),e&&(c.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,J.jsx)(yn,{asChild:!0,...o,children:(0,J.jsx)(s.button,{type:`button`,role:`combobox`,"aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":`none`,dir:c.dir,"data-state":c.open?`open`:`closed`,disabled:l,"data-disabled":l?``:void 0,"data-placeholder":Fr(c.value)?``:void 0,...i,ref:d,onClick:a(i.onClick,e=>{e.currentTarget.focus(),p.current!==`mouse`&&_(e)}),onPointerDown:a(i.onPointerDown,e=>{p.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(_(e),e.preventDefault())}),onKeyDown:a(i.onKeyDown,e=>{let t=m.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&h(e.key),!(t&&e.key===` `)&&jn.includes(e.key)&&(_(),e.preventDefault())})})})});Wn.displayName=Un;var Gn=`SelectValue`,Kn=q.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...c}=e,l=X(Gn,n),{onValueNodeHasChildrenChange:d}=l,f=a!==void 0,p=u(t,l.onValueNodeChange);return g(()=>{d(f)},[d,f]),(0,J.jsx)(s.span,{...c,ref:p,style:{pointerEvents:`none`},children:Fr(l.value)?(0,J.jsx)(J.Fragment,{children:o}):a})});Kn.displayName=Gn;var qn=`SelectIcon`,Jn=q.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,J.jsx)(s.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});Jn.displayName=qn;var Yn=`SelectPortal`,Xn=e=>(0,J.jsx)(f,{asChild:!0,...e});Xn.displayName=Yn;var Z=`SelectContent`,Zn=q.forwardRef((e,t)=>{let n=X(Z,e.__scopeSelect),[r,i]=q.useState();if(g(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?Pt.createPortal((0,J.jsx)(Qn,{scope:e.__scopeSelect,children:(0,J.jsx)(Nn.Slot,{scope:e.__scopeSelect,children:(0,J.jsx)(`div`,{children:e.children})})}),t):null}return(0,J.jsx)(tr,{...e,ref:t})});Zn.displayName=Z;var Q=10,[Qn,$]=In(Z),$n=`SelectContentImpl`,er=p(`SelectContent.RemoveScroll`),tr=q.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:c,side:l,sideOffset:d,align:f,alignOffset:p,arrowPadding:g,collisionBoundary:v,collisionPadding:b,sticky:x,hideWhenDetached:S,avoidCollisions:C,...w}=e,T=X(Z,n),[E,D]=q.useState(null),[O,k]=q.useState(null),A=u(t,e=>D(e)),[j,M]=q.useState(null),[N,P]=q.useState(null),F=Pn(n),[I,L]=q.useState(!1),R=q.useRef(!1);q.useEffect(()=>{if(E)return y(E)},[E]),_();let z=q.useCallback(e=>{let[t,...n]=F().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&O&&(O.scrollTop=0),n===r&&O&&(O.scrollTop=O.scrollHeight),n?.focus(),document.activeElement!==i))return},[F,O]),ee=q.useCallback(()=>z([j,E]),[z,j,E]);q.useEffect(()=>{I&&ee()},[I,ee]);let{onOpenChange:te,triggerPointerDownPosRef:ne}=T;q.useEffect(()=>{if(E){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(ne.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ne.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():E.contains(n.target)||te(!1),document.removeEventListener(`pointermove`,t),ne.current=null};return ne.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[E,te,ne]),q.useEffect(()=>{let e=()=>te(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[te]);let[re,ie]=Ir(e=>{let t=F().filter(e=>!e.disabled),n=Lr(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),ae=q.useCallback((e,t,n)=>{let r=!R.current&&!n;(T.value!==void 0&&T.value===t||r)&&(M(e),r&&(R.current=!0))},[T.value]),oe=q.useCallback(()=>E?.focus(),[E]),se=q.useCallback((e,t,n)=>{let r=!R.current&&!n;(T.value!==void 0&&T.value===t||r)&&P(e)},[T.value]),ce=r===`popper`?ar:rr,le=ce===ar?{side:l,sideOffset:d,align:f,alignOffset:p,arrowPadding:g,collisionBoundary:v,collisionPadding:b,sticky:x,hideWhenDetached:S,avoidCollisions:C}:{};return(0,J.jsx)(Qn,{scope:n,content:E,viewport:O,onViewportChange:k,itemRefCallback:ae,selectedItem:j,onItemLeave:oe,itemTextRefCallback:se,focusSelectedItem:ee,selectedItemText:N,position:r,isPositioned:I,searchRef:re,children:(0,J.jsx)(m,{as:er,allowPinchZoom:!0,children:(0,J.jsx)(o,{asChild:!0,trapped:T.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:a(i,e=>{T.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,J.jsx)(h,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:(0,J.jsx)(ce,{role:`listbox`,id:T.contentId,"data-state":T.open?`open`:`closed`,dir:T.dir,onContextMenu:e=>e.preventDefault(),...w,...le,onPlaced:()=>L(!0),ref:A,style:{display:`flex`,flexDirection:`column`,outline:`none`,...w.style},onKeyDown:a(w.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ie(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=F().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>z(t)),e.preventDefault()}})})})})})})});tr.displayName=$n;var nr=`SelectItemAlignedPosition`,rr=q.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=X(Z,n),o=$(Z,n),[c,l]=q.useState(null),[d,f]=q.useState(null),p=u(t,e=>f(e)),m=Pn(n),h=q.useRef(!1),_=q.useRef(!0),{viewport:v,selectedItem:y,selectedItemText:b,focusSelectedItem:x}=o,S=q.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&d&&v&&y&&b){let e=a.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=b.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-Q,d=Sn(a,[Q,Math.max(Q,u-l)]);c.style.minWidth=s+`px`,c.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-Q,d=Sn(a,[Q,Math.max(Q,u-l)]);c.style.minWidth=s+`px`,c.style.right=d+`px`}let o=m(),s=window.innerHeight-Q*2,l=v.scrollHeight,u=window.getComputedStyle(d),f=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),g=parseInt(u.borderBottomWidth,10),_=parseInt(u.paddingBottom,10),x=f+p+l+_+g,S=Math.min(y.offsetHeight*5,x),C=window.getComputedStyle(v),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Q,D=s-E,O=y.offsetHeight/2,k=y.offsetTop+O,A=f+p+k,j=x-A;if(A<=E){let e=o.length>0&&y===o[o.length-1].ref.current;c.style.bottom=`0px`;let t=d.clientHeight-v.offsetTop-v.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+g);c.style.height=n+`px`}else{let e=o.length>0&&y===o[0].ref.current;c.style.top=`0px`;let t=Math.max(E,f+v.offsetTop+(e?w:0)+O)+j;c.style.height=t+`px`,v.scrollTop=A-E+v.offsetTop}c.style.margin=`${Q}px 0`,c.style.minHeight=S+`px`,c.style.maxHeight=s+`px`,r?.(),requestAnimationFrame(()=>h.current=!0)}},[m,a.trigger,a.valueNode,c,d,v,y,b,a.dir,r]);g(()=>S(),[S]);let[C,w]=q.useState();return g(()=>{d&&w(window.getComputedStyle(d).zIndex)},[d]),(0,J.jsx)(or,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:h,onScrollButtonChange:q.useCallback(e=>{e&&_.current===!0&&(S(),x?.(),_.current=!1)},[S,x]),children:(0,J.jsx)(`div`,{ref:l,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:C},children:(0,J.jsx)(s.div,{...i,ref:p,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});rr.displayName=nr;var ir=`SelectPopperPosition`,ar=q.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Q,...a}=e,o=Rn(n);return(0,J.jsx)(bn,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});ar.displayName=ir;var[or,sr]=In(Z,{}),cr=`SelectViewport`,lr=q.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,o=$(cr,n),c=sr(cr,n),l=u(t,o.onViewportChange),d=q.useRef(0);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,J.jsx)(Nn.Slot,{scope:n,children:(0,J.jsx)(s.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:l,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:a(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=c;if(r?.current&&n){let e=Math.abs(d.current-t.scrollTop);if(e>0){let r=window.innerHeight-Q*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}d.current=t.scrollTop})})})]})});lr.displayName=cr;var ur=`SelectGroup`,[dr,fr]=In(ur),pr=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=l();return(0,J.jsx)(dr,{scope:n,id:i,children:(0,J.jsx)(s.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});pr.displayName=ur;var mr=`SelectLabel`,hr=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=fr(mr,n);return(0,J.jsx)(s.div,{id:i.id,...r,ref:t})});hr.displayName=mr;var gr=`SelectItem`,[_r,vr]=In(gr),yr=q.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...c}=e,d=X(gr,n),f=$(gr,n),p=d.value===r,[m,h]=q.useState(o??``),[g,_]=q.useState(!1),v=u(t,e=>f.itemRefCallback?.(e,r,i)),y=l(),b=q.useRef(`touch`),x=()=>{i||(d.onValueChange(r),d.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,J.jsx)(_r,{scope:n,value:r,disabled:i,textId:y,isSelected:p,onItemTextChange:q.useCallback(e=>{h(t=>t||(e?.textContent??``).trim())},[]),children:(0,J.jsx)(Nn.ItemSlot,{scope:n,value:r,disabled:i,textValue:m,children:(0,J.jsx)(s.div,{role:`option`,"aria-labelledby":y,"data-highlighted":g?``:void 0,"aria-selected":p&&g,"data-state":p?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...c,ref:v,onFocus:a(c.onFocus,()=>_(!0)),onBlur:a(c.onBlur,()=>_(!1)),onClick:a(c.onClick,()=>{b.current!==`mouse`&&x()}),onPointerUp:a(c.onPointerUp,()=>{b.current===`mouse`&&x()}),onPointerDown:a(c.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:a(c.onPointerMove,e=>{b.current=e.pointerType,i?f.onItemLeave?.():b.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:a(c.onPointerLeave,e=>{e.currentTarget===document.activeElement&&f.onItemLeave?.()}),onKeyDown:a(c.onKeyDown,e=>{f.searchRef?.current!==``&&e.key===` `||(Mn.includes(e.key)&&x(),e.key===` `&&e.preventDefault())})})})})});yr.displayName=gr;var br=`SelectItemText`,xr=q.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=X(br,n),c=$(br,n),l=vr(br,n),d=Vn(br,n),[f,p]=q.useState(null),m=u(t,e=>p(e),l.onItemTextChange,e=>c.itemTextRefCallback?.(e,l.value,l.disabled)),h=f?.textContent,_=q.useMemo(()=>(0,J.jsx)(`option`,{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=d;return g(()=>(v(_),()=>y(_)),[v,y,_]),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(s.span,{id:l.textId,...a,ref:m}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Pt.createPortal(a.children,o.valueNode):null]})});xr.displayName=br;var Sr=`SelectItemIndicator`,Cr=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return vr(Sr,n).isSelected?(0,J.jsx)(s.span,{"aria-hidden":!0,...r,ref:t}):null});Cr.displayName=Sr;var wr=`SelectScrollUpButton`,Tr=q.forwardRef((e,t)=>{let n=$(wr,e.__scopeSelect),r=sr(wr,e.__scopeSelect),[i,a]=q.useState(!1),o=u(t,r.onScrollButtonChange);return g(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,J.jsx)(Or,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Tr.displayName=wr;var Er=`SelectScrollDownButton`,Dr=q.forwardRef((e,t)=>{let n=$(Er,e.__scopeSelect),r=sr(Er,e.__scopeSelect),[i,a]=q.useState(!1),o=u(t,r.onScrollButtonChange);return g(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,J.jsx)(Or,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});Dr.displayName=Er;var Or=q.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,o=$(`SelectScrollButton`,n),c=q.useRef(null),l=Pn(n),u=q.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return q.useEffect(()=>()=>u(),[u]),g(()=>{l().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[l]),(0,J.jsx)(s.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:a(i.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(r,50))}),onPointerMove:a(i.onPointerMove,()=>{o.onItemLeave?.(),c.current===null&&(c.current=window.setInterval(r,50))}),onPointerLeave:a(i.onPointerLeave,()=>{u()})})}),kr=`SelectSeparator`,Ar=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,J.jsx)(s.div,{"aria-hidden":!0,...r,ref:t})});Ar.displayName=kr;var jr=`SelectArrow`,Mr=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Rn(n),a=X(jr,n),o=$(jr,n);return a.open&&o.position===`popper`?(0,J.jsx)(xn,{...i,...r,ref:t}):null});Mr.displayName=jr;var Nr=`SelectBubbleInput`,Pr=q.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=q.useRef(null),a=u(r,i),o=En(t);return q.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,J.jsx)(s.select,{...n,style:{...Dn,...n.style},ref:a,defaultValue:t})});Pr.displayName=Nr;function Fr(e){return e===``||e===void 0}function Ir(e){let t=v(e),n=q.useRef(``),r=q.useRef(0),i=q.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=q.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return q.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function Lr(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Rr(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Rr(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var zr=Hn,Br=Wn,Vr=Kn,Hr=Jn,Ur=Xn,Wr=Zn,Gr=lr,Kr=pr,qr=hr,Jr=yr,Yr=xr,Xr=Cr,Zr=Tr,Qr=Dr,$r=Ar,ei=zr,ti=Vr,ni=q.forwardRef(({className:e,children:t,indicator:n,...i},a)=>(0,J.jsxs)(Br,{ref:a,className:r(`flex h-9 w-full items-center justify-between whitespace-nowrap rounded-xl border border-gray-200/80 bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary/40 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 bg-white`,e),...i,children:[t,(0,J.jsx)(Hr,{asChild:!0,children:n??(0,J.jsx)(S,{className:`h-4 w-4 opacity-50`})})]}));ni.displayName=Br.displayName;var ri=q.forwardRef(({className:e,...t},n)=>(0,J.jsx)(Zr,{ref:n,className:r(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,J.jsx)(C,{className:`h-4 w-4`})}));ri.displayName=Zr.displayName;var ii=q.forwardRef(({className:e,...t},n)=>(0,J.jsx)(Qr,{ref:n,className:r(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,J.jsx)(S,{className:`h-4 w-4`})}));ii.displayName=Qr.displayName;var ai=q.forwardRef(({className:e,children:t,position:n=`popper`,viewportClassName:i,...a},o)=>(0,J.jsx)(Ur,{children:(0,J.jsxs)(Wr,{ref:o,className:r(`relative z-[var(--z-popover,50)] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-white`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,...a,children:[(0,J.jsx)(ri,{}),(0,J.jsx)(Gr,{className:r(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]`,i),children:t}),(0,J.jsx)(ii,{})]})}));ai.displayName=Wr.displayName;var oi=q.forwardRef(({className:e,...t},n)=>(0,J.jsx)(qr,{ref:n,className:r(`px-2 py-1.5 text-sm font-semibold`,e),...t}));oi.displayName=qr.displayName;var si=q.forwardRef(({className:e,children:t,...n},i)=>(0,J.jsxs)(Jr,{ref:i,className:r(`relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-gray-100 focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 hover:bg-gray-100`,e),...n,children:[(0,J.jsx)(`span`,{className:`absolute right-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,J.jsx)(Xr,{children:(0,J.jsx)(x,{className:`h-4 w-4`})})}),(0,J.jsx)(Yr,{children:t})]}));si.displayName=Jr.displayName;var ci=q.forwardRef(({className:e,...t},n)=>(0,J.jsx)($r,{ref:n,className:r(`-mx-1 my-1 h-px bg-muted`,e),...t}));ci.displayName=$r.displayName;export{xn as C,C as D,tn as E,S as O,yn as S,vn as T,$r as _,ti as a,Gr as b,Hr as c,Yr as d,qr as f,Zr as g,Qr as h,ni as i,x as k,Jr as l,zr as m,ai as n,Wr as o,Ur as p,si as r,Kr as s,ei as t,Xr as u,Br as v,bn as w,An as x,Vr as y};
@@ -1 +1 @@
1
- import{_ as e,m as t,p as n,u as r}from"./i18n-D1144VAA.js";import{Pt as i}from"./api-DGD9_Bg4.js";var a=e(t(),1),o=n(),s=i(`flex items-start justify-between gap-4 rounded-xl border p-4`,{variants:{tone:{default:`border-gray-200 bg-white`,muted:`border-gray-200 bg-gray-50`}},defaultVariants:{tone:`default`}}),c=a.forwardRef(({className:e,tone:t,title:n,description:i,control:a,children:c,...l},u)=>(0,o.jsxs)(`div`,{ref:u,className:r(s({tone:t}),e),...l,children:[(0,o.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2`,children:[(0,o.jsx)(`div`,{className:`text-sm font-medium text-gray-900`,children:n}),i?(0,o.jsx)(`p`,{className:`text-sm leading-6 text-gray-500`,children:i}):null,c]}),a?(0,o.jsx)(`div`,{className:`shrink-0`,children:a}):null]}));c.displayName=`SettingRow`;export{c as t};
1
+ import{_ as e,m as t,p as n,u as r}from"./i18n-D1144VAA.js";import{Pt as i}from"./api-CKKNxbsy.js";var a=e(t(),1),o=n(),s=i(`flex items-start justify-between gap-4 rounded-xl border p-4`,{variants:{tone:{default:`border-gray-200 bg-white`,muted:`border-gray-200 bg-gray-50`}},defaultVariants:{tone:`default`}}),c=a.forwardRef(({className:e,tone:t,title:n,description:i,control:a,children:c,...l},u)=>(0,o.jsxs)(`div`,{ref:u,className:r(s({tone:t}),e),...l,children:[(0,o.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2`,children:[(0,o.jsx)(`div`,{className:`text-sm font-medium text-gray-900`,children:n}),i?(0,o.jsx)(`p`,{className:`text-sm leading-6 text-gray-500`,children:i}):null,c]}),a?(0,o.jsx)(`div`,{className:`shrink-0`,children:a}):null]}));c.displayName=`SettingRow`;export{c as t};
@@ -1 +1 @@
1
- import{_ as e,m as t,p as n,u as r}from"./i18n-D1144VAA.js";import{Pt as i}from"./api-DGD9_Bg4.js";var a=e(t(),1),o=n(),s=i(`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] font-medium`,{variants:{tone:{subtle:`border-gray-200 bg-gray-50 text-gray-600`,neutral:`border-gray-200 bg-white text-gray-600`,success:`border-emerald-200 bg-emerald-50 text-emerald-700`,warning:`border-amber-200 bg-amber-50 text-amber-800`,danger:`border-rose-200 bg-rose-50 text-rose-600`,info:`border-primary/20 bg-primary/10 text-primary`}},defaultVariants:{tone:`subtle`}}),c=a.forwardRef(({className:e,tone:t,...n},i)=>(0,o.jsx)(`span`,{ref:i,className:r(s({tone:t}),e),...n}));c.displayName=`TagChip`;export{c as t};
1
+ import{_ as e,m as t,p as n,u as r}from"./i18n-D1144VAA.js";import{Pt as i}from"./api-CKKNxbsy.js";var a=e(t(),1),o=n(),s=i(`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] font-medium`,{variants:{tone:{subtle:`border-gray-200 bg-gray-50 text-gray-600`,neutral:`border-gray-200 bg-white text-gray-600`,success:`border-emerald-200 bg-emerald-50 text-emerald-700`,warning:`border-amber-200 bg-amber-50 text-amber-800`,danger:`border-rose-200 bg-rose-50 text-rose-600`,info:`border-primary/20 bg-primary/10 text-primary`}},defaultVariants:{tone:`subtle`}}),c=a.forwardRef(({className:e,tone:t,...n},i)=>(0,o.jsx)(`span`,{ref:i,className:r(s({tone:t}),e),...n}));c.displayName=`TagChip`;export{c as t};
@@ -1 +1 @@
1
- import{r as e}from"./i18n-D1144VAA.js";import{$ as t,B as n,F as r,G as i,I as a,J as o,K as s,L as c,Lt as l,N as u,P as d,Q as f,R as p,Rt as m,U as h,V as g,W as _,X as v,Xt as y,Y as b,Z as x,_ as S,et as C,g as w,q as T,z as E,zt as D}from"./api-DGD9_Bg4.js";function O(){return D({queryKey:[`config`],queryFn:p,staleTime:3e4,refetchOnWindowFocus:!0})}function k(){return D({queryKey:[`app-meta`],queryFn:c,staleTime:1/0})}function A(){return D({queryKey:[`config-meta`],queryFn:E,staleTime:1/0})}function j(){return D({queryKey:[`config-schema`],queryFn:n,staleTime:1/0})}function M(){let t=y();return m({mutationFn:v,onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function N(){let n=y();return m({mutationFn:({data:e})=>t(e),onSuccess:()=>{n.invalidateQueries({queryKey:[`config`]}),n.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function P(){let t=y();return m({mutationFn:({provider:e,data:t})=>x(e,t),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function F(){let t=y();return m({mutationFn:({data:e})=>u(e??{}),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function I(){let t=y();return m({mutationFn:({provider:e})=>r(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function L(){return m({mutationFn:({provider:e,data:t})=>o(e,t)})}function R(){return m({mutationFn:({provider:e,data:t})=>T(e,t)})}function z(){return m({mutationFn:({provider:e,data:t})=>_(e,t)})}function B(){return m({mutationFn:({provider:e})=>h(e)})}function V(){let t=y();return m({mutationFn:({channel:e,data:t})=>b(e,t),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSavedApplying`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function H(){let t=y();return m({mutationFn:({data:e})=>f(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function U(){let t=y();return m({mutationFn:({data:e})=>C(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function W(){return m({mutationFn:({actionId:e,data:t})=>a(e,t),onError:t=>{l.error(e(`error`)+`: `+t.message)}})}function G(e){return D({queryKey:[`ncp-sessions`,e?.limit??null],queryFn:()=>S(e),staleTime:5e3,retry:!1})}function K(e){return D({queryKey:[`ncp-session-skills`,e.sessionId,e.projectRoot??null],queryFn:()=>w(e.sessionId,{...Object.prototype.hasOwnProperty.call(e,`projectRoot`)?{projectRoot:e.projectRoot??null}:{}}),enabled:!!e.sessionId,staleTime:5e3,retry:!1})}function q(e={all:!0}){return D({queryKey:[`cron`,e],queryFn:()=>g(e),staleTime:1e4})}function J(){let t=y();return m({mutationFn:({id:e})=>d(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`cron`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function Y(){let t=y();return m({mutationFn:({id:e,enabled:t})=>s(e,{enabled:t}),onSuccess:()=>{t.invalidateQueries({queryKey:[`cron`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function X(){let t=y();return m({mutationFn:({id:e,force:t})=>i(e,{force:t}),onSuccess:()=>{t.invalidateQueries({queryKey:[`cron`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}export{U as C,N as S,Y as _,F as a,P as b,I as c,K as d,G as f,L as g,R as h,j as i,W as l,X as m,O as n,q as o,z as p,A as r,J as s,k as t,B as u,V as v,H as x,M as y};
1
+ import{r as e}from"./i18n-D1144VAA.js";import{$ as t,B as n,F as r,G as i,I as a,J as o,K as s,L as c,Lt as l,N as u,P as d,Q as f,R as p,Rt as m,U as h,V as g,W as _,X as v,Xt as y,Y as b,Z as x,_ as S,et as C,g as w,q as T,z as E,zt as D}from"./api-CKKNxbsy.js";function O(){return D({queryKey:[`config`],queryFn:p,staleTime:3e4,refetchOnWindowFocus:!0})}function k(){return D({queryKey:[`app-meta`],queryFn:c,staleTime:1/0})}function A(){return D({queryKey:[`config-meta`],queryFn:E,staleTime:1/0})}function j(){return D({queryKey:[`config-schema`],queryFn:n,staleTime:1/0})}function M(){let t=y();return m({mutationFn:v,onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function N(){let n=y();return m({mutationFn:({data:e})=>t(e),onSuccess:()=>{n.invalidateQueries({queryKey:[`config`]}),n.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function P(){let t=y();return m({mutationFn:({provider:e,data:t})=>x(e,t),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function F(){let t=y();return m({mutationFn:({data:e})=>u(e??{}),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function I(){let t=y();return m({mutationFn:({provider:e})=>r(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function L(){return m({mutationFn:({provider:e,data:t})=>o(e,t)})}function R(){return m({mutationFn:({provider:e,data:t})=>T(e,t)})}function z(){return m({mutationFn:({provider:e,data:t})=>_(e,t)})}function B(){return m({mutationFn:({provider:e})=>h(e)})}function V(){let t=y();return m({mutationFn:({channel:e,data:t})=>b(e,t),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSavedApplying`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function H(){let t=y();return m({mutationFn:({data:e})=>f(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function U(){let t=y();return m({mutationFn:({data:e})=>C(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function W(){return m({mutationFn:({actionId:e,data:t})=>a(e,t),onError:t=>{l.error(e(`error`)+`: `+t.message)}})}function G(e){return D({queryKey:[`ncp-sessions`,e?.limit??null],queryFn:()=>S(e),staleTime:5e3,retry:!1})}function K(e){return D({queryKey:[`ncp-session-skills`,e.sessionId,e.projectRoot??null],queryFn:()=>w(e.sessionId,{...Object.prototype.hasOwnProperty.call(e,`projectRoot`)?{projectRoot:e.projectRoot??null}:{}}),enabled:!!e.sessionId,staleTime:5e3,retry:!1})}function q(e={all:!0}){return D({queryKey:[`cron`,e],queryFn:()=>g(e),staleTime:1e4})}function J(){let t=y();return m({mutationFn:({id:e})=>d(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`cron`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function Y(){let t=y();return m({mutationFn:({id:e,enabled:t})=>s(e,{enabled:t}),onSuccess:()=>{t.invalidateQueries({queryKey:[`cron`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function X(){let t=y();return m({mutationFn:({id:e,force:t})=>i(e,{force:t}),onSuccess:()=>{t.invalidateQueries({queryKey:[`cron`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}export{U as C,N as S,Y as _,F as a,P as b,I as c,K as d,G as f,L as g,R as h,j as i,W as l,X as m,O as n,q as o,z as p,A as r,J as s,k as t,B as u,V as v,H as x,M as y};
@@ -1 +1 @@
1
- import{_ as e,m as t,p as n,r}from"./i18n-D1144VAA.js";import{$t as i,Bt as a,Qt as o,Zt as s,en as c}from"./api-DGD9_Bg4.js";import{t as l}from"./createLucideIcon-DzY6wN61.js";import{a as u,i as d,n as f,r as p,t as m}from"./select-BUTwE_lC.js";import{u as h}from"./index-DqJ3CYwi.js";var g=class extends c{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:i()})}getOptimisticResult(e){return e.behavior=i(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:c,isRefetchError:l}=r,u=n.fetchMeta?.fetchMore?.direction,d=c&&u===`forward`,f=i&&u===`forward`,p=c&&u===`backward`,m=i&&u===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:s(t,n.data),hasPreviousPage:o(t,n.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:a&&!f&&!m}}};function _(e,t){return a(e,g,t)}var v=l(`PackageSearch`,[[`path`,{d:`M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14`,key:`e7tb2h`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`12`,key:`a4e8g8`}],[`circle`,{cx:`18.5`,cy:`15.5`,r:`2.5`,key:`b5zd12`}],[`path`,{d:`M20.27 17.27 22 19`,key:`1l4muz`}]]);function y(e){if(!e||e.pages.length===0)return;let t=e.pages.flatMap(e=>e.items);return{...e.pages[e.pages.length-1],items:t,pages:e.pages,loadedItems:t.length,loadedPages:e.pages.length}}var b=n();function x({scope:e,searchText:t,searchPlaceholder:n,sort:i,onSearchTextChange:a,onSortChange:o}){return(0,b.jsx)(`div`,{className:`mb-4`,children:(0,b.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,b.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[(0,b.jsx)(v,{className:`absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400`}),(0,b.jsx)(`input`,{value:t,onChange:e=>a(e.target.value),placeholder:n,className:`h-9 w-full rounded-xl border border-gray-200/80 pl-9 pr-3 text-sm focus:outline-none focus:ring-1 focus:ring-primary/40`})]}),e===`all`&&(0,b.jsxs)(m,{value:i,onValueChange:e=>o(e),children:[(0,b.jsx)(d,{className:`h-9 w-[150px] shrink-0 rounded-lg`,children:(0,b.jsx)(u,{})}),(0,b.jsxs)(f,{children:[(0,b.jsx)(p,{value:`relevance`,children:r(`marketplaceSortRelevance`)}),(0,b.jsx)(p,{value:`updated`,children:r(`marketplaceSortUpdated`)})]})]})]})})}function S({count:e}){return(0,b.jsx)(b.Fragment,{children:Array.from({length:e},(e,t)=>(0,b.jsx)(`article`,{className:`h-full rounded-2xl border border-gray-200/40 bg-white px-5 py-4 shadow-sm`,children:(0,b.jsxs)(`div`,{className:`flex items-start justify-between gap-3.5`,children:[(0,b.jsxs)(`div`,{className:`flex min-w-0 flex-1 gap-3`,children:[(0,b.jsx)(h,{className:`h-10 w-10 shrink-0 rounded-xl`}),(0,b.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2 pt-0.5`,children:[(0,b.jsx)(h,{className:`h-4 w-32 max-w-[70%]`}),(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsx)(h,{className:`h-3 w-12`}),(0,b.jsx)(h,{className:`h-3 w-24`})]}),(0,b.jsx)(h,{className:`h-3 w-full`})]})]}),(0,b.jsx)(h,{className:`h-8 w-20 shrink-0 rounded-xl`})]})},`marketplace-skeleton-${t}`))})}function C({hasMore:e,loading:t,sentinelRef:n}){return!e&&!t?null:(0,b.jsxs)(`div`,{className:`py-4`,children:[e&&(0,b.jsx)(`div`,{ref:n,className:`h-1 w-full`,"aria-hidden":`true`}),t&&(0,b.jsx)(`div`,{"data-testid":`marketplace-loading-more`,className:`pt-3 text-center text-xs text-gray-500`,children:r(`loading`)})]})}function w(e){let t=e.trim().toLowerCase().replace(/_/g,`-`),n=[t,t.split(`-`)[0],`en`];return Array.from(new Set(n.filter(Boolean)))}function T(e){return e.trim().toLowerCase().replace(/_/g,`-`)}function E(e,t,n){if(e){let t=Object.entries(e).map(([e,t])=>({locale:T(e),text:typeof t==`string`?t.trim():``})).filter(e=>e.text.length>0);if(t.length>0){let e=new Map(t.map(e=>[e.locale,e.text]));for(let t of n){let n=T(t),r=e.get(n);if(r)return r}for(let e of n){let n=T(e).split(`-`)[0];if(!n)continue;let r=t.find(e=>e.locale===n||e.locale.startsWith(`${n}-`));if(r)return r.text}return t[0]?.text??``}}return t?.trim()??``}function D(e,t){if(!e)return``;for(let n of t)if(T(n).split(`-`)[0]===`zh`&&e.descriptionZh?.trim())return e.descriptionZh.trim();return e.description?.trim()?e.description.trim():e.descriptionZh?.trim()?e.descriptionZh.trim():``}var O=e(t(),1),k=160;function A(e){let t=(0,O.useRef)(null),n=(0,O.useRef)(null),r=(0,O.useRef)(e.onLoadMore),i=(0,O.useRef)(!1);return(0,O.useEffect)(()=>{r.current=e.onLoadMore},[e.onLoadMore]),(0,O.useEffect)(()=>{e.disabled&&(i.current=!1)},[e.disabled]),(0,O.useEffect)(()=>{let a=t.current,o=n.current,s=e.thresholdPx??k;if(e.disabled||!a||!o)return;let c=()=>{i.current||e.disabled||(i.current=!0,Promise.resolve(r.current()).finally(()=>{i.current=!1}))},l=()=>{o.getBoundingClientRect().top-a.getBoundingClientRect().bottom<=s&&c()};if(typeof IntersectionObserver==`function`){let e=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&c()},{root:a,rootMargin:`0px 0px ${s}px 0px`});return e.observe(o),l(),()=>{e.disconnect()}}return a.addEventListener(`scroll`,l,{passive:!0}),l(),()=>{a.removeEventListener(`scroll`,l)}},[e.disabled,e.thresholdPx,e.watchValue]),{containerRef:t,sentinelRef:n}}export{x as a,y as c,E as i,_ as l,w as n,C as o,D as r,S as s,A as t};
1
+ import{_ as e,m as t,p as n,r}from"./i18n-D1144VAA.js";import{$t as i,Bt as a,Qt as o,Zt as s,en as c}from"./api-CKKNxbsy.js";import{t as l}from"./createLucideIcon-DzY6wN61.js";import{a as u,i as d,n as f,r as p,t as m}from"./select-C2c10F3e.js";import{u as h}from"./index-zYi4W031.js";var g=class extends c{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:i()})}getOptimisticResult(e){return e.behavior=i(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:c,isRefetchError:l}=r,u=n.fetchMeta?.fetchMore?.direction,d=c&&u===`forward`,f=i&&u===`forward`,p=c&&u===`backward`,m=i&&u===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:s(t,n.data),hasPreviousPage:o(t,n.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:a&&!f&&!m}}};function _(e,t){return a(e,g,t)}var v=l(`PackageSearch`,[[`path`,{d:`M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14`,key:`e7tb2h`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`12`,key:`a4e8g8`}],[`circle`,{cx:`18.5`,cy:`15.5`,r:`2.5`,key:`b5zd12`}],[`path`,{d:`M20.27 17.27 22 19`,key:`1l4muz`}]]);function y(e){if(!e||e.pages.length===0)return;let t=e.pages.flatMap(e=>e.items);return{...e.pages[e.pages.length-1],items:t,pages:e.pages,loadedItems:t.length,loadedPages:e.pages.length}}var b=n();function x({scope:e,searchText:t,searchPlaceholder:n,sort:i,onSearchTextChange:a,onSortChange:o}){return(0,b.jsx)(`div`,{className:`mb-4`,children:(0,b.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,b.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[(0,b.jsx)(v,{className:`absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400`}),(0,b.jsx)(`input`,{value:t,onChange:e=>a(e.target.value),placeholder:n,className:`h-9 w-full rounded-xl border border-gray-200/80 pl-9 pr-3 text-sm focus:outline-none focus:ring-1 focus:ring-primary/40`})]}),e===`all`&&(0,b.jsxs)(m,{value:i,onValueChange:e=>o(e),children:[(0,b.jsx)(d,{className:`h-9 w-[150px] shrink-0 rounded-lg`,children:(0,b.jsx)(u,{})}),(0,b.jsxs)(f,{children:[(0,b.jsx)(p,{value:`relevance`,children:r(`marketplaceSortRelevance`)}),(0,b.jsx)(p,{value:`updated`,children:r(`marketplaceSortUpdated`)})]})]})]})})}function S({count:e}){return(0,b.jsx)(b.Fragment,{children:Array.from({length:e},(e,t)=>(0,b.jsx)(`article`,{className:`h-full rounded-2xl border border-gray-200/40 bg-white px-5 py-4 shadow-sm`,children:(0,b.jsxs)(`div`,{className:`flex items-start justify-between gap-3.5`,children:[(0,b.jsxs)(`div`,{className:`flex min-w-0 flex-1 gap-3`,children:[(0,b.jsx)(h,{className:`h-10 w-10 shrink-0 rounded-xl`}),(0,b.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2 pt-0.5`,children:[(0,b.jsx)(h,{className:`h-4 w-32 max-w-[70%]`}),(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsx)(h,{className:`h-3 w-12`}),(0,b.jsx)(h,{className:`h-3 w-24`})]}),(0,b.jsx)(h,{className:`h-3 w-full`})]})]}),(0,b.jsx)(h,{className:`h-8 w-20 shrink-0 rounded-xl`})]})},`marketplace-skeleton-${t}`))})}function C({hasMore:e,loading:t,sentinelRef:n}){return!e&&!t?null:(0,b.jsxs)(`div`,{className:`py-4`,children:[e&&(0,b.jsx)(`div`,{ref:n,className:`h-1 w-full`,"aria-hidden":`true`}),t&&(0,b.jsx)(`div`,{"data-testid":`marketplace-loading-more`,className:`pt-3 text-center text-xs text-gray-500`,children:r(`loading`)})]})}function w(e){let t=e.trim().toLowerCase().replace(/_/g,`-`),n=[t,t.split(`-`)[0],`en`];return Array.from(new Set(n.filter(Boolean)))}function T(e){return e.trim().toLowerCase().replace(/_/g,`-`)}function E(e,t,n){if(e){let t=Object.entries(e).map(([e,t])=>({locale:T(e),text:typeof t==`string`?t.trim():``})).filter(e=>e.text.length>0);if(t.length>0){let e=new Map(t.map(e=>[e.locale,e.text]));for(let t of n){let n=T(t),r=e.get(n);if(r)return r}for(let e of n){let n=T(e).split(`-`)[0];if(!n)continue;let r=t.find(e=>e.locale===n||e.locale.startsWith(`${n}-`));if(r)return r.text}return t[0]?.text??``}}return t?.trim()??``}function D(e,t){if(!e)return``;for(let n of t)if(T(n).split(`-`)[0]===`zh`&&e.descriptionZh?.trim())return e.descriptionZh.trim();return e.description?.trim()?e.description.trim():e.descriptionZh?.trim()?e.descriptionZh.trim():``}var O=e(t(),1),k=160;function A(e){let t=(0,O.useRef)(null),n=(0,O.useRef)(null),r=(0,O.useRef)(e.onLoadMore),i=(0,O.useRef)(!1);return(0,O.useEffect)(()=>{r.current=e.onLoadMore},[e.onLoadMore]),(0,O.useEffect)(()=>{e.disabled&&(i.current=!1)},[e.disabled]),(0,O.useEffect)(()=>{let a=t.current,o=n.current,s=e.thresholdPx??k;if(e.disabled||!a||!o)return;let c=()=>{i.current||e.disabled||(i.current=!0,Promise.resolve(r.current()).finally(()=>{i.current=!1}))},l=()=>{o.getBoundingClientRect().top-a.getBoundingClientRect().bottom<=s&&c()};if(typeof IntersectionObserver==`function`){let e=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&c()},{root:a,rootMargin:`0px 0px ${s}px 0px`});return e.observe(o),l(),()=>{e.disconnect()}}return a.addEventListener(`scroll`,l,{passive:!0}),l(),()=>{a.removeEventListener(`scroll`,l)}},[e.disabled,e.thresholdPx,e.watchValue]),{containerRef:t,sentinelRef:n}}export{x as a,y as c,E as i,_ as l,w as n,C as o,D as r,S as s,A as t};
package/dist/index.html CHANGED
@@ -78,24 +78,24 @@
78
78
  })();
79
79
  </script>
80
80
  <title>NextClaw</title>
81
- <script type="module" crossorigin src="/assets/index-DqJ3CYwi.js"></script>
81
+ <script type="module" crossorigin src="/assets/index-zYi4W031.js"></script>
82
82
  <link rel="modulepreload" crossorigin href="/assets/i18n-D1144VAA.js">
83
83
  <link rel="modulepreload" crossorigin href="/assets/createLucideIcon-DzY6wN61.js">
84
84
  <link rel="modulepreload" crossorigin href="/assets/cpu-DPPwMzoC.js">
85
- <link rel="modulepreload" crossorigin href="/assets/api-DGD9_Bg4.js">
86
- <link rel="modulepreload" crossorigin href="/assets/es2015-BhznEEyJ.js">
87
- <link rel="modulepreload" crossorigin href="/assets/select-BUTwE_lC.js">
88
- <link rel="modulepreload" crossorigin href="/assets/dist-CFiwgaLs.js">
85
+ <link rel="modulepreload" crossorigin href="/assets/api-CKKNxbsy.js">
86
+ <link rel="modulepreload" crossorigin href="/assets/es2015-ZJ-nWL4L.js">
87
+ <link rel="modulepreload" crossorigin href="/assets/select-C2c10F3e.js">
88
+ <link rel="modulepreload" crossorigin href="/assets/dist-DN-YM_0Y.js">
89
89
  <link rel="modulepreload" crossorigin href="/assets/x-BeyYA_h6.js">
90
- <link rel="modulepreload" crossorigin href="/assets/dialog-BKo0RItd.js">
91
- <link rel="modulepreload" crossorigin href="/assets/popover-BDFNiLlg.js">
90
+ <link rel="modulepreload" crossorigin href="/assets/dialog-DWZeMf9V.js">
91
+ <link rel="modulepreload" crossorigin href="/assets/popover-2H9DS7Cv.js">
92
92
  <link rel="modulepreload" crossorigin href="/assets/search-CRtQwr-h.js">
93
93
  <link rel="modulepreload" crossorigin href="/assets/book-open-BcnAiKde.js">
94
94
  <link rel="modulepreload" crossorigin href="/assets/download-CMM8po31.js">
95
95
  <link rel="modulepreload" crossorigin href="/assets/key-round-DUq47t0P.js">
96
- <link rel="modulepreload" crossorigin href="/assets/notice-card-Dr6xCwva.js">
96
+ <link rel="modulepreload" crossorigin href="/assets/notice-card-BM2_YNoc.js">
97
97
  <link rel="modulepreload" crossorigin href="/assets/status-dot-l3kPFdq_.js">
98
- <link rel="modulepreload" crossorigin href="/assets/app-manager-provider-oYdeYPSv.js">
98
+ <link rel="modulepreload" crossorigin href="/assets/app-manager-provider-BM1hziPv.js">
99
99
  <link rel="modulepreload" crossorigin href="/assets/settings-MWL2SMyk.js">
100
100
  <link rel="modulepreload" crossorigin href="/assets/refresh-cw-CrbD8EkT.js">
101
101
  <link rel="modulepreload" crossorigin href="/assets/sparkles-BmgOD4nY.js">
@@ -104,8 +104,8 @@
104
104
  <link rel="modulepreload" crossorigin href="/assets/doc-browser-context-FukQHvyo.js">
105
105
  <link rel="modulepreload" crossorigin href="/assets/doc-browser-rZIQIjuw.js">
106
106
  <link rel="modulepreload" crossorigin href="/assets/doc-browser-CAhfnm0D.js">
107
- <link rel="modulepreload" crossorigin href="/assets/use-config-Cyv5IuSt.js">
108
- <link rel="modulepreload" crossorigin href="/assets/desktop-DVUbOWbR.js">
107
+ <link rel="modulepreload" crossorigin href="/assets/use-config-jAYudJxy.js">
108
+ <link rel="modulepreload" crossorigin href="/assets/desktop-CmIbyIrg.js">
109
109
  <link rel="stylesheet" crossorigin href="/assets/index-DmWo8dX2.css">
110
110
  </head>
111
111
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextclaw/ui",
3
- "version": "0.12.27",
3
+ "version": "0.12.29",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -28,14 +28,14 @@
28
28
  "tailwind-merge": "^2.5.4",
29
29
  "zod": "^3.23.8",
30
30
  "zustand": "^5.0.2",
31
- "@nextclaw/agent-chat": "0.1.16",
32
- "@nextclaw/agent-chat-ui": "0.3.18",
33
- "@nextclaw/ncp-http-agent-client": "0.3.23",
34
- "@nextclaw/ncp": "0.5.11",
35
- "@nextclaw/ncp-react": "0.4.31",
36
- "@nextclaw/server": "0.12.18",
37
- "@nextclaw/shared": "0.1.5",
38
- "@nextclaw/client-sdk": "0.1.6"
31
+ "@nextclaw/agent-chat-ui": "0.3.20",
32
+ "@nextclaw/ncp": "0.5.13",
33
+ "@nextclaw/ncp-http-agent-client": "0.3.25",
34
+ "@nextclaw/client-sdk": "0.1.8",
35
+ "@nextclaw/agent-chat": "0.1.18",
36
+ "@nextclaw/server": "0.12.20",
37
+ "@nextclaw/shared": "0.1.7",
38
+ "@nextclaw/ncp-react": "0.4.33"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@testing-library/react": "^16.3.0",
@@ -189,15 +189,6 @@ export function buildChannelFormDefinitions(): Record<string, ChannelFormDefinit
189
189
  { name: 'fromAddress', type: 'email', label: t('fromAddress') }
190
190
  ]
191
191
  },
192
- mochat: {
193
- fields: [
194
- { name: 'enabled', type: 'boolean', label: t('enabled') },
195
- { name: 'baseUrl', type: 'text', label: t('baseUrl') },
196
- { name: 'clawToken', type: 'password', label: t('clawToken') },
197
- { name: 'agentUserId', type: 'text', label: t('agentUserId') },
198
- { name: 'allowFrom', type: 'tags', label: t('allowFrom') }
199
- ]
200
- },
201
192
  qq: {
202
193
  fields: [
203
194
  { name: 'enabled', type: 'boolean', label: t('enabled') },
@@ -122,16 +122,16 @@ function createPluginMarketplaceItem(
122
122
  overrides: Partial<MarketplaceItemSummary> = {},
123
123
  ): MarketplaceItemSummary {
124
124
  return createMarketplaceItem({
125
- id: "plugin-codex-runtime",
126
- slug: "codex-runtime",
125
+ id: "plugin-channel-slack",
126
+ slug: "channel-slack",
127
127
  type: "plugin",
128
- name: "Codex SDK NCP Runtime",
129
- summary: "Optional Codex runtime for NextClaw",
130
- summaryI18n: { en: "Optional Codex runtime for NextClaw" },
128
+ name: "Slack Channel",
129
+ summary: "Optional Slack channel for NextClaw",
130
+ summaryI18n: { en: "Optional Slack channel for NextClaw" },
131
131
  install: {
132
132
  kind: "npm",
133
- spec: "@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk",
134
- command: "npm install @nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk",
133
+ spec: "@nextclaw/channel-plugin-slack",
134
+ command: "npm install @nextclaw/channel-plugin-slack",
135
135
  },
136
136
  ...overrides,
137
137
  });
@@ -142,9 +142,9 @@ function createInstalledRecord(
142
142
  ): MarketplaceInstalledRecord {
143
143
  return {
144
144
  type: "plugin",
145
- id: "@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk",
146
- spec: "@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk",
147
- label: "Codex SDK NCP Runtime",
145
+ id: "@nextclaw/channel-plugin-slack",
146
+ spec: "@nextclaw/channel-plugin-slack",
147
+ label: "Slack Channel",
148
148
  enabled: true,
149
149
  origin: "marketplace",
150
150
  source: "marketplace",
@@ -248,17 +248,17 @@ describe("MarketplacePage", () => {
248
248
  sort: "relevance",
249
249
  items: [
250
250
  createMarketplaceItem({
251
- id: "plugin-codex-runtime",
252
- slug: "codex-runtime",
251
+ id: "plugin-channel-slack",
252
+ slug: "channel-slack",
253
253
  type: "plugin",
254
- name: "Codex SDK NCP Runtime",
255
- summary: "Optional Codex runtime for NextClaw",
256
- summaryI18n: { en: "Optional Codex runtime for NextClaw" },
254
+ name: "Slack Channel",
255
+ summary: "Optional Slack channel for NextClaw",
256
+ summaryI18n: { en: "Optional Slack channel for NextClaw" },
257
257
  install: {
258
258
  kind: "npm",
259
- spec: "@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk",
259
+ spec: "@nextclaw/channel-plugin-slack",
260
260
  command:
261
- "npm install @nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk",
261
+ "npm install @nextclaw/channel-plugin-slack",
262
262
  },
263
263
  }),
264
264
  ],
@@ -269,7 +269,7 @@ describe("MarketplacePage", () => {
269
269
  const card = container.querySelector("article");
270
270
 
271
271
  expect(card?.textContent).toContain(
272
- "@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk",
272
+ "@nextclaw/channel-plugin-slack",
273
273
  );
274
274
  expect(card?.textContent).not.toContain("Plugin");
275
275
  });
@@ -289,7 +289,7 @@ describe("MarketplacePage", () => {
289
289
 
290
290
  const { container } = render(<MarketplacePage forcedType="plugins" />);
291
291
 
292
- expect(screen.getByText("Codex SDK NCP Runtime")).toBeTruthy();
292
+ expect(screen.getByText("Slack Channel")).toBeTruthy();
293
293
  expect(container.querySelector(".opacity-70")).toBeNull();
294
294
  });
295
295
 
@@ -306,14 +306,14 @@ describe("MarketplacePage", () => {
306
306
  items: [
307
307
  createPluginMarketplaceItem(),
308
308
  createPluginMarketplaceItem({
309
- id: "plugin-claude-runtime",
310
- slug: "claude-runtime",
311
- name: "Claude Agent Runtime",
309
+ id: "plugin-channel-discord",
310
+ slug: "channel-discord",
311
+ name: "Discord Channel",
312
312
  install: {
313
313
  kind: "npm",
314
- spec: "@nextclaw/nextclaw-ncp-runtime-plugin-claude-code-sdk",
314
+ spec: "@nextclaw/channel-plugin-discord",
315
315
  command:
316
- "npm install @nextclaw/nextclaw-ncp-runtime-plugin-claude-code-sdk",
316
+ "npm install @nextclaw/channel-plugin-discord",
317
317
  },
318
318
  }),
319
319
  ],
@@ -324,15 +324,15 @@ describe("MarketplacePage", () => {
324
324
  type: "plugin",
325
325
  total: 2,
326
326
  specs: [
327
- "@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk",
328
- "@nextclaw/nextclaw-ncp-runtime-plugin-claude-code-sdk",
327
+ "@nextclaw/channel-plugin-slack",
328
+ "@nextclaw/channel-plugin-discord",
329
329
  ],
330
330
  records: [
331
331
  createInstalledRecord(),
332
332
  createInstalledRecord({
333
- id: "@nextclaw/nextclaw-ncp-runtime-plugin-claude-code-sdk",
334
- spec: "@nextclaw/nextclaw-ncp-runtime-plugin-claude-code-sdk",
335
- label: "Claude Agent Runtime",
333
+ id: "@nextclaw/channel-plugin-discord",
334
+ spec: "@nextclaw/channel-plugin-discord",
335
+ label: "Discord Channel",
336
336
  }),
337
337
  ],
338
338
  } satisfies MarketplaceInstalledView,
@@ -14,22 +14,22 @@ describe('marketplace-installed-cache', () => {
14
14
  it('adds a plugin record immediately after install success', () => {
15
15
  const request: MarketplaceInstallRequest = {
16
16
  type: 'plugin',
17
- spec: '@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk',
17
+ spec: '@nextclaw/channel-plugin-slack',
18
18
  kind: 'npm'
19
19
  };
20
20
  const result: MarketplaceInstallResult = {
21
21
  type: 'plugin',
22
- spec: '@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk',
22
+ spec: '@nextclaw/channel-plugin-slack',
23
23
  message: 'installed'
24
24
  };
25
25
 
26
26
  const next = applyInstallResultToInstalledView({ request, result });
27
27
 
28
28
  expect(next.total).toBe(1);
29
- expect(next.specs).toEqual(['@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk']);
29
+ expect(next.specs).toEqual(['@nextclaw/channel-plugin-slack']);
30
30
  expect(next.records[0]).toMatchObject({
31
31
  type: 'plugin',
32
- spec: '@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk',
32
+ spec: '@nextclaw/channel-plugin-slack',
33
33
  enabled: true,
34
34
  origin: 'marketplace',
35
35
  runtimeStatus: 'ready'
@@ -40,13 +40,13 @@ describe('marketplace-installed-cache', () => {
40
40
  const view: MarketplaceInstalledView = {
41
41
  type: 'plugin',
42
42
  total: 1,
43
- specs: ['@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk'],
43
+ specs: ['@nextclaw/channel-plugin-slack'],
44
44
  records: [
45
45
  {
46
46
  type: 'plugin',
47
- id: '@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk',
48
- spec: '@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk',
49
- label: 'Codex Runtime',
47
+ id: '@nextclaw/channel-plugin-slack',
48
+ spec: '@nextclaw/channel-plugin-slack',
49
+ label: 'Slack Channel',
50
50
  enabled: true,
51
51
  origin: 'marketplace'
52
52
  }
@@ -55,13 +55,13 @@ describe('marketplace-installed-cache', () => {
55
55
  const request: MarketplaceManageRequest = {
56
56
  type: 'plugin',
57
57
  action: 'disable',
58
- id: '@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk',
59
- spec: '@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk'
58
+ id: '@nextclaw/channel-plugin-slack',
59
+ spec: '@nextclaw/channel-plugin-slack'
60
60
  };
61
61
  const result: MarketplaceManageResult = {
62
62
  type: 'plugin',
63
63
  action: 'disable',
64
- id: '@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk',
64
+ id: '@nextclaw/channel-plugin-slack',
65
65
  message: 'disabled'
66
66
  };
67
67
 
@@ -10,7 +10,6 @@ const CHANNEL_LOGOS: LogoMap = {
10
10
  dingtalk: "dingtalk.svg",
11
11
  wecom: "wecom.svg",
12
12
  weixin: "weixin.svg",
13
- mochat: "mochat.svg",
14
13
  email: "email.svg"
15
14
  };
16
15