@juliantanx/aiusage 1.0.3 → 1.0.5

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 (51) hide show
  1. package/README.md +393 -0
  2. package/dist/index.js +241 -38
  3. package/dist/web/_app/immutable/assets/0.DDbFsqNI.css +1 -0
  4. package/dist/web/_app/immutable/assets/2.fho1OPpm.css +1 -0
  5. package/dist/web/_app/immutable/assets/8.9sovMx-u.css +1 -0
  6. package/dist/web/_app/immutable/assets/9.Doxq00gF.css +1 -0
  7. package/dist/web/_app/immutable/assets/_layout.RgD-pTKj.css +1 -0
  8. package/dist/web/_app/immutable/assets/_page.9sovMx-u.css +1 -0
  9. package/dist/web/_app/immutable/assets/_page.DTuZozBR.css +1 -0
  10. package/dist/web/_app/immutable/assets/_page.Doxq00gF.css +1 -0
  11. package/dist/web/_app/immutable/chunks/ToolSelector.DIzQsA4_.js +2 -0
  12. package/dist/web/_app/immutable/chunks/api.D-M_rVlI.js +1 -0
  13. package/dist/web/_app/immutable/chunks/entry.DYaPgmil.js +3 -0
  14. package/dist/web/_app/immutable/chunks/{index.Dm-3G3np.js → index.BjVwNvJa.js} +1 -1
  15. package/dist/web/_app/immutable/chunks/{index.CzqoKkoo.js → index.CUfK07C5.js} +1 -1
  16. package/dist/web/_app/immutable/chunks/scheduler.DukoKnjQ.js +1 -0
  17. package/dist/web/_app/immutable/chunks/{stores.6YXFe6HN.js → stores.WJ5dxJwL.js} +1 -1
  18. package/dist/web/_app/immutable/entry/app.C6dQgA3c.js +2 -0
  19. package/dist/web/_app/immutable/entry/start.DIxZ9qE_.js +1 -0
  20. package/dist/web/_app/immutable/nodes/0.Dk6-dCHu.js +1 -0
  21. package/dist/web/_app/immutable/nodes/{1.CA3EXHZg.js → 1.CjGQp8zu.js} +1 -1
  22. package/dist/web/_app/immutable/nodes/{8.BSeUhVCa.js → 10.1LgqVOtM.js} +1 -1
  23. package/dist/web/_app/immutable/nodes/{9.DJXBgSiY.js → 11.BOfGogcw.js} +1 -1
  24. package/dist/web/_app/immutable/nodes/2.C_8jrQsV.js +3 -0
  25. package/dist/web/_app/immutable/nodes/{3.Bqg88zQg.js → 3.Lz_pbSpS.js} +1 -1
  26. package/dist/web/_app/immutable/nodes/{4.B3zrG0ip.js → 4.BCB36ta_.js} +1 -1
  27. package/dist/web/_app/immutable/nodes/{2.CJyBxUXd.js → 5.CykeLKzi.js} +1 -1
  28. package/dist/web/_app/immutable/nodes/{5.C3h9wXyF.js → 6.De73932o.js} +1 -1
  29. package/dist/web/_app/immutable/nodes/{6.C8xhym7b.js → 7.6OEKXCWR.js} +1 -1
  30. package/dist/web/_app/immutable/nodes/8.niqPZkB9.js +1 -0
  31. package/dist/web/_app/immutable/nodes/9.DRZSbXAV.js +1 -0
  32. package/dist/web/_app/version.json +1 -1
  33. package/dist/web/index.html +9 -9
  34. package/package.json +6 -3
  35. package/dist/web/_app/immutable/assets/0.BTUc0PXb.css +0 -1
  36. package/dist/web/_app/immutable/assets/7.8R_5Laqi.css +0 -1
  37. package/dist/web/_app/immutable/assets/_layout.DLyrrG29.css +0 -1
  38. package/dist/web/_app/immutable/assets/_page.8R_5Laqi.css +0 -1
  39. package/dist/web/_app/immutable/chunks/ToolSelector.kb97TteP.js +0 -2
  40. package/dist/web/_app/immutable/chunks/api.DyoIo4nG.js +0 -1
  41. package/dist/web/_app/immutable/chunks/entry.JnN5paQ1.js +0 -3
  42. package/dist/web/_app/immutable/chunks/scheduler.Dx1bs0RQ.js +0 -1
  43. package/dist/web/_app/immutable/entry/app.MBvJGLMp.js +0 -2
  44. package/dist/web/_app/immutable/entry/start.BQY9CnVO.js +0 -1
  45. package/dist/web/_app/immutable/nodes/0.BcLtzgbo.js +0 -1
  46. package/dist/web/_app/immutable/nodes/7.C950CTxa.js +0 -1
  47. /package/dist/web/_app/immutable/assets/{8.BcbNCOTS.css → 10.BcbNCOTS.css} +0 -0
  48. /package/dist/web/_app/immutable/assets/{9.QhlpTtkf.css → 11.QhlpTtkf.css} +0 -0
  49. /package/dist/web/_app/immutable/assets/{2.I4bgY8QS.css → 5.I4bgY8QS.css} +0 -0
  50. /package/dist/web/_app/immutable/assets/{5.BeDwa7mS.css → 6.BeDwa7mS.css} +0 -0
  51. /package/dist/web/_app/immutable/assets/{6.BYQidWiw.css → 7.BYQidWiw.css} +0 -0
@@ -0,0 +1 @@
1
+ import{w as d,d as u}from"./index.BjVwNvJa.js";function g(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}const c={en:{nav:{overview:"Overview",tokens:"Tokens",cost:"Cost",models:"Models",toolCalls:"Tool Calls",projects:"Projects",sessions:"Sessions",pricing:"Pricing",settings:"Settings"},common:{loading:"Loading...",error:"Error",noData:"No data available",noDataHint:"Start using AI tools to see statistics here.",apply:"Apply",all:"All",previous:"Previous",next:"Next",page:"Page",of:"of"},range:{today:"Today",week:"This Week",month:"This Month",last30:"Last 30d",allTime:"All Time",from:"From",to:"To",pickMonth:"Month..."},overview:{title:"Overview",totalTokens:"Total Tokens",totalCost:"Total Cost",activeDays:"Active Days",totalSessions:"Sessions",inputTokens:"Input",outputTokens:"Output",cacheRead:"Cache Read",cacheWrite:"Cache Write",byTool:"By AI Assistant",byProject:"By Project",topToolCalls:"Top Tool Calls",tool:"Tool",tokens:"Tokens",cost:"Cost",noToolData:"No data",noToolCalls:"No tool calls recorded"},tokens:{title:"Tokens",chartTitle:"Token Usage by Day",input:"Input",output:"Output",cacheRead:"Cache Read",cacheWrite:"Cache Write",thinking:"Thinking",date:"Date",total:"Total",noData:"No token data",noDataHint:"No token usage recorded for this period."},projects:{title:"Projects",project:"Project",sessions:"Sessions",tokens:"Tokens",cost:"Cost",share:"Share",noData:"No project data",noDataHint:"No project usage recorded for this period."},cost:{title:"Cost",totalCost:"Total Cost",chartTitle:"Cost by Day",byTool:"By AI Assistant",byModel:"By Model",noData:"No cost data",noDataHint:"No costs recorded for this period."},models:{title:"Models",model:"Model",provider:"Provider",calls:"Calls",tokens:"Tokens",share:"Share",noData:"No model data",noDataHint:"No model usage recorded for this period."},toolCalls:{title:"Tool Calls",noData:"No tool call data",noDataHint:"No tool calls recorded for this period."},sessions:{title:"Sessions",assistant:"AI Assistant",time:"Time",tool:"Tool",model:"Model",input:"Input",output:"Output",cost:"Cost",noData:"No sessions",noDataHint:"No sessions recorded for this period."},theme:{system:"System",dark:"Dark",light:"Light"},pricing:{title:"Pricing",model:"Model",input:"Input",output:"Output",cacheRead:"Cache Read",cacheWrite:"Cache Write",thinking:"Thinking",status:"Status",actions:"Actions",edit:"Edit",save:"Save",cancel:"Cancel",reset:"Reset",recalc:"Recalculate Costs",recalcDone:"Recalculated",default:"Default",override:"Custom",matched:"Matched by prefix",noPrice:"No pricing",perMillion:"/ 1M tokens"},sync:{trigger:"Sync",syncing:"Syncing...",started:"Sync started",inProgress:"Sync already running",complete:"Synced",failed:"Sync failed",notConfigured:"Not configured",lastSync:"Last sync",never:"Never"},device:{allDevices:"All Devices",loading:"Loading..."},tool:{allTools:"All tools"},settings:{title:"Settings",save:"Save",saved:"Saved",general:"General",sources:"Sources",sync:"Sync",syncHint:"Takes effect on next sync operation",data:"Data",device:"Device Alias",deviceHint:"Optional alias; hostname is used if blank",weekStart:"Week Starts On",weekStartSunday:"Sunday",weekStartMonday:"Monday (ISO)",pollInterval:"Dashboard Poll Interval (ms)",parseInterval:"Auto-Parse Interval (ms)",retentionDays:"Local Data Retention (days)",retentionHint:"Days to keep local data (0 or empty = keep forever)",sourcePath:"Custom path (leave empty for default; takes effect on next parse)",syncBackend:"Backend",syncBackendNone:"Disabled",syncRepo:"Repository (owner/repo)",syncBucket:"Bucket",syncPrefix:"S3 Object Prefix",syncEndpoint:"Endpoint",syncRegion:"Region",syncCredentialRef:"Credential Key Name",syncCredentialValue:"Credential Value",credentialSet:"Set — leave empty to keep",credentialNotSet:"Not set",showCredential:"Show",hideCredential:"Hide"},home:{counterLabel:"AI Tokens Consumed",cfgTitle:"Display Config",timeRange:"Time Range",numFormat:"Number Format",numExact:"Exact",numExactEx:"1,234,567",numShort:"Short",numShortEx:"1.234M",nextRefresh:"next refresh in",seconds:"s",refreshing:"refreshing…",manualMode:"manual mode",refreshNow:"↺ now",refreshBtn:"↺ refresh",refreshInfo:"Refresh interval set in",input:"Input",output:"Output",cache:"Cache"}},zh:{nav:{overview:"概览",tokens:"Token",cost:"费用",models:"模型",toolCalls:"工具调用",projects:"项目",sessions:"会话",pricing:"定价",settings:"设置"},common:{loading:"加载中...",error:"错误",noData:"暂无数据",noDataHint:"开始使用 AI 工具后,统计数据将显示在此处。",apply:"应用",all:"全部",previous:"上一页",next:"下一页",page:"第",of:"页,共"},range:{today:"今天",week:"本周",month:"本月",last30:"近 30 天",allTime:"全部",from:"开始",to:"结束",pickMonth:"选择月份..."},overview:{title:"概览",totalTokens:"总 Token",totalCost:"总费用",activeDays:"活跃天数",totalSessions:"会话数",inputTokens:"输入",outputTokens:"输出",cacheRead:"缓存读取",cacheWrite:"缓存写入",byTool:"按 AI 助手",byProject:"按项目",topToolCalls:"常用工具",tool:"工具",tokens:"Token",cost:"费用",noToolData:"暂无数据",noToolCalls:"暂无工具调用记录"},tokens:{title:"Token",chartTitle:"每日 Token 用量",input:"输入",output:"输出",cacheRead:"缓存读取",cacheWrite:"缓存写入",thinking:"思考",date:"日期",total:"合计",noData:"暂无 Token 数据",noDataHint:"当前时间段内无 Token 使用记录。"},projects:{title:"项目",project:"项目",sessions:"会话",tokens:"Token",cost:"费用",share:"占比",noData:"暂无项目数据",noDataHint:"当前时间段内无项目使用记录。"},cost:{title:"费用",totalCost:"总费用",chartTitle:"每日费用",byTool:"按 AI 助手",byModel:"按模型",noData:"暂无费用数据",noDataHint:"当前时间段内无费用记录。"},models:{title:"模型",model:"模型",provider:"提供商",calls:"调用次数",tokens:"Token",share:"占比",noData:"暂无模型数据",noDataHint:"当前时间段内无模型使用记录。"},toolCalls:{title:"工具调用",noData:"暂无工具调用数据",noDataHint:"当前时间段内无工具调用记录。"},sessions:{title:"会话",assistant:"AI 助手",time:"时间",tool:"工具",model:"模型",input:"输入",output:"输出",cost:"费用",noData:"暂无会话",noDataHint:"当前时间段内无会话记录。"},theme:{system:"跟随系统",dark:"深色",light:"浅色"},pricing:{title:"定价管理",model:"模型",input:"输入",output:"输出",cacheRead:"缓存读取",cacheWrite:"缓存写入",thinking:"思考",status:"状态",actions:"操作",edit:"编辑",save:"保存",cancel:"取消",reset:"重置",recalc:"重新计算费用",recalcDone:"已重新计算",default:"默认",override:"自定义",matched:"前缀匹配",noPrice:"无定价",perMillion:"/ 1M tokens"},sync:{trigger:"同步",syncing:"同步中...",started:"已开始同步",inProgress:"同步已在进行中",complete:"已同步",failed:"同步失败",notConfigured:"未配置",lastSync:"上次同步",never:"从未"},device:{allDevices:"全部设备",loading:"加载中..."},tool:{allTools:"全部工具"},settings:{title:"设置",save:"保存",saved:"已保存",general:"通用",sources:"数据源",sync:"同步",syncHint:"下次同步操作时生效",data:"数据管理",device:"设备别名",deviceHint:"可选别名;留空则使用主机名",weekStart:"每周起始日",weekStartSunday:"周日",weekStartMonday:"周一(ISO)",pollInterval:"仪表盘轮询间隔(ms)",parseInterval:"自动解析间隔(ms)",retentionDays:"本地数据保留天数",retentionHint:"0 或留空表示永久保留本地数据",sourcePath:"自定义路径(留空使用默认值;下次解析时生效)",syncBackend:"后端类型",syncBackendNone:"已禁用",syncRepo:"仓库(owner/repo)",syncBucket:"存储桶",syncPrefix:"S3 对象前缀",syncEndpoint:"Endpoint",syncRegion:"Region",syncCredentialRef:"凭据引用名",syncCredentialValue:"凭据值",credentialSet:"已设置,留空则不修改",credentialNotSet:"未设置",showCredential:"显示",hideCredential:"隐藏"},home:{counterLabel:"AI Token 消耗",cfgTitle:"显示配置",timeRange:"时间范围",numFormat:"数字格式",numExact:"精确",numExactEx:"1,234,567",numShort:"简短",numShortEx:"1.234M",nextRefresh:"下次刷新",seconds:"s",refreshing:"刷新中…",manualMode:"手动模式",refreshNow:"↺ 立即",refreshBtn:"↺ 刷新",refreshInfo:"刷新间隔在",input:"输入",output:"输出",cache:"缓存"}}};function p(){return typeof window>"u"?"en":localStorage.getItem("aiusage-lang")||"en"}const l=d(p());function y(){l.update(e=>{const t=e==="en"?"zh":"en";return typeof window<"u"&&localStorage.setItem("aiusage-lang",t),t})}const m=u(l,e=>{const t=c[e]||c.en;return o=>{const n=o.split(".");let s=t;for(const i of n)s=s==null?void 0:s[i];return s||o}});function r(e,t){const o=new URLSearchParams;for(const[s,i]of Object.entries(t))i&&o.set(s,i);const n=o.toString();return n?`${e}?${n}`:e}async function a(e){var o;const t=await fetch(e);if(!t.ok){const n=await t.json().catch(()=>({error:{message:"API error"}}));throw new Error(((o=n.error)==null?void 0:o.message)||`HTTP ${t.status}`)}return t.json()}async function T(e){return a(r("/api/summary",e))}async function k(e){return a(r("/api/tokens",e))}async function S(e){return a(r("/api/cost",e))}async function v(e){return a(r("/api/models",e))}async function w(e){return a(r("/api/tool-calls",e))}async function C(e){var t,o;return a(r("/api/sessions",{...e,page:(t=e.page)==null?void 0:t.toString(),pageSize:(o=e.pageSize)==null?void 0:o.toString()}))}async function D(e){return a(r("/api/projects",e))}async function P(){return a("/api/refresh")}async function I(){return a("/api/pricing")}async function j(e,t){var n;const o=await fetch("/api/pricing",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:e,...t})});if(!o.ok){const s=await o.json().catch(()=>({error:{message:"API error"}}));throw new Error(((n=s.error)==null?void 0:n.message)||`HTTP ${o.status}`)}return o.json()}async function N(e){var o;const t=await fetch(`/api/pricing?model=${encodeURIComponent(e)}`,{method:"DELETE"});if(!t.ok){const n=await t.json().catch(()=>({error:{message:"API error"}}));throw new Error(((o=n.error)==null?void 0:o.message)||`HTTP ${t.status}`)}return t.json()}async function A(){var t;const e=await fetch("/api/pricing/recalc",{method:"POST"});if(!e.ok){const o=await e.json().catch(()=>({error:{message:"API error"}}));throw new Error(((t=o.error)==null?void 0:t.message)||`HTTP ${e.status}`)}return e.json()}async function E(){var t;const e=await fetch("/api/sync",{method:"POST"});if(!e.ok){const o=await e.json().catch(()=>({error:{message:"API error"}}));throw new Error(((t=o.error)==null?void 0:t.message)||`HTTP ${e.status}`)}return e.json()}async function R(){return a("/api/sync")}async function H(){return a("/api/config")}async function M(e){return a(r("/api/config/credential",{ref:e}))}async function b(e){var o;const t=await fetch("/api/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const n=await t.json().catch(()=>({error:{message:"API error"}}));throw new Error(((o=n.error)==null?void 0:o.message)||`HTTP ${t.status}`)}return t.json()}const h="aiusage:settings-updated";function x(e){typeof window>"u"||window.dispatchEvent(new CustomEvent(h,{detail:e}))}export{h as S,v as a,T as b,I as c,N as d,g as e,S as f,A as g,D as h,C as i,H as j,M as k,k as l,w as m,x as n,R as o,E as p,y as q,P as r,b as s,m as t,j as u,l as v};
@@ -0,0 +1,3 @@
1
+ var mt=Object.defineProperty;var wt=(e,n,t)=>n in e?mt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var P=(e,n,t)=>wt(e,typeof n!="symbol"?n+"":n,t);import{o as je,t as yt}from"./scheduler.DukoKnjQ.js";import{w as ye}from"./index.BjVwNvJa.js";new URL("sveltekit-internal://");function _t(e,n){return e==="/"||n==="ignore"?e:n==="never"?e.endsWith("/")?e.slice(0,-1):e:n==="always"&&!e.endsWith("/")?e+"/":e}function vt(e){return e.split("%25").map(decodeURI).join("%25")}function bt(e){for(const n in e)e[n]=decodeURIComponent(e[n]);return e}function ue({href:e}){return e.split("#")[0]}function At(e,n,t,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(o,c){if(c==="get"||c==="getAll"||c==="has")return f=>(t(f),o[c](f));n();const i=Reflect.get(o,c);return typeof i=="function"?i.bind(o):i}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const o of s)Object.defineProperty(a,o,{get(){return n(),e[o]},enumerable:!0,configurable:!0});return a}const kt="/__data.json",Et=".html__data.json";function St(e){return e.endsWith(".html")?e.replace(/\.html$/,Et):e.replace(/\/$/,"")+kt}function Rt(...e){let n=5381;for(const t of e)if(typeof t=="string"){let r=t.length;for(;r;)n=n*33^t.charCodeAt(--r)}else if(ArrayBuffer.isView(t)){const r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);let a=r.length;for(;a;)n=n*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(n>>>0).toString(36)}function It(e){const n=atob(e),t=new Uint8Array(n.length);for(let r=0;r<n.length;r++)t[r]=n.charCodeAt(r);return t.buffer}const He=window.fetch;window.fetch=(e,n)=>((e instanceof Request?e.method:(n==null?void 0:n.method)||"GET")!=="GET"&&M.delete(_e(e)),He(e,n));const M=new Map;function Ut(e,n){const t=_e(e,n),r=document.querySelector(t);if(r!=null&&r.textContent){let{body:a,...s}=JSON.parse(r.textContent);const o=r.getAttribute("data-ttl");return o&&M.set(t,{body:a,init:s,ttl:1e3*Number(o)}),r.getAttribute("data-b64")!==null&&(a=It(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,n)}function Tt(e,n,t){if(M.size>0){const r=_e(e,t),a=M.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(t==null?void 0:t.cache))return new Response(a.body,a.init);M.delete(r)}}return window.fetch(n,t)}function _e(e,n){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(n!=null&&n.headers||n!=null&&n.body){const a=[];n.headers&&a.push([...new Headers(n.headers)].join(",")),n.body&&(typeof n.body=="string"||ArrayBuffer.isView(n.body))&&a.push(n.body),r+=`[data-hash="${Rt(...a)}"]`}return r}const Lt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Pt(e){const n=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${jt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return n.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return n.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const o=r.split(/\[(.+?)\](?!\])/);return"/"+o.map((i,f)=>{if(f%2){if(i.startsWith("x+"))return de(String.fromCharCode(parseInt(i.slice(2),16)));if(i.startsWith("u+"))return de(String.fromCharCode(...i.slice(2).split("-").map(l=>parseInt(l,16))));const h=Lt.exec(i),[,u,g,p,d]=h;return n.push({name:p,matcher:d,optional:!!u,rest:!!g,chained:g?f===1&&o[0]==="":!1}),g?"(.*?)":u?"([^/]*)?":"([^/]+?)"}return de(i)}).join("")}).join("")}/?$`),params:n}}function Ot(e){return!/^\([^)]+\)$/.test(e)}function jt(e){return e.slice(1).split("/").filter(Ot)}function Nt(e,n,t){const r={},a=e.slice(1),s=a.filter(c=>c!==void 0);let o=0;for(let c=0;c<n.length;c+=1){const i=n[c];let f=a[c-o];if(i.chained&&i.rest&&o&&(f=a.slice(c-o,c+1).filter(h=>h).join("/"),o=0),f===void 0){i.rest&&(r[i.name]="");continue}if(!i.matcher||t[i.matcher](f)){r[i.name]=f;const h=n[c+1],u=a[c+1];h&&!h.rest&&h.optional&&u&&i.chained&&(o=0),!h&&!u&&Object.keys(r).length===s.length&&(o=0);continue}if(i.optional&&i.chained){o++;continue}return}if(!o)return r}function de(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function $t({nodes:e,server_loads:n,dictionary:t,matchers:r}){const a=new Set(n);return Object.entries(t).map(([c,[i,f,h]])=>{const{pattern:u,params:g}=Pt(c),p={id:c,exec:d=>{const l=u.exec(d);if(l)return Nt(l,g,r)},errors:[1,...h||[]].map(d=>e[d]),layouts:[0,...f||[]].map(o),leaf:s(i)};return p.errors.length=p.layouts.length=Math.max(p.errors.length,p.layouts.length),p});function s(c){const i=c<0;return i&&(c=~c),[i,e[c]]}function o(c){return c===void 0?c:[a.has(c),e[c]]}}function Ke(e,n=JSON.parse){try{return n(sessionStorage[e])}catch{}}function Ne(e,n,t=JSON.stringify){const r=t(n);try{sessionStorage[e]=r}catch{}}var Me;const L=((Me=globalThis.__sveltekit_1azk3th)==null?void 0:Me.base)??"";var qe;const xt=((qe=globalThis.__sveltekit_1azk3th)==null?void 0:qe.assets)??L,Ct="1779003570696",We="sveltekit:snapshot",Ye="sveltekit:scroll",ze="sveltekit:states",Dt="sveltekit:pageurl",C="sveltekit:history",H="sveltekit:navigation",J={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},z=location.origin;function Je(e){if(e instanceof URL)return e;let n=document.baseURI;if(!n){const t=document.getElementsByTagName("base");n=t.length?t[0].href:document.URL}return new URL(e,n)}function ve(){return{x:pageXOffset,y:pageYOffset}}function x(e,n){return e.getAttribute(`data-sveltekit-${n}`)}const $e={...J,"":J.hover};function Xe(e){let n=e.assignedSlot??e.parentNode;return(n==null?void 0:n.nodeType)===11&&(n=n.host),n}function Ze(e,n){for(;e&&e!==n;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Xe(e)}}function ge(e,n,t){let r;try{r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI)}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||oe(r,n,t)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),o=(r==null?void 0:r.origin)===z&&e.hasAttribute("download");return{url:r,external:s,target:a,download:o}}function X(e){let n=null,t=null,r=null,a=null,s=null,o=null,c=e;for(;c&&c!==document.documentElement;)r===null&&(r=x(c,"preload-code")),a===null&&(a=x(c,"preload-data")),n===null&&(n=x(c,"keepfocus")),t===null&&(t=x(c,"noscroll")),s===null&&(s=x(c,"reload")),o===null&&(o=x(c,"replacestate")),c=Xe(c);function i(f){switch(f){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:$e[r??"off"],preload_data:$e[a??"off"],keepfocus:i(n),noscroll:i(t),reload:i(s),replace_state:i(o)}}function xe(e){const n=ye(e);let t=!0;function r(){t=!0,n.update(o=>o)}function a(o){t=!1,n.set(o)}function s(o){let c;return n.subscribe(i=>{(c===void 0||t&&i!==c)&&o(c=i)})}return{notify:r,set:a,subscribe:s}}const Qe={v:()=>{}};function Bt(){const{set:e,subscribe:n}=ye(!1);let t;async function r(){clearTimeout(t);try{const a=await fetch(`${xt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const o=(await a.json()).version!==Ct;return o&&(e(!0),Qe.v(),clearTimeout(t)),o}catch{return!1}}return{subscribe:n,check:r}}function oe(e,n,t){return e.origin!==z||!e.pathname.startsWith(n)?!0:t?!(e.pathname===n+"/"||e.protocol==="file:"&&e.pathname.replace(/\/[^/]+\.html?$/,"")===n):!1}function Ft(e){return Uint8Array.fromBase64(e).buffer}function Vt(e){return Uint8Array.from(Buffer.from(e,"base64")).buffer}function Mt(e){const n=atob(e),t=n.length,r=new Uint8Array(t);for(let a=0;a<t;a++)r[a]=n.charCodeAt(a);return r.buffer}const qt=typeof Uint8Array.fromBase64=="function";var Ge;const Gt=typeof process=="object"&&((Ge=process.versions)==null?void 0:Ge.node)!==void 0,Ht=qt?Ft:Gt?Vt:Mt,Kt=-1,Wt=-2,Yt=-3,zt=-4,Jt=-5,Xt=-6,Zt=-7;function Qt(e,n){if(typeof e=="number")return s(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const t=e,r=Array(t.length);let a=null;function s(o,c=!1){if(o===Kt)return;if(o===Yt)return NaN;if(o===zt)return 1/0;if(o===Jt)return-1/0;if(o===Xt)return-0;if(c||typeof o!="number")throw new Error("Invalid input");if(o in r)return r[o];const i=t[o];if(!i||typeof i!="object")r[o]=i;else if(Array.isArray(i))if(typeof i[0]=="string"){const f=i[0],h=n&&Object.hasOwn(n,f)?n[f]:void 0;if(h){let u=i[1];if(typeof u!="number"&&(u=t.push(i[1])-1),a??(a=new Set),a.has(u))throw new Error("Invalid circular reference");return a.add(u),r[o]=h(s(u)),a.delete(u),r[o]}switch(f){case"Date":r[o]=new Date(i[1]);break;case"Set":const u=new Set;r[o]=u;for(let d=1;d<i.length;d+=1)u.add(s(i[d]));break;case"Map":const g=new Map;r[o]=g;for(let d=1;d<i.length;d+=2)g.set(s(i[d]),s(i[d+1]));break;case"RegExp":r[o]=new RegExp(i[1],i[2]);break;case"Object":{const d=i[1];if(typeof t[d]=="object"&&t[d][0]!=="BigInt")throw new Error("Invalid input");r[o]=Object(s(d));break}case"BigInt":r[o]=BigInt(i[1]);break;case"null":const p=Object.create(null);r[o]=p;for(let d=1;d<i.length;d+=2){if(i[d]==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");p[i[d]]=s(i[d+1])}break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Float16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":case"DataView":{if(t[i[1]][0]!=="ArrayBuffer")throw new Error("Invalid data");const d=globalThis[f],l=s(i[1]);r[o]=i[2]!==void 0?new d(l,i[2],i[3]):new d(l);break}case"ArrayBuffer":{const d=i[1];if(typeof d!="string")throw new Error("Invalid ArrayBuffer encoding");const l=Ht(d);r[o]=l;break}case"Temporal.Duration":case"Temporal.Instant":case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.PlainMonthDay":case"Temporal.PlainYearMonth":case"Temporal.ZonedDateTime":{const d=f.slice(9);r[o]=Temporal[d].from(i[1]);break}case"URL":{const d=new URL(i[1]);r[o]=d;break}case"URLSearchParams":{const d=new URLSearchParams(i[1]);r[o]=d;break}default:throw new Error(`Unknown type ${f}`)}}else if(i[0]===Zt){const f=i[1];if(!Number.isInteger(f)||f<0)throw new Error("Invalid input");const h=new Array(f);r[o]=h;for(let u=2;u<i.length;u+=2){const g=i[u];if(!Number.isInteger(g)||g<0||g>=f)throw new Error("Invalid input");h[g]=s(i[u+1])}}else{const f=new Array(i.length);r[o]=f;for(let h=0;h<i.length;h+=1){const u=i[h];u!==Wt&&(f[h]=s(u))}}else{const f={};r[o]=f;for(const h of Object.keys(i)){if(h==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");const u=i[h];f[h]=s(u)}}return r[o]}return s(0)}const et=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...et];const en=new Set([...et]);[...en];function tn(e){return e.filter(n=>n!=null)}class se{constructor(n,t){this.status=n,typeof t=="string"?this.body={message:t}:t?this.body=t:this.body={message:`Error: ${n}`}}toString(){return JSON.stringify(this.body)}}class be{constructor(n,t){this.status=n,this.location=t}}class Ae extends Error{constructor(n,t,r){super(r),this.status=n,this.text=t}}const nn="x-sveltekit-invalidated",rn="x-sveltekit-trailing-slash";function Z(e){return e instanceof se||e instanceof Ae?e.status:500}function an(e){return e instanceof Ae?e.text:"Internal Error"}let I,K,he;const on=je.toString().includes("$$")||/function \w+\(\) \{\}/.test(je.toString());on?(I={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},K={current:null},he={current:!1}):(I=new class{constructor(){P(this,"data",$state.raw({}));P(this,"form",$state.raw(null));P(this,"error",$state.raw(null));P(this,"params",$state.raw({}));P(this,"route",$state.raw({id:null}));P(this,"state",$state.raw({}));P(this,"status",$state.raw(-1));P(this,"url",$state.raw(new URL("https://example.com")))}},K=new class{constructor(){P(this,"current",$state.raw(null))}},he=new class{constructor(){P(this,"current",$state.raw(!1))}},Qe.v=()=>he.current=!0);function sn(e){Object.assign(I,e)}const cn=new Set(["icon","shortcut icon","apple-touch-icon"]),$=Ke(Ye)??{},W=Ke(We)??{},j={url:xe({}),page:xe({}),navigating:ye(null),updated:Bt()};function ke(e){$[e]=ve()}function ln(e,n){let t=e+1;for(;$[t];)delete $[t],t+=1;for(t=n+1;W[t];)delete W[t],t+=1}function B(e){return location.href=e.href,new Promise(()=>{})}async function tt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(L||"/");e&&await e.update()}}function Ce(){}let ie,me,Q,O,we,A;const nt=[],ee=[];let U=null;const rt=new Set,fn=new Set,q=new Set;let y={branch:[],error:null,url:null},Ee=!1,te=!1,De=!0,Y=!1,F=!1,at=!1,Se=!1,ot,R,T,ne;const G=new Set;async function Rn(e,n,t){var a,s,o,c;document.URL!==location.href&&(location.href=location.href),A=e,await((s=(a=e.hooks).init)==null?void 0:s.call(a)),ie=$t(e),O=document.documentElement,we=n,me=e.nodes[0],Q=e.nodes[1],me(),Q(),R=(o=history.state)==null?void 0:o[C],T=(c=history.state)==null?void 0:c[H],R||(R=T=Date.now(),history.replaceState({...history.state,[C]:R,[H]:T},""));const r=$[R];r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y)),t?await yn(we,t):mn(location.href,{replaceState:!0}),wn()}function un(){nt.length=0,Se=!1}function st(e){ee.some(n=>n==null?void 0:n.snapshot)&&(W[e]=ee.map(n=>{var t;return(t=n==null?void 0:n.snapshot)==null?void 0:t.capture()}))}function it(e){var n;(n=W[e])==null||n.forEach((t,r)=>{var a,s;(s=(a=ee[r])==null?void 0:a.snapshot)==null||s.restore(t)})}function Be(){ke(R),Ne(Ye,$),st(T),Ne(We,W)}async function Re(e,n,t,r){return V({type:"goto",url:Je(e),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:t,nav_token:r,accept:()=>{n.invalidateAll&&(Se=!0)}})}async function dn(e){if(e.id!==(U==null?void 0:U.id)){const n={};G.add(n),U={id:e.id,token:n,promise:lt({...e,preload:n}).then(t=>(G.delete(n),t.type==="loaded"&&t.state.error&&(U=null),t))}}return U.promise}async function pe(e){const n=ie.find(t=>t.exec(ft(e)));n&&await Promise.all([...n.layouts,n.leaf].map(t=>t==null?void 0:t[1]()))}function ct(e,n,t){var s;y=e.state;const r=document.querySelector("style[data-sveltekit]");r&&r.remove(),Object.assign(I,e.props.page),ot=new A.root({target:n,props:{...e.props,stores:j,components:ee},hydrate:t,sync:!1}),it(T);const a={from:null,to:{params:y.params,route:{id:((s=y.route)==null?void 0:s.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};q.forEach(o=>o(a)),te=!0}function re({url:e,params:n,branch:t,status:r,error:a,route:s,form:o}){let c="never";if(L&&(e.pathname===L||e.pathname===L+"/"))c="always";else for(const p of t)(p==null?void 0:p.slash)!==void 0&&(c=p.slash);e.pathname=_t(e.pathname,c),e.search=e.search;const i={type:"loaded",state:{url:e,params:n,branch:t,error:a,route:s},props:{constructors:tn(t).map(p=>p.node.component),page:Le(I)}};o!==void 0&&(i.props.form=o);let f={},h=!I,u=0;for(let p=0;p<Math.max(t.length,y.branch.length);p+=1){const d=t[p],l=y.branch[p];(d==null?void 0:d.data)!==(l==null?void 0:l.data)&&(h=!0),d&&(f={...f,...d.data},h&&(i.props[`data_${u}`]=f),u+=1)}return(!y.url||e.href!==y.url.href||y.error!==a||o!==void 0&&o!==I.form||h)&&(i.props.page={error:a,params:n,route:{id:(s==null?void 0:s.id)??null},state:{},status:r,url:new URL(e),form:o??null,data:h?f:I.data}),i}async function Ie({loader:e,parent:n,url:t,params:r,route:a,server_data_node:s}){var h,u,g;let o=null,c=!0;const i={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},f=await e();if((h=f.universal)!=null&&h.load){let p=function(...l){for(const m of l){const{href:b}=new URL(m,t);i.dependencies.add(b)}};const d={route:new Proxy(a,{get:(l,m)=>(c&&(i.route=!0),l[m])}),params:new Proxy(r,{get:(l,m)=>(c&&i.params.add(m),l[m])}),data:(s==null?void 0:s.data)??null,url:At(t,()=>{c&&(i.url=!0)},l=>{c&&i.search_params.add(l)},A.hash),async fetch(l,m){let b;l instanceof Request?(b=l.url,m={body:l.method==="GET"||l.method==="HEAD"?void 0:await l.blob(),cache:l.cache,credentials:l.credentials,headers:[...l.headers].length?l.headers:void 0,integrity:l.integrity,keepalive:l.keepalive,method:l.method,mode:l.mode,redirect:l.redirect,referrer:l.referrer,referrerPolicy:l.referrerPolicy,signal:l.signal,...m}):b=l;const E=new URL(b,t);return c&&p(E.href),E.origin===t.origin&&(b=E.href.slice(t.origin.length)),te?Tt(b,E.href,m):Ut(b,m)},setHeaders:()=>{},depends:p,parent(){return c&&(i.parent=!0),n()},untrack(l){c=!1;try{return l()}finally{c=!0}}};o=await f.universal.load.call(null,d)??null}return{node:f,loader:e,server:s,universal:(u=f.universal)!=null&&u.load?{type:"data",data:o,uses:i}:null,data:o??(s==null?void 0:s.data)??null,slash:((g=f.universal)==null?void 0:g.trailingSlash)??(s==null?void 0:s.slash)}}function Fe(e,n,t,r,a,s){if(Se)return!0;if(!a)return!1;if(a.parent&&e||a.route&&n||a.url&&t)return!0;for(const o of a.search_params)if(r.has(o))return!0;for(const o of a.params)if(s[o]!==y.params[o])return!0;for(const o of a.dependencies)if(nt.some(c=>c(new URL(o))))return!0;return!1}function Ue(e,n){return(e==null?void 0:e.type)==="data"?e:(e==null?void 0:e.type)==="skip"?n??null:null}function hn(e,n){if(!e)return new Set(n.searchParams.keys());const t=new Set([...e.searchParams.keys(),...n.searchParams.keys()]);for(const r of t){const a=e.searchParams.getAll(r),s=n.searchParams.getAll(r);a.every(o=>s.includes(o))&&s.every(o=>a.includes(o))&&t.delete(r)}return t}function Ve({error:e,url:n,route:t,params:r}){return{type:"loaded",state:{error:e,url:n,route:t,params:r,branch:[]},props:{page:Le(I),constructors:[]}}}async function lt({id:e,invalidating:n,url:t,params:r,route:a,preload:s}){if((U==null?void 0:U.id)===e)return G.delete(U.token),U.promise;const{errors:o,layouts:c,leaf:i}=a,f=[...c,i];o.forEach(w=>w==null?void 0:w().catch(()=>{})),f.forEach(w=>w==null?void 0:w[1]().catch(()=>{}));let h=null;const u=y.url?e!==ae(y.url):!1,g=y.route?a.id!==y.route.id:!1,p=hn(y.url,t);let d=!1;const l=f.map((w,_)=>{var N;const k=y.branch[_],S=!!(w!=null&&w[0])&&((k==null?void 0:k.loader)!==w[1]||Fe(d,g,u,p,(N=k.server)==null?void 0:N.uses,r));return S&&(d=!0),S});if(l.some(Boolean)){try{h=await ht(t,l)}catch(w){const _=await D(w,{url:t,params:r,route:{id:e}});return G.has(s)?Ve({error:_,url:t,params:r,route:a}):ce({status:Z(w),error:_,url:t,route:a})}if(h.type==="redirect")return h}const m=h==null?void 0:h.nodes;let b=!1;const E=f.map(async(w,_)=>{var le;if(!w)return;const k=y.branch[_],S=m==null?void 0:m[_];if((!S||S.type==="skip")&&w[1]===(k==null?void 0:k.loader)&&!Fe(b,g,u,p,(le=k.universal)==null?void 0:le.uses,r))return k;if(b=!0,(S==null?void 0:S.type)==="error")throw S;return Ie({loader:w[1],url:t,params:r,route:a,parent:async()=>{var Oe;const Pe={};for(let fe=0;fe<_;fe+=1)Object.assign(Pe,(Oe=await E[fe])==null?void 0:Oe.data);return Pe},server_data_node:Ue(S===void 0&&w[0]?{type:"skip"}:S??null,w[0]?k==null?void 0:k.server:void 0)})});for(const w of E)w.catch(()=>{});const v=[];for(let w=0;w<f.length;w+=1)if(f[w])try{v.push(await E[w])}catch(_){if(_ instanceof be)return{type:"redirect",location:_.location};if(G.has(s))return Ve({error:await D(_,{params:r,url:t,route:{id:a.id}}),url:t,params:r,route:a});let k=Z(_),S;if(m!=null&&m.includes(_))k=_.status??k,S=_.error;else if(_ instanceof se)S=_.body;else{if(await j.updated.check())return await tt(),await B(t);S=await D(_,{params:r,url:t,route:{id:a.id}})}const N=await pn(w,v,o);return N?re({url:t,params:r,branch:v.slice(0,N.idx).concat(N.node),status:k,error:S,route:a}):await dt(t,{id:a.id},S,k)}else v.push(void 0);return re({url:t,params:r,branch:v,status:200,error:null,route:a,form:n?void 0:null})}async function pn(e,n,t){for(;e--;)if(t[e]){let r=e;for(;!n[r];)r-=1;try{return{idx:r+1,node:{node:await t[e](),loader:t[e],data:{},server:null,universal:null}}}catch{continue}}}async function ce({status:e,error:n,url:t,route:r}){const a={};let s=null;if(A.server_loads[0]===0)try{const c=await ht(t,[!0]);if(c.type!=="data"||c.nodes[0]&&c.nodes[0].type!=="data")throw 0;s=c.nodes[0]??null}catch{(t.origin!==z||t.pathname!==location.pathname||Ee)&&await B(t)}try{const c=await Ie({loader:me,url:t,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Ue(s)}),i={node:await Q(),loader:Q,universal:null,server:null,data:null};return re({url:t,params:a,branch:[c,i],status:e,error:n,route:null})}catch(c){if(c instanceof be)return Re(new URL(c.location,location.href),{},0);throw c}}function Te(e,n){if(!e||oe(e,L,A.hash))return;let t;try{if(t=A.hooks.reroute({url:new URL(e)})??e,typeof t=="string"){const a=new URL(e);A.hash?a.hash=t:a.pathname=t,t=a}}catch{return}const r=ft(t);for(const a of ie){const s=a.exec(r);if(s)return{id:ae(e),invalidating:n,route:a,params:bt(s),url:e}}}function ft(e){return vt(A.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(L.length))||"/"}function ae(e){return(A.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ut({url:e,type:n,intent:t,delta:r}){let a=!1;const s=gt(y,t,e,n);r!==void 0&&(s.navigation.delta=r);const o={...s.navigation,cancel:()=>{a=!0,s.reject(new Error("navigation cancelled"))}};return Y||rt.forEach(c=>c(o)),a?null:s}async function V({type:e,url:n,popped:t,keepfocus:r,noscroll:a,replace_state:s,state:o={},redirect_count:c=0,nav_token:i={},accept:f=Ce,block:h=Ce}){const u=Te(n,!1),g=ut({url:n,type:e,delta:t==null?void 0:t.delta,intent:u});if(!g){h();return}const p=R,d=T;f(),Y=!0,te&&j.navigating.set(K.current=g.navigation),ne=i;let l=u&&await lt(u);if(!l){if(oe(n,L,A.hash))return await B(n);l=await dt(n,{id:null},await D(new Ae(404,"Not Found",`Not found: ${n.pathname}`),{url:n,params:{},route:{id:null}}),404)}if(n=(u==null?void 0:u.url)||n,ne!==i)return g.reject(new Error("navigation aborted")),!1;if(l.type==="redirect")if(c>=20)l=await ce({status:500,error:await D(new Error("Redirect loop"),{url:n,params:{},route:{id:null}}),url:n,route:{id:null}});else return Re(new URL(l.location,n).href,{},c+1,i),!1;else l.props.page.status>=400&&await j.updated.check()&&(await tt(),await B(n));if(un(),ke(p),st(d),l.props.page.url.pathname!==n.pathname&&(n.pathname=l.props.page.url.pathname),o=t?t.state:o,!t){const v=s?0:1,w={[C]:R+=v,[H]:T+=v,[ze]:o};(s?history.replaceState:history.pushState).call(history,w,"",n),s||ln(R,T)}if(U=null,l.props.page.state=o,te){y=l.state,l.props.page&&(l.props.page.url=n);const v=(await Promise.all(Array.from(fn,w=>w(g.navigation)))).filter(w=>typeof w=="function");if(v.length>0){let w=function(){v.forEach(_=>{q.delete(_)})};v.push(w),v.forEach(_=>{q.add(_)})}ot.$set(l.props),sn(l.props.page),at=!0}else ct(l,we,!1);const{activeElement:m}=document;await yt();const b=t?t.scroll:a?ve():null;if(De){const v=n.hash&&document.getElementById(decodeURIComponent(A.hash?n.hash.split("#")[2]??"":n.hash.slice(1)));b?scrollTo(b.x,b.y):v?v.scrollIntoView():scrollTo(0,0)}const E=document.activeElement!==m&&document.activeElement!==document.body;!r&&!E&&_n(),De=!0,l.props.page&&Object.assign(I,l.props.page),Y=!1,e==="popstate"&&it(T),g.fulfil(void 0),q.forEach(v=>v(g.navigation)),j.navigating.set(K.current=null)}async function dt(e,n,t,r){return e.origin===z&&e.pathname===location.pathname&&!Ee?await ce({status:r,error:t,url:e,route:n}):await B(e)}function gn(){let e;O.addEventListener("mousemove",s=>{const o=s.target;clearTimeout(e),e=setTimeout(()=>{r(o,2)},20)});function n(s){s.defaultPrevented||r(s.composedPath()[0],1)}O.addEventListener("mousedown",n),O.addEventListener("touchstart",n,{passive:!0});const t=new IntersectionObserver(s=>{for(const o of s)o.isIntersecting&&(pe(new URL(o.target.href)),t.unobserve(o.target))},{threshold:0});function r(s,o){const c=Ze(s,O);if(!c)return;const{url:i,external:f,download:h}=ge(c,L,A.hash);if(f||h)return;const u=X(c),g=i&&ae(y.url)===ae(i);if(!u.reload&&!g)if(o<=u.preload_data){const p=Te(i,!1);p&&dn(p)}else o<=u.preload_code&&pe(i)}function a(){t.disconnect();for(const s of O.querySelectorAll("a")){const{url:o,external:c,download:i}=ge(s,L,A.hash);if(c||i)continue;const f=X(s);f.reload||(f.preload_code===J.viewport&&t.observe(s),f.preload_code===J.eager&&pe(o))}}q.add(a),a()}function D(e,n){if(e instanceof se)return e.body;const t=Z(e),r=an(e);return A.hooks.handleError({error:e,event:n,status:t,message:r})??{message:r}}function mn(e,n={}){return e=new URL(Je(e)),e.origin!==z?Promise.reject(new Error("goto: invalid URL")):Re(e,n,0)}function wn(){var n;history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let r=!1;if(Be(),!Y){const a=gt(y,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};rt.forEach(o=>o(s))}r?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Be()}),(n=navigator.connection)!=null&&n.saveData||gn(),O.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const r=Ze(t.composedPath()[0],O);if(!r)return;const{url:a,external:s,target:o,download:c}=ge(r,L,A.hash);if(!a)return;if(o==="_parent"||o==="_top"){if(window.parent!==window)return}else if(o&&o!=="_self")return;const i=X(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||c)return;const[h,u]=(A.hash?a.hash.replace(/^#/,""):a.href).split("#"),g=h===ue(location);if(s||i.reload&&(!g||!u)){ut({url:a,type:"link"})?Y=!0:t.preventDefault();return}if(u!==void 0&&g){const[,p]=y.url.href.split("#");if(p===u){if(t.preventDefault(),u===""||u==="top"&&r.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const d=r.ownerDocument.getElementById(decodeURIComponent(u));d&&(d.scrollIntoView(),d.focus())}return}if(F=!0,ke(R),e(a),!i.replace_state)return;F=!1}t.preventDefault(),await new Promise(p=>{requestAnimationFrame(()=>{setTimeout(p,0)}),setTimeout(p,100)}),V({type:"link",url:a,keepfocus:i.keepfocus,noscroll:i.noscroll,replace_state:i.replace_state??a.href===location.href})}),O.addEventListener("submit",t=>{if(t.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(t.target),a=t.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const c=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(oe(c,L,!1))return;const i=t.target,f=X(i);if(f.reload)return;t.preventDefault(),t.stopPropagation();const h=new FormData(i),u=a==null?void 0:a.getAttribute("name");u&&h.append(u,(a==null?void 0:a.getAttribute("value"))??""),c.search=new URLSearchParams(h).toString(),V({type:"form",url:c,keepfocus:f.keepfocus,noscroll:f.noscroll,replace_state:f.replace_state??c.href===location.href})}),addEventListener("popstate",async t=>{var r;if((r=t.state)!=null&&r[C]){const a=t.state[C];if(ne={},a===R)return;const s=$[a],o=t.state[ze]??{},c=new URL(t.state[Dt]??location.href),i=t.state[H],f=y.url?ue(location)===ue(y.url):!1;if(i===T&&(at||f)){o!==I.state&&(I.state=o),e(c),$[R]=ve(),s&&scrollTo(s.x,s.y),R=a;return}const u=a-R;await V({type:"popstate",url:c,popped:{state:o,scroll:s,delta:u},accept:()=>{R=a,T=i},block:()=>{history.go(-u)},nav_token:ne})}else if(!F){const a=new URL(location.href);e(a)}}),addEventListener("hashchange",()=>{F?(F=!1,history.replaceState({...history.state,[C]:++R,[H]:T},"",location.href)):A.hash&&y.url.hash===location.hash&&V({type:"goto",url:y.url})});for(const t of document.querySelectorAll("link"))cn.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&j.navigating.set(K.current=null)});function e(t){y.url=I.url=t,j.page.set(Le(I)),j.page.notify()}}async function yn(e,{status:n=200,error:t,node_ids:r,params:a,route:s,data:o,form:c}){Ee=!0;const i=new URL(location.href);({params:a={},route:s={id:null}}=Te(i,!1)||{});let f,h=!0;try{const u=r.map(async(d,l)=>{const m=o[l];return m!=null&&m.uses&&(m.uses=pt(m.uses)),Ie({loader:A.nodes[d],url:i,params:a,route:s,parent:async()=>{const b={};for(let E=0;E<l;E+=1)Object.assign(b,(await u[E]).data);return b},server_data_node:Ue(m)})}),g=await Promise.all(u),p=ie.find(({id:d})=>d===s.id);if(p){const d=p.layouts;for(let l=0;l<d.length;l++)d[l]||g.splice(l,0,void 0)}f=re({url:i,params:a,branch:g,status:n,error:t,form:c,route:p??null})}catch(u){if(u instanceof be){await B(new URL(u.location,location.href));return}f=await ce({status:Z(u),error:await D(u,{url:i,params:a,route:s}),url:i,route:s}),e.textContent="",h=!1}f.props.page&&(f.props.page.state={}),ct(f,e,h)}async function ht(e,n){var a;const t=new URL(e);t.pathname=St(e.pathname),e.pathname.endsWith("/")&&t.searchParams.append(rn,"1"),t.searchParams.append(nn,n.map(s=>s?"1":"0").join(""));const r=await He(t.href);if(!r.ok){let s;throw(a=r.headers.get("content-type"))!=null&&a.includes("application/json")?s=await r.json():r.status===404?s="Not Found":r.status===500&&(s="Internal Error"),new se(r.status,s)}return new Promise(async s=>{var u;const o=new Map,c=r.body.getReader(),i=new TextDecoder;function f(g){return Qt(g,{...A.decoders,Promise:p=>new Promise((d,l)=>{o.set(p,{fulfil:d,reject:l})})})}let h="";for(;;){const{done:g,value:p}=await c.read();if(g&&!h)break;for(h+=!p&&h?`
2
+ `:i.decode(p,{stream:!0});;){const d=h.indexOf(`
3
+ `);if(d===-1)break;const l=JSON.parse(h.slice(0,d));if(h=h.slice(d+1),l.type==="redirect")return s(l);if(l.type==="data")(u=l.nodes)==null||u.forEach(m=>{(m==null?void 0:m.type)==="data"&&(m.uses=pt(m.uses),m.data=f(m.data))}),s(l);else if(l.type==="chunk"){const{id:m,data:b,error:E}=l,v=o.get(m);o.delete(m),E?v.reject(f(E)):v.fulfil(f(b))}}}})}function pt(e){return{dependencies:new Set((e==null?void 0:e.dependencies)??[]),params:new Set((e==null?void 0:e.params)??[]),parent:!!(e!=null&&e.parent),route:!!(e!=null&&e.route),url:!!(e!=null&&e.url),search_params:new Set((e==null?void 0:e.search_params)??[])}}function _n(){const e=document.querySelector("[autofocus]");if(e)e.focus();else{const n=document.body,t=n.getAttribute("tabindex");n.tabIndex=-1,n.focus({preventScroll:!0,focusVisible:!1}),t!==null?n.setAttribute("tabindex",t):n.removeAttribute("tabindex");const r=getSelection();if(r&&r.type!=="None"){const a=[];for(let s=0;s<r.rangeCount;s+=1)a.push(r.getRangeAt(s));setTimeout(()=>{if(r.rangeCount===a.length){for(let s=0;s<r.rangeCount;s+=1){const o=a[s],c=r.getRangeAt(s);if(o.commonAncestorContainer!==c.commonAncestorContainer||o.startContainer!==c.startContainer||o.endContainer!==c.endContainer||o.startOffset!==c.startOffset||o.endOffset!==c.endOffset)return}r.removeAllRanges()}})}}}function gt(e,n,t,r){var i,f;let a,s;const o=new Promise((h,u)=>{a=h,s=u});return o.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:((i=e.route)==null?void 0:i.id)??null},url:e.url},to:t&&{params:(n==null?void 0:n.params)??null,route:{id:((f=n==null?void 0:n.route)==null?void 0:f.id)??null},url:t},willUnload:!n,type:r,complete:o},fulfil:a,reject:s}}function Le(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}export{Rn as a,j as s};
@@ -1 +1 @@
1
- import{n as f,s as w,a as m,r as q,i as x}from"./scheduler.Dx1bs0RQ.js";const a=[];function z(e,o){return{subscribe:A(e,o).subscribe}}function A(e,o=f){let r;const n=new Set;function u(t){if(w(e,t)&&(e=t,r)){const i=!a.length;for(const s of n)s[1](),a.push(s,e);if(i){for(let s=0;s<a.length;s+=2)a[s][0](a[s+1]);a.length=0}}}function l(t){u(t(e))}function b(t,i=f){const s=[t,i];return n.add(s),n.size===1&&(r=o(u,l)||f),t(e),()=>{n.delete(s),n.size===0&&r&&(r(),r=null)}}return{set:u,update:l,subscribe:b}}function E(e,o,r){const n=!Array.isArray(e),u=n?[e]:e;if(!u.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const l=o.length<2;return z(r,(b,t)=>{let i=!1;const s=[];let d=0,p=f;const h=()=>{if(d)return;p();const c=o(n?s[0]:s,b,t);l?b(c):p=x(c)?c:f},y=u.map((c,g)=>m(c,_=>{s[g]=_,d&=~(1<<g),i&&h()},()=>{d|=1<<g}));return i=!0,h(),function(){q(y),p(),i=!1}})}export{E as d,A as w};
1
+ import{n as f,s as w,a as m,r as q,i as x}from"./scheduler.DukoKnjQ.js";const a=[];function z(e,o){return{subscribe:A(e,o).subscribe}}function A(e,o=f){let r;const n=new Set;function u(t){if(w(e,t)&&(e=t,r)){const i=!a.length;for(const s of n)s[1](),a.push(s,e);if(i){for(let s=0;s<a.length;s+=2)a[s][0](a[s+1]);a.length=0}}}function l(t){u(t(e))}function b(t,i=f){const s=[t,i];return n.add(s),n.size===1&&(r=o(u,l)||f),t(e),()=>{n.delete(s),n.size===0&&r&&(r(),r=null)}}return{set:u,update:l,subscribe:b}}function E(e,o,r){const n=!Array.isArray(e),u=n?[e]:e;if(!u.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const l=o.length<2;return z(r,(b,t)=>{let i=!1;const s=[];let d=0,p=f;const h=()=>{if(d)return;p();const c=o(n?s[0]:s,b,t);l?b(c):p=x(c)?c:f},y=u.map((c,g)=>m(c,_=>{s[g]=_,d&=~(1<<g),i&&h()},()=>{d|=1<<g}));return i=!0,h(),function(){q(y),p(),i=!1}})}export{E as d,A as w};
@@ -1 +1 @@
1
- var S=Object.defineProperty;var C=(e,t,n)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var $=(e,t,n)=>C(e,typeof t!="symbol"?t+"":t,n);import{r as h,n as y,i as A,j as T,k as j,l as w,m as B,p as b,q as D,v as N,w as H,x as I,y as L}from"./scheduler.Dx1bs0RQ.js";let p=!1;function q(){p=!0}function P(){p=!1}function M(e,t,n,i){for(;e<t;){const r=e+(t-e>>1);n(r)<=i?e=r+1:t=r}return e}function O(e){if(e.hydrate_init)return;e.hydrate_init=!0;let t=e.childNodes;if(e.nodeName==="HEAD"){const s=[];for(let l=0;l<t.length;l++){const o=t[l];o.claim_order!==void 0&&s.push(o)}t=s}const n=new Int32Array(t.length+1),i=new Int32Array(t.length);n[0]=-1;let r=0;for(let s=0;s<t.length;s++){const l=t[s].claim_order,o=(r>0&&t[n[r]].claim_order<=l?r+1:M(1,r,d=>t[n[d]].claim_order,l))-1;i[s]=n[o]+1;const f=o+1;n[f]=s,r=Math.max(f,r)}const c=[],a=[];let u=t.length-1;for(let s=n[r]+1;s!=0;s=i[s-1]){for(c.push(t[s-1]);u>=s;u--)a.push(t[u]);u--}for(;u>=0;u--)a.push(t[u]);c.reverse(),a.sort((s,l)=>s.claim_order-l.claim_order);for(let s=0,l=0;s<a.length;s++){for(;l<c.length&&a[s].claim_order>=c[l].claim_order;)l++;const o=l<c.length?c[l]:null;e.insertBefore(a[s],o)}}function R(e,t){if(p){for(O(e),(e.actual_end_child===void 0||e.actual_end_child!==null&&e.actual_end_child.parentNode!==e)&&(e.actual_end_child=e.firstChild);e.actual_end_child!==null&&e.actual_end_child.claim_order===void 0;)e.actual_end_child=e.actual_end_child.nextSibling;t!==e.actual_end_child?(t.claim_order!==void 0||t.parentNode!==e)&&e.insertBefore(t,e.actual_end_child):e.actual_end_child=t.nextSibling}else(t.parentNode!==e||t.nextSibling!==null)&&e.appendChild(t)}function ee(e,t,n){p&&!n?R(e,t):(t.parentNode!==e||t.nextSibling!=n)&&e.insertBefore(t,n||null)}function z(e){e.parentNode&&e.parentNode.removeChild(e)}function te(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function F(e){return document.createElement(e)}function x(e){return document.createTextNode(e)}function ne(){return x(" ")}function ie(){return x("")}function re(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function se(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function le(e){return e.dataset.svelteH}function ae(e){return e===""?null:+e}function G(e){return Array.from(e.childNodes)}function U(e){e.claim_info===void 0&&(e.claim_info={last_index:0,total_claimed:0})}function E(e,t,n,i,r=!1){U(e);const c=(()=>{for(let a=e.claim_info.last_index;a<e.length;a++){const u=e[a];if(t(u)){const s=n(u);return s===void 0?e.splice(a,1):e[a]=s,r||(e.claim_info.last_index=a),u}}for(let a=e.claim_info.last_index-1;a>=0;a--){const u=e[a];if(t(u)){const s=n(u);return s===void 0?e.splice(a,1):e[a]=s,r?s===void 0&&e.claim_info.last_index--:e.claim_info.last_index=a,u}}return i()})();return c.claim_order=e.claim_info.total_claimed,e.claim_info.total_claimed+=1,c}function V(e,t,n,i){return E(e,r=>r.nodeName===t,r=>{const c=[];for(let a=0;a<r.attributes.length;a++){const u=r.attributes[a];n[u.name]||c.push(u.name)}c.forEach(a=>r.removeAttribute(a))},()=>i(t))}function ce(e,t,n){return V(e,t,n,F)}function W(e,t){return E(e,n=>n.nodeType===3,n=>{const i=""+t;if(n.data.startsWith(i)){if(n.data.length!==i.length)return n.splitText(i.length)}else n.data=i},()=>x(t),!0)}function ue(e){return W(e," ")}function fe(e,t){t=""+t,e.data!==t&&(e.data=t)}function oe(e,t){e.value=t??""}function _e(e,t,n,i){n==null?e.style.removeProperty(t):e.style.setProperty(t,n,"")}function de(e,t,n){for(let i=0;i<e.options.length;i+=1){const r=e.options[i];if(r.__value===t){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function me(e){const t=e.querySelector(":checked");return t&&t.__value}function he(e,t,n){e.classList.toggle(t,!!n)}function pe(e,t){const n=[];let i=0;for(const r of t.childNodes)if(r.nodeType===8){const c=r.textContent.trim();c===`HEAD_${e}_END`?(i-=1,n.push(r)):c===`HEAD_${e}_START`&&(i+=1,n.push(r))}else i>0&&n.push(r);return n}function $e(e,t){return new e(t)}const m=new Set;let _;function ye(){_={r:0,c:[],p:_}}function xe(){_.r||h(_.c),_=_.p}function J(e,t){e&&e.i&&(m.delete(e),e.i(t))}function ge(e,t,n,i){if(e&&e.o){if(m.has(e))return;m.add(e),_.c.push(()=>{m.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function ve(e){e&&e.c()}function we(e,t){e&&e.l(t)}function K(e,t,n){const{fragment:i,after_update:r}=e.$$;i&&i.m(t,n),N(()=>{const c=e.$$.on_mount.map(H).filter(A);e.$$.on_destroy?e.$$.on_destroy.push(...c):h(c),e.$$.on_mount=[]}),r.forEach(N)}function Q(e,t){const n=e.$$;n.fragment!==null&&(D(n.after_update),h(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function X(e,t){e.$$.dirty[0]===-1&&(I.push(e),L(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function be(e,t,n,i,r,c,a=null,u=[-1]){const s=j;b(e);const l=e.$$={fragment:null,ctx:[],props:c,update:y,not_equal:r,bound:w(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(s?s.$$.context:[])),callbacks:w(),dirty:u,skip_bound:!1,root:t.target||s.$$.root};a&&a(l.root);let o=!1;if(l.ctx=n?n(e,t.props||{},(f,d,...g)=>{const v=g.length?g[0]:d;return l.ctx&&r(l.ctx[f],l.ctx[f]=v)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](v),o&&X(e,f)),d}):[],l.update(),o=!0,h(l.before_update),l.fragment=i?i(l.ctx):!1,t.target){if(t.hydrate){q();const f=G(t.target);l.fragment&&l.fragment.l(f),f.forEach(z)}else l.fragment&&l.fragment.c();t.intro&&J(e.$$.fragment),K(e,t.target,t.anchor),P(),B()}b(s)}class Ne{constructor(){$(this,"$$");$(this,"$$set")}$destroy(){Q(this,1),this.$destroy=y}$on(t,n){if(!A(n))return y;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(t){this.$$set&&!T(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Y="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Y);export{oe as A,le as B,ye as C,xe as D,$e as E,de as F,me as G,Ne as S,ee as a,R as b,ce as c,z as d,G as e,W as f,ue as g,F as h,be as i,ne as j,Q as k,ge as l,J as m,K as n,se as o,pe as p,we as q,ie as r,fe as s,x as t,ve as u,te as v,_e as w,re as x,ae as y,he as z};
1
+ var S=Object.defineProperty;var C=(e,t,n)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var $=(e,t,n)=>C(e,typeof t!="symbol"?t+"":t,n);import{r as h,n as y,i as A,k as T,l as B,m as b,p as D,q as w,v as j,b as N,w as H,x as I,y as L}from"./scheduler.DukoKnjQ.js";let p=!1;function q(){p=!0}function P(){p=!1}function M(e,t,n,i){for(;e<t;){const r=e+(t-e>>1);n(r)<=i?e=r+1:t=r}return e}function O(e){if(e.hydrate_init)return;e.hydrate_init=!0;let t=e.childNodes;if(e.nodeName==="HEAD"){const s=[];for(let l=0;l<t.length;l++){const o=t[l];o.claim_order!==void 0&&s.push(o)}t=s}const n=new Int32Array(t.length+1),i=new Int32Array(t.length);n[0]=-1;let r=0;for(let s=0;s<t.length;s++){const l=t[s].claim_order,o=(r>0&&t[n[r]].claim_order<=l?r+1:M(1,r,d=>t[n[d]].claim_order,l))-1;i[s]=n[o]+1;const f=o+1;n[f]=s,r=Math.max(f,r)}const c=[],a=[];let u=t.length-1;for(let s=n[r]+1;s!=0;s=i[s-1]){for(c.push(t[s-1]);u>=s;u--)a.push(t[u]);u--}for(;u>=0;u--)a.push(t[u]);c.reverse(),a.sort((s,l)=>s.claim_order-l.claim_order);for(let s=0,l=0;s<a.length;s++){for(;l<c.length&&a[s].claim_order>=c[l].claim_order;)l++;const o=l<c.length?c[l]:null;e.insertBefore(a[s],o)}}function R(e,t){if(p){for(O(e),(e.actual_end_child===void 0||e.actual_end_child!==null&&e.actual_end_child.parentNode!==e)&&(e.actual_end_child=e.firstChild);e.actual_end_child!==null&&e.actual_end_child.claim_order===void 0;)e.actual_end_child=e.actual_end_child.nextSibling;t!==e.actual_end_child?(t.claim_order!==void 0||t.parentNode!==e)&&e.insertBefore(t,e.actual_end_child):e.actual_end_child=t.nextSibling}else(t.parentNode!==e||t.nextSibling!==null)&&e.appendChild(t)}function ee(e,t,n){p&&!n?R(e,t):(t.parentNode!==e||t.nextSibling!=n)&&e.insertBefore(t,n||null)}function z(e){e.parentNode&&e.parentNode.removeChild(e)}function te(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function F(e){return document.createElement(e)}function x(e){return document.createTextNode(e)}function ne(){return x(" ")}function ie(){return x("")}function re(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function se(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function le(e){return e.dataset.svelteH}function ae(e){return e===""?null:+e}function G(e){return Array.from(e.childNodes)}function U(e){e.claim_info===void 0&&(e.claim_info={last_index:0,total_claimed:0})}function E(e,t,n,i,r=!1){U(e);const c=(()=>{for(let a=e.claim_info.last_index;a<e.length;a++){const u=e[a];if(t(u)){const s=n(u);return s===void 0?e.splice(a,1):e[a]=s,r||(e.claim_info.last_index=a),u}}for(let a=e.claim_info.last_index-1;a>=0;a--){const u=e[a];if(t(u)){const s=n(u);return s===void 0?e.splice(a,1):e[a]=s,r?s===void 0&&e.claim_info.last_index--:e.claim_info.last_index=a,u}}return i()})();return c.claim_order=e.claim_info.total_claimed,e.claim_info.total_claimed+=1,c}function V(e,t,n,i){return E(e,r=>r.nodeName===t,r=>{const c=[];for(let a=0;a<r.attributes.length;a++){const u=r.attributes[a];n[u.name]||c.push(u.name)}c.forEach(a=>r.removeAttribute(a))},()=>i(t))}function ce(e,t,n){return V(e,t,n,F)}function W(e,t){return E(e,n=>n.nodeType===3,n=>{const i=""+t;if(n.data.startsWith(i)){if(n.data.length!==i.length)return n.splitText(i.length)}else n.data=i},()=>x(t),!0)}function ue(e){return W(e," ")}function fe(e,t){t=""+t,e.data!==t&&(e.data=t)}function oe(e,t){e.value=t??""}function _e(e,t,n,i){n==null?e.style.removeProperty(t):e.style.setProperty(t,n,"")}function de(e,t,n){for(let i=0;i<e.options.length;i+=1){const r=e.options[i];if(r.__value===t){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function me(e){const t=e.querySelector(":checked");return t&&t.__value}function he(e,t,n){e.classList.toggle(t,!!n)}function pe(e,t){const n=[];let i=0;for(const r of t.childNodes)if(r.nodeType===8){const c=r.textContent.trim();c===`HEAD_${e}_END`?(i-=1,n.push(r)):c===`HEAD_${e}_START`&&(i+=1,n.push(r))}else i>0&&n.push(r);return n}function $e(e,t){return new e(t)}const m=new Set;let _;function ye(){_={r:0,c:[],p:_}}function xe(){_.r||h(_.c),_=_.p}function J(e,t){e&&e.i&&(m.delete(e),e.i(t))}function ge(e,t,n,i){if(e&&e.o){if(m.has(e))return;m.add(e),_.c.push(()=>{m.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function ve(e){e&&e.c()}function be(e,t){e&&e.l(t)}function K(e,t,n){const{fragment:i,after_update:r}=e.$$;i&&i.m(t,n),N(()=>{const c=e.$$.on_mount.map(H).filter(A);e.$$.on_destroy?e.$$.on_destroy.push(...c):h(c),e.$$.on_mount=[]}),r.forEach(N)}function Q(e,t){const n=e.$$;n.fragment!==null&&(j(n.after_update),h(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function X(e,t){e.$$.dirty[0]===-1&&(I.push(e),L(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function we(e,t,n,i,r,c,a=null,u=[-1]){const s=B;w(e);const l=e.$$={fragment:null,ctx:[],props:c,update:y,not_equal:r,bound:b(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(s?s.$$.context:[])),callbacks:b(),dirty:u,skip_bound:!1,root:t.target||s.$$.root};a&&a(l.root);let o=!1;if(l.ctx=n?n(e,t.props||{},(f,d,...g)=>{const v=g.length?g[0]:d;return l.ctx&&r(l.ctx[f],l.ctx[f]=v)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](v),o&&X(e,f)),d}):[],l.update(),o=!0,h(l.before_update),l.fragment=i?i(l.ctx):!1,t.target){if(t.hydrate){q();const f=G(t.target);l.fragment&&l.fragment.l(f),f.forEach(z)}else l.fragment&&l.fragment.c();t.intro&&J(e.$$.fragment),K(e,t.target,t.anchor),P(),D()}w(s)}class Ne{constructor(){$(this,"$$");$(this,"$$set")}$destroy(){Q(this,1),this.$destroy=y}$on(t,n){if(!A(n))return y;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(t){this.$$set&&!T(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Y="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Y);export{oe as A,le as B,me as C,de as D,ye as E,xe as F,$e as G,Ne as S,ee as a,R as b,ce as c,z as d,G as e,W as f,ue as g,F as h,we as i,ne as j,Q as k,ge as l,J as m,K as n,se as o,pe as p,be as q,ie as r,fe as s,x as t,ve as u,te as v,_e as w,re as x,ae as y,he as z};
@@ -0,0 +1 @@
1
+ function m(){}const z=t=>t;function k(t,n){for(const e in n)t[e]=n[e];return t}function x(t){return t()}function A(){return Object.create(null)}function w(t){t.forEach(x)}function D(t){return typeof t=="function"}function F(t,n){return t!=t?n==n:t!==n||t&&typeof t=="object"||typeof t=="function"}function M(t){return Object.keys(t).length===0}function j(t,...n){if(t==null){for(const o of n)o(void 0);return m}const e=t.subscribe(...n);return e.unsubscribe?()=>e.unsubscribe():e}function P(t,n,e){t.$$.on_destroy.push(j(n,e))}function S(t,n,e,o){if(t){const u=p(t,n,e,o);return t[0](u)}}function p(t,n,e,o){return t[1]&&o?k(e.ctx.slice(),t[1](o(n))):e.ctx}function U(t,n,e,o){return t[2],n.dirty}function B(t,n,e,o,u,g){if(u){const y=p(n,e,o,g);t.p(y,u)}}function C(t){if(t.ctx.length>32){const n=[],e=t.ctx.length/32;for(let o=0;o<e;o++)n[o]=-1;return n}return-1}let a;function i(t){a=t}function _(){if(!a)throw new Error("Function called outside component initialization");return a}function G(t){_().$$.on_mount.push(t)}function H(t){_().$$.after_update.push(t)}function I(t){_().$$.on_destroy.push(t)}const r=[],d=[];let s=[];const h=[],b=Promise.resolve();let f=!1;function E(){f||(f=!0,b.then(O))}function J(){return E(),b}function v(t){s.push(t)}const l=new Set;let c=0;function O(){if(c!==0)return;const t=a;do{try{for(;c<r.length;){const n=r[c];c++,i(n),q(n.$$)}}catch(n){throw r.length=0,c=0,n}for(i(null),r.length=0,c=0;d.length;)d.pop()();for(let n=0;n<s.length;n+=1){const e=s[n];l.has(e)||(l.add(e),e())}s.length=0}while(r.length);for(;h.length;)h.pop()();f=!1,l.clear(),i(t)}function q(t){if(t.fragment!==null){t.update(),w(t.before_update);const n=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,n),t.after_update.forEach(v)}}function K(t){const n=[],e=[];s.forEach(o=>t.indexOf(o)===-1?n.push(o):e.push(o)),e.forEach(o=>o()),s=n}export{z as A,j as a,v as b,P as c,S as d,U as e,I as f,C as g,H as h,D as i,d as j,M as k,a as l,A as m,m as n,G as o,O as p,i as q,w as r,F as s,J as t,B as u,K as v,x as w,r as x,E as y,k as z};
@@ -1 +1 @@
1
- import{s as e}from"./entry.JnN5paQ1.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
1
+ import{s as e}from"./entry.DYaPgmil.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.Dk6-dCHu.js","../chunks/scheduler.DukoKnjQ.js","../chunks/index.CUfK07C5.js","../chunks/api.D-M_rVlI.js","../chunks/index.BjVwNvJa.js","../chunks/stores.WJ5dxJwL.js","../chunks/entry.DYaPgmil.js","../assets/0.DDbFsqNI.css","../nodes/1.CjGQp8zu.js","../nodes/2.C_8jrQsV.js","../assets/2.fho1OPpm.css","../nodes/3.Lz_pbSpS.js","../chunks/ToolSelector.DIzQsA4_.js","../assets/ToolSelector.HSbC8-q9.css","../assets/3.BmO4KrOR.css","../nodes/4.BCB36ta_.js","../assets/4.TAVgUi8b.css","../nodes/5.CykeLKzi.js","../assets/5.I4bgY8QS.css","../nodes/6.De73932o.js","../assets/6.BeDwa7mS.css","../nodes/7.6OEKXCWR.js","../assets/7.BYQidWiw.css","../nodes/8.niqPZkB9.js","../assets/8.9sovMx-u.css","../nodes/9.DRZSbXAV.js","../assets/9.Doxq00gF.css","../nodes/10.1LgqVOtM.js","../assets/10.BcbNCOTS.css","../nodes/11.BOfGogcw.js","../assets/11.QhlpTtkf.css"])))=>i.map(i=>d[i]);
2
+ import{s as C,h as N,o as B,t as U,j as I}from"../chunks/scheduler.DukoKnjQ.js";import{S as F,i as G,d as h,l as g,m as w,E as y,F as D,a as k,g as W,r as E,j as z,G as R,k as L,u as O,n as A,q as V,o as T,w as p,c as H,e as J,h as K,s as Q,f as X,t as Y}from"../chunks/index.CUfK07C5.js";const Z="modulepreload",M=function(s,e){return new URL(s,e).href},S={},m=function(e,n,r){let o=Promise.resolve();if(n&&n.length>0){const t=document.getElementsByTagName("link"),i=document.querySelector("meta[property=csp-nonce]"),l=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));o=Promise.allSettled(n.map(c=>{if(c=M(c,r),c in S)return;S[c]=!0;const a=c.endsWith(".css"),u=a?'[rel="stylesheet"]':"";if(!!r)for(let v=t.length-1;v>=0;v--){const P=t[v];if(P.href===c&&(!a||P.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${u}`))return;const d=document.createElement("link");if(d.rel=a?"stylesheet":Z,a||(d.as="script"),d.crossOrigin="",d.href=c,l&&d.setAttribute("nonce",l),document.head.appendChild(d),a)return new Promise((v,P)=>{d.addEventListener("load",v),d.addEventListener("error",()=>P(new Error(`Unable to preload CSS for ${c}`)))})}))}function _(t){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=t,window.dispatchEvent(i),!i.defaultPrevented)throw t}return o.then(t=>{for(const i of t||[])i.status==="rejected"&&_(i.reason);return e().catch(_)})},ae={};function $(s){let e,n,r;var o=s[1][0];function _(t,i){return{props:{data:t[3],form:t[2]}}}return o&&(e=R(o,_(s)),s[12](e)),{c(){e&&O(e.$$.fragment),n=E()},l(t){e&&V(e.$$.fragment,t),n=E()},m(t,i){e&&A(e,t,i),k(t,n,i),r=!0},p(t,i){if(i&2&&o!==(o=t[1][0])){if(e){y();const l=e;g(l.$$.fragment,1,0,()=>{L(l,1)}),D()}o?(e=R(o,_(t)),t[12](e),O(e.$$.fragment),w(e.$$.fragment,1),A(e,n.parentNode,n)):e=null}else if(o){const l={};i&8&&(l.data=t[3]),i&4&&(l.form=t[2]),e.$set(l)}},i(t){r||(e&&w(e.$$.fragment,t),r=!0)},o(t){e&&g(e.$$.fragment,t),r=!1},d(t){t&&h(n),s[12](null),e&&L(e,t)}}}function x(s){let e,n,r;var o=s[1][0];function _(t,i){return{props:{data:t[3],$$slots:{default:[ee]},$$scope:{ctx:t}}}}return o&&(e=R(o,_(s)),s[11](e)),{c(){e&&O(e.$$.fragment),n=E()},l(t){e&&V(e.$$.fragment,t),n=E()},m(t,i){e&&A(e,t,i),k(t,n,i),r=!0},p(t,i){if(i&2&&o!==(o=t[1][0])){if(e){y();const l=e;g(l.$$.fragment,1,0,()=>{L(l,1)}),D()}o?(e=R(o,_(t)),t[11](e),O(e.$$.fragment),w(e.$$.fragment,1),A(e,n.parentNode,n)):e=null}else if(o){const l={};i&8&&(l.data=t[3]),i&8215&&(l.$$scope={dirty:i,ctx:t}),e.$set(l)}},i(t){r||(e&&w(e.$$.fragment,t),r=!0)},o(t){e&&g(e.$$.fragment,t),r=!1},d(t){t&&h(n),s[11](null),e&&L(e,t)}}}function ee(s){let e,n,r;var o=s[1][1];function _(t,i){return{props:{data:t[4],form:t[2]}}}return o&&(e=R(o,_(s)),s[10](e)),{c(){e&&O(e.$$.fragment),n=E()},l(t){e&&V(e.$$.fragment,t),n=E()},m(t,i){e&&A(e,t,i),k(t,n,i),r=!0},p(t,i){if(i&2&&o!==(o=t[1][1])){if(e){y();const l=e;g(l.$$.fragment,1,0,()=>{L(l,1)}),D()}o?(e=R(o,_(t)),t[10](e),O(e.$$.fragment),w(e.$$.fragment,1),A(e,n.parentNode,n)):e=null}else if(o){const l={};i&16&&(l.data=t[4]),i&4&&(l.form=t[2]),e.$set(l)}},i(t){r||(e&&w(e.$$.fragment,t),r=!0)},o(t){e&&g(e.$$.fragment,t),r=!1},d(t){t&&h(n),s[10](null),e&&L(e,t)}}}function j(s){let e,n=s[6]&&q(s);return{c(){e=K("div"),n&&n.c(),this.h()},l(r){e=H(r,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var o=J(e);n&&n.l(o),o.forEach(h),this.h()},h(){T(e,"id","svelte-announcer"),T(e,"aria-live","assertive"),T(e,"aria-atomic","true"),p(e,"position","absolute"),p(e,"left","0"),p(e,"top","0"),p(e,"clip","rect(0 0 0 0)"),p(e,"clip-path","inset(50%)"),p(e,"overflow","hidden"),p(e,"white-space","nowrap"),p(e,"width","1px"),p(e,"height","1px")},m(r,o){k(r,e,o),n&&n.m(e,null)},p(r,o){r[6]?n?n.p(r,o):(n=q(r),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(r){r&&h(e),n&&n.d()}}}function q(s){let e;return{c(){e=Y(s[7])},l(n){e=X(n,s[7])},m(n,r){k(n,e,r)},p(n,r){r&128&&Q(e,n[7])},d(n){n&&h(e)}}}function te(s){let e,n,r,o,_;const t=[x,$],i=[];function l(a,u){return a[1][1]?0:1}e=l(s),n=i[e]=t[e](s);let c=s[5]&&j(s);return{c(){n.c(),r=z(),c&&c.c(),o=E()},l(a){n.l(a),r=W(a),c&&c.l(a),o=E()},m(a,u){i[e].m(a,u),k(a,r,u),c&&c.m(a,u),k(a,o,u),_=!0},p(a,[u]){let b=e;e=l(a),e===b?i[e].p(a,u):(y(),g(i[b],1,1,()=>{i[b]=null}),D(),n=i[e],n?n.p(a,u):(n=i[e]=t[e](a),n.c()),w(n,1),n.m(r.parentNode,r)),a[5]?c?c.p(a,u):(c=j(a),c.c(),c.m(o.parentNode,o)):c&&(c.d(1),c=null)},i(a){_||(w(n),_=!0)},o(a){g(n),_=!1},d(a){a&&(h(r),h(o)),i[e].d(a),c&&c.d(a)}}}function ne(s,e,n){let{stores:r}=e,{page:o}=e,{constructors:_}=e,{components:t=[]}=e,{form:i}=e,{data_0:l=null}=e,{data_1:c=null}=e;N(r.page.notify);let a=!1,u=!1,b=null;B(()=>{const f=r.page.subscribe(()=>{a&&(n(6,u=!0),U().then(()=>{n(7,b=document.title||"untitled page")}))});return n(5,a=!0),f});function d(f){I[f?"unshift":"push"](()=>{t[1]=f,n(0,t)})}function v(f){I[f?"unshift":"push"](()=>{t[0]=f,n(0,t)})}function P(f){I[f?"unshift":"push"](()=>{t[0]=f,n(0,t)})}return s.$$set=f=>{"stores"in f&&n(8,r=f.stores),"page"in f&&n(9,o=f.page),"constructors"in f&&n(1,_=f.constructors),"components"in f&&n(0,t=f.components),"form"in f&&n(2,i=f.form),"data_0"in f&&n(3,l=f.data_0),"data_1"in f&&n(4,c=f.data_1)},s.$$.update=()=>{s.$$.dirty&768&&r.page.set(o)},[t,_,i,l,c,a,u,b,r,o,d,v,P]}class le extends F{constructor(e){super(),G(this,e,ne,te,C,{stores:8,page:9,constructors:1,components:0,form:2,data_0:3,data_1:4})}}const ce=[()=>m(()=>import("../nodes/0.Dk6-dCHu.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url),()=>m(()=>import("../nodes/1.CjGQp8zu.js"),__vite__mapDeps([8,1,2,5,6,4]),import.meta.url),()=>m(()=>import("../nodes/2.C_8jrQsV.js"),__vite__mapDeps([9,1,2,3,4,10]),import.meta.url),()=>m(()=>import("../nodes/3.Lz_pbSpS.js"),__vite__mapDeps([11,1,2,3,4,12,13,14]),import.meta.url),()=>m(()=>import("../nodes/4.BCB36ta_.js"),__vite__mapDeps([15,1,2,3,4,12,13,16]),import.meta.url),()=>m(()=>import("../nodes/5.CykeLKzi.js"),__vite__mapDeps([17,1,2,3,4,12,13,18]),import.meta.url),()=>m(()=>import("../nodes/6.De73932o.js"),__vite__mapDeps([19,1,2,3,4,20]),import.meta.url),()=>m(()=>import("../nodes/7.6OEKXCWR.js"),__vite__mapDeps([21,1,2,3,4,12,13,22]),import.meta.url),()=>m(()=>import("../nodes/8.niqPZkB9.js"),__vite__mapDeps([23,1,2,3,4,12,13,24]),import.meta.url),()=>m(()=>import("../nodes/9.DRZSbXAV.js"),__vite__mapDeps([25,1,2,3,4,26]),import.meta.url),()=>m(()=>import("../nodes/10.1LgqVOtM.js"),__vite__mapDeps([27,1,2,3,4,12,13,28]),import.meta.url),()=>m(()=>import("../nodes/11.BOfGogcw.js"),__vite__mapDeps([29,1,2,3,4,12,13,30]),import.meta.url)],fe=[],_e={"/":[2],"/cost":[3],"/models":[4],"/overview":[5],"/pricing":[6],"/projects":[7],"/sessions":[8],"/settings":[9],"/tokens":[10],"/tool-calls":[11]},ie={handleError:({error:s})=>{console.error(s)},reroute:()=>{},transport:{}},re=Object.fromEntries(Object.entries(ie.transport).map(([s,e])=>[s,e.decode])),ue=!1,me=(s,e)=>re[s](e);export{me as decode,re as decoders,_e as dictionary,ue as hash,ie as hooks,ae as matchers,ce as nodes,le as root,fe as server_loads};
@@ -0,0 +1 @@
1
+ import{a as t}from"../chunks/entry.DYaPgmil.js";export{t as start};
@@ -0,0 +1 @@
1
+ import{s as Se,d as we,r as Te,u as Ae,g as Ne,e as Ie,c as se,o as Pe,f as Me}from"../chunks/scheduler.DukoKnjQ.js";import{S as Be,i as De,d as h,v as Le,l as Re,m as Ce,s as P,o as f,a as L,b as i,x as ce,c as _,e as v,g as N,B as He,f as M,h as d,j as I,t as B,z as O}from"../chunks/index.CUfK07C5.js";import{e as ye,o as Ue,p as Ve,q as je,t as Oe,v as Ke}from"../chunks/api.D-M_rVlI.js";import{p as Ye}from"../chunks/stores.WJ5dxJwL.js";import{w as Ee}from"../chunks/index.BjVwNvJa.js";const qe="aiusage-theme";function ue(){return typeof window>"u"?"system":localStorage.getItem(qe)||"system"}function ze(){return typeof window>"u"||window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}const fe=Ee(ue()),Fe=Ee(ze());function Ge(){fe.update(s=>s==="system"?"dark":s==="dark"?"light":"system")}function Je(){if(typeof window>"u")return;const s=window.matchMedia("(prefers-color-scheme: dark)");function e(t){const l=t==="system"?ze():t;document.documentElement.setAttribute("data-theme",l),Fe.set(l)}e(ue()),fe.subscribe(t=>{localStorage.setItem(qe,t),e(t)}),s.addEventListener("change",()=>{ue()==="system"&&e("system")})}function ke(s,e,t){const l=s.slice();return l[16]=e[t],l}function be(s){let e,t=s[3](s[16].key)+"",l;return{c(){e=d("a"),l=B(t),this.h()},l(a){e=_(a,"A",{href:!0,class:!0});var r=v(e);l=M(r,t),r.forEach(h),this.h()},h(){f(e,"href",s[16].path),f(e,"class","svelte-zqr7pm"),O(e,"active",s[4].url.pathname===s[16].path)},m(a,r){L(a,e,r),i(e,l)},p(a,r){r&8&&t!==(t=a[3](a[16].key)+"")&&P(l,t),r&144&&O(e,"active",a[4].url.pathname===a[16].path)},d(a){a&&h(e)}}}function Qe(s){let e,t=s[3]("sync.trigger")+"",l;return{c(){e=d("span"),l=B(t),this.h()},l(a){e=_(a,"SPAN",{class:!0});var r=v(e);l=M(r,t),r.forEach(h),this.h()},h(){f(e,"class","sync-label svelte-zqr7pm")},m(a,r){L(a,e,r),i(e,l)},p(a,r){r&8&&t!==(t=a[3]("sync.trigger")+"")&&P(l,t)},d(a){a&&h(e)}}}function We(s){let e,t;return{c(){e=d("span"),t=B(s[2]),this.h()},l(l){e=_(l,"SPAN",{class:!0});var a=v(e);t=M(a,s[2]),a.forEach(h),this.h()},h(){f(e,"class","sync-label svelte-zqr7pm"),O(e,"ok",s[2]===s[3]("sync.complete")),O(e,"err",s[2]===s[3]("sync.failed"))},m(l,a){L(l,e,a),i(e,t)},p(l,a){a&4&&P(t,l[2]),a&12&&O(e,"ok",l[2]===l[3]("sync.complete")),a&12&&O(e,"err",l[2]===l[3]("sync.failed"))},d(l){l&&h(e)}}}function Xe(s){let e,t=s[3]("sync.syncing")+"",l;return{c(){e=d("span"),l=B(t),this.h()},l(a){e=_(a,"SPAN",{class:!0});var r=v(e);l=M(r,t),r.forEach(h),this.h()},h(){f(e,"class","sync-label svelte-zqr7pm")},m(a,r){L(a,e,r),i(e,l)},p(a,r){r&8&&t!==(t=a[3]("sync.syncing")+"")&&P(l,t)},d(a){a&&h(e)}}}function Ze(s){let e,t,l,a,r,K='<span class="logo svelte-zqr7pm">⌘</span> <span class="name svelte-zqr7pm">AIUsage</span>',Y,w,F,q,o,g,y=s[1]?"↻":"⇅",z,R,C,A,k,c,T=s[8][s[5]]+"",W,le,H,G=s[3](`theme.${s[5]}`)+"",X,Z,ne,D,J=s[6]==="en"?"中文":"EN",$,ae,U,b,re,he,V=ye(s[7]),p=[];for(let n=0;n<V.length;n+=1)p[n]=be(ke(s,V,n));function me(n,m){return n[1]?Xe:n[2]?We:Qe}let x=me(s),S=x(s);const oe=s[12].default,E=we(oe,s,s[11],null);return{c(){e=d("div"),t=I(),l=d("div"),a=d("header"),r=d("a"),r.innerHTML=K,Y=I(),w=d("nav");for(let n=0;n<p.length;n+=1)p[n].c();F=I(),q=d("div"),o=d("button"),g=d("span"),z=B(y),R=I(),S.c(),A=I(),k=d("button"),c=d("span"),W=B(T),le=I(),H=d("span"),X=B(G),ne=I(),D=d("button"),$=B(J),ae=I(),U=d("main"),E&&E.c(),this.h()},l(n){e=_(n,"DIV",{class:!0}),v(e).forEach(h),t=N(n),l=_(n,"DIV",{class:!0});var m=v(l);a=_(m,"HEADER",{class:!0});var u=v(a);r=_(u,"A",{href:!0,class:!0,"data-svelte-h":!0}),He(r)!=="svelte-tkxtzm"&&(r.innerHTML=K),Y=N(u),w=_(u,"NAV",{class:!0});var Q=v(w);for(let ie=0;ie<p.length;ie+=1)p[ie].l(Q);Q.forEach(h),F=N(u),q=_(u,"DIV",{class:!0});var j=v(q);o=_(j,"BUTTON",{class:!0,title:!0});var ee=v(o);g=_(ee,"SPAN",{class:!0});var pe=v(g);z=M(pe,y),pe.forEach(h),R=N(ee),S.l(ee),ee.forEach(h),A=N(j),k=_(j,"BUTTON",{class:!0,title:!0});var te=v(k);c=_(te,"SPAN",{class:!0});var _e=v(c);W=M(_e,T),_e.forEach(h),le=N(te),H=_(te,"SPAN",{class:!0});var de=v(H);X=M(de,G),de.forEach(h),te.forEach(h),ne=N(j),D=_(j,"BUTTON",{class:!0});var ve=v(D);$=M(ve,J),ve.forEach(h),j.forEach(h),u.forEach(h),ae=N(m),U=_(m,"MAIN",{class:!0});var ge=v(U);E&&E.l(ge),ge.forEach(h),m.forEach(h),this.h()},h(){f(e,"class","grain svelte-zqr7pm"),f(r,"href","/"),f(r,"class","brand svelte-zqr7pm"),f(w,"class","svelte-zqr7pm"),f(g,"class","sync-icon svelte-zqr7pm"),f(o,"class","sync-toggle svelte-zqr7pm"),o.disabled=s[1],f(o,"title",C=s[0]?`${s[3]("sync.lastSync")}: ${s[10](s[0].lastSyncAt)}`:s[3]("sync.notConfigured")),f(c,"class","theme-icon svelte-zqr7pm"),f(H,"class","theme-label svelte-zqr7pm"),f(k,"class","theme-toggle svelte-zqr7pm"),f(k,"title",Z=s[3](`theme.${s[5]}`)),f(D,"class","lang-toggle svelte-zqr7pm"),f(q,"class","controls svelte-zqr7pm"),f(a,"class","svelte-zqr7pm"),f(U,"class","svelte-zqr7pm"),f(l,"class","app svelte-zqr7pm")},m(n,m){L(n,e,m),L(n,t,m),L(n,l,m),i(l,a),i(a,r),i(a,Y),i(a,w);for(let u=0;u<p.length;u+=1)p[u]&&p[u].m(w,null);i(a,F),i(a,q),i(q,o),i(o,g),i(g,z),i(o,R),S.m(o,null),i(q,A),i(q,k),i(k,c),i(c,W),i(k,le),i(k,H),i(H,X),i(q,ne),i(q,D),i(D,$),i(l,ae),i(l,U),E&&E.m(U,null),b=!0,re||(he=[ce(o,"click",s[9]),ce(k,"click",Ge),ce(D,"click",je)],re=!0)},p(n,[m]){if(m&152){V=ye(n[7]);let u;for(u=0;u<V.length;u+=1){const Q=ke(n,V,u);p[u]?p[u].p(Q,m):(p[u]=be(Q),p[u].c(),p[u].m(w,null))}for(;u<p.length;u+=1)p[u].d(1);p.length=V.length}(!b||m&2)&&y!==(y=n[1]?"↻":"⇅")&&P(z,y),x===(x=me(n))&&S?S.p(n,m):(S.d(1),S=x(n),S&&(S.c(),S.m(o,null))),(!b||m&2)&&(o.disabled=n[1]),(!b||m&9&&C!==(C=n[0]?`${n[3]("sync.lastSync")}: ${n[10](n[0].lastSyncAt)}`:n[3]("sync.notConfigured")))&&f(o,"title",C),(!b||m&32)&&T!==(T=n[8][n[5]]+"")&&P(W,T),(!b||m&40)&&G!==(G=n[3](`theme.${n[5]}`)+"")&&P(X,G),(!b||m&40&&Z!==(Z=n[3](`theme.${n[5]}`)))&&f(k,"title",Z),(!b||m&64)&&J!==(J=n[6]==="en"?"中文":"EN")&&P($,J),E&&E.p&&(!b||m&2048)&&Ae(E,oe,n,n[11],b?Ie(oe,n[11],m,null):Ne(n[11]),null)},i(n){b||(Ce(E,n),b=!0)},o(n){Re(E,n),b=!1},d(n){n&&(h(e),h(t),h(l)),Le(p,n),S.d(),E&&E.d(n),re=!1,Te(he)}}}function $e(s,e,t){let l,a,r,K;se(s,Oe,c=>t(3,l=c)),se(s,Ye,c=>t(4,a=c)),se(s,fe,c=>t(5,r=c)),se(s,Ke,c=>t(6,K=c));let{$$slots:Y={},$$scope:w}=e;const F=[{path:"/overview",key:"nav.overview"},{path:"/tokens",key:"nav.tokens"},{path:"/cost",key:"nav.cost"},{path:"/models",key:"nav.models"},{path:"/tool-calls",key:"nav.toolCalls"},{path:"/projects",key:"nav.projects"},{path:"/sessions",key:"nav.sessions"},{path:"/pricing",key:"nav.pricing"},{path:"/settings",key:"nav.settings"}],q={system:"◐",dark:"●",light:"○"};let o=null,g=!1,y="",z=null;async function R(){try{const c=await Ue();t(0,o=c.status),t(1,g=!!(o!=null&&o.isRunning)),A()}catch{t(0,o=null),t(1,g=!1),A()}}async function C(){var c;t(2,y="");try{const T=await Ve();t(0,o=T.status),t(1,g=!!((c=T.status)!=null&&c.isRunning)),t(2,y=T.alreadyRunning?l("sync.inProgress"):l("sync.started")),A()}catch{t(2,y=l("sync.failed")),t(1,g=!1),A()}setTimeout(()=>{g||t(2,y="")},3e3)}function A(){z&&(clearInterval(z),z=null),g&&(z=setInterval(async()=>{await R(),o!=null&&o.isRunning||(t(2,y=(o==null?void 0:o.lastSyncStatus)==="ok"?l("sync.complete"):(o==null?void 0:o.lastSyncError)||l("sync.failed")),setTimeout(()=>{t(2,y="")},5e3))},2e3))}function k(c){return c?new Date(c).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):l("sync.never")}return Pe(()=>{Je(),R()}),Me(()=>{z&&clearInterval(z)}),s.$$set=c=>{"$$scope"in c&&t(11,w=c.$$scope)},[o,g,y,l,a,r,K,F,q,C,k,w,Y]}class nt extends Be{constructor(e){super(),De(this,e,$e,Ze,Se,{})}}export{nt as component};
@@ -1 +1 @@
1
- import{s as x,n as u,c as S}from"../chunks/scheduler.Dx1bs0RQ.js";import{S as j,i as q,d as c,s as h,a as _,b as d,c as v,e as g,f as b,g as y,h as E,t as $,j as C}from"../chunks/index.CzqoKkoo.js";import{p as H}from"../chunks/stores.6YXFe6HN.js";function P(p){var f;let a,s=p[0].status+"",r,o,n,i=((f=p[0].error)==null?void 0:f.message)+"",m;return{c(){a=E("h1"),r=$(s),o=C(),n=E("p"),m=$(i)},l(e){a=v(e,"H1",{});var t=g(a);r=b(t,s),t.forEach(c),o=y(e),n=v(e,"P",{});var l=g(n);m=b(l,i),l.forEach(c)},m(e,t){_(e,a,t),d(a,r),_(e,o,t),_(e,n,t),d(n,m)},p(e,[t]){var l;t&1&&s!==(s=e[0].status+"")&&h(r,s),t&1&&i!==(i=((l=e[0].error)==null?void 0:l.message)+"")&&h(m,i)},i:u,o:u,d(e){e&&(c(a),c(o),c(n))}}}function k(p,a,s){let r;return S(p,H,o=>s(0,r=o)),[r]}class B extends j{constructor(a){super(),q(this,a,k,P,x,{})}}export{B as component};
1
+ import{s as x,n as u,c as S}from"../chunks/scheduler.DukoKnjQ.js";import{S as j,i as q,d as c,s as h,a as _,b as d,c as v,e as g,f as b,g as y,h as E,t as $,j as C}from"../chunks/index.CUfK07C5.js";import{p as H}from"../chunks/stores.WJ5dxJwL.js";function P(p){var f;let a,s=p[0].status+"",r,o,n,i=((f=p[0].error)==null?void 0:f.message)+"",m;return{c(){a=E("h1"),r=$(s),o=C(),n=E("p"),m=$(i)},l(e){a=v(e,"H1",{});var t=g(a);r=b(t,s),t.forEach(c),o=y(e),n=v(e,"P",{});var l=g(n);m=b(l,i),l.forEach(c)},m(e,t){_(e,a,t),d(a,r),_(e,o,t),_(e,n,t),d(n,m)},p(e,[t]){var l;t&1&&s!==(s=e[0].status+"")&&h(r,s),t&1&&i!==(i=((l=e[0].error)==null?void 0:l.message)+"")&&h(m,i)},i:u,o:u,d(e){e&&(c(a),c(o),c(n))}}}function k(p,a,s){let r;return S(p,H,o=>s(0,r=o)),[r]}class B extends j{constructor(a){super(),q(this,a,k,P,x,{})}}export{B as component};
@@ -1 +1 @@
1
- import{s as mt,c as Ue}from"../chunks/scheduler.Dx1bs0RQ.js";import{S as gt,i as Tt,d as o,k as Ke,l as Qe,m as Xe,a as O,n as Ze,b as s,o as f,p as Et,g as E,c as h,e as c,q as ye,r as ht,j as b,h as u,u as xe,s as w,f as $,t as j,v as ct,w as Y}from"../chunks/index.CzqoKkoo.js";import{j as bt,e as Ce,t as Dt}from"../chunks/api.DyoIo4nG.js";import{D as Rt,a as It,T as Vt,f as q,s as Wt,d as St,e as At}from"../chunks/ToolSelector.kb97TteP.js";function ut(l,e,a){const t=l.slice();return t[9]=e[a],t}function ft(l,e,a){const t=l.slice();t[9]=e[a],t[14]=a;const n=t[4]();return t[12]=n,t}function Pt(l){let e,a,t=l[3]("tokens.chartTitle")+"",n,V,d,R,v,g,m,H,_=l[3]("tokens.input")+"",M,S,i,k,D,W=l[3]("tokens.output")+"",T,P,N,U,X,J=l[3]("tokens.cacheRead")+"",Z,B,I,y,ne,x=l[3]("tokens.cacheWrite")+"",se,oe,G,ce,Fe,ue=l[3]("tokens.thinking")+"",Ie,Ve,ee,le,fe,L,de,ve=l[3]("tokens.date")+"",We,Le,_e,ke=l[3]("tokens.input")+"",Se,Oe,pe,me=l[3]("tokens.output")+"",Ae,Ye,ge,Te=l[3]("tokens.cacheRead")+"",Pe,ze,Ee,be=l[3]("tokens.cacheWrite")+"",He,Ge,De,Re=l[3]("tokens.total")+"",Ne,Je,ie,re=Ce(l[0].data),C=[];for(let r=0;r<re.length;r+=1)C[r]=kt(ft(l,re,r));let he=Ce(l[0].data),F=[];for(let r=0;r<he.length;r+=1)F[r]=pt(ut(l,he,r));return{c(){e=u("div"),a=u("div"),n=j(t),V=b(),d=u("div");for(let r=0;r<C.length;r+=1)C[r].c();R=b(),v=u("div"),g=u("span"),m=u("span"),H=b(),M=j(_),S=b(),i=u("span"),k=u("span"),D=b(),T=j(W),P=b(),N=u("span"),U=u("span"),X=b(),Z=j(J),B=b(),I=u("span"),y=u("span"),ne=b(),se=j(x),oe=b(),G=u("span"),ce=u("span"),Fe=b(),Ie=j(ue),Ve=b(),ee=u("div"),le=u("table"),fe=u("thead"),L=u("tr"),de=u("th"),We=j(ve),Le=b(),_e=u("th"),Se=j(ke),Oe=b(),pe=u("th"),Ae=j(me),Ye=b(),ge=u("th"),Pe=j(Te),ze=b(),Ee=u("th"),He=j(be),Ge=b(),De=u("th"),Ne=j(Re),Je=b(),ie=u("tbody");for(let r=0;r<F.length;r+=1)F[r].c();this.h()},l(r){e=h(r,"DIV",{class:!0});var A=c(e);a=h(A,"DIV",{class:!0});var p=c(a);n=$(p,t),p.forEach(o),V=E(A),d=h(A,"DIV",{class:!0});var te=c(d);for(let ae=0;ae<C.length;ae+=1)C[ae].l(te);te.forEach(o),R=E(A),v=h(A,"DIV",{class:!0});var K=c(v);g=h(K,"SPAN",{class:!0});var we=c(g);m=h(we,"SPAN",{class:!0}),c(m).forEach(o),H=E(we),M=$(we,_),we.forEach(o),S=E(K),i=h(K,"SPAN",{class:!0});var $e=c(i);k=h($e,"SPAN",{class:!0}),c(k).forEach(o),D=E($e),T=$($e,W),$e.forEach(o),P=E(K),N=h(K,"SPAN",{class:!0});var je=c(N);U=h(je,"SPAN",{class:!0}),c(U).forEach(o),X=E(je),Z=$(je,J),je.forEach(o),B=E(K),I=h(K,"SPAN",{class:!0});var Be=c(I);y=h(Be,"SPAN",{class:!0}),c(y).forEach(o),ne=E(Be),se=$(Be,x),Be.forEach(o),oe=E(K),G=h(K,"SPAN",{class:!0});var qe=c(G);ce=h(qe,"SPAN",{class:!0}),c(ce).forEach(o),Fe=E(qe),Ie=$(qe,ue),qe.forEach(o),K.forEach(o),A.forEach(o),Ve=E(r),ee=h(r,"DIV",{class:!0,style:!0});var et=c(ee);le=h(et,"TABLE",{});var Me=c(le);fe=h(Me,"THEAD",{});var tt=c(fe);L=h(tt,"TR",{});var z=c(L);de=h(z,"TH",{});var st=c(de);We=$(st,ve),st.forEach(o),Le=E(z),_e=h(z,"TH",{});var lt=c(_e);Se=$(lt,ke),lt.forEach(o),Oe=E(z),pe=h(z,"TH",{});var at=c(pe);Ae=$(at,me),at.forEach(o),Ye=E(z),ge=h(z,"TH",{});var nt=c(ge);Pe=$(nt,Te),nt.forEach(o),ze=E(z),Ee=h(z,"TH",{});var ot=c(Ee);He=$(ot,be),ot.forEach(o),Ge=E(z),De=h(z,"TH",{});var it=c(De);Ne=$(it,Re),it.forEach(o),z.forEach(o),tt.forEach(o),Je=E(Me),ie=h(Me,"TBODY",{});var rt=c(ie);for(let ae=0;ae<F.length;ae+=1)F[ae].l(rt);rt.forEach(o),Me.forEach(o),et.forEach(o),this.h()},h(){f(a,"class","section-title"),f(d,"class","chart svelte-1svae7h"),f(m,"class","dot input svelte-1svae7h"),f(g,"class","legend-item svelte-1svae7h"),f(k,"class","dot output svelte-1svae7h"),f(i,"class","legend-item svelte-1svae7h"),f(U,"class","dot cache-read svelte-1svae7h"),f(N,"class","legend-item svelte-1svae7h"),f(y,"class","dot cache-write svelte-1svae7h"),f(I,"class","legend-item svelte-1svae7h"),f(ce,"class","dot thinking svelte-1svae7h"),f(G,"class","legend-item svelte-1svae7h"),f(v,"class","legend svelte-1svae7h"),f(e,"class","card chart-section svelte-1svae7h"),f(ee,"class","card"),Y(ee,"margin-top","1rem")},m(r,A){O(r,e,A),s(e,a),s(a,n),s(e,V),s(e,d);for(let p=0;p<C.length;p+=1)C[p]&&C[p].m(d,null);s(e,R),s(e,v),s(v,g),s(g,m),s(g,H),s(g,M),s(v,S),s(v,i),s(i,k),s(i,D),s(i,T),s(v,P),s(v,N),s(N,U),s(N,X),s(N,Z),s(v,B),s(v,I),s(I,y),s(I,ne),s(I,se),s(v,oe),s(v,G),s(G,ce),s(G,Fe),s(G,Ie),O(r,Ve,A),O(r,ee,A),s(ee,le),s(le,fe),s(fe,L),s(L,de),s(de,We),s(L,Le),s(L,_e),s(_e,Se),s(L,Oe),s(L,pe),s(pe,Ae),s(L,Ye),s(L,ge),s(ge,Pe),s(L,ze),s(L,Ee),s(Ee,He),s(L,Ge),s(L,De),s(De,Ne),s(le,Je),s(le,ie);for(let p=0;p<F.length;p+=1)F[p]&&F[p].m(ie,null)},p(r,A){if(A&8&&t!==(t=r[3]("tokens.chartTitle")+"")&&w(n,t),A&25){re=Ce(r[0].data);let p;for(p=0;p<re.length;p+=1){const te=ft(r,re,p);C[p]?C[p].p(te,A):(C[p]=kt(te),C[p].c(),C[p].m(d,null))}for(;p<C.length;p+=1)C[p].d(1);C.length=re.length}if(A&8&&_!==(_=r[3]("tokens.input")+"")&&w(M,_),A&8&&W!==(W=r[3]("tokens.output")+"")&&w(T,W),A&8&&J!==(J=r[3]("tokens.cacheRead")+"")&&w(Z,J),A&8&&x!==(x=r[3]("tokens.cacheWrite")+"")&&w(se,x),A&8&&ue!==(ue=r[3]("tokens.thinking")+"")&&w(Ie,ue),A&8&&ve!==(ve=r[3]("tokens.date")+"")&&w(We,ve),A&8&&ke!==(ke=r[3]("tokens.input")+"")&&w(Se,ke),A&8&&me!==(me=r[3]("tokens.output")+"")&&w(Ae,me),A&8&&Te!==(Te=r[3]("tokens.cacheRead")+"")&&w(Pe,Te),A&8&&be!==(be=r[3]("tokens.cacheWrite")+"")&&w(He,be),A&8&&Re!==(Re=r[3]("tokens.total")+"")&&w(Ne,Re),A&1){he=Ce(r[0].data);let p;for(p=0;p<he.length;p+=1){const te=ut(r,he,p);F[p]?F[p].p(te,A):(F[p]=pt(te),F[p].c(),F[p].m(ie,null))}for(;p<F.length;p+=1)F[p].d(1);F.length=he.length}},d(r){r&&(o(e),o(Ve),o(ee)),ct(C,r),ct(F,r)}}}function Ht(l){let e,a,t=l[3]("tokens.noData")+"",n,V,d,R=l[3]("tokens.noDataHint")+"",v;return{c(){e=u("div"),a=u("h2"),n=j(t),V=b(),d=u("p"),v=j(R),this.h()},l(g){e=h(g,"DIV",{class:!0});var m=c(e);a=h(m,"H2",{});var H=c(a);n=$(H,t),H.forEach(o),V=E(m),d=h(m,"P",{});var _=c(d);v=$(_,R),_.forEach(o),m.forEach(o),this.h()},h(){f(e,"class","state-msg")},m(g,m){O(g,e,m),s(e,a),s(a,n),s(e,V),s(e,d),s(d,v)},p(g,m){m&8&&t!==(t=g[3]("tokens.noData")+"")&&w(n,t),m&8&&R!==(R=g[3]("tokens.noDataHint")+"")&&w(v,R)},d(g){g&&o(e)}}}function Nt(l){let e,a;return{c(){e=u("div"),a=j(l[1]),this.h()},l(t){e=h(t,"DIV",{class:!0});var n=c(e);a=$(n,l[1]),n.forEach(o),this.h()},h(){f(e,"class","state-msg error")},m(t,n){O(t,e,n),s(e,a)},p(t,n){n&2&&w(a,t[1])},d(t){t&&o(e)}}}function wt(l){let e,a=l[3]("common.loading")+"",t;return{c(){e=u("div"),t=j(a),this.h()},l(n){e=h(n,"DIV",{class:!0});var V=c(e);t=$(V,a),V.forEach(o),this.h()},h(){f(e,"class","state-msg")},m(n,V){O(n,e,V),s(e,t)},p(n,V){V&8&&a!==(a=n[3]("common.loading")+"")&&w(t,a)},d(n){n&&o(e)}}}function dt(l){let e,a;return{c(){e=u("div"),this.h()},l(t){e=h(t,"DIV",{class:!0,style:!0,title:!0}),c(e).forEach(o),this.h()},h(){f(e,"class","bar cache-read svelte-1svae7h"),Y(e,"height",Q(l[9].cacheReadTokens,l[12])+"px"),f(e,"title",a=l[3]("tokens.cacheRead")+": "+q(l[9].cacheReadTokens))},m(t,n){O(t,e,n)},p(t,n){n&1&&Y(e,"height",Q(t[9].cacheReadTokens,t[12])+"px"),n&9&&a!==(a=t[3]("tokens.cacheRead")+": "+q(t[9].cacheReadTokens))&&f(e,"title",a)},d(t){t&&o(e)}}}function vt(l){let e,a;return{c(){e=u("div"),this.h()},l(t){e=h(t,"DIV",{class:!0,style:!0,title:!0}),c(e).forEach(o),this.h()},h(){f(e,"class","bar cache-write svelte-1svae7h"),Y(e,"height",Q(l[9].cacheWriteTokens,l[12])+"px"),f(e,"title",a=l[3]("tokens.cacheWrite")+": "+q(l[9].cacheWriteTokens))},m(t,n){O(t,e,n)},p(t,n){n&1&&Y(e,"height",Q(t[9].cacheWriteTokens,t[12])+"px"),n&9&&a!==(a=t[3]("tokens.cacheWrite")+": "+q(t[9].cacheWriteTokens))&&f(e,"title",a)},d(t){t&&o(e)}}}function _t(l){let e,a;return{c(){e=u("div"),this.h()},l(t){e=h(t,"DIV",{class:!0,style:!0,title:!0}),c(e).forEach(o),this.h()},h(){f(e,"class","bar thinking svelte-1svae7h"),Y(e,"height",Q(l[9].thinkingTokens,l[12])+"px"),f(e,"title",a=l[3]("tokens.thinking")+": "+q(l[9].thinkingTokens))},m(t,n){O(t,e,n)},p(t,n){n&1&&Y(e,"height",Q(t[9].thinkingTokens,t[12])+"px"),n&9&&a!==(a=t[3]("tokens.thinking")+": "+q(t[9].thinkingTokens))&&f(e,"title",a)},d(t){t&&o(e)}}}function kt(l){let e,a,t,n,V,d,R,v,g,m,H,_,M=l[9].date.slice(5)+"",S,i,k=(l[9].cacheReadTokens||0)>0&&dt(l),D=(l[9].cacheWriteTokens||0)>0&&vt(l),W=l[9].thinkingTokens>0&&_t(l);return{c(){e=u("div"),a=u("div"),t=u("div"),V=b(),d=u("div"),v=b(),k&&k.c(),g=b(),D&&D.c(),m=b(),W&&W.c(),H=b(),_=u("div"),S=j(M),i=b(),this.h()},l(T){e=h(T,"DIV",{class:!0,style:!0});var P=c(e);a=h(P,"DIV",{class:!0});var N=c(a);t=h(N,"DIV",{class:!0,style:!0,title:!0}),c(t).forEach(o),V=E(N),d=h(N,"DIV",{class:!0,style:!0,title:!0}),c(d).forEach(o),v=E(N),k&&k.l(N),g=E(N),D&&D.l(N),m=E(N),W&&W.l(N),N.forEach(o),H=E(P),_=h(P,"DIV",{class:!0});var U=c(_);S=$(U,M),U.forEach(o),i=E(P),P.forEach(o),this.h()},h(){f(t,"class","bar input svelte-1svae7h"),Y(t,"height",Q(l[9].inputTokens,l[12])+"px"),f(t,"title",n=l[3]("tokens.input")+": "+q(l[9].inputTokens)),f(d,"class","bar output svelte-1svae7h"),Y(d,"height",Q(l[9].outputTokens,l[12])+"px"),f(d,"title",R=l[3]("tokens.output")+": "+q(l[9].outputTokens)),f(a,"class","bars svelte-1svae7h"),f(_,"class","label svelte-1svae7h"),f(e,"class","bar-group svelte-1svae7h"),Y(e,"animation-delay",l[14]*30+"ms")},m(T,P){O(T,e,P),s(e,a),s(a,t),s(a,V),s(a,d),s(a,v),k&&k.m(a,null),s(a,g),D&&D.m(a,null),s(a,m),W&&W.m(a,null),s(e,H),s(e,_),s(_,S),s(e,i)},p(T,P){P&1&&Y(t,"height",Q(T[9].inputTokens,T[12])+"px"),P&9&&n!==(n=T[3]("tokens.input")+": "+q(T[9].inputTokens))&&f(t,"title",n),P&1&&Y(d,"height",Q(T[9].outputTokens,T[12])+"px"),P&9&&R!==(R=T[3]("tokens.output")+": "+q(T[9].outputTokens))&&f(d,"title",R),(T[9].cacheReadTokens||0)>0?k?k.p(T,P):(k=dt(T),k.c(),k.m(a,g)):k&&(k.d(1),k=null),(T[9].cacheWriteTokens||0)>0?D?D.p(T,P):(D=vt(T),D.c(),D.m(a,m)):D&&(D.d(1),D=null),T[9].thinkingTokens>0?W?W.p(T,P):(W=_t(T),W.c(),W.m(a,null)):W&&(W.d(1),W=null),P&1&&M!==(M=T[9].date.slice(5)+"")&&w(S,M)},d(T){T&&o(e),k&&k.d(),D&&D.d(),W&&W.d()}}}function pt(l){let e,a,t=l[9].date+"",n,V,d,R=q(l[9].inputTokens)+"",v,g,m,H=q(l[9].outputTokens)+"",_,M,S,i=q(l[9].cacheReadTokens||0)+"",k,D,W,T=q(l[9].cacheWriteTokens||0)+"",P,N,U,X=q(l[9].inputTokens+l[9].outputTokens+(l[9].cacheReadTokens||0)+(l[9].cacheWriteTokens||0)+l[9].thinkingTokens)+"",J,Z;return{c(){e=u("tr"),a=u("td"),n=j(t),V=b(),d=u("td"),v=j(R),g=b(),m=u("td"),_=j(H),M=b(),S=u("td"),k=j(i),D=b(),W=u("td"),P=j(T),N=b(),U=u("td"),J=j(X),Z=b(),this.h()},l(B){e=h(B,"TR",{});var I=c(e);a=h(I,"TD",{class:!0});var y=c(a);n=$(y,t),y.forEach(o),V=E(I),d=h(I,"TD",{class:!0});var ne=c(d);v=$(ne,R),ne.forEach(o),g=E(I),m=h(I,"TD",{class:!0});var x=c(m);_=$(x,H),x.forEach(o),M=E(I),S=h(I,"TD",{class:!0});var se=c(S);k=$(se,i),se.forEach(o),D=E(I),W=h(I,"TD",{class:!0});var oe=c(W);P=$(oe,T),oe.forEach(o),N=E(I),U=h(I,"TD",{class:!0,style:!0});var G=c(U);J=$(G,X),G.forEach(o),Z=E(I),I.forEach(o),this.h()},h(){f(a,"class","mono"),f(d,"class","mono green"),f(m,"class","mono blue"),f(S,"class","mono cache-color svelte-1svae7h"),f(W,"class","mono cache-color svelte-1svae7h"),f(U,"class","mono"),Y(U,"color","var(--text-primary)"),Y(U,"font-weight","600")},m(B,I){O(B,e,I),s(e,a),s(a,n),s(e,V),s(e,d),s(d,v),s(e,g),s(e,m),s(m,_),s(e,M),s(e,S),s(S,k),s(e,D),s(e,W),s(W,P),s(e,N),s(e,U),s(U,J),s(e,Z)},p(B,I){I&1&&t!==(t=B[9].date+"")&&w(n,t),I&1&&R!==(R=q(B[9].inputTokens)+"")&&w(v,R),I&1&&H!==(H=q(B[9].outputTokens)+"")&&w(_,H),I&1&&i!==(i=q(B[9].cacheReadTokens||0)+"")&&w(k,i),I&1&&T!==(T=q(B[9].cacheWriteTokens||0)+"")&&w(P,T),I&1&&X!==(X=q(B[9].inputTokens+B[9].outputTokens+(B[9].cacheReadTokens||0)+(B[9].cacheWriteTokens||0)+B[9].thinkingTokens)+"")&&w(J,X)},d(B){B&&o(e)}}}function $t(l){let e,a,t,n,V,d,R,v,g,m,H;document.title=e=l[3]("tokens.title")+" — AIUsage",n=new Rt({}),d=new It({}),v=new Vt({});function _(i,k){var D;return i[2]?wt:i[1]?Nt:(D=i[0])!=null&&D.data.length?Pt:Ht}let M=_(l),S=M(l);return{c(){a=b(),t=u("div"),xe(n.$$.fragment),V=b(),xe(d.$$.fragment),R=b(),xe(v.$$.fragment),g=b(),S.c(),m=ht(),this.h()},l(i){Et("svelte-12pjf1d",document.head).forEach(o),a=E(i),t=h(i,"DIV",{class:!0});var D=c(t);ye(n.$$.fragment,D),V=E(D),ye(d.$$.fragment,D),R=E(D),ye(v.$$.fragment,D),D.forEach(o),g=E(i),S.l(i),m=ht(),this.h()},h(){f(t,"class","filter-bar svelte-1svae7h")},m(i,k){O(i,a,k),O(i,t,k),Ze(n,t,null),s(t,V),Ze(d,t,null),s(t,R),Ze(v,t,null),O(i,g,k),S.m(i,k),O(i,m,k),H=!0},p(i,[k]){(!H||k&8)&&e!==(e=i[3]("tokens.title")+" — AIUsage")&&(document.title=e),M===(M=_(i))&&S?S.p(i,k):(S.d(1),S=M(i),S&&(S.c(),S.m(m.parentNode,m)))},i(i){H||(Xe(n.$$.fragment,i),Xe(d.$$.fragment,i),Xe(v.$$.fragment,i),H=!0)},o(i){Qe(n.$$.fragment,i),Qe(d.$$.fragment,i),Qe(v.$$.fragment,i),H=!1},d(i){i&&(o(a),o(t),o(g),o(m)),Ke(n),Ke(d),Ke(v),S.d(i)}}}function Q(l,e){return e>0?l/e*200:0}function jt(l,e,a){let t,n,V,d;Ue(l,Wt,_=>a(5,t=_)),Ue(l,St,_=>a(6,n=_)),Ue(l,At,_=>a(7,V=_)),Ue(l,Dt,_=>a(3,d=_));let R=null,v=null,g=!0;async function m(){a(2,g=!0),a(1,v=null);try{a(0,R=await bt({...V,device:n,tool:t}))}catch(_){a(1,v=_ instanceof Error?_.message:"Failed to load data"),a(0,R=null)}finally{a(2,g=!1)}}function H(){return R!=null&&R.data.length?Math.max(...R.data.map(_=>_.inputTokens+_.outputTokens+(_.cacheReadTokens||0)+(_.cacheWriteTokens||0)+_.thinkingTokens)):0}return l.$$.update=()=>{l.$$.dirty&224&&m()},[R,v,g,d,H,t,n,V]}class Ct extends gt{constructor(e){super(),Tt(this,e,jt,$t,mt,{})}}export{Ct as component};
1
+ import{s as mt,c as Ue}from"../chunks/scheduler.DukoKnjQ.js";import{S as gt,i as Tt,d as o,k as Ke,l as Qe,m as Xe,a as O,n as Ze,b as s,o as f,p as Et,g as E,c as h,e as c,q as ye,r as ht,j as b,h as u,u as xe,s as w,f as $,t as B,v as ct,w as Y}from"../chunks/index.CUfK07C5.js";import{l as bt,e as Ce,t as Dt}from"../chunks/api.D-M_rVlI.js";import{D as Rt,a as It,T as Vt,e as q,s as Wt,b as St,d as At}from"../chunks/ToolSelector.DIzQsA4_.js";function ut(l,e,a){const t=l.slice();return t[9]=e[a],t}function ft(l,e,a){const t=l.slice();t[9]=e[a],t[14]=a;const n=t[4]();return t[12]=n,t}function Pt(l){let e,a,t=l[3]("tokens.chartTitle")+"",n,V,d,R,v,g,m,H,_=l[3]("tokens.input")+"",M,S,i,k,D,W=l[3]("tokens.output")+"",T,P,N,U,X,J=l[3]("tokens.cacheRead")+"",Z,j,I,y,ne,x=l[3]("tokens.cacheWrite")+"",se,oe,G,ce,Fe,ue=l[3]("tokens.thinking")+"",Ie,Ve,ee,le,fe,L,de,ve=l[3]("tokens.date")+"",We,Le,_e,ke=l[3]("tokens.input")+"",Se,Oe,pe,me=l[3]("tokens.output")+"",Ae,Ye,ge,Te=l[3]("tokens.cacheRead")+"",Pe,ze,Ee,be=l[3]("tokens.cacheWrite")+"",He,Ge,De,Re=l[3]("tokens.total")+"",Ne,Je,ie,re=Ce(l[0].data),C=[];for(let r=0;r<re.length;r+=1)C[r]=kt(ft(l,re,r));let he=Ce(l[0].data),F=[];for(let r=0;r<he.length;r+=1)F[r]=pt(ut(l,he,r));return{c(){e=u("div"),a=u("div"),n=B(t),V=b(),d=u("div");for(let r=0;r<C.length;r+=1)C[r].c();R=b(),v=u("div"),g=u("span"),m=u("span"),H=b(),M=B(_),S=b(),i=u("span"),k=u("span"),D=b(),T=B(W),P=b(),N=u("span"),U=u("span"),X=b(),Z=B(J),j=b(),I=u("span"),y=u("span"),ne=b(),se=B(x),oe=b(),G=u("span"),ce=u("span"),Fe=b(),Ie=B(ue),Ve=b(),ee=u("div"),le=u("table"),fe=u("thead"),L=u("tr"),de=u("th"),We=B(ve),Le=b(),_e=u("th"),Se=B(ke),Oe=b(),pe=u("th"),Ae=B(me),Ye=b(),ge=u("th"),Pe=B(Te),ze=b(),Ee=u("th"),He=B(be),Ge=b(),De=u("th"),Ne=B(Re),Je=b(),ie=u("tbody");for(let r=0;r<F.length;r+=1)F[r].c();this.h()},l(r){e=h(r,"DIV",{class:!0});var A=c(e);a=h(A,"DIV",{class:!0});var p=c(a);n=$(p,t),p.forEach(o),V=E(A),d=h(A,"DIV",{class:!0});var te=c(d);for(let ae=0;ae<C.length;ae+=1)C[ae].l(te);te.forEach(o),R=E(A),v=h(A,"DIV",{class:!0});var K=c(v);g=h(K,"SPAN",{class:!0});var we=c(g);m=h(we,"SPAN",{class:!0}),c(m).forEach(o),H=E(we),M=$(we,_),we.forEach(o),S=E(K),i=h(K,"SPAN",{class:!0});var $e=c(i);k=h($e,"SPAN",{class:!0}),c(k).forEach(o),D=E($e),T=$($e,W),$e.forEach(o),P=E(K),N=h(K,"SPAN",{class:!0});var Be=c(N);U=h(Be,"SPAN",{class:!0}),c(U).forEach(o),X=E(Be),Z=$(Be,J),Be.forEach(o),j=E(K),I=h(K,"SPAN",{class:!0});var je=c(I);y=h(je,"SPAN",{class:!0}),c(y).forEach(o),ne=E(je),se=$(je,x),je.forEach(o),oe=E(K),G=h(K,"SPAN",{class:!0});var qe=c(G);ce=h(qe,"SPAN",{class:!0}),c(ce).forEach(o),Fe=E(qe),Ie=$(qe,ue),qe.forEach(o),K.forEach(o),A.forEach(o),Ve=E(r),ee=h(r,"DIV",{class:!0,style:!0});var et=c(ee);le=h(et,"TABLE",{});var Me=c(le);fe=h(Me,"THEAD",{});var tt=c(fe);L=h(tt,"TR",{});var z=c(L);de=h(z,"TH",{});var st=c(de);We=$(st,ve),st.forEach(o),Le=E(z),_e=h(z,"TH",{});var lt=c(_e);Se=$(lt,ke),lt.forEach(o),Oe=E(z),pe=h(z,"TH",{});var at=c(pe);Ae=$(at,me),at.forEach(o),Ye=E(z),ge=h(z,"TH",{});var nt=c(ge);Pe=$(nt,Te),nt.forEach(o),ze=E(z),Ee=h(z,"TH",{});var ot=c(Ee);He=$(ot,be),ot.forEach(o),Ge=E(z),De=h(z,"TH",{});var it=c(De);Ne=$(it,Re),it.forEach(o),z.forEach(o),tt.forEach(o),Je=E(Me),ie=h(Me,"TBODY",{});var rt=c(ie);for(let ae=0;ae<F.length;ae+=1)F[ae].l(rt);rt.forEach(o),Me.forEach(o),et.forEach(o),this.h()},h(){f(a,"class","section-title"),f(d,"class","chart svelte-1svae7h"),f(m,"class","dot input svelte-1svae7h"),f(g,"class","legend-item svelte-1svae7h"),f(k,"class","dot output svelte-1svae7h"),f(i,"class","legend-item svelte-1svae7h"),f(U,"class","dot cache-read svelte-1svae7h"),f(N,"class","legend-item svelte-1svae7h"),f(y,"class","dot cache-write svelte-1svae7h"),f(I,"class","legend-item svelte-1svae7h"),f(ce,"class","dot thinking svelte-1svae7h"),f(G,"class","legend-item svelte-1svae7h"),f(v,"class","legend svelte-1svae7h"),f(e,"class","card chart-section svelte-1svae7h"),f(ee,"class","card"),Y(ee,"margin-top","1rem")},m(r,A){O(r,e,A),s(e,a),s(a,n),s(e,V),s(e,d);for(let p=0;p<C.length;p+=1)C[p]&&C[p].m(d,null);s(e,R),s(e,v),s(v,g),s(g,m),s(g,H),s(g,M),s(v,S),s(v,i),s(i,k),s(i,D),s(i,T),s(v,P),s(v,N),s(N,U),s(N,X),s(N,Z),s(v,j),s(v,I),s(I,y),s(I,ne),s(I,se),s(v,oe),s(v,G),s(G,ce),s(G,Fe),s(G,Ie),O(r,Ve,A),O(r,ee,A),s(ee,le),s(le,fe),s(fe,L),s(L,de),s(de,We),s(L,Le),s(L,_e),s(_e,Se),s(L,Oe),s(L,pe),s(pe,Ae),s(L,Ye),s(L,ge),s(ge,Pe),s(L,ze),s(L,Ee),s(Ee,He),s(L,Ge),s(L,De),s(De,Ne),s(le,Je),s(le,ie);for(let p=0;p<F.length;p+=1)F[p]&&F[p].m(ie,null)},p(r,A){if(A&8&&t!==(t=r[3]("tokens.chartTitle")+"")&&w(n,t),A&25){re=Ce(r[0].data);let p;for(p=0;p<re.length;p+=1){const te=ft(r,re,p);C[p]?C[p].p(te,A):(C[p]=kt(te),C[p].c(),C[p].m(d,null))}for(;p<C.length;p+=1)C[p].d(1);C.length=re.length}if(A&8&&_!==(_=r[3]("tokens.input")+"")&&w(M,_),A&8&&W!==(W=r[3]("tokens.output")+"")&&w(T,W),A&8&&J!==(J=r[3]("tokens.cacheRead")+"")&&w(Z,J),A&8&&x!==(x=r[3]("tokens.cacheWrite")+"")&&w(se,x),A&8&&ue!==(ue=r[3]("tokens.thinking")+"")&&w(Ie,ue),A&8&&ve!==(ve=r[3]("tokens.date")+"")&&w(We,ve),A&8&&ke!==(ke=r[3]("tokens.input")+"")&&w(Se,ke),A&8&&me!==(me=r[3]("tokens.output")+"")&&w(Ae,me),A&8&&Te!==(Te=r[3]("tokens.cacheRead")+"")&&w(Pe,Te),A&8&&be!==(be=r[3]("tokens.cacheWrite")+"")&&w(He,be),A&8&&Re!==(Re=r[3]("tokens.total")+"")&&w(Ne,Re),A&1){he=Ce(r[0].data);let p;for(p=0;p<he.length;p+=1){const te=ut(r,he,p);F[p]?F[p].p(te,A):(F[p]=pt(te),F[p].c(),F[p].m(ie,null))}for(;p<F.length;p+=1)F[p].d(1);F.length=he.length}},d(r){r&&(o(e),o(Ve),o(ee)),ct(C,r),ct(F,r)}}}function Ht(l){let e,a,t=l[3]("tokens.noData")+"",n,V,d,R=l[3]("tokens.noDataHint")+"",v;return{c(){e=u("div"),a=u("h2"),n=B(t),V=b(),d=u("p"),v=B(R),this.h()},l(g){e=h(g,"DIV",{class:!0});var m=c(e);a=h(m,"H2",{});var H=c(a);n=$(H,t),H.forEach(o),V=E(m),d=h(m,"P",{});var _=c(d);v=$(_,R),_.forEach(o),m.forEach(o),this.h()},h(){f(e,"class","state-msg")},m(g,m){O(g,e,m),s(e,a),s(a,n),s(e,V),s(e,d),s(d,v)},p(g,m){m&8&&t!==(t=g[3]("tokens.noData")+"")&&w(n,t),m&8&&R!==(R=g[3]("tokens.noDataHint")+"")&&w(v,R)},d(g){g&&o(e)}}}function Nt(l){let e,a;return{c(){e=u("div"),a=B(l[1]),this.h()},l(t){e=h(t,"DIV",{class:!0});var n=c(e);a=$(n,l[1]),n.forEach(o),this.h()},h(){f(e,"class","state-msg error")},m(t,n){O(t,e,n),s(e,a)},p(t,n){n&2&&w(a,t[1])},d(t){t&&o(e)}}}function wt(l){let e,a=l[3]("common.loading")+"",t;return{c(){e=u("div"),t=B(a),this.h()},l(n){e=h(n,"DIV",{class:!0});var V=c(e);t=$(V,a),V.forEach(o),this.h()},h(){f(e,"class","state-msg")},m(n,V){O(n,e,V),s(e,t)},p(n,V){V&8&&a!==(a=n[3]("common.loading")+"")&&w(t,a)},d(n){n&&o(e)}}}function dt(l){let e,a;return{c(){e=u("div"),this.h()},l(t){e=h(t,"DIV",{class:!0,style:!0,title:!0}),c(e).forEach(o),this.h()},h(){f(e,"class","bar cache-read svelte-1svae7h"),Y(e,"height",Q(l[9].cacheReadTokens,l[12])+"px"),f(e,"title",a=l[3]("tokens.cacheRead")+": "+q(l[9].cacheReadTokens))},m(t,n){O(t,e,n)},p(t,n){n&1&&Y(e,"height",Q(t[9].cacheReadTokens,t[12])+"px"),n&9&&a!==(a=t[3]("tokens.cacheRead")+": "+q(t[9].cacheReadTokens))&&f(e,"title",a)},d(t){t&&o(e)}}}function vt(l){let e,a;return{c(){e=u("div"),this.h()},l(t){e=h(t,"DIV",{class:!0,style:!0,title:!0}),c(e).forEach(o),this.h()},h(){f(e,"class","bar cache-write svelte-1svae7h"),Y(e,"height",Q(l[9].cacheWriteTokens,l[12])+"px"),f(e,"title",a=l[3]("tokens.cacheWrite")+": "+q(l[9].cacheWriteTokens))},m(t,n){O(t,e,n)},p(t,n){n&1&&Y(e,"height",Q(t[9].cacheWriteTokens,t[12])+"px"),n&9&&a!==(a=t[3]("tokens.cacheWrite")+": "+q(t[9].cacheWriteTokens))&&f(e,"title",a)},d(t){t&&o(e)}}}function _t(l){let e,a;return{c(){e=u("div"),this.h()},l(t){e=h(t,"DIV",{class:!0,style:!0,title:!0}),c(e).forEach(o),this.h()},h(){f(e,"class","bar thinking svelte-1svae7h"),Y(e,"height",Q(l[9].thinkingTokens,l[12])+"px"),f(e,"title",a=l[3]("tokens.thinking")+": "+q(l[9].thinkingTokens))},m(t,n){O(t,e,n)},p(t,n){n&1&&Y(e,"height",Q(t[9].thinkingTokens,t[12])+"px"),n&9&&a!==(a=t[3]("tokens.thinking")+": "+q(t[9].thinkingTokens))&&f(e,"title",a)},d(t){t&&o(e)}}}function kt(l){let e,a,t,n,V,d,R,v,g,m,H,_,M=l[9].date.slice(5)+"",S,i,k=(l[9].cacheReadTokens||0)>0&&dt(l),D=(l[9].cacheWriteTokens||0)>0&&vt(l),W=l[9].thinkingTokens>0&&_t(l);return{c(){e=u("div"),a=u("div"),t=u("div"),V=b(),d=u("div"),v=b(),k&&k.c(),g=b(),D&&D.c(),m=b(),W&&W.c(),H=b(),_=u("div"),S=B(M),i=b(),this.h()},l(T){e=h(T,"DIV",{class:!0,style:!0});var P=c(e);a=h(P,"DIV",{class:!0});var N=c(a);t=h(N,"DIV",{class:!0,style:!0,title:!0}),c(t).forEach(o),V=E(N),d=h(N,"DIV",{class:!0,style:!0,title:!0}),c(d).forEach(o),v=E(N),k&&k.l(N),g=E(N),D&&D.l(N),m=E(N),W&&W.l(N),N.forEach(o),H=E(P),_=h(P,"DIV",{class:!0});var U=c(_);S=$(U,M),U.forEach(o),i=E(P),P.forEach(o),this.h()},h(){f(t,"class","bar input svelte-1svae7h"),Y(t,"height",Q(l[9].inputTokens,l[12])+"px"),f(t,"title",n=l[3]("tokens.input")+": "+q(l[9].inputTokens)),f(d,"class","bar output svelte-1svae7h"),Y(d,"height",Q(l[9].outputTokens,l[12])+"px"),f(d,"title",R=l[3]("tokens.output")+": "+q(l[9].outputTokens)),f(a,"class","bars svelte-1svae7h"),f(_,"class","label svelte-1svae7h"),f(e,"class","bar-group svelte-1svae7h"),Y(e,"animation-delay",l[14]*30+"ms")},m(T,P){O(T,e,P),s(e,a),s(a,t),s(a,V),s(a,d),s(a,v),k&&k.m(a,null),s(a,g),D&&D.m(a,null),s(a,m),W&&W.m(a,null),s(e,H),s(e,_),s(_,S),s(e,i)},p(T,P){P&1&&Y(t,"height",Q(T[9].inputTokens,T[12])+"px"),P&9&&n!==(n=T[3]("tokens.input")+": "+q(T[9].inputTokens))&&f(t,"title",n),P&1&&Y(d,"height",Q(T[9].outputTokens,T[12])+"px"),P&9&&R!==(R=T[3]("tokens.output")+": "+q(T[9].outputTokens))&&f(d,"title",R),(T[9].cacheReadTokens||0)>0?k?k.p(T,P):(k=dt(T),k.c(),k.m(a,g)):k&&(k.d(1),k=null),(T[9].cacheWriteTokens||0)>0?D?D.p(T,P):(D=vt(T),D.c(),D.m(a,m)):D&&(D.d(1),D=null),T[9].thinkingTokens>0?W?W.p(T,P):(W=_t(T),W.c(),W.m(a,null)):W&&(W.d(1),W=null),P&1&&M!==(M=T[9].date.slice(5)+"")&&w(S,M)},d(T){T&&o(e),k&&k.d(),D&&D.d(),W&&W.d()}}}function pt(l){let e,a,t=l[9].date+"",n,V,d,R=q(l[9].inputTokens)+"",v,g,m,H=q(l[9].outputTokens)+"",_,M,S,i=q(l[9].cacheReadTokens||0)+"",k,D,W,T=q(l[9].cacheWriteTokens||0)+"",P,N,U,X=q(l[9].inputTokens+l[9].outputTokens+(l[9].cacheReadTokens||0)+(l[9].cacheWriteTokens||0)+l[9].thinkingTokens)+"",J,Z;return{c(){e=u("tr"),a=u("td"),n=B(t),V=b(),d=u("td"),v=B(R),g=b(),m=u("td"),_=B(H),M=b(),S=u("td"),k=B(i),D=b(),W=u("td"),P=B(T),N=b(),U=u("td"),J=B(X),Z=b(),this.h()},l(j){e=h(j,"TR",{});var I=c(e);a=h(I,"TD",{class:!0});var y=c(a);n=$(y,t),y.forEach(o),V=E(I),d=h(I,"TD",{class:!0});var ne=c(d);v=$(ne,R),ne.forEach(o),g=E(I),m=h(I,"TD",{class:!0});var x=c(m);_=$(x,H),x.forEach(o),M=E(I),S=h(I,"TD",{class:!0});var se=c(S);k=$(se,i),se.forEach(o),D=E(I),W=h(I,"TD",{class:!0});var oe=c(W);P=$(oe,T),oe.forEach(o),N=E(I),U=h(I,"TD",{class:!0,style:!0});var G=c(U);J=$(G,X),G.forEach(o),Z=E(I),I.forEach(o),this.h()},h(){f(a,"class","mono"),f(d,"class","mono green"),f(m,"class","mono blue"),f(S,"class","mono cache-color svelte-1svae7h"),f(W,"class","mono cache-color svelte-1svae7h"),f(U,"class","mono"),Y(U,"color","var(--text-primary)"),Y(U,"font-weight","600")},m(j,I){O(j,e,I),s(e,a),s(a,n),s(e,V),s(e,d),s(d,v),s(e,g),s(e,m),s(m,_),s(e,M),s(e,S),s(S,k),s(e,D),s(e,W),s(W,P),s(e,N),s(e,U),s(U,J),s(e,Z)},p(j,I){I&1&&t!==(t=j[9].date+"")&&w(n,t),I&1&&R!==(R=q(j[9].inputTokens)+"")&&w(v,R),I&1&&H!==(H=q(j[9].outputTokens)+"")&&w(_,H),I&1&&i!==(i=q(j[9].cacheReadTokens||0)+"")&&w(k,i),I&1&&T!==(T=q(j[9].cacheWriteTokens||0)+"")&&w(P,T),I&1&&X!==(X=q(j[9].inputTokens+j[9].outputTokens+(j[9].cacheReadTokens||0)+(j[9].cacheWriteTokens||0)+j[9].thinkingTokens)+"")&&w(J,X)},d(j){j&&o(e)}}}function $t(l){let e,a,t,n,V,d,R,v,g,m,H;document.title=e=l[3]("tokens.title")+" — AIUsage",n=new Rt({}),d=new It({}),v=new Vt({});function _(i,k){var D;return i[2]?wt:i[1]?Nt:(D=i[0])!=null&&D.data.length?Pt:Ht}let M=_(l),S=M(l);return{c(){a=b(),t=u("div"),xe(n.$$.fragment),V=b(),xe(d.$$.fragment),R=b(),xe(v.$$.fragment),g=b(),S.c(),m=ht(),this.h()},l(i){Et("svelte-12pjf1d",document.head).forEach(o),a=E(i),t=h(i,"DIV",{class:!0});var D=c(t);ye(n.$$.fragment,D),V=E(D),ye(d.$$.fragment,D),R=E(D),ye(v.$$.fragment,D),D.forEach(o),g=E(i),S.l(i),m=ht(),this.h()},h(){f(t,"class","filter-bar svelte-1svae7h")},m(i,k){O(i,a,k),O(i,t,k),Ze(n,t,null),s(t,V),Ze(d,t,null),s(t,R),Ze(v,t,null),O(i,g,k),S.m(i,k),O(i,m,k),H=!0},p(i,[k]){(!H||k&8)&&e!==(e=i[3]("tokens.title")+" — AIUsage")&&(document.title=e),M===(M=_(i))&&S?S.p(i,k):(S.d(1),S=M(i),S&&(S.c(),S.m(m.parentNode,m)))},i(i){H||(Xe(n.$$.fragment,i),Xe(d.$$.fragment,i),Xe(v.$$.fragment,i),H=!0)},o(i){Qe(n.$$.fragment,i),Qe(d.$$.fragment,i),Qe(v.$$.fragment,i),H=!1},d(i){i&&(o(a),o(t),o(g),o(m)),Ke(n),Ke(d),Ke(v),S.d(i)}}}function Q(l,e){return e>0?l/e*200:0}function Bt(l,e,a){let t,n,V,d;Ue(l,Wt,_=>a(5,t=_)),Ue(l,St,_=>a(6,n=_)),Ue(l,At,_=>a(7,V=_)),Ue(l,Dt,_=>a(3,d=_));let R=null,v=null,g=!0;async function m(){a(2,g=!0),a(1,v=null);try{a(0,R=await bt({...V,device:n,tool:t}))}catch(_){a(1,v=_ instanceof Error?_.message:"Failed to load data"),a(0,R=null)}finally{a(2,g=!1)}}function H(){return R!=null&&R.data.length?Math.max(...R.data.map(_=>_.inputTokens+_.outputTokens+(_.cacheReadTokens||0)+(_.cacheWriteTokens||0)+_.thinkingTokens)):0}return l.$$.update=()=>{l.$$.dirty&224&&m()},[R,v,g,d,H,t,n,V]}class Ct extends gt{constructor(e){super(),Tt(this,e,Bt,$t,mt,{})}}export{Ct as component};
@@ -1 +1 @@
1
- import{s as te,c as H}from"../chunks/scheduler.Dx1bs0RQ.js";import{S as le,i as ae,d as f,k as z,l as B,m as G,a as A,n as J,b as i,o as y,p as se,g as w,c as g,e as k,q as K,r as X,j as V,h as D,u as L,s as $,f as I,t as S,v as ne,w as M}from"../chunks/index.CzqoKkoo.js";import{k as oe,e as Y,t as re}from"../chunks/api.DyoIo4nG.js";import{D as ce,a as ie,T as fe,c as Z,s as me,d as ue,e as de}from"../chunks/ToolSelector.kb97TteP.js";function x(o,e,a){const t=o.slice();return t[8]=e[a],t[10]=a,t}function he(o){let e,a=Y(o[0].toolCalls),t=[];for(let l=0;l<a.length;l+=1)t[l]=ee(x(o,a,l));return{c(){e=D("div");for(let l=0;l<t.length;l+=1)t[l].c();this.h()},l(l){e=g(l,"DIV",{class:!0});var r=k(e);for(let s=0;s<t.length;s+=1)t[s].l(r);r.forEach(f),this.h()},h(){y(e,"class","ranking svelte-maknei")},m(l,r){A(l,e,r);for(let s=0;s<t.length;s+=1)t[s]&&t[s].m(e,null)},p(l,r){if(r&1){a=Y(l[0].toolCalls);let s;for(s=0;s<a.length;s+=1){const m=x(l,a,s);t[s]?t[s].p(m,r):(t[s]=ee(m),t[s].c(),t[s].m(e,null))}for(;s<t.length;s+=1)t[s].d(1);t.length=a.length}},d(l){l&&f(e),ne(t,l)}}}function _e(o){let e,a,t=o[3]("toolCalls.noData")+"",l,r,s,m=o[3]("toolCalls.noDataHint")+"",u;return{c(){e=D("div"),a=D("h2"),l=S(t),r=V(),s=D("p"),u=S(m),this.h()},l(d){e=g(d,"DIV",{class:!0});var h=k(e);a=g(h,"H2",{});var c=k(a);l=I(c,t),c.forEach(f),r=w(h),s=g(h,"P",{});var b=k(s);u=I(b,m),b.forEach(f),h.forEach(f),this.h()},h(){y(e,"class","state-msg")},m(d,h){A(d,e,h),i(e,a),i(a,l),i(e,r),i(e,s),i(s,u)},p(d,h){h&8&&t!==(t=d[3]("toolCalls.noData")+"")&&$(l,t),h&8&&m!==(m=d[3]("toolCalls.noDataHint")+"")&&$(u,m)},d(d){d&&f(e)}}}function pe(o){let e,a;return{c(){e=D("div"),a=S(o[1]),this.h()},l(t){e=g(t,"DIV",{class:!0});var l=k(e);a=I(l,o[1]),l.forEach(f),this.h()},h(){y(e,"class","state-msg error")},m(t,l){A(t,e,l),i(e,a)},p(t,l){l&2&&$(a,t[1])},d(t){t&&f(e)}}}function ve(o){let e,a=o[3]("common.loading")+"",t;return{c(){e=D("div"),t=S(a),this.h()},l(l){e=g(l,"DIV",{class:!0});var r=k(e);t=I(r,a),r.forEach(f),this.h()},h(){y(e,"class","state-msg")},m(l,r){A(l,e,r),i(e,t)},p(l,r){r&8&&a!==(a=l[3]("common.loading")+"")&&$(t,a)},d(l){l&&f(e)}}}function ee(o){let e,a,t,l=o[10]+1+"",r,s,m,u=o[8].name+"",d,h,c,b,N,_,n=Z(o[8].count)+"",v,E,P,T=o[8].percentage.toFixed(1)+"",F,R,q;return{c(){e=D("div"),a=D("span"),t=S("#"),r=S(l),s=V(),m=D("span"),d=S(u),h=V(),c=D("div"),b=D("div"),N=V(),_=D("span"),v=S(n),E=V(),P=D("span"),F=S(T),R=S("%"),q=V(),this.h()},l(C){e=g(C,"DIV",{class:!0,style:!0});var p=k(e);a=g(p,"SPAN",{class:!0});var U=k(a);t=I(U,"#"),r=I(U,l),U.forEach(f),s=w(p),m=g(p,"SPAN",{class:!0});var O=k(m);d=I(O,u),O.forEach(f),h=w(p),c=g(p,"DIV",{class:!0});var Q=k(c);b=g(Q,"DIV",{class:!0,style:!0}),k(b).forEach(f),Q.forEach(f),N=w(p),_=g(p,"SPAN",{class:!0});var W=k(_);v=I(W,n),W.forEach(f),E=w(p),P=g(p,"SPAN",{class:!0});var j=k(P);F=I(j,T),R=I(j,"%"),j.forEach(f),q=w(p),p.forEach(f),this.h()},h(){y(a,"class","rank mono svelte-maknei"),y(m,"class","name mono svelte-maknei"),y(b,"class","bar svelte-maknei"),M(b,"width",o[8].percentage+"%"),y(c,"class","bar-container svelte-maknei"),y(_,"class","count mono svelte-maknei"),y(P,"class","pct mono svelte-maknei"),y(e,"class","row svelte-maknei"),M(e,"animation-delay",o[10]*35+"ms")},m(C,p){A(C,e,p),i(e,a),i(a,t),i(a,r),i(e,s),i(e,m),i(m,d),i(e,h),i(e,c),i(c,b),i(e,N),i(e,_),i(_,v),i(e,E),i(e,P),i(P,F),i(P,R),i(e,q)},p(C,p){p&1&&u!==(u=C[8].name+"")&&$(d,u),p&1&&M(b,"width",C[8].percentage+"%"),p&1&&n!==(n=Z(C[8].count)+"")&&$(v,n),p&1&&T!==(T=C[8].percentage.toFixed(1)+"")&&$(F,T)},d(C){C&&f(e)}}}function ge(o){let e,a,t,l,r,s,m,u,d,h,c;document.title=e=o[3]("toolCalls.title")+" — AIUsage",l=new ce({}),s=new ie({}),u=new fe({});function b(n,v){var E;return n[2]?ve:n[1]?pe:(E=n[0])!=null&&E.toolCalls.length?he:_e}let N=b(o),_=N(o);return{c(){a=V(),t=D("div"),L(l.$$.fragment),r=V(),L(s.$$.fragment),m=V(),L(u.$$.fragment),d=V(),_.c(),h=X(),this.h()},l(n){se("svelte-26x68e",document.head).forEach(f),a=w(n),t=g(n,"DIV",{class:!0});var E=k(t);K(l.$$.fragment,E),r=w(E),K(s.$$.fragment,E),m=w(E),K(u.$$.fragment,E),E.forEach(f),d=w(n),_.l(n),h=X(),this.h()},h(){y(t,"class","filter-bar svelte-maknei")},m(n,v){A(n,a,v),A(n,t,v),J(l,t,null),i(t,r),J(s,t,null),i(t,m),J(u,t,null),A(n,d,v),_.m(n,v),A(n,h,v),c=!0},p(n,[v]){(!c||v&8)&&e!==(e=n[3]("toolCalls.title")+" — AIUsage")&&(document.title=e),N===(N=b(n))&&_?_.p(n,v):(_.d(1),_=N(n),_&&(_.c(),_.m(h.parentNode,h)))},i(n){c||(G(l.$$.fragment,n),G(s.$$.fragment,n),G(u.$$.fragment,n),c=!0)},o(n){B(l.$$.fragment,n),B(s.$$.fragment,n),B(u.$$.fragment,n),c=!1},d(n){n&&(f(a),f(t),f(d),f(h)),z(l),z(s),z(u),_.d(n)}}}function ke(o,e,a){let t,l,r,s;H(o,me,c=>a(4,t=c)),H(o,ue,c=>a(5,l=c)),H(o,de,c=>a(6,r=c)),H(o,re,c=>a(3,s=c));let m=null,u=null,d=!0;async function h(){a(2,d=!0),a(1,u=null);try{a(0,m=await oe({...r,device:l,tool:t}))}catch(c){a(1,u=c instanceof Error?c.message:"Failed to load data"),a(0,m=null)}finally{a(2,d=!1)}}return o.$$.update=()=>{o.$$.dirty&112&&h()},[m,u,d,s,t,l,r]}class Ce extends le{constructor(e){super(),ae(this,e,ke,ge,te,{})}}export{Ce as component};
1
+ import{s as te,c as H}from"../chunks/scheduler.DukoKnjQ.js";import{S as le,i as ae,d as f,k as z,l as B,m as G,a as A,n as J,b as i,o as y,p as se,g as w,c as g,e as k,q as K,r as X,j as V,h as b,u as L,s as $,f as I,t as S,v as ne,w as M}from"../chunks/index.CUfK07C5.js";import{m as oe,e as Y,t as re}from"../chunks/api.D-M_rVlI.js";import{D as ce,a as ie,T as fe,c as Z,s as me,b as ue,d as de}from"../chunks/ToolSelector.DIzQsA4_.js";function x(o,e,a){const t=o.slice();return t[8]=e[a],t[10]=a,t}function he(o){let e,a=Y(o[0].toolCalls),t=[];for(let l=0;l<a.length;l+=1)t[l]=ee(x(o,a,l));return{c(){e=b("div");for(let l=0;l<t.length;l+=1)t[l].c();this.h()},l(l){e=g(l,"DIV",{class:!0});var r=k(e);for(let s=0;s<t.length;s+=1)t[s].l(r);r.forEach(f),this.h()},h(){y(e,"class","ranking svelte-maknei")},m(l,r){A(l,e,r);for(let s=0;s<t.length;s+=1)t[s]&&t[s].m(e,null)},p(l,r){if(r&1){a=Y(l[0].toolCalls);let s;for(s=0;s<a.length;s+=1){const m=x(l,a,s);t[s]?t[s].p(m,r):(t[s]=ee(m),t[s].c(),t[s].m(e,null))}for(;s<t.length;s+=1)t[s].d(1);t.length=a.length}},d(l){l&&f(e),ne(t,l)}}}function _e(o){let e,a,t=o[3]("toolCalls.noData")+"",l,r,s,m=o[3]("toolCalls.noDataHint")+"",u;return{c(){e=b("div"),a=b("h2"),l=S(t),r=V(),s=b("p"),u=S(m),this.h()},l(d){e=g(d,"DIV",{class:!0});var h=k(e);a=g(h,"H2",{});var c=k(a);l=I(c,t),c.forEach(f),r=w(h),s=g(h,"P",{});var D=k(s);u=I(D,m),D.forEach(f),h.forEach(f),this.h()},h(){y(e,"class","state-msg")},m(d,h){A(d,e,h),i(e,a),i(a,l),i(e,r),i(e,s),i(s,u)},p(d,h){h&8&&t!==(t=d[3]("toolCalls.noData")+"")&&$(l,t),h&8&&m!==(m=d[3]("toolCalls.noDataHint")+"")&&$(u,m)},d(d){d&&f(e)}}}function pe(o){let e,a;return{c(){e=b("div"),a=S(o[1]),this.h()},l(t){e=g(t,"DIV",{class:!0});var l=k(e);a=I(l,o[1]),l.forEach(f),this.h()},h(){y(e,"class","state-msg error")},m(t,l){A(t,e,l),i(e,a)},p(t,l){l&2&&$(a,t[1])},d(t){t&&f(e)}}}function ve(o){let e,a=o[3]("common.loading")+"",t;return{c(){e=b("div"),t=S(a),this.h()},l(l){e=g(l,"DIV",{class:!0});var r=k(e);t=I(r,a),r.forEach(f),this.h()},h(){y(e,"class","state-msg")},m(l,r){A(l,e,r),i(e,t)},p(l,r){r&8&&a!==(a=l[3]("common.loading")+"")&&$(t,a)},d(l){l&&f(e)}}}function ee(o){let e,a,t,l=o[10]+1+"",r,s,m,u=o[8].name+"",d,h,c,D,N,_,n=Z(o[8].count)+"",v,E,P,T=o[8].percentage.toFixed(1)+"",F,R,q;return{c(){e=b("div"),a=b("span"),t=S("#"),r=S(l),s=V(),m=b("span"),d=S(u),h=V(),c=b("div"),D=b("div"),N=V(),_=b("span"),v=S(n),E=V(),P=b("span"),F=S(T),R=S("%"),q=V(),this.h()},l(C){e=g(C,"DIV",{class:!0,style:!0});var p=k(e);a=g(p,"SPAN",{class:!0});var U=k(a);t=I(U,"#"),r=I(U,l),U.forEach(f),s=w(p),m=g(p,"SPAN",{class:!0});var O=k(m);d=I(O,u),O.forEach(f),h=w(p),c=g(p,"DIV",{class:!0});var Q=k(c);D=g(Q,"DIV",{class:!0,style:!0}),k(D).forEach(f),Q.forEach(f),N=w(p),_=g(p,"SPAN",{class:!0});var W=k(_);v=I(W,n),W.forEach(f),E=w(p),P=g(p,"SPAN",{class:!0});var j=k(P);F=I(j,T),R=I(j,"%"),j.forEach(f),q=w(p),p.forEach(f),this.h()},h(){y(a,"class","rank mono svelte-maknei"),y(m,"class","name mono svelte-maknei"),y(D,"class","bar svelte-maknei"),M(D,"width",o[8].percentage+"%"),y(c,"class","bar-container svelte-maknei"),y(_,"class","count mono svelte-maknei"),y(P,"class","pct mono svelte-maknei"),y(e,"class","row svelte-maknei"),M(e,"animation-delay",o[10]*35+"ms")},m(C,p){A(C,e,p),i(e,a),i(a,t),i(a,r),i(e,s),i(e,m),i(m,d),i(e,h),i(e,c),i(c,D),i(e,N),i(e,_),i(_,v),i(e,E),i(e,P),i(P,F),i(P,R),i(e,q)},p(C,p){p&1&&u!==(u=C[8].name+"")&&$(d,u),p&1&&M(D,"width",C[8].percentage+"%"),p&1&&n!==(n=Z(C[8].count)+"")&&$(v,n),p&1&&T!==(T=C[8].percentage.toFixed(1)+"")&&$(F,T)},d(C){C&&f(e)}}}function ge(o){let e,a,t,l,r,s,m,u,d,h,c;document.title=e=o[3]("toolCalls.title")+" — AIUsage",l=new ce({}),s=new ie({}),u=new fe({});function D(n,v){var E;return n[2]?ve:n[1]?pe:(E=n[0])!=null&&E.toolCalls.length?he:_e}let N=D(o),_=N(o);return{c(){a=V(),t=b("div"),L(l.$$.fragment),r=V(),L(s.$$.fragment),m=V(),L(u.$$.fragment),d=V(),_.c(),h=X(),this.h()},l(n){se("svelte-26x68e",document.head).forEach(f),a=w(n),t=g(n,"DIV",{class:!0});var E=k(t);K(l.$$.fragment,E),r=w(E),K(s.$$.fragment,E),m=w(E),K(u.$$.fragment,E),E.forEach(f),d=w(n),_.l(n),h=X(),this.h()},h(){y(t,"class","filter-bar svelte-maknei")},m(n,v){A(n,a,v),A(n,t,v),J(l,t,null),i(t,r),J(s,t,null),i(t,m),J(u,t,null),A(n,d,v),_.m(n,v),A(n,h,v),c=!0},p(n,[v]){(!c||v&8)&&e!==(e=n[3]("toolCalls.title")+" — AIUsage")&&(document.title=e),N===(N=D(n))&&_?_.p(n,v):(_.d(1),_=N(n),_&&(_.c(),_.m(h.parentNode,h)))},i(n){c||(G(l.$$.fragment,n),G(s.$$.fragment,n),G(u.$$.fragment,n),c=!0)},o(n){B(l.$$.fragment,n),B(s.$$.fragment,n),B(u.$$.fragment,n),c=!1},d(n){n&&(f(a),f(t),f(d),f(h)),z(l),z(s),z(u),_.d(n)}}}function ke(o,e,a){let t,l,r,s;H(o,me,c=>a(4,t=c)),H(o,ue,c=>a(5,l=c)),H(o,de,c=>a(6,r=c)),H(o,re,c=>a(3,s=c));let m=null,u=null,d=!0;async function h(){a(2,d=!0),a(1,u=null);try{a(0,m=await oe({...r,device:l,tool:t}))}catch(c){a(1,u=c instanceof Error?c.message:"Failed to load data"),a(0,m=null)}finally{a(2,d=!1)}}return o.$$.update=()=>{o.$$.dirty&112&&h()},[m,u,d,s,t,l,r]}class Ce extends le{constructor(e){super(),ae(this,e,ke,ge,te,{})}}export{Ce as component};
@@ -0,0 +1,3 @@
1
+ import{n as Ps,z as ll,A as kl,s as Sl,c as Mt,o as Dl,f as wl,r as Il}from"../chunks/scheduler.DukoKnjQ.js";import{S as Cl,i as Nl,d as a,z as Te,s as D,o as n,a as j,b as t,x as Xe,p as Tl,g as m,c,e as f,B as ge,f as E,r as os,j as b,h as v,t as g,v as Pl,w as He}from"../chunks/index.CUfK07C5.js";import{j as Al,r as Vl,S as al,e as nl,b as yl,t as Fl}from"../chunks/api.D-M_rVlI.js";import{w as Rl}from"../chunks/index.BjVwNvJa.js";const ml=typeof window<"u";let Ml=ml?()=>window.performance.now():()=>Date.now(),bl=ml?e=>requestAnimationFrame(e):Ps;const wt=new Set;function El(e){wt.forEach(s=>{s.c(e)||(wt.delete(s),s.f())}),wt.size!==0&&bl(El)}function Ll(e){let s;return wt.size===0&&bl(El),{promise:new Promise(l=>{wt.add(s={c:e,f:l})}),abort(){wt.delete(s)}}}function il(e){return Object.prototype.toString.call(e)==="[object Date]"}function as(e){const s=e-1;return s*s*s+1}function As(e,s){if(e===s||e!==e)return()=>e;const l=typeof e;if(l!==typeof s||Array.isArray(e)!==Array.isArray(s))throw new Error("Cannot interpolate values of different type");if(Array.isArray(e)){const i=s.map((o,r)=>As(e[r],o));return o=>i.map(r=>r(o))}if(l==="object"){if(!e||!s)throw new Error("Object cannot be null");if(il(e)&&il(s)){e=e.getTime(),s=s.getTime();const r=s-e;return u=>new Date(e+u*r)}const i=Object.keys(s),o={};return i.forEach(r=>{o[r]=As(e[r],s[r])}),r=>{const u={};return i.forEach(p=>{u[p]=o[p](r)}),u}}if(l==="number"){const i=s-e;return o=>e+o*i}throw new Error(`Cannot interpolate ${l} values`)}function ns(e,s={}){const l=Rl(e);let i,o=e;function r(u,p){if(e==null)return l.set(e=u),Promise.resolve();o=u;let d=i,h=!1,{delay:U=0,duration:N=400,easing:T=kl,interpolate:I=As}=ll(ll({},s),p);if(N===0)return d&&(d.abort(),d=null),l.set(e=o),Promise.resolve();const P=Ml()+U;let M;return i=Ll(x=>{if(x<P)return!0;h||(M=I(e,u),typeof N=="function"&&(N=N(e,u)),h=!0),d&&(d.abort(),d=null);const W=x-P;return W>N?(l.set(e=u),!1):(l.set(e=M(T(W/N))),!0)}),i.promise}return{set:r,update:(u,p)=>r(u(o,e),p),subscribe:l.subscribe}}function ol(e,s,l){const i=e.slice();return i[51]=s[l],i}function rl(e){let s,l,i,o,r,u=e[19]("home.cfgTitle")+"",p,d,h,U="✕",N,T,I,P=e[19]("home.timeRange")+"",M,x,W,H,q,z,F=e[19]("home.numFormat")+"",O,R,te,G,V=e[19]("home.numExact")+"",ae,ne,B,S=e[19]("home.numExactEx")+"",y,Z,Q,se=e[19]("home.numShort")+"",ie,J,Y,pe=e[19]("home.numShortEx")+"",Le,be,re,le,Ee=e[19]("home.refreshInfo")+"",_e,ke,oe,Pe=e[19]("nav.settings")+"",Se,Ge,ce,me,Oe=e[19]("home.seconds")+"",Be,w,$,L=nl(e[24]),X=[];for(let C=0;C<L.length;C+=1)X[C]=cl(ol(e,L,C));return{c(){s=v("div"),l=b(),i=v("div"),o=v("div"),r=v("span"),p=g(u),d=b(),h=v("button"),h.textContent=U,N=b(),T=v("div"),I=v("div"),M=g(P),x=b(),W=v("div");for(let C=0;C<X.length;C+=1)X[C].c();H=b(),q=v("div"),z=v("div"),O=g(F),R=b(),te=v("div"),G=v("button"),ae=g(V),ne=b(),B=v("span"),y=g(S),Z=b(),Q=v("button"),ie=g(se),J=b(),Y=v("span"),Le=g(pe),be=b(),re=v("div"),le=v("span"),_e=g(Ee),ke=b(),oe=v("a"),Se=g(Pe),Ge=g(" ↗"),ce=g(`
2
+  ·  `),me=g(e[3]),Be=g(Oe),this.h()},l(C){s=c(C,"DIV",{class:!0}),f(s).forEach(a),l=m(C),i=c(C,"DIV",{class:!0,role:!0});var A=f(i);o=c(A,"DIV",{class:!0});var K=f(o);r=c(K,"SPAN",{class:!0});var Je=f(r);p=E(Je,u),Je.forEach(a),d=m(K),h=c(K,"BUTTON",{class:!0,"data-svelte-h":!0}),ge(h)!=="svelte-1k5uq1k"&&(h.textContent=U),K.forEach(a),N=m(A),T=c(A,"DIV",{class:!0});var De=f(T);I=c(De,"DIV",{class:!0});var ft=f(I);M=E(ft,P),ft.forEach(a),x=m(De),W=c(De,"DIV",{class:!0});var we=f(W);for(let Ie=0;Ie<X.length;Ie+=1)X[Ie].l(we);we.forEach(a),De.forEach(a),H=m(A),q=c(A,"DIV",{class:!0});var Ye=f(q);z=c(Ye,"DIV",{class:!0});var Ke=f(z);O=E(Ke,F),Ke.forEach(a),R=m(Ye),te=c(Ye,"DIV",{class:!0});var Ue=f(te);G=c(Ue,"BUTTON",{class:!0});var xe=f(G);ae=E(xe,V),ne=m(xe),B=c(xe,"SPAN",{class:!0});var at=f(B);y=E(at,S),at.forEach(a),xe.forEach(a),Z=m(Ue),Q=c(Ue,"BUTTON",{class:!0});var ee=f(Q);ie=E(ee,se),J=m(ee),Y=c(ee,"SPAN",{class:!0});var Ae=f(Y);Le=E(Ae,pe),Ae.forEach(a),ee.forEach(a),Ue.forEach(a),Ye.forEach(a),be=m(A),re=c(A,"DIV",{class:!0});var We=f(re);le=c(We,"SPAN",{class:!0});var je=f(le);_e=E(je,Ee),ke=m(je),oe=c(je,"A",{href:!0,class:!0});var nt=f(oe);Se=E(nt,Pe),Ge=E(nt," ↗"),nt.forEach(a),ce=E(je,`
3
+  ·  `),me=E(je,e[3]),Be=E(je,Oe),je.forEach(a),We.forEach(a),A.forEach(a),this.h()},h(){n(s,"class","overlay-backdrop svelte-1i8v7x1"),n(r,"class","cfg-title svelte-1i8v7x1"),n(h,"class","cfg-close svelte-1i8v7x1"),n(o,"class","cfg-header svelte-1i8v7x1"),n(I,"class","cfg-label svelte-1i8v7x1"),n(W,"class","cfg-pills svelte-1i8v7x1"),n(T,"class","cfg-section svelte-1i8v7x1"),n(z,"class","cfg-label svelte-1i8v7x1"),n(B,"class","pill-eg svelte-1i8v7x1"),n(G,"class","pill svelte-1i8v7x1"),Te(G,"active",e[0].precision==="exact"),n(Y,"class","pill-eg svelte-1i8v7x1"),n(Q,"class","pill svelte-1i8v7x1"),Te(Q,"active",e[0].precision==="abbr"),n(te,"class","cfg-pills svelte-1i8v7x1"),n(q,"class","cfg-section svelte-1i8v7x1"),n(oe,"href","/settings"),n(oe,"class","settings-link svelte-1i8v7x1"),n(le,"class","refresh-info-text svelte-1i8v7x1"),n(re,"class","cfg-refresh-info svelte-1i8v7x1"),n(i,"class","config-panel svelte-1i8v7x1"),n(i,"role","dialog")},m(C,A){j(C,s,A),j(C,l,A),j(C,i,A),t(i,o),t(o,r),t(r,p),t(o,d),t(o,h),t(i,N),t(i,T),t(T,I),t(I,M),t(T,x),t(T,W);for(let K=0;K<X.length;K+=1)X[K]&&X[K].m(W,null);t(i,H),t(i,q),t(q,z),t(z,O),t(q,R),t(q,te),t(te,G),t(G,ae),t(G,ne),t(G,B),t(B,y),t(te,Z),t(te,Q),t(Q,ie),t(Q,J),t(Q,Y),t(Y,Le),t(i,be),t(i,re),t(re,le),t(le,_e),t(le,ke),t(le,oe),t(oe,Se),t(oe,Ge),t(le,ce),t(le,me),t(le,Be),w||($=[Xe(s,"click",e[35]),Xe(h,"click",e[36]),Xe(G,"click",e[38]),Xe(Q,"click",e[39]),Xe(oe,"click",e[40])],w=!0)},p(C,A){if(A[0]&524288&&u!==(u=C[19]("home.cfgTitle")+"")&&D(p,u),A[0]&524288&&P!==(P=C[19]("home.timeRange")+"")&&D(M,P),A[0]&1091043329){L=nl(C[24]);let K;for(K=0;K<L.length;K+=1){const Je=ol(C,L,K);X[K]?X[K].p(Je,A):(X[K]=cl(Je),X[K].c(),X[K].m(W,null))}for(;K<X.length;K+=1)X[K].d(1);X.length=L.length}A[0]&524288&&F!==(F=C[19]("home.numFormat")+"")&&D(O,F),A[0]&524288&&V!==(V=C[19]("home.numExact")+"")&&D(ae,V),A[0]&524288&&S!==(S=C[19]("home.numExactEx")+"")&&D(y,S),A[0]&1&&Te(G,"active",C[0].precision==="exact"),A[0]&524288&&se!==(se=C[19]("home.numShort")+"")&&D(ie,se),A[0]&524288&&pe!==(pe=C[19]("home.numShortEx")+"")&&D(Le,pe),A[0]&1&&Te(Q,"active",C[0].precision==="abbr"),A[0]&524288&&Ee!==(Ee=C[19]("home.refreshInfo")+"")&&D(_e,Ee),A[0]&524288&&Pe!==(Pe=C[19]("nav.settings")+"")&&D(Se,Pe),A[0]&8&&D(me,C[3]),A[0]&524288&&Oe!==(Oe=C[19]("home.seconds")+"")&&D(Be,Oe)},d(C){C&&(a(s),a(l),a(i)),Pl(X,C),w=!1,Il($)}}}function cl(e){let s,l=e[19](e[51].tKey)+"",i,o,r,u;function p(){return e[37](e[51])}return{c(){s=v("button"),i=g(l),o=b(),this.h()},l(d){s=c(d,"BUTTON",{class:!0});var h=f(s);i=E(h,l),o=m(h),h.forEach(a),this.h()},h(){n(s,"class","pill svelte-1i8v7x1"),Te(s,"active",e[0].range===e[51].value)},m(d,h){j(d,s,h),t(s,i),t(s,o),r||(u=Xe(s,"click",p),r=!0)},p(d,h){e=d,h[0]&524288&&l!==(l=e[19](e[51].tKey)+"")&&D(i,l),h[0]&16777217&&Te(s,"active",e[0].range===e[51].value)},d(d){d&&a(s),r=!1,u()}}}function Ol(e){let s,l,i,o,r,u,p,d,h,U,N,T=e[19]("home.counterLabel")+"",I,P,M,x,W,H=e[18](e[20])+"",q,z,F,O,R,te="↑",G,V,ae=e[19]("home.input")+"",ne,B,S,y=Dt(e[1].inputTokens)+"",Z,Q,se,ie,J,Y,pe="↓",Le,be,re=e[19]("home.output")+"",le,Ee,_e,ke=Dt(e[1].outputTokens)+"",oe,Pe,Se,Ge,ce,me,Oe="⟳",Be,w,$=e[19]("home.cache")+"",L,X,C,A=Dt((e[1].cacheReadTokens||0)+(e[1].cacheWriteTokens||0))+"",K,Je,De,ft,we,Ye,Ke,Ue=(e[3]>0?e[19]("home.refreshNow"):e[19]("home.refreshBtn"))+"",xe,at,ee,Ae,We,je="$",nt,Ie,dt,It=e[19]("overview.totalCost")+"",Lt,rs,ht,Ct=_l(e[21])+"",Ot,cs,Nt,vs,Ze,it,Vs="◎",us,$e,pt,Tt=e[19]("overview.totalSessions")+"",Bt,fs,_t,Pt=Math.round(e[22]).toLocaleString()+"",Kt,ds,At,hs,et,ot,ys="◈",ps,tt,mt,Vt=e[19]("overview.activeDays")+"",Ut,_s,bt,yt=Math.round(e[23]).toLocaleString()+"",Wt,jt,Qe,Ce,Ve,zt,ms,ye,qt,bs,Fe,Ht,Es,Re,Gt,gs,Ne,rt,ks,Ft=e[19]("home.input")+"",Jt,Ss,ct,Ds,Rt=e[19]("home.output")+"",Yt,ws,vt,Fs="■ Cache Read",Is,ut,Rs="■ Cache Write",Cs,Ms,ve=e[3]>0&&vl(e);function Ls(_,k){return _[3]>0?jl:Wl}let xt=Ls(e),Me=xt(e),ue=e[15]>9&&ul(e),fe=e[14]>9&&fl(e),de=e[13]>9&&dl(e),he=e[12]>9&&hl(e);return{c(){s=v("section"),l=v("div"),i=b(),o=v("div"),r=b(),u=v("div"),p=b(),d=v("div"),h=v("span"),U=b(),N=v("span"),I=g(T),P=b(),M=v("span"),x=b(),W=v("div"),q=g(H),z=b(),F=v("div"),O=v("div"),R=v("span"),R.textContent=te,G=b(),V=v("span"),ne=g(ae),B=b(),S=v("span"),Z=g(y),Q=b(),se=v("div"),ie=b(),J=v("div"),Y=v("span"),Y.textContent=pe,Le=b(),be=v("span"),le=g(re),Ee=b(),_e=v("span"),oe=g(ke),Pe=b(),Se=v("div"),Ge=b(),ce=v("div"),me=v("span"),me.textContent=Oe,Be=b(),w=v("span"),L=g($),X=b(),C=v("span"),K=g(A),Je=b(),De=v("div"),ve&&ve.c(),ft=b(),we=v("div"),Me.c(),Ye=b(),Ke=v("button"),xe=g(Ue),at=b(),ee=v("div"),Ae=v("div"),We=v("div"),We.textContent=je,nt=b(),Ie=v("div"),dt=v("span"),Lt=g(It),rs=b(),ht=v("span"),Ot=g(Ct),cs=b(),Nt=v("div"),vs=b(),Ze=v("div"),it=v("div"),it.textContent=Vs,us=b(),$e=v("div"),pt=v("span"),Bt=g(Tt),fs=b(),_t=v("span"),Kt=g(Pt),ds=b(),At=v("div"),hs=b(),et=v("div"),ot=v("div"),ot.textContent=ys,ps=b(),tt=v("div"),mt=v("span"),Ut=g(Vt),_s=b(),bt=v("span"),Wt=g(yt),jt=b(),Qe=v("div"),Ce=v("div"),Ve=v("div"),ue&&ue.c(),ms=b(),ye=v("div"),fe&&fe.c(),bs=b(),Fe=v("div"),de&&de.c(),Es=b(),Re=v("div"),he&&he.c(),gs=b(),Ne=v("div"),rt=v("span"),ks=g("■ "),Jt=g(Ft),Ss=b(),ct=v("span"),Ds=g("■ "),Yt=g(Rt),ws=b(),vt=v("span"),vt.textContent=Fs,Is=b(),ut=v("span"),ut.textContent=Rs,this.h()},l(_){s=c(_,"SECTION",{class:!0});var k=f(s);l=c(k,"DIV",{class:!0}),f(l).forEach(a),i=m(k),o=c(k,"DIV",{class:!0}),f(o).forEach(a),r=m(k),u=c(k,"DIV",{class:!0}),f(u).forEach(a),p=m(k),d=c(k,"DIV",{class:!0});var Et=f(d);h=c(Et,"SPAN",{class:!0}),f(h).forEach(a),U=m(Et),N=c(Et,"SPAN",{class:!0});var Os=f(N);I=E(Os,T),Os.forEach(a),P=m(Et),M=c(Et,"SPAN",{class:!0}),f(M).forEach(a),Et.forEach(a),x=m(k),W=c(k,"DIV",{class:!0});var Bs=f(W);q=E(Bs,H),Bs.forEach(a),z=m(k),F=c(k,"DIV",{class:!0});var ze=f(F);O=c(ze,"DIV",{class:!0});var gt=f(O);R=c(gt,"SPAN",{class:!0,"data-svelte-h":!0}),ge(R)!=="svelte-12zduky"&&(R.textContent=te),G=m(gt),V=c(gt,"SPAN",{class:!0});var Ks=f(V);ne=E(Ks,ae),Ks.forEach(a),B=m(gt),S=c(gt,"SPAN",{class:!0});var Us=f(S);Z=E(Us,y),Us.forEach(a),gt.forEach(a),Q=m(ze),se=c(ze,"DIV",{class:!0}),f(se).forEach(a),ie=m(ze),J=c(ze,"DIV",{class:!0});var kt=f(J);Y=c(kt,"SPAN",{class:!0,"data-svelte-h":!0}),ge(Y)!=="svelte-44xt9g"&&(Y.textContent=pe),Le=m(kt),be=c(kt,"SPAN",{class:!0});var Ws=f(be);le=E(Ws,re),Ws.forEach(a),Ee=m(kt),_e=c(kt,"SPAN",{class:!0});var js=f(_e);oe=E(js,ke),js.forEach(a),kt.forEach(a),Pe=m(ze),Se=c(ze,"DIV",{class:!0}),f(Se).forEach(a),Ge=m(ze),ce=c(ze,"DIV",{class:!0});var St=f(ce);me=c(St,"SPAN",{class:!0,"data-svelte-h":!0}),ge(me)!=="svelte-oh07pg"&&(me.textContent=Oe),Be=m(St),w=c(St,"SPAN",{class:!0});var zs=f(w);L=E(zs,$),zs.forEach(a),X=m(St),C=c(St,"SPAN",{class:!0});var qs=f(C);K=E(qs,A),qs.forEach(a),St.forEach(a),ze.forEach(a),Je=m(k),De=c(k,"DIV",{class:!0});var Hs=f(De);ve&&ve.l(Hs),Hs.forEach(a),ft=m(k),we=c(k,"DIV",{class:!0});var Qt=f(we);Me.l(Qt),Ye=m(Qt),Ke=c(Qt,"BUTTON",{class:!0});var Gs=f(Ke);xe=E(Gs,Ue),Gs.forEach(a),Qt.forEach(a),k.forEach(a),at=m(_),ee=c(_,"DIV",{class:!0});var qe=f(ee);Ae=c(qe,"DIV",{class:!0});var Xt=f(Ae);We=c(Xt,"DIV",{class:!0,"data-svelte-h":!0}),ge(We)!=="svelte-1jlzhxa"&&(We.textContent=je),nt=m(Xt),Ie=c(Xt,"DIV",{class:!0});var Zt=f(Ie);dt=c(Zt,"SPAN",{class:!0});var Js=f(dt);Lt=E(Js,It),Js.forEach(a),rs=m(Zt),ht=c(Zt,"SPAN",{class:!0});var Ys=f(ht);Ot=E(Ys,Ct),Ys.forEach(a),Zt.forEach(a),Xt.forEach(a),cs=m(qe),Nt=c(qe,"DIV",{class:!0}),f(Nt).forEach(a),vs=m(qe),Ze=c(qe,"DIV",{class:!0});var $t=f(Ze);it=c($t,"DIV",{class:!0,"data-svelte-h":!0}),ge(it)!=="svelte-5um8ac"&&(it.textContent=Vs),us=m($t),$e=c($t,"DIV",{class:!0});var es=f($e);pt=c(es,"SPAN",{class:!0});var xs=f(pt);Bt=E(xs,Tt),xs.forEach(a),fs=m(es),_t=c(es,"SPAN",{class:!0});var Qs=f(_t);Kt=E(Qs,Pt),Qs.forEach(a),es.forEach(a),$t.forEach(a),ds=m(qe),At=c(qe,"DIV",{class:!0}),f(At).forEach(a),hs=m(qe),et=c(qe,"DIV",{class:!0});var ts=f(et);ot=c(ts,"DIV",{class:!0,"data-svelte-h":!0}),ge(ot)!=="svelte-fzxys2"&&(ot.textContent=ys),ps=m(ts),tt=c(ts,"DIV",{class:!0});var ss=f(tt);mt=c(ss,"SPAN",{class:!0});var Xs=f(mt);Ut=E(Xs,Vt),Xs.forEach(a),_s=m(ss),bt=c(ss,"SPAN",{class:!0});var Zs=f(bt);Wt=E(Zs,yt),Zs.forEach(a),ss.forEach(a),ts.forEach(a),qe.forEach(a),jt=m(_),Qe=c(_,"DIV",{class:!0});var ls=f(Qe);Ce=c(ls,"DIV",{class:!0});var st=f(Ce);Ve=c(st,"DIV",{class:!0,style:!0,title:!0});var $s=f(Ve);ue&&ue.l($s),$s.forEach(a),ms=m(st),ye=c(st,"DIV",{class:!0,style:!0,title:!0});var el=f(ye);fe&&fe.l(el),el.forEach(a),bs=m(st),Fe=c(st,"DIV",{class:!0,style:!0,title:!0});var tl=f(Fe);de&&de.l(tl),tl.forEach(a),Es=m(st),Re=c(st,"DIV",{class:!0,style:!0,title:!0});var sl=f(Re);he&&he.l(sl),sl.forEach(a),st.forEach(a),gs=m(ls),Ne=c(ls,"DIV",{class:!0});var lt=f(Ne);rt=c(lt,"SPAN",{class:!0});var Ns=f(rt);ks=E(Ns,"■ "),Jt=E(Ns,Ft),Ns.forEach(a),Ss=m(lt),ct=c(lt,"SPAN",{class:!0});var Ts=f(ct);Ds=E(Ts,"■ "),Yt=E(Ts,Rt),Ts.forEach(a),ws=m(lt),vt=c(lt,"SPAN",{class:!0,"data-svelte-h":!0}),ge(vt)!=="svelte-5ywvc5"&&(vt.textContent=Fs),Is=m(lt),ut=c(lt,"SPAN",{class:!0,"data-svelte-h":!0}),ge(ut)!=="svelte-kff6f3"&&(ut.textContent=Rs),lt.forEach(a),ls.forEach(a),this.h()},h(){n(l,"class","grid-bg svelte-1i8v7x1"),n(o,"class","counter-glow svelte-1i8v7x1"),n(u,"class","scan-line svelte-1i8v7x1"),n(h,"class","eyebrow-line svelte-1i8v7x1"),n(N,"class","eyebrow-text svelte-1i8v7x1"),n(M,"class","eyebrow-line svelte-1i8v7x1"),n(d,"class","counter-eyebrow svelte-1i8v7x1"),n(W,"class","counter-number svelte-1i8v7x1"),Te(W,"refreshing",e[7]),n(R,"class","sub-arrow svelte-1i8v7x1"),n(V,"class","sub-lbl svelte-1i8v7x1"),n(S,"class","sub-val svelte-1i8v7x1"),n(O,"class","sub-chip svelte-1i8v7x1"),n(se,"class","sub-sep svelte-1i8v7x1"),n(Y,"class","sub-arrow svelte-1i8v7x1"),n(be,"class","sub-lbl svelte-1i8v7x1"),n(_e,"class","sub-val svelte-1i8v7x1"),n(J,"class","sub-chip svelte-1i8v7x1"),n(Se,"class","sub-sep svelte-1i8v7x1"),n(me,"class","sub-arrow svelte-1i8v7x1"),n(w,"class","sub-lbl svelte-1i8v7x1"),n(C,"class","sub-val svelte-1i8v7x1"),n(ce,"class","sub-chip svelte-1i8v7x1"),n(F,"class","counter-sub svelte-1i8v7x1"),n(De,"class","refresh-bar-track svelte-1i8v7x1"),n(Ke,"class","now-btn svelte-1i8v7x1"),n(we,"class","refresh-meta svelte-1i8v7x1"),n(s,"class","counter-section svelte-1i8v7x1"),Te(s,"pulsing",e[9]),n(We,"class","stat-icon-wrap svelte-1i8v7x1"),n(dt,"class","stat-lbl svelte-1i8v7x1"),n(ht,"class","stat-val cost-val svelte-1i8v7x1"),n(Ie,"class","stat-info svelte-1i8v7x1"),n(Ae,"class","stat-block stat-cost svelte-1i8v7x1"),n(Nt,"class","strip-divider svelte-1i8v7x1"),n(it,"class","stat-icon-wrap svelte-1i8v7x1"),n(pt,"class","stat-lbl svelte-1i8v7x1"),n(_t,"class","stat-val sess-val svelte-1i8v7x1"),n($e,"class","stat-info svelte-1i8v7x1"),n(Ze,"class","stat-block stat-sess svelte-1i8v7x1"),n(At,"class","strip-divider svelte-1i8v7x1"),n(ot,"class","stat-icon-wrap svelte-1i8v7x1"),n(mt,"class","stat-lbl svelte-1i8v7x1"),n(bt,"class","stat-val days-val svelte-1i8v7x1"),n(tt,"class","stat-info svelte-1i8v7x1"),n(et,"class","stat-block stat-days svelte-1i8v7x1"),n(ee,"class","stats-strip svelte-1i8v7x1"),n(Ve,"class","seg seg-input svelte-1i8v7x1"),He(Ve,"width",(e[8]?e[15]:0)+"%"),n(Ve,"title",zt=e[19]("home.input")+" "+e[15].toFixed(1)+"%"),n(ye,"class","seg seg-output svelte-1i8v7x1"),He(ye,"width",(e[8]?e[14]:0)+"%"),n(ye,"title",qt=e[19]("home.output")+" "+e[14].toFixed(1)+"%"),n(Fe,"class","seg seg-cr svelte-1i8v7x1"),He(Fe,"width",(e[8]?e[13]:0)+"%"),n(Fe,"title",Ht="Cache R "+e[13].toFixed(1)+"%"),n(Re,"class","seg seg-cw svelte-1i8v7x1"),He(Re,"width",(e[8]?e[12]:0)+"%"),n(Re,"title",Gt="Cache W "+e[12].toFixed(1)+"%"),n(Ce,"class","comp-bar svelte-1i8v7x1"),n(rt,"class","leg leg-i svelte-1i8v7x1"),n(ct,"class","leg leg-o svelte-1i8v7x1"),n(vt,"class","leg leg-cr svelte-1i8v7x1"),n(ut,"class","leg leg-cw svelte-1i8v7x1"),n(Ne,"class","comp-legend svelte-1i8v7x1"),n(Qe,"class","comp-wrap svelte-1i8v7x1")},m(_,k){j(_,s,k),t(s,l),t(s,i),t(s,o),t(s,r),t(s,u),t(s,p),t(s,d),t(d,h),t(d,U),t(d,N),t(N,I),t(d,P),t(d,M),t(s,x),t(s,W),t(W,q),t(s,z),t(s,F),t(F,O),t(O,R),t(O,G),t(O,V),t(V,ne),t(O,B),t(O,S),t(S,Z),t(F,Q),t(F,se),t(F,ie),t(F,J),t(J,Y),t(J,Le),t(J,be),t(be,le),t(J,Ee),t(J,_e),t(_e,oe),t(F,Pe),t(F,Se),t(F,Ge),t(F,ce),t(ce,me),t(ce,Be),t(ce,w),t(w,L),t(ce,X),t(ce,C),t(C,K),t(s,Je),t(s,De),ve&&ve.m(De,null),t(s,ft),t(s,we),Me.m(we,null),t(we,Ye),t(we,Ke),t(Ke,xe),j(_,at,k),j(_,ee,k),t(ee,Ae),t(Ae,We),t(Ae,nt),t(Ae,Ie),t(Ie,dt),t(dt,Lt),t(Ie,rs),t(Ie,ht),t(ht,Ot),t(ee,cs),t(ee,Nt),t(ee,vs),t(ee,Ze),t(Ze,it),t(Ze,us),t(Ze,$e),t($e,pt),t(pt,Bt),t($e,fs),t($e,_t),t(_t,Kt),t(ee,ds),t(ee,At),t(ee,hs),t(ee,et),t(et,ot),t(et,ps),t(et,tt),t(tt,mt),t(mt,Ut),t(tt,_s),t(tt,bt),t(bt,Wt),j(_,jt,k),j(_,Qe,k),t(Qe,Ce),t(Ce,Ve),ue&&ue.m(Ve,null),t(Ce,ms),t(Ce,ye),fe&&fe.m(ye,null),t(Ce,bs),t(Ce,Fe),de&&de.m(Fe,null),t(Ce,Es),t(Ce,Re),he&&he.m(Re,null),t(Qe,gs),t(Qe,Ne),t(Ne,rt),t(rt,ks),t(rt,Jt),t(Ne,Ss),t(Ne,ct),t(ct,Ds),t(ct,Yt),t(Ne,ws),t(Ne,vt),t(Ne,Is),t(Ne,ut),Cs||(Ms=Xe(Ke,"click",e[29]),Cs=!0)},p(_,k){k[0]&524288&&T!==(T=_[19]("home.counterLabel")+"")&&D(I,T),k[0]&1310720&&H!==(H=_[18](_[20])+"")&&D(q,H),k[0]&128&&Te(W,"refreshing",_[7]),k[0]&524288&&ae!==(ae=_[19]("home.input")+"")&&D(ne,ae),k[0]&2&&y!==(y=Dt(_[1].inputTokens)+"")&&D(Z,y),k[0]&524288&&re!==(re=_[19]("home.output")+"")&&D(le,re),k[0]&2&&ke!==(ke=Dt(_[1].outputTokens)+"")&&D(oe,ke),k[0]&524288&&$!==($=_[19]("home.cache")+"")&&D(L,$),k[0]&2&&A!==(A=Dt((_[1].cacheReadTokens||0)+(_[1].cacheWriteTokens||0))+"")&&D(K,A),_[3]>0?ve?ve.p(_,k):(ve=vl(_),ve.c(),ve.m(De,null)):ve&&(ve.d(1),ve=null),xt===(xt=Ls(_))&&Me?Me.p(_,k):(Me.d(1),Me=xt(_),Me&&(Me.c(),Me.m(we,Ye))),k[0]&524296&&Ue!==(Ue=(_[3]>0?_[19]("home.refreshNow"):_[19]("home.refreshBtn"))+"")&&D(xe,Ue),k[0]&512&&Te(s,"pulsing",_[9]),k[0]&524288&&It!==(It=_[19]("overview.totalCost")+"")&&D(Lt,It),k[0]&2097152&&Ct!==(Ct=_l(_[21])+"")&&D(Ot,Ct),k[0]&524288&&Tt!==(Tt=_[19]("overview.totalSessions")+"")&&D(Bt,Tt),k[0]&4194304&&Pt!==(Pt=Math.round(_[22]).toLocaleString()+"")&&D(Kt,Pt),k[0]&524288&&Vt!==(Vt=_[19]("overview.activeDays")+"")&&D(Ut,Vt),k[0]&8388608&&yt!==(yt=Math.round(_[23]).toLocaleString()+"")&&D(Wt,yt),_[15]>9?ue?ue.p(_,k):(ue=ul(_),ue.c(),ue.m(Ve,null)):ue&&(ue.d(1),ue=null),k[0]&33024&&He(Ve,"width",(_[8]?_[15]:0)+"%"),k[0]&557056&&zt!==(zt=_[19]("home.input")+" "+_[15].toFixed(1)+"%")&&n(Ve,"title",zt),_[14]>9?fe?fe.p(_,k):(fe=fl(_),fe.c(),fe.m(ye,null)):fe&&(fe.d(1),fe=null),k[0]&16640&&He(ye,"width",(_[8]?_[14]:0)+"%"),k[0]&540672&&qt!==(qt=_[19]("home.output")+" "+_[14].toFixed(1)+"%")&&n(ye,"title",qt),_[13]>9?de?de.p(_,k):(de=dl(_),de.c(),de.m(Fe,null)):de&&(de.d(1),de=null),k[0]&8448&&He(Fe,"width",(_[8]?_[13]:0)+"%"),k[0]&8192&&Ht!==(Ht="Cache R "+_[13].toFixed(1)+"%")&&n(Fe,"title",Ht),_[12]>9?he?he.p(_,k):(he=hl(_),he.c(),he.m(Re,null)):he&&(he.d(1),he=null),k[0]&4352&&He(Re,"width",(_[8]?_[12]:0)+"%"),k[0]&4096&&Gt!==(Gt="Cache W "+_[12].toFixed(1)+"%")&&n(Re,"title",Gt),k[0]&524288&&Ft!==(Ft=_[19]("home.input")+"")&&D(Jt,Ft),k[0]&524288&&Rt!==(Rt=_[19]("home.output")+"")&&D(Yt,Rt)},d(_){_&&(a(s),a(at),a(ee),a(jt),a(Qe)),ve&&ve.d(),Me.d(),ue&&ue.d(),fe&&fe.d(),de&&de.d(),he&&he.d(),Cs=!1,Ms()}}}function Bl(e){let s,l,i="◌",o,r,u=e[19]("common.noData")+"",p,d,h,U=e[19]("common.noDataHint")+"",N;return{c(){s=v("div"),l=v("span"),l.textContent=i,o=b(),r=v("span"),p=g(u),d=b(),h=v("span"),N=g(U),this.h()},l(T){s=c(T,"DIV",{class:!0});var I=f(s);l=c(I,"SPAN",{class:!0,"data-svelte-h":!0}),ge(l)!=="svelte-q8slaa"&&(l.textContent=i),o=m(I),r=c(I,"SPAN",{class:!0});var P=f(r);p=E(P,u),P.forEach(a),d=m(I),h=c(I,"SPAN",{class:!0});var M=f(h);N=E(M,U),M.forEach(a),I.forEach(a),this.h()},h(){n(l,"class","empty-icon svelte-1i8v7x1"),n(r,"class","empty-title svelte-1i8v7x1"),n(h,"class","empty-hint svelte-1i8v7x1"),n(s,"class","splash-empty svelte-1i8v7x1")},m(T,I){j(T,s,I),t(s,l),t(s,o),t(s,r),t(r,p),t(s,d),t(s,h),t(h,N)},p(T,I){I[0]&524288&&u!==(u=T[19]("common.noData")+"")&&D(p,u),I[0]&524288&&U!==(U=T[19]("common.noDataHint")+"")&&D(N,U)},d(T){T&&a(s)}}}function Kl(e){let s,l,i="ERR",o,r,u,p,d,h=e[19]("home.refreshBtn")+"",U,N,T;return{c(){s=v("div"),l=v("span"),l.textContent=i,o=b(),r=v("span"),u=g(e[5]),p=b(),d=v("button"),U=g(h),this.h()},l(I){s=c(I,"DIV",{class:!0});var P=f(s);l=c(P,"SPAN",{class:!0,"data-svelte-h":!0}),ge(l)!=="svelte-1qoibhb"&&(l.textContent=i),o=m(P),r=c(P,"SPAN",{class:!0});var M=f(r);u=E(M,e[5]),M.forEach(a),p=m(P),d=c(P,"BUTTON",{class:!0});var x=f(d);U=E(x,h),x.forEach(a),P.forEach(a),this.h()},h(){n(l,"class","err-code svelte-1i8v7x1"),n(r,"class","err-msg svelte-1i8v7x1"),n(d,"class","retry-btn svelte-1i8v7x1"),n(s,"class","splash-error svelte-1i8v7x1")},m(I,P){j(I,s,P),t(s,l),t(s,o),t(s,r),t(r,u),t(s,p),t(s,d),t(d,U),N||(T=Xe(d,"click",e[29]),N=!0)},p(I,P){P[0]&32&&D(u,I[5]),P[0]&524288&&h!==(h=I[19]("home.refreshBtn")+"")&&D(U,h)},d(I){I&&a(s),N=!1,T()}}}function Ul(e){let s,l,i,o,r=e[19]("common.loading")+"",u;return{c(){s=v("div"),l=v("div"),i=b(),o=v("span"),u=g(r),this.h()},l(p){s=c(p,"DIV",{class:!0});var d=f(s);l=c(d,"DIV",{class:!0}),f(l).forEach(a),i=m(d),o=c(d,"SPAN",{class:!0});var h=f(o);u=E(h,r),h.forEach(a),d.forEach(a),this.h()},h(){n(l,"class","splash-spinner svelte-1i8v7x1"),n(o,"class","splash-text svelte-1i8v7x1"),n(s,"class","splash-loading svelte-1i8v7x1")},m(p,d){j(p,s,d),t(s,l),t(s,i),t(s,o),t(o,u)},p(p,d){d[0]&524288&&r!==(r=p[19]("common.loading")+"")&&D(u,r)},d(p){p&&a(s)}}}function vl(e){let s;return{c(){s=v("div"),this.h()},l(l){s=c(l,"DIV",{class:!0,style:!0}),f(s).forEach(a),this.h()},h(){n(s,"class","refresh-bar-fill svelte-1i8v7x1"),He(s,"width",e[11]+"%")},m(l,i){j(l,s,i)},p(l,i){i[0]&2048&&He(s,"width",l[11]+"%")},d(l){l&&a(s)}}}function Wl(e){let s,l=e[19]("home.manualMode")+"",i;return{c(){s=v("span"),i=g(l)},l(o){s=c(o,"SPAN",{});var r=f(s);i=E(r,l),r.forEach(a)},m(o,r){j(o,s,r),t(s,i)},p(o,r){r[0]&524288&&l!==(l=o[19]("home.manualMode")+"")&&D(i,l)},d(o){o&&a(s)}}}function jl(e){let s;function l(r,u){return r[2]>0?ql:zl}let i=l(e),o=i(e);return{c(){o.c(),s=os()},l(r){o.l(r),s=os()},m(r,u){o.m(r,u),j(r,s,u)},p(r,u){i===(i=l(r))&&o?o.p(r,u):(o.d(1),o=i(r),o&&(o.c(),o.m(s.parentNode,s)))},d(r){r&&a(s),o.d(r)}}}function zl(e){let s,l=e[19]("home.refreshing")+"",i;return{c(){s=v("span"),i=g(l),this.h()},l(o){s=c(o,"SPAN",{class:!0});var r=f(s);i=E(r,l),r.forEach(a),this.h()},h(){n(s,"class","refreshing-label svelte-1i8v7x1")},m(o,r){j(o,s,r),t(s,i)},p(o,r){r[0]&524288&&l!==(l=o[19]("home.refreshing")+"")&&D(i,l)},d(o){o&&a(s)}}}function ql(e){let s,l=e[19]("home.nextRefresh")+"",i,o,r,u=e[19]("home.seconds")+"",p;return{c(){s=v("span"),i=g(l),o=b(),r=g(e[2]),p=g(u)},l(d){s=c(d,"SPAN",{});var h=f(s);i=E(h,l),o=m(h),r=E(h,e[2]),p=E(h,u),h.forEach(a)},m(d,h){j(d,s,h),t(s,i),t(s,o),t(s,r),t(s,p)},p(d,h){h[0]&524288&&l!==(l=d[19]("home.nextRefresh")+"")&&D(i,l),h[0]&4&&D(r,d[2]),h[0]&524288&&u!==(u=d[19]("home.seconds")+"")&&D(p,u)},d(d){d&&a(s)}}}function ul(e){let s,l=e[19]("home.input")+"",i,o,r=e[15].toFixed(0)+"",u,p;return{c(){s=v("span"),i=g(l),o=b(),u=g(r),p=g("%"),this.h()},l(d){s=c(d,"SPAN",{class:!0});var h=f(s);i=E(h,l),o=m(h),u=E(h,r),p=E(h,"%"),h.forEach(a),this.h()},h(){n(s,"class","seg-lbl svelte-1i8v7x1")},m(d,h){j(d,s,h),t(s,i),t(s,o),t(s,u),t(s,p)},p(d,h){h[0]&524288&&l!==(l=d[19]("home.input")+"")&&D(i,l),h[0]&32768&&r!==(r=d[15].toFixed(0)+"")&&D(u,r)},d(d){d&&a(s)}}}function fl(e){let s,l=e[19]("home.output")+"",i,o,r=e[14].toFixed(0)+"",u,p;return{c(){s=v("span"),i=g(l),o=b(),u=g(r),p=g("%"),this.h()},l(d){s=c(d,"SPAN",{class:!0});var h=f(s);i=E(h,l),o=m(h),u=E(h,r),p=E(h,"%"),h.forEach(a),this.h()},h(){n(s,"class","seg-lbl svelte-1i8v7x1")},m(d,h){j(d,s,h),t(s,i),t(s,o),t(s,u),t(s,p)},p(d,h){h[0]&524288&&l!==(l=d[19]("home.output")+"")&&D(i,l),h[0]&16384&&r!==(r=d[14].toFixed(0)+"")&&D(u,r)},d(d){d&&a(s)}}}function dl(e){let s,l,i=e[13].toFixed(0)+"",o,r;return{c(){s=v("span"),l=g("Cache R "),o=g(i),r=g("%"),this.h()},l(u){s=c(u,"SPAN",{class:!0});var p=f(s);l=E(p,"Cache R "),o=E(p,i),r=E(p,"%"),p.forEach(a),this.h()},h(){n(s,"class","seg-lbl svelte-1i8v7x1")},m(u,p){j(u,s,p),t(s,l),t(s,o),t(s,r)},p(u,p){p[0]&8192&&i!==(i=u[13].toFixed(0)+"")&&D(o,i)},d(u){u&&a(s)}}}function hl(e){let s,l,i=e[12].toFixed(0)+"",o,r;return{c(){s=v("span"),l=g("Cache W "),o=g(i),r=g("%"),this.h()},l(u){s=c(u,"SPAN",{class:!0});var p=f(s);l=E(p,"Cache W "),o=E(p,i),r=E(p,"%"),p.forEach(a),this.h()},h(){n(s,"class","seg-lbl svelte-1i8v7x1")},m(u,p){j(u,s,p),t(s,l),t(s,o),t(s,r)},p(u,p){p[0]&4096&&i!==(i=u[12].toFixed(0)+"")&&D(o,i)},d(u){u&&a(s)}}}function Hl(e){let s,l,i,o,r='<span class="live-dot svelte-1i8v7x1"></span> <span class="live-label svelte-1i8v7x1">LIVE</span>',u,p,d=e[19](e[10])+"",h,U,N,T,I,P,M,x,W,H,q,z="⚙",F,O,R,te,G,V=e[4]&&rl(e);function ae(S,y){return S[6]?Ul:S[5]?Kl:!S[1]||S[1].totalTokens===0?Bl:Ol}let ne=ae(e),B=ne(e);return{c(){s=b(),V&&V.c(),l=b(),i=v("div"),o=v("div"),o.innerHTML=r,u=b(),p=v("div"),h=g(d),U=b(),N=v("div"),T=v("span"),I=g(e[17]),P=b(),M=v("span"),x=g(e[16]),W=b(),H=v("button"),q=v("span"),q.textContent=z,O=b(),B.c(),R=os(),this.h()},l(S){Tl("svelte-ll0z12",document.head).forEach(a),s=m(S),V&&V.l(S),l=m(S),i=c(S,"DIV",{class:!0});var Z=f(i);o=c(Z,"DIV",{class:!0,"data-svelte-h":!0}),ge(o)!=="svelte-srwpc0"&&(o.innerHTML=r),u=m(Z),p=c(Z,"DIV",{class:!0});var Q=f(p);h=E(Q,d),Q.forEach(a),U=m(Z),N=c(Z,"DIV",{class:!0});var se=f(N);T=c(se,"SPAN",{class:!0});var ie=f(T);I=E(ie,e[17]),ie.forEach(a),P=m(se),M=c(se,"SPAN",{class:!0});var J=f(M);x=E(J,e[16]),J.forEach(a),se.forEach(a),W=m(Z),H=c(Z,"BUTTON",{class:!0,title:!0});var Y=f(H);q=c(Y,"SPAN",{class:!0,"data-svelte-h":!0}),ge(q)!=="svelte-jotwdi"&&(q.textContent=z),Y.forEach(a),Z.forEach(a),O=m(S),B.l(S),R=os(),this.h()},h(){document.title="AIUsage — Live Counter",n(o,"class","live-wrap svelte-1i8v7x1"),Te(o,"pulse",e[9]),n(p,"class","range-badge svelte-1i8v7x1"),n(T,"class","clock-time svelte-1i8v7x1"),n(M,"class","clock-date svelte-1i8v7x1"),n(N,"class","clock-block svelte-1i8v7x1"),n(q,"class","cfg-icon svelte-1i8v7x1"),n(H,"class","cfg-btn svelte-1i8v7x1"),n(H,"title",F=e[19]("home.cfgTitle")),n(i,"class","top-bar svelte-1i8v7x1")},m(S,y){j(S,s,y),V&&V.m(S,y),j(S,l,y),j(S,i,y),t(i,o),t(i,u),t(i,p),t(p,h),t(i,U),t(i,N),t(N,T),t(T,I),t(N,P),t(N,M),t(M,x),t(i,W),t(i,H),t(H,q),j(S,O,y),B.m(S,y),j(S,R,y),te||(G=Xe(H,"click",e[41]),te=!0)},p(S,y){S[4]?V?V.p(S,y):(V=rl(S),V.c(),V.m(l.parentNode,l)):V&&(V.d(1),V=null),y[0]&512&&Te(o,"pulse",S[9]),y[0]&525312&&d!==(d=S[19](S[10])+"")&&D(h,d),y[0]&131072&&D(I,S[17]),y[0]&65536&&D(x,S[16]),y[0]&524288&&F!==(F=S[19]("home.cfgTitle"))&&n(H,"title",F),ne===(ne=ae(S))&&B?B.p(S,y):(B.d(1),B=ne(S),B&&(B.c(),B.m(R.parentNode,R)))},i:Ps,o:Ps,d(S){S&&(a(s),a(l),a(i),a(O),a(R)),V&&V.d(S),B.d(S),te=!1,G()}}}const gl="aiusage-home-display";function is(){return{range:"all",precision:"exact"}}function Gl(){if(typeof window>"u")return is();try{return{...is(),...JSON.parse(localStorage.getItem(gl)||"{}")}}catch{return is()}}function pl(e){typeof window<"u"&&localStorage.setItem(gl,JSON.stringify(e))}function _l(e){return e<.01?"$"+e.toFixed(4):"$"+e.toFixed(2)}function Dt(e){return e>=1e9?(e/1e9).toFixed(1)+"B":e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":e.toLocaleString()}function Jl(e,s,l){let i,o,r,u,p,d,h,U,N,T,I,P,M,x,W,H;Mt(e,Fl,w=>l(19,P=w));const q=[{tKey:"range.allTime",value:"all"},{tKey:"range.today",value:"day"},{tKey:"range.week",value:"week"},{tKey:"range.month",value:"month"},{tKey:"range.last30",value:"last30"}];let z=is(),F=!1,O=3e4,R=null,te=null,G=!0,V=!1,ae=!1;const ne=ns(0,{duration:2600,easing:as});Mt(e,ne,w=>l(20,M=w));const B=ns(0,{duration:2300,easing:as});Mt(e,B,w=>l(21,x=w));const S=ns(0,{duration:1900,easing:as});Mt(e,S,w=>l(22,W=w));const y=ns(0,{duration:1600,easing:as});Mt(e,y,w=>l(23,H=w));async function Z(w=!1){const $=w?500:2600;l(5,te=null);try{const L=await yl({range:z.range});L&&(l(1,R=L),ne.set(L.totalTokens,{duration:$}),B.set(L.totalCost,{duration:Math.round($*.88)}),S.set(L.totalSessions||0,{duration:Math.round($*.73)}),y.set(L.activeDays,{duration:Math.round($*.62)}),l(8,ae=!1),setTimeout(()=>{l(8,ae=!0)},w?80:400))}catch(L){l(5,te=L instanceof Error?L.message:"Failed to load"),l(1,R=null)}}async function Q(){l(6,G=!0),ne.set(0,{duration:0}),B.set(0,{duration:0}),S.set(0,{duration:0}),y.set(0,{duration:0}),l(8,ae=!1),await Z(!1),l(6,G=!1)}async function se(){l(7,V=!0),await Z(!0),l(7,V=!1)}let ie=0,J=null,Y=null;function pe(){clearInterval(J),clearTimeout(Y);const w=Math.round(O/1e3);if(!w){l(2,ie=0);return}l(2,ie=w),J=setInterval(()=>{l(2,ie=Math.max(0,ie-1))},1e3),Y=setTimeout(()=>{se().then(pe)},O)}function Le(){clearInterval(J),clearTimeout(Y),se().then(()=>pe())}function be(w){var $;l(32,O=(($=w==null?void 0:w.detail)==null?void 0:$.dashboardPollInterval)??3e4),pe()}let re=new Date,le=null,Ee=!1,_e=null;Dl(async()=>{l(0,z=Gl()),le=setInterval(()=>{l(33,re=new Date)},1e3),_e=setInterval(()=>{l(9,Ee=!0),setTimeout(()=>{l(9,Ee=!1)},800)},4500);try{const w=await Al();w!=null&&w.dashboardPollInterval&&l(32,O=w.dashboardPollInterval)}catch{}await Vl().catch(()=>{}),await Q(),pe(),window.addEventListener(al,be)}),wl(()=>{clearInterval(le),clearInterval(J),clearInterval(_e),clearTimeout(Y),window.removeEventListener(al,be)});function ke(w){l(0,z={...z,range:w}),pl(z),Q().then(()=>pe())}function oe(w){l(0,z={...z,precision:w}),pl(z)}const Pe=()=>l(4,F=!1),Se=()=>l(4,F=!1),Ge=w=>ke(w.value),ce=()=>oe("exact"),me=()=>oe("abbr"),Oe=()=>l(4,F=!1),Be=()=>l(4,F=!F);return e.$$.update=()=>{var w;e.$$.dirty[0]&1&&l(18,i=$=>{const L=Math.round($);if(z.precision==="abbr"){if(L>=1e9)return(L/1e9).toFixed(3)+"B";if(L>=1e6)return(L/1e6).toFixed(3)+"M";if(L>=1e3)return(L/1e3).toFixed(1)+"K"}return L.toLocaleString()}),e.$$.dirty[1]&4&&l(17,o=re.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})),e.$$.dirty[1]&4&&l(16,r=re.toLocaleDateString([],{month:"short",day:"numeric",year:"numeric"})),e.$$.dirty[0]&2&&l(34,u=R?(R.inputTokens||0)+(R.outputTokens||0)+(R.cacheReadTokens||0)+(R.cacheWriteTokens||0):0),e.$$.dirty[0]&2|e.$$.dirty[1]&8&&l(15,p=u>0?R.inputTokens/u*100:0),e.$$.dirty[0]&2|e.$$.dirty[1]&8&&l(14,d=u>0?R.outputTokens/u*100:0),e.$$.dirty[0]&2|e.$$.dirty[1]&8&&l(13,h=u>0?R.cacheReadTokens/u*100:0),e.$$.dirty[0]&2|e.$$.dirty[1]&8&&l(12,U=u>0?R.cacheWriteTokens/u*100:0),e.$$.dirty[1]&2&&l(3,N=Math.round(O/1e3)),e.$$.dirty[0]&12&&l(11,T=N>0?(1-ie/N)*100:0),e.$$.dirty[0]&1&&l(10,I=((w=q.find($=>$.value===z.range))==null?void 0:w.tKey)??"range.allTime")},[z,R,ie,N,F,te,G,V,ae,Ee,I,T,U,h,d,p,r,o,i,P,M,x,W,H,q,ne,B,S,y,Le,ke,oe,O,re,u,Pe,Se,Ge,ce,me,Oe,Be]}class Zl extends Cl{constructor(s){super(),Nl(this,s,Jl,Hl,Sl,{},null,[-1,-1])}}export{Zl as component};
@@ -1 +1 @@
1
- import{s as ze,c as te}from"../chunks/scheduler.Dx1bs0RQ.js";import{S as Te,i as Se,d as u,k as ne,l as re,m as ce,a as P,n as ie,b as c,o as p,p as ye,g as j,c as b,e as E,q as de,r as pe,j as z,h as D,u as ue,s as M,f as C,t as N,v as fe,w as he}from"../chunks/index.CzqoKkoo.js";import{a as we,e as K,t as Ae}from"../chunks/api.DyoIo4nG.js";import{D as Pe,a as Ce,T as Ne,b as U,s as Me,d as $e,e as He}from"../chunks/ToolSelector.kb97TteP.js";function be(n,e,t){const l=n.slice();return l[10]=e[t][0],l[11]=e[t][1],l}function Ee(n,e,t){const l=n.slice();return l[14]=e[t][0],l[11]=e[t][1],l}function De(n,e,t){const l=n.slice();l[17]=e[t],l[20]=t;const r=l[4]();return l[18]=r,l}function Re(n){let e,t,l=n[3]("cost.totalCost")+"",r,v,i,f=U(n[5]())+"",m,h,s,d,k=n[3]("cost.chartTitle")+"",g,T,_,A,V,R,B,L=n[3]("cost.byTool")+"",W,se,ae,q,F,Q=n[3]("cost.byModel")+"",X,oe,O=K(n[0].data),S=[];for(let o=0;o<O.length;o+=1)S[o]=Ie(De(n,O,o));let G=K(le(n[0].byTool,10)),y=[];for(let o=0;o<G.length;o+=1)y[o]=ke(Ee(n,G,o));let J=K(le(n[0].byModel,10)),w=[];for(let o=0;o<J.length;o+=1)w[o]=Ve(be(n,J,o));return{c(){e=D("div"),t=D("span"),r=N(l),v=z(),i=D("span"),m=N(f),h=z(),s=D("div"),d=D("div"),g=N(k),T=z(),_=D("div");for(let o=0;o<S.length;o+=1)S[o].c();A=z(),V=D("div"),R=D("div"),B=D("div"),W=N(L),se=z();for(let o=0;o<y.length;o+=1)y[o].c();ae=z(),q=D("div"),F=D("div"),X=N(Q),oe=z();for(let o=0;o<w.length;o+=1)w[o].c();this.h()},l(o){e=b(o,"DIV",{class:!0});var I=E(e);t=b(I,"SPAN",{class:!0});var a=E(t);r=C(a,l),a.forEach(u),v=j(I),i=b(I,"SPAN",{class:!0});var $=E(i);m=C($,f),$.forEach(u),I.forEach(u),h=j(o),s=b(o,"DIV",{class:!0});var Y=E(s);d=b(Y,"DIV",{class:!0});var _e=E(d);g=C(_e,k),_e.forEach(u),T=j(Y),_=b(Y,"DIV",{class:!0});var ve=E(_);for(let H=0;H<S.length;H+=1)S[H].l(ve);ve.forEach(u),Y.forEach(u),A=j(o),V=b(o,"DIV",{class:!0});var Z=E(V);R=b(Z,"DIV",{class:!0});var x=E(R);B=b(x,"DIV",{class:!0});var me=E(B);W=C(me,L),me.forEach(u),se=j(x);for(let H=0;H<y.length;H+=1)y[H].l(x);x.forEach(u),ae=j(Z),q=b(Z,"DIV",{class:!0});var ee=E(q);F=b(ee,"DIV",{class:!0});var ge=E(F);X=C(ge,Q),ge.forEach(u),oe=j(ee);for(let H=0;H<w.length;H+=1)w[H].l(ee);ee.forEach(u),Z.forEach(u),this.h()},h(){p(t,"class","hero-label svelte-gujtdz"),p(i,"class","hero-value svelte-gujtdz"),p(e,"class","hero-card accent svelte-gujtdz"),p(d,"class","section-title"),p(_,"class","chart svelte-gujtdz"),p(s,"class","card chart-section svelte-gujtdz"),p(B,"class","section-title"),p(R,"class","card"),p(F,"class","section-title"),p(q,"class","card"),p(V,"class","grid-2 svelte-gujtdz")},m(o,I){P(o,e,I),c(e,t),c(t,r),c(e,v),c(e,i),c(i,m),P(o,h,I),P(o,s,I),c(s,d),c(d,g),c(s,T),c(s,_);for(let a=0;a<S.length;a+=1)S[a]&&S[a].m(_,null);P(o,A,I),P(o,V,I),c(V,R),c(R,B),c(B,W),c(R,se);for(let a=0;a<y.length;a+=1)y[a]&&y[a].m(R,null);c(V,ae),c(V,q),c(q,F),c(F,X),c(q,oe);for(let a=0;a<w.length;a+=1)w[a]&&w[a].m(q,null)},p(o,I){if(I&8&&l!==(l=o[3]("cost.totalCost")+"")&&M(r,l),I&8&&k!==(k=o[3]("cost.chartTitle")+"")&&M(g,k),I&17){O=K(o[0].data);let a;for(a=0;a<O.length;a+=1){const $=De(o,O,a);S[a]?S[a].p($,I):(S[a]=Ie($),S[a].c(),S[a].m(_,null))}for(;a<S.length;a+=1)S[a].d(1);S.length=O.length}if(I&8&&L!==(L=o[3]("cost.byTool")+"")&&M(W,L),I&1){G=K(le(o[0].byTool,10));let a;for(a=0;a<G.length;a+=1){const $=Ee(o,G,a);y[a]?y[a].p($,I):(y[a]=ke($),y[a].c(),y[a].m(R,null))}for(;a<y.length;a+=1)y[a].d(1);y.length=G.length}if(I&8&&Q!==(Q=o[3]("cost.byModel")+"")&&M(X,Q),I&1){J=K(le(o[0].byModel,10));let a;for(a=0;a<J.length;a+=1){const $=be(o,J,a);w[a]?w[a].p($,I):(w[a]=Ve($),w[a].c(),w[a].m(q,null))}for(;a<w.length;a+=1)w[a].d(1);w.length=J.length}},d(o){o&&(u(e),u(h),u(s),u(A),u(V)),fe(S,o),fe(y,o),fe(w,o)}}}function qe(n){let e,t,l=n[3]("cost.noData")+"",r,v,i,f=n[3]("cost.noDataHint")+"",m;return{c(){e=D("div"),t=D("h2"),r=N(l),v=z(),i=D("p"),m=N(f),this.h()},l(h){e=b(h,"DIV",{class:!0});var s=E(e);t=b(s,"H2",{});var d=E(t);r=C(d,l),d.forEach(u),v=j(s),i=b(s,"P",{});var k=E(i);m=C(k,f),k.forEach(u),s.forEach(u),this.h()},h(){p(e,"class","state-msg")},m(h,s){P(h,e,s),c(e,t),c(t,r),c(e,v),c(e,i),c(i,m)},p(h,s){s&8&&l!==(l=h[3]("cost.noData")+"")&&M(r,l),s&8&&f!==(f=h[3]("cost.noDataHint")+"")&&M(m,f)},d(h){h&&u(e)}}}function Ue(n){let e,t;return{c(){e=D("div"),t=N(n[1]),this.h()},l(l){e=b(l,"DIV",{class:!0});var r=E(e);t=C(r,n[1]),r.forEach(u),this.h()},h(){p(e,"class","state-msg error")},m(l,r){P(l,e,r),c(e,t)},p(l,r){r&2&&M(t,l[1])},d(l){l&&u(e)}}}function Be(n){let e,t=n[3]("common.loading")+"",l;return{c(){e=D("div"),l=N(t),this.h()},l(r){e=b(r,"DIV",{class:!0});var v=E(e);l=C(v,t),v.forEach(u),this.h()},h(){p(e,"class","state-msg")},m(r,v){P(r,e,v),c(e,l)},p(r,v){v&8&&t!==(t=r[3]("common.loading")+"")&&M(l,t)},d(r){r&&u(e)}}}function Ie(n){let e,t,l,r,v,i=n[17].date.slice(5)+"",f,m;return{c(){e=D("div"),t=D("div"),r=z(),v=D("div"),f=N(i),m=z(),this.h()},l(h){e=b(h,"DIV",{class:!0,style:!0});var s=E(e);t=b(s,"DIV",{class:!0,style:!0,title:!0}),E(t).forEach(u),r=j(s),v=b(s,"DIV",{class:!0});var d=E(v);f=C(d,i),d.forEach(u),m=j(s),s.forEach(u),this.h()},h(){p(t,"class","bar svelte-gujtdz"),he(t,"height",je(n[17].cost,n[18])+"px"),p(t,"title",l=U(n[17].cost)),p(v,"class","label svelte-gujtdz"),p(e,"class","bar-group svelte-gujtdz"),he(e,"animation-delay",n[20]*30+"ms")},m(h,s){P(h,e,s),c(e,t),c(e,r),c(e,v),c(v,f),c(e,m)},p(h,s){s&1&&he(t,"height",je(h[17].cost,h[18])+"px"),s&1&&l!==(l=U(h[17].cost))&&p(t,"title",l),s&1&&i!==(i=h[17].date.slice(5)+"")&&M(f,i)},d(h){h&&u(e)}}}function ke(n){let e,t,l=n[14]+"",r,v,i,f=U(n[11])+"",m,h;return{c(){e=D("div"),t=D("span"),r=N(l),v=z(),i=D("span"),m=N(f),h=z(),this.h()},l(s){e=b(s,"DIV",{class:!0});var d=E(e);t=b(d,"SPAN",{class:!0});var k=E(t);r=C(k,l),k.forEach(u),v=j(d),i=b(d,"SPAN",{class:!0});var g=E(i);m=C(g,f),g.forEach(u),h=j(d),d.forEach(u),this.h()},h(){p(t,"class","mono"),p(i,"class","mono accent"),p(e,"class","breakdown-row svelte-gujtdz")},m(s,d){P(s,e,d),c(e,t),c(t,r),c(e,v),c(e,i),c(i,m),c(e,h)},p(s,d){d&1&&l!==(l=s[14]+"")&&M(r,l),d&1&&f!==(f=U(s[11])+"")&&M(m,f)},d(s){s&&u(e)}}}function Ve(n){let e,t,l=n[10]+"",r,v,i,f=U(n[11])+"",m,h;return{c(){e=D("div"),t=D("span"),r=N(l),v=z(),i=D("span"),m=N(f),h=z(),this.h()},l(s){e=b(s,"DIV",{class:!0});var d=E(e);t=b(d,"SPAN",{class:!0});var k=E(t);r=C(k,l),k.forEach(u),v=j(d),i=b(d,"SPAN",{class:!0});var g=E(i);m=C(g,f),g.forEach(u),h=j(d),d.forEach(u),this.h()},h(){p(t,"class","mono"),p(i,"class","mono accent"),p(e,"class","breakdown-row svelte-gujtdz")},m(s,d){P(s,e,d),c(e,t),c(t,r),c(e,v),c(e,i),c(i,m),c(e,h)},p(s,d){d&1&&l!==(l=s[10]+"")&&M(r,l),d&1&&f!==(f=U(s[11])+"")&&M(m,f)},d(s){s&&u(e)}}}function Fe(n){let e,t,l,r,v,i,f,m,h,s,d;document.title=e=n[3]("cost.title")+" — AIUsage",r=new Pe({}),i=new Ce({}),m=new Ne({});function k(_,A){var V;return _[2]?Be:_[1]?Ue:(V=_[0])!=null&&V.data.length?Re:qe}let g=k(n),T=g(n);return{c(){t=z(),l=D("div"),ue(r.$$.fragment),v=z(),ue(i.$$.fragment),f=z(),ue(m.$$.fragment),h=z(),T.c(),s=pe(),this.h()},l(_){ye("svelte-91h8ba",document.head).forEach(u),t=j(_),l=b(_,"DIV",{class:!0});var V=E(l);de(r.$$.fragment,V),v=j(V),de(i.$$.fragment,V),f=j(V),de(m.$$.fragment,V),V.forEach(u),h=j(_),T.l(_),s=pe(),this.h()},h(){p(l,"class","filter-bar svelte-gujtdz")},m(_,A){P(_,t,A),P(_,l,A),ie(r,l,null),c(l,v),ie(i,l,null),c(l,f),ie(m,l,null),P(_,h,A),T.m(_,A),P(_,s,A),d=!0},p(_,[A]){(!d||A&8)&&e!==(e=_[3]("cost.title")+" — AIUsage")&&(document.title=e),g===(g=k(_))&&T?T.p(_,A):(T.d(1),T=g(_),T&&(T.c(),T.m(s.parentNode,s)))},i(_){d||(ce(r.$$.fragment,_),ce(i.$$.fragment,_),ce(m.$$.fragment,_),d=!0)},o(_){re(r.$$.fragment,_),re(i.$$.fragment,_),re(m.$$.fragment,_),d=!1},d(_){_&&(u(t),u(l),u(h),u(s)),ne(r),ne(i),ne(m),T.d(_)}}}function je(n,e){return e>0?n/e*200:0}function le(n,e){return Object.entries(n).sort(([,t],[,l])=>l-t).slice(0,e)}function Oe(n,e,t){let l,r,v,i;te(n,Me,g=>t(6,l=g)),te(n,$e,g=>t(7,r=g)),te(n,He,g=>t(8,v=g)),te(n,Ae,g=>t(3,i=g));let f=null,m=null,h=!0;async function s(){t(2,h=!0),t(1,m=null);try{t(0,f=await we({...v,device:r,tool:l}))}catch(g){t(1,m=g instanceof Error?g.message:"Failed to load data"),t(0,f=null)}finally{t(2,h=!1)}}function d(){return f!=null&&f.data.length?Math.max(...f.data.map(g=>g.cost)):0}function k(){return f!=null&&f.data.length?f.data.reduce((g,T)=>g+T.cost,0):0}return n.$$.update=()=>{n.$$.dirty&448&&s()},[f,m,h,i,d,k,l,r,v]}class Qe extends Te{constructor(e){super(),Se(this,e,Oe,Fe,ze,{})}}export{Qe as component};
1
+ import{s as ze,c as te}from"../chunks/scheduler.DukoKnjQ.js";import{S as Te,i as Se,d as f,k as ne,l as re,m as ce,a as P,n as ie,b as c,o as p,p as ye,g as j,c as b,e as E,q as de,r as pe,j as z,h as D,u as fe,s as M,f as C,t as N,v as ue,w as he}from"../chunks/index.CUfK07C5.js";import{f as we,e as K,t as Ae}from"../chunks/api.D-M_rVlI.js";import{D as Pe,a as Ce,T as Ne,f as U,s as Me,b as $e,d as He}from"../chunks/ToolSelector.DIzQsA4_.js";function be(n,e,t){const l=n.slice();return l[10]=e[t][0],l[11]=e[t][1],l}function Ee(n,e,t){const l=n.slice();return l[14]=e[t][0],l[11]=e[t][1],l}function De(n,e,t){const l=n.slice();l[17]=e[t],l[20]=t;const r=l[4]();return l[18]=r,l}function Re(n){let e,t,l=n[3]("cost.totalCost")+"",r,v,i,u=U(n[5]())+"",m,h,s,d,k=n[3]("cost.chartTitle")+"",g,T,_,A,V,R,B,L=n[3]("cost.byTool")+"",W,se,ae,q,F,Q=n[3]("cost.byModel")+"",X,oe,O=K(n[0].data),S=[];for(let o=0;o<O.length;o+=1)S[o]=Ie(De(n,O,o));let G=K(le(n[0].byTool,10)),y=[];for(let o=0;o<G.length;o+=1)y[o]=ke(Ee(n,G,o));let J=K(le(n[0].byModel,10)),w=[];for(let o=0;o<J.length;o+=1)w[o]=Ve(be(n,J,o));return{c(){e=D("div"),t=D("span"),r=N(l),v=z(),i=D("span"),m=N(u),h=z(),s=D("div"),d=D("div"),g=N(k),T=z(),_=D("div");for(let o=0;o<S.length;o+=1)S[o].c();A=z(),V=D("div"),R=D("div"),B=D("div"),W=N(L),se=z();for(let o=0;o<y.length;o+=1)y[o].c();ae=z(),q=D("div"),F=D("div"),X=N(Q),oe=z();for(let o=0;o<w.length;o+=1)w[o].c();this.h()},l(o){e=b(o,"DIV",{class:!0});var I=E(e);t=b(I,"SPAN",{class:!0});var a=E(t);r=C(a,l),a.forEach(f),v=j(I),i=b(I,"SPAN",{class:!0});var $=E(i);m=C($,u),$.forEach(f),I.forEach(f),h=j(o),s=b(o,"DIV",{class:!0});var Y=E(s);d=b(Y,"DIV",{class:!0});var _e=E(d);g=C(_e,k),_e.forEach(f),T=j(Y),_=b(Y,"DIV",{class:!0});var ve=E(_);for(let H=0;H<S.length;H+=1)S[H].l(ve);ve.forEach(f),Y.forEach(f),A=j(o),V=b(o,"DIV",{class:!0});var Z=E(V);R=b(Z,"DIV",{class:!0});var x=E(R);B=b(x,"DIV",{class:!0});var me=E(B);W=C(me,L),me.forEach(f),se=j(x);for(let H=0;H<y.length;H+=1)y[H].l(x);x.forEach(f),ae=j(Z),q=b(Z,"DIV",{class:!0});var ee=E(q);F=b(ee,"DIV",{class:!0});var ge=E(F);X=C(ge,Q),ge.forEach(f),oe=j(ee);for(let H=0;H<w.length;H+=1)w[H].l(ee);ee.forEach(f),Z.forEach(f),this.h()},h(){p(t,"class","hero-label svelte-gujtdz"),p(i,"class","hero-value svelte-gujtdz"),p(e,"class","hero-card accent svelte-gujtdz"),p(d,"class","section-title"),p(_,"class","chart svelte-gujtdz"),p(s,"class","card chart-section svelte-gujtdz"),p(B,"class","section-title"),p(R,"class","card"),p(F,"class","section-title"),p(q,"class","card"),p(V,"class","grid-2 svelte-gujtdz")},m(o,I){P(o,e,I),c(e,t),c(t,r),c(e,v),c(e,i),c(i,m),P(o,h,I),P(o,s,I),c(s,d),c(d,g),c(s,T),c(s,_);for(let a=0;a<S.length;a+=1)S[a]&&S[a].m(_,null);P(o,A,I),P(o,V,I),c(V,R),c(R,B),c(B,W),c(R,se);for(let a=0;a<y.length;a+=1)y[a]&&y[a].m(R,null);c(V,ae),c(V,q),c(q,F),c(F,X),c(q,oe);for(let a=0;a<w.length;a+=1)w[a]&&w[a].m(q,null)},p(o,I){if(I&8&&l!==(l=o[3]("cost.totalCost")+"")&&M(r,l),I&8&&k!==(k=o[3]("cost.chartTitle")+"")&&M(g,k),I&17){O=K(o[0].data);let a;for(a=0;a<O.length;a+=1){const $=De(o,O,a);S[a]?S[a].p($,I):(S[a]=Ie($),S[a].c(),S[a].m(_,null))}for(;a<S.length;a+=1)S[a].d(1);S.length=O.length}if(I&8&&L!==(L=o[3]("cost.byTool")+"")&&M(W,L),I&1){G=K(le(o[0].byTool,10));let a;for(a=0;a<G.length;a+=1){const $=Ee(o,G,a);y[a]?y[a].p($,I):(y[a]=ke($),y[a].c(),y[a].m(R,null))}for(;a<y.length;a+=1)y[a].d(1);y.length=G.length}if(I&8&&Q!==(Q=o[3]("cost.byModel")+"")&&M(X,Q),I&1){J=K(le(o[0].byModel,10));let a;for(a=0;a<J.length;a+=1){const $=be(o,J,a);w[a]?w[a].p($,I):(w[a]=Ve($),w[a].c(),w[a].m(q,null))}for(;a<w.length;a+=1)w[a].d(1);w.length=J.length}},d(o){o&&(f(e),f(h),f(s),f(A),f(V)),ue(S,o),ue(y,o),ue(w,o)}}}function qe(n){let e,t,l=n[3]("cost.noData")+"",r,v,i,u=n[3]("cost.noDataHint")+"",m;return{c(){e=D("div"),t=D("h2"),r=N(l),v=z(),i=D("p"),m=N(u),this.h()},l(h){e=b(h,"DIV",{class:!0});var s=E(e);t=b(s,"H2",{});var d=E(t);r=C(d,l),d.forEach(f),v=j(s),i=b(s,"P",{});var k=E(i);m=C(k,u),k.forEach(f),s.forEach(f),this.h()},h(){p(e,"class","state-msg")},m(h,s){P(h,e,s),c(e,t),c(t,r),c(e,v),c(e,i),c(i,m)},p(h,s){s&8&&l!==(l=h[3]("cost.noData")+"")&&M(r,l),s&8&&u!==(u=h[3]("cost.noDataHint")+"")&&M(m,u)},d(h){h&&f(e)}}}function Ue(n){let e,t;return{c(){e=D("div"),t=N(n[1]),this.h()},l(l){e=b(l,"DIV",{class:!0});var r=E(e);t=C(r,n[1]),r.forEach(f),this.h()},h(){p(e,"class","state-msg error")},m(l,r){P(l,e,r),c(e,t)},p(l,r){r&2&&M(t,l[1])},d(l){l&&f(e)}}}function Be(n){let e,t=n[3]("common.loading")+"",l;return{c(){e=D("div"),l=N(t),this.h()},l(r){e=b(r,"DIV",{class:!0});var v=E(e);l=C(v,t),v.forEach(f),this.h()},h(){p(e,"class","state-msg")},m(r,v){P(r,e,v),c(e,l)},p(r,v){v&8&&t!==(t=r[3]("common.loading")+"")&&M(l,t)},d(r){r&&f(e)}}}function Ie(n){let e,t,l,r,v,i=n[17].date.slice(5)+"",u,m;return{c(){e=D("div"),t=D("div"),r=z(),v=D("div"),u=N(i),m=z(),this.h()},l(h){e=b(h,"DIV",{class:!0,style:!0});var s=E(e);t=b(s,"DIV",{class:!0,style:!0,title:!0}),E(t).forEach(f),r=j(s),v=b(s,"DIV",{class:!0});var d=E(v);u=C(d,i),d.forEach(f),m=j(s),s.forEach(f),this.h()},h(){p(t,"class","bar svelte-gujtdz"),he(t,"height",je(n[17].cost,n[18])+"px"),p(t,"title",l=U(n[17].cost)),p(v,"class","label svelte-gujtdz"),p(e,"class","bar-group svelte-gujtdz"),he(e,"animation-delay",n[20]*30+"ms")},m(h,s){P(h,e,s),c(e,t),c(e,r),c(e,v),c(v,u),c(e,m)},p(h,s){s&1&&he(t,"height",je(h[17].cost,h[18])+"px"),s&1&&l!==(l=U(h[17].cost))&&p(t,"title",l),s&1&&i!==(i=h[17].date.slice(5)+"")&&M(u,i)},d(h){h&&f(e)}}}function ke(n){let e,t,l=n[14]+"",r,v,i,u=U(n[11])+"",m,h;return{c(){e=D("div"),t=D("span"),r=N(l),v=z(),i=D("span"),m=N(u),h=z(),this.h()},l(s){e=b(s,"DIV",{class:!0});var d=E(e);t=b(d,"SPAN",{class:!0});var k=E(t);r=C(k,l),k.forEach(f),v=j(d),i=b(d,"SPAN",{class:!0});var g=E(i);m=C(g,u),g.forEach(f),h=j(d),d.forEach(f),this.h()},h(){p(t,"class","mono"),p(i,"class","mono accent"),p(e,"class","breakdown-row svelte-gujtdz")},m(s,d){P(s,e,d),c(e,t),c(t,r),c(e,v),c(e,i),c(i,m),c(e,h)},p(s,d){d&1&&l!==(l=s[14]+"")&&M(r,l),d&1&&u!==(u=U(s[11])+"")&&M(m,u)},d(s){s&&f(e)}}}function Ve(n){let e,t,l=n[10]+"",r,v,i,u=U(n[11])+"",m,h;return{c(){e=D("div"),t=D("span"),r=N(l),v=z(),i=D("span"),m=N(u),h=z(),this.h()},l(s){e=b(s,"DIV",{class:!0});var d=E(e);t=b(d,"SPAN",{class:!0});var k=E(t);r=C(k,l),k.forEach(f),v=j(d),i=b(d,"SPAN",{class:!0});var g=E(i);m=C(g,u),g.forEach(f),h=j(d),d.forEach(f),this.h()},h(){p(t,"class","mono"),p(i,"class","mono accent"),p(e,"class","breakdown-row svelte-gujtdz")},m(s,d){P(s,e,d),c(e,t),c(t,r),c(e,v),c(e,i),c(i,m),c(e,h)},p(s,d){d&1&&l!==(l=s[10]+"")&&M(r,l),d&1&&u!==(u=U(s[11])+"")&&M(m,u)},d(s){s&&f(e)}}}function Fe(n){let e,t,l,r,v,i,u,m,h,s,d;document.title=e=n[3]("cost.title")+" — AIUsage",r=new Pe({}),i=new Ce({}),m=new Ne({});function k(_,A){var V;return _[2]?Be:_[1]?Ue:(V=_[0])!=null&&V.data.length?Re:qe}let g=k(n),T=g(n);return{c(){t=z(),l=D("div"),fe(r.$$.fragment),v=z(),fe(i.$$.fragment),u=z(),fe(m.$$.fragment),h=z(),T.c(),s=pe(),this.h()},l(_){ye("svelte-91h8ba",document.head).forEach(f),t=j(_),l=b(_,"DIV",{class:!0});var V=E(l);de(r.$$.fragment,V),v=j(V),de(i.$$.fragment,V),u=j(V),de(m.$$.fragment,V),V.forEach(f),h=j(_),T.l(_),s=pe(),this.h()},h(){p(l,"class","filter-bar svelte-gujtdz")},m(_,A){P(_,t,A),P(_,l,A),ie(r,l,null),c(l,v),ie(i,l,null),c(l,u),ie(m,l,null),P(_,h,A),T.m(_,A),P(_,s,A),d=!0},p(_,[A]){(!d||A&8)&&e!==(e=_[3]("cost.title")+" — AIUsage")&&(document.title=e),g===(g=k(_))&&T?T.p(_,A):(T.d(1),T=g(_),T&&(T.c(),T.m(s.parentNode,s)))},i(_){d||(ce(r.$$.fragment,_),ce(i.$$.fragment,_),ce(m.$$.fragment,_),d=!0)},o(_){re(r.$$.fragment,_),re(i.$$.fragment,_),re(m.$$.fragment,_),d=!1},d(_){_&&(f(t),f(l),f(h),f(s)),ne(r),ne(i),ne(m),T.d(_)}}}function je(n,e){return e>0?n/e*200:0}function le(n,e){return Object.entries(n).sort(([,t],[,l])=>l-t).slice(0,e)}function Oe(n,e,t){let l,r,v,i;te(n,Me,g=>t(6,l=g)),te(n,$e,g=>t(7,r=g)),te(n,He,g=>t(8,v=g)),te(n,Ae,g=>t(3,i=g));let u=null,m=null,h=!0;async function s(){t(2,h=!0),t(1,m=null);try{t(0,u=await we({...v,device:r,tool:l}))}catch(g){t(1,m=g instanceof Error?g.message:"Failed to load data"),t(0,u=null)}finally{t(2,h=!1)}}function d(){return u!=null&&u.data.length?Math.max(...u.data.map(g=>g.cost)):0}function k(){return u!=null&&u.data.length?u.data.reduce((g,T)=>g+T.cost,0):0}return n.$$.update=()=>{n.$$.dirty&448&&s()},[u,m,h,i,d,k,l,r,v]}class Qe extends Te{constructor(e){super(),Se(this,e,Oe,Fe,ze,{})}}export{Qe as component};
@@ -1 +1 @@
1
- import{s as fe,c as W}from"../chunks/scheduler.Dx1bs0RQ.js";import{S as me,i as _e,d,k as x,l as ee,m as te,a as O,n as le,b as s,o as N,p as ue,g as I,c as u,e as v,q as ae,r as re,j as H,h as p,u as se,s as A,f as y,t as V,v as ve,w as X}from"../chunks/index.CzqoKkoo.js";import{b as pe,e as ne,t as ge}from"../chunks/api.DyoIo4nG.js";import{D as be,a as Ee,T as De,c as de,f as ce,s as we,d as Te,e as ke}from"../chunks/ToolSelector.kb97TteP.js";function ie(r,e,t){const l=r.slice();return l[8]=e[t],l[10]=t,l}function Ie(r){let e,t,l,a,m,f=r[3]("models.model")+"",E,g,_,i=r[3]("models.provider")+"",h,S,$,D=r[3]("models.calls")+"",o,T,k,q=r[3]("models.tokens")+"",R,U,C,L=r[3]("models.share")+"",P,M,B,j=ne(r[0].models),w=[];for(let n=0;n<j.length;n+=1)w[n]=he(ie(r,j,n));return{c(){e=p("div"),t=p("table"),l=p("thead"),a=p("tr"),m=p("th"),E=V(f),g=H(),_=p("th"),h=V(i),S=H(),$=p("th"),o=V(D),T=H(),k=p("th"),R=V(q),U=H(),C=p("th"),P=V(L),M=H(),B=p("tbody");for(let n=0;n<w.length;n+=1)w[n].c();this.h()},l(n){e=u(n,"DIV",{class:!0});var c=v(e);t=u(c,"TABLE",{});var b=v(t);l=u(b,"THEAD",{});var Y=v(l);a=u(Y,"TR",{});var F=v(a);m=u(F,"TH",{});var J=v(m);E=y(J,f),J.forEach(d),g=I(F),_=u(F,"TH",{});var K=v(_);h=y(K,i),K.forEach(d),S=I(F),$=u(F,"TH",{});var z=v($);o=y(z,D),z.forEach(d),T=I(F),k=u(F,"TH",{});var Q=v(k);R=y(Q,q),Q.forEach(d),U=I(F),C=u(F,"TH",{});var G=v(C);P=y(G,L),G.forEach(d),F.forEach(d),Y.forEach(d),M=I(b),B=u(b,"TBODY",{});var oe=v(B);for(let Z=0;Z<w.length;Z+=1)w[Z].l(oe);oe.forEach(d),b.forEach(d),c.forEach(d),this.h()},h(){N(e,"class","card")},m(n,c){O(n,e,c),s(e,t),s(t,l),s(l,a),s(a,m),s(m,E),s(a,g),s(a,_),s(_,h),s(a,S),s(a,$),s($,o),s(a,T),s(a,k),s(k,R),s(a,U),s(a,C),s(C,P),s(t,M),s(t,B);for(let b=0;b<w.length;b+=1)w[b]&&w[b].m(B,null)},p(n,c){if(c&8&&f!==(f=n[3]("models.model")+"")&&A(E,f),c&8&&i!==(i=n[3]("models.provider")+"")&&A(h,i),c&8&&D!==(D=n[3]("models.calls")+"")&&A(o,D),c&8&&q!==(q=n[3]("models.tokens")+"")&&A(R,q),c&8&&L!==(L=n[3]("models.share")+"")&&A(P,L),c&1){j=ne(n[0].models);let b;for(b=0;b<j.length;b+=1){const Y=ie(n,j,b);w[b]?w[b].p(Y,c):(w[b]=he(Y),w[b].c(),w[b].m(B,null))}for(;b<w.length;b+=1)w[b].d(1);w.length=j.length}},d(n){n&&d(e),ve(w,n)}}}function He(r){let e,t,l=r[3]("models.noData")+"",a,m,f,E=r[3]("models.noDataHint")+"",g;return{c(){e=p("div"),t=p("h2"),a=V(l),m=H(),f=p("p"),g=V(E),this.h()},l(_){e=u(_,"DIV",{class:!0});var i=v(e);t=u(i,"H2",{});var h=v(t);a=y(h,l),h.forEach(d),m=I(i),f=u(i,"P",{});var S=v(f);g=y(S,E),S.forEach(d),i.forEach(d),this.h()},h(){N(e,"class","state-msg")},m(_,i){O(_,e,i),s(e,t),s(t,a),s(e,m),s(e,f),s(f,g)},p(_,i){i&8&&l!==(l=_[3]("models.noData")+"")&&A(a,l),i&8&&E!==(E=_[3]("models.noDataHint")+"")&&A(g,E)},d(_){_&&d(e)}}}function ye(r){let e,t;return{c(){e=p("div"),t=V(r[1]),this.h()},l(l){e=u(l,"DIV",{class:!0});var a=v(e);t=y(a,r[1]),a.forEach(d),this.h()},h(){N(e,"class","state-msg error")},m(l,a){O(l,e,a),s(e,t)},p(l,a){a&2&&A(t,l[1])},d(l){l&&d(e)}}}function Ve(r){let e,t=r[3]("common.loading")+"",l;return{c(){e=p("div"),l=V(t),this.h()},l(a){e=u(a,"DIV",{class:!0});var m=v(e);l=y(m,t),m.forEach(d),this.h()},h(){N(e,"class","state-msg")},m(a,m){O(a,e,m),s(e,l)},p(a,m){m&8&&t!==(t=a[3]("common.loading")+"")&&A(l,t)},d(a){a&&d(e)}}}function he(r){let e,t,l=r[8].model+"",a,m,f,E=r[8].provider+"",g,_,i,h=de(r[8].callCount)+"",S,$,D,o=ce(r[8].totalTokens)+"",T,k,q,R,U,C,L,P,M=r[8].percentage.toFixed(1)+"",B,j,w;return{c(){e=p("tr"),t=p("td"),a=V(l),m=H(),f=p("td"),g=V(E),_=H(),i=p("td"),S=V(h),$=H(),D=p("td"),T=V(o),k=H(),q=p("td"),R=p("div"),U=p("div"),C=p("div"),L=H(),P=p("span"),B=V(M),j=V("%"),w=H(),this.h()},l(n){e=u(n,"TR",{style:!0,class:!0});var c=v(e);t=u(c,"TD",{class:!0});var b=v(t);a=y(b,l),b.forEach(d),m=I(c),f=u(c,"TD",{style:!0});var Y=v(f);g=y(Y,E),Y.forEach(d),_=I(c),i=u(c,"TD",{class:!0});var F=v(i);S=y(F,h),F.forEach(d),$=I(c),D=u(c,"TD",{class:!0});var J=v(D);T=y(J,o),J.forEach(d),k=I(c),q=u(c,"TD",{});var K=v(q);R=u(K,"DIV",{class:!0});var z=v(R);U=u(z,"DIV",{class:!0});var Q=v(U);C=u(Q,"DIV",{class:!0,style:!0}),v(C).forEach(d),Q.forEach(d),L=I(z),P=u(z,"SPAN",{class:!0});var G=v(P);B=y(G,M),j=y(G,"%"),G.forEach(d),z.forEach(d),K.forEach(d),w=I(c),c.forEach(d),this.h()},h(){N(t,"class","mono model-name svelte-6wwigb"),X(f,"color","var(--text-muted)"),N(i,"class","mono"),N(D,"class","mono"),N(C,"class","bar-fill svelte-6wwigb"),X(C,"width",r[8].percentage+"%"),N(U,"class","bar-track svelte-6wwigb"),N(P,"class","mono pct svelte-6wwigb"),N(R,"class","bar-cell svelte-6wwigb"),X(e,"animation-delay",r[10]*40+"ms"),N(e,"class","animate-row svelte-6wwigb")},m(n,c){O(n,e,c),s(e,t),s(t,a),s(e,m),s(e,f),s(f,g),s(e,_),s(e,i),s(i,S),s(e,$),s(e,D),s(D,T),s(e,k),s(e,q),s(q,R),s(R,U),s(U,C),s(R,L),s(R,P),s(P,B),s(P,j),s(e,w)},p(n,c){c&1&&l!==(l=n[8].model+"")&&A(a,l),c&1&&E!==(E=n[8].provider+"")&&A(g,E),c&1&&h!==(h=de(n[8].callCount)+"")&&A(S,h),c&1&&o!==(o=ce(n[8].totalTokens)+"")&&A(T,o),c&1&&X(C,"width",n[8].percentage+"%"),c&1&&M!==(M=n[8].percentage.toFixed(1)+"")&&A(B,M)},d(n){n&&d(e)}}}function Se(r){let e,t,l,a,m,f,E,g,_,i,h;document.title=e=r[3]("models.title")+" — AIUsage",a=new be({}),f=new Ee({}),g=new De({});function S(o,T){var k;return o[2]?Ve:o[1]?ye:(k=o[0])!=null&&k.models.length?Ie:He}let $=S(r),D=$(r);return{c(){t=H(),l=p("div"),se(a.$$.fragment),m=H(),se(f.$$.fragment),E=H(),se(g.$$.fragment),_=H(),D.c(),i=re(),this.h()},l(o){ue("svelte-1sv33gh",document.head).forEach(d),t=I(o),l=u(o,"DIV",{class:!0});var k=v(l);ae(a.$$.fragment,k),m=I(k),ae(f.$$.fragment,k),E=I(k),ae(g.$$.fragment,k),k.forEach(d),_=I(o),D.l(o),i=re(),this.h()},h(){N(l,"class","filter-bar svelte-6wwigb")},m(o,T){O(o,t,T),O(o,l,T),le(a,l,null),s(l,m),le(f,l,null),s(l,E),le(g,l,null),O(o,_,T),D.m(o,T),O(o,i,T),h=!0},p(o,[T]){(!h||T&8)&&e!==(e=o[3]("models.title")+" — AIUsage")&&(document.title=e),$===($=S(o))&&D?D.p(o,T):(D.d(1),D=$(o),D&&(D.c(),D.m(i.parentNode,i)))},i(o){h||(te(a.$$.fragment,o),te(f.$$.fragment,o),te(g.$$.fragment,o),h=!0)},o(o){ee(a.$$.fragment,o),ee(f.$$.fragment,o),ee(g.$$.fragment,o),h=!1},d(o){o&&(d(t),d(l),d(_),d(i)),x(a),x(f),x(g),D.d(o)}}}function $e(r,e,t){let l,a,m,f;W(r,we,h=>t(4,l=h)),W(r,Te,h=>t(5,a=h)),W(r,ke,h=>t(6,m=h)),W(r,ge,h=>t(3,f=h));let E=null,g=null,_=!0;async function i(){t(2,_=!0),t(1,g=null);try{t(0,E=await pe({...m,device:a,tool:l}))}catch(h){t(1,g=h instanceof Error?h.message:"Failed to load data"),t(0,E=null)}finally{t(2,_=!1)}}return r.$$.update=()=>{r.$$.dirty&112&&i()},[E,g,_,f,l,a,m]}class Ne extends me{constructor(e){super(),_e(this,e,$e,Se,fe,{})}}export{Ne as component};
1
+ import{s as fe,c as W}from"../chunks/scheduler.DukoKnjQ.js";import{S as me,i as _e,d,k as x,l as ee,m as te,a as O,n as le,b as s,o as N,p as ue,g as I,c as u,e as v,q as ae,r as re,j as H,h as p,u as se,s as A,f as y,t as V,v as ve,w as X}from"../chunks/index.CUfK07C5.js";import{a as pe,e as ne,t as ge}from"../chunks/api.D-M_rVlI.js";import{D as be,a as Ee,T as De,c as de,e as ce,s as we,b as Te,d as ke}from"../chunks/ToolSelector.DIzQsA4_.js";function ie(r,e,t){const l=r.slice();return l[8]=e[t],l[10]=t,l}function Ie(r){let e,t,l,a,m,f=r[3]("models.model")+"",E,g,_,i=r[3]("models.provider")+"",h,S,$,D=r[3]("models.calls")+"",o,T,k,q=r[3]("models.tokens")+"",R,U,C,L=r[3]("models.share")+"",P,M,B,j=ne(r[0].models),w=[];for(let n=0;n<j.length;n+=1)w[n]=he(ie(r,j,n));return{c(){e=p("div"),t=p("table"),l=p("thead"),a=p("tr"),m=p("th"),E=V(f),g=H(),_=p("th"),h=V(i),S=H(),$=p("th"),o=V(D),T=H(),k=p("th"),R=V(q),U=H(),C=p("th"),P=V(L),M=H(),B=p("tbody");for(let n=0;n<w.length;n+=1)w[n].c();this.h()},l(n){e=u(n,"DIV",{class:!0});var c=v(e);t=u(c,"TABLE",{});var b=v(t);l=u(b,"THEAD",{});var Y=v(l);a=u(Y,"TR",{});var F=v(a);m=u(F,"TH",{});var J=v(m);E=y(J,f),J.forEach(d),g=I(F),_=u(F,"TH",{});var K=v(_);h=y(K,i),K.forEach(d),S=I(F),$=u(F,"TH",{});var z=v($);o=y(z,D),z.forEach(d),T=I(F),k=u(F,"TH",{});var Q=v(k);R=y(Q,q),Q.forEach(d),U=I(F),C=u(F,"TH",{});var G=v(C);P=y(G,L),G.forEach(d),F.forEach(d),Y.forEach(d),M=I(b),B=u(b,"TBODY",{});var oe=v(B);for(let Z=0;Z<w.length;Z+=1)w[Z].l(oe);oe.forEach(d),b.forEach(d),c.forEach(d),this.h()},h(){N(e,"class","card")},m(n,c){O(n,e,c),s(e,t),s(t,l),s(l,a),s(a,m),s(m,E),s(a,g),s(a,_),s(_,h),s(a,S),s(a,$),s($,o),s(a,T),s(a,k),s(k,R),s(a,U),s(a,C),s(C,P),s(t,M),s(t,B);for(let b=0;b<w.length;b+=1)w[b]&&w[b].m(B,null)},p(n,c){if(c&8&&f!==(f=n[3]("models.model")+"")&&A(E,f),c&8&&i!==(i=n[3]("models.provider")+"")&&A(h,i),c&8&&D!==(D=n[3]("models.calls")+"")&&A(o,D),c&8&&q!==(q=n[3]("models.tokens")+"")&&A(R,q),c&8&&L!==(L=n[3]("models.share")+"")&&A(P,L),c&1){j=ne(n[0].models);let b;for(b=0;b<j.length;b+=1){const Y=ie(n,j,b);w[b]?w[b].p(Y,c):(w[b]=he(Y),w[b].c(),w[b].m(B,null))}for(;b<w.length;b+=1)w[b].d(1);w.length=j.length}},d(n){n&&d(e),ve(w,n)}}}function He(r){let e,t,l=r[3]("models.noData")+"",a,m,f,E=r[3]("models.noDataHint")+"",g;return{c(){e=p("div"),t=p("h2"),a=V(l),m=H(),f=p("p"),g=V(E),this.h()},l(_){e=u(_,"DIV",{class:!0});var i=v(e);t=u(i,"H2",{});var h=v(t);a=y(h,l),h.forEach(d),m=I(i),f=u(i,"P",{});var S=v(f);g=y(S,E),S.forEach(d),i.forEach(d),this.h()},h(){N(e,"class","state-msg")},m(_,i){O(_,e,i),s(e,t),s(t,a),s(e,m),s(e,f),s(f,g)},p(_,i){i&8&&l!==(l=_[3]("models.noData")+"")&&A(a,l),i&8&&E!==(E=_[3]("models.noDataHint")+"")&&A(g,E)},d(_){_&&d(e)}}}function ye(r){let e,t;return{c(){e=p("div"),t=V(r[1]),this.h()},l(l){e=u(l,"DIV",{class:!0});var a=v(e);t=y(a,r[1]),a.forEach(d),this.h()},h(){N(e,"class","state-msg error")},m(l,a){O(l,e,a),s(e,t)},p(l,a){a&2&&A(t,l[1])},d(l){l&&d(e)}}}function Ve(r){let e,t=r[3]("common.loading")+"",l;return{c(){e=p("div"),l=V(t),this.h()},l(a){e=u(a,"DIV",{class:!0});var m=v(e);l=y(m,t),m.forEach(d),this.h()},h(){N(e,"class","state-msg")},m(a,m){O(a,e,m),s(e,l)},p(a,m){m&8&&t!==(t=a[3]("common.loading")+"")&&A(l,t)},d(a){a&&d(e)}}}function he(r){let e,t,l=r[8].model+"",a,m,f,E=r[8].provider+"",g,_,i,h=de(r[8].callCount)+"",S,$,D,o=ce(r[8].totalTokens)+"",T,k,q,R,U,C,L,P,M=r[8].percentage.toFixed(1)+"",B,j,w;return{c(){e=p("tr"),t=p("td"),a=V(l),m=H(),f=p("td"),g=V(E),_=H(),i=p("td"),S=V(h),$=H(),D=p("td"),T=V(o),k=H(),q=p("td"),R=p("div"),U=p("div"),C=p("div"),L=H(),P=p("span"),B=V(M),j=V("%"),w=H(),this.h()},l(n){e=u(n,"TR",{style:!0,class:!0});var c=v(e);t=u(c,"TD",{class:!0});var b=v(t);a=y(b,l),b.forEach(d),m=I(c),f=u(c,"TD",{style:!0});var Y=v(f);g=y(Y,E),Y.forEach(d),_=I(c),i=u(c,"TD",{class:!0});var F=v(i);S=y(F,h),F.forEach(d),$=I(c),D=u(c,"TD",{class:!0});var J=v(D);T=y(J,o),J.forEach(d),k=I(c),q=u(c,"TD",{});var K=v(q);R=u(K,"DIV",{class:!0});var z=v(R);U=u(z,"DIV",{class:!0});var Q=v(U);C=u(Q,"DIV",{class:!0,style:!0}),v(C).forEach(d),Q.forEach(d),L=I(z),P=u(z,"SPAN",{class:!0});var G=v(P);B=y(G,M),j=y(G,"%"),G.forEach(d),z.forEach(d),K.forEach(d),w=I(c),c.forEach(d),this.h()},h(){N(t,"class","mono model-name svelte-6wwigb"),X(f,"color","var(--text-muted)"),N(i,"class","mono"),N(D,"class","mono"),N(C,"class","bar-fill svelte-6wwigb"),X(C,"width",r[8].percentage+"%"),N(U,"class","bar-track svelte-6wwigb"),N(P,"class","mono pct svelte-6wwigb"),N(R,"class","bar-cell svelte-6wwigb"),X(e,"animation-delay",r[10]*40+"ms"),N(e,"class","animate-row svelte-6wwigb")},m(n,c){O(n,e,c),s(e,t),s(t,a),s(e,m),s(e,f),s(f,g),s(e,_),s(e,i),s(i,S),s(e,$),s(e,D),s(D,T),s(e,k),s(e,q),s(q,R),s(R,U),s(U,C),s(R,L),s(R,P),s(P,B),s(P,j),s(e,w)},p(n,c){c&1&&l!==(l=n[8].model+"")&&A(a,l),c&1&&E!==(E=n[8].provider+"")&&A(g,E),c&1&&h!==(h=de(n[8].callCount)+"")&&A(S,h),c&1&&o!==(o=ce(n[8].totalTokens)+"")&&A(T,o),c&1&&X(C,"width",n[8].percentage+"%"),c&1&&M!==(M=n[8].percentage.toFixed(1)+"")&&A(B,M)},d(n){n&&d(e)}}}function Se(r){let e,t,l,a,m,f,E,g,_,i,h;document.title=e=r[3]("models.title")+" — AIUsage",a=new be({}),f=new Ee({}),g=new De({});function S(o,T){var k;return o[2]?Ve:o[1]?ye:(k=o[0])!=null&&k.models.length?Ie:He}let $=S(r),D=$(r);return{c(){t=H(),l=p("div"),se(a.$$.fragment),m=H(),se(f.$$.fragment),E=H(),se(g.$$.fragment),_=H(),D.c(),i=re(),this.h()},l(o){ue("svelte-1sv33gh",document.head).forEach(d),t=I(o),l=u(o,"DIV",{class:!0});var k=v(l);ae(a.$$.fragment,k),m=I(k),ae(f.$$.fragment,k),E=I(k),ae(g.$$.fragment,k),k.forEach(d),_=I(o),D.l(o),i=re(),this.h()},h(){N(l,"class","filter-bar svelte-6wwigb")},m(o,T){O(o,t,T),O(o,l,T),le(a,l,null),s(l,m),le(f,l,null),s(l,E),le(g,l,null),O(o,_,T),D.m(o,T),O(o,i,T),h=!0},p(o,[T]){(!h||T&8)&&e!==(e=o[3]("models.title")+" — AIUsage")&&(document.title=e),$===($=S(o))&&D?D.p(o,T):(D.d(1),D=$(o),D&&(D.c(),D.m(i.parentNode,i)))},i(o){h||(te(a.$$.fragment,o),te(f.$$.fragment,o),te(g.$$.fragment,o),h=!0)},o(o){ee(a.$$.fragment,o),ee(f.$$.fragment,o),ee(g.$$.fragment,o),h=!1},d(o){o&&(d(t),d(l),d(_),d(i)),x(a),x(f),x(g),D.d(o)}}}function $e(r,e,t){let l,a,m,f;W(r,we,h=>t(4,l=h)),W(r,Te,h=>t(5,a=h)),W(r,ke,h=>t(6,m=h)),W(r,ge,h=>t(3,f=h));let E=null,g=null,_=!0;async function i(){t(2,_=!0),t(1,g=null);try{t(0,E=await pe({...m,device:a,tool:l}))}catch(h){t(1,g=h instanceof Error?h.message:"Failed to load data"),t(0,E=null)}finally{t(2,_=!1)}}return r.$$.update=()=>{r.$$.dirty&112&&i()},[E,g,_,f,l,a,m]}class Ne extends me{constructor(e){super(),_e(this,e,$e,Se,fe,{})}}export{Ne as component};