@fiction/sdk 1.0.12 → 1.0.13

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/self.js CHANGED
@@ -2,7 +2,7 @@ var Ct = Object.defineProperty;
2
2
  var ao = (e, r, o) => r in e ? Ct(e, r, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[r] = o;
3
3
  var s = (e, r) => Ct(e, "name", { value: r, configurable: !0 });
4
4
  var D = (e, r, o) => ao(e, typeof r != "symbol" ? r + "" : r, o);
5
- import { ref as T, defineComponent as j, createElementBlock as v, openBlock as d, createElementVNode as l, normalizeClass as z, watch as oe, computed as F, createCommentVNode as E, renderSlot as Ae, onMounted as Ce, Fragment as Ie, renderList as rt, withDirectives as Pt, vModelText as Ft, toDisplayString as R, createBlock as Q, withKeys as io, createVNode as U, withCtx as se, createTextVNode as He, unref as Y, resolveDynamicComponent as lo, nextTick as Xe, Transition as _e, withModifiers as et, TransitionGroup as co, normalizeStyle as st, onUnmounted as ft, shallowRef as uo, Teleport as ho, normalizeProps as fo, guardReactiveProps as go, mergeProps as St } from "vue";
5
+ import { ref as T, defineComponent as j, createElementBlock as v, openBlock as d, createElementVNode as l, normalizeClass as z, watch as oe, computed as F, createCommentVNode as E, renderSlot as Me, onMounted as Ie, Fragment as Ae, renderList as rt, withDirectives as Pt, vModelText as Ft, toDisplayString as R, createBlock as Q, withKeys as io, createVNode as U, withCtx as se, createTextVNode as He, unref as Y, resolveDynamicComponent as lo, nextTick as Xe, Transition as _e, withModifiers as et, TransitionGroup as co, normalizeStyle as st, onUnmounted as ft, shallowRef as uo, Teleport as ho, normalizeProps as fo, guardReactiveProps as go, mergeProps as St } from "vue";
6
6
  import { S as Vt } from "./base-CEr2lLFg.js";
7
7
  import { Conversation as Mt } from "@elevenlabs/client";
8
8
  import { objectId as mo } from "@fiction/utils";
@@ -820,7 +820,7 @@ const So = {
820
820
  key: 0,
821
821
  class: z([e.icon, t.value])
822
822
  }, null, 2)) : E("", !0),
823
- Ae(n.$slots, "default"),
823
+ Me(n.$slots, "default"),
824
824
  e.iconAfter ? (d(), v("i", {
825
825
  key: 1,
826
826
  class: z([e.iconAfter, t.value])
@@ -856,7 +856,7 @@ const So = {
856
856
  emits: ["update:modelValue", "autoSubmit"],
857
857
  setup(e, { emit: r }) {
858
858
  const o = e, t = r, n = T([]), a = T(Array.from({ length: o.length }).fill("")), i = T(!1);
859
- Ce(() => {
859
+ Ie(() => {
860
860
  o.modelValue && (a.value = o.modelValue.split("").slice(0, o.length)), o.focusFirst && !("ontouchstart" in window) && n.value[0]?.focus();
861
861
  }), oe(() => o.modelValue, (c) => {
862
862
  a.value = c ? c.split("").slice(0, o.length) : Array.from({ length: o.length }).fill("");
@@ -898,7 +898,7 @@ const So = {
898
898
  a.value[m] = "";
899
899
  }
900
900
  return s(u, "onFocus"), (c, m) => (d(), v("div", Io, [
901
- (d(!0), v(Ie, null, rt(e.length, (y) => Pt((d(), v("input", {
901
+ (d(!0), v(Ae, null, rt(e.length, (y) => Pt((d(), v("input", {
902
902
  key: y,
903
903
  ref_for: !0,
904
904
  ref: /* @__PURE__ */ s((g) => n.value[y - 1] = g, "ref"),
@@ -920,18 +920,14 @@ const So = {
920
920
  }
921
921
  }), Eo = { class: "flex flex-col items-center justify-center h-full p-6" }, Lo = { class: "w-full max-w-xs space-y-12" }, To = {
922
922
  key: 0,
923
- class: "text-xs text-red-400 text-center"
923
+ class: "text-xs text-theme-400 text-center"
924
924
  }, Po = { class: "text-lg font-light text-white text-center" }, Fo = { class: "space-y-6" }, Vo = { class: "space-y-4" }, zt = /* @__PURE__ */ j({
925
925
  __name: "ElAuthGate",
926
926
  props: {
927
927
  sdk: {}
928
928
  },
929
929
  setup(e) {
930
- const r = T({ email: "", code: "" }), o = T("email");
931
- Ce(async () => {
932
- e.sdk.token.value && await e.sdk.getCurrentUser();
933
- });
934
- const t = {
930
+ const r = T({ email: "", code: "" }), o = T("email"), t = {
935
931
  email: {
936
932
  title: "Continue with Email",
937
933
  button: { label: "Continue", disabled: /* @__PURE__ */ s(() => !r.value.email, "disabled") },
@@ -1237,14 +1233,14 @@ const So = {
1237
1233
  }
1238
1234
  H = !1;
1239
1235
  }
1240
- const ze = a(m).join(":"), Se = y ? ze + ut : ze, ue = Se + X;
1236
+ const ze = a(m).join(":"), Ce = y ? ze + ut : ze, ue = Ce + X;
1241
1237
  if (i.includes(ue))
1242
1238
  continue;
1243
1239
  i.push(ue);
1244
1240
  const pe = n(X, H);
1245
1241
  for (let he = 0; he < pe.length; ++he) {
1246
1242
  const re = pe[he];
1247
- i.push(Se + re);
1243
+ i.push(Ce + re);
1248
1244
  }
1249
1245
  h = u + (h.length > 0 ? " " + h : h);
1250
1246
  }
@@ -1292,14 +1288,14 @@ const Z = /* @__PURE__ */ s((e) => {
1292
1288
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
1293
1289
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
1294
1290
  rr.test(e) && !sr.test(e)
1295
- ), "isLengthOnly"), Gt = /* @__PURE__ */ s(() => !1, "isNever"), cr = /* @__PURE__ */ s((e) => nr.test(e), "isShadow"), dr = /* @__PURE__ */ s((e) => ar.test(e), "isImage"), ur = /* @__PURE__ */ s((e) => !p(e) && !x(e), "isAnyNonArbitrary"), hr = /* @__PURE__ */ s((e) => De(e, Ht, Gt), "isArbitrarySize"), p = /* @__PURE__ */ s((e) => Rt.test(e), "isArbitraryValue"), Me = /* @__PURE__ */ s((e) => De(e, qt, lr), "isArbitraryLength"), it = /* @__PURE__ */ s((e) => De(e, vr, I), "isArbitraryNumber"), Lt = /* @__PURE__ */ s((e) => De(e, Ot, Gt), "isArbitraryPosition"), fr = /* @__PURE__ */ s((e) => De(e, Ut, dr), "isArbitraryImage"), Ye = /* @__PURE__ */ s((e) => De(e, Wt, cr), "isArbitraryShadow"), x = /* @__PURE__ */ s((e) => Nt.test(e), "isArbitraryVariable"), Ue = /* @__PURE__ */ s((e) => Be(e, qt), "isArbitraryVariableLength"), gr = /* @__PURE__ */ s((e) => Be(e, pr), "isArbitraryVariableFamilyName"), Tt = /* @__PURE__ */ s((e) => Be(e, Ot), "isArbitraryVariablePosition"), mr = /* @__PURE__ */ s((e) => Be(e, Ht), "isArbitraryVariableSize"), br = /* @__PURE__ */ s((e) => Be(e, Ut), "isArbitraryVariableImage"), Je = /* @__PURE__ */ s((e) => Be(e, Wt, !0), "isArbitraryVariableShadow"), De = /* @__PURE__ */ s((e, r, o) => {
1291
+ ), "isLengthOnly"), Gt = /* @__PURE__ */ s(() => !1, "isNever"), cr = /* @__PURE__ */ s((e) => nr.test(e), "isShadow"), dr = /* @__PURE__ */ s((e) => ar.test(e), "isImage"), ur = /* @__PURE__ */ s((e) => !p(e) && !x(e), "isAnyNonArbitrary"), hr = /* @__PURE__ */ s((e) => De(e, Ht, Gt), "isArbitrarySize"), p = /* @__PURE__ */ s((e) => Rt.test(e), "isArbitraryValue"), Se = /* @__PURE__ */ s((e) => De(e, qt, lr), "isArbitraryLength"), it = /* @__PURE__ */ s((e) => De(e, vr, I), "isArbitraryNumber"), Lt = /* @__PURE__ */ s((e) => De(e, Ot, Gt), "isArbitraryPosition"), fr = /* @__PURE__ */ s((e) => De(e, Ut, dr), "isArbitraryImage"), Ye = /* @__PURE__ */ s((e) => De(e, Wt, cr), "isArbitraryShadow"), x = /* @__PURE__ */ s((e) => Nt.test(e), "isArbitraryVariable"), Ue = /* @__PURE__ */ s((e) => Be(e, qt), "isArbitraryVariableLength"), gr = /* @__PURE__ */ s((e) => Be(e, pr), "isArbitraryVariableFamilyName"), Tt = /* @__PURE__ */ s((e) => Be(e, Ot), "isArbitraryVariablePosition"), mr = /* @__PURE__ */ s((e) => Be(e, Ht), "isArbitraryVariableSize"), br = /* @__PURE__ */ s((e) => Be(e, Ut), "isArbitraryVariableImage"), Je = /* @__PURE__ */ s((e) => Be(e, Wt, !0), "isArbitraryVariableShadow"), De = /* @__PURE__ */ s((e, r, o) => {
1296
1292
  const t = Rt.exec(e);
1297
1293
  return t ? t[1] ? r(t[1]) : o(t[2]) : !1;
1298
1294
  }, "getIsArbitraryValue"), Be = /* @__PURE__ */ s((e, r, o = !1) => {
1299
1295
  const t = Nt.exec(e);
1300
1296
  return t ? t[1] ? r(t[1]) : o : !1;
1301
1297
  }, "getIsArbitraryVariable"), Ot = /* @__PURE__ */ s((e) => e === "position" || e === "percentage", "isLabelPosition"), Ut = /* @__PURE__ */ s((e) => e === "image" || e === "url", "isLabelImage"), Ht = /* @__PURE__ */ s((e) => e === "length" || e === "size" || e === "bg-size", "isLabelSize"), qt = /* @__PURE__ */ s((e) => e === "length", "isLabelLength"), vr = /* @__PURE__ */ s((e) => e === "number", "isLabelNumber"), pr = /* @__PURE__ */ s((e) => e === "family-name", "isLabelFamilyName"), Wt = /* @__PURE__ */ s((e) => e === "shadow", "isLabelShadow"), xr = /* @__PURE__ */ s(() => {
1302
- const e = Z("color"), r = Z("font"), o = Z("text"), t = Z("font-weight"), n = Z("tracking"), a = Z("leading"), i = Z("breakpoint"), f = Z("container"), h = Z("spacing"), C = Z("radius"), u = Z("shadow"), c = Z("inset-shadow"), m = Z("text-shadow"), y = Z("drop-shadow"), g = Z("blur"), P = Z("perspective"), H = Z("aspect"), X = Z("ease"), ze = Z("animate"), Se = /* @__PURE__ */ s(() => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], "scaleBreak"), ue = /* @__PURE__ */ s(() => [
1298
+ const e = Z("color"), r = Z("font"), o = Z("text"), t = Z("font-weight"), n = Z("tracking"), a = Z("leading"), i = Z("breakpoint"), f = Z("container"), h = Z("spacing"), C = Z("radius"), u = Z("shadow"), c = Z("inset-shadow"), m = Z("text-shadow"), y = Z("drop-shadow"), g = Z("blur"), P = Z("perspective"), H = Z("aspect"), X = Z("ease"), ze = Z("animate"), Ce = /* @__PURE__ */ s(() => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], "scaleBreak"), ue = /* @__PURE__ */ s(() => [
1303
1299
  "center",
1304
1300
  "top",
1305
1301
  "bottom",
@@ -1325,7 +1321,7 @@ const Z = /* @__PURE__ */ s((e) => {
1325
1321
  repeat: ["", "x", "y", "space", "round"]
1326
1322
  }], "scaleBgRepeat"), xe = /* @__PURE__ */ s(() => ["auto", "cover", "contain", mr, hr, {
1327
1323
  size: [x, p]
1328
- }], "scaleBgSize"), ye = /* @__PURE__ */ s(() => [at, Ue, Me], "scaleGradientStopPosition"), N = /* @__PURE__ */ s(() => [
1324
+ }], "scaleBgSize"), ye = /* @__PURE__ */ s(() => [at, Ue, Se], "scaleGradientStopPosition"), N = /* @__PURE__ */ s(() => [
1329
1325
  // Deprecated since Tailwind CSS v4.0.0
1330
1326
  "",
1331
1327
  "none",
@@ -1333,7 +1329,7 @@ const Z = /* @__PURE__ */ s((e) => {
1333
1329
  C,
1334
1330
  x,
1335
1331
  p
1336
- ], "scaleRadius"), W = /* @__PURE__ */ s(() => ["", I, Ue, Me], "scaleBorderWidth"), Ee = /* @__PURE__ */ s(() => ["solid", "dashed", "dotted", "double"], "scaleLineStyle"), Le = /* @__PURE__ */ s(() => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], "scaleBlendMode"), B = /* @__PURE__ */ s(() => [I, at, Tt, Lt], "scaleMaskImagePosition"), Re = /* @__PURE__ */ s(() => [
1332
+ ], "scaleRadius"), W = /* @__PURE__ */ s(() => ["", I, Ue, Se], "scaleBorderWidth"), Ee = /* @__PURE__ */ s(() => ["solid", "dashed", "dotted", "double"], "scaleLineStyle"), Le = /* @__PURE__ */ s(() => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], "scaleBlendMode"), B = /* @__PURE__ */ s(() => [I, at, Tt, Lt], "scaleMaskImagePosition"), Re = /* @__PURE__ */ s(() => [
1337
1333
  // Deprecated since Tailwind CSS v4.0.0
1338
1334
  "",
1339
1335
  "none",
@@ -1393,14 +1389,14 @@ const Z = /* @__PURE__ */ s((e) => {
1393
1389
  * @see https://tailwindcss.com/docs/break-after
1394
1390
  */
1395
1391
  "break-after": [{
1396
- "break-after": Se()
1392
+ "break-after": Ce()
1397
1393
  }],
1398
1394
  /**
1399
1395
  * Break Before
1400
1396
  * @see https://tailwindcss.com/docs/break-before
1401
1397
  */
1402
1398
  "break-before": [{
1403
- "break-before": Se()
1399
+ "break-before": Ce()
1404
1400
  }],
1405
1401
  /**
1406
1402
  * Break Inside
@@ -2033,7 +2029,7 @@ const Z = /* @__PURE__ */ s((e) => {
2033
2029
  * @see https://tailwindcss.com/docs/font-size
2034
2030
  */
2035
2031
  "font-size": [{
2036
- text: ["base", o, Ue, Me]
2032
+ text: ["base", o, Ue, Se]
2037
2033
  }],
2038
2034
  /**
2039
2035
  * Font Smoothing
@@ -2181,7 +2177,7 @@ const Z = /* @__PURE__ */ s((e) => {
2181
2177
  * @see https://tailwindcss.com/docs/text-decoration-thickness
2182
2178
  */
2183
2179
  "text-decoration-thickness": [{
2184
- decoration: [I, "from-font", "auto", x, Me]
2180
+ decoration: [I, "from-font", "auto", x, Se]
2185
2181
  }],
2186
2182
  /**
2187
2183
  * Text Decoration Color
@@ -2668,7 +2664,7 @@ const Z = /* @__PURE__ */ s((e) => {
2668
2664
  * @see https://tailwindcss.com/docs/outline-width
2669
2665
  */
2670
2666
  "outline-w": [{
2671
- outline: ["", I, Ue, Me]
2667
+ outline: ["", I, Ue, Se]
2672
2668
  }],
2673
2669
  /**
2674
2670
  * Outline Color
@@ -2743,7 +2739,7 @@ const Z = /* @__PURE__ */ s((e) => {
2743
2739
  * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
2744
2740
  */
2745
2741
  "ring-offset-w": [{
2746
- "ring-offset": [I, Me]
2742
+ "ring-offset": [I, Se]
2747
2743
  }],
2748
2744
  /**
2749
2745
  * Ring Offset Color
@@ -3693,7 +3689,7 @@ const Z = /* @__PURE__ */ s((e) => {
3693
3689
  * @see https://tailwindcss.com/docs/stroke-width
3694
3690
  */
3695
3691
  "stroke-w": [{
3696
- stroke: [I, Ue, Me, it]
3692
+ stroke: [I, Ue, Se, it]
3697
3693
  }],
3698
3694
  /**
3699
3695
  * Stroke
@@ -4124,7 +4120,7 @@ const Z = /* @__PURE__ */ s((e) => {
4124
4120
  key: 0,
4125
4121
  class: z(["flex items-center size-[1.1em] mt-[-.07em]", [r.value.icon, a.value]])
4126
4122
  }, null, 2)) : E("", !0),
4127
- Ae(i.$slots, "default"),
4123
+ Me(i.$slots, "default"),
4128
4124
  r.value.iconAfter ? (d(), v("span", {
4129
4125
  key: 1,
4130
4126
  class: z(["flex items-center size-[1.1em] mt-[-.07em]", [r.value.iconAfter, a.value]])
@@ -4219,7 +4215,7 @@ const Z = /* @__PURE__ */ s((e) => {
4219
4215
  r.value.length > 0 ? (d(), v("div", Lr, [
4220
4216
  t[3] || (t[3] = l("h3", { class: "text-sm font-medium text-white/90" }, " Connect ", -1)),
4221
4217
  l("div", Tr, [
4222
- (d(!0), v(Ie, null, rt(r.value, (n) => (d(), Q(wr, {
4218
+ (d(!0), v(Ae, null, rt(r.value, (n) => (d(), Q(wr, {
4223
4219
  key: n.title,
4224
4220
  design: "ghost",
4225
4221
  theme: "default",
@@ -4262,7 +4258,7 @@ const Z = /* @__PURE__ */ s((e) => {
4262
4258
  const m = u[c], y = u[c + 1];
4263
4259
  return !y || y.sender !== m.sender;
4264
4260
  }
4265
- s(a, "shouldShowAvatar"), Ce(async () => {
4261
+ s(a, "shouldShowAvatar"), Ie(async () => {
4266
4262
  if (e.selfController && !e.selfController.textState.value.isConnected)
4267
4263
  try {
4268
4264
  await e.selfController.startTextConversation();
@@ -4313,7 +4309,7 @@ const Z = /* @__PURE__ */ s((e) => {
4313
4309
  ref: o,
4314
4310
  class: "flex-1 overflow-y-auto overflow-x-hidden py-8 space-y-1 min-h-0 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden"
4315
4311
  }, [
4316
- (d(!0), v(Ie, null, rt(e.selfController?.sharedMessages.value.filter((m) => m.sender !== "system") ?? [], (m, y) => (d(), v("div", {
4312
+ (d(!0), v(Ae, null, rt(e.selfController?.sharedMessages.value.filter((m) => m.sender !== "system") ?? [], (m, y) => (d(), v("div", {
4317
4313
  key: m.id,
4318
4314
  class: z(["flex gap-2 items-end", {
4319
4315
  "justify-end": m.sender === "user",
@@ -4408,7 +4404,7 @@ const Z = /* @__PURE__ */ s((e) => {
4408
4404
  emits: ["click"],
4409
4405
  setup(e) {
4410
4406
  const r = T(!1);
4411
- return Ce(() => {
4407
+ return Ie(() => {
4412
4408
  setTimeout(() => {
4413
4409
  r.value = !0;
4414
4410
  }, 100);
@@ -4469,7 +4465,7 @@ const Z = /* @__PURE__ */ s((e) => {
4469
4465
  position: "justify-end",
4470
4466
  closeButton: "-left-16"
4471
4467
  });
4472
- return (u, c) => (d(), v(Ie, null, [
4468
+ return (u, c) => (d(), v(Ae, null, [
4473
4469
  U(_e, {
4474
4470
  "enter-active-class": "transition-opacity duration-300 ease-out",
4475
4471
  "leave-active-class": "transition-opacity duration-200 ease-in",
@@ -4514,7 +4510,7 @@ const Z = /* @__PURE__ */ s((e) => {
4514
4510
  l("h3", os, R(e.title), 1)
4515
4511
  ])) : E("", !0),
4516
4512
  u.$slots.header ? (d(), v("div", rs, [
4517
- Ae(u.$slots, "header")
4513
+ Me(u.$slots, "header")
4518
4514
  ])) : E("", !0),
4519
4515
  l("div", {
4520
4516
  class: z(["flex-1 p-6 space-y-2 overflow-y-auto", { "pt-6": !e.title && !u.$slots.header, "pt-4": e.title || u.$slots.header }])
@@ -4528,7 +4524,7 @@ const Z = /* @__PURE__ */ s((e) => {
4528
4524
  "leave-to-class": Y(n) === "left" ? "-translate-x-4 opacity-0" : "translate-x-4 opacity-0"
4529
4525
  }, {
4530
4526
  default: se(() => [
4531
- (d(!0), v(Ie, null, rt(f.value, (m, y) => (d(), v("button", {
4527
+ (d(!0), v(Ae, null, rt(f.value, (m, y) => (d(), v("button", {
4532
4528
  key: m.key || m.label || y,
4533
4529
  style: st({ transitionDelay: `${y * 40}ms` }),
4534
4530
  class: z(["cursor-pointer w-full text-left p-3 rounded-xl transition-all duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] group", [
@@ -4559,7 +4555,7 @@ const Z = /* @__PURE__ */ s((e) => {
4559
4555
  }, 8, ["enter-from-class", "leave-to-class"])
4560
4556
  ], 2),
4561
4557
  l("div", ls, [
4562
- Ae(u.$slots, "footer", {}, () => [
4558
+ Me(u.$slots, "footer", {}, () => [
4563
4559
  c[4] || (c[4] = l("div", { class: "text-center" }, [
4564
4560
  l("p", { class: "text-[10px] text-white/40 font-sans" }, [
4565
4561
  He(" Digital Self by "),
@@ -4688,7 +4684,7 @@ const Z = /* @__PURE__ */ s((e) => {
4688
4684
  let t = null, n = null;
4689
4685
  const a = T(!1), i = T(!0), f = /* @__PURE__ */ new Map();
4690
4686
  let h = null, C = null, u = null;
4691
- const c = T(!1), m = T(null), { bars: y, barWidth: g, barSpacing: P, minHeight: H, maxHeight: X, STIFFNESS: ze, DAMPING: Se, PEAK_HOLD_TIME: ue, PEAK_DECAY_STIFFNESS: pe, PEAK_DECAY_DAMPING: he } = xo, re = new Float32Array(y).fill(H), S = new Float32Array(y).fill(0), ne = new Float32Array(y).fill(H), ce = new Float32Array(y).fill(H), fe = new Float32Array(y).fill(0), ge = new Float32Array(y).fill(0);
4687
+ const c = T(!1), m = T(null), { bars: y, barWidth: g, barSpacing: P, minHeight: H, maxHeight: X, STIFFNESS: ze, DAMPING: Ce, PEAK_HOLD_TIME: ue, PEAK_DECAY_STIFFNESS: pe, PEAK_DECAY_DAMPING: he } = xo, re = new Float32Array(y).fill(H), S = new Float32Array(y).fill(0), ne = new Float32Array(y).fill(H), ce = new Float32Array(y).fill(H), fe = new Float32Array(y).fill(0), ge = new Float32Array(y).fill(0);
4692
4688
  function We(b) {
4693
4689
  return b < 200 ? { stiffnessMultiplier: 0.7, dampingMultiplier: 1.2 } : b < 1e3 ? { stiffnessMultiplier: 1, dampingMultiplier: 1 } : b < 4e3 ? { stiffnessMultiplier: 1.3, dampingMultiplier: 0.8 } : { stiffnessMultiplier: 1.5, dampingMultiplier: 0.6 };
4694
4690
  }
@@ -4892,7 +4888,7 @@ const Z = /* @__PURE__ */ s((e) => {
4892
4888
  ne[k] = H + O[k] * (X - H);
4893
4889
  const be = 16.67;
4894
4890
  for (let k = 0; k < y; k++) {
4895
- const de = _[k], ee = We(de), J = ne[k] - re[k], ae = ze * ee.stiffnessMultiplier, Fe = Se * ee.dampingMultiplier, le = J * ae - S[k] * Fe;
4891
+ const de = _[k], ee = We(de), J = ne[k] - re[k], ae = ze * ee.stiffnessMultiplier, Fe = Ce * ee.dampingMultiplier, le = J * ae - S[k] * Fe;
4896
4892
  if (S[k] += le, re[k] += S[k], re[k] > ce[k])
4897
4893
  ce[k] = re[k], fe[k] = ue, ge[k] = 0;
4898
4894
  else if (fe[k] = Math.max(0, fe[k] - be), fe[k] <= 0) {
@@ -4944,7 +4940,7 @@ const Z = /* @__PURE__ */ s((e) => {
4944
4940
  }
4945
4941
  s(L, "animate"), n = requestAnimationFrame(L);
4946
4942
  }
4947
- s(nt, "startAnimation"), Ce(() => {
4943
+ s(nt, "startAnimation"), Ie(() => {
4948
4944
  if (o.value) {
4949
4945
  if (t = o.value.getContext("2d"), ie(), typeof window < "u") {
4950
4946
  window.addEventListener("resize", yt, { passive: !0 });
@@ -5121,7 +5117,7 @@ const Z = /* @__PURE__ */ s((e) => {
5121
5117
  f.value.style.setProperty(`--primary-${P}`, H);
5122
5118
  });
5123
5119
  }
5124
- return s(m, "applyTheme"), Ce(() => {
5120
+ return s(m, "applyTheme"), Ie(() => {
5125
5121
  try {
5126
5122
  c(), m(e.theme);
5127
5123
  } catch (y) {
@@ -5207,7 +5203,7 @@ const Z = /* @__PURE__ */ s((e) => {
5207
5203
  })
5208
5204
  ])
5209
5205
  ])) : h.value === "talk" ? (d(), v("div", Ls, [
5210
- C.value ? (d(), v(Ie, { key: 1 }, [
5206
+ C.value ? (d(), v(Ae, { key: 1 }, [
5211
5207
  l("div", null, [
5212
5208
  l("div", Ts, [
5213
5209
  U(No, { self: e.self }, null, 8, ["self"])
@@ -5220,7 +5216,7 @@ const Z = /* @__PURE__ */ s((e) => {
5220
5216
  }, null, 8, ["sdk"]))
5221
5217
  ])) : (d(), v("div", Ps, [
5222
5218
  l("div", Fs, [
5223
- h.value === "chat" ? (d(), v(Ie, { key: 0 }, [
5219
+ h.value === "chat" ? (d(), v(Ae, { key: 0 }, [
5224
5220
  C.value ? (d(), Q(qr, {
5225
5221
  key: 1,
5226
5222
  "self-controller": t.value,
@@ -5291,7 +5287,7 @@ const Z = /* @__PURE__ */ s((e) => {
5291
5287
  },
5292
5288
  setup(e) {
5293
5289
  const r = e, o = T(!r.self), t = T(r.self), n = T();
5294
- return Ce(async () => {
5290
+ return Ie(async () => {
5295
5291
  if (r.self) {
5296
5292
  o.value = !1;
5297
5293
  return;
@@ -5312,7 +5308,7 @@ const Z = /* @__PURE__ */ s((e) => {
5312
5308
  }), (a, i) => (d(), v("div", Rs, [
5313
5309
  o.value ? (d(), v("div", Ns, [...i[0] || (i[0] = [
5314
5310
  l("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
5315
- ])])) : t.value ? Ae(a.$slots, "default", {
5311
+ ])])) : t.value ? Me(a.$slots, "default", {
5316
5312
  key: 1,
5317
5313
  self: t.value,
5318
5314
  context: e.context,
@@ -5462,7 +5458,7 @@ const Z = /* @__PURE__ */ s((e) => {
5462
5458
  ...a,
5463
5459
  ...i
5464
5460
  ], h = T(!1), C = [];
5465
- Ce(async () => {
5461
+ Ie(async () => {
5466
5462
  t.value = !0;
5467
5463
  const c = oe(
5468
5464
  () => e.vis,
@@ -5536,7 +5532,7 @@ const Z = /* @__PURE__ */ s((e) => {
5536
5532
  }, [
5537
5533
  e.title ? (d(), v("h2", Ks, R(e.title), 1)) : E("", !0),
5538
5534
  e.hasClose || c.$slots.actions ? (d(), v("div", Zs, [
5539
- Ae(c.$slots, "actions"),
5535
+ Me(c.$slots, "actions"),
5540
5536
  e.hasClose ? (d(), Q(Kt, {
5541
5537
  key: 0,
5542
5538
  class: "relative",
@@ -5545,7 +5541,7 @@ const Z = /* @__PURE__ */ s((e) => {
5545
5541
  })) : E("", !0)
5546
5542
  ])) : E("", !0)
5547
5543
  ], 2)) : E("", !0),
5548
- Ae(c.$slots, "default")
5544
+ Me(c.$slots, "default")
5549
5545
  ])) : E("", !0)
5550
5546
  ]),
5551
5547
  _: 3