tokentracker-cli 0.79.4 → 0.79.6

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 (72) hide show
  1. package/README.de.md +8 -6
  2. package/README.ja.md +7 -5
  3. package/README.ko.md +7 -5
  4. package/README.md +54 -9
  5. package/README.zh-CN.md +7 -5
  6. package/dashboard/dist/assets/{AchievementBadge-wQQwzQYv.js → AchievementBadge-wAEfjNCA.js} +1 -1
  7. package/dashboard/dist/assets/{AchievementsPage-rBd_ycOo.js → AchievementsPage-Dv5LhNzL.js} +2 -2
  8. package/dashboard/dist/assets/{AchievementsSection-Cwgr4N8D.js → AchievementsSection-a3gkS8tD.js} +1 -1
  9. package/dashboard/dist/assets/{BadgeDetailModal-bKdQ_Pls.js → BadgeDetailModal-BNItadFZ.js} +1 -1
  10. package/dashboard/dist/assets/{Card-DKUa4bFg.js → Card-CmemgZ8c.js} +1 -1
  11. package/dashboard/dist/assets/{ClawdAnimated-DaG3163q.js → ClawdAnimated-CaZ4BpsR.js} +1 -1
  12. package/dashboard/dist/assets/{CommunityStatsModal-BrlwrUmW.js → CommunityStatsModal-C3gojIs4.js} +1 -1
  13. package/dashboard/dist/assets/{ConfirmModal-CIujdHbF.js → ConfirmModal-DZGC1wxW.js} +1 -1
  14. package/dashboard/dist/assets/{Controls-Dzx021Tf.js → Controls-BMAZOGJA.js} +1 -1
  15. package/dashboard/dist/assets/{DashboardPage-DgTwlptV.js → DashboardPage-Sv3L7w2P.js} +1 -1
  16. package/dashboard/dist/assets/{DevicePage-BycFzKD5.js → DevicePage-VfvDSVAL.js} +1 -1
  17. package/dashboard/dist/assets/{DialogClose-ucUXpI-0.js → DialogClose-RhHDM3jn.js} +1 -1
  18. package/dashboard/dist/assets/DialogDescription-ozWESnQP.js +1 -0
  19. package/dashboard/dist/assets/{DialogTitle-B-NMBFgN.js → DialogTitle-DwbiXVxh.js} +1 -1
  20. package/dashboard/dist/assets/{FadeIn-DR-LZSMh.js → FadeIn-CQCtW5QX.js} +1 -1
  21. package/dashboard/dist/assets/{HeaderGithubStar-C6oriixE.js → HeaderGithubStar-BR8zEIU9.js} +1 -1
  22. package/dashboard/dist/assets/{IpCheckPage-I6ebSTLU.js → IpCheckPage-rKHYtujQ.js} +1 -1
  23. package/dashboard/dist/assets/{LandingPage-BARuXijI.js → LandingPage-x6KqrhSL.js} +2 -2
  24. package/dashboard/dist/assets/{LeaderboardAvatar-BP9WMoUP.js → LeaderboardAvatar-BUoLYT1K.js} +1 -1
  25. package/dashboard/dist/assets/{LeaderboardPage-BTL-rN1o.js → LeaderboardPage-bCcorBNY.js} +2 -2
  26. package/dashboard/dist/assets/{LeaderboardProfileModal-BeHrOZex.js → LeaderboardProfileModal-DM84x71o.js} +3 -3
  27. package/dashboard/dist/assets/{LeaderboardProfilePage-D2YPwVju.js → LeaderboardProfilePage-DO3bP3yS.js} +1 -1
  28. package/dashboard/dist/assets/{LimitsPage-D_31y9iz.js → LimitsPage-CGDnKTon.js} +1 -1
  29. package/dashboard/dist/assets/{LocalOnlyNotice-Bsme9V7_.js → LocalOnlyNotice-DbXdLROj.js} +1 -1
  30. package/dashboard/dist/assets/{LoginPage-ChdsOwnZ.js → LoginPage-DIRdoCb2.js} +1 -1
  31. package/dashboard/dist/assets/{PetPage-DHZP64Lh.js → PetPage-CIevZPBl.js} +1 -1
  32. package/dashboard/dist/assets/{PopoverPopup-1Apd7Z6A.js → PopoverPopup-BRphdEUz.js} +1 -1
  33. package/dashboard/dist/assets/{ResetPasswordPage-GchnBNwn.js → ResetPasswordPage-BJQBIphH.js} +1 -1
  34. package/dashboard/dist/assets/{Select-BBR4yWcP.js → Select-gHY4N9ZP.js} +1 -1
  35. package/dashboard/dist/assets/{SelectItemText-GIvwOKIn.js → SelectItemText-CLpcRYRB.js} +1 -1
  36. package/dashboard/dist/assets/{SettingsPage-CbDU59OB.js → SettingsPage-D7ux0u6V.js} +1 -1
  37. package/dashboard/dist/assets/{SkillsPage-C3caxrhI.js → SkillsPage-DRCrdltk.js} +1 -1
  38. package/dashboard/dist/assets/{WidgetsPage-wYGZUIP8.js → WidgetsPage-CmifV9Qh.js} +1 -1
  39. package/dashboard/dist/assets/{WrappedPage-D9WkTJww.js → WrappedPage-VKP5hIAs.js} +1 -1
  40. package/dashboard/dist/assets/agent-logos---afteTI.js +1 -0
  41. package/dashboard/dist/assets/{arrow-up-right-BGl1XMiR.js → arrow-up-right-DAyZEmy0.js} +1 -1
  42. package/dashboard/dist/assets/check-C__WkABK.js +1 -0
  43. package/dashboard/dist/assets/{copy-DoCkcIHR.js → copy-BQ4dDdQO.js} +1 -1
  44. package/dashboard/dist/assets/{download-C8qHTN6n.js → download-C0OHvtFX.js} +1 -1
  45. package/dashboard/dist/assets/{flame-B27yR7Au.js → flame-Bk2l5Mqz.js} +1 -1
  46. package/dashboard/dist/assets/{format-tokens-B8_mvUxn.js → format-tokens-BuWmqFvA.js} +1 -1
  47. package/dashboard/dist/assets/{info-BpTZWFEB.js → info-CvbVDSUt.js} +1 -1
  48. package/dashboard/dist/assets/{link-2-DDjliaUB.js → link-2-DEoNTwlC.js} +1 -1
  49. package/dashboard/dist/assets/{loader-circle-DkNHiiwy.js → loader-circle-5YZxGR3t.js} +1 -1
  50. package/dashboard/dist/assets/{main-CvkyGV2H.js → main-hXifO_Tp.js} +19 -18
  51. package/dashboard/dist/assets/main-ilWqzAfD.css +1 -0
  52. package/dashboard/dist/assets/{provider-display-CPhtfhmX.js → provider-display-BZrfO0vc.js} +1 -1
  53. package/dashboard/dist/assets/{trash-2-CVIlLnop.js → trash-2-CmXAeMGC.js} +1 -1
  54. package/dashboard/dist/assets/{use-community-stats-C8PN46hK.js → use-community-stats-sX5H9fnG.js} +1 -1
  55. package/dashboard/dist/assets/{use-limits-display-prefs-D7vWwHbD.js → use-limits-display-prefs-B_gzE53D.js} +1 -1
  56. package/dashboard/dist/assets/{use-native-settings-Bh4ls-JF.js → use-native-settings-BkIj-y5n.js} +1 -1
  57. package/dashboard/dist/assets/{use-ordered-list-BHptHQDT.js → use-ordered-list-BQHfDz38.js} +1 -1
  58. package/dashboard/dist/assets/{use-quality-per-dollar-pref-C3EXtrc1.js → use-quality-per-dollar-pref-B8clb2IP.js} +1 -1
  59. package/dashboard/dist/assets/{use-transform-BW36bKb3.js → use-transform-Bu6AKPnc.js} +1 -1
  60. package/dashboard/dist/assets/{use-usage-limits-BY-RA1uz.js → use-usage-limits-BXOTiyCG.js} +1 -1
  61. package/dashboard/dist/assets/{useCurrency-nB0kdYwU.js → useCurrency-yQkSTo4P.js} +1 -1
  62. package/dashboard/dist/assets/{useScrollLock-juP-sEAK.js → useScrollLock-DP7SL29Q.js} +1 -1
  63. package/dashboard/dist/assets/{zap-Blccuc-z.js → zap-C122AVXf.js} +1 -1
  64. package/dashboard/dist/index.html +61 -31
  65. package/dashboard/dist/llms.txt +56 -31
  66. package/dashboard/dist/share.html +2 -2
  67. package/package.json +9 -3
  68. package/src/lib/pricing/seed-snapshot.json +1 -1
  69. package/dashboard/dist/assets/DialogDescription-CIldLoYo.js +0 -1
  70. package/dashboard/dist/assets/agent-logos-z6m7ILhw.js +0 -1
  71. package/dashboard/dist/assets/check-Bj3UnGFX.js +0 -1
  72. package/dashboard/dist/assets/main-C6V_dFqw.css +0 -1
@@ -1 +1 @@
1
- import{cW as De,cX as _e,cY as Ie,cZ as Me,c_ as Te,c$ as ye,i as be,d0 as $e,d1 as Ve,d2 as Oe,d3 as Re,d4 as Pe,d5 as Be,d6 as Ke,d7 as Xe,d8 as Le,d9 as Ce,da as Fe,db as G,dc as Ge,dd as We,de as ze,df as Ye,u as Ue,r as C,j as a,m as X,$ as Ze,E as h,P as ve,X as He}from"./main-CvkyGV2H.js";import{a as je,A as qe,p as Je,b as Y,t as le,T as $,c as Qe}from"./AchievementBadge-wQQwzQYv.js";import{a as et,u as z}from"./use-transform-BW36bKb3.js";import{l as ce,f as ue,b as tt}from"./AchievementsSection-Cwgr4N8D.js";import{D as nt,a as rt,b as at,c as st,d as it,e as ot}from"./DialogTitle-B-NMBFgN.js";import"./zap-Blccuc-z.js";import"./flame-B27yR7Au.js";import"./format-tokens-B8_mvUxn.js";import"./useScrollLock-juP-sEAK.js";const lt=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function Ne(e,t){return De(e)?e[lt(0,e.length,t)]:e}class ct{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>r.attachTimeline(t));return()=>{n.forEach((r,s)=>{r&&r(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return de(this.animations,"duration")}get iterationDuration(){return de(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function de(e,t){let n=0;for(let r=0;r<e.length;r++){const s=e[r][t];s!==null&&s>n&&(n=s)}return n}class ut extends ct{then(t,n){return this.finished.finally(t).then(()=>{})}}function dt(e,t){return e in t}class ft extends _e{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(dt(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return Ie()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function U(e){return typeof e=="object"&&!Array.isArray(e)}function ke(e,t,n,r){return e==null?[]:typeof e=="string"&&U(t)?Me(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(s=>s!=null):[e]}function mt(e,t,n){return e*(t+1)+n*t}function fe(e,t,n,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function pt(e,t,n){for(let r=0;r<e.length;r++){const s=e[r];s.at>t&&s.at<n&&(ye(e,s),r--)}}function ht(e,t,n,r,s,c){pt(e,s,c);for(let i=0;i<t.length;i++)e.push({value:t[i],at:Te(s,c,r[i]),easing:Ne(n,i)})}function gt(e,t,n=0){const r=t+1+t*n;for(let s=0;s<e.length;s++)e[s]=e[s]/r}function xt(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const yt="easeInOut",bt=20;function vt(e,{defaultTransition:t={},...n}={},r,s){const c=t.duration||.3,i=new Map,m=new Map,f={},p=new Map;let g=0,u=0,x=0;for(let N=0;N<e.length;N++){const k=e[N];if(typeof k=="string"){p.set(k,u);continue}else if(!Array.isArray(k)){p.set(k.name,fe(u,k.at,g,p));continue}let[E,b,v={}]=k;v.at!==void 0&&(u=fe(u,v.at,g,p));let j=0;const I=(w,M,A,o=0,l=0)=>{const d=jt(w),{delay:D=0,times:y=$e(d),type:R=t.type||"keyframes",repeat:P,repeatType:W,repeatDelay:Z=0,...Se}=M;let{ease:_=t.ease||"easeOut",duration:S}=M;const H=typeof D=="function"?D(o,l):D,q=d.length,J=Pe(R)?R:s?.[R||"keyframes"];if(q<=2&&J){let V=100;if(q===2&&wt(d)){const B=d[1]-d[0];V=Math.abs(B)}const O={...t,...Se};S!==void 0&&(O.duration=Be(S));const F=Ve(O,V,J);_=F.ease,S=F.duration}S??(S=c);const Q=u+H;y.length===1&&y[0]===0&&(y[1]=1);const ee=y.length-d.length;if(ee>0&&Oe(y,ee),d.length===1&&d.unshift(null),P&&P<bt){const V=S>0?Z/S:0;S=mt(S,P,Z);const O=[...d],F=[...y];_=Array.isArray(_)?[..._]:[_];const B=[..._],ne=W==="reverse"||W==="mirror";let re=O,ae=B;ne&&(re=[...O].reverse(),W==="reverse"&&(ae=[...B].reverse().map(T=>typeof T=="function"?Re(T):T)));for(let T=0;T<P;T++){const se=ne&&T%2===0,ie=se?re:O,Ee=se?ae:B,oe=(T+1)*(1+V);V>0&&(d.push(d[d.length-1]),y.push(oe),_.push("linear")),d.push(...ie);for(let K=0;K<ie.length;K++)y.push(F[K]+oe),_.push(K===0?"linear":Ne(Ee,K-1))}gt(y,P,V)}const te=Q+S;ht(A,d,_,y,Q,te),j=Math.max(H+S,j),x=Math.max(te,x)};if(be(E)){const w=me(E,m);I(b,v,pe("default",w))}else{const w=ke(E,b,r,f),M=w.length;for(let A=0;A<M;A++){b=b,v=v;const o=w[A],l=me(o,m);for(const d in b)I(b[d],Nt(v,d),pe(d,l),A,M)}}g=u,u+=j}return m.forEach((N,k)=>{for(const E in N){const b=N[E];b.sort(xt);const v=[],j=[],I=[];for(let o=0;o<b.length;o++){const{at:l,value:d,easing:D}=b[o];v.push(d),j.push(Ke(0,x,l)),I.push(D||"easeOut")}j[0]!==0&&(j.unshift(0),v.unshift(v[0]),I.unshift(yt)),j[j.length-1]!==1&&(j.push(1),v.push(null)),i.has(k)||i.set(k,{keyframes:{},transition:{}});const w=i.get(k);w.keyframes[E]=v;const{type:M,...A}=t;w.transition[E]={...A,duration:x,ease:I,times:j,...n}}}),i}function me(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function pe(e,t){return t[e]||(t[e]=[]),t[e]}function jt(e){return Array.isArray(e)?e:[e]}function Nt(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const kt=e=>typeof e=="number",wt=e=>e.every(kt);function At(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Xe(e)&&!Le(e)?new Ce(t):new Fe(t);n.mount(e),G.set(e,n)}function St(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new ft(t);n.mount(e),G.set(e,n)}function Et(e,t){return be(e)||typeof e=="number"||typeof e=="string"&&!U(t)}function we(e,t,n,r){const s=[];if(Et(e,t))s.push(Ge(e,U(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return s;const c=ke(e,t,r),i=c.length;for(let m=0;m<i;m++){const f=c[m],p=f instanceof Element?At:St;G.has(f)||p(f);const g=G.get(f),u={...n};"delay"in u&&typeof u.delay=="function"&&(u.delay=u.delay(m,i)),s.push(...We(g,{...t,transition:u},{}))}}return s}function Dt(e,t,n){const r=[],s=e.map(i=>{if(Array.isArray(i)&&typeof i[0]=="function"){const m=i[0],f=ze(0);return f.on("change",m),i.length===1?[f,[0,1]]:i.length===2?[f,[0,1],i[1]]:[f,i[1],i[2]]}return i});return vt(s,t,n,{spring:Ye}).forEach(({keyframes:i,transition:m},f)=>{r.push(...we(f,i,m))}),r}function _t(e){return Array.isArray(e)&&e.some(Array.isArray)}function It(e={}){const{scope:t,reduceMotion:n,skipAnimations:r}=e;function s(c,i,m){let f=[],p;const g={};if(n!==void 0&&(g.reduceMotion=n),r!==void 0&&(g.skipAnimations=r),_t(c)){const{onComplete:x,...N}=i||{};typeof x=="function"&&(p=x),f=Dt(c,{...g,...N},t)}else{const{onComplete:x,...N}=m||{};typeof x=="function"&&(p=x),f=we(c,i,{...g,...N},t)}const u=new ut(f);return p&&u.finished.then(p),t&&(t.animations.push(u),u.finished.then(()=>{ye(t.animations,u)})),u}return s}const L=It(),he=8;function Mt({badgeId:e,tier:t,locked:n=!1,size:r=176,backLines:s=[],label:c}){const i=et(0),m=Ue(),f=C.useRef(null),p=C.useRef(null),g=C.useRef(!1),u=Je(t,n),x=je.get(e)?.icon||null,N=z(i,o=>`${(o%360+360)%360/360*160-80}%`),k=z(i,o=>`${80-(o%360+360)%360/360*160}%`),E=z(i,o=>{const l=Math.abs(Math.sin(o*Math.PI/180));return Math.max(0,(l-.35)/.65)*.3}),b=()=>{p.current?.stop?.(),p.current=null};C.useEffect(()=>{if(m||g.current)return;let o=!1;i.set(-360);const l=L(i,0,{duration:.9,ease:[.16,1,.3,1]});return p.current=l,l.then(()=>{o||g.current||(p.current=L(i,[0,-14,14,0],{duration:4.5,repeat:1/0,ease:"easeInOut"}))}),()=>{o=!0,b()}},[m,i]);const v=o=>{const l=i.get();if(m){const y=Math.round(l/180)*180;p.current=L(i,y,{duration:.2,ease:"easeOut"});return}const d=l+o*.35,D=Math.round(d/180)*180;p.current=L(i,D,{type:"spring",velocity:o,stiffness:58,damping:13.5,mass:1})},j=o=>{g.current=!0,b(),o.currentTarget.setPointerCapture?.(o.pointerId),f.current={pointerId:o.pointerId,startX:o.clientX,startRot:i.get(),samples:[{t:o.timeStamp,x:o.clientX}]}},I=o=>{const l=f.current;!l||l.pointerId!==o.pointerId||(i.set(l.startRot+(o.clientX-l.startX)*.55),l.samples.push({t:o.timeStamp,x:o.clientX}),l.samples.length>5&&l.samples.shift())},w=o=>{const l=f.current;if(!l||l.pointerId!==o.pointerId)return;f.current=null;const d=l.samples[0],D=l.samples[l.samples.length-1],y=D.t-d.t,R=y>0?(D.x-d.x)*.55*1e3/y:0;v(R)},M=o=>{if(o.key!=="ArrowLeft"&&o.key!=="ArrowRight")return;o.preventDefault(),g.current=!0,b();const l=o.key==="ArrowRight"?30:-30;p.current=L(i,i.get()+l,{duration:.15,ease:"easeOut"})},A={backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden"};return a.jsx("div",{role:"img","aria-label":c,tabIndex:0,onPointerDown:j,onPointerMove:I,onPointerUp:w,onPointerCancel:w,onKeyDown:M,className:"inline-flex cursor-grab select-none items-center justify-center outline-none focus-visible:ring-2 focus-visible:ring-oai-brand/60 rounded-full active:cursor-grabbing",style:{perspective:900,touchAction:"pan-y"},children:a.jsxs("div",{className:"relative",style:{transform:"rotateX(-8deg)",transformStyle:"preserve-3d"},children:[a.jsxs(X.div,{className:"relative",style:{rotateY:i,transformStyle:"preserve-3d",width:r,height:r},children:[[-3,-1.5,0,1.5,3].map(o=>a.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 rounded-full",style:{transform:`translateZ(${o}px)`,background:u.rim[1]}},o)),a.jsxs("div",{className:"absolute inset-0 overflow-hidden rounded-full",style:{...A,transform:`translateZ(${he/2}px)`},children:[a.jsx(qe,{badgeId:e,tier:t,locked:n,size:"fill",className:"brightness-105 saturate-[1.08]"}),a.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 rounded-full",style:{background:"radial-gradient(circle at 30% 20%, rgba(255,255,255,0.45), rgba(255,255,255,0) 42%), linear-gradient(172deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 38%, rgba(0,0,0,0.08) 100%)",boxShadow:"inset 0 3px 7px rgba(255,255,255,0.5), inset 0 -3px 8px rgba(0,0,0,0.15)"}}),a.jsx(X.div,{"aria-hidden":!0,className:"pointer-events-none absolute inset-0",style:{x:N,background:"linear-gradient(105deg, transparent 34%, rgba(255,255,255,0.5) 50%, transparent 66%)"}}),a.jsx(X.div,{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 rounded-full",style:{opacity:E,background:"rgba(8, 12, 10, 0.9)"}})]}),a.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-1 overflow-hidden rounded-full px-6 text-center",style:{...A,transform:`rotateY(180deg) translateZ(${he/2}px)`,background:`linear-gradient(145deg, ${u.face[0]}, ${u.face[1]})`,boxShadow:`inset 0 0 0 6px ${u.rim[1]}, inset 0 0 0 7.5px rgba(255,255,255,0.22), inset 0 3px 7px rgba(255,255,255,0.4), inset 0 -4px 12px rgba(0,0,0,0.22)`},children:[a.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 rounded-full",style:{background:"repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,0.06) 0px, rgba(255,255,255,0.06) 1px, transparent 1px, transparent 4px)"}}),x?a.jsx(x,{"aria-hidden":!0,size:Math.round(r*.62),strokeWidth:1.1,color:u.glyph,className:"pointer-events-none absolute opacity-[0.13]",style:{filter:"drop-shadow(0 1px 0 rgba(255,255,255,0.3)) drop-shadow(0 -1px 0 rgba(0,0,0,0.35))"}}):null,a.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 rounded-full",style:{background:"radial-gradient(circle at 70% 20%, rgba(255,255,255,0.4), rgba(255,255,255,0) 44%), linear-gradient(188deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 38%, rgba(0,0,0,0.10) 100%)"}}),s.map((o,l)=>a.jsx("div",{className:`font-mono tabular-nums ${l===0?"text-[10px] uppercase tracking-[0.18em]":l===1?"text-lg font-bold":"text-[11px]"}`,style:{color:u.glyph,textShadow:"0 1px 0 rgba(255,255,255,0.28), 0 -1px 0 rgba(0,0,0,0.3)"},children:o},`${l}-${o}`)),a.jsx(X.div,{"aria-hidden":!0,className:"pointer-events-none absolute inset-0",style:{x:k,background:"linear-gradient(105deg, transparent 34%, rgba(255,255,255,0.45) 50%, transparent 66%)"}}),a.jsx(X.div,{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 rounded-full",style:{opacity:E,background:"rgba(8, 12, 10, 0.9)"}})]})]}),a.jsx("div",{"aria-hidden":!0,className:"absolute left-1/2 h-3 w-3/5 rounded-[100%] bg-black/20 blur-md dark:bg-black/45",style:{bottom:-20,transform:"translateX(-50%)"}})]})})}function Ae(e){if(!e)return null;const t=Date.parse(e);return Number.isFinite(t)?new Date(t).toLocaleDateString():null}function Tt(e){const t=Number(e);return!Number.isSafeInteger(t)||t<1?null:String(t).padStart(6,"0")}function $t(e,t,n){if(t?.scope!=="cloud"||!n)return null;const r=Number(e?.serials?.[n]);return Number.isSafeInteger(r)&&r>=1?r:null}function Vt({badge:e}){return a.jsx("div",{className:"flex items-center gap-1",children:Qe.map((t,n)=>{const r=(e.tier||0)>=n+1,s=Ae(e.achieved?.[t]),c=$[t];return a.jsx("span",{title:s?`${h(`achievements.tier.${t}`)} · ${s}`:h(`achievements.tier.${t}`),className:"inline-flex h-2 w-8 rounded-full",style:r?{background:`linear-gradient(120deg, ${c.rim[0]} 0%, ${c.ring} 55%, ${c.rim[1]} 100%)`,boxShadow:"inset 0 1px 1px rgba(255,255,255,0.4), 0 0 0 1px rgba(10,15,12,0.05)"}:void 0,children:!r&&a.jsx("span",{className:"h-full w-full rounded-full bg-oai-gray-200 dark:bg-oai-gray-800"})},t)})})}function ge({badge:e,onClose:t}){const n=je.get(e.id),r=h(Y(e.id,"name")),s=(e.tier||0)>=1,c=s?le(e.tier):null,i=Ae(s?e.achieved?.[c]||(ce(e)?new Date(ce(e)).toISOString():null):null),m=ue(n?.format,e.metric_value),f=tt(e),p=e.tier<4?le((e.tier||0)+1):null,g=$t(e,n,c),u=Tt(g),x=u?[h("achievements.modal.achieved_label"),h("achievements.modal.issue_number",{number:u}),i||r]:[s?h("achievements.modal.achieved_label"):h("achievements.modal.locked"),s?m:"···",s&&i?i:r];return a.jsxs("div",{className:"flex flex-col items-center px-6 pb-6 pt-5 text-center",children:[a.jsxs("div",{className:"flex w-full items-start justify-between gap-3",children:[a.jsxs("div",{className:"min-w-0 flex-1 text-left",children:[a.jsx("h2",{className:"truncate text-lg font-semibold tracking-tight text-oai-black dark:text-white",children:r}),a.jsx("p",{className:"mt-0.5 text-xs text-oai-gray-500 dark:text-oai-gray-400",children:h(Y(e.id,"desc"))})]}),a.jsx("button",{type:"button",onClick:t,"aria-label":h("achievements.modal.close"),className:"shrink-0 rounded-md p-1.5 text-oai-gray-400 transition-colors hover:bg-oai-gray-100 hover:text-oai-gray-700 dark:hover:bg-oai-gray-900 dark:hover:text-oai-gray-200",children:a.jsx(He,{size:16})})]}),a.jsx("div",{className:"mt-5 mb-7",children:a.jsx(Mt,{badgeId:e.id,tier:e.tier,locked:!s,backLines:x,label:h("achievements.modal.coin_aria",{name:r})})}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"rounded-full px-2.5 py-0.5 text-[11px] font-semibold uppercase tracking-wide",style:s?{background:`linear-gradient(120deg, ${$[c].rim[0]} 0%, ${$[c].ring} 55%, ${$[c].rim[1]} 100%)`,color:$[c].glyph,textShadow:"0 1px 0 rgba(255,255,255,0.35)",boxShadow:"inset 0 1px 1px rgba(255,255,255,0.4), 0 0 0 1px rgba(10,15,12,0.06)"}:{background:"rgba(128,134,130,0.75)",color:"rgba(250,250,250,0.95)"},children:s?h(`achievements.tier.${c}`):h("achievements.modal.locked")}),s&&i?a.jsx("span",{className:"text-xs tabular-nums text-oai-gray-500 dark:text-oai-gray-400",children:i}):null]}),a.jsxs("dl",{className:"mt-5 w-full space-y-3 border-t border-oai-gray-200/70 pt-4 text-left dark:border-oai-gray-800/60",children:[a.jsxs("div",{className:"flex items-baseline justify-between gap-3 text-sm",children:[a.jsx("dt",{className:"text-oai-gray-500 dark:text-oai-gray-400",children:h("achievements.modal.value_label")}),a.jsx("dd",{className:"font-mono font-semibold tabular-nums text-oai-black dark:text-white",children:m})]}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-baseline justify-between gap-3 text-xs text-oai-gray-500 dark:text-oai-gray-400",children:[a.jsx("span",{children:e.tier>=4?h("achievements.modal.max_tier"):h("achievements.modal.progress_to_next",{tier:h(`achievements.tier.${p}`)})}),e.tier<4&&e.next_threshold!=null?a.jsxs("span",{className:"font-mono tabular-nums",children:[m," ",e.lower_is_better?"→":"/"," ",ue(n?.format,e.next_threshold)]}):null]}),a.jsx("div",{className:"mt-1.5 h-1.5 w-full overflow-hidden rounded-full bg-oai-gray-200 dark:bg-oai-gray-800",children:a.jsx("div",{className:"h-full rounded-full transition-[width] duration-500",style:{width:`${Math.round((e.tier>=4?1:f)*100)}%`,background:s?`linear-gradient(90deg, ${$[c].rim[0]} 0%, ${$[c].ring} 55%, ${$[c].rim[1]} 100%)`:"rgba(128,134,130,0.75)",boxShadow:s?"inset 0 1px 1px rgba(255,255,255,0.35)":void 0}})})]}),a.jsxs("div",{className:"flex items-center justify-between gap-3 text-xs text-oai-gray-500 dark:text-oai-gray-400",children:[a.jsx("span",{children:h("achievements.modal.tier_history")}),a.jsx(Vt,{badge:e})]})]})]})}const xe=ve("relative w-full max-w-[380px] flex flex-col","rounded-2xl bg-white dark:bg-oai-gray-950","shadow-[0_20px_60px_-20px_rgba(0,0,0,0.25)] dark:shadow-[0_20px_60px_-10px_rgba(0,0,0,0.65)]","ring-1 ring-oai-gray-200 dark:ring-oai-gray-800 overflow-hidden","dark:border-t dark:border-white/[0.08]");function Gt({badge:e,onClose:t}){const n=Ze(),r=!!e;return C.useEffect(()=>{if(!n||!r)return;const s=c=>{c.key==="Escape"&&(c.stopPropagation(),t?.())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[n,r,t]),r?n?a.jsxs("div",{className:"fixed inset-0 z-[120] flex items-center justify-center p-4",children:[a.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-[2px]",onClick:t,"aria-hidden":!0}),a.jsx("div",{className:xe,children:a.jsx(ge,{badge:e,onClose:t})})]}):a.jsx(nt,{open:!0,onOpenChange:s=>{s||t?.()},children:a.jsxs(rt,{children:[a.jsx(at,{className:"cost-modal-backdrop z-[110]"}),a.jsx(st,{className:"fixed inset-0 z-[120] flex items-center justify-center p-4",children:a.jsxs(it,{className:ve("cost-modal-popup",xe),children:[a.jsx(ot,{render:a.jsx("h2",{className:"sr-only"}),children:h(Y(e.id,"name"))}),a.jsx(ge,{badge:e,onClose:t})]})})]})}):null}export{Gt as BadgeDetailModal,$t as currentBadgeIssueNumber,Gt as default,Tt as formatIssueNumber};
1
+ import{cW as De,cX as _e,cY as Ie,cZ as Me,c_ as Te,c$ as ye,i as be,d0 as $e,d1 as Ve,d2 as Oe,d3 as Re,d4 as Pe,d5 as Be,d6 as Ke,d7 as Xe,d8 as Le,d9 as Ce,da as Fe,db as G,dc as Ge,dd as We,de as ze,df as Ye,u as Ue,r as C,j as a,m as X,$ as Ze,E as h,P as ve,X as He}from"./main-hXifO_Tp.js";import{a as je,A as qe,p as Je,b as Y,t as le,T as $,c as Qe}from"./AchievementBadge-wAEfjNCA.js";import{a as et,u as z}from"./use-transform-Bu6AKPnc.js";import{l as ce,f as ue,b as tt}from"./AchievementsSection-a3gkS8tD.js";import{D as nt,a as rt,b as at,c as st,d as it,e as ot}from"./DialogTitle-DwbiXVxh.js";import"./zap-C122AVXf.js";import"./flame-Bk2l5Mqz.js";import"./format-tokens-BuWmqFvA.js";import"./useScrollLock-DP7SL29Q.js";const lt=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function Ne(e,t){return De(e)?e[lt(0,e.length,t)]:e}class ct{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>r.attachTimeline(t));return()=>{n.forEach((r,s)=>{r&&r(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return de(this.animations,"duration")}get iterationDuration(){return de(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function de(e,t){let n=0;for(let r=0;r<e.length;r++){const s=e[r][t];s!==null&&s>n&&(n=s)}return n}class ut extends ct{then(t,n){return this.finished.finally(t).then(()=>{})}}function dt(e,t){return e in t}class ft extends _e{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(dt(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return Ie()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function U(e){return typeof e=="object"&&!Array.isArray(e)}function ke(e,t,n,r){return e==null?[]:typeof e=="string"&&U(t)?Me(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(s=>s!=null):[e]}function mt(e,t,n){return e*(t+1)+n*t}function fe(e,t,n,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function pt(e,t,n){for(let r=0;r<e.length;r++){const s=e[r];s.at>t&&s.at<n&&(ye(e,s),r--)}}function ht(e,t,n,r,s,c){pt(e,s,c);for(let i=0;i<t.length;i++)e.push({value:t[i],at:Te(s,c,r[i]),easing:Ne(n,i)})}function gt(e,t,n=0){const r=t+1+t*n;for(let s=0;s<e.length;s++)e[s]=e[s]/r}function xt(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const yt="easeInOut",bt=20;function vt(e,{defaultTransition:t={},...n}={},r,s){const c=t.duration||.3,i=new Map,m=new Map,f={},p=new Map;let g=0,u=0,x=0;for(let N=0;N<e.length;N++){const k=e[N];if(typeof k=="string"){p.set(k,u);continue}else if(!Array.isArray(k)){p.set(k.name,fe(u,k.at,g,p));continue}let[E,b,v={}]=k;v.at!==void 0&&(u=fe(u,v.at,g,p));let j=0;const I=(w,M,A,o=0,l=0)=>{const d=jt(w),{delay:D=0,times:y=$e(d),type:R=t.type||"keyframes",repeat:P,repeatType:W,repeatDelay:Z=0,...Se}=M;let{ease:_=t.ease||"easeOut",duration:S}=M;const H=typeof D=="function"?D(o,l):D,q=d.length,J=Pe(R)?R:s?.[R||"keyframes"];if(q<=2&&J){let V=100;if(q===2&&wt(d)){const B=d[1]-d[0];V=Math.abs(B)}const O={...t,...Se};S!==void 0&&(O.duration=Be(S));const F=Ve(O,V,J);_=F.ease,S=F.duration}S??(S=c);const Q=u+H;y.length===1&&y[0]===0&&(y[1]=1);const ee=y.length-d.length;if(ee>0&&Oe(y,ee),d.length===1&&d.unshift(null),P&&P<bt){const V=S>0?Z/S:0;S=mt(S,P,Z);const O=[...d],F=[...y];_=Array.isArray(_)?[..._]:[_];const B=[..._],ne=W==="reverse"||W==="mirror";let re=O,ae=B;ne&&(re=[...O].reverse(),W==="reverse"&&(ae=[...B].reverse().map(T=>typeof T=="function"?Re(T):T)));for(let T=0;T<P;T++){const se=ne&&T%2===0,ie=se?re:O,Ee=se?ae:B,oe=(T+1)*(1+V);V>0&&(d.push(d[d.length-1]),y.push(oe),_.push("linear")),d.push(...ie);for(let K=0;K<ie.length;K++)y.push(F[K]+oe),_.push(K===0?"linear":Ne(Ee,K-1))}gt(y,P,V)}const te=Q+S;ht(A,d,_,y,Q,te),j=Math.max(H+S,j),x=Math.max(te,x)};if(be(E)){const w=me(E,m);I(b,v,pe("default",w))}else{const w=ke(E,b,r,f),M=w.length;for(let A=0;A<M;A++){b=b,v=v;const o=w[A],l=me(o,m);for(const d in b)I(b[d],Nt(v,d),pe(d,l),A,M)}}g=u,u+=j}return m.forEach((N,k)=>{for(const E in N){const b=N[E];b.sort(xt);const v=[],j=[],I=[];for(let o=0;o<b.length;o++){const{at:l,value:d,easing:D}=b[o];v.push(d),j.push(Ke(0,x,l)),I.push(D||"easeOut")}j[0]!==0&&(j.unshift(0),v.unshift(v[0]),I.unshift(yt)),j[j.length-1]!==1&&(j.push(1),v.push(null)),i.has(k)||i.set(k,{keyframes:{},transition:{}});const w=i.get(k);w.keyframes[E]=v;const{type:M,...A}=t;w.transition[E]={...A,duration:x,ease:I,times:j,...n}}}),i}function me(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function pe(e,t){return t[e]||(t[e]=[]),t[e]}function jt(e){return Array.isArray(e)?e:[e]}function Nt(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const kt=e=>typeof e=="number",wt=e=>e.every(kt);function At(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Xe(e)&&!Le(e)?new Ce(t):new Fe(t);n.mount(e),G.set(e,n)}function St(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new ft(t);n.mount(e),G.set(e,n)}function Et(e,t){return be(e)||typeof e=="number"||typeof e=="string"&&!U(t)}function we(e,t,n,r){const s=[];if(Et(e,t))s.push(Ge(e,U(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return s;const c=ke(e,t,r),i=c.length;for(let m=0;m<i;m++){const f=c[m],p=f instanceof Element?At:St;G.has(f)||p(f);const g=G.get(f),u={...n};"delay"in u&&typeof u.delay=="function"&&(u.delay=u.delay(m,i)),s.push(...We(g,{...t,transition:u},{}))}}return s}function Dt(e,t,n){const r=[],s=e.map(i=>{if(Array.isArray(i)&&typeof i[0]=="function"){const m=i[0],f=ze(0);return f.on("change",m),i.length===1?[f,[0,1]]:i.length===2?[f,[0,1],i[1]]:[f,i[1],i[2]]}return i});return vt(s,t,n,{spring:Ye}).forEach(({keyframes:i,transition:m},f)=>{r.push(...we(f,i,m))}),r}function _t(e){return Array.isArray(e)&&e.some(Array.isArray)}function It(e={}){const{scope:t,reduceMotion:n,skipAnimations:r}=e;function s(c,i,m){let f=[],p;const g={};if(n!==void 0&&(g.reduceMotion=n),r!==void 0&&(g.skipAnimations=r),_t(c)){const{onComplete:x,...N}=i||{};typeof x=="function"&&(p=x),f=Dt(c,{...g,...N},t)}else{const{onComplete:x,...N}=m||{};typeof x=="function"&&(p=x),f=we(c,i,{...g,...N},t)}const u=new ut(f);return p&&u.finished.then(p),t&&(t.animations.push(u),u.finished.then(()=>{ye(t.animations,u)})),u}return s}const L=It(),he=8;function Mt({badgeId:e,tier:t,locked:n=!1,size:r=176,backLines:s=[],label:c}){const i=et(0),m=Ue(),f=C.useRef(null),p=C.useRef(null),g=C.useRef(!1),u=Je(t,n),x=je.get(e)?.icon||null,N=z(i,o=>`${(o%360+360)%360/360*160-80}%`),k=z(i,o=>`${80-(o%360+360)%360/360*160}%`),E=z(i,o=>{const l=Math.abs(Math.sin(o*Math.PI/180));return Math.max(0,(l-.35)/.65)*.3}),b=()=>{p.current?.stop?.(),p.current=null};C.useEffect(()=>{if(m||g.current)return;let o=!1;i.set(-360);const l=L(i,0,{duration:.9,ease:[.16,1,.3,1]});return p.current=l,l.then(()=>{o||g.current||(p.current=L(i,[0,-14,14,0],{duration:4.5,repeat:1/0,ease:"easeInOut"}))}),()=>{o=!0,b()}},[m,i]);const v=o=>{const l=i.get();if(m){const y=Math.round(l/180)*180;p.current=L(i,y,{duration:.2,ease:"easeOut"});return}const d=l+o*.35,D=Math.round(d/180)*180;p.current=L(i,D,{type:"spring",velocity:o,stiffness:58,damping:13.5,mass:1})},j=o=>{g.current=!0,b(),o.currentTarget.setPointerCapture?.(o.pointerId),f.current={pointerId:o.pointerId,startX:o.clientX,startRot:i.get(),samples:[{t:o.timeStamp,x:o.clientX}]}},I=o=>{const l=f.current;!l||l.pointerId!==o.pointerId||(i.set(l.startRot+(o.clientX-l.startX)*.55),l.samples.push({t:o.timeStamp,x:o.clientX}),l.samples.length>5&&l.samples.shift())},w=o=>{const l=f.current;if(!l||l.pointerId!==o.pointerId)return;f.current=null;const d=l.samples[0],D=l.samples[l.samples.length-1],y=D.t-d.t,R=y>0?(D.x-d.x)*.55*1e3/y:0;v(R)},M=o=>{if(o.key!=="ArrowLeft"&&o.key!=="ArrowRight")return;o.preventDefault(),g.current=!0,b();const l=o.key==="ArrowRight"?30:-30;p.current=L(i,i.get()+l,{duration:.15,ease:"easeOut"})},A={backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden"};return a.jsx("div",{role:"img","aria-label":c,tabIndex:0,onPointerDown:j,onPointerMove:I,onPointerUp:w,onPointerCancel:w,onKeyDown:M,className:"inline-flex cursor-grab select-none items-center justify-center outline-none focus-visible:ring-2 focus-visible:ring-oai-brand/60 rounded-full active:cursor-grabbing",style:{perspective:900,touchAction:"pan-y"},children:a.jsxs("div",{className:"relative",style:{transform:"rotateX(-8deg)",transformStyle:"preserve-3d"},children:[a.jsxs(X.div,{className:"relative",style:{rotateY:i,transformStyle:"preserve-3d",width:r,height:r},children:[[-3,-1.5,0,1.5,3].map(o=>a.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 rounded-full",style:{transform:`translateZ(${o}px)`,background:u.rim[1]}},o)),a.jsxs("div",{className:"absolute inset-0 overflow-hidden rounded-full",style:{...A,transform:`translateZ(${he/2}px)`},children:[a.jsx(qe,{badgeId:e,tier:t,locked:n,size:"fill",className:"brightness-105 saturate-[1.08]"}),a.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 rounded-full",style:{background:"radial-gradient(circle at 30% 20%, rgba(255,255,255,0.45), rgba(255,255,255,0) 42%), linear-gradient(172deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 38%, rgba(0,0,0,0.08) 100%)",boxShadow:"inset 0 3px 7px rgba(255,255,255,0.5), inset 0 -3px 8px rgba(0,0,0,0.15)"}}),a.jsx(X.div,{"aria-hidden":!0,className:"pointer-events-none absolute inset-0",style:{x:N,background:"linear-gradient(105deg, transparent 34%, rgba(255,255,255,0.5) 50%, transparent 66%)"}}),a.jsx(X.div,{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 rounded-full",style:{opacity:E,background:"rgba(8, 12, 10, 0.9)"}})]}),a.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-1 overflow-hidden rounded-full px-6 text-center",style:{...A,transform:`rotateY(180deg) translateZ(${he/2}px)`,background:`linear-gradient(145deg, ${u.face[0]}, ${u.face[1]})`,boxShadow:`inset 0 0 0 6px ${u.rim[1]}, inset 0 0 0 7.5px rgba(255,255,255,0.22), inset 0 3px 7px rgba(255,255,255,0.4), inset 0 -4px 12px rgba(0,0,0,0.22)`},children:[a.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 rounded-full",style:{background:"repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,0.06) 0px, rgba(255,255,255,0.06) 1px, transparent 1px, transparent 4px)"}}),x?a.jsx(x,{"aria-hidden":!0,size:Math.round(r*.62),strokeWidth:1.1,color:u.glyph,className:"pointer-events-none absolute opacity-[0.13]",style:{filter:"drop-shadow(0 1px 0 rgba(255,255,255,0.3)) drop-shadow(0 -1px 0 rgba(0,0,0,0.35))"}}):null,a.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 rounded-full",style:{background:"radial-gradient(circle at 70% 20%, rgba(255,255,255,0.4), rgba(255,255,255,0) 44%), linear-gradient(188deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 38%, rgba(0,0,0,0.10) 100%)"}}),s.map((o,l)=>a.jsx("div",{className:`font-mono tabular-nums ${l===0?"text-[10px] uppercase tracking-[0.18em]":l===1?"text-lg font-bold":"text-[11px]"}`,style:{color:u.glyph,textShadow:"0 1px 0 rgba(255,255,255,0.28), 0 -1px 0 rgba(0,0,0,0.3)"},children:o},`${l}-${o}`)),a.jsx(X.div,{"aria-hidden":!0,className:"pointer-events-none absolute inset-0",style:{x:k,background:"linear-gradient(105deg, transparent 34%, rgba(255,255,255,0.45) 50%, transparent 66%)"}}),a.jsx(X.div,{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 rounded-full",style:{opacity:E,background:"rgba(8, 12, 10, 0.9)"}})]})]}),a.jsx("div",{"aria-hidden":!0,className:"absolute left-1/2 h-3 w-3/5 rounded-[100%] bg-black/20 blur-md dark:bg-black/45",style:{bottom:-20,transform:"translateX(-50%)"}})]})})}function Ae(e){if(!e)return null;const t=Date.parse(e);return Number.isFinite(t)?new Date(t).toLocaleDateString():null}function Tt(e){const t=Number(e);return!Number.isSafeInteger(t)||t<1?null:String(t).padStart(6,"0")}function $t(e,t,n){if(t?.scope!=="cloud"||!n)return null;const r=Number(e?.serials?.[n]);return Number.isSafeInteger(r)&&r>=1?r:null}function Vt({badge:e}){return a.jsx("div",{className:"flex items-center gap-1",children:Qe.map((t,n)=>{const r=(e.tier||0)>=n+1,s=Ae(e.achieved?.[t]),c=$[t];return a.jsx("span",{title:s?`${h(`achievements.tier.${t}`)} · ${s}`:h(`achievements.tier.${t}`),className:"inline-flex h-2 w-8 rounded-full",style:r?{background:`linear-gradient(120deg, ${c.rim[0]} 0%, ${c.ring} 55%, ${c.rim[1]} 100%)`,boxShadow:"inset 0 1px 1px rgba(255,255,255,0.4), 0 0 0 1px rgba(10,15,12,0.05)"}:void 0,children:!r&&a.jsx("span",{className:"h-full w-full rounded-full bg-oai-gray-200 dark:bg-oai-gray-800"})},t)})})}function ge({badge:e,onClose:t}){const n=je.get(e.id),r=h(Y(e.id,"name")),s=(e.tier||0)>=1,c=s?le(e.tier):null,i=Ae(s?e.achieved?.[c]||(ce(e)?new Date(ce(e)).toISOString():null):null),m=ue(n?.format,e.metric_value),f=tt(e),p=e.tier<4?le((e.tier||0)+1):null,g=$t(e,n,c),u=Tt(g),x=u?[h("achievements.modal.achieved_label"),h("achievements.modal.issue_number",{number:u}),i||r]:[s?h("achievements.modal.achieved_label"):h("achievements.modal.locked"),s?m:"···",s&&i?i:r];return a.jsxs("div",{className:"flex flex-col items-center px-6 pb-6 pt-5 text-center",children:[a.jsxs("div",{className:"flex w-full items-start justify-between gap-3",children:[a.jsxs("div",{className:"min-w-0 flex-1 text-left",children:[a.jsx("h2",{className:"truncate text-lg font-semibold tracking-tight text-oai-black dark:text-white",children:r}),a.jsx("p",{className:"mt-0.5 text-xs text-oai-gray-500 dark:text-oai-gray-400",children:h(Y(e.id,"desc"))})]}),a.jsx("button",{type:"button",onClick:t,"aria-label":h("achievements.modal.close"),className:"shrink-0 rounded-md p-1.5 text-oai-gray-400 transition-colors hover:bg-oai-gray-100 hover:text-oai-gray-700 dark:hover:bg-oai-gray-900 dark:hover:text-oai-gray-200",children:a.jsx(He,{size:16})})]}),a.jsx("div",{className:"mt-5 mb-7",children:a.jsx(Mt,{badgeId:e.id,tier:e.tier,locked:!s,backLines:x,label:h("achievements.modal.coin_aria",{name:r})})}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"rounded-full px-2.5 py-0.5 text-[11px] font-semibold uppercase tracking-wide",style:s?{background:`linear-gradient(120deg, ${$[c].rim[0]} 0%, ${$[c].ring} 55%, ${$[c].rim[1]} 100%)`,color:$[c].glyph,textShadow:"0 1px 0 rgba(255,255,255,0.35)",boxShadow:"inset 0 1px 1px rgba(255,255,255,0.4), 0 0 0 1px rgba(10,15,12,0.06)"}:{background:"rgba(128,134,130,0.75)",color:"rgba(250,250,250,0.95)"},children:s?h(`achievements.tier.${c}`):h("achievements.modal.locked")}),s&&i?a.jsx("span",{className:"text-xs tabular-nums text-oai-gray-500 dark:text-oai-gray-400",children:i}):null]}),a.jsxs("dl",{className:"mt-5 w-full space-y-3 border-t border-oai-gray-200/70 pt-4 text-left dark:border-oai-gray-800/60",children:[a.jsxs("div",{className:"flex items-baseline justify-between gap-3 text-sm",children:[a.jsx("dt",{className:"text-oai-gray-500 dark:text-oai-gray-400",children:h("achievements.modal.value_label")}),a.jsx("dd",{className:"font-mono font-semibold tabular-nums text-oai-black dark:text-white",children:m})]}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-baseline justify-between gap-3 text-xs text-oai-gray-500 dark:text-oai-gray-400",children:[a.jsx("span",{children:e.tier>=4?h("achievements.modal.max_tier"):h("achievements.modal.progress_to_next",{tier:h(`achievements.tier.${p}`)})}),e.tier<4&&e.next_threshold!=null?a.jsxs("span",{className:"font-mono tabular-nums",children:[m," ",e.lower_is_better?"→":"/"," ",ue(n?.format,e.next_threshold)]}):null]}),a.jsx("div",{className:"mt-1.5 h-1.5 w-full overflow-hidden rounded-full bg-oai-gray-200 dark:bg-oai-gray-800",children:a.jsx("div",{className:"h-full rounded-full transition-[width] duration-500",style:{width:`${Math.round((e.tier>=4?1:f)*100)}%`,background:s?`linear-gradient(90deg, ${$[c].rim[0]} 0%, ${$[c].ring} 55%, ${$[c].rim[1]} 100%)`:"rgba(128,134,130,0.75)",boxShadow:s?"inset 0 1px 1px rgba(255,255,255,0.35)":void 0}})})]}),a.jsxs("div",{className:"flex items-center justify-between gap-3 text-xs text-oai-gray-500 dark:text-oai-gray-400",children:[a.jsx("span",{children:h("achievements.modal.tier_history")}),a.jsx(Vt,{badge:e})]})]})]})}const xe=ve("relative w-full max-w-[380px] flex flex-col","rounded-2xl bg-white dark:bg-oai-gray-950","shadow-[0_20px_60px_-20px_rgba(0,0,0,0.25)] dark:shadow-[0_20px_60px_-10px_rgba(0,0,0,0.65)]","ring-1 ring-oai-gray-200 dark:ring-oai-gray-800 overflow-hidden","dark:border-t dark:border-white/[0.08]");function Gt({badge:e,onClose:t}){const n=Ze(),r=!!e;return C.useEffect(()=>{if(!n||!r)return;const s=c=>{c.key==="Escape"&&(c.stopPropagation(),t?.())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[n,r,t]),r?n?a.jsxs("div",{className:"fixed inset-0 z-[120] flex items-center justify-center p-4",children:[a.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-[2px]",onClick:t,"aria-hidden":!0}),a.jsx("div",{className:xe,children:a.jsx(ge,{badge:e,onClose:t})})]}):a.jsx(nt,{open:!0,onOpenChange:s=>{s||t?.()},children:a.jsxs(rt,{children:[a.jsx(at,{className:"cost-modal-backdrop z-[110]"}),a.jsx(st,{className:"fixed inset-0 z-[120] flex items-center justify-center p-4",children:a.jsxs(it,{className:ve("cost-modal-popup",xe),children:[a.jsx(ot,{render:a.jsx("h2",{className:"sr-only"}),children:h(Y(e.id,"name"))}),a.jsx(ge,{badge:e,onClose:t})]})})]})}):null}export{Gt as BadgeDetailModal,$t as currentBadgeIssueNumber,Gt as default,Tt as formatIssueNumber};
@@ -1 +1 @@
1
- import{j as r}from"./main-CvkyGV2H.js";function t({children:i,title:a,subtitle:o,className:s="",bodyClassName:d=""}){return r.jsxs("div",{className:`rounded-xl border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-900 transition-colors duration-200 ${s}`,children:[(a||o)&&r.jsxs("div",{className:"px-5 py-4 border-b border-oai-gray-200 dark:border-oai-gray-800 transition-colors duration-200",children:[a&&r.jsx("h3",{className:"text-sm font-medium text-oai-gray-500 dark:text-oai-gray-300 uppercase tracking-wide transition-colors duration-200",children:a}),o&&r.jsx("p",{className:"text-sm text-oai-gray-500 dark:text-oai-gray-300 mt-1 transition-colors duration-200",children:o})]}),r.jsx("div",{className:`p-5 ${d}`,children:i})]})}export{t as C};
1
+ import{j as r}from"./main-hXifO_Tp.js";function t({children:i,title:a,subtitle:o,className:s="",bodyClassName:d=""}){return r.jsxs("div",{className:`rounded-xl border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-900 transition-colors duration-200 ${s}`,children:[(a||o)&&r.jsxs("div",{className:"px-5 py-4 border-b border-oai-gray-200 dark:border-oai-gray-800 transition-colors duration-200",children:[a&&r.jsx("h3",{className:"text-sm font-medium text-oai-gray-500 dark:text-oai-gray-300 uppercase tracking-wide transition-colors duration-200",children:a}),o&&r.jsx("p",{className:"text-sm text-oai-gray-500 dark:text-oai-gray-300 mt-1 transition-colors duration-200",children:o})]}),r.jsx("div",{className:`p-5 ${d}`,children:i})]})}export{t as C};
@@ -1 +1 @@
1
- import{r as o,j as w}from"./main-CvkyGV2H.js";function v(e){const n=String(e||"").trim().toLowerCase();return/^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/.test(n)?n:"clawd"}const A=.84;function C(e){return v(e)==="clawd"?A:1}const L={idle:{row:0,durations:[280,110,110,140,140,320]},"running-right":{row:1,durations:[120,120,120,120,120,120,120,220]},"running-left":{row:2,durations:[120,120,120,120,120,120,120,220]},waving:{row:3,durations:[140,140,140,280]},jumping:{row:4,durations:[140,140,140,140,280]},failed:{row:5,durations:[140,140,140,140,140,140,140,240]},waiting:{row:6,durations:[150,150,150,150,150,260]},running:{row:7,durations:[120,120,120,120,120,220]},review:{row:8,durations:[150,150,150,150,150,280]}};function z(e){return["error","disconnected","working-overheated"].includes(e)?"failed":["happy","waking","mini-happy","jumping"].includes(e)?"jumping":["working-typing","working-ultrathink","working-juggling","running"].includes(e)?"running":["working-thinking","working-wizard","review"].includes(e)?"review":["sleeping","idle-doze","mini-sleep","waiting"].includes(e)?"waiting":["mini-peek","waving"].includes(e)?"waving":e==="running-left"||e==="running-right"?e:"idle"}function T(){const[e,n]=o.useState(()=>typeof document>"u"?!0:document.visibilityState!=="hidden");return o.useEffect(()=>{if(typeof document>"u")return;const t=()=>n(document.visibilityState!=="hidden");return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e}function V(){const[e,n]=o.useState(()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return o.useEffect(()=>{if(typeof window.matchMedia!="function")return;const t=window.matchMedia("(prefers-reduced-motion: reduce)"),i=s=>n(s.matches);return t.addEventListener("change",i),()=>t.removeEventListener("change",i)},[]),e}function _({character:e,pet:n=null,state:t="idle-living",size:i=48,className:s="",lookDirectionIndex:a=null}){const c=v(e),l=z(t),u=L[l],d=n?.spriteVersionNumber===2?2:1,r=d===2?11:9,g=d===2&&l==="idle"&&Number.isInteger(a)?(a%16+16)%16:null,p=g==null?u.row:9+Math.floor(g/8),h=g==null?null:g%8,m=V(),k=T(),[y,b]=o.useState(0);o.useEffect(()=>{if(b(0),m||!k||g!=null)return;let S=!1,M=0;const x=E=>{M=window.setTimeout(()=>{if(S)return;const $=(E+1)%u.durations.length;b($),x($)},u.durations[E])};return x(0),()=>{S=!0,window.clearTimeout(M)}},[g,m,k,u]);const R=o.useMemo(()=>({width:i*(192/208),height:i,backgroundImage:`url(${n?.assetUrl||`/pets/${c}/spritesheet.webp`})`,backgroundRepeat:"no-repeat",backgroundSize:`800% ${r*100}%`,backgroundPosition:`${(h??y)/7*100}% ${p/(r-1)*100}%`,imageRendering:"pixelated"}),[r,h,p,y,c,n?.assetUrl,i]);return w.jsx("div",{"aria-hidden":"true",className:`pet-atlas-animated ${s}`,style:R})}const j={"idle-living":"idle/living.svg","idle-doze":"idle/doze.svg","idle-follow":"idle/follow.svg","idle-look":"idle/look.svg","idle-yawn":"idle/yawn.svg","idle-collapse":"idle/collapse.svg","working-building":"working/building.svg","working-carrying":"working/carrying.svg","working-conducting":"working/conducting.svg","working-confused":"working/confused.svg","working-debugger":"working/debugger.svg","working-juggling":"working/juggling.svg","working-overheated":"working/overheated.svg","working-pushing":"working/pushing.svg","working-sweeping":"working/sweeping.svg","working-thinking":"working/thinking.svg","working-typing":"working/typing.svg","working-ultrathink":"working/ultrathink.svg","working-wizard":"working/wizard.svg","mini-alert":"mini/alert.svg","mini-crabwalk":"mini/crabwalk.svg","mini-enter":"mini/enter.svg","mini-enter-sleep":"mini/enter-sleep.svg","mini-happy":"mini/happy.svg","mini-idle":"mini/idle.svg","mini-peek":"mini/peek.svg","mini-sleep":"mini/sleep.svg","react-double":"react/double.svg","react-drag":"react/drag.svg","react-left":"react/left.svg","react-right":"react/right.svg","collapse-sleep":"sleep/collapse-sleep.svg",sleeping:"sleep/sleeping.svg",wake:"sleep/wake.svg",disconnected:"status/disconnected.svg",error:"status/error.svg",notification:"status/notification.svg",happy:"happy.svg","static-base":"static-base.svg"},f=new Map;async function I(e){if(f.has(e))return f.get(e);if(typeof fetch!="function")return null;let n;try{n=await fetch(`/clawd/${e}`)}catch{return null}if(!n.ok)return null;const i=(await n.text()).replace(/<svg([^>]*)>/,(s,a)=>`<svg${a.replace(/\s+width="[^"]*"/g,"").replace(/\s+height="[^"]*"/g,"")} width="100%" height="100%">`);return f.set(e,i),i}function P({state:e="idle-living",size:n=48,className:t=""}){const[i,s]=o.useState(""),a=o.useRef(null),l=H()?"static-base":e,u=j[l]||j["static-base"];return o.useEffect(()=>{let d=!1;return I(u).then(r=>{!d&&r&&s(r)}),()=>{d=!0}},[u]),o.useEffect(()=>{const d=a.current?.querySelector("svg");if(d)try{const r=d.getBBox();r.width>0&&r.height>0&&d.setAttribute("viewBox",`${r.x-2} ${r.y-2} ${r.width+4} ${r.height+4}`)}catch{}},[i]),w.jsx("div",{ref:a,"aria-hidden":"true",className:`clawd-animated ${t}`,style:{width:n,height:n,display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},dangerouslySetInnerHTML:{__html:i}})}function q({state:e="idle-living",size:n=48,className:t="",character:i="clawd",pet:s=null,lookDirectionIndex:a=null}){const c=v(i);return c!=="clawd"?w.jsx(_,{character:c,pet:s,state:e,size:n,className:t,lookDirectionIndex:a}):w.jsx(P,{state:e,size:n*C(c),className:t})}function H(){const[e,n]=o.useState(()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return o.useEffect(()=>{if(typeof window.matchMedia!="function")return;const t=window.matchMedia("(prefers-reduced-motion: reduce)"),i=s=>n(s.matches);return t.addEventListener("change",i),()=>t.removeEventListener("change",i)},[]),e}export{q as C,v as n};
1
+ import{r as o,j as w}from"./main-hXifO_Tp.js";function v(e){const n=String(e||"").trim().toLowerCase();return/^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/.test(n)?n:"clawd"}const A=.84;function C(e){return v(e)==="clawd"?A:1}const L={idle:{row:0,durations:[280,110,110,140,140,320]},"running-right":{row:1,durations:[120,120,120,120,120,120,120,220]},"running-left":{row:2,durations:[120,120,120,120,120,120,120,220]},waving:{row:3,durations:[140,140,140,280]},jumping:{row:4,durations:[140,140,140,140,280]},failed:{row:5,durations:[140,140,140,140,140,140,140,240]},waiting:{row:6,durations:[150,150,150,150,150,260]},running:{row:7,durations:[120,120,120,120,120,220]},review:{row:8,durations:[150,150,150,150,150,280]}};function z(e){return["error","disconnected","working-overheated"].includes(e)?"failed":["happy","waking","mini-happy","jumping"].includes(e)?"jumping":["working-typing","working-ultrathink","working-juggling","running"].includes(e)?"running":["working-thinking","working-wizard","review"].includes(e)?"review":["sleeping","idle-doze","mini-sleep","waiting"].includes(e)?"waiting":["mini-peek","waving"].includes(e)?"waving":e==="running-left"||e==="running-right"?e:"idle"}function T(){const[e,n]=o.useState(()=>typeof document>"u"?!0:document.visibilityState!=="hidden");return o.useEffect(()=>{if(typeof document>"u")return;const t=()=>n(document.visibilityState!=="hidden");return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e}function V(){const[e,n]=o.useState(()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return o.useEffect(()=>{if(typeof window.matchMedia!="function")return;const t=window.matchMedia("(prefers-reduced-motion: reduce)"),i=s=>n(s.matches);return t.addEventListener("change",i),()=>t.removeEventListener("change",i)},[]),e}function _({character:e,pet:n=null,state:t="idle-living",size:i=48,className:s="",lookDirectionIndex:a=null}){const c=v(e),l=z(t),u=L[l],d=n?.spriteVersionNumber===2?2:1,r=d===2?11:9,g=d===2&&l==="idle"&&Number.isInteger(a)?(a%16+16)%16:null,p=g==null?u.row:9+Math.floor(g/8),h=g==null?null:g%8,m=V(),k=T(),[y,b]=o.useState(0);o.useEffect(()=>{if(b(0),m||!k||g!=null)return;let S=!1,M=0;const x=E=>{M=window.setTimeout(()=>{if(S)return;const $=(E+1)%u.durations.length;b($),x($)},u.durations[E])};return x(0),()=>{S=!0,window.clearTimeout(M)}},[g,m,k,u]);const R=o.useMemo(()=>({width:i*(192/208),height:i,backgroundImage:`url(${n?.assetUrl||`/pets/${c}/spritesheet.webp`})`,backgroundRepeat:"no-repeat",backgroundSize:`800% ${r*100}%`,backgroundPosition:`${(h??y)/7*100}% ${p/(r-1)*100}%`,imageRendering:"pixelated"}),[r,h,p,y,c,n?.assetUrl,i]);return w.jsx("div",{"aria-hidden":"true",className:`pet-atlas-animated ${s}`,style:R})}const j={"idle-living":"idle/living.svg","idle-doze":"idle/doze.svg","idle-follow":"idle/follow.svg","idle-look":"idle/look.svg","idle-yawn":"idle/yawn.svg","idle-collapse":"idle/collapse.svg","working-building":"working/building.svg","working-carrying":"working/carrying.svg","working-conducting":"working/conducting.svg","working-confused":"working/confused.svg","working-debugger":"working/debugger.svg","working-juggling":"working/juggling.svg","working-overheated":"working/overheated.svg","working-pushing":"working/pushing.svg","working-sweeping":"working/sweeping.svg","working-thinking":"working/thinking.svg","working-typing":"working/typing.svg","working-ultrathink":"working/ultrathink.svg","working-wizard":"working/wizard.svg","mini-alert":"mini/alert.svg","mini-crabwalk":"mini/crabwalk.svg","mini-enter":"mini/enter.svg","mini-enter-sleep":"mini/enter-sleep.svg","mini-happy":"mini/happy.svg","mini-idle":"mini/idle.svg","mini-peek":"mini/peek.svg","mini-sleep":"mini/sleep.svg","react-double":"react/double.svg","react-drag":"react/drag.svg","react-left":"react/left.svg","react-right":"react/right.svg","collapse-sleep":"sleep/collapse-sleep.svg",sleeping:"sleep/sleeping.svg",wake:"sleep/wake.svg",disconnected:"status/disconnected.svg",error:"status/error.svg",notification:"status/notification.svg",happy:"happy.svg","static-base":"static-base.svg"},f=new Map;async function I(e){if(f.has(e))return f.get(e);if(typeof fetch!="function")return null;let n;try{n=await fetch(`/clawd/${e}`)}catch{return null}if(!n.ok)return null;const i=(await n.text()).replace(/<svg([^>]*)>/,(s,a)=>`<svg${a.replace(/\s+width="[^"]*"/g,"").replace(/\s+height="[^"]*"/g,"")} width="100%" height="100%">`);return f.set(e,i),i}function P({state:e="idle-living",size:n=48,className:t=""}){const[i,s]=o.useState(""),a=o.useRef(null),l=H()?"static-base":e,u=j[l]||j["static-base"];return o.useEffect(()=>{let d=!1;return I(u).then(r=>{!d&&r&&s(r)}),()=>{d=!0}},[u]),o.useEffect(()=>{const d=a.current?.querySelector("svg");if(d)try{const r=d.getBBox();r.width>0&&r.height>0&&d.setAttribute("viewBox",`${r.x-2} ${r.y-2} ${r.width+4} ${r.height+4}`)}catch{}},[i]),w.jsx("div",{ref:a,"aria-hidden":"true",className:`clawd-animated ${t}`,style:{width:n,height:n,display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},dangerouslySetInnerHTML:{__html:i}})}function q({state:e="idle-living",size:n=48,className:t="",character:i="clawd",pet:s=null,lookDirectionIndex:a=null}){const c=v(i);return c!=="clawd"?w.jsx(_,{character:c,pet:s,state:e,size:n,className:t,lookDirectionIndex:a}):w.jsx(P,{state:e,size:n*C(c),className:t})}function H(){const[e,n]=o.useState(()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return o.useEffect(()=>{if(typeof window.matchMedia!="function")return;const t=window.matchMedia("(prefers-reduced-motion: reduce)"),i=s=>n(s.matches);return t.addEventListener("change",i),()=>t.removeEventListener("change",i)},[]),e}export{q as C,v as n};
@@ -1 +1 @@
1
- import{j as a,X as y,E as e,S as b}from"./main-CvkyGV2H.js";import{f as d}from"./format-tokens-B8_mvUxn.js";import{D as h,a as f,b as v,c as k,d as N,e as j}from"./DialogTitle-B-NMBFgN.js";import{D}from"./DialogClose-ucUXpI-0.js";import{D as w}from"./DialogDescription-CIldLoYo.js";import"./useScrollLock-juP-sEAK.js";const E=1.75,M=[[/claude|fable|opus|sonnet|haiku/,{provider:"CLAUDE",color:"#d97757"}],[/gpt|codex|o3|o4/,{provider:"CODEX",color:"#3b82f6"}],[/gemini/,{provider:"GEMINI",color:"#2196f3"}],[/composer|cursor/,{provider:"CURSOR",color:"#10b981"}],[/kimi/,{provider:"KIMI",color:"#a78bfa"}],[/mimo/,{provider:"MIMO",color:"#ff6900"}],[/copilot/,{provider:"COPILOT",color:"#6366f1"}],[/kiro/,{provider:"KIRO",color:"#6366f1"}],[/grok/,{provider:"GROK",color:"#f43f5e"}],[/deepseek/,{provider:"DEEPSEEK",color:"#4D6BFE"}],[/glm/,{provider:"ZCODE",color:"#14b8a6"}],[/hy3/,{provider:"WORKBUDDY",color:"#0ea5e9"}],[/minimax/,{provider:"MINIMAX",color:"#f59e0b"}]];function S(i){const l=(i||"").toLowerCase(),t=M.find(([o])=>o.test(l));return t?t[1]:{provider:"",color:"#9ca3af"}}function c({label:i,value:l,title:t,className:o=""}){return a.jsxs("div",{className:`flex min-w-0 flex-col gap-1.5 ${o}`,title:t,children:[a.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-oai-gray-400 dark:text-oai-gray-500",children:i}),a.jsx("span",{className:"truncate text-2xl font-semibold leading-none tracking-tight text-oai-black dark:text-white tabular-nums",children:l})]})}function U({isOpen:i,onClose:l,communityStats:t}){if(!t||t.status!=="ready")return null;const o=Number(t.tokenFloor)||0,m=Number(t.totalEntries)||0,x=o/1e6*E,s=Array.isArray(t.topModels)?t.topModels.slice(0,10):[],u=s.reduce((r,n)=>Math.max(r,Number(n.share)||0),0)||1;return a.jsx(h,{open:i,onOpenChange:r=>!r&&l(),children:a.jsxs(f,{children:[a.jsx(v,{className:"fixed inset-0 z-[100] bg-black/40 backdrop-blur-[2px] transition-opacity duration-200 ease-out data-[ending-style]:opacity-0 data-[starting-style]:opacity-0"}),a.jsx(k,{className:"fixed inset-0 z-[101] flex items-center justify-center p-4",children:a.jsxs(N,{className:"relative flex w-full max-w-md flex-col gap-5 max-h-[85vh] overflow-y-auto rounded-2xl bg-white p-6 shadow-2xl ring-1 ring-oai-gray-200 transition-[opacity,transform] duration-[220ms] ease-[cubic-bezier(0.16,1,0.3,1)] data-[ending-style]:translate-y-2 data-[ending-style]:scale-[0.96] data-[ending-style]:opacity-0 data-[starting-style]:translate-y-2 data-[starting-style]:scale-[0.96] data-[starting-style]:opacity-0 dark:bg-oai-gray-900 dark:ring-oai-gray-800",children:[a.jsx(D,{className:"absolute top-4 right-4 p-1.5 rounded-lg text-oai-gray-400 dark:text-oai-gray-500 hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white transition-colors cursor-pointer","aria-label":e("shared.dialog.close"),children:a.jsx(y,{className:"size-4"})}),a.jsxs("div",{className:"pr-8",children:[a.jsx(j,{className:"text-lg font-bold tracking-tight text-oai-black dark:text-white",children:e("leaderboard.community.modal.title")}),a.jsx(w,{className:"mt-1 text-xs text-oai-gray-400 dark:text-oai-gray-500",children:e("leaderboard.community.modal.description")})]}),a.jsxs("div",{className:"grid grid-cols-3 divide-x divide-oai-gray-100 border-y border-oai-gray-100 py-4 dark:divide-oai-gray-800/80 dark:border-oai-gray-800/80",children:[a.jsx(c,{className:"pr-4",label:e("leaderboard.community.modal.total_tokens"),value:d(o),title:e("leaderboard.community.modal.tokens_title",{count:o.toLocaleString("en-US")})}),a.jsx(c,{className:"px-4",label:e("leaderboard.community.modal.active_devs"),value:m.toLocaleString("en-US"),title:e("leaderboard.community.modal.active_devs_detail",{count:m.toLocaleString("en-US")})}),a.jsx(c,{className:"pl-4",label:e("leaderboard.community.modal.global_spend"),value:`$${d(x)}`,title:e("leaderboard.community.modal.global_spend_detail",{amount:Math.round(x).toLocaleString("en-US")})})]}),s.length>0&&a.jsxs("div",{className:"flex flex-col gap-2",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-oai-gray-400 dark:text-oai-gray-500",children:e("leaderboard.community.modal.top_models")}),a.jsx("span",{className:"text-[10px] text-oai-gray-400 dark:text-oai-gray-500",children:e("leaderboard.community.modal.all_time")})]}),a.jsx("div",{className:"flex flex-col gap-0.5",children:s.map((r,n)=>{const p=S(r.name),g=Number(r.share)||0;return a.jsxs("div",{className:"relative flex h-9 items-center gap-2.5 overflow-hidden px-2.5",children:[a.jsx("div",{className:"absolute inset-y-0 left-0",style:{width:`${Math.max(g/u*100,2)}%`,backgroundColor:`${p.color}24`},"aria-hidden":"true"}),a.jsx("span",{className:"relative w-4 shrink-0 text-right font-mono text-[11px] text-oai-gray-400 dark:text-oai-gray-500 tabular-nums",children:n+1}),a.jsx(b,{provider:p.provider,size:15,className:"relative shrink-0 text-oai-gray-500 dark:text-oai-gray-400"}),a.jsx("span",{className:"relative min-w-0 flex-1 truncate text-[13px] font-medium text-oai-gray-700 dark:text-oai-gray-200",title:r.name,children:r.name}),a.jsx("span",{className:"relative shrink-0 text-xs font-semibold text-oai-black dark:text-white tabular-nums",title:e("leaderboard.community.modal.tokens_title",{count:Number(r.tokens).toLocaleString("en-US")}),children:d(r.tokens)}),a.jsxs("span",{className:"relative w-11 shrink-0 text-right text-[11px] text-oai-gray-400 dark:text-oai-gray-500 tabular-nums",children:[g,"%"]})]},r.name)})})]}),a.jsx("p",{className:"text-[11px] leading-normal text-oai-gray-400 dark:text-oai-gray-500",children:e("leaderboard.community.modal.note")})]})})]})})}export{U as CommunityStatsModal};
1
+ import{j as a,X as y,E as e,S as b}from"./main-hXifO_Tp.js";import{f as d}from"./format-tokens-BuWmqFvA.js";import{D as h,a as f,b as v,c as k,d as N,e as j}from"./DialogTitle-DwbiXVxh.js";import{D}from"./DialogClose-RhHDM3jn.js";import{D as w}from"./DialogDescription-ozWESnQP.js";import"./useScrollLock-DP7SL29Q.js";const E=1.75,M=[[/claude|fable|opus|sonnet|haiku/,{provider:"CLAUDE",color:"#d97757"}],[/gpt|codex|o3|o4/,{provider:"CODEX",color:"#3b82f6"}],[/gemini/,{provider:"GEMINI",color:"#2196f3"}],[/composer|cursor/,{provider:"CURSOR",color:"#10b981"}],[/kimi/,{provider:"KIMI",color:"#a78bfa"}],[/mimo/,{provider:"MIMO",color:"#ff6900"}],[/copilot/,{provider:"COPILOT",color:"#6366f1"}],[/kiro/,{provider:"KIRO",color:"#6366f1"}],[/grok/,{provider:"GROK",color:"#f43f5e"}],[/deepseek/,{provider:"DEEPSEEK",color:"#4D6BFE"}],[/glm/,{provider:"ZCODE",color:"#14b8a6"}],[/hy3/,{provider:"WORKBUDDY",color:"#0ea5e9"}],[/minimax/,{provider:"MINIMAX",color:"#f59e0b"}]];function S(i){const l=(i||"").toLowerCase(),t=M.find(([o])=>o.test(l));return t?t[1]:{provider:"",color:"#9ca3af"}}function c({label:i,value:l,title:t,className:o=""}){return a.jsxs("div",{className:`flex min-w-0 flex-col gap-1.5 ${o}`,title:t,children:[a.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-oai-gray-400 dark:text-oai-gray-500",children:i}),a.jsx("span",{className:"truncate text-2xl font-semibold leading-none tracking-tight text-oai-black dark:text-white tabular-nums",children:l})]})}function U({isOpen:i,onClose:l,communityStats:t}){if(!t||t.status!=="ready")return null;const o=Number(t.tokenFloor)||0,m=Number(t.totalEntries)||0,x=o/1e6*E,s=Array.isArray(t.topModels)?t.topModels.slice(0,10):[],u=s.reduce((r,n)=>Math.max(r,Number(n.share)||0),0)||1;return a.jsx(h,{open:i,onOpenChange:r=>!r&&l(),children:a.jsxs(f,{children:[a.jsx(v,{className:"fixed inset-0 z-[100] bg-black/40 backdrop-blur-[2px] transition-opacity duration-200 ease-out data-[ending-style]:opacity-0 data-[starting-style]:opacity-0"}),a.jsx(k,{className:"fixed inset-0 z-[101] flex items-center justify-center p-4",children:a.jsxs(N,{className:"relative flex w-full max-w-md flex-col gap-5 max-h-[85vh] overflow-y-auto rounded-2xl bg-white p-6 shadow-2xl ring-1 ring-oai-gray-200 transition-[opacity,transform] duration-[220ms] ease-[cubic-bezier(0.16,1,0.3,1)] data-[ending-style]:translate-y-2 data-[ending-style]:scale-[0.96] data-[ending-style]:opacity-0 data-[starting-style]:translate-y-2 data-[starting-style]:scale-[0.96] data-[starting-style]:opacity-0 dark:bg-oai-gray-900 dark:ring-oai-gray-800",children:[a.jsx(D,{className:"absolute top-4 right-4 p-1.5 rounded-lg text-oai-gray-400 dark:text-oai-gray-500 hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white transition-colors cursor-pointer","aria-label":e("shared.dialog.close"),children:a.jsx(y,{className:"size-4"})}),a.jsxs("div",{className:"pr-8",children:[a.jsx(j,{className:"text-lg font-bold tracking-tight text-oai-black dark:text-white",children:e("leaderboard.community.modal.title")}),a.jsx(w,{className:"mt-1 text-xs text-oai-gray-400 dark:text-oai-gray-500",children:e("leaderboard.community.modal.description")})]}),a.jsxs("div",{className:"grid grid-cols-3 divide-x divide-oai-gray-100 border-y border-oai-gray-100 py-4 dark:divide-oai-gray-800/80 dark:border-oai-gray-800/80",children:[a.jsx(c,{className:"pr-4",label:e("leaderboard.community.modal.total_tokens"),value:d(o),title:e("leaderboard.community.modal.tokens_title",{count:o.toLocaleString("en-US")})}),a.jsx(c,{className:"px-4",label:e("leaderboard.community.modal.active_devs"),value:m.toLocaleString("en-US"),title:e("leaderboard.community.modal.active_devs_detail",{count:m.toLocaleString("en-US")})}),a.jsx(c,{className:"pl-4",label:e("leaderboard.community.modal.global_spend"),value:`$${d(x)}`,title:e("leaderboard.community.modal.global_spend_detail",{amount:Math.round(x).toLocaleString("en-US")})})]}),s.length>0&&a.jsxs("div",{className:"flex flex-col gap-2",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-oai-gray-400 dark:text-oai-gray-500",children:e("leaderboard.community.modal.top_models")}),a.jsx("span",{className:"text-[10px] text-oai-gray-400 dark:text-oai-gray-500",children:e("leaderboard.community.modal.all_time")})]}),a.jsx("div",{className:"flex flex-col gap-0.5",children:s.map((r,n)=>{const p=S(r.name),g=Number(r.share)||0;return a.jsxs("div",{className:"relative flex h-9 items-center gap-2.5 overflow-hidden px-2.5",children:[a.jsx("div",{className:"absolute inset-y-0 left-0",style:{width:`${Math.max(g/u*100,2)}%`,backgroundColor:`${p.color}24`},"aria-hidden":"true"}),a.jsx("span",{className:"relative w-4 shrink-0 text-right font-mono text-[11px] text-oai-gray-400 dark:text-oai-gray-500 tabular-nums",children:n+1}),a.jsx(b,{provider:p.provider,size:15,className:"relative shrink-0 text-oai-gray-500 dark:text-oai-gray-400"}),a.jsx("span",{className:"relative min-w-0 flex-1 truncate text-[13px] font-medium text-oai-gray-700 dark:text-oai-gray-200",title:r.name,children:r.name}),a.jsx("span",{className:"relative shrink-0 text-xs font-semibold text-oai-black dark:text-white tabular-nums",title:e("leaderboard.community.modal.tokens_title",{count:Number(r.tokens).toLocaleString("en-US")}),children:d(r.tokens)}),a.jsxs("span",{className:"relative w-11 shrink-0 text-right text-[11px] text-oai-gray-400 dark:text-oai-gray-500 tabular-nums",children:[g,"%"]})]},r.name)})})]}),a.jsx("p",{className:"text-[11px] leading-normal text-oai-gray-400 dark:text-oai-gray-500",children:e("leaderboard.community.modal.note")})]})})]})})}export{U as CommunityStatsModal};
@@ -1 +1 @@
1
- import{j as a,N as i,P as x}from"./main-CvkyGV2H.js";import{D as p,a as m,b as y,c as b,d as f,e as u}from"./DialogTitle-B-NMBFgN.js";import{D as h}from"./DialogDescription-CIldLoYo.js";function N({open:r,title:l,description:t,confirmLabel:o,cancelLabel:n,destructive:d=!1,busy:e=!1,onConfirm:c,onCancel:s}){return a.jsx(p,{open:r,onOpenChange:g=>{!g&&!e&&s?.()},children:a.jsxs(m,{children:[a.jsx(y,{className:"fixed inset-0 z-[100] bg-black/40 backdrop-blur-[2px] transition-opacity duration-200 ease-out data-[ending-style]:opacity-0 data-[starting-style]:opacity-0"}),a.jsx(b,{className:"fixed inset-0 z-[101] flex items-center justify-center p-4",children:a.jsxs(f,{className:"relative w-full max-w-md rounded-2xl bg-white p-6 shadow-[0_20px_60px_-20px_rgba(0,0,0,0.25)] ring-1 ring-oai-gray-200 transition-[opacity,transform] duration-[220ms] ease-[cubic-bezier(0.16,1,0.3,1)] data-[ending-style]:translate-y-2 data-[ending-style]:scale-[0.96] data-[ending-style]:opacity-0 data-[starting-style]:translate-y-2 data-[starting-style]:scale-[0.96] data-[starting-style]:opacity-0 dark:bg-oai-gray-950 dark:shadow-[0_20px_60px_-10px_rgba(0,0,0,0.65)] dark:ring-oai-gray-800",children:[a.jsx(u,{className:"text-base font-semibold text-oai-black dark:text-white",children:l}),t?a.jsx(h,{className:"mt-2 text-sm leading-6 text-oai-gray-600 dark:text-oai-gray-300",children:t}):null,a.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[a.jsx(i,{type:"button",variant:"secondary",size:"sm",disabled:e,onClick:()=>s?.(),children:n}),a.jsx(i,{type:"button",size:"sm",disabled:e,onClick:()=>c?.(),className:x(d&&"!bg-red-600 hover:!bg-red-700 focus-visible:!outline-red-600 dark:!bg-red-600 dark:hover:!bg-red-500"),children:o})]})]})})]})})}export{N as C};
1
+ import{j as a,N as i,P as x}from"./main-hXifO_Tp.js";import{D as p,a as m,b as y,c as b,d as f,e as u}from"./DialogTitle-DwbiXVxh.js";import{D as h}from"./DialogDescription-ozWESnQP.js";function N({open:r,title:l,description:t,confirmLabel:o,cancelLabel:n,destructive:d=!1,busy:e=!1,onConfirm:c,onCancel:s}){return a.jsx(p,{open:r,onOpenChange:g=>{!g&&!e&&s?.()},children:a.jsxs(m,{children:[a.jsx(y,{className:"fixed inset-0 z-[100] bg-black/40 backdrop-blur-[2px] transition-opacity duration-200 ease-out data-[ending-style]:opacity-0 data-[starting-style]:opacity-0"}),a.jsx(b,{className:"fixed inset-0 z-[101] flex items-center justify-center p-4",children:a.jsxs(f,{className:"relative w-full max-w-md rounded-2xl bg-white p-6 shadow-[0_20px_60px_-20px_rgba(0,0,0,0.25)] ring-1 ring-oai-gray-200 transition-[opacity,transform] duration-[220ms] ease-[cubic-bezier(0.16,1,0.3,1)] data-[ending-style]:translate-y-2 data-[ending-style]:scale-[0.96] data-[ending-style]:opacity-0 data-[starting-style]:translate-y-2 data-[starting-style]:scale-[0.96] data-[starting-style]:opacity-0 dark:bg-oai-gray-950 dark:shadow-[0_20px_60px_-10px_rgba(0,0,0,0.65)] dark:ring-oai-gray-800",children:[a.jsx(u,{className:"text-base font-semibold text-oai-black dark:text-white",children:l}),t?a.jsx(h,{className:"mt-2 text-sm leading-6 text-oai-gray-600 dark:text-oai-gray-300",children:t}):null,a.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[a.jsx(i,{type:"button",variant:"secondary",size:"sm",disabled:e,onClick:()=>s?.(),children:n}),a.jsx(i,{type:"button",size:"sm",disabled:e,onClick:()=>c?.(),className:x(d&&"!bg-red-600 hover:!bg-red-700 focus-visible:!outline-red-600 dark:!bg-red-600 dark:hover:!bg-red-500"),children:o})]})]})})]})})}export{N as C};
@@ -1 +1 @@
1
- import{j as a,P as n}from"./main-CvkyGV2H.js";import{C as c}from"./Card-DKUa4bFg.js";function g({checked:e,onChange:i,disabled:r,ariaLabel:s}){return a.jsx("button",{type:"button",role:"switch","aria-checked":e,"aria-label":s,onClick:i,disabled:r,className:n("relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 disabled:opacity-50 disabled:cursor-not-allowed",e?"bg-oai-brand-500":"bg-oai-gray-300 dark:bg-oai-gray-700"),children:a.jsx("span",{className:n("inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",e?"translate-x-[18px]":"translate-x-[3px]")})})}function u({label:e,hint:i,control:r}){return a.jsxs("div",{className:"flex items-center justify-between gap-4 py-3",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"text-sm text-oai-gray-900 dark:text-oai-gray-200",children:e}),i?a.jsx("div",{className:"mt-0.5 text-xs text-oai-gray-500 dark:text-oai-gray-400",children:i}):null]}),a.jsx("div",{className:"shrink-0",children:r})]})}function b({title:e,subtitle:i,action:r,children:s}){return a.jsxs(c,{children:[a.jsxs("div",{className:"mb-3 flex items-start justify-between gap-4",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("h2",{className:"text-sm font-medium text-oai-gray-500 dark:text-oai-gray-300 uppercase tracking-wide",children:e}),i?a.jsx("p",{className:"mt-1 truncate text-xs text-oai-gray-500 dark:text-oai-gray-400",children:i}):null]}),r?a.jsx("div",{className:"shrink-0",children:r}):null]}),a.jsx("div",{className:"-mb-3 divide-y divide-oai-gray-200/60 dark:divide-oai-gray-800/60",children:s})]})}function h({options:e,value:i,onChange:r,disabled:s=!1}){return a.jsx("div",{className:"inline-flex items-center rounded-lg border border-oai-gray-200 bg-oai-gray-50 p-0.5 dark:border-oai-gray-800 dark:bg-oai-gray-900",children:e.map(({value:t,label:o,Icon:l})=>{const d=i===t;return a.jsxs("button",{type:"button",onClick:()=>r(t),"aria-pressed":d,disabled:s,className:n("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50",d?"bg-white text-oai-black shadow-sm dark:bg-oai-gray-800 dark:text-white":"text-oai-gray-500 hover:text-oai-black dark:text-oai-gray-400 dark:hover:text-white"),children:[l?a.jsx(l,{className:"h-3.5 w-3.5","aria-hidden":!0}):null,a.jsx("span",{children:o})]},t)})})}export{b as S,g as T,u as a,h as b};
1
+ import{j as a,P as n}from"./main-hXifO_Tp.js";import{C as c}from"./Card-CmemgZ8c.js";function g({checked:e,onChange:i,disabled:r,ariaLabel:s}){return a.jsx("button",{type:"button",role:"switch","aria-checked":e,"aria-label":s,onClick:i,disabled:r,className:n("relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 disabled:opacity-50 disabled:cursor-not-allowed",e?"bg-oai-brand-500":"bg-oai-gray-300 dark:bg-oai-gray-700"),children:a.jsx("span",{className:n("inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",e?"translate-x-[18px]":"translate-x-[3px]")})})}function u({label:e,hint:i,control:r}){return a.jsxs("div",{className:"flex items-center justify-between gap-4 py-3",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"text-sm text-oai-gray-900 dark:text-oai-gray-200",children:e}),i?a.jsx("div",{className:"mt-0.5 text-xs text-oai-gray-500 dark:text-oai-gray-400",children:i}):null]}),a.jsx("div",{className:"shrink-0",children:r})]})}function b({title:e,subtitle:i,action:r,children:s}){return a.jsxs(c,{children:[a.jsxs("div",{className:"mb-3 flex items-start justify-between gap-4",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("h2",{className:"text-sm font-medium text-oai-gray-500 dark:text-oai-gray-300 uppercase tracking-wide",children:e}),i?a.jsx("p",{className:"mt-1 truncate text-xs text-oai-gray-500 dark:text-oai-gray-400",children:i}):null]}),r?a.jsx("div",{className:"shrink-0",children:r}):null]}),a.jsx("div",{className:"-mb-3 divide-y divide-oai-gray-200/60 dark:divide-oai-gray-800/60",children:s})]})}function h({options:e,value:i,onChange:r,disabled:s=!1}){return a.jsx("div",{className:"inline-flex items-center rounded-lg border border-oai-gray-200 bg-oai-gray-50 p-0.5 dark:border-oai-gray-800 dark:bg-oai-gray-900",children:e.map(({value:t,label:o,Icon:l})=>{const d=i===t;return a.jsxs("button",{type:"button",onClick:()=>r(t),"aria-pressed":d,disabled:s,className:n("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50",d?"bg-white text-oai-black shadow-sm dark:bg-oai-gray-800 dark:text-white":"text-oai-gray-500 hover:text-oai-black dark:text-oai-gray-400 dark:hover:text-white"),children:[l?a.jsx(l,{className:"h-3.5 w-3.5","aria-hidden":!0}):null,a.jsx("span",{children:o})]},t)})})}export{b as S,g as T,u as a,h as b};