@juliantanx/aiusage 1.3.1 → 1.3.2
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.
- package/README.md +6 -9
- package/dist/index.js +37 -1
- package/dist/web/_app/immutable/chunks/ToolSelector.4cKBP-DC.js +2 -0
- package/dist/web/_app/immutable/chunks/{i18n.BCaZpNqk.js → api.BuM0qEja.js} +1 -1
- package/dist/web/_app/immutable/chunks/{entry.CS-NDdiQ.js → entry.rSFvFffH.js} +2 -2
- package/dist/web/_app/immutable/chunks/{stores.BjyZzXAW.js → stores.Ce9c-jZZ.js} +1 -1
- package/dist/web/_app/immutable/entry/{app.27f4j9Xy.js → app.UR40BQ-u.js} +2 -2
- package/dist/web/_app/immutable/entry/start.C0n6bEuf.js +1 -0
- package/dist/web/_app/immutable/nodes/0.btDtSa8k.js +1 -0
- package/dist/web/_app/immutable/nodes/{1.DZIXtjp3.js → 1.BAehr4TO.js} +1 -1
- package/dist/web/_app/immutable/nodes/10.CXxg0LZ5.js +1 -0
- package/dist/web/_app/immutable/nodes/11.D3gLypzx.js +1 -0
- package/dist/web/_app/immutable/nodes/12.BJYMQ3v1.js +1 -0
- package/dist/web/_app/immutable/nodes/13.uRTNTtbn.js +1 -0
- package/dist/web/_app/immutable/nodes/{2.DcYQmIYj.js → 2.CdevLrEl.js} +3 -3
- package/dist/web/_app/immutable/nodes/3.SOGeLIrs.js +1 -0
- package/dist/web/_app/immutable/nodes/4.B5ZJKhP_.js +1 -0
- package/dist/web/_app/immutable/nodes/5.D3sV9sQw.js +1 -0
- package/dist/web/_app/immutable/nodes/{7.CE7kQC3R.js → 6.DWlBNHmu.js} +2 -2
- package/dist/web/_app/immutable/nodes/7.BbLG55tv.js +1 -0
- package/dist/web/_app/immutable/nodes/8.BWHIAsQs.js +1 -0
- package/dist/web/_app/immutable/nodes/9.BXVXXU3Z.js +1 -0
- package/dist/web/_app/version.json +1 -1
- package/dist/web/index.html +6 -6
- package/package.json +2 -2
- package/dist/web/_app/immutable/assets/4.CnA4GaE5.css +0 -1
- package/dist/web/_app/immutable/assets/_page.CnA4GaE5.css +0 -1
- package/dist/web/_app/immutable/chunks/ToolSelector.Dhbay8qR.js +0 -2
- package/dist/web/_app/immutable/chunks/api.Wak6H2JS.js +0 -1
- package/dist/web/_app/immutable/entry/start.bzCZowcz.js +0 -1
- package/dist/web/_app/immutable/nodes/0.CFOrMeCV.js +0 -1
- package/dist/web/_app/immutable/nodes/10.DxJi0s_F.js +0 -1
- package/dist/web/_app/immutable/nodes/11.q1SVEyD9.js +0 -1
- package/dist/web/_app/immutable/nodes/12.CamXVWac.js +0 -1
- package/dist/web/_app/immutable/nodes/13.Bbzem3lL.js +0 -1
- package/dist/web/_app/immutable/nodes/14.BbcTrrp0.js +0 -1
- package/dist/web/_app/immutable/nodes/3.DqJoSOZA.js +0 -1
- package/dist/web/_app/immutable/nodes/4.CoqRShfZ.js +0 -41
- package/dist/web/_app/immutable/nodes/5.BcRc8qNP.js +0 -1
- package/dist/web/_app/immutable/nodes/6.DU7MEeuP.js +0 -1
- package/dist/web/_app/immutable/nodes/8.DzIcKP7s.js +0 -1
- package/dist/web/_app/immutable/nodes/9.4mP0VDWh.js +0 -1
- /package/dist/web/_app/immutable/assets/{11.BfaLSE4e.css → 10.BfaLSE4e.css} +0 -0
- /package/dist/web/_app/immutable/assets/{12.D4XIqeEN.css → 11.D4XIqeEN.css} +0 -0
- /package/dist/web/_app/immutable/assets/{13.CR85TxeS.css → 12.CR85TxeS.css} +0 -0
- /package/dist/web/_app/immutable/assets/{14.CxRLR3o7.css → 13.CxRLR3o7.css} +0 -0
- /package/dist/web/_app/immutable/assets/{5.D4N7n6x9.css → 4.D4N7n6x9.css} +0 -0
- /package/dist/web/_app/immutable/assets/{6.8Efnpu8u.css → 5.8Efnpu8u.css} +0 -0
- /package/dist/web/_app/immutable/assets/{7.CQvfgmQf.css → 6.CQvfgmQf.css} +0 -0
- /package/dist/web/_app/immutable/assets/{8.BeGOLIpG.css → 7.BeGOLIpG.css} +0 -0
- /package/dist/web/_app/immutable/assets/{9.DMukHCtv.css → 8.DMukHCtv.css} +0 -0
- /package/dist/web/_app/immutable/assets/{10.DpWloLoX.css → 9.DpWloLoX.css} +0 -0
package/README.md
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
[](https://github.com/juliantanx/aiusage/actions/workflows/test.yml)
|
|
7
7
|
[](https://opensource.org/licenses/MIT)
|
|
8
8
|
[](https://nodejs.org/)
|
|
9
|
+
[](https://aiusage.jtanx.com)
|
|
9
10
|
|
|
10
11
|
**aiusage** gives you one local-first place to understand how your AI coding tools are being used: tokens, cost, model mix, tool activity, projects, sessions, and multi-machine sync when you need it. Supports Claude Code, Codex, OpenClaw, OpenCode, Hermes, and Qoder.
|
|
11
12
|
|
|
@@ -33,17 +34,13 @@ If aiusage is useful, consider starring the repo to help more developers discove
|
|
|
33
34
|
|
|
34
35
|
```bash
|
|
35
36
|
# Install PM2 (one-time)
|
|
36
|
-
npm install -g pm2
|
|
37
|
+
npm install -g pm2
|
|
37
38
|
|
|
38
|
-
# Start aiusage
|
|
39
|
-
pm2
|
|
39
|
+
# Start aiusage as background services (generates config + starts PM2)
|
|
40
|
+
aiusage pm2-start
|
|
40
41
|
|
|
41
|
-
#
|
|
42
|
-
pm2
|
|
43
|
-
|
|
44
|
-
# Set auto-start on boot (Windows / macOS / Linux)
|
|
45
|
-
pm2 save
|
|
46
|
-
pm2-startup install
|
|
42
|
+
# Set auto-start on boot (Linux / macOS: run directly; Windows: run the output command as Administrator)
|
|
43
|
+
pm2 startup
|
|
47
44
|
|
|
48
45
|
# Common commands
|
|
49
46
|
pm2 list # View running status
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// src/cli.ts
|
|
4
4
|
import { Command } from "commander";
|
|
5
5
|
import { writeFileSync as writeFileSync5 } from "fs";
|
|
6
|
+
import { execSync as execSync3 } from "child_process";
|
|
6
7
|
|
|
7
8
|
// src/commands/serve.ts
|
|
8
9
|
import http2 from "http";
|
|
@@ -4998,7 +4999,7 @@ function createDatabase(path2) {
|
|
|
4998
4999
|
import { join as join11 } from "path";
|
|
4999
5000
|
var DB_PATH = join11(AIUSAGE_DIR, "cache.db");
|
|
5000
5001
|
var program = new Command();
|
|
5001
|
-
program.name("aiusage").version(true ? "1.3.
|
|
5002
|
+
program.name("aiusage").version(true ? "1.3.2" : "dev").description("CLI tool for AI usage statistics");
|
|
5002
5003
|
program.action(() => {
|
|
5003
5004
|
const db = createDatabase(DB_PATH);
|
|
5004
5005
|
const state = getState(AIUSAGE_DIR);
|
|
@@ -5164,6 +5165,41 @@ program.command("sync").description("Sync data with cloud storage").action(async
|
|
|
5164
5165
|
program.command("widget").description("Start the system tray widget").action(async () => {
|
|
5165
5166
|
await launchWidget();
|
|
5166
5167
|
});
|
|
5168
|
+
var PM2_CONFIG = `module.exports = {
|
|
5169
|
+
apps: [
|
|
5170
|
+
{
|
|
5171
|
+
name: 'aiusage-server',
|
|
5172
|
+
script: 'aiusage',
|
|
5173
|
+
args: 'serve',
|
|
5174
|
+
autorestart: true,
|
|
5175
|
+
},
|
|
5176
|
+
{
|
|
5177
|
+
name: 'aiusage-widget',
|
|
5178
|
+
script: 'aiusage-widget',
|
|
5179
|
+
args: '--foreground',
|
|
5180
|
+
autorestart: true,
|
|
5181
|
+
}
|
|
5182
|
+
]
|
|
5183
|
+
}
|
|
5184
|
+
`;
|
|
5185
|
+
program.command("pm2-setup").description("Generate ecosystem.config.cjs for PM2 background services").action(() => {
|
|
5186
|
+
const configPath = join11(AIUSAGE_DIR, "ecosystem.config.cjs");
|
|
5187
|
+
writeFileSync5(configPath, PM2_CONFIG, "utf-8");
|
|
5188
|
+
console.log(`Config created: ${configPath}`);
|
|
5189
|
+
});
|
|
5190
|
+
program.command("pm2-start").description("Setup and start PM2 background services (requires pm2 installed globally)").action(() => {
|
|
5191
|
+
const configPath = join11(AIUSAGE_DIR, "ecosystem.config.cjs");
|
|
5192
|
+
writeFileSync5(configPath, PM2_CONFIG, "utf-8");
|
|
5193
|
+
console.log(`Config: ${configPath}`);
|
|
5194
|
+
try {
|
|
5195
|
+
execSync3(`pm2 start "${configPath}"`, { stdio: "inherit" });
|
|
5196
|
+
execSync3("pm2 save", { stdio: "inherit" });
|
|
5197
|
+
console.log("\nTo enable auto-start on boot, run: pm2 startup");
|
|
5198
|
+
} catch {
|
|
5199
|
+
console.error("Failed to start PM2. Make sure pm2 is installed: npm install -g pm2");
|
|
5200
|
+
process.exit(1);
|
|
5201
|
+
}
|
|
5202
|
+
});
|
|
5167
5203
|
|
|
5168
5204
|
// src/index.ts
|
|
5169
5205
|
program.parse(process.argv);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{s as ae,n as Q,r as Pe,b as Be,c as K,o as Ue,g as Re}from"./scheduler.DFD7qxcZ.js";import{S as re,i as ue,d as b,s as V,x as S,D as $,a as G,b as _,y as U,o as k,A as z,c as T,e as D,f as R,g as L,B as ce,h as E,t as y,j,v as _e,r as ke,C as ye}from"./index.BmCbw0jM.js";import{e as x,A as ze,t as fe}from"./api.BuM0qEja.js";import{d as be,i as Te,j as Ee,k as Ae,a as Le,l as je,s as Ve}from"./stores.B1g8D8DV.js";function Ce(l,e,t){const s=l.slice();return s[29]=e[t],s}function De(l){let e,t=l[16](l[29])+"",s,n;return{c(){e=E("option"),s=y(t),this.h()},l(r){e=T(r,"OPTION",{});var a=D(e);s=R(a,t),a.forEach(b),this.h()},h(){e.__value=n=l[29],z(e,e.__value)},m(r,a){G(r,e,a),_(e,s)},p(r,a){a[0]&1024&&t!==(t=r[16](r[29])+"")&&V(s,t),a[0]&1024&&n!==(n=r[29])&&(e.__value=n,z(e,e.__value))},d(r){r&&b(e)}}}function Ie(l){let e,t=x(l[10]),s=[];for(let n=0;n<t.length;n+=1)s[n]=De(Ce(l,t,n));return{c(){for(let n=0;n<s.length;n+=1)s[n].c();e=ke()},l(n){for(let r=0;r<s.length;r+=1)s[r].l(n);e=ke()},m(n,r){for(let a=0;a<s.length;a+=1)s[a]&&s[a].m(n,r);G(n,e,r)},p(n,r){if(r[0]&66560){t=x(n[10]);let a;for(a=0;a<t.length;a+=1){const u=Ce(n,t,a);s[a]?s[a].p(u,r):(s[a]=De(u),s[a].c(),s[a].m(e.parentNode,e))}for(;a<s.length;a+=1)s[a].d(1);s.length=t.length}},d(n){n&&b(e),_e(s,n)}}}function Ne(l){let e,t,s,n,r="→",a,u,C,f,c=l[12]("common.apply")+"",o,p,i,m;return{c(){e=E("div"),t=E("input"),s=j(),n=E("span"),n.textContent=r,a=j(),u=E("input"),C=j(),f=E("button"),o=y(c),this.h()},l(d){e=T(d,"DIV",{class:!0});var h=D(e);t=T(h,"INPUT",{type:!0,class:!0}),s=L(h),n=T(h,"SPAN",{class:!0,"data-svelte-h":!0}),ce(n)!=="svelte-1ckiewm"&&(n.textContent=r),a=L(h),u=T(h,"INPUT",{type:!0,class:!0}),C=L(h),f=T(h,"BUTTON",{class:!0});var W=D(f);o=R(W,c),W.forEach(b),h.forEach(b),this.h()},h(){k(t,"type","date"),k(t,"class","svelte-1qkst2i"),k(n,"class","arrow svelte-1qkst2i"),k(u,"type","date"),k(u,"class","svelte-1qkst2i"),k(f,"class","apply svelte-1qkst2i"),f.disabled=p=!l[2]||!l[3],k(e,"class","custom svelte-1qkst2i")},m(d,h){G(d,e,h),_(e,t),z(t,l[2]),_(e,s),_(e,n),_(e,a),_(e,u),z(u,l[3]),_(e,C),_(e,f),_(f,o),i||(m=[U(t,"input",l[25]),U(u,"input",l[26]),U(f,"click",l[15])],i=!0)},p(d,h){h[0]&4&&z(t,d[2]),h[0]&8&&z(u,d[3]),h[0]&4096&&c!==(c=d[12]("common.apply")+"")&&V(o,c),h[0]&12&&p!==(p=!d[2]||!d[3])&&(f.disabled=p)},d(d){d&&b(e),i=!1,Pe(m)}}}function Fe(l){let e,t,s=l[12]("range.today")+"",n,r,a,u=l[12]("range.week")+"",C,f,c,o=l[12]("range.month")+"",p,i,m,d=l[12]("range.last30")+"",h,W,M,B=l[12]("range.allTime")+"",X,ee,Y,se="|",te,N,F,H=l[12]("range.pickMonth")+"",Z,oe=l[11],le,P,O="⊞",q,A,J,w=Ie(l),I=l[0]&&Ne(l);return{c(){e=E("div"),t=E("button"),n=y(s),r=j(),a=E("button"),C=y(u),f=j(),c=E("button"),p=y(o),i=j(),m=E("button"),h=y(d),W=j(),M=E("button"),X=y(B),ee=j(),Y=E("div"),Y.textContent=se,te=j(),N=E("select"),F=E("option"),Z=y(H),w.c(),le=j(),P=E("button"),P.textContent=O,q=j(),I&&I.c(),this.h()},l(g){e=T(g,"DIV",{class:!0});var v=D(e);t=T(v,"BUTTON",{class:!0});var he=D(t);n=R(he,s),he.forEach(b),r=L(v),a=T(v,"BUTTON",{class:!0});var ve=D(a);C=R(ve,u),ve.forEach(b),f=L(v),c=T(v,"BUTTON",{class:!0});var pe=D(c);p=R(pe,o),pe.forEach(b),i=L(v),m=T(v,"BUTTON",{class:!0});var de=D(m);h=R(de,d),de.forEach(b),W=L(v),M=T(v,"BUTTON",{class:!0});var me=D(M);X=R(me,B),me.forEach(b),ee=L(v),Y=T(v,"DIV",{class:!0,"data-svelte-h":!0}),ce(Y)!=="svelte-13oazuz"&&(Y.textContent=se),te=L(v),N=T(v,"SELECT",{class:!0});var ie=D(N);F=T(ie,"OPTION",{});var ge=D(F);Z=R(ge,H),ge.forEach(b),w.l(ie),ie.forEach(b),le=L(v),P=T(v,"BUTTON",{class:!0,title:!0,"data-svelte-h":!0}),ce(P)!=="svelte-150d3bs"&&(P.textContent=O),q=L(v),I&&I.l(v),v.forEach(b),this.h()},h(){k(t,"class","svelte-1qkst2i"),S(t,"active",l[9]),k(a,"class","svelte-1qkst2i"),S(a,"active",l[8]),k(c,"class","svelte-1qkst2i"),S(c,"active",l[7]),k(m,"class","svelte-1qkst2i"),S(m,"active",l[6]),k(M,"class","svelte-1qkst2i"),S(M,"active",l[5]),k(Y,"class","sep svelte-1qkst2i"),F.__value="",z(F,F.__value),k(N,"class","month-select svelte-1qkst2i"),l[1]===void 0&&Be(()=>l[23].call(N)),S(N,"active",!!l[1]),k(P,"class","custom-toggle svelte-1qkst2i"),k(P,"title","Custom range"),S(P,"active",l[4]),k(e,"class","date-range svelte-1qkst2i")},m(g,v){G(g,e,v),_(e,t),_(t,n),_(e,r),_(e,a),_(a,C),_(e,f),_(e,c),_(c,p),_(e,i),_(e,m),_(m,h),_(e,W),_(e,M),_(M,X),_(e,ee),_(e,Y),_(e,te),_(e,N),_(N,F),_(F,Z),w.m(N,null),$(N,l[1],!0),_(e,le),_(e,P),_(e,q),I&&I.m(e,null),A||(J=[U(t,"click",l[18]),U(a,"click",l[19]),U(c,"click",l[20]),U(m,"click",l[21]),U(M,"click",l[22]),U(N,"change",l[23]),U(N,"change",l[14]),U(P,"click",l[24])],A=!0)},p(g,v){v[0]&4096&&s!==(s=g[12]("range.today")+"")&&V(n,s),v[0]&512&&S(t,"active",g[9]),v[0]&4096&&u!==(u=g[12]("range.week")+"")&&V(C,u),v[0]&256&&S(a,"active",g[8]),v[0]&4096&&o!==(o=g[12]("range.month")+"")&&V(p,o),v[0]&128&&S(c,"active",g[7]),v[0]&4096&&d!==(d=g[12]("range.last30")+"")&&V(h,d),v[0]&64&&S(m,"active",g[6]),v[0]&4096&&B!==(B=g[12]("range.allTime")+"")&&V(X,B),v[0]&32&&S(M,"active",g[5]),v[0]&4096&&H!==(H=g[12]("range.pickMonth")+"")&&V(Z,H),v[0]&2048&&ae(oe,oe=g[11])?(w.d(1),w=Ie(g),w.c(),w.m(N,null)):w.p(g,v),v[0]&1026&&$(N,g[1]),v[0]&2&&S(N,"active",!!g[1]),v[0]&16&&S(P,"active",g[4]),g[0]?I?I.p(g,v):(I=Ne(g),I.c(),I.m(e,null)):I&&(I.d(1),I=null)},i:Q,o:Q,d(g){g&&b(e),w.d(g),I&&I.d(),A=!1,Pe(J)}}}function Je(l,e,t){let s,n,r,a,u,C,f,c,o,p;K(l,ze,O=>t(11,c=O)),K(l,be,O=>t(17,o=O)),K(l,fe,O=>t(12,p=O));let i=!1,m="",d="",h="";Ue(()=>{t(1,h=Re(be).month||"")});function W(){const O=[],q=new Date;for(let A=0;A<12;A++){const J=new Date(q.getFullYear(),q.getMonth()-A,1),w=`${J.getFullYear()}-${String(J.getMonth()+1).padStart(2,"0")}`;O.push(w)}return O}const M=W();function B(O){Te(O),t(0,i=!1),t(1,h="")}function X(O){const q=O.target.value;if(t(1,h=q),!q){Te(o.range||"day");return}const[A,J]=q.split("-").map(Number),w=`${q}-01`,I=new Date(A,J,0).getDate(),g=`${q}-${String(I).padStart(2,"0")}`;Ee(w,g,q),t(0,i=!1)}function ee(){m&&d&&(Ee(m,d),t(1,h=""))}function Y(O){const[q,A]=O.split("-"),J={en:["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],zh:["","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]},w=J[c]||J.en;return`${q} ${w[parseInt(A)]}`}const se=()=>B("day"),te=()=>B("week"),N=()=>B("month"),F=()=>B("last30"),H=()=>B("all");function Z(){h=ye(this),t(1,h),t(10,s),t(1,h)}const oe=()=>{t(0,i=!i)};function le(){m=this.value,t(2,m)}function P(){d=this.value,t(3,d)}return l.$$.update=()=>{l.$$.dirty[0]&2&&t(10,s=h&&!M.includes(h)?[h,...M]:M),l.$$.dirty[0]&131074&&t(9,n=!h&&o.range==="day"&&!o.from),l.$$.dirty[0]&131074&&t(8,r=!h&&o.range==="week"&&!o.from),l.$$.dirty[0]&131074&&t(7,a=!h&&o.range==="month"&&!o.from),l.$$.dirty[0]&131074&&t(6,u=!h&&o.range==="last30"&&!o.from),l.$$.dirty[0]&131074&&t(5,C=!h&&o.range==="all"&&!o.from),l.$$.dirty[0]&131075&&t(4,f=i||o.from&&!h)},[i,h,m,d,f,C,u,a,r,n,s,c,p,B,X,ee,Y,o,se,te,N,F,H,Z,oe,le,P]}class $e extends re{constructor(e){super(),ue(this,e,Je,Fe,ae,{},null,[-1,-1])}}function Oe(l,e,t){const s=l.slice();return s[6]=e[t],s}function qe(l){let e,t=we(l[6])+"",s,n,r;return{c(){e=E("option"),s=y(t),this.h()},l(a){e=T(a,"OPTION",{title:!0});var u=D(e);s=R(u,t),u.forEach(b),this.h()},h(){e.__value=n=l[6].deviceInstanceId,z(e,e.__value),k(e,"title",r=ne(l[6]))},m(a,u){G(a,e,u),_(e,s)},p(a,u){u&1&&t!==(t=we(a[6])+"")&&V(s,t),u&1&&n!==(n=a[6].deviceInstanceId)&&(e.__value=n,z(e,e.__value)),u&1&&r!==(r=ne(a[6]))&&k(e,"title",r)},d(a){a&&b(e)}}}function Ye(l){let e,t,s,n=l[4]("device.allDevices")+"",r,a,u,C,f=x(l[0]),c=[];for(let o=0;o<f.length;o+=1)c[o]=qe(Oe(l,f,o));return{c(){e=E("div"),t=E("select"),s=E("option"),r=y(n);for(let o=0;o<c.length;o+=1)c[o].c();this.h()},l(o){e=T(o,"DIV",{class:!0});var p=D(e);t=T(p,"SELECT",{title:!0,class:!0});var i=D(t);s=T(i,"OPTION",{});var m=D(s);r=R(m,n),m.forEach(b);for(let d=0;d<c.length;d+=1)c[d].l(i);i.forEach(b),p.forEach(b),this.h()},h(){s.__value="",z(s,s.__value),t.disabled=l[2],k(t,"title",a=l[3]?ne(l[3]):l[4]("device.allDevices")),k(t,"class","svelte-2rccdn"),k(e,"class","device-selector svelte-2rccdn")},m(o,p){G(o,e,p),_(e,t),_(t,s),_(s,r);for(let i=0;i<c.length;i+=1)c[i]&&c[i].m(t,null);$(t,l[1]),u||(C=U(t,"change",l[5]),u=!0)},p(o,[p]){if(p&16&&n!==(n=o[4]("device.allDevices")+"")&&V(r,n),p&1){f=x(o[0]);let i;for(i=0;i<f.length;i+=1){const m=Oe(o,f,i);c[i]?c[i].p(m,p):(c[i]=qe(m),c[i].c(),c[i].m(t,null))}for(;i<c.length;i+=1)c[i].d(1);c.length=f.length}p&3&&$(t,o[1]),p&4&&(t.disabled=o[2]),p&24&&a!==(a=o[3]?ne(o[3]):o[4]("device.allDevices"))&&k(t,"title",a)},i:Q,o:Q,d(o){o&&b(e),_e(c,o),u=!1,C()}}}function we(l){const e=[];return l.platform?e.push(l.platform):e.push("Unknown"),e.push(l.displayName),e.push(`(${l.recordCount})`),e.join(" ")}function ne(l){const e=[`Name: ${l.displayName}`];return l.platform&&e.push(`Platform: ${l.platform}`),e.push(`Records: ${l.recordCount}`),e.push(`ID: ${l.deviceInstanceId}`),e.join(`
|
|
2
|
+
`)}function We(l,e,t){let s,n,r;K(l,Le,f=>t(1,n=f)),K(l,fe,f=>t(4,r=f));let a=[],u=!0;Ue(async()=>{try{const c=await(await fetch("/api/devices")).json();t(0,a=c.devices||[])}catch{t(0,a=[])}finally{t(2,u=!1)}});function C(f){Ae(f.target.value)}return l.$$.update=()=>{l.$$.dirty&3&&t(3,s=a.find(f=>f.deviceInstanceId===n))},[a,n,u,s,r,C]}class xe extends re{constructor(e){super(),ue(this,e,We,Ye,ae,{})}}function Se(l,e,t){const s=l.slice();return s[4]=e[t],s}function Me(l){let e,t=l[4]+"",s;return{c(){e=E("option"),s=y(t),this.h()},l(n){e=T(n,"OPTION",{});var r=D(e);s=R(r,t),r.forEach(b),this.h()},h(){e.__value=l[4],z(e,e.__value)},m(n,r){G(n,e,r),_(e,s)},p:Q,d(n){n&&b(e)}}}function Ge(l){let e,t,s,n=l[1]("tool.allTools")+"",r,a,u,C,f=x(l[2]),c=[];for(let o=0;o<f.length;o+=1)c[o]=Me(Se(l,f,o));return{c(){e=E("div"),t=E("select"),s=E("option"),r=y(n);for(let o=0;o<c.length;o+=1)c[o].c();this.h()},l(o){e=T(o,"DIV",{class:!0});var p=D(e);t=T(p,"SELECT",{title:!0,class:!0});var i=D(t);s=T(i,"OPTION",{});var m=D(s);r=R(m,n),m.forEach(b);for(let d=0;d<c.length;d+=1)c[d].l(i);i.forEach(b),p.forEach(b),this.h()},h(){s.__value="",z(s,s.__value),k(t,"title",a=l[1]("tool.allTools")),k(t,"class","svelte-bkznz9"),k(e,"class","tool-selector svelte-bkznz9")},m(o,p){G(o,e,p),_(e,t),_(t,s),_(s,r);for(let i=0;i<c.length;i+=1)c[i]&&c[i].m(t,null);$(t,l[0]),u||(C=U(t,"change",l[3]),u=!0)},p(o,[p]){if(p&2&&n!==(n=o[1]("tool.allTools")+"")&&V(r,n),p&4){f=x(o[2]);let i;for(i=0;i<f.length;i+=1){const m=Se(o,f,i);c[i]?c[i].p(m,p):(c[i]=Me(m),c[i].c(),c[i].m(t,null))}for(;i<c.length;i+=1)c[i].d(1);c.length=f.length}p&5&&$(t,o[0]),p&2&&a!==(a=o[1]("tool.allTools"))&&k(t,"title",a)},i:Q,o:Q,d(o){o&&b(e),_e(c,o),u=!1,C()}}}function He(l,e,t){let s,n;K(l,Ve,u=>t(0,s=u)),K(l,fe,u=>t(1,n=u));const r=["claude-code","codex","openclaw","opencode","hermes","qoder","cursor"];function a(u){je(u.target.value)}return[s,n,r,a]}class et extends re{constructor(e){super(),ue(this,e,He,Ge,ae,{})}}export{$e as D,et as T,xe as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as x}from"./index.BmCbw0jM.js";import{r as R}from"./scheduler.DFD7qxcZ.js";import{w as P,d as N}from"./index.CPsgU-fv.js";function B(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function q(t,s){t.d(1),s.delete(t.key)}function E(t,s,d,C,i,u,c,M,T,A,y,b){let n=t.length,r=u.length,l=n;const g={};for(;l--;)g[t[l].key]=l;const p=[],m=new Map,k=new Map,v=[];for(l=r;l--;){const e=b(i,u,l),o=d(e);let a=c.get(o);a?v.push(()=>a.p(e,s)):(a=A(o,e),a.c()),m.set(o,p[l]=a),o in g&&k.set(o,Math.abs(l-g[o]))}const D=new Set,S=new Set;function f(e){x(e,1),e.m(M,y),c.set(e.key,e),y=e.first,r--}for(;n&&r;){const e=p[r-1],o=t[n-1],a=e.key,h=o.key;e===o?(y=e.first,n--,r--):m.has(h)?!c.has(a)||D.has(a)?f(e):S.has(h)?n--:k.get(a)>k.get(h)?(S.add(a),f(e)):(D.add(h),n--):(T(o,c),n--)}for(;n--;){const e=t[n];m.has(e.key)||T(e,c)}for(;r;)f(p[r-1]);return R(v),p}const w={en:{nav:{home:"Home",overview:"Overview",tokens:"Tokens",cost:"Cost",models:"Models",toolCalls:"Tool Calls",projects:"Projects",sessions:"Sessions",quotas:"Quotas",pricing:"Pricing",settings:"Settings",docs:"Docs",collapse:"Collapse",expand:"Expand",group:{analytics:"Analytics",data:"Data",manage:"Manage"}},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",desc:"Aggregated token, cost and session stats across all AI tools.",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",topMcpServers:"MCP Servers",noMcpCalls:"No MCP calls recorded",tabAll:"All",tabMcp:"MCP Servers"},tokens:{title:"Tokens",desc:"Daily token usage breakdown by type.",chartTitle:"Token Usage by Day",input:"Input",output:"Output",cacheRead:"Cache Read",cacheWrite:"Cache Write",thinking:"Thinking",date:"Date",total:"Total",modeBreakdown:"Breakdown",modeTotal:"Total",noData:"No token data",noDataHint:"No token usage recorded for this period."},projects:{title:"Projects",desc:"Token usage and cost ranked by project directory.",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",desc:"Daily spending trends and cost breakdown by tool and model.",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",desc:"Usage ranking across all AI 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",desc:"Most frequently invoked tools by AI assistants.",noData:"No tool call data",noDataHint:"No tool calls recorded for this period.",typeAll:"All",typeBuiltin:"Built-in",typeMcp:"MCP",typeSkill:"Skill",badgeMcp:"mcp",badgeSkill:"skill",noToolCallData:"Tool call data is not available in this tool's data source."},sessions:{title:"Sessions",desc:"Per-session log with token and cost details.",assistant:"AI Assistant",time:"Time",tool:"Tool",model:"Model",input:"Input",output:"Output",cost:"Cost",duration:"Duration",toolCalls:"Tools",noData:"No sessions",noDataHint:"No sessions recorded for this period.",detail:{back:"← Sessions",title:"Session Detail",meta:{duration:"Duration",tokens:"Tokens",cost:"Cost",apiCalls:"API Calls",toolCalls:"Tool Calls",model:"Model"},gap:"gap",noToolCalls:"No tool calls",record:"API Call",toolCall:"Tool"}},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)",retentionPlaceholder:"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",currency:"Currency",displayCurrency:"Display Currency",exchangeRate:"Exchange Rate",exchangeRateHint:"Leave empty to use auto-fetched rate",refreshRate:"Refresh",rateLastUpdated:"Last updated"},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",quotaWarning:"Quota Warning",quotaWarningDesc:"quota used",quotaWarningLink:"View Quotas"},quotas:{title:"Quotas",desc:"Official subscription quota usage for each AI tool.",refresh:"Refresh",refreshing:"Refreshing...",lastUpdated:"Updated",never:"Never",noCredentials:"No credentials found",noCredentialsHint:"Log in with the AI tool's CLI to enable quota tracking.",expired:"Credentials expired",expiredHint:"Re-login with the CLI to refresh your credentials.",queryFailed:"Query failed",noTiers:"No quota data available",fiveHour:"5h Window",sevenDay:"7d Window",sevenDayOpus:"7d Opus",sevenDaySonnet:"7d Sonnet",sevenDayOmelette:"7d Design",weeklyLimit:"Weekly",resetsIn:"resets in {time}",toolLabels:{"claude-code":"Claude Code",codex:"Codex (OpenAI)"}}},zh:{nav:{home:"首页",overview:"概览",tokens:"Token",cost:"费用",models:"模型",toolCalls:"工具调用",projects:"项目",sessions:"会话",quotas:"配额",pricing:"定价",settings:"设置",docs:"文档",collapse:"收起",expand:"展开",group:{analytics:"统计",data:"数据",manage:"管理"}},common:{loading:"加载中...",error:"错误",noData:"暂无数据",noDataHint:"开始使用 AI 工具后,统计数据将显示在此处。",apply:"应用",all:"全部",previous:"上一页",next:"下一页",page:"第",of:"页,共"},range:{today:"今天",week:"本周",month:"本月",last30:"近 30 天",allTime:"全部",from:"开始",to:"结束",pickMonth:"选择月份..."},overview:{title:"概览",desc:"所有 AI 工具的 Token、费用和会话聚合统计。",totalTokens:"总 Token",totalCost:"总费用",activeDays:"活跃天数",totalSessions:"会话数",inputTokens:"输入",outputTokens:"输出",cacheRead:"缓存读取",cacheWrite:"缓存写入",byTool:"按 AI 助手",byProject:"按项目",topToolCalls:"常用工具",tool:"工具",tokens:"Token",cost:"费用",noToolData:"暂无数据",noToolCalls:"暂无工具调用记录",topMcpServers:"MCP 服务器",noMcpCalls:"暂无 MCP 调用记录",tabAll:"全部",tabMcp:"MCP 服务器"},tokens:{title:"Token",desc:"按类型分类的每日 Token 用量趋势。",chartTitle:"每日 Token 用量",input:"输入",output:"输出",cacheRead:"缓存读取",cacheWrite:"缓存写入",thinking:"思考",date:"日期",total:"合计",modeBreakdown:"分类",modeTotal:"总量",noData:"暂无 Token 数据",noDataHint:"当前时间段内无 Token 使用记录。"},projects:{title:"项目",desc:"按项目目录排列的 Token 用量和费用排名。",project:"项目",sessions:"会话",tokens:"Token",cost:"费用",share:"占比",noData:"暂无项目数据",noDataHint:"当前时间段内无项目使用记录。"},cost:{title:"费用",desc:"每日费用趋势及按工具、模型的费用分布。",totalCost:"总费用",chartTitle:"每日费用",byTool:"按 AI 助手",byModel:"按模型",noData:"暂无费用数据",noDataHint:"当前时间段内无费用记录。"},models:{title:"模型",desc:"各 AI 模型的用量排名。",model:"模型",provider:"提供商",calls:"调用次数",tokens:"Token",share:"占比",noData:"暂无模型数据",noDataHint:"当前时间段内无模型使用记录。"},toolCalls:{title:"工具调用",desc:"AI 助手最常调用的工具排名。",noData:"暂无工具调用数据",noDataHint:"当前时间段内无工具调用记录。",typeAll:"全部",typeBuiltin:"内置",typeMcp:"MCP",typeSkill:"Skill",badgeMcp:"mcp",badgeSkill:"skill",noToolCallData:"该工具的数据源中不包含工具调用记录。"},sessions:{title:"会话",desc:"每条会话的 Token 用量和费用详细记录。",assistant:"AI 助手",time:"时间",tool:"工具",model:"模型",input:"输入",output:"输出",cost:"费用",duration:"时长",toolCalls:"工具调用",noData:"暂无会话",noDataHint:"当前时间段内无会话记录。",detail:{back:"← 会话列表",title:"会话详情",meta:{duration:"时长",tokens:"Token",cost:"费用",apiCalls:"API 调用",toolCalls:"工具调用",model:"模型"},gap:"间隔",noToolCalls:"无工具调用",record:"API 调用",toolCall:"工具"}},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 或留空表示永久保留本地数据",retentionPlaceholder:"永久",sourcePath:"自定义路径(留空使用默认值;下次解析时生效)",syncBackend:"后端类型",syncBackendNone:"已禁用",syncRepo:"仓库(owner/repo)",syncBucket:"存储桶",syncPrefix:"S3 对象前缀",syncEndpoint:"Endpoint",syncRegion:"Region",syncCredentialRef:"凭据引用名",syncCredentialValue:"凭据值",credentialSet:"已设置,留空则不修改",credentialNotSet:"未设置",showCredential:"显示",hideCredential:"隐藏",currency:"货币",displayCurrency:"显示货币",exchangeRate:"汇率",exchangeRateHint:"留空使用自动获取的汇率",refreshRate:"刷新",rateLastUpdated:"上次更新"},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:"缓存",quotaWarning:"配额警告",quotaWarningDesc:"配额已使用",quotaWarningLink:"查看配额"},quotas:{title:"配额",desc:"各 AI 工具的官方订阅配额使用情况。",refresh:"刷新",refreshing:"刷新中...",lastUpdated:"更新于",never:"从未",noCredentials:"未找到凭据",noCredentialsHint:"请先用 AI 工具的 CLI 登录,以启用配额追踪。",expired:"凭据已过期",expiredHint:"请重新使用 CLI 登录以刷新凭据。",queryFailed:"查询失败",noTiers:"暂无配额数据",fiveHour:"5 小时窗口",sevenDay:"7 天窗口",sevenDayOpus:"7 天 Opus",sevenDaySonnet:"7 天 Sonnet",sevenDayOmelette:"7 天 Design",weeklyLimit:"每周限额",resetsIn:"{time} 后重置",toolLabels:{"claude-code":"Claude Code",codex:"Codex(OpenAI)"}}}};function H(){return typeof window>"u"?"en":localStorage.getItem("aiusage-lang")||"en"}const I=P(H());function j(){I.update(t=>{const s=t==="en"?"zh":"en";return typeof window<"u"&&localStorage.setItem("aiusage-lang",s),s})}const F=N(I,t=>{const s=w[t]||w.en;return d=>{const C=d.split(".");let i=s;for(const u of C)i=i==null?void 0:i[u];return i||d}});export{j as a,q as d,B as e,I as l,F as t,E as u};
|
|
1
|
+
import{m as R}from"./index.BmCbw0jM.js";import{r as H}from"./scheduler.DFD7qxcZ.js";import{w as N,d as j}from"./index.CPsgU-fv.js";function B(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function U(e,t){e.d(1),t.delete(e.key)}function $(e,t,o,a,r,p,y,M,w,b,m,x){let c=e.length,h=p.length,u=c;const k={};for(;u--;)k[e[u].key]=u;const f=[],T=new Map,C=new Map,v=[];for(u=h;u--;){const n=x(r,p,u),i=o(n);let l=y.get(i);l?v.push(()=>l.p(n,t)):(l=b(i,n),l.c()),T.set(i,f[u]=l),i in k&&C.set(i,Math.abs(u-k[i]))}const D=new Set,P=new Set;function S(n){R(n,1),n.m(M,m),y.set(n.key,n),m=n.first,h--}for(;c&&h;){const n=f[h-1],i=e[c-1],l=n.key,g=i.key;n===i?(m=n.first,c--,h--):T.has(g)?!y.has(l)||D.has(l)?S(n):P.has(g)?c--:C.get(l)>C.get(g)?(P.add(l),S(n)):(D.add(g),c--):(w(i,y),c--)}for(;c--;){const n=e[c];T.has(n.key)||w(n,y)}for(;h;)S(f[h-1]);return H(v),f}const I={en:{nav:{home:"Home",overview:"Overview",tokens:"Tokens",cost:"Cost",models:"Models",toolCalls:"Tool Calls",projects:"Projects",sessions:"Sessions",quotas:"Quotas",pricing:"Pricing",settings:"Settings",docs:"Docs",collapse:"Collapse",expand:"Expand",group:{analytics:"Analytics",data:"Data",manage:"Manage"}},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",desc:"Aggregated token, cost and session stats across all AI tools.",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",topMcpServers:"MCP Servers",noMcpCalls:"No MCP calls recorded",tabAll:"All",tabMcp:"MCP Servers"},tokens:{title:"Tokens",desc:"Daily token usage breakdown by type.",chartTitle:"Token Usage by Day",input:"Input",output:"Output",cacheRead:"Cache Read",cacheWrite:"Cache Write",thinking:"Thinking",date:"Date",total:"Total",modeBreakdown:"Breakdown",modeTotal:"Total",noData:"No token data",noDataHint:"No token usage recorded for this period."},projects:{title:"Projects",desc:"Token usage and cost ranked by project directory.",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",desc:"Daily spending trends and cost breakdown by tool and model.",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",desc:"Usage ranking across all AI 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",desc:"Most frequently invoked tools by AI assistants.",noData:"No tool call data",noDataHint:"No tool calls recorded for this period.",typeAll:"All",typeBuiltin:"Built-in",typeMcp:"MCP",typeSkill:"Skill",badgeMcp:"mcp",badgeSkill:"skill",noToolCallData:"Tool call data is not available in this tool's data source."},sessions:{title:"Sessions",desc:"Per-session log with token and cost details.",assistant:"AI Assistant",time:"Time",tool:"Tool",model:"Model",input:"Input",output:"Output",cost:"Cost",duration:"Duration",toolCalls:"Tools",noData:"No sessions",noDataHint:"No sessions recorded for this period.",detail:{back:"← Sessions",title:"Session Detail",meta:{duration:"Duration",tokens:"Tokens",cost:"Cost",apiCalls:"API Calls",toolCalls:"Tool Calls",model:"Model"},gap:"gap",noToolCalls:"No tool calls",record:"API Call",toolCall:"Tool"}},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)",retentionPlaceholder:"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",currency:"Currency",displayCurrency:"Display Currency",exchangeRate:"Exchange Rate",exchangeRateHint:"Leave empty to use auto-fetched rate",refreshRate:"Refresh",rateLastUpdated:"Last updated"},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",quotaWarning:"Quota Warning",quotaWarningDesc:"quota used",quotaWarningLink:"View Quotas"},quotas:{title:"Quotas",desc:"Official subscription quota usage for each AI tool.",refresh:"Refresh",refreshing:"Refreshing...",lastUpdated:"Updated",never:"Never",noCredentials:"No credentials found",noCredentialsHint:"Log in with the AI tool's CLI to enable quota tracking.",expired:"Credentials expired",expiredHint:"Re-login with the CLI to refresh your credentials.",queryFailed:"Query failed",noTiers:"No quota data available",fiveHour:"5h Window",sevenDay:"7d Window",sevenDayOpus:"7d Opus",sevenDaySonnet:"7d Sonnet",sevenDayOmelette:"7d Design",weeklyLimit:"Weekly",resetsIn:"resets in {time}",toolLabels:{"claude-code":"Claude Code",codex:"Codex (OpenAI)"}}},zh:{nav:{home:"首页",overview:"概览",tokens:"Token",cost:"费用",models:"模型",toolCalls:"工具调用",projects:"项目",sessions:"会话",quotas:"配额",pricing:"定价",settings:"设置",docs:"文档",collapse:"收起",expand:"展开",group:{analytics:"统计",data:"数据",manage:"管理"}},common:{loading:"加载中...",error:"错误",noData:"暂无数据",noDataHint:"开始使用 AI 工具后,统计数据将显示在此处。",apply:"应用",all:"全部",previous:"上一页",next:"下一页",page:"第",of:"页,共"},range:{today:"今天",week:"本周",month:"本月",last30:"近 30 天",allTime:"全部",from:"开始",to:"结束",pickMonth:"选择月份..."},overview:{title:"概览",desc:"所有 AI 工具的 Token、费用和会话聚合统计。",totalTokens:"总 Token",totalCost:"总费用",activeDays:"活跃天数",totalSessions:"会话数",inputTokens:"输入",outputTokens:"输出",cacheRead:"缓存读取",cacheWrite:"缓存写入",byTool:"按 AI 助手",byProject:"按项目",topToolCalls:"常用工具",tool:"工具",tokens:"Token",cost:"费用",noToolData:"暂无数据",noToolCalls:"暂无工具调用记录",topMcpServers:"MCP 服务器",noMcpCalls:"暂无 MCP 调用记录",tabAll:"全部",tabMcp:"MCP 服务器"},tokens:{title:"Token",desc:"按类型分类的每日 Token 用量趋势。",chartTitle:"每日 Token 用量",input:"输入",output:"输出",cacheRead:"缓存读取",cacheWrite:"缓存写入",thinking:"思考",date:"日期",total:"合计",modeBreakdown:"分类",modeTotal:"总量",noData:"暂无 Token 数据",noDataHint:"当前时间段内无 Token 使用记录。"},projects:{title:"项目",desc:"按项目目录排列的 Token 用量和费用排名。",project:"项目",sessions:"会话",tokens:"Token",cost:"费用",share:"占比",noData:"暂无项目数据",noDataHint:"当前时间段内无项目使用记录。"},cost:{title:"费用",desc:"每日费用趋势及按工具、模型的费用分布。",totalCost:"总费用",chartTitle:"每日费用",byTool:"按 AI 助手",byModel:"按模型",noData:"暂无费用数据",noDataHint:"当前时间段内无费用记录。"},models:{title:"模型",desc:"各 AI 模型的用量排名。",model:"模型",provider:"提供商",calls:"调用次数",tokens:"Token",share:"占比",noData:"暂无模型数据",noDataHint:"当前时间段内无模型使用记录。"},toolCalls:{title:"工具调用",desc:"AI 助手最常调用的工具排名。",noData:"暂无工具调用数据",noDataHint:"当前时间段内无工具调用记录。",typeAll:"全部",typeBuiltin:"内置",typeMcp:"MCP",typeSkill:"Skill",badgeMcp:"mcp",badgeSkill:"skill",noToolCallData:"该工具的数据源中不包含工具调用记录。"},sessions:{title:"会话",desc:"每条会话的 Token 用量和费用详细记录。",assistant:"AI 助手",time:"时间",tool:"工具",model:"模型",input:"输入",output:"输出",cost:"费用",duration:"时长",toolCalls:"工具调用",noData:"暂无会话",noDataHint:"当前时间段内无会话记录。",detail:{back:"← 会话列表",title:"会话详情",meta:{duration:"时长",tokens:"Token",cost:"费用",apiCalls:"API 调用",toolCalls:"工具调用",model:"模型"},gap:"间隔",noToolCalls:"无工具调用",record:"API 调用",toolCall:"工具"}},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 或留空表示永久保留本地数据",retentionPlaceholder:"永久",sourcePath:"自定义路径(留空使用默认值;下次解析时生效)",syncBackend:"后端类型",syncBackendNone:"已禁用",syncRepo:"仓库(owner/repo)",syncBucket:"存储桶",syncPrefix:"S3 对象前缀",syncEndpoint:"Endpoint",syncRegion:"Region",syncCredentialRef:"凭据引用名",syncCredentialValue:"凭据值",credentialSet:"已设置,留空则不修改",credentialNotSet:"未设置",showCredential:"显示",hideCredential:"隐藏",currency:"货币",displayCurrency:"显示货币",exchangeRate:"汇率",exchangeRateHint:"留空使用自动获取的汇率",refreshRate:"刷新",rateLastUpdated:"上次更新"},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:"缓存",quotaWarning:"配额警告",quotaWarningDesc:"配额已使用",quotaWarningLink:"查看配额"},quotas:{title:"配额",desc:"各 AI 工具的官方订阅配额使用情况。",refresh:"刷新",refreshing:"刷新中...",lastUpdated:"更新于",never:"从未",noCredentials:"未找到凭据",noCredentialsHint:"请先用 AI 工具的 CLI 登录,以启用配额追踪。",expired:"凭据已过期",expiredHint:"请重新使用 CLI 登录以刷新凭据。",queryFailed:"查询失败",noTiers:"暂无配额数据",fiveHour:"5 小时窗口",sevenDay:"7 天窗口",sevenDayOpus:"7 天 Opus",sevenDaySonnet:"7 天 Sonnet",sevenDayOmelette:"7 天 Design",weeklyLimit:"每周限额",resetsIn:"{time} 后重置",toolLabels:{"claude-code":"Claude Code",codex:"Codex(OpenAI)"}}}};function E(){return typeof window>"u"?"en":localStorage.getItem("aiusage-lang")||"en"}const A=N(E());function F(){A.update(e=>{const t=e==="en"?"zh":"en";return typeof window<"u"&&localStorage.setItem("aiusage-lang",t),t})}const Q=j(A,e=>{const t=I[e]||I.en;return o=>{const a=o.split(".");let r=t;for(const p of a)r=r==null?void 0:r[p];return r||o}});function d(e,t){const o=new URLSearchParams;for(const[r,p]of Object.entries(t))p&&o.set(r,p);const a=o.toString();return a?`${e}?${a}`:e}async function s(e){var o;const t=await fetch(e);if(!t.ok){const a=await t.json().catch(()=>({error:{message:"API error"}}));throw new Error(((o=a.error)==null?void 0:o.message)||`HTTP ${t.status}`)}return t.json()}async function z(e){return s(d("/api/summary",e))}async function V(e){return s(d("/api/tokens",e))}async function G(e){return s(d("/api/cost",e))}async function J(e){return s(d("/api/models",e))}async function K(e){return s(d("/api/tool-calls",{...e,toolType:e.toolType||void 0}))}async function X(e){var t,o;return s(d("/api/sessions",{...e,page:(t=e.page)==null?void 0:t.toString(),pageSize:(o=e.pageSize)==null?void 0:o.toString()}))}async function Y(e,t={}){return s(d(`/api/sessions/${encodeURIComponent(e)}`,t))}async function Z(e){return s(d("/api/projects",e))}async function _(){return s("/api/refresh")}async function ee(){return s("/api/pricing")}async function te(e,t){var a;const o=await fetch("/api/pricing",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:e,...t})});if(!o.ok){const r=await o.json().catch(()=>({error:{message:"API error"}}));throw new Error(((a=r.error)==null?void 0:a.message)||`HTTP ${o.status}`)}return o.json()}async function oe(e){var o;const t=await fetch(`/api/pricing?model=${encodeURIComponent(e)}`,{method:"DELETE"});if(!t.ok){const a=await t.json().catch(()=>({error:{message:"API error"}}));throw new Error(((o=a.error)==null?void 0:o.message)||`HTTP ${t.status}`)}return t.json()}async function ne(){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 ae(){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 se(){return s("/api/sync")}async function re(){return s("/api/config")}async function ie(){return s("/api/quotas")}async function le(){var t;const e=await fetch("/api/exchange-rate/refresh",{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 ce(e){return s(d("/api/config/credential",{ref:e}))}async function de(e){var o;const t=await fetch("/api/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const a=await t.json().catch(()=>({error:{message:"API error"}}));throw new Error(((o=a.error)==null?void 0:o.message)||`HTTP ${t.status}`)}return t.json()}const L="aiusage:settings-updated";function ue(e){typeof window>"u"||window.dispatchEvent(new CustomEvent(L,{detail:e}))}export{A,L as S,J as a,z as b,ee as c,oe as d,B as e,G as f,ne as g,Z as h,ie as i,$ as j,U as k,X as l,Y as m,re as n,ue as o,le as p,ce as q,_ as r,de as s,Q as t,te as u,V as v,K as w,se as x,ae as y,F as z};
|
|
@@ -1,3 +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.DFD7qxcZ.js";import{w as ye}from"./index.CPsgU-fv.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 Et="/__data.json",kt=".html__data.json";function St(e){return e.endsWith(".html")?e.replace(/\.html$/,kt):e.replace(/\/$/,"")+Et}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_186pfmc)==null?void 0:Me.base)??"";var qe;const xt=((qe=globalThis.__sveltekit_186pfmc)==null?void 0:qe.assets)??L,Ct="1779810525233",We="sveltekit:snapshot",Ye="sveltekit:scroll",Je="sveltekit:states",Dt="sveltekit:pageurl",C="sveltekit:history",H="sveltekit:navigation",z={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},J=location.origin;function ze(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={...z,"":z.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)===J&&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!==J||!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,Jt=-4,zt=-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===Jt)return 1/0;if(o===zt)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 Ee(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},ke=!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(){Ee(R),Ne(Ye,$),st(T),Ne(We,W)}async function Re(e,n,t,r){return V({type:"goto",url:ze(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 k=new URL(b,t);return c&&p(k.href),k.origin===t.origin&&(b=k.href.slice(t.origin.length)),te?Tt(b,k.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 E=y.branch[_],S=!!(w!=null&&w[0])&&((E==null?void 0:E.loader)!==w[1]||Fe(d,g,u,p,(N=E.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 k=f.map(async(w,_)=>{var le;if(!w)return;const E=y.branch[_],S=m==null?void 0:m[_];if((!S||S.type==="skip")&&w[1]===(E==null?void 0:E.loader)&&!Fe(b,g,u,p,(le=E.universal)==null?void 0:le.uses,r))return E;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 k[fe])==null?void 0:Oe.data);return Pe},server_data_node:Ue(S===void 0&&w[0]?{type:"skip"}:S??null,w[0]?E==null?void 0:E.server:void 0)})});for(const w of k)w.catch(()=>{});const v=[];for(let w=0;w<f.length;w+=1)if(f[w])try{v.push(await k[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 E=Z(_),S;if(m!=null&&m.includes(_))E=_.status??E,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:E,error:S,route:a}):await dt(t,{id:a.id},S,E)}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!==J||t.pathname!==location.pathname||ke)&&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(),Ee(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,[Je]: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 k=document.activeElement!==m&&document.activeElement!==document.body;!r&&!k&&_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===J&&e.pathname===location.pathname&&!ke?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===z.viewport&&t.observe(s),f.preload_code===z.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(ze(e)),e.origin!==J?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,Ee(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[Je]??{},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}){ke=!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 k=0;k<l;k+=1)Object.assign(b,(await u[k]).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?`
|
|
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.DFD7qxcZ.js";import{w as ye}from"./index.CPsgU-fv.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_1kyne6o)==null?void 0:Me.base)??"";var qe;const xt=((qe=globalThis.__sveltekit_1kyne6o)==null?void 0:qe.assets)??L,Ct="1779826354838",We="sveltekit:snapshot",Ye="sveltekit:scroll",Je="sveltekit:states",Dt="sveltekit:pageurl",C="sveltekit:history",H="sveltekit:navigation",z={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},J=location.origin;function ze(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={...z,"":z.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)===J&&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!==J||!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,Jt=-4,zt=-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===Jt)return 1/0;if(o===zt)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:ze(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!==J||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,[Je]: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===J&&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===z.viewport&&t.observe(s),f.preload_code===z.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(ze(e)),e.origin!==J?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[Je]??{},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
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:
|
|
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{s as e}from"./entry.
|
|
1
|
+
import{s as e}from"./entry.rSFvFffH.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,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.
|
|
2
|
-
import{s as C,j as N,o as B,t as U,k as T}from"../chunks/scheduler.DFD7qxcZ.js";import{S as F,i as G,d as h,l as E,m as g,E as I,F as D,a as k,g as W,r as w,j as z,G as R,k as L,u as O,n as A,q as y,o as V,w as p,c as H,e as J,h as K,s as Q,f as X,t as Y}from"../chunks/index.BmCbw0jM.js";const Z="modulepreload",M=function(s,e){return new URL(s,e).href},S={},
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.btDtSa8k.js","../chunks/scheduler.DFD7qxcZ.js","../chunks/index.BmCbw0jM.js","../chunks/api.BuM0qEja.js","../chunks/index.CPsgU-fv.js","../chunks/stores.Ce9c-jZZ.js","../chunks/entry.rSFvFffH.js","../chunks/stores.B1g8D8DV.js","../assets/0.C5PeBlns.css","../nodes/1.BAehr4TO.js","../nodes/2.CdevLrEl.js","../assets/2.BLunjqo3.css","../nodes/3.SOGeLIrs.js","../chunks/ToolSelector.4cKBP-DC.js","../assets/ToolSelector.Bqx3ytrl.css","../assets/3.DQh9JikT.css","../nodes/4.B5ZJKhP_.js","../assets/4.D4N7n6x9.css","../nodes/5.D3sV9sQw.js","../assets/5.8Efnpu8u.css","../nodes/6.DWlBNHmu.js","../assets/6.CQvfgmQf.css","../nodes/7.BbLG55tv.js","../assets/7.BeGOLIpG.css","../nodes/8.BWHIAsQs.js","../assets/8.DMukHCtv.css","../nodes/9.BXVXXU3Z.js","../assets/9.DpWloLoX.css","../nodes/10.CXxg0LZ5.js","../assets/10.BfaLSE4e.css","../nodes/11.D3gLypzx.js","../assets/11.D4XIqeEN.css","../nodes/12.BJYMQ3v1.js","../assets/12.CR85TxeS.css","../nodes/13.uRTNTtbn.js","../assets/13.CxRLR3o7.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{s as C,j as N,o as B,t as U,k as T}from"../chunks/scheduler.DFD7qxcZ.js";import{S as F,i as G,d as h,l as E,m as g,E as I,F as D,a as k,g as W,r as w,j as z,G as R,k as L,u as O,n as A,q as y,o as V,w as p,c as H,e as J,h as K,s as Q,f as X,t as Y}from"../chunks/index.BmCbw0jM.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 b=t.length-1;b>=0;b--){const P=t[b];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((b,P)=>{d.addEventListener("load",b),d.addEventListener("error",()=>P(new Error(`Unable to preload CSS for ${c}`)))})}))}function f(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"&&f(i.reason);return e().catch(f)})},ae={};function $(s){let e,n,r;var o=s[1][0];function f(t,i){return{props:{data:t[3],form:t[2]}}}return o&&(e=R(o,f(s)),s[12](e)),{c(){e&&O(e.$$.fragment),n=w()},l(t){e&&y(e.$$.fragment,t),n=w()},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){I();const l=e;E(l.$$.fragment,1,0,()=>{L(l,1)}),D()}o?(e=R(o,f(t)),t[12](e),O(e.$$.fragment),g(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&&g(e.$$.fragment,t),r=!0)},o(t){e&&E(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 f(t,i){return{props:{data:t[3],$$slots:{default:[ee]},$$scope:{ctx:t}}}}return o&&(e=R(o,f(s)),s[11](e)),{c(){e&&O(e.$$.fragment),n=w()},l(t){e&&y(e.$$.fragment,t),n=w()},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){I();const l=e;E(l.$$.fragment,1,0,()=>{L(l,1)}),D()}o?(e=R(o,f(t)),t[11](e),O(e.$$.fragment),g(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&&g(e.$$.fragment,t),r=!0)},o(t){e&&E(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 f(t,i){return{props:{data:t[4],form:t[2]}}}return o&&(e=R(o,f(s)),s[10](e)),{c(){e&&O(e.$$.fragment),n=w()},l(t){e&&y(e.$$.fragment,t),n=w()},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){I();const l=e;E(l.$$.fragment,1,0,()=>{L(l,1)}),D()}o?(e=R(o,f(t)),t[10](e),O(e.$$.fragment),g(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&&g(e.$$.fragment,t),r=!0)},o(t){e&&E(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(){V(e,"id","svelte-announcer"),V(e,"aria-live","assertive"),V(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,f;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=w()},l(a){n.l(a),r=W(a),c&&c.l(a),o=w()},m(a,u){i[e].m(a,u),k(a,r,u),c&&c.m(a,u),k(a,o,u),f=!0},p(a,[u]){let v=e;e=l(a),e===v?i[e].p(a,u):(I(),E(i[v],1,1,()=>{i[v]=null}),D(),n=i[e],n?n.p(a,u):(n=i[e]=t[e](a),n.c()),g(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){f||(g(n),f=!0)},o(a){E(n),f=!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:f}=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,v=null;B(()=>{const _=r.page.subscribe(()=>{a&&(n(6,u=!0),U().then(()=>{n(7,v=document.title||"untitled page")}))});return n(5,a=!0),_});function d(_){T[_?"unshift":"push"](()=>{t[1]=_,n(0,t)})}function b(_){T[_?"unshift":"push"](()=>{t[0]=_,n(0,t)})}function P(_){T[_?"unshift":"push"](()=>{t[0]=_,n(0,t)})}return s.$$set=_=>{"stores"in _&&n(8,r=_.stores),"page"in _&&n(9,o=_.page),"constructors"in _&&n(1,f=_.constructors),"components"in _&&n(0,t=_.components),"form"in _&&n(2,i=_.form),"data_0"in _&&n(3,l=_.data_0),"data_1"in _&&n(4,c=_.data_1)},s.$$.update=()=>{s.$$.dirty&768&&r.page.set(o)},[t,f,i,l,c,a,u,v,r,o,d,b,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.btDtSa8k.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url),()=>m(()=>import("../nodes/1.BAehr4TO.js"),__vite__mapDeps([9,1,2,5,6,4]),import.meta.url),()=>m(()=>import("../nodes/2.CdevLrEl.js"),__vite__mapDeps([10,1,2,3,4,7,11]),import.meta.url),()=>m(()=>import("../nodes/3.SOGeLIrs.js"),__vite__mapDeps([12,1,2,3,4,7,13,14,15]),import.meta.url),()=>m(()=>import("../nodes/4.B5ZJKhP_.js"),__vite__mapDeps([16,1,2,3,4,7,13,14,17]),import.meta.url),()=>m(()=>import("../nodes/5.D3sV9sQw.js"),__vite__mapDeps([18,1,2,3,4,7,13,14,19]),import.meta.url),()=>m(()=>import("../nodes/6.DWlBNHmu.js"),__vite__mapDeps([20,1,2,3,4,21]),import.meta.url),()=>m(()=>import("../nodes/7.BbLG55tv.js"),__vite__mapDeps([22,1,2,3,4,7,13,14,23]),import.meta.url),()=>m(()=>import("../nodes/8.BWHIAsQs.js"),__vite__mapDeps([24,1,2,3,4,25]),import.meta.url),()=>m(()=>import("../nodes/9.BXVXXU3Z.js"),__vite__mapDeps([26,1,2,3,4,7,13,14,27]),import.meta.url),()=>m(()=>import("../nodes/10.CXxg0LZ5.js"),__vite__mapDeps([28,1,2,3,4,5,6,7,29]),import.meta.url),()=>m(()=>import("../nodes/11.D3gLypzx.js"),__vite__mapDeps([30,1,2,3,4,7,31]),import.meta.url),()=>m(()=>import("../nodes/12.BJYMQ3v1.js"),__vite__mapDeps([32,1,2,3,4,7,13,14,33]),import.meta.url),()=>m(()=>import("../nodes/13.uRTNTtbn.js"),__vite__mapDeps([34,1,2,3,4,7,13,14,35]),import.meta.url)],_e=[],fe={"/":[2],"/cost":[3],"/models":[4],"/overview":[5],"/pricing":[6],"/projects":[7],"/quotas":[8],"/sessions":[9],"/sessions/[sessionId]":[10],"/settings":[11],"/tokens":[12],"/tool-calls":[13]},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,fe as dictionary,ue as hash,ie as hooks,ae as matchers,ce as nodes,le as root,_e as server_loads};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"../chunks/entry.rSFvFffH.js";export{t as start};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as wt,d as It,r as Ct,u as Pt,e as Dt,f as Rt,c as De,o as Ut,h as Bt,n as Mt}from"../chunks/scheduler.DFD7qxcZ.js";import{S as Vt,i as Ot,d as f,v as St,l as Lt,m as Ht,s as H,x as Y,o as r,a as K,b as o,y as se,g as q,c as h,e as m,B as Re,f as M,j,h as v,t as V}from"../chunks/index.BmCbw0jM.js";import{e as Ue,n as Yt,x as Kt,y as zt,z as ft,t as Gt,A as Ft}from"../chunks/api.BuM0qEja.js";import{p as Jt}from"../chunks/stores.Ce9c-jZZ.js";import{w as Nt}from"../chunks/index.CPsgU-fv.js";import{g as Qt,h as ct}from"../chunks/stores.B1g8D8DV.js";const At="aiusage-theme";function Qe(){return typeof window>"u"?"system":localStorage.getItem(At)||"system"}function Tt(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}const We=Nt(Qe()),Wt=Nt(Tt());function ut(){We.update(l=>l==="system"?"dark":l==="dark"?"light":"system")}function Xt(){if(typeof window>"u")return;const l=window.matchMedia("(prefers-color-scheme: dark)");function e(s){const i=s==="system"?Tt():s;document.documentElement.setAttribute("data-theme",i),Wt.set(i)}e(Qe()),We.subscribe(s=>{localStorage.setItem(At,s),e(s)}),l.addEventListener("change",()=>{Qe()==="system"&&e("system")})}function ht(l,e,s){const i=l.slice();return i[20]=e[s],i}function vt(l,e,s){const i=l.slice();return i[23]=e[s],i}function pt(l){let e,s,i;return{c(){e=v("div"),this.h()},l(t){e=h(t,"DIV",{class:!0}),m(e).forEach(f),this.h()},h(){r(e,"class","mobile-backdrop svelte-svqfjh")},m(t,n){K(t,e,n),s||(i=se(e,"click",l[14]),s=!0)},p:Mt,d(t){t&&f(e),s=!1,i()}}}function _t(l){let e,s="AIUsage";return{c(){e=v("span"),e.textContent=s,this.h()},l(i){e=h(i,"SPAN",{class:!0,"data-svelte-h":!0}),Re(e)!=="svelte-u9et1t"&&(e.textContent=s),this.h()},h(){r(e,"class","brand-name svelte-svqfjh")},m(i,t){K(i,e,t)},d(i){i&&f(e)}}}function dt(l){let e,s=l[6](l[20].key)+"",i;return{c(){e=v("div"),i=V(s),this.h()},l(t){e=h(t,"DIV",{class:!0});var n=m(e);i=M(n,s),n.forEach(f),this.h()},h(){r(e,"class","group-label svelte-svqfjh")},m(t,n){K(t,e,n),o(e,i)},p(t,n){n&64&&s!==(s=t[6](t[20].key)+"")&&H(i,s)},d(t){t&&f(e)}}}function mt(l){let e,s=l[6](l[23].key)+"",i;return{c(){e=v("span"),i=V(s),this.h()},l(t){e=h(t,"SPAN",{class:!0});var n=m(e);i=M(n,s),n.forEach(f),this.h()},h(){r(e,"class","nav-label svelte-svqfjh")},m(t,n){K(t,e,n),o(e,i)},p(t,n){n&64&&s!==(s=t[6](t[23].key)+"")&&H(i,s)},d(t){t&&f(e)}}}function gt(l){let e,s,i=l[23].icon+"",t,n,p,c=!l[1]&&mt(l);return{c(){e=v("a"),s=v("span"),t=V(i),n=j(),c&&c.c(),this.h()},l(_){e=h(_,"A",{href:!0,class:!0,title:!0});var u=m(e);s=h(u,"SPAN",{class:!0});var E=m(s);t=M(E,i),E.forEach(f),n=q(u),c&&c.l(u),u.forEach(f),this.h()},h(){r(s,"class","nav-icon svelte-svqfjh"),r(e,"href",l[23].path),r(e,"class","nav-item svelte-svqfjh"),r(e,"title",p=l[1]?l[6](l[23].key):void 0),Y(e,"active",l[0].url.pathname===l[23].path)},m(_,u){K(_,e,u),o(e,s),o(s,t),o(e,n),c&&c.m(e,null)},p(_,u){_[1]?c&&(c.d(1),c=null):c?c.p(_,u):(c=mt(_),c.c(),c.m(e,null)),u&66&&p!==(p=_[1]?_[6](_[23].key):void 0)&&r(e,"title",p),u&513&&Y(e,"active",_[0].url.pathname===_[23].path)},d(_){_&&f(e),c&&c.d()}}}function bt(l){let e,s,i,t=!l[1]&&dt(l),n=Ue(l[20].items),p=[];for(let c=0;c<n.length;c+=1)p[c]=gt(vt(l,n,c));return{c(){e=v("div"),t&&t.c(),s=j();for(let c=0;c<p.length;c+=1)p[c].c();i=j(),this.h()},l(c){e=h(c,"DIV",{class:!0});var _=m(e);t&&t.l(_),s=q(_);for(let u=0;u<p.length;u+=1)p[u].l(_);i=q(_),_.forEach(f),this.h()},h(){r(e,"class","nav-group svelte-svqfjh")},m(c,_){K(c,e,_),t&&t.m(e,null),o(e,s);for(let u=0;u<p.length;u+=1)p[u]&&p[u].m(e,null);o(e,i)},p(c,_){if(c[1]?t&&(t.d(1),t=null):t?t.p(c,_):(t=dt(c),t.c(),t.m(e,s)),_&579){n=Ue(c[20].items);let u;for(u=0;u<n.length;u+=1){const E=vt(c,n,u);p[u]?p[u].p(E,_):(p[u]=gt(E),p[u].c(),p[u].m(e,i))}for(;u<p.length;u+=1)p[u].d(1);p.length=n.length}},d(c){c&&f(e),t&&t.d(),St(p,c)}}}function kt(l){let e,s=(l[5]||l[6]("sync.trigger"))+"",i;return{c(){e=v("span"),i=V(s),this.h()},l(t){e=h(t,"SPAN",{class:!0});var n=m(e);i=M(n,s),n.forEach(f),this.h()},h(){r(e,"class","ctrl-label svelte-svqfjh"),Y(e,"ok",l[5]===l[6]("sync.complete")),Y(e,"err",l[5]===l[6]("sync.failed"))},m(t,n){K(t,e,n),o(e,i)},p(t,n){n&96&&s!==(s=(t[5]||t[6]("sync.trigger"))+"")&&H(i,s),n&96&&Y(e,"ok",t[5]===t[6]("sync.complete")),n&96&&Y(e,"err",t[5]===t[6]("sync.failed"))},d(t){t&&f(e)}}}function yt(l){let e,s=l[6](`theme.${l[7]}`)+"",i;return{c(){e=v("span"),i=V(s),this.h()},l(t){e=h(t,"SPAN",{class:!0});var n=m(e);i=M(n,s),n.forEach(f),this.h()},h(){r(e,"class","ctrl-label svelte-svqfjh")},m(t,n){K(t,e,n),o(e,i)},p(t,n){n&192&&s!==(s=t[6](`theme.${t[7]}`)+"")&&H(i,s)},d(t){t&&f(e)}}}function Et(l){let e,s=l[8]==="en"?"中文":"English",i;return{c(){e=v("span"),i=V(s),this.h()},l(t){e=h(t,"SPAN",{class:!0});var n=m(e);i=M(n,s),n.forEach(f),this.h()},h(){r(e,"class","ctrl-label svelte-svqfjh")},m(t,n){K(t,e,n),o(e,i)},p(t,n){n&256&&s!==(s=t[8]==="en"?"中文":"English")&&H(i,s)},d(t){t&&f(e)}}}function qt(l){let e,s=l[6]("nav.collapse")+"",i;return{c(){e=v("span"),i=V(s),this.h()},l(t){e=h(t,"SPAN",{class:!0});var n=m(e);i=M(n,s),n.forEach(f),this.h()},h(){r(e,"class","ctrl-label svelte-svqfjh")},m(t,n){K(t,e,n),o(e,i)},p(t,n){n&64&&s!==(s=t[6]("nav.collapse")+"")&&H(i,s)},d(t){t&&f(e)}}}function Zt(l){let e,s,i,t,n,p,c="⌘",_,u,E,Q,D,g,N,U=l[4]?"↻":"⇅",z,ie,oe,W,R,X,le=l[10][l[7]]+"",b,G,be,Be,O,re,_e=l[8]==="en"?"中":"EN",ke,Me,ye,Ve,L,fe,de=l[1]?"›":"‹",Ee,Oe,qe,Le,Z,F,$,Xe='<span class="svelte-svqfjh"></span><span class="svelte-svqfjh"></span><span class="svelte-svqfjh"></span>',He,x,Ze='<span class="brand-logo svelte-svqfjh">⌘</span> <span class="brand-name svelte-svqfjh">AIUsage</span>',Ye,ee,ne,ce,me=l[10][l[7]]+"",je,Ke,ae,ue,ge=l[8]==="en"?"中":"EN",Se,ze,he,k,Ge,$e,A=l[2]&&pt(l),P=!l[1]&&_t(),ve=Ue(l[9]),S=[];for(let a=0;a<ve.length;a+=1)S[a]=bt(ht(l,ve,a));let T=!l[1]&&kt(l),w=!l[1]&&yt(l),I=!l[1]&&Et(l),C=!l[1]&&qt(l);const Fe=l[16].default,B=It(Fe,l,l[15],null);return{c(){A&&A.c(),e=j(),s=v("div"),i=v("aside"),t=v("div"),n=v("a"),p=v("span"),p.textContent=c,_=j(),P&&P.c(),u=j(),E=v("nav");for(let a=0;a<S.length;a+=1)S[a].c();Q=j(),D=v("div"),g=v("button"),N=v("span"),z=V(U),ie=j(),T&&T.c(),W=j(),R=v("button"),X=v("span"),b=V(le),G=j(),w&&w.c(),Be=j(),O=v("button"),re=v("span"),ke=V(_e),Me=j(),I&&I.c(),Ve=j(),L=v("button"),fe=v("span"),Ee=V(de),Oe=j(),C&&C.c(),Le=j(),Z=v("div"),F=v("header"),$=v("button"),$.innerHTML=Xe,He=j(),x=v("a"),x.innerHTML=Ze,Ye=j(),ee=v("div"),ne=v("button"),ce=v("span"),je=V(me),Ke=j(),ae=v("button"),ue=v("span"),Se=V(ge),ze=j(),he=v("main"),B&&B.c(),this.h()},l(a){A&&A.l(a),e=q(a),s=h(a,"DIV",{class:!0});var d=m(s);i=h(d,"ASIDE",{class:!0});var y=m(i);t=h(y,"DIV",{class:!0});var J=m(t);n=h(J,"A",{href:!0,class:!0});var Ne=m(n);p=h(Ne,"SPAN",{class:!0,"data-svelte-h":!0}),Re(p)!=="svelte-1ve1lns"&&(p.textContent=c),_=q(Ne),P&&P.l(Ne),Ne.forEach(f),u=q(J),E=h(J,"NAV",{class:!0});var xe=m(E);for(let Je=0;Je<S.length;Je+=1)S[Je].l(xe);xe.forEach(f),Q=q(J),D=h(J,"DIV",{class:!0});var te=m(D);g=h(te,"BUTTON",{class:!0,title:!0});var Ae=m(g);N=h(Ae,"SPAN",{class:!0});var et=m(N);z=M(et,U),et.forEach(f),ie=q(Ae),T&&T.l(Ae),Ae.forEach(f),W=q(te),R=h(te,"BUTTON",{class:!0,title:!0});var Te=m(R);X=h(Te,"SPAN",{class:!0});var tt=m(X);b=M(tt,le),tt.forEach(f),G=q(Te),w&&w.l(Te),Te.forEach(f),Be=q(te),O=h(te,"BUTTON",{class:!0,title:!0});var we=m(O);re=h(we,"SPAN",{class:!0});var st=m(re);ke=M(st,_e),st.forEach(f),Me=q(we),I&&I.l(we),we.forEach(f),Ve=q(te),L=h(te,"BUTTON",{class:!0,title:!0});var Ie=m(L);fe=h(Ie,"SPAN",{class:!0});var lt=m(fe);Ee=M(lt,de),lt.forEach(f),Oe=q(Ie),C&&C.l(Ie),Ie.forEach(f),te.forEach(f),J.forEach(f),y.forEach(f),Le=q(d),Z=h(d,"DIV",{class:!0});var Ce=m(Z);F=h(Ce,"HEADER",{class:!0});var pe=m(F);$=h(pe,"BUTTON",{class:!0,"data-svelte-h":!0}),Re($)!=="svelte-tgxof7"&&($.innerHTML=Xe),He=q(pe),x=h(pe,"A",{href:!0,class:!0,"data-svelte-h":!0}),Re(x)!=="svelte-13xaxyo"&&(x.innerHTML=Ze),Ye=q(pe),ee=h(pe,"DIV",{class:!0});var Pe=m(ee);ne=h(Pe,"BUTTON",{class:!0});var nt=m(ne);ce=h(nt,"SPAN",{class:!0});var at=m(ce);je=M(at,me),at.forEach(f),nt.forEach(f),Ke=q(Pe),ae=h(Pe,"BUTTON",{class:!0});var it=m(ae);ue=h(it,"SPAN",{class:!0});var ot=m(ue);Se=M(ot,ge),ot.forEach(f),it.forEach(f),Pe.forEach(f),pe.forEach(f),ze=q(Ce),he=h(Ce,"MAIN",{class:!0});var rt=m(he);B&&B.l(rt),rt.forEach(f),Ce.forEach(f),d.forEach(f),this.h()},h(){r(p,"class","brand-logo svelte-svqfjh"),r(n,"href","/"),r(n,"class","brand svelte-svqfjh"),r(E,"class","sidebar-nav svelte-svqfjh"),r(N,"class","ctrl-icon svelte-svqfjh"),Y(N,"spinning",l[4]),r(g,"class","ctrl-btn sync-btn svelte-svqfjh"),g.disabled=l[4],r(g,"title",oe=l[3]?`${l[6]("sync.lastSync")}: ${l[12](l[3].lastSyncAt)}`:l[6]("sync.notConfigured")),r(X,"class","ctrl-icon svelte-svqfjh"),r(R,"class","ctrl-btn svelte-svqfjh"),r(R,"title",be=l[6](`theme.${l[7]}`)),r(re,"class","ctrl-icon lang-icon svelte-svqfjh"),r(O,"class","ctrl-btn svelte-svqfjh"),r(O,"title",ye=l[8]==="en"?"中文":"EN"),r(fe,"class","ctrl-icon svelte-svqfjh"),r(L,"class","ctrl-btn collapse-btn svelte-svqfjh"),r(L,"title",qe=l[6](l[1]?"nav.expand":"nav.collapse")),r(D,"class","sidebar-footer svelte-svqfjh"),r(t,"class","sidebar-inner svelte-svqfjh"),r(i,"class","sidebar svelte-svqfjh"),Y(i,"open",l[2]),r($,"class","hamburger svelte-svqfjh"),r(x,"href","/"),r(x,"class","brand brand-mobile svelte-svqfjh"),r(ce,"class","ctrl-icon svelte-svqfjh"),r(ne,"class","ctrl-btn svelte-svqfjh"),r(ue,"class","ctrl-icon lang-icon svelte-svqfjh"),r(ae,"class","ctrl-btn svelte-svqfjh"),r(ee,"class","mobile-controls svelte-svqfjh"),r(F,"class","mobile-header svelte-svqfjh"),r(he,"class","page-content svelte-svqfjh"),r(Z,"class","main-area svelte-svqfjh"),r(s,"class","app svelte-svqfjh"),Y(s,"collapsed",l[1])},m(a,d){A&&A.m(a,d),K(a,e,d),K(a,s,d),o(s,i),o(i,t),o(t,n),o(n,p),o(n,_),P&&P.m(n,null),o(t,u),o(t,E);for(let y=0;y<S.length;y+=1)S[y]&&S[y].m(E,null);o(t,Q),o(t,D),o(D,g),o(g,N),o(N,z),o(g,ie),T&&T.m(g,null),o(D,W),o(D,R),o(R,X),o(X,b),o(R,G),w&&w.m(R,null),o(D,Be),o(D,O),o(O,re),o(re,ke),o(O,Me),I&&I.m(O,null),o(D,Ve),o(D,L),o(L,fe),o(fe,Ee),o(L,Oe),C&&C.m(L,null),o(s,Le),o(s,Z),o(Z,F),o(F,$),o(F,He),o(F,x),o(F,Ye),o(F,ee),o(ee,ne),o(ne,ce),o(ce,je),o(ee,Ke),o(ee,ae),o(ae,ue),o(ue,Se),o(Z,ze),o(Z,he),B&&B.m(he,null),k=!0,Ge||($e=[se(g,"click",l[11]),se(R,"click",ut),se(O,"click",ft),se(L,"click",l[13]),se($,"click",l[14]),se(ne,"click",ut),se(ae,"click",ft)],Ge=!0)},p(a,[d]){if(a[2]?A?A.p(a,d):(A=pt(a),A.c(),A.m(e.parentNode,e)):A&&(A.d(1),A=null),a[1]?P&&(P.d(1),P=null):P||(P=_t(),P.c(),P.m(n,null)),d&579){ve=Ue(a[9]);let y;for(y=0;y<ve.length;y+=1){const J=ht(a,ve,y);S[y]?S[y].p(J,d):(S[y]=bt(J),S[y].c(),S[y].m(E,null))}for(;y<S.length;y+=1)S[y].d(1);S.length=ve.length}(!k||d&16)&&U!==(U=a[4]?"↻":"⇅")&&H(z,U),(!k||d&16)&&Y(N,"spinning",a[4]),a[1]?T&&(T.d(1),T=null):T?T.p(a,d):(T=kt(a),T.c(),T.m(g,null)),(!k||d&16)&&(g.disabled=a[4]),(!k||d&72&&oe!==(oe=a[3]?`${a[6]("sync.lastSync")}: ${a[12](a[3].lastSyncAt)}`:a[6]("sync.notConfigured")))&&r(g,"title",oe),(!k||d&128)&&le!==(le=a[10][a[7]]+"")&&H(b,le),a[1]?w&&(w.d(1),w=null):w?w.p(a,d):(w=yt(a),w.c(),w.m(R,null)),(!k||d&192&&be!==(be=a[6](`theme.${a[7]}`)))&&r(R,"title",be),(!k||d&256)&&_e!==(_e=a[8]==="en"?"中":"EN")&&H(ke,_e),a[1]?I&&(I.d(1),I=null):I?I.p(a,d):(I=Et(a),I.c(),I.m(O,null)),(!k||d&256&&ye!==(ye=a[8]==="en"?"中文":"EN"))&&r(O,"title",ye),(!k||d&2)&&de!==(de=a[1]?"›":"‹")&&H(Ee,de),a[1]?C&&(C.d(1),C=null):C?C.p(a,d):(C=qt(a),C.c(),C.m(L,null)),(!k||d&66&&qe!==(qe=a[6](a[1]?"nav.expand":"nav.collapse")))&&r(L,"title",qe),(!k||d&4)&&Y(i,"open",a[2]),(!k||d&128)&&me!==(me=a[10][a[7]]+"")&&H(je,me),(!k||d&256)&&ge!==(ge=a[8]==="en"?"中":"EN")&&H(Se,ge),B&&B.p&&(!k||d&32768)&&Pt(B,Fe,a,a[15],k?Rt(Fe,a[15],d,null):Dt(a[15]),null),(!k||d&2)&&Y(s,"collapsed",a[1])},i(a){k||(Ht(B,a),k=!0)},o(a){Lt(B,a),k=!1},d(a){a&&(f(e),f(s)),A&&A.d(a),P&&P.d(),St(S,a),T&&T.d(),w&&w.d(),I&&I.d(),C&&C.d(),B&&B.d(a),Ge=!1,Ct($e)}}}const jt="aiusage-sidebar-collapsed";function $t(l,e,s){let i,t,n,p;De(l,Jt,b=>s(0,i=b)),De(l,Gt,b=>s(6,t=b)),De(l,We,b=>s(7,n=b)),De(l,Ft,b=>s(8,p=b));let{$$slots:c={},$$scope:_}=e;const u=[{key:"nav.group.analytics",items:[{path:"/",key:"nav.home",icon:"⌖"},{path:"/overview",key:"nav.overview",icon:"◈"},{path:"/tokens",key:"nav.tokens",icon:"◇"},{path:"/cost",key:"nav.cost",icon:"$"}]},{key:"nav.group.data",items:[{path:"/models",key:"nav.models",icon:"◆"},{path:"/tool-calls",key:"nav.toolCalls",icon:"⚡"},{path:"/projects",key:"nav.projects",icon:"◎"},{path:"/sessions",key:"nav.sessions",icon:"≡"}]},{key:"nav.group.manage",items:[{path:"/quotas",key:"nav.quotas",icon:"▣"},{path:"/pricing",key:"nav.pricing",icon:"¤"},{path:"/settings",key:"nav.settings",icon:"◉"}]}];let E=!1,Q=!1;const D={system:"◐",dark:"●",light:"○"};let g=null,N=!1,U="",z=null;async function ie(){try{const b=await Kt();s(3,g=b.status),s(4,N=!!(g!=null&&g.isRunning)),W()}catch{s(3,g=null),s(4,N=!1),W()}}async function oe(){var b;s(5,U="");try{const G=await zt();s(3,g=G.status),s(4,N=!!((b=G.status)!=null&&b.isRunning)),s(5,U=G.alreadyRunning?t("sync.inProgress"):t("sync.started")),W()}catch{s(5,U=t("sync.failed")),s(4,N=!1),W()}setTimeout(()=>{N||s(5,U="")},3e3)}function W(){z&&(clearInterval(z),z=null),N&&(z=setInterval(async()=>{await ie(),g!=null&&g.isRunning||(s(5,U=(g==null?void 0:g.lastSyncStatus)==="ok"?t("sync.complete"):(g==null?void 0:g.lastSyncError)||t("sync.failed")),setTimeout(()=>{s(5,U="")},5e3))},2e3))}function R(b){return b?new Date(b).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):t("sync.never")}function X(){s(1,E=!E),typeof window<"u"&&localStorage.setItem(jt,String(E))}function le(){s(2,Q=!Q)}return Ut(()=>{Xt(),ie(),Yt().then(b=>{var G;b.displayCurrency&&Qt.set(b.displayCurrency),(G=b.exchangeRateCache)!=null&&G.CNY_USD&&ct.set(b.exchangeRateCache.CNY_USD),b.exchangeRate&&ct.set(b.exchangeRate)}).catch(()=>{}),typeof window<"u"&&s(1,E=localStorage.getItem(jt)==="true")}),Bt(()=>{z&&clearInterval(z)}),l.$$set=b=>{"$$scope"in b&&s(15,_=b.$$scope)},l.$$.update=()=>{l.$$.dirty&1&&s(2,Q=!1)},[i,E,Q,g,N,U,t,n,p,u,D,oe,R,X,le,_,c]}class as extends Vt{constructor(e){super(),Ot(this,e,$t,Zt,wt,{})}}export{as as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as x,n as u,c as S}from"../chunks/scheduler.DFD7qxcZ.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.BmCbw0jM.js";import{p as H}from"../chunks/stores.
|
|
1
|
+
import{s as x,n as u,c as S}from"../chunks/scheduler.DFD7qxcZ.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.BmCbw0jM.js";import{p as H}from"../chunks/stores.Ce9c-jZZ.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as Es,n as os,c as ns,o as bs}from"../chunks/scheduler.DFD7qxcZ.js";import{S as gs,i as Ns,d as i,s as D,a as U,b as t,o as v,p as Ps,g as P,c,e as u,f as g,r as is,j as S,h as d,t as N,v as ks,B as Ke}from"../chunks/index.BmCbw0jM.js";import{m as Ss,e as qe,t as As}from"../chunks/api.BuM0qEja.js";import{p as Ds}from"../chunks/stores.Ce9c-jZZ.js";import{c as Pe,f as Be}from"../chunks/stores.B1g8D8DV.js";function rs(o,e,l){const s=o.slice();return s[8]=e[l],s[10]=l,s}function fs(o,e,l){const s=o.slice();return s[11]=e[l],s}function Is(o){const e=o.slice(),l=e[0].session;e[6]=l;const s=e[0].records;return e[7]=s,e}function cs(o){let e,l,s,a=ps(o[6].firstTs)+"",n,r,k,C=o[6].tool+"",I,V,A,T,E,j,w=o[3]("sessions.detail.meta.model")+"",_,f,h,z=o[6].model+"",$,B,R,Q,x=o[3]("sessions.detail.meta.duration")+"",de,X,ie,re=ms(o[6].duration)+"",Y,fe,J,ee,W=o[3]("sessions.detail.meta.tokens")+"",se,ve,te,le=Pe(o[6].inputTokens+o[6].outputTokens)+"",F,ke,K,q,b=o[3]("sessions.detail.meta.cost")+"",H,ue,Z,ae=Be(o[6].cost)+"",pe,oe,y,O,_e=o[3]("sessions.detail.meta.apiCalls")+"",me,Ee,be,Se=o[6].recordCount+"",Ce,Le,he,ge,Ae=o[3]("sessions.detail.meta.toolCalls")+"",Ve,Re,Ne,De=o[6].toolCallCount+"",Te,we,ne,ce=qe(o[7]),G=[];for(let p=0;p<ce.length;p+=1)G[p]=hs(rs(o,ce,p));let L=null;return ce.length||(L=ds(o)),{c(){e=d("div"),l=d("div"),s=d("span"),n=N(a),r=S(),k=d("span"),I=N(C),V=S(),A=d("div"),T=S(),E=d("div"),j=d("span"),_=N(w),f=S(),h=d("span"),$=N(z),B=S(),R=d("div"),Q=d("span"),de=N(x),X=S(),ie=d("span"),Y=N(re),fe=S(),J=d("div"),ee=d("span"),se=N(W),ve=S(),te=d("span"),F=N(le),ke=S(),K=d("div"),q=d("span"),H=N(b),ue=S(),Z=d("span"),pe=N(ae),oe=S(),y=d("div"),O=d("span"),me=N(_e),Ee=S(),be=d("span"),Ce=N(Se),Le=S(),he=d("div"),ge=d("span"),Ve=N(Ae),Re=S(),Ne=d("span"),Te=N(De),we=S(),ne=d("div");for(let p=0;p<G.length;p+=1)G[p].c();L&&L.c(),this.h()},l(p){e=c(p,"DIV",{class:!0});var m=u(e);l=c(m,"DIV",{class:!0});var M=u(l);s=c(M,"SPAN",{class:!0});var Ie=u(s);n=g(Ie,a),Ie.forEach(i),r=P(M),k=c(M,"SPAN",{class:!0});var Oe=u(k);I=g(Oe,C),Oe.forEach(i),M.forEach(i),V=P(m),A=c(m,"DIV",{class:!0}),u(A).forEach(i),T=P(m),E=c(m,"DIV",{class:!0});var He=u(E);j=c(He,"SPAN",{class:!0});var Qe=u(j);_=g(Qe,w),Qe.forEach(i),f=P(He),h=c(He,"SPAN",{class:!0});var We=u(h);$=g(We,z),We.forEach(i),He.forEach(i),B=P(m),R=c(m,"DIV",{class:!0});var Me=u(R);Q=c(Me,"SPAN",{class:!0});var Xe=u(Q);de=g(Xe,x),Xe.forEach(i),X=P(Me),ie=c(Me,"SPAN",{class:!0});var Ye=u(ie);Y=g(Ye,re),Ye.forEach(i),Me.forEach(i),fe=P(m),J=c(m,"DIV",{class:!0});var Fe=u(J);ee=c(Fe,"SPAN",{class:!0});var Ze=u(ee);se=g(Ze,W),Ze.forEach(i),ve=P(Fe),te=c(Fe,"SPAN",{class:!0});var ye=u(te);F=g(ye,le),ye.forEach(i),Fe.forEach(i),ke=P(m),K=c(m,"DIV",{class:!0});var ze=u(K);q=c(ze,"SPAN",{class:!0});var xe=u(q);H=g(xe,b),xe.forEach(i),ue=P(ze),Z=c(ze,"SPAN",{class:!0});var es=u(Z);pe=g(es,ae),es.forEach(i),ze.forEach(i),oe=P(m),y=c(m,"DIV",{class:!0});var Ue=u(y);O=c(Ue,"SPAN",{class:!0});var ss=u(O);me=g(ss,_e),ss.forEach(i),Ee=P(Ue),be=c(Ue,"SPAN",{class:!0});var ts=u(be);Ce=g(ts,Se),ts.forEach(i),Ue.forEach(i),Le=P(m),he=c(m,"DIV",{class:!0});var je=u(he);ge=c(je,"SPAN",{class:!0});var ls=u(ge);Ve=g(ls,Ae),ls.forEach(i),Re=P(je),Ne=c(je,"SPAN",{class:!0});var as=u(Ne);Te=g(as,De),as.forEach(i),je.forEach(i),m.forEach(i),we=P(p),ne=c(p,"DIV",{class:!0});var $e=u(ne);for(let Je=0;Je<G.length;Je+=1)G[Je].l($e);L&&L.l($e),$e.forEach(i),this.h()},h(){v(s,"class","meta-label mono svelte-1das5of"),v(k,"class","meta-sub svelte-1das5of"),v(l,"class","meta-item svelte-1das5of"),v(A,"class","meta-divider svelte-1das5of"),v(j,"class","meta-key svelte-1das5of"),v(h,"class","meta-val mono svelte-1das5of"),v(E,"class","meta-item svelte-1das5of"),v(Q,"class","meta-key svelte-1das5of"),v(ie,"class","meta-val mono svelte-1das5of"),v(R,"class","meta-item svelte-1das5of"),v(ee,"class","meta-key svelte-1das5of"),v(te,"class","meta-val mono svelte-1das5of"),v(J,"class","meta-item svelte-1das5of"),v(q,"class","meta-key svelte-1das5of"),v(Z,"class","meta-val mono accent svelte-1das5of"),v(K,"class","meta-item svelte-1das5of"),v(O,"class","meta-key svelte-1das5of"),v(be,"class","meta-val mono svelte-1das5of"),v(y,"class","meta-item svelte-1das5of"),v(ge,"class","meta-key svelte-1das5of"),v(Ne,"class","meta-val mono svelte-1das5of"),v(he,"class","meta-item svelte-1das5of"),v(e,"class","meta-bar card svelte-1das5of"),v(ne,"class","timeline svelte-1das5of")},m(p,m){U(p,e,m),t(e,l),t(l,s),t(s,n),t(l,r),t(l,k),t(k,I),t(e,V),t(e,A),t(e,T),t(e,E),t(E,j),t(j,_),t(E,f),t(E,h),t(h,$),t(e,B),t(e,R),t(R,Q),t(Q,de),t(R,X),t(R,ie),t(ie,Y),t(e,fe),t(e,J),t(J,ee),t(ee,se),t(J,ve),t(J,te),t(te,F),t(e,ke),t(e,K),t(K,q),t(q,H),t(K,ue),t(K,Z),t(Z,pe),t(e,oe),t(e,y),t(y,O),t(O,me),t(y,Ee),t(y,be),t(be,Ce),t(e,Le),t(e,he),t(he,ge),t(ge,Ve),t(he,Re),t(he,Ne),t(Ne,Te),U(p,we,m),U(p,ne,m);for(let M=0;M<G.length;M+=1)G[M]&&G[M].m(ne,null);L&&L.m(ne,null)},p(p,m){if(m&1&&a!==(a=ps(p[6].firstTs)+"")&&D(n,a),m&1&&C!==(C=p[6].tool+"")&&D(I,C),m&8&&w!==(w=p[3]("sessions.detail.meta.model")+"")&&D(_,w),m&1&&z!==(z=p[6].model+"")&&D($,z),m&8&&x!==(x=p[3]("sessions.detail.meta.duration")+"")&&D(de,x),m&1&&re!==(re=ms(p[6].duration)+"")&&D(Y,re),m&8&&W!==(W=p[3]("sessions.detail.meta.tokens")+"")&&D(se,W),m&1&&le!==(le=Pe(p[6].inputTokens+p[6].outputTokens)+"")&&D(F,le),m&8&&b!==(b=p[3]("sessions.detail.meta.cost")+"")&&D(H,b),m&1&&ae!==(ae=Be(p[6].cost)+"")&&D(pe,ae),m&8&&_e!==(_e=p[3]("sessions.detail.meta.apiCalls")+"")&&D(me,_e),m&1&&Se!==(Se=p[6].recordCount+"")&&D(Ce,Se),m&8&&Ae!==(Ae=p[3]("sessions.detail.meta.toolCalls")+"")&&D(Ve,Ae),m&1&&De!==(De=p[6].toolCallCount+"")&&D(Te,De),m&25){ce=qe(p[7]);let M;for(M=0;M<ce.length;M+=1){const Ie=rs(p,ce,M);G[M]?G[M].p(Ie,m):(G[M]=hs(Ie),G[M].c(),G[M].m(ne,null))}for(;M<G.length;M+=1)G[M].d(1);G.length=ce.length,!ce.length&&L?L.p(p,m):ce.length?L&&(L.d(1),L=null):(L=ds(p),L.c(),L.m(ne,null))}},d(p){p&&(i(e),i(we),i(ne)),ks(G,p),L&&L.d()}}}function Cs(o){let e,l;return{c(){e=d("div"),l=N(o[1]),this.h()},l(s){e=c(s,"DIV",{class:!0});var a=u(e);l=g(a,o[1]),a.forEach(i),this.h()},h(){v(e,"class","state-msg error")},m(s,a){U(s,e,a),t(e,l)},p(s,a){a&2&&D(l,s[1])},d(s){s&&i(e)}}}function Vs(o){let e,l=o[3]("common.loading")+"",s;return{c(){e=d("div"),s=N(l),this.h()},l(a){e=c(a,"DIV",{class:!0});var n=u(e);s=g(n,l),n.forEach(i),this.h()},h(){v(e,"class","state-msg")},m(a,n){U(a,e,n),t(e,s)},p(a,n){n&8&&l!==(l=a[3]("common.loading")+"")&&D(s,l)},d(a){a&&i(e)}}}function ds(o){let e,l,s=o[3]("sessions.noData")+"",a,n,r,k=o[3]("sessions.noDataHint")+"",C,I;return{c(){e=d("div"),l=d("h2"),a=N(s),n=S(),r=d("p"),C=N(k),I=S(),this.h()},l(V){e=c(V,"DIV",{class:!0});var A=u(e);l=c(A,"H2",{});var T=u(l);a=g(T,s),T.forEach(i),n=P(A),r=c(A,"P",{});var E=u(r);C=g(E,k),E.forEach(i),I=P(A),A.forEach(i),this.h()},h(){v(e,"class","state-msg")},m(V,A){U(V,e,A),t(e,l),t(l,a),t(e,n),t(e,r),t(r,C),t(e,I)},p(V,A){A&8&&s!==(s=V[3]("sessions.noData")+"")&&D(a,s),A&8&&k!==(k=V[3]("sessions.noDataHint")+"")&&D(C,k)},d(V){V&&i(e)}}}function vs(o){let e,l,s=o[4](o[8].ts-o[7][o[10]-1].ts)+"",a;return{c(){e=d("div"),l=d("span"),a=N(s),this.h()},l(n){e=c(n,"DIV",{class:!0});var r=u(e);l=c(r,"SPAN",{class:!0});var k=u(l);a=g(k,s),k.forEach(i),r.forEach(i),this.h()},h(){v(l,"class","gap-text svelte-1das5of"),v(e,"class","gap-divider svelte-1das5of")},m(n,r){U(n,e,r),t(e,l),t(l,a)},p(n,r){r&1&&s!==(s=n[4](n[8].ts-n[7][n[10]-1].ts)+"")&&D(a,s)},d(n){n&&i(e)}}}function Ts(o){let e,l=o[3]("sessions.detail.noToolCalls")+"",s;return{c(){e=d("div"),s=N(l),this.h()},l(a){e=c(a,"DIV",{class:!0});var n=u(e);s=g(n,l),n.forEach(i),this.h()},h(){v(e,"class","no-tool-calls muted svelte-1das5of")},m(a,n){U(a,e,n),t(e,s)},p(a,n){n&8&&l!==(l=a[3]("sessions.detail.noToolCalls")+"")&&D(s,l)},d(a){a&&i(e)}}}function ws(o){let e,l=qe(o[8].toolCalls),s=[];for(let a=0;a<l.length;a+=1)s[a]=_s(fs(o,l,a));return{c(){e=d("div");for(let a=0;a<s.length;a+=1)s[a].c();this.h()},l(a){e=c(a,"DIV",{class:!0});var n=u(e);for(let r=0;r<s.length;r+=1)s[r].l(n);n.forEach(i),this.h()},h(){v(e,"class","tool-calls svelte-1das5of")},m(a,n){U(a,e,n);for(let r=0;r<s.length;r+=1)s[r]&&s[r].m(e,null)},p(a,n){if(n&1){l=qe(a[8].toolCalls);let r;for(r=0;r<l.length;r+=1){const k=fs(a,l,r);s[r]?s[r].p(k,n):(s[r]=_s(k),s[r].c(),s[r].m(e,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=l.length}},d(a){a&&i(e),ks(s,a)}}}function us(o){let e,l=Ge(o[11].ts-o[8].ts)+"",s;return{c(){e=d("span"),s=N(l),this.h()},l(a){e=c(a,"SPAN",{class:!0});var n=u(e);s=g(n,l),n.forEach(i),this.h()},h(){v(e,"class","tc-offset mono muted svelte-1das5of")},m(a,n){U(a,e,n),t(e,s)},p(a,n){n&1&&l!==(l=Ge(a[11].ts-a[8].ts)+"")&&D(s,l)},d(a){a&&i(e)}}}function Hs(o){let e,l="skill";return{c(){e=d("span"),e.textContent=l,this.h()},l(s){e=c(s,"SPAN",{class:!0,"data-svelte-h":!0}),Ke(e)!=="svelte-slxz3u"&&(e.textContent=l),this.h()},h(){v(e,"class","badge badge-skill svelte-1das5of")},m(s,a){U(s,e,a)},d(s){s&&i(e)}}}function Ms(o){let e,l="mcp";return{c(){e=d("span"),e.textContent=l,this.h()},l(s){e=c(s,"SPAN",{class:!0,"data-svelte-h":!0}),Ke(e)!=="svelte-uwmdxw"&&(e.textContent=l),this.h()},h(){v(e,"class","badge badge-mcp svelte-1das5of")},m(s,a){U(s,e,a)},d(s){s&&i(e)}}}function _s(o){let e,l,s,a=o[11].callIndex+1+"",n,r,k,C=o[11].displayName+"",I,V,A,T,E=o[11].ts!=null&&us(o);function j(f,h){if(f[11].type==="mcp")return Ms;if(f[11].type==="skill")return Hs}let w=j(o),_=w&&w(o);return{c(){e=d("div"),l=d("span"),s=N("#"),n=N(a),r=S(),k=d("span"),I=N(C),V=S(),E&&E.c(),A=S(),_&&_.c(),T=S(),this.h()},l(f){e=c(f,"DIV",{class:!0});var h=u(e);l=c(h,"SPAN",{class:!0});var z=u(l);s=g(z,"#"),n=g(z,a),z.forEach(i),r=P(h),k=c(h,"SPAN",{class:!0});var $=u(k);I=g($,C),$.forEach(i),V=P(h),E&&E.l(h),A=P(h),_&&_.l(h),T=P(h),h.forEach(i),this.h()},h(){v(l,"class","tc-index mono muted svelte-1das5of"),v(k,"class","tc-name mono svelte-1das5of"),v(e,"class","tool-call svelte-1das5of")},m(f,h){U(f,e,h),t(e,l),t(l,s),t(l,n),t(e,r),t(e,k),t(k,I),t(e,V),E&&E.m(e,null),t(e,A),_&&_.m(e,null),t(e,T)},p(f,h){h&1&&a!==(a=f[11].callIndex+1+"")&&D(n,a),h&1&&C!==(C=f[11].displayName+"")&&D(I,C),f[11].ts!=null?E?E.p(f,h):(E=us(f),E.c(),E.m(e,A)):E&&(E.d(1),E=null),w!==(w=j(f))&&(_&&_.d(1),_=w&&w(f),_&&(_.c(),_.m(e,T)))},d(f){f&&i(e),E&&E.d(),_&&_.d()}}}function hs(o){let e,l,s,a,n,r=o[3]("sessions.detail.record")+"",k,C,I=o[10]+1+"",V,A,T,E=Ge(o[8].ts-o[6].firstTs)+"",j,w,_,f,h=o[8].model+"",z,$,B,R,Q=Pe(o[8].inputTokens)+"",x,de,X,ie="/",re,Y,fe=Pe(o[8].outputTokens)+"",J,ee,W,se=Be(o[8].cost)+"",ve,te,le,F=o[10]>0&&o[8].ts-o[7][o[10]-1].ts>1e3&&vs(o);function ke(b,H){return b[8].toolCalls&&b[8].toolCalls.length>0?ws:Ts}let K=ke(o),q=K(o);return{c(){F&&F.c(),e=S(),l=d("div"),s=d("div"),a=d("div"),n=d("span"),k=N(r),C=N(" #"),V=N(I),A=S(),T=d("span"),j=N(E),w=S(),_=d("div"),f=d("span"),z=N(h),$=S(),B=d("span"),R=d("span"),x=N(Q),de=S(),X=d("span"),X.textContent=ie,re=S(),Y=d("span"),J=N(fe),ee=S(),W=d("span"),ve=N(se),te=S(),q.c(),le=S(),this.h()},l(b){F&&F.l(b),e=P(b),l=c(b,"DIV",{class:!0});var H=u(l);s=c(H,"DIV",{class:!0});var ue=u(s);a=c(ue,"DIV",{class:!0});var Z=u(a);n=c(Z,"SPAN",{class:!0});var ae=u(n);k=g(ae,r),C=g(ae," #"),V=g(ae,I),ae.forEach(i),A=P(Z),T=c(Z,"SPAN",{class:!0});var pe=u(T);j=g(pe,E),pe.forEach(i),Z.forEach(i),w=P(ue),_=c(ue,"DIV",{class:!0});var oe=u(_);f=c(oe,"SPAN",{class:!0});var y=u(f);z=g(y,h),y.forEach(i),$=P(oe),B=c(oe,"SPAN",{class:!0});var O=u(B);R=c(O,"SPAN",{class:!0});var _e=u(R);x=g(_e,Q),_e.forEach(i),de=P(O),X=c(O,"SPAN",{class:!0,"data-svelte-h":!0}),Ke(X)!=="svelte-1ofwb3u"&&(X.textContent=ie),re=P(O),Y=c(O,"SPAN",{class:!0});var me=u(Y);J=g(me,fe),me.forEach(i),O.forEach(i),ee=P(oe),W=c(oe,"SPAN",{class:!0});var Ee=u(W);ve=g(Ee,se),Ee.forEach(i),oe.forEach(i),ue.forEach(i),te=P(H),q.l(H),le=P(H),H.forEach(i),this.h()},h(){v(n,"class","record-label mono svelte-1das5of"),v(T,"class","record-relts mono muted svelte-1das5of"),v(a,"class","record-meta-left svelte-1das5of"),v(f,"class","record-model mono svelte-1das5of"),v(R,"class","green svelte-1das5of"),v(X,"class","sep svelte-1das5of"),v(Y,"class","blue svelte-1das5of"),v(B,"class","record-tokens mono svelte-1das5of"),v(W,"class","record-cost mono accent svelte-1das5of"),v(_,"class","record-meta-right svelte-1das5of"),v(s,"class","record-header svelte-1das5of"),v(l,"class","record-card card svelte-1das5of")},m(b,H){F&&F.m(b,H),U(b,e,H),U(b,l,H),t(l,s),t(s,a),t(a,n),t(n,k),t(n,C),t(n,V),t(a,A),t(a,T),t(T,j),t(s,w),t(s,_),t(_,f),t(f,z),t(_,$),t(_,B),t(B,R),t(R,x),t(B,de),t(B,X),t(B,re),t(B,Y),t(Y,J),t(_,ee),t(_,W),t(W,ve),t(l,te),q.m(l,null),t(l,le)},p(b,H){b[10]>0&&b[8].ts-b[7][b[10]-1].ts>1e3?F?F.p(b,H):(F=vs(b),F.c(),F.m(e.parentNode,e)):F&&(F.d(1),F=null),H&8&&r!==(r=b[3]("sessions.detail.record")+"")&&D(k,r),H&1&&E!==(E=Ge(b[8].ts-b[6].firstTs)+"")&&D(j,E),H&1&&h!==(h=b[8].model+"")&&D(z,h),H&1&&Q!==(Q=Pe(b[8].inputTokens)+"")&&D(x,Q),H&1&&fe!==(fe=Pe(b[8].outputTokens)+"")&&D(J,fe),H&1&&se!==(se=Be(b[8].cost)+"")&&D(ve,se),K===(K=ke(b))&&q?q.p(b,H):(q.d(1),q=K(b),q&&(q.c(),q.m(l,le)))},d(b){b&&(i(e),i(l)),F&&F.d(b),q.d()}}}function Fs(o){let e,l,s,a,n=o[3]("sessions.detail.back")+"",r,k,C,I=o[3]("sessions.detail.title")+"",V,A,T;document.title=e=o[3]("sessions.detail.title")+" — AIUsage";function E(f,h){if(f[2])return Vs;if(f[1])return Cs;if(f[0])return cs}function j(f,h){return h===cs?Is(f):f}let w=E(o),_=w&&w(j(o,w));return{c(){l=S(),s=d("div"),a=d("a"),r=N(n),k=S(),C=d("h1"),V=N(I),A=S(),_&&_.c(),T=is(),this.h()},l(f){Ps("svelte-11yx7zf",document.head).forEach(i),l=P(f),s=c(f,"DIV",{class:!0});var z=u(s);a=c(z,"A",{class:!0,href:!0});var $=u(a);r=g($,n),$.forEach(i),k=P(z),C=c(z,"H1",{});var B=u(C);V=g(B,I),B.forEach(i),z.forEach(i),A=P(f),_&&_.l(f),T=is(),this.h()},h(){v(a,"class","back-link svelte-1das5of"),v(a,"href","/sessions"),v(s,"class","page-header")},m(f,h){U(f,l,h),U(f,s,h),t(s,a),t(a,r),t(s,k),t(s,C),t(C,V),U(f,A,h),_&&_.m(f,h),U(f,T,h)},p(f,[h]){h&8&&e!==(e=f[3]("sessions.detail.title")+" — AIUsage")&&(document.title=e),h&8&&n!==(n=f[3]("sessions.detail.back")+"")&&D(r,n),h&8&&I!==(I=f[3]("sessions.detail.title")+"")&&D(V,I),w===(w=E(f))&&_?_.p(j(f,w),h):(_&&_.d(1),_=w&&w(j(f,w)),_&&(_.c(),_.m(T.parentNode,T)))},i:os,o:os,d(f){f&&(i(l),i(s),i(A),i(T)),_&&_.d(f)}}}function ps(o){return new Date(o).toLocaleString()}function ms(o){if(!o||o<1e3)return"< 1s";const e=Math.floor(o/1e3),l=Math.floor(e/60);return l===0?`${e}s`:`${l}m ${e%60}s`}function Ge(o){if(o<=0)return"+0ms";if(o<1e3)return`+${o}ms`;const e=o/1e3;return`+${e%1===0?e.toFixed(0):e.toFixed(1)}s`}function zs(o,e,l){let s,a;ns(o,Ds,I=>l(5,s=I)),ns(o,As,I=>l(3,a=I));let n=null,r=null,k=!0;function C(I){return`— ${Math.round(I/1e3)}s ${a("sessions.detail.gap")} —`}return bs(async()=>{const I=s.params.sessionId,V=s.url.searchParams.get("tool")||"",A=s.url.searchParams.get("device")||"";try{l(0,n=await Ss(I,{tool:V,device:A}))}catch(T){l(1,r=T instanceof Error?T.message:"Failed to load session")}finally{l(2,k=!1)}}),[n,r,k,a,C]}class Ls extends gs{constructor(e){super(),Ns(this,e,zs,Fs,Es,{})}}export{Ls as component};
|