@isardsat/editorial-admin 6.8.1 → 6.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/build/client/assets/ColorPicker-IW3vBXSN.js +1 -0
  2. package/build/client/assets/{FilePicker-Dz8c54TL.js → FilePicker-CH7xRnml.js} +1 -1
  3. package/build/client/assets/Loading-BhRjqdjg.js +6 -0
  4. package/build/client/assets/{URLInput-DH_lMq0v.js → URLInput-DY9DAWXz.js} +1 -1
  5. package/build/client/assets/{authSlice-FAgJOb9-.js → authSlice-d1KLksEc.js} +1 -1
  6. package/build/client/assets/circle-check-94P8iWMg.js +6 -0
  7. package/build/client/assets/{popover-XcLgQriX.js → clear-button-CwpymKyn.js} +2 -2
  8. package/build/client/assets/dashboard._collection-ECb0L7dZ.js +21 -0
  9. package/build/client/assets/{dashboard._collection._document-B3AOGU8C.js → dashboard._collection._document-C5QNRGhd.js} +1 -1
  10. package/build/client/assets/{dashboard._collection.new-BW-ZAJip.js → dashboard._collection.new-wj-L1Zs-.js} +1 -1
  11. package/build/client/assets/dashboard._layout-Bes144Yl.js +46 -0
  12. package/build/client/assets/date-picker-Bf3MUdjK.js +1 -0
  13. package/build/client/assets/datetime-picker-xfRCBls_.js +1 -0
  14. package/build/client/assets/{home-2MvDOH1R.js → home-Df-x8RAj.js} +1 -1
  15. package/build/client/assets/{index-Cia-K30j.js → index-4XG4HPxE.js} +1 -1
  16. package/build/client/assets/{index-CeH3aQ97.js → index-8UmwgoSB.js} +1 -1
  17. package/build/client/assets/index-BTe_3Ala.js +1 -0
  18. package/build/client/assets/{index-CLyLx4as.js → index-BuTy8eAk.js} +1 -1
  19. package/build/client/assets/{index-Cac4seBf.js → index-DWHslogn.js} +1 -1
  20. package/build/client/assets/itemForm-BAe4tE4w.js +15 -0
  21. package/build/client/assets/manifest-713d5bf8.js +1 -0
  22. package/build/client/assets/{markdownEditor-DZFKAkij.js → markdownEditor-B3_ygKXr.js} +1 -1
  23. package/build/client/assets/root-BdZpxusE.css +1 -0
  24. package/build/client/assets/root-CL9mhJVP.js +16 -0
  25. package/build/client/assets/schemas-DZfv8pS7.js +26 -0
  26. package/build/client/assets/tslib.es6-Dilv5nzk.js +6 -0
  27. package/build/client/index.html +2 -2
  28. package/package.json +3 -3
  29. package/build/client/assets/Loading-Cmzaj2IX.js +0 -11
  30. package/build/client/assets/dashboard._collection-BXUAkXwc.js +0 -26
  31. package/build/client/assets/dashboard._layout-BX8LOtqt.js +0 -46
  32. package/build/client/assets/date-picker-C8mstx6s.js +0 -1
  33. package/build/client/assets/datetime-picker-BcO0X0Bx.js +0 -1
  34. package/build/client/assets/itemForm-Dvaq0cdf.js +0 -13
  35. package/build/client/assets/manifest-74ce05ca.js +0 -1
  36. package/build/client/assets/root-BctYpWwq.css +0 -1
  37. package/build/client/assets/root-CoE_iPwC.js +0 -1
  38. package/build/client/assets/schemas-Btr8ThQu.js +0 -25
  39. package/build/client/assets/tslib.es6-De9GV7Vy.js +0 -1
@@ -0,0 +1 @@
1
+ import{p as r}from"./chunk-EF7DTUVF-CaKisB5m.js";import{B as l}from"./button-CLU225WL.js";import{P as n,a as p,f as c,C as f,b as u,c as x}from"./clear-button-CwpymKyn.js";import{a as d}from"./utils-CZqhhZtB.js";import{C as j}from"./calendar-DVBBYeOW.js";import"./index-BeLOjj93.js";import"./createLucideIcon-BweVylaW.js";import"./chevron-right-haBQNeuE.js";import"./chevron-down-CtNmiOMb.js";import"./index-DWHslogn.js";import"./index-NRYqpySi.js";import"./index-BJ-ODQ_I.js";import"./index-8UmwgoSB.js";import"./tslib.es6-Dilv5nzk.js";import"./index-4XG4HPxE.js";import"./x-BI8YVnoZ.js";function $({id:e,date:t,onDateChange:o,placeholder:s="Pick a date",disabled:i=!1,className:a,allowClear:m=!1}){return r.jsxs(n,{children:[r.jsx(p,{asChild:!0,children:r.jsx(l,{variant:"outline",className:d("w-full justify-start text-left font-normal relative",!t&&"text-muted-foreground",a),disabled:i,children:r.jsxs(r.Fragment,{children:[r.jsx(j,{className:"mr-2 h-4 w-4"}),t?c(t,"PPP"):r.jsx("span",{children:s}),r.jsx(f,{onClear:()=>{o?.(void 0)},visible:m&&!!t})]})})}),r.jsx(u,{className:"w-auto p-0",children:r.jsx(x,{id:e,mode:"single",selected:t,onSelect:o,initialFocus:!0})})]})}export{$ as default};
@@ -0,0 +1 @@
1
+ import{a,p as t}from"./chunk-EF7DTUVF-CaKisB5m.js";import{B as N}from"./button-CLU225WL.js";import{f as c,P as b,a as H,C as S,b as g,c as k}from"./clear-button-CwpymKyn.js";import{I as B}from"./schemas-DZfv8pS7.js";import{a as E}from"./utils-CZqhhZtB.js";import{C as w}from"./calendar-DVBBYeOW.js";import"./index-BeLOjj93.js";import"./createLucideIcon-BweVylaW.js";import"./chevron-right-haBQNeuE.js";import"./chevron-down-CtNmiOMb.js";import"./index-DWHslogn.js";import"./index-NRYqpySi.js";import"./index-BJ-ODQ_I.js";import"./index-8UmwgoSB.js";import"./tslib.es6-Dilv5nzk.js";import"./index-4XG4HPxE.js";import"./x-BI8YVnoZ.js";function W({id:d,date:s,onDateTimeChange:r,placeholder:x="Pick a date and time",disabled:u=!1,className:j,allowClear:v=!1}){const[e,i]=a.useState(s),[l,p]=a.useState(s?c(s,"HH:mm"):"12:00");a.useEffect(()=>{i(s),s&&p(c(s,"HH:mm"))},[s]);const h=a.useCallback(o=>{const m=o.target.value;if(p(m),!e)return;const[n,C]=m.split(":").map(Number),f=new Date(e);f.setHours(n,C,0,0),r?.(f)},[e,r]),P=a.useCallback(o=>{if(!o){i(void 0),r?.(void 0);return}const[m,n]=l.split(":").map(Number);o.setHours(m,n,0,0),i(o),r?.(o)},[l,r]);return t.jsxs("div",{className:"flex gap-2",children:[t.jsxs(b,{children:[t.jsx(H,{asChild:!0,children:t.jsx(N,{variant:"outline",className:E("flex-1 justify-start text-left font-normal relative",!e&&"text-muted-foreground",j),disabled:u,children:t.jsxs(t.Fragment,{children:[t.jsx(w,{className:"mr-2 h-4 w-4"}),e?c(e,"PPP"):t.jsx("span",{children:x}),t.jsx(S,{onClear:()=>{i(void 0),r?.(void 0)},visible:v&&!!s})]})})}),t.jsx(g,{className:"w-auto p-0",children:t.jsx(k,{id:d,mode:"single",selected:e,onSelect:P,initialFocus:!0})})]}),t.jsx(B,{type:"time",value:l,onChange:h,disabled:u||!e,className:"w-32"})]})}export{W as default};
@@ -1 +1 @@
1
- import{a as p,p as e,w as f,v as g}from"./chunk-EF7DTUVF-CaKisB5m.js";import{S as b,L as N}from"./Loading-Cmzaj2IX.js";import{B as w}from"./button-CLU225WL.js";import{o as F,b as L,s as d,u as v,a as y,F as C,c as n,d as t,e as x,f as i,I as u,g as m,C as S}from"./schemas-Btr8ThQu.js";import{u as E,d as c,l as k}from"./authSlice-FAgJOb9-.js";import"./utils-CZqhhZtB.js";import"./createLucideIcon-BweVylaW.js";import"./index-BeLOjj93.js";import"./index-NRYqpySi.js";import"./index-BJ-ODQ_I.js";import"./tslib.es6-De9GV7Vy.js";const P=F({email:d().nonempty("Please enter your email").email(),password:d().nonempty("Please enter your password"),remember:L()});function A(){"use no memo";const o=E(),r=c(s=>s.auth.isLoading),a=v({resolver:y(P),disabled:r,defaultValues:{email:"",password:"",remember:!1}}),l=p.useCallback(({email:s,password:h,remember:j})=>{o(k({email:s,password:h,remember:j}))},[o]);return e.jsx("div",{className:"flex flex-col",children:e.jsx(C,{...a,children:e.jsxs("form",{onSubmit:a.handleSubmit(l),className:"space-y-4",children:[e.jsx(n,{control:a.control,name:"email",rules:{required:!0},render:({field:s})=>e.jsxs(t,{children:[e.jsx(x,{className:"flex gap-1 items-baseline",children:"Email"}),e.jsx(i,{children:e.jsx(u,{placeholder:"callasmaria@example.com",...s})}),e.jsx(m,{})]})}),e.jsx(n,{name:"password",control:a.control,rules:{required:!0},render:({field:s})=>e.jsxs(t,{children:[e.jsx(x,{className:"flex gap-1 items-baseline",children:"Password"}),e.jsx(i,{children:e.jsx(u,{type:"password",...s})}),e.jsx(m,{})]})}),e.jsx(n,{name:"remember",control:a.control,render:({field:s})=>e.jsxs(t,{children:[e.jsx(i,{children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(S,{id:"remember",checked:s.value,onCheckedChange:s.onChange}),e.jsx("label",{htmlFor:"remember",className:"text-sm leading-none",children:"Remember me"})]})}),e.jsx(m,{})]})}),e.jsx(w,{type:"submit",disabled:!a.formState.isValid||r,className:"w-full",children:r?e.jsx(b,{className:"absolute"}):"Login"})]})})})}const J=f(function(){const r=g(),a=c(s=>s.auth.user),l=c(s=>s.auth.isLoading);return p.useEffect(()=>{a&&r("/admin/dashboard")},[r,a]),l||a?e.jsx(N,{message:"Logging in..."}):e.jsx("div",{className:"flex w-full h-full",children:e.jsxs("div",{className:"self-center space-y-8 w-72 mx-auto",children:[e.jsxs("div",{className:"flex flex-col space-y-2 text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight leading-none",children:"Editorial Admin"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter your details below to login"})]}),e.jsx(A,{})]})})});export{J as default};
1
+ import{a as p,p as e,w as f,v as g}from"./chunk-EF7DTUVF-CaKisB5m.js";import{S as b,L as N}from"./Loading-BhRjqdjg.js";import{B as w}from"./button-CLU225WL.js";import{o as F,b as L,s as d,u as v,a as y,F as C,c as n,d as t,e as x,f as i,I as u,g as m,C as S}from"./schemas-DZfv8pS7.js";import{u as E,d as c,l as k}from"./authSlice-d1KLksEc.js";import"./utils-CZqhhZtB.js";import"./tslib.es6-Dilv5nzk.js";import"./createLucideIcon-BweVylaW.js";import"./index-BeLOjj93.js";import"./index-NRYqpySi.js";import"./index-BJ-ODQ_I.js";const P=F({email:d().nonempty("Please enter your email").email(),password:d().nonempty("Please enter your password"),remember:L()});function A(){"use no memo";const o=E(),r=c(s=>s.auth.isLoading),a=v({resolver:y(P),disabled:r,defaultValues:{email:"",password:"",remember:!1}}),l=p.useCallback(({email:s,password:h,remember:j})=>{o(k({email:s,password:h,remember:j}))},[o]);return e.jsx("div",{className:"flex flex-col",children:e.jsx(C,{...a,children:e.jsxs("form",{onSubmit:a.handleSubmit(l),className:"space-y-4",children:[e.jsx(n,{control:a.control,name:"email",rules:{required:!0},render:({field:s})=>e.jsxs(t,{children:[e.jsx(x,{className:"flex gap-1 items-baseline",children:"Email"}),e.jsx(i,{children:e.jsx(u,{placeholder:"callasmaria@example.com",...s})}),e.jsx(m,{})]})}),e.jsx(n,{name:"password",control:a.control,rules:{required:!0},render:({field:s})=>e.jsxs(t,{children:[e.jsx(x,{className:"flex gap-1 items-baseline",children:"Password"}),e.jsx(i,{children:e.jsx(u,{type:"password",...s})}),e.jsx(m,{})]})}),e.jsx(n,{name:"remember",control:a.control,render:({field:s})=>e.jsxs(t,{children:[e.jsx(i,{children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(S,{id:"remember",checked:s.value,onCheckedChange:s.onChange}),e.jsx("label",{htmlFor:"remember",className:"text-sm leading-none",children:"Remember me"})]})}),e.jsx(m,{})]})}),e.jsx(w,{type:"submit",disabled:!a.formState.isValid||r,className:"w-full",children:r?e.jsx(b,{className:"absolute"}):"Login"})]})})})}const J=f(function(){const r=g(),a=c(s=>s.auth.user),l=c(s=>s.auth.isLoading);return p.useEffect(()=>{a&&r("/admin/dashboard")},[r,a]),l||a?e.jsx(N,{message:"Logging in..."}):e.jsx("div",{className:"flex w-full h-full",children:e.jsxs("div",{className:"self-center space-y-8 w-72 mx-auto",children:[e.jsxs("div",{className:"flex flex-col space-y-2 text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight leading-none",children:"Editorial Admin"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter your details below to login"})]}),e.jsx(A,{})]})})});export{J as default};
@@ -1 +1 @@
1
- import{a as R,p as X}from"./chunk-EF7DTUVF-CaKisB5m.js";import{a as Ae}from"./index-BJ-ODQ_I.js";import{P as At,c as be,e as Re,d as $t}from"./index-NRYqpySi.js";import{u as It}from"./index-BeLOjj93.js";import{d as Pe}from"./index-CeH3aQ97.js";const Ce=["top","right","bottom","left"],Z=Math.min,H=Math.max,at=Math.round,ct=Math.floor,z=t=>({x:t,y:t}),Oe={left:"right",right:"left",bottom:"top",top:"bottom"},Se={start:"end",end:"start"};function xt(t,e,n){return H(t,Z(e,n))}function q(t,e){return typeof t=="function"?t(e):t}function U(t){return t.split("-")[0]}function tt(t){return t.split("-")[1]}function bt(t){return t==="x"?"y":"x"}function Rt(t){return t==="y"?"height":"width"}const Ee=new Set(["top","bottom"]);function j(t){return Ee.has(U(t))?"y":"x"}function Pt(t){return bt(j(t))}function De(t,e,n){n===void 0&&(n=!1);const o=tt(t),i=Pt(t),r=Rt(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=ft(s)),[s,ft(s)]}function Le(t){const e=ft(t);return[yt(t),e,yt(e)]}function yt(t){return t.replace(/start|end/g,e=>Se[e])}const kt=["left","right"],Nt=["right","left"],Te=["top","bottom"],Me=["bottom","top"];function $e(t,e,n){switch(t){case"top":case"bottom":return n?e?Nt:kt:e?kt:Nt;case"left":case"right":return e?Te:Me;default:return[]}}function ke(t,e,n,o){const i=tt(t);let r=$e(U(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(yt)))),r}function ft(t){return t.replace(/left|right|bottom|top/g,e=>Oe[e])}function Ne(t){return{top:0,right:0,bottom:0,left:0,...t}}function Yt(t){return typeof t!="number"?Ne(t):{top:t,right:t,bottom:t,left:t}}function ut(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Ft(t,e,n){let{reference:o,floating:i}=t;const r=j(e),s=Pt(e),c=Rt(s),a=U(e),l=r==="y",f=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,p=o[c]/2-i[c]/2;let d;switch(a){case"top":d={x:f,y:o.y-i.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:u};break;case"left":d={x:o.x-i.width,y:u};break;default:d={x:o.x,y:o.y}}switch(tt(e)){case"start":d[s]-=p*(n&&l?-1:1);break;case"end":d[s]+=p*(n&&l?-1:1);break}return d}const Fe=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=r.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=Ft(l,o,a),p=o,d={},m=0;for(let h=0;h<c.length;h++){const{name:w,fn:g}=c[h],{x,y:A,data:y,reset:v}=await g({x:f,y:u,initialPlacement:o,placement:p,strategy:i,middlewareData:d,rects:l,platform:s,elements:{reference:t,floating:e}});f=x??f,u=A??u,d={...d,[w]:{...d[w],...y}},v&&m<=50&&(m++,typeof v=="object"&&(v.placement&&(p=v.placement),v.rects&&(l=v.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:f,y:u}=Ft(l,p,a)),h=-1)}return{x:f,y:u,placement:p,strategy:i,middlewareData:d}};async function ot(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:s,elements:c,strategy:a}=t,{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:p=!1,padding:d=0}=q(e,t),m=Yt(d),w=c[p?u==="floating"?"reference":"floating":u],g=ut(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(w)))==null||n?w:w.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:l,rootBoundary:f,strategy:a})),x=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,A=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),y=await(r.isElement==null?void 0:r.isElement(A))?await(r.getScale==null?void 0:r.getScale(A))||{x:1,y:1}:{x:1,y:1},v=ut(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:A,strategy:a}):x);return{top:(g.top-v.top+m.top)/y.y,bottom:(v.bottom-g.bottom+m.bottom)/y.y,left:(g.left-v.left+m.left)/y.x,right:(v.right-g.right+m.right)/y.x}}const He=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:a}=e,{element:l,padding:f=0}=q(t,e)||{};if(l==null)return{};const u=Yt(f),p={x:n,y:o},d=Pt(i),m=Rt(d),h=await s.getDimensions(l),w=d==="y",g=w?"top":"left",x=w?"bottom":"right",A=w?"clientHeight":"clientWidth",y=r.reference[m]+r.reference[d]-p[d]-r.floating[m],v=p[d]-r.reference[d],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let P=C?C[A]:0;(!P||!await(s.isElement==null?void 0:s.isElement(C)))&&(P=c.floating[A]||r.floating[m]);const T=y/2-v/2,N=P/2-h[m]/2-1,L=Z(u[g],N),$=Z(u[x],N),k=L,S=P-h[m]-$,O=P/2-h[m]/2+T,F=xt(k,O,S),E=!a.arrow&&tt(i)!=null&&O!==F&&r.reference[m]/2-(O<k?L:$)-h[m]/2<0,D=E?O<k?O-k:O-S:0;return{[d]:p[d]+D,data:{[d]:F,centerOffset:O-F-D,...E&&{alignmentOffset:D}},reset:E}}}),We=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:a,elements:l}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...w}=q(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const g=U(i),x=j(c),A=U(c)===c,y=await(a.isRTL==null?void 0:a.isRTL(l.floating)),v=p||(A||!h?[ft(c)]:Le(c)),C=m!=="none";!p&&C&&v.push(...ke(c,h,m,y));const P=[c,...v],T=await ot(e,w),N=[];let L=((o=r.flip)==null?void 0:o.overflows)||[];if(f&&N.push(T[g]),u){const O=De(i,s,y);N.push(T[O[0]],T[O[1]])}if(L=[...L,{placement:i,overflows:N}],!N.every(O=>O<=0)){var $,k;const O=((($=r.flip)==null?void 0:$.index)||0)+1,F=P[O];if(F&&(!(u==="alignment"?x!==j(F):!1)||L.every(b=>b.overflows[0]>0&&j(b.placement)===x)))return{data:{index:O,overflows:L},reset:{placement:F}};let E=(k=L.filter(D=>D.overflows[0]<=0).sort((D,b)=>D.overflows[1]-b.overflows[1])[0])==null?void 0:k.placement;if(!E)switch(d){case"bestFit":{var S;const D=(S=L.filter(b=>{if(C){const M=j(b.placement);return M===x||M==="y"}return!0}).map(b=>[b.placement,b.overflows.filter(M=>M>0).reduce((M,V)=>M+V,0)]).sort((b,M)=>b[1]-M[1])[0])==null?void 0:S[0];D&&(E=D);break}case"initialPlacement":E=c;break}if(i!==E)return{reset:{placement:E}}}return{}}}};function Ht(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Wt(t){return Ce.some(e=>t[e]>=0)}const _e=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...i}=q(t,e);switch(o){case"referenceHidden":{const r=await ot(e,{...i,elementContext:"reference"}),s=Ht(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Wt(s)}}}case"escaped":{const r=await ot(e,{...i,altBoundary:!0}),s=Ht(r,n.floating);return{data:{escapedOffsets:s,escaped:Wt(s)}}}default:return{}}}}},Xt=new Set(["left","top"]);async function Be(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=U(n),c=tt(n),a=j(n)==="y",l=Xt.has(s)?-1:1,f=r&&a?-1:1,u=q(e,t);let{mainAxis:p,crossAxis:d,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof m=="number"&&(d=c==="end"?m*-1:m),a?{x:d*f,y:p*l}:{x:p*l,y:d*f}}const Ve=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:s,middlewareData:c}=e,a=await Be(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+a.x,y:r+a.y,data:{...a,placement:s}}}}},je=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:c={fn:w=>{let{x:g,y:x}=w;return{x:g,y:x}}},...a}=q(t,e),l={x:n,y:o},f=await ot(e,a),u=j(U(i)),p=bt(u);let d=l[p],m=l[u];if(r){const w=p==="y"?"top":"left",g=p==="y"?"bottom":"right",x=d+f[w],A=d-f[g];d=xt(x,d,A)}if(s){const w=u==="y"?"top":"left",g=u==="y"?"bottom":"right",x=m+f[w],A=m-f[g];m=xt(x,m,A)}const h=c.fn({...e,[p]:d,[u]:m});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[p]:r,[u]:s}}}}}},ze=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:i,rects:r,middlewareData:s}=e,{offset:c=0,mainAxis:a=!0,crossAxis:l=!0}=q(t,e),f={x:n,y:o},u=j(i),p=bt(u);let d=f[p],m=f[u];const h=q(c,e),w=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(a){const A=p==="y"?"height":"width",y=r.reference[p]-r.floating[A]+w.mainAxis,v=r.reference[p]+r.reference[A]-w.mainAxis;d<y?d=y:d>v&&(d=v)}if(l){var g,x;const A=p==="y"?"width":"height",y=Xt.has(U(i)),v=r.reference[u]-r.floating[A]+(y&&((g=s.offset)==null?void 0:g[u])||0)+(y?0:w.crossAxis),C=r.reference[u]+r.reference[A]+(y?0:((x=s.offset)==null?void 0:x[u])||0)-(y?w.crossAxis:0);m<v?m=v:m>C&&(m=C)}return{[p]:d,[u]:m}}}},Ie=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:s,elements:c}=e,{apply:a=()=>{},...l}=q(t,e),f=await ot(e,l),u=U(i),p=tt(i),d=j(i)==="y",{width:m,height:h}=r.floating;let w,g;u==="top"||u==="bottom"?(w=u,g=p===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(g=u,w=p==="end"?"top":"bottom");const x=h-f.top-f.bottom,A=m-f.left-f.right,y=Z(h-f[w],x),v=Z(m-f[g],A),C=!e.middlewareData.shift;let P=y,T=v;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(T=A),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(P=x),C&&!p){const L=H(f.left,0),$=H(f.right,0),k=H(f.top,0),S=H(f.bottom,0);d?T=m-2*(L!==0||$!==0?L+$:H(f.left,f.right)):P=h-2*(k!==0||S!==0?k+S:H(f.top,f.bottom))}await a({...e,availableWidth:T,availableHeight:P});const N=await s.getDimensions(c.floating);return m!==N.width||h!==N.height?{reset:{rects:!0}}:{}}}};function mt(){return typeof window<"u"}function et(t){return qt(t)?(t.nodeName||"").toLowerCase():"#document"}function W(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Y(t){var e;return(e=(qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qt(t){return mt()?t instanceof Node||t instanceof W(t).Node:!1}function _(t){return mt()?t instanceof Element||t instanceof W(t).Element:!1}function I(t){return mt()?t instanceof HTMLElement||t instanceof W(t).HTMLElement:!1}function _t(t){return!mt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof W(t).ShadowRoot}const Ye=new Set(["inline","contents"]);function rt(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=B(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Ye.has(i)}const Xe=new Set(["table","td","th"]);function qe(t){return Xe.has(et(t))}const Ue=[":popover-open",":modal"];function pt(t){return Ue.some(e=>{try{return t.matches(e)}catch{return!1}})}const Ze=["transform","translate","scale","rotate","perspective"],Ke=["transform","translate","scale","rotate","perspective","filter"],Ge=["paint","layout","strict","content"];function Ct(t){const e=Ot(),n=_(t)?B(t):t;return Ze.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Ke.some(o=>(n.willChange||"").includes(o))||Ge.some(o=>(n.contain||"").includes(o))}function Je(t){let e=K(t);for(;I(e)&&!Q(e);){if(Ct(e))return e;if(pt(e))return null;e=K(e)}return null}function Ot(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Qe=new Set(["html","body","#document"]);function Q(t){return Qe.has(et(t))}function B(t){return W(t).getComputedStyle(t)}function ht(t){return _(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if(et(t)==="html")return t;const e=t.assignedSlot||t.parentNode||_t(t)&&t.host||Y(t);return _t(e)?e.host:e}function Ut(t){const e=K(t);return Q(e)?t.ownerDocument?t.ownerDocument.body:t.body:I(e)&&rt(e)?e:Ut(e)}function it(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Ut(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=W(i);if(r){const c=vt(s);return e.concat(s,s.visualViewport||[],rt(i)?i:[],c&&n?it(c):[])}return e.concat(i,it(i,[],n))}function vt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Zt(t){const e=B(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=I(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=at(n)!==r||at(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function St(t){return _(t)?t:t.contextElement}function J(t){const e=St(t);if(!I(e))return z(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Zt(e);let s=(r?at(n.width):n.width)/o,c=(r?at(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const tn=z(0);function Kt(t){const e=W(t);return!Ot()||!e.visualViewport?tn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function en(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==W(t)?!1:e}function G(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=St(t);let s=z(1);e&&(o?_(o)&&(s=J(o)):s=J(t));const c=en(r,n,o)?Kt(r):z(0);let a=(i.left+c.x)/s.x,l=(i.top+c.y)/s.y,f=i.width/s.x,u=i.height/s.y;if(r){const p=W(r),d=o&&_(o)?W(o):o;let m=p,h=vt(m);for(;h&&o&&d!==m;){const w=J(h),g=h.getBoundingClientRect(),x=B(h),A=g.left+(h.clientLeft+parseFloat(x.paddingLeft))*w.x,y=g.top+(h.clientTop+parseFloat(x.paddingTop))*w.y;a*=w.x,l*=w.y,f*=w.x,u*=w.y,a+=A,l+=y,m=W(h),h=vt(m)}}return ut({width:f,height:u,x:a,y:l})}function Et(t,e){const n=ht(t).scrollLeft;return e?e.left+n:G(Y(t)).left+n}function Gt(t,e,n){n===void 0&&(n=!1);const o=t.getBoundingClientRect(),i=o.left+e.scrollLeft-(n?0:Et(t,o)),r=o.top+e.scrollTop;return{x:i,y:r}}function nn(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",s=Y(o),c=e?pt(e.floating):!1;if(o===s||c&&r)return n;let a={scrollLeft:0,scrollTop:0},l=z(1);const f=z(0),u=I(o);if((u||!u&&!r)&&((et(o)!=="body"||rt(s))&&(a=ht(o)),I(o))){const d=G(o);l=J(o),f.x=d.x+o.clientLeft,f.y=d.y+o.clientTop}const p=s&&!u&&!r?Gt(s,a,!0):z(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+f.x+p.x,y:n.y*l.y-a.scrollTop*l.y+f.y+p.y}}function on(t){return Array.from(t.getClientRects())}function rn(t){const e=Y(t),n=ht(t),o=t.ownerDocument.body,i=H(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=H(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Et(t);const c=-n.scrollTop;return B(o).direction==="rtl"&&(s+=H(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}function sn(t,e){const n=W(t),o=Y(t),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,c=0,a=0;if(i){r=i.width,s=i.height;const l=Ot();(!l||l&&e==="fixed")&&(c=i.offsetLeft,a=i.offsetTop)}return{width:r,height:s,x:c,y:a}}const cn=new Set(["absolute","fixed"]);function ln(t,e){const n=G(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=I(t)?J(t):z(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,a=i*r.x,l=o*r.y;return{width:s,height:c,x:a,y:l}}function Bt(t,e,n){let o;if(e==="viewport")o=sn(t,n);else if(e==="document")o=rn(Y(t));else if(_(e))o=ln(e,n);else{const i=Kt(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return ut(o)}function Jt(t,e){const n=K(t);return n===e||!_(n)||Q(n)?!1:B(n).position==="fixed"||Jt(n,e)}function an(t,e){const n=e.get(t);if(n)return n;let o=it(t,[],!1).filter(c=>_(c)&&et(c)!=="body"),i=null;const r=B(t).position==="fixed";let s=r?K(t):t;for(;_(s)&&!Q(s);){const c=B(s),a=Ct(s);!a&&c.position==="fixed"&&(i=null),(r?!a&&!i:!a&&c.position==="static"&&!!i&&cn.has(i.position)||rt(s)&&!a&&Jt(t,s))?o=o.filter(f=>f!==s):i=c,s=K(s)}return e.set(t,o),o}function fn(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const s=[...n==="clippingAncestors"?pt(e)?[]:an(e,this._c):[].concat(n),o],c=s[0],a=s.reduce((l,f)=>{const u=Bt(e,f,i);return l.top=H(u.top,l.top),l.right=Z(u.right,l.right),l.bottom=Z(u.bottom,l.bottom),l.left=H(u.left,l.left),l},Bt(e,c,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function un(t){const{width:e,height:n}=Zt(t);return{width:e,height:n}}function dn(t,e,n){const o=I(e),i=Y(e),r=n==="fixed",s=G(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const a=z(0);function l(){a.x=Et(i)}if(o||!o&&!r)if((et(e)!=="body"||rt(i))&&(c=ht(e)),o){const d=G(e,!0,r,e);a.x=d.x+e.clientLeft,a.y=d.y+e.clientTop}else i&&l();r&&!o&&i&&l();const f=i&&!o&&!r?Gt(i,c):z(0),u=s.left+c.scrollLeft-a.x-f.x,p=s.top+c.scrollTop-a.y-f.y;return{x:u,y:p,width:s.width,height:s.height}}function gt(t){return B(t).position==="static"}function Vt(t,e){if(!I(t)||B(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Y(t)===n&&(n=n.ownerDocument.body),n}function Qt(t,e){const n=W(t);if(pt(t))return n;if(!I(t)){let i=K(t);for(;i&&!Q(i);){if(_(i)&&!gt(i))return i;i=K(i)}return n}let o=Vt(t,e);for(;o&&qe(o)&&gt(o);)o=Vt(o,e);return o&&Q(o)&&gt(o)&&!Ct(o)?n:o||Je(t)||n}const mn=async function(t){const e=this.getOffsetParent||Qt,n=this.getDimensions,o=await n(t.floating);return{reference:dn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function pn(t){return B(t).direction==="rtl"}const hn={convertOffsetParentRelativeRectToViewportRelativeRect:nn,getDocumentElement:Y,getClippingRect:fn,getOffsetParent:Qt,getElementRects:mn,getClientRects:on,getDimensions:un,getScale:J,isElement:_,isRTL:pn};function te(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function gn(t,e){let n=null,o;const i=Y(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,a){c===void 0&&(c=!1),a===void 0&&(a=1),r();const l=t.getBoundingClientRect(),{left:f,top:u,width:p,height:d}=l;if(c||e(),!p||!d)return;const m=ct(u),h=ct(i.clientWidth-(f+p)),w=ct(i.clientHeight-(u+d)),g=ct(f),A={rootMargin:-m+"px "+-h+"px "+-w+"px "+-g+"px",threshold:H(0,Z(1,a))||1};let y=!0;function v(C){const P=C[0].intersectionRatio;if(P!==a){if(!y)return s();P?s(!1,P):o=setTimeout(()=>{s(!1,1e-7)},1e3)}P===1&&!te(l,t.getBoundingClientRect())&&s(),y=!1}try{n=new IntersectionObserver(v,{...A,root:i.ownerDocument})}catch{n=new IntersectionObserver(v,A)}n.observe(t)}return s(!0),r}function wn(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=o,l=St(t),f=i||r?[...l?it(l):[],...it(e)]:[];f.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),r&&g.addEventListener("resize",n)});const u=l&&c?gn(l,n):null;let p=-1,d=null;s&&(d=new ResizeObserver(g=>{let[x]=g;x&&x.target===l&&d&&(d.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var A;(A=d)==null||A.observe(e)})),n()}),l&&!a&&d.observe(l),d.observe(e));let m,h=a?G(t):null;a&&w();function w(){const g=G(t);h&&!te(h,g)&&n(),h=g,m=requestAnimationFrame(w)}return n(),()=>{var g;f.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),u?.(),(g=d)==null||g.disconnect(),d=null,a&&cancelAnimationFrame(m)}}const xn=Ve,yn=je,vn=We,An=Ie,bn=_e,jt=He,Rn=ze,Pn=(t,e,n)=>{const o=new Map,i={platform:hn,...n},r={...i.platform,_c:o};return Fe(t,e,{...i,platform:r})};var Cn=typeof document<"u",On=function(){},lt=Cn?R.useLayoutEffect:On;function dt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!dt(t[o],e[o]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,i[o]))return!1;for(o=n;o--!==0;){const r=i[o];if(!(r==="_owner"&&t.$$typeof)&&!dt(t[r],e[r]))return!1}return!0}return t!==t&&e!==e}function ee(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function zt(t,e){const n=ee(t);return Math.round(e*n)/n}function wt(t){const e=R.useRef(t);return lt(()=>{e.current=t}),e}function Sn(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:r,floating:s}={},transform:c=!0,whileElementsMounted:a,open:l}=t,[f,u]=R.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[p,d]=R.useState(o);dt(p,o)||d(o);const[m,h]=R.useState(null),[w,g]=R.useState(null),x=R.useCallback(b=>{b!==C.current&&(C.current=b,h(b))},[]),A=R.useCallback(b=>{b!==P.current&&(P.current=b,g(b))},[]),y=r||m,v=s||w,C=R.useRef(null),P=R.useRef(null),T=R.useRef(f),N=a!=null,L=wt(a),$=wt(i),k=wt(l),S=R.useCallback(()=>{if(!C.current||!P.current)return;const b={placement:e,strategy:n,middleware:p};$.current&&(b.platform=$.current),Pn(C.current,P.current,b).then(M=>{const V={...M,isPositioned:k.current!==!1};O.current&&!dt(T.current,V)&&(T.current=V,Ae.flushSync(()=>{u(V)}))})},[p,e,n,$,k]);lt(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(b=>({...b,isPositioned:!1})))},[l]);const O=R.useRef(!1);lt(()=>(O.current=!0,()=>{O.current=!1}),[]),lt(()=>{if(y&&(C.current=y),v&&(P.current=v),y&&v){if(L.current)return L.current(y,v,S);S()}},[y,v,S,L,N]);const F=R.useMemo(()=>({reference:C,floating:P,setReference:x,setFloating:A}),[x,A]),E=R.useMemo(()=>({reference:y,floating:v}),[y,v]),D=R.useMemo(()=>{const b={position:n,left:0,top:0};if(!E.floating)return b;const M=zt(E.floating,f.x),V=zt(E.floating,f.y);return c?{...b,transform:"translate("+M+"px, "+V+"px)",...ee(E.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:V}},[n,c,E.floating,f.x,f.y]);return R.useMemo(()=>({...f,update:S,refs:F,elements:E,floatingStyles:D}),[f,S,F,E,D])}const En=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:i}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?jt({element:o.current,padding:i}).fn(n):{}:o?jt({element:o,padding:i}).fn(n):{}}}},Dn=(t,e)=>({...xn(t),options:[t,e]}),Ln=(t,e)=>({...yn(t),options:[t,e]}),Tn=(t,e)=>({...Rn(t),options:[t,e]}),Mn=(t,e)=>({...vn(t),options:[t,e]}),$n=(t,e)=>({...An(t),options:[t,e]}),kn=(t,e)=>({...bn(t),options:[t,e]}),Nn=(t,e)=>({...En(t),options:[t,e]});var Fn="Arrow",ne=R.forwardRef((t,e)=>{const{children:n,width:o=10,height:i=5,...r}=t;return X.jsx(At.svg,{...r,ref:e,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:X.jsx("polygon",{points:"0,0 30,0 15,10"})})});ne.displayName=Fn;var Hn=ne,Dt="Popper",[oe,Zn]=be(Dt),[Wn,ie]=oe(Dt),re=t=>{const{__scopePopper:e,children:n}=t,[o,i]=R.useState(null);return X.jsx(Wn,{scope:e,anchor:o,onAnchorChange:i,children:n})};re.displayName=Dt;var se="PopperAnchor",ce=R.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:o,...i}=t,r=ie(se,n),s=R.useRef(null),c=It(e,s);return R.useEffect(()=>{r.onAnchorChange(o?.current||s.current)}),o?null:X.jsx(At.div,{...i,ref:c})});ce.displayName=se;var Lt="PopperContent",[_n,Bn]=oe(Lt),le=R.forwardRef((t,e)=>{const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:r="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:a=!0,collisionBoundary:l=[],collisionPadding:f=0,sticky:u="partial",hideWhenDetached:p=!1,updatePositionStrategy:d="optimized",onPlaced:m,...h}=t,w=ie(Lt,n),[g,x]=R.useState(null),A=It(e,nt=>x(nt)),[y,v]=R.useState(null),C=Re(y),P=C?.width??0,T=C?.height??0,N=o+(r!=="center"?"-"+r:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},$=Array.isArray(l)?l:[l],k=$.length>0,S={padding:L,boundary:$.filter(jn),altBoundary:k},{refs:O,floatingStyles:F,placement:E,isPositioned:D,middlewareData:b}=Sn({strategy:"fixed",placement:N,whileElementsMounted:(...nt)=>wn(...nt,{animationFrame:d==="always"}),elements:{reference:w.anchor},middleware:[Dn({mainAxis:i+T,alignmentAxis:s}),a&&Ln({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Tn():void 0,...S}),a&&Mn({...S}),$n({...S,apply:({elements:nt,rects:Mt,availableWidth:we,availableHeight:xe})=>{const{width:ye,height:ve}=Mt.reference,st=nt.floating.style;st.setProperty("--radix-popper-available-width",`${we}px`),st.setProperty("--radix-popper-available-height",`${xe}px`),st.setProperty("--radix-popper-anchor-width",`${ye}px`),st.setProperty("--radix-popper-anchor-height",`${ve}px`)}}),y&&Nn({element:y,padding:c}),zn({arrowWidth:P,arrowHeight:T}),p&&kn({strategy:"referenceHidden",...S})]}),[M,V]=ue(E),Tt=Pe(m);$t(()=>{D&&Tt?.()},[D,Tt]);const de=b.arrow?.x,me=b.arrow?.y,pe=b.arrow?.centerOffset!==0,[he,ge]=R.useState();return $t(()=>{g&&ge(window.getComputedStyle(g).zIndex)},[g]),X.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:D?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:he,"--radix-popper-transform-origin":[b.transformOrigin?.x,b.transformOrigin?.y].join(" "),...b.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:X.jsx(_n,{scope:n,placedSide:M,onArrowChange:v,arrowX:de,arrowY:me,shouldHideArrow:pe,children:X.jsx(At.div,{"data-side":M,"data-align":V,...h,ref:A,style:{...h.style,animation:D?void 0:"none"}})})})});le.displayName=Lt;var ae="PopperArrow",Vn={top:"bottom",right:"left",bottom:"top",left:"right"},fe=R.forwardRef(function(e,n){const{__scopePopper:o,...i}=e,r=Bn(ae,o),s=Vn[r.placedSide];return X.jsx("span",{ref:r.onArrowChange,style:{position:"absolute",left:r.arrowX,top:r.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[r.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[r.placedSide],visibility:r.shouldHideArrow?"hidden":void 0},children:X.jsx(Hn,{...i,ref:n,style:{...i.style,display:"block"}})})});fe.displayName=ae;function jn(t){return t!==null}var zn=t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:o,middlewareData:i}=e,s=i.arrow?.centerOffset!==0,c=s?0:t.arrowWidth,a=s?0:t.arrowHeight,[l,f]=ue(n),u={start:"0%",center:"50%",end:"100%"}[f],p=(i.arrow?.x??0)+c/2,d=(i.arrow?.y??0)+a/2;let m="",h="";return l==="bottom"?(m=s?u:`${p}px`,h=`${-a}px`):l==="top"?(m=s?u:`${p}px`,h=`${o.floating.height+a}px`):l==="right"?(m=`${-a}px`,h=s?u:`${d}px`):l==="left"&&(m=`${o.floating.width+a}px`,h=s?u:`${d}px`),{data:{x:m,y:h}}}});function ue(t){const[e,n="center"]=t.split("-");return[e,n]}var Kn=re,Gn=ce,Jn=le,Qn=fe;export{Gn as A,Jn as C,Kn as R,Qn as a,Zn as c};
1
+ import{a as R,p as X}from"./chunk-EF7DTUVF-CaKisB5m.js";import{a as Ae}from"./index-BJ-ODQ_I.js";import{P as At,c as be,e as Re,d as $t}from"./index-NRYqpySi.js";import{u as It}from"./index-BeLOjj93.js";import{d as Pe}from"./index-8UmwgoSB.js";const Ce=["top","right","bottom","left"],Z=Math.min,H=Math.max,at=Math.round,ct=Math.floor,z=t=>({x:t,y:t}),Oe={left:"right",right:"left",bottom:"top",top:"bottom"},Se={start:"end",end:"start"};function xt(t,e,n){return H(t,Z(e,n))}function q(t,e){return typeof t=="function"?t(e):t}function U(t){return t.split("-")[0]}function tt(t){return t.split("-")[1]}function bt(t){return t==="x"?"y":"x"}function Rt(t){return t==="y"?"height":"width"}const Ee=new Set(["top","bottom"]);function j(t){return Ee.has(U(t))?"y":"x"}function Pt(t){return bt(j(t))}function De(t,e,n){n===void 0&&(n=!1);const o=tt(t),i=Pt(t),r=Rt(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=ft(s)),[s,ft(s)]}function Le(t){const e=ft(t);return[yt(t),e,yt(e)]}function yt(t){return t.replace(/start|end/g,e=>Se[e])}const kt=["left","right"],Nt=["right","left"],Te=["top","bottom"],Me=["bottom","top"];function $e(t,e,n){switch(t){case"top":case"bottom":return n?e?Nt:kt:e?kt:Nt;case"left":case"right":return e?Te:Me;default:return[]}}function ke(t,e,n,o){const i=tt(t);let r=$e(U(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(yt)))),r}function ft(t){return t.replace(/left|right|bottom|top/g,e=>Oe[e])}function Ne(t){return{top:0,right:0,bottom:0,left:0,...t}}function Yt(t){return typeof t!="number"?Ne(t):{top:t,right:t,bottom:t,left:t}}function ut(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Ft(t,e,n){let{reference:o,floating:i}=t;const r=j(e),s=Pt(e),c=Rt(s),a=U(e),l=r==="y",f=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,p=o[c]/2-i[c]/2;let d;switch(a){case"top":d={x:f,y:o.y-i.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:u};break;case"left":d={x:o.x-i.width,y:u};break;default:d={x:o.x,y:o.y}}switch(tt(e)){case"start":d[s]-=p*(n&&l?-1:1);break;case"end":d[s]+=p*(n&&l?-1:1);break}return d}const Fe=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=r.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=Ft(l,o,a),p=o,d={},m=0;for(let h=0;h<c.length;h++){const{name:w,fn:g}=c[h],{x,y:A,data:y,reset:v}=await g({x:f,y:u,initialPlacement:o,placement:p,strategy:i,middlewareData:d,rects:l,platform:s,elements:{reference:t,floating:e}});f=x??f,u=A??u,d={...d,[w]:{...d[w],...y}},v&&m<=50&&(m++,typeof v=="object"&&(v.placement&&(p=v.placement),v.rects&&(l=v.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:f,y:u}=Ft(l,p,a)),h=-1)}return{x:f,y:u,placement:p,strategy:i,middlewareData:d}};async function ot(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:s,elements:c,strategy:a}=t,{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:p=!1,padding:d=0}=q(e,t),m=Yt(d),w=c[p?u==="floating"?"reference":"floating":u],g=ut(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(w)))==null||n?w:w.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:l,rootBoundary:f,strategy:a})),x=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,A=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),y=await(r.isElement==null?void 0:r.isElement(A))?await(r.getScale==null?void 0:r.getScale(A))||{x:1,y:1}:{x:1,y:1},v=ut(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:A,strategy:a}):x);return{top:(g.top-v.top+m.top)/y.y,bottom:(v.bottom-g.bottom+m.bottom)/y.y,left:(g.left-v.left+m.left)/y.x,right:(v.right-g.right+m.right)/y.x}}const He=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:a}=e,{element:l,padding:f=0}=q(t,e)||{};if(l==null)return{};const u=Yt(f),p={x:n,y:o},d=Pt(i),m=Rt(d),h=await s.getDimensions(l),w=d==="y",g=w?"top":"left",x=w?"bottom":"right",A=w?"clientHeight":"clientWidth",y=r.reference[m]+r.reference[d]-p[d]-r.floating[m],v=p[d]-r.reference[d],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let P=C?C[A]:0;(!P||!await(s.isElement==null?void 0:s.isElement(C)))&&(P=c.floating[A]||r.floating[m]);const T=y/2-v/2,N=P/2-h[m]/2-1,L=Z(u[g],N),$=Z(u[x],N),k=L,S=P-h[m]-$,O=P/2-h[m]/2+T,F=xt(k,O,S),E=!a.arrow&&tt(i)!=null&&O!==F&&r.reference[m]/2-(O<k?L:$)-h[m]/2<0,D=E?O<k?O-k:O-S:0;return{[d]:p[d]+D,data:{[d]:F,centerOffset:O-F-D,...E&&{alignmentOffset:D}},reset:E}}}),We=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:a,elements:l}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...w}=q(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const g=U(i),x=j(c),A=U(c)===c,y=await(a.isRTL==null?void 0:a.isRTL(l.floating)),v=p||(A||!h?[ft(c)]:Le(c)),C=m!=="none";!p&&C&&v.push(...ke(c,h,m,y));const P=[c,...v],T=await ot(e,w),N=[];let L=((o=r.flip)==null?void 0:o.overflows)||[];if(f&&N.push(T[g]),u){const O=De(i,s,y);N.push(T[O[0]],T[O[1]])}if(L=[...L,{placement:i,overflows:N}],!N.every(O=>O<=0)){var $,k;const O=((($=r.flip)==null?void 0:$.index)||0)+1,F=P[O];if(F&&(!(u==="alignment"?x!==j(F):!1)||L.every(b=>b.overflows[0]>0&&j(b.placement)===x)))return{data:{index:O,overflows:L},reset:{placement:F}};let E=(k=L.filter(D=>D.overflows[0]<=0).sort((D,b)=>D.overflows[1]-b.overflows[1])[0])==null?void 0:k.placement;if(!E)switch(d){case"bestFit":{var S;const D=(S=L.filter(b=>{if(C){const M=j(b.placement);return M===x||M==="y"}return!0}).map(b=>[b.placement,b.overflows.filter(M=>M>0).reduce((M,V)=>M+V,0)]).sort((b,M)=>b[1]-M[1])[0])==null?void 0:S[0];D&&(E=D);break}case"initialPlacement":E=c;break}if(i!==E)return{reset:{placement:E}}}return{}}}};function Ht(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Wt(t){return Ce.some(e=>t[e]>=0)}const _e=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...i}=q(t,e);switch(o){case"referenceHidden":{const r=await ot(e,{...i,elementContext:"reference"}),s=Ht(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Wt(s)}}}case"escaped":{const r=await ot(e,{...i,altBoundary:!0}),s=Ht(r,n.floating);return{data:{escapedOffsets:s,escaped:Wt(s)}}}default:return{}}}}},Xt=new Set(["left","top"]);async function Be(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=U(n),c=tt(n),a=j(n)==="y",l=Xt.has(s)?-1:1,f=r&&a?-1:1,u=q(e,t);let{mainAxis:p,crossAxis:d,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof m=="number"&&(d=c==="end"?m*-1:m),a?{x:d*f,y:p*l}:{x:p*l,y:d*f}}const Ve=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:s,middlewareData:c}=e,a=await Be(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+a.x,y:r+a.y,data:{...a,placement:s}}}}},je=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:c={fn:w=>{let{x:g,y:x}=w;return{x:g,y:x}}},...a}=q(t,e),l={x:n,y:o},f=await ot(e,a),u=j(U(i)),p=bt(u);let d=l[p],m=l[u];if(r){const w=p==="y"?"top":"left",g=p==="y"?"bottom":"right",x=d+f[w],A=d-f[g];d=xt(x,d,A)}if(s){const w=u==="y"?"top":"left",g=u==="y"?"bottom":"right",x=m+f[w],A=m-f[g];m=xt(x,m,A)}const h=c.fn({...e,[p]:d,[u]:m});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[p]:r,[u]:s}}}}}},ze=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:i,rects:r,middlewareData:s}=e,{offset:c=0,mainAxis:a=!0,crossAxis:l=!0}=q(t,e),f={x:n,y:o},u=j(i),p=bt(u);let d=f[p],m=f[u];const h=q(c,e),w=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(a){const A=p==="y"?"height":"width",y=r.reference[p]-r.floating[A]+w.mainAxis,v=r.reference[p]+r.reference[A]-w.mainAxis;d<y?d=y:d>v&&(d=v)}if(l){var g,x;const A=p==="y"?"width":"height",y=Xt.has(U(i)),v=r.reference[u]-r.floating[A]+(y&&((g=s.offset)==null?void 0:g[u])||0)+(y?0:w.crossAxis),C=r.reference[u]+r.reference[A]+(y?0:((x=s.offset)==null?void 0:x[u])||0)-(y?w.crossAxis:0);m<v?m=v:m>C&&(m=C)}return{[p]:d,[u]:m}}}},Ie=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:s,elements:c}=e,{apply:a=()=>{},...l}=q(t,e),f=await ot(e,l),u=U(i),p=tt(i),d=j(i)==="y",{width:m,height:h}=r.floating;let w,g;u==="top"||u==="bottom"?(w=u,g=p===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(g=u,w=p==="end"?"top":"bottom");const x=h-f.top-f.bottom,A=m-f.left-f.right,y=Z(h-f[w],x),v=Z(m-f[g],A),C=!e.middlewareData.shift;let P=y,T=v;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(T=A),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(P=x),C&&!p){const L=H(f.left,0),$=H(f.right,0),k=H(f.top,0),S=H(f.bottom,0);d?T=m-2*(L!==0||$!==0?L+$:H(f.left,f.right)):P=h-2*(k!==0||S!==0?k+S:H(f.top,f.bottom))}await a({...e,availableWidth:T,availableHeight:P});const N=await s.getDimensions(c.floating);return m!==N.width||h!==N.height?{reset:{rects:!0}}:{}}}};function mt(){return typeof window<"u"}function et(t){return qt(t)?(t.nodeName||"").toLowerCase():"#document"}function W(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Y(t){var e;return(e=(qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qt(t){return mt()?t instanceof Node||t instanceof W(t).Node:!1}function _(t){return mt()?t instanceof Element||t instanceof W(t).Element:!1}function I(t){return mt()?t instanceof HTMLElement||t instanceof W(t).HTMLElement:!1}function _t(t){return!mt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof W(t).ShadowRoot}const Ye=new Set(["inline","contents"]);function rt(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=B(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Ye.has(i)}const Xe=new Set(["table","td","th"]);function qe(t){return Xe.has(et(t))}const Ue=[":popover-open",":modal"];function pt(t){return Ue.some(e=>{try{return t.matches(e)}catch{return!1}})}const Ze=["transform","translate","scale","rotate","perspective"],Ke=["transform","translate","scale","rotate","perspective","filter"],Ge=["paint","layout","strict","content"];function Ct(t){const e=Ot(),n=_(t)?B(t):t;return Ze.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Ke.some(o=>(n.willChange||"").includes(o))||Ge.some(o=>(n.contain||"").includes(o))}function Je(t){let e=K(t);for(;I(e)&&!Q(e);){if(Ct(e))return e;if(pt(e))return null;e=K(e)}return null}function Ot(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Qe=new Set(["html","body","#document"]);function Q(t){return Qe.has(et(t))}function B(t){return W(t).getComputedStyle(t)}function ht(t){return _(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if(et(t)==="html")return t;const e=t.assignedSlot||t.parentNode||_t(t)&&t.host||Y(t);return _t(e)?e.host:e}function Ut(t){const e=K(t);return Q(e)?t.ownerDocument?t.ownerDocument.body:t.body:I(e)&&rt(e)?e:Ut(e)}function it(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Ut(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=W(i);if(r){const c=vt(s);return e.concat(s,s.visualViewport||[],rt(i)?i:[],c&&n?it(c):[])}return e.concat(i,it(i,[],n))}function vt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Zt(t){const e=B(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=I(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=at(n)!==r||at(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function St(t){return _(t)?t:t.contextElement}function J(t){const e=St(t);if(!I(e))return z(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Zt(e);let s=(r?at(n.width):n.width)/o,c=(r?at(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const tn=z(0);function Kt(t){const e=W(t);return!Ot()||!e.visualViewport?tn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function en(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==W(t)?!1:e}function G(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=St(t);let s=z(1);e&&(o?_(o)&&(s=J(o)):s=J(t));const c=en(r,n,o)?Kt(r):z(0);let a=(i.left+c.x)/s.x,l=(i.top+c.y)/s.y,f=i.width/s.x,u=i.height/s.y;if(r){const p=W(r),d=o&&_(o)?W(o):o;let m=p,h=vt(m);for(;h&&o&&d!==m;){const w=J(h),g=h.getBoundingClientRect(),x=B(h),A=g.left+(h.clientLeft+parseFloat(x.paddingLeft))*w.x,y=g.top+(h.clientTop+parseFloat(x.paddingTop))*w.y;a*=w.x,l*=w.y,f*=w.x,u*=w.y,a+=A,l+=y,m=W(h),h=vt(m)}}return ut({width:f,height:u,x:a,y:l})}function Et(t,e){const n=ht(t).scrollLeft;return e?e.left+n:G(Y(t)).left+n}function Gt(t,e,n){n===void 0&&(n=!1);const o=t.getBoundingClientRect(),i=o.left+e.scrollLeft-(n?0:Et(t,o)),r=o.top+e.scrollTop;return{x:i,y:r}}function nn(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",s=Y(o),c=e?pt(e.floating):!1;if(o===s||c&&r)return n;let a={scrollLeft:0,scrollTop:0},l=z(1);const f=z(0),u=I(o);if((u||!u&&!r)&&((et(o)!=="body"||rt(s))&&(a=ht(o)),I(o))){const d=G(o);l=J(o),f.x=d.x+o.clientLeft,f.y=d.y+o.clientTop}const p=s&&!u&&!r?Gt(s,a,!0):z(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+f.x+p.x,y:n.y*l.y-a.scrollTop*l.y+f.y+p.y}}function on(t){return Array.from(t.getClientRects())}function rn(t){const e=Y(t),n=ht(t),o=t.ownerDocument.body,i=H(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=H(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Et(t);const c=-n.scrollTop;return B(o).direction==="rtl"&&(s+=H(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}function sn(t,e){const n=W(t),o=Y(t),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,c=0,a=0;if(i){r=i.width,s=i.height;const l=Ot();(!l||l&&e==="fixed")&&(c=i.offsetLeft,a=i.offsetTop)}return{width:r,height:s,x:c,y:a}}const cn=new Set(["absolute","fixed"]);function ln(t,e){const n=G(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=I(t)?J(t):z(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,a=i*r.x,l=o*r.y;return{width:s,height:c,x:a,y:l}}function Bt(t,e,n){let o;if(e==="viewport")o=sn(t,n);else if(e==="document")o=rn(Y(t));else if(_(e))o=ln(e,n);else{const i=Kt(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return ut(o)}function Jt(t,e){const n=K(t);return n===e||!_(n)||Q(n)?!1:B(n).position==="fixed"||Jt(n,e)}function an(t,e){const n=e.get(t);if(n)return n;let o=it(t,[],!1).filter(c=>_(c)&&et(c)!=="body"),i=null;const r=B(t).position==="fixed";let s=r?K(t):t;for(;_(s)&&!Q(s);){const c=B(s),a=Ct(s);!a&&c.position==="fixed"&&(i=null),(r?!a&&!i:!a&&c.position==="static"&&!!i&&cn.has(i.position)||rt(s)&&!a&&Jt(t,s))?o=o.filter(f=>f!==s):i=c,s=K(s)}return e.set(t,o),o}function fn(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const s=[...n==="clippingAncestors"?pt(e)?[]:an(e,this._c):[].concat(n),o],c=s[0],a=s.reduce((l,f)=>{const u=Bt(e,f,i);return l.top=H(u.top,l.top),l.right=Z(u.right,l.right),l.bottom=Z(u.bottom,l.bottom),l.left=H(u.left,l.left),l},Bt(e,c,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function un(t){const{width:e,height:n}=Zt(t);return{width:e,height:n}}function dn(t,e,n){const o=I(e),i=Y(e),r=n==="fixed",s=G(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const a=z(0);function l(){a.x=Et(i)}if(o||!o&&!r)if((et(e)!=="body"||rt(i))&&(c=ht(e)),o){const d=G(e,!0,r,e);a.x=d.x+e.clientLeft,a.y=d.y+e.clientTop}else i&&l();r&&!o&&i&&l();const f=i&&!o&&!r?Gt(i,c):z(0),u=s.left+c.scrollLeft-a.x-f.x,p=s.top+c.scrollTop-a.y-f.y;return{x:u,y:p,width:s.width,height:s.height}}function gt(t){return B(t).position==="static"}function Vt(t,e){if(!I(t)||B(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Y(t)===n&&(n=n.ownerDocument.body),n}function Qt(t,e){const n=W(t);if(pt(t))return n;if(!I(t)){let i=K(t);for(;i&&!Q(i);){if(_(i)&&!gt(i))return i;i=K(i)}return n}let o=Vt(t,e);for(;o&&qe(o)&&gt(o);)o=Vt(o,e);return o&&Q(o)&&gt(o)&&!Ct(o)?n:o||Je(t)||n}const mn=async function(t){const e=this.getOffsetParent||Qt,n=this.getDimensions,o=await n(t.floating);return{reference:dn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function pn(t){return B(t).direction==="rtl"}const hn={convertOffsetParentRelativeRectToViewportRelativeRect:nn,getDocumentElement:Y,getClippingRect:fn,getOffsetParent:Qt,getElementRects:mn,getClientRects:on,getDimensions:un,getScale:J,isElement:_,isRTL:pn};function te(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function gn(t,e){let n=null,o;const i=Y(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,a){c===void 0&&(c=!1),a===void 0&&(a=1),r();const l=t.getBoundingClientRect(),{left:f,top:u,width:p,height:d}=l;if(c||e(),!p||!d)return;const m=ct(u),h=ct(i.clientWidth-(f+p)),w=ct(i.clientHeight-(u+d)),g=ct(f),A={rootMargin:-m+"px "+-h+"px "+-w+"px "+-g+"px",threshold:H(0,Z(1,a))||1};let y=!0;function v(C){const P=C[0].intersectionRatio;if(P!==a){if(!y)return s();P?s(!1,P):o=setTimeout(()=>{s(!1,1e-7)},1e3)}P===1&&!te(l,t.getBoundingClientRect())&&s(),y=!1}try{n=new IntersectionObserver(v,{...A,root:i.ownerDocument})}catch{n=new IntersectionObserver(v,A)}n.observe(t)}return s(!0),r}function wn(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=o,l=St(t),f=i||r?[...l?it(l):[],...it(e)]:[];f.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),r&&g.addEventListener("resize",n)});const u=l&&c?gn(l,n):null;let p=-1,d=null;s&&(d=new ResizeObserver(g=>{let[x]=g;x&&x.target===l&&d&&(d.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var A;(A=d)==null||A.observe(e)})),n()}),l&&!a&&d.observe(l),d.observe(e));let m,h=a?G(t):null;a&&w();function w(){const g=G(t);h&&!te(h,g)&&n(),h=g,m=requestAnimationFrame(w)}return n(),()=>{var g;f.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),u?.(),(g=d)==null||g.disconnect(),d=null,a&&cancelAnimationFrame(m)}}const xn=Ve,yn=je,vn=We,An=Ie,bn=_e,jt=He,Rn=ze,Pn=(t,e,n)=>{const o=new Map,i={platform:hn,...n},r={...i.platform,_c:o};return Fe(t,e,{...i,platform:r})};var Cn=typeof document<"u",On=function(){},lt=Cn?R.useLayoutEffect:On;function dt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!dt(t[o],e[o]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,i[o]))return!1;for(o=n;o--!==0;){const r=i[o];if(!(r==="_owner"&&t.$$typeof)&&!dt(t[r],e[r]))return!1}return!0}return t!==t&&e!==e}function ee(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function zt(t,e){const n=ee(t);return Math.round(e*n)/n}function wt(t){const e=R.useRef(t);return lt(()=>{e.current=t}),e}function Sn(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:r,floating:s}={},transform:c=!0,whileElementsMounted:a,open:l}=t,[f,u]=R.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[p,d]=R.useState(o);dt(p,o)||d(o);const[m,h]=R.useState(null),[w,g]=R.useState(null),x=R.useCallback(b=>{b!==C.current&&(C.current=b,h(b))},[]),A=R.useCallback(b=>{b!==P.current&&(P.current=b,g(b))},[]),y=r||m,v=s||w,C=R.useRef(null),P=R.useRef(null),T=R.useRef(f),N=a!=null,L=wt(a),$=wt(i),k=wt(l),S=R.useCallback(()=>{if(!C.current||!P.current)return;const b={placement:e,strategy:n,middleware:p};$.current&&(b.platform=$.current),Pn(C.current,P.current,b).then(M=>{const V={...M,isPositioned:k.current!==!1};O.current&&!dt(T.current,V)&&(T.current=V,Ae.flushSync(()=>{u(V)}))})},[p,e,n,$,k]);lt(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(b=>({...b,isPositioned:!1})))},[l]);const O=R.useRef(!1);lt(()=>(O.current=!0,()=>{O.current=!1}),[]),lt(()=>{if(y&&(C.current=y),v&&(P.current=v),y&&v){if(L.current)return L.current(y,v,S);S()}},[y,v,S,L,N]);const F=R.useMemo(()=>({reference:C,floating:P,setReference:x,setFloating:A}),[x,A]),E=R.useMemo(()=>({reference:y,floating:v}),[y,v]),D=R.useMemo(()=>{const b={position:n,left:0,top:0};if(!E.floating)return b;const M=zt(E.floating,f.x),V=zt(E.floating,f.y);return c?{...b,transform:"translate("+M+"px, "+V+"px)",...ee(E.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:V}},[n,c,E.floating,f.x,f.y]);return R.useMemo(()=>({...f,update:S,refs:F,elements:E,floatingStyles:D}),[f,S,F,E,D])}const En=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:i}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?jt({element:o.current,padding:i}).fn(n):{}:o?jt({element:o,padding:i}).fn(n):{}}}},Dn=(t,e)=>({...xn(t),options:[t,e]}),Ln=(t,e)=>({...yn(t),options:[t,e]}),Tn=(t,e)=>({...Rn(t),options:[t,e]}),Mn=(t,e)=>({...vn(t),options:[t,e]}),$n=(t,e)=>({...An(t),options:[t,e]}),kn=(t,e)=>({...bn(t),options:[t,e]}),Nn=(t,e)=>({...En(t),options:[t,e]});var Fn="Arrow",ne=R.forwardRef((t,e)=>{const{children:n,width:o=10,height:i=5,...r}=t;return X.jsx(At.svg,{...r,ref:e,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:X.jsx("polygon",{points:"0,0 30,0 15,10"})})});ne.displayName=Fn;var Hn=ne,Dt="Popper",[oe,Zn]=be(Dt),[Wn,ie]=oe(Dt),re=t=>{const{__scopePopper:e,children:n}=t,[o,i]=R.useState(null);return X.jsx(Wn,{scope:e,anchor:o,onAnchorChange:i,children:n})};re.displayName=Dt;var se="PopperAnchor",ce=R.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:o,...i}=t,r=ie(se,n),s=R.useRef(null),c=It(e,s);return R.useEffect(()=>{r.onAnchorChange(o?.current||s.current)}),o?null:X.jsx(At.div,{...i,ref:c})});ce.displayName=se;var Lt="PopperContent",[_n,Bn]=oe(Lt),le=R.forwardRef((t,e)=>{const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:r="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:a=!0,collisionBoundary:l=[],collisionPadding:f=0,sticky:u="partial",hideWhenDetached:p=!1,updatePositionStrategy:d="optimized",onPlaced:m,...h}=t,w=ie(Lt,n),[g,x]=R.useState(null),A=It(e,nt=>x(nt)),[y,v]=R.useState(null),C=Re(y),P=C?.width??0,T=C?.height??0,N=o+(r!=="center"?"-"+r:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},$=Array.isArray(l)?l:[l],k=$.length>0,S={padding:L,boundary:$.filter(jn),altBoundary:k},{refs:O,floatingStyles:F,placement:E,isPositioned:D,middlewareData:b}=Sn({strategy:"fixed",placement:N,whileElementsMounted:(...nt)=>wn(...nt,{animationFrame:d==="always"}),elements:{reference:w.anchor},middleware:[Dn({mainAxis:i+T,alignmentAxis:s}),a&&Ln({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Tn():void 0,...S}),a&&Mn({...S}),$n({...S,apply:({elements:nt,rects:Mt,availableWidth:we,availableHeight:xe})=>{const{width:ye,height:ve}=Mt.reference,st=nt.floating.style;st.setProperty("--radix-popper-available-width",`${we}px`),st.setProperty("--radix-popper-available-height",`${xe}px`),st.setProperty("--radix-popper-anchor-width",`${ye}px`),st.setProperty("--radix-popper-anchor-height",`${ve}px`)}}),y&&Nn({element:y,padding:c}),zn({arrowWidth:P,arrowHeight:T}),p&&kn({strategy:"referenceHidden",...S})]}),[M,V]=ue(E),Tt=Pe(m);$t(()=>{D&&Tt?.()},[D,Tt]);const de=b.arrow?.x,me=b.arrow?.y,pe=b.arrow?.centerOffset!==0,[he,ge]=R.useState();return $t(()=>{g&&ge(window.getComputedStyle(g).zIndex)},[g]),X.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:D?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:he,"--radix-popper-transform-origin":[b.transformOrigin?.x,b.transformOrigin?.y].join(" "),...b.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:X.jsx(_n,{scope:n,placedSide:M,onArrowChange:v,arrowX:de,arrowY:me,shouldHideArrow:pe,children:X.jsx(At.div,{"data-side":M,"data-align":V,...h,ref:A,style:{...h.style,animation:D?void 0:"none"}})})})});le.displayName=Lt;var ae="PopperArrow",Vn={top:"bottom",right:"left",bottom:"top",left:"right"},fe=R.forwardRef(function(e,n){const{__scopePopper:o,...i}=e,r=Bn(ae,o),s=Vn[r.placedSide];return X.jsx("span",{ref:r.onArrowChange,style:{position:"absolute",left:r.arrowX,top:r.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[r.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[r.placedSide],visibility:r.shouldHideArrow?"hidden":void 0},children:X.jsx(Hn,{...i,ref:n,style:{...i.style,display:"block"}})})});fe.displayName=ae;function jn(t){return t!==null}var zn=t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:o,middlewareData:i}=e,s=i.arrow?.centerOffset!==0,c=s?0:t.arrowWidth,a=s?0:t.arrowHeight,[l,f]=ue(n),u={start:"0%",center:"50%",end:"100%"}[f],p=(i.arrow?.x??0)+c/2,d=(i.arrow?.y??0)+a/2;let m="",h="";return l==="bottom"?(m=s?u:`${p}px`,h=`${-a}px`):l==="top"?(m=s?u:`${p}px`,h=`${o.floating.height+a}px`):l==="right"?(m=`${-a}px`,h=s?u:`${d}px`):l==="left"&&(m=`${o.floating.width+a}px`,h=s?u:`${d}px`),{data:{x:m,y:h}}}});function ue(t){const[e,n="center"]=t.split("-");return[e,n]}var Kn=re,Gn=ce,Jn=le,Qn=fe;export{Gn as A,Jn as C,Kn as R,Qn as a,Zn as c};
@@ -1,4 +1,4 @@
1
- import{a,B as et,p as g}from"./chunk-EF7DTUVF-CaKisB5m.js";import{d as Se,P as x,a as A,f as tt,u as nt,c as rt,b as ie,g as ot}from"./index-NRYqpySi.js";import{u as _,b as at}from"./index-BeLOjj93.js";import{R as it}from"./index-BJ-ODQ_I.js";import{_ as N,a as we,b as st}from"./tslib.es6-De9GV7Vy.js";var ct=et[" useId ".trim().toString()]||(()=>{}),ut=0;function Z(e){const[t,n]=a.useState(ct());return Se(()=>{n(r=>r??String(ut++))},[e]),e||(t?`radix-${t}`:"")}function B(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>t.current?.(...n),[])}function lt(e,t=globalThis?.document){const n=B(e);a.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var dt="DismissableLayer",oe="dismissableLayer.update",ft="dismissableLayer.pointerDownOutside",vt="dismissableLayer.focusOutside",le,De=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Re=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:u,onDismiss:s,...E}=e,l=a.useContext(De),[d,v]=a.useState(null),h=d?.ownerDocument??globalThis?.document,[,y]=a.useState({}),D=_(t,p=>v(p)),c=Array.from(l.layers),[f]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),m=c.indexOf(f),b=d?c.indexOf(d):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,S=b>=m,w=gt(p=>{const O=p.target,W=[...l.branches].some(z=>z.contains(O));!S||W||(o?.(p),u?.(p),p.defaultPrevented||s?.())},h),P=pt(p=>{const O=p.target;[...l.branches].some(z=>z.contains(O))||(i?.(p),u?.(p),p.defaultPrevented||s?.())},h);return lt(p=>{b===l.layers.size-1&&(r?.(p),!p.defaultPrevented&&s&&(p.preventDefault(),s()))},h),a.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(le=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),de(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=le)}},[d,h,n,l]),a.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),de())},[d,l]),a.useEffect(()=>{const p=()=>y({});return document.addEventListener(oe,p),()=>document.removeEventListener(oe,p)},[]),g.jsx(x.div,{...E,ref:D,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:A(e.onFocusCapture,P.onFocusCapture),onBlurCapture:A(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,w.onPointerDownCapture)})});Re.displayName=dt;var ht="DismissableLayerBranch",mt=a.forwardRef((e,t)=>{const n=a.useContext(De),r=a.useRef(null),o=_(t,r);return a.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),g.jsx(x.div,{...e,ref:o})});mt.displayName=ht;function gt(e,t=globalThis?.document){const n=B(e),r=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let E=function(){Pe(ft,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=E,t.addEventListener("click",o.current,{once:!0})):E()}else t.removeEventListener("click",o.current);r.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function pt(e,t=globalThis?.document){const n=B(e),r=a.useRef(!1);return a.useEffect(()=>{const o=i=>{i.target&&!r.current&&Pe(vt,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function de(){const e=new CustomEvent(oe);document.dispatchEvent(e)}function Pe(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?tt(o,i):o.dispatchEvent(i)}var q="focusScope.autoFocusOnMount",Q="focusScope.autoFocusOnUnmount",fe={bubbles:!1,cancelable:!0},Et="FocusScope",Oe=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...u}=e,[s,E]=a.useState(null),l=B(o),d=B(i),v=a.useRef(null),h=_(t,c=>E(c)),y=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let c=function(C){if(y.paused||!s)return;const S=C.target;s.contains(S)?v.current=S:T(v.current,{select:!0})},f=function(C){if(y.paused||!s)return;const S=C.relatedTarget;S!==null&&(s.contains(S)||T(v.current,{select:!0}))},m=function(C){if(document.activeElement===document.body)for(const w of C)w.removedNodes.length>0&&T(s)};document.addEventListener("focusin",c),document.addEventListener("focusout",f);const b=new MutationObserver(m);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",c),document.removeEventListener("focusout",f),b.disconnect()}}},[r,s,y.paused]),a.useEffect(()=>{if(s){he.add(y);const c=document.activeElement;if(!s.contains(c)){const m=new CustomEvent(q,fe);s.addEventListener(q,l),s.dispatchEvent(m),m.defaultPrevented||(yt(Dt(xe(s)),{select:!0}),document.activeElement===c&&T(s))}return()=>{s.removeEventListener(q,l),setTimeout(()=>{const m=new CustomEvent(Q,fe);s.addEventListener(Q,d),s.dispatchEvent(m),m.defaultPrevented||T(c??document.body,{select:!0}),s.removeEventListener(Q,d),he.remove(y)},0)}}},[s,l,d,y]);const D=a.useCallback(c=>{if(!n&&!r||y.paused)return;const f=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,m=document.activeElement;if(f&&m){const b=c.currentTarget,[C,S]=bt(b);C&&S?!c.shiftKey&&m===S?(c.preventDefault(),n&&T(C,{select:!0})):c.shiftKey&&m===C&&(c.preventDefault(),n&&T(S,{select:!0})):m===b&&c.preventDefault()}},[n,r,y.paused]);return g.jsx(x.div,{tabIndex:-1,...u,ref:h,onKeyDown:D})});Oe.displayName=Et;function yt(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(T(r,{select:t}),document.activeElement!==n)return}function bt(e){const t=xe(e),n=ve(t,e),r=ve(t.reverse(),e);return[n,r]}function xe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ve(e,t){for(const n of e)if(!Ct(n,{upTo:t}))return n}function Ct(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function St(e){return e instanceof HTMLInputElement&&"select"in e}function T(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&St(e)&&t&&e.select()}}var he=wt();function wt(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=me(e,t),e.unshift(t)},remove(t){e=me(e,t),e[0]?.resume()}}}function me(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Dt(e){return e.filter(t=>t.tagName!=="A")}var Rt="Portal",Te=a.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=a.useState(!1);Se(()=>i(!0),[]);const u=n||o&&globalThis?.document?.body;return u?it.createPortal(g.jsx(x.div,{...r,ref:t}),u):null});Te.displayName=Rt;var J=0;function Pt(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ge()),document.body.insertAdjacentElement("beforeend",e[1]??ge()),J++,()=>{J===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),J--}},[])}function ge(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var G="right-scroll-bar-position",V="width-before-scroll-bar",Ot="with-scroll-bars-hidden",xt="--removed-body-scroll-bar-size";function ee(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Tt(e,t){var n=a.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Nt=typeof window<"u"?a.useLayoutEffect:a.useEffect,pe=new WeakMap;function At(e,t){var n=Tt(null,function(r){return e.forEach(function(o){return ee(o,r)})});return Nt(function(){var r=pe.get(n);if(r){var o=new Set(r),i=new Set(e),u=n.current;o.forEach(function(s){i.has(s)||ee(s,null)}),i.forEach(function(s){o.has(s)||ee(s,u)})}pe.set(n,e)},[e]),n}function It(e){return e}function Lt(e,t){t===void 0&&(t=It);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var u=t(i,r);return n.push(u),function(){n=n.filter(function(s){return s!==u})}},assignSyncMedium:function(i){for(r=!0;n.length;){var u=n;n=[],u.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var u=[];if(n.length){var s=n;n=[],s.forEach(i),u=n}var E=function(){var d=u;u=[],d.forEach(i)},l=function(){return Promise.resolve().then(E)};l(),n={push:function(d){u.push(d),l()},filter:function(d){return u=u.filter(d),n}}}};return o}function Mt(e){e===void 0&&(e={});var t=Lt(null);return t.options=N({async:!0,ssr:!1},e),t}var Ne=function(e){var t=e.sideCar,n=we(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return a.createElement(r,N({},n))};Ne.isSideCarExport=!0;function Ft(e,t){return e.useMedium(t),Ne}var Ae=Mt(),te=function(){},X=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:te,onWheelCapture:te,onTouchMoveCapture:te}),o=r[0],i=r[1],u=e.forwardProps,s=e.children,E=e.className,l=e.removeScrollBar,d=e.enabled,v=e.shards,h=e.sideCar,y=e.noRelative,D=e.noIsolation,c=e.inert,f=e.allowPinchZoom,m=e.as,b=m===void 0?"div":m,C=e.gapMode,S=we(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,P=At([n,t]),p=N(N({},S),o);return a.createElement(a.Fragment,null,d&&a.createElement(w,{sideCar:Ae,removeScrollBar:l,shards:v,noRelative:y,noIsolation:D,inert:c,setCallbacks:i,allowPinchZoom:!!f,lockRef:n,gapMode:C}),u?a.cloneElement(a.Children.only(s),N(N({},p),{ref:P})):a.createElement(b,N({},p,{className:E,ref:P}),s))});X.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};X.classNames={fullWidth:V,zeroRight:G};var kt=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _t(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=kt();return t&&e.setAttribute("nonce",t),e}function Wt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Bt(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var jt=function(){var e=0,t=null;return{add:function(n){e==0&&(t=_t())&&(Wt(t,n),Bt(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ut=function(){var e=jt();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ie=function(){var e=Ut(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Kt={left:0,top:0,right:0,gap:0},ne=function(e){return parseInt(e||"",10)||0},Ht=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ne(n),ne(r),ne(o)]},Gt=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Kt;var t=Ht(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Vt=Ie(),k="data-scroll-locked",Yt=function(e,t,n,r){var o=e.left,i=e.top,u=e.right,s=e.gap;return n===void 0&&(n="margin"),`
1
+ import{a,B as et,p as g}from"./chunk-EF7DTUVF-CaKisB5m.js";import{d as Se,P as x,a as A,f as tt,u as nt,c as rt,b as ie,g as ot}from"./index-NRYqpySi.js";import{u as _,b as at}from"./index-BeLOjj93.js";import{R as it}from"./index-BJ-ODQ_I.js";import{_ as N,a as we,b as st}from"./tslib.es6-Dilv5nzk.js";var ct=et[" useId ".trim().toString()]||(()=>{}),ut=0;function Z(e){const[t,n]=a.useState(ct());return Se(()=>{n(r=>r??String(ut++))},[e]),e||(t?`radix-${t}`:"")}function B(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>t.current?.(...n),[])}function lt(e,t=globalThis?.document){const n=B(e);a.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var dt="DismissableLayer",oe="dismissableLayer.update",ft="dismissableLayer.pointerDownOutside",vt="dismissableLayer.focusOutside",le,De=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Re=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:u,onDismiss:s,...E}=e,l=a.useContext(De),[d,v]=a.useState(null),h=d?.ownerDocument??globalThis?.document,[,y]=a.useState({}),D=_(t,p=>v(p)),c=Array.from(l.layers),[f]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),m=c.indexOf(f),b=d?c.indexOf(d):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,S=b>=m,w=gt(p=>{const O=p.target,W=[...l.branches].some(z=>z.contains(O));!S||W||(o?.(p),u?.(p),p.defaultPrevented||s?.())},h),P=pt(p=>{const O=p.target;[...l.branches].some(z=>z.contains(O))||(i?.(p),u?.(p),p.defaultPrevented||s?.())},h);return lt(p=>{b===l.layers.size-1&&(r?.(p),!p.defaultPrevented&&s&&(p.preventDefault(),s()))},h),a.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(le=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),de(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=le)}},[d,h,n,l]),a.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),de())},[d,l]),a.useEffect(()=>{const p=()=>y({});return document.addEventListener(oe,p),()=>document.removeEventListener(oe,p)},[]),g.jsx(x.div,{...E,ref:D,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:A(e.onFocusCapture,P.onFocusCapture),onBlurCapture:A(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,w.onPointerDownCapture)})});Re.displayName=dt;var ht="DismissableLayerBranch",mt=a.forwardRef((e,t)=>{const n=a.useContext(De),r=a.useRef(null),o=_(t,r);return a.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),g.jsx(x.div,{...e,ref:o})});mt.displayName=ht;function gt(e,t=globalThis?.document){const n=B(e),r=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let E=function(){Pe(ft,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=E,t.addEventListener("click",o.current,{once:!0})):E()}else t.removeEventListener("click",o.current);r.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function pt(e,t=globalThis?.document){const n=B(e),r=a.useRef(!1);return a.useEffect(()=>{const o=i=>{i.target&&!r.current&&Pe(vt,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function de(){const e=new CustomEvent(oe);document.dispatchEvent(e)}function Pe(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?tt(o,i):o.dispatchEvent(i)}var q="focusScope.autoFocusOnMount",Q="focusScope.autoFocusOnUnmount",fe={bubbles:!1,cancelable:!0},Et="FocusScope",Oe=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...u}=e,[s,E]=a.useState(null),l=B(o),d=B(i),v=a.useRef(null),h=_(t,c=>E(c)),y=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let c=function(C){if(y.paused||!s)return;const S=C.target;s.contains(S)?v.current=S:T(v.current,{select:!0})},f=function(C){if(y.paused||!s)return;const S=C.relatedTarget;S!==null&&(s.contains(S)||T(v.current,{select:!0}))},m=function(C){if(document.activeElement===document.body)for(const w of C)w.removedNodes.length>0&&T(s)};document.addEventListener("focusin",c),document.addEventListener("focusout",f);const b=new MutationObserver(m);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",c),document.removeEventListener("focusout",f),b.disconnect()}}},[r,s,y.paused]),a.useEffect(()=>{if(s){he.add(y);const c=document.activeElement;if(!s.contains(c)){const m=new CustomEvent(q,fe);s.addEventListener(q,l),s.dispatchEvent(m),m.defaultPrevented||(yt(Dt(xe(s)),{select:!0}),document.activeElement===c&&T(s))}return()=>{s.removeEventListener(q,l),setTimeout(()=>{const m=new CustomEvent(Q,fe);s.addEventListener(Q,d),s.dispatchEvent(m),m.defaultPrevented||T(c??document.body,{select:!0}),s.removeEventListener(Q,d),he.remove(y)},0)}}},[s,l,d,y]);const D=a.useCallback(c=>{if(!n&&!r||y.paused)return;const f=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,m=document.activeElement;if(f&&m){const b=c.currentTarget,[C,S]=bt(b);C&&S?!c.shiftKey&&m===S?(c.preventDefault(),n&&T(C,{select:!0})):c.shiftKey&&m===C&&(c.preventDefault(),n&&T(S,{select:!0})):m===b&&c.preventDefault()}},[n,r,y.paused]);return g.jsx(x.div,{tabIndex:-1,...u,ref:h,onKeyDown:D})});Oe.displayName=Et;function yt(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(T(r,{select:t}),document.activeElement!==n)return}function bt(e){const t=xe(e),n=ve(t,e),r=ve(t.reverse(),e);return[n,r]}function xe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ve(e,t){for(const n of e)if(!Ct(n,{upTo:t}))return n}function Ct(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function St(e){return e instanceof HTMLInputElement&&"select"in e}function T(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&St(e)&&t&&e.select()}}var he=wt();function wt(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=me(e,t),e.unshift(t)},remove(t){e=me(e,t),e[0]?.resume()}}}function me(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Dt(e){return e.filter(t=>t.tagName!=="A")}var Rt="Portal",Te=a.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=a.useState(!1);Se(()=>i(!0),[]);const u=n||o&&globalThis?.document?.body;return u?it.createPortal(g.jsx(x.div,{...r,ref:t}),u):null});Te.displayName=Rt;var J=0;function Pt(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ge()),document.body.insertAdjacentElement("beforeend",e[1]??ge()),J++,()=>{J===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),J--}},[])}function ge(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var G="right-scroll-bar-position",V="width-before-scroll-bar",Ot="with-scroll-bars-hidden",xt="--removed-body-scroll-bar-size";function ee(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Tt(e,t){var n=a.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Nt=typeof window<"u"?a.useLayoutEffect:a.useEffect,pe=new WeakMap;function At(e,t){var n=Tt(null,function(r){return e.forEach(function(o){return ee(o,r)})});return Nt(function(){var r=pe.get(n);if(r){var o=new Set(r),i=new Set(e),u=n.current;o.forEach(function(s){i.has(s)||ee(s,null)}),i.forEach(function(s){o.has(s)||ee(s,u)})}pe.set(n,e)},[e]),n}function It(e){return e}function Lt(e,t){t===void 0&&(t=It);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var u=t(i,r);return n.push(u),function(){n=n.filter(function(s){return s!==u})}},assignSyncMedium:function(i){for(r=!0;n.length;){var u=n;n=[],u.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var u=[];if(n.length){var s=n;n=[],s.forEach(i),u=n}var E=function(){var d=u;u=[],d.forEach(i)},l=function(){return Promise.resolve().then(E)};l(),n={push:function(d){u.push(d),l()},filter:function(d){return u=u.filter(d),n}}}};return o}function Mt(e){e===void 0&&(e={});var t=Lt(null);return t.options=N({async:!0,ssr:!1},e),t}var Ne=function(e){var t=e.sideCar,n=we(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return a.createElement(r,N({},n))};Ne.isSideCarExport=!0;function Ft(e,t){return e.useMedium(t),Ne}var Ae=Mt(),te=function(){},X=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:te,onWheelCapture:te,onTouchMoveCapture:te}),o=r[0],i=r[1],u=e.forwardProps,s=e.children,E=e.className,l=e.removeScrollBar,d=e.enabled,v=e.shards,h=e.sideCar,y=e.noRelative,D=e.noIsolation,c=e.inert,f=e.allowPinchZoom,m=e.as,b=m===void 0?"div":m,C=e.gapMode,S=we(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,P=At([n,t]),p=N(N({},S),o);return a.createElement(a.Fragment,null,d&&a.createElement(w,{sideCar:Ae,removeScrollBar:l,shards:v,noRelative:y,noIsolation:D,inert:c,setCallbacks:i,allowPinchZoom:!!f,lockRef:n,gapMode:C}),u?a.cloneElement(a.Children.only(s),N(N({},p),{ref:P})):a.createElement(b,N({},p,{className:E,ref:P}),s))});X.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};X.classNames={fullWidth:V,zeroRight:G};var kt=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _t(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=kt();return t&&e.setAttribute("nonce",t),e}function Wt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Bt(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var jt=function(){var e=0,t=null;return{add:function(n){e==0&&(t=_t())&&(Wt(t,n),Bt(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ut=function(){var e=jt();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ie=function(){var e=Ut(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Kt={left:0,top:0,right:0,gap:0},ne=function(e){return parseInt(e||"",10)||0},Ht=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ne(n),ne(r),ne(o)]},Gt=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Kt;var t=Ht(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Vt=Ie(),k="data-scroll-locked",Yt=function(e,t,n,r){var o=e.left,i=e.top,u=e.right,s=e.gap;return n===void 0&&(n="margin"),`
2
2
  .`.concat(Ot,` {
3
3
  overflow: hidden `).concat(r,`;
4
4
  padding-right: `).concat(s,"px ").concat(r,`;
@@ -0,0 +1 @@
1
+ import{R as a}from"./chunk-EF7DTUVF-CaKisB5m.js";import{R as Ut}from"./index-BJ-ODQ_I.js";function Xt(r){if(typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style");e.type="text/css",o.appendChild(e),e.styleSheet?e.styleSheet.cssText=r:e.appendChild(document.createTextNode(r))}const Wt=r=>{switch(r){case"success":return Gt;case"info":return Jt;case"warning":return Qt;case"error":return Zt;default:return null}},Kt=Array(12).fill(0),qt=({visible:r,className:o})=>a.createElement("div",{className:["sonner-loading-wrapper",o].filter(Boolean).join(" "),"data-visible":r},a.createElement("div",{className:"sonner-spinner"},Kt.map((e,s)=>a.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),Gt=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},a.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Qt=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},a.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Jt=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},a.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Zt=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},a.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),te=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ee=()=>{const[r,o]=a.useState(document.hidden);return a.useEffect(()=>{const e=()=>{o(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),r};let yt=1;class ae{constructor(){this.subscribe=o=>(this.subscribers.push(o),()=>{const e=this.subscribers.indexOf(o);this.subscribers.splice(e,1)}),this.publish=o=>{this.subscribers.forEach(e=>e(o))},this.addToast=o=>{this.publish(o),this.toasts=[...this.toasts,o]},this.create=o=>{var e;const{message:s,...R}=o,c=typeof o?.id=="number"||((e=o.id)==null?void 0:e.length)>0?o.id:yt++,v=this.toasts.find(h=>h.id===c),N=o.dismissible===void 0?!0:o.dismissible;return this.dismissedToasts.has(c)&&this.dismissedToasts.delete(c),v?this.toasts=this.toasts.map(h=>h.id===c?(this.publish({...h,...o,id:c,title:s}),{...h,...o,id:c,dismissible:N,title:s}):h):this.addToast({title:s,...R,dismissible:N,id:c}),c},this.dismiss=o=>(o?(this.dismissedToasts.add(o),requestAnimationFrame(()=>this.subscribers.forEach(e=>e({id:o,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(s=>s({id:e.id,dismiss:!0}))}),o),this.message=(o,e)=>this.create({...e,message:o}),this.error=(o,e)=>this.create({...e,message:o,type:"error"}),this.success=(o,e)=>this.create({...e,type:"success",message:o}),this.info=(o,e)=>this.create({...e,type:"info",message:o}),this.warning=(o,e)=>this.create({...e,type:"warning",message:o}),this.loading=(o,e)=>this.create({...e,type:"loading",message:o}),this.promise=(o,e)=>{if(!e)return;let s;e.loading!==void 0&&(s=this.create({...e,promise:o,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));const R=Promise.resolve(o instanceof Function?o():o);let c=s!==void 0,v;const N=R.then(async i=>{if(v=["resolve",i],a.isValidElement(i))c=!1,this.create({id:s,type:"default",message:i});else if(se(i)&&!i.ok){c=!1;const t=typeof e.error=="function"?await e.error(`HTTP error! status: ${i.status}`):e.error,C=typeof e.description=="function"?await e.description(`HTTP error! status: ${i.status}`):e.description,w=typeof t=="object"&&!a.isValidElement(t)?t:{message:t};this.create({id:s,type:"error",description:C,...w})}else if(i instanceof Error){c=!1;const t=typeof e.error=="function"?await e.error(i):e.error,C=typeof e.description=="function"?await e.description(i):e.description,w=typeof t=="object"&&!a.isValidElement(t)?t:{message:t};this.create({id:s,type:"error",description:C,...w})}else if(e.success!==void 0){c=!1;const t=typeof e.success=="function"?await e.success(i):e.success,C=typeof e.description=="function"?await e.description(i):e.description,w=typeof t=="object"&&!a.isValidElement(t)?t:{message:t};this.create({id:s,type:"success",description:C,...w})}}).catch(async i=>{if(v=["reject",i],e.error!==void 0){c=!1;const x=typeof e.error=="function"?await e.error(i):e.error,t=typeof e.description=="function"?await e.description(i):e.description,z=typeof x=="object"&&!a.isValidElement(x)?x:{message:x};this.create({id:s,type:"error",description:t,...z})}}).finally(()=>{c&&(this.dismiss(s),s=void 0),e.finally==null||e.finally.call(e)}),h=()=>new Promise((i,x)=>N.then(()=>v[0]==="reject"?x(v[1]):i(v[1])).catch(x));return typeof s!="string"&&typeof s!="number"?{unwrap:h}:Object.assign(s,{unwrap:h})},this.custom=(o,e)=>{const s=e?.id||yt++;return this.create({jsx:o(s),id:s,...e}),s},this.getActiveToasts=()=>this.toasts.filter(o=>!this.dismissedToasts.has(o.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const E=new ae,oe=(r,o)=>{const e=o?.id||yt++;return E.addToast({title:r,...o,id:e}),e},se=r=>r&&typeof r=="object"&&"ok"in r&&typeof r.ok=="boolean"&&"status"in r&&typeof r.status=="number",ne=oe,re=()=>E.toasts,ie=()=>E.getActiveToasts(),xe=Object.assign(ne,{success:E.success,info:E.info,warning:E.warning,error:E.error,custom:E.custom,message:E.message,promise:E.promise,dismiss:E.dismiss,loading:E.loading},{getHistory:re,getToasts:ie});Xt("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function ct(r){return r.label!==void 0}const le=3,de="24px",ce="16px",Bt=4e3,ue=356,fe=14,me=45,pe=200;function O(...r){return r.filter(Boolean).join(" ")}function ge(r){const[o,e]=r.split("-"),s=[];return o&&s.push(o),e&&s.push(e),s}const he=r=>{var o,e,s,R,c,v,N,h,i;const{invert:x,toast:t,unstyled:C,interacting:z,setHeights:w,visibleToasts:ut,heights:u,index:P,toasts:st,expanded:Q,removeToast:nt,defaultRichColors:A,closeButton:U,style:ft,cancelButtonStyle:rt,actionButtonStyle:mt,className:pt="",descriptionClassName:j="",duration:X,position:J,gap:gt,expandByDefault:H,classNames:l,icons:D,closeButtonAriaLabel:L="Close toast"}=r,[B,Z]=a.useState(null),[d,m]=a.useState(null),[f,k]=a.useState(!1),[F,p]=a.useState(!1),[tt,W]=a.useState(!1),[et,at]=a.useState(!1),[It,wt]=a.useState(!1),[Ct,ht]=a.useState(0),[At,xt]=a.useState(0),ot=a.useRef(t.duration||X||Bt),Et=a.useRef(null),Y=a.useRef(null),Ht=P===0,Ot=P+1<=ut,T=t.type,K=t.dismissible!==!1,zt=t.className||"",Pt=t.descriptionClassName||"",it=a.useMemo(()=>u.findIndex(n=>n.toastId===t.id)||0,[u,t.id]),jt=a.useMemo(()=>{var n;return(n=t.closeButton)!=null?n:U},[t.closeButton,U]),Tt=a.useMemo(()=>t.duration||X||Bt,[t.duration,X]),bt=a.useRef(0),q=a.useRef(0),St=a.useRef(0),G=a.useRef(null),[Lt,Yt]=J.split("-"),Nt=a.useMemo(()=>u.reduce((n,g,y)=>y>=it?n:n+g.height,0),[u,it]),kt=ee(),$t=t.invert||x,vt=T==="loading";q.current=a.useMemo(()=>it*gt+Nt,[it,Nt]),a.useEffect(()=>{ot.current=Tt},[Tt]),a.useEffect(()=>{k(!0)},[]),a.useEffect(()=>{const n=Y.current;if(n){const g=n.getBoundingClientRect().height;return xt(g),w(y=>[{toastId:t.id,height:g,position:t.position},...y]),()=>w(y=>y.filter(S=>S.toastId!==t.id))}},[w,t.id]),a.useLayoutEffect(()=>{if(!f)return;const n=Y.current,g=n.style.height;n.style.height="auto";const y=n.getBoundingClientRect().height;n.style.height=g,xt(y),w(S=>S.find(b=>b.toastId===t.id)?S.map(b=>b.toastId===t.id?{...b,height:y}:b):[{toastId:t.id,height:y,position:t.position},...S])},[f,t.title,t.description,w,t.id,t.jsx,t.action,t.cancel]);const $=a.useCallback(()=>{p(!0),ht(q.current),w(n=>n.filter(g=>g.toastId!==t.id)),setTimeout(()=>{nt(t)},pe)},[t,nt,w,q]);a.useEffect(()=>{if(t.promise&&T==="loading"||t.duration===1/0||t.type==="loading")return;let n;return Q||z||kt?(()=>{if(St.current<bt.current){const S=new Date().getTime()-bt.current;ot.current=ot.current-S}St.current=new Date().getTime()})():(()=>{ot.current!==1/0&&(bt.current=new Date().getTime(),n=setTimeout(()=>{t.onAutoClose==null||t.onAutoClose.call(t,t),$()},ot.current))})(),()=>clearTimeout(n)},[Q,z,t,T,kt,$]),a.useEffect(()=>{t.delete&&($(),t.onDismiss==null||t.onDismiss.call(t,t))},[$,t.delete]);function Ft(){var n;if(D?.loading){var g;return a.createElement("div",{className:O(l?.loader,t==null||(g=t.classNames)==null?void 0:g.loader,"sonner-loader"),"data-visible":T==="loading"},D.loading)}return a.createElement(qt,{className:O(l?.loader,t==null||(n=t.classNames)==null?void 0:n.loader),visible:T==="loading"})}const Vt=t.icon||D?.[T]||Wt(T);var _t,Rt;return a.createElement("li",{tabIndex:0,ref:Y,className:O(pt,zt,l?.toast,t==null||(o=t.classNames)==null?void 0:o.toast,l?.default,l?.[T],t==null||(e=t.classNames)==null?void 0:e[T]),"data-sonner-toast":"","data-rich-colors":(_t=t.richColors)!=null?_t:A,"data-styled":!(t.jsx||t.unstyled||C),"data-mounted":f,"data-promise":!!t.promise,"data-swiped":It,"data-removed":F,"data-visible":Ot,"data-y-position":Lt,"data-x-position":Yt,"data-index":P,"data-front":Ht,"data-swiping":tt,"data-dismissible":K,"data-type":T,"data-invert":$t,"data-swipe-out":et,"data-swipe-direction":d,"data-expanded":!!(Q||H&&f),style:{"--index":P,"--toasts-before":P,"--z-index":st.length-P,"--offset":`${F?Ct:q.current}px`,"--initial-height":H?"auto":`${At}px`,...ft,...t.style},onDragEnd:()=>{W(!1),Z(null),G.current=null},onPointerDown:n=>{n.button!==2&&(vt||!K||(Et.current=new Date,ht(q.current),n.target.setPointerCapture(n.pointerId),n.target.tagName!=="BUTTON"&&(W(!0),G.current={x:n.clientX,y:n.clientY})))},onPointerUp:()=>{var n,g,y;if(et||!K)return;G.current=null;const S=Number(((n=Y.current)==null?void 0:n.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),lt=Number(((g=Y.current)==null?void 0:g.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),b=new Date().getTime()-((y=Et.current)==null?void 0:y.getTime()),_=B==="x"?S:lt,dt=Math.abs(_)/b;if(Math.abs(_)>=me||dt>.11){ht(q.current),t.onDismiss==null||t.onDismiss.call(t,t),m(B==="x"?S>0?"right":"left":lt>0?"down":"up"),$(),at(!0);return}else{var M,I;(M=Y.current)==null||M.style.setProperty("--swipe-amount-x","0px"),(I=Y.current)==null||I.style.setProperty("--swipe-amount-y","0px")}wt(!1),W(!1),Z(null)},onPointerMove:n=>{var g,y,S;if(!G.current||!K||((g=window.getSelection())==null?void 0:g.toString().length)>0)return;const b=n.clientY-G.current.y,_=n.clientX-G.current.x;var dt;const M=(dt=r.swipeDirections)!=null?dt:ge(J);!B&&(Math.abs(_)>1||Math.abs(b)>1)&&Z(Math.abs(_)>Math.abs(b)?"x":"y");let I={x:0,y:0};const Dt=V=>1/(1.5+Math.abs(V)/20);if(B==="y"){if(M.includes("top")||M.includes("bottom"))if(M.includes("top")&&b<0||M.includes("bottom")&&b>0)I.y=b;else{const V=b*Dt(b);I.y=Math.abs(V)<Math.abs(b)?V:b}}else if(B==="x"&&(M.includes("left")||M.includes("right")))if(M.includes("left")&&_<0||M.includes("right")&&_>0)I.x=_;else{const V=_*Dt(_);I.x=Math.abs(V)<Math.abs(_)?V:_}(Math.abs(I.x)>0||Math.abs(I.y)>0)&&wt(!0),(y=Y.current)==null||y.style.setProperty("--swipe-amount-x",`${I.x}px`),(S=Y.current)==null||S.style.setProperty("--swipe-amount-y",`${I.y}px`)}},jt&&!t.jsx&&T!=="loading"?a.createElement("button",{"aria-label":L,"data-disabled":vt,"data-close-button":!0,onClick:vt||!K?()=>{}:()=>{$(),t.onDismiss==null||t.onDismiss.call(t,t)},className:O(l?.closeButton,t==null||(s=t.classNames)==null?void 0:s.closeButton)},(Rt=D?.close)!=null?Rt:te):null,(T||t.icon||t.promise)&&t.icon!==null&&(D?.[T]!==null||t.icon)?a.createElement("div",{"data-icon":"",className:O(l?.icon,t==null||(R=t.classNames)==null?void 0:R.icon)},t.promise||t.type==="loading"&&!t.icon?t.icon||Ft():null,t.type!=="loading"?Vt:null):null,a.createElement("div",{"data-content":"",className:O(l?.content,t==null||(c=t.classNames)==null?void 0:c.content)},a.createElement("div",{"data-title":"",className:O(l?.title,t==null||(v=t.classNames)==null?void 0:v.title)},t.jsx?t.jsx:typeof t.title=="function"?t.title():t.title),t.description?a.createElement("div",{"data-description":"",className:O(j,Pt,l?.description,t==null||(N=t.classNames)==null?void 0:N.description)},typeof t.description=="function"?t.description():t.description):null),a.isValidElement(t.cancel)?t.cancel:t.cancel&&ct(t.cancel)?a.createElement("button",{"data-button":!0,"data-cancel":!0,style:t.cancelButtonStyle||rt,onClick:n=>{ct(t.cancel)&&K&&(t.cancel.onClick==null||t.cancel.onClick.call(t.cancel,n),$())},className:O(l?.cancelButton,t==null||(h=t.classNames)==null?void 0:h.cancelButton)},t.cancel.label):null,a.isValidElement(t.action)?t.action:t.action&&ct(t.action)?a.createElement("button",{"data-button":!0,"data-action":!0,style:t.actionButtonStyle||mt,onClick:n=>{ct(t.action)&&(t.action.onClick==null||t.action.onClick.call(t.action,n),!n.defaultPrevented&&$())},className:O(l?.actionButton,t==null||(i=t.classNames)==null?void 0:i.actionButton)},t.action.label):null)};function Mt(){if(typeof window>"u"||typeof document>"u")return"ltr";const r=document.documentElement.getAttribute("dir");return r==="auto"||!r?window.getComputedStyle(document.documentElement).direction:r}function be(r,o){const e={};return[r,o].forEach((s,R)=>{const c=R===1,v=c?"--mobile-offset":"--offset",N=c?ce:de;function h(i){["top","right","bottom","left"].forEach(x=>{e[`${v}-${x}`]=typeof i=="number"?`${i}px`:i})}typeof s=="number"||typeof s=="string"?h(s):typeof s=="object"?["top","right","bottom","left"].forEach(i=>{s[i]===void 0?e[`${v}-${i}`]=N:e[`${v}-${i}`]=typeof s[i]=="number"?`${s[i]}px`:s[i]}):h(N)}),e}const Ee=a.forwardRef(function(o,e){const{invert:s,position:R="bottom-right",hotkey:c=["altKey","KeyT"],expand:v,closeButton:N,className:h,offset:i,mobileOffset:x,theme:t="light",richColors:C,duration:z,style:w,visibleToasts:ut=le,toastOptions:u,dir:P=Mt(),gap:st=fe,icons:Q,containerAriaLabel:nt="Notifications"}=o,[A,U]=a.useState([]),ft=a.useMemo(()=>Array.from(new Set([R].concat(A.filter(d=>d.position).map(d=>d.position)))),[A,R]),[rt,mt]=a.useState([]),[pt,j]=a.useState(!1),[X,J]=a.useState(!1),[gt,H]=a.useState(t!=="system"?t:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),l=a.useRef(null),D=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),L=a.useRef(null),B=a.useRef(!1),Z=a.useCallback(d=>{U(m=>{var f;return(f=m.find(k=>k.id===d.id))!=null&&f.delete||E.dismiss(d.id),m.filter(({id:k})=>k!==d.id)})},[]);return a.useEffect(()=>E.subscribe(d=>{if(d.dismiss){requestAnimationFrame(()=>{U(m=>m.map(f=>f.id===d.id?{...f,delete:!0}:f))});return}setTimeout(()=>{Ut.flushSync(()=>{U(m=>{const f=m.findIndex(k=>k.id===d.id);return f!==-1?[...m.slice(0,f),{...m[f],...d},...m.slice(f+1)]:[d,...m]})})})}),[A]),a.useEffect(()=>{if(t!=="system"){H(t);return}if(t==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?H("dark"):H("light")),typeof window>"u")return;const d=window.matchMedia("(prefers-color-scheme: dark)");try{d.addEventListener("change",({matches:m})=>{H(m?"dark":"light")})}catch{d.addListener(({matches:f})=>{try{H(f?"dark":"light")}catch(k){console.error(k)}})}},[t]),a.useEffect(()=>{A.length<=1&&j(!1)},[A]),a.useEffect(()=>{const d=m=>{var f;if(c.every(p=>m[p]||m.code===p)){var F;j(!0),(F=l.current)==null||F.focus()}m.code==="Escape"&&(document.activeElement===l.current||(f=l.current)!=null&&f.contains(document.activeElement))&&j(!1)};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[c]),a.useEffect(()=>{if(l.current)return()=>{L.current&&(L.current.focus({preventScroll:!0}),L.current=null,B.current=!1)}},[l.current]),a.createElement("section",{ref:e,"aria-label":`${nt} ${D}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},ft.map((d,m)=>{var f;const[k,F]=d.split("-");return A.length?a.createElement("ol",{key:d,dir:P==="auto"?Mt():P,tabIndex:-1,ref:l,className:h,"data-sonner-toaster":!0,"data-sonner-theme":gt,"data-y-position":k,"data-x-position":F,style:{"--front-toast-height":`${((f=rt[0])==null?void 0:f.height)||0}px`,"--width":`${ue}px`,"--gap":`${st}px`,...w,...be(i,x)},onBlur:p=>{B.current&&!p.currentTarget.contains(p.relatedTarget)&&(B.current=!1,L.current&&(L.current.focus({preventScroll:!0}),L.current=null))},onFocus:p=>{p.target instanceof HTMLElement&&p.target.dataset.dismissible==="false"||B.current||(B.current=!0,L.current=p.relatedTarget)},onMouseEnter:()=>j(!0),onMouseMove:()=>j(!0),onMouseLeave:()=>{X||j(!1)},onDragEnd:()=>j(!1),onPointerDown:p=>{p.target instanceof HTMLElement&&p.target.dataset.dismissible==="false"||J(!0)},onPointerUp:()=>J(!1)},A.filter(p=>!p.position&&m===0||p.position===d).map((p,tt)=>{var W,et;return a.createElement(he,{key:p.id,icons:Q,index:tt,toast:p,defaultRichColors:C,duration:(W=u?.duration)!=null?W:z,className:u?.className,descriptionClassName:u?.descriptionClassName,invert:s,visibleToasts:ut,closeButton:(et=u?.closeButton)!=null?et:N,interacting:X,position:d,style:u?.style,unstyled:u?.unstyled,classNames:u?.classNames,cancelButtonStyle:u?.cancelButtonStyle,actionButtonStyle:u?.actionButtonStyle,closeButtonAriaLabel:u?.closeButtonAriaLabel,removeToast:Z,toasts:A.filter(at=>at.position==p.position),heights:rt.filter(at=>at.position==p.position),setHeights:mt,expandByDefault:v,gap:st,expanded:pt,swipeDirections:o.swipeDirections})})):null}))});export{Ee as T,xe as t};
@@ -1 +1 @@
1
- import{a,p as u}from"./chunk-EF7DTUVF-CaKisB5m.js";import{P as j,c as Q,u as Z,a as m,b as H}from"./index-NRYqpySi.js";import{u as G,a as ee}from"./index-BeLOjj93.js";import{u as te,e as oe,i as re}from"./index-CeH3aQ97.js";import{c as V,R as ne,A as ae,a as se,C as ie}from"./index-Cia-K30j.js";var le="Separator",M="horizontal",ce=["horizontal","vertical"],F=a.forwardRef((e,o)=>{const{decorative:t,orientation:r=M,...n}=e,s=ue(r)?r:M,d=t?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return u.jsx(j.div,{"data-orientation":s,...d,...n,ref:o})});F.displayName=le;function ue(e){return ce.includes(e)}var Ie=F,pe=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),de="VisuallyHidden",U=a.forwardRef((e,o)=>u.jsx(j.span,{...e,ref:o,style:{...pe,...e.style}}));U.displayName=de;var fe=U,[_,ke]=Q("Tooltip",[V]),A=V(),Y="TooltipProvider",ve=700,D="tooltip.open",[he,N]=_(Y),B=e=>{const{__scopeTooltip:o,delayDuration:t=ve,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=e,l=a.useRef(!0),d=a.useRef(!1),i=a.useRef(0);return a.useEffect(()=>{const f=i.current;return()=>window.clearTimeout(f)},[]),u.jsx(he,{scope:o,isOpenDelayedRef:l,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(i.current),l.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:a.useCallback(f=>{d.current=f},[]),disableHoverableContent:n,children:s})};B.displayName=Y;var R="Tooltip",[xe,O]=_(R),z=e=>{const{__scopeTooltip:o,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:d}=e,i=N(R,e.__scopeTooltip),f=A(o),[c,v]=a.useState(null),h=te(),p=a.useRef(0),x=l??i.disableHoverableContent,y=d??i.delayDuration,T=a.useRef(!1),[C,g]=Z({prop:r,defaultProp:n??!1,onChange:S=>{S?(i.onOpen(),document.dispatchEvent(new CustomEvent(D))):i.onClose(),s?.(S)},caller:R}),w=a.useMemo(()=>C?T.current?"delayed-open":"instant-open":"closed",[C]),E=a.useCallback(()=>{window.clearTimeout(p.current),p.current=0,T.current=!1,g(!0)},[g]),P=a.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g(!1)},[g]),k=a.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{T.current=!0,g(!0),p.current=0},y)},[y,g]);return a.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),u.jsx(ne,{...f,children:u.jsx(xe,{scope:o,contentId:h,open:C,stateAttribute:w,trigger:c,onTriggerChange:v,onTriggerEnter:a.useCallback(()=>{i.isOpenDelayedRef.current?k():E()},[i.isOpenDelayedRef,k,E]),onTriggerLeave:a.useCallback(()=>{x?P():(window.clearTimeout(p.current),p.current=0)},[P,x]),onOpen:E,onClose:P,disableHoverableContent:x,children:t})})};z.displayName=R;var L="TooltipTrigger",$=a.forwardRef((e,o)=>{const{__scopeTooltip:t,...r}=e,n=O(L,t),s=N(L,t),l=A(t),d=a.useRef(null),i=G(o,d,n.onTriggerChange),f=a.useRef(!1),c=a.useRef(!1),v=a.useCallback(()=>f.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),u.jsx(ae,{asChild:!0,...l,children:u.jsx(j.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:m(e.onPointerMove,h=>{h.pointerType!=="touch"&&!c.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),c.current=!0)}),onPointerLeave:m(e.onPointerLeave,()=>{n.onTriggerLeave(),c.current=!1}),onPointerDown:m(e.onPointerDown,()=>{n.open&&n.onClose(),f.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:m(e.onFocus,()=>{f.current||n.onOpen()}),onBlur:m(e.onBlur,n.onClose),onClick:m(e.onClick,n.onClose)})})});$.displayName=L;var I="TooltipPortal",[Te,ye]=_(I,{forceMount:void 0}),q=e=>{const{__scopeTooltip:o,forceMount:t,children:r,container:n}=e,s=O(I,o);return u.jsx(Te,{scope:o,forceMount:t,children:u.jsx(H,{present:t||s.open,children:u.jsx(oe,{asChild:!0,container:n,children:r})})})};q.displayName=I;var b="TooltipContent",W=a.forwardRef((e,o)=>{const t=ye(b,e.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=e,l=O(b,e.__scopeTooltip);return u.jsx(H,{present:r||l.open,children:l.disableHoverableContent?u.jsx(X,{side:n,...s,ref:o}):u.jsx(ge,{side:n,...s,ref:o})})}),ge=a.forwardRef((e,o)=>{const t=O(b,e.__scopeTooltip),r=N(b,e.__scopeTooltip),n=a.useRef(null),s=G(o,n),[l,d]=a.useState(null),{trigger:i,onClose:f}=t,c=n.current,{onPointerInTransitChange:v}=r,h=a.useCallback(()=>{d(null),v(!1)},[v]),p=a.useCallback((x,y)=>{const T=x.currentTarget,C={x:x.clientX,y:x.clientY},g=we(C,T.getBoundingClientRect()),w=Ee(C,g),E=Pe(y.getBoundingClientRect()),P=Oe([...w,...E]);d(P),v(!0)},[v]);return a.useEffect(()=>()=>h(),[h]),a.useEffect(()=>{if(i&&c){const x=T=>p(T,c),y=T=>p(T,i);return i.addEventListener("pointerleave",x),c.addEventListener("pointerleave",y),()=>{i.removeEventListener("pointerleave",x),c.removeEventListener("pointerleave",y)}}},[i,c,p,h]),a.useEffect(()=>{if(l){const x=y=>{const T=y.target,C={x:y.clientX,y:y.clientY},g=i?.contains(T)||c?.contains(T),w=!Re(C,l);g?h():w&&(h(),f())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[i,c,l,f,h]),u.jsx(X,{...e,ref:s})}),[Ce,me]=_(R,{isInside:!1}),be=ee("TooltipContent"),X=a.forwardRef((e,o)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...d}=e,i=O(b,t),f=A(t),{onClose:c}=i;return a.useEffect(()=>(document.addEventListener(D,c),()=>document.removeEventListener(D,c)),[c]),a.useEffect(()=>{if(i.trigger){const v=h=>{h.target?.contains(i.trigger)&&c()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[i.trigger,c]),u.jsx(re,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:c,children:u.jsxs(ie,{"data-state":i.stateAttribute,...f,...d,ref:o,style:{...d.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)"},children:[u.jsx(be,{children:r}),u.jsx(Ce,{scope:t,isInside:!0,children:u.jsx(fe,{id:i.contentId,role:"tooltip",children:n||r})})]})})});W.displayName=b;var K="TooltipArrow",J=a.forwardRef((e,o)=>{const{__scopeTooltip:t,...r}=e,n=A(t);return me(K,t).isInside?null:u.jsx(se,{...n,...r,ref:o})});J.displayName=K;function we(e,o){const t=Math.abs(o.top-e.y),r=Math.abs(o.bottom-e.y),n=Math.abs(o.right-e.x),s=Math.abs(o.left-e.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Ee(e,o,t=5){const r=[];switch(o){case"top":r.push({x:e.x-t,y:e.y+t},{x:e.x+t,y:e.y+t});break;case"bottom":r.push({x:e.x-t,y:e.y-t},{x:e.x+t,y:e.y-t});break;case"left":r.push({x:e.x+t,y:e.y-t},{x:e.x+t,y:e.y+t});break;case"right":r.push({x:e.x-t,y:e.y-t},{x:e.x-t,y:e.y+t});break}return r}function Pe(e){const{top:o,right:t,bottom:r,left:n}=e;return[{x:n,y:o},{x:t,y:o},{x:t,y:r},{x:n,y:r}]}function Re(e,o){const{x:t,y:r}=e;let n=!1;for(let s=0,l=o.length-1;s<o.length;l=s++){const d=o[s],i=o[l],f=d.x,c=d.y,v=i.x,h=i.y;c>r!=h>r&&t<(v-f)*(r-c)/(h-c)+f&&(n=!n)}return n}function Oe(e){const o=e.slice();return o.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),_e(o)}function _e(e){if(e.length<=1)return e.slice();const o=[];for(let r=0;r<e.length;r++){const n=e[r];for(;o.length>=2;){const s=o[o.length-1],l=o[o.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))o.pop();else break}o.push(n)}o.pop();const t=[];for(let r=e.length-1;r>=0;r--){const n=e[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}return t.pop(),o.length===1&&t.length===1&&o[0].x===t[0].x&&o[0].y===t[0].y?o:o.concat(t)}var Se=B,Me=z,He=$,Ge=q,Ve=W,Fe=J;export{Fe as A,Ve as C,Se as P,Ie as R,He as T,pe as V,Me as a,Ge as b};
1
+ import{a,p as u}from"./chunk-EF7DTUVF-CaKisB5m.js";import{P as j,c as Q,u as Z,a as m,b as H}from"./index-NRYqpySi.js";import{u as G,a as ee}from"./index-BeLOjj93.js";import{u as te,e as oe,i as re}from"./index-8UmwgoSB.js";import{c as V,R as ne,A as ae,a as se,C as ie}from"./index-4XG4HPxE.js";var le="Separator",M="horizontal",ce=["horizontal","vertical"],F=a.forwardRef((e,o)=>{const{decorative:t,orientation:r=M,...n}=e,s=ue(r)?r:M,d=t?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return u.jsx(j.div,{"data-orientation":s,...d,...n,ref:o})});F.displayName=le;function ue(e){return ce.includes(e)}var Ie=F,pe=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),de="VisuallyHidden",U=a.forwardRef((e,o)=>u.jsx(j.span,{...e,ref:o,style:{...pe,...e.style}}));U.displayName=de;var fe=U,[_,ke]=Q("Tooltip",[V]),A=V(),Y="TooltipProvider",ve=700,D="tooltip.open",[he,N]=_(Y),B=e=>{const{__scopeTooltip:o,delayDuration:t=ve,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=e,l=a.useRef(!0),d=a.useRef(!1),i=a.useRef(0);return a.useEffect(()=>{const f=i.current;return()=>window.clearTimeout(f)},[]),u.jsx(he,{scope:o,isOpenDelayedRef:l,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(i.current),l.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:a.useCallback(f=>{d.current=f},[]),disableHoverableContent:n,children:s})};B.displayName=Y;var R="Tooltip",[xe,O]=_(R),z=e=>{const{__scopeTooltip:o,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:d}=e,i=N(R,e.__scopeTooltip),f=A(o),[c,v]=a.useState(null),h=te(),p=a.useRef(0),x=l??i.disableHoverableContent,y=d??i.delayDuration,T=a.useRef(!1),[C,g]=Z({prop:r,defaultProp:n??!1,onChange:S=>{S?(i.onOpen(),document.dispatchEvent(new CustomEvent(D))):i.onClose(),s?.(S)},caller:R}),w=a.useMemo(()=>C?T.current?"delayed-open":"instant-open":"closed",[C]),E=a.useCallback(()=>{window.clearTimeout(p.current),p.current=0,T.current=!1,g(!0)},[g]),P=a.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g(!1)},[g]),k=a.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{T.current=!0,g(!0),p.current=0},y)},[y,g]);return a.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),u.jsx(ne,{...f,children:u.jsx(xe,{scope:o,contentId:h,open:C,stateAttribute:w,trigger:c,onTriggerChange:v,onTriggerEnter:a.useCallback(()=>{i.isOpenDelayedRef.current?k():E()},[i.isOpenDelayedRef,k,E]),onTriggerLeave:a.useCallback(()=>{x?P():(window.clearTimeout(p.current),p.current=0)},[P,x]),onOpen:E,onClose:P,disableHoverableContent:x,children:t})})};z.displayName=R;var L="TooltipTrigger",$=a.forwardRef((e,o)=>{const{__scopeTooltip:t,...r}=e,n=O(L,t),s=N(L,t),l=A(t),d=a.useRef(null),i=G(o,d,n.onTriggerChange),f=a.useRef(!1),c=a.useRef(!1),v=a.useCallback(()=>f.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),u.jsx(ae,{asChild:!0,...l,children:u.jsx(j.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:m(e.onPointerMove,h=>{h.pointerType!=="touch"&&!c.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),c.current=!0)}),onPointerLeave:m(e.onPointerLeave,()=>{n.onTriggerLeave(),c.current=!1}),onPointerDown:m(e.onPointerDown,()=>{n.open&&n.onClose(),f.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:m(e.onFocus,()=>{f.current||n.onOpen()}),onBlur:m(e.onBlur,n.onClose),onClick:m(e.onClick,n.onClose)})})});$.displayName=L;var I="TooltipPortal",[Te,ye]=_(I,{forceMount:void 0}),q=e=>{const{__scopeTooltip:o,forceMount:t,children:r,container:n}=e,s=O(I,o);return u.jsx(Te,{scope:o,forceMount:t,children:u.jsx(H,{present:t||s.open,children:u.jsx(oe,{asChild:!0,container:n,children:r})})})};q.displayName=I;var b="TooltipContent",W=a.forwardRef((e,o)=>{const t=ye(b,e.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=e,l=O(b,e.__scopeTooltip);return u.jsx(H,{present:r||l.open,children:l.disableHoverableContent?u.jsx(X,{side:n,...s,ref:o}):u.jsx(ge,{side:n,...s,ref:o})})}),ge=a.forwardRef((e,o)=>{const t=O(b,e.__scopeTooltip),r=N(b,e.__scopeTooltip),n=a.useRef(null),s=G(o,n),[l,d]=a.useState(null),{trigger:i,onClose:f}=t,c=n.current,{onPointerInTransitChange:v}=r,h=a.useCallback(()=>{d(null),v(!1)},[v]),p=a.useCallback((x,y)=>{const T=x.currentTarget,C={x:x.clientX,y:x.clientY},g=we(C,T.getBoundingClientRect()),w=Ee(C,g),E=Pe(y.getBoundingClientRect()),P=Oe([...w,...E]);d(P),v(!0)},[v]);return a.useEffect(()=>()=>h(),[h]),a.useEffect(()=>{if(i&&c){const x=T=>p(T,c),y=T=>p(T,i);return i.addEventListener("pointerleave",x),c.addEventListener("pointerleave",y),()=>{i.removeEventListener("pointerleave",x),c.removeEventListener("pointerleave",y)}}},[i,c,p,h]),a.useEffect(()=>{if(l){const x=y=>{const T=y.target,C={x:y.clientX,y:y.clientY},g=i?.contains(T)||c?.contains(T),w=!Re(C,l);g?h():w&&(h(),f())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[i,c,l,f,h]),u.jsx(X,{...e,ref:s})}),[Ce,me]=_(R,{isInside:!1}),be=ee("TooltipContent"),X=a.forwardRef((e,o)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...d}=e,i=O(b,t),f=A(t),{onClose:c}=i;return a.useEffect(()=>(document.addEventListener(D,c),()=>document.removeEventListener(D,c)),[c]),a.useEffect(()=>{if(i.trigger){const v=h=>{h.target?.contains(i.trigger)&&c()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[i.trigger,c]),u.jsx(re,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:c,children:u.jsxs(ie,{"data-state":i.stateAttribute,...f,...d,ref:o,style:{...d.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)"},children:[u.jsx(be,{children:r}),u.jsx(Ce,{scope:t,isInside:!0,children:u.jsx(fe,{id:i.contentId,role:"tooltip",children:n||r})})]})})});W.displayName=b;var K="TooltipArrow",J=a.forwardRef((e,o)=>{const{__scopeTooltip:t,...r}=e,n=A(t);return me(K,t).isInside?null:u.jsx(se,{...n,...r,ref:o})});J.displayName=K;function we(e,o){const t=Math.abs(o.top-e.y),r=Math.abs(o.bottom-e.y),n=Math.abs(o.right-e.x),s=Math.abs(o.left-e.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Ee(e,o,t=5){const r=[];switch(o){case"top":r.push({x:e.x-t,y:e.y+t},{x:e.x+t,y:e.y+t});break;case"bottom":r.push({x:e.x-t,y:e.y-t},{x:e.x+t,y:e.y-t});break;case"left":r.push({x:e.x+t,y:e.y-t},{x:e.x+t,y:e.y+t});break;case"right":r.push({x:e.x-t,y:e.y-t},{x:e.x-t,y:e.y+t});break}return r}function Pe(e){const{top:o,right:t,bottom:r,left:n}=e;return[{x:n,y:o},{x:t,y:o},{x:t,y:r},{x:n,y:r}]}function Re(e,o){const{x:t,y:r}=e;let n=!1;for(let s=0,l=o.length-1;s<o.length;l=s++){const d=o[s],i=o[l],f=d.x,c=d.y,v=i.x,h=i.y;c>r!=h>r&&t<(v-f)*(r-c)/(h-c)+f&&(n=!n)}return n}function Oe(e){const o=e.slice();return o.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),_e(o)}function _e(e){if(e.length<=1)return e.slice();const o=[];for(let r=0;r<e.length;r++){const n=e[r];for(;o.length>=2;){const s=o[o.length-1],l=o[o.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))o.pop();else break}o.push(n)}o.pop();const t=[];for(let r=e.length-1;r>=0;r--){const n=e[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}return t.pop(),o.length===1&&t.length===1&&o[0].x===t[0].x&&o[0].y===t[0].y?o:o.concat(t)}var Se=B,Me=z,He=$,Ge=q,Ve=W,Fe=J;export{Fe as A,Ve as C,Se as P,Ie as R,He as T,pe as V,Me as a,Ge as b};
@@ -1 +1 @@
1
- import{a as c,p}from"./chunk-EF7DTUVF-CaKisB5m.js";import{u as G,c as H,P as A,a as P,b as O}from"./index-NRYqpySi.js";import{u as _,b as K}from"./index-BeLOjj93.js";import{u as $,e as U,h as V,g as W,f as Z,F as q,i as z}from"./index-CeH3aQ97.js";import{c as E,R as B,A as w,a as J,C as Q}from"./index-Cia-K30j.js";var x="Popover",[b,le]=H(x,[E]),g=E(),[X,u]=b(x),j=e=>{const{__scopePopover:n,children:t,open:s,defaultOpen:o,onOpenChange:r,modal:a=!1}=e,i=g(n),f=c.useRef(null),[v,h]=c.useState(!1),[C,l]=G({prop:s,defaultProp:o??!1,onChange:r,caller:x});return p.jsx(B,{...i,children:p.jsx(X,{scope:n,contentId:$(),triggerRef:f,open:C,onOpenChange:l,onOpenToggle:c.useCallback(()=>l(m=>!m),[l]),hasCustomAnchor:v,onCustomAnchorAdd:c.useCallback(()=>h(!0),[]),onCustomAnchorRemove:c.useCallback(()=>h(!1),[]),modal:a,children:t})})};j.displayName=x;var F="PopoverAnchor",N=c.forwardRef((e,n)=>{const{__scopePopover:t,...s}=e,o=u(F,t),r=g(t),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=o;return c.useEffect(()=>(a(),()=>i()),[a,i]),p.jsx(w,{...r,...s,ref:n})});N.displayName=F;var S="PopoverTrigger",y=c.forwardRef((e,n)=>{const{__scopePopover:t,...s}=e,o=u(S,t),r=g(t),a=_(n,o.triggerRef),i=p.jsx(A.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":L(o.open),...s,ref:a,onClick:P(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:p.jsx(w,{asChild:!0,...r,children:i})});y.displayName=S;var R="PopoverPortal",[Y,ee]=b(R,{forceMount:void 0}),D=e=>{const{__scopePopover:n,forceMount:t,children:s,container:o}=e,r=u(R,n);return p.jsx(Y,{scope:n,forceMount:t,children:p.jsx(O,{present:t||r.open,children:p.jsx(U,{asChild:!0,container:o,children:s})})})};D.displayName=R;var d="PopoverContent",M=c.forwardRef((e,n)=>{const t=ee(d,e.__scopePopover),{forceMount:s=t.forceMount,...o}=e,r=u(d,e.__scopePopover);return p.jsx(O,{present:s||r.open,children:r.modal?p.jsx(re,{...o,ref:n}):p.jsx(te,{...o,ref:n})})});M.displayName=d;var oe=K("PopoverContent.RemoveScroll"),re=c.forwardRef((e,n)=>{const t=u(d,e.__scopePopover),s=c.useRef(null),o=_(n,s),r=c.useRef(!1);return c.useEffect(()=>{const a=s.current;if(a)return V(a)},[]),p.jsx(W,{as:oe,allowPinchZoom:!0,children:p.jsx(T,{...e,ref:o,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(e.onCloseAutoFocus,a=>{a.preventDefault(),r.current||t.triggerRef.current?.focus()}),onPointerDownOutside:P(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,f=i.button===0&&i.ctrlKey===!0,v=i.button===2||f;r.current=v},{checkForDefaultPrevented:!1}),onFocusOutside:P(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),te=c.forwardRef((e,n)=>{const t=u(d,e.__scopePopover),s=c.useRef(!1),o=c.useRef(!1);return p.jsx(T,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{e.onCloseAutoFocus?.(r),r.defaultPrevented||(s.current||t.triggerRef.current?.focus(),r.preventDefault()),s.current=!1,o.current=!1},onInteractOutside:r=>{e.onInteractOutside?.(r),r.defaultPrevented||(s.current=!0,r.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=r.target;t.triggerRef.current?.contains(a)&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&o.current&&r.preventDefault()}})}),T=c.forwardRef((e,n)=>{const{__scopePopover:t,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:r,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:f,onFocusOutside:v,onInteractOutside:h,...C}=e,l=u(d,t),m=g(t);return Z(),p.jsx(q,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:o,onUnmountAutoFocus:r,children:p.jsx(z,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:i,onPointerDownOutside:f,onFocusOutside:v,onDismiss:()=>l.onOpenChange(!1),children:p.jsx(Q,{"data-state":L(l.open),role:"dialog",id:l.contentId,...m,...C,ref:n,style:{...C.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)"}})})})}),k="PopoverClose",ne=c.forwardRef((e,n)=>{const{__scopePopover:t,...s}=e,o=u(k,t);return p.jsx(A.button,{type:"button",...s,ref:n,onClick:P(e.onClick,()=>o.onOpenChange(!1))})});ne.displayName=k;var se="PopoverArrow",I=c.forwardRef((e,n)=>{const{__scopePopover:t,...s}=e,o=g(t);return p.jsx(J,{...o,...s,ref:n})});I.displayName=se;function L(e){return e?"open":"closed"}var de=j,fe=N,ve=y,Pe=D,ge=M,he=I;export{fe as A,ge as C,Pe as P,de as R,ve as T,he as a};
1
+ import{a as c,p}from"./chunk-EF7DTUVF-CaKisB5m.js";import{u as G,c as H,P as A,a as P,b as O}from"./index-NRYqpySi.js";import{u as _,b as K}from"./index-BeLOjj93.js";import{u as $,e as U,h as V,g as W,f as Z,F as q,i as z}from"./index-8UmwgoSB.js";import{c as E,R as B,A as w,a as J,C as Q}from"./index-4XG4HPxE.js";var x="Popover",[b,le]=H(x,[E]),g=E(),[X,u]=b(x),j=e=>{const{__scopePopover:n,children:t,open:s,defaultOpen:o,onOpenChange:r,modal:a=!1}=e,i=g(n),f=c.useRef(null),[v,h]=c.useState(!1),[C,l]=G({prop:s,defaultProp:o??!1,onChange:r,caller:x});return p.jsx(B,{...i,children:p.jsx(X,{scope:n,contentId:$(),triggerRef:f,open:C,onOpenChange:l,onOpenToggle:c.useCallback(()=>l(m=>!m),[l]),hasCustomAnchor:v,onCustomAnchorAdd:c.useCallback(()=>h(!0),[]),onCustomAnchorRemove:c.useCallback(()=>h(!1),[]),modal:a,children:t})})};j.displayName=x;var F="PopoverAnchor",N=c.forwardRef((e,n)=>{const{__scopePopover:t,...s}=e,o=u(F,t),r=g(t),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=o;return c.useEffect(()=>(a(),()=>i()),[a,i]),p.jsx(w,{...r,...s,ref:n})});N.displayName=F;var S="PopoverTrigger",y=c.forwardRef((e,n)=>{const{__scopePopover:t,...s}=e,o=u(S,t),r=g(t),a=_(n,o.triggerRef),i=p.jsx(A.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":L(o.open),...s,ref:a,onClick:P(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:p.jsx(w,{asChild:!0,...r,children:i})});y.displayName=S;var R="PopoverPortal",[Y,ee]=b(R,{forceMount:void 0}),D=e=>{const{__scopePopover:n,forceMount:t,children:s,container:o}=e,r=u(R,n);return p.jsx(Y,{scope:n,forceMount:t,children:p.jsx(O,{present:t||r.open,children:p.jsx(U,{asChild:!0,container:o,children:s})})})};D.displayName=R;var d="PopoverContent",M=c.forwardRef((e,n)=>{const t=ee(d,e.__scopePopover),{forceMount:s=t.forceMount,...o}=e,r=u(d,e.__scopePopover);return p.jsx(O,{present:s||r.open,children:r.modal?p.jsx(re,{...o,ref:n}):p.jsx(te,{...o,ref:n})})});M.displayName=d;var oe=K("PopoverContent.RemoveScroll"),re=c.forwardRef((e,n)=>{const t=u(d,e.__scopePopover),s=c.useRef(null),o=_(n,s),r=c.useRef(!1);return c.useEffect(()=>{const a=s.current;if(a)return V(a)},[]),p.jsx(W,{as:oe,allowPinchZoom:!0,children:p.jsx(T,{...e,ref:o,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(e.onCloseAutoFocus,a=>{a.preventDefault(),r.current||t.triggerRef.current?.focus()}),onPointerDownOutside:P(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,f=i.button===0&&i.ctrlKey===!0,v=i.button===2||f;r.current=v},{checkForDefaultPrevented:!1}),onFocusOutside:P(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),te=c.forwardRef((e,n)=>{const t=u(d,e.__scopePopover),s=c.useRef(!1),o=c.useRef(!1);return p.jsx(T,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{e.onCloseAutoFocus?.(r),r.defaultPrevented||(s.current||t.triggerRef.current?.focus(),r.preventDefault()),s.current=!1,o.current=!1},onInteractOutside:r=>{e.onInteractOutside?.(r),r.defaultPrevented||(s.current=!0,r.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=r.target;t.triggerRef.current?.contains(a)&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&o.current&&r.preventDefault()}})}),T=c.forwardRef((e,n)=>{const{__scopePopover:t,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:r,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:f,onFocusOutside:v,onInteractOutside:h,...C}=e,l=u(d,t),m=g(t);return Z(),p.jsx(q,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:o,onUnmountAutoFocus:r,children:p.jsx(z,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:i,onPointerDownOutside:f,onFocusOutside:v,onDismiss:()=>l.onOpenChange(!1),children:p.jsx(Q,{"data-state":L(l.open),role:"dialog",id:l.contentId,...m,...C,ref:n,style:{...C.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)"}})})})}),k="PopoverClose",ne=c.forwardRef((e,n)=>{const{__scopePopover:t,...s}=e,o=u(k,t);return p.jsx(A.button,{type:"button",...s,ref:n,onClick:P(e.onClick,()=>o.onOpenChange(!1))})});ne.displayName=k;var se="PopoverArrow",I=c.forwardRef((e,n)=>{const{__scopePopover:t,...s}=e,o=g(t);return p.jsx(J,{...o,...s,ref:n})});I.displayName=se;function L(e){return e?"open":"closed"}var de=j,fe=N,ve=y,Pe=D,ge=M,he=I;export{fe as A,ge as C,Pe as P,de as R,ve as T,he as a};