tokentracker-cli 0.95.0 → 0.95.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dashboard/dist/assets/{AchievementBadge-Pi3Gvbm8.js → AchievementBadge-DtB1MwFe.js} +1 -1
- package/dashboard/dist/assets/{AchievementsPage-C4WLT8Rl.js → AchievementsPage--vddu0dC.js} +2 -2
- package/dashboard/dist/assets/{AchievementsSection-ilvR2ssr.js → AchievementsSection-CDl9hsbj.js} +1 -1
- package/dashboard/dist/assets/{BadgeDetailModal-CjEeToxa.js → BadgeDetailModal-C7WsIRy9.js} +1 -1
- package/dashboard/dist/assets/{BotAnimated-DDf9pBuK.js → BotAnimated-CmXyzIhX.js} +1 -1
- package/dashboard/dist/assets/{Card-DNous84-.js → Card-SUbC3VNS.js} +1 -1
- package/dashboard/dist/assets/{ClawdAnimated-BLMIRntb.js → ClawdAnimated-BdEbs8Me.js} +2 -2
- package/dashboard/dist/assets/{CommandPalette-vVekhoFO.js → CommandPalette-D1RLLeHB.js} +1 -1
- package/dashboard/dist/assets/{CommunityStatsModal-C0Kp_J8B.js → CommunityStatsModal-5ESGJgZQ.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-DFdpcx12.js → ConfirmModal-DsCd51b2.js} +1 -1
- package/dashboard/dist/assets/{Controls-RNhqybmE.js → Controls-BVrLC_QD.js} +1 -1
- package/dashboard/dist/assets/{DashboardPage-BQjQh1IQ.js → DashboardPage-DtUOG6og.js} +1 -1
- package/dashboard/dist/assets/{DevicePage-DIhh-YAk.js → DevicePage-zYjj-m5V.js} +1 -1
- package/dashboard/dist/assets/{DialogClose-ZqxYVIzl.js → DialogClose-D66yBqkd.js} +1 -1
- package/dashboard/dist/assets/DialogDescription-BVlaoajd.js +1 -0
- package/dashboard/dist/assets/{DialogTitle-BiRcejlu.js → DialogTitle-C4ia00lc.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-BDBQpeGe.js → FadeIn-DF2c8XaR.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-CztIwtKT.js → HeaderGithubStar-Cnr3aqcX.js} +1 -1
- package/dashboard/dist/assets/{HoverTooltip-Cfso7LTC.js → HoverTooltip-DBOpxlH7.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-CNE7dLs3.js → IpCheckPage-CUY6KBaV.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-B2a3cweM.js → LandingPage-DKL8hZEq.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardAvatar-CwmZnIji.js → LeaderboardAvatar-DRYeMNlq.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardPage-DkTHj3fB.js → LeaderboardPage-DpD9Az3k.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardProfileModal-CefTO3Zh.js → LeaderboardProfileModal-Dfg0V13F.js} +3 -3
- package/dashboard/dist/assets/{LeaderboardProfilePage-CnOXlQ3L.js → LeaderboardProfilePage-DH-jcVDu.js} +1 -1
- package/dashboard/dist/assets/{LimitsPage-BIZ1-6BB.js → LimitsPage-CVCKPScf.js} +1 -1
- package/dashboard/dist/assets/{LocalOnlyNotice-CdHQiPhy.js → LocalOnlyNotice-Bj_m0hw7.js} +1 -1
- package/dashboard/dist/assets/{LoginCard-yXLA9geu.js → LoginCard-BVKvtx60.js} +1 -1
- package/dashboard/dist/assets/{LoginModal-BF2Pfkqa.js → LoginModal-mUGiSIJN.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-DuOypZap.js → LoginPage-BORCuCUt.js} +1 -1
- package/dashboard/dist/assets/{PetPage-BH3xDVV9.js → PetPage-D1JfEOVA.js} +1 -1
- package/dashboard/dist/assets/{PopoverPopup-CewF_cGz.js → PopoverPopup-DK3et-HG.js} +1 -1
- package/dashboard/dist/assets/{ProviderIcon-Dg0K0RPn.js → ProviderIcon-By8FAjxR.js} +1 -1
- package/dashboard/dist/assets/{ResetPasswordPage-CYwt85O3.js → ResetPasswordPage-DPa81jqa.js} +1 -1
- package/dashboard/dist/assets/{SegmentedControl-BJkXXomQ.js → SegmentedControl-DLzS-2eZ.js} +1 -1
- package/dashboard/dist/assets/{Select-B3_WH0Qe.js → Select-C05W6XEM.js} +1 -1
- package/dashboard/dist/assets/{SelectItemText-BUby_DUu.js → SelectItemText-CcfB3blP.js} +1 -1
- package/dashboard/dist/assets/{ServiceStatusPage-BDlVZk4i.js → ServiceStatusPage-ByqLbHv1.js} +1 -1
- package/dashboard/dist/assets/{SessionsPage-TaC9nahK.js → SessionsPage-CEDv1thj.js} +1 -1
- package/dashboard/dist/assets/{SettingsPage-CudcQh6m.js → SettingsPage-DAcndJZQ.js} +2 -2
- package/dashboard/dist/assets/{SkillsPage-iDLQ8lpZ.js → SkillsPage-BuuqQuNU.js} +1 -1
- package/dashboard/dist/assets/{TokenGalaxy-DtYzUsXU.js → TokenGalaxy-DzccxkXW.js} +1 -1
- package/dashboard/dist/assets/{ToolbarRootContext-PC8Tg1Jz.js → ToolbarRootContext-XUDMp5uy.js} +1 -1
- package/dashboard/dist/assets/{TrendMonitor-r8n8YO_9.js → TrendMonitor-B-yYabbz.js} +1 -1
- package/dashboard/dist/assets/{WidgetsPage-vzfGccWb.js → WidgetsPage-CwUDjEFo.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-DaKuIkYE.js → WrappedPage-Dr9ow3gH.js} +1 -1
- package/dashboard/dist/assets/{__vite-browser-external-Dnxl50k1.js → __vite-browser-external-DPOlUkcY.js} +2 -2
- package/dashboard/dist/assets/{agent-logos-B7nzn3n2.js → agent-logos-Cqc_suYk.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-CsxyvCER.js → arrow-up-right-DSsR3Ntr.js} +1 -1
- package/dashboard/dist/assets/{check-hYcC7MdH.js → check-Cy35lAKh.js} +1 -1
- package/dashboard/dist/assets/{composite-C79LNbex.js → composite-BDwOlhhX.js} +1 -1
- package/dashboard/dist/assets/{copy-Cz4qzE62.js → copy-4szu5cYh.js} +1 -1
- package/dashboard/dist/assets/{download-CUaSNE2E.js → download-DdGW6Krz.js} +1 -1
- package/dashboard/dist/assets/{external-link-vq7kIyKK.js → external-link-DwSt83cq.js} +1 -1
- package/dashboard/dist/assets/{flame-CB6K4eR6.js → flame-DubukWqK.js} +1 -1
- package/dashboard/dist/assets/{format-tokens-KI-e_JQ-.js → format-tokens-B70EdQcN.js} +1 -1
- package/dashboard/dist/assets/{icons-3maItkrp.js → icons-B86TLdAj.js} +1 -1
- package/dashboard/dist/assets/{index-BRXoZ7Jj.js → index-B_KMoBeK.js} +1 -1
- package/dashboard/dist/assets/{index-CUbC50Zp.js → index-DI-W-pun.js} +1 -1
- package/dashboard/dist/assets/{index-C5WrfmLB.js → index-DzEMcUwI.js} +1 -1
- package/dashboard/dist/assets/{info-r0yGihUe.js → info-BzFpLbl6.js} +1 -1
- package/dashboard/dist/assets/{limits-providers-BN_94oe9.js → limits-providers-DxZOjiXQ.js} +1 -1
- package/dashboard/dist/assets/{link-2-J9t0VXWM.js → link-2-BQp7-3T7.js} +1 -1
- package/dashboard/dist/assets/{loader-circle-DCvOsPze.js → loader-circle-lrDmbIg5.js} +1 -1
- package/dashboard/dist/assets/{maximize-2-CZ9JhGjf.js → maximize-2-Cnd_Oth8.js} +1 -1
- package/dashboard/dist/assets/{modifiers.esm-DJ0_WKg0.js → modifiers.esm-CPTpZdHU.js} +1 -1
- package/dashboard/dist/assets/{monitor-smartphone-nqbWjJx_.js → monitor-smartphone-C7UY1zRx.js} +1 -1
- package/dashboard/dist/assets/{plus-Cg7wd2jK.js → plus-Bglp9N_7.js} +1 -1
- package/dashboard/dist/assets/{provider-display-B9L1nRY9.js → provider-display-CGsFySs6.js} +1 -1
- package/dashboard/dist/assets/{react-D2AD6Pk2.js → react-DKXriBSF.js} +1 -1
- package/dashboard/dist/assets/{search-uNiWba1h.js → search-D_LLDRdU.js} +1 -1
- package/dashboard/dist/assets/{skills-api-BBYuAhiL.js → skills-api-CJWjKIco.js} +1 -1
- package/dashboard/dist/assets/{sortable.esm-CzPxc949.js → sortable.esm-zlY09tye.js} +1 -1
- package/dashboard/dist/assets/{store-D4A7EUwE.js → store-8e16Ac2h.js} +1 -1
- package/dashboard/dist/assets/{terminal-Crmm_yKF.js → terminal-CR228ekj.js} +1 -1
- package/dashboard/dist/assets/{trash-2-ia9VjRnU.js → trash-2-BjLWewOp.js} +1 -1
- package/dashboard/dist/assets/{use-community-stats-KaGCAxaF.js → use-community-stats-DhOJPaVg.js} +1 -1
- package/dashboard/dist/assets/{use-latest-request-guard-Dy8gSDkk.js → use-latest-request-guard-lcGhb-NC.js} +1 -1
- package/dashboard/dist/assets/{use-limits-display-prefs-JSTYlbTD.js → use-limits-display-prefs-DJIImtLN.js} +1 -1
- package/dashboard/dist/assets/{use-ordered-list-C4JnHdE0.js → use-ordered-list-BJZfZuoJ.js} +1 -1
- package/dashboard/dist/assets/use-reduced-motion-DdpxZQoh.js +1 -0
- package/dashboard/dist/assets/{use-session-efficiency-pref-CgyUz5Gc.js → use-session-efficiency-pref-C-l4b1cD.js} +1 -1
- package/dashboard/dist/assets/{use-transform-C7-jSJ9k.js → use-transform-UjIt477N.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-B3YYqn-v.js → use-usage-limits-DqoTZrqT.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-CK_gcb3J.js → useCurrency-CnM8aB4v.js} +1 -1
- package/dashboard/dist/assets/{useTokenFormat-C_a-UkCA.js → useTokenFormat-D4pAK2ld.js} +1 -1
- package/dashboard/dist/assets/{zap-BIJNn-Ic.js → zap-Du1IyEtj.js} +1 -1
- package/dashboard/dist/index.html +1 -1
- package/dashboard/dist/ip-check.html +1 -1
- package/dashboard/dist/leaderboard.html +1 -1
- package/dashboard/dist/share.html +1 -1
- package/package.json +1 -1
- package/src/commands/status.js +51 -8
- package/src/commands/sync.js +75 -0
- package/src/lib/pricing/curated-overrides.json +18 -0
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/rollout.js +383 -0
- package/dashboard/dist/assets/DialogDescription-DDM4aanX.js +0 -1
- package/dashboard/dist/assets/use-reduced-motion-AQE0ummK.js +0 -1
package/dashboard/dist/assets/{ToolbarRootContext-PC8Tg1Jz.js → ToolbarRootContext-XUDMp5uy.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as on,bl as sn,r as y,by as rn,bc as cn,aD as ln,bz as an,Z as Tt,A as fn,be as B,bA as te,bx as de,bB as Q,aN as q,bC as je,bD as Se,bE as Ne,bF as un,bG as Mt,bH as dn,bI as Ue,bJ as Dt,bK as De,bL as Xe,bM as xt,bN as Lt,a3 as gn,aF as oe,bd as qe,bf as kt,bO as mn,z as hn,bP as pn}from"./__vite-browser-external-Dnxl50k1.js";import{n as He,D as xn,o as wn,v as Ae,a as yn,f as bn}from"./composite-C79LNbex.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,bl as sn,r as y,by as rn,bc as cn,aD as ln,bz as an,Z as Tt,A as fn,be as B,bA as te,bx as de,bB as Q,aN as q,bC as je,bD as Se,bE as Ne,bF as un,bG as Mt,bH as dn,bI as Ue,bJ as Dt,bK as De,bL as Xe,bM as xt,bN as Lt,a3 as gn,aF as oe,bd as qe,bf as kt,bO as mn,z as hn,bP as pn}from"./__vite-browser-external-DPOlUkcY.js";import{n as He,D as xn,o as wn,v as Ae,a as yn,f as bn}from"./composite-BDwOlhhX.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};
|