holostaff-widget 3.0.0 → 3.0.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.
Files changed (25) hide show
  1. package/dist/{BufferResource-DeLlYxf8.js → BufferResource-BsetVigd.js} +4 -4
  2. package/dist/{BufferResource-DeLlYxf8.js.map → BufferResource-BsetVigd.js.map} +1 -1
  3. package/dist/{CanvasRenderer-BgLtSh22.js → CanvasRenderer-Cnd4gbWc.js} +5 -5
  4. package/dist/{CanvasRenderer-BgLtSh22.js.map → CanvasRenderer-Cnd4gbWc.js.map} +1 -1
  5. package/dist/{Geometry-Bdq2tsB3.js → Geometry-C_hP7eDY.js} +2 -2
  6. package/dist/{Geometry-Bdq2tsB3.js.map → Geometry-C_hP7eDY.js.map} +1 -1
  7. package/dist/{RenderTargetSystem-BCBByEgg.js → RenderTargetSystem-oYKzpCzn.js} +3 -3
  8. package/dist/{RenderTargetSystem-BCBByEgg.js.map → RenderTargetSystem-oYKzpCzn.js.map} +1 -1
  9. package/dist/{WebGLRenderer-3x7mgYt9.js → WebGLRenderer-CnlX2m2i.js} +5 -5
  10. package/dist/{WebGLRenderer-3x7mgYt9.js.map → WebGLRenderer-CnlX2m2i.js.map} +1 -1
  11. package/dist/{WebGPURenderer-CdbjQMqs.js → WebGPURenderer-CwI3VE9f.js} +6 -6
  12. package/dist/{WebGPURenderer-CdbjQMqs.js.map → WebGPURenderer-CwI3VE9f.js.map} +1 -1
  13. package/dist/{browserAll-DejMU3y7.js → browserAll-DrS3vkVd.js} +3 -3
  14. package/dist/{browserAll-DejMU3y7.js.map → browserAll-DrS3vkVd.js.map} +1 -1
  15. package/dist/{getTextureBatchBindGroup-CHJWR-eE.js → getTextureBatchBindGroup-C0vQRfwn.js} +3 -3
  16. package/dist/{getTextureBatchBindGroup-CHJWR-eE.js.map → getTextureBatchBindGroup-C0vQRfwn.js.map} +1 -1
  17. package/dist/hs-widget.es.js +1 -1
  18. package/dist/hs-widget.umd.js +68 -68
  19. package/dist/hs-widget.umd.js.map +1 -1
  20. package/dist/{index-C1ZbqCjI.js → index-B7aJuEyO.js} +742 -733
  21. package/dist/index-B7aJuEyO.js.map +1 -0
  22. package/dist/{webworkerAll-D5g5Ds7S.js → webworkerAll-BNR1nfRY.js} +3 -3
  23. package/dist/{webworkerAll-D5g5Ds7S.js.map → webworkerAll-BNR1nfRY.js.map} +1 -1
  24. package/package.json +1 -1
  25. package/dist/index-C1ZbqCjI.js.map +0 -1
@@ -12,7 +12,7 @@ const Ne = {
12
12
  visionWsUrl: null,
13
13
  visionConsent: "auto"
14
14
  };
15
- function Fo(i) {
15
+ function Po(i) {
16
16
  const e = i.dataset.staffId;
17
17
  if (!e)
18
18
  throw new Error("[HolostaffWidget] data-staff-id attribute is required");
@@ -32,13 +32,13 @@ function Fo(i) {
32
32
  visionConsent: i.dataset.hsConsent ?? Ne.visionConsent
33
33
  };
34
34
  }
35
- const Po = ["bottom-center", "bottom-left", "bottom-right"], Uo = ["scroll", "delay", "immediate"], Wo = ["light", "dark", "auto"];
36
- function Go(i, e, t) {
35
+ const Uo = ["bottom-center", "bottom-left", "bottom-right"], Wo = ["scroll", "delay", "immediate"], Go = ["light", "dark", "auto"];
36
+ function Vo(i, e, t) {
37
37
  const s = { ...i };
38
- return !e.dataset.trigger && t.trigger && Uo.includes(t.trigger) && (s.trigger = t.trigger), !e.dataset.position && t.position && Po.includes(t.position) && (s.position = t.position), !e.dataset.theme && t.theme && Wo.includes(t.theme) && (s.theme = t.theme), !e.dataset.scrollThreshold && t.scrollThreshold != null && (s.scrollThreshold = t.scrollThreshold), !e.dataset.delayMs && t.delayMs != null && (s.delayMs = t.delayMs), !e.dataset.visionWsUrl && t.visionWsUrl && (s.visionWsUrl = t.visionWsUrl), s;
38
+ return !e.dataset.trigger && t.trigger && Wo.includes(t.trigger) && (s.trigger = t.trigger), !e.dataset.position && t.position && Uo.includes(t.position) && (s.position = t.position), !e.dataset.theme && t.theme && Go.includes(t.theme) && (s.theme = t.theme), !e.dataset.scrollThreshold && t.scrollThreshold != null && (s.scrollThreshold = t.scrollThreshold), !e.dataset.delayMs && t.delayMs != null && (s.delayMs = t.delayMs), !e.dataset.visionWsUrl && t.visionWsUrl && (s.visionWsUrl = t.visionWsUrl), s;
39
39
  }
40
40
  const Ts = "https://us-central1-holostaff-ai.cloudfunctions.net";
41
- async function Vo(i, e = Ts) {
41
+ async function Ho(i, e = Ts) {
42
42
  const t = await fetch(`${e}/widgetSession`, {
43
43
  method: "POST",
44
44
  headers: { "Content-Type": "application/json" },
@@ -50,17 +50,22 @@ async function Vo(i, e = Ts) {
50
50
  }
51
51
  return t.json();
52
52
  }
53
- async function Ho(i, e = Ts) {
53
+ class $n extends Error {
54
+ constructor(e) {
55
+ super(e), this.name = "WidgetDisabledError";
56
+ }
57
+ }
58
+ async function $o(i, e = Ts) {
54
59
  const t = await fetch(
55
60
  `${e}/widgetConfig?staffId=${encodeURIComponent(i)}`
56
61
  );
57
62
  if (!t.ok) {
58
63
  const s = await t.json().catch(() => ({ error: t.statusText }));
59
- throw new Error(s.error || `Config request failed: ${t.status}`);
64
+ throw s.disabled === !0 || t.status === 404 ? new $n(s.error || "Agent not available") : new Error(s.error || `Config request failed: ${t.status}`);
60
65
  }
61
66
  return t.json();
62
67
  }
63
- async function $o(i, e, t, s = Ts) {
68
+ async function jo(i, e, t, s = Ts) {
64
69
  const n = await fetch(`${s}/widgetPageAction`, {
65
70
  method: "POST",
66
71
  headers: { "Content-Type": "application/json" },
@@ -274,7 +279,7 @@ const cs = (i) => {
274
279
  for (const t of e)
275
280
  Object.defineProperties(i.prototype, Object.getOwnPropertyDescriptors(t));
276
281
  }
277
- }, jo = {
282
+ }, zo = {
278
283
  extension: {
279
284
  type: Z.Environment,
280
285
  name: "browser",
@@ -282,9 +287,9 @@ const cs = (i) => {
282
287
  },
283
288
  test: () => !0,
284
289
  load: async () => {
285
- await import("./browserAll-DejMU3y7.js");
290
+ await import("./browserAll-DrS3vkVd.js");
286
291
  }
287
- }, zo = {
292
+ }, Yo = {
288
293
  extension: {
289
294
  type: Z.Environment,
290
295
  name: "webworker",
@@ -292,7 +297,7 @@ const cs = (i) => {
292
297
  },
293
298
  test: () => typeof self < "u" && self.WorkerGlobalScope !== void 0,
294
299
  load: async () => {
295
- await import("./webworkerAll-D5g5Ds7S.js");
300
+ await import("./webworkerAll-BNR1nfRY.js");
296
301
  }
297
302
  };
298
303
  class ye {
@@ -466,11 +471,11 @@ class ye {
466
471
  this._y !== e && (this._y = e, this._observer._onUpdate(this));
467
472
  }
468
473
  }
469
- function Yo(i) {
474
+ function Xo(i) {
470
475
  return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
471
476
  }
472
477
  var Hi = { exports: {} }, Us;
473
- function Xo() {
478
+ function qo() {
474
479
  return Us || (Us = 1, (function(i) {
475
480
  var e = Object.prototype.hasOwnProperty, t = "~";
476
481
  function s() {
@@ -576,8 +581,8 @@ function Xo() {
576
581
  }, o.prototype.off = o.prototype.removeListener, o.prototype.addListener = o.prototype.on, o.prefixed = t, o.EventEmitter = o, i.exports = o;
577
582
  })(Hi)), Hi.exports;
578
583
  }
579
- var qo = Xo();
580
- const ai = /* @__PURE__ */ Yo(qo), Ko = Math.PI * 2, Zo = 180 / Math.PI, Jo = Math.PI / 180;
584
+ var Ko = qo();
585
+ const ai = /* @__PURE__ */ Xo(Ko), Zo = Math.PI * 2, Jo = 180 / Math.PI, Qo = Math.PI / 180;
581
586
  class ze {
582
587
  /**
583
588
  * Creates a new `Point`
@@ -1143,7 +1148,7 @@ class Y {
1143
1148
  */
1144
1149
  decompose(e) {
1145
1150
  const t = this.a, s = this.b, n = this.c, r = this.d, a = e.pivot, o = -Math.atan2(-n, r), h = Math.atan2(s, t), d = Math.abs(o + h);
1146
- return d < 1e-5 || Math.abs(Ko - d) < 1e-5 ? (e.rotation = h, e.skew.x = e.skew.y = 0) : (e.rotation = 0, e.skew.x = o, e.skew.y = h), e.scale.x = Math.sqrt(t * t + s * s), e.scale.y = Math.sqrt(n * n + r * r), e.position.x = this.tx + (a.x * t + a.y * n), e.position.y = this.ty + (a.x * s + a.y * r), e;
1151
+ return d < 1e-5 || Math.abs(Zo - d) < 1e-5 ? (e.rotation = h, e.skew.x = e.skew.y = 0) : (e.rotation = 0, e.skew.x = o, e.skew.y = h), e.scale.x = Math.sqrt(t * t + s * s), e.scale.y = Math.sqrt(n * n + r * r), e.position.x = this.tx + (a.x * t + a.y * n), e.position.y = this.ty + (a.x * s + a.y * r), e;
1147
1152
  }
1148
1153
  /**
1149
1154
  * Inverts this matrix.
@@ -1341,7 +1346,7 @@ class Y {
1341
1346
  * @see {@link Matrix.identity} For resetting matrices
1342
1347
  */
1343
1348
  static get IDENTITY() {
1344
- return ea.identity();
1349
+ return ta.identity();
1345
1350
  }
1346
1351
  /**
1347
1352
  * A static Matrix that can be used to avoid creating new objects.
@@ -1369,11 +1374,11 @@ class Y {
1369
1374
  * @see {@link Matrix.identity} For resetting matrices
1370
1375
  */
1371
1376
  static get shared() {
1372
- return Qo.identity();
1377
+ return ea.identity();
1373
1378
  }
1374
1379
  }
1375
- const Qo = new Y(), ea = new Y(), mt = [1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1], gt = [0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1], yt = [0, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1], Ct = [1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1], ds = [], $n = [], fi = Math.sign;
1376
- function ta() {
1380
+ const ea = new Y(), ta = new Y(), mt = [1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1], gt = [0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1], yt = [0, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1], Ct = [1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1], ds = [], jn = [], fi = Math.sign;
1381
+ function ia() {
1377
1382
  for (let i = 0; i < 16; i++) {
1378
1383
  const e = [];
1379
1384
  ds.push(e);
@@ -1388,10 +1393,10 @@ function ta() {
1388
1393
  }
1389
1394
  for (let i = 0; i < 16; i++) {
1390
1395
  const e = new Y();
1391
- e.set(mt[i], gt[i], yt[i], Ct[i], 0, 0), $n.push(e);
1396
+ e.set(mt[i], gt[i], yt[i], Ct[i], 0, 0), jn.push(e);
1392
1397
  }
1393
1398
  }
1394
- ta();
1399
+ ia();
1395
1400
  const V = {
1396
1401
  /**
1397
1402
  * | Rotation | Direction |
@@ -1588,7 +1593,7 @@ const V = {
1588
1593
  * @param {number} dh - sprite height
1589
1594
  */
1590
1595
  matrixAppendRotationInv: (i, e, t = 0, s = 0, n = 0, r = 0) => {
1591
- const a = $n[V.inv(e)], o = a.a, h = a.b, d = a.c, f = a.d, u = t - Math.min(0, o * n, d * r, o * n + d * r), y = s - Math.min(0, h * n, f * r, h * n + f * r), g = i.a, C = i.b, _ = i.c, E = i.d;
1596
+ const a = jn[V.inv(e)], o = a.a, h = a.b, d = a.c, f = a.d, u = t - Math.min(0, o * n, d * r, o * n + d * r), y = s - Math.min(0, h * n, f * r, h * n + f * r), g = i.a, C = i.b, _ = i.c, E = i.d;
1592
1597
  i.a = o * g + h * _, i.b = o * C + h * E, i.c = d * g + f * _, i.d = d * C + f * E, i.tx = u * g + y * _ + i.tx, i.ty = u * C + y * E + i.ty;
1593
1598
  },
1594
1599
  /**
@@ -2156,7 +2161,7 @@ const ji = {
2156
2161
  function Ze(i = "default") {
2157
2162
  return ji[i] === void 0 && (ji[i] = -1), ++ji[i];
2158
2163
  }
2159
- const Ws = /* @__PURE__ */ new Set(), Qe = "8.0.0", lu = "8.3.4", kt = {
2164
+ const Ws = /* @__PURE__ */ new Set(), Qe = "8.0.0", hu = "8.3.4", kt = {
2160
2165
  quiet: !1,
2161
2166
  noColor: !1
2162
2167
  }, Oe = ((i, e, t = 3) => {
@@ -2191,7 +2196,7 @@ Object.defineProperties(Oe, {
2191
2196
  configurable: !1
2192
2197
  }
2193
2198
  });
2194
- const jn = () => {
2199
+ const zn = () => {
2195
2200
  };
2196
2201
  function Gs(i) {
2197
2202
  return i += i === 0 ? 1 : 0, --i, i |= i >>> 1, i |= i >>> 2, i |= i >>> 4, i |= i >>> 8, i |= i >>> 16, i + 1;
@@ -2199,23 +2204,23 @@ function Gs(i) {
2199
2204
  function Vs(i) {
2200
2205
  return !(i & i - 1) && !!i;
2201
2206
  }
2202
- function ia(i) {
2207
+ function sa(i) {
2203
2208
  const e = {};
2204
2209
  for (const t in i)
2205
2210
  i[t] !== void 0 && (e[t] = i[t]);
2206
2211
  return e;
2207
2212
  }
2208
2213
  const Hs = /* @__PURE__ */ Object.create(null);
2209
- function sa(i) {
2214
+ function na(i) {
2210
2215
  const e = Hs[i];
2211
2216
  return e === void 0 && (Hs[i] = Ze("resource")), e;
2212
2217
  }
2213
- const zn = class Yn extends ai {
2218
+ const Yn = class Xn extends ai {
2214
2219
  /**
2215
2220
  * @param options - options for the style
2216
2221
  */
2217
2222
  constructor(e = {}) {
2218
- super(), this._resourceType = "textureSampler", this._touched = 0, this._maxAnisotropy = 1, this.destroyed = !1, e = { ...Yn.defaultOptions, ...e }, this.addressMode = e.addressMode, this.addressModeU = e.addressModeU ?? this.addressModeU, this.addressModeV = e.addressModeV ?? this.addressModeV, this.addressModeW = e.addressModeW ?? this.addressModeW, this.scaleMode = e.scaleMode, this.magFilter = e.magFilter ?? this.magFilter, this.minFilter = e.minFilter ?? this.minFilter, this.mipmapFilter = e.mipmapFilter ?? this.mipmapFilter, this.lodMinClamp = e.lodMinClamp, this.lodMaxClamp = e.lodMaxClamp, this.compare = e.compare, this.maxAnisotropy = e.maxAnisotropy ?? 1;
2223
+ super(), this._resourceType = "textureSampler", this._touched = 0, this._maxAnisotropy = 1, this.destroyed = !1, e = { ...Xn.defaultOptions, ...e }, this.addressMode = e.addressMode, this.addressModeU = e.addressModeU ?? this.addressModeU, this.addressModeV = e.addressModeV ?? this.addressModeV, this.addressModeW = e.addressModeW ?? this.addressModeW, this.scaleMode = e.scaleMode, this.magFilter = e.magFilter ?? this.magFilter, this.minFilter = e.minFilter ?? this.minFilter, this.mipmapFilter = e.mipmapFilter ?? this.mipmapFilter, this.lodMinClamp = e.lodMinClamp, this.lodMaxClamp = e.lodMaxClamp, this.compare = e.compare, this.maxAnisotropy = e.maxAnisotropy ?? 1;
2219
2224
  }
2220
2225
  set addressMode(e) {
2221
2226
  this.addressModeU = e, this.addressModeV = e, this.addressModeW = e;
@@ -2253,24 +2258,24 @@ const zn = class Yn extends ai {
2253
2258
  }
2254
2259
  _generateResourceId() {
2255
2260
  const e = `${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.minFilter}-${this.mipmapFilter}-${this.lodMinClamp}-${this.lodMaxClamp}-${this.compare}-${this._maxAnisotropy}`;
2256
- return this._sharedResourceId = sa(e), this._resourceId;
2261
+ return this._sharedResourceId = na(e), this._resourceId;
2257
2262
  }
2258
2263
  /** Destroys the style */
2259
2264
  destroy() {
2260
2265
  this.destroyed = !0, this.emit("destroy", this), this.emit("change", this), this.removeAllListeners();
2261
2266
  }
2262
2267
  };
2263
- zn.defaultOptions = {
2268
+ Yn.defaultOptions = {
2264
2269
  addressMode: "clamp-to-edge",
2265
2270
  scaleMode: "linear"
2266
2271
  };
2267
- let Xn = zn;
2268
- const qn = class Kn extends ai {
2272
+ let qn = Yn;
2273
+ const Kn = class Zn extends ai {
2269
2274
  /**
2270
2275
  * @param options - options for creating a new TextureSource
2271
2276
  */
2272
2277
  constructor(e = {}) {
2273
- super(), this.options = e, this._gpuData = /* @__PURE__ */ Object.create(null), this._gcLastUsed = -1, this.uid = Ze("textureSource"), this._resourceType = "textureSource", this._resourceId = Ze("resource"), this.uploadMethodId = "unknown", this._resolution = 1, this.pixelWidth = 1, this.pixelHeight = 1, this.width = 1, this.height = 1, this.sampleCount = 1, this.mipLevelCount = 1, this.autoGenerateMipmaps = !1, this.format = "rgba8unorm", this.dimension = "2d", this.viewDimension = "2d", this.arrayLayerCount = 1, this.antialias = !1, this._touched = 0, this._batchTick = -1, this._textureBindLocation = -1, e = { ...Kn.defaultOptions, ...e }, this.label = e.label ?? "", this.resource = e.resource, this.autoGarbageCollect = e.autoGarbageCollect, this._resolution = e.resolution, e.width ? this.pixelWidth = e.width * this._resolution : this.pixelWidth = this.resource ? this.resourceWidth ?? 1 : 1, e.height ? this.pixelHeight = e.height * this._resolution : this.pixelHeight = this.resource ? this.resourceHeight ?? 1 : 1, this.width = this.pixelWidth / this._resolution, this.height = this.pixelHeight / this._resolution, this.format = e.format, this.dimension = e.dimensions, this.viewDimension = e.viewDimension ?? e.dimensions, this.arrayLayerCount = e.arrayLayerCount, this.mipLevelCount = e.mipLevelCount, this.autoGenerateMipmaps = e.autoGenerateMipmaps, this.sampleCount = e.sampleCount, this.antialias = e.antialias, this.alphaMode = e.alphaMode, this.style = new Xn(ia(e)), this.destroyed = !1, this._refreshPOT();
2278
+ super(), this.options = e, this._gpuData = /* @__PURE__ */ Object.create(null), this._gcLastUsed = -1, this.uid = Ze("textureSource"), this._resourceType = "textureSource", this._resourceId = Ze("resource"), this.uploadMethodId = "unknown", this._resolution = 1, this.pixelWidth = 1, this.pixelHeight = 1, this.width = 1, this.height = 1, this.sampleCount = 1, this.mipLevelCount = 1, this.autoGenerateMipmaps = !1, this.format = "rgba8unorm", this.dimension = "2d", this.viewDimension = "2d", this.arrayLayerCount = 1, this.antialias = !1, this._touched = 0, this._batchTick = -1, this._textureBindLocation = -1, e = { ...Zn.defaultOptions, ...e }, this.label = e.label ?? "", this.resource = e.resource, this.autoGarbageCollect = e.autoGarbageCollect, this._resolution = e.resolution, e.width ? this.pixelWidth = e.width * this._resolution : this.pixelWidth = this.resource ? this.resourceWidth ?? 1 : 1, e.height ? this.pixelHeight = e.height * this._resolution : this.pixelHeight = this.resource ? this.resourceHeight ?? 1 : 1, this.width = this.pixelWidth / this._resolution, this.height = this.pixelHeight / this._resolution, this.format = e.format, this.dimension = e.dimensions, this.viewDimension = e.viewDimension ?? e.dimensions, this.arrayLayerCount = e.arrayLayerCount, this.mipLevelCount = e.mipLevelCount, this.autoGenerateMipmaps = e.autoGenerateMipmaps, this.sampleCount = e.sampleCount, this.antialias = e.antialias, this.alphaMode = e.alphaMode, this.style = new qn(sa(e)), this.destroyed = !1, this._refreshPOT();
2274
2279
  }
2275
2280
  /** returns itself */
2276
2281
  get source() {
@@ -2438,7 +2443,7 @@ const qn = class Kn extends ai {
2438
2443
  throw new Error("Unimplemented");
2439
2444
  }
2440
2445
  };
2441
- qn.defaultOptions = {
2446
+ Kn.defaultOptions = {
2442
2447
  resolution: 1,
2443
2448
  format: "bgra8unorm",
2444
2449
  alphaMode: "premultiply-alpha-on-upload",
@@ -2451,7 +2456,7 @@ qn.defaultOptions = {
2451
2456
  antialias: !1,
2452
2457
  autoGarbageCollect: !1
2453
2458
  };
2454
- let Ge = qn;
2459
+ let Ge = Kn;
2455
2460
  class Rs extends Ge {
2456
2461
  constructor(e) {
2457
2462
  const t = e.resource || new Float32Array(e.width * e.height * 4);
@@ -2468,7 +2473,7 @@ class Rs extends Ge {
2468
2473
  }
2469
2474
  Rs.extension = Z.TextureSource;
2470
2475
  const $s = new Y();
2471
- class na {
2476
+ class ra {
2472
2477
  /**
2473
2478
  * @param texture - observed texture
2474
2479
  * @param clampMargin - Changes frame clamping, 0.5 by default. Use -0.5 for extra border.
@@ -2553,7 +2558,7 @@ class ie extends ai {
2553
2558
  }
2554
2559
  /** returns a TextureMatrix instance for this texture. By default, that object is not created because its heavy. */
2555
2560
  get textureMatrix() {
2556
- return this._textureMatrix || (this._textureMatrix = new na(this)), this._textureMatrix;
2561
+ return this._textureMatrix || (this._textureMatrix = new ra(this)), this._textureMatrix;
2557
2562
  }
2558
2563
  /** The width of the Texture in pixels. */
2559
2564
  get width() {
@@ -2599,7 +2604,7 @@ ie.EMPTY = new ie({
2599
2604
  label: "EMPTY"
2600
2605
  })
2601
2606
  });
2602
- ie.EMPTY.destroy = jn;
2607
+ ie.EMPTY.destroy = zn;
2603
2608
  ie.WHITE = new ie({
2604
2609
  source: new Rs({
2605
2610
  resource: new Uint8Array([255, 255, 255, 255]),
@@ -2610,8 +2615,8 @@ ie.WHITE = new ie({
2610
2615
  }),
2611
2616
  label: "WHITE"
2612
2617
  });
2613
- ie.WHITE.destroy = jn;
2614
- function ra(i, e, t) {
2618
+ ie.WHITE.destroy = zn;
2619
+ function oa(i, e, t) {
2615
2620
  const { width: s, height: n } = t.orig, r = t.trim;
2616
2621
  if (r) {
2617
2622
  const a = r.width, o = r.height;
@@ -3232,49 +3237,49 @@ class ft {
3232
3237
  return this.minX = e.minX, this.minY = e.minY, this.maxX = e.maxX, this.maxY = e.maxY, this;
3233
3238
  }
3234
3239
  }
3235
- var oa = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, Ke = function(i) {
3240
+ var aa = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, Ke = function(i) {
3236
3241
  return typeof i == "string" ? i.length > 0 : typeof i == "number";
3237
3242
  }, le = function(i, e, t) {
3238
3243
  return e === void 0 && (e = 0), t === void 0 && (t = Math.pow(10, e)), Math.round(t * i) / t + 0;
3239
3244
  }, Le = function(i, e, t) {
3240
3245
  return e === void 0 && (e = 0), t === void 0 && (t = 1), i > t ? t : i > e ? i : e;
3241
- }, Zn = function(i) {
3246
+ }, Jn = function(i) {
3242
3247
  return (i = isFinite(i) ? i % 360 : 0) > 0 ? i : i + 360;
3243
3248
  }, zs = function(i) {
3244
3249
  return { r: Le(i.r, 0, 255), g: Le(i.g, 0, 255), b: Le(i.b, 0, 255), a: Le(i.a) };
3245
3250
  }, zi = function(i) {
3246
3251
  return { r: le(i.r), g: le(i.g), b: le(i.b), a: le(i.a, 3) };
3247
- }, aa = /^#([0-9a-f]{3,8})$/i, mi = function(i) {
3252
+ }, la = /^#([0-9a-f]{3,8})$/i, mi = function(i) {
3248
3253
  var e = i.toString(16);
3249
3254
  return e.length < 2 ? "0" + e : e;
3250
- }, Jn = function(i) {
3255
+ }, Qn = function(i) {
3251
3256
  var e = i.r, t = i.g, s = i.b, n = i.a, r = Math.max(e, t, s), a = r - Math.min(e, t, s), o = a ? r === e ? (t - s) / a : r === t ? 2 + (s - e) / a : 4 + (e - t) / a : 0;
3252
3257
  return { h: 60 * (o < 0 ? o + 6 : o), s: r ? a / r * 100 : 0, v: r / 255 * 100, a: n };
3253
- }, Qn = function(i) {
3258
+ }, er = function(i) {
3254
3259
  var e = i.h, t = i.s, s = i.v, n = i.a;
3255
3260
  e = e / 360 * 6, t /= 100, s /= 100;
3256
3261
  var r = Math.floor(e), a = s * (1 - t), o = s * (1 - (e - r) * t), h = s * (1 - (1 - e + r) * t), d = r % 6;
3257
3262
  return { r: 255 * [s, o, a, a, h, s][d], g: 255 * [h, s, s, o, a, a][d], b: 255 * [a, a, h, s, s, o][d], a: n };
3258
3263
  }, Ys = function(i) {
3259
- return { h: Zn(i.h), s: Le(i.s, 0, 100), l: Le(i.l, 0, 100), a: Le(i.a) };
3264
+ return { h: Jn(i.h), s: Le(i.s, 0, 100), l: Le(i.l, 0, 100), a: Le(i.a) };
3260
3265
  }, Xs = function(i) {
3261
3266
  return { h: le(i.h), s: le(i.s), l: le(i.l), a: le(i.a, 3) };
3262
3267
  }, qs = function(i) {
3263
- return Qn((t = (e = i).s, { h: e.h, s: (t *= ((s = e.l) < 50 ? s : 100 - s) / 100) > 0 ? 2 * t / (s + t) * 100 : 0, v: s + t, a: e.a }));
3268
+ return er((t = (e = i).s, { h: e.h, s: (t *= ((s = e.l) < 50 ? s : 100 - s) / 100) > 0 ? 2 * t / (s + t) * 100 : 0, v: s + t, a: e.a }));
3264
3269
  var e, t, s;
3265
3270
  }, Zt = function(i) {
3266
- return { h: (e = Jn(i)).h, s: (n = (200 - (t = e.s)) * (s = e.v) / 100) > 0 && n < 200 ? t * s / 100 / (n <= 100 ? n : 200 - n) * 100 : 0, l: n / 2, a: e.a };
3271
+ return { h: (e = Qn(i)).h, s: (n = (200 - (t = e.s)) * (s = e.v) / 100) > 0 && n < 200 ? t * s / 100 / (n <= 100 ? n : 200 - n) * 100 : 0, l: n / 2, a: e.a };
3267
3272
  var e, t, s, n;
3268
- }, la = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, ha = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, ca = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, da = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, us = { string: [[function(i) {
3269
- var e = aa.exec(i);
3273
+ }, ha = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, ca = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, da = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, ua = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, us = { string: [[function(i) {
3274
+ var e = la.exec(i);
3270
3275
  return e ? (i = e[1]).length <= 4 ? { r: parseInt(i[0] + i[0], 16), g: parseInt(i[1] + i[1], 16), b: parseInt(i[2] + i[2], 16), a: i.length === 4 ? le(parseInt(i[3] + i[3], 16) / 255, 2) : 1 } : i.length === 6 || i.length === 8 ? { r: parseInt(i.substr(0, 2), 16), g: parseInt(i.substr(2, 2), 16), b: parseInt(i.substr(4, 2), 16), a: i.length === 8 ? le(parseInt(i.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
3271
3276
  }, "hex"], [function(i) {
3272
- var e = ca.exec(i) || da.exec(i);
3277
+ var e = da.exec(i) || ua.exec(i);
3273
3278
  return e ? e[2] !== e[4] || e[4] !== e[6] ? null : zs({ r: Number(e[1]) / (e[2] ? 100 / 255 : 1), g: Number(e[3]) / (e[4] ? 100 / 255 : 1), b: Number(e[5]) / (e[6] ? 100 / 255 : 1), a: e[7] === void 0 ? 1 : Number(e[7]) / (e[8] ? 100 : 1) }) : null;
3274
3279
  }, "rgb"], [function(i) {
3275
- var e = la.exec(i) || ha.exec(i);
3280
+ var e = ha.exec(i) || ca.exec(i);
3276
3281
  if (!e) return null;
3277
- var t, s, n = Ys({ h: (t = e[1], s = e[2], s === void 0 && (s = "deg"), Number(t) * (oa[s] || 1)), s: Number(e[3]), l: Number(e[4]), a: e[5] === void 0 ? 1 : Number(e[5]) / (e[6] ? 100 : 1) });
3282
+ var t, s, n = Ys({ h: (t = e[1], s = e[2], s === void 0 && (s = "deg"), Number(t) * (aa[s] || 1)), s: Number(e[3]), l: Number(e[4]), a: e[5] === void 0 ? 1 : Number(e[5]) / (e[6] ? 100 : 1) });
3278
3283
  return qs(n);
3279
3284
  }, "hsl"]], object: [[function(i) {
3280
3285
  var e = i.r, t = i.g, s = i.b, n = i.a, r = n === void 0 ? 1 : n;
@@ -3288,16 +3293,16 @@ var oa = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, Ke = function(i) {
3288
3293
  var e = i.h, t = i.s, s = i.v, n = i.a, r = n === void 0 ? 1 : n;
3289
3294
  if (!Ke(e) || !Ke(t) || !Ke(s)) return null;
3290
3295
  var a = (function(o) {
3291
- return { h: Zn(o.h), s: Le(o.s, 0, 100), v: Le(o.v, 0, 100), a: Le(o.a) };
3296
+ return { h: Jn(o.h), s: Le(o.s, 0, 100), v: Le(o.v, 0, 100), a: Le(o.a) };
3292
3297
  })({ h: Number(e), s: Number(t), v: Number(s), a: Number(r) });
3293
- return Qn(a);
3298
+ return er(a);
3294
3299
  }, "hsv"]] }, Ks = function(i, e) {
3295
3300
  for (var t = 0; t < e.length; t++) {
3296
3301
  var s = e[t][0](i);
3297
3302
  if (s) return [s, e[t][1]];
3298
3303
  }
3299
3304
  return [null, void 0];
3300
- }, ua = function(i) {
3305
+ }, fa = function(i) {
3301
3306
  return typeof i == "string" ? Ks(i.trim(), us.string) : typeof i == "object" && i !== null ? Ks(i, us.object) : [null, void 0];
3302
3307
  }, Yi = function(i, e) {
3303
3308
  var t = Zt(i);
@@ -3309,7 +3314,7 @@ var oa = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, Ke = function(i) {
3309
3314
  return { h: t.h, s: t.s, l: Le(t.l + 100 * e, 0, 100), a: t.a };
3310
3315
  }, fs = (function() {
3311
3316
  function i(e) {
3312
- this.parsed = ua(e)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
3317
+ this.parsed = fa(e)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
3313
3318
  }
3314
3319
  return i.prototype.isValid = function() {
3315
3320
  return this.parsed !== null;
@@ -3333,7 +3338,7 @@ var oa = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, Ke = function(i) {
3333
3338
  return e = Xs(Zt(this.rgba)), t = e.h, s = e.s, n = e.l, (r = e.a) < 1 ? "hsla(" + t + ", " + s + "%, " + n + "%, " + r + ")" : "hsl(" + t + ", " + s + "%, " + n + "%)";
3334
3339
  var e, t, s, n, r;
3335
3340
  }, i.prototype.toHsv = function() {
3336
- return e = Jn(this.rgba), { h: le(e.h), s: le(e.s), v: le(e.v), a: le(e.a, 3) };
3341
+ return e = Qn(this.rgba), { h: le(e.h), s: le(e.s), v: le(e.v), a: le(e.a, 3) };
3337
3342
  var e;
3338
3343
  }, i.prototype.invert = function() {
3339
3344
  return He({ r: 255 - (e = this.rgba).r, g: 255 - e.g, b: 255 - e.b, a: e.a });
@@ -3361,12 +3366,12 @@ var oa = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, Ke = function(i) {
3361
3366
  }, i;
3362
3367
  })(), He = function(i) {
3363
3368
  return i instanceof fs ? i : new fs(i);
3364
- }, Js = [], fa = function(i) {
3369
+ }, Js = [], pa = function(i) {
3365
3370
  i.forEach(function(e) {
3366
3371
  Js.indexOf(e) < 0 && (e(fs, us), Js.push(e));
3367
3372
  });
3368
3373
  };
3369
- function pa(i, e) {
3374
+ function ma(i, e) {
3370
3375
  var t = { white: "#ffffff", bisque: "#ffe4c4", blue: "#0000ff", cadetblue: "#5f9ea0", chartreuse: "#7fff00", chocolate: "#d2691e", coral: "#ff7f50", antiquewhite: "#faebd7", aqua: "#00ffff", azure: "#f0ffff", whitesmoke: "#f5f5f5", papayawhip: "#ffefd5", plum: "#dda0dd", blanchedalmond: "#ffebcd", black: "#000000", gold: "#ffd700", goldenrod: "#daa520", gainsboro: "#dcdcdc", cornsilk: "#fff8dc", cornflowerblue: "#6495ed", burlywood: "#deb887", aquamarine: "#7fffd4", beige: "#f5f5dc", crimson: "#dc143c", cyan: "#00ffff", darkblue: "#00008b", darkcyan: "#008b8b", darkgoldenrod: "#b8860b", darkkhaki: "#bdb76b", darkgray: "#a9a9a9", darkgreen: "#006400", darkgrey: "#a9a9a9", peachpuff: "#ffdab9", darkmagenta: "#8b008b", darkred: "#8b0000", darkorchid: "#9932cc", darkorange: "#ff8c00", darkslateblue: "#483d8b", gray: "#808080", darkslategray: "#2f4f4f", darkslategrey: "#2f4f4f", deeppink: "#ff1493", deepskyblue: "#00bfff", wheat: "#f5deb3", firebrick: "#b22222", floralwhite: "#fffaf0", ghostwhite: "#f8f8ff", darkviolet: "#9400d3", magenta: "#ff00ff", green: "#008000", dodgerblue: "#1e90ff", grey: "#808080", honeydew: "#f0fff0", hotpink: "#ff69b4", blueviolet: "#8a2be2", forestgreen: "#228b22", lawngreen: "#7cfc00", indianred: "#cd5c5c", indigo: "#4b0082", fuchsia: "#ff00ff", brown: "#a52a2a", maroon: "#800000", mediumblue: "#0000cd", lightcoral: "#f08080", darkturquoise: "#00ced1", lightcyan: "#e0ffff", ivory: "#fffff0", lightyellow: "#ffffe0", lightsalmon: "#ffa07a", lightseagreen: "#20b2aa", linen: "#faf0e6", mediumaquamarine: "#66cdaa", lemonchiffon: "#fffacd", lime: "#00ff00", khaki: "#f0e68c", mediumseagreen: "#3cb371", limegreen: "#32cd32", mediumspringgreen: "#00fa9a", lightskyblue: "#87cefa", lightblue: "#add8e6", midnightblue: "#191970", lightpink: "#ffb6c1", mistyrose: "#ffe4e1", moccasin: "#ffe4b5", mintcream: "#f5fffa", lightslategray: "#778899", lightslategrey: "#778899", navajowhite: "#ffdead", navy: "#000080", mediumvioletred: "#c71585", powderblue: "#b0e0e6", palegoldenrod: "#eee8aa", oldlace: "#fdf5e6", paleturquoise: "#afeeee", mediumturquoise: "#48d1cc", mediumorchid: "#ba55d3", rebeccapurple: "#663399", lightsteelblue: "#b0c4de", mediumslateblue: "#7b68ee", thistle: "#d8bfd8", tan: "#d2b48c", orchid: "#da70d6", mediumpurple: "#9370db", purple: "#800080", pink: "#ffc0cb", skyblue: "#87ceeb", springgreen: "#00ff7f", palegreen: "#98fb98", red: "#ff0000", yellow: "#ffff00", slateblue: "#6a5acd", lavenderblush: "#fff0f5", peru: "#cd853f", palevioletred: "#db7093", violet: "#ee82ee", teal: "#008080", slategray: "#708090", slategrey: "#708090", aliceblue: "#f0f8ff", darkseagreen: "#8fbc8f", darkolivegreen: "#556b2f", greenyellow: "#adff2f", seagreen: "#2e8b57", seashell: "#fff5ee", tomato: "#ff6347", silver: "#c0c0c0", sienna: "#a0522d", lavender: "#e6e6fa", lightgreen: "#90ee90", orange: "#ffa500", orangered: "#ff4500", steelblue: "#4682b4", royalblue: "#4169e1", turquoise: "#40e0d0", yellowgreen: "#9acd32", salmon: "#fa8072", saddlebrown: "#8b4513", sandybrown: "#f4a460", rosybrown: "#bc8f8f", darksalmon: "#e9967a", lightgoldenrodyellow: "#fafad2", snow: "#fffafa", lightgrey: "#d3d3d3", lightgray: "#d3d3d3", dimgray: "#696969", dimgrey: "#696969", olivedrab: "#6b8e23", olive: "#808000" }, s = {};
3371
3376
  for (var n in t) s[t[n]] = n;
3372
3377
  var r = {};
@@ -3388,7 +3393,7 @@ function pa(i, e) {
3388
3393
  return h ? new i(h).toRgb() : null;
3389
3394
  }, "name"]);
3390
3395
  }
3391
- fa([pa]);
3396
+ pa([ma]);
3392
3397
  const Bt = class Yt {
3393
3398
  /**
3394
3399
  * @param {ColorSource} value - Optional value to use, if not provided, white is used.
@@ -4064,7 +4069,7 @@ Bt.shared = new Bt();
4064
4069
  Bt._temp = new Bt();
4065
4070
  Bt.HEX_PATTERN = /^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;
4066
4071
  let Ii = Bt;
4067
- const ma = {
4072
+ const ga = {
4068
4073
  cullArea: null,
4069
4074
  cullable: !1,
4070
4075
  cullableChildren: !0
@@ -4121,7 +4126,7 @@ const Os = {
4121
4126
  this._registeredResources.clear();
4122
4127
  }
4123
4128
  };
4124
- class ga {
4129
+ class ya {
4125
4130
  /**
4126
4131
  * Constructs a new Pool.
4127
4132
  * @param ClassType - The constructor of the items in the pool.
@@ -4187,7 +4192,7 @@ class ga {
4187
4192
  this._pool.length = 0, this._count = 0, this._index = 0;
4188
4193
  }
4189
4194
  }
4190
- class ya {
4195
+ class Ca {
4191
4196
  constructor() {
4192
4197
  this._poolsByClass = /* @__PURE__ */ new Map();
4193
4198
  }
@@ -4224,7 +4229,7 @@ class ya {
4224
4229
  * @returns {Pool<T>} The pool of the given class type.
4225
4230
  */
4226
4231
  getPool(e) {
4227
- return this._poolsByClass.has(e) || this._poolsByClass.set(e, new ga(e)), this._poolsByClass.get(e);
4232
+ return this._poolsByClass.has(e) || this._poolsByClass.set(e, new ya(e)), this._poolsByClass.get(e);
4228
4233
  }
4229
4234
  /** gets the usage stats of each pool in the system */
4230
4235
  stats() {
@@ -4243,9 +4248,9 @@ class ya {
4243
4248
  this._poolsByClass.forEach((e) => e.clear()), this._poolsByClass.clear();
4244
4249
  }
4245
4250
  }
4246
- const Et = new ya();
4251
+ const Et = new Ca();
4247
4252
  Os.register(Et);
4248
- const Ca = {
4253
+ const ba = {
4249
4254
  get isCachedAsTexture() {
4250
4255
  var i;
4251
4256
  return !!((i = this.renderGroup) != null && i.isCachedAsTexture);
@@ -4264,7 +4269,7 @@ const Ca = {
4264
4269
  Oe("v8.6.0", "cacheAsBitmap is deprecated, use cacheAsTexture instead."), this.cacheAsTexture(i);
4265
4270
  }
4266
4271
  };
4267
- function ba(i, e, t) {
4272
+ function _a(i, e, t) {
4268
4273
  const s = i.length;
4269
4274
  let n;
4270
4275
  if (e >= s || t === 0)
@@ -4275,7 +4280,7 @@ function ba(i, e, t) {
4275
4280
  i[n] = i[n + t];
4276
4281
  i.length = r;
4277
4282
  }
4278
- const _a = {
4283
+ const Ea = {
4279
4284
  allowChildren: !0,
4280
4285
  removeChildren(i = 0, e) {
4281
4286
  var r;
@@ -4285,7 +4290,7 @@ const _a = {
4285
4290
  const h = this.children[o];
4286
4291
  h && (n.push(h), h.parent = null);
4287
4292
  }
4288
- ba(this.children, i, t);
4293
+ _a(this.children, i, t);
4289
4294
  const a = this.renderGroup || this.parentRenderGroup;
4290
4295
  a && a.removeChildren(n);
4291
4296
  for (let o = 0; o < n.length; ++o) {
@@ -4362,7 +4367,7 @@ const _a = {
4362
4367
  replaceChild(i, e) {
4363
4368
  i.updateLocalTransform(), this.addChildAt(e, this.getChildIndex(i)), e.setFromMatrix(i.localTransform), e.updateLocalTransform(), this.removeChild(i);
4364
4369
  }
4365
- }, Ea = {
4370
+ }, va = {
4366
4371
  collectRenderables(i, e, t) {
4367
4372
  this.parentRenderLayer && this.parentRenderLayer !== t || this.globalDisplayStatus < 7 || !this.includeInBuild || (this.sortableChildren && this.sortChildren(), this.isSimple ? this.collectRenderablesSimple(i, e, t) : this.renderGroup ? e.renderPipes.renderGroup.addRenderGroup(this.renderGroup, i) : this.collectRenderablesWithEffects(i, e, t));
4368
4373
  },
@@ -4394,7 +4399,7 @@ class en {
4394
4399
  this.filters = null, this.filterArea = null;
4395
4400
  }
4396
4401
  }
4397
- class va {
4402
+ class Sa {
4398
4403
  constructor() {
4399
4404
  this._effectClasses = [], this._tests = [], this._initialized = !1;
4400
4405
  }
@@ -4422,9 +4427,9 @@ class va {
4422
4427
  Et.return(e);
4423
4428
  }
4424
4429
  }
4425
- const ps = new va();
4430
+ const ps = new Sa();
4426
4431
  De.handleByList(Z.MaskEffect, ps._effectClasses);
4427
- const Sa = {
4432
+ const Ia = {
4428
4433
  _maskEffect: null,
4429
4434
  _maskOptions: {
4430
4435
  inverse: !1
@@ -4475,7 +4480,7 @@ const Sa = {
4475
4480
  var i;
4476
4481
  return (i = this._filterEffect) == null ? void 0 : i.filterArea;
4477
4482
  }
4478
- }, Ia = {
4483
+ }, Aa = {
4479
4484
  label: null,
4480
4485
  get name() {
4481
4486
  return Oe(Qe, "Container.name property has been removed, use Container.label instead"), this.label;
@@ -4511,7 +4516,7 @@ const Sa = {
4511
4516
  s[n].getChildrenByLabel(i, !0, t);
4512
4517
  return t;
4513
4518
  }
4514
- }, Se = Et.getPool(Y), Je = Et.getPool(ft), Aa = new Y(), wa = {
4519
+ }, Se = Et.getPool(Y), Je = Et.getPool(ft), wa = new Y(), xa = {
4515
4520
  getFastGlobalBounds(i, e) {
4516
4521
  e || (e = new ft()), e.clear(), this._getGlobalBoundsRecursive(!!i, e, this.parentRenderLayer), e.isValid || e.set(0, 0, 0, 0);
4517
4522
  const t = this.renderGroup || this.parentRenderGroup;
@@ -4544,16 +4549,16 @@ const Sa = {
4544
4549
  const a = this.renderGroup || this.parentRenderGroup;
4545
4550
  for (let o = 0; o < this.effects.length; o++)
4546
4551
  this.effects[o].addBounds && (r || (r = !0, s.applyMatrix(a.worldTransform)), this.effects[o].addBounds(s, !0));
4547
- r && s.applyMatrix(a.worldTransform.copyTo(Aa).invert()), e.addBounds(s), Je.return(s);
4552
+ r && s.applyMatrix(a.worldTransform.copyTo(wa).invert()), e.addBounds(s), Je.return(s);
4548
4553
  } else this.renderGroup && (e.addBounds(s, this.relativeGroupTransform), Je.return(s));
4549
4554
  }
4550
4555
  };
4551
- function er(i, e, t) {
4556
+ function tr(i, e, t) {
4552
4557
  t.clear();
4553
4558
  let s, n;
4554
- return i.parent ? e ? s = i.parent.worldTransform : (n = Se.get().identity(), s = ks(i, n)) : s = Y.IDENTITY, tr(i, t, s, e), n && Se.return(n), t.isValid || t.set(0, 0, 0, 0), t;
4559
+ return i.parent ? e ? s = i.parent.worldTransform : (n = Se.get().identity(), s = ks(i, n)) : s = Y.IDENTITY, ir(i, t, s, e), n && Se.return(n), t.isValid || t.set(0, 0, 0, 0), t;
4555
4560
  }
4556
- function tr(i, e, t, s) {
4561
+ function ir(i, e, t, s) {
4557
4562
  var o, h;
4558
4563
  if (!i.visible || !i.measurable) return;
4559
4564
  let n;
@@ -4565,7 +4570,7 @@ function tr(i, e, t, s) {
4565
4570
  const d = i.bounds;
4566
4571
  d && !d.isEmpty() && (e.matrix = n, e.addBounds(d));
4567
4572
  for (let f = 0; f < i.children.length; f++)
4568
- tr(i.children[f], e, n, s);
4573
+ ir(i.children[f], e, n, s);
4569
4574
  }
4570
4575
  if (a) {
4571
4576
  for (let d = 0; d < i.effects.length; d++)
@@ -4578,7 +4583,7 @@ function ks(i, e) {
4578
4583
  const t = i.parent;
4579
4584
  return t && (ks(t, e), t.updateLocalTransform(), e.append(t.localTransform)), e;
4580
4585
  }
4581
- function xa(i, e) {
4586
+ function Ta(i, e) {
4582
4587
  if (i === 16777215 || !e) return e;
4583
4588
  if (e === 16777215 || !i) return i;
4584
4589
  const t = i >> 16 & 255, s = i >> 8 & 255, n = i & 255, r = e >> 16 & 255, a = e >> 8 & 255, o = e & 255, h = t * r / 255 | 0, d = s * a / 255 | 0, f = n * o / 255 | 0;
@@ -4586,12 +4591,12 @@ function xa(i, e) {
4586
4591
  }
4587
4592
  const tn = 16777215;
4588
4593
  function sn(i, e) {
4589
- return i === tn ? e : e === tn ? i : xa(i, e);
4594
+ return i === tn ? e : e === tn ? i : Ta(i, e);
4590
4595
  }
4591
4596
  function Ai(i) {
4592
4597
  return ((i & 255) << 16) + (i & 65280) + (i >> 16 & 255);
4593
4598
  }
4594
- const Ta = {
4599
+ const Ra = {
4595
4600
  getGlobalAlpha(i) {
4596
4601
  if (i)
4597
4602
  return this.renderGroup ? this.renderGroup.worldAlpha : this.parentRenderGroup ? this.parentRenderGroup.worldAlpha * this.alpha : this.alpha;
@@ -4618,10 +4623,10 @@ const Ta = {
4618
4623
  return Ai(e);
4619
4624
  }
4620
4625
  };
4621
- function ir(i, e, t) {
4622
- return e.clear(), t || (t = Y.IDENTITY), sr(i, e, t, i, !0), e.isValid || e.set(0, 0, 0, 0), e;
4626
+ function sr(i, e, t) {
4627
+ return e.clear(), t || (t = Y.IDENTITY), nr(i, e, t, i, !0), e.isValid || e.set(0, 0, 0, 0), e;
4623
4628
  }
4624
- function sr(i, e, t, s, n) {
4629
+ function nr(i, e, t, s, n) {
4625
4630
  var h, d;
4626
4631
  let r;
4627
4632
  if (n)
@@ -4639,7 +4644,7 @@ function sr(i, e, t, s, n) {
4639
4644
  i.renderPipeId && (e.matrix = r, e.addBounds(i.bounds));
4640
4645
  const f = i.children;
4641
4646
  for (let u = 0; u < f.length; u++)
4642
- sr(f[u], e, r, s, !1);
4647
+ nr(f[u], e, r, s, !1);
4643
4648
  }
4644
4649
  if (o) {
4645
4650
  for (let f = 0; f < i.effects.length; f++)
@@ -4648,15 +4653,15 @@ function sr(i, e, t, s, n) {
4648
4653
  }
4649
4654
  Se.return(r);
4650
4655
  }
4651
- function nr(i, e) {
4656
+ function rr(i, e) {
4652
4657
  const t = i.children;
4653
4658
  for (let s = 0; s < t.length; s++) {
4654
4659
  const n = t[s], r = n.uid, a = (n._didViewChangeTick & 65535) << 16 | n._didContainerChangeTick & 65535, o = e.index;
4655
- (e.data[o] !== r || e.data[o + 1] !== a) && (e.data[e.index] = r, e.data[e.index + 1] = a, e.didChange = !0), e.index = o + 2, n.children.length && nr(n, e);
4660
+ (e.data[o] !== r || e.data[o + 1] !== a) && (e.data[e.index] = r, e.data[e.index + 1] = a, e.didChange = !0), e.index = o + 2, n.children.length && rr(n, e);
4656
4661
  }
4657
4662
  return e.didChange;
4658
4663
  }
4659
- const Ra = new Y(), Oa = {
4664
+ const Oa = new Y(), ka = {
4660
4665
  _localBoundsCacheId: -1,
4661
4666
  _localBoundsCacheData: null,
4662
4667
  _setWidth(i, e) {
@@ -4675,12 +4680,12 @@ const Ra = new Y(), Oa = {
4675
4680
  localBounds: new ft()
4676
4681
  });
4677
4682
  const i = this._localBoundsCacheData;
4678
- return i.index = 1, i.didChange = !1, i.data[0] !== this._didViewChangeTick && (i.didChange = !0, i.data[0] = this._didViewChangeTick), nr(this, i), i.didChange && ir(this, i.localBounds, Ra), i.localBounds;
4683
+ return i.index = 1, i.didChange = !1, i.data[0] !== this._didViewChangeTick && (i.didChange = !0, i.data[0] = this._didViewChangeTick), rr(this, i), i.didChange && sr(this, i.localBounds, Oa), i.localBounds;
4679
4684
  },
4680
4685
  getBounds(i, e) {
4681
- return er(this, i, e || new ft());
4686
+ return tr(this, i, e || new ft());
4682
4687
  }
4683
- }, ka = {
4688
+ }, Ma = {
4684
4689
  _onRender: null,
4685
4690
  set onRender(i) {
4686
4691
  const e = this.renderGroup || this.parentRenderGroup;
@@ -4693,7 +4698,7 @@ const Ra = new Y(), Oa = {
4693
4698
  get onRender() {
4694
4699
  return this._onRender;
4695
4700
  }
4696
- }, Ma = {
4701
+ }, Na = {
4697
4702
  _zIndex: 0,
4698
4703
  sortDirty: !1,
4699
4704
  sortableChildren: !1,
@@ -4707,13 +4712,13 @@ const Ra = new Y(), Oa = {
4707
4712
  this.parent && (this.parent.sortableChildren = !0, this.parent.sortDirty = !0), this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0);
4708
4713
  },
4709
4714
  sortChildren() {
4710
- this.sortDirty && (this.sortDirty = !1, this.children.sort(Na));
4715
+ this.sortDirty && (this.sortDirty = !1, this.children.sort(La));
4711
4716
  }
4712
4717
  };
4713
- function Na(i, e) {
4718
+ function La(i, e) {
4714
4719
  return i._zIndex - e._zIndex;
4715
4720
  }
4716
- const La = {
4721
+ const Da = {
4717
4722
  getGlobalPosition(i = new ze(), e = !1) {
4718
4723
  return this.parent ? this.parent.toGlobal(this._position, i, e) : (i.x = this._position.x, i.y = this._position.y), i;
4719
4724
  },
@@ -4727,7 +4732,7 @@ const La = {
4727
4732
  return t = n.applyInverse(i, t), Se.return(n), t;
4728
4733
  }
4729
4734
  };
4730
- class Da {
4735
+ class Ba {
4731
4736
  constructor() {
4732
4737
  this.uid = Ze("instructionSet"), this.instructions = [], this.instructionSize = 0, this.renderables = [], this.gcTick = 0;
4733
4738
  }
@@ -4757,14 +4762,14 @@ class Da {
4757
4762
  this.instructions.length = this.instructionSize, console.table(this.instructions, ["type", "action"]);
4758
4763
  }
4759
4764
  }
4760
- let Ba = 0;
4761
- class Fa {
4765
+ let Fa = 0;
4766
+ class Pa {
4762
4767
  /**
4763
4768
  * @param textureOptions - options that will be passed to BaseRenderTexture constructor
4764
4769
  * @param {SCALE_MODE} [textureOptions.scaleMode] - See {@link SCALE_MODE} for possible values.
4765
4770
  */
4766
4771
  constructor(e) {
4767
- this._poolKeyHash = /* @__PURE__ */ Object.create(null), this._texturePool = {}, this.textureOptions = e || {}, this.enableFullScreen = !1, this.textureStyle = new Xn(this.textureOptions);
4772
+ this._poolKeyHash = /* @__PURE__ */ Object.create(null), this._texturePool = {}, this.textureOptions = e || {}, this.enableFullScreen = !1, this.textureStyle = new qn(this.textureOptions);
4768
4773
  }
4769
4774
  /**
4770
4775
  * Creates texture with params that were specified in pool constructor.
@@ -4785,7 +4790,7 @@ class Fa {
4785
4790
  });
4786
4791
  return new ie({
4787
4792
  source: r,
4788
- label: `texturePool_${Ba++}`
4793
+ label: `texturePool_${Fa++}`
4789
4794
  });
4790
4795
  }
4791
4796
  /**
@@ -4849,11 +4854,11 @@ class Fa {
4849
4854
  this._texturePool = {};
4850
4855
  }
4851
4856
  }
4852
- const rr = new Fa();
4853
- Os.register(rr);
4854
- class Pa {
4857
+ const or = new Pa();
4858
+ Os.register(or);
4859
+ class Ua {
4855
4860
  constructor() {
4856
- this.renderPipeId = "renderGroup", this.root = null, this.canBundle = !1, this.renderGroupParent = null, this.renderGroupChildren = [], this.worldTransform = new Y(), this.worldColorAlpha = 4294967295, this.worldColor = 16777215, this.worldAlpha = 1, this.childrenToUpdate = /* @__PURE__ */ Object.create(null), this.updateTick = 0, this.gcTick = 0, this.childrenRenderablesToUpdate = { list: [], index: 0 }, this.structureDidChange = !0, this.instructionSet = new Da(), this._onRenderContainers = [], this.textureNeedsUpdate = !0, this.isCachedAsTexture = !1, this._matrixDirty = 7;
4861
+ this.renderPipeId = "renderGroup", this.root = null, this.canBundle = !1, this.renderGroupParent = null, this.renderGroupChildren = [], this.worldTransform = new Y(), this.worldColorAlpha = 4294967295, this.worldColor = 16777215, this.worldAlpha = 1, this.childrenToUpdate = /* @__PURE__ */ Object.create(null), this.updateTick = 0, this.gcTick = 0, this.childrenRenderablesToUpdate = { list: [], index: 0 }, this.structureDidChange = !0, this.instructionSet = new Ba(), this._onRenderContainers = [], this.textureNeedsUpdate = !0, this.isCachedAsTexture = !1, this._matrixDirty = 7;
4857
4862
  }
4858
4863
  init(e) {
4859
4864
  this.root = e, e._onRender && this.addOnRender(e), e.didChange = !0;
@@ -4867,7 +4872,7 @@ class Pa {
4867
4872
  this.textureOptions = e, this.isCachedAsTexture = !0, this.textureNeedsUpdate = !0;
4868
4873
  }
4869
4874
  disableCacheAsTexture() {
4870
- this.isCachedAsTexture = !1, this.texture && (rr.returnTexture(this.texture, !0), this.texture = null);
4875
+ this.isCachedAsTexture = !1, this.texture && (or.returnTexture(this.texture, !0), this.texture = null);
4871
4876
  }
4872
4877
  updateCacheTexture() {
4873
4878
  this.textureNeedsUpdate = !0;
@@ -5006,15 +5011,15 @@ class Pa {
5006
5011
  return this.isCachedAsTexture ? this.textureOffsetInverseTransform : this._parentCacheAsTextureRenderGroup ? this._parentCacheAsTextureRenderGroup.textureOffsetInverseTransform : null;
5007
5012
  }
5008
5013
  }
5009
- function Ua(i, e, t = {}) {
5014
+ function Wa(i, e, t = {}) {
5010
5015
  for (const s in e)
5011
5016
  !t[s] && e[s] !== void 0 && (i[s] = e[s]);
5012
5017
  }
5013
- const Ki = new ye(null), gi = new ye(null), Zi = new ye(null, 1, 1), yi = new ye(null), nn = 1, Wa = 2, Ji = 4;
5018
+ const Ki = new ye(null), gi = new ye(null), Zi = new ye(null, 1, 1), yi = new ye(null), nn = 1, Ga = 2, Ji = 4;
5014
5019
  class We extends ai {
5015
5020
  constructor(e = {}) {
5016
5021
  var t, s;
5017
- super(), this.uid = Ze("renderable"), this._updateFlags = 15, this.renderGroup = null, this.parentRenderGroup = null, this.parentRenderGroupIndex = 0, this.didChange = !1, this.didViewUpdate = !1, this.relativeRenderGroupDepth = 0, this.children = [], this.parent = null, this.includeInBuild = !0, this.measurable = !0, this.isSimple = !0, this.parentRenderLayer = null, this.updateTick = -1, this.localTransform = new Y(), this.relativeGroupTransform = new Y(), this.groupTransform = this.relativeGroupTransform, this.destroyed = !1, this._position = new ye(this, 0, 0), this._scale = Zi, this._pivot = gi, this._origin = yi, this._skew = Ki, this._cx = 1, this._sx = 0, this._cy = 0, this._sy = 1, this._rotation = 0, this.localColor = 16777215, this.localAlpha = 1, this.groupAlpha = 1, this.groupColor = 16777215, this.groupColorAlpha = 4294967295, this.localBlendMode = "inherit", this.groupBlendMode = "normal", this.localDisplayStatus = 7, this.globalDisplayStatus = 7, this._didContainerChangeTick = 0, this._didViewChangeTick = 0, this._didLocalTransformChangeId = -1, this.effects = [], Ua(this, e, {
5022
+ super(), this.uid = Ze("renderable"), this._updateFlags = 15, this.renderGroup = null, this.parentRenderGroup = null, this.parentRenderGroupIndex = 0, this.didChange = !1, this.didViewUpdate = !1, this.relativeRenderGroupDepth = 0, this.children = [], this.parent = null, this.includeInBuild = !0, this.measurable = !0, this.isSimple = !0, this.parentRenderLayer = null, this.updateTick = -1, this.localTransform = new Y(), this.relativeGroupTransform = new Y(), this.groupTransform = this.relativeGroupTransform, this.destroyed = !1, this._position = new ye(this, 0, 0), this._scale = Zi, this._pivot = gi, this._origin = yi, this._skew = Ki, this._cx = 1, this._sx = 0, this._cy = 0, this._sy = 1, this._rotation = 0, this.localColor = 16777215, this.localAlpha = 1, this.groupAlpha = 1, this.groupColor = 16777215, this.groupColorAlpha = 4294967295, this.localBlendMode = "inherit", this.groupBlendMode = "normal", this.localDisplayStatus = 7, this.globalDisplayStatus = 7, this._didContainerChangeTick = 0, this._didViewChangeTick = 0, this._didLocalTransformChangeId = -1, this.effects = [], Wa(this, e, {
5018
5023
  children: !0,
5019
5024
  parent: !0,
5020
5025
  effects: !0
@@ -5123,7 +5128,7 @@ class We extends ai {
5123
5128
  enableRenderGroup() {
5124
5129
  if (this.renderGroup) return;
5125
5130
  const e = this.parentRenderGroup;
5126
- e == null || e.removeChild(this), this.renderGroup = Et.get(Pa, this), this.groupTransform = Y.IDENTITY, e == null || e.addChild(this), this._updateIsSimple();
5131
+ e == null || e.removeChild(this), this.renderGroup = Et.get(Ua, this), this.groupTransform = Y.IDENTITY, e == null || e.addChild(this), this._updateIsSimple();
5127
5132
  }
5128
5133
  /**
5129
5134
  * This will disable the render group for this container.
@@ -5256,10 +5261,10 @@ class We extends ai {
5256
5261
  * ```
5257
5262
  */
5258
5263
  get angle() {
5259
- return this.rotation * Zo;
5264
+ return this.rotation * Jo;
5260
5265
  }
5261
5266
  set angle(e) {
5262
- this.rotation = e * Jo;
5267
+ this.rotation = e * Qo;
5263
5268
  }
5264
5269
  /**
5265
5270
  * The center of rotation, scaling, and skewing for this display object in its local space.
@@ -5593,7 +5598,7 @@ class We extends ai {
5593
5598
  }
5594
5599
  // / //////////////// blend related stuff
5595
5600
  set blendMode(e) {
5596
- this.localBlendMode !== e && (this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0), this._updateFlags |= Wa, this.localBlendMode = e, this._onUpdate());
5601
+ this.localBlendMode !== e && (this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0), this._updateFlags |= Ga, this.localBlendMode = e, this._onUpdate());
5597
5602
  }
5598
5603
  /**
5599
5604
  * The blend mode to be applied to the sprite. Controls how pixels are blended when rendering.
@@ -5701,20 +5706,20 @@ class We extends ai {
5701
5706
  }
5702
5707
  De.mixin(
5703
5708
  We,
5704
- _a,
5705
- wa,
5706
- La,
5709
+ Ea,
5710
+ xa,
5711
+ Da,
5712
+ Ma,
5707
5713
  ka,
5708
- Oa,
5709
- Sa,
5710
5714
  Ia,
5711
- Ma,
5712
- ma,
5713
- Ca,
5714
- Ta,
5715
- Ea
5715
+ Aa,
5716
+ Na,
5717
+ ga,
5718
+ ba,
5719
+ Ra,
5720
+ va
5716
5721
  );
5717
- class Ga extends We {
5722
+ class Va extends We {
5718
5723
  constructor(e) {
5719
5724
  super(e), this.canBundle = !0, this.allowChildren = !1, this._roundPixels = 0, this._lastUsed = -1, this._gpuData = /* @__PURE__ */ Object.create(null), this.autoGarbageCollect = !0, this._gcLastUsed = -1, this._bounds = new ft(0, 1, 0, 0), this._boundsDirty = !0, this.autoGarbageCollect = e.autoGarbageCollect ?? !0;
5720
5725
  }
@@ -5804,7 +5809,7 @@ class Ga extends We {
5804
5809
  n.blendMode.popBlendMode(e);
5805
5810
  }
5806
5811
  }
5807
- class vt extends Ga {
5812
+ class vt extends Va {
5808
5813
  /**
5809
5814
  * @param options - The options for creating the sprite.
5810
5815
  */
@@ -5894,7 +5899,7 @@ class vt extends Ga {
5894
5899
  * // console.log(visualBounds); // { minX: -4, maxX: 62, minY: -4, maxY: 60 }
5895
5900
  */
5896
5901
  get visualBounds() {
5897
- return ra(this._visualBounds, this._anchor, this._texture), this._visualBounds;
5902
+ return oa(this._visualBounds, this._anchor, this._texture), this._visualBounds;
5898
5903
  }
5899
5904
  /**
5900
5905
  * @deprecated
@@ -6072,21 +6077,21 @@ class vt extends Ga {
6072
6077
  typeof e == "object" ? (t = e.height ?? e.width, e = e.width) : t ?? (t = e), e !== void 0 && this._setWidth(e, this._texture.orig.width), t !== void 0 && this._setHeight(t, this._texture.orig.height);
6073
6078
  }
6074
6079
  }
6075
- const Va = new ft();
6076
- function or(i, e, t) {
6077
- const s = Va;
6078
- i.measurable = !0, er(i, t, s), e.addBoundsMask(s), i.measurable = !1;
6079
- }
6080
+ const Ha = new ft();
6080
6081
  function ar(i, e, t) {
6082
+ const s = Ha;
6083
+ i.measurable = !0, tr(i, t, s), e.addBoundsMask(s), i.measurable = !1;
6084
+ }
6085
+ function lr(i, e, t) {
6081
6086
  const s = Je.get();
6082
6087
  i.measurable = !0;
6083
- const n = Se.get().identity(), r = lr(i, t, n);
6084
- ir(i, s, r), i.measurable = !1, e.addBoundsMask(s), Se.return(n), Je.return(s);
6088
+ const n = Se.get().identity(), r = hr(i, t, n);
6089
+ sr(i, s, r), i.measurable = !1, e.addBoundsMask(s), Se.return(n), Je.return(s);
6085
6090
  }
6086
- function lr(i, e, t) {
6087
- return i ? (i !== e && (lr(i.parent, e, t), i.updateLocalTransform(), t.append(i.localTransform)), t) : (ct("Mask bounds, renderable is not inside the root container"), t);
6091
+ function hr(i, e, t) {
6092
+ return i ? (i !== e && (hr(i.parent, e, t), i.updateLocalTransform(), t.append(i.localTransform)), t) : (ct("Mask bounds, renderable is not inside the root container"), t);
6088
6093
  }
6089
- class hr {
6094
+ class cr {
6090
6095
  constructor(e) {
6091
6096
  this.priority = 0, this.inverse = !1, this.pipe = "alphaMask", e != null && e.mask && this.init(e.mask);
6092
6097
  }
@@ -6097,10 +6102,10 @@ class hr {
6097
6102
  this.mask !== null && (this.mask.measurable = !0, this.mask = null);
6098
6103
  }
6099
6104
  addBounds(e, t) {
6100
- this.inverse || or(this.mask, e, t);
6105
+ this.inverse || ar(this.mask, e, t);
6101
6106
  }
6102
6107
  addLocalBounds(e, t) {
6103
- ar(this.mask, e, t);
6108
+ lr(this.mask, e, t);
6104
6109
  }
6105
6110
  containsPoint(e, t) {
6106
6111
  const s = this.mask;
@@ -6113,8 +6118,8 @@ class hr {
6113
6118
  return e instanceof vt;
6114
6119
  }
6115
6120
  }
6116
- hr.extension = Z.MaskEffect;
6117
- class cr {
6121
+ cr.extension = Z.MaskEffect;
6122
+ class dr {
6118
6123
  constructor(e) {
6119
6124
  this.priority = 0, this.pipe = "colorMask", e != null && e.mask && this.init(e.mask);
6120
6125
  }
@@ -6127,8 +6132,8 @@ class cr {
6127
6132
  return typeof e == "number";
6128
6133
  }
6129
6134
  }
6130
- cr.extension = Z.MaskEffect;
6131
- class dr {
6135
+ dr.extension = Z.MaskEffect;
6136
+ class ur {
6132
6137
  constructor(e) {
6133
6138
  this.priority = 0, this.pipe = "stencilMask", e != null && e.mask && this.init(e.mask);
6134
6139
  }
@@ -6139,10 +6144,10 @@ class dr {
6139
6144
  this.mask !== null && (this.mask.measurable = !0, this.mask.includeInBuild = !0, this.mask = null);
6140
6145
  }
6141
6146
  addBounds(e, t) {
6142
- or(this.mask, e, t);
6147
+ ar(this.mask, e, t);
6143
6148
  }
6144
6149
  addLocalBounds(e, t) {
6145
- ar(this.mask, e, t);
6150
+ lr(this.mask, e, t);
6146
6151
  }
6147
6152
  containsPoint(e, t) {
6148
6153
  const s = this.mask;
@@ -6155,8 +6160,8 @@ class dr {
6155
6160
  return e instanceof We;
6156
6161
  }
6157
6162
  }
6158
- dr.extension = Z.MaskEffect;
6159
- const Ha = {
6163
+ ur.extension = Z.MaskEffect;
6164
+ const $a = {
6160
6165
  createCanvas: (i, e) => {
6161
6166
  const t = document.createElement("canvas");
6162
6167
  return t.width = i, t.height = e, t;
@@ -6170,7 +6175,7 @@ const Ha = {
6170
6175
  fetch: (i, e) => fetch(i, e),
6171
6176
  parseXML: (i) => new DOMParser().parseFromString(i, "text/xml")
6172
6177
  };
6173
- let rn = Ha;
6178
+ let rn = $a;
6174
6179
  const Ft = {
6175
6180
  /**
6176
6181
  * Returns the current adapter.
@@ -6187,7 +6192,7 @@ const Ft = {
6187
6192
  rn = i;
6188
6193
  }
6189
6194
  };
6190
- class ur extends Ge {
6195
+ class fr extends Ge {
6191
6196
  constructor(e) {
6192
6197
  e.resource || (e.resource = Ft.get().createCanvas()), e.width || (e.width = e.resource.width, e.autoDensity || (e.width /= e.resolution)), e.height || (e.height = e.resource.height, e.autoDensity || (e.height /= e.resolution)), super(e), this.uploadMethodId = "image", this.autoDensity = e.autoDensity, this.resizeCanvas(), this.transparent = !!e.transparent;
6193
6198
  }
@@ -6210,8 +6215,8 @@ class ur extends Ge {
6210
6215
  return this._context2D || (this._context2D = this.resource.getContext("2d"));
6211
6216
  }
6212
6217
  }
6213
- ur.extension = Z.TextureSource;
6214
- class fr extends Ge {
6218
+ fr.extension = Z.TextureSource;
6219
+ class pr extends Ge {
6215
6220
  constructor(e) {
6216
6221
  super(e), this.uploadMethodId = "image", this.autoGarbageCollect = !0;
6217
6222
  }
@@ -6219,7 +6224,7 @@ class fr extends Ge {
6219
6224
  return globalThis.HTMLImageElement && e instanceof HTMLImageElement || typeof ImageBitmap < "u" && e instanceof ImageBitmap || globalThis.VideoFrame && e instanceof VideoFrame;
6220
6225
  }
6221
6226
  }
6222
- fr.extension = Z.TextureSource;
6227
+ pr.extension = Z.TextureSource;
6223
6228
  var Ri = /* @__PURE__ */ ((i) => (i[i.INTERACTION = 50] = "INTERACTION", i[i.HIGH = 25] = "HIGH", i[i.NORMAL = 0] = "NORMAL", i[i.LOW = -25] = "LOW", i[i.UTILITY = -50] = "UTILITY", i))(Ri || {});
6224
6229
  class Qi {
6225
6230
  /**
@@ -6271,7 +6276,7 @@ class Qi {
6271
6276
  return this.next = e ? null : t, this.previous = null, t;
6272
6277
  }
6273
6278
  }
6274
- const pr = class Te {
6279
+ const mr = class Te {
6275
6280
  constructor() {
6276
6281
  this.autoStart = !1, this.deltaTime = 1, this.lastTime = -1, this.speed = 1, this.started = !1, this._requestId = null, this._maxElapsedMS = 100, this._minElapsedMS = 0, this._protected = !1, this._lastFrame = -1, this._head = new Qi(null, null, 1 / 0), this.deltaMS = 1 / Te.targetFPMS, this.elapsedMS = 1 / Te.targetFPMS, this._tick = (e) => {
6277
6282
  this._requestId = null, this.started && (this.update(e), this.started && this._requestId === null && this._head.next && (this._requestId = requestAnimationFrame(this._tick)));
@@ -6701,9 +6706,9 @@ const pr = class Te {
6701
6706
  return Te._system;
6702
6707
  }
6703
6708
  };
6704
- pr.targetFPMS = 0.06;
6705
- let Mt = pr, es;
6706
- async function $a() {
6709
+ mr.targetFPMS = 0.06;
6710
+ let Mt = mr, es;
6711
+ async function ja() {
6707
6712
  return es ?? (es = (async () => {
6708
6713
  var a;
6709
6714
  const e = Ft.get().createCanvas(1, 1).getContext("webgl");
@@ -6729,10 +6734,10 @@ async function $a() {
6729
6734
  return e.readPixels(0, 0, 1, 1, e.RGBA, e.UNSIGNED_BYTE, r), e.deleteFramebuffer(n), e.deleteTexture(s), (a = e.getExtension("WEBGL_lose_context")) == null || a.loseContext(), r[0] <= r[3] ? "premultiplied-alpha" : "premultiply-alpha-on-upload";
6730
6735
  })()), es;
6731
6736
  }
6732
- const Bi = class mr extends Ge {
6737
+ const Bi = class gr extends Ge {
6733
6738
  constructor(e) {
6734
6739
  super(e), this.isReady = !1, this.uploadMethodId = "video", e = {
6735
- ...mr.defaultOptions,
6740
+ ...gr.defaultOptions,
6736
6741
  ...e
6737
6742
  }, this._autoUpdate = !0, this._isConnectedToTicker = !1, this._updateFPS = e.updateFPS || 0, this._msToNextUpdate = 0, this.autoPlay = e.autoPlay !== !1, this.alphaMode = e.alphaMode ?? "premultiply-alpha-on-upload", this._videoFrameRequestCallback = this._videoFrameRequestCallback.bind(this), this._videoFrameRequestCallbackHandle = null, this._load = null, this._resolve = null, this._reject = null, this._onCanPlay = this._onCanPlay.bind(this), this._onCanPlayThrough = this._onCanPlayThrough.bind(this), this._onError = this._onError.bind(this), this._onPlayStart = this._onPlayStart.bind(this), this._onPlayStop = this._onPlayStop.bind(this), this._onSeeked = this._onSeeked.bind(this), e.autoLoad !== !1 && this.load();
6738
6743
  }
@@ -6767,7 +6772,7 @@ const Bi = class mr extends Ge {
6767
6772
  if (this._load)
6768
6773
  return this._load;
6769
6774
  const e = this.resource, t = this.options;
6770
- return (e.readyState === e.HAVE_ENOUGH_DATA || e.readyState === e.HAVE_FUTURE_DATA) && e.width && e.height && (e.complete = !0), e.addEventListener("play", this._onPlayStart), e.addEventListener("pause", this._onPlayStop), e.addEventListener("seeked", this._onSeeked), this._isSourceReady() ? this._mediaReady() : (t.preload || e.addEventListener("canplay", this._onCanPlay), e.addEventListener("canplaythrough", this._onCanPlayThrough), e.addEventListener("error", this._onError, !0)), this.alphaMode = await $a(), this._load = new Promise((s, n) => {
6775
+ return (e.readyState === e.HAVE_ENOUGH_DATA || e.readyState === e.HAVE_FUTURE_DATA) && e.width && e.height && (e.complete = !0), e.addEventListener("play", this._onPlayStart), e.addEventListener("pause", this._onPlayStop), e.addEventListener("seeked", this._onSeeked), this._isSourceReady() ? this._mediaReady() : (t.preload || e.addEventListener("canplay", this._onCanPlay), e.addEventListener("canplaythrough", this._onCanPlayThrough), e.addEventListener("error", this._onError, !0)), this.alphaMode = await ja(), this._load = new Promise((s, n) => {
6771
6776
  this.isValid ? s(this) : (this._resolve = s, this._reject = n, t.preloadTimeoutMs !== void 0 && (this._preloadTimeout = setTimeout(() => {
6772
6777
  this._onError(new ErrorEvent(`Preload exceeded timeout of ${t.preloadTimeoutMs}ms`));
6773
6778
  })), e.load());
@@ -6888,9 +6893,9 @@ Bi.MIME_TYPES = {
6888
6893
  mov: "video/quicktime",
6889
6894
  m4v: "video/mp4"
6890
6895
  };
6891
- let ja = Bi;
6896
+ let za = Bi;
6892
6897
  const Tt = (i, e, t = !1) => (Array.isArray(i) || (i = [i]), e ? i.map((s) => typeof s == "string" || t ? e(s) : s) : i);
6893
- class za {
6898
+ class Ya {
6894
6899
  constructor() {
6895
6900
  this._parsers = [], this._cache = /* @__PURE__ */ new Map(), this._cacheMap = /* @__PURE__ */ new Map();
6896
6901
  }
@@ -6969,9 +6974,9 @@ class za {
6969
6974
  return this._parsers;
6970
6975
  }
6971
6976
  }
6972
- const Rt = new za(), ms = [];
6977
+ const Rt = new Ya(), ms = [];
6973
6978
  De.handleByList(Z.TextureSource, ms);
6974
- function gr(i = {}) {
6979
+ function yr(i = {}) {
6975
6980
  const e = i && i.resource, t = e ? i.resource : i, s = e ? i : { resource: i };
6976
6981
  for (let n = 0; n < ms.length; n++) {
6977
6982
  const r = ms[n];
@@ -6980,22 +6985,22 @@ function gr(i = {}) {
6980
6985
  }
6981
6986
  throw new Error(`Could not find a source type for resource: ${s.resource}`);
6982
6987
  }
6983
- function Ya(i = {}, e = !1) {
6988
+ function Xa(i = {}, e = !1) {
6984
6989
  const t = i && i.resource, s = t ? i.resource : i, n = t ? i : { resource: i };
6985
6990
  if (!e && Rt.has(s))
6986
6991
  return Rt.get(s);
6987
- const r = new ie({ source: gr(n) });
6992
+ const r = new ie({ source: yr(n) });
6988
6993
  return r.on("destroy", () => {
6989
6994
  Rt.has(s) && Rt.remove(s);
6990
6995
  }), e || Rt.set(s, r), r;
6991
6996
  }
6992
- function Xa(i, e = !1) {
6993
- return typeof i == "string" ? Rt.get(i) : i instanceof Ge ? new ie({ source: i }) : Ya(i, e);
6997
+ function qa(i, e = !1) {
6998
+ return typeof i == "string" ? Rt.get(i) : i instanceof Ge ? new ie({ source: i }) : Xa(i, e);
6994
6999
  }
6995
- ie.from = Xa;
6996
- Ge.from = gr;
6997
- De.add(hr, cr, dr, ja, fr, ur, Rs);
6998
- var yr = /* @__PURE__ */ ((i) => (i[i.Low = 0] = "Low", i[i.Normal = 1] = "Normal", i[i.High = 2] = "High", i))(yr || {});
7000
+ ie.from = qa;
7001
+ Ge.from = yr;
7002
+ De.add(cr, dr, ur, za, pr, fr, Rs);
7003
+ var Cr = /* @__PURE__ */ ((i) => (i[i.Low = 0] = "Low", i[i.Normal = 1] = "Normal", i[i.High = 2] = "High", i))(Cr || {});
6999
7004
  function Fe(i) {
7000
7005
  if (typeof i != "string")
7001
7006
  throw new TypeError(`Path must be a string. Received ${JSON.stringify(i)}`);
@@ -7003,13 +7008,13 @@ function Fe(i) {
7003
7008
  function Ht(i) {
7004
7009
  return i.split("?")[0].split("#")[0];
7005
7010
  }
7006
- function qa(i) {
7011
+ function Ka(i) {
7007
7012
  return i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
7008
7013
  }
7009
- function Ka(i, e, t) {
7010
- return i.replace(new RegExp(qa(e), "g"), t);
7014
+ function Za(i, e, t) {
7015
+ return i.replace(new RegExp(Ka(e), "g"), t);
7011
7016
  }
7012
- function Za(i, e) {
7017
+ function Ja(i, e) {
7013
7018
  let t = "", s = 0, n = -1, r = 0, a = -1;
7014
7019
  for (let o = 0; o <= i.length; ++o) {
7015
7020
  if (o < i.length)
@@ -7052,7 +7057,7 @@ const si = {
7052
7057
  * ```
7053
7058
  */
7054
7059
  toPosix(i) {
7055
- return Ka(i, "\\", "/");
7060
+ return Za(i, "\\", "/");
7056
7061
  },
7057
7062
  /**
7058
7063
  * Checks if the path is a URL e.g. http://, https://
@@ -7173,7 +7178,7 @@ const si = {
7173
7178
  const t = i.startsWith("/");
7174
7179
  this.hasProtocol(i) && (e = this.rootname(i), i = i.slice(e.length));
7175
7180
  const s = i.endsWith("/");
7176
- return i = Za(i), i.length > 0 && s && (i += "/"), t ? `/${i}` : e + i;
7181
+ return i = Ja(i), i.length > 0 && s && (i += "/"), t ? `/${i}` : e + i;
7177
7182
  },
7178
7183
  /**
7179
7184
  * Determines if path is an absolute path.
@@ -7396,27 +7401,27 @@ const si = {
7396
7401
  delimiter: ":",
7397
7402
  joinExtensions: [".html"]
7398
7403
  };
7399
- function Cr(i, e, t, s, n) {
7404
+ function br(i, e, t, s, n) {
7400
7405
  const r = e[t];
7401
7406
  for (let a = 0; a < r.length; a++) {
7402
7407
  const o = r[a];
7403
- t < e.length - 1 ? Cr(i.replace(s[t], o), e, t + 1, s, n) : n.push(i.replace(s[t], o));
7408
+ t < e.length - 1 ? br(i.replace(s[t], o), e, t + 1, s, n) : n.push(i.replace(s[t], o));
7404
7409
  }
7405
7410
  }
7406
- function Ja(i) {
7411
+ function Qa(i) {
7407
7412
  const e = /\{(.*?)\}/g, t = i.match(e), s = [];
7408
7413
  if (t) {
7409
7414
  const n = [];
7410
7415
  t.forEach((r) => {
7411
7416
  const a = r.substring(1, r.length - 1).split(",");
7412
7417
  n.push(a);
7413
- }), Cr(i, n, 0, t, s);
7418
+ }), br(i, n, 0, t, s);
7414
7419
  } else
7415
7420
  s.push(i);
7416
7421
  return s;
7417
7422
  }
7418
7423
  const on = (i) => !Array.isArray(i);
7419
- class br {
7424
+ class _r {
7420
7425
  constructor() {
7421
7426
  this._defaultBundleIdentifierOptions = {
7422
7427
  connector: "-",
@@ -7673,7 +7678,7 @@ class br {
7673
7678
  loadParser: d,
7674
7679
  parser: f
7675
7680
  } = r;
7676
- const u = Tt(a).map((_) => typeof _ == "string" ? Ja(_) : Array.isArray(_) ? _ : [_]), y = this.getAlias(r);
7681
+ const u = Tt(a).map((_) => typeof _ == "string" ? Qa(_) : Array.isArray(_) ? _ : [_]), y = this.getAlias(r);
7677
7682
  Array.isArray(y) ? y.forEach(s) : s(y);
7678
7683
  const g = [], C = (_) => {
7679
7684
  const E = this._parsers.find((A) => A.test(_));
@@ -7838,17 +7843,17 @@ class br {
7838
7843
  }
7839
7844
  _buildResolvedAsset(e, t) {
7840
7845
  const { aliases: s, data: n, loadParser: r, parser: a, format: o, progressSize: h } = t;
7841
- return (this._basePath || this._rootPath) && (e.src = si.toAbsolute(e.src, this._basePath, this._rootPath)), e.alias = s ?? e.alias ?? [e.src], e.src = this._appendDefaultSearchParams(e.src), e.data = { ...n || {}, ...e.data }, e.loadParser = r ?? e.loadParser, e.parser = a ?? e.parser, e.format = o ?? e.format ?? Qa(e.src), h !== void 0 && (e.progressSize = h), e;
7846
+ return (this._basePath || this._rootPath) && (e.src = si.toAbsolute(e.src, this._basePath, this._rootPath)), e.alias = s ?? e.alias ?? [e.src], e.src = this._appendDefaultSearchParams(e.src), e.data = { ...n || {}, ...e.data }, e.loadParser = r ?? e.loadParser, e.parser = a ?? e.parser, e.format = o ?? e.format ?? el(e.src), h !== void 0 && (e.progressSize = h), e;
7842
7847
  }
7843
7848
  }
7844
- br.RETINA_PREFIX = /@([0-9\.]+)x/;
7845
- function Qa(i) {
7849
+ _r.RETINA_PREFIX = /@([0-9\.]+)x/;
7850
+ function el(i) {
7846
7851
  return i.split(".").pop().split("?").shift().split("#").shift();
7847
7852
  }
7848
7853
  const an = (i, e) => {
7849
7854
  const t = e.split("?")[1];
7850
7855
  return t && (i += `?${t}`), i;
7851
- }, _r = class Xt {
7856
+ }, Er = class Xt {
7852
7857
  constructor(e, t) {
7853
7858
  this.linkedSheets = [];
7854
7859
  let s = e;
@@ -7963,9 +7968,9 @@ const an = (i, e) => {
7963
7968
  this._frames = null, this._frameKeys = null, this.data = null, this.textures = null, e && ((t = this._texture) == null || t.destroy(), this.textureSource.destroy()), this._texture = null, this.textureSource = null, this.linkedSheets = [];
7964
7969
  }
7965
7970
  };
7966
- _r.BATCH_SIZE = 1e3;
7967
- let ln = _r;
7968
- const el = [
7971
+ Er.BATCH_SIZE = 1e3;
7972
+ let ln = Er;
7973
+ const tl = [
7969
7974
  "jpg",
7970
7975
  "png",
7971
7976
  "jpeg",
@@ -7983,7 +7988,7 @@ const el = [
7983
7988
  "eac",
7984
7989
  "astc"
7985
7990
  ];
7986
- function Er(i, e, t) {
7991
+ function vr(i, e, t) {
7987
7992
  const s = {};
7988
7993
  if (i.forEach((n) => {
7989
7994
  s[n] = e;
@@ -7992,18 +7997,18 @@ function Er(i, e, t) {
7992
7997
  }), !t) {
7993
7998
  const n = si.dirname(i[0]);
7994
7999
  e.linkedSheets.forEach((r, a) => {
7995
- const o = Er([`${n}/${e.data.meta.related_multi_packs[a]}`], r, !0);
8000
+ const o = vr([`${n}/${e.data.meta.related_multi_packs[a]}`], r, !0);
7996
8001
  Object.assign(s, o);
7997
8002
  });
7998
8003
  }
7999
8004
  return s;
8000
8005
  }
8001
- const tl = {
8006
+ const il = {
8002
8007
  extension: Z.Asset,
8003
8008
  /** Handle the caching of the related Spritesheet Textures */
8004
8009
  cache: {
8005
8010
  test: (i) => i instanceof ln,
8006
- getCacheableAssets: (i, e) => Er(i, e, !1)
8011
+ getCacheableAssets: (i, e) => vr(i, e, !1)
8007
8012
  },
8008
8013
  /** Resolve the resolution of the asset. */
8009
8014
  resolver: {
@@ -8013,13 +8018,13 @@ const tl = {
8013
8018
  },
8014
8019
  test: (i) => {
8015
8020
  const t = i.split("?")[0].split("."), s = t.pop(), n = t.pop();
8016
- return s === "json" && el.includes(n);
8021
+ return s === "json" && tl.includes(n);
8017
8022
  },
8018
8023
  parse: (i) => {
8019
8024
  var t;
8020
8025
  const e = i.split(".");
8021
8026
  return {
8022
- resolution: parseFloat(((t = br.RETINA_PREFIX.exec(i)) == null ? void 0 : t[1]) ?? "1"),
8027
+ resolution: parseFloat(((t = _r.RETINA_PREFIX.exec(i)) == null ? void 0 : t[1]) ?? "1"),
8023
8028
  format: e[e.length - 2],
8024
8029
  src: i
8025
8030
  };
@@ -8037,7 +8042,7 @@ const tl = {
8037
8042
  id: "spritesheet",
8038
8043
  extension: {
8039
8044
  type: Z.LoadParser,
8040
- priority: yr.Normal,
8045
+ priority: Cr.Normal,
8041
8046
  name: "spritesheetLoader"
8042
8047
  },
8043
8048
  async testParse(i, e) {
@@ -8097,10 +8102,10 @@ const tl = {
8097
8102
  }
8098
8103
  }
8099
8104
  };
8100
- De.add(tl);
8105
+ De.add(il);
8101
8106
  const gs = [];
8102
8107
  De.handleByNamedList(Z.Environment, gs);
8103
- async function il(i) {
8108
+ async function sl(i) {
8104
8109
  if (!i)
8105
8110
  for (let e = 0; e < gs.length; e++) {
8106
8111
  const t = gs[e];
@@ -8111,7 +8116,7 @@ async function il(i) {
8111
8116
  }
8112
8117
  }
8113
8118
  let $t;
8114
- function sl() {
8119
+ function nl() {
8115
8120
  if (typeof $t == "boolean")
8116
8121
  return $t;
8117
8122
  try {
@@ -8121,8 +8126,8 @@ function sl() {
8121
8126
  }
8122
8127
  return $t;
8123
8128
  }
8124
- var vr = /* @__PURE__ */ ((i) => (i[i.NONE = 0] = "NONE", i[i.COLOR = 16384] = "COLOR", i[i.STENCIL = 1024] = "STENCIL", i[i.DEPTH = 256] = "DEPTH", i[i.COLOR_DEPTH = 16640] = "COLOR_DEPTH", i[i.COLOR_STENCIL = 17408] = "COLOR_STENCIL", i[i.DEPTH_STENCIL = 1280] = "DEPTH_STENCIL", i[i.ALL = 17664] = "ALL", i))(vr || {});
8125
- class nl {
8129
+ var Sr = /* @__PURE__ */ ((i) => (i[i.NONE = 0] = "NONE", i[i.COLOR = 16384] = "COLOR", i[i.STENCIL = 1024] = "STENCIL", i[i.DEPTH = 256] = "DEPTH", i[i.COLOR_DEPTH = 16640] = "COLOR_DEPTH", i[i.COLOR_STENCIL = 17408] = "COLOR_STENCIL", i[i.DEPTH_STENCIL = 1280] = "DEPTH_STENCIL", i[i.ALL = 17664] = "ALL", i))(Sr || {});
8130
+ class rl {
8126
8131
  /**
8127
8132
  * @param name - The function name that will be executed on the listeners added to this Runner.
8128
8133
  */
@@ -8200,7 +8205,7 @@ class nl {
8200
8205
  return this._name;
8201
8206
  }
8202
8207
  }
8203
- const rl = [
8208
+ const ol = [
8204
8209
  "init",
8205
8210
  "destroy",
8206
8211
  "contextChange",
@@ -8212,7 +8217,7 @@ const rl = [
8212
8217
  "update",
8213
8218
  "postrender",
8214
8219
  "prerender"
8215
- ], Sr = class Ir extends ai {
8220
+ ], Ir = class Ar extends ai {
8216
8221
  /**
8217
8222
  * Set up a system with a collection of SystemClasses and runners.
8218
8223
  * Systems are attached dynamically to this class when added.
@@ -8220,7 +8225,7 @@ const rl = [
8220
8225
  */
8221
8226
  constructor(e) {
8222
8227
  super(), this.tick = 0, this.uid = Ze("renderer"), this.runners = /* @__PURE__ */ Object.create(null), this.renderPipes = /* @__PURE__ */ Object.create(null), this._initOptions = {}, this._systemsHash = /* @__PURE__ */ Object.create(null), this.type = e.type, this.name = e.name, this.config = e;
8223
- const t = [...rl, ...this.config.runners ?? []];
8228
+ const t = [...ol, ...this.config.runners ?? []];
8224
8229
  this._addRunners(...t), this._unsafeEvalCheck();
8225
8230
  }
8226
8231
  /**
@@ -8229,10 +8234,10 @@ const rl = [
8229
8234
  */
8230
8235
  async init(e = {}) {
8231
8236
  const t = e.skipExtensionImports === !0 ? !0 : e.manageImports === !1;
8232
- await il(t), this._addSystems(this.config.systems), this._addPipes(this.config.renderPipes, this.config.renderPipeAdaptors);
8237
+ await sl(t), this._addSystems(this.config.systems), this._addPipes(this.config.renderPipes, this.config.renderPipeAdaptors);
8233
8238
  for (const s in this._systemsHash)
8234
8239
  e = { ...this._systemsHash[s].constructor.defaultOptions, ...e };
8235
- e = { ...Ir.defaultOptions, ...e }, this._roundPixels = e.roundPixels ? 1 : 0;
8240
+ e = { ...Ar.defaultOptions, ...e }, this._roundPixels = e.roundPixels ? 1 : 0;
8236
8241
  for (let s = 0; s < this.runners.init.items.length; s++)
8237
8242
  await this.runners.init.items[s].init(e);
8238
8243
  this._initOptions = e;
@@ -8266,7 +8271,7 @@ const rl = [
8266
8271
  */
8267
8272
  clear(e = {}) {
8268
8273
  const t = this;
8269
- e.target || (e.target = t.renderTarget.renderTarget), e.clearColor || (e.clearColor = this.background.colorRgba), e.clear ?? (e.clear = vr.ALL);
8274
+ e.target || (e.target = t.renderTarget.renderTarget), e.clearColor || (e.clearColor = this.background.colorRgba), e.clear ?? (e.clear = Sr.ALL);
8270
8275
  const { clear: s, clearColor: n, target: r, mipLevel: a, layer: o } = e;
8271
8276
  Ii.shared.setValue(n ?? this.background.colorRgba), t.renderTarget.clear(r, s, Ii.shared.toArray(), a ?? 0, o ?? 0);
8272
8277
  }
@@ -8330,7 +8335,7 @@ const rl = [
8330
8335
  */
8331
8336
  _addRunners(...e) {
8332
8337
  e.forEach((t) => {
8333
- this.runners[t] = new nl(t);
8338
+ this.runners[t] = new rl(t);
8334
8339
  });
8335
8340
  }
8336
8341
  _addSystems(e) {
@@ -8395,7 +8400,7 @@ const rl = [
8395
8400
  * @ignore
8396
8401
  */
8397
8402
  _unsafeEvalCheck() {
8398
- if (!sl())
8403
+ if (!nl())
8399
8404
  throw new Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.");
8400
8405
  }
8401
8406
  /**
@@ -8424,7 +8429,7 @@ const rl = [
8424
8429
  this.runners.resetState.emit();
8425
8430
  }
8426
8431
  };
8427
- Sr.defaultOptions = {
8432
+ Ir.defaultOptions = {
8428
8433
  /**
8429
8434
  * Default resolution / device pixel ratio of the renderer.
8430
8435
  * @default 1
@@ -8459,13 +8464,13 @@ Sr.defaultOptions = {
8459
8464
  */
8460
8465
  roundPixels: !1
8461
8466
  };
8462
- let Ar = Sr, Ci;
8463
- function ol(i) {
8467
+ let wr = Ir, Ci;
8468
+ function al(i) {
8464
8469
  return Ci !== void 0 || (Ci = (() => {
8465
8470
  var t;
8466
8471
  const e = {
8467
8472
  stencil: !0,
8468
- failIfMajorPerformanceCaveat: i ?? Ar.defaultOptions.failIfMajorPerformanceCaveat
8473
+ failIfMajorPerformanceCaveat: i ?? wr.defaultOptions.failIfMajorPerformanceCaveat
8469
8474
  };
8470
8475
  try {
8471
8476
  if (!Ft.get().getWebGLRenderingContext())
@@ -8483,7 +8488,7 @@ function ol(i) {
8483
8488
  })()), Ci;
8484
8489
  }
8485
8490
  let bi;
8486
- async function al(i = {}) {
8491
+ async function ll(i = {}) {
8487
8492
  return bi !== void 0 || (bi = await (async () => {
8488
8493
  const e = Ft.get().getNavigator().gpu;
8489
8494
  if (!e)
@@ -8496,7 +8501,7 @@ async function al(i = {}) {
8496
8501
  })()), bi;
8497
8502
  }
8498
8503
  const hn = ["webgl", "webgpu", "canvas"];
8499
- async function ll(i) {
8504
+ async function hl(i) {
8500
8505
  let e = [];
8501
8506
  i.preference ? (e.push(i.preference), hn.forEach((r) => {
8502
8507
  r !== i.preference && e.push(r);
@@ -8504,18 +8509,18 @@ async function ll(i) {
8504
8509
  let t, s = {};
8505
8510
  for (let r = 0; r < e.length; r++) {
8506
8511
  const a = e[r];
8507
- if (a === "webgpu" && await al()) {
8508
- const { WebGPURenderer: o } = await import("./WebGPURenderer-CdbjQMqs.js");
8512
+ if (a === "webgpu" && await ll()) {
8513
+ const { WebGPURenderer: o } = await import("./WebGPURenderer-CwI3VE9f.js");
8509
8514
  t = o, s = { ...i, ...i.webgpu };
8510
8515
  break;
8511
- } else if (a === "webgl" && ol(
8512
- i.failIfMajorPerformanceCaveat ?? Ar.defaultOptions.failIfMajorPerformanceCaveat
8516
+ } else if (a === "webgl" && al(
8517
+ i.failIfMajorPerformanceCaveat ?? wr.defaultOptions.failIfMajorPerformanceCaveat
8513
8518
  )) {
8514
- const { WebGLRenderer: o } = await import("./WebGLRenderer-3x7mgYt9.js");
8519
+ const { WebGLRenderer: o } = await import("./WebGLRenderer-CnlX2m2i.js");
8515
8520
  t = o, s = { ...i, ...i.webgl };
8516
8521
  break;
8517
8522
  } else if (a === "canvas") {
8518
- const { CanvasRenderer: o } = await import("./CanvasRenderer-BgLtSh22.js");
8523
+ const { CanvasRenderer: o } = await import("./CanvasRenderer-Cnd4gbWc.js");
8519
8524
  t = o, s = { ...i, ...i.canvasOptions };
8520
8525
  break;
8521
8526
  }
@@ -8525,29 +8530,29 @@ async function ll(i) {
8525
8530
  const n = new t();
8526
8531
  return await n.init(s), n;
8527
8532
  }
8528
- const wr = "8.17.1";
8529
- class xr {
8533
+ const xr = "8.17.1";
8534
+ class Tr {
8530
8535
  static init() {
8531
8536
  var e;
8532
- (e = globalThis.__PIXI_APP_INIT__) == null || e.call(globalThis, this, wr);
8537
+ (e = globalThis.__PIXI_APP_INIT__) == null || e.call(globalThis, this, xr);
8533
8538
  }
8534
8539
  static destroy() {
8535
8540
  }
8536
8541
  }
8537
- xr.extension = Z.Application;
8538
- class hl {
8542
+ Tr.extension = Z.Application;
8543
+ class cl {
8539
8544
  constructor(e) {
8540
8545
  this._renderer = e;
8541
8546
  }
8542
8547
  init() {
8543
8548
  var e;
8544
- (e = globalThis.__PIXI_RENDERER_INIT__) == null || e.call(globalThis, this._renderer, wr);
8549
+ (e = globalThis.__PIXI_RENDERER_INIT__) == null || e.call(globalThis, this._renderer, xr);
8545
8550
  }
8546
8551
  destroy() {
8547
8552
  this._renderer = null;
8548
8553
  }
8549
8554
  }
8550
- hl.extension = {
8555
+ cl.extension = {
8551
8556
  type: [
8552
8557
  Z.WebGLSystem,
8553
8558
  Z.WebGPUSystem
@@ -8555,7 +8560,7 @@ hl.extension = {
8555
8560
  name: "initHook",
8556
8561
  priority: -10
8557
8562
  };
8558
- class Tr {
8563
+ class Rr {
8559
8564
  /**
8560
8565
  * Initialize the plugin with scope of application instance
8561
8566
  * @private
@@ -8600,8 +8605,8 @@ class Tr {
8600
8605
  globalThis.removeEventListener("resize", this.queueResize), this._cancelResize(), this._cancelResize = null, this.queueResize = null, this.resizeTo = null, this.resize = null;
8601
8606
  }
8602
8607
  }
8603
- Tr.extension = Z.Application;
8604
- class Rr {
8608
+ Rr.extension = Z.Application;
8609
+ class Or {
8605
8610
  /**
8606
8611
  * Initialize the plugin with scope of application instance
8607
8612
  * @private
@@ -8640,10 +8645,10 @@ class Rr {
8640
8645
  }
8641
8646
  }
8642
8647
  }
8643
- Rr.extension = Z.Application;
8644
- De.add(Tr);
8648
+ Or.extension = Z.Application;
8645
8649
  De.add(Rr);
8646
- const Or = class ys {
8650
+ De.add(Or);
8651
+ const kr = class ys {
8647
8652
  constructor(...e) {
8648
8653
  this.stage = new We(), e[0] !== void 0 && Oe(Qe, "Application constructor options are deprecated, please use Application.init() instead.");
8649
8654
  }
@@ -8667,7 +8672,7 @@ const Or = class ys {
8667
8672
  * ```
8668
8673
  */
8669
8674
  async init(e) {
8670
- e = { ...e }, this.stage || (this.stage = new We()), this.renderer = await ll(e), ys._plugins.forEach((t) => {
8675
+ e = { ...e }, this.stage || (this.stage = new We()), this.renderer = await hl(e), ys._plugins.forEach((t) => {
8671
8676
  t.init.call(this, e);
8672
8677
  });
8673
8678
  }
@@ -8805,15 +8810,15 @@ const Or = class ys {
8805
8810
  }), this.stage.destroy(t), this.stage = null, this.renderer.destroy(e), this.renderer = null;
8806
8811
  }
8807
8812
  };
8808
- Or._plugins = [];
8809
- let kr = Or;
8810
- De.handleByList(Z.Application, kr._plugins);
8811
- De.add(xr);
8812
- De.add(jo, zo);
8813
+ kr._plugins = [];
8814
+ let Mr = kr;
8815
+ De.handleByList(Z.Application, Mr._plugins);
8816
+ De.add(Tr);
8817
+ De.add(zo, Yo);
8813
8818
  const It = 480, jt = 480;
8814
- class cl {
8819
+ class dl {
8815
8820
  constructor() {
8816
- this.container = null, this.resizeObserver = null, this.mode = "floating", this.targetEl = null, this.app = new kr();
8821
+ this.container = null, this.resizeObserver = null, this.mode = "floating", this.targetEl = null, this.app = new Mr();
8817
8822
  }
8818
8823
  /**
8819
8824
  * Initialize the stage.
@@ -8897,7 +8902,7 @@ class cl {
8897
8902
  window.removeEventListener("resize", this.setupResize), (e = this.resizeObserver) == null || e.disconnect(), (t = this.container) == null || t.remove(), this.app.destroy(!0);
8898
8903
  }
8899
8904
  }
8900
- function dl() {
8905
+ function ul() {
8901
8906
  var i, e;
8902
8907
  return ((e = (i = globalThis.matchMedia) == null ? void 0 : i.call(globalThis, "(prefers-reduced-motion: reduce)")) == null ? void 0 : e.matches) ?? !1;
8903
8908
  }
@@ -8909,7 +8914,7 @@ const qt = {
8909
8914
  };
8910
8915
  function _i(i) {
8911
8916
  const { target: e, props: t, duration: s, easing: n = qt.easeOutCubic, delay: r = 0, onComplete: a, ticker: o } = i;
8912
- if (dl()) {
8917
+ if (ul()) {
8913
8918
  for (const y of Object.keys(t))
8914
8919
  e[y] = t[y];
8915
8920
  return a == null || a(), () => {
@@ -8931,7 +8936,7 @@ function _i(i) {
8931
8936
  };
8932
8937
  }
8933
8938
  const Kt = 200, st = Kt * (480 / 854), cn = 280;
8934
- class ul {
8939
+ class fl {
8935
8940
  constructor(e, t) {
8936
8941
  this.idleVideoEl = null, this.idleGroup = null, this.liveSprite = null, this.cancelGlow = null, this.cancelEntrance = null, this.visible = !1, this.widgetRoot = null, this.stageWidth = e, this.stageHeight = t, this.container = new We(), this.container.visible = !1, this.container.x = e / 2, this.container.y = t + st;
8937
8942
  }
@@ -9047,8 +9052,8 @@ class ul {
9047
9052
  (e = this.cancelGlow) == null || e.call(this), (t = this.cancelEntrance) == null || t.call(this), this.idleVideoEl && (this.idleVideoEl.pause(), this.idleVideoEl.remove()), this.container.destroy({ children: !0 });
9048
9053
  }
9049
9054
  }
9050
- const fl = [{ urls: "stun:stun.l.google.com:19302" }], pl = 3e3, ml = "oai-events";
9051
- class gl {
9055
+ const pl = [{ urls: "stun:stun.l.google.com:19302" }], ml = 3e3, gl = "oai-events";
9056
+ class yl {
9052
9057
  constructor(e) {
9053
9058
  this.onConnected = null, this.onDisconnected = null, this.onRemoteTrack = null, this.onDataMessage = null, this.onError = null, this.pc = null, this.dc = null, this.micStream = null, this._remoteAudioStream = null, this._connected = !1, this.opts = {
9054
9059
  model: "gpt-4o-realtime-preview",
@@ -9074,10 +9079,10 @@ class gl {
9074
9079
  async connect() {
9075
9080
  var e, t;
9076
9081
  try {
9077
- console.log("[RealtimeSession] Requesting microphone..."), this.micStream = await navigator.mediaDevices.getUserMedia({ audio: !0 }), console.log("[RealtimeSession] Microphone granted"), this.pc = new RTCPeerConnection({ iceServers: fl }), this.setupPeerConnectionHandlers();
9082
+ console.log("[RealtimeSession] Requesting microphone..."), this.micStream = await navigator.mediaDevices.getUserMedia({ audio: !0 }), console.log("[RealtimeSession] Microphone granted"), this.pc = new RTCPeerConnection({ iceServers: pl }), this.setupPeerConnectionHandlers();
9078
9083
  for (const a of this.micStream.getAudioTracks())
9079
9084
  this.pc.addTrack(a, this.micStream);
9080
- this.dc = this.pc.createDataChannel(ml), this.setupDataChannelHandlers();
9085
+ this.dc = this.pc.createDataChannel(gl), this.setupDataChannelHandlers();
9081
9086
  const s = await this.pc.createOffer();
9082
9087
  await this.pc.setLocalDescription(s), await this.waitForIceGathering();
9083
9088
  const n = (e = this.pc.localDescription) == null ? void 0 : e.sdp;
@@ -9150,7 +9155,7 @@ class gl {
9150
9155
  }, r = () => {
9151
9156
  t.iceGatheringState === "complete" && n();
9152
9157
  };
9153
- t.addEventListener("icegatheringstatechange", r), s = setTimeout(n, pl);
9158
+ t.addEventListener("icegatheringstatechange", r), s = setTimeout(n, ml);
9154
9159
  });
9155
9160
  }
9156
9161
  async exchangeSDP(e) {
@@ -9205,7 +9210,7 @@ class gl {
9205
9210
  this.opts.tools && this.opts.tools.length > 0 && (e.tools = this.opts.tools), this.sendJSON({ type: "session.update", session: e });
9206
9211
  }
9207
9212
  }
9208
- const yl = 24e3, Cl = 4800, bl = (
9213
+ const Cl = 24e3, bl = 4800, _l = (
9209
9214
  /* js */
9210
9215
  `
9211
9216
  class PcmBufferProcessor extends AudioWorkletProcessor {
@@ -9213,7 +9218,7 @@ class PcmBufferProcessor extends AudioWorkletProcessor {
9213
9218
  super()
9214
9219
  this._buffer = new Float32Array(0)
9215
9220
  this._paused = false
9216
- this._chunkSize = ${Cl}
9221
+ this._chunkSize = ${bl}
9217
9222
 
9218
9223
  this.port.onmessage = (e) => {
9219
9224
  if (e.data.type === 'pause') this._paused = true
@@ -9247,7 +9252,7 @@ class PcmBufferProcessor extends AudioWorkletProcessor {
9247
9252
  registerProcessor('pcm-buffer-processor', PcmBufferProcessor)
9248
9253
  `
9249
9254
  );
9250
- function _l(i) {
9255
+ function El(i) {
9251
9256
  const e = new Int16Array(i.length);
9252
9257
  for (let t = 0; t < i.length; t++) {
9253
9258
  const s = Math.max(-1, Math.min(1, i[t]));
@@ -9255,7 +9260,7 @@ function _l(i) {
9255
9260
  }
9256
9261
  return e;
9257
9262
  }
9258
- class El {
9263
+ class vl {
9259
9264
  constructor() {
9260
9265
  this.onAudioChunk = null, this.audioCtx = null, this.sourceNode = null, this.workletNode = null, this._started = !1, this._paused = !1;
9261
9266
  }
@@ -9271,12 +9276,12 @@ class El {
9271
9276
  */
9272
9277
  async start(e) {
9273
9278
  if (this._started) return;
9274
- this.audioCtx = new AudioContext({ sampleRate: yl });
9275
- const t = new Blob([bl], { type: "application/javascript" }), s = URL.createObjectURL(t);
9279
+ this.audioCtx = new AudioContext({ sampleRate: Cl });
9280
+ const t = new Blob([_l], { type: "application/javascript" }), s = URL.createObjectURL(t);
9276
9281
  await this.audioCtx.audioWorklet.addModule(s), URL.revokeObjectURL(s), this.sourceNode = this.audioCtx.createMediaStreamSource(e), this.workletNode = new AudioWorkletNode(this.audioCtx, "pcm-buffer-processor"), this.workletNode.port.onmessage = (r) => {
9277
9282
  var a;
9278
9283
  if (r.data.type === "chunk") {
9279
- const o = r.data.samples, h = _l(o);
9284
+ const o = r.data.samples, h = El(o);
9280
9285
  (a = this.onAudioChunk) == null || a.call(this, new Uint8Array(h.buffer));
9281
9286
  }
9282
9287
  }, this.sourceNode.connect(this.workletNode);
@@ -9314,7 +9319,7 @@ class El {
9314
9319
  }
9315
9320
  }
9316
9321
  var ts = {}, zt = {}, dn;
9317
- function vl() {
9322
+ function Sl() {
9318
9323
  if (dn) return zt;
9319
9324
  dn = 1, zt.byteLength = o, zt.toByteArray = d, zt.fromByteArray = y;
9320
9325
  for (var i = [], e = [], t = typeof Uint8Array < "u" ? Uint8Array : Array, s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", n = 0, r = s.length; n < r; ++n)
@@ -9364,7 +9369,7 @@ function vl() {
9364
9369
  var Ei = {};
9365
9370
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
9366
9371
  var un;
9367
- function Sl() {
9372
+ function Il() {
9368
9373
  return un || (un = 1, Ei.read = function(i, e, t, s, n) {
9369
9374
  var r, a, o = n * 8 - s - 1, h = (1 << o) - 1, d = h >> 1, f = -7, u = t ? n - 1 : 0, y = t ? -1 : 1, g = i[e + u];
9370
9375
  for (u += y, r = g & (1 << -f) - 1, g >>= -f, f += o; f > 0; r = r * 256 + i[e + u], u += y, f -= 8)
@@ -9395,9 +9400,9 @@ function Sl() {
9395
9400
  * @license MIT
9396
9401
  */
9397
9402
  var fn;
9398
- function Il() {
9403
+ function Al() {
9399
9404
  return fn || (fn = 1, (function(i) {
9400
- const e = vl(), t = Sl(), s = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
9405
+ const e = Sl(), t = Il(), s = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
9401
9406
  i.Buffer = o, i.SlowBuffer = I, i.INSPECT_MAX_BYTES = 50;
9402
9407
  const n = 2147483647;
9403
9408
  i.kMaxLength = n, o.TYPED_ARRAY_SUPPORT = r(), !o.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
@@ -9791,13 +9796,13 @@ function Il() {
9791
9796
  return di(Gi(l, p.length - c), p, c, m);
9792
9797
  }
9793
9798
  function X(p, l, c, m) {
9794
- return di(No(l), p, c, m);
9799
+ return di(Lo(l), p, c, m);
9795
9800
  }
9796
9801
  function ce(p, l, c, m) {
9797
9802
  return di(Ps(l), p, c, m);
9798
9803
  }
9799
9804
  function fe(p, l, c, m) {
9800
- return di(Lo(l, p.length - c), p, c, m);
9805
+ return di(Do(l, p.length - c), p, c, m);
9801
9806
  }
9802
9807
  o.prototype.write = function(l, c, m, b) {
9803
9808
  if (c === void 0)
@@ -9905,7 +9910,7 @@ function Il() {
9905
9910
  (!l || l < 0) && (l = 0), (!c || c < 0 || c > m) && (c = m);
9906
9911
  let b = "";
9907
9912
  for (let v = l; v < c; ++v)
9908
- b += Do[p[v]];
9913
+ b += Bo[p[v]];
9909
9914
  return b;
9910
9915
  }
9911
9916
  function be(p, l, c) {
@@ -10230,7 +10235,7 @@ function Il() {
10230
10235
  );
10231
10236
  }
10232
10237
  const Vt = /[^+/0-9A-Za-z-_]/g;
10233
- function Mo(p) {
10238
+ function No(p) {
10234
10239
  if (p = p.split("=")[0], p = p.trim().replace(Vt, ""), p.length < 2) return "";
10235
10240
  for (; p.length % 4 !== 0; )
10236
10241
  p = p + "=";
@@ -10290,13 +10295,13 @@ function Il() {
10290
10295
  }
10291
10296
  return v;
10292
10297
  }
10293
- function No(p) {
10298
+ function Lo(p) {
10294
10299
  const l = [];
10295
10300
  for (let c = 0; c < p.length; ++c)
10296
10301
  l.push(p.charCodeAt(c) & 255);
10297
10302
  return l;
10298
10303
  }
10299
- function Lo(p, l) {
10304
+ function Do(p, l) {
10300
10305
  let c, m, b;
10301
10306
  const v = [];
10302
10307
  for (let w = 0; w < p.length && !((l -= 2) < 0); ++w)
@@ -10304,7 +10309,7 @@ function Il() {
10304
10309
  return v;
10305
10310
  }
10306
10311
  function Ps(p) {
10307
- return e.toByteArray(Mo(p));
10312
+ return e.toByteArray(No(p));
10308
10313
  }
10309
10314
  function di(p, l, c, m) {
10310
10315
  let b;
@@ -10318,7 +10323,7 @@ function Il() {
10318
10323
  function Vi(p) {
10319
10324
  return p !== p;
10320
10325
  }
10321
- const Do = (function() {
10326
+ const Bo = (function() {
10322
10327
  const p = "0123456789abcdef", l = new Array(256);
10323
10328
  for (let c = 0; c < 16; ++c) {
10324
10329
  const m = c * 16;
@@ -10328,19 +10333,19 @@ function Il() {
10328
10333
  return l;
10329
10334
  })();
10330
10335
  function it(p) {
10331
- return typeof BigInt > "u" ? Bo : p;
10336
+ return typeof BigInt > "u" ? Fo : p;
10332
10337
  }
10333
- function Bo() {
10338
+ function Fo() {
10334
10339
  throw new Error("BigInt not supported");
10335
10340
  }
10336
10341
  })(ts)), ts;
10337
10342
  }
10338
- var Al = Il();
10339
- const wl = "https://api.anam.ai", xl = "/v1", Mr = {
10343
+ var wl = Al();
10344
+ const xl = "https://api.anam.ai", Tl = "/v1", Nr = {
10340
10345
  client: "js-sdk",
10341
10346
  version: "4.12.0"
10342
10347
  };
10343
- var Tl = function(i, e, t, s) {
10348
+ var Rl = function(i, e, t, s) {
10344
10349
  function n(r) {
10345
10350
  return r instanceof t ? r : new t(function(a) {
10346
10351
  a(r);
@@ -10367,18 +10372,18 @@ var Tl = function(i, e, t, s) {
10367
10372
  d((s = s.apply(i, e || [])).next());
10368
10373
  });
10369
10374
  };
10370
- const Nr = "https://api.anam.ai", Ms = "/v1";
10375
+ const Lr = "https://api.anam.ai", Ms = "/v1";
10371
10376
  var et;
10372
10377
  (function(i) {
10373
10378
  i.CLIENT_METRIC_MEASUREMENT_ERROR = "client_error", i.CLIENT_METRIC_MEASUREMENT_CONNECTION_CLOSED = "client_connection_closed", i.CLIENT_METRIC_MEASUREMENT_CONNECTION_ESTABLISHED = "client_connection_established", i.CLIENT_METRIC_MEASUREMENT_SESSION_ATTEMPT = "client_session_attempt", i.CLIENT_METRIC_MEASUREMENT_SESSION_SUCCESS = "client_session_success";
10374
10379
  })(et || (et = {}));
10375
- let Cs = Nr, Lr = Ms, rt, Dr = !1;
10376
- const Rl = (i, e = Ms) => {
10377
- Cs = i, Lr = e;
10378
- }, Ol = (i) => {
10379
- rt = i;
10380
+ let Cs = Lr, Dr = Ms, rt, Br = !1;
10381
+ const Ol = (i, e = Ms) => {
10382
+ Cs = i, Dr = e;
10380
10383
  }, kl = (i) => {
10381
- Dr = i;
10384
+ rt = i;
10385
+ }, Ml = (i) => {
10386
+ Br = i;
10382
10387
  };
10383
10388
  let ot = {
10384
10389
  sessionId: null,
@@ -10387,12 +10392,12 @@ let ot = {
10387
10392
  };
10388
10393
  const At = (i) => {
10389
10394
  ot = Object.assign(Object.assign({}, ot), i);
10390
- }, St = (i, e, t) => Tl(void 0, void 0, void 0, function* () {
10391
- if (!Dr)
10395
+ }, St = (i, e, t) => Rl(void 0, void 0, void 0, function* () {
10396
+ if (!Br)
10392
10397
  try {
10393
- const s = Object.assign(Object.assign({}, Mr), t);
10398
+ const s = Object.assign(Object.assign({}, Nr), t);
10394
10399
  ot.sessionId && (s.sessionId = ot.sessionId), ot.organizationId && (s.organizationId = ot.organizationId), ot.attemptCorrelationId && (s.attemptCorrelationId = ot.attemptCorrelationId);
10395
- const n = `${Lr}/metrics/client`;
10400
+ const n = `${Dr}/metrics/client`;
10396
10401
  let r, a = {
10397
10402
  "Content-Type": "application/json"
10398
10403
  };
@@ -10408,7 +10413,7 @@ const At = (i) => {
10408
10413
  } catch (s) {
10409
10414
  console.error("Failed to send error metric:", s);
10410
10415
  }
10411
- }), Ml = (i, e = "console") => {
10416
+ }), Nl = (i, e = "console") => {
10412
10417
  var t, s, n;
10413
10418
  const r = {};
10414
10419
  i.forEach((u) => {
@@ -10503,7 +10508,7 @@ class re extends Error {
10503
10508
  function pn() {
10504
10509
  return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : Date.now().toString(36) + Math.random().toString(36).substr(2, 9);
10505
10510
  }
10506
- function Nl(i) {
10511
+ function Ll(i) {
10507
10512
  if (!(!i || !i.enabled)) {
10508
10513
  if (!i.baseUrl)
10509
10514
  return "API Gateway baseUrl is required when enabled";
@@ -10546,7 +10551,7 @@ var dt;
10546
10551
  (function(i) {
10547
10552
  i.NORMAL = "CONNECTION_CLOSED_CODE_NORMAL", i.MICROPHONE_PERMISSION_DENIED = "CONNECTION_CLOSED_CODE_MICROPHONE_PERMISSION_DENIED", i.SIGNALLING_CLIENT_CONNECTION_FAILURE = "CONNECTION_CLOSED_CODE_SIGNALLING_CLIENT_CONNECTION_FAILURE", i.WEBRTC_FAILURE = "CONNECTION_CLOSED_CODE_WEBRTC_FAILURE", i.SERVER_CLOSED_CONNECTION = "CONNECTION_CLOSED_CODE_SERVER_CLOSED_CONNECTION";
10548
10553
  })(dt || (dt = {}));
10549
- class Ll {
10554
+ class Dl {
10550
10555
  constructor(e, t) {
10551
10556
  this.sequenceNumber = 0, this.config = e, this.signallingClient = t;
10552
10557
  }
@@ -10615,15 +10620,15 @@ var wt = function(i, e, t, s) {
10615
10620
  d((s = s.apply(i, e || [])).next());
10616
10621
  });
10617
10622
  };
10618
- const Dl = 5, Bl = 5;
10619
- class Fl {
10623
+ const Bl = 5, Fl = 5;
10624
+ class Pl {
10620
10625
  constructor(e, t, s, n, r) {
10621
10626
  var a, o, h, d, f;
10622
10627
  if (this.stopSignal = !1, this.sendingBuffer = [], this.wsConnectionAttempts = 0, this.socket = null, this.heartBeatIntervalRef = null, this.publicEventEmitter = s, this.internalEventEmitter = n, this.apiGatewayConfig = r, !e)
10623
10628
  throw new Error("Signalling Client: sessionId is required");
10624
10629
  this.sessionId = e;
10625
10630
  const { heartbeatIntervalSeconds: u, maxWsReconnectionAttempts: y, url: g } = t;
10626
- if (this.heartbeatIntervalSeconds = u || Dl, this.maxWsReconnectionAttempts = y || Bl, !g.baseUrl)
10631
+ if (this.heartbeatIntervalSeconds = u || Bl, this.maxWsReconnectionAttempts = y || Fl, !g.baseUrl)
10627
10632
  throw new Error("Signalling Client: baseUrl is required");
10628
10633
  if (!((a = this.apiGatewayConfig) === null || a === void 0) && a.enabled && (!((o = this.apiGatewayConfig) === null || o === void 0) && o.baseUrl)) {
10629
10634
  const C = new URL(this.apiGatewayConfig.baseUrl), _ = (h = this.apiGatewayConfig.wsPath) !== null && h !== void 0 ? h : "/ws";
@@ -10754,7 +10759,7 @@ class Fl {
10754
10759
  }, e);
10755
10760
  }
10756
10761
  }
10757
- function Pl(i) {
10762
+ function Ul(i) {
10758
10763
  return "brainType" in i || "llmId" in i;
10759
10764
  }
10760
10765
  var mn = function(i, e, t, s) {
@@ -10784,11 +10789,11 @@ var mn = function(i, e, t, s) {
10784
10789
  d((s = s.apply(i, e || [])).next());
10785
10790
  });
10786
10791
  };
10787
- class Ul {
10792
+ class Wl {
10788
10793
  constructor(e, t, s) {
10789
10794
  if (!e && !t)
10790
10795
  throw new Error("Either sessionToken or apiKey must be provided");
10791
- this.sessionToken = e || null, this.apiKey = t || null, this.baseUrl = (s == null ? void 0 : s.baseUrl) || wl, this.apiVersion = (s == null ? void 0 : s.apiVersion) || xl, this.apiGatewayConfig = (s == null ? void 0 : s.apiGateway) || void 0;
10796
+ this.sessionToken = e || null, this.apiKey = t || null, this.baseUrl = (s == null ? void 0 : s.baseUrl) || xl, this.apiVersion = (s == null ? void 0 : s.apiVersion) || Tl, this.apiGatewayConfig = (s == null ? void 0 : s.apiGateway) || void 0;
10792
10797
  }
10793
10798
  /**
10794
10799
  * Builds URL and headers for a request, applying API Gateway configuration if enabled
@@ -10822,7 +10827,7 @@ class Ul {
10822
10827
  body: JSON.stringify({
10823
10828
  personaConfig: e,
10824
10829
  sessionOptions: t,
10825
- clientMetadata: Mr
10830
+ clientMetadata: Nr
10826
10831
  })
10827
10832
  }), o = yield a.json(), h = o.error;
10828
10833
  switch (a.status) {
@@ -10857,7 +10862,7 @@ class Ul {
10857
10862
  let t = {
10858
10863
  clientLabel: "js-sdk-api-key"
10859
10864
  };
10860
- Pl(e) && (t = Object.assign(Object.assign({}, t), { personaConfig: e }));
10865
+ Ul(e) && (t = Object.assign(Object.assign({}, t), { personaConfig: e }));
10861
10866
  try {
10862
10867
  const s = `${this.apiVersion}/auth/session-token`, { url: n, headers: r } = this.buildGatewayUrlAndHeaders(s, {
10863
10868
  "Content-Type": "application/json",
@@ -10877,7 +10882,7 @@ class Ul {
10877
10882
  return `${this.baseUrl}${this.apiVersion}`;
10878
10883
  }
10879
10884
  }
10880
- var Wl = function(i, e, t, s) {
10885
+ var Gl = function(i, e, t, s) {
10881
10886
  function n(r) {
10882
10887
  return r instanceof t ? r : new t(function(a) {
10883
10888
  a(r);
@@ -10904,12 +10909,12 @@ var Wl = function(i, e, t, s) {
10904
10909
  d((s = s.apply(i, e || [])).next());
10905
10910
  });
10906
10911
  };
10907
- class Gl {
10912
+ class Vl {
10908
10913
  constructor(e, t, s) {
10909
10914
  this.baseUrl = e, this.sessionId = t, this.apiGatewayConfig = s;
10910
10915
  }
10911
10916
  sendTalkCommand(e) {
10912
- return Wl(this, void 0, void 0, function* () {
10917
+ return Gl(this, void 0, void 0, function* () {
10913
10918
  var t, s;
10914
10919
  try {
10915
10920
  let n, r = {
@@ -10937,7 +10942,7 @@ class Gl {
10937
10942
  });
10938
10943
  }
10939
10944
  }
10940
- class Vl {
10945
+ class Hl {
10941
10946
  constructor() {
10942
10947
  this.listeners = {};
10943
10948
  }
@@ -10953,7 +10958,7 @@ class Vl {
10953
10958
  });
10954
10959
  }
10955
10960
  }
10956
- class Hl {
10961
+ class $l {
10957
10962
  constructor(e, t) {
10958
10963
  this.messages = [], this.publicEventEmitter = e, this.internalEventEmitter = t, this.internalEventEmitter.addListener(oe.WEBRTC_CHAT_MESSAGE_RECEIVED, this.processWebRtcTextMessageEvent.bind(this));
10959
10964
  }
@@ -11001,7 +11006,7 @@ class Hl {
11001
11006
  t.endOfSpeech && this.publicEventEmitter.emit(k.MESSAGE_HISTORY_UPDATED, this.messages);
11002
11007
  }
11003
11008
  }
11004
- class $l {
11009
+ class jl {
11005
11010
  constructor() {
11006
11011
  this.listeners = {};
11007
11012
  }
@@ -11052,7 +11057,7 @@ var is = function(i, e, t, s) {
11052
11057
  d((s = s.apply(i, e || [])).next());
11053
11058
  });
11054
11059
  };
11055
- class jl {
11060
+ class zl {
11056
11061
  constructor(e, t, s) {
11057
11062
  this.state = _e.UNSTARTED, this.correlationId = e, this.internalEventEmitter = t, this.signallingClient = s, this.internalEventEmitter.addListener(oe.SIGNAL_MESSAGE_RECEIVED, this.onSignalMessage.bind(this));
11058
11063
  }
@@ -11139,7 +11144,7 @@ const gn = (i, e) => {
11139
11144
  const t = e - i;
11140
11145
  return t > 0 ? t : 0;
11141
11146
  };
11142
- class Br {
11147
+ class Fr {
11143
11148
  constructor(e) {
11144
11149
  this.handlers = /* @__PURE__ */ Object.create(null), this.pendingCalls = /* @__PURE__ */ Object.create(null), this.publicEventEmitter = e;
11145
11150
  }
@@ -11305,8 +11310,8 @@ var xe = function(i, e, t, s) {
11305
11310
  d((s = s.apply(i, e || [])).next());
11306
11311
  });
11307
11312
  };
11308
- const zl = 15e3, Yl = 5e3, Xl = 2;
11309
- class ql {
11313
+ const Yl = 15e3, Xl = 5e3, ql = 2;
11314
+ class Kl {
11310
11315
  constructor(e, t, s, n, r) {
11311
11316
  var a, o, h, d;
11312
11317
  this.peerConnection = null, this.connectionReceivedAnswer = !1, this.remoteIceCandidateBuffer = [], this.inputAudioStream = null, this.dataChannel = null, this.videoElement = null, this.videoStream = null, this.audioStream = null, this.inputAudioState = {
@@ -11314,7 +11319,7 @@ class ql {
11314
11319
  permissionState: lt.NOT_REQUESTED
11315
11320
  }, this.successMetricPoller = null, this.successMetricFired = !1, this.showPeerConnectionStatsReport = !1, this.peerConnectionStatsReportOutputFormat = "console", this.statsCollectionInterval = null, this.agentAudioInputStream = null, this.publicEventEmitter = s, this.internalEventEmitter = n, this.toolCallManager = r, this.apiGatewayConfig = t.apiGateway;
11316
11321
  const { inputAudio: f } = t;
11317
- this.inputAudioState = f.inputAudioState, t.inputAudio.userProvidedMediaStream && (this.inputAudioStream = t.inputAudio.userProvidedMediaStream), this.disableInputAudio = t.inputAudio.disableInputAudio === !0, this.internalEventEmitter.addListener(oe.WEB_SOCKET_OPEN, this.onSignallingClientConnected.bind(this)), this.internalEventEmitter.addListener(oe.SIGNAL_MESSAGE_RECEIVED, this.onSignalMessage.bind(this)), this.internalEventEmitter.addListener(oe.WEBRTC_TOOL_CALL_STARTED_EVENT_RECEIVED, this.toolCallManager.processToolCallStartedEvent.bind(this.toolCallManager)), this.internalEventEmitter.addListener(oe.WEBRTC_TOOL_CALL_COMPLETED_EVENT_RECEIVED, this.toolCallManager.processToolCallCompletedEvent.bind(this.toolCallManager)), this.internalEventEmitter.addListener(oe.WEBRTC_TOOL_CALL_FAILED_EVENT_RECEIVED, this.toolCallManager.processToolCallFailedEvent.bind(this.toolCallManager)), this.iceServers = t.iceServers, this.signallingClient = new Fl(e, t.signalling, this.publicEventEmitter, this.internalEventEmitter, this.apiGatewayConfig), this.engineApiRestClient = new Gl(t.engine.baseUrl, e, this.apiGatewayConfig), this.audioDeviceId = t.inputAudio.audioDeviceId, this.showPeerConnectionStatsReport = (o = (a = t.metrics) === null || a === void 0 ? void 0 : a.showPeerConnectionStatsReport) !== null && o !== void 0 ? o : !1, this.peerConnectionStatsReportOutputFormat = (d = (h = t.metrics) === null || h === void 0 ? void 0 : h.peerConnectionStatsReportOutputFormat) !== null && d !== void 0 ? d : "console";
11322
+ this.inputAudioState = f.inputAudioState, t.inputAudio.userProvidedMediaStream && (this.inputAudioStream = t.inputAudio.userProvidedMediaStream), this.disableInputAudio = t.inputAudio.disableInputAudio === !0, this.internalEventEmitter.addListener(oe.WEB_SOCKET_OPEN, this.onSignallingClientConnected.bind(this)), this.internalEventEmitter.addListener(oe.SIGNAL_MESSAGE_RECEIVED, this.onSignalMessage.bind(this)), this.internalEventEmitter.addListener(oe.WEBRTC_TOOL_CALL_STARTED_EVENT_RECEIVED, this.toolCallManager.processToolCallStartedEvent.bind(this.toolCallManager)), this.internalEventEmitter.addListener(oe.WEBRTC_TOOL_CALL_COMPLETED_EVENT_RECEIVED, this.toolCallManager.processToolCallCompletedEvent.bind(this.toolCallManager)), this.internalEventEmitter.addListener(oe.WEBRTC_TOOL_CALL_FAILED_EVENT_RECEIVED, this.toolCallManager.processToolCallFailedEvent.bind(this.toolCallManager)), this.iceServers = t.iceServers, this.signallingClient = new Pl(e, t.signalling, this.publicEventEmitter, this.internalEventEmitter, this.apiGatewayConfig), this.engineApiRestClient = new Vl(t.engine.baseUrl, e, this.apiGatewayConfig), this.audioDeviceId = t.inputAudio.audioDeviceId, this.showPeerConnectionStatsReport = (o = (a = t.metrics) === null || a === void 0 ? void 0 : a.showPeerConnectionStatsReport) !== null && o !== void 0 ? o : !1, this.peerConnectionStatsReportOutputFormat = (d = (h = t.metrics) === null || h === void 0 ? void 0 : h.peerConnectionStatsReportOutputFormat) !== null && d !== void 0 ? d : "console";
11318
11323
  }
11319
11324
  onInputAudioStateChange(e, t) {
11320
11325
  e.isMuted !== t.isMuted && (t.isMuted ? this.muteAllAudioTracks() : this.unmuteAllAudioTracks());
@@ -11340,7 +11345,7 @@ class ql {
11340
11345
  } catch (e) {
11341
11346
  console.error("Failed to collect and send stats:", e);
11342
11347
  }
11343
- }), Yl));
11348
+ }), Xl));
11344
11349
  }
11345
11350
  sendClientSideMetrics(e) {
11346
11351
  e.forEach((t) => {
@@ -11358,7 +11363,7 @@ class ql {
11358
11363
  return;
11359
11364
  const e = setTimeout(() => {
11360
11365
  this.successMetricPoller && (console.warn("No video frames received, there is a problem with the connection."), clearInterval(this.successMetricPoller), this.successMetricPoller = null);
11361
- }, zl);
11366
+ }, Yl);
11362
11367
  this.successMetricPoller = setInterval(() => xe(this, void 0, void 0, function* () {
11363
11368
  if (!this.peerConnection || this.successMetricFired) {
11364
11369
  this.successMetricPoller && clearInterval(this.successMetricPoller), clearTimeout(e);
@@ -11458,10 +11463,10 @@ class ql {
11458
11463
  });
11459
11464
  }
11460
11465
  startTalkMessageStream(e) {
11461
- return e || (e = Math.random().toString(36).substring(2, 15)), new jl(e, this.internalEventEmitter, this.signallingClient);
11466
+ return e || (e = Math.random().toString(36).substring(2, 15)), new zl(e, this.internalEventEmitter, this.signallingClient);
11462
11467
  }
11463
11468
  createAgentAudioInputStream(e) {
11464
- return this.agentAudioInputStream = new Ll(e, this.signallingClient), this.agentAudioInputStream;
11469
+ return this.agentAudioInputStream = new Dl(e, this.signallingClient), this.agentAudioInputStream;
11465
11470
  }
11466
11471
  getAgentAudioInputStream() {
11467
11472
  return this.agentAudioInputStream;
@@ -11470,7 +11475,7 @@ class ql {
11470
11475
  return xe(this, void 0, void 0, function* () {
11471
11476
  this.peerConnection = new RTCPeerConnection({
11472
11477
  iceServers: this.iceServers,
11473
- iceCandidatePoolSize: Xl
11478
+ iceCandidatePoolSize: ql
11474
11479
  }), this.peerConnection.onicecandidate = this.onIceCandidate.bind(this), this.peerConnection.oniceconnectionstatechange = this.onIceConnectionStateChange.bind(this), this.peerConnection.onconnectionstatechange = this.onConnectionStateChange.bind(this), this.peerConnection.addEventListener("track", this.onTrackEventHandler.bind(this)), yield this.setupDataChannels(), this.peerConnection.addTransceiver("video", { direction: "recvonly" }), this.disableInputAudio ? this.peerConnection.addTransceiver("audio", { direction: "recvonly" }) : (this.peerConnection.addTransceiver("audio", { direction: "sendrecv" }), this.inputAudioStream ? yield this.setupAudioTrack() : this.requestMicrophonePermissionAsync().catch((e) => {
11475
11480
  console.error("Async microphone permission request failed:", e);
11476
11481
  }));
@@ -11593,7 +11598,7 @@ class ql {
11593
11598
  case $e.CLIENT_TOOL_EVENT:
11594
11599
  const h = o.data;
11595
11600
  this.internalEventEmitter.emit(oe.WEBRTC_CLIENT_TOOL_EVENT_RECEIVED, h);
11596
- const d = Br.WebRTCClientToolEventToClientToolEvent(h);
11601
+ const d = Fr.WebRTCClientToolEventToClientToolEvent(h);
11597
11602
  this.publicEventEmitter.emit(k.CLIENT_TOOL_EVENT_RECEIVED, d);
11598
11603
  break;
11599
11604
  case $e.TOOL_CALL_STARTED_EVENT:
@@ -11701,7 +11706,7 @@ class ql {
11701
11706
  if (this.showPeerConnectionStatsReport) {
11702
11707
  const t = yield (e = this.peerConnection) === null || e === void 0 ? void 0 : e.getStats();
11703
11708
  if (t) {
11704
- const s = Ml(t, this.peerConnectionStatsReportOutputFormat);
11709
+ const s = Nl(t, this.peerConnectionStatsReportOutputFormat);
11705
11710
  s && console.log(s, void 0, 2);
11706
11711
  }
11707
11712
  }
@@ -11727,7 +11732,7 @@ class ql {
11727
11732
  });
11728
11733
  }
11729
11734
  }
11730
- class Kl {
11735
+ class Zl {
11731
11736
  constructor(e, t) {
11732
11737
  this.reasoning_messages = [], this.publicEventEmitter = e, this.internalEventEmitter = t, this.internalEventEmitter.addListener(oe.WEBRTC_REASONING_TEXT_MESSAGE_RECEIVED, this.processWebRtcReasoningTextMessageEvent.bind(this));
11733
11738
  }
@@ -11782,7 +11787,7 @@ var nt = function(i, e, t, s) {
11782
11787
  d((s = s.apply(i, e || [])).next());
11783
11788
  });
11784
11789
  };
11785
- class Zl {
11790
+ class Jl {
11786
11791
  constructor(e, t, s) {
11787
11792
  var n, r, a, o, h;
11788
11793
  this.inputAudioState = {
@@ -11792,11 +11797,11 @@ class Zl {
11792
11797
  const d = this.validateClientConfig(e, t, s);
11793
11798
  if (d)
11794
11799
  throw new re(d, ue.CLIENT_ERROR_CODE_CONFIGURATION_ERROR, 400);
11795
- this.personaConfig = t, this.clientOptions = s, (!((n = s == null ? void 0 : s.api) === null || n === void 0) && n.baseUrl || !((r = s == null ? void 0 : s.api) === null || r === void 0) && r.apiVersion) && Rl(s.api.baseUrl || Nr, s.api.apiVersion || Ms), !((o = (a = s == null ? void 0 : s.api) === null || a === void 0 ? void 0 : a.apiGateway) === null || o === void 0) && o.enabled && Ol(s.api.apiGateway), !((h = s == null ? void 0 : s.metrics) === null || h === void 0) && h.disableClientMetrics && kl(!0), this.publicEventEmitter = new $l(), this.internalEventEmitter = new Vl(), this.toolCallManager = new Br(this.publicEventEmitter), this.apiClient = new Ul(e, s == null ? void 0 : s.apiKey, s == null ? void 0 : s.api), this.messageHistoryClient = new Hl(this.publicEventEmitter, this.internalEventEmitter), this.reasoningHistoryClient = new Kl(this.publicEventEmitter, this.internalEventEmitter);
11800
+ this.personaConfig = t, this.clientOptions = s, (!((n = s == null ? void 0 : s.api) === null || n === void 0) && n.baseUrl || !((r = s == null ? void 0 : s.api) === null || r === void 0) && r.apiVersion) && Ol(s.api.baseUrl || Lr, s.api.apiVersion || Ms), !((o = (a = s == null ? void 0 : s.api) === null || a === void 0 ? void 0 : a.apiGateway) === null || o === void 0) && o.enabled && kl(s.api.apiGateway), !((h = s == null ? void 0 : s.metrics) === null || h === void 0) && h.disableClientMetrics && Ml(!0), this.publicEventEmitter = new jl(), this.internalEventEmitter = new Hl(), this.toolCallManager = new Fr(this.publicEventEmitter), this.apiClient = new Wl(e, s == null ? void 0 : s.apiKey, s == null ? void 0 : s.api), this.messageHistoryClient = new $l(this.publicEventEmitter, this.internalEventEmitter), this.reasoningHistoryClient = new Zl(this.publicEventEmitter, this.internalEventEmitter);
11796
11801
  }
11797
11802
  decodeJwt(e) {
11798
11803
  try {
11799
- const t = e.split(".")[1], s = Al.Buffer.from(t, "base64").toString("utf8");
11804
+ const t = e.split(".")[1], s = wl.Buffer.from(t, "base64").toString("utf8");
11800
11805
  return JSON.parse(s);
11801
11806
  } catch {
11802
11807
  throw new Error("Invalid session token format");
@@ -11808,7 +11813,7 @@ class Zl {
11808
11813
  return "Either sessionToken or apiKey must be provided";
11809
11814
  if (s != null && s.apiKey && e)
11810
11815
  return "Only one of sessionToken or apiKey should be used";
11811
- const a = Nl((n = s == null ? void 0 : s.api) === null || n === void 0 ? void 0 : n.apiGateway);
11816
+ const a = Ll((n = s == null ? void 0 : s.api) === null || n === void 0 ? void 0 : n.apiGateway);
11812
11817
  if (a)
11813
11818
  return a;
11814
11819
  if (e) {
@@ -11849,7 +11854,7 @@ class Zl {
11849
11854
  });
11850
11855
  const J = !((t = this.clientOptions) === null || t === void 0) && t.iceServers ? this.clientOptions.iceServers : L;
11851
11856
  try {
11852
- this.streamingClient = new ql(A, {
11857
+ this.streamingClient = new Kl(A, {
11853
11858
  engine: {
11854
11859
  baseUrl: `${x}://${S}`
11855
11860
  },
@@ -12096,11 +12101,11 @@ class Zl {
12096
12101
  return this.toolCallManager.registerHandler(e, t);
12097
12102
  }
12098
12103
  }
12099
- const Jl = (i, e) => new Zl(i, void 0, e);
12100
- let Ql = 0;
12101
- class eh {
12104
+ const Ql = (i, e) => new Jl(i, void 0, e);
12105
+ let eh = 0;
12106
+ class th {
12102
12107
  constructor(e) {
12103
- this.onVideoReady = null, this.onConnected = null, this.onDisconnected = null, this.onTalkStreamInterrupted = null, this.onError = null, this.audioInputStream = null, this.videoElement = null, this._connected = !1, this._closing = !1, this.inlineMode = e.inlineMode ?? !1, this.client = Jl(e.sessionToken, {
12108
+ this.onVideoReady = null, this.onConnected = null, this.onDisconnected = null, this.onTalkStreamInterrupted = null, this.onError = null, this.audioInputStream = null, this.videoElement = null, this._connected = !1, this._closing = !1, this.inlineMode = e.inlineMode ?? !1, this.client = Ql(e.sessionToken, {
12104
12109
  disableInputAudio: !0,
12105
12110
  metrics: { disableClientMetrics: !0 }
12106
12111
  });
@@ -12117,7 +12122,7 @@ class eh {
12117
12122
  async connect() {
12118
12123
  var e;
12119
12124
  try {
12120
- const t = `anam-avatar-video-${++Ql}`;
12125
+ const t = `anam-avatar-video-${++eh}`;
12121
12126
  this.videoElement = document.createElement("video"), this.videoElement.id = t, this.videoElement.autoplay = !0, this.videoElement.playsInline = !0, this.inlineMode ? this.videoElement.style.cssText = `
12122
12127
  width: 100%;
12123
12128
  height: 100%;
@@ -12190,7 +12195,7 @@ class eh {
12190
12195
  }
12191
12196
  }
12192
12197
  }
12193
- const th = /* @__PURE__ */ new Set([
12198
+ const ih = /* @__PURE__ */ new Set([
12194
12199
  "a",
12195
12200
  "button",
12196
12201
  "input",
@@ -12200,7 +12205,7 @@ const th = /* @__PURE__ */ new Set([
12200
12205
  "summary",
12201
12206
  "label",
12202
12207
  "option"
12203
- ]), ih = /* @__PURE__ */ new Set([
12208
+ ]), sh = /* @__PURE__ */ new Set([
12204
12209
  "button",
12205
12210
  "link",
12206
12211
  "menuitem",
@@ -12217,7 +12222,7 @@ const th = /* @__PURE__ */ new Set([
12217
12222
  "textbox",
12218
12223
  "searchbox",
12219
12224
  "scrollbar"
12220
- ]), sh = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "h6"]), nh = [
12225
+ ]), nh = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "h6"]), rh = [
12221
12226
  "type",
12222
12227
  "role",
12223
12228
  "aria-label",
@@ -12230,7 +12235,7 @@ const th = /* @__PURE__ */ new Set([
12230
12235
  "checked",
12231
12236
  "aria-expanded"
12232
12237
  ];
12233
- class rh {
12238
+ class oh {
12234
12239
  constructor() {
12235
12240
  this.elementMap = /* @__PURE__ */ new Map();
12236
12241
  }
@@ -12249,7 +12254,7 @@ class rh {
12249
12254
  if (n.nodeType !== Node.ELEMENT_NODE) return;
12250
12255
  const r = n, a = r.tagName.toLowerCase();
12251
12256
  if (!this.isVisible(r) || ["script", "style", "svg", "noscript", "link", "meta"].includes(a) || r.id === "holostaff-widget-root" || r.closest("#holostaff-widget-root")) return;
12252
- const o = this.isInteractive(r), h = sh.has(a);
12257
+ const o = this.isInteractive(r), h = nh.has(a);
12253
12258
  if (o || h) {
12254
12259
  const d = e++;
12255
12260
  this.elementMap.set(d, r);
@@ -12280,10 +12285,10 @@ class rh {
12280
12285
  }
12281
12286
  isInteractive(e) {
12282
12287
  const t = e.tagName.toLowerCase();
12283
- if (th.has(t))
12288
+ if (ih.has(t))
12284
12289
  return !e.disabled;
12285
12290
  const s = e.getAttribute("role");
12286
- if (s && ih.has(s)) return !0;
12291
+ if (s && sh.has(s)) return !0;
12287
12292
  try {
12288
12293
  if (getComputedStyle(e).cursor === "pointer") return !0;
12289
12294
  } catch {
@@ -12295,15 +12300,15 @@ class rh {
12295
12300
  }
12296
12301
  getUsefulAttrs(e) {
12297
12302
  const t = [];
12298
- for (const s of nh) {
12303
+ for (const s of rh) {
12299
12304
  const n = e.getAttribute(s);
12300
12305
  n && n.length > 0 && n.length < 100 && t.push(`${s}="${n}"`);
12301
12306
  }
12302
12307
  return t.join(" ");
12303
12308
  }
12304
12309
  }
12305
- const oh = /* @__PURE__ */ new Set(["scroll_to", "click", "highlight"]);
12306
- class ah {
12310
+ const ah = /* @__PURE__ */ new Set(["scroll_to", "click", "highlight"]);
12311
+ class lh {
12307
12312
  constructor(e) {
12308
12313
  this.onToolCall = null, this.fnArgBufs = /* @__PURE__ */ new Map(), this.fnNames = /* @__PURE__ */ new Map(), this.fnCallIds = /* @__PURE__ */ new Map(), this.realtimeSession = e.realtimeSession, this.domAnalyzer = e.domAnalyzer, this.pageActions = e.pageActions, this.overlayActions = e.overlayActions, this.confirmationPrompt = e.confirmationPrompt, this.staffId = e.staffId, this.backendUrl = e.backendUrl;
12309
12314
  }
@@ -12385,7 +12390,7 @@ class ah {
12385
12390
  }
12386
12391
  const { text: n } = this.domAnalyzer.analyze();
12387
12392
  console.log(`[ToolHandler] DOM snapshot: ${n.length} chars, instruction: "${t}"`);
12388
- const a = (await $o(
12393
+ const a = (await jo(
12389
12394
  this.staffId,
12390
12395
  n,
12391
12396
  t,
@@ -12398,7 +12403,7 @@ class ah {
12398
12403
  o.push({ action: "describe", status: "ok", description: h.description });
12399
12404
  continue;
12400
12405
  }
12401
- if (oh.has(h.action) && !await this.confirmationPrompt.ask(
12406
+ if (ah.has(h.action) && !await this.confirmationPrompt.ask(
12402
12407
  `${h.description}?`
12403
12408
  )) {
12404
12409
  o.push({
@@ -12444,7 +12449,7 @@ class ah {
12444
12449
  }), this.realtimeSession.sendJSON({ type: "response.create" });
12445
12450
  }
12446
12451
  }
12447
- class lh {
12452
+ class hh {
12448
12453
  constructor(e, t) {
12449
12454
  this.analyzer = e, this.highlightRenderer = t;
12450
12455
  }
@@ -12514,7 +12519,7 @@ class lh {
12514
12519
  return `<${t}>${n}</${t}>`;
12515
12520
  }
12516
12521
  }
12517
- class hh {
12522
+ class ch {
12518
12523
  constructor(e) {
12519
12524
  this.renderer = e;
12520
12525
  }
@@ -12531,10 +12536,10 @@ class hh {
12531
12536
  return this.renderer.dismissAll(), console.log("[OverlayActions] Dismissed all overlays"), { status: "dismissed" };
12532
12537
  }
12533
12538
  }
12534
- const ch = "https://us-central1-holostaff-ai.cloudfunctions.net";
12535
- class dh {
12539
+ const dh = "https://us-central1-holostaff-ai.cloudfunctions.net";
12540
+ class uh {
12536
12541
  constructor(e) {
12537
- this.messages = {}, this.actions = [], this.msgCounter = 0, this.staffId = e.staffId, this.staffName = e.staffName, this.backendUrl = e.backendUrl ?? ch, this.startTime = (/* @__PURE__ */ new Date()).toISOString(), this.userId = `visitor_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 6)}`;
12542
+ this.messages = {}, this.actions = [], this.msgCounter = 0, this.staffId = e.staffId, this.staffName = e.staffName, this.backendUrl = e.backendUrl ?? dh, this.startTime = (/* @__PURE__ */ new Date()).toISOString(), this.userId = `visitor_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 6)}`;
12538
12543
  }
12539
12544
  /** Log a user transcript (from ASR). */
12540
12545
  addUserMessage(e) {
@@ -12614,7 +12619,7 @@ var he;
12614
12619
  (function(i) {
12615
12620
  i[i.Document = 0] = "Document", i[i.DocumentType = 1] = "DocumentType", i[i.Element = 2] = "Element", i[i.Text = 3] = "Text", i[i.CDATA = 4] = "CDATA", i[i.Comment = 5] = "Comment";
12616
12621
  })(he || (he = {}));
12617
- function uh(i) {
12622
+ function fh(i) {
12618
12623
  return i.nodeType === i.ELEMENT_NODE;
12619
12624
  }
12620
12625
  function Jt(i) {
@@ -12624,30 +12629,30 @@ function Jt(i) {
12624
12629
  function Qt(i) {
12625
12630
  return Object.prototype.toString.call(i) === "[object ShadowRoot]";
12626
12631
  }
12627
- function fh(i) {
12632
+ function ph(i) {
12628
12633
  return i.includes(" background-clip: text;") && !i.includes(" -webkit-background-clip: text;") && (i = i.replace(" background-clip: text;", " -webkit-background-clip: text; background-clip: text;")), i;
12629
12634
  }
12630
12635
  function bs(i) {
12631
12636
  try {
12632
12637
  var e = i.rules || i.cssRules;
12633
- return e ? fh(Array.from(e).map(Fr).join("")) : null;
12638
+ return e ? ph(Array.from(e).map(Pr).join("")) : null;
12634
12639
  } catch {
12635
12640
  return null;
12636
12641
  }
12637
12642
  }
12638
- function Fr(i) {
12643
+ function Pr(i) {
12639
12644
  var e = i.cssText;
12640
- if (ph(i))
12645
+ if (mh(i))
12641
12646
  try {
12642
12647
  e = bs(i.styleSheet) || e;
12643
12648
  } catch {
12644
12649
  }
12645
12650
  return e;
12646
12651
  }
12647
- function ph(i) {
12652
+ function mh(i) {
12648
12653
  return "styleSheet" in i;
12649
12654
  }
12650
- var Pr = (function() {
12655
+ var Ur = (function() {
12651
12656
  function i() {
12652
12657
  this.idNodeMap = /* @__PURE__ */ new Map(), this.nodeMetaMap = /* @__PURE__ */ new WeakMap();
12653
12658
  }
@@ -12686,15 +12691,15 @@ var Pr = (function() {
12686
12691
  this.idNodeMap = /* @__PURE__ */ new Map(), this.nodeMetaMap = /* @__PURE__ */ new WeakMap();
12687
12692
  }, i;
12688
12693
  })();
12689
- function mh() {
12690
- return new Pr();
12694
+ function gh() {
12695
+ return new Ur();
12691
12696
  }
12692
12697
  function Ns(i) {
12693
12698
  var e = i.maskInputOptions, t = i.tagName, s = i.type, n = i.value, r = i.maskInputFn, a = n || "";
12694
12699
  return (e[t.toLowerCase()] || e[s]) && (r ? a = r(a) : a = "*".repeat(a.length)), a;
12695
12700
  }
12696
12701
  var yn = "__rrweb_original__";
12697
- function gh(i) {
12702
+ function yh(i) {
12698
12703
  var e = i.getContext("2d");
12699
12704
  if (!e)
12700
12705
  return !0;
@@ -12708,35 +12713,35 @@ function gh(i) {
12708
12713
  }
12709
12714
  return !0;
12710
12715
  }
12711
- var yh = 1, Ch = new RegExp("[^a-z0-9-_:]"), ni = -2;
12712
- function Ur() {
12713
- return yh++;
12716
+ var Ch = 1, bh = new RegExp("[^a-z0-9-_:]"), ni = -2;
12717
+ function Wr() {
12718
+ return Ch++;
12714
12719
  }
12715
- function bh(i) {
12720
+ function _h(i) {
12716
12721
  if (i instanceof HTMLFormElement)
12717
12722
  return "form";
12718
12723
  var e = i.tagName.toLowerCase().trim();
12719
- return Ch.test(e) ? "div" : e;
12724
+ return bh.test(e) ? "div" : e;
12720
12725
  }
12721
- function _h(i) {
12726
+ function Eh(i) {
12722
12727
  return i.cssRules ? Array.from(i.cssRules).map(function(e) {
12723
12728
  return e.cssText || "";
12724
12729
  }).join("") : "";
12725
12730
  }
12726
- function Eh(i) {
12731
+ function vh(i) {
12727
12732
  var e = "";
12728
12733
  return i.indexOf("//") > -1 ? e = i.split("/").slice(0, 3).join("/") : e = i.split("/")[0], e = e.split("?")[0], e;
12729
12734
  }
12730
- var xt, Cn, vh = /url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm, Sh = /^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/, Ih = /^(data:)([^,]*),(.*)/i;
12735
+ var xt, Cn, Sh = /url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm, Ih = /^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/, Ah = /^(data:)([^,]*),(.*)/i;
12731
12736
  function ki(i, e) {
12732
- return (i || "").replace(vh, function(t, s, n, r, a, o) {
12737
+ return (i || "").replace(Sh, function(t, s, n, r, a, o) {
12733
12738
  var h = n || a || o, d = s || r || "";
12734
12739
  if (!h)
12735
12740
  return t;
12736
- if (!Sh.test(h) || Ih.test(h))
12741
+ if (!Ih.test(h) || Ah.test(h))
12737
12742
  return "url(".concat(d).concat(h).concat(d, ")");
12738
12743
  if (h[0] === "/")
12739
- return "url(".concat(d).concat(Eh(e) + h).concat(d, ")");
12744
+ return "url(".concat(d).concat(vh(e) + h).concat(d, ")");
12740
12745
  var f = e.split("/"), u = h.split("/");
12741
12746
  f.pop();
12742
12747
  for (var y = 0, g = u; y < g.length; y++) {
@@ -12746,8 +12751,8 @@ function ki(i, e) {
12746
12751
  return "url(".concat(d).concat(f.join("/")).concat(d, ")");
12747
12752
  });
12748
12753
  }
12749
- var Ah = /^[^ \t\n\r\u000c]+/, wh = /^[, \t\n\r\u000c]+/;
12750
- function xh(i, e) {
12754
+ var wh = /^[^ \t\n\r\u000c]+/, xh = /^[, \t\n\r\u000c]+/;
12755
+ function Th(i, e) {
12751
12756
  if (e.trim() === "")
12752
12757
  return e;
12753
12758
  var t = 0;
@@ -12755,8 +12760,8 @@ function xh(i, e) {
12755
12760
  var f, u = d.exec(e.substring(t));
12756
12761
  return u ? (f = u[0], t += f.length, f) : "";
12757
12762
  }
12758
- for (var n = []; s(wh), !(t >= e.length); ) {
12759
- var r = s(Ah);
12763
+ for (var n = []; s(xh), !(t >= e.length); ) {
12764
+ var r = s(wh);
12760
12765
  if (r.slice(-1) === ",")
12761
12766
  r = Nt(i, r.substring(0, r.length - 1)), n.push(r);
12762
12767
  else {
@@ -12785,17 +12790,17 @@ function Nt(i, e) {
12785
12790
  var t = i.createElement("a");
12786
12791
  return t.href = e, t.href;
12787
12792
  }
12788
- function Th(i) {
12793
+ function Rh(i) {
12789
12794
  return !!(i.tagName === "svg" || i.ownerSVGElement);
12790
12795
  }
12791
12796
  function Ls() {
12792
12797
  var i = document.createElement("a");
12793
12798
  return i.href = "", i.href;
12794
12799
  }
12795
- function Wr(i, e, t, s) {
12796
- return t === "src" || t === "href" && s && !(e === "use" && s[0] === "#") || t === "xlink:href" && s && s[0] !== "#" || t === "background" && s && (e === "table" || e === "td" || e === "th") ? Nt(i, s) : t === "srcset" && s ? xh(i, s) : t === "style" && s ? ki(s, Ls()) : e === "object" && t === "data" && s ? Nt(i, s) : s;
12800
+ function Gr(i, e, t, s) {
12801
+ return t === "src" || t === "href" && s && !(e === "use" && s[0] === "#") || t === "xlink:href" && s && s[0] !== "#" || t === "background" && s && (e === "table" || e === "td" || e === "th") ? Nt(i, s) : t === "srcset" && s ? Th(i, s) : t === "style" && s ? ki(s, Ls()) : e === "object" && t === "data" && s ? Nt(i, s) : s;
12797
12802
  }
12798
- function Rh(i, e, t) {
12803
+ function Oh(i, e, t) {
12799
12804
  if (typeof e == "string") {
12800
12805
  if (i.classList.contains(e))
12801
12806
  return !0;
@@ -12819,7 +12824,7 @@ function Mi(i, e, t) {
12819
12824
  }
12820
12825
  return t ? Mi(i.parentNode, e, t) : !1;
12821
12826
  }
12822
- function Gr(i, e, t) {
12827
+ function Vr(i, e, t) {
12823
12828
  var s = i.nodeType === i.ELEMENT_NODE ? i : i.parentElement;
12824
12829
  if (s === null)
12825
12830
  return !1;
@@ -12830,7 +12835,7 @@ function Gr(i, e, t) {
12830
12835
  return !0;
12831
12836
  return !!(t && (s.matches(t) || s.closest(t)));
12832
12837
  }
12833
- function Oh(i, e, t) {
12838
+ function kh(i, e, t) {
12834
12839
  var s = i.contentWindow;
12835
12840
  if (s) {
12836
12841
  var n = !1, r;
@@ -12854,7 +12859,7 @@ function Oh(i, e, t) {
12854
12859
  i.addEventListener("load", e);
12855
12860
  }
12856
12861
  }
12857
- function kh(i, e, t) {
12862
+ function Mh(i, e, t) {
12858
12863
  var s = !1, n;
12859
12864
  try {
12860
12865
  n = i.sheet;
@@ -12870,8 +12875,8 @@ function kh(i, e, t) {
12870
12875
  });
12871
12876
  }
12872
12877
  }
12873
- function Mh(i, e) {
12874
- var t = e.doc, s = e.mirror, n = e.blockClass, r = e.blockSelector, a = e.maskTextClass, o = e.maskTextSelector, h = e.inlineStylesheet, d = e.maskInputOptions, f = d === void 0 ? {} : d, u = e.maskTextFn, y = e.maskInputFn, g = e.dataURLOptions, C = g === void 0 ? {} : g, _ = e.inlineImages, E = e.recordCanvas, A = e.keepIframeSrcFn, I = e.newlyAddedElement, S = I === void 0 ? !1 : I, x = Nh(t, s);
12878
+ function Nh(i, e) {
12879
+ var t = e.doc, s = e.mirror, n = e.blockClass, r = e.blockSelector, a = e.maskTextClass, o = e.maskTextSelector, h = e.inlineStylesheet, d = e.maskInputOptions, f = d === void 0 ? {} : d, u = e.maskTextFn, y = e.maskInputFn, g = e.dataURLOptions, C = g === void 0 ? {} : g, _ = e.inlineImages, E = e.recordCanvas, A = e.keepIframeSrcFn, I = e.newlyAddedElement, S = I === void 0 ? !1 : I, x = Lh(t, s);
12875
12880
  switch (i.nodeType) {
12876
12881
  case i.DOCUMENT_NODE:
12877
12882
  return i.compatMode !== "CSS1Compat" ? {
@@ -12891,7 +12896,7 @@ function Mh(i, e) {
12891
12896
  rootId: x
12892
12897
  };
12893
12898
  case i.ELEMENT_NODE:
12894
- return Dh(i, {
12899
+ return Bh(i, {
12895
12900
  doc: t,
12896
12901
  blockClass: n,
12897
12902
  blockSelector: r,
@@ -12906,7 +12911,7 @@ function Mh(i, e) {
12906
12911
  rootId: x
12907
12912
  });
12908
12913
  case i.TEXT_NODE:
12909
- return Lh(i, {
12914
+ return Dh(i, {
12910
12915
  maskTextClass: a,
12911
12916
  maskTextSelector: o,
12912
12917
  maskTextFn: u,
@@ -12928,33 +12933,33 @@ function Mh(i, e) {
12928
12933
  return !1;
12929
12934
  }
12930
12935
  }
12931
- function Nh(i, e) {
12936
+ function Lh(i, e) {
12932
12937
  if (e.hasNode(i)) {
12933
12938
  var t = e.getId(i);
12934
12939
  return t === 1 ? void 0 : t;
12935
12940
  }
12936
12941
  }
12937
- function Lh(i, e) {
12942
+ function Dh(i, e) {
12938
12943
  var t, s = e.maskTextClass, n = e.maskTextSelector, r = e.maskTextFn, a = e.rootId, o = i.parentNode && i.parentNode.tagName, h = i.textContent, d = o === "STYLE" ? !0 : void 0, f = o === "SCRIPT" ? !0 : void 0;
12939
12944
  if (d && h) {
12940
12945
  try {
12941
- i.nextSibling || i.previousSibling || !((t = i.parentNode.sheet) === null || t === void 0) && t.cssRules && (h = _h(i.parentNode.sheet));
12946
+ i.nextSibling || i.previousSibling || !((t = i.parentNode.sheet) === null || t === void 0) && t.cssRules && (h = Eh(i.parentNode.sheet));
12942
12947
  } catch (u) {
12943
12948
  console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(u), i);
12944
12949
  }
12945
12950
  h = ki(h, Ls());
12946
12951
  }
12947
- return f && (h = "SCRIPT_PLACEHOLDER"), !d && !f && h && Gr(i, s, n) && (h = r ? r(h) : h.replace(/[\S]/g, "*")), {
12952
+ return f && (h = "SCRIPT_PLACEHOLDER"), !d && !f && h && Vr(i, s, n) && (h = r ? r(h) : h.replace(/[\S]/g, "*")), {
12948
12953
  type: he.Text,
12949
12954
  textContent: h || "",
12950
12955
  isStyle: d,
12951
12956
  rootId: a
12952
12957
  };
12953
12958
  }
12954
- function Dh(i, e) {
12955
- for (var t = e.doc, s = e.blockClass, n = e.blockSelector, r = e.inlineStylesheet, a = e.maskInputOptions, o = a === void 0 ? {} : a, h = e.maskInputFn, d = e.dataURLOptions, f = d === void 0 ? {} : d, u = e.inlineImages, y = e.recordCanvas, g = e.keepIframeSrcFn, C = e.newlyAddedElement, _ = C === void 0 ? !1 : C, E = e.rootId, A = Rh(i, s, n), I = bh(i), S = {}, x = i.attributes.length, T = 0; T < x; T++) {
12959
+ function Bh(i, e) {
12960
+ for (var t = e.doc, s = e.blockClass, n = e.blockSelector, r = e.inlineStylesheet, a = e.maskInputOptions, o = a === void 0 ? {} : a, h = e.maskInputFn, d = e.dataURLOptions, f = d === void 0 ? {} : d, u = e.inlineImages, y = e.recordCanvas, g = e.keepIframeSrcFn, C = e.newlyAddedElement, _ = C === void 0 ? !1 : C, E = e.rootId, A = Oh(i, s, n), I = _h(i), S = {}, x = i.attributes.length, T = 0; T < x; T++) {
12956
12961
  var M = i.attributes[T];
12957
- S[M.name] = Wr(t, I, M.name, M.value);
12962
+ S[M.name] = Gr(t, I, M.name, M.value);
12958
12963
  }
12959
12964
  if (I === "link" && r) {
12960
12965
  var F = Array.from(t.styleSheets).find(function(be) {
@@ -12978,7 +12983,7 @@ function Dh(i, e) {
12978
12983
  }
12979
12984
  if (I === "option" && (i.selected && !o.select ? S.selected = !0 : delete S.selected), I === "canvas" && y) {
12980
12985
  if (i.__context === "2d")
12981
- gh(i) || (S.rr_dataURL = i.toDataURL(f.type, f.quality));
12986
+ yh(i) || (S.rr_dataURL = i.toDataURL(f.type, f.quality));
12982
12987
  else if (!("__context" in i)) {
12983
12988
  var ce = i.toDataURL(f.type, f.quality), fe = document.createElement("canvas");
12984
12989
  fe.width = i.width, fe.height = i.height;
@@ -13013,7 +13018,7 @@ function Dh(i, e) {
13013
13018
  tagName: I,
13014
13019
  attributes: S,
13015
13020
  childNodes: [],
13016
- isSVG: Th(i) || void 0,
13021
+ isSVG: Rh(i) || void 0,
13017
13022
  needBlock: A,
13018
13023
  rootId: E
13019
13024
  };
@@ -13021,7 +13026,7 @@ function Dh(i, e) {
13021
13026
  function j(i) {
13022
13027
  return i === void 0 ? "" : i.toLowerCase();
13023
13028
  }
13024
- function Bh(i, e) {
13029
+ function Fh(i, e) {
13025
13030
  if (e.comment && i.type === he.Comment)
13026
13031
  return !0;
13027
13032
  if (i.type === he.Element) {
@@ -13049,7 +13054,7 @@ function Bh(i, e) {
13049
13054
  function Lt(i, e) {
13050
13055
  var t = e.doc, s = e.mirror, n = e.blockClass, r = e.blockSelector, a = e.maskTextClass, o = e.maskTextSelector, h = e.skipChild, d = h === void 0 ? !1 : h, f = e.inlineStylesheet, u = f === void 0 ? !0 : f, y = e.maskInputOptions, g = y === void 0 ? {} : y, C = e.maskTextFn, _ = e.maskInputFn, E = e.slimDOMOptions, A = e.dataURLOptions, I = A === void 0 ? {} : A, S = e.inlineImages, x = S === void 0 ? !1 : S, T = e.recordCanvas, M = T === void 0 ? !1 : T, F = e.onSerialize, L = e.onIframeLoad, J = e.iframeLoadTimeout, X = J === void 0 ? 5e3 : J, ce = e.onStylesheetLoad, fe = e.stylesheetLoadTimeout, pe = fe === void 0 ? 5e3 : fe, H = e.keepIframeSrcFn, se = H === void 0 ? function() {
13051
13056
  return !1;
13052
- } : H, Ae = e.newlyAddedElement, ke = Ae === void 0 ? !1 : Ae, Be = e.preserveWhiteSpace, me = Be === void 0 ? !0 : Be, be = Mh(i, {
13057
+ } : H, Ae = e.newlyAddedElement, ke = Ae === void 0 ? !1 : Ae, Be = e.preserveWhiteSpace, me = Be === void 0 ? !0 : Be, be = Nh(i, {
13053
13058
  doc: t,
13054
13059
  mirror: s,
13055
13060
  blockClass: n,
@@ -13069,7 +13074,7 @@ function Lt(i, e) {
13069
13074
  if (!be)
13070
13075
  return console.warn(i, "not serialized"), null;
13071
13076
  var W;
13072
- s.hasNode(i) ? W = s.getId(i) : Bh(be, E) || !me && be.type === he.Text && !be.isStyle && !be.textContent.replace(/^\s+|\s+$/gm, "").length ? W = ni : W = Ur();
13077
+ s.hasNode(i) ? W = s.getId(i) : Fh(be, E) || !me && be.type === he.Text && !be.isStyle && !be.textContent.replace(/^\s+|\s+$/gm, "").length ? W = ni : W = Wr();
13073
13078
  var D = Object.assign(be, { id: W });
13074
13079
  if (s.add(i, D), W === ni)
13075
13080
  return null;
@@ -13109,13 +13114,13 @@ function Lt(i, e) {
13109
13114
  var Q = ae[O], $ = Lt(Q, qe);
13110
13115
  $ && D.childNodes.push($);
13111
13116
  }
13112
- if (uh(i) && i.shadowRoot)
13117
+ if (fh(i) && i.shadowRoot)
13113
13118
  for (var ge = 0, P = Array.from(i.shadowRoot.childNodes); ge < P.length; ge++) {
13114
13119
  var Q = P[ge], $ = Lt(Q, qe);
13115
13120
  $ && (Qt(i.shadowRoot) && ($.isShadow = !0), D.childNodes.push($));
13116
13121
  }
13117
13122
  }
13118
- return i.parentNode && Jt(i.parentNode) && Qt(i.parentNode) && (D.isShadow = !0), D.type === he.Element && D.tagName === "iframe" && Oh(i, function() {
13123
+ return i.parentNode && Jt(i.parentNode) && Qt(i.parentNode) && (D.isShadow = !0), D.type === he.Element && D.tagName === "iframe" && kh(i, function() {
13119
13124
  var de = i.contentDocument;
13120
13125
  if (de && L) {
13121
13126
  var Me = Lt(de, {
@@ -13144,7 +13149,7 @@ function Lt(i, e) {
13144
13149
  });
13145
13150
  Me && L(i, Me);
13146
13151
  }
13147
- }, X), D.type === he.Element && D.tagName === "link" && D.attributes.rel === "stylesheet" && kh(i, function() {
13152
+ }, X), D.type === he.Element && D.tagName === "link" && D.attributes.rel === "stylesheet" && Mh(i, function() {
13148
13153
  if (ce) {
13149
13154
  var de = Lt(i, {
13150
13155
  doc: t,
@@ -13174,8 +13179,8 @@ function Lt(i, e) {
13174
13179
  }
13175
13180
  }, pe), D;
13176
13181
  }
13177
- function Fh(i, e) {
13178
- var t = e || {}, s = t.mirror, n = s === void 0 ? new Pr() : s, r = t.blockClass, a = r === void 0 ? "rr-block" : r, o = t.blockSelector, h = o === void 0 ? null : o, d = t.maskTextClass, f = d === void 0 ? "rr-mask" : d, u = t.maskTextSelector, y = u === void 0 ? null : u, g = t.inlineStylesheet, C = g === void 0 ? !0 : g, _ = t.inlineImages, E = _ === void 0 ? !1 : _, A = t.recordCanvas, I = A === void 0 ? !1 : A, S = t.maskAllInputs, x = S === void 0 ? !1 : S, T = t.maskTextFn, M = t.maskInputFn, F = t.slimDOM, L = F === void 0 ? !1 : F, J = t.dataURLOptions, X = t.preserveWhiteSpace, ce = t.onSerialize, fe = t.onIframeLoad, pe = t.iframeLoadTimeout, H = t.onStylesheetLoad, se = t.stylesheetLoadTimeout, Ae = t.keepIframeSrcFn, ke = Ae === void 0 ? function() {
13182
+ function Ph(i, e) {
13183
+ var t = e || {}, s = t.mirror, n = s === void 0 ? new Ur() : s, r = t.blockClass, a = r === void 0 ? "rr-block" : r, o = t.blockSelector, h = o === void 0 ? null : o, d = t.maskTextClass, f = d === void 0 ? "rr-mask" : d, u = t.maskTextSelector, y = u === void 0 ? null : u, g = t.inlineStylesheet, C = g === void 0 ? !0 : g, _ = t.inlineImages, E = _ === void 0 ? !1 : _, A = t.recordCanvas, I = A === void 0 ? !1 : A, S = t.maskAllInputs, x = S === void 0 ? !1 : S, T = t.maskTextFn, M = t.maskInputFn, F = t.slimDOM, L = F === void 0 ? !1 : F, J = t.dataURLOptions, X = t.preserveWhiteSpace, ce = t.onSerialize, fe = t.onIframeLoad, pe = t.iframeLoadTimeout, H = t.onStylesheetLoad, se = t.stylesheetLoadTimeout, Ae = t.keepIframeSrcFn, ke = Ae === void 0 ? function() {
13179
13184
  return !1;
13180
13185
  } : Ae, Be = x === !0 ? {
13181
13186
  color: !0,
@@ -13304,10 +13309,10 @@ function Pt(i, e, t) {
13304
13309
  };
13305
13310
  }
13306
13311
  }
13307
- function Vr() {
13312
+ function Hr() {
13308
13313
  return window.innerHeight || document.documentElement && document.documentElement.clientHeight || document.body && document.body.clientHeight;
13309
13314
  }
13310
- function Hr() {
13315
+ function $r() {
13311
13316
  return window.innerWidth || document.documentElement && document.documentElement.clientWidth || document.body && document.body.clientWidth;
13312
13317
  }
13313
13318
  function ve(i, e, t, s) {
@@ -13323,22 +13328,22 @@ function ve(i, e, t, s) {
13323
13328
  return !0;
13324
13329
  return !!(t && (i.matches(t) || s && n.closest(t) !== null));
13325
13330
  }
13326
- function Ph(i, e) {
13331
+ function Uh(i, e) {
13327
13332
  return e.getId(i) !== -1;
13328
13333
  }
13329
13334
  function ns(i, e) {
13330
13335
  return e.getId(i) === ni;
13331
13336
  }
13332
- function $r(i, e) {
13337
+ function jr(i, e) {
13333
13338
  if (Jt(i))
13334
13339
  return !1;
13335
13340
  const t = e.getId(i);
13336
- return e.has(t) ? i.parentNode && i.parentNode.nodeType === i.DOCUMENT_NODE ? !1 : i.parentNode ? $r(i.parentNode, e) : !0 : !0;
13341
+ return e.has(t) ? i.parentNode && i.parentNode.nodeType === i.DOCUMENT_NODE ? !1 : i.parentNode ? jr(i.parentNode, e) : !0 : !0;
13337
13342
  }
13338
- function jr(i) {
13343
+ function zr(i) {
13339
13344
  return !!i.changedTouches;
13340
13345
  }
13341
- function Uh(i = window) {
13346
+ function Wh(i = window) {
13342
13347
  "NodeList" in i && !i.NodeList.prototype.forEach && (i.NodeList.prototype.forEach = Array.prototype.forEach), "DOMTokenList" in i && !i.DOMTokenList.prototype.forEach && (i.DOMTokenList.prototype.forEach = Array.prototype.forEach), Node.prototype.contains || (Node.prototype.contains = (...e) => {
13343
13348
  let t = e[0];
13344
13349
  if (!(0 in e))
@@ -13350,16 +13355,16 @@ function Uh(i = window) {
13350
13355
  return !1;
13351
13356
  });
13352
13357
  }
13353
- function zr(i, e) {
13358
+ function Yr(i, e) {
13354
13359
  return !!(i.nodeName === "IFRAME" && e.getMeta(i));
13355
13360
  }
13356
- function Yr(i, e) {
13361
+ function Xr(i, e) {
13357
13362
  return !!(i.nodeName === "LINK" && i.nodeType === i.ELEMENT_NODE && i.getAttribute && i.getAttribute("rel") === "stylesheet" && e.getMeta(i));
13358
13363
  }
13359
- function Xr(i) {
13364
+ function qr(i) {
13360
13365
  return !!(i != null && i.shadowRoot);
13361
13366
  }
13362
- class Wh {
13367
+ class Gh {
13363
13368
  constructor() {
13364
13369
  this.id = 1, this.styleIDMap = /* @__PURE__ */ new WeakMap(), this.idStyleMap = /* @__PURE__ */ new Map();
13365
13370
  }
@@ -13390,7 +13395,7 @@ var U = /* @__PURE__ */ ((i) => (i[i.DomContentLoaded = 0] = "DomContentLoaded",
13390
13395
  function _n(i) {
13391
13396
  return "__ln" in i;
13392
13397
  }
13393
- class Gh {
13398
+ class Vh {
13394
13399
  constructor() {
13395
13400
  this.length = 0, this.head = null;
13396
13401
  }
@@ -13424,14 +13429,14 @@ class Gh {
13424
13429
  }
13425
13430
  }
13426
13431
  const En = (i, e) => `${i}@${e}`;
13427
- class Vh {
13432
+ class Hh {
13428
13433
  constructor() {
13429
13434
  this.frozen = !1, this.locked = !1, this.texts = [], this.attributes = [], this.removes = [], this.mapRemoves = [], this.movedMap = {}, this.addedSet = /* @__PURE__ */ new Set(), this.movedSet = /* @__PURE__ */ new Set(), this.droppedSet = /* @__PURE__ */ new Set(), this.processMutations = (e) => {
13430
13435
  e.forEach(this.processMutation), this.emit();
13431
13436
  }, this.emit = () => {
13432
13437
  if (this.frozen || this.locked)
13433
13438
  return;
13434
- const e = [], t = new Gh(), s = (o) => {
13439
+ const e = [], t = new Vh(), s = (o) => {
13435
13440
  let h = o, d = ni;
13436
13441
  for (; d === ni; )
13437
13442
  h = h && h.nextSibling, d = h && this.mirror.getId(h);
@@ -13467,7 +13472,7 @@ class Vh {
13467
13472
  recordCanvas: this.recordCanvas,
13468
13473
  inlineImages: this.inlineImages,
13469
13474
  onSerialize: (I) => {
13470
- zr(I, this.mirror) && this.iframeManager.addIframe(I), Yr(I, this.mirror) && this.stylesheetManager.trackLinkElement(I), Xr(o) && this.shadowDomManager.addShadowRoot(o.shadowRoot, this.doc);
13475
+ Yr(I, this.mirror) && this.iframeManager.addIframe(I), Xr(I, this.mirror) && this.stylesheetManager.trackLinkElement(I), qr(o) && this.shadowDomManager.addShadowRoot(o.shadowRoot, this.doc);
13471
13476
  },
13472
13477
  onIframeLoad: (I, S) => {
13473
13478
  this.iframeManager.attachIframe(I, S), this.shadowDomManager.observeAttachShadow(I);
@@ -13543,7 +13548,7 @@ class Vh {
13543
13548
  case "characterData": {
13544
13549
  const t = e.target.textContent;
13545
13550
  !ve(e.target, this.blockClass, this.blockSelector, !1) && t !== e.oldValue && this.texts.push({
13546
- value: Gr(e.target, this.maskTextClass, this.maskTextSelector) && t ? this.maskTextFn ? this.maskTextFn(t) : t.replace(/[\S]/g, "*") : t,
13551
+ value: Vr(e.target, this.maskTextClass, this.maskTextSelector) && t ? this.maskTextFn ? this.maskTextFn(t) : t.replace(/[\S]/g, "*") : t,
13547
13552
  node: e.target
13548
13553
  });
13549
13554
  break;
@@ -13579,7 +13584,7 @@ class Vh {
13579
13584
  for (const o of Array.from(r.style))
13580
13585
  t.style.getPropertyValue(o) === "" && (a[o] = !1);
13581
13586
  } else
13582
- n.attributes[e.attributeName] = Wr(this.doc, t.tagName, e.attributeName, s);
13587
+ n.attributes[e.attributeName] = Gr(this.doc, t.tagName, e.attributeName, s);
13583
13588
  break;
13584
13589
  }
13585
13590
  case "childList": {
@@ -13587,7 +13592,7 @@ class Vh {
13587
13592
  return;
13588
13593
  e.addedNodes.forEach((t) => this.genAdds(t, e.target)), e.removedNodes.forEach((t) => {
13589
13594
  const s = this.mirror.getId(t), n = Jt(e.target) ? this.mirror.getId(e.target.host) : this.mirror.getId(e.target);
13590
- ve(e.target, this.blockClass, this.blockSelector, !1) || ns(t, this.mirror) || !Ph(t, this.mirror) || (this.addedSet.has(t) ? (Es(this.addedSet, t), this.droppedSet.add(t)) : this.addedSet.has(e.target) && s === -1 || $r(e.target, this.mirror) || (this.movedSet.has(t) && this.movedMap[En(s, n)] ? Es(this.movedSet, t) : this.removes.push({
13595
+ ve(e.target, this.blockClass, this.blockSelector, !1) || ns(t, this.mirror) || !Uh(t, this.mirror) || (this.addedSet.has(t) ? (Es(this.addedSet, t), this.droppedSet.add(t)) : this.addedSet.has(e.target) && s === -1 || jr(e.target, this.mirror) || (this.movedSet.has(t) && this.movedMap[En(s, n)] ? Es(this.movedSet, t) : this.removes.push({
13591
13596
  parentId: n,
13592
13597
  id: s,
13593
13598
  isShadow: Jt(e.target) && Qt(e.target) ? !0 : void 0
@@ -13657,23 +13662,23 @@ function Es(i, e) {
13657
13662
  i.delete(e), e.childNodes.forEach((t) => Es(i, t));
13658
13663
  }
13659
13664
  function vn(i, e, t) {
13660
- return i.length === 0 ? !1 : qr(i, e, t);
13665
+ return i.length === 0 ? !1 : Kr(i, e, t);
13661
13666
  }
13662
- function qr(i, e, t) {
13667
+ function Kr(i, e, t) {
13663
13668
  const { parentNode: s } = e;
13664
13669
  if (!s)
13665
13670
  return !1;
13666
13671
  const n = t.getId(s);
13667
- return i.some((r) => r.id === n) ? !0 : qr(i, s, t);
13672
+ return i.some((r) => r.id === n) ? !0 : Kr(i, s, t);
13668
13673
  }
13669
13674
  function Sn(i, e) {
13670
- return i.size === 0 ? !1 : Kr(i, e);
13675
+ return i.size === 0 ? !1 : Zr(i, e);
13671
13676
  }
13672
- function Kr(i, e) {
13677
+ function Zr(i, e) {
13673
13678
  const { parentNode: t } = e;
13674
- return t ? i.has(t) ? !0 : Kr(i, t) : !1;
13679
+ return t ? i.has(t) ? !0 : Zr(i, t) : !1;
13675
13680
  }
13676
- const bt = [], Zr = typeof CSSGroupingRule < "u", Jr = typeof CSSMediaRule < "u", Qr = typeof CSSSupportsRule < "u", eo = typeof CSSConditionRule < "u";
13681
+ const bt = [], Jr = typeof CSSGroupingRule < "u", Qr = typeof CSSMediaRule < "u", eo = typeof CSSSupportsRule < "u", to = typeof CSSConditionRule < "u";
13677
13682
  function li(i) {
13678
13683
  try {
13679
13684
  if ("composedPath" in i) {
@@ -13687,9 +13692,9 @@ function li(i) {
13687
13692
  return i.target;
13688
13693
  }
13689
13694
  }
13690
- function to(i, e) {
13695
+ function io(i, e) {
13691
13696
  var t, s;
13692
- const n = new Vh();
13697
+ const n = new Hh();
13693
13698
  bt.push(n), n.init(i);
13694
13699
  let r = window.MutationObserver || window.__rrMutationObserver;
13695
13700
  const a = (s = (t = window == null ? void 0 : window.Zone) === null || t === void 0 ? void 0 : t.__symbol__) === null || s === void 0 ? void 0 : s.call(t, "MutationObserver");
@@ -13704,7 +13709,7 @@ function to(i, e) {
13704
13709
  subtree: !0
13705
13710
  }), o;
13706
13711
  }
13707
- function Hh({ mousemoveCb: i, sampling: e, doc: t, mirror: s }) {
13712
+ function $h({ mousemoveCb: i, sampling: e, doc: t, mirror: s }) {
13708
13713
  if (e.mousemove === !1)
13709
13714
  return () => {
13710
13715
  };
@@ -13714,7 +13719,7 @@ function Hh({ mousemoveCb: i, sampling: e, doc: t, mirror: s }) {
13714
13719
  const y = Date.now() - o;
13715
13720
  i(a.map((g) => (g.timeOffset -= y, g)), u), a = [], o = null;
13716
13721
  }, r), d = ri((u) => {
13717
- const y = li(u), { clientX: g, clientY: C } = jr(u) ? u.changedTouches[0] : u;
13722
+ const y = li(u), { clientX: g, clientY: C } = zr(u) ? u.changedTouches[0] : u;
13718
13723
  o || (o = Date.now()), a.push({
13719
13724
  x: g,
13720
13725
  y: C,
@@ -13732,7 +13737,7 @@ function Hh({ mousemoveCb: i, sampling: e, doc: t, mirror: s }) {
13732
13737
  f.forEach((u) => u());
13733
13738
  };
13734
13739
  }
13735
- function $h({ mouseInteractionCb: i, doc: e, mirror: t, blockClass: s, blockSelector: n, sampling: r }) {
13740
+ function jh({ mouseInteractionCb: i, doc: e, mirror: t, blockClass: s, blockSelector: n, sampling: r }) {
13736
13741
  if (r.mouseInteraction === !1)
13737
13742
  return () => {
13738
13743
  };
@@ -13740,7 +13745,7 @@ function $h({ mouseInteractionCb: i, doc: e, mirror: t, blockClass: s, blockSele
13740
13745
  const u = li(f);
13741
13746
  if (ve(u, s, n, !0))
13742
13747
  return;
13743
- const y = jr(f) ? f.changedTouches[0] : f;
13748
+ const y = zr(f) ? f.changedTouches[0] : f;
13744
13749
  if (!y)
13745
13750
  return;
13746
13751
  const g = t.getId(u), { clientX: C, clientY: _ } = y;
@@ -13758,7 +13763,7 @@ function $h({ mouseInteractionCb: i, doc: e, mirror: t, blockClass: s, blockSele
13758
13763
  o.forEach((d) => d());
13759
13764
  };
13760
13765
  }
13761
- function io({ scrollCb: i, doc: e, mirror: t, blockClass: s, blockSelector: n, sampling: r }) {
13766
+ function so({ scrollCb: i, doc: e, mirror: t, blockClass: s, blockSelector: n, sampling: r }) {
13762
13767
  const a = ri((o) => {
13763
13768
  const h = li(o);
13764
13769
  if (!h || ve(h, s, n, !0))
@@ -13780,10 +13785,10 @@ function io({ scrollCb: i, doc: e, mirror: t, blockClass: s, blockSelector: n, s
13780
13785
  }, r.scroll || 100);
13781
13786
  return Ee("scroll", a, e);
13782
13787
  }
13783
- function jh({ viewportResizeCb: i }) {
13788
+ function zh({ viewportResizeCb: i }) {
13784
13789
  let e = -1, t = -1;
13785
13790
  const s = ri(() => {
13786
- const n = Vr(), r = Hr();
13791
+ const n = Hr(), r = $r();
13787
13792
  (e !== n || t !== r) && (i({
13788
13793
  width: Number(r),
13789
13794
  height: Number(n)
@@ -13795,12 +13800,12 @@ function In(i, e) {
13795
13800
  const t = Object.assign({}, i);
13796
13801
  return e || delete t.userTriggered, t;
13797
13802
  }
13798
- const zh = ["INPUT", "TEXTAREA", "SELECT"], An = /* @__PURE__ */ new WeakMap();
13799
- function Yh({ inputCb: i, doc: e, mirror: t, blockClass: s, blockSelector: n, ignoreClass: r, maskInputOptions: a, maskInputFn: o, sampling: h, userTriggeredOnInput: d }) {
13803
+ const Yh = ["INPUT", "TEXTAREA", "SELECT"], An = /* @__PURE__ */ new WeakMap();
13804
+ function Xh({ inputCb: i, doc: e, mirror: t, blockClass: s, blockSelector: n, ignoreClass: r, maskInputOptions: a, maskInputFn: o, sampling: h, userTriggeredOnInput: d }) {
13800
13805
  function f(A) {
13801
13806
  let I = li(A);
13802
13807
  const S = A.isTrusted;
13803
- if (I && I.tagName === "OPTION" && (I = I.parentElement), !I || !I.tagName || zh.indexOf(I.tagName) < 0 || ve(I, s, n, !0))
13808
+ if (I && I.tagName === "OPTION" && (I = I.parentElement), !I || !I.tagName || Yh.indexOf(I.tagName) < 0 || ve(I, s, n, !0))
13804
13809
  return;
13805
13810
  const x = I.type;
13806
13811
  if (I.classList.contains(r))
@@ -13854,7 +13859,7 @@ function Yh({ inputCb: i, doc: e, mirror: t, blockClass: s, blockSelector: n, ig
13854
13859
  function Ni(i) {
13855
13860
  const e = [];
13856
13861
  function t(s, n) {
13857
- if (Zr && s.parentRule instanceof CSSGroupingRule || Jr && s.parentRule instanceof CSSMediaRule || Qr && s.parentRule instanceof CSSSupportsRule || eo && s.parentRule instanceof CSSConditionRule) {
13862
+ if (Jr && s.parentRule instanceof CSSGroupingRule || Qr && s.parentRule instanceof CSSMediaRule || eo && s.parentRule instanceof CSSSupportsRule || to && s.parentRule instanceof CSSConditionRule) {
13858
13863
  const a = Array.from(s.parentRule.cssRules).indexOf(s);
13859
13864
  n.unshift(a);
13860
13865
  } else if (s.parentStyleSheet) {
@@ -13872,7 +13877,7 @@ function at(i, e, t) {
13872
13877
  id: s
13873
13878
  }) : {};
13874
13879
  }
13875
- function Xh({ styleSheetRuleCb: i, mirror: e, stylesheetManager: t }, { win: s }) {
13880
+ function qh({ styleSheetRuleCb: i, mirror: e, stylesheetManager: t }, { win: s }) {
13876
13881
  const n = s.CSSStyleSheet.prototype.insertRule;
13877
13882
  s.CSSStyleSheet.prototype.insertRule = function(f, u) {
13878
13883
  const { id: y, styleId: g } = at(this, e, t.styleMirror);
@@ -13910,7 +13915,7 @@ function Xh({ styleSheetRuleCb: i, mirror: e, stylesheetManager: t }, { win: s }
13910
13915
  }), o.apply(this, [f]);
13911
13916
  });
13912
13917
  const h = {};
13913
- Zr ? h.CSSGroupingRule = s.CSSGroupingRule : (Jr && (h.CSSMediaRule = s.CSSMediaRule), eo && (h.CSSConditionRule = s.CSSConditionRule), Qr && (h.CSSSupportsRule = s.CSSSupportsRule));
13918
+ Jr ? h.CSSGroupingRule = s.CSSGroupingRule : (Qr && (h.CSSMediaRule = s.CSSMediaRule), to && (h.CSSConditionRule = s.CSSConditionRule), eo && (h.CSSSupportsRule = s.CSSSupportsRule));
13914
13919
  const d = {};
13915
13920
  return Object.entries(h).forEach(([f, u]) => {
13916
13921
  d[f] = {
@@ -13947,7 +13952,7 @@ function Xh({ styleSheetRuleCb: i, mirror: e, stylesheetManager: t }, { win: s }
13947
13952
  });
13948
13953
  };
13949
13954
  }
13950
- function so({ mirror: i, stylesheetManager: e }, t) {
13955
+ function no({ mirror: i, stylesheetManager: e }, t) {
13951
13956
  var s, n, r;
13952
13957
  let a = null;
13953
13958
  t.nodeName === "#document" ? a = i.getId(t) : a = i.getId(t.host);
@@ -13979,7 +13984,7 @@ function so({ mirror: i, stylesheetManager: e }, t) {
13979
13984
  });
13980
13985
  });
13981
13986
  }
13982
- function qh({ styleDeclarationCb: i, mirror: e, ignoreCSSAttributes: t, stylesheetManager: s }, { win: n }) {
13987
+ function Kh({ styleDeclarationCb: i, mirror: e, ignoreCSSAttributes: t, stylesheetManager: s }, { win: n }) {
13983
13988
  const r = n.CSSStyleDeclaration.prototype.setProperty;
13984
13989
  n.CSSStyleDeclaration.prototype.setProperty = function(o, h, d) {
13985
13990
  var f;
@@ -14015,7 +14020,7 @@ function qh({ styleDeclarationCb: i, mirror: e, ignoreCSSAttributes: t, styleshe
14015
14020
  n.CSSStyleDeclaration.prototype.setProperty = r, n.CSSStyleDeclaration.prototype.removeProperty = a;
14016
14021
  };
14017
14022
  }
14018
- function Kh({ mediaInteractionCb: i, blockClass: e, blockSelector: t, mirror: s, sampling: n }) {
14023
+ function Zh({ mediaInteractionCb: i, blockClass: e, blockSelector: t, mirror: s, sampling: n }) {
14019
14024
  const r = (o) => ri((h) => {
14020
14025
  const d = li(h);
14021
14026
  if (!d || ve(d, e, t, !0))
@@ -14040,7 +14045,7 @@ function Kh({ mediaInteractionCb: i, blockClass: e, blockSelector: t, mirror: s,
14040
14045
  a.forEach((o) => o());
14041
14046
  };
14042
14047
  }
14043
- function Zh({ fontCb: i, doc: e }) {
14048
+ function Jh({ fontCb: i, doc: e }) {
14044
14049
  const t = e.defaultView;
14045
14050
  if (!t)
14046
14051
  return () => {
@@ -14069,7 +14074,7 @@ function Zh({ fontCb: i, doc: e }) {
14069
14074
  s.forEach((o) => o());
14070
14075
  };
14071
14076
  }
14072
- function Jh(i) {
14077
+ function Qh(i) {
14073
14078
  const { doc: e, mirror: t, blockClass: s, blockSelector: n, selectionCb: r } = i;
14074
14079
  let a = !0;
14075
14080
  const o = () => {
@@ -14091,7 +14096,7 @@ function Jh(i) {
14091
14096
  };
14092
14097
  return o(), Ee("selectionchange", o);
14093
14098
  }
14094
- function Qh(i, e) {
14099
+ function ec(i, e) {
14095
14100
  const { mutationCb: t, mousemoveCb: s, mouseInteractionCb: n, scrollCb: r, viewportResizeCb: a, inputCb: o, mediaInteractionCb: h, styleSheetRuleCb: d, styleDeclarationCb: f, canvasMutationCb: u, fontCb: y, selectionCb: g } = i;
14096
14101
  i.mutationCb = (...C) => {
14097
14102
  e.mutation && e.mutation(...C), t(...C);
@@ -14119,16 +14124,16 @@ function Qh(i, e) {
14119
14124
  e.selection && e.selection(...C), g(...C);
14120
14125
  };
14121
14126
  }
14122
- function ec(i, e = {}) {
14127
+ function tc(i, e = {}) {
14123
14128
  const t = i.doc.defaultView;
14124
14129
  if (!t)
14125
14130
  return () => {
14126
14131
  };
14127
- Qh(i, e);
14128
- const s = to(i, i.doc), n = Hh(i), r = $h(i), a = io(i), o = jh(i), h = Yh(i), d = Kh(i), f = Xh(i, { win: t }), u = so(i, i.doc), y = qh(i, {
14132
+ ec(i, e);
14133
+ const s = io(i, i.doc), n = $h(i), r = jh(i), a = so(i), o = zh(i), h = Xh(i), d = Zh(i), f = qh(i, { win: t }), u = no(i, i.doc), y = Kh(i, {
14129
14134
  win: t
14130
- }), g = i.collectFonts ? Zh(i) : () => {
14131
- }, C = Jh(i), _ = [];
14135
+ }), g = i.collectFonts ? Jh(i) : () => {
14136
+ }, C = Qh(i), _ = [];
14132
14137
  for (const E of i.plugins)
14133
14138
  _.push(E.observer(E.callback, t, E.options));
14134
14139
  return () => {
@@ -14175,9 +14180,9 @@ class wn {
14175
14180
  return t || (t = /* @__PURE__ */ new Map(), this.iframeRemoteIdToIdMap.set(e, t)), t;
14176
14181
  }
14177
14182
  }
14178
- class tc {
14183
+ class ic {
14179
14184
  constructor(e) {
14180
- this.iframes = /* @__PURE__ */ new WeakMap(), this.crossOriginIframeMap = /* @__PURE__ */ new WeakMap(), this.crossOriginIframeMirror = new wn(Ur), this.mutationCb = e.mutationCb, this.wrappedEmit = e.wrappedEmit, this.stylesheetManager = e.stylesheetManager, this.recordCrossOriginIframes = e.recordCrossOriginIframes, this.crossOriginIframeStyleMirror = new wn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)), this.mirror = e.mirror, this.recordCrossOriginIframes && window.addEventListener("message", this.handleMessage.bind(this));
14185
+ this.iframes = /* @__PURE__ */ new WeakMap(), this.crossOriginIframeMap = /* @__PURE__ */ new WeakMap(), this.crossOriginIframeMirror = new wn(Wr), this.mutationCb = e.mutationCb, this.wrappedEmit = e.wrappedEmit, this.stylesheetManager = e.stylesheetManager, this.recordCrossOriginIframes = e.recordCrossOriginIframes, this.crossOriginIframeStyleMirror = new wn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)), this.mirror = e.mirror, this.recordCrossOriginIframes && window.addEventListener("message", this.handleMessage.bind(this));
14181
14186
  }
14182
14187
  addIframe(e) {
14183
14188
  this.iframes.set(e, !0), e.contentWindow && this.crossOriginIframeMap.set(e.contentWindow, e);
@@ -14305,7 +14310,7 @@ class tc {
14305
14310
  });
14306
14311
  }
14307
14312
  }
14308
- class ic {
14313
+ class sc {
14309
14314
  constructor(e) {
14310
14315
  this.shadowDoms = /* @__PURE__ */ new WeakSet(), this.restorePatches = [], this.mutationCb = e.mutationCb, this.scrollCb = e.scrollCb, this.bypassOptions = e.bypassOptions, this.mirror = e.mirror;
14311
14316
  const t = this;
@@ -14317,8 +14322,8 @@ class ic {
14317
14322
  }));
14318
14323
  }
14319
14324
  addShadowRoot(e, t) {
14320
- Qt(e) && (this.shadowDoms.has(e) || (this.shadowDoms.add(e), to(Object.assign(Object.assign({}, this.bypassOptions), { doc: t, mutationCb: this.mutationCb, mirror: this.mirror, shadowDomManager: this }), e), io(Object.assign(Object.assign({}, this.bypassOptions), { scrollCb: this.scrollCb, doc: e, mirror: this.mirror })), setTimeout(() => {
14321
- e.adoptedStyleSheets && e.adoptedStyleSheets.length > 0 && this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets, this.mirror.getId(e.host)), so({
14325
+ Qt(e) && (this.shadowDoms.has(e) || (this.shadowDoms.add(e), io(Object.assign(Object.assign({}, this.bypassOptions), { doc: t, mutationCb: this.mutationCb, mirror: this.mirror, shadowDomManager: this }), e), so(Object.assign(Object.assign({}, this.bypassOptions), { scrollCb: this.scrollCb, doc: e, mirror: this.mirror })), setTimeout(() => {
14326
+ e.adoptedStyleSheets && e.adoptedStyleSheets.length > 0 && this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets, this.mirror.getId(e.host)), no({
14322
14327
  mirror: this.mirror,
14323
14328
  stylesheetManager: this.bypassOptions.stylesheetManager
14324
14329
  }, e);
@@ -14353,7 +14358,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14353
14358
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14354
14359
  PERFORMANCE OF THIS SOFTWARE.
14355
14360
  ***************************************************************************** */
14356
- function sc(i, e) {
14361
+ function nc(i, e) {
14357
14362
  var t = {};
14358
14363
  for (var s in i) Object.prototype.hasOwnProperty.call(i, s) && e.indexOf(s) < 0 && (t[s] = i[s]);
14359
14364
  if (i != null && typeof Object.getOwnPropertySymbols == "function")
@@ -14361,7 +14366,7 @@ function sc(i, e) {
14361
14366
  e.indexOf(s[n]) < 0 && Object.prototype.propertyIsEnumerable.call(i, s[n]) && (t[s[n]] = i[s[n]]);
14362
14367
  return t;
14363
14368
  }
14364
- function nc(i, e, t, s) {
14369
+ function rc(i, e, t, s) {
14365
14370
  function n(r) {
14366
14371
  return r instanceof t ? r : new t(function(a) {
14367
14372
  a(r);
@@ -14388,24 +14393,24 @@ function nc(i, e, t, s) {
14388
14393
  d((s = s.apply(i, [])).next());
14389
14394
  });
14390
14395
  }
14391
- var Dt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", rc = typeof Uint8Array > "u" ? [] : new Uint8Array(256);
14396
+ var Dt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", oc = typeof Uint8Array > "u" ? [] : new Uint8Array(256);
14392
14397
  for (var vi = 0; vi < Dt.length; vi++)
14393
- rc[Dt.charCodeAt(vi)] = vi;
14394
- var oc = function(i) {
14398
+ oc[Dt.charCodeAt(vi)] = vi;
14399
+ var ac = function(i) {
14395
14400
  var e = new Uint8Array(i), t, s = e.length, n = "";
14396
14401
  for (t = 0; t < s; t += 3)
14397
14402
  n += Dt[e[t] >> 2], n += Dt[(e[t] & 3) << 4 | e[t + 1] >> 4], n += Dt[(e[t + 1] & 15) << 2 | e[t + 2] >> 6], n += Dt[e[t + 2] & 63];
14398
14403
  return s % 3 === 2 ? n = n.substring(0, n.length - 1) + "=" : s % 3 === 1 && (n = n.substring(0, n.length - 2) + "=="), n;
14399
14404
  };
14400
14405
  const xn = /* @__PURE__ */ new Map();
14401
- function ac(i, e) {
14406
+ function lc(i, e) {
14402
14407
  let t = xn.get(i);
14403
14408
  return t || (t = /* @__PURE__ */ new Map(), xn.set(i, t)), t.has(e) || t.set(e, []), t.get(e);
14404
14409
  }
14405
- const no = (i, e, t) => {
14406
- if (!i || !(oo(i, e) || typeof i == "object"))
14410
+ const ro = (i, e, t) => {
14411
+ if (!i || !(ao(i, e) || typeof i == "object"))
14407
14412
  return;
14408
- const s = i.constructor.name, n = ac(t, s);
14413
+ const s = i.constructor.name, n = lc(t, s);
14409
14414
  let r = n.indexOf(i);
14410
14415
  return r === -1 && (r = n.length, n.push(i)), r;
14411
14416
  };
@@ -14420,7 +14425,7 @@ function wi(i, e, t) {
14420
14425
  args: [Object.values(i)]
14421
14426
  };
14422
14427
  if (i instanceof ArrayBuffer) {
14423
- const s = i.constructor.name, n = oc(i);
14428
+ const s = i.constructor.name, n = ac(i);
14424
14429
  return {
14425
14430
  rr_type: s,
14426
14431
  base64: n
@@ -14453,8 +14458,8 @@ function wi(i, e, t) {
14453
14458
  rr_type: i.constructor.name,
14454
14459
  args: [wi(i.data, e, t), i.width, i.height]
14455
14460
  };
14456
- if (oo(i, e) || typeof i == "object") {
14457
- const s = i.constructor.name, n = no(i, e, t);
14461
+ if (ao(i, e) || typeof i == "object") {
14462
+ const s = i.constructor.name, n = ro(i, e, t);
14458
14463
  return {
14459
14464
  rr_type: s,
14460
14465
  index: n
@@ -14464,7 +14469,7 @@ function wi(i, e, t) {
14464
14469
  }
14465
14470
  return i;
14466
14471
  }
14467
- const ro = (i, e, t) => [...i].map((s) => wi(s, e, t)), oo = (i, e) => !![
14472
+ const oo = (i, e, t) => [...i].map((s) => wi(s, e, t)), ao = (i, e) => !![
14468
14473
  "WebGLActiveInfo",
14469
14474
  "WebGLBuffer",
14470
14475
  "WebGLFramebuffer",
@@ -14477,7 +14482,7 @@ const ro = (i, e, t) => [...i].map((s) => wi(s, e, t)), oo = (i, e) => !![
14477
14482
  "WebGLVertexArrayObject",
14478
14483
  "WebGLVertexArrayObjectOES"
14479
14484
  ].filter((n) => typeof e[n] == "function").find((n) => i instanceof e[n]);
14480
- function lc(i, e, t, s) {
14485
+ function hc(i, e, t, s) {
14481
14486
  const n = [], r = Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);
14482
14487
  for (const a of r)
14483
14488
  try {
@@ -14486,7 +14491,7 @@ function lc(i, e, t, s) {
14486
14491
  const o = Pt(e.CanvasRenderingContext2D.prototype, a, function(h) {
14487
14492
  return function(...d) {
14488
14493
  return ve(this.canvas, t, s, !0) || setTimeout(() => {
14489
- const f = ro([...d], e, this);
14494
+ const f = oo([...d], e, this);
14490
14495
  i(this.canvas, {
14491
14496
  type: Ut["2D"],
14492
14497
  property: a,
@@ -14544,8 +14549,8 @@ function Rn(i, e, t, s, n, r, a) {
14544
14549
  const f = Pt(i, d, function(u) {
14545
14550
  return function(...y) {
14546
14551
  const g = u.apply(this, y);
14547
- if (no(g, a, this), !ve(this.canvas, s, n, !0)) {
14548
- const C = ro([...y], a, this), _ = {
14552
+ if (ro(g, a, this), !ve(this.canvas, s, n, !0)) {
14553
+ const C = oo([...y], a, this), _ = {
14549
14554
  type: e,
14550
14555
  property: d,
14551
14556
  args: C
@@ -14571,52 +14576,52 @@ function Rn(i, e, t, s, n, r, a) {
14571
14576
  }
14572
14577
  return o;
14573
14578
  }
14574
- function hc(i, e, t, s, n) {
14579
+ function cc(i, e, t, s, n) {
14575
14580
  const r = [];
14576
14581
  return r.push(...Rn(e.WebGLRenderingContext.prototype, Ut.WebGL, i, t, s, n, e)), typeof e.WebGL2RenderingContext < "u" && r.push(...Rn(e.WebGL2RenderingContext.prototype, Ut.WebGL2, i, t, s, n, e)), () => {
14577
14582
  r.forEach((a) => a());
14578
14583
  };
14579
14584
  }
14580
- var ao = null;
14585
+ var lo = null;
14581
14586
  try {
14582
- var cc = typeof module < "u" && typeof module.require == "function" && module.require("worker_threads") || typeof __non_webpack_require__ == "function" && __non_webpack_require__("worker_threads") || typeof require == "function" && require("worker_threads");
14583
- ao = cc.Worker;
14587
+ var dc = typeof module < "u" && typeof module.require == "function" && module.require("worker_threads") || typeof __non_webpack_require__ == "function" && __non_webpack_require__("worker_threads") || typeof require == "function" && require("worker_threads");
14588
+ lo = dc.Worker;
14584
14589
  } catch {
14585
14590
  }
14586
- function dc(i, e) {
14591
+ function uc(i, e) {
14587
14592
  return Buffer.from(i, "base64").toString("utf8");
14588
14593
  }
14589
- function uc(i, e, t) {
14590
- var s = dc(i), n = s.indexOf(`
14594
+ function fc(i, e, t) {
14595
+ var s = uc(i), n = s.indexOf(`
14591
14596
  `, 10) + 1, r = s.substring(n) + "";
14592
14597
  return function(o) {
14593
- return new ao(r, Object.assign({}, o, { eval: !0 }));
14598
+ return new lo(r, Object.assign({}, o, { eval: !0 }));
14594
14599
  };
14595
14600
  }
14596
- function fc(i, e) {
14601
+ function pc(i, e) {
14597
14602
  var t = atob(i);
14598
14603
  return t;
14599
14604
  }
14600
- function pc(i, e, t) {
14601
- var s = fc(i), n = s.indexOf(`
14605
+ function mc(i, e, t) {
14606
+ var s = pc(i), n = s.indexOf(`
14602
14607
  `, 10) + 1, r = s.substring(n) + "", a = new Blob([r], { type: "application/javascript" });
14603
14608
  return URL.createObjectURL(a);
14604
14609
  }
14605
- function mc(i, e, t) {
14610
+ function gc(i, e, t) {
14606
14611
  var s;
14607
14612
  return function(r) {
14608
- return s = s || pc(i), new Worker(s, r);
14613
+ return s = s || mc(i), new Worker(s, r);
14609
14614
  };
14610
14615
  }
14611
- var gc = Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]";
14612
- function yc() {
14613
- return gc;
14616
+ var yc = Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]";
14617
+ function Cc() {
14618
+ return yc;
14614
14619
  }
14615
- function Cc(i, e, t) {
14616
- return yc() ? uc(i) : mc(i);
14620
+ function bc(i, e, t) {
14621
+ return Cc() ? fc(i) : gc(i);
14617
14622
  }
14618
- var bc = Cc("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=");
14619
- class _c {
14623
+ var _c = bc("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=");
14624
+ class Ec {
14620
14625
  constructor(e) {
14621
14626
  this.pendingCanvasMutations = /* @__PURE__ */ new Map(), this.rafStamps = { latestId: 0, invokeId: null }, this.frozen = !1, this.locked = !1, this.processMutation = (h, d) => {
14622
14627
  (this.rafStamps.invokeId && this.rafStamps.latestId !== this.rafStamps.invokeId || !this.rafStamps.invokeId) && (this.rafStamps.invokeId = this.rafStamps.latestId), this.pendingCanvasMutations.has(h) || this.pendingCanvasMutations.set(h, []), this.pendingCanvasMutations.get(h).push(d);
@@ -14642,7 +14647,7 @@ class _c {
14642
14647
  this.locked = !1;
14643
14648
  }
14644
14649
  initCanvasFPSObserver(e, t, s, n, r) {
14645
- const a = Tn(t, s, n), o = /* @__PURE__ */ new Map(), h = new bc();
14650
+ const a = Tn(t, s, n), o = /* @__PURE__ */ new Map(), h = new _c();
14646
14651
  h.onmessage = (C) => {
14647
14652
  const { id: _ } = C.data;
14648
14653
  if (o.set(_, !1), !("base64" in C.data))
@@ -14688,7 +14693,7 @@ class _c {
14688
14693
  u = requestAnimationFrame(g);
14689
14694
  return;
14690
14695
  }
14691
- f = C, y().forEach((_) => nc(this, void 0, void 0, function* () {
14696
+ f = C, y().forEach((_) => rc(this, void 0, void 0, function* () {
14692
14697
  var E;
14693
14698
  const A = this.mirror.getId(_);
14694
14699
  if (o.get(A))
@@ -14713,7 +14718,7 @@ class _c {
14713
14718
  }
14714
14719
  initCanvasMutationObserver(e, t, s) {
14715
14720
  this.startRAFTimestamping(), this.startPendingCanvasMutationFlusher();
14716
- const n = Tn(e, t, s), r = lc(this.processMutation.bind(this), e, t, s), a = hc(this.processMutation.bind(this), e, t, s, this.mirror);
14721
+ const n = Tn(e, t, s), r = hc(this.processMutation.bind(this), e, t, s), a = cc(this.processMutation.bind(this), e, t, s, this.mirror);
14717
14722
  this.resetObservers = () => {
14718
14723
  n(), r(), a();
14719
14724
  };
@@ -14739,13 +14744,13 @@ class _c {
14739
14744
  const s = this.pendingCanvasMutations.get(e);
14740
14745
  if (!s || t === -1)
14741
14746
  return;
14742
- const n = s.map((a) => sc(a, ["type"])), { type: r } = s[0];
14747
+ const n = s.map((a) => nc(a, ["type"])), { type: r } = s[0];
14743
14748
  this.mutationCb({ id: t, type: r, commands: n }), this.pendingCanvasMutations.delete(e);
14744
14749
  }
14745
14750
  }
14746
- class Ec {
14751
+ class vc {
14747
14752
  constructor(e) {
14748
- this.trackedLinkElements = /* @__PURE__ */ new WeakSet(), this.styleMirror = new Wh(), this.mutationCb = e.mutationCb, this.adoptedStyleSheetCb = e.adoptedStyleSheetCb;
14753
+ this.trackedLinkElements = /* @__PURE__ */ new WeakSet(), this.styleMirror = new Gh(), this.mutationCb = e.mutationCb, this.adoptedStyleSheetCb = e.adoptedStyleSheetCb;
14749
14754
  }
14750
14755
  attachLinkElement(e, t) {
14751
14756
  "_cssText" in t.attributes && this.mutationCb({
@@ -14780,7 +14785,7 @@ class Ec {
14780
14785
  n.push({
14781
14786
  styleId: a,
14782
14787
  rules: o.map((h, d) => ({
14783
- rule: Fr(h),
14788
+ rule: Pr(h),
14784
14789
  index: d
14785
14790
  }))
14786
14791
  });
@@ -14799,7 +14804,7 @@ function ne(i) {
14799
14804
  return Object.assign(Object.assign({}, i), { timestamp: Date.now() });
14800
14805
  }
14801
14806
  let te, xi, rs, Li = !1;
14802
- const Pe = mh();
14807
+ const Pe = gh();
14803
14808
  function Wt(i = {}) {
14804
14809
  const { emit: e, checkoutEveryNms: t, checkoutEveryNth: s, blockClass: n = "rr-block", blockSelector: r = null, ignoreClass: a = "rr-ignore", maskTextClass: o = "rr-mask", maskTextSelector: h = null, inlineStylesheet: d = !0, maskAllInputs: f, maskInputOptions: u, slimDOMOptions: y, maskInputFn: g, maskTextFn: C, hooks: _, packFn: E, sampling: A = {}, dataURLOptions: I = {}, mousemoveWait: S, recordCanvas: x = !1, recordCrossOriginIframes: T = !1, userTriggeredOnInput: M = !1, collectFonts: F = !1, inlineImages: L = !1, plugins: J, keepIframeSrcFn: X = () => !1, ignoreCSSAttributes: ce = /* @__PURE__ */ new Set([]) } = i, fe = T ? window.parent === window : !0;
14805
14810
  let pe = !1;
@@ -14841,7 +14846,7 @@ function Wt(i = {}) {
14841
14846
  headMetaAuthorship: y === "all",
14842
14847
  headMetaDescKeywords: y === "all"
14843
14848
  } : y || {};
14844
- Uh();
14849
+ Wh();
14845
14850
  let Ae, ke = 0;
14846
14851
  const Be = (O) => {
14847
14852
  for (const ae of J || [])
@@ -14884,10 +14889,10 @@ function Wt(i = {}) {
14884
14889
  })), D = (O) => te(ne({
14885
14890
  type: U.IncrementalSnapshot,
14886
14891
  data: Object.assign({ source: B.AdoptedStyleSheet }, O)
14887
- })), Ie = new Ec({
14892
+ })), Ie = new vc({
14888
14893
  mutationCb: me,
14889
14894
  adoptedStyleSheetCb: D
14890
- }), we = new tc({
14895
+ }), we = new ic({
14891
14896
  mirror: Pe,
14892
14897
  mutationCb: me,
14893
14898
  stylesheetManager: Ie,
@@ -14900,7 +14905,7 @@ function Wt(i = {}) {
14900
14905
  crossOriginIframeMirror: we.crossOriginIframeMirror,
14901
14906
  crossOriginIframeStyleMirror: we.crossOriginIframeStyleMirror
14902
14907
  });
14903
- rs = new _c({
14908
+ rs = new Ec({
14904
14909
  recordCanvas: x,
14905
14910
  mutationCb: W,
14906
14911
  win: window,
@@ -14910,7 +14915,7 @@ function Wt(i = {}) {
14910
14915
  sampling: A.canvas,
14911
14916
  dataURLOptions: I
14912
14917
  });
14913
- const qe = new ic({
14918
+ const qe = new sc({
14914
14919
  mutationCb: me,
14915
14920
  scrollCb: be,
14916
14921
  bypassOptions: {
@@ -14940,11 +14945,11 @@ function Wt(i = {}) {
14940
14945
  type: U.Meta,
14941
14946
  data: {
14942
14947
  href: window.location.href,
14943
- width: Hr(),
14944
- height: Vr()
14948
+ width: $r(),
14949
+ height: Hr()
14945
14950
  }
14946
14951
  }), O), Ie.reset(), bt.forEach((ee) => ee.lock());
14947
- const Me = Fh(document, {
14952
+ const Me = Ph(document, {
14948
14953
  mirror: Pe,
14949
14954
  blockClass: n,
14950
14955
  blockSelector: r,
@@ -14958,7 +14963,7 @@ function Wt(i = {}) {
14958
14963
  recordCanvas: x,
14959
14964
  inlineImages: L,
14960
14965
  onSerialize: (ee) => {
14961
- zr(ee, Pe) && we.addIframe(ee), Yr(ee, Pe) && Ie.trackLinkElement(ee), Xr(ee) && qe.addShadowRoot(ee.shadowRoot, document);
14966
+ Yr(ee, Pe) && we.addIframe(ee), Xr(ee, Pe) && Ie.trackLinkElement(ee), qr(ee) && qe.addShadowRoot(ee.shadowRoot, document);
14962
14967
  },
14963
14968
  onIframeLoad: (ee, Vt) => {
14964
14969
  we.attachIframe(ee, Vt), qe.observeAttachShadow(ee);
@@ -14991,7 +14996,7 @@ function Wt(i = {}) {
14991
14996
  }));
14992
14997
  const ae = ($) => {
14993
14998
  var ge;
14994
- return ec({
14999
+ return tc({
14995
15000
  mutationCb: me,
14996
15001
  mousemoveCb: (P, de) => te(ne({
14997
15002
  type: U.IncrementalSnapshot,
@@ -15111,23 +15116,23 @@ Wt.takeFullSnapshot = (i) => {
15111
15116
  xi(i);
15112
15117
  };
15113
15118
  Wt.mirror = Pe;
15114
- const vc = 3e4, Sc = 3, Ic = 0;
15115
- function Ac(i) {
15116
- if (i.type !== Sc) return !1;
15119
+ const Sc = 3e4, Ic = 3, Ac = 0;
15120
+ function wc(i) {
15121
+ if (i.type !== Ic) return !1;
15117
15122
  const e = i.data;
15118
- if (!e || e.source !== Ic) return !1;
15123
+ if (!e || e.source !== Ac) return !1;
15119
15124
  const { adds: t, removes: s, texts: n, attributes: r } = e;
15120
15125
  return t && t.length || s && s.length || n && n.length ? !1 : r && r.length > 0 ? r.every(
15121
15126
  (a) => a.attributes && Object.keys(a.attributes).length === 1 && "style" in a.attributes
15122
15127
  ) : !0;
15123
15128
  }
15124
- function wc() {
15129
+ function xc() {
15125
15130
  for (const i of [Text, Comment, CDATASection, ProcessingInstruction])
15126
15131
  i.prototype.matches || (i.prototype.matches = function() {
15127
15132
  return !1;
15128
15133
  });
15129
15134
  }
15130
- class lo {
15135
+ class ho {
15131
15136
  constructor() {
15132
15137
  this.onEvent = null, this.stopFn = null, this._recording = !1, this._paused = !1;
15133
15138
  }
@@ -15140,13 +15145,13 @@ class lo {
15140
15145
  /** Start recording the host page. */
15141
15146
  start() {
15142
15147
  if (this._recording) return;
15143
- wc();
15148
+ xc();
15144
15149
  const e = Wt({
15145
15150
  emit: (t) => {
15146
15151
  var s;
15147
- this._paused || Ac(t) || (s = this.onEvent) == null || s.call(this, t);
15152
+ this._paused || wc(t) || (s = this.onEvent) == null || s.call(this, t);
15148
15153
  },
15149
- checkoutEveryNms: vc,
15154
+ checkoutEveryNms: Sc,
15150
15155
  // Block video elements (massive mutation noise), widget, and sensitive fields
15151
15156
  blockClass: "hs-no-record",
15152
15157
  blockSelector: '#holostaff-widget-root, #holostaff-agent, [id^="anam-avatar"], video, [autocomplete^="cc-"], [data-hs-no-record]',
@@ -15181,13 +15186,13 @@ class lo {
15181
15186
  !this._recording || !this._paused || (this._paused = !1, Wt.takeFullSnapshot(), console.log("[RRWebRecorder] Resumed (full snapshot taken)"));
15182
15187
  }
15183
15188
  }
15184
- function xc(i) {
15189
+ function Tc(i) {
15185
15190
  return i.startsWith("ws://") || i.startsWith("wss://") ? i : `${location.protocol === "https:" ? "wss:" : "ws:"}//${location.host}${i.startsWith("/") ? "" : "/"}${i}`;
15186
15191
  }
15187
- const On = 1e3, Tc = 3e4, Rc = 500;
15188
- class ho {
15192
+ const On = 1e3, Rc = 3e4, Oc = 500;
15193
+ class co {
15189
15194
  constructor(e, t) {
15190
- this.onIntervention = null, this.onStatus = null, this.onConnected = null, this.onDisconnected = null, this.ws = null, this.eventBuffer = [], this.reconnectDelay = On, this.reconnectTimer = null, this._connected = !1, this._closed = !1, this.url = xc(e), this.initPayload = { type: "init", ...t };
15195
+ this.onIntervention = null, this.onStatus = null, this.onConnected = null, this.onDisconnected = null, this.ws = null, this.eventBuffer = [], this.reconnectDelay = On, this.reconnectTimer = null, this._connected = !1, this._closed = !1, this.url = Tc(e), this.initPayload = { type: "init", ...t };
15191
15196
  }
15192
15197
  get isConnected() {
15193
15198
  return this._connected;
@@ -15282,7 +15287,7 @@ class ho {
15282
15287
  // -----------------------------------------------------------------------
15283
15288
  send(e) {
15284
15289
  var t;
15285
- this._connected && ((t = this.ws) == null ? void 0 : t.readyState) === WebSocket.OPEN ? this.ws.send(JSON.stringify(e)) : (this.eventBuffer.length >= Rc && this.eventBuffer.shift(), this.eventBuffer.push(e));
15290
+ this._connected && ((t = this.ws) == null ? void 0 : t.readyState) === WebSocket.OPEN ? this.ws.send(JSON.stringify(e)) : (this.eventBuffer.length >= Oc && this.eventBuffer.shift(), this.eventBuffer.push(e));
15286
15291
  }
15287
15292
  flushBuffer() {
15288
15293
  if (!(!this._connected || !this.ws)) {
@@ -15297,7 +15302,7 @@ class ho {
15297
15302
  scheduleReconnect() {
15298
15303
  if (this._closed || this.reconnectTimer) return;
15299
15304
  const e = this.reconnectDelay;
15300
- this.reconnectDelay = Math.min(this.reconnectDelay * 2, Tc), console.log(`[VisionWS] Reconnecting in ${e}ms...`), this.reconnectTimer = setTimeout(() => {
15305
+ this.reconnectDelay = Math.min(this.reconnectDelay * 2, Rc), console.log(`[VisionWS] Reconnecting in ${e}ms...`), this.reconnectTimer = setTimeout(() => {
15301
15306
  this.reconnectTimer = null, this.doConnect();
15302
15307
  }, e);
15303
15308
  }
@@ -15305,12 +15310,12 @@ class ho {
15305
15310
  this.reconnectTimer && (clearTimeout(this.reconnectTimer), this.reconnectTimer = null);
15306
15311
  }
15307
15312
  }
15308
- const Oc = {
15313
+ const kc = {
15309
15314
  sm: "var(--hs-radius-sm)",
15310
15315
  md: "var(--hs-radius-md)",
15311
15316
  lg: "var(--hs-radius-lg)",
15312
15317
  pill: "var(--hs-radius-pill)"
15313
- }, kc = {
15318
+ }, Mc = {
15314
15319
  base: "var(--hs-glass-bg)",
15315
15320
  elevated: "var(--hs-glass-bg-elevated)",
15316
15321
  solid: "var(--hs-glass-bg-solid)"
@@ -15325,11 +15330,11 @@ function pt(i = {}) {
15325
15330
  role: a
15326
15331
  } = i, o = document.createElement(e);
15327
15332
  return r && (o.className = r), a && o.setAttribute("role", a), Object.assign(o.style, {
15328
- background: kc[s],
15333
+ background: Mc[s],
15329
15334
  backdropFilter: "blur(var(--hs-glass-blur)) saturate(var(--hs-glass-saturate))",
15330
15335
  WebkitBackdropFilter: "blur(var(--hs-glass-blur)) saturate(var(--hs-glass-saturate))",
15331
15336
  border: "1px solid var(--hs-glass-border)",
15332
- borderRadius: Oc[t],
15337
+ borderRadius: kc[t],
15333
15338
  boxShadow: s === "elevated" ? "var(--hs-glass-shadow-elevated)" : "var(--hs-glass-shadow)",
15334
15339
  color: "var(--hs-text-primary)",
15335
15340
  fontFamily: "var(--hs-font)",
@@ -15428,7 +15433,7 @@ function Ye(i) {
15428
15433
  d.stopPropagation(), r(d);
15429
15434
  }), a;
15430
15435
  }
15431
- function co(i, e) {
15436
+ function uo(i, e) {
15432
15437
  var t = {};
15433
15438
  for (var s in i) Object.prototype.hasOwnProperty.call(i, s) && e.indexOf(s) < 0 && (t[s] = i[s]);
15434
15439
  if (i != null && typeof Object.getOwnPropertySymbols == "function")
@@ -15438,10 +15443,10 @@ function co(i, e) {
15438
15443
  }
15439
15444
  var kn = function() {
15440
15445
  };
15441
- const vs = (i, e, t) => Math.min(Math.max(t, i), e), os = 1e-3, Mc = 0.01, Nc = 10, Lc = 0.05, Dc = 1;
15442
- function Bc({ duration: i = 800, bounce: e = 0.25, velocity: t = 0, mass: s = 1 }) {
15446
+ const vs = (i, e, t) => Math.min(Math.max(t, i), e), os = 1e-3, Nc = 0.01, Lc = 10, Dc = 0.05, Bc = 1;
15447
+ function Fc({ duration: i = 800, bounce: e = 0.25, velocity: t = 0, mass: s = 1 }) {
15443
15448
  let n, r, a = 1 - e;
15444
- a = vs(Lc, Dc, a), i = vs(Mc, Nc, i / 1e3), a < 1 ? (n = (d) => {
15449
+ a = vs(Dc, Bc, a), i = vs(Nc, Lc, i / 1e3), a < 1 ? (n = (d) => {
15445
15450
  const f = d * a, u = f * i, y = f - t, g = Ss(d, a), C = Math.exp(-u);
15446
15451
  return os - y / g * C;
15447
15452
  }, r = (d) => {
@@ -15454,7 +15459,7 @@ function Bc({ duration: i = 800, bounce: e = 0.25, velocity: t = 0, mass: s = 1
15454
15459
  const f = Math.exp(-d * i), u = (t - d) * (i * i);
15455
15460
  return f * u;
15456
15461
  });
15457
- const o = 5 / i, h = Pc(n, r, o);
15462
+ const o = 5 / i, h = Uc(n, r, o);
15458
15463
  if (i = i * 1e3, isNaN(h))
15459
15464
  return {
15460
15465
  stiffness: 100,
@@ -15470,32 +15475,32 @@ function Bc({ duration: i = 800, bounce: e = 0.25, velocity: t = 0, mass: s = 1
15470
15475
  };
15471
15476
  }
15472
15477
  }
15473
- const Fc = 12;
15474
- function Pc(i, e, t) {
15478
+ const Pc = 12;
15479
+ function Uc(i, e, t) {
15475
15480
  let s = t;
15476
- for (let n = 1; n < Fc; n++)
15481
+ for (let n = 1; n < Pc; n++)
15477
15482
  s = s - i(s) / e(s);
15478
15483
  return s;
15479
15484
  }
15480
15485
  function Ss(i, e) {
15481
15486
  return i * Math.sqrt(1 - e * e);
15482
15487
  }
15483
- const Uc = ["duration", "bounce"], Wc = ["stiffness", "damping", "mass"];
15488
+ const Wc = ["duration", "bounce"], Gc = ["stiffness", "damping", "mass"];
15484
15489
  function Mn(i, e) {
15485
15490
  return e.some((t) => i[t] !== void 0);
15486
15491
  }
15487
- function Gc(i) {
15492
+ function Vc(i) {
15488
15493
  let e = Object.assign({ velocity: 0, stiffness: 100, damping: 10, mass: 1, isResolvedFromDuration: !1 }, i);
15489
- if (!Mn(i, Wc) && Mn(i, Uc)) {
15490
- const t = Bc(i);
15494
+ if (!Mn(i, Gc) && Mn(i, Wc)) {
15495
+ const t = Fc(i);
15491
15496
  e = Object.assign(Object.assign(Object.assign({}, e), t), { velocity: 0, mass: 1 }), e.isResolvedFromDuration = !0;
15492
15497
  }
15493
15498
  return e;
15494
15499
  }
15495
15500
  function Ds(i) {
15496
- var { from: e = 0, to: t = 1, restSpeed: s = 2, restDelta: n } = i, r = co(i, ["from", "to", "restSpeed", "restDelta"]);
15501
+ var { from: e = 0, to: t = 1, restSpeed: s = 2, restDelta: n } = i, r = uo(i, ["from", "to", "restSpeed", "restDelta"]);
15497
15502
  const a = { done: !1, value: e };
15498
- let { stiffness: o, damping: h, mass: d, velocity: f, duration: u, isResolvedFromDuration: y } = Gc(r), g = Nn, C = Nn;
15503
+ let { stiffness: o, damping: h, mass: d, velocity: f, duration: u, isResolvedFromDuration: y } = Vc(r), g = Nn, C = Nn;
15499
15504
  function _() {
15500
15505
  const E = f ? -(f / 1e3) : 0, A = t - e, I = h / (2 * Math.sqrt(o * d)), S = Math.sqrt(o / d) / 1e3;
15501
15506
  if (n === void 0 && (n = Math.min(Math.abs(t - e) / 100, 0.4)), I < 1) {
@@ -15534,10 +15539,10 @@ function Ds(i) {
15534
15539
  };
15535
15540
  }
15536
15541
  Ds.needsInterpolation = (i, e) => typeof i == "string" || typeof e == "string";
15537
- const Nn = (i) => 0, uo = (i, e, t) => {
15542
+ const Nn = (i) => 0, fo = (i, e, t) => {
15538
15543
  const s = e - i;
15539
15544
  return s === 0 ? 1 : (t - i) / s;
15540
- }, Bs = (i, e, t) => -t * i + t * e + i, fo = (i, e) => (t) => Math.max(Math.min(t, e), i), ei = (i) => i % 1 ? Number(i.toFixed(5)) : i, Di = /(-)?([\d]*\.?[\d])+/g, Is = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi, Vc = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;
15545
+ }, Bs = (i, e, t) => -t * i + t * e + i, po = (i, e) => (t) => Math.max(Math.min(t, e), i), ei = (i) => i % 1 ? Number(i.toFixed(5)) : i, Di = /(-)?([\d]*\.?[\d])+/g, Is = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi, Hc = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;
15541
15546
  function hi(i) {
15542
15547
  return typeof i == "string";
15543
15548
  }
@@ -15545,15 +15550,15 @@ const Pi = {
15545
15550
  test: (i) => typeof i == "number",
15546
15551
  parse: parseFloat,
15547
15552
  transform: (i) => i
15548
- }, po = Object.assign(Object.assign({}, Pi), { transform: fo(0, 1) });
15553
+ }, mo = Object.assign(Object.assign({}, Pi), { transform: po(0, 1) });
15549
15554
  Object.assign(Object.assign({}, Pi), { default: 1 });
15550
- const Hc = (i) => ({
15555
+ const $c = (i) => ({
15551
15556
  test: (e) => hi(e) && e.endsWith(i) && e.split(" ").length === 1,
15552
15557
  parse: parseFloat,
15553
15558
  transform: (e) => `${e}${i}`
15554
- }), ti = Hc("%");
15559
+ }), ti = $c("%");
15555
15560
  Object.assign(Object.assign({}, ti), { parse: (i) => ti.parse(i) / 100, transform: (i) => ti.transform(i * 100) });
15556
- const Fs = (i, e) => (t) => !!(hi(t) && Vc.test(t) && t.startsWith(i) || e && Object.prototype.hasOwnProperty.call(t, e)), mo = (i, e, t) => (s) => {
15561
+ const Fs = (i, e) => (t) => !!(hi(t) && Hc.test(t) && t.startsWith(i) || e && Object.prototype.hasOwnProperty.call(t, e)), go = (i, e, t) => (s) => {
15557
15562
  if (!hi(s))
15558
15563
  return s;
15559
15564
  const [n, r, a, o] = s.match(Di);
@@ -15565,14 +15570,14 @@ const Fs = (i, e) => (t) => !!(hi(t) && Vc.test(t) && t.startsWith(i) || e && Ob
15565
15570
  };
15566
15571
  }, _t = {
15567
15572
  test: Fs("hsl", "hue"),
15568
- parse: mo("hue", "saturation", "lightness"),
15569
- transform: ({ hue: i, saturation: e, lightness: t, alpha: s = 1 }) => "hsla(" + Math.round(i) + ", " + ti.transform(ei(e)) + ", " + ti.transform(ei(t)) + ", " + ei(po.transform(s)) + ")"
15570
- }, $c = fo(0, 255), as = Object.assign(Object.assign({}, Pi), { transform: (i) => Math.round($c(i)) }), ht = {
15573
+ parse: go("hue", "saturation", "lightness"),
15574
+ transform: ({ hue: i, saturation: e, lightness: t, alpha: s = 1 }) => "hsla(" + Math.round(i) + ", " + ti.transform(ei(e)) + ", " + ti.transform(ei(t)) + ", " + ei(mo.transform(s)) + ")"
15575
+ }, jc = po(0, 255), as = Object.assign(Object.assign({}, Pi), { transform: (i) => Math.round(jc(i)) }), ht = {
15571
15576
  test: Fs("rgb", "red"),
15572
- parse: mo("red", "green", "blue"),
15573
- transform: ({ red: i, green: e, blue: t, alpha: s = 1 }) => "rgba(" + as.transform(i) + ", " + as.transform(e) + ", " + as.transform(t) + ", " + ei(po.transform(s)) + ")"
15577
+ parse: go("red", "green", "blue"),
15578
+ transform: ({ red: i, green: e, blue: t, alpha: s = 1 }) => "rgba(" + as.transform(i) + ", " + as.transform(e) + ", " + as.transform(t) + ", " + ei(mo.transform(s)) + ")"
15574
15579
  };
15575
- function jc(i) {
15580
+ function zc(i) {
15576
15581
  let e = "", t = "", s = "", n = "";
15577
15582
  return i.length > 5 ? (e = i.substr(1, 2), t = i.substr(3, 2), s = i.substr(5, 2), n = i.substr(7, 2)) : (e = i.substr(1, 1), t = i.substr(2, 1), s = i.substr(3, 1), n = i.substr(4, 1), e += e, t += t, s += s, n += n), {
15578
15583
  red: parseInt(e, 16),
@@ -15583,44 +15588,44 @@ function jc(i) {
15583
15588
  }
15584
15589
  const As = {
15585
15590
  test: Fs("#"),
15586
- parse: jc,
15591
+ parse: zc,
15587
15592
  transform: ht.transform
15588
15593
  }, Ui = {
15589
15594
  test: (i) => ht.test(i) || As.test(i) || _t.test(i),
15590
15595
  parse: (i) => ht.test(i) ? ht.parse(i) : _t.test(i) ? _t.parse(i) : As.parse(i),
15591
15596
  transform: (i) => hi(i) ? i : i.hasOwnProperty("red") ? ht.transform(i) : _t.transform(i)
15592
- }, go = "${c}", yo = "${n}";
15593
- function zc(i) {
15597
+ }, yo = "${c}", Co = "${n}";
15598
+ function Yc(i) {
15594
15599
  var e, t, s, n;
15595
15600
  return isNaN(i) && hi(i) && ((t = (e = i.match(Di)) === null || e === void 0 ? void 0 : e.length) !== null && t !== void 0 ? t : 0) + ((n = (s = i.match(Is)) === null || s === void 0 ? void 0 : s.length) !== null && n !== void 0 ? n : 0) > 0;
15596
15601
  }
15597
- function Co(i) {
15602
+ function bo(i) {
15598
15603
  typeof i == "number" && (i = `${i}`);
15599
15604
  const e = [];
15600
15605
  let t = 0;
15601
15606
  const s = i.match(Is);
15602
- s && (t = s.length, i = i.replace(Is, go), e.push(...s.map(Ui.parse)));
15607
+ s && (t = s.length, i = i.replace(Is, yo), e.push(...s.map(Ui.parse)));
15603
15608
  const n = i.match(Di);
15604
- return n && (i = i.replace(Di, yo), e.push(...n.map(Pi.parse))), { values: e, numColors: t, tokenised: i };
15605
- }
15606
- function bo(i) {
15607
- return Co(i).values;
15609
+ return n && (i = i.replace(Di, Co), e.push(...n.map(Pi.parse))), { values: e, numColors: t, tokenised: i };
15608
15610
  }
15609
15611
  function _o(i) {
15610
- const { values: e, numColors: t, tokenised: s } = Co(i), n = e.length;
15612
+ return bo(i).values;
15613
+ }
15614
+ function Eo(i) {
15615
+ const { values: e, numColors: t, tokenised: s } = bo(i), n = e.length;
15611
15616
  return (r) => {
15612
15617
  let a = s;
15613
15618
  for (let o = 0; o < n; o++)
15614
- a = a.replace(o < t ? go : yo, o < t ? Ui.transform(r[o]) : ei(r[o]));
15619
+ a = a.replace(o < t ? yo : Co, o < t ? Ui.transform(r[o]) : ei(r[o]));
15615
15620
  return a;
15616
15621
  };
15617
15622
  }
15618
- const Yc = (i) => typeof i == "number" ? 0 : i;
15619
- function Xc(i) {
15620
- const e = bo(i);
15621
- return _o(i)(e.map(Yc));
15623
+ const Xc = (i) => typeof i == "number" ? 0 : i;
15624
+ function qc(i) {
15625
+ const e = _o(i);
15626
+ return Eo(i)(e.map(Xc));
15622
15627
  }
15623
- const Eo = { test: zc, parse: bo, createTransformer: _o, getAnimatableNone: Xc };
15628
+ const vo = { test: Yc, parse: _o, createTransformer: Eo, getAnimatableNone: qc };
15624
15629
  function ls(i, e, t) {
15625
15630
  return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? i + (e - i) * 6 * t : t < 1 / 2 ? e : t < 2 / 3 ? i + (e - i) * (2 / 3 - t) * 6 : i;
15626
15631
  }
@@ -15640,33 +15645,33 @@ function Ln({ hue: i, saturation: e, lightness: t, alpha: s }) {
15640
15645
  alpha: s
15641
15646
  };
15642
15647
  }
15643
- const qc = (i, e, t) => {
15648
+ const Kc = (i, e, t) => {
15644
15649
  const s = i * i, n = e * e;
15645
15650
  return Math.sqrt(Math.max(0, t * (n - s) + s));
15646
- }, Kc = [As, ht, _t], Dn = (i) => Kc.find((e) => e.test(i)), vo = (i, e) => {
15651
+ }, Zc = [As, ht, _t], Dn = (i) => Zc.find((e) => e.test(i)), So = (i, e) => {
15647
15652
  let t = Dn(i), s = Dn(e), n = t.parse(i), r = s.parse(e);
15648
15653
  t === _t && (n = Ln(n), t = ht), s === _t && (r = Ln(r), s = ht);
15649
15654
  const a = Object.assign({}, n);
15650
15655
  return (o) => {
15651
15656
  for (const h in a)
15652
- h !== "alpha" && (a[h] = qc(n[h], r[h], o));
15657
+ h !== "alpha" && (a[h] = Kc(n[h], r[h], o));
15653
15658
  return a.alpha = Bs(n.alpha, r.alpha, o), t.transform(a);
15654
15659
  };
15655
- }, Zc = (i) => typeof i == "number", Jc = (i, e) => (t) => e(i(t)), So = (...i) => i.reduce(Jc);
15656
- function Io(i, e) {
15657
- return Zc(i) ? (t) => Bs(i, e, t) : Ui.test(i) ? vo(i, e) : wo(i, e);
15660
+ }, Jc = (i) => typeof i == "number", Qc = (i, e) => (t) => e(i(t)), Io = (...i) => i.reduce(Qc);
15661
+ function Ao(i, e) {
15662
+ return Jc(i) ? (t) => Bs(i, e, t) : Ui.test(i) ? So(i, e) : xo(i, e);
15658
15663
  }
15659
- const Ao = (i, e) => {
15660
- const t = [...i], s = t.length, n = i.map((r, a) => Io(r, e[a]));
15664
+ const wo = (i, e) => {
15665
+ const t = [...i], s = t.length, n = i.map((r, a) => Ao(r, e[a]));
15661
15666
  return (r) => {
15662
15667
  for (let a = 0; a < s; a++)
15663
15668
  t[a] = n[a](r);
15664
15669
  return t;
15665
15670
  };
15666
- }, Qc = (i, e) => {
15671
+ }, ed = (i, e) => {
15667
15672
  const t = Object.assign(Object.assign({}, i), e), s = {};
15668
15673
  for (const n in t)
15669
- i[n] !== void 0 && e[n] !== void 0 && (s[n] = Io(i[n], e[n]));
15674
+ i[n] !== void 0 && e[n] !== void 0 && (s[n] = Ao(i[n], e[n]));
15670
15675
  return (n) => {
15671
15676
  for (const r in s)
15672
15677
  t[r] = s[r](n);
@@ -15674,42 +15679,42 @@ const Ao = (i, e) => {
15674
15679
  };
15675
15680
  };
15676
15681
  function Bn(i) {
15677
- const e = Eo.parse(i), t = e.length;
15682
+ const e = vo.parse(i), t = e.length;
15678
15683
  let s = 0, n = 0, r = 0;
15679
15684
  for (let a = 0; a < t; a++)
15680
15685
  s || typeof e[a] == "number" ? s++ : e[a].hue !== void 0 ? r++ : n++;
15681
15686
  return { parsed: e, numNumbers: s, numRGB: n, numHSL: r };
15682
15687
  }
15683
- const wo = (i, e) => {
15684
- const t = Eo.createTransformer(e), s = Bn(i), n = Bn(e);
15685
- return s.numHSL === n.numHSL && s.numRGB === n.numRGB && s.numNumbers >= n.numNumbers ? So(Ao(s.parsed, n.parsed), t) : (a) => `${a > 0 ? e : i}`;
15686
- }, ed = (i, e) => (t) => Bs(i, e, t);
15687
- function td(i) {
15688
+ const xo = (i, e) => {
15689
+ const t = vo.createTransformer(e), s = Bn(i), n = Bn(e);
15690
+ return s.numHSL === n.numHSL && s.numRGB === n.numRGB && s.numNumbers >= n.numNumbers ? Io(wo(s.parsed, n.parsed), t) : (a) => `${a > 0 ? e : i}`;
15691
+ }, td = (i, e) => (t) => Bs(i, e, t);
15692
+ function id(i) {
15688
15693
  if (typeof i == "number")
15689
- return ed;
15694
+ return td;
15690
15695
  if (typeof i == "string")
15691
- return Ui.test(i) ? vo : wo;
15696
+ return Ui.test(i) ? So : xo;
15692
15697
  if (Array.isArray(i))
15693
- return Ao;
15698
+ return wo;
15694
15699
  if (typeof i == "object")
15695
- return Qc;
15700
+ return ed;
15696
15701
  }
15697
- function id(i, e, t) {
15698
- const s = [], n = t || td(i[0]), r = i.length - 1;
15702
+ function sd(i, e, t) {
15703
+ const s = [], n = t || id(i[0]), r = i.length - 1;
15699
15704
  for (let a = 0; a < r; a++) {
15700
15705
  let o = n(i[a], i[a + 1]);
15701
15706
  if (e) {
15702
15707
  const h = Array.isArray(e) ? e[a] : e;
15703
- o = So(h, o);
15708
+ o = Io(h, o);
15704
15709
  }
15705
15710
  s.push(o);
15706
15711
  }
15707
15712
  return s;
15708
15713
  }
15709
- function sd([i, e], [t]) {
15710
- return (s) => t(uo(i, e, s));
15714
+ function nd([i, e], [t]) {
15715
+ return (s) => t(fo(i, e, s));
15711
15716
  }
15712
- function nd(i, e) {
15717
+ function rd(i, e) {
15713
15718
  const t = i.length, s = t - 1;
15714
15719
  return (n) => {
15715
15720
  let r = 0, a = !1;
@@ -15719,32 +15724,32 @@ function nd(i, e) {
15719
15724
  ;
15720
15725
  r = h - 1;
15721
15726
  }
15722
- const o = uo(i[r], i[r + 1], n);
15727
+ const o = fo(i[r], i[r + 1], n);
15723
15728
  return e[r](o);
15724
15729
  };
15725
15730
  }
15726
- function xo(i, e, { clamp: t = !0, ease: s, mixer: n } = {}) {
15731
+ function To(i, e, { clamp: t = !0, ease: s, mixer: n } = {}) {
15727
15732
  const r = i.length;
15728
15733
  kn(r === e.length), kn(!s || !Array.isArray(s) || s.length === r - 1), i[0] > i[r - 1] && (i = [].concat(i), e = [].concat(e), i.reverse(), e.reverse());
15729
- const a = id(e, s, n), o = r === 2 ? sd(i, a) : nd(i, a);
15734
+ const a = sd(e, s, n), o = r === 2 ? nd(i, a) : rd(i, a);
15730
15735
  return t ? (h) => o(vs(i[0], i[r - 1], h)) : o;
15731
15736
  }
15732
- const rd = (i) => (e) => e <= 0.5 ? i(2 * e) / 2 : (2 - i(2 * (1 - e))) / 2, od = (i) => (e) => Math.pow(e, i), ad = od(2), ld = rd(ad);
15733
- function hd(i, e) {
15734
- return i.map(() => e || ld).splice(0, i.length - 1);
15737
+ const od = (i) => (e) => e <= 0.5 ? i(2 * e) / 2 : (2 - i(2 * (1 - e))) / 2, ad = (i) => (e) => Math.pow(e, i), ld = ad(2), hd = od(ld);
15738
+ function cd(i, e) {
15739
+ return i.map(() => e || hd).splice(0, i.length - 1);
15735
15740
  }
15736
- function cd(i) {
15741
+ function dd(i) {
15737
15742
  const e = i.length;
15738
15743
  return i.map((t, s) => s !== 0 ? s / (e - 1) : 0);
15739
15744
  }
15740
- function dd(i, e) {
15745
+ function ud(i, e) {
15741
15746
  return i.map((t) => t * e);
15742
15747
  }
15743
15748
  function Ti({ from: i = 0, to: e = 1, ease: t, offset: s, duration: n = 300 }) {
15744
- const r = { done: !1, value: i }, a = Array.isArray(e) ? e : [i, e], o = dd(s && s.length === a.length ? s : cd(a), n);
15749
+ const r = { done: !1, value: i }, a = Array.isArray(e) ? e : [i, e], o = ud(s && s.length === a.length ? s : dd(a), n);
15745
15750
  function h() {
15746
- return xo(o, a, {
15747
- ease: Array.isArray(t) ? t : hd(a, t)
15751
+ return To(o, a, {
15752
+ ease: Array.isArray(t) ? t : cd(a, t)
15748
15753
  });
15749
15754
  }
15750
15755
  let d = h();
@@ -15755,7 +15760,7 @@ function Ti({ from: i = 0, to: e = 1, ease: t, offset: s, duration: n = 300 }) {
15755
15760
  }
15756
15761
  };
15757
15762
  }
15758
- function ud({ velocity: i = 0, from: e = 0, power: t = 0.8, timeConstant: s = 350, restDelta: n = 0.5, modifyTarget: r }) {
15763
+ function fd({ velocity: i = 0, from: e = 0, power: t = 0.8, timeConstant: s = 350, restDelta: n = 0.5, modifyTarget: r }) {
15759
15764
  const a = { done: !1, value: e };
15760
15765
  let o = t * i;
15761
15766
  const h = e + o, d = r === void 0 ? h : r(h);
@@ -15768,8 +15773,8 @@ function ud({ velocity: i = 0, from: e = 0, power: t = 0.8, timeConstant: s = 35
15768
15773
  }
15769
15774
  };
15770
15775
  }
15771
- const Fn = { keyframes: Ti, spring: Ds, decay: ud };
15772
- function fd(i) {
15776
+ const Fn = { keyframes: Ti, spring: Ds, decay: fd };
15777
+ function pd(i) {
15773
15778
  if (Array.isArray(i.to))
15774
15779
  return Ti;
15775
15780
  if (Fn[i.type])
@@ -15777,8 +15782,8 @@ function fd(i) {
15777
15782
  const e = new Set(Object.keys(i));
15778
15783
  return e.has("ease") || e.has("duration") && !e.has("dampingRatio") ? Ti : e.has("dampingRatio") || e.has("stiffness") || e.has("mass") || e.has("damping") || e.has("restSpeed") || e.has("restDelta") ? Ds : Ti;
15779
15784
  }
15780
- const To = 1 / 60 * 1e3, pd = typeof performance < "u" ? () => performance.now() : () => Date.now(), Ro = typeof window < "u" ? (i) => window.requestAnimationFrame(i) : (i) => setTimeout(() => i(pd()), To);
15781
- function md(i) {
15785
+ const Ro = 1 / 60 * 1e3, md = typeof performance < "u" ? () => performance.now() : () => Date.now(), Oo = typeof window < "u" ? (i) => window.requestAnimationFrame(i) : (i) => setTimeout(() => i(md()), Ro);
15786
+ function gd(i) {
15782
15787
  let e = [], t = [], s = 0, n = !1, r = !1;
15783
15788
  const a = /* @__PURE__ */ new WeakSet(), o = {
15784
15789
  schedule: (h, d = !1, f = !1) => {
@@ -15804,7 +15809,7 @@ function md(i) {
15804
15809
  };
15805
15810
  return o;
15806
15811
  }
15807
- const gd = 40;
15812
+ const yd = 40;
15808
15813
  let ws = !0, oi = !1, xs = !1;
15809
15814
  const ii = {
15810
15815
  delta: 0,
@@ -15815,42 +15820,42 @@ const ii = {
15815
15820
  "preRender",
15816
15821
  "render",
15817
15822
  "postRender"
15818
- ], Wi = ci.reduce((i, e) => (i[e] = md(() => oi = !0), i), {}), yd = ci.reduce((i, e) => {
15823
+ ], Wi = ci.reduce((i, e) => (i[e] = gd(() => oi = !0), i), {}), Cd = ci.reduce((i, e) => {
15819
15824
  const t = Wi[e];
15820
- return i[e] = (s, n = !1, r = !1) => (oi || _d(), t.schedule(s, n, r)), i;
15821
- }, {}), Cd = ci.reduce((i, e) => (i[e] = Wi[e].cancel, i), {});
15825
+ return i[e] = (s, n = !1, r = !1) => (oi || Ed(), t.schedule(s, n, r)), i;
15826
+ }, {}), bd = ci.reduce((i, e) => (i[e] = Wi[e].cancel, i), {});
15822
15827
  ci.reduce((i, e) => (i[e] = () => Wi[e].process(ii), i), {});
15823
- const bd = (i) => Wi[i].process(ii), Oo = (i) => {
15824
- oi = !1, ii.delta = ws ? To : Math.max(Math.min(i - ii.timestamp, gd), 1), ii.timestamp = i, xs = !0, ci.forEach(bd), xs = !1, oi && (ws = !1, Ro(Oo));
15825
- }, _d = () => {
15826
- oi = !0, ws = !0, xs || Ro(Oo);
15828
+ const _d = (i) => Wi[i].process(ii), ko = (i) => {
15829
+ oi = !1, ii.delta = ws ? Ro : Math.max(Math.min(i - ii.timestamp, yd), 1), ii.timestamp = i, xs = !0, ci.forEach(_d), xs = !1, oi && (ws = !1, Oo(ko));
15830
+ }, Ed = () => {
15831
+ oi = !0, ws = !0, xs || Oo(ko);
15827
15832
  };
15828
- function ko(i, e, t = 0) {
15833
+ function Mo(i, e, t = 0) {
15829
15834
  return i - e - t;
15830
15835
  }
15831
- function Ed(i, e, t = 0, s = !0) {
15832
- return s ? ko(e + -i, e, t) : e - (i - e) + t;
15836
+ function vd(i, e, t = 0, s = !0) {
15837
+ return s ? Mo(e + -i, e, t) : e - (i - e) + t;
15833
15838
  }
15834
- function vd(i, e, t, s) {
15839
+ function Sd(i, e, t, s) {
15835
15840
  return s ? i >= e + t : i <= -t;
15836
15841
  }
15837
- const Sd = (i) => {
15842
+ const Id = (i) => {
15838
15843
  const e = ({ delta: t }) => i(t);
15839
15844
  return {
15840
- start: () => yd.update(e, !0),
15841
- stop: () => Cd.update(e)
15845
+ start: () => Cd.update(e, !0),
15846
+ stop: () => bd.update(e)
15842
15847
  };
15843
15848
  };
15844
- function Id(i) {
15845
- var e, t, { from: s, autoplay: n = !0, driver: r = Sd, elapsed: a = 0, repeat: o = 0, repeatType: h = "loop", repeatDelay: d = 0, onPlay: f, onStop: u, onComplete: y, onRepeat: g, onUpdate: C } = i, _ = co(i, ["from", "autoplay", "driver", "elapsed", "repeat", "repeatType", "repeatDelay", "onPlay", "onStop", "onComplete", "onRepeat", "onUpdate"]);
15849
+ function Ad(i) {
15850
+ var e, t, { from: s, autoplay: n = !0, driver: r = Id, elapsed: a = 0, repeat: o = 0, repeatType: h = "loop", repeatDelay: d = 0, onPlay: f, onStop: u, onComplete: y, onRepeat: g, onUpdate: C } = i, _ = uo(i, ["from", "autoplay", "driver", "elapsed", "repeat", "repeatType", "repeatDelay", "onPlay", "onStop", "onComplete", "onRepeat", "onUpdate"]);
15846
15851
  let { to: E } = _, A, I = 0, S = _.duration, x, T = !1, M = !0, F;
15847
- const L = fd(_);
15848
- !((t = (e = L).needsInterpolation) === null || t === void 0) && t.call(e, s, E) && (F = xo([0, 100], [s, E], {
15852
+ const L = pd(_);
15853
+ !((t = (e = L).needsInterpolation) === null || t === void 0) && t.call(e, s, E) && (F = To([0, 100], [s, E], {
15849
15854
  clamp: !1
15850
15855
  }), s = 0, E = 100);
15851
15856
  const J = L(Object.assign(Object.assign({}, _), { from: s, to: E }));
15852
15857
  function X() {
15853
- I++, h === "reverse" ? (M = I % 2 === 0, a = Ed(a, S, d, M)) : (a = ko(a, S, d), h === "mirror" && J.flipTarget()), T = !1, g && g();
15858
+ I++, h === "reverse" ? (M = I % 2 === 0, a = vd(a, S, d, M)) : (a = Mo(a, S, d), h === "mirror" && J.flipTarget()), T = !1, g && g();
15854
15859
  }
15855
15860
  function ce() {
15856
15861
  A.stop(), y && y();
@@ -15860,7 +15865,7 @@ function Id(i) {
15860
15865
  const se = J.next(Math.max(0, a));
15861
15866
  x = se.value, F && (x = F(x)), T = M ? se.done : a <= 0;
15862
15867
  }
15863
- C == null || C(x), T && (I === 0 && (S ?? (S = a)), I < o ? vd(a, S, d, M) && X() : ce());
15868
+ C == null || C(x), T && (I === 0 && (S ?? (S = a)), I < o ? Sd(a, S, d, M) && X() : ce());
15864
15869
  }
15865
15870
  function pe() {
15866
15871
  f == null || f(), A = r(fe), A.start();
@@ -15871,7 +15876,7 @@ function Id(i) {
15871
15876
  }
15872
15877
  };
15873
15878
  }
15874
- const Ad = {
15879
+ const wd = {
15875
15880
  /** Snappy entrance (cards, bubbles) */
15876
15881
  snappy: { stiffness: 300, damping: 28, mass: 0.8 },
15877
15882
  /** Gentle settle (avatar slide-in) */
@@ -15882,7 +15887,7 @@ const Ad = {
15882
15887
  smooth: { stiffness: 200, damping: 30, mass: 1 }
15883
15888
  };
15884
15889
  function ut(i) {
15885
- const e = i.preset ? Ad[i.preset] : void 0, t = Id({
15890
+ const e = i.preset ? wd[i.preset] : void 0, t = Ad({
15886
15891
  from: i.from,
15887
15892
  to: i.to,
15888
15893
  type: "spring",
@@ -15894,7 +15899,7 @@ function ut(i) {
15894
15899
  });
15895
15900
  return { stop: () => t.stop() };
15896
15901
  }
15897
- function wd(i, e, t, s = "smooth", n) {
15902
+ function xd(i, e, t, s = "smooth", n) {
15898
15903
  return ut({
15899
15904
  from: e,
15900
15905
  to: t,
@@ -16134,8 +16139,8 @@ function Xe() {
16134
16139
  }
16135
16140
  `, document.head.appendChild(i);
16136
16141
  }
16137
- const xd = 15e3;
16138
- class Td {
16142
+ const Td = 15e3;
16143
+ class Rd {
16139
16144
  constructor(e) {
16140
16145
  this.currentIntervention = null, this.autoDismissTimer = null, this._active = !1, this.cardOverlay = null, this.cardOverlayAnim = null, this.onAccept = null, this.wsClient = e.wsClient, this.getWidgetState = e.getWidgetState, this.getHomeVisible = e.getHomeVisible, this.inlineTarget = e.inlineTarget ?? null, this.pill = e.pill ?? null, this.wsClient.onIntervention = (t) => this.handleIntervention(t);
16141
16146
  }
@@ -16157,7 +16162,7 @@ class Td {
16157
16162
  if (this._active) return;
16158
16163
  console.log(`[ActionExecutor] Showing suggestion: "${e.message}"`), this.currentIntervention = e, this._active = !0;
16159
16164
  const s = this.getHomeVisible();
16160
- this.inlineTarget && s ? this.showCardOverlay(e.message) : this.pill && this.showInPill(e.message), this.autoDismissTimer = setTimeout(() => this.handleIgnore(), xd);
16165
+ this.inlineTarget && s ? this.showCardOverlay(e.message) : this.pill && this.showInPill(e.message), this.autoDismissTimer = setTimeout(() => this.handleIgnore(), Td);
16161
16166
  }
16162
16167
  // -----------------------------------------------------------------------
16163
16168
  // Display mode A: Card overlay (inline home is visible)
@@ -16248,42 +16253,42 @@ Continue the conversation naturally from this context.`, s = e.actionId;
16248
16253
  this._active = !1, this.autoDismissTimer && (clearTimeout(this.autoDismissTimer), this.autoDismissTimer = null), this.hideCardOverlay(), this.clearPillSuggestion(), this.currentIntervention = null;
16249
16254
  }
16250
16255
  }
16251
- function Rd(i) {
16256
+ function Od(i) {
16252
16257
  try {
16253
16258
  const e = i.left + i.width / 2, t = i.top + i.height / 2, s = document.elementFromPoint(e, t);
16254
16259
  if (!s) return "dark";
16255
- const n = Od(s);
16256
- return Md(n) > 0.5 ? "light" : "dark";
16260
+ const n = kd(s);
16261
+ return Nd(n) > 0.5 ? "light" : "dark";
16257
16262
  } catch {
16258
16263
  return "dark";
16259
16264
  }
16260
16265
  }
16261
- function Od(i) {
16266
+ function kd(i) {
16262
16267
  let e = i;
16263
16268
  for (; e; ) {
16264
16269
  const s = getComputedStyle(e).backgroundColor;
16265
16270
  if (s && s !== "transparent" && s !== "rgba(0, 0, 0, 0)")
16266
- return kd(s);
16271
+ return Md(s);
16267
16272
  e = e.parentElement;
16268
16273
  }
16269
16274
  return [255, 255, 255];
16270
16275
  }
16271
- function kd(i) {
16276
+ function Md(i) {
16272
16277
  const e = i.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);
16273
16278
  return e ? [parseInt(e[1]), parseInt(e[2]), parseInt(e[3])] : [255, 255, 255];
16274
16279
  }
16275
- function Md([i, e, t]) {
16280
+ function Nd([i, e, t]) {
16276
16281
  const [s, n, r] = [i / 255, e / 255, t / 255].map(
16277
16282
  (a) => a <= 0.03928 ? a / 12.92 : Math.pow((a + 0.055) / 1.055, 2.4)
16278
16283
  );
16279
16284
  return 0.2126 * s + 0.7152 * n + 0.0722 * r;
16280
16285
  }
16281
- function Nd(i, e) {
16286
+ function Ld(i, e) {
16282
16287
  i.setAttribute("data-hs-theme", e);
16283
16288
  }
16284
16289
  function Gt(i, e) {
16285
- const t = i.getBoundingClientRect(), s = Rd(t);
16286
- return Nd(i, s), s;
16290
+ const t = i.getBoundingClientRect(), s = Od(t);
16291
+ return Ld(i, s), s;
16287
16292
  }
16288
16293
  const Un = {
16289
16294
  idle: "var(--hs-text-tertiary)",
@@ -16293,14 +16298,14 @@ const Un = {
16293
16298
  // amber
16294
16299
  speaking: "var(--hs-accent)",
16295
16300
  connecting: "var(--hs-text-tertiary)"
16296
- }, Ld = {
16301
+ }, Dd = {
16297
16302
  idle: "",
16298
16303
  listening: "Listening",
16299
16304
  thinking: "Thinking",
16300
16305
  speaking: "Speaking",
16301
16306
  connecting: "Connecting"
16302
16307
  };
16303
- class Dd {
16308
+ class Bd {
16304
16309
  constructor() {
16305
16310
  this.pulseAnim = null, this.currentStatus = "idle", this.theme = "dark", Xe(), this.el = pt({
16306
16311
  radius: "lg",
@@ -16361,7 +16366,7 @@ class Dd {
16361
16366
  setStatus(e) {
16362
16367
  if (e === this.currentStatus) return;
16363
16368
  this.currentStatus = e;
16364
- const t = Un[e], s = Ld[e];
16369
+ const t = Un[e], s = Dd[e];
16365
16370
  this.statusDot.style.background = t, this.statusDot.style.boxShadow = e !== "idle" ? `0 0 6px ${t}` : "none", this.statusLabel.textContent = s, this.statusBar.style.opacity = e === "idle" ? "0" : "1", e === "speaking" || e === "listening" ? (this.glowRing.style.borderColor = t, this.glowRing.style.boxShadow = `0 0 16px ${t}40, inset 0 0 16px ${t}10`, this.startPulse(t)) : (this.glowRing.style.borderColor = "transparent", this.glowRing.style.boxShadow = "none", this.stopPulse());
16366
16371
  }
16367
16372
  /** Detect and apply the correct glass theme based on background. */
@@ -16402,8 +16407,8 @@ class Dd {
16402
16407
  this.stopPulse(), this.el.remove();
16403
16408
  }
16404
16409
  }
16405
- const Si = 30, Bd = 3e3, Fd = 500;
16406
- class Pd {
16410
+ const Si = 30, Fd = 3e3, Pd = 500;
16411
+ class Ud {
16407
16412
  constructor(e) {
16408
16413
  this.prompts = [], this.promptIndex = 0, this.typeTimer = null, this.holdTimer = null, this.cycling = !1, this.currentAnim = null, this.onClick = null, this.onAccept = null, this.onDismiss = null, Xe(), this.prompts = e ?? [
16409
16414
  "Need help finding something?",
@@ -16467,7 +16472,7 @@ class Pd {
16467
16472
  this.promptIndex++, this.actionsEl.style.display = "none", this.typewrite(e, () => {
16468
16473
  this.holdTimer = setTimeout(() => {
16469
16474
  this.fadeOutAndNext();
16470
- }, Bd);
16475
+ }, Fd);
16471
16476
  });
16472
16477
  }
16473
16478
  fadeOutAndNext() {
@@ -16477,7 +16482,7 @@ class Pd {
16477
16482
  onComplete: () => {
16478
16483
  this.el.style.display = "none", setTimeout(() => {
16479
16484
  this.cycling && this.showNextPrompt();
16480
- }, Fd);
16485
+ }, Pd);
16481
16486
  }
16482
16487
  });
16483
16488
  }
@@ -16556,7 +16561,7 @@ class Pd {
16556
16561
  (e = this.currentAnim) == null || e.stop(), this.clearTimers(), this.el.remove();
16557
16562
  }
16558
16563
  }
16559
- const Ud = `
16564
+ const Wd = `
16560
16565
  @keyframes hs-pill-pulse {
16561
16566
  0%, 100% { box-shadow: 0 0 0 0 var(--hs-accent-glow); }
16562
16567
  50% { box-shadow: 0 0 14px 5px var(--hs-accent-glow); }
@@ -16805,11 +16810,11 @@ class Wn {
16805
16810
  if (this.pulseStyleInjected) return;
16806
16811
  this.pulseStyleInjected = !0;
16807
16812
  const e = document.createElement("style");
16808
- e.textContent = Ud, document.head.appendChild(e);
16813
+ e.textContent = Wd, document.head.appendChild(e);
16809
16814
  }
16810
16815
  }
16811
- const Wd = 15e3, Gd = 320;
16812
- class Vd {
16816
+ const Gd = 15e3, Vd = 320;
16817
+ class Hd {
16813
16818
  constructor() {
16814
16819
  this.cards = [], this.anchor = null;
16815
16820
  }
@@ -16884,7 +16889,7 @@ class Vd {
16884
16889
  });
16885
16890
  Object.assign(e.style, {
16886
16891
  position: "fixed",
16887
- maxWidth: `${Math.min(Gd, window.innerWidth - 32)}px`,
16892
+ maxWidth: `${Math.min(Vd, window.innerWidth - 32)}px`,
16888
16893
  padding: "var(--hs-space-4)",
16889
16894
  zIndex: R.zOverlay,
16890
16895
  opacity: "0",
@@ -16904,7 +16909,7 @@ class Vd {
16904
16909
  padding: "2px 6px",
16905
16910
  fontSize: "var(--hs-text-xs)"
16906
16911
  }), e.appendChild(t);
16907
- const s = setTimeout(() => this.dismiss(n), Wd), n = { el: e, timer: s, anim: null };
16912
+ const s = setTimeout(() => this.dismiss(n), Gd), n = { el: e, timer: s, anim: null };
16908
16913
  return n;
16909
16914
  }
16910
16915
  mountCard(e) {
@@ -16927,7 +16932,7 @@ class Vd {
16927
16932
  clearTimeout(e.timer), (t = e.anim) == null || t.stop(), e.anim = tt(e.el, { remove: !0, preset: "smooth" });
16928
16933
  }
16929
16934
  }
16930
- class Hd {
16935
+ class $d {
16931
16936
  constructor() {
16932
16937
  this.el = null, this.currentAnim = null, this.minimized = !1, this.onMinimize = null, this.onRestore = null, this.onClose = null;
16933
16938
  }
@@ -16994,8 +16999,8 @@ class Hd {
16994
16999
  this.el = null, this.minimized = !1, this.currentAnim = tt(e, { remove: !0, preset: "smooth" });
16995
17000
  }
16996
17001
  }
16997
- const $d = 1e4;
16998
- class jd {
17002
+ const jd = 1e4;
17003
+ class zd {
16999
17004
  constructor() {
17000
17005
  this.el = null, this.currentAnim = null, this.autoTimer = null, this.resolver = null;
17001
17006
  }
@@ -17036,7 +17041,7 @@ class jd {
17036
17041
  variant: "default",
17037
17042
  size: "md",
17038
17043
  onClick: () => this.resolve(!1)
17039
- })), this.el.appendChild(n), document.body.appendChild(this.el), this.currentAnim = Re(this.el, { preset: "snappy" }), this.autoTimer = setTimeout(() => this.resolve(!1), $d);
17044
+ })), this.el.appendChild(n), document.body.appendChild(this.el), this.currentAnim = Re(this.el, { preset: "snappy" }), this.autoTimer = setTimeout(() => this.resolve(!1), jd);
17040
17045
  });
17041
17046
  }
17042
17047
  /** Dismiss any active prompt (resolves as declined). */
@@ -17055,8 +17060,8 @@ class jd {
17055
17060
  }
17056
17061
  }
17057
17062
  }
17058
- const zd = 520, Yd = 340, hs = 12;
17059
- class Xd {
17063
+ const Yd = 520, Xd = 340, hs = 12;
17064
+ class qd {
17060
17065
  constructor() {
17061
17066
  this.currentAnim = null, Xe(), this.el = pt({
17062
17067
  radius: "lg",
@@ -17068,8 +17073,8 @@ class Xd {
17068
17073
  left: "0",
17069
17074
  right: "0",
17070
17075
  margin: "0 auto",
17071
- width: `${zd}px`,
17072
- height: `${Yd}px`,
17076
+ width: `${Yd}px`,
17077
+ height: `${Xd}px`,
17073
17078
  zIndex: R.zOverlay,
17074
17079
  overflow: "hidden",
17075
17080
  display: "flex",
@@ -17120,14 +17125,14 @@ class Xd {
17120
17125
  (e = this.currentAnim) == null || e.stop(), this.el.remove();
17121
17126
  }
17122
17127
  }
17123
- const qd = `
17128
+ const Kd = `
17124
17129
  @keyframes hs-highlight-glow {
17125
17130
  0%, 100% { box-shadow: 0 0 8px var(--hs-accent-glow), inset 0 0 4px var(--hs-accent-glow); }
17126
17131
  50% { box-shadow: 0 0 20px var(--hs-accent-glow), inset 0 0 8px var(--hs-accent-glow); }
17127
17132
  }
17128
17133
  `;
17129
17134
  let Gn = !1;
17130
- class Kd {
17135
+ class Zd {
17131
17136
  constructor() {
17132
17137
  this.highlights = [];
17133
17138
  }
@@ -17163,7 +17168,7 @@ class Kd {
17163
17168
  this.highlights.forEach((e) => this.removeHighlight(e)), this.highlights = [];
17164
17169
  }
17165
17170
  removeHighlight(e) {
17166
- clearTimeout(e.timer), window.removeEventListener("scroll", e.scrollHandler), e.anim = wd(e.overlay, 1, 0, "smooth", () => {
17171
+ clearTimeout(e.timer), window.removeEventListener("scroll", e.scrollHandler), e.anim = xd(e.overlay, 1, 0, "smooth", () => {
17167
17172
  e.overlay.remove();
17168
17173
  });
17169
17174
  const t = this.highlights.indexOf(e);
@@ -17173,10 +17178,10 @@ class Kd {
17173
17178
  if (Gn) return;
17174
17179
  Gn = !0;
17175
17180
  const e = document.createElement("style");
17176
- e.textContent = qd, document.head.appendChild(e);
17181
+ e.textContent = Kd, document.head.appendChild(e);
17177
17182
  }
17178
17183
  }
17179
- const Zd = 800, Jd = 600 * 1e3, Qd = 540 * 1e3, Vn = 60 * 1e3, eu = 90 * 1e3, tu = [
17184
+ const Jd = 800, Qd = 600 * 1e3, eu = 540 * 1e3, Vn = 60 * 1e3, tu = 90 * 1e3, iu = [
17180
17185
  {
17181
17186
  type: "function",
17182
17187
  name: "page_action",
@@ -17238,7 +17243,7 @@ const Zd = 800, Jd = 600 * 1e3, Qd = 540 * 1e3, Vn = 60 * 1e3, eu = 90 * 1e3, tu
17238
17243
  parameters: { type: "object", properties: {}, required: [] }
17239
17244
  }
17240
17245
  ];
17241
- class iu {
17246
+ class su {
17242
17247
  // skip observer hide for one cycle after conversation ends
17243
17248
  constructor(e, t) {
17244
17249
  this.stage = null, this.avatar = null, this.state = "idle", this.avatarState = "idle", this.scrollHandler = null, this.idleVideoUrl = null, this.idleImageUrl = null, this.bubbleTimer = null, this.realtimeSession = null, this.audioForwarder = null, this.anamSession = null, this.sessionResponse = null, this.domAnalyzer = null, this.toolHandler = null, this.maxDurationTimer = null, this.maxDurationWarnTimer = null, this.inactivityTimer = null, this.inactivityCloseTimer = null, this.sessionStartTime = 0, this.logger = null, this.rrwebRecorder = null, this.visionWs = null, this.externalObserver = !1, this.actionExecutor = null, this.visionContext = null, this.staffDisplayName = "Assistant", this.staffAvatarUrl = null, this.hasHadConversation = !1, this.avatarFrame = null, this.bubble = null, this.chatPill = null, this.overlayRenderer = null, this.controls = null, this.confirmationPrompt = null, this.highlightRenderer = null, this.stageBackdrop = null, this.stageEl = null, this.homePlaceholder = null, this.homeObserver = null, this.homeVisible = !0, this.homeEverSeen = !1, this.pillProtected = !1, this.paused = !1, this.config = e, this.widgetPrompts = t ?? null, this.visitorId = this.getOrCreateVisitorId();
@@ -17252,7 +17257,7 @@ class iu {
17252
17257
  return this.config.container;
17253
17258
  }
17254
17259
  async init() {
17255
- Xe(), this.stage = new cl(), await this.stage.init(this.config.mode, this.config.container), this.avatar = new ul(this.stage.stageWidth, this.stage.stageHeight), this.stage.app.stage.addChild(this.avatar.container), await this.loadIdleAsset(), this.avatarFrame = new Dd(), this.stage.rootElement && Gt(this.stage.rootElement), this.bubble = new Pd(this.widgetPrompts ?? void 0), this.bubble.onClick = () => this.onAvatarClick(), this.stage.rootElement && (this.stage.rootElement.style.position = "relative", this.stage.rootElement.appendChild(this.bubble.el)), this.avatar.setInteractive(() => this.onAvatarClick()), this.isInline && (this.chatPill = new Wn(), this.chatPill.init(this.staffAvatarUrl, this.idleVideoUrl, this.staffDisplayName), this.chatPill.onClick = () => this.onAvatarClick(), setTimeout(() => {
17260
+ Xe(), this.stage = new dl(), await this.stage.init(this.config.mode, this.config.container), this.avatar = new fl(this.stage.stageWidth, this.stage.stageHeight), this.stage.app.stage.addChild(this.avatar.container), await this.loadIdleAsset(), this.avatarFrame = new Bd(), this.stage.rootElement && Gt(this.stage.rootElement), this.bubble = new Ud(this.widgetPrompts ?? void 0), this.bubble.onClick = () => this.onAvatarClick(), this.stage.rootElement && (this.stage.rootElement.style.position = "relative", this.stage.rootElement.appendChild(this.bubble.el)), this.avatar.setInteractive(() => this.onAvatarClick()), this.isInline && (this.chatPill = new Wn(), this.chatPill.init(this.staffAvatarUrl, this.idleVideoUrl, this.staffDisplayName), this.chatPill.onClick = () => this.onAvatarClick(), setTimeout(() => {
17256
17261
  var t;
17257
17262
  (this.state === "idle" || this.state === "teasing") && !this.homeVisible && ((t = this.chatPill) == null ? void 0 : t.state) === "hidden" && this.chatPill.showNamed();
17258
17263
  }, 5e3), this.startHomeObserver()), this.setupTrigger(), this.startVisionLoop(), window.addEventListener("beforeunload", () => {
@@ -17387,7 +17392,7 @@ class iu {
17387
17392
  this.state !== "idle" || !this.avatar || !this.stage || (this.state = "teasing", this.avatar.slideIn(this.stage.app.ticker), this.bubbleTimer = setTimeout(() => {
17388
17393
  var e;
17389
17394
  return (e = this.bubble) == null ? void 0 : e.start();
17390
- }, Zd));
17395
+ }, Jd));
17391
17396
  }
17392
17397
  hideTeaser() {
17393
17398
  var e;
@@ -17410,10 +17415,10 @@ class iu {
17410
17415
  }
17411
17416
  console.log("[HolostaffWidget] Starting conversation...");
17412
17417
  try {
17413
- this.sessionResponse = await Vo(
17418
+ this.sessionResponse = await Ho(
17414
17419
  this.config.staffId,
17415
17420
  this.config.backendUrl
17416
- ), console.log("[HolostaffWidget] Session tokens received"), this.logger = new dh({
17421
+ ), console.log("[HolostaffWidget] Session tokens received"), this.logger = new uh({
17417
17422
  staffId: this.config.staffId,
17418
17423
  staffName: this.sessionResponse.staff.name,
17419
17424
  backendUrl: this.config.backendUrl
@@ -17445,7 +17450,7 @@ class iu {
17445
17450
  textAlign: "center",
17446
17451
  padding: "var(--hs-space-4)",
17447
17452
  boxSizing: "border-box"
17448
- }), this.homePlaceholder.innerHTML = "Agent is active below&nbsp;&darr;", this.stage.inlineTarget.appendChild(this.homePlaceholder), this.stageBackdrop = new Xd(), this.stageEl = this.stageBackdrop.el, this.stageBackdrop.show(), console.log("[HolostaffWidget] Moved to glass stage (bottom-center)");
17453
+ }), this.homePlaceholder.innerHTML = "Agent is active below&nbsp;&darr;", this.stage.inlineTarget.appendChild(this.homePlaceholder), this.stageBackdrop = new qd(), this.stageEl = this.stageBackdrop.el, this.stageBackdrop.show(), console.log("[HolostaffWidget] Moved to glass stage (bottom-center)");
17449
17454
  }
17450
17455
  /** Return the avatar from the stage back to the inline home container. */
17451
17456
  returnToHome() {
@@ -17489,7 +17494,7 @@ class iu {
17489
17494
  // Anam connection (avatar rendering, BYO audio mode)
17490
17495
  // -----------------------------------------------------------------------
17491
17496
  async connectAnam() {
17492
- this.sessionResponse && (this.anamSession = new eh({
17497
+ this.sessionResponse && (this.anamSession = new th({
17493
17498
  sessionToken: this.sessionResponse.anamSessionToken,
17494
17499
  inlineMode: this.isInline && !!this.stageBackdrop
17495
17500
  }), this.anamSession.onConnected = () => {
@@ -17531,13 +17536,13 @@ All actions except form filling require the visitor to confirm before executing.
17531
17536
  this.visionContext && (r += `
17532
17537
 
17533
17538
  ## Context from observing the user's session
17534
- ` + this.visionContext, this.visionContext = null), this.realtimeSession = new gl({
17539
+ ` + this.visionContext, this.visionContext = null), this.realtimeSession = new yl({
17535
17540
  ephemeralKey: this.sessionResponse.realtimeEphemeralKey,
17536
17541
  webrtcUrl: this.sessionResponse.realtimeWebrtcUrl,
17537
17542
  voice: this.sessionResponse.staff.voiceId,
17538
17543
  instructions: r,
17539
- tools: tu
17540
- }), this.domAnalyzer = new rh(), this.highlightRenderer = new Kd(), this.confirmationPrompt = new jd(), this.realtimeSession.onConnected = () => {
17544
+ tools: iu
17545
+ }), this.domAnalyzer = new oh(), this.highlightRenderer = new Zd(), this.confirmationPrompt = new zd(), this.realtimeSession.onConnected = () => {
17541
17546
  var h, d, f, u;
17542
17547
  console.log("[HolostaffWidget] Realtime API connected");
17543
17548
  const o = (h = this.sessionResponse) == null ? void 0 : h.staff.openingText;
@@ -17559,15 +17564,15 @@ All actions except form filling require the visitor to confirm before executing.
17559
17564
  }, this.realtimeSession.onDisconnected = () => {
17560
17565
  console.log("[HolostaffWidget] Realtime API disconnected"), (this.state === "active" || this.state === "connecting") && this.endConversation();
17561
17566
  }, this.realtimeSession.onRemoteTrack = async (o) => {
17562
- console.log("[HolostaffWidget] Remote audio track → starting audio forwarder"), this.audioForwarder = new El(), this.audioForwarder.onAudioChunk = (h) => {
17567
+ console.log("[HolostaffWidget] Remote audio track → starting audio forwarder"), this.audioForwarder = new vl(), this.audioForwarder.onAudioChunk = (h) => {
17563
17568
  var d;
17564
17569
  (d = this.anamSession) == null || d.sendAudioChunk(h);
17565
17570
  }, await this.audioForwarder.start(o);
17566
- }, this.overlayRenderer = new Vd(), this.toolHandler = new ah({
17571
+ }, this.overlayRenderer = new Hd(), this.toolHandler = new lh({
17567
17572
  realtimeSession: this.realtimeSession,
17568
17573
  domAnalyzer: this.domAnalyzer,
17569
- pageActions: new lh(this.domAnalyzer, this.highlightRenderer),
17570
- overlayActions: new hh(this.overlayRenderer),
17574
+ pageActions: new hh(this.domAnalyzer, this.highlightRenderer),
17575
+ overlayActions: new ch(this.overlayRenderer),
17571
17576
  confirmationPrompt: this.confirmationPrompt,
17572
17577
  staffId: this.config.staffId,
17573
17578
  backendUrl: this.config.backendUrl
@@ -17646,7 +17651,7 @@ All actions except form filling require the visitor to confirm before executing.
17646
17651
  // Controls — minimize, restore, close (Issue 11)
17647
17652
  // -----------------------------------------------------------------------
17648
17653
  showControls() {
17649
- this.controls = new Hd(), this.controls.onMinimize = () => {
17654
+ this.controls = new $d(), this.controls.onMinimize = () => {
17650
17655
  var e;
17651
17656
  this.state = "minimized", this.avatar && this.stage && this.avatar.slideOut(this.stage.app.ticker), (e = this.overlayRenderer) == null || e.dismissAll(), console.log("[HolostaffWidget] Minimized");
17652
17657
  }, this.controls.onRestore = () => {
@@ -17669,9 +17674,9 @@ All actions except form filling require the visitor to confirm before executing.
17669
17674
  content: [{ type: "input_text", text: "The session will end in about one minute. Please wrap up the conversation gracefully." }]
17670
17675
  }
17671
17676
  }), (t = this.realtimeSession) == null || t.sendJSON({ type: "response.create" });
17672
- }, Qd), this.maxDurationTimer = setTimeout(() => {
17677
+ }, eu), this.maxDurationTimer = setTimeout(() => {
17673
17678
  console.log("[HolostaffWidget] Max session duration reached"), this.endConversation();
17674
- }, Jd), this.resetInactivityTimer();
17679
+ }, Qd), this.resetInactivityTimer();
17675
17680
  }
17676
17681
  /** Reset the inactivity timer (called whenever there's activity). */
17677
17682
  resetInactivityTimer() {
@@ -17686,7 +17691,7 @@ All actions except form filling require the visitor to confirm before executing.
17686
17691
  }
17687
17692
  }), (t = this.realtimeSession) == null || t.sendJSON({ type: "response.create" }), this.inactivityCloseTimer = setTimeout(() => {
17688
17693
  this.state === "active" && (console.log("[HolostaffWidget] Inactivity — auto-closing"), this.endConversation());
17689
- }, eu - Vn));
17694
+ }, tu - Vn));
17690
17695
  }, Vn);
17691
17696
  }
17692
17697
  clearSessionTimers() {
@@ -17717,7 +17722,7 @@ All actions except form filling require the visitor to confirm before executing.
17717
17722
  return;
17718
17723
  }
17719
17724
  const e = this.config.visionWsUrl;
17720
- e && (this.rrwebRecorder = new lo(), this.visionWs = new ho(e, {
17725
+ e && (this.rrwebRecorder = new ho(), this.visionWs = new co(e, {
17721
17726
  staffId: this.config.staffId,
17722
17727
  visitorId: this.visitorId,
17723
17728
  pageUrl: location.href,
@@ -17730,7 +17735,7 @@ All actions except form filling require the visitor to confirm before executing.
17730
17735
  /** Wire the action executor to handle suggest_intervention from the vision WS. */
17731
17736
  attachActionExecutor() {
17732
17737
  var e;
17733
- this.visionWs && (this.actionExecutor = new Td({
17738
+ this.visionWs && (this.actionExecutor = new Rd({
17734
17739
  wsClient: this.visionWs,
17735
17740
  getWidgetState: () => this.state,
17736
17741
  getHomeVisible: () => this.homeVisible,
@@ -17782,10 +17787,10 @@ All actions except form filling require the visitor to confirm before executing.
17782
17787
  this.state = "destroyed", this.endConversation(), this.hideChatPill(), this.stopHomeObserver(), this.stopVisionLoop(), this.scrollHandler && window.removeEventListener("scroll", this.scrollHandler), this.bubbleTimer && clearTimeout(this.bubbleTimer), (e = this.bubble) == null || e.destroy(), (t = this.avatar) == null || t.destroy(), (s = this.stage) == null || s.destroy(), this.bubble = null, this.avatar = null, this.stage = null;
17783
17788
  }
17784
17789
  }
17785
- function su(i) {
17790
+ function nu(i) {
17786
17791
  return !i || i.length === 0 ? [{ pattern: "*" }] : i.map((e) => typeof e == "string" ? { pattern: e } : e);
17787
17792
  }
17788
- function nu(i, e) {
17793
+ function ru(i, e) {
17789
17794
  if (e === "*") return !0;
17790
17795
  if (!e.endsWith("/*")) {
17791
17796
  const r = i.replace(/\/+$/, "") || "/", a = e.replace(/\/+$/, "") || "/";
@@ -17796,10 +17801,10 @@ function nu(i, e) {
17796
17801
  }
17797
17802
  function Hn(i, e) {
17798
17803
  for (const t of e)
17799
- if (nu(i, t.pattern)) return t;
17804
+ if (ru(i, t.pattern)) return t;
17800
17805
  return null;
17801
17806
  }
17802
- class ru {
17807
+ class ou {
17803
17808
  constructor(e) {
17804
17809
  this.currentPath = location.pathname, this.onChange = e, this.origPushState = history.pushState.bind(history), this.origReplaceState = history.replaceState.bind(history), history.pushState = (...t) => {
17805
17810
  this.origPushState(...t), this.check();
@@ -17815,14 +17820,14 @@ class ru {
17815
17820
  history.pushState = this.origPushState, history.replaceState = this.origReplaceState;
17816
17821
  }
17817
17822
  }
17818
- function ou() {
17823
+ function au() {
17819
17824
  var s;
17820
17825
  const i = "hs_visitor_id", e = (s = document.cookie.split("; ").find((n) => n.startsWith(`${i}=`))) == null ? void 0 : s.split("=")[1];
17821
17826
  if (e) return e;
17822
17827
  const t = `v_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 6)}`;
17823
17828
  return document.cookie = `${i}=${t}; max-age=${365 * 24 * 60 * 60}; path=/; SameSite=Lax`, t;
17824
17829
  }
17825
- function au() {
17830
+ function lu() {
17826
17831
  const i = document.currentScript ?? document.querySelector("script[data-staff-id]");
17827
17832
  if (!i) {
17828
17833
  console.error("[HolostaffWidget] Could not find script tag with data-staff-id");
@@ -17830,20 +17835,24 @@ function au() {
17830
17835
  }
17831
17836
  try {
17832
17837
  let e = function(n, r, a, o, h) {
17833
- const d = new iu(n, a);
17838
+ const d = new su(n, a);
17834
17839
  return o && h && d.setObserver(o, h), r != null && r.idleVideoUrl ? d.setIdleVideo(r.idleVideoUrl) : r != null && r.avatarImageUrl && d.setIdleImage(r.avatarImageUrl), r && d.setStaffInfo(r.name, r.avatarImageUrl), d;
17835
17840
  };
17836
- const t = Fo(i);
17841
+ const t = Po(i);
17837
17842
  async function s() {
17838
17843
  let n = t, r = null, a = null;
17839
17844
  try {
17840
- a = await Ho(t.staffId, t.backendUrl), n = Go(t, i, a), r = a.widgetPrompts;
17845
+ a = await $o(t.staffId, t.backendUrl), n = Vo(t, i, a), r = a.widgetPrompts;
17841
17846
  } catch (C) {
17847
+ if (C instanceof $n) {
17848
+ console.log("[HolostaffWidget] Agent is not active — widget suppressed");
17849
+ return;
17850
+ }
17842
17851
  console.warn("[HolostaffWidget] Failed to fetch server config, using embed defaults:", C);
17843
17852
  }
17844
- const o = su(a == null ? void 0 : a.pagePatterns), h = ou();
17853
+ const o = nu(a == null ? void 0 : a.pagePatterns), h = au();
17845
17854
  let d = null, f = null;
17846
- n.visionWsUrl && (d = new lo(), f = new ho(n.visionWsUrl, {
17855
+ n.visionWsUrl && (d = new ho(), f = new co(n.visionWsUrl, {
17847
17856
  staffId: n.staffId,
17848
17857
  visitorId: h,
17849
17858
  pageUrl: location.href,
@@ -17861,7 +17870,7 @@ function au() {
17861
17870
  u.container && (C = { ...n, mode: "inline", container: u.container }), y = e(C, a, r, d, f), window.holostaffWidget = y, y.init();
17862
17871
  } else
17863
17872
  console.log("[HolostaffWidget] No matching page pattern for", location.pathname, "— presenter not loaded (observer active)");
17864
- const g = new ru((C) => {
17873
+ const g = new ou((C) => {
17865
17874
  f == null || f.sendPageChanged(location.href, C, document.title);
17866
17875
  const _ = Hn(C, o);
17867
17876
  if (_ && !y) {
@@ -17880,9 +17889,9 @@ function au() {
17880
17889
  console.error("[HolostaffWidget]", e);
17881
17890
  }
17882
17891
  }
17883
- au();
17892
+ lu();
17884
17893
  export {
17885
- Ar as A,
17894
+ wr as A,
17886
17895
  ft as B,
17887
17896
  We as C,
17888
17897
  Ft as D,
@@ -17890,48 +17899,48 @@ export {
17890
17899
  en as F,
17891
17900
  Os as G,
17892
17901
  sn as H,
17893
- fr as I,
17902
+ pr as I,
17894
17903
  Ji as J,
17895
17904
  nn as K,
17896
- Wa as L,
17905
+ Ga as L,
17897
17906
  Y as M,
17898
- Xn as N,
17899
- ir as O,
17907
+ qn as N,
17908
+ sr as O,
17900
17909
  ze as P,
17901
- wr as Q,
17910
+ xr as Q,
17902
17911
  Ue as R,
17903
17912
  vt as S,
17904
17913
  ie as T,
17905
17914
  Ri as U,
17906
- Ga as V,
17907
- hl as W,
17908
- nl as X,
17909
- iu as Y,
17915
+ Va as V,
17916
+ cl as W,
17917
+ rl as X,
17918
+ su as Y,
17910
17919
  Ze as a,
17911
17920
  Mt as b,
17912
17921
  Z as c,
17913
- vr as d,
17922
+ Sr as d,
17914
17923
  De as e,
17915
- ur as f,
17924
+ fr as f,
17916
17925
  Ge as g,
17917
- Yo as h,
17926
+ Xo as h,
17918
17927
  Oe as i,
17919
- ia as j,
17928
+ sa as j,
17920
17929
  Ii as k,
17921
17930
  Et as l,
17922
- xa as m,
17931
+ Ta as m,
17923
17932
  Gs as n,
17924
- Da as o,
17933
+ Ba as o,
17925
17934
  Qe as p,
17926
17935
  V as q,
17927
- ba as r,
17936
+ _a as r,
17928
17937
  Ai as s,
17929
- na as t,
17930
- sl as u,
17931
- lu as v,
17938
+ ra as t,
17939
+ nl as u,
17940
+ hu as v,
17932
17941
  ct as w,
17933
- er as x,
17934
- rr as y,
17935
- Pa as z
17942
+ tr as x,
17943
+ or as y,
17944
+ Ua as z
17936
17945
  };
17937
- //# sourceMappingURL=index-C1ZbqCjI.js.map
17946
+ //# sourceMappingURL=index-B7aJuEyO.js.map