@juliantanx/aiusage 1.0.1 → 1.0.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/dist/index.js CHANGED
@@ -86,6 +86,75 @@ function loadCredential(key) {
86
86
  return config.credentials[key] ?? null;
87
87
  }
88
88
 
89
+ // src/api/project-extraction.ts
90
+ import path from "path";
91
+ var GENERIC_DIRECTORY_NAMES = /* @__PURE__ */ new Set([
92
+ "sessions",
93
+ "session",
94
+ "logs",
95
+ "log",
96
+ "data",
97
+ "tmp",
98
+ "temp",
99
+ "cache",
100
+ ".claude",
101
+ ".codex",
102
+ ".opencode",
103
+ ".openclaw",
104
+ "projects"
105
+ ]);
106
+ var TOOL_DIRECTORY_NAMES = /* @__PURE__ */ new Set(["agents", "main"]);
107
+ function extractProject(sourceFile) {
108
+ if (!sourceFile) return "unknown";
109
+ return extractProjectFromClaudePath(sourceFile) ?? extractProjectFromKnownToolPath(sourceFile) ?? extractProjectFromGenericPath(sourceFile) ?? "unknown";
110
+ }
111
+ function extractProjectFromClaudePath(sourceFile) {
112
+ const normalized = sourceFile.replace(/\\/g, "/");
113
+ const match = normalized.match(/\.claude\/projects\/([^/]+)/);
114
+ if (!match) return null;
115
+ const raw = match[1];
116
+ const parts = raw.split("-").filter(Boolean);
117
+ const webstormIndex = parts.indexOf("WebstormProjects");
118
+ if (webstormIndex >= 0 && webstormIndex < parts.length - 1) return parts.slice(webstormIndex + 1).join("-");
119
+ const documentsIndex = parts.indexOf("Documents");
120
+ if (documentsIndex >= 0 && documentsIndex < parts.length - 1) return parts.slice(documentsIndex + 1).join("-");
121
+ if (parts.length <= 3) return "~";
122
+ return parts.slice(-2).join("-") || raw;
123
+ }
124
+ function extractProjectFromKnownToolPath(sourceFile) {
125
+ const normalized = sourceFile.replace(/\\/g, "/");
126
+ if (normalized.includes("/.openclaw/")) {
127
+ const parts = normalized.split("/").filter(Boolean);
128
+ const sessionsIndex = parts.indexOf("sessions");
129
+ if (sessionsIndex > 1) {
130
+ const candidate = parts[sessionsIndex - 1];
131
+ if (!isSkippableDirectoryName(candidate)) return candidate;
132
+ }
133
+ }
134
+ if (normalized.includes("/.codex/") || normalized.includes("/.opencode/")) {
135
+ return extractProjectFromGenericPath(normalized);
136
+ }
137
+ return null;
138
+ }
139
+ function extractProjectFromGenericPath(sourceFile) {
140
+ const normalized = sourceFile.replace(/\\/g, "/");
141
+ const directory = path.posix.dirname(normalized);
142
+ const parts = directory.split("/").filter(Boolean);
143
+ for (let index = parts.length - 1; index >= 0; index -= 1) {
144
+ const candidate = parts[index];
145
+ if (isSkippableDirectoryName(candidate)) continue;
146
+ if (looksMachineGenerated(candidate)) continue;
147
+ return candidate;
148
+ }
149
+ return null;
150
+ }
151
+ function isSkippableDirectoryName(name) {
152
+ return GENERIC_DIRECTORY_NAMES.has(name) || TOOL_DIRECTORY_NAMES.has(name);
153
+ }
154
+ function looksMachineGenerated(name) {
155
+ return /^\d{4}$/.test(name) || /^\d{2}$/.test(name) || /^[0-9a-f]{8,}$/i.test(name) || /^[0-9a-f-]{32,}$/i.test(name);
156
+ }
157
+
89
158
  // src/api/server.ts
90
159
  function getDateRangeFilter(range, from, to, prefix = "") {
91
160
  const ts = prefix ? `${prefix}.ts` : "ts";
@@ -120,18 +189,6 @@ function json(res, data, status = 200) {
120
189
  res.writeHead(status, { "Content-Type": "application/json" });
121
190
  res.end(JSON.stringify(data));
122
191
  }
123
- function extractProject(sourceFile) {
124
- const match = sourceFile.match(/\.claude\/projects\/([^/]+)/);
125
- if (!match) return "unknown";
126
- const raw = match[1];
127
- const parts = raw.split("-").filter(Boolean);
128
- const wpIdx = parts.indexOf("WebstormProjects");
129
- if (wpIdx >= 0 && wpIdx < parts.length - 1) return parts.slice(wpIdx + 1).join("-");
130
- const docIdx = parts.indexOf("Documents");
131
- if (docIdx >= 0 && docIdx < parts.length - 1) return parts.slice(docIdx + 1).join("-");
132
- if (parts.length <= 3) return "~";
133
- return parts.slice(-2).join("-") || raw;
134
- }
135
192
  function getToolFilter(tool, prefix = "") {
136
193
  if (!tool) return { where: "", params: {} };
137
194
  const col = prefix ? `${prefix}.tool` : "tool";
@@ -932,8 +989,8 @@ function defaultFileData() {
932
989
  var WatermarkManager = class {
933
990
  data;
934
991
  path;
935
- constructor(path) {
936
- this.path = path;
992
+ constructor(path2) {
993
+ this.path = path2;
937
994
  this.data = this.load();
938
995
  }
939
996
  load() {
@@ -1489,15 +1546,15 @@ var SyncOrchestrator = class {
1489
1546
  });
1490
1547
  if (paths.length === 0) return 0;
1491
1548
  let totalPulled = 0;
1492
- for (const [index, path] of paths.entries()) {
1549
+ for (const [index, path2] of paths.entries()) {
1493
1550
  this.options.onProgress?.({
1494
1551
  phase: "pulling",
1495
- currentPath: path,
1552
+ currentPath: path2,
1496
1553
  completedFiles: index,
1497
1554
  totalFiles: paths.length,
1498
1555
  pulledCount: totalPulled
1499
1556
  });
1500
- const content = await this.backend.readFile(path);
1557
+ const content = await this.backend.readFile(path2);
1501
1558
  if (!content) continue;
1502
1559
  for (const line of content.split("\n").filter(Boolean)) {
1503
1560
  try {
@@ -1515,7 +1572,7 @@ var SyncOrchestrator = class {
1515
1572
  }
1516
1573
  this.options.onProgress?.({
1517
1574
  phase: "pulling",
1518
- currentPath: path,
1575
+ currentPath: path2,
1519
1576
  completedFiles: index + 1,
1520
1577
  totalFiles: paths.length,
1521
1578
  pulledCount: totalPulled
@@ -1523,13 +1580,13 @@ var SyncOrchestrator = class {
1523
1580
  }
1524
1581
  return totalPulled;
1525
1582
  }
1526
- async uploadFile(path, localSyncRecords) {
1527
- const existingContent = await this.backend.readFile(path);
1583
+ async uploadFile(path2, localSyncRecords) {
1584
+ const existingContent = await this.backend.readFile(path2);
1528
1585
  const existing = existingContent ? parseNdjson(existingContent) : /* @__PURE__ */ new Map();
1529
1586
  const changedCount = mergeRecords(existing, localSyncRecords);
1530
1587
  if (changedCount === 0) return 0;
1531
1588
  const content = Array.from(existing.values()).map((r) => JSON.stringify(r)).join("\n") + "\n";
1532
- await this.backend.writeFile(path, content);
1589
+ await this.backend.writeFile(path2, content);
1533
1590
  return changedCount;
1534
1591
  }
1535
1592
  async upload() {
@@ -1537,9 +1594,9 @@ var SyncOrchestrator = class {
1537
1594
  if (unsynced.length === 0) return 0;
1538
1595
  const byPath = /* @__PURE__ */ new Map();
1539
1596
  for (const record of unsynced) {
1540
- const path = getSyncPath(record.ts, this.options.deviceInstanceId);
1541
- if (!byPath.has(path)) byPath.set(path, []);
1542
- byPath.get(path).push(record);
1597
+ const path2 = getSyncPath(record.ts, this.options.deviceInstanceId);
1598
+ if (!byPath.has(path2)) byPath.set(path2, []);
1599
+ byPath.get(path2).push(record);
1543
1600
  }
1544
1601
  let totalUploaded = 0;
1545
1602
  const uploads = Array.from(byPath.entries());
@@ -1549,20 +1606,20 @@ var SyncOrchestrator = class {
1549
1606
  totalFiles: uploads.length,
1550
1607
  uploadedCount: 0
1551
1608
  });
1552
- for (const [index, [path, localRecords]] of uploads.entries()) {
1609
+ for (const [index, [path2, localRecords]] of uploads.entries()) {
1553
1610
  this.options.onProgress?.({
1554
1611
  phase: "uploading",
1555
- currentPath: path,
1612
+ currentPath: path2,
1556
1613
  completedFiles: index,
1557
1614
  totalFiles: uploads.length,
1558
1615
  uploadedCount: totalUploaded
1559
1616
  });
1560
1617
  const localSyncRecords = localRecords.map(mapStatsRecordToSyncRecord);
1561
- const changedCount = await this.uploadFile(path, localSyncRecords);
1618
+ const changedCount = await this.uploadFile(path2, localSyncRecords);
1562
1619
  totalUploaded += changedCount;
1563
1620
  this.options.onProgress?.({
1564
1621
  phase: "uploading",
1565
- currentPath: path,
1622
+ currentPath: path2,
1566
1623
  completedFiles: index + 1,
1567
1624
  totalFiles: uploads.length,
1568
1625
  uploadedCount: totalUploaded
@@ -1639,16 +1696,16 @@ var GitSyncBackend = class _GitSyncBackend {
1639
1696
  });
1640
1697
  }
1641
1698
  }
1642
- async readFile(path) {
1699
+ async readFile(path2) {
1643
1700
  try {
1644
- const fullPath = join4(this.dataDir, path);
1701
+ const fullPath = join4(this.dataDir, path2);
1645
1702
  return await readFile(fullPath, "utf-8");
1646
1703
  } catch {
1647
1704
  return null;
1648
1705
  }
1649
1706
  }
1650
- async writeFile(path, content) {
1651
- const fullPath = join4(this.dataDir, path);
1707
+ async writeFile(path2, content) {
1708
+ const fullPath = join4(this.dataDir, path2);
1652
1709
  await mkdir(join4(fullPath, ".."), { recursive: true });
1653
1710
  await writeFile(fullPath, content, "utf-8");
1654
1711
  }
@@ -1710,11 +1767,11 @@ var S3SyncBackend = class {
1710
1767
  }
1711
1768
  });
1712
1769
  }
1713
- getObjectKey(path) {
1714
- return `${this.prefix}${path}`;
1770
+ getObjectKey(path2) {
1771
+ return `${this.prefix}${path2}`;
1715
1772
  }
1716
- async readFile(path) {
1717
- const key = this.getObjectKey(path);
1773
+ async readFile(path2) {
1774
+ const key = this.getObjectKey(path2);
1718
1775
  try {
1719
1776
  const command = new GetObjectCommand({
1720
1777
  Bucket: this.bucket,
@@ -1730,8 +1787,8 @@ var S3SyncBackend = class {
1730
1787
  throw error;
1731
1788
  }
1732
1789
  }
1733
- async writeFile(path, content) {
1734
- const key = this.getObjectKey(path);
1790
+ async writeFile(path2, content) {
1791
+ const key = this.getObjectKey(path2);
1735
1792
  const command = new PutObjectCommand({
1736
1793
  Bucket: this.bucket,
1737
1794
  Key: key,
@@ -1763,8 +1820,8 @@ var S3SyncBackend = class {
1763
1820
  } while (continuationToken);
1764
1821
  return files.sort();
1765
1822
  }
1766
- async fileExists(path) {
1767
- const key = this.getObjectKey(path);
1823
+ async fileExists(path2) {
1824
+ const key = this.getObjectKey(path2);
1768
1825
  try {
1769
1826
  const command = new HeadObjectCommand({
1770
1827
  Bucket: this.bucket,
@@ -2575,9 +2632,9 @@ function initializeDatabase(db) {
2575
2632
  applyPragmas(db);
2576
2633
  runMigrations(db);
2577
2634
  }
2578
- function createDatabase(path) {
2579
- mkdirSync2(dirname2(path), { recursive: true, mode: 448 });
2580
- const db = new Database2(path);
2635
+ function createDatabase(path2) {
2636
+ mkdirSync2(dirname2(path2), { recursive: true, mode: 448 });
2637
+ const db = new Database2(path2);
2581
2638
  initializeDatabase(db);
2582
2639
  return db;
2583
2640
  }
@@ -2586,7 +2643,7 @@ function createDatabase(path) {
2586
2643
  import { join as join8 } from "path";
2587
2644
  var DB_PATH = join8(AIUSAGE_DIR, "cache.db");
2588
2645
  var program = new Command();
2589
- program.name("aiusage").version("1.0.1").description("CLI tool for AI usage statistics");
2646
+ program.name("aiusage").version("1.0.2").description("CLI tool for AI usage statistics");
2590
2647
  program.action(() => {
2591
2648
  const db = createDatabase(DB_PATH);
2592
2649
  const state = getState(AIUSAGE_DIR);
@@ -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.Dx1bs0RQ.js";import{w as ye}from"./index.Dm-3G3np.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_1qnk8cc)==null?void 0:Me.base)??"";var qe;const xt=((qe=globalThis.__sveltekit_1qnk8cc)==null?void 0:qe.assets)??L,Ct="1778867024168",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?`
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.Dx1bs0RQ.js";import{w as ye}from"./index.Dm-3G3np.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_10d0b1w)==null?void 0:Me.base)??"";var qe;const xt=((qe=globalThis.__sveltekit_10d0b1w)==null?void 0:qe.assets)??L,Ct="1778870500301",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?`
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: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};
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:k}=l,v=o.get(m);o.delete(m),k?v.reject(f(k)):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.CVLbqi7C.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
1
+ import{s as e}from"./entry.DbT6jbyV.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.Bzydyk3L.js","../chunks/scheduler.Dx1bs0RQ.js","../chunks/index.CzqoKkoo.js","../chunks/api.DyoIo4nG.js","../chunks/index.Dm-3G3np.js","../chunks/stores.BSF99XdC.js","../chunks/entry.CVLbqi7C.js","../assets/0.BTUc0PXb.css","../nodes/1.87xpHPtt.js","../nodes/2.CJyBxUXd.js","../chunks/ToolSelector.kb97TteP.js","../assets/ToolSelector.HSbC8-q9.css","../assets/2.I4bgY8QS.css","../nodes/3.Bqg88zQg.js","../assets/3.BmO4KrOR.css","../nodes/4.B3zrG0ip.js","../assets/4.TAVgUi8b.css","../nodes/5.C3h9wXyF.js","../assets/5.BeDwa7mS.css","../nodes/6.C8xhym7b.js","../assets/6.BYQidWiw.css","../nodes/7.C950CTxa.js","../assets/7.8R_5Laqi.css","../nodes/8.BSeUhVCa.js","../assets/8.BcbNCOTS.css","../nodes/9.DJXBgSiY.js","../assets/9.QhlpTtkf.css"])))=>i.map(i=>d[i]);
2
- import{s as q,f as N,o as B,t as U,h as I}from"../chunks/scheduler.Dx1bs0RQ.js";import{S as W,i as z,d as h,l as g,m as w,C as A,D,a as v,g as F,r as E,j as G,E as R,k as L,u as y,n as O,q as V,o as T,w as p,c as H,e as J,h as K,s as Q,f as X,t as Y}from"../chunks/index.CzqoKkoo.js";const Z="modulepreload",M=function(o,e){return new URL(o,e).href},S={},d=function(e,n,r){let s=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"));s=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 k=t.length-1;k>=0;k--){const P=t[k];if(P.href===c&&(!a||P.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${u}`))return;const m=document.createElement("link");if(m.rel=a?"stylesheet":Z,a||(m.as="script"),m.crossOrigin="",m.href=c,l&&m.setAttribute("nonce",l),document.head.appendChild(m),a)return new Promise((k,P)=>{m.addEventListener("load",k),m.addEventListener("error",()=>P(new Error(`Unable to preload CSS for ${c}`)))})}))}function _(t){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=t,window.dispatchEvent(i),!i.defaultPrevented)throw t}return s.then(t=>{for(const i of t||[])i.status==="rejected"&&_(i.reason);return e().catch(_)})},ae={};function $(o){let e,n,r;var s=o[1][0];function _(t,i){return{props:{data:t[3],form:t[2]}}}return s&&(e=R(s,_(o)),o[12](e)),{c(){e&&y(e.$$.fragment),n=E()},l(t){e&&V(e.$$.fragment,t),n=E()},m(t,i){e&&O(e,t,i),v(t,n,i),r=!0},p(t,i){if(i&2&&s!==(s=t[1][0])){if(e){A();const l=e;g(l.$$.fragment,1,0,()=>{L(l,1)}),D()}s?(e=R(s,_(t)),t[12](e),y(e.$$.fragment),w(e.$$.fragment,1),O(e,n.parentNode,n)):e=null}else if(s){const l={};i&8&&(l.data=t[3]),i&4&&(l.form=t[2]),e.$set(l)}},i(t){r||(e&&w(e.$$.fragment,t),r=!0)},o(t){e&&g(e.$$.fragment,t),r=!1},d(t){t&&h(n),o[12](null),e&&L(e,t)}}}function x(o){let e,n,r;var s=o[1][0];function _(t,i){return{props:{data:t[3],$$slots:{default:[ee]},$$scope:{ctx:t}}}}return s&&(e=R(s,_(o)),o[11](e)),{c(){e&&y(e.$$.fragment),n=E()},l(t){e&&V(e.$$.fragment,t),n=E()},m(t,i){e&&O(e,t,i),v(t,n,i),r=!0},p(t,i){if(i&2&&s!==(s=t[1][0])){if(e){A();const l=e;g(l.$$.fragment,1,0,()=>{L(l,1)}),D()}s?(e=R(s,_(t)),t[11](e),y(e.$$.fragment),w(e.$$.fragment,1),O(e,n.parentNode,n)):e=null}else if(s){const l={};i&8&&(l.data=t[3]),i&8215&&(l.$$scope={dirty:i,ctx:t}),e.$set(l)}},i(t){r||(e&&w(e.$$.fragment,t),r=!0)},o(t){e&&g(e.$$.fragment,t),r=!1},d(t){t&&h(n),o[11](null),e&&L(e,t)}}}function ee(o){let e,n,r;var s=o[1][1];function _(t,i){return{props:{data:t[4],form:t[2]}}}return s&&(e=R(s,_(o)),o[10](e)),{c(){e&&y(e.$$.fragment),n=E()},l(t){e&&V(e.$$.fragment,t),n=E()},m(t,i){e&&O(e,t,i),v(t,n,i),r=!0},p(t,i){if(i&2&&s!==(s=t[1][1])){if(e){A();const l=e;g(l.$$.fragment,1,0,()=>{L(l,1)}),D()}s?(e=R(s,_(t)),t[10](e),y(e.$$.fragment),w(e.$$.fragment,1),O(e,n.parentNode,n)):e=null}else if(s){const l={};i&16&&(l.data=t[4]),i&4&&(l.form=t[2]),e.$set(l)}},i(t){r||(e&&w(e.$$.fragment,t),r=!0)},o(t){e&&g(e.$$.fragment,t),r=!1},d(t){t&&h(n),o[10](null),e&&L(e,t)}}}function j(o){let e,n=o[6]&&C(o);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 s=J(e);n&&n.l(s),s.forEach(h),this.h()},h(){T(e,"id","svelte-announcer"),T(e,"aria-live","assertive"),T(e,"aria-atomic","true"),p(e,"position","absolute"),p(e,"left","0"),p(e,"top","0"),p(e,"clip","rect(0 0 0 0)"),p(e,"clip-path","inset(50%)"),p(e,"overflow","hidden"),p(e,"white-space","nowrap"),p(e,"width","1px"),p(e,"height","1px")},m(r,s){v(r,e,s),n&&n.m(e,null)},p(r,s){r[6]?n?n.p(r,s):(n=C(r),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(r){r&&h(e),n&&n.d()}}}function C(o){let e;return{c(){e=Y(o[7])},l(n){e=X(n,o[7])},m(n,r){v(n,e,r)},p(n,r){r&128&&Q(e,n[7])},d(n){n&&h(e)}}}function te(o){let e,n,r,s,_;const t=[x,$],i=[];function l(a,u){return a[1][1]?0:1}e=l(o),n=i[e]=t[e](o);let c=o[5]&&j(o);return{c(){n.c(),r=G(),c&&c.c(),s=E()},l(a){n.l(a),r=F(a),c&&c.l(a),s=E()},m(a,u){i[e].m(a,u),v(a,r,u),c&&c.m(a,u),v(a,s,u),_=!0},p(a,[u]){let b=e;e=l(a),e===b?i[e].p(a,u):(A(),g(i[b],1,1,()=>{i[b]=null}),D(),n=i[e],n?n.p(a,u):(n=i[e]=t[e](a),n.c()),w(n,1),n.m(r.parentNode,r)),a[5]?c?c.p(a,u):(c=j(a),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null)},i(a){_||(w(n),_=!0)},o(a){g(n),_=!1},d(a){a&&(h(r),h(s)),i[e].d(a),c&&c.d(a)}}}function ne(o,e,n){let{stores:r}=e,{page:s}=e,{constructors:_}=e,{components:t=[]}=e,{form:i}=e,{data_0:l=null}=e,{data_1:c=null}=e;N(r.page.notify);let a=!1,u=!1,b=null;B(()=>{const f=r.page.subscribe(()=>{a&&(n(6,u=!0),U().then(()=>{n(7,b=document.title||"untitled page")}))});return n(5,a=!0),f});function m(f){I[f?"unshift":"push"](()=>{t[1]=f,n(0,t)})}function k(f){I[f?"unshift":"push"](()=>{t[0]=f,n(0,t)})}function P(f){I[f?"unshift":"push"](()=>{t[0]=f,n(0,t)})}return o.$$set=f=>{"stores"in f&&n(8,r=f.stores),"page"in f&&n(9,s=f.page),"constructors"in f&&n(1,_=f.constructors),"components"in f&&n(0,t=f.components),"form"in f&&n(2,i=f.form),"data_0"in f&&n(3,l=f.data_0),"data_1"in f&&n(4,c=f.data_1)},o.$$.update=()=>{o.$$.dirty&768&&r.page.set(s)},[t,_,i,l,c,a,u,b,r,s,m,k,P]}class le extends W{constructor(e){super(),z(this,e,ne,te,q,{stores:8,page:9,constructors:1,components:0,form:2,data_0:3,data_1:4})}}const ce=[()=>d(()=>import("../nodes/0.Bzydyk3L.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url),()=>d(()=>import("../nodes/1.87xpHPtt.js"),__vite__mapDeps([8,1,2,5,6,4]),import.meta.url),()=>d(()=>import("../nodes/2.CJyBxUXd.js"),__vite__mapDeps([9,1,2,3,4,10,11,12]),import.meta.url),()=>d(()=>import("../nodes/3.Bqg88zQg.js"),__vite__mapDeps([13,1,2,3,4,10,11,14]),import.meta.url),()=>d(()=>import("../nodes/4.B3zrG0ip.js"),__vite__mapDeps([15,1,2,3,4,10,11,16]),import.meta.url),()=>d(()=>import("../nodes/5.C3h9wXyF.js"),__vite__mapDeps([17,1,2,3,4,18]),import.meta.url),()=>d(()=>import("../nodes/6.C8xhym7b.js"),__vite__mapDeps([19,1,2,3,4,10,11,20]),import.meta.url),()=>d(()=>import("../nodes/7.C950CTxa.js"),__vite__mapDeps([21,1,2,3,4,10,11,22]),import.meta.url),()=>d(()=>import("../nodes/8.BSeUhVCa.js"),__vite__mapDeps([23,1,2,3,4,10,11,24]),import.meta.url),()=>d(()=>import("../nodes/9.DJXBgSiY.js"),__vite__mapDeps([25,1,2,3,4,10,11,26]),import.meta.url)],fe=[],_e={"/":[2],"/cost":[3],"/models":[4],"/pricing":[5],"/projects":[6],"/sessions":[7],"/tokens":[8],"/tool-calls":[9]},ie={handleError:({error:o})=>{console.error(o)},reroute:()=>{},transport:{}},re=Object.fromEntries(Object.entries(ie.transport).map(([o,e])=>[o,e.decode])),ue=!1,me=(o,e)=>re[o](e);export{me as decode,re as decoders,_e as dictionary,ue as hash,ie as hooks,ae as matchers,ce as nodes,le as root,fe as server_loads};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.DiQJRuoG.js","../chunks/scheduler.Dx1bs0RQ.js","../chunks/index.CzqoKkoo.js","../chunks/api.DyoIo4nG.js","../chunks/index.Dm-3G3np.js","../chunks/stores.BSVKBbO8.js","../chunks/entry.DbT6jbyV.js","../assets/0.BTUc0PXb.css","../nodes/1.xdMqApFe.js","../nodes/2.CJyBxUXd.js","../chunks/ToolSelector.kb97TteP.js","../assets/ToolSelector.HSbC8-q9.css","../assets/2.I4bgY8QS.css","../nodes/3.Bqg88zQg.js","../assets/3.BmO4KrOR.css","../nodes/4.B3zrG0ip.js","../assets/4.TAVgUi8b.css","../nodes/5.C3h9wXyF.js","../assets/5.BeDwa7mS.css","../nodes/6.C8xhym7b.js","../assets/6.BYQidWiw.css","../nodes/7.C950CTxa.js","../assets/7.8R_5Laqi.css","../nodes/8.BSeUhVCa.js","../assets/8.BcbNCOTS.css","../nodes/9.DJXBgSiY.js","../assets/9.QhlpTtkf.css"])))=>i.map(i=>d[i]);
2
+ import{s as q,f as N,o as B,t as U,h as I}from"../chunks/scheduler.Dx1bs0RQ.js";import{S as W,i as z,d as h,l as g,m as w,C as A,D,a as v,g as F,r as E,j as G,E as R,k as L,u as y,n as O,q as V,o as T,w as p,c as H,e as J,h as K,s as Q,f as X,t as Y}from"../chunks/index.CzqoKkoo.js";const Z="modulepreload",M=function(o,e){return new URL(o,e).href},S={},d=function(e,n,r){let s=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"));s=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 k=t.length-1;k>=0;k--){const P=t[k];if(P.href===c&&(!a||P.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${u}`))return;const m=document.createElement("link");if(m.rel=a?"stylesheet":Z,a||(m.as="script"),m.crossOrigin="",m.href=c,l&&m.setAttribute("nonce",l),document.head.appendChild(m),a)return new Promise((k,P)=>{m.addEventListener("load",k),m.addEventListener("error",()=>P(new Error(`Unable to preload CSS for ${c}`)))})}))}function _(t){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=t,window.dispatchEvent(i),!i.defaultPrevented)throw t}return s.then(t=>{for(const i of t||[])i.status==="rejected"&&_(i.reason);return e().catch(_)})},ae={};function $(o){let e,n,r;var s=o[1][0];function _(t,i){return{props:{data:t[3],form:t[2]}}}return s&&(e=R(s,_(o)),o[12](e)),{c(){e&&y(e.$$.fragment),n=E()},l(t){e&&V(e.$$.fragment,t),n=E()},m(t,i){e&&O(e,t,i),v(t,n,i),r=!0},p(t,i){if(i&2&&s!==(s=t[1][0])){if(e){A();const l=e;g(l.$$.fragment,1,0,()=>{L(l,1)}),D()}s?(e=R(s,_(t)),t[12](e),y(e.$$.fragment),w(e.$$.fragment,1),O(e,n.parentNode,n)):e=null}else if(s){const l={};i&8&&(l.data=t[3]),i&4&&(l.form=t[2]),e.$set(l)}},i(t){r||(e&&w(e.$$.fragment,t),r=!0)},o(t){e&&g(e.$$.fragment,t),r=!1},d(t){t&&h(n),o[12](null),e&&L(e,t)}}}function x(o){let e,n,r;var s=o[1][0];function _(t,i){return{props:{data:t[3],$$slots:{default:[ee]},$$scope:{ctx:t}}}}return s&&(e=R(s,_(o)),o[11](e)),{c(){e&&y(e.$$.fragment),n=E()},l(t){e&&V(e.$$.fragment,t),n=E()},m(t,i){e&&O(e,t,i),v(t,n,i),r=!0},p(t,i){if(i&2&&s!==(s=t[1][0])){if(e){A();const l=e;g(l.$$.fragment,1,0,()=>{L(l,1)}),D()}s?(e=R(s,_(t)),t[11](e),y(e.$$.fragment),w(e.$$.fragment,1),O(e,n.parentNode,n)):e=null}else if(s){const l={};i&8&&(l.data=t[3]),i&8215&&(l.$$scope={dirty:i,ctx:t}),e.$set(l)}},i(t){r||(e&&w(e.$$.fragment,t),r=!0)},o(t){e&&g(e.$$.fragment,t),r=!1},d(t){t&&h(n),o[11](null),e&&L(e,t)}}}function ee(o){let e,n,r;var s=o[1][1];function _(t,i){return{props:{data:t[4],form:t[2]}}}return s&&(e=R(s,_(o)),o[10](e)),{c(){e&&y(e.$$.fragment),n=E()},l(t){e&&V(e.$$.fragment,t),n=E()},m(t,i){e&&O(e,t,i),v(t,n,i),r=!0},p(t,i){if(i&2&&s!==(s=t[1][1])){if(e){A();const l=e;g(l.$$.fragment,1,0,()=>{L(l,1)}),D()}s?(e=R(s,_(t)),t[10](e),y(e.$$.fragment),w(e.$$.fragment,1),O(e,n.parentNode,n)):e=null}else if(s){const l={};i&16&&(l.data=t[4]),i&4&&(l.form=t[2]),e.$set(l)}},i(t){r||(e&&w(e.$$.fragment,t),r=!0)},o(t){e&&g(e.$$.fragment,t),r=!1},d(t){t&&h(n),o[10](null),e&&L(e,t)}}}function j(o){let e,n=o[6]&&C(o);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 s=J(e);n&&n.l(s),s.forEach(h),this.h()},h(){T(e,"id","svelte-announcer"),T(e,"aria-live","assertive"),T(e,"aria-atomic","true"),p(e,"position","absolute"),p(e,"left","0"),p(e,"top","0"),p(e,"clip","rect(0 0 0 0)"),p(e,"clip-path","inset(50%)"),p(e,"overflow","hidden"),p(e,"white-space","nowrap"),p(e,"width","1px"),p(e,"height","1px")},m(r,s){v(r,e,s),n&&n.m(e,null)},p(r,s){r[6]?n?n.p(r,s):(n=C(r),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(r){r&&h(e),n&&n.d()}}}function C(o){let e;return{c(){e=Y(o[7])},l(n){e=X(n,o[7])},m(n,r){v(n,e,r)},p(n,r){r&128&&Q(e,n[7])},d(n){n&&h(e)}}}function te(o){let e,n,r,s,_;const t=[x,$],i=[];function l(a,u){return a[1][1]?0:1}e=l(o),n=i[e]=t[e](o);let c=o[5]&&j(o);return{c(){n.c(),r=G(),c&&c.c(),s=E()},l(a){n.l(a),r=F(a),c&&c.l(a),s=E()},m(a,u){i[e].m(a,u),v(a,r,u),c&&c.m(a,u),v(a,s,u),_=!0},p(a,[u]){let b=e;e=l(a),e===b?i[e].p(a,u):(A(),g(i[b],1,1,()=>{i[b]=null}),D(),n=i[e],n?n.p(a,u):(n=i[e]=t[e](a),n.c()),w(n,1),n.m(r.parentNode,r)),a[5]?c?c.p(a,u):(c=j(a),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null)},i(a){_||(w(n),_=!0)},o(a){g(n),_=!1},d(a){a&&(h(r),h(s)),i[e].d(a),c&&c.d(a)}}}function ne(o,e,n){let{stores:r}=e,{page:s}=e,{constructors:_}=e,{components:t=[]}=e,{form:i}=e,{data_0:l=null}=e,{data_1:c=null}=e;N(r.page.notify);let a=!1,u=!1,b=null;B(()=>{const f=r.page.subscribe(()=>{a&&(n(6,u=!0),U().then(()=>{n(7,b=document.title||"untitled page")}))});return n(5,a=!0),f});function m(f){I[f?"unshift":"push"](()=>{t[1]=f,n(0,t)})}function k(f){I[f?"unshift":"push"](()=>{t[0]=f,n(0,t)})}function P(f){I[f?"unshift":"push"](()=>{t[0]=f,n(0,t)})}return o.$$set=f=>{"stores"in f&&n(8,r=f.stores),"page"in f&&n(9,s=f.page),"constructors"in f&&n(1,_=f.constructors),"components"in f&&n(0,t=f.components),"form"in f&&n(2,i=f.form),"data_0"in f&&n(3,l=f.data_0),"data_1"in f&&n(4,c=f.data_1)},o.$$.update=()=>{o.$$.dirty&768&&r.page.set(s)},[t,_,i,l,c,a,u,b,r,s,m,k,P]}class le extends W{constructor(e){super(),z(this,e,ne,te,q,{stores:8,page:9,constructors:1,components:0,form:2,data_0:3,data_1:4})}}const ce=[()=>d(()=>import("../nodes/0.DiQJRuoG.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url),()=>d(()=>import("../nodes/1.xdMqApFe.js"),__vite__mapDeps([8,1,2,5,6,4]),import.meta.url),()=>d(()=>import("../nodes/2.CJyBxUXd.js"),__vite__mapDeps([9,1,2,3,4,10,11,12]),import.meta.url),()=>d(()=>import("../nodes/3.Bqg88zQg.js"),__vite__mapDeps([13,1,2,3,4,10,11,14]),import.meta.url),()=>d(()=>import("../nodes/4.B3zrG0ip.js"),__vite__mapDeps([15,1,2,3,4,10,11,16]),import.meta.url),()=>d(()=>import("../nodes/5.C3h9wXyF.js"),__vite__mapDeps([17,1,2,3,4,18]),import.meta.url),()=>d(()=>import("../nodes/6.C8xhym7b.js"),__vite__mapDeps([19,1,2,3,4,10,11,20]),import.meta.url),()=>d(()=>import("../nodes/7.C950CTxa.js"),__vite__mapDeps([21,1,2,3,4,10,11,22]),import.meta.url),()=>d(()=>import("../nodes/8.BSeUhVCa.js"),__vite__mapDeps([23,1,2,3,4,10,11,24]),import.meta.url),()=>d(()=>import("../nodes/9.DJXBgSiY.js"),__vite__mapDeps([25,1,2,3,4,10,11,26]),import.meta.url)],fe=[],_e={"/":[2],"/cost":[3],"/models":[4],"/pricing":[5],"/projects":[6],"/sessions":[7],"/tokens":[8],"/tool-calls":[9]},ie={handleError:({error:o})=>{console.error(o)},reroute:()=>{},transport:{}},re=Object.fromEntries(Object.entries(ie.transport).map(([o,e])=>[o,e.decode])),ue=!1,me=(o,e)=>re[o](e);export{me as decode,re as decoders,_e as dictionary,ue as hash,ie as hooks,ae as matchers,ce as nodes,le as root,fe as server_loads};
@@ -0,0 +1 @@
1
+ import{a as t}from"../chunks/entry.DbT6jbyV.js";export{t as start};
@@ -1 +1 @@
1
- import{s as Te,b as we,r as Ae,u as Ie,g as Ne,d as Pe,c as se,o as De,e as Me}from"../chunks/scheduler.Dx1bs0RQ.js";import{S as Be,i as Le,d as f,v as Re,l as Ce,m as Ve,s as D,o as m,a as R,b as i,x as ce,c as _,e as v,g as N,B as He,f as M,h as d,j as P,t as B,z as q}from"../chunks/index.CzqoKkoo.js";import{e as ye,l as Ue,m as je,n as Oe,t as qe,o as Ke}from"../chunks/api.DyoIo4nG.js";import{p as Ye}from"../chunks/stores.BSF99XdC.js";import{w as Ee}from"../chunks/index.Dm-3G3np.js";const Se="aiusage-theme";function ue(){return typeof window>"u"?"system":localStorage.getItem(Se)||"system"}function ze(){return typeof window>"u"||window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}const fe=Ee(ue()),Fe=Ee(ze());function Ge(){fe.update(s=>s==="system"?"dark":s==="dark"?"light":"system")}function Je(){if(typeof window>"u")return;const s=window.matchMedia("(prefers-color-scheme: dark)");function e(t){const a=t==="system"?ze():t;document.documentElement.setAttribute("data-theme",a),Fe.set(a)}e(ue()),fe.subscribe(t=>{localStorage.setItem(Se,t),e(t)}),s.addEventListener("change",()=>{ue()==="system"&&e("system")})}function ke(s,e,t){const a=s.slice();return a[16]=e[t],a}function be(s){let e,t=s[3](s[16].key)+"",a;return{c(){e=d("a"),a=B(t),this.h()},l(n){e=_(n,"A",{href:!0,class:!0});var o=v(e);a=M(o,t),o.forEach(f),this.h()},h(){m(e,"href",s[16].path),m(e,"class","svelte-1k8za9x"),q(e,"active",s[4].url.pathname===s[16].path)},m(n,o){R(n,e,o),i(e,a)},p(n,o){o&8&&t!==(t=n[3](n[16].key)+"")&&D(a,t),o&144&&q(e,"active",n[4].url.pathname===n[16].path)},d(n){n&&f(e)}}}function Qe(s){let e,t=s[3]("sync.trigger")+"",a;return{c(){e=d("span"),a=B(t),this.h()},l(n){e=_(n,"SPAN",{class:!0});var o=v(e);a=M(o,t),o.forEach(f),this.h()},h(){m(e,"class","sync-label svelte-1k8za9x")},m(n,o){R(n,e,o),i(e,a)},p(n,o){o&8&&t!==(t=n[3]("sync.trigger")+"")&&D(a,t)},d(n){n&&f(e)}}}function We(s){let e,t;return{c(){e=d("span"),t=B(s[2]),this.h()},l(a){e=_(a,"SPAN",{class:!0});var n=v(e);t=M(n,s[2]),n.forEach(f),this.h()},h(){m(e,"class","sync-label svelte-1k8za9x"),q(e,"ok",s[2]===s[3]("sync.complete")),q(e,"err",s[2]===s[3]("sync.failed"))},m(a,n){R(a,e,n),i(e,t)},p(a,n){n&4&&D(t,a[2]),n&12&&q(e,"ok",a[2]===a[3]("sync.complete")),n&12&&q(e,"err",a[2]===a[3]("sync.failed"))},d(a){a&&f(e)}}}function Xe(s){let e,t=s[3]("sync.syncing")+"",a;return{c(){e=d("span"),a=B(t),this.h()},l(n){e=_(n,"SPAN",{class:!0});var o=v(e);a=M(o,t),o.forEach(f),this.h()},h(){m(e,"class","sync-label svelte-1k8za9x")},m(n,o){R(n,e,o),i(e,a)},p(n,o){o&8&&t!==(t=n[3]("sync.syncing")+"")&&D(a,t)},d(n){n&&f(e)}}}function Ze(s){let e,t,a,n,o,K='<span class="logo svelte-1k8za9x">⌘</span> <span class="name svelte-1k8za9x">AIUsage</span>',Y,w,F,S,r,g,y=s[1]?"↻":"⇅",z,C,V,I,k,c,A=s[8][s[5]]+"",W,ae,H,G=s[3](`theme.${s[5]}`)+"",X,Z,le,L,J=s[6]==="en"?"中文":"EN",$,ne,U,b,oe,he,j=ye(s[7]),p=[];for(let l=0;l<j.length;l+=1)p[l]=be(ke(s,j,l));function me(l,h){return l[1]?Xe:l[2]?We:Qe}let x=me(s),T=x(s);const re=s[12].default,E=we(re,s,s[11],null);return{c(){e=d("div"),t=P(),a=d("div"),n=d("header"),o=d("div"),o.innerHTML=K,Y=P(),w=d("nav");for(let l=0;l<p.length;l+=1)p[l].c();F=P(),S=d("div"),r=d("button"),g=d("span"),z=B(y),C=P(),T.c(),I=P(),k=d("button"),c=d("span"),W=B(A),ae=P(),H=d("span"),X=B(G),le=P(),L=d("button"),$=B(J),ne=P(),U=d("main"),E&&E.c(),this.h()},l(l){e=_(l,"DIV",{class:!0}),v(e).forEach(f),t=N(l),a=_(l,"DIV",{class:!0});var h=v(a);n=_(h,"HEADER",{class:!0});var u=v(n);o=_(u,"DIV",{class:!0,"data-svelte-h":!0}),He(o)!=="svelte-1vxrilf"&&(o.innerHTML=K),Y=N(u),w=_(u,"NAV",{class:!0});var Q=v(w);for(let ie=0;ie<p.length;ie+=1)p[ie].l(Q);Q.forEach(f),F=N(u),S=_(u,"DIV",{class:!0});var O=v(S);r=_(O,"BUTTON",{class:!0,title:!0});var ee=v(r);g=_(ee,"SPAN",{class:!0});var pe=v(g);z=M(pe,y),pe.forEach(f),C=N(ee),T.l(ee),ee.forEach(f),I=N(O),k=_(O,"BUTTON",{class:!0,title:!0});var te=v(k);c=_(te,"SPAN",{class:!0});var _e=v(c);W=M(_e,A),_e.forEach(f),ae=N(te),H=_(te,"SPAN",{class:!0});var de=v(H);X=M(de,G),de.forEach(f),te.forEach(f),le=N(O),L=_(O,"BUTTON",{class:!0});var ve=v(L);$=M(ve,J),ve.forEach(f),O.forEach(f),u.forEach(f),ne=N(h),U=_(h,"MAIN",{class:!0});var ge=v(U);E&&E.l(ge),ge.forEach(f),h.forEach(f),this.h()},h(){m(e,"class","grain svelte-1k8za9x"),m(o,"class","brand svelte-1k8za9x"),m(w,"class","svelte-1k8za9x"),m(g,"class","sync-icon svelte-1k8za9x"),m(r,"class","sync-toggle svelte-1k8za9x"),r.disabled=s[1],m(r,"title",V=s[0]?`${s[3]("sync.lastSync")}: ${s[10](s[0].lastSyncAt)}`:s[3]("sync.notConfigured")),m(c,"class","theme-icon svelte-1k8za9x"),m(H,"class","theme-label svelte-1k8za9x"),m(k,"class","theme-toggle svelte-1k8za9x"),m(k,"title",Z=s[3](`theme.${s[5]}`)),m(L,"class","lang-toggle svelte-1k8za9x"),m(S,"class","controls svelte-1k8za9x"),m(n,"class","svelte-1k8za9x"),m(U,"class","svelte-1k8za9x"),m(a,"class","app svelte-1k8za9x")},m(l,h){R(l,e,h),R(l,t,h),R(l,a,h),i(a,n),i(n,o),i(n,Y),i(n,w);for(let u=0;u<p.length;u+=1)p[u]&&p[u].m(w,null);i(n,F),i(n,S),i(S,r),i(r,g),i(g,z),i(r,C),T.m(r,null),i(S,I),i(S,k),i(k,c),i(c,W),i(k,ae),i(k,H),i(H,X),i(S,le),i(S,L),i(L,$),i(a,ne),i(a,U),E&&E.m(U,null),b=!0,oe||(he=[ce(r,"click",s[9]),ce(k,"click",Ge),ce(L,"click",Oe)],oe=!0)},p(l,[h]){if(h&152){j=ye(l[7]);let u;for(u=0;u<j.length;u+=1){const Q=ke(l,j,u);p[u]?p[u].p(Q,h):(p[u]=be(Q),p[u].c(),p[u].m(w,null))}for(;u<p.length;u+=1)p[u].d(1);p.length=j.length}(!b||h&2)&&y!==(y=l[1]?"↻":"⇅")&&D(z,y),x===(x=me(l))&&T?T.p(l,h):(T.d(1),T=x(l),T&&(T.c(),T.m(r,null))),(!b||h&2)&&(r.disabled=l[1]),(!b||h&9&&V!==(V=l[0]?`${l[3]("sync.lastSync")}: ${l[10](l[0].lastSyncAt)}`:l[3]("sync.notConfigured")))&&m(r,"title",V),(!b||h&32)&&A!==(A=l[8][l[5]]+"")&&D(W,A),(!b||h&40)&&G!==(G=l[3](`theme.${l[5]}`)+"")&&D(X,G),(!b||h&40&&Z!==(Z=l[3](`theme.${l[5]}`)))&&m(k,"title",Z),(!b||h&64)&&J!==(J=l[6]==="en"?"中文":"EN")&&D($,J),E&&E.p&&(!b||h&2048)&&Ie(E,re,l,l[11],b?Pe(re,l[11],h,null):Ne(l[11]),null)},i(l){b||(Ve(E,l),b=!0)},o(l){Ce(E,l),b=!1},d(l){l&&(f(e),f(t),f(a)),Re(p,l),T.d(),E&&E.d(l),oe=!1,Ae(he)}}}function $e(s,e,t){let a,n,o,K;se(s,qe,c=>t(3,a=c)),se(s,Ye,c=>t(4,n=c)),se(s,fe,c=>t(5,o=c)),se(s,Ke,c=>t(6,K=c));let{$$slots:Y={},$$scope:w}=e;const F=[{path:"/",key:"nav.overview"},{path:"/tokens",key:"nav.tokens"},{path:"/cost",key:"nav.cost"},{path:"/models",key:"nav.models"},{path:"/tool-calls",key:"nav.toolCalls"},{path:"/projects",key:"nav.projects"},{path:"/sessions",key:"nav.sessions"},{path:"/pricing",key:"nav.pricing"}],S={system:"◐",dark:"●",light:"○"};let r=null,g=!1,y="",z=null;async function C(){try{const c=await Ue();t(0,r=c.status),t(1,g=!!(r!=null&&r.isRunning)),I()}catch{t(0,r=null),t(1,g=!1),I()}}async function V(){var c;t(2,y="");try{const A=await je();t(0,r=A.status),t(1,g=!!((c=A.status)!=null&&c.isRunning)),t(2,y=A.alreadyRunning?a("sync.inProgress"):a("sync.started")),I()}catch{t(2,y=a("sync.failed")),t(1,g=!1),I()}setTimeout(()=>{g||t(2,y="")},3e3)}function I(){z&&(clearInterval(z),z=null),g&&(z=setInterval(async()=>{await C(),r!=null&&r.isRunning||(t(2,y=(r==null?void 0:r.lastSyncStatus)==="ok"?a("sync.complete"):(r==null?void 0:r.lastSyncError)||a("sync.failed")),setTimeout(()=>{t(2,y="")},5e3))},2e3))}function k(c){return c?new Date(c).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):a("sync.never")}return De(()=>{Je(),C()}),Me(()=>{z&&clearInterval(z)}),s.$$set=c=>{"$$scope"in c&&t(11,w=c.$$scope)},[r,g,y,a,n,o,K,F,S,V,k,w,Y]}class lt extends Be{constructor(e){super(),Le(this,e,$e,Ze,Te,{})}}export{lt as component};
1
+ import{s as Te,b as we,r as Ae,u as Ie,g as Ne,d as Pe,c as se,o as De,e as Me}from"../chunks/scheduler.Dx1bs0RQ.js";import{S as Be,i as Le,d as f,v as Re,l as Ce,m as Ve,s as D,o as m,a as R,b as i,x as ce,c as _,e as v,g as N,B as He,f as M,h as d,j as P,t as B,z as q}from"../chunks/index.CzqoKkoo.js";import{e as ye,l as Ue,m as je,n as Oe,t as qe,o as Ke}from"../chunks/api.DyoIo4nG.js";import{p as Ye}from"../chunks/stores.BSVKBbO8.js";import{w as Ee}from"../chunks/index.Dm-3G3np.js";const Se="aiusage-theme";function ue(){return typeof window>"u"?"system":localStorage.getItem(Se)||"system"}function ze(){return typeof window>"u"||window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}const fe=Ee(ue()),Fe=Ee(ze());function Ge(){fe.update(s=>s==="system"?"dark":s==="dark"?"light":"system")}function Je(){if(typeof window>"u")return;const s=window.matchMedia("(prefers-color-scheme: dark)");function e(t){const a=t==="system"?ze():t;document.documentElement.setAttribute("data-theme",a),Fe.set(a)}e(ue()),fe.subscribe(t=>{localStorage.setItem(Se,t),e(t)}),s.addEventListener("change",()=>{ue()==="system"&&e("system")})}function ke(s,e,t){const a=s.slice();return a[16]=e[t],a}function be(s){let e,t=s[3](s[16].key)+"",a;return{c(){e=d("a"),a=B(t),this.h()},l(n){e=_(n,"A",{href:!0,class:!0});var o=v(e);a=M(o,t),o.forEach(f),this.h()},h(){m(e,"href",s[16].path),m(e,"class","svelte-1k8za9x"),q(e,"active",s[4].url.pathname===s[16].path)},m(n,o){R(n,e,o),i(e,a)},p(n,o){o&8&&t!==(t=n[3](n[16].key)+"")&&D(a,t),o&144&&q(e,"active",n[4].url.pathname===n[16].path)},d(n){n&&f(e)}}}function Qe(s){let e,t=s[3]("sync.trigger")+"",a;return{c(){e=d("span"),a=B(t),this.h()},l(n){e=_(n,"SPAN",{class:!0});var o=v(e);a=M(o,t),o.forEach(f),this.h()},h(){m(e,"class","sync-label svelte-1k8za9x")},m(n,o){R(n,e,o),i(e,a)},p(n,o){o&8&&t!==(t=n[3]("sync.trigger")+"")&&D(a,t)},d(n){n&&f(e)}}}function We(s){let e,t;return{c(){e=d("span"),t=B(s[2]),this.h()},l(a){e=_(a,"SPAN",{class:!0});var n=v(e);t=M(n,s[2]),n.forEach(f),this.h()},h(){m(e,"class","sync-label svelte-1k8za9x"),q(e,"ok",s[2]===s[3]("sync.complete")),q(e,"err",s[2]===s[3]("sync.failed"))},m(a,n){R(a,e,n),i(e,t)},p(a,n){n&4&&D(t,a[2]),n&12&&q(e,"ok",a[2]===a[3]("sync.complete")),n&12&&q(e,"err",a[2]===a[3]("sync.failed"))},d(a){a&&f(e)}}}function Xe(s){let e,t=s[3]("sync.syncing")+"",a;return{c(){e=d("span"),a=B(t),this.h()},l(n){e=_(n,"SPAN",{class:!0});var o=v(e);a=M(o,t),o.forEach(f),this.h()},h(){m(e,"class","sync-label svelte-1k8za9x")},m(n,o){R(n,e,o),i(e,a)},p(n,o){o&8&&t!==(t=n[3]("sync.syncing")+"")&&D(a,t)},d(n){n&&f(e)}}}function Ze(s){let e,t,a,n,o,K='<span class="logo svelte-1k8za9x">⌘</span> <span class="name svelte-1k8za9x">AIUsage</span>',Y,w,F,S,r,g,y=s[1]?"↻":"⇅",z,C,V,I,k,c,A=s[8][s[5]]+"",W,ae,H,G=s[3](`theme.${s[5]}`)+"",X,Z,le,L,J=s[6]==="en"?"中文":"EN",$,ne,U,b,oe,he,j=ye(s[7]),p=[];for(let l=0;l<j.length;l+=1)p[l]=be(ke(s,j,l));function me(l,h){return l[1]?Xe:l[2]?We:Qe}let x=me(s),T=x(s);const re=s[12].default,E=we(re,s,s[11],null);return{c(){e=d("div"),t=P(),a=d("div"),n=d("header"),o=d("div"),o.innerHTML=K,Y=P(),w=d("nav");for(let l=0;l<p.length;l+=1)p[l].c();F=P(),S=d("div"),r=d("button"),g=d("span"),z=B(y),C=P(),T.c(),I=P(),k=d("button"),c=d("span"),W=B(A),ae=P(),H=d("span"),X=B(G),le=P(),L=d("button"),$=B(J),ne=P(),U=d("main"),E&&E.c(),this.h()},l(l){e=_(l,"DIV",{class:!0}),v(e).forEach(f),t=N(l),a=_(l,"DIV",{class:!0});var h=v(a);n=_(h,"HEADER",{class:!0});var u=v(n);o=_(u,"DIV",{class:!0,"data-svelte-h":!0}),He(o)!=="svelte-1vxrilf"&&(o.innerHTML=K),Y=N(u),w=_(u,"NAV",{class:!0});var Q=v(w);for(let ie=0;ie<p.length;ie+=1)p[ie].l(Q);Q.forEach(f),F=N(u),S=_(u,"DIV",{class:!0});var O=v(S);r=_(O,"BUTTON",{class:!0,title:!0});var ee=v(r);g=_(ee,"SPAN",{class:!0});var pe=v(g);z=M(pe,y),pe.forEach(f),C=N(ee),T.l(ee),ee.forEach(f),I=N(O),k=_(O,"BUTTON",{class:!0,title:!0});var te=v(k);c=_(te,"SPAN",{class:!0});var _e=v(c);W=M(_e,A),_e.forEach(f),ae=N(te),H=_(te,"SPAN",{class:!0});var de=v(H);X=M(de,G),de.forEach(f),te.forEach(f),le=N(O),L=_(O,"BUTTON",{class:!0});var ve=v(L);$=M(ve,J),ve.forEach(f),O.forEach(f),u.forEach(f),ne=N(h),U=_(h,"MAIN",{class:!0});var ge=v(U);E&&E.l(ge),ge.forEach(f),h.forEach(f),this.h()},h(){m(e,"class","grain svelte-1k8za9x"),m(o,"class","brand svelte-1k8za9x"),m(w,"class","svelte-1k8za9x"),m(g,"class","sync-icon svelte-1k8za9x"),m(r,"class","sync-toggle svelte-1k8za9x"),r.disabled=s[1],m(r,"title",V=s[0]?`${s[3]("sync.lastSync")}: ${s[10](s[0].lastSyncAt)}`:s[3]("sync.notConfigured")),m(c,"class","theme-icon svelte-1k8za9x"),m(H,"class","theme-label svelte-1k8za9x"),m(k,"class","theme-toggle svelte-1k8za9x"),m(k,"title",Z=s[3](`theme.${s[5]}`)),m(L,"class","lang-toggle svelte-1k8za9x"),m(S,"class","controls svelte-1k8za9x"),m(n,"class","svelte-1k8za9x"),m(U,"class","svelte-1k8za9x"),m(a,"class","app svelte-1k8za9x")},m(l,h){R(l,e,h),R(l,t,h),R(l,a,h),i(a,n),i(n,o),i(n,Y),i(n,w);for(let u=0;u<p.length;u+=1)p[u]&&p[u].m(w,null);i(n,F),i(n,S),i(S,r),i(r,g),i(g,z),i(r,C),T.m(r,null),i(S,I),i(S,k),i(k,c),i(c,W),i(k,ae),i(k,H),i(H,X),i(S,le),i(S,L),i(L,$),i(a,ne),i(a,U),E&&E.m(U,null),b=!0,oe||(he=[ce(r,"click",s[9]),ce(k,"click",Ge),ce(L,"click",Oe)],oe=!0)},p(l,[h]){if(h&152){j=ye(l[7]);let u;for(u=0;u<j.length;u+=1){const Q=ke(l,j,u);p[u]?p[u].p(Q,h):(p[u]=be(Q),p[u].c(),p[u].m(w,null))}for(;u<p.length;u+=1)p[u].d(1);p.length=j.length}(!b||h&2)&&y!==(y=l[1]?"↻":"⇅")&&D(z,y),x===(x=me(l))&&T?T.p(l,h):(T.d(1),T=x(l),T&&(T.c(),T.m(r,null))),(!b||h&2)&&(r.disabled=l[1]),(!b||h&9&&V!==(V=l[0]?`${l[3]("sync.lastSync")}: ${l[10](l[0].lastSyncAt)}`:l[3]("sync.notConfigured")))&&m(r,"title",V),(!b||h&32)&&A!==(A=l[8][l[5]]+"")&&D(W,A),(!b||h&40)&&G!==(G=l[3](`theme.${l[5]}`)+"")&&D(X,G),(!b||h&40&&Z!==(Z=l[3](`theme.${l[5]}`)))&&m(k,"title",Z),(!b||h&64)&&J!==(J=l[6]==="en"?"中文":"EN")&&D($,J),E&&E.p&&(!b||h&2048)&&Ie(E,re,l,l[11],b?Pe(re,l[11],h,null):Ne(l[11]),null)},i(l){b||(Ve(E,l),b=!0)},o(l){Ce(E,l),b=!1},d(l){l&&(f(e),f(t),f(a)),Re(p,l),T.d(),E&&E.d(l),oe=!1,Ae(he)}}}function $e(s,e,t){let a,n,o,K;se(s,qe,c=>t(3,a=c)),se(s,Ye,c=>t(4,n=c)),se(s,fe,c=>t(5,o=c)),se(s,Ke,c=>t(6,K=c));let{$$slots:Y={},$$scope:w}=e;const F=[{path:"/",key:"nav.overview"},{path:"/tokens",key:"nav.tokens"},{path:"/cost",key:"nav.cost"},{path:"/models",key:"nav.models"},{path:"/tool-calls",key:"nav.toolCalls"},{path:"/projects",key:"nav.projects"},{path:"/sessions",key:"nav.sessions"},{path:"/pricing",key:"nav.pricing"}],S={system:"◐",dark:"●",light:"○"};let r=null,g=!1,y="",z=null;async function C(){try{const c=await Ue();t(0,r=c.status),t(1,g=!!(r!=null&&r.isRunning)),I()}catch{t(0,r=null),t(1,g=!1),I()}}async function V(){var c;t(2,y="");try{const A=await je();t(0,r=A.status),t(1,g=!!((c=A.status)!=null&&c.isRunning)),t(2,y=A.alreadyRunning?a("sync.inProgress"):a("sync.started")),I()}catch{t(2,y=a("sync.failed")),t(1,g=!1),I()}setTimeout(()=>{g||t(2,y="")},3e3)}function I(){z&&(clearInterval(z),z=null),g&&(z=setInterval(async()=>{await C(),r!=null&&r.isRunning||(t(2,y=(r==null?void 0:r.lastSyncStatus)==="ok"?a("sync.complete"):(r==null?void 0:r.lastSyncError)||a("sync.failed")),setTimeout(()=>{t(2,y="")},5e3))},2e3))}function k(c){return c?new Date(c).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):a("sync.never")}return De(()=>{Je(),C()}),Me(()=>{z&&clearInterval(z)}),s.$$set=c=>{"$$scope"in c&&t(11,w=c.$$scope)},[r,g,y,a,n,o,K,F,S,V,k,w,Y]}class lt extends Be{constructor(e){super(),Le(this,e,$e,Ze,Te,{})}}export{lt as component};
@@ -1 +1 @@
1
- import{s as x,n as u,c as S}from"../chunks/scheduler.Dx1bs0RQ.js";import{S as j,i as q,d as c,s as h,a as _,b as d,c as v,e as g,f as b,g as y,h as E,t as $,j as C}from"../chunks/index.CzqoKkoo.js";import{p as H}from"../chunks/stores.BSF99XdC.js";function P(p){var f;let a,s=p[0].status+"",r,o,n,i=((f=p[0].error)==null?void 0:f.message)+"",m;return{c(){a=E("h1"),r=$(s),o=C(),n=E("p"),m=$(i)},l(e){a=v(e,"H1",{});var t=g(a);r=b(t,s),t.forEach(c),o=y(e),n=v(e,"P",{});var l=g(n);m=b(l,i),l.forEach(c)},m(e,t){_(e,a,t),d(a,r),_(e,o,t),_(e,n,t),d(n,m)},p(e,[t]){var l;t&1&&s!==(s=e[0].status+"")&&h(r,s),t&1&&i!==(i=((l=e[0].error)==null?void 0:l.message)+"")&&h(m,i)},i:u,o:u,d(e){e&&(c(a),c(o),c(n))}}}function k(p,a,s){let r;return S(p,H,o=>s(0,r=o)),[r]}class B extends j{constructor(a){super(),q(this,a,k,P,x,{})}}export{B as component};
1
+ import{s as x,n as u,c as S}from"../chunks/scheduler.Dx1bs0RQ.js";import{S as j,i as q,d as c,s as h,a as _,b as d,c as v,e as g,f as b,g as y,h as E,t as $,j as C}from"../chunks/index.CzqoKkoo.js";import{p as H}from"../chunks/stores.BSVKBbO8.js";function P(p){var f;let a,s=p[0].status+"",r,o,n,i=((f=p[0].error)==null?void 0:f.message)+"",m;return{c(){a=E("h1"),r=$(s),o=C(),n=E("p"),m=$(i)},l(e){a=v(e,"H1",{});var t=g(a);r=b(t,s),t.forEach(c),o=y(e),n=v(e,"P",{});var l=g(n);m=b(l,i),l.forEach(c)},m(e,t){_(e,a,t),d(a,r),_(e,o,t),_(e,n,t),d(n,m)},p(e,[t]){var l;t&1&&s!==(s=e[0].status+"")&&h(r,s),t&1&&i!==(i=((l=e[0].error)==null?void 0:l.message)+"")&&h(m,i)},i:u,o:u,d(e){e&&(c(a),c(o),c(n))}}}function k(p,a,s){let r;return S(p,H,o=>s(0,r=o)),[r]}class B extends j{constructor(a){super(),q(this,a,k,P,x,{})}}export{B as component};
@@ -1 +1 @@
1
- {"version":"1778867024168"}
1
+ {"version":"1778870500301"}
@@ -17,26 +17,26 @@
17
17
  })();
18
18
  </script>
19
19
 
20
- <link rel="modulepreload" href="/_app/immutable/entry/start.DPeK9dzE.js">
21
- <link rel="modulepreload" href="/_app/immutable/chunks/entry.CVLbqi7C.js">
20
+ <link rel="modulepreload" href="/_app/immutable/entry/start.Dg2jUJRH.js">
21
+ <link rel="modulepreload" href="/_app/immutable/chunks/entry.DbT6jbyV.js">
22
22
  <link rel="modulepreload" href="/_app/immutable/chunks/scheduler.Dx1bs0RQ.js">
23
23
  <link rel="modulepreload" href="/_app/immutable/chunks/index.Dm-3G3np.js">
24
- <link rel="modulepreload" href="/_app/immutable/entry/app.Cb4qBU5I.js">
24
+ <link rel="modulepreload" href="/_app/immutable/entry/app.BjD-8RWO.js">
25
25
  <link rel="modulepreload" href="/_app/immutable/chunks/index.CzqoKkoo.js">
26
26
  </head>
27
27
  <body data-sveltekit-preload-data="hover">
28
28
  <div style="display: contents">
29
29
  <script>
30
30
  {
31
- __sveltekit_1qnk8cc = {
31
+ __sveltekit_10d0b1w = {
32
32
  base: ""
33
33
  };
34
34
 
35
35
  const element = document.currentScript.parentElement;
36
36
 
37
37
  Promise.all([
38
- import("/_app/immutable/entry/start.DPeK9dzE.js"),
39
- import("/_app/immutable/entry/app.Cb4qBU5I.js")
38
+ import("/_app/immutable/entry/start.Dg2jUJRH.js"),
39
+ import("/_app/immutable/entry/app.BjD-8RWO.js")
40
40
  ]).then(([kit, app]) => {
41
41
  kit.start(app, element);
42
42
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juliantanx/aiusage",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "description": "Track and analyze AI coding assistant usage across Claude Code, Codex, and more",
6
6
  "main": "./dist/index.js",
@@ -22,7 +22,7 @@
22
22
  "tsup": "^8.0.0",
23
23
  "typescript": "^5.7.0",
24
24
  "vitest": "^3.0.0",
25
- "@aiusage/core": "1.0.1",
25
+ "@aiusage/core": "1.0.2",
26
26
  "@aiusage/web": "0.0.1"
27
27
  },
28
28
  "scripts": {
@@ -1 +0,0 @@
1
- import{a as t}from"../chunks/entry.CVLbqi7C.js";export{t as start};