tokentracker-cli 0.93.2 → 0.93.3

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 (94) hide show
  1. package/dashboard/dist/assets/{AchievementBadge-D10CA0Yt.js → AchievementBadge-Bl3bWjZw.js} +1 -1
  2. package/dashboard/dist/assets/{AchievementsPage-Koc-RixX.js → AchievementsPage-B6FrDjg8.js} +2 -2
  3. package/dashboard/dist/assets/{AchievementsSection-BhPN_8G6.js → AchievementsSection-D5TJtcI5.js} +1 -1
  4. package/dashboard/dist/assets/{BadgeDetailModal-CFgdS3Ew.js → BadgeDetailModal-BFlrt34z.js} +1 -1
  5. package/dashboard/dist/assets/{BotAnimated-CW81QSQu.js → BotAnimated-KONFZbQT.js} +1 -1
  6. package/dashboard/dist/assets/{Card-DzYuh963.js → Card-DDZHhXlQ.js} +1 -1
  7. package/dashboard/dist/assets/{ClawdAnimated-CxR9qig7.js → ClawdAnimated-DMw54QJ_.js} +2 -2
  8. package/dashboard/dist/assets/{CommandPalette-DbvccFuj.js → CommandPalette-CxVv0uo_.js} +1 -1
  9. package/dashboard/dist/assets/{CommunityStatsModal-zROYUuhI.js → CommunityStatsModal-CR2MuFo3.js} +1 -1
  10. package/dashboard/dist/assets/{ConfirmModal-nOBxWc3T.js → ConfirmModal-B-jvLsxn.js} +1 -1
  11. package/dashboard/dist/assets/{Controls-NQMc-XyF.js → Controls-DXA3Zxx0.js} +1 -1
  12. package/dashboard/dist/assets/{DashboardPage-Cr7YjFQE.js → DashboardPage-0jQPu59U.js} +1 -1
  13. package/dashboard/dist/assets/{DevicePage-hg5EX6lW.js → DevicePage-CMR7jT8-.js} +1 -1
  14. package/dashboard/dist/assets/{DialogClose-B7AyVJn4.js → DialogClose-B1j73B1g.js} +1 -1
  15. package/dashboard/dist/assets/DialogDescription-ZS29ikF4.js +1 -0
  16. package/dashboard/dist/assets/{DialogTitle-IGUG8ZLp.js → DialogTitle-eIgptOU-.js} +1 -1
  17. package/dashboard/dist/assets/{FadeIn-DT4BeINx.js → FadeIn-B8aisUg4.js} +1 -1
  18. package/dashboard/dist/assets/{HeaderGithubStar-DrG9OXEl.js → HeaderGithubStar-B7MEGODn.js} +1 -1
  19. package/dashboard/dist/assets/{HoverTooltip-DkHxleW2.js → HoverTooltip-DfBzMfW7.js} +1 -1
  20. package/dashboard/dist/assets/{IpCheckPage-Btl87yWo.js → IpCheckPage-BBvSL0Zz.js} +1 -1
  21. package/dashboard/dist/assets/{LandingPage-BM2GFoSc.js → LandingPage-CcX03ndP.js} +2 -2
  22. package/dashboard/dist/assets/{LeaderboardAvatar-AqGMcFFx.js → LeaderboardAvatar-Dk4UJx-j.js} +1 -1
  23. package/dashboard/dist/assets/{LeaderboardPage-B9UnLIPA.js → LeaderboardPage-CcIp7sjv.js} +2 -2
  24. package/dashboard/dist/assets/{LeaderboardProfileModal-D0PZMJOW.js → LeaderboardProfileModal-DzXfmNhy.js} +3 -3
  25. package/dashboard/dist/assets/{LeaderboardProfilePage-D9bu_0cf.js → LeaderboardProfilePage-18ijOFN-.js} +1 -1
  26. package/dashboard/dist/assets/{LimitsPage-LLP2azzT.js → LimitsPage-ZeRD1J97.js} +1 -1
  27. package/dashboard/dist/assets/{LocalOnlyNotice-D3wCg6qv.js → LocalOnlyNotice-DQ_wPyho.js} +1 -1
  28. package/dashboard/dist/assets/{LoginCard-D4lzOeYM.js → LoginCard-DX5-Bxhr.js} +1 -1
  29. package/dashboard/dist/assets/{LoginModal-_ycwz7uZ.js → LoginModal-_Rt3qUyK.js} +1 -1
  30. package/dashboard/dist/assets/{LoginPage-gSnn_di7.js → LoginPage-CvYcDpeR.js} +1 -1
  31. package/dashboard/dist/assets/{PetPage-Duo8f2YU.js → PetPage-D0D4mRwd.js} +1 -1
  32. package/dashboard/dist/assets/{PopoverPopup-BDL1MCfN.js → PopoverPopup-Bz3yRvv6.js} +1 -1
  33. package/dashboard/dist/assets/{ProviderIcon-B_aNMi3s.js → ProviderIcon-PauvxgNb.js} +1 -1
  34. package/dashboard/dist/assets/{ResetPasswordPage-DPF1GjA6.js → ResetPasswordPage-BiC1Us4d.js} +1 -1
  35. package/dashboard/dist/assets/{SegmentedControl-BSSEziQX.js → SegmentedControl-bW8MsUDI.js} +1 -1
  36. package/dashboard/dist/assets/{Select-DI8Duz98.js → Select-BSpIj6-K.js} +1 -1
  37. package/dashboard/dist/assets/{SelectItemText-DxwgRTwt.js → SelectItemText-taYIkVIw.js} +1 -1
  38. package/dashboard/dist/assets/{ServiceStatusPage-8mc6tf7h.js → ServiceStatusPage-GMkqBtrt.js} +1 -1
  39. package/dashboard/dist/assets/{SessionsPage-BCIo-bEx.js → SessionsPage-QydYL4yt.js} +1 -1
  40. package/dashboard/dist/assets/{SettingsPage-BXpBCDMC.js → SettingsPage-BFvCcos0.js} +2 -2
  41. package/dashboard/dist/assets/{SkillsPage-CaXfpR8T.js → SkillsPage-CKci6NM2.js} +1 -1
  42. package/dashboard/dist/assets/{TokenGalaxy-CO7rFK4W.js → TokenGalaxy-DMof07_u.js} +1 -1
  43. package/dashboard/dist/assets/{ToolbarRootContext-Dql3cfna.js → ToolbarRootContext-CAsiI0PJ.js} +1 -1
  44. package/dashboard/dist/assets/{TrendMonitor-C09fR8ct.js → TrendMonitor-Dj2Uxs9x.js} +1 -1
  45. package/dashboard/dist/assets/{WidgetsPage-CC00HOab.js → WidgetsPage-DOr-nMn1.js} +1 -1
  46. package/dashboard/dist/assets/{WrappedPage-CepwPa8x.js → WrappedPage-BZUv1rX5.js} +1 -1
  47. package/dashboard/dist/assets/{__vite-browser-external-B-XC2p3L.js → __vite-browser-external-WKiEWJ30.js} +2 -2
  48. package/dashboard/dist/assets/{agent-logos-BDjHZ9FJ.js → agent-logos-1FaE1SqE.js} +1 -1
  49. package/dashboard/dist/assets/{arrow-up-right-C3b1UqgX.js → arrow-up-right-Bs5oicPH.js} +1 -1
  50. package/dashboard/dist/assets/{check-m09S3gbL.js → check-Be2PwUMS.js} +1 -1
  51. package/dashboard/dist/assets/{chevron-right-CpDzo_UN.js → chevron-right-DH93vlVo.js} +1 -1
  52. package/dashboard/dist/assets/{copy-Da10tbbX.js → copy-xOLhiaQa.js} +1 -1
  53. package/dashboard/dist/assets/{download-qOQt6utK.js → download-qUjPQH7V.js} +1 -1
  54. package/dashboard/dist/assets/{external-link-8c_9vEXT.js → external-link-D0nLaYYu.js} +1 -1
  55. package/dashboard/dist/assets/{flame-DwuGtbCi.js → flame-DFEEnwot.js} +1 -1
  56. package/dashboard/dist/assets/{format-tokens-5SefoHr1.js → format-tokens-BPq1moPg.js} +1 -1
  57. package/dashboard/dist/assets/{icons-JyXD7jwQ.js → icons-DxM91e9c.js} +1 -1
  58. package/dashboard/dist/assets/{index-CN7zY-iZ.js → index-BEi52jGG.js} +1 -1
  59. package/dashboard/dist/assets/{index-BAH8DvZw.js → index-C8Sb5l3M.js} +1 -1
  60. package/dashboard/dist/assets/{index-QKdHEBW3.js → index-CEl88_eC.js} +1 -1
  61. package/dashboard/dist/assets/{info-BeIuHjVl.js → info-C43iVFmY.js} +1 -1
  62. package/dashboard/dist/assets/{limits-providers-C2LxotEb.js → limits-providers-xNF55jgX.js} +1 -1
  63. package/dashboard/dist/assets/{link-2-NF0onc-H.js → link-2-CfarpF4W.js} +1 -1
  64. package/dashboard/dist/assets/{loader-circle-CP259tjS.js → loader-circle-CIKyaEoN.js} +1 -1
  65. package/dashboard/dist/assets/{maximize-2-DngHuDpS.js → maximize-2-DlTJ_PyX.js} +1 -1
  66. package/dashboard/dist/assets/{modifiers.esm-Bp3mFth-.js → modifiers.esm-CXV6l89k.js} +1 -1
  67. package/dashboard/dist/assets/{monitor-smartphone-DW17JpTX.js → monitor-smartphone-6dCO7HCP.js} +1 -1
  68. package/dashboard/dist/assets/{provider-display-DiZUmcnX.js → provider-display-DNEUispM.js} +1 -1
  69. package/dashboard/dist/assets/{react-C681nojo.js → react-us685QUG.js} +1 -1
  70. package/dashboard/dist/assets/{search-pNfEa7Lu.js → search-NcbnjXYq.js} +1 -1
  71. package/dashboard/dist/assets/{skills-api-0vmNGWLW.js → skills-api-CFSZ441M.js} +1 -1
  72. package/dashboard/dist/assets/{sortable.esm-BmpxivFO.js → sortable.esm-DiFLdkJ7.js} +1 -1
  73. package/dashboard/dist/assets/{store-B0QLXu7j.js → store-B-d1Nz34.js} +1 -1
  74. package/dashboard/dist/assets/{terminal-D7ntwa3W.js → terminal-D3L94ngT.js} +1 -1
  75. package/dashboard/dist/assets/{trash-2-BneBo2xu.js → trash-2-esrIc05L.js} +1 -1
  76. package/dashboard/dist/assets/{use-community-stats-B4FMrIyX.js → use-community-stats-C4nPlCzJ.js} +1 -1
  77. package/dashboard/dist/assets/{use-limits-display-prefs-B3o8C_zQ.js → use-limits-display-prefs-iXm2ziaO.js} +1 -1
  78. package/dashboard/dist/assets/{use-ordered-list-CA_j8ox3.js → use-ordered-list-DU8WcVsn.js} +1 -1
  79. package/dashboard/dist/assets/use-reduced-motion-DDhy4yg_.js +1 -0
  80. package/dashboard/dist/assets/{use-session-efficiency-pref-DwO-VjQ3.js → use-session-efficiency-pref-CpGicS2y.js} +1 -1
  81. package/dashboard/dist/assets/{use-transform-DQhhQUmO.js → use-transform-WxJRtugr.js} +1 -1
  82. package/dashboard/dist/assets/{use-usage-limits-BFtGha1X.js → use-usage-limits-55w4KAqE.js} +1 -1
  83. package/dashboard/dist/assets/{useCurrency-BpARhxK3.js → useCurrency-C6HKlFA6.js} +1 -1
  84. package/dashboard/dist/assets/{useScrollLock-CPs_4XCs.js → useScrollLock-CZ1Na38Y.js} +1 -1
  85. package/dashboard/dist/assets/{useTokenFormat-BT2luita.js → useTokenFormat-BR7kJQ6x.js} +1 -1
  86. package/dashboard/dist/assets/{zap-DbgbtlBE.js → zap-BcwbN9j5.js} +1 -1
  87. package/dashboard/dist/index.html +1 -1
  88. package/dashboard/dist/ip-check.html +1 -1
  89. package/dashboard/dist/leaderboard.html +1 -1
  90. package/dashboard/dist/share.html +1 -1
  91. package/package.json +1 -1
  92. package/src/lib/pricing/seed-snapshot.json +1 -1
  93. package/dashboard/dist/assets/DialogDescription-2f8ReZgl.js +0 -1
  94. package/dashboard/dist/assets/use-reduced-motion-DITgKHoW.js +0 -1
@@ -1 +1 @@
1
- import{m as on,bk as sn,r as y,bx as rn,bb as cn,aD as ln,by as an,Z as Tt,A as fn,bd as B,bz as te,bw as de,bA as Q,aN as q,bB as je,bC as Se,bD as Ne,bE as un,bF as Mt,bG as dn,bH as Ue,bI as Dt,bJ as De,bK as Xe,bL as xt,bM as Lt,a3 as gn,aF as oe,bc as qe,be as kt,bN as mn,z as hn,bO as pn}from"./__vite-browser-external-B-XC2p3L.js";import{n as He,D as xn,o as wn,v as Ae,a as yn,f as bn}from"./useScrollLock-CPs_4XCs.js";const Rn=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ko=on("chevron-down",Rn),ue=Math.min,K=Math.max,Ee=Math.round,Oe=Math.floor,G=e=>({x:e,y:e}),vn={left:"right",right:"left",bottom:"top",top:"bottom"};function Ft(e,t,n){return K(e,ue(t,n))}function ee(e,t){return typeof e=="function"?e(t):e}function X(e){return e.split("-")[0]}function ne(e){return e.split("-")[1]}function Ke(e){return e==="x"?"y":"x"}function Ge(e){return e==="y"?"height":"width"}function N(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Je(e){return Ke(N(e))}function An(e,t,n){n===void 0&&(n=!1);const o=ne(e),i=Je(e),s=Ge(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=Pe(r)),[r,Pe(r)]}function On(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 wt=["left","right"],yt=["right","left"],Cn=["top","bottom"],Sn=["bottom","top"];function En(e,t,n){switch(e){case"top":case"bottom":return n?t?yt:wt:t?wt:yt;case"left":case"right":return t?Cn:Sn;default:return[]}}function Pn(e,t,n,o){const i=ne(e);let s=En(X(e),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),t&&(s=s.concat(s.map(Ye)))),s}function Pe(e){const t=X(e);return vn[t]+e.slice(t.length)}function Tn(e){var t,n,o,i;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(i=e.left)!=null?i:0}}function $t(e){return typeof e!="number"?Tn(e):{top:e,right:e,bottom:e,left:e}}function Te(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function Fo(e,t={}){const{enabled:n=!0,event:o="click",toggle:i=!0,ignoreMouse:s=!1,stickIfOpen:r=!0,touchOpenDelay:c=0,reason:l=sn}=t,a="rootStore"in e?e.rootStore:e,u=a.context.dataRef,d=y.useRef(void 0),h=rn(),f=cn(),m=y.useMemo(()=>{function x(g,p,v,b){const R=fn(l,p,v);g&&b==="touch"&&c>0?f.start(c,()=>{a.setOpen(!0,R)}):a.setOpen(g,R)}function w(g,p,v){const b=u.current.openEvent,R=a.select("domReferenceElement")!==p;return g&&R||!g||!i?!0:b&&r?!v(b.type):!1}return{onPointerDown(g){d.current=He(g.pointerType,!0)&&xn(g.nativeEvent)?"virtual":g.pointerType},onMouseDown(g){const p=d.current,v=g.nativeEvent,b=a.select("open");if(g.button!==0||o==="click"||He(p,!0)&&s)return;const R=w(b,g.currentTarget,O=>O==="click"||O==="mousedown"),A=ln(v);if(an(A)){x(R,v,A,p);return}const S=g.currentTarget;h.request(()=>{x(R,v,S,p)})},onClick(g){if(o==="mousedown-only")return;const p=d.current;if(o==="mousedown"&&p){d.current=void 0;return}if(He(p,!0)&&s)return;const v=a.select("open"),b=w(v,g.currentTarget,R=>R==="click"||R==="mousedown"||R==="keydown"||R==="keyup");x(b,g.nativeEvent,g.currentTarget,p)},onKeyDown(){d.current=void 0}}},[u,o,s,l,a,r,i,h,f,c]);return y.useMemo(()=>n?{reference:m}:Tt,[n,m])}function bt(e,t,n){let{reference:o,floating:i}=e;const s=N(t),r=Je(t),c=Ge(r),l=X(t),a=s==="y",u=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,h=o[c]/2-i[c]/2;let f;switch(l){case"top":f={x:u,y:o.y-i.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-i.width,y:d};break;default:f={x:o.x,y:o.y}}const m=ne(t);return m&&(f[r]+=h*(m==="end"?1:-1)*(n&&a?-1:1)),f}async function Mn(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:s,rects:r,elements:c,strategy:l}=e,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=ee(t,e),m=$t(f),w=c[h?d==="floating"?"reference":"floating":d],g=Te(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:a,rootBoundary:u,strategy:l})),p=d==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),b=await(s.isElement==null?void 0:s.isElement(v))&&await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1},R=Te(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:p,offsetParent:v,strategy:l}):p);return{top:(g.top-R.top+m.top)/b.y,bottom:(R.bottom-g.bottom+m.bottom)/b.y,left:(g.left-R.left+m.left)/b.x,right:(R.right-g.right+m.right)/b.x}}const Dn=50,Ln=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=r.detectOverflow?r:{...r,detectOverflow:Mn},l=await(r.isRTL==null?void 0:r.isRTL(t));let a=await r.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=bt(a,o,l),h=o,f=0;const m={};for(let x=0;x<s.length;x++){const w=s[x];if(!w)continue;const{name:g,fn:p}=w,{x:v,y:b,data:R,reset:A}=await p({x:u,y:d,initialPlacement:o,placement:h,strategy:i,middlewareData:m,rects:a,platform:c,elements:{reference:e,floating:t}});u=v??u,d=b??d,m[g]={...m[g],...R},A&&f<Dn&&(f++,typeof A=="object"&&(A.placement&&(h=A.placement),A.rects&&(a=A.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:u,y:d}=bt(a,h,l)),x=-1)}return{x:u,y:d,placement:h,strategy:i,middlewareData:m}},kn=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:l,elements:a}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:x=!0,...w}=ee(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=X(i),p=N(c),v=X(c)===c,b=await(l.isRTL==null?void 0:l.isRTL(a.floating)),R=h||(v||!x?[Pe(c)]:On(c)),A=m!=="none";!h&&A&&R.push(...Pn(c,x,m,b));const S=[c,...R],O=await l.detectOverflow(t,w),M=[];let T=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&M.push(O[g]),d){const $=An(i,r,b);M.push(O[$[0]],O[$[1]])}if(T=[...T,{placement:i,overflows:M}],!M.every($=>$<=0)){var E,F;const $=(((E=s.flip)==null?void 0:E.index)||0)+1,I=S[$];if(I&&(!(d==="alignment"?p!==N(I):!1)||T.every(C=>N(C.placement)===p?C.overflows[0]>0:!0)))return{data:{index:$,overflows:T},reset:{placement:I}};let L=(F=T.filter(k=>k.overflows[0]<=0).sort((k,C)=>k.overflows[1]-C.overflows[1])[0])==null?void 0:F.placement;if(!L)switch(f){case"bestFit":{var W;const k=(W=T.filter(C=>{if(A){const _=N(C.placement);return _===p||_==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(_=>_>0).reduce((_,V)=>_+V,0)]).sort((C,_)=>C[1]-_[1])[0])==null?void 0:W[0];k&&(L=k);break}case"initialPlacement":L=c;break}if(i!==L)return{reset:{placement:L}}}return{}}}},Wt=new Set(["left","top"]);async function Fn(e,t){const{placement:n,platform:o,elements:i}=e,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=X(n),c=ne(n),l=N(n)==="y",a=Wt.has(r)?-1:1,u=s&&l?-1:1,d=ee(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof m=="number"&&(f=c==="end"?m*-1:m),l?{x:f*u,y:h*a}:{x:h*a,y:f*u}}const $n=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:s,placement:r,middlewareData:c}=t,l=await Fn(t,e);return r===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:r}}}}},Wn=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i,platform:s}=t,{mainAxis:r=!0,crossAxis:c=!1,limiter:l={fn:p=>{let{x:v,y:b}=p;return{x:v,y:b}}},...a}=ee(e,t),u={x:n,y:o},d=await s.detectOverflow(t,a),h=N(i),f=Ke(h);let m=u[f],x=u[h];const w=(p,v)=>Ft(v+d[p==="y"?"top":"left"],v,v-d[p==="y"?"bottom":"right"]);r&&(m=w(f,m)),c&&(x=w(h,x));const g=l.fn({...t,[f]:m,[h]:x});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[f]:r,[h]:c}}}}}},In=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,o;const{x:i,y:s,placement:r,rects:c,middlewareData:l}=t,{offset:a=0,mainAxis:u=!0,crossAxis:d=!0}=ee(e,t),h={x:i,y:s},f=N(r),m=Ke(f);let x=h[m],w=h[f];const g=ee(a,t),p=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:(n=g.mainAxis)!=null?n:0,crossAxis:(o=g.crossAxis)!=null?o:0};if(u){const R=m==="y"?"height":"width",A=c.reference[m]-c.floating[R]+p.mainAxis,S=c.reference[m]+c.reference[R]-p.mainAxis;x<A?x=A:x>S&&(x=S)}if(d){var v,b;const R=m==="y"?"width":"height",A=Wt.has(X(r)),S=c.reference[f]-c.floating[R]+(A&&((v=l.offset)==null?void 0:v[f])||0)+(A?0:p.crossAxis),O=c.reference[f]+c.reference[R]+(A?0:((b=l.offset)==null?void 0:b[f])||0)-(A?p.crossAxis:0);w<S?w=S:w>O&&(w=O)}return{[m]:x,[f]:w}}}},Vn=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:i,elements:s}=t,{apply:r=()=>{},...c}=ee(e,t),l=await i.detectOverflow(t,c),a=X(n),u=ne(n),d=N(n)==="y",{width:h,height:f}=o.floating;let m,x;a==="top"||a==="bottom"?(m=a,x=u===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(x=a,m=u==="end"?"top":"bottom");const w=f-l.top-l.bottom,g=h-l.left-l.right,p=ue(f-l[m],w),v=ue(h-l[x],g),b=t.middlewareData.shift,R=!b;let A=p,S=v;b!=null&&b.enabled.x&&(S=g),b!=null&&b.enabled.y&&(A=w),R&&!u&&(d?S=h-2*K(l.left,l.right):A=f-2*K(l.top,l.bottom)),await r({...t,availableWidth:S,availableHeight:A});const O=await i.getDimensions(s.floating);return h!==O.width||f!==O.height?{reset:{rects:!0}}:{}}}};function It(e){const t=Q(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=de(e),s=i?e.offsetWidth:n,r=i?e.offsetHeight:o,c=Ee(n)!==s||Ee(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function Ze(e){return B(e)?e:e.contextElement}function fe(e){const t=Ze(e);if(!de(t))return G(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:s}=It(t);let r=(s?Ee(n.width):n.width)/o,c=(s?Ee(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const _n=G(0);function Vt(e){const t=q(e);return!Lt()||!t.visualViewport?_n:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Hn(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===q(e)}function ie(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=Ze(e);let r=G(1);t&&(o?B(o)&&(r=fe(o)):r=fe(e));const c=Hn(s,n,o)?Vt(s):G(0);let l=(i.left+c.x)/r.x,a=(i.top+c.y)/r.y,u=i.width/r.x,d=i.height/r.y;if(s&&o){const h=q(s),f=B(o)?q(o):o;let m=h,x=xt(m);for(;x&&f!==m;){const w=fe(x),g=x.getBoundingClientRect(),p=Q(x),v=g.left+(x.clientLeft+parseFloat(p.paddingLeft))*w.x,b=g.top+(x.clientTop+parseFloat(p.paddingTop))*w.y;l*=w.x,a*=w.y,u*=w.x,d*=w.y,l+=v,a+=b,m=q(x),x=xt(m)}}return Te({width:u,height:d,x:l,y:a})}function Le(e,t){const n=De(e).scrollLeft;return t?t.left+n:ie(te(e)).left+n}function _t(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Le(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function Bn(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const s=i==="fixed",r=te(o),c=t?je(t.floating):!1;if(o===r||c&&s)return n;let l={scrollLeft:0,scrollTop:0},a=G(1);const u=G(0),d=de(o);if((d||!s)&&((Ue(o)!=="body"||Dt(r))&&(l=De(o)),d)){const f=ie(o);a=fe(o),u.x=f.x+o.clientLeft,u.y=f.y+o.clientTop}const h=r&&!d&&!s?_t(r,l):G(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+u.x+h.x,y:n.y*a.y-l.scrollTop*a.y+u.y+h.y}}function zn(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Nn(e){const t=De(e),n=e.ownerDocument.body,o=K(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=K(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-t.scrollLeft+Le(e);const r=-t.scrollTop;return Q(n).direction==="rtl"&&(s+=K(e.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:r}}const Xn=25;function Yn(e,t,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",i=q(e),s=te(e),r=i.visualViewport;let c=s.clientWidth,l=s.clientHeight,a=0,u=0;if(r){const h=!Lt()||t==="fixed";o?h||(a=-r.offsetLeft,u=-r.offsetTop):(c=r.width,l=r.height,h&&(a=r.offsetLeft,u=r.offsetTop))}if(Le(s)<=0){const h=s.ownerDocument,f=h.body,m=getComputedStyle(f),x=h.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,w=Math.abs(s.clientWidth-f.clientWidth-x),g=getComputedStyle(s).scrollbarGutter==="stable both-edges"?w/2:w;g<=Xn&&(c-=g)}return{width:c,height:l,x:a,y:u}}function jn(e,t){const n=ie(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,s=fe(e),r=e.clientWidth*s.x,c=e.clientHeight*s.y,l=i*s.x,a=o*s.y;return{width:r,height:c,x:l,y:a}}function Rt(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=Yn(e,n,t);else if(t==="document")o=Nn(te(e));else if(B(t))o=jn(t,n);else{const i=Vt(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Te(o)}function Un(e,t){const n=t.get(e);if(n)return n;let o=Xe(e,[],!1).filter(c=>B(c)&&Ue(c)!=="body"),i=null;const s=Q(e).position==="fixed";let r=s?Se(e):e;for(;B(r)&&!Ne(r);){const c=Q(r),l=Mt(r),a=i?i.position:s?"fixed":"";!l&&(a==="fixed"||a==="absolute"&&c.position==="static")?o=o.filter(d=>d!==r):i=c,r=Se(r)}return t.set(e,o),o}function qn(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const r=[...n==="clippingAncestors"?je(t)?[]:Un(t,this._c):[].concat(n),o],c=Rt(t,r[0],i);let l=c.top,a=c.right,u=c.bottom,d=c.left;for(let h=1;h<r.length;h++){const f=Rt(t,r[h],i);l=K(f.top,l),a=ue(f.right,a),u=ue(f.bottom,u),d=K(f.left,d)}return{width:a-d,height:u-l,x:d,y:l}}function Kn(e){const{width:t,height:n}=It(e);return{width:t,height:n}}function Gn(e,t,n){const o=de(t),i=te(t),s=n==="fixed",r=ie(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=G(0);if((o||!s)&&((Ue(t)!=="body"||Dt(i))&&(c=De(t)),o)){const h=ie(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}!o&&i&&(l.x=Le(i));const a=i&&!o&&!s?_t(i,c):G(0),u=r.left+c.scrollLeft-l.x-a.x,d=r.top+c.scrollTop-l.y-a.y;return{x:u,y:d,width:r.width,height:r.height}}function Be(e){return Q(e).position==="static"}function vt(e,t){if(!de(e)||Q(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return te(e)===n&&(n=n.ownerDocument.body),n}function Ht(e,t){const n=q(e);if(je(e))return n;if(!de(e)){let i=Se(e);for(;i&&!Ne(i);){if(B(i)&&!Be(i))return i;i=Se(i)}return n}let o=vt(e,t);for(;o&&un(o)&&Be(o);)o=vt(o,t);return o&&Ne(o)&&Be(o)&&!Mt(o)?n:o||dn(e)||n}const Jn=async function(e){const t=this.getOffsetParent||Ht,n=this.getDimensions,o=await n(e.floating);return{reference:Gn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Zn(e){return Q(e).direction==="rtl"}const Qn={convertOffsetParentRelativeRectToViewportRelativeRect:Bn,getDocumentElement:te,getClippingRect:qn,getOffsetParent:Ht,getElementRects:Jn,getClientRects:zn,getDimensions:Kn,getScale:fe,isElement:B,isRTL:Zn};function Bt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function eo(e,t,n){let o=null,i;const s=te(e);function r(){var u;clearTimeout(i),(u=o)==null||u.disconnect(),o=null}function c(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),r();const h=e.getBoundingClientRect(),{left:f,top:m,width:x,height:w}=h;if(u||t(),!x||!w)return;const g=Oe(m),p=Oe(s.clientWidth-(f+x)),v=Oe(s.clientHeight-(m+w)),b=Oe(f),A={rootMargin:-g+"px "+-p+"px "+-v+"px "+-b+"px",threshold:K(0,ue(1,d))||1};let S=!0;function O(M){const T=M[0].intersectionRatio;if(!Bt(h,e.getBoundingClientRect()))return c();if(T!==d){if(!S)return c();T?c(!1,T):i=setTimeout(()=>{c(!1,1e-7)},1e3)}S=!1}try{o=new IntersectionObserver(O,{...A,root:s.ownerDocument})}catch{o=new IntersectionObserver(O,A)}o.observe(e)}const l=q(e),a=()=>c(n);return l.addEventListener("resize",a),c(!0),()=>{l.removeEventListener("resize",a),r()}}function At(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Ze(e),u=i||s?[...a?Xe(a):[],...t?Xe(t):[]]:[];u.forEach(g=>{i&&g.addEventListener("scroll",n),s&&g.addEventListener("resize",n)});const d=a&&c?eo(a,n,s):null;let h=-1,f=null;r&&(f=new ResizeObserver(g=>{let[p]=g;p&&p.target===a&&f&&t&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=f)==null||v.observe(t)})),n()}),a&&!l&&f.observe(a),t&&f.observe(t));let m,x=l?ie(e):null;l&&w();function w(){const g=ie(e);x&&!Bt(x,g)&&n(),x=g,m=requestAnimationFrame(w)}return n(),()=>{var g;u.forEach(p=>{i&&p.removeEventListener("scroll",n),s&&p.removeEventListener("resize",n)}),d?.(),(g=f)==null||g.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const to=$n,no=Wn,oo=kn,io=Vn,so=In,ro=(e,t,n)=>{const o=new Map,i=n??{},s={...Qn,...i.platform,_c:o};return Ln(e,t,{...i,platform:s})};var co=typeof document<"u",lo=function(){},Ce=co?y.useLayoutEffect:lo;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 n,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Me(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){const s=i[o];if(!(s==="_owner"&&e.$$typeof)&&!Me(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function zt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ot(e,t){const n=zt(e);return Math.round(t*n)/n}function ze(e){const t=y.useRef(e);return Ce(()=>{t.current=e}),t}function ao(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:r}={},transform:c=!0,whileElementsMounted:l,open:a}=e,[u,d]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,f]=y.useState(o);Me(h,o)||f(o);const[m,x]=y.useState(null),[w,g]=y.useState(null),p=y.useCallback(C=>{C!==A.current&&(A.current=C,x(C))},[]),v=y.useCallback(C=>{C!==S.current&&(S.current=C,g(C))},[]),b=s||m,R=r||w,A=y.useRef(null),S=y.useRef(null),O=y.useRef(u),M=l!=null,T=ze(l),E=ze(i),F=ze(a),W=y.useCallback(()=>{if(!A.current||!S.current)return;const C={placement:t,strategy:n,middleware:h};E.current&&(C.platform=E.current),ro(A.current,S.current,C).then(_=>{const V={..._,isPositioned:F.current!==!1};$.current&&!Me(O.current,V)&&(O.current=V,gn.flushSync(()=>{d(V)}))})},[h,t,n,E,F]);Ce(()=>{a===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(C=>({...C,isPositioned:!1})))},[a]);const $=y.useRef(!1);Ce(()=>($.current=!0,()=>{$.current=!1}),[]),Ce(()=>{if(b&&(A.current=b),R&&(S.current=R),b&&R){if(T.current)return T.current(b,R,W);W()}},[b,R,W,T,M]);const I=y.useMemo(()=>({reference:A,floating:S,setReference:p,setFloating:v}),[p,v]),L=y.useMemo(()=>({reference:b,floating:R}),[b,R]),k=y.useMemo(()=>{const C={position:n,left:0,top:0};if(!L.floating)return C;const _=Ot(L.floating,u.x),V=Ot(L.floating,u.y);return c?{...C,transform:"translate("+_+"px, "+V+"px)",...zt(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:V}},[n,c,L.floating,u.x,u.y]);return y.useMemo(()=>({...u,update:W,refs:I,elements:L,floatingStyles:k}),[u,W,I,L,k])}const fo=(e,t)=>{const n=to(e);return{name:n.name,fn:n.fn,options:[e,t]}},uo=(e,t)=>{const n=no(e);return{name:n.name,fn:n.fn,options:[e,t]}},go=(e,t)=>({fn:so(e).fn,options:[e,t]}),mo=(e,t)=>{const n=oo(e);return{name:n.name,fn:n.fn,options:[e,t]}},ho=(e,t)=>{const n=io(e);return{name:n.name,fn:n.fn,options:[e,t]}};function po(e){return xo(e,e.rootContext)}function xo(e,t){const{nodeId:n,externalTree:o}=e,i=t.useState("referenceElement"),s=t.useState("floatingElement"),r=t.useState("domReferenceElement"),c=t.useState("open"),l=t.useState("floatingId"),[a,u]=y.useState(null),[d,h]=y.useState(void 0),[f,m]=y.useState(void 0),x=y.useRef(null),w=wn(o),g=y.useMemo(()=>({reference:i,floating:s,domReference:r}),[i,s,r]),p=ao({...e,elements:{...g,...a&&{reference:a}}}),v=B(d)?d:null,b=f===void 0?t.state.floatingElement:f;t.useSyncedValue("referenceElement",d??null),t.useSyncedValue("domReferenceElement",d===void 0?r:v),t.useSyncedValue("floatingElement",b);const R=y.useCallback(E=>{const F=B(E)?{getBoundingClientRect:()=>E.getBoundingClientRect(),getClientRects:()=>E.getClientRects(),contextElement:E}:E;u(F),p.refs.setReference(F)},[p.refs]),A=y.useCallback(E=>{(B(E)||E===null)&&(x.current=E,h(E)),(B(p.refs.reference.current)||p.refs.reference.current===null||E!==null&&!B(E))&&p.refs.setReference(E)},[p.refs,h]),S=y.useCallback(E=>{m(E),p.refs.setFloating(E)},[p.refs]),O=y.useMemo(()=>({...p.refs,setReference:A,setFloating:S,setPositionReference:R,domReference:x}),[p.refs,A,S,R]),M=y.useMemo(()=>({...p.elements,domReference:r}),[p.elements,r]),T=y.useMemo(()=>({...p,dataRef:t.context.dataRef,open:c,onOpenChange:t.setOpen,events:t.context.events,floatingId:l,refs:O,elements:M,nodeId:n,rootStore:t}),[p,O,M,n,t,c,l]);return oe(()=>{r&&(x.current=r)},[r]),oe(()=>{t.context.dataRef.current.floatingContext=T;const E=w?.nodesRef.current.find(F=>F.id===n);E&&(E.context=T)}),y.useMemo(()=>({...p,context:T,refs:O,elements:M,rootStore:t}),[p,O,M,T,t])}const wo=y.createContext(void 0);function yo(){return y.useContext(wo)?.direction??"ltr"}const bo=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:s,platform:r,elements:c,middlewareData:l}=t,{element:a,padding:u=0,offsetParent:d="real"}=ee(e,t)||{};if(a==null)return{};const h=$t(u),f={x:n,y:o},m=Je(i),x=Ge(m),w=await r.getDimensions(a),g=m==="y",p=g?"top":"left",v=g?"bottom":"right",b=g?"clientHeight":"clientWidth",R=s.reference[x]+s.reference[m]-f[m]-s.floating[x],A=f[m]-s.reference[m],S=d==="real"?await r.getOffsetParent?.(a):c.floating;let O=c.floating[b]||s.floating[x];(!O||!await r.isElement?.(S))&&(O=c.floating[b]||s.floating[x]);const M=R/2-A/2,T=O/2-w[x]/2-1,E=Math.min(h[p],T),F=Math.min(h[v],T),W=E,$=O-w[x]-F,I=O/2-w[x]/2+M,L=Ft(W,I,$),k=!l.arrow&&ne(i)!=null&&I!==L&&s.reference[x]/2-(I<W?E:F)-w[x]/2<0,C=k?I<W?I-W:I-$:0;return{[m]:f[m]+C,data:{[m]:L,centerOffset:I-L-C,...k&&{alignmentOffset:C}},reset:k}}}),Ro=(e,t)=>({...bo(e),options:[e,t]}),vo={name:"hide",async fn(e){const{width:t,height:n,x:o,y:i}=e.rects.reference,s=t===0&&n===0&&o===0&&i===0,r=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:r.top-n>=0||r.right-t>=0||r.bottom-n>=0||r.left-t>=0||s}}}},Ao={sideX:"left",sideY:"top"},Ct="--available-width",St="--available-height";function Nt(e,t,n){const o=e==="inline-start"||e==="inline-end";return{top:"top",right:o?n?"inline-start":"inline-end":"right",bottom:"bottom",left:o?n?"inline-end":"inline-start":"left"}[t]}function Et(e,t,n){const{rects:o,placement:i}=e;return{side:Nt(t,X(i),n),align:ne(i)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function $o(e){return Oo(e,po)}function Oo(e,t){const{anchor:n,positionMethod:o="absolute",side:i="bottom",sideOffset:s=0,align:r="center",alignOffset:c=0,collisionBoundary:l,collisionPadding:a=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:h=!1,inline:f,keepMounted:m=!1,floatingRootContext:x,mounted:w,collisionAvoidance:g,shift:p,nodeId:v,adaptiveOrigin:b,lazyFlip:R=!1,externalTree:A}=e,[S,O]=y.useState(null);!w&&S!==null&&O(null);const M=g.side||"flip",T=g.align||"flip",E=g.fallbackAxisSide||"end",F=p?.crossAxis??!1,W=p?.rootBoundary,$=typeof n=="function"?n:void 0,I=qe($),L=$?I:n,k=Ae(n),C=Ae(w),V=yo()==="rtl",pe=S||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":V?"left":"right","inline-start":V?"right":"left"}[i],Xt=r==="center"?pe:`${pe}-${r}`;let D=a;typeof D=="number"?D={top:D,right:D,bottom:D,left:D}:D&&(D={top:D.top||0,right:D.right||0,bottom:D.bottom||0,left:D.left||0});const J=1,Yt=i==="bottom"?J:0,jt=i==="top"?J:0,Ut=i==="right"?J:0,qt=i==="left"?J:0,xe={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:D},se=y.useRef(null),ke=Ae(s),Fe=Ae(c),Kt=typeof s!="function"?s:0,Gt=typeof c!="function"?c:0,re=[];f&&re.push(f),re.push(fo(P=>{const z=Et(P,i,V),Y=typeof ke.current=="function"?ke.current(z):ke.current,H=typeof Fe.current=="function"?Fe.current(z):Fe.current;return{mainAxis:Y,crossAxis:H,alignmentAxis:H}},[Kt,Gt,V,i]));const Qe=T==="none"&&M!=="shift",et=!Qe&&(u||F||M==="shift"),tt=M==="none"?null:mo({...xe,padding:{top:D.top+J+Yt,right:D.right+J+qt,bottom:D.bottom+J+jt,left:D.left+J+Ut},mainAxis:!F&&M==="flip",crossAxis:T==="flip"?"alignment":!1,fallbackAxisSideDirection:E}),nt=Qe?null:uo({...xe,rootBoundary:W,mainAxis:T!=="none",crossAxis:et,limiter:u||F?void 0:go(P=>{if(!se.current)return{};const{width:z,height:Y}=se.current.getBoundingClientRect(),H=N(X(P.placement)),U=H==="y"?z:Y,j=H==="y"?D.left+D.right:D.top+D.bottom;return{offset:U/2+j/2}})},[xe,u,F,W,D,T]);M==="shift"||T==="shift"||r==="center"?re.push(nt,tt):re.push(tt,nt),re.push(ho({...xe,apply({elements:{floating:P},availableWidth:z,availableHeight:Y,rects:H}){if(!C.current)return;const U=P.style;U.setProperty(Ct,`${z}px`),U.setProperty(St,`${Y}px`);const j=q(P).devicePixelRatio||1,{x:me,y:Re,width:ve,height:We}=H.reference,Ie=(Math.round((me+ve)*j)-Math.round(me*j))/j,Ve=(Math.round((Re+We)*j)-Math.round(Re*j))/j;U.setProperty("--anchor-width",`${Ie}px`),U.setProperty("--anchor-height",`${Ve}px`)}}),Ro(P=>({element:se.current||kt(P.elements.floating).createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(P){const{elements:z,middlewareData:Y,placement:H,rects:U,y:j}=P,me=X(H),Re=N(me),ve=se.current,We=Y.arrow?.x||0,Ie=Y.arrow?.y||0,Ve=ve?.clientWidth||0,Jt=ve?.clientHeight||0,_e=We+Ve/2,pt=Ie+Jt/2,Zt=Math.abs(Y.shift?.y||0),Qt=U.reference.height/2,he=typeof s=="function"?s(Et(P,i,V)):s,en=Zt>he,tn={top:`${_e}px calc(100% + ${he}px)`,bottom:`${_e}px ${-he}px`,left:`calc(100% + ${he}px) ${pt}px`,right:`${-he}px ${pt}px`}[me],nn=`${_e}px ${U.reference.y+Qt-j}px`;return z.floating.style.setProperty("--transform-origin",et&&Re==="y"&&en?nn:tn),{}}},vo,b),oe(()=>{!w&&x&&x.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[w,x]);const $e=y.useMemo(()=>({elementResize:!h&&typeof ResizeObserver<"u",layoutShift:!h&&typeof IntersectionObserver<"u"}),[h]),{refs:ce,elements:ge,x:ot,y:it,middlewareData:le,update:we,placement:st,context:rt,isPositioned:Z,floatingStyles:ct}=t({rootContext:x,open:m?w:void 0,placement:Xt,middleware:re,strategy:o,whileElementsMounted:m?void 0:(...P)=>At(...P,$e),nodeId:v,externalTree:A}),{sideX:lt,sideY:at}=le.adaptiveOrigin||Ao,ye=Z?o:"fixed",ft=y.useMemo(()=>{let P;return Z?b?P={position:ye,[lt]:ot,[at]:it}:P={...ct,position:ye}:P={position:ye,top:0,left:0},P[Ct]="100vw",P[St]="100vh",Z||(P.opacity=0),P},[b,ye,lt,ot,at,it,ct,Z]),be=y.useRef(null);oe(()=>{if(!w)return;const P=k.current,z=typeof P=="function"?P():P,H=(Pt(z)?z.current:z)||null||null;H!==be.current&&(ce.setPositionReference(H),be.current=H)},[w,ce,L,k]),y.useEffect(()=>{if(!w)return;const P=k.current;typeof P!="function"&&Pt(P)&&P.current!==be.current&&(ce.setPositionReference(P.current),be.current=P.current)},[w,ce,L,k]),y.useEffect(()=>{if(m&&w&&ge.reference&&ge.floating)return At(ge.reference,ge.floating,we,$e)},[m,w,ge,we,$e]);const ae=X(st),ut=Nt(i,ae,V),dt=ne(st)||"center",gt=!!le.hide?.referenceHidden;oe(()=>{R&&w&&Z&&ae!==pe&&O(ae)},[R,w,Z,ae,pe]);const mt=y.useMemo(()=>({position:"absolute",top:le.arrow?.y,left:le.arrow?.x}),[le.arrow]),ht=le.arrow?.centerOffset!==0;return y.useMemo(()=>({positionerStyles:ft,arrowStyles:mt,arrowRef:se,arrowUncentered:ht,side:ut,align:dt,physicalSide:ae,anchorHidden:gt,refs:ce,context:rt,isPositioned:Z,update:we}),[ft,mt,se,ht,ut,dt,ae,gt,ce,rt,Z,we])}function Pt(e){return e!=null&&"current"in e}function Co(e){return e==="starting"?mn:Tt}function Wo(e,t,{styles:n,transitionStatus:o,props:i,refs:s,hidden:r,inert:c=!1}){const l={...n};return c&&(l.pointerEvents="none"),hn("div",e,{state:t,ref:s,props:[{role:"presentation",hidden:r,style:l},Co(o),i],stateAttributesMapping:yn})}function So(e){const t=y.useRef(""),n=y.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:y.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:n}}function Eo(e,t){const n=y.useRef(e),o=qe(t);oe(()=>{n.current!==e&&o(n.current),n.current=e},[e,o])}function Po(e,t){const n=qe((s,r)=>{(typeof e=="function"?e():e)||t(r||(pn?"touch":""))}),{onClick:o,onPointerDown:i}=So(n);return y.useMemo(()=>({onClick:o,onPointerDown:i}),[o,i])}function Io(e){const[t,n]=y.useState(null),o=Po(e,n);return Eo(e,i=>{i&&!e&&n(null)}),y.useMemo(()=>({openMethod:t,triggerProps:o}),[t,o])}const To=20;function Vo(e,t,n,o){const[i,s]=y.useState(!1);oe(()=>{if(!e||!t||n==null){s(!1);return}const r=kt(n).documentElement.clientWidth,c=n.offsetWidth;s(r>0&&c>0&&c>=r-To)},[e,t,n]),bn(e&&(!t||i),o)}const Mo=y.createContext(void 0);function _o(e){return y.useContext(Mo)}export{ko as C,Fo as a,Po as b,$o as c,Vo as d,Wo as e,_o as f,Co as g,Io as h,yo as i,Qn as p,Te as r,Eo as u};
1
+ import{m as on,bk as sn,r as y,bx as rn,bb as cn,aD as ln,by as an,Z as Tt,A as fn,bd as B,bz as te,bw as de,bA as Q,aN as q,bB as je,bC as Se,bD as Ne,bE as un,bF as Mt,bG as dn,bH as Ue,bI as Dt,bJ as De,bK as Xe,bL as xt,bM as Lt,a3 as gn,aF as oe,bc as qe,be as kt,bN as mn,z as hn,bO as pn}from"./__vite-browser-external-WKiEWJ30.js";import{n as He,D as xn,o as wn,v as Ae,a as yn,f as bn}from"./useScrollLock-CZ1Na38Y.js";const Rn=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ko=on("chevron-down",Rn),ue=Math.min,K=Math.max,Ee=Math.round,Oe=Math.floor,G=e=>({x:e,y:e}),vn={left:"right",right:"left",bottom:"top",top:"bottom"};function Ft(e,t,n){return K(e,ue(t,n))}function ee(e,t){return typeof e=="function"?e(t):e}function X(e){return e.split("-")[0]}function ne(e){return e.split("-")[1]}function Ke(e){return e==="x"?"y":"x"}function Ge(e){return e==="y"?"height":"width"}function N(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Je(e){return Ke(N(e))}function An(e,t,n){n===void 0&&(n=!1);const o=ne(e),i=Je(e),s=Ge(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=Pe(r)),[r,Pe(r)]}function On(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 wt=["left","right"],yt=["right","left"],Cn=["top","bottom"],Sn=["bottom","top"];function En(e,t,n){switch(e){case"top":case"bottom":return n?t?yt:wt:t?wt:yt;case"left":case"right":return t?Cn:Sn;default:return[]}}function Pn(e,t,n,o){const i=ne(e);let s=En(X(e),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),t&&(s=s.concat(s.map(Ye)))),s}function Pe(e){const t=X(e);return vn[t]+e.slice(t.length)}function Tn(e){var t,n,o,i;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(i=e.left)!=null?i:0}}function $t(e){return typeof e!="number"?Tn(e):{top:e,right:e,bottom:e,left:e}}function Te(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function Fo(e,t={}){const{enabled:n=!0,event:o="click",toggle:i=!0,ignoreMouse:s=!1,stickIfOpen:r=!0,touchOpenDelay:c=0,reason:l=sn}=t,a="rootStore"in e?e.rootStore:e,u=a.context.dataRef,d=y.useRef(void 0),h=rn(),f=cn(),m=y.useMemo(()=>{function x(g,p,v,b){const R=fn(l,p,v);g&&b==="touch"&&c>0?f.start(c,()=>{a.setOpen(!0,R)}):a.setOpen(g,R)}function w(g,p,v){const b=u.current.openEvent,R=a.select("domReferenceElement")!==p;return g&&R||!g||!i?!0:b&&r?!v(b.type):!1}return{onPointerDown(g){d.current=He(g.pointerType,!0)&&xn(g.nativeEvent)?"virtual":g.pointerType},onMouseDown(g){const p=d.current,v=g.nativeEvent,b=a.select("open");if(g.button!==0||o==="click"||He(p,!0)&&s)return;const R=w(b,g.currentTarget,O=>O==="click"||O==="mousedown"),A=ln(v);if(an(A)){x(R,v,A,p);return}const S=g.currentTarget;h.request(()=>{x(R,v,S,p)})},onClick(g){if(o==="mousedown-only")return;const p=d.current;if(o==="mousedown"&&p){d.current=void 0;return}if(He(p,!0)&&s)return;const v=a.select("open"),b=w(v,g.currentTarget,R=>R==="click"||R==="mousedown"||R==="keydown"||R==="keyup");x(b,g.nativeEvent,g.currentTarget,p)},onKeyDown(){d.current=void 0}}},[u,o,s,l,a,r,i,h,f,c]);return y.useMemo(()=>n?{reference:m}:Tt,[n,m])}function bt(e,t,n){let{reference:o,floating:i}=e;const s=N(t),r=Je(t),c=Ge(r),l=X(t),a=s==="y",u=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,h=o[c]/2-i[c]/2;let f;switch(l){case"top":f={x:u,y:o.y-i.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-i.width,y:d};break;default:f={x:o.x,y:o.y}}const m=ne(t);return m&&(f[r]+=h*(m==="end"?1:-1)*(n&&a?-1:1)),f}async function Mn(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:s,rects:r,elements:c,strategy:l}=e,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=ee(t,e),m=$t(f),w=c[h?d==="floating"?"reference":"floating":d],g=Te(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:a,rootBoundary:u,strategy:l})),p=d==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),b=await(s.isElement==null?void 0:s.isElement(v))&&await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1},R=Te(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:p,offsetParent:v,strategy:l}):p);return{top:(g.top-R.top+m.top)/b.y,bottom:(R.bottom-g.bottom+m.bottom)/b.y,left:(g.left-R.left+m.left)/b.x,right:(R.right-g.right+m.right)/b.x}}const Dn=50,Ln=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=r.detectOverflow?r:{...r,detectOverflow:Mn},l=await(r.isRTL==null?void 0:r.isRTL(t));let a=await r.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=bt(a,o,l),h=o,f=0;const m={};for(let x=0;x<s.length;x++){const w=s[x];if(!w)continue;const{name:g,fn:p}=w,{x:v,y:b,data:R,reset:A}=await p({x:u,y:d,initialPlacement:o,placement:h,strategy:i,middlewareData:m,rects:a,platform:c,elements:{reference:e,floating:t}});u=v??u,d=b??d,m[g]={...m[g],...R},A&&f<Dn&&(f++,typeof A=="object"&&(A.placement&&(h=A.placement),A.rects&&(a=A.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:u,y:d}=bt(a,h,l)),x=-1)}return{x:u,y:d,placement:h,strategy:i,middlewareData:m}},kn=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:l,elements:a}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:x=!0,...w}=ee(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=X(i),p=N(c),v=X(c)===c,b=await(l.isRTL==null?void 0:l.isRTL(a.floating)),R=h||(v||!x?[Pe(c)]:On(c)),A=m!=="none";!h&&A&&R.push(...Pn(c,x,m,b));const S=[c,...R],O=await l.detectOverflow(t,w),M=[];let T=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&M.push(O[g]),d){const $=An(i,r,b);M.push(O[$[0]],O[$[1]])}if(T=[...T,{placement:i,overflows:M}],!M.every($=>$<=0)){var E,F;const $=(((E=s.flip)==null?void 0:E.index)||0)+1,I=S[$];if(I&&(!(d==="alignment"?p!==N(I):!1)||T.every(C=>N(C.placement)===p?C.overflows[0]>0:!0)))return{data:{index:$,overflows:T},reset:{placement:I}};let L=(F=T.filter(k=>k.overflows[0]<=0).sort((k,C)=>k.overflows[1]-C.overflows[1])[0])==null?void 0:F.placement;if(!L)switch(f){case"bestFit":{var W;const k=(W=T.filter(C=>{if(A){const _=N(C.placement);return _===p||_==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(_=>_>0).reduce((_,V)=>_+V,0)]).sort((C,_)=>C[1]-_[1])[0])==null?void 0:W[0];k&&(L=k);break}case"initialPlacement":L=c;break}if(i!==L)return{reset:{placement:L}}}return{}}}},Wt=new Set(["left","top"]);async function Fn(e,t){const{placement:n,platform:o,elements:i}=e,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=X(n),c=ne(n),l=N(n)==="y",a=Wt.has(r)?-1:1,u=s&&l?-1:1,d=ee(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof m=="number"&&(f=c==="end"?m*-1:m),l?{x:f*u,y:h*a}:{x:h*a,y:f*u}}const $n=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:s,placement:r,middlewareData:c}=t,l=await Fn(t,e);return r===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:r}}}}},Wn=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i,platform:s}=t,{mainAxis:r=!0,crossAxis:c=!1,limiter:l={fn:p=>{let{x:v,y:b}=p;return{x:v,y:b}}},...a}=ee(e,t),u={x:n,y:o},d=await s.detectOverflow(t,a),h=N(i),f=Ke(h);let m=u[f],x=u[h];const w=(p,v)=>Ft(v+d[p==="y"?"top":"left"],v,v-d[p==="y"?"bottom":"right"]);r&&(m=w(f,m)),c&&(x=w(h,x));const g=l.fn({...t,[f]:m,[h]:x});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[f]:r,[h]:c}}}}}},In=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,o;const{x:i,y:s,placement:r,rects:c,middlewareData:l}=t,{offset:a=0,mainAxis:u=!0,crossAxis:d=!0}=ee(e,t),h={x:i,y:s},f=N(r),m=Ke(f);let x=h[m],w=h[f];const g=ee(a,t),p=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:(n=g.mainAxis)!=null?n:0,crossAxis:(o=g.crossAxis)!=null?o:0};if(u){const R=m==="y"?"height":"width",A=c.reference[m]-c.floating[R]+p.mainAxis,S=c.reference[m]+c.reference[R]-p.mainAxis;x<A?x=A:x>S&&(x=S)}if(d){var v,b;const R=m==="y"?"width":"height",A=Wt.has(X(r)),S=c.reference[f]-c.floating[R]+(A&&((v=l.offset)==null?void 0:v[f])||0)+(A?0:p.crossAxis),O=c.reference[f]+c.reference[R]+(A?0:((b=l.offset)==null?void 0:b[f])||0)-(A?p.crossAxis:0);w<S?w=S:w>O&&(w=O)}return{[m]:x,[f]:w}}}},Vn=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:i,elements:s}=t,{apply:r=()=>{},...c}=ee(e,t),l=await i.detectOverflow(t,c),a=X(n),u=ne(n),d=N(n)==="y",{width:h,height:f}=o.floating;let m,x;a==="top"||a==="bottom"?(m=a,x=u===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(x=a,m=u==="end"?"top":"bottom");const w=f-l.top-l.bottom,g=h-l.left-l.right,p=ue(f-l[m],w),v=ue(h-l[x],g),b=t.middlewareData.shift,R=!b;let A=p,S=v;b!=null&&b.enabled.x&&(S=g),b!=null&&b.enabled.y&&(A=w),R&&!u&&(d?S=h-2*K(l.left,l.right):A=f-2*K(l.top,l.bottom)),await r({...t,availableWidth:S,availableHeight:A});const O=await i.getDimensions(s.floating);return h!==O.width||f!==O.height?{reset:{rects:!0}}:{}}}};function It(e){const t=Q(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=de(e),s=i?e.offsetWidth:n,r=i?e.offsetHeight:o,c=Ee(n)!==s||Ee(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function Ze(e){return B(e)?e:e.contextElement}function fe(e){const t=Ze(e);if(!de(t))return G(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:s}=It(t);let r=(s?Ee(n.width):n.width)/o,c=(s?Ee(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const _n=G(0);function Vt(e){const t=q(e);return!Lt()||!t.visualViewport?_n:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Hn(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===q(e)}function ie(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=Ze(e);let r=G(1);t&&(o?B(o)&&(r=fe(o)):r=fe(e));const c=Hn(s,n,o)?Vt(s):G(0);let l=(i.left+c.x)/r.x,a=(i.top+c.y)/r.y,u=i.width/r.x,d=i.height/r.y;if(s&&o){const h=q(s),f=B(o)?q(o):o;let m=h,x=xt(m);for(;x&&f!==m;){const w=fe(x),g=x.getBoundingClientRect(),p=Q(x),v=g.left+(x.clientLeft+parseFloat(p.paddingLeft))*w.x,b=g.top+(x.clientTop+parseFloat(p.paddingTop))*w.y;l*=w.x,a*=w.y,u*=w.x,d*=w.y,l+=v,a+=b,m=q(x),x=xt(m)}}return Te({width:u,height:d,x:l,y:a})}function Le(e,t){const n=De(e).scrollLeft;return t?t.left+n:ie(te(e)).left+n}function _t(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Le(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function Bn(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const s=i==="fixed",r=te(o),c=t?je(t.floating):!1;if(o===r||c&&s)return n;let l={scrollLeft:0,scrollTop:0},a=G(1);const u=G(0),d=de(o);if((d||!s)&&((Ue(o)!=="body"||Dt(r))&&(l=De(o)),d)){const f=ie(o);a=fe(o),u.x=f.x+o.clientLeft,u.y=f.y+o.clientTop}const h=r&&!d&&!s?_t(r,l):G(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+u.x+h.x,y:n.y*a.y-l.scrollTop*a.y+u.y+h.y}}function zn(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Nn(e){const t=De(e),n=e.ownerDocument.body,o=K(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=K(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-t.scrollLeft+Le(e);const r=-t.scrollTop;return Q(n).direction==="rtl"&&(s+=K(e.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:r}}const Xn=25;function Yn(e,t,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",i=q(e),s=te(e),r=i.visualViewport;let c=s.clientWidth,l=s.clientHeight,a=0,u=0;if(r){const h=!Lt()||t==="fixed";o?h||(a=-r.offsetLeft,u=-r.offsetTop):(c=r.width,l=r.height,h&&(a=r.offsetLeft,u=r.offsetTop))}if(Le(s)<=0){const h=s.ownerDocument,f=h.body,m=getComputedStyle(f),x=h.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,w=Math.abs(s.clientWidth-f.clientWidth-x),g=getComputedStyle(s).scrollbarGutter==="stable both-edges"?w/2:w;g<=Xn&&(c-=g)}return{width:c,height:l,x:a,y:u}}function jn(e,t){const n=ie(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,s=fe(e),r=e.clientWidth*s.x,c=e.clientHeight*s.y,l=i*s.x,a=o*s.y;return{width:r,height:c,x:l,y:a}}function Rt(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=Yn(e,n,t);else if(t==="document")o=Nn(te(e));else if(B(t))o=jn(t,n);else{const i=Vt(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Te(o)}function Un(e,t){const n=t.get(e);if(n)return n;let o=Xe(e,[],!1).filter(c=>B(c)&&Ue(c)!=="body"),i=null;const s=Q(e).position==="fixed";let r=s?Se(e):e;for(;B(r)&&!Ne(r);){const c=Q(r),l=Mt(r),a=i?i.position:s?"fixed":"";!l&&(a==="fixed"||a==="absolute"&&c.position==="static")?o=o.filter(d=>d!==r):i=c,r=Se(r)}return t.set(e,o),o}function qn(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const r=[...n==="clippingAncestors"?je(t)?[]:Un(t,this._c):[].concat(n),o],c=Rt(t,r[0],i);let l=c.top,a=c.right,u=c.bottom,d=c.left;for(let h=1;h<r.length;h++){const f=Rt(t,r[h],i);l=K(f.top,l),a=ue(f.right,a),u=ue(f.bottom,u),d=K(f.left,d)}return{width:a-d,height:u-l,x:d,y:l}}function Kn(e){const{width:t,height:n}=It(e);return{width:t,height:n}}function Gn(e,t,n){const o=de(t),i=te(t),s=n==="fixed",r=ie(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=G(0);if((o||!s)&&((Ue(t)!=="body"||Dt(i))&&(c=De(t)),o)){const h=ie(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}!o&&i&&(l.x=Le(i));const a=i&&!o&&!s?_t(i,c):G(0),u=r.left+c.scrollLeft-l.x-a.x,d=r.top+c.scrollTop-l.y-a.y;return{x:u,y:d,width:r.width,height:r.height}}function Be(e){return Q(e).position==="static"}function vt(e,t){if(!de(e)||Q(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return te(e)===n&&(n=n.ownerDocument.body),n}function Ht(e,t){const n=q(e);if(je(e))return n;if(!de(e)){let i=Se(e);for(;i&&!Ne(i);){if(B(i)&&!Be(i))return i;i=Se(i)}return n}let o=vt(e,t);for(;o&&un(o)&&Be(o);)o=vt(o,t);return o&&Ne(o)&&Be(o)&&!Mt(o)?n:o||dn(e)||n}const Jn=async function(e){const t=this.getOffsetParent||Ht,n=this.getDimensions,o=await n(e.floating);return{reference:Gn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Zn(e){return Q(e).direction==="rtl"}const Qn={convertOffsetParentRelativeRectToViewportRelativeRect:Bn,getDocumentElement:te,getClippingRect:qn,getOffsetParent:Ht,getElementRects:Jn,getClientRects:zn,getDimensions:Kn,getScale:fe,isElement:B,isRTL:Zn};function Bt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function eo(e,t,n){let o=null,i;const s=te(e);function r(){var u;clearTimeout(i),(u=o)==null||u.disconnect(),o=null}function c(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),r();const h=e.getBoundingClientRect(),{left:f,top:m,width:x,height:w}=h;if(u||t(),!x||!w)return;const g=Oe(m),p=Oe(s.clientWidth-(f+x)),v=Oe(s.clientHeight-(m+w)),b=Oe(f),A={rootMargin:-g+"px "+-p+"px "+-v+"px "+-b+"px",threshold:K(0,ue(1,d))||1};let S=!0;function O(M){const T=M[0].intersectionRatio;if(!Bt(h,e.getBoundingClientRect()))return c();if(T!==d){if(!S)return c();T?c(!1,T):i=setTimeout(()=>{c(!1,1e-7)},1e3)}S=!1}try{o=new IntersectionObserver(O,{...A,root:s.ownerDocument})}catch{o=new IntersectionObserver(O,A)}o.observe(e)}const l=q(e),a=()=>c(n);return l.addEventListener("resize",a),c(!0),()=>{l.removeEventListener("resize",a),r()}}function At(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Ze(e),u=i||s?[...a?Xe(a):[],...t?Xe(t):[]]:[];u.forEach(g=>{i&&g.addEventListener("scroll",n),s&&g.addEventListener("resize",n)});const d=a&&c?eo(a,n,s):null;let h=-1,f=null;r&&(f=new ResizeObserver(g=>{let[p]=g;p&&p.target===a&&f&&t&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=f)==null||v.observe(t)})),n()}),a&&!l&&f.observe(a),t&&f.observe(t));let m,x=l?ie(e):null;l&&w();function w(){const g=ie(e);x&&!Bt(x,g)&&n(),x=g,m=requestAnimationFrame(w)}return n(),()=>{var g;u.forEach(p=>{i&&p.removeEventListener("scroll",n),s&&p.removeEventListener("resize",n)}),d?.(),(g=f)==null||g.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const to=$n,no=Wn,oo=kn,io=Vn,so=In,ro=(e,t,n)=>{const o=new Map,i=n??{},s={...Qn,...i.platform,_c:o};return Ln(e,t,{...i,platform:s})};var co=typeof document<"u",lo=function(){},Ce=co?y.useLayoutEffect:lo;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 n,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Me(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){const s=i[o];if(!(s==="_owner"&&e.$$typeof)&&!Me(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function zt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ot(e,t){const n=zt(e);return Math.round(t*n)/n}function ze(e){const t=y.useRef(e);return Ce(()=>{t.current=e}),t}function ao(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:r}={},transform:c=!0,whileElementsMounted:l,open:a}=e,[u,d]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,f]=y.useState(o);Me(h,o)||f(o);const[m,x]=y.useState(null),[w,g]=y.useState(null),p=y.useCallback(C=>{C!==A.current&&(A.current=C,x(C))},[]),v=y.useCallback(C=>{C!==S.current&&(S.current=C,g(C))},[]),b=s||m,R=r||w,A=y.useRef(null),S=y.useRef(null),O=y.useRef(u),M=l!=null,T=ze(l),E=ze(i),F=ze(a),W=y.useCallback(()=>{if(!A.current||!S.current)return;const C={placement:t,strategy:n,middleware:h};E.current&&(C.platform=E.current),ro(A.current,S.current,C).then(_=>{const V={..._,isPositioned:F.current!==!1};$.current&&!Me(O.current,V)&&(O.current=V,gn.flushSync(()=>{d(V)}))})},[h,t,n,E,F]);Ce(()=>{a===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(C=>({...C,isPositioned:!1})))},[a]);const $=y.useRef(!1);Ce(()=>($.current=!0,()=>{$.current=!1}),[]),Ce(()=>{if(b&&(A.current=b),R&&(S.current=R),b&&R){if(T.current)return T.current(b,R,W);W()}},[b,R,W,T,M]);const I=y.useMemo(()=>({reference:A,floating:S,setReference:p,setFloating:v}),[p,v]),L=y.useMemo(()=>({reference:b,floating:R}),[b,R]),k=y.useMemo(()=>{const C={position:n,left:0,top:0};if(!L.floating)return C;const _=Ot(L.floating,u.x),V=Ot(L.floating,u.y);return c?{...C,transform:"translate("+_+"px, "+V+"px)",...zt(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:V}},[n,c,L.floating,u.x,u.y]);return y.useMemo(()=>({...u,update:W,refs:I,elements:L,floatingStyles:k}),[u,W,I,L,k])}const fo=(e,t)=>{const n=to(e);return{name:n.name,fn:n.fn,options:[e,t]}},uo=(e,t)=>{const n=no(e);return{name:n.name,fn:n.fn,options:[e,t]}},go=(e,t)=>({fn:so(e).fn,options:[e,t]}),mo=(e,t)=>{const n=oo(e);return{name:n.name,fn:n.fn,options:[e,t]}},ho=(e,t)=>{const n=io(e);return{name:n.name,fn:n.fn,options:[e,t]}};function po(e){return xo(e,e.rootContext)}function xo(e,t){const{nodeId:n,externalTree:o}=e,i=t.useState("referenceElement"),s=t.useState("floatingElement"),r=t.useState("domReferenceElement"),c=t.useState("open"),l=t.useState("floatingId"),[a,u]=y.useState(null),[d,h]=y.useState(void 0),[f,m]=y.useState(void 0),x=y.useRef(null),w=wn(o),g=y.useMemo(()=>({reference:i,floating:s,domReference:r}),[i,s,r]),p=ao({...e,elements:{...g,...a&&{reference:a}}}),v=B(d)?d:null,b=f===void 0?t.state.floatingElement:f;t.useSyncedValue("referenceElement",d??null),t.useSyncedValue("domReferenceElement",d===void 0?r:v),t.useSyncedValue("floatingElement",b);const R=y.useCallback(E=>{const F=B(E)?{getBoundingClientRect:()=>E.getBoundingClientRect(),getClientRects:()=>E.getClientRects(),contextElement:E}:E;u(F),p.refs.setReference(F)},[p.refs]),A=y.useCallback(E=>{(B(E)||E===null)&&(x.current=E,h(E)),(B(p.refs.reference.current)||p.refs.reference.current===null||E!==null&&!B(E))&&p.refs.setReference(E)},[p.refs,h]),S=y.useCallback(E=>{m(E),p.refs.setFloating(E)},[p.refs]),O=y.useMemo(()=>({...p.refs,setReference:A,setFloating:S,setPositionReference:R,domReference:x}),[p.refs,A,S,R]),M=y.useMemo(()=>({...p.elements,domReference:r}),[p.elements,r]),T=y.useMemo(()=>({...p,dataRef:t.context.dataRef,open:c,onOpenChange:t.setOpen,events:t.context.events,floatingId:l,refs:O,elements:M,nodeId:n,rootStore:t}),[p,O,M,n,t,c,l]);return oe(()=>{r&&(x.current=r)},[r]),oe(()=>{t.context.dataRef.current.floatingContext=T;const E=w?.nodesRef.current.find(F=>F.id===n);E&&(E.context=T)}),y.useMemo(()=>({...p,context:T,refs:O,elements:M,rootStore:t}),[p,O,M,T,t])}const wo=y.createContext(void 0);function yo(){return y.useContext(wo)?.direction??"ltr"}const bo=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:s,platform:r,elements:c,middlewareData:l}=t,{element:a,padding:u=0,offsetParent:d="real"}=ee(e,t)||{};if(a==null)return{};const h=$t(u),f={x:n,y:o},m=Je(i),x=Ge(m),w=await r.getDimensions(a),g=m==="y",p=g?"top":"left",v=g?"bottom":"right",b=g?"clientHeight":"clientWidth",R=s.reference[x]+s.reference[m]-f[m]-s.floating[x],A=f[m]-s.reference[m],S=d==="real"?await r.getOffsetParent?.(a):c.floating;let O=c.floating[b]||s.floating[x];(!O||!await r.isElement?.(S))&&(O=c.floating[b]||s.floating[x]);const M=R/2-A/2,T=O/2-w[x]/2-1,E=Math.min(h[p],T),F=Math.min(h[v],T),W=E,$=O-w[x]-F,I=O/2-w[x]/2+M,L=Ft(W,I,$),k=!l.arrow&&ne(i)!=null&&I!==L&&s.reference[x]/2-(I<W?E:F)-w[x]/2<0,C=k?I<W?I-W:I-$:0;return{[m]:f[m]+C,data:{[m]:L,centerOffset:I-L-C,...k&&{alignmentOffset:C}},reset:k}}}),Ro=(e,t)=>({...bo(e),options:[e,t]}),vo={name:"hide",async fn(e){const{width:t,height:n,x:o,y:i}=e.rects.reference,s=t===0&&n===0&&o===0&&i===0,r=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:r.top-n>=0||r.right-t>=0||r.bottom-n>=0||r.left-t>=0||s}}}},Ao={sideX:"left",sideY:"top"},Ct="--available-width",St="--available-height";function Nt(e,t,n){const o=e==="inline-start"||e==="inline-end";return{top:"top",right:o?n?"inline-start":"inline-end":"right",bottom:"bottom",left:o?n?"inline-end":"inline-start":"left"}[t]}function Et(e,t,n){const{rects:o,placement:i}=e;return{side:Nt(t,X(i),n),align:ne(i)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function $o(e){return Oo(e,po)}function Oo(e,t){const{anchor:n,positionMethod:o="absolute",side:i="bottom",sideOffset:s=0,align:r="center",alignOffset:c=0,collisionBoundary:l,collisionPadding:a=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:h=!1,inline:f,keepMounted:m=!1,floatingRootContext:x,mounted:w,collisionAvoidance:g,shift:p,nodeId:v,adaptiveOrigin:b,lazyFlip:R=!1,externalTree:A}=e,[S,O]=y.useState(null);!w&&S!==null&&O(null);const M=g.side||"flip",T=g.align||"flip",E=g.fallbackAxisSide||"end",F=p?.crossAxis??!1,W=p?.rootBoundary,$=typeof n=="function"?n:void 0,I=qe($),L=$?I:n,k=Ae(n),C=Ae(w),V=yo()==="rtl",pe=S||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":V?"left":"right","inline-start":V?"right":"left"}[i],Xt=r==="center"?pe:`${pe}-${r}`;let D=a;typeof D=="number"?D={top:D,right:D,bottom:D,left:D}:D&&(D={top:D.top||0,right:D.right||0,bottom:D.bottom||0,left:D.left||0});const J=1,Yt=i==="bottom"?J:0,jt=i==="top"?J:0,Ut=i==="right"?J:0,qt=i==="left"?J:0,xe={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:D},se=y.useRef(null),ke=Ae(s),Fe=Ae(c),Kt=typeof s!="function"?s:0,Gt=typeof c!="function"?c:0,re=[];f&&re.push(f),re.push(fo(P=>{const z=Et(P,i,V),Y=typeof ke.current=="function"?ke.current(z):ke.current,H=typeof Fe.current=="function"?Fe.current(z):Fe.current;return{mainAxis:Y,crossAxis:H,alignmentAxis:H}},[Kt,Gt,V,i]));const Qe=T==="none"&&M!=="shift",et=!Qe&&(u||F||M==="shift"),tt=M==="none"?null:mo({...xe,padding:{top:D.top+J+Yt,right:D.right+J+qt,bottom:D.bottom+J+jt,left:D.left+J+Ut},mainAxis:!F&&M==="flip",crossAxis:T==="flip"?"alignment":!1,fallbackAxisSideDirection:E}),nt=Qe?null:uo({...xe,rootBoundary:W,mainAxis:T!=="none",crossAxis:et,limiter:u||F?void 0:go(P=>{if(!se.current)return{};const{width:z,height:Y}=se.current.getBoundingClientRect(),H=N(X(P.placement)),U=H==="y"?z:Y,j=H==="y"?D.left+D.right:D.top+D.bottom;return{offset:U/2+j/2}})},[xe,u,F,W,D,T]);M==="shift"||T==="shift"||r==="center"?re.push(nt,tt):re.push(tt,nt),re.push(ho({...xe,apply({elements:{floating:P},availableWidth:z,availableHeight:Y,rects:H}){if(!C.current)return;const U=P.style;U.setProperty(Ct,`${z}px`),U.setProperty(St,`${Y}px`);const j=q(P).devicePixelRatio||1,{x:me,y:Re,width:ve,height:We}=H.reference,Ie=(Math.round((me+ve)*j)-Math.round(me*j))/j,Ve=(Math.round((Re+We)*j)-Math.round(Re*j))/j;U.setProperty("--anchor-width",`${Ie}px`),U.setProperty("--anchor-height",`${Ve}px`)}}),Ro(P=>({element:se.current||kt(P.elements.floating).createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(P){const{elements:z,middlewareData:Y,placement:H,rects:U,y:j}=P,me=X(H),Re=N(me),ve=se.current,We=Y.arrow?.x||0,Ie=Y.arrow?.y||0,Ve=ve?.clientWidth||0,Jt=ve?.clientHeight||0,_e=We+Ve/2,pt=Ie+Jt/2,Zt=Math.abs(Y.shift?.y||0),Qt=U.reference.height/2,he=typeof s=="function"?s(Et(P,i,V)):s,en=Zt>he,tn={top:`${_e}px calc(100% + ${he}px)`,bottom:`${_e}px ${-he}px`,left:`calc(100% + ${he}px) ${pt}px`,right:`${-he}px ${pt}px`}[me],nn=`${_e}px ${U.reference.y+Qt-j}px`;return z.floating.style.setProperty("--transform-origin",et&&Re==="y"&&en?nn:tn),{}}},vo,b),oe(()=>{!w&&x&&x.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[w,x]);const $e=y.useMemo(()=>({elementResize:!h&&typeof ResizeObserver<"u",layoutShift:!h&&typeof IntersectionObserver<"u"}),[h]),{refs:ce,elements:ge,x:ot,y:it,middlewareData:le,update:we,placement:st,context:rt,isPositioned:Z,floatingStyles:ct}=t({rootContext:x,open:m?w:void 0,placement:Xt,middleware:re,strategy:o,whileElementsMounted:m?void 0:(...P)=>At(...P,$e),nodeId:v,externalTree:A}),{sideX:lt,sideY:at}=le.adaptiveOrigin||Ao,ye=Z?o:"fixed",ft=y.useMemo(()=>{let P;return Z?b?P={position:ye,[lt]:ot,[at]:it}:P={...ct,position:ye}:P={position:ye,top:0,left:0},P[Ct]="100vw",P[St]="100vh",Z||(P.opacity=0),P},[b,ye,lt,ot,at,it,ct,Z]),be=y.useRef(null);oe(()=>{if(!w)return;const P=k.current,z=typeof P=="function"?P():P,H=(Pt(z)?z.current:z)||null||null;H!==be.current&&(ce.setPositionReference(H),be.current=H)},[w,ce,L,k]),y.useEffect(()=>{if(!w)return;const P=k.current;typeof P!="function"&&Pt(P)&&P.current!==be.current&&(ce.setPositionReference(P.current),be.current=P.current)},[w,ce,L,k]),y.useEffect(()=>{if(m&&w&&ge.reference&&ge.floating)return At(ge.reference,ge.floating,we,$e)},[m,w,ge,we,$e]);const ae=X(st),ut=Nt(i,ae,V),dt=ne(st)||"center",gt=!!le.hide?.referenceHidden;oe(()=>{R&&w&&Z&&ae!==pe&&O(ae)},[R,w,Z,ae,pe]);const mt=y.useMemo(()=>({position:"absolute",top:le.arrow?.y,left:le.arrow?.x}),[le.arrow]),ht=le.arrow?.centerOffset!==0;return y.useMemo(()=>({positionerStyles:ft,arrowStyles:mt,arrowRef:se,arrowUncentered:ht,side:ut,align:dt,physicalSide:ae,anchorHidden:gt,refs:ce,context:rt,isPositioned:Z,update:we}),[ft,mt,se,ht,ut,dt,ae,gt,ce,rt,Z,we])}function Pt(e){return e!=null&&"current"in e}function Co(e){return e==="starting"?mn:Tt}function Wo(e,t,{styles:n,transitionStatus:o,props:i,refs:s,hidden:r,inert:c=!1}){const l={...n};return c&&(l.pointerEvents="none"),hn("div",e,{state:t,ref:s,props:[{role:"presentation",hidden:r,style:l},Co(o),i],stateAttributesMapping:yn})}function So(e){const t=y.useRef(""),n=y.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:y.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:n}}function Eo(e,t){const n=y.useRef(e),o=qe(t);oe(()=>{n.current!==e&&o(n.current),n.current=e},[e,o])}function Po(e,t){const n=qe((s,r)=>{(typeof e=="function"?e():e)||t(r||(pn?"touch":""))}),{onClick:o,onPointerDown:i}=So(n);return y.useMemo(()=>({onClick:o,onPointerDown:i}),[o,i])}function Io(e){const[t,n]=y.useState(null),o=Po(e,n);return Eo(e,i=>{i&&!e&&n(null)}),y.useMemo(()=>({openMethod:t,triggerProps:o}),[t,o])}const To=20;function Vo(e,t,n,o){const[i,s]=y.useState(!1);oe(()=>{if(!e||!t||n==null){s(!1);return}const r=kt(n).documentElement.clientWidth,c=n.offsetWidth;s(r>0&&c>0&&c>=r-To)},[e,t,n]),bn(e&&(!t||i),o)}const Mo=y.createContext(void 0);function _o(e){return y.useContext(Mo)}export{ko as C,Fo as a,Po as b,$o as c,Vo as d,Wo as e,_o as f,Co as g,Io as h,yo as i,Qn as p,Te as r,Eo as u};