tokentracker-cli 1.2.1 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/README.md +2 -0
  2. package/README.zh-CN.md +2 -0
  3. package/dashboard/dist/assets/AchievementBadge-BaqdyZaV.js +1 -0
  4. package/dashboard/dist/assets/AchievementsPage-B4Ju0guv.js +2 -0
  5. package/dashboard/dist/assets/{AchievementsSection-DoYMz2Rr.js → AchievementsSection-CDUUEfIi.js} +1 -1
  6. package/dashboard/dist/assets/BadgeDetailModal-B-XMJAvL.js +1 -0
  7. package/dashboard/dist/assets/{BotAnimated-C21PdYSf.js → BotAnimated-Dx_vvTtC.js} +1 -1
  8. package/dashboard/dist/assets/Card-D-5mABVt.js +1 -0
  9. package/dashboard/dist/assets/CloudCheckoutPage-BELoh56h.js +1 -0
  10. package/dashboard/dist/assets/CloudPage-CfBruNxe.js +1 -0
  11. package/dashboard/dist/assets/CloudUsageExport-BoFU7xCT.js +4 -0
  12. package/dashboard/dist/assets/CommandPalette-BmmKZWn-.js +1 -0
  13. package/dashboard/dist/assets/CommunityStatsModal-BF77zVhN.js +1 -0
  14. package/dashboard/dist/assets/{ConfirmModal-zUljpLNe.js → ConfirmModal-BQ-xB1S_.js} +1 -1
  15. package/dashboard/dist/assets/Controls-BnTeX7T4.js +1 -0
  16. package/dashboard/dist/assets/DashboardPage-BWulHa5J.js +1 -0
  17. package/dashboard/dist/assets/{DevicePage-CCIyAYH3.js → DevicePage-Dg6XkIaY.js} +1 -1
  18. package/dashboard/dist/assets/DialogClose-DAyilsH-.js +1 -0
  19. package/dashboard/dist/assets/DialogDescription-j4XnRy6y.js +1 -0
  20. package/dashboard/dist/assets/{DialogTitle-6q0jyME6.js → DialogTitle-B1iNGD2S.js} +1 -1
  21. package/dashboard/dist/assets/{FadeIn-BUm1z22V.js → FadeIn-ChVf45WW.js} +1 -1
  22. package/dashboard/dist/assets/{HeaderGithubStar-CxdmloMy.js → HeaderGithubStar-B740_G7a.js} +1 -1
  23. package/dashboard/dist/assets/{HoverTooltip-CrMdGYZj.js → HoverTooltip-BzP5FudR.js} +1 -1
  24. package/dashboard/dist/assets/{IpCheckPage-w6UUK_1K.js → IpCheckPage-BuZH3F14.js} +1 -1
  25. package/dashboard/dist/assets/LandingPage-Dtgq_caz.js +2 -0
  26. package/dashboard/dist/assets/LeaderboardPage-Di1kEg2O.js +2 -0
  27. package/dashboard/dist/assets/LeaderboardProBadge-h8FfR0au.js +1 -0
  28. package/dashboard/dist/assets/LeaderboardProfileModal-OUZvO6u-.js +73 -0
  29. package/dashboard/dist/assets/{LeaderboardProfilePage-Fljho5RP.js → LeaderboardProfilePage-bHI1oTEK.js} +2 -2
  30. package/dashboard/dist/assets/{LimitsPage-Do_uJqdQ.js → LimitsPage-DKojB73_.js} +2 -2
  31. package/dashboard/dist/assets/{LocalOnlyNotice-RIj2XT_X.js → LocalOnlyNotice-BaEq6qN7.js} +1 -1
  32. package/dashboard/dist/assets/LoginCard-Dn5Xy4If.js +1 -0
  33. package/dashboard/dist/assets/LoginModal-C5h-5GOA.js +1 -0
  34. package/dashboard/dist/assets/LoginPage-BpX8Tgjj.js +1 -0
  35. package/dashboard/dist/assets/PetPage-BPBsUHyL.js +1 -0
  36. package/dashboard/dist/assets/PopoverPopup-CVTiEVHs.js +1 -0
  37. package/dashboard/dist/assets/{ProviderIcon-BSI-1Cy8.js → ProviderIcon-BshO2uER.js} +1 -1
  38. package/dashboard/dist/assets/ResetPasswordPage-RTFTD8Dr.js +1 -0
  39. package/dashboard/dist/assets/{Select-B6CM0ico.js → Select-CtTceC4T.js} +1 -1
  40. package/dashboard/dist/assets/SelectItemText-C7xi8iGp.js +1 -0
  41. package/dashboard/dist/assets/SelfHostPage-BlwTt8XM.js +1 -0
  42. package/dashboard/dist/assets/{ServiceStatusPage-B4lIs2fc.js → ServiceStatusPage-BkIcJpYK.js} +1 -1
  43. package/dashboard/dist/assets/SessionsPage-okHobk_L.js +3 -0
  44. package/dashboard/dist/assets/SettingsPage-C-cc6wcF.js +2 -0
  45. package/dashboard/dist/assets/SkillsPage-D2LlKKJN.js +1 -0
  46. package/dashboard/dist/assets/{TokenGalaxy-Bk3kGSGi.js → TokenGalaxy-DiXUpXKF.js} +2 -2
  47. package/dashboard/dist/assets/TrendMonitor-C88S-5aa.js +19 -0
  48. package/dashboard/dist/assets/WidgetsPage-WsEFPNwp.js +1 -0
  49. package/dashboard/dist/assets/{WrappedPage-DHRmP4Ey.js → WrappedPage-ClEo-RmR.js} +1 -1
  50. package/dashboard/dist/assets/__vite-browser-external-DFRX9dp-.css +1 -0
  51. package/dashboard/dist/assets/__vite-browser-external-DUJeOWgd.js +45 -0
  52. package/dashboard/dist/assets/agent-logos-BM9jlReI.js +1 -0
  53. package/dashboard/dist/assets/arrow-left-BEM-HVmC.js +1 -0
  54. package/dashboard/dist/assets/arrow-right-CwBz5dwb.js +1 -0
  55. package/dashboard/dist/assets/{arrow-up-right-c39fdiDQ.js → arrow-up-right-jPmRN562.js} +1 -1
  56. package/dashboard/dist/assets/{check-8LQ7IvkH.js → check-CKwHc4Hv.js} +1 -1
  57. package/dashboard/dist/assets/cloud-checkout-nYNHDFoR.js +1 -0
  58. package/dashboard/dist/assets/composite-B4Z3F65o.js +1 -0
  59. package/dashboard/dist/assets/{download-x3Gmv-wu.js → download-CJUnX1Bs.js} +1 -1
  60. package/dashboard/dist/assets/{external-link-daw-XTjZ.js → external-link-B5yXxdPy.js} +1 -1
  61. package/dashboard/dist/assets/{flame-B9o0_EF8.js → flame-CKjAluj_.js} +1 -1
  62. package/dashboard/dist/assets/{format-tokens-o9atQGtV.js → format-tokens-mk49THtv.js} +1 -1
  63. package/dashboard/dist/assets/{host-mode-GPY2DxE4.js → host-mode-efKlSYjX.js} +1 -1
  64. package/dashboard/dist/assets/{icons-CmM2z-Jt.js → icons-ZB1ZthjH.js} +1 -1
  65. package/dashboard/dist/assets/{index-CPcJP0uH.js → index-BImBG3eS.js} +1 -1
  66. package/dashboard/dist/assets/{index-CtQOew7C.js → index-BgdM7kBl.js} +1 -1
  67. package/dashboard/dist/assets/{index-Bfgblk6o.js → index-DweUMAUD.js} +1 -1
  68. package/dashboard/dist/assets/{info-BaK8Hoi2.js → info-CyDY7NYM.js} +1 -1
  69. package/dashboard/dist/assets/{link-2-CV3uvMH3.js → link-2-Dn2soiyd.js} +1 -1
  70. package/dashboard/dist/assets/{loader-circle-DYpa-xTZ.js → loader-circle-CNT630zn.js} +1 -1
  71. package/dashboard/dist/assets/{modifiers.esm-Ds4Uh7JO.js → modifiers.esm-WPx0bc2K.js} +1 -1
  72. package/dashboard/dist/assets/{monitor-smartphone-BbeYHvY-.js → monitor-smartphone-C-qC0RAt.js} +1 -1
  73. package/dashboard/dist/assets/os-DMmhX9tk.js +1 -0
  74. package/dashboard/dist/assets/{plus-C9qGVLFv.js → plus-Cx82jb7o.js} +1 -1
  75. package/dashboard/dist/assets/{provider-display-BWYNyitK.js → provider-display-CodMmiRb.js} +2 -2
  76. package/dashboard/dist/assets/{react-CO1HovF5.js → react-B7SkZTgg.js} +1 -1
  77. package/dashboard/dist/assets/safePolygon-CKpREa4K.js +1 -0
  78. package/dashboard/dist/assets/{search-DBnhkzG_.js → search-Ol3OZBm4.js} +1 -1
  79. package/dashboard/dist/assets/server-DFCbznC7.js +1 -0
  80. package/dashboard/dist/assets/shield-check-YcmLwVZ6.js +1 -0
  81. package/dashboard/dist/assets/skills-api-C-9vK884.js +1 -0
  82. package/dashboard/dist/assets/{sortable.esm-SVl6OixH.js → sortable.esm-CKC9NuR-.js} +1 -1
  83. package/dashboard/dist/assets/store-C9yWYHfg.js +1 -0
  84. package/dashboard/dist/assets/{terminal-kUMdPZhq.js → terminal-B3_fCLFs.js} +1 -1
  85. package/dashboard/dist/assets/{trash-Dd_vbrYo.js → trash-CZGfgbFa.js} +1 -1
  86. package/dashboard/dist/assets/{use-community-stats-Bmlmv4H-.js → use-community-stats-CW-qkYn7.js} +1 -1
  87. package/dashboard/dist/assets/{use-latest-request-guard-CqZwzrCW.js → use-latest-request-guard-DHv7vfFE.js} +1 -1
  88. package/dashboard/dist/assets/{use-limits-display-prefs-CDC0MZRY.js → use-limits-display-prefs-NZ-AAYD5.js} +1 -1
  89. package/dashboard/dist/assets/use-native-settings-CWiLqfZh.js +1 -0
  90. package/dashboard/dist/assets/{use-ordered-list-DvBI7mUU.js → use-ordered-list-Df8pw-WJ.js} +1 -1
  91. package/dashboard/dist/assets/use-pet-settings-Bg2CDprr.js +2 -0
  92. package/dashboard/dist/assets/use-reduced-motion-iDZEUyua.js +1 -0
  93. package/dashboard/dist/assets/{use-transform-uSKYTYaW.js → use-transform-BHwEAfmO.js} +1 -1
  94. package/dashboard/dist/assets/use-usage-limits-CSxFFn3_.js +1 -0
  95. package/dashboard/dist/assets/{useCurrency-t1iy_pC3.js → useCurrency-pwClnCZ5.js} +1 -1
  96. package/dashboard/dist/assets/usePositioner-B0j1orGj.js +1 -0
  97. package/dashboard/dist/assets/useTokenFormat-BMvVAe6V.js +1 -0
  98. package/dashboard/dist/assets/{zap-DFM6AsYo.js → zap-DvX2aYx5.js} +1 -1
  99. package/dashboard/dist/index.html +2 -2
  100. package/dashboard/dist/ip-check.html +2 -2
  101. package/dashboard/dist/leaderboard.html +2 -2
  102. package/dashboard/dist/pricing.html +6 -5
  103. package/dashboard/dist/privacy.html +3 -3
  104. package/dashboard/dist/share.html +2 -2
  105. package/dashboard/dist/terms.html +6 -6
  106. package/package.json +6 -2
  107. package/src/commands/device-login.js +60 -33
  108. package/src/commands/init.js +26 -7
  109. package/src/commands/serve.js +3 -3
  110. package/src/commands/sync.js +43 -22
  111. package/src/lib/atomic-json.js +27 -0
  112. package/src/lib/bearer-token.js +11 -0
  113. package/src/lib/cloud-account.js +4 -1
  114. package/src/lib/local-api.js +282 -69
  115. package/src/lib/openclaw-cli.js +104 -0
  116. package/src/lib/openclaw-hook.js +1 -46
  117. package/src/lib/openclaw-session-plugin.js +1 -59
  118. package/src/lib/pricing/seed-snapshot.json +1 -1
  119. package/src/lib/proxy-env.js +8 -3
  120. package/src/lib/rollout.js +15 -10
  121. package/src/lib/runtime-config.js +84 -14
  122. package/src/lib/skills-manager.js +8 -1
  123. package/src/lib/static-server.js +19 -4
  124. package/src/lib/upload-throttle.js +18 -4
  125. package/dashboard/dist/assets/AchievementBadge-DPlXNqoK.js +0 -1
  126. package/dashboard/dist/assets/AchievementsPage-B49wjdK_.js +0 -2
  127. package/dashboard/dist/assets/BadgeDetailModal-DUCS6K1n.js +0 -1
  128. package/dashboard/dist/assets/Card-BU2CqxfU.js +0 -1
  129. package/dashboard/dist/assets/CommandPalette-O3pOLyJo.js +0 -1
  130. package/dashboard/dist/assets/CommunityStatsModal-Bt82neQ7.js +0 -1
  131. package/dashboard/dist/assets/Controls-D56v-YJw.js +0 -1
  132. package/dashboard/dist/assets/DashboardPage-CKEuFzuc.js +0 -1
  133. package/dashboard/dist/assets/DialogClose-C-QK97qp.js +0 -1
  134. package/dashboard/dist/assets/DialogDescription-COXweCuc.js +0 -1
  135. package/dashboard/dist/assets/LandingPage-DLDE7wdR.js +0 -2
  136. package/dashboard/dist/assets/LeaderboardAvatar-BqD4dEvQ.js +0 -1
  137. package/dashboard/dist/assets/LeaderboardPage-kgHSryiT.js +0 -2
  138. package/dashboard/dist/assets/LeaderboardProfileModal-zLdeOiA3.js +0 -73
  139. package/dashboard/dist/assets/LoginCard-Dx6MmGjU.js +0 -1
  140. package/dashboard/dist/assets/LoginModal-BWaZVRnT.js +0 -1
  141. package/dashboard/dist/assets/LoginPage-BNkU-riS.js +0 -1
  142. package/dashboard/dist/assets/PetPage-CyEgU2Vm.js +0 -1
  143. package/dashboard/dist/assets/PopoverPopup-CmUIY8lF.js +0 -1
  144. package/dashboard/dist/assets/ResetPasswordPage-CUXKkLb4.js +0 -1
  145. package/dashboard/dist/assets/SelectItemText-CZ7puxuB.js +0 -1
  146. package/dashboard/dist/assets/SessionsPage-D99UfBgy.js +0 -3
  147. package/dashboard/dist/assets/SettingsPage-DT3rld91.js +0 -2
  148. package/dashboard/dist/assets/SkillsPage-Dv47kVCB.js +0 -1
  149. package/dashboard/dist/assets/TrendMonitor-mB1x3c_o.js +0 -19
  150. package/dashboard/dist/assets/WidgetsPage-BhUArowe.js +0 -1
  151. package/dashboard/dist/assets/__vite-browser-external-BW1rxvYq.js +0 -45
  152. package/dashboard/dist/assets/__vite-browser-external-gKkiQad5.css +0 -1
  153. package/dashboard/dist/assets/agent-logos-D7f7AMF-.js +0 -1
  154. package/dashboard/dist/assets/composite-BgLSXWKA.js +0 -1
  155. package/dashboard/dist/assets/skills-api-BSkbxC8-.js +0 -1
  156. package/dashboard/dist/assets/store-DrEEdO_u.js +0 -1
  157. package/dashboard/dist/assets/use-pet-settings-C_FrqySO.js +0 -2
  158. package/dashboard/dist/assets/use-reduced-motion-BEOENqBa.js +0 -1
  159. package/dashboard/dist/assets/use-session-efficiency-pref-D8cAb4A9.js +0 -1
  160. package/dashboard/dist/assets/use-usage-limits-DFgOKTtv.js +0 -1
  161. package/dashboard/dist/assets/useTokenFormat-0bPjtaaM.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as s,j as a,a6 as g,aa as x,c as C}from"./__vite-browser-external-DUJeOWgd.js";import{m as u}from"./react-B7SkZTgg.js";import{P as j}from"./ProviderIcon-BshO2uER.js";import{A as f}from"./index-BImBG3eS.js";function w(d){const e=[...d];for(let i=e.length-1;i>0;i--){const o=Math.floor(Math.random()*(i+1));[e[i],e[o]]=[e[o],e[i]]}return e}function L(d,e){const i=w(d),o=Array.from({length:e},()=>[]);i.forEach((r,m)=>{o[m%e].push(r)});const p=Math.max(...o.map(r=>r.length));return o.forEach(r=>{for(;r.length<p;)r.push(i[Math.floor(Math.random()*i.length)])}),o}const b=g.memo(function({logos:e,index:i,currentTime:o,onHoverChange:p}){x();const[r,m]=s.useState(!1),l=4e3,v=i*400,n=(o+v)%(l*e.length),t=Math.floor(n/l),c=e[t],y=h=>{m(h),p(h)};return a.jsxs("div",{className:"relative flex flex-col items-center",onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),children:[a.jsx(u.div,{className:"relative h-8 w-8 sm:h-10 sm:w-10 md:h-12 md:w-12 overflow-hidden",initial:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{delay:i*.1,duration:.5,ease:"easeOut"},children:a.jsx(f,{mode:"wait",children:a.jsx(u.div,{className:"absolute inset-0 flex items-center justify-center",initial:{y:"18%",opacity:0,filter:"blur(4px)"},animate:{y:"0%",opacity:1,filter:"blur(0px)",transition:{type:"tween",ease:[.22,1,.36,1],duration:.9}},exit:{y:"-18%",opacity:0,filter:"blur(4px)",transition:{type:"tween",ease:[.4,0,1,1],duration:.55}},children:a.jsx(j,{provider:c.provider,size:24,className:"object-contain"})},`${c.id}-${t}`)})}),a.jsx(f,{children:r&&a.jsx(u.span,{className:"pointer-events-none absolute -bottom-7 z-10 whitespace-nowrap rounded bg-oai-gray-800 px-2 py-0.5 text-xs font-medium text-oai-gray-100 shadow-lg ring-1 ring-oai-gray-700",initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},children:c.nameKey?C(c.nameKey):c.name})})]})});function A({logos:d,columnCount:e=2}){const[i,o]=s.useState([]),[p,r]=s.useState(0),[m,l]=s.useState(!1);s.useEffect(()=>{o(L(d,e))},[d,e]),s.useEffect(()=>{if(m)return;const n=setInterval(()=>r(t=>t+400),400);return()=>clearInterval(n)},[m]);const v=s.useCallback(n=>{l(n)},[]);return a.jsx("div",{className:"flex gap-2.5 sm:gap-4 text-oai-gray-200",children:i.map((n,t)=>a.jsx(b,{logos:n,index:t,currentTime:p,onHoverChange:v},t))})}const E=[{id:1,name:"Claude Code",provider:"claude"},{id:2,name:"Codex",provider:"codex"},{id:3,name:"Cursor",provider:"cursor"},{id:4,name:"Gemini",provider:"gemini"},{id:5,name:"Antigravity",provider:"antigravity"},{id:6,name:"Kiro",provider:"kiro"},{id:7,name:"OpenCode",provider:"opencode"},{id:8,name:"OpenClaw",provider:"openclaw"},{id:9,name:"Every Code",provider:"every-code"},{id:10,name:"Hermes",provider:"hermes"},{id:11,name:"GitHub Copilot",provider:"copilot"},{id:12,name:"Kimi",provider:"kimi"},{id:13,name:"CodeBuddy",provider:"codebuddy"},{id:14,name:"WorkBuddy",provider:"workbuddy"},{id:15,name:"Grok",provider:"grok"},{id:16,name:"oh-my-pi",provider:"omp"},{id:17,name:"Pi",provider:"pi"},{id:18,name:"Dots",provider:"dots"},{id:19,name:"Prime Agent",provider:"prime-agent"},{id:20,name:"Craft",provider:"craft"},{id:21,name:"Reasonix",provider:"reasonix"},{id:22,name:"Kilo CLI",provider:"kilo-cli"},{id:23,name:"Kilo Code",provider:"kilocode"},{id:24,name:"Roo Code",provider:"roocode"},{id:25,name:"Zed",provider:"zed"},{id:26,name:"Goose",provider:"goose"},{id:27,name:"Droid",provider:"droid"},{id:28,name:"Mimo",provider:"mimo"},{id:29,name:"ZCode",provider:"zcode"},{id:30,name:"Qoder",provider:"qoder"},{id:31,name:"AnythingLLM",provider:"anythingllm"},{id:32,name:"Claude Science",provider:"claude-science"},{id:33,name:"DeepSeek Harness",provider:"dsh"},{id:34,nameKey:"provider.display.trae_work_cn",provider:"trae-cn"},{id:35,name:"AStudio",provider:"acode"},{id:36,name:"LM Studio",provider:"lmstudio"},{id:37,name:"Unsloth Studio",provider:"unsloth"},{id:38,name:"Devin CLI",provider:"devin"},{id:39,nameKey:"provider.display.omo",provider:"omo"},{id:40,nameKey:"provider.display.cline",provider:"cline"},{id:41,nameKey:"provider.display.minimax_code",provider:"minimax-code"},{id:42,nameKey:"provider.display.command_code",provider:"command-code"},{id:43,nameKey:"provider.display.trae",provider:"trae"}];export{E as A,A as L};
@@ -0,0 +1 @@
1
+ import{A as o}from"./__vite-browser-external-DUJeOWgd.js";const e={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};e.node;const a=o(e);export{a as A};
@@ -0,0 +1 @@
1
+ import{A as a}from"./__vite-browser-external-DUJeOWgd.js";const o={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};o.node;const t=a(o);export{t as A};
@@ -1 +1 @@
1
- import{q as t}from"./__vite-browser-external-BW1rxvYq.js";const o={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};o.node;const e=t(o);export{e as A};
1
+ import{A as t}from"./__vite-browser-external-DUJeOWgd.js";const o={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};o.node;const e=t(o);export{e as A};
@@ -1 +1 @@
1
- import{q as c}from"./__vite-browser-external-BW1rxvYq.js";const e={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};e.node;const a=c(e);export{a as C};
1
+ import{A as c}from"./__vite-browser-external-DUJeOWgd.js";const e={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};e.node;const a=c(e);export{a as C};
@@ -0,0 +1 @@
1
+ import{D as u,E as d,F as f,G as l,H as _,I as p}from"./__vite-browser-external-DUJeOWgd.js";const h="tt.cloud.purchase.",g=["sku","provider","request_id","order_id","retry_order_id","retry_request_id"];function s(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const r={};for(const t of g)typeof e[t]=="string"&&e[t].length<=128&&(r[t]=e[t]);return r}function o(e){return`${h}${encodeURIComponent(u()||"unconfigured")}.${e}`}const y=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function c(e){try{const r=JSON.parse(localStorage.getItem(o(e))||"null");if(r?.userId!==void 0&&r.userId!==e)return null;const t=s(r);return t?{...t,userId:e}:null}catch{return null}}function a(e,r){try{const t=s(r);if(!t)return;localStorage.setItem(o(e),JSON.stringify(t))}catch{}}function v(e){try{localStorage.removeItem(o(e))}catch{}}function E(e,r,t){const n=c(e);if(n?.sku===r&&n.provider===t&&n.request_id)return n;if(n?.request_id)throw new Error("checkout_request_conflict");const i={sku:r,provider:t,request_id:crypto.randomUUID()};return a(e,i),i}function R(e,r){const t=c(e);if(t?.order_id&&t.order_id!==r.id)throw new Error("checkout_request_conflict");if(t?.request_id&&!t.order_id)throw new Error("checkout_request_conflict");if(t?.retry_order_id===r.id&&t.retry_request_id)return t;const n={...t,sku:r.sku,provider:r.provider,order_id:r.id,retry_order_id:r.id,retry_request_id:crypto.randomUUID()};return a(e,n),n}function m(e,r){return e?e.payment_state==="refunded"?"refunded":e.status==="paid"?r?.status==="active"?"success":r?.status==="expired"?"expired":"activating":["closed","canceled","cancelled"].includes(e.status)?"canceled":e.status==="expired"||e.expires_at&&Date.parse(e.expires_at)<=Date.now()?"expired":e.checkout_url?"awaiting":"creating":"review"}async function q(e){let r;try{r=new URL(e)}catch{throw new Error("invalid_provider_checkout_url")}if(r.username||r.password||r.protocol!=="https:"&&!(r.protocol==="http:"&&["localhost","127.0.0.1"].includes(r.hostname)))throw new Error("invalid_provider_checkout_url");if(d()){const t=f();if(!t)throw new Error("browser_open_failed");await t.postMessage(r.toString())}else if(l()||_()){if(!p({type:"action",name:"openURL",value:r.toString()}))throw new Error("browser_open_failed")}else window.open(r.toString(),"_blank","noopener,noreferrer")}export{y as C,v as a,R as b,m as c,E as g,q as o,c as r,a as s};
@@ -0,0 +1 @@
1
+ import{bN as Xt,cF as Ve,cG as Kt,aF as je,aK as L,aD as Vt,aM as X,cH as Ot,bG as ze,j as ve,cI as Je,r as m,aJ as Y,cJ as st,cK as qt,bO as it,aI as We,cL as $t,cM as ct,aO as I,aN as Pe,bw as me,bY as qe,cN as fe,bZ as de,aT as w,aP as wt,cO as xt,bX as Qe,b$ as jt,bq as ut,bk as at,bm as zt,cP as Jt,cQ as It,cR as Ze,bz as Be,aQ as ye,cS as Qt,bp as Zt,cT as en,$ as ke,bh as tn,cU as Ye,be as Pt,aH as Le,bf as kt,aL as Ie,bC as Ge,bB as nn,cV as rn,by as on,bd as sn,cW as be,bT as cn,bv as un,a1 as _e,an,cX as ln,b_ as fn,cY as dn,bH as pn}from"./__vite-browser-external-DUJeOWgd.js";const gn="data-open",hn="data-closed",mn="data-anchor-hidden",Ft="data-popup-open",bn="data-pressed",yn={[Ft]:""},En={[Ft]:"",[bn]:""},Tn={[gn]:""},Rn={[hn]:""},vn={[mn]:""},nr={open(e){return e?yn:null}},rr={open(e){return e?En:null}},Sn={open(e){return e?Tn:Rn},anchorHidden(e){return e?vn:null}},or={...Sn,...Xt};function Fe(e,t,n=!0){return e.filter(o=>o.parentId===t).flatMap(o=>[...!n||o.context?.open?[o]:[],...Fe(e,o.id,n)])}function lt(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){const o=e.find(s=>s.id===r);r=o?.parentId,o&&(n=n.concat(o))}return n}function Cn(e){e.preventDefault(),e.stopPropagation()}function On(e){return"nativeEvent"in e}function Mt(e){return e.pointerType===""&&e.isTrusted?!0:Ve&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function wn(e){return Kt?!1:!Ve&&e.width===0&&e.height===0||Ve&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function sr(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function xn(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function Ae(e){const t=je(In,e).current;return t.next=e,L(t.effect),t}function In(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let Ne=0;function Ue(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:o}=t;cancelAnimationFrame(Ne);function s(){o&&!o()||e?.focus({preventScroll:n})}if(r)return s(),Vt;const i=requestAnimationFrame(s);return Ne=i,()=>{Ne===i&&(cancelAnimationFrame(i),Ne=0)}}const Xe={inert:new WeakMap,"aria-hidden":new WeakMap},ft="data-base-ui-inert",$e={inert:new WeakSet,"aria-hidden":new WeakSet};let xe=new WeakMap,Ke=0;function Pn(e){return $e[e]}function At(e){return e?Ot(e)?e.host:At(e.parentNode):null}const dt=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=At(n);return e.contains(r)?r:null}).filter(n=>n!=null),pt=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},gt=(e,t,n)=>{const r=[],o=s=>{!s||n.has(s)||Array.from(s.children).forEach(i=>{ze(i)!=="script"&&(t.has(i)?o(i):r.push(i))})};return o(e),r};function kn(e,t,n,r,{mark:o=!0}){let s=null;r?s="inert":n&&(s="aria-hidden");let i=null,a=null;const l=dt(t,e),f=o?gt(t,pt(l),new Set(l)):[],T=[],v=[];if(s){const d=Xe[s],b=Pn(s);a=b,i=d;const O=dt(t,Array.from(t.querySelectorAll("[aria-live]"))),K=l.concat(O);gt(t,pt(K),new Set(K)).forEach(S=>{const R=S.getAttribute(s),j=R!==null&&R!=="false",q=(d.get(S)||0)+1;d.set(S,q),T.push(S),q===1&&j&&b.add(S),j||S.setAttribute(s,s==="inert"?"":"true")})}return o&&f.forEach(d=>{const b=(xe.get(d)||0)+1;xe.set(d,b),v.push(d),b===1&&d.setAttribute(ft,"")}),Ke+=1,()=>{i&&T.forEach(d=>{const O=(i.get(d)||0)-1;i.set(d,O),O||(!a?.has(d)&&s&&d.removeAttribute(s),a?.delete(d))}),o&&v.forEach(d=>{const b=(xe.get(d)||0)-1;xe.set(d,b),b||d.removeAttribute(ft)}),Ke-=1,Ke||(Xe.inert=new WeakMap,Xe["aria-hidden"]=new WeakMap,$e.inert=new WeakSet,$e["aria-hidden"]=new WeakSet,xe=new WeakMap)}}function ht(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:o=!0}=t,s=X(e[0]).body;return kn(e,s,n,r,{mark:o})}function Nt(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}class Fn{nodesRef={current:[]};events=Nt();addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const Wt=m.createContext(null),Lt=m.createContext(null),et=()=>m.useContext(Wt)?.id||null,tt=e=>{const t=m.useContext(Lt);return e??t};function ir(e){const t=Je(),n=tt(e),r=et();return L(()=>{if(!t)return;const o={id:t,parentId:r};return n?.addNode(o),()=>{n?.removeNode(o)}},[n,t,r]),t}function cr(e){const{children:t,id:n}=e,r=et();return ve.jsx(Wt.Provider,{value:m.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function ur(e){const{children:t,externalTree:n}=e,r=je(()=>n??new Fn).current;return ve.jsx(Lt.Provider,{value:r,children:t})}function Mn(e,t){const n=Be(ye(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const mt=20;let pe=[];function nt(){pe=pe.filter(e=>e.deref()?.isConnected)}function bt(e){nt(),e&&ze(e)!=="body"&&(pe.push(new WeakRef(e)),pe.length>mt&&(pe=pe.slice(-mt)))}function yt(){return nt(),pe[pe.length-1]?.deref()}function An(e){return e?Ze(e)?e:It(e)[0]||e:null}function Et(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const n=Qt(e).filter(o=>{const s=o.getAttribute("data-tabindex")||"";return Ze(o)||o.hasAttribute("data-tabindex")&&!s.startsWith("-")}),r=e.getAttribute("tabindex");n.length===0?r!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(r!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function ar(e){const{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:s=!0,restoreFocus:i=!1,modal:a=!0,closeOnFocusOut:l=!0,openInteractionType:f="",nextFocusableElement:T,previousFocusableElement:v,beforeContentFocusGuardRef:d,externalTree:b,getInsideElements:O}=e,K="rootStore"in t?t.rootStore:t,F=K.useState("open"),S=K.useState("domReferenceElement"),R=K.useState("floatingElement"),{events:j,dataRef:q}=K.context,$=Y(()=>q.current.floatingContext?.nodeId),ae=o===!1,M=st(S)&&ae,Z=Ae(o),se=Ae(s),ee=Ae(f),D=Ae(F),G=tt(b),C=qt(),N=m.useRef(!1),le=m.useRef(!1),te=m.useRef(!1),Ee=m.useRef(null),ie=m.useRef(""),z=m.useRef(""),ge=m.useRef(null),he=m.useRef(null),Se=it(ge,d,C?.beforeInsideRef),Me=it(he,C?.afterInsideRef),y=We(),B=We(),A=$t(),Te=C!=null,E=ct(R),ne=Y((h=E)=>h?It(h):[]),re=Y(()=>O?.().filter(h=>h!=null)??[]);m.useEffect(()=>{if(r||!a)return;function h(W){W.key==="Tab"&&w(E,de(X(E)))&&ne().length===0&&!M&&Cn(W)}const P=X(E);return I(P,"keydown",h)},[r,E,a,M,ne]),m.useEffect(()=>{if(r||!F)return;const h=X(E);function P(){te.current=!1}function W(oe){const g=ye(oe),x=re(),p=w(R,g)||w(S,g)||w(C?.portalNode,g)||x.some(k=>k===g||w(k,g));te.current=!p,z.current=oe.pointerType||"keyboard",g?.closest(`[${Zt}]`)&&(le.current=!0,B.start(0,()=>{le.current=!1}))}function _(){z.current="keyboard"}return Pe(I(h,"pointerdown",W,!0),I(h,"pointerup",P,!0),I(h,"pointercancel",P,!0),I(h,"keydown",_,!0),P)},[r,R,S,E,F,C,B,re]),m.useEffect(()=>{if(r||!l)return;const h=X(E);function P(){le.current=!0,B.start(0,()=>{le.current=!1})}function W(x){const p=ye(x);Ze(p)&&(Ee.current=p)}function _(x){const p=x.relatedTarget,k=x.currentTarget,V=ye(x);a&&p==null&&V!=null&&w(R,V)&&bt(V),queueMicrotask(()=>{const J=$(),Q=K.context.triggerElements,Ce=re(),Re=p?.hasAttribute(qe("focus-guard"))&&[ge.current,he.current,C?.beforeInsideRef.current,C?.afterInsideRef.current,C?.beforeOutsideRef.current,C?.afterOutsideRef.current,fe(v),fe(T)].includes(p),u=!(w(S,p)||w(R,p)||w(p,R)||w(C?.portalNode,p)||Ce.some(c=>c===p||w(c,p))||Q.hasMatchingElement(c=>w(c,p))||Re||G&&(Fe(G.nodesRef.current,J).find(c=>w(c.context?.elements.floating,p)||w(c.context?.elements.domReference,p))||lt(G.nodesRef.current,J).find(c=>[c.context?.elements.floating,ct(c.context?.elements.floating)].includes(p)||c.context?.elements.domReference===p)));if(k===S&&E&&Et(E),i&&k!==S&&!en(V)&&de(h)===h.body){if(me(E)&&(E.focus(),i==="popup")){A.request(()=>{E.focus()});return}const c=ne(),H=Ee.current,U=(H&&c.includes(H)?H:null)||c[c.length-1]||E;me(U)&&U.focus()}if(q.current.insideReactTree){q.current.insideReactTree=!1;return}(M||!a)&&p&&u&&!le.current&&(M||p!==yt())&&(N.current=!0,K.setOpen(!1,ke(tn,x)))})}function oe(){te.current||(q.current.insideReactTree=!0,y.start(0,()=>{q.current.insideReactTree=!1}))}const g=me(S)?S:null;if(!(!R&&!g))return Pe(g&&I(g,"focusout",_),g&&I(g,"pointerdown",P),R&&I(R,"focusin",W),R&&I(R,"focusout",_),R&&C&&I(R,"focusout",oe,!0))},[r,S,R,E,a,G,C,K,l,i,ne,M,$,q,y,B,A,T,v,re]),m.useEffect(()=>{if(r||!R||!F)return;const h=Array.from(C?.portalNode?.querySelectorAll(`[${qe("portal")}]`)||[]),W=(G?lt(G.nodesRef.current,$()):[]).find(k=>st(k.context?.elements.domReference||null))?.context?.elements.domReference,oe=[...[R,...h,ge.current,he.current,C?.beforeOutsideRef.current,C?.afterOutsideRef.current,...re()],W,fe(v),fe(T),M?S:null].filter(k=>k!=null),g=ht(oe,{ariaHidden:a||M,mark:!1}),x=[R,...h].filter(k=>k!=null),p=ht(x);return()=>{p(),g()}},[F,r,S,R,a,C,M,G,$,T,v,re]),L(()=>{if(!F||r||!me(E))return;ie.current="",z.current="";const h=X(E),P=de(h);queueMicrotask(()=>{const W=Z.current,_=typeof W=="function"?W(ee.current||""):W;if(_===void 0||_===!1||w(E,P))return;let g=null;const x=()=>(g==null&&(g=ne(E)),g[0]||E);let p;_===!0||_===null?p=x():p=fe(_),p=p||x();const k=w(E,de(h));Ue(p,{preventScroll:p===E,shouldFocus(){if(!D.current)return!1;if(k)return!0;const V=de(h);return!(V!==p&&w(E,V))}})})},[r,F,E,ne,Z,ee,D]),L(()=>{if(r||!E)return;const h=X(E),P=de(h),W=ee.current==null;bt(P);function _(g){if(g.open||(ie.current=Mn(g.nativeEvent,z.current)),g.reason===wt&&g.nativeEvent.type==="mouseleave"&&(N.current=!0),g.reason===xt)if(g.nested)N.current=!1;else if(Mt(g.nativeEvent)||wn(g.nativeEvent))N.current=!1;else{let x=!1;X(E).createElement("div").focus({get preventScroll(){return x=!0,!1}}),x?N.current=!1:N.current=!0}}j.on("openchange",_);function oe(g){const x=se.current;let p=typeof x=="function"?x(g):x;if(p===void 0||p===!1)return null;p===null&&(p=!0);const k=S?.isConnected?S:null,V=P?.isConnected&&ze(P)!=="body"?P:null;let J=W?V||k:k||V;return J||(J=yt()||null),typeof p=="boolean"?J:fe(p)||J||null}return()=>{j.off("openchange",_);const g=de(h),x=re(),p=w(R,g)||x.some(Q=>Q===g||w(Q,g))||G&&Fe(G.nodesRef.current,$(),!1).some(Q=>w(Q.context?.elements.floating,g)),k=se.current,V=ie.current,J=oe(V);queueMicrotask(()=>{const Q=An(J),Ce=typeof k!="boolean";if(k&&!N.current&&me(Q)&&(!(!Ce&&Q!==g&&g!==h.body)||p)){const Re={preventScroll:!0};V==="keyboard"&&(Re.focusVisible=!0),Q.focus(Re)}N.current=!1})}},[r,R,E,se,ee,j,G,S,$,re]),L(()=>{if(!Qe||F||!R)return;const h=de(X(R));!me(h)||!jt(h)||w(R,h)&&h.blur()},[F,R]),L(()=>{if(!(r||!C))return C.setFocusManagerState({modal:a,closeOnFocusOut:l,open:F,onOpenChange:K.setOpen,domReference:S}),()=>{C.setFocusManagerState(null)}},[r,C,a,F,K,l,S]),L(()=>{if(!(r||!E))return Et(E),()=>{queueMicrotask(nt)}},[r,E]);const ce=!r&&(a?!M:!0)&&(Te||a);return ve.jsxs(m.Fragment,{children:[ce&&ve.jsx(ut,{"data-type":"inside",ref:Se,onFocus:h=>{if(a){const P=ne();Ue(P[P.length-1])}else C?.portalNode&&(N.current=!1,at(h,C.portalNode)?zt(S)?.focus():fe(v??C.beforeOutsideRef)?.focus())}}),n,ce&&ve.jsx(ut,{"data-type":"inside",ref:Me,onFocus:h=>{a?Ue(ne()[0]):C?.portalNode&&(l&&(N.current=!0),at(h,C.portalNode)?Jt(S)?.focus():fe(T??C.afterOutsideRef)?.focus())}})]})}function Nn(){return!1}function Wn(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function lr(e,t={}){const{enabled:n=!0,escapeKey:r=!0,outsidePress:o=!0,outsidePressEvent:s="sloppy",referencePress:i=Nn,bubbles:a,externalTree:l}=t,f="rootStore"in e?e.rootStore:e,T=f.useState("open"),v=f.useState("floatingElement"),{dataRef:d,events:b}=f.context,O=tt(l),K=Y(typeof o=="function"?o:()=>!1),F=typeof o=="function"?K:o,S=F!==!1,R=Y(()=>s),{escapeKey:j,outsidePress:q}=Wn(a),$=m.useRef(!1),ae=m.useRef(!1),M=m.useRef(!1),Z=m.useRef(!1),se=m.useRef(!1),ee=m.useRef(""),D=m.useRef(null),G=We(),C=We(),N=Y(()=>{C.clear(),d.current.insideReactTree=!1}),le=Y(y=>{const B=d.current.floatingContext?.nodeId;return(O?Fe(O.nodesRef.current,B):[]).some(Te=>Te.context?.open&&!Te.context.dataRef.current[y])}),te=Y(y=>Ye(y,f.select("floatingElement"))||Ye(y,f.select("domReferenceElement"))),Ee=Y(y=>{i()&&f.setOpen(!1,ke(Pt,y.nativeEvent))}),ie=Y(y=>{if(!T||!n||!r||y.key!=="Escape"||se.current||!j&&le("__escapeKeyBubbles"))return;const B=On(y)?y.nativeEvent:y,A=ke(kt,B);f.setOpen(!1,A),A.isCanceled||y.preventDefault(),!j&&!A.isPropagationAllowed&&y.stopPropagation()}),z=Y(()=>{d.current.insideReactTree=!0,C.start(0,N)}),ge=Y(y=>{if(!T||!n||y.button!==0)return;const B=ye(y.nativeEvent);w(f.select("floatingElement"),B)&&($.current||($.current=!0,ae.current=!1))}),he=Y(y=>{!T||!n||(y.defaultPrevented||y.nativeEvent.defaultPrevented)&&$.current&&(ae.current=!0)});m.useEffect(()=>{function y(B){B.open||(Z.current=!1)}return b.on("openchange",y),()=>{b.off("openchange",y)}},[b]),m.useEffect(()=>{if(!T||!n)return T||(Z.current=!1),N;d.current.__escapeKeyBubbles=j,d.current.__outsidePressBubbles=q;const y=new Le,B=new Le,A=X(v);function Te(){y.clear(),se.current=!0}function E(){y.start(Qe?5:0,()=>{se.current=!1})}function ne(){M.current=!0,B.start(0,()=>{M.current=!1})}function re(){$.current=!1,ae.current=!1}function ce(){const u=ee.current,c=u==="pen"||!u?"mouse":u,H=R(),U=typeof H=="function"?H():H;return typeof U=="string"?U:U[c]}function h(u){const c=ce();return c==="intentional"&&u.type!=="click"||c==="sloppy"&&u.type==="click"}function P(u){const c=d.current.floatingContext?.nodeId,H=O&&Fe(O.nodesRef.current,c).some(U=>Ye(u,U.context?.elements.floating));return te(u)||H}function W(u){if(h(u)){u.type!=="click"&&!te(u)&&(B.clear(),M.current=!1),N();return}if(d.current.insideReactTree){N();return}const c=ye(u),H=`[${qe("inert")}]`,U=Ie(c)?c.getRootNode():null,Oe=Array.from((Ot(U)?U:X(f.select("floatingElement"))).querySelectorAll(H)),rt=f.context.triggerElements;if(c&&(rt.hasElement(c)||rt.hasMatchingElement(ue=>w(ue,c))))return;let we=Ie(c)?c:null;for(;we&&!Ge(we);){const ue=nn(we);if(Ge(ue)||!Ie(ue))break;we=ue}if(!(Oe.length&&Ie(c)&&!rn(c)&&!w(c,f.select("floatingElement"))&&Oe.every(ue=>!w(we,ue)))){if(me(c)&&!("touches"in u)){const ue=Ge(c),He=on(c),ot=/auto|scroll/,Bt=ue||ot.test(He.overflowX),Dt=ue||ot.test(He.overflowY),Ht=Bt&&c.clientWidth>0&&c.scrollWidth>c.clientWidth,Yt=Dt&&c.clientHeight>0&&c.scrollHeight>c.clientHeight,Gt=He.direction==="rtl",_t=Yt&&(Gt?u.offsetX<=c.offsetWidth-c.clientWidth:u.offsetX>c.clientWidth),Ut=Ht&&u.offsetY>c.clientHeight;if(_t||Ut)return}if(!P(u)){if(ce()==="intentional"){if(u.detail!==0&&!Mt(u)&&!Z.current)return;if(M.current){B.clear(),M.current=!1;return}}typeof F=="function"&&!F(u)||le("__outsidePressBubbles")||(f.setOpen(!1,ke(xt,u)),N())}}}function _(u){ce()!=="sloppy"||u.pointerType==="touch"||!f.select("open")||!n||te(u)||W(u)}function oe(u){if(ce()!=="sloppy"||!f.select("open")||!n||te(u))return;const c=u.touches[0];c&&(D.current={startTime:Date.now(),startX:c.clientX,startY:c.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},G.start(1e3,()=>{D.current&&(D.current.dismissOnTouchEnd=!1,D.current.dismissOnMouseDown=!1)}))}function g(u,c){const H=ye(u);if(!H)return;const U=I(H,u.type,()=>{c(u),U()})}function x(u){ee.current="touch",g(u,oe)}function p(u){G.clear(),u.type==="pointerdown"&&(u.button===0&&(Z.current=!0),ee.current=u.pointerType),!(u.type==="mousedown"&&D.current&&!D.current.dismissOnMouseDown)&&g(u,c=>{c.type==="pointerdown"?_(c):W(c)})}function k(u){if(u.type==="pointercancel"&&(Z.current=!1),!$.current)return;const c=ae.current;if(re(),ce()==="intentional"){if(u.type==="pointercancel"){c&&ne();return}if(!P(u)){if(c){ne();return}typeof F=="function"&&!F(u)||(B.clear(),M.current=!0,N())}}}function V(u){if(ce()!=="sloppy"||!D.current||te(u))return;const c=u.touches[0];if(!c)return;const H=Math.abs(c.clientX-D.current.startX),U=Math.abs(c.clientY-D.current.startY),Oe=Math.sqrt(H*H+U*U);Oe>5&&(D.current.dismissOnTouchEnd=!0),Oe>10&&(W(u),G.clear(),D.current=null)}function J(u){g(u,V)}function Q(u){ce()!=="sloppy"||!D.current||te(u)||(D.current.dismissOnTouchEnd&&W(u),G.clear(),D.current=null)}function Ce(u){g(u,Q)}const Re=Pe(r&&Pe(I(A,"keydown",ie),I(A,"compositionstart",Te),I(A,"compositionend",E)),S&&Pe(I(A,"click",p,!0),I(A,"pointerdown",p,!0),I(A,"pointerup",k,!0),I(A,"pointercancel",k,!0),I(A,"mousedown",p,!0),I(A,"mouseup",k,!0),I(A,"touchstart",x,{capture:!0,passive:!0}),I(A,"touchmove",J,{capture:!0,passive:!0}),I(A,"touchend",Ce,{capture:!0,passive:!0})));return()=>{Re(),y.clear(),B.clear(),re(),M.current=!1,N()}},[d,v,r,S,F,T,n,j,q,ie,N,R,le,te,O,f,G]);const Se=m.useMemo(()=>({onKeyDown:ie,onPointerDown:Ee,onClick:Ee}),[ie,Ee]),Me=m.useMemo(()=>({onKeyDown:ie,onPointerDown:he,onMouseDown:he,onClickCapture:z,onMouseDownCapture(y){z(),ge(y)},onPointerDownCapture(y){z(),ge(y)},onMouseUpCapture:z,onTouchEndCapture:z,onTouchMoveCapture:z}),[ie,z,ge,he]);return m.useMemo(()=>n?{reference:Se,floating:Me,trigger:Se}:{},[n,Se,Me])}const Ln={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId};class Bn extends sn{constructor(t){const{syncOnly:n,nested:r,onOpenChange:o,triggerElements:s,...i}=t;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:Nt(),nested:r,triggerElements:s},Ln),this.syncOnly=n}syncOpenEvent=(t,n)=>{(!t||!this.state.open||n!=null&&xn(n))&&(this.context.dataRef.current.openEvent=t?n:void 0)};dispatchOpenChange=(t,n)=>{this.syncOpenEvent(t,n.event);const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)};setOpen=(t,n)=>{if(this.syncOnly){this.context.onOpenChange?.(t,n);return}this.dispatchOpenChange(t,n),this.context.onOpenChange?.(t,n)}}function Dn(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:o,nested:s,onOpenChange:i}=e,a=t.useState("open"),l=t.useState("activeTriggerElement"),f=t.useState(n?"popupElement":"positionerElement"),T=t.context.triggerElements,v=i,d=m.useRef(null);r===void 0&&d.current===null&&(d.current=new Bn({open:a,transitionStatus:void 0,referenceElement:l,floatingElement:f,triggerElements:T,onOpenChange:v,floatingId:o,syncOnly:!0,nested:s}));const b=r??d.current;return t.useSyncedValue("floatingId",o),L(()=>{const O={open:a,floatingId:o,referenceElement:l,floatingElement:f};Ie(l)&&(O.domReferenceElement=l),b.state.positionReference===b.state.referenceElement&&(O.positionReference=l),b.update(O)},[a,o,l,f,b]),b.context.onOpenChange=v,b.context.nested=s,b}function Hn(e,t=!1,n=!1,r=!1){const[o,s]=m.useState(e&&t?"idle":void 0),[i,a]=m.useState(e&&!r);return e&&!i&&(a(!0),s("starting")),!e&&i&&o!=="ending"&&!n&&s("ending"),!e&&!i&&o==="ending"&&s(void 0),L(()=>{if(!e&&i&&o!=="ending"&&n){const l=be.request(()=>{s("ending")});return()=>{be.cancel(l)}}},[e,i,o,n]),L(()=>{if(!e||t)return;const l=be.request(()=>{s(void 0)});return()=>{be.cancel(l)}},[t,e]),L(()=>{if(!e||!t)return;e&&i&&o!=="idle"&&s("starting");const l=be.request(()=>{s("idle")});return()=>{be.cancel(l)}},[t,e,i,o]),{mounted:i,setMounted:a,transitionStatus:o}}const fr={tabIndex:-1,[ln]:""};function dr(e){return t=>t==="touch"?e.current:!0}function pr(e,t=!1){const n=Je(),r=et()!=null,o=je(()=>e(n,r)).current;return Dn({popupStore:o,treatPopupAsFloatingElement:t,floatingRootContext:o.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:o.setOpen}),o}function gr({handle:e,store:t}){return L(()=>e.attachStore(t),[e,t]),null}function Tt(e){const t=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==t&&e.set("triggerCount",t)}function Yn(e,t){const n=m.useRef(null);return Y(r=>{const o=n.current;if(o!==null){if(o.element===r&&o.store===t&&o.id===e)return;n.current=null;const s=o.store;s.context.triggerElements.getById(o.id)===o.element&&(s.context.triggerElements.delete(o.id),Tt(s))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),Tt(t))})}function Gn(e,t,n,r=!1){let o=e.preventUnmountingOnClose;t?o=!1:r&&(o=!0);const s=n?.id??null;let i=e.activeTriggerId,a=e.activeTriggerElement;return(s||t)&&(i=s,a=n??null),{open:t,preventUnmountingOnClose:o,activeTriggerId:i,activeTriggerElement:a}}function _n(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function hr(e,t,n,r={}){const o=n.reason,s=o===wt,i=t&&o===fn,a=!t&&(o===Pt||o===kt),l=_n(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);const f=()=>{const T=Gn(e.state,t,n.trigger,l()),v={...r.extraState,...T};i?v.instantType="focus":a?v.instantType="dismiss":s&&(v.instantType=void 0),e.update(v)};s?an.flushSync(f):f()}function mr(e,t,n,r){const o=n.useState("isMountedByTrigger",e),s=Yn(e,n),i=Y(l=>{const f=n.select("open"),T=n.select("activeTriggerId");if(T===e){const v={activeTriggerElement:l,...f?r:null};n.update(v);return}if(T==null&&f){const v={activeTriggerId:e??null,activeTriggerElement:l,...r};n.update(v)}}),a=Y(l=>{s(l),l&&i(l)});return L(()=>(a(t.current),()=>a(null)),[a,t,n,e]),L(()=>{if(o){const l={activeTriggerElement:t.current,...r};n.update(l)}},[o,n,t,...Object.values(r)]),{registerTrigger:a,isMountedByThisTrigger:o}}function br(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=m.useRef(null),o=e.useState("open"),s=e.useState("triggerCount"),i=e.useState("activeTriggerId"),a=e.useState("activeTriggerElement");L(()=>{if(!o){r.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0);return}const l=e.context.triggerElements.size,f={};e.state.triggerCount!==l&&(f.triggerCount=l);const T=e.select("activeTriggerId");let v=null;if(T){const d=e.context.triggerElements.getById(T);if(d)r.current=T,d!==e.state.activeTriggerElement&&(f.activeTriggerElement=d);else{for(const[b,O]of e.context.triggerElements.entries())if(O===e.state.activeTriggerElement){f.activeTriggerId=b,f.activeTriggerElement=O,r.current=b;break}f.activeTriggerId===void 0&&(r.current===T?v=T:r.current=null)}}else r.current=null;if(!v&&!T&&l===1){const d=e.context.triggerElements.entries().next();if(!d.done){const[b,O]=d.value;f.activeTriggerId=b,f.activeTriggerElement=O,r.current=b}}(f.triggerCount!==void 0||f.activeTriggerId!==void 0||f.activeTriggerElement!==void 0)&&e.update(f),v&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===v&&!e.context.triggerElements.getById(v)){const d=ke(cn);e.setOpen(!1,d),d.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[o,e,s,i,a,n])}function yr(e,t,n,r){const{mounted:o,setMounted:s,transitionStatus:i}=Hn(e,!1,!1,r),a=t.useState("preventUnmountingOnClose"),l=e?!1:a;t.useSyncedValues({mounted:o,transitionStatus:i,preventUnmountingOnClose:l});const f=Y(()=>{s(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return un({enabled:o&&!e&&!l,open:e,ref:t.context.popupRef,onComplete(){e||f()}}),{forceUnmount:f,transitionStatus:i}}function Er(e,t){e.useSyncedValues(t),L(()=>()=>{e.update({activeTriggerProps:_e,inactiveTriggerProps:_e,popupProps:_e})},[e])}function Tr(e,t){L(()=>{!t&&e.state.openMethod!==null&&e.set("openMethod",null)},[t,e]),L(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class Rr{constructor(){this.idMap=new Map}add(t,n){this.idMap.set(t,n)}delete(t){this.idMap.delete(t)}hasElement(t){for(const n of this.idMap.values())if(n===t)return!0;return!1}hasMatchingElement(t){for(const n of this.idMap.values())if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}function vr(e){return Je(e,"base-ui")}const Sr=m.forwardRef(function(t,n){const{cutout:r,...o}=t;let s;if(r){const i=r.getBoundingClientRect();s=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${i.left}px ${i.top}px,${i.left}px ${i.bottom}px,${i.right}px ${i.bottom}px,${i.right}px ${i.top}px,${i.left}px ${i.top}px)`}return ve.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})});let Rt={},vt={},St="";function De(e,t){return pn(e)?e:t}function Ct(e,t,n){return/hidden|clip/.test(e.getComputedStyle(De(t,n)).overflowY)}function Un(e){if(typeof document>"u")return!1;const t=X(e);return Be(t).innerWidth-t.documentElement.clientWidth>0}function Xn(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=X(e),r=n.documentElement,o=n.body,s=De(r,o),i=s.style.overflowY,a=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",s.style.overflowY="scroll";const l=s.offsetWidth;s.style.overflowY="hidden";const f=s.offsetWidth;return s.style.overflowY=i,r.style.scrollbarGutter=a,l===f}function Kn(e){const t=X(e),n=t.documentElement,r=t.body,o=De(n,r),s={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,s)}}function Vn(e){const t=X(e),n=t.documentElement,r=t.body,o=Be(n);let s=0,i=0,a=!1;const l=be.create();if(Qe&&(o.visualViewport?.scale??1)!==1)return()=>{};function f(){const b=o.getComputedStyle(n),O=o.getComputedStyle(r),S=(b.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=n.scrollTop,i=n.scrollLeft,Rt={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},St=n.style.scrollBehavior,vt={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const R=n.scrollHeight>n.clientHeight,j=n.scrollWidth>n.clientWidth,q=b.overflowY==="scroll"||O.overflowY==="scroll",$=b.overflowX==="scroll"||O.overflowX==="scroll",ae=Math.max(0,o.innerWidth-r.clientWidth),M=Math.max(0,o.innerHeight-r.clientHeight),Z=parseFloat(O.marginTop)+parseFloat(O.marginBottom),se=parseFloat(O.marginLeft)+parseFloat(O.marginRight),ee=De(n,r);if(a=Xn(e),a){n.style.scrollbarGutter=S,ee.style.overflowY="hidden",ee.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:S,overflowY:"hidden",overflowX:"hidden"}),(R||q)&&(n.style.overflowY="scroll"),(j||$)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:Z||M?`calc(100dvh - ${Z+M}px)`:"100dvh",width:se||ae?`calc(100vw - ${se+ae}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),r.scrollTop=s,r.scrollLeft=i,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function T(){Object.assign(n.style,Rt),Object.assign(r.style,vt),a||(n.scrollTop=s,n.scrollLeft=i,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=St)}function v(){T(),l.request(f)}f();const d=I(o,"resize",v);return()=>{l.cancel(),T(),typeof o.removeEventListener=="function"&&d()}}class qn{lockCount=0;restore=null;timeoutLock=Le.create();timeoutUnlock=Le.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const n=X(t),r=n.documentElement,o=n.body,s=Be(r);if(Ct(s,r,o)){const a=new s.MutationObserver(()=>{Ct(s,r,o)||(a.disconnect(),this.restore=null,this.lock(t))}),l={attributes:!0};a.observe(r,l),a.observe(o,l),this.restore=()=>a.disconnect();return}const i=dn||!Un(t);this.restore=i?Kn(t):Vn(t)}}const $n=new qn;function Cr(e=!0,t=null){L(()=>{if(e)return $n.acquire(t)},[e,t])}const jn="ArrowUp",zn="ArrowDown",Jn="ArrowLeft",Qn="ArrowRight",Zn="Home",er="End",Or=new Set([jn,zn,Jn,Qn,Zn,er]);export{Cr as A,Hn as B,Or as C,hr as D,wn as E,Bn as F,Ue as G,Cn as H,Sr as I,Mt as J,Rr as P,tt as a,et as b,Ae as c,_n as d,Gn as e,ur as f,Fe as g,Tr as h,sr as i,br as j,yr as k,gr as l,pr as m,lr as n,Er as o,mr as p,rr as q,ir as r,cr as s,nr as t,vr as u,dr as v,ar as w,fr as x,or as y,Sn as z};
@@ -1 +1 @@
1
- import{q as o}from"./__vite-browser-external-BW1rxvYq.js";const a={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};a.node;const n=o(a);export{n as D};
1
+ import{A as o}from"./__vite-browser-external-DUJeOWgd.js";const a={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};a.node;const n=o(a);export{n as D};
@@ -1 +1 @@
1
- import{q as e}from"./__vite-browser-external-BW1rxvYq.js";const a={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};a.node;const n=e(a);export{n as E};
1
+ import{A as e}from"./__vite-browser-external-DUJeOWgd.js";const a={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};a.node;const n=e(a);export{n as E};
@@ -1 +1 @@
1
- import{q as a}from"./__vite-browser-external-BW1rxvYq.js";const e={name:"flame",size:24,node:[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]]};e.node;const c=a(e);export{c as F};
1
+ import{A as a}from"./__vite-browser-external-DUJeOWgd.js";const e={name:"flame",size:24,node:[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]]};e.node;const c=a(e);export{c as F};
@@ -1 +1 @@
1
- import{l as r}from"./__vite-browser-external-BW1rxvYq.js";function n(o){const t=Number(o)||0;return t>=1e12?`${Number((t/1e12).toFixed(2)).toString()}T`:r(t)}export{n as f};
1
+ import{i as r}from"./__vite-browser-external-DUJeOWgd.js";function n(o){const t=Number(o)||0;return t>=1e12?`${Number((t/1e12).toFixed(2)).toString()}T`:r(t)}export{n as f};
@@ -1 +1 @@
1
- import{q as a}from"./__vite-browser-external-BW1rxvYq.js";const t={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};t.node;const c=a(t);function e(){if(typeof window>"u")return!1;const o=window.location.hostname;return o==="localhost"||o==="127.0.0.1"||o==="::1"}function r(){return e()?"/":"/dashboard"}export{c as C,r as g,e as i};
1
+ import{A as a}from"./__vite-browser-external-DUJeOWgd.js";const t={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};t.node;const c=a(t);function e(){if(typeof window>"u")return!1;const o=window.location.hostname;return o==="localhost"||o==="127.0.0.1"||o==="::1"}function r(){return e()?"/":"/dashboard"}export{c as C,r as g,e as i};
@@ -1 +1 @@
1
- import{j as r}from"./__vite-browser-external-BW1rxvYq.js";function e({className:n}){return r.jsx("svg",{viewBox:"0 0 384 512",className:n,fill:"currentColor","aria-hidden":"true",children:r.jsx("path",{d:"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"})})}function o({className:n}){return r.jsx("svg",{viewBox:"0 0 16 16",className:n,fill:"currentColor","aria-hidden":"true",children:r.jsx("path",{d:"M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"})})}function t({className:n}){return r.jsx("svg",{viewBox:"0 0 24 24",className:n,fill:"currentColor","aria-hidden":"true",children:r.jsx("path",{d:"M3 5.46 10.2 4.5v6.92H3V5.46Zm0 13.08 7.2.96v-6.84H3v5.88Zm8.04 1.08L21 21V12.46h-9.96v7.16ZM11.04 4.38 21 3v8.46h-9.96V4.38Z"})})}export{e as A,o as G,t as W};
1
+ import{j as r}from"./__vite-browser-external-DUJeOWgd.js";function e({className:n}){return r.jsx("svg",{viewBox:"0 0 384 512",className:n,fill:"currentColor","aria-hidden":"true",children:r.jsx("path",{d:"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"})})}function o({className:n}){return r.jsx("svg",{viewBox:"0 0 16 16",className:n,fill:"currentColor","aria-hidden":"true",children:r.jsx("path",{d:"M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"})})}function t({className:n}){return r.jsx("svg",{viewBox:"0 0 24 24",className:n,fill:"currentColor","aria-hidden":"true",children:r.jsx("path",{d:"M3 5.46 10.2 4.5v6.92H3V5.46Zm0 13.08 7.2.96v-6.84H3v5.88Zm8.04 1.08L21 21V12.46h-9.96v7.16ZM11.04 4.38 21 3v8.46h-9.96V4.38Z"})})}export{e as A,o as G,t as W};
@@ -1,4 +1,4 @@
1
- import{r as n,j as $}from"./__vite-browser-external-BW1rxvYq.js";import{M as D,a as S,u as A,b as F,P as K,c as U,L as W}from"./react-CO1HovF5.js";function I(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function B(...e){return r=>{let t=!1;const o=e.map(l=>{const i=I(l,r);return!t&&typeof i=="function"&&(t=!0),i});if(t)return()=>{for(let l=0;l<o.length;l++){const i=o[l];typeof i=="function"?i():I(e[l],null)}}}}function G(...e){return n.useCallback(B(...e),e)}class V extends n.Component{getSnapshotBeforeUpdate(r){const t=this.props.childRef.current;if(S(t)&&r.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const o=t.offsetParent,l=S(o)&&o.offsetWidth||0,i=S(o)&&o.offsetHeight||0,d=getComputedStyle(t),s=this.props.sizeRef.current;s.height=parseFloat(d.height),s.width=parseFloat(d.width),s.top=t.offsetTop,s.left=t.offsetLeft,s.right=l-s.width-s.left,s.bottom=i-s.height-s.top,s.direction=d.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function X({children:e,isPresent:r,anchorX:t,anchorY:o,root:l,pop:i}){const d=n.useId(),s=n.useRef(null),y=n.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:E}=n.useContext(D),a=i!==!1?e.props?.ref??e?.ref:void 0,M=G(s,a);return n.useInsertionEffect(()=>{const{width:u,height:p,top:x,left:C,right:f,bottom:R,direction:L}=y.current;if(r||i===!1||!s.current||!u||!p)return;const b=L==="rtl",g=t==="left"?b?`right: ${f}`:`left: ${C}`:b?`left: ${C}`:`right: ${f}`,j=o==="bottom"?`bottom: ${R}`:`top: ${x}`;s.current.dataset.motionPopId=d;const h=document.createElement("style");E&&(h.nonce=E);const P=l??document.head;return P.appendChild(h),h.sheet&&h.sheet.insertRule(`
1
+ import{r as n,j as $}from"./__vite-browser-external-DUJeOWgd.js";import{M as D,a as S,u as A,b as F,P as K,c as U,L as W}from"./react-B7SkZTgg.js";function I(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function B(...e){return r=>{let t=!1;const o=e.map(l=>{const i=I(l,r);return!t&&typeof i=="function"&&(t=!0),i});if(t)return()=>{for(let l=0;l<o.length;l++){const i=o[l];typeof i=="function"?i():I(e[l],null)}}}}function G(...e){return n.useCallback(B(...e),e)}class V extends n.Component{getSnapshotBeforeUpdate(r){const t=this.props.childRef.current;if(S(t)&&r.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const o=t.offsetParent,l=S(o)&&o.offsetWidth||0,i=S(o)&&o.offsetHeight||0,d=getComputedStyle(t),s=this.props.sizeRef.current;s.height=parseFloat(d.height),s.width=parseFloat(d.width),s.top=t.offsetTop,s.left=t.offsetLeft,s.right=l-s.width-s.left,s.bottom=i-s.height-s.top,s.direction=d.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function X({children:e,isPresent:r,anchorX:t,anchorY:o,root:l,pop:i}){const d=n.useId(),s=n.useRef(null),y=n.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:E}=n.useContext(D),a=i!==!1?e.props?.ref??e?.ref:void 0,M=G(s,a);return n.useInsertionEffect(()=>{const{width:u,height:p,top:x,left:C,right:f,bottom:R,direction:L}=y.current;if(r||i===!1||!s.current||!u||!p)return;const b=L==="rtl",g=t==="left"?b?`right: ${f}`:`left: ${C}`:b?`left: ${C}`:`right: ${f}`,j=o==="bottom"?`bottom: ${R}`:`top: ${x}`;s.current.dataset.motionPopId=d;const h=document.createElement("style");E&&(h.nonce=E);const P=l??document.head;return P.appendChild(h),h.sheet&&h.sheet.insertRule(`
2
2
  [data-motion-pop-id="${d}"] {
3
3
  position: absolute !important;
4
4
  width: ${u}px !important;
@@ -1 +1 @@
1
- import{r as u}from"./__vite-browser-external-BW1rxvYq.js";var c={},p=()=>{window.va||(window.va=function(...r){window.vaq||(window.vaq=[]),window.vaq.push(r)})},m="@vercel/analytics",E="2.0.1";function l(){return typeof window<"u"}function w(){try{const e="production"}catch{}return"production"}function y(e="auto"){if(e==="auto"){window.vam=w();return}window.vam=e}function h(){return(l()?window.vam:w())||"production"}function v(){return h()==="production"}function d(){return h()==="development"}function g(e,{[e]:r,...i}){return i}function _(e,r){if(!e)return;let i=e;const n=[];for(const[t,o]of Object.entries(e))typeof o=="object"&&o!==null&&(r.strip?i=g(t,i):n.push(t));if(n.length>0&&!r.strip)throw Error(`The following properties are not valid: ${n.join(", ")}. Only strings, numbers, booleans, and null are allowed.`);return i}function S(e){return e.scriptSrc?a(e.scriptSrc):d()?"https://va.vercel-scripts.com/v1/script.debug.js":e.basePath?a(`${e.basePath}/insights/script.js`):"/_vercel/insights/script.js"}function k(e,r){var i;let n=e;if(r)try{n={...(i=JSON.parse(r))==null?void 0:i.analytics,...e}}catch{}y(n.mode);const t={sdkn:m+(n.framework?`/${n.framework}`:""),sdkv:E};return n.disableAutoTrack&&(t.disableAutoTrack="1"),n.viewEndpoint&&(t.viewEndpoint=a(n.viewEndpoint)),n.eventEndpoint&&(t.eventEndpoint=a(n.eventEndpoint)),n.sessionEndpoint&&(t.sessionEndpoint=a(n.sessionEndpoint)),d()&&n.debug===!1&&(t.debug="false"),n.dsn&&(t.dsn=n.dsn),n.endpoint?t.endpoint=n.endpoint:n.basePath&&(t.endpoint=a(`${n.basePath}/insights`)),{beforeSend:n.beforeSend,src:S(n),dataset:t}}function a(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("/")?e:`/${e}`}function P(e={debug:!0},r){var i;if(!l())return;const{beforeSend:n,src:t,dataset:o}=k(e,r);if(p(),n&&((i=window.va)==null||i.call(window,"beforeSend",n)),document.head.querySelector(`script[src*="${t}"]`))return;const s=document.createElement("script");s.src=t;for(const[f,b]of Object.entries(o))s.dataset[f]=b;s.defer=!0,s.onerror=()=>{const f=d()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${t}. ${f}`)},document.head.appendChild(s)}function C(e,r,i){var n,t;if(!l()){const o="[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment";if(v())console.warn(o);else throw new Error(o);return}if(!r){(n=window.va)==null||n.call(window,"event",{name:e,options:i});return}try{const o=_(r,{strip:v()});(t=window.va)==null||t.call(window,"event",{name:e,data:o,options:i})}catch(o){o instanceof Error&&d()&&console.error(o)}}function A({route:e,path:r}){var i;(i=window.va)==null||i.call(window,"pageview",{route:e,path:r})}function T(){if(!(typeof process>"u"||typeof c>"u"))return c.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}function j(){if(!(typeof process>"u"||typeof c>"u"))return c.REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG}function $(e){return u.useEffect(()=>{var r;e.beforeSend&&((r=window.va)==null||r.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),u.useEffect(()=>{P({framework:e.framework||"react",basePath:e.basePath??T(),...e.route!==void 0&&{disableAutoTrack:!0},...e},e.configString??j())},[]),u.useEffect(()=>{e.route&&e.path&&A({route:e.route,path:e.path})},[e.route,e.path]),null}export{$ as Analytics,C as track};
1
+ import{r as u}from"./__vite-browser-external-DUJeOWgd.js";var c={},p=()=>{window.va||(window.va=function(...r){window.vaq||(window.vaq=[]),window.vaq.push(r)})},m="@vercel/analytics",E="2.0.1";function l(){return typeof window<"u"}function w(){try{const e="production"}catch{}return"production"}function y(e="auto"){if(e==="auto"){window.vam=w();return}window.vam=e}function h(){return(l()?window.vam:w())||"production"}function v(){return h()==="production"}function d(){return h()==="development"}function g(e,{[e]:r,...i}){return i}function _(e,r){if(!e)return;let i=e;const n=[];for(const[t,o]of Object.entries(e))typeof o=="object"&&o!==null&&(r.strip?i=g(t,i):n.push(t));if(n.length>0&&!r.strip)throw Error(`The following properties are not valid: ${n.join(", ")}. Only strings, numbers, booleans, and null are allowed.`);return i}function S(e){return e.scriptSrc?a(e.scriptSrc):d()?"https://va.vercel-scripts.com/v1/script.debug.js":e.basePath?a(`${e.basePath}/insights/script.js`):"/_vercel/insights/script.js"}function k(e,r){var i;let n=e;if(r)try{n={...(i=JSON.parse(r))==null?void 0:i.analytics,...e}}catch{}y(n.mode);const t={sdkn:m+(n.framework?`/${n.framework}`:""),sdkv:E};return n.disableAutoTrack&&(t.disableAutoTrack="1"),n.viewEndpoint&&(t.viewEndpoint=a(n.viewEndpoint)),n.eventEndpoint&&(t.eventEndpoint=a(n.eventEndpoint)),n.sessionEndpoint&&(t.sessionEndpoint=a(n.sessionEndpoint)),d()&&n.debug===!1&&(t.debug="false"),n.dsn&&(t.dsn=n.dsn),n.endpoint?t.endpoint=n.endpoint:n.basePath&&(t.endpoint=a(`${n.basePath}/insights`)),{beforeSend:n.beforeSend,src:S(n),dataset:t}}function a(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("/")?e:`/${e}`}function P(e={debug:!0},r){var i;if(!l())return;const{beforeSend:n,src:t,dataset:o}=k(e,r);if(p(),n&&((i=window.va)==null||i.call(window,"beforeSend",n)),document.head.querySelector(`script[src*="${t}"]`))return;const s=document.createElement("script");s.src=t;for(const[f,b]of Object.entries(o))s.dataset[f]=b;s.defer=!0,s.onerror=()=>{const f=d()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${t}. ${f}`)},document.head.appendChild(s)}function C(e,r,i){var n,t;if(!l()){const o="[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment";if(v())console.warn(o);else throw new Error(o);return}if(!r){(n=window.va)==null||n.call(window,"event",{name:e,options:i});return}try{const o=_(r,{strip:v()});(t=window.va)==null||t.call(window,"event",{name:e,data:o,options:i})}catch(o){o instanceof Error&&d()&&console.error(o)}}function A({route:e,path:r}){var i;(i=window.va)==null||i.call(window,"pageview",{route:e,path:r})}function T(){if(!(typeof process>"u"||typeof c>"u"))return c.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}function j(){if(!(typeof process>"u"||typeof c>"u"))return c.REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG}function $(e){return u.useEffect(()=>{var r;e.beforeSend&&((r=window.va)==null||r.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),u.useEffect(()=>{P({framework:e.framework||"react",basePath:e.basePath??T(),...e.route!==void 0&&{disableAutoTrack:!0},...e},e.configString??j())},[]),u.useEffect(()=>{e.route&&e.path&&A({route:e.route,path:e.path})},[e.route,e.path]),null}export{$ as Analytics,C as track};
@@ -1 +1 @@
1
- import{r as c}from"./__vite-browser-external-BW1rxvYq.js";var u={},p=()=>{window.si||(window.si=function(...i){window.siq=window.siq||[],window.siq.push(i)})},h="@vercel/speed-insights",g="2.0.0";function w(){return typeof window<"u"}function S(){try{const e="production"}catch{}return"production"}function l(){return S()==="development"}function k(e,i){if(!e||!i)return e;let n=e;try{const t=Object.entries(i);for(const[r,o]of t)if(!Array.isArray(o)){const s=d(o);s.test(n)&&(n=n.replace(s,`/[${r}]`))}for(const[r,o]of t)if(Array.isArray(o)){const s=d(o.join("/"));s.test(n)&&(n=n.replace(s,`/[...${r}]`))}return n}catch{return e}}function d(e){return new RegExp(`/${b(e)}(?=[/?#]|$)`)}function b(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(e){return e.scriptSrc?f(e.scriptSrc):l()?"https://va.vercel-scripts.com/v1/speed-insights/script.debug.js":e.dsn?"https://va.vercel-scripts.com/v1/speed-insights/script.js":e.basePath?f(`${e.basePath}/speed-insights/script.js`):"/_vercel/speed-insights/script.js"}function E(e,i){var n;let t=e;if(i)try{t={...(n=JSON.parse(i))==null?void 0:n.speedInsights,...e}}catch{}const r={sdkn:h+(t.framework?`/${t.framework}`:""),sdkv:g};return t.sampleRate&&(r.sampleRate=t.sampleRate.toString()),t.route&&(r.route=t.route),l()&&t.debug===!1&&(r.debug="false"),t.dsn&&(r.dsn=t.dsn),t.endpoint?r.endpoint=f(t.endpoint):t.basePath&&(r.endpoint=f(`${t.basePath}/speed-insights/vitals`)),{src:m(t),beforeSend:t.beforeSend,dataset:r}}function f(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("/")?e:`/${e}`}function y(e={},i){var n;if(!w()||e.route===null)return null;p();const{beforeSend:t,src:r,dataset:o}=E(e,i);if(document.head.querySelector(`script[src*="${r}"]`))return null;t&&((n=window.si)==null||n.call(window,"beforeSend",t));const s=document.createElement("script");s.src=r,s.defer=!0;for(const[a,v]of Object.entries(o))s.dataset[a]=v;return s.onerror=()=>{console.log(`[Vercel Speed Insights] Failed to load script from ${r}. Please check if any content blockers are enabled and try again.`)},document.head.appendChild(s),{setRoute:a=>{s.dataset.route=a??void 0}}}function R(){if(!(typeof process>"u"||typeof u>"u"))return u.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}function _(){if(!(typeof process>"u"||typeof u>"u"))return u.REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG}function P(e){c.useEffect(()=>{var n;e.beforeSend&&((n=window.si)==null||n.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]);const i=c.useRef(null);return c.useEffect(()=>{if(!i.current){const n=y({framework:e.framework??"react",basePath:e.basePath??R(),...e},e.configString??_());n&&(i.current=n.setRoute)}},[e]),c.useEffect(()=>{i.current&&e.route&&i.current(e.route)},[e.route]),null}export{P as SpeedInsights,k as computeRoute};
1
+ import{r as c}from"./__vite-browser-external-DUJeOWgd.js";var u={},p=()=>{window.si||(window.si=function(...i){window.siq=window.siq||[],window.siq.push(i)})},h="@vercel/speed-insights",g="2.0.0";function w(){return typeof window<"u"}function S(){try{const e="production"}catch{}return"production"}function l(){return S()==="development"}function k(e,i){if(!e||!i)return e;let n=e;try{const t=Object.entries(i);for(const[r,o]of t)if(!Array.isArray(o)){const s=d(o);s.test(n)&&(n=n.replace(s,`/[${r}]`))}for(const[r,o]of t)if(Array.isArray(o)){const s=d(o.join("/"));s.test(n)&&(n=n.replace(s,`/[...${r}]`))}return n}catch{return e}}function d(e){return new RegExp(`/${b(e)}(?=[/?#]|$)`)}function b(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(e){return e.scriptSrc?f(e.scriptSrc):l()?"https://va.vercel-scripts.com/v1/speed-insights/script.debug.js":e.dsn?"https://va.vercel-scripts.com/v1/speed-insights/script.js":e.basePath?f(`${e.basePath}/speed-insights/script.js`):"/_vercel/speed-insights/script.js"}function E(e,i){var n;let t=e;if(i)try{t={...(n=JSON.parse(i))==null?void 0:n.speedInsights,...e}}catch{}const r={sdkn:h+(t.framework?`/${t.framework}`:""),sdkv:g};return t.sampleRate&&(r.sampleRate=t.sampleRate.toString()),t.route&&(r.route=t.route),l()&&t.debug===!1&&(r.debug="false"),t.dsn&&(r.dsn=t.dsn),t.endpoint?r.endpoint=f(t.endpoint):t.basePath&&(r.endpoint=f(`${t.basePath}/speed-insights/vitals`)),{src:m(t),beforeSend:t.beforeSend,dataset:r}}function f(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("/")?e:`/${e}`}function y(e={},i){var n;if(!w()||e.route===null)return null;p();const{beforeSend:t,src:r,dataset:o}=E(e,i);if(document.head.querySelector(`script[src*="${r}"]`))return null;t&&((n=window.si)==null||n.call(window,"beforeSend",t));const s=document.createElement("script");s.src=r,s.defer=!0;for(const[a,v]of Object.entries(o))s.dataset[a]=v;return s.onerror=()=>{console.log(`[Vercel Speed Insights] Failed to load script from ${r}. Please check if any content blockers are enabled and try again.`)},document.head.appendChild(s),{setRoute:a=>{s.dataset.route=a??void 0}}}function R(){if(!(typeof process>"u"||typeof u>"u"))return u.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}function _(){if(!(typeof process>"u"||typeof u>"u"))return u.REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG}function P(e){c.useEffect(()=>{var n;e.beforeSend&&((n=window.si)==null||n.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]);const i=c.useRef(null);return c.useEffect(()=>{if(!i.current){const n=y({framework:e.framework??"react",basePath:e.basePath??R(),...e},e.configString??_());n&&(i.current=n.setRoute)}},[e]),c.useEffect(()=>{i.current&&e.route&&i.current(e.route)},[e.route]),null}export{P as SpeedInsights,k as computeRoute};
@@ -1 +1 @@
1
- import{q as o}from"./__vite-browser-external-BW1rxvYq.js";const e={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};e.node;const a=o(e);export{a as I};
1
+ import{A as o}from"./__vite-browser-external-DUJeOWgd.js";const e={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};e.node;const a=o(e);export{a as I};
@@ -1 +1 @@
1
- import{q as n}from"./__vite-browser-external-BW1rxvYq.js";const e={name:"link-2",size:24,node:[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]};e.node;const a=n(e);export{a as L};
1
+ import{A as n}from"./__vite-browser-external-DUJeOWgd.js";const e={name:"link-2",size:24,node:[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]};e.node;const a=n(e);export{a as L};
@@ -1 +1 @@
1
- import{q as a}from"./__vite-browser-external-BW1rxvYq.js";const e={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};e.node;const c=a(e);export{c as L};
1
+ import{A as a}from"./__vite-browser-external-DUJeOWgd.js";const e={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};e.node;const c=a(e);export{c as L};
@@ -1 +1 @@
1
- import"./__vite-browser-external-BW1rxvYq.js";const s=r=>{let{transform:t}=r;return{...t,y:0}},e=r=>{let{transform:t}=r;return{...t,x:0}};export{e as a,s as r};
1
+ import"./__vite-browser-external-DUJeOWgd.js";const s=r=>{let{transform:t}=r;return{...t,y:0}},e=r=>{let{transform:t}=r;return{...t,x:0}};export{e as a,s as r};
@@ -1 +1 @@
1
- import{q as o}from"./__vite-browser-external-BW1rxvYq.js";const e={name:"monitor-smartphone",size:24,node:[["path",{d:"M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8",key:"10dyio"}],["path",{d:"M10 19v-3.96 3.15",key:"1irgej"}],["path",{d:"M7 19h5",key:"qswx4l"}],["rect",{width:"6",height:"10",x:"16",y:"12",rx:"2",key:"1egngj"}]]};e.node;const a=o(e);export{a as M};
1
+ import{A as o}from"./__vite-browser-external-DUJeOWgd.js";const e={name:"monitor-smartphone",size:24,node:[["path",{d:"M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8",key:"10dyio"}],["path",{d:"M10 19v-3.96 3.15",key:"1irgej"}],["path",{d:"M7 19h5",key:"qswx4l"}],["rect",{width:"6",height:"10",x:"16",y:"12",rx:"2",key:"1egngj"}]]};e.node;const a=o(e);export{a as M};
@@ -0,0 +1 @@
1
+ function e(){if(typeof navigator>"u")return"other";const t=`${navigator.userAgentData?.platform??""} ${navigator.userAgent??""} ${navigator.platform??""}`.toLowerCase();return t.includes("win")?"windows":t.includes("mac")&&!t.includes("iphone")&&!t.includes("ipad")?"mac":"other"}export{e as d};
@@ -1 +1 @@
1
- import{q as a}from"./__vite-browser-external-BW1rxvYq.js";const e={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};e.node;const s=a(e);export{s as P};
1
+ import{A as a}from"./__vite-browser-external-DUJeOWgd.js";const e={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};e.node;const s=a(e);export{s as P};
@@ -1,4 +1,4 @@
1
- import{q as Ne,r as l,j as e,c as o,a2 as qe,ab as Ke,ac as Ve,X as Ze,a6 as Je,n as Qe}from"./__vite-browser-external-BW1rxvYq.js";import{u as et}from"./useCurrency-t1iy_pC3.js";import{u as Ee}from"./useTokenFormat-0bPjtaaM.js";import{M as tt,T as at}from"./terminal-kUMdPZhq.js";import{I as rt}from"./info-BaK8Hoi2.js";const Re={name:"pause",size:24,node:[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]};Re.node;const ot=Ne(Re);const Pe={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};Pe.node;const nt=Ne(Pe);const Le={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};Le.node;const st=Ne(Le),ae={emerald:{light:["#ebedf0","#a7f3d0","#6ee7b7","#34d399","#10b981"],dark:["#2d333b","#065f46","#059669","#10b981","#34d399"],gridColor:{light:"rgba(16, 185, 129, 0.12)",dark:"rgba(52, 211, 153, 0.08)"}},ocean:{light:["#f1f5f9","#93c5fd","#60a5fa","#3b82f6","#1d4ed8"],dark:["#1e293b","#1e3a8a","#2563eb","#3b82f6","#60a5fa"],gridColor:{light:"rgba(59, 130, 246, 0.12)",dark:"rgba(96, 165, 250, 0.08)"}},neon:{light:["#faf5ff","#ebd5ff","#c084fc","#a855f7","#7e22ce"],dark:["#2e1065","#581c87","#8b5cf6","#a855f7","#c084fc"],gridColor:{light:"rgba(168, 85, 247, 0.12)",dark:"rgba(192, 132, 252, 0.08)"}},amber:{light:["#fffbeb","#fde68a","#f59e0b","#d97706","#b45309"],dark:["#451a03","#78350f","#b45309","#d97706","#f59e0b"],gridColor:{light:"rgba(245, 158, 11, 0.12)",dark:"rgba(245, 158, 11, 0.08)"}}};function it(s,d){const p=/^#([0-9a-f]{6})$/i.exec(s);if(!p)return s;const c=parseInt(p[1],16),f=c>>16&255,$=c>>8&255,Y=c&255,P=A=>Math.max(0,Math.min(255,Math.round(A*d)));return`rgb(${P(f)}, ${P($)}, ${P(Y)})`}function q(s,d,p,c,f){const $=Math.cos(c),Y=Math.sin(c),P=s*$-d*Y,A=s*Y+d*$,R=p,E=Math.cos(f),S=Math.sin(f),K=P,h=A*E-R*S,v=A*S+R*E;return{x:K,y:h,z:v}}function lt(s,d,p,c,f){return q(s,d,p,c,f)}function De(s,d,p=c=>Number(c).toLocaleString()){const c=p(d);if(s>=4){const f=Math.floor(Math.random()*3)+1;return o(`heatmap.3d.voxel.joke.${f}`,{value:c})}else return s===3?o("heatmap.3d.voxel.level3",{value:c}):s===2?o("heatmap.3d.voxel.level2",{value:c}):s===1?o("heatmap.3d.voxel.level1",{value:c}):o("heatmap.3d.voxel.level0")}function Ae({weeks:s,palette:d="auto",isDark:p=!1,interactive:c=!1,autoRotateInit:f=!1,onResetViewRef:$=null}){const{formatTokens:Y,formatTokensTooltip:P}=Ee(),A=ae[d]||(d==="auto"?ae.emerald:null),R=A?p?A.dark:A.light:Array.isArray(d)?d:p?ae.emerald.dark:ae.emerald.light,E=A?p?A.gridColor.dark:A.gridColor.light:p?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.06)",S=-.2,K=.88,[h,v]=l.useState({yaw:S,pitch:K}),[ie,V]=l.useState(f),[he,L]=l.useState(1),j=c?13:10.5,fe=l.useMemo(()=>{const t=[],r=s.length;if(r===0||!c)return[];for(let n=0;n<=7;n++){const i=(n-3.5)*j,m=q(-r/2*j,i,0,h.yaw,h.pitch),x=q(r/2*j,i,0,h.yaw,h.pitch);t.push({d:`M${m.x},${m.y} L${x.x},${x.y}`,key:`horiz-${n}`})}for(let n=0;n<=r;n+=4){const i=(n-r/2)*j,m=q(i,-3.5*j,0,h.yaw,h.pitch),x=q(i,3.5*j,0,h.yaw,h.pitch);t.push({d:`M${m.x},${m.y} L${x.x},${x.y}`,key:`vert-${n}`})}if(r%4!==0){const n=(r-r/2)*j,i=q(n,-3.5*j,0,h.yaw,h.pitch),m=q(n,3.5*j,0,h.yaw,h.pitch);t.push({d:`M${i.x},${i.y} L${m.x},${m.y}`,key:"vert-last"})}return t},[s.length,h,j,c]);l.useEffect(()=>{$&&($.current={reset:()=>{v({yaw:S,pitch:K}),V(!1),L(1),be()},toggleAutoRotate:t=>{V(t)}})},[$]);const Z=l.useRef(null),F=l.useRef(null),B=l.useRef(!1),le=l.useRef({x:0,y:0}),J=l.useRef({yaw:S,pitch:K}),U=l.useRef({x:0,y:0}),oe=l.useRef({x:0,y:0,time:0}),ne=l.useRef(null),[ge,ye]=l.useState(0),Q=l.useRef(null),se=l.useRef(!0);l.useEffect(()=>(se.current=!0,()=>{se.current=!1}),[]);const be=()=>{Q.current&&cancelAnimationFrame(Q.current),ye(0);const t=performance.now(),r=1200,n=i=>{if(!se.current)return;const m=i-t,x=Math.min(1,m/r),C=1-Math.pow(1-x,3);ye(C),x<1?Q.current=requestAnimationFrame(n):Q.current=null};Q.current=requestAnimationFrame(n)};l.useEffect(()=>(be(),()=>{Q.current&&cancelAnimationFrame(Q.current)}),[c]),l.useEffect(()=>{if(!ie||B.current||typeof window>"u"||typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let r;const n=()=>{if(typeof document<"u"&&document.visibilityState==="hidden"){r=requestAnimationFrame(n);return}v(i=>({yaw:i.yaw+.002,pitch:i.pitch})),r=requestAnimationFrame(n)};return r=requestAnimationFrame(n),()=>cancelAnimationFrame(r)},[ie]);const ce=(t,r)=>{c&&(B.current=!0,le.current={x:t,y:r},J.current={yaw:h.yaw,pitch:h.pitch},U.current={x:0,y:0},oe.current={x:t,y:r,time:performance.now()},ne.current&&cancelAnimationFrame(ne.current))},I=(t,r)=>{if(!B.current)return;const n=t-le.current.x,i=r-le.current.y,m=performance.now(),x=m-oe.current.time;x>0&&(U.current={x:(t-oe.current.x)/x,y:(r-oe.current.y)/x}),oe.current={x:t,y:r,time:m};const C=.005,M=J.current.yaw-n*C,k=Math.PI/2.3,b=Math.max(-k,Math.min(k,J.current.pitch-i*C));v({yaw:M,pitch:b})},ve=()=>{if(!B.current)return;B.current=!1;let t=-U.current.x*12,r=-U.current.y*12;const n=.95,i=()=>{B.current||(t*=n,r*=n,!(Math.abs(t)<.01&&Math.abs(r)<.01)&&(v(m=>{const x=m.yaw+t*.005,C=Math.PI/2.3,M=Math.max(-C,Math.min(C,m.pitch+r*.005));return{yaw:x,pitch:M}}),ne.current=requestAnimationFrame(i)))};ne.current=requestAnimationFrame(i)},[g,de]=l.useState(null),[ee,xe]=l.useState({x:0,y:0,shiftX:0}),y=l.useRef(null);l.useEffect(()=>()=>{y.current&&clearTimeout(y.current)},[]),l.useEffect(()=>{if(!c||!F.current)return;const t=n=>{n.preventDefault();const i=-n.deltaY*.0025;L(m=>{const x=m+i;return Math.max(.5,Math.min(3,x))})},r=F.current;return r.addEventListener("wheel",t,{passive:!1}),()=>{r.removeEventListener("wheel",t)}},[c]);const T=l.useMemo(()=>{const t=[];return s.forEach((r,n)=>{(Array.isArray(r)?r:[]).forEach((i,m)=>{i&&t.push({key:i.day||`${n}-${m}`,col:n,row:m,level:i.level||0,value:i.value||0,day:i.day,models:i.models||null})})}),t},[s]),pe=j-(c?1.8:1.5),ke=c?38:28,we=t=>Math.max(1.8,Number(t)/4*ke),te=l.useMemo(()=>{if(T.length===0)return[];const t=s.length;return T.map(r=>{const n=we(r.level),i=Math.sqrt(Math.pow(r.col-t/2,2)+Math.pow(r.row-3.5,2)),m=Math.sqrt(Math.pow(t/2,2)+Math.pow(3.5,2)),x=i/m*.4,C=Math.min(1,Math.max(0,(ge-x)*(1/.6))),M=n*C,k=(r.col-t/2)*j,b=(r.row-3.5)*j,w=pe/2,H=[{x:k-w,y:b-w,z:0},{x:k+w,y:b-w,z:0},{x:k+w,y:b+w,z:0},{x:k-w,y:b+w,z:0},{x:k-w,y:b-w,z:M},{x:k+w,y:b-w,z:M},{x:k+w,y:b+w,z:M},{x:k-w,y:b+w,z:M}].map(X=>q(X.x,X.y,X.z,h.yaw,h.pitch)),ue=q(k,b,M/2,h.yaw,h.pitch),Ue=[{name:"top",indices:[4,5,6,7],scale:1,normal:[0,0,1]},{name:"bottom",indices:[3,2,1,0],scale:.4,normal:[0,0,-1]},{name:"left",indices:[3,0,4,7],scale:.55,normal:[-1,0,0]},{name:"right",indices:[1,2,6,5],scale:.75,normal:[1,0,0]},{name:"front",indices:[0,1,5,4],scale:.85,normal:[0,-1,0]},{name:"back",indices:[2,3,7,6],scale:.65,normal:[0,1,0]}],Ie=R[Math.min(4,Math.max(0,Number(r.level)||0))],ze=[],We=.35,Xe=-.4,Be=.83;return Ue.forEach(X=>{const je=lt(X.normal[0],X.normal[1],X.normal[2],h.yaw,h.pitch);if(je.z>.001){const _e=H[X.indices[0]],Me=H[X.indices[1]],Te=H[X.indices[2]],$e=H[X.indices[3]],Fe=`M${_e.x},${_e.y} L${Me.x},${Me.y} L${Te.x},${Te.y} L${$e.x},${$e.y} Z`,Oe=je.x*We+je.y*Xe+je.z*Be,He=p?.18:0,Ge=X.scale*(.82+.28*Math.max(0,Oe))+He;ze.push({name:X.name,d:Fe,fill:it(Ie,Ge)})}}),{...r,centerProj:ue,renderedFaces:ze}})},[T,h,R,s.length,ge,j,pe,ke]),G=l.useMemo(()=>[...te].sort((t,r)=>t.centerProj.z-r.centerProj.z),[te]),_=l.useMemo(()=>{if(G.length===0)return{minX:-100,minY:-100,maxX:100,maxY:100};let t=1/0,r=1/0,n=-1/0,i=-1/0;return G.forEach(m=>{const x=j*2,C=m.centerProj.x,M=m.centerProj.y;C-x<t&&(t=C-x),C+x>n&&(n=C+x),M-x<r&&(r=M-x),M+x>i&&(i=M+x)}),{minX:t,minY:r,maxX:n,maxY:i}},[G,j]),D=12,me=_.maxX-_.minX+D*2,a=_.maxY-_.minY+D*2,u=me/he,z=a/he,N=_.minX-D+(me-u)/2,W=_.minY-D+(a-z)/2,O=`${N} ${W} ${u} ${z}`;return T.length===0?e.jsx("div",{className:"py-8 text-center text-sm text-oai-gray-500",children:o("heatmap.empty")}):e.jsxs("div",{ref:F,className:`relative select-none outline-none ${c?"cursor-grab active:cursor-grabbing w-full h-full flex items-center justify-center":"w-full overflow-hidden flex justify-center"}`,onMouseDown:t=>{if(!c)return;ce(t.clientX,t.clientY);const r=i=>I(i.clientX,i.clientY),n=()=>{ve(),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",n)};window.addEventListener("mousemove",r),window.addEventListener("mouseup",n)},onTouchStart:t=>{!c||t.touches.length===0||ce(t.touches[0].clientX,t.touches[0].clientY)},onTouchMove:t=>{!c||t.touches.length===0||I(t.touches[0].clientX,t.touches[0].clientY)},onTouchEnd:()=>{c&&ve()},children:[e.jsxs("svg",{ref:Z,viewBox:O,width:c?"95%":"100%",height:c?"95%":"auto",role:"img","aria-label":o("heatmap.iso.aria")||"3D interactive activity heatmap",style:{display:"block",width:"100%",height:"auto",maxWidth:c?"none":`${me}px`,maxHeight:c?"78vh":"none"},className:"transition-transform duration-300 ease-out",children:[c&&fe.map(t=>e.jsx("path",{d:t.d,fill:"none",stroke:E,strokeWidth:.25,strokeDasharray:"1.5 2.5",strokeLinecap:"round"},t.key)),G.map(t=>{const r=g&&g.key===t.key;return e.jsxs("g",{onMouseEnter:n=>{if(y.current&&(clearTimeout(y.current),y.current=null),de(t),c&&Z.current){const i=q((t.col-s.length/2)*j,(t.row-3.5)*j,we(t.level),h.yaw,h.pitch);let m=0,x=0;const C=Z.current;if(F.current&&typeof C.createSVGPoint=="function"&&typeof C.getScreenCTM=="function")try{const w=C.createSVGPoint();w.x=i.x,w.y=i.y;const re=C.getScreenCTM();if(re){const H=w.matrixTransform(re),ue=F.current.getBoundingClientRect();m=H.x-ue.left,x=H.y-ue.top}}catch{const re=C.getBoundingClientRect(),H=_.maxX-_.minX+D*2,ue=_.maxY-_.minY+D*2;m=(i.x-(_.minX-D))/H*re.width,x=(i.y-(_.minY-D))/ue*re.height}else{const w=C.getBoundingClientRect(),re=_.maxX-_.minX+D*2,H=_.maxY-_.minY+D*2;m=(i.x-(_.minX-D))/re*w.width,x=(i.y-(_.minY-D))/H*w.height}const M=140;let k=0;const b=F.current?F.current.getBoundingClientRect().width:C.getBoundingClientRect().width;m<M?k=M-m:m>b-M&&(k=b-M-m),xe({x:m,y:x,shiftX:k})}},onMouseLeave:()=>{y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{de(null)},150)},className:"transition-all duration-200",style:{filter:r?"brightness(1.15) drop-shadow(0 4px 6px rgba(0,0,0,0.15))":"none",cursor:c?"pointer":"default"},children:[!c&&t.day&&e.jsx("title",{children:o("heatmap.tooltip.tokens",{day:t.day,value:P(t.value)})}),t.renderedFaces.map((n,i)=>e.jsx("path",{d:n.d,fill:n.fill,stroke:n.fill,strokeWidth:.25,strokeLinejoin:"round"},i))]},t.key)})]}),c&&g&&e.jsxs("div",{onMouseEnter:()=>{y.current&&(clearTimeout(y.current),y.current=null)},onMouseLeave:()=>{y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{de(null)},150)},className:"absolute z-[9999] w-0 h-0 transition-all duration-100 ease-out",style:{left:`${ee.x}px`,top:`${ee.y}px`},children:[e.jsxs("div",{className:"absolute left-0 bottom-[10px] backdrop-blur-md bg-white/90 dark:bg-oai-gray-900/90 border border-oai-gray-200/50 dark:border-oai-gray-800/50 shadow-xl rounded-xl p-3.5 max-w-[280px] min-w-[200px] flex flex-col gap-2 animate-in fade-in zoom-in-95 duration-100",style:{transform:`translateX(calc(-50% + ${ee.shiftX}px))`},children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-oai-gray-100 dark:border-oai-gray-800/80 pb-1.5",children:[e.jsx("span",{className:"text-[11px] font-semibold text-oai-gray-500 dark:text-oai-gray-400",children:g.day}),(()=>{const t=g.level===0?p?"#9ca3af":"#6b7280":R[g.level];return e.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full font-medium",style:{backgroundColor:t+"22",color:t,border:`1px solid ${t}44`},children:o("heatmap.tooltip.level",{level:g.level})})})()]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx("span",{title:P(g.value),className:"text-lg font-bold text-oai-gray-900 dark:text-white leading-none",children:Y(g.value)}),e.jsx("span",{className:"text-[10px] text-oai-gray-400 uppercase tracking-wider font-semibold",children:o("heatmap.unit.tokens")})]}),g.models&&Object.keys(g.models).length>0?e.jsxs("div",{className:"mt-1.5 border-t border-oai-gray-100 dark:border-oai-gray-800/60 pt-2 flex flex-col gap-1.5",children:[e.jsx("div",{className:"text-[10px] font-semibold text-oai-gray-400 dark:text-oai-gray-500 uppercase tracking-wider",children:o("heatmap.tooltip.model_breakdown")}),e.jsx("div",{className:"flex flex-col gap-2 max-h-[150px] overflow-y-auto pr-1.5 scrollbar-thin",children:Object.entries(g.models).map(([t,r])=>({name:t,val:Number(r)})).sort((t,r)=>r.val-t.val).map(({name:t,val:r})=>{const n=Number(g.value)||1,i=Math.round(r/n*100);return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center justify-between text-[11px] gap-3",children:[e.jsx("span",{className:"font-medium text-oai-gray-750 dark:text-oai-gray-200 truncate max-w-[120px]",title:t,children:t}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsx("span",{title:P(r),className:"font-mono text-oai-gray-900 dark:text-oai-gray-100 font-semibold",children:Y(r)}),e.jsxs("span",{className:"text-[9px] text-oai-gray-450 dark:text-oai-gray-500 min-w-[28px] text-right font-medium",children:[i,"%"]})]})]}),e.jsx("div",{className:"w-full h-1 bg-oai-gray-100 dark:bg-oai-gray-800/85 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full transition-all duration-300",style:{width:`${i}%`,backgroundColor:R[4],boxShadow:`0 0 4px ${R[4]}55`}})})]},t)})})]}):e.jsx("p",{className:"text-[11px] text-oai-gray-600 dark:text-oai-gray-300 leading-relaxed font-normal mt-1 border-t border-dashed border-oai-gray-100 dark:border-oai-gray-800/60 pt-1.5",children:De(g.level,g.value,Y)})]})]}),e.jsx("div",{className:"absolute bottom-[6px] left-0 -translate-x-1/2 w-2.5 h-2.5 rotate-45 bg-white dark:bg-oai-gray-900 border-r border-b border-oai-gray-200/50 dark:border-oai-gray-800/50 shadow-sm",style:{marginBottom:"1px"}})]})]})}const ct=12,dt=3,mt=26,ut=["#ebedf0","#a7f3d0","#6ee7b7","#34d399","#10b981"],xt=["#121212","#065f46","#059669","#10b981","#34d399"];function pt(s){if(typeof s!="string")return null;const d=/^(\d{4})-(\d{2})-(\d{2})$/.exec(s.trim());if(!d)return null;const p=new Date(Date.UTC(Number(d[1]),Number(d[2])-1,Number(d[3])));return Number.isFinite(p.getTime())?p:null}function Ye(s,d){return new Date(Date.UTC(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()+d))}function ht(s,d){return Math.floor((Date.UTC(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate())-Date.UTC(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()))/864e5)}function ft(s,d){const p=d==="mon"?1:0,c=s.getUTCDay();return Ye(s,-((c-p+7)%7))}function gt(s,d,p,c){if(!s)return[];const f=pt(d)||new Date,$=[];for(let E=11;E>=0;E-=1)$.push(new Date(Date.UTC(f.getUTCFullYear(),f.getUTCMonth()-E,1)));const Y=ft(f,p),P=Ye(Y,-(s-1)*7),A=[],R=new Set;for(const E of $){const S=Math.floor(ht(P,E)/7);S<0||S>=s||R.has(S)||(R.add(S),A.push({label:c[E.getUTCMonth()],index:S}))}return A}function _t({heatmap:s,timeZoneLabel:d,timeZoneShortLabel:p,hideLegend:c=!1,embedded:f=!1}){const{resolvedTheme:$}=qe(),{currency:Y,rate:P}=et(),{formatTokens:A,formatTokensTooltip:R}=Ee(),E=$==="dark",S=E?xt:ut,K=l.useRef(null),h=l.useRef(null),[v,ie]=l.useState(null),[V,he]=l.useState({x:0,y:0,shiftX:0,flipY:!1}),L=l.useRef(null);l.useEffect(()=>()=>{L.current&&clearTimeout(L.current)},[]);const[j,fe]=l.useState(!1),[Z,F]=l.useState(!1),[B,le]=l.useState(!1),J=l.useRef(null),[U,oe]=l.useState("emerald"),ne=[o("heatmap.month.jan"),o("heatmap.month.feb"),o("heatmap.month.mar"),o("heatmap.month.apr"),o("heatmap.month.may"),o("heatmap.month.jun"),o("heatmap.month.jul"),o("heatmap.month.aug"),o("heatmap.month.sep"),o("heatmap.month.oct"),o("heatmap.month.nov"),o("heatmap.month.dec")],ge=(a,u)=>{if(!u||!u.day)return;L.current&&(clearTimeout(L.current),L.current=null),ie(u);const z=a.currentTarget.getBoundingClientRect(),N=typeof window<"u"?window.innerWidth:1024,W=z.left+z.width/2,O=z.top<300,t=O?z.bottom:z.top,r=140;let n=0;W<r?n=r-W:W>N-r&&(n=N-r-W),he({x:W,y:t,shiftX:n,flipY:O})},ye=()=>{L.current&&clearTimeout(L.current),L.current=setTimeout(()=>{ie(null)},150)},Q=()=>{F(!1),fe(!0)},se=()=>{F(!0)},be=a=>{a.target===a.currentTarget&&Z&&(fe(!1),F(!1))};l.useEffect(()=>{if(!j||Z)return;const a=u=>{u.key==="Escape"&&se()};return window.addEventListener("keydown",a),()=>{window.removeEventListener("keydown",a)}},[j,Z]);const ce=l.useMemo(()=>({emerald:{accentText:"text-emerald-500 dark:text-emerald-400",accentBg:"bg-emerald-500/10 dark:bg-emerald-400/10",accentBorder:"border-emerald-500/20 dark:border-emerald-400/15",hoverBorder:"hover:border-emerald-500/30 dark:hover:border-emerald-400/30",hoverGlow:"hover:shadow-[0_0_20px_-3px_rgba(16,185,129,0.15)] hover:dark:shadow-[0_0_20px_-3px_rgba(52,211,153,0.25)]",rawColor:"#10b981"},ocean:{accentText:"text-blue-500 dark:text-blue-400",accentBg:"bg-blue-500/10 dark:bg-blue-400/10",accentBorder:"border-blue-500/20 dark:border-blue-400/15",hoverBorder:"hover:border-blue-500/30 dark:hover:border-blue-400/30",hoverGlow:"hover:shadow-[0_0_20px_-3px_rgba(59,130,246,0.15)] hover:dark:shadow-[0_0_20px_-3px_rgba(96,165,250,0.25)]",rawColor:"#3b82f6"},neon:{accentText:"text-purple-500 dark:text-purple-400",accentBg:"bg-purple-500/10 dark:bg-purple-400/10",accentBorder:"border-purple-500/20 dark:border-purple-400/15",hoverBorder:"hover:border-purple-500/30 dark:hover:border-purple-400/30",hoverGlow:"hover:shadow-[0_0_20px_-3px_rgba(168,85,247,0.15)] hover:dark:shadow-[0_0_20px_-3px_rgba(192,132,252,0.25)]",rawColor:"#a855f7"},amber:{accentText:"text-amber-500 dark:text-amber-400",accentBg:"bg-amber-500/10 dark:bg-amber-400/10",accentBorder:"border-amber-500/20 dark:border-amber-400/15",hoverBorder:"hover:border-amber-500/30 dark:hover:border-amber-400/30",hoverGlow:"hover:shadow-[0_0_20px_-3px_rgba(245,158,11,0.15)] hover:dark:shadow-[0_0_20px_-3px_rgba(245,158,11,0.25)]",rawColor:"#f59e0b"}}),[]),I=ce[U]||ce.emerald,ve=ae[U]?E?ae[U].dark:ae[U].light:E?ae.emerald.dark:ae.emerald.light,[g,de]=l.useState(()=>{if(f)return"2d";try{return window.localStorage?.getItem("tt:heatmap-view")==="3d"?"3d":"2d"}catch{return"2d"}});l.useEffect(()=>{if(!f)try{window.localStorage?.setItem("tt:heatmap-view",g)}catch{}},[g,f]),l.useEffect(()=>{if(g!=="2d")return;const a=K.current;a&&(a.scrollLeft=a.scrollWidth)},[s?.weeks,g]),l.useEffect(()=>{const a=K.current;if(!a)return;const u=()=>{L.current&&(clearTimeout(L.current),L.current=null),ie(null)};return a.addEventListener("scroll",u),()=>a.removeEventListener("scroll",u)},[]);const ee=s?.week_starts_on==="mon"?"mon":"sun",xe=l.useMemo(()=>{const a=Array.isArray(s?.weeks)?s.weeks:[];if(!a.length)return{weeks:[]};const u=[];for(const z of a)for(const N of Array.isArray(z)?z:[])N?.day&&u.push({day:N.day,total_tokens:N.total_tokens??N.value??0,billable_total_tokens:N.billable_total_tokens??N.value??N.total_tokens??0,models:N.models??null});return Ke({dailyRows:u,weeks:Math.max(52,a.length),to:s?.to,weekStartsOn:ee})},[s?.to,s?.weeks,ee]),y=xe?.weeks||[],T=l.useMemo(()=>{let a=0,u=0,z={day:null,value:0},N=0,W=0;const O=[];y.forEach(k=>{(Array.isArray(k)?k:[]).forEach(b=>{b&&b.day&&O.push(b)})}),O.sort((k,b)=>k.day.localeCompare(b.day)),O.forEach(k=>{const b=Number(k.value)||0;a+=b,b>0?(u++,N++,N>W&&(W=N)):N=0,b>z.value&&(z={day:k.day,value:b})});const t=O.length||365,r=(u/t*100).toFixed(1);let n="heatmap.3d.modal.ai.eval.default",i="heatmap.3d.modal.ai.title.default";a>=15e6?(i="heatmap.3d.modal.ai.title.peak",n="heatmap.3d.modal.ai.eval.peak"):a>=5e6?(i="heatmap.3d.modal.ai.title.heavy",n="heatmap.3d.modal.ai.eval.heavy"):a>=1e6?(i="heatmap.3d.modal.ai.title.core",n="heatmap.3d.modal.ai.eval.core"):a>=2e4&&(i="heatmap.3d.modal.ai.title.steady",n="heatmap.3d.modal.ai.eval.steady");const m=s?.total_cost_usd,x=Number(m),M=m!=null&&(typeof m!="string"||m.trim()!=="")&&Number.isFinite(x)?x:a/15e5;return{totalTokens:a,activeDays:u,activeRate:r,maxSingleDay:z,maxStreak:W,aiEvaluationTitleKey:i,aiEvaluationKey:n,totalCostUsd:M}},[y,s?.total_cost_usd]),Ce=l.useMemo(()=>Ve(T.totalCostUsd,{currency:Y,rate:P}),[T.totalCostUsd,Y,P]),pe=a=>A(a,{mode:Qe.COMPACT,decimals:2}),ke=ee==="mon"?["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(a=>o(`heatmap.day.${a.toLowerCase()}`)):["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(a=>o(`heatmap.day.${a.toLowerCase()}`)),we=l.useMemo(()=>gt(y.length,xe?.to,ee,ne),[xe?.to,y.length,ee,ne]);if(!y.length)return e.jsx("div",{className:"py-8 text-center text-sm text-oai-gray-500",children:o("heatmap.empty")});const te=f?10:ct,G=f?2:dt,_=f?22:mt,D=_+y.length*te+Math.max(0,y.length-1)*G,me=`${_}px repeat(${y.length}, ${te}px)`;return e.jsxs("div",{ref:h,className:f?"relative":"relative rounded-xl border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-900 p-5",children:[!f&&e.jsxs("div",{className:"flex items-baseline justify-between mb-3",children:[e.jsx("h3",{className:"text-sm font-medium text-oai-gray-500 dark:text-oai-gray-300 uppercase tracking-wide",children:o("heatmap.title")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{role:"tablist","aria-label":"Heatmap view",className:"flex rounded-md border border-oai-gray-200 dark:border-oai-gray-800 p-0.5 text-[10px]",children:[e.jsx("button",{type:"button",role:"tab","aria-selected":g==="2d",onClick:()=>de("2d"),className:g==="2d"?"px-2 py-0.5 rounded bg-oai-gray-100 text-oai-black dark:bg-oai-gray-800 dark:text-oai-white font-medium":"px-2 py-0.5 rounded text-oai-gray-500 dark:text-oai-gray-400 hover:text-oai-gray-700 dark:hover:text-oai-gray-200",children:o("heatmap.view.2d")}),e.jsx("button",{type:"button",role:"tab","aria-selected":g==="3d",onClick:()=>de("3d"),className:g==="3d"?"px-2 py-0.5 rounded bg-oai-gray-100 text-oai-black dark:bg-oai-gray-800 dark:text-oai-white font-medium":"px-2 py-0.5 rounded text-oai-gray-500 dark:text-oai-gray-400 hover:text-oai-gray-700 dark:hover:text-oai-gray-200",children:o("heatmap.view.3d")})]}),e.jsx("span",{className:"text-xs text-oai-gray-400 dark:text-oai-gray-450",children:p||o("heatmap.legend.utc")})]})]}),g==="3d"&&e.jsxs("div",{onClick:Q,className:"cursor-pointer group relative overflow-hidden rounded-lg hover:border-oai-gray-350 dark:hover:border-oai-gray-700 border border-transparent transition-all",title:o("heatmap.3d.hover_tip"),children:[e.jsx(Ae,{weeks:y,isDark:E,palette:U}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-oai-gray-900/5 to-transparent pointer-events-none opacity-0 group-hover:opacity-100 transition-opacity flex items-end justify-center pb-2",children:e.jsxs("span",{className:"text-[10px] bg-white/95 dark:bg-oai-gray-900/95 shadow border border-oai-gray-200/60 dark:border-oai-gray-800/80 px-2.5 py-1 rounded-full font-medium text-oai-gray-500 dark:text-oai-gray-400 flex items-center gap-1 transform translate-y-2 group-hover:translate-y-0 transition-transform duration-200",children:[e.jsx(tt,{size:9}),o("heatmap.3d.hover_tip")]})})]}),g==="2d"&&e.jsx("div",{ref:K,className:`overflow-x-auto overflow-y-hidden heatmap-scroll-thin${f?"":" pb-1"}`,children:e.jsxs("div",{style:{minWidth:D},children:[e.jsxs("div",{className:"grid text-[10px] uppercase text-oai-gray-400 dark:text-oai-gray-400 mb-1",style:{gridTemplateColumns:me,columnGap:G},children:[e.jsx("span",{}),we.map(a=>e.jsx("span",{style:{gridColumnStart:a.index+2},className:"whitespace-nowrap",children:a.label},`${a.label}-${a.index}`))]}),e.jsxs("div",{className:"grid",style:{gridTemplateColumns:me,columnGap:G},children:[e.jsx("div",{className:"grid text-[10px] text-oai-gray-400 dark:text-oai-gray-400 sticky left-0 bg-white dark:bg-oai-gray-900 pr-2",style:{gridTemplateRows:`repeat(7, ${te}px)`,rowGap:G},children:ke.map(a=>e.jsx("span",{className:"leading-none",children:a},a))}),e.jsx("div",{className:"grid",style:{gridAutoFlow:"column",gridTemplateRows:`repeat(7, ${te}px)`,gap:G},children:y.map((a,u)=>(Array.isArray(a)?a:[]).map((z,N)=>{if(!z)return null;const W=z.day||`e-${u}-${N}`,O=Number(z.level)||0,t=S[O]||S[0];return e.jsx("span",{onMouseEnter:r=>ge(r,z),onMouseLeave:ye,className:"rounded-[2px] transition-transform hover:scale-125 hover:z-10 cursor-pointer",style:{width:te,height:te,background:t}},W)}))})]})]})}),!c&&e.jsxs("div",{className:"flex items-center justify-center gap-2 mt-3",children:[e.jsx("span",{className:"text-[10px] text-oai-gray-400 dark:text-oai-gray-400",children:o("heatmap.legend.less")}),e.jsx("div",{className:"flex gap-0.5",children:S.map((a,u)=>e.jsx("span",{className:"rounded-[1px]",style:{width:10,height:10,background:a}},u))}),e.jsx("span",{className:"text-[10px] text-oai-gray-400 dark:text-oai-gray-400",children:o("heatmap.legend.more")})]}),j&&e.jsx("div",{onAnimationEnd:be,onClick:a=>{a.target===a.currentTarget&&se()},className:`fixed inset-0 z-50 flex items-center justify-center p-3 md:p-6 backdrop-blur-md bg-black/15 dark:bg-black/40 ${Z?"animate-tt-fade-out":"animate-tt-fade-in"}`,children:e.jsxs("div",{className:`relative w-full max-w-6xl h-[88vh] backdrop-blur-2xl bg-white/90 dark:bg-oai-gray-900/90 border border-oai-gray-200/50 dark:border-white/10 shadow-2xl rounded-2xl flex flex-col md:flex-row overflow-hidden ${Z?"animate-tt-modal-exit":"animate-tt-modal"}`,children:[e.jsx("button",{type:"button",onClick:se,className:"absolute top-4 right-4 z-50 p-2 rounded-full border border-oai-gray-200/60 dark:border-oai-gray-800/60 bg-white/50 dark:bg-oai-gray-900/50 text-oai-gray-500 dark:text-oai-gray-400 hover:text-oai-gray-900 dark:hover:text-white hover:rotate-90 hover:scale-105 active:scale-95 transition-all duration-300",children:e.jsx(Ze,{size:16})}),e.jsxs("div",{className:"w-full md:w-[340px] border-b md:border-b-0 md:border-r border-zinc-200/50 dark:border-zinc-800/40 p-5 md:p-6 flex flex-col gap-6 overflow-y-auto backdrop-blur-md bg-zinc-50/50 dark:bg-zinc-950/50",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 select-none",children:[e.jsxs("span",{className:"relative flex h-1.5 w-1.5",children:[e.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",style:{backgroundColor:I.rawColor}}),e.jsx("span",{className:"relative inline-flex rounded-full h-1.5 w-1.5",style:{backgroundColor:I.rawColor}})]}),e.jsx("span",{className:"text-[9px] font-extrabold uppercase tracking-widest font-mono text-zinc-400 dark:text-zinc-500",children:o("heatmap.3d.modal.eyebrow")})]}),e.jsx("h4",{className:"text-xl font-black text-zinc-900 dark:text-zinc-50 tracking-tight leading-none mt-2 select-none",children:o("heatmap.3d.modal.title")}),e.jsx("p",{className:"text-[11px] leading-relaxed text-zinc-400 dark:text-zinc-500 mt-2 font-normal select-none",children:o("heatmap.3d.modal.desc")})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-x-5 gap-y-5 border-y border-zinc-200/50 dark:border-zinc-800/50 py-5 select-none",children:[e.jsxs("div",{className:"flex flex-col gap-1 relative group cursor-help",children:[e.jsx("div",{className:"absolute left-0 bottom-full mb-2 pointer-events-none opacity-0 translate-y-1 group-hover:opacity-100 group-hover:translate-y-0 transition-all duration-200 z-50",children:e.jsxs("div",{className:"bg-white dark:bg-zinc-950 text-zinc-900 dark:text-zinc-50 text-[10px] font-semibold font-mono rounded-lg px-2.5 py-1.5 shadow-xl border border-zinc-200 dark:border-zinc-800/80 whitespace-nowrap flex flex-col",children:[e.jsx("span",{className:"text-[9px] text-zinc-400 dark:text-zinc-500",children:o("heatmap.3d.modal.stats.precision_total_tokens")}),e.jsxs("span",{className:"mt-0.5 font-bold text-zinc-900 dark:text-zinc-50",children:[R(T.totalTokens)," ",o("heatmap.unit.tokens")]})]})}),e.jsx("span",{className:"text-[9px] font-bold text-zinc-400 dark:text-zinc-500 uppercase tracking-widest font-mono",children:o("heatmap.3d.modal.stats.total_tokens")}),e.jsxs("div",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-xl font-black text-zinc-900 dark:text-zinc-50 tracking-tight font-mono transition-transform duration-200 group-hover:-translate-y-[1px]",children:pe(T.totalTokens)}),e.jsx("div",{className:"opacity-30 group-hover:opacity-60 transition-opacity",children:e.jsx("svg",{width:"24",height:"10",viewBox:"0 0 24 10",fill:"none",children:e.jsx("path",{d:"M1 9C3 7 5 7 7 4C9 1 11 0 13 2C15 4 17 0 23 0",stroke:I.rawColor,strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]}),e.jsxs("div",{className:"flex flex-col gap-1 group cursor-default",children:[e.jsx("span",{className:"text-[9px] font-bold text-zinc-400 dark:text-zinc-500 uppercase tracking-widest font-mono",children:o("heatmap.3d.modal.stats.estimated_cost")}),e.jsx("span",{className:"text-xl font-black text-zinc-900 dark:text-zinc-50 tracking-tight font-mono transition-transform duration-200 group-hover:-translate-y-[1px]",children:Ce})]}),e.jsxs("div",{className:"flex flex-col gap-1 group cursor-default",children:[e.jsx("span",{className:"text-[9px] font-bold text-zinc-400 dark:text-zinc-500 uppercase tracking-widest font-mono",children:o("heatmap.3d.modal.stats.active_rate_days")}),e.jsxs("span",{className:"text-xl font-black text-zinc-900 dark:text-zinc-50 tracking-tight font-mono transition-transform duration-200 group-hover:-translate-y-[1px]",children:[T.activeRate,"%"," ",e.jsxs("span",{className:"text-[10px] font-bold text-zinc-400 dark:text-zinc-500 font-mono",children:["(",T.activeDays,o("heatmap.3d.modal.stats.days_suffix"),")"]})]})]}),e.jsxs("div",{className:"flex flex-col gap-1 group cursor-default",children:[e.jsx("span",{className:"text-[9px] font-bold text-zinc-400 dark:text-zinc-500 uppercase tracking-widest font-mono",children:o("heatmap.3d.modal.stats.max_streak")}),e.jsxs("span",{className:"text-xl font-black text-amber-500 tracking-tight font-mono transition-transform duration-200 group-hover:-translate-y-[1px]",children:[T.maxStreak," ",e.jsx("span",{className:"text-[10px] font-bold text-amber-500/80 font-mono",children:o("heatmap.3d.modal.stats.days_suffix")})]})]}),e.jsxs("div",{className:"flex flex-col gap-1 col-span-2 relative group cursor-help",children:[e.jsx("div",{className:"absolute left-0 bottom-full mb-2 pointer-events-none opacity-0 translate-y-1 group-hover:opacity-100 group-hover:translate-y-0 transition-all duration-200 z-50",children:e.jsxs("div",{className:"bg-white dark:bg-zinc-950 text-zinc-900 dark:text-zinc-50 text-[10px] font-semibold font-mono rounded-lg px-2.5 py-1.5 shadow-xl border border-zinc-200 dark:border-zinc-800/80 whitespace-nowrap flex flex-col",children:[e.jsx("span",{className:"text-[9px] text-zinc-400 dark:text-zinc-500",children:o("heatmap.3d.modal.stats.precision_peak_value")}),e.jsx("span",{className:"mt-0.5 font-bold text-zinc-900 dark:text-zinc-50",children:T.maxSingleDay.value>0?`${R(T.maxSingleDay.value)} ${o("heatmap.unit.tokens")}`:o("heatmap.3d.modal.stats.no_data")}),e.jsx("span",{className:"text-[8px] text-zinc-400 dark:text-zinc-500 mt-0.5",children:T.maxSingleDay.day||o("heatmap.3d.modal.stats.no_data")})]})}),e.jsx("span",{className:"text-[9px] font-bold text-zinc-400 dark:text-zinc-500 uppercase tracking-widest font-mono",children:o("heatmap.3d.modal.stats.peak_day")}),e.jsxs("span",{className:"text-xl font-black text-zinc-900 dark:text-zinc-50 tracking-tight font-mono transition-transform duration-200 group-hover:-translate-y-[1px]",children:[T.maxSingleDay.value>0?pe(T.maxSingleDay.value):o("heatmap.3d.modal.stats.no_data")," ",e.jsxs("span",{className:"text-[10px] font-bold text-zinc-400 dark:text-zinc-500 font-mono",children:["(",T.maxSingleDay.day||o("heatmap.3d.modal.stats.no_data"),")"]})]})]})]}),e.jsxs("div",{className:"flex flex-col gap-2.5 py-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5 select-none",children:[e.jsx(at,{size:11,style:{color:I.rawColor}}),e.jsx("span",{className:"text-[9px] font-extrabold uppercase tracking-widest font-mono",style:{color:I.rawColor},children:o(T.aiEvaluationTitleKey)})]}),e.jsxs("div",{className:"pl-3.5 border-l-2 relative transition-all duration-300 group",style:{borderColor:I.rawColor},children:[e.jsx("div",{className:"absolute inset-y-0 left-0 w-[3px] blur-[2px] opacity-15 pointer-events-none rounded-full",style:{backgroundColor:I.rawColor}}),e.jsx("p",{className:"text-[11px] leading-relaxed text-zinc-600 dark:text-zinc-400 font-normal",children:o(T.aiEvaluationKey)})]})]}),e.jsx("div",{className:"mt-auto border-t border-zinc-200/50 dark:border-zinc-800/50 pt-4 select-none",children:e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-[9px] font-bold text-zinc-400 dark:text-zinc-500 uppercase tracking-widest font-mono",children:o("heatmap.3d.modal.legend.title")}),e.jsx("span",{className:"text-[10px] font-medium text-zinc-500 dark:text-zinc-400",children:o(`heatmap.3d.modal.palette.${U}`)})]}),e.jsx("div",{className:"flex gap-1",children:ve.map((a,u)=>e.jsx("div",{className:"flex-1 h-1 rounded-[2px]",style:{backgroundColor:a},title:o("heatmap.tooltip.level",{level:u})},u))})]})})]}),e.jsxs("div",{className:"flex-1 h-full relative flex items-center justify-center overflow-hidden p-4",children:[e.jsx("div",{className:"absolute top-1/4 left-1/3 w-96 h-96 rounded-full blur-[130px] pointer-events-none -translate-x-1/2 -translate-y-1/2 transition-all duration-500",style:{backgroundColor:I.rawColor+"15"}}),e.jsx("div",{className:"absolute bottom-1/4 right-1/3 w-80 h-80 rounded-full blur-[120px] pointer-events-none translate-x-1/2 translate-y-1/2 bg-purple-500/[0.04] dark:bg-purple-500/[0.08]"}),e.jsxs("div",{className:"absolute top-4 left-1/2 -translate-x-1/2 flex items-center gap-3 p-1.5 backdrop-blur-md bg-white/70 dark:bg-oai-gray-900/75 border border-oai-gray-200/60 dark:border-oai-gray-800/80 rounded-full shadow-lg z-30 select-none",children:[e.jsx("div",{className:"flex items-center gap-1.5 px-2",children:Object.keys(ce).map(a=>{const u=U===a;return e.jsx("button",{type:"button",onClick:()=>oe(a),title:o(`heatmap.3d.modal.palette.${a}`),className:`w-3.5 h-3.5 rounded-full transition-all duration-200 relative hover:scale-125 ${a==="emerald"?"bg-[#10b981]":a==="ocean"?"bg-[#3b82f6]":a==="neon"?"bg-[#a855f7]":"bg-[#f59e0b]"}`,children:u&&e.jsx("span",{className:"absolute inset-0 rounded-full ring-2 ring-offset-1 ring-offset-white dark:ring-offset-oai-gray-900 ring-oai-gray-900 dark:ring-white scale-110"})},a)})}),e.jsx("div",{className:"w-[1px] h-4 bg-oai-gray-200 dark:bg-oai-gray-800"}),e.jsxs("div",{className:"flex items-center gap-1 pr-1",children:[e.jsx("button",{type:"button",onClick:()=>{const a=!B;le(a),J.current&&J.current.toggleAutoRotate(a)},title:B?o("heatmap.3d.modal.control.pause"):o("heatmap.3d.modal.control.play"),className:`p-1.5 rounded-full transition-all duration-200 hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 ${B?I.accentText:"text-oai-gray-400 hover:text-oai-gray-600 dark:hover:text-oai-gray-250"}`,children:B?e.jsx(ot,{size:12}):e.jsx(nt,{size:12})}),e.jsx("button",{type:"button",onClick:()=>{le(!1),J.current&&J.current.reset()},title:o("heatmap.3d.modal.control.reset"),className:"p-1.5 rounded-full text-oai-gray-400 hover:text-oai-gray-600 dark:hover:text-oai-gray-250 hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 transition-all duration-200",children:e.jsx(st,{size:12})})]})]}),e.jsx(Ae,{weeks:y,isDark:E,interactive:!0,palette:U,autoRotateInit:B,onResetViewRef:J}),e.jsxs("div",{className:"absolute bottom-4 right-4 flex items-center gap-1.5 text-[9px] font-bold text-oai-gray-400 bg-white/80 dark:bg-oai-gray-900/80 border border-oai-gray-200/50 dark:border-oai-gray-800/80 rounded-md px-2.5 py-1.5 select-none pointer-events-none backdrop-blur-md shadow-sm",children:[e.jsx(rt,{size:10,className:I.accentText}),e.jsx("span",{children:o("heatmap.3d.modal.footer.tip")})]})]})]})}),v&&!j&&typeof document<"u"&&Je.createPortal(e.jsxs("div",{className:"fixed z-[9999] w-0 h-0 transition-all duration-100 ease-out pointer-events-none",style:{position:"fixed",left:`${V.x}px`,top:`${V.y}px`},children:[e.jsxs("div",{className:`absolute left-0 ${V.flipY?"top-[10px]":"bottom-[10px]"} backdrop-blur-md bg-white/95 dark:bg-oai-gray-900/95 border border-oai-gray-200/50 dark:border-oai-gray-800/50 shadow-xl rounded-xl p-3.5 max-w-[280px] min-w-[200px] flex flex-col gap-2 animate-in fade-in zoom-in-95 duration-100`,style:{transform:`translateX(calc(-50% + ${V.shiftX}px))`},children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-oai-gray-100 dark:border-oai-gray-800/80 pb-1.5",children:[e.jsx("span",{className:"text-[11px] font-semibold text-oai-gray-500 dark:text-oai-gray-400",children:v.day}),(()=>{const a=v.level===0?E?"#9ca3af":"#6b7280":S[v.level];return e.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full font-medium",style:{backgroundColor:a+"22",color:a,border:`1px solid ${a}44`},children:o("heatmap.tooltip.level",{level:v.level})})})()]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx("span",{title:R(v.total_tokens??v.value),className:"text-lg font-bold text-oai-gray-900 dark:text-white leading-none",children:A(v.total_tokens??v.value)}),e.jsx("span",{className:"text-[10px] text-oai-gray-400 uppercase tracking-wider font-semibold",children:o("heatmap.unit.tokens")})]}),v.models&&Object.keys(v.models).length>0?e.jsxs("div",{className:"mt-1.5 border-t border-oai-gray-100 dark:border-oai-gray-800/60 pt-2 flex flex-col gap-1.5",children:[e.jsx("div",{className:"text-[10px] font-semibold text-oai-gray-400 dark:text-oai-gray-500 uppercase tracking-wider",children:o("heatmap.tooltip.model_breakdown")}),e.jsx("div",{className:"flex flex-col gap-2 max-h-[150px] overflow-y-auto pr-1.5 oai-scrollbar",children:Object.entries(v.models).map(([a,u])=>({name:a,val:Number(u)})).sort((a,u)=>u.val-a.val).map(({name:a,val:u})=>{const z=Number(v.total_tokens??v.value)||1,N=Math.round(u/z*100);return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center justify-between text-[11px] gap-3",children:[e.jsx("span",{className:"font-medium text-oai-gray-750 dark:text-oai-gray-200 truncate max-w-[120px]",title:a,children:a}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsx("span",{title:R(u),className:"font-mono text-oai-gray-900 dark:text-oai-gray-100 font-semibold",children:A(u)}),e.jsxs("span",{className:"text-[9px] text-oai-gray-450 dark:text-oai-gray-500 min-w-[28px] text-right font-medium",children:[N,"%"]})]})]}),e.jsx("div",{className:"w-full h-1 bg-oai-gray-100 dark:bg-oai-gray-800/85 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full transition-all duration-300",style:{width:`${N}%`,backgroundColor:S[4],boxShadow:`0 0 4px ${S[4]}55`}})})]},a)})})]}):e.jsx("p",{className:"text-[11px] text-oai-gray-600 dark:text-oai-gray-300 leading-relaxed font-normal mt-1 border-t border-dashed border-oai-gray-100 dark:border-oai-gray-800/60 pt-1.5",children:De(v.level,v.total_tokens??v.value,A)})]})]}),e.jsx("div",{className:`absolute left-0 -translate-x-1/2 w-2.5 h-2.5 rotate-45 bg-white dark:bg-oai-gray-900 shadow-sm ${V.flipY?"top-[6px] border-l border-t":"bottom-[6px] border-r border-b"} border-oai-gray-200/50 dark:border-oai-gray-800/50`,style:V.flipY?{marginTop:"1px"}:{marginBottom:"1px"}})]}),document.body),e.jsx("style",{children:`
1
+ import{A as Ne,r as l,j as e,c as o,ak as qe,aw as Ke,ax as Ve,X as Ze,an as Je,l as Qe}from"./__vite-browser-external-DUJeOWgd.js";import{u as et}from"./useCurrency-pwClnCZ5.js";import{u as Ee}from"./useTokenFormat-BMvVAe6V.js";import{M as tt,T as at}from"./terminal-B3_fCLFs.js";import{I as rt}from"./info-CyDY7NYM.js";const Re={name:"pause",size:24,node:[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]};Re.node;const ot=Ne(Re);const Pe={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};Pe.node;const nt=Ne(Pe);const Le={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};Le.node;const st=Ne(Le),ae={emerald:{light:["#ebedf0","#a7f3d0","#6ee7b7","#34d399","#10b981"],dark:["#2d333b","#065f46","#059669","#10b981","#34d399"],gridColor:{light:"rgba(16, 185, 129, 0.12)",dark:"rgba(52, 211, 153, 0.08)"}},ocean:{light:["#f1f5f9","#93c5fd","#60a5fa","#3b82f6","#1d4ed8"],dark:["#1e293b","#1e3a8a","#2563eb","#3b82f6","#60a5fa"],gridColor:{light:"rgba(59, 130, 246, 0.12)",dark:"rgba(96, 165, 250, 0.08)"}},neon:{light:["#faf5ff","#ebd5ff","#c084fc","#a855f7","#7e22ce"],dark:["#2e1065","#581c87","#8b5cf6","#a855f7","#c084fc"],gridColor:{light:"rgba(168, 85, 247, 0.12)",dark:"rgba(192, 132, 252, 0.08)"}},amber:{light:["#fffbeb","#fde68a","#f59e0b","#d97706","#b45309"],dark:["#451a03","#78350f","#b45309","#d97706","#f59e0b"],gridColor:{light:"rgba(245, 158, 11, 0.12)",dark:"rgba(245, 158, 11, 0.08)"}}};function it(s,c){const p=/^#([0-9a-f]{6})$/i.exec(s);if(!p)return s;const d=parseInt(p[1],16),f=d>>16&255,$=d>>8&255,Y=d&255,P=A=>Math.max(0,Math.min(255,Math.round(A*c)));return`rgb(${P(f)}, ${P($)}, ${P(Y)})`}function q(s,c,p,d,f){const $=Math.cos(d),Y=Math.sin(d),P=s*$-c*Y,A=s*Y+c*$,R=p,E=Math.cos(f),S=Math.sin(f),K=P,h=A*E-R*S,v=A*S+R*E;return{x:K,y:h,z:v}}function lt(s,c,p,d,f){return q(s,c,p,d,f)}function De(s,c,p=d=>Number(d).toLocaleString()){const d=p(c);if(s>=4){const f=Math.floor(Math.random()*3)+1;return o(`heatmap.3d.voxel.joke.${f}`,{value:d})}else return s===3?o("heatmap.3d.voxel.level3",{value:d}):s===2?o("heatmap.3d.voxel.level2",{value:d}):s===1?o("heatmap.3d.voxel.level1",{value:d}):o("heatmap.3d.voxel.level0")}function Ae({weeks:s,palette:c="auto",isDark:p=!1,interactive:d=!1,autoRotateInit:f=!1,onResetViewRef:$=null}){const{formatTokens:Y,formatTokensTooltip:P}=Ee(),A=ae[c]||(c==="auto"?ae.emerald:null),R=A?p?A.dark:A.light:Array.isArray(c)?c:p?ae.emerald.dark:ae.emerald.light,E=A?p?A.gridColor.dark:A.gridColor.light:p?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.06)",S=-.2,K=.88,[h,v]=l.useState({yaw:S,pitch:K}),[ie,V]=l.useState(f),[he,L]=l.useState(1),j=d?13:10.5,fe=l.useMemo(()=>{const t=[],r=s.length;if(r===0||!d)return[];for(let n=0;n<=7;n++){const i=(n-3.5)*j,m=q(-r/2*j,i,0,h.yaw,h.pitch),x=q(r/2*j,i,0,h.yaw,h.pitch);t.push({d:`M${m.x},${m.y} L${x.x},${x.y}`,key:`horiz-${n}`})}for(let n=0;n<=r;n+=4){const i=(n-r/2)*j,m=q(i,-3.5*j,0,h.yaw,h.pitch),x=q(i,3.5*j,0,h.yaw,h.pitch);t.push({d:`M${m.x},${m.y} L${x.x},${x.y}`,key:`vert-${n}`})}if(r%4!==0){const n=(r-r/2)*j,i=q(n,-3.5*j,0,h.yaw,h.pitch),m=q(n,3.5*j,0,h.yaw,h.pitch);t.push({d:`M${i.x},${i.y} L${m.x},${m.y}`,key:"vert-last"})}return t},[s.length,h,j,d]);l.useEffect(()=>{$&&($.current={reset:()=>{v({yaw:S,pitch:K}),V(!1),L(1),be()},toggleAutoRotate:t=>{V(t)}})},[$]);const Z=l.useRef(null),F=l.useRef(null),B=l.useRef(!1),le=l.useRef({x:0,y:0}),J=l.useRef({yaw:S,pitch:K}),U=l.useRef({x:0,y:0}),oe=l.useRef({x:0,y:0,time:0}),ne=l.useRef(null),[ge,ye]=l.useState(0),Q=l.useRef(null),se=l.useRef(!0);l.useEffect(()=>(se.current=!0,()=>{se.current=!1}),[]);const be=()=>{Q.current&&cancelAnimationFrame(Q.current),ye(0);const t=performance.now(),r=1200,n=i=>{if(!se.current)return;const m=i-t,x=Math.min(1,m/r),C=1-Math.pow(1-x,3);ye(C),x<1?Q.current=requestAnimationFrame(n):Q.current=null};Q.current=requestAnimationFrame(n)};l.useEffect(()=>(be(),()=>{Q.current&&cancelAnimationFrame(Q.current)}),[d]),l.useEffect(()=>{if(!ie||B.current||typeof window>"u"||typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let r;const n=()=>{if(typeof document<"u"&&document.visibilityState==="hidden"){r=requestAnimationFrame(n);return}v(i=>({yaw:i.yaw+.002,pitch:i.pitch})),r=requestAnimationFrame(n)};return r=requestAnimationFrame(n),()=>cancelAnimationFrame(r)},[ie]);const de=(t,r)=>{d&&(B.current=!0,le.current={x:t,y:r},J.current={yaw:h.yaw,pitch:h.pitch},U.current={x:0,y:0},oe.current={x:t,y:r,time:performance.now()},ne.current&&cancelAnimationFrame(ne.current))},I=(t,r)=>{if(!B.current)return;const n=t-le.current.x,i=r-le.current.y,m=performance.now(),x=m-oe.current.time;x>0&&(U.current={x:(t-oe.current.x)/x,y:(r-oe.current.y)/x}),oe.current={x:t,y:r,time:m};const C=.005,M=J.current.yaw-n*C,k=Math.PI/2.3,b=Math.max(-k,Math.min(k,J.current.pitch-i*C));v({yaw:M,pitch:b})},ve=()=>{if(!B.current)return;B.current=!1;let t=-U.current.x*12,r=-U.current.y*12;const n=.95,i=()=>{B.current||(t*=n,r*=n,!(Math.abs(t)<.01&&Math.abs(r)<.01)&&(v(m=>{const x=m.yaw+t*.005,C=Math.PI/2.3,M=Math.max(-C,Math.min(C,m.pitch+r*.005));return{yaw:x,pitch:M}}),ne.current=requestAnimationFrame(i)))};ne.current=requestAnimationFrame(i)},[g,ce]=l.useState(null),[ee,xe]=l.useState({x:0,y:0,shiftX:0}),y=l.useRef(null);l.useEffect(()=>()=>{y.current&&clearTimeout(y.current)},[]),l.useEffect(()=>{if(!d||!F.current)return;const t=n=>{n.preventDefault();const i=-n.deltaY*.0025;L(m=>{const x=m+i;return Math.max(.5,Math.min(3,x))})},r=F.current;return r.addEventListener("wheel",t,{passive:!1}),()=>{r.removeEventListener("wheel",t)}},[d]);const T=l.useMemo(()=>{const t=[];return s.forEach((r,n)=>{(Array.isArray(r)?r:[]).forEach((i,m)=>{i&&t.push({key:i.day||`${n}-${m}`,col:n,row:m,level:i.level||0,value:i.value||0,day:i.day,models:i.models||null})})}),t},[s]),pe=j-(d?1.8:1.5),ke=d?38:28,we=t=>Math.max(1.8,Number(t)/4*ke),te=l.useMemo(()=>{if(T.length===0)return[];const t=s.length;return T.map(r=>{const n=we(r.level),i=Math.sqrt(Math.pow(r.col-t/2,2)+Math.pow(r.row-3.5,2)),m=Math.sqrt(Math.pow(t/2,2)+Math.pow(3.5,2)),x=i/m*.4,C=Math.min(1,Math.max(0,(ge-x)*(1/.6))),M=n*C,k=(r.col-t/2)*j,b=(r.row-3.5)*j,w=pe/2,H=[{x:k-w,y:b-w,z:0},{x:k+w,y:b-w,z:0},{x:k+w,y:b+w,z:0},{x:k-w,y:b+w,z:0},{x:k-w,y:b-w,z:M},{x:k+w,y:b-w,z:M},{x:k+w,y:b+w,z:M},{x:k-w,y:b+w,z:M}].map(X=>q(X.x,X.y,X.z,h.yaw,h.pitch)),ue=q(k,b,M/2,h.yaw,h.pitch),Ue=[{name:"top",indices:[4,5,6,7],scale:1,normal:[0,0,1]},{name:"bottom",indices:[3,2,1,0],scale:.4,normal:[0,0,-1]},{name:"left",indices:[3,0,4,7],scale:.55,normal:[-1,0,0]},{name:"right",indices:[1,2,6,5],scale:.75,normal:[1,0,0]},{name:"front",indices:[0,1,5,4],scale:.85,normal:[0,-1,0]},{name:"back",indices:[2,3,7,6],scale:.65,normal:[0,1,0]}],Ie=R[Math.min(4,Math.max(0,Number(r.level)||0))],ze=[],We=.35,Xe=-.4,Be=.83;return Ue.forEach(X=>{const je=lt(X.normal[0],X.normal[1],X.normal[2],h.yaw,h.pitch);if(je.z>.001){const _e=H[X.indices[0]],Me=H[X.indices[1]],Te=H[X.indices[2]],$e=H[X.indices[3]],Fe=`M${_e.x},${_e.y} L${Me.x},${Me.y} L${Te.x},${Te.y} L${$e.x},${$e.y} Z`,Oe=je.x*We+je.y*Xe+je.z*Be,He=p?.18:0,Ge=X.scale*(.82+.28*Math.max(0,Oe))+He;ze.push({name:X.name,d:Fe,fill:it(Ie,Ge)})}}),{...r,centerProj:ue,renderedFaces:ze}})},[T,h,R,s.length,ge,j,pe,ke]),G=l.useMemo(()=>[...te].sort((t,r)=>t.centerProj.z-r.centerProj.z),[te]),_=l.useMemo(()=>{if(G.length===0)return{minX:-100,minY:-100,maxX:100,maxY:100};let t=1/0,r=1/0,n=-1/0,i=-1/0;return G.forEach(m=>{const x=j*2,C=m.centerProj.x,M=m.centerProj.y;C-x<t&&(t=C-x),C+x>n&&(n=C+x),M-x<r&&(r=M-x),M+x>i&&(i=M+x)}),{minX:t,minY:r,maxX:n,maxY:i}},[G,j]),D=12,me=_.maxX-_.minX+D*2,a=_.maxY-_.minY+D*2,u=me/he,z=a/he,N=_.minX-D+(me-u)/2,W=_.minY-D+(a-z)/2,O=`${N} ${W} ${u} ${z}`;return T.length===0?e.jsx("div",{className:"py-8 text-center text-sm text-oai-gray-500",children:o("heatmap.empty")}):e.jsxs("div",{ref:F,className:`relative select-none outline-none ${d?"cursor-grab active:cursor-grabbing w-full h-full flex items-center justify-center":"w-full overflow-hidden flex justify-center"}`,onMouseDown:t=>{if(!d)return;de(t.clientX,t.clientY);const r=i=>I(i.clientX,i.clientY),n=()=>{ve(),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",n)};window.addEventListener("mousemove",r),window.addEventListener("mouseup",n)},onTouchStart:t=>{!d||t.touches.length===0||de(t.touches[0].clientX,t.touches[0].clientY)},onTouchMove:t=>{!d||t.touches.length===0||I(t.touches[0].clientX,t.touches[0].clientY)},onTouchEnd:()=>{d&&ve()},children:[e.jsxs("svg",{ref:Z,viewBox:O,width:d?"95%":"100%",height:d?"95%":"auto",role:"img","aria-label":o("heatmap.iso.aria")||"3D interactive activity heatmap",style:{display:"block",width:"100%",height:"auto",maxWidth:d?"none":`${me}px`,maxHeight:d?"78vh":"none"},className:"transition-transform duration-300 ease-out",children:[d&&fe.map(t=>e.jsx("path",{d:t.d,fill:"none",stroke:E,strokeWidth:.25,strokeDasharray:"1.5 2.5",strokeLinecap:"round"},t.key)),G.map(t=>{const r=g&&g.key===t.key;return e.jsxs("g",{onMouseEnter:n=>{if(y.current&&(clearTimeout(y.current),y.current=null),ce(t),d&&Z.current){const i=q((t.col-s.length/2)*j,(t.row-3.5)*j,we(t.level),h.yaw,h.pitch);let m=0,x=0;const C=Z.current;if(F.current&&typeof C.createSVGPoint=="function"&&typeof C.getScreenCTM=="function")try{const w=C.createSVGPoint();w.x=i.x,w.y=i.y;const re=C.getScreenCTM();if(re){const H=w.matrixTransform(re),ue=F.current.getBoundingClientRect();m=H.x-ue.left,x=H.y-ue.top}}catch{const re=C.getBoundingClientRect(),H=_.maxX-_.minX+D*2,ue=_.maxY-_.minY+D*2;m=(i.x-(_.minX-D))/H*re.width,x=(i.y-(_.minY-D))/ue*re.height}else{const w=C.getBoundingClientRect(),re=_.maxX-_.minX+D*2,H=_.maxY-_.minY+D*2;m=(i.x-(_.minX-D))/re*w.width,x=(i.y-(_.minY-D))/H*w.height}const M=140;let k=0;const b=F.current?F.current.getBoundingClientRect().width:C.getBoundingClientRect().width;m<M?k=M-m:m>b-M&&(k=b-M-m),xe({x:m,y:x,shiftX:k})}},onMouseLeave:()=>{y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{ce(null)},150)},className:"transition-all duration-200",style:{filter:r?"brightness(1.15) drop-shadow(0 4px 6px rgba(0,0,0,0.15))":"none",cursor:d?"pointer":"default"},children:[!d&&t.day&&e.jsx("title",{children:o("heatmap.tooltip.tokens",{day:t.day,value:P(t.value)})}),t.renderedFaces.map((n,i)=>e.jsx("path",{d:n.d,fill:n.fill,stroke:n.fill,strokeWidth:.25,strokeLinejoin:"round"},i))]},t.key)})]}),d&&g&&e.jsxs("div",{onMouseEnter:()=>{y.current&&(clearTimeout(y.current),y.current=null)},onMouseLeave:()=>{y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{ce(null)},150)},className:"absolute z-[9999] w-0 h-0 transition-all duration-100 ease-out",style:{left:`${ee.x}px`,top:`${ee.y}px`},children:[e.jsxs("div",{className:"absolute left-0 bottom-[10px] backdrop-blur-md bg-white/90 dark:bg-oai-gray-900/90 border border-oai-gray-200/50 dark:border-oai-gray-800/50 shadow-xl rounded-xl p-3.5 max-w-[280px] min-w-[200px] flex flex-col gap-2 animate-in fade-in zoom-in-95 duration-100",style:{transform:`translateX(calc(-50% + ${ee.shiftX}px))`},children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-oai-gray-100 dark:border-oai-gray-800/80 pb-1.5",children:[e.jsx("span",{className:"text-[11px] font-semibold text-oai-gray-500 dark:text-oai-gray-400",children:g.day}),(()=>{const t=g.level===0?p?"#9ca3af":"#6b7280":R[g.level];return e.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full font-medium",style:{backgroundColor:t+"22",color:t,border:`1px solid ${t}44`},children:o("heatmap.tooltip.level",{level:g.level})})})()]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx("span",{title:P(g.value),className:"text-lg font-bold text-oai-gray-900 dark:text-white leading-none",children:Y(g.value)}),e.jsx("span",{className:"text-[10px] text-oai-gray-400 uppercase tracking-wider font-semibold",children:o("heatmap.unit.tokens")})]}),g.models&&Object.keys(g.models).length>0?e.jsxs("div",{className:"mt-1.5 border-t border-oai-gray-100 dark:border-oai-gray-800/60 pt-2 flex flex-col gap-1.5",children:[e.jsx("div",{className:"text-[10px] font-semibold text-oai-gray-400 dark:text-oai-gray-500 uppercase tracking-wider",children:o("heatmap.tooltip.model_breakdown")}),e.jsx("div",{className:"flex flex-col gap-2 max-h-[150px] overflow-y-auto pr-1.5 scrollbar-thin",children:Object.entries(g.models).map(([t,r])=>({name:t,val:Number(r)})).sort((t,r)=>r.val-t.val).map(({name:t,val:r})=>{const n=Number(g.value)||1,i=Math.round(r/n*100);return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center justify-between text-[11px] gap-3",children:[e.jsx("span",{className:"font-medium text-oai-gray-750 dark:text-oai-gray-200 truncate max-w-[120px]",title:t,children:t}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsx("span",{title:P(r),className:"font-mono text-oai-gray-900 dark:text-oai-gray-100 font-semibold",children:Y(r)}),e.jsxs("span",{className:"text-[9px] text-oai-gray-450 dark:text-oai-gray-500 min-w-[28px] text-right font-medium",children:[i,"%"]})]})]}),e.jsx("div",{className:"w-full h-1 bg-oai-gray-100 dark:bg-oai-gray-800/85 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full transition-all duration-300",style:{width:`${i}%`,backgroundColor:R[4],boxShadow:`0 0 4px ${R[4]}55`}})})]},t)})})]}):e.jsx("p",{className:"text-[11px] text-oai-gray-600 dark:text-oai-gray-300 leading-relaxed font-normal mt-1 border-t border-dashed border-oai-gray-100 dark:border-oai-gray-800/60 pt-1.5",children:De(g.level,g.value,Y)})]})]}),e.jsx("div",{className:"absolute bottom-[6px] left-0 -translate-x-1/2 w-2.5 h-2.5 rotate-45 bg-white dark:bg-oai-gray-900 border-r border-b border-oai-gray-200/50 dark:border-oai-gray-800/50 shadow-sm",style:{marginBottom:"1px"}})]})]})}const dt=12,ct=3,mt=26,ut=["#ebedf0","#a7f3d0","#6ee7b7","#34d399","#10b981"],xt=["#121212","#065f46","#059669","#10b981","#34d399"];function pt(s){if(typeof s!="string")return null;const c=/^(\d{4})-(\d{2})-(\d{2})$/.exec(s.trim());if(!c)return null;const p=new Date(Date.UTC(Number(c[1]),Number(c[2])-1,Number(c[3])));return Number.isFinite(p.getTime())?p:null}function Ye(s,c){return new Date(Date.UTC(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()+c))}function ht(s,c){return Math.floor((Date.UTC(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate())-Date.UTC(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()))/864e5)}function ft(s,c){const p=c==="mon"?1:0,d=s.getUTCDay();return Ye(s,-((d-p+7)%7))}function gt(s,c,p,d){if(!s)return[];const f=pt(c)||new Date,$=[];for(let E=11;E>=0;E-=1)$.push(new Date(Date.UTC(f.getUTCFullYear(),f.getUTCMonth()-E,1)));const Y=ft(f,p),P=Ye(Y,-(s-1)*7),A=[],R=new Set;for(const E of $){const S=Math.floor(ht(P,E)/7);S<0||S>=s||R.has(S)||(R.add(S),A.push({label:d[E.getUTCMonth()],index:S}))}return A}function _t({heatmap:s,timeZoneLabel:c,timeZoneShortLabel:p,hideLegend:d=!1,embedded:f=!1}){const{resolvedTheme:$}=qe(),{currency:Y,rate:P}=et(),{formatTokens:A,formatTokensTooltip:R}=Ee(),E=$==="dark",S=E?xt:ut,K=l.useRef(null),h=l.useRef(null),[v,ie]=l.useState(null),[V,he]=l.useState({x:0,y:0,shiftX:0,flipY:!1}),L=l.useRef(null);l.useEffect(()=>()=>{L.current&&clearTimeout(L.current)},[]);const[j,fe]=l.useState(!1),[Z,F]=l.useState(!1),[B,le]=l.useState(!1),J=l.useRef(null),[U,oe]=l.useState("emerald"),ne=[o("heatmap.month.jan"),o("heatmap.month.feb"),o("heatmap.month.mar"),o("heatmap.month.apr"),o("heatmap.month.may"),o("heatmap.month.jun"),o("heatmap.month.jul"),o("heatmap.month.aug"),o("heatmap.month.sep"),o("heatmap.month.oct"),o("heatmap.month.nov"),o("heatmap.month.dec")],ge=(a,u)=>{if(!u||!u.day)return;L.current&&(clearTimeout(L.current),L.current=null),ie(u);const z=a.currentTarget.getBoundingClientRect(),N=typeof window<"u"?window.innerWidth:1024,W=z.left+z.width/2,O=z.top<300,t=O?z.bottom:z.top,r=140;let n=0;W<r?n=r-W:W>N-r&&(n=N-r-W),he({x:W,y:t,shiftX:n,flipY:O})},ye=()=>{L.current&&clearTimeout(L.current),L.current=setTimeout(()=>{ie(null)},150)},Q=()=>{F(!1),fe(!0)},se=()=>{F(!0)},be=a=>{a.target===a.currentTarget&&Z&&(fe(!1),F(!1))};l.useEffect(()=>{if(!j||Z)return;const a=u=>{u.key==="Escape"&&se()};return window.addEventListener("keydown",a),()=>{window.removeEventListener("keydown",a)}},[j,Z]);const de=l.useMemo(()=>({emerald:{accentText:"text-emerald-500 dark:text-emerald-400",accentBg:"bg-emerald-500/10 dark:bg-emerald-400/10",accentBorder:"border-emerald-500/20 dark:border-emerald-400/15",hoverBorder:"hover:border-emerald-500/30 dark:hover:border-emerald-400/30",hoverGlow:"hover:shadow-[0_0_20px_-3px_rgba(16,185,129,0.15)] hover:dark:shadow-[0_0_20px_-3px_rgba(52,211,153,0.25)]",rawColor:"#10b981"},ocean:{accentText:"text-blue-500 dark:text-blue-400",accentBg:"bg-blue-500/10 dark:bg-blue-400/10",accentBorder:"border-blue-500/20 dark:border-blue-400/15",hoverBorder:"hover:border-blue-500/30 dark:hover:border-blue-400/30",hoverGlow:"hover:shadow-[0_0_20px_-3px_rgba(59,130,246,0.15)] hover:dark:shadow-[0_0_20px_-3px_rgba(96,165,250,0.25)]",rawColor:"#3b82f6"},neon:{accentText:"text-purple-500 dark:text-purple-400",accentBg:"bg-purple-500/10 dark:bg-purple-400/10",accentBorder:"border-purple-500/20 dark:border-purple-400/15",hoverBorder:"hover:border-purple-500/30 dark:hover:border-purple-400/30",hoverGlow:"hover:shadow-[0_0_20px_-3px_rgba(168,85,247,0.15)] hover:dark:shadow-[0_0_20px_-3px_rgba(192,132,252,0.25)]",rawColor:"#a855f7"},amber:{accentText:"text-amber-500 dark:text-amber-400",accentBg:"bg-amber-500/10 dark:bg-amber-400/10",accentBorder:"border-amber-500/20 dark:border-amber-400/15",hoverBorder:"hover:border-amber-500/30 dark:hover:border-amber-400/30",hoverGlow:"hover:shadow-[0_0_20px_-3px_rgba(245,158,11,0.15)] hover:dark:shadow-[0_0_20px_-3px_rgba(245,158,11,0.25)]",rawColor:"#f59e0b"}}),[]),I=de[U]||de.emerald,ve=ae[U]?E?ae[U].dark:ae[U].light:E?ae.emerald.dark:ae.emerald.light,[g,ce]=l.useState(()=>{if(f)return"2d";try{return window.localStorage?.getItem("tt:heatmap-view")==="3d"?"3d":"2d"}catch{return"2d"}});l.useEffect(()=>{if(!f)try{window.localStorage?.setItem("tt:heatmap-view",g)}catch{}},[g,f]),l.useEffect(()=>{if(g!=="2d")return;const a=K.current;a&&(a.scrollLeft=a.scrollWidth)},[s?.weeks,g]),l.useEffect(()=>{const a=K.current;if(!a)return;const u=()=>{L.current&&(clearTimeout(L.current),L.current=null),ie(null)};return a.addEventListener("scroll",u),()=>a.removeEventListener("scroll",u)},[]);const ee=s?.week_starts_on==="mon"?"mon":"sun",xe=l.useMemo(()=>{const a=Array.isArray(s?.weeks)?s.weeks:[];if(!a.length)return{weeks:[]};const u=[];for(const z of a)for(const N of Array.isArray(z)?z:[])N?.day&&u.push({day:N.day,total_tokens:N.total_tokens??N.value??0,billable_total_tokens:N.billable_total_tokens??N.value??N.total_tokens??0,models:N.models??null});return Ke({dailyRows:u,weeks:Math.max(52,a.length),to:s?.to,weekStartsOn:ee})},[s?.to,s?.weeks,ee]),y=xe?.weeks||[],T=l.useMemo(()=>{let a=0,u=0,z={day:null,value:0},N=0,W=0;const O=[];y.forEach(k=>{(Array.isArray(k)?k:[]).forEach(b=>{b&&b.day&&O.push(b)})}),O.sort((k,b)=>k.day.localeCompare(b.day)),O.forEach(k=>{const b=Number(k.value)||0;a+=b,b>0?(u++,N++,N>W&&(W=N)):N=0,b>z.value&&(z={day:k.day,value:b})});const t=O.length||365,r=(u/t*100).toFixed(1);let n="heatmap.3d.modal.ai.eval.default",i="heatmap.3d.modal.ai.title.default";a>=15e6?(i="heatmap.3d.modal.ai.title.peak",n="heatmap.3d.modal.ai.eval.peak"):a>=5e6?(i="heatmap.3d.modal.ai.title.heavy",n="heatmap.3d.modal.ai.eval.heavy"):a>=1e6?(i="heatmap.3d.modal.ai.title.core",n="heatmap.3d.modal.ai.eval.core"):a>=2e4&&(i="heatmap.3d.modal.ai.title.steady",n="heatmap.3d.modal.ai.eval.steady");const m=s?.total_cost_usd,x=Number(m),M=m!=null&&(typeof m!="string"||m.trim()!=="")&&Number.isFinite(x)?x:a/15e5;return{totalTokens:a,activeDays:u,activeRate:r,maxSingleDay:z,maxStreak:W,aiEvaluationTitleKey:i,aiEvaluationKey:n,totalCostUsd:M}},[y,s?.total_cost_usd]),Ce=l.useMemo(()=>Ve(T.totalCostUsd,{currency:Y,rate:P}),[T.totalCostUsd,Y,P]),pe=a=>A(a,{mode:Qe.COMPACT,decimals:2}),ke=ee==="mon"?["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(a=>o(`heatmap.day.${a.toLowerCase()}`)):["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(a=>o(`heatmap.day.${a.toLowerCase()}`)),we=l.useMemo(()=>gt(y.length,xe?.to,ee,ne),[xe?.to,y.length,ee,ne]);if(!y.length)return e.jsx("div",{className:"py-8 text-center text-sm text-oai-gray-500",children:o("heatmap.empty")});const te=f?10:dt,G=f?2:ct,_=f?22:mt,D=_+y.length*te+Math.max(0,y.length-1)*G,me=`${_}px repeat(${y.length}, ${te}px)`;return e.jsxs("div",{ref:h,className:f?"relative":"relative rounded-xl border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-900 p-5",children:[!f&&e.jsxs("div",{className:"flex items-baseline justify-between mb-3",children:[e.jsx("h3",{className:"text-sm font-medium text-oai-gray-500 dark:text-oai-gray-300 uppercase tracking-wide",children:o("heatmap.title")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{role:"tablist","aria-label":"Heatmap view",className:"flex rounded-md border border-oai-gray-200 dark:border-oai-gray-800 p-0.5 text-[10px]",children:[e.jsx("button",{type:"button",role:"tab","aria-selected":g==="2d",onClick:()=>ce("2d"),className:g==="2d"?"px-2 py-0.5 rounded bg-oai-gray-100 text-oai-black dark:bg-oai-gray-800 dark:text-oai-white font-medium":"px-2 py-0.5 rounded text-oai-gray-500 dark:text-oai-gray-400 hover:text-oai-gray-700 dark:hover:text-oai-gray-200",children:o("heatmap.view.2d")}),e.jsx("button",{type:"button",role:"tab","aria-selected":g==="3d",onClick:()=>ce("3d"),className:g==="3d"?"px-2 py-0.5 rounded bg-oai-gray-100 text-oai-black dark:bg-oai-gray-800 dark:text-oai-white font-medium":"px-2 py-0.5 rounded text-oai-gray-500 dark:text-oai-gray-400 hover:text-oai-gray-700 dark:hover:text-oai-gray-200",children:o("heatmap.view.3d")})]}),e.jsx("span",{className:"text-xs text-oai-gray-400 dark:text-oai-gray-450",children:p||o("heatmap.legend.utc")})]})]}),g==="3d"&&e.jsxs("div",{onClick:Q,className:"cursor-pointer group relative overflow-hidden rounded-lg hover:border-oai-gray-350 dark:hover:border-oai-gray-700 border border-transparent transition-all",title:o("heatmap.3d.hover_tip"),children:[e.jsx(Ae,{weeks:y,isDark:E,palette:U}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-oai-gray-900/5 to-transparent pointer-events-none opacity-0 group-hover:opacity-100 transition-opacity flex items-end justify-center pb-2",children:e.jsxs("span",{className:"text-[10px] bg-white/95 dark:bg-oai-gray-900/95 shadow border border-oai-gray-200/60 dark:border-oai-gray-800/80 px-2.5 py-1 rounded-full font-medium text-oai-gray-500 dark:text-oai-gray-400 flex items-center gap-1 transform translate-y-2 group-hover:translate-y-0 transition-transform duration-200",children:[e.jsx(tt,{size:9}),o("heatmap.3d.hover_tip")]})})]}),g==="2d"&&e.jsx("div",{ref:K,className:`overflow-x-auto overflow-y-hidden heatmap-scroll-thin${f?"":" pb-1"}`,children:e.jsxs("div",{style:{minWidth:D},children:[e.jsxs("div",{className:"grid text-[10px] uppercase text-oai-gray-400 dark:text-oai-gray-400 mb-1",style:{gridTemplateColumns:me,columnGap:G},children:[e.jsx("span",{}),we.map(a=>e.jsx("span",{style:{gridColumnStart:a.index+2},className:"whitespace-nowrap",children:a.label},`${a.label}-${a.index}`))]}),e.jsxs("div",{className:"grid",style:{gridTemplateColumns:me,columnGap:G},children:[e.jsx("div",{className:"grid text-[10px] text-oai-gray-400 dark:text-oai-gray-400 sticky left-0 bg-white dark:bg-oai-gray-900 pr-2",style:{gridTemplateRows:`repeat(7, ${te}px)`,rowGap:G},children:ke.map(a=>e.jsx("span",{className:"leading-none",children:a},a))}),e.jsx("div",{className:"grid",style:{gridAutoFlow:"column",gridTemplateRows:`repeat(7, ${te}px)`,gap:G},children:y.map((a,u)=>(Array.isArray(a)?a:[]).map((z,N)=>{if(!z)return null;const W=z.day||`e-${u}-${N}`,O=Number(z.level)||0,t=S[O]||S[0];return e.jsx("span",{onMouseEnter:r=>ge(r,z),onMouseLeave:ye,className:"rounded-[2px] transition-transform hover:scale-125 hover:z-10 cursor-pointer",style:{width:te,height:te,background:t}},W)}))})]})]})}),!d&&e.jsxs("div",{className:"flex items-center justify-center gap-2 mt-3",children:[e.jsx("span",{className:"text-[10px] text-oai-gray-400 dark:text-oai-gray-400",children:o("heatmap.legend.less")}),e.jsx("div",{className:"flex gap-0.5",children:S.map((a,u)=>e.jsx("span",{className:"rounded-[1px]",style:{width:10,height:10,background:a}},u))}),e.jsx("span",{className:"text-[10px] text-oai-gray-400 dark:text-oai-gray-400",children:o("heatmap.legend.more")})]}),j&&e.jsx("div",{onAnimationEnd:be,onClick:a=>{a.target===a.currentTarget&&se()},className:`fixed inset-0 z-50 flex items-center justify-center p-3 md:p-6 backdrop-blur-md bg-black/15 dark:bg-black/40 ${Z?"animate-tt-fade-out":"animate-tt-fade-in"}`,children:e.jsxs("div",{className:`relative w-full max-w-6xl h-[88vh] backdrop-blur-2xl bg-white/90 dark:bg-oai-gray-900/90 border border-oai-gray-200/50 dark:border-white/10 shadow-2xl rounded-2xl flex flex-col md:flex-row overflow-hidden ${Z?"animate-tt-modal-exit":"animate-tt-modal"}`,children:[e.jsx("button",{type:"button",onClick:se,className:"absolute top-4 right-4 z-50 p-2 rounded-full border border-oai-gray-200/60 dark:border-oai-gray-800/60 bg-white/50 dark:bg-oai-gray-900/50 text-oai-gray-500 dark:text-oai-gray-400 hover:text-oai-gray-900 dark:hover:text-white hover:rotate-90 hover:scale-105 active:scale-95 transition-all duration-300",children:e.jsx(Ze,{size:16})}),e.jsxs("div",{className:"w-full md:w-[340px] border-b md:border-b-0 md:border-r border-zinc-200/50 dark:border-zinc-800/40 p-5 md:p-6 flex flex-col gap-6 overflow-y-auto backdrop-blur-md bg-zinc-50/50 dark:bg-zinc-950/50",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 select-none",children:[e.jsxs("span",{className:"relative flex h-1.5 w-1.5",children:[e.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",style:{backgroundColor:I.rawColor}}),e.jsx("span",{className:"relative inline-flex rounded-full h-1.5 w-1.5",style:{backgroundColor:I.rawColor}})]}),e.jsx("span",{className:"text-[9px] font-extrabold uppercase tracking-widest font-mono text-zinc-400 dark:text-zinc-500",children:o("heatmap.3d.modal.eyebrow")})]}),e.jsx("h4",{className:"text-xl font-black text-zinc-900 dark:text-zinc-50 tracking-tight leading-none mt-2 select-none",children:o("heatmap.3d.modal.title")}),e.jsx("p",{className:"text-[11px] leading-relaxed text-zinc-400 dark:text-zinc-500 mt-2 font-normal select-none",children:o("heatmap.3d.modal.desc")})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-x-5 gap-y-5 border-y border-zinc-200/50 dark:border-zinc-800/50 py-5 select-none",children:[e.jsxs("div",{className:"flex flex-col gap-1 relative group cursor-help",children:[e.jsx("div",{className:"absolute left-0 bottom-full mb-2 pointer-events-none opacity-0 translate-y-1 group-hover:opacity-100 group-hover:translate-y-0 transition-all duration-200 z-50",children:e.jsxs("div",{className:"bg-white dark:bg-zinc-950 text-zinc-900 dark:text-zinc-50 text-[10px] font-semibold font-mono rounded-lg px-2.5 py-1.5 shadow-xl border border-zinc-200 dark:border-zinc-800/80 whitespace-nowrap flex flex-col",children:[e.jsx("span",{className:"text-[9px] text-zinc-400 dark:text-zinc-500",children:o("heatmap.3d.modal.stats.precision_total_tokens")}),e.jsxs("span",{className:"mt-0.5 font-bold text-zinc-900 dark:text-zinc-50",children:[R(T.totalTokens)," ",o("heatmap.unit.tokens")]})]})}),e.jsx("span",{className:"text-[9px] font-bold text-zinc-400 dark:text-zinc-500 uppercase tracking-widest font-mono",children:o("heatmap.3d.modal.stats.total_tokens")}),e.jsxs("div",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-xl font-black text-zinc-900 dark:text-zinc-50 tracking-tight font-mono transition-transform duration-200 group-hover:-translate-y-[1px]",children:pe(T.totalTokens)}),e.jsx("div",{className:"opacity-30 group-hover:opacity-60 transition-opacity",children:e.jsx("svg",{width:"24",height:"10",viewBox:"0 0 24 10",fill:"none",children:e.jsx("path",{d:"M1 9C3 7 5 7 7 4C9 1 11 0 13 2C15 4 17 0 23 0",stroke:I.rawColor,strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]}),e.jsxs("div",{className:"flex flex-col gap-1 group cursor-default",children:[e.jsx("span",{className:"text-[9px] font-bold text-zinc-400 dark:text-zinc-500 uppercase tracking-widest font-mono",children:o("heatmap.3d.modal.stats.estimated_cost")}),e.jsx("span",{className:"text-xl font-black text-zinc-900 dark:text-zinc-50 tracking-tight font-mono transition-transform duration-200 group-hover:-translate-y-[1px]",children:Ce})]}),e.jsxs("div",{className:"flex flex-col gap-1 group cursor-default",children:[e.jsx("span",{className:"text-[9px] font-bold text-zinc-400 dark:text-zinc-500 uppercase tracking-widest font-mono",children:o("heatmap.3d.modal.stats.active_rate_days")}),e.jsxs("span",{className:"text-xl font-black text-zinc-900 dark:text-zinc-50 tracking-tight font-mono transition-transform duration-200 group-hover:-translate-y-[1px]",children:[T.activeRate,"%"," ",e.jsxs("span",{className:"text-[10px] font-bold text-zinc-400 dark:text-zinc-500 font-mono",children:["(",T.activeDays,o("heatmap.3d.modal.stats.days_suffix"),")"]})]})]}),e.jsxs("div",{className:"flex flex-col gap-1 group cursor-default",children:[e.jsx("span",{className:"text-[9px] font-bold text-zinc-400 dark:text-zinc-500 uppercase tracking-widest font-mono",children:o("heatmap.3d.modal.stats.max_streak")}),e.jsxs("span",{className:"text-xl font-black text-amber-500 tracking-tight font-mono transition-transform duration-200 group-hover:-translate-y-[1px]",children:[T.maxStreak," ",e.jsx("span",{className:"text-[10px] font-bold text-amber-500/80 font-mono",children:o("heatmap.3d.modal.stats.days_suffix")})]})]}),e.jsxs("div",{className:"flex flex-col gap-1 col-span-2 relative group cursor-help",children:[e.jsx("div",{className:"absolute left-0 bottom-full mb-2 pointer-events-none opacity-0 translate-y-1 group-hover:opacity-100 group-hover:translate-y-0 transition-all duration-200 z-50",children:e.jsxs("div",{className:"bg-white dark:bg-zinc-950 text-zinc-900 dark:text-zinc-50 text-[10px] font-semibold font-mono rounded-lg px-2.5 py-1.5 shadow-xl border border-zinc-200 dark:border-zinc-800/80 whitespace-nowrap flex flex-col",children:[e.jsx("span",{className:"text-[9px] text-zinc-400 dark:text-zinc-500",children:o("heatmap.3d.modal.stats.precision_peak_value")}),e.jsx("span",{className:"mt-0.5 font-bold text-zinc-900 dark:text-zinc-50",children:T.maxSingleDay.value>0?`${R(T.maxSingleDay.value)} ${o("heatmap.unit.tokens")}`:o("heatmap.3d.modal.stats.no_data")}),e.jsx("span",{className:"text-[8px] text-zinc-400 dark:text-zinc-500 mt-0.5",children:T.maxSingleDay.day||o("heatmap.3d.modal.stats.no_data")})]})}),e.jsx("span",{className:"text-[9px] font-bold text-zinc-400 dark:text-zinc-500 uppercase tracking-widest font-mono",children:o("heatmap.3d.modal.stats.peak_day")}),e.jsxs("span",{className:"text-xl font-black text-zinc-900 dark:text-zinc-50 tracking-tight font-mono transition-transform duration-200 group-hover:-translate-y-[1px]",children:[T.maxSingleDay.value>0?pe(T.maxSingleDay.value):o("heatmap.3d.modal.stats.no_data")," ",e.jsxs("span",{className:"text-[10px] font-bold text-zinc-400 dark:text-zinc-500 font-mono",children:["(",T.maxSingleDay.day||o("heatmap.3d.modal.stats.no_data"),")"]})]})]})]}),e.jsxs("div",{className:"flex flex-col gap-2.5 py-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5 select-none",children:[e.jsx(at,{size:11,style:{color:I.rawColor}}),e.jsx("span",{className:"text-[9px] font-extrabold uppercase tracking-widest font-mono",style:{color:I.rawColor},children:o(T.aiEvaluationTitleKey)})]}),e.jsxs("div",{className:"pl-3.5 border-l-2 relative transition-all duration-300 group",style:{borderColor:I.rawColor},children:[e.jsx("div",{className:"absolute inset-y-0 left-0 w-[3px] blur-[2px] opacity-15 pointer-events-none rounded-full",style:{backgroundColor:I.rawColor}}),e.jsx("p",{className:"text-[11px] leading-relaxed text-zinc-600 dark:text-zinc-400 font-normal",children:o(T.aiEvaluationKey)})]})]}),e.jsx("div",{className:"mt-auto border-t border-zinc-200/50 dark:border-zinc-800/50 pt-4 select-none",children:e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-[9px] font-bold text-zinc-400 dark:text-zinc-500 uppercase tracking-widest font-mono",children:o("heatmap.3d.modal.legend.title")}),e.jsx("span",{className:"text-[10px] font-medium text-zinc-500 dark:text-zinc-400",children:o(`heatmap.3d.modal.palette.${U}`)})]}),e.jsx("div",{className:"flex gap-1",children:ve.map((a,u)=>e.jsx("div",{className:"flex-1 h-1 rounded-[2px]",style:{backgroundColor:a},title:o("heatmap.tooltip.level",{level:u})},u))})]})})]}),e.jsxs("div",{className:"flex-1 h-full relative flex items-center justify-center overflow-hidden p-4",children:[e.jsx("div",{className:"absolute top-1/4 left-1/3 w-96 h-96 rounded-full blur-[130px] pointer-events-none -translate-x-1/2 -translate-y-1/2 transition-all duration-500",style:{backgroundColor:I.rawColor+"15"}}),e.jsx("div",{className:"absolute bottom-1/4 right-1/3 w-80 h-80 rounded-full blur-[120px] pointer-events-none translate-x-1/2 translate-y-1/2 bg-purple-500/[0.04] dark:bg-purple-500/[0.08]"}),e.jsxs("div",{className:"absolute top-4 left-1/2 -translate-x-1/2 flex items-center gap-3 p-1.5 backdrop-blur-md bg-white/70 dark:bg-oai-gray-900/75 border border-oai-gray-200/60 dark:border-oai-gray-800/80 rounded-full shadow-lg z-30 select-none",children:[e.jsx("div",{className:"flex items-center gap-1.5 px-2",children:Object.keys(de).map(a=>{const u=U===a;return e.jsx("button",{type:"button",onClick:()=>oe(a),title:o(`heatmap.3d.modal.palette.${a}`),className:`w-3.5 h-3.5 rounded-full transition-all duration-200 relative hover:scale-125 ${a==="emerald"?"bg-[#10b981]":a==="ocean"?"bg-[#3b82f6]":a==="neon"?"bg-[#a855f7]":"bg-[#f59e0b]"}`,children:u&&e.jsx("span",{className:"absolute inset-0 rounded-full ring-2 ring-offset-1 ring-offset-white dark:ring-offset-oai-gray-900 ring-oai-gray-900 dark:ring-white scale-110"})},a)})}),e.jsx("div",{className:"w-[1px] h-4 bg-oai-gray-200 dark:bg-oai-gray-800"}),e.jsxs("div",{className:"flex items-center gap-1 pr-1",children:[e.jsx("button",{type:"button",onClick:()=>{const a=!B;le(a),J.current&&J.current.toggleAutoRotate(a)},title:B?o("heatmap.3d.modal.control.pause"):o("heatmap.3d.modal.control.play"),className:`p-1.5 rounded-full transition-all duration-200 hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 ${B?I.accentText:"text-oai-gray-400 hover:text-oai-gray-600 dark:hover:text-oai-gray-250"}`,children:B?e.jsx(ot,{size:12}):e.jsx(nt,{size:12})}),e.jsx("button",{type:"button",onClick:()=>{le(!1),J.current&&J.current.reset()},title:o("heatmap.3d.modal.control.reset"),className:"p-1.5 rounded-full text-oai-gray-400 hover:text-oai-gray-600 dark:hover:text-oai-gray-250 hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 transition-all duration-200",children:e.jsx(st,{size:12})})]})]}),e.jsx(Ae,{weeks:y,isDark:E,interactive:!0,palette:U,autoRotateInit:B,onResetViewRef:J}),e.jsxs("div",{className:"absolute bottom-4 right-4 flex items-center gap-1.5 text-[9px] font-bold text-oai-gray-400 bg-white/80 dark:bg-oai-gray-900/80 border border-oai-gray-200/50 dark:border-oai-gray-800/80 rounded-md px-2.5 py-1.5 select-none pointer-events-none backdrop-blur-md shadow-sm",children:[e.jsx(rt,{size:10,className:I.accentText}),e.jsx("span",{children:o("heatmap.3d.modal.footer.tip")})]})]})]})}),v&&!j&&typeof document<"u"&&Je.createPortal(e.jsxs("div",{className:"fixed z-[9999] w-0 h-0 transition-all duration-100 ease-out pointer-events-none",style:{position:"fixed",left:`${V.x}px`,top:`${V.y}px`},children:[e.jsxs("div",{className:`absolute left-0 ${V.flipY?"top-[10px]":"bottom-[10px]"} backdrop-blur-md bg-white/95 dark:bg-oai-gray-900/95 border border-oai-gray-200/50 dark:border-oai-gray-800/50 shadow-xl rounded-xl p-3.5 max-w-[280px] min-w-[200px] flex flex-col gap-2 animate-in fade-in zoom-in-95 duration-100`,style:{transform:`translateX(calc(-50% + ${V.shiftX}px))`},children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-oai-gray-100 dark:border-oai-gray-800/80 pb-1.5",children:[e.jsx("span",{className:"text-[11px] font-semibold text-oai-gray-500 dark:text-oai-gray-400",children:v.day}),(()=>{const a=v.level===0?E?"#9ca3af":"#6b7280":S[v.level];return e.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full font-medium",style:{backgroundColor:a+"22",color:a,border:`1px solid ${a}44`},children:o("heatmap.tooltip.level",{level:v.level})})})()]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx("span",{title:R(v.total_tokens??v.value),className:"text-lg font-bold text-oai-gray-900 dark:text-white leading-none",children:A(v.total_tokens??v.value)}),e.jsx("span",{className:"text-[10px] text-oai-gray-400 uppercase tracking-wider font-semibold",children:o("heatmap.unit.tokens")})]}),v.models&&Object.keys(v.models).length>0?e.jsxs("div",{className:"mt-1.5 border-t border-oai-gray-100 dark:border-oai-gray-800/60 pt-2 flex flex-col gap-1.5",children:[e.jsx("div",{className:"text-[10px] font-semibold text-oai-gray-400 dark:text-oai-gray-500 uppercase tracking-wider",children:o("heatmap.tooltip.model_breakdown")}),e.jsx("div",{className:"flex flex-col gap-2 max-h-[150px] overflow-y-auto pr-1.5 oai-scrollbar",children:Object.entries(v.models).map(([a,u])=>({name:a,val:Number(u)})).sort((a,u)=>u.val-a.val).map(({name:a,val:u})=>{const z=Number(v.total_tokens??v.value)||1,N=Math.round(u/z*100);return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center justify-between text-[11px] gap-3",children:[e.jsx("span",{className:"font-medium text-oai-gray-750 dark:text-oai-gray-200 truncate max-w-[120px]",title:a,children:a}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsx("span",{title:R(u),className:"font-mono text-oai-gray-900 dark:text-oai-gray-100 font-semibold",children:A(u)}),e.jsxs("span",{className:"text-[9px] text-oai-gray-450 dark:text-oai-gray-500 min-w-[28px] text-right font-medium",children:[N,"%"]})]})]}),e.jsx("div",{className:"w-full h-1 bg-oai-gray-100 dark:bg-oai-gray-800/85 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full transition-all duration-300",style:{width:`${N}%`,backgroundColor:S[4],boxShadow:`0 0 4px ${S[4]}55`}})})]},a)})})]}):e.jsx("p",{className:"text-[11px] text-oai-gray-600 dark:text-oai-gray-300 leading-relaxed font-normal mt-1 border-t border-dashed border-oai-gray-100 dark:border-oai-gray-800/60 pt-1.5",children:De(v.level,v.total_tokens??v.value,A)})]})]}),e.jsx("div",{className:`absolute left-0 -translate-x-1/2 w-2.5 h-2.5 rotate-45 bg-white dark:bg-oai-gray-900 shadow-sm ${V.flipY?"top-[6px] border-l border-t":"bottom-[6px] border-r border-b"} border-oai-gray-200/50 dark:border-oai-gray-800/50`,style:V.flipY?{marginTop:"1px"}:{marginBottom:"1px"}})]}),document.body),e.jsx("style",{children:`
2
2
  @keyframes tt-fade-in {
3
3
  from { opacity: 0; }
4
4
  to { opacity: 1; }
@@ -39,4 +39,4 @@ import{q as Ne,r as l,j as e,c as o,a2 as qe,ab as Ke,ac as Ve,X as Ze,a6 as Je,
39
39
  .animate-tt-modal-exit {
40
40
  animation: tt-modal-exit 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
41
41
  }
42
- `})]})}const yt={acode:"AStudio",anythingllm:"AnythingLLM",claudescience:"Claude Science",pianthropic:"Pi · Anthropic",pigithubcopilot:"Pi · GitHub Copilot",picopilot:"Pi · Copilot",dots:"Dots",pidots:"Pi · Dots",lmstudio:"LM Studio",unsloth:"Unsloth Studio"},bt={deepseek:"provider.display.deepseek_harness",dsh:"provider.display.deepseek_harness",omp:"provider.display.omp",omo:"provider.display.omo",minimaxcode:"provider.display.minimax_code",commandcode:"provider.display.command_code",trae:"provider.display.trae",traecn:"provider.display.trae_work_cn",traeworkcn:"provider.display.trae_work_cn"};function vt(s){return String(s||"").trim().toLowerCase().replace(/[\s_-]+/g,"")}const kt={ai:"AI",api:"API",cli:"CLI",github:"GitHub",openai:"OpenAI",opencode:"OpenCode",xai:"xAI"};function Se(s){return s.split(/[-_ ]+/).filter(Boolean).map(d=>kt[d.toLowerCase()]??d.charAt(0).toUpperCase()+d.slice(1).toLowerCase()).join(" ")}function Mt(s){const d=String(s||"").trim();if(!d)return"";const p=vt(d);if(p==="primeagent")return"Prime Agent";if(p.startsWith("primeagent")&&p.length>10){const $=Se(d.replace(/^prime[-_ ]?agent[-_ ]?/i,""));return $?`Prime Agent · ${$}`:"Prime Agent"}const c=bt[p];if(c)return o(c);const f=yt[p];if(f)return f;if(/^pi[-_ ]/i.test(d)){const $=Se(d.slice(3));if($)return`Pi · ${$}`}return d.charAt(0).toUpperCase()+d.slice(1)}export{_t as A,Mt as f};
42
+ `})]})}const yt={acode:"AStudio",anythingllm:"AnythingLLM",claudescience:"Claude Science",pianthropic:"Pi · Anthropic",pigithubcopilot:"Pi · GitHub Copilot",picopilot:"Pi · Copilot",dots:"Dots",pidots:"Pi · Dots",lmstudio:"LM Studio",unsloth:"Unsloth Studio"},bt={deepseek:"provider.display.deepseek_harness",dsh:"provider.display.deepseek_harness",omp:"provider.display.omp",omo:"provider.display.omo",minimaxcode:"provider.display.minimax_code",commandcode:"provider.display.command_code",trae:"provider.display.trae",traecn:"provider.display.trae_work_cn",traeworkcn:"provider.display.trae_work_cn"};function vt(s){return String(s||"").trim().toLowerCase().replace(/[\s_-]+/g,"")}const kt={ai:"AI",api:"API",cli:"CLI",github:"GitHub",openai:"OpenAI",opencode:"OpenCode",xai:"xAI"};function Se(s){return s.split(/[-_ ]+/).filter(Boolean).map(c=>kt[c.toLowerCase()]??c.charAt(0).toUpperCase()+c.slice(1).toLowerCase()).join(" ")}function Mt(s){const c=String(s||"").trim();if(!c)return"";const p=vt(c);if(p==="primeagent")return"Prime Agent";if(p.startsWith("primeagent")&&p.length>10){const $=Se(c.replace(/^prime[-_ ]?agent[-_ ]?/i,""));return $?`Prime Agent · ${$}`:"Prime Agent"}const d=bt[p];if(d)return o(d);const f=yt[p];if(f)return f;if(/^pi[-_ ]/i.test(c)){const $=Se(c.slice(3));if($)return`Pi · ${$}`}return c.charAt(0).toUpperCase()+c.slice(1)}export{_t as A,Mt as f};