@roastcodes/ttdash 6.2.2 → 6.2.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 (58) hide show
  1. package/dist/assets/AnimatedBarFill-DFAXO-3i.js +1 -0
  2. package/dist/assets/{AnomalyDetection-D06kgR_V.js → AnomalyDetection-DKM--5-J.js} +1 -1
  3. package/dist/assets/{AutoImportModal-CuzbrUVc.js → AutoImportModal-Cqefa6n_.js} +1 -1
  4. package/dist/assets/{CacheROI-fJ1paHaT.js → CacheROI-BLADEjtP.js} +1 -1
  5. package/dist/assets/{ChartCard-CS4Kbe6r.js → ChartCard-DxxB4rGm.js} +2 -2
  6. package/dist/assets/{ChartLegend-Vzg_GmF-.js → ChartLegend-Vpk95i3r.js} +1 -1
  7. package/dist/assets/{CorrelationAnalysis-DX-ZQKVJ.js → CorrelationAnalysis-CI9eGa8R.js} +1 -1
  8. package/dist/assets/{CostByModelOverTime-BRo1PCRo.js → CostByModelOverTime-BDvnsdLO.js} +1 -1
  9. package/dist/assets/{CostByWeekday-BJwEWkmF.js → CostByWeekday-BPU1qW5f.js} +1 -1
  10. package/dist/assets/{CostForecast-BxICbpzM.js → CostForecast-fwd7SRIn.js} +1 -1
  11. package/dist/assets/{CumulativeCost-BdlOTRDX.js → CumulativeCost-CwiklwFD.js} +1 -1
  12. package/dist/assets/{CustomTooltip-CEd8U-a3.js → CustomTooltip-CfoUDPbT.js} +1 -1
  13. package/dist/assets/{DistributionAnalysis-Cw8bRtt9.js → DistributionAnalysis-B8pjQMNj.js} +1 -1
  14. package/dist/assets/DrillDownModal-kczVCwfa.js +1 -0
  15. package/dist/assets/{HelpPanel-Ct4CbfBg.js → HelpPanel-D4zNwrI2.js} +1 -1
  16. package/dist/assets/{InfoButton-CyA48Vlx.js → InfoButton-BGjUQfHz.js} +1 -1
  17. package/dist/assets/InfoHeading-BxLyydv8.js +1 -0
  18. package/dist/assets/{MetricCard-CLFpH1l1.js → MetricCard-r_uhdKDU.js} +1 -1
  19. package/dist/assets/{ModelEfficiency-CO7sQQnT.js → ModelEfficiency-Di3fDAn7.js} +1 -1
  20. package/dist/assets/{ModelMix-C4P2SpQZ.js → ModelMix-BgCzWf9V.js} +1 -1
  21. package/dist/assets/{PeriodComparison-BogfA2IN.js → PeriodComparison-BIoF7n2v.js} +1 -1
  22. package/dist/assets/{ProviderEfficiency-CY4HJ7Fy.js → ProviderEfficiency-BFUYfBkW.js} +1 -1
  23. package/dist/assets/{ProviderLimitsSection-BcCrH2XG.js → ProviderLimitsSection-BxaczEFO.js} +1 -1
  24. package/dist/assets/{RecentDays-K0Uzk7UU.js → RecentDays-Bac6HOtv.js} +1 -1
  25. package/dist/assets/{RequestCacheHitRateByModel-8ip50S7V.js → RequestCacheHitRateByModel-DD2j4dXY.js} +1 -1
  26. package/dist/assets/{RequestQuality-ByYXyzn8.js → RequestQuality-CUy5BQzj.js} +1 -1
  27. package/dist/assets/{RequestsOverTime-B4yB-x_5.js → RequestsOverTime-Bv3riiRF.js} +1 -1
  28. package/dist/assets/SettingsModal-4uENZ87D.js +1 -0
  29. package/dist/assets/{TokenEfficiency-Bhdj4v75.js → TokenEfficiency-6dfn-4_1.js} +1 -1
  30. package/dist/assets/TokenTypes-Dx67irJb.js +1 -0
  31. package/dist/assets/{TokensOverTime-BA7W_OfG.js → TokensOverTime-C1858Oi-.js} +1 -1
  32. package/dist/assets/{app-settings-EFIYxqQU.js → app-settings-BInClAwB.js} +1 -1
  33. package/dist/assets/button-CRvPoJg9.js +1 -0
  34. package/dist/assets/card-B4CVYJDH.js +1 -0
  35. package/dist/assets/{constants-DOCA3QtR.js → constants-BDzjWFuU.js} +1 -1
  36. package/dist/assets/{dialog-D4LfH66U.js → dialog-Djogwk0C.js} +1 -1
  37. package/dist/assets/{formatted-value-DuGw8WPX.js → formatted-value-CpLoDrYF.js} +1 -1
  38. package/dist/assets/{formatters-BzLLk0br.js → formatters-C7EouP6y.js} +1 -1
  39. package/dist/assets/{help-content-Cuf5l3_6.js → help-content-B2N8SHIE.js} +1 -1
  40. package/dist/assets/{i18n-D1WJ4-W9.js → i18n-BS3-GJaA.js} +1 -1
  41. package/dist/assets/{index-D6_2fCBR.js → index-C59tb1_V.js} +3 -3
  42. package/dist/assets/{motion-vendor-BNFhNARW.js → motion-vendor-BNVN-Ktr.js} +1 -1
  43. package/dist/assets/{section-header-KpKzq-Qa.js → section-header-Dz0QIE6e.js} +1 -1
  44. package/dist/assets/{ui-vendor-DOI7LsxH.js → ui-vendor-C_SJC6eX.js} +1 -1
  45. package/dist/assets/useTranslation-0ThAx3Gl.js +1 -0
  46. package/dist/index.html +21 -21
  47. package/package.json +1 -1
  48. package/server.js +7 -0
  49. package/src/locales/de/common.json +9 -0
  50. package/src/locales/en/common.json +9 -0
  51. package/dist/assets/AnimatedBarFill-Da354-1y.js +0 -1
  52. package/dist/assets/DrillDownModal-BT2rFk_U.js +0 -1
  53. package/dist/assets/InfoHeading-CFbl45C9.js +0 -1
  54. package/dist/assets/SettingsModal-Badl8kHp.js +0 -1
  55. package/dist/assets/TokenTypes-CaVA8FXP.js +0 -1
  56. package/dist/assets/button-olcuyddH.js +0 -1
  57. package/dist/assets/card-CskYMXga.js +0 -1
  58. package/dist/assets/useTranslation-JH30oWEP.js +0 -1
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{_ as t,b as n,g as r,i,v as ee,w as a}from"./charts-vendor-CiBqdKXh.js";import{o}from"./motion-vendor-BNFhNARW.js";import{a as s,t as te}from"./useTranslation-JH30oWEP.js";import{d as c,i as ne,l,n as u,u as d}from"./formatters-BzLLk0br.js";import{U as re,W as ie}from"./icons-vendor-CIvT_-Pb.js";import{t as f}from"./button-olcuyddH.js";import{c as ae,i as p,r as oe,t as m}from"./model-utils-BIvGAFGz.js";import{a as se,i as ce,n as le,r as ue,t as de}from"./dialog-D4LfH66U.js";import{t as h}from"./formatted-value-DuGw8WPX.js";import{t as fe}from"./CustomTooltip-CEd8U-a3.js";var g=e(a()),_=o();function pe(e){return/^\d{4}$/.test(e)?`year`:/^\d{4}-\d{2}$/.test(e)?`month`:`day`}function v(e){return e.cacheReadTokens+e.cacheCreationTokens+e.inputTokens+e.outputTokens+e.thinkingTokens}function y(e,t){return t>0?e/(t/1e6):null}function b(e,t){return t>0?e/t:null}function x(e,t){if(t===null)return null;let n=e-t;return{absolute:n,percent:t===0?null:n/t*100}}function S(e,t,n=`–`){return e?e.absolute===0?`→ ${t(0)}`:`${e.absolute>0?`↑`:`↓`} ${t(Math.abs(e.absolute))}`:n}function C(e,t=`–`){return!e||e.percent===null?t:e.percent===0?`0.0%`:`${e.percent>0?`+`:``}${e.percent.toFixed(1)}%`}function me(e){if(!(e instanceof HTMLElement))return!1;let t=e.tagName;return e.isContentEditable||t===`INPUT`||t===`TEXTAREA`||t===`SELECT`}function he(e,t){return`${e}${t}`}function w({day:e,contextData:a=[],open:o,hasPrevious:w,hasNext:ge,currentIndex:_e,totalCount:ve,onPrevious:T,onNext:E,onClose:ye}){let{t:D}=te(),O=e?pe(e.date):`day`,k=(0,g.useMemo)(()=>[...a].sort((e,t)=>e.date.localeCompare(t.date)),[a]),A=(0,g.useMemo)(()=>e?k.findIndex(t=>t.date===e.date):-1,[e,k]),j=A>0?k[A-1]:null,M=A>0?k.slice(Math.max(0,A-7),A):[],N=w??A>0,P=ge??(A>=0&&A<k.length-1),be=_e??(A>=0?A+1:0),xe=ve??k.length,F=e?v(e):0,I=F>0,L=(0,g.useMemo)(()=>{if(!e)return[];let t=new Map;for(let n of e.modelBreakdowns){let e=ae(n.modelName),r=oe(n.modelName),i=t.get(e)??{provider:r,cost:0,tokens:0,input:0,output:0,cacheRead:0,cacheCreate:0,thinking:0,requests:0};i.cost+=n.cost,i.tokens+=n.inputTokens+n.outputTokens+n.cacheCreationTokens+n.cacheReadTokens+n.thinkingTokens,i.input+=n.inputTokens,i.output+=n.outputTokens,i.cacheRead+=n.cacheReadTokens,i.cacheCreate+=n.cacheCreationTokens,i.thinking+=n.thinkingTokens,i.requests+=n.requestCount,t.set(e,i)}return Array.from(t.entries()).map(([t,n])=>({name:t,...n,costShare:e.totalCost>0?n.cost/e.totalCost*100:0,tokenShare:F>0?n.tokens/F*100:0,costPerMillion:y(n.cost,n.tokens),costPerRequest:b(n.cost,n.requests),tokensPerRequest:b(n.tokens,n.requests)})).sort((e,t)=>t.cost-e.cost)},[e,F]),R=(0,g.useMemo)(()=>{let t=new Map;for(let e of L){let n=t.get(e.provider)??{cost:0,tokens:0,requests:0,activeModels:new Set};n.cost+=e.cost,n.tokens+=e.tokens,n.requests+=e.requests,n.activeModels.add(e.name),t.set(e.provider,n)}return Array.from(t.entries()).map(([t,n])=>({provider:t,cost:n.cost,tokens:n.tokens,requests:n.requests,activeModels:n.activeModels.size,costShare:e&&e.totalCost>0?n.cost/e.totalCost*100:0})).sort((e,t)=>t.cost-e.cost)},[e,L]);if(!e)return null;let z=L.map(e=>({name:e.name,value:e.cost})),Se=I?e.cacheReadTokens/F*100:0,B=b(F,e.requestCount),V=b(e.totalCost,e.requestCount),H=y(e.totalCost,F),U=e.requestCount>0||e.modelBreakdowns.some(e=>e.requestCount>0)||a.some(e=>e.requestCount>0),Ce=[...a].sort((e,t)=>t.totalCost-e.totalCost).findIndex(t=>t.date===e.date)+1,we=U?[...a].sort((e,t)=>t.requestCount-e.requestCount).findIndex(t=>t.date===e.date)+1:0,W=M.length>0?M.reduce((e,t)=>e+t.totalCost,0)/M.length:null,G=M.length>0?M.reduce((e,t)=>e+t.requestCount,0)/M.length:null,K=M.length>0?M.reduce((e,t)=>e+v(t),0)/M.length:null,q=M.length>0?y(M.reduce((e,t)=>e+t.totalCost,0),M.reduce((e,t)=>e+v(t),0)):null,J=he(M.length>0?M.length:7,D(`drillDown.windowUnit.${O}`)),Te=j?v(j):null,Y=j?y(j.totalCost,v(j)):null,X=L[0]??null,Z=U?L.reduce((e,t)=>!e||t.requests>e.requests?t:e,null):null,Q=L.reduce((e,t)=>!e||t.tokens>e.tokens?t:e,null),$=L.reduce((e,t)=>t.costPerMillion===null?e:!e||e.costPerMillion===null||t.costPerMillion>e.costPerMillion?t:e,null),Ee=e.totalCost>0?L.slice(0,3).reduce((e,t)=>e+t.cost,0)/e.totalCost*100:0,De=[{label:D(`common.tokens`),value:(0,_.jsx)(h,{value:F,type:`tokens`})},{label:`$/1M`,value:H===null?`–`:(0,_.jsx)(h,{value:H,type:`currency`})},{label:D(`common.requests`),value:(0,_.jsx)(h,{value:e.requestCount,type:`number`})},{label:D(`common.models`),value:l(L.length)},{label:D(`drillDown.activeProviders`),value:l(R.length)},{label:D(`drillDown.tokensPerRequest`),value:B===null?`–`:(0,_.jsx)(h,{value:B,type:`tokens`})},{label:D(`drillDown.costPerRequest`),value:V===null?`–`:(0,_.jsx)(h,{value:V,type:`currency`})},{label:D(`drillDown.cacheRate`),value:(0,_.jsx)(h,{value:Se,type:`percent`})},{label:D(`common.thinking`),value:(0,_.jsx)(h,{value:e.thinkingTokens,type:`tokens`})},{label:D(`drillDown.costRank`),value:Ce>0?`#${Ce}`:`–`},{label:D(`drillDown.requestRank`),value:we>0?`#${we}`:`–`},{label:D(`drillDown.coverage`),value:(e._aggregatedDays??1)>1?D(`drillDown.coverageDays`,{count:e._aggregatedDays??1}):D(`drillDown.singlePeriod`,{period:D(`periods.${O}`)})}],Oe=[{label:D(`drillDown.costVsPrevious`),primary:S(x(e.totalCost,j?.totalCost??null),u),secondary:C(x(e.totalCost,j?.totalCost??null))},{label:D(`drillDown.tokensVsPrevious`),primary:S(x(F,Te),c),secondary:C(x(F,Te))},{label:D(`drillDown.requestsVsPrevious`),primary:S(x(e.requestCount,j?.requestCount??null),e=>l(Math.round(e))),secondary:C(x(e.requestCount,j?.requestCount??null))},{label:D(`drillDown.costPerMillionVsAverageWindow`,{window:J}),primary:S(H===null?null:x(H,q),u),secondary:q===null?`–`:u(q)},{label:D(`drillDown.costVsAverageWindow`,{window:J}),primary:S(x(e.totalCost,W),u),secondary:W===null?`–`:u(W)},{label:D(`drillDown.requestsVsAverageWindow`,{window:J}),primary:S(x(e.requestCount,G),e=>l(Math.round(e))),secondary:G===null?`–`:l(Math.round(G))},{label:D(`drillDown.tokensVsAverageWindow`,{window:J}),primary:S(x(F,K),c),secondary:K===null?`–`:c(K)},{label:D(`drillDown.costPerMillionVsPrevious`),primary:S(H===null?null:x(H,Y),u),secondary:Y===null?`–`:u(Y)}],ke=[{id:`cacheRead`,value:e.cacheReadTokens,color:`hsl(160, 50%, 42%)`,label:D(`drillDown.tokenSegments.cacheRead`)},{id:`cacheWrite`,value:e.cacheCreationTokens,color:`hsl(262, 60%, 55%)`,label:D(`drillDown.tokenSegments.cacheWrite`)},{id:`input`,value:e.inputTokens,color:`hsl(340, 55%, 52%)`,label:D(`common.input`)},{id:`output`,value:e.outputTokens,color:`hsl(35, 80%, 52%)`,label:D(`common.output`)},{id:`thinking`,value:e.thinkingTokens,color:`hsl(12, 78%, 56%)`,label:D(`common.thinking`)}],Ae=[{label:D(`drillDown.topCostModel`),title:X?.name??`–`,value:X?d(X.costShare):`–`},{label:D(`drillDown.topRequestModel`),title:Z?.name??`–`,value:Z&&Z.requests>0?D(`drillDown.requestCountShort`,{count:Z.requests}):`–`},{label:D(`drillDown.topTokenModel`),title:Q?.name??`–`,value:Q?d(Q.tokenShare):`–`},{label:D(`drillDown.priciestPerMillionModel`),title:$?.name??`–`,value:$?.costPerMillion!==null&&$?.costPerMillion!==void 0?(0,_.jsx)(h,{value:$.costPerMillion,type:`currency`}):`–`},{label:D(`drillDown.topCostShare`),title:X?d(X.costShare):`–`,value:X?.provider??`–`},{label:D(`drillDown.topThreeCostShare`),title:d(Ee),value:D(`drillDown.modelCount`,{count:Math.min(L.length,3)})}],je=D(O===`day`?`drillDown.previousDay`:`drillDown.previousPeriod`),Me=D(O===`day`?`drillDown.nextDay`:`drillDown.nextPeriod`);return(0,_.jsx)(de,{open:o,onOpenChange:e=>!e&&ye(),children:(0,_.jsxs)(le,{className:`max-h-[85vh] max-w-5xl overflow-y-auto`,onKeyDown:e=>{e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||me(e.target)||(e.key===`ArrowLeft`&&N&&(e.preventDefault(),T?.()),e.key===`ArrowRight`&&P&&(e.preventDefault(),E?.()))},children:[(0,_.jsxs)(ce,{children:[(0,_.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,_.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,_.jsxs)(se,{children:[ne(e.date,`long`),` — `,u(e.totalCost)]}),(0,_.jsx)(ue,{children:D(`drillDown.description`,{periodType:D(`periods.${O}`)})})]}),(0,_.jsxs)(`div`,{className:`flex flex-col items-stretch gap-2 sm:items-end`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,_.jsxs)(f,{type:`button`,variant:`outline`,size:`sm`,onClick:T,disabled:!N,"aria-label":je,children:[(0,_.jsx)(ie,{className:`h-4 w-4`,"aria-hidden":`true`}),(0,_.jsx)(`span`,{children:je})]}),(0,_.jsxs)(f,{type:`button`,variant:`outline`,size:`sm`,onClick:E,disabled:!P,"aria-label":Me,children:[(0,_.jsx)(`span`,{children:Me}),(0,_.jsx)(re,{className:`h-4 w-4`,"aria-hidden":`true`})]})]}),(0,_.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs text-muted-foreground sm:justify-end`,children:[(0,_.jsx)(`span`,{children:D(`drillDown.position`,{current:be,total:xe})}),(0,_.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,_.jsx)(`span`,{children:D(`drillDown.keyboardHint`)})]})]})]}),(0,_.jsxs)(`div`,{className:`flex flex-wrap gap-2 pt-1 text-xs text-muted-foreground`,children:[(0,_.jsx)(`span`,{className:`rounded-full border border-border/60 bg-muted/20 px-2 py-1`,children:D(`drillDown.periodType`,{period:D(`periods.${O}`)})}),(e._aggregatedDays??1)>1&&(0,_.jsx)(`span`,{className:`rounded-full border border-border/60 bg-muted/20 px-2 py-1`,children:D(`drillDown.coverageDays`,{count:e._aggregatedDays??1})})]})]}),(0,_.jsxs)(`section`,{className:`space-y-3`,children:[(0,_.jsx)(`h3`,{className:`text-sm font-semibold`,children:D(`drillDown.overview`)}),(0,_.jsx)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-3 xl:grid-cols-6`,children:De.map(e=>(0,_.jsxs)(`div`,{className:`rounded-lg bg-muted/30 p-3 text-center`,children:[(0,_.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e.label}),(0,_.jsx)(`div`,{className:`mt-1 font-mono text-sm font-medium`,children:e.value})]},e.label))})]}),(0,_.jsxs)(`section`,{className:`space-y-3`,children:[(0,_.jsx)(`h3`,{className:`text-sm font-semibold`,children:D(`drillDown.benchmarks`)}),(0,_.jsx)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-4`,children:Oe.map(e=>(0,_.jsxs)(`div`,{className:`rounded-lg border border-border/50 bg-muted/15 px-3 py-2`,children:[(0,_.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e.label}),(0,_.jsx)(`div`,{className:`mt-1 font-medium`,children:e.primary}),(0,_.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:e.secondary})]},e.label))})]}),(0,_.jsxs)(`section`,{className:`space-y-3`,children:[(0,_.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,_.jsx)(`h3`,{className:`text-sm font-semibold`,children:D(`drillDown.modelBreakdown`)}),(0,_.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:D(`drillDown.modelCount`,{count:L.length})})]}),(0,_.jsxs)(`div`,{className:`grid grid-cols-1 gap-4 xl:grid-cols-[280px_minmax(0,1fr)]`,children:[(0,_.jsxs)(`div`,{className:`space-y-3`,children:[(0,_.jsx)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-3 xl:grid-cols-2`,children:Ae.map(e=>(0,_.jsxs)(`div`,{className:`rounded-lg border border-border/50 bg-muted/15 px-3 py-2`,children:[(0,_.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e.label}),(0,_.jsx)(`div`,{className:`mt-1 truncate font-medium`,children:e.title}),(0,_.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:e.value})]},e.label))}),z.length>0&&(0,_.jsxs)(`div`,{className:`rounded-xl border border-border/50 bg-muted/10 p-3`,children:[(0,_.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:D(`drillDown.costShareByModel`)}),(0,_.jsx)(n,{width:`100%`,height:220,children:(0,_.jsxs)(i,{children:[(0,_.jsx)(r,{data:z,cx:`50%`,cy:`50%`,innerRadius:46,outerRadius:84,paddingAngle:2,dataKey:`value`,children:z.map(e=>(0,_.jsx)(t,{fill:m(e.name)},e.name))}),(0,_.jsx)(ee,{content:(0,_.jsx)(fe,{formatter:e=>u(e)})})]})})]})]}),(0,_.jsx)(`div`,{className:`space-y-3`,children:L.map(e=>(0,_.jsxs)(`div`,{className:`rounded-xl border border-border/50 bg-muted/10 p-3`,children:[(0,_.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,_.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,_.jsx)(`span`,{className:`h-2.5 w-2.5 rounded-full`,style:{backgroundColor:m(e.name)}}),(0,_.jsx)(`span`,{className:`truncate font-medium`,children:e.name}),(0,_.jsx)(`span`,{className:s(`inline-flex items-center rounded-full border px-1.5 py-0.5 text-[10px] leading-none font-medium`,p(e.provider)),children:e.provider})]}),(0,_.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:D(`drillDown.requestCountShort`,{count:e.requests})})]}),(0,_.jsxs)(`div`,{className:`mt-3 grid grid-cols-2 gap-2 text-xs sm:grid-cols-4`,children:[(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`tables.recentDays.cost`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:(0,_.jsx)(h,{value:e.cost,type:`currency`})})]}),(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`drillDown.costShare`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:d(e.costShare)})]}),(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`tables.recentDays.tokens`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:(0,_.jsx)(h,{value:e.tokens,type:`tokens`})})]}),(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`drillDown.tokenShare`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:d(e.tokenShare)})]}),(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`common.requests`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:(0,_.jsx)(h,{value:e.requests,type:`number`})})]}),(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:`$/1M`}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:e.costPerMillion===null?`–`:(0,_.jsx)(h,{value:e.costPerMillion,type:`currency`})})]}),(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`drillDown.costPerRequest`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:e.costPerRequest===null?`–`:(0,_.jsx)(h,{value:e.costPerRequest,type:`currency`})})]}),(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`drillDown.tokensPerRequest`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:e.tokensPerRequest===null?`–`:(0,_.jsx)(h,{value:e.tokensPerRequest,type:`tokens`})})]})]}),(0,_.jsxs)(`div`,{className:`mt-3 grid grid-cols-2 gap-2 text-[11px] sm:grid-cols-5`,children:[(0,_.jsxs)(`div`,{className:`rounded-lg border border-border/50 bg-background/60 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`common.input`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:c(e.input)})]}),(0,_.jsxs)(`div`,{className:`rounded-lg border border-border/50 bg-background/60 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`common.output`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:c(e.output)})]}),(0,_.jsxs)(`div`,{className:`rounded-lg border border-border/50 bg-background/60 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`common.cacheRead`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:c(e.cacheRead)})]}),(0,_.jsxs)(`div`,{className:`rounded-lg border border-border/50 bg-background/60 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`common.cacheWrite`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:c(e.cacheCreate)})]}),(0,_.jsxs)(`div`,{className:`rounded-lg border border-border/50 bg-background/60 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`common.thinking`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:c(e.thinking)})]})]})]},e.name))})]})]}),(0,_.jsxs)(`section`,{className:`space-y-3`,children:[(0,_.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,_.jsx)(`h3`,{className:`text-sm font-semibold`,children:D(`drillDown.providerSummary`)}),(0,_.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:D(`drillDown.providerCount`,{count:R.length})})]}),(0,_.jsx)(`div`,{className:`grid grid-cols-1 gap-3 lg:grid-cols-2`,children:R.map(e=>(0,_.jsxs)(`div`,{className:`rounded-xl border border-border/50 bg-muted/10 p-3`,children:[(0,_.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,_.jsx)(`span`,{className:s(`inline-flex items-center rounded-full border px-2 py-1 text-xs leading-none font-medium`,p(e.provider)),children:e.provider}),(0,_.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:D(`drillDown.activeModelsCount`,{count:e.activeModels})})]}),(0,_.jsxs)(`div`,{className:`mt-3 grid grid-cols-2 gap-2 text-xs sm:grid-cols-4`,children:[(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`tables.recentDays.cost`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:(0,_.jsx)(h,{value:e.cost,type:`currency`})})]}),(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`drillDown.costShare`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:d(e.costShare)})]}),(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`tables.recentDays.tokens`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:(0,_.jsx)(h,{value:e.tokens,type:`tokens`})})]}),(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`common.requests`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:(0,_.jsx)(h,{value:e.requests,type:`number`})})]})]})]},e.provider))})]}),(0,_.jsxs)(`section`,{className:`space-y-3`,children:[(0,_.jsx)(`h3`,{className:`text-sm font-semibold`,children:D(`drillDown.tokenDistribution`)}),(0,_.jsxs)(`div`,{className:`rounded-xl border border-border/50 bg-muted/10 p-3`,children:[(0,_.jsx)(`div`,{className:`flex h-3 overflow-hidden rounded-full`,children:I&&ke.map(e=>{let t=(e.value/F*100).toFixed(1),n=`${e.label}: ${c(e.value)} (${t}%)`;return(0,_.jsx)(`div`,{className:`h-full transition-all duration-500`,style:{width:`${e.value/F*100}%`,backgroundColor:e.color},title:n,"aria-label":n},e.id)})}),(0,_.jsx)(`div`,{className:`mt-3 grid grid-cols-1 gap-2 text-xs sm:grid-cols-2 lg:grid-cols-5`,children:ke.map(e=>(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2 text-muted-foreground`,children:[(0,_.jsx)(`span`,{className:`h-2.5 w-2.5 rounded-full`,style:{backgroundColor:e.color}}),e.label]}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:c(e.value)}),(0,_.jsx)(`div`,{className:`mt-1 text-[11px] text-muted-foreground`,children:I?d(e.value/F*100):`–`})]},e.id))})]})]})]})})}export{w as DrillDownModal};
@@ -1 +0,0 @@
1
- import{o as e}from"./motion-vendor-BNFhNARW.js";import{a as t}from"./useTranslation-JH30oWEP.js";import{t as n}from"./InfoButton-CyA48Vlx.js";var r=e();function i({children:e,info:i,className:a}){return(0,r.jsxs)(`div`,{className:t(`flex min-w-0 items-center gap-2`,a),children:[e,i&&(0,r.jsx)(n,{text:i,className:`shrink-0`})]})}export{i as t};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{w as t}from"./charts-vendor-CiBqdKXh.js";import{o as n}from"./motion-vendor-BNFhNARW.js";import{a as r,t as i}from"./useTranslation-JH30oWEP.js";import{s as a}from"./formatters-BzLLk0br.js";import{t as o}from"./i18n-D1WJ4-W9.js";import{I as s,N as ee,O as te,P as c,S as ne,et as re,h as ie,k as ae,r as l,rt as oe,w as se}from"./icons-vendor-CIvT_-Pb.js";import{t as u}from"./button-olcuyddH.js";import{i as d}from"./model-utils-BIvGAFGz.js";import{a as ce,i as le,n as ue,r as de,t as fe}from"./dialog-D4LfH66U.js";import{a as pe,c as f,i as me,l as p,o as he,s as m,t as ge}from"./app-settings-EFIYxqQU.js";import{n as _e}from"./help-content-Cuf5l3_6.js";import{t as ve}from"./InfoHeading-CFbl45C9.js";import{a as h,t as g}from"./provider-limits-BgKrr7k7.js";var _=e(t()),v=n();function y(e){let t=e.replace(`,`,`.`).trim();if(!t)return 0;let n=Number.parseFloat(t);return Number.isFinite(n)?Math.max(0,Number(n.toFixed(2))):0}function b(e,t){return e.includes(t)?e.filter(e=>e!==t):[...e,t]}function x(e){return[...new Set(e.map(e=>e.trim()).filter(Boolean))].sort((e,t)=>e.localeCompare(t))}function ye(e,t){let n={};for(let r of e)n[r]=t[r]??{...g};return n}function S(e,t,n){let r=e.indexOf(t),i=r+n;if(r<0||i<0||i>=e.length)return e;let a=[...e],[o]=a.splice(r,1);return o?(a.splice(i,0,o),a):e}function be(e,t,n){if(t===n)return e;let r=e.indexOf(t),i=e.indexOf(n);if(r<0||i<0)return e;let a=[...e],[o]=a.splice(r,1);if(!o)return e;let s=r<i?i-1:i;return a.splice(s,0,o),a}function C({open:e,onOpenChange:t,language:n,limitProviders:C,filterProviders:w,models:T,limits:E,defaultFilters:D,sectionVisibility:O,sectionOrder:k,lastLoadedAt:A,lastLoadSource:j,cliAutoLoadActive:xe=!1,hasData:Se,onSaveSettings:Ce,onExportSettings:we,onImportSettings:Te,onExportData:Ee,onImportData:De,settingsBusy:M=!1,dataBusy:N=!1}){let{t:P}=i(),[F,I]=(0,_.useState)(n),[L,R]=(0,_.useState)(()=>h(C,E)),[z,B]=(0,_.useState)(D),[V,H]=(0,_.useState)(O),[U,W]=(0,_.useState)(k),[G,K]=(0,_.useState)(null),[q,J]=(0,_.useState)(null),Y=(0,_.useRef)(null);(0,_.useEffect)(()=>{e&&(I(n),R(h(C,E)),B(D),H(O),W(k),K(null),J(null))},[e,n,C,E,D,O,k]);let X=(0,_.useMemo)(()=>x([...w,...z.providers]),[w,z.providers]),Z=(0,_.useMemo)(()=>x([...T,...z.models]),[T,z.models]),Q=(e,t)=>{R(n=>({...n,[e]:{...n[e]??g,...t}}))},Oe=async()=>{await Ce({language:F,providerLimits:ye(C,L),defaultFilters:{...z,providers:x(z.providers),models:x(z.models)},sectionVisibility:V,sectionOrder:U}),t(!1)},ke=()=>{I(ge.language),R(h(C,{})),B(m),H(p()),W(f()),K(null),J(null)},Ae=()=>{B(m)},je=()=>{H(p()),W(f())},Me=()=>{R(h(C,{}))},Ne=P(j?`settings.modal.sources.${j}`:`settings.modal.sources.unknown`),$=(0,_.useMemo)(()=>U.map(e=>pe[e]).filter(e=>e!==void 0),[U]);return(0,v.jsx)(fe,{open:e,onOpenChange:t,children:(0,v.jsxs)(ue,{className:`max-h-[88vh] max-w-5xl overflow-x-visible overflow-y-auto`,onOpenAutoFocus:e=>{e.preventDefault(),Y.current?.focus()},children:[(0,v.jsxs)(le,{className:`overflow-visible`,children:[(0,v.jsx)(ve,{info:_e.providerLimits,children:(0,v.jsx)(ce,{ref:Y,tabIndex:-1,className:`focus:outline-none`,children:P(`settings.modal.title`)})}),(0,v.jsx)(de,{children:P(`settings.modal.description`)})]}),(0,v.jsxs)(`div`,{className:`rounded-2xl border border-border/50 bg-muted/20 px-4 py-3`,children:[(0,v.jsx)(`div`,{className:`text-[11px] font-medium tracking-[0.14em] text-muted-foreground uppercase`,children:P(`settings.modal.dataStatus`)}),(0,v.jsxs)(`div`,{className:`mt-3 grid gap-3 sm:grid-cols-3`,children:[(0,v.jsxs)(`div`,{className:`space-y-1`,children:[(0,v.jsx)(`div`,{className:`text-[11px] tracking-[0.12em] text-muted-foreground uppercase`,children:P(`settings.modal.lastLoaded`)}),(0,v.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:A?a(A):P(`common.notAvailable`)})]}),(0,v.jsxs)(`div`,{className:`space-y-1`,children:[(0,v.jsx)(`div`,{className:`text-[11px] tracking-[0.12em] text-muted-foreground uppercase`,children:P(`settings.modal.loadedVia`)}),(0,v.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:Ne})]}),(0,v.jsxs)(`div`,{className:`space-y-1`,children:[(0,v.jsx)(`div`,{className:`text-[11px] tracking-[0.12em] text-muted-foreground uppercase`,children:P(`settings.modal.cliAutoLoad`)}),(0,v.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:P(xe?`common.enabled`:`common.disabled`)})]})]})]}),(0,v.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-2`,children:[(0,v.jsxs)(`div`,{className:`rounded-2xl border border-border/50 bg-card/60 p-4 backdrop-blur-xl`,children:[(0,v.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,v.jsx)(`span`,{className:`mt-0.5 inline-flex h-9 w-9 items-center justify-center rounded-xl border border-border/60 bg-muted/20 text-muted-foreground`,children:(0,v.jsx)(se,{className:`h-4 w-4`})}),(0,v.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,v.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:P(`settings.modal.languageTitle`)}),(0,v.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:P(`settings.modal.languageDescription`)})]})]}),(0,v.jsx)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:o.map(e=>(0,v.jsx)(u,{type:`button`,"data-testid":`settings-language-${e}`,"aria-pressed":F===e,variant:F===e?`default`:`outline`,onClick:()=>I(e),children:P(`app.languages.${e}`)},e))})]}),(0,v.jsxs)(`div`,{className:`rounded-2xl border border-border/50 bg-card/60 p-4 backdrop-blur-xl`,children:[(0,v.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,v.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,v.jsx)(`span`,{className:`mt-0.5 inline-flex h-9 w-9 items-center justify-center rounded-xl border border-border/60 bg-muted/20 text-muted-foreground`,children:(0,v.jsx)(ae,{className:`h-4 w-4`})}),(0,v.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,v.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:P(`settings.modal.defaultFiltersTitle`)}),(0,v.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:P(`settings.modal.defaultFiltersDescription`)})]})]}),(0,v.jsx)(u,{type:`button`,variant:`ghost`,size:`sm`,"data-testid":`reset-default-filters`,onClick:Ae,disabled:M,children:P(`common.reset`)})]}),(0,v.jsxs)(`div`,{className:`mt-4 space-y-4`,children:[(0,v.jsxs)(`div`,{className:`space-y-2`,children:[(0,v.jsx)(`div`,{className:`text-[11px] font-medium tracking-[0.14em] text-muted-foreground uppercase`,children:P(`settings.modal.defaultViewMode`)}),(0,v.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:he.map(e=>(0,v.jsx)(u,{type:`button`,"aria-pressed":z.viewMode===e,variant:z.viewMode===e?`default`:`outline`,onClick:()=>B(t=>({...t,viewMode:e})),children:P(`settings.modal.viewModes.${e}`)},e))})]}),(0,v.jsxs)(`div`,{className:`space-y-2`,children:[(0,v.jsx)(`div`,{className:`text-[11px] font-medium tracking-[0.14em] text-muted-foreground uppercase`,children:P(`settings.modal.defaultDateRange`)}),(0,v.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:me.map(e=>(0,v.jsx)(u,{type:`button`,"aria-pressed":z.datePreset===e,variant:z.datePreset===e?`default`:`outline`,onClick:()=>B(t=>({...t,datePreset:e})),children:P(`settings.modal.datePresets.${e}`)},e))})]}),(0,v.jsxs)(`div`,{className:`space-y-2`,children:[(0,v.jsx)(`div`,{className:`text-[11px] font-medium tracking-[0.14em] text-muted-foreground uppercase`,children:P(`settings.modal.filterProviders`)}),X.length===0?(0,v.jsx)(`div`,{className:`rounded-xl border border-dashed border-border/60 bg-muted/10 px-3 py-4 text-sm text-muted-foreground`,children:P(`settings.modal.noProviders`)}):(0,v.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:X.map(e=>{let t=z.providers.includes(e);return(0,v.jsx)(`button`,{type:`button`,"aria-pressed":t,onClick:()=>B(t=>({...t,providers:b(t.providers,e)})),className:r(`inline-flex items-center rounded-full border px-3 py-1.5 text-xs font-medium transition-colors`,t?`border-primary/30 bg-primary text-primary-foreground`:d(e)),children:e},e)})})]}),(0,v.jsxs)(`div`,{className:`space-y-2`,children:[(0,v.jsx)(`div`,{className:`text-[11px] font-medium tracking-[0.14em] text-muted-foreground uppercase`,children:P(`settings.modal.filterModels`)}),Z.length===0?(0,v.jsx)(`div`,{className:`rounded-xl border border-dashed border-border/60 bg-muted/10 px-3 py-4 text-sm text-muted-foreground`,children:P(`settings.modal.noModels`)}):(0,v.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:Z.map(e=>{let t=z.models.includes(e);return(0,v.jsx)(`button`,{type:`button`,"aria-pressed":t,onClick:()=>B(t=>({...t,models:b(t.models,e)})),className:r(`inline-flex items-center rounded-full border px-3 py-1.5 text-xs font-medium transition-colors`,t?`border-primary/30 bg-primary text-primary-foreground`:`border-border bg-muted/20 text-muted-foreground hover:bg-accent hover:text-foreground`),children:e},e)})})]})]})]}),(0,v.jsxs)(`div`,{className:`rounded-2xl border border-border/50 bg-card/60 p-4 backdrop-blur-xl`,children:[(0,v.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,v.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,v.jsx)(`span`,{className:`mt-0.5 inline-flex h-9 w-9 items-center justify-center rounded-xl border border-border/60 bg-muted/20 text-muted-foreground`,children:(0,v.jsx)(ee,{className:`h-4 w-4`})}),(0,v.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,v.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:P(`settings.modal.sectionVisibilityTitle`)}),(0,v.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:P(`settings.modal.sectionVisibilityDescription`)})]})]}),(0,v.jsx)(u,{type:`button`,variant:`ghost`,size:`sm`,"data-testid":`reset-section-visibility`,onClick:je,disabled:M,children:P(`common.reset`)})]}),(0,v.jsx)(`div`,{className:`mt-3 text-xs text-muted-foreground`,children:P(`settings.modal.sectionOrderHint`)}),(0,v.jsx)(`div`,{className:`mt-4 space-y-2`,children:$.map((e,t)=>{let n=V[e.id];return(0,v.jsxs)(`div`,{"data-section-id":e.id,draggable:!0,onDragStart:t=>{t.dataTransfer.effectAllowed=`move`,t.dataTransfer.setData(`text/plain`,e.id),K(e.id),J(e.id)},onDragOver:t=>{t.preventDefault(),q!==e.id&&J(e.id)},onDragLeave:()=>{q===e.id&&J(null)},onDrop:t=>{t.preventDefault();let n=t.dataTransfer.getData(`text/plain`)||G;n&&(W(t=>be(t,n,e.id)),K(null),J(null))},onDragEnd:()=>{K(null),J(null)},className:r(`flex items-center gap-2 rounded-xl border px-3 py-2 text-sm transition-colors`,q===e.id?`border-primary/40 bg-primary/10`:`border-border/70 bg-muted/10`,G===e.id&&`opacity-70`),children:[(0,v.jsx)(`span`,{className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-border/60 bg-background/40 text-muted-foreground`,children:(0,v.jsx)(te,{className:`h-4 w-4`})}),(0,v.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,v.jsx)(`div`,{className:`truncate font-medium text-foreground`,children:P(e.labelKey)}),(0,v.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:P(`settings.modal.positionLabel`,{position:t+1,total:$.length})})]}),(0,v.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,v.jsx)(u,{type:`button`,variant:`ghost`,size:`icon`,className:`h-8 w-8`,"data-testid":`move-section-up-${e.id}`,onClick:()=>W(t=>S(t,e.id,-1)),disabled:t===0,"aria-label":P(`settings.modal.moveSectionUp`,{section:P(e.labelKey)}),children:(0,v.jsx)(re,{className:`h-4 w-4`})}),(0,v.jsx)(u,{type:`button`,variant:`ghost`,size:`icon`,className:`h-8 w-8`,"data-testid":`move-section-down-${e.id}`,onClick:()=>W(t=>S(t,e.id,1)),disabled:t===$.length-1,"aria-label":P(`settings.modal.moveSectionDown`,{section:P(e.labelKey)}),children:(0,v.jsx)(oe,{className:`h-4 w-4`})}),(0,v.jsx)(`button`,{type:`button`,"data-testid":`toggle-section-visibility-${e.id}`,"aria-pressed":n,onClick:()=>H(t=>({...t,[e.id]:!t[e.id]})),className:r(`inline-flex min-w-[88px] items-center justify-center rounded-full border px-3 py-1.5 text-xs font-medium tracking-[0.12em] uppercase transition-colors`,n?`border-emerald-500/30 bg-emerald-500/10 text-foreground`:`border-border bg-muted/20 text-muted-foreground hover:bg-accent hover:text-foreground`),children:P(n?`common.visible`:`common.hidden`)})]})]},e.id)})})]})]}),(0,v.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-2`,children:[(0,v.jsxs)(`div`,{className:`rounded-2xl border border-border/50 bg-card/60 p-4 backdrop-blur-xl`,children:[(0,v.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,v.jsx)(`span`,{className:`mt-0.5 inline-flex h-9 w-9 items-center justify-center rounded-xl border border-border/60 bg-muted/20 text-muted-foreground`,children:(0,v.jsx)(ie,{className:`h-4 w-4`})}),(0,v.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,v.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:P(`settings.modal.settingsBackupTitle`)}),(0,v.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:P(`settings.modal.settingsBackupDescription`)})]})]}),(0,v.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:[(0,v.jsxs)(u,{variant:`outline`,onClick:we,disabled:M,className:`gap-2`,children:[(0,v.jsx)(c,{className:`h-4 w-4`}),P(`settings.modal.exportSettings`)]}),(0,v.jsxs)(u,{variant:`outline`,onClick:Te,disabled:M,className:`gap-2`,children:[(0,v.jsx)(l,{className:`h-4 w-4`}),P(`settings.modal.importSettings`)]})]})]}),(0,v.jsxs)(`div`,{className:`rounded-2xl border border-border/50 bg-card/60 p-4 backdrop-blur-xl`,children:[(0,v.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,v.jsx)(`span`,{className:`mt-0.5 inline-flex h-9 w-9 items-center justify-center rounded-xl border border-border/60 bg-muted/20 text-muted-foreground`,children:(0,v.jsx)(s,{className:`h-4 w-4`})}),(0,v.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,v.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:P(`settings.modal.dataBackupTitle`)}),(0,v.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:P(`settings.modal.dataBackupDescription`)})]})]}),(0,v.jsx)(`p`,{className:`mt-3 rounded-xl border border-amber-500/20 bg-amber-500/8 px-3 py-2 text-xs leading-relaxed text-amber-200/90`,children:P(`settings.modal.dataImportPolicy`)}),(0,v.jsx)(`p`,{className:`mt-2 text-xs leading-relaxed text-muted-foreground`,children:P(`settings.modal.dataImportReplaceHint`)}),(0,v.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:[(0,v.jsxs)(u,{variant:`outline`,onClick:Ee,disabled:!Se||N,className:`gap-2`,children:[(0,v.jsx)(c,{className:`h-4 w-4`}),P(`settings.modal.exportData`)]}),(0,v.jsxs)(u,{variant:`outline`,onClick:De,disabled:N,className:`gap-2`,children:[(0,v.jsx)(l,{className:`h-4 w-4`}),P(`settings.modal.importData`)]})]})]})]}),(0,v.jsxs)(`div`,{className:`rounded-2xl border border-border/50 bg-card/60 p-4 backdrop-blur-xl`,children:[(0,v.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,v.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,v.jsx)(`span`,{className:`mt-0.5 inline-flex h-9 w-9 items-center justify-center rounded-xl border border-border/60 bg-muted/20 text-muted-foreground`,children:(0,v.jsx)(ne,{className:`h-4 w-4`})}),(0,v.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,v.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:P(`settings.modal.providerLimitsTitle`)}),(0,v.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:P(`settings.modal.providerLimitsDescription`)})]})]}),(0,v.jsx)(u,{type:`button`,variant:`ghost`,size:`sm`,"data-testid":`reset-provider-limits`,onClick:Me,disabled:M,children:P(`common.reset`)})]}),(0,v.jsx)(`div`,{className:`mt-4`,children:C.length===0?(0,v.jsx)(`div`,{className:`rounded-xl border border-dashed border-border/60 bg-muted/10 px-4 py-8 text-center text-sm text-muted-foreground`,children:P(`settings.modal.noProviders`)}):(0,v.jsx)(`div`,{className:`space-y-3`,children:C.map(e=>{let t=L[e]??g;return(0,v.jsx)(`div`,{"data-provider-id":e,className:`rounded-2xl border border-border/50 bg-background/40 p-4`,children:(0,v.jsxs)(`div`,{className:`flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between`,children:[(0,v.jsx)(`div`,{className:`min-w-0`,children:(0,v.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,v.jsx)(`span`,{className:r(`inline-flex items-center rounded-full border px-2.5 py-1 text-xs font-medium`,d(e)),children:e}),(0,v.jsx)(`button`,{type:`button`,onClick:()=>Q(e,{hasSubscription:!t.hasSubscription}),className:r(`inline-flex items-center rounded-full border px-2.5 py-1 text-xs font-medium transition-colors`,t.hasSubscription?`border-emerald-500/30 bg-emerald-500/10 text-emerald-300`:`border-border bg-muted/20 text-muted-foreground hover:bg-accent`),children:t.hasSubscription?P(`common.enabled`):P(`limits.statuses.noSubscription`)})]})}),(0,v.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2 lg:w-[420px]`,children:[(0,v.jsxs)(`label`,{className:`space-y-1.5`,children:[(0,v.jsx)(`span`,{className:`text-[11px] font-medium tracking-[0.14em] text-muted-foreground uppercase`,children:P(`limits.modal.subscriptionPerMonth`)}),(0,v.jsx)(`input`,{type:`number`,min:`0`,step:`0.01`,value:t.subscriptionPrice,disabled:!t.hasSubscription,onChange:t=>Q(e,{subscriptionPrice:y(t.target.value)}),className:`h-10 w-full rounded-md border border-border bg-background px-3 text-sm disabled:cursor-not-allowed disabled:opacity-50`})]}),(0,v.jsxs)(`label`,{className:`space-y-1.5`,children:[(0,v.jsx)(`span`,{className:`text-[11px] font-medium tracking-[0.14em] text-muted-foreground uppercase`,children:P(`limits.modal.monthlyLimit`)}),(0,v.jsx)(`input`,{type:`number`,min:`0`,step:`0.01`,value:t.monthlyLimit,onChange:t=>Q(e,{monthlyLimit:y(t.target.value)}),className:`h-10 w-full rounded-md border border-border bg-background px-3 text-sm`})]})]})]})},e)})})})]}),(0,v.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-t border-border/50 pt-4`,children:[(0,v.jsx)(u,{variant:`ghost`,onClick:ke,disabled:M,"data-testid":`reset-all-settings-drafts`,children:P(`common.reset`)}),(0,v.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(u,{variant:`ghost`,onClick:()=>t(!1),disabled:M,children:P(`settings.modal.close`)}),(0,v.jsx)(u,{onClick:()=>void Oe(),disabled:M,children:P(`settings.modal.save`)})]})]})]})})}export{C as SettingsModal};
@@ -1 +0,0 @@
1
- import{_ as e,b as t,g as n,i as r,v as i,y as a}from"./charts-vendor-CiBqdKXh.js";import{o}from"./motion-vendor-BNFhNARW.js";import{t as s}from"./useTranslation-JH30oWEP.js";import{d as c}from"./formatters-BzLLk0br.js";import{t as l}from"./help-content-Cuf5l3_6.js";import{n as u,s as d}from"./chart-theme-BdE8bEiN.js";import{n as f,r as p,t as m}from"./ChartCard-CS4Kbe6r.js";import{t as h}from"./ChartLegend-Vzg_GmF-.js";import{t as g}from"./CustomTooltip-CEd8U-a3.js";var _=o(),v={Input:u.input,Output:u.output,"Cache Write":u.cacheWrite,"Cache Read":u.cacheRead,Thinking:u.cost};function y({viewBox:e,total:t}){let{t:n}=s();if(!e)return null;let{cx:r,cy:i}=e;return(0,_.jsxs)(`g`,{children:[(0,_.jsx)(`text`,{x:r,y:i-6,textAnchor:`middle`,className:`fill-muted-foreground`,fontSize:11,children:n(`charts.tokenTypes.total`)}),(0,_.jsx)(`text`,{x:r,y:i+14,textAnchor:`middle`,className:`fill-foreground`,fontSize:16,fontWeight:600,children:t})]})}function b({data:o}){let{t:b}=s(),x=o.reduce((e,t)=>e+t.value,0);return(0,_.jsx)(f,{title:b(`charts.tokenTypes.title`),subtitle:b(`charts.tokenTypes.subtitle`),info:l.tokenTypes,chartData:o,valueKey:`value`,valueFormatter:c,children:s=>{let l=s?560:320,f=s?`66%`:`57%`,b=s?84:58,S=s?134:92;return(0,_.jsx)(m,{children:m=>(0,_.jsx)(p,{variant:`radial`,children:(0,_.jsx)(t,{width:`100%`,height:l,children:(0,_.jsxs)(r,{children:[(0,_.jsxs)(n,{data:o,cx:`50%`,cy:f,innerRadius:b,outerRadius:S,paddingAngle:2,dataKey:`value`,nameKey:`name`,...d(m),children:[o.map(t=>(0,_.jsx)(e,{fill:v[t.name]??u.cost},t.name)),(0,_.jsx)(y,{total:c(x)})]}),(0,_.jsx)(i,{content:(0,_.jsx)(g,{formatter:e=>c(e)})}),(0,_.jsx)(a,{content:(0,_.jsx)(h,{className:s?`pt-[22px]`:`pt-2`,renderLabel:e=>{let t=String(e.value??``),n=o.find(e=>e.name===t);return`${t} (${n?c(n.value):``})`}})})]})})})})}})}export{b as TokenTypes};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{S as t,w as n}from"./charts-vendor-CiBqdKXh.js";import{o as r}from"./motion-vendor-BNFhNARW.js";import{y as i}from"./ui-vendor-DOI7LsxH.js";import{a}from"./useTranslation-JH30oWEP.js";var o=e(n()),s=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,c=t,l=(e,t)=>n=>{if(t?.variants==null)return c(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=s(t)||s(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return c(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},u=r(),d=l(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 cursor-pointer`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,outline:`border border-border bg-transparent hover:bg-accent hover:text-accent-foreground`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2`,sm:`h-8 rounded-md px-3 text-xs`,lg:`h-10 rounded-md px-8`,icon:`h-9 w-9`}},defaultVariants:{variant:`default`,size:`default`}}),f=o.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>(0,u.jsx)(r?i:`button`,{className:a(d({variant:t,size:n,className:e})),ref:s,...o}));f.displayName=`Button`;export{f as t};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{w as t}from"./charts-vendor-CiBqdKXh.js";import{a as n,o as r,r as i}from"./motion-vendor-BNFhNARW.js";import{a,i as o}from"./useTranslation-JH30oWEP.js";var s=e(t()),c=r(),l={sectionPreloadMargin:`0px 0px 45% 0px`,sectionRevealAmount:.14,sectionRevealOffset:12,sectionRevealDuration:.6,sectionRevealEase:[.22,1,.36,1],placeholderFadeDuration:.34,itemRevealAmount:.24,itemRevealOffset:8,itemRevealDuration:.42,itemStaggerMs:105,chartStartDelayMs:285,meterStartDelayMs:375,meterDurationMs:960},u=(0,s.createContext)(null);function d(){return(0,s.useContext)(u)}function f(e,t){let[n,r]=(0,s.useState)(typeof IntersectionObserver>`u`);return(0,s.useEffect)(()=>{if(typeof IntersectionObserver>`u`){r(!0);return}if(n)return;let i=e.current;if(!i)return;let a=new IntersectionObserver(e=>{e[0]?.isIntersecting&&(r(!0),a.disconnect())},{threshold:t});return a.observe(i),()=>{a.disconnect()}},[t,n,e]),n}function p(e,{amount:t=l.itemRevealAmount,kind:n=`item`,order:r=0,delayMs:i}={}){let a=d(),c=o(),u=typeof IntersectionObserver>`u`,p=f(e,t),m=(a?.sectionVisible??!0)&&(u?!0:p),[h,g]=(0,s.useState)(0),_=(0,s.useRef)(!1);(0,s.useEffect)(()=>{m&&!_.current&&g(e=>e+1),_.current=m},[m]);let v=i??(n===`meter`?a?.meterStartDelayMs??l.meterStartDelayMs:a?.chartStartDelayMs??l.chartStartDelayMs);return{active:c?!0:m,runKey:h,delayMs:v+r*l.itemStaggerMs,shouldReduceMotion:c}}function m({children:e,className:t,order:n=0,delayMs:r,amount:a,"data-testid":o}){let u=(0,s.useRef)(null),d=p(u,{kind:`item`,order:n,...r===void 0?{}:{delayMs:r},...a===void 0?{}:{amount:a}});return(0,s.useEffect)(()=>{let e=u.current;e&&e.querySelectorAll(`a[href], button, input, select, textarea, [tabindex]`).forEach(e=>{if(!d.active){e.hasAttribute(`data-dashboard-motion-tabindex`)||e.setAttribute(`data-dashboard-motion-tabindex`,e.getAttribute(`tabindex`)??``),e.tabIndex=-1;return}if(!e.hasAttribute(`data-dashboard-motion-tabindex`))return;let t=e.getAttribute(`data-dashboard-motion-tabindex`);t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`),e.removeAttribute(`data-dashboard-motion-tabindex`)})},[d.active]),d.shouldReduceMotion?(0,c.jsx)(`div`,{ref:u,className:t,"data-testid":o,children:e}):(0,c.jsx)(i.div,{ref:u,className:t,"data-testid":o,"aria-hidden":!d.active,...d.active?{}:{style:{pointerEvents:`none`}},initial:!1,animate:d.active?{opacity:1,y:0}:{opacity:0,y:l.itemRevealOffset},transition:{duration:l.itemRevealDuration,delay:d.active?d.delayMs/1e3:0,ease:l.sectionRevealEase},children:e})}function h({id:e,children:t,className:r,contentClassName:d,placeholderClassName:f,eager:p=!1,onPreload:m}){let h=(0,s.useRef)(null),g=(0,s.useRef)(!1),_=(0,s.useRef)(null),v=(0,s.useRef)(!0),y=o(),[b,x]=(0,s.useState)(p),[S,C]=(0,s.useState)(p);(0,s.useEffect)(()=>()=>{v.current=!1},[]);let w=(0,s.useCallback)(()=>{if(g.current)return _.current;if(g.current=!0,!m){x(!0);let e=Promise.resolve();return _.current=e,e}let e=Promise.resolve().then(()=>m()).catch(()=>void 0).finally(()=>{v.current&&x(!0)});return _.current=e,e},[m]);(0,s.useEffect)(()=>{if(p){w(),C(!0);return}let e=h.current;if(!e||typeof IntersectionObserver>`u`){w(),C(!0);return}let t=new IntersectionObserver(e=>{e[0]?.isIntersecting&&(w(),t.disconnect())},{rootMargin:l.sectionPreloadMargin,threshold:0}),n=new IntersectionObserver(e=>{e[0]?.isIntersecting&&(w(),C(!0),n.disconnect())},{threshold:l.sectionRevealAmount});return t.observe(e),n.observe(e),()=>{t.disconnect(),n.disconnect()}},[p,w]);let T=p||b,E=!S,D={opacity:0,pointerEvents:`none`},O={pointerEvents:`none`},k=(0,s.useMemo)(()=>({sectionVisible:S,chartStartDelayMs:l.chartStartDelayMs,meterStartDelayMs:l.meterStartDelayMs,shouldReduceMotion:y}),[S,y]);return(0,c.jsx)(`section`,{id:e,ref:h,className:a(`relative`,r),"data-section-mounted":T?`true`:`false`,"data-section-visible":S?`true`:`false`,children:T?(0,c.jsx)(u.Provider,{value:k,children:(0,c.jsxs)(`div`,{className:`relative`,children:[y?(0,c.jsx)(`div`,{...S?{}:{inert:!0},className:d,style:S?void 0:D,children:t}):(0,c.jsx)(i.div,{...S?{}:{inert:!0},...S?{}:{style:O},initial:{opacity:0,y:l.sectionRevealOffset},animate:S?{opacity:1,y:0}:{opacity:0,y:l.sectionRevealOffset},transition:{duration:l.sectionRevealDuration,ease:l.sectionRevealEase},className:d,children:t}),(0,c.jsx)(n,{initial:!1,children:E&&(y?(0,c.jsx)(`div`,{"aria-hidden":`true`,className:a(`pointer-events-none absolute inset-0 rounded-2xl border border-border/40 bg-card/50 backdrop-blur-xl`,f??`min-h-[320px]`)}):(0,c.jsx)(i.div,{"aria-hidden":`true`,initial:{opacity:1},animate:{opacity:1},exit:{opacity:0},transition:{duration:l.placeholderFadeDuration},className:a(`pointer-events-none absolute inset-0 rounded-2xl border border-border/40 bg-card/50 backdrop-blur-xl`,f??`min-h-[320px]`)},`section-placeholder`))})]})}):(0,c.jsx)(`div`,{"aria-hidden":`true`,className:a(`rounded-2xl border border-border/40 bg-card/50 backdrop-blur-xl`,f??`min-h-[320px]`)})})}var g=s.forwardRef(({className:e,...t},n)=>{let r=o(),s=d(),l=r||s?{initial:!1,animate:{opacity:1,y:0},transition:{duration:0}}:{initial:{opacity:0,y:14},whileInView:{opacity:1,y:0},viewport:{once:!0,amount:.15},transition:{duration:.35,ease:`easeOut`}};return(0,c.jsx)(i.div,{ref:n,...t,...l,className:a(`relative rounded-xl border border-border/50 bg-card/80 text-card-foreground shadow-[var(--shadow-card)] backdrop-blur-xl transition-all duration-300 hover:border-border/80 hover:shadow-[var(--shadow-card-hover)] motion-reduce:transition-none`,e)})});g.displayName=`Card`;var _=s.forwardRef(({className:e,...t},n)=>(0,c.jsx)(`div`,{ref:n,className:a(`flex flex-col space-y-1.5 p-4`,e),...t}));_.displayName=`CardHeader`;var v=s.forwardRef(({children:e,className:t,...n},r)=>(0,c.jsx)(`h3`,{ref:r,className:a(`leading-none font-semibold tracking-tight`,t),...n,children:e}));v.displayName=`CardTitle`;var y=s.forwardRef(({className:e,...t},n)=>(0,c.jsx)(`div`,{ref:n,className:a(`p-4 pt-0`,e),...t}));y.displayName=`CardContent`;var b=s.forwardRef(({className:e,...t},n)=>(0,c.jsx)(`p`,{ref:n,className:a(`text-xs text-muted-foreground`,e),...t}));b.displayName=`CardDescription`;export{v as a,m as c,_ as i,p as l,y as n,h as o,b as r,l as s,g as t,d as u};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{S as t,w as n,x as r}from"./charts-vendor-CiBqdKXh.js";import{n as i}from"./motion-vendor-BNFhNARW.js";var a=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},o=(e,t)=>({classGroupId:e,validator:t}),s=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),c=`-`,l=[],u=`arbitrary..`,d=e=>{let t=m(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return p(e);let n=e.split(c);return f(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?a(i,t):t:i||l}return n[e]||l}}},f=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=f(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(c):e.slice(t).join(c),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},p=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?u+r:void 0})(),m=e=>{let{theme:t,classGroups:n}=e;return h(n,t)},h=(e,t)=>{let n=s();for(let r in e){let i=e[r];g(i,n,r,t)}return n},g=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];_(i,t,n,r)}},_=(e,t,n,r)=>{if(typeof e==`string`){v(e,t,n);return}if(typeof e==`function`){y(e,t,n,r);return}b(e,t,n,r)},v=(e,t,n)=>{let r=e===``?t:x(t,e);r.classGroupId=n},y=(e,t,n,r)=>{if(S(e)){g(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(o(n,e))},b=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];g(o,x(t,a),n,r)}},x=(e,t)=>{let n=e,r=t.split(c),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=s(),n.nextPart.set(t,i)),n=i}return n},S=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,C=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},w=`!`,T=`:`,ee=[],te=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),E=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===T){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(w)?(c=s.slice(0,-1),l=!0):s.startsWith(w)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return te(t,l,c,u)};if(t){let e=t+T,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):te(ee,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},ne=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},D=e=>({cache:C(e.cacheSize),parseClassName:E(e),sortModifiers:ne(e),...d(e)}),O=/\s+/,k=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(O),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+w:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},A=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=j(n))&&(i&&(i+=` `),i+=r);return i},j=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=j(e[r]))&&(n&&(n+=` `),n+=t);return n},M=(e,...t)=>{let n,r,i,a,o=o=>(n=D(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=k(e,n);return i(e,a),a};return a=o,(...e)=>a(A(...e))},N=[],P=e=>{let t=t=>t[e]||N;return t.isThemeGetter=!0,t},re=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ie=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ae=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,oe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,F=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,I=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,L=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,se=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,R=e=>ae.test(e),z=e=>!!e&&!Number.isNaN(Number(e)),B=e=>!!e&&Number.isInteger(Number(e)),ce=e=>e.endsWith(`%`)&&z(e.slice(0,-1)),V=e=>oe.test(e),le=()=>!0,H=e=>F.test(e)&&!I.test(e),U=()=>!1,W=e=>L.test(e),G=e=>se.test(e),ue=e=>!K(e)&&!J(e),de=e=>X(e,Ee,U),K=e=>re.test(e),q=e=>X(e,De,H),fe=e=>X(e,Oe,z),pe=e=>X(e,Ae,le),me=e=>X(e,ke,U),he=e=>X(e,we,U),ge=e=>X(e,Te,G),_e=e=>X(e,je,W),J=e=>ie.test(e),Y=e=>Z(e,De),ve=e=>Z(e,ke),ye=e=>Z(e,we),be=e=>Z(e,Ee),xe=e=>Z(e,Te),Se=e=>Z(e,je,!0),Ce=e=>Z(e,Ae,!0),X=(e,t,n)=>{let r=re.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Z=(e,t,n=!1)=>{let r=ie.exec(e);return r?r[1]?t(r[1]):n:!1},we=e=>e===`position`||e===`percentage`,Te=e=>e===`image`||e===`url`,Ee=e=>e===`length`||e===`size`||e===`bg-size`,De=e=>e===`length`,Oe=e=>e===`number`,ke=e=>e===`family-name`,Ae=e=>e===`number`||e===`weight`,je=e=>e===`shadow`,Me=M(()=>{let e=P(`color`),t=P(`font`),n=P(`text`),r=P(`font-weight`),i=P(`tracking`),a=P(`leading`),o=P(`breakpoint`),s=P(`container`),c=P(`spacing`),l=P(`radius`),u=P(`shadow`),d=P(`inset-shadow`),f=P(`text-shadow`),p=P(`drop-shadow`),m=P(`blur`),h=P(`perspective`),g=P(`aspect`),_=P(`ease`),v=P(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),J,K],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[J,K,c],T=()=>[R,`full`,`auto`,...w()],ee=()=>[B,`none`,`subgrid`,J,K],te=()=>[`auto`,{span:[`full`,B,J,K]},B,J,K],E=()=>[B,`auto`,J,K],ne=()=>[`auto`,`min`,`max`,`fr`,J,K],D=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],O=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],k=()=>[`auto`,...w()],A=()=>[R,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],j=()=>[R,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],M=()=>[R,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],N=()=>[e,J,K],re=()=>[...b(),ye,he,{position:[J,K]}],ie=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ae=()=>[`auto`,`cover`,`contain`,be,de,{size:[J,K]}],oe=()=>[ce,Y,q],F=()=>[``,`none`,`full`,l,J,K],I=()=>[``,z,Y,q],L=()=>[`solid`,`dashed`,`dotted`,`double`],se=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],H=()=>[z,ce,ye,he],U=()=>[``,`none`,m,J,K],W=()=>[`none`,z,J,K],G=()=>[`none`,z,J,K],X=()=>[z,J,K],Z=()=>[R,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[V],breakpoint:[V],color:[le],container:[V],"drop-shadow":[V],ease:[`in`,`out`,`in-out`],font:[ue],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[V],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[V],shadow:[V],spacing:[`px`,z],text:[V],"text-shadow":[V],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,R,K,J,g]}],container:[`container`],columns:[{columns:[z,K,J,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[B,`auto`,J,K]}],basis:[{basis:[R,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[z,R,`auto`,`initial`,`none`,K]}],grow:[{grow:[``,z,J,K]}],shrink:[{shrink:[``,z,J,K]}],order:[{order:[B,`first`,`last`,`none`,J,K]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...D(),`normal`]}],"justify-items":[{"justify-items":[...O(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...O()]}],"align-content":[{content:[`normal`,...D()]}],"align-items":[{items:[...O(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...O(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...O(),`baseline`]}],"place-self":[{"place-self":[`auto`,...O()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mbs:[{mbs:k()}],mbe:[{mbe:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:A()}],"inline-size":[{inline:[`auto`,...j()]}],"min-inline-size":[{"min-inline":[`auto`,...j()]}],"max-inline-size":[{"max-inline":[`none`,...j()]}],"block-size":[{block:[`auto`,...M()]}],"min-block-size":[{"min-block":[`auto`,...M()]}],"max-block-size":[{"max-block":[`none`,...M()]}],w:[{w:[s,`screen`,...A()]}],"min-w":[{"min-w":[s,`screen`,`none`,...A()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...A()]}],h:[{h:[`screen`,`lh`,...A()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...A()]}],"max-h":[{"max-h":[`screen`,`lh`,...A()]}],"font-size":[{text:[`base`,n,Y,q]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Ce,pe]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ce,K]}],"font-family":[{font:[ve,me,t]}],"font-features":[{"font-features":[K]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,J,K]}],"line-clamp":[{"line-clamp":[z,`none`,J,fe]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,J,K]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,J,K]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...L(),`wavy`]}],"text-decoration-thickness":[{decoration:[z,`from-font`,`auto`,J,q]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[z,`auto`,J,K]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,J,K]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,J,K]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:ie()}],"bg-size":[{bg:ae()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},B,J,K],radial:[``,J,K],conic:[B,J,K]},xe,ge]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-bs":[{"border-bs":I()}],"border-w-be":[{"border-be":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":I()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...L(),`hidden`,`none`]}],"divide-style":[{divide:[...L(),`hidden`,`none`]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-bs":[{"border-bs":N()}],"border-color-be":[{"border-be":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...L(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[z,J,K]}],"outline-w":[{outline:[``,z,Y,q]}],"outline-color":[{outline:N()}],shadow:[{shadow:[``,`none`,u,Se,_e]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":[`none`,d,Se,_e]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:I()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[z,q]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":[`none`,f,Se,_e]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[z,J,K]}],"mix-blend":[{"mix-blend":[...se(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[z]}],"mask-image-linear-from-pos":[{"mask-linear-from":H()}],"mask-image-linear-to-pos":[{"mask-linear-to":H()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":H()}],"mask-image-t-to-pos":[{"mask-t-to":H()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":H()}],"mask-image-r-to-pos":[{"mask-r-to":H()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":H()}],"mask-image-b-to-pos":[{"mask-b-to":H()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":H()}],"mask-image-l-to-pos":[{"mask-l-to":H()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":H()}],"mask-image-x-to-pos":[{"mask-x-to":H()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":H()}],"mask-image-y-to-pos":[{"mask-y-to":H()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[J,K]}],"mask-image-radial-from-pos":[{"mask-radial-from":H()}],"mask-image-radial-to-pos":[{"mask-radial-to":H()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[z]}],"mask-image-conic-from-pos":[{"mask-conic-from":H()}],"mask-image-conic-to-pos":[{"mask-conic-to":H()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:ie()}],"mask-size":[{mask:ae()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,J,K]}],filter:[{filter:[``,`none`,J,K]}],blur:[{blur:U()}],brightness:[{brightness:[z,J,K]}],contrast:[{contrast:[z,J,K]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Se,_e]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:[``,z,J,K]}],"hue-rotate":[{"hue-rotate":[z,J,K]}],invert:[{invert:[``,z,J,K]}],saturate:[{saturate:[z,J,K]}],sepia:[{sepia:[``,z,J,K]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,J,K]}],"backdrop-blur":[{"backdrop-blur":U()}],"backdrop-brightness":[{"backdrop-brightness":[z,J,K]}],"backdrop-contrast":[{"backdrop-contrast":[z,J,K]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,z,J,K]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[z,J,K]}],"backdrop-invert":[{"backdrop-invert":[``,z,J,K]}],"backdrop-opacity":[{"backdrop-opacity":[z,J,K]}],"backdrop-saturate":[{"backdrop-saturate":[z,J,K]}],"backdrop-sepia":[{"backdrop-sepia":[``,z,J,K]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,J,K]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[z,`initial`,J,K]}],ease:[{ease:[`linear`,`initial`,_,J,K]}],delay:[{delay:[z,J,K]}],animate:[{animate:[`none`,v,J,K]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,J,K]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:W()}],"rotate-x":[{"rotate-x":W()}],"rotate-y":[{"rotate-y":W()}],"rotate-z":[{"rotate-z":W()}],scale:[{scale:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":[`scale-3d`],skew:[{skew:X()}],"skew-x":[{"skew-x":X()}],"skew-y":[{"skew-y":X()}],transform:[{transform:[J,K,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:Z()}],"translate-x":[{"translate-x":Z()}],"translate-y":[{"translate-y":Z()}],"translate-z":[{"translate-z":Z()}],"translate-none":[`translate-none`],accent:[{accent:N()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,J,K]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,J,K]}],fill:[{fill:[`none`,...N()]}],"stroke-w":[{stroke:[z,Y,q,fe]}],stroke:[{stroke:[`none`,...N()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Ne(...e){return Me(t(e))}function Pe(){return!!i()}function Fe(e,t){return e?``:t}var Q=e(n()),Ie=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);$(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},Le={},Re=(e,t,n,r)=>{$(n)&&Le[n]||($(n)&&(Le[n]=new Date),Ie(e,t,n,r))},ze=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},Be=(e,t,n)=>{e.loadNamespaces(t,ze(e,n))},Ve=(e,t,n,r)=>{if($(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Be(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,ze(e,r))},He=(e,t,n={})=>!t.languages||!t.languages.length?(Re(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),$=e=>typeof e==`string`,Ue=e=>typeof e==`object`&&!!e,We=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Ge={"&amp;":`&`,"&#38;":`&`,"&lt;":`<`,"&#60;":`<`,"&gt;":`>`,"&#62;":`>`,"&apos;":`'`,"&#39;":`'`,"&quot;":`"`,"&#34;":`"`,"&nbsp;":` `,"&#160;":` `,"&copy;":`©`,"&#169;":`©`,"&reg;":`®`,"&#174;":`®`,"&hellip;":`…`,"&#8230;":`…`,"&#x2F;":`/`,"&#47;":`/`},Ke=e=>Ge[e],qe={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:e=>e.replace(We,Ke),transDefaultProps:void 0},Je=(e={})=>{qe={...qe,...e}},Ye=()=>qe,Xe,Ze=e=>{Xe=e},Qe=()=>Xe,$e={type:`3rdParty`,init(e){Je(e.options.react),Ze(e)}},et=(0,Q.createContext)(),tt=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},nt=r(),rt={t:(e,t)=>{if($(t))return t;if(Ue(t)&&$(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},it=()=>()=>{},at=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,Q.useContext)(et)||{},a=n||r||Qe();a&&!a.reportNamespaces&&(a.reportNamespaces=new tt),a||Re(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next`);let o=(0,Q.useMemo)(()=>({...Ye(),...a?.options?.react,...t}),[a,t]),{useSuspense:s,keyPrefix:c}=o,l=e||i||a?.options?.defaultNS,u=$(l)?[l]:l||[`translation`],d=(0,Q.useMemo)(()=>u,u);a?.reportNamespaces?.addUsedNamespaces?.(d);let f=(0,Q.useRef)(0),p=(0,Q.useCallback)(e=>{if(!a)return it;let{bindI18n:t,bindI18nStore:n}=o,r=()=>{f.current+=1,e()};return t&&a.on(t,r),n&&a.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>a.off(e,r)),n&&n.split(` `).forEach(e=>a.store.off(e,r))}},[a,o]),m=(0,Q.useRef)(),h=(0,Q.useCallback)(()=>{if(!a)return rt;let e=!!(a.isInitialized||a.initializedStoreOnce)&&d.every(e=>He(e,a,o)),n=t.lng||a.language,r=f.current,i=m.current;if(i&&i.ready===e&&i.lng===n&&i.keyPrefix===c&&i.revision===r)return i;let s={t:a.getFixedT(n,o.nsMode===`fallback`?d:d[0],c),ready:e,lng:n,keyPrefix:c,revision:r};return m.current=s,s},[a,d,c,o,t.lng]),[g,_]=(0,Q.useState)(0),{t:v,ready:y}=(0,nt.useSyncExternalStore)(p,h,h);(0,Q.useEffect)(()=>{if(a&&!y&&!s){let e=()=>_(e=>e+1);t.lng?Ve(a,t.lng,d,e):Be(a,d,e)}},[a,t.lng,d,y,s,g]);let b=a||{},x=(0,Q.useRef)(null),S=(0,Q.useRef)(),C=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,`__original`,{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},w=(0,Q.useMemo)(()=>{let e=b,t=e?.language,n=e;e&&(x.current&&x.current.__original===e&&S.current===t?n=x.current:(n=C(e),x.current=n,S.current=t));let r=!y&&!s?(...e)=>(Re(a,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),v(...e)):v,i=[r,n,y];return i.t=r,i.i18n=n,i.ready=y,i},[v,b,y,b.resolvedLanguage,b.language,b.languages]);if(a&&s&&!y)throw new Promise(e=>{let n=()=>e();t.lng?Ve(a,t.lng,d,n):Be(a,d,n)});return w};export{Ne as a,Pe as i,$e as n,Fe as r,at as t};