tokentracker-cli 0.84.2 → 0.84.4

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 (88) hide show
  1. package/dashboard/dist/assets/{AchievementBadge-DvulAUrw.js → AchievementBadge-C29PwsK_.js} +1 -1
  2. package/dashboard/dist/assets/{AchievementsPage-CVsCeWo_.js → AchievementsPage-BlZODLp8.js} +2 -2
  3. package/dashboard/dist/assets/{AchievementsSection-CgiOHh54.js → AchievementsSection-Bc6NMnIa.js} +1 -1
  4. package/dashboard/dist/assets/{BadgeDetailModal-lw1e7EvA.js → BadgeDetailModal-BUy4636q.js} +1 -1
  5. package/dashboard/dist/assets/{Card-C3Fxl-vL.js → Card-CqxuFMAN.js} +1 -1
  6. package/dashboard/dist/assets/{ClawdAnimated-BwRC-Tmz.js → ClawdAnimated-BG3m8BgW.js} +1 -1
  7. package/dashboard/dist/assets/{CommandPalette-B00dpeC6.js → CommandPalette-Dcwtom2b.js} +1 -1
  8. package/dashboard/dist/assets/{CommunityStatsModal-39LI1iYz.js → CommunityStatsModal-dBjHrgjE.js} +1 -1
  9. package/dashboard/dist/assets/{ConfirmModal-CiJio3w8.js → ConfirmModal-DncQkptq.js} +1 -1
  10. package/dashboard/dist/assets/{DashboardPage-DrvofpPG.js → DashboardPage-CdF5WNHN.js} +1 -1
  11. package/dashboard/dist/assets/{DevicePage-CHNM6Jyx.js → DevicePage-B-PO4s-r.js} +1 -1
  12. package/dashboard/dist/assets/{DialogClose-DmGnH7p-.js → DialogClose-DGtj17VY.js} +1 -1
  13. package/dashboard/dist/assets/DialogDescription-wStLk8Br.js +1 -0
  14. package/dashboard/dist/assets/{DialogTitle-KxLDeLzC.js → DialogTitle-DLkuu1Iw.js} +1 -1
  15. package/dashboard/dist/assets/{FadeIn-COsoZJXe.js → FadeIn-Dd5RBmXd.js} +1 -1
  16. package/dashboard/dist/assets/{HeaderGithubStar-BUS3-SIo.js → HeaderGithubStar-BBCOpHqO.js} +1 -1
  17. package/dashboard/dist/assets/{HoverTooltip-jQvD29cq.js → HoverTooltip-BbigYxdC.js} +1 -1
  18. package/dashboard/dist/assets/{IpCheckPage-Dk1tqRIA.js → IpCheckPage-BBpZYjSC.js} +1 -1
  19. package/dashboard/dist/assets/{LandingPage-oMcuNn_f.js → LandingPage-ttXnt_s9.js} +2 -2
  20. package/dashboard/dist/assets/{LeaderboardAvatar-DKH9A5GV.js → LeaderboardAvatar-DOl_cOO9.js} +1 -1
  21. package/dashboard/dist/assets/{LeaderboardPage-J8nWKwhZ.js → LeaderboardPage-BYIyoLkB.js} +2 -2
  22. package/dashboard/dist/assets/{LeaderboardProfileModal-TF73oBuo.js → LeaderboardProfileModal-BO2n4LSQ.js} +3 -3
  23. package/dashboard/dist/assets/{LeaderboardProfilePage-DdgumagS.js → LeaderboardProfilePage-CqwW5yMw.js} +1 -1
  24. package/dashboard/dist/assets/{LimitsPage-DaCxUMpL.js → LimitsPage-B-w771Tl.js} +1 -1
  25. package/dashboard/dist/assets/{LocalOnlyNotice-D8FJuEXT.js → LocalOnlyNotice-Cqc_diwF.js} +1 -1
  26. package/dashboard/dist/assets/{LoginCard-DHj1TAkh.js → LoginCard-D6zc1JKY.js} +1 -1
  27. package/dashboard/dist/assets/{LoginModal-h6YPXq8w.js → LoginModal-udN3TqoF.js} +1 -1
  28. package/dashboard/dist/assets/{LoginPage-Bc89jFxT.js → LoginPage-BucPr3_X.js} +1 -1
  29. package/dashboard/dist/assets/{PetPage-CYgrEzGa.js → PetPage-6_nmMXWp.js} +1 -1
  30. package/dashboard/dist/assets/{PopoverPopup-B6oEN7QL.js → PopoverPopup-DntczBmH.js} +1 -1
  31. package/dashboard/dist/assets/{ProviderIcon-B6sgfDtI.js → ProviderIcon-Z6qlwSj1.js} +1 -1
  32. package/dashboard/dist/assets/{ResetPasswordPage-c1mHAYJU.js → ResetPasswordPage-WqQwsQC1.js} +1 -1
  33. package/dashboard/dist/assets/{SegmentedControl-C_ZhjPE7.js → SegmentedControl-D3NM3dOv.js} +1 -1
  34. package/dashboard/dist/assets/{Select-C6oiyYQ_.js → Select-DCpwSFK7.js} +1 -1
  35. package/dashboard/dist/assets/{SelectItemText-DrcW545o.js → SelectItemText-DICaclqa.js} +1 -1
  36. package/dashboard/dist/assets/{SessionsPage-qYWtJhGq.js → SessionsPage-COHoSjPP.js} +1 -1
  37. package/dashboard/dist/assets/{SettingsPage-uT_MAM12.js → SettingsPage-nzbrBo_U.js} +1 -1
  38. package/dashboard/dist/assets/{SkillsPage-JtbaZnen.js → SkillsPage-DE8mK1lS.js} +1 -1
  39. package/dashboard/dist/assets/{TokenGalaxy-CukVYwfy.js → TokenGalaxy-BSWGbByr.js} +1 -1
  40. package/dashboard/dist/assets/{ToolbarRootContext-xOR5ZEzv.js → ToolbarRootContext-CxxXTuTT.js} +1 -1
  41. package/dashboard/dist/assets/{TrendMonitor-Bxy1Vnax.js → TrendMonitor-DillSTMV.js} +1 -1
  42. package/dashboard/dist/assets/{WidgetsPage-DY8dCUzc.js → WidgetsPage-LqyxKYAt.js} +1 -1
  43. package/dashboard/dist/assets/{WrappedPage-Dda-OL2h.js → WrappedPage-DNDuRKjf.js} +1 -1
  44. package/dashboard/dist/assets/{__vite-browser-external-CuMc3dqk.js → __vite-browser-external-DEhUaWQY.js} +2 -2
  45. package/dashboard/dist/assets/{agent-logos-Xs4StrOT.js → agent-logos-D34B25op.js} +1 -1
  46. package/dashboard/dist/assets/{arrow-up-right-D2tCxxHL.js → arrow-up-right-BYWbL4WV.js} +1 -1
  47. package/dashboard/dist/assets/{check-Dy8VgHZ8.js → check-DkfaR6JX.js} +1 -1
  48. package/dashboard/dist/assets/{chevron-right-D1F23F5W.js → chevron-right-D2cpt_J3.js} +1 -1
  49. package/dashboard/dist/assets/{copy-BIDPrnLf.js → copy-Cv5Ix0Pn.js} +1 -1
  50. package/dashboard/dist/assets/{download-zNMgxXgK.js → download-5nr9Tl80.js} +1 -1
  51. package/dashboard/dist/assets/{flame-VQYtrvgY.js → flame-B6M-msYH.js} +1 -1
  52. package/dashboard/dist/assets/{format-tokens-173-9MpR.js → format-tokens-DiRRwgY8.js} +1 -1
  53. package/dashboard/dist/assets/{icons-D2Ro70sQ.js → icons-DQHoG48j.js} +1 -1
  54. package/dashboard/dist/assets/{index-jpsn86uT.js → index-BoH_HaYH.js} +1 -1
  55. package/dashboard/dist/assets/{index-jWyH6i9j.js → index-hSxFduER.js} +1 -1
  56. package/dashboard/dist/assets/{index-DK0VT-_n.js → index-vFee2-sp.js} +1 -1
  57. package/dashboard/dist/assets/{info-CDTfOJ13.js → info-CM5MR8lk.js} +1 -1
  58. package/dashboard/dist/assets/{limits-providers-CMQJD3FZ.js → limits-providers-BV4Y9nI4.js} +1 -1
  59. package/dashboard/dist/assets/{link-2-CmjxdvpK.js → link-2-Bd5jF09Z.js} +1 -1
  60. package/dashboard/dist/assets/{loader-circle-CracNP_H.js → loader-circle-B5oZJSYV.js} +1 -1
  61. package/dashboard/dist/assets/{maximize-2-BZX57ABx.js → maximize-2-CiYy9Kri.js} +1 -1
  62. package/dashboard/dist/assets/{provider-display-Cn2q9F2Z.js → provider-display-lzLynfde.js} +1 -1
  63. package/dashboard/dist/assets/{react-B80AX8fE.js → react-CllryaXi.js} +1 -1
  64. package/dashboard/dist/assets/{search-DtGZgKCk.js → search-DDdsotHp.js} +1 -1
  65. package/dashboard/dist/assets/{skills-api-CGL-iHOO.js → skills-api-487vZmwI.js} +1 -1
  66. package/dashboard/dist/assets/{store-NtnkxrS2.js → store-CYaTRd_k.js} +1 -1
  67. package/dashboard/dist/assets/{terminal-d0IOaeZn.js → terminal-OyeOY0tb.js} +1 -1
  68. package/dashboard/dist/assets/{trash-2-DAfuNrRz.js → trash-2-COI9stXJ.js} +1 -1
  69. package/dashboard/dist/assets/{use-community-stats-BBYRffIf.js → use-community-stats-DkzinngC.js} +1 -1
  70. package/dashboard/dist/assets/{use-limits-display-prefs-DEZXM-yU.js → use-limits-display-prefs-CiMETU5Y.js} +1 -1
  71. package/dashboard/dist/assets/{use-native-settings-BkwcrMcE.js → use-native-settings-qzpxm9Bh.js} +1 -1
  72. package/dashboard/dist/assets/{use-ordered-list-DlXnvIC-.js → use-ordered-list-BI-Qh9xR.js} +1 -1
  73. package/dashboard/dist/assets/use-reduced-motion-DrsPn1ux.js +1 -0
  74. package/dashboard/dist/assets/{use-session-efficiency-pref-B8rvdBw1.js → use-session-efficiency-pref-1WyhIjeG.js} +1 -1
  75. package/dashboard/dist/assets/{use-transform-Dza9-ZQl.js → use-transform-D5i_ArzG.js} +1 -1
  76. package/dashboard/dist/assets/{use-usage-limits-BYdWzSUW.js → use-usage-limits-Drcnt7__.js} +1 -1
  77. package/dashboard/dist/assets/{useCurrency-DdWYV5RR.js → useCurrency-KWJo1GIr.js} +1 -1
  78. package/dashboard/dist/assets/{useScrollLock-DmM-LeMm.js → useScrollLock-K0FPky1Y.js} +1 -1
  79. package/dashboard/dist/assets/{useTokenFormat-BkFEXBXZ.js → useTokenFormat-CwG4ck8v.js} +1 -1
  80. package/dashboard/dist/assets/{zap-CcqNcNpw.js → zap-wZ6IQAyU.js} +1 -1
  81. package/dashboard/dist/index.html +1 -1
  82. package/dashboard/dist/ip-check.html +1 -1
  83. package/dashboard/dist/leaderboard.html +1 -1
  84. package/dashboard/dist/share.html +1 -1
  85. package/package.json +1 -1
  86. package/src/lib/pricing/seed-snapshot.json +1 -1
  87. package/dashboard/dist/assets/DialogDescription-BgYqW0_C.js +0 -1
  88. package/dashboard/dist/assets/use-reduced-motion-BEAopWkx.js +0 -1
@@ -1 +1 @@
1
- import{l as on,a_ as sn,r as R,bc as rn,aS as cn,aD as ln,bd as an,W as $t,A as fn,aT as B,be as Z,bf as Ne,ba as se,bg as J,aL as K,bh as je,bi as pe,bj as Se,bk as un,bl as Ht,bm as dn,bn as qe,bo as Ue,bp as De,bq as vt,br as It,a1 as gn,bs as mn,aH as hn,aG as G,aU as Ce,P as Ke,bt as pn,z as xn,bu as wn}from"./__vite-browser-external-CuMc3dqk.js";import{n as At,q as yn,F as bn,P as Rn,o as vn,v as Re,p as An,i as On}from"./useScrollLock-DmM-LeMm.js";const Sn=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Bo=on("chevron-down",Sn),Cn=["top","right","bottom","left"],de=Math.min,z=Math.max,Ee=Math.round,ve=Math.floor,q=e=>({x:e,y:e}),En={left:"right",right:"left",bottom:"top",top:"bottom"};function Xe(e,t,o){return z(e,de(t,o))}function Q(e,t){return typeof e=="function"?e(t):e}function V(e){return e.split("-")[0]}function te(e){return e.split("-")[1]}function Ge(e){return e==="x"?"y":"x"}function Je(e){return e==="y"?"height":"width"}function X(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Qe(e){return Ge(X(e))}function Pn(e,t,o){o===void 0&&(o=!1);const n=te(e),i=Qe(e),s=Je(i);let r=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=Pe(r)),[r,Pe(r)]}function Tn(e){const t=Pe(e);return[Ye(e),t,Ye(t)]}function Ye(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ot=["left","right"],St=["right","left"],Mn=["top","bottom"],Dn=["bottom","top"];function kn(e,t,o){switch(e){case"top":case"bottom":return o?t?St:Ot:t?Ot:St;case"left":case"right":return t?Mn:Dn;default:return[]}}function Ln(e,t,o,n){const i=te(e);let s=kn(V(e),o==="start",n);return i&&(s=s.map(r=>r+"-"+i),t&&(s=s.concat(s.map(Ye)))),s}function Pe(e){const t=V(e);return En[t]+e.slice(t.length)}function Fn(e){return{top:0,right:0,bottom:0,left:0,...e}}function Bt(e){return typeof e!="number"?Fn(e):{top:e,right:e,bottom:e,left:e}}function Te(e){const{x:t,y:o,width:n,height:i}=e;return{width:n,height:i,top:o,left:t,right:t+n,bottom:o+i,x:t,y:o}}function Vo(e,t={}){const{enabled:o=!0,event:n="click",toggle:i=!0,ignoreMouse:s=!1,stickIfOpen:r=!0,touchOpenDelay:c=0,reason:l=sn}=t,u="rootStore"in e?e.rootStore:e,a=u.context.dataRef,f=R.useRef(void 0),g=rn(),d=cn(),h=R.useMemo(()=>{function m(p,w,x,y){const v=fn(l,w,x);p&&y==="touch"&&c>0?d.start(c,()=>{u.setOpen(!0,v)}):u.setOpen(p,v)}function b(p,w,x){const y=a.current.openEvent,v=u.select("domReferenceElement")!==w;return p&&v||!p||!i?!0:y&&r?!x(y.type):!1}return{onPointerDown(p){f.current=p.pointerType},onMouseDown(p){const w=f.current,x=p.nativeEvent,y=u.select("open");if(p.button!==0||n==="click"||At(w,!0)&&s)return;const v=b(y,p.currentTarget,E=>E==="click"||E==="mousedown"),A=ln(x);if(an(A)){m(v,x,A,w);return}const P=p.currentTarget;g.request(()=>{m(v,x,P,w)})},onClick(p){if(n==="mousedown-only")return;const w=f.current;if(n==="mousedown"&&w){f.current=void 0;return}if(At(w,!0)&&s)return;const x=u.select("open"),y=b(x,p.currentTarget,v=>v==="click"||v==="mousedown"||v==="keydown"||v==="keyup");m(y,p.nativeEvent,p.currentTarget,w)},onKeyDown(){f.current=void 0}}},[a,n,s,l,u,r,i,g,d,c]);return R.useMemo(()=>o?{reference:h}:$t,[o,h])}function Ct(e,t,o){let{reference:n,floating:i}=e;const s=X(t),r=Qe(t),c=Je(r),l=V(t),u=s==="y",a=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,g=n[c]/2-i[c]/2;let d;switch(l){case"top":d={x:a,y:n.y-i.height};break;case"bottom":d={x:a,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:f};break;case"left":d={x:n.x-i.width,y:f};break;default:d={x:n.x,y:n.y}}switch(te(t)){case"start":d[r]-=g*(o&&u?-1:1);break;case"end":d[r]+=g*(o&&u?-1:1);break}return d}async function Wn(e,t){var o;t===void 0&&(t={});const{x:n,y:i,platform:s,rects:r,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:a="viewport",elementContext:f="floating",altBoundary:g=!1,padding:d=0}=Q(t,e),h=Bt(d),b=c[g?f==="floating"?"reference":"floating":f],p=Te(await s.getClippingRect({element:(o=await(s.isElement==null?void 0:s.isElement(b)))==null||o?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:a,strategy:l})),w=f==="floating"?{x:n,y:i,width:r.floating.width,height:r.floating.height}:r.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),y=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},v=Te(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:x,strategy:l}):w);return{top:(p.top-v.top+h.top)/y.y,bottom:(v.bottom-p.bottom+h.bottom)/y.y,left:(p.left-v.left+h.left)/y.x,right:(v.right-p.right+h.right)/y.x}}const $n=50,Hn=async(e,t,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:r}=o,c=r.detectOverflow?r:{...r,detectOverflow:Wn},l=await(r.isRTL==null?void 0:r.isRTL(t));let u=await r.getElementRects({reference:e,floating:t,strategy:i}),{x:a,y:f}=Ct(u,n,l),g=n,d=0;const h={};for(let m=0;m<s.length;m++){const b=s[m];if(!b)continue;const{name:p,fn:w}=b,{x,y,data:v,reset:A}=await w({x:a,y:f,initialPlacement:n,placement:g,strategy:i,middlewareData:h,rects:u,platform:c,elements:{reference:e,floating:t}});a=x??a,f=y??f,h[p]={...h[p],...v},A&&d<$n&&(d++,typeof A=="object"&&(A.placement&&(g=A.placement),A.rects&&(u=A.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:a,y:f}=Ct(u,g,l)),m=-1)}return{x:a,y:f,placement:g,strategy:i,middlewareData:h}},In=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,n;const{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:l,elements:u}=t,{mainAxis:a=!0,crossAxis:f=!0,fallbackPlacements:g,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...b}=Q(e,t);if((o=s.arrow)!=null&&o.alignmentOffset)return{};const p=V(i),w=X(c),x=V(c)===c,y=await(l.isRTL==null?void 0:l.isRTL(u.floating)),v=g||(x||!m?[Pe(c)]:Tn(c)),A=h!=="none";!g&&A&&v.push(...Ln(c,m,h,y));const P=[c,...v],E=await l.detectOverflow(t,b),k=[];let D=((n=s.flip)==null?void 0:n.overflows)||[];if(a&&k.push(E[p]),f){const W=Pn(i,r,y);k.push(E[W[0]],E[W[1]])}if(D=[...D,{placement:i,overflows:k}],!k.every(W=>W<=0)){var F,S;const W=(((F=s.flip)==null?void 0:F.index)||0)+1,H=P[W];if(H&&(!(f==="alignment"?w!==X(H):!1)||D.every(O=>X(O.placement)===w?O.overflows[0]>0:!0)))return{data:{index:W,overflows:D},reset:{placement:H}};let $=(S=D.filter(L=>L.overflows[0]<=0).sort((L,O)=>L.overflows[1]-O.overflows[1])[0])==null?void 0:S.placement;if(!$)switch(d){case"bestFit":{var M;const L=(M=D.filter(O=>{if(A){const I=X(O.placement);return I===w||I==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(I=>I>0).reduce((I,C)=>I+C,0)]).sort((O,I)=>O[1]-I[1])[0])==null?void 0:M[0];L&&($=L);break}case"initialPlacement":$=c;break}if(i!==$)return{reset:{placement:$}}}return{}}}};function Et(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Pt(e){return Cn.some(t=>e[t]>=0)}const Bn=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:o,platform:n}=t,{strategy:i="referenceHidden",...s}=Q(e,t);switch(i){case"referenceHidden":{const r=await n.detectOverflow(t,{...s,elementContext:"reference"}),c=Et(r,o.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Pt(c)}}}case"escaped":{const r=await n.detectOverflow(t,{...s,altBoundary:!0}),c=Et(r,o.floating);return{data:{escapedOffsets:c,escaped:Pt(c)}}}default:return{}}}}},Vt=new Set(["left","top"]);async function Vn(e,t){const{placement:o,platform:n,elements:i}=e,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),r=V(o),c=te(o),l=X(o)==="y",u=Vt.has(r)?-1:1,a=s&&l?-1:1,f=Q(t,e);let{mainAxis:g,crossAxis:d,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof h=="number"&&(d=c==="end"?h*-1:h),l?{x:d*a,y:g*u}:{x:g*u,y:d*a}}const _n=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,n;const{x:i,y:s,placement:r,middlewareData:c}=t,l=await Vn(t,e);return r===((o=c.offset)==null?void 0:o.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:r}}}}},zn=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:n,placement:i,platform:s}=t,{mainAxis:r=!0,crossAxis:c=!1,limiter:l={fn:p=>{let{x:w,y:x}=p;return{x:w,y:x}}},...u}=Q(e,t),a={x:o,y:n},f=await s.detectOverflow(t,u),g=X(V(i)),d=Ge(g);let h=a[d],m=a[g];if(r){const p=d==="y"?"top":"left",w=d==="y"?"bottom":"right",x=h+f[p],y=h-f[w];h=Xe(x,h,y)}if(c){const p=g==="y"?"top":"left",w=g==="y"?"bottom":"right",x=m+f[p],y=m-f[w];m=Xe(x,m,y)}const b=l.fn({...t,[d]:h,[g]:m});return{...b,data:{x:b.x-o,y:b.y-n,enabled:{[d]:r,[g]:c}}}}}},Nn=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:o,y:n,placement:i,rects:s,middlewareData:r}=t,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=Q(e,t),a={x:o,y:n},f=X(i),g=Ge(f);let d=a[g],h=a[f];const m=Q(c,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=g==="y"?"height":"width",y=s.reference[g]-s.floating[x]+b.mainAxis,v=s.reference[g]+s.reference[x]-b.mainAxis;d<y?d=y:d>v&&(d=v)}if(u){var p,w;const x=g==="y"?"width":"height",y=Vt.has(V(i)),v=s.reference[f]-s.floating[x]+(y&&((p=r.offset)==null?void 0:p[f])||0)+(y?0:b.crossAxis),A=s.reference[f]+s.reference[x]+(y?0:((w=r.offset)==null?void 0:w[f])||0)-(y?b.crossAxis:0);h<v?h=v:h>A&&(h=A)}return{[g]:d,[f]:h}}}},Xn=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,n;const{placement:i,rects:s,platform:r,elements:c}=t,{apply:l=()=>{},...u}=Q(e,t),a=await r.detectOverflow(t,u),f=V(i),g=te(i),d=X(i)==="y",{width:h,height:m}=s.floating;let b,p;f==="top"||f==="bottom"?(b=f,p=g===(await(r.isRTL==null?void 0:r.isRTL(c.floating))?"start":"end")?"left":"right"):(p=f,b=g==="end"?"top":"bottom");const w=m-a.top-a.bottom,x=h-a.left-a.right,y=de(m-a[b],w),v=de(h-a[p],x),A=!t.middlewareData.shift;let P=y,E=v;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(E=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(P=w),A&&!g){const D=z(a.left,0),F=z(a.right,0),S=z(a.top,0),M=z(a.bottom,0);d?E=h-2*(D!==0||F!==0?D+F:z(a.left,a.right)):P=m-2*(S!==0||M!==0?S+M:z(a.top,a.bottom))}await l({...t,availableWidth:E,availableHeight:P});const k=await r.getDimensions(c.floating);return h!==k.width||m!==k.height?{reset:{rects:!0}}:{}}}};function _t(e){const t=J(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=se(e),s=i?e.offsetWidth:o,r=i?e.offsetHeight:n,c=Ee(o)!==s||Ee(n)!==r;return c&&(o=s,n=r),{width:o,height:n,$:c}}function Ze(e){return B(e)?e:e.contextElement}function ue(e){const t=Ze(e);if(!se(t))return q(1);const o=t.getBoundingClientRect(),{width:n,height:i,$:s}=_t(t);let r=(s?Ee(o.width):o.width)/n,c=(s?Ee(o.height):o.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const Yn=q(0);function zt(e){const t=K(e);return!It()||!t.visualViewport?Yn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function jn(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==K(e)?!1:t}function ie(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);const i=e.getBoundingClientRect(),s=Ze(e);let r=q(1);t&&(n?B(n)&&(r=ue(n)):r=ue(e));const c=jn(s,o,n)?zt(s):q(0);let l=(i.left+c.x)/r.x,u=(i.top+c.y)/r.y,a=i.width/r.x,f=i.height/r.y;if(s){const g=K(s),d=n&&B(n)?K(n):n;let h=g,m=vt(h);for(;m&&n&&d!==h;){const b=ue(m),p=m.getBoundingClientRect(),w=J(m),x=p.left+(m.clientLeft+parseFloat(w.paddingLeft))*b.x,y=p.top+(m.clientTop+parseFloat(w.paddingTop))*b.y;l*=b.x,u*=b.y,a*=b.x,f*=b.y,l+=x,u+=y,h=K(m),m=vt(h)}}return Te({width:a,height:f,x:l,y:u})}function ke(e,t){const o=De(e).scrollLeft;return t?t.left+o:ie(Z(e)).left+o}function Nt(e,t){const o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-ke(e,o),i=o.top+t.scrollTop;return{x:n,y:i}}function qn(e){let{elements:t,rect:o,offsetParent:n,strategy:i}=e;const s=i==="fixed",r=Z(n),c=t?je(t.floating):!1;if(n===r||c&&s)return o;let l={scrollLeft:0,scrollTop:0},u=q(1);const a=q(0),f=se(n);if((f||!f&&!s)&&((qe(n)!=="body"||Ue(r))&&(l=De(n)),f)){const d=ie(n);u=ue(n),a.x=d.x+n.clientLeft,a.y=d.y+n.clientTop}const g=r&&!f&&!s?Nt(r,l):q(0);return{width:o.width*u.x,height:o.height*u.y,x:o.x*u.x-l.scrollLeft*u.x+a.x+g.x,y:o.y*u.y-l.scrollTop*u.y+a.y+g.y}}function Un(e){return Array.from(e.getClientRects())}function Kn(e){const t=Z(e),o=De(e),n=e.ownerDocument.body,i=z(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=z(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-o.scrollLeft+ke(e);const c=-o.scrollTop;return J(n).direction==="rtl"&&(r+=z(t.clientWidth,n.clientWidth)-i),{width:i,height:s,x:r,y:c}}const Tt=25;function Gn(e,t){const o=K(e),n=Z(e),i=o.visualViewport;let s=n.clientWidth,r=n.clientHeight,c=0,l=0;if(i){s=i.width,r=i.height;const a=It();(!a||a&&t==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}const u=ke(n);if(u<=0){const a=n.ownerDocument,f=a.body,g=getComputedStyle(f),d=a.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,h=Math.abs(n.clientWidth-f.clientWidth-d);h<=Tt&&(s-=h)}else u<=Tt&&(s+=u);return{width:s,height:r,x:c,y:l}}function Jn(e,t){const o=ie(e,!0,t==="fixed"),n=o.top+e.clientTop,i=o.left+e.clientLeft,s=se(e)?ue(e):q(1),r=e.clientWidth*s.x,c=e.clientHeight*s.y,l=i*s.x,u=n*s.y;return{width:r,height:c,x:l,y:u}}function Mt(e,t,o){let n;if(t==="viewport")n=Gn(e,o);else if(t==="document")n=Kn(Z(e));else if(B(t))n=Jn(t,o);else{const i=zt(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Te(n)}function Xt(e,t){const o=pe(e);return o===t||!B(o)||Se(o)?!1:J(o).position==="fixed"||Xt(o,t)}function Qn(e,t){const o=t.get(e);if(o)return o;let n=Ne(e,[],!1).filter(c=>B(c)&&qe(c)!=="body"),i=null;const s=J(e).position==="fixed";let r=s?pe(e):e;for(;B(r)&&!Se(r);){const c=J(r),l=Ht(r);!l&&c.position==="fixed"&&(i=null),(s?!l&&!i:!l&&c.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Ue(r)&&!l&&Xt(e,r))?n=n.filter(a=>a!==r):i=c,r=pe(r)}return t.set(e,n),n}function Zn(e){let{element:t,boundary:o,rootBoundary:n,strategy:i}=e;const r=[...o==="clippingAncestors"?je(t)?[]:Qn(t,this._c):[].concat(o),n],c=Mt(t,r[0],i);let l=c.top,u=c.right,a=c.bottom,f=c.left;for(let g=1;g<r.length;g++){const d=Mt(t,r[g],i);l=z(d.top,l),u=de(d.right,u),a=de(d.bottom,a),f=z(d.left,f)}return{width:u-f,height:a-l,x:f,y:l}}function eo(e){const{width:t,height:o}=_t(e);return{width:t,height:o}}function to(e,t,o){const n=se(t),i=Z(t),s=o==="fixed",r=ie(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=q(0);function u(){l.x=ke(i)}if(n||!n&&!s)if((qe(t)!=="body"||Ue(i))&&(c=De(t)),n){const d=ie(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else i&&u();s&&!n&&i&&u();const a=i&&!n&&!s?Nt(i,c):q(0),f=r.left+c.scrollLeft-l.x-a.x,g=r.top+c.scrollTop-l.y-a.y;return{x:f,y:g,width:r.width,height:r.height}}function _e(e){return J(e).position==="static"}function Dt(e,t){if(!se(e)||J(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return Z(e)===o&&(o=o.ownerDocument.body),o}function Yt(e,t){const o=K(e);if(je(e))return o;if(!se(e)){let i=pe(e);for(;i&&!Se(i);){if(B(i)&&!_e(i))return i;i=pe(i)}return o}let n=Dt(e,t);for(;n&&un(n)&&_e(n);)n=Dt(n,t);return n&&Se(n)&&_e(n)&&!Ht(n)?o:n||dn(e)||o}const no=async function(e){const t=this.getOffsetParent||Yt,o=this.getDimensions,n=await o(e.floating);return{reference:to(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function oo(e){return J(e).direction==="rtl"}const io={convertOffsetParentRelativeRectToViewportRelativeRect:qn,getDocumentElement:Z,getClippingRect:Zn,getOffsetParent:Yt,getElementRects:no,getClientRects:Un,getDimensions:eo,getScale:ue,isElement:B,isRTL:oo};function jt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function so(e,t){let o=null,n;const i=Z(e);function s(){var c;clearTimeout(n),(c=o)==null||c.disconnect(),o=null}function r(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:a,top:f,width:g,height:d}=u;if(c||t(),!g||!d)return;const h=ve(f),m=ve(i.clientWidth-(a+g)),b=ve(i.clientHeight-(f+d)),p=ve(a),x={rootMargin:-h+"px "+-m+"px "+-b+"px "+-p+"px",threshold:z(0,de(1,l))||1};let y=!0;function v(A){const P=A[0].intersectionRatio;if(P!==l){if(!y)return r();P?r(!1,P):n=setTimeout(()=>{r(!1,1e-7)},1e3)}P===1&&!jt(u,e.getBoundingClientRect())&&r(),y=!1}try{o=new IntersectionObserver(v,{...x,root:i.ownerDocument})}catch{o=new IntersectionObserver(v,x)}o.observe(e)}return r(!0),s}function kt(e,t,o,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Ze(e),a=i||s?[...u?Ne(u):[],...t?Ne(t):[]]:[];a.forEach(p=>{i&&p.addEventListener("scroll",o,{passive:!0}),s&&p.addEventListener("resize",o)});const f=u&&c?so(u,o):null;let g=-1,d=null;r&&(d=new ResizeObserver(p=>{let[w]=p;w&&w.target===u&&d&&t&&(d.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var x;(x=d)==null||x.observe(t)})),o()}),u&&!l&&d.observe(u),t&&d.observe(t));let h,m=l?ie(e):null;l&&b();function b(){const p=ie(e);m&&!jt(m,p)&&o(),m=p,h=requestAnimationFrame(b)}return o(),()=>{var p;a.forEach(w=>{i&&w.removeEventListener("scroll",o),s&&w.removeEventListener("resize",o)}),f?.(),(p=d)==null||p.disconnect(),d=null,l&&cancelAnimationFrame(h)}}const ro=_n,co=zn,lo=In,ao=Xn,fo=Bn,uo=Nn,go=(e,t,o)=>{const n=new Map,i={platform:io,...o},s={...i.platform,_c:n};return Hn(e,t,{...i,platform:s})};var mo=typeof document<"u",ho=function(){},Ae=mo?R.useLayoutEffect:ho;function Me(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let o,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(n=o;n--!==0;)if(!Me(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),o=i.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){const s=i[n];if(!(s==="_owner"&&e.$$typeof)&&!Me(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function qt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Lt(e,t){const o=qt(e);return Math.round(t*o)/o}function ze(e){const t=R.useRef(e);return Ae(()=>{t.current=e}),t}function po(e){e===void 0&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:n=[],platform:i,elements:{reference:s,floating:r}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[a,f]=R.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[g,d]=R.useState(n);Me(g,n)||d(n);const[h,m]=R.useState(null),[b,p]=R.useState(null),w=R.useCallback(O=>{O!==A.current&&(A.current=O,m(O))},[]),x=R.useCallback(O=>{O!==P.current&&(P.current=O,p(O))},[]),y=s||h,v=r||b,A=R.useRef(null),P=R.useRef(null),E=R.useRef(a),k=l!=null,D=ze(l),F=ze(i),S=ze(u),M=R.useCallback(()=>{if(!A.current||!P.current)return;const O={placement:t,strategy:o,middleware:g};F.current&&(O.platform=F.current),go(A.current,P.current,O).then(I=>{const C={...I,isPositioned:S.current!==!1};W.current&&!Me(E.current,C)&&(E.current=C,gn.flushSync(()=>{f(C)}))})},[g,t,o,F,S]);Ae(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(O=>({...O,isPositioned:!1})))},[u]);const W=R.useRef(!1);Ae(()=>(W.current=!0,()=>{W.current=!1}),[]),Ae(()=>{if(y&&(A.current=y),v&&(P.current=v),y&&v){if(D.current)return D.current(y,v,M);M()}},[y,v,M,D,k]);const H=R.useMemo(()=>({reference:A,floating:P,setReference:w,setFloating:x}),[w,x]),$=R.useMemo(()=>({reference:y,floating:v}),[y,v]),L=R.useMemo(()=>{const O={position:o,left:0,top:0};if(!$.floating)return O;const I=Lt($.floating,a.x),C=Lt($.floating,a.y);return c?{...O,transform:"translate("+I+"px, "+C+"px)",...qt($.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:I,top:C}},[o,c,$.floating,a.x,a.y]);return R.useMemo(()=>({...a,update:M,refs:H,elements:$,floatingStyles:L}),[a,M,H,$,L])}const xo=(e,t)=>{const o=ro(e);return{name:o.name,fn:o.fn,options:[e,t]}},wo=(e,t)=>{const o=co(e);return{name:o.name,fn:o.fn,options:[e,t]}},yo=(e,t)=>({fn:uo(e).fn,options:[e,t]}),bo=(e,t)=>{const o=lo(e);return{name:o.name,fn:o.fn,options:[e,t]}},Ro=(e,t)=>{const o=ao(e);return{name:o.name,fn:o.fn,options:[e,t]}},vo=(e,t)=>{const o=fo(e);return{name:o.name,fn:o.fn,options:[e,t]}};function Ao(e){const{open:t=!1,onOpenChange:o,elements:n={}}=e,i=mn(),s=yn()!=null,r=hn(()=>new bn({open:t,transitionStatus:void 0,onOpenChange:o,referenceElement:n.reference??null,floatingElement:n.floating??null,triggerElements:new Rn,floatingId:i,syncOnly:!1,nested:s})).current;return G(()=>{const c={open:t,floatingId:i};n.reference!==void 0&&(c.referenceElement=n.reference,c.domReferenceElement=B(n.reference)?n.reference:null),n.floating!==void 0&&(c.floatingElement=n.floating),r.update(c)},[t,i,n.reference,n.floating,r]),r.context.onOpenChange=o,r.context.nested=s,r}function Oo(e={}){const{nodeId:t,externalTree:o}=e,n=Ao(e),i=e.rootContext||n,s=i.useState("referenceElement"),r=i.useState("floatingElement"),c=i.useState("domReferenceElement"),l=i.useState("open"),u=i.useState("floatingId"),[a,f]=R.useState(null),[g,d]=R.useState(void 0),[h,m]=R.useState(void 0),b=R.useRef(null),p=vn(o),w=R.useMemo(()=>({reference:s,floating:r,domReference:c}),[s,r,c]),x=po({...e,elements:{...w,...a&&{reference:a}}}),y=B(g)?g:null,v=h===void 0?i.state.floatingElement:h;i.useSyncedValue("referenceElement",g??null),i.useSyncedValue("domReferenceElement",g===void 0?c:y),i.useSyncedValue("floatingElement",v);const A=R.useCallback(S=>{const M=B(S)?{getBoundingClientRect:()=>S.getBoundingClientRect(),getClientRects:()=>S.getClientRects(),contextElement:S}:S;f(M),x.refs.setReference(M)},[x.refs]),P=R.useCallback(S=>{(B(S)||S===null)&&(b.current=S,d(S)),(B(x.refs.reference.current)||x.refs.reference.current===null||S!==null&&!B(S))&&x.refs.setReference(S)},[x.refs,d]),E=R.useCallback(S=>{m(S),x.refs.setFloating(S)},[x.refs]),k=R.useMemo(()=>({...x.refs,setReference:P,setFloating:E,setPositionReference:A,domReference:b}),[x.refs,P,E,A]),D=R.useMemo(()=>({...x.elements,domReference:c}),[x.elements,c]),F=R.useMemo(()=>({...x,dataRef:i.context.dataRef,open:l,onOpenChange:i.setOpen,events:i.context.events,floatingId:u,refs:k,elements:D,nodeId:t,rootStore:i}),[x,k,D,t,i,l,u]);return G(()=>{c&&(b.current=c)},[c]),G(()=>{i.context.dataRef.current.floatingContext=F;const S=p?.nodesRef.current.find(M=>M.id===t);S&&(S.context=F)}),R.useMemo(()=>({...x,context:F,refs:k,elements:D,rootStore:i}),[x,k,D,F,i])}const So=R.createContext(void 0);function Co(){return R.useContext(So)?.direction??"ltr"}const Eo=e=>({name:"arrow",options:e,async fn(t){const{x:o,y:n,placement:i,rects:s,platform:r,elements:c,middlewareData:l}=t,{element:u,padding:a=0,offsetParent:f="real"}=Q(e,t)||{};if(u==null)return{};const g=Bt(a),d={x:o,y:n},h=Qe(i),m=Je(h),b=await r.getDimensions(u),p=h==="y",w=p?"top":"left",x=p?"bottom":"right",y=p?"clientHeight":"clientWidth",v=s.reference[m]+s.reference[h]-d[h]-s.floating[m],A=d[h]-s.reference[h],P=f==="real"?await r.getOffsetParent?.(u):c.floating;let E=c.floating[y]||s.floating[m];(!E||!await r.isElement?.(P))&&(E=c.floating[y]||s.floating[m]);const k=v/2-A/2,D=E/2-b[m]/2-1,F=Math.min(g[w],D),S=Math.min(g[x],D),M=F,W=E-b[m]-S,H=E/2-b[m]/2+k,$=Xe(M,H,W),L=!l.arrow&&te(i)!=null&&H!==$&&s.reference[m]/2-(H<M?F:S)-b[m]/2<0,O=L?H<M?H-M:H-W:0;return{[h]:d[h]+O,data:{[h]:$,centerOffset:H-$-O,...L&&{alignmentOffset:O}},reset:L}}}),Po=(e,t)=>({...Eo(e),options:[e,t]}),To=vo().fn,Mo={name:"hide",async fn(e){const{width:t,height:o,x:n,y:i}=e.rects.reference,s=t===0&&o===0&&n===0&&i===0;return{data:{referenceHidden:(await To(e)).data?.referenceHidden||s}}}},Oe={sideX:"left",sideY:"top"},_o={name:"adaptiveOrigin",async fn(e){const{x:t,y:o,rects:{floating:n},elements:{floating:i},platform:s,strategy:r,placement:c}=e,l=K(i),u=l.getComputedStyle(i);if(!(u.transitionDuration!=="0s"&&u.transitionDuration!==""))return{x:t,y:o,data:Oe};const f=await s.getOffsetParent?.(i);let g={width:0,height:0};if(r==="fixed"&&l?.visualViewport)g={width:l.visualViewport.width,height:l.visualViewport.height};else if(f===l){const w=Ce(i);g={width:w.documentElement.clientWidth,height:w.documentElement.clientHeight}}else await s.isElement?.(f)&&(g=await s.getDimensions(f));const d=V(c);let h=t,m=o;d==="left"&&(h=g.width-(t+n.width)),d==="top"&&(m=g.height-(o+n.height));const b=d==="left"?"right":Oe.sideX,p=d==="top"?"bottom":Oe.sideY;return{x:h,y:m,data:{sideX:b,sideY:p}}}};function Ut(e,t,o){const n=e==="inline-start"||e==="inline-end";return{top:"top",right:n?o?"inline-start":"inline-end":"right",bottom:"bottom",left:n?o?"inline-end":"inline-start":"left"}[t]}function Ft(e,t,o){const{rects:n,placement:i}=e;return{side:Ut(t,V(i),o),align:te(i)||"center",anchor:{width:n.reference.width,height:n.reference.height},positioner:{width:n.floating.width,height:n.floating.height}}}function zo(e){const{anchor:t,positionMethod:o="absolute",side:n="bottom",sideOffset:i=0,align:s="center",alignOffset:r=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:a=5,disableAnchorTracking:f=!1,inline:g,keepMounted:d=!1,floatingRootContext:h,mounted:m,collisionAvoidance:b,shiftCrossAxis:p=!1,nodeId:w,adaptiveOrigin:x,lazyFlip:y=!1,externalTree:v}=e,[A,P]=R.useState(null);!m&&A!==null&&P(null);const E=b.side||"flip",k=b.align||"flip",D=b.fallbackAxisSide||"end",F=typeof t=="function"?t:void 0,S=Ke(F),M=F?S:t,W=Re(t),H=Re(m),L=Co()==="rtl",O=A||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":L?"left":"right","inline-start":L?"right":"left"}[n],I=s==="center"?O:`${O}-${s}`;let C=l;const ee=1,et=n==="bottom"?ee:0,tt=n==="top"?ee:0,nt=n==="right"?ee:0,ot=n==="left"?ee:0;typeof C=="number"?C={top:C+et,right:C+ot,bottom:C+tt,left:C+nt}:C&&(C={top:(C.top||0)+et,right:(C.right||0)+ot,bottom:(C.bottom||0)+tt,left:(C.left||0)+nt});const xe={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:C},re=R.useRef(null),Le=Re(i),Fe=Re(r),Kt=typeof i!="function"?i:0,Gt=typeof r!="function"?r:0,ce=[];g&&ce.push(g),ce.push(xo(T=>{const _=Ft(T,n,L),j=typeof Le.current=="function"?Le.current(_):Le.current,N=typeof Fe.current=="function"?Fe.current(_):Fe.current;return{mainAxis:j,crossAxis:N,alignmentAxis:N}},[Kt,Gt,L,n]));const it=k==="none"&&E!=="shift",st=!it&&(u||p||E==="shift"),rt=E==="none"?null:bo({...xe,padding:{top:C.top+ee,right:C.right+ee,bottom:C.bottom+ee,left:C.left+ee},mainAxis:!p&&E==="flip",crossAxis:k==="flip"?"alignment":!1,fallbackAxisSideDirection:D}),ct=it?null:wo(T=>{const _=Ce(T.elements.floating).documentElement;return{...xe,rootBoundary:p?{x:0,y:0,width:_.clientWidth,height:_.clientHeight}:void 0,mainAxis:k!=="none",crossAxis:st,limiter:u||p?void 0:yo(j=>{if(!re.current)return{};const{width:N,height:U}=re.current.getBoundingClientRect(),Y=X(V(j.placement)),oe=Y==="y"?N:U,fe=Y==="y"?C.left+C.right:C.top+C.bottom;return{offset:oe/2+fe/2}})}},[xe,u,p,C,k]);E==="shift"||k==="shift"||s==="center"?ce.push(ct,rt):ce.push(rt,ct),ce.push(Ro({...xe,apply({elements:{floating:T},availableWidth:_,availableHeight:j,rects:N}){if(!H.current)return;const U=T.style;U.setProperty("--available-width",`${_}px`),U.setProperty("--available-height",`${j}px`);const Y=K(T).devicePixelRatio||1,{x:oe,y:fe,width:be,height:He}=N.reference,Ie=(Math.round((oe+be)*Y)-Math.round(oe*Y))/Y,Be=(Math.round((fe+He)*Y)-Math.round(fe*Y))/Y;U.setProperty("--anchor-width",`${Ie}px`),U.setProperty("--anchor-height",`${Be}px`)}}),Po(T=>({element:re.current||Ce(T.elements.floating).createElement("div"),padding:a,offsetParent:"floating"}),[a]),{name:"transformOrigin",fn(T){const{elements:_,middlewareData:j,placement:N,rects:U,y:Y}=T,oe=V(N),fe=X(oe),be=re.current,He=j.arrow?.x||0,Ie=j.arrow?.y||0,Be=be?.clientWidth||0,Jt=be?.clientHeight||0,Ve=He+Be/2,Rt=Ie+Jt/2,Qt=Math.abs(j.shift?.y||0),Zt=U.reference.height/2,he=typeof i=="function"?i(Ft(T,n,L)):i,en=Qt>he,tn={top:`${Ve}px calc(100% + ${he}px)`,bottom:`${Ve}px ${-he}px`,left:`calc(100% + ${he}px) ${Rt}px`,right:`${-he}px ${Rt}px`}[oe],nn=`${Ve}px ${U.reference.y+Zt-Y}px`;return _.floating.style.setProperty("--transform-origin",st&&fe==="y"&&en?nn:tn),{}}},Mo,x),G(()=>{!m&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[m,h]);const We=R.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:le,elements:ge,x:lt,y:at,middlewareData:ae,update:we,placement:ft,context:ut,isPositioned:ne,floatingStyles:dt}=Oo({rootContext:h,open:d?m:void 0,placement:I,middleware:ce,strategy:o,whileElementsMounted:d?void 0:(...T)=>kt(...T,We),nodeId:w,externalTree:v}),{sideX:gt,sideY:mt}=ae.adaptiveOrigin||Oe,$e=ne?o:"fixed",ht=R.useMemo(()=>{const T=x?{position:$e,[gt]:lt,[mt]:at}:{position:$e,...dt};return ne||(T.opacity=0),T},[x,$e,gt,lt,mt,at,dt,ne]),ye=R.useRef(null);G(()=>{if(!m)return;const T=W.current,_=typeof T=="function"?T():T,N=(Wt(_)?_.current:_)||null||null;N!==ye.current&&(le.setPositionReference(N),ye.current=N)},[m,le,M,W]),R.useEffect(()=>{if(!m)return;const T=W.current;typeof T!="function"&&Wt(T)&&T.current!==ye.current&&(le.setPositionReference(T.current),ye.current=T.current)},[m,le,M,W]),R.useEffect(()=>{if(d&&m&&ge.reference&&ge.floating)return kt(ge.reference,ge.floating,we,We)},[d,m,ge,we,We]);const me=V(ft),pt=Ut(n,me,L),xt=te(ft)||"center",wt=!!ae.hide?.referenceHidden;G(()=>{y&&m&&ne&&P(me)},[y,m,ne,me]);const yt=R.useMemo(()=>({position:"absolute",top:ae.arrow?.y,left:ae.arrow?.x}),[ae.arrow]),bt=ae.arrow?.centerOffset!==0;return R.useMemo(()=>({positionerStyles:ht,arrowStyles:yt,arrowRef:re,arrowUncentered:bt,side:pt,align:xt,physicalSide:me,anchorHidden:wt,refs:le,context:ut,isPositioned:ne,update:we}),[ht,yt,re,bt,pt,xt,me,wt,le,ut,ne,we])}function Wt(e){return e!=null&&"current"in e}function Do(e){return e==="starting"?pn:$t}function No(e,t,{styles:o,transitionStatus:n,props:i,refs:s,hidden:r,inert:c=!1}){const l={...o};return c&&(l.pointerEvents="none"),xn("div",e,{state:t,ref:s,props:[{role:"presentation",hidden:r,style:l},Do(n),i],stateAttributesMapping:An})}function ko(e){const t=R.useRef(""),o=R.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:R.useCallback(i=>{if(i.detail===0){e(i,"keyboard");return}"pointerType"in i?e(i,i.pointerType):e(i,t.current),t.current=""},[e]),onPointerDown:o}}function Lo(e,t){const o=R.useRef(e),n=Ke(t);G(()=>{o.current!==e&&n(o.current)},[e,n]),G(()=>{o.current=e},[e])}function Fo(e,t){const o=Ke((s,r)=>{(typeof e=="function"?e():e)||t(r||(wn?"touch":""))}),{onClick:n,onPointerDown:i}=ko(o);return R.useMemo(()=>({onClick:n,onPointerDown:i}),[n,i])}function Xo(e){const[t,o]=R.useState(null),n=Fo(e,o);return Lo(e,i=>{i&&!e&&o(null)}),R.useMemo(()=>({openMethod:t,triggerProps:n}),[t,n])}const Wo=20;function Yo(e,t,o,n){const[i,s]=R.useState(!1);G(()=>{if(!e||!t||o==null){s(!1);return}const r=Ce(o).documentElement.clientWidth,c=o.offsetWidth;s(r>0&&c>0&&c>=r-Wo)},[e,t,o]),On(e&&(!t||i),n)}const $o=R.createContext(void 0);function jo(e){return R.useContext($o)}export{Bo as C,Vo as a,Fo as b,zo as c,Yo as d,No as e,_o as f,jo as g,Do as h,Xo as i,Ao as j,Co as k,io as p,Te as r,Lo as u};
1
+ import{l as on,a_ as sn,r as R,bc as rn,aS as cn,aD as ln,bd as an,W as $t,A as fn,aT as B,be as Z,bf as Ne,ba as se,bg as J,aL as K,bh as je,bi as pe,bj as Se,bk as un,bl as Ht,bm as dn,bn as qe,bo as Ue,bp as De,bq as vt,br as It,a1 as gn,bs as mn,aH as hn,aG as G,aU as Ce,P as Ke,bt as pn,z as xn,bu as wn}from"./__vite-browser-external-DEhUaWQY.js";import{n as At,q as yn,F as bn,P as Rn,o as vn,v as Re,p as An,i as On}from"./useScrollLock-K0FPky1Y.js";const Sn=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Bo=on("chevron-down",Sn),Cn=["top","right","bottom","left"],de=Math.min,z=Math.max,Ee=Math.round,ve=Math.floor,q=e=>({x:e,y:e}),En={left:"right",right:"left",bottom:"top",top:"bottom"};function Xe(e,t,o){return z(e,de(t,o))}function Q(e,t){return typeof e=="function"?e(t):e}function V(e){return e.split("-")[0]}function te(e){return e.split("-")[1]}function Ge(e){return e==="x"?"y":"x"}function Je(e){return e==="y"?"height":"width"}function X(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Qe(e){return Ge(X(e))}function Pn(e,t,o){o===void 0&&(o=!1);const n=te(e),i=Qe(e),s=Je(i);let r=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=Pe(r)),[r,Pe(r)]}function Tn(e){const t=Pe(e);return[Ye(e),t,Ye(t)]}function Ye(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ot=["left","right"],St=["right","left"],Mn=["top","bottom"],Dn=["bottom","top"];function kn(e,t,o){switch(e){case"top":case"bottom":return o?t?St:Ot:t?Ot:St;case"left":case"right":return t?Mn:Dn;default:return[]}}function Ln(e,t,o,n){const i=te(e);let s=kn(V(e),o==="start",n);return i&&(s=s.map(r=>r+"-"+i),t&&(s=s.concat(s.map(Ye)))),s}function Pe(e){const t=V(e);return En[t]+e.slice(t.length)}function Fn(e){return{top:0,right:0,bottom:0,left:0,...e}}function Bt(e){return typeof e!="number"?Fn(e):{top:e,right:e,bottom:e,left:e}}function Te(e){const{x:t,y:o,width:n,height:i}=e;return{width:n,height:i,top:o,left:t,right:t+n,bottom:o+i,x:t,y:o}}function Vo(e,t={}){const{enabled:o=!0,event:n="click",toggle:i=!0,ignoreMouse:s=!1,stickIfOpen:r=!0,touchOpenDelay:c=0,reason:l=sn}=t,u="rootStore"in e?e.rootStore:e,a=u.context.dataRef,f=R.useRef(void 0),g=rn(),d=cn(),h=R.useMemo(()=>{function m(p,w,x,y){const v=fn(l,w,x);p&&y==="touch"&&c>0?d.start(c,()=>{u.setOpen(!0,v)}):u.setOpen(p,v)}function b(p,w,x){const y=a.current.openEvent,v=u.select("domReferenceElement")!==w;return p&&v||!p||!i?!0:y&&r?!x(y.type):!1}return{onPointerDown(p){f.current=p.pointerType},onMouseDown(p){const w=f.current,x=p.nativeEvent,y=u.select("open");if(p.button!==0||n==="click"||At(w,!0)&&s)return;const v=b(y,p.currentTarget,E=>E==="click"||E==="mousedown"),A=ln(x);if(an(A)){m(v,x,A,w);return}const P=p.currentTarget;g.request(()=>{m(v,x,P,w)})},onClick(p){if(n==="mousedown-only")return;const w=f.current;if(n==="mousedown"&&w){f.current=void 0;return}if(At(w,!0)&&s)return;const x=u.select("open"),y=b(x,p.currentTarget,v=>v==="click"||v==="mousedown"||v==="keydown"||v==="keyup");m(y,p.nativeEvent,p.currentTarget,w)},onKeyDown(){f.current=void 0}}},[a,n,s,l,u,r,i,g,d,c]);return R.useMemo(()=>o?{reference:h}:$t,[o,h])}function Ct(e,t,o){let{reference:n,floating:i}=e;const s=X(t),r=Qe(t),c=Je(r),l=V(t),u=s==="y",a=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,g=n[c]/2-i[c]/2;let d;switch(l){case"top":d={x:a,y:n.y-i.height};break;case"bottom":d={x:a,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:f};break;case"left":d={x:n.x-i.width,y:f};break;default:d={x:n.x,y:n.y}}switch(te(t)){case"start":d[r]-=g*(o&&u?-1:1);break;case"end":d[r]+=g*(o&&u?-1:1);break}return d}async function Wn(e,t){var o;t===void 0&&(t={});const{x:n,y:i,platform:s,rects:r,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:a="viewport",elementContext:f="floating",altBoundary:g=!1,padding:d=0}=Q(t,e),h=Bt(d),b=c[g?f==="floating"?"reference":"floating":f],p=Te(await s.getClippingRect({element:(o=await(s.isElement==null?void 0:s.isElement(b)))==null||o?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:a,strategy:l})),w=f==="floating"?{x:n,y:i,width:r.floating.width,height:r.floating.height}:r.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),y=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},v=Te(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:x,strategy:l}):w);return{top:(p.top-v.top+h.top)/y.y,bottom:(v.bottom-p.bottom+h.bottom)/y.y,left:(p.left-v.left+h.left)/y.x,right:(v.right-p.right+h.right)/y.x}}const $n=50,Hn=async(e,t,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:r}=o,c=r.detectOverflow?r:{...r,detectOverflow:Wn},l=await(r.isRTL==null?void 0:r.isRTL(t));let u=await r.getElementRects({reference:e,floating:t,strategy:i}),{x:a,y:f}=Ct(u,n,l),g=n,d=0;const h={};for(let m=0;m<s.length;m++){const b=s[m];if(!b)continue;const{name:p,fn:w}=b,{x,y,data:v,reset:A}=await w({x:a,y:f,initialPlacement:n,placement:g,strategy:i,middlewareData:h,rects:u,platform:c,elements:{reference:e,floating:t}});a=x??a,f=y??f,h[p]={...h[p],...v},A&&d<$n&&(d++,typeof A=="object"&&(A.placement&&(g=A.placement),A.rects&&(u=A.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:a,y:f}=Ct(u,g,l)),m=-1)}return{x:a,y:f,placement:g,strategy:i,middlewareData:h}},In=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,n;const{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:l,elements:u}=t,{mainAxis:a=!0,crossAxis:f=!0,fallbackPlacements:g,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...b}=Q(e,t);if((o=s.arrow)!=null&&o.alignmentOffset)return{};const p=V(i),w=X(c),x=V(c)===c,y=await(l.isRTL==null?void 0:l.isRTL(u.floating)),v=g||(x||!m?[Pe(c)]:Tn(c)),A=h!=="none";!g&&A&&v.push(...Ln(c,m,h,y));const P=[c,...v],E=await l.detectOverflow(t,b),k=[];let D=((n=s.flip)==null?void 0:n.overflows)||[];if(a&&k.push(E[p]),f){const W=Pn(i,r,y);k.push(E[W[0]],E[W[1]])}if(D=[...D,{placement:i,overflows:k}],!k.every(W=>W<=0)){var F,S;const W=(((F=s.flip)==null?void 0:F.index)||0)+1,H=P[W];if(H&&(!(f==="alignment"?w!==X(H):!1)||D.every(O=>X(O.placement)===w?O.overflows[0]>0:!0)))return{data:{index:W,overflows:D},reset:{placement:H}};let $=(S=D.filter(L=>L.overflows[0]<=0).sort((L,O)=>L.overflows[1]-O.overflows[1])[0])==null?void 0:S.placement;if(!$)switch(d){case"bestFit":{var M;const L=(M=D.filter(O=>{if(A){const I=X(O.placement);return I===w||I==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(I=>I>0).reduce((I,C)=>I+C,0)]).sort((O,I)=>O[1]-I[1])[0])==null?void 0:M[0];L&&($=L);break}case"initialPlacement":$=c;break}if(i!==$)return{reset:{placement:$}}}return{}}}};function Et(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Pt(e){return Cn.some(t=>e[t]>=0)}const Bn=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:o,platform:n}=t,{strategy:i="referenceHidden",...s}=Q(e,t);switch(i){case"referenceHidden":{const r=await n.detectOverflow(t,{...s,elementContext:"reference"}),c=Et(r,o.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Pt(c)}}}case"escaped":{const r=await n.detectOverflow(t,{...s,altBoundary:!0}),c=Et(r,o.floating);return{data:{escapedOffsets:c,escaped:Pt(c)}}}default:return{}}}}},Vt=new Set(["left","top"]);async function Vn(e,t){const{placement:o,platform:n,elements:i}=e,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),r=V(o),c=te(o),l=X(o)==="y",u=Vt.has(r)?-1:1,a=s&&l?-1:1,f=Q(t,e);let{mainAxis:g,crossAxis:d,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof h=="number"&&(d=c==="end"?h*-1:h),l?{x:d*a,y:g*u}:{x:g*u,y:d*a}}const _n=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,n;const{x:i,y:s,placement:r,middlewareData:c}=t,l=await Vn(t,e);return r===((o=c.offset)==null?void 0:o.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:r}}}}},zn=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:n,placement:i,platform:s}=t,{mainAxis:r=!0,crossAxis:c=!1,limiter:l={fn:p=>{let{x:w,y:x}=p;return{x:w,y:x}}},...u}=Q(e,t),a={x:o,y:n},f=await s.detectOverflow(t,u),g=X(V(i)),d=Ge(g);let h=a[d],m=a[g];if(r){const p=d==="y"?"top":"left",w=d==="y"?"bottom":"right",x=h+f[p],y=h-f[w];h=Xe(x,h,y)}if(c){const p=g==="y"?"top":"left",w=g==="y"?"bottom":"right",x=m+f[p],y=m-f[w];m=Xe(x,m,y)}const b=l.fn({...t,[d]:h,[g]:m});return{...b,data:{x:b.x-o,y:b.y-n,enabled:{[d]:r,[g]:c}}}}}},Nn=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:o,y:n,placement:i,rects:s,middlewareData:r}=t,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=Q(e,t),a={x:o,y:n},f=X(i),g=Ge(f);let d=a[g],h=a[f];const m=Q(c,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=g==="y"?"height":"width",y=s.reference[g]-s.floating[x]+b.mainAxis,v=s.reference[g]+s.reference[x]-b.mainAxis;d<y?d=y:d>v&&(d=v)}if(u){var p,w;const x=g==="y"?"width":"height",y=Vt.has(V(i)),v=s.reference[f]-s.floating[x]+(y&&((p=r.offset)==null?void 0:p[f])||0)+(y?0:b.crossAxis),A=s.reference[f]+s.reference[x]+(y?0:((w=r.offset)==null?void 0:w[f])||0)-(y?b.crossAxis:0);h<v?h=v:h>A&&(h=A)}return{[g]:d,[f]:h}}}},Xn=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,n;const{placement:i,rects:s,platform:r,elements:c}=t,{apply:l=()=>{},...u}=Q(e,t),a=await r.detectOverflow(t,u),f=V(i),g=te(i),d=X(i)==="y",{width:h,height:m}=s.floating;let b,p;f==="top"||f==="bottom"?(b=f,p=g===(await(r.isRTL==null?void 0:r.isRTL(c.floating))?"start":"end")?"left":"right"):(p=f,b=g==="end"?"top":"bottom");const w=m-a.top-a.bottom,x=h-a.left-a.right,y=de(m-a[b],w),v=de(h-a[p],x),A=!t.middlewareData.shift;let P=y,E=v;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(E=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(P=w),A&&!g){const D=z(a.left,0),F=z(a.right,0),S=z(a.top,0),M=z(a.bottom,0);d?E=h-2*(D!==0||F!==0?D+F:z(a.left,a.right)):P=m-2*(S!==0||M!==0?S+M:z(a.top,a.bottom))}await l({...t,availableWidth:E,availableHeight:P});const k=await r.getDimensions(c.floating);return h!==k.width||m!==k.height?{reset:{rects:!0}}:{}}}};function _t(e){const t=J(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=se(e),s=i?e.offsetWidth:o,r=i?e.offsetHeight:n,c=Ee(o)!==s||Ee(n)!==r;return c&&(o=s,n=r),{width:o,height:n,$:c}}function Ze(e){return B(e)?e:e.contextElement}function ue(e){const t=Ze(e);if(!se(t))return q(1);const o=t.getBoundingClientRect(),{width:n,height:i,$:s}=_t(t);let r=(s?Ee(o.width):o.width)/n,c=(s?Ee(o.height):o.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const Yn=q(0);function zt(e){const t=K(e);return!It()||!t.visualViewport?Yn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function jn(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==K(e)?!1:t}function ie(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);const i=e.getBoundingClientRect(),s=Ze(e);let r=q(1);t&&(n?B(n)&&(r=ue(n)):r=ue(e));const c=jn(s,o,n)?zt(s):q(0);let l=(i.left+c.x)/r.x,u=(i.top+c.y)/r.y,a=i.width/r.x,f=i.height/r.y;if(s){const g=K(s),d=n&&B(n)?K(n):n;let h=g,m=vt(h);for(;m&&n&&d!==h;){const b=ue(m),p=m.getBoundingClientRect(),w=J(m),x=p.left+(m.clientLeft+parseFloat(w.paddingLeft))*b.x,y=p.top+(m.clientTop+parseFloat(w.paddingTop))*b.y;l*=b.x,u*=b.y,a*=b.x,f*=b.y,l+=x,u+=y,h=K(m),m=vt(h)}}return Te({width:a,height:f,x:l,y:u})}function ke(e,t){const o=De(e).scrollLeft;return t?t.left+o:ie(Z(e)).left+o}function Nt(e,t){const o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-ke(e,o),i=o.top+t.scrollTop;return{x:n,y:i}}function qn(e){let{elements:t,rect:o,offsetParent:n,strategy:i}=e;const s=i==="fixed",r=Z(n),c=t?je(t.floating):!1;if(n===r||c&&s)return o;let l={scrollLeft:0,scrollTop:0},u=q(1);const a=q(0),f=se(n);if((f||!f&&!s)&&((qe(n)!=="body"||Ue(r))&&(l=De(n)),f)){const d=ie(n);u=ue(n),a.x=d.x+n.clientLeft,a.y=d.y+n.clientTop}const g=r&&!f&&!s?Nt(r,l):q(0);return{width:o.width*u.x,height:o.height*u.y,x:o.x*u.x-l.scrollLeft*u.x+a.x+g.x,y:o.y*u.y-l.scrollTop*u.y+a.y+g.y}}function Un(e){return Array.from(e.getClientRects())}function Kn(e){const t=Z(e),o=De(e),n=e.ownerDocument.body,i=z(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=z(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-o.scrollLeft+ke(e);const c=-o.scrollTop;return J(n).direction==="rtl"&&(r+=z(t.clientWidth,n.clientWidth)-i),{width:i,height:s,x:r,y:c}}const Tt=25;function Gn(e,t){const o=K(e),n=Z(e),i=o.visualViewport;let s=n.clientWidth,r=n.clientHeight,c=0,l=0;if(i){s=i.width,r=i.height;const a=It();(!a||a&&t==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}const u=ke(n);if(u<=0){const a=n.ownerDocument,f=a.body,g=getComputedStyle(f),d=a.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,h=Math.abs(n.clientWidth-f.clientWidth-d);h<=Tt&&(s-=h)}else u<=Tt&&(s+=u);return{width:s,height:r,x:c,y:l}}function Jn(e,t){const o=ie(e,!0,t==="fixed"),n=o.top+e.clientTop,i=o.left+e.clientLeft,s=se(e)?ue(e):q(1),r=e.clientWidth*s.x,c=e.clientHeight*s.y,l=i*s.x,u=n*s.y;return{width:r,height:c,x:l,y:u}}function Mt(e,t,o){let n;if(t==="viewport")n=Gn(e,o);else if(t==="document")n=Kn(Z(e));else if(B(t))n=Jn(t,o);else{const i=zt(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Te(n)}function Xt(e,t){const o=pe(e);return o===t||!B(o)||Se(o)?!1:J(o).position==="fixed"||Xt(o,t)}function Qn(e,t){const o=t.get(e);if(o)return o;let n=Ne(e,[],!1).filter(c=>B(c)&&qe(c)!=="body"),i=null;const s=J(e).position==="fixed";let r=s?pe(e):e;for(;B(r)&&!Se(r);){const c=J(r),l=Ht(r);!l&&c.position==="fixed"&&(i=null),(s?!l&&!i:!l&&c.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Ue(r)&&!l&&Xt(e,r))?n=n.filter(a=>a!==r):i=c,r=pe(r)}return t.set(e,n),n}function Zn(e){let{element:t,boundary:o,rootBoundary:n,strategy:i}=e;const r=[...o==="clippingAncestors"?je(t)?[]:Qn(t,this._c):[].concat(o),n],c=Mt(t,r[0],i);let l=c.top,u=c.right,a=c.bottom,f=c.left;for(let g=1;g<r.length;g++){const d=Mt(t,r[g],i);l=z(d.top,l),u=de(d.right,u),a=de(d.bottom,a),f=z(d.left,f)}return{width:u-f,height:a-l,x:f,y:l}}function eo(e){const{width:t,height:o}=_t(e);return{width:t,height:o}}function to(e,t,o){const n=se(t),i=Z(t),s=o==="fixed",r=ie(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=q(0);function u(){l.x=ke(i)}if(n||!n&&!s)if((qe(t)!=="body"||Ue(i))&&(c=De(t)),n){const d=ie(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else i&&u();s&&!n&&i&&u();const a=i&&!n&&!s?Nt(i,c):q(0),f=r.left+c.scrollLeft-l.x-a.x,g=r.top+c.scrollTop-l.y-a.y;return{x:f,y:g,width:r.width,height:r.height}}function _e(e){return J(e).position==="static"}function Dt(e,t){if(!se(e)||J(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return Z(e)===o&&(o=o.ownerDocument.body),o}function Yt(e,t){const o=K(e);if(je(e))return o;if(!se(e)){let i=pe(e);for(;i&&!Se(i);){if(B(i)&&!_e(i))return i;i=pe(i)}return o}let n=Dt(e,t);for(;n&&un(n)&&_e(n);)n=Dt(n,t);return n&&Se(n)&&_e(n)&&!Ht(n)?o:n||dn(e)||o}const no=async function(e){const t=this.getOffsetParent||Yt,o=this.getDimensions,n=await o(e.floating);return{reference:to(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function oo(e){return J(e).direction==="rtl"}const io={convertOffsetParentRelativeRectToViewportRelativeRect:qn,getDocumentElement:Z,getClippingRect:Zn,getOffsetParent:Yt,getElementRects:no,getClientRects:Un,getDimensions:eo,getScale:ue,isElement:B,isRTL:oo};function jt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function so(e,t){let o=null,n;const i=Z(e);function s(){var c;clearTimeout(n),(c=o)==null||c.disconnect(),o=null}function r(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:a,top:f,width:g,height:d}=u;if(c||t(),!g||!d)return;const h=ve(f),m=ve(i.clientWidth-(a+g)),b=ve(i.clientHeight-(f+d)),p=ve(a),x={rootMargin:-h+"px "+-m+"px "+-b+"px "+-p+"px",threshold:z(0,de(1,l))||1};let y=!0;function v(A){const P=A[0].intersectionRatio;if(P!==l){if(!y)return r();P?r(!1,P):n=setTimeout(()=>{r(!1,1e-7)},1e3)}P===1&&!jt(u,e.getBoundingClientRect())&&r(),y=!1}try{o=new IntersectionObserver(v,{...x,root:i.ownerDocument})}catch{o=new IntersectionObserver(v,x)}o.observe(e)}return r(!0),s}function kt(e,t,o,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Ze(e),a=i||s?[...u?Ne(u):[],...t?Ne(t):[]]:[];a.forEach(p=>{i&&p.addEventListener("scroll",o,{passive:!0}),s&&p.addEventListener("resize",o)});const f=u&&c?so(u,o):null;let g=-1,d=null;r&&(d=new ResizeObserver(p=>{let[w]=p;w&&w.target===u&&d&&t&&(d.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var x;(x=d)==null||x.observe(t)})),o()}),u&&!l&&d.observe(u),t&&d.observe(t));let h,m=l?ie(e):null;l&&b();function b(){const p=ie(e);m&&!jt(m,p)&&o(),m=p,h=requestAnimationFrame(b)}return o(),()=>{var p;a.forEach(w=>{i&&w.removeEventListener("scroll",o),s&&w.removeEventListener("resize",o)}),f?.(),(p=d)==null||p.disconnect(),d=null,l&&cancelAnimationFrame(h)}}const ro=_n,co=zn,lo=In,ao=Xn,fo=Bn,uo=Nn,go=(e,t,o)=>{const n=new Map,i={platform:io,...o},s={...i.platform,_c:n};return Hn(e,t,{...i,platform:s})};var mo=typeof document<"u",ho=function(){},Ae=mo?R.useLayoutEffect:ho;function Me(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let o,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(n=o;n--!==0;)if(!Me(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),o=i.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){const s=i[n];if(!(s==="_owner"&&e.$$typeof)&&!Me(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function qt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Lt(e,t){const o=qt(e);return Math.round(t*o)/o}function ze(e){const t=R.useRef(e);return Ae(()=>{t.current=e}),t}function po(e){e===void 0&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:n=[],platform:i,elements:{reference:s,floating:r}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[a,f]=R.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[g,d]=R.useState(n);Me(g,n)||d(n);const[h,m]=R.useState(null),[b,p]=R.useState(null),w=R.useCallback(O=>{O!==A.current&&(A.current=O,m(O))},[]),x=R.useCallback(O=>{O!==P.current&&(P.current=O,p(O))},[]),y=s||h,v=r||b,A=R.useRef(null),P=R.useRef(null),E=R.useRef(a),k=l!=null,D=ze(l),F=ze(i),S=ze(u),M=R.useCallback(()=>{if(!A.current||!P.current)return;const O={placement:t,strategy:o,middleware:g};F.current&&(O.platform=F.current),go(A.current,P.current,O).then(I=>{const C={...I,isPositioned:S.current!==!1};W.current&&!Me(E.current,C)&&(E.current=C,gn.flushSync(()=>{f(C)}))})},[g,t,o,F,S]);Ae(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(O=>({...O,isPositioned:!1})))},[u]);const W=R.useRef(!1);Ae(()=>(W.current=!0,()=>{W.current=!1}),[]),Ae(()=>{if(y&&(A.current=y),v&&(P.current=v),y&&v){if(D.current)return D.current(y,v,M);M()}},[y,v,M,D,k]);const H=R.useMemo(()=>({reference:A,floating:P,setReference:w,setFloating:x}),[w,x]),$=R.useMemo(()=>({reference:y,floating:v}),[y,v]),L=R.useMemo(()=>{const O={position:o,left:0,top:0};if(!$.floating)return O;const I=Lt($.floating,a.x),C=Lt($.floating,a.y);return c?{...O,transform:"translate("+I+"px, "+C+"px)",...qt($.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:I,top:C}},[o,c,$.floating,a.x,a.y]);return R.useMemo(()=>({...a,update:M,refs:H,elements:$,floatingStyles:L}),[a,M,H,$,L])}const xo=(e,t)=>{const o=ro(e);return{name:o.name,fn:o.fn,options:[e,t]}},wo=(e,t)=>{const o=co(e);return{name:o.name,fn:o.fn,options:[e,t]}},yo=(e,t)=>({fn:uo(e).fn,options:[e,t]}),bo=(e,t)=>{const o=lo(e);return{name:o.name,fn:o.fn,options:[e,t]}},Ro=(e,t)=>{const o=ao(e);return{name:o.name,fn:o.fn,options:[e,t]}},vo=(e,t)=>{const o=fo(e);return{name:o.name,fn:o.fn,options:[e,t]}};function Ao(e){const{open:t=!1,onOpenChange:o,elements:n={}}=e,i=mn(),s=yn()!=null,r=hn(()=>new bn({open:t,transitionStatus:void 0,onOpenChange:o,referenceElement:n.reference??null,floatingElement:n.floating??null,triggerElements:new Rn,floatingId:i,syncOnly:!1,nested:s})).current;return G(()=>{const c={open:t,floatingId:i};n.reference!==void 0&&(c.referenceElement=n.reference,c.domReferenceElement=B(n.reference)?n.reference:null),n.floating!==void 0&&(c.floatingElement=n.floating),r.update(c)},[t,i,n.reference,n.floating,r]),r.context.onOpenChange=o,r.context.nested=s,r}function Oo(e={}){const{nodeId:t,externalTree:o}=e,n=Ao(e),i=e.rootContext||n,s=i.useState("referenceElement"),r=i.useState("floatingElement"),c=i.useState("domReferenceElement"),l=i.useState("open"),u=i.useState("floatingId"),[a,f]=R.useState(null),[g,d]=R.useState(void 0),[h,m]=R.useState(void 0),b=R.useRef(null),p=vn(o),w=R.useMemo(()=>({reference:s,floating:r,domReference:c}),[s,r,c]),x=po({...e,elements:{...w,...a&&{reference:a}}}),y=B(g)?g:null,v=h===void 0?i.state.floatingElement:h;i.useSyncedValue("referenceElement",g??null),i.useSyncedValue("domReferenceElement",g===void 0?c:y),i.useSyncedValue("floatingElement",v);const A=R.useCallback(S=>{const M=B(S)?{getBoundingClientRect:()=>S.getBoundingClientRect(),getClientRects:()=>S.getClientRects(),contextElement:S}:S;f(M),x.refs.setReference(M)},[x.refs]),P=R.useCallback(S=>{(B(S)||S===null)&&(b.current=S,d(S)),(B(x.refs.reference.current)||x.refs.reference.current===null||S!==null&&!B(S))&&x.refs.setReference(S)},[x.refs,d]),E=R.useCallback(S=>{m(S),x.refs.setFloating(S)},[x.refs]),k=R.useMemo(()=>({...x.refs,setReference:P,setFloating:E,setPositionReference:A,domReference:b}),[x.refs,P,E,A]),D=R.useMemo(()=>({...x.elements,domReference:c}),[x.elements,c]),F=R.useMemo(()=>({...x,dataRef:i.context.dataRef,open:l,onOpenChange:i.setOpen,events:i.context.events,floatingId:u,refs:k,elements:D,nodeId:t,rootStore:i}),[x,k,D,t,i,l,u]);return G(()=>{c&&(b.current=c)},[c]),G(()=>{i.context.dataRef.current.floatingContext=F;const S=p?.nodesRef.current.find(M=>M.id===t);S&&(S.context=F)}),R.useMemo(()=>({...x,context:F,refs:k,elements:D,rootStore:i}),[x,k,D,F,i])}const So=R.createContext(void 0);function Co(){return R.useContext(So)?.direction??"ltr"}const Eo=e=>({name:"arrow",options:e,async fn(t){const{x:o,y:n,placement:i,rects:s,platform:r,elements:c,middlewareData:l}=t,{element:u,padding:a=0,offsetParent:f="real"}=Q(e,t)||{};if(u==null)return{};const g=Bt(a),d={x:o,y:n},h=Qe(i),m=Je(h),b=await r.getDimensions(u),p=h==="y",w=p?"top":"left",x=p?"bottom":"right",y=p?"clientHeight":"clientWidth",v=s.reference[m]+s.reference[h]-d[h]-s.floating[m],A=d[h]-s.reference[h],P=f==="real"?await r.getOffsetParent?.(u):c.floating;let E=c.floating[y]||s.floating[m];(!E||!await r.isElement?.(P))&&(E=c.floating[y]||s.floating[m]);const k=v/2-A/2,D=E/2-b[m]/2-1,F=Math.min(g[w],D),S=Math.min(g[x],D),M=F,W=E-b[m]-S,H=E/2-b[m]/2+k,$=Xe(M,H,W),L=!l.arrow&&te(i)!=null&&H!==$&&s.reference[m]/2-(H<M?F:S)-b[m]/2<0,O=L?H<M?H-M:H-W:0;return{[h]:d[h]+O,data:{[h]:$,centerOffset:H-$-O,...L&&{alignmentOffset:O}},reset:L}}}),Po=(e,t)=>({...Eo(e),options:[e,t]}),To=vo().fn,Mo={name:"hide",async fn(e){const{width:t,height:o,x:n,y:i}=e.rects.reference,s=t===0&&o===0&&n===0&&i===0;return{data:{referenceHidden:(await To(e)).data?.referenceHidden||s}}}},Oe={sideX:"left",sideY:"top"},_o={name:"adaptiveOrigin",async fn(e){const{x:t,y:o,rects:{floating:n},elements:{floating:i},platform:s,strategy:r,placement:c}=e,l=K(i),u=l.getComputedStyle(i);if(!(u.transitionDuration!=="0s"&&u.transitionDuration!==""))return{x:t,y:o,data:Oe};const f=await s.getOffsetParent?.(i);let g={width:0,height:0};if(r==="fixed"&&l?.visualViewport)g={width:l.visualViewport.width,height:l.visualViewport.height};else if(f===l){const w=Ce(i);g={width:w.documentElement.clientWidth,height:w.documentElement.clientHeight}}else await s.isElement?.(f)&&(g=await s.getDimensions(f));const d=V(c);let h=t,m=o;d==="left"&&(h=g.width-(t+n.width)),d==="top"&&(m=g.height-(o+n.height));const b=d==="left"?"right":Oe.sideX,p=d==="top"?"bottom":Oe.sideY;return{x:h,y:m,data:{sideX:b,sideY:p}}}};function Ut(e,t,o){const n=e==="inline-start"||e==="inline-end";return{top:"top",right:n?o?"inline-start":"inline-end":"right",bottom:"bottom",left:n?o?"inline-end":"inline-start":"left"}[t]}function Ft(e,t,o){const{rects:n,placement:i}=e;return{side:Ut(t,V(i),o),align:te(i)||"center",anchor:{width:n.reference.width,height:n.reference.height},positioner:{width:n.floating.width,height:n.floating.height}}}function zo(e){const{anchor:t,positionMethod:o="absolute",side:n="bottom",sideOffset:i=0,align:s="center",alignOffset:r=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:a=5,disableAnchorTracking:f=!1,inline:g,keepMounted:d=!1,floatingRootContext:h,mounted:m,collisionAvoidance:b,shiftCrossAxis:p=!1,nodeId:w,adaptiveOrigin:x,lazyFlip:y=!1,externalTree:v}=e,[A,P]=R.useState(null);!m&&A!==null&&P(null);const E=b.side||"flip",k=b.align||"flip",D=b.fallbackAxisSide||"end",F=typeof t=="function"?t:void 0,S=Ke(F),M=F?S:t,W=Re(t),H=Re(m),L=Co()==="rtl",O=A||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":L?"left":"right","inline-start":L?"right":"left"}[n],I=s==="center"?O:`${O}-${s}`;let C=l;const ee=1,et=n==="bottom"?ee:0,tt=n==="top"?ee:0,nt=n==="right"?ee:0,ot=n==="left"?ee:0;typeof C=="number"?C={top:C+et,right:C+ot,bottom:C+tt,left:C+nt}:C&&(C={top:(C.top||0)+et,right:(C.right||0)+ot,bottom:(C.bottom||0)+tt,left:(C.left||0)+nt});const xe={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:C},re=R.useRef(null),Le=Re(i),Fe=Re(r),Kt=typeof i!="function"?i:0,Gt=typeof r!="function"?r:0,ce=[];g&&ce.push(g),ce.push(xo(T=>{const _=Ft(T,n,L),j=typeof Le.current=="function"?Le.current(_):Le.current,N=typeof Fe.current=="function"?Fe.current(_):Fe.current;return{mainAxis:j,crossAxis:N,alignmentAxis:N}},[Kt,Gt,L,n]));const it=k==="none"&&E!=="shift",st=!it&&(u||p||E==="shift"),rt=E==="none"?null:bo({...xe,padding:{top:C.top+ee,right:C.right+ee,bottom:C.bottom+ee,left:C.left+ee},mainAxis:!p&&E==="flip",crossAxis:k==="flip"?"alignment":!1,fallbackAxisSideDirection:D}),ct=it?null:wo(T=>{const _=Ce(T.elements.floating).documentElement;return{...xe,rootBoundary:p?{x:0,y:0,width:_.clientWidth,height:_.clientHeight}:void 0,mainAxis:k!=="none",crossAxis:st,limiter:u||p?void 0:yo(j=>{if(!re.current)return{};const{width:N,height:U}=re.current.getBoundingClientRect(),Y=X(V(j.placement)),oe=Y==="y"?N:U,fe=Y==="y"?C.left+C.right:C.top+C.bottom;return{offset:oe/2+fe/2}})}},[xe,u,p,C,k]);E==="shift"||k==="shift"||s==="center"?ce.push(ct,rt):ce.push(rt,ct),ce.push(Ro({...xe,apply({elements:{floating:T},availableWidth:_,availableHeight:j,rects:N}){if(!H.current)return;const U=T.style;U.setProperty("--available-width",`${_}px`),U.setProperty("--available-height",`${j}px`);const Y=K(T).devicePixelRatio||1,{x:oe,y:fe,width:be,height:He}=N.reference,Ie=(Math.round((oe+be)*Y)-Math.round(oe*Y))/Y,Be=(Math.round((fe+He)*Y)-Math.round(fe*Y))/Y;U.setProperty("--anchor-width",`${Ie}px`),U.setProperty("--anchor-height",`${Be}px`)}}),Po(T=>({element:re.current||Ce(T.elements.floating).createElement("div"),padding:a,offsetParent:"floating"}),[a]),{name:"transformOrigin",fn(T){const{elements:_,middlewareData:j,placement:N,rects:U,y:Y}=T,oe=V(N),fe=X(oe),be=re.current,He=j.arrow?.x||0,Ie=j.arrow?.y||0,Be=be?.clientWidth||0,Jt=be?.clientHeight||0,Ve=He+Be/2,Rt=Ie+Jt/2,Qt=Math.abs(j.shift?.y||0),Zt=U.reference.height/2,he=typeof i=="function"?i(Ft(T,n,L)):i,en=Qt>he,tn={top:`${Ve}px calc(100% + ${he}px)`,bottom:`${Ve}px ${-he}px`,left:`calc(100% + ${he}px) ${Rt}px`,right:`${-he}px ${Rt}px`}[oe],nn=`${Ve}px ${U.reference.y+Zt-Y}px`;return _.floating.style.setProperty("--transform-origin",st&&fe==="y"&&en?nn:tn),{}}},Mo,x),G(()=>{!m&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[m,h]);const We=R.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:le,elements:ge,x:lt,y:at,middlewareData:ae,update:we,placement:ft,context:ut,isPositioned:ne,floatingStyles:dt}=Oo({rootContext:h,open:d?m:void 0,placement:I,middleware:ce,strategy:o,whileElementsMounted:d?void 0:(...T)=>kt(...T,We),nodeId:w,externalTree:v}),{sideX:gt,sideY:mt}=ae.adaptiveOrigin||Oe,$e=ne?o:"fixed",ht=R.useMemo(()=>{const T=x?{position:$e,[gt]:lt,[mt]:at}:{position:$e,...dt};return ne||(T.opacity=0),T},[x,$e,gt,lt,mt,at,dt,ne]),ye=R.useRef(null);G(()=>{if(!m)return;const T=W.current,_=typeof T=="function"?T():T,N=(Wt(_)?_.current:_)||null||null;N!==ye.current&&(le.setPositionReference(N),ye.current=N)},[m,le,M,W]),R.useEffect(()=>{if(!m)return;const T=W.current;typeof T!="function"&&Wt(T)&&T.current!==ye.current&&(le.setPositionReference(T.current),ye.current=T.current)},[m,le,M,W]),R.useEffect(()=>{if(d&&m&&ge.reference&&ge.floating)return kt(ge.reference,ge.floating,we,We)},[d,m,ge,we,We]);const me=V(ft),pt=Ut(n,me,L),xt=te(ft)||"center",wt=!!ae.hide?.referenceHidden;G(()=>{y&&m&&ne&&P(me)},[y,m,ne,me]);const yt=R.useMemo(()=>({position:"absolute",top:ae.arrow?.y,left:ae.arrow?.x}),[ae.arrow]),bt=ae.arrow?.centerOffset!==0;return R.useMemo(()=>({positionerStyles:ht,arrowStyles:yt,arrowRef:re,arrowUncentered:bt,side:pt,align:xt,physicalSide:me,anchorHidden:wt,refs:le,context:ut,isPositioned:ne,update:we}),[ht,yt,re,bt,pt,xt,me,wt,le,ut,ne,we])}function Wt(e){return e!=null&&"current"in e}function Do(e){return e==="starting"?pn:$t}function No(e,t,{styles:o,transitionStatus:n,props:i,refs:s,hidden:r,inert:c=!1}){const l={...o};return c&&(l.pointerEvents="none"),xn("div",e,{state:t,ref:s,props:[{role:"presentation",hidden:r,style:l},Do(n),i],stateAttributesMapping:An})}function ko(e){const t=R.useRef(""),o=R.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:R.useCallback(i=>{if(i.detail===0){e(i,"keyboard");return}"pointerType"in i?e(i,i.pointerType):e(i,t.current),t.current=""},[e]),onPointerDown:o}}function Lo(e,t){const o=R.useRef(e),n=Ke(t);G(()=>{o.current!==e&&n(o.current)},[e,n]),G(()=>{o.current=e},[e])}function Fo(e,t){const o=Ke((s,r)=>{(typeof e=="function"?e():e)||t(r||(wn?"touch":""))}),{onClick:n,onPointerDown:i}=ko(o);return R.useMemo(()=>({onClick:n,onPointerDown:i}),[n,i])}function Xo(e){const[t,o]=R.useState(null),n=Fo(e,o);return Lo(e,i=>{i&&!e&&o(null)}),R.useMemo(()=>({openMethod:t,triggerProps:n}),[t,n])}const Wo=20;function Yo(e,t,o,n){const[i,s]=R.useState(!1);G(()=>{if(!e||!t||o==null){s(!1);return}const r=Ce(o).documentElement.clientWidth,c=o.offsetWidth;s(r>0&&c>0&&c>=r-Wo)},[e,t,o]),On(e&&(!t||i),n)}const $o=R.createContext(void 0);function jo(e){return R.useContext($o)}export{Bo as C,Vo as a,Fo as b,zo as c,Yo as d,No as e,_o as f,jo as g,Do as h,Xo as i,Ao as j,Co as k,io as p,Te as r,Lo as u};