@opencxh/domain 1.170.0 → 1.172.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/entities/ai-budget/types.d.ts +7 -3
  2. package/dist/entities/ai-profile/types.d.ts +7 -5
  3. package/dist/entities/analytics/dashboard.d.ts +1 -1
  4. package/dist/entities/artifact/types.d.ts +1 -1
  5. package/dist/entities/calendar-event/types.d.ts +1 -1
  6. package/dist/entities/communication/message-template.d.ts +1 -1
  7. package/dist/entities/company/types.d.ts +1 -1
  8. package/dist/entities/contact/provider.d.ts +2 -1
  9. package/dist/entities/contact/types.d.ts +1 -10
  10. package/dist/entities/live-lens/types.d.ts +1 -1
  11. package/dist/entities/memory/ingest.d.ts +14 -1
  12. package/dist/entities/memory/kind.d.ts +1 -1
  13. package/dist/entities/playbook/actor.d.ts +3 -2
  14. package/dist/entities/playbook/types.d.ts +1 -1
  15. package/dist/entities/scope/actor.d.ts +16 -0
  16. package/dist/entities/{note → scope}/index.d.ts +1 -0
  17. package/dist/entities/scope/scope.test.d.ts +1 -0
  18. package/dist/entities/scope/types.d.ts +53 -0
  19. package/dist/entities/task/types.d.ts +1 -1
  20. package/dist/entities/time-entry/types.d.ts +1 -1
  21. package/dist/entities/topic/types.d.ts +7 -5
  22. package/dist/entities/work/types.d.ts +1 -1
  23. package/dist/index.cjs +6 -6
  24. package/dist/index.d.ts +2 -6
  25. package/dist/index.js +493 -473
  26. package/dist/platform/api.d.ts +3 -1
  27. package/dist/platform/call-lines.d.ts +74 -0
  28. package/dist/platform/call-lines.test.d.ts +1 -0
  29. package/dist/platform/communication.d.ts +16 -0
  30. package/dist/platform/provider.d.ts +0 -61
  31. package/dist/platform/scope.d.ts +1 -1
  32. package/dist/platform/settings.d.ts +0 -14
  33. package/dist/platform/storage.d.ts +1 -1
  34. package/package.json +1 -4
  35. package/dist/entities/note/types.d.ts +0 -14
  36. package/dist/entities/shopify/index.d.ts +0 -1
  37. package/dist/entities/shopify/types.d.ts +0 -79
  38. package/dist/platform/lifecycle.d.ts +0 -13
  39. package/dist/platform/reactive.d.ts +0 -13
  40. package/dist/platform/sdk.d.ts +0 -172
  41. package/dist/platform/service-registry.d.ts +0 -13
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- function Cn(e) {
1
+ function wn(e) {
2
2
  return e.type === "EMAIL_RECEIVED" || e.type === "EMAIL_SENT";
3
3
  }
4
- function wn(e) {
4
+ function Nn(e) {
5
5
  return e.type === "CHAT_MESSAGE_SENT" || e.type === "CHAT_MESSAGE_RECEIVED";
6
6
  }
7
7
  const L = 10, T = 10, I = 10, M = 5, we = /* @__PURE__ */ new Set([
@@ -14,13 +14,13 @@ const L = 10, T = 10, I = 10, M = 5, we = /* @__PURE__ */ new Set([
14
14
  "actions",
15
15
  "attachments"
16
16
  ]);
17
- function k(e) {
17
+ function C(e) {
18
18
  if (typeof e == "string") return e.length > 0;
19
19
  if (!e || typeof e != "object") return !1;
20
20
  const t = e;
21
21
  return typeof t.key == "string" || typeof t.value == "string";
22
22
  }
23
- function Nn(e, t = () => {
23
+ function vn(e, t = () => {
24
24
  }) {
25
25
  if (!Array.isArray(e)) return [];
26
26
  const n = [];
@@ -37,13 +37,13 @@ function Nn(e, t = () => {
37
37
  }
38
38
  switch (i.type) {
39
39
  case "header":
40
- if (!k(i.text)) {
40
+ if (!C(i.text)) {
41
41
  t("a header without text");
42
42
  continue;
43
43
  }
44
44
  break;
45
45
  case "context":
46
- if (!k(i.text)) {
46
+ if (!C(i.text)) {
47
47
  t("a context block without text");
48
48
  continue;
49
49
  }
@@ -65,7 +65,7 @@ function Nn(e, t = () => {
65
65
  i.items.length > I && (t("more than " + I + " list items"), i.items = i.items.slice(0, I));
66
66
  break;
67
67
  case "actions": {
68
- const a = Array.isArray(i.elements) ? i.elements : [], o = a.filter((s) => s && s.action_id && s.invoke && k(s.text));
68
+ const a = Array.isArray(i.elements) ? i.elements : [], o = a.filter((s) => s && s.action_id && s.invoke && C(s.text));
69
69
  if (o.length !== a.length && t("an action without action_id, invoke or text"), o.length === 0) continue;
70
70
  o.length > M && t("more than " + M + " actions"), i.elements = o.slice(0, M);
71
71
  break;
@@ -86,7 +86,7 @@ function A(e) {
86
86
  function D(e) {
87
87
  return e ? ` — ${Math.floor(e / 60)}m ${e % 60}s` : "";
88
88
  }
89
- function C(e) {
89
+ function k(e) {
90
90
  return e?.split("@")?.[0] || e || "";
91
91
  }
92
92
  function b(e) {
@@ -102,7 +102,7 @@ const m = {
102
102
  channelKind: "voice",
103
103
  icon: "phone",
104
104
  snippet: () => "Gesprek gestart",
105
- timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${C(e.payload.from)}` : `Outbound call started — ${C(e.payload.to)}`
105
+ timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${k(e.payload.from)}` : `Outbound call started — ${k(e.payload.to)}`
106
106
  },
107
107
  VOICE_CALL_ANSWERED: {
108
108
  shape: "event",
@@ -137,7 +137,7 @@ const m = {
137
137
  channelKind: "voice",
138
138
  icon: "phone",
139
139
  snippet: () => "Gemiste oproep",
140
- timeline: (e) => `Missed call — ${C(e.payload.from)}`
140
+ timeline: (e) => `Missed call — ${k(e.payload.from)}`
141
141
  },
142
142
  VOICE_CALL_FAILED: {
143
143
  shape: "event",
@@ -420,7 +420,7 @@ function K(e) {
420
420
  function d(e) {
421
421
  return m[e];
422
422
  }
423
- function vn(e) {
423
+ function xn(e) {
424
424
  return d(e)?.icon ?? "circle";
425
425
  }
426
426
  function On(e) {
@@ -429,25 +429,25 @@ function On(e) {
429
429
  function ce(e) {
430
430
  return e === "message" || e === "note";
431
431
  }
432
- function xn(e) {
432
+ function $n(e) {
433
433
  return ce(d(e)?.shape);
434
434
  }
435
- function $n(e) {
435
+ function Rn(e) {
436
436
  return d(e)?.replyable === !0;
437
437
  }
438
- function Rn(e) {
438
+ function Ln(e) {
439
439
  return d(e)?.carriesText === !0;
440
440
  }
441
- function Ln(e) {
441
+ function Dn(e) {
442
442
  return d(e)?.countsAs;
443
443
  }
444
- function Dn(e) {
444
+ function Pn(e) {
445
445
  return d(e)?.playbookAuthored === !0;
446
446
  }
447
- function Pn(e) {
447
+ function Kn(e) {
448
448
  return d(e)?.connected === !0;
449
449
  }
450
- function Kn(e) {
450
+ function Un(e) {
451
451
  const t = d(e);
452
452
  return t?.shape === "artifact" && t?.carriesText === !0;
453
453
  }
@@ -455,15 +455,15 @@ function ve(e) {
455
455
  const t = d(e.type)?.snippet;
456
456
  return t ? t(e) : "";
457
457
  }
458
- function Un(e, t) {
458
+ function jn(e, t) {
459
459
  const n = d(e.type)?.timeline;
460
460
  return n ? n(e, t) : e.type.replace(/_/g, " ").toLowerCase();
461
461
  }
462
- function jn(e) {
462
+ function Gn(e) {
463
463
  const t = d(e.type)?.joinUrl;
464
464
  return t ? t(e) : void 0;
465
465
  }
466
- function O(e, t) {
466
+ function x(e, t) {
467
467
  let n = e;
468
468
  for (const r of t.split(".")) {
469
469
  if (n == null || typeof n != "object") return "";
@@ -471,25 +471,25 @@ function O(e, t) {
471
471
  }
472
472
  return n == null ? "" : typeof n == "string" ? n : typeof n == "number" || typeof n == "boolean" ? String(n) : "";
473
473
  }
474
- function x(e, t, n) {
474
+ function O(e, t, n) {
475
475
  if (e === void 0) return null;
476
476
  if (typeof e == "string") return e || null;
477
477
  if ("value" in e)
478
- return O(t, e.value) || null;
478
+ return x(t, e.value) || null;
479
479
  const r = {};
480
480
  for (const [a, o] of Object.entries(e.params ?? {}))
481
- r[a] = O(t, o);
481
+ r[a] = x(t, o);
482
482
  const i = n(e.key, r);
483
483
  return i === e.key ? null : i;
484
484
  }
485
- function Oe(e, t) {
485
+ function xe(e, t) {
486
486
  if (!e || typeof e == "string" || "value" in e) return null;
487
487
  const n = {};
488
488
  for (const [r, i] of Object.entries(e.params ?? {}))
489
- n[r] = O(t, i);
489
+ n[r] = x(t, i);
490
490
  return { key: e.key, params: n };
491
491
  }
492
- const xe = (e) => e;
492
+ const Oe = (e) => e;
493
493
  function U(e) {
494
494
  const t = m[e];
495
495
  return {
@@ -522,7 +522,7 @@ function j(e) {
522
522
  };
523
523
  }
524
524
  class $e {
525
- constructor(t = [], n = xe) {
525
+ constructor(t = [], n = Oe) {
526
526
  this.translate = n;
527
527
  for (const r of t)
528
528
  r?.type && (r.type in m || this.declared.has(r.type) || this.declared.set(r.type, r));
@@ -547,14 +547,14 @@ class $e {
547
547
  const r = m[t.type];
548
548
  if (r?.timeline) return r.timeline(t, n);
549
549
  const i = this.declared.get(t.type);
550
- return x(i?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
550
+ return O(i?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
551
551
  }
552
552
  /** De regel voor de inboxlijst. Leeg wanneer het type niets te tonen heeft. */
553
553
  snippet(t) {
554
554
  const n = m[t.type];
555
555
  if (n?.snippet) return n.snippet(t);
556
556
  const r = this.declared.get(t.type);
557
- return x(r?.text, t, this.translate) ?? "";
557
+ return O(r?.text, t, this.translate) ?? "";
558
558
  }
559
559
  /** De descriptor zoals hij binnenkwam; nodig om `text` als sleutel op te slaan. */
560
560
  descriptor(t) {
@@ -607,13 +607,13 @@ class $e {
607
607
  return this.translate;
608
608
  }
609
609
  }
610
- const Gn = new $e(), G = 140;
610
+ const Bn = new $e(), G = 140;
611
611
  function Re(e) {
612
612
  const t = e.trim();
613
613
  return t.length <= G ? t : t.slice(0, G - 1).trimEnd() + "…";
614
614
  }
615
- function Bn(e, t) {
616
- const n = Oe(t?.text, e), r = t ? x(t.text, e, (i) => i) : null;
615
+ function Fn(e, t) {
616
+ const n = xe(t?.text, e), r = t ? O(t.text, e, (i) => i) : null;
617
617
  return {
618
618
  activityId: e.id,
619
619
  type: e.type,
@@ -624,16 +624,16 @@ function Bn(e, t) {
624
624
  ...n ? { snippetKey: n.key, snippetParams: n.params } : {}
625
625
  };
626
626
  }
627
- function Fn(e, t, n = []) {
627
+ function Vn(e, t, n = []) {
628
628
  const r = e.createdAt;
629
629
  if (!r) return [];
630
630
  const i = new Set(n);
631
631
  return e.author.type === "user" && e.author.id && i.add(e.author.id), Object.entries(t).filter(([a, o]) => o >= r && !i.has(a)).map(([a]) => a);
632
632
  }
633
- function Vn(e) {
633
+ function Hn(e) {
634
634
  return e.createdAt ?? 0;
635
635
  }
636
- const Hn = [
636
+ const Wn = [
637
637
  { id: "agent", label: "Agent", labelSource: "user" },
638
638
  { id: "team", label: "Team", labelSource: "team" },
639
639
  { id: "inbox", label: "Inbox", labelSource: "inbox" },
@@ -643,7 +643,7 @@ const Hn = [
643
643
  { id: "handledBy", label: "Afhandelaar", labelSource: "raw" },
644
644
  { id: "time", label: "Tijd", labelSource: "raw" }
645
645
  ];
646
- function Wn(e) {
646
+ function zn(e) {
647
647
  const t = [];
648
648
  for (const n of Object.keys(e))
649
649
  for (const r of Object.keys(e[n]))
@@ -662,7 +662,7 @@ function De(e, t) {
662
662
  return n.setUTCMinutes(0, 0, 0), t === "day" && n.setUTCHours(0), n.getTime();
663
663
  }
664
664
  const Pe = 36e5, Ke = 864e5;
665
- function zn(e, t, n) {
665
+ function Xn(e, t, n) {
666
666
  const r = n === "hour" ? Pe : Ke, i = [];
667
667
  for (let a = De(e, n); a <= t; a += r)
668
668
  i.push(Le(a, n));
@@ -675,7 +675,7 @@ const Ue = [
675
675
  function Ge(e, t) {
676
676
  return `${e}.usage.${t}`;
677
677
  }
678
- function Xn(e, t) {
678
+ function Yn(e, t) {
679
679
  return t.map((n) => ({
680
680
  id: Ge(e, n.unit),
681
681
  label: n.label,
@@ -690,7 +690,7 @@ function Xn(e, t) {
690
690
  ]
691
691
  }));
692
692
  }
693
- const ue = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), B = 200, F = 100, V = 200, H = 12, W = 4, de = 4e3, N = 500, Yn = 256 * 1024, Be = /* @__PURE__ */ new Set([
693
+ const ue = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), B = 200, F = 100, V = 200, H = 12, W = 4, de = 4e3, N = 500, qn = 256 * 1024, Be = /* @__PURE__ */ new Set([
694
694
  "heading",
695
695
  "paragraph",
696
696
  "list",
@@ -759,7 +759,7 @@ function Xe(e, t = de) {
759
759
  function Ye(e, t = "info") {
760
760
  return typeof e == "string" && ue.has(e) ? e : t;
761
761
  }
762
- function qn(e, t = () => {
762
+ function Jn(e, t = () => {
763
763
  }) {
764
764
  if (!Array.isArray(e)) return [];
765
765
  const n = [];
@@ -859,7 +859,7 @@ function qn(e, t = () => {
859
859
  }
860
860
  const y = Array.isArray(c) ? c : [];
861
861
  p.push(
862
- s.map((_, Ce) => u(y[Ce], N))
862
+ s.map((_, ke) => u(y[ke], N))
863
863
  );
864
864
  }
865
865
  const f = u(i.caption, N);
@@ -913,10 +913,10 @@ function qn(e, t = () => {
913
913
  }
914
914
  return n;
915
915
  }
916
- function Jn(e) {
916
+ function Zn(e) {
917
917
  return JSON.stringify(e).length;
918
918
  }
919
- function Zn(e) {
919
+ function Qn(e) {
920
920
  return {
921
921
  blocks: e.length,
922
922
  types: e.map((t) => t.type),
@@ -968,7 +968,7 @@ function qe(e) {
968
968
  return (e.title ? `**${e.title}** ${e.text}` : e.text).split(/\r?\n/).map((n) => `> ${n}`);
969
969
  }
970
970
  }
971
- function Qn(e, t) {
971
+ function er(e, t) {
972
972
  const n = [], r = e.some((i) => i.type === "heading" && i.level === 1);
973
973
  t && !r && n.push(`# ${t}`);
974
974
  for (const i of e) {
@@ -982,40 +982,40 @@ function Qn(e, t) {
982
982
  `;
983
983
  }
984
984
  const fe = (e) => `user:${e}`, me = (e) => `team:${e}`;
985
- function er(e) {
985
+ function tr(e) {
986
986
  const t = /* @__PURE__ */ new Set();
987
987
  for (const n of e ?? [])
988
988
  n?.id && (n.kind === "user" && t.add(fe(n.id)), n.kind === "team" && t.add(me(n.id)));
989
989
  return [...t].sort();
990
990
  }
991
- function tr(e, t) {
991
+ function nr(e, t) {
992
992
  return [fe(e), ...t.map(me)];
993
993
  }
994
- function nr(e) {
994
+ function rr(e) {
995
995
  const t = /* @__PURE__ */ new Set();
996
996
  for (const n of e ?? [])
997
997
  n?.kind && t.add(n.kind);
998
998
  return [...t];
999
999
  }
1000
1000
  const Je = ["done", "escalated"];
1001
- function rr(e) {
1001
+ function ir(e) {
1002
1002
  return Je.includes(e);
1003
1003
  }
1004
1004
  const Ze = "assignment";
1005
- function ir(e) {
1005
+ function ar(e) {
1006
1006
  return `${Ze}:${e}`;
1007
1007
  }
1008
- function ar(e, t, n) {
1008
+ function or(e, t, n) {
1009
1009
  if (e.direction === "inbound") return !0;
1010
1010
  if (e.author?.type === "user" && e.author.id === t) return !1;
1011
1011
  const r = e.payload?.mentions;
1012
1012
  return Array.isArray(r) && r.includes(t) ? !0 : n === "reply";
1013
1013
  }
1014
- function or(e) {
1014
+ function sr(e) {
1015
1015
  return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
1016
1016
  }
1017
1017
  const Qe = 12;
1018
- function sr(e, t, n = Qe) {
1018
+ function lr(e, t, n = Qe) {
1019
1019
  const r = t + 1;
1020
1020
  return e ? e.kind === "done" ? { status: "done", waitingOn: null, turns: r, reason: e.note } : e.kind === "escalate" ? { status: "escalated", waitingOn: null, turns: r, reason: e.reason } : r >= n ? {
1021
1021
  status: "escalated",
@@ -1056,13 +1056,13 @@ function et(e, t) {
1056
1056
  return e.userId === t.userId;
1057
1057
  }
1058
1058
  }
1059
- function lr(e, t) {
1059
+ function cr(e, t) {
1060
1060
  return e.filter((n) => n.enabled && et(n.ownerScope, t));
1061
1061
  }
1062
- function cr(e) {
1062
+ function ur(e) {
1063
1063
  return (e.startsWith("tool:") ? e.slice(5) : e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
1064
1064
  }
1065
- const ur = [
1065
+ const dr = [
1066
1066
  { name: "text", type: "string" },
1067
1067
  { name: "subject", type: "string" },
1068
1068
  { name: "from", type: "string" },
@@ -1090,7 +1090,7 @@ const ur = [
1090
1090
  // dus `buildTriggerVars` kan hem niet zelf vullen: de job doet dat met de catalogus in de
1091
1091
  // hand, vóór het trigger-filter draait — net als contactId/companyId hierboven.
1092
1092
  { name: "assigneeUserId", type: "string" }
1093
- ], dr = {
1093
+ ], pr = {
1094
1094
  topics: [
1095
1095
  { name: "topicId", type: "string" },
1096
1096
  { name: "topic", type: "string" },
@@ -1114,7 +1114,7 @@ function tt(e) {
1114
1114
  return "org";
1115
1115
  }
1116
1116
  }
1117
- function pr(e) {
1117
+ function fr(e) {
1118
1118
  if (typeof e != "string") return;
1119
1119
  const t = e.trim();
1120
1120
  if (t === "org") return { kind: "org" };
@@ -1139,13 +1139,14 @@ function rt(e) {
1139
1139
  return { kind: "org" };
1140
1140
  }
1141
1141
  }
1142
- function fr(e) {
1143
- return e.agentId ? { kind: "user", userId: e.agentId } : rt(e.ownerScope);
1144
- }
1142
+ const it = rt;
1145
1143
  function mr(e) {
1144
+ return e.agentId ? { kind: "user", userId: e.agentId } : it(e.ownerScope);
1145
+ }
1146
+ function gr(e) {
1146
1147
  return nt(e);
1147
1148
  }
1148
- function gr(e, t) {
1149
+ function hr(e, t) {
1149
1150
  if (!t) return;
1150
1151
  let n = e;
1151
1152
  for (const r of t.split(".")) {
@@ -1154,65 +1155,65 @@ function gr(e, t) {
1154
1155
  }
1155
1156
  return n;
1156
1157
  }
1157
- function hr(e, t) {
1158
+ function yr(e, t) {
1158
1159
  return e.targets.find((n) => n.activityTypes.includes(t));
1159
1160
  }
1160
- function yr(e, t) {
1161
+ function Ar(e, t) {
1161
1162
  if (t)
1162
1163
  return e.targets.find((n) => n.id === t);
1163
1164
  }
1164
- function it(e) {
1165
+ function at(e) {
1165
1166
  return e?.kind === "assignment";
1166
1167
  }
1167
- function Ar(e) {
1168
+ function br(e) {
1168
1169
  const { trigger: t, agentId: n, target: r, activityType: i, assigneeUserId: a, authorUserId: o } = e;
1169
- return it(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";
1170
+ return at(t) ? n ? r ? r.activityTypes.includes(i) ? a ? a !== n ? "assigned to someone else" : o && o === n ? "the agent assigned this to itself, which would restart its own run" : null : `no assignee found at ${r.assigneePath}` : `activity type ${i} does not announce an assignment for ${r.id}` : `assignment target kind "${t.targetKind}" is not declared by any installed app` : "this playbook has no agent, so an assignment can never be for it" : "trigger is not an assignment trigger";
1170
1171
  }
1171
- function at(e) {
1172
+ function ot(e) {
1172
1173
  return `${e.type}:${e.id}`;
1173
1174
  }
1174
- const ot = "interaction";
1175
- function st(e) {
1176
- return e?.type === ot ? e.id : void 0;
1175
+ const st = "interaction";
1176
+ function lt(e) {
1177
+ return e?.type === st ? e.id : void 0;
1177
1178
  }
1178
- const lt = 64, ct = 8e3;
1179
- function br(e) {
1179
+ const ct = 64, ut = 8e3;
1180
+ function Er(e) {
1180
1181
  const t = typeof e == "number" ? e : Number(String(e ?? "").trim());
1181
1182
  if (!(!Number.isFinite(t) || t <= 0))
1182
- return Math.min(Math.max(Math.round(t), lt), ct);
1183
+ return Math.min(Math.max(Math.round(t), ct), ut);
1183
1184
  }
1184
- const Er = { kind: "workflow", steps: [] };
1185
- function Sr(e) {
1185
+ const Sr = { kind: "workflow", steps: [] };
1186
+ function _r(e) {
1186
1187
  return e?.kind === "workflow" ? e.steps : [];
1187
1188
  }
1188
- function _r(e) {
1189
+ function Tr(e) {
1189
1190
  return e?.kind === "procedure" ? e.procedure : void 0;
1190
1191
  }
1191
- const ut = ["done", "escalated", "failed", "stopped"];
1192
- function Tr(e) {
1193
- return ut.includes(e);
1192
+ const dt = ["done", "escalated", "failed", "stopped"];
1193
+ function Ir(e) {
1194
+ return dt.includes(e);
1194
1195
  }
1195
- function dt(e) {
1196
+ function pt(e) {
1196
1197
  return e === "waiting";
1197
1198
  }
1198
- function Ir(e) {
1199
- return e === "running" || dt(e);
1199
+ function Mr(e) {
1200
+ return e === "running" || pt(e);
1200
1201
  }
1201
1202
  function ge(e) {
1202
1203
  return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
1203
1204
  }
1204
- function Mr(e) {
1205
+ function Cr(e) {
1205
1206
  const t = ge(e);
1206
- return t ? at(t) : void 0;
1207
+ return t ? ot(t) : void 0;
1207
1208
  }
1208
1209
  function kr(e) {
1209
- return st(ge(e));
1210
+ return lt(ge(e));
1210
1211
  }
1211
- function Cr(e, t) {
1212
+ function wr(e, t) {
1212
1213
  const n = e.labels ?? [];
1213
1214
  return n.find((r) => r.locale === t)?.label ?? n[0]?.label ?? e.url;
1214
1215
  }
1215
- function wr(e, t, n) {
1216
+ function Nr(e, t, n) {
1216
1217
  const r = e.translations ?? [];
1217
1218
  return r.find((i) => i.locale === t) ?? (n ? r.find((i) => i.locale === n) : void 0) ?? { locale: t };
1218
1219
  }
@@ -1235,15 +1236,15 @@ function he(e) {
1235
1236
  const t = (e ?? "").toLowerCase();
1236
1237
  return Z.find((n) => n.code === t) ?? Z.find((n) => n.code === t.split("-")[0]);
1237
1238
  }
1238
- function Nr(e) {
1239
+ function vr(e) {
1239
1240
  return he(e)?.label ?? e;
1240
1241
  }
1241
- function vr(e) {
1242
+ function xr(e) {
1242
1243
  const t = he(e);
1243
1244
  return t ? t.english === t.label ? `${t.english} (${t.code})` : `${t.english} — ${t.label} (${t.code})` : e;
1244
1245
  }
1245
1246
  const ye = 3;
1246
- function pt(e, t) {
1247
+ function ft(e, t) {
1247
1248
  const n = /* @__PURE__ */ new Set();
1248
1249
  let r = 1, i = t.get(e)?.parentId;
1249
1250
  for (; i; ) {
@@ -1256,11 +1257,11 @@ function Or(e, t, n) {
1256
1257
  if (!e) return !0;
1257
1258
  if (e === t) return !1;
1258
1259
  const r = new Map(n.map((o) => [o.id, o]));
1259
- if (!r.has(e) || t && ft(e, t, r)) return !1;
1260
- const i = pt(e, r), a = t ? Ae(t, n) : 1;
1260
+ if (!r.has(e) || t && mt(e, t, r)) return !1;
1261
+ const i = ft(e, r), a = t ? Ae(t, n) : 1;
1261
1262
  return i + a <= ye;
1262
1263
  }
1263
- function ft(e, t, n) {
1264
+ function mt(e, t, n) {
1264
1265
  const r = /* @__PURE__ */ new Set();
1265
1266
  let i = n.get(e)?.parentId;
1266
1267
  for (; i; ) {
@@ -1276,32 +1277,32 @@ function Ae(e, t, n = /* @__PURE__ */ new Set()) {
1276
1277
  const r = t.filter((i) => i.parentId === e);
1277
1278
  return r.length ? 1 + Math.max(...r.map((i) => Ae(i.id, t, n))) : 1;
1278
1279
  }
1279
- const mt = "en";
1280
- function gt(e) {
1281
- return e.defaultLocale || e.locale || mt;
1280
+ const gt = "en";
1281
+ function ht(e) {
1282
+ return e.defaultLocale || e.locale || gt;
1282
1283
  }
1283
- function xr(e) {
1284
+ function $r(e) {
1284
1285
  const t = /* @__PURE__ */ new Set(), n = [];
1285
- for (const r of [gt(e), ...e.locales ?? []])
1286
+ for (const r of [ht(e), ...e.locales ?? []])
1286
1287
  !r || t.has(r) || (t.add(r), n.push(r));
1287
1288
  return n;
1288
1289
  }
1289
- function $r(e, t, n) {
1290
+ function Rr(e, t, n) {
1290
1291
  const r = e.translations ?? [];
1291
1292
  return r.find((i) => i.locale === t)?.name ?? (n ? r.find((i) => i.locale === n)?.name : void 0) ?? e.name;
1292
1293
  }
1293
- const ht = 20, yt = 20, v = 300;
1294
+ const yt = 20, At = 20, v = 300;
1294
1295
  function g(e) {
1295
1296
  return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu, " ").replace(/\s+/g, " ").trim();
1296
1297
  }
1297
- function At(e) {
1298
+ function bt(e) {
1298
1299
  const t = e.replace(/\s+/g, " ").trim();
1299
1300
  if (t.length <= v) return t;
1300
1301
  const n = t.slice(0, v), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
1301
1302
  return r > v * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
1302
1303
  }
1303
- function Rr(e, t) {
1304
- const n = At(t.text), r = g(n);
1304
+ function Lr(e, t) {
1305
+ const n = bt(t.text), r = g(n);
1305
1306
  if (!r || (e.examples ?? []).some((o) => g(o) === r)) return null;
1306
1307
  const i = e.exampleCandidates ?? [], a = i.findIndex((o) => g(o.text) === r);
1307
1308
  if (a >= 0) {
@@ -1309,25 +1310,25 @@ function Rr(e, t) {
1309
1310
  const o = [...i];
1310
1311
  return o[a] = { ...o[a], corrected: !0, addedAt: t.addedAt }, Q(o);
1311
1312
  }
1312
- return Q([{ ...t, text: n }, ...i]).slice(0, yt);
1313
+ return Q([{ ...t, text: n }, ...i]).slice(0, At);
1313
1314
  }
1314
1315
  function Q(e) {
1315
1316
  return [...e].sort((t, n) => Number(n.corrected) - Number(t.corrected) || n.addedAt - t.addedAt);
1316
1317
  }
1317
- function Lr(e, t) {
1318
+ function Dr(e, t) {
1318
1319
  const n = g(t), r = (e.examples ?? []).filter((a) => a.trim());
1319
- return { examples: r.some((a) => g(a) === n) ? r : [...r, t].slice(-ht), exampleCandidates: bt(e, t) };
1320
+ return { examples: r.some((a) => g(a) === n) ? r : [...r, t].slice(-yt), exampleCandidates: Et(e, t) };
1320
1321
  }
1321
- function bt(e, t) {
1322
+ function Et(e, t) {
1322
1323
  const n = g(t);
1323
1324
  return (e.exampleCandidates ?? []).filter((r) => g(r.text) !== n);
1324
1325
  }
1325
- function Et(e, t) {
1326
+ function St(e, t) {
1326
1327
  const n = e.ownerScope;
1327
1328
  return n ? n.kind === "org" ? !0 : n.kind === "team" ? !!t && n.teamId === t : !1 : !1;
1328
1329
  }
1329
- function Dr(e, t) {
1330
- return e.filter((n) => Et(n, t));
1330
+ function Pr(e, t) {
1331
+ return e.filter((n) => St(n, t));
1331
1332
  }
1332
1333
  const be = [
1333
1334
  {
@@ -1423,23 +1424,23 @@ const be = [
1423
1424
  function S(e) {
1424
1425
  return be.find((t) => t.id === e);
1425
1426
  }
1426
- function Pr(e) {
1427
+ function Kr(e) {
1427
1428
  return S(e)?.label ?? e;
1428
1429
  }
1429
- function Kr(e, t = "gpt-5-mini") {
1430
+ function Ur(e, t = "gpt-5-mini") {
1430
1431
  return S(e)?.defaultModel ?? t;
1431
1432
  }
1432
- function Ur(e) {
1433
+ function jr(e) {
1433
1434
  return be.filter((t) => t.capabilities.includes(e));
1434
1435
  }
1435
- function jr(e) {
1436
+ function Gr(e) {
1436
1437
  const t = S(e);
1437
1438
  return !!t && !t.baseUrl;
1438
1439
  }
1439
- function Gr(e, t) {
1440
+ function Br(e, t) {
1440
1441
  return t === "text" ? !0 : S(e)?.attachmentKinds?.includes(t) === !0;
1441
1442
  }
1442
- function Br(e, t) {
1443
+ function Fr(e, t) {
1443
1444
  if (!e.enabled) return "ok";
1444
1445
  const n = ee(e.hardLimitNanos), r = ee(e.softLimitNanos);
1445
1446
  return n !== void 0 && t >= n ? "hard" : r !== void 0 && t >= r ? "soft" : "ok";
@@ -1447,76 +1448,76 @@ function Br(e, t) {
1447
1448
  function ee(e) {
1448
1449
  return typeof e == "number" ? e : void 0;
1449
1450
  }
1450
- function St(e, t = "month") {
1451
+ function _t(e, t = "month") {
1451
1452
  const n = new Date(e);
1452
1453
  return Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), 1);
1453
1454
  }
1454
- function Fr(e, t = "month") {
1455
- const n = new Date(St(e, t));
1455
+ function Vr(e, t = "month") {
1456
+ const n = new Date(_t(e, t));
1456
1457
  return `${n.getUTCFullYear()}-${String(n.getUTCMonth() + 1).padStart(2, "0")}`;
1457
1458
  }
1458
- function Vr(e) {
1459
+ function Hr(e) {
1459
1460
  return e?.listeningEnabled !== !1;
1460
1461
  }
1461
- function Hr(e) {
1462
+ function Wr(e) {
1462
1463
  return e.credentialScope ? e.credentialScope : (e.authMode ?? "header") === "header" || e.oauth?.scope === "org" ? "shared" : "per-user";
1463
1464
  }
1464
- function Wr(e) {
1465
+ function zr(e) {
1465
1466
  return `mcp__${e}__`;
1466
1467
  }
1467
- const zr = /* @__PURE__ */ new Set(["mail", "message"]);
1468
- function _t(e, t) {
1468
+ const Xr = /* @__PURE__ */ new Set(["mail", "message"]);
1469
+ function Tt(e, t) {
1469
1470
  const n = e.settings?.signatures?.[t];
1470
1471
  return !n || !n.enabled || !n.body || n.body.trim() === "" ? null : n;
1471
1472
  }
1472
- function Xr(e, t, n, r = "html") {
1473
+ function Yr(e, t, n, r = "html") {
1473
1474
  if (!e) return n;
1474
- const i = _t(e, t);
1475
+ const i = Tt(e, t);
1475
1476
  return i ? `${n}${r === "text" ? `
1476
1477
 
1477
1478
  ` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${i.body}` : n;
1478
1479
  }
1479
- function Yr(e) {
1480
+ function qr(e) {
1480
1481
  return e.endpoints ?? [];
1481
1482
  }
1482
- const qr = (e) => !!e.assignedUserId || !!e.assignedInboxId, Jr = (e) => e.status === "closed", Zr = (e) => ({
1483
+ const Jr = (e) => !!e.assignedUserId || !!e.assignedInboxId, Zr = (e) => e.status === "closed", Qr = (e) => ({
1483
1484
  urgent: 10,
1484
1485
  high: 5,
1485
1486
  normal: 2,
1486
1487
  low: 1
1487
- })[e.priority] || 0, Qr = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
1488
- function ei(e, t) {
1488
+ })[e.priority] || 0, ei = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
1489
+ function ti(e, t) {
1489
1490
  return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
1490
1491
  }
1491
- const ti = 1e3, ni = 2e3, ri = 500, ii = 12e3, ai = 4e3, Tt = ["contact", "company"];
1492
- function oi(e) {
1492
+ const ni = 1e3, ri = 2e3, ii = 500, ai = 12e3, oi = 4e3, It = ["contact", "company"];
1493
+ function si(e) {
1493
1494
  if (!e) return !1;
1494
1495
  const t = e.slice(0, e.indexOf(":"));
1495
- return Tt.includes(t);
1496
+ return It.includes(t);
1496
1497
  }
1497
- function si(e, t) {
1498
+ function li(e, t) {
1498
1499
  const n = e.accumulatedSeconds || 0;
1499
1500
  return e.runningSince ? n + Math.max(0, Math.floor((t - e.runningSince) / 1e3)) : n;
1500
1501
  }
1501
- function li(e, t) {
1502
+ function ci(e, t) {
1502
1503
  const n = Math.max(1, Math.ceil(Math.max(0, e) / 60));
1503
1504
  if (!t || t === "exact") return n * 60;
1504
1505
  const r = Number(t);
1505
1506
  return !Number.isFinite(r) || r <= 0 ? n * 60 : Math.ceil(n / r) * r * 60;
1506
1507
  }
1507
- function ci(e) {
1508
+ function ui(e) {
1508
1509
  const t = Math.max(0, Math.round(e / 60));
1509
1510
  return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
1510
1511
  }
1511
- function ui(e) {
1512
+ function di(e) {
1512
1513
  const t = Math.max(0, Math.floor(e)), n = (a) => String(a).padStart(2, "0"), r = Math.floor(t / 60) % 60, i = Math.floor(t / 3600);
1513
1514
  return i > 0 ? `${i}:${n(r)}:${n(t % 60)}` : `${n(r)}:${n(t % 60)}`;
1514
1515
  }
1515
- function It(e) {
1516
+ function Mt(e) {
1516
1517
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
1517
1518
  }
1518
- function di(e, t) {
1519
- const n = It(e) || "werksoort", r = new Set(t);
1519
+ function pi(e, t) {
1520
+ const n = Mt(e) || "werksoort", r = new Set(t);
1520
1521
  if (!r.has(n)) return n;
1521
1522
  for (let i = 2; i < 500; i++) {
1522
1523
  const a = `${n}-${i}`;
@@ -1524,32 +1525,32 @@ function di(e, t) {
1524
1525
  }
1525
1526
  return `${n}-${r.size + 1}`;
1526
1527
  }
1527
- function pi(e, t) {
1528
+ function fi(e, t) {
1528
1529
  const n = e.ownerScope;
1529
1530
  return !n || n.kind === "org" ? !0 : t.includes(n.teamId);
1530
1531
  }
1531
- function fi(e) {
1532
- return e.filter((t) => !t.archived).sort(Mt);
1532
+ function mi(e) {
1533
+ return e.filter((t) => !t.archived).sort(Ct);
1533
1534
  }
1534
- function Mt(e, t) {
1535
+ function Ct(e, t) {
1535
1536
  const n = (e.order ?? 0) - (t.order ?? 0);
1536
1537
  return n !== 0 ? n : (e.label || "").localeCompare(t.label || "");
1537
1538
  }
1538
- function mi(e) {
1539
+ function gi(e) {
1539
1540
  return e.type === "agent";
1540
1541
  }
1541
- const kt = "work_item", Ct = "work_project";
1542
- function wt(e) {
1542
+ const kt = "work_item", wt = "work_project";
1543
+ function Nt(e) {
1543
1544
  return `${kt}:${e}`;
1544
1545
  }
1545
1546
  function Ee(e) {
1546
- return `${Ct}:${e}`;
1547
+ return `${wt}:${e}`;
1547
1548
  }
1548
- function gi(e, t, n) {
1549
+ function hi(e, t, n) {
1549
1550
  const r = `${e}-${t}`;
1550
1551
  return n ? `${r}-${n}` : r;
1551
1552
  }
1552
- function hi(e) {
1553
+ function yi(e) {
1553
1554
  const t = /^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e || "").trim());
1554
1555
  return t ? {
1555
1556
  projectKey: t[1].toUpperCase(),
@@ -1557,17 +1558,17 @@ function hi(e) {
1557
1558
  ...t[3] ? { subSequence: Number(t[3]) } : {}
1558
1559
  } : null;
1559
1560
  }
1560
- function yi(e) {
1561
+ function Ai(e) {
1561
1562
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 3) || "PRJ";
1562
1563
  }
1563
- function Ai(e, t = 25) {
1564
- const n = /* @__PURE__ */ new Set([wt(e.id)]);
1564
+ function bi(e, t = 25) {
1565
+ const n = /* @__PURE__ */ new Set([Nt(e.id)]);
1565
1566
  e.projectId && n.add(Ee(e.projectId));
1566
1567
  for (const r of e.ancestorKeys ?? []) n.add(r);
1567
1568
  for (const r of e.partyKeys ?? []) n.add(r);
1568
1569
  return Array.from(n).slice(0, t);
1569
1570
  }
1570
- function bi(e) {
1571
+ function Ei(e) {
1571
1572
  return [Ee(e.id)];
1572
1573
  }
1573
1574
  const $ = [
@@ -1575,17 +1576,17 @@ const $ = [
1575
1576
  { key: "in_progress", label: "status_in_progress", category: "in_progress", order: 1 },
1576
1577
  { key: "done", label: "status_done", category: "done", order: 2 }
1577
1578
  ], Se = $.map((e) => e.key);
1578
- function Nt(e) {
1579
+ function vt(e) {
1579
1580
  return e?.statuses?.length ? e.statuses : $;
1580
1581
  }
1581
- function vt(e, t) {
1582
+ function xt(e, t) {
1582
1583
  return t.find((n) => n.key === e)?.category ?? "todo";
1583
1584
  }
1584
- function Ei(e, t) {
1585
+ function Si(e, t) {
1585
1586
  return t.find((n) => n.key === e);
1586
1587
  }
1587
- function Si(e) {
1588
- const t = Nt(e), n = e?.defaultStatusKey;
1588
+ function _i(e) {
1589
+ const t = vt(e), n = e?.defaultStatusKey;
1589
1590
  return n && t.some((r) => r.key === n) ? n : Ot(t)[0]?.key ?? $[0].key;
1590
1591
  }
1591
1592
  function Ot(e) {
@@ -1594,14 +1595,14 @@ function Ot(e) {
1594
1595
  return r !== 0 ? r : (t.label || "").localeCompare(n.label || "");
1595
1596
  });
1596
1597
  }
1597
- function _i(e, t) {
1598
- return vt(e, t) === "done";
1598
+ function Ti(e, t) {
1599
+ return xt(e, t) === "done";
1599
1600
  }
1600
- function xt(e) {
1601
+ function $t(e) {
1601
1602
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
1602
1603
  }
1603
- function Ti(e, t) {
1604
- const n = xt(e) || "status", r = /* @__PURE__ */ new Set([...t, ...Se]);
1604
+ function Ii(e, t) {
1605
+ const n = $t(e) || "status", r = /* @__PURE__ */ new Set([...t, ...Se]);
1605
1606
  if (!r.has(n)) return n;
1606
1607
  for (let i = 2; i < 500; i++) {
1607
1608
  const a = `${n}-${i}`;
@@ -1609,7 +1610,7 @@ function Ti(e, t) {
1609
1610
  }
1610
1611
  return `${n}-${r.size + 1}`;
1611
1612
  }
1612
- function Ii(e) {
1613
+ function Mi(e) {
1613
1614
  const t = [];
1614
1615
  if (!e.length) return [{ index: -1, reason: "empty" }];
1615
1616
  const n = /* @__PURE__ */ new Set();
@@ -1644,7 +1645,7 @@ const R = {
1644
1645
  PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
1645
1646
  US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
1646
1647
  CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
1647
- }, $t = "NL", Rt = 15, Lt = 8, Dt = Array.from(
1648
+ }, Rt = "NL", Lt = 15, Dt = 8, Pt = Array.from(
1648
1649
  new Set(Object.values(R).map((e) => e.callingCode))
1649
1650
  ).sort((e, t) => t.length - e.length);
1650
1651
  function te(e) {
@@ -1655,8 +1656,8 @@ function E(e, t) {
1655
1656
  return e.length >= t.nsnMin && e.length <= t.nsnMax;
1656
1657
  }
1657
1658
  function ne(e) {
1658
- if (e.length > Rt) return null;
1659
- for (const t of Dt) {
1659
+ if (e.length > Lt) return null;
1660
+ for (const t of Pt) {
1660
1661
  if (!e.startsWith(t)) continue;
1661
1662
  const n = e.slice(t.length);
1662
1663
  for (const r of Object.values(R)) {
@@ -1666,16 +1667,16 @@ function ne(e) {
1666
1667
  }
1667
1668
  return null;
1668
1669
  }
1669
- return e.length < Lt ? null : `+${e}`;
1670
+ return e.length < Dt ? null : `+${e}`;
1670
1671
  }
1671
- function Pt(e) {
1672
+ function Kt(e) {
1672
1673
  let t = e.trim();
1673
1674
  const n = t.match(/^(sips?|tel|whatsapp):/i);
1674
1675
  n && (t = t.slice(n[0].length));
1675
1676
  const r = t.indexOf("@");
1676
1677
  return r >= 0 && (t = t.slice(0, r)), t.trim();
1677
1678
  }
1678
- function Mi(e) {
1679
+ function Ci(e) {
1679
1680
  if (!e) return !1;
1680
1681
  const t = e.indexOf("@");
1681
1682
  if (t <= 0) return !1;
@@ -1684,13 +1685,13 @@ function Mi(e) {
1684
1685
  }
1685
1686
  function re(e, t) {
1686
1687
  if (!e) return null;
1687
- const n = Pt(e);
1688
+ const n = Kt(e);
1688
1689
  if (!n) return null;
1689
1690
  const r = n.startsWith("+"), i = n.replace(/\D/g, "");
1690
1691
  if (!i) return null;
1691
1692
  if (r) return ne(i);
1692
1693
  if (i.startsWith("00")) return ne(i.slice(2));
1693
- const a = te(t) ?? te($t);
1694
+ const a = te(t) ?? te(Rt);
1694
1695
  if (!a) return null;
1695
1696
  const o = a.trunkPrefix;
1696
1697
  if (o && i.startsWith(o)) {
@@ -1714,11 +1715,11 @@ function _e(e) {
1714
1715
  const r = t.slice(0, n).split("+")[0], i = t.slice(n + 1);
1715
1716
  return !r || !i.includes(".") ? null : `${r}@${i}`;
1716
1717
  }
1717
- function Ci(e) {
1718
+ function wi(e) {
1718
1719
  const t = _e(e);
1719
1720
  return t ? t.slice(t.lastIndexOf("@") + 1) : null;
1720
1721
  }
1721
- const Kt = /* @__PURE__ */ new Set([
1722
+ const Ut = /* @__PURE__ */ new Set([
1722
1723
  "co.uk",
1723
1724
  "org.uk",
1724
1725
  "gov.uk",
@@ -1728,14 +1729,14 @@ const Kt = /* @__PURE__ */ new Set([
1728
1729
  "com.br",
1729
1730
  "co.za"
1730
1731
  ]);
1731
- function Ut(e) {
1732
+ function jt(e) {
1732
1733
  if (!e) return null;
1733
1734
  const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
1734
1735
  if (t.length < 2) return null;
1735
1736
  const n = t.slice(-2).join(".");
1736
- return Kt.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
1737
+ return Ut.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
1737
1738
  }
1738
- const jt = /* @__PURE__ */ new Set([
1739
+ const Gt = /* @__PURE__ */ new Set([
1739
1740
  "gmail.com",
1740
1741
  "googlemail.com",
1741
1742
  "outlook.com",
@@ -1780,16 +1781,16 @@ const jt = /* @__PURE__ */ new Set([
1780
1781
  "proximus.be",
1781
1782
  "scarlet.be"
1782
1783
  ]);
1783
- function wi(e) {
1784
- const t = Ut(e);
1785
- return t ? jt.has(t) : !1;
1786
- }
1787
1784
  function Ni(e) {
1785
+ const t = jt(e);
1786
+ return t ? Gt.has(t) : !1;
1787
+ }
1788
+ function vi(e) {
1788
1789
  if (!e) return !1;
1789
1790
  const t = e.trim().toLowerCase();
1790
1791
  return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
1791
1792
  }
1792
- function vi(e, t, n) {
1793
+ function xi(e, t, n) {
1793
1794
  if (!e || !t) return null;
1794
1795
  const r = e.trim().toLowerCase();
1795
1796
  if (r === "tel" || r === "sms" || r === "whatsapp") {
@@ -1807,7 +1808,7 @@ function vi(e, t, n) {
1807
1808
  const i = t.trim().toLowerCase();
1808
1809
  return i ? `${r}:${i}` : null;
1809
1810
  }
1810
- const Gt = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, Bt = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
1811
+ const Bt = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, Ft = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
1811
1812
  function Oi(e) {
1812
1813
  if (typeof e != "string" || !e) return "";
1813
1814
  let t = e;
@@ -1815,9 +1816,9 @@ function Oi(e) {
1815
1816
  `).map(
1816
1817
  (n) => n.replace(/^\s{0,3}#{1,6}\s+/, "").replace(/^\s{0,3}>\s?/, "").replace(/^\s*[-*+]\s+/, "").replace(/^\s*\d+[.)]\s+/, "").replace(/^\s*(?:[-*_]\s*){3,}$/, "")
1817
1818
  ).join(`
1818
- `), t = t.replace(Gt, "$2"), t = t.replace(Bt, "$2"), t = t.replace(/~~(?=\S)([\s\S]*?\S)~~/g, "$1"), t = t.replace(/`([^`\n]+)`/g, "$1"), t.replace(/\s+/g, " ").trim();
1819
+ `), t = t.replace(Bt, "$2"), t = t.replace(Ft, "$2"), t = t.replace(/~~(?=\S)([\s\S]*?\S)~~/g, "$1"), t = t.replace(/`([^`\n]+)`/g, "$1"), t.replace(/\s+/g, " ").trim();
1819
1820
  }
1820
- const Ft = [
1821
+ const Vt = [
1821
1822
  /<blockquote/i,
1822
1823
  /class="?gmail_quote/i,
1823
1824
  // Gmail quote container
@@ -1830,12 +1831,12 @@ const Ft = [
1830
1831
  // Outlook underscore separator before "From:"
1831
1832
  /\bOn\b[\s\S]{0,200}?\bwrote:/i
1832
1833
  // Gmail "On <date> <name> wrote:"
1833
- ], ie = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, Vt = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
1834
- function Ht(e) {
1834
+ ], ie = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, Ht = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
1835
+ function Wt(e) {
1835
1836
  const t = e.split(`
1836
1837
  `);
1837
1838
  for (let n = 0; n < t.length; n++)
1838
- if (Vt.test(t[n]) || ie.test(t[n]) && t.slice(n + 1, n + 4).some((r) => ie.test(r)))
1839
+ if (Ht.test(t[n]) || ie.test(t[n]) && t.slice(n + 1, n + 4).some((r) => ie.test(r)))
1839
1840
  return t.slice(0, n).join(`
1840
1841
  `).trim();
1841
1842
  return e;
@@ -1860,26 +1861,26 @@ function le(e) {
1860
1861
 
1861
1862
  `).trim();
1862
1863
  }
1863
- function xi(e) {
1864
+ function $i(e) {
1864
1865
  if (typeof e != "string" || !e) return "";
1865
1866
  let t = e.length;
1866
- for (const a of Ft) {
1867
+ for (const a of Vt) {
1867
1868
  const o = e.search(a);
1868
1869
  o >= 0 && o < t && (t = o);
1869
1870
  }
1870
1871
  const n = e.slice(0, t);
1871
1872
  let r = le(se(ae(n)));
1872
- return r || (r = le(se(ae(e)))), Ht(r) || r;
1873
+ return r || (r = le(se(ae(e)))), Wt(r) || r;
1873
1874
  }
1874
- const Wt = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, zt = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
1875
- function $i(e, t) {
1876
- return !!(e && Wt.test(e) || t && zt.test(t));
1877
- }
1878
- const Xt = 3, Yt = 600;
1875
+ const zt = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, Xt = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
1879
1876
  function Ri(e, t) {
1880
- return e >= Xt || t >= Yt;
1877
+ return !!(e && zt.test(e) || t && Xt.test(t));
1878
+ }
1879
+ const Yt = 3, qt = 600;
1880
+ function Li(e, t) {
1881
+ return e >= Yt || t >= qt;
1881
1882
  }
1882
- const qt = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), Jt = /* @__PURE__ */ new Set([
1883
+ const Jt = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), Zt = /* @__PURE__ */ new Set([
1883
1884
  "text/plain",
1884
1885
  "text/markdown",
1885
1886
  "text/csv",
@@ -1888,40 +1889,55 @@ const qt = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "ima
1888
1889
  "application/xml",
1889
1890
  "text/xml"
1890
1891
  ]);
1891
- function Zt(e) {
1892
+ function Qt(e) {
1892
1893
  const t = (e ?? "").trim().toLowerCase().split(";")[0];
1893
- return t ? qt.has(t) ? "image" : t === "application/pdf" ? "pdf" : Jt.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
1894
+ return t ? Jt.has(t) ? "image" : t === "application/pdf" ? "pdf" : Zt.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
1894
1895
  }
1895
- const h = 1024 * 1024, Qt = {
1896
+ const h = 1024 * 1024, en = {
1896
1897
  image: 5 * h,
1897
1898
  pdf: 20 * h,
1898
1899
  text: 1 * h,
1899
1900
  audio: 20 * h
1900
- }, Li = 25 * h, Di = 5;
1901
- function Pi(e, t) {
1902
- const n = Zt(e);
1903
- return n === "unsupported" ? "unsupported" : t > Qt[n] ? "too-large" : null;
1901
+ }, Di = 25 * h, Pi = 5;
1902
+ function Ki(e, t) {
1903
+ const n = Qt(e);
1904
+ return n === "unsupported" ? "unsupported" : t > en[n] ? "too-large" : null;
1904
1905
  }
1905
- function en(e) {
1906
+ function tn(e) {
1906
1907
  return `${e.kind}:${e.id || e.url || e.title}`;
1907
1908
  }
1908
- function Ki(e, t = []) {
1909
+ function Ui(e, t = []) {
1909
1910
  const n = new Set(t), r = [], i = [];
1910
1911
  for (const a of e) {
1911
- const o = en(a);
1912
+ const o = tn(a);
1912
1913
  n.has(o) || (n.add(o), r.push(a), i.push(o));
1913
1914
  }
1914
1915
  return { sources: r, keys: i };
1915
1916
  }
1916
- function tn(e, t) {
1917
- const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, i = t.intents.filter((o) => !n.has(o.intent)).map((o) => rn(o, r[o.intent]));
1917
+ function ji(e) {
1918
+ return e.sessions.filter(
1919
+ (t) => t.id !== e.exceptSessionId && t.state === "connected" && e.canHold(t.providerId)
1920
+ );
1921
+ }
1922
+ function Gi(e) {
1923
+ return e.sessions.filter(
1924
+ (t) => t.id !== e.exceptSessionId && t.state === "connected" && !e.canHold(t.providerId)
1925
+ );
1926
+ }
1927
+ function Bi(e) {
1928
+ return e.sessions.some(
1929
+ (n) => n.id !== e.exceptSessionId && (n.state === "connected" || n.state === "on_hold")
1930
+ ) ? { admit: !1, reason: "busy" } : { admit: !0 };
1931
+ }
1932
+ function nn(e, t) {
1933
+ const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, i = t.intents.filter((o) => !n.has(o.intent)).map((o) => an(o, r[o.intent]));
1918
1934
  if (!e.extraIntents || e.extraIntents.length === 0) return i;
1919
1935
  const a = new Set(i.map((o) => o.intent));
1920
1936
  for (const o of e.extraIntents)
1921
1937
  a.has(o.intent) || (i.push(o), a.add(o.intent));
1922
1938
  return i;
1923
1939
  }
1924
- function nn(e, t) {
1940
+ function rn(e, t) {
1925
1941
  const n = {};
1926
1942
  for (const r of e.intents) {
1927
1943
  if (!r.togglable) continue;
@@ -1930,46 +1946,46 @@ function nn(e, t) {
1930
1946
  }
1931
1947
  return n;
1932
1948
  }
1933
- function Ui(e, t) {
1934
- const n = nn(e, t);
1949
+ function Fi(e, t) {
1950
+ const n = rn(e, t);
1935
1951
  return Object.entries(n).filter(([, r]) => !r).map(([r]) => r);
1936
1952
  }
1937
- function rn(e, t) {
1953
+ function an(e, t) {
1938
1954
  return t ? {
1939
1955
  intent: t.intent ?? e.intent,
1940
1956
  targetSchemes: t.targetSchemes ?? e.targetSchemes,
1941
1957
  transport: t.transport ?? e.transport
1942
1958
  } : e;
1943
1959
  }
1944
- function ji(e, t) {
1960
+ function Vi(e, t) {
1945
1961
  const n = [];
1946
1962
  for (const r of e) {
1947
1963
  if (!r.enabled) continue;
1948
1964
  const i = t[r.providerId];
1949
1965
  if (i)
1950
- for (const a of tn(r, i))
1966
+ for (const a of nn(r, i))
1951
1967
  n.push({ channel: r, description: i, capability: a });
1952
1968
  }
1953
1969
  return n;
1954
1970
  }
1955
- function Gi(e, t) {
1971
+ function Hi(e, t) {
1956
1972
  return t.filter((n) => n.capability.intent === e);
1957
1973
  }
1958
- function an(e, t) {
1974
+ function on(e, t) {
1959
1975
  return t.filter((n) => n.capability.targetSchemes.includes(e));
1960
1976
  }
1961
- function Bi(e, t) {
1962
- return an(e.scheme, t);
1977
+ function Wi(e, t) {
1978
+ return on(e.scheme, t);
1963
1979
  }
1964
- function Fi(e, t, n) {
1980
+ function zi(e, t, n) {
1965
1981
  const r = [];
1966
1982
  for (const i of e)
1967
1983
  for (const a of n)
1968
1984
  a.capability.intent === t && a.capability.targetSchemes.includes(i.scheme) && r.push({ channelIntent: a, endpoint: i });
1969
1985
  return r;
1970
1986
  }
1971
- var on = /* @__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))(on || {});
1972
- const sn = {
1987
+ var sn = /* @__PURE__ */ ((e) => (e.MAILTO = "mailto", e.SIP = "sip", e.TEL = "tel", e.WEBHOOK = "webhook", e.USERNAME = "username", e.ID = "id", e.CUSTOM = "custom", e.URL = "url", e.TELEGRAM = "telegram", e.WHATSAPP = "whatsapp", e.MESSENGER = "messenger", e.INSTAGRAM = "instagram", e.VIBER = "viber", e.SMS = "sms", e.FAX = "fax", e.TEAMS = "teams", e.CALENDAR = "calendar", e))(sn || {});
1988
+ const ln = {
1973
1989
  mailto: "mail",
1974
1990
  sip: "tel",
1975
1991
  tel: "tel",
@@ -1991,10 +2007,10 @@ const sn = {
1991
2007
  id: "note",
1992
2008
  custom: "note"
1993
2009
  };
1994
- function Vi(e) {
1995
- return e ? sn[e] ?? "note" : "note";
2010
+ function Xi(e) {
2011
+ return e ? ln[e] ?? "note" : "note";
1996
2012
  }
1997
- const Hi = "message_window", Wi = "message_templates", zi = {
2013
+ const Yi = "message_window", qi = "message_templates", Ji = {
1998
2014
  // E-mail
1999
2015
  FROM: "from",
2000
2016
  TO: "to",
@@ -2011,8 +2027,8 @@ const Hi = "message_window", Wi = "message_templates", zi = {
2011
2027
  // Voice/conference
2012
2028
  HOST: "host",
2013
2029
  PARTICIPANT: "participant"
2014
- }, Xi = (e, t) => ({ intent: e, ...t }), Yi = "folder_management", qi = "remote_search", Ji = { ok: !1, code: "UNSUPPORTED", message: "Provider does not support this op" }, Zi = "resources.describe", Qi = "resources.search", ea = "resources.resolve";
2015
- function ta(e) {
2030
+ }, Zi = (e, t) => ({ intent: e, ...t }), Qi = "folder_management", ea = "remote_search", ta = { ok: !1, code: "UNSUPPORTED", message: "Provider does not support this op" }, na = "resources.describe", ra = "resources.search", ia = "resources.resolve";
2031
+ function aa(e) {
2016
2032
  const t = e.indexOf(":");
2017
2033
  return t === -1 ? e : e.slice(0, t);
2018
2034
  }
@@ -2021,21 +2037,21 @@ function Ie(e) {
2021
2037
  const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
2022
2038
  return t ? t[1] : null;
2023
2039
  }
2024
- function na(e) {
2040
+ function oa(e) {
2025
2041
  const t = Ie(e);
2026
2042
  return t ? t !== Te : typeof e == "string" && e.startsWith("/wake");
2027
2043
  }
2028
- function ra(e) {
2044
+ function sa(e) {
2029
2045
  return typeof e != "string" || e === "" || e === "/" ? !0 : Ie(e) === Te;
2030
2046
  }
2031
- function ln(e) {
2047
+ function cn(e) {
2032
2048
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2033
2049
  }
2034
- function cn(e) {
2035
- const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : "/" + ln(r)).join("");
2050
+ function un(e) {
2051
+ const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : "/" + cn(r)).join("");
2036
2052
  return new RegExp(`^${n}\\/?$`);
2037
2053
  }
2038
- function un(e, t) {
2054
+ function dn(e, t) {
2039
2055
  const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean), i = {};
2040
2056
  return n.forEach((a, o) => {
2041
2057
  if (a.startsWith(":")) {
@@ -2044,14 +2060,14 @@ function un(e, t) {
2044
2060
  }
2045
2061
  }), i;
2046
2062
  }
2047
- function dn(e) {
2063
+ function pn(e) {
2048
2064
  return e.publicBasePath ?? `/apps/${e.name}`;
2049
2065
  }
2050
- function ia(e) {
2066
+ function la(e) {
2051
2067
  const t = [];
2052
2068
  for (const n of e) {
2053
2069
  if (!n?.name) continue;
2054
- const r = dn(n);
2070
+ const r = pn(n);
2055
2071
  for (const i of n.routes ?? []) {
2056
2072
  if (!i.public) continue;
2057
2073
  const a = i.path === "/" ? "" : i.path;
@@ -2065,7 +2081,7 @@ function ia(e) {
2065
2081
  }
2066
2082
  return t;
2067
2083
  }
2068
- function pn(e, t) {
2084
+ function fn(e, t) {
2069
2085
  const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
2070
2086
  for (let i = 0; i < Math.min(n.length, r.length); i++) {
2071
2087
  const a = n[i].startsWith(":"), o = r[i].startsWith(":");
@@ -2073,17 +2089,17 @@ function pn(e, t) {
2073
2089
  }
2074
2090
  return n.length > r.length;
2075
2091
  }
2076
- function fn(e, t) {
2092
+ function mn(e, t) {
2077
2093
  if (typeof e != "string") return null;
2078
2094
  let n = null;
2079
2095
  for (const r of t)
2080
- cn(r.pattern).test(e) && (!n || pn(r.pattern, n.pattern)) && (n = r);
2081
- return n ? { ...n, params: { ...n.props, ...un(n.pattern, e) } } : null;
2096
+ un(r.pattern).test(e) && (!n || fn(r.pattern, n.pattern)) && (n = r);
2097
+ return n ? { ...n, params: { ...n.props, ...dn(n.pattern, e) } } : null;
2082
2098
  }
2083
- function aa(e, t) {
2084
- return fn(e, t) !== null;
2099
+ function ca(e, t) {
2100
+ return mn(e, t) !== null;
2085
2101
  }
2086
- const oa = "sync-source", sa = "sync-target", la = 20, mn = {
2102
+ const ua = "sync-source", da = "sync-target", pa = 20, gn = {
2087
2103
  afrikaans: [
2088
2104
  "[Muziek]",
2089
2105
  "(C) TV GELDERLAND 2021",
@@ -2233,14 +2249,14 @@ const oa = "sync-source", sa = "sync-target", la = 20, mn = {
2233
2249
  "[MÚSICA]",
2234
2250
  "[Music cuts in British]"
2235
2251
  ]
2236
- }, gn = (e) => {
2252
+ }, hn = (e) => {
2237
2253
  let t = e;
2238
- return Object.values(mn).forEach((n) => {
2254
+ return Object.values(gn).forEach((n) => {
2239
2255
  n.forEach((r) => {
2240
2256
  t = t.replaceAll(r, "");
2241
2257
  });
2242
2258
  }), t = t.replace(/\(.*?\)/g, ""), t = t.replace(/\[.*?\]/g, ""), t;
2243
- }, hn = 6e4, yn = 8e3, An = 2, bn = 0.4, En = 3, Sn = /* @__PURE__ */ new Set([
2259
+ }, yn = 6e4, An = 8e3, bn = 2, En = 0.4, Sn = 3, _n = /* @__PURE__ */ new Set([
2244
2260
  "aan",
2245
2261
  "als",
2246
2262
  "ben",
@@ -2353,13 +2369,13 @@ const oa = "sync-source", sa = "sync-target", la = 20, mn = {
2353
2369
  "you",
2354
2370
  "your"
2355
2371
  ]);
2356
- function _n(e) {
2372
+ function Tn(e) {
2357
2373
  const t = /* @__PURE__ */ new Set();
2358
2374
  for (const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))
2359
- n.length < En || Sn.has(n) || t.add(n);
2375
+ n.length < Sn || _n.has(n) || t.add(n);
2360
2376
  return [...t];
2361
2377
  }
2362
- function Tn(e, t) {
2378
+ function In(e, t) {
2363
2379
  if (!e.length) return 0;
2364
2380
  if (!t.length) return 1;
2365
2381
  const n = new Set(t), r = new Set(e);
@@ -2367,58 +2383,58 @@ function Tn(e, t) {
2367
2383
  for (const a of r) n.has(a) || (i += 1);
2368
2384
  return i / r.size;
2369
2385
  }
2370
- function In(e, t = hn) {
2386
+ function Mn(e, t = yn) {
2371
2387
  const n = e.filter((o) => !o.partial && typeof o.text == "string");
2372
2388
  if (!n.length) return { text: "", segmentCount: 0 };
2373
2389
  const i = n.reduce((o, s) => Math.max(o, s.endedAt ?? 0), 0) - t;
2374
- return { text: n.filter((o) => (o.endedAt ?? 0) >= i).map((o) => gn(o.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
2390
+ return { text: n.filter((o) => (o.endedAt ?? 0) >= i).map((o) => hn(o.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
2375
2391
  }
2376
- const Mn = 60;
2377
- function ca(e, t, n = Mn) {
2392
+ const Cn = 60;
2393
+ function fa(e, t, n = Cn) {
2378
2394
  const r = new Set(e), i = [...e];
2379
2395
  for (const a of t)
2380
2396
  !a || r.has(a) || (r.add(a), i.push(a));
2381
2397
  return i.slice(-n);
2382
2398
  }
2383
- function ua(e) {
2399
+ function ma(e) {
2384
2400
  const { segments: t, now: n, state: r } = e;
2385
- if (r.lastTriggerAt && n - r.lastTriggerAt < yn)
2401
+ if (r.lastTriggerAt && n - r.lastTriggerAt < An)
2386
2402
  return { trigger: !1, reason: "too_soon" };
2387
- const i = In(t, e.windowMs);
2403
+ const i = Mn(t, e.windowMs);
2388
2404
  if (!i.text) return { trigger: !1, reason: "no_speech" };
2389
2405
  const a = i.segmentCount - (r.lastSegmentCount ?? 0);
2390
- if (r.lastQueryTerms && a < An)
2406
+ if (r.lastQueryTerms && a < bn)
2391
2407
  return { trigger: !1, reason: "too_few_new" };
2392
- const o = _n(i.text);
2393
- return o.length ? r.lastQueryTerms?.length && Tn(o, r.lastQueryTerms) < bn ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: i.text, terms: o, segmentCount: i.segmentCount } : { trigger: !1, reason: "no_speech" };
2408
+ const o = Tn(i.text);
2409
+ return o.length ? r.lastQueryTerms?.length && In(o, r.lastQueryTerms) < En ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: i.text, terms: o, segmentCount: i.segmentCount } : { trigger: !1, reason: "no_speech" };
2394
2410
  }
2395
- const Me = 9e4, kn = ["out_of_office"], ke = (e) => kn.includes(e);
2396
- function da(e, t, n) {
2411
+ const Me = 9e4, kn = ["out_of_office"], Ce = (e) => kn.includes(e);
2412
+ function ga(e, t, n) {
2397
2413
  const r = n - e < Me, i = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
2398
2414
  if (!i?.status) return { online: r, status: r ? "available" : "offline" };
2399
2415
  const a = i.status;
2400
- return !r && !ke(a) ? { online: !1, status: "offline" } : { online: r, status: a, message: i.message };
2416
+ return !r && !Ce(a) ? { online: !1, status: "offline" } : { online: r, status: a, message: i.message };
2401
2417
  }
2402
- function pa(e, t) {
2403
- const n = t - e.lastSeenAt < Me, r = n || ke(e.status) ? e.status : "offline";
2418
+ function ha(e, t) {
2419
+ const n = t - e.lastSeenAt < Me, r = n || Ce(e.status) ? e.status : "offline";
2404
2420
  return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
2405
2421
  }
2406
- function fa(e, t) {
2422
+ function ya(e, t) {
2407
2423
  return e?.teamId && t.includes(e.teamId) ? { teamId: e.teamId, mustChoose: !1 } : t.length === 1 ? { teamId: t[0], mustChoose: !1 } : { teamId: void 0, mustChoose: t.length > 1 };
2408
2424
  }
2409
- function ma(e) {
2425
+ function Aa(e) {
2410
2426
  return e.providerAvailable && e.allowed;
2411
2427
  }
2412
- const ga = "installation-id";
2428
+ const ba = "installation-id";
2413
2429
  export {
2414
2430
  m as ACTIVITY_CATALOG,
2415
- Qt as AI_ATTACHMENT_LIMITS,
2416
- Di as AI_ATTACHMENT_MAX_PER_TURN,
2417
- Li as AI_ATTACHMENT_TURN_BUDGET,
2431
+ en as AI_ATTACHMENT_LIMITS,
2432
+ Pi as AI_ATTACHMENT_MAX_PER_TURN,
2433
+ Di as AI_ATTACHMENT_TURN_BUDGET,
2418
2434
  be as AI_VENDORS,
2419
2435
  Fe as ALLOWED_LINK_SCHEMES,
2420
2436
  B as ARTIFACT_MAX_BLOCKS,
2421
- Yn as ARTIFACT_MAX_BODY_BYTES,
2437
+ qn as ARTIFACT_MAX_BODY_BYTES,
2422
2438
  N as ARTIFACT_MAX_CELL_LEN,
2423
2439
  W as ARTIFACT_MAX_KPI_ITEMS,
2424
2440
  F as ARTIFACT_MAX_LIST_ITEMS,
@@ -2428,23 +2444,23 @@ export {
2428
2444
  Ze as ASSIGNMENT_SCOPE_KIND,
2429
2445
  Te as AUTH_APP_NAME,
2430
2446
  $e as ActivityTypeRegistry,
2431
- Gn as BUILT_IN_ONLY,
2432
- yn as CADENCE_FLOOR_MS,
2433
- An as CADENCE_MIN_NEW_SEGMENTS,
2434
- bn as CADENCE_MIN_NOVELTY,
2435
- hn as CADENCE_WINDOW_MS,
2436
- dr as CLASSIFY_VARS,
2437
- Hn as CORE_DIMENSIONS,
2438
- on as CommunicationScheme,
2439
- ai as DEFAULT_MEMORY_BUDGET,
2440
- $t as DEFAULT_PHONE_REGION,
2441
- Er as EMPTY_WORKFLOW,
2442
- Yi as FEATURE_FOLDER_MANAGEMENT,
2443
- qi as FEATURE_REMOTE_SEARCH,
2444
- ga as INSTALLATION_HEADER,
2445
- ot as INTERACTION_KIND,
2446
- zi as InteractionParticipantRole,
2447
- mt as KB_FALLBACK_LOCALE,
2447
+ Bn as BUILT_IN_ONLY,
2448
+ An as CADENCE_FLOOR_MS,
2449
+ bn as CADENCE_MIN_NEW_SEGMENTS,
2450
+ En as CADENCE_MIN_NOVELTY,
2451
+ yn as CADENCE_WINDOW_MS,
2452
+ pr as CLASSIFY_VARS,
2453
+ Wn as CORE_DIMENSIONS,
2454
+ sn as CommunicationScheme,
2455
+ oi as DEFAULT_MEMORY_BUDGET,
2456
+ Rt as DEFAULT_PHONE_REGION,
2457
+ Sr as EMPTY_WORKFLOW,
2458
+ Qi as FEATURE_FOLDER_MANAGEMENT,
2459
+ ea as FEATURE_REMOTE_SEARCH,
2460
+ ba as INSTALLATION_HEADER,
2461
+ st as INTERACTION_KIND,
2462
+ Ji as InteractionParticipantRole,
2463
+ gt as KB_FALLBACK_LOCALE,
2448
2464
  Z as KB_LOCALES,
2449
2465
  $ as LOOSE_STATUSES,
2450
2466
  M as MAX_ACTIONS,
@@ -2453,224 +2469,228 @@ export {
2453
2469
  ye as MAX_COLLECTION_DEPTH,
2454
2470
  T as MAX_FIELDS,
2455
2471
  I as MAX_LIST_ITEMS,
2456
- ti as MAX_MEMORY_BROWSE,
2457
- ii as MAX_MEMORY_BUDGET,
2458
- ni as MAX_MEMORY_CHARS,
2459
- Mn as MAX_SHOWN_KEYS,
2460
- yt as MAX_TOPIC_CANDIDATES,
2461
- ht as MAX_TOPIC_EXAMPLES,
2472
+ ni as MAX_MEMORY_BROWSE,
2473
+ ai as MAX_MEMORY_BUDGET,
2474
+ ri as MAX_MEMORY_CHARS,
2475
+ Cn as MAX_SHOWN_KEYS,
2476
+ At as MAX_TOPIC_CANDIDATES,
2477
+ yt as MAX_TOPIC_EXAMPLES,
2462
2478
  v as MAX_TOPIC_EXAMPLE_CHARS,
2463
- ri as MIN_MEMORY_BUDGET,
2479
+ ii as MIN_MEMORY_BUDGET,
2464
2480
  R as PHONE_REGIONS,
2465
2481
  Me as PRESENCE_ONLINE_WINDOW_MS,
2466
2482
  kn as PRESENCE_SURVIVES_OFFLINE,
2467
- Wi as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
2468
- Hi as PROVIDER_FEATURE_MESSAGE_WINDOW,
2469
- jt as PUBLIC_EMAIL_DOMAINS,
2483
+ qi as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
2484
+ Yi as PROVIDER_FEATURE_MESSAGE_WINDOW,
2485
+ Gt as PUBLIC_EMAIL_DOMAINS,
2470
2486
  q as READ_STEP_TYPES,
2471
- Tt as RELATED_SUBJECT_KINDS,
2487
+ It as RELATED_SUBJECT_KINDS,
2472
2488
  Se as RESERVED_STATUS_KEYS,
2473
- Zi as RESOURCE_DESCRIBE_SERVICE,
2474
- ea as RESOURCE_RESOLVE_SERVICE,
2475
- Qi as RESOURCE_SEARCH_SERVICE,
2476
- zr as SIGNATURE_INTENTS,
2477
- ct as STEP_MAX_TOKENS_MAX,
2478
- lt as STEP_MAX_TOKENS_MIN,
2479
- Yt as SUMMARY_MIN_LAST_CHARS,
2480
- Xt as SUMMARY_MIN_MESSAGES,
2481
- la as SYNC_RUN_MAX_ERRORS,
2482
- oa as SYNC_SOURCE_PROVIDER_GROUP,
2483
- sa as SYNC_TARGET_PROVIDER_GROUP,
2489
+ na as RESOURCE_DESCRIBE_SERVICE,
2490
+ ia as RESOURCE_RESOLVE_SERVICE,
2491
+ ra as RESOURCE_SEARCH_SERVICE,
2492
+ Xr as SIGNATURE_INTENTS,
2493
+ ut as STEP_MAX_TOKENS_MAX,
2494
+ ct as STEP_MAX_TOKENS_MIN,
2495
+ qt as SUMMARY_MIN_LAST_CHARS,
2496
+ Yt as SUMMARY_MIN_MESSAGES,
2497
+ pa as SYNC_RUN_MAX_ERRORS,
2498
+ ua as SYNC_SOURCE_PROVIDER_GROUP,
2499
+ da as SYNC_TARGET_PROVIDER_GROUP,
2484
2500
  Je as TERMINAL_ASSIGNMENT_STATUSES,
2485
- ut as TERMINAL_RUN_STATUSES,
2486
- ur as TRIGGER_VARS,
2487
- Ji as UNSUPPORTED,
2501
+ dt as TERMINAL_RUN_STATUSES,
2502
+ dr as TRIGGER_VARS,
2503
+ ta as UNSUPPORTED,
2488
2504
  Ue as USAGE_DIMENSIONS,
2489
2505
  je as USAGE_DIMENSION_IDS,
2490
2506
  kt as WORK_ITEM_SCOPE_KIND,
2491
- Ct as WORK_PROJECT_SCOPE_KIND,
2492
- Lr as acceptExampleCandidate,
2507
+ wt as WORK_PROJECT_SCOPE_KIND,
2508
+ Dr as acceptExampleCandidate,
2493
2509
  nt as actingIdentityKey,
2494
- fi as activeWorkTypes,
2495
- vn as activityIconOf,
2496
- jn as activityJoinUrl,
2510
+ mi as activeWorkTypes,
2511
+ xn as activityIconOf,
2512
+ Gn as activityJoinUrl,
2497
2513
  ve as activitySnippet,
2498
- Oe as activityTextParams,
2499
- Un as activityTimelineText,
2500
- Vn as activityTimestamp,
2514
+ xe as activityTextParams,
2515
+ jn as activityTimelineText,
2516
+ Hn as activityTimestamp,
2501
2517
  d as activityTypeInfo,
2502
- mr as actorKey,
2503
- Rr as addExampleCandidate,
2504
- pa as agePresenceEntry,
2505
- Zt as aiAttachmentKind,
2506
- Pi as aiAttachmentRejection,
2518
+ gr as actorKey,
2519
+ Lr as addExampleCandidate,
2520
+ ha as agePresenceEntry,
2521
+ Qt as aiAttachmentKind,
2522
+ Ki as aiAttachmentRejection,
2507
2523
  ee as aiBudgetLimit,
2508
- Fr as aiBudgetPeriodKey,
2509
- St as aiBudgetPeriodStart,
2510
- Br as aiBudgetState,
2511
- Gr as aiVendorAcceptsAttachment,
2512
- Kr as aiVendorDefaultModel,
2513
- Pr as aiVendorLabel,
2514
- jr as aiVendorNeedsBaseUrl,
2515
- Ur as aiVendorsWith,
2524
+ Vr as aiBudgetPeriodKey,
2525
+ _t as aiBudgetPeriodStart,
2526
+ Fr as aiBudgetState,
2527
+ Br as aiVendorAcceptsAttachment,
2528
+ Ur as aiVendorDefaultModel,
2529
+ Kr as aiVendorLabel,
2530
+ Gr as aiVendorNeedsBaseUrl,
2531
+ jr as aiVendorsWith,
2516
2532
  Ie as appNameFromPath,
2517
- li as applyRounding,
2518
- Xr as applySignature,
2519
- Jn as artifactBodyBytes,
2520
- Zn as artifactOutline,
2521
- Qn as artifactToMarkdown,
2522
- Ar as assignmentMismatch,
2523
- ir as assignmentScopeKey,
2524
- or as assignmentSubject,
2525
- Bn as buildActivityPreview,
2526
- ji as buildChannelIntents,
2527
- er as buildShareKeys,
2528
- In as buildWindow,
2533
+ ci as applyRounding,
2534
+ Yr as applySignature,
2535
+ Zn as artifactBodyBytes,
2536
+ Qn as artifactOutline,
2537
+ er as artifactToMarkdown,
2538
+ br as assignmentMismatch,
2539
+ ar as assignmentScopeKey,
2540
+ sr as assignmentSubject,
2541
+ Fn as buildActivityPreview,
2542
+ Vi as buildChannelIntents,
2543
+ tr as buildShareKeys,
2544
+ Mn as buildWindow,
2529
2545
  Or as canNestUnder,
2530
- Rn as carriesText,
2531
- $r as categoryLabel,
2532
- vt as categoryOf,
2533
- Vi as channelKindForScheme,
2546
+ Ln as carriesText,
2547
+ Rr as categoryLabel,
2548
+ xt as categoryOf,
2549
+ Xi as channelKindForScheme,
2534
2550
  On as channelKindOf,
2535
- br as clampStepMaxTokens,
2536
- xi as cleanMessageText,
2537
- Mt as compareWorkTypes,
2538
- sr as decideAssignmentState,
2539
- ua as decideCadence,
2540
- gt as defaultLocaleOf,
2541
- Si as defaultStatusKey,
2542
- Xi as defineIntent,
2543
- pt as depthOf,
2544
- da as derivePresence,
2545
- Ui as disabledIntentsFromCapabilities,
2546
- si as elapsedSeconds,
2547
- Ci as emailDomain,
2548
- vi as endpointKey,
2549
- un as extractParams,
2550
- _n as extractTerms,
2551
- Bi as filterByEndpoint,
2552
- Gi as filterByIntent,
2553
- an as filterByTargetScheme,
2551
+ Er as clampStepMaxTokens,
2552
+ $i as cleanMessageText,
2553
+ Ct as compareWorkTypes,
2554
+ lr as decideAssignmentState,
2555
+ ma as decideCadence,
2556
+ Bi as decideIncomingCall,
2557
+ ht as defaultLocaleOf,
2558
+ _i as defaultStatusKey,
2559
+ Zi as defineIntent,
2560
+ ft as depthOf,
2561
+ ga as derivePresence,
2562
+ Fi as disabledIntentsFromCapabilities,
2563
+ li as elapsedSeconds,
2564
+ wi as emailDomain,
2565
+ xi as endpointKey,
2566
+ dn as extractParams,
2567
+ Tn as extractTerms,
2568
+ Wi as filterByEndpoint,
2569
+ Hi as filterByIntent,
2570
+ on as filterByTargetScheme,
2554
2571
  S as findAiVendor,
2555
- Wn as flattenLocales,
2572
+ zn as flattenLocales,
2556
2573
  De as floorToPeriod,
2557
2574
  tt as formatActingIdentity,
2558
- ui as formatClock,
2559
- ci as formatHm,
2560
- gi as formatItemKey,
2575
+ di as formatClock,
2576
+ ui as formatHm,
2577
+ hi as formatItemKey,
2561
2578
  Le as formatPeriod,
2562
- Ki as freshSources,
2563
- Fn as getActivitySeenUserIds,
2564
- Yr as getContactEndpoints,
2565
- Qr as getShortTitle,
2566
- Zr as getUrgencyScore,
2579
+ Ui as freshSources,
2580
+ Vn as getActivitySeenUserIds,
2581
+ qr as getContactEndpoints,
2582
+ ei as getShortTitle,
2583
+ Qr as getUrgencyScore,
2567
2584
  Ae as heightOf,
2568
- wr as helpCenterText,
2569
- cr as humanizeAction,
2570
- st as interactionIdOf,
2571
- mi as isAgentUser,
2572
- qr as isAssigned,
2573
- rr as isAssignmentTerminal,
2574
- it as isAssignmentTrigger,
2575
- wn as isChatMessageActivity,
2576
- Jr as isClosed,
2577
- Pn as isConnectedType,
2578
- na as isDeepLink,
2579
- ft as isDescendant,
2580
- Cn as isEmailActivity,
2581
- Ir as isInFlight,
2582
- ei as isInteractionUnseen,
2583
- ra as isLandingPath,
2584
- $i as isLikelyBulk,
2585
+ Nr as helpCenterText,
2586
+ ur as humanizeAction,
2587
+ lt as interactionIdOf,
2588
+ gi as isAgentUser,
2589
+ Jr as isAssigned,
2590
+ ir as isAssignmentTerminal,
2591
+ at as isAssignmentTrigger,
2592
+ Nn as isChatMessageActivity,
2593
+ Zr as isClosed,
2594
+ Kn as isConnectedType,
2595
+ oa as isDeepLink,
2596
+ mt as isDescendant,
2597
+ wn as isEmailActivity,
2598
+ Mr as isInFlight,
2599
+ ti as isInteractionUnseen,
2600
+ sa as isLandingPath,
2601
+ Ri as isLikelyBulk,
2585
2602
  ce as isMessageShape,
2586
- xn as isMessageType,
2587
- pn as isMoreSpecificPattern,
2588
- dt as isPaused,
2589
- Dn as isPlaybookAuthoredType,
2590
- wi as isPublicEmailDomain,
2591
- aa as isPublicPath,
2592
- $n as isReplyableType,
2593
- Tr as isTerminal,
2594
- Ri as isThreadLongEnough,
2595
- Kn as isTranscriptType,
2596
- _i as isWorkClosed,
2597
- pi as isWorkTypeVisible,
2598
- Ai as itemDossierKeys,
2599
- Nt as ladderFor,
2600
- Cr as linkLabel,
2601
- Vr as listeningAllowed,
2602
- vr as localeInstruction,
2603
- Nr as localeName,
2604
- xr as localesOf,
2605
- Mi as looksLikeEmail,
2606
- Fi as matchContactToIntents,
2607
- fn as matchPublicRoute,
2608
- Hr as mcpCredentialScope,
2609
- Wr as mcpToolPrefix,
2610
- ca as mergeShownKeys,
2611
- Ln as messageCountsAs,
2612
- Ni as needsPhoneRegion,
2613
- qn as normalizeArtifactBlocks,
2614
- Nn as normalizeBlocks,
2603
+ $n as isMessageType,
2604
+ fn as isMoreSpecificPattern,
2605
+ pt as isPaused,
2606
+ Pn as isPlaybookAuthoredType,
2607
+ Ni as isPublicEmailDomain,
2608
+ ca as isPublicPath,
2609
+ Rn as isReplyableType,
2610
+ Ir as isTerminal,
2611
+ Li as isThreadLongEnough,
2612
+ Un as isTranscriptType,
2613
+ Ti as isWorkClosed,
2614
+ fi as isWorkTypeVisible,
2615
+ bi as itemDossierKeys,
2616
+ vt as ladderFor,
2617
+ wr as linkLabel,
2618
+ Hr as listeningAllowed,
2619
+ xr as localeInstruction,
2620
+ vr as localeName,
2621
+ $r as localesOf,
2622
+ Ci as looksLikeEmail,
2623
+ zi as matchContactToIntents,
2624
+ mn as matchPublicRoute,
2625
+ Wr as mcpCredentialScope,
2626
+ zr as mcpToolPrefix,
2627
+ fa as mergeShownKeys,
2628
+ Dn as messageCountsAs,
2629
+ vi as needsPhoneRegion,
2630
+ Jn as normalizeArtifactBlocks,
2631
+ vn as normalizeBlocks,
2615
2632
  _e as normalizeEmail,
2616
2633
  g as normalizeExample,
2617
- Tn as novelty,
2618
- pr as parseActingIdentity,
2619
- hi as parseItemKey,
2620
- cn as pathToRegex,
2621
- zn as periodsInRange,
2634
+ In as novelty,
2635
+ fr as parseActingIdentity,
2636
+ yi as parseItemKey,
2637
+ un as pathToRegex,
2638
+ Xn as periodsInRange,
2622
2639
  ki as phoneSuffix,
2623
2640
  Oi as plainTextFromMarkdown,
2624
- rt as playbookActor,
2625
- _r as procedureOf,
2626
- bi as projectDossierKeys,
2627
- dn as publicBasePathFor,
2628
- ia as publicRoutePatterns,
2629
- O as readPath,
2641
+ it as playbookActor,
2642
+ Tr as procedureOf,
2643
+ Ei as projectDossierKeys,
2644
+ pn as publicBasePathFor,
2645
+ la as publicRoutePatterns,
2646
+ x as readPath,
2630
2647
  J as readStepError,
2631
- at as refKey,
2632
- Ut as registrableDomain,
2633
- bt as rejectExampleCandidate,
2634
- oi as relatedByDefault,
2635
- nn as resolveAccountCapabilities,
2636
- x as resolveActivityText,
2637
- tn as resolveChannelIntents,
2638
- _t as resolveSignature,
2639
- fa as resolveWorkMode,
2640
- ta as resourceKindOf,
2641
- fr as runActor,
2648
+ ot as refKey,
2649
+ jt as registrableDomain,
2650
+ Et as rejectExampleCandidate,
2651
+ si as relatedByDefault,
2652
+ rn as resolveAccountCapabilities,
2653
+ O as resolveActivityText,
2654
+ nn as resolveChannelIntents,
2655
+ Tt as resolveSignature,
2656
+ ya as resolveWorkMode,
2657
+ aa as resourceKindOf,
2658
+ mr as runActor,
2642
2659
  kr as runInteractionId,
2643
2660
  ze as sanitizeInline,
2644
- gn as sanitizeTranscript,
2645
- lr as selectLenses,
2661
+ hn as sanitizeTranscript,
2662
+ cr as selectLenses,
2663
+ Gi as sessionsHoldCannotReach,
2664
+ ji as sessionsToHold,
2646
2665
  me as shareKeyForTeam,
2647
2666
  fe as shareKeyForUser,
2648
- tr as shareKeysForViewer,
2649
- ma as shouldRunAudioPipeline,
2667
+ nr as shareKeysForViewer,
2668
+ Aa as shouldRunAudioPipeline,
2650
2669
  Ot as sortStatuses,
2651
- en as sourceKey,
2652
- Ei as statusIn,
2653
- Sr as stepsOf,
2670
+ tn as sourceKey,
2671
+ Si as statusIn,
2672
+ _r as stepsOf,
2654
2673
  Ne as stripHtml,
2655
- Mr as subjectKeyOf,
2674
+ Cr as subjectKeyOf,
2656
2675
  ge as subjectOf,
2657
- yi as suggestProjectKey,
2658
- yr as targetById,
2659
- hr as targetForActivityType,
2676
+ Ai as suggestProjectKey,
2677
+ Ar as targetById,
2678
+ yr as targetForActivityType,
2679
+ rt as toActingIdentity,
2660
2680
  re as toE164,
2661
- nr as toolSourceKinds,
2662
- Et as topicOfferedForTeam,
2663
- Dr as topicsForTeam,
2664
- At as truncateExample,
2665
- Ti as uniqueWorkStatusKey,
2666
- di as uniqueWorkTypeKey,
2681
+ rr as toolSourceKinds,
2682
+ St as topicOfferedForTeam,
2683
+ Pr as topicsForTeam,
2684
+ bt as truncateExample,
2685
+ Ii as uniqueWorkStatusKey,
2686
+ pi as uniqueWorkTypeKey,
2667
2687
  Ge as usageMetricId,
2668
- Xn as usageMetrics,
2669
- Ii as validateStatuses,
2670
- gr as valueAtPath,
2671
- ar as wakesAssignment,
2672
- wt as workItemScopeKey,
2688
+ Yn as usageMetrics,
2689
+ Mi as validateStatuses,
2690
+ hr as valueAtPath,
2691
+ or as wakesAssignment,
2692
+ Nt as workItemScopeKey,
2673
2693
  Ee as workProjectScopeKey,
2674
- xt as workStatusKey,
2675
- It as workTypeKey
2694
+ $t as workStatusKey,
2695
+ Mt as workTypeKey
2676
2696
  };