@intelligencebank/connectingib 3.1.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const je=require("./tokens/index.js"),a=require("react"),s=require("react/jsx-runtime"),$=require("@emotion/styled"),z=require("@emotion/react"),He=require("react-dom");function Yi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const K=Yi(a),Or=Yi(He),Il=z.keyframes`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const je=require("./tokens/index.js"),a=require("react"),i=require("react/jsx-runtime"),$=require("@emotion/styled"),z=require("@emotion/react"),He=require("react-dom");function Yi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const K=Yi(a),Dr=Yi(He),Bl=z.keyframes`
2
2
  from {
3
3
  opacity: 0;
4
4
  transform: scale(0.95);
@@ -32,7 +32,7 @@
32
32
  overflow-wrap: break-word;
33
33
  pointer-events: none;
34
34
 
35
- animation: ${({$isLeaving:e})=>e?Wl:Il} 0.15s ease-out;
35
+ animation: ${({$isLeaving:e})=>e?Wl:Bl} 0.15s ease-out;
36
36
  animation-fill-mode: forwards;
37
37
 
38
38
  @media (prefers-reduced-motion: reduce) {
@@ -63,7 +63,7 @@
63
63
  ${({$position:e})=>e.endsWith("-start")?e.startsWith("top")||e.startsWith("bottom")?"left: 12px;":"top: 12px;":e.endsWith("-end")?e.startsWith("top")||e.startsWith("bottom")?"right: 12px;":"bottom: 12px;":e==="top"||e==="bottom"?"left: 50%; margin-left: -4px;":"top: 50%; margin-top: -4px;"}
64
64
  `,Vl=$.span`
65
65
  display: inline-flex;
66
- `;function Gl(e,t,r,n){const o=window.scrollY||window.pageYOffset,i=window.scrollX||window.pageXOffset;let l=0,c=0;return r.startsWith("top")?l=e.top+o-t.height-n:r.startsWith("bottom")?l=e.bottom+o+n:(r.startsWith("left")||r.startsWith("right"))&&(r.endsWith("-start")?l=e.top+o:r.endsWith("-end")?l=e.bottom+o-t.height:l=e.top+o+(e.height-t.height)/2),r.startsWith("left")?c=e.left+i-t.width-n:r.startsWith("right")?c=e.right+i+n:(r.startsWith("top")||r.startsWith("bottom"))&&(r.endsWith("-start")?c=e.left+i:r.endsWith("-end")?c=e.right+i-t.width:c=e.left+i+(e.width-t.width)/2),{top:l,left:c}}const Wt=a.forwardRef(({content:e,children:t,position:r="bottom",delay:n=200,hideDelay:o=0,disabled:i=!1,maxWidth:l=300,contentStyle:c,contentClassName:d,arrow:u=!0,zIndex:f=1e3,offset:h=8,open:m,onOpenChange:p,"data-testid":g,...v},y)=>{const b=m!==void 0,[w,x]=a.useState(!1),[j,E]=a.useState(!1),[F,T]=a.useState({top:0,left:0}),L=a.useRef(null),M=a.useRef(null),k=a.useRef(null),D=a.useRef(null),P=a.useRef(null),R=b?m:w,S=a.useCallback(H=>{b||x(H),p==null||p(H)},[b,p]),O=a.useCallback(()=>{if(!L.current||!M.current)return;const H=L.current.getBoundingClientRect(),G={width:M.current.offsetWidth,height:M.current.offsetHeight},V=Gl(H,G,r,h);T(V)},[r,h]),N=a.useCallback(()=>{i||(D.current&&clearTimeout(D.current),P.current&&clearTimeout(P.current),E(!1),k.current=setTimeout(()=>{S(!0)},n))},[n,i,S]),A=a.useCallback(()=>{k.current&&clearTimeout(k.current),D.current=setTimeout(()=>{E(!0),P.current=setTimeout(()=>{S(!1),E(!1)},150)},o)},[o,S]);if(a.useEffect(()=>{R&&!j&&requestAnimationFrame(()=>{O()})},[R,j,O]),a.useEffect(()=>()=>{k.current&&clearTimeout(k.current),D.current&&clearTimeout(D.current),P.current&&clearTimeout(P.current)},[]),a.useEffect(()=>{if(!R)return;const H=()=>{A()};return window.addEventListener("scroll",H,!0),window.addEventListener("resize",H),()=>{window.removeEventListener("scroll",H,!0),window.removeEventListener("resize",H)}},[R,A]),!e||i)return s.jsx(s.Fragment,{children:t});const W=a.isValidElement(t)?a.cloneElement(t,{ref:L,onMouseEnter:H=>{var G,V;N(),(V=(G=t.props).onMouseEnter)==null||V.call(G,H)},onMouseLeave:H=>{var G,V;A(),(V=(G=t.props).onMouseLeave)==null||V.call(G,H)},onFocus:H=>{var G,V;N(),(V=(G=t.props).onFocus)==null||V.call(G,H)},onBlur:H=>{var G,V;A(),(V=(G=t.props).onBlur)==null||V.call(G,H)}}):s.jsx(Vl,{ref:L,onMouseEnter:N,onMouseLeave:A,onFocus:N,onBlur:A,tabIndex:0,children:t}),_={...c,top:F.top,left:F.left};return s.jsxs(s.Fragment,{children:[W,(R||j)&&He.createPortal(s.jsxs(Hl,{ref:H=>{M.current=H,typeof y=="function"?y(H):y&&(y.current=H)},role:"tooltip",style:_,className:d,$position:r,$maxWidth:l,$zIndex:f,$isVisible:R&&!j,$isLeaving:j,"data-testid":g,...v,children:[e,u&&s.jsx(_l,{$position:r})]}),document.body)]})});Wt.displayName="Tooltip";const Ul={xs:z.css`
66
+ `;function Gl(e,t,r,n){const o=window.scrollY||window.pageYOffset,s=window.scrollX||window.pageXOffset;let l=0,c=0;return r.startsWith("top")?l=e.top+o-t.height-n:r.startsWith("bottom")?l=e.bottom+o+n:(r.startsWith("left")||r.startsWith("right"))&&(r.endsWith("-start")?l=e.top+o:r.endsWith("-end")?l=e.bottom+o-t.height:l=e.top+o+(e.height-t.height)/2),r.startsWith("left")?c=e.left+s-t.width-n:r.startsWith("right")?c=e.right+s+n:(r.startsWith("top")||r.startsWith("bottom"))&&(r.endsWith("-start")?c=e.left+s:r.endsWith("-end")?c=e.right+s-t.width:c=e.left+s+(e.width-t.width)/2),{top:l,left:c}}const Bt=a.forwardRef(({content:e,children:t,position:r="bottom",delay:n=200,hideDelay:o=0,disabled:s=!1,maxWidth:l=300,contentStyle:c,contentClassName:d,arrow:u=!0,zIndex:f=1e3,offset:h=8,open:m,onOpenChange:p,"data-testid":g,...v},y)=>{const b=m!==void 0,[w,x]=a.useState(!1),[j,E]=a.useState(!1),[F,T]=a.useState({top:0,left:0}),L=a.useRef(null),M=a.useRef(null),k=a.useRef(null),D=a.useRef(null),P=a.useRef(null),R=b?m:w,S=a.useCallback(H=>{b||x(H),p==null||p(H)},[b,p]),O=a.useCallback(()=>{if(!L.current||!M.current)return;const H=L.current.getBoundingClientRect(),G={width:M.current.offsetWidth,height:M.current.offsetHeight},V=Gl(H,G,r,h);T(V)},[r,h]),N=a.useCallback(()=>{s||(D.current&&clearTimeout(D.current),P.current&&clearTimeout(P.current),E(!1),k.current=setTimeout(()=>{S(!0)},n))},[n,s,S]),A=a.useCallback(()=>{k.current&&clearTimeout(k.current),D.current=setTimeout(()=>{E(!0),P.current=setTimeout(()=>{S(!1),E(!1)},150)},o)},[o,S]);if(a.useEffect(()=>{R&&!j&&requestAnimationFrame(()=>{O()})},[R,j,O]),a.useEffect(()=>()=>{k.current&&clearTimeout(k.current),D.current&&clearTimeout(D.current),P.current&&clearTimeout(P.current)},[]),a.useEffect(()=>{if(!R)return;const H=()=>{A()};return window.addEventListener("scroll",H,!0),window.addEventListener("resize",H),()=>{window.removeEventListener("scroll",H,!0),window.removeEventListener("resize",H)}},[R,A]),!e||s)return i.jsx(i.Fragment,{children:t});const W=a.isValidElement(t)?a.cloneElement(t,{ref:L,onMouseEnter:H=>{var G,V;N(),(V=(G=t.props).onMouseEnter)==null||V.call(G,H)},onMouseLeave:H=>{var G,V;A(),(V=(G=t.props).onMouseLeave)==null||V.call(G,H)},onFocus:H=>{var G,V;N(),(V=(G=t.props).onFocus)==null||V.call(G,H)},onBlur:H=>{var G,V;A(),(V=(G=t.props).onBlur)==null||V.call(G,H)}}):i.jsx(Vl,{ref:L,onMouseEnter:N,onMouseLeave:A,onFocus:N,onBlur:A,tabIndex:0,children:t}),_={...c,top:F.top,left:F.left};return i.jsxs(i.Fragment,{children:[W,(R||j)&&He.createPortal(i.jsxs(Hl,{ref:H=>{M.current=H,typeof y=="function"?y(H):y&&(y.current=H)},role:"tooltip",style:_,className:d,$position:r,$maxWidth:l,$zIndex:f,$isVisible:R&&!j,$isLeaving:j,"data-testid":g,...v,children:[e,u&&i.jsx(_l,{$position:r})]}),document.body)]})});Bt.displayName="Tooltip";const Ul={xs:z.css`
67
67
  min-width: 24px;
68
68
  min-height: 24px;
69
69
  padding: 0 4px;
@@ -111,7 +111,7 @@
111
111
  ${({$size:e,$iconButton:t,$hasLeftIcon:r,$hasRightIcon:n})=>{if(e==="xs"){if(t)return"width: 24px; height: 24px; padding: 0;";if(r&&!n)return"padding: 0 4px 0 1px;";if(n&&!r)return"padding: 0 1px 0 4px;";if(r&&n)return"padding: 0 1px;"}if(e==="sm"){if(t)return"width: 24px; height: 24px; padding: 0;";if(r&&!n)return"padding: 0 8px 0 3px;";if(n&&!r)return"padding: 0 3px 0 8px;";if(r&&n)return"padding: 0 4px 0 3px;"}if(e==="md"){if(t)return"width: 36px; height: 36px; padding: 0;";if(r&&!n)return"padding: 8px 12px 8px 7px;";if(n&&!r)return"padding: 8px 7px 8px 12px;";if(r&&n)return"padding: 8px 8px 8px 7px;"}if(e==="lg"){if(t)return"width: 44px; height: 44px; padding: 0;";if(r&&!n)return"padding: 10px 16px 10px 10px;";if(n&&!r)return"padding: 10px 10px 10px 16px;";if(r&&n)return"padding: 10px 10px;"}return""}}
112
112
 
113
113
  /* Color variants */
114
- ${({$variant:e,$active:t,$outlineColor:r,theme:n})=>{const o="rgba(0, 0, 0, 0.05)",i="rgba(0, 0, 0, 0.08)",l="rgba(0, 0, 0, 0.20)",c="rgba(0, 0, 0, 0.50)",d="rgba(255, 255, 255, 0.20)",u=n.colors.grey[600],f=n.colors.grey[700],h=n.colors.semantic.green.base,m=n.colors.semantic.red.base,p=n.colors.semantic.orange.base,g=n.colors.highlight,v=n.colors.white;switch(e){case"primary":return z.css`
114
+ ${({$variant:e,$active:t,$outlineColor:r,theme:n})=>{const o="rgba(0, 0, 0, 0.05)",s="rgba(0, 0, 0, 0.08)",l="rgba(0, 0, 0, 0.20)",c="rgba(0, 0, 0, 0.50)",d="rgba(255, 255, 255, 0.20)",u=n.colors.grey[600],f=n.colors.grey[700],h=n.colors.semantic.green.base,m=n.colors.semantic.red.base,p=n.colors.semantic.orange.base,g=n.colors.highlight,v=n.colors.white;switch(e){case"primary":return z.css`
115
115
  background-color: var(--colour-highlight, ${g});
116
116
  border-color: var(--colour-highlight, ${g});
117
117
  color: var(--colour-highlight-text, ${v});
@@ -153,7 +153,7 @@
153
153
  color: ${u};
154
154
 
155
155
  &:hover:not([disabled]) {
156
- background-color: ${i};
156
+ background-color: ${s};
157
157
  border-color: transparent;
158
158
  color: ${f};
159
159
  }
@@ -195,7 +195,7 @@
195
195
  color: ${u};
196
196
 
197
197
  &:hover:not([disabled]) {
198
- background-color: ${i};
198
+ background-color: ${s};
199
199
  color: ${f};
200
200
  }
201
201
  `:z.css`
@@ -401,7 +401,7 @@
401
401
  > svg {
402
402
  flex-shrink: 0;
403
403
  }
404
- `,$o=$.span`
404
+ `,wo=$.span`
405
405
  display: inline-flex;
406
406
  align-items: center;
407
407
  justify-content: center;
@@ -413,7 +413,7 @@
413
413
  height: ${t}px;
414
414
  `}}
415
415
  }
416
- `,pe=a.forwardRef(({children:e,variant:t="primary",size:r="md",fullWidth:n=!1,disabled:o=!1,loading:i=!1,icon:l,leftIcon:c,rightIcon:d,type:u="button",onClick:f,className:h,active:m=!1,tooltip:p,tooltipProps:g,width:v,showHelpCursor:y=!1,fontWeight:b="bold",outlineColor:w,"aria-label":x,"data-testid":j,...E},F)=>{const T=o||i,L=l||c,M=!!L,k=!!d,D=!e&&(M||k),P=O=>{if(T){O.preventDefault();return}O.currentTarget.blur(),f==null||f(O)},R=O=>{if(T&&(O.key==="Enter"||O.key===" ")){O.preventDefault();return}O.key==="Escape"&&O.currentTarget.blur()},S=s.jsxs(Kl,{ref:F,type:u,className:h,disabled:T,onClick:P,onKeyDown:R,"aria-label":x,"aria-disabled":T,"aria-busy":i,"aria-pressed":m,"data-testid":j||`button-${t}`,$variant:t,$size:r,$fullWidth:n,$loading:i,$active:m,$width:v,$hasLeftIcon:M,$hasRightIcon:k,$iconButton:D,$showHelpCursor:y,$fontWeight:b,$outlineColor:w,...E,children:[i&&s.jsx(Yl,{"aria-hidden":"true",$size:r}),s.jsxs(ql,{$loading:i,children:[L&&s.jsx($o,{"aria-hidden":"true",$size:r,children:L}),e&&s.jsx("span",{className:"button-label",children:e}),d&&s.jsx($o,{"aria-hidden":"true",$size:r,children:d})]})]});return p?s.jsx(Wt,{content:p,position:(g==null?void 0:g.position)||"bottom",delay:g==null?void 0:g.delay,hideDelay:g==null?void 0:g.hideDelay,maxWidth:g==null?void 0:g.maxWidth,zIndex:g==null?void 0:g.zIndex,children:S}):S});pe.displayName="Button";const Xl=$.div`
416
+ `,pe=a.forwardRef(({children:e,variant:t="primary",size:r="md",fullWidth:n=!1,disabled:o=!1,loading:s=!1,icon:l,leftIcon:c,rightIcon:d,type:u="button",onClick:f,className:h,active:m=!1,tooltip:p,tooltipProps:g,width:v,showHelpCursor:y=!1,fontWeight:b="bold",outlineColor:w,"aria-label":x,"data-testid":j,...E},F)=>{const T=o||s,L=l||c,M=!!L,k=!!d,D=!e&&(M||k),P=O=>{if(T){O.preventDefault();return}O.currentTarget.blur(),f==null||f(O)},R=O=>{if(T&&(O.key==="Enter"||O.key===" ")){O.preventDefault();return}O.key==="Escape"&&O.currentTarget.blur()},S=i.jsxs(Kl,{ref:F,type:u,className:h,disabled:T,onClick:P,onKeyDown:R,"aria-label":x,"aria-disabled":T,"aria-busy":s,"aria-pressed":m,"data-testid":j||`button-${t}`,$variant:t,$size:r,$fullWidth:n,$loading:s,$active:m,$width:v,$hasLeftIcon:M,$hasRightIcon:k,$iconButton:D,$showHelpCursor:y,$fontWeight:b,$outlineColor:w,...E,children:[s&&i.jsx(Yl,{"aria-hidden":"true",$size:r}),i.jsxs(ql,{$loading:s,children:[L&&i.jsx(wo,{"aria-hidden":"true",$size:r,children:L}),e&&i.jsx("span",{className:"button-label",children:e}),d&&i.jsx(wo,{"aria-hidden":"true",$size:r,children:d})]})]});return p?i.jsx(Bt,{content:p,position:(g==null?void 0:g.position)||"bottom",delay:g==null?void 0:g.delay,hideDelay:g==null?void 0:g.hideDelay,maxWidth:g==null?void 0:g.maxWidth,zIndex:g==null?void 0:g.zIndex,children:S}):S});pe.displayName="Button";const Xl=$.div`
417
417
  display: flex;
418
418
  flex-direction: column;
419
419
  border-radius: ${({theme:e})=>e.borders.radius.sm};
@@ -509,7 +509,7 @@
509
509
  border-top: ${({theme:e})=>e.borders.width.thin} solid ${({theme:e})=>e.colors.border.light};
510
510
 
511
511
  ${({align:e})=>`justify-content: ${{left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"}[e]};`}
512
- `,qi=a.forwardRef(({children:e,variant:t="elevated",interactive:r=!1,selected:n=!1,disabled:o=!1,padding:i="none",onClick:l,onDoubleClick:c,className:d="",style:u,role:f,"aria-label":h,"aria-disabled":m,"data-testid":p},g)=>{const v=w=>{l&&r&&!o&&l(w)},y=w=>{c&&r&&!o&&c(w)},b=w=>{r&&!o&&(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),l==null||l(w))};return s.jsx(Xl,{ref:g,variant:t,interactive:r,selected:n,disabled:o,padding:i,className:d,style:u,onClick:v,onDoubleClick:y,onKeyDown:b,role:f||(r?"button":void 0),tabIndex:r&&!o?0:void 0,"aria-label":h,"aria-disabled":m||o,"data-testid":p,children:e})});qi.displayName="Card";const Xi=a.forwardRef(({children:e,className:t="","data-testid":r},n)=>s.jsx(Ql,{ref:n,className:t,"data-testid":r,children:e}));Xi.displayName="Card.Header";const Qi=a.forwardRef(({src:e,alt:t,aspectRatio:r="16:9",className:n="","data-testid":o},i)=>s.jsx(Zl,{ref:i,aspectRatio:r,className:n,"data-testid":o,children:s.jsx("img",{src:e,alt:t,loading:"lazy"})}));Qi.displayName="Card.Media";const Zi=a.forwardRef(({children:e,className:t="","data-testid":r},n)=>s.jsx(Jl,{ref:n,className:t,"data-testid":r,children:e}));Zi.displayName="Card.Content";const Ji=a.forwardRef(({children:e,align:t="right",className:r="","data-testid":n},o)=>s.jsx(ec,{ref:o,align:t,className:r,"data-testid":n,children:e}));Ji.displayName="Card.Actions";const it=Object.assign(qi,{Header:Xi,Media:Qi,Content:Zi,Actions:Ji}),tc={none:"0",xs:"4px",sm:"8px",md:"16px",lg:"24px",xl:"32px"},rc={start:"start",center:"center",end:"end",stretch:"stretch"},nc={start:"start",center:"center",end:"end","space-between":"space-between","space-around":"space-around"},oc=$.div`
512
+ `,qi=a.forwardRef(({children:e,variant:t="elevated",interactive:r=!1,selected:n=!1,disabled:o=!1,padding:s="none",onClick:l,onDoubleClick:c,className:d="",style:u,role:f,"aria-label":h,"aria-disabled":m,"data-testid":p},g)=>{const v=w=>{l&&r&&!o&&l(w)},y=w=>{c&&r&&!o&&c(w)},b=w=>{r&&!o&&(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),l==null||l(w))};return i.jsx(Xl,{ref:g,variant:t,interactive:r,selected:n,disabled:o,padding:s,className:d,style:u,onClick:v,onDoubleClick:y,onKeyDown:b,role:f||(r?"button":void 0),tabIndex:r&&!o?0:void 0,"aria-label":h,"aria-disabled":m||o,"data-testid":p,children:e})});qi.displayName="Card";const Xi=a.forwardRef(({children:e,className:t="","data-testid":r},n)=>i.jsx(Ql,{ref:n,className:t,"data-testid":r,children:e}));Xi.displayName="Card.Header";const Qi=a.forwardRef(({src:e,alt:t,aspectRatio:r="16:9",className:n="","data-testid":o},s)=>i.jsx(Zl,{ref:s,aspectRatio:r,className:n,"data-testid":o,children:i.jsx("img",{src:e,alt:t,loading:"lazy"})}));Qi.displayName="Card.Media";const Zi=a.forwardRef(({children:e,className:t="","data-testid":r},n)=>i.jsx(Jl,{ref:n,className:t,"data-testid":r,children:e}));Zi.displayName="Card.Content";const Ji=a.forwardRef(({children:e,align:t="right",className:r="","data-testid":n},o)=>i.jsx(ec,{ref:o,align:t,className:r,"data-testid":n,children:e}));Ji.displayName="Card.Actions";const ot=Object.assign(qi,{Header:Xi,Media:Qi,Content:Zi,Actions:Ji}),tc={none:"0",xs:"4px",sm:"8px",md:"16px",lg:"24px",xl:"32px"},rc={start:"start",center:"center",end:"end",stretch:"stretch"},nc={start:"start",center:"center",end:"end","space-between":"space-between","space-around":"space-around"},oc=$.div`
513
513
  display: grid;
514
514
  width: 100%;
515
515
  gap: ${({$gap:e})=>tc[e]};
@@ -675,10 +675,10 @@
675
675
  [data-col-span-xl="11"] { grid-column: span 11 !important; }
676
676
  [data-col-span-xl="12"] { grid-column: span 12 !important; }
677
677
  }
678
- `,ts=a.forwardRef(({children:e,columns:t=1,gap:r="md",align:n="stretch",justify:o="start",autoFit:i=!1,minColumnWidth:l="250px",className:c,"data-testid":d},u)=>{const f=typeof t=="object",h={};return i?h.gridTemplateColumns=`repeat(auto-fit, minmax(${l}, 1fr))`:typeof t=="number"&&(h.gridTemplateColumns=`repeat(${t}, 1fr)`),s.jsxs(s.Fragment,{children:[f&&s.jsx(z.Global,{styles:es}),s.jsx(oc,{ref:u,className:c,style:h,$gap:r,$align:n,$justify:o,$isResponsive:f,"data-gap":r,"data-align":n,"data-justify":o,"data-columns-xs":f?t.xs:void 0,"data-columns-sm":f?t.sm:void 0,"data-columns-md":f?t.md:void 0,"data-columns-lg":f?t.lg:void 0,"data-columns-xl":f?t.xl:void 0,"data-testid":d,children:e})]})});ts.displayName="Grid";const Wn=a.forwardRef(({children:e,colSpan:t,rowSpan:r,className:n,"data-testid":o},i)=>{const l=typeof t=="object",c={};return typeof t=="number"&&(c.gridColumn=`span ${t}`),r&&(c.gridRow=`span ${r}`),s.jsxs(s.Fragment,{children:[l&&s.jsx(z.Global,{styles:es}),s.jsx(ic,{ref:i,className:n,style:c,$isResponsive:l,"data-col-span-xs":l?t.xs:void 0,"data-col-span-sm":l?t.sm:void 0,"data-col-span-md":l?t.md:void 0,"data-col-span-lg":l?t.lg:void 0,"data-col-span-xl":l?t.xl:void 0,"data-row-span":r,"data-testid":o,children:e})]})});Wn.displayName="Grid.Item";const sc=Object.assign(ts,{Item:Wn}),ac=typeof document<"u"?a.useLayoutEffect:()=>{},dt=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},xt=e=>e&&"window"in e&&e.window===e?e:dt(e).defaultView||window;function lc(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function cc(e){return lc(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let dc=!1;function Hn(){return dc}function rs(e,t){if(!Hn())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let r=t;for(;r!==null;){if(r===e)return!0;r.tagName==="SLOT"&&r.assignedSlot?r=r.assignedSlot.parentNode:cc(r)?r=r.host:r=r.parentNode}return!1}const Sn=(e=document)=>{var t;if(!Hn())return e.activeElement;let r=e.activeElement;for(;r&&"shadowRoot"in r&&(!((t=r.shadowRoot)===null||t===void 0)&&t.activeElement);)r=r.shadowRoot.activeElement;return r};function ns(e){return Hn()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function uc(e){if(fc())e.focus({preventScroll:!0});else{let t=pc(e);e.focus(),hc(t)}}let yr=null;function fc(){if(yr==null){yr=!1;try{document.createElement("div").focus({get preventScroll(){return yr=!0,!0}})}catch{}}return yr}function pc(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}function hc(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}function Gr(e){var t;if(typeof window>"u"||window.navigator==null)return!1;let r=(t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands;return Array.isArray(r)&&r.some(n=>e.test(n.brand))||e.test(window.navigator.userAgent)}function _n(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function et(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const rr=et(function(){return _n(/^Mac/i)}),gc=et(function(){return _n(/^iPhone/i)}),os=et(function(){return _n(/^iPad/i)||rr()&&navigator.maxTouchPoints>1}),mc=et(function(){return gc()||os()});et(function(){return rr()||mc()});const bc=et(function(){return Gr(/AppleWebKit/i)&&!xc()}),xc=et(function(){return Gr(/Chrome/i)}),vc=et(function(){return Gr(/Android/i)}),yc=et(function(){return Gr(/Firefox/i)});function nr(e,t,r=!0){var n,o;let{metaKey:i,ctrlKey:l,altKey:c,shiftKey:d}=t;yc()&&(!((o=window.event)===null||o===void 0||(n=o.type)===null||n===void 0)&&n.startsWith("key"))&&e.target==="_blank"&&(rr()?i=!0:l=!0);let u=bc()&&rr()&&!os()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:i,ctrlKey:l,altKey:c,shiftKey:d}):new MouseEvent("click",{metaKey:i,ctrlKey:l,altKey:c,shiftKey:d,detail:1,bubbles:!0,cancelable:!0});nr.isOpening=r,uc(e),e.dispatchEvent(u),nr.isOpening=!1}nr.isOpening=!1;function is(){let e=a.useRef(new Map),t=a.useCallback((o,i,l,c)=>{let d=c!=null&&c.once?(...u)=>{e.current.delete(l),l(...u)}:l;e.current.set(l,{type:i,eventTarget:o,fn:d,options:c}),o.addEventListener(i,d,c)},[]),r=a.useCallback((o,i,l,c)=>{var d;let u=((d=e.current.get(l))===null||d===void 0?void 0:d.fn)||l;o.removeEventListener(i,u,c),e.current.delete(l)},[]),n=a.useCallback(()=>{e.current.forEach((o,i)=>{r(o.eventTarget,o.type,i,o.options)})},[r]);return a.useEffect(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}function wc(e){return e.pointerType===""&&e.isTrusted?!0:vc()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ss(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function $c(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function as(e){let t=a.useRef({isFocused:!1,observer:null});return ac(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]),a.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=r.target,o=i=>{if(t.current.isFocused=!1,n.disabled){let l=ss(i);e==null||e(l)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};n.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){var i;(i=t.current.observer)===null||i===void 0||i.disconnect();let l=n===document.activeElement?null:document.activeElement;n.dispatchEvent(new FocusEvent("blur",{relatedTarget:l})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:l}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}},[e])}let kc=!1,dr=null,Ln=new Set,Xt=new Map,$t=!1,Tn=!1;const Cc={Tab:!0,Escape:!0};function Vn(e,t){for(let r of Ln)r(e,t)}function jc(e){return!(e.metaKey||!rr()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Mr(e){$t=!0,!nr.isOpening&&jc(e)&&(dr="keyboard",Vn("keyboard",e))}function Oe(e){dr="pointer","pointerType"in e&&e.pointerType,(e.type==="mousedown"||e.type==="pointerdown")&&($t=!0,Vn("pointer",e))}function ls(e){!nr.isOpening&&wc(e)&&($t=!0,dr="virtual")}function cs(e){e.target===window||e.target===document||kc||!e.isTrusted||(!$t&&!Tn&&(dr="virtual",Vn("virtual",e)),$t=!1,Tn=!1)}function ds(){$t=!1,Tn=!0}function Fn(e){if(typeof window>"u"||typeof document>"u"||Xt.get(xt(e)))return;const t=xt(e),r=dt(e);let n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){$t=!0,n.apply(this,arguments)},r.addEventListener("keydown",Mr,!0),r.addEventListener("keyup",Mr,!0),r.addEventListener("click",ls,!0),t.addEventListener("focus",cs,!0),t.addEventListener("blur",ds,!1),typeof PointerEvent<"u"?(r.addEventListener("pointerdown",Oe,!0),r.addEventListener("pointermove",Oe,!0),r.addEventListener("pointerup",Oe,!0)):process.env.NODE_ENV==="test"&&(r.addEventListener("mousedown",Oe,!0),r.addEventListener("mousemove",Oe,!0),r.addEventListener("mouseup",Oe,!0)),t.addEventListener("beforeunload",()=>{us(e)},{once:!0}),Xt.set(t,{focus:n})}const us=(e,t)=>{const r=xt(e),n=dt(e);t&&n.removeEventListener("DOMContentLoaded",t),Xt.has(r)&&(r.HTMLElement.prototype.focus=Xt.get(r).focus,n.removeEventListener("keydown",Mr,!0),n.removeEventListener("keyup",Mr,!0),n.removeEventListener("click",ls,!0),r.removeEventListener("focus",cs,!0),r.removeEventListener("blur",ds,!1),typeof PointerEvent<"u"?(n.removeEventListener("pointerdown",Oe,!0),n.removeEventListener("pointermove",Oe,!0),n.removeEventListener("pointerup",Oe,!0)):process.env.NODE_ENV==="test"&&(n.removeEventListener("mousedown",Oe,!0),n.removeEventListener("mousemove",Oe,!0),n.removeEventListener("mouseup",Oe,!0)),Xt.delete(r))};function Ec(e){const t=dt(e);let r;return t.readyState!=="loading"?Fn(e):(r=()=>{Fn(e)},t.addEventListener("DOMContentLoaded",r)),()=>us(e,r)}typeof document<"u"&&Ec();function fs(){return dr!=="pointer"}const Sc=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Lc(e,t,r){let n=dt(r==null?void 0:r.target);const o=typeof window<"u"?xt(r==null?void 0:r.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?xt(r==null?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,l=typeof window<"u"?xt(r==null?void 0:r.target).HTMLElement:HTMLElement,c=typeof window<"u"?xt(r==null?void 0:r.target).KeyboardEvent:KeyboardEvent;return e=e||n.activeElement instanceof o&&!Sc.has(n.activeElement.type)||n.activeElement instanceof i||n.activeElement instanceof l&&n.activeElement.isContentEditable,!(e&&t==="keyboard"&&r instanceof c&&!Cc[r.key])}function Tc(e,t,r){Fn(),a.useEffect(()=>{let n=(o,i)=>{Lc(!!(r!=null&&r.isTextInput),o,i)&&e(fs())};return Ln.add(n),()=>{Ln.delete(n)}},t)}function Fc(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e;const i=a.useCallback(d=>{if(d.target===d.currentTarget)return n&&n(d),o&&o(!1),!0},[n,o]),l=as(i),c=a.useCallback(d=>{const u=dt(d.target),f=u?Sn(u):Sn();d.target===d.currentTarget&&f===ns(d.nativeEvent)&&(r&&r(d),o&&o(!0),l(d))},[o,r,l]);return{focusProps:{onFocus:!t&&(r||o||n)?c:void 0,onBlur:!t&&(n||o)?i:void 0}}}function Rc(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,i=a.useRef({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:c}=is(),d=a.useCallback(h=>{h.currentTarget.contains(h.target)&&i.current.isFocusWithin&&!h.currentTarget.contains(h.relatedTarget)&&(i.current.isFocusWithin=!1,c(),r&&r(h),o&&o(!1))},[r,o,i,c]),u=as(d),f=a.useCallback(h=>{if(!h.currentTarget.contains(h.target))return;const m=dt(h.target),p=Sn(m);if(!i.current.isFocusWithin&&p===ns(h.nativeEvent)){n&&n(h),o&&o(!0),i.current.isFocusWithin=!0,u(h);let g=h.currentTarget;l(m,"focus",v=>{if(i.current.isFocusWithin&&!rs(g,v.target)){let y=new m.defaultView.FocusEvent("blur",{relatedTarget:v.target});$c(y,g);let b=ss(y);d(b)}},{capture:!0})}},[n,o,u,l,d]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:f,onBlur:d}}}let Ar=!1,wr=0;function Rn(){Ar=!0,setTimeout(()=>{Ar=!1},50)}function ko(e){e.pointerType==="touch"&&Rn()}function Dc(){if(!(typeof document>"u"))return wr===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",ko):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",Rn)),wr++,()=>{wr--,!(wr>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",ko):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",Rn))}}function Oc(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[i,l]=a.useState(!1),c=a.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;a.useEffect(Dc,[]);let{addGlobalListener:d,removeAllGlobalListeners:u}=is(),{hoverProps:f,triggerHoverEnd:h}=a.useMemo(()=>{let m=(v,y)=>{if(c.pointerType=y,o||y==="touch"||c.isHovered||!v.currentTarget.contains(v.target))return;c.isHovered=!0;let b=v.currentTarget;c.target=b,d(dt(v.target),"pointerover",w=>{c.isHovered&&c.target&&!rs(c.target,w.target)&&p(w,w.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:b,pointerType:y}),r&&r(!0),l(!0)},p=(v,y)=>{let b=c.target;c.pointerType="",c.target=null,!(y==="touch"||!c.isHovered||!b)&&(c.isHovered=!1,u(),n&&n({type:"hoverend",target:b,pointerType:y}),r&&r(!1),l(!1))},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=v=>{Ar&&v.pointerType==="mouse"||m(v,v.pointerType)},g.onPointerLeave=v=>{!o&&v.currentTarget.contains(v.target)&&p(v,v.pointerType)}):process.env.NODE_ENV==="test"&&(g.onTouchStart=()=>{c.ignoreEmulatedMouseEvents=!0},g.onMouseEnter=v=>{!c.ignoreEmulatedMouseEvents&&!Ar&&m(v,"mouse"),c.ignoreEmulatedMouseEvents=!1},g.onMouseLeave=v=>{!o&&v.currentTarget.contains(v.target)&&p(v,"mouse")}),{hoverProps:g,triggerHoverEnd:p}},[t,r,n,o,c,d,u]);return a.useEffect(()=>{o&&h({currentTarget:c.target},c.pointerType)},[o]),{hoverProps:f,isHovered:i}}function Mc(e={}){let{autoFocus:t=!1,isTextInput:r,within:n}=e,o=a.useRef({isFocused:!1,isFocusVisible:t||fs()}),[i,l]=a.useState(!1),[c,d]=a.useState(()=>o.current.isFocused&&o.current.isFocusVisible),u=a.useCallback(()=>d(o.current.isFocused&&o.current.isFocusVisible),[]),f=a.useCallback(p=>{o.current.isFocused=p,l(p),u()},[u]);Tc(p=>{o.current.isFocusVisible=p,u()},[],{isTextInput:r});let{focusProps:h}=Fc({isDisabled:n,onFocusChange:f}),{focusWithinProps:m}=Rc({isDisabled:!n,onFocusWithinChange:f});return{isFocused:i,isFocusVisible:c,focusProps:n?m:h}}var Ac=Object.defineProperty,Pc=(e,t,r)=>t in e?Ac(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fn=(e,t,r)=>(Pc(e,typeof t!="symbol"?t+"":t,r),r);let Nc=class{constructor(){fn(this,"current",this.detect()),fn(this,"handoffState","pending"),fn(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Ie=new Nc;function Ht(e){var t;return Ie.isServer?null:e==null?document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function Pr(e){var t,r;return Ie.isServer?null:e==null?document:(r=(t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))!=null?r:document}function ps(e){var t,r;return(r=(t=Pr(e))==null?void 0:t.activeElement)!=null?r:null}function hs(e){return ps(e)===e}function Ur(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Te(){let e=[],t={addEventListener(r,n,o,i){return r.addEventListener(n,o,i),t.add(()=>r.removeEventListener(n,o,i))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return t.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return Ur(()=>{n.current&&r[0]()}),t.add(()=>{n.current=!1})},style(r,n,o){let i=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:o}),this.add(()=>{Object.assign(r.style,{[n]:i})})},group(r){let n=Te();return r(n),this.add(()=>n.dispose())},add(r){return e.includes(r)||e.push(r),()=>{let n=e.indexOf(r);if(n>=0)for(let o of e.splice(n,1))o()}},dispose(){for(let r of e.splice(0))r()}};return t}function ut(){let[e]=a.useState(Te);return a.useEffect(()=>()=>e.dispose(),[e]),e}let le=(e,t)=>{Ie.isServer?a.useEffect(e,t):a.useLayoutEffect(e,t)};function ft(e){let t=a.useRef(e);return le(()=>{t.current=e},[e]),t}let Z=function(e){let t=ft(e);return a.useCallback((...r)=>t.current(...r),[t])};function zc(e){let t=e.width/2,r=e.height/2;return{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}function Bc(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function Ic({disabled:e=!1}={}){let t=a.useRef(null),[r,n]=a.useState(!1),o=ut(),i=Z(()=>{t.current=null,n(!1),o.dispose()}),l=Z(c=>{if(o.dispose(),t.current===null){t.current=c.currentTarget,n(!0);{let d=Ht(c.currentTarget);o.addEventListener(d,"pointerup",i,!1),o.addEventListener(d,"pointermove",u=>{if(t.current){let f=zc(u);n(Bc(f,t.current.getBoundingClientRect()))}},!1),o.addEventListener(d,"pointercancel",i,!1)}}});return{pressed:r,pressProps:e?{}:{onPointerDown:l,onPointerUp:i,onClick:i}}}function Me(e){return a.useMemo(()=>e,Object.values(e))}let Wc=a.createContext(void 0);function Gn(){return a.useContext(Wc)}function Dn(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function ke(e,t,...r){if(e in t){let o=t[e];return typeof o=="function"?o(...r):o}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ke),n}var Nt=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Nt||{}),st=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(st||{});function he(){let e=_c();return a.useCallback(t=>Hc({mergeRefs:e,...t}),[e])}function Hc({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:o,visible:i=!0,name:l,mergeRefs:c}){c=c??Vc;let d=gs(t,e);if(i)return $r(d,r,n,l,c);let u=o??0;if(u&2){let{static:f=!1,...h}=d;if(f)return $r(h,r,n,l,c)}if(u&1){let{unmount:f=!0,...h}=d;return ke(f?0:1,{0(){return null},1(){return $r({...h,hidden:!0,style:{display:"none"}},r,n,l,c)}})}return $r(d,r,n,l,c)}function $r(e,t={},r,n,o){let{as:i=r,children:l,refName:c="ref",...d}=pn(e,["unmount","static"]),u=e.ref!==void 0?{[c]:e.ref}:{},f=typeof l=="function"?l(t):l;"className"in d&&d.className&&typeof d.className=="function"&&(d.className=d.className(t)),d["aria-labelledby"]&&d["aria-labelledby"]===d.id&&(d["aria-labelledby"]=void 0);let h={};if(t){let m=!1,p=[];for(let[g,v]of Object.entries(t))typeof v=="boolean"&&(m=!0),v===!0&&p.push(g.replace(/([A-Z])/g,y=>`-${y.toLowerCase()}`));if(m){h["data-headlessui-state"]=p.join(" ");for(let g of p)h[`data-${g}`]=""}}if(Qt(i)&&(Object.keys(tt(d)).length>0||Object.keys(tt(h)).length>0))if(!a.isValidElement(f)||Array.isArray(f)&&f.length>1||Uc(f)){if(Object.keys(tt(d)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(tt(d)).concat(Object.keys(tt(h))).map(m=>` - ${m}`).join(`
678
+ `,ts=a.forwardRef(({children:e,columns:t=1,gap:r="md",align:n="stretch",justify:o="start",autoFit:s=!1,minColumnWidth:l="250px",className:c,"data-testid":d},u)=>{const f=typeof t=="object",h={};return s?h.gridTemplateColumns=`repeat(auto-fit, minmax(${l}, 1fr))`:typeof t=="number"&&(h.gridTemplateColumns=`repeat(${t}, 1fr)`),i.jsxs(i.Fragment,{children:[f&&i.jsx(z.Global,{styles:es}),i.jsx(oc,{ref:u,className:c,style:h,$gap:r,$align:n,$justify:o,$isResponsive:f,"data-gap":r,"data-align":n,"data-justify":o,"data-columns-xs":f?t.xs:void 0,"data-columns-sm":f?t.sm:void 0,"data-columns-md":f?t.md:void 0,"data-columns-lg":f?t.lg:void 0,"data-columns-xl":f?t.xl:void 0,"data-testid":d,children:e})]})});ts.displayName="Grid";const Wn=a.forwardRef(({children:e,colSpan:t,rowSpan:r,className:n,"data-testid":o},s)=>{const l=typeof t=="object",c={};return typeof t=="number"&&(c.gridColumn=`span ${t}`),r&&(c.gridRow=`span ${r}`),i.jsxs(i.Fragment,{children:[l&&i.jsx(z.Global,{styles:es}),i.jsx(ic,{ref:s,className:n,style:c,$isResponsive:l,"data-col-span-xs":l?t.xs:void 0,"data-col-span-sm":l?t.sm:void 0,"data-col-span-md":l?t.md:void 0,"data-col-span-lg":l?t.lg:void 0,"data-col-span-xl":l?t.xl:void 0,"data-row-span":r,"data-testid":o,children:e})]})});Wn.displayName="Grid.Item";const sc=Object.assign(ts,{Item:Wn}),ac=typeof document<"u"?a.useLayoutEffect:()=>{},ct=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},bt=e=>e&&"window"in e&&e.window===e?e:ct(e).defaultView||window;function lc(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function cc(e){return lc(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let dc=!1;function Hn(){return dc}function rs(e,t){if(!Hn())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let r=t;for(;r!==null;){if(r===e)return!0;r.tagName==="SLOT"&&r.assignedSlot?r=r.assignedSlot.parentNode:cc(r)?r=r.host:r=r.parentNode}return!1}const Sn=(e=document)=>{var t;if(!Hn())return e.activeElement;let r=e.activeElement;for(;r&&"shadowRoot"in r&&(!((t=r.shadowRoot)===null||t===void 0)&&t.activeElement);)r=r.shadowRoot.activeElement;return r};function ns(e){return Hn()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function uc(e){if(fc())e.focus({preventScroll:!0});else{let t=pc(e);e.focus(),hc(t)}}let vr=null;function fc(){if(vr==null){vr=!1;try{document.createElement("div").focus({get preventScroll(){return vr=!0,!0}})}catch{}}return vr}function pc(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}function hc(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}function Vr(e){var t;if(typeof window>"u"||window.navigator==null)return!1;let r=(t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands;return Array.isArray(r)&&r.some(n=>e.test(n.brand))||e.test(window.navigator.userAgent)}function _n(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Je(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const tr=Je(function(){return _n(/^Mac/i)}),gc=Je(function(){return _n(/^iPhone/i)}),os=Je(function(){return _n(/^iPad/i)||tr()&&navigator.maxTouchPoints>1}),mc=Je(function(){return gc()||os()});Je(function(){return tr()||mc()});const bc=Je(function(){return Vr(/AppleWebKit/i)&&!xc()}),xc=Je(function(){return Vr(/Chrome/i)}),vc=Je(function(){return Vr(/Android/i)}),yc=Je(function(){return Vr(/Firefox/i)});function rr(e,t,r=!0){var n,o;let{metaKey:s,ctrlKey:l,altKey:c,shiftKey:d}=t;yc()&&(!((o=window.event)===null||o===void 0||(n=o.type)===null||n===void 0)&&n.startsWith("key"))&&e.target==="_blank"&&(tr()?s=!0:l=!0);let u=bc()&&tr()&&!os()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:s,ctrlKey:l,altKey:c,shiftKey:d}):new MouseEvent("click",{metaKey:s,ctrlKey:l,altKey:c,shiftKey:d,detail:1,bubbles:!0,cancelable:!0});rr.isOpening=r,uc(e),e.dispatchEvent(u),rr.isOpening=!1}rr.isOpening=!1;function is(){let e=a.useRef(new Map),t=a.useCallback((o,s,l,c)=>{let d=c!=null&&c.once?(...u)=>{e.current.delete(l),l(...u)}:l;e.current.set(l,{type:s,eventTarget:o,fn:d,options:c}),o.addEventListener(s,d,c)},[]),r=a.useCallback((o,s,l,c)=>{var d;let u=((d=e.current.get(l))===null||d===void 0?void 0:d.fn)||l;o.removeEventListener(s,u,c),e.current.delete(l)},[]),n=a.useCallback(()=>{e.current.forEach((o,s)=>{r(o.eventTarget,o.type,s,o.options)})},[r]);return a.useEffect(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}function $c(e){return e.pointerType===""&&e.isTrusted?!0:vc()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ss(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function wc(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function as(e){let t=a.useRef({isFocused:!1,observer:null});return ac(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]),a.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=r.target,o=s=>{if(t.current.isFocused=!1,n.disabled){let l=ss(s);e==null||e(l)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};n.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let l=n===document.activeElement?null:document.activeElement;n.dispatchEvent(new FocusEvent("blur",{relatedTarget:l})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:l}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}},[e])}let kc=!1,cr=null,Ln=new Set,qt=new Map,$t=!1,Tn=!1;const Cc={Tab:!0,Escape:!0};function Vn(e,t){for(let r of Ln)r(e,t)}function jc(e){return!(e.metaKey||!tr()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Or(e){$t=!0,!rr.isOpening&&jc(e)&&(cr="keyboard",Vn("keyboard",e))}function Oe(e){cr="pointer","pointerType"in e&&e.pointerType,(e.type==="mousedown"||e.type==="pointerdown")&&($t=!0,Vn("pointer",e))}function ls(e){!rr.isOpening&&$c(e)&&($t=!0,cr="virtual")}function cs(e){e.target===window||e.target===document||kc||!e.isTrusted||(!$t&&!Tn&&(cr="virtual",Vn("virtual",e)),$t=!1,Tn=!1)}function ds(){$t=!1,Tn=!0}function Fn(e){if(typeof window>"u"||typeof document>"u"||qt.get(bt(e)))return;const t=bt(e),r=ct(e);let n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){$t=!0,n.apply(this,arguments)},r.addEventListener("keydown",Or,!0),r.addEventListener("keyup",Or,!0),r.addEventListener("click",ls,!0),t.addEventListener("focus",cs,!0),t.addEventListener("blur",ds,!1),typeof PointerEvent<"u"?(r.addEventListener("pointerdown",Oe,!0),r.addEventListener("pointermove",Oe,!0),r.addEventListener("pointerup",Oe,!0)):process.env.NODE_ENV==="test"&&(r.addEventListener("mousedown",Oe,!0),r.addEventListener("mousemove",Oe,!0),r.addEventListener("mouseup",Oe,!0)),t.addEventListener("beforeunload",()=>{us(e)},{once:!0}),qt.set(t,{focus:n})}const us=(e,t)=>{const r=bt(e),n=ct(e);t&&n.removeEventListener("DOMContentLoaded",t),qt.has(r)&&(r.HTMLElement.prototype.focus=qt.get(r).focus,n.removeEventListener("keydown",Or,!0),n.removeEventListener("keyup",Or,!0),n.removeEventListener("click",ls,!0),r.removeEventListener("focus",cs,!0),r.removeEventListener("blur",ds,!1),typeof PointerEvent<"u"?(n.removeEventListener("pointerdown",Oe,!0),n.removeEventListener("pointermove",Oe,!0),n.removeEventListener("pointerup",Oe,!0)):process.env.NODE_ENV==="test"&&(n.removeEventListener("mousedown",Oe,!0),n.removeEventListener("mousemove",Oe,!0),n.removeEventListener("mouseup",Oe,!0)),qt.delete(r))};function Ec(e){const t=ct(e);let r;return t.readyState!=="loading"?Fn(e):(r=()=>{Fn(e)},t.addEventListener("DOMContentLoaded",r)),()=>us(e,r)}typeof document<"u"&&Ec();function fs(){return cr!=="pointer"}const Sc=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Lc(e,t,r){let n=ct(r==null?void 0:r.target);const o=typeof window<"u"?bt(r==null?void 0:r.target).HTMLInputElement:HTMLInputElement,s=typeof window<"u"?bt(r==null?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,l=typeof window<"u"?bt(r==null?void 0:r.target).HTMLElement:HTMLElement,c=typeof window<"u"?bt(r==null?void 0:r.target).KeyboardEvent:KeyboardEvent;return e=e||n.activeElement instanceof o&&!Sc.has(n.activeElement.type)||n.activeElement instanceof s||n.activeElement instanceof l&&n.activeElement.isContentEditable,!(e&&t==="keyboard"&&r instanceof c&&!Cc[r.key])}function Tc(e,t,r){Fn(),a.useEffect(()=>{let n=(o,s)=>{Lc(!!(r!=null&&r.isTextInput),o,s)&&e(fs())};return Ln.add(n),()=>{Ln.delete(n)}},t)}function Fc(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e;const s=a.useCallback(d=>{if(d.target===d.currentTarget)return n&&n(d),o&&o(!1),!0},[n,o]),l=as(s),c=a.useCallback(d=>{const u=ct(d.target),f=u?Sn(u):Sn();d.target===d.currentTarget&&f===ns(d.nativeEvent)&&(r&&r(d),o&&o(!0),l(d))},[o,r,l]);return{focusProps:{onFocus:!t&&(r||o||n)?c:void 0,onBlur:!t&&(n||o)?s:void 0}}}function Rc(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,s=a.useRef({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:c}=is(),d=a.useCallback(h=>{h.currentTarget.contains(h.target)&&s.current.isFocusWithin&&!h.currentTarget.contains(h.relatedTarget)&&(s.current.isFocusWithin=!1,c(),r&&r(h),o&&o(!1))},[r,o,s,c]),u=as(d),f=a.useCallback(h=>{if(!h.currentTarget.contains(h.target))return;const m=ct(h.target),p=Sn(m);if(!s.current.isFocusWithin&&p===ns(h.nativeEvent)){n&&n(h),o&&o(!0),s.current.isFocusWithin=!0,u(h);let g=h.currentTarget;l(m,"focus",v=>{if(s.current.isFocusWithin&&!rs(g,v.target)){let y=new m.defaultView.FocusEvent("blur",{relatedTarget:v.target});wc(y,g);let b=ss(y);d(b)}},{capture:!0})}},[n,o,u,l,d]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:f,onBlur:d}}}let Mr=!1,yr=0;function Rn(){Mr=!0,setTimeout(()=>{Mr=!1},50)}function ko(e){e.pointerType==="touch"&&Rn()}function Dc(){if(!(typeof document>"u"))return yr===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",ko):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",Rn)),yr++,()=>{yr--,!(yr>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",ko):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",Rn))}}function Oc(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[s,l]=a.useState(!1),c=a.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;a.useEffect(Dc,[]);let{addGlobalListener:d,removeAllGlobalListeners:u}=is(),{hoverProps:f,triggerHoverEnd:h}=a.useMemo(()=>{let m=(v,y)=>{if(c.pointerType=y,o||y==="touch"||c.isHovered||!v.currentTarget.contains(v.target))return;c.isHovered=!0;let b=v.currentTarget;c.target=b,d(ct(v.target),"pointerover",w=>{c.isHovered&&c.target&&!rs(c.target,w.target)&&p(w,w.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:b,pointerType:y}),r&&r(!0),l(!0)},p=(v,y)=>{let b=c.target;c.pointerType="",c.target=null,!(y==="touch"||!c.isHovered||!b)&&(c.isHovered=!1,u(),n&&n({type:"hoverend",target:b,pointerType:y}),r&&r(!1),l(!1))},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=v=>{Mr&&v.pointerType==="mouse"||m(v,v.pointerType)},g.onPointerLeave=v=>{!o&&v.currentTarget.contains(v.target)&&p(v,v.pointerType)}):process.env.NODE_ENV==="test"&&(g.onTouchStart=()=>{c.ignoreEmulatedMouseEvents=!0},g.onMouseEnter=v=>{!c.ignoreEmulatedMouseEvents&&!Mr&&m(v,"mouse"),c.ignoreEmulatedMouseEvents=!1},g.onMouseLeave=v=>{!o&&v.currentTarget.contains(v.target)&&p(v,"mouse")}),{hoverProps:g,triggerHoverEnd:p}},[t,r,n,o,c,d,u]);return a.useEffect(()=>{o&&h({currentTarget:c.target},c.pointerType)},[o]),{hoverProps:f,isHovered:s}}function Mc(e={}){let{autoFocus:t=!1,isTextInput:r,within:n}=e,o=a.useRef({isFocused:!1,isFocusVisible:t||fs()}),[s,l]=a.useState(!1),[c,d]=a.useState(()=>o.current.isFocused&&o.current.isFocusVisible),u=a.useCallback(()=>d(o.current.isFocused&&o.current.isFocusVisible),[]),f=a.useCallback(p=>{o.current.isFocused=p,l(p),u()},[u]);Tc(p=>{o.current.isFocusVisible=p,u()},[],{isTextInput:r});let{focusProps:h}=Fc({isDisabled:n,onFocusChange:f}),{focusWithinProps:m}=Rc({isDisabled:!n,onFocusWithinChange:f});return{isFocused:s,isFocusVisible:c,focusProps:n?m:h}}var Ac=Object.defineProperty,Pc=(e,t,r)=>t in e?Ac(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,un=(e,t,r)=>(Pc(e,typeof t!="symbol"?t+"":t,r),r);let Nc=class{constructor(){un(this,"current",this.detect()),un(this,"handoffState","pending"),un(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Be=new Nc;function Wt(e){var t;return Be.isServer?null:e==null?document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function Ar(e){var t,r;return Be.isServer?null:e==null?document:(r=(t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))!=null?r:document}function ps(e){var t,r;return(r=(t=Ar(e))==null?void 0:t.activeElement)!=null?r:null}function hs(e){return ps(e)===e}function Gr(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Te(){let e=[],t={addEventListener(r,n,o,s){return r.addEventListener(n,o,s),t.add(()=>r.removeEventListener(n,o,s))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return t.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return Gr(()=>{n.current&&r[0]()}),t.add(()=>{n.current=!1})},style(r,n,o){let s=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:o}),this.add(()=>{Object.assign(r.style,{[n]:s})})},group(r){let n=Te();return r(n),this.add(()=>n.dispose())},add(r){return e.includes(r)||e.push(r),()=>{let n=e.indexOf(r);if(n>=0)for(let o of e.splice(n,1))o()}},dispose(){for(let r of e.splice(0))r()}};return t}function dt(){let[e]=a.useState(Te);return a.useEffect(()=>()=>e.dispose(),[e]),e}let le=(e,t)=>{Be.isServer?a.useEffect(e,t):a.useLayoutEffect(e,t)};function ut(e){let t=a.useRef(e);return le(()=>{t.current=e},[e]),t}let Z=function(e){let t=ut(e);return a.useCallback((...r)=>t.current(...r),[t])};function zc(e){let t=e.width/2,r=e.height/2;return{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}function Ic(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function Bc({disabled:e=!1}={}){let t=a.useRef(null),[r,n]=a.useState(!1),o=dt(),s=Z(()=>{t.current=null,n(!1),o.dispose()}),l=Z(c=>{if(o.dispose(),t.current===null){t.current=c.currentTarget,n(!0);{let d=Wt(c.currentTarget);o.addEventListener(d,"pointerup",s,!1),o.addEventListener(d,"pointermove",u=>{if(t.current){let f=zc(u);n(Ic(f,t.current.getBoundingClientRect()))}},!1),o.addEventListener(d,"pointercancel",s,!1)}}});return{pressed:r,pressProps:e?{}:{onPointerDown:l,onPointerUp:s,onClick:s}}}function Me(e){return a.useMemo(()=>e,Object.values(e))}let Wc=a.createContext(void 0);function Gn(){return a.useContext(Wc)}function Dn(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function ke(e,t,...r){if(e in t){let o=t[e];return typeof o=="function"?o(...r):o}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ke),n}var Pt=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Pt||{}),it=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(it||{});function he(){let e=_c();return a.useCallback(t=>Hc({mergeRefs:e,...t}),[e])}function Hc({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:o,visible:s=!0,name:l,mergeRefs:c}){c=c??Vc;let d=gs(t,e);if(s)return $r(d,r,n,l,c);let u=o??0;if(u&2){let{static:f=!1,...h}=d;if(f)return $r(h,r,n,l,c)}if(u&1){let{unmount:f=!0,...h}=d;return ke(f?0:1,{0(){return null},1(){return $r({...h,hidden:!0,style:{display:"none"}},r,n,l,c)}})}return $r(d,r,n,l,c)}function $r(e,t={},r,n,o){let{as:s=r,children:l,refName:c="ref",...d}=fn(e,["unmount","static"]),u=e.ref!==void 0?{[c]:e.ref}:{},f=typeof l=="function"?l(t):l;"className"in d&&d.className&&typeof d.className=="function"&&(d.className=d.className(t)),d["aria-labelledby"]&&d["aria-labelledby"]===d.id&&(d["aria-labelledby"]=void 0);let h={};if(t){let m=!1,p=[];for(let[g,v]of Object.entries(t))typeof v=="boolean"&&(m=!0),v===!0&&p.push(g.replace(/([A-Z])/g,y=>`-${y.toLowerCase()}`));if(m){h["data-headlessui-state"]=p.join(" ");for(let g of p)h[`data-${g}`]=""}}if(Xt(s)&&(Object.keys(et(d)).length>0||Object.keys(et(h)).length>0))if(!a.isValidElement(f)||Array.isArray(f)&&f.length>1||Uc(f)){if(Object.keys(et(d)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(et(d)).concat(Object.keys(et(h))).map(m=>` - ${m}`).join(`
679
679
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(m=>` - ${m}`).join(`
680
680
  `)].join(`
681
- `))}else{let m=f.props,p=m==null?void 0:m.className,g=typeof p=="function"?(...b)=>Dn(p(...b),d.className):Dn(p,d.className),v=g?{className:g}:{},y=gs(f.props,tt(pn(d,["ref"])));for(let b in h)b in y&&delete h[b];return a.cloneElement(f,Object.assign({},y,h,u,{ref:o(Gc(f),u.ref)},v))}return a.createElement(i,Object.assign({},pn(d,["ref"]),!Qt(i)&&u,!Qt(i)&&h),f)}function _c(){let e=a.useRef([]),t=a.useCallback(r=>{for(let n of e.current)n!=null&&(typeof n=="function"?n(r):n.current=r)},[]);return(...r)=>{if(!r.every(n=>n==null))return e.current=r,t}}function Vc(...e){return e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}function gs(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(r[o]!=null||(r[o]=[]),r[o].push(n[o])):t[o]=n[o];if(t.disabled||t["aria-disabled"])for(let n in r)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n)&&(r[n]=[o=>{var i;return(i=o==null?void 0:o.preventDefault)==null?void 0:i.call(o)}]);for(let n in r)Object.assign(t,{[n](o,...i){let l=r[n];for(let c of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;c(o,...i)}}});return t}function ms(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(r[o]!=null||(r[o]=[]),r[o].push(n[o])):t[o]=n[o];for(let n in r)Object.assign(t,{[n](...o){let i=r[n];for(let l of i)l==null||l(...o)}});return t}function de(e){var t;return Object.assign(a.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function tt(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function pn(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}function Gc(e){return a.version.split(".")[0]>="19"?e.props.ref:e.ref}function Qt(e){return e===a.Fragment||e===Symbol.for("react.fragment")}function Uc(e){return Qt(e.type)}function Kc(e,t,r){let[n,o]=a.useState(r),i=e!==void 0,l=a.useRef(i),c=a.useRef(!1),d=a.useRef(!1);return i&&!l.current&&!c.current?(c.current=!0,l.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&l.current&&!d.current&&(d.current=!0,l.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:n,Z(u=>(i||He.flushSync(()=>o(u)),t==null?void 0:t(u)))]}function Yc(e){let[t]=a.useState(e);return t}function bs(e={},t=null,r=[]){for(let[n,o]of Object.entries(e))vs(r,xs(t,n),o);return r}function xs(e,t){return e?e+"["+t+"]":t}function vs(e,t,r){if(Array.isArray(r))for(let[n,o]of r.entries())vs(e,xs(t,n.toString()),o);else r instanceof Date?e.push([t,r.toISOString()]):typeof r=="boolean"?e.push([t,r?"1":"0"]):typeof r=="string"?e.push([t,r]):typeof r=="number"?e.push([t,`${r}`]):r==null?e.push([t,""]):Xc(r)&&!a.isValidElement(r)&&bs(r,t,e)}function qc(e){var t,r;let n=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(n){for(let o of n.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(r=n.requestSubmit)==null||r.call(n)}}function Xc(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}let Qc="span";var zt=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(zt||{});function Zc(e,t){var r;let{features:n=1,...o}=e,i={ref:t,"aria-hidden":(n&2)===2?!0:(r=o["aria-hidden"])!=null?r:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return he()({ourProps:i,theirProps:o,slot:{},defaultTag:Qc,name:"Hidden"})}let or=de(Zc),Jc=a.createContext(null);function ed({children:e}){let t=a.useContext(Jc);if(!t)return a.createElement(a.Fragment,null,e);let{target:r}=t;return r?He.createPortal(a.createElement(a.Fragment,null,e),r):null}function td({data:e,form:t,disabled:r,onReset:n,overrides:o}){let[i,l]=a.useState(null),c=ut();return a.useEffect(()=>{if(n&&i)return c.addEventListener(i,"reset",n)},[i,t,n]),a.createElement(ed,null,a.createElement(rd,{setForm:l,formId:t}),bs(e).map(([d,u])=>a.createElement(or,{features:zt.Hidden,...tt({key:d,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:r,name:d,value:u,...o})})))}function rd({setForm:e,formId:t}){return a.useEffect(()=>{if(t){let r=document.getElementById(t);r&&e(r)}},[e,t]),t?null:a.createElement(or,{features:zt.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:r=>{if(!r)return;let n=r.closest("form");n&&e(n)}})}let nd=a.createContext(void 0);function ys(){return a.useContext(nd)}function ws(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function Ze(e){return ws(e)&&"tagName"in e}function Le(e){return Ze(e)&&"accessKey"in e}function Xe(e){return Ze(e)&&"tabIndex"in e}function od(e){return Ze(e)&&"style"in e}function id(e){return Le(e)&&e.nodeName==="IFRAME"}function $s(e){return Le(e)&&e.nodeName==="INPUT"}function Co(e){return Le(e)&&e.nodeName==="LABEL"}function sd(e){return Le(e)&&e.nodeName==="FIELDSET"}function ks(e){return Le(e)&&e.nodeName==="LEGEND"}function ad(e){return Ze(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function jo(e){let t=e.parentElement,r=null;for(;t&&!sd(t);)ks(t)&&(r=t),t=t.parentElement;let n=(t==null?void 0:t.getAttribute("disabled"))==="";return n&&ld(r)?!1:n}function ld(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(ks(t))return!1;t=t.previousElementSibling}return!0}let Cs=Symbol();function cd(e,t=!0){return Object.assign(e,{[Cs]:t})}function ye(...e){let t=a.useRef(e);a.useEffect(()=>{t.current=e},[e]);let r=Z(n=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(n):o.current=n)});return e.every(n=>n==null||(n==null?void 0:n[Cs]))?void 0:r}let Kr=a.createContext(null);Kr.displayName="DescriptionContext";function js(){let e=a.useContext(Kr);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,js),t}return e}function dd(){var e,t;return(t=(e=a.useContext(Kr))==null?void 0:e.value)!=null?t:void 0}function ud(){let[e,t]=a.useState([]);return[e.length>0?e.join(" "):void 0,a.useMemo(()=>function(r){let n=Z(i=>(t(l=>[...l,i]),()=>t(l=>{let c=l.slice(),d=c.indexOf(i);return d!==-1&&c.splice(d,1),c}))),o=a.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props,value:r.value}),[n,r.slot,r.name,r.props,r.value]);return a.createElement(Kr.Provider,{value:o},r.children)},[t])]}let fd="p";function pd(e,t){let r=a.useId(),n=Gn(),{id:o=`headlessui-description-${r}`,...i}=e,l=js(),c=ye(t);le(()=>l.register(o),[o,l.register]);let d=Me({...l.slot,disabled:n||!1}),u={ref:c,...l.props,id:o};return he()({ourProps:u,theirProps:i,slot:d,defaultTag:fd,name:l.name||"Description"})}let hd=de(pd),gd=Object.assign(hd,{});var fe=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(fe||{});let Yr=a.createContext(null);Yr.displayName="LabelContext";function Es(){let e=a.useContext(Yr);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Es),t}return e}function Ss(e){var t,r,n;let o=(r=(t=a.useContext(Yr))==null?void 0:t.value)!=null?r:void 0;return((n=e==null?void 0:e.length)!=null?n:0)>0?[o,...e].filter(Boolean).join(" "):o}function md({inherit:e=!1}={}){let t=Ss(),[r,n]=a.useState([]),o=e?[t,...r].filter(Boolean):r;return[o.length>0?o.join(" "):void 0,a.useMemo(()=>function(i){let l=Z(d=>(n(u=>[...u,d]),()=>n(u=>{let f=u.slice(),h=f.indexOf(d);return h!==-1&&f.splice(h,1),f}))),c=a.useMemo(()=>({register:l,slot:i.slot,name:i.name,props:i.props,value:i.value}),[l,i.slot,i.name,i.props,i.value]);return a.createElement(Yr.Provider,{value:c},i.children)},[n])]}let bd="label";function xd(e,t){var r;let n=a.useId(),o=Es(),i=ys(),l=Gn(),{id:c=`headlessui-label-${n}`,htmlFor:d=i??((r=o.props)==null?void 0:r.htmlFor),passive:u=!1,...f}=e,h=ye(t);le(()=>o.register(c),[c,o.register]);let m=Z(v=>{let y=v.currentTarget;if(!(v.target!==v.currentTarget&&ad(v.target))&&(Co(y)&&v.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(v),Co(y))){let b=document.getElementById(y.htmlFor);if(b){let w=b.getAttribute("disabled");if(w==="true"||w==="")return;let x=b.getAttribute("aria-disabled");if(x==="true"||x==="")return;($s(b)&&(b.type==="file"||b.type==="radio"||b.type==="checkbox")||b.role==="radio"||b.role==="checkbox"||b.role==="switch")&&b.click(),b.focus({preventScroll:!0})}}}),p=Me({...o.slot,disabled:l||!1}),g={ref:h,...o.props,id:c,htmlFor:d,onClick:m};return u&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in f&&delete f.onClick),he()({ourProps:g,theirProps:f,slot:p,defaultTag:d?bd:"div",name:o.name||"Label"})}let vd=de(xd),yd=Object.assign(vd,{}),wd=a.createContext(()=>{});function $d({value:e,children:t}){return a.createElement(wd.Provider,{value:e},t)}function kd(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function Cd(e=kd){return a.useCallback((t,r)=>{if(typeof e=="string"){let n=e;return(t==null?void 0:t[n])===(r==null?void 0:r[n])}return e(t,r)},[e])}function Eo(e){if(e===null)return{width:0,height:0};let{width:t,height:r}=e.getBoundingClientRect();return{width:t,height:r}}function jd(e,t,r=!1){let[n,o]=a.useState(()=>Eo(t));return le(()=>{if(!t||!e)return;let i=Te();return i.requestAnimationFrame(function l(){i.requestAnimationFrame(l),o(c=>{let d=Eo(t);return d.width===c.width&&d.height===c.height?c:d})}),()=>{i.dispose()}},[t,e]),r?{width:`${n.width}px`,height:`${n.height}px`}:n}var Ls=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Ls||{});function Ed(e){let t=a.useRef(null),r=Z(o=>{t.current=o.pointerType,!jo(o.currentTarget)&&o.pointerType==="mouse"&&o.button===Ls.Left&&(o.preventDefault(),e(o))}),n=Z(o=>{t.current!=="mouse"&&(jo(o.currentTarget)||e(o))});return{onPointerDown:r,onClick:n}}let Ts=class extends Map{constructor(t){super(),this.factory=t}get(t){let r=super.get(t);return r===void 0&&(r=this.factory(t),this.set(t,r)),r}};var Sd=Object.defineProperty,Ld=(e,t,r)=>t in e?Sd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Td=(e,t,r)=>(Ld(e,t+"",r),r),Fs=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},Fe=(e,t,r)=>(Fs(e,t,"read from private field"),r?r.call(e):t.get(e)),hn=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},So=(e,t,r,n)=>(Fs(e,t,"write to private field"),t.set(e,r),r),ze,Kt,Yt;let Rs=class{constructor(t){hn(this,ze,{}),hn(this,Kt,new Ts(()=>new Set)),hn(this,Yt,new Set),Td(this,"disposables",Te()),So(this,ze,t),Ie.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return Fe(this,ze)}subscribe(t,r){if(Ie.isServer)return()=>{};let n={selector:t,callback:r,current:t(Fe(this,ze))};return Fe(this,Yt).add(n),this.disposables.add(()=>{Fe(this,Yt).delete(n)})}on(t,r){return Ie.isServer?()=>{}:(Fe(this,Kt).get(t).add(r),this.disposables.add(()=>{Fe(this,Kt).get(t).delete(r)}))}send(t){let r=this.reduce(Fe(this,ze),t);if(r!==Fe(this,ze)){So(this,ze,r);for(let n of Fe(this,Yt)){let o=n.selector(Fe(this,ze));Ds(n.current,o)||(n.current=o,n.callback(o))}for(let n of Fe(this,Kt).get(t.type))n(Fe(this,ze),t)}}};ze=new WeakMap,Kt=new WeakMap,Yt=new WeakMap;function Ds(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null?!1:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:gn(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:gn(e.entries(),t.entries()):Lo(e)&&Lo(t)?gn(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function gn(e,t){do{let r=e.next(),n=t.next();if(r.done&&n.done)return!0;if(r.done||n.done||!Object.is(r.value,n.value))return!1}while(!0)}function Lo(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function mn(e){let[t,r]=e(),n=Te();return(...o)=>{t(...o),n.dispose(),n.microTask(r)}}var Fd=Object.defineProperty,Rd=(e,t,r)=>t in e?Fd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,To=(e,t,r)=>(Rd(e,typeof t!="symbol"?t+"":t,r),r),Os=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(Os||{});let Dd={0(e,t){let r=t.id,n=e.stack,o=e.stack.indexOf(r);if(o!==-1){let i=e.stack.slice();return i.splice(o,1),i.push(r),n=i,{...e,stack:n}}return{...e,stack:[...e.stack,r]}},1(e,t){let r=t.id,n=e.stack.indexOf(r);if(n===-1)return e;let o=e.stack.slice();return o.splice(n,1),{...e,stack:o}}},Od=class Ms extends Rs{constructor(){super(...arguments),To(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),To(this,"selectors",{isTop:(t,r)=>t.stack[t.stack.length-1]===r,inStack:(t,r)=>t.stack.includes(r)})}static new(){return new Ms({stack:[]})}reduce(t,r){return ke(r.type,Dd,t,r)}};const qr=new Ts(()=>Od.new());var kr={exports:{}},bn={};/**
681
+ `))}else{let m=f.props,p=m==null?void 0:m.className,g=typeof p=="function"?(...b)=>Dn(p(...b),d.className):Dn(p,d.className),v=g?{className:g}:{},y=gs(f.props,et(fn(d,["ref"])));for(let b in h)b in y&&delete h[b];return a.cloneElement(f,Object.assign({},y,h,u,{ref:o(Gc(f),u.ref)},v))}return a.createElement(s,Object.assign({},fn(d,["ref"]),!Xt(s)&&u,!Xt(s)&&h),f)}function _c(){let e=a.useRef([]),t=a.useCallback(r=>{for(let n of e.current)n!=null&&(typeof n=="function"?n(r):n.current=r)},[]);return(...r)=>{if(!r.every(n=>n==null))return e.current=r,t}}function Vc(...e){return e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}function gs(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(r[o]!=null||(r[o]=[]),r[o].push(n[o])):t[o]=n[o];if(t.disabled||t["aria-disabled"])for(let n in r)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n)&&(r[n]=[o=>{var s;return(s=o==null?void 0:o.preventDefault)==null?void 0:s.call(o)}]);for(let n in r)Object.assign(t,{[n](o,...s){let l=r[n];for(let c of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;c(o,...s)}}});return t}function ms(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(r[o]!=null||(r[o]=[]),r[o].push(n[o])):t[o]=n[o];for(let n in r)Object.assign(t,{[n](...o){let s=r[n];for(let l of s)l==null||l(...o)}});return t}function de(e){var t;return Object.assign(a.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function et(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function fn(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}function Gc(e){return a.version.split(".")[0]>="19"?e.props.ref:e.ref}function Xt(e){return e===a.Fragment||e===Symbol.for("react.fragment")}function Uc(e){return Xt(e.type)}function Kc(e,t,r){let[n,o]=a.useState(r),s=e!==void 0,l=a.useRef(s),c=a.useRef(!1),d=a.useRef(!1);return s&&!l.current&&!c.current?(c.current=!0,l.current=s,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!s&&l.current&&!d.current&&(d.current=!0,l.current=s,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[s?e:n,Z(u=>(s||He.flushSync(()=>o(u)),t==null?void 0:t(u)))]}function Yc(e){let[t]=a.useState(e);return t}function bs(e={},t=null,r=[]){for(let[n,o]of Object.entries(e))vs(r,xs(t,n),o);return r}function xs(e,t){return e?e+"["+t+"]":t}function vs(e,t,r){if(Array.isArray(r))for(let[n,o]of r.entries())vs(e,xs(t,n.toString()),o);else r instanceof Date?e.push([t,r.toISOString()]):typeof r=="boolean"?e.push([t,r?"1":"0"]):typeof r=="string"?e.push([t,r]):typeof r=="number"?e.push([t,`${r}`]):r==null?e.push([t,""]):Xc(r)&&!a.isValidElement(r)&&bs(r,t,e)}function qc(e){var t,r;let n=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(n){for(let o of n.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(r=n.requestSubmit)==null||r.call(n)}}function Xc(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}let Qc="span";var Nt=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Nt||{});function Zc(e,t){var r;let{features:n=1,...o}=e,s={ref:t,"aria-hidden":(n&2)===2?!0:(r=o["aria-hidden"])!=null?r:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return he()({ourProps:s,theirProps:o,slot:{},defaultTag:Qc,name:"Hidden"})}let nr=de(Zc),Jc=a.createContext(null);function ed({children:e}){let t=a.useContext(Jc);if(!t)return a.createElement(a.Fragment,null,e);let{target:r}=t;return r?He.createPortal(a.createElement(a.Fragment,null,e),r):null}function td({data:e,form:t,disabled:r,onReset:n,overrides:o}){let[s,l]=a.useState(null),c=dt();return a.useEffect(()=>{if(n&&s)return c.addEventListener(s,"reset",n)},[s,t,n]),a.createElement(ed,null,a.createElement(rd,{setForm:l,formId:t}),bs(e).map(([d,u])=>a.createElement(nr,{features:Nt.Hidden,...et({key:d,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:r,name:d,value:u,...o})})))}function rd({setForm:e,formId:t}){return a.useEffect(()=>{if(t){let r=document.getElementById(t);r&&e(r)}},[e,t]),t?null:a.createElement(nr,{features:Nt.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:r=>{if(!r)return;let n=r.closest("form");n&&e(n)}})}let nd=a.createContext(void 0);function ys(){return a.useContext(nd)}function $s(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function Qe(e){return $s(e)&&"tagName"in e}function Le(e){return Qe(e)&&"accessKey"in e}function qe(e){return Qe(e)&&"tabIndex"in e}function od(e){return Qe(e)&&"style"in e}function id(e){return Le(e)&&e.nodeName==="IFRAME"}function ws(e){return Le(e)&&e.nodeName==="INPUT"}function Co(e){return Le(e)&&e.nodeName==="LABEL"}function sd(e){return Le(e)&&e.nodeName==="FIELDSET"}function ks(e){return Le(e)&&e.nodeName==="LEGEND"}function ad(e){return Qe(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function jo(e){let t=e.parentElement,r=null;for(;t&&!sd(t);)ks(t)&&(r=t),t=t.parentElement;let n=(t==null?void 0:t.getAttribute("disabled"))==="";return n&&ld(r)?!1:n}function ld(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(ks(t))return!1;t=t.previousElementSibling}return!0}let Cs=Symbol();function cd(e,t=!0){return Object.assign(e,{[Cs]:t})}function ye(...e){let t=a.useRef(e);a.useEffect(()=>{t.current=e},[e]);let r=Z(n=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(n):o.current=n)});return e.every(n=>n==null||(n==null?void 0:n[Cs]))?void 0:r}let Ur=a.createContext(null);Ur.displayName="DescriptionContext";function js(){let e=a.useContext(Ur);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,js),t}return e}function dd(){var e,t;return(t=(e=a.useContext(Ur))==null?void 0:e.value)!=null?t:void 0}function ud(){let[e,t]=a.useState([]);return[e.length>0?e.join(" "):void 0,a.useMemo(()=>function(r){let n=Z(s=>(t(l=>[...l,s]),()=>t(l=>{let c=l.slice(),d=c.indexOf(s);return d!==-1&&c.splice(d,1),c}))),o=a.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props,value:r.value}),[n,r.slot,r.name,r.props,r.value]);return a.createElement(Ur.Provider,{value:o},r.children)},[t])]}let fd="p";function pd(e,t){let r=a.useId(),n=Gn(),{id:o=`headlessui-description-${r}`,...s}=e,l=js(),c=ye(t);le(()=>l.register(o),[o,l.register]);let d=Me({...l.slot,disabled:n||!1}),u={ref:c,...l.props,id:o};return he()({ourProps:u,theirProps:s,slot:d,defaultTag:fd,name:l.name||"Description"})}let hd=de(pd),gd=Object.assign(hd,{});var fe=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(fe||{});let Kr=a.createContext(null);Kr.displayName="LabelContext";function Es(){let e=a.useContext(Kr);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Es),t}return e}function Ss(e){var t,r,n;let o=(r=(t=a.useContext(Kr))==null?void 0:t.value)!=null?r:void 0;return((n=e==null?void 0:e.length)!=null?n:0)>0?[o,...e].filter(Boolean).join(" "):o}function md({inherit:e=!1}={}){let t=Ss(),[r,n]=a.useState([]),o=e?[t,...r].filter(Boolean):r;return[o.length>0?o.join(" "):void 0,a.useMemo(()=>function(s){let l=Z(d=>(n(u=>[...u,d]),()=>n(u=>{let f=u.slice(),h=f.indexOf(d);return h!==-1&&f.splice(h,1),f}))),c=a.useMemo(()=>({register:l,slot:s.slot,name:s.name,props:s.props,value:s.value}),[l,s.slot,s.name,s.props,s.value]);return a.createElement(Kr.Provider,{value:c},s.children)},[n])]}let bd="label";function xd(e,t){var r;let n=a.useId(),o=Es(),s=ys(),l=Gn(),{id:c=`headlessui-label-${n}`,htmlFor:d=s??((r=o.props)==null?void 0:r.htmlFor),passive:u=!1,...f}=e,h=ye(t);le(()=>o.register(c),[c,o.register]);let m=Z(v=>{let y=v.currentTarget;if(!(v.target!==v.currentTarget&&ad(v.target))&&(Co(y)&&v.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(v),Co(y))){let b=document.getElementById(y.htmlFor);if(b){let w=b.getAttribute("disabled");if(w==="true"||w==="")return;let x=b.getAttribute("aria-disabled");if(x==="true"||x==="")return;(ws(b)&&(b.type==="file"||b.type==="radio"||b.type==="checkbox")||b.role==="radio"||b.role==="checkbox"||b.role==="switch")&&b.click(),b.focus({preventScroll:!0})}}}),p=Me({...o.slot,disabled:l||!1}),g={ref:h,...o.props,id:c,htmlFor:d,onClick:m};return u&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in f&&delete f.onClick),he()({ourProps:g,theirProps:f,slot:p,defaultTag:d?bd:"div",name:o.name||"Label"})}let vd=de(xd),yd=Object.assign(vd,{}),$d=a.createContext(()=>{});function wd({value:e,children:t}){return a.createElement($d.Provider,{value:e},t)}function kd(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function Cd(e=kd){return a.useCallback((t,r)=>{if(typeof e=="string"){let n=e;return(t==null?void 0:t[n])===(r==null?void 0:r[n])}return e(t,r)},[e])}function Eo(e){if(e===null)return{width:0,height:0};let{width:t,height:r}=e.getBoundingClientRect();return{width:t,height:r}}function jd(e,t,r=!1){let[n,o]=a.useState(()=>Eo(t));return le(()=>{if(!t||!e)return;let s=Te();return s.requestAnimationFrame(function l(){s.requestAnimationFrame(l),o(c=>{let d=Eo(t);return d.width===c.width&&d.height===c.height?c:d})}),()=>{s.dispose()}},[t,e]),r?{width:`${n.width}px`,height:`${n.height}px`}:n}var Ls=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Ls||{});function Ed(e){let t=a.useRef(null),r=Z(o=>{t.current=o.pointerType,!jo(o.currentTarget)&&o.pointerType==="mouse"&&o.button===Ls.Left&&(o.preventDefault(),e(o))}),n=Z(o=>{t.current!=="mouse"&&(jo(o.currentTarget)||e(o))});return{onPointerDown:r,onClick:n}}let Ts=class extends Map{constructor(t){super(),this.factory=t}get(t){let r=super.get(t);return r===void 0&&(r=this.factory(t),this.set(t,r)),r}};var Sd=Object.defineProperty,Ld=(e,t,r)=>t in e?Sd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Td=(e,t,r)=>(Ld(e,t+"",r),r),Fs=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},Fe=(e,t,r)=>(Fs(e,t,"read from private field"),r?r.call(e):t.get(e)),pn=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},So=(e,t,r,n)=>(Fs(e,t,"write to private field"),t.set(e,r),r),ze,Ut,Kt;let Rs=class{constructor(t){pn(this,ze,{}),pn(this,Ut,new Ts(()=>new Set)),pn(this,Kt,new Set),Td(this,"disposables",Te()),So(this,ze,t),Be.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return Fe(this,ze)}subscribe(t,r){if(Be.isServer)return()=>{};let n={selector:t,callback:r,current:t(Fe(this,ze))};return Fe(this,Kt).add(n),this.disposables.add(()=>{Fe(this,Kt).delete(n)})}on(t,r){return Be.isServer?()=>{}:(Fe(this,Ut).get(t).add(r),this.disposables.add(()=>{Fe(this,Ut).get(t).delete(r)}))}send(t){let r=this.reduce(Fe(this,ze),t);if(r!==Fe(this,ze)){So(this,ze,r);for(let n of Fe(this,Kt)){let o=n.selector(Fe(this,ze));Ds(n.current,o)||(n.current=o,n.callback(o))}for(let n of Fe(this,Ut).get(t.type))n(Fe(this,ze),t)}}};ze=new WeakMap,Ut=new WeakMap,Kt=new WeakMap;function Ds(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null?!1:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:hn(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:hn(e.entries(),t.entries()):Lo(e)&&Lo(t)?hn(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function hn(e,t){do{let r=e.next(),n=t.next();if(r.done&&n.done)return!0;if(r.done||n.done||!Object.is(r.value,n.value))return!1}while(!0)}function Lo(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function gn(e){let[t,r]=e(),n=Te();return(...o)=>{t(...o),n.dispose(),n.microTask(r)}}var Fd=Object.defineProperty,Rd=(e,t,r)=>t in e?Fd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,To=(e,t,r)=>(Rd(e,typeof t!="symbol"?t+"":t,r),r),Os=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(Os||{});let Dd={0(e,t){let r=t.id,n=e.stack,o=e.stack.indexOf(r);if(o!==-1){let s=e.stack.slice();return s.splice(o,1),s.push(r),n=s,{...e,stack:n}}return{...e,stack:[...e.stack,r]}},1(e,t){let r=t.id,n=e.stack.indexOf(r);if(n===-1)return e;let o=e.stack.slice();return o.splice(n,1),{...e,stack:o}}},Od=class Ms extends Rs{constructor(){super(...arguments),To(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),To(this,"selectors",{isTop:(t,r)=>t.stack[t.stack.length-1]===r,inStack:(t,r)=>t.stack.includes(r)})}static new(){return new Ms({stack:[]})}reduce(t,r){return ke(r.type,Dd,t,r)}};const Yr=new Ts(()=>Od.new());var wr={exports:{}},mn={};/**
682
682
  * @license React
683
683
  * use-sync-external-store-with-selector.production.js
684
684
  *
@@ -686,7 +686,7 @@
686
686
  *
687
687
  * This source code is licensed under the MIT license found in the
688
688
  * LICENSE file in the root directory of this source tree.
689
- */var Fo;function Md(){if(Fo)return bn;Fo=1;var e=a;function t(d,u){return d===u&&(d!==0||1/d===1/u)||d!==d&&u!==u}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,o=e.useRef,i=e.useEffect,l=e.useMemo,c=e.useDebugValue;return bn.useSyncExternalStoreWithSelector=function(d,u,f,h,m){var p=o(null);if(p.current===null){var g={hasValue:!1,value:null};p.current=g}else g=p.current;p=l(function(){function y(E){if(!b){if(b=!0,w=E,E=h(E),m!==void 0&&g.hasValue){var F=g.value;if(m(F,E))return x=F}return x=E}if(F=x,r(w,E))return F;var T=h(E);return m!==void 0&&m(F,T)?(w=E,F):(w=E,x=T)}var b=!1,w,x,j=f===void 0?null:f;return[function(){return y(u())},j===null?void 0:function(){return y(j())}]},[u,f,h,m]);var v=n(d,p[0],p[1]);return i(function(){g.hasValue=!0,g.value=v},[v]),c(v),v},bn}var xn={};/**
689
+ */var Fo;function Md(){if(Fo)return mn;Fo=1;var e=a;function t(d,u){return d===u&&(d!==0||1/d===1/u)||d!==d&&u!==u}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,l=e.useMemo,c=e.useDebugValue;return mn.useSyncExternalStoreWithSelector=function(d,u,f,h,m){var p=o(null);if(p.current===null){var g={hasValue:!1,value:null};p.current=g}else g=p.current;p=l(function(){function y(E){if(!b){if(b=!0,w=E,E=h(E),m!==void 0&&g.hasValue){var F=g.value;if(m(F,E))return x=F}return x=E}if(F=x,r(w,E))return F;var T=h(E);return m!==void 0&&m(F,T)?(w=E,F):(w=E,x=T)}var b=!1,w,x,j=f===void 0?null:f;return[function(){return y(u())},j===null?void 0:function(){return y(j())}]},[u,f,h,m]);var v=n(d,p[0],p[1]);return s(function(){g.hasValue=!0,g.value=v},[v]),c(v),v},mn}var bn={};/**
690
690
  * @license React
691
691
  * use-sync-external-store-with-selector.development.js
692
692
  *
@@ -694,8 +694,8 @@
694
694
  *
695
695
  * This source code is licensed under the MIT license found in the
696
696
  * LICENSE file in the root directory of this source tree.
697
- */var Ro;function Ad(){return Ro||(Ro=1,process.env.NODE_ENV!=="production"&&(function(){function e(d,u){return d===u&&(d!==0||1/d===1/u)||d!==d&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=a,r=typeof Object.is=="function"?Object.is:e,n=t.useSyncExternalStore,o=t.useRef,i=t.useEffect,l=t.useMemo,c=t.useDebugValue;xn.useSyncExternalStoreWithSelector=function(d,u,f,h,m){var p=o(null);if(p.current===null){var g={hasValue:!1,value:null};p.current=g}else g=p.current;p=l(function(){function y(E){if(!b){if(b=!0,w=E,E=h(E),m!==void 0&&g.hasValue){var F=g.value;if(m(F,E))return x=F}return x=E}if(F=x,r(w,E))return F;var T=h(E);return m!==void 0&&m(F,T)?(w=E,F):(w=E,x=T)}var b=!1,w,x,j=f===void 0?null:f;return[function(){return y(u())},j===null?void 0:function(){return y(j())}]},[u,f,h,m]);var v=n(d,p[0],p[1]);return i(function(){g.hasValue=!0,g.value=v},[v]),c(v),v},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),xn}var Do;function Pd(){return Do||(Do=1,process.env.NODE_ENV==="production"?kr.exports=Md():kr.exports=Ad()),kr.exports}var Nd=Pd();function we(e,t,r=Ds){return Nd.useSyncExternalStoreWithSelector(Z(n=>e.subscribe(zd,n)),Z(()=>e.state),Z(()=>e.state),Z(t),r)}function zd(e){return e}function ur(e,t){let r=a.useId(),n=qr.get(t),[o,i]=we(n,a.useCallback(l=>[n.selectors.isTop(l,r),n.selectors.inStack(l,r)],[n,r]));return le(()=>{if(e)return n.actions.push(r),()=>n.actions.pop(r)},[n,e,r]),e?i?o:!0:!1}let On=new Map,Zt=new Map;function Oo(e){var t;let r=(t=Zt.get(e))!=null?t:0;return Zt.set(e,r+1),r!==0?()=>Mo(e):(On.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>Mo(e))}function Mo(e){var t;let r=(t=Zt.get(e))!=null?t:1;if(r===1?Zt.delete(e):Zt.set(e,r-1),r!==1)return;let n=On.get(e);n&&(n["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n["aria-hidden"]),e.inert=n.inert,On.delete(e))}function As(e,{allowed:t,disallowed:r}={}){let n=ur(e,"inert-others");le(()=>{var o,i;if(!n)return;let l=Te();for(let d of(o=r==null?void 0:r())!=null?o:[])d&&l.add(Oo(d));let c=(i=t==null?void 0:t())!=null?i:[];for(let d of c){if(!d)continue;let u=Ht(d);if(!u)continue;let f=d.parentElement;for(;f&&f!==u.body;){for(let h of f.children)c.some(m=>h.contains(m))||l.add(Oo(h));f=f.parentElement}}return l.dispose},[n,t,r])}function Ps(e,t,r){let n=ft(o=>{let i=o.getBoundingClientRect();i.x===0&&i.y===0&&i.width===0&&i.height===0&&r()});a.useEffect(()=>{if(!e)return;let o=t===null?null:Le(t)?t:t.current;if(!o)return;let i=Te();if(typeof ResizeObserver<"u"){let l=new ResizeObserver(()=>n.current(o));l.observe(o),i.add(()=>l.disconnect())}if(typeof IntersectionObserver<"u"){let l=new IntersectionObserver(()=>n.current(o));l.observe(o),i.add(()=>l.disconnect())}return()=>i.dispose()},[t,n,e])}let Nr=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),Bd=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ae=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(Ae||{}),Mn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Mn||{}),Id=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Id||{});function Ns(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Nr)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}function Wd(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Bd)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var Un=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Un||{});function zs(e,t=0){var r;return e===((r=Ht(e))==null?void 0:r.body)?!1:ke(t,{0(){return e.matches(Nr)},1(){let n=e;for(;n!==null;){if(n.matches(Nr))return!0;n=n.parentElement}return!1}})}var Hd=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Hd||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Je(e){e==null||e.focus({preventScroll:!0})}let _d=["textarea","input"].join(",");function Vd(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,_d))!=null?r:!1}function Bs(e,t=r=>r){return e.slice().sort((r,n)=>{let o=t(r),i=t(n);if(o===null||i===null)return 0;let l=o.compareDocumentPosition(i);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Gd(e,t,r=e===null?document.body:Pr(e)){return Ot(Ns(r),t,{relativeTo:e})}function Ot(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?Pr(e[0]):document:Pr(e),l=Array.isArray(e)?r?Bs(e):e:t&64?Wd(e):Ns(e);o.length>0&&l.length>1&&(l=l.filter(p=>!o.some(g=>g!=null&&"current"in g?(g==null?void 0:g.current)===p:g===p))),n=n??(i==null?void 0:i.activeElement);let c=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,l.indexOf(n))-1;if(t&4)return Math.max(0,l.indexOf(n))+1;if(t&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},f=0,h=l.length,m;do{if(f>=h||f+h<=0)return 0;let p=d+f;if(t&16)p=(p+h)%h;else{if(p<0)return 3;if(p>=h)return 1}m=l[p],m==null||m.focus(u),f+=c}while(m!==ps(m));return t&6&&Vd(m)&&m.select(),2}function Is(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Ud(){return/Android/gi.test(window.navigator.userAgent)}function Ao(){return Is()||Ud()}function Ft(e,t,r,n){let o=ft(r);a.useEffect(()=>{if(!e)return;function i(l){o.current(l)}return document.addEventListener(t,i,n),()=>document.removeEventListener(t,i,n)},[e,t,n])}function Ws(e,t,r,n){let o=ft(r);a.useEffect(()=>{if(!e)return;function i(l){o.current(l)}return window.addEventListener(t,i,n),()=>window.removeEventListener(t,i,n)},[e,t,n])}const Po=30;function Hs(e,t,r){let n=ft(r),o=a.useCallback(function(c,d){if(c.defaultPrevented)return;let u=d(c);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let f=(function h(m){return typeof m=="function"?h(m()):Array.isArray(m)||m instanceof Set?m:[m]})(t);for(let h of f)if(h!==null&&(h.contains(u)||c.composed&&c.composedPath().includes(h)))return;return!zs(u,Un.Loose)&&u.tabIndex!==-1&&c.preventDefault(),n.current(c,u)},[n,t]),i=a.useRef(null);Ft(e,"pointerdown",c=>{var d,u;Ao()||(i.current=((u=(d=c.composedPath)==null?void 0:d.call(c))==null?void 0:u[0])||c.target)},!0),Ft(e,"pointerup",c=>{if(Ao()||!i.current)return;let d=i.current;return i.current=null,o(c,()=>d)},!0);let l=a.useRef({x:0,y:0});Ft(e,"touchstart",c=>{l.current.x=c.touches[0].clientX,l.current.y=c.touches[0].clientY},!0),Ft(e,"touchend",c=>{let d={x:c.changedTouches[0].clientX,y:c.changedTouches[0].clientY};if(!(Math.abs(d.x-l.current.x)>=Po||Math.abs(d.y-l.current.y)>=Po))return o(c,()=>Xe(c.target)?c.target:null)},!0),Ws(e,"blur",c=>o(c,()=>id(window.document.activeElement)?window.document.activeElement:null),!0)}function ir(...e){return a.useMemo(()=>Ht(...e),[...e])}var Kd=(e=>(e[e.Ignore=0]="Ignore",e[e.Select=1]="Select",e[e.Close=2]="Close",e))(Kd||{});const Cr={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},Yd=200,No=5;function qd(e,{trigger:t,action:r,close:n,select:o}){let i=a.useRef(null),l=a.useRef(null),c=a.useRef(null);Ft(e&&t!==null,"pointerdown",d=>{ws(d==null?void 0:d.target)&&t!=null&&t.contains(d.target)&&(l.current=d.x,c.current=d.y,i.current=d.timeStamp)}),Ft(e&&t!==null,"pointerup",d=>{var u,f;let h=i.current;if(h===null||(i.current=null,!Xe(d.target))||Math.abs(d.x-((u=l.current)!=null?u:d.x))<No&&Math.abs(d.y-((f=c.current)!=null?f:d.y))<No)return;let m=r(d);switch(m.kind){case 0:return;case 1:{d.timeStamp-h>Yd&&(o(m.target),n());break}case 2:{n();break}}},{capture:!0})}function _s(e,t,r,n){let o=ft(r);a.useEffect(()=>{e=e??window;function i(l){o.current(l)}return e.addEventListener(t,i,n),()=>e.removeEventListener(t,i,n)},[e,t,n])}function Xd(e,t){return a.useMemo(()=>{var r;if(e.type)return e.type;let n=(r=e.as)!=null?r:"button";if(typeof n=="string"&&n.toLowerCase()==="button"||(t==null?void 0:t.tagName)==="BUTTON"&&!t.hasAttribute("type"))return"button"},[e.type,e.as,t])}function Qd(e){return a.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function Zd(e,t){let r=e(),n=new Set;return{getSnapshot(){return r},subscribe(o){return n.add(o),()=>n.delete(o)},dispatch(o,...i){let l=t[o].call(r,...i);l&&(r=l,n.forEach(c=>c()))}}}function Jd(){let e;return{before({doc:t}){var r;let n=t.documentElement,o=(r=t.defaultView)!=null?r:window;e=Math.max(0,o.innerWidth-n.clientWidth)},after({doc:t,d:r}){let n=t.documentElement,o=Math.max(0,n.clientWidth-n.offsetWidth),i=Math.max(0,e-o);r.style(n,"paddingRight",`${i}px`)}}}function eu(){return Is()?{before({doc:e,d:t,meta:r}){function n(o){for(let i of r().containers)for(let l of i())if(l.contains(o))return!0;return!1}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let c=Te();c.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>c.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,l=null;t.addEventListener(e,"click",c=>{if(Xe(c.target))try{let d=c.target.closest("a");if(!d)return;let{hash:u}=new URL(d.href),f=e.querySelector(u);Xe(f)&&!n(f)&&(l=f)}catch{}},!0),t.group(c=>{t.addEventListener(e,"touchstart",d=>{if(c.dispose(),Xe(d.target)&&od(d.target))if(n(d.target)){let u=d.target;for(;u.parentElement&&n(u.parentElement);)u=u.parentElement;c.style(u,"overscrollBehavior","contain")}else c.style(d.target,"touchAction","none")})}),t.addEventListener(e,"touchmove",c=>{if(Xe(c.target)){if($s(c.target))return;if(n(c.target)){let d=c.target;for(;d.parentElement&&d.dataset.headlessuiPortal!==""&&!(d.scrollHeight>d.clientHeight||d.scrollWidth>d.clientWidth);)d=d.parentElement;d.dataset.headlessuiPortal===""&&c.preventDefault()}else c.preventDefault()}},{passive:!1}),t.add(()=>{var c;let d=(c=window.scrollY)!=null?c:window.pageYOffset;i!==d&&window.scrollTo(0,i),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})})}}:{}}function tu(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function zo(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let vt=Zd(()=>new Map,{PUSH(e,t){var r;let n=(r=this.get(e))!=null?r:{doc:e,count:0,d:Te(),meta:new Set,computedMeta:{}};return n.count++,n.meta.add(t),n.computedMeta=zo(n.meta),this.set(e,n),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t),r.computedMeta=zo(r.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},r=[eu(),Jd(),tu()];r.forEach(({before:n})=>n==null?void 0:n(t)),r.forEach(({after:n})=>n==null?void 0:n(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});vt.subscribe(()=>{let e=vt.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let n=t.get(r.doc)==="hidden",o=r.count!==0;(o&&!n||!o&&n)&&vt.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&vt.dispatch("TEARDOWN",r)}});function ru(e,t,r=()=>({containers:[]})){let n=Qd(vt),o=t?n.get(t):void 0,i=o?o.count>0:!1;return le(()=>{if(!(!t||!e))return vt.dispatch("PUSH",t,r),()=>vt.dispatch("POP",t,r)},[e,t]),i}function Vs(e,t,r=()=>[document.body]){let n=ur(e,"scroll-lock");ru(n,t,o=>{var i;return{containers:[...(i=o.containers)!=null?i:[],r]}})}function Bo(e){return[e.screenX,e.screenY]}function nu(){let e=a.useRef([-1,-1]);return{wasMoved(t){let r=Bo(t);return e.current[0]===r[0]&&e.current[1]===r[1]?!1:(e.current=r,!0)},update(t){e.current=Bo(t)}}}function ou(e=0){let[t,r]=a.useState(e),n=a.useCallback(d=>r(d),[]),o=a.useCallback(d=>r(u=>u|d),[]),i=a.useCallback(d=>(t&d)===d,[t]),l=a.useCallback(d=>r(u=>u&~d),[]),c=a.useCallback(d=>r(u=>u^d),[]);return{flags:t,setFlag:n,addFlag:o,hasFlag:i,removeFlag:l,toggleFlag:c}}var Io,Wo;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Io=process==null?void 0:process.env)==null?void 0:Io.NODE_ENV)==="test"&&typeof((Wo=Element==null?void 0:Element.prototype)==null?void 0:Wo.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
698
- `)),[]});var iu=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(iu||{});function Gs(e){let t={};for(let r in e)e[r]===!0&&(t[`data-${r}`]="");return t}function Us(e,t,r,n){let[o,i]=a.useState(r),{hasFlag:l,addFlag:c,removeFlag:d}=ou(e&&o?3:0),u=a.useRef(!1),f=a.useRef(!1),h=ut();return le(()=>{var m;if(e){if(r&&i(!0),!t){r&&c(3);return}return(m=n==null?void 0:n.start)==null||m.call(n,r),su(t,{inFlight:u,prepare(){f.current?f.current=!1:f.current=u.current,u.current=!0,!f.current&&(r?(c(3),d(4)):(c(4),d(2)))},run(){f.current?r?(d(3),c(4)):(d(4),c(3)):r?d(1):c(1)},done(){var p;f.current&&cu(t)||(u.current=!1,d(7),r||i(!1),(p=n==null?void 0:n.end)==null||p.call(n,r))}})}},[e,r,t,h]),e?[o,{closed:l(1),enter:l(2),leave:l(4),transition:l(2)||l(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function su(e,{prepare:t,run:r,done:n,inFlight:o}){let i=Te();return lu(e,{prepare:t,inFlight:o}),i.nextFrame(()=>{r(),i.requestAnimationFrame(()=>{i.add(au(e,n))})}),i.dispose}function au(e,t){var r,n;let o=Te();if(!e)return o.dispose;let i=!1;o.add(()=>{i=!0});let l=(n=(r=e.getAnimations)==null?void 0:r.call(e).filter(c=>c instanceof CSSTransition))!=null?n:[];return l.length===0?(t(),o.dispose):(Promise.allSettled(l.map(c=>c.finished)).then(()=>{i||t()}),o.dispose)}function lu(e,{inFlight:t,prepare:r}){if(t!=null&&t.current){r();return}let n=e.style.transition;e.style.transition="none",r(),e.offsetHeight,e.style.transition=n}function cu(e){var t,r;return((r=(t=e.getAnimations)==null?void 0:t.call(e))!=null?r:[]).some(n=>n instanceof CSSTransition&&n.playState!=="finished")}function Kn(e,t){let r=a.useRef([]),n=Z(e);a.useEffect(()=>{let o=[...r.current];for(let[i,l]of t.entries())if(r.current[i]!==l){let c=n(t,o);return r.current=t,c}},[n,...t])}function Xr(){return typeof window<"u"}function _t(e){return Ks(e)?(e.nodeName||"").toLowerCase():"#document"}function Se(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ge(e){var t;return(t=(Ks(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ks(e){return Xr()?e instanceof Node||e instanceof Se(e).Node:!1}function ve(e){return Xr()?e instanceof Element||e instanceof Se(e).Element:!1}function _e(e){return Xr()?e instanceof HTMLElement||e instanceof Se(e).HTMLElement:!1}function Ho(e){return!Xr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Se(e).ShadowRoot}const du=new Set(["inline","contents"]);function fr(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!du.has(o)}const uu=new Set(["table","td","th"]);function fu(e){return uu.has(_t(e))}const pu=[":popover-open",":modal"];function Qr(e){return pu.some(t=>{try{return e.matches(t)}catch{return!1}})}const hu=["transform","translate","scale","rotate","perspective"],gu=["transform","translate","scale","rotate","perspective","filter"],mu=["paint","layout","strict","content"];function Yn(e){const t=qn(),r=ve(e)?Pe(e):e;return hu.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||gu.some(n=>(r.willChange||"").includes(n))||mu.some(n=>(r.contain||"").includes(n))}function bu(e){let t=lt(e);for(;_e(t)&&!Bt(t);){if(Yn(t))return t;if(Qr(t))return null;t=lt(t)}return null}function qn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const xu=new Set(["html","body","#document"]);function Bt(e){return xu.has(_t(e))}function Pe(e){return Se(e).getComputedStyle(e)}function Zr(e){return ve(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function lt(e){if(_t(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ho(e)&&e.host||Ge(e);return Ho(t)?t.host:t}function Ys(e){const t=lt(e);return Bt(t)?e.ownerDocument?e.ownerDocument.body:e.body:_e(t)&&fr(t)?t:Ys(t)}function sr(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Ys(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),l=Se(o);if(i){const c=An(l);return t.concat(l,l.visualViewport||[],fr(o)?o:[],c&&r?sr(c):[])}return t.concat(o,sr(o,[],r))}function An(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vu(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}const kt=Math.min,be=Math.max,ar=Math.round,jr=Math.floor,We=e=>({x:e,y:e}),yu={left:"right",right:"left",bottom:"top",top:"bottom"},wu={start:"end",end:"start"};function _o(e,t,r){return be(e,kt(t,r))}function Vt(e,t){return typeof e=="function"?e(t):e}function ct(e){return e.split("-")[0]}function pr(e){return e.split("-")[1]}function qs(e){return e==="x"?"y":"x"}function Xs(e){return e==="y"?"height":"width"}const $u=new Set(["top","bottom"]);function Qe(e){return $u.has(ct(e))?"y":"x"}function Qs(e){return qs(Qe(e))}function ku(e,t,r){r===void 0&&(r=!1);const n=pr(e),o=Qs(e),i=Xs(o);let l=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=zr(l)),[l,zr(l)]}function Cu(e){const t=zr(e);return[Pn(e),t,Pn(t)]}function Pn(e){return e.replace(/start|end/g,t=>wu[t])}const Vo=["left","right"],Go=["right","left"],ju=["top","bottom"],Eu=["bottom","top"];function Su(e,t,r){switch(e){case"top":case"bottom":return r?t?Go:Vo:t?Vo:Go;case"left":case"right":return t?ju:Eu;default:return[]}}function Lu(e,t,r,n){const o=pr(e);let i=Su(ct(e),r==="start",n);return o&&(i=i.map(l=>l+"-"+o),t&&(i=i.concat(i.map(Pn)))),i}function zr(e){return e.replace(/left|right|bottom|top/g,t=>yu[t])}function Tu(e){return{top:0,right:0,bottom:0,left:0,...e}}function Fu(e){return typeof e!="number"?Tu(e):{top:e,right:e,bottom:e,left:e}}function Br(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Uo(e,t,r){let{reference:n,floating:o}=e;const i=Qe(t),l=Qs(t),c=Xs(l),d=ct(t),u=i==="y",f=n.x+n.width/2-o.width/2,h=n.y+n.height/2-o.height/2,m=n[c]/2-o[c]/2;let p;switch(d){case"top":p={x:f,y:n.y-o.height};break;case"bottom":p={x:f,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:h};break;case"left":p={x:n.x-o.width,y:h};break;default:p={x:n.x,y:n.y}}switch(pr(t)){case"start":p[l]-=m*(r&&u?-1:1);break;case"end":p[l]+=m*(r&&u?-1:1);break}return p}const Ru=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:l}=r,c=i.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:h}=Uo(u,n,d),m=n,p={},g=0;for(let v=0;v<c.length;v++){const{name:y,fn:b}=c[v],{x:w,y:x,data:j,reset:E}=await b({x:f,y:h,initialPlacement:n,placement:m,strategy:o,middlewareData:p,rects:u,platform:l,elements:{reference:e,floating:t}});f=w??f,h=x??h,p={...p,[y]:{...p[y],...j}},E&&g<=50&&(g++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(u=E.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:f,y:h}=Uo(u,m,d)),v=-1)}return{x:f,y:h,placement:m,strategy:o,middlewareData:p}};async function Jr(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:l,elements:c,strategy:d}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:m=!1,padding:p=0}=Vt(t,e),g=Fu(p),y=c[m?h==="floating"?"reference":"floating":h],b=Br(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(y)))==null||r?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:u,rootBoundary:f,strategy:d})),w=h==="floating"?{x:n,y:o,width:l.floating.width,height:l.floating.height}:l.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),j=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},E=Br(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:x,strategy:d}):w);return{top:(b.top-E.top+g.top)/j.y,bottom:(E.bottom-b.bottom+g.bottom)/j.y,left:(b.left-E.left+g.left)/j.x,right:(E.right-b.right+g.right)/j.x}}const Du=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:l,initialPlacement:c,platform:d,elements:u}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...y}=Vt(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const b=ct(o),w=Qe(c),x=ct(c)===c,j=await(d.isRTL==null?void 0:d.isRTL(u.floating)),E=m||(x||!v?[zr(c)]:Cu(c)),F=g!=="none";!m&&F&&E.push(...Lu(c,v,g,j));const T=[c,...E],L=await Jr(t,y),M=[];let k=((n=i.flip)==null?void 0:n.overflows)||[];if(f&&M.push(L[b]),h){const S=ku(o,l,j);M.push(L[S[0]],L[S[1]])}if(k=[...k,{placement:o,overflows:M}],!M.every(S=>S<=0)){var D,P;const S=(((D=i.flip)==null?void 0:D.index)||0)+1,O=T[S];if(O&&(!(h==="alignment"?w!==Qe(O):!1)||k.every(W=>Qe(W.placement)===w?W.overflows[0]>0:!0)))return{data:{index:S,overflows:k},reset:{placement:O}};let N=(P=k.filter(A=>A.overflows[0]<=0).sort((A,W)=>A.overflows[1]-W.overflows[1])[0])==null?void 0:P.placement;if(!N)switch(p){case"bestFit":{var R;const A=(R=k.filter(W=>{if(F){const _=Qe(W.placement);return _===w||_==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(_=>_>0).reduce((_,H)=>_+H,0)]).sort((W,_)=>W[1]-_[1])[0])==null?void 0:R[0];A&&(N=A);break}case"initialPlacement":N=c;break}if(o!==N)return{reset:{placement:N}}}return{}}}},Ou=new Set(["left","top"]);async function Mu(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),l=ct(r),c=pr(r),d=Qe(r)==="y",u=Ou.has(l)?-1:1,f=i&&d?-1:1,h=Vt(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:g}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof g=="number"&&(p=c==="end"?g*-1:g),d?{x:p*f,y:m*u}:{x:m*u,y:p*f}}const Au=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:l,middlewareData:c}=t,d=await Mu(t,e);return l===((r=c.offset)==null?void 0:r.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:o+d.x,y:i+d.y,data:{...d,placement:l}}}}},Pu=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:c={fn:y=>{let{x:b,y:w}=y;return{x:b,y:w}}},...d}=Vt(e,t),u={x:r,y:n},f=await Jr(t,d),h=Qe(ct(o)),m=qs(h);let p=u[m],g=u[h];if(i){const y=m==="y"?"top":"left",b=m==="y"?"bottom":"right",w=p+f[y],x=p-f[b];p=_o(w,p,x)}if(l){const y=h==="y"?"top":"left",b=h==="y"?"bottom":"right",w=g+f[y],x=g-f[b];g=_o(w,g,x)}const v=c.fn({...t,[m]:p,[h]:g});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[m]:i,[h]:l}}}}}},Nu=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:l,elements:c}=t,{apply:d=()=>{},...u}=Vt(e,t),f=await Jr(t,u),h=ct(o),m=pr(o),p=Qe(o)==="y",{width:g,height:v}=i.floating;let y,b;h==="top"||h==="bottom"?(y=h,b=m===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(b=h,y=m==="end"?"top":"bottom");const w=v-f.top-f.bottom,x=g-f.left-f.right,j=kt(v-f[y],w),E=kt(g-f[b],x),F=!t.middlewareData.shift;let T=j,L=E;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(L=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=w),F&&!m){const k=be(f.left,0),D=be(f.right,0),P=be(f.top,0),R=be(f.bottom,0);p?L=g-2*(k!==0||D!==0?k+D:be(f.left,f.right)):T=v-2*(P!==0||R!==0?P+R:be(f.top,f.bottom))}await d({...t,availableWidth:L,availableHeight:T});const M=await l.getDimensions(c.floating);return g!==M.width||v!==M.height?{reset:{rects:!0}}:{}}}};function Zs(e){const t=Pe(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=_e(e),i=o?e.offsetWidth:r,l=o?e.offsetHeight:n,c=ar(r)!==i||ar(n)!==l;return c&&(r=i,n=l),{width:r,height:n,$:c}}function Xn(e){return ve(e)?e:e.contextElement}function Mt(e){const t=Xn(e);if(!_e(t))return We(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=Zs(t);let l=(i?ar(r.width):r.width)/n,c=(i?ar(r.height):r.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const zu=We(0);function Js(e){const t=Se(e);return!qn()||!t.visualViewport?zu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Bu(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Se(e)?!1:t}function Ct(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=Xn(e);let l=We(1);t&&(n?ve(n)&&(l=Mt(n)):l=Mt(e));const c=Bu(i,r,n)?Js(i):We(0);let d=(o.left+c.x)/l.x,u=(o.top+c.y)/l.y,f=o.width/l.x,h=o.height/l.y;if(i){const m=Se(i),p=n&&ve(n)?Se(n):n;let g=m,v=An(g);for(;v&&n&&p!==g;){const y=Mt(v),b=v.getBoundingClientRect(),w=Pe(v),x=b.left+(v.clientLeft+parseFloat(w.paddingLeft))*y.x,j=b.top+(v.clientTop+parseFloat(w.paddingTop))*y.y;d*=y.x,u*=y.y,f*=y.x,h*=y.y,d+=x,u+=j,g=Se(v),v=An(g)}}return Br({width:f,height:h,x:d,y:u})}function en(e,t){const r=Zr(e).scrollLeft;return t?t.left+r:Ct(Ge(e)).left+r}function ea(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-en(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Iu(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",l=Ge(n),c=t?Qr(t.floating):!1;if(n===l||c&&i)return r;let d={scrollLeft:0,scrollTop:0},u=We(1);const f=We(0),h=_e(n);if((h||!h&&!i)&&((_t(n)!=="body"||fr(l))&&(d=Zr(n)),_e(n))){const p=Ct(n);u=Mt(n),f.x=p.x+n.clientLeft,f.y=p.y+n.clientTop}const m=l&&!h&&!i?ea(l,d):We(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-d.scrollLeft*u.x+f.x+m.x,y:r.y*u.y-d.scrollTop*u.y+f.y+m.y}}function Wu(e){return Array.from(e.getClientRects())}function Hu(e){const t=Ge(e),r=Zr(e),n=e.ownerDocument.body,o=be(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=be(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let l=-r.scrollLeft+en(e);const c=-r.scrollTop;return Pe(n).direction==="rtl"&&(l+=be(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:l,y:c}}const Ko=25;function _u(e,t){const r=Se(e),n=Ge(e),o=r.visualViewport;let i=n.clientWidth,l=n.clientHeight,c=0,d=0;if(o){i=o.width,l=o.height;const f=qn();(!f||f&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const u=en(n);if(u<=0){const f=n.ownerDocument,h=f.body,m=getComputedStyle(h),p=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(n.clientWidth-h.clientWidth-p);g<=Ko&&(i-=g)}else u<=Ko&&(i+=u);return{width:i,height:l,x:c,y:d}}const Vu=new Set(["absolute","fixed"]);function Gu(e,t){const r=Ct(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=_e(e)?Mt(e):We(1),l=e.clientWidth*i.x,c=e.clientHeight*i.y,d=o*i.x,u=n*i.y;return{width:l,height:c,x:d,y:u}}function Yo(e,t,r){let n;if(t==="viewport")n=_u(e,r);else if(t==="document")n=Hu(Ge(e));else if(ve(t))n=Gu(t,r);else{const o=Js(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Br(n)}function ta(e,t){const r=lt(e);return r===t||!ve(r)||Bt(r)?!1:Pe(r).position==="fixed"||ta(r,t)}function Uu(e,t){const r=t.get(e);if(r)return r;let n=sr(e,[],!1).filter(c=>ve(c)&&_t(c)!=="body"),o=null;const i=Pe(e).position==="fixed";let l=i?lt(e):e;for(;ve(l)&&!Bt(l);){const c=Pe(l),d=Yn(l);!d&&c.position==="fixed"&&(o=null),(i?!d&&!o:!d&&c.position==="static"&&!!o&&Vu.has(o.position)||fr(l)&&!d&&ta(e,l))?n=n.filter(f=>f!==l):o=c,l=lt(l)}return t.set(e,n),n}function Ku(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const l=[...r==="clippingAncestors"?Qr(t)?[]:Uu(t,this._c):[].concat(r),n],c=l[0],d=l.reduce((u,f)=>{const h=Yo(t,f,o);return u.top=be(h.top,u.top),u.right=kt(h.right,u.right),u.bottom=kt(h.bottom,u.bottom),u.left=be(h.left,u.left),u},Yo(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function Yu(e){const{width:t,height:r}=Zs(e);return{width:t,height:r}}function qu(e,t,r){const n=_e(t),o=Ge(t),i=r==="fixed",l=Ct(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const d=We(0);function u(){d.x=en(o)}if(n||!n&&!i)if((_t(t)!=="body"||fr(o))&&(c=Zr(t)),n){const p=Ct(t,!0,i,t);d.x=p.x+t.clientLeft,d.y=p.y+t.clientTop}else o&&u();i&&!n&&o&&u();const f=o&&!n&&!i?ea(o,c):We(0),h=l.left+c.scrollLeft-d.x-f.x,m=l.top+c.scrollTop-d.y-f.y;return{x:h,y:m,width:l.width,height:l.height}}function vn(e){return Pe(e).position==="static"}function qo(e,t){if(!_e(e)||Pe(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ge(e)===r&&(r=r.ownerDocument.body),r}function ra(e,t){const r=Se(e);if(Qr(e))return r;if(!_e(e)){let o=lt(e);for(;o&&!Bt(o);){if(ve(o)&&!vn(o))return o;o=lt(o)}return r}let n=qo(e,t);for(;n&&fu(n)&&vn(n);)n=qo(n,t);return n&&Bt(n)&&vn(n)&&!Yn(n)?r:n||bu(e)||r}const Xu=async function(e){const t=this.getOffsetParent||ra,r=this.getDimensions,n=await r(e.floating);return{reference:qu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Qu(e){return Pe(e).direction==="rtl"}const Zu={convertOffsetParentRelativeRectToViewportRelativeRect:Iu,getDocumentElement:Ge,getClippingRect:Ku,getOffsetParent:ra,getElementRects:Xu,getClientRects:Wu,getDimensions:Yu,getScale:Mt,isElement:ve,isRTL:Qu};function na(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ju(e,t){let r=null,n;const o=Ge(e);function i(){var c;clearTimeout(n),(c=r)==null||c.disconnect(),r=null}function l(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),i();const u=e.getBoundingClientRect(),{left:f,top:h,width:m,height:p}=u;if(c||t(),!m||!p)return;const g=jr(h),v=jr(o.clientWidth-(f+m)),y=jr(o.clientHeight-(h+p)),b=jr(f),x={rootMargin:-g+"px "+-v+"px "+-y+"px "+-b+"px",threshold:be(0,kt(1,d))||1};let j=!0;function E(F){const T=F[0].intersectionRatio;if(T!==d){if(!j)return l();T?l(!1,T):n=setTimeout(()=>{l(!1,1e-7)},1e3)}T===1&&!na(u,e.getBoundingClientRect())&&l(),j=!1}try{r=new IntersectionObserver(E,{...x,root:o.ownerDocument})}catch{r=new IntersectionObserver(E,x)}r.observe(e)}return l(!0),i}function ef(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=n,u=Xn(e),f=o||i?[...u?sr(u):[],...sr(t)]:[];f.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),i&&b.addEventListener("resize",r)});const h=u&&c?Ju(u,r):null;let m=-1,p=null;l&&(p=new ResizeObserver(b=>{let[w]=b;w&&w.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),r()}),u&&!d&&p.observe(u),p.observe(t));let g,v=d?Ct(e):null;d&&y();function y(){const b=Ct(e);v&&!na(v,b)&&r(),v=b,g=requestAnimationFrame(y)}return r(),()=>{var b;f.forEach(w=>{o&&w.removeEventListener("scroll",r),i&&w.removeEventListener("resize",r)}),h==null||h(),(b=p)==null||b.disconnect(),p=null,d&&cancelAnimationFrame(g)}}const yn=Jr,tf=Au,rf=Pu,nf=Du,of=Nu,sf=(e,t,r)=>{const n=new Map,o={platform:Zu,...r},i={...o.platform,_c:n};return Ru(e,t,{...o,platform:i})};var af=typeof document<"u",lf=function(){},Tr=af?a.useLayoutEffect:lf;function Ir(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Ir(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!Ir(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function oa(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xo(e,t){const r=oa(e);return Math.round(t*r)/r}function wn(e){const t=K.useRef(e);return Tr(()=>{t.current=e}),t}function cf(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:l}={},transform:c=!0,whileElementsMounted:d,open:u}=e,[f,h]=K.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=K.useState(n);Ir(m,n)||p(n);const[g,v]=K.useState(null),[y,b]=K.useState(null),w=K.useCallback(W=>{W!==F.current&&(F.current=W,v(W))},[]),x=K.useCallback(W=>{W!==T.current&&(T.current=W,b(W))},[]),j=i||g,E=l||y,F=K.useRef(null),T=K.useRef(null),L=K.useRef(f),M=d!=null,k=wn(d),D=wn(o),P=wn(u),R=K.useCallback(()=>{if(!F.current||!T.current)return;const W={placement:t,strategy:r,middleware:m};D.current&&(W.platform=D.current),sf(F.current,T.current,W).then(_=>{const H={..._,isPositioned:P.current!==!1};S.current&&!Ir(L.current,H)&&(L.current=H,Or.flushSync(()=>{h(H)}))})},[m,t,r,D,P]);Tr(()=>{u===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,h(W=>({...W,isPositioned:!1})))},[u]);const S=K.useRef(!1);Tr(()=>(S.current=!0,()=>{S.current=!1}),[]),Tr(()=>{if(j&&(F.current=j),E&&(T.current=E),j&&E){if(k.current)return k.current(j,E,R);R()}},[j,E,R,k,M]);const O=K.useMemo(()=>({reference:F,floating:T,setReference:w,setFloating:x}),[w,x]),N=K.useMemo(()=>({reference:j,floating:E}),[j,E]),A=K.useMemo(()=>{const W={position:r,left:0,top:0};if(!N.floating)return W;const _=Xo(N.floating,f.x),H=Xo(N.floating,f.y);return c?{...W,transform:"translate("+_+"px, "+H+"px)",...oa(N.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:_,top:H}},[r,c,N.floating,f.x,f.y]);return K.useMemo(()=>({...f,update:R,refs:O,elements:N,floatingStyles:A}),[f,R,O,N,A])}const ia=(e,t)=>({...tf(e),options:[e,t]}),df=(e,t)=>({...rf(e),options:[e,t]}),uf=(e,t)=>({...nf(e),options:[e,t]}),ff=(e,t)=>({...of(e),options:[e,t]}),sa={...K},pf=sa.useInsertionEffect,hf=pf||(e=>e());function aa(e){const t=K.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return hf(()=>{t.current=e}),K.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}var Nn=typeof document<"u"?a.useLayoutEffect:a.useEffect;let Qo=!1,gf=0;const Zo=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+gf++;function mf(){const[e,t]=K.useState(()=>Qo?Zo():void 0);return Nn(()=>{e==null&&t(Zo())},[]),K.useEffect(()=>{Qo=!0},[]),e}const bf=sa.useId,xf=bf||mf;let lr;process.env.NODE_ENV!=="production"&&(lr=new Set);function vf(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=lr)!=null&&e.has(o))){var i;(i=lr)==null||i.add(o),console.warn(o)}}function yf(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=lr)!=null&&e.has(o))){var i;(i=lr)==null||i.add(o),console.error(o)}}function wf(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(o=>o!==r))||[])}}}const $f=K.createContext(null),kf=K.createContext(null),Cf=()=>{var e;return((e=K.useContext($f))==null?void 0:e.id)||null},jf=()=>K.useContext(kf),Ef="data-floating-ui-focusable";function Sf(e){const{open:t=!1,onOpenChange:r,elements:n}=e,o=xf(),i=K.useRef({}),[l]=K.useState(()=>wf()),c=Cf()!=null;if(process.env.NODE_ENV!=="production"){const p=n.reference;p&&!ve(p)&&yf("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[d,u]=K.useState(n.reference),f=aa((p,g,v)=>{i.current.openEvent=p?g:void 0,l.emit("openchange",{open:p,event:g,reason:v,nested:c}),r==null||r(p,g,v)}),h=K.useMemo(()=>({setPositionReference:u}),[]),m=K.useMemo(()=>({reference:d||n.reference||null,floating:n.floating||null,domReference:n.reference}),[d,n.reference,n.floating]);return K.useMemo(()=>({dataRef:i,open:t,onOpenChange:f,elements:m,events:l,floatingId:o,refs:h}),[t,f,m,l,o,h])}function Lf(e){e===void 0&&(e={});const{nodeId:t}=e,r=Sf({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[i,l]=K.useState(null),[c,d]=K.useState(null),f=(o==null?void 0:o.domReference)||i,h=K.useRef(null),m=jf();Nn(()=>{f&&(h.current=f)},[f]);const p=cf({...e,elements:{...o,...c&&{reference:c}}}),g=K.useCallback(x=>{const j=ve(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;d(j),p.refs.setReference(j)},[p.refs]),v=K.useCallback(x=>{(ve(x)||x===null)&&(h.current=x,l(x)),(ve(p.refs.reference.current)||p.refs.reference.current===null||x!==null&&!ve(x))&&p.refs.setReference(x)},[p.refs]),y=K.useMemo(()=>({...p.refs,setReference:v,setPositionReference:g,domReference:h}),[p.refs,v,g]),b=K.useMemo(()=>({...p.elements,domReference:f}),[p.elements,f]),w=K.useMemo(()=>({...p,...n,refs:y,elements:b,nodeId:t}),[p,y,b,t,n]);return Nn(()=>{n.dataRef.current.floatingContext=w;const x=m==null?void 0:m.nodesRef.current.find(j=>j.id===t);x&&(x.context=w)}),K.useMemo(()=>({...p,context:w,refs:y,elements:b}),[p,y,b,w])}const Jo="active",ei="selected";function $n(e,t,r){const n=new Map,o=r==="item";let i=e;if(o&&e){const{[Jo]:l,[ei]:c,...d}=e;i=d}return{...r==="floating"&&{tabIndex:-1,[Ef]:""},...i,...t.map(l=>{const c=l?l[r]:null;return typeof c=="function"?e?c(e):null:c}).concat(e).reduce((l,c)=>(c&&Object.entries(c).forEach(d=>{let[u,f]=d;if(!(o&&[Jo,ei].includes(u)))if(u.indexOf("on")===0){if(n.has(u)||n.set(u,[]),typeof f=="function"){var h;(h=n.get(u))==null||h.push(f),l[u]=function(){for(var m,p=arguments.length,g=new Array(p),v=0;v<p;v++)g[v]=arguments[v];return(m=n.get(u))==null?void 0:m.map(y=>y(...g)).find(y=>y!==void 0)}}}else l[u]=f}),l),{})}}function Tf(e){e===void 0&&(e=[]);const t=e.map(c=>c==null?void 0:c.reference),r=e.map(c=>c==null?void 0:c.floating),n=e.map(c=>c==null?void 0:c.item),o=K.useCallback(c=>$n(c,e,"reference"),t),i=K.useCallback(c=>$n(c,e,"floating"),r),l=K.useCallback(c=>$n(c,e,"item"),n);return K.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:l}),[o,i,l])}function ti(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const Ff=e=>({name:"inner",options:e,async fn(t){const{listRef:r,overflowRef:n,onFallbackChange:o,offset:i=0,index:l=0,minItemsVisible:c=4,referenceOverflowThreshold:d=0,scrollRef:u,...f}=Vt(e,t),{rects:h,elements:{floating:m}}=t,p=r.current[l],g=(u==null?void 0:u.current)||m,v=m.clientTop||g.clientTop,y=m.clientTop!==0,b=g.clientTop!==0,w=m===g;if(process.env.NODE_ENV!=="production"&&(t.placement.startsWith("bottom")||vf('`placement` side must be "bottom" when using the `inner`',"middleware.")),!p)return{};const x={...t,...await ia(-p.offsetTop-m.clientTop-h.reference.height/2-p.offsetHeight/2-i).fn(t)},j=await yn(ti(x,g.scrollHeight+v+m.clientTop),f),E=await yn(x,{...f,elementContext:"reference"}),F=be(0,j.top),T=x.y+F,k=(g.scrollHeight>g.clientHeight?D=>D:ar)(be(0,g.scrollHeight+(y&&w||b?v*2:0)-F-be(0,j.bottom)));if(g.style.maxHeight=k+"px",g.scrollTop=F,o){const D=g.offsetHeight<p.offsetHeight*kt(c,r.current.length)-1||E.top>=-d||E.bottom>=-d;Or.flushSync(()=>o(D))}return n&&(n.current=await yn(ti({...x,y:T},g.offsetHeight+v+m.clientTop),f)),{y:T}}});function Rf(e,t){const{open:r,elements:n}=e,{enabled:o=!0,overflowRef:i,scrollRef:l,onChange:c}=t,d=aa(c),u=K.useRef(!1),f=K.useRef(null),h=K.useRef(null);K.useEffect(()=>{if(!o)return;function p(v){if(v.ctrlKey||!g||i.current==null)return;const y=v.deltaY,b=i.current.top>=-.5,w=i.current.bottom>=-.5,x=g.scrollHeight-g.clientHeight,j=y<0?-1:1,E=y<0?"max":"min";g.scrollHeight<=g.clientHeight||(!b&&y>0||!w&&y<0?(v.preventDefault(),Or.flushSync(()=>{d(F=>F+Math[E](y,x*j))})):/firefox/i.test(vu())&&(g.scrollTop+=y))}const g=(l==null?void 0:l.current)||n.floating;if(r&&g)return g.addEventListener("wheel",p),requestAnimationFrame(()=>{f.current=g.scrollTop,i.current!=null&&(h.current={...i.current})}),()=>{f.current=null,h.current=null,g.removeEventListener("wheel",p)}},[o,r,n.floating,i,l,d]);const m=K.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const p=(l==null?void 0:l.current)||n.floating;if(!(!i.current||!p||!u.current)){if(f.current!==null){const g=p.scrollTop-f.current;(i.current.bottom<-.5&&g<-1||i.current.top<-.5&&g>1)&&Or.flushSync(()=>d(v=>v+g))}requestAnimationFrame(()=>{f.current=p.scrollTop})}}}),[n.floating,d,i,l]);return K.useMemo(()=>o?{floating:m}:{},[o,m])}let Gt=a.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Gt.displayName="FloatingContext";let Qn=a.createContext(null);Qn.displayName="PlacementContext";function Df(e){return a.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function Of(){return a.useContext(Gt).setReference}function Mf(){return a.useContext(Gt).getReferenceProps}function Af(){let{getFloatingProps:e,slot:t}=a.useContext(Gt);return a.useCallback((...r)=>Object.assign({},e(...r),{"data-anchor":t.anchor}),[e,t])}function Pf(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=a.useContext(Qn),r=a.useMemo(()=>e,[JSON.stringify(e,(o,i)=>{var l;return(l=i==null?void 0:i.outerHTML)!=null?l:i})]);le(()=>{t==null||t(r??null)},[t,r]);let n=a.useContext(Gt);return a.useMemo(()=>[n.setFloating,e?n.styles:{}],[n.setFloating,e,n.styles])}let ri=4;function Nf({children:e,enabled:t=!0}){let[r,n]=a.useState(null),[o,i]=a.useState(0),l=a.useRef(null),[c,d]=a.useState(null);zf(c);let u=t&&r!==null&&c!==null,{to:f="bottom",gap:h=0,offset:m=0,padding:p=0,inner:g}=Bf(r,c),[v,y="center"]=f.split(" ");le(()=>{u&&i(0)},[u]);let{refs:b,floatingStyles:w,context:x}=Lf({open:u,placement:v==="selection"?y==="center"?"bottom":`bottom-${y}`:y==="center"?`${v}`:`${v}-${y}`,strategy:"absolute",transform:!1,middleware:[ia({mainAxis:v==="selection"?0:h,crossAxis:m}),df({padding:p}),v!=="selection"&&uf({padding:p}),v==="selection"&&g?Ff({...g,padding:p,overflowRef:l,offset:o,minItemsVisible:ri,referenceOverflowThreshold:p,onFallbackChange(D){var P,R;if(!D)return;let S=x.elements.floating;if(!S)return;let O=parseFloat(getComputedStyle(S).scrollPaddingBottom)||0,N=Math.min(ri,S.childElementCount),A=0,W=0;for(let _ of(R=(P=x.elements.floating)==null?void 0:P.childNodes)!=null?R:[])if(Le(_)){let H=_.offsetTop,G=H+_.clientHeight+O,V=S.scrollTop,U=V+S.clientHeight;if(H>=V&&G<=U)N--;else{W=Math.max(0,Math.min(G,U)-Math.max(H,V)),A=_.clientHeight;break}}N>=1&&i(_=>{let H=A*N-W+O;return _>=H?_:H})}}):null,ff({padding:p,apply({availableWidth:D,availableHeight:P,elements:R}){Object.assign(R.floating.style,{overflow:"auto",maxWidth:`${D}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${P}px)`})}})].filter(Boolean),whileElementsMounted:ef}),[j=v,E=y]=x.placement.split("-");v==="selection"&&(j="selection");let F=a.useMemo(()=>({anchor:[j,E].filter(Boolean).join(" ")}),[j,E]),T=Rf(x,{overflowRef:l,onChange:i}),{getReferenceProps:L,getFloatingProps:M}=Tf([T]),k=Z(D=>{d(D),b.setFloating(D)});return K.createElement(Qn.Provider,{value:n},K.createElement(Gt.Provider,{value:{setFloating:k,setReference:b.setReference,styles:w,getReferenceProps:L,getFloatingProps:M,slot:F}},e))}function zf(e){le(()=>{if(!e)return;let t=new MutationObserver(()=>{let r=window.getComputedStyle(e).maxHeight,n=parseFloat(r);if(isNaN(n))return;let o=parseInt(r);isNaN(o)||n!==o&&(e.style.maxHeight=`${Math.ceil(n)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function Bf(e,t){var r,n,o;let i=kn((r=e==null?void 0:e.gap)!=null?r:"var(--anchor-gap, 0)",t),l=kn((n=e==null?void 0:e.offset)!=null?n:"var(--anchor-offset, 0)",t),c=kn((o=e==null?void 0:e.padding)!=null?o:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:l,padding:c}}function kn(e,t,r=void 0){let n=ut(),o=Z((d,u)=>{if(d==null)return[r,null];if(typeof d=="number")return[d,null];if(typeof d=="string"){if(!u)return[r,null];let f=ni(d,u);return[f,h=>{let m=la(d);{let p=m.map(g=>window.getComputedStyle(u).getPropertyValue(g));n.requestAnimationFrame(function g(){n.nextFrame(g);let v=!1;for(let[b,w]of m.entries()){let x=window.getComputedStyle(u).getPropertyValue(w);if(p[b]!==x){p[b]=x,v=!0;break}}if(!v)return;let y=ni(d,u);f!==y&&(h(y),f=y)})}return n.dispose}]}return[r,null]}),i=a.useMemo(()=>o(e,t)[0],[e,t]),[l=i,c]=a.useState();return le(()=>{let[d,u]=o(e,t);if(c(d),!!u)return u(c)},[e,t]),l}function la(e){let t=/var\((.*)\)/.exec(e);if(t){let r=t[1].indexOf(",");if(r===-1)return[t[1]];let n=t[1].slice(0,r).trim(),o=t[1].slice(r+1).trim();return o?[n,...la(o)]:[n]}return[]}function ni(e,t){let r=document.createElement("div");t.appendChild(r),r.style.setProperty("margin-top","0px","important"),r.style.setProperty("margin-top",e,"important");let n=parseFloat(window.getComputedStyle(r).marginTop)||0;return t.removeChild(r),n}function If({children:e,freeze:t},r){let n=ca(t,e);return a.isValidElement(n)?a.cloneElement(n,{ref:r}):a.createElement(a.Fragment,null,n)}a.forwardRef(If);function ca(e,t){let[r,n]=a.useState(t);return!e&&r!==t&&n(t),e?r:t}let tn=a.createContext(null);tn.displayName="OpenClosedContext";var $e=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))($e||{});function hr(){return a.useContext(tn)}function da({value:e,children:t}){return a.createElement(tn.Provider,{value:e},t)}function Wf({children:e}){return a.createElement(tn.Provider,{value:null},e)}function Hf(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let nt=[];Hf(()=>{function e(t){if(!Xe(t.target)||t.target===document.body||nt[0]===t.target)return;let r=t.target;r=r.closest(Nr),nt.unshift(r??t.target),nt=nt.filter(n=>n!=null&&n.isConnected),nt.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function _f(e){throw new Error("Unexpected object: "+e)}var ce=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(ce||{});function Er(e,t){let r=t.resolveItems();if(r.length<=0)return null;let n=t.resolveActiveIndex(),o=n??-1;switch(e.focus){case 0:{for(let i=0;i<r.length;++i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 1:{o===-1&&(o=r.length);for(let i=o-1;i>=0;--i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 2:{for(let i=o+1;i<r.length;++i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 3:{for(let i=r.length-1;i>=0;--i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 4:{for(let i=0;i<r.length;++i)if(t.resolveId(r[i],i,r)===e.id)return i;return n}case 5:return null;default:_f(e)}}function Zn(e){let t=Z(e),r=a.useRef(!1);a.useEffect(()=>(r.current=!1,()=>{r.current=!0,Ur(()=>{r.current&&t()})}),[t])}let ua=a.createContext(!1);function Vf(){return a.useContext(ua)}function oi(e){return a.createElement(ua.Provider,{value:e.force},e.children)}function Gf(e){let t=Vf(),r=a.useContext(pa),[n,o]=a.useState(()=>{var i;if(!t&&r!==null)return(i=r.current)!=null?i:null;if(Ie.isServer)return null;let l=e==null?void 0:e.getElementById("headlessui-portal-root");if(l)return l;if(e===null)return null;let c=e.createElement("div");return c.setAttribute("id","headlessui-portal-root"),e.body.appendChild(c)});return a.useEffect(()=>{n!==null&&(e!=null&&e.body.contains(n)||e==null||e.body.appendChild(n))},[n,e]),a.useEffect(()=>{t||r!==null&&o(r.current)},[r,o,t]),n}let fa=a.Fragment,Uf=de(function(e,t){let{ownerDocument:r=null,...n}=e,o=a.useRef(null),i=ye(cd(m=>{o.current=m}),t),l=ir(o.current),c=r??l,d=Gf(c),u=a.useContext(zn),f=ut(),h=he();return Zn(()=>{var m;d&&d.childNodes.length<=0&&((m=d.parentElement)==null||m.removeChild(d))}),d?He.createPortal(a.createElement("div",{"data-headlessui-portal":"",ref:m=>{f.dispose(),u&&m&&f.add(u.register(m))}},h({ourProps:{ref:i},theirProps:n,slot:{},defaultTag:fa,name:"Portal"})),d):null});function Kf(e,t){let r=ye(t),{enabled:n=!0,ownerDocument:o,...i}=e,l=he();return n?a.createElement(Uf,{...i,ownerDocument:o,ref:r}):l({ourProps:{ref:r},theirProps:i,slot:{},defaultTag:fa,name:"Portal"})}let Yf=a.Fragment,pa=a.createContext(null);function qf(e,t){let{target:r,...n}=e,o={ref:ye(t)},i=he();return a.createElement(pa.Provider,{value:r},i({ourProps:o,theirProps:n,defaultTag:Yf,name:"Popover.Group"}))}let zn=a.createContext(null);function Xf(){let e=a.useContext(zn),t=a.useRef([]),r=Z(i=>(t.current.push(i),e&&e.register(i),()=>n(i))),n=Z(i=>{let l=t.current.indexOf(i);l!==-1&&t.current.splice(l,1),e&&e.unregister(i)}),o=a.useMemo(()=>({register:r,unregister:n,portals:t}),[r,n,t]);return[t,a.useMemo(()=>function({children:i}){return a.createElement(zn.Provider,{value:o},i)},[o])]}let Qf=de(Kf),ha=de(qf),ga=Object.assign(Qf,{Group:ha});const Fr={Idle:{kind:"Idle"},Tracked:e=>({kind:"Tracked",position:e}),Moved:{kind:"Moved"}};function ma(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function Zf(e,t,r){let n=Te();if(t.kind==="Tracked"){let o=function(){i!==ma(e)&&(n.dispose(),r())},{position:i}=t,l=new ResizeObserver(o);l.observe(e),n.add(()=>l.disconnect()),n.addEventListener(window,"scroll",o,{passive:!0}),n.addEventListener(window,"resize",o)}return()=>n.dispose()}function Jf(e,t=typeof document<"u"?document.defaultView:null,r){let n=ur(e,"escape");_s(t,"keydown",o=>{n&&(o.defaultPrevented||o.key===fe.Escape&&r(o))})}function ep(){var e;let[t]=a.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[r,n]=a.useState((e=t==null?void 0:t.matches)!=null?e:!1);return le(()=>{if(!t)return;function o(i){n(i.matches)}return t.addEventListener("change",o),()=>t.removeEventListener("change",o)},[t]),r}function tp({defaultContainers:e=[],portals:t,mainTreeNode:r}={}){let n=Z(()=>{var o,i;let l=Ht(r),c=[];for(let d of e)d!==null&&(Ze(d)?c.push(d):"current"in d&&Ze(d.current)&&c.push(d.current));if(t!=null&&t.current)for(let d of t.current)c.push(d);for(let d of(o=l==null?void 0:l.querySelectorAll("html > *, body > *"))!=null?o:[])d!==document.body&&d!==document.head&&Ze(d)&&d.id!=="headlessui-portal-root"&&(r&&(d.contains(r)||d.contains((i=r==null?void 0:r.getRootNode())==null?void 0:i.host))||c.some(u=>d.contains(u))||c.push(d));return c});return{resolveContainers:n,contains:Z(o=>n().some(i=>i.contains(o)))}}let ba=a.createContext(null);function ii({children:e,node:t}){let[r,n]=a.useState(null),o=xa(t??r);return a.createElement(ba.Provider,{value:o},e,o===null&&a.createElement(or,{features:zt.Hidden,ref:i=>{var l,c;if(i){for(let d of(c=(l=Ht(i))==null?void 0:l.querySelectorAll("html > *, body > *"))!=null?c:[])if(d!==document.body&&d!==document.head&&Ze(d)&&d!=null&&d.contains(i)){n(d);break}}}}))}function xa(e=null){var t;return(t=a.useContext(ba))!=null?t:e}function rp(){let e=typeof document>"u";return"useSyncExternalStore"in K?(t=>t.useSyncExternalStore)(K)(()=>()=>{},()=>!1,()=>!e):!1}function rn(){let e=rp(),[t,r]=K.useState(Ie.isHandoffComplete);return t&&Ie.isHandoffComplete===!1&&r(!1),K.useEffect(()=>{t!==!0&&r(!0)},[t]),K.useEffect(()=>Ie.handoff(),[]),e?!1:t}function Jn(){let e=a.useRef(!1);return le(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var qt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(qt||{});function np(){let e=a.useRef(0);return Ws(!0,"keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function va(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let r of e.current)Ze(r.current)&&t.add(r.current);return t}let op="div";var mt=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(mt||{});function ip(e,t){let r=a.useRef(null),n=ye(r,t),{initialFocus:o,initialFocusFallback:i,containers:l,features:c=15,...d}=e;rn()||(c=0);let u=ir(r.current);cp(c,{ownerDocument:u});let f=dp(c,{ownerDocument:u,container:r,initialFocus:o,initialFocusFallback:i});up(c,{ownerDocument:u,container:r,containers:l,previousActiveElement:f});let h=np(),m=Z(w=>{if(!Le(r.current))return;let x=r.current;(j=>j())(()=>{ke(h.current,{[qt.Forwards]:()=>{Ot(x,Ae.First,{skipElements:[w.relatedTarget,i]})},[qt.Backwards]:()=>{Ot(x,Ae.Last,{skipElements:[w.relatedTarget,i]})}})})}),p=ur(!!(c&2),"focus-trap#tab-lock"),g=ut(),v=a.useRef(!1),y={ref:n,onKeyDown(w){w.key=="Tab"&&(v.current=!0,g.requestAnimationFrame(()=>{v.current=!1}))},onBlur(w){if(!(c&4))return;let x=va(l);Le(r.current)&&x.add(r.current);let j=w.relatedTarget;Xe(j)&&j.dataset.headlessuiFocusGuard!=="true"&&(ya(x,j)||(v.current?Ot(r.current,ke(h.current,{[qt.Forwards]:()=>Ae.Next,[qt.Backwards]:()=>Ae.Previous})|Ae.WrapAround,{relativeTo:w.target}):Xe(w.target)&&Je(w.target)))}},b=he();return a.createElement(a.Fragment,null,p&&a.createElement(or,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:m,features:zt.Focusable}),b({ourProps:y,theirProps:d,defaultTag:op,name:"FocusTrap"}),p&&a.createElement(or,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:m,features:zt.Focusable}))}let sp=de(ip),ap=Object.assign(sp,{features:mt});function lp(e=!0){let t=a.useRef(nt.slice());return Kn(([r],[n])=>{n===!0&&r===!1&&Ur(()=>{t.current.splice(0)}),n===!1&&r===!0&&(t.current=nt.slice())},[e,nt,t]),Z(()=>{var r;return(r=t.current.find(n=>n!=null&&n.isConnected))!=null?r:null})}function cp(e,{ownerDocument:t}){let r=!!(e&8),n=lp(r);Kn(()=>{r||hs(t==null?void 0:t.body)&&Je(n())},[r]),Zn(()=>{r&&Je(n())})}function dp(e,{ownerDocument:t,container:r,initialFocus:n,initialFocusFallback:o}){let i=a.useRef(null),l=ur(!!(e&1),"focus-trap#initial-focus"),c=Jn();return Kn(()=>{if(e===0)return;if(!l){o!=null&&o.current&&Je(o.current);return}let d=r.current;d&&Ur(()=>{if(!c.current)return;let u=t==null?void 0:t.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===u){i.current=u;return}}else if(d.contains(u)){i.current=u;return}if(n!=null&&n.current)Je(n.current);else{if(e&16){if(Ot(d,Ae.First|Ae.AutoFocus)!==Mn.Error)return}else if(Ot(d,Ae.First)!==Mn.Error)return;if(o!=null&&o.current&&(Je(o.current),(t==null?void 0:t.activeElement)===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}i.current=t==null?void 0:t.activeElement})},[o,l,e]),i}function up(e,{ownerDocument:t,container:r,containers:n,previousActiveElement:o}){let i=Jn(),l=!!(e&4);_s(t==null?void 0:t.defaultView,"focus",c=>{if(!l||!i.current)return;let d=va(n);Le(r.current)&&d.add(r.current);let u=o.current;if(!u)return;let f=c.target;Le(f)?ya(d,f)?(o.current=f,Je(f)):(c.preventDefault(),c.stopPropagation(),Je(u)):Je(o.current)},!0)}function ya(e,t){for(let r of e)if(r.contains(t))return!0;return!1}function wa(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!Qt((t=e.as)!=null?t:ka)||a.Children.count(e.children)===1}let nn=a.createContext(null);nn.displayName="TransitionContext";var fp=(e=>(e.Visible="visible",e.Hidden="hidden",e))(fp||{});function pp(){let e=a.useContext(nn);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function hp(){let e=a.useContext(on);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let on=a.createContext(null);on.displayName="NestingContext";function sn(e){return"children"in e?sn(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function $a(e,t){let r=ft(e),n=a.useRef([]),o=Jn(),i=ut(),l=Z((p,g=st.Hidden)=>{let v=n.current.findIndex(({el:y})=>y===p);v!==-1&&(ke(g,{[st.Unmount](){n.current.splice(v,1)},[st.Hidden](){n.current[v].state="hidden"}}),i.microTask(()=>{var y;!sn(n)&&o.current&&((y=r.current)==null||y.call(r))}))}),c=Z(p=>{let g=n.current.find(({el:v})=>v===p);return g?g.state!=="visible"&&(g.state="visible"):n.current.push({el:p,state:"visible"}),()=>l(p,st.Unmount)}),d=a.useRef([]),u=a.useRef(Promise.resolve()),f=a.useRef({enter:[],leave:[]}),h=Z((p,g,v)=>{d.current.splice(0),t&&(t.chains.current[g]=t.chains.current[g].filter(([y])=>y!==p)),t==null||t.chains.current[g].push([p,new Promise(y=>{d.current.push(y)})]),t==null||t.chains.current[g].push([p,new Promise(y=>{Promise.all(f.current[g].map(([b,w])=>w)).then(()=>y())})]),g==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>v(g)):v(g)}),m=Z((p,g,v)=>{Promise.all(f.current[g].splice(0).map(([y,b])=>b)).then(()=>{var y;(y=d.current.shift())==null||y()}).then(()=>v(g))});return a.useMemo(()=>({children:n,register:c,unregister:l,onStart:h,onStop:m,wait:u,chains:f}),[c,l,n,h,m,f,u])}let ka=a.Fragment,Ca=Nt.RenderStrategy;function gp(e,t){var r,n;let{transition:o=!0,beforeEnter:i,afterEnter:l,beforeLeave:c,afterLeave:d,enter:u,enterFrom:f,enterTo:h,entered:m,leave:p,leaveFrom:g,leaveTo:v,...y}=e,[b,w]=a.useState(null),x=a.useRef(null),j=wa(e),E=ye(...j?[x,t,w]:t===null?[]:[t]),F=(r=y.unmount)==null||r?st.Unmount:st.Hidden,{show:T,appear:L,initial:M}=pp(),[k,D]=a.useState(T?"visible":"hidden"),P=hp(),{register:R,unregister:S}=P;le(()=>R(x),[R,x]),le(()=>{if(F===st.Hidden&&x.current){if(T&&k!=="visible"){D("visible");return}return ke(k,{hidden:()=>S(x),visible:()=>R(x)})}},[k,x,R,S,T,F]);let O=rn();le(()=>{if(j&&O&&k==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,k,O,j]);let N=M&&!L,A=L&&T&&M,W=a.useRef(!1),_=$a(()=>{W.current||(D("hidden"),S(x))},P),H=Z(oe=>{W.current=!0;let I=oe?"enter":"leave";_.onStart(x,I,C=>{C==="enter"?i==null||i():C==="leave"&&(c==null||c())})}),G=Z(oe=>{let I=oe?"enter":"leave";W.current=!1,_.onStop(x,I,C=>{C==="enter"?l==null||l():C==="leave"&&(d==null||d())}),I==="leave"&&!sn(_)&&(D("hidden"),S(x))});a.useEffect(()=>{j&&o||(H(T),G(T))},[T,j,o]);let V=!(!o||!j||!O||N),[,U]=Us(V,b,T,{start:H,end:G}),ne=tt({ref:E,className:((n=Dn(y.className,A&&u,A&&f,U.enter&&u,U.enter&&U.closed&&f,U.enter&&!U.closed&&h,U.leave&&p,U.leave&&!U.closed&&g,U.leave&&U.closed&&v,!U.transition&&T&&m))==null?void 0:n.trim())||void 0,...Gs(U)}),ae=0;k==="visible"&&(ae|=$e.Open),k==="hidden"&&(ae|=$e.Closed),T&&k==="hidden"&&(ae|=$e.Opening),!T&&k==="visible"&&(ae|=$e.Closing);let Y=he();return a.createElement(on.Provider,{value:_},a.createElement(da,{value:ae},Y({ourProps:ne,theirProps:y,defaultTag:ka,features:Ca,visible:k==="visible",name:"Transition.Child"})))}function mp(e,t){let{show:r,appear:n=!1,unmount:o=!0,...i}=e,l=a.useRef(null),c=wa(e),d=ye(...c?[l,t]:t===null?[]:[t]);rn();let u=hr();if(r===void 0&&u!==null&&(r=(u&$e.Open)===$e.Open),r===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[f,h]=a.useState(r?"visible":"hidden"),m=$a(()=>{r||h("hidden")}),[p,g]=a.useState(!0),v=a.useRef([r]);le(()=>{p!==!1&&v.current[v.current.length-1]!==r&&(v.current.push(r),g(!1))},[v,r]);let y=a.useMemo(()=>({show:r,appear:n,initial:p}),[r,n,p]);le(()=>{r?h("visible"):!sn(m)&&l.current!==null&&h("hidden")},[r,m]);let b={unmount:o},w=Z(()=>{var E;p&&g(!1),(E=e.beforeEnter)==null||E.call(e)}),x=Z(()=>{var E;p&&g(!1),(E=e.beforeLeave)==null||E.call(e)}),j=he();return a.createElement(on.Provider,{value:m},a.createElement(nn.Provider,{value:y},j({ourProps:{...b,as:a.Fragment,children:a.createElement(ja,{ref:d,...b,...i,beforeEnter:w,beforeLeave:x})},theirProps:{},defaultTag:a.Fragment,features:Ca,visible:f==="visible",name:"Transition"})))}function bp(e,t){let r=a.useContext(nn)!==null,n=hr()!==null;return a.createElement(a.Fragment,null,!r&&n?a.createElement(Bn,{ref:t,...e}):a.createElement(ja,{ref:t,...e}))}let Bn=de(mp),ja=de(gp),eo=de(bp),At=Object.assign(Bn,{Child:eo,Root:Bn});var xp=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(xp||{}),vp=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(vp||{});let yp={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},to=a.createContext(null);to.displayName="DialogContext";function an(e){let t=a.useContext(to);if(t===null){let r=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,an),r}return t}function wp(e,t){return ke(t.type,yp,e,t)}let si=de(function(e,t){let r=a.useId(),{id:n=`headlessui-dialog-${r}`,open:o,onClose:i,initialFocus:l,role:c="dialog",autoFocus:d=!0,__demoMode:u=!1,unmount:f=!1,...h}=e,m=a.useRef(!1);c=(function(){return c==="dialog"||c==="alertdialog"?c:(m.current||(m.current=!0,console.warn(`Invalid role [${c}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")})();let p=hr();o===void 0&&p!==null&&(o=(p&$e.Open)===$e.Open);let g=a.useRef(null),v=ye(g,t),y=ir(g.current),b=o?0:1,[w,x]=a.useReducer(wp,{titleId:null,descriptionId:null,panelRef:a.createRef()}),j=Z(()=>i(!1)),E=Z(U=>x({type:0,id:U})),F=rn()?b===0:!1,[T,L]=Xf(),M={get current(){var U;return(U=w.panelRef.current)!=null?U:g.current}},k=xa(),{resolveContainers:D}=tp({mainTreeNode:k,portals:T,defaultContainers:[M]}),P=p!==null?(p&$e.Closing)===$e.Closing:!1;As(u||P?!1:F,{allowed:Z(()=>{var U,ne;return[(ne=(U=g.current)==null?void 0:U.closest("[data-headlessui-portal]"))!=null?ne:null]}),disallowed:Z(()=>{var U;return[(U=k==null?void 0:k.closest("body > *:not(#headlessui-portal-root)"))!=null?U:null]})});let R=qr.get(null);le(()=>{if(F)return R.actions.push(n),()=>R.actions.pop(n)},[R,n,F]);let S=we(R,a.useCallback(U=>R.selectors.isTop(U,n),[R,n]));Hs(S,D,U=>{U.preventDefault(),j()}),Jf(S,y==null?void 0:y.defaultView,U=>{U.preventDefault(),U.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),j()}),Vs(u||P?!1:F,y,D),Ps(F,g,j);let[O,N]=ud(),A=a.useMemo(()=>[{dialogState:b,close:j,setTitleId:E,unmount:f},w],[b,j,E,f,w]),W=Me({open:b===0}),_={ref:v,id:n,role:c,tabIndex:-1,"aria-modal":u?void 0:b===0?!0:void 0,"aria-labelledby":w.titleId,"aria-describedby":O,unmount:f},H=!ep(),G=mt.None;F&&!u&&(G|=mt.RestoreFocus,G|=mt.TabLock,d&&(G|=mt.AutoFocus),H&&(G|=mt.InitialFocus));let V=he();return a.createElement(Wf,null,a.createElement(oi,{force:!0},a.createElement(ga,null,a.createElement(to.Provider,{value:A},a.createElement(ha,{target:g},a.createElement(oi,{force:!1},a.createElement(N,{slot:W},a.createElement(L,null,a.createElement(ap,{initialFocus:l,initialFocusFallback:g,containers:D,features:G},a.createElement($d,{value:j},V({ourProps:_,theirProps:h,slot:W,defaultTag:$p,features:kp,visible:b===0,name:"Dialog"})))))))))))}),$p="div",kp=Nt.RenderStrategy|Nt.Static;function Cp(e,t){let{transition:r=!1,open:n,...o}=e,i=hr(),l=e.hasOwnProperty("open")||i!==null,c=e.hasOwnProperty("onClose");if(!l&&!c)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!l)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!c)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!i&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(n!==void 0||r)&&!o.static?a.createElement(ii,null,a.createElement(At,{show:n,transition:r,unmount:o.unmount},a.createElement(si,{ref:t,...o}))):a.createElement(ii,null,a.createElement(si,{ref:t,open:n,...o}))}let jp="div";function Ep(e,t){let r=a.useId(),{id:n=`headlessui-dialog-panel-${r}`,transition:o=!1,...i}=e,[{dialogState:l,unmount:c},d]=an("Dialog.Panel"),u=ye(t,d.panelRef),f=Me({open:l===0}),h=Z(y=>{y.stopPropagation()}),m={ref:u,id:n,onClick:h},p=o?eo:a.Fragment,g=o?{unmount:c}:{},v=he();return a.createElement(p,{...g},v({ourProps:m,theirProps:i,slot:f,defaultTag:jp,name:"Dialog.Panel"}))}let Sp="div";function Lp(e,t){let{transition:r=!1,...n}=e,[{dialogState:o,unmount:i}]=an("Dialog.Backdrop"),l=Me({open:o===0}),c={ref:t,"aria-hidden":!0},d=r?eo:a.Fragment,u=r?{unmount:i}:{},f=he();return a.createElement(d,{...u},f({ourProps:c,theirProps:n,slot:l,defaultTag:Sp,name:"Dialog.Backdrop"}))}let Tp="h2";function Fp(e,t){let r=a.useId(),{id:n=`headlessui-dialog-title-${r}`,...o}=e,[{dialogState:i,setTitleId:l}]=an("Dialog.Title"),c=ye(t);a.useEffect(()=>(l(n),()=>l(null)),[n,l]);let d=Me({open:i===0}),u={ref:c,id:n};return he()({ourProps:u,theirProps:o,slot:d,defaultTag:Tp,name:"Dialog.Title"})}let Rp=de(Cp),Dp=de(Ep);de(Lp);let Op=de(Fp),ro=Object.assign(Rp,{Panel:Dp,Title:Op,Description:gd}),ai=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function li(e){var t,r;let n=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!Le(o))return n;let i=!1;for(let c of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))c.remove(),i=!0;let l=i?(r=o.innerText)!=null?r:"":n;return ai.test(l)&&(l=l.replace(ai,"")),l}function Mp(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let r=e.getAttribute("aria-labelledby");if(r){let n=r.split(" ").map(o=>{let i=document.getElementById(o);if(i){let l=i.getAttribute("aria-label");return typeof l=="string"?l.trim():li(i).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return li(e).trim()}function Ap(e){let t=a.useRef(""),r=a.useRef("");return Z(()=>{let n=e.current;if(!n)return"";let o=n.innerText;if(t.current===o)return r.current;let i=Mp(n).trim().toLowerCase();return t.current=o,r.current=i,i})}var Pp=Object.defineProperty,Np=(e,t,r)=>t in e?Pp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ci=(e,t,r)=>(Np(e,typeof t!="symbol"?t+"":t,r),r),xe=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(xe||{}),at=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(at||{}),Rr=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Rr||{}),Ea=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.SelectOption=5]="SelectOption",e[e.RegisterOptions=6]="RegisterOptions",e[e.UnregisterOptions=7]="UnregisterOptions",e[e.SetButtonElement=8]="SetButtonElement",e[e.SetOptionsElement=9]="SetOptionsElement",e[e.SortOptions=10]="SortOptions",e[e.MarkButtonAsMoved=11]="MarkButtonAsMoved",e))(Ea||{});function di(e,t=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,n=Bs(t(e.options.slice()),i=>i.dataRef.current.domRef.current),o=r?n.indexOf(r):null;return o===-1&&(o=null),{options:n,activeOptionIndex:o}}let zp={1(e){if(e.dataRef.current.disabled||e.listboxState===1)return e;let t=e.buttonElement?Fr.Tracked(ma(e.buttonElement)):e.buttonPositionState;return{...e,activeOptionIndex:null,pendingFocus:{focus:ce.Nothing},listboxState:1,__demoMode:!1,buttonPositionState:t}},0(e,t){if(e.dataRef.current.disabled||e.listboxState===0)return e;let r=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,o=e.options.findIndex(i=>n(i.dataRef.current.value));return o!==-1&&(r=o),{...e,frozenValue:!1,pendingFocus:t.focus,listboxState:0,activeOptionIndex:r,__demoMode:!1,buttonPositionState:Fr.Idle}},2(e,t){var r,n,o,i,l;if(e.dataRef.current.disabled||e.listboxState===1)return e;let c={...e,searchQuery:"",activationTrigger:(r=t.trigger)!=null?r:1,__demoMode:!1};if(t.focus===ce.Nothing)return{...c,activeOptionIndex:null};if(t.focus===ce.Specific)return{...c,activeOptionIndex:e.options.findIndex(f=>f.id===t.id)};if(t.focus===ce.Previous){let f=e.activeOptionIndex;if(f!==null){let h=e.options[f].dataRef.current.domRef,m=Er(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(m!==null){let p=e.options[m].dataRef.current.domRef;if(((n=h.current)==null?void 0:n.previousElementSibling)===p.current||((o=p.current)==null?void 0:o.previousElementSibling)===null)return{...c,activeOptionIndex:m}}}}else if(t.focus===ce.Next){let f=e.activeOptionIndex;if(f!==null){let h=e.options[f].dataRef.current.domRef,m=Er(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(m!==null){let p=e.options[m].dataRef.current.domRef;if(((i=h.current)==null?void 0:i.nextElementSibling)===p.current||((l=p.current)==null?void 0:l.nextElementSibling)===null)return{...c,activeOptionIndex:m}}}}let d=di(e),u=Er(t,{resolveItems:()=>d.options,resolveActiveIndex:()=>d.activeOptionIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});return{...c,...d,activeOptionIndex:u}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let r=e.searchQuery!==""?0:1,n=e.searchQuery+t.value.toLowerCase(),o=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+r).concat(e.options.slice(0,e.activeOptionIndex+r)):e.options).find(l=>{var c;return!l.dataRef.current.disabled&&((c=l.dataRef.current.textValue)==null?void 0:c.startsWith(n))}),i=o?e.options.indexOf(o):-1;return i===-1||i===e.activeOptionIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeOptionIndex:i,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5(e){return e.dataRef.current.mode===0?{...e,frozenValue:!0}:{...e}},6:(e,t)=>{let r=e.options.concat(t.options),n=e.activeOptionIndex;if(e.pendingFocus.focus!==ce.Nothing&&(n=Er(e.pendingFocus,{resolveItems:()=>r,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:o=>o.id,resolveDisabled:o=>o.dataRef.current.disabled})),e.activeOptionIndex===null){let{isSelected:o}=e.dataRef.current;if(o){let i=r.findIndex(l=>o==null?void 0:o(l.dataRef.current.value));i!==-1&&(n=i)}}return{...e,options:r,activeOptionIndex:n,pendingFocus:{focus:ce.Nothing},pendingShouldSort:!0}},7:(e,t)=>{let r=e.options,n=[],o=new Set(t.options);for(let[i,l]of r.entries())if(o.has(l.id)&&(n.push(i),o.delete(l.id),o.size===0))break;if(n.length>0){r=r.slice();for(let i of n.reverse())r.splice(i,1)}return{...e,options:r,activationTrigger:1}},8:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},9:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element},10:e=>e.pendingShouldSort?{...e,...di(e),pendingShouldSort:!1}:e,11(e){return e.buttonPositionState.kind!=="Tracked"?e:{...e,buttonPositionState:Fr.Moved}}};class no extends Rs{constructor(t){super(t),ci(this,"actions",{onChange:r=>{let{onChange:n,compare:o,mode:i,value:l}=this.state.dataRef.current;return ke(i,{0:()=>n==null?void 0:n(r),1:()=>{let c=l.slice(),d=c.findIndex(u=>o(u,r));return d===-1?c.push(r):c.splice(d,1),n==null?void 0:n(c)}})},registerOption:mn(()=>{let r=[],n=new Set;return[(o,i)=>{n.has(i)||(n.add(i),r.push({id:o,dataRef:i}))},()=>(n.clear(),this.send({type:6,options:r.splice(0)}))]}),unregisterOption:mn(()=>{let r=[];return[n=>r.push(n),()=>{this.send({type:7,options:r.splice(0)})}]}),goToOption:mn(()=>{let r=null;return[(n,o)=>{r={type:2,...n,trigger:o}},()=>r&&this.send(r)]}),closeListbox:()=>{this.send({type:1})},openListbox:r=>{this.send({type:0,focus:r})},selectActiveOption:()=>{var r;if(this.state.activeOptionIndex!==null){let{dataRef:n}=this.state.options[this.state.activeOptionIndex];this.actions.selectOption(n.current.value)}else this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(r=this.state.buttonElement)==null||r.focus({preventScroll:!0}))},selectOption:r=>{this.send({type:5,value:r})},search:r=>{this.send({type:3,value:r})},clearSearch:()=>{this.send({type:4})},setButtonElement:r=>{this.send({type:8,element:r})},setOptionsElement:r=>{this.send({type:9,element:r})}}),ci(this,"selectors",{activeDescendantId(r){var n;let o=r.activeOptionIndex,i=r.options;return o===null||(n=i[o])==null?void 0:n.id},isActive(r,n){var o;let i=r.activeOptionIndex,l=r.options;return i!==null?((o=l[i])==null?void 0:o.id)===n:!1},hasFrozenValue(r){return r.frozenValue},shouldScrollIntoView(r,n){return r.__demoMode||r.listboxState!==0||r.activationTrigger===0?!1:this.isActive(r,n)},didButtonMove(r){return r.buttonPositionState.kind==="Moved"}}),this.on(6,()=>{requestAnimationFrame(()=>{this.send({type:10})})});{let r=this.state.id,n=qr.get(null);this.disposables.add(n.on(Os.Push,o=>{!n.selectors.isTop(o,r)&&this.state.listboxState===0&&this.actions.closeListbox()})),this.on(0,()=>n.actions.push(r)),this.on(1,()=>n.actions.pop(r))}this.disposables.group(r=>{this.on(1,n=>{n.buttonElement&&(r.dispose(),r.add(Zf(n.buttonElement,n.buttonPositionState,()=>{this.send({type:11})})))})}),this.on(5,(r,n)=>{var o;this.actions.onChange(n.value),this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(o=this.state.buttonElement)==null||o.focus({preventScroll:!0}))})}static new({id:t,__demoMode:r=!1}){return new no({id:t,dataRef:{current:{}},listboxState:r?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:ce.Nothing},frozenValue:!1,__demoMode:r,buttonPositionState:Fr.Idle})}reduce(t,r){return ke(r.type,zp,t,r)}}const Sa=a.createContext(null);function oo(e){let t=a.useContext(Sa);if(t===null){let r=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,La),r}return t}function La({id:e,__demoMode:t=!1}){let r=a.useMemo(()=>no.new({id:e,__demoMode:t}),[]);return Zn(()=>r.dispose()),r}let ln=a.createContext(null);ln.displayName="ListboxDataContext";function gr(e){let t=a.useContext(ln);if(t===null){let r=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,gr),r}return t}let Bp=a.Fragment;function Ip(e,t){let r=a.useId(),n=Gn(),{value:o,defaultValue:i,form:l,name:c,onChange:d,by:u,invalid:f=!1,disabled:h=n||!1,horizontal:m=!1,multiple:p=!1,__demoMode:g=!1,...v}=e;const y=m?"horizontal":"vertical";let b=ye(t),w=Yc(i),[x=p?[]:void 0,j]=Kc(o,d,w),E=La({id:r,__demoMode:g}),F=a.useRef({static:!1,hold:!1}),T=a.useRef(new Map),L=Cd(u),M=a.useCallback(V=>ke(k.mode,{[at.Multi]:()=>x.some(U=>L(U,V)),[at.Single]:()=>L(x,V)}),[x]),k=Me({value:x,disabled:h,invalid:f,mode:p?at.Multi:at.Single,orientation:y,onChange:j,compare:L,isSelected:M,optionsPropsRef:F,listRef:T});le(()=>{E.state.dataRef.current=k},[k]);let D=we(E,V=>V.listboxState),P=qr.get(null),R=we(P,a.useCallback(V=>P.selectors.isTop(V,r),[P,r])),[S,O]=we(E,V=>[V.buttonElement,V.optionsElement]);Hs(R,[S,O],(V,U)=>{E.send({type:Ea.CloseListbox}),zs(U,Un.Loose)||(V.preventDefault(),S==null||S.focus())});let N=Me({open:D===xe.Open,disabled:h,invalid:f,value:x}),[A,W]=md({inherit:!0}),_={ref:b},H=a.useCallback(()=>{if(w!==void 0)return j==null?void 0:j(w)},[j,w]),G=he();return a.createElement(W,{value:A,props:{htmlFor:S==null?void 0:S.id},slot:{open:D===xe.Open,disabled:h}},a.createElement(Nf,null,a.createElement(Sa.Provider,{value:E},a.createElement(ln.Provider,{value:k},a.createElement(da,{value:ke(D,{[xe.Open]:$e.Open,[xe.Closed]:$e.Closed})},c!=null&&x!=null&&a.createElement(td,{disabled:h,data:{[c]:x},form:l,onReset:H}),G({ourProps:_,theirProps:v,slot:N,defaultTag:Bp,name:"Listbox"}))))))}let Wp="button";function Hp(e,t){let r=a.useId(),n=ys(),o=gr("Listbox.Button"),i=oo("Listbox.Button"),{id:l=n||`headlessui-listbox-button-${r}`,disabled:c=o.disabled||!1,autoFocus:d=!1,...u}=e,f=ye(t,Of(),i.actions.setButtonElement),h=Mf(),[m,p,g]=we(i,O=>[O.listboxState,O.buttonElement,O.optionsElement]),v=m===xe.Open;qd(v,{trigger:p,action:a.useCallback(O=>{if(p!=null&&p.contains(O.target))return Cr.Ignore;let N=O.target.closest('[role="option"]:not([data-disabled])');return Le(N)?Cr.Select(N):g!=null&&g.contains(O.target)?Cr.Ignore:Cr.Close},[p,g]),close:i.actions.closeListbox,select:i.actions.selectActiveOption});let y=Z(O=>{switch(O.key){case fe.Enter:qc(O.currentTarget);break;case fe.Space:case fe.ArrowDown:O.preventDefault(),i.actions.openListbox({focus:o.value?ce.Nothing:ce.First});break;case fe.ArrowUp:O.preventDefault(),i.actions.openListbox({focus:o.value?ce.Nothing:ce.Last});break}}),b=Z(O=>{switch(O.key){case fe.Space:O.preventDefault();break}}),w=Ed(O=>{var N;i.state.listboxState===xe.Open?(He.flushSync(()=>i.actions.closeListbox()),(N=i.state.buttonElement)==null||N.focus({preventScroll:!0})):(O.preventDefault(),i.actions.openListbox({focus:ce.Nothing}))}),x=Z(O=>O.preventDefault()),j=Ss([l]),E=dd(),{isFocusVisible:F,focusProps:T}=Mc({autoFocus:d}),{isHovered:L,hoverProps:M}=Oc({isDisabled:c}),{pressed:k,pressProps:D}=Ic({disabled:c}),P=Me({open:m===xe.Open,active:k||m===xe.Open,disabled:c,invalid:o.invalid,value:o.value,hover:L,focus:F,autofocus:d}),R=we(i,O=>O.listboxState===xe.Open),S=ms(h(),{ref:f,id:l,type:Xd(e,p),"aria-haspopup":"listbox","aria-controls":g==null?void 0:g.id,"aria-expanded":R,"aria-labelledby":j,"aria-describedby":E,disabled:c||void 0,autoFocus:d,onKeyDown:y,onKeyUp:b,onKeyPress:x},w,T,M,D);return he()({ourProps:S,theirProps:u,slot:P,defaultTag:Wp,name:"Listbox.Button"})}let Ta=a.createContext(!1),_p="div",Vp=Nt.RenderStrategy|Nt.Static;function Gp(e,t){let r=a.useId(),{id:n=`headlessui-listbox-options-${r}`,anchor:o,portal:i=!1,modal:l=!0,transition:c=!1,...d}=e,u=Df(o),[f,h]=a.useState(null);u&&(i=!0);let m=gr("Listbox.Options"),p=oo("Listbox.Options"),[g,v,y,b]=we(p,Y=>[Y.listboxState,Y.buttonElement,Y.optionsElement,Y.__demoMode]),w=ir(v),x=ir(y),j=hr(),[E,F]=Us(c,f,j!==null?(j&$e.Open)===$e.Open:g===xe.Open);Ps(E,v,p.actions.closeListbox);let T=b?!1:l&&g===xe.Open;Vs(T,x);let L=b?!1:l&&g===xe.Open;As(L,{allowed:a.useCallback(()=>[v,y],[v,y])});let M=we(p,p.selectors.didButtonMove)?!1:E,k=we(p,p.selectors.hasFrozenValue)&&!e.static,D=ca(k,m.value),P=a.useCallback(Y=>m.compare(D,Y),[m.compare,D]),R=we(p,Y=>{var oe;if(u==null||!((oe=u==null?void 0:u.to)!=null&&oe.includes("selection")))return null;let I=Y.options.findIndex(C=>P(C.dataRef.current.value));return I===-1&&(I=0),I}),S=(()=>{if(u==null)return;if(R===null)return{...u,inner:void 0};let Y=Array.from(m.listRef.current.values());return{...u,inner:{listRef:{current:Y},index:R}}})(),[O,N]=Pf(S),A=Af(),W=ye(t,u?O:null,p.actions.setOptionsElement,h),_=ut();a.useEffect(()=>{let Y=y;Y&&g===xe.Open&&(hs(Y)||Y==null||Y.focus({preventScroll:!0}))},[g,y]);let H=Z(Y=>{var oe;switch(_.dispose(),Y.key){case fe.Space:if(p.state.searchQuery!=="")return Y.preventDefault(),Y.stopPropagation(),p.actions.search(Y.key);case fe.Enter:Y.preventDefault(),Y.stopPropagation(),p.actions.selectActiveOption();break;case ke(m.orientation,{vertical:fe.ArrowDown,horizontal:fe.ArrowRight}):return Y.preventDefault(),Y.stopPropagation(),p.actions.goToOption({focus:ce.Next});case ke(m.orientation,{vertical:fe.ArrowUp,horizontal:fe.ArrowLeft}):return Y.preventDefault(),Y.stopPropagation(),p.actions.goToOption({focus:ce.Previous});case fe.Home:case fe.PageUp:return Y.preventDefault(),Y.stopPropagation(),p.actions.goToOption({focus:ce.First});case fe.End:case fe.PageDown:return Y.preventDefault(),Y.stopPropagation(),p.actions.goToOption({focus:ce.Last});case fe.Escape:Y.preventDefault(),Y.stopPropagation(),He.flushSync(()=>p.actions.closeListbox()),(oe=p.state.buttonElement)==null||oe.focus({preventScroll:!0});return;case fe.Tab:Y.preventDefault(),Y.stopPropagation(),He.flushSync(()=>p.actions.closeListbox()),Gd(p.state.buttonElement,Y.shiftKey?Ae.Previous:Ae.Next);break;default:Y.key.length===1&&(p.actions.search(Y.key),_.setTimeout(()=>p.actions.clearSearch(),350));break}}),G=we(p,Y=>{var oe;return(oe=Y.buttonElement)==null?void 0:oe.id}),V=Me({open:g===xe.Open}),U=ms(u?A():{},{id:n,ref:W,"aria-activedescendant":we(p,p.selectors.activeDescendantId),"aria-multiselectable":m.mode===at.Multi?!0:void 0,"aria-labelledby":G,"aria-orientation":m.orientation,onKeyDown:H,role:"listbox",tabIndex:g===xe.Open?0:void 0,style:{...d.style,...N,"--button-width":jd(E,v,!0).width},...Gs(F)}),ne=he(),ae=a.useMemo(()=>m.mode===at.Multi?m:{...m,isSelected:P},[m,P]);return a.createElement(ga,{enabled:i?e.static||E:!1,ownerDocument:w},a.createElement(ln.Provider,{value:ae},ne({ourProps:U,theirProps:d,slot:V,defaultTag:_p,features:Vp,visible:M,name:"Listbox.Options"})))}let Up="div";function Kp(e,t){let r=a.useId(),{id:n=`headlessui-listbox-option-${r}`,disabled:o=!1,value:i,...l}=e,c=a.useContext(Ta)===!0,d=gr("Listbox.Option"),u=oo("Listbox.Option"),f=we(u,k=>u.selectors.isActive(k,n)),h=d.isSelected(i),m=a.useRef(null),p=Ap(m),g=ft({disabled:o,value:i,domRef:m,get textValue(){return p()}}),v=ye(t,m,k=>{k?d.listRef.current.set(n,k):d.listRef.current.delete(n)}),y=we(u,k=>u.selectors.shouldScrollIntoView(k,n));le(()=>{if(y)return Te().requestAnimationFrame(()=>{var k,D;(D=(k=m.current)==null?void 0:k.scrollIntoView)==null||D.call(k,{block:"nearest"})})},[y,m]),le(()=>{if(!c)return u.actions.registerOption(n,g),()=>u.actions.unregisterOption(n)},[g,n,c]);let b=Z(k=>{if(o)return k.preventDefault();u.actions.selectOption(i)}),w=Z(()=>{if(o)return u.actions.goToOption({focus:ce.Nothing});u.actions.goToOption({focus:ce.Specific,id:n})}),x=nu(),j=Z(k=>x.update(k)),E=Z(k=>{x.wasMoved(k)&&(o||f&&u.state.activationTrigger===Rr.Pointer||u.actions.goToOption({focus:ce.Specific,id:n},Rr.Pointer))}),F=Z(k=>{x.wasMoved(k)&&(o||f&&u.state.activationTrigger===Rr.Pointer&&u.actions.goToOption({focus:ce.Nothing}))}),T=Me({active:f,focus:f,selected:h,disabled:o,selectedOption:h&&c}),L=c?{}:{id:n,ref:v,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":h,disabled:void 0,onClick:b,onFocus:w,onPointerEnter:j,onMouseEnter:j,onPointerMove:E,onMouseMove:E,onPointerLeave:F,onMouseLeave:F},M=he();return!h&&c?null:M({ourProps:L,theirProps:l,slot:T,defaultTag:Up,name:"Listbox.Option"})}let Yp=a.Fragment;function qp(e,t){let{options:r,placeholder:n,...o}=e,i={ref:ye(t)},l=gr("ListboxSelectedOption"),c=Me({}),d=l.value===void 0||l.value===null||l.mode===at.Multi&&Array.isArray(l.value)&&l.value.length===0,u=he();return a.createElement(Ta.Provider,{value:!0},u({ourProps:i,theirProps:{...o,children:a.createElement(a.Fragment,null,n&&d?n:r)},slot:c,defaultTag:Yp,name:"ListboxSelectedOption"}))}let Xp=de(Ip),Qp=de(Hp),Zp=yd,Jp=de(Gp),eh=de(Kp),th=de(qp),yt=Object.assign(Xp,{Button:Qp,Label:Zp,Options:Jp,Option:eh,SelectedOption:th});const rh=$.div`
697
+ */var Ro;function Ad(){return Ro||(Ro=1,process.env.NODE_ENV!=="production"&&(function(){function e(d,u){return d===u&&(d!==0||1/d===1/u)||d!==d&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=a,r=typeof Object.is=="function"?Object.is:e,n=t.useSyncExternalStore,o=t.useRef,s=t.useEffect,l=t.useMemo,c=t.useDebugValue;bn.useSyncExternalStoreWithSelector=function(d,u,f,h,m){var p=o(null);if(p.current===null){var g={hasValue:!1,value:null};p.current=g}else g=p.current;p=l(function(){function y(E){if(!b){if(b=!0,w=E,E=h(E),m!==void 0&&g.hasValue){var F=g.value;if(m(F,E))return x=F}return x=E}if(F=x,r(w,E))return F;var T=h(E);return m!==void 0&&m(F,T)?(w=E,F):(w=E,x=T)}var b=!1,w,x,j=f===void 0?null:f;return[function(){return y(u())},j===null?void 0:function(){return y(j())}]},[u,f,h,m]);var v=n(d,p[0],p[1]);return s(function(){g.hasValue=!0,g.value=v},[v]),c(v),v},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),bn}var Do;function Pd(){return Do||(Do=1,process.env.NODE_ENV==="production"?wr.exports=Md():wr.exports=Ad()),wr.exports}var Nd=Pd();function $e(e,t,r=Ds){return Nd.useSyncExternalStoreWithSelector(Z(n=>e.subscribe(zd,n)),Z(()=>e.state),Z(()=>e.state),Z(t),r)}function zd(e){return e}function dr(e,t){let r=a.useId(),n=Yr.get(t),[o,s]=$e(n,a.useCallback(l=>[n.selectors.isTop(l,r),n.selectors.inStack(l,r)],[n,r]));return le(()=>{if(e)return n.actions.push(r),()=>n.actions.pop(r)},[n,e,r]),e?s?o:!0:!1}let On=new Map,Qt=new Map;function Oo(e){var t;let r=(t=Qt.get(e))!=null?t:0;return Qt.set(e,r+1),r!==0?()=>Mo(e):(On.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>Mo(e))}function Mo(e){var t;let r=(t=Qt.get(e))!=null?t:1;if(r===1?Qt.delete(e):Qt.set(e,r-1),r!==1)return;let n=On.get(e);n&&(n["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n["aria-hidden"]),e.inert=n.inert,On.delete(e))}function As(e,{allowed:t,disallowed:r}={}){let n=dr(e,"inert-others");le(()=>{var o,s;if(!n)return;let l=Te();for(let d of(o=r==null?void 0:r())!=null?o:[])d&&l.add(Oo(d));let c=(s=t==null?void 0:t())!=null?s:[];for(let d of c){if(!d)continue;let u=Wt(d);if(!u)continue;let f=d.parentElement;for(;f&&f!==u.body;){for(let h of f.children)c.some(m=>h.contains(m))||l.add(Oo(h));f=f.parentElement}}return l.dispose},[n,t,r])}function Ps(e,t,r){let n=ut(o=>{let s=o.getBoundingClientRect();s.x===0&&s.y===0&&s.width===0&&s.height===0&&r()});a.useEffect(()=>{if(!e)return;let o=t===null?null:Le(t)?t:t.current;if(!o)return;let s=Te();if(typeof ResizeObserver<"u"){let l=new ResizeObserver(()=>n.current(o));l.observe(o),s.add(()=>l.disconnect())}if(typeof IntersectionObserver<"u"){let l=new IntersectionObserver(()=>n.current(o));l.observe(o),s.add(()=>l.disconnect())}return()=>s.dispose()},[t,n,e])}let Pr=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),Id=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ae=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(Ae||{}),Mn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Mn||{}),Bd=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Bd||{});function Ns(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Pr)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}function Wd(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Id)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var Un=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Un||{});function zs(e,t=0){var r;return e===((r=Wt(e))==null?void 0:r.body)?!1:ke(t,{0(){return e.matches(Pr)},1(){let n=e;for(;n!==null;){if(n.matches(Pr))return!0;n=n.parentElement}return!1}})}var Hd=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Hd||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Ze(e){e==null||e.focus({preventScroll:!0})}let _d=["textarea","input"].join(",");function Vd(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,_d))!=null?r:!1}function Is(e,t=r=>r){return e.slice().sort((r,n)=>{let o=t(r),s=t(n);if(o===null||s===null)return 0;let l=o.compareDocumentPosition(s);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Gd(e,t,r=e===null?document.body:Ar(e)){return Dt(Ns(r),t,{relativeTo:e})}function Dt(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:o=[]}={}){let s=Array.isArray(e)?e.length>0?Ar(e[0]):document:Ar(e),l=Array.isArray(e)?r?Is(e):e:t&64?Wd(e):Ns(e);o.length>0&&l.length>1&&(l=l.filter(p=>!o.some(g=>g!=null&&"current"in g?(g==null?void 0:g.current)===p:g===p))),n=n??(s==null?void 0:s.activeElement);let c=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,l.indexOf(n))-1;if(t&4)return Math.max(0,l.indexOf(n))+1;if(t&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},f=0,h=l.length,m;do{if(f>=h||f+h<=0)return 0;let p=d+f;if(t&16)p=(p+h)%h;else{if(p<0)return 3;if(p>=h)return 1}m=l[p],m==null||m.focus(u),f+=c}while(m!==ps(m));return t&6&&Vd(m)&&m.select(),2}function Bs(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Ud(){return/Android/gi.test(window.navigator.userAgent)}function Ao(){return Bs()||Ud()}function Tt(e,t,r,n){let o=ut(r);a.useEffect(()=>{if(!e)return;function s(l){o.current(l)}return document.addEventListener(t,s,n),()=>document.removeEventListener(t,s,n)},[e,t,n])}function Ws(e,t,r,n){let o=ut(r);a.useEffect(()=>{if(!e)return;function s(l){o.current(l)}return window.addEventListener(t,s,n),()=>window.removeEventListener(t,s,n)},[e,t,n])}const Po=30;function Hs(e,t,r){let n=ut(r),o=a.useCallback(function(c,d){if(c.defaultPrevented)return;let u=d(c);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let f=(function h(m){return typeof m=="function"?h(m()):Array.isArray(m)||m instanceof Set?m:[m]})(t);for(let h of f)if(h!==null&&(h.contains(u)||c.composed&&c.composedPath().includes(h)))return;return!zs(u,Un.Loose)&&u.tabIndex!==-1&&c.preventDefault(),n.current(c,u)},[n,t]),s=a.useRef(null);Tt(e,"pointerdown",c=>{var d,u;Ao()||(s.current=((u=(d=c.composedPath)==null?void 0:d.call(c))==null?void 0:u[0])||c.target)},!0),Tt(e,"pointerup",c=>{if(Ao()||!s.current)return;let d=s.current;return s.current=null,o(c,()=>d)},!0);let l=a.useRef({x:0,y:0});Tt(e,"touchstart",c=>{l.current.x=c.touches[0].clientX,l.current.y=c.touches[0].clientY},!0),Tt(e,"touchend",c=>{let d={x:c.changedTouches[0].clientX,y:c.changedTouches[0].clientY};if(!(Math.abs(d.x-l.current.x)>=Po||Math.abs(d.y-l.current.y)>=Po))return o(c,()=>qe(c.target)?c.target:null)},!0),Ws(e,"blur",c=>o(c,()=>id(window.document.activeElement)?window.document.activeElement:null),!0)}function or(...e){return a.useMemo(()=>Wt(...e),[...e])}var Kd=(e=>(e[e.Ignore=0]="Ignore",e[e.Select=1]="Select",e[e.Close=2]="Close",e))(Kd||{});const kr={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},Yd=200,No=5;function qd(e,{trigger:t,action:r,close:n,select:o}){let s=a.useRef(null),l=a.useRef(null),c=a.useRef(null);Tt(e&&t!==null,"pointerdown",d=>{$s(d==null?void 0:d.target)&&t!=null&&t.contains(d.target)&&(l.current=d.x,c.current=d.y,s.current=d.timeStamp)}),Tt(e&&t!==null,"pointerup",d=>{var u,f;let h=s.current;if(h===null||(s.current=null,!qe(d.target))||Math.abs(d.x-((u=l.current)!=null?u:d.x))<No&&Math.abs(d.y-((f=c.current)!=null?f:d.y))<No)return;let m=r(d);switch(m.kind){case 0:return;case 1:{d.timeStamp-h>Yd&&(o(m.target),n());break}case 2:{n();break}}},{capture:!0})}function _s(e,t,r,n){let o=ut(r);a.useEffect(()=>{e=e??window;function s(l){o.current(l)}return e.addEventListener(t,s,n),()=>e.removeEventListener(t,s,n)},[e,t,n])}function Xd(e,t){return a.useMemo(()=>{var r;if(e.type)return e.type;let n=(r=e.as)!=null?r:"button";if(typeof n=="string"&&n.toLowerCase()==="button"||(t==null?void 0:t.tagName)==="BUTTON"&&!t.hasAttribute("type"))return"button"},[e.type,e.as,t])}function Qd(e){return a.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function Zd(e,t){let r=e(),n=new Set;return{getSnapshot(){return r},subscribe(o){return n.add(o),()=>n.delete(o)},dispatch(o,...s){let l=t[o].call(r,...s);l&&(r=l,n.forEach(c=>c()))}}}function Jd(){let e;return{before({doc:t}){var r;let n=t.documentElement,o=(r=t.defaultView)!=null?r:window;e=Math.max(0,o.innerWidth-n.clientWidth)},after({doc:t,d:r}){let n=t.documentElement,o=Math.max(0,n.clientWidth-n.offsetWidth),s=Math.max(0,e-o);r.style(n,"paddingRight",`${s}px`)}}}function eu(){return Bs()?{before({doc:e,d:t,meta:r}){function n(o){for(let s of r().containers)for(let l of s())if(l.contains(o))return!0;return!1}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let c=Te();c.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>c.dispose()))}let s=(o=window.scrollY)!=null?o:window.pageYOffset,l=null;t.addEventListener(e,"click",c=>{if(qe(c.target))try{let d=c.target.closest("a");if(!d)return;let{hash:u}=new URL(d.href),f=e.querySelector(u);qe(f)&&!n(f)&&(l=f)}catch{}},!0),t.group(c=>{t.addEventListener(e,"touchstart",d=>{if(c.dispose(),qe(d.target)&&od(d.target))if(n(d.target)){let u=d.target;for(;u.parentElement&&n(u.parentElement);)u=u.parentElement;c.style(u,"overscrollBehavior","contain")}else c.style(d.target,"touchAction","none")})}),t.addEventListener(e,"touchmove",c=>{if(qe(c.target)){if(ws(c.target))return;if(n(c.target)){let d=c.target;for(;d.parentElement&&d.dataset.headlessuiPortal!==""&&!(d.scrollHeight>d.clientHeight||d.scrollWidth>d.clientWidth);)d=d.parentElement;d.dataset.headlessuiPortal===""&&c.preventDefault()}else c.preventDefault()}},{passive:!1}),t.add(()=>{var c;let d=(c=window.scrollY)!=null?c:window.pageYOffset;s!==d&&window.scrollTo(0,s),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})})}}:{}}function tu(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function zo(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let xt=Zd(()=>new Map,{PUSH(e,t){var r;let n=(r=this.get(e))!=null?r:{doc:e,count:0,d:Te(),meta:new Set,computedMeta:{}};return n.count++,n.meta.add(t),n.computedMeta=zo(n.meta),this.set(e,n),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t),r.computedMeta=zo(r.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},r=[eu(),Jd(),tu()];r.forEach(({before:n})=>n==null?void 0:n(t)),r.forEach(({after:n})=>n==null?void 0:n(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});xt.subscribe(()=>{let e=xt.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let n=t.get(r.doc)==="hidden",o=r.count!==0;(o&&!n||!o&&n)&&xt.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&xt.dispatch("TEARDOWN",r)}});function ru(e,t,r=()=>({containers:[]})){let n=Qd(xt),o=t?n.get(t):void 0,s=o?o.count>0:!1;return le(()=>{if(!(!t||!e))return xt.dispatch("PUSH",t,r),()=>xt.dispatch("POP",t,r)},[e,t]),s}function Vs(e,t,r=()=>[document.body]){let n=dr(e,"scroll-lock");ru(n,t,o=>{var s;return{containers:[...(s=o.containers)!=null?s:[],r]}})}function Io(e){return[e.screenX,e.screenY]}function nu(){let e=a.useRef([-1,-1]);return{wasMoved(t){let r=Io(t);return e.current[0]===r[0]&&e.current[1]===r[1]?!1:(e.current=r,!0)},update(t){e.current=Io(t)}}}function ou(e=0){let[t,r]=a.useState(e),n=a.useCallback(d=>r(d),[]),o=a.useCallback(d=>r(u=>u|d),[]),s=a.useCallback(d=>(t&d)===d,[t]),l=a.useCallback(d=>r(u=>u&~d),[]),c=a.useCallback(d=>r(u=>u^d),[]);return{flags:t,setFlag:n,addFlag:o,hasFlag:s,removeFlag:l,toggleFlag:c}}var Bo,Wo;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Bo=process==null?void 0:process.env)==null?void 0:Bo.NODE_ENV)==="test"&&typeof((Wo=Element==null?void 0:Element.prototype)==null?void 0:Wo.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
698
+ `)),[]});var iu=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(iu||{});function Gs(e){let t={};for(let r in e)e[r]===!0&&(t[`data-${r}`]="");return t}function Us(e,t,r,n){let[o,s]=a.useState(r),{hasFlag:l,addFlag:c,removeFlag:d}=ou(e&&o?3:0),u=a.useRef(!1),f=a.useRef(!1),h=dt();return le(()=>{var m;if(e){if(r&&s(!0),!t){r&&c(3);return}return(m=n==null?void 0:n.start)==null||m.call(n,r),su(t,{inFlight:u,prepare(){f.current?f.current=!1:f.current=u.current,u.current=!0,!f.current&&(r?(c(3),d(4)):(c(4),d(2)))},run(){f.current?r?(d(3),c(4)):(d(4),c(3)):r?d(1):c(1)},done(){var p;f.current&&cu(t)||(u.current=!1,d(7),r||s(!1),(p=n==null?void 0:n.end)==null||p.call(n,r))}})}},[e,r,t,h]),e?[o,{closed:l(1),enter:l(2),leave:l(4),transition:l(2)||l(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function su(e,{prepare:t,run:r,done:n,inFlight:o}){let s=Te();return lu(e,{prepare:t,inFlight:o}),s.nextFrame(()=>{r(),s.requestAnimationFrame(()=>{s.add(au(e,n))})}),s.dispose}function au(e,t){var r,n;let o=Te();if(!e)return o.dispose;let s=!1;o.add(()=>{s=!0});let l=(n=(r=e.getAnimations)==null?void 0:r.call(e).filter(c=>c instanceof CSSTransition))!=null?n:[];return l.length===0?(t(),o.dispose):(Promise.allSettled(l.map(c=>c.finished)).then(()=>{s||t()}),o.dispose)}function lu(e,{inFlight:t,prepare:r}){if(t!=null&&t.current){r();return}let n=e.style.transition;e.style.transition="none",r(),e.offsetHeight,e.style.transition=n}function cu(e){var t,r;return((r=(t=e.getAnimations)==null?void 0:t.call(e))!=null?r:[]).some(n=>n instanceof CSSTransition&&n.playState!=="finished")}function Kn(e,t){let r=a.useRef([]),n=Z(e);a.useEffect(()=>{let o=[...r.current];for(let[s,l]of t.entries())if(r.current[s]!==l){let c=n(t,o);return r.current=t,c}},[n,...t])}function qr(){return typeof window<"u"}function Ht(e){return Ks(e)?(e.nodeName||"").toLowerCase():"#document"}function Se(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ge(e){var t;return(t=(Ks(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ks(e){return qr()?e instanceof Node||e instanceof Se(e).Node:!1}function ve(e){return qr()?e instanceof Element||e instanceof Se(e).Element:!1}function _e(e){return qr()?e instanceof HTMLElement||e instanceof Se(e).HTMLElement:!1}function Ho(e){return!qr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Se(e).ShadowRoot}const du=new Set(["inline","contents"]);function ur(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!du.has(o)}const uu=new Set(["table","td","th"]);function fu(e){return uu.has(Ht(e))}const pu=[":popover-open",":modal"];function Xr(e){return pu.some(t=>{try{return e.matches(t)}catch{return!1}})}const hu=["transform","translate","scale","rotate","perspective"],gu=["transform","translate","scale","rotate","perspective","filter"],mu=["paint","layout","strict","content"];function Yn(e){const t=qn(),r=ve(e)?Pe(e):e;return hu.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||gu.some(n=>(r.willChange||"").includes(n))||mu.some(n=>(r.contain||"").includes(n))}function bu(e){let t=at(e);for(;_e(t)&&!zt(t);){if(Yn(t))return t;if(Xr(t))return null;t=at(t)}return null}function qn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const xu=new Set(["html","body","#document"]);function zt(e){return xu.has(Ht(e))}function Pe(e){return Se(e).getComputedStyle(e)}function Qr(e){return ve(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function at(e){if(Ht(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ho(e)&&e.host||Ge(e);return Ho(t)?t.host:t}function Ys(e){const t=at(e);return zt(t)?e.ownerDocument?e.ownerDocument.body:e.body:_e(t)&&ur(t)?t:Ys(t)}function ir(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Ys(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),l=Se(o);if(s){const c=An(l);return t.concat(l,l.visualViewport||[],ur(o)?o:[],c&&r?ir(c):[])}return t.concat(o,ir(o,[],r))}function An(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vu(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}const wt=Math.min,be=Math.max,sr=Math.round,Cr=Math.floor,We=e=>({x:e,y:e}),yu={left:"right",right:"left",bottom:"top",top:"bottom"},$u={start:"end",end:"start"};function _o(e,t,r){return be(e,wt(t,r))}function _t(e,t){return typeof e=="function"?e(t):e}function lt(e){return e.split("-")[0]}function fr(e){return e.split("-")[1]}function qs(e){return e==="x"?"y":"x"}function Xs(e){return e==="y"?"height":"width"}const wu=new Set(["top","bottom"]);function Xe(e){return wu.has(lt(e))?"y":"x"}function Qs(e){return qs(Xe(e))}function ku(e,t,r){r===void 0&&(r=!1);const n=fr(e),o=Qs(e),s=Xs(o);let l=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=Nr(l)),[l,Nr(l)]}function Cu(e){const t=Nr(e);return[Pn(e),t,Pn(t)]}function Pn(e){return e.replace(/start|end/g,t=>$u[t])}const Vo=["left","right"],Go=["right","left"],ju=["top","bottom"],Eu=["bottom","top"];function Su(e,t,r){switch(e){case"top":case"bottom":return r?t?Go:Vo:t?Vo:Go;case"left":case"right":return t?ju:Eu;default:return[]}}function Lu(e,t,r,n){const o=fr(e);let s=Su(lt(e),r==="start",n);return o&&(s=s.map(l=>l+"-"+o),t&&(s=s.concat(s.map(Pn)))),s}function Nr(e){return e.replace(/left|right|bottom|top/g,t=>yu[t])}function Tu(e){return{top:0,right:0,bottom:0,left:0,...e}}function Fu(e){return typeof e!="number"?Tu(e):{top:e,right:e,bottom:e,left:e}}function zr(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Uo(e,t,r){let{reference:n,floating:o}=e;const s=Xe(t),l=Qs(t),c=Xs(l),d=lt(t),u=s==="y",f=n.x+n.width/2-o.width/2,h=n.y+n.height/2-o.height/2,m=n[c]/2-o[c]/2;let p;switch(d){case"top":p={x:f,y:n.y-o.height};break;case"bottom":p={x:f,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:h};break;case"left":p={x:n.x-o.width,y:h};break;default:p={x:n.x,y:n.y}}switch(fr(t)){case"start":p[l]-=m*(r&&u?-1:1);break;case"end":p[l]+=m*(r&&u?-1:1);break}return p}const Ru=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:l}=r,c=s.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:h}=Uo(u,n,d),m=n,p={},g=0;for(let v=0;v<c.length;v++){const{name:y,fn:b}=c[v],{x:w,y:x,data:j,reset:E}=await b({x:f,y:h,initialPlacement:n,placement:m,strategy:o,middlewareData:p,rects:u,platform:l,elements:{reference:e,floating:t}});f=w??f,h=x??h,p={...p,[y]:{...p[y],...j}},E&&g<=50&&(g++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(u=E.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:f,y:h}=Uo(u,m,d)),v=-1)}return{x:f,y:h,placement:m,strategy:o,middlewareData:p}};async function Zr(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:l,elements:c,strategy:d}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:m=!1,padding:p=0}=_t(t,e),g=Fu(p),y=c[m?h==="floating"?"reference":"floating":h],b=zr(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(y)))==null||r?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:f,strategy:d})),w=h==="floating"?{x:n,y:o,width:l.floating.width,height:l.floating.height}:l.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),j=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},E=zr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:x,strategy:d}):w);return{top:(b.top-E.top+g.top)/j.y,bottom:(E.bottom-b.bottom+g.bottom)/j.y,left:(b.left-E.left+g.left)/j.x,right:(E.right-b.right+g.right)/j.x}}const Du=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:l,initialPlacement:c,platform:d,elements:u}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...y}=_t(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const b=lt(o),w=Xe(c),x=lt(c)===c,j=await(d.isRTL==null?void 0:d.isRTL(u.floating)),E=m||(x||!v?[Nr(c)]:Cu(c)),F=g!=="none";!m&&F&&E.push(...Lu(c,v,g,j));const T=[c,...E],L=await Zr(t,y),M=[];let k=((n=s.flip)==null?void 0:n.overflows)||[];if(f&&M.push(L[b]),h){const S=ku(o,l,j);M.push(L[S[0]],L[S[1]])}if(k=[...k,{placement:o,overflows:M}],!M.every(S=>S<=0)){var D,P;const S=(((D=s.flip)==null?void 0:D.index)||0)+1,O=T[S];if(O&&(!(h==="alignment"?w!==Xe(O):!1)||k.every(W=>Xe(W.placement)===w?W.overflows[0]>0:!0)))return{data:{index:S,overflows:k},reset:{placement:O}};let N=(P=k.filter(A=>A.overflows[0]<=0).sort((A,W)=>A.overflows[1]-W.overflows[1])[0])==null?void 0:P.placement;if(!N)switch(p){case"bestFit":{var R;const A=(R=k.filter(W=>{if(F){const _=Xe(W.placement);return _===w||_==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(_=>_>0).reduce((_,H)=>_+H,0)]).sort((W,_)=>W[1]-_[1])[0])==null?void 0:R[0];A&&(N=A);break}case"initialPlacement":N=c;break}if(o!==N)return{reset:{placement:N}}}return{}}}},Ou=new Set(["left","top"]);async function Mu(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),l=lt(r),c=fr(r),d=Xe(r)==="y",u=Ou.has(l)?-1:1,f=s&&d?-1:1,h=_t(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:g}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof g=="number"&&(p=c==="end"?g*-1:g),d?{x:p*f,y:m*u}:{x:m*u,y:p*f}}const Au=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:l,middlewareData:c}=t,d=await Mu(t,e);return l===((r=c.offset)==null?void 0:r.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:o+d.x,y:s+d.y,data:{...d,placement:l}}}}},Pu=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:c={fn:y=>{let{x:b,y:w}=y;return{x:b,y:w}}},...d}=_t(e,t),u={x:r,y:n},f=await Zr(t,d),h=Xe(lt(o)),m=qs(h);let p=u[m],g=u[h];if(s){const y=m==="y"?"top":"left",b=m==="y"?"bottom":"right",w=p+f[y],x=p-f[b];p=_o(w,p,x)}if(l){const y=h==="y"?"top":"left",b=h==="y"?"bottom":"right",w=g+f[y],x=g-f[b];g=_o(w,g,x)}const v=c.fn({...t,[m]:p,[h]:g});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[m]:s,[h]:l}}}}}},Nu=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:s,platform:l,elements:c}=t,{apply:d=()=>{},...u}=_t(e,t),f=await Zr(t,u),h=lt(o),m=fr(o),p=Xe(o)==="y",{width:g,height:v}=s.floating;let y,b;h==="top"||h==="bottom"?(y=h,b=m===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(b=h,y=m==="end"?"top":"bottom");const w=v-f.top-f.bottom,x=g-f.left-f.right,j=wt(v-f[y],w),E=wt(g-f[b],x),F=!t.middlewareData.shift;let T=j,L=E;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(L=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=w),F&&!m){const k=be(f.left,0),D=be(f.right,0),P=be(f.top,0),R=be(f.bottom,0);p?L=g-2*(k!==0||D!==0?k+D:be(f.left,f.right)):T=v-2*(P!==0||R!==0?P+R:be(f.top,f.bottom))}await d({...t,availableWidth:L,availableHeight:T});const M=await l.getDimensions(c.floating);return g!==M.width||v!==M.height?{reset:{rects:!0}}:{}}}};function Zs(e){const t=Pe(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=_e(e),s=o?e.offsetWidth:r,l=o?e.offsetHeight:n,c=sr(r)!==s||sr(n)!==l;return c&&(r=s,n=l),{width:r,height:n,$:c}}function Xn(e){return ve(e)?e:e.contextElement}function Ot(e){const t=Xn(e);if(!_e(t))return We(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=Zs(t);let l=(s?sr(r.width):r.width)/n,c=(s?sr(r.height):r.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const zu=We(0);function Js(e){const t=Se(e);return!qn()||!t.visualViewport?zu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Iu(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Se(e)?!1:t}function kt(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=Xn(e);let l=We(1);t&&(n?ve(n)&&(l=Ot(n)):l=Ot(e));const c=Iu(s,r,n)?Js(s):We(0);let d=(o.left+c.x)/l.x,u=(o.top+c.y)/l.y,f=o.width/l.x,h=o.height/l.y;if(s){const m=Se(s),p=n&&ve(n)?Se(n):n;let g=m,v=An(g);for(;v&&n&&p!==g;){const y=Ot(v),b=v.getBoundingClientRect(),w=Pe(v),x=b.left+(v.clientLeft+parseFloat(w.paddingLeft))*y.x,j=b.top+(v.clientTop+parseFloat(w.paddingTop))*y.y;d*=y.x,u*=y.y,f*=y.x,h*=y.y,d+=x,u+=j,g=Se(v),v=An(g)}}return zr({width:f,height:h,x:d,y:u})}function Jr(e,t){const r=Qr(e).scrollLeft;return t?t.left+r:kt(Ge(e)).left+r}function ea(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Jr(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Bu(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",l=Ge(n),c=t?Xr(t.floating):!1;if(n===l||c&&s)return r;let d={scrollLeft:0,scrollTop:0},u=We(1);const f=We(0),h=_e(n);if((h||!h&&!s)&&((Ht(n)!=="body"||ur(l))&&(d=Qr(n)),_e(n))){const p=kt(n);u=Ot(n),f.x=p.x+n.clientLeft,f.y=p.y+n.clientTop}const m=l&&!h&&!s?ea(l,d):We(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-d.scrollLeft*u.x+f.x+m.x,y:r.y*u.y-d.scrollTop*u.y+f.y+m.y}}function Wu(e){return Array.from(e.getClientRects())}function Hu(e){const t=Ge(e),r=Qr(e),n=e.ownerDocument.body,o=be(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=be(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let l=-r.scrollLeft+Jr(e);const c=-r.scrollTop;return Pe(n).direction==="rtl"&&(l+=be(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:l,y:c}}const Ko=25;function _u(e,t){const r=Se(e),n=Ge(e),o=r.visualViewport;let s=n.clientWidth,l=n.clientHeight,c=0,d=0;if(o){s=o.width,l=o.height;const f=qn();(!f||f&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const u=Jr(n);if(u<=0){const f=n.ownerDocument,h=f.body,m=getComputedStyle(h),p=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(n.clientWidth-h.clientWidth-p);g<=Ko&&(s-=g)}else u<=Ko&&(s+=u);return{width:s,height:l,x:c,y:d}}const Vu=new Set(["absolute","fixed"]);function Gu(e,t){const r=kt(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=_e(e)?Ot(e):We(1),l=e.clientWidth*s.x,c=e.clientHeight*s.y,d=o*s.x,u=n*s.y;return{width:l,height:c,x:d,y:u}}function Yo(e,t,r){let n;if(t==="viewport")n=_u(e,r);else if(t==="document")n=Hu(Ge(e));else if(ve(t))n=Gu(t,r);else{const o=Js(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return zr(n)}function ta(e,t){const r=at(e);return r===t||!ve(r)||zt(r)?!1:Pe(r).position==="fixed"||ta(r,t)}function Uu(e,t){const r=t.get(e);if(r)return r;let n=ir(e,[],!1).filter(c=>ve(c)&&Ht(c)!=="body"),o=null;const s=Pe(e).position==="fixed";let l=s?at(e):e;for(;ve(l)&&!zt(l);){const c=Pe(l),d=Yn(l);!d&&c.position==="fixed"&&(o=null),(s?!d&&!o:!d&&c.position==="static"&&!!o&&Vu.has(o.position)||ur(l)&&!d&&ta(e,l))?n=n.filter(f=>f!==l):o=c,l=at(l)}return t.set(e,n),n}function Ku(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const l=[...r==="clippingAncestors"?Xr(t)?[]:Uu(t,this._c):[].concat(r),n],c=l[0],d=l.reduce((u,f)=>{const h=Yo(t,f,o);return u.top=be(h.top,u.top),u.right=wt(h.right,u.right),u.bottom=wt(h.bottom,u.bottom),u.left=be(h.left,u.left),u},Yo(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function Yu(e){const{width:t,height:r}=Zs(e);return{width:t,height:r}}function qu(e,t,r){const n=_e(t),o=Ge(t),s=r==="fixed",l=kt(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const d=We(0);function u(){d.x=Jr(o)}if(n||!n&&!s)if((Ht(t)!=="body"||ur(o))&&(c=Qr(t)),n){const p=kt(t,!0,s,t);d.x=p.x+t.clientLeft,d.y=p.y+t.clientTop}else o&&u();s&&!n&&o&&u();const f=o&&!n&&!s?ea(o,c):We(0),h=l.left+c.scrollLeft-d.x-f.x,m=l.top+c.scrollTop-d.y-f.y;return{x:h,y:m,width:l.width,height:l.height}}function xn(e){return Pe(e).position==="static"}function qo(e,t){if(!_e(e)||Pe(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ge(e)===r&&(r=r.ownerDocument.body),r}function ra(e,t){const r=Se(e);if(Xr(e))return r;if(!_e(e)){let o=at(e);for(;o&&!zt(o);){if(ve(o)&&!xn(o))return o;o=at(o)}return r}let n=qo(e,t);for(;n&&fu(n)&&xn(n);)n=qo(n,t);return n&&zt(n)&&xn(n)&&!Yn(n)?r:n||bu(e)||r}const Xu=async function(e){const t=this.getOffsetParent||ra,r=this.getDimensions,n=await r(e.floating);return{reference:qu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Qu(e){return Pe(e).direction==="rtl"}const Zu={convertOffsetParentRelativeRectToViewportRelativeRect:Bu,getDocumentElement:Ge,getClippingRect:Ku,getOffsetParent:ra,getElementRects:Xu,getClientRects:Wu,getDimensions:Yu,getScale:Ot,isElement:ve,isRTL:Qu};function na(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ju(e,t){let r=null,n;const o=Ge(e);function s(){var c;clearTimeout(n),(c=r)==null||c.disconnect(),r=null}function l(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),s();const u=e.getBoundingClientRect(),{left:f,top:h,width:m,height:p}=u;if(c||t(),!m||!p)return;const g=Cr(h),v=Cr(o.clientWidth-(f+m)),y=Cr(o.clientHeight-(h+p)),b=Cr(f),x={rootMargin:-g+"px "+-v+"px "+-y+"px "+-b+"px",threshold:be(0,wt(1,d))||1};let j=!0;function E(F){const T=F[0].intersectionRatio;if(T!==d){if(!j)return l();T?l(!1,T):n=setTimeout(()=>{l(!1,1e-7)},1e3)}T===1&&!na(u,e.getBoundingClientRect())&&l(),j=!1}try{r=new IntersectionObserver(E,{...x,root:o.ownerDocument})}catch{r=new IntersectionObserver(E,x)}r.observe(e)}return l(!0),s}function ef(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=n,u=Xn(e),f=o||s?[...u?ir(u):[],...ir(t)]:[];f.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),s&&b.addEventListener("resize",r)});const h=u&&c?Ju(u,r):null;let m=-1,p=null;l&&(p=new ResizeObserver(b=>{let[w]=b;w&&w.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),r()}),u&&!d&&p.observe(u),p.observe(t));let g,v=d?kt(e):null;d&&y();function y(){const b=kt(e);v&&!na(v,b)&&r(),v=b,g=requestAnimationFrame(y)}return r(),()=>{var b;f.forEach(w=>{o&&w.removeEventListener("scroll",r),s&&w.removeEventListener("resize",r)}),h==null||h(),(b=p)==null||b.disconnect(),p=null,d&&cancelAnimationFrame(g)}}const vn=Zr,tf=Au,rf=Pu,nf=Du,of=Nu,sf=(e,t,r)=>{const n=new Map,o={platform:Zu,...r},s={...o.platform,_c:n};return Ru(e,t,{...o,platform:s})};var af=typeof document<"u",lf=function(){},Lr=af?a.useLayoutEffect:lf;function Ir(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Ir(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!Ir(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function oa(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xo(e,t){const r=oa(e);return Math.round(t*r)/r}function yn(e){const t=K.useRef(e);return Lr(()=>{t.current=e}),t}function cf(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:l}={},transform:c=!0,whileElementsMounted:d,open:u}=e,[f,h]=K.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=K.useState(n);Ir(m,n)||p(n);const[g,v]=K.useState(null),[y,b]=K.useState(null),w=K.useCallback(W=>{W!==F.current&&(F.current=W,v(W))},[]),x=K.useCallback(W=>{W!==T.current&&(T.current=W,b(W))},[]),j=s||g,E=l||y,F=K.useRef(null),T=K.useRef(null),L=K.useRef(f),M=d!=null,k=yn(d),D=yn(o),P=yn(u),R=K.useCallback(()=>{if(!F.current||!T.current)return;const W={placement:t,strategy:r,middleware:m};D.current&&(W.platform=D.current),sf(F.current,T.current,W).then(_=>{const H={..._,isPositioned:P.current!==!1};S.current&&!Ir(L.current,H)&&(L.current=H,Dr.flushSync(()=>{h(H)}))})},[m,t,r,D,P]);Lr(()=>{u===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,h(W=>({...W,isPositioned:!1})))},[u]);const S=K.useRef(!1);Lr(()=>(S.current=!0,()=>{S.current=!1}),[]),Lr(()=>{if(j&&(F.current=j),E&&(T.current=E),j&&E){if(k.current)return k.current(j,E,R);R()}},[j,E,R,k,M]);const O=K.useMemo(()=>({reference:F,floating:T,setReference:w,setFloating:x}),[w,x]),N=K.useMemo(()=>({reference:j,floating:E}),[j,E]),A=K.useMemo(()=>{const W={position:r,left:0,top:0};if(!N.floating)return W;const _=Xo(N.floating,f.x),H=Xo(N.floating,f.y);return c?{...W,transform:"translate("+_+"px, "+H+"px)",...oa(N.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:_,top:H}},[r,c,N.floating,f.x,f.y]);return K.useMemo(()=>({...f,update:R,refs:O,elements:N,floatingStyles:A}),[f,R,O,N,A])}const ia=(e,t)=>({...tf(e),options:[e,t]}),df=(e,t)=>({...rf(e),options:[e,t]}),uf=(e,t)=>({...nf(e),options:[e,t]}),ff=(e,t)=>({...of(e),options:[e,t]}),sa={...K},pf=sa.useInsertionEffect,hf=pf||(e=>e());function aa(e){const t=K.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return hf(()=>{t.current=e}),K.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}var Nn=typeof document<"u"?a.useLayoutEffect:a.useEffect;let Qo=!1,gf=0;const Zo=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+gf++;function mf(){const[e,t]=K.useState(()=>Qo?Zo():void 0);return Nn(()=>{e==null&&t(Zo())},[]),K.useEffect(()=>{Qo=!0},[]),e}const bf=sa.useId,xf=bf||mf;let ar;process.env.NODE_ENV!=="production"&&(ar=new Set);function vf(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=ar)!=null&&e.has(o))){var s;(s=ar)==null||s.add(o),console.warn(o)}}function yf(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=ar)!=null&&e.has(o))){var s;(s=ar)==null||s.add(o),console.error(o)}}function $f(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(o=>o!==r))||[])}}}const wf=K.createContext(null),kf=K.createContext(null),Cf=()=>{var e;return((e=K.useContext(wf))==null?void 0:e.id)||null},jf=()=>K.useContext(kf),Ef="data-floating-ui-focusable";function Sf(e){const{open:t=!1,onOpenChange:r,elements:n}=e,o=xf(),s=K.useRef({}),[l]=K.useState(()=>$f()),c=Cf()!=null;if(process.env.NODE_ENV!=="production"){const p=n.reference;p&&!ve(p)&&yf("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[d,u]=K.useState(n.reference),f=aa((p,g,v)=>{s.current.openEvent=p?g:void 0,l.emit("openchange",{open:p,event:g,reason:v,nested:c}),r==null||r(p,g,v)}),h=K.useMemo(()=>({setPositionReference:u}),[]),m=K.useMemo(()=>({reference:d||n.reference||null,floating:n.floating||null,domReference:n.reference}),[d,n.reference,n.floating]);return K.useMemo(()=>({dataRef:s,open:t,onOpenChange:f,elements:m,events:l,floatingId:o,refs:h}),[t,f,m,l,o,h])}function Lf(e){e===void 0&&(e={});const{nodeId:t}=e,r=Sf({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[s,l]=K.useState(null),[c,d]=K.useState(null),f=(o==null?void 0:o.domReference)||s,h=K.useRef(null),m=jf();Nn(()=>{f&&(h.current=f)},[f]);const p=cf({...e,elements:{...o,...c&&{reference:c}}}),g=K.useCallback(x=>{const j=ve(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;d(j),p.refs.setReference(j)},[p.refs]),v=K.useCallback(x=>{(ve(x)||x===null)&&(h.current=x,l(x)),(ve(p.refs.reference.current)||p.refs.reference.current===null||x!==null&&!ve(x))&&p.refs.setReference(x)},[p.refs]),y=K.useMemo(()=>({...p.refs,setReference:v,setPositionReference:g,domReference:h}),[p.refs,v,g]),b=K.useMemo(()=>({...p.elements,domReference:f}),[p.elements,f]),w=K.useMemo(()=>({...p,...n,refs:y,elements:b,nodeId:t}),[p,y,b,t,n]);return Nn(()=>{n.dataRef.current.floatingContext=w;const x=m==null?void 0:m.nodesRef.current.find(j=>j.id===t);x&&(x.context=w)}),K.useMemo(()=>({...p,context:w,refs:y,elements:b}),[p,y,b,w])}const Jo="active",ei="selected";function $n(e,t,r){const n=new Map,o=r==="item";let s=e;if(o&&e){const{[Jo]:l,[ei]:c,...d}=e;s=d}return{...r==="floating"&&{tabIndex:-1,[Ef]:""},...s,...t.map(l=>{const c=l?l[r]:null;return typeof c=="function"?e?c(e):null:c}).concat(e).reduce((l,c)=>(c&&Object.entries(c).forEach(d=>{let[u,f]=d;if(!(o&&[Jo,ei].includes(u)))if(u.indexOf("on")===0){if(n.has(u)||n.set(u,[]),typeof f=="function"){var h;(h=n.get(u))==null||h.push(f),l[u]=function(){for(var m,p=arguments.length,g=new Array(p),v=0;v<p;v++)g[v]=arguments[v];return(m=n.get(u))==null?void 0:m.map(y=>y(...g)).find(y=>y!==void 0)}}}else l[u]=f}),l),{})}}function Tf(e){e===void 0&&(e=[]);const t=e.map(c=>c==null?void 0:c.reference),r=e.map(c=>c==null?void 0:c.floating),n=e.map(c=>c==null?void 0:c.item),o=K.useCallback(c=>$n(c,e,"reference"),t),s=K.useCallback(c=>$n(c,e,"floating"),r),l=K.useCallback(c=>$n(c,e,"item"),n);return K.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:l}),[o,s,l])}function ti(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const Ff=e=>({name:"inner",options:e,async fn(t){const{listRef:r,overflowRef:n,onFallbackChange:o,offset:s=0,index:l=0,minItemsVisible:c=4,referenceOverflowThreshold:d=0,scrollRef:u,...f}=_t(e,t),{rects:h,elements:{floating:m}}=t,p=r.current[l],g=(u==null?void 0:u.current)||m,v=m.clientTop||g.clientTop,y=m.clientTop!==0,b=g.clientTop!==0,w=m===g;if(process.env.NODE_ENV!=="production"&&(t.placement.startsWith("bottom")||vf('`placement` side must be "bottom" when using the `inner`',"middleware.")),!p)return{};const x={...t,...await ia(-p.offsetTop-m.clientTop-h.reference.height/2-p.offsetHeight/2-s).fn(t)},j=await vn(ti(x,g.scrollHeight+v+m.clientTop),f),E=await vn(x,{...f,elementContext:"reference"}),F=be(0,j.top),T=x.y+F,k=(g.scrollHeight>g.clientHeight?D=>D:sr)(be(0,g.scrollHeight+(y&&w||b?v*2:0)-F-be(0,j.bottom)));if(g.style.maxHeight=k+"px",g.scrollTop=F,o){const D=g.offsetHeight<p.offsetHeight*wt(c,r.current.length)-1||E.top>=-d||E.bottom>=-d;Dr.flushSync(()=>o(D))}return n&&(n.current=await vn(ti({...x,y:T},g.offsetHeight+v+m.clientTop),f)),{y:T}}});function Rf(e,t){const{open:r,elements:n}=e,{enabled:o=!0,overflowRef:s,scrollRef:l,onChange:c}=t,d=aa(c),u=K.useRef(!1),f=K.useRef(null),h=K.useRef(null);K.useEffect(()=>{if(!o)return;function p(v){if(v.ctrlKey||!g||s.current==null)return;const y=v.deltaY,b=s.current.top>=-.5,w=s.current.bottom>=-.5,x=g.scrollHeight-g.clientHeight,j=y<0?-1:1,E=y<0?"max":"min";g.scrollHeight<=g.clientHeight||(!b&&y>0||!w&&y<0?(v.preventDefault(),Dr.flushSync(()=>{d(F=>F+Math[E](y,x*j))})):/firefox/i.test(vu())&&(g.scrollTop+=y))}const g=(l==null?void 0:l.current)||n.floating;if(r&&g)return g.addEventListener("wheel",p),requestAnimationFrame(()=>{f.current=g.scrollTop,s.current!=null&&(h.current={...s.current})}),()=>{f.current=null,h.current=null,g.removeEventListener("wheel",p)}},[o,r,n.floating,s,l,d]);const m=K.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const p=(l==null?void 0:l.current)||n.floating;if(!(!s.current||!p||!u.current)){if(f.current!==null){const g=p.scrollTop-f.current;(s.current.bottom<-.5&&g<-1||s.current.top<-.5&&g>1)&&Dr.flushSync(()=>d(v=>v+g))}requestAnimationFrame(()=>{f.current=p.scrollTop})}}}),[n.floating,d,s,l]);return K.useMemo(()=>o?{floating:m}:{},[o,m])}let Vt=a.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Vt.displayName="FloatingContext";let Qn=a.createContext(null);Qn.displayName="PlacementContext";function Df(e){return a.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function Of(){return a.useContext(Vt).setReference}function Mf(){return a.useContext(Vt).getReferenceProps}function Af(){let{getFloatingProps:e,slot:t}=a.useContext(Vt);return a.useCallback((...r)=>Object.assign({},e(...r),{"data-anchor":t.anchor}),[e,t])}function Pf(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=a.useContext(Qn),r=a.useMemo(()=>e,[JSON.stringify(e,(o,s)=>{var l;return(l=s==null?void 0:s.outerHTML)!=null?l:s})]);le(()=>{t==null||t(r??null)},[t,r]);let n=a.useContext(Vt);return a.useMemo(()=>[n.setFloating,e?n.styles:{}],[n.setFloating,e,n.styles])}let ri=4;function Nf({children:e,enabled:t=!0}){let[r,n]=a.useState(null),[o,s]=a.useState(0),l=a.useRef(null),[c,d]=a.useState(null);zf(c);let u=t&&r!==null&&c!==null,{to:f="bottom",gap:h=0,offset:m=0,padding:p=0,inner:g}=If(r,c),[v,y="center"]=f.split(" ");le(()=>{u&&s(0)},[u]);let{refs:b,floatingStyles:w,context:x}=Lf({open:u,placement:v==="selection"?y==="center"?"bottom":`bottom-${y}`:y==="center"?`${v}`:`${v}-${y}`,strategy:"absolute",transform:!1,middleware:[ia({mainAxis:v==="selection"?0:h,crossAxis:m}),df({padding:p}),v!=="selection"&&uf({padding:p}),v==="selection"&&g?Ff({...g,padding:p,overflowRef:l,offset:o,minItemsVisible:ri,referenceOverflowThreshold:p,onFallbackChange(D){var P,R;if(!D)return;let S=x.elements.floating;if(!S)return;let O=parseFloat(getComputedStyle(S).scrollPaddingBottom)||0,N=Math.min(ri,S.childElementCount),A=0,W=0;for(let _ of(R=(P=x.elements.floating)==null?void 0:P.childNodes)!=null?R:[])if(Le(_)){let H=_.offsetTop,G=H+_.clientHeight+O,V=S.scrollTop,U=V+S.clientHeight;if(H>=V&&G<=U)N--;else{W=Math.max(0,Math.min(G,U)-Math.max(H,V)),A=_.clientHeight;break}}N>=1&&s(_=>{let H=A*N-W+O;return _>=H?_:H})}}):null,ff({padding:p,apply({availableWidth:D,availableHeight:P,elements:R}){Object.assign(R.floating.style,{overflow:"auto",maxWidth:`${D}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${P}px)`})}})].filter(Boolean),whileElementsMounted:ef}),[j=v,E=y]=x.placement.split("-");v==="selection"&&(j="selection");let F=a.useMemo(()=>({anchor:[j,E].filter(Boolean).join(" ")}),[j,E]),T=Rf(x,{overflowRef:l,onChange:s}),{getReferenceProps:L,getFloatingProps:M}=Tf([T]),k=Z(D=>{d(D),b.setFloating(D)});return K.createElement(Qn.Provider,{value:n},K.createElement(Vt.Provider,{value:{setFloating:k,setReference:b.setReference,styles:w,getReferenceProps:L,getFloatingProps:M,slot:F}},e))}function zf(e){le(()=>{if(!e)return;let t=new MutationObserver(()=>{let r=window.getComputedStyle(e).maxHeight,n=parseFloat(r);if(isNaN(n))return;let o=parseInt(r);isNaN(o)||n!==o&&(e.style.maxHeight=`${Math.ceil(n)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function If(e,t){var r,n,o;let s=wn((r=e==null?void 0:e.gap)!=null?r:"var(--anchor-gap, 0)",t),l=wn((n=e==null?void 0:e.offset)!=null?n:"var(--anchor-offset, 0)",t),c=wn((o=e==null?void 0:e.padding)!=null?o:"var(--anchor-padding, 0)",t);return{...e,gap:s,offset:l,padding:c}}function wn(e,t,r=void 0){let n=dt(),o=Z((d,u)=>{if(d==null)return[r,null];if(typeof d=="number")return[d,null];if(typeof d=="string"){if(!u)return[r,null];let f=ni(d,u);return[f,h=>{let m=la(d);{let p=m.map(g=>window.getComputedStyle(u).getPropertyValue(g));n.requestAnimationFrame(function g(){n.nextFrame(g);let v=!1;for(let[b,w]of m.entries()){let x=window.getComputedStyle(u).getPropertyValue(w);if(p[b]!==x){p[b]=x,v=!0;break}}if(!v)return;let y=ni(d,u);f!==y&&(h(y),f=y)})}return n.dispose}]}return[r,null]}),s=a.useMemo(()=>o(e,t)[0],[e,t]),[l=s,c]=a.useState();return le(()=>{let[d,u]=o(e,t);if(c(d),!!u)return u(c)},[e,t]),l}function la(e){let t=/var\((.*)\)/.exec(e);if(t){let r=t[1].indexOf(",");if(r===-1)return[t[1]];let n=t[1].slice(0,r).trim(),o=t[1].slice(r+1).trim();return o?[n,...la(o)]:[n]}return[]}function ni(e,t){let r=document.createElement("div");t.appendChild(r),r.style.setProperty("margin-top","0px","important"),r.style.setProperty("margin-top",e,"important");let n=parseFloat(window.getComputedStyle(r).marginTop)||0;return t.removeChild(r),n}function Bf({children:e,freeze:t},r){let n=ca(t,e);return a.isValidElement(n)?a.cloneElement(n,{ref:r}):a.createElement(a.Fragment,null,n)}a.forwardRef(Bf);function ca(e,t){let[r,n]=a.useState(t);return!e&&r!==t&&n(t),e?r:t}let en=a.createContext(null);en.displayName="OpenClosedContext";var we=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(we||{});function pr(){return a.useContext(en)}function da({value:e,children:t}){return a.createElement(en.Provider,{value:e},t)}function Wf({children:e}){return a.createElement(en.Provider,{value:null},e)}function Hf(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let rt=[];Hf(()=>{function e(t){if(!qe(t.target)||t.target===document.body||rt[0]===t.target)return;let r=t.target;r=r.closest(Pr),rt.unshift(r??t.target),rt=rt.filter(n=>n!=null&&n.isConnected),rt.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function _f(e){throw new Error("Unexpected object: "+e)}var ce=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(ce||{});function jr(e,t){let r=t.resolveItems();if(r.length<=0)return null;let n=t.resolveActiveIndex(),o=n??-1;switch(e.focus){case 0:{for(let s=0;s<r.length;++s)if(!t.resolveDisabled(r[s],s,r))return s;return n}case 1:{o===-1&&(o=r.length);for(let s=o-1;s>=0;--s)if(!t.resolveDisabled(r[s],s,r))return s;return n}case 2:{for(let s=o+1;s<r.length;++s)if(!t.resolveDisabled(r[s],s,r))return s;return n}case 3:{for(let s=r.length-1;s>=0;--s)if(!t.resolveDisabled(r[s],s,r))return s;return n}case 4:{for(let s=0;s<r.length;++s)if(t.resolveId(r[s],s,r)===e.id)return s;return n}case 5:return null;default:_f(e)}}function Zn(e){let t=Z(e),r=a.useRef(!1);a.useEffect(()=>(r.current=!1,()=>{r.current=!0,Gr(()=>{r.current&&t()})}),[t])}let ua=a.createContext(!1);function Vf(){return a.useContext(ua)}function oi(e){return a.createElement(ua.Provider,{value:e.force},e.children)}function Gf(e){let t=Vf(),r=a.useContext(pa),[n,o]=a.useState(()=>{var s;if(!t&&r!==null)return(s=r.current)!=null?s:null;if(Be.isServer)return null;let l=e==null?void 0:e.getElementById("headlessui-portal-root");if(l)return l;if(e===null)return null;let c=e.createElement("div");return c.setAttribute("id","headlessui-portal-root"),e.body.appendChild(c)});return a.useEffect(()=>{n!==null&&(e!=null&&e.body.contains(n)||e==null||e.body.appendChild(n))},[n,e]),a.useEffect(()=>{t||r!==null&&o(r.current)},[r,o,t]),n}let fa=a.Fragment,Uf=de(function(e,t){let{ownerDocument:r=null,...n}=e,o=a.useRef(null),s=ye(cd(m=>{o.current=m}),t),l=or(o.current),c=r??l,d=Gf(c),u=a.useContext(zn),f=dt(),h=he();return Zn(()=>{var m;d&&d.childNodes.length<=0&&((m=d.parentElement)==null||m.removeChild(d))}),d?He.createPortal(a.createElement("div",{"data-headlessui-portal":"",ref:m=>{f.dispose(),u&&m&&f.add(u.register(m))}},h({ourProps:{ref:s},theirProps:n,slot:{},defaultTag:fa,name:"Portal"})),d):null});function Kf(e,t){let r=ye(t),{enabled:n=!0,ownerDocument:o,...s}=e,l=he();return n?a.createElement(Uf,{...s,ownerDocument:o,ref:r}):l({ourProps:{ref:r},theirProps:s,slot:{},defaultTag:fa,name:"Portal"})}let Yf=a.Fragment,pa=a.createContext(null);function qf(e,t){let{target:r,...n}=e,o={ref:ye(t)},s=he();return a.createElement(pa.Provider,{value:r},s({ourProps:o,theirProps:n,defaultTag:Yf,name:"Popover.Group"}))}let zn=a.createContext(null);function Xf(){let e=a.useContext(zn),t=a.useRef([]),r=Z(s=>(t.current.push(s),e&&e.register(s),()=>n(s))),n=Z(s=>{let l=t.current.indexOf(s);l!==-1&&t.current.splice(l,1),e&&e.unregister(s)}),o=a.useMemo(()=>({register:r,unregister:n,portals:t}),[r,n,t]);return[t,a.useMemo(()=>function({children:s}){return a.createElement(zn.Provider,{value:o},s)},[o])]}let Qf=de(Kf),ha=de(qf),ga=Object.assign(Qf,{Group:ha});const Tr={Idle:{kind:"Idle"},Tracked:e=>({kind:"Tracked",position:e}),Moved:{kind:"Moved"}};function ma(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function Zf(e,t,r){let n=Te();if(t.kind==="Tracked"){let o=function(){s!==ma(e)&&(n.dispose(),r())},{position:s}=t,l=new ResizeObserver(o);l.observe(e),n.add(()=>l.disconnect()),n.addEventListener(window,"scroll",o,{passive:!0}),n.addEventListener(window,"resize",o)}return()=>n.dispose()}function Jf(e,t=typeof document<"u"?document.defaultView:null,r){let n=dr(e,"escape");_s(t,"keydown",o=>{n&&(o.defaultPrevented||o.key===fe.Escape&&r(o))})}function ep(){var e;let[t]=a.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[r,n]=a.useState((e=t==null?void 0:t.matches)!=null?e:!1);return le(()=>{if(!t)return;function o(s){n(s.matches)}return t.addEventListener("change",o),()=>t.removeEventListener("change",o)},[t]),r}function tp({defaultContainers:e=[],portals:t,mainTreeNode:r}={}){let n=Z(()=>{var o,s;let l=Wt(r),c=[];for(let d of e)d!==null&&(Qe(d)?c.push(d):"current"in d&&Qe(d.current)&&c.push(d.current));if(t!=null&&t.current)for(let d of t.current)c.push(d);for(let d of(o=l==null?void 0:l.querySelectorAll("html > *, body > *"))!=null?o:[])d!==document.body&&d!==document.head&&Qe(d)&&d.id!=="headlessui-portal-root"&&(r&&(d.contains(r)||d.contains((s=r==null?void 0:r.getRootNode())==null?void 0:s.host))||c.some(u=>d.contains(u))||c.push(d));return c});return{resolveContainers:n,contains:Z(o=>n().some(s=>s.contains(o)))}}let ba=a.createContext(null);function ii({children:e,node:t}){let[r,n]=a.useState(null),o=xa(t??r);return a.createElement(ba.Provider,{value:o},e,o===null&&a.createElement(nr,{features:Nt.Hidden,ref:s=>{var l,c;if(s){for(let d of(c=(l=Wt(s))==null?void 0:l.querySelectorAll("html > *, body > *"))!=null?c:[])if(d!==document.body&&d!==document.head&&Qe(d)&&d!=null&&d.contains(s)){n(d);break}}}}))}function xa(e=null){var t;return(t=a.useContext(ba))!=null?t:e}function rp(){let e=typeof document>"u";return"useSyncExternalStore"in K?(t=>t.useSyncExternalStore)(K)(()=>()=>{},()=>!1,()=>!e):!1}function tn(){let e=rp(),[t,r]=K.useState(Be.isHandoffComplete);return t&&Be.isHandoffComplete===!1&&r(!1),K.useEffect(()=>{t!==!0&&r(!0)},[t]),K.useEffect(()=>Be.handoff(),[]),e?!1:t}function Jn(){let e=a.useRef(!1);return le(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var Yt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Yt||{});function np(){let e=a.useRef(0);return Ws(!0,"keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function va(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let r of e.current)Qe(r.current)&&t.add(r.current);return t}let op="div";var gt=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(gt||{});function ip(e,t){let r=a.useRef(null),n=ye(r,t),{initialFocus:o,initialFocusFallback:s,containers:l,features:c=15,...d}=e;tn()||(c=0);let u=or(r.current);cp(c,{ownerDocument:u});let f=dp(c,{ownerDocument:u,container:r,initialFocus:o,initialFocusFallback:s});up(c,{ownerDocument:u,container:r,containers:l,previousActiveElement:f});let h=np(),m=Z(w=>{if(!Le(r.current))return;let x=r.current;(j=>j())(()=>{ke(h.current,{[Yt.Forwards]:()=>{Dt(x,Ae.First,{skipElements:[w.relatedTarget,s]})},[Yt.Backwards]:()=>{Dt(x,Ae.Last,{skipElements:[w.relatedTarget,s]})}})})}),p=dr(!!(c&2),"focus-trap#tab-lock"),g=dt(),v=a.useRef(!1),y={ref:n,onKeyDown(w){w.key=="Tab"&&(v.current=!0,g.requestAnimationFrame(()=>{v.current=!1}))},onBlur(w){if(!(c&4))return;let x=va(l);Le(r.current)&&x.add(r.current);let j=w.relatedTarget;qe(j)&&j.dataset.headlessuiFocusGuard!=="true"&&(ya(x,j)||(v.current?Dt(r.current,ke(h.current,{[Yt.Forwards]:()=>Ae.Next,[Yt.Backwards]:()=>Ae.Previous})|Ae.WrapAround,{relativeTo:w.target}):qe(w.target)&&Ze(w.target)))}},b=he();return a.createElement(a.Fragment,null,p&&a.createElement(nr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:m,features:Nt.Focusable}),b({ourProps:y,theirProps:d,defaultTag:op,name:"FocusTrap"}),p&&a.createElement(nr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:m,features:Nt.Focusable}))}let sp=de(ip),ap=Object.assign(sp,{features:gt});function lp(e=!0){let t=a.useRef(rt.slice());return Kn(([r],[n])=>{n===!0&&r===!1&&Gr(()=>{t.current.splice(0)}),n===!1&&r===!0&&(t.current=rt.slice())},[e,rt,t]),Z(()=>{var r;return(r=t.current.find(n=>n!=null&&n.isConnected))!=null?r:null})}function cp(e,{ownerDocument:t}){let r=!!(e&8),n=lp(r);Kn(()=>{r||hs(t==null?void 0:t.body)&&Ze(n())},[r]),Zn(()=>{r&&Ze(n())})}function dp(e,{ownerDocument:t,container:r,initialFocus:n,initialFocusFallback:o}){let s=a.useRef(null),l=dr(!!(e&1),"focus-trap#initial-focus"),c=Jn();return Kn(()=>{if(e===0)return;if(!l){o!=null&&o.current&&Ze(o.current);return}let d=r.current;d&&Gr(()=>{if(!c.current)return;let u=t==null?void 0:t.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===u){s.current=u;return}}else if(d.contains(u)){s.current=u;return}if(n!=null&&n.current)Ze(n.current);else{if(e&16){if(Dt(d,Ae.First|Ae.AutoFocus)!==Mn.Error)return}else if(Dt(d,Ae.First)!==Mn.Error)return;if(o!=null&&o.current&&(Ze(o.current),(t==null?void 0:t.activeElement)===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}s.current=t==null?void 0:t.activeElement})},[o,l,e]),s}function up(e,{ownerDocument:t,container:r,containers:n,previousActiveElement:o}){let s=Jn(),l=!!(e&4);_s(t==null?void 0:t.defaultView,"focus",c=>{if(!l||!s.current)return;let d=va(n);Le(r.current)&&d.add(r.current);let u=o.current;if(!u)return;let f=c.target;Le(f)?ya(d,f)?(o.current=f,Ze(f)):(c.preventDefault(),c.stopPropagation(),Ze(u)):Ze(o.current)},!0)}function ya(e,t){for(let r of e)if(r.contains(t))return!0;return!1}function $a(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!Xt((t=e.as)!=null?t:ka)||a.Children.count(e.children)===1}let rn=a.createContext(null);rn.displayName="TransitionContext";var fp=(e=>(e.Visible="visible",e.Hidden="hidden",e))(fp||{});function pp(){let e=a.useContext(rn);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function hp(){let e=a.useContext(nn);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let nn=a.createContext(null);nn.displayName="NestingContext";function on(e){return"children"in e?on(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function wa(e,t){let r=ut(e),n=a.useRef([]),o=Jn(),s=dt(),l=Z((p,g=it.Hidden)=>{let v=n.current.findIndex(({el:y})=>y===p);v!==-1&&(ke(g,{[it.Unmount](){n.current.splice(v,1)},[it.Hidden](){n.current[v].state="hidden"}}),s.microTask(()=>{var y;!on(n)&&o.current&&((y=r.current)==null||y.call(r))}))}),c=Z(p=>{let g=n.current.find(({el:v})=>v===p);return g?g.state!=="visible"&&(g.state="visible"):n.current.push({el:p,state:"visible"}),()=>l(p,it.Unmount)}),d=a.useRef([]),u=a.useRef(Promise.resolve()),f=a.useRef({enter:[],leave:[]}),h=Z((p,g,v)=>{d.current.splice(0),t&&(t.chains.current[g]=t.chains.current[g].filter(([y])=>y!==p)),t==null||t.chains.current[g].push([p,new Promise(y=>{d.current.push(y)})]),t==null||t.chains.current[g].push([p,new Promise(y=>{Promise.all(f.current[g].map(([b,w])=>w)).then(()=>y())})]),g==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>v(g)):v(g)}),m=Z((p,g,v)=>{Promise.all(f.current[g].splice(0).map(([y,b])=>b)).then(()=>{var y;(y=d.current.shift())==null||y()}).then(()=>v(g))});return a.useMemo(()=>({children:n,register:c,unregister:l,onStart:h,onStop:m,wait:u,chains:f}),[c,l,n,h,m,f,u])}let ka=a.Fragment,Ca=Pt.RenderStrategy;function gp(e,t){var r,n;let{transition:o=!0,beforeEnter:s,afterEnter:l,beforeLeave:c,afterLeave:d,enter:u,enterFrom:f,enterTo:h,entered:m,leave:p,leaveFrom:g,leaveTo:v,...y}=e,[b,w]=a.useState(null),x=a.useRef(null),j=$a(e),E=ye(...j?[x,t,w]:t===null?[]:[t]),F=(r=y.unmount)==null||r?it.Unmount:it.Hidden,{show:T,appear:L,initial:M}=pp(),[k,D]=a.useState(T?"visible":"hidden"),P=hp(),{register:R,unregister:S}=P;le(()=>R(x),[R,x]),le(()=>{if(F===it.Hidden&&x.current){if(T&&k!=="visible"){D("visible");return}return ke(k,{hidden:()=>S(x),visible:()=>R(x)})}},[k,x,R,S,T,F]);let O=tn();le(()=>{if(j&&O&&k==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,k,O,j]);let N=M&&!L,A=L&&T&&M,W=a.useRef(!1),_=wa(()=>{W.current||(D("hidden"),S(x))},P),H=Z(oe=>{W.current=!0;let B=oe?"enter":"leave";_.onStart(x,B,C=>{C==="enter"?s==null||s():C==="leave"&&(c==null||c())})}),G=Z(oe=>{let B=oe?"enter":"leave";W.current=!1,_.onStop(x,B,C=>{C==="enter"?l==null||l():C==="leave"&&(d==null||d())}),B==="leave"&&!on(_)&&(D("hidden"),S(x))});a.useEffect(()=>{j&&o||(H(T),G(T))},[T,j,o]);let V=!(!o||!j||!O||N),[,U]=Us(V,b,T,{start:H,end:G}),ne=et({ref:E,className:((n=Dn(y.className,A&&u,A&&f,U.enter&&u,U.enter&&U.closed&&f,U.enter&&!U.closed&&h,U.leave&&p,U.leave&&!U.closed&&g,U.leave&&U.closed&&v,!U.transition&&T&&m))==null?void 0:n.trim())||void 0,...Gs(U)}),ae=0;k==="visible"&&(ae|=we.Open),k==="hidden"&&(ae|=we.Closed),T&&k==="hidden"&&(ae|=we.Opening),!T&&k==="visible"&&(ae|=we.Closing);let Y=he();return a.createElement(nn.Provider,{value:_},a.createElement(da,{value:ae},Y({ourProps:ne,theirProps:y,defaultTag:ka,features:Ca,visible:k==="visible",name:"Transition.Child"})))}function mp(e,t){let{show:r,appear:n=!1,unmount:o=!0,...s}=e,l=a.useRef(null),c=$a(e),d=ye(...c?[l,t]:t===null?[]:[t]);tn();let u=pr();if(r===void 0&&u!==null&&(r=(u&we.Open)===we.Open),r===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[f,h]=a.useState(r?"visible":"hidden"),m=wa(()=>{r||h("hidden")}),[p,g]=a.useState(!0),v=a.useRef([r]);le(()=>{p!==!1&&v.current[v.current.length-1]!==r&&(v.current.push(r),g(!1))},[v,r]);let y=a.useMemo(()=>({show:r,appear:n,initial:p}),[r,n,p]);le(()=>{r?h("visible"):!on(m)&&l.current!==null&&h("hidden")},[r,m]);let b={unmount:o},w=Z(()=>{var E;p&&g(!1),(E=e.beforeEnter)==null||E.call(e)}),x=Z(()=>{var E;p&&g(!1),(E=e.beforeLeave)==null||E.call(e)}),j=he();return a.createElement(nn.Provider,{value:m},a.createElement(rn.Provider,{value:y},j({ourProps:{...b,as:a.Fragment,children:a.createElement(ja,{ref:d,...b,...s,beforeEnter:w,beforeLeave:x})},theirProps:{},defaultTag:a.Fragment,features:Ca,visible:f==="visible",name:"Transition"})))}function bp(e,t){let r=a.useContext(rn)!==null,n=pr()!==null;return a.createElement(a.Fragment,null,!r&&n?a.createElement(In,{ref:t,...e}):a.createElement(ja,{ref:t,...e}))}let In=de(mp),ja=de(gp),eo=de(bp),Mt=Object.assign(In,{Child:eo,Root:In});var xp=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(xp||{}),vp=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(vp||{});let yp={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},to=a.createContext(null);to.displayName="DialogContext";function sn(e){let t=a.useContext(to);if(t===null){let r=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,sn),r}return t}function $p(e,t){return ke(t.type,yp,e,t)}let si=de(function(e,t){let r=a.useId(),{id:n=`headlessui-dialog-${r}`,open:o,onClose:s,initialFocus:l,role:c="dialog",autoFocus:d=!0,__demoMode:u=!1,unmount:f=!1,...h}=e,m=a.useRef(!1);c=(function(){return c==="dialog"||c==="alertdialog"?c:(m.current||(m.current=!0,console.warn(`Invalid role [${c}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")})();let p=pr();o===void 0&&p!==null&&(o=(p&we.Open)===we.Open);let g=a.useRef(null),v=ye(g,t),y=or(g.current),b=o?0:1,[w,x]=a.useReducer($p,{titleId:null,descriptionId:null,panelRef:a.createRef()}),j=Z(()=>s(!1)),E=Z(U=>x({type:0,id:U})),F=tn()?b===0:!1,[T,L]=Xf(),M={get current(){var U;return(U=w.panelRef.current)!=null?U:g.current}},k=xa(),{resolveContainers:D}=tp({mainTreeNode:k,portals:T,defaultContainers:[M]}),P=p!==null?(p&we.Closing)===we.Closing:!1;As(u||P?!1:F,{allowed:Z(()=>{var U,ne;return[(ne=(U=g.current)==null?void 0:U.closest("[data-headlessui-portal]"))!=null?ne:null]}),disallowed:Z(()=>{var U;return[(U=k==null?void 0:k.closest("body > *:not(#headlessui-portal-root)"))!=null?U:null]})});let R=Yr.get(null);le(()=>{if(F)return R.actions.push(n),()=>R.actions.pop(n)},[R,n,F]);let S=$e(R,a.useCallback(U=>R.selectors.isTop(U,n),[R,n]));Hs(S,D,U=>{U.preventDefault(),j()}),Jf(S,y==null?void 0:y.defaultView,U=>{U.preventDefault(),U.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),j()}),Vs(u||P?!1:F,y,D),Ps(F,g,j);let[O,N]=ud(),A=a.useMemo(()=>[{dialogState:b,close:j,setTitleId:E,unmount:f},w],[b,j,E,f,w]),W=Me({open:b===0}),_={ref:v,id:n,role:c,tabIndex:-1,"aria-modal":u?void 0:b===0?!0:void 0,"aria-labelledby":w.titleId,"aria-describedby":O,unmount:f},H=!ep(),G=gt.None;F&&!u&&(G|=gt.RestoreFocus,G|=gt.TabLock,d&&(G|=gt.AutoFocus),H&&(G|=gt.InitialFocus));let V=he();return a.createElement(Wf,null,a.createElement(oi,{force:!0},a.createElement(ga,null,a.createElement(to.Provider,{value:A},a.createElement(ha,{target:g},a.createElement(oi,{force:!1},a.createElement(N,{slot:W},a.createElement(L,null,a.createElement(ap,{initialFocus:l,initialFocusFallback:g,containers:D,features:G},a.createElement(wd,{value:j},V({ourProps:_,theirProps:h,slot:W,defaultTag:wp,features:kp,visible:b===0,name:"Dialog"})))))))))))}),wp="div",kp=Pt.RenderStrategy|Pt.Static;function Cp(e,t){let{transition:r=!1,open:n,...o}=e,s=pr(),l=e.hasOwnProperty("open")||s!==null,c=e.hasOwnProperty("onClose");if(!l&&!c)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!l)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!c)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!s&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(n!==void 0||r)&&!o.static?a.createElement(ii,null,a.createElement(Mt,{show:n,transition:r,unmount:o.unmount},a.createElement(si,{ref:t,...o}))):a.createElement(ii,null,a.createElement(si,{ref:t,open:n,...o}))}let jp="div";function Ep(e,t){let r=a.useId(),{id:n=`headlessui-dialog-panel-${r}`,transition:o=!1,...s}=e,[{dialogState:l,unmount:c},d]=sn("Dialog.Panel"),u=ye(t,d.panelRef),f=Me({open:l===0}),h=Z(y=>{y.stopPropagation()}),m={ref:u,id:n,onClick:h},p=o?eo:a.Fragment,g=o?{unmount:c}:{},v=he();return a.createElement(p,{...g},v({ourProps:m,theirProps:s,slot:f,defaultTag:jp,name:"Dialog.Panel"}))}let Sp="div";function Lp(e,t){let{transition:r=!1,...n}=e,[{dialogState:o,unmount:s}]=sn("Dialog.Backdrop"),l=Me({open:o===0}),c={ref:t,"aria-hidden":!0},d=r?eo:a.Fragment,u=r?{unmount:s}:{},f=he();return a.createElement(d,{...u},f({ourProps:c,theirProps:n,slot:l,defaultTag:Sp,name:"Dialog.Backdrop"}))}let Tp="h2";function Fp(e,t){let r=a.useId(),{id:n=`headlessui-dialog-title-${r}`,...o}=e,[{dialogState:s,setTitleId:l}]=sn("Dialog.Title"),c=ye(t);a.useEffect(()=>(l(n),()=>l(null)),[n,l]);let d=Me({open:s===0}),u={ref:c,id:n};return he()({ourProps:u,theirProps:o,slot:d,defaultTag:Tp,name:"Dialog.Title"})}let Rp=de(Cp),Dp=de(Ep);de(Lp);let Op=de(Fp),ro=Object.assign(Rp,{Panel:Dp,Title:Op,Description:gd}),ai=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function li(e){var t,r;let n=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!Le(o))return n;let s=!1;for(let c of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))c.remove(),s=!0;let l=s?(r=o.innerText)!=null?r:"":n;return ai.test(l)&&(l=l.replace(ai,"")),l}function Mp(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let r=e.getAttribute("aria-labelledby");if(r){let n=r.split(" ").map(o=>{let s=document.getElementById(o);if(s){let l=s.getAttribute("aria-label");return typeof l=="string"?l.trim():li(s).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return li(e).trim()}function Ap(e){let t=a.useRef(""),r=a.useRef("");return Z(()=>{let n=e.current;if(!n)return"";let o=n.innerText;if(t.current===o)return r.current;let s=Mp(n).trim().toLowerCase();return t.current=o,r.current=s,s})}var Pp=Object.defineProperty,Np=(e,t,r)=>t in e?Pp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ci=(e,t,r)=>(Np(e,typeof t!="symbol"?t+"":t,r),r),xe=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(xe||{}),st=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(st||{}),Fr=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Fr||{}),Ea=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.SelectOption=5]="SelectOption",e[e.RegisterOptions=6]="RegisterOptions",e[e.UnregisterOptions=7]="UnregisterOptions",e[e.SetButtonElement=8]="SetButtonElement",e[e.SetOptionsElement=9]="SetOptionsElement",e[e.SortOptions=10]="SortOptions",e[e.MarkButtonAsMoved=11]="MarkButtonAsMoved",e))(Ea||{});function di(e,t=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,n=Is(t(e.options.slice()),s=>s.dataRef.current.domRef.current),o=r?n.indexOf(r):null;return o===-1&&(o=null),{options:n,activeOptionIndex:o}}let zp={1(e){if(e.dataRef.current.disabled||e.listboxState===1)return e;let t=e.buttonElement?Tr.Tracked(ma(e.buttonElement)):e.buttonPositionState;return{...e,activeOptionIndex:null,pendingFocus:{focus:ce.Nothing},listboxState:1,__demoMode:!1,buttonPositionState:t}},0(e,t){if(e.dataRef.current.disabled||e.listboxState===0)return e;let r=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,o=e.options.findIndex(s=>n(s.dataRef.current.value));return o!==-1&&(r=o),{...e,frozenValue:!1,pendingFocus:t.focus,listboxState:0,activeOptionIndex:r,__demoMode:!1,buttonPositionState:Tr.Idle}},2(e,t){var r,n,o,s,l;if(e.dataRef.current.disabled||e.listboxState===1)return e;let c={...e,searchQuery:"",activationTrigger:(r=t.trigger)!=null?r:1,__demoMode:!1};if(t.focus===ce.Nothing)return{...c,activeOptionIndex:null};if(t.focus===ce.Specific)return{...c,activeOptionIndex:e.options.findIndex(f=>f.id===t.id)};if(t.focus===ce.Previous){let f=e.activeOptionIndex;if(f!==null){let h=e.options[f].dataRef.current.domRef,m=jr(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(m!==null){let p=e.options[m].dataRef.current.domRef;if(((n=h.current)==null?void 0:n.previousElementSibling)===p.current||((o=p.current)==null?void 0:o.previousElementSibling)===null)return{...c,activeOptionIndex:m}}}}else if(t.focus===ce.Next){let f=e.activeOptionIndex;if(f!==null){let h=e.options[f].dataRef.current.domRef,m=jr(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(m!==null){let p=e.options[m].dataRef.current.domRef;if(((s=h.current)==null?void 0:s.nextElementSibling)===p.current||((l=p.current)==null?void 0:l.nextElementSibling)===null)return{...c,activeOptionIndex:m}}}}let d=di(e),u=jr(t,{resolveItems:()=>d.options,resolveActiveIndex:()=>d.activeOptionIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});return{...c,...d,activeOptionIndex:u}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let r=e.searchQuery!==""?0:1,n=e.searchQuery+t.value.toLowerCase(),o=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+r).concat(e.options.slice(0,e.activeOptionIndex+r)):e.options).find(l=>{var c;return!l.dataRef.current.disabled&&((c=l.dataRef.current.textValue)==null?void 0:c.startsWith(n))}),s=o?e.options.indexOf(o):-1;return s===-1||s===e.activeOptionIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeOptionIndex:s,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5(e){return e.dataRef.current.mode===0?{...e,frozenValue:!0}:{...e}},6:(e,t)=>{let r=e.options.concat(t.options),n=e.activeOptionIndex;if(e.pendingFocus.focus!==ce.Nothing&&(n=jr(e.pendingFocus,{resolveItems:()=>r,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:o=>o.id,resolveDisabled:o=>o.dataRef.current.disabled})),e.activeOptionIndex===null){let{isSelected:o}=e.dataRef.current;if(o){let s=r.findIndex(l=>o==null?void 0:o(l.dataRef.current.value));s!==-1&&(n=s)}}return{...e,options:r,activeOptionIndex:n,pendingFocus:{focus:ce.Nothing},pendingShouldSort:!0}},7:(e,t)=>{let r=e.options,n=[],o=new Set(t.options);for(let[s,l]of r.entries())if(o.has(l.id)&&(n.push(s),o.delete(l.id),o.size===0))break;if(n.length>0){r=r.slice();for(let s of n.reverse())r.splice(s,1)}return{...e,options:r,activationTrigger:1}},8:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},9:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element},10:e=>e.pendingShouldSort?{...e,...di(e),pendingShouldSort:!1}:e,11(e){return e.buttonPositionState.kind!=="Tracked"?e:{...e,buttonPositionState:Tr.Moved}}};class no extends Rs{constructor(t){super(t),ci(this,"actions",{onChange:r=>{let{onChange:n,compare:o,mode:s,value:l}=this.state.dataRef.current;return ke(s,{0:()=>n==null?void 0:n(r),1:()=>{let c=l.slice(),d=c.findIndex(u=>o(u,r));return d===-1?c.push(r):c.splice(d,1),n==null?void 0:n(c)}})},registerOption:gn(()=>{let r=[],n=new Set;return[(o,s)=>{n.has(s)||(n.add(s),r.push({id:o,dataRef:s}))},()=>(n.clear(),this.send({type:6,options:r.splice(0)}))]}),unregisterOption:gn(()=>{let r=[];return[n=>r.push(n),()=>{this.send({type:7,options:r.splice(0)})}]}),goToOption:gn(()=>{let r=null;return[(n,o)=>{r={type:2,...n,trigger:o}},()=>r&&this.send(r)]}),closeListbox:()=>{this.send({type:1})},openListbox:r=>{this.send({type:0,focus:r})},selectActiveOption:()=>{var r;if(this.state.activeOptionIndex!==null){let{dataRef:n}=this.state.options[this.state.activeOptionIndex];this.actions.selectOption(n.current.value)}else this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(r=this.state.buttonElement)==null||r.focus({preventScroll:!0}))},selectOption:r=>{this.send({type:5,value:r})},search:r=>{this.send({type:3,value:r})},clearSearch:()=>{this.send({type:4})},setButtonElement:r=>{this.send({type:8,element:r})},setOptionsElement:r=>{this.send({type:9,element:r})}}),ci(this,"selectors",{activeDescendantId(r){var n;let o=r.activeOptionIndex,s=r.options;return o===null||(n=s[o])==null?void 0:n.id},isActive(r,n){var o;let s=r.activeOptionIndex,l=r.options;return s!==null?((o=l[s])==null?void 0:o.id)===n:!1},hasFrozenValue(r){return r.frozenValue},shouldScrollIntoView(r,n){return r.__demoMode||r.listboxState!==0||r.activationTrigger===0?!1:this.isActive(r,n)},didButtonMove(r){return r.buttonPositionState.kind==="Moved"}}),this.on(6,()=>{requestAnimationFrame(()=>{this.send({type:10})})});{let r=this.state.id,n=Yr.get(null);this.disposables.add(n.on(Os.Push,o=>{!n.selectors.isTop(o,r)&&this.state.listboxState===0&&this.actions.closeListbox()})),this.on(0,()=>n.actions.push(r)),this.on(1,()=>n.actions.pop(r))}this.disposables.group(r=>{this.on(1,n=>{n.buttonElement&&(r.dispose(),r.add(Zf(n.buttonElement,n.buttonPositionState,()=>{this.send({type:11})})))})}),this.on(5,(r,n)=>{var o;this.actions.onChange(n.value),this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(o=this.state.buttonElement)==null||o.focus({preventScroll:!0}))})}static new({id:t,__demoMode:r=!1}){return new no({id:t,dataRef:{current:{}},listboxState:r?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:ce.Nothing},frozenValue:!1,__demoMode:r,buttonPositionState:Tr.Idle})}reduce(t,r){return ke(r.type,zp,t,r)}}const Sa=a.createContext(null);function oo(e){let t=a.useContext(Sa);if(t===null){let r=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,La),r}return t}function La({id:e,__demoMode:t=!1}){let r=a.useMemo(()=>no.new({id:e,__demoMode:t}),[]);return Zn(()=>r.dispose()),r}let an=a.createContext(null);an.displayName="ListboxDataContext";function hr(e){let t=a.useContext(an);if(t===null){let r=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,hr),r}return t}let Ip=a.Fragment;function Bp(e,t){let r=a.useId(),n=Gn(),{value:o,defaultValue:s,form:l,name:c,onChange:d,by:u,invalid:f=!1,disabled:h=n||!1,horizontal:m=!1,multiple:p=!1,__demoMode:g=!1,...v}=e;const y=m?"horizontal":"vertical";let b=ye(t),w=Yc(s),[x=p?[]:void 0,j]=Kc(o,d,w),E=La({id:r,__demoMode:g}),F=a.useRef({static:!1,hold:!1}),T=a.useRef(new Map),L=Cd(u),M=a.useCallback(V=>ke(k.mode,{[st.Multi]:()=>x.some(U=>L(U,V)),[st.Single]:()=>L(x,V)}),[x]),k=Me({value:x,disabled:h,invalid:f,mode:p?st.Multi:st.Single,orientation:y,onChange:j,compare:L,isSelected:M,optionsPropsRef:F,listRef:T});le(()=>{E.state.dataRef.current=k},[k]);let D=$e(E,V=>V.listboxState),P=Yr.get(null),R=$e(P,a.useCallback(V=>P.selectors.isTop(V,r),[P,r])),[S,O]=$e(E,V=>[V.buttonElement,V.optionsElement]);Hs(R,[S,O],(V,U)=>{E.send({type:Ea.CloseListbox}),zs(U,Un.Loose)||(V.preventDefault(),S==null||S.focus())});let N=Me({open:D===xe.Open,disabled:h,invalid:f,value:x}),[A,W]=md({inherit:!0}),_={ref:b},H=a.useCallback(()=>{if(w!==void 0)return j==null?void 0:j(w)},[j,w]),G=he();return a.createElement(W,{value:A,props:{htmlFor:S==null?void 0:S.id},slot:{open:D===xe.Open,disabled:h}},a.createElement(Nf,null,a.createElement(Sa.Provider,{value:E},a.createElement(an.Provider,{value:k},a.createElement(da,{value:ke(D,{[xe.Open]:we.Open,[xe.Closed]:we.Closed})},c!=null&&x!=null&&a.createElement(td,{disabled:h,data:{[c]:x},form:l,onReset:H}),G({ourProps:_,theirProps:v,slot:N,defaultTag:Ip,name:"Listbox"}))))))}let Wp="button";function Hp(e,t){let r=a.useId(),n=ys(),o=hr("Listbox.Button"),s=oo("Listbox.Button"),{id:l=n||`headlessui-listbox-button-${r}`,disabled:c=o.disabled||!1,autoFocus:d=!1,...u}=e,f=ye(t,Of(),s.actions.setButtonElement),h=Mf(),[m,p,g]=$e(s,O=>[O.listboxState,O.buttonElement,O.optionsElement]),v=m===xe.Open;qd(v,{trigger:p,action:a.useCallback(O=>{if(p!=null&&p.contains(O.target))return kr.Ignore;let N=O.target.closest('[role="option"]:not([data-disabled])');return Le(N)?kr.Select(N):g!=null&&g.contains(O.target)?kr.Ignore:kr.Close},[p,g]),close:s.actions.closeListbox,select:s.actions.selectActiveOption});let y=Z(O=>{switch(O.key){case fe.Enter:qc(O.currentTarget);break;case fe.Space:case fe.ArrowDown:O.preventDefault(),s.actions.openListbox({focus:o.value?ce.Nothing:ce.First});break;case fe.ArrowUp:O.preventDefault(),s.actions.openListbox({focus:o.value?ce.Nothing:ce.Last});break}}),b=Z(O=>{switch(O.key){case fe.Space:O.preventDefault();break}}),w=Ed(O=>{var N;s.state.listboxState===xe.Open?(He.flushSync(()=>s.actions.closeListbox()),(N=s.state.buttonElement)==null||N.focus({preventScroll:!0})):(O.preventDefault(),s.actions.openListbox({focus:ce.Nothing}))}),x=Z(O=>O.preventDefault()),j=Ss([l]),E=dd(),{isFocusVisible:F,focusProps:T}=Mc({autoFocus:d}),{isHovered:L,hoverProps:M}=Oc({isDisabled:c}),{pressed:k,pressProps:D}=Bc({disabled:c}),P=Me({open:m===xe.Open,active:k||m===xe.Open,disabled:c,invalid:o.invalid,value:o.value,hover:L,focus:F,autofocus:d}),R=$e(s,O=>O.listboxState===xe.Open),S=ms(h(),{ref:f,id:l,type:Xd(e,p),"aria-haspopup":"listbox","aria-controls":g==null?void 0:g.id,"aria-expanded":R,"aria-labelledby":j,"aria-describedby":E,disabled:c||void 0,autoFocus:d,onKeyDown:y,onKeyUp:b,onKeyPress:x},w,T,M,D);return he()({ourProps:S,theirProps:u,slot:P,defaultTag:Wp,name:"Listbox.Button"})}let Ta=a.createContext(!1),_p="div",Vp=Pt.RenderStrategy|Pt.Static;function Gp(e,t){let r=a.useId(),{id:n=`headlessui-listbox-options-${r}`,anchor:o,portal:s=!1,modal:l=!0,transition:c=!1,...d}=e,u=Df(o),[f,h]=a.useState(null);u&&(s=!0);let m=hr("Listbox.Options"),p=oo("Listbox.Options"),[g,v,y,b]=$e(p,Y=>[Y.listboxState,Y.buttonElement,Y.optionsElement,Y.__demoMode]),w=or(v),x=or(y),j=pr(),[E,F]=Us(c,f,j!==null?(j&we.Open)===we.Open:g===xe.Open);Ps(E,v,p.actions.closeListbox);let T=b?!1:l&&g===xe.Open;Vs(T,x);let L=b?!1:l&&g===xe.Open;As(L,{allowed:a.useCallback(()=>[v,y],[v,y])});let M=$e(p,p.selectors.didButtonMove)?!1:E,k=$e(p,p.selectors.hasFrozenValue)&&!e.static,D=ca(k,m.value),P=a.useCallback(Y=>m.compare(D,Y),[m.compare,D]),R=$e(p,Y=>{var oe;if(u==null||!((oe=u==null?void 0:u.to)!=null&&oe.includes("selection")))return null;let B=Y.options.findIndex(C=>P(C.dataRef.current.value));return B===-1&&(B=0),B}),S=(()=>{if(u==null)return;if(R===null)return{...u,inner:void 0};let Y=Array.from(m.listRef.current.values());return{...u,inner:{listRef:{current:Y},index:R}}})(),[O,N]=Pf(S),A=Af(),W=ye(t,u?O:null,p.actions.setOptionsElement,h),_=dt();a.useEffect(()=>{let Y=y;Y&&g===xe.Open&&(hs(Y)||Y==null||Y.focus({preventScroll:!0}))},[g,y]);let H=Z(Y=>{var oe;switch(_.dispose(),Y.key){case fe.Space:if(p.state.searchQuery!=="")return Y.preventDefault(),Y.stopPropagation(),p.actions.search(Y.key);case fe.Enter:Y.preventDefault(),Y.stopPropagation(),p.actions.selectActiveOption();break;case ke(m.orientation,{vertical:fe.ArrowDown,horizontal:fe.ArrowRight}):return Y.preventDefault(),Y.stopPropagation(),p.actions.goToOption({focus:ce.Next});case ke(m.orientation,{vertical:fe.ArrowUp,horizontal:fe.ArrowLeft}):return Y.preventDefault(),Y.stopPropagation(),p.actions.goToOption({focus:ce.Previous});case fe.Home:case fe.PageUp:return Y.preventDefault(),Y.stopPropagation(),p.actions.goToOption({focus:ce.First});case fe.End:case fe.PageDown:return Y.preventDefault(),Y.stopPropagation(),p.actions.goToOption({focus:ce.Last});case fe.Escape:Y.preventDefault(),Y.stopPropagation(),He.flushSync(()=>p.actions.closeListbox()),(oe=p.state.buttonElement)==null||oe.focus({preventScroll:!0});return;case fe.Tab:Y.preventDefault(),Y.stopPropagation(),He.flushSync(()=>p.actions.closeListbox()),Gd(p.state.buttonElement,Y.shiftKey?Ae.Previous:Ae.Next);break;default:Y.key.length===1&&(p.actions.search(Y.key),_.setTimeout(()=>p.actions.clearSearch(),350));break}}),G=$e(p,Y=>{var oe;return(oe=Y.buttonElement)==null?void 0:oe.id}),V=Me({open:g===xe.Open}),U=ms(u?A():{},{id:n,ref:W,"aria-activedescendant":$e(p,p.selectors.activeDescendantId),"aria-multiselectable":m.mode===st.Multi?!0:void 0,"aria-labelledby":G,"aria-orientation":m.orientation,onKeyDown:H,role:"listbox",tabIndex:g===xe.Open?0:void 0,style:{...d.style,...N,"--button-width":jd(E,v,!0).width},...Gs(F)}),ne=he(),ae=a.useMemo(()=>m.mode===st.Multi?m:{...m,isSelected:P},[m,P]);return a.createElement(ga,{enabled:s?e.static||E:!1,ownerDocument:w},a.createElement(an.Provider,{value:ae},ne({ourProps:U,theirProps:d,slot:V,defaultTag:_p,features:Vp,visible:M,name:"Listbox.Options"})))}let Up="div";function Kp(e,t){let r=a.useId(),{id:n=`headlessui-listbox-option-${r}`,disabled:o=!1,value:s,...l}=e,c=a.useContext(Ta)===!0,d=hr("Listbox.Option"),u=oo("Listbox.Option"),f=$e(u,k=>u.selectors.isActive(k,n)),h=d.isSelected(s),m=a.useRef(null),p=Ap(m),g=ut({disabled:o,value:s,domRef:m,get textValue(){return p()}}),v=ye(t,m,k=>{k?d.listRef.current.set(n,k):d.listRef.current.delete(n)}),y=$e(u,k=>u.selectors.shouldScrollIntoView(k,n));le(()=>{if(y)return Te().requestAnimationFrame(()=>{var k,D;(D=(k=m.current)==null?void 0:k.scrollIntoView)==null||D.call(k,{block:"nearest"})})},[y,m]),le(()=>{if(!c)return u.actions.registerOption(n,g),()=>u.actions.unregisterOption(n)},[g,n,c]);let b=Z(k=>{if(o)return k.preventDefault();u.actions.selectOption(s)}),w=Z(()=>{if(o)return u.actions.goToOption({focus:ce.Nothing});u.actions.goToOption({focus:ce.Specific,id:n})}),x=nu(),j=Z(k=>x.update(k)),E=Z(k=>{x.wasMoved(k)&&(o||f&&u.state.activationTrigger===Fr.Pointer||u.actions.goToOption({focus:ce.Specific,id:n},Fr.Pointer))}),F=Z(k=>{x.wasMoved(k)&&(o||f&&u.state.activationTrigger===Fr.Pointer&&u.actions.goToOption({focus:ce.Nothing}))}),T=Me({active:f,focus:f,selected:h,disabled:o,selectedOption:h&&c}),L=c?{}:{id:n,ref:v,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":h,disabled:void 0,onClick:b,onFocus:w,onPointerEnter:j,onMouseEnter:j,onPointerMove:E,onMouseMove:E,onPointerLeave:F,onMouseLeave:F},M=he();return!h&&c?null:M({ourProps:L,theirProps:l,slot:T,defaultTag:Up,name:"Listbox.Option"})}let Yp=a.Fragment;function qp(e,t){let{options:r,placeholder:n,...o}=e,s={ref:ye(t)},l=hr("ListboxSelectedOption"),c=Me({}),d=l.value===void 0||l.value===null||l.mode===st.Multi&&Array.isArray(l.value)&&l.value.length===0,u=he();return a.createElement(Ta.Provider,{value:!0},u({ourProps:s,theirProps:{...o,children:a.createElement(a.Fragment,null,n&&d?n:r)},slot:c,defaultTag:Yp,name:"ListboxSelectedOption"}))}let Xp=de(Bp),Qp=de(Hp),Zp=yd,Jp=de(Gp),eh=de(Kp),th=de(qp),vt=Object.assign(Xp,{Button:Qp,Label:Zp,Options:Jp,Option:eh,SelectedOption:th});const rh=$.div`
699
699
  display: flex;
700
700
  flex-direction: column;
701
701
  gap: 4px;
@@ -980,13 +980,13 @@
980
980
  justify-content: center;
981
981
  flex-shrink: 0;
982
982
  color: var(--colour-highlight-text, var(--color-highlight-text, ${e=>e.theme.colors.white}));
983
- `,wh=$.div`
983
+ `,$h=$.div`
984
984
  padding: 12px;
985
985
  text-align: center;
986
986
  font-family: ${e=>e.theme.typography.fontFamily};
987
987
  font-size: ${e=>e.theme.typography.fontSize.sm};
988
988
  color: ${e=>e.theme.colors.text.muted};
989
- `,$h=$.p`
989
+ `,wh=$.p`
990
990
  margin: 0;
991
991
  margin-top: 4px;
992
992
  font-family: ${e=>e.theme.typography.fontFamily};
@@ -1008,7 +1008,7 @@
1008
1008
  clip: rect(0, 0, 0, 0);
1009
1009
  white-space: nowrap;
1010
1010
  border: 0;
1011
- `,Fa=a.forwardRef(function({value:t,onChange:r,options:n,label:o,placeholder:i="Select...",size:l="md",variant:c="default",error:d=!1,errorMessage:u,disabled:f=!1,fullWidth:h=!1,searchable:m=!1,className:p,"aria-label":g,"aria-describedby":v,"aria-labelledby":y,"data-testid":b,isSearchable:w,clearable:x,isClearable:j=!1,isLoading:E=!1,assistiveText:F,onMenuOpen:T,onMenuClose:L,onInputChange:M,selectRef:k,name:D,menuPlacement:P="bottom",noResultsMessage:R="No options found",searchPlaceholder:S="Search..."},O){const[N,A]=a.useState(""),[W,_]=a.useState(!1),H=m||w,G=x||j,V=a.useMemo(()=>n.find(I=>I.value===t)||null,[n,t]),U=a.useMemo(()=>{if(!H||!N)return n;const I=N.toLowerCase();return n.filter(C=>C.label.toLowerCase().includes(I))},[n,N,H]),ne=I=>{r(I),A("")},ae=I=>{I.stopPropagation(),I.preventDefault(),r(null),A("")},Y=I=>{const C=I.target.value;A(C),M==null||M(C)},oe=I=>{I&&!W?T==null||T():!I&&W&&(L==null||L()),_(I)};return a.useEffect(()=>{},[k]),s.jsxs(rh,{$fullWidth:h,className:p,"data-testid":b,ref:I=>{typeof O=="function"?O(I):O&&(O.current=I),k&&typeof k=="object"&&(k.current=I)},children:[o&&s.jsx(nh,{id:`${b}-label`,children:o}),s.jsx(yt,{value:t||"",onChange:ne,disabled:f,children:({open:I})=>(I!==W&&oe(I),s.jsxs(s.Fragment,{children:[D&&s.jsx(Ch,{type:"hidden",name:D,value:t||""}),s.jsxs(oh,{children:[s.jsxs(yt.Button,{as:ih,$size:l,$variant:c,$error:d,$isOpen:I,$hasValue:!!V,"data-size":l,"data-variant":c,"data-error":d,"data-disabled":f,"data-open":I,"aria-label":g||o,"aria-labelledby":o?`${b}-label`:y,"aria-describedby":v,children:[s.jsxs(sh,{children:[(V==null?void 0:V.icon)&&s.jsx(ui,{"aria-hidden":"true",children:V.icon}),s.jsx(ah,{children:(V==null?void 0:V.label)||i})]}),s.jsxs(lh,{children:[E&&s.jsx(uh,{"aria-hidden":"true",children:s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{d:"M8 1.5V4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),s.jsx("path",{d:"M8 12V14.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0.5"}),s.jsx("path",{d:"M3.28769 3.28769L5.05025 5.05025",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0.875"}),s.jsx("path",{d:"M10.9497 10.9497L12.7123 12.7123",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0.375"}),s.jsx("path",{d:"M1.5 8H4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0.75"}),s.jsx("path",{d:"M12 8H14.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0.25"}),s.jsx("path",{d:"M3.28769 12.7123L5.05025 10.9497",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0.625"}),s.jsx("path",{d:"M10.9497 5.05025L12.7123 3.28769",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0.125"})]})}),G&&V&&!f&&!E&&s.jsx(ch,{type:"button",onClick:ae,"aria-label":"Clear selection",tabIndex:-1,children:s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),s.jsx(fh,{$isOpen:I,"aria-hidden":"true",children:s.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]}),s.jsx(At,{as:a.Fragment,leave:"leave",leaveFrom:"leave-from",leaveTo:"leave-to",children:s.jsxs(yt.Options,{as:ph,$menuPlacement:P,children:[H&&s.jsx(hh,{children:s.jsx(gh,{type:"text",placeholder:S,value:N,onChange:Y,onClick:C=>C.stopPropagation()})}),s.jsx(mh,{children:U.length===0?s.jsx(wh,{children:R}):U.map(C=>s.jsx(yt.Option,{value:C.value,disabled:C.disabled,as:a.Fragment,children:({active:B,selected:q})=>s.jsxs(bh,{$active:B,$selected:q,children:[s.jsxs(xh,{children:[C.icon&&s.jsx(ui,{"aria-hidden":"true",children:C.icon}),s.jsx(vh,{children:C.label})]}),q&&s.jsx(yh,{"aria-hidden":"true",children:s.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M16.25 5.625L7.5 14.375L3.75 10.625",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})},C.value))})]})})]})]}))}),d&&u&&s.jsx($h,{role:"alert",children:u}),!d&&F&&s.jsx(kh,{children:F})]})});Fa.displayName="Select";const jh=$.div`
1011
+ `,Fa=a.forwardRef(function({value:t,onChange:r,options:n,label:o,placeholder:s="Select...",size:l="md",variant:c="default",error:d=!1,errorMessage:u,disabled:f=!1,fullWidth:h=!1,searchable:m=!1,className:p,"aria-label":g,"aria-describedby":v,"aria-labelledby":y,"data-testid":b,isSearchable:w,clearable:x,isClearable:j=!1,isLoading:E=!1,assistiveText:F,onMenuOpen:T,onMenuClose:L,onInputChange:M,selectRef:k,name:D,menuPlacement:P="bottom",noResultsMessage:R="No options found",searchPlaceholder:S="Search..."},O){const[N,A]=a.useState(""),[W,_]=a.useState(!1),H=m||w,G=x||j,V=a.useMemo(()=>n.find(B=>B.value===t)||null,[n,t]),U=a.useMemo(()=>{if(!H||!N)return n;const B=N.toLowerCase();return n.filter(C=>C.label.toLowerCase().includes(B))},[n,N,H]),ne=B=>{r(B),A("")},ae=B=>{B.stopPropagation(),B.preventDefault(),r(null),A("")},Y=B=>{const C=B.target.value;A(C),M==null||M(C)},oe=B=>{B&&!W?T==null||T():!B&&W&&(L==null||L()),_(B)};return a.useEffect(()=>{},[k]),i.jsxs(rh,{$fullWidth:h,className:p,"data-testid":b,ref:B=>{typeof O=="function"?O(B):O&&(O.current=B),k&&typeof k=="object"&&(k.current=B)},children:[o&&i.jsx(nh,{id:`${b}-label`,children:o}),i.jsx(vt,{value:t||"",onChange:ne,disabled:f,children:({open:B})=>(B!==W&&oe(B),i.jsxs(i.Fragment,{children:[D&&i.jsx(Ch,{type:"hidden",name:D,value:t||""}),i.jsxs(oh,{children:[i.jsxs(vt.Button,{as:ih,$size:l,$variant:c,$error:d,$isOpen:B,$hasValue:!!V,"data-size":l,"data-variant":c,"data-error":d,"data-disabled":f,"data-open":B,"aria-label":g||o,"aria-labelledby":o?`${b}-label`:y,"aria-describedby":v,children:[i.jsxs(sh,{children:[(V==null?void 0:V.icon)&&i.jsx(ui,{"aria-hidden":"true",children:V.icon}),i.jsx(ah,{children:(V==null?void 0:V.label)||s})]}),i.jsxs(lh,{children:[E&&i.jsx(uh,{"aria-hidden":"true",children:i.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("path",{d:"M8 1.5V4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),i.jsx("path",{d:"M8 12V14.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0.5"}),i.jsx("path",{d:"M3.28769 3.28769L5.05025 5.05025",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0.875"}),i.jsx("path",{d:"M10.9497 10.9497L12.7123 12.7123",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0.375"}),i.jsx("path",{d:"M1.5 8H4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0.75"}),i.jsx("path",{d:"M12 8H14.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0.25"}),i.jsx("path",{d:"M3.28769 12.7123L5.05025 10.9497",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0.625"}),i.jsx("path",{d:"M10.9497 5.05025L12.7123 3.28769",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",opacity:"0.125"})]})}),G&&V&&!f&&!E&&i.jsx(ch,{type:"button",onClick:ae,"aria-label":"Clear selection",tabIndex:-1,children:i.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),i.jsx(fh,{$isOpen:B,"aria-hidden":"true",children:i.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]}),i.jsx(Mt,{as:a.Fragment,leave:"leave",leaveFrom:"leave-from",leaveTo:"leave-to",children:i.jsxs(vt.Options,{as:ph,$menuPlacement:P,children:[H&&i.jsx(hh,{children:i.jsx(gh,{type:"text",placeholder:S,value:N,onChange:Y,onClick:C=>C.stopPropagation()})}),i.jsx(mh,{children:U.length===0?i.jsx($h,{children:R}):U.map(C=>i.jsx(vt.Option,{value:C.value,disabled:C.disabled,as:a.Fragment,children:({active:I,selected:q})=>i.jsxs(bh,{$active:I,$selected:q,children:[i.jsxs(xh,{children:[C.icon&&i.jsx(ui,{"aria-hidden":"true",children:C.icon}),i.jsx(vh,{children:C.label})]}),q&&i.jsx(yh,{"aria-hidden":"true",children:i.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{d:"M16.25 5.625L7.5 14.375L3.75 10.625",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})},C.value))})]})})]})]}))}),d&&u&&i.jsx(wh,{role:"alert",children:u}),!d&&F&&i.jsx(kh,{children:F})]})});Fa.displayName="Select";const jh=$.div`
1012
1012
  display: flex;
1013
1013
  flex-direction: column;
1014
1014
  gap: 4px;
@@ -1151,7 +1151,7 @@
1151
1151
  line-height: ${({theme:e})=>e.typography.lineHeight.normal};
1152
1152
  color: ${({theme:e,$error:t})=>t?e.colors.status.error:e.colors.text.secondary};
1153
1153
  margin-top: 4px;
1154
- `;function Dh(e,t,r){const n=a.useRef(r),o=a.useRef(null);a.useEffect(()=>{n.current=r},[r]),a.useEffect(()=>{if(!(t<=0))return o.current=setTimeout(()=>{n.current(e)},t),()=>{o.current&&clearTimeout(o.current)}},[e,t])}function Oh(e){return e.replace(/[^\d.\-,$]/g,"")}const Pt=a.forwardRef(({type:e="text",size:t="md",variant:r="default",label:n,helperText:o,error:i=!1,errorMessage:l,leftElement:c,rightElement:d,fullWidth:u=!1,wrapperClassName:f,className:h,disabled:m=!1,required:p=!1,id:g,"aria-describedby":v,"data-testid":y,value:b,onChange:w,InputProps:x,debounceTimeout:j=0,onChangeDebounced:E,mask:F,dataId:T,showErrorMessage:L=!0,inputType:M,containerClassName:k,borderRadius:D,min:P,max:R,onBlur:S,onFocus:O,...N},A)=>{const W=a.useId(),_=g||W,H=`${_}-helper`,G=`${_}-error`,V=a.useRef(null),[U,ne]=a.useState(b!=null?String(b):""),[ae,Y]=a.useState("");a.useEffect(()=>{if(b!=null){const me=String(b);ne(me),j>0&&E&&Y(me)}},[b,j,E]),Dh(ae,j,a.useCallback(me=>{E&&me!==String(b)&&E(me)},[E,b]));const oe=me=>{let Ne=me.target.value;if(M==="number"&&(Ne=Oh(Ne)),F&&typeof F=="function"&&(Ne=F(Ne)),ne(Ne),j>0&&E&&Y(Ne),w){const vr={...me,target:{...me.target,value:Ne}};w(vr)}},I=me=>{V.current&&V.current.classList.add("active"),O==null||O(me)},C=me=>{V.current&&V.current.classList.remove("active"),S==null||S(me)},B=c||(x==null?void 0:x.startAdornment),q=d||(x==null?void 0:x.endAdornment),te=!!B,se=!!q,Ce=i&&l?l:o,ht=i&&l&&L,ge=[v,Ce?i?G:H:void 0].filter(Boolean).join(" "),Ue=j>0||F?U:b;return s.jsxs(jh,{$fullWidth:u,className:f,"data-testid":y&&`${y}-wrapper`,children:[n&&s.jsxs(Eh,{htmlFor:_,children:[n,p&&s.jsx(Sh,{"aria-label":"required",children:"*"})]}),s.jsxs(Lh,{ref:V,$inputSize:t,$variant:r,$error:i,$disabled:m,$hasLeft:te,$hasRight:se,$borderRadius:D,className:k,children:[B&&s.jsx(Fh,{$inputSize:t,"aria-hidden":"true",children:B}),s.jsx(Th,{ref:A,id:_,type:e,className:h,disabled:m,required:p,"aria-invalid":i,"aria-describedby":ge||void 0,"data-testid":y,"data-id":T,$hasLeft:te,$hasRight:se,value:Ue,onChange:oe,onFocus:I,onBlur:C,min:P,max:R,...N}),q&&s.jsx(Rh,{$inputSize:t,"aria-hidden":"true",children:q})]}),ht?s.jsx(fi,{id:G,$error:!0,role:"alert",children:l}):Ce?s.jsx(fi,{id:H,$error:!1,children:Ce}):null]})});Pt.displayName="Input";const Re={backdropEnter:"modal-backdrop-enter",backdropEnterFrom:"modal-backdrop-enter-from",backdropEnterTo:"modal-backdrop-enter-to",backdropLeave:"modal-backdrop-leave",backdropLeaveFrom:"modal-backdrop-leave-from",backdropLeaveTo:"modal-backdrop-leave-to",modalEnter:"modal-panel-enter",modalEnterFrom:"modal-panel-enter-from",modalEnterTo:"modal-panel-enter-to",modalLeave:"modal-panel-leave",modalLeaveFrom:"modal-panel-leave-from",modalLeaveTo:"modal-panel-leave-to"},Mh=z.css`
1154
+ `;function Dh(e,t,r){const n=a.useRef(r),o=a.useRef(null);a.useEffect(()=>{n.current=r},[r]),a.useEffect(()=>{if(!(t<=0))return o.current=setTimeout(()=>{n.current(e)},t),()=>{o.current&&clearTimeout(o.current)}},[e,t])}function Oh(e){return e.replace(/[^\d.\-,$]/g,"")}const At=a.forwardRef(({type:e="text",size:t="md",variant:r="default",label:n,helperText:o,error:s=!1,errorMessage:l,leftElement:c,rightElement:d,fullWidth:u=!1,wrapperClassName:f,className:h,disabled:m=!1,required:p=!1,id:g,"aria-describedby":v,"data-testid":y,value:b,onChange:w,InputProps:x,debounceTimeout:j=0,onChangeDebounced:E,mask:F,dataId:T,showErrorMessage:L=!0,inputType:M,containerClassName:k,borderRadius:D,min:P,max:R,onBlur:S,onFocus:O,...N},A)=>{const W=a.useId(),_=g||W,H=`${_}-helper`,G=`${_}-error`,V=a.useRef(null),[U,ne]=a.useState(b!=null?String(b):""),[ae,Y]=a.useState("");a.useEffect(()=>{if(b!=null){const me=String(b);ne(me),j>0&&E&&Y(me)}},[b,j,E]),Dh(ae,j,a.useCallback(me=>{E&&me!==String(b)&&E(me)},[E,b]));const oe=me=>{let Ne=me.target.value;if(M==="number"&&(Ne=Oh(Ne)),F&&typeof F=="function"&&(Ne=F(Ne)),ne(Ne),j>0&&E&&Y(Ne),w){const xr={...me,target:{...me.target,value:Ne}};w(xr)}},B=me=>{V.current&&V.current.classList.add("active"),O==null||O(me)},C=me=>{V.current&&V.current.classList.remove("active"),S==null||S(me)},I=c||(x==null?void 0:x.startAdornment),q=d||(x==null?void 0:x.endAdornment),te=!!I,se=!!q,Ce=s&&l?l:o,pt=s&&l&&L,ge=[v,Ce?s?G:H:void 0].filter(Boolean).join(" "),Ue=j>0||F?U:b;return i.jsxs(jh,{$fullWidth:u,className:f,"data-testid":y&&`${y}-wrapper`,children:[n&&i.jsxs(Eh,{htmlFor:_,children:[n,p&&i.jsx(Sh,{"aria-label":"required",children:"*"})]}),i.jsxs(Lh,{ref:V,$inputSize:t,$variant:r,$error:s,$disabled:m,$hasLeft:te,$hasRight:se,$borderRadius:D,className:k,children:[I&&i.jsx(Fh,{$inputSize:t,"aria-hidden":"true",children:I}),i.jsx(Th,{ref:A,id:_,type:e,className:h,disabled:m,required:p,"aria-invalid":s,"aria-describedby":ge||void 0,"data-testid":y,"data-id":T,$hasLeft:te,$hasRight:se,value:Ue,onChange:oe,onFocus:B,onBlur:C,min:P,max:R,...N}),q&&i.jsx(Rh,{$inputSize:t,"aria-hidden":"true",children:q})]}),pt?i.jsx(fi,{id:G,$error:!0,role:"alert",children:l}):Ce?i.jsx(fi,{id:H,$error:!1,children:Ce}):null]})});At.displayName="Input";const Re={backdropEnter:"modal-backdrop-enter",backdropEnterFrom:"modal-backdrop-enter-from",backdropEnterTo:"modal-backdrop-enter-to",backdropLeave:"modal-backdrop-leave",backdropLeaveFrom:"modal-backdrop-leave-from",backdropLeaveTo:"modal-backdrop-leave-to",modalEnter:"modal-panel-enter",modalEnterFrom:"modal-panel-enter-from",modalEnterTo:"modal-panel-enter-to",modalLeave:"modal-panel-leave",modalLeaveFrom:"modal-panel-leave-from",modalLeaveTo:"modal-panel-leave-to"},Mh=z.css`
1155
1155
  /* Backdrop transitions */
1156
1156
  .modal-backdrop-enter {
1157
1157
  transition: opacity 200ms ease-out;
@@ -1221,7 +1221,7 @@
1221
1221
  @media (max-width: 640px) {
1222
1222
  padding: 8px;
1223
1223
  }
1224
- `,Bh=$(ro.Panel)`
1224
+ `,Ih=$(ro.Panel)`
1225
1225
  position: relative;
1226
1226
  width: 100%;
1227
1227
  transform-origin: center;
@@ -1281,7 +1281,7 @@
1281
1281
  padding: 16px 24px;
1282
1282
  border-bottom: 1px solid #e5e5e5;
1283
1283
  flex-shrink: 0;
1284
- `,Ih=$(ro.Title)`
1284
+ `,Bh=$(ro.Title)`
1285
1285
  margin: 0;
1286
1286
  font-size: 1.25rem;
1287
1287
  font-weight: 600;
@@ -1362,7 +1362,7 @@
1362
1362
  width: 100%;
1363
1363
  }
1364
1364
  }
1365
- `;function mr({isOpen:e,onClose:t,title:r,children:n,size:o="md",closeOnBackdropClick:i=!0,closeOnEsc:l=!0,showCloseButton:c=!0,footer:d,className:u,portalContainer:f,"data-testid":h}){const m=()=>{i&&t()},p=()=>{l&&t()};return s.jsxs(s.Fragment,{children:[s.jsx(z.Global,{styles:Mh}),s.jsx(At,{appear:!0,show:e,as:a.Fragment,children:s.jsxs(ro,{as:Ah,onClose:p,"data-testid":h,...f&&{container:f},children:[s.jsx(At.Child,{as:a.Fragment,enter:Re.backdropEnter,enterFrom:Re.backdropEnterFrom,enterTo:Re.backdropEnterTo,leave:Re.backdropLeave,leaveFrom:Re.backdropLeaveFrom,leaveTo:Re.backdropLeaveTo,children:s.jsx(Ph,{onClick:m,"aria-hidden":"true"})}),s.jsx(Nh,{children:s.jsx(zh,{children:s.jsx(At.Child,{as:a.Fragment,enter:Re.modalEnter,enterFrom:Re.modalEnterFrom,enterTo:Re.modalEnterTo,leave:Re.modalLeave,leaveFrom:Re.modalLeaveFrom,leaveTo:Re.modalLeaveTo,children:s.jsxs(Bh,{className:u,"data-size":o,"data-testid":h?`${h}-panel`:void 0,children:[(r||c)&&s.jsxs(Ra,{children:[r&&s.jsx(Ih,{as:"h2","data-testid":h?`${h}-title`:void 0,children:r}),c&&s.jsx(Wh,{type:"button",onClick:t,"aria-label":"Close modal","data-testid":h?`${h}-close`:void 0,children:s.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:s.jsx("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),s.jsx(Da,{"data-testid":h?`${h}-body`:void 0,children:n}),d&&s.jsx(Oa,{"data-testid":h?`${h}-footer`:void 0,children:d})]})})})})]})})]})}function io({children:e,className:t}){return s.jsx(Ra,{className:t,children:e})}function so({children:e,className:t}){return s.jsx(Da,{className:t,children:e})}function ao({children:e,className:t}){return s.jsx(Oa,{className:t,children:e})}mr.Header=io;mr.Body=so;mr.Footer=ao;mr.displayName="Modal";io.displayName="Modal.Header";so.displayName="Modal.Body";ao.displayName="Modal.Footer";const Ma=z.keyframes`
1365
+ `;function gr({isOpen:e,onClose:t,title:r,children:n,size:o="md",closeOnBackdropClick:s=!0,closeOnEsc:l=!0,showCloseButton:c=!0,footer:d,className:u,portalContainer:f,"data-testid":h}){const m=()=>{s&&t()},p=()=>{l&&t()};return i.jsxs(i.Fragment,{children:[i.jsx(z.Global,{styles:Mh}),i.jsx(Mt,{appear:!0,show:e,as:a.Fragment,children:i.jsxs(ro,{as:Ah,onClose:p,"data-testid":h,...f&&{container:f},children:[i.jsx(Mt.Child,{as:a.Fragment,enter:Re.backdropEnter,enterFrom:Re.backdropEnterFrom,enterTo:Re.backdropEnterTo,leave:Re.backdropLeave,leaveFrom:Re.backdropLeaveFrom,leaveTo:Re.backdropLeaveTo,children:i.jsx(Ph,{onClick:m,"aria-hidden":"true"})}),i.jsx(Nh,{children:i.jsx(zh,{children:i.jsx(Mt.Child,{as:a.Fragment,enter:Re.modalEnter,enterFrom:Re.modalEnterFrom,enterTo:Re.modalEnterTo,leave:Re.modalLeave,leaveFrom:Re.modalLeaveFrom,leaveTo:Re.modalLeaveTo,children:i.jsxs(Ih,{className:u,"data-size":o,"data-testid":h?`${h}-panel`:void 0,children:[(r||c)&&i.jsxs(Ra,{children:[r&&i.jsx(Bh,{as:"h2","data-testid":h?`${h}-title`:void 0,children:r}),c&&i.jsx(Wh,{type:"button",onClick:t,"aria-label":"Close modal","data-testid":h?`${h}-close`:void 0,children:i.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:i.jsx("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),i.jsx(Da,{"data-testid":h?`${h}-body`:void 0,children:n}),d&&i.jsx(Oa,{"data-testid":h?`${h}-footer`:void 0,children:d})]})})})})]})})]})}function io({children:e,className:t}){return i.jsx(Ra,{className:t,children:e})}function so({children:e,className:t}){return i.jsx(Da,{className:t,children:e})}function ao({children:e,className:t}){return i.jsx(Oa,{className:t,children:e})}gr.Header=io;gr.Body=so;gr.Footer=ao;gr.displayName="Modal";io.displayName="Modal.Header";so.displayName="Modal.Body";ao.displayName="Modal.Footer";const Ma=z.keyframes`
1366
1366
  from {
1367
1367
  transform: rotate(0deg);
1368
1368
  }
@@ -1483,7 +1483,7 @@
1483
1483
 
1484
1484
  /* Rotation transform */
1485
1485
  transform: ${({$hasRotate:e})=>e?"rotate(var(--icon-rotate, 0deg))":"none"};
1486
- `,J=a.forwardRef(({name:e,children:t,size:r="md",color:n="inherit",spin:o=!1,rotate:i,"aria-label":l,"aria-hidden":c=!1,className:d,style:u,"data-testid":f},h)=>{const m=!!e&&!t,p=!!t,g=typeof r=="number"?`${r}px`:void 0,v={...u,...g&&{width:g,height:g,fontSize:g},...i!==void 0&&{"--icon-rotate":`${i}deg`}},y=p&&l&&!c;return m?s.jsx(Hh,{ref:h,className:d,style:v,"data-icon-type":"material","data-size":typeof r=="string"?r:"custom","data-color":n,"data-spin":o.toString(),"data-rotate":i!==void 0?"true":void 0,$spin:o,$hasRotate:i!==void 0,"aria-label":l,"aria-hidden":c||!l&&!y?!0:void 0,role:y?"img":void 0,"data-testid":f,children:e}):s.jsx(_h,{ref:h,className:d,style:v,"data-icon-type":"svg","data-size":typeof r=="string"?r:"custom","data-color":n,"data-spin":o.toString(),"data-rotate":i!==void 0?"true":void 0,$spin:o,$hasRotate:i!==void 0,"aria-label":l,"aria-hidden":c||!l&&!y?!0:void 0,role:y?"img":void 0,"data-testid":f,children:t})});J.displayName="Icon";const Vh=z.keyframes`
1486
+ `,J=a.forwardRef(({name:e,children:t,size:r="md",color:n="inherit",spin:o=!1,rotate:s,"aria-label":l,"aria-hidden":c=!1,className:d,style:u,"data-testid":f},h)=>{const m=!!e&&!t,p=!!t,g=typeof r=="number"?`${r}px`:void 0,v={...u,...g&&{width:g,height:g,fontSize:g},...s!==void 0&&{"--icon-rotate":`${s}deg`}},y=p&&l&&!c;return m?i.jsx(Hh,{ref:h,className:d,style:v,"data-icon-type":"material","data-size":typeof r=="string"?r:"custom","data-color":n,"data-spin":o.toString(),"data-rotate":s!==void 0?"true":void 0,$spin:o,$hasRotate:s!==void 0,"aria-label":l,"aria-hidden":c||!l&&!y?!0:void 0,role:y?"img":void 0,"data-testid":f,children:e}):i.jsx(_h,{ref:h,className:d,style:v,"data-icon-type":"svg","data-size":typeof r=="string"?r:"custom","data-color":n,"data-spin":o.toString(),"data-rotate":s!==void 0?"true":void 0,$spin:o,$hasRotate:s!==void 0,"aria-label":l,"aria-hidden":c||!l&&!y?!0:void 0,role:y?"img":void 0,"data-testid":f,children:t})});J.displayName="Icon";const Vh=z.keyframes`
1487
1487
  100% {
1488
1488
  transform: rotate(360deg);
1489
1489
  }
@@ -1639,7 +1639,7 @@
1639
1639
  justify-content: center;
1640
1640
  gap: calc(var(--spinner-size) * 0.15);
1641
1641
  height: var(--spinner-size);
1642
- `,Cn=$.span`
1642
+ `,kn=$.span`
1643
1643
  width: calc(var(--spinner-size) * 0.25);
1644
1644
  height: calc(var(--spinner-size) * 0.25);
1645
1645
  background-color: var(--spinner-color);
@@ -1656,7 +1656,7 @@
1656
1656
  justify-content: center;
1657
1657
  gap: calc(var(--spinner-size) * 0.1);
1658
1658
  height: var(--spinner-size);
1659
- `,Sr=$.span`
1659
+ `,Er=$.span`
1660
1660
  width: calc(var(--spinner-size) * 0.15);
1661
1661
  height: 100%;
1662
1662
  background-color: var(--spinner-color);
@@ -1667,7 +1667,7 @@
1667
1667
  @media (prefers-reduced-motion: reduce) {
1668
1668
  animation-timing-function: steps(4, end);
1669
1669
  }
1670
- `;function rg(e,t){const r=Math.min(100,Math.max(0,e));return t-r/100*t}const br=a.forwardRef(({size:e="md",color:t="primary",variant:r="circular",speed:n="normal",label:o="Loading...",centered:i=!1,className:l,"data-testid":c,progressMode:d="indeterminate",value:u=0,thickness:f=4,withLabel:h=!1,labelFormatter:m=v=>`${Math.round(v)}%`,customColor:p},g)=>{const y=(()=>{if(typeof e=="number")return`${e}px`})(),b={...y&&{"--spinner-size":y},...p&&{"--spinner-color":p}},w=20,x=2*Math.PI*w,j=rg(u,x),E=()=>{switch(r){case"dots":return s.jsxs(eg,{children:[s.jsx(Cn,{$delay:0}),s.jsx(Cn,{$delay:.15}),s.jsx(Cn,{$delay:.3})]});case"bars":return s.jsxs(tg,{children:[s.jsx(Sr,{$delay:0}),s.jsx(Sr,{$delay:.15}),s.jsx(Sr,{$delay:.3}),s.jsx(Sr,{$delay:.45})]});case"circular":default:return d==="indeterminate"?s.jsx(pi,{$isAnimated:!0,children:s.jsx(hi,{viewBox:"0 0 50 50",children:s.jsx(Qh,{cx:"25",cy:"25",r:w,fill:"none",strokeWidth:f})})}):s.jsxs(pi,{$isAnimated:!1,children:[s.jsxs(hi,{viewBox:"0 0 50 50",children:[s.jsx(Xh,{cx:"25",cy:"25",r:w,fill:"none",strokeWidth:f}),s.jsx(Zh,{cx:"25",cy:"25",r:w,fill:"none",strokeWidth:f,strokeDasharray:x,strokeDashoffset:j})]}),h&&s.jsx(Jh,{"aria-hidden":"true",children:m(u)})]})}},F=d==="determinate"||d==="static"?`${o} ${Math.round(u)}%`:o;return s.jsxs(Yh,{ref:g,className:l,style:b,role:"progressbar","aria-live":"polite","aria-label":F,"aria-valuenow":d!=="indeterminate"?Math.round(u):void 0,"aria-valuemin":d!=="indeterminate"?0:void 0,"aria-valuemax":d!=="indeterminate"?100:void 0,"data-variant":r,"data-size":typeof e=="string"?e:"custom","data-color":p?"custom":t,"data-speed":n,"data-progress-mode":d,"data-centered":i?"true":void 0,"data-testid":c,$centered:i,children:[E(),s.jsx(qh,{children:F})]})});br.displayName="Spinner";const cn=(e,t)=>{switch(e){case"sm":return{fontSize:t.typography.fontSize.xs,padding:"6px 10px",gap:"4px",iconSize:"14px",height:"28px"};case"lg":return{fontSize:t.typography.fontSize.md,padding:"12px 20px",gap:"8px",iconSize:"20px",height:"44px"};case"md":default:return{fontSize:t.typography.fontSize.sm,padding:"8px 16px",gap:"6px",iconSize:"18px",height:"36px"}}},ng=$.div`
1670
+ `;function rg(e,t){const r=Math.min(100,Math.max(0,e));return t-r/100*t}const mr=a.forwardRef(({size:e="md",color:t="primary",variant:r="circular",speed:n="normal",label:o="Loading...",centered:s=!1,className:l,"data-testid":c,progressMode:d="indeterminate",value:u=0,thickness:f=4,withLabel:h=!1,labelFormatter:m=v=>`${Math.round(v)}%`,customColor:p},g)=>{const y=(()=>{if(typeof e=="number")return`${e}px`})(),b={...y&&{"--spinner-size":y},...p&&{"--spinner-color":p}},w=20,x=2*Math.PI*w,j=rg(u,x),E=()=>{switch(r){case"dots":return i.jsxs(eg,{children:[i.jsx(kn,{$delay:0}),i.jsx(kn,{$delay:.15}),i.jsx(kn,{$delay:.3})]});case"bars":return i.jsxs(tg,{children:[i.jsx(Er,{$delay:0}),i.jsx(Er,{$delay:.15}),i.jsx(Er,{$delay:.3}),i.jsx(Er,{$delay:.45})]});case"circular":default:return d==="indeterminate"?i.jsx(pi,{$isAnimated:!0,children:i.jsx(hi,{viewBox:"0 0 50 50",children:i.jsx(Qh,{cx:"25",cy:"25",r:w,fill:"none",strokeWidth:f})})}):i.jsxs(pi,{$isAnimated:!1,children:[i.jsxs(hi,{viewBox:"0 0 50 50",children:[i.jsx(Xh,{cx:"25",cy:"25",r:w,fill:"none",strokeWidth:f}),i.jsx(Zh,{cx:"25",cy:"25",r:w,fill:"none",strokeWidth:f,strokeDasharray:x,strokeDashoffset:j})]}),h&&i.jsx(Jh,{"aria-hidden":"true",children:m(u)})]})}},F=d==="determinate"||d==="static"?`${o} ${Math.round(u)}%`:o;return i.jsxs(Yh,{ref:g,className:l,style:b,role:"progressbar","aria-live":"polite","aria-label":F,"aria-valuenow":d!=="indeterminate"?Math.round(u):void 0,"aria-valuemin":d!=="indeterminate"?0:void 0,"aria-valuemax":d!=="indeterminate"?100:void 0,"data-variant":r,"data-size":typeof e=="string"?e:"custom","data-color":p?"custom":t,"data-speed":n,"data-progress-mode":d,"data-centered":s?"true":void 0,"data-testid":c,$centered:s,children:[E(),i.jsx(qh,{children:F})]})});mr.displayName="Spinner";const ln=(e,t)=>{switch(e){case"sm":return{fontSize:t.typography.fontSize.xs,padding:"6px 10px",gap:"4px",iconSize:"14px",height:"28px"};case"lg":return{fontSize:t.typography.fontSize.md,padding:"12px 20px",gap:"8px",iconSize:"20px",height:"44px"};case"md":default:return{fontSize:t.typography.fontSize.sm,padding:"8px 16px",gap:"6px",iconSize:"18px",height:"36px"}}},ng=$.div`
1671
1671
  display: flex;
1672
1672
  flex-direction: row;
1673
1673
  align-items: stretch;
@@ -1694,7 +1694,7 @@
1694
1694
  }
1695
1695
  `}
1696
1696
 
1697
- ${({$variant:e,$size:t,theme:r})=>{const n=cn(t,r);switch(e){case"underline":return z.css`
1697
+ ${({$variant:e,$size:t,theme:r})=>{const n=ln(t,r);switch(e){case"underline":return z.css`
1698
1698
  border-bottom: 1px solid ${r.colors.border.medium};
1699
1699
  `;case"pills":case"primary":return z.css`
1700
1700
  background-color: rgba(0, 0, 0, 0.05);
@@ -1734,7 +1734,7 @@
1734
1734
  min-width: ${({$fullWidth:e})=>e?"0":"auto"};
1735
1735
 
1736
1736
  /* Size styles */
1737
- ${({$size:e,$iconOnly:t,theme:r})=>{const n=cn(e,r);return z.css`
1737
+ ${({$size:e,$iconOnly:t,theme:r})=>{const n=ln(e,r);return z.css`
1738
1738
  font-size: ${n.fontSize};
1739
1739
  padding: ${t?"0 12px":n.padding};
1740
1740
  gap: ${n.gap};
@@ -1813,7 +1813,7 @@
1813
1813
  justify-content: center;
1814
1814
  flex-shrink: 0;
1815
1815
 
1816
- ${({$size:e,theme:t})=>{const r=cn(e,t);return z.css`
1816
+ ${({$size:e,theme:t})=>{const r=ln(e,t);return z.css`
1817
1817
  width: ${r.iconSize};
1818
1818
  height: ${r.iconSize};
1819
1819
 
@@ -1836,7 +1836,7 @@
1836
1836
  background-color: ${({theme:e})=>e.colors.highlight};
1837
1837
  color: ${({theme:e})=>e.colors.white};
1838
1838
  margin-left: 4px;
1839
- `,Pa=a.forwardRef(({tabs:e,activeTab:t,onTabChange:r,variant:n="default",size:o="md",fullWidth:i=!1,expandTabs:l=!1,scrollable:c=!1,className:d,"aria-label":u="Tab navigation","data-testid":f},h)=>{const m=a.useRef(new Map),p=a.useRef(null),[g,v]=a.useState({left:0,width:0}),[y,b]=a.useState(!0),w=l||i,x=n==="pills"||n==="primary";a.useEffect(()=>{if(!x)return;const k=m.current.get(t);if(k&&p.current){const D=p.current.getBoundingClientRect(),P=k.getBoundingClientRect();v({left:P.left-D.left,width:P.width})}y&&requestAnimationFrame(()=>{b(!1)})},[t,x,y,e]);const j=a.useCallback((k,D)=>{const P=e[D];if(!P)return;const R=e.filter(N=>!N.disabled),S=R.findIndex(N=>N.id===P.id);let O=null;switch(k.key){case"ArrowLeft":case"ArrowUp":k.preventDefault(),O=S-1,O<0&&(O=R.length-1);break;case"ArrowRight":case"ArrowDown":k.preventDefault(),O=S+1,O>=R.length&&(O=0);break;case"Home":k.preventDefault(),O=0;break;case"End":k.preventDefault(),O=R.length-1;break}if(O!==null){const N=R[O];if(N){const A=m.current.get(N.id);A&&(A.focus(),r(N.id))}}},[e,r]),E=a.useCallback((k,D)=>{D?m.current.set(k,D):m.current.delete(k)},[]),F=a.useCallback((k,D)=>{var P;k.disabled||((P=k.onClick)==null||P.call(k,D),r(k.id))},[r]),T=cn(o,{typography:{fontSize:{xs:"12px",sm:"14px",md:"14.5px"}}}),L=e.find(k=>k.id===t),M=(k,D)=>{const P=k.id===t,R=!!k.icon&&!k.label,S=s.jsxs(ig,{ref:O=>E(k.id,O),role:"tab",id:`tab-${k.id}`,"aria-selected":P,"aria-controls":`tabpanel-${k.id}`,tabIndex:P?0:-1,disabled:k.disabled,onClick:O=>F(k,O),onKeyDown:O=>j(O,D),$isActive:P,$variant:n,$size:o,$fullWidth:w,$iconOnly:R,"data-id":k.dataId,"data-testid":f?`${f}-tab-${k.id}`:void 0,children:[k.icon&&s.jsx(sg,{$size:o,"aria-hidden":"true",children:k.icon}),k.label,k.badgeText&&s.jsx(ag,{children:k.badgeText})]},k.id);return k.tooltip?s.jsx(Wt,{content:k.tooltip,children:S},k.id):S};return s.jsxs(ng,{ref:k=>{p.current=k,typeof h=="function"?h(k):h&&(h.current=k)},role:"tablist","aria-label":u,className:d,"data-testid":f,$fullWidth:w,$variant:n,$scrollable:c,$size:o,children:[x&&s.jsx(og,{$left:g.left,$width:g.width,$primary:n==="primary",$disabled:!!(L!=null&&L.disabled),$isInitialRender:y,$height:parseInt(T.height),"aria-hidden":"true"}),e.map((k,D)=>M(k,D))]})});Pa.displayName="Tabs";const Na=(e,t)=>{switch(e){case"sm":return{padding:"16px",fontSize:t.typography.fontSize.xs,iconSize:"24px",minHeight:"80px"};case"lg":return{padding:"32px",fontSize:t.typography.fontSize.md,iconSize:"48px",minHeight:"180px"};case"md":default:return{padding:"24px",fontSize:t.typography.fontSize.sm,iconSize:"36px",minHeight:"120px"}}},lg=$.div`
1839
+ `,Pa=a.forwardRef(({tabs:e,activeTab:t,onTabChange:r,variant:n="default",size:o="md",fullWidth:s=!1,expandTabs:l=!1,scrollable:c=!1,className:d,"aria-label":u="Tab navigation","data-testid":f},h)=>{const m=a.useRef(new Map),p=a.useRef(null),[g,v]=a.useState({left:0,width:0}),[y,b]=a.useState(!0),w=l||s,x=n==="pills"||n==="primary";a.useEffect(()=>{if(!x)return;const k=m.current.get(t);if(k&&p.current){const D=p.current.getBoundingClientRect(),P=k.getBoundingClientRect();v({left:P.left-D.left,width:P.width})}y&&requestAnimationFrame(()=>{b(!1)})},[t,x,y,e]);const j=a.useCallback((k,D)=>{const P=e[D];if(!P)return;const R=e.filter(N=>!N.disabled),S=R.findIndex(N=>N.id===P.id);let O=null;switch(k.key){case"ArrowLeft":case"ArrowUp":k.preventDefault(),O=S-1,O<0&&(O=R.length-1);break;case"ArrowRight":case"ArrowDown":k.preventDefault(),O=S+1,O>=R.length&&(O=0);break;case"Home":k.preventDefault(),O=0;break;case"End":k.preventDefault(),O=R.length-1;break}if(O!==null){const N=R[O];if(N){const A=m.current.get(N.id);A&&(A.focus(),r(N.id))}}},[e,r]),E=a.useCallback((k,D)=>{D?m.current.set(k,D):m.current.delete(k)},[]),F=a.useCallback((k,D)=>{var P;k.disabled||((P=k.onClick)==null||P.call(k,D),r(k.id))},[r]),T=ln(o,{typography:{fontSize:{xs:"12px",sm:"14px",md:"14.5px"}}}),L=e.find(k=>k.id===t),M=(k,D)=>{const P=k.id===t,R=!!k.icon&&!k.label,S=i.jsxs(ig,{ref:O=>E(k.id,O),role:"tab",id:`tab-${k.id}`,"aria-selected":P,"aria-controls":`tabpanel-${k.id}`,tabIndex:P?0:-1,disabled:k.disabled,onClick:O=>F(k,O),onKeyDown:O=>j(O,D),$isActive:P,$variant:n,$size:o,$fullWidth:w,$iconOnly:R,"data-id":k.dataId,"data-testid":f?`${f}-tab-${k.id}`:void 0,children:[k.icon&&i.jsx(sg,{$size:o,"aria-hidden":"true",children:k.icon}),k.label,k.badgeText&&i.jsx(ag,{children:k.badgeText})]},k.id);return k.tooltip?i.jsx(Bt,{content:k.tooltip,children:S},k.id):S};return i.jsxs(ng,{ref:k=>{p.current=k,typeof h=="function"?h(k):h&&(h.current=k)},role:"tablist","aria-label":u,className:d,"data-testid":f,$fullWidth:w,$variant:n,$scrollable:c,$size:o,children:[x&&i.jsx(og,{$left:g.left,$width:g.width,$primary:n==="primary",$disabled:!!(L!=null&&L.disabled),$isInitialRender:y,$height:parseInt(T.height),"aria-hidden":"true"}),e.map((k,D)=>M(k,D))]})});Pa.displayName="Tabs";const Na=(e,t)=>{switch(e){case"sm":return{padding:"16px",fontSize:t.typography.fontSize.xs,iconSize:"24px",minHeight:"80px"};case"lg":return{padding:"32px",fontSize:t.typography.fontSize.md,iconSize:"48px",minHeight:"180px"};case"md":default:return{padding:"24px",fontSize:t.typography.fontSize.sm,iconSize:"36px",minHeight:"120px"}}},lg=$.div`
1840
1840
  display: flex;
1841
1841
  flex-direction: column;
1842
1842
  gap: 4px;
@@ -1861,12 +1861,12 @@
1861
1861
  `}}
1862
1862
 
1863
1863
  /* Variant styles */
1864
- ${({$variant:e,$isDragOver:t,$disabled:r,$error:n,theme:o})=>{const i=n?o.colors.status.error:t&&!r?o.colors.highlight:o.colors.border.medium;return e==="compact"?`
1865
- border: ${o.borders.width.thin} dashed ${i};
1864
+ ${({$variant:e,$isDragOver:t,$disabled:r,$error:n,theme:o})=>{const s=n?o.colors.status.error:t&&!r?o.colors.highlight:o.colors.border.medium;return e==="compact"?`
1865
+ border: ${o.borders.width.thin} dashed ${s};
1866
1866
  border-radius: ${o.borders.radius.sm};
1867
1867
  background-color: ${t&&!r?`color-mix(in srgb, ${o.colors.highlight} 8%, transparent)`:o.colors.background.default};
1868
1868
  `:`
1869
- border: ${o.borders.width.medium} dashed ${i};
1869
+ border: ${o.borders.width.medium} dashed ${s};
1870
1870
  border-radius: ${o.borders.radius.md};
1871
1871
  background-color: ${t&&!r?`color-mix(in srgb, ${o.colors.highlight} 8%, transparent)`:o.colors.background.hover};
1872
1872
  `}}
@@ -1969,7 +1969,7 @@
1969
1969
  align-items: center;
1970
1970
  justify-content: center;
1971
1971
  flex-wrap: wrap;
1972
- `,wi=$.span`
1972
+ `,$i=$.span`
1973
1973
  color: ${({theme:e})=>e.colors.text.secondary};
1974
1974
  font-size: ${({theme:e})=>e.typography.fontSize.sm};
1975
1975
  `,bg=z.keyframes`
@@ -1979,7 +1979,7 @@
1979
1979
  100% {
1980
1980
  background-position: 100% 50%;
1981
1981
  }
1982
- `,$i=$.div`
1982
+ `,wi=$.div`
1983
1983
  width: 100%;
1984
1984
  height: 4px;
1985
1985
  background-color: ${({theme:e})=>e.colors.border.light};
@@ -2007,7 +2007,7 @@
2007
2007
  color: ${({theme:e})=>e.colors.text.secondary};
2008
2008
  font-size: ${({theme:e})=>e.typography.fontSize.xs};
2009
2009
  margin-top: 4px;
2010
- `,ji=()=>s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),jn=e=>{if(e===0)return"0 Bytes";const t=1024,r=["Bytes","KB","MB","GB"],n=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,n)).toFixed(1))+" "+r[n]},Ei=e=>e.type.startsWith("image/"),xg=e=>{var r;if(e.includes("unsplash.com")||e.includes("images.unsplash.com")||e.startsWith("blob:")||e.startsWith("data:image/"))return!0;const t=((r=e.split("?")[0])==null?void 0:r.split("#")[0])||e;return/\.(jpg|jpeg|png|gif|webp|svg)$/i.test(t)},za=a.forwardRef(({onFilesSelect:e,accept:t,multiple:r=!1,disabled:n=!1,variant:o="default",size:i="md",children:l,showDefaultContent:c=!0,maxSizeHint:d,className:u,"aria-label":f="Drop files here or click to browse","data-testid":h,maxSize:m,onError:p,text:g,browseText:v,showPreview:y=!1,changeButtonText:b,onChangeClick:w,value:x,existingFile:j,onClearExisting:E,allowRemove:F=!0,error:T,setError:L,progress:M,uploading:k,onClear:D},P)=>{const[R,S]=a.useState(!1),[O,N]=a.useState([]),[A,W]=a.useState([]),_=a.useRef(null),H=a.useRef(0),G=a.useRef(!1),V=t==null?void 0:t.join(",");a.useEffect(()=>{x&&N(x)},[x]),a.useEffect(()=>{const X=[];return O.forEach(ie=>{Ei(ie)?X.push(URL.createObjectURL(ie)):X.push("")}),W(X),()=>{X.forEach(ie=>{ie&&URL.revokeObjectURL(ie)})}},[O]);const U=a.useCallback(X=>{if(m){const ie=Array.isArray(X)?X:Array.from(X);for(const gt of ie)if(gt.size>m){const wo=`File size exceeds maximum allowed size of ${(m/1048576).toFixed(2)} MB`;return p==null||p(wo),L==null||L(wo),!1}}return!0},[m,p,L]),ne=a.useCallback(X=>{if(!X||(Array.isArray(X),X.length===0)||n)return;const ie=Array.isArray(X)?X:Array.from(X);if(U(ie)){const gt=r?ie:ie.slice(0,1);y&&N(gt),e(gt)}},[n,r,e,U,y]),ae=a.useCallback(X=>{X.preventDefault(),X.stopPropagation(),!n&&(H.current++,X.dataTransfer.items&&X.dataTransfer.items.length>0&&S(!0))},[n]),Y=a.useCallback(X=>{X.preventDefault(),X.stopPropagation(),!n&&(H.current--,H.current===0&&S(!1))},[n]),oe=a.useCallback(X=>{X.preventDefault(),X.stopPropagation()},[]),I=a.useCallback(X=>{if(X.preventDefault(),X.stopPropagation(),n)return;S(!1),H.current=0;const ie=X.dataTransfer.files;ie&&ie.length>0&&ne(ie)},[n,ne]),C=a.useCallback(()=>{var X;n||G.current||(G.current=!0,(X=_.current)==null||X.click())},[n]),B=a.useCallback(X=>{G.current=!1;const ie=X.target.files;ie&&ie.length>0&&ne(ie),X.target.value=""},[ne]),q=a.useCallback(()=>{G.current=!0},[]),te=a.useCallback(()=>{setTimeout(()=>{G.current&&(G.current=!1)},100)},[]),se=a.useCallback(X=>{var ie;n||(X.key==="Enter"||X.key===" ")&&(X.preventDefault(),(ie=_.current)==null||ie.click())},[n]),Ce=a.useCallback(()=>{w?w():!n&&_.current&&!G.current&&(G.current=!0,_.current.click())},[w,n]),ht=a.useCallback(()=>{N([]),W([]),_.current&&(_.current.value=""),D==null||D(),e([])},[e,D]),ge=a.useCallback(()=>{E&&E()},[E]),Ue=g||`Drag & drop ${r?"files":"a file"} here, or`,me=v||"browse",Ne=b||"Change",vr=()=>`File upload. ${typeof Ue=="string"?Ue:"Drag and drop a file to upload or click"} ${typeof me=="string"?me:"Browse"}`,Nl=y&&(O.length>0||j),zl=()=>{if(!j)return null;const X=xg(j.url);return s.jsxs(mi,{children:[s.jsx(bi,{children:X?s.jsx(xi,{src:j.url,alt:j.name||"Existing file"}):s.jsx(vi,{children:"No preview available"})}),s.jsxs(yi,{children:[s.jsxs(wi,{children:[j.name||"Existing file",j.size?` (${jn(j.size)})`:""]}),F&&s.jsx(pe,{icon:s.jsx(ji,{}),"aria-label":"Clear existing file",onClick:ge,disabled:n,variant:"ghost",size:"sm"}),s.jsx(pe,{variant:"secondary",size:"sm",onClick:Ce,disabled:n,children:Ne})]}),typeof M=="number"&&s.jsxs(s.Fragment,{children:[s.jsx($i,{$progress:M,children:s.jsx(ki,{$progress:M,$uploading:k})}),s.jsxs(Ci,{children:[M,"% uploaded"]})]})]},"existing-file")},Bl=(X,ie)=>{const gt=A[ie];return s.jsxs(mi,{children:[s.jsx(bi,{children:Ei(X)&&gt?s.jsx(xi,{src:gt,alt:X.name}):s.jsx(vi,{children:"No preview available"})}),s.jsxs(yi,{children:[s.jsxs(wi,{children:[X.name," (",jn(X.size),")"]}),F&&s.jsx(pe,{icon:s.jsx(ji,{}),"aria-label":"Clear all",onClick:ht,disabled:n||k,variant:"ghost",size:"sm"}),s.jsx(pe,{variant:"secondary",size:"sm",onClick:Ce,disabled:n||k,children:Ne})]}),typeof M=="number"&&s.jsxs(s.Fragment,{children:[s.jsx($i,{$progress:M,children:s.jsx(ki,{$progress:M,$uploading:k})}),s.jsxs(Ci,{children:[M,"% uploaded"]})]})]},`${X.name}-${ie}`)};return Nl&&!T?s.jsxs(mg,{ref:P,className:u,"data-testid":h,children:[s.jsx(gi,{ref:_,type:"file",accept:V,multiple:r,disabled:n,onChange:B,onFocus:q,onBlur:te,tabIndex:-1,"aria-hidden":"true","data-testid":h?`${h}-input`:void 0,"aria-label":vr(),title:vr()}),j&&O.length===0&&zl(),O.map((X,ie)=>Bl(X,ie))]}):s.jsxs(lg,{children:[s.jsxs(cg,{ref:P,role:"button",tabIndex:n?-1:0,"aria-label":f,"aria-disabled":n,"data-disabled":n,"data-testid":h,className:u,$isDragOver:R,$disabled:n,$variant:o,$size:i,$error:!!T,onClick:C,onKeyDown:se,onDragEnter:ae,onDragLeave:Y,onDragOver:oe,onDrop:I,children:[s.jsx(gi,{ref:_,type:"file",accept:V,multiple:r,disabled:n,onChange:B,onFocus:q,onBlur:te,tabIndex:-1,"aria-hidden":"true","data-testid":h?`${h}-input`:void 0}),l||(c?s.jsxs(dg,{$size:i,children:[s.jsx(ug,{$size:i,$error:!!T,viewBox:"0 0 24 24","aria-hidden":"true",children:s.jsx("path",{d:"M19.35 10.04A7.49 7.49 0 0012 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 000 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"})}),s.jsxs(fg,{$error:!!T,children:[Ue," ",s.jsx(pg,{$error:!!T,children:me})]}),(d||m||t)&&s.jsxs(hg,{children:[t&&`Accepts: ${t.join(", ")}`,t&&(d||m)&&" • ",(d||m)&&`Max size: ${jn(d||m||0)}`]})]}):null)]}),T&&s.jsx(gg,{children:T})]})});za.displayName="DropZone";const vg=[{value:10,label:"10"},{value:25,label:"25"},{value:50,label:"50"},{value:100,label:"100"}],Si=$.div`
2010
+ `,ji=()=>i.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),Cn=e=>{if(e===0)return"0 Bytes";const t=1024,r=["Bytes","KB","MB","GB"],n=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,n)).toFixed(1))+" "+r[n]},Ei=e=>e.type.startsWith("image/"),xg=e=>{var r;if(e.includes("unsplash.com")||e.includes("images.unsplash.com")||e.startsWith("blob:")||e.startsWith("data:image/"))return!0;const t=((r=e.split("?")[0])==null?void 0:r.split("#")[0])||e;return/\.(jpg|jpeg|png|gif|webp|svg)$/i.test(t)},za=a.forwardRef(({onFilesSelect:e,accept:t,multiple:r=!1,disabled:n=!1,variant:o="default",size:s="md",children:l,showDefaultContent:c=!0,maxSizeHint:d,className:u,"aria-label":f="Drop files here or click to browse","data-testid":h,maxSize:m,onError:p,text:g,browseText:v,showPreview:y=!1,changeButtonText:b,onChangeClick:w,value:x,existingFile:j,onClearExisting:E,allowRemove:F=!0,error:T,setError:L,progress:M,uploading:k,onClear:D},P)=>{const[R,S]=a.useState(!1),[O,N]=a.useState([]),[A,W]=a.useState([]),_=a.useRef(null),H=a.useRef(0),G=a.useRef(!1),V=t==null?void 0:t.join(",");a.useEffect(()=>{x&&N(x)},[x]),a.useEffect(()=>{const X=[];return O.forEach(ie=>{Ei(ie)?X.push(URL.createObjectURL(ie)):X.push("")}),W(X),()=>{X.forEach(ie=>{ie&&URL.revokeObjectURL(ie)})}},[O]);const U=a.useCallback(X=>{if(m){const ie=Array.isArray(X)?X:Array.from(X);for(const ht of ie)if(ht.size>m){const $o=`File size exceeds maximum allowed size of ${(m/1048576).toFixed(2)} MB`;return p==null||p($o),L==null||L($o),!1}}return!0},[m,p,L]),ne=a.useCallback(X=>{if(!X||(Array.isArray(X),X.length===0)||n)return;const ie=Array.isArray(X)?X:Array.from(X);if(U(ie)){const ht=r?ie:ie.slice(0,1);y&&N(ht),e(ht)}},[n,r,e,U,y]),ae=a.useCallback(X=>{X.preventDefault(),X.stopPropagation(),!n&&(H.current++,X.dataTransfer.items&&X.dataTransfer.items.length>0&&S(!0))},[n]),Y=a.useCallback(X=>{X.preventDefault(),X.stopPropagation(),!n&&(H.current--,H.current===0&&S(!1))},[n]),oe=a.useCallback(X=>{X.preventDefault(),X.stopPropagation()},[]),B=a.useCallback(X=>{if(X.preventDefault(),X.stopPropagation(),n)return;S(!1),H.current=0;const ie=X.dataTransfer.files;ie&&ie.length>0&&ne(ie)},[n,ne]),C=a.useCallback(()=>{var X;n||G.current||(G.current=!0,(X=_.current)==null||X.click())},[n]),I=a.useCallback(X=>{G.current=!1;const ie=X.target.files;ie&&ie.length>0&&ne(ie),X.target.value=""},[ne]),q=a.useCallback(()=>{G.current=!0},[]),te=a.useCallback(()=>{setTimeout(()=>{G.current&&(G.current=!1)},100)},[]),se=a.useCallback(X=>{var ie;n||(X.key==="Enter"||X.key===" ")&&(X.preventDefault(),(ie=_.current)==null||ie.click())},[n]),Ce=a.useCallback(()=>{w?w():!n&&_.current&&!G.current&&(G.current=!0,_.current.click())},[w,n]),pt=a.useCallback(()=>{N([]),W([]),_.current&&(_.current.value=""),D==null||D(),e([])},[e,D]),ge=a.useCallback(()=>{E&&E()},[E]),Ue=g||`Drag & drop ${r?"files":"a file"} here, or`,me=v||"browse",Ne=b||"Change",xr=()=>`File upload. ${typeof Ue=="string"?Ue:"Drag and drop a file to upload or click"} ${typeof me=="string"?me:"Browse"}`,Nl=y&&(O.length>0||j),zl=()=>{if(!j)return null;const X=xg(j.url);return i.jsxs(mi,{children:[i.jsx(bi,{children:X?i.jsx(xi,{src:j.url,alt:j.name||"Existing file"}):i.jsx(vi,{children:"No preview available"})}),i.jsxs(yi,{children:[i.jsxs($i,{children:[j.name||"Existing file",j.size?` (${Cn(j.size)})`:""]}),F&&i.jsx(pe,{icon:i.jsx(ji,{}),"aria-label":"Clear existing file",onClick:ge,disabled:n,variant:"ghost",size:"sm"}),i.jsx(pe,{variant:"secondary",size:"sm",onClick:Ce,disabled:n,children:Ne})]}),typeof M=="number"&&i.jsxs(i.Fragment,{children:[i.jsx(wi,{$progress:M,children:i.jsx(ki,{$progress:M,$uploading:k})}),i.jsxs(Ci,{children:[M,"% uploaded"]})]})]},"existing-file")},Il=(X,ie)=>{const ht=A[ie];return i.jsxs(mi,{children:[i.jsx(bi,{children:Ei(X)&&ht?i.jsx(xi,{src:ht,alt:X.name}):i.jsx(vi,{children:"No preview available"})}),i.jsxs(yi,{children:[i.jsxs($i,{children:[X.name," (",Cn(X.size),")"]}),F&&i.jsx(pe,{icon:i.jsx(ji,{}),"aria-label":"Clear all",onClick:pt,disabled:n||k,variant:"ghost",size:"sm"}),i.jsx(pe,{variant:"secondary",size:"sm",onClick:Ce,disabled:n||k,children:Ne})]}),typeof M=="number"&&i.jsxs(i.Fragment,{children:[i.jsx(wi,{$progress:M,children:i.jsx(ki,{$progress:M,$uploading:k})}),i.jsxs(Ci,{children:[M,"% uploaded"]})]})]},`${X.name}-${ie}`)};return Nl&&!T?i.jsxs(mg,{ref:P,className:u,"data-testid":h,children:[i.jsx(gi,{ref:_,type:"file",accept:V,multiple:r,disabled:n,onChange:I,onFocus:q,onBlur:te,tabIndex:-1,"aria-hidden":"true","data-testid":h?`${h}-input`:void 0,"aria-label":xr(),title:xr()}),j&&O.length===0&&zl(),O.map((X,ie)=>Il(X,ie))]}):i.jsxs(lg,{children:[i.jsxs(cg,{ref:P,role:"button",tabIndex:n?-1:0,"aria-label":f,"aria-disabled":n,"data-disabled":n,"data-testid":h,className:u,$isDragOver:R,$disabled:n,$variant:o,$size:s,$error:!!T,onClick:C,onKeyDown:se,onDragEnter:ae,onDragLeave:Y,onDragOver:oe,onDrop:B,children:[i.jsx(gi,{ref:_,type:"file",accept:V,multiple:r,disabled:n,onChange:I,onFocus:q,onBlur:te,tabIndex:-1,"aria-hidden":"true","data-testid":h?`${h}-input`:void 0}),l||(c?i.jsxs(dg,{$size:s,children:[i.jsx(ug,{$size:s,$error:!!T,viewBox:"0 0 24 24","aria-hidden":"true",children:i.jsx("path",{d:"M19.35 10.04A7.49 7.49 0 0012 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 000 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"})}),i.jsxs(fg,{$error:!!T,children:[Ue," ",i.jsx(pg,{$error:!!T,children:me})]}),(d||m||t)&&i.jsxs(hg,{children:[t&&`Accepts: ${t.join(", ")}`,t&&(d||m)&&" • ",(d||m)&&`Max size: ${Cn(d||m||0)}`]})]}):null)]}),T&&i.jsx(gg,{children:T})]})});za.displayName="DropZone";const vg=[{value:10,label:"10"},{value:25,label:"25"},{value:50,label:"50"},{value:100,label:"100"}],Si=$.div`
2011
2011
  display: flex;
2012
2012
  flex-direction: row;
2013
2013
  align-items: center;
@@ -2016,7 +2016,7 @@
2016
2016
  opacity: ${({$disabled:e})=>e?.5:1};
2017
2017
  pointer-events: ${({$disabled:e})=>e?"none":"auto"};
2018
2018
  color: ${({$inverse:e,theme:t})=>e?t.colors.white:t.colors.text.primary};
2019
- `,Ba=$.button`
2019
+ `,Ia=$.button`
2020
2020
  display: flex;
2021
2021
  align-items: center;
2022
2022
  justify-content: center;
@@ -2070,7 +2070,7 @@
2070
2070
  outline: 2px solid ${({theme:e})=>e.colors.highlight};
2071
2071
  outline-offset: 2px;
2072
2072
  }
2073
- `,St=$(Ba)`
2073
+ `,Et=$(Ia)`
2074
2074
  /* Icon styles */
2075
2075
  i,
2076
2076
  .material-icons {
@@ -2082,9 +2082,9 @@
2082
2082
  width: ${({$size:e})=>{switch(e){case"sm":return"16px";case"lg":return"24px";default:return"20px"}}};
2083
2083
  height: ${({$size:e})=>{switch(e){case"sm":return"16px";case"lg":return"24px";default:return"20px"}}};
2084
2084
  }
2085
- `,yg=$(Ba)`
2085
+ `,yg=$(Ia)`
2086
2086
  /* Page number specific styles */
2087
- `,wg=$.span`
2087
+ `,$g=$.span`
2088
2088
  display: flex;
2089
2089
  align-items: center;
2090
2090
  justify-content: center;
@@ -2138,7 +2138,7 @@
2138
2138
  }
2139
2139
 
2140
2140
  -moz-appearance: textfield;
2141
- `,$g=$.div`
2141
+ `,wg=$.div`
2142
2142
  display: flex;
2143
2143
  align-items: center;
2144
2144
  gap: ${({theme:e})=>e.spacing[2]};
@@ -2171,7 +2171,7 @@
2171
2171
  &:focus {
2172
2172
  border-color: ${({theme:e})=>e.colors.text.primary};
2173
2173
  }
2174
- `,Fi=()=>s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"M15 18l-6-6 6-6"})}),Ri=()=>s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"M9 18l6-6-6-6"})}),Cg=()=>s.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M11 17l-5-5 5-5"}),s.jsx("path",{d:"M18 17l-5-5 5-5"})]}),jg=()=>s.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M13 17l5-5-5-5"}),s.jsx("path",{d:"M6 17l5-5-5-5"})]});function Eg(e,t,r){if(t<=r)return Array.from({length:t},(c,d)=>d+1);const n=[],o=Math.floor((r-3)/2);n.push(1);let i=Math.max(2,e-o),l=Math.min(t-1,e+o);e<=o+2&&(l=Math.min(t-1,r-2),i=2),e>=t-o-1&&(i=Math.max(2,t-r+3),l=t-1),i>2&&n.push("ellipsis");for(let c=i;c<=l;c++)n.push(c);return l<t-1&&n.push("ellipsis"),t>1&&n.push(t),n}const Ia=a.forwardRef(({currentPage:e,totalPages:t,onPageChange:r,showFirstLast:n=!1,showPrevNext:o=!0,maxVisiblePages:i=5,disabled:l=!1,size:c="md",className:d,"data-testid":u,firstLabel:f,lastLabel:h,prevLabel:m,nextLabel:p,showGoToPage:g=!1,goToPageDebounce:v=300,showPageInfo:y,pageInfoFormat:b=R=>`of ${R.toLocaleString()}`,loading:w=!1,showPageSizeSelector:x=!1,pageSize:j,onPageSizeChange:E,pageSizeOptions:F=vg,simple:T=!1,inverse:L=!1,goToPageLabel:M="Go to page",pageSizeLabel:k="Items per page",...D},P)=>{const R=Math.max(1,t),S=Math.min(Math.max(1,e),R),O=S===1,N=S===R,A=l||w,[W,_]=a.useState(S.toString()),H=a.useRef(null);a.useEffect(()=>{_(S.toString())},[S]),a.useEffect(()=>()=>{H.current&&clearTimeout(H.current)},[]);const G=a.useMemo(()=>Eg(S,R,i),[S,R,i]),V=a.useCallback(I=>{I>=1&&I<=R&&I!==S&&!A&&r(I)},[r,R,S,A]),U=a.useCallback((I,C)=>{(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),V(C))},[V]),ne=a.useCallback(I=>{const B=I.target.value.replace(/[^\d]/g,"");_(B),H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{let q=parseInt(B,10);isNaN(q)?B===""&&_(S.toString()):(q=Math.max(1,Math.min(q,R)),_(q.toString()),q!==S&&r(q))},v)},[R,S,r,v]),ae=a.useCallback(()=>{let I=parseInt(W,10);isNaN(I)||W===""?_(S.toString()):(I=Math.max(1,Math.min(I,R)),_(I.toString()))},[W,S,R]),Y=a.useCallback(I=>{const C=parseInt(I.target.value,10);E==null||E(C)},[E]),oe=y!==void 0?y:g;return R<=1&&!x?null:T?s.jsxs(Si,{ref:P,className:d,$disabled:A,$inverse:L,role:"navigation","aria-label":"Pagination","data-testid":u,...D,children:[s.jsx(St,{type:"button",$size:c,$inverse:L,disabled:A||O,onClick:()=>V(S-1),"aria-label":m||"Previous page",children:s.jsx(Fi,{})}),s.jsxs(Li,{$size:c,$inverse:L,children:[g?s.jsx(Ti,{type:"text",inputMode:"numeric",pattern:"[0-9]*",$size:c,$inverse:L,value:W,onChange:ne,onBlur:ae,disabled:A,"aria-label":M,min:1,max:R}):s.jsx("span",{children:S}),oe&&s.jsx("span",{children:b(R)})]}),s.jsx(St,{type:"button",$size:c,$inverse:L,disabled:A||N,onClick:()=>V(S+1),"aria-label":p||"Next page",children:s.jsx(Ri,{})})]}):s.jsxs(Si,{ref:P,className:d,$disabled:A,$inverse:L,role:"navigation","aria-label":"Pagination","data-testid":u,...D,children:[n&&s.jsx(St,{type:"button",$size:c,$inverse:L,disabled:A||O,onClick:()=>V(1),onKeyDown:I=>U(I,1),"aria-label":f||"Go to first page","aria-disabled":O,children:f||s.jsx(Cg,{})}),o&&s.jsx(St,{type:"button",$size:c,$inverse:L,disabled:A||O,onClick:()=>V(S-1),onKeyDown:I=>U(I,S-1),"aria-label":m||"Go to previous page","aria-disabled":O,children:m||s.jsx(Fi,{})}),G.map((I,C)=>I==="ellipsis"?s.jsx(wg,{$size:c,"aria-hidden":"true",children:"…"},`ellipsis-${C}`):s.jsx(yg,{type:"button",$size:c,$active:I===S,$inverse:L,disabled:A,onClick:()=>V(I),onKeyDown:B=>U(B,I),"aria-label":`Page ${I}`,"aria-current":I===S?"page":void 0,children:I},I)),o&&s.jsx(St,{type:"button",$size:c,$inverse:L,disabled:A||N,onClick:()=>V(S+1),onKeyDown:I=>U(I,S+1),"aria-label":p||"Go to next page","aria-disabled":N,children:p||s.jsx(Ri,{})}),n&&s.jsx(St,{type:"button",$size:c,$inverse:L,disabled:A||N,onClick:()=>V(R),onKeyDown:I=>U(I,R),"aria-label":h||"Go to last page","aria-disabled":N,children:h||s.jsx(jg,{})}),g&&s.jsxs(Li,{$size:c,$inverse:L,children:[s.jsx("span",{children:"Go to"}),s.jsx(Ti,{type:"text",inputMode:"numeric",pattern:"[0-9]*",$size:c,$inverse:L,value:W,onChange:ne,onBlur:ae,disabled:A,"aria-label":M,min:1,max:R}),oe&&s.jsx("span",{children:b(R)})]}),x&&E&&s.jsxs($g,{$size:c,children:[s.jsxs("label",{htmlFor:"page-size-select",children:[k,":"]}),s.jsx(kg,{id:"page-size-select",$size:c,$inverse:L,value:j,onChange:Y,disabled:A,children:F.map(I=>s.jsx("option",{value:I.value,children:I.label},I.value))})]})]})});Ia.displayName="Paginator";const Sg="ib-multiselect-25hfQ",Lg="ib-label--3iNk",Tg="ib-selectWrapper-ynskr",Fg="ib-trigger-YjOq8",Rg="ib-triggerContent-1HoxJ",Dg="ib-placeholder--QdXd",Og="ib-chips-ed2Vu",Mg="ib-chip-14OL1",Ag="ib-chipLabel-FWn04",Pg="ib-chipRemove-1KQB1",Ng="ib-moreChips-Act5V",zg="ib-triggerActions-V0s7I",Bg="ib-clearButton-ENtWi",Ig="ib-chevron-JVSzw",Wg="ib-dropdown-P8jdk",Hg="ib-searchWrapper-r8pfy",_g="ib-searchInput-2xVk8",Vg="ib-bulkActions-xRKsJ",Gg="ib-bulkActionButton-EW0RB",Ug="ib-bulkActionDivider-Ws8KL",Kg="ib-optionsList-ud6wj",Yg="ib-option-GFmLe",qg="ib-checkbox-dpNwn",Xg="ib-checkIcon-6TGZe",Qg="ib-optionLabel-4E7CB",Zg="ib-optionIcon-Thw8P",Jg="ib-noResults-XcS-Q",em="ib-errorMessage-RDr-S",re={multiselect:Sg,label:Lg,selectWrapper:Tg,trigger:Fg,triggerContent:Rg,placeholder:Dg,chips:Og,chip:Mg,chipLabel:Ag,chipRemove:Pg,moreChips:Ng,triggerActions:zg,clearButton:Bg,chevron:Ig,dropdown:Wg,searchWrapper:Hg,searchInput:_g,bulkActions:Vg,bulkActionButton:Gg,bulkActionDivider:Ug,optionsList:Kg,option:Yg,checkbox:qg,checkIcon:Xg,optionLabel:Qg,optionIcon:Zg,noResults:Jg,errorMessage:em},lo=a.forwardRef(({options:e,value:t,onChange:r,label:n,placeholder:o="Select...",disabled:i=!1,error:l=!1,errorMessage:c,size:d="md",maxDisplayedChips:u=3,clearable:f=!0,showBulkActions:h=!1,selectAllLabel:m="Select All",clearAllLabel:p="Clear All",searchable:g=!1,searchPlaceholder:v="Search...",fullWidth:y=!1,className:b,"aria-label":w,"data-testid":x},j)=>{const E=a.useId(),F=a.useRef(null),T=a.useRef(null),L=a.useRef(null),M=a.useRef(null),[k,D]=a.useState(!1),[P,R]=a.useState(""),[S,O]=a.useState(-1),N=a.useMemo(()=>e.filter(C=>t.includes(C.value)),[e,t]),A=a.useMemo(()=>{if(!g||!P)return e;const C=P.toLowerCase();return e.filter(B=>B.label.toLowerCase().includes(C))},[e,P,g]);a.useEffect(()=>{const C=B=>{F.current&&!F.current.contains(B.target)&&(D(!1),R(""),O(-1))};return document.addEventListener("mousedown",C),()=>{document.removeEventListener("mousedown",C)}},[]),a.useEffect(()=>{k&&g&&L.current&&L.current.focus()},[k,g]),a.useEffect(()=>{O(-1)},[A.length]);const W=a.useCallback(()=>{i||(D(C=>!C),R(""),O(-1))},[i]),_=a.useCallback((C,B)=>{if(B||i)return;const q=t.includes(C)?t.filter(te=>te!==C):[...t,C];r(q)},[t,r,i]),H=a.useCallback((C,B)=>{C.stopPropagation(),!i&&r(t.filter(q=>q!==B))},[t,r,i]),G=a.useCallback(C=>{C.stopPropagation(),!i&&(r([]),D(!1))},[r,i]),V=a.useCallback(C=>{if(C.stopPropagation(),i)return;const B=e.filter(q=>!q.disabled).map(q=>q.value);r(B)},[e,r,i]),U=a.useCallback(C=>{C.stopPropagation(),!i&&r([])},[r,i]),ne=a.useMemo(()=>{const C=e.filter(B=>!B.disabled);return C.length>0&&C.every(B=>t.includes(B.value))},[e,t]),ae=a.useCallback(C=>{var B;if(!i)switch(C.key){case"Enter":case" ":if(C.preventDefault(),!k)D(!0);else if(S>=0&&S<A.length){const q=A[S];q&&!q.disabled&&_(q.value,q.disabled)}break;case"Escape":C.preventDefault(),D(!1),R(""),O(-1),(B=T.current)==null||B.focus();break;case"ArrowDown":C.preventDefault(),k?O(q=>{const te=q+1;return te>=A.length?0:te}):D(!0);break;case"ArrowUp":C.preventDefault(),k&&O(q=>{const te=q-1;return te<0?A.length-1:te});break;case"Home":C.preventDefault(),k&&O(0);break;case"End":C.preventDefault(),k&&O(A.length-1);break}},[i,k,S,A,_]);a.useEffect(()=>{if(S>=0&&M.current){const B=M.current.querySelectorAll('[role="option"]')[S];B&&B.scrollIntoView({block:"nearest"})}},[S]);const Y=N.slice(0,u),oe=N.length-u,I=[re.multiselect,b].filter(Boolean).join(" ");return s.jsxs("div",{ref:C=>{F.current=C,typeof j=="function"?j(C):j&&(j.current=C)},className:I,"data-full-width":y,"data-testid":x,children:[n&&s.jsx("label",{id:`${E}-label`,className:re.label,htmlFor:`${E}-trigger`,children:n}),s.jsxs("div",{className:re.selectWrapper,children:[s.jsxs("button",{ref:T,type:"button",id:`${E}-trigger`,className:re.trigger,onClick:W,onKeyDown:ae,disabled:i,"data-size":d,"data-open":k,"data-error":l,"data-disabled":i,"aria-haspopup":"listbox","aria-expanded":k,"aria-labelledby":n?`${E}-label`:void 0,"aria-label":w||n,"aria-controls":`${E}-listbox`,"data-testid":x&&`${x}-trigger`,children:[s.jsx("div",{className:re.triggerContent,children:N.length===0?s.jsx("span",{className:re.placeholder,children:o}):s.jsxs("div",{className:re.chips,children:[Y.map(C=>s.jsxs("span",{className:re.chip,"data-size":d,children:[s.jsx("span",{className:re.chipLabel,children:C.label}),s.jsx("span",{role:"button",className:re.chipRemove,onClick:B=>H(B,C.value),onKeyDown:B=>{(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),H(B,C.value))},"aria-label":`Remove ${C.label}`,tabIndex:-1,"data-testid":x&&`${x}-chip-remove-${C.value}`,children:s.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:s.jsx("path",{d:"M10.5 3.5L3.5 10.5M3.5 3.5L10.5 10.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]},C.value)),oe>0&&s.jsxs("span",{className:re.moreChips,children:["+",oe," more"]})]})}),s.jsxs("div",{className:re.triggerActions,children:[f&&N.length>0&&s.jsx("span",{role:"button",className:re.clearButton,onClick:G,onKeyDown:C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),G(C))},"aria-label":"Clear all selections",tabIndex:-1,"data-testid":x&&`${x}-clear`,children:s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:s.jsx("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),s.jsx("span",{className:re.chevron,"data-open":k,"aria-hidden":"true",children:s.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]}),s.jsxs("div",{className:re.dropdown,"data-open":k,role:"presentation",children:[g&&s.jsx("div",{className:re.searchWrapper,children:s.jsx("input",{ref:L,type:"text",className:re.searchInput,placeholder:v,value:P,onChange:C=>R(C.target.value),onKeyDown:ae,"aria-label":"Search options","data-testid":x&&`${x}-search`})}),h&&s.jsxs("div",{className:re.bulkActions,children:[s.jsx("button",{type:"button",className:re.bulkActionButton,onClick:V,disabled:ne,"data-testid":x&&`${x}-select-all`,children:m}),s.jsx("span",{className:re.bulkActionDivider,children:"|"}),s.jsx("button",{type:"button",className:re.bulkActionButton,onClick:U,disabled:t.length===0,"data-testid":x&&`${x}-clear-all`,children:p})]}),s.jsx("ul",{ref:M,id:`${E}-listbox`,className:re.optionsList,role:"listbox","aria-multiselectable":"true","aria-labelledby":n?`${E}-label`:void 0,tabIndex:-1,children:A.length===0?s.jsx("li",{className:re.noResults,children:"No options found"}):A.map((C,B)=>{const q=t.includes(C.value),te=B===S;return s.jsxs("li",{role:"option",className:re.option,onClick:()=>_(C.value,C.disabled),onMouseEnter:()=>O(B),"data-highlighted":te,"data-disabled":C.disabled,"aria-selected":q,"aria-disabled":C.disabled,"data-testid":x&&`${x}-option-${C.value}`,children:[s.jsx("span",{className:re.checkbox,"data-checked":q,"aria-hidden":"true",children:q&&s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:re.checkIcon,children:s.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),C.icon&&s.jsx("span",{className:re.optionIcon,"aria-hidden":"true",children:C.icon}),s.jsx("span",{className:re.optionLabel,children:C.label})]},C.value)})})]})]}),l&&c&&s.jsx("p",{className:re.errorMessage,role:"alert",children:c})]})});lo.displayName="Multiselect";const Wa={info:{iconName:"info",iconColor:"info",getTextColor:e=>e.colors.semantic.blue.base,role:void 0},assistive:{iconName:"help_outline",iconColor:"secondary",getTextColor:e=>e.colors.grey[500],role:void 0},error:{iconName:"error",iconColor:"error",getTextColor:e=>e.colors.semantic.red.base,role:"alert"},warning:{iconName:"warning",iconColor:"warning",getTextColor:e=>e.colors.semantic.orange.base,role:"status"},success:{iconName:"check_circle",iconColor:"success",getTextColor:e=>e.colors.semantic.green.base,role:"status"}},tm=$.div`
2174
+ `,Fi=()=>i.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("path",{d:"M15 18l-6-6 6-6"})}),Ri=()=>i.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("path",{d:"M9 18l6-6-6-6"})}),Cg=()=>i.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("path",{d:"M11 17l-5-5 5-5"}),i.jsx("path",{d:"M18 17l-5-5 5-5"})]}),jg=()=>i.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("path",{d:"M13 17l5-5-5-5"}),i.jsx("path",{d:"M6 17l5-5-5-5"})]});function Eg(e,t,r){if(t<=r)return Array.from({length:t},(c,d)=>d+1);const n=[],o=Math.floor((r-3)/2);n.push(1);let s=Math.max(2,e-o),l=Math.min(t-1,e+o);e<=o+2&&(l=Math.min(t-1,r-2),s=2),e>=t-o-1&&(s=Math.max(2,t-r+3),l=t-1),s>2&&n.push("ellipsis");for(let c=s;c<=l;c++)n.push(c);return l<t-1&&n.push("ellipsis"),t>1&&n.push(t),n}const Ba=a.forwardRef(({currentPage:e,totalPages:t,onPageChange:r,showFirstLast:n=!1,showPrevNext:o=!0,maxVisiblePages:s=5,disabled:l=!1,size:c="md",className:d,"data-testid":u,firstLabel:f,lastLabel:h,prevLabel:m,nextLabel:p,showGoToPage:g=!1,goToPageDebounce:v=300,showPageInfo:y,pageInfoFormat:b=R=>`of ${R.toLocaleString()}`,loading:w=!1,showPageSizeSelector:x=!1,pageSize:j,onPageSizeChange:E,pageSizeOptions:F=vg,simple:T=!1,inverse:L=!1,goToPageLabel:M="Go to page",pageSizeLabel:k="Items per page",...D},P)=>{const R=Math.max(1,t),S=Math.min(Math.max(1,e),R),O=S===1,N=S===R,A=l||w,[W,_]=a.useState(S.toString()),H=a.useRef(null);a.useEffect(()=>{_(S.toString())},[S]),a.useEffect(()=>()=>{H.current&&clearTimeout(H.current)},[]);const G=a.useMemo(()=>Eg(S,R,s),[S,R,s]),V=a.useCallback(B=>{B>=1&&B<=R&&B!==S&&!A&&r(B)},[r,R,S,A]),U=a.useCallback((B,C)=>{(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),V(C))},[V]),ne=a.useCallback(B=>{const I=B.target.value.replace(/[^\d]/g,"");_(I),H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{let q=parseInt(I,10);isNaN(q)?I===""&&_(S.toString()):(q=Math.max(1,Math.min(q,R)),_(q.toString()),q!==S&&r(q))},v)},[R,S,r,v]),ae=a.useCallback(()=>{let B=parseInt(W,10);isNaN(B)||W===""?_(S.toString()):(B=Math.max(1,Math.min(B,R)),_(B.toString()))},[W,S,R]),Y=a.useCallback(B=>{const C=parseInt(B.target.value,10);E==null||E(C)},[E]),oe=y!==void 0?y:g;return R<=1&&!x?null:T?i.jsxs(Si,{ref:P,className:d,$disabled:A,$inverse:L,role:"navigation","aria-label":"Pagination","data-testid":u,...D,children:[i.jsx(Et,{type:"button",$size:c,$inverse:L,disabled:A||O,onClick:()=>V(S-1),"aria-label":m||"Previous page",children:i.jsx(Fi,{})}),i.jsxs(Li,{$size:c,$inverse:L,children:[g?i.jsx(Ti,{type:"text",inputMode:"numeric",pattern:"[0-9]*",$size:c,$inverse:L,value:W,onChange:ne,onBlur:ae,disabled:A,"aria-label":M,min:1,max:R}):i.jsx("span",{children:S}),oe&&i.jsx("span",{children:b(R)})]}),i.jsx(Et,{type:"button",$size:c,$inverse:L,disabled:A||N,onClick:()=>V(S+1),"aria-label":p||"Next page",children:i.jsx(Ri,{})})]}):i.jsxs(Si,{ref:P,className:d,$disabled:A,$inverse:L,role:"navigation","aria-label":"Pagination","data-testid":u,...D,children:[n&&i.jsx(Et,{type:"button",$size:c,$inverse:L,disabled:A||O,onClick:()=>V(1),onKeyDown:B=>U(B,1),"aria-label":f||"Go to first page","aria-disabled":O,children:f||i.jsx(Cg,{})}),o&&i.jsx(Et,{type:"button",$size:c,$inverse:L,disabled:A||O,onClick:()=>V(S-1),onKeyDown:B=>U(B,S-1),"aria-label":m||"Go to previous page","aria-disabled":O,children:m||i.jsx(Fi,{})}),G.map((B,C)=>B==="ellipsis"?i.jsx($g,{$size:c,"aria-hidden":"true",children:"…"},`ellipsis-${C}`):i.jsx(yg,{type:"button",$size:c,$active:B===S,$inverse:L,disabled:A,onClick:()=>V(B),onKeyDown:I=>U(I,B),"aria-label":`Page ${B}`,"aria-current":B===S?"page":void 0,children:B},B)),o&&i.jsx(Et,{type:"button",$size:c,$inverse:L,disabled:A||N,onClick:()=>V(S+1),onKeyDown:B=>U(B,S+1),"aria-label":p||"Go to next page","aria-disabled":N,children:p||i.jsx(Ri,{})}),n&&i.jsx(Et,{type:"button",$size:c,$inverse:L,disabled:A||N,onClick:()=>V(R),onKeyDown:B=>U(B,R),"aria-label":h||"Go to last page","aria-disabled":N,children:h||i.jsx(jg,{})}),g&&i.jsxs(Li,{$size:c,$inverse:L,children:[i.jsx("span",{children:"Go to"}),i.jsx(Ti,{type:"text",inputMode:"numeric",pattern:"[0-9]*",$size:c,$inverse:L,value:W,onChange:ne,onBlur:ae,disabled:A,"aria-label":M,min:1,max:R}),oe&&i.jsx("span",{children:b(R)})]}),x&&E&&i.jsxs(wg,{$size:c,children:[i.jsxs("label",{htmlFor:"page-size-select",children:[k,":"]}),i.jsx(kg,{id:"page-size-select",$size:c,$inverse:L,value:j,onChange:Y,disabled:A,children:F.map(B=>i.jsx("option",{value:B.value,children:B.label},B.value))})]})]})});Ba.displayName="Paginator";const Sg="ib-multiselect-25hfQ",Lg="ib-label--3iNk",Tg="ib-selectWrapper-ynskr",Fg="ib-trigger-YjOq8",Rg="ib-triggerContent-1HoxJ",Dg="ib-placeholder--QdXd",Og="ib-chips-ed2Vu",Mg="ib-chip-14OL1",Ag="ib-chipLabel-FWn04",Pg="ib-chipRemove-1KQB1",Ng="ib-moreChips-Act5V",zg="ib-triggerActions-V0s7I",Ig="ib-clearButton-ENtWi",Bg="ib-chevron-JVSzw",Wg="ib-dropdown-P8jdk",Hg="ib-searchWrapper-r8pfy",_g="ib-searchInput-2xVk8",Vg="ib-bulkActions-xRKsJ",Gg="ib-bulkActionButton-EW0RB",Ug="ib-bulkActionDivider-Ws8KL",Kg="ib-optionsList-ud6wj",Yg="ib-option-GFmLe",qg="ib-checkbox-dpNwn",Xg="ib-checkIcon-6TGZe",Qg="ib-optionLabel-4E7CB",Zg="ib-optionIcon-Thw8P",Jg="ib-noResults-XcS-Q",em="ib-errorMessage-RDr-S",re={multiselect:Sg,label:Lg,selectWrapper:Tg,trigger:Fg,triggerContent:Rg,placeholder:Dg,chips:Og,chip:Mg,chipLabel:Ag,chipRemove:Pg,moreChips:Ng,triggerActions:zg,clearButton:Ig,chevron:Bg,dropdown:Wg,searchWrapper:Hg,searchInput:_g,bulkActions:Vg,bulkActionButton:Gg,bulkActionDivider:Ug,optionsList:Kg,option:Yg,checkbox:qg,checkIcon:Xg,optionLabel:Qg,optionIcon:Zg,noResults:Jg,errorMessage:em},lo=a.forwardRef(({options:e,value:t,onChange:r,label:n,placeholder:o="Select...",disabled:s=!1,error:l=!1,errorMessage:c,size:d="md",maxDisplayedChips:u=3,clearable:f=!0,showBulkActions:h=!1,selectAllLabel:m="Select All",clearAllLabel:p="Clear All",searchable:g=!1,searchPlaceholder:v="Search...",fullWidth:y=!1,className:b,"aria-label":w,"data-testid":x},j)=>{const E=a.useId(),F=a.useRef(null),T=a.useRef(null),L=a.useRef(null),M=a.useRef(null),[k,D]=a.useState(!1),[P,R]=a.useState(""),[S,O]=a.useState(-1),N=a.useMemo(()=>e.filter(C=>t.includes(C.value)),[e,t]),A=a.useMemo(()=>{if(!g||!P)return e;const C=P.toLowerCase();return e.filter(I=>I.label.toLowerCase().includes(C))},[e,P,g]);a.useEffect(()=>{const C=I=>{F.current&&!F.current.contains(I.target)&&(D(!1),R(""),O(-1))};return document.addEventListener("mousedown",C),()=>{document.removeEventListener("mousedown",C)}},[]),a.useEffect(()=>{k&&g&&L.current&&L.current.focus()},[k,g]),a.useEffect(()=>{O(-1)},[A.length]);const W=a.useCallback(()=>{s||(D(C=>!C),R(""),O(-1))},[s]),_=a.useCallback((C,I)=>{if(I||s)return;const q=t.includes(C)?t.filter(te=>te!==C):[...t,C];r(q)},[t,r,s]),H=a.useCallback((C,I)=>{C.stopPropagation(),!s&&r(t.filter(q=>q!==I))},[t,r,s]),G=a.useCallback(C=>{C.stopPropagation(),!s&&(r([]),D(!1))},[r,s]),V=a.useCallback(C=>{if(C.stopPropagation(),s)return;const I=e.filter(q=>!q.disabled).map(q=>q.value);r(I)},[e,r,s]),U=a.useCallback(C=>{C.stopPropagation(),!s&&r([])},[r,s]),ne=a.useMemo(()=>{const C=e.filter(I=>!I.disabled);return C.length>0&&C.every(I=>t.includes(I.value))},[e,t]),ae=a.useCallback(C=>{var I;if(!s)switch(C.key){case"Enter":case" ":if(C.preventDefault(),!k)D(!0);else if(S>=0&&S<A.length){const q=A[S];q&&!q.disabled&&_(q.value,q.disabled)}break;case"Escape":C.preventDefault(),D(!1),R(""),O(-1),(I=T.current)==null||I.focus();break;case"ArrowDown":C.preventDefault(),k?O(q=>{const te=q+1;return te>=A.length?0:te}):D(!0);break;case"ArrowUp":C.preventDefault(),k&&O(q=>{const te=q-1;return te<0?A.length-1:te});break;case"Home":C.preventDefault(),k&&O(0);break;case"End":C.preventDefault(),k&&O(A.length-1);break}},[s,k,S,A,_]);a.useEffect(()=>{if(S>=0&&M.current){const I=M.current.querySelectorAll('[role="option"]')[S];I&&I.scrollIntoView({block:"nearest"})}},[S]);const Y=N.slice(0,u),oe=N.length-u,B=[re.multiselect,b].filter(Boolean).join(" ");return i.jsxs("div",{ref:C=>{F.current=C,typeof j=="function"?j(C):j&&(j.current=C)},className:B,"data-full-width":y,"data-testid":x,children:[n&&i.jsx("label",{id:`${E}-label`,className:re.label,htmlFor:`${E}-trigger`,children:n}),i.jsxs("div",{className:re.selectWrapper,children:[i.jsxs("button",{ref:T,type:"button",id:`${E}-trigger`,className:re.trigger,onClick:W,onKeyDown:ae,disabled:s,"data-size":d,"data-open":k,"data-error":l,"data-disabled":s,"aria-haspopup":"listbox","aria-expanded":k,"aria-labelledby":n?`${E}-label`:void 0,"aria-label":w||n,"aria-controls":`${E}-listbox`,"data-testid":x&&`${x}-trigger`,children:[i.jsx("div",{className:re.triggerContent,children:N.length===0?i.jsx("span",{className:re.placeholder,children:o}):i.jsxs("div",{className:re.chips,children:[Y.map(C=>i.jsxs("span",{className:re.chip,"data-size":d,children:[i.jsx("span",{className:re.chipLabel,children:C.label}),i.jsx("span",{role:"button",className:re.chipRemove,onClick:I=>H(I,C.value),onKeyDown:I=>{(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),H(I,C.value))},"aria-label":`Remove ${C.label}`,tabIndex:-1,"data-testid":x&&`${x}-chip-remove-${C.value}`,children:i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:i.jsx("path",{d:"M10.5 3.5L3.5 10.5M3.5 3.5L10.5 10.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]},C.value)),oe>0&&i.jsxs("span",{className:re.moreChips,children:["+",oe," more"]})]})}),i.jsxs("div",{className:re.triggerActions,children:[f&&N.length>0&&i.jsx("span",{role:"button",className:re.clearButton,onClick:G,onKeyDown:C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),G(C))},"aria-label":"Clear all selections",tabIndex:-1,"data-testid":x&&`${x}-clear`,children:i.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:i.jsx("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),i.jsx("span",{className:re.chevron,"data-open":k,"aria-hidden":"true",children:i.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]}),i.jsxs("div",{className:re.dropdown,"data-open":k,role:"presentation",children:[g&&i.jsx("div",{className:re.searchWrapper,children:i.jsx("input",{ref:L,type:"text",className:re.searchInput,placeholder:v,value:P,onChange:C=>R(C.target.value),onKeyDown:ae,"aria-label":"Search options","data-testid":x&&`${x}-search`})}),h&&i.jsxs("div",{className:re.bulkActions,children:[i.jsx("button",{type:"button",className:re.bulkActionButton,onClick:V,disabled:ne,"data-testid":x&&`${x}-select-all`,children:m}),i.jsx("span",{className:re.bulkActionDivider,children:"|"}),i.jsx("button",{type:"button",className:re.bulkActionButton,onClick:U,disabled:t.length===0,"data-testid":x&&`${x}-clear-all`,children:p})]}),i.jsx("ul",{ref:M,id:`${E}-listbox`,className:re.optionsList,role:"listbox","aria-multiselectable":"true","aria-labelledby":n?`${E}-label`:void 0,tabIndex:-1,children:A.length===0?i.jsx("li",{className:re.noResults,children:"No options found"}):A.map((C,I)=>{const q=t.includes(C.value),te=I===S;return i.jsxs("li",{role:"option",className:re.option,onClick:()=>_(C.value,C.disabled),onMouseEnter:()=>O(I),"data-highlighted":te,"data-disabled":C.disabled,"aria-selected":q,"aria-disabled":C.disabled,"data-testid":x&&`${x}-option-${C.value}`,children:[i.jsx("span",{className:re.checkbox,"data-checked":q,"aria-hidden":"true",children:q&&i.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:re.checkIcon,children:i.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),C.icon&&i.jsx("span",{className:re.optionIcon,"aria-hidden":"true",children:C.icon}),i.jsx("span",{className:re.optionLabel,children:C.label})]},C.value)})})]})]}),l&&c&&i.jsx("p",{className:re.errorMessage,role:"alert",children:c})]})});lo.displayName="Multiselect";const Wa={info:{iconName:"info",iconColor:"info",getTextColor:e=>e.colors.semantic.blue.base,role:void 0},assistive:{iconName:"help_outline",iconColor:"secondary",getTextColor:e=>e.colors.grey[500],role:void 0},error:{iconName:"error",iconColor:"error",getTextColor:e=>e.colors.semantic.red.base,role:"alert"},warning:{iconName:"warning",iconColor:"warning",getTextColor:e=>e.colors.semantic.orange.base,role:"status"},success:{iconName:"check_circle",iconColor:"success",getTextColor:e=>e.colors.semantic.green.base,role:"status"}},tm=$.div`
2175
2175
  margin-top: 4px;
2176
2176
  display: inline-flex;
2177
2177
  align-items: center;
@@ -2184,7 +2184,7 @@
2184
2184
  font-size: ${({theme:e,$size:t})=>t==="sm"?e.typography.fontSize.xs:e.typography.fontSize.sm};
2185
2185
  line-height: ${({theme:e})=>e.typography.lineHeight.normal};
2186
2186
  color: ${({theme:e,$variant:t})=>Wa[t].getTextColor(e)};
2187
- `;function dn({variant:e,children:t,size:r="sm",icon:n,showIcon:o=!0,className:i,"data-testid":l}){if(!t||typeof t=="string"&&t.trim()==="")return null;const c=Wa[e],d=()=>o?n?s.jsx(Di,{"aria-hidden":"true",children:n}):s.jsx(Di,{"aria-hidden":"true",children:s.jsx(J,{name:c.iconName,size:"sm",color:c.iconColor})}):null;return s.jsxs(tm,{className:i,"data-testid":l,children:[d(),s.jsx(rm,{$variant:e,$size:r,role:c.role,children:t})]})}function jt({message:e,size:t="sm",className:r,"data-testid":n}){return s.jsx(dn,{variant:"error",size:t,className:r,"data-testid":n,children:e})}function Et({message:e,className:t,"data-testid":r}){return s.jsx(dn,{variant:"assistive",size:"sm",className:t,"data-testid":r,children:e})}function nm({message:e,size:t="sm",className:r,"data-testid":n}){return s.jsx(dn,{variant:"warning",size:t,className:r,"data-testid":n,children:e})}const om=$.div`
2187
+ `;function cn({variant:e,children:t,size:r="sm",icon:n,showIcon:o=!0,className:s,"data-testid":l}){if(!t||typeof t=="string"&&t.trim()==="")return null;const c=Wa[e],d=()=>o?n?i.jsx(Di,{"aria-hidden":"true",children:n}):i.jsx(Di,{"aria-hidden":"true",children:i.jsx(J,{name:c.iconName,size:"sm",color:c.iconColor})}):null;return i.jsxs(tm,{className:s,"data-testid":l,children:[d(),i.jsx(rm,{$variant:e,$size:r,role:c.role,children:t})]})}function Ct({message:e,size:t="sm",className:r,"data-testid":n}){return i.jsx(cn,{variant:"error",size:t,className:r,"data-testid":n,children:e})}function jt({message:e,className:t,"data-testid":r}){return i.jsx(cn,{variant:"assistive",size:"sm",className:t,"data-testid":r,children:e})}function nm({message:e,size:t="sm",className:r,"data-testid":n}){return i.jsx(cn,{variant:"warning",size:t,className:r,"data-testid":n,children:e})}const om=$.div`
2188
2188
  padding-bottom: 4px;
2189
2189
  `,im=$.label`
2190
2190
  font-family: ${({theme:e})=>e.typography.fontFamily};
@@ -2197,7 +2197,7 @@
2197
2197
  `,sm=$.span`
2198
2198
  color: ${({theme:e})=>e.colors.semantic.red.base};
2199
2199
  margin-left: 2px;
2200
- `;function Wr({label:e,required:t=!1,htmlFor:r,id:n,className:o,"data-testid":i}){return!e||e.trim()===""?null:s.jsx(om,{className:o,"data-testid":i,children:s.jsxs(im,{htmlFor:r,id:n,children:[e,t&&s.jsx(sm,{"aria-hidden":"true",children:"*"})]})})}const wt={sm:{width:32,height:16,thumbSize:12,thumbMargin:2,thumbOffset:18},md:{width:40,height:20,thumbSize:16,thumbMargin:2,thumbOffset:22},lg:{width:48,height:24,thumbSize:20,thumbMargin:2,thumbOffset:26}},am=$.div`
2200
+ `;function Br({label:e,required:t=!1,htmlFor:r,id:n,className:o,"data-testid":s}){return!e||e.trim()===""?null:i.jsx(om,{className:o,"data-testid":s,children:i.jsxs(im,{htmlFor:r,id:n,children:[e,t&&i.jsx(sm,{"aria-hidden":"true",children:"*"})]})})}const yt={sm:{width:32,height:16,thumbSize:12,thumbMargin:2,thumbOffset:18},md:{width:40,height:20,thumbSize:16,thumbMargin:2,thumbOffset:22},lg:{width:48,height:24,thumbSize:20,thumbMargin:2,thumbOffset:26}},am=$.div`
2201
2201
  position: relative;
2202
2202
  display: flex;
2203
2203
  flex-direction: column;
@@ -2223,9 +2223,9 @@
2223
2223
  position: relative;
2224
2224
  display: inline-flex;
2225
2225
  align-items: center;
2226
- width: ${({$size:e})=>wt[e].width}px;
2227
- height: ${({$size:e})=>wt[e].height}px;
2228
- border-radius: ${({$size:e})=>wt[e].height/2}px;
2226
+ width: ${({$size:e})=>yt[e].width}px;
2227
+ height: ${({$size:e})=>yt[e].height}px;
2228
+ border-radius: ${({$size:e})=>yt[e].height/2}px;
2229
2229
  background-color: ${({theme:e,$checked:t})=>t?e.colors.highlight:e.colors.grey[500]};
2230
2230
  transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
2231
2231
  flex-shrink: 0;
@@ -2243,11 +2243,11 @@
2243
2243
  `}
2244
2244
  `,um=$.span`
2245
2245
  position: absolute;
2246
- width: ${({$size:e})=>wt[e].thumbSize}px;
2247
- height: ${({$size:e})=>wt[e].thumbSize}px;
2246
+ width: ${({$size:e})=>yt[e].thumbSize}px;
2247
+ height: ${({$size:e})=>yt[e].thumbSize}px;
2248
2248
  border-radius: 50%;
2249
2249
  background-color: ${({theme:e})=>e.colors.white};
2250
- margin-left: ${({$checked:e,$size:t})=>e?`${wt[t].thumbOffset}px`:`${wt[t].thumbMargin}px`};
2250
+ margin-left: ${({$checked:e,$size:t})=>e?`${yt[t].thumbOffset}px`:`${yt[t].thumbMargin}px`};
2251
2251
  transition: margin-left 0.2s ease-in-out;
2252
2252
  `,fm=$.label`
2253
2253
  font-family: ${({theme:e})=>e.typography.fontFamily};
@@ -2272,7 +2272,7 @@
2272
2272
  }
2273
2273
  `,Mi=$.div`
2274
2274
  margin-top: 4px;
2275
- `,Ha=a.forwardRef(({checked:e,defaultChecked:t=!1,onChange:r,disabled:n=!1,label:o,labelPosition:i="right",size:l="md",name:c,id:d,"aria-label":u,errorMessage:f,assistiveMessage:h,leftIcon:m,rightIcon:p,className:g,"data-testid":v},y)=>{const b=a.useId(),w=d||b,x=e!==void 0,[j,E]=a.useState(t),F=x?e:j;a.useEffect(()=>{x&&E(e)},[x,e]);const T=M=>{if(n)return;M.preventDefault(),M.stopPropagation();const k=!F;x||E(k),r==null||r(k,M)},L=M=>{n||(M.key===" "||M.key==="Enter")&&T(M)};return s.jsxs(am,{className:g,"data-testid":v,children:[s.jsxs(lm,{onClick:T,onKeyDown:L,disabled:n,labelPosition:i,role:"switch","aria-checked":F,"aria-label":o?void 0:u||"Toggle switch","aria-disabled":n,tabIndex:n?-1:0,children:[s.jsx(cm,{ref:y,type:"checkbox",id:w,name:c,checked:F,disabled:n,readOnly:!0,tabIndex:-1,"aria-hidden":"true"}),m&&s.jsx(Oi,{$disabled:n,$size:l,"aria-hidden":"true",children:m}),s.jsx(dm,{$checked:F,$disabled:n,$size:l,"data-testid":v&&`${v}-track`,children:s.jsx(um,{$checked:F,$size:l})}),p&&s.jsx(Oi,{$disabled:n,$size:l,"aria-hidden":"true",children:p}),o&&s.jsx(fm,{htmlFor:w,$disabled:n,children:o})]}),f&&s.jsx(Mi,{children:s.jsx(jt,{message:f})}),h&&!f&&s.jsx(Mi,{children:s.jsx(Et,{message:h})})]})});Ha.displayName="Switch";const pm=$.div`
2275
+ `,Ha=a.forwardRef(({checked:e,defaultChecked:t=!1,onChange:r,disabled:n=!1,label:o,labelPosition:s="right",size:l="md",name:c,id:d,"aria-label":u,errorMessage:f,assistiveMessage:h,leftIcon:m,rightIcon:p,className:g,"data-testid":v},y)=>{const b=a.useId(),w=d||b,x=e!==void 0,[j,E]=a.useState(t),F=x?e:j;a.useEffect(()=>{x&&E(e)},[x,e]);const T=M=>{if(n)return;M.preventDefault(),M.stopPropagation();const k=!F;x||E(k),r==null||r(k,M)},L=M=>{n||(M.key===" "||M.key==="Enter")&&T(M)};return i.jsxs(am,{className:g,"data-testid":v,children:[i.jsxs(lm,{onClick:T,onKeyDown:L,disabled:n,labelPosition:s,role:"switch","aria-checked":F,"aria-label":o?void 0:u||"Toggle switch","aria-disabled":n,tabIndex:n?-1:0,children:[i.jsx(cm,{ref:y,type:"checkbox",id:w,name:c,checked:F,disabled:n,readOnly:!0,tabIndex:-1,"aria-hidden":"true"}),m&&i.jsx(Oi,{$disabled:n,$size:l,"aria-hidden":"true",children:m}),i.jsx(dm,{$checked:F,$disabled:n,$size:l,"data-testid":v&&`${v}-track`,children:i.jsx(um,{$checked:F,$size:l})}),p&&i.jsx(Oi,{$disabled:n,$size:l,"aria-hidden":"true",children:p}),o&&i.jsx(fm,{htmlFor:w,$disabled:n,children:o})]}),f&&i.jsx(Mi,{children:i.jsx(Ct,{message:f})}),h&&!f&&i.jsx(Mi,{children:i.jsx(jt,{message:h})})]})});Ha.displayName="Switch";const pm=$.div`
2276
2276
  display: flex;
2277
2277
  align-items: center;
2278
2278
  gap: 8px;
@@ -2348,7 +2348,7 @@
2348
2348
  `,Ai=$.div`
2349
2349
  margin-left: 30px;
2350
2350
  margin-top: 2px;
2351
- `,_a=a.forwardRef(({value:e,label:t,labelPosition:r="right",checked:n=!1,disabled:o=!1,error:i=!1,name:l,id:c,"aria-label":d,onChange:u,tabIndex:f,errorMessage:h,assistiveMessage:m,className:p,"data-testid":g},v)=>{const y=a.useId(),b=c||y,w=`${b}-label`,x=!!t,j=f!==void 0?f:o?-1:0,E=T=>{o||(T.preventDefault(),T.stopPropagation(),u==null||u(T,!n))},F=T=>{o||(T.key===" "||T.key==="Enter")&&(T.preventDefault(),T.stopPropagation(),u==null||u(T,!n))};return s.jsxs(xm,{className:p,"data-testid":g,children:[s.jsxs(pm,{ref:v,role:"radio","aria-checked":n,"aria-disabled":o,"aria-labelledby":x?w:void 0,"aria-label":x?void 0:d||"Radio option",tabIndex:j,onClick:E,onKeyDown:F,$disabled:o,$labelPosition:r,"data-testid":g&&`${g}-container`,children:[s.jsx(hm,{type:"radio",id:b,name:l,value:String(e),checked:n,disabled:o,readOnly:!0,tabIndex:-1,"aria-hidden":"true"}),s.jsx(gm,{$checked:n,$disabled:o,$error:i,"data-testid":g&&`${g}-ring`,children:s.jsx(mm,{$checked:n,$disabled:o,$error:i})}),t&&s.jsx(bm,{id:w,htmlFor:b,$disabled:o,$labelPosition:r,children:t})]}),h&&i&&s.jsx(Ai,{children:s.jsx(jt,{message:h})}),m&&!h&&s.jsx(Ai,{children:s.jsx(Et,{message:m})})]})});_a.displayName="Radio";const Va=a.memo(_a),vm=$.fieldset`
2351
+ `,_a=a.forwardRef(({value:e,label:t,labelPosition:r="right",checked:n=!1,disabled:o=!1,error:s=!1,name:l,id:c,"aria-label":d,onChange:u,tabIndex:f,errorMessage:h,assistiveMessage:m,className:p,"data-testid":g},v)=>{const y=a.useId(),b=c||y,w=`${b}-label`,x=!!t,j=f!==void 0?f:o?-1:0,E=T=>{o||(T.preventDefault(),T.stopPropagation(),u==null||u(T,!n))},F=T=>{o||(T.key===" "||T.key==="Enter")&&(T.preventDefault(),T.stopPropagation(),u==null||u(T,!n))};return i.jsxs(xm,{className:p,"data-testid":g,children:[i.jsxs(pm,{ref:v,role:"radio","aria-checked":n,"aria-disabled":o,"aria-labelledby":x?w:void 0,"aria-label":x?void 0:d||"Radio option",tabIndex:j,onClick:E,onKeyDown:F,$disabled:o,$labelPosition:r,"data-testid":g&&`${g}-container`,children:[i.jsx(hm,{type:"radio",id:b,name:l,value:String(e),checked:n,disabled:o,readOnly:!0,tabIndex:-1,"aria-hidden":"true"}),i.jsx(gm,{$checked:n,$disabled:o,$error:s,"data-testid":g&&`${g}-ring`,children:i.jsx(mm,{$checked:n,$disabled:o,$error:s})}),t&&i.jsx(bm,{id:w,htmlFor:b,$disabled:o,$labelPosition:r,children:t})]}),h&&s&&i.jsx(Ai,{children:i.jsx(Ct,{message:h})}),m&&!h&&i.jsx(Ai,{children:i.jsx(jt,{message:m})})]})});_a.displayName="Radio";const Va=a.memo(_a),vm=$.fieldset`
2352
2352
  border: none;
2353
2353
  padding: 0;
2354
2354
  margin: 0;
@@ -2359,17 +2359,17 @@
2359
2359
  font-size: ${({theme:e})=>e.typography.fontSize.sm};
2360
2360
  font-weight: ${({theme:e})=>e.typography.fontWeight.medium};
2361
2361
  color: ${({theme:e})=>e.colors.grey[700]};
2362
- `,wm=$.span`
2362
+ `,$m=$.span`
2363
2363
  color: ${({theme:e})=>e.colors.highlight};
2364
2364
  margin-left: 2px;
2365
- `,$m=$.div`
2365
+ `,wm=$.div`
2366
2366
  display: flex;
2367
2367
  gap: 8px;
2368
2368
  flex-direction: ${({$orientation:e})=>e==="horizontal"?"row":"column"};
2369
2369
  flex-wrap: ${({$orientation:e})=>e==="horizontal"?"wrap":"nowrap"};
2370
2370
  `,Pi=$.div`
2371
2371
  margin-top: 8px;
2372
- `,Ga=({name:e,value:t,defaultValue:r,onChange:n,options:o,disabled:i=!1,error:l=!1,orientation:c="vertical",legend:d,"aria-label":u,required:f=!1,errorMessage:h,assistiveMessage:m,className:p,"data-testid":g})=>{const v=a.useId(),y=e?`radiogroup-${e}`:`radiogroup-${v}`,b=t!==void 0,[w,x]=a.useState(r),j=b?t:w,E=a.useRef(new Map);a.useEffect(()=>{b&&x(t)},[b,t]);const F=a.useCallback((M,k)=>{b||x(M),n==null||n(M,k)},[b,n]),T=a.useCallback(M=>{const{key:k}=M,D=c==="vertical",P=D?"ArrowDown":"ArrowRight",R=D?"ArrowUp":"ArrowLeft",S=D?"ArrowRight":"ArrowDown";if(k===P||k===R||k===S||k===(D?"ArrowLeft":"ArrowUp")){M.preventDefault(),M.stopPropagation();const N=o.filter(H=>!H.disabled&&!i);if(N.length===0)return;const A=N.findIndex(H=>H.value===j);let W;k===P||k===S?W=A===-1?0:(A+1)%N.length:W=A===-1?N.length-1:(A-1+N.length)%N.length;const _=N[W];if(!_)return;F(_.value,M),setTimeout(()=>{const H=E.current.get(_.value);H==null||H.focus()},0)}},[c,o,j,F,i]),L=M=>{const k=M.findIndex(R=>R.value===j),D=M.findIndex(R=>!R.disabled&&!i),P=k!==-1?k:D;return M.map((R,S)=>{const O=S===P;return s.jsx(Va,{ref:N=>{N?E.current.set(R.value,N):E.current.delete(R.value)},value:R.value,label:R.label,checked:R.value===j,disabled:R.disabled||i,error:R.error||l,name:y,tabIndex:O?0:-1,onChange:N=>F(R.value,N),"data-testid":g&&`${g}-option-${R.id}`},R.id)})};return s.jsxs(vm,{className:p,"data-testid":g,children:[d&&s.jsxs(ym,{children:[d,f&&s.jsx(wm,{children:"*"})]}),s.jsx($m,{role:"radiogroup","aria-labelledby":d?y:void 0,"aria-label":d?void 0:u,$orientation:c,onKeyDown:T,"data-testid":g&&`${g}-group`,children:L(o)}),h&&l&&s.jsx(Pi,{children:s.jsx(jt,{message:h})}),m&&!h&&s.jsx(Pi,{children:s.jsx(Et,{message:m})})]})};Ga.displayName="RadioGroup";const km=a.memo(Ga),Cm=$.div`
2372
+ `,Ga=({name:e,value:t,defaultValue:r,onChange:n,options:o,disabled:s=!1,error:l=!1,orientation:c="vertical",legend:d,"aria-label":u,required:f=!1,errorMessage:h,assistiveMessage:m,className:p,"data-testid":g})=>{const v=a.useId(),y=e?`radiogroup-${e}`:`radiogroup-${v}`,b=t!==void 0,[w,x]=a.useState(r),j=b?t:w,E=a.useRef(new Map);a.useEffect(()=>{b&&x(t)},[b,t]);const F=a.useCallback((M,k)=>{b||x(M),n==null||n(M,k)},[b,n]),T=a.useCallback(M=>{const{key:k}=M,D=c==="vertical",P=D?"ArrowDown":"ArrowRight",R=D?"ArrowUp":"ArrowLeft",S=D?"ArrowRight":"ArrowDown";if(k===P||k===R||k===S||k===(D?"ArrowLeft":"ArrowUp")){M.preventDefault(),M.stopPropagation();const N=o.filter(H=>!H.disabled&&!s);if(N.length===0)return;const A=N.findIndex(H=>H.value===j);let W;k===P||k===S?W=A===-1?0:(A+1)%N.length:W=A===-1?N.length-1:(A-1+N.length)%N.length;const _=N[W];if(!_)return;F(_.value,M),setTimeout(()=>{const H=E.current.get(_.value);H==null||H.focus()},0)}},[c,o,j,F,s]),L=M=>{const k=M.findIndex(R=>R.value===j),D=M.findIndex(R=>!R.disabled&&!s),P=k!==-1?k:D;return M.map((R,S)=>{const O=S===P;return i.jsx(Va,{ref:N=>{N?E.current.set(R.value,N):E.current.delete(R.value)},value:R.value,label:R.label,checked:R.value===j,disabled:R.disabled||s,error:R.error||l,name:y,tabIndex:O?0:-1,onChange:N=>F(R.value,N),"data-testid":g&&`${g}-option-${R.id}`},R.id)})};return i.jsxs(vm,{className:p,"data-testid":g,children:[d&&i.jsxs(ym,{children:[d,f&&i.jsx($m,{children:"*"})]}),i.jsx(wm,{role:"radiogroup","aria-labelledby":d?y:void 0,"aria-label":d?void 0:u,$orientation:c,onKeyDown:T,"data-testid":g&&`${g}-group`,children:L(o)}),h&&l&&i.jsx(Pi,{children:i.jsx(Ct,{message:h})}),m&&!h&&i.jsx(Pi,{children:i.jsx(jt,{message:m})})]})};Ga.displayName="RadioGroup";const km=a.memo(Ga),Cm=$.div`
2373
2373
  display: flex;
2374
2374
  flex-direction: column;
2375
2375
  gap: 4px;
@@ -2428,7 +2428,7 @@
2428
2428
  }
2429
2429
  `,Ni=$.div`
2430
2430
  margin-top: 4px;
2431
- `,Ua=a.forwardRef(({value:e,defaultValue:t="",onChange:r,placeholder:n,label:o,rows:i=3,maxRows:l,disabled:c=!1,readOnly:d=!1,required:u=!1,error:f=!1,errorMessage:h,assistiveMessage:m,resize:p="vertical",noBorder:g=!1,name:v,id:y,"aria-label":b,className:w,fullWidth:x=!0,"data-testid":j,maxLength:E,onFocus:F,onBlur:T,onKeyDown:L},M)=>{const k=a.useId(),D=y||k,P=`${D}-error`,R=`${D}-assistive`,S=a.useRef(null),O=M||S,N=e!==void 0,[A,W]=a.useState(t),_=N?e:A,[H,G]=a.useState(!1),[V,U]=a.useState(i);a.useEffect(()=>{N&&W(e)},[N,e]);const ne=()=>{const C=O.current;if(!C||!l)return;C.rows=1;const B=window.getComputedStyle(C),q=parseInt(B.lineHeight.replace(/\D/g,""),10)||20,te=Math.floor(C.scrollHeight/q),se=Math.min(Math.max(te,i),l);C.rows=se,U(se)};a.useLayoutEffect(()=>{l&&ne()},[_,l]);const ae=C=>{N||W(C.target.value),l&&ne(),r==null||r(C)},Y=C=>{G(!0),F==null||F(C)},oe=C=>{G(!1),T==null||T(C)},I=[f&&h?P:void 0,!f&&m?R:void 0].filter(Boolean).join(" ");return s.jsxs(Cm,{className:w,$fullWidth:x,"data-testid":j,children:[o&&s.jsx(Wr,{label:typeof o=="string"?o:"",htmlFor:D,required:u}),s.jsx(jm,{$disabled:c,$error:f,$noBorder:g,$focused:H,"data-testid":j&&`${j}-container`,children:s.jsx(Em,{ref:O,id:D,name:v,value:_,onChange:ae,onFocus:Y,onBlur:oe,onKeyDown:L,placeholder:n,rows:l?V:i,disabled:c,readOnly:d,required:u,maxLength:E,"aria-label":o?void 0:b,"aria-invalid":f,"aria-describedby":I||void 0,"aria-required":u,$resize:l?"none":p,$disabled:c,"data-testid":j&&`${j}-input`})}),f&&h&&s.jsx(Ni,{children:s.jsx(jt,{message:h,"data-testid":j&&`${j}-error`})}),!f&&m&&s.jsx(Ni,{children:s.jsx(Et,{message:m,"data-testid":j&&`${j}-assistive`})})]})});Ua.displayName="TextArea";const zi=$.div`
2431
+ `,Ua=a.forwardRef(({value:e,defaultValue:t="",onChange:r,placeholder:n,label:o,rows:s=3,maxRows:l,disabled:c=!1,readOnly:d=!1,required:u=!1,error:f=!1,errorMessage:h,assistiveMessage:m,resize:p="vertical",noBorder:g=!1,name:v,id:y,"aria-label":b,className:w,fullWidth:x=!0,"data-testid":j,maxLength:E,onFocus:F,onBlur:T,onKeyDown:L},M)=>{const k=a.useId(),D=y||k,P=`${D}-error`,R=`${D}-assistive`,S=a.useRef(null),O=M||S,N=e!==void 0,[A,W]=a.useState(t),_=N?e:A,[H,G]=a.useState(!1),[V,U]=a.useState(s);a.useEffect(()=>{N&&W(e)},[N,e]);const ne=()=>{const C=O.current;if(!C||!l)return;C.rows=1;const I=window.getComputedStyle(C),q=parseInt(I.lineHeight.replace(/\D/g,""),10)||20,te=Math.floor(C.scrollHeight/q),se=Math.min(Math.max(te,s),l);C.rows=se,U(se)};a.useLayoutEffect(()=>{l&&ne()},[_,l]);const ae=C=>{N||W(C.target.value),l&&ne(),r==null||r(C)},Y=C=>{G(!0),F==null||F(C)},oe=C=>{G(!1),T==null||T(C)},B=[f&&h?P:void 0,!f&&m?R:void 0].filter(Boolean).join(" ");return i.jsxs(Cm,{className:w,$fullWidth:x,"data-testid":j,children:[o&&i.jsx(Br,{label:typeof o=="string"?o:"",htmlFor:D,required:u}),i.jsx(jm,{$disabled:c,$error:f,$noBorder:g,$focused:H,"data-testid":j&&`${j}-container`,children:i.jsx(Em,{ref:O,id:D,name:v,value:_,onChange:ae,onFocus:Y,onBlur:oe,onKeyDown:L,placeholder:n,rows:l?V:s,disabled:c,readOnly:d,required:u,maxLength:E,"aria-label":o?void 0:b,"aria-invalid":f,"aria-describedby":B||void 0,"aria-required":u,$resize:l?"none":p,$disabled:c,"data-testid":j&&`${j}-input`})}),f&&h&&i.jsx(Ni,{children:i.jsx(Ct,{message:h,"data-testid":j&&`${j}-error`})}),!f&&m&&i.jsx(Ni,{children:i.jsx(jt,{message:m,"data-testid":j&&`${j}-assistive`})})]})});Ua.displayName="TextArea";const zi=$.div`
2432
2432
  display: flex;
2433
2433
  flex-direction: column;
2434
2434
  ${({$fullWidth:e})=>e&&"width: 100%;"}
@@ -2439,13 +2439,13 @@
2439
2439
  align-items: center;
2440
2440
  justify-content: space-between;
2441
2441
  width: 100%;
2442
- `,Bi=$.div`
2442
+ `,Ii=$.div`
2443
2443
  display: flex;
2444
2444
  gap: 4px;
2445
2445
  align-items: center;
2446
- `,Lr=$.div`
2446
+ `,Sr=$.div`
2447
2447
  margin-top: 4px;
2448
- `,Ka=({children:e,label:t,labelFor:r,required:n=!1,error:o=!1,errorMessage:i,assistiveText:l,id:c,className:d,fullWidth:u=!0,"data-testid":f,labelRightAdornment:h,disabled:m=!1})=>{const p=a.useId(),g=r||p,v=e.props,y=v.id,b=v.disabled,w=a.cloneElement(e,{id:y||g,"aria-invalid":o||void 0,"aria-required":n||void 0,disabled:m||b});return t?s.jsxs(zi,{id:c,className:d,$fullWidth:u,"data-testid":f,children:[h?s.jsxs(Sm,{children:[s.jsx(Bi,{children:s.jsx(Wr,{label:typeof t=="string"?t:"",htmlFor:g,required:n,"data-testid":f?`${f}-label`:void 0})}),h]}):s.jsx(Bi,{children:s.jsx(Wr,{label:typeof t=="string"?t:"",htmlFor:g,required:n,"data-testid":f?`${f}-label`:void 0})}),w,o&&i&&s.jsx(Lr,{children:s.jsx(jt,{message:i,"data-testid":f?`${f}-error`:void 0})}),!o&&l&&s.jsx(Lr,{children:s.jsx(Et,{message:l,"data-testid":f?`${f}-assistive`:void 0})})]}):s.jsxs(zi,{id:c,className:d,$fullWidth:u,"data-testid":f,children:[w,o&&i&&s.jsx(Lr,{children:s.jsx(jt,{message:i,"data-testid":f?`${f}-error`:void 0})}),!o&&l&&s.jsx(Lr,{children:s.jsx(Et,{message:l,"data-testid":f?`${f}-assistive`:void 0})})]})};Ka.displayName="FormControl";const Lm=z.keyframes`
2448
+ `,Ka=({children:e,label:t,labelFor:r,required:n=!1,error:o=!1,errorMessage:s,assistiveText:l,id:c,className:d,fullWidth:u=!0,"data-testid":f,labelRightAdornment:h,disabled:m=!1})=>{const p=a.useId(),g=r||p,v=e.props,y=v.id,b=v.disabled,w=a.cloneElement(e,{id:y||g,"aria-invalid":o||void 0,"aria-required":n||void 0,disabled:m||b});return t?i.jsxs(zi,{id:c,className:d,$fullWidth:u,"data-testid":f,children:[h?i.jsxs(Sm,{children:[i.jsx(Ii,{children:i.jsx(Br,{label:typeof t=="string"?t:"",htmlFor:g,required:n,"data-testid":f?`${f}-label`:void 0})}),h]}):i.jsx(Ii,{children:i.jsx(Br,{label:typeof t=="string"?t:"",htmlFor:g,required:n,"data-testid":f?`${f}-label`:void 0})}),w,o&&s&&i.jsx(Sr,{children:i.jsx(Ct,{message:s,"data-testid":f?`${f}-error`:void 0})}),!o&&l&&i.jsx(Sr,{children:i.jsx(jt,{message:l,"data-testid":f?`${f}-assistive`:void 0})})]}):i.jsxs(zi,{id:c,className:d,$fullWidth:u,"data-testid":f,children:[w,o&&s&&i.jsx(Sr,{children:i.jsx(Ct,{message:s,"data-testid":f?`${f}-error`:void 0})}),!o&&l&&i.jsx(Sr,{children:i.jsx(jt,{message:l,"data-testid":f?`${f}-assistive`:void 0})})]})};Ka.displayName="FormControl";const Lm=z.keyframes`
2449
2449
  from {
2450
2450
  transform: translateX(100%);
2451
2451
  opacity: 0;
@@ -2568,14 +2568,14 @@
2568
2568
  outline: 2px solid currentColor;
2569
2569
  outline-offset: 2px;
2570
2570
  }
2571
- `,Nm=()=>s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),zm=()=>s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{d:"M10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M7 10L9 12L13 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Bm=()=>s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{d:"M10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M12.5 7.5L7.5 12.5M7.5 7.5L12.5 12.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Im=()=>s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{d:"M8.57465 3.21665L1.51632 14.1667C1.37079 14.4187 1.29379 14.7044 1.29298 14.9954C1.29216 15.2864 1.36756 15.5725 1.51167 15.8254C1.65579 16.0782 1.86359 16.2891 2.11422 16.4371C2.36486 16.585 2.64964 16.6647 2.94049 16.6683H17.0572C17.348 16.6647 17.6328 16.585 17.8834 16.4371C18.1341 16.2891 18.3419 16.0782 18.486 15.8254C18.6301 15.5725 18.7055 15.2864 18.7047 14.9954C18.7039 14.7044 18.6269 14.4187 18.4813 14.1667L11.423 3.21665C11.2745 2.97165 11.0653 2.76897 10.816 2.62859C10.5666 2.48821 10.2852 2.41467 9.99882 2.41467C9.71247 2.41467 9.43101 2.48821 9.18166 2.62859C8.93231 2.76897 8.72311 2.97165 8.57465 3.21665Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M10 7.5V10.8333",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M10 14.1667H10.0083",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Wm=()=>s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{d:"M10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M10 13.3333V10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M10 6.66667H10.0083",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Hm=e=>{switch(e){case"success":return s.jsx(zm,{});case"error":return s.jsx(Bm,{});case"warning":return s.jsx(Im,{});case"info":default:return s.jsx(Wm,{})}},co=a.forwardRef(({message:e,variant:t="info",action:r,onClose:n,autoHideDuration:o=5e3,open:i=!0,icon:l,showCloseButton:c=!0,isExiting:d=!1,className:u,"data-testid":f},h)=>{const m=a.useRef(null),p=a.useCallback(()=>{n&&n()},[n]);a.useEffect(()=>(i&&o!==null&&o>0&&(m.current=setTimeout(()=>{p()},o)),()=>{m.current!==null&&clearTimeout(m.current)}),[i,o,p]);const g=()=>{m.current!==null&&clearTimeout(m.current)},v=()=>{i&&o!==null&&o>0&&(m.current=setTimeout(()=>{p()},o))};if(!i&&!d)return null;const y=l!==void 0?l:Hm(t);return s.jsxs(Rm,{ref:h,variant:t,isExiting:d,className:u,role:"alert","aria-live":"polite","data-testid":f,onMouseEnter:g,onMouseLeave:v,children:[y&&s.jsx(Dm,{className:"snackbar-icon","aria-hidden":"true",children:y}),s.jsxs(Om,{children:[s.jsx(Mm,{children:e}),r&&s.jsx(Am,{onClick:r.onClick,type:"button",children:r.label})]}),c&&s.jsx(Pm,{onClick:p,type:"button","aria-label":"Close notification",children:s.jsx(Nm,{})})]})});co.displayName="Snackbar";const Ya=a.createContext(null),_m=e=>{const t={position:"fixed",zIndex:9999,display:"flex",flexDirection:"column",pointerEvents:"none"};switch(e){case"top-left":return{...t,top:16,left:16,alignItems:"flex-start"};case"top-center":return{...t,top:16,left:"50%",transform:"translateX(-50%)",alignItems:"center"};case"top-right":return{...t,top:16,right:16,alignItems:"flex-end"};case"bottom-left":return{...t,bottom:16,left:16,alignItems:"flex-start"};case"bottom-center":return{...t,bottom:16,left:"50%",transform:"translateX(-50%)",alignItems:"center"};case"bottom-right":default:return{...t,bottom:16,right:16,alignItems:"flex-end"}}},Vm=$.div`
2571
+ `,Nm=()=>i.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),zm=()=>i.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("path",{d:"M10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.jsx("path",{d:"M7 10L9 12L13 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Im=()=>i.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("path",{d:"M10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.jsx("path",{d:"M12.5 7.5L7.5 12.5M7.5 7.5L12.5 12.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Bm=()=>i.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("path",{d:"M8.57465 3.21665L1.51632 14.1667C1.37079 14.4187 1.29379 14.7044 1.29298 14.9954C1.29216 15.2864 1.36756 15.5725 1.51167 15.8254C1.65579 16.0782 1.86359 16.2891 2.11422 16.4371C2.36486 16.585 2.64964 16.6647 2.94049 16.6683H17.0572C17.348 16.6647 17.6328 16.585 17.8834 16.4371C18.1341 16.2891 18.3419 16.0782 18.486 15.8254C18.6301 15.5725 18.7055 15.2864 18.7047 14.9954C18.7039 14.7044 18.6269 14.4187 18.4813 14.1667L11.423 3.21665C11.2745 2.97165 11.0653 2.76897 10.816 2.62859C10.5666 2.48821 10.2852 2.41467 9.99882 2.41467C9.71247 2.41467 9.43101 2.48821 9.18166 2.62859C8.93231 2.76897 8.72311 2.97165 8.57465 3.21665Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.jsx("path",{d:"M10 7.5V10.8333",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.jsx("path",{d:"M10 14.1667H10.0083",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Wm=()=>i.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("path",{d:"M10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.jsx("path",{d:"M10 13.3333V10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.jsx("path",{d:"M10 6.66667H10.0083",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Hm=e=>{switch(e){case"success":return i.jsx(zm,{});case"error":return i.jsx(Im,{});case"warning":return i.jsx(Bm,{});case"info":default:return i.jsx(Wm,{})}},co=a.forwardRef(({message:e,variant:t="info",action:r,onClose:n,autoHideDuration:o=5e3,open:s=!0,icon:l,showCloseButton:c=!0,isExiting:d=!1,className:u,"data-testid":f},h)=>{const m=a.useRef(null),p=a.useCallback(()=>{n&&n()},[n]);a.useEffect(()=>(s&&o!==null&&o>0&&(m.current=setTimeout(()=>{p()},o)),()=>{m.current!==null&&clearTimeout(m.current)}),[s,o,p]);const g=()=>{m.current!==null&&clearTimeout(m.current)},v=()=>{s&&o!==null&&o>0&&(m.current=setTimeout(()=>{p()},o))};if(!s&&!d)return null;const y=l!==void 0?l:Hm(t);return i.jsxs(Rm,{ref:h,variant:t,isExiting:d,className:u,role:"alert","aria-live":"polite","data-testid":f,onMouseEnter:g,onMouseLeave:v,children:[y&&i.jsx(Dm,{className:"snackbar-icon","aria-hidden":"true",children:y}),i.jsxs(Om,{children:[i.jsx(Mm,{children:e}),r&&i.jsx(Am,{onClick:r.onClick,type:"button",children:r.label})]}),c&&i.jsx(Pm,{onClick:p,type:"button","aria-label":"Close notification",children:i.jsx(Nm,{})})]})});co.displayName="Snackbar";const Ya=a.createContext(null),_m=e=>{const t={position:"fixed",zIndex:9999,display:"flex",flexDirection:"column",pointerEvents:"none"};switch(e){case"top-left":return{...t,top:16,left:16,alignItems:"flex-start"};case"top-center":return{...t,top:16,left:"50%",transform:"translateX(-50%)",alignItems:"center"};case"top-right":return{...t,top:16,right:16,alignItems:"flex-end"};case"bottom-left":return{...t,bottom:16,left:16,alignItems:"flex-start"};case"bottom-center":return{...t,bottom:16,left:"50%",transform:"translateX(-50%)",alignItems:"center"};case"bottom-right":default:return{...t,bottom:16,right:16,alignItems:"flex-end"}}},Vm=$.div`
2572
2572
  ${e=>_m(e.position)}
2573
2573
  gap: ${e=>e.spacing}px;
2574
2574
 
2575
2575
  & > * {
2576
2576
  pointer-events: auto;
2577
2577
  }
2578
- `;let Ii=0;const Gm=()=>(Ii+=1,`snackbar-${Ii}`),qa=({children:e,maxSnackbars:t=5,position:r="bottom-right",defaultAutoHideDuration:n=5e3,spacing:o=8})=>{const[i,l]=a.useState([]),[c,d]=a.useState(null);a.useState(()=>{typeof document<"u"&&d(document.body)});const u=a.useCallback(b=>{l(w=>w.map(x=>x.id===b?{...x,isExiting:!0}:x)),setTimeout(()=>{l(w=>w.filter(x=>x.id!==b))},300)},[]),f=a.useCallback(b=>{const w=b.key||Gm();return b.key?(l(x=>{const j=x.findIndex(F=>F.id===b.key);if(j!==-1){const F=[...x];return F[j]={...b,id:w,autoHideDuration:b.autoHideDuration??n,isExiting:!1},F}const E=[...x,{...b,id:w,autoHideDuration:b.autoHideDuration??n}];return E.length>t?E.slice(-t):E}),w):(l(x=>{const j=[...x,{...b,id:w,autoHideDuration:b.autoHideDuration??n}];return j.length>t?j.slice(-t):j}),w)},[t,n]),h=a.useCallback(()=>{l(b=>b.map(w=>({...w,isExiting:!0}))),setTimeout(()=>{l([])},300)},[]),m=a.useCallback((b,w)=>f({...w,message:b,variant:"success"}),[f]),p=a.useCallback((b,w)=>f({...w,message:b,variant:"error"}),[f]),g=a.useCallback((b,w)=>f({...w,message:b,variant:"warning"}),[f]),v=a.useCallback((b,w)=>f({...w,message:b,variant:"info"}),[f]),y=a.useMemo(()=>({addSnackbar:f,removeSnackbar:u,clearAll:h,success:m,error:p,warning:g,info:v}),[f,u,h,m,p,g,v]);return s.jsxs(Ya.Provider,{value:y,children:[e,c&&He.createPortal(s.jsx(Vm,{position:r,spacing:o,"data-testid":"snackbar-stack",role:"region","aria-label":"Notifications",children:i.map(b=>s.jsx(co,{message:b.message,variant:b.variant,action:b.action,autoHideDuration:b.autoHideDuration,icon:b.icon,showCloseButton:b.showCloseButton,isExiting:b.isExiting,onClose:()=>u(b.id),"data-testid":b["data-testid"]||`snackbar-${b.id}`,open:!0},b.id))}),c)]})},Um=()=>{const e=a.useContext(Ya);if(!e)throw new Error("useSnackbar must be used within a SnackbarProvider");return e};qa.displayName="SnackbarProvider";const Km=e=>{switch(e){case"small":return z.css`
2578
+ `;let Bi=0;const Gm=()=>(Bi+=1,`snackbar-${Bi}`),qa=({children:e,maxSnackbars:t=5,position:r="bottom-right",defaultAutoHideDuration:n=5e3,spacing:o=8})=>{const[s,l]=a.useState([]),[c,d]=a.useState(null);a.useState(()=>{typeof document<"u"&&d(document.body)});const u=a.useCallback(b=>{l(w=>w.map(x=>x.id===b?{...x,isExiting:!0}:x)),setTimeout(()=>{l(w=>w.filter(x=>x.id!==b))},300)},[]),f=a.useCallback(b=>{const w=b.key||Gm();return b.key?(l(x=>{const j=x.findIndex(F=>F.id===b.key);if(j!==-1){const F=[...x];return F[j]={...b,id:w,autoHideDuration:b.autoHideDuration??n,isExiting:!1},F}const E=[...x,{...b,id:w,autoHideDuration:b.autoHideDuration??n}];return E.length>t?E.slice(-t):E}),w):(l(x=>{const j=[...x,{...b,id:w,autoHideDuration:b.autoHideDuration??n}];return j.length>t?j.slice(-t):j}),w)},[t,n]),h=a.useCallback(()=>{l(b=>b.map(w=>({...w,isExiting:!0}))),setTimeout(()=>{l([])},300)},[]),m=a.useCallback((b,w)=>f({...w,message:b,variant:"success"}),[f]),p=a.useCallback((b,w)=>f({...w,message:b,variant:"error"}),[f]),g=a.useCallback((b,w)=>f({...w,message:b,variant:"warning"}),[f]),v=a.useCallback((b,w)=>f({...w,message:b,variant:"info"}),[f]),y=a.useMemo(()=>({addSnackbar:f,removeSnackbar:u,clearAll:h,success:m,error:p,warning:g,info:v}),[f,u,h,m,p,g,v]);return i.jsxs(Ya.Provider,{value:y,children:[e,c&&He.createPortal(i.jsx(Vm,{position:r,spacing:o,"data-testid":"snackbar-stack",role:"region","aria-label":"Notifications",children:s.map(b=>i.jsx(co,{message:b.message,variant:b.variant,action:b.action,autoHideDuration:b.autoHideDuration,icon:b.icon,showCloseButton:b.showCloseButton,isExiting:b.isExiting,onClose:()=>u(b.id),"data-testid":b["data-testid"]||`snackbar-${b.id}`,open:!0},b.id))}),c)]})},Um=()=>{const e=a.useContext(Ya);if(!e)throw new Error("useSnackbar must be used within a SnackbarProvider");return e};qa.displayName="SnackbarProvider";const Km=e=>{switch(e){case"small":return z.css`
2579
2579
  height: 24px;
2580
2580
  font-size: 12px;
2581
2581
  padding: 0 8px;
@@ -2848,7 +2848,7 @@
2848
2848
  width: 100%;
2849
2849
  height: 100%;
2850
2850
  }
2851
- `,tb=()=>s.jsx("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Xa=a.forwardRef(({label:e,onDelete:t,variant:r="filled",color:n="default",size:o="medium",icon:i,avatar:l,disabled:c=!1,clickable:d=!1,onClick:u,className:f,"data-testid":h},m)=>{const p=d||!!u,g=!!t,v=()=>{!c&&u&&u()},y=w=>{w.stopPropagation(),!c&&t&&t()},b=w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),v())};return s.jsxs(Xm,{ref:m,variant:r,color:n,size:o,clickable:p,hasDelete:g,isDisabled:c,className:f,onClick:v,onKeyDown:p?b:void 0,tabIndex:p&&!c?0:void 0,role:p?"button":void 0,"aria-disabled":c||void 0,"data-testid":h,children:[l&&s.jsx(Zm,{className:"chip-avatar","aria-hidden":"true",children:l}),!l&&i&&s.jsx(Qm,{className:"chip-icon","aria-hidden":"true",children:i}),s.jsx(Jm,{children:e}),t&&s.jsx(eb,{className:"chip-delete",onClick:y,type:"button","aria-label":"Remove",disabled:c,children:s.jsx(tb,{})})]})});Xa.displayName="Chip";const rb=z.keyframes`
2851
+ `,tb=()=>i.jsx("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Xa=a.forwardRef(({label:e,onDelete:t,variant:r="filled",color:n="default",size:o="medium",icon:s,avatar:l,disabled:c=!1,clickable:d=!1,onClick:u,className:f,"data-testid":h},m)=>{const p=d||!!u,g=!!t,v=()=>{!c&&u&&u()},y=w=>{w.stopPropagation(),!c&&t&&t()},b=w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),v())};return i.jsxs(Xm,{ref:m,variant:r,color:n,size:o,clickable:p,hasDelete:g,isDisabled:c,className:f,onClick:v,onKeyDown:p?b:void 0,tabIndex:p&&!c?0:void 0,role:p?"button":void 0,"aria-disabled":c||void 0,"data-testid":h,children:[l&&i.jsx(Zm,{className:"chip-avatar","aria-hidden":"true",children:l}),!l&&s&&i.jsx(Qm,{className:"chip-icon","aria-hidden":"true",children:s}),i.jsx(Jm,{children:e}),t&&i.jsx(eb,{className:"chip-delete",onClick:y,type:"button","aria-label":"Remove",disabled:c,children:i.jsx(tb,{})})]})});Xa.displayName="Chip";const rb=z.keyframes`
2852
2852
  0%, 100% {
2853
2853
  opacity: 1;
2854
2854
  }
@@ -2961,7 +2961,7 @@
2961
2961
  overflow: hidden;
2962
2962
  text-overflow: ellipsis;
2963
2963
  white-space: nowrap;
2964
- `,db=()=>s.jsx("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M13.5 4.5L6.5 11.5L3 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),ub=()=>s.jsx("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),fb=()=>s.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{d:"M8 5.5V8.5M8 11H8.01",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M6.86 2.57L1.21 12.29C1.07 12.54 1 12.82 1 13.12C1 13.41 1.07 13.69 1.21 13.94C1.35 14.19 1.55 14.41 1.79 14.56C2.03 14.72 2.31 14.8 2.6 14.8H13.4C13.69 14.8 13.97 14.72 14.21 14.56C14.45 14.41 14.65 14.19 14.79 13.94C14.93 13.69 15 13.41 15 13.12C15 12.82 14.93 12.54 14.79 12.29L9.14 2.57C9 2.32 8.8 2.12 8.56 1.98C8.32 1.84 8.05 1.77 7.77 1.77C7.49 1.77 7.22 1.84 6.98 1.98C6.74 2.12 6.54 2.32 6.4 2.57H6.86Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),pb=()=>s.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"2"}),s.jsx("path",{d:"M8 4V8L10.5 10.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),hb=()=>s.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"2"}),s.jsx("path",{d:"M8 7V11M8 5H8.01",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),gb=()=>s.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"2"}),s.jsx("path",{d:"M5 8H11",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),mb=e=>{switch(e){case"success":return s.jsx(db,{});case"error":return s.jsx(ub,{});case"warning":return s.jsx(fb,{});case"pending":return s.jsx(pb,{});case"info":return s.jsx(hb,{});case"neutral":default:return s.jsx(gb,{})}},Qa=a.forwardRef(({type:e,label:t,size:r="medium",variant:n="filled",icon:o,showIcon:i=!0,pulse:l=!1,className:c,"data-testid":d},u)=>{const f=o!==void 0?o:mb(e),h=l||e==="pending";return s.jsxs(sb,{ref:u,type:e,size:r,variant:n,isPulsing:h&&n!=="dot",className:c,"data-testid":d,children:[n==="dot"?s.jsx(ab,{className:"status-dot"}):i&&f&&s.jsx(lb,{className:"status-icon","aria-hidden":"true",children:f}),t&&s.jsx(cb,{children:t})]})});Qa.displayName="Status";const bb=z.keyframes`
2964
+ `,db=()=>i.jsx("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{d:"M13.5 4.5L6.5 11.5L3 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),ub=()=>i.jsx("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),fb=()=>i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("path",{d:"M8 5.5V8.5M8 11H8.01",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.jsx("path",{d:"M6.86 2.57L1.21 12.29C1.07 12.54 1 12.82 1 13.12C1 13.41 1.07 13.69 1.21 13.94C1.35 14.19 1.55 14.41 1.79 14.56C2.03 14.72 2.31 14.8 2.6 14.8H13.4C13.69 14.8 13.97 14.72 14.21 14.56C14.45 14.41 14.65 14.19 14.79 13.94C14.93 13.69 15 13.41 15 13.12C15 12.82 14.93 12.54 14.79 12.29L9.14 2.57C9 2.32 8.8 2.12 8.56 1.98C8.32 1.84 8.05 1.77 7.77 1.77C7.49 1.77 7.22 1.84 6.98 1.98C6.74 2.12 6.54 2.32 6.4 2.57H6.86Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),pb=()=>i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"2"}),i.jsx("path",{d:"M8 4V8L10.5 10.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),hb=()=>i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"2"}),i.jsx("path",{d:"M8 7V11M8 5H8.01",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),gb=()=>i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"2"}),i.jsx("path",{d:"M5 8H11",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),mb=e=>{switch(e){case"success":return i.jsx(db,{});case"error":return i.jsx(ub,{});case"warning":return i.jsx(fb,{});case"pending":return i.jsx(pb,{});case"info":return i.jsx(hb,{});case"neutral":default:return i.jsx(gb,{})}},Qa=a.forwardRef(({type:e,label:t,size:r="medium",variant:n="filled",icon:o,showIcon:s=!0,pulse:l=!1,className:c,"data-testid":d},u)=>{const f=o!==void 0?o:mb(e),h=l||e==="pending";return i.jsxs(sb,{ref:u,type:e,size:r,variant:n,isPulsing:h&&n!=="dot",className:c,"data-testid":d,children:[n==="dot"?i.jsx(ab,{className:"status-dot"}):s&&f&&i.jsx(lb,{className:"status-icon","aria-hidden":"true",children:f}),t&&i.jsx(cb,{children:t})]})});Qa.displayName="Status";const bb=z.keyframes`
2965
2965
  0% {
2966
2966
  left: -40%;
2967
2967
  right: 100%;
@@ -3000,7 +3000,7 @@
3000
3000
  opacity: 1;
3001
3001
  background-position: -200px -23px;
3002
3002
  }
3003
- `,yb=e=>{switch(e){case"success":return"var(--ib-color-green-500, #22c55e)";case"error":return"var(--ib-color-red-500, #ef4444)";case"warning":return"var(--ib-color-orange-500, #f97316)";case"info":return"var(--ib-color-blue-400, #60a5fa)";case"primary":default:return"var(--ib-color-blue-500, #3b82f6)"}},wb=e=>{switch(e){case"success":return"var(--ib-color-green-100, #dcfce7)";case"error":return"var(--ib-color-red-100, #fee2e2)";case"warning":return"var(--ib-color-orange-100, #ffedd5)";case"info":return"var(--ib-color-blue-100, #dbeafe)";case"primary":default:return"var(--ib-color-blue-100, #dbeafe)"}},$b=e=>{switch(e){case"small":return z.css`
3003
+ `,yb=e=>{switch(e){case"success":return"var(--ib-color-green-500, #22c55e)";case"error":return"var(--ib-color-red-500, #ef4444)";case"warning":return"var(--ib-color-orange-500, #f97316)";case"info":return"var(--ib-color-blue-400, #60a5fa)";case"primary":default:return"var(--ib-color-blue-500, #3b82f6)"}},$b=e=>{switch(e){case"success":return"var(--ib-color-green-100, #dcfce7)";case"error":return"var(--ib-color-red-100, #fee2e2)";case"warning":return"var(--ib-color-orange-100, #ffedd5)";case"info":return"var(--ib-color-blue-100, #dbeafe)";case"primary":default:return"var(--ib-color-blue-100, #dbeafe)"}},wb=e=>{switch(e){case"small":return z.css`
3004
3004
  height: 4px;
3005
3005
  `;case"large":return z.css`
3006
3006
  height: 12px;
@@ -3018,7 +3018,7 @@
3018
3018
  width: 100%;
3019
3019
  background-color: ${e=>e.bgColor};
3020
3020
 
3021
- ${e=>$b(e.size)}
3021
+ ${e=>wb(e.size)}
3022
3022
  `,jb=$.div`
3023
3023
  position: absolute;
3024
3024
  top: 0;
@@ -3064,7 +3064,7 @@
3064
3064
  font-size: 12px;
3065
3065
  font-weight: 500;
3066
3066
  color: var(--ib-color-grey-700, #374151);
3067
- `,Za=a.forwardRef(({value:e=0,variant:t="indeterminate",color:r="primary",size:n="medium",showLabel:o=!1,label:i,buffer:l,className:c,"data-testid":d},u)=>{const f=yb(r),h=wb(r),m=Math.min(100,Math.max(0,e)),p=l!==void 0&&t==="determinate";return s.jsxs(kb,{ref:u,className:c,"data-testid":d,children:[o&&s.jsxs(Lb,{children:[s.jsx(Tb,{children:i}),t==="determinate"&&s.jsxs(Fb,{children:[Math.round(m),"%"]})]}),s.jsxs(Cb,{size:n,bgColor:h,role:"progressbar","aria-valuenow":t==="determinate"?m:void 0,"aria-valuemin":0,"aria-valuemax":100,children:[p&&s.jsx(Sb,{bgColor:h,bufferValue:Math.min(100,Math.max(0,l))}),s.jsx(jb,{variant:t,progressColor:f,value:m}),t==="indeterminate"&&s.jsx(Eb,{progressColor:f})]})]})});Za.displayName="LinearLoading";const Rb=$.div`
3067
+ `,Za=a.forwardRef(({value:e=0,variant:t="indeterminate",color:r="primary",size:n="medium",showLabel:o=!1,label:s,buffer:l,className:c,"data-testid":d},u)=>{const f=yb(r),h=$b(r),m=Math.min(100,Math.max(0,e)),p=l!==void 0&&t==="determinate";return i.jsxs(kb,{ref:u,className:c,"data-testid":d,children:[o&&i.jsxs(Lb,{children:[i.jsx(Tb,{children:s}),t==="determinate"&&i.jsxs(Fb,{children:[Math.round(m),"%"]})]}),i.jsxs(Cb,{size:n,bgColor:h,role:"progressbar","aria-valuenow":t==="determinate"?m:void 0,"aria-valuemin":0,"aria-valuemax":100,children:[p&&i.jsx(Sb,{bgColor:h,bufferValue:Math.min(100,Math.max(0,l))}),i.jsx(jb,{variant:t,progressColor:f,value:m}),t==="indeterminate"&&i.jsx(Eb,{progressColor:f})]})]})});Za.displayName="LinearLoading";const Rb=$.div`
3068
3068
  position: fixed;
3069
3069
  inset: 0;
3070
3070
  z-index: ${({$zIndex:e})=>e};
@@ -3085,7 +3085,7 @@
3085
3085
  position: relative;
3086
3086
  z-index: 1;
3087
3087
  outline: none;
3088
- `,Wi=e=>{const t=["button:not([disabled])","a[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])','[contenteditable="true"]'].join(", ");return Array.from(e.querySelectorAll(t))},Ja=a.forwardRef(({open:e,onClose:t,transparent:r=!1,zIndex:n=1e3,children:o,closeOnBackdropClick:i=!0,closeOnEscape:l=!0,enableFocusTrap:c=!1,initialFocusRef:d,portalContainer:u,className:f,"data-testid":h,"aria-label":m,"aria-labelledby":p,onMount:g},v)=>{const y=a.useRef(null),b=a.useRef(null),w=a.useRef(null),x=a.useCallback(T=>{y.current=T,typeof v=="function"?v(T):v&&(v.current=T)},[v]),j=a.useCallback(T=>{T.target===T.currentTarget&&i&&t&&t()},[i,t]);if(a.useEffect(()=>{if(!e||!l)return;const T=L=>{L.key==="Escape"&&(L.preventDefault(),t==null||t())};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[e,l,t]),a.useEffect(()=>e?(w.current=document.activeElement,requestAnimationFrame(()=>{if(d!=null&&d.current)d.current.focus();else if(b.current){const M=Wi(b.current)[0];M?M.focus():b.current.focus()}}),()=>{w.current instanceof HTMLElement&&w.current.focus()}):void 0,[e,d]),a.useEffect(()=>{if(!e||!c||!b.current)return;const T=L=>{if(L.key!=="Tab"||!b.current)return;const M=Wi(b.current);if(M.length===0)return;const k=M[0],D=M[M.length-1];!k||!D||(L.shiftKey?document.activeElement===k&&(L.preventDefault(),D.focus()):document.activeElement===D&&(L.preventDefault(),k.focus()))};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[e,c]),a.useEffect(()=>{if(!e)return;const T=document.body.style.overflow,L=document.body.style.paddingRight,M=window.innerWidth-document.documentElement.clientWidth;return document.body.style.overflow="hidden",M>0&&(document.body.style.paddingRight=`${M}px`),()=>{document.body.style.overflow=T,document.body.style.paddingRight=L}},[e]),a.useEffect(()=>{e&&y.current&&g&&g(y.current)},[e,g]),!e)return null;const E=s.jsx(Rb,{ref:x,role:"presentation",onClick:j,className:f,$transparent:r,$zIndex:n,$isOpen:e,"data-testid":h,children:s.jsx(Db,{ref:b,role:"dialog","aria-modal":c,"aria-label":m,"aria-labelledby":p,tabIndex:-1,"data-testid":h?`${h}-content`:void 0,children:o})}),F=u??document.body;return He.createPortal(E,F)});Ja.displayName="Overlay";function uo(e){return"type"in e&&e.type==="divider"}function fo(e){return"isHeader"in e&&e.isHeader===!0}function el(e){return!uo(e)&&!fo(e)}const Ob=$.div`
3088
+ `,Wi=e=>{const t=["button:not([disabled])","a[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])','[contenteditable="true"]'].join(", ");return Array.from(e.querySelectorAll(t))},Ja=a.forwardRef(({open:e,onClose:t,transparent:r=!1,zIndex:n=1e3,children:o,closeOnBackdropClick:s=!0,closeOnEscape:l=!0,enableFocusTrap:c=!1,initialFocusRef:d,portalContainer:u,className:f,"data-testid":h,"aria-label":m,"aria-labelledby":p,onMount:g},v)=>{const y=a.useRef(null),b=a.useRef(null),w=a.useRef(null),x=a.useCallback(T=>{y.current=T,typeof v=="function"?v(T):v&&(v.current=T)},[v]),j=a.useCallback(T=>{T.target===T.currentTarget&&s&&t&&t()},[s,t]);if(a.useEffect(()=>{if(!e||!l)return;const T=L=>{L.key==="Escape"&&(L.preventDefault(),t==null||t())};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[e,l,t]),a.useEffect(()=>e?(w.current=document.activeElement,requestAnimationFrame(()=>{if(d!=null&&d.current)d.current.focus();else if(b.current){const M=Wi(b.current)[0];M?M.focus():b.current.focus()}}),()=>{w.current instanceof HTMLElement&&w.current.focus()}):void 0,[e,d]),a.useEffect(()=>{if(!e||!c||!b.current)return;const T=L=>{if(L.key!=="Tab"||!b.current)return;const M=Wi(b.current);if(M.length===0)return;const k=M[0],D=M[M.length-1];!k||!D||(L.shiftKey?document.activeElement===k&&(L.preventDefault(),D.focus()):document.activeElement===D&&(L.preventDefault(),k.focus()))};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[e,c]),a.useEffect(()=>{if(!e)return;const T=document.body.style.overflow,L=document.body.style.paddingRight,M=window.innerWidth-document.documentElement.clientWidth;return document.body.style.overflow="hidden",M>0&&(document.body.style.paddingRight=`${M}px`),()=>{document.body.style.overflow=T,document.body.style.paddingRight=L}},[e]),a.useEffect(()=>{e&&y.current&&g&&g(y.current)},[e,g]),!e)return null;const E=i.jsx(Rb,{ref:x,role:"presentation",onClick:j,className:f,$transparent:r,$zIndex:n,$isOpen:e,"data-testid":h,children:i.jsx(Db,{ref:b,role:"dialog","aria-modal":c,"aria-label":m,"aria-labelledby":p,tabIndex:-1,"data-testid":h?`${h}-content`:void 0,children:o})}),F=u??document.body;return He.createPortal(E,F)});Ja.displayName="Overlay";function uo(e){return"type"in e&&e.type==="divider"}function fo(e){return"isHeader"in e&&e.isHeader===!0}function el(e){return!uo(e)&&!fo(e)}const Ob=$.div`
3089
3089
  position: relative;
3090
3090
  display: inline-block;
3091
3091
  `,Mb=$.div`
@@ -3115,7 +3115,7 @@
3115
3115
  outline: 2px solid ${({theme:e})=>e.colors.highlight};
3116
3116
  outline-offset: 2px;
3117
3117
  }
3118
- `,Pb=()=>s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:[s.jsx("circle",{cx:"12",cy:"5",r:"2"}),s.jsx("circle",{cx:"12",cy:"12",r:"2"}),s.jsx("circle",{cx:"12",cy:"19",r:"2"})]}),Nb=e=>{switch(e){case"bottom-end":return`
3118
+ `,Pb=()=>i.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:[i.jsx("circle",{cx:"12",cy:"5",r:"2"}),i.jsx("circle",{cx:"12",cy:"12",r:"2"}),i.jsx("circle",{cx:"12",cy:"19",r:"2"})]}),Nb=e=>{switch(e){case"bottom-end":return`
3119
3119
  top: 100%;
3120
3120
  right: 0;
3121
3121
  margin-top: 4px;
@@ -3149,7 +3149,7 @@
3149
3149
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
3150
3150
 
3151
3151
  overflow: hidden;
3152
- `,Bb=$.div`
3152
+ `,Ib=$.div`
3153
3153
  display: flex;
3154
3154
  align-items: center;
3155
3155
  background: ${({theme:e})=>e.colors.grey[100]};
@@ -3157,7 +3157,7 @@
3157
3157
  padding-left: 12px;
3158
3158
  border-top-left-radius: ${({theme:e})=>e.borders.radius.sm};
3159
3159
  border-top-right-radius: ${({theme:e})=>e.borders.radius.sm};
3160
- `,Ib=$.div`
3160
+ `,Bb=$.div`
3161
3161
  display: flex;
3162
3162
  align-items: center;
3163
3163
  background: ${({theme:e})=>e.colors.grey[100]};
@@ -3221,7 +3221,7 @@
3221
3221
  height: 1px;
3222
3222
  margin: 4px 0;
3223
3223
  background-color: ${({theme:e})=>e.colors.border.light};
3224
- `,un=a.forwardRef(({items:e,trigger:t,open:r,onOpenChange:n,placement:o="bottom-end",disabled:i=!1,type:l="action",title:c,buttonSize:d="md",inverse:u=!1,menuListWidth:f,menuListHeight:h,menuItemHeight:m,useContainerWidth:p=!1,buttonTabIndex:g,onOpen:v,onClose:y,className:b,"data-testid":w,menuDataId:x,menuButtonDataId:j,"aria-label":E="Menu"},F)=>{const[T,L]=a.useState(!1),[M,k]=a.useState(-1),[D,P]=a.useState(!1),R=r!==void 0,S=R?r:T,O=a.useRef(null),N=a.useRef(null),A=a.useRef(null),W=a.useRef(new Map),_=e.filter(el),H=_.filter(C=>!C.disabled&&!C.isInvalid),G=a.useCallback(C=>{R||L(C),n==null||n(C),C?v==null||v():(y==null||y(),k(-1),P(!1))},[R,n,v,y]),V=a.useCallback(C=>{C.preventDefault(),C.stopPropagation(),i||G(!S)},[i,S,G]),U=a.useCallback(C=>{var B;C.key==="Enter"||C.key===" "?(C.preventDefault(),i||(P(!0),G(!S))):C.key==="Escape"&&S&&(C.preventDefault(),G(!1),(B=N.current)==null||B.focus())},[i,S,G]),ne=a.useCallback(C=>{var B;C.disabled||C.isInvalid||((B=C.onClick)==null||B.call(C,C.value),G(!1),setTimeout(()=>{var q;return(q=N.current)==null?void 0:q.focus()},0))},[G]),ae=a.useCallback((C,B)=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),C.stopPropagation(),!B.disabled&&!B.isInvalid&&ne(B))},[ne]);a.useEffect(()=>{if(!S)return;const C=B=>{O.current&&!O.current.contains(B.target)&&G(!1)};return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[S,G]),a.useEffect(()=>{if(!S)return;const C=B=>{var q;switch(B.key){case"Escape":B.preventDefault(),G(!1),(q=N.current)==null||q.focus();break;case"ArrowDown":B.preventDefault(),P(!0),k(te=>{const se=_.map((ge,Ue)=>({item:ge,idx:Ue})).filter(({item:ge})=>!ge.disabled&&!ge.isInvalid).map(({idx:ge})=>ge);if(se.length===0)return-1;const Ce=se.indexOf(te),ht=Ce===-1||Ce===se.length-1?0:Ce+1;return se[ht]??-1});break;case"ArrowUp":B.preventDefault(),P(!0),k(te=>{const se=_.map((ge,Ue)=>({item:ge,idx:Ue})).filter(({item:ge})=>!ge.disabled&&!ge.isInvalid).map(({idx:ge})=>ge);if(se.length===0)return-1;const Ce=se.indexOf(te),ht=Ce===-1||Ce===0?se.length-1:Ce-1;return se[ht]??-1});break;case"Home":B.preventDefault(),P(!0);{const te=_.findIndex(se=>!se.disabled&&!se.isInvalid);te!==-1&&k(te)}break;case"End":B.preventDefault(),P(!0);{const te=[..._].reverse().findIndex(se=>!se.disabled&&!se.isInvalid);te!==-1&&k(_.length-1-te)}break}};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[S,_,G]),a.useEffect(()=>{if(S&&D&&M>=0){const C=W.current.get(M);C==null||C.focus()}},[S,D,M]),a.useEffect(()=>{if(S&&D&&M===-1&&H.length>0){const C=_.findIndex(B=>!B.disabled&&!B.isInvalid);C!==-1&&k(C)}},[S,D,M,_,H.length]);const Y=a.useCallback((C,B)=>{B?W.current.set(C,B):W.current.delete(C)},[]),oe=t?a.isValidElement(t)?a.cloneElement(t,{onClick:C=>{var B,q;(q=(B=t.props)==null?void 0:B.onClick)==null||q.call(B,C),V(C)},onKeyDown:C=>{var B,q;(q=(B=t.props)==null?void 0:B.onKeyDown)==null||q.call(B,C),U(C)},ref:N,"aria-haspopup":"menu","aria-expanded":S,disabled:i,tabIndex:g}):t:s.jsx(Ab,{ref:N,onClick:V,onKeyDown:U,disabled:i,$inverse:u,$disabled:i,$size:d,"aria-haspopup":"menu","aria-expanded":S,"aria-label":"Open menu","data-testid":j,tabIndex:g,children:s.jsx(Pb,{})});let I=0;return s.jsxs(Ob,{ref:C=>{O.current=C,typeof F=="function"?F(C):F&&(F.current=C)},className:b,"data-testid":w,children:[s.jsx(Mb,{children:oe}),s.jsxs(zb,{role:"menu","aria-label":E,$placement:o,$isOpen:S,$width:p&&N.current?`${N.current.clientWidth}px`:void 0,"data-testid":x,children:[c&&s.jsx(Bb,{children:s.jsx(Hi,{children:c})}),s.jsx(Wb,{ref:A,$width:f,$height:h,children:e.map((C,B)=>{if(uo(C))return s.jsx(Vb,{role:"separator","aria-orientation":"horizontal"},`divider-${B}`);if(fo(C))return s.jsx(Ib,{$first:B===0,children:s.jsx(Hi,{children:C.displayText})},`header-${C.id}`);const q=I++,te=q===M&&D;return s.jsxs(Hb,{ref:se=>Y(q,se),role:"menuitem",tabIndex:te?0:-1,"aria-disabled":C.disabled||C.isInvalid,onClick:()=>ne(C),onKeyDown:se=>ae(se,C),onMouseEnter:()=>{P(!1),k(q)},$type:l,$disabled:C.disabled??!1,$selected:C.selected??!1,$isInvalid:C.isInvalid??!1,$isBold:C.isBold??!1,$isFocused:te,$itemHeight:m,"data-testid":C["data-testid"],children:[C.icon&&s.jsx(_b,{children:C.icon}),C.displayText]},C.id)})})]})]})});un.displayName="DropdownMenu";const Gb=$.div`
3224
+ `,dn=a.forwardRef(({items:e,trigger:t,open:r,onOpenChange:n,placement:o="bottom-end",disabled:s=!1,type:l="action",title:c,buttonSize:d="md",inverse:u=!1,menuListWidth:f,menuListHeight:h,menuItemHeight:m,useContainerWidth:p=!1,buttonTabIndex:g,onOpen:v,onClose:y,className:b,"data-testid":w,menuDataId:x,menuButtonDataId:j,"aria-label":E="Menu"},F)=>{const[T,L]=a.useState(!1),[M,k]=a.useState(-1),[D,P]=a.useState(!1),R=r!==void 0,S=R?r:T,O=a.useRef(null),N=a.useRef(null),A=a.useRef(null),W=a.useRef(new Map),_=e.filter(el),H=_.filter(C=>!C.disabled&&!C.isInvalid),G=a.useCallback(C=>{R||L(C),n==null||n(C),C?v==null||v():(y==null||y(),k(-1),P(!1))},[R,n,v,y]),V=a.useCallback(C=>{C.preventDefault(),C.stopPropagation(),s||G(!S)},[s,S,G]),U=a.useCallback(C=>{var I;C.key==="Enter"||C.key===" "?(C.preventDefault(),s||(P(!0),G(!S))):C.key==="Escape"&&S&&(C.preventDefault(),G(!1),(I=N.current)==null||I.focus())},[s,S,G]),ne=a.useCallback(C=>{var I;C.disabled||C.isInvalid||((I=C.onClick)==null||I.call(C,C.value),G(!1),setTimeout(()=>{var q;return(q=N.current)==null?void 0:q.focus()},0))},[G]),ae=a.useCallback((C,I)=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),C.stopPropagation(),!I.disabled&&!I.isInvalid&&ne(I))},[ne]);a.useEffect(()=>{if(!S)return;const C=I=>{O.current&&!O.current.contains(I.target)&&G(!1)};return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[S,G]),a.useEffect(()=>{if(!S)return;const C=I=>{var q;switch(I.key){case"Escape":I.preventDefault(),G(!1),(q=N.current)==null||q.focus();break;case"ArrowDown":I.preventDefault(),P(!0),k(te=>{const se=_.map((ge,Ue)=>({item:ge,idx:Ue})).filter(({item:ge})=>!ge.disabled&&!ge.isInvalid).map(({idx:ge})=>ge);if(se.length===0)return-1;const Ce=se.indexOf(te),pt=Ce===-1||Ce===se.length-1?0:Ce+1;return se[pt]??-1});break;case"ArrowUp":I.preventDefault(),P(!0),k(te=>{const se=_.map((ge,Ue)=>({item:ge,idx:Ue})).filter(({item:ge})=>!ge.disabled&&!ge.isInvalid).map(({idx:ge})=>ge);if(se.length===0)return-1;const Ce=se.indexOf(te),pt=Ce===-1||Ce===0?se.length-1:Ce-1;return se[pt]??-1});break;case"Home":I.preventDefault(),P(!0);{const te=_.findIndex(se=>!se.disabled&&!se.isInvalid);te!==-1&&k(te)}break;case"End":I.preventDefault(),P(!0);{const te=[..._].reverse().findIndex(se=>!se.disabled&&!se.isInvalid);te!==-1&&k(_.length-1-te)}break}};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[S,_,G]),a.useEffect(()=>{if(S&&D&&M>=0){const C=W.current.get(M);C==null||C.focus()}},[S,D,M]),a.useEffect(()=>{if(S&&D&&M===-1&&H.length>0){const C=_.findIndex(I=>!I.disabled&&!I.isInvalid);C!==-1&&k(C)}},[S,D,M,_,H.length]);const Y=a.useCallback((C,I)=>{I?W.current.set(C,I):W.current.delete(C)},[]),oe=t?a.isValidElement(t)?a.cloneElement(t,{onClick:C=>{var I,q;(q=(I=t.props)==null?void 0:I.onClick)==null||q.call(I,C),V(C)},onKeyDown:C=>{var I,q;(q=(I=t.props)==null?void 0:I.onKeyDown)==null||q.call(I,C),U(C)},ref:N,"aria-haspopup":"menu","aria-expanded":S,disabled:s,tabIndex:g}):t:i.jsx(Ab,{ref:N,onClick:V,onKeyDown:U,disabled:s,$inverse:u,$disabled:s,$size:d,"aria-haspopup":"menu","aria-expanded":S,"aria-label":"Open menu","data-testid":j,tabIndex:g,children:i.jsx(Pb,{})});let B=0;return i.jsxs(Ob,{ref:C=>{O.current=C,typeof F=="function"?F(C):F&&(F.current=C)},className:b,"data-testid":w,children:[i.jsx(Mb,{children:oe}),i.jsxs(zb,{role:"menu","aria-label":E,$placement:o,$isOpen:S,$width:p&&N.current?`${N.current.clientWidth}px`:void 0,"data-testid":x,children:[c&&i.jsx(Ib,{children:i.jsx(Hi,{children:c})}),i.jsx(Wb,{ref:A,$width:f,$height:h,children:e.map((C,I)=>{if(uo(C))return i.jsx(Vb,{role:"separator","aria-orientation":"horizontal"},`divider-${I}`);if(fo(C))return i.jsx(Bb,{$first:I===0,children:i.jsx(Hi,{children:C.displayText})},`header-${C.id}`);const q=B++,te=q===M&&D;return i.jsxs(Hb,{ref:se=>Y(q,se),role:"menuitem",tabIndex:te?0:-1,"aria-disabled":C.disabled||C.isInvalid,onClick:()=>ne(C),onKeyDown:se=>ae(se,C),onMouseEnter:()=>{P(!1),k(q)},$type:l,$disabled:C.disabled??!1,$selected:C.selected??!1,$isInvalid:C.isInvalid??!1,$isBold:C.isBold??!1,$isFocused:te,$itemHeight:m,"data-testid":C["data-testid"],children:[C.icon&&i.jsx(_b,{children:C.icon}),C.displayText]},C.id)})})]})]})});dn.displayName="DropdownMenu";const Gb=$.div`
3225
3225
  display: flex;
3226
3226
  align-items: center;
3227
3227
 
@@ -3235,7 +3235,7 @@
3235
3235
  }
3236
3236
 
3237
3237
  ${({$gapSize:e})=>{switch(e){case"xs":return"gap: 8px;";case"sm":return"gap: 12px;";case"lg":return"gap: 18px;";case"md":default:return"gap: 16px;"}}}
3238
- `,Ub="#6b7280";function Kb(e,t){const r=e||t;return typeof r=="string"?r:"Action Menu Button"}function Yb({actions:e=[],dropdownMenuType:t,menuDataId:r,menuDisabled:n,primaryActions:o=[],showDropdownActionIcon:i=!1,gapSize:l="sm",buttonSize:c="md",inverse:d=!1,menuIcon:u,buttonVariant:f="ghost",buttonTabIndex:h,...m}){const{primaryMenuButtons:p,secondaryMenuButtons:g}=a.useMemo(()=>{const b=e.filter(({id:x})=>o.includes(x)),w=e.filter(({id:x})=>!o.includes(x));return{primaryMenuButtons:b,secondaryMenuButtons:w}},[o,e]),v=a.useMemo(()=>g.map(b=>{let w;return i&&b.icon&&a.isValidElement(b.icon)?w=a.cloneElement(b.icon,{color:Ub}):i&&b.icon&&(w=b.icon),{id:b.id,displayText:b.displayText,icon:w,onClick:b.onClick,disabled:b.disabled,selected:b.selected,value:b.value,divider:b.divider,"data-testid":b.dataTestId}}),[g,i]),y=a.useMemo(()=>{if(u)return s.jsx(pe,{icon:u,variant:d?"ghostInverse":"ghost",size:c,disabled:n,"aria-label":"Toggle menu",tabIndex:h})},[u,d,c,n,h]);return e.length===0?null:s.jsxs(Gb,{"data-testid":"primary-actions",$gapSize:l,...m,children:[p.map(({icon:b,dataId:w,disabled:x,onClick:j,tooltip:E,ariaLabel:F,dataTestId:T,displayText:L},M)=>s.jsx(pe,{disabled:x||n,icon:b,variant:f,"data-id":w,"data-testid":T,tooltip:E,onClick:j,size:c,"aria-label":Kb(F,L),tabIndex:h},`${w}-${M}`)),g.length>0&&s.jsx(un,{className:"dropdown-menu",disabled:n,menuButtonDataId:r,inverse:d,buttonSize:c,buttonTabIndex:h,items:v,type:t,trigger:y})]})}const qb={xs:8,sm:12,md:16,lg:18},Xb=$.div`
3238
+ `,Ub="#6b7280";function Kb(e,t){const r=e||t;return typeof r=="string"?r:"Action Menu Button"}function Yb({actions:e=[],dropdownMenuType:t,menuDataId:r,menuDisabled:n,primaryActions:o=[],showDropdownActionIcon:s=!1,gapSize:l="sm",buttonSize:c="md",inverse:d=!1,menuIcon:u,buttonVariant:f="ghost",buttonTabIndex:h,...m}){const{primaryMenuButtons:p,secondaryMenuButtons:g}=a.useMemo(()=>{const b=e.filter(({id:x})=>o.includes(x)),w=e.filter(({id:x})=>!o.includes(x));return{primaryMenuButtons:b,secondaryMenuButtons:w}},[o,e]),v=a.useMemo(()=>g.map(b=>{let w;return s&&b.icon&&a.isValidElement(b.icon)?w=a.cloneElement(b.icon,{color:Ub}):s&&b.icon&&(w=b.icon),{id:b.id,displayText:b.displayText,icon:w,onClick:b.onClick,disabled:b.disabled,selected:b.selected,value:b.value,divider:b.divider,"data-testid":b.dataTestId}}),[g,s]),y=a.useMemo(()=>{if(u)return i.jsx(pe,{icon:u,variant:d?"ghostInverse":"ghost",size:c,disabled:n,"aria-label":"Toggle menu",tabIndex:h})},[u,d,c,n,h]);return e.length===0?null:i.jsxs(Gb,{"data-testid":"primary-actions",$gapSize:l,...m,children:[p.map(({icon:b,dataId:w,disabled:x,onClick:j,tooltip:E,ariaLabel:F,dataTestId:T,displayText:L},M)=>i.jsx(pe,{disabled:x||n,icon:b,variant:f,"data-id":w,"data-testid":T,tooltip:E,onClick:j,size:c,"aria-label":Kb(F,L),tabIndex:h},`${w}-${M}`)),g.length>0&&i.jsx(dn,{className:"dropdown-menu",disabled:n,menuButtonDataId:r,inverse:d,buttonSize:c,buttonTabIndex:h,items:v,type:t,trigger:y})]})}const qb={xs:8,sm:12,md:16,lg:18},Xb=$.div`
3239
3239
  ${({theme:e,$borderRadius:t,$showBorder:r})=>{const n=t==="sm"?e.borders.radius.sm:e.borders.radius.md;return r?z.css`
3240
3240
  border-radius: ${n};
3241
3241
  border: 1px solid ${e.colors.grey[200]};
@@ -3315,7 +3315,7 @@
3315
3315
  `,n0=$.div`
3316
3316
  min-width: 0;
3317
3317
  flex: 1;
3318
- `,tl=({title:e,customTitleComponent:t,children:r,isChild:n=!1,rightSection:o,borderRadius:i="sm",dataId:l,dataTestId:c,onClick:d,maintainState:u=!1,open:f=!1,id:h,className:m,showBorder:p=!1,height:g,showHeaderBorderBottom:v=!0,stickyHeader:y=!1})=>{const[b,w]=a.useState(f);a.useEffect(()=>{u||w(f)},[u,f]);const x=a.useCallback(M=>{M.stopPropagation(),M.preventDefault(),w(k=>!k),d&&h&&d({id:h,open:!b})},[h,b,d]),j=()=>{if(t)return t;if(e){const M=n?s.jsx(Jb,{children:e}):s.jsx(e0,{children:e});return s.jsx(Wt,{content:typeof e=="string"?e:"",position:"top",children:s.jsx(n0,{children:M})})}return null},E=!!(typeof r=="string"&&r.trim().length>0||Array.isArray(r)&&r.length>0||a.isValidElement(r)),F=`accordion-header-expand-less-${h||l||"accordion-header-expand-less"}`,T=`accordion-header-expand-more-${h||l||"accordion-header-expand-more"}`,L=`accordion-content-${h||l||"accordion-content"}`;return s.jsxs(Xb,{$showBorder:p,"data-id":l,$borderRadius:i,$isOpen:b,"data-testid":c,$isChild:n,className:m,children:[s.jsxs(Qb,{$isOpen:b,onClick:x,"data-id":l,$height:g,$showHeaderBorderBottom:v,$stickyHeader:y,children:[s.jsxs(t0,{children:[b?s.jsx(pe,{id:F,"aria-label":"Collapse accordion button","aria-expanded":b,"aria-controls":L,icon:s.jsx(J,{name:"expand_less",size:"md"}),variant:"ghost",size:"sm",onClick:M=>{M.stopPropagation(),x(M)}}):s.jsx(pe,{id:T,"aria-label":"Expand accordion button","aria-expanded":b,"aria-controls":L,icon:s.jsx(J,{name:"expand_more",size:"md"}),variant:"ghost",size:"sm",onClick:M=>{M.stopPropagation(),x(M)}}),j()]}),o&&s.jsx(r0,{children:o})]}),E&&s.jsx(Zb,{$isOpen:b,$isNested:n,role:"region",$hasContent:E,"aria-labelledby":F||T,id:L,children:b&&r})]})};tl.displayName="Accordion";const rl=["gif","png","jpg","jp2","jps","jpeg","bmp","tiff","tif","svg","eps","ai","ico","psd","arw","crw","nrw","cr2","dcr","dng","mrw","nef","orf","pef","raf","indt","indd","idml","webp","pam","pbm","xbm","3fr","mos","ppm","erf","x3f","kdc","sr2","mef"],nl=["jpg","jpeg","png","gif","webp","svg","avif","apng","bmp","ico"],ol=["jpg","jpeg","png","gif","webp","svg","bmp","ico","tiff","tif","avif","apng"],il=["mp4","mov","avi","wmv","flv","webm","mkv","m4v","mpg","mpeg"],sl=["pdf","doc","docx","xls","xlsx","ppt","pptx","txt","rtf","odt","ods","odp"];function pt(e){var t;return((t=e.split(".").pop())==null?void 0:t.toLowerCase())||""}function o0(e,t){const r=pt(e),n=(t||"").toLowerCase();return rl.some(o=>r===o||n.includes(o))}function i0(e){const t=pt(e);return nl.includes(t)}function al(e){const t=pt(e);return ol.includes(t)}function ll(e){const t=pt(e);return il.includes(t)}function cl(e){const t=pt(e);return sl.includes(t)}function s0(e){const t=pt(e);return t==="jpg"||t==="jpeg"?"image/jpeg":t==="png"?"image/png":t==="gif"?"image/gif":t==="webp"?"image/webp":t==="svg"?"image/svg+xml":t==="bmp"?"image/bmp":t==="ico"?"image/x-icon":t==="tiff"||t==="tif"?"image/tiff":t==="mp4"?"video/mp4":t==="mov"?"video/quicktime":t==="avi"?"video/x-msvideo":t==="webm"?"video/webm":t==="pdf"?"application/pdf":t==="doc"?"application/msword":t==="docx"?"application/vnd.openxmlformats-officedocument.wordprocessingml.document":t==="xls"?"application/vnd.ms-excel":t==="xlsx"?"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":t==="ppt"?"application/vnd.ms-powerpoint":t==="pptx"?"application/vnd.openxmlformats-officedocument.presentationml.presentation":t==="txt"?"text/plain":"application/octet-stream"}function po(e){if(al(e))return"image";if(ll(e))return"videocam";if(cl(e))return"description";const t=pt(e);return["mp3","wav","ogg","flac","m4a"].includes(t)?"audiotrack":["zip","rar","7z","tar","gz"].includes(t)?"folder_zip":["js","ts","jsx","tsx","html","css","json","xml"].includes(t)?"code":"insert_drive_file"}function dl(e,t=1){if(e===0)return"0 Bytes";const r=1024,n=t<0?0:t,o=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],i=Math.floor(Math.log(e)/Math.log(r));return parseFloat((e/Math.pow(r,i)).toFixed(n))+" "+o[i]}function a0(e,t){const r=typeof e=="string"?new Date(e):e,n={year:"numeric",month:"short",day:"numeric",...t};return new Intl.DateTimeFormat("en-US",n).format(r)}function l0(e){const t=typeof e=="string"?new Date(e):e,n=new Date().getTime()-t.getTime(),o=Math.floor(n/1e3),i=Math.floor(o/60),l=Math.floor(i/60),c=Math.floor(l/24),d=Math.floor(c/7),u=Math.floor(c/30),f=Math.floor(c/365);return o<60?"just now":i<60?`${i} minute${i!==1?"s":""} ago`:l<24?`${l} hour${l!==1?"s":""} ago`:c<7?`${c} day${c!==1?"s":""} ago`:d<4?`${d} week${d!==1?"s":""} ago`:u<12?`${u} month${u!==1?"s":""} ago`:`${f} year${f!==1?"s":""} ago`}function ul(e,t=30){if(e.length<=t)return e;const r=e.split("."),n=r.length>1?r.pop():"",o=r.join(".");if(!n)return o.substring(0,t-3)+"...";const i=t-n.length-4;return i<1?e.substring(0,t-3)+"...":o.substring(0,i)+"...."+n}function c0(e,t,r="..."){return e.length<=t?e:e.substring(0,t-r.length)+r}function fl(e,t){return!e||!t?"":`${e} × ${t}`}function d0(e){return new Intl.NumberFormat("en-US").format(e)}function u0(e,t,r){const n=e===1?t:r||t+"s";return`${e} ${n}`}function Ve(e,t){return!e||e.length===0?!1:e.includes(t)}function f0(e,t){return t.every(r=>Ve(e,r))}function p0(e,t){return t.some(r=>Ve(e,r))}function pl(e){return!e||e.length===0?[]:["resource_download","resource_link","resource_copy","resource_edit","view","download","list"].filter(r=>e.includes(r))}function hl(e,t){return e&&Ve(t,"view")}function xr(e,t){return e===!1||t.length===0||t.length===1&&t.includes("list")}function gl(e,t=!1){return t?Ve(e,"resource_download"):Ve(e,"download")}function ml(e,t,r=!1){return r?Ve(t,"resource_link")&&!xr(e,t):e&&Ve(t,"view")}function bl(e){return Ve(e,"resource_copy")}function xl(e){return Ve(e,"resource_edit")}function h0(e,t=!1){return{canDownload:gl(e,!1),canGeneratePublicLink:ml(t,e,!1),canCopy:bl(e),canEdit:xl(e),isPublic:hl(t,e),isRestricted:xr(t,e),availableActions:pl(e)}}const g0="ib-presetSelector-xe3cW",m0="ib-fullWidth-H4Bl9",b0="ib-label-HcU3O",x0="ib-trigger-PiGAQ",v0="ib-triggerContent-HLH7M",y0="ib-triggerText-a5Q-Y",w0="ib-placeholder-nMaSv",$0="ib-triggerIcon-cL-gV",k0="ib-clearButton--pdkk",C0="ib-chevron-ZjVKR",j0="ib-dropdown-7CWTq",E0="ib-searchWrapper-Dk4yl",S0="ib-searchInput-LgJ-W",L0="ib-optionsList-wHYiF",T0="ib-categoryLabel-puQJj",F0="ib-option-7Z4lw",R0="ib-selected-DcLQ9",D0="ib-optionContent-zT-nV",O0="ib-optionIcon-2ZbWy",M0="ib-optionLabel-C9nlB",A0="ib-optionName-CYvOO",P0="ib-optionDetails-6bZlt",N0="ib-originalBadge-bPfv2",z0="ib-checkmark-G-ylZ",B0="ib-loadingWrapper-3s6UE",I0="ib-loadingText-4vYkB",W0="ib-noResults-2t6tN",H0="ib-errorMessage-CUYpe",_0="ib-transitionEnter-VeA35",V0="ib-transitionEnterActive-1eQlo",G0="ib-transitionLeave-vjvMz",U0="ib-transitionLeaveActive-EO8Ke",ee={presetSelector:g0,fullWidth:m0,label:b0,trigger:x0,triggerContent:v0,triggerText:y0,placeholder:w0,triggerIcon:$0,clearButton:k0,chevron:C0,dropdown:j0,searchWrapper:E0,searchInput:S0,optionsList:L0,categoryLabel:T0,option:F0,selected:R0,optionContent:D0,optionIcon:O0,optionLabel:M0,optionName:A0,optionDetails:P0,originalBadge:N0,checkmark:z0,loadingWrapper:B0,loadingText:I0,noResults:W0,errorMessage:H0,transitionEnter:_0,transitionEnterActive:V0,transitionLeave:G0,transitionLeaveActive:U0};function K0(e){return e?`${e.width} × ${e.height}`:""}function Y0(e){const t=[];return e.fileType&&t.push(e.fileType.toUpperCase()),e.dimensions&&t.push(K0(e.dimensions)),e.fileSize&&t.push(e.fileSize),t.join(", ")}function _i(e){return e.isOriginal?"insert_drive_file":po(`file.${e.fileType||"bin"}`)}function ho({presets:e,value:t,onChange:r,label:n,placeholder:o="Select a preset...",showDetails:i=!1,size:l="md",disabled:c=!1,error:d=!1,errorMessage:u,loading:f=!1,categories:h,clearable:m=!0,searchable:p=!1,fullWidth:g=!1,className:v,"data-testid":y}){const b=a.useId(),[w,x]=a.useState(""),[j,E]=a.useState(!1),F=a.useMemo(()=>e.find(N=>N.id===t)||null,[e,t]),T=a.useMemo(()=>{if(!p||!w)return e;const N=w.toLowerCase();return e.filter(A=>A.name.toLowerCase().includes(N)||A.fileType&&A.fileType.toLowerCase().includes(N))},[e,w,p]),L=a.useMemo(()=>{if(!h)return null;if(!p||!w)return h;const N=w.toLowerCase();return h.map(A=>({...A,presets:A.presets.filter(W=>W.name.toLowerCase().includes(N)||W.fileType&&W.fileType.toLowerCase().includes(N))})).filter(A=>A.presets.length>0)},[h,w,p]),M=a.useCallback(N=>{r(N),x(""),E(!1)},[r]),k=a.useCallback(N=>{N.stopPropagation();const A=e.find(W=>W.isOriginal);A&&r(A.id)},[e,r]),D=(N,A)=>s.jsxs("button",{type:"button",className:`${ee.option} ${A?ee.selected:""}`,onClick:()=>M(N.id),"data-testid":y&&`${y}-option-${N.id}`,children:[s.jsxs("span",{className:ee.optionContent,children:[i&&s.jsx("span",{className:ee.optionIcon,children:s.jsx(J,{name:_i(N),size:"sm"})}),s.jsxs("span",{className:ee.optionLabel,children:[s.jsx("span",{className:ee.optionName,children:N.name}),i&&s.jsx("span",{className:ee.optionDetails,children:Y0(N)})]})]}),N.isOriginal&&s.jsx("span",{className:ee.originalBadge,children:"Original"}),A&&s.jsx("span",{className:ee.checkmark,children:s.jsx(J,{name:"check",size:"sm"})})]},N.id),P=[ee.presetSelector,g&&ee.fullWidth,v].filter(Boolean).join(" "),R=L&&L.length>0,S=T.length>0,O=!f&&(p&&w&&!S&&!R||!S&&!R);return s.jsxs("div",{className:P,"data-size":l,"data-error":d,"data-open":j,"data-testid":y,children:[n&&s.jsx("label",{className:ee.label,id:`${b}-label`,children:n}),s.jsx(yt,{value:t||"",onChange:M,disabled:c||f,children:({open:N})=>(N!==j&&E(N),s.jsxs(s.Fragment,{children:[s.jsxs(yt.Button,{className:ee.trigger,"aria-labelledby":n?`${b}-label`:void 0,"data-testid":y&&`${y}-trigger`,children:[s.jsxs("span",{className:ee.triggerContent,children:[F&&i&&s.jsx("span",{className:ee.triggerIcon,children:s.jsx(J,{name:_i(F),size:"sm"})}),s.jsx("span",{className:`${ee.triggerText} ${F?"":ee.placeholder}`,children:F?F.name:o})]}),m&&F&&!F.isOriginal&&s.jsx("button",{type:"button",className:ee.clearButton,onClick:k,"aria-label":"Clear selection","data-testid":y&&`${y}-clear`,children:s.jsx(J,{name:"close",size:"sm"})}),s.jsx("span",{className:ee.chevron,children:s.jsx(J,{name:"keyboard_arrow_down",size:"sm"})})]}),s.jsx(At,{as:a.Fragment,leave:ee.transitionLeave,leaveFrom:ee.transitionLeaveActive,leaveTo:ee.transitionLeaveActive,enter:ee.transitionEnter,enterFrom:ee.transitionEnter,enterTo:ee.transitionEnterActive,children:s.jsxs(yt.Options,{className:ee.dropdown,"data-testid":y&&`${y}-dropdown`,children:[p&&s.jsx("div",{className:ee.searchWrapper,children:s.jsx("input",{type:"text",className:ee.searchInput,placeholder:"Search presets...",value:w,onChange:A=>x(A.target.value),onClick:A=>A.stopPropagation(),"data-testid":y&&`${y}-search`})}),f?s.jsxs("div",{className:ee.loadingWrapper,"data-testid":y&&`${y}-loading`,children:[s.jsx(br,{size:"sm"}),s.jsx("span",{className:ee.loadingText,children:"Loading presets..."})]}):O?s.jsx("div",{className:ee.noResults,"data-testid":y&&`${y}-no-results`,children:"No presets found"}):s.jsx("div",{className:ee.optionsList,children:R?L.map(A=>s.jsxs(a.Fragment,{children:[s.jsx("div",{className:ee.categoryLabel,children:A.label}),A.presets.map(W=>D(W,W.id===t))]},A.label)):T.map(A=>D(A,A.id===t))})]})})]}))}),d&&u&&s.jsx("p",{className:ee.errorMessage,role:"alert","data-testid":y&&`${y}-error`,children:u})]})}ho.displayName="PresetSelector";const q0=$.div`
3318
+ `,tl=({title:e,customTitleComponent:t,children:r,isChild:n=!1,rightSection:o,borderRadius:s="sm",dataId:l,dataTestId:c,onClick:d,maintainState:u=!1,open:f=!1,id:h,className:m,showBorder:p=!1,height:g,showHeaderBorderBottom:v=!0,stickyHeader:y=!1})=>{const[b,w]=a.useState(f);a.useEffect(()=>{u||w(f)},[u,f]);const x=a.useCallback(M=>{M.stopPropagation(),M.preventDefault(),w(k=>!k),d&&h&&d({id:h,open:!b})},[h,b,d]),j=()=>{if(t)return t;if(e){const M=n?i.jsx(Jb,{children:e}):i.jsx(e0,{children:e});return i.jsx(Bt,{content:typeof e=="string"?e:"",position:"top",children:i.jsx(n0,{children:M})})}return null},E=!!(typeof r=="string"&&r.trim().length>0||Array.isArray(r)&&r.length>0||a.isValidElement(r)),F=`accordion-header-expand-less-${h||l||"accordion-header-expand-less"}`,T=`accordion-header-expand-more-${h||l||"accordion-header-expand-more"}`,L=`accordion-content-${h||l||"accordion-content"}`;return i.jsxs(Xb,{$showBorder:p,"data-id":l,$borderRadius:s,$isOpen:b,"data-testid":c,$isChild:n,className:m,children:[i.jsxs(Qb,{$isOpen:b,onClick:x,"data-id":l,$height:g,$showHeaderBorderBottom:v,$stickyHeader:y,children:[i.jsxs(t0,{children:[b?i.jsx(pe,{id:F,"aria-label":"Collapse accordion button","aria-expanded":b,"aria-controls":L,icon:i.jsx(J,{name:"expand_less",size:"md"}),variant:"ghost",size:"sm",onClick:M=>{M.stopPropagation(),x(M)}}):i.jsx(pe,{id:T,"aria-label":"Expand accordion button","aria-expanded":b,"aria-controls":L,icon:i.jsx(J,{name:"expand_more",size:"md"}),variant:"ghost",size:"sm",onClick:M=>{M.stopPropagation(),x(M)}}),j()]}),o&&i.jsx(r0,{children:o})]}),E&&i.jsx(Zb,{$isOpen:b,$isNested:n,role:"region",$hasContent:E,"aria-labelledby":F||T,id:L,children:b&&r})]})};tl.displayName="Accordion";const rl=["gif","png","jpg","jp2","jps","jpeg","bmp","tiff","tif","svg","eps","ai","ico","psd","arw","crw","nrw","cr2","dcr","dng","mrw","nef","orf","pef","raf","indt","indd","idml","webp","pam","pbm","xbm","3fr","mos","ppm","erf","x3f","kdc","sr2","mef"],nl=["jpg","jpeg","png","gif","webp","svg","avif","apng","bmp","ico"],ol=["jpg","jpeg","png","gif","webp","svg","bmp","ico","tiff","tif","avif","apng"],il=["mp4","mov","avi","wmv","flv","webm","mkv","m4v","mpg","mpeg"],sl=["pdf","doc","docx","xls","xlsx","ppt","pptx","txt","rtf","odt","ods","odp"];function ft(e){var t;return((t=e.split(".").pop())==null?void 0:t.toLowerCase())||""}function o0(e,t){const r=ft(e),n=(t||"").toLowerCase();return rl.some(o=>r===o||n.includes(o))}function i0(e){const t=ft(e);return nl.includes(t)}function al(e){const t=ft(e);return ol.includes(t)}function ll(e){const t=ft(e);return il.includes(t)}function cl(e){const t=ft(e);return sl.includes(t)}function s0(e){const t=ft(e);return t==="jpg"||t==="jpeg"?"image/jpeg":t==="png"?"image/png":t==="gif"?"image/gif":t==="webp"?"image/webp":t==="svg"?"image/svg+xml":t==="bmp"?"image/bmp":t==="ico"?"image/x-icon":t==="tiff"||t==="tif"?"image/tiff":t==="mp4"?"video/mp4":t==="mov"?"video/quicktime":t==="avi"?"video/x-msvideo":t==="webm"?"video/webm":t==="pdf"?"application/pdf":t==="doc"?"application/msword":t==="docx"?"application/vnd.openxmlformats-officedocument.wordprocessingml.document":t==="xls"?"application/vnd.ms-excel":t==="xlsx"?"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":t==="ppt"?"application/vnd.ms-powerpoint":t==="pptx"?"application/vnd.openxmlformats-officedocument.presentationml.presentation":t==="txt"?"text/plain":"application/octet-stream"}function po(e){if(al(e))return"image";if(ll(e))return"videocam";if(cl(e))return"description";const t=ft(e);return["mp3","wav","ogg","flac","m4a"].includes(t)?"audiotrack":["zip","rar","7z","tar","gz"].includes(t)?"folder_zip":["js","ts","jsx","tsx","html","css","json","xml"].includes(t)?"code":"insert_drive_file"}function dl(e,t=1){if(e===0)return"0 Bytes";const r=1024,n=t<0?0:t,o=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],s=Math.floor(Math.log(e)/Math.log(r));return parseFloat((e/Math.pow(r,s)).toFixed(n))+" "+o[s]}function a0(e,t){const r=typeof e=="string"?new Date(e):e,n={year:"numeric",month:"short",day:"numeric",...t};return new Intl.DateTimeFormat("en-US",n).format(r)}function l0(e){const t=typeof e=="string"?new Date(e):e,n=new Date().getTime()-t.getTime(),o=Math.floor(n/1e3),s=Math.floor(o/60),l=Math.floor(s/60),c=Math.floor(l/24),d=Math.floor(c/7),u=Math.floor(c/30),f=Math.floor(c/365);return o<60?"just now":s<60?`${s} minute${s!==1?"s":""} ago`:l<24?`${l} hour${l!==1?"s":""} ago`:c<7?`${c} day${c!==1?"s":""} ago`:d<4?`${d} week${d!==1?"s":""} ago`:u<12?`${u} month${u!==1?"s":""} ago`:`${f} year${f!==1?"s":""} ago`}function ul(e,t=30){if(e.length<=t)return e;const r=e.split("."),n=r.length>1?r.pop():"",o=r.join(".");if(!n)return o.substring(0,t-3)+"...";const s=t-n.length-4;return s<1?e.substring(0,t-3)+"...":o.substring(0,s)+"...."+n}function c0(e,t,r="..."){return e.length<=t?e:e.substring(0,t-r.length)+r}function fl(e,t){return!e||!t?"":`${e} × ${t}`}function d0(e){return new Intl.NumberFormat("en-US").format(e)}function u0(e,t,r){const n=e===1?t:r||t+"s";return`${e} ${n}`}function Ve(e,t){return!e||e.length===0?!1:e.includes(t)}function f0(e,t){return t.every(r=>Ve(e,r))}function p0(e,t){return t.some(r=>Ve(e,r))}function pl(e){return!e||e.length===0?[]:["resource_download","resource_link","resource_copy","resource_edit","view","download","list"].filter(r=>e.includes(r))}function hl(e,t){return e&&Ve(t,"view")}function br(e,t){return e===!1||t.length===0||t.length===1&&t.includes("list")}function gl(e,t=!1){return t?Ve(e,"resource_download"):Ve(e,"download")}function ml(e,t,r=!1){return r?Ve(t,"resource_link")&&!br(e,t):e&&Ve(t,"view")}function bl(e){return Ve(e,"resource_copy")}function xl(e){return Ve(e,"resource_edit")}function h0(e,t=!1){return{canDownload:gl(e,!1),canGeneratePublicLink:ml(t,e,!1),canCopy:bl(e),canEdit:xl(e),isPublic:hl(t,e),isRestricted:br(t,e),availableActions:pl(e)}}const g0="ib-presetSelector-xe3cW",m0="ib-fullWidth-H4Bl9",b0="ib-label-HcU3O",x0="ib-trigger-PiGAQ",v0="ib-triggerContent-HLH7M",y0="ib-triggerText-a5Q-Y",$0="ib-placeholder-nMaSv",w0="ib-triggerIcon-cL-gV",k0="ib-clearButton--pdkk",C0="ib-chevron-ZjVKR",j0="ib-dropdown-7CWTq",E0="ib-searchWrapper-Dk4yl",S0="ib-searchInput-LgJ-W",L0="ib-optionsList-wHYiF",T0="ib-categoryLabel-puQJj",F0="ib-option-7Z4lw",R0="ib-selected-DcLQ9",D0="ib-optionContent-zT-nV",O0="ib-optionIcon-2ZbWy",M0="ib-optionLabel-C9nlB",A0="ib-optionName-CYvOO",P0="ib-optionDetails-6bZlt",N0="ib-originalBadge-bPfv2",z0="ib-checkmark-G-ylZ",I0="ib-loadingWrapper-3s6UE",B0="ib-loadingText-4vYkB",W0="ib-noResults-2t6tN",H0="ib-errorMessage-CUYpe",_0="ib-transitionEnter-VeA35",V0="ib-transitionEnterActive-1eQlo",G0="ib-transitionLeave-vjvMz",U0="ib-transitionLeaveActive-EO8Ke",ee={presetSelector:g0,fullWidth:m0,label:b0,trigger:x0,triggerContent:v0,triggerText:y0,placeholder:$0,triggerIcon:w0,clearButton:k0,chevron:C0,dropdown:j0,searchWrapper:E0,searchInput:S0,optionsList:L0,categoryLabel:T0,option:F0,selected:R0,optionContent:D0,optionIcon:O0,optionLabel:M0,optionName:A0,optionDetails:P0,originalBadge:N0,checkmark:z0,loadingWrapper:I0,loadingText:B0,noResults:W0,errorMessage:H0,transitionEnter:_0,transitionEnterActive:V0,transitionLeave:G0,transitionLeaveActive:U0};function K0(e){return e?`${e.width} × ${e.height}`:""}function Y0(e){const t=[];return e.fileType&&t.push(e.fileType.toUpperCase()),e.dimensions&&t.push(K0(e.dimensions)),e.fileSize&&t.push(e.fileSize),t.join(", ")}function _i(e){return e.isOriginal?"insert_drive_file":po(`file.${e.fileType||"bin"}`)}function ho({presets:e,value:t,onChange:r,label:n,placeholder:o="Select a preset...",showDetails:s=!1,size:l="md",disabled:c=!1,error:d=!1,errorMessage:u,loading:f=!1,categories:h,clearable:m=!0,searchable:p=!1,fullWidth:g=!1,className:v,"data-testid":y}){const b=a.useId(),[w,x]=a.useState(""),[j,E]=a.useState(!1),F=a.useMemo(()=>e.find(N=>N.id===t)||null,[e,t]),T=a.useMemo(()=>{if(!p||!w)return e;const N=w.toLowerCase();return e.filter(A=>A.name.toLowerCase().includes(N)||A.fileType&&A.fileType.toLowerCase().includes(N))},[e,w,p]),L=a.useMemo(()=>{if(!h)return null;if(!p||!w)return h;const N=w.toLowerCase();return h.map(A=>({...A,presets:A.presets.filter(W=>W.name.toLowerCase().includes(N)||W.fileType&&W.fileType.toLowerCase().includes(N))})).filter(A=>A.presets.length>0)},[h,w,p]),M=a.useCallback(N=>{r(N),x(""),E(!1)},[r]),k=a.useCallback(N=>{N.stopPropagation();const A=e.find(W=>W.isOriginal);A&&r(A.id)},[e,r]),D=(N,A)=>i.jsxs("button",{type:"button",className:`${ee.option} ${A?ee.selected:""}`,onClick:()=>M(N.id),"data-testid":y&&`${y}-option-${N.id}`,children:[i.jsxs("span",{className:ee.optionContent,children:[s&&i.jsx("span",{className:ee.optionIcon,children:i.jsx(J,{name:_i(N),size:"sm"})}),i.jsxs("span",{className:ee.optionLabel,children:[i.jsx("span",{className:ee.optionName,children:N.name}),s&&i.jsx("span",{className:ee.optionDetails,children:Y0(N)})]})]}),N.isOriginal&&i.jsx("span",{className:ee.originalBadge,children:"Original"}),A&&i.jsx("span",{className:ee.checkmark,children:i.jsx(J,{name:"check",size:"sm"})})]},N.id),P=[ee.presetSelector,g&&ee.fullWidth,v].filter(Boolean).join(" "),R=L&&L.length>0,S=T.length>0,O=!f&&(p&&w&&!S&&!R||!S&&!R);return i.jsxs("div",{className:P,"data-size":l,"data-error":d,"data-open":j,"data-testid":y,children:[n&&i.jsx("label",{className:ee.label,id:`${b}-label`,children:n}),i.jsx(vt,{value:t||"",onChange:M,disabled:c||f,children:({open:N})=>(N!==j&&E(N),i.jsxs(i.Fragment,{children:[i.jsxs(vt.Button,{className:ee.trigger,"aria-labelledby":n?`${b}-label`:void 0,"data-testid":y&&`${y}-trigger`,children:[i.jsxs("span",{className:ee.triggerContent,children:[F&&s&&i.jsx("span",{className:ee.triggerIcon,children:i.jsx(J,{name:_i(F),size:"sm"})}),i.jsx("span",{className:`${ee.triggerText} ${F?"":ee.placeholder}`,children:F?F.name:o})]}),m&&F&&!F.isOriginal&&i.jsx("button",{type:"button",className:ee.clearButton,onClick:k,"aria-label":"Clear selection","data-testid":y&&`${y}-clear`,children:i.jsx(J,{name:"close",size:"sm"})}),i.jsx("span",{className:ee.chevron,children:i.jsx(J,{name:"keyboard_arrow_down",size:"sm"})})]}),i.jsx(Mt,{as:a.Fragment,leave:ee.transitionLeave,leaveFrom:ee.transitionLeaveActive,leaveTo:ee.transitionLeaveActive,enter:ee.transitionEnter,enterFrom:ee.transitionEnter,enterTo:ee.transitionEnterActive,children:i.jsxs(vt.Options,{className:ee.dropdown,"data-testid":y&&`${y}-dropdown`,children:[p&&i.jsx("div",{className:ee.searchWrapper,children:i.jsx("input",{type:"text",className:ee.searchInput,placeholder:"Search presets...",value:w,onChange:A=>x(A.target.value),onClick:A=>A.stopPropagation(),"data-testid":y&&`${y}-search`})}),f?i.jsxs("div",{className:ee.loadingWrapper,"data-testid":y&&`${y}-loading`,children:[i.jsx(mr,{size:"sm"}),i.jsx("span",{className:ee.loadingText,children:"Loading presets..."})]}):O?i.jsx("div",{className:ee.noResults,"data-testid":y&&`${y}-no-results`,children:"No presets found"}):i.jsx("div",{className:ee.optionsList,children:R?L.map(A=>i.jsxs(a.Fragment,{children:[i.jsx("div",{className:ee.categoryLabel,children:A.label}),A.presets.map(W=>D(W,W.id===t))]},A.label)):T.map(A=>D(A,A.id===t))})]})})]}))}),d&&u&&i.jsx("p",{className:ee.errorMessage,role:"alert","data-testid":y&&`${y}-error`,children:u})]})}ho.displayName="PresetSelector";const q0=$.div`
3319
3319
  position: relative;
3320
3320
  `,X0=$.div`
3321
3321
  position: absolute;
@@ -3400,7 +3400,7 @@
3400
3400
  &:active {
3401
3401
  cursor: ${({$isDraggable:e})=>e?"grabbing":"pointer"};
3402
3402
  }
3403
- `;function cx(e){return{...e,dimensions:e.customWidth&&e.customHeight?{width:e.customWidth,height:e.customHeight}:void 0}}const go=({asset:e,selected:t=!1,onSelect:r,onDownload:n,onInsertLink:o,onCopy:i,onGoto:l,allowedActions:c,className:d="","data-testid":u,draggable:f=!1,onDragStart:h,onDragEnd:m,presets:p,selectedPresetId:g,onPresetChange:v})=>{const y=c||e.allowedActions||[],b=xr(e.isPublic??!1,y),w=()=>{r&&!b&&r(e.id)},x=A=>{A.stopPropagation(),n&&!b&&n(e.id)},j=A=>{A.stopPropagation(),o&&!b&&o(e.id)},E=A=>{A.stopPropagation(),i&&!b&&i(e.id)},F=A=>{A.stopPropagation(),l&&!b&&l(e.id)},T=A=>{if(!f||b){A.preventDefault();return}A.dataTransfer.setData("application/json",JSON.stringify({assetId:e.id,assetName:e.name,assetType:e.fileType,thumbnail:e.thumbnail})),A.dataTransfer.setData("text/plain",e.name),A.dataTransfer.effectAllowed="copy",h&&h(e,A)},L=A=>{m&&m(e,A)},M=A=>{v&&v(A)},k=n&&y.includes("resource_download"),D=o&&y.includes("resource_link")&&!b,P=i&&y.includes("copy"),R=l&&y.includes("goto"),S=p&&p.length>0&&v,O=k||D||P||R,N=p?p.map(cx):[];return s.jsx(lx,{$isDraggable:f&&!b,draggable:f&&!b,onDragStart:T,onDragEnd:L,children:s.jsxs(it,{variant:"elevated",interactive:!0,selected:t,disabled:b,onClick:w,className:d,"aria-label":`Asset: ${e.name}`,"data-testid":u,children:[s.jsxs(q0,{children:[s.jsx(it.Media,{src:e.thumbnail,alt:e.name,aspectRatio:"16:9"}),t&&s.jsx(X0,{children:s.jsx(J,{name:"check_circle",size:"md"})}),b&&s.jsx(Q0,{children:s.jsx(J,{name:"lock",size:"sm"})})]}),s.jsx(it.Content,{children:s.jsxs(Z0,{children:[s.jsxs(J0,{children:[s.jsx(J,{name:po(e.filename||e.name),size:"sm"}),s.jsx(ex,{title:e.name,children:ul(e.name,30)})]}),e.description&&s.jsx(tx,{children:e.description}),s.jsxs(rx,{children:[s.jsx(nx,{children:e.fileType.toUpperCase()}),s.jsx(ox,{children:dl(e.fileSize)}),e.width&&e.height&&s.jsx(ix,{children:fl(e.width,e.height)})]})]})}),O&&s.jsx(it.Actions,{align:"space-between",children:s.jsxs(sx,{children:[k&&s.jsxs(pe,{variant:"secondary",size:"sm",onClick:x,disabled:b,"aria-label":"Download asset","data-testid":u?`${u}-download`:void 0,children:[s.jsx(J,{name:"download",size:"sm"}),"Download"]}),P&&s.jsxs(pe,{variant:"secondary",size:"sm",onClick:E,disabled:b,"aria-label":"Copy asset URL","data-testid":u?`${u}-copy`:void 0,children:[s.jsx(J,{name:"content_copy",size:"sm"}),"Copy"]}),R&&s.jsxs(pe,{variant:"secondary",size:"sm",onClick:F,disabled:b,"aria-label":"Go to asset","data-testid":u?`${u}-goto`:void 0,children:[s.jsx(J,{name:"launch",size:"sm"}),"Go to"]}),D&&s.jsxs(pe,{variant:"primary",size:"sm",onClick:j,disabled:b,"aria-label":"Insert link","data-testid":u?`${u}-insert-link`:void 0,children:[s.jsx(J,{name:"link",size:"sm"}),"Insert Link"]})]})}),S&&s.jsx(ax,{onClick:A=>A.stopPropagation(),children:s.jsx(ho,{presets:N,value:g??null,onChange:M,size:"sm",fullWidth:!0,showDetails:!0,placeholder:"Select preset...","data-testid":u?`${u}-preset-selector`:void 0})})]})})};go.displayName="AssetCard";const dx=$.div`
3403
+ `;function cx(e){return{...e,dimensions:e.customWidth&&e.customHeight?{width:e.customWidth,height:e.customHeight}:void 0}}const go=({asset:e,selected:t=!1,onSelect:r,onDownload:n,onInsertLink:o,onCopy:s,onGoto:l,allowedActions:c,className:d="","data-testid":u,draggable:f=!1,onDragStart:h,onDragEnd:m,presets:p,selectedPresetId:g,onPresetChange:v})=>{const y=c||e.allowedActions||[],b=br(e.isPublic??!1,y),w=()=>{r&&!b&&r(e.id)},x=A=>{A.stopPropagation(),n&&!b&&n(e.id)},j=A=>{A.stopPropagation(),o&&!b&&o(e.id)},E=A=>{A.stopPropagation(),s&&!b&&s(e.id)},F=A=>{A.stopPropagation(),l&&!b&&l(e.id)},T=A=>{if(!f||b){A.preventDefault();return}A.dataTransfer.setData("application/json",JSON.stringify({assetId:e.id,assetName:e.name,assetType:e.fileType,thumbnail:e.thumbnail})),A.dataTransfer.setData("text/plain",e.name),A.dataTransfer.effectAllowed="copy",h&&h(e,A)},L=A=>{m&&m(e,A)},M=A=>{v&&v(A)},k=n&&y.includes("resource_download"),D=o&&y.includes("resource_link")&&!b,P=s&&y.includes("copy"),R=l&&y.includes("goto"),S=p&&p.length>0&&v,O=k||D||P||R,N=p?p.map(cx):[];return i.jsx(lx,{$isDraggable:f&&!b,draggable:f&&!b,onDragStart:T,onDragEnd:L,children:i.jsxs(ot,{variant:"elevated",interactive:!0,selected:t,disabled:b,onClick:w,className:d,"aria-label":`Asset: ${e.name}`,"data-testid":u,children:[i.jsxs(q0,{children:[i.jsx(ot.Media,{src:e.thumbnail,alt:e.name,aspectRatio:"16:9"}),t&&i.jsx(X0,{children:i.jsx(J,{name:"check_circle",size:"md"})}),b&&i.jsx(Q0,{children:i.jsx(J,{name:"lock",size:"sm"})})]}),i.jsx(ot.Content,{children:i.jsxs(Z0,{children:[i.jsxs(J0,{children:[i.jsx(J,{name:po(e.filename||e.name),size:"sm"}),i.jsx(ex,{title:e.name,children:ul(e.name,30)})]}),e.description&&i.jsx(tx,{children:e.description}),i.jsxs(rx,{children:[i.jsx(nx,{children:e.fileType.toUpperCase()}),i.jsx(ox,{children:dl(e.fileSize)}),e.width&&e.height&&i.jsx(ix,{children:fl(e.width,e.height)})]})]})}),O&&i.jsx(ot.Actions,{align:"space-between",children:i.jsxs(sx,{children:[k&&i.jsxs(pe,{variant:"secondary",size:"sm",onClick:x,disabled:b,"aria-label":"Download asset","data-testid":u?`${u}-download`:void 0,children:[i.jsx(J,{name:"download",size:"sm"}),"Download"]}),P&&i.jsxs(pe,{variant:"secondary",size:"sm",onClick:E,disabled:b,"aria-label":"Copy asset URL","data-testid":u?`${u}-copy`:void 0,children:[i.jsx(J,{name:"content_copy",size:"sm"}),"Copy"]}),R&&i.jsxs(pe,{variant:"secondary",size:"sm",onClick:F,disabled:b,"aria-label":"Go to asset","data-testid":u?`${u}-goto`:void 0,children:[i.jsx(J,{name:"launch",size:"sm"}),"Go to"]}),D&&i.jsxs(pe,{variant:"primary",size:"sm",onClick:j,disabled:b,"aria-label":"Insert link","data-testid":u?`${u}-insert-link`:void 0,children:[i.jsx(J,{name:"link",size:"sm"}),"Insert Link"]})]})}),S&&i.jsx(ax,{onClick:A=>A.stopPropagation(),children:i.jsx(ho,{presets:N,value:g??null,onChange:M,size:"sm",fullWidth:!0,showDetails:!0,placeholder:"Select preset...","data-testid":u?`${u}-preset-selector`:void 0})})]})})};go.displayName="AssetCard";const dx=$.div`
3404
3404
  display: flex;
3405
3405
  align-items: center;
3406
3406
  gap: ${({theme:e})=>e.spacing[6]};
@@ -3503,12 +3503,12 @@
3503
3503
  color: ${({theme:e})=>e.colors.border.medium};
3504
3504
  display: flex;
3505
3505
  align-items: center;
3506
- `,mo=({folder:e,layout:t="card",selected:r=!1,onSelect:n,onClick:o,onDoubleClick:i,className:l="","data-testid":c})=>{const d=xr(e.isPublic,e.allowedActions),u=e.foldersCount===0&&e.resourcesCount===0,f=()=>{d||(n&&n(e.id),o&&o(e))},h=()=>{d||i&&i(e)},m=()=>e.thumbnail?s.jsx(it.Media,{src:e.thumbnail,alt:e.name,aspectRatio:"16:9"}):s.jsx(fx,{children:s.jsx(J,{name:"folder",size:"xl"})}),p=()=>e.thumbnail?s.jsx(hx,{src:e.thumbnail,alt:e.name,loading:"lazy"}):s.jsx(J,{name:"folder",size:"lg"}),g=()=>u||d?s.jsx(vx,{children:"Empty"}):s.jsxs(s.Fragment,{children:[e.foldersCount>0&&s.jsxs(Ui,{children:[e.foldersCount," sub-folder",e.foldersCount!==1?"s":""]}),e.resourcesCount>0&&s.jsxs(Ui,{children:[e.resourcesCount," item",e.resourcesCount!==1?"s":""]})]});return t==="list"?s.jsxs(dx,{className:l,$selected:r,$restricted:d,onClick:f,onDoubleClick:h,role:"button",tabIndex:0,"aria-label":`Folder: ${e.name}`,"aria-disabled":d,"data-testid":c,children:[s.jsx(px,{children:p()}),s.jsxs(xx,{children:[s.jsx(Vi,{children:e.name}),s.jsx(Gi,{children:g()})]}),s.jsx(yx,{children:s.jsx(J,{name:"chevron_right",size:"md"})})]}):s.jsxs(it,{variant:"elevated",interactive:!0,selected:r,disabled:d,onClick:f,className:l,"aria-label":`Folder: ${e.name}`,"data-testid":c,onDoubleClick:h,children:[s.jsxs(ux,{children:[m(),r&&s.jsx(gx,{children:s.jsx(J,{name:"check_circle",size:"md"})}),d&&s.jsx(mx,{children:s.jsx(J,{name:"lock",size:"sm"})})]}),s.jsx(it.Content,{children:s.jsxs(bx,{children:[s.jsx(Vi,{children:e.name}),s.jsx(Gi,{children:g()})]})})]})};mo.displayName="FolderCard";const wx=$.div`
3506
+ `,mo=({folder:e,layout:t="card",selected:r=!1,onSelect:n,onClick:o,onDoubleClick:s,className:l="","data-testid":c})=>{const d=br(e.isPublic,e.allowedActions),u=e.foldersCount===0&&e.resourcesCount===0,f=()=>{d||(n&&n(e.id),o&&o(e))},h=()=>{d||s&&s(e)},m=()=>e.thumbnail?i.jsx(ot.Media,{src:e.thumbnail,alt:e.name,aspectRatio:"16:9"}):i.jsx(fx,{children:i.jsx(J,{name:"folder",size:"xl"})}),p=()=>e.thumbnail?i.jsx(hx,{src:e.thumbnail,alt:e.name,loading:"lazy"}):i.jsx(J,{name:"folder",size:"lg"}),g=()=>u||d?i.jsx(vx,{children:"Empty"}):i.jsxs(i.Fragment,{children:[e.foldersCount>0&&i.jsxs(Ui,{children:[e.foldersCount," sub-folder",e.foldersCount!==1?"s":""]}),e.resourcesCount>0&&i.jsxs(Ui,{children:[e.resourcesCount," item",e.resourcesCount!==1?"s":""]})]});return t==="list"?i.jsxs(dx,{className:l,$selected:r,$restricted:d,onClick:f,onDoubleClick:h,role:"button",tabIndex:0,"aria-label":`Folder: ${e.name}`,"aria-disabled":d,"data-testid":c,children:[i.jsx(px,{children:p()}),i.jsxs(xx,{children:[i.jsx(Vi,{children:e.name}),i.jsx(Gi,{children:g()})]}),i.jsx(yx,{children:i.jsx(J,{name:"chevron_right",size:"md"})})]}):i.jsxs(ot,{variant:"elevated",interactive:!0,selected:r,disabled:d,onClick:f,className:l,"aria-label":`Folder: ${e.name}`,"data-testid":c,onDoubleClick:h,children:[i.jsxs(ux,{children:[m(),r&&i.jsx(gx,{children:i.jsx(J,{name:"check_circle",size:"md"})}),d&&i.jsx(mx,{children:i.jsx(J,{name:"lock",size:"sm"})})]}),i.jsx(ot.Content,{children:i.jsxs(bx,{children:[i.jsx(Vi,{children:e.name}),i.jsx(Gi,{children:g()})]})})]})};mo.displayName="FolderCard";const $x=$.div`
3507
3507
  display: flex;
3508
3508
  flex-direction: column;
3509
3509
  height: 100%;
3510
3510
  min-height: 0;
3511
- `,$x=$.div`
3511
+ `,wx=$.div`
3512
3512
  position: relative;
3513
3513
  flex: 1;
3514
3514
  min-height: 0;
@@ -3577,7 +3577,7 @@
3577
3577
  padding: 16px;
3578
3578
  border-top: 1px solid #f5f5f5;
3579
3579
  background-color: #fff;
3580
- `,Ut=$.button`
3580
+ `,Gt=$.button`
3581
3581
  display: flex;
3582
3582
  align-items: center;
3583
3583
  justify-content: center;
@@ -3609,5 +3609,183 @@
3609
3609
  padding: 0 4px;
3610
3610
  `,Ki=$.div`
3611
3611
  height: 100%;
3612
- `,Mx=(e,t,r=5)=>{if(t<=r)return Array.from({length:t},(c,d)=>d+1);const n=[],o=Math.floor(r/2);let i=Math.max(1,e-o),l=Math.min(t,e+o);e<=o?l=r-1:e>=t-o&&(i=t-r+2),i>1&&(n.push(1),i>2&&n.push("ellipsis"));for(let c=i;c<=l;c++)n.push(c);return l<t&&(l<t-1&&n.push("ellipsis"),n.push(t)),n},Ax=({pagination:e,onPageChange:t})=>{const{currentPage:r,totalPages:n}=e,o=Mx(r,n),i=()=>t(1),l=()=>t(Math.max(1,r-1)),c=()=>t(Math.min(n,r+1)),d=()=>t(n);return s.jsxs(Rx,{role:"navigation","aria-label":"Pagination",children:[s.jsx(Ut,{onClick:i,disabled:r===1,"aria-label":"Go to first page",children:s.jsx(J,{name:"keyboard_double_arrow_left",size:"sm"})}),s.jsx(Ut,{onClick:l,disabled:r===1,"aria-label":"Go to previous page",children:s.jsx(J,{name:"keyboard_arrow_left",size:"sm"})}),s.jsx(Dx,{children:o.map((u,f)=>u==="ellipsis"?s.jsx(Ox,{children:"…"},`ellipsis-${f}`):s.jsx(Ut,{$active:u===r,onClick:()=>t(u),"aria-label":`Go to page ${u}`,"aria-current":u===r?"page":void 0,children:u},u))}),s.jsx(Ut,{onClick:c,disabled:r===n,"aria-label":"Go to next page",children:s.jsx(J,{name:"keyboard_arrow_right",size:"sm"})}),s.jsx(Ut,{onClick:d,disabled:r===n,"aria-label":"Go to last page",children:s.jsx(J,{name:"keyboard_double_arrow_right",size:"sm"})})]})},Px=({message:e})=>s.jsxs(Lx,{children:[s.jsx(Tx,{children:s.jsx(J,{name:"folder_off",size:"lg"})}),s.jsx(Fx,{children:e})]}),vl=({folders:e,assets:t,layout:r="grid",columns:n,loading:o=!1,emptyMessage:i="No items to display",selectedIds:l=[],selectionMode:c="none",onFolderClick:d,onAssetClick:u,onSelectionChange:f,onDownload:h,onInsertLink:m,pagination:p,onPageChange:g,className:v="","data-testid":y})=>{const b=e.length===0&&t.length===0,w=a.useCallback(P=>{if(!(c==="none"||!f))if(c==="single")f([P]);else{const R=l.includes(P)?l.filter(S=>S!==P):[...l,P];f(R)}},[c,l,f]),x=a.useCallback(P=>{d&&d(P)},[d]),j=a.useCallback(P=>{w(P)},[w]),E=a.useCallback(P=>{w(P.id),u&&u(P)},[w,u]),F=a.useCallback(P=>{const R=t.find(S=>S.id===P);R&&h&&h(R)},[t,h]),T=a.useCallback(P=>{const R=t.find(S=>S.id===P);R&&m&&m(R)},[t,m]),L=a.useMemo(()=>{if(!(r!=="grid"||!n)&&typeof n=="number")return{gridTemplateColumns:`repeat(${n}, 1fr)`}},[r,n]),M=a.useCallback(P=>{if(!p||!g)return;const{currentPage:R,totalPages:S}=p;switch(P.key){case"ArrowLeft":R>1&&g(R-1);break;case"ArrowRight":R<S&&g(R+1);break;case"Home":g(1);break;case"End":g(S);break}},[p,g]),k=e.length>0&&t.length>0,D=r==="grid"?Cx:jx;return s.jsxs(wx,{className:v,"data-testid":y,onKeyDown:M,tabIndex:0,children:[s.jsxs($x,{children:[o&&s.jsx(Sx,{"data-testid":"loading-overlay",children:s.jsx(br,{size:"lg",label:"Loading items..."})}),s.jsx(kx,{children:b&&!o?s.jsx(Px,{message:i}):s.jsxs(s.Fragment,{children:[e.length>0&&s.jsx(D,{style:L,role:"list","aria-label":"Folders",children:e.map(P=>s.jsx(Ki,{role:"listitem",children:s.jsx(mo,{folder:P,layout:r==="list"?"list":"card",selected:l.includes(P.id),onSelect:j,onClick:x,onDoubleClick:x,"data-testid":`folder-${P.id}`})},P.id))}),k&&s.jsx(Ex,{}),t.length>0&&s.jsx(D,{style:L,role:"list","aria-label":"Assets",children:t.map(P=>s.jsx(Ki,{role:"listitem",children:s.jsx(go,{asset:P,selected:l.includes(P.id),onSelect:()=>E(P),onDownload:h?F:void 0,onInsertLink:m?T:void 0,"data-testid":`asset-${P.id}`})},P.id))})]})})]}),p&&g&&p.totalPages>1&&s.jsx(Ax,{pagination:p,onPageChange:g})]})};vl.displayName="AssetBrowser";const Nx="ib-wrapper-1iFlQ",zx="ib-logo-oOqF8",Bx="ib-container-IXOdr",Ix="ib-message-XWuvY",Wx="ib-link-zWtXY",Hx="ib-buttons-hmRJR",Lt={wrapper:Nx,logo:zx,container:Bx,message:Ix,link:Wx,buttons:Hx},yl=a.forwardRef(({logoSrc:e,logoAlt:t="Logo",loginUrl:r,onOpenBrowser:n,onContinue:o,onBack:i,className:l,"data-testid":c},d)=>{const u=a.useCallback(h=>{h.preventDefault(),n?n():r&&window.open(r,"_blank")},[n,r]),f=[Lt.wrapper,l].filter(Boolean).join(" ");return s.jsxs("div",{ref:d,className:f,"data-testid":c,children:[e&&s.jsx("div",{className:Lt.logo,"data-testid":c&&`${c}-logo`,children:s.jsx("img",{src:e,alt:t})}),s.jsxs("div",{className:Lt.container,"data-testid":c&&`${c}-container`,children:[s.jsxs("div",{className:Lt.message,"data-testid":c&&`${c}-message`,children:[s.jsxs("p",{children:["A new tab should now open automatically. If not, click"," ",s.jsx("a",{href:r||"#",onClick:u,className:Lt.link,children:"here"})," ","to open it manually."]}),s.jsxs("p",{children:["Once you are logged in via the browser, click ",s.jsx("strong",{children:"Continue"}),". To return to the standard Login page, click ",s.jsx("strong",{children:"Back"}),"."]})]}),s.jsxs("div",{className:Lt.buttons,"data-testid":c&&`${c}-buttons`,children:[s.jsx(pe,{variant:"secondary",onClick:i,fullWidth:!0,"data-testid":c&&`${c}-back-button`,children:"Back"}),s.jsx(pe,{variant:"primary",onClick:o,fullWidth:!0,"data-testid":c&&`${c}-continue-button`,children:"Continue"})]})]})]})});yl.displayName="BrowserLoginConfirmation";const _x="ib-filtersPanel-VVGiC",Vx="ib-header-BOm1U",Gx="ib-headerLeft-O6XWd",Ux="ib-title-05o59",Kx="ib-filterCount-SErHq",Yx="ib-actions-kZQMV",qx="ib-clearButton-dlL-0 ib-actionButton-pDYMM",Xx="ib-closeButton-tISvq ib-actionButton-pDYMM",Qx="ib-filtersGrid-ZzhEJ",Zx="ib-filterItem-T--7N",Jx="ib-filterLabel-YFuo6",ev="ib-filtersScrollArea-JZZtw",De={filtersPanel:_x,header:Vx,headerLeft:Gx,title:Ux,filterCount:Kx,actions:Yx,clearButton:qx,closeButton:Xx,filtersGrid:Qx,filterItem:Zx,filterLabel:Jx,filtersScrollArea:ev},wl=a.forwardRef(({isOpen:e,onClose:t,filters:r,values:n,onChange:o,onClearAll:i,clearButtonLabel:l="Clear All",closeButtonLabel:c="Close",title:d="Filters",showFilterCount:u=!0,className:f,testId:h},m)=>{const p=a.useMemo(()=>Object.values(n).reduce((w,x)=>w+((x==null?void 0:x.length)||0),0),[n]),g=a.useCallback(w=>x=>{o(w,x)},[o]),v=a.useCallback(()=>{i()},[i]),y=a.useCallback(()=>{t()},[t]),b=[De.filtersPanel,f].filter(Boolean).join(" ");return s.jsxs("div",{ref:m,className:b,"data-open":e,"data-testid":h,role:"region","aria-label":d,"aria-hidden":!e,children:[s.jsxs("div",{className:De.header,children:[s.jsxs("div",{className:De.headerLeft,children:[s.jsx("h3",{className:De.title,children:d}),u&&p>0&&s.jsx("span",{className:De.filterCount,"aria-label":`${p} active filters`,children:p})]}),s.jsxs("div",{className:De.actions,children:[s.jsx("button",{type:"button",className:De.clearButton,onClick:v,"data-has-selections":p>0,disabled:p===0,"aria-label":l,"data-testid":h?`${h}-clear`:void 0,children:l}),s.jsx("button",{type:"button",className:De.closeButton,onClick:y,"aria-label":c,"data-testid":h?`${h}-close`:void 0,children:c})]})]}),s.jsx("div",{className:De.filtersScrollArea,children:s.jsx("div",{className:De.filtersGrid,children:r.map(w=>{const x=n[w.key]||[];return s.jsxs("div",{className:De.filterItem,"data-testid":h?`${h}-filter-${w.key}`:void 0,children:[s.jsx("label",{className:De.filterLabel,children:w.label}),s.jsx(lo,{options:w.options,value:x,onChange:g(w.key),placeholder:w.placeholder||`Select ${w.label.toLowerCase()}...`,size:"sm",fullWidth:!0,"data-testid":h?`${h}-multiselect-${w.key}`:void 0})]},w.key)})})})]})});wl.displayName="FiltersPanel";const tv="ib-tree-dod8j",rv="ib-treeList-LHWzD",nv="ib-treeListNested-Gby9x",ov="ib-treeItem-nm5C5",iv="ib-treeItemRow-uaj9-",sv="ib-selected-VMLCg",av="ib-indentSm-EIf9j",lv="ib-indentMd-CATCZ",cv="ib-indentLg-nyy-7",dv="ib-toggleButton-VNOJ4",uv="ib-toggleIcon-T4c-f",fv="ib-expanded-V2zZZ",pv="ib-togglePlaceholder-psBOL",hv="ib-folderIcon-E2jB4",gv="ib-folderName-ZDHeu",mv="ib-counts-fVtd1",bv="ib-countBadge-4ezFo",xv="ib-countIcon-I9GHP",vv="ib-loadingIndicator-IDG4A",yv="ib-spinner--05h2",wv="ib-rootItem-VdcVt",$v="ib-emptyState-ZR1un",kv="ib-emptyIcon-KVsrU",Cv="ib-emptyMessage-i5xof",jv="ib-loadingState-aiqE8",Ev="ib-loadingSpinner-I6Grx",Sv="ib-childrenContainer-NwzsC",Lv="ib-collapsed-n5V-k",Q={tree:tv,treeList:rv,treeListNested:nv,treeItem:ov,treeItemRow:iv,selected:sv,indentSm:av,indentMd:lv,indentLg:cv,toggleButton:dv,toggleIcon:uv,expanded:fv,togglePlaceholder:pv,folderIcon:hv,folderName:gv,counts:mv,countBadge:bv,countIcon:xv,loadingIndicator:vv,spinner:yv,rootItem:wv,emptyState:$v,emptyIcon:kv,emptyMessage:Cv,loadingState:jv,loadingSpinner:Ev,childrenContainer:Sv,collapsed:Lv},Tv=e=>{switch(e){case"sm":return Q.indentSm;case"lg":return Q.indentLg;default:return Q.indentMd}},In=({folder:e,depth:t,isSelected:r,isExpanded:n,indentSize:o,showCounts:i,expandedIds:l,selectedId:c,onSelect:d,onToggle:u,onLoadChildren:f})=>{var w;const h=e.children&&e.children.length>0||e.foldersCount!==void 0&&e.foldersCount>0,m=e.isLoading||!1,p=a.useCallback(()=>{d(e)},[e,d]),g=a.useCallback(async x=>{var E;if(x.stopPropagation(),m)return;const j=!n;j&&f&&!((E=e.children)!=null&&E.length)&&await f(e.id),u(e.id,j)},[e.id,(w=e.children)==null?void 0:w.length,n,m,u,f]),v=a.useCallback(x=>{switch(x.key){case"Enter":case" ":x.preventDefault(),p();break;case"ArrowRight":x.preventDefault(),!n&&h&&g(x);break;case"ArrowLeft":x.preventDefault(),n&&h&&g(x);break}},[p,g,n,h]),y=a.useCallback(x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),g(x))},[g]),b=Tv(o);return s.jsxs("li",{className:Q.treeItem,role:"treeitem","aria-expanded":h?n:void 0,"aria-selected":r,children:[s.jsxs("div",{className:`${Q.treeItemRow} ${b} ${r?Q.selected:""}`,style:{"--depth":t},onClick:p,onKeyDown:v,tabIndex:0,"aria-label":`Folder: ${e.name}`,"data-folder-id":e.id,children:[h?m?s.jsx("div",{className:Q.loadingIndicator,"aria-label":"Loading",children:s.jsx("div",{className:Q.spinner})}):s.jsx("button",{className:Q.toggleButton,onClick:g,onKeyDown:y,"aria-label":n?"Collapse folder":"Expand folder",tabIndex:-1,children:s.jsx(J,{name:"chevron_right",size:"sm",className:`${Q.toggleIcon} ${n?Q.expanded:""}`})}):s.jsx("div",{className:Q.togglePlaceholder,"aria-hidden":"true"}),s.jsx("div",{className:`${Q.folderIcon} ${r?Q.selected:""}`,children:s.jsx(J,{name:n?"folder_open":"folder",size:"sm"})}),s.jsx("span",{className:`${Q.folderName} ${r?Q.selected:""}`,children:e.name}),i&&s.jsxs("div",{className:Q.counts,children:[e.foldersCount!==void 0&&e.foldersCount>0&&s.jsxs("span",{className:Q.countBadge,children:[s.jsx(J,{name:"folder",size:"sm",className:Q.countIcon}),e.foldersCount]}),e.resourcesCount!==void 0&&e.resourcesCount>0&&s.jsxs("span",{className:Q.countBadge,children:[s.jsx(J,{name:"insert_drive_file",size:"sm",className:Q.countIcon}),e.resourcesCount]})]})]}),h&&e.children&&e.children.length>0&&s.jsx("ul",{className:`${Q.treeListNested} ${Q.childrenContainer} ${n?"":Q.collapsed}`,role:"group",children:e.children.map(x=>s.jsx(In,{folder:x,depth:t+1,isSelected:c===x.id,isExpanded:l.includes(x.id),indentSize:o,showCounts:i,expandedIds:l,selectedId:c,onSelect:d,onToggle:u,onLoadChildren:f},x.id))})]})},$l=({folders:e,selectedId:t=null,expandedIds:r=[],onSelect:n,onToggleExpand:o,onLoadChildren:i,showCounts:l=!1,showRoot:c=!1,rootName:d="Home",indentSize:u="md",loading:f=!1,emptyMessage:h="No folders found",className:m="","data-testid":p})=>{const g=a.useCallback(x=>{n==null||n(x)},[n]),v=a.useCallback((x,j)=>{o==null||o(x,j)},[o]),y=a.useMemo(()=>({id:"root",name:d,parentId:null,children:e,foldersCount:e.length}),[d,e]),b=t==="root",w=r.includes("root")||!c;return f?s.jsx("div",{className:`${Q.tree} ${m}`,"data-testid":p,role:"tree","aria-label":"Folder tree loading",children:s.jsx("div",{className:Q.loadingState,children:s.jsx("div",{className:Q.loadingSpinner,"aria-label":"Loading folders"})})}):e.length===0&&!c?s.jsx("div",{className:`${Q.tree} ${m}`,"data-testid":p,role:"tree","aria-label":"Empty folder tree",children:s.jsxs("div",{className:Q.emptyState,children:[s.jsx(J,{name:"folder_off",size:"xl",className:Q.emptyIcon}),s.jsx("p",{className:Q.emptyMessage,children:h})]})}):s.jsx("div",{className:`${Q.tree} ${m}`,"data-testid":p,children:s.jsx("ul",{className:Q.treeList,role:"tree","aria-label":"Folder navigation",children:c?s.jsxs("li",{className:`${Q.treeItem} ${Q.rootItem}`,role:"treeitem","aria-expanded":w,"aria-selected":b,children:[s.jsxs("div",{className:`${Q.treeItemRow} ${b?Q.selected:""}`,onClick:()=>g(y),onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),g(y))},tabIndex:0,"aria-label":`Root folder: ${d}`,"data-folder-id":"root",children:[s.jsx("button",{className:Q.toggleButton,onClick:x=>{x.stopPropagation(),v("root",!w)},"aria-label":w?"Collapse root folder":"Expand root folder",tabIndex:-1,children:s.jsx(J,{name:"chevron_right",size:"sm",className:`${Q.toggleIcon} ${w?Q.expanded:""}`})}),s.jsx("div",{className:`${Q.folderIcon} ${b?Q.selected:""}`,children:s.jsx(J,{name:w?"folder_open":"folder",size:"sm"})}),s.jsx("span",{className:`${Q.folderName} ${b?Q.selected:""}`,children:d}),l&&e.length>0&&s.jsx("div",{className:Q.counts,children:s.jsxs("span",{className:Q.countBadge,children:[s.jsx(J,{name:"folder",size:"sm",className:Q.countIcon}),e.length]})})]}),w&&e.length>0&&s.jsx("ul",{className:Q.treeListNested,role:"group",children:e.map(x=>s.jsx(In,{folder:x,depth:1,isSelected:t===x.id,isExpanded:r.includes(x.id),indentSize:u,showCounts:l,expandedIds:r,selectedId:t,onSelect:g,onToggle:v,onLoadChildren:i},x.id))})]}):e.map(x=>s.jsx(In,{folder:x,depth:0,isSelected:t===x.id,isExpanded:r.includes(x.id),indentSize:u,showCounts:l,expandedIds:r,selectedId:t,onSelect:g,onToggle:v,onLoadChildren:i},x.id))})})};$l.displayName="FolderTree";const Fv="ib-loginWrapper-6xUZb",Rv="ib-loginForm-oCZT4",Dv="ib-logo-WRzFO",Ov="ib-description-XBLnN",Mv="ib-form-t-9w6",Av="ib-inputGroup-pRH-H",Pv="ib-urlInputWrapper-t3pCR",Nv="ib-domainSuffix-Ht1ZW",zv="ib-checkboxRow-F7V0K",Bv="ib-browserLoginRow-PAk57",Iv="ib-checkbox-VTHTu",Wv="ib-checkboxLabel-wzE9R",Hv="ib-buttons-gBtIB",_v="ib-error-rVyww",Vv="ib-errorMessage-lW3RK",ue={loginWrapper:Fv,loginForm:Rv,logo:Dv,description:Ov,form:Mv,inputGroup:Av,urlInputWrapper:Pv,domainSuffix:Nv,checkboxRow:zv,browserLoginRow:Bv,checkbox:Iv,checkboxLabel:Wv,buttons:Hv,error:_v,errorMessage:Vv},kl=a.forwardRef(({loginMethod:e="credentials",onSubmit:t,onSsoLogin:r,error:n,loading:o=!1,logoSrc:i,logoAlt:l="Logo",className:c,"data-testid":d},u)=>{const f=a.useId(),[h,m]=a.useState(""),[p,g]=a.useState(""),[v,y]=a.useState(""),[b,w]=a.useState(!1),[x,j]=a.useState(e==="sso"),E=!x,F=e==="both"||e==="sso",T=a.useCallback(S=>{const O=S.trim().replace(/^https?:\/\//,"");return!b&&O?O+".intelligencebank.com":O},[b]),L=E?h.trim()!==""&&p.trim()!==""&&v.trim()!=="":h.trim()!=="",M=a.useCallback(S=>{if(S.preventDefault(),!L)return;const O=T(h);if(x&&r)r(O);else{const N={url:O,email:p.trim(),password:v};t(N)}},[L,h,p,v,x,r,t,T]),k=a.useCallback(S=>{const O=S.target.value.replace(/^https?:\/\//,"");m(O)},[]),D=a.useCallback(S=>{w(S.target.checked)},[]),P=a.useCallback(S=>{j(S.target.checked)},[]),R=[ue.loginForm,c].filter(Boolean).join(" ");return s.jsxs("div",{className:ue.loginWrapper,"data-testid":d,children:[i&&s.jsx("div",{className:ue.logo,"data-testid":d&&`${d}-logo`,children:s.jsx("img",{src:i,alt:l})}),s.jsxs("div",{className:R,children:[s.jsx("p",{className:ue.description,children:"Login to your IntelligenceBank account by entering your credentials below."}),n&&s.jsx("div",{className:ue.error,role:"alert","data-testid":d&&`${d}-error`,children:s.jsx("p",{className:ue.errorMessage,children:n})}),s.jsxs("form",{ref:u,id:f,className:ue.form,onSubmit:M,noValidate:!0,"data-testid":d&&`${d}-form`,children:[s.jsxs("div",{className:ue.inputGroup,children:[s.jsxs("div",{className:ue.urlInputWrapper,children:[s.jsx(Pt,{type:"text",label:"URL (without https://)",placeholder:b?"mycompany.example.com":"mycompany",value:h,onChange:k,disabled:o,fullWidth:!0,required:!0,"data-testid":d&&`${d}-url`}),!b&&s.jsx("span",{className:ue.domainSuffix,"data-testid":d&&`${d}-domain-suffix`,children:".intelligencebank.com"})]}),s.jsxs("div",{className:ue.checkboxRow,children:[s.jsx("input",{type:"checkbox",id:`${f}-custom-url`,className:ue.checkbox,checked:b,onChange:D,disabled:o,"data-testid":d&&`${d}-custom-url-toggle`}),s.jsx("label",{htmlFor:`${f}-custom-url`,className:ue.checkboxLabel,children:"Custom URL"})]})]}),E&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:ue.inputGroup,children:s.jsx(Pt,{type:"email",label:"Email",placeholder:"Enter your email",value:p,onChange:S=>g(S.target.value),disabled:o,fullWidth:!0,required:!0,autoComplete:"email","data-testid":d&&`${d}-email`})}),s.jsx("div",{className:ue.inputGroup,children:s.jsx(Pt,{type:"password",label:"Password",placeholder:"Enter your password",value:v,onChange:S=>y(S.target.value),disabled:o,fullWidth:!0,required:!0,autoComplete:"current-password","data-testid":d&&`${d}-password`})})]}),s.jsx("div",{className:ue.buttons,children:s.jsx(pe,{type:"submit",variant:"primary",disabled:o||!L,loading:o,fullWidth:!0,"data-testid":d&&`${d}-submit`,children:"Login"})}),F&&s.jsxs("div",{className:ue.browserLoginRow,children:[s.jsx("input",{type:"checkbox",id:`${f}-browser-login`,className:ue.checkbox,checked:x,onChange:P,disabled:o,"data-testid":d&&`${d}-browser-login-toggle`}),s.jsx("label",{htmlFor:`${f}-browser-login`,className:ue.checkboxLabel,children:"Browser Login (for SSO Users)"})]})]})]})]})});kl.displayName="LoginForm";const Gv="ib-navbar--vIlt",Uv="ib-leftSection-t6e3v",Kv="ib-logoContainer-4buKS",Yv="ib-logo-Czmtt",qv="ib-title-db-od",Xv="ib-centerSection-vynBU",Qv="ib-rightSection-1k27M",Zv="ib-actions-5JsMF",Jv="ib-actionButton-9AS7x",Ke={navbar:Gv,leftSection:Uv,logoContainer:Kv,logo:Yv,title:qv,centerSection:Xv,rightSection:Qv,actions:Zv,actionButton:Jv};function ey({logoSrc:e,logoAlt:t="Logo",onLogoClick:r,title:n,actions:o=[],menuItems:i=[],menuLabel:l="Menu",collapseBreakpoint:c=480,variant:d="light",sticky:u=!1,className:f,children:h,"data-testid":m="navbar"}){const[p,g]=a.useState(!1),v=a.useRef(null),y=a.useCallback(()=>{typeof window<"u"&&g(window.innerWidth<=c)},[c]);a.useEffect(()=>(y(),window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)),[y]);const b=p?o.map(L=>({id:L.id,displayText:L.label,icon:s.jsx(J,{name:L.icon,size:16}),onClick:L.onClick,disabled:L.disabled})):[],w=i.map(L=>({id:L.id,displayText:L.label,icon:L.icon?s.jsx(J,{name:L.icon,size:16}):void 0,onClick:L.onClick,disabled:L.disabled})),x=[];b.length>0&&(x.push(...b),w.length>0&&x.push({type:"divider"})),x.push(...w);const j=()=>{r&&r()},E=L=>{r&&(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),r())},F=L=>s.jsx(Wt,{content:L.tooltip||L.label,children:s.jsx("button",{type:"button",className:Ke.actionButton,onClick:L.onClick,disabled:L.disabled,"aria-label":L.label,"data-testid":`navbar-action-${L.id}`,children:s.jsx(J,{name:L.icon,size:20})})},L.id),T=x.length>0;return s.jsxs("nav",{ref:v,className:`${Ke.navbar} ${f||""}`,"data-variant":d,"data-sticky":u,"data-testid":m,role:"navigation","aria-label":"Main navigation",children:[s.jsxs("div",{className:Ke.leftSection,children:[s.jsx("div",{className:Ke.logoContainer,"data-clickable":!!r,onClick:j,onKeyDown:E,role:r?"button":void 0,tabIndex:r?0:void 0,"aria-label":r?`${t} - Click to go home`:void 0,children:s.jsx("img",{src:e,alt:t,className:Ke.logo})}),n&&s.jsx("span",{className:Ke.title,children:n})]}),h&&s.jsx("div",{className:Ke.centerSection,children:h}),s.jsxs("div",{className:Ke.rightSection,children:[!p&&o.length>0&&s.jsx("div",{className:Ke.actions,"data-testid":"navbar-actions",children:o.map(F)}),T&&s.jsx(un,{items:x,placement:"bottom-end",inverse:d==="dark","aria-label":l,"data-testid":"navbar-menu"})]})]})}const ty="ib-searchForm-dHPlb",ry="ib-inputWrapper-BMVqy",ny="ib-clearButton-vxHxg",En={searchForm:ty,inputWrapper:ry,clearButton:ny},Cl=a.forwardRef(({value:e,onChange:t,onSubmit:r,onClear:n,placeholder:o="Search...",size:i="md",autoFocus:l=!1,showButton:c=!1,buttonText:d="Search",loading:u=!1,disabled:f=!1,debounceMs:h=0,className:m,"data-testid":p},g)=>{const v=a.useRef(null),y=a.useRef(null),b=g||y;a.useEffect(()=>()=>{v.current&&clearTimeout(v.current)},[]);const w=a.useCallback(D=>{const P=D.target.value;t(P),h>0&&(v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{r(P)},h))},[t,r,h]),x=a.useCallback(D=>{D==null||D.preventDefault(),v.current&&(clearTimeout(v.current),v.current=null),r(e)},[r,e]),j=a.useCallback(D=>{D.key==="Enter"&&(D.preventDefault(),x())},[x]),E=a.useCallback(()=>{var D;v.current&&(clearTimeout(v.current),v.current=null),t(""),n==null||n(),(D=b.current)==null||D.focus()},[t,n,b]),F=e.length>0,T=f||u,L=u?s.jsx(br,{size:"sm",label:"Searching...","data-testid":p&&`${p}-spinner`}):s.jsx(J,{name:"search",size:"sm","aria-hidden":!0}),M=F&&!T?s.jsx("button",{type:"button",className:En.clearButton,onClick:E,"aria-label":"Clear search","data-testid":p&&`${p}-clear`,children:s.jsx(J,{name:"close",size:"sm"})}):null,k=[En.searchForm,m].filter(Boolean).join(" ");return s.jsxs("form",{className:k,onSubmit:x,role:"search","data-size":i,"data-testid":p,children:[s.jsx("div",{className:En.inputWrapper,children:s.jsx(Pt,{ref:b,type:"search",value:e,onChange:w,onKeyDown:j,placeholder:o,size:i,disabled:T,autoFocus:l,leftElement:L,rightElement:M,fullWidth:!0,"aria-label":o,"data-testid":p&&`${p}-input`})}),c&&s.jsx(pe,{type:"submit",variant:"primary",size:i,disabled:T,loading:u,"aria-label":d,"data-testid":p&&`${p}-button`,children:d})]})});Cl.displayName="SearchForm";const Ee={grey100:"#F7F7F7",grey150:"#E5E5E5",grey200:"#D9D9D9",grey300:"#BFBFBF",grey400:"#A1A1A1",grey500:"#737373",grey600:"#595959",grey700:"#3F3F3F",grey800:"#262626",grey900:"#191919"},ot={greenLighter:"#E5F6E8",greenLight:"#54C164",greenBase:"#2B8048",greenDark:"#046211",greenDarker:"#033707"},Ye={redLighter2:"#FCECE7",redLighter:"#FFE3E5",redLight:"#F16C71",redBase:"#CA212B",redDark:"#97090E",redDarker:"#5F0508"},Be={blueLighter2:"#E0EBFD",blueLighter:"#DDE9FC",blueLight:"#5493F0",blueBase:"#0053CD",blueDark:"#003B91",blueDarker:"#012355",blueLink:"#0066CC"},qe={orangeLighter2:"#FFEFC6",orangeLighter:"#FFEEDD",orangeLight:"#FFBA7C",orangeBase:"#F86C05",orangeDark:"#B3520C",orangeDarker:"#6D3106"},Rt={textColor:"#4a4a4a",textColorFade:"rgba(74,74,74, 0.5)",instructionColor:"#737474",helpTextColor:"#9b9b9b",whiteTextColor:"#ffffff",highlightTextColor:"#ffffff"},jl={lightGrey:"#727274",lighterGrey:"#9b9b9b",lightestGrey:"#f4f4f4"},Hr={borderGrey:"#d0d0d0",borderLighterGrey:"#e0e0e0",borderShadow:"#d8d8d8"},Jt={iconGrey:"#a3a3a3",iconGreyDisabled:"rgba(163,163,163, 0.5)",iconBackground:"rgba(0, 0, 0, 0.10)"},_r={backgroundProcessingColor:"rgba(163, 163, 163, .3)",backgroundWhiteColor:"#ffffff",rowGrey:"#f9f9f9"},El={whiteColor:"#ffffff",blackColor:"#000000",yellow:"#FFEFC6"},bt={successColor:"#21B63C",errorColor:"#d31818",warningColor:"#f88b07",infoColor:"#f88b07",noticeColor:"#FFA500"},er={snackbarErrorBackground:"#D01C23",snackbarSuccessBackground:"#108c27",snackbarWarningBackground:"#F97E24"},Vr={progressBarCompletedColor:"#108C27",progressBarErrorColor:"#D01C23"},Dt={transparentBlack50:"rgba(0, 0, 0, 0.50)",transparentBlack20:"rgba(0, 0, 0, 0.20)",transparentBlack08:"rgba(0, 0, 0, 0.08)",transparentBlack05:"rgba(0, 0, 0, 0.05)"},tr={transparentWhite50:"rgba(255,255,255,0.50)",transparentWhite20:"rgba(255,255,255,0.20)",transparentWhite05:"rgba(255,255,255,0.05)"},Sl="#F4770B",rt={PRIMARY_DEFAULT:"#ffffff",PRIMARY_TEXT_DEFAULT:"#000000",SECONDARY_DEFAULT:"#F68D32",SECONDARY_TEXT_DEFAULT:"#ffffff",HIGHLIGHT_DEFAULT:"#F4770B",HIGHLIGHT_TEXT_DEFAULT:"#ffffff"},Ll={userDefaultTextColor:"#000000",userDefaultBackgroundColor:"#ffffff"},Tl={sliderGrey:"#bdbdbd"},Tt={shadow100:"0px 1px 3px rgba(0, 0, 0, 0.25)",shadow200:"0px 2px 5px rgba(0, 0, 0, 0.25)",shadow300:"0px 3px 12px rgba(0, 0, 0, 0.25)",shadowFooter:"0px -1px 2px rgba(0, 0, 0, 0.25)",shadowSelected:"0px 2px 5px rgba(0, 0, 0, 0.50)"},Dr={borderRadiusSmall:"4px",borderRadiusMedium:"8px",borderRadiusLarge:"16px"},oy={...Ee,...jl},iy={green:ot,red:Ye,blue:Be,orange:qe},sy={grey:Ee,green:ot,red:Ye,blue:Be,orange:qe,status:bt,snackbar:er,progress:Vr,text:Rt,border:Hr,icon:Jt,background:_r,form:Tl,base:El,transparentBlack:Dt,transparentWhite:tr,highlight:Sl,palette:rt,user:Ll},ay=({theme:e=bo,children:t})=>s.jsx(z.ThemeProvider,{theme:e,children:t}),ly={100:Ee.grey100,150:Ee.grey150,200:Ee.grey200,300:Ee.grey300,400:Ee.grey400,500:Ee.grey500,600:Ee.grey600,700:Ee.grey700,800:Ee.grey800,900:Ee.grey900},cy={green:{lighter:ot.greenLighter,light:ot.greenLight,base:ot.greenBase,dark:ot.greenDark,darker:ot.greenDarker},red:{lighter2:Ye.redLighter2,lighter:Ye.redLighter,light:Ye.redLight,base:Ye.redBase,dark:Ye.redDark,darker:Ye.redDarker},blue:{lighter2:Be.blueLighter2,lighter:Be.blueLighter,light:Be.blueLight,base:Be.blueBase,dark:Be.blueDark,darker:Be.blueDarker,link:Be.blueLink},orange:{lighter2:qe.orangeLighter2,lighter:qe.orangeLighter,light:qe.orangeLight,base:qe.orangeBase,dark:qe.orangeDark,darker:qe.orangeDarker}},bo={colors:{primary:rt.PRIMARY_DEFAULT,primaryText:rt.PRIMARY_TEXT_DEFAULT,secondary:rt.SECONDARY_DEFAULT,secondaryText:rt.SECONDARY_TEXT_DEFAULT,highlight:rt.HIGHLIGHT_DEFAULT,highlightText:rt.HIGHLIGHT_TEXT_DEFAULT,white:"#FFFFFF",black:"#000000",text:{primary:Rt.textColor,secondary:"rgba(0, 0, 0, 0.7)",muted:"#949494",inverse:"#FFFFFF",fade:Rt.textColorFade,instruction:Rt.instructionColor,help:Rt.helpTextColor},status:{success:bt.successColor,error:bt.errorColor,warning:bt.warningColor,info:bt.infoColor,notice:bt.noticeColor},snackbar:{success:er.snackbarSuccessBackground,error:er.snackbarErrorBackground,warning:er.snackbarWarningBackground},progress:{complete:Vr.progressBarCompletedColor,error:Vr.progressBarErrorColor},background:{default:"#FFFFFF",hover:"#efefef",active:"#e8e8e8",disabled:"#eee",processing:_r.backgroundProcessingColor,row:_r.rowGrey},border:{light:"#f5f5f5",medium:"#BFBFBF",input:"#949494",dotted:"#eee",grey:Hr.borderGrey,shadow:Hr.borderShadow},icon:{grey:Jt.iconGrey,disabled:Jt.iconGreyDisabled,background:Jt.iconBackground},grey:ly,semantic:cy,transparent:{black50:Dt.transparentBlack50,black20:Dt.transparentBlack20,black08:Dt.transparentBlack08,black05:Dt.transparentBlack05,white50:tr.transparentWhite50,white20:tr.transparentWhite20,white05:tr.transparentWhite05}},typography:{fontFamily:'"Roboto", sans-serif',fontFamilyIcons:'"Material Icons"',fontSize:{xs:"12px",sm:"14px",base:"14px",md:"14.5px",lg:"15px",xl:"18px",icons:"24px"},fontWeight:{regular:400,medium:500,semibold:600,bold:700},lineHeight:{tight:"1.25",normal:"1.5",relaxed:"20px"}},spacing:{0:"0",px:"1px",1:"4px",2:"6px",3:"8px",4:"10px",5:"12px",6:"16px",7:"24px",8:"32px"},sizes:{buttonHeight:"36px",headerHeight:"48px",navHeight:"52px",thumbnailSmall:"96px",thumbnailLarge:"200px",iconSize:"24px"},borders:{radius:{sm:"4px",md:"8px",full:"9999px",small:Dr.borderRadiusSmall,medium:Dr.borderRadiusMedium,large:Dr.borderRadiusLarge},width:{thin:"1px",medium:"2px"}},shadows:{card:"0px 2px 8px 2px rgb(0 0 0 / 18%)",dropdown:"0px 2px 5px rgba(0, 0, 0, 0.25)",menu:"0 2px 8px rgba(0, 0, 0, 0.2)",snackbar:"0px 2px 5px rgb(0 0 0 / 25%)",ibUi:{100:Tt.shadow100,200:Tt.shadow200,300:Tt.shadow300,footer:Tt.shadowFooter,selected:Tt.shadowSelected}},transitions:{fast:"opacity 0.2s, transform 0.1s",normal:"200ms",slow:"400ms",easing:{slide:"cubic-bezier(0.17, 0.04, 0.03, 0.94)",easeOut:"cubic-bezier(0, 0, 0.2, 1)"}},zIndex:{base:0,header:1,dropdown:99,modal:1e3,snackbar:1e4}},dy=bo;function uy(e,t){return!t||t.length===0||t.length===1&&t.includes("list")?!0:e===!1}function fy(e){var t,r;if((t=e.file)!=null&&t.type)return e.file.type;if(e.type)return e.type;if(e.fancyFileType)return e.fancyFileType.toLowerCase();if((r=e.file)!=null&&r.name){const n=e.file.name.split(".");if(n.length>1){const o=n[n.length-1];if(o)return o.toLowerCase()}}return"unknown"}function py(e){var t;if((t=e.file)!=null&&t.type&&e.file.type.includes("/"))return e.file.type}function xo(e){var r,n;const t=uy(e.isPublic,e.allowedActions);return{id:e._id,name:e.name,thumbnail:e.thumbnail||"",fileType:fy(e),fileSize:((r=e.file)==null?void 0:r.size)??0,width:e.width,height:e.height,mimeType:py(e),filename:(n=e.file)==null?void 0:n.name,description:e.description,isPublic:e.isPublic??!t,allowedActions:e.allowedActions??[],versionNumber:e.versionNumber}}function Fl(e){return Array.isArray(e)?e.map(xo):[]}function hy(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t._id=="string"&&typeof t.name=="string"}function It(e){return{id:e._id,name:e.name,thumbnail:e.thumbnail,foldersCount:e.folders_count??0,resourcesCount:e.resources_count??0,isPublic:e.isPublic??!0,allowedActions:e.allowedActions??[],defaultOrder:e.defaultorder}}function Rl(e){return Array.isArray(e)?e.map(It):[]}function vo(e,t=null,r){return{id:e._id,name:e.name,parentId:t,children:r,foldersCount:e.folders_count??0,resourcesCount:e.resources_count??0,isPublic:e.isPublic??!0}}function Dl(e,t=null){return Array.isArray(e)?e.map(r=>vo(r,t)):[]}function gy(e){const t=new Map,r=[];for(const n of e)t.set(n._id,vo(n,n.parentId??null,[]));for(const n of e){const o=t.get(n._id);if(o)if(n.parentId){const i=t.get(n.parentId);i&&i.children?i.children.push(o):r.push(o)}else r.push(o)}return r}function my(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t._id=="string"&&typeof t.name=="string"}function cr(e,t=!1){const r=e._id||e.id||"",n=e.customWidth&&e.customHeight?{width:e.customWidth,height:e.customHeight}:void 0;return{id:r,name:e.name,fileType:e.fileType,fileSize:e.fileSize,customWidth:e.customWidth,customHeight:e.customHeight,dimensions:n,isOriginal:t}}function yo(e="Original"){return{id:"original",name:e,isOriginal:!0}}function Ol(e=[],t=[],r=!0){const n=[];if(r&&n.push(yo()),Array.isArray(e))for(const o of e)n.push(cr(o));if(Array.isArray(t))for(const o of t)n.push(cr(o));return n}function Ml(e=[],t=[],r=!0){const n=[];return r&&n.push({label:"File",presets:[yo()]}),Array.isArray(e)&&e.length>0&&n.push({label:"Asset Presets",presets:e.map(o=>cr(o))}),Array.isArray(t)&&t.length>0&&n.push({label:"Global Presets",presets:t.map(o=>cr(o))}),n}function Al(e,t=[],r=[]){const n=t.find(o=>o._id===e||o.id===e);return n||r.find(o=>o._id===e||o.id===e)}function by(e,t=[],r=[]){if(!e||e==="original")return;const n=Al(e,t,r);if(n)return{id:n._id||n.id||"",name:n.name,fileType:n.fileType,fileSize:n.fileSize,customWidth:n.customWidth,customHeight:n.customHeight}}function xy(e){return typeof e!="object"||e===null?!1:typeof e.name=="string"}function Pl(e){const{count:t=0,pageNumber:r=1,pageSize:n=20}=e,o=Math.ceil(t/n);return{currentPage:r,totalPages:o,totalItems:t,itemsPerPage:n}}function vy(e,t){const r=e.gridData||{},n=Rl(r.folder||[]),o=Fl(r.resource||[]),i=r.pagination||{},l=Pl(i),c=e.loading||e.isLoading||!1,d=r.currentFolder?It(r.currentFolder):void 0,u=r.parentFolder?It(r.parentFolder):void 0;return{folders:n,assets:o,loading:c,pagination:l,currentFolder:d,parentFolder:u}}function yy(e){const t=Dl(e.folderData||[]),r=e.currentFolderId||null,n=e.expandedFolderIds||[];return{folders:t,selectedId:r,expandedIds:n}}function wy(e){var r;const t=((r=e.gridData)==null?void 0:r.pagination)||{};return Pl(t)}function $y(e,t){var o;const n=(((o=e.gridData)==null?void 0:o.folder)||[])[t];return n?It(n):void 0}function ky(e,t){var o;const n=(((o=e.gridData)==null?void 0:o.resource)||[])[t];return n?xo(n):void 0}function Cy(e){var r;const t=(r=e.gridData)==null?void 0:r.currentFolder;return t?It(t):void 0}function jy(e,t=[]){const r=e.globalPresets||[];return Ml(t,r)}function Ey(e,t=[]){const r=e.globalPresets||[];return Ol(t,r)}function Sy(e,t,r){const n=(r==null?void 0:r.id)||"";return{onDownload:()=>{e.requestDownloadUrl&&n&&e.requestDownloadUrl(n)},onInsertLink:()=>{e.requestPublicUrl&&n&&e.requestPublicUrl(n)},onDragReady:()=>{e.prepareDrag&&n&&e.prepareDrag(n)},onClick:()=>{e.selectResource&&n&&e.selectResource(n)}}}function Ly(e,t){const r=(t==null?void 0:t.id)||"";return{onClick:()=>{e.openFolder&&r?e.openFolder(r):e.setCurrentFolder&&r&&e.setCurrentFolder(r)}}}function Ty(e){return t=>{e.openFolder?e.openFolder(t):e.setCurrentFolder&&e.setCurrentFolder(t)}}function Fy(e){return{onSelect:t=>{e.selectResource&&e.selectResource(t)},onDeselect:t=>{e.deselectResource&&e.deselectResource(t)},onToggle:t=>{e.toggleResourceSelection&&e.toggleResourceSelection(t)}}}function Ry(e,t){return r=>{e.requestDownloadUrl&&e.requestDownloadUrl(t,r)}}function Dy(){const[e,t]=a.useState([]),r=a.useCallback(l=>{t(c=>c.some(u=>u.id===l.id)?c.filter(u=>u.id!==l.id):[...c,l])},[]),n=a.useCallback(l=>{t(l)},[]),o=a.useCallback(()=>{t([])},[]),i=a.useCallback(l=>e.some(c=>c.id===l),[e]);return{selectedAssets:e,toggleSelection:r,selectAll:n,clearSelection:o,isSelected:i,selectionCount:e.length}}function Oy(e="root"){const[t,r]=a.useState(e),[n,o]=a.useState([]),i=a.useCallback(f=>{o(h=>[...h,t]),r(f)},[t]),l=a.useCallback(()=>{if(n.length===0)return;const f=n[n.length-1];o(h=>h.slice(0,-1)),f!==void 0&&r(f)},[n]),c=a.useCallback(()=>{o([]),r(e)},[e]),d=n.length>0;return{currentFolderId:t,folderHistory:n,navigateTo:i,goBack:l,goToRoot:c,canGoBack:d,isAtRoot:t===e}}function My(e=300){const[t,r]=a.useState(""),[n,o]=a.useState(""),[i,l]=a.useState(!1),c=a.useCallback(u=>{r(u),l(!0);const f=setTimeout(()=>{o(u),l(!1)},e);return()=>clearTimeout(f)},[e]),d=a.useCallback(()=>{r(""),o(""),l(!1)},[]);return{query:t,debouncedQuery:n,isSearching:i,updateQuery:c,clearSearch:d}}exports.amberTones=je.amberTones;exports.animation=je.animation;exports.borders=je.borders;exports.brandColors=je.brandColors;exports.colors=je.colors;exports.defaultTenantColors=je.defaultTenantColors;exports.goldenTones=je.goldenTones;exports.magentaTones=je.magentaTones;exports.midnightTones=je.midnightTones;exports.semanticColors=je.semanticColors;exports.shadows=je.shadows;exports.spacing=je.spacing;exports.tokens=je.tokens;exports.typography=je.typography;exports.Accordion=tl;exports.ActionMenuButtons=Yb;exports.AssetBrowser=vl;exports.AssetCard=go;exports.AssistiveMessage=Et;exports.BrowserLoginConfirmation=yl;exports.Button=pe;exports.Card=it;exports.Chip=Xa;exports.DOCUMENT_FORMATS=sl;exports.DRAG_DROP_SUPPORTED_FORMATS=nl;exports.DropZone=za;exports.DropdownMenu=un;exports.ErrorMessage=jt;exports.FieldLabel=Wr;exports.FiltersPanel=wl;exports.FolderCard=mo;exports.FolderTree=$l;exports.FormControl=Ka;exports.Grid=sc;exports.GridItem=Wn;exports.IMAGE_FORMATS=ol;exports.Icon=J;exports.Input=Pt;exports.LinearLoading=Za;exports.LoginForm=kl;exports.Message=dn;exports.Modal=mr;exports.ModalBody=so;exports.ModalFooter=ao;exports.ModalHeader=io;exports.Multiselect=lo;exports.NavBar=ey;exports.Overlay=Ja;exports.PRESET_SUPPORTED_FORMATS=rl;exports.Paginator=Ia;exports.PresetSelector=ho;exports.Radio=Va;exports.RadioGroup=km;exports.SearchForm=Cl;exports.Select=Fa;exports.Snackbar=co;exports.SnackbarProvider=qa;exports.Spinner=br;exports.Status=Qa;exports.Switch=Ha;exports.Tabs=Pa;exports.TextArea=Ua;exports.ThemeProvider=ay;exports.Tooltip=Wt;exports.VIDEO_FORMATS=il;exports.WarningMessage=nm;exports.adaptFolder=It;exports.adaptFolderToTree=vo;exports.adaptFolders=Rl;exports.adaptFoldersToTree=Dl;exports.adaptPreset=cr;exports.adaptPresets=Ol;exports.adaptPresetsWithCategories=Ml;exports.adaptResource=xo;exports.adaptResources=Fl;exports.allGreyColors=oy;exports.backgroundColors=_r;exports.baseColors=El;exports.blueColors=Be;exports.borderColors=Hr;exports.borderRadius=Dr;exports.buildFolderTree=gy;exports.canCopy=bl;exports.canDownload=gl;exports.canEdit=xl;exports.canGeneratePublicLink=ml;exports.createAssetCardActions=Sy;exports.createDownloadWithPresetHandler=Ry;exports.createFolderCardActions=Ly;exports.createFolderTreeSelectHandler=Ty;exports.createOriginalPreset=yo;exports.createSelectionHandlers=Fy;exports.defaultPaletteColors=rt;exports.findWebAppPreset=Al;exports.formColors=Tl;exports.formatDate=a0;exports.formatDimensions=fl;exports.formatFileSize=dl;exports.formatNumber=d0;exports.formatRelativeTime=l0;exports.gapSizeMap=qb;exports.getAssetBrowserProps=vy;exports.getAssetByIndex=ky;exports.getAvailableActions=pl;exports.getCurrentFolder=Cy;exports.getFileExtension=pt;exports.getFileTypeIcon=po;exports.getFolderByIndex=$y;exports.getFolderTreeProps=yy;exports.getFullPreset=by;exports.getMimeType=s0;exports.getPaginationInfo=wy;exports.getPermissionSummary=h0;exports.getPresetCategories=jy;exports.getPresetOptions=Ey;exports.greenColors=ot;exports.greyScale=Ee;exports.hasAllPermissions=f0;exports.hasAnyPermission=p0;exports.hasPermission=Ve;exports.highlightColor=Sl;exports.ibUiColors=sy;exports.ibUiSemanticColors=iy;exports.ibUiShadows=Tt;exports.iconColors=Jt;exports.isDocumentFile=cl;exports.isDropdownDivider=uo;exports.isDropdownHeader=fo;exports.isDropdownMenuItem=el;exports.isImageFile=al;exports.isPublicAsset=hl;exports.isRestrictedAsset=xr;exports.isVideoFile=ll;exports.isWebAppFolder=my;exports.isWebAppPreset=xy;exports.isWebAppResource=hy;exports.legacyGreyColors=jl;exports.orangeColors=qe;exports.pluralize=u0;exports.productionTheme=bo;exports.progressColors=Vr;exports.redColors=Ye;exports.snackbarColors=er;exports.statusColors=bt;exports.supportsDragDrop=i0;exports.supportsPresets=o0;exports.textColors=Rt;exports.theme=dy;exports.transparentBlack=Dt;exports.transparentWhite=tr;exports.truncateFilename=ul;exports.truncateText=c0;exports.useAssetSelection=Dy;exports.useFolderNavigation=Oy;exports.useSearch=My;exports.useSnackbar=Um;exports.userDefaultColors=Ll;
3612
+ `,Mx=(e,t,r=5)=>{if(t<=r)return Array.from({length:t},(c,d)=>d+1);const n=[],o=Math.floor(r/2);let s=Math.max(1,e-o),l=Math.min(t,e+o);e<=o?l=r-1:e>=t-o&&(s=t-r+2),s>1&&(n.push(1),s>2&&n.push("ellipsis"));for(let c=s;c<=l;c++)n.push(c);return l<t&&(l<t-1&&n.push("ellipsis"),n.push(t)),n},Ax=({pagination:e,onPageChange:t})=>{const{currentPage:r,totalPages:n}=e,o=Mx(r,n),s=()=>t(1),l=()=>t(Math.max(1,r-1)),c=()=>t(Math.min(n,r+1)),d=()=>t(n);return i.jsxs(Rx,{role:"navigation","aria-label":"Pagination",children:[i.jsx(Gt,{onClick:s,disabled:r===1,"aria-label":"Go to first page",children:i.jsx(J,{name:"keyboard_double_arrow_left",size:"sm"})}),i.jsx(Gt,{onClick:l,disabled:r===1,"aria-label":"Go to previous page",children:i.jsx(J,{name:"keyboard_arrow_left",size:"sm"})}),i.jsx(Dx,{children:o.map((u,f)=>u==="ellipsis"?i.jsx(Ox,{children:"…"},`ellipsis-${f}`):i.jsx(Gt,{$active:u===r,onClick:()=>t(u),"aria-label":`Go to page ${u}`,"aria-current":u===r?"page":void 0,children:u},u))}),i.jsx(Gt,{onClick:c,disabled:r===n,"aria-label":"Go to next page",children:i.jsx(J,{name:"keyboard_arrow_right",size:"sm"})}),i.jsx(Gt,{onClick:d,disabled:r===n,"aria-label":"Go to last page",children:i.jsx(J,{name:"keyboard_double_arrow_right",size:"sm"})})]})},Px=({message:e})=>i.jsxs(Lx,{children:[i.jsx(Tx,{children:i.jsx(J,{name:"folder_off",size:"lg"})}),i.jsx(Fx,{children:e})]}),vl=({folders:e,assets:t,layout:r="grid",columns:n,loading:o=!1,emptyMessage:s="No items to display",selectedIds:l=[],selectionMode:c="none",onFolderClick:d,onAssetClick:u,onSelectionChange:f,onDownload:h,onInsertLink:m,pagination:p,onPageChange:g,className:v="","data-testid":y})=>{const b=e.length===0&&t.length===0,w=a.useCallback(P=>{if(!(c==="none"||!f))if(c==="single")f([P]);else{const R=l.includes(P)?l.filter(S=>S!==P):[...l,P];f(R)}},[c,l,f]),x=a.useCallback(P=>{d&&d(P)},[d]),j=a.useCallback(P=>{w(P)},[w]),E=a.useCallback(P=>{w(P.id),u&&u(P)},[w,u]),F=a.useCallback(P=>{const R=t.find(S=>S.id===P);R&&h&&h(R)},[t,h]),T=a.useCallback(P=>{const R=t.find(S=>S.id===P);R&&m&&m(R)},[t,m]),L=a.useMemo(()=>{if(!(r!=="grid"||!n)&&typeof n=="number")return{gridTemplateColumns:`repeat(${n}, 1fr)`}},[r,n]),M=a.useCallback(P=>{if(!p||!g)return;const{currentPage:R,totalPages:S}=p;switch(P.key){case"ArrowLeft":R>1&&g(R-1);break;case"ArrowRight":R<S&&g(R+1);break;case"Home":g(1);break;case"End":g(S);break}},[p,g]),k=e.length>0&&t.length>0,D=r==="grid"?Cx:jx;return i.jsxs($x,{className:v,"data-testid":y,onKeyDown:M,tabIndex:0,children:[i.jsxs(wx,{children:[o&&i.jsx(Sx,{"data-testid":"loading-overlay",children:i.jsx(mr,{size:"lg",label:"Loading items..."})}),i.jsx(kx,{children:b&&!o?i.jsx(Px,{message:s}):i.jsxs(i.Fragment,{children:[e.length>0&&i.jsx(D,{style:L,role:"list","aria-label":"Folders",children:e.map(P=>i.jsx(Ki,{role:"listitem",children:i.jsx(mo,{folder:P,layout:r==="list"?"list":"card",selected:l.includes(P.id),onSelect:j,onClick:x,onDoubleClick:x,"data-testid":`folder-${P.id}`})},P.id))}),k&&i.jsx(Ex,{}),t.length>0&&i.jsx(D,{style:L,role:"list","aria-label":"Assets",children:t.map(P=>i.jsx(Ki,{role:"listitem",children:i.jsx(go,{asset:P,selected:l.includes(P.id),onSelect:()=>E(P),onDownload:h?F:void 0,onInsertLink:m?T:void 0,"data-testid":`asset-${P.id}`})},P.id))})]})})]}),p&&g&&p.totalPages>1&&i.jsx(Ax,{pagination:p,onPageChange:g})]})};vl.displayName="AssetBrowser";const Nx="ib-wrapper-1iFlQ",zx="ib-logo-oOqF8",Ix="ib-container-IXOdr",Bx="ib-message-XWuvY",Wx="ib-link-zWtXY",Hx="ib-buttons-hmRJR",St={wrapper:Nx,logo:zx,container:Ix,message:Bx,link:Wx,buttons:Hx},yl=a.forwardRef(({logoSrc:e,logoAlt:t="Logo",loginUrl:r,onOpenBrowser:n,onContinue:o,onBack:s,className:l,"data-testid":c},d)=>{const u=a.useCallback(h=>{h.preventDefault(),n?n():r&&window.open(r,"_blank")},[n,r]),f=[St.wrapper,l].filter(Boolean).join(" ");return i.jsxs("div",{ref:d,className:f,"data-testid":c,children:[e&&i.jsx("div",{className:St.logo,"data-testid":c&&`${c}-logo`,children:i.jsx("img",{src:e,alt:t})}),i.jsxs("div",{className:St.container,"data-testid":c&&`${c}-container`,children:[i.jsxs("div",{className:St.message,"data-testid":c&&`${c}-message`,children:[i.jsxs("p",{children:["A new tab should now open automatically. If not, click"," ",i.jsx("a",{href:r||"#",onClick:u,className:St.link,children:"here"})," ","to open it manually."]}),i.jsxs("p",{children:["Once you are logged in via the browser, click ",i.jsx("strong",{children:"Continue"}),". To return to the standard Login page, click ",i.jsx("strong",{children:"Back"}),"."]})]}),i.jsxs("div",{className:St.buttons,"data-testid":c&&`${c}-buttons`,children:[i.jsx(pe,{variant:"secondary",onClick:s,fullWidth:!0,"data-testid":c&&`${c}-back-button`,children:"Back"}),i.jsx(pe,{variant:"primary",onClick:o,fullWidth:!0,"data-testid":c&&`${c}-continue-button`,children:"Continue"})]})]})]})});yl.displayName="BrowserLoginConfirmation";const _x="ib-filtersPanel-VVGiC",Vx="ib-header-BOm1U",Gx="ib-headerLeft-O6XWd",Ux="ib-title-05o59",Kx="ib-filterCount-SErHq",Yx="ib-actions-kZQMV",qx="ib-clearButton-dlL-0 ib-actionButton-pDYMM",Xx="ib-closeButton-tISvq ib-actionButton-pDYMM",Qx="ib-filtersGrid-ZzhEJ",Zx="ib-filterItem-T--7N",Jx="ib-filterLabel-YFuo6",ev="ib-filtersScrollArea-JZZtw",De={filtersPanel:_x,header:Vx,headerLeft:Gx,title:Ux,filterCount:Kx,actions:Yx,clearButton:qx,closeButton:Xx,filtersGrid:Qx,filterItem:Zx,filterLabel:Jx,filtersScrollArea:ev},$l=a.forwardRef(({isOpen:e,onClose:t,filters:r,values:n,onChange:o,onClearAll:s,clearButtonLabel:l="Clear All",closeButtonLabel:c="Close",title:d="Filters",showFilterCount:u=!0,className:f,testId:h},m)=>{const p=a.useMemo(()=>Object.values(n).reduce((w,x)=>w+((x==null?void 0:x.length)||0),0),[n]),g=a.useCallback(w=>x=>{o(w,x)},[o]),v=a.useCallback(()=>{s()},[s]),y=a.useCallback(()=>{t()},[t]),b=[De.filtersPanel,f].filter(Boolean).join(" ");return i.jsxs("div",{ref:m,className:b,"data-open":e,"data-testid":h,role:"region","aria-label":d,"aria-hidden":!e,children:[i.jsxs("div",{className:De.header,children:[i.jsxs("div",{className:De.headerLeft,children:[i.jsx("h3",{className:De.title,children:d}),u&&p>0&&i.jsx("span",{className:De.filterCount,"aria-label":`${p} active filters`,children:p})]}),i.jsxs("div",{className:De.actions,children:[i.jsx("button",{type:"button",className:De.clearButton,onClick:v,"data-has-selections":p>0,disabled:p===0,"aria-label":l,"data-testid":h?`${h}-clear`:void 0,children:l}),i.jsx("button",{type:"button",className:De.closeButton,onClick:y,"aria-label":c,"data-testid":h?`${h}-close`:void 0,children:c})]})]}),i.jsx("div",{className:De.filtersScrollArea,children:i.jsx("div",{className:De.filtersGrid,children:r.map(w=>{const x=n[w.key]||[];return i.jsxs("div",{className:De.filterItem,"data-testid":h?`${h}-filter-${w.key}`:void 0,children:[i.jsx("label",{className:De.filterLabel,children:w.label}),i.jsx(lo,{options:w.options,value:x,onChange:g(w.key),placeholder:w.placeholder||`Select ${w.label.toLowerCase()}...`,size:"sm",fullWidth:!0,"data-testid":h?`${h}-multiselect-${w.key}`:void 0})]},w.key)})})})]})});$l.displayName="FiltersPanel";const tv="ib-tree-dod8j",rv="ib-treeList-LHWzD",nv="ib-treeListNested-Gby9x",ov="ib-treeItem-nm5C5",iv="ib-treeItemRow-uaj9-",sv="ib-selected-VMLCg",av="ib-indentSm-EIf9j",lv="ib-indentMd-CATCZ",cv="ib-indentLg-nyy-7",dv="ib-toggleButton-VNOJ4",uv="ib-toggleIcon-T4c-f",fv="ib-expanded-V2zZZ",pv="ib-togglePlaceholder-psBOL",hv="ib-folderIcon-E2jB4",gv="ib-folderName-ZDHeu",mv="ib-counts-fVtd1",bv="ib-countBadge-4ezFo",xv="ib-countIcon-I9GHP",vv="ib-loadingIndicator-IDG4A",yv="ib-spinner--05h2",$v="ib-rootItem-VdcVt",wv="ib-emptyState-ZR1un",kv="ib-emptyIcon-KVsrU",Cv="ib-emptyMessage-i5xof",jv="ib-loadingState-aiqE8",Ev="ib-loadingSpinner-I6Grx",Sv="ib-childrenContainer-NwzsC",Lv="ib-collapsed-n5V-k",Q={tree:tv,treeList:rv,treeListNested:nv,treeItem:ov,treeItemRow:iv,selected:sv,indentSm:av,indentMd:lv,indentLg:cv,toggleButton:dv,toggleIcon:uv,expanded:fv,togglePlaceholder:pv,folderIcon:hv,folderName:gv,counts:mv,countBadge:bv,countIcon:xv,loadingIndicator:vv,spinner:yv,rootItem:$v,emptyState:wv,emptyIcon:kv,emptyMessage:Cv,loadingState:jv,loadingSpinner:Ev,childrenContainer:Sv,collapsed:Lv},Tv=e=>{switch(e){case"sm":return Q.indentSm;case"lg":return Q.indentLg;default:return Q.indentMd}},Bn=({folder:e,depth:t,isSelected:r,isExpanded:n,indentSize:o,showCounts:s,expandedIds:l,selectedId:c,onSelect:d,onToggle:u,onLoadChildren:f})=>{var w;const h=e.children&&e.children.length>0||e.foldersCount!==void 0&&e.foldersCount>0,m=e.isLoading||!1,p=a.useCallback(()=>{d(e)},[e,d]),g=a.useCallback(async x=>{var E;if(x.stopPropagation(),m)return;const j=!n;j&&f&&!((E=e.children)!=null&&E.length)&&await f(e.id),u(e.id,j)},[e.id,(w=e.children)==null?void 0:w.length,n,m,u,f]),v=a.useCallback(x=>{switch(x.key){case"Enter":case" ":x.preventDefault(),p();break;case"ArrowRight":x.preventDefault(),!n&&h&&g(x);break;case"ArrowLeft":x.preventDefault(),n&&h&&g(x);break}},[p,g,n,h]),y=a.useCallback(x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),g(x))},[g]),b=Tv(o);return i.jsxs("li",{className:Q.treeItem,role:"treeitem","aria-expanded":h?n:void 0,"aria-selected":r,children:[i.jsxs("div",{className:`${Q.treeItemRow} ${b} ${r?Q.selected:""}`,style:{"--depth":t},onClick:p,onKeyDown:v,tabIndex:0,"aria-label":`Folder: ${e.name}`,"data-folder-id":e.id,children:[h?m?i.jsx("div",{className:Q.loadingIndicator,"aria-label":"Loading",children:i.jsx("div",{className:Q.spinner})}):i.jsx("button",{className:Q.toggleButton,onClick:g,onKeyDown:y,"aria-label":n?"Collapse folder":"Expand folder",tabIndex:-1,children:i.jsx(J,{name:"chevron_right",size:"sm",className:`${Q.toggleIcon} ${n?Q.expanded:""}`})}):i.jsx("div",{className:Q.togglePlaceholder,"aria-hidden":"true"}),i.jsx("div",{className:`${Q.folderIcon} ${r?Q.selected:""}`,children:i.jsx(J,{name:n?"folder_open":"folder",size:"sm"})}),i.jsx("span",{className:`${Q.folderName} ${r?Q.selected:""}`,children:e.name}),s&&i.jsxs("div",{className:Q.counts,children:[e.foldersCount!==void 0&&e.foldersCount>0&&i.jsxs("span",{className:Q.countBadge,children:[i.jsx(J,{name:"folder",size:"sm",className:Q.countIcon}),e.foldersCount]}),e.resourcesCount!==void 0&&e.resourcesCount>0&&i.jsxs("span",{className:Q.countBadge,children:[i.jsx(J,{name:"insert_drive_file",size:"sm",className:Q.countIcon}),e.resourcesCount]})]})]}),h&&e.children&&e.children.length>0&&i.jsx("ul",{className:`${Q.treeListNested} ${Q.childrenContainer} ${n?"":Q.collapsed}`,role:"group",children:e.children.map(x=>i.jsx(Bn,{folder:x,depth:t+1,isSelected:c===x.id,isExpanded:l.includes(x.id),indentSize:o,showCounts:s,expandedIds:l,selectedId:c,onSelect:d,onToggle:u,onLoadChildren:f},x.id))})]})},wl=({folders:e,selectedId:t=null,expandedIds:r=[],onSelect:n,onToggleExpand:o,onLoadChildren:s,showCounts:l=!1,showRoot:c=!1,rootName:d="Home",indentSize:u="md",loading:f=!1,emptyMessage:h="No folders found",className:m="","data-testid":p})=>{const g=a.useCallback(x=>{n==null||n(x)},[n]),v=a.useCallback((x,j)=>{o==null||o(x,j)},[o]),y=a.useMemo(()=>({id:"root",name:d,parentId:null,children:e,foldersCount:e.length}),[d,e]),b=t==="root",w=r.includes("root")||!c;return f?i.jsx("div",{className:`${Q.tree} ${m}`,"data-testid":p,role:"tree","aria-label":"Folder tree loading",children:i.jsx("div",{className:Q.loadingState,children:i.jsx("div",{className:Q.loadingSpinner,"aria-label":"Loading folders"})})}):e.length===0&&!c?i.jsx("div",{className:`${Q.tree} ${m}`,"data-testid":p,role:"tree","aria-label":"Empty folder tree",children:i.jsxs("div",{className:Q.emptyState,children:[i.jsx(J,{name:"folder_off",size:"xl",className:Q.emptyIcon}),i.jsx("p",{className:Q.emptyMessage,children:h})]})}):i.jsx("div",{className:`${Q.tree} ${m}`,"data-testid":p,children:i.jsx("ul",{className:Q.treeList,role:"tree","aria-label":"Folder navigation",children:c?i.jsxs("li",{className:`${Q.treeItem} ${Q.rootItem}`,role:"treeitem","aria-expanded":w,"aria-selected":b,children:[i.jsxs("div",{className:`${Q.treeItemRow} ${b?Q.selected:""}`,onClick:()=>g(y),onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),g(y))},tabIndex:0,"aria-label":`Root folder: ${d}`,"data-folder-id":"root",children:[i.jsx("button",{className:Q.toggleButton,onClick:x=>{x.stopPropagation(),v("root",!w)},"aria-label":w?"Collapse root folder":"Expand root folder",tabIndex:-1,children:i.jsx(J,{name:"chevron_right",size:"sm",className:`${Q.toggleIcon} ${w?Q.expanded:""}`})}),i.jsx("div",{className:`${Q.folderIcon} ${b?Q.selected:""}`,children:i.jsx(J,{name:w?"folder_open":"folder",size:"sm"})}),i.jsx("span",{className:`${Q.folderName} ${b?Q.selected:""}`,children:d}),l&&e.length>0&&i.jsx("div",{className:Q.counts,children:i.jsxs("span",{className:Q.countBadge,children:[i.jsx(J,{name:"folder",size:"sm",className:Q.countIcon}),e.length]})})]}),w&&e.length>0&&i.jsx("ul",{className:Q.treeListNested,role:"group",children:e.map(x=>i.jsx(Bn,{folder:x,depth:1,isSelected:t===x.id,isExpanded:r.includes(x.id),indentSize:u,showCounts:l,expandedIds:r,selectedId:t,onSelect:g,onToggle:v,onLoadChildren:s},x.id))})]}):e.map(x=>i.jsx(Bn,{folder:x,depth:0,isSelected:t===x.id,isExpanded:r.includes(x.id),indentSize:u,showCounts:l,expandedIds:r,selectedId:t,onSelect:g,onToggle:v,onLoadChildren:s},x.id))})})};wl.displayName="FolderTree";const Fv="ib-loginWrapper-6xUZb",Rv="ib-loginForm-oCZT4",Dv="ib-logo-WRzFO",Ov="ib-description-XBLnN",Mv="ib-form-t-9w6",Av="ib-inputGroup-pRH-H",Pv="ib-urlInputWrapper-t3pCR",Nv="ib-domainSuffix-Ht1ZW",zv="ib-checkboxRow-F7V0K",Iv="ib-browserLoginRow-PAk57",Bv="ib-checkbox-VTHTu",Wv="ib-checkboxLabel-wzE9R",Hv="ib-buttons-gBtIB",_v="ib-error-rVyww",Vv="ib-errorMessage-lW3RK",ue={loginWrapper:Fv,loginForm:Rv,logo:Dv,description:Ov,form:Mv,inputGroup:Av,urlInputWrapper:Pv,domainSuffix:Nv,checkboxRow:zv,browserLoginRow:Iv,checkbox:Bv,checkboxLabel:Wv,buttons:Hv,error:_v,errorMessage:Vv},kl=a.forwardRef(({loginMethod:e="credentials",onSubmit:t,onSsoLogin:r,error:n,loading:o=!1,logoSrc:s,logoAlt:l="Logo",className:c,"data-testid":d},u)=>{const f=a.useId(),[h,m]=a.useState(""),[p,g]=a.useState(""),[v,y]=a.useState(""),[b,w]=a.useState(!1),[x,j]=a.useState(e==="sso"),E=!x,F=e==="both"||e==="sso",T=a.useCallback(S=>{const O=S.trim().replace(/^https?:\/\//,"");return!b&&O?O+".intelligencebank.com":O},[b]),L=E?h.trim()!==""&&p.trim()!==""&&v.trim()!=="":h.trim()!=="",M=a.useCallback(S=>{if(S.preventDefault(),!L)return;const O=T(h);if(x&&r)r(O);else{const N={url:O,email:p.trim(),password:v};t(N)}},[L,h,p,v,x,r,t,T]),k=a.useCallback(S=>{const O=S.target.value.replace(/^https?:\/\//,"");m(O)},[]),D=a.useCallback(S=>{w(S.target.checked)},[]),P=a.useCallback(S=>{j(S.target.checked)},[]),R=[ue.loginForm,c].filter(Boolean).join(" ");return i.jsxs("div",{className:ue.loginWrapper,"data-testid":d,children:[s&&i.jsx("div",{className:ue.logo,"data-testid":d&&`${d}-logo`,children:i.jsx("img",{src:s,alt:l})}),i.jsxs("div",{className:R,children:[i.jsx("p",{className:ue.description,children:"Login to your IntelligenceBank account by entering your credentials below."}),n&&i.jsx("div",{className:ue.error,role:"alert","data-testid":d&&`${d}-error`,children:i.jsx("p",{className:ue.errorMessage,children:n})}),i.jsxs("form",{ref:u,id:f,className:ue.form,onSubmit:M,noValidate:!0,"data-testid":d&&`${d}-form`,children:[i.jsxs("div",{className:ue.inputGroup,children:[i.jsxs("div",{className:ue.urlInputWrapper,children:[i.jsx(At,{type:"text",label:"URL (without https://)",placeholder:b?"mycompany.example.com":"mycompany",value:h,onChange:k,disabled:o,fullWidth:!0,required:!0,"data-testid":d&&`${d}-url`}),!b&&i.jsx("span",{className:ue.domainSuffix,"data-testid":d&&`${d}-domain-suffix`,children:".intelligencebank.com"})]}),i.jsxs("div",{className:ue.checkboxRow,children:[i.jsx("input",{type:"checkbox",id:`${f}-custom-url`,className:ue.checkbox,checked:b,onChange:D,disabled:o,"data-testid":d&&`${d}-custom-url-toggle`}),i.jsx("label",{htmlFor:`${f}-custom-url`,className:ue.checkboxLabel,children:"Custom URL"})]})]}),E&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:ue.inputGroup,children:i.jsx(At,{type:"email",label:"Email",placeholder:"Enter your email",value:p,onChange:S=>g(S.target.value),disabled:o,fullWidth:!0,required:!0,autoComplete:"email","data-testid":d&&`${d}-email`})}),i.jsx("div",{className:ue.inputGroup,children:i.jsx(At,{type:"password",label:"Password",placeholder:"Enter your password",value:v,onChange:S=>y(S.target.value),disabled:o,fullWidth:!0,required:!0,autoComplete:"current-password","data-testid":d&&`${d}-password`})})]}),i.jsx("div",{className:ue.buttons,children:i.jsx(pe,{type:"submit",variant:"primary",disabled:o||!L,loading:o,fullWidth:!0,"data-testid":d&&`${d}-submit`,children:"Login"})}),F&&i.jsxs("div",{className:ue.browserLoginRow,children:[i.jsx("input",{type:"checkbox",id:`${f}-browser-login`,className:ue.checkbox,checked:x,onChange:P,disabled:o,"data-testid":d&&`${d}-browser-login-toggle`}),i.jsx("label",{htmlFor:`${f}-browser-login`,className:ue.checkboxLabel,children:"Browser Login (for SSO Users)"})]})]})]})]})});kl.displayName="LoginForm";function Gv(e){return typeof e=="string"}function jn(e,t=20){return Gv(e)?i.jsx(J,{name:e,size:t}):e}const Uv=$.nav`
3613
+ display: flex;
3614
+ align-items: center;
3615
+ justify-content: space-between;
3616
+ height: 50px;
3617
+ min-width: 320px;
3618
+ padding: 0 ${({theme:e})=>e.spacing[4]};
3619
+ box-sizing: border-box;
3620
+ font-family: ${({theme:e})=>e.typography.fontFamily};
3621
+
3622
+ /* Light variant - uses primary colors from theme */
3623
+ background-color: ${({theme:e,$variant:t})=>t==="light"?e.colors.primary:e.colors.grey[900]};
3624
+ border-bottom: 1px solid ${({theme:e})=>e.colors.border.light};
3625
+ color: ${({theme:e,$variant:t})=>t==="light"?e.colors.primaryText:e.colors.white};
3626
+
3627
+ /* Sticky positioning */
3628
+ ${({$sticky:e})=>e&&`
3629
+ position: sticky;
3630
+ top: 0;
3631
+ z-index: 1000;
3632
+ `}
3633
+ `,Kv=$.div`
3634
+ display: flex;
3635
+ align-items: center;
3636
+ gap: ${({theme:e})=>e.spacing[3]};
3637
+ min-width: 0;
3638
+ flex-shrink: 0;
3639
+ `,Yv=$.div`
3640
+ display: flex;
3641
+ align-items: center;
3642
+ height: 34px;
3643
+ cursor: ${({$clickable:e})=>e?"pointer":"default"};
3644
+ transition: ${({theme:e})=>e.transitions.fast};
3645
+
3646
+ &:hover {
3647
+ opacity: ${({$clickable:e})=>e?.8:1};
3648
+ }
3649
+ `,qv=$.img`
3650
+ height: 100%;
3651
+ width: auto;
3652
+ max-width: 200px;
3653
+ object-fit: contain;
3654
+ `,Xv=$.span`
3655
+ font-size: ${({theme:e})=>e.typography.fontSize.base};
3656
+ font-weight: ${({theme:e})=>e.typography.fontWeight.semibold};
3657
+ white-space: nowrap;
3658
+ overflow: hidden;
3659
+ text-overflow: ellipsis;
3660
+ max-width: 200px;
3661
+ color: ${({theme:e,$variant:t})=>t==="light"?e.colors.primaryText:e.colors.white};
3662
+ `,Qv=$.div`
3663
+ flex: 1;
3664
+ display: flex;
3665
+ align-items: center;
3666
+ justify-content: center;
3667
+ min-width: 0;
3668
+ padding: 0 ${({theme:e})=>e.spacing[4]};
3669
+ `,Zv=$.div`
3670
+ display: flex;
3671
+ align-items: center;
3672
+ gap: ${({theme:e})=>e.spacing[1]};
3673
+ flex-shrink: 0;
3674
+ `,Jv=$.div`
3675
+ display: flex;
3676
+ align-items: center;
3677
+ gap: ${({theme:e})=>e.spacing[1]};
3678
+ `,ey=$.button`
3679
+ display: flex;
3680
+ align-items: center;
3681
+ justify-content: center;
3682
+ width: 36px;
3683
+ height: 36px;
3684
+ padding: 0;
3685
+ border: 1px solid transparent;
3686
+ border-radius: ${({theme:e})=>e.borders.radius.sm};
3687
+ background: transparent;
3688
+ cursor: pointer;
3689
+ transition: ${({theme:e})=>e.transitions.fast};
3690
+
3691
+ /* Icon color based on variant */
3692
+ color: ${({theme:e,$variant:t})=>t==="light"?e.colors.primaryText:e.colors.grey[300]};
3693
+
3694
+ &:hover:not(:disabled) {
3695
+ /* Only border highlight on hover, no background fill */
3696
+ border-color: ${({theme:e,$variant:t})=>t==="light"?e.colors.primaryText:e.colors.grey[300]};
3697
+ }
3698
+
3699
+ &:focus {
3700
+ outline: none;
3701
+ }
3702
+
3703
+ &:focus-visible {
3704
+ outline: 2px solid ${({theme:e})=>e.colors.highlight};
3705
+ outline-offset: 2px;
3706
+ }
3707
+
3708
+ &:disabled {
3709
+ opacity: 0.5;
3710
+ cursor: not-allowed;
3711
+ }
3712
+ `,ty=$.button`
3713
+ display: flex;
3714
+ align-items: center;
3715
+ justify-content: center;
3716
+ width: 36px;
3717
+ height: 36px;
3718
+ padding: 0;
3719
+ border: 1px solid transparent;
3720
+ border-radius: ${({theme:e})=>e.borders.radius.sm};
3721
+ background: transparent;
3722
+ cursor: pointer;
3723
+ transition: ${({theme:e})=>e.transitions.fast};
3724
+
3725
+ /* Icon color based on variant */
3726
+ color: ${({theme:e,$variant:t})=>t==="light"?e.colors.primaryText:e.colors.grey[300]};
3727
+
3728
+ &:hover:not(:disabled) {
3729
+ /* Only border highlight on hover, no background fill */
3730
+ border-color: ${({theme:e,$variant:t})=>t==="light"?e.colors.primaryText:e.colors.grey[300]};
3731
+ }
3732
+
3733
+ &:focus {
3734
+ outline: none;
3735
+ }
3736
+
3737
+ &:focus-visible {
3738
+ outline: 2px solid ${({theme:e})=>e.colors.highlight};
3739
+ outline-offset: 2px;
3740
+ }
3741
+ `,ry=()=>i.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:[i.jsx("circle",{cx:"12",cy:"5",r:"2"}),i.jsx("circle",{cx:"12",cy:"12",r:"2"}),i.jsx("circle",{cx:"12",cy:"19",r:"2"})]});function ny({logoSrc:e,logoAlt:t="Logo",onLogoClick:r,title:n,actions:o=[],menuItems:s=[],menuLabel:l="Menu",collapseBreakpoint:c=480,variant:d="light",sticky:u=!1,className:f,children:h,"data-testid":m="navbar"}){const[p,g]=a.useState(!1),v=a.useRef(null),y=a.useCallback(()=>{typeof window<"u"&&g(window.innerWidth<=c)},[c]);a.useEffect(()=>(y(),window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)),[y]);const b=p?o.map(L=>({id:L.id,displayText:L.label,icon:jn(L.icon,16),onClick:L.onClick,disabled:L.disabled})):[],w=s.map(L=>({id:L.id,displayText:L.label,icon:L.icon?jn(L.icon,16):void 0,onClick:L.onClick,disabled:L.disabled})),x=[];b.length>0&&(x.push(...b),w.length>0&&x.push({type:"divider"})),x.push(...w);const j=()=>{r&&r()},E=L=>{r&&(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),r())},F=L=>i.jsx(Bt,{content:L.tooltip||L.label,children:i.jsx(ey,{type:"button",$variant:d,onClick:L.onClick,disabled:L.disabled,"aria-label":L.label,"data-testid":`navbar-action-${L.id}`,children:jn(L.icon,20)})},L.id),T=x.length>0;return i.jsxs(Uv,{ref:v,className:f,$variant:d,$sticky:u,"data-testid":m,"data-variant":d,"data-sticky":u?"true":void 0,role:"navigation","aria-label":"Main navigation",children:[i.jsxs(Kv,{children:[i.jsx(Yv,{$clickable:!!r,onClick:j,onKeyDown:E,role:r?"button":void 0,tabIndex:r?0:void 0,"aria-label":r?`${t} - Click to go home`:void 0,children:i.jsx(qv,{src:e,alt:t})}),n&&i.jsx(Xv,{$variant:d,children:n})]}),h&&i.jsx(Qv,{children:h}),i.jsxs(Zv,{children:[!p&&o.length>0&&i.jsx(Jv,{"data-testid":"navbar-actions",children:o.map(F)}),T&&i.jsx(dn,{trigger:i.jsx(ty,{type:"button",$variant:d,"aria-label":l,children:i.jsx(ry,{})}),items:x,placement:"bottom-end",inverse:d==="dark","aria-label":l,"data-testid":"navbar-menu"})]})]})}const oy="ib-searchForm-dHPlb",iy="ib-inputWrapper-BMVqy",sy="ib-clearButton-vxHxg",En={searchForm:oy,inputWrapper:iy,clearButton:sy},Cl=a.forwardRef(({value:e,onChange:t,onSubmit:r,onClear:n,placeholder:o="Search...",size:s="md",autoFocus:l=!1,showButton:c=!1,buttonText:d="Search",loading:u=!1,disabled:f=!1,debounceMs:h=0,className:m,"data-testid":p},g)=>{const v=a.useRef(null),y=a.useRef(null),b=g||y;a.useEffect(()=>()=>{v.current&&clearTimeout(v.current)},[]);const w=a.useCallback(D=>{const P=D.target.value;t(P),h>0&&(v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{r(P)},h))},[t,r,h]),x=a.useCallback(D=>{D==null||D.preventDefault(),v.current&&(clearTimeout(v.current),v.current=null),r(e)},[r,e]),j=a.useCallback(D=>{D.key==="Enter"&&(D.preventDefault(),x())},[x]),E=a.useCallback(()=>{var D;v.current&&(clearTimeout(v.current),v.current=null),t(""),n==null||n(),(D=b.current)==null||D.focus()},[t,n,b]),F=e.length>0,T=f||u,L=u?i.jsx(mr,{size:"sm",label:"Searching...","data-testid":p&&`${p}-spinner`}):i.jsx(J,{name:"search",size:"sm","aria-hidden":!0}),M=F&&!T?i.jsx("button",{type:"button",className:En.clearButton,onClick:E,"aria-label":"Clear search","data-testid":p&&`${p}-clear`,children:i.jsx(J,{name:"close",size:"sm"})}):null,k=[En.searchForm,m].filter(Boolean).join(" ");return i.jsxs("form",{className:k,onSubmit:x,role:"search","data-size":s,"data-testid":p,children:[i.jsx("div",{className:En.inputWrapper,children:i.jsx(At,{ref:b,type:"search",value:e,onChange:w,onKeyDown:j,placeholder:o,size:s,disabled:T,autoFocus:l,leftElement:L,rightElement:M,fullWidth:!0,"aria-label":o,"data-testid":p&&`${p}-input`})}),c&&i.jsx(pe,{type:"submit",variant:"primary",size:s,disabled:T,loading:u,"aria-label":d,"data-testid":p&&`${p}-button`,children:d})]})});Cl.displayName="SearchForm";const Ee={grey100:"#F7F7F7",grey150:"#E5E5E5",grey200:"#D9D9D9",grey300:"#BFBFBF",grey400:"#A1A1A1",grey500:"#737373",grey600:"#595959",grey700:"#3F3F3F",grey800:"#262626",grey900:"#191919"},nt={greenLighter:"#E5F6E8",greenLight:"#54C164",greenBase:"#2B8048",greenDark:"#046211",greenDarker:"#033707"},Ke={redLighter2:"#FCECE7",redLighter:"#FFE3E5",redLight:"#F16C71",redBase:"#CA212B",redDark:"#97090E",redDarker:"#5F0508"},Ie={blueLighter2:"#E0EBFD",blueLighter:"#DDE9FC",blueLight:"#5493F0",blueBase:"#0053CD",blueDark:"#003B91",blueDarker:"#012355",blueLink:"#0066CC"},Ye={orangeLighter2:"#FFEFC6",orangeLighter:"#FFEEDD",orangeLight:"#FFBA7C",orangeBase:"#F86C05",orangeDark:"#B3520C",orangeDarker:"#6D3106"},Ft={textColor:"#4a4a4a",textColorFade:"rgba(74,74,74, 0.5)",instructionColor:"#737474",helpTextColor:"#9b9b9b",whiteTextColor:"#ffffff",highlightTextColor:"#ffffff"},jl={lightGrey:"#727274",lighterGrey:"#9b9b9b",lightestGrey:"#f4f4f4"},Wr={borderGrey:"#d0d0d0",borderLighterGrey:"#e0e0e0",borderShadow:"#d8d8d8"},Zt={iconGrey:"#a3a3a3",iconGreyDisabled:"rgba(163,163,163, 0.5)",iconBackground:"rgba(0, 0, 0, 0.10)"},Hr={backgroundProcessingColor:"rgba(163, 163, 163, .3)",backgroundWhiteColor:"#ffffff",rowGrey:"#f9f9f9"},El={whiteColor:"#ffffff",blackColor:"#000000",yellow:"#FFEFC6"},mt={successColor:"#21B63C",errorColor:"#d31818",warningColor:"#f88b07",infoColor:"#f88b07",noticeColor:"#FFA500"},Jt={snackbarErrorBackground:"#D01C23",snackbarSuccessBackground:"#108c27",snackbarWarningBackground:"#F97E24"},_r={progressBarCompletedColor:"#108C27",progressBarErrorColor:"#D01C23"},Rt={transparentBlack50:"rgba(0, 0, 0, 0.50)",transparentBlack20:"rgba(0, 0, 0, 0.20)",transparentBlack08:"rgba(0, 0, 0, 0.08)",transparentBlack05:"rgba(0, 0, 0, 0.05)"},er={transparentWhite50:"rgba(255,255,255,0.50)",transparentWhite20:"rgba(255,255,255,0.20)",transparentWhite05:"rgba(255,255,255,0.05)"},Sl="#F4770B",tt={PRIMARY_DEFAULT:"#ffffff",PRIMARY_TEXT_DEFAULT:"#000000",SECONDARY_DEFAULT:"#F68D32",SECONDARY_TEXT_DEFAULT:"#ffffff",HIGHLIGHT_DEFAULT:"#F4770B",HIGHLIGHT_TEXT_DEFAULT:"#ffffff"},Ll={userDefaultTextColor:"#000000",userDefaultBackgroundColor:"#ffffff"},Tl={sliderGrey:"#bdbdbd"},Lt={shadow100:"0px 1px 3px rgba(0, 0, 0, 0.25)",shadow200:"0px 2px 5px rgba(0, 0, 0, 0.25)",shadow300:"0px 3px 12px rgba(0, 0, 0, 0.25)",shadowFooter:"0px -1px 2px rgba(0, 0, 0, 0.25)",shadowSelected:"0px 2px 5px rgba(0, 0, 0, 0.50)"},Rr={borderRadiusSmall:"4px",borderRadiusMedium:"8px",borderRadiusLarge:"16px"},ay={...Ee,...jl},ly={green:nt,red:Ke,blue:Ie,orange:Ye},cy={grey:Ee,green:nt,red:Ke,blue:Ie,orange:Ye,status:mt,snackbar:Jt,progress:_r,text:Ft,border:Wr,icon:Zt,background:Hr,form:Tl,base:El,transparentBlack:Rt,transparentWhite:er,highlight:Sl,palette:tt,user:Ll},dy=e=>z.css`
3742
+ :root {
3743
+ /* Dynamic tenant colors (from login API) */
3744
+ --color-primary: ${e.colors.primary};
3745
+ --color-primary-text: ${e.colors.primaryText};
3746
+ --color-secondary: ${e.colors.secondary};
3747
+ --color-secondary-text: ${e.colors.secondaryText};
3748
+ --color-highlight: ${e.colors.highlight};
3749
+ --color-highlight-text: ${e.colors.highlightText};
3750
+
3751
+ /* Fixed text colors */
3752
+ --color-text-primary: ${e.colors.text.primary};
3753
+ --color-text-secondary: ${e.colors.text.secondary};
3754
+ --color-text-muted: ${e.colors.text.muted};
3755
+ --color-text-inverse: ${e.colors.text.inverse};
3756
+
3757
+ /* Fixed status colors */
3758
+ --color-success: ${e.colors.status.success};
3759
+ --color-error: ${e.colors.status.error};
3760
+ --color-warning: ${e.colors.status.warning};
3761
+ --color-info: ${e.colors.status.info};
3762
+
3763
+ /* Fixed background colors */
3764
+ --color-background: ${e.colors.background.default};
3765
+ --color-background-hover: ${e.colors.background.hover};
3766
+ --color-background-active: ${e.colors.background.active};
3767
+ --color-background-disabled: ${e.colors.background.disabled};
3768
+
3769
+ /* Fixed border colors */
3770
+ --color-border-light: ${e.colors.border.light};
3771
+ --color-border-medium: ${e.colors.border.medium};
3772
+ --color-border-input: ${e.colors.border.input};
3773
+ --color-border-dotted: ${e.colors.border.dotted};
3774
+
3775
+ /* Grey scale */
3776
+ --color-grey-100: ${e.colors.grey[100]};
3777
+ --color-grey-200: ${e.colors.grey[200]};
3778
+ --color-grey-300: ${e.colors.grey[300]};
3779
+ --color-grey-400: ${e.colors.grey[400]};
3780
+ --color-grey-500: ${e.colors.grey[500]};
3781
+ --color-grey-600: ${e.colors.grey[600]};
3782
+ --color-grey-700: ${e.colors.grey[700]};
3783
+ --color-grey-800: ${e.colors.grey[800]};
3784
+ --color-grey-900: ${e.colors.grey[900]};
3785
+
3786
+ /* Common aliases */
3787
+ --color-white: #ffffff;
3788
+ --color-black: #000000;
3789
+ }
3790
+ `,uy=({theme:e=bo,children:t})=>i.jsxs(z.ThemeProvider,{theme:e,children:[i.jsx(z.Global,{styles:dy(e)}),t]}),fy={100:Ee.grey100,150:Ee.grey150,200:Ee.grey200,300:Ee.grey300,400:Ee.grey400,500:Ee.grey500,600:Ee.grey600,700:Ee.grey700,800:Ee.grey800,900:Ee.grey900},py={green:{lighter:nt.greenLighter,light:nt.greenLight,base:nt.greenBase,dark:nt.greenDark,darker:nt.greenDarker},red:{lighter2:Ke.redLighter2,lighter:Ke.redLighter,light:Ke.redLight,base:Ke.redBase,dark:Ke.redDark,darker:Ke.redDarker},blue:{lighter2:Ie.blueLighter2,lighter:Ie.blueLighter,light:Ie.blueLight,base:Ie.blueBase,dark:Ie.blueDark,darker:Ie.blueDarker,link:Ie.blueLink},orange:{lighter2:Ye.orangeLighter2,lighter:Ye.orangeLighter,light:Ye.orangeLight,base:Ye.orangeBase,dark:Ye.orangeDark,darker:Ye.orangeDarker}},bo={colors:{primary:tt.PRIMARY_DEFAULT,primaryText:tt.PRIMARY_TEXT_DEFAULT,secondary:tt.SECONDARY_DEFAULT,secondaryText:tt.SECONDARY_TEXT_DEFAULT,highlight:tt.HIGHLIGHT_DEFAULT,highlightText:tt.HIGHLIGHT_TEXT_DEFAULT,white:"#FFFFFF",black:"#000000",text:{primary:Ft.textColor,secondary:"rgba(0, 0, 0, 0.7)",muted:"#949494",inverse:"#FFFFFF",fade:Ft.textColorFade,instruction:Ft.instructionColor,help:Ft.helpTextColor},status:{success:mt.successColor,error:mt.errorColor,warning:mt.warningColor,info:mt.infoColor,notice:mt.noticeColor},snackbar:{success:Jt.snackbarSuccessBackground,error:Jt.snackbarErrorBackground,warning:Jt.snackbarWarningBackground},progress:{complete:_r.progressBarCompletedColor,error:_r.progressBarErrorColor},background:{default:"#FFFFFF",hover:"#efefef",active:"#e8e8e8",disabled:"#eee",processing:Hr.backgroundProcessingColor,row:Hr.rowGrey},border:{light:"#f5f5f5",medium:"#BFBFBF",input:"#949494",dotted:"#eee",grey:Wr.borderGrey,shadow:Wr.borderShadow},icon:{grey:Zt.iconGrey,disabled:Zt.iconGreyDisabled,background:Zt.iconBackground},grey:fy,semantic:py,transparent:{black50:Rt.transparentBlack50,black20:Rt.transparentBlack20,black08:Rt.transparentBlack08,black05:Rt.transparentBlack05,white50:er.transparentWhite50,white20:er.transparentWhite20,white05:er.transparentWhite05}},typography:{fontFamily:'"Roboto", sans-serif',fontFamilyIcons:'"Material Icons"',fontSize:{xs:"12px",sm:"14px",base:"14px",md:"14.5px",lg:"15px",xl:"18px",icons:"24px"},fontWeight:{regular:400,medium:500,semibold:600,bold:700},lineHeight:{tight:"1.25",normal:"1.5",relaxed:"20px"}},spacing:{0:"0",px:"1px",1:"4px",2:"6px",3:"8px",4:"10px",5:"12px",6:"16px",7:"24px",8:"32px"},sizes:{buttonHeight:"36px",headerHeight:"48px",navHeight:"52px",thumbnailSmall:"96px",thumbnailLarge:"200px",iconSize:"24px"},borders:{radius:{sm:"4px",md:"8px",full:"9999px",small:Rr.borderRadiusSmall,medium:Rr.borderRadiusMedium,large:Rr.borderRadiusLarge},width:{thin:"1px",medium:"2px"}},shadows:{card:"0px 2px 8px 2px rgb(0 0 0 / 18%)",dropdown:"0px 2px 5px rgba(0, 0, 0, 0.25)",menu:"0 2px 8px rgba(0, 0, 0, 0.2)",snackbar:"0px 2px 5px rgb(0 0 0 / 25%)",ibUi:{100:Lt.shadow100,200:Lt.shadow200,300:Lt.shadow300,footer:Lt.shadowFooter,selected:Lt.shadowSelected}},transitions:{fast:"opacity 0.2s, transform 0.1s",normal:"200ms",slow:"400ms",easing:{slide:"cubic-bezier(0.17, 0.04, 0.03, 0.94)",easeOut:"cubic-bezier(0, 0, 0.2, 1)"}},zIndex:{base:0,header:1,dropdown:99,modal:1e3,snackbar:1e4}},hy=bo;function gy(e,t){return!t||t.length===0||t.length===1&&t.includes("list")?!0:e===!1}function my(e){var t,r;if((t=e.file)!=null&&t.type)return e.file.type;if(e.type)return e.type;if(e.fancyFileType)return e.fancyFileType.toLowerCase();if((r=e.file)!=null&&r.name){const n=e.file.name.split(".");if(n.length>1){const o=n[n.length-1];if(o)return o.toLowerCase()}}return"unknown"}function by(e){var t;if((t=e.file)!=null&&t.type&&e.file.type.includes("/"))return e.file.type}function xo(e){var r,n;const t=gy(e.isPublic,e.allowedActions);return{id:e._id,name:e.name,thumbnail:e.thumbnail||"",fileType:my(e),fileSize:((r=e.file)==null?void 0:r.size)??0,width:e.width,height:e.height,mimeType:by(e),filename:(n=e.file)==null?void 0:n.name,description:e.description,isPublic:e.isPublic??!t,allowedActions:e.allowedActions??[],versionNumber:e.versionNumber}}function Fl(e){return Array.isArray(e)?e.map(xo):[]}function xy(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t._id=="string"&&typeof t.name=="string"}function It(e){return{id:e._id,name:e.name,thumbnail:e.thumbnail,foldersCount:e.folders_count??0,resourcesCount:e.resources_count??0,isPublic:e.isPublic??!0,allowedActions:e.allowedActions??[],defaultOrder:e.defaultorder}}function Rl(e){return Array.isArray(e)?e.map(It):[]}function vo(e,t=null,r){return{id:e._id,name:e.name,parentId:t,children:r,foldersCount:e.folders_count??0,resourcesCount:e.resources_count??0,isPublic:e.isPublic??!0}}function Dl(e,t=null){return Array.isArray(e)?e.map(r=>vo(r,t)):[]}function vy(e){const t=new Map,r=[];for(const n of e)t.set(n._id,vo(n,n.parentId??null,[]));for(const n of e){const o=t.get(n._id);if(o)if(n.parentId){const s=t.get(n.parentId);s&&s.children?s.children.push(o):r.push(o)}else r.push(o)}return r}function yy(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t._id=="string"&&typeof t.name=="string"}function lr(e,t=!1){const r=e._id||e.id||"",n=e.customWidth&&e.customHeight?{width:e.customWidth,height:e.customHeight}:void 0;return{id:r,name:e.name,fileType:e.fileType,fileSize:e.fileSize,customWidth:e.customWidth,customHeight:e.customHeight,dimensions:n,isOriginal:t}}function yo(e="Original"){return{id:"original",name:e,isOriginal:!0}}function Ol(e=[],t=[],r=!0){const n=[];if(r&&n.push(yo()),Array.isArray(e))for(const o of e)n.push(lr(o));if(Array.isArray(t))for(const o of t)n.push(lr(o));return n}function Ml(e=[],t=[],r=!0){const n=[];return r&&n.push({label:"File",presets:[yo()]}),Array.isArray(e)&&e.length>0&&n.push({label:"Asset Presets",presets:e.map(o=>lr(o))}),Array.isArray(t)&&t.length>0&&n.push({label:"Global Presets",presets:t.map(o=>lr(o))}),n}function Al(e,t=[],r=[]){const n=t.find(o=>o._id===e||o.id===e);return n||r.find(o=>o._id===e||o.id===e)}function $y(e,t=[],r=[]){if(!e||e==="original")return;const n=Al(e,t,r);if(n)return{id:n._id||n.id||"",name:n.name,fileType:n.fileType,fileSize:n.fileSize,customWidth:n.customWidth,customHeight:n.customHeight}}function wy(e){return typeof e!="object"||e===null?!1:typeof e.name=="string"}function Pl(e){const{count:t=0,pageNumber:r=1,pageSize:n=20}=e,o=Math.ceil(t/n);return{currentPage:r,totalPages:o,totalItems:t,itemsPerPage:n}}function ky(e,t){const r=e.gridData||{},n=Rl(r.folder||[]),o=Fl(r.resource||[]),s=r.pagination||{},l=Pl(s),c=e.loading||e.isLoading||!1,d=r.currentFolder?It(r.currentFolder):void 0,u=r.parentFolder?It(r.parentFolder):void 0;return{folders:n,assets:o,loading:c,pagination:l,currentFolder:d,parentFolder:u}}function Cy(e){const t=Dl(e.folderData||[]),r=e.currentFolderId||null,n=e.expandedFolderIds||[];return{folders:t,selectedId:r,expandedIds:n}}function jy(e){var r;const t=((r=e.gridData)==null?void 0:r.pagination)||{};return Pl(t)}function Ey(e,t){var o;const n=(((o=e.gridData)==null?void 0:o.folder)||[])[t];return n?It(n):void 0}function Sy(e,t){var o;const n=(((o=e.gridData)==null?void 0:o.resource)||[])[t];return n?xo(n):void 0}function Ly(e){var r;const t=(r=e.gridData)==null?void 0:r.currentFolder;return t?It(t):void 0}function Ty(e,t=[]){const r=e.globalPresets||[];return Ml(t,r)}function Fy(e,t=[]){const r=e.globalPresets||[];return Ol(t,r)}function Ry(e,t,r){const n=(r==null?void 0:r.id)||"";return{onDownload:()=>{e.requestDownloadUrl&&n&&e.requestDownloadUrl(n)},onInsertLink:()=>{e.requestPublicUrl&&n&&e.requestPublicUrl(n)},onDragReady:()=>{e.prepareDrag&&n&&e.prepareDrag(n)},onClick:()=>{e.selectResource&&n&&e.selectResource(n)}}}function Dy(e,t){const r=(t==null?void 0:t.id)||"";return{onClick:()=>{e.openFolder&&r?e.openFolder(r):e.setCurrentFolder&&r&&e.setCurrentFolder(r)}}}function Oy(e){return t=>{e.openFolder?e.openFolder(t):e.setCurrentFolder&&e.setCurrentFolder(t)}}function My(e){return{onSelect:t=>{e.selectResource&&e.selectResource(t)},onDeselect:t=>{e.deselectResource&&e.deselectResource(t)},onToggle:t=>{e.toggleResourceSelection&&e.toggleResourceSelection(t)}}}function Ay(e,t){return r=>{e.requestDownloadUrl&&e.requestDownloadUrl(t,r)}}function Py(){const[e,t]=a.useState([]),r=a.useCallback(l=>{t(c=>c.some(u=>u.id===l.id)?c.filter(u=>u.id!==l.id):[...c,l])},[]),n=a.useCallback(l=>{t(l)},[]),o=a.useCallback(()=>{t([])},[]),s=a.useCallback(l=>e.some(c=>c.id===l),[e]);return{selectedAssets:e,toggleSelection:r,selectAll:n,clearSelection:o,isSelected:s,selectionCount:e.length}}function Ny(e="root"){const[t,r]=a.useState(e),[n,o]=a.useState([]),s=a.useCallback(f=>{o(h=>[...h,t]),r(f)},[t]),l=a.useCallback(()=>{if(n.length===0)return;const f=n[n.length-1];o(h=>h.slice(0,-1)),f!==void 0&&r(f)},[n]),c=a.useCallback(()=>{o([]),r(e)},[e]),d=n.length>0;return{currentFolderId:t,folderHistory:n,navigateTo:s,goBack:l,goToRoot:c,canGoBack:d,isAtRoot:t===e}}function zy(e=300){const[t,r]=a.useState(""),[n,o]=a.useState(""),[s,l]=a.useState(!1),c=a.useCallback(u=>{r(u),l(!0);const f=setTimeout(()=>{o(u),l(!1)},e);return()=>clearTimeout(f)},[e]),d=a.useCallback(()=>{r(""),o(""),l(!1)},[]);return{query:t,debouncedQuery:n,isSearching:s,updateQuery:c,clearSearch:d}}exports.amberTones=je.amberTones;exports.animation=je.animation;exports.borders=je.borders;exports.brandColors=je.brandColors;exports.colors=je.colors;exports.defaultTenantColors=je.defaultTenantColors;exports.goldenTones=je.goldenTones;exports.magentaTones=je.magentaTones;exports.midnightTones=je.midnightTones;exports.semanticColors=je.semanticColors;exports.shadows=je.shadows;exports.spacing=je.spacing;exports.tokens=je.tokens;exports.typography=je.typography;exports.Accordion=tl;exports.ActionMenuButtons=Yb;exports.AssetBrowser=vl;exports.AssetCard=go;exports.AssistiveMessage=jt;exports.BrowserLoginConfirmation=yl;exports.Button=pe;exports.Card=ot;exports.Chip=Xa;exports.DOCUMENT_FORMATS=sl;exports.DRAG_DROP_SUPPORTED_FORMATS=nl;exports.DropZone=za;exports.DropdownMenu=dn;exports.ErrorMessage=Ct;exports.FieldLabel=Br;exports.FiltersPanel=$l;exports.FolderCard=mo;exports.FolderTree=wl;exports.FormControl=Ka;exports.Grid=sc;exports.GridItem=Wn;exports.IMAGE_FORMATS=ol;exports.Icon=J;exports.Input=At;exports.LinearLoading=Za;exports.LoginForm=kl;exports.Message=cn;exports.Modal=gr;exports.ModalBody=so;exports.ModalFooter=ao;exports.ModalHeader=io;exports.Multiselect=lo;exports.NavBar=ny;exports.Overlay=Ja;exports.PRESET_SUPPORTED_FORMATS=rl;exports.Paginator=Ba;exports.PresetSelector=ho;exports.Radio=Va;exports.RadioGroup=km;exports.SearchForm=Cl;exports.Select=Fa;exports.Snackbar=co;exports.SnackbarProvider=qa;exports.Spinner=mr;exports.Status=Qa;exports.Switch=Ha;exports.Tabs=Pa;exports.TextArea=Ua;exports.ThemeProvider=uy;exports.Tooltip=Bt;exports.VIDEO_FORMATS=il;exports.WarningMessage=nm;exports.adaptFolder=It;exports.adaptFolderToTree=vo;exports.adaptFolders=Rl;exports.adaptFoldersToTree=Dl;exports.adaptPreset=lr;exports.adaptPresets=Ol;exports.adaptPresetsWithCategories=Ml;exports.adaptResource=xo;exports.adaptResources=Fl;exports.allGreyColors=ay;exports.backgroundColors=Hr;exports.baseColors=El;exports.blueColors=Ie;exports.borderColors=Wr;exports.borderRadius=Rr;exports.buildFolderTree=vy;exports.canCopy=bl;exports.canDownload=gl;exports.canEdit=xl;exports.canGeneratePublicLink=ml;exports.createAssetCardActions=Ry;exports.createDownloadWithPresetHandler=Ay;exports.createFolderCardActions=Dy;exports.createFolderTreeSelectHandler=Oy;exports.createOriginalPreset=yo;exports.createSelectionHandlers=My;exports.defaultPaletteColors=tt;exports.findWebAppPreset=Al;exports.formColors=Tl;exports.formatDate=a0;exports.formatDimensions=fl;exports.formatFileSize=dl;exports.formatNumber=d0;exports.formatRelativeTime=l0;exports.gapSizeMap=qb;exports.getAssetBrowserProps=ky;exports.getAssetByIndex=Sy;exports.getAvailableActions=pl;exports.getCurrentFolder=Ly;exports.getFileExtension=ft;exports.getFileTypeIcon=po;exports.getFolderByIndex=Ey;exports.getFolderTreeProps=Cy;exports.getFullPreset=$y;exports.getMimeType=s0;exports.getPaginationInfo=jy;exports.getPermissionSummary=h0;exports.getPresetCategories=Ty;exports.getPresetOptions=Fy;exports.greenColors=nt;exports.greyScale=Ee;exports.hasAllPermissions=f0;exports.hasAnyPermission=p0;exports.hasPermission=Ve;exports.highlightColor=Sl;exports.ibUiColors=cy;exports.ibUiSemanticColors=ly;exports.ibUiShadows=Lt;exports.iconColors=Zt;exports.isDocumentFile=cl;exports.isDropdownDivider=uo;exports.isDropdownHeader=fo;exports.isDropdownMenuItem=el;exports.isImageFile=al;exports.isPublicAsset=hl;exports.isRestrictedAsset=br;exports.isVideoFile=ll;exports.isWebAppFolder=yy;exports.isWebAppPreset=wy;exports.isWebAppResource=xy;exports.legacyGreyColors=jl;exports.orangeColors=Ye;exports.pluralize=u0;exports.productionTheme=bo;exports.progressColors=_r;exports.redColors=Ke;exports.snackbarColors=Jt;exports.statusColors=mt;exports.supportsDragDrop=i0;exports.supportsPresets=o0;exports.textColors=Ft;exports.theme=hy;exports.transparentBlack=Rt;exports.transparentWhite=er;exports.truncateFilename=ul;exports.truncateText=c0;exports.useAssetSelection=Py;exports.useFolderNavigation=Ny;exports.useSearch=zy;exports.useSnackbar=Um;exports.userDefaultColors=Ll;
3613
3791
  //# sourceMappingURL=index.js.map