@saleor/macaw-ui 1.4.1-dev.1 → 1.4.1-dev.2
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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +81 -81
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -97,5 +97,5 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var W=ls(U,es,O,H,z+"."+
|
|
|
97
97
|
`)},Ju=function(s){var e=s.noRelative,t=s.noImportant,o=s.gapMode,i=o===void 0?"margin":o,n=os.useMemo(function(){return Yu(i)},[i]);return os.createElement(Gu,{styles:Xu(n,!e,i,t?"":"!important")})},Yo=!1;if(typeof window<"u")try{var yt=Object.defineProperty({},"passive",{get:function(){return Yo=!0,!0}});window.addEventListener("test",yt,yt),window.removeEventListener("test",yt,yt)}catch{Yo=!1}var Se=Yo?{passive:!1}:!1,Qu=function(s){return s.tagName==="TEXTAREA"},Yl=function(s,e){var t=window.getComputedStyle(s);return t[e]!=="hidden"&&!(t.overflowY===t.overflowX&&!Qu(s)&&t[e]==="visible")},s_=function(s){return Yl(s,"overflowY")},e_=function(s){return Yl(s,"overflowX")},S8=function(s,e){var t=e;do{typeof ShadowRoot<"u"&&t instanceof ShadowRoot&&(t=t.host);var o=Gl(s,t);if(o){var i=Xl(s,t),n=i[1],f=i[2];if(n>f)return!0}t=t.parentNode}while(t&&t!==document.body);return!1},t_=function(s){var e=s.scrollTop,t=s.scrollHeight,o=s.clientHeight;return[e,t,o]},o_=function(s){var e=s.scrollLeft,t=s.scrollWidth,o=s.clientWidth;return[e,t,o]},Gl=function(s,e){return s==="v"?s_(e):e_(e)},Xl=function(s,e){return s==="v"?t_(e):o_(e)},n_=function(s,e){return s==="h"&&e==="rtl"?-1:1},i_=function(s,e,t,o,i){var n=n_(s,window.getComputedStyle(e).direction),f=n*o,l=t.target,r=e.contains(l),p=!1,c=f>0,d=0,h=0;do{var _=Xl(s,l),x=_[0],C=_[1],v=_[2],k=C-v-n*x;(x||k)&&Gl(s,l)&&(d+=k,h+=x),l=l.parentNode}while(!r&&l!==document.body||r&&(e.contains(l)||e===l));return(c&&d===0||!c&&h===0)&&(p=!0),p},xt=function(s){return"changedTouches"in s?[s.changedTouches[0].clientX,s.changedTouches[0].clientY]:[0,0]},D8=function(s){return[s.deltaX,s.deltaY]},j8=function(s){return s&&"current"in s?s.current:s},f_=function(s,e){return s[0]===e[0]&&s[1]===e[1]},l_=function(s){return`
|
|
98
98
|
.block-interactivity-`.concat(s,` {pointer-events: none;}
|
|
99
99
|
.allow-interactivity-`).concat(s,` {pointer-events: all;}
|
|
100
|
-
`)},a_=0,De=[];function r_(s){var e=os.useRef([]),t=os.useRef([0,0]),o=os.useRef(),i=os.useState(a_++)[0],n=os.useState(function(){return Ul()})[0],f=os.useRef(s);os.useEffect(function(){f.current=s},[s]),os.useEffect(function(){if(s.inert){document.body.classList.add("block-interactivity-".concat(i));var C=yc([s.lockRef.current],(s.shards||[]).map(j8),!0).filter(Boolean);return C.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),C.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[s.inert,s.lockRef.current,s.shards]);var l=os.useCallback(function(C,v){if("touches"in C&&C.touches.length===2)return!f.current.allowPinchZoom;var k=xt(C),b=t.current,g="deltaX"in C?C.deltaX:b[0]-k[0],y="deltaY"in C?C.deltaY:b[1]-k[1],m,I=C.target,P=Math.abs(g)>Math.abs(y)?"h":"v";if("touches"in C&&P==="h"&&I.type==="range")return!1;var R=S8(P,I);if(!R)return!0;if(R?m=P:(m=P==="v"?"h":"v",R=S8(P,I)),!R)return!1;if(!o.current&&"changedTouches"in C&&(g||y)&&(o.current=m),!m)return!0;var E=o.current||m;return i_(E,v,C,E==="h"?g:y)},[]),r=os.useCallback(function(C){var v=C;if(!(!De.length||De[De.length-1]!==n)){var k="deltaY"in v?D8(v):xt(v),b=e.current.filter(function(m){return m.name===v.type&&m.target===v.target&&f_(m.delta,k)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}if(!b){var g=(f.current.shards||[]).map(j8).filter(Boolean).filter(function(m){return m.contains(v.target)}),y=g.length>0?l(v,g[0]):!f.current.noIsolation;y&&v.cancelable&&v.preventDefault()}}},[]),p=os.useCallback(function(C,v,k,b){var g={name:C,delta:v,target:k,should:b};e.current.push(g),setTimeout(function(){e.current=e.current.filter(function(y){return y!==g})},1)},[]),c=os.useCallback(function(C){t.current=xt(C),o.current=void 0},[]),d=os.useCallback(function(C){p(C.type,D8(C),C.target,l(C,s.lockRef.current))},[]),h=os.useCallback(function(C){p(C.type,xt(C),C.target,l(C,s.lockRef.current))},[]);os.useEffect(function(){return De.push(n),s.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",r,Se),document.addEventListener("touchmove",r,Se),document.addEventListener("touchstart",c,Se),function(){De=De.filter(function(C){return C!==n}),document.removeEventListener("wheel",r,Se),document.removeEventListener("touchmove",r,Se),document.removeEventListener("touchstart",c,Se)}},[]);var _=s.removeScrollBar,x=s.inert;return os.createElement(os.Fragment,null,x?os.createElement(n,{styles:l_(i)}):null,_?os.createElement(Ju,{gapMode:"margin"}):null)}const p_=Wu(Zl,r_);var ao=os.forwardRef(function(s,e){return os.createElement(lo,Ms({},s,{ref:e,sideCar:p_}))});ao.classNames=lo.classNames;var d_=function(s){if(typeof document>"u")return null;var e=Array.isArray(s)?s[0]:s;return e.ownerDocument.body},je=new WeakMap,kt=new WeakMap,wt={},Oo=0,Jl=function(s){return s&&(s.host||Jl(s.parentNode))},c_=function(s,e){return e.map(function(t){if(s.contains(t))return t;var o=Jl(t);return o&&s.contains(o)?o:(console.error("aria-hidden",t,"in not contained inside",s,". Doing nothing"),null)}).filter(function(t){return!!t})},u_=function(s,e,t,o){var i=c_(e,Array.isArray(s)?s:[s]);wt[t]||(wt[t]=new WeakMap);var n=wt[t],f=[],l=new Set,r=new Set(i),p=function(d){!d||l.has(d)||(l.add(d),p(d.parentNode))};i.forEach(p);var c=function(d){!d||r.has(d)||Array.prototype.forEach.call(d.children,function(h){if(l.has(h))c(h);else{var _=h.getAttribute(o),x=_!==null&&_!=="false",C=(je.get(h)||0)+1,v=(n.get(h)||0)+1;je.set(h,C),n.set(h,v),f.push(h),C===1&&x&&kt.set(h,!0),v===1&&h.setAttribute(t,"true"),x||h.setAttribute(o,"true")}})};return c(e),l.clear(),Oo++,function(){f.forEach(function(d){var h=je.get(d)-1,_=n.get(d)-1;je.set(d,h),n.set(d,_),h||(kt.has(d)||d.removeAttribute(o),kt.delete(d)),_||d.removeAttribute(t)}),Oo--,Oo||(je=new WeakMap,je=new WeakMap,kt=new WeakMap,wt={})}},ui=function(s,e,t){t===void 0&&(t="data-aria-hidden");var o=Array.from(Array.isArray(s)?s:[s]),i=d_(s);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live]"))),u_(o,i,t,"aria-hidden")):function(){return null}};const Ql="Dialog",[sa]=Ws(Ql),[__,ae]=sa(Ql),h_=s=>{const{__scopeDialog:e,children:t,open:o,defaultOpen:i,onOpenChange:n,modal:f=!0}=s,l=a.useRef(null),r=a.useRef(null),[p=!1,c]=Us({prop:o,defaultProp:i,onChange:n});return a.createElement(__,{scope:e,triggerRef:l,contentRef:r,contentId:Js(),titleId:Js(),descriptionId:Js(),open:p,onOpenChange:c,onOpenToggle:a.useCallback(()=>c(d=>!d),[c]),modal:f},t)},b_="DialogTrigger",m_=a.forwardRef((s,e)=>{const{__scopeDialog:t,...o}=s,i=ae(b_,t),n=xs(e,i.triggerRef);return a.createElement(Cs.button,S({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":_i(i.open)},o,{ref:n,onClick:is(s.onClick,i.onOpenToggle)}))}),ea="DialogPortal",[v_,ta]=sa(ea,{forceMount:void 0}),C_=s=>{const{__scopeDialog:e,forceMount:t,children:o,container:i}=s,n=ae(ea,e);return a.createElement(v_,{scope:e,forceMount:t},a.Children.map(o,f=>a.createElement(zs,{present:t||n.open},a.createElement(fo,{asChild:!0,container:i},f))))},Go="DialogOverlay",g_=a.forwardRef((s,e)=>{const t=ta(Go,s.__scopeDialog),{forceMount:o=t.forceMount,...i}=s,n=ae(Go,s.__scopeDialog);return n.modal?a.createElement(zs,{present:o||n.open},a.createElement(y_,S({},i,{ref:e}))):null}),y_=a.forwardRef((s,e)=>{const{__scopeDialog:t,...o}=s,i=ae(Go,t);return a.createElement(ao,{as:ke,allowPinchZoom:!0,shards:[i.contentRef]},a.createElement(Cs.div,S({"data-state":_i(i.open)},o,{ref:e,style:{pointerEvents:"auto",...o.style}})))}),Ae="DialogContent",x_=a.forwardRef((s,e)=>{const t=ta(Ae,s.__scopeDialog),{forceMount:o=t.forceMount,...i}=s,n=ae(Ae,s.__scopeDialog);return a.createElement(zs,{present:o||n.open},n.modal?a.createElement(k_,S({},i,{ref:e})):a.createElement(w_,S({},i,{ref:e})))}),k_=a.forwardRef((s,e)=>{const t=ae(Ae,s.__scopeDialog),o=a.useRef(null),i=xs(e,t.contentRef,o);return a.useEffect(()=>{const n=o.current;if(n)return ui(n)},[]),a.createElement(oa,S({},s,{ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:is(s.onCloseAutoFocus,n=>{var f;n.preventDefault(),(f=t.triggerRef.current)===null||f===void 0||f.focus()}),onPointerDownOutside:is(s.onPointerDownOutside,n=>{const f=n.detail.originalEvent,l=f.button===0&&f.ctrlKey===!0;(f.button===2||l)&&n.preventDefault()}),onFocusOutside:is(s.onFocusOutside,n=>n.preventDefault())}))}),w_=a.forwardRef((s,e)=>{const t=ae(Ae,s.__scopeDialog),o=a.useRef(!1),i=a.useRef(!1);return a.createElement(oa,S({},s,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{var f;if((f=s.onCloseAutoFocus)===null||f===void 0||f.call(s,n),!n.defaultPrevented){var l;o.current||(l=t.triggerRef.current)===null||l===void 0||l.focus(),n.preventDefault()}o.current=!1,i.current=!1},onInteractOutside:n=>{var f,l;(f=s.onInteractOutside)===null||f===void 0||f.call(s,n),n.defaultPrevented||(o.current=!0,n.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const r=n.target;((l=t.triggerRef.current)===null||l===void 0?void 0:l.contains(r))&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&i.current&&n.preventDefault()}}))}),oa=a.forwardRef((s,e)=>{const{__scopeDialog:t,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:n,...f}=s,l=ae(Ae,t),r=a.useRef(null),p=xs(e,r);return ci(),a.createElement(a.Fragment,null,a.createElement(di,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:n},a.createElement(io,S({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":_i(l.open)},f,{ref:p,onDismiss:()=>l.onOpenChange(!1)}))),!1)}),$_="DialogTitle";const I_="DialogClose",E_=a.forwardRef((s,e)=>{const{__scopeDialog:t,...o}=s,i=ae(I_,t);return a.createElement(Cs.button,S({type:"button"},o,{ref:e,onClick:is(s.onClick,()=>i.onOpenChange(!1))}))});function _i(s){return s?"open":"closed"}const R_="DialogTitleWarning";Jr(R_,{contentName:Ae,titleName:$_,docsSlug:"dialog"});const na=h_,ia=m_,fa=C_,la=g_,aa=x_,ra=E_;var O8="_68ye811";const pa=({children:s,...e})=>u.jsxs(fa,{children:[u.jsx(la,{asChild:!0,className:O8,children:u.jsx(Yt,{})}),u.jsx(aa,{asChild:!0,className:O8,children:u.jsxs(Y,{backgroundColor:"default1",boxShadow:"defaultModal",top:0,left:0,height:"100%",borderTopRightRadius:3,borderBottomRightRadius:3,position:"fixed",paddingTop:7,"data-macaw-ui-component":"Drawer.Content",...e,children:[s,u.jsx(ra,{asChild:!0,children:u.jsx(Qe,{variant:"tertiary",icon:u.jsx(uf,{}),size:"small",className:Ys({position:"absolute",top:1,right:1})})})]})})]});pa.displayName="Drawer.Content";const da=({children:s})=>u.jsx(na,{"data-macaw-ui-component":"Drawer",children:s});da.displayName="Drawer";const ca=({children:s})=>u.jsx(ia,{asChild:!0,"data-macaw-ui-component":"Drawer.Trigger",children:s});ca.displayName="Drawer.Trigger";const P_=Object.assign(da,{Content:pa,Trigger:ca}),S_=a.forwardRef((s,e)=>{const{children:t,width:o=10,height:i=5,...n}=s;return a.createElement(Cs.svg,S({},n,{ref:e,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),s.asChild?t:a.createElement("polygon",{points:"0,0 30,0 15,10"}))}),D_=S_,ua="Popper",[_a,He]=Ws(ua),[j_,ha]=_a(ua),O_=s=>{const{__scopePopper:e,children:t}=s,[o,i]=a.useState(null);return a.createElement(j_,{scope:e,anchor:o,onAnchorChange:i},t)},T_="PopperAnchor",M_=a.forwardRef((s,e)=>{const{__scopePopper:t,virtualRef:o,...i}=s,n=ha(T_,t),f=a.useRef(null),l=xs(e,f);return a.useEffect(()=>{n.onAnchorChange((o==null?void 0:o.current)||f.current)}),o?null:a.createElement(Cs.div,S({},i,{ref:l}))}),ba="PopperContent",[V_,A_]=_a(ba),N_=a.forwardRef((s,e)=>{var t,o,i,n,f,l,r,p;const{__scopePopper:c,side:d="bottom",sideOffset:h=0,align:_="center",alignOffset:x=0,arrowPadding:C=0,avoidCollisions:v=!0,collisionBoundary:k=[],collisionPadding:b=0,sticky:g="partial",hideWhenDetached:y=!1,updatePositionStrategy:m="optimized",onPlaced:I,...P}=s,R=ha(ba,c),[E,j]=a.useState(null),M=xs(e,ys=>j(ys)),[L,X]=a.useState(null),A=cn(L),B=(t=A==null?void 0:A.width)!==null&&t!==void 0?t:0,K=(o=A==null?void 0:A.height)!==null&&o!==void 0?o:0,ts=d+(_!=="center"?"-"+_:""),Z=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},T=Array.isArray(k)?k:[k],$=T.length>0,D={padding:Z,boundary:T.filter(H_),altBoundary:$},{refs:V,floatingStyles:N,placement:O,isPositioned:H,middlewareData:z}=Lf({strategy:"fixed",placement:ts,whileElementsMounted:(...ys)=>Mf(...ys,{animationFrame:m==="always"}),elements:{reference:R.anchor},middleware:[Md({mainAxis:h+K,alignmentAxis:x}),v&&tc({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?nc():void 0,...D}),v&&Vf({...D}),Af({...D,apply:({elements:ys,rects:vs,availableWidth:ws,availableHeight:Ps})=>{const{width:Ss,height:te}=vs.reference,$s=ys.floating.style;$s.setProperty("--radix-popper-available-width",`${ws}px`),$s.setProperty("--radix-popper-available-height",`${Ps}px`),$s.setProperty("--radix-popper-anchor-width",`${Ss}px`),$s.setProperty("--radix-popper-anchor-height",`${te}px`)}}),L&&fc({element:L,padding:C}),q_({arrowWidth:B,arrowHeight:K}),y&&oc({strategy:"referenceHidden",...D})]}),[U,G]=ma(O),Q=se(I);we(()=>{H&&(Q==null||Q())},[H,Q]);const es=(i=z.arrow)===null||i===void 0?void 0:i.x,ls=(n=z.arrow)===null||n===void 0?void 0:n.y,W=((f=z.arrow)===null||f===void 0?void 0:f.centerOffset)!==0,[cs,J]=a.useState();return we(()=>{E&&J(window.getComputedStyle(E).zIndex)},[E]),a.createElement("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...N,transform:H?N.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:cs,"--radix-popper-transform-origin":[(l=z.transformOrigin)===null||l===void 0?void 0:l.x,(r=z.transformOrigin)===null||r===void 0?void 0:r.y].join(" ")},dir:s.dir},a.createElement(V_,{scope:c,placedSide:U,onArrowChange:X,arrowX:es,arrowY:ls,shouldHideArrow:W},a.createElement(Cs.div,S({"data-side":U,"data-align":G},P,{ref:M,style:{...P.style,animation:H?void 0:"none",opacity:(p=z.hide)!==null&&p!==void 0&&p.referenceHidden?0:void 0}}))))}),L_="PopperArrow",W_={top:"bottom",right:"left",bottom:"top",left:"right"},z_=a.forwardRef(function(e,t){const{__scopePopper:o,...i}=e,n=A_(L_,o),f=W_[n.placedSide];return a.createElement("span",{ref:n.onArrowChange,style:{position:"absolute",left:n.arrowX,top:n.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[n.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[n.placedSide],visibility:n.shouldHideArrow?"hidden":void 0}},a.createElement(D_,S({},i,{ref:t,style:{...i.style,display:"block"}})))});function H_(s){return s!==null}const q_=s=>({name:"transformOrigin",options:s,fn(e){var t,o,i,n,f;const{placement:l,rects:r,middlewareData:p}=e,d=((t=p.arrow)===null||t===void 0?void 0:t.centerOffset)!==0,h=d?0:s.arrowWidth,_=d?0:s.arrowHeight,[x,C]=ma(l),v={start:"0%",center:"50%",end:"100%"}[C],k=((o=(i=p.arrow)===null||i===void 0?void 0:i.x)!==null&&o!==void 0?o:0)+h/2,b=((n=(f=p.arrow)===null||f===void 0?void 0:f.y)!==null&&n!==void 0?n:0)+_/2;let g="",y="";return x==="bottom"?(g=d?v:`${k}px`,y=`${-_}px`):x==="top"?(g=d?v:`${k}px`,y=`${r.floating.height+_}px`):x==="right"?(g=`${-_}px`,y=d?v:`${b}px`):x==="left"&&(g=`${r.floating.width+_}px`,y=d?v:`${b}px`),{data:{x:g,y}}}});function ma(s){const[e,t="center"]=s.split("-");return[e,t]}const hi=O_,ro=M_,bi=N_,va=z_,To="rovingFocusGroup.onEntryFocus",F_={bubbles:!1,cancelable:!0},mi="RovingFocusGroup",[Xo,Ca,K_]=on(mi),[B_,po]=Ws(mi,[K_]),[Z_,U_]=B_(mi),Y_=a.forwardRef((s,e)=>a.createElement(Xo.Provider,{scope:s.__scopeRovingFocusGroup},a.createElement(Xo.Slot,{scope:s.__scopeRovingFocusGroup},a.createElement(G_,S({},s,{ref:e}))))),G_=a.forwardRef((s,e)=>{const{__scopeRovingFocusGroup:t,orientation:o,loop:i=!1,dir:n,currentTabStopId:f,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:r,onEntryFocus:p,...c}=s,d=a.useRef(null),h=xs(e,d),_=Bt(n),[x=null,C]=Us({prop:f,defaultProp:l,onChange:r}),[v,k]=a.useState(!1),b=se(p),g=Ca(t),y=a.useRef(!1),[m,I]=a.useState(0);return a.useEffect(()=>{const P=d.current;if(P)return P.addEventListener(To,b),()=>P.removeEventListener(To,b)},[b]),a.createElement(Z_,{scope:t,orientation:o,dir:_,loop:i,currentTabStopId:x,onItemFocus:a.useCallback(P=>C(P),[C]),onItemShiftTab:a.useCallback(()=>k(!0),[]),onFocusableItemAdd:a.useCallback(()=>I(P=>P+1),[]),onFocusableItemRemove:a.useCallback(()=>I(P=>P-1),[])},a.createElement(Cs.div,S({tabIndex:v||m===0?-1:0,"data-orientation":o},c,{ref:h,style:{outline:"none",...s.style},onMouseDown:is(s.onMouseDown,()=>{y.current=!0}),onFocus:is(s.onFocus,P=>{const R=!y.current;if(P.target===P.currentTarget&&R&&!v){const E=new CustomEvent(To,F_);if(P.currentTarget.dispatchEvent(E),!E.defaultPrevented){const j=g().filter(B=>B.focusable),M=j.find(B=>B.active),L=j.find(B=>B.id===x),A=[M,L,...j].filter(Boolean).map(B=>B.ref.current);ga(A)}}y.current=!1}),onBlur:is(s.onBlur,()=>k(!1))})))}),X_="RovingFocusGroupItem",J_=a.forwardRef((s,e)=>{const{__scopeRovingFocusGroup:t,focusable:o=!0,active:i=!1,tabStopId:n,...f}=s,l=Js(),r=n||l,p=U_(X_,t),c=p.currentTabStopId===r,d=Ca(t),{onFocusableItemAdd:h,onFocusableItemRemove:_}=p;return a.useEffect(()=>{if(o)return h(),()=>_()},[o,h,_]),a.createElement(Xo.ItemSlot,{scope:t,id:r,focusable:o,active:i},a.createElement(Cs.span,S({tabIndex:c?0:-1,"data-orientation":p.orientation},f,{ref:e,onMouseDown:is(s.onMouseDown,x=>{o?p.onItemFocus(r):x.preventDefault()}),onFocus:is(s.onFocus,()=>p.onItemFocus(r)),onKeyDown:is(s.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){p.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const C=eh(x,p.orientation,p.dir);if(C!==void 0){x.preventDefault();let k=d().filter(b=>b.focusable).map(b=>b.ref.current);if(C==="last")k.reverse();else if(C==="prev"||C==="next"){C==="prev"&&k.reverse();const b=k.indexOf(x.currentTarget);k=p.loop?th(k,b+1):k.slice(b+1)}setTimeout(()=>ga(k))}})})))}),Q_={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function sh(s,e){return e!=="rtl"?s:s==="ArrowLeft"?"ArrowRight":s==="ArrowRight"?"ArrowLeft":s}function eh(s,e,t){const o=sh(s.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Q_[o]}function ga(s){const e=document.activeElement;for(const t of s)if(t===e||(t.focus(),document.activeElement!==e))return}function th(s,e){return s.map((t,o)=>s[(e+o)%s.length])}const ya=Y_,xa=J_,oh=["Enter"," "],nh=["ArrowDown","PageUp","Home"],ka=["ArrowUp","PageDown","End"],ih=[...nh,...ka],co="Menu",[Jo,fh,lh]=on(co),[Ie,wa]=Ws(co,[lh,He,po]),vi=He(),$a=po(),[ah,dt]=Ie(co),[rh,Ci]=Ie(co),ph=s=>{const{__scopeMenu:e,open:t=!1,children:o,dir:i,onOpenChange:n,modal:f=!0}=s,l=vi(e),[r,p]=a.useState(null),c=a.useRef(!1),d=se(n),h=Bt(i);return a.useEffect(()=>{const _=()=>{c.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>c.current=!1;return document.addEventListener("keydown",_,{capture:!0}),()=>{document.removeEventListener("keydown",_,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),a.createElement(hi,l,a.createElement(ah,{scope:e,open:t,onOpenChange:d,content:r,onContentChange:p},a.createElement(rh,{scope:e,onClose:a.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:h,modal:f},o)))},dh=a.forwardRef((s,e)=>{const{__scopeMenu:t,...o}=s,i=vi(t);return a.createElement(ro,S({},i,o,{ref:e}))}),Ia="MenuPortal",[ch,uh]=Ie(Ia,{forceMount:void 0}),_h=s=>{const{__scopeMenu:e,forceMount:t,children:o,container:i}=s,n=dt(Ia,e);return a.createElement(ch,{scope:e,forceMount:t},a.createElement(zs,{present:t||n.open},a.createElement(fo,{asChild:!0,container:i},o)))},pe="MenuContent",[hh,Ea]=Ie(pe),bh=a.forwardRef((s,e)=>{const t=uh(pe,s.__scopeMenu),{forceMount:o=t.forceMount,...i}=s,n=dt(pe,s.__scopeMenu),f=Ci(pe,s.__scopeMenu);return a.createElement(Jo.Provider,{scope:s.__scopeMenu},a.createElement(zs,{present:o||n.open},a.createElement(Jo.Slot,{scope:s.__scopeMenu},f.modal?a.createElement(mh,S({},i,{ref:e})):a.createElement(vh,S({},i,{ref:e})))))}),mh=a.forwardRef((s,e)=>{const t=dt(pe,s.__scopeMenu),o=a.useRef(null),i=xs(e,o);return a.useEffect(()=>{const n=o.current;if(n)return ui(n)},[]),a.createElement(Ra,S({},s,{ref:i,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:is(s.onFocusOutside,n=>n.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)}))}),vh=a.forwardRef((s,e)=>{const t=dt(pe,s.__scopeMenu);return a.createElement(Ra,S({},s,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)}))}),Ra=a.forwardRef((s,e)=>{const{__scopeMenu:t,loop:o=!1,trapFocus:i,onOpenAutoFocus:n,onCloseAutoFocus:f,disableOutsidePointerEvents:l,onEntryFocus:r,onEscapeKeyDown:p,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:_,disableOutsideScroll:x,...C}=s,v=dt(pe,t),k=Ci(pe,t),b=vi(t),g=$a(t),y=fh(t),[m,I]=a.useState(null),P=a.useRef(null),R=xs(e,P,v.onContentChange),E=a.useRef(0),j=a.useRef(""),M=a.useRef(0),L=a.useRef(null),X=a.useRef("right"),A=a.useRef(0),B=x?ao:a.Fragment,K=x?{as:ke,allowPinchZoom:!0}:void 0,ts=T=>{var $,D;const V=j.current+T,N=y().filter(Q=>!Q.disabled),O=document.activeElement,H=($=N.find(Q=>Q.ref.current===O))===null||$===void 0?void 0:$.textValue,z=N.map(Q=>Q.textValue),U=Eh(z,V,H),G=(D=N.find(Q=>Q.textValue===U))===null||D===void 0?void 0:D.ref.current;(function Q(es){j.current=es,window.clearTimeout(E.current),es!==""&&(E.current=window.setTimeout(()=>Q(""),1e3))})(V),G&&setTimeout(()=>G.focus())};a.useEffect(()=>()=>window.clearTimeout(E.current),[]),ci();const Z=a.useCallback(T=>{var $,D;return X.current===(($=L.current)===null||$===void 0?void 0:$.side)&&Ph(T,(D=L.current)===null||D===void 0?void 0:D.area)},[]);return a.createElement(hh,{scope:t,searchRef:j,onItemEnter:a.useCallback(T=>{Z(T)&&T.preventDefault()},[Z]),onItemLeave:a.useCallback(T=>{var $;Z(T)||(($=P.current)===null||$===void 0||$.focus(),I(null))},[Z]),onTriggerLeave:a.useCallback(T=>{Z(T)&&T.preventDefault()},[Z]),pointerGraceTimerRef:M,onPointerGraceIntentChange:a.useCallback(T=>{L.current=T},[])},a.createElement(B,K,a.createElement(di,{asChild:!0,trapped:i,onMountAutoFocus:is(n,T=>{var $;T.preventDefault(),($=P.current)===null||$===void 0||$.focus()}),onUnmountAutoFocus:f},a.createElement(io,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:p,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:_},a.createElement(ya,S({asChild:!0},g,{dir:k.dir,orientation:"vertical",loop:o,currentTabStopId:m,onCurrentTabStopIdChange:I,onEntryFocus:is(r,T=>{k.isUsingKeyboardRef.current||T.preventDefault()})}),a.createElement(bi,S({role:"menu","aria-orientation":"vertical","data-state":wh(v.open),"data-radix-menu-content":"",dir:k.dir},b,C,{ref:R,style:{outline:"none",...C.style},onKeyDown:is(C.onKeyDown,T=>{const D=T.target.closest("[data-radix-menu-content]")===T.currentTarget,V=T.ctrlKey||T.altKey||T.metaKey,N=T.key.length===1;D&&(T.key==="Tab"&&T.preventDefault(),!V&&N&&ts(T.key));const O=P.current;if(T.target!==O||!ih.includes(T.key))return;T.preventDefault();const z=y().filter(U=>!U.disabled).map(U=>U.ref.current);ka.includes(T.key)&&z.reverse(),$h(z)}),onBlur:is(s.onBlur,T=>{T.currentTarget.contains(T.target)||(window.clearTimeout(E.current),j.current="")}),onPointerMove:is(s.onPointerMove,sn(T=>{const $=T.target,D=A.current!==T.clientX;if(T.currentTarget.contains($)&&D){const V=T.clientX>A.current?"right":"left";X.current=V,A.current=T.clientX}}))})))))))}),Qo="MenuItem",T8="menu.itemSelect",Ch=a.forwardRef((s,e)=>{const{disabled:t=!1,onSelect:o,...i}=s,n=a.useRef(null),f=Ci(Qo,s.__scopeMenu),l=Ea(Qo,s.__scopeMenu),r=xs(e,n),p=a.useRef(!1),c=()=>{const d=n.current;if(!t&&d){const h=new CustomEvent(T8,{bubbles:!0,cancelable:!0});d.addEventListener(T8,_=>o==null?void 0:o(_),{once:!0}),W8(d,h),h.defaultPrevented?p.current=!1:f.onClose()}};return a.createElement(gh,S({},i,{ref:r,disabled:t,onClick:is(s.onClick,c),onPointerDown:d=>{var h;(h=s.onPointerDown)===null||h===void 0||h.call(s,d),p.current=!0},onPointerUp:is(s.onPointerUp,d=>{var h;p.current||(h=d.currentTarget)===null||h===void 0||h.click()}),onKeyDown:is(s.onKeyDown,d=>{const h=l.searchRef.current!=="";t||h&&d.key===" "||oh.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})}))}),gh=a.forwardRef((s,e)=>{const{__scopeMenu:t,disabled:o=!1,textValue:i,...n}=s,f=Ea(Qo,t),l=$a(t),r=a.useRef(null),p=xs(e,r),[c,d]=a.useState(!1),[h,_]=a.useState("");return a.useEffect(()=>{const x=r.current;if(x){var C;_(((C=x.textContent)!==null&&C!==void 0?C:"").trim())}},[n.children]),a.createElement(Jo.ItemSlot,{scope:t,disabled:o,textValue:i??h},a.createElement(xa,S({asChild:!0},l,{focusable:!o}),a.createElement(Cs.div,S({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0},n,{ref:p,onPointerMove:is(s.onPointerMove,sn(x=>{o?f.onItemLeave(x):(f.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus())})),onPointerLeave:is(s.onPointerLeave,sn(x=>f.onItemLeave(x))),onFocus:is(s.onFocus,()=>d(!0)),onBlur:is(s.onBlur,()=>d(!1))}))))}),yh="MenuRadioGroup",[am,rm]=Ie(yh,{value:void 0,onValueChange:()=>{}}),xh="MenuItemIndicator",[pm,dm]=Ie(xh,{checked:!1}),kh="MenuSub",[cm,um]=Ie(kh);function wh(s){return s?"open":"closed"}function $h(s){const e=document.activeElement;for(const t of s)if(t===e||(t.focus(),document.activeElement!==e))return}function Ih(s,e){return s.map((t,o)=>s[(e+o)%s.length])}function Eh(s,e,t){const i=e.length>1&&Array.from(e).every(p=>p===e[0])?e[0]:e,n=t?s.indexOf(t):-1;let f=Ih(s,Math.max(n,0));i.length===1&&(f=f.filter(p=>p!==t));const r=f.find(p=>p.toLowerCase().startsWith(i.toLowerCase()));return r!==t?r:void 0}function Rh(s,e){const{x:t,y:o}=s;let i=!1;for(let n=0,f=e.length-1;n<e.length;f=n++){const l=e[n].x,r=e[n].y,p=e[f].x,c=e[f].y;r>o!=c>o&&t<(p-l)*(o-r)/(c-r)+l&&(i=!i)}return i}function Ph(s,e){if(!e)return!1;const t={x:s.clientX,y:s.clientY};return Rh(t,e)}function sn(s){return e=>e.pointerType==="mouse"?s(e):void 0}const Sh=ph,Dh=dh,jh=_h,Oh=bh,Th=Ch,Pa="DropdownMenu",[Mh]=Ws(Pa,[wa]),ct=wa(),[Vh,Sa]=Mh(Pa),Ah=s=>{const{__scopeDropdownMenu:e,children:t,dir:o,open:i,defaultOpen:n,onOpenChange:f,modal:l=!0}=s,r=ct(e),p=a.useRef(null),[c=!1,d]=Us({prop:i,defaultProp:n,onChange:f});return a.createElement(Vh,{scope:e,triggerId:Js(),triggerRef:p,contentId:Js(),open:c,onOpenChange:d,onOpenToggle:a.useCallback(()=>d(h=>!h),[d]),modal:l},a.createElement(Sh,S({},r,{open:c,onOpenChange:d,dir:o,modal:l}),t))},Nh="DropdownMenuTrigger",Lh=a.forwardRef((s,e)=>{const{__scopeDropdownMenu:t,disabled:o=!1,...i}=s,n=Sa(Nh,t),f=ct(t);return a.createElement(Dh,S({asChild:!0},f),a.createElement(Cs.button,S({type:"button",id:n.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":n.open?n.contentId:void 0,"data-state":n.open?"open":"closed","data-disabled":o?"":void 0,disabled:o},i,{ref:tn(e,n.triggerRef),onPointerDown:is(s.onPointerDown,l=>{!o&&l.button===0&&l.ctrlKey===!1&&(n.onOpenToggle(),n.open||l.preventDefault())}),onKeyDown:is(s.onKeyDown,l=>{o||(["Enter"," "].includes(l.key)&&n.onOpenToggle(),l.key==="ArrowDown"&&n.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})))}),Wh=s=>{const{__scopeDropdownMenu:e,...t}=s,o=ct(e);return a.createElement(jh,S({},o,t))},zh="DropdownMenuContent",Hh=a.forwardRef((s,e)=>{const{__scopeDropdownMenu:t,...o}=s,i=Sa(zh,t),n=ct(t),f=a.useRef(!1);return a.createElement(Oh,S({id:i.contentId,"aria-labelledby":i.triggerId},n,o,{ref:e,onCloseAutoFocus:is(s.onCloseAutoFocus,l=>{var r;f.current||(r=i.triggerRef.current)===null||r===void 0||r.focus(),f.current=!1,l.preventDefault()}),onInteractOutside:is(s.onInteractOutside,l=>{const r=l.detail.originalEvent,p=r.button===0&&r.ctrlKey===!0,c=r.button===2||p;(!i.modal||c)&&(f.current=!0)}),style:{...s.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),qh=a.forwardRef((s,e)=>{const{__scopeDropdownMenu:t,...o}=s,i=ct(t);return a.createElement(Th,S({},i,o,{ref:e}))}),Fh=Ah,Kh=Lh,Bh=Wh,Zh=Hh,Uh=qh;var Yh="_6vehm81",Gh="_6vehm82";const Da=({children:s,...e})=>u.jsx(Bh,{children:u.jsx(Zh,{asChild:!0,className:Yh,"data-macaw-ui-component":"Dropdown.Content",...e,children:s})});Da.displayName="Dropdown.Content";const ja=({children:s})=>u.jsx(Uh,{asChild:!0,className:Gh,"data-macaw-ui-component":"Dropdown.Item",children:s});ja.displayName="Dropdown.Item";const Oa=({children:s,onOpenChange:e,open:t})=>u.jsx(Fh,{open:t,onOpenChange:e,"data-macaw-ui-component":"Dropdown",children:s});Oa.displayName="Dropdown";const Ta=({children:s})=>u.jsx(Kh,{asChild:!0,"data-macaw-ui-component":"Dropdown.Trigger",children:s});Ta.displayName="Dropdown.Trigger";const Xh=Object.assign(Oa,{Trigger:Ta,Content:Da,Item:ja});var Jh=ks({defaultClassName:"_18fs8ps2ru _18fs8ps31i _18fs8ps28i _18fs8ps2i6 _18fs8ps10 _18fs8ps1x _18fs8ps1mc _18fs8ps1mi _18fs8ps1m0 _18fs8ps1m6 _18fs8ps1n9 _18fs8ps3 _18fs8ps3ti _18fs8ps3u0 _18fs8ps24u _18fs8ps21k _18fs8ps21n _18fs8ps25i _18fs8ps3du _18fs8ps3eo",variantClassNames:{variant:{contained:"_18fs8ps3qi _18fs8ps3pv _18fs8ps3pm _18fs8ps3qb _18fs8ps3rc",text:"_18fs8ps3qi _18fs8ps3pv _18fs8ps3pm _18fs8ps3qb _18fs8ps3rc"},size:{small:"_18fs8ps296 _18fs8ps2iu _18fs8ps2s6 _18fs8ps31u _18fs8ps1gi _18fs8ps1fl _18fs8ps1ic _18fs8ps1hf _18fs8ps1j6 _18fs8ps1kr _18fs8ps1nf _18fs8ps209 _18fs8psdx",medium:"_18fs8ps296 _18fs8ps2iu _18fs8ps30i _18fs8ps3a6 _18fs8ps1gl _18fs8ps1fo _18fs8ps1if _18fs8ps1hi _18fs8ps17u _18fs8ps1j9 _18fs8ps1kr _18fs8ps1ni _18fs8ps209 _18fs8psdr",large:"_18fs8ps29i _18fs8ps2j6 _18fs8ps2si _18fs8ps326 _18fs8ps1gl _18fs8ps1fo _18fs8ps1if _18fs8ps1hi _18fs8ps180 _18fs8ps1jc _18fs8ps1ku _18fs8ps1nl _18fs8ps209 _18fs8psdu"}},defaultVariants:{size:"medium"},compoundVariants:[]});const Ma=a.forwardRef(({children:s,size:e,variant:t="contained",disabled:o,className:i,...n},f)=>u.jsxs(Y,{as:"button",className:rs(Jh({size:e,variant:t}),i),disabled:o,ref:f,"data-macaw-ui-component":"DropdownButton",...n,children:[s,u.jsx(st,{size:"small",className:Ys({color:"default2"})})]}));Ma.displayName="DropdownButton";const Qh=s=>{const e=/^[\d.,]*$|(Backspace|Tab|Delete|ArrowLeft|ArrowRight|ArrowDown|ArrowUp)/;return!s.key.match(e)&&s.preventDefault()},sb=(s,e,t)=>eb(s)||e!==""&&e!==void 0?!0:t,eb=s=>["date","time","datetime-local"].includes(s??""),tb=(s,e,t)=>{const[o,i]=a.useState(!1),n=sb(e,s,o);return{handlers:{onFocus:()=>i(!0),onBlur:()=>i(!1),onChange:p=>{t&&t(p)}},value:s,active:o,typed:n}},Va=({children:s,id:e,typed:t,active:o,disabled:i,size:n,label:f,error:l,className:r,endAdornment:p})=>u.jsxs(Y,{as:"label",htmlFor:e,className:rs(tt({typed:t,active:o,disabled:i,size:n,error:l}),r),alignItems:"center",gap:1,"data-macaw-ui-component":"Input",children:[u.jsxs(Y,{display:"flex",flexDirection:"column",width:"100%",children:[u.jsx(Y,{as:"span",className:rs(ot({typed:t,size:n,disabled:i,error:l})),children:f}),s]}),p]});Va.displayName="InputWrapper";const Kt=a.forwardRef(({size:s,disabled:e=!1,className:t,value:o,label:i,id:n,type:f,error:l=!1,onChange:r,helperText:p,onBlur:c,onFocus:d,flex:h,flexBasis:_,flexGrow:x,flexShrink:C,width:v,endAdornment:k,...b},g)=>{const{handlers:y,value:m,active:I,typed:P}=tb(o,f,r);return u.jsxs(Y,{display:"flex",flexDirection:"column",flex:h,flexBasis:_,flexGrow:x,flexShrink:C,width:v,children:[u.jsx(Va,{id:n,typed:P,active:I,disabled:e,size:s,label:i,error:l,className:t,endAdornment:k,children:u.jsx(Y,{id:n,as:"input",type:f,className:rs(Gt({size:s,error:l})),disabled:e,value:m,ref:g,onBlur:R=>{y.onBlur(),c==null||c(R)},onFocus:R=>{y.onFocus(),d==null||d(R)},onChange:y.onChange,onKeyDown:R=>{f==="number"&&Qh(R)},role:"input",...b})}),p&&u.jsx(Y,{className:un({size:s}),children:u.jsx(Es,{size:be(s),color:l?"critical1":"default2",children:p})})]})});Kt.displayName="Input";const Aa=({children:s,...e})=>u.jsx(Y,{as:"li",...e,"data-macaw-ui-component":"List.Divider",children:s});Aa.displayName="List.Divider";const Na=a.forwardRef(({children:s,disabled:e,onClick:t,className:o,active:i,...n},f)=>u.jsx(Y,{as:"li",display:"flex",alignItems:"center",cursor:{default:"pointer",disabled:"not-allowed"},disabled:e,backgroundColor:{default:i?"default1Focused":"transparent",active:"default1Pressed",hover:"default1Hovered",focus:"default1Focused"},onClick:t,className:o,ref:f,"data-macaw-ui-component":"List.Item",...n,children:s}));Na.displayName="List.Item";const La=({children:s})=>u.jsx(Y8,{asChild:!0,"data-macaw-ui-component":"ListItem.Content",children:s});La.displayName="ListItem.Content";const gi=a.forwardRef(({children:s,as:e="ul",className:t,...o},i)=>u.jsx(Y,{as:e,ref:i,className:t,margin:0,"data-macaw-ui-component":"List",...o,children:s}));gi.displayName="List";const Wa=a.createContext(null),ob=()=>{const s=a.useContext(Wa);if(s===null)throw new Error("You are outside of context");return s},nb=Wa.Provider;var ib="_16tmpu02",fb="_16tmpu01",lb="_16tmpu00";const Mo="list-item-group-value",za=({children:s,defaultExpanded:e=!1,as:t="ul",...o})=>{const[i,n]=a.useState(e?Mo:"");return u.jsx(Lo,{asChild:!0,type:"single",collapsible:!0,value:i,onValueChange:n,children:u.jsx(nb,{value:{triggerOpen:()=>n(Mo)},children:u.jsx(gi,{as:t,...o,"data-macaw-ui-component":"ListItem",children:u.jsx(X8,{value:Mo,className:lb,children:s})})})})};za.displayName="ListItem";const Ha=({children:s,size:e,...t})=>{const{triggerOpen:o}=ob();return u.jsxs(Ls.Item,{"data-macaw-ui-component":"ItemGroup.Trigger",...t,children:[u.jsx(Y,{width:"100%",height:"100%",onClick:o,children:s}),u.jsx(U8,{asChild:!0,children:u.jsx(Qe,{icon:u.jsx(dn,{className:fb,color:"default1",size:e}),variant:"tertiary",size:e,className:ib})})]})};Ha.displayName="ListItem.Trigger";const ab=Object.assign(za,{Trigger:Ha,Content:La}),Ls=Object.assign(gi,{Item:Na,ItemGroup:ab,Divider:Aa}),qa=({children:s})=>u.jsx(ra,{asChild:!0,"data-macaw-ui-component":"Modal.Close",children:s});qa.displayName="Modal.Close";var M8="w2pmqx1";const rb=s=>s?{onOpenAutoFocus:e=>{e.preventDefault()}}:{},Fa=({children:s,disableAutofocus:e,container:t,dialogContentProps:o})=>u.jsx(fa,{container:t,children:u.jsx(la,{asChild:!0,className:M8,children:u.jsx(Yt,{children:u.jsx(aa,{asChild:!0,className:M8,...rb(e),...o,children:s})})})});Fa.displayName="Modal.Content";const Ka=({children:s,open:e,onChange:t})=>u.jsx(na,{"data-macaw-ui-component":"Modal",open:e,onOpenChange:t,children:s});Ka.displayName="Modal";const Ba=({children:s})=>u.jsx(ia,{asChild:!0,"data-macaw-ui-component":"Modal.Trigger",children:s});Ba.displayName="Modal.Trigger";const pb=Object.assign(Ka,{Content:Fa,Trigger:Ba,Close:qa});var Za=ks({defaultClassName:"_1g8t8xp8 _18fs8ps2ru _18fs8ps31i _18fs8ps28i _18fs8ps2i6 _18fs8ps1m9 _18fs8ps1mf _18fs8ps1lx _18fs8ps1m3 _18fs8ps170 _18fs8ps3si _18fs8ps1jc _18fs8ps1ku _18fs8ps1n9 _18fs8ps3du _18fs8ps3eo",variantClassNames:{size:{small:"_18fs8ps1j6 _18fs8ps1ko _18fs8ps1nf",medium:"_18fs8ps1j9 _18fs8ps1kr _18fs8ps1ni",large:"_18fs8ps1j9 _18fs8ps1kr _18fs8ps1ni"},error:{true:"_18fs8ps3d6"}},defaultVariants:{size:"medium"},compoundVariants:[]}),db=ks({defaultClassName:"_1g8t8xp0",variantClassNames:{typed:{true:"_1g8t8xp2"}},defaultVariants:{},compoundVariants:[]});const cb=({size:s,getToggleButtonProps:e,renderEndAdornment:t,disabled:o})=>t?u.jsx(u.Fragment,{children:t(e())}):u.jsx(st,{className:rs(_n,Ys({cursor:"pointer"})),size:s,...e({disabled:o})}),yi=a.forwardRef(({id:s,label:e,className:t,error:o,children:i,getLabelProps:n,typed:f,active:l,disabled:r,size:p,getToggleButtonProps:c,renderEndAdornment:d,hasItemsToSelect:h},_)=>u.jsxs(Y,{ref:_,as:"label",className:rs(tt({typed:f,active:l,disabled:r,size:p,error:o}),t),alignItems:"center",justifyContent:"space-between",disabled:r,flexWrap:"nowrap",gap:3,"data-macaw-ui-component":"Multiselect",...n({htmlFor:s}),cursor:r?"not-allowed":"text",children:[u.jsxs(Y,{display:"flex",flexDirection:"column",width:"100%",children:[u.jsx(Y,{as:"span",className:rs(db({typed:f}),ot({typed:f,size:p,disabled:r,error:o})),children:e}),u.jsx(Y,{display:"flex",flexDirection:"row",gap:1,alignItems:"center",flexWrap:"wrap",children:i})]}),h?u.jsx(cb,{size:p,getToggleButtonProps:c,renderEndAdornment:d,disabled:r}):u.jsx(Y,{width:5,height:5})]}));yi.displayName="MultiselectWrapper";const ub=(s,e,t)=>{const o=e==null?void 0:e.toLowerCase();return t.filter(i=>!s.find(n=>n.value===i.value)&&i.label.toLowerCase().includes(o??""))},Ua=({selectedValues:s,showEmptyState:e=!1,options:t,onChange:o,onInputValueChange:i,onFocus:n,onBlur:f})=>{const[l,r]=a.useState(""),[p,c]=a.useState(!1),d=Co(s)?s.reduce((E,j)=>{const M=t.find(L=>L.value===j);return M&&E.push(M),E},[]):s,h=ub(d,l,t),_=i||e?!0:d.length!==t.length,x=!!(d.length||p),{getSelectedItemProps:C,getDropdownProps:v,removeSelectedItem:k}=Ce({selectedItems:d,onStateChange(E){const{selectedItems:j,type:M}=E;switch(M){case Ce.stateChangeTypes.SelectedItemKeyDownBackspace:case Ce.stateChangeTypes.SelectedItemKeyDownDelete:case Ce.stateChangeTypes.DropdownKeyDownBackspace:case Ce.stateChangeTypes.FunctionRemoveSelectedItem:{const L=Co(s)?j==null?void 0:j.map(X=>X.value):j;o==null||o(L);break}}}}),{isOpen:b,getLabelProps:g,getMenuProps:y,getInputProps:m,highlightedIndex:I,getItemProps:P,getToggleButtonProps:R}=Xs({items:h,itemToString:E=>(E==null?void 0:E.label)??"",defaultHighlightedIndex:0,isItemDisabled:E=>(E==null?void 0:E.disabled)??!1,selectedItem:null,stateReducer(E,j){const{changes:M,type:L}=j;switch(L){case Xs.stateChangeTypes.InputKeyDownEnter:case Xs.stateChangeTypes.ItemClick:return r(""),{...M,...M.selectedItem&&{isOpen:!0,highlightedIndex:0}};default:return M}},onStateChange({inputValue:E,type:j,selectedItem:M}){switch(j){case Xs.stateChangeTypes.InputKeyDownEnter:case Xs.stateChangeTypes.ItemClick:case Xs.stateChangeTypes.InputBlur:if(M){const L=Co(s)?[...d.map(X=>X.value),M.value]:[...d,M];o==null||o(L)}else r("");break;case Xs.stateChangeTypes.InputChange:i==null||i(E??""),r(E??"");break}}});return{active:p,itemsToSelect:h,typed:x,isOpen:b,getLabelProps:g,getMenuProps:y,getInputProps:(E,j)=>m(v({onFocus:M=>{c(!0),n==null||n(M)},onBlur:M=>{c(!1),f==null||f(M)},preventKeyAction:b,...E}),j),highlightedIndex:I,getItemProps:P,getSelectedItemProps:C,removeSelectedItem:k,selectedItems:d,inputValue:l,showInput:_,getToggleButtonProps:E=>R({onClick:j=>{j.preventDefault()},...E}),hasItemsToSelect:h.length>0}},_b=({size:s,disabled:e=!1,className:t,label:o,id:i,error:n=!1,helperText:f,options:l,onChange:r,renderEndAdornment:p,value:c=[],onFocus:d,onBlur:h,children:_,locale:x={inputText:"Add item"},...C},v)=>{const{active:k,typed:b,isOpen:g,getLabelProps:y,getMenuProps:m,getInputProps:I,highlightedIndex:P,getItemProps:R,itemsToSelect:E,selectedItems:j,getSelectedItemProps:M,inputValue:L,removeSelectedItem:X,getToggleButtonProps:A,hasItemsToSelect:B,showInput:K}=Ua({selectedValues:c,showEmptyState:Te(_),options:l,onChange:r,onFocus:d,onBlur:h}),{refs:ts,floatingStyles:Z}=rt({shouldUpdate:g}),T=I({id:i,ref:v,value:L});return u.jsxs(Y,{display:"flex",flexDirection:"column",children:[u.jsxs(yi,{id:i,ref:ts.reference,typed:b,active:k,disabled:e,size:s,label:o,error:n,className:t,getLabelProps:y,getToggleButtonProps:A,renderEndAdornment:p,hasItemsToSelect:B,children:[j.map(($,D)=>u.jsxs(Y,{"data-test-id":`selected-option-${$.value}-${D}`,paddingX:1.5,paddingY:"px",backgroundColor:"default1",borderColor:"default1",borderWidth:1,borderStyle:"solid",borderRadius:3,display:"flex",gap:1,alignItems:"center",...M({selectedItem:$,index:D}),children:[u.jsx(Es,{size:1,children:$.label}),!e&&u.jsx(Es,{cursor:"pointer",size:1,onClick:V=>{V.stopPropagation(),V.preventDefault(),X($)},children:"✕"})]},`selected-option-${$.value}-${D}`)),u.jsx(Y,{as:"input",className:Za({size:s,error:n}),placeholder:x.inputText,disabled:e,width:0,__flex:1,minWidth:7,visibility:K?"visible":"hidden",...T,...C,onChange:T.onChange&&so(T.onChange)})]}),u.jsx(et,{asChild:!0,style:Z,children:u.jsx(Y,{position:"relative",display:g?"block":"none",className:ft({size:s}),children:u.jsxs(Ls,{as:"ul",className:it,...m({ref:ts.floating}),children:[g&&(E==null?void 0:E.map(($,D)=>u.jsx(Ls.Item,{"data-test-id":"select-option",disabled:$.disabled,className:Ne,active:P===D,...R({item:$,index:D}),children:u.jsx(Es,{color:$.disabled?"defaultDisabled":void 0,size:lt(s),children:$.label})},`to-select-${i}-${$.value}-${D}`))),g&&!B&&_]})})}),f&&u.jsx(nt,{size:s,error:n,children:f})]})},Ya=a.forwardRef(_b),hb=Object.assign(Ya,{NoOptions:Le}),bb=({size:s,disabled:e=!1,className:t,label:o,id:i,error:n=!1,helperText:f,options:l,onChange:r,renderEndAdornment:p,value:c=[],onInputValueChange:d,loading:h,onFocus:_,onBlur:x,locale:C,children:v,onScrollEnd:k,...b},g)=>{const{active:y,typed:m,isOpen:I,getLabelProps:P,getMenuProps:R,getInputProps:E,highlightedIndex:j,getItemProps:M,itemsToSelect:L,selectedItems:X,getSelectedItemProps:A,inputValue:B,removeSelectedItem:K,getToggleButtonProps:ts,hasItemsToSelect:Z,showInput:T}=Ua({selectedValues:c,showEmptyState:Te(v),onInputValueChange:d,options:l,onChange:r,onFocus:_,onBlur:x}),{refs:$,floatingStyles:D}=rt({shouldUpdate:I}),V=Hl(k),N=E({id:i,ref:g,value:B});return u.jsxs(Y,{display:"flex",flexDirection:"column",children:[u.jsxs(yi,{ref:$.reference,id:i,typed:m,active:y,disabled:e,size:s,label:o,error:n,className:t,getLabelProps:P,getToggleButtonProps:ts,renderEndAdornment:p,hasItemsToSelect:Z,children:[X.map((O,H)=>u.jsxs(Y,{"data-test-id":`selected-option-${O.value}-${H}`,paddingX:1.5,paddingY:"px",backgroundColor:"default1",borderColor:"default1",borderWidth:1,borderStyle:"solid",borderRadius:3,display:"flex",gap:1,alignItems:"center",...A({selectedItem:O,index:H}),children:[u.jsx(Es,{size:1,children:O.label}),!e&&u.jsx(Es,{cursor:"pointer",size:1,onClick:z=>{z.stopPropagation(),z.preventDefault(),K(O)},children:"✕"})]},`selected-option-${O.value}-${H}`)),u.jsx(Y,{as:"input",className:Za({size:s,error:n}),placeholder:(C==null?void 0:C.placeholderText)||"Add item",disabled:e,width:0,__flex:1,minWidth:7,visibility:T?"visible":"hidden",...N,...b,onChange:N.onChange&&so(N.onChange)})]}),u.jsx(et,{asChild:!0,style:D,children:u.jsx(Y,{position:"relative",display:Xt({isOpen:I,loading:h,hasItemsToSelect:Z,disabled:e,showEmptyState:Te(v)}),className:ft({size:s}),children:u.jsxs(Ls,{as:"ul",className:it,...R({ref:$.floating}),children:[I&&(L==null?void 0:L.map((O,H)=>u.jsx(Ls.Item,{"data-test-id":"select-option",className:Ne,active:j===H,...M({item:O,index:H,disabled:O.disabled}),children:u.jsx(Es,{color:O.disabled?"defaultDisabled":void 0,size:lt(s),children:O.label})},`to-select-${i}-${O.value}-${H}`))),I&&!h&&!Z&&v,h&&u.jsx($f,{size:s,children:(C==null?void 0:C.loadingText)||"Loading"}),u.jsx("div",{ref:O=>{V.current=O}})]})})}),f&&u.jsx(nt,{size:s,error:n,children:f})]})},mb=a.forwardRef(bb),vb=Object.assign(mb,{NoOptions:Le}),Ga=a.forwardRef(({...s},e)=>u.jsx(Es,{ref:e,display:"block",as:"p","data-macaw-ui-component":"Paragraph",...s}));Ga.displayName="Paragraph";const Xa="Popover",[Ja]=Ws(Xa,[He]),ut=He(),[Cb,me]=Ja(Xa),gb=s=>{const{__scopePopover:e,children:t,open:o,defaultOpen:i,onOpenChange:n,modal:f=!1}=s,l=ut(e),r=a.useRef(null),[p,c]=a.useState(!1),[d=!1,h]=Us({prop:o,defaultProp:i,onChange:n});return a.createElement(hi,l,a.createElement(Cb,{scope:e,contentId:Js(),triggerRef:r,open:d,onOpenChange:h,onOpenToggle:a.useCallback(()=>h(_=>!_),[h]),hasCustomAnchor:p,onCustomAnchorAdd:a.useCallback(()=>c(!0),[]),onCustomAnchorRemove:a.useCallback(()=>c(!1),[]),modal:f},t))},yb="PopoverAnchor",xb=a.forwardRef((s,e)=>{const{__scopePopover:t,...o}=s,i=me(yb,t),n=ut(t),{onCustomAnchorAdd:f,onCustomAnchorRemove:l}=i;return a.useEffect(()=>(f(),()=>l()),[f,l]),a.createElement(ro,S({},n,o,{ref:e}))}),kb="PopoverTrigger",wb=a.forwardRef((s,e)=>{const{__scopePopover:t,...o}=s,i=me(kb,t),n=ut(t),f=xs(e,i.triggerRef),l=a.createElement(Cs.button,S({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":er(i.open)},o,{ref:f,onClick:is(s.onClick,i.onOpenToggle)}));return i.hasCustomAnchor?l:a.createElement(ro,S({asChild:!0},n),l)}),Qa="PopoverPortal",[$b,Ib]=Ja(Qa,{forceMount:void 0}),Eb=s=>{const{__scopePopover:e,forceMount:t,children:o,container:i}=s,n=me(Qa,e);return a.createElement($b,{scope:e,forceMount:t},a.createElement(zs,{present:t||n.open},a.createElement(fo,{asChild:!0,container:i},o)))},Ge="PopoverContent",Rb=a.forwardRef((s,e)=>{const t=Ib(Ge,s.__scopePopover),{forceMount:o=t.forceMount,...i}=s,n=me(Ge,s.__scopePopover);return a.createElement(zs,{present:o||n.open},n.modal?a.createElement(Pb,S({},i,{ref:e})):a.createElement(Sb,S({},i,{ref:e})))}),Pb=a.forwardRef((s,e)=>{const t=me(Ge,s.__scopePopover),o=a.useRef(null),i=xs(e,o),n=a.useRef(!1);return a.useEffect(()=>{const f=o.current;if(f)return ui(f)},[]),a.createElement(ao,{as:ke,allowPinchZoom:!0},a.createElement(sr,S({},s,{ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:is(s.onCloseAutoFocus,f=>{var l;f.preventDefault(),n.current||(l=t.triggerRef.current)===null||l===void 0||l.focus()}),onPointerDownOutside:is(s.onPointerDownOutside,f=>{const l=f.detail.originalEvent,r=l.button===0&&l.ctrlKey===!0,p=l.button===2||r;n.current=p},{checkForDefaultPrevented:!1}),onFocusOutside:is(s.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})))}),Sb=a.forwardRef((s,e)=>{const t=me(Ge,s.__scopePopover),o=a.useRef(!1),i=a.useRef(!1);return a.createElement(sr,S({},s,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{var f;if((f=s.onCloseAutoFocus)===null||f===void 0||f.call(s,n),!n.defaultPrevented){var l;o.current||(l=t.triggerRef.current)===null||l===void 0||l.focus(),n.preventDefault()}o.current=!1,i.current=!1},onInteractOutside:n=>{var f,l;(f=s.onInteractOutside)===null||f===void 0||f.call(s,n),n.defaultPrevented||(o.current=!0,n.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const r=n.target;((l=t.triggerRef.current)===null||l===void 0?void 0:l.contains(r))&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&i.current&&n.preventDefault()}}))}),sr=a.forwardRef((s,e)=>{const{__scopePopover:t,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:n,disableOutsidePointerEvents:f,onEscapeKeyDown:l,onPointerDownOutside:r,onFocusOutside:p,onInteractOutside:c,...d}=s,h=me(Ge,t),_=ut(t);return ci(),a.createElement(di,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:n},a.createElement(io,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:c,onEscapeKeyDown:l,onPointerDownOutside:r,onFocusOutside:p,onDismiss:()=>h.onOpenChange(!1)},a.createElement(bi,S({"data-state":er(h.open),role:"dialog",id:h.contentId},_,d,{ref:e,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))}),Db="PopoverClose",jb=a.forwardRef((s,e)=>{const{__scopePopover:t,...o}=s,i=me(Db,t);return a.createElement(Cs.button,S({type:"button"},o,{ref:e,onClick:is(s.onClick,()=>i.onOpenChange(!1))}))}),Ob=a.forwardRef((s,e)=>{const{__scopePopover:t,...o}=s,i=ut(t);return a.createElement(va,S({},i,o,{ref:e}))});function er(s){return s?"open":"closed"}const Tb=gb,Mb=xb,Vb=wb,Ab=Eb,Nb=Rb,Lb=jb,Wb=Ob;var zb="_1t0scx21",Hb="_18fs8ps1mc _18fs8ps1mi _18fs8ps1m0 _18fs8ps1m6 _18fs8ps1gl _18fs8ps1fo _18fs8ps1if _18fs8ps1hi _18fs8ps25i _18fs8ps226 _18fs8ps3vi _18fs8ps3qi";const tr=({children:s,className:e,onInteractOutside:t,...o})=>u.jsx(Ab,{children:u.jsx(Nb,{asChild:!0,className:rs(Hb,e),"data-macaw-ui-component":"Popover.Content",onInteractOutside:t,...o,children:s})});tr.displayName="Popover.Content";const or=({children:s})=>u.jsx(Mb,{asChild:!0,"data-macaw-ui-component":"Popover.Anchor",children:s});or.displayName="Popover.Anchor";const nr=({children:s})=>u.jsx(Vb,{asChild:!0,"data-macaw-ui-component":"Popover.Trigger",children:s});nr.displayName="Popover.Trigger";const ir=({className:s,fill:e="default2",stroke:t="default1"})=>u.jsx(Wb,{className:rs(zb,s),asChild:!0,children:u.jsx("svg",{width:"20",height:"9",viewBox:"0 0 20 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-macaw-ui-component":"Popover.Arrow",children:u.jsx("path",{d:"M8.08579 7.08579L0.5 -0.5H18.5L10.9142 7.08579C10.1332 7.86683 8.86684 7.86684 8.08579 7.08579Z",strokeLinejoin:"round",className:Ys({fill:e,stroke:t})})})});ir.displayName="Popover.Arrow";const fr=({children:s,...e})=>u.jsx(Tb,{...e,"data-macaw-ui-component":"Popover",children:s});fr.displayName="Popover";const lr=({children:s})=>u.jsx(Lb,{asChild:!0,"data-macaw-ui-component":"Popover.Close",children:s});lr.displayName="Popover.Close";const qb=Object.assign(fr,{Trigger:nr,Content:tr,Anchor:or,Arrow:ir,Close:lr}),ar="Radio",[Fb,rr]=Ws(ar),[Kb,Bb]=Fb(ar),Zb=a.forwardRef((s,e)=>{const{__scopeRadio:t,name:o,checked:i=!1,required:n,disabled:f,value:l="on",onCheck:r,...p}=s,[c,d]=a.useState(null),h=xs(e,C=>d(C)),_=a.useRef(!1),x=c?!!c.closest("form"):!0;return a.createElement(Kb,{scope:t,checked:i,disabled:f},a.createElement(Cs.button,S({type:"button",role:"radio","aria-checked":i,"data-state":pr(i),"data-disabled":f?"":void 0,disabled:f,value:l},p,{ref:h,onClick:is(s.onClick,C=>{i||r==null||r(),x&&(_.current=C.isPropagationStopped(),_.current||C.stopPropagation())})})),x&&a.createElement(Gb,{control:c,bubbles:!_.current,name:o,value:l,checked:i,required:n,disabled:f,style:{transform:"translateX(-100%)"}}))}),Ub="RadioIndicator",Yb=a.forwardRef((s,e)=>{const{__scopeRadio:t,forceMount:o,...i}=s,n=Bb(Ub,t);return a.createElement(zs,{present:o||n.checked},a.createElement(Cs.span,S({"data-state":pr(n.checked),"data-disabled":n.disabled?"":void 0},i,{ref:e})))}),Gb=s=>{const{control:e,checked:t,bubbles:o=!0,...i}=s,n=a.useRef(null),f=vf(t),l=cn(e);return a.useEffect(()=>{const r=n.current,p=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==t&&d){const h=new Event("click",{bubbles:o});d.call(r,t),r.dispatchEvent(h)}},[f,t,o]),a.createElement("input",S({type:"radio","aria-hidden":!0,defaultChecked:t},i,{tabIndex:-1,ref:n,style:{...s.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function pr(s){return s?"checked":"unchecked"}const Xb=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],dr="RadioGroup",[Jb]=Ws(dr,[po,rr]),cr=po(),ur=rr(),[Qb,s2]=Jb(dr),e2=a.forwardRef((s,e)=>{const{__scopeRadioGroup:t,name:o,defaultValue:i,value:n,required:f=!1,disabled:l=!1,orientation:r,dir:p,loop:c=!0,onValueChange:d,...h}=s,_=cr(t),x=Bt(p),[C,v]=Us({prop:n,defaultProp:i,onChange:d});return a.createElement(Qb,{scope:t,name:o,required:f,disabled:l,value:C,onValueChange:v},a.createElement(ya,S({asChild:!0},_,{orientation:r,dir:x,loop:c}),a.createElement(Cs.div,S({role:"radiogroup","aria-required":f,"aria-orientation":r,"data-disabled":l?"":void 0,dir:x},h,{ref:e}))))}),t2="RadioGroupItem",o2=a.forwardRef((s,e)=>{const{__scopeRadioGroup:t,disabled:o,...i}=s,n=s2(t2,t),f=n.disabled||o,l=cr(t),r=ur(t),p=a.useRef(null),c=xs(e,p),d=n.value===i.value,h=a.useRef(!1);return a.useEffect(()=>{const _=C=>{Xb.includes(C.key)&&(h.current=!0)},x=()=>h.current=!1;return document.addEventListener("keydown",_),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",_),document.removeEventListener("keyup",x)}},[]),a.createElement(xa,S({asChild:!0},l,{focusable:!f,active:d}),a.createElement(Zb,S({disabled:f,required:n.required,checked:d},r,i,{name:n.name,ref:c,onCheck:()=>n.onValueChange(i.value),onKeyDown:is(_=>{_.key==="Enter"&&_.preventDefault()}),onFocus:is(i.onFocus,()=>{var _;h.current&&((_=p.current)===null||_===void 0||_.click())})})))}),n2=a.forwardRef((s,e)=>{const{__scopeRadioGroup:t,...o}=s,i=ur(t);return a.createElement(Yb,S({},i,o,{ref:e}))}),_r=e2,hr=o2,i2=n2;var f2="_18fs8ps2ru _18fs8ps31i _18fs8ps28i _18fs8ps2i6 _18fs8psul _18fs8psx3 _18fs8pszl _18fs8ps123 _18fs8ps1m9 _18fs8ps1mf _18fs8ps1lx _18fs8ps1m3",l2=ks({defaultClassName:"_18fs8ps2ru _18fs8ps31i _18fs8ps28i _18fs8ps2i6 _18fs8psul _18fs8psx3 _18fs8pszl _18fs8ps123",variantClassNames:{size:{small:"_18fs8ps1j6 _18fs8ps1nf _18fs8ps1ko",medium:"_18fs8ps1j9 _18fs8ps1ni _18fs8ps1kr",large:"_18fs8ps1jc _18fs8ps1nl _18fs8ps1ku"},disabled:{true:"_18fs8ps3ei"},error:{true:"_18fs8ps3di",false:"_18fs8ps3e6"}},defaultVariants:{size:"medium"},compoundVariants:[]});const br=a.forwardRef(({children:s,className:e,value:t,label:o,onValueChange:i,size:n,disabled:f=!1,error:l=!1,...r},p)=>u.jsx(_r,{asChild:!0,value:t,onValueChange:i,children:u.jsxs(Y,{...r,className:rs(f2,e),ref:p,as:"fieldset","data-macaw-ui-component":"RadioGroup",children:[o&&u.jsx("legend",{className:rs(l2({disabled:f,error:l,size:n}),e),children:o}),s]})}));br.displayName="RadioGroup";var a2=ks({defaultClassName:"_18fs8ps1qf _18fs8ps1su _18fs8ps1v9 _18fs8ps1xo _18fs8ps2u _18fs8psf _18fs8ps1zc",variantClassNames:{disabled:{true:"_18fs8ps3ei",false:"_18fs8ps3c6"}},defaultVariants:{disabled:!1},compoundVariants:[]}),r2=ks({defaultClassName:"_1ru9wzg7 _18fs8ps2ru _18fs8ps31i _18fs8ps28i _18fs8ps2i6 _18fs8ps1mc _18fs8ps1mi _18fs8ps1m0 _18fs8ps1m6 _18fs8ps1h9 _18fs8ps1gc _18fs8ps1j3 _18fs8ps1i6 _18fs8ps2r _18fs8ps3v6 _18fs8ps226 _18fs8ps3ti _18fs8ps25i _18fs8ps14u _18fs8ps17f _18fs8ps3p6 _18fs8ps2c",variantClassNames:{error:{true:"_1ru9wzg8"},disabled:{true:"_1ru9wzg9"}},defaultVariants:{error:!1,disabled:!1},compoundVariants:[]});const xi=a.forwardRef(({disabled:s,asChild:e},t)=>u.jsx(i2,{className:a2({disabled:s}),asChild:e,ref:t,children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"6",height:"6",fill:"currentColor",children:u.jsx("circle",{cx:"3",cy:"3",r:"3",fill:"currentColor"})})}));xi.displayName="RadioGroupIndicator";const mr=a.forwardRef(({value:s,id:e,disabled:t,children:o,className:i,error:n,...f},l)=>u.jsxs(Y,{display:"flex",alignItems:"center",gap:1.5,position:"relative",...f,className:i,ref:l,"data-macaw-ui-component":"RadioGroup.Item",children:[u.jsx(hr,{className:r2({error:n,disabled:t}),value:s,id:e,disabled:t,children:u.jsx(xi,{disabled:t,asChild:!0})}),u.jsx(Y,{as:"label",htmlFor:e,cursor:t?"not-allowed":"pointer",children:o})]}));mr.displayName="RadioGroup.Item";const p2=Object.assign(br,{Item:mr,Indicator:xi}),vr=a.forwardRef(({value:s=["",""],onChange:e,children:t,type:o="number",...i},n)=>{const[f,l]=s;return u.jsxs(u.Fragment,{children:[u.jsx(Kt,{value:f,onChange:r=>e==null?void 0:e([r.target.value,l]),type:o,ref:n,"data-macaw-ui-component":"RangeInput",...i}),t,u.jsx(Kt,{value:l,onChange:r=>e==null?void 0:e([f,r.target.value]),type:o,ref:n,"data-macaw-ui-component":"RangeInput",...i})]})});vr.displayName="RangeInput";var d2=ks({defaultClassName:"_18fs8ps2ru _18fs8ps31i _18fs8ps28i _18fs8ps2i6 _18fs8ps1m9 _18fs8ps1mf _18fs8ps1lx _18fs8ps1m3 _18fs8ps170 _18fs8ps3si _18fs8ps1n9 _18fs8ps3du _18fs8ps3ec _18fs8ps3ed",variantClassNames:{},defaultVariants:{},compoundVariants:[]}),c2=ks({defaultClassName:"_18fs8ps1gl _18fs8ps1fo _18fs8ps1if _18fs8ps1hi _18fs8ps2r _18fs8ps3 _18fs8ps10 _18fs8ps3du _18fs8ps170 _18fs8ps3x6 _18fs8ps3p6 _18fs8ps3pv _18fs8ps3pl",variantClassNames:{size:{small:"_18fs8ps296 _18fs8ps2iu _18fs8ps30i _18fs8ps3a6",medium:"_18fs8ps296 _18fs8ps2iu _18fs8ps2si _18fs8ps326",large:"_18fs8ps29i _18fs8ps2j6 _18fs8ps2su _18fs8ps32i"}},defaultVariants:{},compoundVariants:[]}),u2=ks({defaultClassName:"_18fs8ps3e6 _18fs8ps129",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const Cr=a.forwardRef(({id:s,className:e,size:t,...o},i)=>u.jsxs(Y,{id:s,className:rs(c2({size:t}),e),"data-macaw-ui-component":"SearchInput",children:[u.jsx(_f,{size:"medium",className:u2()}),u.jsx(Y,{as:"input",className:d2(),ref:i,type:"text",...o})]}));Cr.displayName="SearchInput";const gr=({id:s,label:e,className:t,error:o,children:i,getToggleButtonProps:n,getLabelProps:f,typed:l,active:r,disabled:p,size:c})=>u.jsxs(Y,{as:"label",className:rs(tt({typed:l,active:r,disabled:p,size:c,error:o}),t),alignItems:"center",justifyContent:"space-between",disabled:p,flexWrap:"nowrap",gap:3,...n(),"data-macaw-ui-component":"Select",cursor:p?"not-allowed":"pointer",children:[u.jsxs(Y,{display:"flex",flexDirection:"column",__width:"calc(100% - 30px)",children:[u.jsx(Y,{as:"span",className:rs(ot({typed:l,size:c,disabled:p,error:o})),...f({htmlFor:s}),children:e}),i]}),u.jsx(st,{className:rs(_n,Ys({cursor:"pointer"})),size:c})]});gr.displayName="SelectWrapper";const _2=({value:s,isValuePassedAsString:e,options:t,onChange:o,onFocus:i,onBlur:n})=>{const[f,l]=a.useState(!1),r=!!(s||f),{highlightedIndex:p,onHighlightedIndexChange:c}=If(t,s),{isOpen:d,getToggleButtonProps:h,getLabelProps:_,getMenuProps:x,getItemProps:C,selectedItem:v}=Nn({items:t,selectedItem:s??null,isItemDisabled:k=>(k==null?void 0:k.disabled)??!1,highlightedIndex:p,onHighlightedIndexChange(k){c(k)},itemToString:k=>(k==null?void 0:k.value)??"",onSelectedItemChange:({selectedItem:k})=>{if(k){const b=e?k.value:k;o==null||o(b)}}});return{active:f,typed:r,isOpen:d,getToggleButtonProps:(k,b)=>h({onFocus:g=>{l(!0),i==null||i(g)},onBlur:g=>{l(!1),n==null||n(g)},...k},b),getLabelProps:_,getMenuProps:x,highlightedIndex:p,getItemProps:C,selectedItem:v,hasItemsToSelect:t.length>0}},h2=s=>{switch(s){case"small":return 4;case"medium":return 5;case"large":return 6}},b2=({size:s="medium",disabled:e=!1,className:t,value:o,label:i,id:n,error:f=!1,helperText:l,options:r,onChange:p,onFocus:c,onBlur:d,startAdornment:h,endAdornment:_,children:x,...C},v)=>{const k=Ot(o),{active:b,typed:g,isOpen:y,getItemProps:m,getLabelProps:I,getToggleButtonProps:P,selectedItem:R,getMenuProps:E,highlightedIndex:j,hasItemsToSelect:M}=_2({value:k?r.find(B=>B.value===o):o,isValuePassedAsString:k,options:r,onChange:p,onFocus:c,onBlur:d}),{refs:L,floatingStyles:X}=rt({shouldUpdate:y}),A=a.useMemo(()=>f?"critical1":e?"defaultDisabled":"default1",[e,f]);return u.jsxs(Y,{display:"flex",flexDirection:"column",children:[u.jsx(gr,{id:n,typed:g,active:b,disabled:e,size:s,label:i,error:f,className:t,getLabelProps:I,getToggleButtonProps:()=>P({ref:L.reference}),children:u.jsxs(Y,{height:h2(s),...C,ref:v,display:"flex",children:[h&&g&&h(o),u.jsx(Es,{size:be(s),color:A,title:R==null?void 0:R.label,width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",children:R==null?void 0:R.label}),_&&g&&_(o)]})}),u.jsx(et,{asChild:!0,style:X,children:u.jsx(Y,{position:"relative",display:Xt({isOpen:y,disabled:e,hasItemsToSelect:M,showEmptyState:Te(x)}),className:ft({size:s}),children:u.jsxs(Ls,{as:"ul",className:it,...E({ref:L.floating}),children:[y&&(r==null?void 0:r.map((B,K)=>u.jsxs(Ls.Item,{"data-test-id":"select-option",className:Ne,disabled:B.disabled,...m({item:B,index:K}),active:j===K,children:[B==null?void 0:B.startAdornment,u.jsx(Es,{color:B.disabled?"defaultDisabled":void 0,size:lt(s),width:"100%",children:B.label}),B==null?void 0:B.endAdornment]},`${n}-${B.value}-${K}`))),y&&!M&&x]})})}),l&&u.jsx(nt,{size:s,error:f,children:l})]})},m2=a.forwardRef(b2),v2=Object.assign(m2,{NoOptions:Le});var C2="_1ucx6ny1";const g2=({className:s,...e})=>u.jsx(Y,{className:rs(C2,s),backgroundColor:"default3",width:"100%",height:3,borderRadius:2,"data-macaw-ui-component":"Skeleton",...e});var y2="u64rbw1";const ki=a.forwardRef(({className:s},e)=>u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",className:rs(y2,s),"data-macaw-ui-component":"Spinner",ref:e,children:u.jsx("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.333",children:u.jsx("path",{d:"M8 1.332v2.667M8 12v2.667M3.285 3.285l1.887 1.887M10.826 10.826l1.887 1.887M1.332 8h2.667M12 8h2.667M3.285 12.713l1.887-1.887M10.826 5.172l1.887-1.887"})})}));ki.displayName="Spinner";var x2=ks({defaultClassName:"edj57v3 _18fs8ps2s6 _18fs8ps31u _18fs8ps28u _18fs8ps2ii _18fs8ps1gi _18fs8ps1fl _18fs8ps1ic _18fs8ps1hf _18fs8ps19l _18fs8ps3ti",variantClassNames:{},defaultVariants:{},compoundVariants:[]}),k2=ks({defaultClassName:"_18fs8ps306 _18fs8ps39u _18fs8ps2gu _18fs8ps2qi _18fs8ps1gl _18fs8ps1fo _18fs8ps1if _18fs8ps1hi _18fs8ps3 _18fs8psfr _18fs8ps3qu _18fs8ps226 _18fs8ps17u",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const yr=a.forwardRef(({children:s,className:e,defaultValue:t,onValueChange:o,value:i,...n},f)=>u.jsx(_r,{asChild:!0,defaultValue:t,value:i,onValueChange:o,children:u.jsx(Y,{className:rs(k2(),e),ref:f,...n,"data-macaw-ui-component":"Switch",children:s})}));yr.displayName="Switch";const xr=({value:s,id:e,disabled:t=!1,children:o,...i})=>u.jsx(hr,{asChild:!0,value:s,id:e,disabled:t,className:x2(),"data-macaw-ui-component":"SwitchItem",children:u.jsx(Y,{...i,children:o})});xr.displayName="Switch.Item";const w2=Object.assign(yr,{Item:xr}),$2=(s,e,t,o)=>{const i=V8(s,t),n=V8(s,o);a.useEffect(()=>{if(s){s.style.height="0px";const f=Math.max(i,s.scrollHeight),l=Math.min(f,n);s.style.height=`${l}px`}},[i,n,s,e])};function V8(s,e){return s?parseFloat(getComputedStyle(s).lineHeight)*e:0}const I2=(s,e)=>{const[t,o]=a.useState(!1);return{handlers:{onFocus:()=>o(!0),onBlur:()=>o(!1),onChange:r=>{e&&e(r)}},value:s,active:t,typed:!!(s||t)}},kr=({children:s,id:e,typed:t,active:o,disabled:i,size:n,label:f,error:l,className:r,endAdornment:p})=>u.jsxs(Y,{as:"label",htmlFor:e,className:rs(tt({typed:t,active:o,disabled:i,size:n,error:l}),r),alignItems:"center",gap:1,"data-macaw-ui-component":"Textarea",children:[u.jsxs(Y,{display:"flex",flexDirection:"column",width:"100%",children:[u.jsx(Y,{as:"span",className:rs(ot({typed:t,size:n,disabled:i,error:l})),children:f}),s]}),p]});kr.displayName="TextareaWrapper";const wr=a.forwardRef(({size:s,disabled:e=!1,className:t,value:o,label:i,id:n,error:f=!1,onChange:l,helperText:r,onBlur:p,onFocus:c,flex:d,flexBasis:h,flexGrow:_,flexShrink:x,width:C,endAdornment:v,rows:k=10,maxRows:b=20,...g},y)=>{const{handlers:m,value:I,active:P,typed:R}=I2(o,l),E=a.useRef(null);return $2(E.current,o,k,b),a.useImperativeHandle(y,()=>E.current),u.jsxs(Y,{display:"flex",flexDirection:"column",flex:d,flexBasis:h,flexGrow:_,flexShrink:x,width:C,children:[u.jsx(kr,{id:n,typed:R,active:P,disabled:e,size:s,label:i,error:f,className:t,endAdornment:v,children:u.jsx(Y,{id:n,as:"textarea",className:rs(Gt({size:s,error:f})),style:{resize:"none"},disabled:e,value:I,ref:E,onBlur:j=>{m.onBlur(),p==null||p(j)},onFocus:j=>{m.onFocus(),c==null||c(j)},onChange:m.onChange,rows:k,...g})}),r&&u.jsx(Y,{className:un({size:s}),children:u.jsx(Es,{size:be(s),color:f?"critical1":"default2",children:r})})]})});wr.displayName="Textarea";const E2=a.forwardRef((s,e)=>{const{pressed:t,defaultPressed:o=!1,onPressedChange:i,...n}=s,[f=!1,l]=Us({prop:t,onChange:i,defaultProp:o});return a.createElement(Cs.button,S({type:"button","aria-pressed":f,"data-state":f?"on":"off","data-disabled":s.disabled?"":void 0},n,{ref:e,onClick:is(s.onClick,()=>{s.disabled||l(!f)})}))}),R2=E2;var P2=ks({defaultClassName:"agkfzb1 _18fs8ps2zu _18fs8ps39i _18fs8ps2gi _18fs8ps2q6 _18fs8ps1mc _18fs8ps1mi _18fs8ps1m0 _18fs8ps1m6 _18fs8ps1h3 _18fs8ps1g6 _18fs8ps1ix _18fs8ps1i0 _18fs8ps3 _18fs8ps10 _18fs8ps2r _18fs8ps1n9 _18fs8ps3ti",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const $r=a.forwardRef(({disabled:s=!1,pressed:e,onPressedChange:t,children:o,...i},n)=>u.jsxs(Y,{as:"label",display:"flex",alignItems:"center",gap:1.5,cursor:s?"not-allowed":"pointer","data-macaw-ui-component":"Toggle",children:[u.jsx(R2,{ref:n,className:P2(),pressed:e,onPressedChange:t,disabled:s,...i}),o]}));$r.displayName="Toggle";const S2=a.forwardRef((s,e)=>a.createElement(Cs.span,S({},s,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...s.style}}))),D2=S2,[uo]=Ws("Tooltip",[He]),_o=He(),j2="TooltipProvider",O2=700,en="tooltip.open",[T2,wi]=uo(j2),M2=s=>{const{__scopeTooltip:e,delayDuration:t=O2,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:n}=s,[f,l]=a.useState(!0),r=a.useRef(!1),p=a.useRef(0);return a.useEffect(()=>{const c=p.current;return()=>window.clearTimeout(c)},[]),a.createElement(T2,{scope:e,isOpenDelayed:f,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(p.current),l(!1)},[]),onClose:a.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>l(!0),o)},[o]),isPointerInTransitRef:r,onPointerInTransitChange:a.useCallback(c=>{r.current=c},[]),disableHoverableContent:i},n)},$i="Tooltip",[V2,_t]=uo($i),A2=s=>{const{__scopeTooltip:e,children:t,open:o,defaultOpen:i=!1,onOpenChange:n,disableHoverableContent:f,delayDuration:l}=s,r=wi($i,s.__scopeTooltip),p=_o(e),[c,d]=a.useState(null),h=Js(),_=a.useRef(0),x=f??r.disableHoverableContent,C=l??r.delayDuration,v=a.useRef(!1),[k=!1,b]=Us({prop:o,defaultProp:i,onChange:P=>{P?(r.onOpen(),document.dispatchEvent(new CustomEvent(en))):r.onClose(),n==null||n(P)}}),g=a.useMemo(()=>k?v.current?"delayed-open":"instant-open":"closed",[k]),y=a.useCallback(()=>{window.clearTimeout(_.current),v.current=!1,b(!0)},[b]),m=a.useCallback(()=>{window.clearTimeout(_.current),b(!1)},[b]),I=a.useCallback(()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>{v.current=!0,b(!0)},C)},[C,b]);return a.useEffect(()=>()=>window.clearTimeout(_.current),[]),a.createElement(hi,p,a.createElement(V2,{scope:e,contentId:h,open:k,stateAttribute:g,trigger:c,onTriggerChange:d,onTriggerEnter:a.useCallback(()=>{r.isOpenDelayed?I():y()},[r.isOpenDelayed,I,y]),onTriggerLeave:a.useCallback(()=>{x?m():window.clearTimeout(_.current)},[m,x]),onOpen:y,onClose:m,disableHoverableContent:x},t))},A8="TooltipTrigger",N2=a.forwardRef((s,e)=>{const{__scopeTooltip:t,...o}=s,i=_t(A8,t),n=wi(A8,t),f=_o(t),l=a.useRef(null),r=xs(e,l,i.onTriggerChange),p=a.useRef(!1),c=a.useRef(!1),d=a.useCallback(()=>p.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),a.createElement(ro,S({asChild:!0},f),a.createElement(Cs.button,S({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},o,{ref:r,onPointerMove:is(s.onPointerMove,h=>{h.pointerType!=="touch"&&!c.current&&!n.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:is(s.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:is(s.onPointerDown,()=>{p.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:is(s.onFocus,()=>{p.current||i.onOpen()}),onBlur:is(s.onBlur,i.onClose),onClick:is(s.onClick,i.onClose)})))}),Ir="TooltipPortal",[L2,W2]=uo(Ir,{forceMount:void 0}),z2=s=>{const{__scopeTooltip:e,forceMount:t,children:o,container:i}=s,n=_t(Ir,e);return a.createElement(L2,{scope:e,forceMount:t},a.createElement(zs,{present:t||n.open},a.createElement(fo,{asChild:!0,container:i},o)))},Xe="TooltipContent",H2=a.forwardRef((s,e)=>{const t=W2(Xe,s.__scopeTooltip),{forceMount:o=t.forceMount,side:i="top",...n}=s,f=_t(Xe,s.__scopeTooltip);return a.createElement(zs,{present:o||f.open},f.disableHoverableContent?a.createElement(Er,S({side:i},n,{ref:e})):a.createElement(q2,S({side:i},n,{ref:e})))}),q2=a.forwardRef((s,e)=>{const t=_t(Xe,s.__scopeTooltip),o=wi(Xe,s.__scopeTooltip),i=a.useRef(null),n=xs(e,i),[f,l]=a.useState(null),{trigger:r,onClose:p}=t,c=i.current,{onPointerInTransitChange:d}=o,h=a.useCallback(()=>{l(null),d(!1)},[d]),_=a.useCallback((x,C)=>{const v=x.currentTarget,k={x:x.clientX,y:x.clientY},b=U2(k,v.getBoundingClientRect()),g=Y2(k,b),y=G2(C.getBoundingClientRect()),m=J2([...g,...y]);l(m),d(!0)},[d]);return a.useEffect(()=>()=>h(),[h]),a.useEffect(()=>{if(r&&c){const x=v=>_(v,c),C=v=>_(v,r);return r.addEventListener("pointerleave",x),c.addEventListener("pointerleave",C),()=>{r.removeEventListener("pointerleave",x),c.removeEventListener("pointerleave",C)}}},[r,c,_,h]),a.useEffect(()=>{if(f){const x=C=>{const v=C.target,k={x:C.clientX,y:C.clientY},b=(r==null?void 0:r.contains(v))||(c==null?void 0:c.contains(v)),g=!X2(k,f);b?h():g&&(h(),p())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[r,c,f,p,h]),a.createElement(Er,S({},s,{ref:n}))}),[F2,K2]=uo($i,{isInside:!1}),Er=a.forwardRef((s,e)=>{const{__scopeTooltip:t,children:o,"aria-label":i,onEscapeKeyDown:n,onPointerDownOutside:f,...l}=s,r=_t(Xe,t),p=_o(t),{onClose:c}=r;return a.useEffect(()=>(document.addEventListener(en,c),()=>document.removeEventListener(en,c)),[c]),a.useEffect(()=>{if(r.trigger){const d=h=>{const _=h.target;_!=null&&_.contains(r.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[r.trigger,c]),a.createElement(io,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:n,onPointerDownOutside:f,onFocusOutside:d=>d.preventDefault(),onDismiss:c},a.createElement(bi,S({"data-state":r.stateAttribute},p,l,{ref:e,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),a.createElement(L8,null,o),a.createElement(F2,{scope:t,isInside:!0},a.createElement(D2,{id:r.contentId,role:"tooltip"},i||o))))}),B2="TooltipArrow",Z2=a.forwardRef((s,e)=>{const{__scopeTooltip:t,...o}=s,i=_o(t);return K2(B2,t).isInside?null:a.createElement(va,S({},i,o,{ref:e}))});function U2(s,e){const t=Math.abs(e.top-s.y),o=Math.abs(e.bottom-s.y),i=Math.abs(e.right-s.x),n=Math.abs(e.left-s.x);switch(Math.min(t,o,i,n)){case n:return"left";case i:return"right";case t:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Y2(s,e,t=5){const o=[];switch(e){case"top":o.push({x:s.x-t,y:s.y+t},{x:s.x+t,y:s.y+t});break;case"bottom":o.push({x:s.x-t,y:s.y-t},{x:s.x+t,y:s.y-t});break;case"left":o.push({x:s.x+t,y:s.y-t},{x:s.x+t,y:s.y+t});break;case"right":o.push({x:s.x-t,y:s.y-t},{x:s.x-t,y:s.y+t});break}return o}function G2(s){const{top:e,right:t,bottom:o,left:i}=s;return[{x:i,y:e},{x:t,y:e},{x:t,y:o},{x:i,y:o}]}function X2(s,e){const{x:t,y:o}=s;let i=!1;for(let n=0,f=e.length-1;n<e.length;f=n++){const l=e[n].x,r=e[n].y,p=e[f].x,c=e[f].y;r>o!=c>o&&t<(p-l)*(o-r)/(c-r)+l&&(i=!i)}return i}function J2(s){const e=s.slice();return e.sort((t,o)=>t.x<o.x?-1:t.x>o.x?1:t.y<o.y?-1:t.y>o.y?1:0),Q2(e)}function Q2(s){if(s.length<=1)return s.slice();const e=[];for(let o=0;o<s.length;o++){const i=s[o];for(;e.length>=2;){const n=e[e.length-1],f=e[e.length-2];if((n.x-f.x)*(i.y-f.y)>=(n.y-f.y)*(i.x-f.x))e.pop();else break}e.push(i)}e.pop();const t=[];for(let o=s.length-1;o>=0;o--){const i=s[o];for(;t.length>=2;){const n=t[t.length-1],f=t[t.length-2];if((n.x-f.x)*(i.y-f.y)>=(n.y-f.y)*(i.x-f.x))t.pop();else break}t.push(i)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}const sm=M2,em=A2,tm=N2,om=z2,nm=H2,im=Z2,Rr=({children:s,delayDuration:e=250,...t})=>u.jsx(sm,{children:u.jsx(em,{delayDuration:e,...t,"data-macaw-ui-component":"Tooltip",children:s})});Rr.displayName="Tooltip";const Pr=a.forwardRef(({children:s},e)=>u.jsx(tm,{asChild:!0,ref:e,"data-macaw-ui-component":"Tooltip.Trigger",children:s}));Pr.displayName="Tooltip.Trigger";var fm="_14kl90y0";const Sr=({className:s,backgroundColor:e=Be.colors.background.default1,borderColor:t=Be.colors.border.default1})=>u.jsx(im,{asChild:!0,className:rs(fm,s),children:u.jsx("svg",{width:"20",height:"9",viewBox:"0 0 20 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-macaw-ui-component":"Tooltip.Arrow",children:u.jsx("path",{fill:e,stroke:t,d:"M8.086 7.086.5-.5h18l-7.586 7.586a2 2 0 0 1-2.828 0Z"})})});Sr.displayName="Tooltip.Arrow";const Dr=({children:s,className:e,sideOffset:t=2,avoidCollisions:o=!0,...i})=>u.jsx(om,{children:u.jsx(nm,{asChild:!0,className:e,sideOffset:t,avoidCollisions:o,"data-macaw-ui-component":"Tooltip.Content",...i,children:u.jsx(Y,{borderStyle:s?"solid":"none",borderWidth:1,borderRadius:3,borderColor:"default1",padding:s?4:0,fontSize:1,lineHeight:1,color:"default1",backgroundColor:"default1",boxShadow:"defaultOverlay",children:s})})});Dr.displayName="Tooltip.Content";const jr=({children:s})=>u.jsx(Es,{display:"block",size:1,color:"default2",marginBottom:.5,"data-macaw-ui-component":"Tooltip.ContentHeading",children:s});jr.displayName="Tooltip.ContentHeading";const lm=Object.assign(Rr,{Trigger:Pr,Arrow:Sr,Content:Dr,ContentHeading:jr});exports.Accordion=id;exports.ArrowDownIcon=st;exports.ArrowLeftIcon=dp;exports.ArrowRightIcon=cp;exports.ArrowUpIcon=up;exports.Avatar=ld;exports.Backdrop=Yt;exports.Box=Y;exports.Button=Qe;exports.CatalogIcon=_p;exports.Checkbox=kf;exports.CheckboxIcon=hp;exports.ChervonDoubleIcon=bp;exports.ChervonDownIcon=dn;exports.ChervonUpIcon=mp;exports.ChevronLeftIcon=vp;exports.ChevronRightIcon=Cp;exports.Chip=wf;exports.CloseIcon=uf;exports.Combobox=mu;exports.ConfigurationIcon=gp;exports.CopyIcon=yp;exports.CustomersIcon=xp;exports.DarkModeIcon=kp;exports.DashboardIcon=wp;exports.Divider=ql;exports.Drawer=P_;exports.Dropdown=Xh;exports.DropdownButton=Ma;exports.DynamicCombobox=gu;exports.DynamicMultiselect=vb;exports.EditIcon=$p;exports.EnvironmentIcon=Ip;exports.ExportIcon=Ep;exports.ExternalLinkIcon=Rp;exports.FileExportIcon=Pp;exports.FloppyDiscIcon=Sp;exports.FullscreenOffIcon=Dp;exports.FullscreenOnIcon=jp;exports.GenericAppIcon=Op;exports.GraphQLIcon=Tp;exports.GripIcon=Mp;exports.HelpIcon=Vp;exports.HomeIcon=Ap;exports.InfoIcon=Np;exports.Input=Kt;exports.LightModeIcon=Lp;exports.List=Ls;exports.MailIcon=Wp;exports.MarketplaceIcon=zp;exports.MenuIcon=Hp;exports.Modal=pb;exports.MoreOptionsIcon=qp;exports.Multiselect=hb;exports.MultiselectRoot=Ya;exports.OrdersIcon=Fp;exports.Paragraph=Ga;exports.PlusIcon=Kp;exports.Popover=qb;exports.ProductsIcons=Bp;exports.RadioGroup=p2;exports.RangeInput=vr;exports.RemoveIcon=Zp;exports.SearchIcon=_f;exports.SearchInput=Cr;exports.Select=v2;exports.SellsIcon=Up;exports.Skeleton=g2;exports.Spinner=ki;exports.StorefrontIcon=Yp;exports.Switch=w2;exports.TableEditIcon=Gp;exports.Text=Es;exports.Textarea=wr;exports.ThemeProvider=K1;exports.Toggle=$r;exports.Tooltip=lm;exports.TranslationsIcon=Xp;exports.TrashBinIcon=Jp;exports.ViewListIcon=Qp;exports.ViewTableIcon=sd;exports.ViewTilesIcon=ed;exports.ViewWideTilesIcon=td;exports.VouchersIcon=od;exports.WarningIcon=nd;exports.convertSizeToScale=be;exports.desktopMediaQuery=Q1;exports.getCSSVariables=sp;exports.sprinkles=Ys;exports.tabletMediaQuery=J1;exports.themes=jt;exports.useTheme=F1;exports.vars=Be;
|
|
100
|
+
`)},a_=0,De=[];function r_(s){var e=os.useRef([]),t=os.useRef([0,0]),o=os.useRef(),i=os.useState(a_++)[0],n=os.useState(function(){return Ul()})[0],f=os.useRef(s);os.useEffect(function(){f.current=s},[s]),os.useEffect(function(){if(s.inert){document.body.classList.add("block-interactivity-".concat(i));var C=yc([s.lockRef.current],(s.shards||[]).map(j8),!0).filter(Boolean);return C.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),C.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[s.inert,s.lockRef.current,s.shards]);var l=os.useCallback(function(C,v){if("touches"in C&&C.touches.length===2)return!f.current.allowPinchZoom;var k=xt(C),b=t.current,g="deltaX"in C?C.deltaX:b[0]-k[0],y="deltaY"in C?C.deltaY:b[1]-k[1],m,I=C.target,P=Math.abs(g)>Math.abs(y)?"h":"v";if("touches"in C&&P==="h"&&I.type==="range")return!1;var R=S8(P,I);if(!R)return!0;if(R?m=P:(m=P==="v"?"h":"v",R=S8(P,I)),!R)return!1;if(!o.current&&"changedTouches"in C&&(g||y)&&(o.current=m),!m)return!0;var E=o.current||m;return i_(E,v,C,E==="h"?g:y)},[]),r=os.useCallback(function(C){var v=C;if(!(!De.length||De[De.length-1]!==n)){var k="deltaY"in v?D8(v):xt(v),b=e.current.filter(function(m){return m.name===v.type&&m.target===v.target&&f_(m.delta,k)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}if(!b){var g=(f.current.shards||[]).map(j8).filter(Boolean).filter(function(m){return m.contains(v.target)}),y=g.length>0?l(v,g[0]):!f.current.noIsolation;y&&v.cancelable&&v.preventDefault()}}},[]),p=os.useCallback(function(C,v,k,b){var g={name:C,delta:v,target:k,should:b};e.current.push(g),setTimeout(function(){e.current=e.current.filter(function(y){return y!==g})},1)},[]),c=os.useCallback(function(C){t.current=xt(C),o.current=void 0},[]),d=os.useCallback(function(C){p(C.type,D8(C),C.target,l(C,s.lockRef.current))},[]),h=os.useCallback(function(C){p(C.type,xt(C),C.target,l(C,s.lockRef.current))},[]);os.useEffect(function(){return De.push(n),s.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",r,Se),document.addEventListener("touchmove",r,Se),document.addEventListener("touchstart",c,Se),function(){De=De.filter(function(C){return C!==n}),document.removeEventListener("wheel",r,Se),document.removeEventListener("touchmove",r,Se),document.removeEventListener("touchstart",c,Se)}},[]);var _=s.removeScrollBar,x=s.inert;return os.createElement(os.Fragment,null,x?os.createElement(n,{styles:l_(i)}):null,_?os.createElement(Ju,{gapMode:"margin"}):null)}const p_=Wu(Zl,r_);var ao=os.forwardRef(function(s,e){return os.createElement(lo,Ms({},s,{ref:e,sideCar:p_}))});ao.classNames=lo.classNames;var d_=function(s){if(typeof document>"u")return null;var e=Array.isArray(s)?s[0]:s;return e.ownerDocument.body},je=new WeakMap,kt=new WeakMap,wt={},Oo=0,Jl=function(s){return s&&(s.host||Jl(s.parentNode))},c_=function(s,e){return e.map(function(t){if(s.contains(t))return t;var o=Jl(t);return o&&s.contains(o)?o:(console.error("aria-hidden",t,"in not contained inside",s,". Doing nothing"),null)}).filter(function(t){return!!t})},u_=function(s,e,t,o){var i=c_(e,Array.isArray(s)?s:[s]);wt[t]||(wt[t]=new WeakMap);var n=wt[t],f=[],l=new Set,r=new Set(i),p=function(d){!d||l.has(d)||(l.add(d),p(d.parentNode))};i.forEach(p);var c=function(d){!d||r.has(d)||Array.prototype.forEach.call(d.children,function(h){if(l.has(h))c(h);else{var _=h.getAttribute(o),x=_!==null&&_!=="false",C=(je.get(h)||0)+1,v=(n.get(h)||0)+1;je.set(h,C),n.set(h,v),f.push(h),C===1&&x&&kt.set(h,!0),v===1&&h.setAttribute(t,"true"),x||h.setAttribute(o,"true")}})};return c(e),l.clear(),Oo++,function(){f.forEach(function(d){var h=je.get(d)-1,_=n.get(d)-1;je.set(d,h),n.set(d,_),h||(kt.has(d)||d.removeAttribute(o),kt.delete(d)),_||d.removeAttribute(t)}),Oo--,Oo||(je=new WeakMap,je=new WeakMap,kt=new WeakMap,wt={})}},ui=function(s,e,t){t===void 0&&(t="data-aria-hidden");var o=Array.from(Array.isArray(s)?s:[s]),i=d_(s);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live]"))),u_(o,i,t,"aria-hidden")):function(){return null}};const Ql="Dialog",[sa]=Ws(Ql),[__,ae]=sa(Ql),h_=s=>{const{__scopeDialog:e,children:t,open:o,defaultOpen:i,onOpenChange:n,modal:f=!0}=s,l=a.useRef(null),r=a.useRef(null),[p=!1,c]=Us({prop:o,defaultProp:i,onChange:n});return a.createElement(__,{scope:e,triggerRef:l,contentRef:r,contentId:Js(),titleId:Js(),descriptionId:Js(),open:p,onOpenChange:c,onOpenToggle:a.useCallback(()=>c(d=>!d),[c]),modal:f},t)},b_="DialogTrigger",m_=a.forwardRef((s,e)=>{const{__scopeDialog:t,...o}=s,i=ae(b_,t),n=xs(e,i.triggerRef);return a.createElement(Cs.button,S({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":_i(i.open)},o,{ref:n,onClick:is(s.onClick,i.onOpenToggle)}))}),ea="DialogPortal",[v_,ta]=sa(ea,{forceMount:void 0}),C_=s=>{const{__scopeDialog:e,forceMount:t,children:o,container:i}=s,n=ae(ea,e);return a.createElement(v_,{scope:e,forceMount:t},a.Children.map(o,f=>a.createElement(zs,{present:t||n.open},a.createElement(fo,{asChild:!0,container:i},f))))},Go="DialogOverlay",g_=a.forwardRef((s,e)=>{const t=ta(Go,s.__scopeDialog),{forceMount:o=t.forceMount,...i}=s,n=ae(Go,s.__scopeDialog);return n.modal?a.createElement(zs,{present:o||n.open},a.createElement(y_,S({},i,{ref:e}))):null}),y_=a.forwardRef((s,e)=>{const{__scopeDialog:t,...o}=s,i=ae(Go,t);return a.createElement(ao,{as:ke,allowPinchZoom:!0,shards:[i.contentRef]},a.createElement(Cs.div,S({"data-state":_i(i.open)},o,{ref:e,style:{pointerEvents:"auto",...o.style}})))}),Ae="DialogContent",x_=a.forwardRef((s,e)=>{const t=ta(Ae,s.__scopeDialog),{forceMount:o=t.forceMount,...i}=s,n=ae(Ae,s.__scopeDialog);return a.createElement(zs,{present:o||n.open},n.modal?a.createElement(k_,S({},i,{ref:e})):a.createElement(w_,S({},i,{ref:e})))}),k_=a.forwardRef((s,e)=>{const t=ae(Ae,s.__scopeDialog),o=a.useRef(null),i=xs(e,t.contentRef,o);return a.useEffect(()=>{const n=o.current;if(n)return ui(n)},[]),a.createElement(oa,S({},s,{ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:is(s.onCloseAutoFocus,n=>{var f;n.preventDefault(),(f=t.triggerRef.current)===null||f===void 0||f.focus()}),onPointerDownOutside:is(s.onPointerDownOutside,n=>{const f=n.detail.originalEvent,l=f.button===0&&f.ctrlKey===!0;(f.button===2||l)&&n.preventDefault()}),onFocusOutside:is(s.onFocusOutside,n=>n.preventDefault())}))}),w_=a.forwardRef((s,e)=>{const t=ae(Ae,s.__scopeDialog),o=a.useRef(!1),i=a.useRef(!1);return a.createElement(oa,S({},s,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{var f;if((f=s.onCloseAutoFocus)===null||f===void 0||f.call(s,n),!n.defaultPrevented){var l;o.current||(l=t.triggerRef.current)===null||l===void 0||l.focus(),n.preventDefault()}o.current=!1,i.current=!1},onInteractOutside:n=>{var f,l;(f=s.onInteractOutside)===null||f===void 0||f.call(s,n),n.defaultPrevented||(o.current=!0,n.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const r=n.target;((l=t.triggerRef.current)===null||l===void 0?void 0:l.contains(r))&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&i.current&&n.preventDefault()}}))}),oa=a.forwardRef((s,e)=>{const{__scopeDialog:t,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:n,...f}=s,l=ae(Ae,t),r=a.useRef(null),p=xs(e,r);return ci(),a.createElement(a.Fragment,null,a.createElement(di,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:n},a.createElement(io,S({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":_i(l.open)},f,{ref:p,onDismiss:()=>l.onOpenChange(!1)}))),!1)}),$_="DialogTitle";const I_="DialogClose",E_=a.forwardRef((s,e)=>{const{__scopeDialog:t,...o}=s,i=ae(I_,t);return a.createElement(Cs.button,S({type:"button"},o,{ref:e,onClick:is(s.onClick,()=>i.onOpenChange(!1))}))});function _i(s){return s?"open":"closed"}const R_="DialogTitleWarning";Jr(R_,{contentName:Ae,titleName:$_,docsSlug:"dialog"});const na=h_,ia=m_,fa=C_,la=g_,aa=x_,ra=E_;var O8="_68ye811";const pa=({children:s,...e})=>u.jsxs(fa,{children:[u.jsx(la,{asChild:!0,className:O8,children:u.jsx(Yt,{})}),u.jsx(aa,{asChild:!0,className:O8,children:u.jsxs(Y,{backgroundColor:"default1",boxShadow:"defaultModal",top:0,left:0,height:"100%",borderTopRightRadius:3,borderBottomRightRadius:3,position:"fixed",paddingTop:7,"data-macaw-ui-component":"Drawer.Content",...e,children:[s,u.jsx(ra,{asChild:!0,children:u.jsx(Qe,{variant:"tertiary",icon:u.jsx(uf,{}),size:"small",className:Ys({position:"absolute",top:1,right:1})})})]})})]});pa.displayName="Drawer.Content";const da=({children:s})=>u.jsx(na,{"data-macaw-ui-component":"Drawer",children:s});da.displayName="Drawer";const ca=({children:s})=>u.jsx(ia,{asChild:!0,"data-macaw-ui-component":"Drawer.Trigger",children:s});ca.displayName="Drawer.Trigger";const P_=Object.assign(da,{Content:pa,Trigger:ca}),S_=a.forwardRef((s,e)=>{const{children:t,width:o=10,height:i=5,...n}=s;return a.createElement(Cs.svg,S({},n,{ref:e,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),s.asChild?t:a.createElement("polygon",{points:"0,0 30,0 15,10"}))}),D_=S_,ua="Popper",[_a,He]=Ws(ua),[j_,ha]=_a(ua),O_=s=>{const{__scopePopper:e,children:t}=s,[o,i]=a.useState(null);return a.createElement(j_,{scope:e,anchor:o,onAnchorChange:i},t)},T_="PopperAnchor",M_=a.forwardRef((s,e)=>{const{__scopePopper:t,virtualRef:o,...i}=s,n=ha(T_,t),f=a.useRef(null),l=xs(e,f);return a.useEffect(()=>{n.onAnchorChange((o==null?void 0:o.current)||f.current)}),o?null:a.createElement(Cs.div,S({},i,{ref:l}))}),ba="PopperContent",[V_,A_]=_a(ba),N_=a.forwardRef((s,e)=>{var t,o,i,n,f,l,r,p;const{__scopePopper:c,side:d="bottom",sideOffset:h=0,align:_="center",alignOffset:x=0,arrowPadding:C=0,avoidCollisions:v=!0,collisionBoundary:k=[],collisionPadding:b=0,sticky:g="partial",hideWhenDetached:y=!1,updatePositionStrategy:m="optimized",onPlaced:I,...P}=s,R=ha(ba,c),[E,j]=a.useState(null),M=xs(e,ys=>j(ys)),[L,X]=a.useState(null),A=cn(L),B=(t=A==null?void 0:A.width)!==null&&t!==void 0?t:0,K=(o=A==null?void 0:A.height)!==null&&o!==void 0?o:0,ts=d+(_!=="center"?"-"+_:""),Z=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},T=Array.isArray(k)?k:[k],$=T.length>0,D={padding:Z,boundary:T.filter(H_),altBoundary:$},{refs:V,floatingStyles:N,placement:O,isPositioned:H,middlewareData:z}=Lf({strategy:"fixed",placement:ts,whileElementsMounted:(...ys)=>Mf(...ys,{animationFrame:m==="always"}),elements:{reference:R.anchor},middleware:[Md({mainAxis:h+K,alignmentAxis:x}),v&&tc({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?nc():void 0,...D}),v&&Vf({...D}),Af({...D,apply:({elements:ys,rects:vs,availableWidth:ws,availableHeight:Ps})=>{const{width:Ss,height:te}=vs.reference,$s=ys.floating.style;$s.setProperty("--radix-popper-available-width",`${ws}px`),$s.setProperty("--radix-popper-available-height",`${Ps}px`),$s.setProperty("--radix-popper-anchor-width",`${Ss}px`),$s.setProperty("--radix-popper-anchor-height",`${te}px`)}}),L&&fc({element:L,padding:C}),q_({arrowWidth:B,arrowHeight:K}),y&&oc({strategy:"referenceHidden",...D})]}),[U,G]=ma(O),Q=se(I);we(()=>{H&&(Q==null||Q())},[H,Q]);const es=(i=z.arrow)===null||i===void 0?void 0:i.x,ls=(n=z.arrow)===null||n===void 0?void 0:n.y,W=((f=z.arrow)===null||f===void 0?void 0:f.centerOffset)!==0,[cs,J]=a.useState();return we(()=>{E&&J(window.getComputedStyle(E).zIndex)},[E]),a.createElement("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...N,transform:H?N.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:cs,"--radix-popper-transform-origin":[(l=z.transformOrigin)===null||l===void 0?void 0:l.x,(r=z.transformOrigin)===null||r===void 0?void 0:r.y].join(" ")},dir:s.dir},a.createElement(V_,{scope:c,placedSide:U,onArrowChange:X,arrowX:es,arrowY:ls,shouldHideArrow:W},a.createElement(Cs.div,S({"data-side":U,"data-align":G},P,{ref:M,style:{...P.style,animation:H?void 0:"none",opacity:(p=z.hide)!==null&&p!==void 0&&p.referenceHidden?0:void 0}}))))}),L_="PopperArrow",W_={top:"bottom",right:"left",bottom:"top",left:"right"},z_=a.forwardRef(function(e,t){const{__scopePopper:o,...i}=e,n=A_(L_,o),f=W_[n.placedSide];return a.createElement("span",{ref:n.onArrowChange,style:{position:"absolute",left:n.arrowX,top:n.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[n.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[n.placedSide],visibility:n.shouldHideArrow?"hidden":void 0}},a.createElement(D_,S({},i,{ref:t,style:{...i.style,display:"block"}})))});function H_(s){return s!==null}const q_=s=>({name:"transformOrigin",options:s,fn(e){var t,o,i,n,f;const{placement:l,rects:r,middlewareData:p}=e,d=((t=p.arrow)===null||t===void 0?void 0:t.centerOffset)!==0,h=d?0:s.arrowWidth,_=d?0:s.arrowHeight,[x,C]=ma(l),v={start:"0%",center:"50%",end:"100%"}[C],k=((o=(i=p.arrow)===null||i===void 0?void 0:i.x)!==null&&o!==void 0?o:0)+h/2,b=((n=(f=p.arrow)===null||f===void 0?void 0:f.y)!==null&&n!==void 0?n:0)+_/2;let g="",y="";return x==="bottom"?(g=d?v:`${k}px`,y=`${-_}px`):x==="top"?(g=d?v:`${k}px`,y=`${r.floating.height+_}px`):x==="right"?(g=`${-_}px`,y=d?v:`${b}px`):x==="left"&&(g=`${r.floating.width+_}px`,y=d?v:`${b}px`),{data:{x:g,y}}}});function ma(s){const[e,t="center"]=s.split("-");return[e,t]}const hi=O_,ro=M_,bi=N_,va=z_,To="rovingFocusGroup.onEntryFocus",F_={bubbles:!1,cancelable:!0},mi="RovingFocusGroup",[Xo,Ca,K_]=on(mi),[B_,po]=Ws(mi,[K_]),[Z_,U_]=B_(mi),Y_=a.forwardRef((s,e)=>a.createElement(Xo.Provider,{scope:s.__scopeRovingFocusGroup},a.createElement(Xo.Slot,{scope:s.__scopeRovingFocusGroup},a.createElement(G_,S({},s,{ref:e}))))),G_=a.forwardRef((s,e)=>{const{__scopeRovingFocusGroup:t,orientation:o,loop:i=!1,dir:n,currentTabStopId:f,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:r,onEntryFocus:p,...c}=s,d=a.useRef(null),h=xs(e,d),_=Bt(n),[x=null,C]=Us({prop:f,defaultProp:l,onChange:r}),[v,k]=a.useState(!1),b=se(p),g=Ca(t),y=a.useRef(!1),[m,I]=a.useState(0);return a.useEffect(()=>{const P=d.current;if(P)return P.addEventListener(To,b),()=>P.removeEventListener(To,b)},[b]),a.createElement(Z_,{scope:t,orientation:o,dir:_,loop:i,currentTabStopId:x,onItemFocus:a.useCallback(P=>C(P),[C]),onItemShiftTab:a.useCallback(()=>k(!0),[]),onFocusableItemAdd:a.useCallback(()=>I(P=>P+1),[]),onFocusableItemRemove:a.useCallback(()=>I(P=>P-1),[])},a.createElement(Cs.div,S({tabIndex:v||m===0?-1:0,"data-orientation":o},c,{ref:h,style:{outline:"none",...s.style},onMouseDown:is(s.onMouseDown,()=>{y.current=!0}),onFocus:is(s.onFocus,P=>{const R=!y.current;if(P.target===P.currentTarget&&R&&!v){const E=new CustomEvent(To,F_);if(P.currentTarget.dispatchEvent(E),!E.defaultPrevented){const j=g().filter(B=>B.focusable),M=j.find(B=>B.active),L=j.find(B=>B.id===x),A=[M,L,...j].filter(Boolean).map(B=>B.ref.current);ga(A)}}y.current=!1}),onBlur:is(s.onBlur,()=>k(!1))})))}),X_="RovingFocusGroupItem",J_=a.forwardRef((s,e)=>{const{__scopeRovingFocusGroup:t,focusable:o=!0,active:i=!1,tabStopId:n,...f}=s,l=Js(),r=n||l,p=U_(X_,t),c=p.currentTabStopId===r,d=Ca(t),{onFocusableItemAdd:h,onFocusableItemRemove:_}=p;return a.useEffect(()=>{if(o)return h(),()=>_()},[o,h,_]),a.createElement(Xo.ItemSlot,{scope:t,id:r,focusable:o,active:i},a.createElement(Cs.span,S({tabIndex:c?0:-1,"data-orientation":p.orientation},f,{ref:e,onMouseDown:is(s.onMouseDown,x=>{o?p.onItemFocus(r):x.preventDefault()}),onFocus:is(s.onFocus,()=>p.onItemFocus(r)),onKeyDown:is(s.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){p.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const C=eh(x,p.orientation,p.dir);if(C!==void 0){x.preventDefault();let k=d().filter(b=>b.focusable).map(b=>b.ref.current);if(C==="last")k.reverse();else if(C==="prev"||C==="next"){C==="prev"&&k.reverse();const b=k.indexOf(x.currentTarget);k=p.loop?th(k,b+1):k.slice(b+1)}setTimeout(()=>ga(k))}})})))}),Q_={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function sh(s,e){return e!=="rtl"?s:s==="ArrowLeft"?"ArrowRight":s==="ArrowRight"?"ArrowLeft":s}function eh(s,e,t){const o=sh(s.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Q_[o]}function ga(s){const e=document.activeElement;for(const t of s)if(t===e||(t.focus(),document.activeElement!==e))return}function th(s,e){return s.map((t,o)=>s[(e+o)%s.length])}const ya=Y_,xa=J_,oh=["Enter"," "],nh=["ArrowDown","PageUp","Home"],ka=["ArrowUp","PageDown","End"],ih=[...nh,...ka],co="Menu",[Jo,fh,lh]=on(co),[Ie,wa]=Ws(co,[lh,He,po]),vi=He(),$a=po(),[ah,dt]=Ie(co),[rh,Ci]=Ie(co),ph=s=>{const{__scopeMenu:e,open:t=!1,children:o,dir:i,onOpenChange:n,modal:f=!0}=s,l=vi(e),[r,p]=a.useState(null),c=a.useRef(!1),d=se(n),h=Bt(i);return a.useEffect(()=>{const _=()=>{c.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>c.current=!1;return document.addEventListener("keydown",_,{capture:!0}),()=>{document.removeEventListener("keydown",_,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),a.createElement(hi,l,a.createElement(ah,{scope:e,open:t,onOpenChange:d,content:r,onContentChange:p},a.createElement(rh,{scope:e,onClose:a.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:h,modal:f},o)))},dh=a.forwardRef((s,e)=>{const{__scopeMenu:t,...o}=s,i=vi(t);return a.createElement(ro,S({},i,o,{ref:e}))}),Ia="MenuPortal",[ch,uh]=Ie(Ia,{forceMount:void 0}),_h=s=>{const{__scopeMenu:e,forceMount:t,children:o,container:i}=s,n=dt(Ia,e);return a.createElement(ch,{scope:e,forceMount:t},a.createElement(zs,{present:t||n.open},a.createElement(fo,{asChild:!0,container:i},o)))},pe="MenuContent",[hh,Ea]=Ie(pe),bh=a.forwardRef((s,e)=>{const t=uh(pe,s.__scopeMenu),{forceMount:o=t.forceMount,...i}=s,n=dt(pe,s.__scopeMenu),f=Ci(pe,s.__scopeMenu);return a.createElement(Jo.Provider,{scope:s.__scopeMenu},a.createElement(zs,{present:o||n.open},a.createElement(Jo.Slot,{scope:s.__scopeMenu},f.modal?a.createElement(mh,S({},i,{ref:e})):a.createElement(vh,S({},i,{ref:e})))))}),mh=a.forwardRef((s,e)=>{const t=dt(pe,s.__scopeMenu),o=a.useRef(null),i=xs(e,o);return a.useEffect(()=>{const n=o.current;if(n)return ui(n)},[]),a.createElement(Ra,S({},s,{ref:i,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:is(s.onFocusOutside,n=>n.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)}))}),vh=a.forwardRef((s,e)=>{const t=dt(pe,s.__scopeMenu);return a.createElement(Ra,S({},s,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)}))}),Ra=a.forwardRef((s,e)=>{const{__scopeMenu:t,loop:o=!1,trapFocus:i,onOpenAutoFocus:n,onCloseAutoFocus:f,disableOutsidePointerEvents:l,onEntryFocus:r,onEscapeKeyDown:p,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:_,disableOutsideScroll:x,...C}=s,v=dt(pe,t),k=Ci(pe,t),b=vi(t),g=$a(t),y=fh(t),[m,I]=a.useState(null),P=a.useRef(null),R=xs(e,P,v.onContentChange),E=a.useRef(0),j=a.useRef(""),M=a.useRef(0),L=a.useRef(null),X=a.useRef("right"),A=a.useRef(0),B=x?ao:a.Fragment,K=x?{as:ke,allowPinchZoom:!0}:void 0,ts=T=>{var $,D;const V=j.current+T,N=y().filter(Q=>!Q.disabled),O=document.activeElement,H=($=N.find(Q=>Q.ref.current===O))===null||$===void 0?void 0:$.textValue,z=N.map(Q=>Q.textValue),U=Eh(z,V,H),G=(D=N.find(Q=>Q.textValue===U))===null||D===void 0?void 0:D.ref.current;(function Q(es){j.current=es,window.clearTimeout(E.current),es!==""&&(E.current=window.setTimeout(()=>Q(""),1e3))})(V),G&&setTimeout(()=>G.focus())};a.useEffect(()=>()=>window.clearTimeout(E.current),[]),ci();const Z=a.useCallback(T=>{var $,D;return X.current===(($=L.current)===null||$===void 0?void 0:$.side)&&Ph(T,(D=L.current)===null||D===void 0?void 0:D.area)},[]);return a.createElement(hh,{scope:t,searchRef:j,onItemEnter:a.useCallback(T=>{Z(T)&&T.preventDefault()},[Z]),onItemLeave:a.useCallback(T=>{var $;Z(T)||(($=P.current)===null||$===void 0||$.focus(),I(null))},[Z]),onTriggerLeave:a.useCallback(T=>{Z(T)&&T.preventDefault()},[Z]),pointerGraceTimerRef:M,onPointerGraceIntentChange:a.useCallback(T=>{L.current=T},[])},a.createElement(B,K,a.createElement(di,{asChild:!0,trapped:i,onMountAutoFocus:is(n,T=>{var $;T.preventDefault(),($=P.current)===null||$===void 0||$.focus()}),onUnmountAutoFocus:f},a.createElement(io,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:p,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:_},a.createElement(ya,S({asChild:!0},g,{dir:k.dir,orientation:"vertical",loop:o,currentTabStopId:m,onCurrentTabStopIdChange:I,onEntryFocus:is(r,T=>{k.isUsingKeyboardRef.current||T.preventDefault()})}),a.createElement(bi,S({role:"menu","aria-orientation":"vertical","data-state":wh(v.open),"data-radix-menu-content":"",dir:k.dir},b,C,{ref:R,style:{outline:"none",...C.style},onKeyDown:is(C.onKeyDown,T=>{const D=T.target.closest("[data-radix-menu-content]")===T.currentTarget,V=T.ctrlKey||T.altKey||T.metaKey,N=T.key.length===1;D&&(T.key==="Tab"&&T.preventDefault(),!V&&N&&ts(T.key));const O=P.current;if(T.target!==O||!ih.includes(T.key))return;T.preventDefault();const z=y().filter(U=>!U.disabled).map(U=>U.ref.current);ka.includes(T.key)&&z.reverse(),$h(z)}),onBlur:is(s.onBlur,T=>{T.currentTarget.contains(T.target)||(window.clearTimeout(E.current),j.current="")}),onPointerMove:is(s.onPointerMove,sn(T=>{const $=T.target,D=A.current!==T.clientX;if(T.currentTarget.contains($)&&D){const V=T.clientX>A.current?"right":"left";X.current=V,A.current=T.clientX}}))})))))))}),Qo="MenuItem",T8="menu.itemSelect",Ch=a.forwardRef((s,e)=>{const{disabled:t=!1,onSelect:o,...i}=s,n=a.useRef(null),f=Ci(Qo,s.__scopeMenu),l=Ea(Qo,s.__scopeMenu),r=xs(e,n),p=a.useRef(!1),c=()=>{const d=n.current;if(!t&&d){const h=new CustomEvent(T8,{bubbles:!0,cancelable:!0});d.addEventListener(T8,_=>o==null?void 0:o(_),{once:!0}),W8(d,h),h.defaultPrevented?p.current=!1:f.onClose()}};return a.createElement(gh,S({},i,{ref:r,disabled:t,onClick:is(s.onClick,c),onPointerDown:d=>{var h;(h=s.onPointerDown)===null||h===void 0||h.call(s,d),p.current=!0},onPointerUp:is(s.onPointerUp,d=>{var h;p.current||(h=d.currentTarget)===null||h===void 0||h.click()}),onKeyDown:is(s.onKeyDown,d=>{const h=l.searchRef.current!=="";t||h&&d.key===" "||oh.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})}))}),gh=a.forwardRef((s,e)=>{const{__scopeMenu:t,disabled:o=!1,textValue:i,...n}=s,f=Ea(Qo,t),l=$a(t),r=a.useRef(null),p=xs(e,r),[c,d]=a.useState(!1),[h,_]=a.useState("");return a.useEffect(()=>{const x=r.current;if(x){var C;_(((C=x.textContent)!==null&&C!==void 0?C:"").trim())}},[n.children]),a.createElement(Jo.ItemSlot,{scope:t,disabled:o,textValue:i??h},a.createElement(xa,S({asChild:!0},l,{focusable:!o}),a.createElement(Cs.div,S({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0},n,{ref:p,onPointerMove:is(s.onPointerMove,sn(x=>{o?f.onItemLeave(x):(f.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus())})),onPointerLeave:is(s.onPointerLeave,sn(x=>f.onItemLeave(x))),onFocus:is(s.onFocus,()=>d(!0)),onBlur:is(s.onBlur,()=>d(!1))}))))}),yh="MenuRadioGroup",[am,rm]=Ie(yh,{value:void 0,onValueChange:()=>{}}),xh="MenuItemIndicator",[pm,dm]=Ie(xh,{checked:!1}),kh="MenuSub",[cm,um]=Ie(kh);function wh(s){return s?"open":"closed"}function $h(s){const e=document.activeElement;for(const t of s)if(t===e||(t.focus(),document.activeElement!==e))return}function Ih(s,e){return s.map((t,o)=>s[(e+o)%s.length])}function Eh(s,e,t){const i=e.length>1&&Array.from(e).every(p=>p===e[0])?e[0]:e,n=t?s.indexOf(t):-1;let f=Ih(s,Math.max(n,0));i.length===1&&(f=f.filter(p=>p!==t));const r=f.find(p=>p.toLowerCase().startsWith(i.toLowerCase()));return r!==t?r:void 0}function Rh(s,e){const{x:t,y:o}=s;let i=!1;for(let n=0,f=e.length-1;n<e.length;f=n++){const l=e[n].x,r=e[n].y,p=e[f].x,c=e[f].y;r>o!=c>o&&t<(p-l)*(o-r)/(c-r)+l&&(i=!i)}return i}function Ph(s,e){if(!e)return!1;const t={x:s.clientX,y:s.clientY};return Rh(t,e)}function sn(s){return e=>e.pointerType==="mouse"?s(e):void 0}const Sh=ph,Dh=dh,jh=_h,Oh=bh,Th=Ch,Pa="DropdownMenu",[Mh]=Ws(Pa,[wa]),ct=wa(),[Vh,Sa]=Mh(Pa),Ah=s=>{const{__scopeDropdownMenu:e,children:t,dir:o,open:i,defaultOpen:n,onOpenChange:f,modal:l=!0}=s,r=ct(e),p=a.useRef(null),[c=!1,d]=Us({prop:i,defaultProp:n,onChange:f});return a.createElement(Vh,{scope:e,triggerId:Js(),triggerRef:p,contentId:Js(),open:c,onOpenChange:d,onOpenToggle:a.useCallback(()=>d(h=>!h),[d]),modal:l},a.createElement(Sh,S({},r,{open:c,onOpenChange:d,dir:o,modal:l}),t))},Nh="DropdownMenuTrigger",Lh=a.forwardRef((s,e)=>{const{__scopeDropdownMenu:t,disabled:o=!1,...i}=s,n=Sa(Nh,t),f=ct(t);return a.createElement(Dh,S({asChild:!0},f),a.createElement(Cs.button,S({type:"button",id:n.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":n.open?n.contentId:void 0,"data-state":n.open?"open":"closed","data-disabled":o?"":void 0,disabled:o},i,{ref:tn(e,n.triggerRef),onPointerDown:is(s.onPointerDown,l=>{!o&&l.button===0&&l.ctrlKey===!1&&(n.onOpenToggle(),n.open||l.preventDefault())}),onKeyDown:is(s.onKeyDown,l=>{o||(["Enter"," "].includes(l.key)&&n.onOpenToggle(),l.key==="ArrowDown"&&n.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})))}),Wh=s=>{const{__scopeDropdownMenu:e,...t}=s,o=ct(e);return a.createElement(jh,S({},o,t))},zh="DropdownMenuContent",Hh=a.forwardRef((s,e)=>{const{__scopeDropdownMenu:t,...o}=s,i=Sa(zh,t),n=ct(t),f=a.useRef(!1);return a.createElement(Oh,S({id:i.contentId,"aria-labelledby":i.triggerId},n,o,{ref:e,onCloseAutoFocus:is(s.onCloseAutoFocus,l=>{var r;f.current||(r=i.triggerRef.current)===null||r===void 0||r.focus(),f.current=!1,l.preventDefault()}),onInteractOutside:is(s.onInteractOutside,l=>{const r=l.detail.originalEvent,p=r.button===0&&r.ctrlKey===!0,c=r.button===2||p;(!i.modal||c)&&(f.current=!0)}),style:{...s.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),qh=a.forwardRef((s,e)=>{const{__scopeDropdownMenu:t,...o}=s,i=ct(t);return a.createElement(Th,S({},i,o,{ref:e}))}),Fh=Ah,Kh=Lh,Bh=Wh,Zh=Hh,Uh=qh;var Yh="_6vehm81",Gh="_6vehm82";const Da=({children:s,...e})=>u.jsx(Bh,{children:u.jsx(Zh,{asChild:!0,className:Yh,"data-macaw-ui-component":"Dropdown.Content",...e,children:s})});Da.displayName="Dropdown.Content";const ja=({children:s})=>u.jsx(Uh,{asChild:!0,className:Gh,"data-macaw-ui-component":"Dropdown.Item",children:s});ja.displayName="Dropdown.Item";const Oa=({children:s,onOpenChange:e,open:t})=>u.jsx(Fh,{open:t,onOpenChange:e,"data-macaw-ui-component":"Dropdown",children:s});Oa.displayName="Dropdown";const Ta=({children:s})=>u.jsx(Kh,{asChild:!0,"data-macaw-ui-component":"Dropdown.Trigger",children:s});Ta.displayName="Dropdown.Trigger";const Xh=Object.assign(Oa,{Trigger:Ta,Content:Da,Item:ja});var Jh=ks({defaultClassName:"_18fs8ps2ru _18fs8ps31i _18fs8ps28i _18fs8ps2i6 _18fs8ps10 _18fs8ps1x _18fs8ps1mc _18fs8ps1mi _18fs8ps1m0 _18fs8ps1m6 _18fs8ps1n9 _18fs8ps3 _18fs8ps3ti _18fs8ps3u0 _18fs8ps24u _18fs8ps21k _18fs8ps21n _18fs8ps25i _18fs8ps3du _18fs8ps3eo",variantClassNames:{variant:{contained:"_18fs8ps3qi _18fs8ps3pv _18fs8ps3pm _18fs8ps3qb _18fs8ps3rc",text:"_18fs8ps3qi _18fs8ps3pv _18fs8ps3pm _18fs8ps3qb _18fs8ps3rc"},size:{small:"_18fs8ps296 _18fs8ps2iu _18fs8ps2s6 _18fs8ps31u _18fs8ps1gi _18fs8ps1fl _18fs8ps1ic _18fs8ps1hf _18fs8ps1j6 _18fs8ps1kr _18fs8ps1nf _18fs8ps209 _18fs8psdx",medium:"_18fs8ps296 _18fs8ps2iu _18fs8ps30i _18fs8ps3a6 _18fs8ps1gl _18fs8ps1fo _18fs8ps1if _18fs8ps1hi _18fs8ps17u _18fs8ps1j9 _18fs8ps1kr _18fs8ps1ni _18fs8ps209 _18fs8psdr",large:"_18fs8ps29i _18fs8ps2j6 _18fs8ps2si _18fs8ps326 _18fs8ps1gl _18fs8ps1fo _18fs8ps1if _18fs8ps1hi _18fs8ps180 _18fs8ps1jc _18fs8ps1ku _18fs8ps1nl _18fs8ps209 _18fs8psdu"}},defaultVariants:{size:"medium"},compoundVariants:[]});const Ma=a.forwardRef(({children:s,size:e,variant:t="contained",disabled:o,className:i,...n},f)=>u.jsxs(Y,{as:"button",className:rs(Jh({size:e,variant:t}),i),disabled:o,ref:f,"data-macaw-ui-component":"DropdownButton",...n,children:[s,u.jsx(st,{size:"small",className:Ys({color:"default2"})})]}));Ma.displayName="DropdownButton";const Qh=s=>{const e=/^[\d.,]*$|(Backspace|Tab|Delete|ArrowLeft|ArrowRight|ArrowDown|ArrowUp)/;return!s.key.match(e)&&s.preventDefault()},sb=(s,e,t)=>eb(s)||e!==""&&e!==void 0?!0:t,eb=s=>["date","time","datetime-local"].includes(s??""),tb=(s,e,t)=>{const[o,i]=a.useState(!1),n=sb(e,s,o);return{handlers:{onFocus:()=>i(!0),onBlur:()=>i(!1),onChange:p=>{t&&t(p)}},value:s,active:o,typed:n}},Va=({children:s,id:e,typed:t,active:o,disabled:i,size:n,label:f,error:l,className:r,endAdornment:p})=>u.jsxs(Y,{as:"label",htmlFor:e,className:rs(tt({typed:t,active:o,disabled:i,size:n,error:l}),r),alignItems:"center",gap:1,"data-macaw-ui-component":"Input",children:[u.jsxs(Y,{display:"flex",flexDirection:"column",width:"100%",children:[u.jsx(Y,{as:"span",className:rs(ot({typed:t,size:n,disabled:i,error:l})),children:f}),s]}),p]});Va.displayName="InputWrapper";const Kt=a.forwardRef(({size:s,disabled:e=!1,className:t,value:o,label:i,id:n,type:f,error:l=!1,onChange:r,helperText:p,onBlur:c,onFocus:d,flex:h,flexBasis:_,flexGrow:x,flexShrink:C,width:v,endAdornment:k,...b},g)=>{const{handlers:y,value:m,active:I,typed:P}=tb(o,f,r);return u.jsxs(Y,{display:"flex",flexDirection:"column",flex:h,flexBasis:_,flexGrow:x,flexShrink:C,width:v,children:[u.jsx(Va,{id:n,typed:P,active:I,disabled:e,size:s,label:i,error:l,className:t,endAdornment:k,children:u.jsx(Y,{id:n,as:"input",type:f,className:rs(Gt({size:s,error:l})),disabled:e,value:m,ref:g,onBlur:R=>{y.onBlur(),c==null||c(R)},onFocus:R=>{y.onFocus(),d==null||d(R)},onChange:y.onChange,onKeyDown:R=>{f==="number"&&Qh(R)},role:"input",...b})}),p&&u.jsx(Y,{className:un({size:s}),children:u.jsx(Es,{size:be(s),color:l?"critical1":"default2",children:p})})]})});Kt.displayName="Input";const Aa=({children:s,...e})=>u.jsx(Y,{as:"li",...e,"data-macaw-ui-component":"List.Divider",children:s});Aa.displayName="List.Divider";const Na=a.forwardRef(({children:s,disabled:e,onClick:t,className:o,active:i,...n},f)=>u.jsx(Y,{as:"li",display:"flex",alignItems:"center",cursor:{default:"pointer",disabled:"not-allowed"},disabled:e,backgroundColor:{default:i?"default1Focused":"transparent",active:"default1Pressed",hover:"default1Hovered",focus:"default1Focused"},onClick:t,className:o,ref:f,"data-macaw-ui-component":"List.Item",...n,children:s}));Na.displayName="List.Item";const La=({children:s})=>u.jsx(Y8,{asChild:!0,"data-macaw-ui-component":"ListItem.Content",children:s});La.displayName="ListItem.Content";const gi=a.forwardRef(({children:s,as:e="ul",className:t,...o},i)=>u.jsx(Y,{as:e,ref:i,className:t,margin:0,"data-macaw-ui-component":"List",...o,children:s}));gi.displayName="List";const Wa=a.createContext(null),ob=()=>{const s=a.useContext(Wa);if(s===null)throw new Error("You are outside of context");return s},nb=Wa.Provider;var ib="_16tmpu02",fb="_16tmpu01",lb="_16tmpu00";const Mo="list-item-group-value",za=({children:s,defaultExpanded:e=!1,as:t="ul",...o})=>{const[i,n]=a.useState(e?Mo:"");return u.jsx(Lo,{asChild:!0,type:"single",collapsible:!0,value:i,onValueChange:n,children:u.jsx(nb,{value:{triggerOpen:()=>n(Mo)},children:u.jsx(gi,{as:t,...o,"data-macaw-ui-component":"ListItem",children:u.jsx(X8,{value:Mo,className:lb,children:s})})})})};za.displayName="ListItem";const Ha=({children:s,size:e,...t})=>{const{triggerOpen:o}=ob();return u.jsxs(Ls.Item,{"data-macaw-ui-component":"ItemGroup.Trigger",...t,children:[u.jsx(Y,{width:"100%",height:"100%",onClick:o,children:s}),u.jsx(U8,{asChild:!0,children:u.jsx(Qe,{icon:u.jsx(dn,{className:fb,color:"default1",size:e}),variant:"tertiary",size:e,className:ib})})]})};Ha.displayName="ListItem.Trigger";const ab=Object.assign(za,{Trigger:Ha,Content:La}),Ls=Object.assign(gi,{Item:Na,ItemGroup:ab,Divider:Aa}),qa=({children:s})=>u.jsx(ra,{asChild:!0,"data-macaw-ui-component":"Modal.Close",children:s});qa.displayName="Modal.Close";var M8="w2pmqx1";const rb=s=>s?{onOpenAutoFocus:e=>{e.preventDefault()}}:{},Fa=({children:s,disableAutofocus:e,container:t,dialogContentProps:o})=>u.jsx(fa,{container:t,children:u.jsx(la,{asChild:!0,className:M8,children:u.jsx(Yt,{children:u.jsx(aa,{asChild:!0,className:M8,...rb(e),...o,children:s})})})});Fa.displayName="Modal.Content";const Ka=({children:s,open:e,onChange:t})=>u.jsx(na,{"data-macaw-ui-component":"Modal",open:e,onOpenChange:t,children:s});Ka.displayName="Modal";const Ba=({children:s})=>u.jsx(ia,{asChild:!0,"data-macaw-ui-component":"Modal.Trigger",children:s});Ba.displayName="Modal.Trigger";const pb=Object.assign(Ka,{Content:Fa,Trigger:Ba,Close:qa});var Za=ks({defaultClassName:"_1g8t8xp8 _18fs8ps2ru _18fs8ps31i _18fs8ps28i _18fs8ps2i6 _18fs8ps1m9 _18fs8ps1mf _18fs8ps1lx _18fs8ps1m3 _18fs8ps170 _18fs8ps3si _18fs8ps1jc _18fs8ps1ku _18fs8ps1n9 _18fs8ps3du _18fs8ps3eo",variantClassNames:{size:{small:"_18fs8ps1j6 _18fs8ps1ko _18fs8ps1nf",medium:"_18fs8ps1j9 _18fs8ps1kr _18fs8ps1ni",large:"_18fs8ps1j9 _18fs8ps1kr _18fs8ps1ni"},error:{true:"_18fs8ps3d6"}},defaultVariants:{size:"medium"},compoundVariants:[]}),db=ks({defaultClassName:"_1g8t8xp0",variantClassNames:{typed:{true:"_1g8t8xp2"}},defaultVariants:{},compoundVariants:[]});const cb=({size:s,getToggleButtonProps:e,renderEndAdornment:t,disabled:o})=>t?u.jsx(u.Fragment,{children:t(e())}):u.jsx(st,{className:rs(_n,Ys({cursor:"pointer"})),size:s,...e({disabled:o})}),yi=a.forwardRef(({id:s,label:e,className:t,error:o,children:i,getLabelProps:n,typed:f,active:l,disabled:r,size:p,getToggleButtonProps:c,renderEndAdornment:d,hasItemsToSelect:h},_)=>u.jsxs(Y,{ref:_,as:"label",className:rs(tt({typed:f,active:l,disabled:r,size:p,error:o}),t),alignItems:"center",justifyContent:"space-between",disabled:r,flexWrap:"nowrap",gap:3,"data-macaw-ui-component":"Multiselect",...n({htmlFor:s}),cursor:r?"not-allowed":"text",children:[u.jsxs(Y,{display:"flex",flexDirection:"column",width:"100%",children:[u.jsx(Y,{as:"span",className:rs(db({typed:f}),ot({typed:f,size:p,disabled:r,error:o})),children:e}),u.jsx(Y,{display:"flex",flexDirection:"row",gap:1,alignItems:"center",flexWrap:"wrap",children:i})]}),h?u.jsx(cb,{size:p,getToggleButtonProps:c,renderEndAdornment:d,disabled:r}):u.jsx(Y,{width:5,height:5})]}));yi.displayName="MultiselectWrapper";const ub=(s,e,t)=>{const o=e==null?void 0:e.toLowerCase();return t.filter(i=>!s.find(n=>n.value===i.value)&&i.label.toLowerCase().includes(o??""))},Ua=({selectedValues:s,showEmptyState:e=!1,options:t,onChange:o,onInputValueChange:i,onFocus:n,onBlur:f})=>{const[l,r]=a.useState(""),[p,c]=a.useState(!1),d=Co(s)?s.reduce((E,j)=>{const M=t.find(L=>L.value===j);return M&&E.push(M),E},[]):s,h=ub(d,l,t),_=i||e?!0:d.length!==t.length,x=!!(d.length||p),{getSelectedItemProps:C,getDropdownProps:v,removeSelectedItem:k}=Ce({selectedItems:d,onStateChange(E){const{selectedItems:j,type:M}=E;switch(M){case Ce.stateChangeTypes.SelectedItemKeyDownBackspace:case Ce.stateChangeTypes.SelectedItemKeyDownDelete:case Ce.stateChangeTypes.DropdownKeyDownBackspace:case Ce.stateChangeTypes.FunctionRemoveSelectedItem:{const L=Co(s)?j==null?void 0:j.map(X=>X.value):j;o==null||o(L);break}}}}),{isOpen:b,getLabelProps:g,getMenuProps:y,getInputProps:m,highlightedIndex:I,getItemProps:P,getToggleButtonProps:R}=Xs({items:h,itemToString:E=>(E==null?void 0:E.label)??"",defaultHighlightedIndex:0,isItemDisabled:E=>(E==null?void 0:E.disabled)??!1,selectedItem:null,stateReducer(E,j){const{changes:M,type:L}=j;switch(L){case Xs.stateChangeTypes.InputKeyDownEnter:case Xs.stateChangeTypes.ItemClick:return r(""),{...M,...M.selectedItem&&{isOpen:!0,highlightedIndex:0}};default:return M}},onStateChange({inputValue:E,type:j,selectedItem:M}){switch(j){case Xs.stateChangeTypes.InputKeyDownEnter:case Xs.stateChangeTypes.ItemClick:case Xs.stateChangeTypes.InputBlur:if(M){const L=Co(s)?[...d.map(X=>X.value),M.value]:[...d,M];o==null||o(L)}else r("");break;case Xs.stateChangeTypes.InputChange:i==null||i(E??""),r(E??"");break}}});return{active:p,itemsToSelect:h,typed:x,isOpen:b,getLabelProps:g,getMenuProps:y,getInputProps:(E,j)=>m(v({onFocus:M=>{c(!0),n==null||n(M)},onBlur:M=>{c(!1),f==null||f(M)},preventKeyAction:b,...E}),j),highlightedIndex:I,getItemProps:P,getSelectedItemProps:C,removeSelectedItem:k,selectedItems:d,inputValue:l,showInput:_,getToggleButtonProps:E=>R({onClick:j=>{j.preventDefault()},...E}),hasItemsToSelect:h.length>0}},_b=({size:s,disabled:e=!1,className:t,label:o,id:i,error:n=!1,helperText:f,options:l,onChange:r,renderEndAdornment:p,value:c=[],onFocus:d,onBlur:h,children:_,locale:x={inputText:"Add item"},...C},v)=>{const{active:k,typed:b,isOpen:g,getLabelProps:y,getMenuProps:m,getInputProps:I,highlightedIndex:P,getItemProps:R,itemsToSelect:E,selectedItems:j,getSelectedItemProps:M,inputValue:L,removeSelectedItem:X,getToggleButtonProps:A,hasItemsToSelect:B,showInput:K}=Ua({selectedValues:c,showEmptyState:Te(_),options:l,onChange:r,onFocus:d,onBlur:h}),{refs:ts,floatingStyles:Z}=rt({shouldUpdate:g}),T=I({id:i,ref:v,value:L});return u.jsxs(Y,{display:"flex",flexDirection:"column",children:[u.jsxs(yi,{id:i,ref:ts.reference,typed:b,active:k,disabled:e,size:s,label:o,error:n,className:t,getLabelProps:y,getToggleButtonProps:A,renderEndAdornment:p,hasItemsToSelect:B,children:[j.map(($,D)=>u.jsxs(Y,{"data-test-id":`selected-option-${$.value}-${D}`,paddingX:1.5,paddingY:"px",backgroundColor:"default1",borderColor:"default1",borderWidth:1,borderStyle:"solid",borderRadius:3,display:"flex",gap:1,alignItems:"center",...M({selectedItem:$,index:D}),children:[u.jsx(Es,{size:1,children:$.label}),!e&&u.jsx(Es,{cursor:"pointer",size:1,onClick:V=>{V.stopPropagation(),V.preventDefault(),X($)},children:"✕"})]},`selected-option-${$.value}-${D}`)),u.jsx(Y,{as:"input",className:Za({size:s,error:n}),placeholder:x.inputText,disabled:e,width:0,__flex:1,minWidth:7,visibility:K?"visible":"hidden",...T,...C,onChange:T.onChange&&so(T.onChange)})]}),u.jsx(et,{asChild:!0,style:Z,children:u.jsx(Y,{position:"relative",display:g?"block":"none",className:ft({size:s}),children:u.jsxs(Ls,{as:"ul",className:it,...m({ref:ts.floating}),children:[g&&(E==null?void 0:E.map(($,D)=>u.jsx(Ls.Item,{"data-test-id":"select-option",disabled:$.disabled,className:Ne,active:P===D,...R({item:$,index:D}),children:u.jsx(Es,{color:$.disabled?"defaultDisabled":void 0,size:lt(s),children:$.label})},`to-select-${i}-${$.value}-${D}`))),g&&!B&&_]})})}),f&&u.jsx(nt,{size:s,error:n,children:f})]})},Ya=a.forwardRef(_b),hb=Object.assign(Ya,{NoOptions:Le}),bb=({size:s,disabled:e=!1,className:t,label:o,id:i,error:n=!1,helperText:f,options:l,onChange:r,renderEndAdornment:p,value:c=[],onInputValueChange:d,loading:h,onFocus:_,onBlur:x,locale:C,children:v,onScrollEnd:k,...b},g)=>{const{active:y,typed:m,isOpen:I,getLabelProps:P,getMenuProps:R,getInputProps:E,highlightedIndex:j,getItemProps:M,itemsToSelect:L,selectedItems:X,getSelectedItemProps:A,inputValue:B,removeSelectedItem:K,getToggleButtonProps:ts,hasItemsToSelect:Z,showInput:T}=Ua({selectedValues:c,showEmptyState:Te(v),onInputValueChange:d,options:l,onChange:r,onFocus:_,onBlur:x}),{refs:$,floatingStyles:D}=rt({shouldUpdate:I}),V=Hl(k),N=E({id:i,ref:g,value:B});return u.jsxs(Y,{display:"flex",flexDirection:"column",children:[u.jsxs(yi,{ref:$.reference,id:i,typed:m,active:y,disabled:e,size:s,label:o,error:n,className:t,getLabelProps:P,getToggleButtonProps:ts,renderEndAdornment:p,hasItemsToSelect:Z,children:[X.map((O,H)=>u.jsxs(Y,{"data-test-id":`selected-option-${O.value}-${H}`,paddingX:1.5,paddingY:"px",backgroundColor:"default1",borderColor:"default1",borderWidth:1,borderStyle:"solid",borderRadius:3,display:"flex",gap:1,alignItems:"center",...A({selectedItem:O,index:H}),children:[u.jsx(Es,{size:1,children:O.label}),!e&&u.jsx(Es,{cursor:"pointer",size:1,onClick:z=>{z.stopPropagation(),z.preventDefault(),K(O)},children:"✕"})]},`selected-option-${O.value}-${H}`)),u.jsx(Y,{as:"input",className:Za({size:s,error:n}),placeholder:(C==null?void 0:C.placeholderText)||"Add item",disabled:e,width:0,__flex:1,minWidth:7,visibility:T?"visible":"hidden",...N,...b,onChange:N.onChange&&so(N.onChange)})]}),u.jsx(et,{asChild:!0,style:D,children:u.jsx(Y,{position:"relative",display:Xt({isOpen:I,loading:h,hasItemsToSelect:Z,disabled:e,showEmptyState:Te(v)}),className:ft({size:s}),children:u.jsxs(Ls,{as:"ul",className:it,...R({ref:$.floating}),children:[I&&(L==null?void 0:L.map((O,H)=>u.jsx(Ls.Item,{"data-test-id":"select-option",className:Ne,active:j===H,...M({item:O,index:H,disabled:O.disabled}),children:u.jsx(Es,{color:O.disabled?"defaultDisabled":void 0,size:lt(s),children:O.label})},`to-select-${i}-${O.value}-${H}`))),I&&!h&&!Z&&v,h&&u.jsx($f,{size:s,children:(C==null?void 0:C.loadingText)||"Loading"}),u.jsx("div",{ref:O=>{V.current=O}})]})})}),f&&u.jsx(nt,{size:s,error:n,children:f})]})},mb=a.forwardRef(bb),vb=Object.assign(mb,{NoOptions:Le}),Ga=a.forwardRef(({...s},e)=>u.jsx(Es,{ref:e,display:"block",as:"p","data-macaw-ui-component":"Paragraph",...s}));Ga.displayName="Paragraph";const Xa="Popover",[Ja]=Ws(Xa,[He]),ut=He(),[Cb,me]=Ja(Xa),gb=s=>{const{__scopePopover:e,children:t,open:o,defaultOpen:i,onOpenChange:n,modal:f=!1}=s,l=ut(e),r=a.useRef(null),[p,c]=a.useState(!1),[d=!1,h]=Us({prop:o,defaultProp:i,onChange:n});return a.createElement(hi,l,a.createElement(Cb,{scope:e,contentId:Js(),triggerRef:r,open:d,onOpenChange:h,onOpenToggle:a.useCallback(()=>h(_=>!_),[h]),hasCustomAnchor:p,onCustomAnchorAdd:a.useCallback(()=>c(!0),[]),onCustomAnchorRemove:a.useCallback(()=>c(!1),[]),modal:f},t))},yb="PopoverAnchor",xb=a.forwardRef((s,e)=>{const{__scopePopover:t,...o}=s,i=me(yb,t),n=ut(t),{onCustomAnchorAdd:f,onCustomAnchorRemove:l}=i;return a.useEffect(()=>(f(),()=>l()),[f,l]),a.createElement(ro,S({},n,o,{ref:e}))}),kb="PopoverTrigger",wb=a.forwardRef((s,e)=>{const{__scopePopover:t,...o}=s,i=me(kb,t),n=ut(t),f=xs(e,i.triggerRef),l=a.createElement(Cs.button,S({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":er(i.open)},o,{ref:f,onClick:is(s.onClick,i.onOpenToggle)}));return i.hasCustomAnchor?l:a.createElement(ro,S({asChild:!0},n),l)}),Qa="PopoverPortal",[$b,Ib]=Ja(Qa,{forceMount:void 0}),Eb=s=>{const{__scopePopover:e,forceMount:t,children:o,container:i}=s,n=me(Qa,e);return a.createElement($b,{scope:e,forceMount:t},a.createElement(zs,{present:t||n.open},a.createElement(fo,{asChild:!0,container:i},o)))},Ge="PopoverContent",Rb=a.forwardRef((s,e)=>{const t=Ib(Ge,s.__scopePopover),{forceMount:o=t.forceMount,...i}=s,n=me(Ge,s.__scopePopover);return a.createElement(zs,{present:o||n.open},n.modal?a.createElement(Pb,S({},i,{ref:e})):a.createElement(Sb,S({},i,{ref:e})))}),Pb=a.forwardRef((s,e)=>{const t=me(Ge,s.__scopePopover),o=a.useRef(null),i=xs(e,o),n=a.useRef(!1);return a.useEffect(()=>{const f=o.current;if(f)return ui(f)},[]),a.createElement(ao,{as:ke,allowPinchZoom:!0},a.createElement(sr,S({},s,{ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:is(s.onCloseAutoFocus,f=>{var l;f.preventDefault(),n.current||(l=t.triggerRef.current)===null||l===void 0||l.focus()}),onPointerDownOutside:is(s.onPointerDownOutside,f=>{const l=f.detail.originalEvent,r=l.button===0&&l.ctrlKey===!0,p=l.button===2||r;n.current=p},{checkForDefaultPrevented:!1}),onFocusOutside:is(s.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})))}),Sb=a.forwardRef((s,e)=>{const t=me(Ge,s.__scopePopover),o=a.useRef(!1),i=a.useRef(!1);return a.createElement(sr,S({},s,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{var f;if((f=s.onCloseAutoFocus)===null||f===void 0||f.call(s,n),!n.defaultPrevented){var l;o.current||(l=t.triggerRef.current)===null||l===void 0||l.focus(),n.preventDefault()}o.current=!1,i.current=!1},onInteractOutside:n=>{var f,l;(f=s.onInteractOutside)===null||f===void 0||f.call(s,n),n.defaultPrevented||(o.current=!0,n.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const r=n.target;((l=t.triggerRef.current)===null||l===void 0?void 0:l.contains(r))&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&i.current&&n.preventDefault()}}))}),sr=a.forwardRef((s,e)=>{const{__scopePopover:t,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:n,disableOutsidePointerEvents:f,onEscapeKeyDown:l,onPointerDownOutside:r,onFocusOutside:p,onInteractOutside:c,...d}=s,h=me(Ge,t),_=ut(t);return ci(),a.createElement(di,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:n},a.createElement(io,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:c,onEscapeKeyDown:l,onPointerDownOutside:r,onFocusOutside:p,onDismiss:()=>h.onOpenChange(!1)},a.createElement(bi,S({"data-state":er(h.open),role:"dialog",id:h.contentId},_,d,{ref:e,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))}),Db="PopoverClose",jb=a.forwardRef((s,e)=>{const{__scopePopover:t,...o}=s,i=me(Db,t);return a.createElement(Cs.button,S({type:"button"},o,{ref:e,onClick:is(s.onClick,()=>i.onOpenChange(!1))}))}),Ob=a.forwardRef((s,e)=>{const{__scopePopover:t,...o}=s,i=ut(t);return a.createElement(va,S({},i,o,{ref:e}))});function er(s){return s?"open":"closed"}const Tb=gb,Mb=xb,Vb=wb,Ab=Eb,Nb=Rb,Lb=jb,Wb=Ob;var zb="_1t0scx21",Hb="_18fs8ps1mc _18fs8ps1mi _18fs8ps1m0 _18fs8ps1m6 _18fs8ps1gl _18fs8ps1fo _18fs8ps1if _18fs8ps1hi _18fs8ps25i _18fs8ps226 _18fs8ps3vi _18fs8ps3qi";const tr=({children:s,className:e,onInteractOutside:t,...o})=>u.jsx(Ab,{children:u.jsx(Nb,{asChild:!0,className:rs(Hb,e),"data-macaw-ui-component":"Popover.Content",onInteractOutside:t,...o,children:s})});tr.displayName="Popover.Content";const or=({children:s})=>u.jsx(Mb,{asChild:!0,"data-macaw-ui-component":"Popover.Anchor",children:s});or.displayName="Popover.Anchor";const nr=({children:s})=>u.jsx(Vb,{asChild:!0,"data-macaw-ui-component":"Popover.Trigger",children:s});nr.displayName="Popover.Trigger";const ir=({className:s,fill:e="default2",stroke:t="default1"})=>u.jsx(Wb,{className:rs(zb,s),asChild:!0,children:u.jsx("svg",{width:"20",height:"9",viewBox:"0 0 20 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-macaw-ui-component":"Popover.Arrow",children:u.jsx("path",{d:"M8.08579 7.08579L0.5 -0.5H18.5L10.9142 7.08579C10.1332 7.86683 8.86684 7.86684 8.08579 7.08579Z",strokeLinejoin:"round",className:Ys({fill:e,stroke:t})})})});ir.displayName="Popover.Arrow";const fr=({children:s,...e})=>u.jsx(Tb,{...e,"data-macaw-ui-component":"Popover",children:s});fr.displayName="Popover";const lr=({children:s})=>u.jsx(Lb,{asChild:!0,"data-macaw-ui-component":"Popover.Close",children:s});lr.displayName="Popover.Close";const qb=Object.assign(fr,{Trigger:nr,Content:tr,Anchor:or,Arrow:ir,Close:lr}),ar="Radio",[Fb,rr]=Ws(ar),[Kb,Bb]=Fb(ar),Zb=a.forwardRef((s,e)=>{const{__scopeRadio:t,name:o,checked:i=!1,required:n,disabled:f,value:l="on",onCheck:r,...p}=s,[c,d]=a.useState(null),h=xs(e,C=>d(C)),_=a.useRef(!1),x=c?!!c.closest("form"):!0;return a.createElement(Kb,{scope:t,checked:i,disabled:f},a.createElement(Cs.button,S({type:"button",role:"radio","aria-checked":i,"data-state":pr(i),"data-disabled":f?"":void 0,disabled:f,value:l},p,{ref:h,onClick:is(s.onClick,C=>{i||r==null||r(),x&&(_.current=C.isPropagationStopped(),_.current||C.stopPropagation())})})),x&&a.createElement(Gb,{control:c,bubbles:!_.current,name:o,value:l,checked:i,required:n,disabled:f,style:{transform:"translateX(-100%)"}}))}),Ub="RadioIndicator",Yb=a.forwardRef((s,e)=>{const{__scopeRadio:t,forceMount:o,...i}=s,n=Bb(Ub,t);return a.createElement(zs,{present:o||n.checked},a.createElement(Cs.span,S({"data-state":pr(n.checked),"data-disabled":n.disabled?"":void 0},i,{ref:e})))}),Gb=s=>{const{control:e,checked:t,bubbles:o=!0,...i}=s,n=a.useRef(null),f=vf(t),l=cn(e);return a.useEffect(()=>{const r=n.current,p=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==t&&d){const h=new Event("click",{bubbles:o});d.call(r,t),r.dispatchEvent(h)}},[f,t,o]),a.createElement("input",S({type:"radio","aria-hidden":!0,defaultChecked:t},i,{tabIndex:-1,ref:n,style:{...s.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function pr(s){return s?"checked":"unchecked"}const Xb=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],dr="RadioGroup",[Jb]=Ws(dr,[po,rr]),cr=po(),ur=rr(),[Qb,s2]=Jb(dr),e2=a.forwardRef((s,e)=>{const{__scopeRadioGroup:t,name:o,defaultValue:i,value:n,required:f=!1,disabled:l=!1,orientation:r,dir:p,loop:c=!0,onValueChange:d,...h}=s,_=cr(t),x=Bt(p),[C,v]=Us({prop:n,defaultProp:i,onChange:d});return a.createElement(Qb,{scope:t,name:o,required:f,disabled:l,value:C,onValueChange:v},a.createElement(ya,S({asChild:!0},_,{orientation:r,dir:x,loop:c}),a.createElement(Cs.div,S({role:"radiogroup","aria-required":f,"aria-orientation":r,"data-disabled":l?"":void 0,dir:x},h,{ref:e}))))}),t2="RadioGroupItem",o2=a.forwardRef((s,e)=>{const{__scopeRadioGroup:t,disabled:o,...i}=s,n=s2(t2,t),f=n.disabled||o,l=cr(t),r=ur(t),p=a.useRef(null),c=xs(e,p),d=n.value===i.value,h=a.useRef(!1);return a.useEffect(()=>{const _=C=>{Xb.includes(C.key)&&(h.current=!0)},x=()=>h.current=!1;return document.addEventListener("keydown",_),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",_),document.removeEventListener("keyup",x)}},[]),a.createElement(xa,S({asChild:!0},l,{focusable:!f,active:d}),a.createElement(Zb,S({disabled:f,required:n.required,checked:d},r,i,{name:n.name,ref:c,onCheck:()=>n.onValueChange(i.value),onKeyDown:is(_=>{_.key==="Enter"&&_.preventDefault()}),onFocus:is(i.onFocus,()=>{var _;h.current&&((_=p.current)===null||_===void 0||_.click())})})))}),n2=a.forwardRef((s,e)=>{const{__scopeRadioGroup:t,...o}=s,i=ur(t);return a.createElement(Yb,S({},i,o,{ref:e}))}),_r=e2,hr=o2,i2=n2;var f2="_18fs8ps2ru _18fs8ps31i _18fs8ps28i _18fs8ps2i6 _18fs8psul _18fs8psx3 _18fs8pszl _18fs8ps123 _18fs8ps1m9 _18fs8ps1mf _18fs8ps1lx _18fs8ps1m3",l2=ks({defaultClassName:"_18fs8ps2ru _18fs8ps31i _18fs8ps28i _18fs8ps2i6 _18fs8psul _18fs8psx3 _18fs8pszl _18fs8ps123",variantClassNames:{size:{small:"_18fs8ps1j6 _18fs8ps1nf _18fs8ps1ko",medium:"_18fs8ps1j9 _18fs8ps1ni _18fs8ps1kr",large:"_18fs8ps1jc _18fs8ps1nl _18fs8ps1ku"},disabled:{true:"_18fs8ps3ei"},error:{true:"_18fs8ps3di",false:"_18fs8ps3e6"}},defaultVariants:{size:"medium"},compoundVariants:[]});const br=a.forwardRef(({children:s,className:e,value:t,label:o,onValueChange:i,size:n,disabled:f=!1,error:l=!1,...r},p)=>u.jsx(_r,{asChild:!0,value:t,onValueChange:i,children:u.jsxs(Y,{...r,className:rs(f2,e),ref:p,as:"fieldset","data-macaw-ui-component":"RadioGroup",children:[o&&u.jsx("legend",{className:rs(l2({disabled:f,error:l,size:n}),e),children:o}),s]})}));br.displayName="RadioGroup";var a2=ks({defaultClassName:"_18fs8ps1qf _18fs8ps1su _18fs8ps1v9 _18fs8ps1xo _18fs8ps2u _18fs8psf _18fs8ps1zc",variantClassNames:{disabled:{true:"_18fs8ps3ei",false:"_18fs8ps3c6"}},defaultVariants:{disabled:!1},compoundVariants:[]}),r2=ks({defaultClassName:"_1ru9wzg7 _18fs8ps2ru _18fs8ps31i _18fs8ps28i _18fs8ps2i6 _18fs8ps1mc _18fs8ps1mi _18fs8ps1m0 _18fs8ps1m6 _18fs8ps1h9 _18fs8ps1gc _18fs8ps1j3 _18fs8ps1i6 _18fs8ps2r _18fs8ps3v6 _18fs8ps226 _18fs8ps3ti _18fs8ps25i _18fs8ps14u _18fs8ps17f _18fs8ps3p6 _18fs8ps2c",variantClassNames:{error:{true:"_1ru9wzg8"},disabled:{true:"_1ru9wzg9"}},defaultVariants:{error:!1,disabled:!1},compoundVariants:[]});const xi=a.forwardRef(({disabled:s,asChild:e},t)=>u.jsx(i2,{className:a2({disabled:s}),asChild:e,ref:t,children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"6",height:"6",fill:"currentColor",children:u.jsx("circle",{cx:"3",cy:"3",r:"3",fill:"currentColor"})})}));xi.displayName="RadioGroupIndicator";const mr=a.forwardRef(({value:s,id:e,disabled:t,children:o,className:i,error:n,...f},l)=>u.jsxs(Y,{display:"flex",alignItems:"center",gap:1.5,position:"relative",...f,className:i,ref:l,"data-macaw-ui-component":"RadioGroup.Item",children:[u.jsx(hr,{className:r2({error:n,disabled:t}),value:s,id:e,disabled:t,children:u.jsx(xi,{disabled:t,asChild:!0})}),u.jsx(Y,{as:"label",htmlFor:e,cursor:t?"not-allowed":"pointer",children:o})]}));mr.displayName="RadioGroup.Item";const p2=Object.assign(br,{Item:mr,Indicator:xi}),vr=a.forwardRef(({value:s=["",""],onChange:e,children:t,type:o="number",...i},n)=>{const[f,l]=s;return u.jsxs(u.Fragment,{children:[u.jsx(Kt,{value:f,onChange:r=>e==null?void 0:e([r.target.value,l]),type:o,ref:n,"data-macaw-ui-component":"RangeInput",...i}),t,u.jsx(Kt,{value:l,onChange:r=>e==null?void 0:e([f,r.target.value]),type:o,ref:n,"data-macaw-ui-component":"RangeInput",...i})]})});vr.displayName="RangeInput";var d2=ks({defaultClassName:"_18fs8ps2ru _18fs8ps31i _18fs8ps28i _18fs8ps2i6 _18fs8ps1m9 _18fs8ps1mf _18fs8ps1lx _18fs8ps1m3 _18fs8ps170 _18fs8ps3si _18fs8ps1n9 _18fs8ps3du _18fs8ps3ec _18fs8ps3ed",variantClassNames:{},defaultVariants:{},compoundVariants:[]}),c2=ks({defaultClassName:"_18fs8ps1gl _18fs8ps1fo _18fs8ps1if _18fs8ps1hi _18fs8ps2r _18fs8ps3 _18fs8ps10 _18fs8ps3du _18fs8ps170 _18fs8ps3x6 _18fs8ps3p6 _18fs8ps3pv _18fs8ps3pl",variantClassNames:{size:{small:"_18fs8ps296 _18fs8ps2iu _18fs8ps30i _18fs8ps3a6",medium:"_18fs8ps296 _18fs8ps2iu _18fs8ps2si _18fs8ps326",large:"_18fs8ps29i _18fs8ps2j6 _18fs8ps2su _18fs8ps32i"}},defaultVariants:{},compoundVariants:[]}),u2=ks({defaultClassName:"_18fs8ps3e6 _18fs8ps129",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const Cr=a.forwardRef(({id:s,className:e,size:t,...o},i)=>u.jsxs(Y,{id:s,className:rs(c2({size:t}),e),"data-macaw-ui-component":"SearchInput",children:[u.jsx(_f,{size:"medium",className:u2()}),u.jsx(Y,{as:"input",className:d2(),ref:i,type:"text",...o})]}));Cr.displayName="SearchInput";const gr=({id:s,label:e,className:t,error:o,children:i,getToggleButtonProps:n,getLabelProps:f,typed:l,active:r,disabled:p,size:c})=>u.jsxs(Y,{as:"label",className:rs(tt({typed:l,active:r,disabled:p,size:c,error:o}),t),alignItems:"center",justifyContent:"space-between",disabled:p,flexWrap:"nowrap",gap:3,...n(),"data-macaw-ui-component":"Select",cursor:p?"not-allowed":"pointer",children:[u.jsxs(Y,{display:"flex",flexDirection:"column",__width:"calc(100% - 30px)",children:[u.jsx(Y,{as:"span",className:rs(ot({typed:l,size:c,disabled:p,error:o})),...f({htmlFor:s}),children:e}),i]}),u.jsx(st,{className:rs(_n,Ys({cursor:"pointer"})),size:c})]});gr.displayName="SelectWrapper";const _2=({value:s,isValuePassedAsString:e,options:t,onChange:o,onFocus:i,onBlur:n})=>{const[f,l]=a.useState(!1),r=!!(s||f),{highlightedIndex:p,onHighlightedIndexChange:c}=If(t,s),{isOpen:d,getToggleButtonProps:h,getLabelProps:_,getMenuProps:x,getItemProps:C,selectedItem:v}=Nn({items:t,selectedItem:s??null,isItemDisabled:k=>(k==null?void 0:k.disabled)??!1,highlightedIndex:p,onHighlightedIndexChange(k){c(k)},itemToString:k=>(k==null?void 0:k.value)??"",onSelectedItemChange:({selectedItem:k})=>{if(k){const b=e?k.value:k;o==null||o(b)}}});return{active:f,typed:r,isOpen:d,getToggleButtonProps:(k,b)=>h({onFocus:g=>{l(!0),i==null||i(g)},onBlur:g=>{l(!1),n==null||n(g)},...k},b),getLabelProps:_,getMenuProps:x,highlightedIndex:p,getItemProps:C,selectedItem:v,hasItemsToSelect:t.length>0}},h2=s=>{switch(s){case"small":return 4;case"medium":return 5;case"large":return 6}},b2=({size:s="medium",disabled:e=!1,className:t,value:o,label:i,id:n,error:f=!1,helperText:l,options:r,onChange:p,onFocus:c,onBlur:d,startAdornment:h,endAdornment:_,children:x,...C},v)=>{const k=Ot(o),{active:b,typed:g,isOpen:y,getItemProps:m,getLabelProps:I,getToggleButtonProps:P,selectedItem:R,getMenuProps:E,highlightedIndex:j,hasItemsToSelect:M}=_2({value:k?r.find(B=>B.value===o):o,isValuePassedAsString:k,options:r,onChange:p,onFocus:c,onBlur:d}),{refs:L,floatingStyles:X}=rt({shouldUpdate:y}),A=a.useMemo(()=>f?"critical1":e?"defaultDisabled":"default1",[e,f]);return u.jsxs(Y,{display:"flex",flexDirection:"column",children:[u.jsx(gr,{id:n,typed:g,active:b,disabled:e,size:s,label:i,error:f,className:t,getLabelProps:I,getToggleButtonProps:()=>P({ref:L.reference}),children:u.jsxs(Y,{height:h2(s),...C,ref:v,display:"flex",children:[h&&g&&h(o),u.jsx(Es,{size:be(s),color:A,title:R==null?void 0:R.label,width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",children:R==null?void 0:R.label}),_&&g&&_(o)]})}),u.jsx(et,{asChild:!0,style:X,children:u.jsx(Y,{position:"relative",display:Xt({isOpen:y,disabled:e,hasItemsToSelect:M,showEmptyState:Te(x)}),className:ft({size:s}),children:u.jsxs(Ls,{as:"ul",className:it,...E({ref:L.floating}),children:[y&&(r==null?void 0:r.map((B,K)=>u.jsxs(Ls.Item,{"data-test-id":"select-option",className:Ne,disabled:B.disabled,...m({item:B,index:K}),active:j===K,children:[B==null?void 0:B.startAdornment,u.jsx(Es,{color:B.disabled?"defaultDisabled":void 0,size:lt(s),width:"100%",children:B.label}),B==null?void 0:B.endAdornment]},`${n}-${B.value}-${K}`))),y&&!M&&x]})})}),l&&u.jsx(nt,{size:s,error:f,children:l})]})},m2=a.forwardRef(b2),v2=Object.assign(m2,{NoOptions:Le});var C2="_1ucx6ny1";const g2=({className:s,...e})=>u.jsx(Y,{className:rs(C2,s),backgroundColor:"default3",width:"100%",height:3,borderRadius:2,"data-macaw-ui-component":"Skeleton",...e});var y2="u64rbw1";const ki=a.forwardRef(({className:s},e)=>u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",className:rs(y2,s),"data-macaw-ui-component":"Spinner",ref:e,children:u.jsx("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.333",children:u.jsx("path",{d:"M8 1.332v2.667M8 12v2.667M3.285 3.285l1.887 1.887M10.826 10.826l1.887 1.887M1.332 8h2.667M12 8h2.667M3.285 12.713l1.887-1.887M10.826 5.172l1.887-1.887"})})}));ki.displayName="Spinner";var x2=ks({defaultClassName:"edj57v3 _18fs8ps2s6 _18fs8ps31u _18fs8ps28u _18fs8ps2ii _18fs8ps1gi _18fs8ps1fl _18fs8ps1ic _18fs8ps1hf _18fs8ps19l _18fs8ps3ti",variantClassNames:{},defaultVariants:{},compoundVariants:[]}),k2=ks({defaultClassName:"_18fs8ps306 _18fs8ps39u _18fs8ps2gu _18fs8ps2qi _18fs8ps1gl _18fs8ps1fo _18fs8ps1if _18fs8ps1hi _18fs8ps3 _18fs8psfr _18fs8ps3qu _18fs8ps226 _18fs8ps17u",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const yr=a.forwardRef(({children:s,className:e,defaultValue:t,onValueChange:o,value:i,...n},f)=>u.jsx(_r,{asChild:!0,defaultValue:t,value:i,onValueChange:o,children:u.jsx(Y,{className:rs(k2(),e),ref:f,...n,"data-macaw-ui-component":"Switch",children:s})}));yr.displayName="Switch";const xr=({value:s,id:e,disabled:t=!1,children:o,...i})=>u.jsx(hr,{asChild:!0,value:s,id:e,disabled:t,className:x2(),"data-macaw-ui-component":"SwitchItem",children:u.jsx(Y,{...i,children:o})});xr.displayName="Switch.Item";const w2=Object.assign(yr,{Item:xr}),$2=(s,e,t,o)=>{a.useLayoutEffect(()=>{if(s){const i=V8(s,t),n=V8(s,o);s.style.height="0px";const f=Math.max(i,s.scrollHeight),l=Math.min(f,n);s.style.height=`${l}px`}},[s,e,t,o])};function V8(s,e){return s?parseFloat(getComputedStyle(s).lineHeight)*e:0}const I2=(s,e)=>{const[t,o]=a.useState(!1);return{handlers:{onFocus:()=>o(!0),onBlur:()=>o(!1),onChange:r=>{e&&e(r)}},value:s,active:t,typed:!!(s||t)}},kr=({children:s,id:e,typed:t,active:o,disabled:i,size:n,label:f,error:l,className:r,endAdornment:p})=>u.jsxs(Y,{as:"label",htmlFor:e,className:rs(tt({typed:t,active:o,disabled:i,size:n,error:l}),r),alignItems:"center",gap:1,"data-macaw-ui-component":"Textarea",children:[u.jsxs(Y,{display:"flex",flexDirection:"column",width:"100%",children:[u.jsx(Y,{as:"span",className:rs(ot({typed:t,size:n,disabled:i,error:l})),children:f}),s]}),p]});kr.displayName="TextareaWrapper";const wr=a.forwardRef(({size:s,disabled:e=!1,className:t,value:o,label:i,id:n,error:f=!1,onChange:l,helperText:r,onBlur:p,onFocus:c,flex:d,flexBasis:h,flexGrow:_,flexShrink:x,width:C,endAdornment:v,rows:k=10,maxRows:b=20,...g},y)=>{const{handlers:m,value:I,active:P,typed:R}=I2(o,l),E=a.useRef(null);return $2(E.current,o,k,b),a.useImperativeHandle(y,()=>E.current),u.jsxs(Y,{display:"flex",flexDirection:"column",flex:d,flexBasis:h,flexGrow:_,flexShrink:x,width:C,children:[u.jsx(kr,{id:n,typed:R,active:P,disabled:e,size:s,label:i,error:f,className:t,endAdornment:v,children:u.jsx(Y,{id:n,as:"textarea",className:rs(Gt({size:s,error:f})),style:{resize:"none"},disabled:e,value:I,ref:E,onBlur:j=>{m.onBlur(),p==null||p(j)},onFocus:j=>{m.onFocus(),c==null||c(j)},onChange:m.onChange,rows:k,...g})}),r&&u.jsx(Y,{className:un({size:s}),children:u.jsx(Es,{size:be(s),color:f?"critical1":"default2",children:r})})]})});wr.displayName="Textarea";const E2=a.forwardRef((s,e)=>{const{pressed:t,defaultPressed:o=!1,onPressedChange:i,...n}=s,[f=!1,l]=Us({prop:t,onChange:i,defaultProp:o});return a.createElement(Cs.button,S({type:"button","aria-pressed":f,"data-state":f?"on":"off","data-disabled":s.disabled?"":void 0},n,{ref:e,onClick:is(s.onClick,()=>{s.disabled||l(!f)})}))}),R2=E2;var P2=ks({defaultClassName:"agkfzb1 _18fs8ps2zu _18fs8ps39i _18fs8ps2gi _18fs8ps2q6 _18fs8ps1mc _18fs8ps1mi _18fs8ps1m0 _18fs8ps1m6 _18fs8ps1h3 _18fs8ps1g6 _18fs8ps1ix _18fs8ps1i0 _18fs8ps3 _18fs8ps10 _18fs8ps2r _18fs8ps1n9 _18fs8ps3ti",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const $r=a.forwardRef(({disabled:s=!1,pressed:e,onPressedChange:t,children:o,...i},n)=>u.jsxs(Y,{as:"label",display:"flex",alignItems:"center",gap:1.5,cursor:s?"not-allowed":"pointer","data-macaw-ui-component":"Toggle",children:[u.jsx(R2,{ref:n,className:P2(),pressed:e,onPressedChange:t,disabled:s,...i}),o]}));$r.displayName="Toggle";const S2=a.forwardRef((s,e)=>a.createElement(Cs.span,S({},s,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...s.style}}))),D2=S2,[uo]=Ws("Tooltip",[He]),_o=He(),j2="TooltipProvider",O2=700,en="tooltip.open",[T2,wi]=uo(j2),M2=s=>{const{__scopeTooltip:e,delayDuration:t=O2,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:n}=s,[f,l]=a.useState(!0),r=a.useRef(!1),p=a.useRef(0);return a.useEffect(()=>{const c=p.current;return()=>window.clearTimeout(c)},[]),a.createElement(T2,{scope:e,isOpenDelayed:f,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(p.current),l(!1)},[]),onClose:a.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>l(!0),o)},[o]),isPointerInTransitRef:r,onPointerInTransitChange:a.useCallback(c=>{r.current=c},[]),disableHoverableContent:i},n)},$i="Tooltip",[V2,_t]=uo($i),A2=s=>{const{__scopeTooltip:e,children:t,open:o,defaultOpen:i=!1,onOpenChange:n,disableHoverableContent:f,delayDuration:l}=s,r=wi($i,s.__scopeTooltip),p=_o(e),[c,d]=a.useState(null),h=Js(),_=a.useRef(0),x=f??r.disableHoverableContent,C=l??r.delayDuration,v=a.useRef(!1),[k=!1,b]=Us({prop:o,defaultProp:i,onChange:P=>{P?(r.onOpen(),document.dispatchEvent(new CustomEvent(en))):r.onClose(),n==null||n(P)}}),g=a.useMemo(()=>k?v.current?"delayed-open":"instant-open":"closed",[k]),y=a.useCallback(()=>{window.clearTimeout(_.current),v.current=!1,b(!0)},[b]),m=a.useCallback(()=>{window.clearTimeout(_.current),b(!1)},[b]),I=a.useCallback(()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>{v.current=!0,b(!0)},C)},[C,b]);return a.useEffect(()=>()=>window.clearTimeout(_.current),[]),a.createElement(hi,p,a.createElement(V2,{scope:e,contentId:h,open:k,stateAttribute:g,trigger:c,onTriggerChange:d,onTriggerEnter:a.useCallback(()=>{r.isOpenDelayed?I():y()},[r.isOpenDelayed,I,y]),onTriggerLeave:a.useCallback(()=>{x?m():window.clearTimeout(_.current)},[m,x]),onOpen:y,onClose:m,disableHoverableContent:x},t))},A8="TooltipTrigger",N2=a.forwardRef((s,e)=>{const{__scopeTooltip:t,...o}=s,i=_t(A8,t),n=wi(A8,t),f=_o(t),l=a.useRef(null),r=xs(e,l,i.onTriggerChange),p=a.useRef(!1),c=a.useRef(!1),d=a.useCallback(()=>p.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),a.createElement(ro,S({asChild:!0},f),a.createElement(Cs.button,S({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},o,{ref:r,onPointerMove:is(s.onPointerMove,h=>{h.pointerType!=="touch"&&!c.current&&!n.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:is(s.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:is(s.onPointerDown,()=>{p.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:is(s.onFocus,()=>{p.current||i.onOpen()}),onBlur:is(s.onBlur,i.onClose),onClick:is(s.onClick,i.onClose)})))}),Ir="TooltipPortal",[L2,W2]=uo(Ir,{forceMount:void 0}),z2=s=>{const{__scopeTooltip:e,forceMount:t,children:o,container:i}=s,n=_t(Ir,e);return a.createElement(L2,{scope:e,forceMount:t},a.createElement(zs,{present:t||n.open},a.createElement(fo,{asChild:!0,container:i},o)))},Xe="TooltipContent",H2=a.forwardRef((s,e)=>{const t=W2(Xe,s.__scopeTooltip),{forceMount:o=t.forceMount,side:i="top",...n}=s,f=_t(Xe,s.__scopeTooltip);return a.createElement(zs,{present:o||f.open},f.disableHoverableContent?a.createElement(Er,S({side:i},n,{ref:e})):a.createElement(q2,S({side:i},n,{ref:e})))}),q2=a.forwardRef((s,e)=>{const t=_t(Xe,s.__scopeTooltip),o=wi(Xe,s.__scopeTooltip),i=a.useRef(null),n=xs(e,i),[f,l]=a.useState(null),{trigger:r,onClose:p}=t,c=i.current,{onPointerInTransitChange:d}=o,h=a.useCallback(()=>{l(null),d(!1)},[d]),_=a.useCallback((x,C)=>{const v=x.currentTarget,k={x:x.clientX,y:x.clientY},b=U2(k,v.getBoundingClientRect()),g=Y2(k,b),y=G2(C.getBoundingClientRect()),m=J2([...g,...y]);l(m),d(!0)},[d]);return a.useEffect(()=>()=>h(),[h]),a.useEffect(()=>{if(r&&c){const x=v=>_(v,c),C=v=>_(v,r);return r.addEventListener("pointerleave",x),c.addEventListener("pointerleave",C),()=>{r.removeEventListener("pointerleave",x),c.removeEventListener("pointerleave",C)}}},[r,c,_,h]),a.useEffect(()=>{if(f){const x=C=>{const v=C.target,k={x:C.clientX,y:C.clientY},b=(r==null?void 0:r.contains(v))||(c==null?void 0:c.contains(v)),g=!X2(k,f);b?h():g&&(h(),p())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[r,c,f,p,h]),a.createElement(Er,S({},s,{ref:n}))}),[F2,K2]=uo($i,{isInside:!1}),Er=a.forwardRef((s,e)=>{const{__scopeTooltip:t,children:o,"aria-label":i,onEscapeKeyDown:n,onPointerDownOutside:f,...l}=s,r=_t(Xe,t),p=_o(t),{onClose:c}=r;return a.useEffect(()=>(document.addEventListener(en,c),()=>document.removeEventListener(en,c)),[c]),a.useEffect(()=>{if(r.trigger){const d=h=>{const _=h.target;_!=null&&_.contains(r.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[r.trigger,c]),a.createElement(io,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:n,onPointerDownOutside:f,onFocusOutside:d=>d.preventDefault(),onDismiss:c},a.createElement(bi,S({"data-state":r.stateAttribute},p,l,{ref:e,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),a.createElement(L8,null,o),a.createElement(F2,{scope:t,isInside:!0},a.createElement(D2,{id:r.contentId,role:"tooltip"},i||o))))}),B2="TooltipArrow",Z2=a.forwardRef((s,e)=>{const{__scopeTooltip:t,...o}=s,i=_o(t);return K2(B2,t).isInside?null:a.createElement(va,S({},i,o,{ref:e}))});function U2(s,e){const t=Math.abs(e.top-s.y),o=Math.abs(e.bottom-s.y),i=Math.abs(e.right-s.x),n=Math.abs(e.left-s.x);switch(Math.min(t,o,i,n)){case n:return"left";case i:return"right";case t:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Y2(s,e,t=5){const o=[];switch(e){case"top":o.push({x:s.x-t,y:s.y+t},{x:s.x+t,y:s.y+t});break;case"bottom":o.push({x:s.x-t,y:s.y-t},{x:s.x+t,y:s.y-t});break;case"left":o.push({x:s.x+t,y:s.y-t},{x:s.x+t,y:s.y+t});break;case"right":o.push({x:s.x-t,y:s.y-t},{x:s.x-t,y:s.y+t});break}return o}function G2(s){const{top:e,right:t,bottom:o,left:i}=s;return[{x:i,y:e},{x:t,y:e},{x:t,y:o},{x:i,y:o}]}function X2(s,e){const{x:t,y:o}=s;let i=!1;for(let n=0,f=e.length-1;n<e.length;f=n++){const l=e[n].x,r=e[n].y,p=e[f].x,c=e[f].y;r>o!=c>o&&t<(p-l)*(o-r)/(c-r)+l&&(i=!i)}return i}function J2(s){const e=s.slice();return e.sort((t,o)=>t.x<o.x?-1:t.x>o.x?1:t.y<o.y?-1:t.y>o.y?1:0),Q2(e)}function Q2(s){if(s.length<=1)return s.slice();const e=[];for(let o=0;o<s.length;o++){const i=s[o];for(;e.length>=2;){const n=e[e.length-1],f=e[e.length-2];if((n.x-f.x)*(i.y-f.y)>=(n.y-f.y)*(i.x-f.x))e.pop();else break}e.push(i)}e.pop();const t=[];for(let o=s.length-1;o>=0;o--){const i=s[o];for(;t.length>=2;){const n=t[t.length-1],f=t[t.length-2];if((n.x-f.x)*(i.y-f.y)>=(n.y-f.y)*(i.x-f.x))t.pop();else break}t.push(i)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}const sm=M2,em=A2,tm=N2,om=z2,nm=H2,im=Z2,Rr=({children:s,delayDuration:e=250,...t})=>u.jsx(sm,{children:u.jsx(em,{delayDuration:e,...t,"data-macaw-ui-component":"Tooltip",children:s})});Rr.displayName="Tooltip";const Pr=a.forwardRef(({children:s},e)=>u.jsx(tm,{asChild:!0,ref:e,"data-macaw-ui-component":"Tooltip.Trigger",children:s}));Pr.displayName="Tooltip.Trigger";var fm="_14kl90y0";const Sr=({className:s,backgroundColor:e=Be.colors.background.default1,borderColor:t=Be.colors.border.default1})=>u.jsx(im,{asChild:!0,className:rs(fm,s),children:u.jsx("svg",{width:"20",height:"9",viewBox:"0 0 20 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-macaw-ui-component":"Tooltip.Arrow",children:u.jsx("path",{fill:e,stroke:t,d:"M8.086 7.086.5-.5h18l-7.586 7.586a2 2 0 0 1-2.828 0Z"})})});Sr.displayName="Tooltip.Arrow";const Dr=({children:s,className:e,sideOffset:t=2,avoidCollisions:o=!0,...i})=>u.jsx(om,{children:u.jsx(nm,{asChild:!0,className:e,sideOffset:t,avoidCollisions:o,"data-macaw-ui-component":"Tooltip.Content",...i,children:u.jsx(Y,{borderStyle:s?"solid":"none",borderWidth:1,borderRadius:3,borderColor:"default1",padding:s?4:0,fontSize:1,lineHeight:1,color:"default1",backgroundColor:"default1",boxShadow:"defaultOverlay",children:s})})});Dr.displayName="Tooltip.Content";const jr=({children:s})=>u.jsx(Es,{display:"block",size:1,color:"default2",marginBottom:.5,"data-macaw-ui-component":"Tooltip.ContentHeading",children:s});jr.displayName="Tooltip.ContentHeading";const lm=Object.assign(Rr,{Trigger:Pr,Arrow:Sr,Content:Dr,ContentHeading:jr});exports.Accordion=id;exports.ArrowDownIcon=st;exports.ArrowLeftIcon=dp;exports.ArrowRightIcon=cp;exports.ArrowUpIcon=up;exports.Avatar=ld;exports.Backdrop=Yt;exports.Box=Y;exports.Button=Qe;exports.CatalogIcon=_p;exports.Checkbox=kf;exports.CheckboxIcon=hp;exports.ChervonDoubleIcon=bp;exports.ChervonDownIcon=dn;exports.ChervonUpIcon=mp;exports.ChevronLeftIcon=vp;exports.ChevronRightIcon=Cp;exports.Chip=wf;exports.CloseIcon=uf;exports.Combobox=mu;exports.ConfigurationIcon=gp;exports.CopyIcon=yp;exports.CustomersIcon=xp;exports.DarkModeIcon=kp;exports.DashboardIcon=wp;exports.Divider=ql;exports.Drawer=P_;exports.Dropdown=Xh;exports.DropdownButton=Ma;exports.DynamicCombobox=gu;exports.DynamicMultiselect=vb;exports.EditIcon=$p;exports.EnvironmentIcon=Ip;exports.ExportIcon=Ep;exports.ExternalLinkIcon=Rp;exports.FileExportIcon=Pp;exports.FloppyDiscIcon=Sp;exports.FullscreenOffIcon=Dp;exports.FullscreenOnIcon=jp;exports.GenericAppIcon=Op;exports.GraphQLIcon=Tp;exports.GripIcon=Mp;exports.HelpIcon=Vp;exports.HomeIcon=Ap;exports.InfoIcon=Np;exports.Input=Kt;exports.LightModeIcon=Lp;exports.List=Ls;exports.MailIcon=Wp;exports.MarketplaceIcon=zp;exports.MenuIcon=Hp;exports.Modal=pb;exports.MoreOptionsIcon=qp;exports.Multiselect=hb;exports.MultiselectRoot=Ya;exports.OrdersIcon=Fp;exports.Paragraph=Ga;exports.PlusIcon=Kp;exports.Popover=qb;exports.ProductsIcons=Bp;exports.RadioGroup=p2;exports.RangeInput=vr;exports.RemoveIcon=Zp;exports.SearchIcon=_f;exports.SearchInput=Cr;exports.Select=v2;exports.SellsIcon=Up;exports.Skeleton=g2;exports.Spinner=ki;exports.StorefrontIcon=Yp;exports.Switch=w2;exports.TableEditIcon=Gp;exports.Text=Es;exports.Textarea=wr;exports.ThemeProvider=K1;exports.Toggle=$r;exports.Tooltip=lm;exports.TranslationsIcon=Xp;exports.TrashBinIcon=Jp;exports.ViewListIcon=Qp;exports.ViewTableIcon=sd;exports.ViewTilesIcon=ed;exports.ViewWideTilesIcon=td;exports.VouchersIcon=od;exports.WarningIcon=nd;exports.convertSizeToScale=be;exports.desktopMediaQuery=Q1;exports.getCSSVariables=sp;exports.sprinkles=Ys;exports.tabletMediaQuery=J1;exports.themes=jt;exports.useTheme=F1;exports.vars=Be;
|
|
101
101
|
//# sourceMappingURL=index.js.map
|