tokentracker-cli 0.83.7 → 0.83.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dashboard/dist/assets/{AchievementBadge-DmDyXJAz.js → AchievementBadge-CVhNHKpb.js} +1 -1
  2. package/dashboard/dist/assets/{AchievementsPage-BMfTuXqd.js → AchievementsPage-CgbG_gTv.js} +2 -2
  3. package/dashboard/dist/assets/{AchievementsSection-Dn9Wk4pP.js → AchievementsSection-Bx6vFwQz.js} +1 -1
  4. package/dashboard/dist/assets/{BadgeDetailModal-BiOuKQet.js → BadgeDetailModal-Usvl2n6F.js} +1 -1
  5. package/dashboard/dist/assets/{Card-WA_W0aUg.js → Card-B53Y04fc.js} +1 -1
  6. package/dashboard/dist/assets/{ClawdAnimated-BINDhx9z.js → ClawdAnimated-BmA7XPg6.js} +1 -1
  7. package/dashboard/dist/assets/{CommandPalette-DPtrs3eZ.js → CommandPalette-DoPxESGz.js} +1 -1
  8. package/dashboard/dist/assets/{CommunityStatsModal-C1sZ3KwZ.js → CommunityStatsModal-DrpfFt-f.js} +1 -1
  9. package/dashboard/dist/assets/{ConfirmModal-DUWujtDw.js → ConfirmModal-B9PKshe6.js} +1 -1
  10. package/dashboard/dist/assets/{DashboardPage-YEajmB-U.js → DashboardPage-CTMM_hXz.js} +1 -1
  11. package/dashboard/dist/assets/{DevicePage-B9URlU78.js → DevicePage-vjjYOiKF.js} +1 -1
  12. package/dashboard/dist/assets/{DialogClose-xjinPgj0.js → DialogClose-yWdm6qiH.js} +1 -1
  13. package/dashboard/dist/assets/DialogDescription-CWMyz32A.js +1 -0
  14. package/dashboard/dist/assets/{DialogTitle-Cmm7Tr9m.js → DialogTitle-DrHXSoKd.js} +1 -1
  15. package/dashboard/dist/assets/{FadeIn-jcFbPTOF.js → FadeIn-CXYsfy0c.js} +1 -1
  16. package/dashboard/dist/assets/{HeaderGithubStar-Dn6u7prD.js → HeaderGithubStar-DiJcy3xs.js} +1 -1
  17. package/dashboard/dist/assets/{IpCheckPage-BM8LGcNw.js → IpCheckPage-BThUN_Lb.js} +1 -1
  18. package/dashboard/dist/assets/{LandingPage-q9GLy3YJ.js → LandingPage-DtCtWP7i.js} +2 -2
  19. package/dashboard/dist/assets/{LeaderboardAvatar-_2M5HnN2.js → LeaderboardAvatar-CEyIeJIy.js} +1 -1
  20. package/dashboard/dist/assets/{LeaderboardPage-DSS4pTNm.js → LeaderboardPage-SY-luadv.js} +2 -2
  21. package/dashboard/dist/assets/{LeaderboardProfileModal-upBPylvC.js → LeaderboardProfileModal-Cyib57pI.js} +3 -3
  22. package/dashboard/dist/assets/{LeaderboardProfilePage-BxmJjErC.js → LeaderboardProfilePage-C95tq95g.js} +1 -1
  23. package/dashboard/dist/assets/{LimitsPage-DahLoAx7.js → LimitsPage-DBx649o6.js} +2 -2
  24. package/dashboard/dist/assets/{LocalOnlyNotice-CZCZcHZ1.js → LocalOnlyNotice-Bml2Sr0e.js} +1 -1
  25. package/dashboard/dist/assets/{LoginCard-Cw3H2QOQ.js → LoginCard-CJ1vSiXs.js} +1 -1
  26. package/dashboard/dist/assets/{LoginModal-BYidPScd.js → LoginModal-Qt_1EUWq.js} +1 -1
  27. package/dashboard/dist/assets/{LoginPage-BBfz7idN.js → LoginPage-Bqg9kiqv.js} +1 -1
  28. package/dashboard/dist/assets/{PetPage-CG_v30vw.js → PetPage-BMzM_h1d.js} +1 -1
  29. package/dashboard/dist/assets/{PopoverPopup-SEq9dvEQ.js → PopoverPopup-DnziJqpr.js} +1 -1
  30. package/dashboard/dist/assets/{ProviderIcon-CjAvUaYE.js → ProviderIcon-vH5lKjuw.js} +1 -1
  31. package/dashboard/dist/assets/{ResetPasswordPage-B810eyXT.js → ResetPasswordPage-CcJ3RIsg.js} +1 -1
  32. package/dashboard/dist/assets/{Select-SLV7eQ5u.js → Select-BI5vIdwQ.js} +1 -1
  33. package/dashboard/dist/assets/{SelectItemText-icj0Q7zH.js → SelectItemText-Gugj_y4f.js} +1 -1
  34. package/dashboard/dist/assets/SettingsPage-C9CTs2jw.js +1 -0
  35. package/dashboard/dist/assets/{SkillsPage-B9uumgJS.js → SkillsPage-1Z59oZKe.js} +1 -1
  36. package/dashboard/dist/assets/{TokenGalaxy-BSFUK4qR.js → TokenGalaxy-Dwt_uTjM.js} +1 -1
  37. package/dashboard/dist/assets/{TrendMonitor-qheD8KM4.js → TrendMonitor-Cv7KTTBy.js} +1 -1
  38. package/dashboard/dist/assets/WidgetsPage-C2a6XGsg.js +1 -0
  39. package/dashboard/dist/assets/{WrappedPage-Hd6sFn9s.js → WrappedPage-BXqj1X1G.js} +1 -1
  40. package/dashboard/dist/assets/{__vite-browser-external-Bu1cBb_7.js → __vite-browser-external-ounIWgVD.js} +7 -4
  41. package/dashboard/dist/assets/{agent-logos-Ccg1ofEC.js → agent-logos-DQe_ByDz.js} +1 -1
  42. package/dashboard/dist/assets/{arrow-up-right-RXrNNsG2.js → arrow-up-right-B70Z9_kp.js} +1 -1
  43. package/dashboard/dist/assets/{check-d-Au6Kzo.js → check-Bgp9gUc4.js} +1 -1
  44. package/dashboard/dist/assets/{copy-a3tsjL_w.js → copy-CmHwZzAf.js} +1 -1
  45. package/dashboard/dist/assets/{download-DJcWUZJv.js → download-SrGb0psg.js} +1 -1
  46. package/dashboard/dist/assets/{flame-H8J4aVoK.js → flame-gzHssvBI.js} +1 -1
  47. package/dashboard/dist/assets/{format-tokens-BE149EAL.js → format-tokens-Cx5HiG8j.js} +1 -1
  48. package/dashboard/dist/assets/{icons-ByTKmvAZ.js → icons-BoFcCRaH.js} +1 -1
  49. package/dashboard/dist/assets/{index-CuUJdVq8.js → index-B5Uo5hBB.js} +1 -1
  50. package/dashboard/dist/assets/{index-C3SM4kjn.js → index-CI9mdiaT.js} +1 -1
  51. package/dashboard/dist/assets/{index-CzxoHjXK.js → index-Cx3npmOK.js} +1 -1
  52. package/dashboard/dist/assets/{info-C5mKonqx.js → info-6oNE7lgr.js} +1 -1
  53. package/dashboard/dist/assets/{limits-providers-BnqZGZmO.js → limits-providers-yNq34Wte.js} +1 -1
  54. package/dashboard/dist/assets/{link-2-C9q3EG5T.js → link-2-0sgGnuV2.js} +1 -1
  55. package/dashboard/dist/assets/{loader-circle-BYnF5KTV.js → loader-circle-CkdwRbHW.js} +1 -1
  56. package/dashboard/dist/assets/{provider-display-D8ezW-m0.js → provider-display-D5N-EIGb.js} +1 -1
  57. package/dashboard/dist/assets/{react-CuWBndC4.js → react-06ETQFHg.js} +1 -1
  58. package/dashboard/dist/assets/{skills-api-BjmbJP9m.js → skills-api-Dc7mvEQb.js} +1 -1
  59. package/dashboard/dist/assets/{terminal-KTipHIur.js → terminal-Cl4swf72.js} +1 -1
  60. package/dashboard/dist/assets/{trash-2-DUi5VGSM.js → trash-2-CcXLTSbt.js} +1 -1
  61. package/dashboard/dist/assets/{use-community-stats-DsSa_KFH.js → use-community-stats-DjcTzPzV.js} +1 -1
  62. package/dashboard/dist/assets/{use-limits-display-prefs-B-gM5IIA.js → use-limits-display-prefs-iOdmyksX.js} +1 -1
  63. package/dashboard/dist/assets/{use-native-settings-B-GPgMwO.js → use-native-settings-DYzvG6BB.js} +1 -1
  64. package/dashboard/dist/assets/{use-ordered-list-CjWnQEBX.js → use-ordered-list-BvvmM-zv.js} +1 -1
  65. package/dashboard/dist/assets/use-reduced-motion-DU9jOpMZ.js +1 -0
  66. package/dashboard/dist/assets/{use-session-efficiency-pref-B5e2s3cv.js → use-session-efficiency-pref-Cr2VfduK.js} +1 -1
  67. package/dashboard/dist/assets/{use-transform-TQ15GATd.js → use-transform-WhWaB_tE.js} +1 -1
  68. package/dashboard/dist/assets/{use-usage-limits-BqDW_9wW.js → use-usage-limits-5c6FAHCw.js} +1 -1
  69. package/dashboard/dist/assets/{useCurrency-D1kHNp-X.js → useCurrency-CvyI7Z7t.js} +1 -1
  70. package/dashboard/dist/assets/{useScrollLock-DKMVyi6-.js → useScrollLock-IfyzbX-7.js} +1 -1
  71. package/dashboard/dist/assets/{useTokenFormat-CbJjag6e.js → useTokenFormat-DBOCm5sY.js} +1 -1
  72. package/dashboard/dist/assets/{zap-wfYE6Dsm.js → zap-DcdvNotr.js} +1 -1
  73. package/dashboard/dist/index.html +1 -1
  74. package/dashboard/dist/ip-check.html +1 -1
  75. package/dashboard/dist/leaderboard.html +1 -1
  76. package/dashboard/dist/share.html +1 -1
  77. package/package.json +1 -1
  78. package/src/lib/pricing/seed-snapshot.json +1 -1
  79. package/dashboard/dist/assets/DialogDescription-cOH4S5rw.js +0 -1
  80. package/dashboard/dist/assets/SettingsPage-9mkMJ04G.js +0 -1
  81. package/dashboard/dist/assets/WidgetsPage-DBtJhIOw.js +0 -1
  82. package/dashboard/dist/assets/use-reduced-motion-Cln2x_5T.js +0 -1
@@ -1 +0,0 @@
1
- import{r as n,y as a}from"./__vite-browser-external-Bu1cBb_7.js";import{u as p}from"./DialogTitle-Cmm7Tr9m.js";import{u as c}from"./useScrollLock-DKMVyi6-.js";const x=n.forwardRef(function(e,r){const{render:l,className:u,style:m,id:s,...t}=e,{store:i}=p(),o=c(s);return i.useSyncedValueWithCleanup("descriptionElementId",o),a("p",e,{ref:r,props:[{id:o},t]})});export{x as D};
@@ -1 +0,0 @@
1
- import{l as S,r as c,j as t,d as j,c as a,a as se,am as oe,bc as re,as as le,at as ce,a2 as R,bd as ue,be as de,u as ge,R as A,V as me,Z as F,m as I,bf as he,bg as pe,N as $,bh as be,w as fe,bi as xe,bj as ye,bk as ve,bl as ke,bm as je,bn as Ne,bo as Se,L as we,aP as Ce,bp as Ae,ai as _,Q as Le,S as Ee,bq as Pe}from"./__vite-browser-external-Bu1cBb_7.js";import{b as Ie,g as _e,L as G,m as H}from"./react-CuWBndC4.js";import{u as Ge,L as T}from"./use-limits-display-prefs-B-gM5IIA.js";import{P as Te}from"./ProviderIcon-CjAvUaYE.js";import{a as O,l as D}from"./limits-providers-BnqZGZmO.js";import{a as w,T as N,b,S as L,u as V}from"./use-native-settings-B-GPgMwO.js";import{P as Oe,u as De,a as Me}from"./use-session-efficiency-pref-B5e2s3cv.js";import{C as Ue}from"./check-d-Au6Kzo.js";import{C as Re}from"./copy-a3tsjL_w.js";import{A as Fe}from"./index-C3SM4kjn.js";import{u as $e}from"./useCurrency-D1kHNp-X.js";import{u as He}from"./useTokenFormat-CbJjag6e.js";import{S as B}from"./Select-SLV7eQ5u.js";import{I as Ve}from"./info-C5mKonqx.js";import{C as Be}from"./ConfirmModal-DUWujtDw.js";import{A as ze}from"./arrow-up-right-RXrNNsG2.js";import{D as qe}from"./download-DJcWUZJv.js";import"./Card-WA_W0aUg.js";import"./SelectItemText-icj0Q7zH.js";import"./useScrollLock-DKMVyi6-.js";import"./DialogTitle-Cmm7Tr9m.js";import"./DialogDescription-cOH4S5rw.js";const Ke=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Ze=S("activity",Ke);const We=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],Qe=S("flask-conical",We);const Ye=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],Je=S("grip-vertical",Ye);const Xe=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],et=S("languages",Xe);const tt=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],nt=S("log-out",tt);const at=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],it=S("palette",at);const st=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],ot=S("user-round",st),rt=e=>!e.isLayoutDirty&&e.willUpdate(!1);function M(){const e=new Set,n=new WeakMap,i=()=>e.forEach(rt);return{add:s=>{e.add(s),n.set(s,s.addEventListener("willUpdate",i))},remove:s=>{e.delete(s);const r=n.get(s);r&&(r(),n.delete(s)),i()},dirty:i}}const lt=c.createContext(null);function ct(){const e=c.useRef(!1);return Ie(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function ut(){const e=ct(),[n,i]=c.useState(0),s=c.useCallback(()=>{e.current&&i(n+1)},[n]);return[c.useCallback(()=>_e.postRender(s),[s]),n]}const z=e=>e===!0,dt=e=>z(e===!0)||e==="id",gt=({children:e,id:n,inherit:i=!0})=>{const s=c.useContext(G),r=c.useContext(lt),[o,l]=ut(),u=c.useRef(null),g=s.id||r;u.current===null&&(dt(i)&&g&&(n=n?g+"-"+n:g),u.current={id:n,group:z(i)&&s.group||M()});const m=c.useMemo(()=>({...u.current,forceRender:o}),[l]);return t.jsx(G.Provider,{value:m,children:e})},mt="shrink-0 text-oai-gray-900 dark:text-oai-gray-200";function ht({checked:e,onChange:n,ariaLabel:i}){return t.jsx("button",{type:"button",role:"switch","aria-checked":e,"aria-label":i,onClick:n,className:j("relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",e?"bg-oai-brand-500":"bg-oai-gray-300 dark:bg-oai-gray-700"),children:t.jsx("span",{className:j("inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",e?"translate-x-[18px]":"translate-x-[3px]")})})}function pt({prefs:e}){const{order:n,visibility:i,toggle:s,moveToward:r}=e,[o,l]=c.useState(null),[u,g]=c.useState(null),m=d=>f=>{l(d),f.dataTransfer.effectAllowed="move",f.dataTransfer.setData("text/plain",d)},p=d=>f=>{f.preventDefault(),f.dataTransfer.dropEffect="move",o&&o!==d&&u!==d&&(g(d),r(o,d))},x=()=>{l(null),g(null)},y=d=>{d.preventDefault(),l(null),g(null)};return t.jsx(gt,{children:t.jsx("div",{className:"flex flex-col",children:n.map(d=>{const f=i[d]!==!1,h=o===d;return t.jsxs(H.div,{layout:!0,transition:{duration:.28,ease:[.22,1,.36,1]},draggable:!0,onDragStart:m(d),onDragOver:p(d),onDragEnd:x,onDrop:y,className:j("flex items-center gap-3 py-2 rounded-md","hover:bg-oai-gray-100/60 dark:hover:bg-oai-gray-800/60",h&&"opacity-40"),style:{cursor:h?"grabbing":"grab"},children:[t.jsx(Je,{className:"h-4 w-4 shrink-0 text-oai-gray-400 dark:text-oai-gray-500",strokeWidth:1.75,"aria-hidden":!0}),O(d)?t.jsx(Te,{provider:O(d),size:18,className:j("pointer-events-none",mt)}):null,t.jsx("span",{className:"flex-1 text-sm text-oai-gray-900 dark:text-oai-gray-200 select-none",children:D(d)}),t.jsx("div",{onMouseDown:k=>k.stopPropagation(),draggable:!1,children:t.jsx(ht,{checked:f,onChange:()=>s(d),ariaLabel:`${a("limits.settings.toggle_visible")}: ${D(d)}`})})]},d)})})})}function bt(e){if(!e||typeof e!="object")return"";const n=e.user_metadata&&typeof e.user_metadata=="object"?e.user_metadata:{},i=e.profile&&typeof e.profile=="object"?e.profile:{},s=n.full_name||n.name||i.name||n.user_name||n.preferred_username;return typeof s=="string"&&s.trim()?s.trim():typeof e.email=="string"&&e.email.includes("@")?e.email.split("@")[0].trim()||e.email.trim():typeof e.email=="string"?e.email.trim():""}function ft(e){return!e||typeof e!="object"?"":typeof e.email=="string"?e.email.trim():""}function xt(e){const n=typeof e=="string"?e.trim():"";if(!n)return null;const i=n.match(/^@?([A-Za-z0-9][A-Za-z0-9-]{0,38})$/),s=n.match(/^https:\/\/github\.com\/([A-Za-z0-9][A-Za-z0-9-]{0,38})\/?$/i),r=i?.[1]||s?.[1];return r?`https://github.com/${r}`:null}function E(e,n){console.warn(`[tokentracker] settings ${e}:`,n)}function yt(e,n,i){const[s,r]=c.useState(()=>oe()),o=n&&i&&re(),l=c.useCallback(async()=>{const u=!s;if(le(u),r(u),!!u)try{await ce(()=>e())}catch(g){E("cloud sync",g)}},[s,e]);return{cloudSyncOn:s,handleCloudSyncToggle:l,showLocalCloudSync:o}}function vt(e){const[n,i]=c.useState(!1),[s,r]=c.useState(!1),[o,l]=c.useState(!1),[u,g]=c.useState(!1),[m,p]=c.useState(null),[x,y]=c.useState(!1),[d,f]=c.useState(""),[h,k]=c.useState(!1),[C,P]=c.useState(""),[W,Q]=c.useState(""),[Y,J]=c.useState(!1),[X,ee]=c.useState(null),te=c.useMemo(()=>bt(e),[e]),ne=c.useMemo(()=>ft(e),[e]),ae=c.useMemo(()=>typeof e?.id=="string"?e.id.trim():"",[e]),ie=c.useMemo(()=>({setAnonymousOn:r,setCustomDisplayName:p,setGithubUrl:P,setProfileLoading:l,setPublicProfileOn:i,setShowGithubOn:k}),[]);return{anonymousOn:s,customDisplayName:m,displayName:te,editingGithub:Y,editingName:x,email:ne,githubError:X,githubInput:W,githubUrl:C,loadSetters:ie,nameInput:d,profileLoading:o,profileSaving:u,publicProfileOn:n,setAnonymousOn:r,setCustomDisplayName:p,setEditingGithub:J,setEditingName:y,setGithubError:ee,setGithubInput:Q,setGithubUrl:P,setNameInput:f,setProfileLoading:l,setProfileSaving:g,setPublicProfileOn:i,setShowGithubOn:k,showGithubOn:h,userId:ae}}function kt(e,n,i){c.useEffect(()=>{if(!n)return;let s=!0;return i.setProfileLoading(!0),(async()=>{try{const r=await R({getAccessToken:e});if(!s||!r)return;const o=await ue({accessToken:r});if(!s)return;i.setPublicProfileOn(!!o?.enabled),i.setAnonymousOn(!!o?.anonymous),o?.display_name&&i.setCustomDisplayName(o.display_name),i.setShowGithubOn(!!o?.show_github_url),i.setGithubUrl(o?.github_url||"")}catch(r){E("load public profile",r)}finally{s&&i.setProfileLoading(!1)}})(),()=>{s=!1}},[e,n,i])}function jt(e,n){return c.useCallback(async(i,{label:s,onError:r,onSuccess:o}={})=>{if(n.profileSaving)return!1;n.setProfileSaving(!0);try{const l=await R({getAccessToken:e});if(!l)return!1;const u=await de({accessToken:l,...i});return o?.(u),!0}catch(l){return r?r(l):E(s||"mutate profile",l),!1}finally{n.setProfileSaving(!1)}},[e,n])}function Nt(e,n){return{anonymousOn:e.anonymousOn,customDisplayName:e.customDisplayName,displayName:e.displayName,editingName:e.editingName,handleAnonymousToggle:n.handleAnonymousToggle,handleSaveName:n.handleSaveName,nameInput:e.nameInput,profileLoading:e.profileLoading,profileSaving:e.profileSaving,setEditingName:e.setEditingName,setNameInput:e.setNameInput,startEditingName:n.startEditingName}}function St(e,n){return{editingGithub:e.editingGithub,githubError:e.githubError,githubInput:e.githubInput,githubUrl:e.githubUrl,handleSaveGithub:n.handleSaveGithub,handleShowGithubToggle:n.handleShowGithubToggle,profileLoading:e.profileLoading,profileSaving:e.profileSaving,setEditingGithub:e.setEditingGithub,setGithubError:e.setGithubError,setGithubInput:e.setGithubInput,showGithubOn:e.showGithubOn,startEditingGithub:n.startEditingGithub}}function wt(e,n){const i=c.useCallback(async()=>{const r=!e.publicProfileOn;await n({enabled:r},{label:"toggle public profile",onSuccess:()=>e.setPublicProfileOn(r)})},[n,e]);return{handleAnonymousToggle:c.useCallback(async()=>{const r=!e.anonymousOn;await n({anonymous:r},{label:"toggle anonymous",onSuccess:()=>e.setAnonymousOn(r)})},[n,e]),handlePublicProfileToggle:i}}function Ct(e,n,i){const s=c.useCallback(async()=>{const o=e.nameInput.trim().slice(0,50);o&&await n({display_name:o},{label:"save display name",onSuccess:()=>{e.setCustomDisplayName(o),e.setEditingName(!1),i?.()}})},[n,e,i]),r=c.useCallback(()=>{e.setNameInput(e.customDisplayName||e.displayName),e.setEditingName(!0)},[e]);return{handleSaveName:s,startEditingName:r}}function At(e,n){const i=c.useCallback(async()=>{if(!e.showGithubOn&&!e.githubUrl){e.setEditingGithub(!0),e.setGithubInput(""),e.setGithubError(null);return}const o=!e.showGithubOn;await n({show_github_url:o},{label:"toggle GitHub profile",onSuccess:()=>e.setShowGithubOn(o)})},[n,e]),s=c.useCallback(async()=>{const o=xt(e.githubInput);if(e.githubInput.trim()&&!o){e.setGithubError(a("settings.account.githubUrlInvalid"));return}e.setGithubError(null),await n({github_url:o,show_github_url:!!o},{label:"save GitHub profile",onError:l=>e.setGithubError(l?.message||a("settings.account.githubUrlInvalid")),onSuccess:l=>{e.setGithubUrl(l?.github_url||o||""),e.setShowGithubOn(!!o),e.setEditingGithub(!1)}})},[n,e]),r=c.useCallback(()=>{e.setGithubInput(e.githubUrl),e.setGithubError(null),e.setEditingGithub(!0)},[e]);return{handleSaveGithub:s,handleShowGithubToggle:i,startEditingGithub:r}}function Lt(){const e=se(),n=vt(e.user),i=yt(e.getAccessToken,e.enabled,e.signedIn);kt(e.getAccessToken,e.signedIn,n.loadSetters);const s=jt(e.getAccessToken,n),r=wt(n,s),o=Ct(n,s,e.refreshDisplayName),l=At(n,s);return{...e,...i,email:n.email,handlePublicProfileToggle:r.handlePublicProfileToggle,userId:n.userId,name:Nt(n,{...r,...o}),github:St(n,l),profileLoading:n.profileLoading,profileSaving:n.profileSaving,publicProfileOn:n.publicProfileOn}}function q({disabled:e,onCancel:n,onSave:i,saveLabel:s=a("settings.account.save")}){return t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:i,disabled:e,className:"rounded-md bg-oai-brand-500 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-oai-brand-600 disabled:opacity-50",children:s}),t.jsx("button",{type:"button",onClick:n,className:"rounded-md px-2 py-1.5 text-xs text-oai-gray-500 transition-colors hover:text-oai-gray-700 dark:hover:text-oai-gray-300",children:a("settings.account.cancel")})]})}function Et({nameInput:e,setEditingName:n,setNameInput:i,profileSaving:s,handleSaveName:r}){return t.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[t.jsx("input",{type:"text",value:e,onChange:o=>i(o.target.value),onKeyDown:o=>{o.key==="Enter"&&r(),o.key==="Escape"&&n(!1)},maxLength:50,autoFocus:!0,className:"flex-1 rounded-md border border-oai-gray-300 bg-transparent px-2.5 py-1.5 text-sm text-oai-black outline-none focus:border-oai-brand-500 focus:ring-1 focus:ring-inset focus:ring-oai-brand-500 dark:border-oai-gray-700 dark:text-white",placeholder:a("settings.account.displayName")}),t.jsx(q,{disabled:s||!e.trim(),onCancel:()=>n(!1),onSave:r,saveLabel:s?a("settings.account.saving"):void 0})]})}function Pt({githubError:e,githubInput:n,handleSaveGithub:i,profileSaving:s,setEditingGithub:r,setGithubError:o,setGithubInput:l}){return t.jsxs("div",{className:"mt-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("input",{type:"text",value:n,onChange:u=>{l(u.target.value),e&&o(null)},onKeyDown:u=>{u.key==="Enter"&&i(),u.key==="Escape"&&(r(!1),o(null))},maxLength:100,autoFocus:!0,className:"flex-1 rounded-md border border-oai-gray-300 bg-transparent px-2.5 py-1.5 text-sm text-oai-black outline-none focus:border-oai-brand-500 focus:ring-1 focus:ring-inset focus:ring-oai-brand-500 dark:border-oai-gray-700 dark:text-white",placeholder:a("settings.account.githubUrlPlaceholder")}),t.jsx(q,{disabled:s,onCancel:()=>{r(!1),o(null)},onSave:i,saveLabel:s?a("settings.account.saving"):void 0})]}),e?t.jsx("div",{className:"mt-1.5 text-xs text-red-600 dark:text-red-400",children:e}):null]})}function K({disabled:e=!1,label:n,onClick:i,title:s}){return t.jsxs("button",{type:"button",onClick:i,disabled:e,title:s,className:"inline-flex h-8 shrink-0 items-center gap-1.5 rounded-md border border-oai-gray-200 px-3 text-xs font-medium text-oai-gray-700 transition-colors hover:bg-oai-gray-100 disabled:cursor-not-allowed disabled:opacity-40 dark:border-oai-gray-800 dark:text-oai-gray-300 dark:hover:bg-oai-gray-800",children:[t.jsx(Oe,{className:"h-3.5 w-3.5","aria-hidden":!0}),n]})}function Z({actions:e,editing:n,editor:i,hint:s,label:r}){return t.jsx("div",{className:"py-3",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("div",{className:"text-sm text-oai-gray-900 dark:text-oai-gray-200",children:r}),n?i:t.jsx("div",{className:"mt-0.5 truncate text-xs text-oai-gray-500 dark:text-oai-gray-400",children:s})]}),n?null:e]})})}function It({name:e}){const n=e.anonymousOn?a("settings.account.displayNameDisabledWhileAnon"):void 0;return t.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[t.jsx(K,{disabled:e.anonymousOn,label:a("settings.account.edit"),onClick:e.startEditingName,title:n}),t.jsx(N,{checked:!e.anonymousOn,onChange:e.handleAnonymousToggle,disabled:e.profileLoading||e.profileSaving,ariaLabel:a("settings.account.displayName")})]})}function _t({name:e}){const{anonymousOn:n,customDisplayName:i,displayName:s,editingName:r,handleAnonymousToggle:o,handleSaveName:l,nameInput:u,profileLoading:g,profileSaving:m,setEditingName:p,setNameInput:x,startEditingName:y}=e,d=n?a("settings.account.displayNameAnonymousHint"):i||s;return t.jsx(Z,{label:a("settings.account.displayName"),editing:r,hint:d,editor:t.jsx(Et,{nameInput:u,setEditingName:p,setNameInput:x,profileSaving:m,handleSaveName:l}),actions:t.jsx(It,{name:e})})}function Gt({github:e}){const{editingGithub:n,githubError:i,githubInput:s,githubUrl:r,handleSaveGithub:o,handleShowGithubToggle:l,profileLoading:u,profileSaving:g,setEditingGithub:m,setGithubError:p,setGithubInput:x,showGithubOn:y,startEditingGithub:d}=e;return t.jsx(t.Fragment,{children:t.jsx(Z,{label:a("settings.account.githubUrl"),editing:n,hint:r||a("settings.account.githubUrlHint"),editor:t.jsx(Pt,{githubError:i,githubInput:s,handleSaveGithub:o,profileSaving:g,setEditingGithub:m,setGithubError:p,setGithubInput:x}),actions:t.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[t.jsx(K,{label:a("settings.account.edit"),onClick:d}),t.jsx(N,{checked:y,onChange:l,disabled:u||g,ariaLabel:a("settings.account.githubUrl")})]})})})}function Tt(){const{openLoginModal:e}=ge();return t.jsx(w,{title:a("settings.section.account"),children:t.jsxs("div",{className:"flex items-center justify-between gap-4 py-3",children:[t.jsx("p",{className:"text-sm text-oai-gray-500 dark:text-oai-gray-400",children:a("settings.account.signedOutHint")}),t.jsx("button",{type:"button",onClick:e,className:"inline-flex h-8 shrink-0 items-center justify-center rounded-md bg-oai-gray-900 px-4 text-xs font-medium text-white transition-colors hover:bg-oai-gray-800 dark:bg-white dark:text-oai-gray-900 dark:hover:bg-oai-gray-100",children:a("settings.account.signIn")})]})})}function Ot({name:e,github:n}){return t.jsxs(t.Fragment,{children:[t.jsx(_t,{name:e}),t.jsx(Gt,{github:n})]})}function Dt(){const e=Lt();return e.enabled?e.signedIn?t.jsxs(w,{title:a("settings.section.account"),subtitle:e.email||e.name.customDisplayName||e.name.displayName,action:t.jsx(Ut,{onSignOut:e.signOut}),children:[t.jsx(Mt,{userId:e.userId}),t.jsx(Rt,{settings:e}),t.jsx(Ft,{checked:e.publicProfileOn,disabled:e.profileLoading||e.profileSaving,onChange:e.handlePublicProfileToggle}),t.jsx($t,{visible:e.publicProfileOn,name:e.name,github:e.github})]}):t.jsx(Tt,{}):null}function Mt({userId:e}){const[n,i]=A.useState(!1);if(!e)return null;const s=async()=>{try{if(typeof navigator>"u"||!navigator.clipboard?.writeText)return;await navigator.clipboard.writeText(e),i(!0),globalThis.setTimeout(()=>i(!1),1200)}catch{i(!1)}};return t.jsxs("div",{className:"flex items-center justify-between gap-4 py-3",children:[t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("div",{className:"text-sm text-oai-gray-900 dark:text-oai-gray-200",children:a("settings.account.userId")}),t.jsx("div",{className:"mt-0.5 truncate font-mono text-xs text-oai-gray-500 dark:text-oai-gray-400",children:e})]}),t.jsxs("button",{type:"button",onClick:s,className:"inline-flex h-8 shrink-0 items-center gap-1.5 rounded-md border border-oai-gray-200 px-3 text-xs font-medium text-oai-gray-700 transition-colors hover:bg-oai-gray-100 dark:border-oai-gray-800 dark:text-oai-gray-300 dark:hover:bg-oai-gray-800","aria-label":a("settings.account.copyUserId"),children:[n?t.jsx(Ue,{className:"h-3.5 w-3.5","aria-hidden":!0}):t.jsx(Re,{className:"h-3.5 w-3.5","aria-hidden":!0}),n?a("settings.account.copied"):a("settings.account.copy")]})]})}function Ut({onSignOut:e}){return t.jsxs("button",{type:"button",onClick:()=>e(),className:"inline-flex h-7 items-center gap-1.5 text-xs font-medium text-oai-gray-500 transition-colors hover:text-oai-gray-700 dark:hover:text-oai-gray-300",children:[t.jsx(nt,{className:"h-3.5 w-3.5","aria-hidden":!0}),a("settings.account.signOut")]})}function Rt({settings:e}){return e.showLocalCloudSync?t.jsx(b,{label:a("settings.account.cloudSync"),hint:a("settings.account.cloudSyncHint"),control:t.jsx(N,{checked:e.cloudSyncOn,onChange:e.handleCloudSyncToggle,ariaLabel:a("settings.account.cloudSync")})}):null}function Ft({checked:e,disabled:n,onChange:i}){return t.jsx(b,{label:a("settings.account.publicProfile"),hint:a("settings.account.publicProfileHint"),control:t.jsx(N,{checked:e,onChange:i,disabled:n,ariaLabel:a("settings.account.publicProfile")})})}function $t({visible:e,name:n,github:i}){return t.jsx(Fe,{initial:!1,children:e?t.jsx(H.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{height:{duration:.28,ease:[.22,1,.36,1]},opacity:{duration:.2,ease:[.22,1,.36,1]}},style:{overflow:"hidden"},className:"divide-y divide-oai-gray-200/60 dark:divide-oai-gray-800/60",children:t.jsx(Ot,{name:n,github:i})},"public-profile-fields"):null})}function Ht(){return[{value:"light",label:a("settings.appearance.theme.light"),Icon:he},{value:"dark",label:a("settings.appearance.theme.dark"),Icon:pe},{value:"system",label:a("settings.appearance.theme.system"),Icon:$}]}function Vt(){return[{value:xe,label:a("settings.appearance.language.system")},{value:ye,label:a("settings.appearance.language.english")},{value:ve,label:a("settings.appearance.language.chinese")},{value:ke,label:a("settings.appearance.language.traditional_chinese")},{value:je,label:a("settings.appearance.language.japanese")},{value:Ne,label:a("settings.appearance.language.korean")},{value:Se,label:a("settings.appearance.language.german")}]}function Bt(e){if(!e)return null;try{const n=new Date(e);return Number.isNaN(n.getTime())?null:n.toLocaleString()}catch{return null}}function zt(e,n){const i=a(`settings.appearance.currency.rate_source.${e}`),s=Bt(n),r=s?a("settings.appearance.currency.rate_updated",{when:s}):a("settings.appearance.currency.rate_never");return`${i} · ${r}`}function qt({locale:e,setLocale:n}){const i=Vt();return t.jsx(B,{value:e,onValueChange:n,options:i,ariaLabel:a("settings.appearance.language.label"),className:"px-2.5 py-1.5 text-xs font-medium",leadingIcon:t.jsx(et,{className:"h-3.5 w-3.5 text-oai-gray-500 dark:text-oai-gray-400","aria-hidden":!0})})}function Kt({currency:e,setCurrency:n}){const i=be().map(s=>({value:s.code,label:a(s.labelKey)}));return t.jsx(B,{value:e,onValueChange:n,options:i,ariaLabel:a("settings.appearance.currency.label"),className:"px-3 py-1.5 text-xs font-medium"})}function Zt({currency:e,rate:n,rateSource:i,rateFetchedAt:s}){if(e===fe)return t.jsx(t.Fragment,{children:a("settings.appearance.currency.hint")});const r=zt(i,s);return t.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[t.jsx("span",{children:`1 USD = ${n.toFixed(4)} ${e}`}),t.jsx("span",{role:"img","aria-label":r,title:r,className:"inline-flex h-4 w-4 cursor-help items-center justify-center text-oai-gray-400 hover:text-oai-gray-600 dark:text-oai-gray-500 dark:hover:text-oai-gray-300",children:t.jsx(Ve,{className:"h-3.5 w-3.5","aria-hidden":!0})})]})}function Wt(){const{theme:e,setTheme:n}=me(),{locale:i,setLocale:s}=F(),{currency:r,rate:o,rateSource:l,rateFetchedAt:u,setCurrency:g}=$e(),{mode:m,setMode:p}=He();return t.jsxs(w,{title:a("settings.section.appearance"),children:[t.jsx(b,{label:a("settings.appearance.theme.label"),hint:a("settings.appearance.theme.hint"),control:t.jsx(L,{options:Ht(),value:e,onChange:n})}),t.jsx(b,{label:a("settings.appearance.language.label"),hint:a("settings.appearance.language.hint"),control:t.jsx(qt,{locale:i,setLocale:s})}),t.jsx(b,{label:a("settings.appearance.currency.label"),hint:t.jsx(Zt,{currency:r,rate:o,rateSource:l,rateFetchedAt:u}),control:t.jsx(Kt,{currency:r,setCurrency:g})}),t.jsx(b,{label:a("settings.appearance.token_format.label"),hint:a("settings.appearance.token_format.hint"),control:t.jsx(L,{options:[{value:I.COMPACT,label:a("settings.appearance.token_format.compact")},{value:I.FULL,label:a("settings.appearance.token_format.full")}],value:m,onChange:p})})]})}function U({labelKey:e}){return t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("span",{children:a(e)}),t.jsx("span",{className:"px-1.5 py-0.5 text-[8px] font-semibold tracking-wider text-oai-gray-500 bg-oai-gray-100 dark:text-oai-gray-400 dark:bg-oai-gray-800/80 rounded uppercase scale-90 origin-left",children:a("qpd.card.badge")})]})}function Qt(){const{enabled:e,toggle:n}=De(),{enabled:i,toggle:s}=Me();return t.jsxs(w,{title:a("settings.section.labs"),children:[t.jsx(b,{label:t.jsx(U,{labelKey:"settings.labs.qpd.label"}),hint:a("settings.labs.qpd.hint"),control:t.jsx(N,{checked:e,onChange:n,ariaLabel:a("settings.labs.qpd.aria")})}),t.jsx(b,{label:t.jsx(U,{labelKey:"settings.labs.sessions.label"}),hint:a("settings.labs.sessions.hint"),control:t.jsx(N,{checked:i,onChange:s,ariaLabel:a("settings.labs.sessions.aria")})})]})}function Yt(){const{available:e,settings:n,setSetting:i,runAction:s}=V();if(!e)return null;const r=!!n?.launchAtLogin,o=n?.launchAtLoginSupported!==!1,l=n?.updateStatus||null,u=!!n?.updateBusy,g=!!n?.isSyncing;return t.jsxs(w,{title:a("settings.section.menubar"),children:[t.jsx(b,{label:a("settings.menubar.appearance"),hint:a("settings.menubar.appearanceHint"),control:t.jsxs(we,{to:"/widgets",className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-oai-gray-200 px-3 text-xs font-medium text-oai-gray-700 no-underline transition-colors hover:bg-oai-gray-100 dark:border-oai-gray-800 dark:text-oai-gray-300 dark:hover:bg-oai-gray-800",children:[a("settings.menubar.appearanceLink"),t.jsx(ze,{className:"h-3.5 w-3.5","aria-hidden":!0})]})}),o?t.jsx(b,{label:a("settings.menubar.launchAtLogin"),hint:a("settings.menubar.launchAtLoginHint"),control:t.jsx(N,{checked:r,onChange:()=>i("launchAtLogin",!r),ariaLabel:a("settings.menubar.launchAtLogin")})}):null,t.jsx(b,{label:a("settings.menubar.syncNow"),hint:a("settings.menubar.syncNowHint"),control:t.jsxs("button",{type:"button",onClick:()=>s("syncNow"),disabled:g,className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-oai-gray-200 px-3 text-xs font-medium text-oai-gray-700 transition-colors hover:bg-oai-gray-100 disabled:cursor-not-allowed disabled:opacity-50 dark:border-oai-gray-800 dark:text-oai-gray-300 dark:hover:bg-oai-gray-800",children:[t.jsx(Ce,{className:j("h-3.5 w-3.5",g&&"animate-spin"),"aria-hidden":!0}),g?a("settings.menubar.syncing"):a("settings.menubar.syncNow")]})}),t.jsx(b,{label:a("settings.menubar.updates"),hint:l||void 0,control:t.jsxs("button",{type:"button",onClick:()=>s("checkForUpdates"),disabled:u,className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-oai-gray-200 px-3 text-xs font-medium text-oai-gray-700 transition-colors hover:bg-oai-gray-100 disabled:cursor-not-allowed disabled:opacity-50 dark:border-oai-gray-800 dark:text-oai-gray-300 dark:hover:bg-oai-gray-800",children:[t.jsx(qe,{className:"h-3.5 w-3.5","aria-hidden":!0}),a("settings.menubar.checkUpdates")]})})]})}function Jt(e,n){function i(o){return o.replace(/^v/,"").split(".").map(Number)}const s=i(e),r=i(n);for(let o=0;o<Math.max(s.length,r.length);o++){const l=s[o]||0,u=r[o]||0;if(l<u)return!0;if(l>u)return!1}return!1}function Xt(){const{available:e,settings:n,runAction:i}=V(),s=e&&n?.version,[r,o]=A.useState(!1),[l,u]=A.useState({open:!1,latestVersion:"",htmlUrl:""}),{resolvedLocale:g}=F(),m="0.83.7",p=async()=>{o(!0);try{const h=await fetch("https://api.github.com/repos/mm7894215/TokenTracker/releases/latest");if(!h.ok)throw new Error("Failed to fetch");const k=await h.json(),C=k.tag_name;Jt(m,C)?u({open:!0,latestVersion:C,htmlUrl:k.html_url}):_({title:a("settings.menubar.updates.upToDate")})}catch(h){console.error("Check updates failed:",h),_({title:a("settings.menubar.updates.failed")})}finally{o(!1)}},x=a("settings.menubar.updates.modalTitle"),y=a("settings.menubar.updates.modalDescription",{version:l.latestVersion}),d=a("settings.menubar.updates.modalConfirm"),f=a("settings.menubar.updates.modalCancel");return t.jsxs("div",{className:"mt-6 flex flex-col items-center justify-center gap-4 text-xs text-oai-gray-500 dark:text-oai-gray-500",children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[s?t.jsxs(t.Fragment,{children:[t.jsx("span",{children:a("settings.menubar.updates.footerCombined",{barVersion:n.version,coreVersion:m})}),t.jsx("span",{"aria-hidden":!0,children:"·"}),t.jsx("button",{type:"button",onClick:()=>i("openAbout"),className:"underline-offset-2 transition-colors hover:text-oai-gray-700 hover:underline dark:hover:text-oai-gray-300",children:"GitHub"}),t.jsx("span",{"aria-hidden":!0,children:"·"})]}):t.jsxs(t.Fragment,{children:[t.jsx("span",{children:a("settings.menubar.updates.footerCore",{version:m})}),t.jsx("span",{"aria-hidden":!0,children:"·"}),t.jsx("button",{type:"button",onClick:p,disabled:r,className:"underline-offset-2 transition-colors hover:text-oai-gray-700 hover:underline dark:hover:text-oai-gray-300 disabled:opacity-50",children:r?a("settings.menubar.updates.checking"):a("settings.menubar.checkUpdates")}),t.jsx("span",{"aria-hidden":!0,children:"·"})]}),t.jsxs("a",{href:Ae,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 underline-offset-2 transition-colors hover:text-oai-gray-700 hover:underline dark:hover:text-oai-gray-300",children:[t.jsx(Ze,{className:"h-3.5 w-3.5","aria-hidden":!0}),a("settings.footer.statusPage")]})]}),t.jsx(Be,{open:l.open,title:x,description:y,confirmLabel:d,cancelLabel:f,onConfirm:()=>{window.open(l.htmlUrl,"_blank"),u(h=>({...h,open:!1}))},onCancel:()=>u(h=>({...h,open:!1}))})]})}const v={APPEARANCE:"appearance",NATIVE_APP:"native-app",ACCOUNT:"account",LIMITS:"limits",LABS:"labs"};function en({prefs:e}){return t.jsx(L,{options:[{value:T.USED,label:a("limits.settings.display_mode_used")},{value:T.REMAINING,label:a("limits.settings.display_mode_remaining")}],value:e.displayMode,onChange:e.setDisplayMode})}function Sn(){const e=Ge(),n=Le()&&Ee(),[i,s]=c.useState(v.APPEARANCE),r=[{id:v.APPEARANCE,label:a("settings.section.appearance"),Icon:it,content:t.jsx(Wt,{})},...n?[{id:v.NATIVE_APP,label:a("settings.section.menubar"),Icon:$,content:t.jsx(Yt,{})}]:[],{id:v.ACCOUNT,label:a("settings.section.account"),Icon:ot,content:t.jsx(Dt,{})},{id:v.LIMITS,label:a("settings.section.limits"),Icon:Pe,content:t.jsx(w,{title:a("settings.section.limits"),action:t.jsx(en,{prefs:e}),children:t.jsx(pt,{prefs:e})})},{id:v.LABS,label:a("settings.section.labs"),Icon:Qe,content:t.jsx(Qt,{})}];return c.useEffect(()=>{i===v.NATIVE_APP&&!n&&s(v.APPEARANCE)},[i,n]),t.jsx("div",{className:"flex flex-1 flex-col font-oai text-oai-black antialiased dark:text-oai-white",children:t.jsx("main",{className:"flex-1 pb-12 pt-8 sm:pb-16 sm:pt-10",children:t.jsxs("div",{className:"mx-auto w-full max-w-5xl px-4 sm:px-6",children:[t.jsx("div",{className:"mb-7",children:t.jsx("h1",{className:"text-3xl font-semibold tracking-tight text-oai-black dark:text-white sm:text-4xl",children:a("settings.page.title")})}),t.jsxs("div",{className:"grid min-w-0 gap-6 md:grid-cols-[12rem_minmax(0,1fr)] md:gap-8 lg:grid-cols-[13.5rem_minmax(0,1fr)]",children:[t.jsx("aside",{className:"min-w-0 border-b border-oai-gray-200 pb-3 dark:border-oai-gray-800 md:border-b-0 md:border-r md:pb-0 md:pr-5",children:t.jsx("nav",{"aria-label":a("settings.page.title"),className:"flex gap-0 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden md:sticky md:top-6 md:flex-col md:gap-1 md:overflow-visible",children:r.map(({id:o,label:l,Icon:u})=>{const g=i===o;return t.jsxs("button",{id:`settings-nav-${o}`,type:"button","aria-current":g?"page":void 0,"aria-controls":`settings-panel-${o}`,onClick:()=>s(o),className:j("inline-flex min-h-10 min-w-max shrink-0 items-center gap-1.5 rounded-md px-2 py-2 text-left text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-oai-brand-500 md:w-full md:min-w-0 md:gap-2 md:px-3",g?"bg-oai-gray-100 text-oai-black dark:bg-oai-gray-800 dark:text-white":"text-oai-gray-500 hover:bg-oai-gray-50 hover:text-oai-gray-900 dark:text-oai-gray-400 dark:hover:bg-oai-gray-900 dark:hover:text-oai-gray-200"),children:[t.jsx(u,{className:j("h-4 w-4 shrink-0",g?"text-oai-black dark:text-white":"text-oai-gray-400 dark:text-oai-gray-500"),"aria-hidden":!0}),t.jsx("span",{className:"truncate",children:l})]},o)})})}),t.jsxs("div",{className:"min-w-0",children:[r.map(({id:o,label:l,content:u})=>t.jsx("section",{id:`settings-panel-${o}`,"aria-labelledby":`settings-nav-${o}`,"aria-label":l,"data-settings-panel":o,hidden:i!==o,children:u},o)),t.jsx(Xt,{})]})]})]})})})}export{Sn as SettingsPage};
@@ -1 +0,0 @@
1
- import{j as e,c as a,M as P,N as I,r as u,p as $,R as E,d as A}from"./__vite-browser-external-Bu1cBb_7.js";import{S as M}from"./Select-SLV7eQ5u.js";import{u as K,T as R}from"./use-native-settings-B-GPgMwO.js";import{F as j,S as D,a as G}from"./FadeIn-jcFbPTOF.js";import{A as O}from"./arrow-up-right-RXrNNsG2.js";import{D as z}from"./download-DJcWUZJv.js";import"./SelectItemText-icj0Q7zH.js";import"./useScrollLock-DKMVyi6-.js";import"./check-d-Au6Kzo.js";import"./Card-WA_W0aUg.js";import"./react-CuWBndC4.js";import"./use-reduced-motion-Cln2x_5T.js";const H=["todayTokens","todayCost"],W=[{id:"todayTokens",label:"Today Tokens",shortLabel:"Tokens",category:"tokens"},{id:"todayCost",label:"Today Cost",shortLabel:"Cost",category:"cost"},{id:"last7dTokens",label:"Last 7 Days",shortLabel:"7d",category:"tokens"},{id:"totalTokens",label:"Total Tokens",shortLabel:"Total",category:"tokens"},{id:"totalCost",label:"Total Cost",shortLabel:"All $",category:"cost"},{id:"claude5h",label:"Claude 5h Limit",shortLabel:"Cl 5h",category:"limits"},{id:"claude7d",label:"Claude 7d Limit",shortLabel:"Cl 7d",category:"limits"},{id:"codex5h",label:"Codex 5h Limit",shortLabel:"Cx 5h",category:"limits"},{id:"codex7d",label:"Codex 7d Limit",shortLabel:"Cx 7d",category:"limits"},{id:"codexCredits",label:"Codex Credit Limit",shortLabel:"Cx Cred",category:"limits"},{id:"codexSpark5h",label:"Codex Spark 5h Limit",shortLabel:"Cx Spark 5h",category:"limits"},{id:"codexSpark7d",label:"Codex Spark 7d Limit",shortLabel:"Cx Spark 7d",category:"limits"},{id:"cursorPlan",label:"Cursor Plan Limit",shortLabel:"Cu Plan",category:"limits"},{id:"cursorAuto",label:"Cursor Auto Limit",shortLabel:"Cu Auto",category:"limits"},{id:"cursorAPI",label:"Cursor API Limit",shortLabel:"Cu API",category:"limits"},{id:"geminiPro",label:"Gemini Pro Limit",shortLabel:"Gm Pro",category:"limits"},{id:"geminiFlash",label:"Gemini Flash Limit",shortLabel:"Gm Flash",category:"limits"},{id:"geminiLite",label:"Gemini Lite Limit",shortLabel:"Gm Lite",category:"limits"},{id:"kimiWeekly",label:"Kimi Weekly Limit",shortLabel:"Km Wk",category:"limits"},{id:"kimi5h",label:"Kimi 5h Limit",shortLabel:"Km 5h",category:"limits"},{id:"kimiTotal",label:"Kimi Total Limit",shortLabel:"Km Tot",category:"limits"},{id:"kiroMonth",label:"Kiro Monthly Limit",shortLabel:"Kr Mo",category:"limits"},{id:"kiroBonus",label:"Kiro Bonus Limit",shortLabel:"Kr Bn",category:"limits"},{id:"copilotPremium",label:"Copilot Premium Limit",shortLabel:"Co Prem",category:"limits"},{id:"copilotChat",label:"Copilot Chat Limit",shortLabel:"Co Chat",category:"limits"},{id:"antigravityClaudeWeekly",label:"Antigravity Claude 7d Limit",shortLabel:"Ag Cl 7d",category:"limits"},{id:"antigravityClaude5h",label:"Antigravity Claude 5h Limit",shortLabel:"Ag Cl 5h",category:"limits"},{id:"antigravityGeminiWeekly",label:"Antigravity Gemini 7d Limit",shortLabel:"Ag Gm 7d",category:"limits"},{id:"antigravityGemini5h",label:"Antigravity Gemini 5h Limit",shortLabel:"Ag Gm 5h",category:"limits"}];function v(t,i=W,l=2){const s=new Set(i.map(n=>n.id)),o=new Set,r=Array.isArray(t)?t.filter(n=>!s.has(n)||o.has(n)?!1:(o.add(n),!0)):[];return(r.length>0?r:H).slice(0,Math.max(1,Number(l)||2))}const U=264,V=124,g="ui-rounded, -apple-system, system-ui",L=["#5A8CF2","#9973E6","#4DB8A6","#E68C59"],X={claude:"#C77DFF",codex:"#34C759",cursor:"#FFCC00",gemini:"#0A84FF"};function Y(t){return t>=.9?"#E64D4D":t>=.7?"#D9A633":"#33B866"}function y({size:t="sm",children:i}){const l=t==="lg",s=l?560:264,o=l?32:22;return e.jsx("div",{className:A("flex w-full items-center justify-center rounded-xl bg-oai-gray-100 dark:bg-oai-gray-950/60",l?"py-10 sm:py-14 px-6":"py-6 px-4"),children:e.jsx("div",{className:"overflow-hidden bg-white dark:bg-oai-gray-800 shadow-oai-md dark:shadow-[0_2px_4px_rgba(0,0,0,0.4),0_8px_24px_rgba(0,0,0,0.5)]",style:{width:"100%",maxWidth:s,aspectRatio:`${U} / ${V}`,borderRadius:o},children:i})})}function Z({size:t="sm"}){const i="M0,104 L14,104 C26,98 34,100 44,96 S58,88 68,92 80,100 90,94 102,80 112,82 126,92 136,88 150,74 162,76 178,88 188,86 204,72 216,74 236,84 250,80 L264,80",l=`${i} L264,124 L0,124 Z`,s=`sparkArea-${t}`;return e.jsx(y,{size:t,children:e.jsxs("svg",{viewBox:"0 0 264 124",className:"h-full w-full","aria-hidden":"true",children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:s,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:"#0A84FF",stopOpacity:"0.18"}),e.jsx("stop",{offset:"100%",stopColor:"#0A84FF",stopOpacity:"0"})]})}),e.jsx("text",{x:"14",y:"20",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"8",fontWeight:"700",letterSpacing:"0.6",children:a("widgets.preview.today")}),e.jsx("text",{x:"14",y:"46",className:"fill-oai-black dark:fill-white",fontSize:"22",fontWeight:"700",fontFamily:g,children:"203.2M"}),e.jsx("text",{x:"14",y:"60",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"8",fontWeight:"500",fontFamily:g,children:"$129.56 ±0%"}),e.jsx("text",{x:"134",y:"20",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"8",fontWeight:"700",letterSpacing:"0.6",children:a("widgets.preview.seven_days")}),e.jsx("text",{x:"134",y:"46",className:"fill-oai-black dark:fill-white",fontSize:"22",fontWeight:"700",fontFamily:g,children:"880.9M"}),e.jsx("text",{x:"134",y:"60",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"8",fontWeight:"500",fontFamily:g,children:"$673.61"}),e.jsx("path",{d:l,fill:`url(#${s})`,stroke:"none"}),e.jsx("path",{d:i,fill:"none",stroke:"#0A84FF",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]})})}const N=(()=>{const l=[];for(let s=0;s<26;s++)for(let o=0;o<7;o++){const r=Math.sin((s+1)*12.9898+(o+1)*78.233+17)*43758.5453,c=Math.floor(Math.abs(r-Math.floor(r))*100);l.push({w:s,d:o,v:c})}return l})();function S(t,i){return t<18?i?"#262626":"#e5e5e5":t<38?"rgba(10, 132, 255, 0.28)":t<58?"rgba(10, 132, 255, 0.50)":t<80?"rgba(10, 132, 255, 0.75)":"#0A84FF"}function q(){return e.jsx(y,{children:e.jsxs("svg",{viewBox:"0 0 264 124",className:"h-full w-full","aria-hidden":"true",children:[e.jsx("g",{transform:`translate(${19.5}, 10)`,className:"hidden dark:inline",children:N.map(r=>e.jsx("rect",{x:r.w*(7.5+1.2),y:r.d*(8+1.2),width:7.5,height:8,rx:"1.3",fill:S(r.v,!0)},`d-${r.w}-${r.d}`))}),e.jsx("g",{transform:`translate(${19.5}, 10)`,className:"dark:hidden",children:N.map(r=>e.jsx("rect",{x:r.w*(7.5+1.2),y:r.d*(8+1.2),width:7.5,height:8,rx:"1.3",fill:S(r.v,!1)},`l-${r.w}-${r.d}`))}),e.jsx("text",{x:19.5,y:"102",className:"fill-oai-black dark:fill-white",fontSize:"10",fontWeight:"700",fontFamily:g,children:"10.3B"}),e.jsx("text",{x:19.5+30,y:"102",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"9",fontWeight:"500",children:a("widgets.preview.heatmap_summary",{days:202})})]})})}function J(){const t=[{name:"claude-opus-4-6",value:"586.4M",pct:59},{name:"claude-sonnet-4-5-20250929",value:"218.7M",pct:22},{name:"gpt-5.4",value:"80.6M",pct:8},{name:"composer-2-fast",value:"52.1M",pct:5}],i=22,l=28,s=14,o=236;return e.jsx(y,{children:e.jsx("svg",{viewBox:"0 0 264 124",className:"h-full w-full","aria-hidden":"true",children:t.map((r,c)=>{const n=l+c*i,h=L[c%L.length];return e.jsxs("g",{children:[e.jsx("circle",{cx:"18",cy:n-3,r:"2.5",fill:h}),e.jsx("text",{x:"26",y:n,className:"fill-oai-black dark:fill-white",fontSize:"9",fontWeight:"500",children:r.name}),e.jsx("text",{x:"218",y:n,textAnchor:"end",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"9",fontWeight:"600",fontFamily:g,children:r.value}),e.jsxs("text",{x:"250",y:n,textAnchor:"end",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"8",fontWeight:"600",fontFamily:g,children:[r.pct,"%"]}),e.jsx("rect",{x:s,y:n+4,width:o,height:"2.8",rx:"1.4",className:"fill-oai-gray-200 dark:fill-oai-gray-700"}),e.jsx("rect",{x:s,y:n+4,width:Math.max(o*(r.pct/100),4),height:"2.8",rx:"1.4",fill:h})]},r.name)})})})}function Q(){const t=[{label:`${a("limits.provider.claude")} · ${a("limits.label.claude_7d")}`,source:"claude",reset:a("widgets.preview.reset_days",{days:1}),pct:61},{label:`${a("limits.provider.claude")} · ${a("limits.label.claude_5h")}`,source:"claude",reset:a("widgets.preview.reset_hours_minutes",{hours:4,minutes:28}),pct:4},{label:a("limits.provider.cursor"),source:"cursor",reset:a("widgets.preview.reset_days",{days:25}),pct:51},{label:`${a("limits.provider.codex")} · ${a("limits.label.codex_7d")}`,source:"codex",reset:a("widgets.preview.reset_days",{days:1}),pct:32}],i=22,l=28,s=14,o=236;return e.jsx(y,{children:e.jsx("svg",{viewBox:"0 0 264 124",className:"h-full w-full","aria-hidden":"true",children:t.map((r,c)=>{const n=l+c*i,h=X[r.source],b=Y(r.pct/100);return e.jsxs("g",{children:[e.jsx("circle",{cx:"18",cy:n-3,r:"2.5",fill:h}),e.jsx("text",{x:"26",y:n,className:"fill-oai-black dark:fill-white",fontSize:"9",fontWeight:"500",children:r.label}),e.jsx("text",{x:"218",y:n,textAnchor:"end",className:"fill-oai-gray-500 dark:fill-oai-gray-400",fontSize:"8",fontWeight:"500",fontFamily:g,children:r.reset}),e.jsxs("text",{x:"250",y:n,textAnchor:"end",className:"fill-oai-black dark:fill-white",fontSize:"9",fontWeight:"700",fontFamily:g,children:[r.pct,"%"]}),e.jsx("rect",{x:s,y:n+4,width:o,height:"2.8",rx:"1.4",className:"fill-oai-gray-200 dark:fill-oai-gray-700"}),e.jsx("rect",{x:s,y:n+4,width:Math.max(o*(r.pct/100),4),height:"2.8",rx:"1.4",fill:b})]},r.label)})})})}function ee(t){switch(t.category){case"cost":return"$8.42";case"limits":return"62%";default:return t.id==="last7dTokens"?"1.8B":"203M"}}function te(t,i){switch(t){case"todayTokens":return a("menubar.metric.today_tokens");case"todayCost":return a("menubar.metric.today_cost");case"last7dTokens":return a("menubar.metric.last_7d_tokens");case"totalTokens":return a("menubar.metric.total_tokens");case"totalCost":return a("menubar.metric.total_cost");case"claude5h":return a("menubar.metric.claude_5h");case"claude7d":return a("menubar.metric.claude_7d");case"codex5h":return a("menubar.metric.codex_5h");case"codex7d":return a("menubar.metric.codex_7d");case"codexCredits":return a("menubar.metric.codex_credits");case"codexSpark5h":return a("menubar.metric.codex_spark_5h");case"codexSpark7d":return a("menubar.metric.codex_spark_7d");default:return i}}function ae(t,i){const l=new Set(i.map(o=>o.id)),s=t.filter(o=>l.has(o));for(const o of i){if(s.length>=2)break;s.includes(o.id)||s.push(o.id)}return s.slice(0,2)}function ie({slotConfigs:t,showStats:i}){return e.jsx("div",{className:"flex justify-center rounded-xl bg-gradient-to-b from-oai-gray-100 to-oai-gray-200 px-6 py-8 dark:from-oai-gray-950/80 dark:to-oai-gray-900/80",children:e.jsxs("div",{className:"inline-flex items-stretch rounded-md shadow-[0_1px_3px_rgba(0,0,0,0.18)] ring-1 ring-black/10 dark:ring-white/10 px-3",style:{background:"linear-gradient(180deg, #2c2c2e 0%, #1c1c1e 100%)"},children:[e.jsx("div",{className:"flex items-center pl-2 pr-1 py-2.5",children:e.jsx("img",{src:"/clawd/mini/idle-tight.svg",alt:"","aria-hidden":"true",className:"block shrink-0",style:{height:22,width:"auto"},draggable:"false"})}),i?t.map(({slot:l,item:s},o)=>e.jsxs(E.Fragment,{children:[o>0?e.jsx("span",{className:"my-1 w-px bg-white/20","aria-hidden":"true"}):null,e.jsxs("div",{className:A("flex min-w-[52px] flex-col items-center justify-center py-1.5",o===0?"pl-1 pr-2":"px-2"),children:[e.jsx("span",{className:"text-[13px] font-semibold leading-none tabular-nums text-white",children:s?.previewValue||"--"}),e.jsx("span",{className:"mt-[2px] text-[6px] font-semibold uppercase leading-none text-white/75",children:s?.shortLabel||a("widgets.preview.metric")})]})]},l)):null]})})}function se({slot:t,value:i,options:l,disabled:s,onChange:o}){const r=t===0?a("menubar.slot.primary"):a("menubar.slot.secondary");return e.jsxs("div",{className:"flex min-w-0 flex-col gap-1.5",children:[e.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-[0.08em] text-oai-gray-500 dark:text-oai-gray-400",children:r}),e.jsx(M,{value:i,disabled:s,ariaLabel:r,onValueChange:c=>o(t,c),options:l.map(c=>({value:c.id,label:c.displayLabel})),matchTriggerWidth:!0,className:"w-full px-3 py-2 text-sm font-medium"})]})}function C({label:t,hint:i,checked:l,disabled:s,onChange:o}){return e.jsxs("div",{className:"flex items-center justify-between gap-3 py-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-oai-black dark:text-white",children:t}),i?e.jsx("p",{className:"mt-0.5 text-xs text-oai-gray-500 dark:text-oai-gray-400",children:i}):null]}),e.jsx(R,{checked:l,disabled:s,onChange:o,ariaLabel:t})]})}function re({label:t,hint:i,value:l,options:s,disabled:o,onChange:r}){return e.jsxs("div",{className:"flex items-center justify-between gap-3 py-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-oai-black dark:text-white",children:t}),i?e.jsx("p",{className:"mt-0.5 text-xs text-oai-gray-500 dark:text-oai-gray-400",children:i}):null]}),e.jsx(M,{value:l,disabled:o,ariaLabel:t,onValueChange:r,options:s,className:"shrink-0 px-3 py-2 text-sm font-medium"})]})}function le(){const{available:t,settings:i,setSetting:l}=K(),s=u.useMemo(()=>(Array.isArray(i?.menuBarAvailableItems)?i.menuBarAvailableItems:W).map(m=>({...m,displayLabel:te(m.id,m.label),previewValue:ee(m)})),[i?.menuBarAvailableItems]),o=Number(i?.menuBarMaxItems)||2,r=u.useMemo(()=>v(i?.menuBarItems,s,o),[s,o,i?.menuBarItems]),c=u.useMemo(()=>ae(r,s),[s,r]),n=i?.showStats!==!1,h=d=>{l("menuBarItems",v(d,s,o))},b=(d,m)=>{const x=[...c];x[d===0?1:0]!==m&&(x[d]=m,h(x))},p=[0,1].map(d=>{const m=c[d]||s[d]?.id||"",k=c[d===0?1:0],T=s.filter(f=>f.id===m||f.id!==k),B=s.find(f=>f.id===m);return{slot:d,currentValue:m,options:T,item:B}}),F=["clawd","cat","pet","static"].includes(i?.menuBarIconStyle)?i.menuBarIconStyle:"clawd",w=i?.confettiOnReset!==!1;return e.jsxs("article",{className:"rounded-xl border border-oai-gray-200 bg-white p-5 transition-colors duration-200 dark:border-oai-gray-800 dark:bg-oai-gray-900 sm:p-6",children:[e.jsx(ie,{slotConfigs:p,showStats:n}),e.jsx("div",{className:"mt-5 grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4",children:p.map(({slot:d,currentValue:m,options:x})=>e.jsx(se,{slot:d,value:m,options:x,disabled:!t||!n,onChange:b},d))}),e.jsxs("div",{className:"mt-5 divide-y divide-oai-gray-100 border-t border-oai-gray-100 dark:divide-oai-gray-800 dark:border-oai-gray-800",children:[e.jsx(C,{label:a("settings.menubar.showStats"),hint:t?a("settings.menubar.showStatsHint"):a("menubar.native_only"),checked:n,disabled:!t,onChange:()=>l("showStats",!n)}),e.jsx(re,{label:a("settings.menubar.iconStyle"),hint:a("settings.menubar.iconStyleHint"),value:F,disabled:!t,options:[{value:"clawd",label:a("settings.menubar.iconStyle.clawd")},{value:"cat",label:a("settings.menubar.iconStyle.cat")},{value:"pet",label:a("settings.menubar.iconStyle.pet")},{value:"static",label:a("settings.menubar.iconStyle.static")}],onChange:d=>l("menuBarIconStyle",d)}),e.jsx(C,{label:a("settings.menubar.confettiOnReset"),hint:a("settings.menubar.confettiOnResetHint"),checked:w,disabled:!t,onChange:()=>l("confettiOnReset",!w)})]})]})}function oe(){const[t,i]=u.useState("loading");return u.useEffect(()=>{if(typeof window>"u")return;if($()){i("native");return}const l=(navigator.userAgent||"").toLowerCase(),s=/mac/.test(l)&&!/iphone|ipad/.test(l);i(s?"mac-web":"other")},[]),t}function ne(){const t=oe();return t==="loading"?e.jsx("div",{className:"h-10 w-40","aria-hidden":"true"}):t==="native"?e.jsxs("button",{type:"button",onClick:()=>P("openWidgetGallery"),className:"inline-flex h-10 items-center gap-2 rounded-lg bg-oai-black px-4 text-sm font-medium text-white transition-colors hover:bg-oai-gray-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 focus-visible:ring-offset-2 dark:bg-white dark:text-oai-black dark:hover:bg-oai-gray-200",children:[a("widgets.cta.open_gallery"),e.jsx(O,{className:"h-4 w-4","aria-hidden":"true"})]}):t==="mac-web"?e.jsxs("a",{href:"https://github.com/mm7894215/TokenTracker/releases/latest",target:"_blank",rel:"noopener noreferrer",className:"inline-flex h-10 items-center gap-2 rounded-lg bg-oai-black px-4 text-sm font-medium text-white no-underline transition-colors hover:bg-oai-gray-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 focus-visible:ring-offset-2 dark:bg-white dark:text-oai-black dark:hover:bg-oai-gray-200",children:[e.jsx(z,{className:"h-4 w-4","aria-hidden":"true"}),a("widgets.cta.download")]}):e.jsxs("span",{className:"inline-flex h-10 items-center gap-2 rounded-lg border border-oai-gray-200 bg-oai-gray-50 px-4 text-sm font-medium text-oai-gray-500 dark:border-oai-gray-800 dark:bg-oai-gray-900 dark:text-oai-gray-400",children:[e.jsx(I,{className:"h-4 w-4","aria-hidden":"true"}),a("widgets.cta.macos_only")]})}const ce=[{id:"summary",Preview:Z,nameKey:"widgets.summary.name",descKey:"widgets.summary.description"},{id:"heatmap",Preview:q,nameKey:"widgets.heatmap.name",descKey:"widgets.heatmap.description"},{id:"topModels",Preview:J,nameKey:"widgets.topModels.name",descKey:"widgets.topModels.description"},{id:"limits",Preview:Q,nameKey:"widgets.limits.name",descKey:"widgets.limits.description"}];function de({Preview:t,nameKey:i,descKey:l}){return e.jsxs("article",{className:"flex h-full flex-col rounded-xl border border-oai-gray-200 bg-white p-4 transition-colors duration-200 dark:border-oai-gray-800 dark:bg-oai-gray-900 sm:p-5",children:[e.jsx(t,{}),e.jsxs("div",{className:"mt-4",children:[e.jsx("h3",{className:"text-[15px] font-semibold text-oai-black dark:text-white",children:a(i)}),e.jsx("p",{className:"mt-1.5 text-sm leading-relaxed text-oai-gray-500 dark:text-oai-gray-400",children:a(l)})]})]})}function _({titleKey:t}){return e.jsx("h2",{className:"mb-4 text-xl font-semibold tracking-tight text-oai-black dark:text-white sm:mb-5 sm:text-2xl",children:a(t)})}function Le(){return e.jsx("div",{className:"flex flex-col flex-1 text-oai-black dark:text-oai-white font-oai antialiased",children:e.jsx("main",{className:"flex-1 pt-8 sm:pt-10 pb-12 sm:pb-16",children:e.jsxs("div",{className:"mx-auto max-w-5xl px-4 sm:px-6",children:[e.jsx(j,{y:12,children:e.jsxs("header",{className:"mb-10 flex items-start justify-between gap-4 sm:mb-12",children:[e.jsx("h1",{className:"text-3xl font-semibold tracking-tight text-oai-black dark:text-white sm:text-4xl",children:a("widgets.page.title")}),e.jsx("div",{className:"shrink-0",children:e.jsx(ne,{})})]})}),e.jsx(j,{y:12,delay:.06,children:e.jsxs("section",{"aria-label":a("widgets.menubar.section.title"),className:"mb-12 sm:mb-14",children:[e.jsx(_,{titleKey:"widgets.menubar.section.title"}),e.jsx(le,{})]})}),e.jsxs("section",{"aria-label":a("widgets.gallery.section.title"),children:[e.jsx(_,{titleKey:"widgets.gallery.section.title"}),e.jsx(D,{staggerDelay:.08,initialDelay:.04,children:e.jsx("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2 lg:gap-5",children:ce.map(({id:t,Preview:i,nameKey:l,descKey:s})=>e.jsx(G,{children:e.jsx(de,{Preview:i,nameKey:l,descKey:s})},t))})})]})]})})})}export{Le as WidgetsPage};
@@ -1 +0,0 @@
1
- import{r as o}from"./__vite-browser-external-Bu1cBb_7.js";import{h as r,i as t,p as s}from"./react-CuWBndC4.js";function i(){!r.current&&t();const[e]=o.useState(s.current);return e}export{i as u};