@opencxh/domain 1.189.0 → 1.191.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- const wn = 10, Mn = 10, kn = 10, Cn = 5, Ie = /* @__PURE__ */ new Set([
1
+ const Hn = 10, Fn = 10, Wn = 10, Vn = 5, Ce = /* @__PURE__ */ new Set([
2
2
  "header",
3
3
  "section",
4
4
  "context",
@@ -8,13 +8,13 @@ const wn = 10, Mn = 10, kn = 10, Cn = 5, Ie = /* @__PURE__ */ new Set([
8
8
  "actions",
9
9
  "attachments"
10
10
  ]);
11
- function T(e) {
11
+ function w(e) {
12
12
  if (typeof e == "string") return e.length > 0;
13
13
  if (!e || typeof e != "object") return !1;
14
14
  const t = e;
15
15
  return typeof t.key == "string" || typeof t.value == "string";
16
16
  }
17
- function On(e, t = () => {
17
+ function zn(e, t = () => {
18
18
  }) {
19
19
  if (!Array.isArray(e)) return [];
20
20
  const n = [];
@@ -25,19 +25,19 @@ function On(e, t = () => {
25
25
  }
26
26
  if (!r || typeof r != "object") continue;
27
27
  const i = r;
28
- if (!Ie.has(i.type)) {
28
+ if (!Ce.has(i.type)) {
29
29
  t(`unknown block type ${String(i.type)}`);
30
30
  continue;
31
31
  }
32
32
  switch (i.type) {
33
33
  case "header":
34
- if (!T(i.text)) {
34
+ if (!w(i.text)) {
35
35
  t("a header without text");
36
36
  continue;
37
37
  }
38
38
  break;
39
39
  case "context":
40
- if (!T(i.text)) {
40
+ if (!w(i.text)) {
41
41
  t("a context block without text");
42
42
  continue;
43
43
  }
@@ -59,7 +59,7 @@ function On(e, t = () => {
59
59
  i.items.length > 10 && (t("more than 10 list items"), i.items = i.items.slice(0, 10));
60
60
  break;
61
61
  case "actions": {
62
- const a = Array.isArray(i.elements) ? i.elements : [], o = a.filter((s) => s?.action_id && s.invoke && T(s.text));
62
+ const a = Array.isArray(i.elements) ? i.elements : [], o = a.filter((s) => s?.action_id && s.invoke && w(s.text));
63
63
  if (o.length !== a.length && t("an action without action_id, invoke or text"), o.length === 0) continue;
64
64
  o.length > 5 && t("more than 5 actions"), i.elements = o.slice(0, 5);
65
65
  break;
@@ -69,24 +69,24 @@ function On(e, t = () => {
69
69
  }
70
70
  return n;
71
71
  }
72
- function we(e) {
72
+ function Oe(e) {
73
73
  return e.replace(/<style[\s\S]*?<\/style>/gi, " ").replace(/<script[\s\S]*?<\/script>/gi, " ").replace(/<[^>]+>/g, " ").replace(/&nbsp;/g, " ").replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/\s+/g, " ").trim();
74
74
  }
75
- function A(e) {
75
+ function b(e) {
76
76
  if (!e || e < 0) return "";
77
77
  const t = Math.floor(e / 60), n = Math.floor(e % 60);
78
78
  return `${t}:${n.toString().padStart(2, "0")}`;
79
79
  }
80
- function x(e) {
80
+ function D(e) {
81
81
  return e ? ` — ${Math.floor(e / 60)}m ${e % 60}s` : "";
82
82
  }
83
- function I(e) {
83
+ function M(e) {
84
84
  return e?.split("@")?.[0] || e || "";
85
85
  }
86
- function b(e) {
86
+ function E(e) {
87
87
  return e.map((t) => t.name).join(", ");
88
88
  }
89
- function $(e) {
89
+ function L(e) {
90
90
  return e === "meeting" ? "Meeting" : e === "video" ? "Video call" : "Audio call";
91
91
  }
92
92
  const m = {
@@ -96,7 +96,7 @@ const m = {
96
96
  channelKind: "voice",
97
97
  icon: "phone",
98
98
  snippet: () => "Gesprek gestart",
99
- timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${I(e.payload.from)}` : `Outbound call started — ${I(e.payload.to)}`
99
+ timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${M(e.payload.from)}` : `Outbound call started — ${M(e.payload.to)}`
100
100
  },
101
101
  VOICE_CALL_ANSWERED: {
102
102
  shape: "event",
@@ -123,15 +123,15 @@ const m = {
123
123
  shape: "event",
124
124
  channelKind: "voice",
125
125
  icon: "phone",
126
- snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${A(e.payload.duration)})` : ""}`,
127
- timeline: (e) => `Call ended${x(e.payload.duration)}`
126
+ snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${b(e.payload.duration)})` : ""}`,
127
+ timeline: (e) => `Call ended${D(e.payload.duration)}`
128
128
  },
129
129
  VOICE_CALL_MISSED: {
130
130
  shape: "event",
131
131
  channelKind: "voice",
132
132
  icon: "phone",
133
133
  snippet: () => "Gemiste oproep",
134
- timeline: (e) => `Missed call — ${I(e.payload.from)}`
134
+ timeline: (e) => `Missed call — ${M(e.payload.from)}`
135
135
  },
136
136
  VOICE_CALL_FAILED: {
137
137
  shape: "event",
@@ -178,7 +178,7 @@ const m = {
178
178
  shape: "event",
179
179
  channelKind: "video",
180
180
  icon: "video",
181
- snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${A(e.payload.duration)})` : ""}`,
181
+ snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${b(e.payload.duration)})` : ""}`,
182
182
  timeline: () => "Video call ended"
183
183
  },
184
184
  VIDEO_CALL_MISSED: {
@@ -206,7 +206,7 @@ const m = {
206
206
  replyable: !0,
207
207
  carriesText: !0,
208
208
  countsAs: "inbound_message",
209
- snippet: R
209
+ snippet: P
210
210
  },
211
211
  EMAIL_SENT: {
212
212
  shape: "message",
@@ -216,7 +216,7 @@ const m = {
216
216
  replyable: !0,
217
217
  carriesText: !0,
218
218
  countsAs: "outbound_message",
219
- snippet: R
219
+ snippet: P
220
220
  },
221
221
  /* ---- chat ---- */
222
222
  CHAT_MESSAGE_SENT: {
@@ -245,9 +245,9 @@ const m = {
245
245
  shape: "event",
246
246
  channelKind: "chat",
247
247
  icon: "message-circle",
248
- snippet: (e) => `${b(e.payload.members)} toegevoegd`,
248
+ snippet: (e) => `${E(e.payload.members)} toegevoegd`,
249
249
  timeline: (e) => {
250
- const t = b(e.payload.members) || "Someone", n = e.payload.initiator?.name ? ` · added by ${e.payload.initiator.name}` : "";
250
+ const t = E(e.payload.members) || "Someone", n = e.payload.initiator?.name ? ` · added by ${e.payload.initiator.name}` : "";
251
251
  return `${t} joined the chat${n}`;
252
252
  }
253
253
  },
@@ -255,9 +255,9 @@ const m = {
255
255
  shape: "event",
256
256
  channelKind: "chat",
257
257
  icon: "message-circle",
258
- snippet: (e) => `${b(e.payload.members)} verlaten`,
258
+ snippet: (e) => `${E(e.payload.members)} verlaten`,
259
259
  timeline: (e) => {
260
- const t = b(e.payload.members) || "Someone", n = e.payload.initiator?.name ? ` · removed by ${e.payload.initiator.name}` : "";
260
+ const t = E(e.payload.members) || "Someone", n = e.payload.initiator?.name ? ` · removed by ${e.payload.initiator.name}` : "";
261
261
  return `${t} left the chat${n}`;
262
262
  }
263
263
  },
@@ -273,15 +273,15 @@ const m = {
273
273
  channelKind: "chat",
274
274
  icon: "message-circle",
275
275
  snippet: () => "Gesprek gestart",
276
- timeline: (e) => `${$(e.payload.callType)} started${e.payload.initiator ? ` by ${e.payload.initiator.name}` : ""}`,
276
+ timeline: (e) => `${L(e.payload.callType)} started${e.payload.initiator ? ` by ${e.payload.initiator.name}` : ""}`,
277
277
  joinUrl: (e) => e.payload.joinUrl
278
278
  },
279
279
  CHAT_CALL_ENDED: {
280
280
  shape: "event",
281
281
  channelKind: "chat",
282
282
  icon: "message-circle",
283
- snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${A(e.payload.duration)})` : ""}`,
284
- timeline: (e) => `${$(e.payload.callType)} ended${x(e.payload.duration)}`,
283
+ snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${b(e.payload.duration)})` : ""}`,
284
+ timeline: (e) => `${L(e.payload.callType)} ended${D(e.payload.duration)}`,
285
285
  joinUrl: (e) => e.payload.joinUrl
286
286
  },
287
287
  CHAT_EVENT: {
@@ -370,7 +370,7 @@ const m = {
370
370
  MEETING_ENDED: {
371
371
  shape: "event",
372
372
  icon: "calendar",
373
- snippet: (e) => `Vergadering beëindigd${e.payload.duration ? ` (${A(e.payload.duration)})` : ""}`,
373
+ snippet: (e) => `Vergadering beëindigd${e.payload.duration ? ` (${b(e.payload.duration)})` : ""}`,
374
374
  timeline: () => "Meeting ended"
375
375
  },
376
376
  MEETING_PARTICIPANT_JOINED: {
@@ -438,57 +438,57 @@ const m = {
438
438
  timeline: (e, t) => `Status changed by ${t}`
439
439
  }
440
440
  };
441
- function R(e) {
442
- const t = e.payload, n = t.bodyText?.trim() || t.bodySnippet?.trim() || we(t.body ?? "");
441
+ function P(e) {
442
+ const t = e.payload, n = t.bodyText?.trim() || t.bodySnippet?.trim() || Oe(t.body ?? "");
443
443
  return t.subject ? `${t.subject} — ${n}` : n;
444
444
  }
445
445
  function d(e) {
446
446
  return m[e];
447
447
  }
448
- function Nn(e) {
448
+ function Xn(e) {
449
449
  return d(e)?.icon ?? "circle";
450
450
  }
451
- function vn(e) {
451
+ function Yn(e) {
452
452
  return d(e)?.channelKind;
453
453
  }
454
- function ae(e) {
454
+ function ce(e) {
455
455
  return e === "message" || e === "note";
456
456
  }
457
- function xn(e) {
458
- return ae(d(e)?.shape);
457
+ function qn(e) {
458
+ return ce(d(e)?.shape);
459
459
  }
460
- function $n(e) {
460
+ function Jn(e) {
461
461
  return d(e)?.replyable === !0;
462
462
  }
463
- function Rn(e) {
463
+ function Zn(e) {
464
464
  return d(e)?.carriesText === !0;
465
465
  }
466
- function Dn(e) {
466
+ function ve(e) {
467
467
  return d(e)?.countsAs;
468
468
  }
469
- function Ln(e) {
469
+ function Qn(e) {
470
470
  return d(e)?.playbookAuthored === !0;
471
471
  }
472
- function Pn(e) {
472
+ function er(e) {
473
473
  return d(e)?.connected === !0;
474
474
  }
475
- function Kn(e) {
475
+ function tr(e) {
476
476
  const t = d(e);
477
477
  return t?.shape === "artifact" && t?.carriesText === !0;
478
478
  }
479
- function Me(e) {
479
+ function Ne(e) {
480
480
  const t = d(e.type)?.snippet;
481
481
  return t ? t(e) : "";
482
482
  }
483
- function Un(e, t) {
483
+ function nr(e, t) {
484
484
  const n = d(e.type)?.timeline;
485
485
  return n ? n(e, t) : e.type.replace(/_/g, " ").toLowerCase();
486
486
  }
487
- function Gn(e) {
487
+ function rr(e) {
488
488
  const t = d(e.type)?.joinUrl;
489
489
  return t ? t(e) : void 0;
490
490
  }
491
- function C(e, t) {
491
+ function v(e, t) {
492
492
  let n = e;
493
493
  for (const r of t.split(".")) {
494
494
  if (n == null || typeof n != "object") return "";
@@ -496,43 +496,43 @@ function C(e, t) {
496
496
  }
497
497
  return n == null ? "" : typeof n == "string" ? n : typeof n == "number" || typeof n == "boolean" ? String(n) : "";
498
498
  }
499
- function O(e, t, n) {
499
+ function N(e, t, n) {
500
500
  if (e === void 0) return null;
501
501
  if (typeof e == "string") return e || null;
502
502
  if ("value" in e)
503
- return C(t, e.value) || null;
503
+ return v(t, e.value) || null;
504
504
  const r = {};
505
505
  for (const [a, o] of Object.entries(e.params ?? {}))
506
- r[a] = C(t, o);
506
+ r[a] = v(t, o);
507
507
  const i = n(e.key, r);
508
508
  return i === e.key ? null : i;
509
509
  }
510
- function ke(e, t) {
510
+ function Re(e, t) {
511
511
  if (!e || typeof e == "string" || "value" in e) return null;
512
512
  const n = {};
513
513
  for (const [r, i] of Object.entries(e.params ?? {}))
514
- n[r] = C(t, i);
514
+ n[r] = v(t, i);
515
515
  return { key: e.key, params: n };
516
516
  }
517
- const D = 140;
518
- function Ce(e) {
517
+ const U = 140;
518
+ function $e(e) {
519
519
  const t = e.trim();
520
- return t.length <= D ? t : `${t.slice(0, D - 1).trimEnd()}…`;
520
+ return t.length <= U ? t : `${t.slice(0, U - 1).trimEnd()}…`;
521
521
  }
522
- function jn(e, t) {
523
- const n = ke(t?.text, e), r = t ? O(t.text, e, (i) => i) : null;
522
+ function ir(e, t) {
523
+ const n = Re(t?.text, e), r = t ? N(t.text, e, (i) => i) : null;
524
524
  return {
525
525
  activityId: e.id,
526
526
  type: e.type,
527
- snippet: Ce(r ?? Me(e)),
527
+ snippet: $e(r ?? Ne(e)),
528
528
  authorName: e.author?.name ?? "",
529
529
  direction: e.direction,
530
530
  createdAt: e.createdAt ?? Date.now(),
531
531
  ...n ? { snippetKey: n.key, snippetParams: n.params } : {}
532
532
  };
533
533
  }
534
- const Oe = (e) => e;
535
- function L(e) {
534
+ const xe = (e) => e;
535
+ function K(e) {
536
536
  const t = m[e];
537
537
  return {
538
538
  type: e,
@@ -548,7 +548,7 @@ function L(e) {
548
548
  displayNameKey: t.displayNameKey
549
549
  };
550
550
  }
551
- function P(e) {
551
+ function G(e) {
552
552
  return {
553
553
  type: e.type,
554
554
  shape: e.shape,
@@ -563,21 +563,21 @@ function P(e) {
563
563
  displayNameKey: e.displayNameKey
564
564
  };
565
565
  }
566
- class Ne {
567
- constructor(t = [], n = Oe) {
566
+ class De {
567
+ constructor(t = [], n = xe) {
568
568
  this.translate = n;
569
569
  for (const r of t)
570
570
  r?.type && (r.type in m || this.declared.has(r.type) || this.declared.set(r.type, r));
571
571
  }
572
572
  declared = /* @__PURE__ */ new Map();
573
573
  get(t) {
574
- if (t in m) return L(t);
574
+ if (t in m) return K(t);
575
575
  const n = this.declared.get(t);
576
- return n ? P(n) : void 0;
576
+ return n ? G(n) : void 0;
577
577
  }
578
578
  /** Everything that may be offered as a trigger, built-in and declared. */
579
579
  triggerable() {
580
- const t = Object.keys(m).filter((r) => m[r].triggerable).map(L), n = [...this.declared.values()].map(P).filter((r) => r.triggerable);
580
+ const t = Object.keys(m).filter((r) => m[r].triggerable).map(K), n = [...this.declared.values()].map(G).filter((r) => r.triggerable);
581
581
  return [...t, ...n];
582
582
  }
583
583
  /**
@@ -589,14 +589,14 @@ class Ne {
589
589
  const r = m[t.type];
590
590
  if (r?.timeline) return r.timeline(t, n);
591
591
  const i = this.declared.get(t.type);
592
- return O(i?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
592
+ return N(i?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
593
593
  }
594
594
  /** The line for the inbox list. Empty when the type has nothing to show. */
595
595
  snippet(t) {
596
596
  const n = m[t.type];
597
597
  if (n?.snippet) return n.snippet(t);
598
598
  const r = this.declared.get(t.type);
599
- return O(r?.text, t, this.translate) ?? "";
599
+ return N(r?.text, t, this.translate) ?? "";
600
600
  }
601
601
  /** The descriptor as it arrived; needed to store `text` as a key. */
602
602
  descriptor(t) {
@@ -621,7 +621,7 @@ class Ne {
621
621
  * {@link ResolvedActivityType}.
622
622
  */
623
623
  isMessage(t) {
624
- return ae(this.get(t)?.shape);
624
+ return ce(this.get(t)?.shape);
625
625
  }
626
626
  /** Can a person reply to this? Notes cannot — those go nowhere. */
627
627
  isReplyable(t) {
@@ -649,23 +649,23 @@ class Ne {
649
649
  return this.translate;
650
650
  }
651
651
  }
652
- const Bn = new Ne();
653
- function Fn(e, t, n = []) {
652
+ const ar = new De();
653
+ function or(e, t, n = []) {
654
654
  const r = e.createdAt;
655
655
  if (!r) return [];
656
656
  const i = new Set(n);
657
657
  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);
658
658
  }
659
- function Hn(e) {
659
+ function Le(e) {
660
660
  return e.createdAt ?? 0;
661
661
  }
662
- function Vn(e) {
662
+ function sr(e) {
663
663
  return e.type === "EMAIL_RECEIVED" || e.type === "EMAIL_SENT";
664
664
  }
665
- function Wn(e) {
665
+ function cr(e) {
666
666
  return e.type === "CHAT_MESSAGE_SENT" || e.type === "CHAT_MESSAGE_RECEIVED";
667
667
  }
668
- const oe = [
668
+ const le = [
669
669
  {
670
670
  id: "openai",
671
671
  attachmentKinds: ["image", "pdf"],
@@ -755,52 +755,52 @@ const oe = [
755
755
  defaultModel: "default"
756
756
  }
757
757
  ];
758
- function S(e) {
759
- return oe.find((t) => t.id === e);
758
+ function T(e) {
759
+ return le.find((t) => t.id === e);
760
760
  }
761
- function zn(e) {
762
- return S(e)?.label ?? e;
761
+ function lr(e) {
762
+ return T(e)?.label ?? e;
763
763
  }
764
- function Xn(e, t = "gpt-5-mini") {
765
- return S(e)?.defaultModel ?? t;
764
+ function ur(e, t = "gpt-5-mini") {
765
+ return T(e)?.defaultModel ?? t;
766
766
  }
767
- function Yn(e) {
768
- return oe.filter((t) => t.capabilities.includes(e));
767
+ function dr(e) {
768
+ return le.filter((t) => t.capabilities.includes(e));
769
769
  }
770
- function qn(e) {
771
- const t = S(e);
770
+ function pr(e) {
771
+ const t = T(e);
772
772
  return !!t && !t.baseUrl;
773
773
  }
774
- function Jn(e, t) {
775
- return t === "text" ? !0 : S(e)?.attachmentKinds?.includes(t) === !0;
774
+ function fr(e, t) {
775
+ return t === "text" ? !0 : T(e)?.attachmentKinds?.includes(t) === !0;
776
776
  }
777
- function Zn(e, t) {
777
+ function mr(e, t) {
778
778
  if (!e.enabled) return "ok";
779
- const n = K(e.hardLimitNanos), r = K(e.softLimitNanos);
779
+ const n = j(e.hardLimitNanos), r = j(e.softLimitNanos);
780
780
  return n !== void 0 && t >= n ? "hard" : r !== void 0 && t >= r ? "soft" : "ok";
781
781
  }
782
- function K(e) {
782
+ function j(e) {
783
783
  return typeof e == "number" ? e : void 0;
784
784
  }
785
- function ve(e, t = "month") {
785
+ function Pe(e, t = "month") {
786
786
  const n = new Date(e);
787
787
  return Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), 1);
788
788
  }
789
- function Qn(e, t = "month") {
790
- const n = new Date(ve(e, t));
789
+ function gr(e, t = "month") {
790
+ const n = new Date(Pe(e, t));
791
791
  return `${n.getUTCFullYear()}-${String(n.getUTCMonth() + 1).padStart(2, "0")}`;
792
792
  }
793
- function er(e) {
793
+ function hr(e) {
794
794
  return e?.listeningEnabled !== !1;
795
795
  }
796
- function tr(e) {
796
+ function yr(e) {
797
797
  const t = [];
798
798
  for (const n of Object.keys(e))
799
799
  for (const r of Object.keys(e[n]))
800
800
  t.push({ lang: n, key: r, value: e[n][r] });
801
801
  return t;
802
802
  }
803
- const nr = [
803
+ const Ar = [
804
804
  { id: "agent", label: "Agent", labelSource: "user" },
805
805
  { id: "team", label: "Team", labelSource: "team" },
806
806
  { id: "inbox", label: "Inbox", labelSource: "inbox" },
@@ -810,47 +810,47 @@ const nr = [
810
810
  { id: "handledBy", label: "Afhandelaar", labelSource: "raw" },
811
811
  { id: "time", label: "Tijd", labelSource: "raw" }
812
812
  ];
813
- function w(e) {
813
+ function k(e) {
814
814
  return e < 10 ? `0${e}` : `${e}`;
815
815
  }
816
- function xe(e, t) {
817
- const n = new Date(e), r = `${n.getUTCFullYear()}-${w(n.getUTCMonth() + 1)}-${w(n.getUTCDate())}`;
818
- return t === "day" ? r : `${r}T${w(n.getUTCHours())}`;
816
+ function Ue(e, t) {
817
+ const n = new Date(e), r = `${n.getUTCFullYear()}-${k(n.getUTCMonth() + 1)}-${k(n.getUTCDate())}`;
818
+ return t === "day" ? r : `${r}T${k(n.getUTCHours())}`;
819
819
  }
820
- function $e(e, t) {
820
+ function Ke(e, t) {
821
821
  const n = new Date(e);
822
822
  return n.setUTCMinutes(0, 0, 0), t === "day" && n.setUTCHours(0), n.getTime();
823
823
  }
824
- const Re = 36e5, De = 864e5;
825
- function rr(e, t, n) {
826
- const r = n === "hour" ? Re : De, i = [];
827
- for (let a = $e(e, n); a <= t; a += r)
828
- i.push(xe(a, n));
824
+ const Ge = 36e5, je = 864e5;
825
+ function br(e, t, n) {
826
+ const r = n === "hour" ? Ge : je, i = [];
827
+ for (let a = Ke(e, n); a <= t; a += r)
828
+ i.push(Ue(a, n));
829
829
  return i;
830
830
  }
831
- const Le = [
831
+ const Be = [
832
832
  { id: "resource", label: "Resource", labelSource: "raw" },
833
833
  { id: "origin", label: "Herkomst", labelSource: "raw" }
834
- ], Pe = Le.map((e) => e.id);
835
- function Ke(e, t) {
834
+ ], He = Be.map((e) => e.id);
835
+ function Fe(e, t) {
836
836
  return `${e}.usage.${t}`;
837
837
  }
838
- function ir(e, t) {
838
+ function Er(e, t) {
839
839
  return t.map((n) => ({
840
- id: Ke(e, n.unit),
840
+ id: Fe(e, n.unit),
841
841
  label: n.label,
842
842
  category: "Verbruik",
843
843
  valueType: n.valueType ?? "count",
844
844
  aggregation: "sum",
845
845
  supportedDimensions: [
846
846
  "provider",
847
- ...Pe,
847
+ ...He,
848
848
  ...n.extraDimensions ?? [],
849
849
  "time"
850
850
  ]
851
851
  }));
852
852
  }
853
- const se = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), U = 200, G = 100, j = 200, B = 12, F = 4, ce = 4e3, M = 500, ar = 256 * 1024, Ue = /* @__PURE__ */ new Set([
853
+ const ue = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), B = 200, H = 100, F = 200, W = 12, V = 4, de = 4e3, C = 500, Sr = 256 * 1024, We = /* @__PURE__ */ new Set([
854
854
  "heading",
855
855
  "paragraph",
856
856
  "list",
@@ -860,15 +860,15 @@ const se = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]
860
860
  "table",
861
861
  "kpi",
862
862
  "callout"
863
- ]), Ge = ["http:", "https:", "mailto:", "tel:"], je = /^[a-z][a-z0-9+.-]*:/i;
864
- function le(e) {
863
+ ]), Ve = ["http:", "https:", "mailto:", "tel:"], ze = /^[a-z][a-z0-9+.-]*:/i;
864
+ function pe(e) {
865
865
  const t = e.trim().replace(/^<|>$/g, "");
866
866
  if (!t) return !1;
867
- const n = je.exec(t)?.[0];
868
- return n ? Ge.includes(n.toLowerCase()) : !t.startsWith("//");
867
+ const n = ze.exec(t)?.[0];
868
+ return n ? Ve.includes(n.toLowerCase()) : !t.startsWith("//");
869
869
  }
870
- const Be = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
871
- function Fe(e) {
870
+ const Xe = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
871
+ function Ye(e) {
872
872
  let t = "", n = 0;
873
873
  for (; n < e.length; ) {
874
874
  const r = e[n] === "!" && e[n + 1] === "[";
@@ -876,22 +876,22 @@ function Fe(e) {
876
876
  t += e[n], n += 1;
877
877
  continue;
878
878
  }
879
- const i = n + (r ? 2 : 1), a = H(e, i, "[", "]");
879
+ const i = n + (r ? 2 : 1), a = z(e, i, "[", "]");
880
880
  if (a < 0 || e[a + 1] !== "(") {
881
881
  t += e[n], n += 1;
882
882
  continue;
883
883
  }
884
- const o = H(e, a + 2, "(", ")");
884
+ const o = z(e, a + 2, "(", ")");
885
885
  if (o < 0) {
886
886
  t += e[n], n += 1;
887
887
  continue;
888
888
  }
889
889
  const s = e.slice(i, a), c = e.slice(a + 2, o).trim().split(/\s+/)[0] ?? "";
890
- t += r || !le(c) ? s : e.slice(n, o + 1), n = o + 1;
890
+ t += r || !pe(c) ? s : e.slice(n, o + 1), n = o + 1;
891
891
  }
892
892
  return t;
893
893
  }
894
- function H(e, t, n, r) {
894
+ function z(e, t, n, r) {
895
895
  let i = 1;
896
896
  for (let a = t; a < e.length; a += 1) {
897
897
  if (e[a] === "\\") {
@@ -904,33 +904,33 @@ function H(e, t, n, r) {
904
904
  }
905
905
  return -1;
906
906
  }
907
- function He(e) {
908
- return Fe(e).replace(
909
- Be,
910
- (t, n, r) => le(r) ? t : ""
907
+ function qe(e) {
908
+ return Ye(e).replace(
909
+ Xe,
910
+ (t, n, r) => pe(r) ? t : ""
911
911
  );
912
912
  }
913
- function u(e, t = ce) {
914
- return typeof e == "string" ? He(e).slice(0, t) : "";
913
+ function u(e, t = de) {
914
+ return typeof e == "string" ? qe(e).slice(0, t) : "";
915
915
  }
916
- function Ve(e, t = ce) {
916
+ function Je(e, t = de) {
917
917
  return typeof e == "string" ? e.slice(0, t) : "";
918
918
  }
919
- function We(e, t = "info") {
920
- return typeof e == "string" && se.has(e) ? e : t;
919
+ function Ze(e, t = "info") {
920
+ return typeof e == "string" && ue.has(e) ? e : t;
921
921
  }
922
- function or(e, t = () => {
922
+ function _r(e, t = () => {
923
923
  }) {
924
924
  if (!Array.isArray(e)) return [];
925
925
  const n = [];
926
926
  for (const r of e) {
927
- if (n.length >= U) {
928
- t(`more than ${U} blocks; the rest was dropped`);
927
+ if (n.length >= B) {
928
+ t(`more than ${B} blocks; the rest was dropped`);
929
929
  break;
930
930
  }
931
931
  if (!r || typeof r != "object") continue;
932
932
  const i = r;
933
- if (!Ue.has(i.type)) {
933
+ if (!We.has(i.type)) {
934
934
  t(`unknown block type ${String(i.type)}`);
935
935
  continue;
936
936
  }
@@ -965,7 +965,7 @@ function or(e, t = () => {
965
965
  break;
966
966
  }
967
967
  case "code": {
968
- const o = Ve(i.text);
968
+ const o = Je(i.text);
969
969
  if (!o) {
970
970
  t("a code block without text");
971
971
  continue;
@@ -980,8 +980,8 @@ function or(e, t = () => {
980
980
  case "list": {
981
981
  const o = Array.isArray(i.items) ? i.items : [], s = [];
982
982
  for (const p of o) {
983
- if (s.length >= G) {
984
- t(`more than ${G} list items`);
983
+ if (s.length >= H) {
984
+ t(`more than ${H} list items`);
985
985
  break;
986
986
  }
987
987
  const f = u(p?.text);
@@ -1000,12 +1000,12 @@ function or(e, t = () => {
1000
1000
  case "table": {
1001
1001
  const o = Array.isArray(i.columns) ? i.columns : [], s = [];
1002
1002
  for (const l of o) {
1003
- if (s.length >= B) {
1004
- t(`more than ${B} table columns`);
1003
+ if (s.length >= W) {
1004
+ t(`more than ${W} table columns`);
1005
1005
  break;
1006
1006
  }
1007
- const y = u(l?.label, M), _ = l?.align === "right" ? "right" : void 0;
1008
- s.push(_ ? { label: y, align: _ } : { label: y });
1007
+ const A = u(l?.label, C), I = l?.align === "right" ? "right" : void 0;
1008
+ s.push(I ? { label: A, align: I } : { label: A });
1009
1009
  }
1010
1010
  if (s.length === 0) {
1011
1011
  t("a table without columns");
@@ -1013,14 +1013,14 @@ function or(e, t = () => {
1013
1013
  }
1014
1014
  const c = Array.isArray(i.rows) ? i.rows : [], p = [];
1015
1015
  for (const l of c) {
1016
- if (p.length >= j) {
1017
- t(`more than ${j} table rows`);
1016
+ if (p.length >= F) {
1017
+ t(`more than ${F} table rows`);
1018
1018
  break;
1019
1019
  }
1020
- const y = Array.isArray(l) ? l : [];
1021
- p.push(s.map((_, Te) => u(y[Te], M)));
1020
+ const A = Array.isArray(l) ? l : [];
1021
+ p.push(s.map((I, ke) => u(A[ke], C)));
1022
1022
  }
1023
- const f = u(i.caption, M);
1023
+ const f = u(i.caption, C);
1024
1024
  n.push({
1025
1025
  ...a,
1026
1026
  type: "table",
@@ -1033,15 +1033,15 @@ function or(e, t = () => {
1033
1033
  case "kpi": {
1034
1034
  const o = Array.isArray(i.items) ? i.items : [], s = [];
1035
1035
  for (const c of o) {
1036
- if (s.length >= F) {
1037
- t(`more than ${F} kpi items`);
1036
+ if (s.length >= V) {
1037
+ t(`more than ${V} kpi items`);
1038
1038
  break;
1039
1039
  }
1040
1040
  const p = u(c?.value, 40), f = u(c?.label, 80);
1041
1041
  if (!p || !f) continue;
1042
1042
  const l = c?.tone;
1043
1043
  s.push(
1044
- typeof l == "string" && se.has(l) ? { value: p, label: f, tone: l } : { value: p, label: f }
1044
+ typeof l == "string" && ue.has(l) ? { value: p, label: f, tone: l } : { value: p, label: f }
1045
1045
  );
1046
1046
  }
1047
1047
  if (s.length === 0) {
@@ -1061,7 +1061,7 @@ function or(e, t = () => {
1061
1061
  n.push({
1062
1062
  ...a,
1063
1063
  type: "callout",
1064
- tone: We(i.tone),
1064
+ tone: Ze(i.tone),
1065
1065
  ...s ? { title: s } : {},
1066
1066
  text: o
1067
1067
  });
@@ -1071,28 +1071,28 @@ function or(e, t = () => {
1071
1071
  }
1072
1072
  return n;
1073
1073
  }
1074
- function sr(e) {
1074
+ function Tr(e) {
1075
1075
  return JSON.stringify(e).length;
1076
1076
  }
1077
- function cr(e) {
1077
+ function Ir(e) {
1078
1078
  return {
1079
1079
  blocks: e.length,
1080
1080
  types: e.map((t) => t.type),
1081
1081
  headings: e.flatMap((t) => t.type === "heading" ? [t.text] : [])
1082
1082
  };
1083
1083
  }
1084
- function V(e) {
1084
+ function X(e) {
1085
1085
  return e.replace(/\|/g, "\\|").replace(/\r?\n/g, " ").trim();
1086
1086
  }
1087
- function W(e, t, n) {
1087
+ function Y(e, t, n) {
1088
1088
  const r = e.map((i, a) => n?.[a] === "right" ? "---:" : "---");
1089
1089
  return [
1090
- `| ${e.map(V).join(" | ")} |`,
1090
+ `| ${e.map(X).join(" | ")} |`,
1091
1091
  `| ${r.join(" | ")} |`,
1092
- ...t.map((i) => `| ${i.map(V).join(" | ")} |`)
1092
+ ...t.map((i) => `| ${i.map(X).join(" | ")} |`)
1093
1093
  ];
1094
1094
  }
1095
- function ze(e) {
1095
+ function Qe(e) {
1096
1096
  switch (e.type) {
1097
1097
  case "heading":
1098
1098
  return [`${"#".repeat(e.level)} ${e.text}`];
@@ -1110,7 +1110,7 @@ function ze(e) {
1110
1110
  return t.lead ? `${r} **${t.lead}** ${t.text}` : `${r} ${t.text}`;
1111
1111
  });
1112
1112
  case "table": {
1113
- const t = W(
1113
+ const t = Y(
1114
1114
  e.columns.map((n) => n.label),
1115
1115
  e.rows,
1116
1116
  e.columns.map((n) => n.align ?? "left")
@@ -1118,7 +1118,7 @@ function ze(e) {
1118
1118
  return e.caption ? [...t, "", `*${e.caption}*`] : t;
1119
1119
  }
1120
1120
  case "kpi":
1121
- return W(
1121
+ return Y(
1122
1122
  e.items.map((t) => t.value),
1123
1123
  [e.items.map((t) => t.label)]
1124
1124
  );
@@ -1126,11 +1126,11 @@ function ze(e) {
1126
1126
  return (e.title ? `**${e.title}** ${e.text}` : e.text).split(/\r?\n/).map((n) => `> ${n}`);
1127
1127
  }
1128
1128
  }
1129
- function lr(e, t) {
1129
+ function wr(e, t) {
1130
1130
  const n = [], r = e.some((i) => i.type === "heading" && i.level === 1);
1131
1131
  t && !r && n.push(`# ${t}`);
1132
1132
  for (const i of e) {
1133
- const a = ze(i);
1133
+ const a = Qe(i);
1134
1134
  a.length > 0 && n.push(a.join(`
1135
1135
  `));
1136
1136
  }
@@ -1139,41 +1139,41 @@ function lr(e, t) {
1139
1139
  `)}
1140
1140
  `;
1141
1141
  }
1142
- const ue = (e) => `user:${e}`, de = (e) => `team:${e}`;
1143
- function ur(e) {
1142
+ const fe = (e) => `user:${e}`, me = (e) => `team:${e}`;
1143
+ function Mr(e) {
1144
1144
  const t = /* @__PURE__ */ new Set();
1145
1145
  for (const n of e ?? [])
1146
- n?.id && (n.kind === "user" && t.add(ue(n.id)), n.kind === "team" && t.add(de(n.id)));
1146
+ n?.id && (n.kind === "user" && t.add(fe(n.id)), n.kind === "team" && t.add(me(n.id)));
1147
1147
  return [...t].sort();
1148
1148
  }
1149
- function dr(e, t) {
1150
- return [ue(e), ...t.map(de)];
1149
+ function kr(e, t) {
1150
+ return [fe(e), ...t.map(me)];
1151
1151
  }
1152
- function pr(e) {
1152
+ function Cr(e) {
1153
1153
  const t = /* @__PURE__ */ new Set();
1154
1154
  for (const n of e ?? [])
1155
1155
  n?.kind && t.add(n.kind);
1156
1156
  return [...t];
1157
1157
  }
1158
- const Xe = ["done", "escalated"];
1159
- function fr(e) {
1160
- return Xe.includes(e);
1158
+ const et = ["done", "escalated"];
1159
+ function Or(e) {
1160
+ return et.includes(e);
1161
1161
  }
1162
- const Ye = "assignment";
1163
- function mr(e) {
1164
- return `${Ye}:${e}`;
1162
+ const tt = "assignment";
1163
+ function vr(e) {
1164
+ return `${tt}:${e}`;
1165
1165
  }
1166
- function gr(e, t, n) {
1166
+ function Nr(e, t, n) {
1167
1167
  if (e.direction === "inbound") return !0;
1168
1168
  if (e.author?.type === "user" && e.author.id === t) return !1;
1169
1169
  const r = e.payload?.mentions;
1170
1170
  return Array.isArray(r) && r.includes(t) ? !0 : n === "reply";
1171
1171
  }
1172
- function hr(e) {
1172
+ function Rr(e) {
1173
1173
  return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
1174
1174
  }
1175
- const qe = 12;
1176
- function yr(e, t, n = qe) {
1175
+ const nt = 12;
1176
+ function $r(e, t, n = nt) {
1177
1177
  const r = t + 1;
1178
1178
  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 ? {
1179
1179
  status: "escalated",
@@ -1187,39 +1187,94 @@ function yr(e, t, n = qe) {
1187
1187
  reason: "de agent rondde zijn beurt af zonder te zeggen wat er moet gebeuren (wachten, afronden of overdragen)"
1188
1188
  };
1189
1189
  }
1190
- const Ar = /* @__PURE__ */ new Set(["mail", "message"]);
1191
- function Je(e, t) {
1190
+ const xr = /* @__PURE__ */ new Set(["mail", "message"]);
1191
+ function rt(e, t) {
1192
1192
  const n = e.settings?.signatures?.[t];
1193
1193
  return !n?.enabled || !n.body || n.body.trim() === "" ? null : n;
1194
1194
  }
1195
- function br(e, t, n, r = "html") {
1195
+ function Dr(e, t, n, r = "html") {
1196
1196
  if (!e) return n;
1197
- const i = Je(e, t);
1197
+ const i = rt(e, t);
1198
1198
  return i ? `${n}${r === "text" ? `
1199
1199
 
1200
1200
  ` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${i.body}` : n;
1201
1201
  }
1202
- function Er(e) {
1202
+ function Lr(e) {
1203
1203
  return e.endpoints ?? [];
1204
1204
  }
1205
- const Sr = (e) => !!e.assignedUserId || !!e.assignedInboxId, _r = (e) => e.status === "closed", Tr = (e) => ({
1205
+ const h = -1 / 0, _ = {
1206
+ urgent: 40,
1207
+ high: 25,
1208
+ normal: 10,
1209
+ low: 0
1210
+ }, it = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, at = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
1211
+ function ot(e, t) {
1212
+ return !!(e && it.test(e) || t && at.test(t));
1213
+ }
1214
+ const st = 3, ct = 600;
1215
+ function Pr(e, t) {
1216
+ return e >= st || t >= ct;
1217
+ }
1218
+ function lt(e, t) {
1219
+ return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
1220
+ }
1221
+ const ut = 1e3, dt = {
1222
+ urgent: 1,
1223
+ high: 4,
1224
+ normal: 8,
1225
+ low: 24
1226
+ }, pt = 72, ft = 36e5;
1227
+ function mt(e) {
1228
+ return e.lastActivityAt ?? (e.createdAt ? new Date(Le(e)).getTime() : 0);
1229
+ }
1230
+ function gt(e, t) {
1231
+ return ht(t.remindersById?.[e.id], e, t.now);
1232
+ }
1233
+ function ht(e, t, n) {
1234
+ return !e || e.remindAt <= n ? !1 : !((t.lastActivityAt ?? 0) > e.parkedAt && t.lastActivityPreview?.direction === "inbound");
1235
+ }
1236
+ const ge = (e) => ve(e) === "outbound_message";
1237
+ function R(e, t) {
1238
+ return Math.max(0, (t - mt(e)) / ft);
1239
+ }
1240
+ function Ur(e, t) {
1241
+ return e.status !== "open" && e.status !== "pending" || e.firstResponseAt ? !1 : R(e, t) > dt[e.priority ?? "normal"];
1242
+ }
1243
+ function yt(e, t) {
1244
+ const n = e.lastActivityPreview;
1245
+ return n?.direction !== "outbound" || !ge(n.type) ? !1 : R(e, t) < pt;
1246
+ }
1247
+ function Kr(e, t) {
1248
+ if (e.status === "closed" || e.status === "snoozed") return { score: h, reasons: [] };
1249
+ if (e.snoozedTill && e.snoozedTill > t.now) return { score: h, reasons: [] };
1250
+ if (yt(e, t.now)) return { score: h, reasons: [] };
1251
+ if (gt(e, t)) return { score: h, reasons: [] };
1252
+ let n = 0;
1253
+ const r = [], i = e.priority ?? "normal";
1254
+ _[i] > 0 && (n += _[i], r.push(`priority:${i}`)), lt(e, t.userId) && (n += 20, r.push("unseen")), e.assignedUserId && e.assignedUserId === t.userId && (n += 15, r.push("assigned-to-you"));
1255
+ const a = R(e, t.now);
1256
+ if (a > 0) {
1257
+ const s = Math.min(a * 2, 30);
1258
+ n += s, a >= 1 && r.push(`waiting:${Math.round(a)}h`);
1259
+ }
1260
+ const o = e.lastActivityPreview;
1261
+ return o?.type === "AI_ACTION_PROPOSED" && (n += 30, r.push("awaiting-approval")), o?.direction === "outbound" && ge(o.type) && (n += 10, r.push("no-reply")), !e.firstResponseAt && e.lastActivityPreview?.direction === "inbound" && (n += 10, r.push("awaiting-reply")), ot(e.remoteParty?.resource, e.lastActivityPreview?.snippet) && (n -= ut, r.push("bulk")), { score: n, reasons: r };
1262
+ }
1263
+ const Gr = (e) => !!e.assignedUserId || !!e.assignedInboxId, jr = (e) => e.status === "closed", Br = (e) => ({
1206
1264
  urgent: 10,
1207
1265
  high: 5,
1208
1266
  normal: 2,
1209
1267
  low: 1
1210
- })[e.priority] || 0, Ir = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
1211
- function wr(e, t) {
1212
- return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
1213
- }
1214
- function Mr(e, t) {
1268
+ })[e.priority] || 0, Hr = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
1269
+ function Fr(e, t) {
1215
1270
  const n = e.labels ?? [];
1216
1271
  return n.find((r) => r.locale === t)?.label ?? n[0]?.label ?? e.url;
1217
1272
  }
1218
- function kr(e, t, n) {
1273
+ function Wr(e, t, n) {
1219
1274
  const r = e.translations ?? [];
1220
1275
  return r.find((i) => i.locale === t) ?? (n ? r.find((i) => i.locale === n) : void 0) ?? { locale: t };
1221
1276
  }
1222
- const z = [
1277
+ const q = [
1223
1278
  { code: "nl", label: "Nederlands", english: "Dutch" },
1224
1279
  { code: "en", label: "English", english: "English" },
1225
1280
  { code: "de", label: "Deutsch", english: "German" },
@@ -1234,36 +1289,36 @@ const z = [
1234
1289
  { code: "fi", label: "Suomi", english: "Finnish" },
1235
1290
  { code: "tr", label: "Türkçe", english: "Turkish" }
1236
1291
  ];
1237
- function pe(e) {
1292
+ function he(e) {
1238
1293
  const t = (e ?? "").toLowerCase();
1239
- return z.find((n) => n.code === t) ?? z.find((n) => n.code === t.split("-")[0]);
1294
+ return q.find((n) => n.code === t) ?? q.find((n) => n.code === t.split("-")[0]);
1240
1295
  }
1241
- function Cr(e) {
1242
- return pe(e)?.label ?? e;
1296
+ function Vr(e) {
1297
+ return he(e)?.label ?? e;
1243
1298
  }
1244
- function Or(e) {
1245
- const t = pe(e);
1299
+ function zr(e) {
1300
+ const t = he(e);
1246
1301
  return t ? t.english === t.label ? `${t.english} (${t.code})` : `${t.english} — ${t.label} (${t.code})` : e;
1247
1302
  }
1248
- const fe = 3;
1249
- function Ze(e, t) {
1303
+ const ye = 3;
1304
+ function At(e, t) {
1250
1305
  const n = /* @__PURE__ */ new Set();
1251
1306
  let r = 1, i = t.get(e)?.parentId;
1252
1307
  for (; i; ) {
1253
- if (n.has(i) || (n.add(i), r++, r > fe + 1)) return 1 / 0;
1308
+ if (n.has(i) || (n.add(i), r++, r > ye + 1)) return 1 / 0;
1254
1309
  i = t.get(i)?.parentId;
1255
1310
  }
1256
1311
  return r;
1257
1312
  }
1258
- function Nr(e, t, n) {
1313
+ function Xr(e, t, n) {
1259
1314
  if (!e) return !0;
1260
1315
  if (e === t) return !1;
1261
1316
  const r = new Map(n.map((o) => [o.id, o]));
1262
- if (!r.has(e) || t && Qe(e, t, r)) return !1;
1263
- const i = Ze(e, r), a = t ? me(t, n) : 1;
1264
- return i + a <= fe;
1317
+ if (!r.has(e) || t && bt(e, t, r)) return !1;
1318
+ const i = At(e, r), a = t ? Ae(t, n) : 1;
1319
+ return i + a <= ye;
1265
1320
  }
1266
- function Qe(e, t, n) {
1321
+ function bt(e, t, n) {
1267
1322
  const r = /* @__PURE__ */ new Set();
1268
1323
  let i = n.get(e)?.parentId;
1269
1324
  for (; i; ) {
@@ -1273,44 +1328,44 @@ function Qe(e, t, n) {
1273
1328
  }
1274
1329
  return !1;
1275
1330
  }
1276
- function me(e, t, n = /* @__PURE__ */ new Set()) {
1331
+ function Ae(e, t, n = /* @__PURE__ */ new Set()) {
1277
1332
  if (n.has(e)) return 1;
1278
1333
  n.add(e);
1279
1334
  const r = t.filter((i) => i.parentId === e);
1280
- return r.length ? 1 + Math.max(...r.map((i) => me(i.id, t, n))) : 1;
1335
+ return r.length ? 1 + Math.max(...r.map((i) => Ae(i.id, t, n))) : 1;
1281
1336
  }
1282
- const et = "en";
1283
- function tt(e) {
1284
- return e.defaultLocale || e.locale || et;
1337
+ const Et = "en";
1338
+ function St(e) {
1339
+ return e.defaultLocale || e.locale || Et;
1285
1340
  }
1286
- function vr(e) {
1341
+ function Yr(e) {
1287
1342
  const t = /* @__PURE__ */ new Set(), n = [];
1288
- for (const r of [tt(e), ...e.locales ?? []])
1343
+ for (const r of [St(e), ...e.locales ?? []])
1289
1344
  !r || t.has(r) || (t.add(r), n.push(r));
1290
1345
  return n;
1291
1346
  }
1292
- function xr(e, t, n) {
1347
+ function qr(e, t, n) {
1293
1348
  const r = e.translations ?? [];
1294
1349
  return r.find((i) => i.locale === t)?.name ?? (n ? r.find((i) => i.locale === n)?.name : void 0) ?? e.name;
1295
1350
  }
1296
- const X = ["lookup", "condition", "parallel", "for-each"];
1297
- function Y(e) {
1351
+ const J = ["lookup", "condition", "parallel", "for-each"];
1352
+ function Z(e) {
1298
1353
  for (const t of e) {
1299
- if (!X.includes(t.type))
1300
- return `staptype "${t.type}" mag niet meelezen (alleen ${X.join(", ")})`;
1354
+ if (!J.includes(t.type))
1355
+ return `staptype "${t.type}" mag niet meelezen (alleen ${J.join(", ")})`;
1301
1356
  if (t.type === "parallel")
1302
1357
  for (const n of t.branches ?? []) {
1303
- const r = Y(n);
1358
+ const r = Z(n);
1304
1359
  if (r) return r;
1305
1360
  }
1306
1361
  if (t.type === "for-each") {
1307
- const n = Y(t.body ?? []);
1362
+ const n = Z(t.body ?? []);
1308
1363
  if (n) return n;
1309
1364
  }
1310
1365
  }
1311
1366
  return null;
1312
1367
  }
1313
- function nt(e, t) {
1368
+ function _t(e, t) {
1314
1369
  switch (e.kind) {
1315
1370
  case "org":
1316
1371
  return !0;
@@ -1320,23 +1375,23 @@ function nt(e, t) {
1320
1375
  return e.userId === t.userId;
1321
1376
  }
1322
1377
  }
1323
- function $r(e, t) {
1324
- return e.filter((n) => n.enabled && nt(n.ownerScope, t));
1378
+ function Jr(e, t) {
1379
+ return e.filter((n) => n.enabled && _t(n.ownerScope, t));
1325
1380
  }
1326
- function Rr(e) {
1381
+ function Zr(e) {
1327
1382
  return e.credentialScope ? e.credentialScope : (e.authMode ?? "header") === "header" || e.oauth?.scope === "org" ? "shared" : "per-user";
1328
1383
  }
1329
- function Dr(e) {
1384
+ function Qr(e) {
1330
1385
  return `mcp__${e}__`;
1331
1386
  }
1332
- const Lr = 1e3, Pr = 2e3, Kr = 500, Ur = 12e3, Gr = 4e3, rt = ["contact", "company", "work_item"];
1333
- function jr(e) {
1387
+ const ei = 1e3, ti = 2e3, ni = 500, ri = 12e3, ii = 4e3, Tt = ["contact", "company", "work_item"];
1388
+ function ai(e) {
1334
1389
  if (!e) return !1;
1335
1390
  const t = e.slice(0, e.indexOf(":"));
1336
- return rt.includes(t);
1391
+ return Tt.includes(t);
1337
1392
  }
1338
- const Br = "onboarding-source", Fr = ["support", "billing", "availability", "sales", "onboarding"], Hr = ["keep", "replace"];
1339
- function it(e) {
1393
+ const oi = "onboarding-source", si = ["support", "billing", "availability", "sales", "onboarding"], ci = ["keep", "replace"];
1394
+ function It(e) {
1340
1395
  switch (e.kind) {
1341
1396
  case "user":
1342
1397
  return `user:${e.userId}`;
@@ -1346,7 +1401,7 @@ function it(e) {
1346
1401
  return "org";
1347
1402
  }
1348
1403
  }
1349
- function Vr(e) {
1404
+ function li(e) {
1350
1405
  if (typeof e != "string") return;
1351
1406
  const t = e.trim();
1352
1407
  if (t === "org") return { kind: "org" };
@@ -1358,10 +1413,10 @@ function Vr(e) {
1358
1413
  if (r === "team") return { kind: "team", teamId: i };
1359
1414
  }
1360
1415
  }
1361
- function at(e) {
1362
- return it(e);
1416
+ function wt(e) {
1417
+ return It(e);
1363
1418
  }
1364
- function ot(e) {
1419
+ function Mt(e) {
1365
1420
  switch (e.kind) {
1366
1421
  case "personal":
1367
1422
  return { kind: "user", userId: e.userId };
@@ -1371,14 +1426,14 @@ function ot(e) {
1371
1426
  return { kind: "org" };
1372
1427
  }
1373
1428
  }
1374
- const st = ot;
1375
- function Wr(e) {
1376
- return e.agentId ? { kind: "user", userId: e.agentId } : st(e.ownerScope);
1429
+ const kt = Mt;
1430
+ function ui(e) {
1431
+ return e.agentId ? { kind: "user", userId: e.agentId } : kt(e.ownerScope);
1377
1432
  }
1378
- function zr(e) {
1379
- return at(e);
1433
+ function di(e) {
1434
+ return wt(e);
1380
1435
  }
1381
- function Xr(e, t) {
1436
+ function pi(e, t) {
1382
1437
  if (!t) return;
1383
1438
  let n = e;
1384
1439
  for (const r of t.split(".")) {
@@ -1387,24 +1442,24 @@ function Xr(e, t) {
1387
1442
  }
1388
1443
  return n;
1389
1444
  }
1390
- function Yr(e, t) {
1445
+ function fi(e, t) {
1391
1446
  return e.targets.find((n) => n.activityTypes.includes(t));
1392
1447
  }
1393
- function qr(e, t) {
1448
+ function mi(e, t) {
1394
1449
  if (t)
1395
1450
  return e.targets.find((n) => n.id === t);
1396
1451
  }
1397
- function ct(e) {
1452
+ function Ct(e) {
1398
1453
  return e?.kind === "assignment";
1399
1454
  }
1400
- function Jr(e) {
1455
+ function gi(e) {
1401
1456
  const { trigger: t, agentId: n, target: r, activityType: i, assigneeUserId: a, authorUserId: o } = e;
1402
- 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";
1457
+ 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";
1403
1458
  }
1404
- function Zr(e) {
1459
+ function hi(e) {
1405
1460
  return (e.startsWith("tool:") ? e.slice(5) : e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
1406
1461
  }
1407
- const Qr = [
1462
+ const yi = [
1408
1463
  { name: "text", type: "string" },
1409
1464
  { name: "subject", type: "string" },
1410
1465
  { name: "from", type: "string" },
@@ -1438,7 +1493,7 @@ const Qr = [
1438
1493
  // `buildTriggerVars` cannot fill it itself: the job does that with the catalog in hand, before
1439
1494
  // the trigger filter runs — like contactId/companyId above.
1440
1495
  { name: "assigneeUserId", type: "string" }
1441
- ], ei = {
1496
+ ], Ai = {
1442
1497
  topics: [
1443
1498
  { name: "topicId", type: "string" },
1444
1499
  { name: "topic", type: "string" },
@@ -1452,69 +1507,69 @@ const Qr = [
1452
1507
  // Deliberately empty: the fields come from `ClassifyStep.fields` and so differ per step.
1453
1508
  extract: []
1454
1509
  };
1455
- function lt(e) {
1510
+ function Ot(e) {
1456
1511
  return `${e.type}:${e.id}`;
1457
1512
  }
1458
- const ut = "interaction";
1459
- function dt(e) {
1460
- return e?.type === ut ? e.id : void 0;
1513
+ const vt = "interaction";
1514
+ function Nt(e) {
1515
+ return e?.type === vt ? e.id : void 0;
1461
1516
  }
1462
- const pt = 64, ft = 8e3;
1463
- function ti(e) {
1517
+ const Rt = 64, $t = 8e3;
1518
+ function bi(e) {
1464
1519
  const t = typeof e == "number" ? e : Number(String(e ?? "").trim());
1465
1520
  if (!(!Number.isFinite(t) || t <= 0))
1466
- return Math.min(Math.max(Math.round(t), pt), ft);
1521
+ return Math.min(Math.max(Math.round(t), Rt), $t);
1467
1522
  }
1468
- const ni = { kind: "workflow", steps: [] };
1469
- function ri(e) {
1523
+ const Ei = { kind: "workflow", steps: [] };
1524
+ function Si(e) {
1470
1525
  return e?.kind === "workflow" ? e.steps : [];
1471
1526
  }
1472
- function ii(e) {
1527
+ function _i(e) {
1473
1528
  return e?.kind === "procedure" ? e.procedure : void 0;
1474
1529
  }
1475
- const mt = ["done", "escalated", "failed", "stopped"];
1476
- function ai(e) {
1477
- return mt.includes(e);
1530
+ const xt = ["done", "escalated", "failed", "stopped"];
1531
+ function Ti(e) {
1532
+ return xt.includes(e);
1478
1533
  }
1479
- function gt(e) {
1534
+ function Dt(e) {
1480
1535
  return e === "waiting";
1481
1536
  }
1482
- function oi(e) {
1483
- return e === "running" || gt(e);
1537
+ function Ii(e) {
1538
+ return e === "running" || Dt(e);
1484
1539
  }
1485
- function ge(e) {
1540
+ function be(e) {
1486
1541
  return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
1487
1542
  }
1488
- function si(e) {
1489
- const t = ge(e);
1490
- return t ? lt(t) : void 0;
1543
+ function wi(e) {
1544
+ const t = be(e);
1545
+ return t ? Ot(t) : void 0;
1491
1546
  }
1492
- function ci(e) {
1493
- return dt(ge(e));
1547
+ function Mi(e) {
1548
+ return Nt(be(e));
1494
1549
  }
1495
- function li(e, t) {
1550
+ function ki(e, t) {
1496
1551
  const n = e.accumulatedSeconds || 0;
1497
1552
  return e.runningSince ? n + Math.max(0, Math.floor((t - e.runningSince) / 1e3)) : n;
1498
1553
  }
1499
- function ui(e, t) {
1554
+ function Ci(e, t) {
1500
1555
  const n = Math.max(1, Math.ceil(Math.max(0, e) / 60));
1501
1556
  if (!t || t === "exact") return n * 60;
1502
1557
  const r = Number(t);
1503
1558
  return !Number.isFinite(r) || r <= 0 ? n * 60 : Math.ceil(n / r) * r * 60;
1504
1559
  }
1505
- function di(e) {
1560
+ function Oi(e) {
1506
1561
  const t = Math.max(0, Math.round(e / 60));
1507
1562
  return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
1508
1563
  }
1509
- function pi(e) {
1564
+ function vi(e) {
1510
1565
  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);
1511
1566
  return i > 0 ? `${i}:${n(r)}:${n(t % 60)}` : `${n(r)}:${n(t % 60)}`;
1512
1567
  }
1513
- function ht(e) {
1568
+ function Lt(e) {
1514
1569
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
1515
1570
  }
1516
- function fi(e, t) {
1517
- const n = ht(e) || "werksoort", r = new Set(t);
1571
+ function Ni(e, t) {
1572
+ const n = Lt(e) || "werksoort", r = new Set(t);
1518
1573
  if (!r.has(n)) return n;
1519
1574
  for (let i = 2; i < 500; i++) {
1520
1575
  const a = `${n}-${i}`;
@@ -1522,73 +1577,93 @@ function fi(e, t) {
1522
1577
  }
1523
1578
  return `${n}-${r.size + 1}`;
1524
1579
  }
1525
- function mi(e, t) {
1580
+ function Ri(e, t) {
1526
1581
  const n = e.ownerScope;
1527
1582
  return !n || n.kind === "org" ? !0 : t.includes(n.teamId);
1528
1583
  }
1529
- function gi(e) {
1530
- return e.filter((t) => !t.archived).sort(yt);
1584
+ function $i(e) {
1585
+ return e.filter((t) => !t.archived).sort(Pt);
1531
1586
  }
1532
- function yt(e, t) {
1587
+ function Pt(e, t) {
1533
1588
  const n = (e.order ?? 0) - (t.order ?? 0);
1534
1589
  return n !== 0 ? n : (e.label || "").localeCompare(t.label || "");
1535
1590
  }
1536
- const At = 20, bt = 20, k = 300;
1591
+ const Ut = 20, Kt = 20, O = 300;
1537
1592
  function g(e) {
1538
1593
  return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu, " ").replace(/\s+/g, " ").trim();
1539
1594
  }
1540
- function Et(e) {
1595
+ function Gt(e) {
1541
1596
  const t = e.replace(/\s+/g, " ").trim();
1542
- if (t.length <= k) return t;
1543
- const n = t.slice(0, k), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
1544
- return r > k * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
1597
+ if (t.length <= O) return t;
1598
+ const n = t.slice(0, O), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
1599
+ return r > O * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
1545
1600
  }
1546
- function hi(e, t) {
1547
- const n = Et(t.text), r = g(n);
1601
+ function xi(e, t) {
1602
+ const n = Gt(t.text), r = g(n);
1548
1603
  if (!r || (e.examples ?? []).some((o) => g(o) === r)) return null;
1549
1604
  const i = e.exampleCandidates ?? [], a = i.findIndex((o) => g(o.text) === r);
1550
1605
  if (a >= 0) {
1551
1606
  if (i[a].corrected || !t.corrected) return null;
1552
1607
  const o = [...i];
1553
- return o[a] = { ...o[a], corrected: !0, addedAt: t.addedAt }, q(o);
1608
+ return o[a] = { ...o[a], corrected: !0, addedAt: t.addedAt }, Q(o);
1554
1609
  }
1555
- return q([{ ...t, text: n }, ...i]).slice(0, bt);
1610
+ return Q([{ ...t, text: n }, ...i]).slice(0, Kt);
1556
1611
  }
1557
- function q(e) {
1612
+ function Q(e) {
1558
1613
  return [...e].sort(
1559
1614
  (t, n) => Number(n.corrected) - Number(t.corrected) || n.addedAt - t.addedAt
1560
1615
  );
1561
1616
  }
1562
- function yi(e, t) {
1617
+ function Di(e, t) {
1563
1618
  const n = g(t), r = (e.examples ?? []).filter((a) => a.trim());
1564
- return { examples: r.some((a) => g(a) === n) ? r : [...r, t].slice(-At), exampleCandidates: St(e, t) };
1619
+ return { examples: r.some((a) => g(a) === n) ? r : [...r, t].slice(-Ut), exampleCandidates: jt(e, t) };
1565
1620
  }
1566
- function St(e, t) {
1621
+ function jt(e, t) {
1567
1622
  const n = g(t);
1568
1623
  return (e.exampleCandidates ?? []).filter((r) => g(r.text) !== n);
1569
1624
  }
1570
- function _t(e, t) {
1625
+ function Bt(e, t) {
1571
1626
  const n = e.ownerScope;
1572
1627
  return n ? n.kind === "org" ? !0 : n.kind === "team" ? !!t && n.teamId === t : !1 : !1;
1573
1628
  }
1574
- function Ai(e, t) {
1575
- return e.filter((n) => _t(n, t));
1629
+ function Li(e, t) {
1630
+ return e.filter((n) => Bt(n, t));
1576
1631
  }
1577
- function bi(e) {
1632
+ function Pi(e) {
1578
1633
  return e.type === "agent";
1579
1634
  }
1580
- const Ei = "WORK_COMMENT_ADDED", Si = "WORK_ITEM_ASSIGNED", _i = "WORK_ITEM_STATUS_CHANGED", Tt = "work_item", It = "work_project";
1581
- function wt(e) {
1582
- return `${Tt}:${e}`;
1635
+ const Ui = "WORK_COMMENT_ADDED", Ki = "WORK_ITEM_ASSIGNED", Gi = "WORK_ITEM_STATUS_CHANGED", Ht = 864e5;
1636
+ function Ft(e, t) {
1637
+ const n = (r) => {
1638
+ const i = new Date(r);
1639
+ return i.setHours(0, 0, 0, 0), i.getTime();
1640
+ };
1641
+ return Math.round((n(e) - n(t)) / Ht);
1583
1642
  }
1584
- function he(e) {
1585
- return `${It}:${e}`;
1643
+ function ji(e, t) {
1644
+ if (e.closedAt != null) return { score: h, reasons: [] };
1645
+ const n = t.remindersById?.[e.id];
1646
+ if (n && n.remindAt > t.now) return { score: h, reasons: [] };
1647
+ let r = 0;
1648
+ const i = [], a = e.priority ?? "normal";
1649
+ if (_[a] > 0 && (r += _[a], i.push(`priority:${a}`)), typeof e.dueDate == "number") {
1650
+ const o = Ft(e.dueDate, t.now);
1651
+ o < 0 ? (r += 35, i.push("overdue")) : o === 0 && (r += 20, i.push("due-today"));
1652
+ }
1653
+ return e.source?.initiator === "system" && e.source.systemReason && (r += 15, i.push(`auto:${e.source.systemReason}`)), { score: r, reasons: i };
1654
+ }
1655
+ const Wt = "work_item", Vt = "work_project";
1656
+ function zt(e) {
1657
+ return `${Wt}:${e}`;
1586
1658
  }
1587
- function Ti(e, t, n) {
1659
+ function Ee(e) {
1660
+ return `${Vt}:${e}`;
1661
+ }
1662
+ function Bi(e, t, n) {
1588
1663
  const r = `${e}-${t}`;
1589
1664
  return n ? `${r}-${n}` : r;
1590
1665
  }
1591
- function Ii(e) {
1666
+ function Hi(e) {
1592
1667
  const t = /^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e || "").trim());
1593
1668
  return t ? {
1594
1669
  projectKey: t[1].toUpperCase(),
@@ -1596,52 +1671,52 @@ function Ii(e) {
1596
1671
  ...t[3] ? { subSequence: Number(t[3]) } : {}
1597
1672
  } : null;
1598
1673
  }
1599
- function wi(e) {
1674
+ function Fi(e) {
1600
1675
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 3) || "PRJ";
1601
1676
  }
1602
- function Mi(e, t = 25) {
1603
- const n = /* @__PURE__ */ new Set([wt(e.id)]);
1604
- e.projectId && n.add(he(e.projectId));
1677
+ function Wi(e, t = 25) {
1678
+ const n = /* @__PURE__ */ new Set([zt(e.id)]);
1679
+ e.projectId && n.add(Ee(e.projectId));
1605
1680
  for (const r of e.ancestorKeys ?? []) n.add(r);
1606
1681
  for (const r of e.partyKeys ?? []) n.add(r);
1607
1682
  return Array.from(n).slice(0, t);
1608
1683
  }
1609
- function ki(e) {
1610
- return [he(e.id)];
1684
+ function Vi(e) {
1685
+ return [Ee(e.id)];
1611
1686
  }
1612
- const N = [
1687
+ const $ = [
1613
1688
  { key: "open", label: "status_open", category: "todo", order: 0 },
1614
1689
  { key: "in_progress", label: "status_in_progress", category: "in_progress", order: 1 },
1615
1690
  { key: "done", label: "status_done", category: "done", order: 2 },
1616
1691
  { key: "cancelled", label: "status_cancelled", category: "done", order: 3 }
1617
- ], ye = N.map((e) => e.key);
1618
- function Mt(e) {
1619
- return e?.statuses?.length ? e.statuses : N;
1692
+ ], Se = $.map((e) => e.key);
1693
+ function Xt(e) {
1694
+ return e?.statuses?.length ? e.statuses : $;
1620
1695
  }
1621
- function kt(e, t) {
1696
+ function Yt(e, t) {
1622
1697
  return t.find((n) => n.key === e)?.category ?? "todo";
1623
1698
  }
1624
- function Ci(e, t) {
1699
+ function zi(e, t) {
1625
1700
  return t.find((n) => n.key === e);
1626
1701
  }
1627
- function Oi(e) {
1628
- const t = Mt(e), n = e?.defaultStatusKey;
1629
- return n && t.some((r) => r.key === n) ? n : Ct(t)[0]?.key ?? N[0].key;
1702
+ function Xi(e) {
1703
+ const t = Xt(e), n = e?.defaultStatusKey;
1704
+ return n && t.some((r) => r.key === n) ? n : qt(t)[0]?.key ?? $[0].key;
1630
1705
  }
1631
- function Ct(e) {
1706
+ function qt(e) {
1632
1707
  return [...e].sort((t, n) => {
1633
1708
  const r = (t.order ?? 0) - (n.order ?? 0);
1634
1709
  return r !== 0 ? r : (t.label || "").localeCompare(n.label || "");
1635
1710
  });
1636
1711
  }
1637
- function Ni(e, t) {
1638
- return kt(e, t) === "done";
1712
+ function Yi(e, t) {
1713
+ return Yt(e, t) === "done";
1639
1714
  }
1640
- function Ot(e) {
1715
+ function Jt(e) {
1641
1716
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
1642
1717
  }
1643
- function vi(e, t) {
1644
- const n = Ot(e) || "status", r = /* @__PURE__ */ new Set([...t, ...ye]);
1718
+ function qi(e, t) {
1719
+ const n = Jt(e) || "status", r = /* @__PURE__ */ new Set([...t, ...Se]);
1645
1720
  if (!r.has(n)) return n;
1646
1721
  for (let i = 2; i < 500; i++) {
1647
1722
  const a = `${n}-${i}`;
@@ -1649,7 +1724,7 @@ function vi(e, t) {
1649
1724
  }
1650
1725
  return `${n}-${r.size + 1}`;
1651
1726
  }
1652
- function xi(e) {
1727
+ function Ji(e) {
1653
1728
  const t = [];
1654
1729
  if (!e.length) return [{ index: -1, reason: "empty" }];
1655
1730
  const n = /* @__PURE__ */ new Set();
@@ -1658,10 +1733,10 @@ function xi(e) {
1658
1733
  t.push({ index: i, reason: "missing_key" });
1659
1734
  return;
1660
1735
  }
1661
- 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);
1736
+ 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);
1662
1737
  }), 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;
1663
1738
  }
1664
- const Nt = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), vt = /* @__PURE__ */ new Set([
1739
+ const Zt = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), Qt = /* @__PURE__ */ new Set([
1665
1740
  "text/plain",
1666
1741
  "text/markdown",
1667
1742
  "text/csv",
@@ -1670,55 +1745,56 @@ const Nt = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "ima
1670
1745
  "application/xml",
1671
1746
  "text/xml"
1672
1747
  ]);
1673
- function xt(e) {
1748
+ function en(e) {
1674
1749
  const t = (e ?? "").trim().toLowerCase().split(";")[0];
1675
- return t ? Nt.has(t) ? "image" : t === "application/pdf" ? "pdf" : vt.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
1676
- }
1677
- const h = 1024 * 1024, $t = {
1678
- image: 5 * h,
1679
- pdf: 20 * h,
1680
- text: 1 * h,
1681
- audio: 20 * h
1682
- }, $i = 25 * h, Ri = 5;
1683
- function Di(e, t) {
1684
- const n = xt(e);
1685
- return n === "unsupported" ? "unsupported" : t > $t[n] ? "too-large" : null;
1750
+ return t ? Zt.has(t) ? "image" : t === "application/pdf" ? "pdf" : Qt.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
1751
+ }
1752
+ const y = 1024 * 1024, tn = {
1753
+ image: 5 * y,
1754
+ pdf: 20 * y,
1755
+ text: 1 * y,
1756
+ audio: 20 * y
1757
+ }, Zi = 25 * y, Qi = 5;
1758
+ function ea(e, t) {
1759
+ const n = en(e);
1760
+ return n === "unsupported" ? "unsupported" : t > tn[n] ? "too-large" : null;
1686
1761
  }
1687
- function Rt(e) {
1762
+ function nn(e) {
1688
1763
  return `${e.kind}:${e.id || e.url || e.title}`;
1689
1764
  }
1690
- function Li(e, t = []) {
1765
+ function ta(e, t = []) {
1691
1766
  const n = new Set(t), r = [], i = [];
1692
1767
  for (const a of e) {
1693
- const o = Rt(a);
1768
+ const o = nn(a);
1694
1769
  n.has(o) || (n.add(o), r.push(a), i.push(o));
1695
1770
  }
1696
1771
  return { sources: r, keys: i };
1697
1772
  }
1698
- function Pi(e) {
1773
+ const na = "assist-source";
1774
+ function ra(e) {
1699
1775
  return e.sessions.filter(
1700
1776
  (t) => t.id !== e.exceptSessionId && t.state === "connected" && e.canHold(t.providerId)
1701
1777
  );
1702
1778
  }
1703
- function Ki(e) {
1779
+ function ia(e) {
1704
1780
  return e.sessions.filter(
1705
1781
  (t) => t.id !== e.exceptSessionId && t.state === "connected" && !e.canHold(t.providerId)
1706
1782
  );
1707
1783
  }
1708
- function Ui(e) {
1784
+ function aa(e) {
1709
1785
  return e.sessions.some(
1710
1786
  (n) => n.id !== e.exceptSessionId && (n.state === "connected" || n.state === "on_hold")
1711
1787
  ) ? { admit: !1, reason: "busy" } : { admit: !0 };
1712
1788
  }
1713
- function Dt(e, t) {
1714
- 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]));
1789
+ function rn(e, t) {
1790
+ const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, i = t.intents.filter((o) => !n.has(o.intent)).map((o) => on(o, r[o.intent]));
1715
1791
  if (!e.extraIntents || e.extraIntents.length === 0) return i;
1716
1792
  const a = new Set(i.map((o) => o.intent));
1717
1793
  for (const o of e.extraIntents)
1718
1794
  a.has(o.intent) || (i.push(o), a.add(o.intent));
1719
1795
  return i;
1720
1796
  }
1721
- function Lt(e, t) {
1797
+ function an(e, t) {
1722
1798
  const n = {};
1723
1799
  for (const r of e.intents) {
1724
1800
  if (!r.togglable) continue;
@@ -1727,46 +1803,46 @@ function Lt(e, t) {
1727
1803
  }
1728
1804
  return n;
1729
1805
  }
1730
- function Gi(e, t) {
1731
- const n = Lt(e, t);
1806
+ function oa(e, t) {
1807
+ const n = an(e, t);
1732
1808
  return Object.entries(n).filter(([, r]) => !r).map(([r]) => r);
1733
1809
  }
1734
- function Pt(e, t) {
1810
+ function on(e, t) {
1735
1811
  return t ? {
1736
1812
  intent: t.intent ?? e.intent,
1737
1813
  targetSchemes: t.targetSchemes ?? e.targetSchemes,
1738
1814
  transport: t.transport ?? e.transport
1739
1815
  } : e;
1740
1816
  }
1741
- function ji(e, t) {
1817
+ function sa(e, t) {
1742
1818
  const n = [];
1743
1819
  for (const r of e) {
1744
1820
  if (!r.enabled) continue;
1745
1821
  const i = t[r.providerId];
1746
1822
  if (i)
1747
- for (const a of Dt(r, i))
1823
+ for (const a of rn(r, i))
1748
1824
  n.push({ channel: r, description: i, capability: a });
1749
1825
  }
1750
1826
  return n;
1751
1827
  }
1752
- function Bi(e, t) {
1828
+ function ca(e, t) {
1753
1829
  return t.filter((n) => n.capability.intent === e);
1754
1830
  }
1755
- function Kt(e, t) {
1831
+ function sn(e, t) {
1756
1832
  return t.filter((n) => n.capability.targetSchemes.includes(e));
1757
1833
  }
1758
- function Fi(e, t) {
1759
- return Kt(e.scheme, t);
1834
+ function la(e, t) {
1835
+ return sn(e.scheme, t);
1760
1836
  }
1761
- function Hi(e, t, n) {
1837
+ function ua(e, t, n) {
1762
1838
  const r = [];
1763
1839
  for (const i of e)
1764
1840
  for (const a of n)
1765
1841
  a.capability.intent === t && a.capability.targetSchemes.includes(i.scheme) && r.push({ channelIntent: a, endpoint: i });
1766
1842
  return r;
1767
1843
  }
1768
- 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 || {});
1769
- const Gt = {
1844
+ var cn = /* @__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))(cn || {});
1845
+ const ln = {
1770
1846
  mailto: "mail",
1771
1847
  sip: "tel",
1772
1848
  tel: "tel",
@@ -1787,10 +1863,10 @@ const Gt = {
1787
1863
  id: "note",
1788
1864
  custom: "note"
1789
1865
  };
1790
- function Vi(e) {
1791
- return e ? Gt[e] ?? "note" : "note";
1866
+ function da(e) {
1867
+ return e ? ln[e] ?? "note" : "note";
1792
1868
  }
1793
- const Wi = "message_window", zi = "message_templates", Xi = {
1869
+ const pa = "message_window", fa = "message_templates", ma = {
1794
1870
  // E-mail
1795
1871
  FROM: "from",
1796
1872
  TO: "to",
@@ -1807,11 +1883,11 @@ const Wi = "message_window", zi = "message_templates", Xi = {
1807
1883
  // Voice/conference
1808
1884
  HOST: "host",
1809
1885
  PARTICIPANT: "participant"
1810
- }, Yi = (e, t) => ({ intent: e, ...t }), qi = "folder_management", Ji = "remote_search", Zi = {
1886
+ }, ga = (e, t) => ({ intent: e, ...t }), ha = "folder_management", ya = "remote_search", Aa = {
1811
1887
  ok: !1,
1812
1888
  code: "UNSUPPORTED",
1813
1889
  message: "Provider does not support this op"
1814
- }, Qi = "installation-id", ea = "notification-source", ta = (e, t) => `${e}.pref.${t}`, na = {
1890
+ }, ba = "installation-id", Ea = "notification-source", Sa = (e, t) => `${e}.pref.${t}`, _a = {
1815
1891
  ai: [
1816
1892
  "account.read",
1817
1893
  "account.write",
@@ -1845,6 +1921,7 @@ const Wi = "message_window", zi = "message_templates", Xi = {
1845
1921
  ],
1846
1922
  analytics: ["report.read"],
1847
1923
  "app-store": ["app.publish", "app.read", "app.write", "setting.read", "setting.write"],
1924
+ assist: ["board.read"],
1848
1925
  automations: ["sync.read", "sync.write", "webhook.read", "webhook.write"],
1849
1926
  communication: [
1850
1927
  "account.read",
@@ -1943,48 +2020,48 @@ const Wi = "message_window", zi = "message_templates", Xi = {
1943
2020
  time: ["entry.read", "entry.write", "work-type.read", "work-type.write"],
1944
2021
  user: ["user.read", "user.write"],
1945
2022
  work: ["item.read", "item.write", "project.read", "project.write"]
1946
- }, Ae = 9e4, jt = ["out_of_office"], be = (e) => jt.includes(e);
1947
- function ra(e, t, n) {
1948
- const r = n - e < Ae, i = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
2023
+ }, _e = 9e4, un = ["out_of_office"], Te = (e) => un.includes(e);
2024
+ function Ta(e, t, n) {
2025
+ const r = n - e < _e, i = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
1949
2026
  if (!i?.status) return { online: r, status: r ? "available" : "offline" };
1950
2027
  const a = i.status;
1951
- return !r && !be(a) ? { online: !1, status: "offline" } : { online: r, status: a, message: i.message };
2028
+ return !r && !Te(a) ? { online: !1, status: "offline" } : { online: r, status: a, message: i.message };
1952
2029
  }
1953
- function ia(e, t) {
1954
- const n = t - e.lastSeenAt < Ae, r = n || be(e.status) ? e.status : "offline";
2030
+ function Ia(e, t) {
2031
+ const n = t - e.lastSeenAt < _e, r = n || Te(e.status) ? e.status : "offline";
1955
2032
  return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
1956
2033
  }
1957
- function aa(e, t) {
2034
+ function wa(e, t) {
1958
2035
  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 };
1959
2036
  }
1960
- function oa(e) {
2037
+ function Ma(e) {
1961
2038
  return e.providerAvailable && e.allowed;
1962
2039
  }
1963
- const sa = "resources.describe", ca = "resources.search", la = "resources.resolve";
1964
- function ua(e) {
2040
+ const ka = "resources.describe", Ca = "resources.search", Oa = "resources.resolve";
2041
+ function va(e) {
1965
2042
  const t = e.indexOf(":");
1966
2043
  return t === -1 ? e : e.slice(0, t);
1967
2044
  }
1968
- const Ee = "auth";
1969
- function Se(e) {
2045
+ const Ie = "auth";
2046
+ function we(e) {
1970
2047
  const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
1971
2048
  return t ? t[1] : null;
1972
2049
  }
1973
- function da(e) {
1974
- const t = Se(e);
1975
- return t ? t !== Ee : typeof e == "string" && e.startsWith("/wake");
2050
+ function Na(e) {
2051
+ const t = we(e);
2052
+ return t ? t !== Ie : typeof e == "string" && e.startsWith("/wake");
1976
2053
  }
1977
- function pa(e) {
1978
- return typeof e != "string" || e === "" || e === "/" ? !0 : Se(e) === Ee;
2054
+ function Ra(e) {
2055
+ return typeof e != "string" || e === "" || e === "/" ? !0 : we(e) === Ie;
1979
2056
  }
1980
- function Bt(e) {
2057
+ function dn(e) {
1981
2058
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1982
2059
  }
1983
- function Ft(e) {
1984
- const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : `/${Bt(r)}`).join("");
2060
+ function pn(e) {
2061
+ const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : `/${dn(r)}`).join("");
1985
2062
  return new RegExp(`^${n}\\/?$`);
1986
2063
  }
1987
- function Ht(e, t) {
2064
+ function fn(e, t) {
1988
2065
  const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean), i = {};
1989
2066
  return n.forEach((a, o) => {
1990
2067
  if (a.startsWith(":")) {
@@ -1993,14 +2070,14 @@ function Ht(e, t) {
1993
2070
  }
1994
2071
  }), i;
1995
2072
  }
1996
- function Vt(e) {
2073
+ function mn(e) {
1997
2074
  return e.publicBasePath ?? `/apps/${e.name}`;
1998
2075
  }
1999
- function fa(e) {
2076
+ function $a(e) {
2000
2077
  const t = [];
2001
2078
  for (const n of e) {
2002
2079
  if (!n?.name) continue;
2003
- const r = Vt(n);
2080
+ const r = mn(n);
2004
2081
  for (const i of n.routes ?? []) {
2005
2082
  if (!i.public) continue;
2006
2083
  const a = i.path === "/" ? "" : i.path;
@@ -2014,7 +2091,7 @@ function fa(e) {
2014
2091
  }
2015
2092
  return t;
2016
2093
  }
2017
- function Wt(e, t) {
2094
+ function gn(e, t) {
2018
2095
  const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
2019
2096
  for (let i = 0; i < Math.min(n.length, r.length); i++) {
2020
2097
  const a = n[i].startsWith(":"), o = r[i].startsWith(":");
@@ -2022,17 +2099,17 @@ function Wt(e, t) {
2022
2099
  }
2023
2100
  return n.length > r.length;
2024
2101
  }
2025
- function zt(e, t) {
2102
+ function hn(e, t) {
2026
2103
  if (typeof e != "string") return null;
2027
2104
  let n = null;
2028
2105
  for (const r of t)
2029
- Ft(r.pattern).test(e) && (!n || Wt(r.pattern, n.pattern)) && (n = r);
2030
- return n ? { ...n, params: { ...n.props, ...Ht(n.pattern, e) } } : null;
2106
+ pn(r.pattern).test(e) && (!n || gn(r.pattern, n.pattern)) && (n = r);
2107
+ return n ? { ...n, params: { ...n.props, ...fn(n.pattern, e) } } : null;
2031
2108
  }
2032
- function ma(e, t) {
2033
- return zt(e, t) !== null;
2109
+ function xa(e, t) {
2110
+ return hn(e, t) !== null;
2034
2111
  }
2035
- const ga = "sync-source", ha = "sync-target", ya = 20, Xt = {
2112
+ const Da = "sync-source", La = "sync-target", Pa = 20, yn = {
2036
2113
  afrikaans: [
2037
2114
  "[Muziek]",
2038
2115
  "(C) TV GELDERLAND 2021",
@@ -2182,14 +2259,14 @@ const ga = "sync-source", ha = "sync-target", ya = 20, Xt = {
2182
2259
  "[MÚSICA]",
2183
2260
  "[Music cuts in British]"
2184
2261
  ]
2185
- }, Yt = (e) => {
2262
+ }, An = (e) => {
2186
2263
  let t = e;
2187
- return Object.values(Xt).forEach((n) => {
2264
+ return Object.values(yn).forEach((n) => {
2188
2265
  n.forEach((r) => {
2189
2266
  t = t.replaceAll(r, "");
2190
2267
  });
2191
2268
  }), t = t.replace(/\(.*?\)/g, ""), t = t.replace(/\[.*?\]/g, ""), t;
2192
- }, qt = 6e4, Jt = 8e3, Zt = 2, Qt = 0.4, en = 3, tn = /* @__PURE__ */ new Set([
2269
+ }, bn = 6e4, En = 8e3, Sn = 2, _n = 0.4, Tn = 3, In = /* @__PURE__ */ new Set([
2193
2270
  "aan",
2194
2271
  "als",
2195
2272
  "ben",
@@ -2302,13 +2379,13 @@ const ga = "sync-source", ha = "sync-target", ya = 20, Xt = {
2302
2379
  "you",
2303
2380
  "your"
2304
2381
  ]);
2305
- function nn(e) {
2382
+ function wn(e) {
2306
2383
  const t = /* @__PURE__ */ new Set();
2307
2384
  for (const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))
2308
- n.length < en || tn.has(n) || t.add(n);
2385
+ n.length < Tn || In.has(n) || t.add(n);
2309
2386
  return [...t];
2310
2387
  }
2311
- function rn(e, t) {
2388
+ function Mn(e, t) {
2312
2389
  if (!e.length) return 0;
2313
2390
  if (!t.length) return 1;
2314
2391
  const n = new Set(t), r = new Set(e);
@@ -2316,32 +2393,32 @@ function rn(e, t) {
2316
2393
  for (const a of r) n.has(a) || (i += 1);
2317
2394
  return i / r.size;
2318
2395
  }
2319
- function an(e, t = qt) {
2396
+ function kn(e, t = bn) {
2320
2397
  const n = e.filter((o) => !o.partial && typeof o.text == "string");
2321
2398
  if (!n.length) return { text: "", segmentCount: 0 };
2322
2399
  const i = n.reduce((o, s) => Math.max(o, s.endedAt ?? 0), 0) - t;
2323
- 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 };
2400
+ return { text: n.filter((o) => (o.endedAt ?? 0) >= i).map((o) => An(o.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
2324
2401
  }
2325
- const on = 60;
2326
- function Aa(e, t, n = on) {
2402
+ const Cn = 60;
2403
+ function Ua(e, t, n = Cn) {
2327
2404
  const r = new Set(e), i = [...e];
2328
2405
  for (const a of t)
2329
2406
  !a || r.has(a) || (r.add(a), i.push(a));
2330
2407
  return i.slice(-n);
2331
2408
  }
2332
- function ba(e) {
2409
+ function Ka(e) {
2333
2410
  const { segments: t, now: n, state: r } = e;
2334
- if (r.lastTriggerAt && n - r.lastTriggerAt < Jt)
2411
+ if (r.lastTriggerAt && n - r.lastTriggerAt < En)
2335
2412
  return { trigger: !1, reason: "too_soon" };
2336
- const i = an(t, e.windowMs);
2413
+ const i = kn(t, e.windowMs);
2337
2414
  if (!i.text) return { trigger: !1, reason: "no_speech" };
2338
2415
  const a = i.segmentCount - (r.lastSegmentCount ?? 0);
2339
- if (r.lastQueryTerms && a < Zt)
2416
+ if (r.lastQueryTerms && a < Sn)
2340
2417
  return { trigger: !1, reason: "too_few_new" };
2341
- const o = nn(i.text);
2342
- 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" };
2418
+ const o = wn(i.text);
2419
+ return o.length ? r.lastQueryTerms?.length && Mn(o, r.lastQueryTerms) < _n ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: i.text, terms: o, segmentCount: i.segmentCount } : { trigger: !1, reason: "no_speech" };
2343
2420
  }
2344
- const Ea = "navNotice", v = {
2421
+ const Ga = "navNotice", x = {
2345
2422
  // The lower bounds are deliberately generous: service ranges (0800/0900) are
2346
2423
  // shorter than geographic numbers, and a too-strict minimum silently drops them.
2347
2424
  // An over-permissive key is harmless — it simply matches nothing.
@@ -2364,81 +2441,81 @@ const Ea = "navNotice", v = {
2364
2441
  PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
2365
2442
  US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
2366
2443
  CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
2367
- }, sn = "NL", cn = 15, ln = 8, un = Array.from(
2368
- new Set(Object.values(v).map((e) => e.callingCode))
2444
+ }, On = "NL", vn = 15, Nn = 8, Rn = Array.from(
2445
+ new Set(Object.values(x).map((e) => e.callingCode))
2369
2446
  ).sort((e, t) => t.length - e.length);
2370
- function J(e) {
2447
+ function ee(e) {
2371
2448
  if (e)
2372
- return v[e.trim().toUpperCase()];
2449
+ return x[e.trim().toUpperCase()];
2373
2450
  }
2374
- function E(e, t) {
2451
+ function S(e, t) {
2375
2452
  return e.length >= t.nsnMin && e.length <= t.nsnMax;
2376
2453
  }
2377
- function Z(e) {
2378
- if (e.length > cn) return null;
2379
- for (const t of un) {
2454
+ function te(e) {
2455
+ if (e.length > vn) return null;
2456
+ for (const t of Rn) {
2380
2457
  if (!e.startsWith(t)) continue;
2381
2458
  const n = e.slice(t.length);
2382
- for (const r of Object.values(v)) {
2459
+ for (const r of Object.values(x)) {
2383
2460
  if (r.callingCode !== t) continue;
2384
2461
  const i = r.trunkPrefix, a = i && n.startsWith(i) ? n.slice(i.length) : n;
2385
- if (E(a, r)) return `+${t}${a}`;
2462
+ if (S(a, r)) return `+${t}${a}`;
2386
2463
  }
2387
2464
  return null;
2388
2465
  }
2389
- return e.length < ln ? null : `+${e}`;
2466
+ return e.length < Nn ? null : `+${e}`;
2390
2467
  }
2391
- function dn(e) {
2468
+ function $n(e) {
2392
2469
  let t = e.trim();
2393
2470
  const n = t.match(/^(sips?|tel|whatsapp):/i);
2394
2471
  n && (t = t.slice(n[0].length));
2395
2472
  const r = t.indexOf("@");
2396
2473
  return r >= 0 && (t = t.slice(0, r)), t.trim();
2397
2474
  }
2398
- function Sa(e) {
2475
+ function ja(e) {
2399
2476
  if (!e) return !1;
2400
2477
  const t = e.indexOf("@");
2401
2478
  if (t <= 0) return !1;
2402
2479
  const n = e.slice(0, t).trim();
2403
2480
  return !/^[+\d\s().-]+$/.test(n);
2404
2481
  }
2405
- function Q(e, t) {
2482
+ function ne(e, t) {
2406
2483
  if (!e) return null;
2407
- const n = dn(e);
2484
+ const n = $n(e);
2408
2485
  if (!n) return null;
2409
2486
  const r = n.startsWith("+"), i = n.replace(/\D/g, "");
2410
2487
  if (!i) return null;
2411
- if (r) return Z(i);
2412
- if (i.startsWith("00")) return Z(i.slice(2));
2413
- const a = J(t) ?? J(sn);
2488
+ if (r) return te(i);
2489
+ if (i.startsWith("00")) return te(i.slice(2));
2490
+ const a = ee(t) ?? ee(On);
2414
2491
  if (!a) return null;
2415
2492
  const o = a.trunkPrefix;
2416
2493
  if (o && i.startsWith(o)) {
2417
2494
  const s = i.slice(o.length);
2418
- return E(s, a) ? `+${a.callingCode}${s}` : null;
2495
+ return S(s, a) ? `+${a.callingCode}${s}` : null;
2419
2496
  }
2420
2497
  if (i.startsWith(a.callingCode)) {
2421
2498
  const s = i.slice(a.callingCode.length);
2422
- if (E(s, a)) return `+${a.callingCode}${s}`;
2499
+ if (S(s, a)) return `+${a.callingCode}${s}`;
2423
2500
  }
2424
- return !o && E(i, a) ? `+${a.callingCode}${i}` : null;
2501
+ return !o && S(i, a) ? `+${a.callingCode}${i}` : null;
2425
2502
  }
2426
- function _a(e, t = 9) {
2503
+ function Ba(e, t = 9) {
2427
2504
  const n = (e ?? "").replace(/\D/g, "");
2428
2505
  return n.length < t ? null : n.slice(-t);
2429
2506
  }
2430
- function _e(e) {
2507
+ function Me(e) {
2431
2508
  if (!e) return null;
2432
2509
  const t = e.trim().toLowerCase(), n = t.lastIndexOf("@");
2433
2510
  if (n <= 0 || n === t.length - 1) return null;
2434
2511
  const r = t.slice(0, n).split("+")[0], i = t.slice(n + 1);
2435
2512
  return !r || !i.includes(".") ? null : `${r}@${i}`;
2436
2513
  }
2437
- function Ta(e) {
2438
- const t = _e(e);
2514
+ function Ha(e) {
2515
+ const t = Me(e);
2439
2516
  return t ? t.slice(t.lastIndexOf("@") + 1) : null;
2440
2517
  }
2441
- const pn = /* @__PURE__ */ new Set([
2518
+ const xn = /* @__PURE__ */ new Set([
2442
2519
  "co.uk",
2443
2520
  "org.uk",
2444
2521
  "gov.uk",
@@ -2448,14 +2525,14 @@ const pn = /* @__PURE__ */ new Set([
2448
2525
  "com.br",
2449
2526
  "co.za"
2450
2527
  ]);
2451
- function fn(e) {
2528
+ function Dn(e) {
2452
2529
  if (!e) return null;
2453
2530
  const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
2454
2531
  if (t.length < 2) return null;
2455
2532
  const n = t.slice(-2).join(".");
2456
- return pn.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
2533
+ return xn.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
2457
2534
  }
2458
- const mn = /* @__PURE__ */ new Set([
2535
+ const Ln = /* @__PURE__ */ new Set([
2459
2536
  "gmail.com",
2460
2537
  "googlemail.com",
2461
2538
  "outlook.com",
@@ -2500,44 +2577,44 @@ const mn = /* @__PURE__ */ new Set([
2500
2577
  "proximus.be",
2501
2578
  "scarlet.be"
2502
2579
  ]);
2503
- function Ia(e) {
2504
- const t = fn(e);
2505
- return t ? mn.has(t) : !1;
2580
+ function Fa(e) {
2581
+ const t = Dn(e);
2582
+ return t ? Ln.has(t) : !1;
2506
2583
  }
2507
- function wa(e) {
2584
+ function Wa(e) {
2508
2585
  if (!e) return !1;
2509
2586
  const t = e.trim().toLowerCase();
2510
2587
  return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
2511
2588
  }
2512
- function Ma(e, t, n) {
2589
+ function Va(e, t, n) {
2513
2590
  if (!e || !t) return null;
2514
2591
  const r = e.trim().toLowerCase();
2515
2592
  if (r === "tel" || r === "sms" || r === "whatsapp") {
2516
- const a = Q(t, n);
2593
+ const a = ne(t, n);
2517
2594
  return a ? `tel:${a}` : null;
2518
2595
  }
2519
2596
  if (r === "fax") {
2520
- const a = Q(t, n);
2597
+ const a = ne(t, n);
2521
2598
  return a ? `fax:${a}` : null;
2522
2599
  }
2523
2600
  if (r === "mailto" || r === "email") {
2524
- const a = _e(t);
2601
+ const a = Me(t);
2525
2602
  return a ? `mailto:${a}` : null;
2526
2603
  }
2527
2604
  const i = t.trim().toLowerCase();
2528
2605
  return i ? `${r}:${i}` : null;
2529
2606
  }
2530
- const gn = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, hn = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
2531
- function ka(e) {
2607
+ const Pn = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, Un = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
2608
+ function za(e) {
2532
2609
  if (typeof e != "string" || !e) return "";
2533
2610
  let t = e;
2534
2611
  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(`
2535
2612
  `).map(
2536
2613
  (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,}$/, "")
2537
2614
  ).join(`
2538
- `), 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();
2615
+ `), t = t.replace(Pn, "$2"), t = t.replace(Un, "$2"), t = t.replace(/~~(?=\S)([\s\S]*?\S)~~/g, "$1"), t = t.replace(/`([^`\n]+)`/g, "$1"), t.replace(/\s+/g, " ").trim();
2539
2616
  }
2540
- const yn = [
2617
+ const Kn = [
2541
2618
  /<blockquote/i,
2542
2619
  /class="?gmail_quote/i,
2543
2620
  // Gmail quote container
@@ -2550,17 +2627,17 @@ const yn = [
2550
2627
  // Outlook underscore separator before "From:"
2551
2628
  /\bOn\b[\s\S]{0,200}?\bwrote:/i
2552
2629
  // Gmail "On <date> <name> wrote:"
2553
- ], 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;
2554
- function bn(e) {
2630
+ ], re = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, Gn = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
2631
+ function jn(e) {
2555
2632
  const t = e.split(`
2556
2633
  `);
2557
2634
  for (let n = 0; n < t.length; n++)
2558
- if (An.test(t[n]) || ee.test(t[n]) && t.slice(n + 1, n + 4).some((r) => ee.test(r)))
2635
+ if (Gn.test(t[n]) || re.test(t[n]) && t.slice(n + 1, n + 4).some((r) => re.test(r)))
2559
2636
  return t.slice(0, n).join(`
2560
2637
  `).trim();
2561
2638
  return e;
2562
2639
  }
2563
- function te(e) {
2640
+ function ie(e) {
2564
2641
  let t = e;
2565
2642
  return t = t.replace(/<(script|style)[\s\S]*?<\/\1>/gi, ""), t = t.replace(/<br\s*\/?>/gi, `
2566
2643
  `), t = t.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
@@ -2568,318 +2645,324 @@ function te(e) {
2568
2645
  `), t = t.replace(/<\/(div|li|tr)>/gi, `
2569
2646
  `), t = t.replace(/<\/(td|th)>/gi, " "), t = t.replace(/<[^>]+>/g, ""), t = t.replace(/<[^>]*$/, ""), t;
2570
2647
  }
2571
- function ne(e) {
2648
+ function ae(e) {
2572
2649
  return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
2573
2650
  }
2574
- function re(e) {
2575
- 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, "&");
2651
+ function oe(e) {
2652
+ return e.replace(/&nbsp;/gi, " ").replace(/&lt;/gi, "<").replace(/&gt;/gi, ">").replace(/&quot;/gi, '"').replace(/&#(\d+);/g, (t, n) => ae(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => ae(parseInt(n, 16)) ?? t).replace(/&amp;/gi, "&");
2576
2653
  }
2577
- function ie(e) {
2654
+ function se(e) {
2578
2655
  return e.replace(/\r/g, "").replace(/[ \t]+/g, " ").replace(/ *\n */g, `
2579
2656
  `).replace(/\n{3,}/g, `
2580
2657
 
2581
2658
  `).trim();
2582
2659
  }
2583
- const En = /<\s*(html|body|div|p|table|br|span)\b/i;
2584
- function Ca(e) {
2585
- return En.test(e);
2660
+ const Bn = /<\s*(html|body|div|p|table|br|span)\b/i;
2661
+ function Xa(e) {
2662
+ return Bn.test(e);
2586
2663
  }
2587
- function Oa(e) {
2664
+ function Ya(e) {
2588
2665
  if (typeof e != "string" || !e) return "";
2589
2666
  let t = e.length;
2590
- for (const a of yn) {
2667
+ for (const a of Kn) {
2591
2668
  const o = e.search(a);
2592
2669
  o >= 0 && o < t && (t = o);
2593
2670
  }
2594
2671
  const n = e.slice(0, t);
2595
- let r = ie(re(te(n)));
2596
- return r || (r = ie(re(te(e)))), bn(r) || r;
2597
- }
2598
- const Sn = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, _n = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
2599
- function Na(e, t) {
2600
- return !!(e && Sn.test(e) || t && _n.test(t));
2601
- }
2602
- const Tn = 3, In = 600;
2603
- function va(e, t) {
2604
- return e >= Tn || t >= In;
2672
+ let r = se(oe(ie(n)));
2673
+ return r || (r = se(oe(ie(e)))), jn(r) || r;
2605
2674
  }
2606
2675
  export {
2607
2676
  m as ACTIVITY_CATALOG,
2608
- $t as AI_ATTACHMENT_LIMITS,
2609
- Ri as AI_ATTACHMENT_MAX_PER_TURN,
2610
- $i as AI_ATTACHMENT_TURN_BUDGET,
2611
- oe as AI_VENDORS,
2612
- Ge as ALLOWED_LINK_SCHEMES,
2613
- na as APP_PERMISSIONS,
2614
- U as ARTIFACT_MAX_BLOCKS,
2615
- ar as ARTIFACT_MAX_BODY_BYTES,
2616
- M as ARTIFACT_MAX_CELL_LEN,
2617
- F as ARTIFACT_MAX_KPI_ITEMS,
2618
- G as ARTIFACT_MAX_LIST_ITEMS,
2619
- B as ARTIFACT_MAX_TABLE_COLUMNS,
2620
- j as ARTIFACT_MAX_TABLE_ROWS,
2621
- ce as ARTIFACT_MAX_TEXT_LEN,
2622
- Ye as ASSIGNMENT_SCOPE_KIND,
2623
- Ee as AUTH_APP_NAME,
2624
- Ne as ActivityTypeRegistry,
2625
- Bn as BUILT_IN_ONLY,
2626
- Jt as CADENCE_FLOOR_MS,
2627
- Zt as CADENCE_MIN_NEW_SEGMENTS,
2628
- Qt as CADENCE_MIN_NOVELTY,
2629
- qt as CADENCE_WINDOW_MS,
2630
- ei as CLASSIFY_VARS,
2631
- nr as CORE_DIMENSIONS,
2632
- Ut as CommunicationScheme,
2633
- Gr as DEFAULT_MEMORY_BUDGET,
2634
- sn as DEFAULT_PHONE_REGION,
2635
- ni as EMPTY_WORKFLOW,
2636
- qi as FEATURE_FOLDER_MANAGEMENT,
2637
- Ji as FEATURE_REMOTE_SEARCH,
2638
- En as HTML_BODY_RE,
2639
- Qi as INSTALLATION_HEADER,
2640
- ut as INTERACTION_KIND,
2641
- Xi as InteractionParticipantRole,
2642
- et as KB_FALLBACK_LOCALE,
2643
- z as KB_LOCALES,
2644
- N as LOOSE_STATUSES,
2645
- Cn as MAX_ACTIONS,
2646
- qe as MAX_ASSIGNMENT_TURNS,
2647
- wn as MAX_BLOCKS,
2648
- fe as MAX_COLLECTION_DEPTH,
2649
- Mn as MAX_FIELDS,
2650
- kn as MAX_LIST_ITEMS,
2651
- Lr as MAX_MEMORY_BROWSE,
2652
- Ur as MAX_MEMORY_BUDGET,
2653
- Pr as MAX_MEMORY_CHARS,
2654
- on as MAX_SHOWN_KEYS,
2655
- bt as MAX_TOPIC_CANDIDATES,
2656
- At as MAX_TOPIC_EXAMPLES,
2657
- k as MAX_TOPIC_EXAMPLE_CHARS,
2658
- Kr as MIN_MEMORY_BUDGET,
2659
- Ea as NAV_NOTICE_SLOT,
2660
- ea as NOTIFICATION_SOURCE_PROVIDER_GROUP,
2661
- Br as ONBOARDING_SOURCE_PROVIDER_GROUP,
2662
- v as PHONE_REGIONS,
2663
- Ae as PRESENCE_ONLINE_WINDOW_MS,
2664
- jt as PRESENCE_SURVIVES_OFFLINE,
2665
- Hr as PROFILE_TOOL_DISPOSITIONS,
2666
- zi as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
2667
- Wi as PROVIDER_FEATURE_MESSAGE_WINDOW,
2668
- mn as PUBLIC_EMAIL_DOMAINS,
2669
- X as READ_STEP_TYPES,
2670
- rt as RELATED_SUBJECT_KINDS,
2671
- ye as RESERVED_STATUS_KEYS,
2672
- sa as RESOURCE_DESCRIBE_SERVICE,
2673
- la as RESOURCE_RESOLVE_SERVICE,
2674
- ca as RESOURCE_SEARCH_SERVICE,
2675
- Ar as SIGNATURE_INTENTS,
2676
- ft as STEP_MAX_TOKENS_MAX,
2677
- pt as STEP_MAX_TOKENS_MIN,
2678
- In as SUMMARY_MIN_LAST_CHARS,
2679
- Tn as SUMMARY_MIN_MESSAGES,
2680
- ya as SYNC_RUN_MAX_ERRORS,
2681
- ga as SYNC_SOURCE_PROVIDER_GROUP,
2682
- ha as SYNC_TARGET_PROVIDER_GROUP,
2683
- Xe as TERMINAL_ASSIGNMENT_STATUSES,
2684
- mt as TERMINAL_RUN_STATUSES,
2685
- Qr as TRIGGER_VARS,
2686
- Zi as UNSUPPORTED,
2687
- Le as USAGE_DIMENSIONS,
2688
- Pe as USAGE_DIMENSION_IDS,
2689
- Fr as WORK_AREAS,
2690
- Ei as WORK_COMMENT_ADDED,
2691
- Si as WORK_ITEM_ASSIGNED,
2692
- Tt as WORK_ITEM_SCOPE_KIND,
2693
- _i as WORK_ITEM_STATUS_CHANGED,
2694
- It as WORK_PROJECT_SCOPE_KIND,
2695
- yi as acceptExampleCandidate,
2696
- at as actingIdentityKey,
2697
- gi as activeWorkTypes,
2698
- Nn as activityIconOf,
2699
- Gn as activityJoinUrl,
2700
- Me as activitySnippet,
2701
- ke as activityTextParams,
2702
- Un as activityTimelineText,
2703
- Hn as activityTimestamp,
2677
+ tn as AI_ATTACHMENT_LIMITS,
2678
+ Qi as AI_ATTACHMENT_MAX_PER_TURN,
2679
+ Zi as AI_ATTACHMENT_TURN_BUDGET,
2680
+ le as AI_VENDORS,
2681
+ Ve as ALLOWED_LINK_SCHEMES,
2682
+ _a as APP_PERMISSIONS,
2683
+ B as ARTIFACT_MAX_BLOCKS,
2684
+ Sr as ARTIFACT_MAX_BODY_BYTES,
2685
+ C as ARTIFACT_MAX_CELL_LEN,
2686
+ V as ARTIFACT_MAX_KPI_ITEMS,
2687
+ H as ARTIFACT_MAX_LIST_ITEMS,
2688
+ W as ARTIFACT_MAX_TABLE_COLUMNS,
2689
+ F as ARTIFACT_MAX_TABLE_ROWS,
2690
+ de as ARTIFACT_MAX_TEXT_LEN,
2691
+ tt as ASSIGNMENT_SCOPE_KIND,
2692
+ na as ASSIST_SOURCE_PROVIDER_GROUP,
2693
+ Ie as AUTH_APP_NAME,
2694
+ De as ActivityTypeRegistry,
2695
+ ar as BUILT_IN_ONLY,
2696
+ ut as BULK_PENALTY,
2697
+ En as CADENCE_FLOOR_MS,
2698
+ Sn as CADENCE_MIN_NEW_SEGMENTS,
2699
+ _n as CADENCE_MIN_NOVELTY,
2700
+ bn as CADENCE_WINDOW_MS,
2701
+ Ai as CLASSIFY_VARS,
2702
+ Ar as CORE_DIMENSIONS,
2703
+ cn as CommunicationScheme,
2704
+ ii as DEFAULT_MEMORY_BUDGET,
2705
+ On as DEFAULT_PHONE_REGION,
2706
+ Ei as EMPTY_WORKFLOW,
2707
+ ha as FEATURE_FOLDER_MANAGEMENT,
2708
+ ya as FEATURE_REMOTE_SEARCH,
2709
+ pt as FOLLOW_UP_HOURS,
2710
+ Bn as HTML_BODY_RE,
2711
+ h as INELIGIBLE,
2712
+ ba as INSTALLATION_HEADER,
2713
+ vt as INTERACTION_KIND,
2714
+ ma as InteractionParticipantRole,
2715
+ Et as KB_FALLBACK_LOCALE,
2716
+ q as KB_LOCALES,
2717
+ $ as LOOSE_STATUSES,
2718
+ Vn as MAX_ACTIONS,
2719
+ nt as MAX_ASSIGNMENT_TURNS,
2720
+ Hn as MAX_BLOCKS,
2721
+ ye as MAX_COLLECTION_DEPTH,
2722
+ Fn as MAX_FIELDS,
2723
+ Wn as MAX_LIST_ITEMS,
2724
+ ei as MAX_MEMORY_BROWSE,
2725
+ ri as MAX_MEMORY_BUDGET,
2726
+ ti as MAX_MEMORY_CHARS,
2727
+ Cn as MAX_SHOWN_KEYS,
2728
+ Kt as MAX_TOPIC_CANDIDATES,
2729
+ Ut as MAX_TOPIC_EXAMPLES,
2730
+ O as MAX_TOPIC_EXAMPLE_CHARS,
2731
+ ni as MIN_MEMORY_BUDGET,
2732
+ Ga as NAV_NOTICE_SLOT,
2733
+ Ea as NOTIFICATION_SOURCE_PROVIDER_GROUP,
2734
+ oi as ONBOARDING_SOURCE_PROVIDER_GROUP,
2735
+ x as PHONE_REGIONS,
2736
+ _e as PRESENCE_ONLINE_WINDOW_MS,
2737
+ un as PRESENCE_SURVIVES_OFFLINE,
2738
+ ci as PROFILE_TOOL_DISPOSITIONS,
2739
+ fa as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
2740
+ pa as PROVIDER_FEATURE_MESSAGE_WINDOW,
2741
+ Ln as PUBLIC_EMAIL_DOMAINS,
2742
+ J as READ_STEP_TYPES,
2743
+ Tt as RELATED_SUBJECT_KINDS,
2744
+ Se as RESERVED_STATUS_KEYS,
2745
+ ka as RESOURCE_DESCRIBE_SERVICE,
2746
+ Oa as RESOURCE_RESOLVE_SERVICE,
2747
+ Ca as RESOURCE_SEARCH_SERVICE,
2748
+ xr as SIGNATURE_INTENTS,
2749
+ dt as SLA_HOURS_BY_PRIORITY,
2750
+ $t as STEP_MAX_TOKENS_MAX,
2751
+ Rt as STEP_MAX_TOKENS_MIN,
2752
+ ct as SUMMARY_MIN_LAST_CHARS,
2753
+ st as SUMMARY_MIN_MESSAGES,
2754
+ Pa as SYNC_RUN_MAX_ERRORS,
2755
+ Da as SYNC_SOURCE_PROVIDER_GROUP,
2756
+ La as SYNC_TARGET_PROVIDER_GROUP,
2757
+ et as TERMINAL_ASSIGNMENT_STATUSES,
2758
+ xt as TERMINAL_RUN_STATUSES,
2759
+ yi as TRIGGER_VARS,
2760
+ Aa as UNSUPPORTED,
2761
+ Be as USAGE_DIMENSIONS,
2762
+ He as USAGE_DIMENSION_IDS,
2763
+ si as WORK_AREAS,
2764
+ Ui as WORK_COMMENT_ADDED,
2765
+ Ki as WORK_ITEM_ASSIGNED,
2766
+ Wt as WORK_ITEM_SCOPE_KIND,
2767
+ Gi as WORK_ITEM_STATUS_CHANGED,
2768
+ Vt as WORK_PROJECT_SCOPE_KIND,
2769
+ _ as W_PRIORITY,
2770
+ Di as acceptExampleCandidate,
2771
+ wt as actingIdentityKey,
2772
+ $i as activeWorkTypes,
2773
+ Xn as activityIconOf,
2774
+ rr as activityJoinUrl,
2775
+ Ne as activitySnippet,
2776
+ Re as activityTextParams,
2777
+ nr as activityTimelineText,
2778
+ Le as activityTimestamp,
2704
2779
  d as activityTypeInfo,
2705
- zr as actorKey,
2706
- hi as addExampleCandidate,
2707
- ia as agePresenceEntry,
2708
- xt as aiAttachmentKind,
2709
- Di as aiAttachmentRejection,
2710
- K as aiBudgetLimit,
2711
- Qn as aiBudgetPeriodKey,
2712
- ve as aiBudgetPeriodStart,
2713
- Zn as aiBudgetState,
2714
- Jn as aiVendorAcceptsAttachment,
2715
- Xn as aiVendorDefaultModel,
2716
- zn as aiVendorLabel,
2717
- qn as aiVendorNeedsBaseUrl,
2718
- Yn as aiVendorsWith,
2719
- Se as appNameFromPath,
2720
- ui as applyRounding,
2721
- br as applySignature,
2722
- sr as artifactBodyBytes,
2723
- cr as artifactOutline,
2724
- lr as artifactToMarkdown,
2725
- Jr as assignmentMismatch,
2726
- mr as assignmentScopeKey,
2727
- hr as assignmentSubject,
2728
- jn as buildActivityPreview,
2729
- ji as buildChannelIntents,
2730
- ur as buildShareKeys,
2731
- an as buildWindow,
2732
- Nr as canNestUnder,
2733
- Rn as carriesText,
2734
- xr as categoryLabel,
2735
- kt as categoryOf,
2736
- Vi as channelKindForScheme,
2737
- vn as channelKindOf,
2738
- ti as clampStepMaxTokens,
2739
- Oa as cleanMessageText,
2740
- yt as compareWorkTypes,
2741
- yr as decideAssignmentState,
2742
- ba as decideCadence,
2743
- Ui as decideIncomingCall,
2744
- tt as defaultLocaleOf,
2745
- Oi as defaultStatusKey,
2746
- Yi as defineIntent,
2747
- Ze as depthOf,
2748
- ra as derivePresence,
2749
- Gi as disabledIntentsFromCapabilities,
2750
- li as elapsedSeconds,
2751
- Ta as emailDomain,
2752
- Ma as endpointKey,
2753
- Ht as extractParams,
2754
- nn as extractTerms,
2755
- Fi as filterByEndpoint,
2756
- Bi as filterByIntent,
2757
- Kt as filterByTargetScheme,
2758
- S as findAiVendor,
2759
- tr as flattenLocales,
2760
- $e as floorToPeriod,
2761
- it as formatActingIdentity,
2762
- pi as formatClock,
2763
- di as formatHm,
2764
- Ti as formatItemKey,
2765
- xe as formatPeriod,
2766
- Li as freshSources,
2767
- Fn as getActivitySeenUserIds,
2768
- Er as getContactEndpoints,
2769
- Ir as getShortTitle,
2770
- Tr as getUrgencyScore,
2771
- me as heightOf,
2772
- kr as helpCenterText,
2773
- Zr as humanizeAction,
2774
- dt as interactionIdOf,
2775
- bi as isAgentUser,
2776
- Sr as isAssigned,
2777
- fr as isAssignmentTerminal,
2778
- ct as isAssignmentTrigger,
2779
- Wn as isChatMessageActivity,
2780
- _r as isClosed,
2781
- Pn as isConnectedType,
2782
- da as isDeepLink,
2783
- Qe as isDescendant,
2784
- Vn as isEmailActivity,
2785
- Ca as isHtmlBody,
2786
- oi as isInFlight,
2787
- wr as isInteractionUnseen,
2788
- pa as isLandingPath,
2789
- Na as isLikelyBulk,
2790
- ae as isMessageShape,
2791
- xn as isMessageType,
2792
- Wt as isMoreSpecificPattern,
2793
- gt as isPaused,
2794
- Ln as isPlaybookAuthoredType,
2795
- Ia as isPublicEmailDomain,
2796
- ma as isPublicPath,
2797
- $n as isReplyableType,
2798
- ai as isTerminal,
2799
- va as isThreadLongEnough,
2800
- Kn as isTranscriptType,
2801
- Ni as isWorkClosed,
2802
- mi as isWorkTypeVisible,
2803
- Mi as itemDossierKeys,
2804
- Mt as ladderFor,
2805
- Mr as linkLabel,
2806
- er as listeningAllowed,
2807
- Or as localeInstruction,
2808
- Cr as localeName,
2809
- vr as localesOf,
2810
- Sa as looksLikeEmail,
2811
- Hi as matchContactToIntents,
2812
- zt as matchPublicRoute,
2813
- Rr as mcpCredentialScope,
2814
- Dr as mcpToolPrefix,
2815
- Aa as mergeShownKeys,
2816
- Dn as messageCountsAs,
2817
- wa as needsPhoneRegion,
2818
- or as normalizeArtifactBlocks,
2819
- On as normalizeBlocks,
2820
- _e as normalizeEmail,
2780
+ di as actorKey,
2781
+ xi as addExampleCandidate,
2782
+ Ia as agePresenceEntry,
2783
+ en as aiAttachmentKind,
2784
+ ea as aiAttachmentRejection,
2785
+ j as aiBudgetLimit,
2786
+ gr as aiBudgetPeriodKey,
2787
+ Pe as aiBudgetPeriodStart,
2788
+ mr as aiBudgetState,
2789
+ fr as aiVendorAcceptsAttachment,
2790
+ ur as aiVendorDefaultModel,
2791
+ lr as aiVendorLabel,
2792
+ pr as aiVendorNeedsBaseUrl,
2793
+ dr as aiVendorsWith,
2794
+ we as appNameFromPath,
2795
+ Ci as applyRounding,
2796
+ Dr as applySignature,
2797
+ Tr as artifactBodyBytes,
2798
+ Ir as artifactOutline,
2799
+ wr as artifactToMarkdown,
2800
+ gi as assignmentMismatch,
2801
+ vr as assignmentScopeKey,
2802
+ Rr as assignmentSubject,
2803
+ ir as buildActivityPreview,
2804
+ sa as buildChannelIntents,
2805
+ Mr as buildShareKeys,
2806
+ kn as buildWindow,
2807
+ Xr as canNestUnder,
2808
+ Zn as carriesText,
2809
+ qr as categoryLabel,
2810
+ Yt as categoryOf,
2811
+ da as channelKindForScheme,
2812
+ Yn as channelKindOf,
2813
+ bi as clampStepMaxTokens,
2814
+ Ya as cleanMessageText,
2815
+ Pt as compareWorkTypes,
2816
+ $r as decideAssignmentState,
2817
+ Ka as decideCadence,
2818
+ aa as decideIncomingCall,
2819
+ St as defaultLocaleOf,
2820
+ Xi as defaultStatusKey,
2821
+ ga as defineIntent,
2822
+ At as depthOf,
2823
+ Ta as derivePresence,
2824
+ oa as disabledIntentsFromCapabilities,
2825
+ ki as elapsedSeconds,
2826
+ Ha as emailDomain,
2827
+ Va as endpointKey,
2828
+ fn as extractParams,
2829
+ wn as extractTerms,
2830
+ la as filterByEndpoint,
2831
+ ca as filterByIntent,
2832
+ sn as filterByTargetScheme,
2833
+ T as findAiVendor,
2834
+ yr as flattenLocales,
2835
+ Ke as floorToPeriod,
2836
+ It as formatActingIdentity,
2837
+ vi as formatClock,
2838
+ Oi as formatHm,
2839
+ Bi as formatItemKey,
2840
+ Ue as formatPeriod,
2841
+ ta as freshSources,
2842
+ or as getActivitySeenUserIds,
2843
+ Lr as getContactEndpoints,
2844
+ Hr as getShortTitle,
2845
+ Br as getUrgencyScore,
2846
+ Ae as heightOf,
2847
+ Wr as helpCenterText,
2848
+ hi as humanizeAction,
2849
+ Nt as interactionIdOf,
2850
+ Pi as isAgentUser,
2851
+ Gr as isAssigned,
2852
+ Or as isAssignmentTerminal,
2853
+ Ct as isAssignmentTrigger,
2854
+ yt as isAwaitingThem,
2855
+ cr as isChatMessageActivity,
2856
+ jr as isClosed,
2857
+ er as isConnectedType,
2858
+ Na as isDeepLink,
2859
+ bt as isDescendant,
2860
+ sr as isEmailActivity,
2861
+ Xa as isHtmlBody,
2862
+ Ii as isInFlight,
2863
+ lt as isInteractionUnseen,
2864
+ Ra as isLandingPath,
2865
+ ot as isLikelyBulk,
2866
+ ce as isMessageShape,
2867
+ qn as isMessageType,
2868
+ gn as isMoreSpecificPattern,
2869
+ gt as isParked,
2870
+ Dt as isPaused,
2871
+ Qn as isPlaybookAuthoredType,
2872
+ Fa as isPublicEmailDomain,
2873
+ xa as isPublicPath,
2874
+ ht as isReminderActive,
2875
+ Jn as isReplyableType,
2876
+ Ur as isSlaAtRisk,
2877
+ Ti as isTerminal,
2878
+ Pr as isThreadLongEnough,
2879
+ tr as isTranscriptType,
2880
+ Yi as isWorkClosed,
2881
+ Ri as isWorkTypeVisible,
2882
+ Wi as itemDossierKeys,
2883
+ Xt as ladderFor,
2884
+ Fr as linkLabel,
2885
+ hr as listeningAllowed,
2886
+ zr as localeInstruction,
2887
+ Vr as localeName,
2888
+ Yr as localesOf,
2889
+ ja as looksLikeEmail,
2890
+ ua as matchContactToIntents,
2891
+ hn as matchPublicRoute,
2892
+ Zr as mcpCredentialScope,
2893
+ Qr as mcpToolPrefix,
2894
+ Ua as mergeShownKeys,
2895
+ ve as messageCountsAs,
2896
+ Wa as needsPhoneRegion,
2897
+ _r as normalizeArtifactBlocks,
2898
+ zn as normalizeBlocks,
2899
+ Me as normalizeEmail,
2821
2900
  g as normalizeExample,
2822
- ta as notificationPrefKey,
2823
- rn as novelty,
2824
- Vr as parseActingIdentity,
2825
- Ii as parseItemKey,
2826
- Ft as pathToRegex,
2827
- rr as periodsInRange,
2828
- _a as phoneSuffix,
2829
- ka as plainTextFromMarkdown,
2830
- st as playbookActor,
2831
- ii as procedureOf,
2832
- ki as projectDossierKeys,
2833
- Vt as publicBasePathFor,
2834
- fa as publicRoutePatterns,
2835
- C as readPath,
2836
- Y as readStepError,
2837
- lt as refKey,
2838
- fn as registrableDomain,
2839
- St as rejectExampleCandidate,
2840
- jr as relatedByDefault,
2841
- Lt as resolveAccountCapabilities,
2842
- O as resolveActivityText,
2843
- Dt as resolveChannelIntents,
2844
- Je as resolveSignature,
2845
- aa as resolveWorkMode,
2846
- ua as resourceKindOf,
2847
- Wr as runActor,
2848
- ci as runInteractionId,
2849
- He as sanitizeInline,
2850
- Yt as sanitizeTranscript,
2851
- $r as selectLenses,
2852
- Ki as sessionsHoldCannotReach,
2853
- Pi as sessionsToHold,
2854
- de as shareKeyForTeam,
2855
- ue as shareKeyForUser,
2856
- dr as shareKeysForViewer,
2857
- oa as shouldRunAudioPipeline,
2858
- Ct as sortStatuses,
2859
- Rt as sourceKey,
2860
- Ci as statusIn,
2861
- ri as stepsOf,
2862
- we as stripHtml,
2863
- si as subjectKeyOf,
2864
- ge as subjectOf,
2865
- wi as suggestProjectKey,
2866
- qr as targetById,
2867
- Yr as targetForActivityType,
2868
- ot as toActingIdentity,
2869
- Q as toE164,
2870
- pr as toolSourceKinds,
2871
- _t as topicOfferedForTeam,
2872
- Ai as topicsForTeam,
2873
- Et as truncateExample,
2874
- vi as uniqueWorkStatusKey,
2875
- fi as uniqueWorkTypeKey,
2876
- Ke as usageMetricId,
2877
- ir as usageMetrics,
2878
- xi as validateStatuses,
2879
- Xr as valueAtPath,
2880
- gr as wakesAssignment,
2881
- wt as workItemScopeKey,
2882
- he as workProjectScopeKey,
2883
- Ot as workStatusKey,
2884
- ht as workTypeKey
2901
+ Sa as notificationPrefKey,
2902
+ Mn as novelty,
2903
+ li as parseActingIdentity,
2904
+ Hi as parseItemKey,
2905
+ pn as pathToRegex,
2906
+ br as periodsInRange,
2907
+ Ba as phoneSuffix,
2908
+ za as plainTextFromMarkdown,
2909
+ kt as playbookActor,
2910
+ _i as procedureOf,
2911
+ Vi as projectDossierKeys,
2912
+ mn as publicBasePathFor,
2913
+ $a as publicRoutePatterns,
2914
+ v as readPath,
2915
+ Z as readStepError,
2916
+ mt as recencyOf,
2917
+ Ot as refKey,
2918
+ Dn as registrableDomain,
2919
+ jt as rejectExampleCandidate,
2920
+ ai as relatedByDefault,
2921
+ an as resolveAccountCapabilities,
2922
+ N as resolveActivityText,
2923
+ rn as resolveChannelIntents,
2924
+ rt as resolveSignature,
2925
+ wa as resolveWorkMode,
2926
+ va as resourceKindOf,
2927
+ ui as runActor,
2928
+ Mi as runInteractionId,
2929
+ qe as sanitizeInline,
2930
+ An as sanitizeTranscript,
2931
+ Kr as scoreInteraction,
2932
+ ji as scoreWorkItem,
2933
+ Jr as selectLenses,
2934
+ ia as sessionsHoldCannotReach,
2935
+ ra as sessionsToHold,
2936
+ me as shareKeyForTeam,
2937
+ fe as shareKeyForUser,
2938
+ kr as shareKeysForViewer,
2939
+ Ma as shouldRunAudioPipeline,
2940
+ qt as sortStatuses,
2941
+ nn as sourceKey,
2942
+ zi as statusIn,
2943
+ Si as stepsOf,
2944
+ Oe as stripHtml,
2945
+ wi as subjectKeyOf,
2946
+ be as subjectOf,
2947
+ Fi as suggestProjectKey,
2948
+ mi as targetById,
2949
+ fi as targetForActivityType,
2950
+ Mt as toActingIdentity,
2951
+ ne as toE164,
2952
+ Cr as toolSourceKinds,
2953
+ Bt as topicOfferedForTeam,
2954
+ Li as topicsForTeam,
2955
+ Gt as truncateExample,
2956
+ qi as uniqueWorkStatusKey,
2957
+ Ni as uniqueWorkTypeKey,
2958
+ Fe as usageMetricId,
2959
+ Er as usageMetrics,
2960
+ Ji as validateStatuses,
2961
+ pi as valueAtPath,
2962
+ R as waitHoursOf,
2963
+ Nr as wakesAssignment,
2964
+ zt as workItemScopeKey,
2965
+ Ee as workProjectScopeKey,
2966
+ Jt as workStatusKey,
2967
+ Lt as workTypeKey
2885
2968
  };