@opencxh/domain 1.172.1 → 1.173.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.
Files changed (84) hide show
  1. package/dist/entities/activity/blocks.d.ts +30 -30
  2. package/dist/entities/activity/catalog.d.ts +63 -86
  3. package/dist/entities/activity/descriptor.d.ts +31 -32
  4. package/dist/entities/activity/index.d.ts +2 -2
  5. package/dist/entities/activity/preview.d.ts +7 -7
  6. package/dist/entities/activity/resolve.d.ts +37 -38
  7. package/dist/entities/activity/types.d.ts +64 -35
  8. package/dist/entities/ai-account/types.d.ts +3 -3
  9. package/dist/entities/ai-account/vendors.d.ts +25 -32
  10. package/dist/entities/ai-budget/types.d.ts +5 -5
  11. package/dist/entities/ai-conversation/types.d.ts +12 -12
  12. package/dist/entities/ai-profile/types.d.ts +14 -21
  13. package/dist/entities/ai-settings/types.d.ts +12 -13
  14. package/dist/entities/analytics/index.d.ts +4 -4
  15. package/dist/entities/analytics/source.d.ts +1 -1
  16. package/dist/entities/analytics/usage.d.ts +23 -28
  17. package/dist/entities/artifact/blocks.d.ts +54 -69
  18. package/dist/entities/artifact/markdown.d.ts +2 -3
  19. package/dist/entities/artifact/types.d.ts +46 -54
  20. package/dist/entities/assignment/types.d.ts +76 -90
  21. package/dist/entities/channel/index.d.ts +1 -1
  22. package/dist/entities/channel/signature.d.ts +8 -9
  23. package/dist/entities/communication/index.d.ts +1 -1
  24. package/dist/entities/contact/index.d.ts +1 -1
  25. package/dist/entities/custom-field-def/types.d.ts +14 -14
  26. package/dist/entities/external-identity/types.d.ts +45 -50
  27. package/dist/entities/interaction/index.d.ts +1 -1
  28. package/dist/entities/interaction/types.d.ts +44 -47
  29. package/dist/entities/live-lens/types.d.ts +39 -44
  30. package/dist/entities/mcp/types.d.ts +53 -57
  31. package/dist/entities/memory/alias.d.ts +7 -7
  32. package/dist/entities/memory/browse.d.ts +21 -21
  33. package/dist/entities/memory/ingest.d.ts +24 -28
  34. package/dist/entities/memory/item.d.ts +53 -58
  35. package/dist/entities/memory/kind.d.ts +25 -25
  36. package/dist/entities/memory/query.d.ts +49 -51
  37. package/dist/entities/playbook/actor.d.ts +17 -17
  38. package/dist/entities/playbook/assignment.d.ts +54 -63
  39. package/dist/entities/playbook/index.d.ts +2 -2
  40. package/dist/entities/playbook/labels.d.ts +4 -4
  41. package/dist/entities/playbook/trigger-vars.d.ts +17 -15
  42. package/dist/entities/playbook/types.d.ts +174 -303
  43. package/dist/entities/resource-reminder/types.d.ts +8 -9
  44. package/dist/entities/time-entry/duration.d.ts +11 -11
  45. package/dist/entities/time-entry/types.d.ts +59 -59
  46. package/dist/entities/time-entry/work-type.d.ts +21 -24
  47. package/dist/entities/topic/examples.d.ts +26 -27
  48. package/dist/entities/topic/scope.d.ts +11 -12
  49. package/dist/entities/topic/types.d.ts +26 -28
  50. package/dist/entities/user/types.d.ts +24 -28
  51. package/dist/entities/webhook/types.d.ts +6 -6
  52. package/dist/entities/work/activity.d.ts +36 -0
  53. package/dist/entities/work/index.d.ts +1 -0
  54. package/dist/entities/work/keys.d.ts +25 -26
  55. package/dist/entities/work/ladder.d.ts +48 -52
  56. package/dist/entities/work/types.d.ts +108 -114
  57. package/dist/index.cjs +6 -6
  58. package/dist/index.d.ts +29 -28
  59. package/dist/index.js +1416 -1258
  60. package/dist/platform/account.d.ts +34 -38
  61. package/dist/platform/ai-tools.d.ts +48 -52
  62. package/dist/platform/api.d.ts +9 -10
  63. package/dist/platform/author.d.ts +7 -9
  64. package/dist/platform/capabilities.d.ts +3 -3
  65. package/dist/platform/communication.d.ts +163 -204
  66. package/dist/platform/context.d.ts +8 -8
  67. package/dist/platform/identity.d.ts +16 -19
  68. package/dist/platform/kernel.d.ts +1 -1
  69. package/dist/platform/manifest.d.ts +2 -2
  70. package/dist/platform/media.d.ts +13 -15
  71. package/dist/platform/permission.d.ts +39 -0
  72. package/dist/platform/permission.test.d.ts +1 -0
  73. package/dist/platform/presence.d.ts +30 -30
  74. package/dist/platform/provider.d.ts +14 -15
  75. package/dist/platform/resource-source.d.ts +43 -45
  76. package/dist/platform/resource.d.ts +17 -23
  77. package/dist/platform/scope.d.ts +35 -61
  78. package/dist/platform/services.d.ts +4 -4
  79. package/dist/platform/storage.d.ts +1 -1
  80. package/dist/platform/sync-source.d.ts +196 -216
  81. package/dist/platform/transcript-cadence.d.ts +37 -41
  82. package/dist/platform/ui.d.ts +6 -6
  83. package/dist/text/endpoint.d.ts +11 -27
  84. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -1,10 +1,4 @@
1
- function wn(e) {
2
- return e.type === "EMAIL_RECEIVED" || e.type === "EMAIL_SENT";
3
- }
4
- function Nn(e) {
5
- return e.type === "CHAT_MESSAGE_SENT" || e.type === "CHAT_MESSAGE_RECEIVED";
6
- }
7
- const L = 10, T = 10, I = 10, M = 5, we = /* @__PURE__ */ new Set([
1
+ const In = 10, wn = 10, Mn = 10, kn = 5, Ie = /* @__PURE__ */ new Set([
8
2
  "header",
9
3
  "section",
10
4
  "context",
@@ -14,36 +8,36 @@ const L = 10, T = 10, I = 10, M = 5, we = /* @__PURE__ */ new Set([
14
8
  "actions",
15
9
  "attachments"
16
10
  ]);
17
- function C(e) {
11
+ function T(e) {
18
12
  if (typeof e == "string") return e.length > 0;
19
13
  if (!e || typeof e != "object") return !1;
20
14
  const t = e;
21
15
  return typeof t.key == "string" || typeof t.value == "string";
22
16
  }
23
- function vn(e, t = () => {
17
+ function Cn(e, t = () => {
24
18
  }) {
25
19
  if (!Array.isArray(e)) return [];
26
20
  const n = [];
27
21
  for (const r of e) {
28
- if (n.length >= L) {
29
- t("more than " + L + " blocks; the rest was dropped");
22
+ if (n.length >= 10) {
23
+ t("more than 10 blocks; the rest was dropped");
30
24
  break;
31
25
  }
32
26
  if (!r || typeof r != "object") continue;
33
27
  const i = r;
34
- if (!we.has(i.type)) {
28
+ if (!Ie.has(i.type)) {
35
29
  t("unknown block type " + String(i.type));
36
30
  continue;
37
31
  }
38
32
  switch (i.type) {
39
33
  case "header":
40
- if (!C(i.text)) {
34
+ if (!T(i.text)) {
41
35
  t("a header without text");
42
36
  continue;
43
37
  }
44
38
  break;
45
39
  case "context":
46
- if (!C(i.text)) {
40
+ if (!T(i.text)) {
47
41
  t("a context block without text");
48
42
  continue;
49
43
  }
@@ -55,19 +49,19 @@ function vn(e, t = () => {
55
49
  }
56
50
  break;
57
51
  case "section":
58
- Array.isArray(i.fields) && i.fields.length > T && (t("more than " + T + " fields in a section"), i.fields = i.fields.slice(0, T));
52
+ Array.isArray(i.fields) && i.fields.length > 10 && (t("more than 10 fields in a section"), i.fields = i.fields.slice(0, 10));
59
53
  break;
60
54
  case "list":
61
55
  if (!Array.isArray(i.items) || i.items.length === 0) {
62
56
  t("a list without items");
63
57
  continue;
64
58
  }
65
- i.items.length > I && (t("more than " + I + " list items"), i.items = i.items.slice(0, I));
59
+ i.items.length > 10 && (t("more than 10 list items"), i.items = i.items.slice(0, 10));
66
60
  break;
67
61
  case "actions": {
68
- const a = Array.isArray(i.elements) ? i.elements : [], o = a.filter((s) => s && s.action_id && s.invoke && C(s.text));
62
+ const a = Array.isArray(i.elements) ? i.elements : [], o = a.filter((s) => s && s.action_id && s.invoke && T(s.text));
69
63
  if (o.length !== a.length && t("an action without action_id, invoke or text"), o.length === 0) continue;
70
- o.length > M && t("more than " + M + " actions"), i.elements = o.slice(0, M);
64
+ o.length > 5 && t("more than 5 actions"), i.elements = o.slice(0, 5);
71
65
  break;
72
66
  }
73
67
  }
@@ -75,7 +69,7 @@ function vn(e, t = () => {
75
69
  }
76
70
  return n;
77
71
  }
78
- function Ne(e) {
72
+ function we(e) {
79
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();
80
74
  }
81
75
  function A(e) {
@@ -83,16 +77,16 @@ function A(e) {
83
77
  const t = Math.floor(e / 60), n = Math.floor(e % 60);
84
78
  return `${t}:${n.toString().padStart(2, "0")}`;
85
79
  }
86
- function D(e) {
80
+ function x(e) {
87
81
  return e ? ` — ${Math.floor(e / 60)}m ${e % 60}s` : "";
88
82
  }
89
- function k(e) {
83
+ function I(e) {
90
84
  return e?.split("@")?.[0] || e || "";
91
85
  }
92
86
  function b(e) {
93
87
  return e.map((t) => t.name).join(", ");
94
88
  }
95
- function P(e) {
89
+ function $(e) {
96
90
  return e === "meeting" ? "Meeting" : e === "video" ? "Video call" : "Audio call";
97
91
  }
98
92
  const m = {
@@ -102,7 +96,7 @@ const m = {
102
96
  channelKind: "voice",
103
97
  icon: "phone",
104
98
  snippet: () => "Gesprek gestart",
105
- timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${k(e.payload.from)}` : `Outbound call started — ${k(e.payload.to)}`
99
+ timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${I(e.payload.from)}` : `Outbound call started — ${I(e.payload.to)}`
106
100
  },
107
101
  VOICE_CALL_ANSWERED: {
108
102
  shape: "event",
@@ -130,14 +124,14 @@ const m = {
130
124
  channelKind: "voice",
131
125
  icon: "phone",
132
126
  snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${A(e.payload.duration)})` : ""}`,
133
- timeline: (e) => `Call ended${D(e.payload.duration)}`
127
+ timeline: (e) => `Call ended${x(e.payload.duration)}`
134
128
  },
135
129
  VOICE_CALL_MISSED: {
136
130
  shape: "event",
137
131
  channelKind: "voice",
138
132
  icon: "phone",
139
133
  snippet: () => "Gemiste oproep",
140
- timeline: (e) => `Missed call — ${k(e.payload.from)}`
134
+ timeline: (e) => `Missed call — ${I(e.payload.from)}`
141
135
  },
142
136
  VOICE_CALL_FAILED: {
143
137
  shape: "event",
@@ -212,7 +206,7 @@ const m = {
212
206
  replyable: !0,
213
207
  carriesText: !0,
214
208
  countsAs: "inbound_message",
215
- snippet: K
209
+ snippet: R
216
210
  },
217
211
  EMAIL_SENT: {
218
212
  shape: "message",
@@ -222,7 +216,7 @@ const m = {
222
216
  replyable: !0,
223
217
  carriesText: !0,
224
218
  countsAs: "outbound_message",
225
- snippet: K
219
+ snippet: R
226
220
  },
227
221
  /* ---- chat ---- */
228
222
  CHAT_MESSAGE_SENT: {
@@ -279,7 +273,7 @@ const m = {
279
273
  channelKind: "chat",
280
274
  icon: "message-circle",
281
275
  snippet: () => "Gesprek gestart",
282
- timeline: (e) => `${P(e.payload.callType)} started${e.payload.initiator ? ` by ${e.payload.initiator.name}` : ""}`,
276
+ timeline: (e) => `${$(e.payload.callType)} started${e.payload.initiator ? ` by ${e.payload.initiator.name}` : ""}`,
283
277
  joinUrl: (e) => e.payload.joinUrl
284
278
  },
285
279
  CHAT_CALL_ENDED: {
@@ -287,7 +281,7 @@ const m = {
287
281
  channelKind: "chat",
288
282
  icon: "message-circle",
289
283
  snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${A(e.payload.duration)})` : ""}`,
290
- timeline: (e) => `${P(e.payload.callType)} ended${D(e.payload.duration)}`,
284
+ timeline: (e) => `${$(e.payload.callType)} ended${x(e.payload.duration)}`,
291
285
  joinUrl: (e) => e.payload.joinUrl
292
286
  },
293
287
  CHAT_EVENT: {
@@ -297,7 +291,7 @@ const m = {
297
291
  snippet: (e) => e.payload.text ?? e.payload.eventType,
298
292
  timeline: (e) => e.payload.text || e.payload.eventType
299
293
  },
300
- /* ---- inhoud ---- */
294
+ /* ---- content ---- */
301
295
  TRANSCRIPT_ADDED: {
302
296
  shape: "artifact",
303
297
  triggerable: !0,
@@ -391,7 +385,7 @@ const m = {
391
385
  snippet: (e) => `${e.payload.name} verlaten`,
392
386
  timeline: (e, t) => `${t} left the meeting`
393
387
  },
394
- /* ---- interactie-levenscyclus ---- */
388
+ /* ---- interaction lifecycle ---- */
395
389
  INTERACTION_CREATED: {
396
390
  shape: "event",
397
391
  icon: "circle",
@@ -411,59 +405,77 @@ const m = {
411
405
  icon: "user",
412
406
  snippet: () => "Interactie toegewezen",
413
407
  timeline: (e, t) => `Assigned by ${t}`
408
+ },
409
+ /* ---- work items ---- */
410
+ /**
411
+ * `shape: "note"` is load-bearing: it makes `isMessageShape` → `isMessageType` →
412
+ * `isReplySignal` accept a work comment as an answer, so the AI wake path needs no
413
+ * type list of its own.
414
+ */
415
+ WORK_COMMENT_ADDED: {
416
+ shape: "note",
417
+ icon: "sticky-note",
418
+ carriesText: !0,
419
+ snippet: () => "Reactie"
420
+ },
421
+ WORK_ITEM_ASSIGNED: {
422
+ shape: "event",
423
+ icon: "user",
424
+ snippet: () => "Taak toegewezen",
425
+ timeline: (e, t) => `Assigned by ${t}`
414
426
  }
415
427
  };
416
- function K(e) {
417
- const t = e.payload, n = t.bodySnippet?.trim() || Ne(t.body ?? "");
428
+ function R(e) {
429
+ const t = e.payload, n = t.bodySnippet?.trim() || we(t.body ?? "");
418
430
  return t.subject ? `${t.subject} — ${n}` : n;
419
431
  }
420
432
  function d(e) {
421
433
  return m[e];
422
434
  }
423
- function xn(e) {
435
+ function Nn(e) {
424
436
  return d(e)?.icon ?? "circle";
425
437
  }
426
- function On(e) {
438
+ function vn(e) {
427
439
  return d(e)?.channelKind;
428
440
  }
429
- function ce(e) {
441
+ function ae(e) {
430
442
  return e === "message" || e === "note";
431
443
  }
432
- function $n(e) {
433
- return ce(d(e)?.shape);
444
+ function On(e) {
445
+ return ae(d(e)?.shape);
434
446
  }
435
- function Rn(e) {
447
+ function xn(e) {
436
448
  return d(e)?.replyable === !0;
437
449
  }
438
- function Ln(e) {
450
+ function $n(e) {
439
451
  return d(e)?.carriesText === !0;
440
452
  }
441
- function Dn(e) {
453
+ function Rn(e) {
442
454
  return d(e)?.countsAs;
443
455
  }
444
- function Pn(e) {
456
+ function Ln(e) {
445
457
  return d(e)?.playbookAuthored === !0;
446
458
  }
447
- function Kn(e) {
459
+ function Dn(e) {
448
460
  return d(e)?.connected === !0;
449
461
  }
450
- function Un(e) {
462
+ function Pn(e) {
451
463
  const t = d(e);
452
464
  return t?.shape === "artifact" && t?.carriesText === !0;
453
465
  }
454
- function ve(e) {
466
+ function Me(e) {
455
467
  const t = d(e.type)?.snippet;
456
468
  return t ? t(e) : "";
457
469
  }
458
- function jn(e, t) {
470
+ function Kn(e, t) {
459
471
  const n = d(e.type)?.timeline;
460
472
  return n ? n(e, t) : e.type.replace(/_/g, " ").toLowerCase();
461
473
  }
462
- function Gn(e) {
474
+ function Un(e) {
463
475
  const t = d(e.type)?.joinUrl;
464
476
  return t ? t(e) : void 0;
465
477
  }
466
- function x(e, t) {
478
+ function C(e, t) {
467
479
  let n = e;
468
480
  for (const r of t.split(".")) {
469
481
  if (n == null || typeof n != "object") return "";
@@ -471,26 +483,43 @@ function x(e, t) {
471
483
  }
472
484
  return n == null ? "" : typeof n == "string" ? n : typeof n == "number" || typeof n == "boolean" ? String(n) : "";
473
485
  }
474
- function O(e, t, n) {
486
+ function N(e, t, n) {
475
487
  if (e === void 0) return null;
476
488
  if (typeof e == "string") return e || null;
477
489
  if ("value" in e)
478
- return x(t, e.value) || null;
490
+ return C(t, e.value) || null;
479
491
  const r = {};
480
492
  for (const [a, o] of Object.entries(e.params ?? {}))
481
- r[a] = x(t, o);
493
+ r[a] = C(t, o);
482
494
  const i = n(e.key, r);
483
495
  return i === e.key ? null : i;
484
496
  }
485
- function xe(e, t) {
497
+ function ke(e, t) {
486
498
  if (!e || typeof e == "string" || "value" in e) return null;
487
499
  const n = {};
488
500
  for (const [r, i] of Object.entries(e.params ?? {}))
489
- n[r] = x(t, i);
501
+ n[r] = C(t, i);
490
502
  return { key: e.key, params: n };
491
503
  }
492
- const Oe = (e) => e;
493
- function U(e) {
504
+ const L = 140;
505
+ function Ce(e) {
506
+ const t = e.trim();
507
+ return t.length <= L ? t : t.slice(0, L - 1).trimEnd() + "…";
508
+ }
509
+ function jn(e, t) {
510
+ const n = ke(t?.text, e), r = t ? N(t.text, e, (i) => i) : null;
511
+ return {
512
+ activityId: e.id,
513
+ type: e.type,
514
+ snippet: Ce(r ?? Me(e)),
515
+ authorName: e.author?.name ?? "",
516
+ direction: e.direction,
517
+ createdAt: e.createdAt ?? Date.now(),
518
+ ...n ? { snippetKey: n.key, snippetParams: n.params } : {}
519
+ };
520
+ }
521
+ const Ne = (e) => e;
522
+ function D(e) {
494
523
  const t = m[e];
495
524
  return {
496
525
  type: e,
@@ -506,7 +535,7 @@ function U(e) {
506
535
  displayNameKey: t.displayNameKey
507
536
  };
508
537
  }
509
- function j(e) {
538
+ function P(e) {
510
539
  return {
511
540
  type: e.type,
512
541
  shape: e.shape,
@@ -521,119 +550,244 @@ function j(e) {
521
550
  displayNameKey: e.displayNameKey
522
551
  };
523
552
  }
524
- class $e {
525
- constructor(t = [], n = Oe) {
553
+ class ve {
554
+ constructor(t = [], n = Ne) {
526
555
  this.translate = n;
527
556
  for (const r of t)
528
557
  r?.type && (r.type in m || this.declared.has(r.type) || this.declared.set(r.type, r));
529
558
  }
530
559
  declared = /* @__PURE__ */ new Map();
531
560
  get(t) {
532
- if (t in m) return U(t);
561
+ if (t in m) return D(t);
533
562
  const n = this.declared.get(t);
534
- return n ? j(n) : void 0;
563
+ return n ? P(n) : void 0;
535
564
  }
536
- /** Alles wat als trigger aangeboden mag worden, ingebouwd en gedeclareerd. */
565
+ /** Everything that may be offered as a trigger, built-in and declared. */
537
566
  triggerable() {
538
- const t = Object.keys(m).filter((r) => m[r].triggerable).map(U), n = [...this.declared.values()].map(j).filter((r) => r.triggerable);
567
+ const t = Object.keys(m).filter((r) => m[r].triggerable).map(D), n = [...this.declared.values()].map(P).filter((r) => r.triggerable);
539
568
  return [...t, ...n];
540
569
  }
541
570
  /**
542
- * De tijdlijnregel. Ingebouwd komt uit de catalogus, gedeclareerd uit `text` + de
543
- * meegeleverde vertaling. Zonder bruikbare tekst valt het terug op de ontstreepte
544
- * typenaam — dezelfde regel die de feed altijd al toonde voor onbekende types.
571
+ * The timeline line. Built-in comes from the catalog, declared from `text` plus the supplied
572
+ * translation. Without usable text it falls back to the de-underscored type name — the same line
573
+ * the feed always showed for unknown types.
545
574
  */
546
575
  timelineText(t, n) {
547
576
  const r = m[t.type];
548
577
  if (r?.timeline) return r.timeline(t, n);
549
578
  const i = this.declared.get(t.type);
550
- return O(i?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
579
+ return N(i?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
551
580
  }
552
- /** De regel voor de inboxlijst. Leeg wanneer het type niets te tonen heeft. */
581
+ /** The line for the inbox list. Empty when the type has nothing to show. */
553
582
  snippet(t) {
554
583
  const n = m[t.type];
555
584
  if (n?.snippet) return n.snippet(t);
556
585
  const r = this.declared.get(t.type);
557
- return O(r?.text, t, this.translate) ?? "";
586
+ return N(r?.text, t, this.translate) ?? "";
558
587
  }
559
- /** De descriptor zoals hij binnenkwam; nodig om `text` als sleutel op te slaan. */
588
+ /** The descriptor as it arrived; needed to store `text` as a key. */
560
589
  descriptor(t) {
561
590
  return this.declared.get(t);
562
591
  }
563
- /** De declaratieve blokken van een type, als het er heeft. */
592
+ /** A type's declarative blocks, when it has any. */
564
593
  blocks(t) {
565
594
  const n = this.declared.get(t)?.render;
566
595
  return n?.length ? n : void 0;
567
596
  }
568
597
  /**
569
- * Dezelfde semantische vragen als de losse accessors in `catalog.ts`, maar dan óók voor
570
- * types die een app declareerde.
598
+ * The same semantic questions as the standalone accessors in `catalog.ts`, but for types an app
599
+ * declared as well.
571
600
  *
572
- * Dat verschil is de reden dat deze methodes bestaan. `isMessageType(type)` leest alleen
573
- * `ACTIVITY_CATALOG`, dus een gedeclareerd type met `shape: "message"` gaf daar `false` —
574
- * een helpdesk-app kon een berichtsoort meebrengen die vervolgens niet meetelde als
575
- * gesprek, niet antwoordbaar was en niet in de analytics landde. Wie een registry bij de
576
- * hand heeft, hoort deze te gebruiken; wie er geen heeft valt terug op de ingebouwde.
601
+ * That difference is why these methods exist. `isMessageType(type)` reads only
602
+ * `ACTIVITY_CATALOG`, so a declared type with `shape: "message"` returned `false` there — a
603
+ * helpdesk app could bring a message kind that then did not count as a conversation, was not
604
+ * replyable and never landed in the analytics. Anyone with a registry at hand should use these;
605
+ * anyone without falls back to the built-in ones.
577
606
  *
578
- * De regel zelf staat maar op één plek: {@link isMessageShape} en de velden van
607
+ * The rule itself lives in one place: {@link isMessageShape} and the fields of
579
608
  * {@link ResolvedActivityType}.
580
609
  */
581
610
  isMessage(t) {
582
- return ce(this.get(t)?.shape);
611
+ return ae(this.get(t)?.shape);
583
612
  }
584
- /** Kan een mens hierop antwoorden? Notities niet — die gaan nergens heen. */
613
+ /** Can a person reply to this? Notes cannot — those go nowhere. */
585
614
  isReplyable(t) {
586
615
  return this.get(t)?.replyable === !0;
587
616
  }
588
- /** Leesbare inhoud voor een model: berichten, notities én transcripten. */
617
+ /** Readable content for a model: messages, notes and transcripts. */
589
618
  carriesText(t) {
590
619
  return this.get(t)?.carriesText === !0;
591
620
  }
592
- /** Telt mee als in- of uitgaand bericht in de analytics-rollup. */
621
+ /** Counts as an inbound or outbound message in the analytics rollup. */
593
622
  countsAs(t) {
594
623
  return this.get(t)?.countsAs;
595
624
  }
596
- /** `mail` | `chat` | `voice` | `video`, of `undefined` voor een levenscyclus-event. */
625
+ /** `mail` | `chat` | `voice` | `video`, or `undefined` for a lifecycle event. */
597
626
  channelKind(t) {
598
627
  return this.get(t)?.channelKind;
599
628
  }
600
- /** Transcript-achtig artefact: meegeleverde inhoud die leesbare tekst draagt. */
629
+ /** Transcript-like artifact: supplied content carrying readable text. */
601
630
  isTranscript(t) {
602
631
  const n = this.get(t);
603
632
  return n?.shape === "artifact" && n.carriesText;
604
633
  }
605
- /** De vertaler die bij deze registry hoort, voor het oplossen van blokteksten. */
634
+ /** The translator belonging to this registry, for resolving block texts. */
606
635
  get translator() {
607
636
  return this.translate;
608
637
  }
609
638
  }
610
- const Bn = new $e(), G = 140;
611
- function Re(e) {
612
- const t = e.trim();
613
- return t.length <= G ? t : t.slice(0, G - 1).trimEnd() + "…";
614
- }
615
- function Fn(e, t) {
616
- const n = xe(t?.text, e), r = t ? O(t.text, e, (i) => i) : null;
617
- return {
618
- activityId: e.id,
619
- type: e.type,
620
- snippet: Re(r ?? ve(e)),
621
- authorName: e.author?.name ?? "",
622
- direction: e.direction,
623
- createdAt: e.createdAt ?? Date.now(),
624
- ...n ? { snippetKey: n.key, snippetParams: n.params } : {}
625
- };
626
- }
627
- function Vn(e, t, n = []) {
639
+ const Gn = new ve();
640
+ function Bn(e, t, n = []) {
628
641
  const r = e.createdAt;
629
642
  if (!r) return [];
630
643
  const i = new Set(n);
631
644
  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);
632
645
  }
633
- function Hn(e) {
646
+ function Fn(e) {
634
647
  return e.createdAt ?? 0;
635
648
  }
636
- const Wn = [
649
+ function Vn(e) {
650
+ return e.type === "EMAIL_RECEIVED" || e.type === "EMAIL_SENT";
651
+ }
652
+ function Hn(e) {
653
+ return e.type === "CHAT_MESSAGE_SENT" || e.type === "CHAT_MESSAGE_RECEIVED";
654
+ }
655
+ const oe = [
656
+ {
657
+ id: "openai",
658
+ attachmentKinds: ["image", "pdf"],
659
+ label: "OpenAI",
660
+ capabilities: ["chat", "transcription", "embedding"],
661
+ defaultModel: "gpt-5-mini",
662
+ baseUrl: "https://api.openai.com/v1"
663
+ },
664
+ {
665
+ id: "gemini",
666
+ attachmentKinds: ["image", "pdf"],
667
+ label: "Google Gemini",
668
+ capabilities: ["chat", "transcription", "embedding"],
669
+ defaultModel: "gemini-3.5-flash",
670
+ baseUrl: "https://generativelanguage.googleapis.com/v1beta"
671
+ },
672
+ {
673
+ id: "anthropic",
674
+ attachmentKinds: ["image", "pdf"],
675
+ label: "Anthropic",
676
+ capabilities: ["chat"],
677
+ defaultModel: "claude-haiku-4-5",
678
+ baseUrl: "https://api.anthropic.com/v1"
679
+ },
680
+ {
681
+ id: "elevenlabs",
682
+ label: "ElevenLabs",
683
+ capabilities: ["transcription"],
684
+ baseUrl: "https://api.elevenlabs.io/v1"
685
+ },
686
+ // Chat Completions vendors. Everything below runs on one adapter
687
+ // (`OpenAiCompatibleProvider`); adding one is a row here plus a line in `providers/registry`.
688
+ //
689
+ // `defaultModel` is deliberately an alias where the vendor offers one (`mistral-large-latest`,
690
+ // `openrouter/auto`): individual model ids expire, aliases do not. Where that is impossible, the
691
+ // newest flagship stands.
692
+ {
693
+ id: "moonshot",
694
+ label: "Moonshot (Kimi)",
695
+ capabilities: ["chat"],
696
+ defaultModel: "kimi-k3",
697
+ baseUrl: "https://api.moonshot.ai/v1"
698
+ },
699
+ {
700
+ id: "deepseek",
701
+ label: "DeepSeek",
702
+ capabilities: ["chat"],
703
+ defaultModel: "deepseek-v4-flash",
704
+ baseUrl: "https://api.deepseek.com/v1"
705
+ },
706
+ {
707
+ id: "groq",
708
+ label: "Groq",
709
+ capabilities: ["chat"],
710
+ defaultModel: "openai/gpt-oss-120b",
711
+ baseUrl: "https://api.groq.com/openai/v1"
712
+ },
713
+ {
714
+ id: "mistral",
715
+ label: "Mistral",
716
+ capabilities: ["chat"],
717
+ defaultModel: "mistral-large-latest",
718
+ baseUrl: "https://api.mistral.ai/v1"
719
+ },
720
+ {
721
+ id: "openrouter",
722
+ label: "OpenRouter",
723
+ capabilities: ["chat"],
724
+ // The Auto Router picks a model per prompt itself, so this does not expire along with the
725
+ // weekly changing slugs in the catalog.
726
+ defaultModel: "openrouter/auto",
727
+ baseUrl: "https://openrouter.ai/api/v1"
728
+ },
729
+ // Self-hosted: no fixed host, the user fills one in on the account. They all speak Chat
730
+ // Completions, so the same adapter.
731
+ {
732
+ id: "ollama",
733
+ label: "Ollama (self-hosted)",
734
+ capabilities: ["chat"],
735
+ defaultModel: "llama3.3"
736
+ },
737
+ {
738
+ id: "openai-compatible",
739
+ label: "OpenAI-compatible (eigen endpoint)",
740
+ capabilities: ["chat"],
741
+ // vLLM, LM Studio, a custom gateway — model and host come from the user.
742
+ defaultModel: "default"
743
+ }
744
+ ];
745
+ function S(e) {
746
+ return oe.find((t) => t.id === e);
747
+ }
748
+ function Wn(e) {
749
+ return S(e)?.label ?? e;
750
+ }
751
+ function zn(e, t = "gpt-5-mini") {
752
+ return S(e)?.defaultModel ?? t;
753
+ }
754
+ function Xn(e) {
755
+ return oe.filter((t) => t.capabilities.includes(e));
756
+ }
757
+ function Yn(e) {
758
+ const t = S(e);
759
+ return !!t && !t.baseUrl;
760
+ }
761
+ function qn(e, t) {
762
+ return t === "text" ? !0 : S(e)?.attachmentKinds?.includes(t) === !0;
763
+ }
764
+ function Jn(e, t) {
765
+ if (!e.enabled) return "ok";
766
+ const n = K(e.hardLimitNanos), r = K(e.softLimitNanos);
767
+ return n !== void 0 && t >= n ? "hard" : r !== void 0 && t >= r ? "soft" : "ok";
768
+ }
769
+ function K(e) {
770
+ return typeof e == "number" ? e : void 0;
771
+ }
772
+ function Oe(e, t = "month") {
773
+ const n = new Date(e);
774
+ return Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), 1);
775
+ }
776
+ function Zn(e, t = "month") {
777
+ const n = new Date(Oe(e, t));
778
+ return `${n.getUTCFullYear()}-${String(n.getUTCMonth() + 1).padStart(2, "0")}`;
779
+ }
780
+ function Qn(e) {
781
+ return e?.listeningEnabled !== !1;
782
+ }
783
+ function er(e) {
784
+ const t = [];
785
+ for (const n of Object.keys(e))
786
+ for (const r of Object.keys(e[n]))
787
+ t.push({ lang: n, key: r, value: e[n][r] });
788
+ return t;
789
+ }
790
+ const tr = [
637
791
  { id: "agent", label: "Agent", labelSource: "user" },
638
792
  { id: "team", label: "Team", labelSource: "team" },
639
793
  { id: "inbox", label: "Inbox", labelSource: "inbox" },
@@ -643,54 +797,47 @@ const Wn = [
643
797
  { id: "handledBy", label: "Afhandelaar", labelSource: "raw" },
644
798
  { id: "time", label: "Tijd", labelSource: "raw" }
645
799
  ];
646
- function zn(e) {
647
- const t = [];
648
- for (const n of Object.keys(e))
649
- for (const r of Object.keys(e[n]))
650
- t.push({ lang: n, key: r, value: e[n][r] });
651
- return t;
652
- }
653
800
  function w(e) {
654
801
  return e < 10 ? `0${e}` : `${e}`;
655
802
  }
656
- function Le(e, t) {
803
+ function xe(e, t) {
657
804
  const n = new Date(e), r = `${n.getUTCFullYear()}-${w(n.getUTCMonth() + 1)}-${w(n.getUTCDate())}`;
658
805
  return t === "day" ? r : `${r}T${w(n.getUTCHours())}`;
659
806
  }
660
- function De(e, t) {
807
+ function $e(e, t) {
661
808
  const n = new Date(e);
662
809
  return n.setUTCMinutes(0, 0, 0), t === "day" && n.setUTCHours(0), n.getTime();
663
810
  }
664
- const Pe = 36e5, Ke = 864e5;
665
- function Xn(e, t, n) {
666
- const r = n === "hour" ? Pe : Ke, i = [];
667
- for (let a = De(e, n); a <= t; a += r)
668
- i.push(Le(a, n));
811
+ const Re = 36e5, Le = 864e5;
812
+ function nr(e, t, n) {
813
+ const r = n === "hour" ? Re : Le, i = [];
814
+ for (let a = $e(e, n); a <= t; a += r)
815
+ i.push(xe(a, n));
669
816
  return i;
670
817
  }
671
- const Ue = [
818
+ const De = [
672
819
  { id: "resource", label: "Resource", labelSource: "raw" },
673
820
  { id: "origin", label: "Herkomst", labelSource: "raw" }
674
- ], je = Ue.map((e) => e.id);
675
- function Ge(e, t) {
821
+ ], Pe = De.map((e) => e.id);
822
+ function Ke(e, t) {
676
823
  return `${e}.usage.${t}`;
677
824
  }
678
- function Yn(e, t) {
825
+ function rr(e, t) {
679
826
  return t.map((n) => ({
680
- id: Ge(e, n.unit),
827
+ id: Ke(e, n.unit),
681
828
  label: n.label,
682
829
  category: "Verbruik",
683
830
  valueType: n.valueType ?? "count",
684
831
  aggregation: "sum",
685
832
  supportedDimensions: [
686
833
  "provider",
687
- ...je,
834
+ ...Pe,
688
835
  ...n.extraDimensions ?? [],
689
836
  "time"
690
837
  ]
691
838
  }));
692
839
  }
693
- const ue = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), B = 200, F = 100, V = 200, H = 12, W = 4, de = 4e3, N = 500, qn = 256 * 1024, Be = /* @__PURE__ */ new Set([
840
+ const se = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), U = 200, j = 100, G = 200, B = 12, F = 4, ce = 4e3, M = 500, ir = 256 * 1024, Ue = /* @__PURE__ */ new Set([
694
841
  "heading",
695
842
  "paragraph",
696
843
  "list",
@@ -700,15 +847,15 @@ const ue = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]
700
847
  "table",
701
848
  "kpi",
702
849
  "callout"
703
- ]), Fe = ["http:", "https:", "mailto:", "tel:"], Ve = /^[a-z][a-z0-9+.-]*:/i;
704
- function pe(e) {
850
+ ]), je = ["http:", "https:", "mailto:", "tel:"], Ge = /^[a-z][a-z0-9+.-]*:/i;
851
+ function le(e) {
705
852
  const t = e.trim().replace(/^<|>$/g, "");
706
853
  if (!t) return !1;
707
- const n = Ve.exec(t)?.[0];
708
- return n ? Fe.includes(n.toLowerCase()) : !t.startsWith("//");
854
+ const n = Ge.exec(t)?.[0];
855
+ return n ? je.includes(n.toLowerCase()) : !t.startsWith("//");
709
856
  }
710
- const He = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
711
- function We(e) {
857
+ const Be = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
858
+ function Fe(e) {
712
859
  let t = "", n = 0;
713
860
  for (; n < e.length; ) {
714
861
  const r = e[n] === "!" && e[n + 1] === "[";
@@ -716,22 +863,22 @@ function We(e) {
716
863
  t += e[n], n += 1;
717
864
  continue;
718
865
  }
719
- const i = n + (r ? 2 : 1), a = z(e, i, "[", "]");
866
+ const i = n + (r ? 2 : 1), a = V(e, i, "[", "]");
720
867
  if (a < 0 || e[a + 1] !== "(") {
721
868
  t += e[n], n += 1;
722
869
  continue;
723
870
  }
724
- const o = z(e, a + 2, "(", ")");
871
+ const o = V(e, a + 2, "(", ")");
725
872
  if (o < 0) {
726
873
  t += e[n], n += 1;
727
874
  continue;
728
875
  }
729
- const s = e.slice(i, a), l = e.slice(a + 2, o).trim().split(/\s+/)[0] ?? "";
730
- t += r || !pe(l) ? s : e.slice(n, o + 1), n = o + 1;
876
+ const s = e.slice(i, a), c = e.slice(a + 2, o).trim().split(/\s+/)[0] ?? "";
877
+ t += r || !le(c) ? s : e.slice(n, o + 1), n = o + 1;
731
878
  }
732
879
  return t;
733
880
  }
734
- function z(e, t, n, r) {
881
+ function V(e, t, n, r) {
735
882
  let i = 1;
736
883
  for (let a = t; a < e.length; a += 1) {
737
884
  if (e[a] === "\\") {
@@ -744,33 +891,33 @@ function z(e, t, n, r) {
744
891
  }
745
892
  return -1;
746
893
  }
747
- function ze(e) {
748
- return We(e).replace(
749
- He,
750
- (t, n, r) => pe(r) ? t : ""
894
+ function Ve(e) {
895
+ return Fe(e).replace(
896
+ Be,
897
+ (t, n, r) => le(r) ? t : ""
751
898
  );
752
899
  }
753
- function u(e, t = de) {
754
- return typeof e == "string" ? ze(e).slice(0, t) : "";
900
+ function u(e, t = ce) {
901
+ return typeof e == "string" ? Ve(e).slice(0, t) : "";
755
902
  }
756
- function Xe(e, t = de) {
903
+ function He(e, t = ce) {
757
904
  return typeof e == "string" ? e.slice(0, t) : "";
758
905
  }
759
- function Ye(e, t = "info") {
760
- return typeof e == "string" && ue.has(e) ? e : t;
906
+ function We(e, t = "info") {
907
+ return typeof e == "string" && se.has(e) ? e : t;
761
908
  }
762
- function Jn(e, t = () => {
909
+ function ar(e, t = () => {
763
910
  }) {
764
911
  if (!Array.isArray(e)) return [];
765
912
  const n = [];
766
913
  for (const r of e) {
767
- if (n.length >= B) {
768
- t("more than " + B + " blocks; the rest was dropped");
914
+ if (n.length >= U) {
915
+ t("more than " + U + " blocks; the rest was dropped");
769
916
  break;
770
917
  }
771
918
  if (!r || typeof r != "object") continue;
772
919
  const i = r;
773
- if (!Be.has(i.type)) {
920
+ if (!Ue.has(i.type)) {
774
921
  t("unknown block type " + String(i.type));
775
922
  continue;
776
923
  }
@@ -805,7 +952,7 @@ function Jn(e, t = () => {
805
952
  break;
806
953
  }
807
954
  case "code": {
808
- const o = Xe(i.text);
955
+ const o = He(i.text);
809
956
  if (!o) {
810
957
  t("a code block without text");
811
958
  continue;
@@ -820,49 +967,47 @@ function Jn(e, t = () => {
820
967
  case "list": {
821
968
  const o = Array.isArray(i.items) ? i.items : [], s = [];
822
969
  for (const p of o) {
823
- if (s.length >= F) {
824
- t("more than " + F + " list items");
970
+ if (s.length >= j) {
971
+ t("more than " + j + " list items");
825
972
  break;
826
973
  }
827
974
  const f = u(p?.text);
828
975
  if (!f) continue;
829
- const c = u(p?.lead, 200);
830
- s.push(c ? { lead: c, text: f } : { text: f });
976
+ const l = u(p?.lead, 200);
977
+ s.push(l ? { lead: l, text: f } : { text: f });
831
978
  }
832
979
  if (s.length === 0) {
833
980
  t("a list without usable items");
834
981
  continue;
835
982
  }
836
- const l = i.style === "numbered" ? "numbered" : "bulleted";
837
- n.push({ ...a, type: "list", style: l, items: s });
983
+ const c = i.style === "numbered" ? "numbered" : "bulleted";
984
+ n.push({ ...a, type: "list", style: c, items: s });
838
985
  break;
839
986
  }
840
987
  case "table": {
841
988
  const o = Array.isArray(i.columns) ? i.columns : [], s = [];
842
- for (const c of o) {
843
- if (s.length >= H) {
844
- t("more than " + H + " table columns");
989
+ for (const l of o) {
990
+ if (s.length >= B) {
991
+ t("more than " + B + " table columns");
845
992
  break;
846
993
  }
847
- const y = u(c?.label, N), _ = c?.align === "right" ? "right" : void 0;
994
+ const y = u(l?.label, M), _ = l?.align === "right" ? "right" : void 0;
848
995
  s.push(_ ? { label: y, align: _ } : { label: y });
849
996
  }
850
997
  if (s.length === 0) {
851
998
  t("a table without columns");
852
999
  continue;
853
1000
  }
854
- const l = Array.isArray(i.rows) ? i.rows : [], p = [];
855
- for (const c of l) {
856
- if (p.length >= V) {
857
- t("more than " + V + " table rows");
1001
+ const c = Array.isArray(i.rows) ? i.rows : [], p = [];
1002
+ for (const l of c) {
1003
+ if (p.length >= G) {
1004
+ t("more than " + G + " table rows");
858
1005
  break;
859
1006
  }
860
- const y = Array.isArray(c) ? c : [];
861
- p.push(
862
- s.map((_, ke) => u(y[ke], N))
863
- );
1007
+ const y = Array.isArray(l) ? l : [];
1008
+ p.push(s.map((_, Te) => u(y[Te], M)));
864
1009
  }
865
- const f = u(i.caption, N);
1010
+ const f = u(i.caption, M);
866
1011
  n.push({
867
1012
  ...a,
868
1013
  type: "table",
@@ -874,16 +1019,16 @@ function Jn(e, t = () => {
874
1019
  }
875
1020
  case "kpi": {
876
1021
  const o = Array.isArray(i.items) ? i.items : [], s = [];
877
- for (const l of o) {
878
- if (s.length >= W) {
879
- t("more than " + W + " kpi items");
1022
+ for (const c of o) {
1023
+ if (s.length >= F) {
1024
+ t("more than " + F + " kpi items");
880
1025
  break;
881
1026
  }
882
- const p = u(l?.value, 40), f = u(l?.label, 80);
1027
+ const p = u(c?.value, 40), f = u(c?.label, 80);
883
1028
  if (!p || !f) continue;
884
- const c = l?.tone;
1029
+ const l = c?.tone;
885
1030
  s.push(
886
- typeof c == "string" && ue.has(c) ? { value: p, label: f, tone: c } : { value: p, label: f }
1031
+ typeof l == "string" && se.has(l) ? { value: p, label: f, tone: l } : { value: p, label: f }
887
1032
  );
888
1033
  }
889
1034
  if (s.length === 0) {
@@ -903,7 +1048,7 @@ function Jn(e, t = () => {
903
1048
  n.push({
904
1049
  ...a,
905
1050
  type: "callout",
906
- tone: Ye(i.tone),
1051
+ tone: We(i.tone),
907
1052
  ...s ? { title: s } : {},
908
1053
  text: o
909
1054
  });
@@ -913,28 +1058,28 @@ function Jn(e, t = () => {
913
1058
  }
914
1059
  return n;
915
1060
  }
916
- function Zn(e) {
1061
+ function or(e) {
917
1062
  return JSON.stringify(e).length;
918
1063
  }
919
- function Qn(e) {
1064
+ function sr(e) {
920
1065
  return {
921
1066
  blocks: e.length,
922
1067
  types: e.map((t) => t.type),
923
1068
  headings: e.flatMap((t) => t.type === "heading" ? [t.text] : [])
924
1069
  };
925
1070
  }
926
- function X(e) {
1071
+ function H(e) {
927
1072
  return e.replace(/\|/g, "\\|").replace(/\r?\n/g, " ").trim();
928
1073
  }
929
- function Y(e, t, n) {
1074
+ function W(e, t, n) {
930
1075
  const r = e.map((i, a) => n?.[a] === "right" ? "---:" : "---");
931
1076
  return [
932
- `| ${e.map(X).join(" | ")} |`,
1077
+ `| ${e.map(H).join(" | ")} |`,
933
1078
  `| ${r.join(" | ")} |`,
934
- ...t.map((i) => `| ${i.map(X).join(" | ")} |`)
1079
+ ...t.map((i) => `| ${i.map(H).join(" | ")} |`)
935
1080
  ];
936
1081
  }
937
- function qe(e) {
1082
+ function ze(e) {
938
1083
  switch (e.type) {
939
1084
  case "heading":
940
1085
  return [`${"#".repeat(e.level)} ${e.text}`];
@@ -952,7 +1097,7 @@ function qe(e) {
952
1097
  return t.lead ? `${r} **${t.lead}** ${t.text}` : `${r} ${t.text}`;
953
1098
  });
954
1099
  case "table": {
955
- const t = Y(
1100
+ const t = W(
956
1101
  e.columns.map((n) => n.label),
957
1102
  e.rows,
958
1103
  e.columns.map((n) => n.align ?? "left")
@@ -960,7 +1105,7 @@ function qe(e) {
960
1105
  return e.caption ? [...t, "", `*${e.caption}*`] : t;
961
1106
  }
962
1107
  case "kpi":
963
- return Y(
1108
+ return W(
964
1109
  e.items.map((t) => t.value),
965
1110
  [e.items.map((t) => t.label)]
966
1111
  );
@@ -968,11 +1113,11 @@ function qe(e) {
968
1113
  return (e.title ? `**${e.title}** ${e.text}` : e.text).split(/\r?\n/).map((n) => `> ${n}`);
969
1114
  }
970
1115
  }
971
- function er(e, t) {
1116
+ function cr(e, t) {
972
1117
  const n = [], r = e.some((i) => i.type === "heading" && i.level === 1);
973
1118
  t && !r && n.push(`# ${t}`);
974
1119
  for (const i of e) {
975
- const a = qe(i);
1120
+ const a = ze(i);
976
1121
  a.length > 0 && n.push(a.join(`
977
1122
  `));
978
1123
  }
@@ -981,41 +1126,41 @@ function er(e, t) {
981
1126
  `)}
982
1127
  `;
983
1128
  }
984
- const fe = (e) => `user:${e}`, me = (e) => `team:${e}`;
985
- function tr(e) {
1129
+ const ue = (e) => `user:${e}`, de = (e) => `team:${e}`;
1130
+ function lr(e) {
986
1131
  const t = /* @__PURE__ */ new Set();
987
1132
  for (const n of e ?? [])
988
- n?.id && (n.kind === "user" && t.add(fe(n.id)), n.kind === "team" && t.add(me(n.id)));
1133
+ n?.id && (n.kind === "user" && t.add(ue(n.id)), n.kind === "team" && t.add(de(n.id)));
989
1134
  return [...t].sort();
990
1135
  }
991
- function nr(e, t) {
992
- return [fe(e), ...t.map(me)];
1136
+ function ur(e, t) {
1137
+ return [ue(e), ...t.map(de)];
993
1138
  }
994
- function rr(e) {
1139
+ function dr(e) {
995
1140
  const t = /* @__PURE__ */ new Set();
996
1141
  for (const n of e ?? [])
997
1142
  n?.kind && t.add(n.kind);
998
1143
  return [...t];
999
1144
  }
1000
- const Je = ["done", "escalated"];
1001
- function ir(e) {
1002
- return Je.includes(e);
1145
+ const Xe = ["done", "escalated"];
1146
+ function pr(e) {
1147
+ return Xe.includes(e);
1003
1148
  }
1004
- const Ze = "assignment";
1005
- function ar(e) {
1006
- return `${Ze}:${e}`;
1149
+ const Ye = "assignment";
1150
+ function fr(e) {
1151
+ return `${Ye}:${e}`;
1007
1152
  }
1008
- function or(e, t, n) {
1153
+ function mr(e, t, n) {
1009
1154
  if (e.direction === "inbound") return !0;
1010
1155
  if (e.author?.type === "user" && e.author.id === t) return !1;
1011
1156
  const r = e.payload?.mentions;
1012
1157
  return Array.isArray(r) && r.includes(t) ? !0 : n === "reply";
1013
1158
  }
1014
- function sr(e) {
1159
+ function gr(e) {
1015
1160
  return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
1016
1161
  }
1017
- const Qe = 12;
1018
- function lr(e, t, n = Qe) {
1162
+ const qe = 12;
1163
+ function hr(e, t, n = qe) {
1019
1164
  const r = t + 1;
1020
1165
  return e ? e.kind === "done" ? { status: "done", waitingOn: null, turns: r, reason: e.note } : e.kind === "escalate" ? { status: "escalated", waitingOn: null, turns: r, reason: e.reason } : r >= n ? {
1021
1166
  status: "escalated",
@@ -1029,82 +1174,155 @@ function lr(e, t, n = Qe) {
1029
1174
  reason: "de agent rondde zijn beurt af zonder te zeggen wat er moet gebeuren (wachten, afronden of overdragen)"
1030
1175
  };
1031
1176
  }
1032
- const q = ["lookup", "condition", "parallel", "for-each"];
1033
- function J(e) {
1034
- for (const t of e) {
1035
- if (!q.includes(t.type))
1036
- return `staptype "${t.type}" mag niet meelezen (alleen ${q.join(", ")})`;
1037
- if (t.type === "parallel")
1038
- for (const n of t.branches ?? []) {
1039
- const r = J(n);
1040
- if (r) return r;
1041
- }
1042
- if (t.type === "for-each") {
1043
- const n = J(t.body ?? []);
1044
- if (n) return n;
1045
- }
1046
- }
1047
- return null;
1177
+ const yr = /* @__PURE__ */ new Set(["mail", "message"]);
1178
+ function Je(e, t) {
1179
+ const n = e.settings?.signatures?.[t];
1180
+ return !n || !n.enabled || !n.body || n.body.trim() === "" ? null : n;
1048
1181
  }
1049
- function et(e, t) {
1050
- switch (e.kind) {
1051
- case "org":
1052
- return !0;
1053
- case "team":
1054
- return !!t.teamId && e.teamId === t.teamId;
1055
- case "personal":
1056
- return e.userId === t.userId;
1057
- }
1182
+ function Ar(e, t, n, r = "html") {
1183
+ if (!e) return n;
1184
+ const i = Je(e, t);
1185
+ return i ? `${n}${r === "text" ? `
1186
+
1187
+ ` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${i.body}` : n;
1058
1188
  }
1059
- function cr(e, t) {
1060
- return e.filter((n) => n.enabled && et(n.ownerScope, t));
1189
+ function br(e) {
1190
+ return e.endpoints ?? [];
1061
1191
  }
1062
- function ur(e) {
1063
- return (e.startsWith("tool:") ? e.slice(5) : e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
1192
+ const Er = (e) => !!e.assignedUserId || !!e.assignedInboxId, Sr = (e) => e.status === "closed", _r = (e) => ({
1193
+ urgent: 10,
1194
+ high: 5,
1195
+ normal: 2,
1196
+ low: 1
1197
+ })[e.priority] || 0, Tr = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
1198
+ function Ir(e, t) {
1199
+ return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
1064
1200
  }
1065
- const dr = [
1066
- { name: "text", type: "string" },
1067
- { name: "subject", type: "string" },
1068
- { name: "from", type: "string" },
1069
- { name: "type", type: "string" },
1070
- { name: "direction", type: "string" },
1071
- { name: "channelId", type: "string" },
1072
- { name: "interactionId", type: "string" },
1073
- { name: "activityId", type: "string" },
1074
- { name: "authorType", type: "string" },
1075
- { name: "authorName", type: "string" },
1076
- { name: "textRaw", type: "string" },
1077
- // Alleen gevuld bij INTERACTION_STATUS_CHANGED; een filter als
1078
- // `trigger.toStatus == "closed"` is de trigger voor "onthoud dit bij afsluiten".
1079
- { name: "fromStatus", type: "string" },
1080
- { name: "toStatus", type: "string" },
1081
- // Met wie is dit gesprek. Dit stond hier eerder expliciet NIET, omdat het toen een gok via
1082
- // `remoteParty` zou zijn geweest; nu legt de identiteitslaag de resolutie vast als
1083
- // `contact:<id>`/`company:<id>` in `Interaction.partyKeys`, dus dit is een vastgelegd feit.
1084
- // Leeg zolang de identiteit niet is opgelost (een onbekend nummer, een eerste bericht van
1085
- // een nieuw adres) — een stap die hierop leunt hoort dus een `condition` te hebben.
1086
- { name: "contactId", type: "string" },
1087
- { name: "companyId", type: "string" },
1088
- // Aan wie dit werk is toegewezen, bij een activity die een toewijzing aankondigt. Waar dat
1089
- // op de activity staat is per bron **gedeclareerd** (`AssignmentTargetKind.assigneePath`),
1090
- // dus `buildTriggerVars` kan hem niet zelf vullen: de job doet dat met de catalogus in de
1091
- // hand, vóór het trigger-filter draait — net als contactId/companyId hierboven.
1092
- { name: "assigneeUserId", type: "string" }
1093
- ], pr = {
1094
- topics: [
1095
- { name: "topicId", type: "string" },
1096
- { name: "topic", type: "string" },
1097
- { name: "confidence", type: "number" },
1098
- { name: "reasoning", type: "string" }
1099
- ],
1100
- question: [
1101
- { name: "answer", type: "boolean" },
1102
- { name: "reasoning", type: "string" }
1103
- ],
1104
- // Leeg met opzet: de velden komen uit `ClassifyStep.fields` en zijn dus per stap anders.
1105
- extract: []
1106
- };
1201
+ function wr(e, t) {
1202
+ const n = e.labels ?? [];
1203
+ return n.find((r) => r.locale === t)?.label ?? n[0]?.label ?? e.url;
1204
+ }
1205
+ function Mr(e, t, n) {
1206
+ const r = e.translations ?? [];
1207
+ return r.find((i) => i.locale === t) ?? (n ? r.find((i) => i.locale === n) : void 0) ?? { locale: t };
1208
+ }
1209
+ const z = [
1210
+ { code: "nl", label: "Nederlands", english: "Dutch" },
1211
+ { code: "en", label: "English", english: "English" },
1212
+ { code: "de", label: "Deutsch", english: "German" },
1213
+ { code: "fr", label: "Français", english: "French" },
1214
+ { code: "es", label: "Español", english: "Spanish" },
1215
+ { code: "it", label: "Italiano", english: "Italian" },
1216
+ { code: "pt", label: "Português", english: "Portuguese" },
1217
+ { code: "pl", label: "Polski", english: "Polish" },
1218
+ { code: "sv", label: "Svenska", english: "Swedish" },
1219
+ { code: "da", label: "Dansk", english: "Danish" },
1220
+ { code: "nb", label: "Norsk bokmål", english: "Norwegian Bokmål" },
1221
+ { code: "fi", label: "Suomi", english: "Finnish" },
1222
+ { code: "tr", label: "Türkçe", english: "Turkish" }
1223
+ ];
1224
+ function pe(e) {
1225
+ const t = (e ?? "").toLowerCase();
1226
+ return z.find((n) => n.code === t) ?? z.find((n) => n.code === t.split("-")[0]);
1227
+ }
1228
+ function kr(e) {
1229
+ return pe(e)?.label ?? e;
1230
+ }
1231
+ function Cr(e) {
1232
+ const t = pe(e);
1233
+ return t ? t.english === t.label ? `${t.english} (${t.code})` : `${t.english} — ${t.label} (${t.code})` : e;
1234
+ }
1235
+ const fe = 3;
1236
+ function Ze(e, t) {
1237
+ const n = /* @__PURE__ */ new Set();
1238
+ let r = 1, i = t.get(e)?.parentId;
1239
+ for (; i; ) {
1240
+ if (n.has(i) || (n.add(i), r++, r > fe + 1)) return 1 / 0;
1241
+ i = t.get(i)?.parentId;
1242
+ }
1243
+ return r;
1244
+ }
1245
+ function Nr(e, t, n) {
1246
+ if (!e) return !0;
1247
+ if (e === t) return !1;
1248
+ const r = new Map(n.map((o) => [o.id, o]));
1249
+ if (!r.has(e) || t && Qe(e, t, r)) return !1;
1250
+ const i = Ze(e, r), a = t ? me(t, n) : 1;
1251
+ return i + a <= fe;
1252
+ }
1253
+ function Qe(e, t, n) {
1254
+ const r = /* @__PURE__ */ new Set();
1255
+ let i = n.get(e)?.parentId;
1256
+ for (; i; ) {
1257
+ if (i === t) return !0;
1258
+ if (r.has(i)) return !1;
1259
+ r.add(i), i = n.get(i)?.parentId;
1260
+ }
1261
+ return !1;
1262
+ }
1263
+ function me(e, t, n = /* @__PURE__ */ new Set()) {
1264
+ if (n.has(e)) return 1;
1265
+ n.add(e);
1266
+ const r = t.filter((i) => i.parentId === e);
1267
+ return r.length ? 1 + Math.max(...r.map((i) => me(i.id, t, n))) : 1;
1268
+ }
1269
+ const et = "en";
1107
1270
  function tt(e) {
1271
+ return e.defaultLocale || e.locale || et;
1272
+ }
1273
+ function vr(e) {
1274
+ const t = /* @__PURE__ */ new Set(), n = [];
1275
+ for (const r of [tt(e), ...e.locales ?? []])
1276
+ !r || t.has(r) || (t.add(r), n.push(r));
1277
+ return n;
1278
+ }
1279
+ function Or(e, t, n) {
1280
+ const r = e.translations ?? [];
1281
+ return r.find((i) => i.locale === t)?.name ?? (n ? r.find((i) => i.locale === n)?.name : void 0) ?? e.name;
1282
+ }
1283
+ const X = ["lookup", "condition", "parallel", "for-each"];
1284
+ function Y(e) {
1285
+ for (const t of e) {
1286
+ if (!X.includes(t.type))
1287
+ return `staptype "${t.type}" mag niet meelezen (alleen ${X.join(", ")})`;
1288
+ if (t.type === "parallel")
1289
+ for (const n of t.branches ?? []) {
1290
+ const r = Y(n);
1291
+ if (r) return r;
1292
+ }
1293
+ if (t.type === "for-each") {
1294
+ const n = Y(t.body ?? []);
1295
+ if (n) return n;
1296
+ }
1297
+ }
1298
+ return null;
1299
+ }
1300
+ function nt(e, t) {
1301
+ switch (e.kind) {
1302
+ case "org":
1303
+ return !0;
1304
+ case "team":
1305
+ return !!t.teamId && e.teamId === t.teamId;
1306
+ case "personal":
1307
+ return e.userId === t.userId;
1308
+ }
1309
+ }
1310
+ function xr(e, t) {
1311
+ return e.filter((n) => n.enabled && nt(n.ownerScope, t));
1312
+ }
1313
+ function $r(e) {
1314
+ return e.credentialScope ? e.credentialScope : (e.authMode ?? "header") === "header" || e.oauth?.scope === "org" ? "shared" : "per-user";
1315
+ }
1316
+ function Rr(e) {
1317
+ return `mcp__${e}__`;
1318
+ }
1319
+ const Lr = 1e3, Dr = 2e3, Pr = 500, Kr = 12e3, Ur = 4e3, rt = ["contact", "company"];
1320
+ function jr(e) {
1321
+ if (!e) return !1;
1322
+ const t = e.slice(0, e.indexOf(":"));
1323
+ return rt.includes(t);
1324
+ }
1325
+ function it(e) {
1108
1326
  switch (e.kind) {
1109
1327
  case "user":
1110
1328
  return `user:${e.userId}`;
@@ -1114,7 +1332,7 @@ function tt(e) {
1114
1332
  return "org";
1115
1333
  }
1116
1334
  }
1117
- function fr(e) {
1335
+ function Gr(e) {
1118
1336
  if (typeof e != "string") return;
1119
1337
  const t = e.trim();
1120
1338
  if (t === "org") return { kind: "org" };
@@ -1126,10 +1344,10 @@ function fr(e) {
1126
1344
  if (r === "team") return { kind: "team", teamId: i };
1127
1345
  }
1128
1346
  }
1129
- function nt(e) {
1130
- return tt(e);
1347
+ function at(e) {
1348
+ return it(e);
1131
1349
  }
1132
- function rt(e) {
1350
+ function ot(e) {
1133
1351
  switch (e.kind) {
1134
1352
  case "personal":
1135
1353
  return { kind: "user", userId: e.userId };
@@ -1139,14 +1357,14 @@ function rt(e) {
1139
1357
  return { kind: "org" };
1140
1358
  }
1141
1359
  }
1142
- const it = rt;
1143
- function mr(e) {
1144
- return e.agentId ? { kind: "user", userId: e.agentId } : it(e.ownerScope);
1360
+ const st = ot;
1361
+ function Br(e) {
1362
+ return e.agentId ? { kind: "user", userId: e.agentId } : st(e.ownerScope);
1145
1363
  }
1146
- function gr(e) {
1147
- return nt(e);
1364
+ function Fr(e) {
1365
+ return at(e);
1148
1366
  }
1149
- function hr(e, t) {
1367
+ function Vr(e, t) {
1150
1368
  if (!t) return;
1151
1369
  let n = e;
1152
1370
  for (const r of t.split(".")) {
@@ -1155,402 +1373,204 @@ function hr(e, t) {
1155
1373
  }
1156
1374
  return n;
1157
1375
  }
1158
- function yr(e, t) {
1376
+ function Hr(e, t) {
1159
1377
  return e.targets.find((n) => n.activityTypes.includes(t));
1160
1378
  }
1161
- function Ar(e, t) {
1379
+ function Wr(e, t) {
1162
1380
  if (t)
1163
1381
  return e.targets.find((n) => n.id === t);
1164
1382
  }
1165
- function at(e) {
1383
+ function ct(e) {
1166
1384
  return e?.kind === "assignment";
1167
1385
  }
1168
- function br(e) {
1386
+ function zr(e) {
1169
1387
  const { trigger: t, agentId: n, target: r, activityType: i, assigneeUserId: a, authorUserId: o } = e;
1170
- return at(t) ? n ? r ? r.activityTypes.includes(i) ? a ? a !== n ? "assigned to someone else" : o && o === n ? "the agent assigned this to itself, which would restart its own run" : null : `no assignee found at ${r.assigneePath}` : `activity type ${i} does not announce an assignment for ${r.id}` : `assignment target kind "${t.targetKind}" is not declared by any installed app` : "this playbook has no agent, so an assignment can never be for it" : "trigger is not an assignment trigger";
1388
+ return ct(t) ? n ? r ? r.activityTypes.includes(i) ? a ? a !== n ? "assigned to someone else" : o && o === n ? "the agent assigned this to itself, which would restart its own run" : null : `no assignee found at ${r.assigneePath}` : `activity type ${i} does not announce an assignment for ${r.id}` : `assignment target kind "${t.targetKind}" is not declared by any installed app` : "this playbook has no agent, so an assignment can never be for it" : "trigger is not an assignment trigger";
1171
1389
  }
1172
- function ot(e) {
1173
- return `${e.type}:${e.id}`;
1390
+ function Xr(e) {
1391
+ return (e.startsWith("tool:") ? e.slice(5) : e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
1174
1392
  }
1175
- const st = "interaction";
1393
+ const Yr = [
1394
+ { name: "text", type: "string" },
1395
+ { name: "subject", type: "string" },
1396
+ { name: "from", type: "string" },
1397
+ { name: "type", type: "string" },
1398
+ { name: "direction", type: "string" },
1399
+ { name: "channelId", type: "string" },
1400
+ { name: "interactionId", type: "string" },
1401
+ // The work item this activity hangs off, for a playbook triggering on work instead of a
1402
+ // conversation. Exactly one of interactionId/itemId is filled.
1403
+ { name: "itemId", type: "string" },
1404
+ { name: "activityId", type: "string" },
1405
+ { name: "authorType", type: "string" },
1406
+ { name: "authorName", type: "string" },
1407
+ { name: "textRaw", type: "string" },
1408
+ // Only filled on INTERACTION_STATUS_CHANGED; a filter like `trigger.toStatus == "closed"` is
1409
+ // the trigger for "remember this when closing".
1410
+ { name: "fromStatus", type: "string" },
1411
+ { name: "toStatus", type: "string" },
1412
+ // Who this conversation is with. The identity layer records the resolution as
1413
+ // `contact:<id>`/`company:<id>` in `Interaction.partyKeys`, so this is a recorded fact and not a
1414
+ // guess via `remoteParty`. Empty while the identity is unresolved (an unknown number, a first
1415
+ // message from a new address) — so a step leaning on this should carry a `condition`.
1416
+ { name: "contactId", type: "string" },
1417
+ { name: "companyId", type: "string" },
1418
+ // Who this work is assigned to, on an activity announcing an assignment. Where that sits on
1419
+ // the activity is **declared** per source (`AssignmentTargetKind.assigneePath`), so
1420
+ // `buildTriggerVars` cannot fill it itself: the job does that with the catalog in hand, before
1421
+ // the trigger filter runs — like contactId/companyId above.
1422
+ { name: "assigneeUserId", type: "string" }
1423
+ ], qr = {
1424
+ topics: [
1425
+ { name: "topicId", type: "string" },
1426
+ { name: "topic", type: "string" },
1427
+ { name: "confidence", type: "number" },
1428
+ { name: "reasoning", type: "string" }
1429
+ ],
1430
+ question: [
1431
+ { name: "answer", type: "boolean" },
1432
+ { name: "reasoning", type: "string" }
1433
+ ],
1434
+ // Deliberately empty: the fields come from `ClassifyStep.fields` and so differ per step.
1435
+ extract: []
1436
+ };
1176
1437
  function lt(e) {
1177
- return e?.type === st ? e.id : void 0;
1438
+ return `${e.type}:${e.id}`;
1178
1439
  }
1179
- const ct = 64, ut = 8e3;
1180
- function Er(e) {
1440
+ const ut = "interaction";
1441
+ function dt(e) {
1442
+ return e?.type === ut ? e.id : void 0;
1443
+ }
1444
+ const pt = 64, ft = 8e3;
1445
+ function Jr(e) {
1181
1446
  const t = typeof e == "number" ? e : Number(String(e ?? "").trim());
1182
1447
  if (!(!Number.isFinite(t) || t <= 0))
1183
- return Math.min(Math.max(Math.round(t), ct), ut);
1448
+ return Math.min(Math.max(Math.round(t), pt), ft);
1184
1449
  }
1185
- const Sr = { kind: "workflow", steps: [] };
1186
- function _r(e) {
1450
+ const Zr = { kind: "workflow", steps: [] };
1451
+ function Qr(e) {
1187
1452
  return e?.kind === "workflow" ? e.steps : [];
1188
1453
  }
1189
- function Tr(e) {
1454
+ function ei(e) {
1190
1455
  return e?.kind === "procedure" ? e.procedure : void 0;
1191
1456
  }
1192
- const dt = ["done", "escalated", "failed", "stopped"];
1193
- function Ir(e) {
1194
- return dt.includes(e);
1457
+ const mt = ["done", "escalated", "failed", "stopped"];
1458
+ function ti(e) {
1459
+ return mt.includes(e);
1195
1460
  }
1196
- function pt(e) {
1461
+ function gt(e) {
1197
1462
  return e === "waiting";
1198
1463
  }
1199
- function Mr(e) {
1200
- return e === "running" || pt(e);
1464
+ function ni(e) {
1465
+ return e === "running" || gt(e);
1201
1466
  }
1202
1467
  function ge(e) {
1203
1468
  return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
1204
1469
  }
1205
- function Cr(e) {
1470
+ function ri(e) {
1206
1471
  const t = ge(e);
1207
- return t ? ot(t) : void 0;
1208
- }
1209
- function kr(e) {
1210
- return lt(ge(e));
1211
- }
1212
- function wr(e, t) {
1213
- const n = e.labels ?? [];
1214
- return n.find((r) => r.locale === t)?.label ?? n[0]?.label ?? e.url;
1472
+ return t ? lt(t) : void 0;
1215
1473
  }
1216
- function Nr(e, t, n) {
1217
- const r = e.translations ?? [];
1218
- return r.find((i) => i.locale === t) ?? (n ? r.find((i) => i.locale === n) : void 0) ?? { locale: t };
1474
+ function ii(e) {
1475
+ return dt(ge(e));
1219
1476
  }
1220
- const Z = [
1221
- { code: "nl", label: "Nederlands", english: "Dutch" },
1222
- { code: "en", label: "English", english: "English" },
1223
- { code: "de", label: "Deutsch", english: "German" },
1224
- { code: "fr", label: "Français", english: "French" },
1225
- { code: "es", label: "Español", english: "Spanish" },
1226
- { code: "it", label: "Italiano", english: "Italian" },
1227
- { code: "pt", label: "Português", english: "Portuguese" },
1228
- { code: "pl", label: "Polski", english: "Polish" },
1229
- { code: "sv", label: "Svenska", english: "Swedish" },
1230
- { code: "da", label: "Dansk", english: "Danish" },
1231
- { code: "nb", label: "Norsk bokmål", english: "Norwegian Bokmål" },
1232
- { code: "fi", label: "Suomi", english: "Finnish" },
1233
- { code: "tr", label: "Türkçe", english: "Turkish" }
1234
- ];
1235
- function he(e) {
1236
- const t = (e ?? "").toLowerCase();
1237
- return Z.find((n) => n.code === t) ?? Z.find((n) => n.code === t.split("-")[0]);
1477
+ function ai(e, t) {
1478
+ const n = e.accumulatedSeconds || 0;
1479
+ return e.runningSince ? n + Math.max(0, Math.floor((t - e.runningSince) / 1e3)) : n;
1238
1480
  }
1239
- function vr(e) {
1240
- return he(e)?.label ?? e;
1481
+ function oi(e, t) {
1482
+ const n = Math.max(1, Math.ceil(Math.max(0, e) / 60));
1483
+ if (!t || t === "exact") return n * 60;
1484
+ const r = Number(t);
1485
+ return !Number.isFinite(r) || r <= 0 ? n * 60 : Math.ceil(n / r) * r * 60;
1241
1486
  }
1242
- function xr(e) {
1243
- const t = he(e);
1244
- return t ? t.english === t.label ? `${t.english} (${t.code})` : `${t.english} — ${t.label} (${t.code})` : e;
1487
+ function si(e) {
1488
+ const t = Math.max(0, Math.round(e / 60));
1489
+ return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
1245
1490
  }
1246
- const ye = 3;
1247
- function ft(e, t) {
1248
- const n = /* @__PURE__ */ new Set();
1249
- let r = 1, i = t.get(e)?.parentId;
1250
- for (; i; ) {
1251
- if (n.has(i) || (n.add(i), r++, r > ye + 1)) return 1 / 0;
1252
- i = t.get(i)?.parentId;
1253
- }
1254
- return r;
1491
+ function ci(e) {
1492
+ const t = Math.max(0, Math.floor(e)), n = (a) => String(a).padStart(2, "0"), r = Math.floor(t / 60) % 60, i = Math.floor(t / 3600);
1493
+ return i > 0 ? `${i}:${n(r)}:${n(t % 60)}` : `${n(r)}:${n(t % 60)}`;
1255
1494
  }
1256
- function Or(e, t, n) {
1257
- if (!e) return !0;
1258
- if (e === t) return !1;
1259
- const r = new Map(n.map((o) => [o.id, o]));
1260
- if (!r.has(e) || t && mt(e, t, r)) return !1;
1261
- const i = ft(e, r), a = t ? Ae(t, n) : 1;
1262
- return i + a <= ye;
1495
+ function ht(e) {
1496
+ return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
1263
1497
  }
1264
- function mt(e, t, n) {
1265
- const r = /* @__PURE__ */ new Set();
1266
- let i = n.get(e)?.parentId;
1267
- for (; i; ) {
1268
- if (i === t) return !0;
1269
- if (r.has(i)) return !1;
1270
- r.add(i), i = n.get(i)?.parentId;
1498
+ function li(e, t) {
1499
+ const n = ht(e) || "werksoort", r = new Set(t);
1500
+ if (!r.has(n)) return n;
1501
+ for (let i = 2; i < 500; i++) {
1502
+ const a = `${n}-${i}`;
1503
+ if (!r.has(a)) return a;
1271
1504
  }
1272
- return !1;
1273
- }
1274
- function Ae(e, t, n = /* @__PURE__ */ new Set()) {
1275
- if (n.has(e)) return 1;
1276
- n.add(e);
1277
- const r = t.filter((i) => i.parentId === e);
1278
- return r.length ? 1 + Math.max(...r.map((i) => Ae(i.id, t, n))) : 1;
1505
+ return `${n}-${r.size + 1}`;
1279
1506
  }
1280
- const gt = "en";
1281
- function ht(e) {
1282
- return e.defaultLocale || e.locale || gt;
1507
+ function ui(e, t) {
1508
+ const n = e.ownerScope;
1509
+ return !n || n.kind === "org" ? !0 : t.includes(n.teamId);
1283
1510
  }
1284
- function $r(e) {
1285
- const t = /* @__PURE__ */ new Set(), n = [];
1286
- for (const r of [ht(e), ...e.locales ?? []])
1287
- !r || t.has(r) || (t.add(r), n.push(r));
1288
- return n;
1511
+ function di(e) {
1512
+ return e.filter((t) => !t.archived).sort(yt);
1289
1513
  }
1290
- function Rr(e, t, n) {
1291
- const r = e.translations ?? [];
1292
- return r.find((i) => i.locale === t)?.name ?? (n ? r.find((i) => i.locale === n)?.name : void 0) ?? e.name;
1514
+ function yt(e, t) {
1515
+ const n = (e.order ?? 0) - (t.order ?? 0);
1516
+ return n !== 0 ? n : (e.label || "").localeCompare(t.label || "");
1293
1517
  }
1294
- const yt = 20, At = 20, v = 300;
1518
+ const At = 20, bt = 20, k = 300;
1295
1519
  function g(e) {
1296
1520
  return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu, " ").replace(/\s+/g, " ").trim();
1297
1521
  }
1298
- function bt(e) {
1522
+ function Et(e) {
1299
1523
  const t = e.replace(/\s+/g, " ").trim();
1300
- if (t.length <= v) return t;
1301
- const n = t.slice(0, v), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
1302
- return r > v * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
1524
+ if (t.length <= k) return t;
1525
+ const n = t.slice(0, k), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
1526
+ return r > k * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
1303
1527
  }
1304
- function Lr(e, t) {
1305
- const n = bt(t.text), r = g(n);
1528
+ function pi(e, t) {
1529
+ const n = Et(t.text), r = g(n);
1306
1530
  if (!r || (e.examples ?? []).some((o) => g(o) === r)) return null;
1307
1531
  const i = e.exampleCandidates ?? [], a = i.findIndex((o) => g(o.text) === r);
1308
1532
  if (a >= 0) {
1309
1533
  if (i[a].corrected || !t.corrected) return null;
1310
1534
  const o = [...i];
1311
- return o[a] = { ...o[a], corrected: !0, addedAt: t.addedAt }, Q(o);
1535
+ return o[a] = { ...o[a], corrected: !0, addedAt: t.addedAt }, q(o);
1312
1536
  }
1313
- return Q([{ ...t, text: n }, ...i]).slice(0, At);
1537
+ return q([{ ...t, text: n }, ...i]).slice(0, bt);
1314
1538
  }
1315
- function Q(e) {
1316
- return [...e].sort((t, n) => Number(n.corrected) - Number(t.corrected) || n.addedAt - t.addedAt);
1539
+ function q(e) {
1540
+ return [...e].sort(
1541
+ (t, n) => Number(n.corrected) - Number(t.corrected) || n.addedAt - t.addedAt
1542
+ );
1317
1543
  }
1318
- function Dr(e, t) {
1544
+ function fi(e, t) {
1319
1545
  const n = g(t), r = (e.examples ?? []).filter((a) => a.trim());
1320
- return { examples: r.some((a) => g(a) === n) ? r : [...r, t].slice(-yt), exampleCandidates: Et(e, t) };
1546
+ return { examples: r.some((a) => g(a) === n) ? r : [...r, t].slice(-At), exampleCandidates: St(e, t) };
1321
1547
  }
1322
- function Et(e, t) {
1548
+ function St(e, t) {
1323
1549
  const n = g(t);
1324
1550
  return (e.exampleCandidates ?? []).filter((r) => g(r.text) !== n);
1325
1551
  }
1326
- function St(e, t) {
1552
+ function _t(e, t) {
1327
1553
  const n = e.ownerScope;
1328
1554
  return n ? n.kind === "org" ? !0 : n.kind === "team" ? !!t && n.teamId === t : !1 : !1;
1329
1555
  }
1330
- function Pr(e, t) {
1331
- return e.filter((n) => St(n, t));
1332
- }
1333
- const be = [
1334
- {
1335
- id: "openai",
1336
- attachmentKinds: ["image", "pdf"],
1337
- label: "OpenAI",
1338
- capabilities: ["chat", "transcription", "embedding"],
1339
- defaultModel: "gpt-5-mini",
1340
- baseUrl: "https://api.openai.com/v1"
1341
- },
1342
- {
1343
- id: "gemini",
1344
- attachmentKinds: ["image", "pdf"],
1345
- label: "Google Gemini",
1346
- capabilities: ["chat", "transcription", "embedding"],
1347
- defaultModel: "gemini-3.5-flash",
1348
- baseUrl: "https://generativelanguage.googleapis.com/v1beta"
1349
- },
1350
- {
1351
- id: "anthropic",
1352
- attachmentKinds: ["image", "pdf"],
1353
- label: "Anthropic",
1354
- capabilities: ["chat"],
1355
- defaultModel: "claude-haiku-4-5",
1356
- baseUrl: "https://api.anthropic.com/v1"
1357
- },
1358
- {
1359
- id: "elevenlabs",
1360
- label: "ElevenLabs",
1361
- capabilities: ["transcription"],
1362
- baseUrl: "https://api.elevenlabs.io/v1"
1363
- },
1364
- // --- Chat Completions-vendors ------------------------------------------
1365
- // Alles hieronder draait op één adapter (`OpenAiCompatibleProvider`). Een
1366
- // nieuwe toevoegen is een rij hier + een regel in `providers/registry`.
1367
- //
1368
- // `defaultModel` is bewust een alias waar de vendor er een aanbiedt
1369
- // (`mistral-large-latest`, `openrouter/auto`): losse model-ids verlopen,
1370
- // aliassen niet. Waar dat niet kan, staat het nieuwste vlaggenschip.
1371
- {
1372
- id: "moonshot",
1373
- label: "Moonshot (Kimi)",
1374
- capabilities: ["chat"],
1375
- defaultModel: "kimi-k3",
1376
- baseUrl: "https://api.moonshot.ai/v1"
1377
- },
1378
- {
1379
- id: "deepseek",
1380
- label: "DeepSeek",
1381
- capabilities: ["chat"],
1382
- defaultModel: "deepseek-v4-flash",
1383
- baseUrl: "https://api.deepseek.com/v1"
1384
- },
1385
- {
1386
- id: "groq",
1387
- label: "Groq",
1388
- capabilities: ["chat"],
1389
- defaultModel: "openai/gpt-oss-120b",
1390
- baseUrl: "https://api.groq.com/openai/v1"
1391
- },
1392
- {
1393
- id: "mistral",
1394
- label: "Mistral",
1395
- capabilities: ["chat"],
1396
- defaultModel: "mistral-large-latest",
1397
- baseUrl: "https://api.mistral.ai/v1"
1398
- },
1399
- {
1400
- id: "openrouter",
1401
- label: "OpenRouter",
1402
- capabilities: ["chat"],
1403
- // De Auto Router kiest zelf een model per prompt, dus dit verloopt niet
1404
- // mee met de wekelijks wisselende slugs in de catalogus.
1405
- defaultModel: "openrouter/auto",
1406
- baseUrl: "https://openrouter.ai/api/v1"
1407
- },
1408
- // Self-hosted: geen vaste host, de user vult er zelf een in op het account.
1409
- // Praten allemaal Chat Completions, dus dezelfde adapter.
1410
- {
1411
- id: "ollama",
1412
- label: "Ollama (self-hosted)",
1413
- capabilities: ["chat"],
1414
- defaultModel: "llama3.3"
1415
- },
1416
- {
1417
- id: "openai-compatible",
1418
- label: "OpenAI-compatible (eigen endpoint)",
1419
- capabilities: ["chat"],
1420
- // vLLM, LM Studio, een eigen gateway — model en host komen van de user.
1421
- defaultModel: "default"
1422
- }
1423
- ];
1424
- function S(e) {
1425
- return be.find((t) => t.id === e);
1426
- }
1427
- function Kr(e) {
1428
- return S(e)?.label ?? e;
1429
- }
1430
- function Ur(e, t = "gpt-5-mini") {
1431
- return S(e)?.defaultModel ?? t;
1432
- }
1433
- function jr(e) {
1434
- return be.filter((t) => t.capabilities.includes(e));
1435
- }
1436
- function Gr(e) {
1437
- const t = S(e);
1438
- return !!t && !t.baseUrl;
1439
- }
1440
- function Br(e, t) {
1441
- return t === "text" ? !0 : S(e)?.attachmentKinds?.includes(t) === !0;
1442
- }
1443
- function Fr(e, t) {
1444
- if (!e.enabled) return "ok";
1445
- const n = ee(e.hardLimitNanos), r = ee(e.softLimitNanos);
1446
- return n !== void 0 && t >= n ? "hard" : r !== void 0 && t >= r ? "soft" : "ok";
1447
- }
1448
- function ee(e) {
1449
- return typeof e == "number" ? e : void 0;
1450
- }
1451
- function _t(e, t = "month") {
1452
- const n = new Date(e);
1453
- return Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), 1);
1454
- }
1455
- function Vr(e, t = "month") {
1456
- const n = new Date(_t(e, t));
1457
- return `${n.getUTCFullYear()}-${String(n.getUTCMonth() + 1).padStart(2, "0")}`;
1458
- }
1459
- function Hr(e) {
1460
- return e?.listeningEnabled !== !1;
1461
- }
1462
- function Wr(e) {
1463
- return e.credentialScope ? e.credentialScope : (e.authMode ?? "header") === "header" || e.oauth?.scope === "org" ? "shared" : "per-user";
1464
- }
1465
- function zr(e) {
1466
- return `mcp__${e}__`;
1467
- }
1468
- const Xr = /* @__PURE__ */ new Set(["mail", "message"]);
1469
- function Tt(e, t) {
1470
- const n = e.settings?.signatures?.[t];
1471
- return !n || !n.enabled || !n.body || n.body.trim() === "" ? null : n;
1472
- }
1473
- function Yr(e, t, n, r = "html") {
1474
- if (!e) return n;
1475
- const i = Tt(e, t);
1476
- return i ? `${n}${r === "text" ? `
1477
-
1478
- ` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${i.body}` : n;
1479
- }
1480
- function qr(e) {
1481
- return e.endpoints ?? [];
1482
- }
1483
- const Jr = (e) => !!e.assignedUserId || !!e.assignedInboxId, Zr = (e) => e.status === "closed", Qr = (e) => ({
1484
- urgent: 10,
1485
- high: 5,
1486
- normal: 2,
1487
- low: 1
1488
- })[e.priority] || 0, ei = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
1489
- function ti(e, t) {
1490
- return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
1491
- }
1492
- const ni = 1e3, ri = 2e3, ii = 500, ai = 12e3, oi = 4e3, It = ["contact", "company"];
1493
- function si(e) {
1494
- if (!e) return !1;
1495
- const t = e.slice(0, e.indexOf(":"));
1496
- return It.includes(t);
1497
- }
1498
- function li(e, t) {
1499
- const n = e.accumulatedSeconds || 0;
1500
- return e.runningSince ? n + Math.max(0, Math.floor((t - e.runningSince) / 1e3)) : n;
1501
- }
1502
- function ci(e, t) {
1503
- const n = Math.max(1, Math.ceil(Math.max(0, e) / 60));
1504
- if (!t || t === "exact") return n * 60;
1505
- const r = Number(t);
1506
- return !Number.isFinite(r) || r <= 0 ? n * 60 : Math.ceil(n / r) * r * 60;
1507
- }
1508
- function ui(e) {
1509
- const t = Math.max(0, Math.round(e / 60));
1510
- return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
1511
- }
1512
- function di(e) {
1513
- const t = Math.max(0, Math.floor(e)), n = (a) => String(a).padStart(2, "0"), r = Math.floor(t / 60) % 60, i = Math.floor(t / 3600);
1514
- return i > 0 ? `${i}:${n(r)}:${n(t % 60)}` : `${n(r)}:${n(t % 60)}`;
1515
- }
1516
- function Mt(e) {
1517
- return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
1518
- }
1519
- function pi(e, t) {
1520
- const n = Mt(e) || "werksoort", r = new Set(t);
1521
- if (!r.has(n)) return n;
1522
- for (let i = 2; i < 500; i++) {
1523
- const a = `${n}-${i}`;
1524
- if (!r.has(a)) return a;
1525
- }
1526
- return `${n}-${r.size + 1}`;
1527
- }
1528
- function fi(e, t) {
1529
- const n = e.ownerScope;
1530
- return !n || n.kind === "org" ? !0 : t.includes(n.teamId);
1531
- }
1532
- function mi(e) {
1533
- return e.filter((t) => !t.archived).sort(Ct);
1534
- }
1535
- function Ct(e, t) {
1536
- const n = (e.order ?? 0) - (t.order ?? 0);
1537
- return n !== 0 ? n : (e.label || "").localeCompare(t.label || "");
1556
+ function mi(e, t) {
1557
+ return e.filter((n) => _t(n, t));
1538
1558
  }
1539
1559
  function gi(e) {
1540
1560
  return e.type === "agent";
1541
1561
  }
1542
- const kt = "work_item", wt = "work_project";
1543
- function Nt(e) {
1544
- return `${kt}:${e}`;
1562
+ const hi = "WORK_COMMENT_ADDED", yi = "WORK_ITEM_ASSIGNED", Tt = "work_item", It = "work_project";
1563
+ function wt(e) {
1564
+ return `${Tt}:${e}`;
1545
1565
  }
1546
- function Ee(e) {
1547
- return `${wt}:${e}`;
1566
+ function he(e) {
1567
+ return `${It}:${e}`;
1548
1568
  }
1549
- function hi(e, t, n) {
1569
+ function Ai(e, t, n) {
1550
1570
  const r = `${e}-${t}`;
1551
1571
  return n ? `${r}-${n}` : r;
1552
1572
  }
1553
- function yi(e) {
1573
+ function bi(e) {
1554
1574
  const t = /^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e || "").trim());
1555
1575
  return t ? {
1556
1576
  projectKey: t[1].toUpperCase(),
@@ -1558,329 +1578,71 @@ function yi(e) {
1558
1578
  ...t[3] ? { subSequence: Number(t[3]) } : {}
1559
1579
  } : null;
1560
1580
  }
1561
- function Ai(e) {
1581
+ function Ei(e) {
1562
1582
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 3) || "PRJ";
1563
1583
  }
1564
- function bi(e, t = 25) {
1565
- const n = /* @__PURE__ */ new Set([Nt(e.id)]);
1566
- e.projectId && n.add(Ee(e.projectId));
1584
+ function Si(e, t = 25) {
1585
+ const n = /* @__PURE__ */ new Set([wt(e.id)]);
1586
+ e.projectId && n.add(he(e.projectId));
1567
1587
  for (const r of e.ancestorKeys ?? []) n.add(r);
1568
1588
  for (const r of e.partyKeys ?? []) n.add(r);
1569
1589
  return Array.from(n).slice(0, t);
1570
1590
  }
1571
- function Ei(e) {
1572
- return [Ee(e.id)];
1591
+ function _i(e) {
1592
+ return [he(e.id)];
1573
1593
  }
1574
- const $ = [
1594
+ const v = [
1575
1595
  { key: "open", label: "status_open", category: "todo", order: 0 },
1576
1596
  { key: "in_progress", label: "status_in_progress", category: "in_progress", order: 1 },
1577
1597
  { key: "done", label: "status_done", category: "done", order: 2 }
1578
- ], Se = $.map((e) => e.key);
1579
- function vt(e) {
1580
- return e?.statuses?.length ? e.statuses : $;
1598
+ ], ye = v.map((e) => e.key);
1599
+ function Mt(e) {
1600
+ return e?.statuses?.length ? e.statuses : v;
1581
1601
  }
1582
- function xt(e, t) {
1602
+ function kt(e, t) {
1583
1603
  return t.find((n) => n.key === e)?.category ?? "todo";
1584
1604
  }
1585
- function Si(e, t) {
1605
+ function Ti(e, t) {
1586
1606
  return t.find((n) => n.key === e);
1587
1607
  }
1588
- function _i(e) {
1589
- const t = vt(e), n = e?.defaultStatusKey;
1590
- return n && t.some((r) => r.key === n) ? n : Ot(t)[0]?.key ?? $[0].key;
1608
+ function Ii(e) {
1609
+ const t = Mt(e), n = e?.defaultStatusKey;
1610
+ return n && t.some((r) => r.key === n) ? n : Ct(t)[0]?.key ?? v[0].key;
1591
1611
  }
1592
- function Ot(e) {
1612
+ function Ct(e) {
1593
1613
  return [...e].sort((t, n) => {
1594
1614
  const r = (t.order ?? 0) - (n.order ?? 0);
1595
1615
  return r !== 0 ? r : (t.label || "").localeCompare(n.label || "");
1596
1616
  });
1597
1617
  }
1598
- function Ti(e, t) {
1599
- return xt(e, t) === "done";
1600
- }
1601
- function $t(e) {
1602
- return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
1603
- }
1604
- function Ii(e, t) {
1605
- const n = $t(e) || "status", r = /* @__PURE__ */ new Set([...t, ...Se]);
1606
- if (!r.has(n)) return n;
1607
- for (let i = 2; i < 500; i++) {
1608
- const a = `${n}-${i}`;
1609
- if (!r.has(a)) return a;
1610
- }
1611
- return `${n}-${r.size + 1}`;
1612
- }
1613
- function Mi(e) {
1614
- const t = [];
1615
- if (!e.length) return [{ index: -1, reason: "empty" }];
1616
- const n = /* @__PURE__ */ new Set();
1617
- return e.forEach((r, i) => {
1618
- if (!r.key) {
1619
- t.push({ index: i, reason: "missing_key" });
1620
- return;
1621
- }
1622
- Se.includes(r.key) && t.push({ index: i, reason: "reserved_key", key: r.key }), n.has(r.key) && t.push({ index: i, reason: "duplicate_key", key: r.key }), n.add(r.key);
1623
- }), e.some((r) => r.category === "todo" || r.category === "in_progress") || t.push({ index: -1, reason: "no_open" }), e.some((r) => r.category === "done") || t.push({ index: -1, reason: "no_done" }), t;
1624
- }
1625
- const R = {
1626
- // The lower bounds are deliberately generous: service ranges (0800/0900) are
1627
- // shorter than geographic numbers, and a too-strict minimum silently drops them.
1628
- // An over-permissive key is harmless — it simply matches nothing.
1629
- NL: { callingCode: "31", trunkPrefix: "0", nsnMin: 7, nsnMax: 9 },
1630
- BE: { callingCode: "32", trunkPrefix: "0", nsnMin: 8, nsnMax: 9 },
1631
- LU: { callingCode: "352", nsnMin: 6, nsnMax: 9 },
1632
- DE: { callingCode: "49", trunkPrefix: "0", nsnMin: 6, nsnMax: 13 },
1633
- FR: { callingCode: "33", trunkPrefix: "0", nsnMin: 9, nsnMax: 9 },
1634
- GB: { callingCode: "44", trunkPrefix: "0", nsnMin: 9, nsnMax: 10 },
1635
- IE: { callingCode: "353", trunkPrefix: "0", nsnMin: 7, nsnMax: 9 },
1636
- ES: { callingCode: "34", nsnMin: 9, nsnMax: 9 },
1637
- PT: { callingCode: "351", nsnMin: 9, nsnMax: 9 },
1638
- IT: { callingCode: "39", nsnMin: 6, nsnMax: 11 },
1639
- AT: { callingCode: "43", trunkPrefix: "0", nsnMin: 7, nsnMax: 13 },
1640
- CH: { callingCode: "41", trunkPrefix: "0", nsnMin: 9, nsnMax: 9 },
1641
- DK: { callingCode: "45", nsnMin: 8, nsnMax: 8 },
1642
- SE: { callingCode: "46", trunkPrefix: "0", nsnMin: 7, nsnMax: 13 },
1643
- NO: { callingCode: "47", nsnMin: 8, nsnMax: 8 },
1644
- FI: { callingCode: "358", trunkPrefix: "0", nsnMin: 5, nsnMax: 12 },
1645
- PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
1646
- US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
1647
- CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
1648
- }, Rt = "NL", Lt = 15, Dt = 8, Pt = Array.from(
1649
- new Set(Object.values(R).map((e) => e.callingCode))
1650
- ).sort((e, t) => t.length - e.length);
1651
- function te(e) {
1652
- if (e)
1653
- return R[e.trim().toUpperCase()];
1654
- }
1655
- function E(e, t) {
1656
- return e.length >= t.nsnMin && e.length <= t.nsnMax;
1657
- }
1658
- function ne(e) {
1659
- if (e.length > Lt) return null;
1660
- for (const t of Pt) {
1661
- if (!e.startsWith(t)) continue;
1662
- const n = e.slice(t.length);
1663
- for (const r of Object.values(R)) {
1664
- if (r.callingCode !== t) continue;
1665
- const i = r.trunkPrefix, a = i && n.startsWith(i) ? n.slice(i.length) : n;
1666
- if (E(a, r)) return `+${t}${a}`;
1667
- }
1668
- return null;
1669
- }
1670
- return e.length < Dt ? null : `+${e}`;
1671
- }
1672
- function Kt(e) {
1673
- let t = e.trim();
1674
- const n = t.match(/^(sips?|tel|whatsapp):/i);
1675
- n && (t = t.slice(n[0].length));
1676
- const r = t.indexOf("@");
1677
- return r >= 0 && (t = t.slice(0, r)), t.trim();
1678
- }
1679
- function Ci(e) {
1680
- if (!e) return !1;
1681
- const t = e.indexOf("@");
1682
- if (t <= 0) return !1;
1683
- const n = e.slice(0, t).trim();
1684
- return !/^[+\d\s().-]+$/.test(n);
1685
- }
1686
- function re(e, t) {
1687
- if (!e) return null;
1688
- const n = Kt(e);
1689
- if (!n) return null;
1690
- const r = n.startsWith("+"), i = n.replace(/\D/g, "");
1691
- if (!i) return null;
1692
- if (r) return ne(i);
1693
- if (i.startsWith("00")) return ne(i.slice(2));
1694
- const a = te(t) ?? te(Rt);
1695
- if (!a) return null;
1696
- const o = a.trunkPrefix;
1697
- if (o && i.startsWith(o)) {
1698
- const s = i.slice(o.length);
1699
- return E(s, a) ? `+${a.callingCode}${s}` : null;
1700
- }
1701
- if (i.startsWith(a.callingCode)) {
1702
- const s = i.slice(a.callingCode.length);
1703
- if (E(s, a)) return `+${a.callingCode}${s}`;
1704
- }
1705
- return !o && E(i, a) ? `+${a.callingCode}${i}` : null;
1706
- }
1707
- function ki(e, t = 9) {
1708
- const n = (e ?? "").replace(/\D/g, "");
1709
- return n.length < t ? null : n.slice(-t);
1710
- }
1711
- function _e(e) {
1712
- if (!e) return null;
1713
- const t = e.trim().toLowerCase(), n = t.lastIndexOf("@");
1714
- if (n <= 0 || n === t.length - 1) return null;
1715
- const r = t.slice(0, n).split("+")[0], i = t.slice(n + 1);
1716
- return !r || !i.includes(".") ? null : `${r}@${i}`;
1717
- }
1718
- function wi(e) {
1719
- const t = _e(e);
1720
- return t ? t.slice(t.lastIndexOf("@") + 1) : null;
1721
- }
1722
- const Ut = /* @__PURE__ */ new Set([
1723
- "co.uk",
1724
- "org.uk",
1725
- "gov.uk",
1726
- "ac.uk",
1727
- "com.au",
1728
- "co.nz",
1729
- "com.br",
1730
- "co.za"
1731
- ]);
1732
- function jt(e) {
1733
- if (!e) return null;
1734
- const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
1735
- if (t.length < 2) return null;
1736
- const n = t.slice(-2).join(".");
1737
- return Ut.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
1738
- }
1739
- const Gt = /* @__PURE__ */ new Set([
1740
- "gmail.com",
1741
- "googlemail.com",
1742
- "outlook.com",
1743
- "hotmail.com",
1744
- "hotmail.nl",
1745
- "hotmail.be",
1746
- "hotmail.co.uk",
1747
- "live.com",
1748
- "live.nl",
1749
- "live.be",
1750
- "msn.com",
1751
- "yahoo.com",
1752
- "yahoo.co.uk",
1753
- "ymail.com",
1754
- "icloud.com",
1755
- "me.com",
1756
- "mac.com",
1757
- "aol.com",
1758
- "gmx.net",
1759
- "gmx.de",
1760
- "web.de",
1761
- "protonmail.com",
1762
- "proton.me",
1763
- "pm.me",
1764
- "tutanota.com",
1765
- "zoho.com",
1766
- "mail.com",
1767
- "ziggo.nl",
1768
- "kpnmail.nl",
1769
- "planet.nl",
1770
- "home.nl",
1771
- "casema.nl",
1772
- "chello.nl",
1773
- "xs4all.nl",
1774
- "telfort.nl",
1775
- "hetnet.nl",
1776
- "zonnet.nl",
1777
- "upcmail.nl",
1778
- "quicknet.nl",
1779
- "telenet.be",
1780
- "skynet.be",
1781
- "proximus.be",
1782
- "scarlet.be"
1783
- ]);
1784
- function Ni(e) {
1785
- const t = jt(e);
1786
- return t ? Gt.has(t) : !1;
1787
- }
1788
- function vi(e) {
1789
- if (!e) return !1;
1790
- const t = e.trim().toLowerCase();
1791
- return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
1792
- }
1793
- function xi(e, t, n) {
1794
- if (!e || !t) return null;
1795
- const r = e.trim().toLowerCase();
1796
- if (r === "tel" || r === "sms" || r === "whatsapp") {
1797
- const a = re(t, n);
1798
- return a ? `tel:${a}` : null;
1799
- }
1800
- if (r === "fax") {
1801
- const a = re(t, n);
1802
- return a ? `fax:${a}` : null;
1803
- }
1804
- if (r === "mailto" || r === "email") {
1805
- const a = _e(t);
1806
- return a ? `mailto:${a}` : null;
1807
- }
1808
- const i = t.trim().toLowerCase();
1809
- return i ? `${r}:${i}` : null;
1810
- }
1811
- const Bt = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, Ft = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
1812
- function Oi(e) {
1813
- if (typeof e != "string" || !e) return "";
1814
- let t = e;
1815
- 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(`
1816
- `).map(
1817
- (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,}$/, "")
1818
- ).join(`
1819
- `), t = t.replace(Bt, "$2"), t = t.replace(Ft, "$2"), t = t.replace(/~~(?=\S)([\s\S]*?\S)~~/g, "$1"), t = t.replace(/`([^`\n]+)`/g, "$1"), t.replace(/\s+/g, " ").trim();
1820
- }
1821
- const Vt = [
1822
- /<blockquote/i,
1823
- /class="?gmail_quote/i,
1824
- // Gmail quote container
1825
- /id="?[^"]*divRplyFwdMsg/i,
1826
- // Outlook web reply/forward header
1827
- /id="?[^"]*mail-editor-reference-message-container/i,
1828
- // Outlook new/"mail editor" quote container
1829
- /-{3,}\s*Original Message\s*-{3,}/i,
1830
- /\n_{5,}\s*\n/,
1831
- // Outlook underscore separator before "From:"
1832
- /\bOn\b[\s\S]{0,200}?\bwrote:/i
1833
- // Gmail "On <date> <name> wrote:"
1834
- ], ie = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, Ht = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
1835
- function Wt(e) {
1836
- const t = e.split(`
1837
- `);
1838
- for (let n = 0; n < t.length; n++)
1839
- if (Ht.test(t[n]) || ie.test(t[n]) && t.slice(n + 1, n + 4).some((r) => ie.test(r)))
1840
- return t.slice(0, n).join(`
1841
- `).trim();
1842
- return e;
1843
- }
1844
- function ae(e) {
1845
- let t = e;
1846
- return t = t.replace(/<(script|style)[\s\S]*?<\/\1>/gi, ""), t = t.replace(/<br\s*\/?>/gi, `
1847
- `), t = t.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
1848
-
1849
- `), t = t.replace(/<\/(div|li|tr)>/gi, `
1850
- `), t = t.replace(/<\/(td|th)>/gi, " "), t = t.replace(/<[^>]+>/g, ""), t = t.replace(/<[^>]*$/, ""), t;
1851
- }
1852
- function oe(e) {
1853
- return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
1854
- }
1855
- function se(e) {
1856
- return e.replace(/&nbsp;/gi, " ").replace(/&lt;/gi, "<").replace(/&gt;/gi, ">").replace(/&quot;/gi, '"').replace(/&#(\d+);/g, (t, n) => oe(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => oe(parseInt(n, 16)) ?? t).replace(/&amp;/gi, "&");
1857
- }
1858
- function le(e) {
1859
- return e.replace(/\r/g, "").replace(/[ \t]+/g, " ").replace(/ *\n */g, `
1860
- `).replace(/\n{3,}/g, `
1861
-
1862
- `).trim();
1863
- }
1864
- function $i(e) {
1865
- if (typeof e != "string" || !e) return "";
1866
- let t = e.length;
1867
- for (const a of Vt) {
1868
- const o = e.search(a);
1869
- o >= 0 && o < t && (t = o);
1870
- }
1871
- const n = e.slice(0, t);
1872
- let r = le(se(ae(n)));
1873
- return r || (r = le(se(ae(e)))), Wt(r) || r;
1618
+ function wi(e, t) {
1619
+ return kt(e, t) === "done";
1874
1620
  }
1875
- const zt = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, Xt = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
1876
- function Ri(e, t) {
1877
- return !!(e && zt.test(e) || t && Xt.test(t));
1621
+ function Nt(e) {
1622
+ return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
1878
1623
  }
1879
- const Yt = 3, qt = 600;
1880
- function Li(e, t) {
1881
- return e >= Yt || t >= qt;
1624
+ function Mi(e, t) {
1625
+ const n = Nt(e) || "status", r = /* @__PURE__ */ new Set([...t, ...ye]);
1626
+ if (!r.has(n)) return n;
1627
+ for (let i = 2; i < 500; i++) {
1628
+ const a = `${n}-${i}`;
1629
+ if (!r.has(a)) return a;
1630
+ }
1631
+ return `${n}-${r.size + 1}`;
1632
+ }
1633
+ function ki(e) {
1634
+ const t = [];
1635
+ if (!e.length) return [{ index: -1, reason: "empty" }];
1636
+ const n = /* @__PURE__ */ new Set();
1637
+ return e.forEach((r, i) => {
1638
+ if (!r.key) {
1639
+ t.push({ index: i, reason: "missing_key" });
1640
+ return;
1641
+ }
1642
+ ye.includes(r.key) && t.push({ index: i, reason: "reserved_key", key: r.key }), n.has(r.key) && t.push({ index: i, reason: "duplicate_key", key: r.key }), n.add(r.key);
1643
+ }), e.some((r) => r.category === "todo" || r.category === "in_progress") || t.push({ index: -1, reason: "no_open" }), e.some((r) => r.category === "done") || t.push({ index: -1, reason: "no_done" }), t;
1882
1644
  }
1883
- const Jt = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), Zt = /* @__PURE__ */ new Set([
1645
+ const vt = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), Ot = /* @__PURE__ */ new Set([
1884
1646
  "text/plain",
1885
1647
  "text/markdown",
1886
1648
  "text/csv",
@@ -1889,55 +1651,55 @@ const Jt = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "ima
1889
1651
  "application/xml",
1890
1652
  "text/xml"
1891
1653
  ]);
1892
- function Qt(e) {
1654
+ function xt(e) {
1893
1655
  const t = (e ?? "").trim().toLowerCase().split(";")[0];
1894
- return t ? Jt.has(t) ? "image" : t === "application/pdf" ? "pdf" : Zt.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
1656
+ return t ? vt.has(t) ? "image" : t === "application/pdf" ? "pdf" : Ot.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
1895
1657
  }
1896
- const h = 1024 * 1024, en = {
1658
+ const h = 1024 * 1024, $t = {
1897
1659
  image: 5 * h,
1898
1660
  pdf: 20 * h,
1899
1661
  text: 1 * h,
1900
1662
  audio: 20 * h
1901
- }, Di = 25 * h, Pi = 5;
1902
- function Ki(e, t) {
1903
- const n = Qt(e);
1904
- return n === "unsupported" ? "unsupported" : t > en[n] ? "too-large" : null;
1663
+ }, Ci = 25 * h, Ni = 5;
1664
+ function vi(e, t) {
1665
+ const n = xt(e);
1666
+ return n === "unsupported" ? "unsupported" : t > $t[n] ? "too-large" : null;
1905
1667
  }
1906
- function tn(e) {
1668
+ function Rt(e) {
1907
1669
  return `${e.kind}:${e.id || e.url || e.title}`;
1908
1670
  }
1909
- function Ui(e, t = []) {
1671
+ function Oi(e, t = []) {
1910
1672
  const n = new Set(t), r = [], i = [];
1911
1673
  for (const a of e) {
1912
- const o = tn(a);
1674
+ const o = Rt(a);
1913
1675
  n.has(o) || (n.add(o), r.push(a), i.push(o));
1914
1676
  }
1915
1677
  return { sources: r, keys: i };
1916
1678
  }
1917
- function ji(e) {
1679
+ function xi(e) {
1918
1680
  return e.sessions.filter(
1919
1681
  (t) => t.id !== e.exceptSessionId && t.state === "connected" && e.canHold(t.providerId)
1920
1682
  );
1921
1683
  }
1922
- function Gi(e) {
1684
+ function $i(e) {
1923
1685
  return e.sessions.filter(
1924
1686
  (t) => t.id !== e.exceptSessionId && t.state === "connected" && !e.canHold(t.providerId)
1925
1687
  );
1926
1688
  }
1927
- function Bi(e) {
1689
+ function Ri(e) {
1928
1690
  return e.sessions.some(
1929
1691
  (n) => n.id !== e.exceptSessionId && (n.state === "connected" || n.state === "on_hold")
1930
1692
  ) ? { admit: !1, reason: "busy" } : { admit: !0 };
1931
1693
  }
1932
- function nn(e, t) {
1933
- const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, i = t.intents.filter((o) => !n.has(o.intent)).map((o) => an(o, r[o.intent]));
1694
+ function Lt(e, t) {
1695
+ const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, i = t.intents.filter((o) => !n.has(o.intent)).map((o) => Pt(o, r[o.intent]));
1934
1696
  if (!e.extraIntents || e.extraIntents.length === 0) return i;
1935
1697
  const a = new Set(i.map((o) => o.intent));
1936
1698
  for (const o of e.extraIntents)
1937
1699
  a.has(o.intent) || (i.push(o), a.add(o.intent));
1938
1700
  return i;
1939
1701
  }
1940
- function rn(e, t) {
1702
+ function Dt(e, t) {
1941
1703
  const n = {};
1942
1704
  for (const r of e.intents) {
1943
1705
  if (!r.togglable) continue;
@@ -1946,46 +1708,46 @@ function rn(e, t) {
1946
1708
  }
1947
1709
  return n;
1948
1710
  }
1949
- function Fi(e, t) {
1950
- const n = rn(e, t);
1711
+ function Li(e, t) {
1712
+ const n = Dt(e, t);
1951
1713
  return Object.entries(n).filter(([, r]) => !r).map(([r]) => r);
1952
1714
  }
1953
- function an(e, t) {
1715
+ function Pt(e, t) {
1954
1716
  return t ? {
1955
1717
  intent: t.intent ?? e.intent,
1956
1718
  targetSchemes: t.targetSchemes ?? e.targetSchemes,
1957
1719
  transport: t.transport ?? e.transport
1958
1720
  } : e;
1959
1721
  }
1960
- function Vi(e, t) {
1722
+ function Di(e, t) {
1961
1723
  const n = [];
1962
1724
  for (const r of e) {
1963
1725
  if (!r.enabled) continue;
1964
1726
  const i = t[r.providerId];
1965
1727
  if (i)
1966
- for (const a of nn(r, i))
1728
+ for (const a of Lt(r, i))
1967
1729
  n.push({ channel: r, description: i, capability: a });
1968
1730
  }
1969
1731
  return n;
1970
1732
  }
1971
- function Hi(e, t) {
1733
+ function Pi(e, t) {
1972
1734
  return t.filter((n) => n.capability.intent === e);
1973
1735
  }
1974
- function on(e, t) {
1736
+ function Kt(e, t) {
1975
1737
  return t.filter((n) => n.capability.targetSchemes.includes(e));
1976
1738
  }
1977
- function Wi(e, t) {
1978
- return on(e.scheme, t);
1739
+ function Ki(e, t) {
1740
+ return Kt(e.scheme, t);
1979
1741
  }
1980
- function zi(e, t, n) {
1742
+ function Ui(e, t, n) {
1981
1743
  const r = [];
1982
1744
  for (const i of e)
1983
1745
  for (const a of n)
1984
1746
  a.capability.intent === t && a.capability.targetSchemes.includes(i.scheme) && r.push({ channelIntent: a, endpoint: i });
1985
1747
  return r;
1986
1748
  }
1987
- var sn = /* @__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))(sn || {});
1988
- const ln = {
1749
+ var Ut = /* @__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))(Ut || {});
1750
+ const jt = {
1989
1751
  mailto: "mail",
1990
1752
  sip: "tel",
1991
1753
  tel: "tel",
@@ -1997,9 +1759,8 @@ const ln = {
1997
1759
  instagram: "chat",
1998
1760
  viber: "chat",
1999
1761
  whatsapp: "wa",
2000
- // Not ways of reaching a person: a webhook is a machine, a URL is a page,
2001
- // a calendar entry is an appointment, and username/id/custom say nothing
2002
- // about transport on their own.
1762
+ // Not ways of reaching a person: a webhook is a machine, a URL is a page, a
1763
+ // calendar entry is an appointment; username/id/custom say nothing about transport.
2003
1764
  webhook: "note",
2004
1765
  url: "note",
2005
1766
  calendar: "note",
@@ -2007,10 +1768,10 @@ const ln = {
2007
1768
  id: "note",
2008
1769
  custom: "note"
2009
1770
  };
2010
- function Xi(e) {
2011
- return e ? ln[e] ?? "note" : "note";
1771
+ function ji(e) {
1772
+ return e ? jt[e] ?? "note" : "note";
2012
1773
  }
2013
- const Yi = "message_window", qi = "message_templates", Ji = {
1774
+ const Gi = "message_window", Bi = "message_templates", Fi = {
2014
1775
  // E-mail
2015
1776
  FROM: "from",
2016
1777
  TO: "to",
@@ -2027,47 +1788,201 @@ const Yi = "message_window", qi = "message_templates", Ji = {
2027
1788
  // Voice/conference
2028
1789
  HOST: "host",
2029
1790
  PARTICIPANT: "participant"
2030
- }, Zi = (e, t) => ({ intent: e, ...t }), Qi = "folder_management", ea = "remote_search", ta = { ok: !1, code: "UNSUPPORTED", message: "Provider does not support this op" }, na = "resources.describe", ra = "resources.search", ia = "resources.resolve";
2031
- function aa(e) {
1791
+ }, Vi = (e, t) => ({ intent: e, ...t }), Hi = "folder_management", Wi = "remote_search", zi = {
1792
+ ok: !1,
1793
+ code: "UNSUPPORTED",
1794
+ message: "Provider does not support this op"
1795
+ }, Xi = "installation-id", Yi = {
1796
+ ai: [
1797
+ "account.read",
1798
+ "account.write",
1799
+ "agent.read",
1800
+ "agent.write",
1801
+ "assignment.read",
1802
+ "budget.read",
1803
+ "budget.write",
1804
+ "connector.read",
1805
+ "connector.write",
1806
+ "context.read",
1807
+ "context.write",
1808
+ "conversation.read",
1809
+ "conversation.write",
1810
+ "lens.read",
1811
+ "lens.write",
1812
+ "message.read",
1813
+ "message.write",
1814
+ "playbook.read",
1815
+ "playbook.write",
1816
+ "profile.read",
1817
+ "profile.write",
1818
+ "run.read",
1819
+ "run.write",
1820
+ "settings.read",
1821
+ "settings.write",
1822
+ "tool.read",
1823
+ "transcript.write",
1824
+ "usage.read"
1825
+ ],
1826
+ analytics: ["report.read"],
1827
+ "app-store": ["app.publish", "app.read", "app.write", "setting.read", "setting.write"],
1828
+ automations: ["sync.read", "sync.write", "webhook.read", "webhook.write"],
1829
+ communication: [
1830
+ "account.read",
1831
+ "account.write",
1832
+ "activity-type.read",
1833
+ "activity.read",
1834
+ "activity.write",
1835
+ "attachment.read",
1836
+ "attribute.read",
1837
+ "attribute.write",
1838
+ "calendar.read",
1839
+ "calendar.write",
1840
+ "channel.read",
1841
+ "channel.write",
1842
+ "custom-field.read",
1843
+ "custom-field.write",
1844
+ "folder.read",
1845
+ "folder.write",
1846
+ "inbox.read",
1847
+ "inbox.write",
1848
+ "interaction.read",
1849
+ "interaction.write",
1850
+ "reminder.read",
1851
+ "task.read",
1852
+ "task.write",
1853
+ "template.read",
1854
+ "template.write",
1855
+ "topic.read",
1856
+ "topic.write"
1857
+ ],
1858
+ context: ["kind.read", "kind.write", "memory.read", "memory.write"],
1859
+ crm: ["company.read", "company.write", "contact.read", "contact.write"],
1860
+ "eylo-voip": [
1861
+ "account.read",
1862
+ "account.write",
1863
+ "callflow.read",
1864
+ "callflow.write",
1865
+ "channel.read",
1866
+ "channel.write",
1867
+ "contact.read",
1868
+ "contact.write",
1869
+ "device.read",
1870
+ "device.write",
1871
+ "group.read",
1872
+ "group.write",
1873
+ "interaction.read",
1874
+ "interaction.write",
1875
+ "media.read",
1876
+ "media.write",
1877
+ "menu.read",
1878
+ "menu.write",
1879
+ "phone-number.read",
1880
+ "phone-number.write",
1881
+ "recording.read",
1882
+ "recording.write",
1883
+ "sip.read",
1884
+ "temporal-rule.read",
1885
+ "temporal-rule.write",
1886
+ "user.read",
1887
+ "user.write",
1888
+ "vmbox.read",
1889
+ "vmbox.write",
1890
+ "webhook.read",
1891
+ "webhook.write"
1892
+ ],
1893
+ google: ["account.read", "account.write", "contact.read"],
1894
+ kb: [
1895
+ "article.read",
1896
+ "article.write",
1897
+ "category.read",
1898
+ "category.write",
1899
+ "help-center.read",
1900
+ "help-center.write",
1901
+ "kb.read",
1902
+ "kb.write"
1903
+ ],
1904
+ mail: ["account.write"],
1905
+ meta: ["account.read", "account.write"],
1906
+ microsoft: ["account.read", "account.write", "contact.read", "sync.write"],
1907
+ organization: [
1908
+ "billing.read",
1909
+ "billing.write",
1910
+ "settings.read",
1911
+ "settings.write",
1912
+ "team.read",
1913
+ "team.write"
1914
+ ],
1915
+ shopify: ["account.read", "account.write", "order.read"],
1916
+ slack: ["thread.read", "thread.write"],
1917
+ storage: [
1918
+ "artifact.read",
1919
+ "artifact.write",
1920
+ "file.read",
1921
+ "file.write",
1922
+ "mount.read",
1923
+ "mount.write"
1924
+ ],
1925
+ time: ["entry.read", "entry.write", "work-type.read", "work-type.write"],
1926
+ user: ["user.read", "user.write"],
1927
+ work: ["item.read", "item.write", "project.read", "project.write"]
1928
+ }, Ae = 9e4, Gt = ["out_of_office"], be = (e) => Gt.includes(e);
1929
+ function qi(e, t, n) {
1930
+ const r = n - e < Ae, i = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
1931
+ if (!i?.status) return { online: r, status: r ? "available" : "offline" };
1932
+ const a = i.status;
1933
+ return !r && !be(a) ? { online: !1, status: "offline" } : { online: r, status: a, message: i.message };
1934
+ }
1935
+ function Ji(e, t) {
1936
+ const n = t - e.lastSeenAt < Ae, r = n || be(e.status) ? e.status : "offline";
1937
+ return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
1938
+ }
1939
+ function Zi(e, t) {
1940
+ return e?.teamId && t.includes(e.teamId) ? { teamId: e.teamId, mustChoose: !1 } : t.length === 1 ? { teamId: t[0], mustChoose: !1 } : { teamId: void 0, mustChoose: t.length > 1 };
1941
+ }
1942
+ function Qi(e) {
1943
+ return e.providerAvailable && e.allowed;
1944
+ }
1945
+ const ea = "resources.describe", ta = "resources.search", na = "resources.resolve";
1946
+ function ra(e) {
2032
1947
  const t = e.indexOf(":");
2033
1948
  return t === -1 ? e : e.slice(0, t);
2034
1949
  }
2035
- const Te = "auth";
2036
- function Ie(e) {
1950
+ const Ee = "auth";
1951
+ function Se(e) {
2037
1952
  const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
2038
1953
  return t ? t[1] : null;
2039
1954
  }
2040
- function oa(e) {
2041
- const t = Ie(e);
2042
- return t ? t !== Te : typeof e == "string" && e.startsWith("/wake");
1955
+ function ia(e) {
1956
+ const t = Se(e);
1957
+ return t ? t !== Ee : typeof e == "string" && e.startsWith("/wake");
2043
1958
  }
2044
- function sa(e) {
2045
- return typeof e != "string" || e === "" || e === "/" ? !0 : Ie(e) === Te;
1959
+ function aa(e) {
1960
+ return typeof e != "string" || e === "" || e === "/" ? !0 : Se(e) === Ee;
2046
1961
  }
2047
- function cn(e) {
1962
+ function Bt(e) {
2048
1963
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2049
1964
  }
2050
- function un(e) {
2051
- const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : "/" + cn(r)).join("");
1965
+ function Ft(e) {
1966
+ const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : "/" + Bt(r)).join("");
2052
1967
  return new RegExp(`^${n}\\/?$`);
2053
1968
  }
2054
- function dn(e, t) {
1969
+ function Vt(e, t) {
2055
1970
  const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean), i = {};
2056
1971
  return n.forEach((a, o) => {
2057
1972
  if (a.startsWith(":")) {
2058
- const s = a.endsWith("?") ? a.slice(1, -1) : a.slice(1), l = r[o];
2059
- l && (i[s] = l);
1973
+ const s = a.endsWith("?") ? a.slice(1, -1) : a.slice(1), c = r[o];
1974
+ c && (i[s] = c);
2060
1975
  }
2061
1976
  }), i;
2062
1977
  }
2063
- function pn(e) {
1978
+ function Ht(e) {
2064
1979
  return e.publicBasePath ?? `/apps/${e.name}`;
2065
1980
  }
2066
- function la(e) {
1981
+ function oa(e) {
2067
1982
  const t = [];
2068
1983
  for (const n of e) {
2069
1984
  if (!n?.name) continue;
2070
- const r = pn(n);
1985
+ const r = Ht(n);
2071
1986
  for (const i of n.routes ?? []) {
2072
1987
  if (!i.public) continue;
2073
1988
  const a = i.path === "/" ? "" : i.path;
@@ -2081,7 +1996,7 @@ function la(e) {
2081
1996
  }
2082
1997
  return t;
2083
1998
  }
2084
- function fn(e, t) {
1999
+ function Wt(e, t) {
2085
2000
  const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
2086
2001
  for (let i = 0; i < Math.min(n.length, r.length); i++) {
2087
2002
  const a = n[i].startsWith(":"), o = r[i].startsWith(":");
@@ -2089,17 +2004,17 @@ function fn(e, t) {
2089
2004
  }
2090
2005
  return n.length > r.length;
2091
2006
  }
2092
- function mn(e, t) {
2007
+ function zt(e, t) {
2093
2008
  if (typeof e != "string") return null;
2094
2009
  let n = null;
2095
2010
  for (const r of t)
2096
- un(r.pattern).test(e) && (!n || fn(r.pattern, n.pattern)) && (n = r);
2097
- return n ? { ...n, params: { ...n.props, ...dn(n.pattern, e) } } : null;
2011
+ Ft(r.pattern).test(e) && (!n || Wt(r.pattern, n.pattern)) && (n = r);
2012
+ return n ? { ...n, params: { ...n.props, ...Vt(n.pattern, e) } } : null;
2098
2013
  }
2099
- function ca(e, t) {
2100
- return mn(e, t) !== null;
2014
+ function sa(e, t) {
2015
+ return zt(e, t) !== null;
2101
2016
  }
2102
- const ua = "sync-source", da = "sync-target", pa = 20, gn = {
2017
+ const ca = "sync-source", la = "sync-target", ua = 20, Xt = {
2103
2018
  afrikaans: [
2104
2019
  "[Muziek]",
2105
2020
  "(C) TV GELDERLAND 2021",
@@ -2249,14 +2164,14 @@ const ua = "sync-source", da = "sync-target", pa = 20, gn = {
2249
2164
  "[MÚSICA]",
2250
2165
  "[Music cuts in British]"
2251
2166
  ]
2252
- }, hn = (e) => {
2167
+ }, Yt = (e) => {
2253
2168
  let t = e;
2254
- return Object.values(gn).forEach((n) => {
2169
+ return Object.values(Xt).forEach((n) => {
2255
2170
  n.forEach((r) => {
2256
2171
  t = t.replaceAll(r, "");
2257
2172
  });
2258
2173
  }), t = t.replace(/\(.*?\)/g, ""), t = t.replace(/\[.*?\]/g, ""), t;
2259
- }, yn = 6e4, An = 8e3, bn = 2, En = 0.4, Sn = 3, _n = /* @__PURE__ */ new Set([
2174
+ }, qt = 6e4, Jt = 8e3, Zt = 2, Qt = 0.4, en = 3, tn = /* @__PURE__ */ new Set([
2260
2175
  "aan",
2261
2176
  "als",
2262
2177
  "ben",
@@ -2369,13 +2284,13 @@ const ua = "sync-source", da = "sync-target", pa = 20, gn = {
2369
2284
  "you",
2370
2285
  "your"
2371
2286
  ]);
2372
- function Tn(e) {
2287
+ function nn(e) {
2373
2288
  const t = /* @__PURE__ */ new Set();
2374
2289
  for (const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))
2375
- n.length < Sn || _n.has(n) || t.add(n);
2290
+ n.length < en || tn.has(n) || t.add(n);
2376
2291
  return [...t];
2377
2292
  }
2378
- function In(e, t) {
2293
+ function rn(e, t) {
2379
2294
  if (!e.length) return 0;
2380
2295
  if (!t.length) return 1;
2381
2296
  const n = new Set(t), r = new Set(e);
@@ -2383,314 +2298,557 @@ function In(e, t) {
2383
2298
  for (const a of r) n.has(a) || (i += 1);
2384
2299
  return i / r.size;
2385
2300
  }
2386
- function Mn(e, t = yn) {
2301
+ function an(e, t = qt) {
2387
2302
  const n = e.filter((o) => !o.partial && typeof o.text == "string");
2388
2303
  if (!n.length) return { text: "", segmentCount: 0 };
2389
2304
  const i = n.reduce((o, s) => Math.max(o, s.endedAt ?? 0), 0) - t;
2390
- return { text: n.filter((o) => (o.endedAt ?? 0) >= i).map((o) => hn(o.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
2305
+ return { text: n.filter((o) => (o.endedAt ?? 0) >= i).map((o) => Yt(o.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
2391
2306
  }
2392
- const Cn = 60;
2393
- function fa(e, t, n = Cn) {
2307
+ const on = 60;
2308
+ function da(e, t, n = on) {
2394
2309
  const r = new Set(e), i = [...e];
2395
2310
  for (const a of t)
2396
2311
  !a || r.has(a) || (r.add(a), i.push(a));
2397
2312
  return i.slice(-n);
2398
2313
  }
2399
- function ma(e) {
2314
+ function pa(e) {
2400
2315
  const { segments: t, now: n, state: r } = e;
2401
- if (r.lastTriggerAt && n - r.lastTriggerAt < An)
2316
+ if (r.lastTriggerAt && n - r.lastTriggerAt < Jt)
2402
2317
  return { trigger: !1, reason: "too_soon" };
2403
- const i = Mn(t, e.windowMs);
2318
+ const i = an(t, e.windowMs);
2404
2319
  if (!i.text) return { trigger: !1, reason: "no_speech" };
2405
2320
  const a = i.segmentCount - (r.lastSegmentCount ?? 0);
2406
- if (r.lastQueryTerms && a < bn)
2321
+ if (r.lastQueryTerms && a < Zt)
2407
2322
  return { trigger: !1, reason: "too_few_new" };
2408
- const o = Tn(i.text);
2409
- return o.length ? r.lastQueryTerms?.length && In(o, r.lastQueryTerms) < En ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: i.text, terms: o, segmentCount: i.segmentCount } : { trigger: !1, reason: "no_speech" };
2323
+ const o = nn(i.text);
2324
+ return o.length ? r.lastQueryTerms?.length && rn(o, r.lastQueryTerms) < Qt ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: i.text, terms: o, segmentCount: i.segmentCount } : { trigger: !1, reason: "no_speech" };
2410
2325
  }
2411
- const Me = 9e4, kn = ["out_of_office"], Ce = (e) => kn.includes(e);
2412
- function ga(e, t, n) {
2413
- const r = n - e < Me, i = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
2414
- if (!i?.status) return { online: r, status: r ? "available" : "offline" };
2415
- const a = i.status;
2416
- return !r && !Ce(a) ? { online: !1, status: "offline" } : { online: r, status: a, message: i.message };
2326
+ const O = {
2327
+ // The lower bounds are deliberately generous: service ranges (0800/0900) are
2328
+ // shorter than geographic numbers, and a too-strict minimum silently drops them.
2329
+ // An over-permissive key is harmless — it simply matches nothing.
2330
+ NL: { callingCode: "31", trunkPrefix: "0", nsnMin: 7, nsnMax: 9 },
2331
+ BE: { callingCode: "32", trunkPrefix: "0", nsnMin: 8, nsnMax: 9 },
2332
+ LU: { callingCode: "352", nsnMin: 6, nsnMax: 9 },
2333
+ DE: { callingCode: "49", trunkPrefix: "0", nsnMin: 6, nsnMax: 13 },
2334
+ FR: { callingCode: "33", trunkPrefix: "0", nsnMin: 9, nsnMax: 9 },
2335
+ GB: { callingCode: "44", trunkPrefix: "0", nsnMin: 9, nsnMax: 10 },
2336
+ IE: { callingCode: "353", trunkPrefix: "0", nsnMin: 7, nsnMax: 9 },
2337
+ ES: { callingCode: "34", nsnMin: 9, nsnMax: 9 },
2338
+ PT: { callingCode: "351", nsnMin: 9, nsnMax: 9 },
2339
+ IT: { callingCode: "39", nsnMin: 6, nsnMax: 11 },
2340
+ AT: { callingCode: "43", trunkPrefix: "0", nsnMin: 7, nsnMax: 13 },
2341
+ CH: { callingCode: "41", trunkPrefix: "0", nsnMin: 9, nsnMax: 9 },
2342
+ DK: { callingCode: "45", nsnMin: 8, nsnMax: 8 },
2343
+ SE: { callingCode: "46", trunkPrefix: "0", nsnMin: 7, nsnMax: 13 },
2344
+ NO: { callingCode: "47", nsnMin: 8, nsnMax: 8 },
2345
+ FI: { callingCode: "358", trunkPrefix: "0", nsnMin: 5, nsnMax: 12 },
2346
+ PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
2347
+ US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
2348
+ CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
2349
+ }, sn = "NL", cn = 15, ln = 8, un = Array.from(
2350
+ new Set(Object.values(O).map((e) => e.callingCode))
2351
+ ).sort((e, t) => t.length - e.length);
2352
+ function J(e) {
2353
+ if (e)
2354
+ return O[e.trim().toUpperCase()];
2417
2355
  }
2418
- function ha(e, t) {
2419
- const n = t - e.lastSeenAt < Me, r = n || Ce(e.status) ? e.status : "offline";
2420
- return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
2356
+ function E(e, t) {
2357
+ return e.length >= t.nsnMin && e.length <= t.nsnMax;
2421
2358
  }
2422
- function ya(e, t) {
2423
- return e?.teamId && t.includes(e.teamId) ? { teamId: e.teamId, mustChoose: !1 } : t.length === 1 ? { teamId: t[0], mustChoose: !1 } : { teamId: void 0, mustChoose: t.length > 1 };
2359
+ function Z(e) {
2360
+ if (e.length > cn) return null;
2361
+ for (const t of un) {
2362
+ if (!e.startsWith(t)) continue;
2363
+ const n = e.slice(t.length);
2364
+ for (const r of Object.values(O)) {
2365
+ if (r.callingCode !== t) continue;
2366
+ const i = r.trunkPrefix, a = i && n.startsWith(i) ? n.slice(i.length) : n;
2367
+ if (E(a, r)) return `+${t}${a}`;
2368
+ }
2369
+ return null;
2370
+ }
2371
+ return e.length < ln ? null : `+${e}`;
2424
2372
  }
2425
- function Aa(e) {
2426
- return e.providerAvailable && e.allowed;
2373
+ function dn(e) {
2374
+ let t = e.trim();
2375
+ const n = t.match(/^(sips?|tel|whatsapp):/i);
2376
+ n && (t = t.slice(n[0].length));
2377
+ const r = t.indexOf("@");
2378
+ return r >= 0 && (t = t.slice(0, r)), t.trim();
2379
+ }
2380
+ function fa(e) {
2381
+ if (!e) return !1;
2382
+ const t = e.indexOf("@");
2383
+ if (t <= 0) return !1;
2384
+ const n = e.slice(0, t).trim();
2385
+ return !/^[+\d\s().-]+$/.test(n);
2386
+ }
2387
+ function Q(e, t) {
2388
+ if (!e) return null;
2389
+ const n = dn(e);
2390
+ if (!n) return null;
2391
+ const r = n.startsWith("+"), i = n.replace(/\D/g, "");
2392
+ if (!i) return null;
2393
+ if (r) return Z(i);
2394
+ if (i.startsWith("00")) return Z(i.slice(2));
2395
+ const a = J(t) ?? J(sn);
2396
+ if (!a) return null;
2397
+ const o = a.trunkPrefix;
2398
+ if (o && i.startsWith(o)) {
2399
+ const s = i.slice(o.length);
2400
+ return E(s, a) ? `+${a.callingCode}${s}` : null;
2401
+ }
2402
+ if (i.startsWith(a.callingCode)) {
2403
+ const s = i.slice(a.callingCode.length);
2404
+ if (E(s, a)) return `+${a.callingCode}${s}`;
2405
+ }
2406
+ return !o && E(i, a) ? `+${a.callingCode}${i}` : null;
2407
+ }
2408
+ function ma(e, t = 9) {
2409
+ const n = (e ?? "").replace(/\D/g, "");
2410
+ return n.length < t ? null : n.slice(-t);
2411
+ }
2412
+ function _e(e) {
2413
+ if (!e) return null;
2414
+ const t = e.trim().toLowerCase(), n = t.lastIndexOf("@");
2415
+ if (n <= 0 || n === t.length - 1) return null;
2416
+ const r = t.slice(0, n).split("+")[0], i = t.slice(n + 1);
2417
+ return !r || !i.includes(".") ? null : `${r}@${i}`;
2418
+ }
2419
+ function ga(e) {
2420
+ const t = _e(e);
2421
+ return t ? t.slice(t.lastIndexOf("@") + 1) : null;
2422
+ }
2423
+ const pn = /* @__PURE__ */ new Set([
2424
+ "co.uk",
2425
+ "org.uk",
2426
+ "gov.uk",
2427
+ "ac.uk",
2428
+ "com.au",
2429
+ "co.nz",
2430
+ "com.br",
2431
+ "co.za"
2432
+ ]);
2433
+ function fn(e) {
2434
+ if (!e) return null;
2435
+ const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
2436
+ if (t.length < 2) return null;
2437
+ const n = t.slice(-2).join(".");
2438
+ return pn.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
2439
+ }
2440
+ const mn = /* @__PURE__ */ new Set([
2441
+ "gmail.com",
2442
+ "googlemail.com",
2443
+ "outlook.com",
2444
+ "hotmail.com",
2445
+ "hotmail.nl",
2446
+ "hotmail.be",
2447
+ "hotmail.co.uk",
2448
+ "live.com",
2449
+ "live.nl",
2450
+ "live.be",
2451
+ "msn.com",
2452
+ "yahoo.com",
2453
+ "yahoo.co.uk",
2454
+ "ymail.com",
2455
+ "icloud.com",
2456
+ "me.com",
2457
+ "mac.com",
2458
+ "aol.com",
2459
+ "gmx.net",
2460
+ "gmx.de",
2461
+ "web.de",
2462
+ "protonmail.com",
2463
+ "proton.me",
2464
+ "pm.me",
2465
+ "tutanota.com",
2466
+ "zoho.com",
2467
+ "mail.com",
2468
+ "ziggo.nl",
2469
+ "kpnmail.nl",
2470
+ "planet.nl",
2471
+ "home.nl",
2472
+ "casema.nl",
2473
+ "chello.nl",
2474
+ "xs4all.nl",
2475
+ "telfort.nl",
2476
+ "hetnet.nl",
2477
+ "zonnet.nl",
2478
+ "upcmail.nl",
2479
+ "quicknet.nl",
2480
+ "telenet.be",
2481
+ "skynet.be",
2482
+ "proximus.be",
2483
+ "scarlet.be"
2484
+ ]);
2485
+ function ha(e) {
2486
+ const t = fn(e);
2487
+ return t ? mn.has(t) : !1;
2488
+ }
2489
+ function ya(e) {
2490
+ if (!e) return !1;
2491
+ const t = e.trim().toLowerCase();
2492
+ return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
2493
+ }
2494
+ function Aa(e, t, n) {
2495
+ if (!e || !t) return null;
2496
+ const r = e.trim().toLowerCase();
2497
+ if (r === "tel" || r === "sms" || r === "whatsapp") {
2498
+ const a = Q(t, n);
2499
+ return a ? `tel:${a}` : null;
2500
+ }
2501
+ if (r === "fax") {
2502
+ const a = Q(t, n);
2503
+ return a ? `fax:${a}` : null;
2504
+ }
2505
+ if (r === "mailto" || r === "email") {
2506
+ const a = _e(t);
2507
+ return a ? `mailto:${a}` : null;
2508
+ }
2509
+ const i = t.trim().toLowerCase();
2510
+ return i ? `${r}:${i}` : null;
2511
+ }
2512
+ const gn = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, hn = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
2513
+ function ba(e) {
2514
+ if (typeof e != "string" || !e) return "";
2515
+ let t = e;
2516
+ 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(`
2517
+ `).map(
2518
+ (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,}$/, "")
2519
+ ).join(`
2520
+ `), t = t.replace(gn, "$2"), t = t.replace(hn, "$2"), t = t.replace(/~~(?=\S)([\s\S]*?\S)~~/g, "$1"), t = t.replace(/`([^`\n]+)`/g, "$1"), t.replace(/\s+/g, " ").trim();
2521
+ }
2522
+ const yn = [
2523
+ /<blockquote/i,
2524
+ /class="?gmail_quote/i,
2525
+ // Gmail quote container
2526
+ /id="?[^"]*divRplyFwdMsg/i,
2527
+ // Outlook web reply/forward header
2528
+ /id="?[^"]*mail-editor-reference-message-container/i,
2529
+ // Outlook new/"mail editor" quote container
2530
+ /-{3,}\s*Original Message\s*-{3,}/i,
2531
+ /\n_{5,}\s*\n/,
2532
+ // Outlook underscore separator before "From:"
2533
+ /\bOn\b[\s\S]{0,200}?\bwrote:/i
2534
+ // Gmail "On <date> <name> wrote:"
2535
+ ], ee = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, An = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
2536
+ function bn(e) {
2537
+ const t = e.split(`
2538
+ `);
2539
+ for (let n = 0; n < t.length; n++)
2540
+ if (An.test(t[n]) || ee.test(t[n]) && t.slice(n + 1, n + 4).some((r) => ee.test(r)))
2541
+ return t.slice(0, n).join(`
2542
+ `).trim();
2543
+ return e;
2544
+ }
2545
+ function te(e) {
2546
+ let t = e;
2547
+ return t = t.replace(/<(script|style)[\s\S]*?<\/\1>/gi, ""), t = t.replace(/<br\s*\/?>/gi, `
2548
+ `), t = t.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
2549
+
2550
+ `), t = t.replace(/<\/(div|li|tr)>/gi, `
2551
+ `), t = t.replace(/<\/(td|th)>/gi, " "), t = t.replace(/<[^>]+>/g, ""), t = t.replace(/<[^>]*$/, ""), t;
2552
+ }
2553
+ function ne(e) {
2554
+ return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
2555
+ }
2556
+ function re(e) {
2557
+ return e.replace(/&nbsp;/gi, " ").replace(/&lt;/gi, "<").replace(/&gt;/gi, ">").replace(/&quot;/gi, '"').replace(/&#(\d+);/g, (t, n) => ne(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => ne(parseInt(n, 16)) ?? t).replace(/&amp;/gi, "&");
2558
+ }
2559
+ function ie(e) {
2560
+ return e.replace(/\r/g, "").replace(/[ \t]+/g, " ").replace(/ *\n */g, `
2561
+ `).replace(/\n{3,}/g, `
2562
+
2563
+ `).trim();
2564
+ }
2565
+ function Ea(e) {
2566
+ if (typeof e != "string" || !e) return "";
2567
+ let t = e.length;
2568
+ for (const a of yn) {
2569
+ const o = e.search(a);
2570
+ o >= 0 && o < t && (t = o);
2571
+ }
2572
+ const n = e.slice(0, t);
2573
+ let r = ie(re(te(n)));
2574
+ return r || (r = ie(re(te(e)))), bn(r) || r;
2575
+ }
2576
+ const En = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, Sn = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
2577
+ function Sa(e, t) {
2578
+ return !!(e && En.test(e) || t && Sn.test(t));
2579
+ }
2580
+ const _n = 3, Tn = 600;
2581
+ function _a(e, t) {
2582
+ return e >= _n || t >= Tn;
2427
2583
  }
2428
- const ba = "installation-id";
2429
2584
  export {
2430
2585
  m as ACTIVITY_CATALOG,
2431
- en as AI_ATTACHMENT_LIMITS,
2432
- Pi as AI_ATTACHMENT_MAX_PER_TURN,
2433
- Di as AI_ATTACHMENT_TURN_BUDGET,
2434
- be as AI_VENDORS,
2435
- Fe as ALLOWED_LINK_SCHEMES,
2436
- B as ARTIFACT_MAX_BLOCKS,
2437
- qn as ARTIFACT_MAX_BODY_BYTES,
2438
- N as ARTIFACT_MAX_CELL_LEN,
2439
- W as ARTIFACT_MAX_KPI_ITEMS,
2440
- F as ARTIFACT_MAX_LIST_ITEMS,
2441
- H as ARTIFACT_MAX_TABLE_COLUMNS,
2442
- V as ARTIFACT_MAX_TABLE_ROWS,
2443
- de as ARTIFACT_MAX_TEXT_LEN,
2444
- Ze as ASSIGNMENT_SCOPE_KIND,
2445
- Te as AUTH_APP_NAME,
2446
- $e as ActivityTypeRegistry,
2447
- Bn as BUILT_IN_ONLY,
2448
- An as CADENCE_FLOOR_MS,
2449
- bn as CADENCE_MIN_NEW_SEGMENTS,
2450
- En as CADENCE_MIN_NOVELTY,
2451
- yn as CADENCE_WINDOW_MS,
2452
- pr as CLASSIFY_VARS,
2453
- Wn as CORE_DIMENSIONS,
2454
- sn as CommunicationScheme,
2455
- oi as DEFAULT_MEMORY_BUDGET,
2456
- Rt as DEFAULT_PHONE_REGION,
2457
- Sr as EMPTY_WORKFLOW,
2458
- Qi as FEATURE_FOLDER_MANAGEMENT,
2459
- ea as FEATURE_REMOTE_SEARCH,
2460
- ba as INSTALLATION_HEADER,
2461
- st as INTERACTION_KIND,
2462
- Ji as InteractionParticipantRole,
2463
- gt as KB_FALLBACK_LOCALE,
2464
- Z as KB_LOCALES,
2465
- $ as LOOSE_STATUSES,
2466
- M as MAX_ACTIONS,
2467
- Qe as MAX_ASSIGNMENT_TURNS,
2468
- L as MAX_BLOCKS,
2469
- ye as MAX_COLLECTION_DEPTH,
2470
- T as MAX_FIELDS,
2471
- I as MAX_LIST_ITEMS,
2472
- ni as MAX_MEMORY_BROWSE,
2473
- ai as MAX_MEMORY_BUDGET,
2474
- ri as MAX_MEMORY_CHARS,
2475
- Cn as MAX_SHOWN_KEYS,
2476
- At as MAX_TOPIC_CANDIDATES,
2477
- yt as MAX_TOPIC_EXAMPLES,
2478
- v as MAX_TOPIC_EXAMPLE_CHARS,
2479
- ii as MIN_MEMORY_BUDGET,
2480
- R as PHONE_REGIONS,
2481
- Me as PRESENCE_ONLINE_WINDOW_MS,
2482
- kn as PRESENCE_SURVIVES_OFFLINE,
2483
- qi as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
2484
- Yi as PROVIDER_FEATURE_MESSAGE_WINDOW,
2485
- Gt as PUBLIC_EMAIL_DOMAINS,
2486
- q as READ_STEP_TYPES,
2487
- It as RELATED_SUBJECT_KINDS,
2488
- Se as RESERVED_STATUS_KEYS,
2489
- na as RESOURCE_DESCRIBE_SERVICE,
2490
- ia as RESOURCE_RESOLVE_SERVICE,
2491
- ra as RESOURCE_SEARCH_SERVICE,
2492
- Xr as SIGNATURE_INTENTS,
2493
- ut as STEP_MAX_TOKENS_MAX,
2494
- ct as STEP_MAX_TOKENS_MIN,
2495
- qt as SUMMARY_MIN_LAST_CHARS,
2496
- Yt as SUMMARY_MIN_MESSAGES,
2497
- pa as SYNC_RUN_MAX_ERRORS,
2498
- ua as SYNC_SOURCE_PROVIDER_GROUP,
2499
- da as SYNC_TARGET_PROVIDER_GROUP,
2500
- Je as TERMINAL_ASSIGNMENT_STATUSES,
2501
- dt as TERMINAL_RUN_STATUSES,
2502
- dr as TRIGGER_VARS,
2503
- ta as UNSUPPORTED,
2504
- Ue as USAGE_DIMENSIONS,
2505
- je as USAGE_DIMENSION_IDS,
2506
- kt as WORK_ITEM_SCOPE_KIND,
2507
- wt as WORK_PROJECT_SCOPE_KIND,
2508
- Dr as acceptExampleCandidate,
2509
- nt as actingIdentityKey,
2510
- mi as activeWorkTypes,
2511
- xn as activityIconOf,
2512
- Gn as activityJoinUrl,
2513
- ve as activitySnippet,
2514
- xe as activityTextParams,
2515
- jn as activityTimelineText,
2516
- Hn as activityTimestamp,
2586
+ $t as AI_ATTACHMENT_LIMITS,
2587
+ Ni as AI_ATTACHMENT_MAX_PER_TURN,
2588
+ Ci as AI_ATTACHMENT_TURN_BUDGET,
2589
+ oe as AI_VENDORS,
2590
+ je as ALLOWED_LINK_SCHEMES,
2591
+ Yi as APP_PERMISSIONS,
2592
+ U as ARTIFACT_MAX_BLOCKS,
2593
+ ir as ARTIFACT_MAX_BODY_BYTES,
2594
+ M as ARTIFACT_MAX_CELL_LEN,
2595
+ F as ARTIFACT_MAX_KPI_ITEMS,
2596
+ j as ARTIFACT_MAX_LIST_ITEMS,
2597
+ B as ARTIFACT_MAX_TABLE_COLUMNS,
2598
+ G as ARTIFACT_MAX_TABLE_ROWS,
2599
+ ce as ARTIFACT_MAX_TEXT_LEN,
2600
+ Ye as ASSIGNMENT_SCOPE_KIND,
2601
+ Ee as AUTH_APP_NAME,
2602
+ ve as ActivityTypeRegistry,
2603
+ Gn as BUILT_IN_ONLY,
2604
+ Jt as CADENCE_FLOOR_MS,
2605
+ Zt as CADENCE_MIN_NEW_SEGMENTS,
2606
+ Qt as CADENCE_MIN_NOVELTY,
2607
+ qt as CADENCE_WINDOW_MS,
2608
+ qr as CLASSIFY_VARS,
2609
+ tr as CORE_DIMENSIONS,
2610
+ Ut as CommunicationScheme,
2611
+ Ur as DEFAULT_MEMORY_BUDGET,
2612
+ sn as DEFAULT_PHONE_REGION,
2613
+ Zr as EMPTY_WORKFLOW,
2614
+ Hi as FEATURE_FOLDER_MANAGEMENT,
2615
+ Wi as FEATURE_REMOTE_SEARCH,
2616
+ Xi as INSTALLATION_HEADER,
2617
+ ut as INTERACTION_KIND,
2618
+ Fi as InteractionParticipantRole,
2619
+ et as KB_FALLBACK_LOCALE,
2620
+ z as KB_LOCALES,
2621
+ v as LOOSE_STATUSES,
2622
+ kn as MAX_ACTIONS,
2623
+ qe as MAX_ASSIGNMENT_TURNS,
2624
+ In as MAX_BLOCKS,
2625
+ fe as MAX_COLLECTION_DEPTH,
2626
+ wn as MAX_FIELDS,
2627
+ Mn as MAX_LIST_ITEMS,
2628
+ Lr as MAX_MEMORY_BROWSE,
2629
+ Kr as MAX_MEMORY_BUDGET,
2630
+ Dr as MAX_MEMORY_CHARS,
2631
+ on as MAX_SHOWN_KEYS,
2632
+ bt as MAX_TOPIC_CANDIDATES,
2633
+ At as MAX_TOPIC_EXAMPLES,
2634
+ k as MAX_TOPIC_EXAMPLE_CHARS,
2635
+ Pr as MIN_MEMORY_BUDGET,
2636
+ O as PHONE_REGIONS,
2637
+ Ae as PRESENCE_ONLINE_WINDOW_MS,
2638
+ Gt as PRESENCE_SURVIVES_OFFLINE,
2639
+ Bi as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
2640
+ Gi as PROVIDER_FEATURE_MESSAGE_WINDOW,
2641
+ mn as PUBLIC_EMAIL_DOMAINS,
2642
+ X as READ_STEP_TYPES,
2643
+ rt as RELATED_SUBJECT_KINDS,
2644
+ ye as RESERVED_STATUS_KEYS,
2645
+ ea as RESOURCE_DESCRIBE_SERVICE,
2646
+ na as RESOURCE_RESOLVE_SERVICE,
2647
+ ta as RESOURCE_SEARCH_SERVICE,
2648
+ yr as SIGNATURE_INTENTS,
2649
+ ft as STEP_MAX_TOKENS_MAX,
2650
+ pt as STEP_MAX_TOKENS_MIN,
2651
+ Tn as SUMMARY_MIN_LAST_CHARS,
2652
+ _n as SUMMARY_MIN_MESSAGES,
2653
+ ua as SYNC_RUN_MAX_ERRORS,
2654
+ ca as SYNC_SOURCE_PROVIDER_GROUP,
2655
+ la as SYNC_TARGET_PROVIDER_GROUP,
2656
+ Xe as TERMINAL_ASSIGNMENT_STATUSES,
2657
+ mt as TERMINAL_RUN_STATUSES,
2658
+ Yr as TRIGGER_VARS,
2659
+ zi as UNSUPPORTED,
2660
+ De as USAGE_DIMENSIONS,
2661
+ Pe as USAGE_DIMENSION_IDS,
2662
+ hi as WORK_COMMENT_ADDED,
2663
+ yi as WORK_ITEM_ASSIGNED,
2664
+ Tt as WORK_ITEM_SCOPE_KIND,
2665
+ It as WORK_PROJECT_SCOPE_KIND,
2666
+ fi as acceptExampleCandidate,
2667
+ at as actingIdentityKey,
2668
+ di as activeWorkTypes,
2669
+ Nn as activityIconOf,
2670
+ Un as activityJoinUrl,
2671
+ Me as activitySnippet,
2672
+ ke as activityTextParams,
2673
+ Kn as activityTimelineText,
2674
+ Fn as activityTimestamp,
2517
2675
  d as activityTypeInfo,
2518
- gr as actorKey,
2519
- Lr as addExampleCandidate,
2520
- ha as agePresenceEntry,
2521
- Qt as aiAttachmentKind,
2522
- Ki as aiAttachmentRejection,
2523
- ee as aiBudgetLimit,
2524
- Vr as aiBudgetPeriodKey,
2525
- _t as aiBudgetPeriodStart,
2526
- Fr as aiBudgetState,
2527
- Br as aiVendorAcceptsAttachment,
2528
- Ur as aiVendorDefaultModel,
2529
- Kr as aiVendorLabel,
2530
- Gr as aiVendorNeedsBaseUrl,
2531
- jr as aiVendorsWith,
2532
- Ie as appNameFromPath,
2533
- ci as applyRounding,
2534
- Yr as applySignature,
2535
- Zn as artifactBodyBytes,
2536
- Qn as artifactOutline,
2537
- er as artifactToMarkdown,
2538
- br as assignmentMismatch,
2539
- ar as assignmentScopeKey,
2540
- sr as assignmentSubject,
2541
- Fn as buildActivityPreview,
2542
- Vi as buildChannelIntents,
2543
- tr as buildShareKeys,
2544
- Mn as buildWindow,
2545
- Or as canNestUnder,
2546
- Ln as carriesText,
2547
- Rr as categoryLabel,
2548
- xt as categoryOf,
2549
- Xi as channelKindForScheme,
2550
- On as channelKindOf,
2551
- Er as clampStepMaxTokens,
2552
- $i as cleanMessageText,
2553
- Ct as compareWorkTypes,
2554
- lr as decideAssignmentState,
2555
- ma as decideCadence,
2556
- Bi as decideIncomingCall,
2557
- ht as defaultLocaleOf,
2558
- _i as defaultStatusKey,
2559
- Zi as defineIntent,
2560
- ft as depthOf,
2561
- ga as derivePresence,
2562
- Fi as disabledIntentsFromCapabilities,
2563
- li as elapsedSeconds,
2564
- wi as emailDomain,
2565
- xi as endpointKey,
2566
- dn as extractParams,
2567
- Tn as extractTerms,
2568
- Wi as filterByEndpoint,
2569
- Hi as filterByIntent,
2570
- on as filterByTargetScheme,
2676
+ Fr as actorKey,
2677
+ pi as addExampleCandidate,
2678
+ Ji as agePresenceEntry,
2679
+ xt as aiAttachmentKind,
2680
+ vi as aiAttachmentRejection,
2681
+ K as aiBudgetLimit,
2682
+ Zn as aiBudgetPeriodKey,
2683
+ Oe as aiBudgetPeriodStart,
2684
+ Jn as aiBudgetState,
2685
+ qn as aiVendorAcceptsAttachment,
2686
+ zn as aiVendorDefaultModel,
2687
+ Wn as aiVendorLabel,
2688
+ Yn as aiVendorNeedsBaseUrl,
2689
+ Xn as aiVendorsWith,
2690
+ Se as appNameFromPath,
2691
+ oi as applyRounding,
2692
+ Ar as applySignature,
2693
+ or as artifactBodyBytes,
2694
+ sr as artifactOutline,
2695
+ cr as artifactToMarkdown,
2696
+ zr as assignmentMismatch,
2697
+ fr as assignmentScopeKey,
2698
+ gr as assignmentSubject,
2699
+ jn as buildActivityPreview,
2700
+ Di as buildChannelIntents,
2701
+ lr as buildShareKeys,
2702
+ an as buildWindow,
2703
+ Nr as canNestUnder,
2704
+ $n as carriesText,
2705
+ Or as categoryLabel,
2706
+ kt as categoryOf,
2707
+ ji as channelKindForScheme,
2708
+ vn as channelKindOf,
2709
+ Jr as clampStepMaxTokens,
2710
+ Ea as cleanMessageText,
2711
+ yt as compareWorkTypes,
2712
+ hr as decideAssignmentState,
2713
+ pa as decideCadence,
2714
+ Ri as decideIncomingCall,
2715
+ tt as defaultLocaleOf,
2716
+ Ii as defaultStatusKey,
2717
+ Vi as defineIntent,
2718
+ Ze as depthOf,
2719
+ qi as derivePresence,
2720
+ Li as disabledIntentsFromCapabilities,
2721
+ ai as elapsedSeconds,
2722
+ ga as emailDomain,
2723
+ Aa as endpointKey,
2724
+ Vt as extractParams,
2725
+ nn as extractTerms,
2726
+ Ki as filterByEndpoint,
2727
+ Pi as filterByIntent,
2728
+ Kt as filterByTargetScheme,
2571
2729
  S as findAiVendor,
2572
- zn as flattenLocales,
2573
- De as floorToPeriod,
2574
- tt as formatActingIdentity,
2575
- di as formatClock,
2576
- ui as formatHm,
2577
- hi as formatItemKey,
2578
- Le as formatPeriod,
2579
- Ui as freshSources,
2580
- Vn as getActivitySeenUserIds,
2581
- qr as getContactEndpoints,
2582
- ei as getShortTitle,
2583
- Qr as getUrgencyScore,
2584
- Ae as heightOf,
2585
- Nr as helpCenterText,
2586
- ur as humanizeAction,
2587
- lt as interactionIdOf,
2730
+ er as flattenLocales,
2731
+ $e as floorToPeriod,
2732
+ it as formatActingIdentity,
2733
+ ci as formatClock,
2734
+ si as formatHm,
2735
+ Ai as formatItemKey,
2736
+ xe as formatPeriod,
2737
+ Oi as freshSources,
2738
+ Bn as getActivitySeenUserIds,
2739
+ br as getContactEndpoints,
2740
+ Tr as getShortTitle,
2741
+ _r as getUrgencyScore,
2742
+ me as heightOf,
2743
+ Mr as helpCenterText,
2744
+ Xr as humanizeAction,
2745
+ dt as interactionIdOf,
2588
2746
  gi as isAgentUser,
2589
- Jr as isAssigned,
2590
- ir as isAssignmentTerminal,
2591
- at as isAssignmentTrigger,
2592
- Nn as isChatMessageActivity,
2593
- Zr as isClosed,
2594
- Kn as isConnectedType,
2595
- oa as isDeepLink,
2596
- mt as isDescendant,
2597
- wn as isEmailActivity,
2598
- Mr as isInFlight,
2599
- ti as isInteractionUnseen,
2600
- sa as isLandingPath,
2601
- Ri as isLikelyBulk,
2602
- ce as isMessageShape,
2603
- $n as isMessageType,
2604
- fn as isMoreSpecificPattern,
2605
- pt as isPaused,
2606
- Pn as isPlaybookAuthoredType,
2607
- Ni as isPublicEmailDomain,
2608
- ca as isPublicPath,
2609
- Rn as isReplyableType,
2610
- Ir as isTerminal,
2611
- Li as isThreadLongEnough,
2612
- Un as isTranscriptType,
2613
- Ti as isWorkClosed,
2614
- fi as isWorkTypeVisible,
2615
- bi as itemDossierKeys,
2616
- vt as ladderFor,
2747
+ Er as isAssigned,
2748
+ pr as isAssignmentTerminal,
2749
+ ct as isAssignmentTrigger,
2750
+ Hn as isChatMessageActivity,
2751
+ Sr as isClosed,
2752
+ Dn as isConnectedType,
2753
+ ia as isDeepLink,
2754
+ Qe as isDescendant,
2755
+ Vn as isEmailActivity,
2756
+ ni as isInFlight,
2757
+ Ir as isInteractionUnseen,
2758
+ aa as isLandingPath,
2759
+ Sa as isLikelyBulk,
2760
+ ae as isMessageShape,
2761
+ On as isMessageType,
2762
+ Wt as isMoreSpecificPattern,
2763
+ gt as isPaused,
2764
+ Ln as isPlaybookAuthoredType,
2765
+ ha as isPublicEmailDomain,
2766
+ sa as isPublicPath,
2767
+ xn as isReplyableType,
2768
+ ti as isTerminal,
2769
+ _a as isThreadLongEnough,
2770
+ Pn as isTranscriptType,
2771
+ wi as isWorkClosed,
2772
+ ui as isWorkTypeVisible,
2773
+ Si as itemDossierKeys,
2774
+ Mt as ladderFor,
2617
2775
  wr as linkLabel,
2618
- Hr as listeningAllowed,
2619
- xr as localeInstruction,
2620
- vr as localeName,
2621
- $r as localesOf,
2622
- Ci as looksLikeEmail,
2623
- zi as matchContactToIntents,
2624
- mn as matchPublicRoute,
2625
- Wr as mcpCredentialScope,
2626
- zr as mcpToolPrefix,
2627
- fa as mergeShownKeys,
2628
- Dn as messageCountsAs,
2629
- vi as needsPhoneRegion,
2630
- Jn as normalizeArtifactBlocks,
2631
- vn as normalizeBlocks,
2776
+ Qn as listeningAllowed,
2777
+ Cr as localeInstruction,
2778
+ kr as localeName,
2779
+ vr as localesOf,
2780
+ fa as looksLikeEmail,
2781
+ Ui as matchContactToIntents,
2782
+ zt as matchPublicRoute,
2783
+ $r as mcpCredentialScope,
2784
+ Rr as mcpToolPrefix,
2785
+ da as mergeShownKeys,
2786
+ Rn as messageCountsAs,
2787
+ ya as needsPhoneRegion,
2788
+ ar as normalizeArtifactBlocks,
2789
+ Cn as normalizeBlocks,
2632
2790
  _e as normalizeEmail,
2633
2791
  g as normalizeExample,
2634
- In as novelty,
2635
- fr as parseActingIdentity,
2636
- yi as parseItemKey,
2637
- un as pathToRegex,
2638
- Xn as periodsInRange,
2639
- ki as phoneSuffix,
2640
- Oi as plainTextFromMarkdown,
2641
- it as playbookActor,
2642
- Tr as procedureOf,
2643
- Ei as projectDossierKeys,
2644
- pn as publicBasePathFor,
2645
- la as publicRoutePatterns,
2646
- x as readPath,
2647
- J as readStepError,
2648
- ot as refKey,
2649
- jt as registrableDomain,
2650
- Et as rejectExampleCandidate,
2651
- si as relatedByDefault,
2652
- rn as resolveAccountCapabilities,
2653
- O as resolveActivityText,
2654
- nn as resolveChannelIntents,
2655
- Tt as resolveSignature,
2656
- ya as resolveWorkMode,
2657
- aa as resourceKindOf,
2658
- mr as runActor,
2659
- kr as runInteractionId,
2660
- ze as sanitizeInline,
2661
- hn as sanitizeTranscript,
2662
- cr as selectLenses,
2663
- Gi as sessionsHoldCannotReach,
2664
- ji as sessionsToHold,
2665
- me as shareKeyForTeam,
2666
- fe as shareKeyForUser,
2667
- nr as shareKeysForViewer,
2668
- Aa as shouldRunAudioPipeline,
2669
- Ot as sortStatuses,
2670
- tn as sourceKey,
2671
- Si as statusIn,
2672
- _r as stepsOf,
2673
- Ne as stripHtml,
2674
- Cr as subjectKeyOf,
2792
+ rn as novelty,
2793
+ Gr as parseActingIdentity,
2794
+ bi as parseItemKey,
2795
+ Ft as pathToRegex,
2796
+ nr as periodsInRange,
2797
+ ma as phoneSuffix,
2798
+ ba as plainTextFromMarkdown,
2799
+ st as playbookActor,
2800
+ ei as procedureOf,
2801
+ _i as projectDossierKeys,
2802
+ Ht as publicBasePathFor,
2803
+ oa as publicRoutePatterns,
2804
+ C as readPath,
2805
+ Y as readStepError,
2806
+ lt as refKey,
2807
+ fn as registrableDomain,
2808
+ St as rejectExampleCandidate,
2809
+ jr as relatedByDefault,
2810
+ Dt as resolveAccountCapabilities,
2811
+ N as resolveActivityText,
2812
+ Lt as resolveChannelIntents,
2813
+ Je as resolveSignature,
2814
+ Zi as resolveWorkMode,
2815
+ ra as resourceKindOf,
2816
+ Br as runActor,
2817
+ ii as runInteractionId,
2818
+ Ve as sanitizeInline,
2819
+ Yt as sanitizeTranscript,
2820
+ xr as selectLenses,
2821
+ $i as sessionsHoldCannotReach,
2822
+ xi as sessionsToHold,
2823
+ de as shareKeyForTeam,
2824
+ ue as shareKeyForUser,
2825
+ ur as shareKeysForViewer,
2826
+ Qi as shouldRunAudioPipeline,
2827
+ Ct as sortStatuses,
2828
+ Rt as sourceKey,
2829
+ Ti as statusIn,
2830
+ Qr as stepsOf,
2831
+ we as stripHtml,
2832
+ ri as subjectKeyOf,
2675
2833
  ge as subjectOf,
2676
- Ai as suggestProjectKey,
2677
- Ar as targetById,
2678
- yr as targetForActivityType,
2679
- rt as toActingIdentity,
2680
- re as toE164,
2681
- rr as toolSourceKinds,
2682
- St as topicOfferedForTeam,
2683
- Pr as topicsForTeam,
2684
- bt as truncateExample,
2685
- Ii as uniqueWorkStatusKey,
2686
- pi as uniqueWorkTypeKey,
2687
- Ge as usageMetricId,
2688
- Yn as usageMetrics,
2689
- Mi as validateStatuses,
2690
- hr as valueAtPath,
2691
- or as wakesAssignment,
2692
- Nt as workItemScopeKey,
2693
- Ee as workProjectScopeKey,
2694
- $t as workStatusKey,
2695
- Mt as workTypeKey
2834
+ Ei as suggestProjectKey,
2835
+ Wr as targetById,
2836
+ Hr as targetForActivityType,
2837
+ ot as toActingIdentity,
2838
+ Q as toE164,
2839
+ dr as toolSourceKinds,
2840
+ _t as topicOfferedForTeam,
2841
+ mi as topicsForTeam,
2842
+ Et as truncateExample,
2843
+ Mi as uniqueWorkStatusKey,
2844
+ li as uniqueWorkTypeKey,
2845
+ Ke as usageMetricId,
2846
+ rr as usageMetrics,
2847
+ ki as validateStatuses,
2848
+ Vr as valueAtPath,
2849
+ mr as wakesAssignment,
2850
+ wt as workItemScopeKey,
2851
+ he as workProjectScopeKey,
2852
+ Nt as workStatusKey,
2853
+ ht as workTypeKey
2696
2854
  };