@lettuceai/crisp 1.2.2 → 1.3.1

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
@@ -3172,6 +3172,7 @@ function hr({ value: e, onChange: t, onSend: n, onStop: r, onContinue: i, onSend
3172
3172
  w && u ? /* @__PURE__ */ U(_r, {
3173
3173
  elapsedMs: u.elapsedMs,
3174
3174
  analyser: u.analyser,
3175
+ level: u.level,
3175
3176
  frozen: u.transcribing
3176
3177
  }) : /* @__PURE__ */ U("textarea", {
3177
3178
  ref: S,
@@ -3254,72 +3255,72 @@ function gr(e) {
3254
3255
  let t = Math.max(0, Math.floor(e / 1e3));
3255
3256
  return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
3256
3257
  }
3257
- function _r({ elapsedMs: e, analyser: t, frozen: n = !1 }) {
3258
- let { strings: r } = q(), i = p(null), a = p(null), o = p([]), s = p(null), [c, u] = m({
3258
+ function _r({ elapsedMs: e, analyser: t, level: n, frozen: r = !1 }) {
3259
+ let { strings: i } = q(), a = p(null), o = p(null), s = p([]), c = p(null), [u, d] = m({
3259
3260
  w: 0,
3260
3261
  h: 0
3261
- });
3262
- return l(() => {
3263
- let e = i.current;
3262
+ }), f = p(n);
3263
+ return f.current = n, l(() => {
3264
+ let e = a.current;
3264
3265
  if (!e) return;
3265
3266
  let t = () => {
3266
3267
  let t = e.getBoundingClientRect();
3267
- u({
3268
+ d({
3268
3269
  w: Math.floor(t.width),
3269
3270
  h: Math.floor(t.height)
3270
3271
  });
3271
3272
  }, n = new ResizeObserver(t);
3272
3273
  return n.observe(e), t(), () => n.disconnect();
3273
3274
  }, []), l(() => {
3274
- o.current = [], s.current = t ? new Uint8Array(new ArrayBuffer(t.fftSize)) : null;
3275
+ s.current = [], c.current = t ? new Uint8Array(new ArrayBuffer(t.fftSize)) : null;
3275
3276
  }, [t]), l(() => {
3276
- let e = a.current;
3277
- if (!e || c.w <= 0) return;
3278
- let r = window.devicePixelRatio || 1, i = c.h || 20;
3279
- e.width = Math.floor(c.w * r), e.height = Math.floor(i * r);
3280
- let l = e.getContext("2d");
3281
- if (!l) return;
3282
- l.scale(r, r);
3283
- let u = getComputedStyle(e).color, d = Math.ceil(c.w / 4) + 4, f = 0, p = 0, m = (e) => {
3284
- if (!n && t && s.current && e - f >= 50) {
3285
- t.getByteTimeDomainData(s.current);
3277
+ let e = o.current;
3278
+ if (!e || u.w <= 0) return;
3279
+ let n = window.devicePixelRatio || 1, i = u.h || 20;
3280
+ e.width = Math.floor(u.w * n), e.height = Math.floor(i * n);
3281
+ let a = e.getContext("2d");
3282
+ if (!a) return;
3283
+ a.scale(n, n);
3284
+ let l = getComputedStyle(e).color, d = Math.ceil(u.w / 4) + 4, p = 0, m = 0, h = (e) => {
3285
+ if (!r && t && c.current && e - p >= 50) {
3286
+ t.getByteTimeDomainData(c.current);
3286
3287
  let n = 0;
3287
- for (let e of s.current) {
3288
+ for (let e of c.current) {
3288
3289
  let t = (e - 128) / 128;
3289
3290
  n += t * t;
3290
3291
  }
3291
- let r = Math.sqrt(n / s.current.length);
3292
- o.current.push(Math.min(1, (r * 18) ** .5)), o.current.length > d && o.current.splice(0, o.current.length - d), f = e;
3293
- }
3294
- l.clearRect(0, 0, c.w, i);
3295
- let r = o.current;
3296
- for (let e = Math.max(0, r.length - d); e < r.length; e++) {
3297
- let t = r.length - 1 - e, n = c.w - 2 - t * 4;
3298
- if (n + 2 < 0) break;
3299
- let a = Math.max(3, r[e] * (i - 2));
3300
- l.globalAlpha = .95 - t / Math.max(1, d - 1) * .35, l.fillStyle = u, l.fillRect(n, i / 2 - a / 2, 2, a);
3292
+ let r = Math.sqrt(n / c.current.length);
3293
+ s.current.push(Math.min(1, (r * 18) ** .5)), s.current.length > d && s.current.splice(0, s.current.length - d), p = e;
3294
+ } else !r && !t && f.current !== void 0 && e - p >= 50 && (s.current.push(Math.min(1, Math.max(0, f.current ** .5))), s.current.length > d && s.current.splice(0, s.current.length - d), p = e);
3295
+ a.clearRect(0, 0, u.w, i);
3296
+ let n = s.current;
3297
+ for (let e = Math.max(0, n.length - d); e < n.length; e++) {
3298
+ let t = n.length - 1 - e, r = u.w - 2 - t * 4;
3299
+ if (r + 2 < 0) break;
3300
+ let o = Math.max(3, n[e] * (i - 2));
3301
+ a.globalAlpha = .95 - t / Math.max(1, d - 1) * .35, a.fillStyle = l, a.fillRect(r, i / 2 - o / 2, 2, o);
3301
3302
  }
3302
- p = window.requestAnimationFrame(m);
3303
+ m = window.requestAnimationFrame(h);
3303
3304
  };
3304
- return p = window.requestAnimationFrame(m), () => window.cancelAnimationFrame(p);
3305
+ return m = window.requestAnimationFrame(h), () => window.cancelAnimationFrame(m);
3305
3306
  }, [
3306
3307
  t,
3307
- c.w,
3308
- c.h,
3309
- n
3308
+ u.w,
3309
+ u.h,
3310
+ r
3310
3311
  ]), /* @__PURE__ */ W("div", {
3311
3312
  className: "flex min-h-[var(--composer-row)] min-w-0 flex-1 items-center gap-2.5 px-2",
3312
3313
  role: "status",
3313
3314
  "aria-live": "polite",
3314
- "aria-label": n ? r.composerTranscribing : r.composerRecording(gr(e)),
3315
+ "aria-label": r ? i.composerTranscribing : i.composerRecording(gr(e)),
3315
3316
  children: [
3316
3317
  /* @__PURE__ */ W("span", {
3317
3318
  className: "relative flex h-2 w-2 shrink-0",
3318
3319
  "aria-hidden": "true",
3319
- children: [!n && /* @__PURE__ */ U("span", { className: "absolute inline-flex h-full w-full animate-ping rounded-full bg-danger opacity-60" }), /* @__PURE__ */ U("span", { className: G("relative inline-flex h-2 w-2 rounded-full", n ? "bg-fg-3" : "bg-danger") })]
3320
+ children: [!r && /* @__PURE__ */ U("span", { className: "absolute inline-flex h-full w-full animate-ping rounded-full bg-danger opacity-60" }), /* @__PURE__ */ U("span", { className: G("relative inline-flex h-2 w-2 rounded-full", r ? "bg-fg-3" : "bg-danger") })]
3320
3321
  }),
3321
3322
  /* @__PURE__ */ W("div", {
3322
- ref: i,
3323
+ ref: a,
3323
3324
  className: "relative h-5 min-w-0 flex-1 overflow-hidden text-fg",
3324
3325
  style: {
3325
3326
  maskImage: "linear-gradient(to right, transparent, black 40px)",
@@ -3329,9 +3330,9 @@ function _r({ elapsedMs: e, analyser: t, frozen: n = !1 }) {
3329
3330
  "aria-hidden": "true",
3330
3331
  className: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-line-2"
3331
3332
  }), /* @__PURE__ */ U("canvas", {
3332
- ref: a,
3333
+ ref: o,
3333
3334
  className: "relative block h-full w-full",
3334
- style: { width: c.w || void 0 }
3335
+ style: { width: u.w || void 0 }
3335
3336
  })]
3336
3337
  }),
3337
3338
  /* @__PURE__ */ U("span", {
@@ -5611,8 +5612,57 @@ var Ki = a(function({ ratio: e = 1, className: t, style: n, ...r }, i) {
5611
5612
  });
5612
5613
  Ki.displayName = "AspectRatio";
5613
5614
  //#endregion
5615
+ //#region src/components/InlineMarkdown.tsx
5616
+ var qi = [
5617
+ "p",
5618
+ "strong",
5619
+ "em",
5620
+ "del",
5621
+ "code",
5622
+ "a",
5623
+ "br",
5624
+ "ul",
5625
+ "ol",
5626
+ "li",
5627
+ "blockquote"
5628
+ ];
5629
+ function Ji(e) {
5630
+ return e.replace(/^( {0,3})#(?=#{0,5}(?:\s|$))/gm, "$1\\#");
5631
+ }
5632
+ var Yi = ({ children: e }) => /* @__PURE__ */ W("span", { children: [e, " "] });
5633
+ function Xi({ children: e, className: t }) {
5634
+ return /* @__PURE__ */ U("span", {
5635
+ className: G(t),
5636
+ children: /* @__PURE__ */ U(Je, {
5637
+ remarkPlugins: [Ye],
5638
+ allowedElements: qi,
5639
+ unwrapDisallowed: !0,
5640
+ components: {
5641
+ p: Yi,
5642
+ ul: Yi,
5643
+ ol: Yi,
5644
+ li: Yi,
5645
+ blockquote: Yi,
5646
+ a: ({ children: e }) => /* @__PURE__ */ U("span", { children: e }),
5647
+ strong: ({ children: e }) => /* @__PURE__ */ U("strong", {
5648
+ className: "font-semibold",
5649
+ children: e
5650
+ }),
5651
+ em: ({ children: e }) => /* @__PURE__ */ U("em", { children: e }),
5652
+ del: ({ children: e }) => /* @__PURE__ */ U("del", { children: e }),
5653
+ code: ({ children: e }) => /* @__PURE__ */ U("code", {
5654
+ className: "rounded bg-fill px-1 font-mono text-[0.9em]",
5655
+ children: e
5656
+ }),
5657
+ br: () => /* @__PURE__ */ U(H, { children: " " })
5658
+ },
5659
+ children: Ji(e)
5660
+ })
5661
+ });
5662
+ }
5663
+ //#endregion
5614
5664
  //#region src/components/Prose.tsx
5615
- function qi({ children: e, size: t = "md", className: n }) {
5665
+ function Zi({ children: e, size: t = "md", className: n }) {
5616
5666
  return /* @__PURE__ */ U("div", {
5617
5667
  className: G(t === "sm" ? "text-sm" : "text-base", "leading-relaxed text-fg", n),
5618
5668
  children: /* @__PURE__ */ U(Je, {
@@ -5705,10 +5755,10 @@ function qi({ children: e, size: t = "md", className: n }) {
5705
5755
  }
5706
5756
  //#endregion
5707
5757
  //#region src/components/Radio.tsx
5708
- var Ji = r(null);
5709
- function Yi({ value: e, onChange: t, disabled: n, orientation: r = "vertical", className: i, children: a, ...o }) {
5758
+ var Qi = r(null);
5759
+ function $i({ value: e, onChange: t, disabled: n, orientation: r = "vertical", className: i, children: a, ...o }) {
5710
5760
  let s = u();
5711
- return /* @__PURE__ */ U(Ji.Provider, {
5761
+ return /* @__PURE__ */ U(Qi.Provider, {
5712
5762
  value: {
5713
5763
  name: s,
5714
5764
  value: e,
@@ -5723,8 +5773,8 @@ function Yi({ value: e, onChange: t, disabled: n, orientation: r = "vertical", c
5723
5773
  })
5724
5774
  });
5725
5775
  }
5726
- function Xi({ value: e, label: t, description: n, disabled: r }) {
5727
- let i = c(Ji);
5776
+ function ea({ value: e, label: t, description: n, disabled: r }) {
5777
+ let i = c(Qi);
5728
5778
  if (!i) throw Error("Radio must be used inside <RadioGroup>");
5729
5779
  let a = i.value === e, o = r || i.disabled;
5730
5780
  return /* @__PURE__ */ W("label", {
@@ -5758,7 +5808,7 @@ function Xi({ value: e, label: t, description: n, disabled: r }) {
5758
5808
  }
5759
5809
  //#endregion
5760
5810
  //#region src/components/Resizable.tsx
5761
- function Zi({ panel: e, children: t, side: n = "left", defaultSize: r = 320, minSize: i = 200, maxSize: a = 640, storageKey: o, className: c }) {
5811
+ function ta({ panel: e, children: t, side: n = "left", defaultSize: r = 320, minSize: i = 200, maxSize: a = 640, storageKey: o, className: c }) {
5762
5812
  let { strings: u } = q(), [d, f] = m(() => {
5763
5813
  if (!o || typeof localStorage > "u") return r;
5764
5814
  try {
@@ -5823,7 +5873,7 @@ function Zi({ panel: e, children: t, side: n = "left", defaultSize: r = 320, min
5823
5873
  }
5824
5874
  //#endregion
5825
5875
  //#region src/components/SearchField.tsx
5826
- var Qi = a(function({ value: e, onChange: t, loading: n, shortcut: r, size: i = "md", placeholder: a, className: o, ...s }, c) {
5876
+ var na = a(function({ value: e, onChange: t, loading: n, shortcut: r, size: i = "md", placeholder: a, className: o, ...s }, c) {
5827
5877
  let { strings: l } = q(), u = p(null);
5828
5878
  return /* @__PURE__ */ W("div", {
5829
5879
  className: "relative",
@@ -5864,10 +5914,10 @@ var Qi = a(function({ value: e, onChange: t, loading: n, shortcut: r, size: i =
5864
5914
  ]
5865
5915
  });
5866
5916
  });
5867
- Qi.displayName = "SearchField";
5917
+ na.displayName = "SearchField";
5868
5918
  //#endregion
5869
5919
  //#region src/components/Segmented.tsx
5870
- function $i({ options: e, value: t, onChange: n, size: r = "md", block: i, className: a, ...o }) {
5920
+ function ra({ options: e, value: t, onChange: n, size: r = "md", block: i, className: a, ...o }) {
5871
5921
  let s = u();
5872
5922
  return /* @__PURE__ */ U("div", {
5873
5923
  role: "radiogroup",
@@ -5906,7 +5956,7 @@ function $i({ options: e, value: t, onChange: n, size: r = "md", block: i, class
5906
5956
  }
5907
5957
  //#endregion
5908
5958
  //#region src/components/Select.tsx
5909
- var ea = a(function({ options: e, placeholder: t, className: n, id: r, value: i, defaultValue: a, ...o }, s) {
5959
+ var ia = a(function({ options: e, placeholder: t, className: n, id: r, value: i, defaultValue: a, ...o }, s) {
5910
5960
  let c = Y(), l = (i ?? a ?? "") === "";
5911
5961
  return /* @__PURE__ */ W("div", {
5912
5962
  className: "relative",
@@ -5935,10 +5985,10 @@ var ea = a(function({ options: e, placeholder: t, className: n, id: r, value: i,
5935
5985
  })]
5936
5986
  });
5937
5987
  });
5938
- ea.displayName = "Select";
5988
+ ia.displayName = "Select";
5939
5989
  //#endregion
5940
5990
  //#region src/components/SelectMenu.tsx
5941
- function ta(e) {
5991
+ function aa(e) {
5942
5992
  let { strings: t } = q(), { options: n, placeholder: r, triggerIcon: i = !0, disabled: a, id: o, className: c, menuClassName: d } = e, h = e.multiple === !0, g = Y(), _ = u(), [v, y] = m(!1), [b, x] = m(0), S = p(null), C = p({
5943
5993
  query: "",
5944
5994
  at: 0
@@ -6108,7 +6158,7 @@ function ta(e) {
6108
6158
  }
6109
6159
  //#endregion
6110
6160
  //#region src/components/Slider.tsx
6111
- var na = a(function({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, showValue: a, className: o, id: s, style: c, ...l }, u) {
6161
+ var oa = a(function({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, showValue: a, className: o, id: s, style: c, ...l }, u) {
6112
6162
  let d = Y(), f = (e - n) / (r - n) * 100, p = typeof a == "function" ? a(e) : a ? String(e) : null;
6113
6163
  return /* @__PURE__ */ W("div", {
6114
6164
  className: G("flex items-center gap-3", o),
@@ -6134,10 +6184,10 @@ var na = a(function({ value: e, onChange: t, min: n = 0, max: r = 100, step: i =
6134
6184
  })]
6135
6185
  });
6136
6186
  });
6137
- na.displayName = "Slider";
6187
+ oa.displayName = "Slider";
6138
6188
  //#endregion
6139
6189
  //#region src/components/StatTile.tsx
6140
- function ra({ label: e, value: t, sub: n, trend: r, goodDirection: i = "up", icon: a, highlight: o, className: s }) {
6190
+ function sa({ label: e, value: t, sub: n, trend: r, goodDirection: i = "up", icon: a, highlight: o, className: s }) {
6141
6191
  let c = r ? r.direction === i : void 0;
6142
6192
  return /* @__PURE__ */ W("div", {
6143
6193
  className: G("rounded-xl border px-3.5 py-3", o ? "border-accent/30 bg-accent/8" : "border-line bg-surface-1", s),
@@ -6173,7 +6223,7 @@ function ra({ label: e, value: t, sub: n, trend: r, goodDirection: i = "up", ico
6173
6223
  ]
6174
6224
  });
6175
6225
  }
6176
- function ia({ items: e, layout: t = "inline", className: n }) {
6226
+ function ca({ items: e, layout: t = "inline", className: n }) {
6177
6227
  return /* @__PURE__ */ U("dl", {
6178
6228
  className: G("divide-y divide-line", n),
6179
6229
  children: e.map((e, n) => /* @__PURE__ */ W("div", {
@@ -6190,7 +6240,7 @@ function ia({ items: e, layout: t = "inline", className: n }) {
6190
6240
  }
6191
6241
  //#endregion
6192
6242
  //#region src/components/Stepper.tsx
6193
- function aa({ steps: e, current: t, onStepClick: n, variant: r = "bar", className: i }) {
6243
+ function la({ steps: e, current: t, onStepClick: n, variant: r = "bar", className: i }) {
6194
6244
  let { strings: a } = q(), o = Math.max(0, Math.min(t, e.length - 1));
6195
6245
  return r === "dots" ? /* @__PURE__ */ U("div", {
6196
6246
  className: G("flex items-center gap-1.5", i),
@@ -6260,7 +6310,7 @@ function aa({ steps: e, current: t, onStepClick: n, variant: r = "bar", classNam
6260
6310
  }
6261
6311
  //#endregion
6262
6312
  //#region src/components/Switch.tsx
6263
- function oa({ checked: e, onChange: t, disabled: n, id: r, className: i, ...a }) {
6313
+ function ua({ checked: e, onChange: t, disabled: n, id: r, className: i, ...a }) {
6264
6314
  let o = Y();
6265
6315
  return /* @__PURE__ */ U("button", {
6266
6316
  type: "button",
@@ -6283,7 +6333,7 @@ function oa({ checked: e, onChange: t, disabled: n, id: r, className: i, ...a })
6283
6333
  }
6284
6334
  //#endregion
6285
6335
  //#region src/components/Table.tsx
6286
- function sa({ columns: e, rows: t, rowKey: n, sort: r, onSortChange: i, onRowClick: a, empty: o, caption: s, className: c }) {
6336
+ function da({ columns: e, rows: t, rowKey: n, sort: r, onSortChange: i, onRowClick: a, empty: o, caption: s, className: c }) {
6287
6337
  let { strings: l } = q(), u = (e) => {
6288
6338
  i && i({
6289
6339
  key: e,
@@ -6344,15 +6394,15 @@ function sa({ columns: e, rows: t, rowKey: n, sort: r, onSortChange: i, onRowCli
6344
6394
  }
6345
6395
  //#endregion
6346
6396
  //#region src/components/Tabs.tsx
6347
- var ca = r(null);
6348
- function la() {
6349
- let e = c(ca);
6397
+ var fa = r(null);
6398
+ function pa() {
6399
+ let e = c(fa);
6350
6400
  if (!e) throw Error("Tabs parts must be used inside <Tabs>");
6351
6401
  return e;
6352
6402
  }
6353
- function ua({ value: e, onChange: t, className: n, children: r }) {
6403
+ function ma({ value: e, onChange: t, className: n, children: r }) {
6354
6404
  let i = u();
6355
- return /* @__PURE__ */ U(ca.Provider, {
6405
+ return /* @__PURE__ */ U(fa.Provider, {
6356
6406
  value: {
6357
6407
  value: e,
6358
6408
  onChange: t,
@@ -6364,7 +6414,7 @@ function ua({ value: e, onChange: t, className: n, children: r }) {
6364
6414
  })
6365
6415
  });
6366
6416
  }
6367
- function da({ children: e, className: t, "aria-label": n }) {
6417
+ function ha({ children: e, className: t, "aria-label": n }) {
6368
6418
  return /* @__PURE__ */ U("div", {
6369
6419
  role: "tablist",
6370
6420
  "aria-label": n,
@@ -6381,8 +6431,8 @@ function da({ children: e, className: t, "aria-label": n }) {
6381
6431
  children: e
6382
6432
  });
6383
6433
  }
6384
- function fa({ value: e, icon: t, count: n, children: r }) {
6385
- let i = la(), a = i.value === e;
6434
+ function ga({ value: e, icon: t, count: n, children: r }) {
6435
+ let i = pa(), a = i.value === e;
6386
6436
  return /* @__PURE__ */ W("button", {
6387
6437
  type: "button",
6388
6438
  role: "tab",
@@ -6407,8 +6457,8 @@ function fa({ value: e, icon: t, count: n, children: r }) {
6407
6457
  ]
6408
6458
  });
6409
6459
  }
6410
- function pa({ value: e, className: t, children: n }) {
6411
- let r = la();
6460
+ function _a({ value: e, className: t, children: n }) {
6461
+ let r = pa();
6412
6462
  return r.value === e ? /* @__PURE__ */ U("div", {
6413
6463
  role: "tabpanel",
6414
6464
  id: `${r.id}-panel-${e}`,
@@ -6420,7 +6470,7 @@ function pa({ value: e, className: t, children: n }) {
6420
6470
  }
6421
6471
  //#endregion
6422
6472
  //#region src/components/TagInput.tsx
6423
- function ma({ value: e, onChange: t, placeholder: n, max: r, separators: i = [","], disabled: a, id: o, className: s }) {
6473
+ function va({ value: e, onChange: t, placeholder: n, max: r, separators: i = [","], disabled: a, id: o, className: s }) {
6424
6474
  let { strings: c } = q(), l = Y(), u = p(null), [d, f] = m(""), h = (n) => {
6425
6475
  let i = n.trim();
6426
6476
  if (!i || e.includes(i)) return f("");
@@ -6462,7 +6512,7 @@ function ma({ value: e, onChange: t, placeholder: n, max: r, separators: i = [",
6462
6512
  }
6463
6513
  //#endregion
6464
6514
  //#region src/components/Text.tsx
6465
- var ha = {
6515
+ var ya = {
6466
6516
  hero: "text-5xl font-bold leading-[1.05] tracking-[-0.03em] text-fg @3xl:text-6xl",
6467
6517
  display: "text-4xl font-bold leading-[1.1] tracking-tight text-fg",
6468
6518
  page: "text-3xl font-bold tracking-tight text-fg",
@@ -6473,7 +6523,7 @@ var ha = {
6473
6523
  label: "text-sm font-medium text-fg-2",
6474
6524
  hint: "text-sm text-fg-3",
6475
6525
  caption: "text-2xs text-fg-3"
6476
- }, ga = {
6526
+ }, ba = {
6477
6527
  hero: "h1",
6478
6528
  display: "h1",
6479
6529
  page: "h1",
@@ -6485,15 +6535,15 @@ var ha = {
6485
6535
  hint: "p",
6486
6536
  caption: "span"
6487
6537
  };
6488
- function _a({ variant: e = "body", as: t, className: n, ...r }) {
6489
- return i(t ?? ga[e], {
6490
- className: G(ha[e], n),
6538
+ function xa({ variant: e = "body", as: t, className: n, ...r }) {
6539
+ return i(t ?? ba[e], {
6540
+ className: G(ya[e], n),
6491
6541
  ...r
6492
6542
  });
6493
6543
  }
6494
6544
  //#endregion
6495
6545
  //#region src/lib/color.ts
6496
- function va(e) {
6546
+ function Sa(e) {
6497
6547
  let t = e.trim().replace(/^#/, ""), n = t.length === 3 ? t.split("").map((e) => e + e).join("") : t;
6498
6548
  return /^[0-9a-f]{6}$/i.test(n) ? {
6499
6549
  r: parseInt(n.slice(0, 2), 16),
@@ -6501,16 +6551,16 @@ function va(e) {
6501
6551
  b: parseInt(n.slice(4, 6), 16)
6502
6552
  } : null;
6503
6553
  }
6504
- function ya(e) {
6505
- let t = va(e);
6554
+ function Ca(e) {
6555
+ let t = Sa(e);
6506
6556
  return t ? `#${[
6507
6557
  t.r,
6508
6558
  t.g,
6509
6559
  t.b
6510
6560
  ].map((e) => e.toString(16).padStart(2, "0")).join("")}` : null;
6511
6561
  }
6512
- function ba(e) {
6513
- let t = va(e);
6562
+ function wa(e) {
6563
+ let t = Sa(e);
6514
6564
  if (!t) return 0;
6515
6565
  let n = (e) => {
6516
6566
  let t = e / 255;
@@ -6518,18 +6568,18 @@ function ba(e) {
6518
6568
  };
6519
6569
  return .2126 * n(t.r) + .7152 * n(t.g) + .0722 * n(t.b);
6520
6570
  }
6521
- function xa(e, t) {
6522
- let n = ba(e), r = ba(t);
6571
+ function Ta(e, t) {
6572
+ let n = wa(e), r = wa(t);
6523
6573
  return (Math.max(n, r) + .05) / (Math.min(n, r) + .05);
6524
6574
  }
6525
- function Sa(e) {
6526
- return ba(e) > .4;
6575
+ function Ea(e) {
6576
+ return wa(e) > .4;
6527
6577
  }
6528
- function Ca(e) {
6529
- return xa(e, "#ffffff") >= xa(e, "#000000") ? "#ffffff" : "#0a0a0a";
6578
+ function Da(e) {
6579
+ return Ta(e, "#ffffff") >= Ta(e, "#000000") ? "#ffffff" : "#0a0a0a";
6530
6580
  }
6531
- function wa(e, t, n) {
6532
- let r = va(e), i = va(t);
6581
+ function Oa(e, t, n) {
6582
+ let r = Sa(e), i = Sa(t);
6533
6583
  if (!r || !i) return e;
6534
6584
  let a = Math.min(1, Math.max(0, n)), o = (e, t) => Math.round(e + (t - e) * a);
6535
6585
  return `#${[
@@ -6540,7 +6590,7 @@ function wa(e, t, n) {
6540
6590
  }
6541
6591
  //#endregion
6542
6592
  //#region src/theme/theme.ts
6543
- var Ta = {
6593
+ var ka = {
6544
6594
  sharp: {
6545
6595
  sm: "2px",
6546
6596
  md: "3px",
@@ -6562,21 +6612,21 @@ var Ta = {
6562
6612
  xl: "18px",
6563
6613
  "2xl": "24px"
6564
6614
  }
6565
- }, Ea = {
6615
+ }, Aa = {
6566
6616
  fg2: 72,
6567
6617
  fg3: 50,
6568
6618
  fg4: 34
6569
- }, Da = {
6619
+ }, ja = {
6570
6620
  fill: 5,
6571
6621
  fill2: 8,
6572
6622
  fill3: 12
6573
- }, Oa = {
6623
+ }, Ma = {
6574
6624
  line: 10,
6575
6625
  line2: 16,
6576
6626
  line3: 26
6577
6627
  };
6578
- function ka(e) {
6579
- let { surface: t, fg: n, accent: r, danger: i, warning: a, info: o, secondary: s, nav: c } = e.colors, l = Sa(t), u = l ? wa(t, "#ffffff", .6) : wa(t, "#ffffff", .075), d = l ? "#ffffff" : wa(t, "#ffffff", .13), f = l ? .12 : .45, p = (e, t) => `color-mix(in oklab, ${e} ${t}%, transparent)`;
6628
+ function Na(e) {
6629
+ let { surface: t, fg: n, accent: r, danger: i, warning: a, info: o, secondary: s, nav: c } = e.colors, l = Ea(t), u = l ? Oa(t, "#ffffff", .6) : Oa(t, "#ffffff", .075), d = l ? "#ffffff" : Oa(t, "#ffffff", .13), f = l ? .12 : .45, p = (e, t) => `color-mix(in oklab, ${e} ${t}%, transparent)`;
6580
6630
  return {
6581
6631
  "--color-surface": t,
6582
6632
  "--color-surface-1": u,
@@ -6584,36 +6634,36 @@ function ka(e) {
6584
6634
  "--color-surface-el": u,
6585
6635
  "--color-nav": c ?? u,
6586
6636
  "--color-fg": n,
6587
- "--color-fg-2": p(n, Ea.fg2),
6588
- "--color-fg-3": p(n, Ea.fg3),
6589
- "--color-fg-4": p(n, Ea.fg4),
6590
- "--color-fill": p(n, Da.fill),
6591
- "--color-fill-2": p(n, Da.fill2),
6592
- "--color-fill-3": p(n, Da.fill3),
6593
- "--color-line": p(n, Oa.line),
6594
- "--color-line-2": p(n, Oa.line2),
6595
- "--color-line-3": p(n, Oa.line3),
6637
+ "--color-fg-2": p(n, Aa.fg2),
6638
+ "--color-fg-3": p(n, Aa.fg3),
6639
+ "--color-fg-4": p(n, Aa.fg4),
6640
+ "--color-fill": p(n, ja.fill),
6641
+ "--color-fill-2": p(n, ja.fill2),
6642
+ "--color-fill-3": p(n, ja.fill3),
6643
+ "--color-line": p(n, Ma.line),
6644
+ "--color-line-2": p(n, Ma.line2),
6645
+ "--color-line-3": p(n, Ma.line3),
6596
6646
  "--color-accent": r,
6597
6647
  "--color-danger": i,
6598
6648
  "--color-warning": a,
6599
6649
  "--color-info": o,
6600
6650
  "--color-secondary": s,
6601
- "--color-on-accent": Ca(r),
6651
+ "--color-on-accent": Da(r),
6602
6652
  "--color-knob": l ? "#ffffff" : n,
6603
6653
  "--edge-light": l ? "rgb(255 255 255 / 0.9)" : "rgb(255 255 255 / 0.08)",
6604
6654
  "--edge-dark": l ? "rgb(0 0 0 / 0.16)" : "rgb(0 0 0 / 0.55)",
6605
6655
  "--edge-ambient": l ? "rgb(0 0 0 / 0.08)" : "rgb(0 0 0 / 0.35)",
6606
6656
  "--shadow-raised": `0 8px 24px rgb(0 0 0 / ${f})`,
6607
6657
  "--shadow-sheet": `0 -12px 40px rgb(0 0 0 / ${f + .1})`,
6608
- ...Object.fromEntries(Object.entries(Ta[e.radius ?? "default"]).map(([e, t]) => [`--radius-${e}`, t]))
6658
+ ...Object.fromEntries(Object.entries(ka[e.radius ?? "default"]).map(([e, t]) => [`--radius-${e}`, t]))
6609
6659
  };
6610
6660
  }
6611
- function Aa(e, t = document.documentElement) {
6612
- let n = ka(e);
6661
+ function Pa(e, t = document.documentElement) {
6662
+ let n = Na(e);
6613
6663
  for (let [e, r] of Object.entries(n)) t.style.setProperty(e, r);
6614
- t.style.colorScheme = Sa(e.colors.surface) ? "light" : "dark", t.dataset.theme = Sa(e.colors.surface) ? "light" : "dark", t.dataset.density = e.density ?? "default";
6664
+ t.style.colorScheme = Ea(e.colors.surface) ? "light" : "dark", t.dataset.theme = Ea(e.colors.surface) ? "light" : "dark", t.dataset.density = e.density ?? "default";
6615
6665
  }
6616
- var ja = [
6666
+ var Fa = [
6617
6667
  {
6618
6668
  id: "midnight",
6619
6669
  name: "Midnight",
@@ -6692,29 +6742,29 @@ var ja = [
6692
6742
  secondary: "#e879f9"
6693
6743
  }
6694
6744
  }
6695
- ], Ma = ja[0], Na = "crisp.theme", Pa = r(null);
6696
- function Fa() {
6697
- let e = c(Pa);
6745
+ ], Ia = Fa[0], La = "crisp.theme", Ra = r(null);
6746
+ function za() {
6747
+ let e = c(Ra);
6698
6748
  if (!e) throw Error("useTheme must be used inside <ThemeProvider>");
6699
6749
  return e;
6700
6750
  }
6701
- function Ia() {
6702
- if (typeof localStorage > "u") return Ma;
6751
+ function Ba() {
6752
+ if (typeof localStorage > "u") return Ia;
6703
6753
  try {
6704
- let e = localStorage.getItem(Na);
6705
- if (!e) return Ma;
6754
+ let e = localStorage.getItem(La);
6755
+ if (!e) return Ia;
6706
6756
  let t = JSON.parse(e);
6707
- return !t?.colors?.surface || !t.colors.fg ? Ma : t;
6757
+ return !t?.colors?.surface || !t.colors.fg ? Ia : t;
6708
6758
  } catch {
6709
- return Ma;
6759
+ return Ia;
6710
6760
  }
6711
6761
  }
6712
- function La({ children: e, initial: t }) {
6713
- let [n, r] = m(() => t ?? Ia());
6714
- m(() => (typeof document < "u" && Aa(t ?? Ia()), null)), l(() => {
6715
- Aa(n);
6762
+ function Va({ children: e, initial: t }) {
6763
+ let [n, r] = m(() => t ?? Ba());
6764
+ m(() => (typeof document < "u" && Pa(t ?? Ba()), null)), l(() => {
6765
+ Pa(n);
6716
6766
  try {
6717
- localStorage.setItem(Na, JSON.stringify(n));
6767
+ localStorage.setItem(La, JSON.stringify(n));
6718
6768
  } catch {}
6719
6769
  }, [n]);
6720
6770
  let i = s((e, t) => {
@@ -6739,12 +6789,12 @@ function La({ children: e, initial: t }) {
6739
6789
  }));
6740
6790
  }, []), c = f(() => ({
6741
6791
  theme: n,
6742
- presets: ja,
6792
+ presets: Fa,
6743
6793
  setTheme: r,
6744
6794
  setColor: i,
6745
6795
  setRadius: a,
6746
6796
  setDensity: o,
6747
- reset: () => r(Ma),
6797
+ reset: () => r(Ia),
6748
6798
  isCustom: n.id === "custom"
6749
6799
  }), [
6750
6800
  n,
@@ -6752,14 +6802,14 @@ function La({ children: e, initial: t }) {
6752
6802
  a,
6753
6803
  o
6754
6804
  ]);
6755
- return /* @__PURE__ */ U(Pa.Provider, {
6805
+ return /* @__PURE__ */ U(Ra.Provider, {
6756
6806
  value: c,
6757
6807
  children: e
6758
6808
  });
6759
6809
  }
6760
6810
  //#endregion
6761
6811
  //#region src/components/ThemeEditor.tsx
6762
- var Ra = (e) => [
6812
+ var Ha = (e) => [
6763
6813
  {
6764
6814
  key: "surface",
6765
6815
  label: e.themeEditorSurface,
@@ -6795,7 +6845,7 @@ var Ra = (e) => [
6795
6845
  label: e.themeEditorSecondary,
6796
6846
  hint: e.themeEditorSecondaryHint
6797
6847
  }
6798
- ], za = [
6848
+ ], Ua = [
6799
6849
  {
6800
6850
  var: "--color-surface-1",
6801
6851
  label: "surface-1"
@@ -6845,7 +6895,7 @@ var Ra = (e) => [
6845
6895
  label: "on-accent"
6846
6896
  }
6847
6897
  ];
6848
- function Ba({ ratio: e, need: t = 4.5, label: n }) {
6898
+ function Wa({ ratio: e, need: t = 4.5, label: n }) {
6849
6899
  let { strings: r } = q(), i = e >= t;
6850
6900
  return /* @__PURE__ */ U(Nt, {
6851
6901
  content: r.themeEditorContrast(n, e.toFixed(2), t),
@@ -6860,13 +6910,13 @@ function Ba({ ratio: e, need: t = 4.5, label: n }) {
6860
6910
  })
6861
6911
  });
6862
6912
  }
6863
- function Va({ className: e }) {
6864
- let { strings: t } = q(), { theme: n, presets: r, setTheme: i, setColor: a, setRadius: o, setDensity: s, reset: c, isCustom: l } = Fa(), { surface: u, fg: d, accent: p } = n.colors, m = f(() => {
6865
- let e = xa(d, u);
6913
+ function Ga({ className: e }) {
6914
+ let { strings: t } = q(), { theme: n, presets: r, setTheme: i, setColor: a, setRadius: o, setDensity: s, reset: c, isCustom: l } = za(), { surface: u, fg: d, accent: p } = n.colors, m = f(() => {
6915
+ let e = Ta(d, u);
6866
6916
  return {
6867
6917
  body: e,
6868
6918
  muted: (e + 1) / 2,
6869
- accent: xa(p, u)
6919
+ accent: Ta(p, u)
6870
6920
  };
6871
6921
  }, [
6872
6922
  d,
@@ -6879,7 +6929,7 @@ function Va({ className: e }) {
6879
6929
  /* @__PURE__ */ W("div", {
6880
6930
  className: "flex flex-wrap items-center gap-2",
6881
6931
  children: [
6882
- /* @__PURE__ */ U($i, {
6932
+ /* @__PURE__ */ U(ra, {
6883
6933
  "aria-label": t.themeEditorPreset,
6884
6934
  size: "sm",
6885
6935
  value: l ? "custom" : n.id,
@@ -6896,7 +6946,7 @@ function Va({ className: e }) {
6896
6946
  }] : []]
6897
6947
  }),
6898
6948
  /* @__PURE__ */ U("span", { className: "flex-1" }),
6899
- /* @__PURE__ */ U($i, {
6949
+ /* @__PURE__ */ U(ra, {
6900
6950
  "aria-label": t.themeEditorDensity,
6901
6951
  size: "sm",
6902
6952
  value: n.density ?? "default",
@@ -6909,7 +6959,7 @@ function Va({ className: e }) {
6909
6959
  label: t.themeEditorDensityCompact
6910
6960
  }]
6911
6961
  }),
6912
- /* @__PURE__ */ U($i, {
6962
+ /* @__PURE__ */ U(ra, {
6913
6963
  "aria-label": t.themeEditorRadius,
6914
6964
  size: "sm",
6915
6965
  value: n.radius ?? "default",
@@ -6940,7 +6990,7 @@ function Va({ className: e }) {
6940
6990
  }),
6941
6991
  /* @__PURE__ */ U("div", {
6942
6992
  className: "grid gap-3 sm:grid-cols-2 lg:grid-cols-3",
6943
- children: Ra(t).map((e) => /* @__PURE__ */ W("div", {
6993
+ children: Ha(t).map((e) => /* @__PURE__ */ W("div", {
6944
6994
  className: "space-y-1.5",
6945
6995
  children: [
6946
6996
  /* @__PURE__ */ W("div", {
@@ -6968,16 +7018,16 @@ function Va({ className: e }) {
6968
7018
  /* @__PURE__ */ W("div", {
6969
7019
  className: "flex flex-wrap items-center gap-2",
6970
7020
  children: [
6971
- /* @__PURE__ */ U(Ba, {
7021
+ /* @__PURE__ */ U(Wa, {
6972
7022
  ratio: m.body,
6973
7023
  label: t.themeEditorBody
6974
7024
  }),
6975
- /* @__PURE__ */ U(Ba, {
7025
+ /* @__PURE__ */ U(Wa, {
6976
7026
  ratio: m.muted,
6977
7027
  need: 4.5,
6978
7028
  label: t.themeEditorMuted
6979
7029
  }),
6980
- /* @__PURE__ */ U(Ba, {
7030
+ /* @__PURE__ */ U(Wa, {
6981
7031
  ratio: m.accent,
6982
7032
  need: 3,
6983
7033
  label: t.themeEditorAccent
@@ -6997,7 +7047,7 @@ function Va({ className: e }) {
6997
7047
  }),
6998
7048
  /* @__PURE__ */ U("div", {
6999
7049
  className: "flex flex-wrap gap-2 pt-1",
7000
- children: za.map((e) => /* @__PURE__ */ W("div", {
7050
+ children: Ua.map((e) => /* @__PURE__ */ W("div", {
7001
7051
  className: "flex items-center gap-2 rounded-lg border border-line bg-fill px-2 py-1.5",
7002
7052
  children: [/* @__PURE__ */ U("span", {
7003
7053
  className: "h-5 w-5 shrink-0 rounded-md ring-1 ring-inset ring-line-2",
@@ -7015,7 +7065,7 @@ function Va({ className: e }) {
7015
7065
  }
7016
7066
  //#endregion
7017
7067
  //#region src/components/Timeline.tsx
7018
- var Ha = {
7068
+ var Ka = {
7019
7069
  neutral: "border-line-3 bg-fill-2 text-fg-3",
7020
7070
  accent: "border-accent/45 bg-accent/18 text-accent",
7021
7071
  info: "border-info/40 bg-info/15 text-info",
@@ -7023,7 +7073,7 @@ var Ha = {
7023
7073
  danger: "border-danger/40 bg-danger/15 text-danger",
7024
7074
  secondary: "border-secondary/40 bg-secondary/15 text-secondary"
7025
7075
  };
7026
- function Ua({ items: e, className: t }) {
7076
+ function qa({ items: e, className: t }) {
7027
7077
  return /* @__PURE__ */ U("ol", {
7028
7078
  className: G("relative", t),
7029
7079
  children: e.map((t, n) => /* @__PURE__ */ W("li", {
@@ -7034,7 +7084,7 @@ function Ua({ items: e, className: t }) {
7034
7084
  className: "absolute left-3.5 top-8 h-[calc(100%-2rem)] w-px bg-line"
7035
7085
  }),
7036
7086
  /* @__PURE__ */ W("span", {
7037
- className: G("relative z-10 flex h-7 w-7 shrink-0 items-center justify-center rounded-full border", Ha[t.tone ?? "neutral"]),
7087
+ className: G("relative z-10 flex h-7 w-7 shrink-0 items-center justify-center rounded-full border", Ka[t.tone ?? "neutral"]),
7038
7088
  children: [t.active && /* @__PURE__ */ U("span", {
7039
7089
  "aria-hidden": "true",
7040
7090
  className: "absolute inset-0 animate-ping rounded-full bg-current opacity-25 motion-reduce:hidden"
@@ -7062,7 +7112,7 @@ function Ua({ items: e, className: t }) {
7062
7112
  }
7063
7113
  //#endregion
7064
7114
  //#region src/components/TitleBar.tsx
7065
- function Wa({ title: e, platform: t = "linux", onMinimize: n, onMaximize: r, onClose: i, children: a, className: o }) {
7115
+ function Ja({ title: e, platform: t = "linux", onMinimize: n, onMaximize: r, onClose: i, children: a, className: o }) {
7066
7116
  let { strings: s } = q(), c = t === "macos";
7067
7117
  return /* @__PURE__ */ W("div", {
7068
7118
  "data-tauri-drag-region": !0,
@@ -7108,7 +7158,7 @@ function Wa({ title: e, platform: t = "linux", onMinimize: n, onMaximize: r, onC
7108
7158
  }
7109
7159
  //#endregion
7110
7160
  //#region src/components/Toast.tsx
7111
- var Ga = {
7161
+ var Ya = {
7112
7162
  info: /* @__PURE__ */ U(ue, {
7113
7163
  size: 16,
7114
7164
  className: "text-info"
@@ -7125,24 +7175,24 @@ var Ga = {
7125
7175
  size: 16,
7126
7176
  className: "text-danger"
7127
7177
  })
7128
- }, Ka = {
7178
+ }, Xa = {
7129
7179
  info: "bg-info",
7130
7180
  success: "bg-accent",
7131
7181
  warning: "bg-warning",
7132
7182
  error: "bg-danger"
7133
- }, qa = "pointer-events-auto relative flex w-full items-start gap-3 overflow-hidden rounded-xl border border-line bg-surface-2 py-3 pl-4 pr-3 shadow-raised";
7134
- function Ja({ tone: e, title: t, description: n, action: r, secondary: i, onDismiss: a }) {
7183
+ }, Za = "pointer-events-auto relative flex w-full items-start gap-3 overflow-hidden rounded-xl border border-line bg-surface-2 py-3 pl-4 pr-3 shadow-raised";
7184
+ function Qa({ tone: e, title: t, description: n, action: r, secondary: i, onDismiss: a }) {
7135
7185
  let { strings: o } = q(), s = (e) => (t) => {
7136
7186
  t.preventDefault(), t.stopPropagation(), e(), a();
7137
7187
  };
7138
7188
  return /* @__PURE__ */ W(H, { children: [
7139
7189
  /* @__PURE__ */ U("span", {
7140
7190
  "aria-hidden": "true",
7141
- className: G("absolute inset-y-0 left-0 w-0.5", Ka[e])
7191
+ className: G("absolute inset-y-0 left-0 w-0.5", Xa[e])
7142
7192
  }),
7143
7193
  /* @__PURE__ */ U("span", {
7144
7194
  className: "mt-0.5 shrink-0",
7145
- children: Ga[e]
7195
+ children: Ya[e]
7146
7196
  }),
7147
7197
  /* @__PURE__ */ W("div", {
7148
7198
  className: "min-w-0 flex-1",
@@ -7185,10 +7235,10 @@ function Ja({ tone: e, title: t, description: n, action: r, secondary: i, onDism
7185
7235
  })
7186
7236
  ] });
7187
7237
  }
7188
- function Ya(e, t, n, r) {
7238
+ function $a(e, t, n, r) {
7189
7239
  return Ze.custom((i) => /* @__PURE__ */ U("div", {
7190
- className: qa,
7191
- children: /* @__PURE__ */ U(Ja, {
7240
+ className: Za,
7241
+ children: /* @__PURE__ */ U(Qa, {
7192
7242
  tone: e,
7193
7243
  title: t,
7194
7244
  description: n,
@@ -7201,10 +7251,10 @@ function Ya(e, t, n, r) {
7201
7251
  id: r?.id
7202
7252
  });
7203
7253
  }
7204
- function Xa({ id: e, title: t, description: n, progress: r, duration: i }) {
7254
+ function eo({ id: e, title: t, description: n, progress: r, duration: i }) {
7205
7255
  let a = r === void 0 ? void 0 : Math.round(Math.min(1, Math.max(0, r)) * 100);
7206
7256
  return Ze.custom(() => /* @__PURE__ */ W("div", {
7207
- className: G(qa, "items-center"),
7257
+ className: G(Za, "items-center"),
7208
7258
  children: [
7209
7259
  /* @__PURE__ */ U("span", {
7210
7260
  "aria-hidden": "true",
@@ -7253,16 +7303,16 @@ function Xa({ id: e, title: t, description: n, progress: r, duration: i }) {
7253
7303
  id: e
7254
7304
  });
7255
7305
  }
7256
- var Za = {
7257
- info: (e, t, n) => Ya("info", e, t, n),
7258
- success: (e, t, n) => Ya("success", e, t, n),
7259
- warning: (e, t, n) => Ya("warning", e, t, n),
7260
- error: (e, t, n) => Ya("error", e, t, n),
7261
- progress: Xa,
7306
+ var to = {
7307
+ info: (e, t, n) => $a("info", e, t, n),
7308
+ success: (e, t, n) => $a("success", e, t, n),
7309
+ warning: (e, t, n) => $a("warning", e, t, n),
7310
+ error: (e, t, n) => $a("error", e, t, n),
7311
+ progress: eo,
7262
7312
  dismiss: (e) => Ze.dismiss(e),
7263
7313
  isVisible: (e) => Ze.getToasts().some((t) => t.id === e)
7264
7314
  };
7265
- function Qa({ position: e = "bottom-center", bottomInset: t = 0 } = {}) {
7315
+ function no({ position: e = "bottom-center", bottomInset: t = 0 } = {}) {
7266
7316
  return /* @__PURE__ */ U(Xe, {
7267
7317
  position: e,
7268
7318
  gap: 8,
@@ -7283,7 +7333,7 @@ function Qa({ position: e = "bottom-center", bottomInset: t = 0 } = {}) {
7283
7333
  }
7284
7334
  //#endregion
7285
7335
  //#region src/components/ToggleGroup.tsx
7286
- function $a({ options: e, value: t, onChange: n, min: r = 0, size: i = "md", className: a, ...o }) {
7336
+ function ro({ options: e, value: t, onChange: n, min: r = 0, size: i = "md", className: a, ...o }) {
7287
7337
  let s = (e) => {
7288
7338
  if (e.disabled) return;
7289
7339
  let i = t.includes(e.value);
@@ -7314,7 +7364,7 @@ function $a({ options: e, value: t, onChange: n, min: r = 0, size: i = "md", cla
7314
7364
  }
7315
7365
  //#endregion
7316
7366
  //#region src/components/Toolbar.tsx
7317
- function eo({ variant: e = "bar", className: t, children: n, ...r }) {
7367
+ function io({ variant: e = "bar", className: t, children: n, ...r }) {
7318
7368
  return /* @__PURE__ */ U("div", {
7319
7369
  role: "toolbar",
7320
7370
  "aria-label": r["aria-label"],
@@ -7328,13 +7378,13 @@ function eo({ variant: e = "bar", className: t, children: n, ...r }) {
7328
7378
  children: n
7329
7379
  });
7330
7380
  }
7331
- function to() {
7381
+ function ao() {
7332
7382
  return /* @__PURE__ */ U("span", {
7333
7383
  "aria-hidden": "true",
7334
7384
  className: "mx-1 h-5 w-px shrink-0 bg-line"
7335
7385
  });
7336
7386
  }
7337
- function no({ children: e, className: t }) {
7387
+ function oo({ children: e, className: t }) {
7338
7388
  return /* @__PURE__ */ U("div", {
7339
7389
  className: G("flex items-center gap-0.5", t),
7340
7390
  children: e
@@ -7342,8 +7392,8 @@ function no({ children: e, className: t }) {
7342
7392
  }
7343
7393
  //#endregion
7344
7394
  //#region src/components/Tour.tsx
7345
- var ro = 8;
7346
- function io({ steps: e, open: t, onClose: n, onFinish: r, finishLabel: i }) {
7395
+ var so = 8;
7396
+ function co({ steps: e, open: t, onClose: n, onFinish: r, finishLabel: i }) {
7347
7397
  let { strings: a } = q(), [o, c] = m(0), [u, f] = m(null), p = e[o];
7348
7398
  l(() => {
7349
7399
  t && c(0);
@@ -7398,8 +7448,8 @@ function io({ steps: e, open: t, onClose: n, onFinish: r, finishLabel: i }) {
7398
7448
  layout: !0,
7399
7449
  transition: K.surface,
7400
7450
  style: {
7401
- top: u.top - ro,
7402
- left: u.left - ro,
7451
+ top: u.top - so,
7452
+ left: u.left - so,
7403
7453
  width: u.width + 16,
7404
7454
  height: u.height + 16
7405
7455
  },
@@ -7444,7 +7494,7 @@ function io({ steps: e, open: t, onClose: n, onFinish: r, finishLabel: i }) {
7444
7494
  /* @__PURE__ */ W("div", {
7445
7495
  className: "mt-4 flex items-center gap-3",
7446
7496
  children: [
7447
- /* @__PURE__ */ U(aa, {
7497
+ /* @__PURE__ */ U(la, {
7448
7498
  steps: e.map((e, t) => ({
7449
7499
  id: String(t),
7450
7500
  label: String(e.title)
@@ -7472,7 +7522,7 @@ function io({ steps: e, open: t, onClose: n, onFinish: r, finishLabel: i }) {
7472
7522
  }
7473
7523
  //#endregion
7474
7524
  //#region src/components/Tree.tsx
7475
- function ao({ nodes: e, selectedId: t, onSelect: n, defaultExpanded: r = [], className: i }) {
7525
+ function lo({ nodes: e, selectedId: t, onSelect: n, defaultExpanded: r = [], className: i }) {
7476
7526
  let { strings: a } = q(), [o, s] = m(() => new Set(r)), c = (e) => s((t) => {
7477
7527
  let n = new Set(t);
7478
7528
  return n.has(e) ? n.delete(e) : n.add(e), n;
@@ -7530,7 +7580,7 @@ function ao({ nodes: e, selectedId: t, onSelect: n, defaultExpanded: r = [], cla
7530
7580
  }
7531
7581
  //#endregion
7532
7582
  //#region src/components/VirtualList.tsx
7533
- function oo({ items: e, children: t, estimateSize: n = 56, overscan: r = 8, itemKey: i, className: a }) {
7583
+ function uo({ items: e, children: t, estimateSize: n = 56, overscan: r = 8, itemKey: i, className: a }) {
7534
7584
  let o = p(null), s = Qe({
7535
7585
  count: e.length,
7536
7586
  getScrollElement: () => o.current,
@@ -7564,7 +7614,7 @@ function oo({ items: e, children: t, estimateSize: n = 56, overscan: r = 8, item
7564
7614
  }
7565
7615
  //#endregion
7566
7616
  //#region src/components/WindowControls.tsx
7567
- var so = [
7617
+ var fo = [
7568
7618
  {
7569
7619
  dir: "North",
7570
7620
  className: "left-2 right-2 top-0 h-1 cursor-n-resize"
@@ -7598,8 +7648,8 @@ var so = [
7598
7648
  className: "bottom-0 right-0 h-2.5 w-2.5 cursor-se-resize"
7599
7649
  }
7600
7650
  ];
7601
- function co({ onResizeStart: e, disabled: t }) {
7602
- return t ? null : /* @__PURE__ */ U(H, { children: so.map(({ dir: t, className: n }) => /* @__PURE__ */ U("div", {
7651
+ function po({ onResizeStart: e, disabled: t }) {
7652
+ return t ? null : /* @__PURE__ */ U(H, { children: fo.map(({ dir: t, className: n }) => /* @__PURE__ */ U("div", {
7603
7653
  "aria-hidden": "true",
7604
7654
  "data-tauri-drag-region": "false",
7605
7655
  onPointerDown: (n) => {
@@ -7610,7 +7660,7 @@ function co({ onResizeStart: e, disabled: t }) {
7610
7660
  }
7611
7661
  //#endregion
7612
7662
  //#region src/components/ActionBar.tsx
7613
- function lo({ primary: e, secondary: t, onBack: n, backLabel: r, leading: i, pinned: a, className: o }) {
7663
+ function mo({ primary: e, secondary: t, onBack: n, backLabel: r, leading: i, pinned: a, className: o }) {
7614
7664
  let { strings: s } = q(), c = Ot(), l = a ?? c;
7615
7665
  return /* @__PURE__ */ W("div", {
7616
7666
  className: G("flex items-center gap-2", l ? "sticky bottom-0 z-20 border-t border-line bg-surface/90 px-4 pt-3 pb-[calc(var(--safe-bottom,0px)+0.75rem)] backdrop-blur-md" : "pt-8", o),
@@ -7630,7 +7680,7 @@ function lo({ primary: e, secondary: t, onBack: n, backLabel: r, leading: i, pin
7630
7680
  }
7631
7681
  //#endregion
7632
7682
  //#region src/components/ChoiceCard.tsx
7633
- var uo = a(function({ selected: e, title: t, description: n, icon: r, meta: i, indicator: a = "radio", children: o, layout: s = "row", className: c, type: l = "button", ...u }, d) {
7683
+ var ho = a(function({ selected: e, title: t, description: n, icon: r, meta: i, indicator: a = "radio", children: o, layout: s = "row", className: c, type: l = "button", ...u }, d) {
7634
7684
  let f = a === "none" ? null : /* @__PURE__ */ U("span", {
7635
7685
  "aria-hidden": "true",
7636
7686
  className: G("flex h-5 w-5 shrink-0 items-center justify-center border transition-colors motion-instant", a === "radio" ? "rounded-full" : "rounded-md", e ? "border-accent bg-accent text-on-accent" : "border-line-3"),
@@ -7680,10 +7730,10 @@ var uo = a(function({ selected: e, title: t, description: n, icon: r, meta: i, i
7680
7730
  })]
7681
7731
  });
7682
7732
  });
7683
- uo.displayName = "ChoiceCard";
7733
+ ho.displayName = "ChoiceCard";
7684
7734
  //#endregion
7685
7735
  //#region src/components/Shelf.tsx
7686
- function fo({ children: e, itemClassName: t = "w-40", bleed: n = !0, className: r, ...i }) {
7736
+ function go({ children: e, itemClassName: t = "w-40", bleed: n = !0, className: r, ...i }) {
7687
7737
  let { strings: a } = q(), o = p(null), [s, c] = m({
7688
7738
  start: !1,
7689
7739
  end: !1
@@ -7745,7 +7795,7 @@ function fo({ children: e, itemClassName: t = "w-40", bleed: n = !0, className:
7745
7795
  }
7746
7796
  //#endregion
7747
7797
  //#region src/components/Wizard.tsx
7748
- function po(e, t = 0) {
7798
+ function _o(e, t = 0) {
7749
7799
  let [n, r] = m(t), i = (t) => Math.max(0, Math.min(e.length - 1, t));
7750
7800
  return {
7751
7801
  index: n,
@@ -7757,11 +7807,11 @@ function po(e, t = 0) {
7757
7807
  goTo: (e) => r(i(e))
7758
7808
  };
7759
7809
  }
7760
- function mo({ steps: e, index: t, onStepClick: n, title: r, description: i, progress: a = "bar", className: o, children: s }) {
7810
+ function vo({ steps: e, index: t, onStepClick: n, title: r, description: i, progress: a = "bar", className: o, children: s }) {
7761
7811
  let c = C(), [l, u] = m(t), d = t >= l ? 1 : -1;
7762
7812
  return l !== t && u(t), /* @__PURE__ */ W("div", {
7763
7813
  className: G("space-y-6", o),
7764
- children: [a !== "none" && /* @__PURE__ */ U(aa, {
7814
+ children: [a !== "none" && /* @__PURE__ */ U(la, {
7765
7815
  steps: e,
7766
7816
  current: t,
7767
7817
  onStepClick: n,
@@ -7801,7 +7851,7 @@ function mo({ steps: e, index: t, onStepClick: n, title: r, description: i, prog
7801
7851
  }
7802
7852
  //#endregion
7803
7853
  //#region src/components/SecretInput.tsx
7804
- var ho = a(function({ value: e, onChange: t, status: n = { state: "idle" }, paste: r = !0, className: i, id: a, disabled: o, ...s }, c) {
7854
+ var yo = a(function({ value: e, onChange: t, status: n = { state: "idle" }, paste: r = !0, className: i, id: a, disabled: o, ...s }, c) {
7805
7855
  let { strings: l } = q(), u = Y(), [d, f] = m(!1), p = r && typeof navigator < "u" && !!navigator.clipboard?.readText, h = async () => {
7806
7856
  try {
7807
7857
  let e = (await navigator.clipboard.readText()).trim();
@@ -7862,10 +7912,10 @@ var ho = a(function({ value: e, onChange: t, status: n = { state: "idle" }, past
7862
7912
  ]
7863
7913
  })] });
7864
7914
  });
7865
- ho.displayName = "SecretInput";
7915
+ yo.displayName = "SecretInput";
7866
7916
  //#endregion
7867
7917
  //#region src/components/ReorderableList.tsx
7868
- function go({ items: e, onReorder: t, keyOf: n, children: r, axis: i = "y", handleOnly: a = !0, className: o, itemClassName: s, ...c }) {
7918
+ function bo({ items: e, onReorder: t, keyOf: n, children: r, axis: i = "y", handleOnly: a = !0, className: o, itemClassName: s, ...c }) {
7869
7919
  let l = (n, r) => {
7870
7920
  if (r < 0 || r >= e.length || n === r) return;
7871
7921
  let i = [...e], [a] = i.splice(n, 1);
@@ -7877,7 +7927,7 @@ function go({ items: e, onReorder: t, keyOf: n, children: r, axis: i = "y", hand
7877
7927
  onReorder: t,
7878
7928
  "aria-label": c["aria-label"],
7879
7929
  className: G("flex", i === "y" ? "flex-col gap-2" : "flex-row gap-2", o),
7880
- children: e.map((t, o) => /* @__PURE__ */ U(_o, {
7930
+ children: e.map((t, o) => /* @__PURE__ */ U(xo, {
7881
7931
  item: t,
7882
7932
  index: o,
7883
7933
  count: e.length,
@@ -7889,7 +7939,7 @@ function go({ items: e, onReorder: t, keyOf: n, children: r, axis: i = "y", hand
7889
7939
  }, n(t)))
7890
7940
  });
7891
7941
  }
7892
- function _o({ item: e, index: t, count: n, handleOnly: r, axis: i, onMove: a, className: o, children: s }) {
7942
+ function xo({ item: e, index: t, count: n, handleOnly: r, axis: i, onMove: a, className: o, children: s }) {
7893
7943
  let { strings: c } = q(), l = b(), u = C(), d = /* @__PURE__ */ U("button", {
7894
7944
  type: "button",
7895
7945
  "aria-label": c.reorderableHandle(t + 1, n),
@@ -7919,7 +7969,7 @@ function _o({ item: e, index: t, count: n, handleOnly: r, axis: i, onMove: a, cl
7919
7969
  }
7920
7970
  //#endregion
7921
7971
  //#region src/components/AvatarPicker.tsx
7922
- function vo({ value: e, onChange: t, name: n = "?", size: r = "xl", output: i = 512, crop: a = !0, disabled: o, className: s }) {
7972
+ function So({ value: e, onChange: t, name: n = "?", size: r = "xl", output: i = 512, crop: a = !0, disabled: o, className: s }) {
7923
7973
  let { strings: c } = q(), [l, u] = m(null), d = (e) => {
7924
7974
  let n = new FileReader();
7925
7975
  n.onload = () => a ? u(String(n.result)) : t(String(n.result)), n.readAsDataURL(e);
@@ -7951,7 +8001,7 @@ function vo({ value: e, onChange: t, name: n = "?", size: r = "xl", output: i =
7951
8001
  className: "absolute -left-1 -top-1 flex h-7 w-7 items-center justify-center rounded-full border border-line-2 bg-surface-2 text-fg-3 shadow-raised hover:text-danger",
7952
8002
  children: /* @__PURE__ */ U(De, { size: Z.xs })
7953
8003
  })]
7954
- }), /* @__PURE__ */ U(bo, {
8004
+ }), /* @__PURE__ */ U(wo, {
7955
8005
  src: l,
7956
8006
  output: i,
7957
8007
  onClose: () => u(null),
@@ -7960,8 +8010,8 @@ function vo({ value: e, onChange: t, name: n = "?", size: r = "xl", output: i =
7960
8010
  }
7961
8011
  })] });
7962
8012
  }
7963
- var yo = 288;
7964
- function bo({ src: e, output: t, onClose: n, onDone: r }) {
8013
+ var Co = 288;
8014
+ function wo({ src: e, output: t, onClose: n, onDone: r }) {
7965
8015
  let { strings: i } = q(), [a, o] = m(null), [s, c] = m(1), [u, d] = m({
7966
8016
  x: 0,
7967
8017
  y: 0
@@ -7979,12 +8029,12 @@ function bo({ src: e, output: t, onClose: n, onDone: r }) {
7979
8029
  });
7980
8030
  }, t.src = e;
7981
8031
  }, [e]);
7982
- let h = (a ? Math.max(yo / a.width, yo / a.height) : 1) * s, g = (a?.width ?? 0) * h, _ = (a?.height ?? 0) * h, v = ((e) => ({
7983
- x: Math.min(Math.max(e.x, yo - g), 0),
7984
- y: Math.min(Math.max(e.y, yo - _), 0)
8032
+ let h = (a ? Math.max(Co / a.width, Co / a.height) : 1) * s, g = (a?.width ?? 0) * h, _ = (a?.height ?? 0) * h, v = ((e) => ({
8033
+ x: Math.min(Math.max(e.x, Co - g), 0),
8034
+ y: Math.min(Math.max(e.y, Co - _), 0)
7985
8035
  }))({
7986
- x: u.x + (yo - g) / 2,
7987
- y: u.y + (yo - _) / 2
8036
+ x: u.x + (Co - g) / 2,
8037
+ y: u.y + (Co - _) / 2
7988
8038
  }), y = (e) => {
7989
8039
  f.current = {
7990
8040
  x: e.clientX,
@@ -8018,7 +8068,7 @@ function bo({ src: e, output: t, onClose: n, onDone: r }) {
8018
8068
  if (!a) return;
8019
8069
  let e = document.createElement("canvas");
8020
8070
  e.width = t, e.height = t;
8021
- let n = e.getContext("2d"), i = t / yo;
8071
+ let n = e.getContext("2d"), i = t / Co;
8022
8072
  n.drawImage(a, v.x * i, v.y * i, g * i, _ * i), r(e.toDataURL("image/webp", .9));
8023
8073
  },
8024
8074
  children: i.avatarPickerUse
@@ -8033,8 +8083,8 @@ function bo({ src: e, output: t, onClose: n, onDone: r }) {
8033
8083
  onPointerCancel: x,
8034
8084
  className: "relative cursor-grab touch-none select-none overflow-hidden rounded-2xl bg-black active:cursor-grabbing",
8035
8085
  style: {
8036
- width: yo,
8037
- height: yo
8086
+ width: Co,
8087
+ height: Co
8038
8088
  },
8039
8089
  children: [
8040
8090
  a && /* @__PURE__ */ U("img", {
@@ -8063,7 +8113,7 @@ function bo({ src: e, output: t, onClose: n, onDone: r }) {
8063
8113
  children: [/* @__PURE__ */ U(je, {
8064
8114
  size: Z.md,
8065
8115
  className: "shrink-0 text-fg-3"
8066
- }), /* @__PURE__ */ U(na, {
8116
+ }), /* @__PURE__ */ U(oa, {
8067
8117
  "aria-label": i.avatarPickerZoom,
8068
8118
  value: s,
8069
8119
  onChange: c,
@@ -8078,7 +8128,7 @@ function bo({ src: e, output: t, onClose: n, onDone: r }) {
8078
8128
  }
8079
8129
  //#endregion
8080
8130
  //#region src/components/Page.tsx
8081
- function xo({ footer: e, mainRef: t, padding: n = "default", contentClassName: r, className: i, children: a, ...o }) {
8131
+ function To({ footer: e, mainRef: t, padding: n = "default", contentClassName: r, className: i, children: a, ...o }) {
8082
8132
  return /* @__PURE__ */ W("div", {
8083
8133
  className: G("flex h-full min-h-0 flex-col", i),
8084
8134
  children: [/* @__PURE__ */ W("main", {
@@ -8096,7 +8146,7 @@ function xo({ footer: e, mainRef: t, padding: n = "default", contentClassName: r
8096
8146
  }
8097
8147
  //#endregion
8098
8148
  //#region src/components/ModelSelect.tsx
8099
- var So = (e, t) => /* @__PURE__ */ W("span", {
8149
+ var Eo = (e, t) => /* @__PURE__ */ W("span", {
8100
8150
  className: "flex items-center gap-1",
8101
8151
  children: [e.vision && /* @__PURE__ */ U(ut, {
8102
8152
  tone: "info",
@@ -8106,7 +8156,7 @@ var So = (e, t) => /* @__PURE__ */ W("span", {
8106
8156
  children: t.modelSelectAudio
8107
8157
  })]
8108
8158
  });
8109
- function Co({ models: e, value: t, onChange: n, placeholder: r, defaultId: i, footer: a, disabled: o, id: s, className: c, ...l }) {
8159
+ function Do({ models: e, value: t, onChange: n, placeholder: r, defaultId: i, footer: a, disabled: o, id: s, className: c, ...l }) {
8110
8160
  let { strings: u } = q(), d = Ot(), [p, h] = m(!1), g = e.find((e) => e.id === t) ?? null, _ = f(() => e.map((e) => ({
8111
8161
  value: e.id,
8112
8162
  label: e.name,
@@ -8115,14 +8165,14 @@ function Co({ models: e, value: t, onChange: n, placeholder: r, defaultId: i, fo
8115
8165
  icon: e.local ? /* @__PURE__ */ U(R, { size: Z.md }) : /* @__PURE__ */ U(ce, { size: Z.md }),
8116
8166
  meta: /* @__PURE__ */ W("span", {
8117
8167
  className: "flex items-center gap-1",
8118
- children: [So(e, u), e.id === i && /* @__PURE__ */ U(ut, {
8168
+ children: [Eo(e, u), e.id === i && /* @__PURE__ */ U(ut, {
8119
8169
  tone: "accent",
8120
8170
  dot: !0,
8121
8171
  children: u.modelSelectDefault
8122
8172
  })]
8123
8173
  })
8124
8174
  })), [e, i]);
8125
- if (!d) return /* @__PURE__ */ U(ta, {
8175
+ if (!d) return /* @__PURE__ */ U(aa, {
8126
8176
  id: s,
8127
8177
  options: _,
8128
8178
  value: t,
@@ -8152,7 +8202,7 @@ function Co({ models: e, value: t, onChange: n, placeholder: r, defaultId: i, fo
8152
8202
  }),
8153
8203
  g && /* @__PURE__ */ U("span", {
8154
8204
  className: "hidden @sm:flex",
8155
- children: So(g, u)
8205
+ children: Eo(g, u)
8156
8206
  }),
8157
8207
  /* @__PURE__ */ U(N, {
8158
8208
  size: Z.md,
@@ -8176,7 +8226,7 @@ function Co({ models: e, value: t, onChange: n, placeholder: r, defaultId: i, fo
8176
8226
  className: "flex flex-wrap items-center gap-1.5",
8177
8227
  children: [
8178
8228
  e.meta,
8179
- So(e, u),
8229
+ Eo(e, u),
8180
8230
  e.id === i && /* @__PURE__ */ U(ut, {
8181
8231
  tone: "accent",
8182
8232
  dot: !0,
@@ -8199,7 +8249,7 @@ function Co({ models: e, value: t, onChange: n, placeholder: r, defaultId: i, fo
8199
8249
  }
8200
8250
  //#endregion
8201
8251
  //#region src/components/Citation.tsx
8202
- function wo({ index: e, title: t, url: n, snippet: r, domain: i, favicon: a, className: o }) {
8252
+ function Oo({ index: e, title: t, url: n, snippet: r, domain: i, favicon: a, className: o }) {
8203
8253
  let { strings: s } = q(), c = Ot(), [l, u] = m(!1), d = i ?? (n ? (() => {
8204
8254
  try {
8205
8255
  return new URL(n).hostname.replace(/^www\./, "");
@@ -8268,10 +8318,10 @@ function wo({ index: e, title: t, url: n, snippet: r, domain: i, favicon: a, cla
8268
8318
  children: f
8269
8319
  });
8270
8320
  }
8271
- wo.displayName = "Citation";
8321
+ Oo.displayName = "Citation";
8272
8322
  //#endregion
8273
8323
  //#region src/components/FeedbackAction.tsx
8274
- function To({ sentiment: e = null, onLike: t, onDislike: n, onCopy: r, copyText: i, onRetry: a, children: o, className: s }) {
8324
+ function ko({ sentiment: e = null, onLike: t, onDislike: n, onCopy: r, copyText: i, onRetry: a, children: o, className: s }) {
8275
8325
  let { strings: c } = q(), [l, u] = m(!1);
8276
8326
  return /* @__PURE__ */ W("div", {
8277
8327
  className: G("inline-flex items-center gap-1 text-fg-3", s),
@@ -8327,16 +8377,16 @@ function To({ sentiment: e = null, onLike: t, onDislike: n, onCopy: r, copyText:
8327
8377
  ]
8328
8378
  });
8329
8379
  }
8330
- To.displayName = "FeedbackAction";
8380
+ ko.displayName = "FeedbackAction";
8331
8381
  //#endregion
8332
8382
  //#region src/components/PromptSuggestions.tsx
8333
- var Eo = {
8383
+ var Ao = {
8334
8384
  1: "grid-cols-1",
8335
8385
  2: "grid-cols-1 @sm:grid-cols-2",
8336
8386
  3: "grid-cols-1 @sm:grid-cols-2 @lg:grid-cols-3",
8337
8387
  4: "grid-cols-1 @sm:grid-cols-2 @lg:grid-cols-4"
8338
8388
  };
8339
- function Do({ prompts: e, onSelect: t, title: n, columns: r = 2, className: i }) {
8389
+ function jo({ prompts: e, onSelect: t, title: n, columns: r = 2, className: i }) {
8340
8390
  let { strings: a } = q(), o = n ?? /* @__PURE__ */ W("span", {
8341
8391
  className: "flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-fg-3",
8342
8392
  children: [/* @__PURE__ */ U(Ce, {
@@ -8347,7 +8397,7 @@ function Do({ prompts: e, onSelect: t, title: n, columns: r = 2, className: i })
8347
8397
  return /* @__PURE__ */ W("div", {
8348
8398
  className: G("@container w-full space-y-3", i),
8349
8399
  children: [o && /* @__PURE__ */ U("div", { children: o }), /* @__PURE__ */ U("div", {
8350
- className: G("grid gap-2.5", Eo[r]),
8400
+ className: G("grid gap-2.5", Ao[r]),
8351
8401
  children: e.map((e) => /* @__PURE__ */ W("button", {
8352
8402
  type: "button",
8353
8403
  onClick: () => t(e.prompt, e),
@@ -8376,10 +8426,10 @@ function Do({ prompts: e, onSelect: t, title: n, columns: r = 2, className: i })
8376
8426
  })]
8377
8427
  });
8378
8428
  }
8379
- Do.displayName = "PromptSuggestions";
8429
+ jo.displayName = "PromptSuggestions";
8380
8430
  //#endregion
8381
8431
  //#region src/components/OtpInput.tsx
8382
- var Oo = a(function({ length: e = 6, value: t = "", onChange: n, onComplete: r, type: i = "number", mask: a = !1, disabled: o = !1, autoFocus: c = !1, className: l, id: u }, d) {
8432
+ var Mo = a(function({ length: e = 6, value: t = "", onChange: n, onComplete: r, type: i = "number", mask: a = !1, disabled: o = !1, autoFocus: c = !1, className: l, id: u }, d) {
8383
8433
  let { strings: f } = q(), m = Y(), h = p([]), g = Array.from({ length: e }, (e, n) => t[n] ?? ""), _ = s((t) => {
8384
8434
  let n = Math.max(0, Math.min(e - 1, t));
8385
8435
  h.current[n]?.focus(), h.current[n]?.select();
@@ -8439,39 +8489,39 @@ var Oo = a(function({ length: e = 6, value: t = "", onChange: n, onComplete: r,
8439
8489
  }, n))
8440
8490
  });
8441
8491
  });
8442
- Oo.displayName = "OtpInput";
8492
+ Mo.displayName = "OtpInput";
8443
8493
  //#endregion
8444
8494
  //#region src/layout/Box.tsx
8445
- var ko = a(function({ as: e, className: t, ...n }, r) {
8495
+ var No = a(function({ as: e, className: t, ...n }, r) {
8446
8496
  return /* @__PURE__ */ U(e ?? "div", {
8447
8497
  ref: r,
8448
8498
  className: G(t),
8449
8499
  ...n
8450
8500
  });
8451
- }), Ao = a(function({ as: e, className: t, ...n }, r) {
8501
+ }), Po = a(function({ as: e, className: t, ...n }, r) {
8452
8502
  return /* @__PURE__ */ U(e ?? "div", {
8453
8503
  ref: r,
8454
8504
  className: G("flex items-center justify-center", t),
8455
8505
  ...n
8456
8506
  });
8457
- }), jo = {
8507
+ }), Fo = {
8458
8508
  sm: "max-w-screen-sm",
8459
8509
  md: "max-w-screen-md",
8460
8510
  lg: "max-w-screen-lg",
8461
8511
  xl: "max-w-screen-xl",
8462
8512
  prose: "max-w-prose"
8463
- }, Mo = a(function({ as: e, size: t = "lg", flush: n, className: r, ...i }, a) {
8513
+ }, Io = a(function({ as: e, size: t = "lg", flush: n, className: r, ...i }, a) {
8464
8514
  return /* @__PURE__ */ U(e ?? "div", {
8465
8515
  ref: a,
8466
- className: G("mx-auto w-full", jo[t], !n && "px-4 sm:px-6", r),
8516
+ className: G("mx-auto w-full", Fo[t], !n && "px-4 sm:px-6", r),
8467
8517
  ...i
8468
8518
  });
8469
- }), No = {
8519
+ }), Lo = {
8470
8520
  none: "",
8471
8521
  sm: "my-2",
8472
8522
  md: "my-4",
8473
8523
  lg: "my-8"
8474
- }, Po = a(function({ orientation: e = "horizontal", label: t, spacing: n = "none", className: r, ...i }, a) {
8524
+ }, Ro = a(function({ orientation: e = "horizontal", label: t, spacing: n = "none", className: r, ...i }, a) {
8475
8525
  return e === "vertical" ? /* @__PURE__ */ U("div", {
8476
8526
  ref: a,
8477
8527
  role: "separator",
@@ -8481,7 +8531,7 @@ var ko = a(function({ as: e, className: t, ...n }, r) {
8481
8531
  }) : t ? /* @__PURE__ */ W("div", {
8482
8532
  ref: a,
8483
8533
  role: "separator",
8484
- className: G("flex items-center gap-3", No[n], r),
8534
+ className: G("flex items-center gap-3", Lo[n], r),
8485
8535
  ...i,
8486
8536
  children: [
8487
8537
  /* @__PURE__ */ U("span", { className: "h-px flex-1 bg-line" }),
@@ -8494,10 +8544,10 @@ var ko = a(function({ as: e, className: t, ...n }, r) {
8494
8544
  }) : /* @__PURE__ */ U("div", {
8495
8545
  ref: a,
8496
8546
  role: "separator",
8497
- className: G("h-px w-full bg-line", No[n], r),
8547
+ className: G("h-px w-full bg-line", Lo[n], r),
8498
8548
  ...i
8499
8549
  });
8500
- }), Fo = {
8550
+ }), zo = {
8501
8551
  0: "gap-0",
8502
8552
  .5: "gap-0.5",
8503
8553
  1: "gap-1",
@@ -8512,31 +8562,31 @@ var ko = a(function({ as: e, className: t, ...n }, r) {
8512
8562
  10: "gap-10",
8513
8563
  12: "gap-12",
8514
8564
  16: "gap-16"
8515
- }, Io = {
8565
+ }, Bo = {
8516
8566
  start: "items-start",
8517
8567
  center: "items-center",
8518
8568
  end: "items-end",
8519
8569
  stretch: "items-stretch",
8520
8570
  baseline: "items-baseline"
8521
- }, Lo = {
8571
+ }, Vo = {
8522
8572
  start: "justify-start",
8523
8573
  center: "justify-center",
8524
8574
  end: "justify-end",
8525
8575
  between: "justify-between",
8526
8576
  around: "justify-around",
8527
8577
  evenly: "justify-evenly"
8528
- }, Ro = {
8578
+ }, Ho = {
8529
8579
  row: "flex-row",
8530
8580
  column: "flex-col",
8531
8581
  "row-reverse": "flex-row-reverse",
8532
8582
  "column-reverse": "flex-col-reverse"
8533
- }, zo = a(function({ as: e, direction: t = "row", align: n, justify: r, wrap: i, gap: a, inline: o, className: s, ...c }, l) {
8583
+ }, Uo = a(function({ as: e, direction: t = "row", align: n, justify: r, wrap: i, gap: a, inline: o, className: s, ...c }, l) {
8534
8584
  return /* @__PURE__ */ U(e ?? "div", {
8535
8585
  ref: l,
8536
- className: G(o ? "inline-flex" : "flex", Ro[t], n && Io[n], r && Lo[r], i && "flex-wrap", a !== void 0 && Fo[a], s),
8586
+ className: G(o ? "inline-flex" : "flex", Ho[t], n && Bo[n], r && Vo[r], i && "flex-wrap", a !== void 0 && zo[a], s),
8537
8587
  ...c
8538
8588
  });
8539
- }), Bo = {
8589
+ }), Wo = {
8540
8590
  base: {
8541
8591
  1: "grid-cols-1",
8542
8592
  2: "grid-cols-2",
@@ -8582,11 +8632,11 @@ var ko = a(function({ as: e, className: t, ...n }, r) {
8582
8632
  6: "xl:grid-cols-6",
8583
8633
  12: "xl:grid-cols-12"
8584
8634
  }
8585
- }, Vo = a(function({ as: e, columns: t, gap: n = 4, minChildWidth: r, className: i, style: a, ...o }, s) {
8586
- let c = e ?? "div", l = t === void 0 ? null : typeof t == "number" ? Bo.base[t] : Object.entries(t).map(([e, t]) => Bo[e][t]);
8635
+ }, Go = a(function({ as: e, columns: t, gap: n = 4, minChildWidth: r, className: i, style: a, ...o }, s) {
8636
+ let c = e ?? "div", l = t === void 0 ? null : typeof t == "number" ? Wo.base[t] : Object.entries(t).map(([e, t]) => Wo[e][t]);
8587
8637
  return /* @__PURE__ */ U(c, {
8588
8638
  ref: s,
8589
- className: G("grid", Fo[n], l, i),
8639
+ className: G("grid", zo[n], l, i),
8590
8640
  style: r ? {
8591
8641
  gridTemplateColumns: `repeat(auto-fit, minmax(min(${r}, 100%), 1fr))`,
8592
8642
  ...a
@@ -8596,7 +8646,7 @@ var ko = a(function({ as: e, className: t, ...n }, r) {
8596
8646
  });
8597
8647
  //#endregion
8598
8648
  //#region src/layout/Spacer.tsx
8599
- function Ho({ className: e }) {
8649
+ function Ko({ className: e }) {
8600
8650
  return /* @__PURE__ */ U("div", {
8601
8651
  "aria-hidden": "true",
8602
8652
  className: G("flex-1", e)
@@ -8604,21 +8654,21 @@ function Ho({ className: e }) {
8604
8654
  }
8605
8655
  //#endregion
8606
8656
  //#region src/layout/Stack.tsx
8607
- function Uo(e, t, n) {
8657
+ function qo(e, t, n) {
8608
8658
  let r = a(function({ as: e, gap: r = n.gap, align: i = n.align, justify: a, wrap: o, className: s, ...c }, l) {
8609
8659
  return /* @__PURE__ */ U(e ?? "div", {
8610
8660
  ref: l,
8611
- className: G("flex", t === "column" ? "flex-col" : "flex-row", Fo[r], i && Io[i], a && Lo[a], o && "flex-wrap", s),
8661
+ className: G("flex", t === "column" ? "flex-col" : "flex-row", zo[r], i && Bo[i], a && Vo[a], o && "flex-wrap", s),
8612
8662
  ...c
8613
8663
  });
8614
8664
  });
8615
8665
  return r.displayName = e, r;
8616
8666
  }
8617
- var Wo = Uo("Stack", "column", { gap: 4 }), Go = Wo, Ko = Uo("HStack", "row", {
8667
+ var Jo = qo("Stack", "column", { gap: 4 }), Yo = Jo, Xo = qo("HStack", "row", {
8618
8668
  gap: 3,
8619
8669
  align: "center"
8620
8670
  });
8621
8671
  //#endregion
8622
- export { st as Accordion, ct as AccordionItem, lo as ActionBar, ht as Alert, St as AppBar, Gt as AppShell, Ki as AspectRatio, qt as AudioItem, Xt as Avatar, Qt as AvatarGroup, vo as AvatarPicker, ut as Badge, tn as Banner, Er as BottomMenu, ko as Box, fn as Breadcrumb, Q as Button, _n as ButtonGroup, Pn as CHART_SERIES, Nr as Calendar, xn as Card, Sn as CardButton, Cn as Carousel, Ao as Center, Mn as CharacterCard, Nn as CharacterCardSkeleton, Ln as Chart, Ve as ChartCell, Bn as Checkbox, Vn as Chip, uo as ChoiceCard, wo as Citation, Gn as CodeBlock, Kn as Collapsible, ir as ColorPicker, cr as Combobox, fr as CommandPalette, hr as Composer, kr as ConfirmHost, Mo as Container, Ar as ContextMenu, Hn as CopyButton, pt as CrispStringsProvider, Ma as DEFAULT_THEME, Pr as DatePicker, Ir as Dialog, zr as Diff, Po as Divider, It as Dock, Jr as DownloadItem, Yr as Dropzone, Xr as EmptyState, Zr as ErrorState, To as FeedbackAction, yt as Field, $r as FilterBar, zo as Flex, ni as Form, ri as FormActions, wt as FrameProvider, Vo as Grid, Ko as HStack, ur as Highlight, ai as HoverCard, oi as ICON_SIZE, si as Icon, J as IconButton, ci as ImageViewer, li as InfiniteScroll, bt as Input, dr as Kbd, ia as KeyValue, ui as ListGroup, mi as ListRow, hi as ListRowButton, sr as LoadingState, gi as Masonry, vi as MediaCard, yi as MediaCardSkeleton, bi as MediaTile, xi as MediaTileSkeleton, rn as Menu, sn as MenuContent, cn as MenuItem, un as MenuLabel, ln as MenuSeparator, on as MenuTrigger, ki as Message, Mi as MessageDivider, Ni as Meter, Co as ModelSelect, Fi as MultiItemDownloadCard, Pt as NavBadge, Vt as NavLabel, Ht as NavRail, Ii as NumberInput, Oo as OtpInput, ja as PRESETS, xo as Page, Ri as Pagination, Vi as Panel, Wi as PartitionBar, Zn as Popover, $n as PopoverAnchor, tr as PopoverContent, Qn as PopoverTrigger, Vr as Progress, Do as PromptSuggestions, qi as Prose, Xi as Radio, Yi as RadioGroup, _r as RecordingWave, go as ReorderableList, Zi as Resizable, Wn as ScrollArea, Qi as SearchField, ho as SecretInput, $i as Segmented, ea as Select, ta as SelectMenu, Tr as Sheet, fo as Shelf, $ as Skeleton, jn as SkeletonRow, na as Slider, Ho as Spacer, Rn as Sparkline, or as Spinner, vn as SplitButton, Wo as Stack, ra as StatTile, aa as Stepper, An as Surface, oa as Switch, fa as Tab, Ft as TabBar, da as TabList, pa as TabPanel, sa as Table, ua as Tabs, ma as TagInput, _a as Text, xt as Textarea, Va as ThemeEditor, La as ThemeProvider, Ua as Timeline, Wa as TitleBar, Qa as Toaster, $a as ToggleGroup, eo as Toolbar, no as ToolbarGroup, to as ToolbarSeparator, Nt as Tooltip, io as Tour, ao as Tree, ji as TypingDots, Go as VStack, oo as VirtualList, Gi as VisuallyHidden, co as WindowResizeHandles, mo as Wizard, Io as alignClass, Aa as applyTheme, G as cn, Wr as compactNumber, Or as confirm, xa as contrastRatio, Lr as diffLines, dt as englishStrings, Kr as fileSize, Fo as gapClass, Jn as getElementRef, va as hexToRgb, Z as icon, gn as iconSize, X as inputSurface, Sa as isLight, Lo as justifyClass, ba as luminance, qn as mergeRefs, wa as mixHex, K as motion, ya as normaliseHex, Ca as readableOn, Ur as relativeTime, ka as themeToVars, wn as tintFromName, Za as toast, pr as useCommandPalette, Ot as useCompactLayout, q as useCrispStrings, Y as useFieldContext, ti as useForm, Tt as useFrame, Tn as useImageBrightness, mr as useLongPress, Dt as useMediaQuery, vr as useModal, zt as useNavExpanded, Dn as useOnSurface, er as usePopoverPosition, Et as usePortalTarget, Fa as useTheme, ii as useUnsavedGuard, po as useWizard };
8672
+ export { st as Accordion, ct as AccordionItem, mo as ActionBar, ht as Alert, St as AppBar, Gt as AppShell, Ki as AspectRatio, qt as AudioItem, Xt as Avatar, Qt as AvatarGroup, So as AvatarPicker, ut as Badge, tn as Banner, Er as BottomMenu, No as Box, fn as Breadcrumb, Q as Button, _n as ButtonGroup, Pn as CHART_SERIES, Nr as Calendar, xn as Card, Sn as CardButton, Cn as Carousel, Po as Center, Mn as CharacterCard, Nn as CharacterCardSkeleton, Ln as Chart, Ve as ChartCell, Bn as Checkbox, Vn as Chip, ho as ChoiceCard, Oo as Citation, Gn as CodeBlock, Kn as Collapsible, ir as ColorPicker, cr as Combobox, fr as CommandPalette, hr as Composer, kr as ConfirmHost, Io as Container, Ar as ContextMenu, Hn as CopyButton, pt as CrispStringsProvider, Ia as DEFAULT_THEME, Pr as DatePicker, Ir as Dialog, zr as Diff, Ro as Divider, It as Dock, Jr as DownloadItem, Yr as Dropzone, Xr as EmptyState, Zr as ErrorState, ko as FeedbackAction, yt as Field, $r as FilterBar, Uo as Flex, ni as Form, ri as FormActions, wt as FrameProvider, Go as Grid, Xo as HStack, ur as Highlight, ai as HoverCard, oi as ICON_SIZE, si as Icon, J as IconButton, ci as ImageViewer, li as InfiniteScroll, Xi as InlineMarkdown, bt as Input, dr as Kbd, ca as KeyValue, ui as ListGroup, mi as ListRow, hi as ListRowButton, sr as LoadingState, gi as Masonry, vi as MediaCard, yi as MediaCardSkeleton, bi as MediaTile, xi as MediaTileSkeleton, rn as Menu, sn as MenuContent, cn as MenuItem, un as MenuLabel, ln as MenuSeparator, on as MenuTrigger, ki as Message, Mi as MessageDivider, Ni as Meter, Do as ModelSelect, Fi as MultiItemDownloadCard, Pt as NavBadge, Vt as NavLabel, Ht as NavRail, Ii as NumberInput, Mo as OtpInput, Fa as PRESETS, To as Page, Ri as Pagination, Vi as Panel, Wi as PartitionBar, Zn as Popover, $n as PopoverAnchor, tr as PopoverContent, Qn as PopoverTrigger, Vr as Progress, jo as PromptSuggestions, Zi as Prose, ea as Radio, $i as RadioGroup, _r as RecordingWave, bo as ReorderableList, ta as Resizable, Wn as ScrollArea, na as SearchField, yo as SecretInput, ra as Segmented, ia as Select, aa as SelectMenu, Tr as Sheet, go as Shelf, $ as Skeleton, jn as SkeletonRow, oa as Slider, Ko as Spacer, Rn as Sparkline, or as Spinner, vn as SplitButton, Jo as Stack, sa as StatTile, la as Stepper, An as Surface, ua as Switch, ga as Tab, Ft as TabBar, ha as TabList, _a as TabPanel, da as Table, ma as Tabs, va as TagInput, xa as Text, xt as Textarea, Ga as ThemeEditor, Va as ThemeProvider, qa as Timeline, Ja as TitleBar, no as Toaster, ro as ToggleGroup, io as Toolbar, oo as ToolbarGroup, ao as ToolbarSeparator, Nt as Tooltip, co as Tour, lo as Tree, ji as TypingDots, Yo as VStack, uo as VirtualList, Gi as VisuallyHidden, po as WindowResizeHandles, vo as Wizard, Bo as alignClass, Pa as applyTheme, G as cn, Wr as compactNumber, Or as confirm, Ta as contrastRatio, Lr as diffLines, dt as englishStrings, Ji as escapeHeadings, Kr as fileSize, zo as gapClass, Jn as getElementRef, Sa as hexToRgb, Z as icon, gn as iconSize, X as inputSurface, Ea as isLight, Vo as justifyClass, wa as luminance, qn as mergeRefs, Oa as mixHex, K as motion, Ca as normaliseHex, Da as readableOn, Ur as relativeTime, Na as themeToVars, wn as tintFromName, to as toast, pr as useCommandPalette, Ot as useCompactLayout, q as useCrispStrings, Y as useFieldContext, ti as useForm, Tt as useFrame, Tn as useImageBrightness, mr as useLongPress, Dt as useMediaQuery, vr as useModal, zt as useNavExpanded, Dn as useOnSurface, er as usePopoverPosition, Et as usePortalTarget, za as useTheme, ii as useUnsavedGuard, _o as useWizard };
8623
8673
 
8624
8674
  //# sourceMappingURL=index.js.map