@opencxh/domain 1.147.0 → 1.150.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- const Tt = 10, It = 10, St = 10, Mt = 5, ce = /* @__PURE__ */ new Set([
1
+ const Lt = 10, $t = 10, Rt = 10, wt = 5, me = /* @__PURE__ */ new Set([
2
2
  "header",
3
3
  "section",
4
4
  "context",
@@ -8,36 +8,36 @@ const Tt = 10, It = 10, St = 10, Mt = 5, ce = /* @__PURE__ */ new Set([
8
8
  "actions",
9
9
  "attachments"
10
10
  ]);
11
- function T(e) {
11
+ function I(e) {
12
12
  if (typeof e == "string") return e.length > 0;
13
13
  if (!e || typeof e != "object") return !1;
14
14
  const t = e;
15
15
  return typeof t.key == "string" || typeof t.value == "string";
16
16
  }
17
- function Ct(e, t = () => {
17
+ function Dt(e, t = () => {
18
18
  }) {
19
19
  if (!Array.isArray(e)) return [];
20
20
  const n = [];
21
- for (const a of e) {
21
+ for (const r of e) {
22
22
  if (n.length >= 10) {
23
23
  t("more than 10 blocks; the rest was dropped");
24
24
  break;
25
25
  }
26
- if (!a || typeof a != "object") continue;
27
- const i = a;
28
- if (!ce.has(i.type)) {
26
+ if (!r || typeof r != "object") continue;
27
+ const i = r;
28
+ if (!me.has(i.type)) {
29
29
  t("unknown block type " + String(i.type));
30
30
  continue;
31
31
  }
32
32
  switch (i.type) {
33
33
  case "header":
34
- if (!T(i.text)) {
34
+ if (!I(i.text)) {
35
35
  t("a header without text");
36
36
  continue;
37
37
  }
38
38
  break;
39
39
  case "context":
40
- if (!T(i.text)) {
40
+ if (!I(i.text)) {
41
41
  t("a context block without text");
42
42
  continue;
43
43
  }
@@ -59,8 +59,8 @@ function Ct(e, t = () => {
59
59
  i.items.length > 10 && (t("more than 10 list items"), i.items = i.items.slice(0, 10));
60
60
  break;
61
61
  case "actions": {
62
- const r = Array.isArray(i.elements) ? i.elements : [], o = r.filter((s) => s && s.action_id && s.invoke && T(s.text));
63
- if (o.length !== r.length && t("an action without action_id, invoke or text"), o.length === 0) continue;
62
+ const a = Array.isArray(i.elements) ? i.elements : [], o = a.filter((s) => s && s.action_id && s.invoke && I(s.text));
63
+ if (o.length !== a.length && t("an action without action_id, invoke or text"), o.length === 0) continue;
64
64
  o.length > 5 && t("more than 5 actions"), i.elements = o.slice(0, 5);
65
65
  break;
66
66
  }
@@ -69,21 +69,21 @@ function Ct(e, t = () => {
69
69
  }
70
70
  return n;
71
71
  }
72
- function ue(e) {
72
+ function ge(e) {
73
73
  return e.replace(/<style[\s\S]*?<\/style>/gi, " ").replace(/<script[\s\S]*?<\/script>/gi, " ").replace(/<[^>]+>/g, " ").replace(/&nbsp;/g, " ").replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/\s+/g, " ").trim();
74
74
  }
75
- function y(e) {
75
+ function b(e) {
76
76
  if (!e || e < 0) return "";
77
77
  const t = Math.floor(e / 60), n = Math.floor(e % 60);
78
78
  return `${t}:${n.toString().padStart(2, "0")}`;
79
79
  }
80
- function x(e) {
80
+ function O(e) {
81
81
  return e ? ` — ${Math.floor(e / 60)}m ${e % 60}s` : "";
82
82
  }
83
- function I(e) {
83
+ function S(e) {
84
84
  return e?.split("@")?.[0] || e || "";
85
85
  }
86
- function b(e) {
86
+ function A(e) {
87
87
  return e.map((t) => t.name).join(", ");
88
88
  }
89
89
  function L(e) {
@@ -96,7 +96,7 @@ const m = {
96
96
  channelKind: "voice",
97
97
  icon: "phone",
98
98
  snippet: () => "Gesprek gestart",
99
- timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${I(e.payload.from)}` : `Outbound call started — ${I(e.payload.to)}`
99
+ timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${S(e.payload.from)}` : `Outbound call started — ${S(e.payload.to)}`
100
100
  },
101
101
  VOICE_CALL_ANSWERED: {
102
102
  shape: "event",
@@ -122,15 +122,15 @@ const m = {
122
122
  shape: "event",
123
123
  channelKind: "voice",
124
124
  icon: "phone",
125
- snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${y(e.payload.duration)})` : ""}`,
126
- timeline: (e) => `Call ended${x(e.payload.duration)}`
125
+ snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${b(e.payload.duration)})` : ""}`,
126
+ timeline: (e) => `Call ended${O(e.payload.duration)}`
127
127
  },
128
128
  VOICE_CALL_MISSED: {
129
129
  shape: "event",
130
130
  channelKind: "voice",
131
131
  icon: "phone",
132
132
  snippet: () => "Gemiste oproep",
133
- timeline: (e) => `Missed call — ${I(e.payload.from)}`
133
+ timeline: (e) => `Missed call — ${S(e.payload.from)}`
134
134
  },
135
135
  VOICE_CALL_FAILED: {
136
136
  shape: "event",
@@ -176,7 +176,7 @@ const m = {
176
176
  shape: "event",
177
177
  channelKind: "video",
178
178
  icon: "video",
179
- snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${y(e.payload.duration)})` : ""}`,
179
+ snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${b(e.payload.duration)})` : ""}`,
180
180
  timeline: () => "Video call ended"
181
181
  },
182
182
  VIDEO_CALL_MISSED: {
@@ -204,7 +204,7 @@ const m = {
204
204
  replyable: !0,
205
205
  carriesText: !0,
206
206
  countsAs: "inbound_message",
207
- snippet: k
207
+ snippet: $
208
208
  },
209
209
  EMAIL_SENT: {
210
210
  shape: "message",
@@ -214,7 +214,7 @@ const m = {
214
214
  replyable: !0,
215
215
  carriesText: !0,
216
216
  countsAs: "outbound_message",
217
- snippet: k
217
+ snippet: $
218
218
  },
219
219
  /* ---- chat ---- */
220
220
  CHAT_MESSAGE_SENT: {
@@ -243,9 +243,9 @@ const m = {
243
243
  shape: "event",
244
244
  channelKind: "chat",
245
245
  icon: "message-circle",
246
- snippet: (e) => `${b(e.payload.members)} toegevoegd`,
246
+ snippet: (e) => `${A(e.payload.members)} toegevoegd`,
247
247
  timeline: (e) => {
248
- const t = b(e.payload.members) || "Someone", n = e.payload.initiator?.name ? ` · added by ${e.payload.initiator.name}` : "";
248
+ const t = A(e.payload.members) || "Someone", n = e.payload.initiator?.name ? ` · added by ${e.payload.initiator.name}` : "";
249
249
  return `${t} joined the chat${n}`;
250
250
  }
251
251
  },
@@ -253,9 +253,9 @@ const m = {
253
253
  shape: "event",
254
254
  channelKind: "chat",
255
255
  icon: "message-circle",
256
- snippet: (e) => `${b(e.payload.members)} verlaten`,
256
+ snippet: (e) => `${A(e.payload.members)} verlaten`,
257
257
  timeline: (e) => {
258
- const t = b(e.payload.members) || "Someone", n = e.payload.initiator?.name ? ` · removed by ${e.payload.initiator.name}` : "";
258
+ const t = A(e.payload.members) || "Someone", n = e.payload.initiator?.name ? ` · removed by ${e.payload.initiator.name}` : "";
259
259
  return `${t} left the chat${n}`;
260
260
  }
261
261
  },
@@ -278,8 +278,8 @@ const m = {
278
278
  shape: "event",
279
279
  channelKind: "chat",
280
280
  icon: "message-circle",
281
- snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${y(e.payload.duration)})` : ""}`,
282
- timeline: (e) => `${L(e.payload.callType)} ended${x(e.payload.duration)}`,
281
+ snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${b(e.payload.duration)})` : ""}`,
282
+ timeline: (e) => `${L(e.payload.callType)} ended${O(e.payload.duration)}`,
283
283
  joinUrl: (e) => e.payload.joinUrl
284
284
  },
285
285
  CHAT_EVENT: {
@@ -367,7 +367,7 @@ const m = {
367
367
  MEETING_ENDED: {
368
368
  shape: "event",
369
369
  icon: "calendar",
370
- snippet: (e) => `Vergadering beëindigd${e.payload.duration ? ` (${y(e.payload.duration)})` : ""}`,
370
+ snippet: (e) => `Vergadering beëindigd${e.payload.duration ? ` (${b(e.payload.duration)})` : ""}`,
371
371
  timeline: () => "Meeting ended"
372
372
  },
373
373
  MEETING_PARTICIPANT_JOINED: {
@@ -404,75 +404,75 @@ const m = {
404
404
  timeline: (e, t) => `Assigned by ${t}`
405
405
  }
406
406
  };
407
- function k(e) {
408
- const t = e.payload, n = t.bodySnippet?.trim() || ue(t.body ?? "");
407
+ function $(e) {
408
+ const t = e.payload, n = t.bodySnippet?.trim() || ge(t.body ?? "");
409
409
  return t.subject ? `${t.subject} — ${n}` : n;
410
410
  }
411
411
  function f(e) {
412
412
  return m[e];
413
413
  }
414
- function Nt(e) {
414
+ function Pt(e) {
415
415
  return f(e)?.icon ?? "circle";
416
416
  }
417
- function vt(e) {
417
+ function Ut(e) {
418
418
  return f(e)?.channelKind;
419
419
  }
420
- function xt(e) {
420
+ function Kt(e) {
421
421
  const t = f(e)?.shape;
422
422
  return t === "message" || t === "note";
423
423
  }
424
- function Lt(e) {
424
+ function Bt(e) {
425
425
  return f(e)?.replyable === !0;
426
426
  }
427
- function kt(e) {
427
+ function Gt(e) {
428
428
  return f(e)?.carriesText === !0;
429
429
  }
430
- function Ot(e) {
430
+ function Ft(e) {
431
431
  return f(e)?.countsAs;
432
432
  }
433
- function $t(e) {
433
+ function Ht(e) {
434
434
  return f(e)?.playbookAuthored === !0;
435
435
  }
436
- function pe(e) {
436
+ function he(e) {
437
437
  const t = f(e.type)?.snippet;
438
438
  return t ? t(e) : "";
439
439
  }
440
- function Rt(e, t) {
440
+ function jt(e, t) {
441
441
  const n = f(e.type)?.timeline;
442
442
  return n ? n(e, t) : e.type.replace(/_/g, " ").toLowerCase();
443
443
  }
444
- function wt(e) {
444
+ function Vt(e) {
445
445
  const t = f(e.type)?.joinUrl;
446
446
  return t ? t(e) : void 0;
447
447
  }
448
- function C(e, t) {
448
+ function N(e, t) {
449
449
  let n = e;
450
- for (const a of t.split(".")) {
450
+ for (const r of t.split(".")) {
451
451
  if (n == null || typeof n != "object") return "";
452
- n = n[a];
452
+ n = n[r];
453
453
  }
454
454
  return n == null ? "" : typeof n == "string" ? n : typeof n == "number" || typeof n == "boolean" ? String(n) : "";
455
455
  }
456
- function N(e, t, n) {
456
+ function k(e, t, n) {
457
457
  if (e === void 0) return null;
458
458
  if (typeof e == "string") return e || null;
459
459
  if ("value" in e)
460
- return C(t, e.value) || null;
461
- const a = {};
462
- for (const [r, o] of Object.entries(e.params ?? {}))
463
- a[r] = C(t, o);
464
- const i = n(e.key, a);
460
+ return N(t, e.value) || null;
461
+ const r = {};
462
+ for (const [a, o] of Object.entries(e.params ?? {}))
463
+ r[a] = N(t, o);
464
+ const i = n(e.key, r);
465
465
  return i === e.key ? null : i;
466
466
  }
467
- function de(e, t) {
467
+ function ye(e, t) {
468
468
  if (!e || typeof e == "string" || "value" in e) return null;
469
469
  const n = {};
470
- for (const [a, i] of Object.entries(e.params ?? {}))
471
- n[a] = C(t, i);
470
+ for (const [r, i] of Object.entries(e.params ?? {}))
471
+ n[r] = N(t, i);
472
472
  return { key: e.key, params: n };
473
473
  }
474
- const fe = (e) => e;
475
- function O(e) {
474
+ const be = (e) => e;
475
+ function R(e) {
476
476
  const t = m[e];
477
477
  return {
478
478
  type: e,
@@ -488,7 +488,7 @@ function O(e) {
488
488
  displayNameKey: t.displayNameKey
489
489
  };
490
490
  }
491
- function $(e) {
491
+ function w(e) {
492
492
  return {
493
493
  type: e.type,
494
494
  shape: e.shape,
@@ -503,21 +503,21 @@ function $(e) {
503
503
  displayNameKey: e.displayNameKey
504
504
  };
505
505
  }
506
- class me {
507
- constructor(t = [], n = fe) {
506
+ class Ae {
507
+ constructor(t = [], n = be) {
508
508
  this.translate = n;
509
- for (const a of t)
510
- a?.type && (a.type in m || this.declared.has(a.type) || this.declared.set(a.type, a));
509
+ for (const r of t)
510
+ r?.type && (r.type in m || this.declared.has(r.type) || this.declared.set(r.type, r));
511
511
  }
512
512
  declared = /* @__PURE__ */ new Map();
513
513
  get(t) {
514
- if (t in m) return O(t);
514
+ if (t in m) return R(t);
515
515
  const n = this.declared.get(t);
516
- return n ? $(n) : void 0;
516
+ return n ? w(n) : void 0;
517
517
  }
518
518
  /** Alles wat als trigger aangeboden mag worden, ingebouwd en gedeclareerd. */
519
519
  triggerable() {
520
- const t = Object.keys(m).filter((a) => m[a].triggerable).map(O), n = [...this.declared.values()].map($).filter((a) => a.triggerable);
520
+ const t = Object.keys(m).filter((r) => m[r].triggerable).map(R), n = [...this.declared.values()].map(w).filter((r) => r.triggerable);
521
521
  return [...t, ...n];
522
522
  }
523
523
  /**
@@ -526,17 +526,17 @@ class me {
526
526
  * typenaam — dezelfde regel die de feed altijd al toonde voor onbekende types.
527
527
  */
528
528
  timelineText(t, n) {
529
- const a = m[t.type];
530
- if (a?.timeline) return a.timeline(t, n);
529
+ const r = m[t.type];
530
+ if (r?.timeline) return r.timeline(t, n);
531
531
  const i = this.declared.get(t.type);
532
- return N(i?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
532
+ return k(i?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
533
533
  }
534
534
  /** De regel voor de inboxlijst. Leeg wanneer het type niets te tonen heeft. */
535
535
  snippet(t) {
536
536
  const n = m[t.type];
537
537
  if (n?.snippet) return n.snippet(t);
538
- const a = this.declared.get(t.type);
539
- return N(a?.text, t, this.translate) ?? "";
538
+ const r = this.declared.get(t.type);
539
+ return k(r?.text, t, this.translate) ?? "";
540
540
  }
541
541
  /** De descriptor zoals hij binnenkwam; nodig om `text` als sleutel op te slaan. */
542
542
  descriptor(t) {
@@ -552,33 +552,33 @@ class me {
552
552
  return this.translate;
553
553
  }
554
554
  }
555
- const Dt = new me(), R = 140;
556
- function ge(e) {
555
+ const Xt = new Ae(), D = 140;
556
+ function Ee(e) {
557
557
  const t = e.trim();
558
- return t.length <= R ? t : t.slice(0, R - 1).trimEnd() + "…";
558
+ return t.length <= D ? t : t.slice(0, D - 1).trimEnd() + "…";
559
559
  }
560
- function Pt(e, t) {
561
- const n = de(t?.text, e), a = t ? N(t.text, e, (i) => i) : null;
560
+ function Wt(e, t) {
561
+ const n = ye(t?.text, e), r = t ? k(t.text, e, (i) => i) : null;
562
562
  return {
563
563
  activityId: e.id,
564
564
  type: e.type,
565
- snippet: ge(a ?? pe(e)),
565
+ snippet: Ee(r ?? he(e)),
566
566
  authorName: e.author?.name ?? "",
567
567
  direction: e.direction,
568
568
  createdAt: e.createdAt ?? Date.now(),
569
569
  ...n ? { snippetKey: n.key, snippetParams: n.params } : {}
570
570
  };
571
571
  }
572
- function Ut(e, t, n = []) {
573
- const a = e.createdAt;
574
- if (!a) return [];
572
+ function zt(e, t, n = []) {
573
+ const r = e.createdAt;
574
+ if (!r) return [];
575
575
  const i = new Set(n);
576
- return e.author.type === "user" && e.author.id && i.add(e.author.id), Object.entries(t).filter(([r, o]) => o >= a && !i.has(r)).map(([r]) => r);
576
+ return e.author.type === "user" && e.author.id && i.add(e.author.id), Object.entries(t).filter(([a, o]) => o >= r && !i.has(a)).map(([a]) => a);
577
577
  }
578
- function Kt(e) {
578
+ function Yt(e) {
579
579
  return e.createdAt ?? 0;
580
580
  }
581
- const Gt = [
581
+ const qt = [
582
582
  { id: "agent", label: "Agent", labelSource: "user" },
583
583
  { id: "team", label: "Team", labelSource: "team" },
584
584
  { id: "inbox", label: "Inbox", labelSource: "inbox" },
@@ -588,54 +588,54 @@ const Gt = [
588
588
  { id: "handledBy", label: "Afhandelaar", labelSource: "raw" },
589
589
  { id: "time", label: "Tijd", labelSource: "raw" }
590
590
  ];
591
- function Bt(e) {
591
+ function Jt(e) {
592
592
  const t = [];
593
593
  for (const n of Object.keys(e))
594
- for (const a of Object.keys(e[n]))
595
- t.push({ lang: n, key: a, value: e[n][a] });
594
+ for (const r of Object.keys(e[n]))
595
+ t.push({ lang: n, key: r, value: e[n][r] });
596
596
  return t;
597
597
  }
598
- function S(e) {
598
+ function M(e) {
599
599
  return e < 10 ? `0${e}` : `${e}`;
600
600
  }
601
- function he(e, t) {
602
- const n = new Date(e), a = `${n.getUTCFullYear()}-${S(n.getUTCMonth() + 1)}-${S(n.getUTCDate())}`;
603
- return t === "day" ? a : `${a}T${S(n.getUTCHours())}`;
601
+ function _e(e, t) {
602
+ const n = new Date(e), r = `${n.getUTCFullYear()}-${M(n.getUTCMonth() + 1)}-${M(n.getUTCDate())}`;
603
+ return t === "day" ? r : `${r}T${M(n.getUTCHours())}`;
604
604
  }
605
- function ye(e, t) {
605
+ function Te(e, t) {
606
606
  const n = new Date(e);
607
607
  return n.setUTCMinutes(0, 0, 0), t === "day" && n.setUTCHours(0), n.getTime();
608
608
  }
609
- const be = 36e5, Ae = 864e5;
610
- function Ht(e, t, n) {
611
- const a = n === "hour" ? be : Ae, i = [];
612
- for (let r = ye(e, n); r <= t; r += a)
613
- i.push(he(r, n));
609
+ const Ie = 36e5, Se = 864e5;
610
+ function Qt(e, t, n) {
611
+ const r = n === "hour" ? Ie : Se, i = [];
612
+ for (let a = Te(e, n); a <= t; a += r)
613
+ i.push(_e(a, n));
614
614
  return i;
615
615
  }
616
- const Ee = [
616
+ const Me = [
617
617
  { id: "resource", label: "Resource", labelSource: "raw" },
618
618
  { id: "origin", label: "Herkomst", labelSource: "raw" }
619
- ], _e = Ee.map((e) => e.id);
620
- function Te(e, t) {
619
+ ], Ce = Me.map((e) => e.id);
620
+ function xe(e, t) {
621
621
  return `${e}.usage.${t}`;
622
622
  }
623
- function jt(e, t) {
623
+ function Zt(e, t) {
624
624
  return t.map((n) => ({
625
- id: Te(e, n.unit),
625
+ id: xe(e, n.unit),
626
626
  label: n.label,
627
627
  category: "Verbruik",
628
628
  valueType: n.valueType ?? "count",
629
629
  aggregation: "sum",
630
630
  supportedDimensions: [
631
631
  "provider",
632
- ..._e,
632
+ ...Ce,
633
633
  ...n.extraDimensions ?? [],
634
634
  "time"
635
635
  ]
636
636
  }));
637
637
  }
638
- const J = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), w = 200, D = 100, P = 200, U = 12, K = 4, Q = 4e3, M = 500, Vt = 256 * 1024, Ie = /* @__PURE__ */ new Set([
638
+ const te = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), P = 200, U = 100, K = 200, B = 12, G = 4, ne = 4e3, C = 500, en = 256 * 1024, Ne = /* @__PURE__ */ new Set([
639
639
  "heading",
640
640
  "paragraph",
641
641
  "list",
@@ -645,81 +645,81 @@ const J = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"])
645
645
  "table",
646
646
  "kpi",
647
647
  "callout"
648
- ]), Se = ["http:", "https:", "mailto:", "tel:"], Me = /^[a-z][a-z0-9+.-]*:/i;
649
- function Z(e) {
648
+ ]), ke = ["http:", "https:", "mailto:", "tel:"], ve = /^[a-z][a-z0-9+.-]*:/i;
649
+ function ie(e) {
650
650
  const t = e.trim().replace(/^<|>$/g, "");
651
651
  if (!t) return !1;
652
- const n = Me.exec(t)?.[0];
653
- return n ? Se.includes(n.toLowerCase()) : !t.startsWith("//");
652
+ const n = ve.exec(t)?.[0];
653
+ return n ? ke.includes(n.toLowerCase()) : !t.startsWith("//");
654
654
  }
655
- const Ce = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
656
- function Ne(e) {
655
+ const Oe = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
656
+ function Le(e) {
657
657
  let t = "", n = 0;
658
658
  for (; n < e.length; ) {
659
- const a = e[n] === "!" && e[n + 1] === "[";
660
- if (e[n] !== "[" && !a) {
659
+ const r = e[n] === "!" && e[n + 1] === "[";
660
+ if (e[n] !== "[" && !r) {
661
661
  t += e[n], n += 1;
662
662
  continue;
663
663
  }
664
- const i = n + (a ? 2 : 1), r = G(e, i, "[", "]");
665
- if (r < 0 || e[r + 1] !== "(") {
664
+ const i = n + (r ? 2 : 1), a = F(e, i, "[", "]");
665
+ if (a < 0 || e[a + 1] !== "(") {
666
666
  t += e[n], n += 1;
667
667
  continue;
668
668
  }
669
- const o = G(e, r + 2, "(", ")");
669
+ const o = F(e, a + 2, "(", ")");
670
670
  if (o < 0) {
671
671
  t += e[n], n += 1;
672
672
  continue;
673
673
  }
674
- const s = e.slice(i, r), l = e.slice(r + 2, o).trim().split(/\s+/)[0] ?? "";
675
- t += a || !Z(l) ? s : e.slice(n, o + 1), n = o + 1;
674
+ const s = e.slice(i, a), l = e.slice(a + 2, o).trim().split(/\s+/)[0] ?? "";
675
+ t += r || !ie(l) ? s : e.slice(n, o + 1), n = o + 1;
676
676
  }
677
677
  return t;
678
678
  }
679
- function G(e, t, n, a) {
679
+ function F(e, t, n, r) {
680
680
  let i = 1;
681
- for (let r = t; r < e.length; r += 1) {
682
- if (e[r] === "\\") {
683
- r += 1;
681
+ for (let a = t; a < e.length; a += 1) {
682
+ if (e[a] === "\\") {
683
+ a += 1;
684
684
  continue;
685
685
  }
686
- if (e[r] === n) i += 1;
687
- else if (e[r] === a && (i -= 1, i === 0))
688
- return r;
686
+ if (e[a] === n) i += 1;
687
+ else if (e[a] === r && (i -= 1, i === 0))
688
+ return a;
689
689
  }
690
690
  return -1;
691
691
  }
692
- function ve(e) {
693
- return Ne(e).replace(
694
- Ce,
695
- (t, n, a) => Z(a) ? t : ""
692
+ function $e(e) {
693
+ return Le(e).replace(
694
+ Oe,
695
+ (t, n, r) => ie(r) ? t : ""
696
696
  );
697
697
  }
698
- function u(e, t = Q) {
699
- return typeof e == "string" ? ve(e).slice(0, t) : "";
698
+ function u(e, t = ne) {
699
+ return typeof e == "string" ? $e(e).slice(0, t) : "";
700
700
  }
701
- function xe(e, t = Q) {
701
+ function Re(e, t = ne) {
702
702
  return typeof e == "string" ? e.slice(0, t) : "";
703
703
  }
704
- function Le(e, t = "info") {
705
- return typeof e == "string" && J.has(e) ? e : t;
704
+ function we(e, t = "info") {
705
+ return typeof e == "string" && te.has(e) ? e : t;
706
706
  }
707
- function Ft(e, t = () => {
707
+ function tn(e, t = () => {
708
708
  }) {
709
709
  if (!Array.isArray(e)) return [];
710
710
  const n = [];
711
- for (const a of e) {
712
- if (n.length >= w) {
713
- t("more than " + w + " blocks; the rest was dropped");
711
+ for (const r of e) {
712
+ if (n.length >= P) {
713
+ t("more than " + P + " blocks; the rest was dropped");
714
714
  break;
715
715
  }
716
- if (!a || typeof a != "object") continue;
717
- const i = a;
718
- if (!Ie.has(i.type)) {
716
+ if (!r || typeof r != "object") continue;
717
+ const i = r;
718
+ if (!Ne.has(i.type)) {
719
719
  t("unknown block type " + String(i.type));
720
720
  continue;
721
721
  }
722
- const r = typeof i.block_id == "string" ? { block_id: i.block_id } : {};
722
+ const a = typeof i.block_id == "string" ? { block_id: i.block_id } : {};
723
723
  switch (i.type) {
724
724
  case "heading": {
725
725
  const o = u(i.text);
@@ -728,7 +728,7 @@ function Ft(e, t = () => {
728
728
  continue;
729
729
  }
730
730
  const s = i.level === 2 || i.level === 3 ? i.level : 1;
731
- n.push({ ...r, type: "heading", level: s, text: o });
731
+ n.push({ ...a, type: "heading", level: s, text: o });
732
732
  break;
733
733
  }
734
734
  case "paragraph": {
@@ -737,7 +737,7 @@ function Ft(e, t = () => {
737
737
  t("a paragraph without text");
738
738
  continue;
739
739
  }
740
- n.push({ ...r, type: "paragraph", text: o });
740
+ n.push({ ...a, type: "paragraph", text: o });
741
741
  break;
742
742
  }
743
743
  case "quote": {
@@ -746,27 +746,27 @@ function Ft(e, t = () => {
746
746
  t("a quote without text");
747
747
  continue;
748
748
  }
749
- n.push({ ...r, type: "quote", text: o });
749
+ n.push({ ...a, type: "quote", text: o });
750
750
  break;
751
751
  }
752
752
  case "code": {
753
- const o = xe(i.text);
753
+ const o = Re(i.text);
754
754
  if (!o) {
755
755
  t("a code block without text");
756
756
  continue;
757
757
  }
758
758
  const s = typeof i.lang == "string" ? { lang: i.lang.slice(0, 32) } : {};
759
- n.push({ ...r, type: "code", ...s, text: o });
759
+ n.push({ ...a, type: "code", ...s, text: o });
760
760
  break;
761
761
  }
762
762
  case "divider":
763
- n.push({ ...r, type: "divider" });
763
+ n.push({ ...a, type: "divider" });
764
764
  break;
765
765
  case "list": {
766
766
  const o = Array.isArray(i.items) ? i.items : [], s = [];
767
767
  for (const p of o) {
768
- if (s.length >= D) {
769
- t("more than " + D + " list items");
768
+ if (s.length >= U) {
769
+ t("more than " + U + " list items");
770
770
  break;
771
771
  }
772
772
  const d = u(p?.text);
@@ -779,18 +779,18 @@ function Ft(e, t = () => {
779
779
  continue;
780
780
  }
781
781
  const l = i.style === "numbered" ? "numbered" : "bulleted";
782
- n.push({ ...r, type: "list", style: l, items: s });
782
+ n.push({ ...a, type: "list", style: l, items: s });
783
783
  break;
784
784
  }
785
785
  case "table": {
786
786
  const o = Array.isArray(i.columns) ? i.columns : [], s = [];
787
787
  for (const c of o) {
788
- if (s.length >= U) {
789
- t("more than " + U + " table columns");
788
+ if (s.length >= B) {
789
+ t("more than " + B + " table columns");
790
790
  break;
791
791
  }
792
- const h = u(c?.label, M), _ = c?.align === "right" ? "right" : void 0;
793
- s.push(_ ? { label: h, align: _ } : { label: h });
792
+ const y = u(c?.label, C), T = c?.align === "right" ? "right" : void 0;
793
+ s.push(T ? { label: y, align: T } : { label: y });
794
794
  }
795
795
  if (s.length === 0) {
796
796
  t("a table without columns");
@@ -798,18 +798,18 @@ function Ft(e, t = () => {
798
798
  }
799
799
  const l = Array.isArray(i.rows) ? i.rows : [], p = [];
800
800
  for (const c of l) {
801
- if (p.length >= P) {
802
- t("more than " + P + " table rows");
801
+ if (p.length >= K) {
802
+ t("more than " + K + " table rows");
803
803
  break;
804
804
  }
805
- const h = Array.isArray(c) ? c : [];
805
+ const y = Array.isArray(c) ? c : [];
806
806
  p.push(
807
- s.map((_, le) => u(h[le], M))
807
+ s.map((T, fe) => u(y[fe], C))
808
808
  );
809
809
  }
810
- const d = u(i.caption, M);
810
+ const d = u(i.caption, C);
811
811
  n.push({
812
- ...r,
812
+ ...a,
813
813
  type: "table",
814
814
  columns: s,
815
815
  rows: p,
@@ -820,22 +820,22 @@ function Ft(e, t = () => {
820
820
  case "kpi": {
821
821
  const o = Array.isArray(i.items) ? i.items : [], s = [];
822
822
  for (const l of o) {
823
- if (s.length >= K) {
824
- t("more than " + K + " kpi items");
823
+ if (s.length >= G) {
824
+ t("more than " + G + " kpi items");
825
825
  break;
826
826
  }
827
827
  const p = u(l?.value, 40), d = u(l?.label, 80);
828
828
  if (!p || !d) continue;
829
829
  const c = l?.tone;
830
830
  s.push(
831
- typeof c == "string" && J.has(c) ? { value: p, label: d, tone: c } : { value: p, label: d }
831
+ typeof c == "string" && te.has(c) ? { value: p, label: d, tone: c } : { value: p, label: d }
832
832
  );
833
833
  }
834
834
  if (s.length === 0) {
835
835
  t("a kpi block without usable items");
836
836
  continue;
837
837
  }
838
- n.push({ ...r, type: "kpi", items: s });
838
+ n.push({ ...a, type: "kpi", items: s });
839
839
  break;
840
840
  }
841
841
  case "callout": {
@@ -846,9 +846,9 @@ function Ft(e, t = () => {
846
846
  }
847
847
  const s = u(i.title, 200);
848
848
  n.push({
849
- ...r,
849
+ ...a,
850
850
  type: "callout",
851
- tone: Le(i.tone),
851
+ tone: we(i.tone),
852
852
  ...s ? { title: s } : {},
853
853
  text: o
854
854
  });
@@ -858,28 +858,28 @@ function Ft(e, t = () => {
858
858
  }
859
859
  return n;
860
860
  }
861
- function Xt(e) {
861
+ function nn(e) {
862
862
  return JSON.stringify(e).length;
863
863
  }
864
- function Wt(e) {
864
+ function rn(e) {
865
865
  return {
866
866
  blocks: e.length,
867
867
  types: e.map((t) => t.type),
868
868
  headings: e.flatMap((t) => t.type === "heading" ? [t.text] : [])
869
869
  };
870
870
  }
871
- function B(e) {
871
+ function H(e) {
872
872
  return e.replace(/\|/g, "\\|").replace(/\r?\n/g, " ").trim();
873
873
  }
874
- function H(e, t, n) {
875
- const a = e.map((i, r) => n?.[r] === "right" ? "---:" : "---");
874
+ function j(e, t, n) {
875
+ const r = e.map((i, a) => n?.[a] === "right" ? "---:" : "---");
876
876
  return [
877
- `| ${e.map(B).join(" | ")} |`,
878
- `| ${a.join(" | ")} |`,
879
- ...t.map((i) => `| ${i.map(B).join(" | ")} |`)
877
+ `| ${e.map(H).join(" | ")} |`,
878
+ `| ${r.join(" | ")} |`,
879
+ ...t.map((i) => `| ${i.map(H).join(" | ")} |`)
880
880
  ];
881
881
  }
882
- function ke(e) {
882
+ function De(e) {
883
883
  switch (e.type) {
884
884
  case "heading":
885
885
  return [`${"#".repeat(e.level)} ${e.text}`];
@@ -893,11 +893,11 @@ function ke(e) {
893
893
  return ["---"];
894
894
  case "list":
895
895
  return e.items.map((t, n) => {
896
- const a = e.style === "numbered" ? `${n + 1}.` : "-";
897
- return t.lead ? `${a} **${t.lead}** ${t.text}` : `${a} ${t.text}`;
896
+ const r = e.style === "numbered" ? `${n + 1}.` : "-";
897
+ return t.lead ? `${r} **${t.lead}** ${t.text}` : `${r} ${t.text}`;
898
898
  });
899
899
  case "table": {
900
- const t = H(
900
+ const t = j(
901
901
  e.columns.map((n) => n.label),
902
902
  e.rows,
903
903
  e.columns.map((n) => n.align ?? "left")
@@ -905,7 +905,7 @@ function ke(e) {
905
905
  return e.caption ? [...t, "", `*${e.caption}*`] : t;
906
906
  }
907
907
  case "kpi":
908
- return H(
908
+ return j(
909
909
  e.items.map((t) => t.value),
910
910
  [e.items.map((t) => t.label)]
911
911
  );
@@ -913,12 +913,12 @@ function ke(e) {
913
913
  return (e.title ? `**${e.title}** ${e.text}` : e.text).split(/\r?\n/).map((n) => `> ${n}`);
914
914
  }
915
915
  }
916
- function zt(e, t) {
917
- const n = [], a = e.some((i) => i.type === "heading" && i.level === 1);
918
- t && !a && n.push(`# ${t}`);
916
+ function an(e, t) {
917
+ const n = [], r = e.some((i) => i.type === "heading" && i.level === 1);
918
+ t && !r && n.push(`# ${t}`);
919
919
  for (const i of e) {
920
- const r = ke(i);
921
- r.length > 0 && n.push(r.join(`
920
+ const a = De(i);
921
+ a.length > 0 && n.push(a.join(`
922
922
  `));
923
923
  }
924
924
  return `${n.join(`
@@ -926,26 +926,26 @@ function zt(e, t) {
926
926
  `)}
927
927
  `;
928
928
  }
929
- const ee = (e) => `user:${e}`, te = (e) => `team:${e}`;
930
- function Yt(e) {
929
+ const re = (e) => `user:${e}`, ae = (e) => `team:${e}`;
930
+ function on(e) {
931
931
  const t = /* @__PURE__ */ new Set();
932
932
  for (const n of e ?? [])
933
- n?.id && (n.kind === "user" && t.add(ee(n.id)), n.kind === "team" && t.add(te(n.id)));
933
+ n?.id && (n.kind === "user" && t.add(re(n.id)), n.kind === "team" && t.add(ae(n.id)));
934
934
  return [...t].sort();
935
935
  }
936
- function qt(e, t) {
937
- return [ee(e), ...t.map(te)];
936
+ function sn(e, t) {
937
+ return [re(e), ...t.map(ae)];
938
938
  }
939
- function Jt(e) {
939
+ function ln(e) {
940
940
  const t = /* @__PURE__ */ new Set();
941
941
  for (const n of e ?? [])
942
942
  n?.kind && t.add(n.kind);
943
943
  return [...t];
944
944
  }
945
- function Qt(e) {
945
+ function cn(e) {
946
946
  return (e.startsWith("tool:") ? e.slice(5) : e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
947
947
  }
948
- const Zt = [
948
+ const un = [
949
949
  { name: "text", type: "string" },
950
950
  { name: "subject", type: "string" },
951
951
  { name: "from", type: "string" },
@@ -968,7 +968,7 @@ const Zt = [
968
968
  // een nieuw adres) — een stap die hierop leunt hoort dus een `condition` te hebben.
969
969
  { name: "contactId", type: "string" },
970
970
  { name: "companyId", type: "string" }
971
- ], en = {
971
+ ], pn = {
972
972
  topics: [
973
973
  { name: "topic", type: "string" },
974
974
  { name: "confidence", type: "number" }
@@ -979,7 +979,7 @@ const Zt = [
979
979
  ],
980
980
  extract: []
981
981
  };
982
- function Oe(e) {
982
+ function Pe(e) {
983
983
  switch (e.kind) {
984
984
  case "user":
985
985
  return `user:${e.userId}`;
@@ -989,22 +989,22 @@ function Oe(e) {
989
989
  return "org";
990
990
  }
991
991
  }
992
- function tn(e) {
992
+ function dn(e) {
993
993
  if (typeof e != "string") return;
994
994
  const t = e.trim();
995
995
  if (t === "org") return { kind: "org" };
996
996
  const n = t.indexOf(":");
997
997
  if (n <= 0) return;
998
- const a = t.slice(0, n), i = t.slice(n + 1).trim();
998
+ const r = t.slice(0, n), i = t.slice(n + 1).trim();
999
999
  if (i) {
1000
- if (a === "user") return { kind: "user", userId: i };
1001
- if (a === "team") return { kind: "team", teamId: i };
1000
+ if (r === "user") return { kind: "user", userId: i };
1001
+ if (r === "team") return { kind: "team", teamId: i };
1002
1002
  }
1003
1003
  }
1004
- function $e(e) {
1005
- return Oe(e);
1004
+ function Ue(e) {
1005
+ return Pe(e);
1006
1006
  }
1007
- function nn(e) {
1007
+ function fn(e) {
1008
1008
  switch (e.kind) {
1009
1009
  case "personal":
1010
1010
  return { kind: "user", userId: e.userId };
@@ -1014,76 +1014,141 @@ function nn(e) {
1014
1014
  return { kind: "org" };
1015
1015
  }
1016
1016
  }
1017
- function an(e) {
1018
- return $e(e);
1017
+ function mn(e) {
1018
+ return Ue(e);
1019
1019
  }
1020
- const Re = ["done", "escalated", "failed", "timed_out", "stopped"], we = ["awaiting_approval", "awaiting_reply"];
1021
- function De(e) {
1022
- return Re.includes(e);
1020
+ const Ke = ["done", "escalated", "failed", "timed_out", "stopped"], Be = ["awaiting_approval", "awaiting_reply"];
1021
+ function Ge(e) {
1022
+ return Ke.includes(e);
1023
1023
  }
1024
- function rn(e) {
1025
- return De(e);
1024
+ function gn(e) {
1025
+ return Ge(e);
1026
1026
  }
1027
- function on(e) {
1028
- return we.includes(e);
1027
+ function hn(e) {
1028
+ return Be.includes(e);
1029
1029
  }
1030
- function sn(e, t) {
1030
+ function yn(e, t) {
1031
1031
  const n = e.labels ?? [];
1032
- return n.find((a) => a.locale === t)?.label ?? n[0]?.label ?? e.url;
1032
+ return n.find((r) => r.locale === t)?.label ?? n[0]?.label ?? e.url;
1033
+ }
1034
+ function bn(e, t, n) {
1035
+ const r = e.translations ?? [];
1036
+ return r.find((i) => i.locale === t) ?? (n ? r.find((i) => i.locale === n) : void 0) ?? { locale: t };
1037
+ }
1038
+ const V = [
1039
+ { code: "nl", label: "Nederlands", english: "Dutch" },
1040
+ { code: "en", label: "English", english: "English" },
1041
+ { code: "de", label: "Deutsch", english: "German" },
1042
+ { code: "fr", label: "Français", english: "French" },
1043
+ { code: "es", label: "Español", english: "Spanish" },
1044
+ { code: "it", label: "Italiano", english: "Italian" },
1045
+ { code: "pt", label: "Português", english: "Portuguese" },
1046
+ { code: "pl", label: "Polski", english: "Polish" },
1047
+ { code: "sv", label: "Svenska", english: "Swedish" },
1048
+ { code: "da", label: "Dansk", english: "Danish" },
1049
+ { code: "nb", label: "Norsk bokmål", english: "Norwegian Bokmål" },
1050
+ { code: "fi", label: "Suomi", english: "Finnish" },
1051
+ { code: "tr", label: "Türkçe", english: "Turkish" }
1052
+ ];
1053
+ function oe(e) {
1054
+ const t = (e ?? "").toLowerCase();
1055
+ return V.find((n) => n.code === t) ?? V.find((n) => n.code === t.split("-")[0]);
1056
+ }
1057
+ function An(e) {
1058
+ return oe(e)?.label ?? e;
1033
1059
  }
1034
- function ln(e, t, n) {
1035
- const a = e.translations ?? [];
1036
- return a.find((i) => i.locale === t) ?? (n ? a.find((i) => i.locale === n) : void 0) ?? { locale: t };
1060
+ function En(e) {
1061
+ const t = oe(e);
1062
+ return t ? t.english === t.label ? `${t.english} (${t.code})` : `${t.english} — ${t.label} (${t.code})` : e;
1037
1063
  }
1038
- const ne = 3;
1039
- function Pe(e, t) {
1064
+ const se = 3;
1065
+ function Fe(e, t) {
1040
1066
  const n = /* @__PURE__ */ new Set();
1041
- let a = 1, i = t.get(e)?.parentId;
1067
+ let r = 1, i = t.get(e)?.parentId;
1042
1068
  for (; i; ) {
1043
- if (n.has(i) || (n.add(i), a++, a > ne + 1)) return 1 / 0;
1069
+ if (n.has(i) || (n.add(i), r++, r > se + 1)) return 1 / 0;
1044
1070
  i = t.get(i)?.parentId;
1045
1071
  }
1046
- return a;
1072
+ return r;
1047
1073
  }
1048
- function cn(e, t, n) {
1074
+ function _n(e, t, n) {
1049
1075
  if (!e) return !0;
1050
1076
  if (e === t) return !1;
1051
- const a = new Map(n.map((o) => [o.id, o]));
1052
- if (!a.has(e) || t && Ue(e, t, a)) return !1;
1053
- const i = Pe(e, a), r = t ? ie(t, n) : 1;
1054
- return i + r <= ne;
1077
+ const r = new Map(n.map((o) => [o.id, o]));
1078
+ if (!r.has(e) || t && He(e, t, r)) return !1;
1079
+ const i = Fe(e, r), a = t ? le(t, n) : 1;
1080
+ return i + a <= se;
1055
1081
  }
1056
- function Ue(e, t, n) {
1057
- const a = /* @__PURE__ */ new Set();
1082
+ function He(e, t, n) {
1083
+ const r = /* @__PURE__ */ new Set();
1058
1084
  let i = n.get(e)?.parentId;
1059
1085
  for (; i; ) {
1060
1086
  if (i === t) return !0;
1061
- if (a.has(i)) return !1;
1062
- a.add(i), i = n.get(i)?.parentId;
1087
+ if (r.has(i)) return !1;
1088
+ r.add(i), i = n.get(i)?.parentId;
1063
1089
  }
1064
1090
  return !1;
1065
1091
  }
1066
- function ie(e, t, n = /* @__PURE__ */ new Set()) {
1092
+ function le(e, t, n = /* @__PURE__ */ new Set()) {
1067
1093
  if (n.has(e)) return 1;
1068
1094
  n.add(e);
1069
- const a = t.filter((i) => i.parentId === e);
1070
- return a.length ? 1 + Math.max(...a.map((i) => ie(i.id, t, n))) : 1;
1095
+ const r = t.filter((i) => i.parentId === e);
1096
+ return r.length ? 1 + Math.max(...r.map((i) => le(i.id, t, n))) : 1;
1071
1097
  }
1072
- const Ke = "en";
1073
- function Ge(e) {
1074
- return e.defaultLocale || e.locale || Ke;
1098
+ const je = "en";
1099
+ function Ve(e) {
1100
+ return e.defaultLocale || e.locale || je;
1075
1101
  }
1076
- function un(e) {
1102
+ function Tn(e) {
1077
1103
  const t = /* @__PURE__ */ new Set(), n = [];
1078
- for (const a of [Ge(e), ...e.locales ?? []])
1079
- !a || t.has(a) || (t.add(a), n.push(a));
1104
+ for (const r of [Ve(e), ...e.locales ?? []])
1105
+ !r || t.has(r) || (t.add(r), n.push(r));
1080
1106
  return n;
1081
1107
  }
1082
- function pn(e, t, n) {
1083
- const a = e.translations ?? [];
1084
- return a.find((i) => i.locale === t)?.name ?? (n ? a.find((i) => i.locale === n)?.name : void 0) ?? e.name;
1108
+ function In(e, t, n) {
1109
+ const r = e.translations ?? [];
1110
+ return r.find((i) => i.locale === t)?.name ?? (n ? r.find((i) => i.locale === n)?.name : void 0) ?? e.name;
1111
+ }
1112
+ const Xe = 20, We = 20, x = 300;
1113
+ function g(e) {
1114
+ return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu, " ").replace(/\s+/g, " ").trim();
1115
+ }
1116
+ function ze(e) {
1117
+ const t = e.replace(/\s+/g, " ").trim();
1118
+ if (t.length <= x) return t;
1119
+ const n = t.slice(0, x), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
1120
+ return r > x * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
1121
+ }
1122
+ function Sn(e, t) {
1123
+ const n = ze(t.text), r = g(n);
1124
+ if (!r || (e.examples ?? []).some((o) => g(o) === r)) return null;
1125
+ const i = e.exampleCandidates ?? [], a = i.findIndex((o) => g(o.text) === r);
1126
+ if (a >= 0) {
1127
+ if (i[a].corrected || !t.corrected) return null;
1128
+ const o = [...i];
1129
+ return o[a] = { ...o[a], corrected: !0, addedAt: t.addedAt }, X(o);
1130
+ }
1131
+ return X([{ ...t, text: n }, ...i]).slice(0, We);
1085
1132
  }
1086
- const ae = [
1133
+ function X(e) {
1134
+ return [...e].sort((t, n) => Number(n.corrected) - Number(t.corrected) || n.addedAt - t.addedAt);
1135
+ }
1136
+ function Mn(e, t) {
1137
+ const n = g(t), r = (e.examples ?? []).filter((a) => a.trim());
1138
+ return { examples: r.some((a) => g(a) === n) ? r : [...r, t].slice(-Xe), exampleCandidates: Ye(e, t) };
1139
+ }
1140
+ function Ye(e, t) {
1141
+ const n = g(t);
1142
+ return (e.exampleCandidates ?? []).filter((r) => g(r.text) !== n);
1143
+ }
1144
+ function qe(e, t) {
1145
+ const n = e.ownerScope;
1146
+ return n ? n.kind === "org" ? !0 : n.kind === "team" ? !!t && n.teamId === t : !1 : !1;
1147
+ }
1148
+ function Cn(e, t) {
1149
+ return e.filter((n) => qe(n, t));
1150
+ }
1151
+ const ce = [
1087
1152
  {
1088
1153
  id: "openai",
1089
1154
  attachmentKinds: ["image", "pdf"],
@@ -1174,54 +1239,54 @@ const ae = [
1174
1239
  defaultModel: "default"
1175
1240
  }
1176
1241
  ];
1177
- function E(e) {
1178
- return ae.find((t) => t.id === e);
1242
+ function _(e) {
1243
+ return ce.find((t) => t.id === e);
1179
1244
  }
1180
- function dn(e) {
1181
- return E(e)?.label ?? e;
1245
+ function xn(e) {
1246
+ return _(e)?.label ?? e;
1182
1247
  }
1183
- function fn(e, t = "gpt-5-mini") {
1184
- return E(e)?.defaultModel ?? t;
1248
+ function Nn(e, t = "gpt-5-mini") {
1249
+ return _(e)?.defaultModel ?? t;
1185
1250
  }
1186
- function mn(e) {
1187
- return ae.filter((t) => t.capabilities.includes(e));
1251
+ function kn(e) {
1252
+ return ce.filter((t) => t.capabilities.includes(e));
1188
1253
  }
1189
- function gn(e) {
1190
- const t = E(e);
1254
+ function vn(e) {
1255
+ const t = _(e);
1191
1256
  return !!t && !t.baseUrl;
1192
1257
  }
1193
- function hn(e, t) {
1194
- return t === "text" ? !0 : E(e)?.attachmentKinds?.includes(t) === !0;
1258
+ function On(e, t) {
1259
+ return t === "text" ? !0 : _(e)?.attachmentKinds?.includes(t) === !0;
1195
1260
  }
1196
- const yn = /* @__PURE__ */ new Set(["mail", "message"]);
1197
- function Be(e, t) {
1261
+ const Ln = /* @__PURE__ */ new Set(["mail", "message"]);
1262
+ function Je(e, t) {
1198
1263
  const n = e.settings?.signatures?.[t];
1199
1264
  return !n || !n.enabled || !n.body || n.body.trim() === "" ? null : n;
1200
1265
  }
1201
- function bn(e, t, n, a = "html") {
1266
+ function $n(e, t, n, r = "html") {
1202
1267
  if (!e) return n;
1203
- const i = Be(e, t);
1204
- return i ? `${n}${a === "text" ? `
1268
+ const i = Je(e, t);
1269
+ return i ? `${n}${r === "text" ? `
1205
1270
 
1206
1271
  ` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${i.body}` : n;
1207
1272
  }
1208
- function An(e) {
1273
+ function Rn(e) {
1209
1274
  return e.endpoints ?? [];
1210
1275
  }
1211
- const En = (e) => !!e.assignedUserId || !!e.assignedInboxId, _n = (e) => e.status === "closed", Tn = (e) => ({
1276
+ const wn = (e) => !!e.assignedUserId || !!e.assignedInboxId, Dn = (e) => e.status === "closed", Pn = (e) => ({
1212
1277
  urgent: 10,
1213
1278
  high: 5,
1214
1279
  normal: 2,
1215
1280
  low: 1
1216
- })[e.priority] || 0, In = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
1217
- function Sn(e, t) {
1281
+ })[e.priority] || 0, Un = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
1282
+ function Kn(e, t) {
1218
1283
  return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
1219
1284
  }
1220
- const Mn = 2e3, Cn = 500, Nn = 12e3, vn = 4e3, He = ["contact", "company"];
1221
- function xn(e) {
1285
+ const Bn = 1e3, Gn = 2e3, Fn = 500, Hn = 12e3, jn = 4e3, Qe = ["contact", "company"];
1286
+ function Vn(e) {
1222
1287
  if (!e) return !1;
1223
1288
  const t = e.slice(0, e.indexOf(":"));
1224
- return He.includes(t);
1289
+ return Qe.includes(t);
1225
1290
  }
1226
1291
  const v = {
1227
1292
  // The lower bounds are deliberately generous: service ranges (0800/0900) are
@@ -1246,81 +1311,81 @@ const v = {
1246
1311
  PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
1247
1312
  US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
1248
1313
  CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
1249
- }, je = "NL", Ve = 15, Fe = 8, Xe = Array.from(
1314
+ }, Ze = "NL", et = 15, tt = 8, nt = Array.from(
1250
1315
  new Set(Object.values(v).map((e) => e.callingCode))
1251
1316
  ).sort((e, t) => t.length - e.length);
1252
- function j(e) {
1317
+ function W(e) {
1253
1318
  if (e)
1254
1319
  return v[e.trim().toUpperCase()];
1255
1320
  }
1256
- function A(e, t) {
1321
+ function E(e, t) {
1257
1322
  return e.length >= t.nsnMin && e.length <= t.nsnMax;
1258
1323
  }
1259
- function V(e) {
1260
- if (e.length > Ve) return null;
1261
- for (const t of Xe) {
1324
+ function z(e) {
1325
+ if (e.length > et) return null;
1326
+ for (const t of nt) {
1262
1327
  if (!e.startsWith(t)) continue;
1263
1328
  const n = e.slice(t.length);
1264
- for (const a of Object.values(v)) {
1265
- if (a.callingCode !== t) continue;
1266
- const i = a.trunkPrefix, r = i && n.startsWith(i) ? n.slice(i.length) : n;
1267
- if (A(r, a)) return `+${t}${r}`;
1329
+ for (const r of Object.values(v)) {
1330
+ if (r.callingCode !== t) continue;
1331
+ const i = r.trunkPrefix, a = i && n.startsWith(i) ? n.slice(i.length) : n;
1332
+ if (E(a, r)) return `+${t}${a}`;
1268
1333
  }
1269
1334
  return null;
1270
1335
  }
1271
- return e.length < Fe ? null : `+${e}`;
1336
+ return e.length < tt ? null : `+${e}`;
1272
1337
  }
1273
- function We(e) {
1338
+ function it(e) {
1274
1339
  let t = e.trim();
1275
1340
  const n = t.match(/^(sips?|tel|whatsapp):/i);
1276
1341
  n && (t = t.slice(n[0].length));
1277
- const a = t.indexOf("@");
1278
- return a >= 0 && (t = t.slice(0, a)), t.trim();
1342
+ const r = t.indexOf("@");
1343
+ return r >= 0 && (t = t.slice(0, r)), t.trim();
1279
1344
  }
1280
- function Ln(e) {
1345
+ function Xn(e) {
1281
1346
  if (!e) return !1;
1282
1347
  const t = e.indexOf("@");
1283
1348
  if (t <= 0) return !1;
1284
1349
  const n = e.slice(0, t).trim();
1285
1350
  return !/^[+\d\s().-]+$/.test(n);
1286
1351
  }
1287
- function F(e, t) {
1352
+ function Y(e, t) {
1288
1353
  if (!e) return null;
1289
- const n = We(e);
1354
+ const n = it(e);
1290
1355
  if (!n) return null;
1291
- const a = n.startsWith("+"), i = n.replace(/\D/g, "");
1356
+ const r = n.startsWith("+"), i = n.replace(/\D/g, "");
1292
1357
  if (!i) return null;
1293
- if (a) return V(i);
1294
- if (i.startsWith("00")) return V(i.slice(2));
1295
- const r = j(t) ?? j(je);
1296
- if (!r) return null;
1297
- const o = r.trunkPrefix;
1358
+ if (r) return z(i);
1359
+ if (i.startsWith("00")) return z(i.slice(2));
1360
+ const a = W(t) ?? W(Ze);
1361
+ if (!a) return null;
1362
+ const o = a.trunkPrefix;
1298
1363
  if (o && i.startsWith(o)) {
1299
1364
  const s = i.slice(o.length);
1300
- return A(s, r) ? `+${r.callingCode}${s}` : null;
1365
+ return E(s, a) ? `+${a.callingCode}${s}` : null;
1301
1366
  }
1302
- if (i.startsWith(r.callingCode)) {
1303
- const s = i.slice(r.callingCode.length);
1304
- if (A(s, r)) return `+${r.callingCode}${s}`;
1367
+ if (i.startsWith(a.callingCode)) {
1368
+ const s = i.slice(a.callingCode.length);
1369
+ if (E(s, a)) return `+${a.callingCode}${s}`;
1305
1370
  }
1306
- return !o && A(i, r) ? `+${r.callingCode}${i}` : null;
1371
+ return !o && E(i, a) ? `+${a.callingCode}${i}` : null;
1307
1372
  }
1308
- function kn(e, t = 9) {
1373
+ function Wn(e, t = 9) {
1309
1374
  const n = (e ?? "").replace(/\D/g, "");
1310
1375
  return n.length < t ? null : n.slice(-t);
1311
1376
  }
1312
- function re(e) {
1377
+ function ue(e) {
1313
1378
  if (!e) return null;
1314
1379
  const t = e.trim().toLowerCase(), n = t.lastIndexOf("@");
1315
1380
  if (n <= 0 || n === t.length - 1) return null;
1316
- const a = t.slice(0, n).split("+")[0], i = t.slice(n + 1);
1317
- return !a || !i.includes(".") ? null : `${a}@${i}`;
1381
+ const r = t.slice(0, n).split("+")[0], i = t.slice(n + 1);
1382
+ return !r || !i.includes(".") ? null : `${r}@${i}`;
1318
1383
  }
1319
- function On(e) {
1320
- const t = re(e);
1384
+ function zn(e) {
1385
+ const t = ue(e);
1321
1386
  return t ? t.slice(t.lastIndexOf("@") + 1) : null;
1322
1387
  }
1323
- const ze = /* @__PURE__ */ new Set([
1388
+ const rt = /* @__PURE__ */ new Set([
1324
1389
  "co.uk",
1325
1390
  "org.uk",
1326
1391
  "gov.uk",
@@ -1330,14 +1395,14 @@ const ze = /* @__PURE__ */ new Set([
1330
1395
  "com.br",
1331
1396
  "co.za"
1332
1397
  ]);
1333
- function Ye(e) {
1398
+ function at(e) {
1334
1399
  if (!e) return null;
1335
1400
  const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
1336
1401
  if (t.length < 2) return null;
1337
1402
  const n = t.slice(-2).join(".");
1338
- return ze.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
1403
+ return rt.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
1339
1404
  }
1340
- const qe = /* @__PURE__ */ new Set([
1405
+ const ot = /* @__PURE__ */ new Set([
1341
1406
  "gmail.com",
1342
1407
  "googlemail.com",
1343
1408
  "outlook.com",
@@ -1382,44 +1447,44 @@ const qe = /* @__PURE__ */ new Set([
1382
1447
  "proximus.be",
1383
1448
  "scarlet.be"
1384
1449
  ]);
1385
- function $n(e) {
1386
- const t = Ye(e);
1387
- return t ? qe.has(t) : !1;
1450
+ function Yn(e) {
1451
+ const t = at(e);
1452
+ return t ? ot.has(t) : !1;
1388
1453
  }
1389
- function Rn(e) {
1454
+ function qn(e) {
1390
1455
  if (!e) return !1;
1391
1456
  const t = e.trim().toLowerCase();
1392
1457
  return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
1393
1458
  }
1394
- function wn(e, t, n) {
1459
+ function Jn(e, t, n) {
1395
1460
  if (!e || !t) return null;
1396
- const a = e.trim().toLowerCase();
1397
- if (a === "tel" || a === "sms" || a === "whatsapp") {
1398
- const r = F(t, n);
1399
- return r ? `tel:${r}` : null;
1461
+ const r = e.trim().toLowerCase();
1462
+ if (r === "tel" || r === "sms" || r === "whatsapp") {
1463
+ const a = Y(t, n);
1464
+ return a ? `tel:${a}` : null;
1400
1465
  }
1401
- if (a === "fax") {
1402
- const r = F(t, n);
1403
- return r ? `fax:${r}` : null;
1466
+ if (r === "fax") {
1467
+ const a = Y(t, n);
1468
+ return a ? `fax:${a}` : null;
1404
1469
  }
1405
- if (a === "mailto" || a === "email") {
1406
- const r = re(t);
1407
- return r ? `mailto:${r}` : null;
1470
+ if (r === "mailto" || r === "email") {
1471
+ const a = ue(t);
1472
+ return a ? `mailto:${a}` : null;
1408
1473
  }
1409
1474
  const i = t.trim().toLowerCase();
1410
- return i ? `${a}:${i}` : null;
1475
+ return i ? `${r}:${i}` : null;
1411
1476
  }
1412
- const Je = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, Qe = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
1413
- function Dn(e) {
1477
+ const st = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, lt = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
1478
+ function Qn(e) {
1414
1479
  if (typeof e != "string" || !e) return "";
1415
1480
  let t = e;
1416
1481
  return t = t.replace(/```[a-z]*\n?/gi, "").replace(/~~~[a-z]*\n?/gi, ""), t = t.replace(/!\[([^\]]*)\]\([^)]*\)/g, "$1"), t = t.replace(/\[([^\]]*)\]\([^)]*\)/g, "$1"), t = t.replace(/\[([^\]]*)\]\[[^\]]*\]/g, "$1"), t = t.replace(/<((?:https?|mailto):[^>\s]+)>/gi, "$1"), t = t.split(`
1417
1482
  `).map(
1418
1483
  (n) => n.replace(/^\s{0,3}#{1,6}\s+/, "").replace(/^\s{0,3}>\s?/, "").replace(/^\s*[-*+]\s+/, "").replace(/^\s*\d+[.)]\s+/, "").replace(/^\s*(?:[-*_]\s*){3,}$/, "")
1419
1484
  ).join(`
1420
- `), t = t.replace(Je, "$2"), t = t.replace(Qe, "$2"), t = t.replace(/~~(?=\S)([\s\S]*?\S)~~/g, "$1"), t = t.replace(/`([^`\n]+)`/g, "$1"), t.replace(/\s+/g, " ").trim();
1485
+ `), t = t.replace(st, "$2"), t = t.replace(lt, "$2"), t = t.replace(/~~(?=\S)([\s\S]*?\S)~~/g, "$1"), t = t.replace(/`([^`\n]+)`/g, "$1"), t.replace(/\s+/g, " ").trim();
1421
1486
  }
1422
- const Ze = [
1487
+ const ct = [
1423
1488
  /<blockquote/i,
1424
1489
  /class="?gmail_quote/i,
1425
1490
  // Gmail quote container
@@ -1432,17 +1497,17 @@ const Ze = [
1432
1497
  // Outlook underscore separator before "From:"
1433
1498
  /\bOn\b[\s\S]{0,200}?\bwrote:/i
1434
1499
  // Gmail "On <date> <name> wrote:"
1435
- ], X = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, et = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
1436
- function tt(e) {
1500
+ ], q = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, ut = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
1501
+ function pt(e) {
1437
1502
  const t = e.split(`
1438
1503
  `);
1439
1504
  for (let n = 0; n < t.length; n++)
1440
- if (et.test(t[n]) || X.test(t[n]) && t.slice(n + 1, n + 4).some((a) => X.test(a)))
1505
+ if (ut.test(t[n]) || q.test(t[n]) && t.slice(n + 1, n + 4).some((r) => q.test(r)))
1441
1506
  return t.slice(0, n).join(`
1442
1507
  `).trim();
1443
1508
  return e;
1444
1509
  }
1445
- function W(e) {
1510
+ function J(e) {
1446
1511
  let t = e;
1447
1512
  return t = t.replace(/<(script|style)[\s\S]*?<\/\1>/gi, ""), t = t.replace(/<br\s*\/?>/gi, `
1448
1513
  `), t = t.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
@@ -1450,38 +1515,38 @@ function W(e) {
1450
1515
  `), t = t.replace(/<\/(div|li|tr)>/gi, `
1451
1516
  `), t = t.replace(/<\/(td|th)>/gi, " "), t = t.replace(/<[^>]+>/g, ""), t = t.replace(/<[^>]*$/, ""), t;
1452
1517
  }
1453
- function z(e) {
1518
+ function Q(e) {
1454
1519
  return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
1455
1520
  }
1456
- function Y(e) {
1457
- return e.replace(/&nbsp;/gi, " ").replace(/&lt;/gi, "<").replace(/&gt;/gi, ">").replace(/&quot;/gi, '"').replace(/&#(\d+);/g, (t, n) => z(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => z(parseInt(n, 16)) ?? t).replace(/&amp;/gi, "&");
1521
+ function Z(e) {
1522
+ return e.replace(/&nbsp;/gi, " ").replace(/&lt;/gi, "<").replace(/&gt;/gi, ">").replace(/&quot;/gi, '"').replace(/&#(\d+);/g, (t, n) => Q(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => Q(parseInt(n, 16)) ?? t).replace(/&amp;/gi, "&");
1458
1523
  }
1459
- function q(e) {
1524
+ function ee(e) {
1460
1525
  return e.replace(/\r/g, "").replace(/[ \t]+/g, " ").replace(/ *\n */g, `
1461
1526
  `).replace(/\n{3,}/g, `
1462
1527
 
1463
1528
  `).trim();
1464
1529
  }
1465
- function Pn(e) {
1530
+ function Zn(e) {
1466
1531
  if (typeof e != "string" || !e) return "";
1467
1532
  let t = e.length;
1468
- for (const r of Ze) {
1469
- const o = e.search(r);
1533
+ for (const a of ct) {
1534
+ const o = e.search(a);
1470
1535
  o >= 0 && o < t && (t = o);
1471
1536
  }
1472
1537
  const n = e.slice(0, t);
1473
- let a = q(Y(W(n)));
1474
- return a || (a = q(Y(W(e)))), tt(a) || a;
1538
+ let r = ee(Z(J(n)));
1539
+ return r || (r = ee(Z(J(e)))), pt(r) || r;
1475
1540
  }
1476
- const nt = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, it = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
1477
- function Un(e, t) {
1478
- return !!(e && nt.test(e) || t && it.test(t));
1541
+ const dt = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, ft = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
1542
+ function ei(e, t) {
1543
+ return !!(e && dt.test(e) || t && ft.test(t));
1479
1544
  }
1480
- const at = 3, rt = 600;
1481
- function Kn(e, t) {
1482
- return e >= at || t >= rt;
1545
+ const mt = 3, gt = 600;
1546
+ function ti(e, t) {
1547
+ return e >= mt || t >= gt;
1483
1548
  }
1484
- const ot = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), st = /* @__PURE__ */ new Set([
1549
+ const ht = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), yt = /* @__PURE__ */ new Set([
1485
1550
  "text/plain",
1486
1551
  "text/markdown",
1487
1552
  "text/csv",
@@ -1490,77 +1555,77 @@ const ot = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "ima
1490
1555
  "application/xml",
1491
1556
  "text/xml"
1492
1557
  ]);
1493
- function lt(e) {
1558
+ function bt(e) {
1494
1559
  const t = (e ?? "").trim().toLowerCase().split(";")[0];
1495
- return t ? ot.has(t) ? "image" : t === "application/pdf" ? "pdf" : st.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
1496
- }
1497
- const g = 1024 * 1024, ct = {
1498
- image: 5 * g,
1499
- pdf: 20 * g,
1500
- text: 1 * g,
1501
- audio: 20 * g
1502
- }, Gn = 25 * g, Bn = 5;
1503
- function Hn(e, t) {
1504
- const n = lt(e);
1505
- return n === "unsupported" ? "unsupported" : t > ct[n] ? "too-large" : null;
1506
- }
1507
- function ut(e, t) {
1508
- const n = new Set(e.disabledIntents ?? []), a = e.intentOverrides ?? {}, i = t.intents.filter((o) => !n.has(o.intent)).map((o) => dt(o, a[o.intent]));
1560
+ return t ? ht.has(t) ? "image" : t === "application/pdf" ? "pdf" : yt.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
1561
+ }
1562
+ const h = 1024 * 1024, At = {
1563
+ image: 5 * h,
1564
+ pdf: 20 * h,
1565
+ text: 1 * h,
1566
+ audio: 20 * h
1567
+ }, ni = 25 * h, ii = 5;
1568
+ function ri(e, t) {
1569
+ const n = bt(e);
1570
+ return n === "unsupported" ? "unsupported" : t > At[n] ? "too-large" : null;
1571
+ }
1572
+ function Et(e, t) {
1573
+ const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, i = t.intents.filter((o) => !n.has(o.intent)).map((o) => Tt(o, r[o.intent]));
1509
1574
  if (!e.extraIntents || e.extraIntents.length === 0) return i;
1510
- const r = new Set(i.map((o) => o.intent));
1575
+ const a = new Set(i.map((o) => o.intent));
1511
1576
  for (const o of e.extraIntents)
1512
- r.has(o.intent) || (i.push(o), r.add(o.intent));
1577
+ a.has(o.intent) || (i.push(o), a.add(o.intent));
1513
1578
  return i;
1514
1579
  }
1515
- function pt(e, t) {
1580
+ function _t(e, t) {
1516
1581
  const n = {};
1517
- for (const a of e.intents) {
1518
- if (!a.togglable) continue;
1519
- const i = t?.[a.intent];
1520
- n[a.intent] = i ?? a.defaultEnabled ?? !0;
1582
+ for (const r of e.intents) {
1583
+ if (!r.togglable) continue;
1584
+ const i = t?.[r.intent];
1585
+ n[r.intent] = i ?? r.defaultEnabled ?? !0;
1521
1586
  }
1522
1587
  return n;
1523
1588
  }
1524
- function jn(e, t) {
1525
- const n = pt(e, t);
1526
- return Object.entries(n).filter(([, a]) => !a).map(([a]) => a);
1589
+ function ai(e, t) {
1590
+ const n = _t(e, t);
1591
+ return Object.entries(n).filter(([, r]) => !r).map(([r]) => r);
1527
1592
  }
1528
- function dt(e, t) {
1593
+ function Tt(e, t) {
1529
1594
  return t ? {
1530
1595
  intent: t.intent ?? e.intent,
1531
1596
  targetSchemes: t.targetSchemes ?? e.targetSchemes,
1532
1597
  transport: t.transport ?? e.transport
1533
1598
  } : e;
1534
1599
  }
1535
- function Vn(e, t) {
1600
+ function oi(e, t) {
1536
1601
  const n = [];
1537
- for (const a of e) {
1538
- if (!a.enabled) continue;
1539
- const i = t[a.providerId];
1602
+ for (const r of e) {
1603
+ if (!r.enabled) continue;
1604
+ const i = t[r.providerId];
1540
1605
  if (i)
1541
- for (const r of ut(a, i))
1542
- n.push({ channel: a, description: i, capability: r });
1606
+ for (const a of Et(r, i))
1607
+ n.push({ channel: r, description: i, capability: a });
1543
1608
  }
1544
1609
  return n;
1545
1610
  }
1546
- function Fn(e, t) {
1611
+ function si(e, t) {
1547
1612
  return t.filter((n) => n.capability.intent === e);
1548
1613
  }
1549
- function ft(e, t) {
1614
+ function It(e, t) {
1550
1615
  return t.filter((n) => n.capability.targetSchemes.includes(e));
1551
1616
  }
1552
- function Xn(e, t) {
1553
- return ft(e.scheme, t);
1617
+ function li(e, t) {
1618
+ return It(e.scheme, t);
1554
1619
  }
1555
- function Wn(e, t, n) {
1556
- const a = [];
1620
+ function ci(e, t, n) {
1621
+ const r = [];
1557
1622
  for (const i of e)
1558
- for (const r of n)
1559
- r.capability.intent === t && r.capability.targetSchemes.includes(i.scheme) && a.push({ channelIntent: r, endpoint: i });
1560
- return a;
1623
+ for (const a of n)
1624
+ a.capability.intent === t && a.capability.targetSchemes.includes(i.scheme) && r.push({ channelIntent: a, endpoint: i });
1625
+ return r;
1561
1626
  }
1562
- var mt = /* @__PURE__ */ ((e) => (e.MAILTO = "mailto", e.SIP = "sip", e.TEL = "tel", e.WEBHOOK = "webhook", e.USERNAME = "username", e.ID = "id", e.CUSTOM = "custom", e.URL = "url", e.TELEGRAM = "telegram", e.WHATSAPP = "whatsapp", e.MESSENGER = "messenger", e.INSTAGRAM = "instagram", e.VIBER = "viber", e.SMS = "sms", e.FAX = "fax", e.TEAMS = "teams", e.CALENDAR = "calendar", e))(mt || {});
1563
- const gt = {
1627
+ var St = /* @__PURE__ */ ((e) => (e.MAILTO = "mailto", e.SIP = "sip", e.TEL = "tel", e.WEBHOOK = "webhook", e.USERNAME = "username", e.ID = "id", e.CUSTOM = "custom", e.URL = "url", e.TELEGRAM = "telegram", e.WHATSAPP = "whatsapp", e.MESSENGER = "messenger", e.INSTAGRAM = "instagram", e.VIBER = "viber", e.SMS = "sms", e.FAX = "fax", e.TEAMS = "teams", e.CALENDAR = "calendar", e))(St || {});
1628
+ const Mt = {
1564
1629
  mailto: "mail",
1565
1630
  sip: "tel",
1566
1631
  tel: "tel",
@@ -1582,10 +1647,10 @@ const gt = {
1582
1647
  id: "note",
1583
1648
  custom: "note"
1584
1649
  };
1585
- function zn(e) {
1586
- return e ? gt[e] ?? "note" : "note";
1650
+ function ui(e) {
1651
+ return e ? Mt[e] ?? "note" : "note";
1587
1652
  }
1588
- const Yn = "message_window", qn = "message_templates", Jn = {
1653
+ const pi = "message_window", di = "message_templates", fi = {
1589
1654
  // E-mail
1590
1655
  FROM: "from",
1591
1656
  TO: "to",
@@ -1602,226 +1667,240 @@ const Yn = "message_window", qn = "message_templates", Jn = {
1602
1667
  // Voice/conference
1603
1668
  HOST: "host",
1604
1669
  PARTICIPANT: "participant"
1605
- }, Qn = (e, t) => ({ intent: e, ...t }), Zn = "folder_management", ei = "remote_search", ti = { ok: !1, code: "UNSUPPORTED", message: "Provider does not support this op" }, oe = "auth";
1606
- function se(e) {
1670
+ }, mi = (e, t) => ({ intent: e, ...t }), gi = "folder_management", hi = "remote_search", yi = { ok: !1, code: "UNSUPPORTED", message: "Provider does not support this op" }, pe = "auth";
1671
+ function de(e) {
1607
1672
  const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
1608
1673
  return t ? t[1] : null;
1609
1674
  }
1610
- function ni(e) {
1611
- const t = se(e);
1612
- return t ? t !== oe : typeof e == "string" && e.startsWith("/wake");
1675
+ function bi(e) {
1676
+ const t = de(e);
1677
+ return t ? t !== pe : typeof e == "string" && e.startsWith("/wake");
1613
1678
  }
1614
- function ii(e) {
1615
- return typeof e != "string" || e === "" || e === "/" ? !0 : se(e) === oe;
1679
+ function Ai(e) {
1680
+ return typeof e != "string" || e === "" || e === "/" ? !0 : de(e) === pe;
1616
1681
  }
1617
- function ht(e) {
1682
+ function Ct(e) {
1618
1683
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1619
1684
  }
1620
- function yt(e) {
1621
- const n = e.split("/").filter(Boolean).map((a) => a.startsWith(":") ? a.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : "/" + ht(a)).join("");
1685
+ function xt(e) {
1686
+ const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : "/" + Ct(r)).join("");
1622
1687
  return new RegExp(`^${n}\\/?$`);
1623
1688
  }
1624
- function bt(e, t) {
1625
- const n = e.split("/").filter(Boolean), a = t.split("/").filter(Boolean), i = {};
1626
- return n.forEach((r, o) => {
1627
- if (r.startsWith(":")) {
1628
- const s = r.endsWith("?") ? r.slice(1, -1) : r.slice(1), l = a[o];
1689
+ function Nt(e, t) {
1690
+ const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean), i = {};
1691
+ return n.forEach((a, o) => {
1692
+ if (a.startsWith(":")) {
1693
+ const s = a.endsWith("?") ? a.slice(1, -1) : a.slice(1), l = r[o];
1629
1694
  l && (i[s] = l);
1630
1695
  }
1631
1696
  }), i;
1632
1697
  }
1633
- function At(e) {
1698
+ function kt(e) {
1634
1699
  return e.publicBasePath ?? `/apps/${e.name}`;
1635
1700
  }
1636
- function ai(e) {
1701
+ function Ei(e) {
1637
1702
  const t = [];
1638
1703
  for (const n of e) {
1639
1704
  if (!n?.name) continue;
1640
- const a = At(n);
1705
+ const r = kt(n);
1641
1706
  for (const i of n.routes ?? []) {
1642
1707
  if (!i.public) continue;
1643
- const r = i.path === "/" ? "" : i.path;
1708
+ const a = i.path === "/" ? "" : i.path;
1644
1709
  t.push({
1645
1710
  appName: n.name,
1646
1711
  resource: i.resource,
1647
- pattern: `${a}${r}`,
1712
+ pattern: `${r}${a}`,
1648
1713
  props: i.props
1649
1714
  });
1650
1715
  }
1651
1716
  }
1652
1717
  return t;
1653
1718
  }
1654
- function Et(e, t) {
1655
- const n = e.split("/").filter(Boolean), a = t.split("/").filter(Boolean);
1656
- for (let i = 0; i < Math.min(n.length, a.length); i++) {
1657
- const r = n[i].startsWith(":"), o = a[i].startsWith(":");
1658
- if (r !== o) return o;
1719
+ function vt(e, t) {
1720
+ const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
1721
+ for (let i = 0; i < Math.min(n.length, r.length); i++) {
1722
+ const a = n[i].startsWith(":"), o = r[i].startsWith(":");
1723
+ if (a !== o) return o;
1659
1724
  }
1660
- return n.length > a.length;
1725
+ return n.length > r.length;
1661
1726
  }
1662
- function _t(e, t) {
1727
+ function Ot(e, t) {
1663
1728
  if (typeof e != "string") return null;
1664
1729
  let n = null;
1665
- for (const a of t)
1666
- yt(a.pattern).test(e) && (!n || Et(a.pattern, n.pattern)) && (n = a);
1667
- return n ? { ...n, params: { ...n.props, ...bt(n.pattern, e) } } : null;
1730
+ for (const r of t)
1731
+ xt(r.pattern).test(e) && (!n || vt(r.pattern, n.pattern)) && (n = r);
1732
+ return n ? { ...n, params: { ...n.props, ...Nt(n.pattern, e) } } : null;
1668
1733
  }
1669
- function ri(e, t) {
1670
- return _t(e, t) !== null;
1734
+ function _i(e, t) {
1735
+ return Ot(e, t) !== null;
1671
1736
  }
1672
- const oi = 9e4, si = "installation-id";
1737
+ const Ti = 9e4, Ii = "installation-id";
1673
1738
  export {
1674
1739
  m as ACTIVITY_CATALOG,
1675
- ct as AI_ATTACHMENT_LIMITS,
1676
- Bn as AI_ATTACHMENT_MAX_PER_TURN,
1677
- Gn as AI_ATTACHMENT_TURN_BUDGET,
1678
- ae as AI_VENDORS,
1679
- Se as ALLOWED_LINK_SCHEMES,
1680
- w as ARTIFACT_MAX_BLOCKS,
1681
- Vt as ARTIFACT_MAX_BODY_BYTES,
1682
- M as ARTIFACT_MAX_CELL_LEN,
1683
- K as ARTIFACT_MAX_KPI_ITEMS,
1684
- D as ARTIFACT_MAX_LIST_ITEMS,
1685
- U as ARTIFACT_MAX_TABLE_COLUMNS,
1686
- P as ARTIFACT_MAX_TABLE_ROWS,
1687
- Q as ARTIFACT_MAX_TEXT_LEN,
1688
- oe as AUTH_APP_NAME,
1689
- me as ActivityTypeRegistry,
1690
- Dt as BUILT_IN_ONLY,
1691
- en as CLASSIFY_VARS,
1692
- Gt as CORE_DIMENSIONS,
1693
- mt as CommunicationScheme,
1694
- vn as DEFAULT_MEMORY_BUDGET,
1695
- je as DEFAULT_PHONE_REGION,
1696
- Zn as FEATURE_FOLDER_MANAGEMENT,
1697
- ei as FEATURE_REMOTE_SEARCH,
1698
- si as INSTALLATION_HEADER,
1699
- Jn as InteractionParticipantRole,
1700
- Ke as KB_FALLBACK_LOCALE,
1701
- Mt as MAX_ACTIONS,
1702
- Tt as MAX_BLOCKS,
1703
- ne as MAX_COLLECTION_DEPTH,
1704
- It as MAX_FIELDS,
1705
- St as MAX_LIST_ITEMS,
1706
- Nn as MAX_MEMORY_BUDGET,
1707
- Mn as MAX_MEMORY_CHARS,
1708
- Cn as MIN_MEMORY_BUDGET,
1709
- we as PAUSED_RUN_STATUSES,
1740
+ At as AI_ATTACHMENT_LIMITS,
1741
+ ii as AI_ATTACHMENT_MAX_PER_TURN,
1742
+ ni as AI_ATTACHMENT_TURN_BUDGET,
1743
+ ce as AI_VENDORS,
1744
+ ke as ALLOWED_LINK_SCHEMES,
1745
+ P as ARTIFACT_MAX_BLOCKS,
1746
+ en as ARTIFACT_MAX_BODY_BYTES,
1747
+ C as ARTIFACT_MAX_CELL_LEN,
1748
+ G as ARTIFACT_MAX_KPI_ITEMS,
1749
+ U as ARTIFACT_MAX_LIST_ITEMS,
1750
+ B as ARTIFACT_MAX_TABLE_COLUMNS,
1751
+ K as ARTIFACT_MAX_TABLE_ROWS,
1752
+ ne as ARTIFACT_MAX_TEXT_LEN,
1753
+ pe as AUTH_APP_NAME,
1754
+ Ae as ActivityTypeRegistry,
1755
+ Xt as BUILT_IN_ONLY,
1756
+ pn as CLASSIFY_VARS,
1757
+ qt as CORE_DIMENSIONS,
1758
+ St as CommunicationScheme,
1759
+ jn as DEFAULT_MEMORY_BUDGET,
1760
+ Ze as DEFAULT_PHONE_REGION,
1761
+ gi as FEATURE_FOLDER_MANAGEMENT,
1762
+ hi as FEATURE_REMOTE_SEARCH,
1763
+ Ii as INSTALLATION_HEADER,
1764
+ fi as InteractionParticipantRole,
1765
+ je as KB_FALLBACK_LOCALE,
1766
+ V as KB_LOCALES,
1767
+ wt as MAX_ACTIONS,
1768
+ Lt as MAX_BLOCKS,
1769
+ se as MAX_COLLECTION_DEPTH,
1770
+ $t as MAX_FIELDS,
1771
+ Rt as MAX_LIST_ITEMS,
1772
+ Bn as MAX_MEMORY_BROWSE,
1773
+ Hn as MAX_MEMORY_BUDGET,
1774
+ Gn as MAX_MEMORY_CHARS,
1775
+ We as MAX_TOPIC_CANDIDATES,
1776
+ Xe as MAX_TOPIC_EXAMPLES,
1777
+ x as MAX_TOPIC_EXAMPLE_CHARS,
1778
+ Fn as MIN_MEMORY_BUDGET,
1779
+ Be as PAUSED_RUN_STATUSES,
1710
1780
  v as PHONE_REGIONS,
1711
- oi as PRESENCE_ONLINE_WINDOW_MS,
1712
- qn as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
1713
- Yn as PROVIDER_FEATURE_MESSAGE_WINDOW,
1714
- qe as PUBLIC_EMAIL_DOMAINS,
1715
- He as RELATED_SUBJECT_KINDS,
1716
- yn as SIGNATURE_INTENTS,
1717
- rt as SUMMARY_MIN_LAST_CHARS,
1718
- at as SUMMARY_MIN_MESSAGES,
1719
- Re as TERMINAL_RUN_STATUSES,
1720
- Zt as TRIGGER_VARS,
1721
- ti as UNSUPPORTED,
1722
- Ee as USAGE_DIMENSIONS,
1723
- _e as USAGE_DIMENSION_IDS,
1724
- $e as actingIdentityKey,
1725
- Nt as activityIconOf,
1726
- wt as activityJoinUrl,
1727
- pe as activitySnippet,
1728
- de as activityTextParams,
1729
- Rt as activityTimelineText,
1730
- Kt as activityTimestamp,
1781
+ Ti as PRESENCE_ONLINE_WINDOW_MS,
1782
+ di as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
1783
+ pi as PROVIDER_FEATURE_MESSAGE_WINDOW,
1784
+ ot as PUBLIC_EMAIL_DOMAINS,
1785
+ Qe as RELATED_SUBJECT_KINDS,
1786
+ Ln as SIGNATURE_INTENTS,
1787
+ gt as SUMMARY_MIN_LAST_CHARS,
1788
+ mt as SUMMARY_MIN_MESSAGES,
1789
+ Ke as TERMINAL_RUN_STATUSES,
1790
+ un as TRIGGER_VARS,
1791
+ yi as UNSUPPORTED,
1792
+ Me as USAGE_DIMENSIONS,
1793
+ Ce as USAGE_DIMENSION_IDS,
1794
+ Mn as acceptExampleCandidate,
1795
+ Ue as actingIdentityKey,
1796
+ Pt as activityIconOf,
1797
+ Vt as activityJoinUrl,
1798
+ he as activitySnippet,
1799
+ ye as activityTextParams,
1800
+ jt as activityTimelineText,
1801
+ Yt as activityTimestamp,
1731
1802
  f as activityTypeInfo,
1732
- an as actorKey,
1733
- lt as aiAttachmentKind,
1734
- Hn as aiAttachmentRejection,
1735
- hn as aiVendorAcceptsAttachment,
1736
- fn as aiVendorDefaultModel,
1737
- dn as aiVendorLabel,
1738
- gn as aiVendorNeedsBaseUrl,
1739
- mn as aiVendorsWith,
1740
- se as appNameFromPath,
1741
- bn as applySignature,
1742
- Xt as artifactBodyBytes,
1743
- Wt as artifactOutline,
1744
- zt as artifactToMarkdown,
1745
- Pt as buildActivityPreview,
1746
- Vn as buildChannelIntents,
1747
- Yt as buildShareKeys,
1748
- cn as canNestUnder,
1749
- kt as carriesText,
1750
- pn as categoryLabel,
1751
- zn as channelKindForScheme,
1752
- vt as channelKindOf,
1753
- Pn as cleanMessageText,
1754
- Ge as defaultLocaleOf,
1755
- Qn as defineIntent,
1756
- Pe as depthOf,
1757
- jn as disabledIntentsFromCapabilities,
1758
- On as emailDomain,
1759
- wn as endpointKey,
1760
- bt as extractParams,
1761
- Xn as filterByEndpoint,
1762
- Fn as filterByIntent,
1763
- ft as filterByTargetScheme,
1764
- E as findAiVendor,
1765
- Bt as flattenLocales,
1766
- ye as floorToPeriod,
1767
- Oe as formatActingIdentity,
1768
- he as formatPeriod,
1769
- Ut as getActivitySeenUserIds,
1770
- An as getContactEndpoints,
1771
- In as getShortTitle,
1772
- Tn as getUrgencyScore,
1773
- ie as heightOf,
1774
- ln as helpCenterText,
1775
- Qt as humanizeAction,
1776
- En as isAssigned,
1777
- _n as isClosed,
1778
- ni as isDeepLink,
1779
- Ue as isDescendant,
1780
- Sn as isInteractionUnseen,
1781
- ii as isLandingPath,
1782
- Un as isLikelyBulk,
1783
- xt as isMessageType,
1784
- Et as isMoreSpecificPattern,
1785
- on as isPaused,
1786
- $t as isPlaybookAuthoredType,
1787
- $n as isPublicEmailDomain,
1788
- ri as isPublicPath,
1789
- Lt as isReplyableType,
1790
- rn as isRetryable,
1791
- De as isTerminal,
1792
- Kn as isThreadLongEnough,
1793
- sn as linkLabel,
1794
- un as localesOf,
1795
- Ln as looksLikeEmail,
1796
- Wn as matchContactToIntents,
1797
- _t as matchPublicRoute,
1798
- Ot as messageCountsAs,
1799
- Rn as needsPhoneRegion,
1800
- Ft as normalizeArtifactBlocks,
1801
- Ct as normalizeBlocks,
1802
- re as normalizeEmail,
1803
- tn as parseActingIdentity,
1804
- yt as pathToRegex,
1805
- Ht as periodsInRange,
1806
- kn as phoneSuffix,
1807
- Dn as plainTextFromMarkdown,
1808
- nn as playbookActor,
1809
- At as publicBasePathFor,
1810
- ai as publicRoutePatterns,
1811
- C as readPath,
1812
- Ye as registrableDomain,
1813
- xn as relatedByDefault,
1814
- pt as resolveAccountCapabilities,
1815
- N as resolveActivityText,
1816
- ut as resolveChannelIntents,
1817
- Be as resolveSignature,
1818
- ve as sanitizeInline,
1819
- te as shareKeyForTeam,
1820
- ee as shareKeyForUser,
1821
- qt as shareKeysForViewer,
1822
- ue as stripHtml,
1823
- F as toE164,
1824
- Jt as toolSourceKinds,
1825
- Te as usageMetricId,
1826
- jt as usageMetrics
1803
+ mn as actorKey,
1804
+ Sn as addExampleCandidate,
1805
+ bt as aiAttachmentKind,
1806
+ ri as aiAttachmentRejection,
1807
+ On as aiVendorAcceptsAttachment,
1808
+ Nn as aiVendorDefaultModel,
1809
+ xn as aiVendorLabel,
1810
+ vn as aiVendorNeedsBaseUrl,
1811
+ kn as aiVendorsWith,
1812
+ de as appNameFromPath,
1813
+ $n as applySignature,
1814
+ nn as artifactBodyBytes,
1815
+ rn as artifactOutline,
1816
+ an as artifactToMarkdown,
1817
+ Wt as buildActivityPreview,
1818
+ oi as buildChannelIntents,
1819
+ on as buildShareKeys,
1820
+ _n as canNestUnder,
1821
+ Gt as carriesText,
1822
+ In as categoryLabel,
1823
+ ui as channelKindForScheme,
1824
+ Ut as channelKindOf,
1825
+ Zn as cleanMessageText,
1826
+ Ve as defaultLocaleOf,
1827
+ mi as defineIntent,
1828
+ Fe as depthOf,
1829
+ ai as disabledIntentsFromCapabilities,
1830
+ zn as emailDomain,
1831
+ Jn as endpointKey,
1832
+ Nt as extractParams,
1833
+ li as filterByEndpoint,
1834
+ si as filterByIntent,
1835
+ It as filterByTargetScheme,
1836
+ _ as findAiVendor,
1837
+ Jt as flattenLocales,
1838
+ Te as floorToPeriod,
1839
+ Pe as formatActingIdentity,
1840
+ _e as formatPeriod,
1841
+ zt as getActivitySeenUserIds,
1842
+ Rn as getContactEndpoints,
1843
+ Un as getShortTitle,
1844
+ Pn as getUrgencyScore,
1845
+ le as heightOf,
1846
+ bn as helpCenterText,
1847
+ cn as humanizeAction,
1848
+ wn as isAssigned,
1849
+ Dn as isClosed,
1850
+ bi as isDeepLink,
1851
+ He as isDescendant,
1852
+ Kn as isInteractionUnseen,
1853
+ Ai as isLandingPath,
1854
+ ei as isLikelyBulk,
1855
+ Kt as isMessageType,
1856
+ vt as isMoreSpecificPattern,
1857
+ hn as isPaused,
1858
+ Ht as isPlaybookAuthoredType,
1859
+ Yn as isPublicEmailDomain,
1860
+ _i as isPublicPath,
1861
+ Bt as isReplyableType,
1862
+ gn as isRetryable,
1863
+ Ge as isTerminal,
1864
+ ti as isThreadLongEnough,
1865
+ yn as linkLabel,
1866
+ En as localeInstruction,
1867
+ An as localeName,
1868
+ Tn as localesOf,
1869
+ Xn as looksLikeEmail,
1870
+ ci as matchContactToIntents,
1871
+ Ot as matchPublicRoute,
1872
+ Ft as messageCountsAs,
1873
+ qn as needsPhoneRegion,
1874
+ tn as normalizeArtifactBlocks,
1875
+ Dt as normalizeBlocks,
1876
+ ue as normalizeEmail,
1877
+ g as normalizeExample,
1878
+ dn as parseActingIdentity,
1879
+ xt as pathToRegex,
1880
+ Qt as periodsInRange,
1881
+ Wn as phoneSuffix,
1882
+ Qn as plainTextFromMarkdown,
1883
+ fn as playbookActor,
1884
+ kt as publicBasePathFor,
1885
+ Ei as publicRoutePatterns,
1886
+ N as readPath,
1887
+ at as registrableDomain,
1888
+ Ye as rejectExampleCandidate,
1889
+ Vn as relatedByDefault,
1890
+ _t as resolveAccountCapabilities,
1891
+ k as resolveActivityText,
1892
+ Et as resolveChannelIntents,
1893
+ Je as resolveSignature,
1894
+ $e as sanitizeInline,
1895
+ ae as shareKeyForTeam,
1896
+ re as shareKeyForUser,
1897
+ sn as shareKeysForViewer,
1898
+ ge as stripHtml,
1899
+ Y as toE164,
1900
+ ln as toolSourceKinds,
1901
+ qe as topicOfferedForTeam,
1902
+ Cn as topicsForTeam,
1903
+ ze as truncateExample,
1904
+ xe as usageMetricId,
1905
+ Zt as usageMetrics
1827
1906
  };