tokentracker-cli 1.5.13 → 1.5.15
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-Ct0vfdYb.js → AchievementBadge-CwjI28oT.js} +1 -1
- package/dashboard/dist/assets/{AchievementsPage-dfoRxqOv.js → AchievementsPage-Dq544fjX.js} +2 -2
- package/dashboard/dist/assets/{AchievementsSection-DHFyssU0.js → AchievementsSection-DufV6nod.js} +1 -1
- package/dashboard/dist/assets/{BadgeDetailModal-ChJYZMSq.js → BadgeDetailModal-vw8xydKu.js} +1 -1
- package/dashboard/dist/assets/{BotAnimated-C_qaJy1-.js → BotAnimated-De0anwsh.js} +1 -1
- package/dashboard/dist/assets/{Card-BhK2nmOu.js → Card-CuSeWBDM.js} +1 -1
- package/dashboard/dist/assets/{CloudCheckoutPage-Ele1kkut.js → CloudCheckoutPage-CxFcOwAj.js} +1 -1
- package/dashboard/dist/assets/{CloudPage-C5DMqcoV.js → CloudPage-Beb7_JLW.js} +2 -2
- package/dashboard/dist/assets/{CommandPalette-C_hxoIwL.js → CommandPalette-PsUq2iRS.js} +1 -1
- package/dashboard/dist/assets/{CommunityStatsModal-BSTqBIEU.js → CommunityStatsModal-b54WaPbK.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-DI4QK5EV.js → ConfirmModal-_NdunIh5.js} +1 -1
- package/dashboard/dist/assets/{Controls-zK1rzS_8.js → Controls-5Is6MWln.js} +1 -1
- package/dashboard/dist/assets/{DashboardPage-BdDnmc60.js → DashboardPage-C0n0qC7h.js} +1 -1
- package/dashboard/dist/assets/{DateRangePopover-DqwgxpNF.js → DateRangePopover-C3WfGy-0.js} +1 -1
- package/dashboard/dist/assets/{DevicePage-C0fQKKuI.js → DevicePage-Vn6k-mGd.js} +1 -1
- package/dashboard/dist/assets/{DialogClose-C_cbyHpb.js → DialogClose-CXttnna-.js} +1 -1
- package/dashboard/dist/assets/DialogDescription-C3KGos_G.js +1 -0
- package/dashboard/dist/assets/{DialogTitle-BcBpd--_.js → DialogTitle-B0cNIo0E.js} +1 -1
- package/dashboard/dist/assets/{ElectricLogo-Dw9gkExE.js → ElectricLogo-DC3XSfIu.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-Ci69gBGl.js → FadeIn-H7S3TMHi.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-pb03c0kb.js → HeaderGithubStar-xgbIo5OP.js} +1 -1
- package/dashboard/dist/assets/{HoverTooltip-Cqd0D789.js → HoverTooltip-CpzM5Dju.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-qILbvOJn.js → IpCheckPage-BdV7S4dY.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-CCIwaAeu.js → LandingPage-D9f28ryO.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardPage-BwzABmKU.js → LeaderboardPage--WUFpkBI.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardProBadge-7kdzfw8r.js → LeaderboardProBadge-CEvrQ75Y.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardProfileModal-uMnN-IGe.js → LeaderboardProfileModal-Bn0HFr5h.js} +3 -3
- package/dashboard/dist/assets/{LeaderboardProfilePage-CQNc4MES.js → LeaderboardProfilePage-DJ7fQI68.js} +1 -1
- package/dashboard/dist/assets/{LimitsPage-CJ1LImRm.js → LimitsPage-7tPDheuX.js} +1 -1
- package/dashboard/dist/assets/{LocalOnlyNotice-Dm0l_F0I.js → LocalOnlyNotice-DlGbVQS8.js} +1 -1
- package/dashboard/dist/assets/{LoginCard--tUiBVtr.js → LoginCard-BZZmzUGh.js} +1 -1
- package/dashboard/dist/assets/{LoginModal-B1-5fFMY.js → LoginModal-BT5_bIxU.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-BYl6NnZ8.js → LoginPage-DMjDUPPi.js} +1 -1
- package/dashboard/dist/assets/{PetPage-DJNGJZrR.js → PetPage-Dk3j6ITn.js} +2 -2
- package/dashboard/dist/assets/{PopoverPopup-aRAdIkTs.js → PopoverPopup-pugRu3RC.js} +1 -1
- package/dashboard/dist/assets/{ProviderIcon-uiA-KBe2.js → ProviderIcon-CtmL1CmY.js} +1 -1
- package/dashboard/dist/assets/{ResetPasswordPage-BZT353_T.js → ResetPasswordPage-BB6U7t8P.js} +1 -1
- package/dashboard/dist/assets/{Select-CPC04j0g.js → Select-7w1su8lw.js} +1 -1
- package/dashboard/dist/assets/{SelectItemText-D1vJVrFO.js → SelectItemText-CaEUmWkj.js} +1 -1
- package/dashboard/dist/assets/{SelfHostPage-FL3EDqmb.js → SelfHostPage-DctWoF-A.js} +1 -1
- package/dashboard/dist/assets/{ServiceStatusPage-BohSSNai.js → ServiceStatusPage-Dg3ljEXC.js} +1 -1
- package/dashboard/dist/assets/{SessionsPage-Cf_HASvt.js → SessionsPage-B1dvW-be.js} +1 -1
- package/dashboard/dist/assets/{SettingsPage-B4ztKHnj.js → SettingsPage-DuXSX1R2.js} +3 -3
- package/dashboard/dist/assets/{SkillsPage-BFiQkY7O.js → SkillsPage-CvXQFgc9.js} +1 -1
- package/dashboard/dist/assets/{TokenGalaxy-BHVdTJAP.js → TokenGalaxy-DKC8Rk_Y.js} +1 -1
- package/dashboard/dist/assets/{TooltipPopup-BMtQyFn6.js → TooltipPopup-Dp9EpHLG.js} +1 -1
- package/dashboard/dist/assets/{TrendMonitor-DN-g3CNm.js → TrendMonitor-DWnlBn3H.js} +1 -1
- package/dashboard/dist/assets/{WidgetsPage-Bv32yu8M.js → WidgetsPage-GECNmb1Q.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-HVTOehNb.js → WrappedPage-Dq_1lOnb.js} +1 -1
- package/dashboard/dist/assets/{__vite-browser-external-DnYJww7c.js → __vite-browser-external-CkF0pdTJ.js} +2 -2
- package/dashboard/dist/assets/{agent-logos-BOwAJQqL.js → agent-logos-Dqe3Vrah.js} +1 -1
- package/dashboard/dist/assets/{arrow-left-CeXuUuES.js → arrow-left-Cr_2QnDu.js} +1 -1
- package/dashboard/dist/assets/{arrow-right-DOdBG1FZ.js → arrow-right-BsK2sJgt.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-Dponssa4.js → arrow-up-right-DkWMGqXo.js} +1 -1
- package/dashboard/dist/assets/{calendar-days-CsxE6ot0.js → calendar-days-BB9VV438.js} +1 -1
- package/dashboard/dist/assets/{check-BroNG_vu.js → check-bpSCJZWh.js} +1 -1
- package/dashboard/dist/assets/{chevron-down-C5ZpGeO1.js → chevron-down-CtECtDmx.js} +1 -1
- package/dashboard/dist/assets/{cloud-checkout-BtS-hZTc.js → cloud-checkout-C4PrzKhN.js} +1 -1
- package/dashboard/dist/assets/{composite-fgJbx88k.js → composite-BHisG82k.js} +1 -1
- package/dashboard/dist/assets/{copy-CHBuwNUs.js → copy-Dmxzd-Sw.js} +1 -1
- package/dashboard/dist/assets/{download-EKd2MHkv.js → download-CkdQzw2w.js} +1 -1
- package/dashboard/dist/assets/{external-link-GkSo9C78.js → external-link-C971FjvC.js} +1 -1
- package/dashboard/dist/assets/{flame-Cg96qJrE.js → flame-mKbp7kxw.js} +1 -1
- package/dashboard/dist/assets/{format-tokens-ChG2_n4h.js → format-tokens-C35FrJnH.js} +1 -1
- package/dashboard/dist/assets/{gift-B3QDbWPE.js → gift-BX2lSOmc.js} +1 -1
- package/dashboard/dist/assets/{icons-BEAyMjau.js → icons-ov92u52T.js} +1 -1
- package/dashboard/dist/assets/{index-B0kZThUB.js → index-9OCL-BL8.js} +1 -1
- package/dashboard/dist/assets/{index-DFcQyAnr.js → index-Bgm38oHe.js} +1 -1
- package/dashboard/dist/assets/{index-Cuc8ZXgl.js → index-Ca5xkNrK.js} +1 -1
- package/dashboard/dist/assets/{index-B9a1fK8I.js → index-DF03nIHb.js} +1 -1
- package/dashboard/dist/assets/{info-796bNttV.js → info-B-f9hWcw.js} +1 -1
- package/dashboard/dist/assets/{link-2-LYRIPLwz.js → link-2-l1wuezTo.js} +1 -1
- package/dashboard/dist/assets/{loader-circle-DpKC9Uel.js → loader-circle-Lmjrs8XX.js} +1 -1
- package/dashboard/dist/assets/{local-usage-transfer-Ctbuc6U4.js → local-usage-transfer-Ds6cF41d.js} +1 -1
- package/dashboard/dist/assets/{modifiers.esm-C5YTeNW1.js → modifiers.esm-tVlltJXO.js} +1 -1
- package/dashboard/dist/assets/{monitor-smartphone-DJUCfEvG.js → monitor-smartphone-XRiYiY8u.js} +1 -1
- package/dashboard/dist/assets/{play-LC-lnw6w.js → play-DaD9EMjk.js} +1 -1
- package/dashboard/dist/assets/{plus-CDF0S5xd.js → plus-D30fbsKQ.js} +1 -1
- package/dashboard/dist/assets/{provider-display-CkITUZgR.js → provider-display-CKdhBOwz.js} +1 -1
- package/dashboard/dist/assets/{react-BIpM-G7K.js → react-BY0y0K4x.js} +1 -1
- package/dashboard/dist/assets/{safePolygon-C3Ea423q.js → safePolygon-CSG_P7rG.js} +1 -1
- package/dashboard/dist/assets/{search-C-tN1mTM.js → search-Kiq8wVHA.js} +1 -1
- package/dashboard/dist/assets/{server-DJ4gq_fT.js → server-CjovGBGz.js} +1 -1
- package/dashboard/dist/assets/{shield-check-f75hry9N.js → shield-check-DF9MmMCq.js} +1 -1
- package/dashboard/dist/assets/{skills-api-CZ_vfnRL.js → skills-api-CEzr6p92.js} +1 -1
- package/dashboard/dist/assets/{sortable.esm-mLJSvq3M.js → sortable.esm-D7jd9mE_.js} +1 -1
- package/dashboard/dist/assets/{store-CZV1KXw2.js → store-D9_jo_do.js} +1 -1
- package/dashboard/dist/assets/{terminal-B9vOwCl9.js → terminal-CLOlvzR-.js} +1 -1
- package/dashboard/dist/assets/{trash-BN9GbynA.js → trash-DIe0fsDD.js} +1 -1
- package/dashboard/dist/assets/{use-community-stats-Bc2d8tqa.js → use-community-stats-gDkdiRBz.js} +1 -1
- package/dashboard/dist/assets/{use-latest-request-guard-_0H4Rk58.js → use-latest-request-guard-tXGuKvua.js} +1 -1
- package/dashboard/dist/assets/{use-limits-display-prefs-Dln-Rxps.js → use-limits-display-prefs-CCuLFy00.js} +1 -1
- package/dashboard/dist/assets/{use-native-settings-CpkcGzXp.js → use-native-settings-hgYqaiR7.js} +1 -1
- package/dashboard/dist/assets/{use-ordered-list-DpGA5U4S.js → use-ordered-list-D6-YzYJI.js} +1 -1
- package/dashboard/dist/assets/use-reduced-motion-DfbDxs5a.js +1 -0
- package/dashboard/dist/assets/{use-transform-JXJt1W74.js → use-transform-BEiXvAuE.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-BK_H1-b7.js → use-usage-limits-BlwtyPtT.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-ilbtKs16.js → useCurrency-CwCGJLHb.js} +1 -1
- package/dashboard/dist/assets/{usePositioner-M35LtCGR.js → usePositioner-BqHtRIrE.js} +1 -1
- package/dashboard/dist/assets/{useTokenFormat-BtTQjv7z.js → useTokenFormat-BUNBUX-x.js} +1 -1
- package/dashboard/dist/assets/{zap-5xemt9EH.js → zap-C0RFs2qQ.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/sync.js +2 -2
- package/src/lib/limits-cache.js +475 -0
- package/src/lib/pricing/curated-overrides.json +24 -0
- package/src/lib/pricing/matcher.js +4 -1
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/rollout.js +261 -102
- package/src/lib/usage-limits.js +370 -1063
- package/dashboard/dist/assets/DialogDescription--_wg9JdV.js +0 -1
- package/dashboard/dist/assets/use-reduced-motion-Cy21hg3t.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as J,aX as we,aY as De,aZ as Fe,a_ as Le,a$ as le,b0 as He,b1 as ee,b2 as ve,b3 as x,b4 as ue,b5 as Te,b6 as ae,b7 as z,N as j,b8 as Z,b9 as ge,ba as Xe,bb as Ce,bc as N,as as Ye}from"./__vite-browser-external-DnYJww7c.js";import{i as fe,a as Re,b as _e,g as de,c as ne}from"./composite-fgJbx88k.js";function Ne(e,r){return r!=null&&!fe(r)?0:typeof e=="function"?e():e}function me(e,r,o){const g=Ne(e,o);return typeof g=="number"?g:g?.[r]}function be(e){return typeof e=="function"?e():e}function Pe(e,r){return r||e==="click"||e==="mousedown"}function Be(e){return e?.includes("mouse")&&e!=="mousedown"}function qe(e){const r=J.useCallback(g=>e===void 0?we:e.subscribeStore(g),[e]),o=J.useCallback(()=>e===void 0?void 0:e.store,[e]);return De.useSyncExternalStore(r,o,()=>e?.serverStore)}class pe{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new le;restTimeout=new le;handleCloseOptions=void 0;static create(){return new pe}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const ie=new WeakMap;function ce(e){if(!e.performedPointerEventsMutation)return;const r=e.pointerEventsScopeElement;r&&ie.get(r)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),ie.delete(r)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Me(e,r){const{scopeElement:o,referenceElement:g,floatingElement:c}=r,s=ie.get(o);s&&s!==e&&ce(s),ce(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=o,e.pointerEventsReferenceElement=g,e.pointerEventsFloatingElement=c,ie.set(o,e),o.style.pointerEvents="none",g.style.pointerEvents="auto",c.style.pointerEvents="auto"}function Se(e){const r=e.context.dataRef.current,o=Fe(()=>r.hoverInteractionState??pe.create()).current;return r.hoverInteractionState||(r.hoverInteractionState=o),Le(r.hoverInteractionState.disposeEffect),r.hoverInteractionState}function xe(e,r={}){const{enabled:o=!0,closeDelay:g=0,nodeId:c}=r,s=e.useState("open"),S=e.useState("floatingElement"),L=e.useState("domReferenceElement"),{dataRef:I}=e.context,p=Re(),E=_e(),l=Se(e),B=He(),G=ee(()=>Pe(I.current.openEvent?.type,l.interactedInside)),Y=ee(()=>Be(I.current.openEvent?.type)),R=ee(()=>{ce(l)});ve(()=>{s||(l.pointerType=void 0,l.restTimeoutPending=!1,l.interactedInside=!1,R())},[s,l,R]),J.useEffect(()=>R,[R]),ve(()=>{if(o&&s&&l.handleCloseOptions?.blockPointerEvents&&Y()&&x(L)&&S){const A=L,_=S,n=ue(S),v=p?.nodesRef.current.find(u=>u.id===E)?.context?.elements.floating;v&&(v.style.pointerEvents="");const y=l.pointerEventsScopeElement!==_?l.pointerEventsScopeElement:null,T=v!==_?v:null,m=l.handleCloseOptions?.getScope?.()??y??T??Te(A,"[data-rootownerid]")??n.body;return Me(l,{scopeElement:m,referenceElement:A,floatingElement:_}),()=>{R()}}},[o,s,L,S,l,Y,p,E,R]),J.useEffect(()=>{if(!o)return;function A(){return!!(p&&E&&de(p.nodesRef.current,E).length>0)}function _(u){const k=me(g,"close",l.pointerType),w=()=>{e.setOpen(!1,j(Z,u)),p?.events.emit("floating.closed",u)};k?l.openChangeTimeout.start(k,w):(l.openChangeTimeout.clear(),w())}function n(u){const k=ge(u);if(!Xe(k)){l.interactedInside=!1;return}l.interactedInside=Te(k,"[aria-haspopup]")!=null}function v(){l.openChangeTimeout.clear(),B.clear(),p?.events.off("floating.closed",T),R()}function y(u){if(A()&&p){p.events.on("floating.closed",T);return}if(Ce(u.relatedTarget,e.context.triggerElements))return;const k=I.current.floatingContext?.nodeId??c,w=u.relatedTarget;if(!(p&&k&&x(w)&&de(p.nodesRef.current,k,!1).some($=>N($.context?.elements.floating,w)))){if(l.handler){l.handler(u);return}R(),Y()&&!G()&&_(u)}}function T(u){!p||!E||A()||B.start(0,()=>{p.events.off("floating.closed",T),e.setOpen(!1,j(Z,u)),p.events.emit("floating.closed",u)})}const m=S;return ae(m&&z(m,"mouseenter",v),m&&z(m,"mouseleave",y),m&&z(m,"pointerdown",n,!0),()=>{p?.events.off("floating.closed",T)})},[o,S,e,I,g,c,Y,G,R,l,p,E,B])}const Ae={current:null};function Ge(e,r={}){const{enabled:o=!0,delay:g=0,handleClose:c=null,mouseOnly:s=!1,restMs:S=0,move:L=!0,triggerElementRef:I=Ae,externalTree:p,isActiveTrigger:E=!0,getHandleCloseContext:l,isClosing:B,shouldOpen:G,guardStaleOpen:Y=!1}=r,{dataRef:R,events:A}=e.context,_=Re(p),n=Se(e),v=J.useRef(!1),y=ne(c),T=ne(g),m=ne(S),u=ne(o),k=ne(G),w=ne(B),K=ee(()=>Pe(R.current.openEvent?.type,n.interactedInside)),$=ee(()=>k.current?.()!==!1),te=ee((t,a,P)=>{const h=e.context.triggerElements;if(h.hasElement(a))return!t||!N(t,a);if(!x(P))return!1;const O=P;return h.hasMatchingElement(V=>N(V,O))&&(!t||!N(t,O))}),H=ee(()=>{if(!n.handler)return;ue(e.select("domReferenceElement")).removeEventListener("mousemove",n.handler),n.handler=void 0}),b=ee(()=>{ce(n)});return E&&(n.handleCloseOptions=c?.__options),J.useEffect(()=>H,[H]),J.useEffect(()=>{if(!o)return;function t(a){a.open?v.current=!1:(v.current=a.reason===Z,H(),n.openChangeTimeout.clear(),n.restTimeout.clear(),n.blockMouseMove=!0,n.restTimeoutPending=!1)}return A.on("openchange",t),()=>{A.off("openchange",t)}},[o,A,n,H]),J.useEffect(()=>{if(!o)return;function t(f,W=!0){const D=me(T.current,"close",n.pointerType);D?n.openChangeTimeout.start(D,()=>{e.setOpen(!1,j(Z,f)),_?.events.emit("floating.closed",f)}):W&&(n.openChangeTimeout.clear(),e.setOpen(!1,j(Z,f)),_?.events.emit("floating.closed",f))}const a=I.current??(E?e.select("domReferenceElement"):null);if(!x(a))return;function P(f){if(n.openChangeTimeout.clear(),n.blockMouseMove=!1,s&&!fe(n.pointerType))return;const W=be(m.current),D=me(T.current,"open",n.pointerType),C=ge(f),X=f.currentTarget??null,i=e.select("domReferenceElement");let M=X;if(x(C)&&!e.context.triggerElements.hasElement(C)){for(const he of e.context.triggerElements.elements())if(N(he,C)){M=he;break}}x(X)&&x(i)&&!e.context.triggerElements.hasElement(X)&&N(X,i)&&(M=i);const U=M==null?!1:te(i,M,C),F=e.select("open"),Q=w.current?.()??e.select("transitionStatus")==="ending",q=!F&&Q&&v.current,Ie=!U&&x(M)&&x(i)&&N(i,M)&&q,ye=W>0&&!D,ke=U&&(F||q)||Ie,Ee=!F||U;if(ke){$()&&e.setOpen(!0,j(Z,f,M));return}ye||(D?n.openChangeTimeout.start(D,()=>{Ee&&$()&&e.setOpen(!0,j(Z,f,M))}):Ee&&$()&&e.setOpen(!0,j(Z,f,M)))}function h(f){if(K()){b();return}H();const W=e.select("domReferenceElement"),D=ue(W);n.restTimeout.clear(),n.restTimeoutPending=!1;const C=R.current.floatingContext??l?.();if(Ce(f.relatedTarget,e.context.triggerElements))return;if(y.current&&C){e.select("open")||n.openChangeTimeout.clear();const i=I.current;n.handler=y.current({...C,tree:_,x:f.clientX,y:f.clientY,onClose(){b(),H(),u.current&&!K()&&i===e.select("domReferenceElement")&&t(f,!0)}}),D.addEventListener("mousemove",n.handler),n.handler(f);return}(n.pointerType!=="touch"||!N(e.select("floatingElement"),f.relatedTarget))&&t(f)}function O(f){N(a,f.relatedTarget)||(n.openChangeTimeout.clear(),n.restTimeout.clear(),n.restTimeoutPending=!1)}const V=Y?z(a,"mouseout",O):void 0;return L?ae(z(a,"mousemove",P,{once:!0}),z(a,"mouseenter",P),z(a,"mouseleave",h),V):ae(z(a,"mouseenter",P),z(a,"mouseleave",h),V)},[H,b,R,T,e,o,y,n,E,te,K,s,L,m,I,_,u,l,w,$,Y]),J.useMemo(()=>{if(!o)return;function t(a){n.pointerType=a.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(a){const{nativeEvent:P}=a,h=a.currentTarget,O=e.select("domReferenceElement"),V=e.select("open"),f=te(O,h,a.target);if(s&&!fe(n.pointerType))return;if(V&&f&&n.handleCloseOptions?.blockPointerEvents){const C=e.select("floatingElement");if(C){const X=n.handleCloseOptions?.getScope?.()??h.ownerDocument.body;Me(n,{scopeElement:X,referenceElement:h,floatingElement:C})}}const W=be(m.current);if(V&&!f||W===0||!f&&n.restTimeoutPending&&a.movementX**2+a.movementY**2<2)return;n.restTimeout.clear();function D(){if(n.restTimeoutPending=!1,K())return;const C=e.select("open");!n.blockMouseMove&&(!C||f)&&$()&&e.setOpen(!0,j(Z,P,h))}n.pointerType==="touch"?Ye.flushSync(()=>{D()}):f&&V?D():(n.restTimeoutPending=!0,n.restTimeout.start(W,D))}}},[o,n,K,te,s,e,m,$])}const Oe=.1,Ve=Oe*Oe,d=.5;function oe(e,r,o,g,c,s){return g>=r!=s>=r&&e<=(c-o)*(r-g)/(s-g)+o}function re(e,r,o,g,c,s,S,L,I,p){let E=!1;return oe(e,r,o,g,c,s)&&(E=!E),oe(e,r,c,s,S,L)&&(E=!E),oe(e,r,S,L,I,p)&&(E=!E),oe(e,r,I,p,o,g)&&(E=!E),E}function We(e,r,o){return e>=o.x&&e<=o.x+o.width&&r>=o.y&&r<=o.y+o.height}function se(e,r,o,g,c,s){const S=Math.min(o,c),L=Math.max(o,c),I=Math.min(g,s),p=Math.max(g,s);return e>=S&&e<=L&&r>=I&&r<=p}function Qe(e={}){const{blockPointerEvents:r=!1}=e,o=new le,g=({x:c,y:s,placement:S,elements:L,onClose:I,nodeId:p,tree:E})=>{const l=S?.split("-")[0];let B=!1,G=null,Y=null,R=typeof performance<"u"?performance.now():0;function A(n,v){const y=performance.now(),T=y-R;if(G===null||Y===null||T===0)return G=n,Y=v,R=y,!1;const m=n-G,u=v-Y,k=m*m+u*u,w=T*T*Ve;return G=n,Y=v,R=y,k<w}function _(){o.clear(),I()}return function(v){o.clear();const y=L.domReference,T=L.floating;if(!y||!T||l==null||c==null||s==null)return;const{clientX:m,clientY:u}=v,k=ge(v),w=v.type==="mouseleave",K=N(T,k),$=N(y,k);if(K&&(B=!0,!w))return;if($&&(B=!1,!w)){B=!0;return}if(w&&x(v.relatedTarget)&&N(T,v.relatedTarget))return;function te(){return!!(E&&de(E.nodesRef.current,p).length>0)}function H(){te()||_()}if(te())return;const b=y.getBoundingClientRect(),t=T.getBoundingClientRect(),a=c>t.right-t.width/2,P=s>t.bottom-t.height/2,h=t.width>b.width,O=t.height>b.height,V=(h?b:t).left,f=(h?b:t).right,W=(O?b:t).top,D=(O?b:t).bottom;if(l==="top"&&s>=b.bottom-1||l==="bottom"&&s<=b.top+1||l==="left"&&c>=b.right-1||l==="right"&&c<=b.left+1){H();return}let C=!1;switch(l){case"top":C=se(m,u,V,b.top+1,f,t.bottom-1);break;case"bottom":C=se(m,u,V,t.top+1,f,b.bottom-1);break;case"left":C=se(m,u,t.right-1,D,b.left+1,W);break;case"right":C=se(m,u,b.right-1,D,t.left+1,W);break}if(C)return;if(B&&!We(m,u,b)){H();return}if(!w&&A(m,u)){H();return}let X=!1;switch(l){case"top":{const i=h?d/2:d*4,M=h||a?c+i:c-i,U=h?c-i:a?c+i:c-i,F=s+d+1,Q=a||h?t.bottom-d:t.top,q=a?h?t.bottom-d:t.top:t.bottom-d;X=re(m,u,M,F,U,F,t.left,Q,t.right,q);break}case"bottom":{const i=h?d/2:d*4,M=h||a?c+i:c-i,U=h?c-i:a?c+i:c-i,F=s-d,Q=a||h?t.top+d:t.bottom,q=a?h?t.top+d:t.bottom:t.top+d;X=re(m,u,M,F,U,F,t.left,Q,t.right,q);break}case"left":{const i=O?d/2:d*4,M=O||P?s+i:s-i,U=O?s-i:P?s+i:s-i,F=c+d+1,Q=P||O?t.right-d:t.left,q=P?O?t.right-d:t.left:t.right-d;X=re(m,u,Q,t.top,q,t.bottom,F,M,F,U);break}case"right":{const i=O?d/2:d*4,M=O||P?s+i:s-i,U=O?s-i:P?s+i:s-i,F=c-d,Q=P||O?t.left+d:t.right,q=P?O?t.left+d:t.right:t.left+d;X=re(m,u,F,M,F,U,Q,t.top,q,t.bottom);break}}X?B||o.start(40,H):H()}};return g.__options={...e,blockPointerEvents:r},g}export{Ge as a,xe as b,Se as c,me as g,Qe as s,qe as u};
|
|
1
|
+
import{r as J,aX as we,aY as De,aZ as Fe,a_ as Le,a$ as le,b0 as He,b1 as ee,b2 as ve,b3 as x,b4 as ue,b5 as Te,b6 as ae,b7 as z,N as j,b8 as Z,b9 as ge,ba as Xe,bb as Ce,bc as N,as as Ye}from"./__vite-browser-external-CkF0pdTJ.js";import{i as fe,a as Re,b as _e,g as de,c as ne}from"./composite-BHisG82k.js";function Ne(e,r){return r!=null&&!fe(r)?0:typeof e=="function"?e():e}function me(e,r,o){const g=Ne(e,o);return typeof g=="number"?g:g?.[r]}function be(e){return typeof e=="function"?e():e}function Pe(e,r){return r||e==="click"||e==="mousedown"}function Be(e){return e?.includes("mouse")&&e!=="mousedown"}function qe(e){const r=J.useCallback(g=>e===void 0?we:e.subscribeStore(g),[e]),o=J.useCallback(()=>e===void 0?void 0:e.store,[e]);return De.useSyncExternalStore(r,o,()=>e?.serverStore)}class pe{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new le;restTimeout=new le;handleCloseOptions=void 0;static create(){return new pe}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const ie=new WeakMap;function ce(e){if(!e.performedPointerEventsMutation)return;const r=e.pointerEventsScopeElement;r&&ie.get(r)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),ie.delete(r)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Me(e,r){const{scopeElement:o,referenceElement:g,floatingElement:c}=r,s=ie.get(o);s&&s!==e&&ce(s),ce(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=o,e.pointerEventsReferenceElement=g,e.pointerEventsFloatingElement=c,ie.set(o,e),o.style.pointerEvents="none",g.style.pointerEvents="auto",c.style.pointerEvents="auto"}function Se(e){const r=e.context.dataRef.current,o=Fe(()=>r.hoverInteractionState??pe.create()).current;return r.hoverInteractionState||(r.hoverInteractionState=o),Le(r.hoverInteractionState.disposeEffect),r.hoverInteractionState}function xe(e,r={}){const{enabled:o=!0,closeDelay:g=0,nodeId:c}=r,s=e.useState("open"),S=e.useState("floatingElement"),L=e.useState("domReferenceElement"),{dataRef:I}=e.context,p=Re(),E=_e(),l=Se(e),B=He(),G=ee(()=>Pe(I.current.openEvent?.type,l.interactedInside)),Y=ee(()=>Be(I.current.openEvent?.type)),R=ee(()=>{ce(l)});ve(()=>{s||(l.pointerType=void 0,l.restTimeoutPending=!1,l.interactedInside=!1,R())},[s,l,R]),J.useEffect(()=>R,[R]),ve(()=>{if(o&&s&&l.handleCloseOptions?.blockPointerEvents&&Y()&&x(L)&&S){const A=L,_=S,n=ue(S),v=p?.nodesRef.current.find(u=>u.id===E)?.context?.elements.floating;v&&(v.style.pointerEvents="");const y=l.pointerEventsScopeElement!==_?l.pointerEventsScopeElement:null,T=v!==_?v:null,m=l.handleCloseOptions?.getScope?.()??y??T??Te(A,"[data-rootownerid]")??n.body;return Me(l,{scopeElement:m,referenceElement:A,floatingElement:_}),()=>{R()}}},[o,s,L,S,l,Y,p,E,R]),J.useEffect(()=>{if(!o)return;function A(){return!!(p&&E&&de(p.nodesRef.current,E).length>0)}function _(u){const k=me(g,"close",l.pointerType),w=()=>{e.setOpen(!1,j(Z,u)),p?.events.emit("floating.closed",u)};k?l.openChangeTimeout.start(k,w):(l.openChangeTimeout.clear(),w())}function n(u){const k=ge(u);if(!Xe(k)){l.interactedInside=!1;return}l.interactedInside=Te(k,"[aria-haspopup]")!=null}function v(){l.openChangeTimeout.clear(),B.clear(),p?.events.off("floating.closed",T),R()}function y(u){if(A()&&p){p.events.on("floating.closed",T);return}if(Ce(u.relatedTarget,e.context.triggerElements))return;const k=I.current.floatingContext?.nodeId??c,w=u.relatedTarget;if(!(p&&k&&x(w)&&de(p.nodesRef.current,k,!1).some($=>N($.context?.elements.floating,w)))){if(l.handler){l.handler(u);return}R(),Y()&&!G()&&_(u)}}function T(u){!p||!E||A()||B.start(0,()=>{p.events.off("floating.closed",T),e.setOpen(!1,j(Z,u)),p.events.emit("floating.closed",u)})}const m=S;return ae(m&&z(m,"mouseenter",v),m&&z(m,"mouseleave",y),m&&z(m,"pointerdown",n,!0),()=>{p?.events.off("floating.closed",T)})},[o,S,e,I,g,c,Y,G,R,l,p,E,B])}const Ae={current:null};function Ge(e,r={}){const{enabled:o=!0,delay:g=0,handleClose:c=null,mouseOnly:s=!1,restMs:S=0,move:L=!0,triggerElementRef:I=Ae,externalTree:p,isActiveTrigger:E=!0,getHandleCloseContext:l,isClosing:B,shouldOpen:G,guardStaleOpen:Y=!1}=r,{dataRef:R,events:A}=e.context,_=Re(p),n=Se(e),v=J.useRef(!1),y=ne(c),T=ne(g),m=ne(S),u=ne(o),k=ne(G),w=ne(B),K=ee(()=>Pe(R.current.openEvent?.type,n.interactedInside)),$=ee(()=>k.current?.()!==!1),te=ee((t,a,P)=>{const h=e.context.triggerElements;if(h.hasElement(a))return!t||!N(t,a);if(!x(P))return!1;const O=P;return h.hasMatchingElement(V=>N(V,O))&&(!t||!N(t,O))}),H=ee(()=>{if(!n.handler)return;ue(e.select("domReferenceElement")).removeEventListener("mousemove",n.handler),n.handler=void 0}),b=ee(()=>{ce(n)});return E&&(n.handleCloseOptions=c?.__options),J.useEffect(()=>H,[H]),J.useEffect(()=>{if(!o)return;function t(a){a.open?v.current=!1:(v.current=a.reason===Z,H(),n.openChangeTimeout.clear(),n.restTimeout.clear(),n.blockMouseMove=!0,n.restTimeoutPending=!1)}return A.on("openchange",t),()=>{A.off("openchange",t)}},[o,A,n,H]),J.useEffect(()=>{if(!o)return;function t(f,W=!0){const D=me(T.current,"close",n.pointerType);D?n.openChangeTimeout.start(D,()=>{e.setOpen(!1,j(Z,f)),_?.events.emit("floating.closed",f)}):W&&(n.openChangeTimeout.clear(),e.setOpen(!1,j(Z,f)),_?.events.emit("floating.closed",f))}const a=I.current??(E?e.select("domReferenceElement"):null);if(!x(a))return;function P(f){if(n.openChangeTimeout.clear(),n.blockMouseMove=!1,s&&!fe(n.pointerType))return;const W=be(m.current),D=me(T.current,"open",n.pointerType),C=ge(f),X=f.currentTarget??null,i=e.select("domReferenceElement");let M=X;if(x(C)&&!e.context.triggerElements.hasElement(C)){for(const he of e.context.triggerElements.elements())if(N(he,C)){M=he;break}}x(X)&&x(i)&&!e.context.triggerElements.hasElement(X)&&N(X,i)&&(M=i);const U=M==null?!1:te(i,M,C),F=e.select("open"),Q=w.current?.()??e.select("transitionStatus")==="ending",q=!F&&Q&&v.current,Ie=!U&&x(M)&&x(i)&&N(i,M)&&q,ye=W>0&&!D,ke=U&&(F||q)||Ie,Ee=!F||U;if(ke){$()&&e.setOpen(!0,j(Z,f,M));return}ye||(D?n.openChangeTimeout.start(D,()=>{Ee&&$()&&e.setOpen(!0,j(Z,f,M))}):Ee&&$()&&e.setOpen(!0,j(Z,f,M)))}function h(f){if(K()){b();return}H();const W=e.select("domReferenceElement"),D=ue(W);n.restTimeout.clear(),n.restTimeoutPending=!1;const C=R.current.floatingContext??l?.();if(Ce(f.relatedTarget,e.context.triggerElements))return;if(y.current&&C){e.select("open")||n.openChangeTimeout.clear();const i=I.current;n.handler=y.current({...C,tree:_,x:f.clientX,y:f.clientY,onClose(){b(),H(),u.current&&!K()&&i===e.select("domReferenceElement")&&t(f,!0)}}),D.addEventListener("mousemove",n.handler),n.handler(f);return}(n.pointerType!=="touch"||!N(e.select("floatingElement"),f.relatedTarget))&&t(f)}function O(f){N(a,f.relatedTarget)||(n.openChangeTimeout.clear(),n.restTimeout.clear(),n.restTimeoutPending=!1)}const V=Y?z(a,"mouseout",O):void 0;return L?ae(z(a,"mousemove",P,{once:!0}),z(a,"mouseenter",P),z(a,"mouseleave",h),V):ae(z(a,"mouseenter",P),z(a,"mouseleave",h),V)},[H,b,R,T,e,o,y,n,E,te,K,s,L,m,I,_,u,l,w,$,Y]),J.useMemo(()=>{if(!o)return;function t(a){n.pointerType=a.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(a){const{nativeEvent:P}=a,h=a.currentTarget,O=e.select("domReferenceElement"),V=e.select("open"),f=te(O,h,a.target);if(s&&!fe(n.pointerType))return;if(V&&f&&n.handleCloseOptions?.blockPointerEvents){const C=e.select("floatingElement");if(C){const X=n.handleCloseOptions?.getScope?.()??h.ownerDocument.body;Me(n,{scopeElement:X,referenceElement:h,floatingElement:C})}}const W=be(m.current);if(V&&!f||W===0||!f&&n.restTimeoutPending&&a.movementX**2+a.movementY**2<2)return;n.restTimeout.clear();function D(){if(n.restTimeoutPending=!1,K())return;const C=e.select("open");!n.blockMouseMove&&(!C||f)&&$()&&e.setOpen(!0,j(Z,P,h))}n.pointerType==="touch"?Ye.flushSync(()=>{D()}):f&&V?D():(n.restTimeoutPending=!0,n.restTimeout.start(W,D))}}},[o,n,K,te,s,e,m,$])}const Oe=.1,Ve=Oe*Oe,d=.5;function oe(e,r,o,g,c,s){return g>=r!=s>=r&&e<=(c-o)*(r-g)/(s-g)+o}function re(e,r,o,g,c,s,S,L,I,p){let E=!1;return oe(e,r,o,g,c,s)&&(E=!E),oe(e,r,c,s,S,L)&&(E=!E),oe(e,r,S,L,I,p)&&(E=!E),oe(e,r,I,p,o,g)&&(E=!E),E}function We(e,r,o){return e>=o.x&&e<=o.x+o.width&&r>=o.y&&r<=o.y+o.height}function se(e,r,o,g,c,s){const S=Math.min(o,c),L=Math.max(o,c),I=Math.min(g,s),p=Math.max(g,s);return e>=S&&e<=L&&r>=I&&r<=p}function Qe(e={}){const{blockPointerEvents:r=!1}=e,o=new le,g=({x:c,y:s,placement:S,elements:L,onClose:I,nodeId:p,tree:E})=>{const l=S?.split("-")[0];let B=!1,G=null,Y=null,R=typeof performance<"u"?performance.now():0;function A(n,v){const y=performance.now(),T=y-R;if(G===null||Y===null||T===0)return G=n,Y=v,R=y,!1;const m=n-G,u=v-Y,k=m*m+u*u,w=T*T*Ve;return G=n,Y=v,R=y,k<w}function _(){o.clear(),I()}return function(v){o.clear();const y=L.domReference,T=L.floating;if(!y||!T||l==null||c==null||s==null)return;const{clientX:m,clientY:u}=v,k=ge(v),w=v.type==="mouseleave",K=N(T,k),$=N(y,k);if(K&&(B=!0,!w))return;if($&&(B=!1,!w)){B=!0;return}if(w&&x(v.relatedTarget)&&N(T,v.relatedTarget))return;function te(){return!!(E&&de(E.nodesRef.current,p).length>0)}function H(){te()||_()}if(te())return;const b=y.getBoundingClientRect(),t=T.getBoundingClientRect(),a=c>t.right-t.width/2,P=s>t.bottom-t.height/2,h=t.width>b.width,O=t.height>b.height,V=(h?b:t).left,f=(h?b:t).right,W=(O?b:t).top,D=(O?b:t).bottom;if(l==="top"&&s>=b.bottom-1||l==="bottom"&&s<=b.top+1||l==="left"&&c>=b.right-1||l==="right"&&c<=b.left+1){H();return}let C=!1;switch(l){case"top":C=se(m,u,V,b.top+1,f,t.bottom-1);break;case"bottom":C=se(m,u,V,t.top+1,f,b.bottom-1);break;case"left":C=se(m,u,t.right-1,D,b.left+1,W);break;case"right":C=se(m,u,b.right-1,D,t.left+1,W);break}if(C)return;if(B&&!We(m,u,b)){H();return}if(!w&&A(m,u)){H();return}let X=!1;switch(l){case"top":{const i=h?d/2:d*4,M=h||a?c+i:c-i,U=h?c-i:a?c+i:c-i,F=s+d+1,Q=a||h?t.bottom-d:t.top,q=a?h?t.bottom-d:t.top:t.bottom-d;X=re(m,u,M,F,U,F,t.left,Q,t.right,q);break}case"bottom":{const i=h?d/2:d*4,M=h||a?c+i:c-i,U=h?c-i:a?c+i:c-i,F=s-d,Q=a||h?t.top+d:t.bottom,q=a?h?t.top+d:t.bottom:t.top+d;X=re(m,u,M,F,U,F,t.left,Q,t.right,q);break}case"left":{const i=O?d/2:d*4,M=O||P?s+i:s-i,U=O?s-i:P?s+i:s-i,F=c+d+1,Q=P||O?t.right-d:t.left,q=P?O?t.right-d:t.left:t.right-d;X=re(m,u,Q,t.top,q,t.bottom,F,M,F,U);break}case"right":{const i=O?d/2:d*4,M=O||P?s+i:s-i,U=O?s-i:P?s+i:s-i,F=c-d,Q=P||O?t.left+d:t.right,q=P?O?t.left+d:t.right:t.left+d;X=re(m,u,F,M,F,U,Q,t.top,q,t.bottom);break}}X?B||o.start(40,H):H()}};return g.__options={...e,blockPointerEvents:r},g}export{Ge as a,xe as b,Se as c,me as g,Qe as s,qe as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as c}from"./__vite-browser-external-
|
|
1
|
+
import{o as c}from"./__vite-browser-external-CkF0pdTJ.js";const e={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};e.node;const a=c(e);export{a as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as r}from"./__vite-browser-external-
|
|
1
|
+
import{o as r}from"./__vite-browser-external-CkF0pdTJ.js";const e={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};e.node;const i=r(e);export{i as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as a}from"./__vite-browser-external-
|
|
1
|
+
import{o as a}from"./__vite-browser-external-CkF0pdTJ.js";const e={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};e.node;const o=a(e);export{o as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ah as R,x as E,ai as I,aj as C,ak as L,al as $}from"./__vite-browser-external-
|
|
1
|
+
import{ah as R,x as E,ai as I,aj as C,ak as L,al as $}from"./__vite-browser-external-CkF0pdTJ.js";function a(e){return typeof e=="string"?e.trim():""}function g(e){return Array.isArray(e)?[...new Set(e.map(a).filter(Boolean))]:[]}function v(e){const t=a(e).replace(/\\/g,"/");if(!t||t.startsWith("/")||/^[A-Za-z]:\//.test(t))return"";const n=t.replace(/\/+$/g,"").split("/").filter(Boolean);return!n.length||n.some(r=>r==="."||r==="..")?"":n.join("/")}function N(e){const t=a(e).replace(/\\/g,"/");return!t||t.startsWith("/")||t.includes(":/")||/[A-Za-z]:\//.test(t)?"":t}function S(e){return a(e?.key)||a(e?.id)||`local:${a(e?.directory)}`}function P(e){return(Array.isArray(e)?e:[]).filter(t=>t?.scope!=="system").map(t=>{const n=v(t?.directory),r=N(S(t));if(!r||!n)return null;const i=t?.scope==="plugin"?"plugin":t?.managed?"managed":"local",o=v(t?.sourceName);return{key:r,name:a(t?.name)||n.split("/").pop()||"Skill",directory:n,targets:g(t?.targets),managed:t?.managed===!0,readOnly:t?.readOnly===!0,scope:i,...o?{sourceName:o}:{}}}).filter(t=>!!t)}function x(e){return{id:a(e?.id),name:a(e?.device_name)||a(e?.id),platform:a(e?.platform)||null,scannedAt:a(e?.scanned_at)||null}}function m(e,t){const n=Array.isArray(e.deviceSources)?e.deviceSources:[];return n.some(r=>r.id===t.id)?e:{...e,deviceSources:[...n,t]}}function H(e,t,n){const r=(Array.isArray(e)?e:[]).filter(o=>o?.scope!=="system").map(o=>({...o})),i=new Map;r.forEach((o,s)=>i.set(S(o).toLowerCase(),s));for(const o of Array.isArray(t?.devices)?t.devices:[]){const s=x(o);if(!(!s.id||s.id===n))for(const c of Array.isArray(o?.skills)?o.skills:[]){if(c?.scope==="system")continue;const u=S(c),p=a(c?.directory);if(!u||!p)continue;const h=u.toLowerCase(),k=g(c.targets),y=i.get(h);if(y!=null){const f=r[y];if(f.remote===!0&&f.inventoryOnly===!0){const A=[...new Set([...g(f.targets),...k])],_=Object.fromEntries(A.map(b=>[b,"synced"]));r[y]=m({...f,targets:A,targetStates:_},s)}else r[y]=m(f,s);continue}const w=k,j=Object.fromEntries(w.map(f=>[f,"synced"])),U=m({id:`remote:${encodeURIComponent(u)}`,key:u,name:a(c.name)||p.split(/[\\/]/).pop()||"Skill",directory:p,description:"",targets:w,targetStates:j,managed:!1,readOnly:!0,inventoryOnly:!0,remote:!0,scope:a(c.scope)||"local",sourceName:a(c.sourceName)||null},s);i.set(h,r.length),r.push(U)}}return r.sort((o,s)=>String(o.name||o.directory).localeCompare(String(s.name||s.directory))||String(o.id||o.key).localeCompare(String(s.id||s.key)))}const T="tokentracker-skills",J="tokentracker-account-skills",K=15e3;async function d(e){const t=new URL(`/functions/${T}`,window.location.origin);if(e)for(const[i,o]of Object.entries(e))o!=null&&o!==""&&t.searchParams.set(i,String(o));const n=await fetch(t.toString(),{headers:{Accept:"application/json"},cache:"no-store"}),r=await n.json().catch(()=>null);if(!n.ok)throw new Error(r?.error||`Request failed with HTTP ${n.status}`);return r}async function l(e){const t=await $(),n=await fetch(`/functions/${T}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",...t},cache:"no-store",body:JSON.stringify(e)}),r=await n.json().catch(()=>null);if(!n.ok||r?.ok===!1)throw new Error(r?.error||`Request failed with HTTP ${n.status}`);return r}function z(){return d({mode:"installed"})}function B(e={}){return d({mode:"discover",...e.force?{force:1}:{}})}function M(e,t=0,n=20){return d({mode:"search",q:e,offset:t,limit:n})}function D(){return d({mode:"repos"})}function F(e,t){return l({action:"install",skill:e,targets:t})}function G(e){return l({action:"update_all",ids:e})}function W(e){return l({action:"uninstall",id:e})}function Z(e){return l({action:"restore",id:e})}function Q(e,t){return l({action:"set_targets",id:e,targets:t})}function V(e,t){return l({action:"import_local",directory:e,targets:t})}function X(e,t){return l({action:"delete_local",directory:e,targets:t||[]})}function Y(e){return l({action:"add_repo",repo:e})}function ee(e,t){return l({action:"remove_repo",owner:e,name:t})}function te(e={}){return d({mode:"popular",...e.force?{force:1}:{}})}function ne(e={}){return d({mode:"updates",...e.force?{force:1}:{}})}function re(e={}){return d({mode:"skill_usage",...e.force?{force:1}:{}})}async function O({accessToken:e,method:t="GET",body:n}){if(!e||!R(e))throw new Error("Skills sync requires sign-in");const r=E();if(!r)throw new Error("InsForge base URL not configured");const i={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`},o=I();o&&(i.apikey=o);const s=new AbortController,c=setTimeout(()=>s.abort(),K);try{const u=await C(L(r,J),{method:t,headers:i,cache:"no-store",signal:s.signal,...n==null?{}:{body:JSON.stringify(n)}}),p=await u.json().catch(()=>null);if(!u.ok)throw new Error(p?.error||`Request failed with HTTP ${u.status}`);return p}finally{clearTimeout(c)}}function oe(e){return O({accessToken:e})}function ae({accessToken:e,deviceId:t,skills:n}){return O({accessToken:e,method:"POST",body:{device_id:t,skills:P(n)}})}export{oe as a,D as b,te as c,B as d,ne as e,re as f,z as g,X as h,F as i,Q as j,V as k,G as l,H as m,ee as n,Y as o,ae as p,Z as r,M as s,W as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as c,V as P,as as Oe}from"./__vite-browser-external-
|
|
1
|
+
import{r as c,V as P,as as Oe}from"./__vite-browser-external-CkF0pdTJ.js";function Sn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const tt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function me(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function bt(e){return"nodeType"in e}function B(e){var t,n;return e?me(e)?e:bt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function wt(e){const{Document:t}=B(e);return e instanceof t}function Be(e){return me(e)?!1:e instanceof B(e).HTMLElement}function Wt(e){return e instanceof B(e).SVGElement}function ye(e){return e?me(e)?e.document:bt(e)?wt(e)?e:Be(e)||Wt(e)?e.ownerDocument:document:document:document}const Q=tt?c.useLayoutEffect:c.useEffect;function mt(e){const t=c.useRef(e);return Q(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function En(){const e=c.useRef(null),t=c.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ke(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return Q(()=>{n.current!==e&&(n.current=e)},t),n}function Fe(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Je(e){const t=mt(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function ft(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let ct={};function $e(e,t){return c.useMemo(()=>{if(t)return t;const n=ct[e]==null?0:ct[e]+1;return ct[e]=n,e+"-"+n},[e,t])}function Ht(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,s)=>{const a=Object.entries(s);for(const[l,u]of a){const f=i[l];f!=null&&(i[l]=f+e*u)}return i},{...t})}}const we=Ht(1),ze=Ht(-1);function In(e){return"clientX"in e&&"clientY"in e}function yt(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function Mn(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function ht(e){if(Mn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return In(e)?{x:e.clientX,y:e.clientY}:null}const _e=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[_e.Translate.toString(e),_e.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Tt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function An(e){return e.matches(Tt)?e:e.querySelector(Tt)}const On={display:"none"};function Tn(e){let{id:t,value:n}=e;return P.createElement("div",{id:t,style:On},n)}function Nn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return P.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Ln(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Kt=c.createContext(null);function kn(e){const t=c.useContext(Kt);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function zn(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const Pn={draggable:`
|
|
2
2
|
To pick up a draggable item, press the space bar.
|
|
3
3
|
While dragging, use the arrow keys to move the item.
|
|
4
4
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{K as t}from"./__vite-browser-external-
|
|
1
|
+
import{K as t}from"./__vite-browser-external-CkF0pdTJ.js";import{F as g}from"./composite-BHisG82k.js";function a(e,n,u=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new g({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:n,syncOnly:!0,nested:u,onOpenChange:void 0}),floatingId:n,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:t,inactiveTriggerProps:t,popupProps:t}}const o=e=>e.triggerIdProp??e.activeTriggerId,r=e=>e.openProp??e.open,i=e=>(e.popupElement?.id??e.floatingId)||void 0;function p(e,n){return n!==void 0&&r(e)&&o(e)===n}function l(e,n){return p(e,n)?!0:n!==void 0&&r(e)&&o(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}const f={open:r,mounted:e=>e.mounted,transitionStatus:e=>r(e)&&!e.mounted?"starting":e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:o,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:i,isTriggerActive:(e,n)=>n!==void 0&&o(e)===n,isOpenedByTrigger:(e,n)=>p(e,n),isMountedByTrigger:(e,n)=>n!==void 0&&o(e)===n&&e.mounted,triggerProps:(e,n)=>n?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,n)=>l(e,n)?i(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};export{a as c,f as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as a}from"./__vite-browser-external-
|
|
1
|
+
import{o as a}from"./__vite-browser-external-CkF0pdTJ.js";const e={name:"maximize-2",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]};e.node;const o=a(e);const t={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};t.node;const i=a(t);export{o as M,i as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./__vite-browser-external-
|
|
1
|
+
import{o as e}from"./__vite-browser-external-CkF0pdTJ.js";const a={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};a.node;const o=e(a);export{o as T};
|
package/dashboard/dist/assets/{use-community-stats-Bc2d8tqa.js → use-community-stats-gDkdiRBz.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as m,g as k,b as M}from"./__vite-browser-external-
|
|
1
|
+
import{r as m,g as k,b as M}from"./__vite-browser-external-CkF0pdTJ.js";const E=6e3,T=2500,N=100;function _(t,r){let o;const n=new Promise((i,l)=>{o=setTimeout(()=>l(new Error("landing stats timeout")),r)});return Promise.race([t,n]).finally(()=>{o!=null&&clearTimeout(o)})}const f=5*6e4,D=1440*6e4,A="tokentracker:community-stats:v2",S=["topModels","providers","dailyGrowth","tokenMix","userDistribution","platforms"],G=["top_models","providers","daily_growth","token_mix","user_distribution","platforms"];let s=null;function I(t){const r=Number(t?.tokenFloor)||0,o=Number(t?.totalEntries)||0,n=S.every(i=>Array.isArray(t?.[i]));return!(r>0)||!(o>0)||!n||typeof t?.generatedAt!="string"||!t.generatedAt?null:{tokenFloor:r,totalEntries:o,top:Array.isArray(t?.top)?t.top:[],topModels:Array.isArray(t?.topModels)?t.topModels:[],providers:Array.isArray(t?.providers)?t.providers:[],dailyGrowth:Array.isArray(t?.dailyGrowth)?t.dailyGrowth:[],tokenMix:Array.isArray(t?.tokenMix)?t.tokenMix:[],userDistribution:Array.isArray(t?.userDistribution)?t.userDistribution:[],platforms:Array.isArray(t?.platforms)?t.platforms:[],activeDevelopersTotal:Number(t?.activeDevelopersTotal)||0,activeDevelopers30d:Number(t?.activeDevelopers30d)||0,tokens30d:Number(t?.tokens30d)||0,tokenGrowthPct:t?.tokenGrowthPct!=null&&Number.isFinite(Number(t.tokenGrowthPct))?Number(t.tokenGrowthPct):null,developerGrowthPct:t?.developerGrowthPct!=null&&Number.isFinite(Number(t.developerGrowthPct))?Number(t.developerGrowthPct):null,generatedAt:typeof t?.generatedAt=="string"?t.generatedAt:null}}function C(){if(typeof window>"u"||!window.localStorage)return null;try{const t=JSON.parse(window.localStorage.getItem(A)||"null"),r=Number(t?.cachedAt)||0,o=I(t?.data),n=Date.now()-r;return!o||n<0||n>D?null:{data:o,isFresh:n<f}}catch{return null}}function P(t){if(!(typeof window>"u"||!window.localStorage))try{window.localStorage.setItem(A,JSON.stringify({cachedAt:Date.now(),data:t}))}catch{}}function F(){if(s&&Date.now()-s.at<f)return s.promise;const t=Promise.all([_(k({period:"total",limit:N,offset:0}),E),_(M(),T).catch(()=>null)]);return s={at:Date.now(),promise:t},t.catch(()=>{s?.promise===t&&(s=null)}),t}function O({enabled:t=!0}={}){const[r]=m.useState(()=>C()),[o,n]=m.useState(()=>r?{status:"ready",...r.data}:{status:"loading",tokenFloor:null,totalEntries:null,top:[]});return m.useEffect(()=>{if(!t||r?.isFresh)return;let i=!1,l=null,u=null;const y=async()=>{try{const[d,e]=await F();if(i)return;const c=Array.isArray(d?.entries)?d.entries:[],p=Number(e?.total_tokens)||0,h=p>0&&G.every(a=>Array.isArray(e?.[a]));if(!c.length||!h){s=null,n(a=>a.status==="ready"?{...a,totalEntries:Number(d?.total_entries)||a.totalEntries,top:c.slice(0,3)}:{...a,status:"error"});return}const g=p,b=Array.isArray(e?.top_models)?e.top_models:r?.data?.topModels||[],w={tokenFloor:g,totalEntries:Number(d?.total_entries)||c.length,top:c.slice(0,3),topModels:b,providers:Array.isArray(e?.providers)?e.providers:[],dailyGrowth:Array.isArray(e?.daily_growth)?e.daily_growth:[],tokenMix:Array.isArray(e?.token_mix)?e.token_mix:[],userDistribution:Array.isArray(e?.user_distribution)?e.user_distribution:[],platforms:Array.isArray(e?.platforms)?e.platforms:[],activeDevelopersTotal:Number(e?.active_developers_total)||0,activeDevelopers30d:Number(e?.active_developers_30d)||0,tokens30d:Number(e?.tokens_30d)||0,tokenGrowthPct:e?.token_growth_pct==null?null:Number(e.token_growth_pct),developerGrowthPct:e?.developer_growth_pct==null?null:Number(e.developer_growth_pct),generatedAt:typeof e?.generated_at=="string"?e.generated_at:null};n({status:"ready",...w}),P(w)}catch{i||n(e=>e.status==="ready"?e:{...e,status:"error"})}};return typeof window<"u"&&"requestIdleCallback"in window?l=window.requestIdleCallback(y,{timeout:1500}):u=setTimeout(y,400),()=>{i=!0,l!=null&&typeof window.cancelIdleCallback=="function"&&window.cancelIdleCallback(l),u!=null&&clearTimeout(u)}},[t,r]),o}export{O as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u}from"./__vite-browser-external-
|
|
1
|
+
import{r as u}from"./__vite-browser-external-CkF0pdTJ.js";function f(r,e){return r.length===e.length&&r.every((t,n)=>Object.is(t,e[n]))}function a(r){const e=u.useRef(r),t=u.useRef(0),n=u.useRef(!0);return u.useLayoutEffect(()=>{f(e.current,r)||(e.current=r,t.current+=1)}),u.useEffect(()=>(n.current=!0,()=>{n.current=!1,t.current+=1}),[]),u.useCallback(()=>{const c=++t.current,s=e.current;return()=>n.current&&t.current===c&&e.current===s},[])}export{a as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as s,r as c,t as V,H as F,F as H,G as W}from"./__vite-browser-external-
|
|
1
|
+
import{c as s,r as c,t as V,H as F,F as H,G as W}from"./__vite-browser-external-CkF0pdTJ.js";const Q=["claude","codex","cursor","gemini","kimi","kiro","grok","copilot","antigravity","zcode","opencodeGo","commandCode","qoder","qoderCn","codingPlan","agentPlan","devin","workbuddy","workbuddyAi","deepseek"],X={claude:"CLAUDE",codex:"CODEX",cursor:"CURSOR",gemini:"GEMINI",kimi:"KIMI",kiro:"KIRO",grok:"GROK",copilot:"COPILOT",antigravity:"ANTIGRAVITY",zcode:"ZCODE",opencodeGo:"OPENCODE",commandCode:"COMMAND-CODE",qoder:"QODER",qoderCn:"QODER-CN",codingPlan:"VOLCANO-ARK",agentPlan:"VOLCANO-ARK",devin:"DEVIN",workbuddy:"WORKBUDDY",workbuddyAi:"WORKBUDDY",deepseek:"DEEPSEEK"};function ye(e){return X[e]||null}function me(e){switch(e){case"claude":return s("limits.provider.claude");case"codex":return s("limits.provider.codex");case"cursor":return s("limits.provider.cursor");case"gemini":return s("limits.provider.gemini");case"kimi":return s("limits.provider.kimi");case"kiro":return s("limits.provider.kiro");case"grok":return s("limits.provider.grok");case"copilot":return s("limits.provider.copilot");case"antigravity":return s("limits.provider.antigravity");case"zcode":return s("limits.provider.zcode");case"opencodeGo":return s("limits.provider.opencode_go");case"commandCode":return s("limits.provider.command_code");case"qoder":return s("limits.provider.qoder");case"qoderCn":return s("limits.provider.qoder_cn");case"codingPlan":return s("limits.provider.ark_coding_plan");case"agentPlan":return s("limits.provider.ark_agent_plan");case"devin":return s("limits.provider.devin");case"workbuddy":return s("limits.provider.workbuddy");case"workbuddyAi":return s("limits.provider.workbuddy_ai");case"deepseek":return s("limits.provider.deepseek");default:return String(e||"")}}const f=Q,h="tt.limits.providerOrder",I="tt.limits.providerVisibility",A="tt.limits.displayMode",k="tt.limits.showSubscriptions",b="tt.limits.updatedAt",C="limitsPreferences",Z="limitsDisplayMode",$="tt:limits-prefs-changed",S=Object.freeze({USED:"used",REMAINING:"remaining"}),O=new Set(Object.values(S)),D=new Set([h,I,A,k,b]);function E(){return[...f]}const ee=new Set(["devin"]);function g(){return Object.fromEntries(f.map(e=>[e,!ee.has(e)]))}function N(e){const r=[];if(Array.isArray(e))for(const n of e)f.includes(n)&&!r.includes(n)&&r.push(n);for(const n of f)r.includes(n)||r.push(n);return r}function P(e){const r=g();if(!e||typeof e!="object"||Array.isArray(e))return r;for(const n of f)typeof e[n]=="boolean"&&(r[n]=e[n]);return typeof e.workbuddyAi!="boolean"&&typeof e.workbuddy=="boolean"&&(r.workbuddyAi=e.workbuddy),r}function re(e){return O.has(e)?e:S.USED}function L(e){return typeof e=="boolean"?e:!0}function m(e){if(e!=null){if(typeof e=="number")return Number.isSafeInteger(e)?e:void 0;if(typeof e=="string"){const r=e.trim();if(r==="")return;const n=Number(r);return Number.isSafeInteger(n)?n:void 0}}}function v(e={}){const r=e&&typeof e=="object"?e:{};return{displayMode:re(r.displayMode),providerOrder:N(r.providerOrder),providerVisibility:P(r.providerVisibility),showSubscriptions:L(r.showSubscriptions),updatedAt:m(r.updatedAt)}}function ie(){if(typeof window>"u")return E();try{const e=window.localStorage.getItem(h);return N(e?JSON.parse(e):void 0)}catch{return E()}}function R(){if(typeof window>"u")return g();try{const e=window.localStorage.getItem(I);return P(e?JSON.parse(e):void 0)}catch{return g()}}function we(e){return e===null||D.has(e)}function Se(){return R().devin===!0}function ve(){const e=w();return e.providerOrder.filter(r=>r!=="devin"&&e.providerVisibility[r]===!1)}function te(){if(typeof window>"u")return S.USED;try{const e=window.localStorage.getItem(A);return O.has(e)?e:S.USED}catch{return S.USED}}function oe(){if(typeof window>"u")return!0;try{const e=window.localStorage.getItem(k);return e===null?!0:L(JSON.parse(e))}catch{return!0}}function ne(){if(!(typeof window>"u"))try{return m(window.localStorage.getItem(b))}catch{return}}function de(){if(typeof window>"u")return!1;try{for(const e of D)if(window.localStorage.getItem(e)!==null)return!0}catch{return!1}return!1}function w(){return v({displayMode:te(),providerOrder:ie(),providerVisibility:R(),showSubscriptions:oe(),updatedAt:ne()})}function se(e){if(typeof window>"u")return;const r=v(e);try{window.localStorage.setItem(h,JSON.stringify(r.providerOrder)),window.localStorage.setItem(I,JSON.stringify(r.providerVisibility)),window.localStorage.setItem(A,r.displayMode),window.localStorage.setItem(k,JSON.stringify(r.showSubscriptions)),r.updatedAt===void 0?window.localStorage.removeItem(b):window.localStorage.setItem(b,String(r.updatedAt))}catch(n){console.warn("[tokentracker] limits preferences localStorage write failed:",n)}}function ae(e){const r=v(e);return{displayMode:r.displayMode,providerOrder:[...r.providerOrder],providerVisibility:{...r.providerVisibility},showSubscriptions:r.showSubscriptions,updatedAt:r.updatedAt??null}}function ce(...e){let r;for(const a of e){const l=m(a);l!==void 0&&(r=r===void 0?l:Math.max(r,l))}const n=Date.now();return r!==void 0&&n<=r?r+1:n}function ue(e,r){return e.length===r.length&&e.every((n,a)=>n===r[a])}function le(e,r){return f.every(n=>e[n]===r[n])}function K(e,r){return e.displayMode===r.displayMode&&ue(e.providerOrder,r.providerOrder)&&le(e.providerVisibility,r.providerVisibility)&&e.showSubscriptions===r.showSubscriptions}function pe(e,r){return K(e,r)&&m(e.updatedAt)===m(r.updatedAt)}function M(e,r){const n=m(e.updatedAt),a=m(r.updatedAt);return n!==void 0&&(a===void 0||n>a)}function be(){const[e,r]=c.useState(w),n=c.useRef(e),a=c.useCallback((t,i={})=>{const o=v(t);return n.current=o,r(o),i.writeLocal&&se(o),typeof window<"u"&&window.dispatchEvent(new CustomEvent($)),o},[]),l=c.useCallback(t=>{V()&&F(C,ae(t))},[]),u=c.useCallback(t=>{const i=w(),o=M(i,n.current)?a(i):n.current,d=v(t(o));if(K(o,d))return;const p=ce(i.updatedAt,o.updatedAt),y=a({...d,updatedAt:p},{writeLocal:!0});l(y)},[a,l]),U=c.useCallback(t=>{O.has(t)&&u(i=>({...i,displayMode:t}))},[u]),T=c.useCallback(t=>{u(i=>({...i,showSubscriptions:!!t}))},[u]),_=c.useCallback(t=>{if(!O.has(t))return;const i=w();if(i.updatedAt!==void 0){a(i);return}a({...i,displayMode:t,updatedAt:void 0},{writeLocal:!0})},[a]);c.useEffect(()=>{if(!V())return;const t=H(i=>{const o=i?.[C];if(o&&typeof o=="object"){const d=v(o);if(!de()){a(d,{writeLocal:!0});return}const p=w();if(M(d,p))a(d,{writeLocal:!0});else{const y=a(p);pe(d,p)||l(y)}return}_(i?.[Z])});return W(),t},[_,a,l]),c.useEffect(()=>{if(typeof window>"u")return;const t=i=>{(i.key===null||D.has(i.key))&&a(w())};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)},[a]);const x=c.useCallback(t=>{f.includes(t)&&u(i=>({...i,providerVisibility:{...i.providerVisibility,[t]:!i.providerVisibility[t]}}))},[u]),Y=c.useCallback(t=>{u(i=>({...i,providerVisibility:Object.fromEntries(f.map(o=>[o,!!t]))}))},[u]),z=c.useCallback(t=>{u(i=>{const o=i.providerOrder.indexOf(t);if(o<=0)return i;const d=[...i.providerOrder];return[d[o-1],d[o]]=[d[o],d[o-1]],{...i,providerOrder:d}})},[u]),G=c.useCallback(t=>{u(i=>{const o=i.providerOrder.indexOf(t);if(o<0||o>=i.providerOrder.length-1)return i;const d=[...i.providerOrder];return[d[o],d[o+1]]=[d[o+1],d[o]],{...i,providerOrder:d}})},[u]),q=c.useCallback((t,i)=>{t!==i&&u(o=>{const d=o.providerOrder.indexOf(t),p=o.providerOrder.indexOf(i);if(d<0||p<0)return o;const y=[...o.providerOrder],[J]=y.splice(d,1);return y.splice(p,0,J),{...o,providerOrder:y}})},[u]),j=c.useCallback(()=>{u(()=>({displayMode:S.USED,providerOrder:E(),providerVisibility:g(),showSubscriptions:!0}))},[u]),B=c.useMemo(()=>e.providerOrder.filter(t=>e.providerVisibility[t]!==!1),[e.providerOrder,e.providerVisibility]);return{order:e.providerOrder,visibility:e.providerVisibility,displayMode:e.displayMode,showSubscriptions:e.showSubscriptions,setDisplayMode:U,setShowSubscriptions:T,visibleOrdered:B,toggle:x,setAllVisible:Y,moveUp:z,moveDown:G,moveToward:q,reset:j}}export{$ as L,we as a,Q as b,S as c,ye as d,ve as h,Se as i,me as l,be as u};
|
package/dashboard/dist/assets/{use-native-settings-CpkcGzXp.js → use-native-settings-hgYqaiR7.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,A as f,E as g,F as b,G as r,H as S,I as v}from"./__vite-browser-external-
|
|
1
|
+
import{r as s,A as f,E as g,F as b,G as r,H as S,I as v}from"./__vite-browser-external-CkF0pdTJ.js";function N(){const[u,a]=s.useState(null),t=f()&&g();s.useEffect(()=>{if(!t)return;const e=b(n=>a(n));return r(),e},[t]);const c=s.useCallback((e,n)=>{t&&(a(i=>i&&{...i,[e]:n}),S(e,n))},[t]),o=s.useCallback(e=>{t&&v(e)},[t]),l=s.useCallback(()=>{t&&r()},[t]);return{available:t,settings:u,setSetting:c,runAction:o,refresh:l}}export{N as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,j as h,c as g}from"./__vite-browser-external-
|
|
1
|
+
import{r as n,j as h,c as g}from"./__vite-browser-external-CkF0pdTJ.js";function O({children:r,wrapperClassName:e="hidden w-full sm:block",label:i}){const o=n.useRef(null),l=n.useRef(null),[u,b]=n.useState(0),[s,c]=n.useState(!1);return n.useLayoutEffect(()=>{const t=l.current,f=()=>{b(t.scrollWidth),c(t.scrollWidth>t.clientWidth)};f();const a=typeof ResizeObserver=="function"?new ResizeObserver(f):null;return a?.observe(t),a?.observe(t.firstElementChild),()=>a?.disconnect()},[]),n.useLayoutEffect(()=>{o.current.scrollLeft=l.current.scrollLeft},[u]),h.jsxs("div",{className:e,children:[h.jsx("div",{ref:o,hidden:!s,role:"region","aria-label":i||g("leaderboard.horizontal_scroll"),tabIndex:0,className:"oai-scrollbar h-4 w-full overflow-x-auto overflow-y-hidden border-b border-oai-gray-200 dark:border-oai-gray-800 [scrollbar-gutter:auto]",onScroll:t=>{l.current.scrollLeft=t.currentTarget.scrollLeft},children:h.jsx("div",{style:{width:u,height:1}})}),h.jsx("div",{ref:l,className:"oai-scrollbar w-full overflow-x-auto [scrollbar-gutter:auto]",onScroll:t=>{o.current.scrollLeft=t.currentTarget.scrollLeft},children:r})]})}function x(r){if(typeof window>"u")return null;try{const e=window.localStorage.getItem(r);if(!e)return null;const i=JSON.parse(e);return Array.isArray(i)?i.filter(o=>typeof o=="string"):null}catch{return null}}function w(r,e){if(!(typeof window>"u"))try{window.localStorage.setItem(r,JSON.stringify(e))}catch{}}function m(r,e){if(!r)return e;const i=new Set(e),o=r.filter(u=>i.has(u)),l=e.filter(u=>!o.includes(u));return[...o,...l]}function p(r,e){const i=n.useMemo(()=>e.join("|"),[e]),[o,l]=n.useState(()=>m(x(r),e));n.useEffect(()=>{l(s=>{const c=m(s,e);return c.length===s.length&&c.every((f,a)=>f===s[a])?s:(w(r,c),c)})},[i,e,r]);const u=n.useCallback((s,c)=>{!s||!c||s===c||l(t=>{const f=t.indexOf(s),a=t.indexOf(c);if(f===-1||a===-1)return t;const d=t.slice(),[S]=d.splice(f,1);return d.splice(a,0,S),w(r,d),d})},[r]),b=n.useCallback(()=>{w(r,e),l(e)},[r,e]);return{order:o,reorder:u,reset:b}}export{O as L,p as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o}from"./__vite-browser-external-CkF0pdTJ.js";import{h as r,i as t,p as s}from"./react-BY0y0K4x.js";function i(){!r.current&&t();const[e]=o.useState(s.current);return e}export{i as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as y,u as l,e as A,M as p,b as h,f as C,g as V,j as u}from"./react-
|
|
1
|
+
import{d as y,u as l,e as A,M as p,b as h,f as C,g as V,j as u}from"./react-BY0y0K4x.js";import{r as f}from"./__vite-browser-external-CkF0pdTJ.js";function x(...t){const e=!Array.isArray(t[0]),n=e?0:-1,o=t[0+n],s=t[1+n],c=t[2+n],r=t[3+n],a=y(s,c,r);return e?a(o):a}function E(t){const e=l(()=>A(t)),{isStatic:n}=f.useContext(p);if(n){const[,o]=f.useState(t);f.useEffect(()=>e.on("change",o),[])}return e}function m(t,e){const n=E(e()),o=()=>n.set(e());return o(),h(()=>{const s=()=>V.preRender(o,!1,!0),c=t.map(r=>r.on("change",s));return()=>{c.forEach(r=>r()),C(o)}}),n}function L(t){u.current=[],t();const e=m(u.current,t);return u.current=void 0,e}function g(t,e,n,o){if(typeof t=="function")return L(t);const c=typeof e=="function"?e:x(e,n,o),r=Array.isArray(t)?i(t,c):i([t],([d])=>c(d)),a=Array.isArray(t)?void 0:t.accelerate;return a&&!a.isTransformed&&typeof e!="function"&&Array.isArray(n)&&o?.clamp!==!1&&(r.accelerate={...a,times:e,keyframes:n,isTransformed:!0}),r}function i(t,e){const n=l(()=>[]);return m(t,()=>{n.length=0;const o=t.length;for(let s=0;s<o;s++)n[s]=t[s].get();return e(n)})}export{g as a,E as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as N,w as O,r as w,c as D,aT as B,aU as V,aV as E,aW as U}from"./__vite-browser-external-DnYJww7c.js";import{l as W,i as g,h as P,L as M,a as Y}from"./use-limits-display-prefs-Dln-Rxps.js";import{u as J}from"./use-latest-request-guard-_0H4Rk58.js";const A="native:notificationPermission";let R=null;function j(){return typeof window<"u"&&!!window.chrome?.webview}function I(){return N()?R||"unknown":j()?"granted":typeof Notification>"u"?"unsupported":Notification.permission}function Q(e){if(typeof window>"u")return()=>{};const i=n=>{const l=n?.detail?.status;typeof l=="string"&&(R=l),e(I())};return window.addEventListener(A,i),e(I()),N()&&O({type:"getNotificationStatus"}),()=>window.removeEventListener(A,i)}async function X(){if(N()){O({type:"requestNotificationPermission"});return}j()||typeof Notification<"u"&&Notification.permission==="default"&&await Notification.requestPermission().catch(()=>"denied")}const F="tt.limitAlerts.enabled";function Z(){try{return window.localStorage.getItem(F)==="1"}catch{return!1}}function _e(){const[e,i]=w.useState(Z),[n,l]=w.useState("unknown");w.useEffect(()=>Q(l),[]);const c=w.useCallback(async t=>{const r=!!t;r&&await X();try{window.localStorage.setItem(F,r?"1":"0")}catch{}i(r)},[]);return{enabled:e,setEnabled:c,permissionBlocked:n==="denied"}}function ee(e,i){if(!(e>0))return null;const n=(e-i)/e;return Number.isFinite(n)?Math.min(Math.max(n,0),1):null}function ie(e,i,n=.03){return e>i+n}function ne(e){const i=Math.max(0,Math.floor(e)),n=Math.floor(i/3600);return n>24?`${Math.floor(n/24)}d`:n>0?`${n}h`:`${Math.floor(i/60)}m`}function te(e,i){if(typeof e.windowSeconds=="number")return e.windowSeconds;if(e.windowSecondsField&&i){const n=i[e.windowSecondsField];return typeof n=="number"&&n>0?n:null}return null}function oe(e){return e==null?NaN:typeof e=="number"?e*1e3:Date.parse(e)}function re({usedPercent:e,windowSeconds:i,resetMs:n,mode:l,now:c=Date.now()}){const t=Math.min(Math.max(Number(e)||0,0),100)/100,r={pacePercent:null,paceOver:!1,expectedPercent:null,runsOutEta:null,projectedEnd:null};if(!(i>0)||!Number.isFinite(n)||n<=c)return r;const a=Math.max(0,(n-c)/1e3),d=ee(i,a);if(d==null)return r;if(r.expectedPercent=Math.round(d*100),r.paceOver=ie(t,d),t>0){const u=l==="remaining"?1-d:d;r.pacePercent=u*100}if(d>.02&&t>0){const u=i*d,m=t/u,_=t/d;_>=1&&m>0?r.runsOutEta=ne((1-t)/m):r.projectedEnd=Math.round(Math.min(_,1)*100)}return r}function K(e){return e?Number(e.limit_credits)===0?null:e:null}const q={claude:{windows(e){const i=Array.isArray(e.weekly_scoped)?e.weekly_scoped.map(n=>({key:`scoped-${n.label}`,label:n.label,window:n,pctField:"utilization",resetField:"resets_at",windowSeconds:604800})):[];return[{key:"5h",labelKey:"limits.label.claude_5h",window:e.five_hour,pctField:"utilization",resetField:"resets_at",windowSeconds:5*3600},{key:"7d",labelKey:"limits.label.claude_7d",window:e.seven_day,pctField:"utilization",resetField:"resets_at",windowSeconds:7*86400},{key:"opus",labelKey:"limits.label.claude_opus",window:e.seven_day_opus,pctField:"utilization",resetField:"resets_at",windowSeconds:7*86400},...i]}},codex:{extra:"codex_meta",windows(e){return[{key:"5h",labelKey:"limits.label.codex_5h",window:e.primary_window,windowSecondsField:"limit_window_seconds"},{key:"7d",labelKey:"limits.label.codex_7d",window:e.secondary_window,windowSecondsField:"limit_window_seconds"},{key:"credits",labelKey:"limits.label.codex_credits",window:e.credit_window},{key:"spark-5h",labelKey:"limits.label.codex_spark_5h",window:e.spark_primary_window,windowSecondsField:"limit_window_seconds"},{key:"spark-7d",labelKey:"limits.label.codex_spark_7d",window:e.spark_secondary_window,windowSecondsField:"limit_window_seconds"}]}},cursor:{windows(e){return[{key:"plan",labelKey:"limits.label.cursor_plan",window:e.primary_window,windowSecondsField:"limit_window_seconds"},{key:"auto",labelKey:"limits.label.cursor_auto",window:e.secondary_window,windowSecondsField:"limit_window_seconds"},{key:"api",labelKey:"limits.label.cursor_api",window:e.tertiary_window,windowSecondsField:"limit_window_seconds"},{key:"grok-bot",labelKey:"limits.label.cursor_grok_bot",window:e.quaternary_window,windowSecondsField:"limit_window_seconds"}]}},gemini:{windows(e){return[{key:"pro",labelKey:"limits.label.gemini_pro",window:e.primary_window},{key:"flash",labelKey:"limits.label.gemini_flash",window:e.secondary_window},{key:"lite",labelKey:"limits.label.gemini_lite",window:e.tertiary_window}]}},kimi:{extra:"kimi_parallel",windows(e){return[{key:"weekly",labelKey:"limits.label.kimi_weekly",window:e.primary_window,windowSeconds:7*86400},{key:"5h",labelKey:"limits.label.kimi_5h",window:e.secondary_window,windowSeconds:5*3600},{key:"total",labelKey:"limits.label.kimi_total",window:e.tertiary_window}]}},kiro:{extra:"kiro_credits",windows(e){return[{key:"month",labelKey:"limits.label.kiro_month",window:e.primary_window},{key:"bonus",labelKey:"limits.label.kiro_bonus",window:e.secondary_window}]}},grok:{windows(e){const i=typeof e.period_type=="string"?e.period_type:null,n=i==="weekly"?"limits.label.grok_week":i==="daily"?"limits.label.grok_day":"limits.label.grok_month",l=i==="weekly"?7*86400:i==="daily"?86400:void 0;return[{key:i==="weekly"?"week":i==="daily"?"day":"month",labelKey:n,window:e.primary_window,windowSeconds:l,productPool:!0,segments:se(e)},{key:"ondemand",labelKey:"limits.label.grok_ondemand",window:e.secondary_window}]}},antigravity:{windows(e){return[{key:"claude-weekly",labelKey:"limits.label.antigravity_claude_weekly",window:e.primary_window},{key:"claude-5h",labelKey:"limits.label.antigravity_claude_5h",window:e.secondary_window},{key:"gemini-weekly",labelKey:"limits.label.antigravity_gemini_weekly",window:e.tertiary_window},{key:"gemini-5h",labelKey:"limits.label.antigravity_gemini_5h",window:e.quaternary_window}]}},copilot:{extra:"copilot_otel",windows(e){return[{key:"premium",labelKey:"limits.label.copilot_premium",window:e.primary_window},{key:"chat",labelKey:"limits.label.copilot_chat",window:e.secondary_window}]}},zcode:{extra:"zcode_reset_bank",windows(e){if(e.plan_kind==="coding-plan")return[{key:"5h",labelKey:"limits.label.zcode_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.zcode_weekly",window:e.secondary_window},{key:"tools",labelKey:"limits.label.zcode_tools",window:e.tertiary_window}];const i=Array.isArray(e.buckets)?e.buckets.filter(n=>n?.label&&n.window):[];return i.length?i.map((n,l)=>({key:`bucket-${n.entitlement_id||l}`,label:n.label,window:n.window,...n.period==="one_time"?{timeKind:"expiry"}:{}})):[{key:"glm52",labelKey:"limits.label.zcode_glm52",window:e.primary_window},{key:"glm5t",labelKey:"limits.label.zcode_glm5t",window:e.secondary_window}]}},opencodeGo:{windows(e){return[{key:"5h",labelKey:"limits.label.opencode_go_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.opencode_go_weekly",window:e.secondary_window},{key:"monthly",labelKey:"limits.label.opencode_go_monthly",window:e.tertiary_window}]}},qoder:{windows(e){return[{key:"credits",labelKey:"limits.label.qoder_credits",window:K(e.primary_window),creditPrecision:2,showCreditDetail:!0},{key:"addon",labelKey:"limits.label.qoder_addon_credits",window:K(e.tertiary_window),creditPrecision:2,showCreditDetail:!0},{key:"ultimate",labelKey:"limits.label.qoder_ultimate",window:e.secondary_window,timeKind:"expiry",showCreditDetail:!0}]}},qoderCn:{windows(e){return[{key:"credits",labelKey:"limits.label.qoder_cn_credits",window:K(e.primary_window),creditPrecision:2,showCreditDetail:!0},{key:"addon",labelKey:"limits.label.qoder_cn_addon_credits",window:K(e.tertiary_window),creditPrecision:2,showCreditDetail:!0},{key:"ultimate",labelKey:"limits.label.qoder_cn_ultimate",window:e.secondary_window,timeKind:"expiry",showCreditDetail:!0}]}},codingPlan:{windows(e){return[{key:"5h",labelKey:"limits.label.ark_coding_plan_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.ark_coding_plan_weekly",window:e.secondary_window},{key:"monthly",labelKey:"limits.label.ark_coding_plan_monthly",window:e.tertiary_window}]}},commandCode:{windows(e){return[{key:"5h",labelKey:"limits.label.command_code_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.command_code_weekly",window:e.secondary_window}]}},agentPlan:{windows(e){return[{key:"5h",labelKey:"limits.label.ark_agent_plan_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.ark_agent_plan_weekly",window:e.secondary_window},{key:"monthly",labelKey:"limits.label.ark_agent_plan_monthly",window:e.tertiary_window}]}},devin:{windows(e){return[{key:"daily",labelKey:"limits.label.devin_daily",window:e.primary_window,windowSecondsField:"limit_window_seconds"},{key:"weekly",labelKey:"limits.label.devin_weekly",window:e.secondary_window,windowSecondsField:"limit_window_seconds"}]}},workbuddy:{windows(e){return[{key:"plan",labelKey:"limits.label.workbuddy_plan",window:e.primary_window,creditPrecision:2,showCreditDetail:!0},{key:"addon",labelKey:"limits.label.workbuddy_addon",window:e.secondary_window,creditPrecision:2,showCreditDetail:!0}]}},workbuddyAi:{windows(e){return q.workbuddy.windows(e)}},deepseek:{extra:"deepseek_balance",windows(){return[]}}},le={GrokBuild:"limits.label.grok_build",GrokBot:"limits.label.grok_bot",GrokChat:"limits.label.grok_chat",GrokImagine:"limits.label.grok_imagine",GrokVoice:"limits.label.grok_voice",Cursor:"limits.label.grok_cursor"};function se(e){if(!Array.isArray(e?.products))return null;const i=[];for(const n of e.products){const l=typeof n?.product=="string"?n.product:"",c=Number(n?.window?.used_percent);if(!l||!(c>0))continue;const t=le[l],r=typeof n.label=="string"?n.label.trim():"";!t&&!r||i.push({key:l,...t?{labelKey:t}:{label:r},pct:c})}return i.length>0?i:null}const z="tt.limitAlerts.cycles.v1";function de(){try{return JSON.parse(window.localStorage.getItem(z)||"{}")}catch{return{}}}function ae(e){try{window.localStorage.setItem(z,JSON.stringify(e))}catch{}}function we(e,{now:i=Date.now()}={}){const n=[],l=q;for(const[c,t]of Object.entries(e||{})){const r=l[c];if(!(!t?.configured||t.error||!r))for(const a of r.windows(t)){if(!a.window)continue;const d=Number(a.pctField==="utilization"?a.window.utilization:a.window.used_percent),u=a.resetField==="resets_at"?a.window.resets_at:a.window.reset_at,m=oe(u),_=re({usedPercent:d,windowSeconds:te(a,a.window),resetMs:m,mode:"used",now:i});!_.runsOutEta||!_.paceOver||d<20||!(m>i)||n.push({id:`${c}:${a.key}:${m}`,providerId:c,windowKey:a.key,resetMs:m,usedPercent:d,runsOutEta:_.runsOutEta})}}return n}function ce(e){const i=de(),n=we(e);for(const t of n){if(i[t.id])continue;const r=W(t.providerId),a=D("limits.alert.title",{provider:r}),d=D("limits.alert.body",{eta:t.runsOutEta,percent:Math.round(t.usedPercent)});let u=B({title:a,body:d,id:t.id});!u&&typeof Notification<"u"&&Notification.permission==="granted"&&(new Notification(a,{body:d,tag:t.id}),u=!0),u&&(i[t.id]=Date.now())}const l=Date.now()-864e5,c=Object.fromEntries(Object.entries(i).filter(([t,r])=>{const a=Number(t.split(":").at(-1));return Number.isFinite(a)?a>=l:Number(r)>=l}).slice(-100));return ae(c),n.length}function v(e,i){if(!e||i.length===0)return e;const n=new Set(i);let l=!1;const c={...e};for(const t of Object.keys(c)){if(t==="fetched_at"||!n.has(t))continue;const r=c[t];r&&typeof r=="object"&&r.configured===!1&&Object.keys(r).length===1||(c[t]={configured:!1},l=!0)}return l?c:e}function fe(e){const i=U(),n=i&&!!e?.initialState,[l,c]=w.useState(g),[t,r]=w.useState(P),a=w.useRef(e?.getHiddenProviders);a.current=e?.getHiddenProviders;const d=w.useCallback(()=>a.current?.()??t,[t]),u=w.useCallback(()=>{const s=d();return l?s:["devin",...s]},[d,l]),[m,_]=w.useState(()=>n?v(e?.initialState?.data??null,u()):null),[T,f]=w.useState(()=>n?e?.initialState?.error??null:null),[$,b]=w.useState(i&&!n),x=!!e?.initialRefresh,L=!!e?.publishToPreloadCache,G=t.join(","),p=J([l,G,i]);w.useEffect(()=>{if(typeof window>"u")return;const s=()=>{c(g()),r(P())},o=y=>{Y(y.key)&&s()};return window.addEventListener(M,s),window.addEventListener("storage",o),()=>{window.removeEventListener(M,s),window.removeEventListener("storage",o)}},[]),w.useEffect(()=>{if(!(!i||!m||typeof window>"u"))try{window.localStorage.getItem(F)==="1"&&ce(m)}catch{}},[m,i]);const k=w.useCallback((s,o)=>{!i||!L||!s||typeof s!="object"||V(v(s,u()),{source:o})},[d,i,L]),H=w.useCallback(async()=>{if(!i)return null;const s=p();try{const o=await E({refresh:!0,devinEnabled:g(),hiddenProviders:d()});if(!s())return null;const h=v(o&&typeof o=="object"?o:null,u());return _(h),f(null),b(!1),k(h,"manual-refresh"),h}catch(o){return s()&&(f(o?.message||String(o)),b(!1)),null}},[u,p,d,i,k]),S=w.useCallback(async()=>{if(!i)return;const s=p();try{const o=await E({devinEnabled:g(),hiddenProviders:d()});if(!s())return;const y=o&&typeof o=="object"?o:null;_(v(y,u())),f(null),b(!1),k(y,"page-load")}catch(o){if(!s())return;f(o?.message||String(o)),b(!1)}},[u,p,d,i,k]);w.useEffect(()=>{if(!i||typeof window>"u"||typeof document>"u")return;const s=15e3;let o=Date.now();const y=()=>{if(document.visibilityState!=="visible")return;const h=Date.now();h-o<s||(o=h,S())};return window.addEventListener("focus",y),document.addEventListener("visibilitychange",y),()=>{window.removeEventListener("focus",y),document.removeEventListener("visibilitychange",y)}},[i,S]);const C=w.useRef(`${g()}|${P().join(",")}`);return w.useEffect(()=>{const s=`${l}|${t.join(",")}`;C.current!==s&&(C.current=s,i&&(_(o=>v(o,u())),S()))},[u,l,t,i,S]),w.useEffect(()=>{if(!i){_(null),f(null),b(!1);return}if(n&&!x)return;const s=p();(async()=>{try{const o=await E({devinEnabled:g(),hiddenProviders:d()});if(!s())return;const y=o&&typeof o=="object"?o:null;_(v(y,u())),f(null),k(y,"page-load")}catch(o){if(!s())return;f(o?.message||String(o))}finally{s()&&b(!1)}})()},[p,n,x,i,k]),{data:m,error:T,isLoading:$,refresh:H}}export{q as P,te as a,_e as b,re as c,oe as r,ce as s,fe as u};
|
|
1
|
+
import{t as N,w as O,r as w,c as D,aT as B,aU as V,aV as E,aW as U}from"./__vite-browser-external-CkF0pdTJ.js";import{l as W,i as g,h as P,L as M,a as Y}from"./use-limits-display-prefs-CCuLFy00.js";import{u as J}from"./use-latest-request-guard-tXGuKvua.js";const A="native:notificationPermission";let R=null;function j(){return typeof window<"u"&&!!window.chrome?.webview}function I(){return N()?R||"unknown":j()?"granted":typeof Notification>"u"?"unsupported":Notification.permission}function Q(e){if(typeof window>"u")return()=>{};const i=n=>{const l=n?.detail?.status;typeof l=="string"&&(R=l),e(I())};return window.addEventListener(A,i),e(I()),N()&&O({type:"getNotificationStatus"}),()=>window.removeEventListener(A,i)}async function X(){if(N()){O({type:"requestNotificationPermission"});return}j()||typeof Notification<"u"&&Notification.permission==="default"&&await Notification.requestPermission().catch(()=>"denied")}const F="tt.limitAlerts.enabled";function Z(){try{return window.localStorage.getItem(F)==="1"}catch{return!1}}function _e(){const[e,i]=w.useState(Z),[n,l]=w.useState("unknown");w.useEffect(()=>Q(l),[]);const c=w.useCallback(async t=>{const r=!!t;r&&await X();try{window.localStorage.setItem(F,r?"1":"0")}catch{}i(r)},[]);return{enabled:e,setEnabled:c,permissionBlocked:n==="denied"}}function ee(e,i){if(!(e>0))return null;const n=(e-i)/e;return Number.isFinite(n)?Math.min(Math.max(n,0),1):null}function ie(e,i,n=.03){return e>i+n}function ne(e){const i=Math.max(0,Math.floor(e)),n=Math.floor(i/3600);return n>24?`${Math.floor(n/24)}d`:n>0?`${n}h`:`${Math.floor(i/60)}m`}function te(e,i){if(typeof e.windowSeconds=="number")return e.windowSeconds;if(e.windowSecondsField&&i){const n=i[e.windowSecondsField];return typeof n=="number"&&n>0?n:null}return null}function oe(e){return e==null?NaN:typeof e=="number"?e*1e3:Date.parse(e)}function re({usedPercent:e,windowSeconds:i,resetMs:n,mode:l,now:c=Date.now()}){const t=Math.min(Math.max(Number(e)||0,0),100)/100,r={pacePercent:null,paceOver:!1,expectedPercent:null,runsOutEta:null,projectedEnd:null};if(!(i>0)||!Number.isFinite(n)||n<=c)return r;const a=Math.max(0,(n-c)/1e3),d=ee(i,a);if(d==null)return r;if(r.expectedPercent=Math.round(d*100),r.paceOver=ie(t,d),t>0){const u=l==="remaining"?1-d:d;r.pacePercent=u*100}if(d>.02&&t>0){const u=i*d,m=t/u,_=t/d;_>=1&&m>0?r.runsOutEta=ne((1-t)/m):r.projectedEnd=Math.round(Math.min(_,1)*100)}return r}function K(e){return e?Number(e.limit_credits)===0?null:e:null}const q={claude:{windows(e){const i=Array.isArray(e.weekly_scoped)?e.weekly_scoped.map(n=>({key:`scoped-${n.label}`,label:n.label,window:n,pctField:"utilization",resetField:"resets_at",windowSeconds:604800})):[];return[{key:"5h",labelKey:"limits.label.claude_5h",window:e.five_hour,pctField:"utilization",resetField:"resets_at",windowSeconds:5*3600},{key:"7d",labelKey:"limits.label.claude_7d",window:e.seven_day,pctField:"utilization",resetField:"resets_at",windowSeconds:7*86400},{key:"opus",labelKey:"limits.label.claude_opus",window:e.seven_day_opus,pctField:"utilization",resetField:"resets_at",windowSeconds:7*86400},...i]}},codex:{extra:"codex_meta",windows(e){return[{key:"5h",labelKey:"limits.label.codex_5h",window:e.primary_window,windowSecondsField:"limit_window_seconds"},{key:"7d",labelKey:"limits.label.codex_7d",window:e.secondary_window,windowSecondsField:"limit_window_seconds"},{key:"credits",labelKey:"limits.label.codex_credits",window:e.credit_window},{key:"spark-5h",labelKey:"limits.label.codex_spark_5h",window:e.spark_primary_window,windowSecondsField:"limit_window_seconds"},{key:"spark-7d",labelKey:"limits.label.codex_spark_7d",window:e.spark_secondary_window,windowSecondsField:"limit_window_seconds"}]}},cursor:{windows(e){return[{key:"plan",labelKey:"limits.label.cursor_plan",window:e.primary_window,windowSecondsField:"limit_window_seconds"},{key:"auto",labelKey:"limits.label.cursor_auto",window:e.secondary_window,windowSecondsField:"limit_window_seconds"},{key:"api",labelKey:"limits.label.cursor_api",window:e.tertiary_window,windowSecondsField:"limit_window_seconds"},{key:"grok-bot",labelKey:"limits.label.cursor_grok_bot",window:e.quaternary_window,windowSecondsField:"limit_window_seconds"}]}},gemini:{windows(e){return[{key:"pro",labelKey:"limits.label.gemini_pro",window:e.primary_window},{key:"flash",labelKey:"limits.label.gemini_flash",window:e.secondary_window},{key:"lite",labelKey:"limits.label.gemini_lite",window:e.tertiary_window}]}},kimi:{extra:"kimi_parallel",windows(e){return[{key:"weekly",labelKey:"limits.label.kimi_weekly",window:e.primary_window,windowSeconds:7*86400},{key:"5h",labelKey:"limits.label.kimi_5h",window:e.secondary_window,windowSeconds:5*3600},{key:"total",labelKey:"limits.label.kimi_total",window:e.tertiary_window}]}},kiro:{extra:"kiro_credits",windows(e){return[{key:"month",labelKey:"limits.label.kiro_month",window:e.primary_window},{key:"bonus",labelKey:"limits.label.kiro_bonus",window:e.secondary_window}]}},grok:{windows(e){const i=typeof e.period_type=="string"?e.period_type:null,n=i==="weekly"?"limits.label.grok_week":i==="daily"?"limits.label.grok_day":"limits.label.grok_month",l=i==="weekly"?7*86400:i==="daily"?86400:void 0;return[{key:i==="weekly"?"week":i==="daily"?"day":"month",labelKey:n,window:e.primary_window,windowSeconds:l,productPool:!0,segments:se(e)},{key:"ondemand",labelKey:"limits.label.grok_ondemand",window:e.secondary_window}]}},antigravity:{windows(e){return[{key:"claude-weekly",labelKey:"limits.label.antigravity_claude_weekly",window:e.primary_window},{key:"claude-5h",labelKey:"limits.label.antigravity_claude_5h",window:e.secondary_window},{key:"gemini-weekly",labelKey:"limits.label.antigravity_gemini_weekly",window:e.tertiary_window},{key:"gemini-5h",labelKey:"limits.label.antigravity_gemini_5h",window:e.quaternary_window}]}},copilot:{extra:"copilot_otel",windows(e){return[{key:"premium",labelKey:"limits.label.copilot_premium",window:e.primary_window},{key:"chat",labelKey:"limits.label.copilot_chat",window:e.secondary_window}]}},zcode:{extra:"zcode_reset_bank",windows(e){if(e.plan_kind==="coding-plan")return[{key:"5h",labelKey:"limits.label.zcode_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.zcode_weekly",window:e.secondary_window},{key:"tools",labelKey:"limits.label.zcode_tools",window:e.tertiary_window}];const i=Array.isArray(e.buckets)?e.buckets.filter(n=>n?.label&&n.window):[];return i.length?i.map((n,l)=>({key:`bucket-${n.entitlement_id||l}`,label:n.label,window:n.window,...n.period==="one_time"?{timeKind:"expiry"}:{}})):[{key:"glm52",labelKey:"limits.label.zcode_glm52",window:e.primary_window},{key:"glm5t",labelKey:"limits.label.zcode_glm5t",window:e.secondary_window}]}},opencodeGo:{windows(e){return[{key:"5h",labelKey:"limits.label.opencode_go_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.opencode_go_weekly",window:e.secondary_window},{key:"monthly",labelKey:"limits.label.opencode_go_monthly",window:e.tertiary_window}]}},qoder:{windows(e){return[{key:"credits",labelKey:"limits.label.qoder_credits",window:K(e.primary_window),creditPrecision:2,showCreditDetail:!0},{key:"addon",labelKey:"limits.label.qoder_addon_credits",window:K(e.tertiary_window),creditPrecision:2,showCreditDetail:!0},{key:"ultimate",labelKey:"limits.label.qoder_ultimate",window:e.secondary_window,timeKind:"expiry",showCreditDetail:!0}]}},qoderCn:{windows(e){return[{key:"credits",labelKey:"limits.label.qoder_cn_credits",window:K(e.primary_window),creditPrecision:2,showCreditDetail:!0},{key:"addon",labelKey:"limits.label.qoder_cn_addon_credits",window:K(e.tertiary_window),creditPrecision:2,showCreditDetail:!0},{key:"ultimate",labelKey:"limits.label.qoder_cn_ultimate",window:e.secondary_window,timeKind:"expiry",showCreditDetail:!0}]}},codingPlan:{windows(e){return[{key:"5h",labelKey:"limits.label.ark_coding_plan_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.ark_coding_plan_weekly",window:e.secondary_window},{key:"monthly",labelKey:"limits.label.ark_coding_plan_monthly",window:e.tertiary_window}]}},commandCode:{windows(e){return[{key:"5h",labelKey:"limits.label.command_code_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.command_code_weekly",window:e.secondary_window}]}},agentPlan:{windows(e){return[{key:"5h",labelKey:"limits.label.ark_agent_plan_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.ark_agent_plan_weekly",window:e.secondary_window},{key:"monthly",labelKey:"limits.label.ark_agent_plan_monthly",window:e.tertiary_window}]}},devin:{windows(e){return[{key:"daily",labelKey:"limits.label.devin_daily",window:e.primary_window,windowSecondsField:"limit_window_seconds"},{key:"weekly",labelKey:"limits.label.devin_weekly",window:e.secondary_window,windowSecondsField:"limit_window_seconds"}]}},workbuddy:{windows(e){return[{key:"plan",labelKey:"limits.label.workbuddy_plan",window:e.primary_window,creditPrecision:2,showCreditDetail:!0},{key:"addon",labelKey:"limits.label.workbuddy_addon",window:e.secondary_window,creditPrecision:2,showCreditDetail:!0}]}},workbuddyAi:{windows(e){return q.workbuddy.windows(e)}},deepseek:{extra:"deepseek_balance",windows(){return[]}}},le={GrokBuild:"limits.label.grok_build",GrokBot:"limits.label.grok_bot",GrokChat:"limits.label.grok_chat",GrokImagine:"limits.label.grok_imagine",GrokVoice:"limits.label.grok_voice",Cursor:"limits.label.grok_cursor"};function se(e){if(!Array.isArray(e?.products))return null;const i=[];for(const n of e.products){const l=typeof n?.product=="string"?n.product:"",c=Number(n?.window?.used_percent);if(!l||!(c>0))continue;const t=le[l],r=typeof n.label=="string"?n.label.trim():"";!t&&!r||i.push({key:l,...t?{labelKey:t}:{label:r},pct:c})}return i.length>0?i:null}const z="tt.limitAlerts.cycles.v1";function de(){try{return JSON.parse(window.localStorage.getItem(z)||"{}")}catch{return{}}}function ae(e){try{window.localStorage.setItem(z,JSON.stringify(e))}catch{}}function we(e,{now:i=Date.now()}={}){const n=[],l=q;for(const[c,t]of Object.entries(e||{})){const r=l[c];if(!(!t?.configured||t.error||!r))for(const a of r.windows(t)){if(!a.window)continue;const d=Number(a.pctField==="utilization"?a.window.utilization:a.window.used_percent),u=a.resetField==="resets_at"?a.window.resets_at:a.window.reset_at,m=oe(u),_=re({usedPercent:d,windowSeconds:te(a,a.window),resetMs:m,mode:"used",now:i});!_.runsOutEta||!_.paceOver||d<20||!(m>i)||n.push({id:`${c}:${a.key}:${m}`,providerId:c,windowKey:a.key,resetMs:m,usedPercent:d,runsOutEta:_.runsOutEta})}}return n}function ce(e){const i=de(),n=we(e);for(const t of n){if(i[t.id])continue;const r=W(t.providerId),a=D("limits.alert.title",{provider:r}),d=D("limits.alert.body",{eta:t.runsOutEta,percent:Math.round(t.usedPercent)});let u=B({title:a,body:d,id:t.id});!u&&typeof Notification<"u"&&Notification.permission==="granted"&&(new Notification(a,{body:d,tag:t.id}),u=!0),u&&(i[t.id]=Date.now())}const l=Date.now()-864e5,c=Object.fromEntries(Object.entries(i).filter(([t,r])=>{const a=Number(t.split(":").at(-1));return Number.isFinite(a)?a>=l:Number(r)>=l}).slice(-100));return ae(c),n.length}function v(e,i){if(!e||i.length===0)return e;const n=new Set(i);let l=!1;const c={...e};for(const t of Object.keys(c)){if(t==="fetched_at"||!n.has(t))continue;const r=c[t];r&&typeof r=="object"&&r.configured===!1&&Object.keys(r).length===1||(c[t]={configured:!1},l=!0)}return l?c:e}function fe(e){const i=U(),n=i&&!!e?.initialState,[l,c]=w.useState(g),[t,r]=w.useState(P),a=w.useRef(e?.getHiddenProviders);a.current=e?.getHiddenProviders;const d=w.useCallback(()=>a.current?.()??t,[t]),u=w.useCallback(()=>{const s=d();return l?s:["devin",...s]},[d,l]),[m,_]=w.useState(()=>n?v(e?.initialState?.data??null,u()):null),[T,f]=w.useState(()=>n?e?.initialState?.error??null:null),[$,b]=w.useState(i&&!n),x=!!e?.initialRefresh,L=!!e?.publishToPreloadCache,G=t.join(","),p=J([l,G,i]);w.useEffect(()=>{if(typeof window>"u")return;const s=()=>{c(g()),r(P())},o=y=>{Y(y.key)&&s()};return window.addEventListener(M,s),window.addEventListener("storage",o),()=>{window.removeEventListener(M,s),window.removeEventListener("storage",o)}},[]),w.useEffect(()=>{if(!(!i||!m||typeof window>"u"))try{window.localStorage.getItem(F)==="1"&&ce(m)}catch{}},[m,i]);const k=w.useCallback((s,o)=>{!i||!L||!s||typeof s!="object"||V(v(s,u()),{source:o})},[d,i,L]),H=w.useCallback(async()=>{if(!i)return null;const s=p();try{const o=await E({refresh:!0,devinEnabled:g(),hiddenProviders:d()});if(!s())return null;const h=v(o&&typeof o=="object"?o:null,u());return _(h),f(null),b(!1),k(h,"manual-refresh"),h}catch(o){return s()&&(f(o?.message||String(o)),b(!1)),null}},[u,p,d,i,k]),S=w.useCallback(async()=>{if(!i)return;const s=p();try{const o=await E({devinEnabled:g(),hiddenProviders:d()});if(!s())return;const y=o&&typeof o=="object"?o:null;_(v(y,u())),f(null),b(!1),k(y,"page-load")}catch(o){if(!s())return;f(o?.message||String(o)),b(!1)}},[u,p,d,i,k]);w.useEffect(()=>{if(!i||typeof window>"u"||typeof document>"u")return;const s=15e3;let o=Date.now();const y=()=>{if(document.visibilityState!=="visible")return;const h=Date.now();h-o<s||(o=h,S())};return window.addEventListener("focus",y),document.addEventListener("visibilitychange",y),()=>{window.removeEventListener("focus",y),document.removeEventListener("visibilitychange",y)}},[i,S]);const C=w.useRef(`${g()}|${P().join(",")}`);return w.useEffect(()=>{const s=`${l}|${t.join(",")}`;C.current!==s&&(C.current=s,i&&(_(o=>v(o,u())),S()))},[u,l,t,i,S]),w.useEffect(()=>{if(!i){_(null),f(null),b(!1);return}if(n&&!x)return;const s=p();(async()=>{try{const o=await E({devinEnabled:g(),hiddenProviders:d()});if(!s())return;const y=o&&typeof o=="object"?o:null;_(v(y,u())),f(null),k(y,"page-load")}catch(o){if(!s())return;f(o?.message||String(o))}finally{s()&&b(!1)}})()},[p,n,x,i,k]),{data:m,error:T,isLoading:$,refresh:H}}export{q as P,te as a,_e as b,re as c,oe as r,ce as s,fe as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,C as t,D as r,z as c}from"./__vite-browser-external-
|
|
1
|
+
import{r as e,C as t,D as r,z as c}from"./__vite-browser-external-CkF0pdTJ.js";const s=Object.freeze({currency:c,rate:1,symbol:"$",rates:{...r},rateSource:"default",rateFetchedAt:null,setCurrency:()=>{}});function a(){return e.useContext(t)??s}export{a as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b3 as G,bm as ot,bn as dt,bo as et,bp as U,bq as Kt,br as Dt,bs as Yt,bt as Qe,bu as Pe,bv as Ze,bw as Gt,bx as Me,by as Bt,bz as Ut,bA as pe,bB as Le,r as R,as as tn,b2 as wt,b1 as en,b4 as nn,bC as on,K as sn,J as rn}from"./__vite-browser-external-DnYJww7c.js";import{a as cn,c as Mt,p as ln}from"./composite-fgJbx88k.js";const ut=Math.min,q=Math.max,$t=Math.round,Lt=Math.floor,K=t=>({x:t,y:t}),fn={left:"right",right:"left",bottom:"top",top:"bottom"};function Te(t,e,n){return q(t,ut(e,n))}function nt(t,e){return typeof t=="function"?t(e):t}function V(t){return t.split("-")[0]}function Y(t){return t.split("-")[1]}function Jt(t){return t==="x"?"y":"x"}function Qt(t){return t==="y"?"height":"width"}function I(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Zt(t){return Jt(I(t))}function an(t,e,n){n===void 0&&(n=!1);const o=Y(t),i=Zt(t),s=Qt(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=Ft(r)),[r,Ft(r)]}function un(t){const e=Ft(t);return[qt(t),e,qt(e)]}function qt(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const xe=["left","right"],we=["right","left"],dn=["top","bottom"],mn=["bottom","top"];function gn(t,e,n){switch(t){case"top":case"bottom":return n?e?we:xe:e?xe:we;case"left":case"right":return e?dn:mn;default:return[]}}function hn(t,e,n,o){const i=Y(t);let s=gn(V(t),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(qt)))),s}function Ft(t){const e=V(t);return fn[e]+t.slice(e.length)}function pn(t){var e,n,o,i;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(i=t.left)!=null?i:0}}function De(t){return typeof t!="number"?pn(t):{top:t,right:t,bottom:t,left:t}}function kt(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function ye(t,e,n){let{reference:o,floating:i}=t;const s=I(e),r=Zt(e),c=Qt(r),l=V(e),u=s==="y",d=o.x+o.width/2-i.width/2,g=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2;let f;switch(l){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:g};break;case"left":f={x:o.x-i.width,y:g};break;default:f={x:o.x,y:o.y}}const a=Y(e);return a&&(f[r]+=m*(a==="end"?1:-1)*(n&&u?-1:1)),f}async function xn(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:s,rects:r,elements:c,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:g="floating",altBoundary:m=!1,padding:f=0}=nt(e,t),a=De(f),h=c[m?g==="floating"?"reference":"floating":g],x=kt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(h)))==null||n?h:h.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:l})),w=g==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),y=await(s.isElement==null?void 0:s.isElement(b))&&await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1},O=kt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:b,strategy:l}):w);return{top:(x.top-O.top+a.top)/y.y,bottom:(O.bottom-x.bottom+a.bottom)/y.y,left:(x.left-O.left+a.left)/y.x,right:(O.right-x.right+a.right)/y.x}}const wn=50,yn=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=r.detectOverflow?r:{...r,detectOverflow:xn},l=await(r.isRTL==null?void 0:r.isRTL(e));let u=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:g}=ye(u,o,l),m=o,f=0;const a={};for(let p=0;p<s.length;p++){const h=s[p];if(!h)continue;const{name:x,fn:w}=h,{x:b,y,data:O,reset:v}=await w({x:d,y:g,initialPlacement:o,placement:m,strategy:i,middlewareData:a,rects:u,platform:c,elements:{reference:t,floating:e}});d=b??d,g=y??g,a[x]={...a[x],...O},v&&f<wn&&(f++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(u=v.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:d,y:g}=ye(u,m,l)),p=-1)}return{x:d,y:g,placement:m,strategy:i,middlewareData:a}},bn=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:l,elements:u}=e,{mainAxis:d=!0,crossAxis:g=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:a="none",flipAlignment:p=!0,...h}=nt(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=V(i),w=I(c),b=V(c)===c,y=await(l.isRTL==null?void 0:l.isRTL(u.floating)),O=m||(b||!p?[Ft(c)]:un(c)),v=a!=="none";!m&&v&&O.push(...hn(c,p,a,y));const C=[c,...O],E=await l.detectOverflow(e,h),k=[];let P=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&k.push(E[x]),g){const $=an(i,r,y);k.push(E[$[0]],E[$[1]])}if(P=[...P,{placement:i,overflows:k}],!k.every($=>$<=0)){var W,z;const $=(((W=s.flip)==null?void 0:W.index)||0)+1,F=C[$];if(F&&(!(g==="alignment"?w!==I(F):!1)||P.every(A=>I(A.placement)===w?A.overflows[0]>0:!0)))return{data:{index:$,overflows:P},reset:{placement:F}};let L=(z=P.filter(N=>N.overflows[0]<=0).sort((N,A)=>N.overflows[1]-A.overflows[1])[0])==null?void 0:z.placement;if(!L)switch(f){case"bestFit":{var D;const N=(D=P.filter(A=>{if(v){const T=I(A.placement);return T===w||T==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(T=>T>0).reduce((T,X)=>T+X,0)]).sort((A,T)=>A[1]-T[1])[0])==null?void 0:D[0];N&&(L=N);break}case"initialPlacement":L=c;break}if(i!==L)return{reset:{placement:L}}}return{}}}},$e=new Set(["left","top"]);async function vn(t,e){const{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=V(n),c=Y(n),l=I(n)==="y",u=$e.has(r)?-1:1,d=s&&l?-1:1,g=nt(e,t);let{mainAxis:m,crossAxis:f,alignmentAxis:a}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return c&&typeof a=="number"&&(f=c==="end"?a*-1:a),l?{x:f*d,y:m*u}:{x:m*u,y:f*d}}const Rn=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:s,placement:r,middlewareData:c}=e,l=await vn(e,t);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}}}}},An=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:s}=e,{mainAxis:r=!0,crossAxis:c=!1,limiter:l={fn:w=>{let{x:b,y}=w;return{x:b,y}}},...u}=nt(t,e),d={x:n,y:o},g=await s.detectOverflow(e,u),m=I(i),f=Jt(m);let a=d[f],p=d[m];const h=(w,b)=>Te(b+g[w==="y"?"top":"left"],b,b-g[w==="y"?"bottom":"right"]);r&&(a=h(f,a)),c&&(p=h(m,p));const x=l.fn({...e,[f]:a,[m]:p});return{...x,data:{x:x.x-n,y:x.y-o,enabled:{[f]:r,[m]:c}}}}}},On=function(t){return t===void 0&&(t={}),{options:t,fn(e){var n,o;const{x:i,y:s,placement:r,rects:c,middlewareData:l}=e,{offset:u=0,mainAxis:d=!0,crossAxis:g=!0}=nt(t,e),m={x:i,y:s},f=I(r),a=Jt(f);let p=m[a],h=m[f];const x=nt(u,e),w=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:(n=x.mainAxis)!=null?n:0,crossAxis:(o=x.crossAxis)!=null?o:0};if(d){const O=a==="y"?"height":"width",v=c.reference[a]-c.floating[O]+w.mainAxis,C=c.reference[a]+c.reference[O]-w.mainAxis;p<v?p=v:p>C&&(p=C)}if(g){var b,y;const O=a==="y"?"width":"height",v=$e.has(V(r)),C=c.reference[f]-c.floating[O]+(v&&((b=l.offset)==null?void 0:b[f])||0)+(v?0:w.crossAxis),E=c.reference[f]+c.reference[O]+(v?0:((y=l.offset)==null?void 0:y[f])||0)-(v?w.crossAxis:0);h<C?h=C:h>E&&(h=E)}return{[a]:p,[f]:h}}}},Sn=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:o,platform:i,elements:s}=e,{apply:r=()=>{},...c}=nt(t,e),l=await i.detectOverflow(e,c),u=V(n),d=Y(n),g=I(n)==="y",{width:m,height:f}=o.floating;let a,p;u==="top"||u==="bottom"?(a=u,p=d===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(p=u,a=d==="end"?"top":"bottom");const h=f-l.top-l.bottom,x=m-l.left-l.right,w=ut(f-l[a],h),b=ut(m-l[p],x),y=e.middlewareData.shift,O=!y;let v=w,C=b;y!=null&&y.enabled.x&&(C=x),y!=null&&y.enabled.y&&(v=h),O&&!d&&(g?C=m-2*q(l.left,l.right):v=f-2*q(l.top,l.bottom)),await r({...e,availableWidth:C,availableHeight:v});const E=await i.getDimensions(s.floating);return m!==E.width||f!==E.height?{reset:{rects:!0}}:{}}}};function Fe(t){const e=et(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=dt(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,c=$t(n)!==s||$t(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function te(t){return G(t)?t:t.contextElement}function at(t){const e=te(t);if(!dt(e))return K(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:s}=Fe(e);let r=(s?$t(n.width):n.width)/o,c=(s?$t(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const Cn=K(0);function ke(t){const e=U(t);return!Le()||!e.visualViewport?Cn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function En(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===U(t)}function st(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=te(t);let r=K(1);e&&(o?G(o)&&(r=at(o)):r=at(t));const c=En(s,n,o)?ke(s):K(0);let l=(i.left+c.x)/r.x,u=(i.top+c.y)/r.y,d=i.width/r.x,g=i.height/r.y;if(s&&o){const m=U(s),f=G(o)?U(o):o;let a=m,p=pe(a);for(;p&&f!==a;){const h=at(p),x=p.getBoundingClientRect(),w=et(p),b=x.left+(p.clientLeft+parseFloat(w.paddingLeft))*h.x,y=x.top+(p.clientTop+parseFloat(w.paddingTop))*h.y;l*=h.x,u*=h.y,d*=h.x,g*=h.y,l+=b,u+=y,a=U(p),p=pe(a)}}return kt({width:d,height:g,x:l,y:u})}function Ht(t,e){const n=Bt(t).scrollLeft;return e?e.left+n:st(ot(t)).left+n}function We(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-Ht(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function Pn(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s=i==="fixed",r=ot(o),c=e?Kt(e.floating):!1;if(o===r||c&&s)return n;let l={scrollLeft:0,scrollTop:0},u=K(1);const d=K(0),g=dt(o);if((g||!s)&&((Gt(o)!=="body"||Me(r))&&(l=Bt(o)),g)){const f=st(o);u=at(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}const m=r&&!g&&!s?We(r,l):K(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+m.x,y:n.y*u.y-l.scrollTop*u.y+d.y+m.y}}function Mn(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Ln(t){const e=Bt(t),n=t.ownerDocument.body,o=q(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=q(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-e.scrollLeft+Ht(t);const r=-e.scrollTop;return et(n).direction==="rtl"&&(s+=q(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:r}}const Tn=25;function Dn(t,e,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",i=U(t),s=ot(t),r=i.visualViewport;let c=s.clientWidth,l=s.clientHeight,u=0,d=0;if(r){const m=!Le()||e==="fixed";o?m||(u=-r.offsetLeft,d=-r.offsetTop):(c=r.width,l=r.height,m&&(u=r.offsetLeft,d=r.offsetTop))}if(Ht(s)<=0){const m=s.ownerDocument,f=m.body,a=getComputedStyle(f),p=m.compatMode==="CSS1Compat"&&parseFloat(a.marginLeft)+parseFloat(a.marginRight)||0,h=Math.abs(s.clientWidth-f.clientWidth-p),x=getComputedStyle(s).scrollbarGutter==="stable both-edges"?h/2:h;x<=Tn&&(c-=x)}return{width:c,height:l,x:u,y:d}}function $n(t,e){const n=st(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=at(t),r=t.clientWidth*s.x,c=t.clientHeight*s.y,l=i*s.x,u=o*s.y;return{width:r,height:c,x:l,y:u}}function be(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=Dn(t,n,e);else if(e==="document")o=Ln(ot(t));else if(G(e))o=$n(e,n);else{const i=ke(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return kt(o)}function Fn(t,e){const n=e.get(t);if(n)return n;let o=Ut(t,[],!1).filter(c=>G(c)&&Gt(c)!=="body"),i=null;const s=et(t).position==="fixed";let r=s?Dt(t):t;for(;G(r)&&!Yt(r);){const c=et(r),l=Pe(r),u=i?i.position:s?"fixed":"";!l&&(u==="fixed"||u==="absolute"&&c.position==="static")?o=o.filter(g=>g!==r):i=c,r=Dt(r)}return e.set(t,o),o}function kn(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[...n==="clippingAncestors"?Kt(e)?[]:Fn(e,this._c):[].concat(n),o],c=be(e,r[0],i);let l=c.top,u=c.right,d=c.bottom,g=c.left;for(let m=1;m<r.length;m++){const f=be(e,r[m],i);l=q(f.top,l),u=ut(f.right,u),d=ut(f.bottom,d),g=q(f.left,g)}return{width:u-g,height:d-l,x:g,y:l}}function Wn(t){const{width:e,height:n}=Fe(t);return{width:e,height:n}}function Bn(t,e,n){const o=dt(e),i=ot(e),s=n==="fixed",r=st(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const l=K(0);if((o||!s)&&((Gt(e)!=="body"||Me(i))&&(c=Bt(e)),o)){const m=st(e,!0,s,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}!o&&i&&(l.x=Ht(i));const u=i&&!o&&!s?We(i,c):K(0),d=r.left+c.scrollLeft-l.x-u.x,g=r.top+c.scrollTop-l.y-u.y;return{x:d,y:g,width:r.width,height:r.height}}function Xt(t){return et(t).position==="static"}function ve(t,e){if(!dt(t)||et(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return ot(t)===n&&(n=n.ownerDocument.body),n}function Be(t,e){const n=U(t);if(Kt(t))return n;if(!dt(t)){let i=Dt(t);for(;i&&!Yt(i);){if(G(i)&&!Xt(i))return i;i=Dt(i)}return n}let o=ve(t,e);for(;o&&Qe(o)&&Xt(o);)o=ve(o,e);return o&&Yt(o)&&Xt(o)&&!Pe(o)?n:o||Ze(t)||n}const Hn=async function(t){const e=this.getOffsetParent||Be,n=this.getDimensions,o=await n(t.floating);return{reference:Bn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Vn(t){return et(t).direction==="rtl"}const _n={convertOffsetParentRelativeRectToViewportRelativeRect:Pn,getDocumentElement:ot,getClippingRect:kn,getOffsetParent:Be,getElementRects:Hn,getClientRects:Mn,getDimensions:Wn,getScale:at,isElement:G,isRTL:Vn};function He(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function In(t,e,n){let o=null,i;const s=ot(t);function r(){var d;clearTimeout(i),(d=o)==null||d.disconnect(),o=null}function c(d,g){d===void 0&&(d=!1),g===void 0&&(g=1),r();const m=t.getBoundingClientRect(),{left:f,top:a,width:p,height:h}=m;if(d||e(),!p||!h)return;const x=Lt(a),w=Lt(s.clientWidth-(f+p)),b=Lt(s.clientHeight-(a+h)),y=Lt(f),v={rootMargin:-x+"px "+-w+"px "+-b+"px "+-y+"px",threshold:q(0,ut(1,g))||1};let C=!0;function E(k){const P=k[0].intersectionRatio;if(!He(m,t.getBoundingClientRect()))return c();if(P!==g){if(!C)return c();P?c(!1,P):i=setTimeout(()=>{c(!1,1e-7)},1e3)}C=!1}try{o=new IntersectionObserver(E,{...v,root:s.ownerDocument})}catch{o=new IntersectionObserver(E,v)}o.observe(t)}const l=U(t),u=()=>c(n);return l.addEventListener("resize",u),c(!0),()=>{l.removeEventListener("resize",u),r()}}function Re(t,e,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,u=te(t),d=i||s?[...u?Ut(u):[],...e?Ut(e):[]]:[];d.forEach(x=>{i&&x.addEventListener("scroll",n),s&&x.addEventListener("resize",n)});const g=u&&c?In(u,n,s):null;let m=-1,f=null;r&&(f=new ResizeObserver(x=>{let[w]=x;w&&w.target===u&&f&&e&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(e)})),n()}),u&&!l&&f.observe(u),e&&f.observe(e));let a,p=l?st(t):null;l&&h();function h(){const x=st(t);p&&!He(p,x)&&n(),p=x,a=requestAnimationFrame(h)}return n(),()=>{var x;d.forEach(w=>{i&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),g?.(),(x=f)==null||x.disconnect(),f=null,l&&cancelAnimationFrame(a)}}const zn=Rn,Nn=An,Xn=bn,jn=Sn,Yn=On,Un=(t,e,n)=>{const o=new Map,i=n??{},s={..._n,...i.platform,_c:o};return yn(t,e,{...i,platform:s})};var qn=typeof document<"u",Kn=function(){},Tt=qn?R.useLayoutEffect:Kn;function Wt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!Wt(t[o],e[o]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,i[o]))return!1;for(o=n;o--!==0;){const s=i[o];if(!(s==="_owner"&&t.$$typeof)&&!Wt(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function Ve(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ae(t,e){const n=Ve(t);return Math.round(e*n)/n}function jt(t){const e=R.useRef(t);return Tt(()=>{e.current=t}),e}function Gn(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:r}={},transform:c=!0,whileElementsMounted:l,open:u}=t,[d,g]=R.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,f]=R.useState(o);Wt(m,o)||f(o);const[a,p]=R.useState(null),[h,x]=R.useState(null),w=R.useCallback(A=>{A!==v.current&&(v.current=A,p(A))},[]),b=R.useCallback(A=>{A!==C.current&&(C.current=A,x(A))},[]),y=s||a,O=r||h,v=R.useRef(null),C=R.useRef(null),E=R.useRef(d),k=l!=null,P=jt(l),W=jt(i),z=jt(u),D=R.useCallback(()=>{if(!v.current||!C.current)return;const A={placement:e,strategy:n,middleware:m};W.current&&(A.platform=W.current),Un(v.current,C.current,A).then(T=>{const X={...T,isPositioned:z.current!==!1};$.current&&!Wt(E.current,X)&&(E.current=X,tn.flushSync(()=>{g(X)}))})},[m,e,n,W,z]);Tt(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,g(A=>({...A,isPositioned:!1})))},[u]);const $=R.useRef(!1);Tt(()=>($.current=!0,()=>{$.current=!1}),[]),Tt(()=>{if(y&&(v.current=y),O&&(C.current=O),y&&O){if(P.current)return P.current(y,O,D);D()}},[y,O,D,P,k]);const F=R.useMemo(()=>({reference:v,floating:C,setReference:w,setFloating:b}),[w,b]),L=R.useMemo(()=>({reference:y,floating:O}),[y,O]),N=R.useMemo(()=>{const A={position:n,left:0,top:0};if(!L.floating)return A;const T=Ae(L.floating,d.x),X=Ae(L.floating,d.y);return c?{...A,transform:"translate("+T+"px, "+X+"px)",...Ve(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:X}},[n,c,L.floating,d.x,d.y]);return R.useMemo(()=>({...d,update:D,refs:F,elements:L,floatingStyles:N}),[d,D,F,L,N])}const Jn=(t,e)=>{const n=zn(t);return{name:n.name,fn:n.fn,options:[t,e]}},Qn=(t,e)=>{const n=Nn(t);return{name:n.name,fn:n.fn,options:[t,e]}},Zn=(t,e)=>({fn:Yn(t).fn,options:[t,e]}),to=(t,e)=>{const n=Xn(t);return{name:n.name,fn:n.fn,options:[t,e]}},eo=(t,e)=>{const n=jn(t);return{name:n.name,fn:n.fn,options:[t,e]}};function no(t){const{nodeId:e,externalTree:n,rootContext:o}=t,i=o.useState("referenceElement"),s=o.useState("floatingElement"),r=o.useState("domReferenceElement"),c=o.useState("open"),l=o.useState("floatingId"),[u,d]=R.useState(null),g=R.useRef(null),m=cn(n),f=R.useMemo(()=>({reference:i,floating:s,domReference:r}),[i,s,r]),a=Gn({...t,elements:{...f,...u&&{reference:u}}}),p=R.useCallback(b=>{const y=G(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),getClientRects:()=>b.getClientRects(),contextElement:b}:b;d(y),a.refs.setReference(y)},[a.refs]),h=R.useMemo(()=>({...a.refs,setPositionReference:p,domReference:g}),[a.refs,p]),x=R.useMemo(()=>({...a.elements,domReference:r}),[a.elements,r]),w=R.useMemo(()=>({...a,dataRef:o.context.dataRef,open:c,onOpenChange:o.setOpen,events:o.context.events,floatingId:l,refs:h,elements:x,nodeId:e,rootStore:o}),[a,h,x,e,o,c,l]);return wt(()=>{r&&(g.current=r)},[r]),wt(()=>{o.context.dataRef.current.floatingContext=w;const b=m?.nodesRef.current.find(y=>y.id===e);b&&(b.context=w)}),R.useMemo(()=>({...a,context:w,refs:h,elements:x,rootStore:o}),[a,h,x,w,o])}const oo=R.createContext(void 0);function io(){return R.useContext(oo)?.direction??"ltr"}const so=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:s,platform:r,elements:c,middlewareData:l}=e,{element:u,padding:d=0}=nt(t,e)||{};if(u==null)return{};const g=De(d),m={x:n,y:o},f=Zt(i),a=Qt(f),p=await r.getDimensions(u),h=f==="y",x=h?"top":"left",w=h?"bottom":"right",b=h?"clientHeight":"clientWidth",y=s.reference[a]+s.reference[f]-m[f]-s.floating[a],O=m[f]-s.reference[f],v=c.floating[b]||s.floating[a],C=y/2-O/2,E=v/2-p[a]/2-1,k=Math.min(g[x],E),P=Math.min(g[w],E),W=k,z=v-p[a]-P,D=v/2-p[a]/2+C,$=Te(W,D,z),F=!l.arrow&&Y(i)!=null&&D!==$&&s.reference[a]/2-(D<W?k:P)-p[a]/2<0,L=F?D<W?D-W:D-z:0;return{[f]:m[f]+L,data:{[f]:$,centerOffset:D-$-L,...F&&{alignmentOffset:L}},reset:F}}}),ro=(t,e)=>{const{name:n,fn:o}=so(t);return{name:n,fn:o,options:[t,e]}},co={name:"hide",async fn(t){const{width:e,height:n,x:o,y:i}=t.rects.reference,s=e===0&&n===0&&o===0&&i===0,r=await t.platform.detectOverflow(t,{elementContext:"reference"});return{data:{referenceHidden:r.top-n>=0||r.right-e>=0||r.bottom-n>=0||r.left-e>=0||s}}}},lo={sideX:"left",sideY:"top"},fo="--available-width",ao="--available-height",uo="--anchor-width",mo="--anchor-height",go="--transform-origin",Oe=fo,Se=ao;function _e(t,e,n){const o=t==="inline-start"||t==="inline-end";return{top:"top",right:o?n?"inline-start":"inline-end":"right",bottom:"bottom",left:o?n?"inline-end":"inline-start":"left"}[e]}function Ce(t,e,n){const{rects:o,placement:i}=t;return{side:_e(e,V(i),n),align:Y(i)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function yo(t){return ho(t,no)}function ho(t,e){const{anchor:n,positionMethod:o="absolute",side:i="bottom",sideOffset:s=0,align:r="center",alignOffset:c=0,collisionBoundary:l,collisionPadding:u=5,sticky:d=!1,arrowPadding:g=5,disableAnchorTracking:m=!1,inline:f,keepMounted:a=!1,floatingRootContext:p,mounted:h,collisionAvoidance:x,shift:w,nodeId:b,adaptiveOrigin:y,lazyFlip:O=!1,externalTree:v}=t,C=x.side||"flip",E=x.align||"flip",k=x.fallbackAxisSide||"end",P=w?.crossAxis??!1,W=w?.rootBoundary,z=typeof n=="function"?n:void 0,D=en(z),$=z?D:n,F=Mt(n),L=Mt(h),A=io()==="rtl",[T,X]=R.useState(null);!h&&T!==null&&X(null);const Vt=O==="placement",Ie=T?V(T):null,ze=T&&Vt?Y(T)||"center":null,yt=Ie||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":A?"left":"right","inline-start":A?"right":"left"}[i],mt=ze||r,Ne=mt==="center"?yt:`${yt}-${mt}`;let M=u;typeof M=="number"?M={top:M,right:M,bottom:M,left:M}:M&&(M={top:M.top||0,right:M.right||0,bottom:M.bottom||0,left:M.left||0});const J=1,Xe=i==="bottom"?J:0,je=i==="top"?J:0,Ye=i==="right"?J:0,Ue=i==="left"?J:0,bt={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:M},it=R.useRef(null),_t=Mt(s),It=Mt(c),qe=typeof s!="function"?s:0,Ke=typeof c!="function"?c:0,rt=[];f&&rt.push(f),rt.push(Jn(S=>{const H=Ce(S,i,A),_=typeof _t.current=="function"?_t.current(H):_t.current,B=typeof It.current=="function"?It.current(H):It.current;return{mainAxis:_,crossAxis:B,alignmentAxis:B}},[qe,Ke,A,i]));const ee=E==="none"&&C!=="shift",ne=!ee&&(d||P||C==="shift"),oe=C==="none"?null:to({...bt,padding:{top:M.top+J+Xe,right:M.right+J+Ue,bottom:M.bottom+J+je,left:M.left+J+Ye},mainAxis:!P&&C==="flip",crossAxis:E==="flip"?"alignment":!1,fallbackAxisSideDirection:k}),ie=ee?null:Qn({...bt,rootBoundary:W,mainAxis:E!=="none",crossAxis:ne,limiter:d||P?void 0:Zn(S=>{if(!it.current)return{};const{width:H,height:_}=it.current.getBoundingClientRect(),B=I(V(S.placement)),Z=B==="y"?H:_,j=B==="y"?M.left+M.right:M.top+M.bottom;return{offset:Z/2+j/2}})},[bt,d,P,W,M,E]);C==="shift"||E==="shift"||mt==="center"?rt.push(ie,oe):rt.push(oe,ie),rt.push(eo({...bt,apply({elements:{floating:S},availableWidth:H,availableHeight:_,rects:B}){if(!L.current)return;const Z=S.style;Z.setProperty(Oe,`${H}px`),Z.setProperty(Se,`${_}px`);const j=U(S).devicePixelRatio||1,{x:Ct,y:ft,width:Et,height:tt}=B.reference,pt=(Math.round((Ct+Et)*j)-Math.round(Ct*j))/j,xt=(Math.round((ft+tt)*j)-Math.round(ft*j))/j;Z.setProperty(uo,`${pt}px`),Z.setProperty(mo,`${xt}px`)}}),ro(S=>({element:it.current||nn(S.elements.floating).createElement("div"),padding:it.current?g:0}),[g]),{name:"transformOrigin",fn(S){const{elements:{floating:H},middlewareData:_,placement:B,platform:Z,rects:j,y:Ct}=S,ft=V(B),Et=Y(B),tt=I(ft)==="y",pt=it.current,xt=typeof s=="function"?s(Ce(S,i,A)):s;let Pt;if(!pt&&Et&&Math.abs(tt?_.shift?.x||0:_.shift?.y||0)<=1)Pt=Et==="start"===(tt&&Z.isRTL?.(H)===!0)?"100%":"0%";else{const Ge=tt?_.arrow?.x||0:_.arrow?.y||0,Je=tt?pt?.clientWidth||0:pt?.clientHeight||0;Pt=`${Ge+Je/2}px`}let Nt=ft==="top"||ft==="left"?`calc(100% + ${xt}px)`:`${-xt}px`;return ne&&tt&&Math.abs(_.shift?.y||0)>xt&&(Nt=`${j.reference.y+j.reference.height/2-Ct}px`),H.style.setProperty(go,tt?`${Pt} ${Nt}`:`${Nt} ${Pt}`),{}}},co,y),wt(()=>{!h&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,p]);const zt=R.useMemo(()=>({ancestorScroll:!m,elementResize:!m&&typeof ResizeObserver<"u",layoutShift:!m&&typeof IntersectionObserver<"u"}),[m]),{refs:ct,elements:gt,x:se,y:re,middlewareData:lt,update:vt,placement:Rt,context:ce,isPositioned:Q,floatingStyles:le}=e({rootContext:p,open:a?h:void 0,placement:Ne,middleware:rt,strategy:o,whileElementsMounted:a?void 0:(...S)=>Re(...S,zt),nodeId:b,externalTree:v}),{sideX:fe,sideY:ae}=lt.adaptiveOrigin||lo,At=Q?o:"fixed",ue=R.useMemo(()=>{let S;return Q?y?S={position:At,[fe]:se,[ae]:re}:S={...le,position:At}:S={position:At,top:0,left:0},S[Oe]="100vw",S[Se]="100vh",Q||(S.opacity=0),S},[y,At,fe,se,ae,re,le,Q]),Ot=R.useRef(null);wt(()=>{if(!h)return;const S=F.current,H=typeof S=="function"?S():S,B=(Ee(H)?H.current:H)||null||null;B!==Ot.current&&(ct.setPositionReference(B),Ot.current=B)},[h,ct,$,F]),R.useEffect(()=>{if(!h)return;const S=F.current;typeof S!="function"&&Ee(S)&&S.current!==Ot.current&&(ct.setPositionReference(S.current),Ot.current=S.current)},[h,ct,$,F]),R.useEffect(()=>{if(a&&h&>.reference&>.floating)return Re(gt.reference,gt.floating,vt,zt)},[a,h,gt,vt,zt]);const ht=V(Rt),de=_e(i,ht,A),St=Y(Rt)||"center",me=!!lt.hide?.referenceHidden;wt(()=>{O&&h&&Q&&(ht!==yt||Vt&&St!==mt)&&X(Rt)},[O,Vt,h,Q,Rt,ht,St,yt,mt]);const ge=R.useMemo(()=>({position:"absolute",top:lt.arrow?.y,left:lt.arrow?.x}),[lt.arrow]),he=lt.arrow?.centerOffset!==0;return R.useMemo(()=>({positionerStyles:ue,arrowStyles:ge,arrowRef:it,arrowUncentered:he,side:de,align:St,physicalSide:ht,anchorHidden:me,refs:ct,context:ce,isPositioned:Q,update:vt}),[ue,ge,it,he,de,St,ht,me,ct,ce,Q,vt])}function Ee(t){return t!=null&&"current"in t}function po(t){return t==="starting"?on:sn}function bo(t,e,{styles:n,transitionStatus:o,props:i,refs:s,hidden:r,inert:c=!1}){const l={...n};return c&&(l.pointerEvents="none"),rn("div",t,{state:e,ref:s,props:[{role:"presentation",hidden:r,style:l},po(o),i],stateAttributesMapping:ln})}export{bo as a,io as b,po as g,_n as p,kt as r,yo as u};
|
|
1
|
+
import{b3 as G,bm as ot,bn as dt,bo as et,bp as U,bq as Kt,br as Dt,bs as Yt,bt as Qe,bu as Pe,bv as Ze,bw as Gt,bx as Me,by as Bt,bz as Ut,bA as pe,bB as Le,r as R,as as tn,b2 as wt,b1 as en,b4 as nn,bC as on,K as sn,J as rn}from"./__vite-browser-external-CkF0pdTJ.js";import{a as cn,c as Mt,p as ln}from"./composite-BHisG82k.js";const ut=Math.min,q=Math.max,$t=Math.round,Lt=Math.floor,K=t=>({x:t,y:t}),fn={left:"right",right:"left",bottom:"top",top:"bottom"};function Te(t,e,n){return q(t,ut(e,n))}function nt(t,e){return typeof t=="function"?t(e):t}function V(t){return t.split("-")[0]}function Y(t){return t.split("-")[1]}function Jt(t){return t==="x"?"y":"x"}function Qt(t){return t==="y"?"height":"width"}function I(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Zt(t){return Jt(I(t))}function an(t,e,n){n===void 0&&(n=!1);const o=Y(t),i=Zt(t),s=Qt(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=Ft(r)),[r,Ft(r)]}function un(t){const e=Ft(t);return[qt(t),e,qt(e)]}function qt(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const xe=["left","right"],we=["right","left"],dn=["top","bottom"],mn=["bottom","top"];function gn(t,e,n){switch(t){case"top":case"bottom":return n?e?we:xe:e?xe:we;case"left":case"right":return e?dn:mn;default:return[]}}function hn(t,e,n,o){const i=Y(t);let s=gn(V(t),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(qt)))),s}function Ft(t){const e=V(t);return fn[e]+t.slice(e.length)}function pn(t){var e,n,o,i;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(i=t.left)!=null?i:0}}function De(t){return typeof t!="number"?pn(t):{top:t,right:t,bottom:t,left:t}}function kt(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function ye(t,e,n){let{reference:o,floating:i}=t;const s=I(e),r=Zt(e),c=Qt(r),l=V(e),u=s==="y",d=o.x+o.width/2-i.width/2,g=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2;let f;switch(l){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:g};break;case"left":f={x:o.x-i.width,y:g};break;default:f={x:o.x,y:o.y}}const a=Y(e);return a&&(f[r]+=m*(a==="end"?1:-1)*(n&&u?-1:1)),f}async function xn(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:s,rects:r,elements:c,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:g="floating",altBoundary:m=!1,padding:f=0}=nt(e,t),a=De(f),h=c[m?g==="floating"?"reference":"floating":g],x=kt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(h)))==null||n?h:h.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:l})),w=g==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),y=await(s.isElement==null?void 0:s.isElement(b))&&await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1},O=kt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:b,strategy:l}):w);return{top:(x.top-O.top+a.top)/y.y,bottom:(O.bottom-x.bottom+a.bottom)/y.y,left:(x.left-O.left+a.left)/y.x,right:(O.right-x.right+a.right)/y.x}}const wn=50,yn=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=r.detectOverflow?r:{...r,detectOverflow:xn},l=await(r.isRTL==null?void 0:r.isRTL(e));let u=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:g}=ye(u,o,l),m=o,f=0;const a={};for(let p=0;p<s.length;p++){const h=s[p];if(!h)continue;const{name:x,fn:w}=h,{x:b,y,data:O,reset:v}=await w({x:d,y:g,initialPlacement:o,placement:m,strategy:i,middlewareData:a,rects:u,platform:c,elements:{reference:t,floating:e}});d=b??d,g=y??g,a[x]={...a[x],...O},v&&f<wn&&(f++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(u=v.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:d,y:g}=ye(u,m,l)),p=-1)}return{x:d,y:g,placement:m,strategy:i,middlewareData:a}},bn=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:l,elements:u}=e,{mainAxis:d=!0,crossAxis:g=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:a="none",flipAlignment:p=!0,...h}=nt(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=V(i),w=I(c),b=V(c)===c,y=await(l.isRTL==null?void 0:l.isRTL(u.floating)),O=m||(b||!p?[Ft(c)]:un(c)),v=a!=="none";!m&&v&&O.push(...hn(c,p,a,y));const C=[c,...O],E=await l.detectOverflow(e,h),k=[];let P=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&k.push(E[x]),g){const $=an(i,r,y);k.push(E[$[0]],E[$[1]])}if(P=[...P,{placement:i,overflows:k}],!k.every($=>$<=0)){var W,z;const $=(((W=s.flip)==null?void 0:W.index)||0)+1,F=C[$];if(F&&(!(g==="alignment"?w!==I(F):!1)||P.every(A=>I(A.placement)===w?A.overflows[0]>0:!0)))return{data:{index:$,overflows:P},reset:{placement:F}};let L=(z=P.filter(N=>N.overflows[0]<=0).sort((N,A)=>N.overflows[1]-A.overflows[1])[0])==null?void 0:z.placement;if(!L)switch(f){case"bestFit":{var D;const N=(D=P.filter(A=>{if(v){const T=I(A.placement);return T===w||T==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(T=>T>0).reduce((T,X)=>T+X,0)]).sort((A,T)=>A[1]-T[1])[0])==null?void 0:D[0];N&&(L=N);break}case"initialPlacement":L=c;break}if(i!==L)return{reset:{placement:L}}}return{}}}},$e=new Set(["left","top"]);async function vn(t,e){const{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=V(n),c=Y(n),l=I(n)==="y",u=$e.has(r)?-1:1,d=s&&l?-1:1,g=nt(e,t);let{mainAxis:m,crossAxis:f,alignmentAxis:a}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return c&&typeof a=="number"&&(f=c==="end"?a*-1:a),l?{x:f*d,y:m*u}:{x:m*u,y:f*d}}const Rn=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:s,placement:r,middlewareData:c}=e,l=await vn(e,t);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}}}}},An=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:s}=e,{mainAxis:r=!0,crossAxis:c=!1,limiter:l={fn:w=>{let{x:b,y}=w;return{x:b,y}}},...u}=nt(t,e),d={x:n,y:o},g=await s.detectOverflow(e,u),m=I(i),f=Jt(m);let a=d[f],p=d[m];const h=(w,b)=>Te(b+g[w==="y"?"top":"left"],b,b-g[w==="y"?"bottom":"right"]);r&&(a=h(f,a)),c&&(p=h(m,p));const x=l.fn({...e,[f]:a,[m]:p});return{...x,data:{x:x.x-n,y:x.y-o,enabled:{[f]:r,[m]:c}}}}}},On=function(t){return t===void 0&&(t={}),{options:t,fn(e){var n,o;const{x:i,y:s,placement:r,rects:c,middlewareData:l}=e,{offset:u=0,mainAxis:d=!0,crossAxis:g=!0}=nt(t,e),m={x:i,y:s},f=I(r),a=Jt(f);let p=m[a],h=m[f];const x=nt(u,e),w=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:(n=x.mainAxis)!=null?n:0,crossAxis:(o=x.crossAxis)!=null?o:0};if(d){const O=a==="y"?"height":"width",v=c.reference[a]-c.floating[O]+w.mainAxis,C=c.reference[a]+c.reference[O]-w.mainAxis;p<v?p=v:p>C&&(p=C)}if(g){var b,y;const O=a==="y"?"width":"height",v=$e.has(V(r)),C=c.reference[f]-c.floating[O]+(v&&((b=l.offset)==null?void 0:b[f])||0)+(v?0:w.crossAxis),E=c.reference[f]+c.reference[O]+(v?0:((y=l.offset)==null?void 0:y[f])||0)-(v?w.crossAxis:0);h<C?h=C:h>E&&(h=E)}return{[a]:p,[f]:h}}}},Sn=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:o,platform:i,elements:s}=e,{apply:r=()=>{},...c}=nt(t,e),l=await i.detectOverflow(e,c),u=V(n),d=Y(n),g=I(n)==="y",{width:m,height:f}=o.floating;let a,p;u==="top"||u==="bottom"?(a=u,p=d===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(p=u,a=d==="end"?"top":"bottom");const h=f-l.top-l.bottom,x=m-l.left-l.right,w=ut(f-l[a],h),b=ut(m-l[p],x),y=e.middlewareData.shift,O=!y;let v=w,C=b;y!=null&&y.enabled.x&&(C=x),y!=null&&y.enabled.y&&(v=h),O&&!d&&(g?C=m-2*q(l.left,l.right):v=f-2*q(l.top,l.bottom)),await r({...e,availableWidth:C,availableHeight:v});const E=await i.getDimensions(s.floating);return m!==E.width||f!==E.height?{reset:{rects:!0}}:{}}}};function Fe(t){const e=et(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=dt(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,c=$t(n)!==s||$t(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function te(t){return G(t)?t:t.contextElement}function at(t){const e=te(t);if(!dt(e))return K(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:s}=Fe(e);let r=(s?$t(n.width):n.width)/o,c=(s?$t(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const Cn=K(0);function ke(t){const e=U(t);return!Le()||!e.visualViewport?Cn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function En(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===U(t)}function st(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=te(t);let r=K(1);e&&(o?G(o)&&(r=at(o)):r=at(t));const c=En(s,n,o)?ke(s):K(0);let l=(i.left+c.x)/r.x,u=(i.top+c.y)/r.y,d=i.width/r.x,g=i.height/r.y;if(s&&o){const m=U(s),f=G(o)?U(o):o;let a=m,p=pe(a);for(;p&&f!==a;){const h=at(p),x=p.getBoundingClientRect(),w=et(p),b=x.left+(p.clientLeft+parseFloat(w.paddingLeft))*h.x,y=x.top+(p.clientTop+parseFloat(w.paddingTop))*h.y;l*=h.x,u*=h.y,d*=h.x,g*=h.y,l+=b,u+=y,a=U(p),p=pe(a)}}return kt({width:d,height:g,x:l,y:u})}function Ht(t,e){const n=Bt(t).scrollLeft;return e?e.left+n:st(ot(t)).left+n}function We(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-Ht(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function Pn(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s=i==="fixed",r=ot(o),c=e?Kt(e.floating):!1;if(o===r||c&&s)return n;let l={scrollLeft:0,scrollTop:0},u=K(1);const d=K(0),g=dt(o);if((g||!s)&&((Gt(o)!=="body"||Me(r))&&(l=Bt(o)),g)){const f=st(o);u=at(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}const m=r&&!g&&!s?We(r,l):K(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+m.x,y:n.y*u.y-l.scrollTop*u.y+d.y+m.y}}function Mn(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Ln(t){const e=Bt(t),n=t.ownerDocument.body,o=q(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=q(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-e.scrollLeft+Ht(t);const r=-e.scrollTop;return et(n).direction==="rtl"&&(s+=q(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:r}}const Tn=25;function Dn(t,e,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",i=U(t),s=ot(t),r=i.visualViewport;let c=s.clientWidth,l=s.clientHeight,u=0,d=0;if(r){const m=!Le()||e==="fixed";o?m||(u=-r.offsetLeft,d=-r.offsetTop):(c=r.width,l=r.height,m&&(u=r.offsetLeft,d=r.offsetTop))}if(Ht(s)<=0){const m=s.ownerDocument,f=m.body,a=getComputedStyle(f),p=m.compatMode==="CSS1Compat"&&parseFloat(a.marginLeft)+parseFloat(a.marginRight)||0,h=Math.abs(s.clientWidth-f.clientWidth-p),x=getComputedStyle(s).scrollbarGutter==="stable both-edges"?h/2:h;x<=Tn&&(c-=x)}return{width:c,height:l,x:u,y:d}}function $n(t,e){const n=st(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=at(t),r=t.clientWidth*s.x,c=t.clientHeight*s.y,l=i*s.x,u=o*s.y;return{width:r,height:c,x:l,y:u}}function be(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=Dn(t,n,e);else if(e==="document")o=Ln(ot(t));else if(G(e))o=$n(e,n);else{const i=ke(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return kt(o)}function Fn(t,e){const n=e.get(t);if(n)return n;let o=Ut(t,[],!1).filter(c=>G(c)&&Gt(c)!=="body"),i=null;const s=et(t).position==="fixed";let r=s?Dt(t):t;for(;G(r)&&!Yt(r);){const c=et(r),l=Pe(r),u=i?i.position:s?"fixed":"";!l&&(u==="fixed"||u==="absolute"&&c.position==="static")?o=o.filter(g=>g!==r):i=c,r=Dt(r)}return e.set(t,o),o}function kn(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[...n==="clippingAncestors"?Kt(e)?[]:Fn(e,this._c):[].concat(n),o],c=be(e,r[0],i);let l=c.top,u=c.right,d=c.bottom,g=c.left;for(let m=1;m<r.length;m++){const f=be(e,r[m],i);l=q(f.top,l),u=ut(f.right,u),d=ut(f.bottom,d),g=q(f.left,g)}return{width:u-g,height:d-l,x:g,y:l}}function Wn(t){const{width:e,height:n}=Fe(t);return{width:e,height:n}}function Bn(t,e,n){const o=dt(e),i=ot(e),s=n==="fixed",r=st(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const l=K(0);if((o||!s)&&((Gt(e)!=="body"||Me(i))&&(c=Bt(e)),o)){const m=st(e,!0,s,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}!o&&i&&(l.x=Ht(i));const u=i&&!o&&!s?We(i,c):K(0),d=r.left+c.scrollLeft-l.x-u.x,g=r.top+c.scrollTop-l.y-u.y;return{x:d,y:g,width:r.width,height:r.height}}function Xt(t){return et(t).position==="static"}function ve(t,e){if(!dt(t)||et(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return ot(t)===n&&(n=n.ownerDocument.body),n}function Be(t,e){const n=U(t);if(Kt(t))return n;if(!dt(t)){let i=Dt(t);for(;i&&!Yt(i);){if(G(i)&&!Xt(i))return i;i=Dt(i)}return n}let o=ve(t,e);for(;o&&Qe(o)&&Xt(o);)o=ve(o,e);return o&&Yt(o)&&Xt(o)&&!Pe(o)?n:o||Ze(t)||n}const Hn=async function(t){const e=this.getOffsetParent||Be,n=this.getDimensions,o=await n(t.floating);return{reference:Bn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Vn(t){return et(t).direction==="rtl"}const _n={convertOffsetParentRelativeRectToViewportRelativeRect:Pn,getDocumentElement:ot,getClippingRect:kn,getOffsetParent:Be,getElementRects:Hn,getClientRects:Mn,getDimensions:Wn,getScale:at,isElement:G,isRTL:Vn};function He(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function In(t,e,n){let o=null,i;const s=ot(t);function r(){var d;clearTimeout(i),(d=o)==null||d.disconnect(),o=null}function c(d,g){d===void 0&&(d=!1),g===void 0&&(g=1),r();const m=t.getBoundingClientRect(),{left:f,top:a,width:p,height:h}=m;if(d||e(),!p||!h)return;const x=Lt(a),w=Lt(s.clientWidth-(f+p)),b=Lt(s.clientHeight-(a+h)),y=Lt(f),v={rootMargin:-x+"px "+-w+"px "+-b+"px "+-y+"px",threshold:q(0,ut(1,g))||1};let C=!0;function E(k){const P=k[0].intersectionRatio;if(!He(m,t.getBoundingClientRect()))return c();if(P!==g){if(!C)return c();P?c(!1,P):i=setTimeout(()=>{c(!1,1e-7)},1e3)}C=!1}try{o=new IntersectionObserver(E,{...v,root:s.ownerDocument})}catch{o=new IntersectionObserver(E,v)}o.observe(t)}const l=U(t),u=()=>c(n);return l.addEventListener("resize",u),c(!0),()=>{l.removeEventListener("resize",u),r()}}function Re(t,e,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,u=te(t),d=i||s?[...u?Ut(u):[],...e?Ut(e):[]]:[];d.forEach(x=>{i&&x.addEventListener("scroll",n),s&&x.addEventListener("resize",n)});const g=u&&c?In(u,n,s):null;let m=-1,f=null;r&&(f=new ResizeObserver(x=>{let[w]=x;w&&w.target===u&&f&&e&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(e)})),n()}),u&&!l&&f.observe(u),e&&f.observe(e));let a,p=l?st(t):null;l&&h();function h(){const x=st(t);p&&!He(p,x)&&n(),p=x,a=requestAnimationFrame(h)}return n(),()=>{var x;d.forEach(w=>{i&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),g?.(),(x=f)==null||x.disconnect(),f=null,l&&cancelAnimationFrame(a)}}const zn=Rn,Nn=An,Xn=bn,jn=Sn,Yn=On,Un=(t,e,n)=>{const o=new Map,i=n??{},s={..._n,...i.platform,_c:o};return yn(t,e,{...i,platform:s})};var qn=typeof document<"u",Kn=function(){},Tt=qn?R.useLayoutEffect:Kn;function Wt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!Wt(t[o],e[o]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,i[o]))return!1;for(o=n;o--!==0;){const s=i[o];if(!(s==="_owner"&&t.$$typeof)&&!Wt(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function Ve(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ae(t,e){const n=Ve(t);return Math.round(e*n)/n}function jt(t){const e=R.useRef(t);return Tt(()=>{e.current=t}),e}function Gn(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:r}={},transform:c=!0,whileElementsMounted:l,open:u}=t,[d,g]=R.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,f]=R.useState(o);Wt(m,o)||f(o);const[a,p]=R.useState(null),[h,x]=R.useState(null),w=R.useCallback(A=>{A!==v.current&&(v.current=A,p(A))},[]),b=R.useCallback(A=>{A!==C.current&&(C.current=A,x(A))},[]),y=s||a,O=r||h,v=R.useRef(null),C=R.useRef(null),E=R.useRef(d),k=l!=null,P=jt(l),W=jt(i),z=jt(u),D=R.useCallback(()=>{if(!v.current||!C.current)return;const A={placement:e,strategy:n,middleware:m};W.current&&(A.platform=W.current),Un(v.current,C.current,A).then(T=>{const X={...T,isPositioned:z.current!==!1};$.current&&!Wt(E.current,X)&&(E.current=X,tn.flushSync(()=>{g(X)}))})},[m,e,n,W,z]);Tt(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,g(A=>({...A,isPositioned:!1})))},[u]);const $=R.useRef(!1);Tt(()=>($.current=!0,()=>{$.current=!1}),[]),Tt(()=>{if(y&&(v.current=y),O&&(C.current=O),y&&O){if(P.current)return P.current(y,O,D);D()}},[y,O,D,P,k]);const F=R.useMemo(()=>({reference:v,floating:C,setReference:w,setFloating:b}),[w,b]),L=R.useMemo(()=>({reference:y,floating:O}),[y,O]),N=R.useMemo(()=>{const A={position:n,left:0,top:0};if(!L.floating)return A;const T=Ae(L.floating,d.x),X=Ae(L.floating,d.y);return c?{...A,transform:"translate("+T+"px, "+X+"px)",...Ve(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:X}},[n,c,L.floating,d.x,d.y]);return R.useMemo(()=>({...d,update:D,refs:F,elements:L,floatingStyles:N}),[d,D,F,L,N])}const Jn=(t,e)=>{const n=zn(t);return{name:n.name,fn:n.fn,options:[t,e]}},Qn=(t,e)=>{const n=Nn(t);return{name:n.name,fn:n.fn,options:[t,e]}},Zn=(t,e)=>({fn:Yn(t).fn,options:[t,e]}),to=(t,e)=>{const n=Xn(t);return{name:n.name,fn:n.fn,options:[t,e]}},eo=(t,e)=>{const n=jn(t);return{name:n.name,fn:n.fn,options:[t,e]}};function no(t){const{nodeId:e,externalTree:n,rootContext:o}=t,i=o.useState("referenceElement"),s=o.useState("floatingElement"),r=o.useState("domReferenceElement"),c=o.useState("open"),l=o.useState("floatingId"),[u,d]=R.useState(null),g=R.useRef(null),m=cn(n),f=R.useMemo(()=>({reference:i,floating:s,domReference:r}),[i,s,r]),a=Gn({...t,elements:{...f,...u&&{reference:u}}}),p=R.useCallback(b=>{const y=G(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),getClientRects:()=>b.getClientRects(),contextElement:b}:b;d(y),a.refs.setReference(y)},[a.refs]),h=R.useMemo(()=>({...a.refs,setPositionReference:p,domReference:g}),[a.refs,p]),x=R.useMemo(()=>({...a.elements,domReference:r}),[a.elements,r]),w=R.useMemo(()=>({...a,dataRef:o.context.dataRef,open:c,onOpenChange:o.setOpen,events:o.context.events,floatingId:l,refs:h,elements:x,nodeId:e,rootStore:o}),[a,h,x,e,o,c,l]);return wt(()=>{r&&(g.current=r)},[r]),wt(()=>{o.context.dataRef.current.floatingContext=w;const b=m?.nodesRef.current.find(y=>y.id===e);b&&(b.context=w)}),R.useMemo(()=>({...a,context:w,refs:h,elements:x,rootStore:o}),[a,h,x,w,o])}const oo=R.createContext(void 0);function io(){return R.useContext(oo)?.direction??"ltr"}const so=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:s,platform:r,elements:c,middlewareData:l}=e,{element:u,padding:d=0}=nt(t,e)||{};if(u==null)return{};const g=De(d),m={x:n,y:o},f=Zt(i),a=Qt(f),p=await r.getDimensions(u),h=f==="y",x=h?"top":"left",w=h?"bottom":"right",b=h?"clientHeight":"clientWidth",y=s.reference[a]+s.reference[f]-m[f]-s.floating[a],O=m[f]-s.reference[f],v=c.floating[b]||s.floating[a],C=y/2-O/2,E=v/2-p[a]/2-1,k=Math.min(g[x],E),P=Math.min(g[w],E),W=k,z=v-p[a]-P,D=v/2-p[a]/2+C,$=Te(W,D,z),F=!l.arrow&&Y(i)!=null&&D!==$&&s.reference[a]/2-(D<W?k:P)-p[a]/2<0,L=F?D<W?D-W:D-z:0;return{[f]:m[f]+L,data:{[f]:$,centerOffset:D-$-L,...F&&{alignmentOffset:L}},reset:F}}}),ro=(t,e)=>{const{name:n,fn:o}=so(t);return{name:n,fn:o,options:[t,e]}},co={name:"hide",async fn(t){const{width:e,height:n,x:o,y:i}=t.rects.reference,s=e===0&&n===0&&o===0&&i===0,r=await t.platform.detectOverflow(t,{elementContext:"reference"});return{data:{referenceHidden:r.top-n>=0||r.right-e>=0||r.bottom-n>=0||r.left-e>=0||s}}}},lo={sideX:"left",sideY:"top"},fo="--available-width",ao="--available-height",uo="--anchor-width",mo="--anchor-height",go="--transform-origin",Oe=fo,Se=ao;function _e(t,e,n){const o=t==="inline-start"||t==="inline-end";return{top:"top",right:o?n?"inline-start":"inline-end":"right",bottom:"bottom",left:o?n?"inline-end":"inline-start":"left"}[e]}function Ce(t,e,n){const{rects:o,placement:i}=t;return{side:_e(e,V(i),n),align:Y(i)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function yo(t){return ho(t,no)}function ho(t,e){const{anchor:n,positionMethod:o="absolute",side:i="bottom",sideOffset:s=0,align:r="center",alignOffset:c=0,collisionBoundary:l,collisionPadding:u=5,sticky:d=!1,arrowPadding:g=5,disableAnchorTracking:m=!1,inline:f,keepMounted:a=!1,floatingRootContext:p,mounted:h,collisionAvoidance:x,shift:w,nodeId:b,adaptiveOrigin:y,lazyFlip:O=!1,externalTree:v}=t,C=x.side||"flip",E=x.align||"flip",k=x.fallbackAxisSide||"end",P=w?.crossAxis??!1,W=w?.rootBoundary,z=typeof n=="function"?n:void 0,D=en(z),$=z?D:n,F=Mt(n),L=Mt(h),A=io()==="rtl",[T,X]=R.useState(null);!h&&T!==null&&X(null);const Vt=O==="placement",Ie=T?V(T):null,ze=T&&Vt?Y(T)||"center":null,yt=Ie||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":A?"left":"right","inline-start":A?"right":"left"}[i],mt=ze||r,Ne=mt==="center"?yt:`${yt}-${mt}`;let M=u;typeof M=="number"?M={top:M,right:M,bottom:M,left:M}:M&&(M={top:M.top||0,right:M.right||0,bottom:M.bottom||0,left:M.left||0});const J=1,Xe=i==="bottom"?J:0,je=i==="top"?J:0,Ye=i==="right"?J:0,Ue=i==="left"?J:0,bt={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:M},it=R.useRef(null),_t=Mt(s),It=Mt(c),qe=typeof s!="function"?s:0,Ke=typeof c!="function"?c:0,rt=[];f&&rt.push(f),rt.push(Jn(S=>{const H=Ce(S,i,A),_=typeof _t.current=="function"?_t.current(H):_t.current,B=typeof It.current=="function"?It.current(H):It.current;return{mainAxis:_,crossAxis:B,alignmentAxis:B}},[qe,Ke,A,i]));const ee=E==="none"&&C!=="shift",ne=!ee&&(d||P||C==="shift"),oe=C==="none"?null:to({...bt,padding:{top:M.top+J+Xe,right:M.right+J+Ue,bottom:M.bottom+J+je,left:M.left+J+Ye},mainAxis:!P&&C==="flip",crossAxis:E==="flip"?"alignment":!1,fallbackAxisSideDirection:k}),ie=ee?null:Qn({...bt,rootBoundary:W,mainAxis:E!=="none",crossAxis:ne,limiter:d||P?void 0:Zn(S=>{if(!it.current)return{};const{width:H,height:_}=it.current.getBoundingClientRect(),B=I(V(S.placement)),Z=B==="y"?H:_,j=B==="y"?M.left+M.right:M.top+M.bottom;return{offset:Z/2+j/2}})},[bt,d,P,W,M,E]);C==="shift"||E==="shift"||mt==="center"?rt.push(ie,oe):rt.push(oe,ie),rt.push(eo({...bt,apply({elements:{floating:S},availableWidth:H,availableHeight:_,rects:B}){if(!L.current)return;const Z=S.style;Z.setProperty(Oe,`${H}px`),Z.setProperty(Se,`${_}px`);const j=U(S).devicePixelRatio||1,{x:Ct,y:ft,width:Et,height:tt}=B.reference,pt=(Math.round((Ct+Et)*j)-Math.round(Ct*j))/j,xt=(Math.round((ft+tt)*j)-Math.round(ft*j))/j;Z.setProperty(uo,`${pt}px`),Z.setProperty(mo,`${xt}px`)}}),ro(S=>({element:it.current||nn(S.elements.floating).createElement("div"),padding:it.current?g:0}),[g]),{name:"transformOrigin",fn(S){const{elements:{floating:H},middlewareData:_,placement:B,platform:Z,rects:j,y:Ct}=S,ft=V(B),Et=Y(B),tt=I(ft)==="y",pt=it.current,xt=typeof s=="function"?s(Ce(S,i,A)):s;let Pt;if(!pt&&Et&&Math.abs(tt?_.shift?.x||0:_.shift?.y||0)<=1)Pt=Et==="start"===(tt&&Z.isRTL?.(H)===!0)?"100%":"0%";else{const Ge=tt?_.arrow?.x||0:_.arrow?.y||0,Je=tt?pt?.clientWidth||0:pt?.clientHeight||0;Pt=`${Ge+Je/2}px`}let Nt=ft==="top"||ft==="left"?`calc(100% + ${xt}px)`:`${-xt}px`;return ne&&tt&&Math.abs(_.shift?.y||0)>xt&&(Nt=`${j.reference.y+j.reference.height/2-Ct}px`),H.style.setProperty(go,tt?`${Pt} ${Nt}`:`${Nt} ${Pt}`),{}}},co,y),wt(()=>{!h&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,p]);const zt=R.useMemo(()=>({ancestorScroll:!m,elementResize:!m&&typeof ResizeObserver<"u",layoutShift:!m&&typeof IntersectionObserver<"u"}),[m]),{refs:ct,elements:gt,x:se,y:re,middlewareData:lt,update:vt,placement:Rt,context:ce,isPositioned:Q,floatingStyles:le}=e({rootContext:p,open:a?h:void 0,placement:Ne,middleware:rt,strategy:o,whileElementsMounted:a?void 0:(...S)=>Re(...S,zt),nodeId:b,externalTree:v}),{sideX:fe,sideY:ae}=lt.adaptiveOrigin||lo,At=Q?o:"fixed",ue=R.useMemo(()=>{let S;return Q?y?S={position:At,[fe]:se,[ae]:re}:S={...le,position:At}:S={position:At,top:0,left:0},S[Oe]="100vw",S[Se]="100vh",Q||(S.opacity=0),S},[y,At,fe,se,ae,re,le,Q]),Ot=R.useRef(null);wt(()=>{if(!h)return;const S=F.current,H=typeof S=="function"?S():S,B=(Ee(H)?H.current:H)||null||null;B!==Ot.current&&(ct.setPositionReference(B),Ot.current=B)},[h,ct,$,F]),R.useEffect(()=>{if(!h)return;const S=F.current;typeof S!="function"&&Ee(S)&&S.current!==Ot.current&&(ct.setPositionReference(S.current),Ot.current=S.current)},[h,ct,$,F]),R.useEffect(()=>{if(a&&h&>.reference&>.floating)return Re(gt.reference,gt.floating,vt,zt)},[a,h,gt,vt,zt]);const ht=V(Rt),de=_e(i,ht,A),St=Y(Rt)||"center",me=!!lt.hide?.referenceHidden;wt(()=>{O&&h&&Q&&(ht!==yt||Vt&&St!==mt)&&X(Rt)},[O,Vt,h,Q,Rt,ht,St,yt,mt]);const ge=R.useMemo(()=>({position:"absolute",top:lt.arrow?.y,left:lt.arrow?.x}),[lt.arrow]),he=lt.arrow?.centerOffset!==0;return R.useMemo(()=>({positionerStyles:ue,arrowStyles:ge,arrowRef:it,arrowUncentered:he,side:de,align:St,physicalSide:ht,anchorHidden:me,refs:ct,context:ce,isPositioned:Q,update:vt}),[ue,ge,it,he,de,St,ht,me,ct,ce,Q,vt])}function Ee(t){return t!=null&&"current"in t}function po(t){return t==="starting"?on:sn}function bo(t,e,{styles:n,transitionStatus:o,props:i,refs:s,hidden:r,inert:c=!1}){const l={...n};return c&&(l.pointerEvents="none"),rn("div",t,{state:e,ref:s,props:[{role:"presentation",hidden:r,style:l},po(o),i],stateAttributesMapping:ln})}export{bo as a,io as b,po as g,_n as p,kt as r,yo as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,T as r,k as n,l as s,m as a,n as T}from"./__vite-browser-external-
|
|
1
|
+
import{r as e,T as r,k as n,l as s,m as a,n as T}from"./__vite-browser-external-CkF0pdTJ.js";const m=Object.freeze({mode:s.COMPACT,setMode:()=>{},grouping:n.THOUSAND,setGrouping:()=>{},formatTokens:(o,t={})=>T(o,t),formatTokensTooltip:(o,t={})=>a(o,t)});function O(){return e.useContext(r)??m}export{O as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o}from"./__vite-browser-external-
|
|
1
|
+
import{o}from"./__vite-browser-external-CkF0pdTJ.js";const a={name:"zap",size:24,node:[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]]};a.node;const n=o(a);export{n as Z};
|
|
@@ -276,7 +276,7 @@
|
|
|
276
276
|
]
|
|
277
277
|
}
|
|
278
278
|
</script>
|
|
279
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
279
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-CkF0pdTJ.js"></script>
|
|
280
280
|
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-D-6XhI1J.css">
|
|
281
281
|
</head>
|
|
282
282
|
<body>
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
]
|
|
165
165
|
}
|
|
166
166
|
</script>
|
|
167
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
167
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-CkF0pdTJ.js"></script>
|
|
168
168
|
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-D-6XhI1J.css">
|
|
169
169
|
</head>
|
|
170
170
|
<body>
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
]
|
|
136
136
|
}
|
|
137
137
|
</script>
|
|
138
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
138
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-CkF0pdTJ.js"></script>
|
|
139
139
|
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-D-6XhI1J.css">
|
|
140
140
|
</head>
|
|
141
141
|
<body>
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"description": "Shareable Token Tracker dashboard snapshot."
|
|
76
76
|
}
|
|
77
77
|
</script>
|
|
78
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
78
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-CkF0pdTJ.js"></script>
|
|
79
79
|
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-D-6XhI1J.css">
|
|
80
80
|
</head>
|
|
81
81
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tokentracker-cli",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.15",
|
|
4
4
|
"description": "Local-first AI coding token usage and cost tracker for 47 tools, with a dashboard, desktop pet, widgets, achievements, and native macOS/Windows apps.",
|
|
5
5
|
"main": "src/cli.js",
|
|
6
6
|
"bin": {
|
package/src/commands/sync.js
CHANGED
|
@@ -1854,7 +1854,7 @@ async function cmdSync(argv, context = {}) {
|
|
|
1854
1854
|
if (sourceAllowed("dsh")) {
|
|
1855
1855
|
await migrateLegacyDeepseekHarnessSource({ cursors, queuePath, queueStatePath });
|
|
1856
1856
|
const dshSessionFiles = await resolveDshSessionFiles(process.env);
|
|
1857
|
-
if (dshSessionFiles.length > 0) {
|
|
1857
|
+
if (dshSessionFiles.length > 0 || cursors.dsh) {
|
|
1858
1858
|
if (progress?.enabled) {
|
|
1859
1859
|
progress.start(
|
|
1860
1860
|
`Parsing DeepSeek Harness ${renderBar(0)} 0/${formatNumber(
|
|
@@ -1873,7 +1873,7 @@ async function cmdSync(argv, context = {}) {
|
|
|
1873
1873
|
warnProviderParseFailure(
|
|
1874
1874
|
"DeepSeek Harness",
|
|
1875
1875
|
new Error(
|
|
1876
|
-
`${dshResult.deferredMigrations} artifact migration(s) deferred; inspect cursors.dsh.deferredMigrations
|
|
1876
|
+
`${dshResult.deferredMigrations} accounting repair/artifact migration(s) deferred; inspect cursors.dsh.deferredMigrations, restore unavailable history or complete the replacement, then retry`,
|
|
1877
1877
|
),
|
|
1878
1878
|
opts,
|
|
1879
1879
|
);
|