@opencxh/domain 1.210.0 → 1.214.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 fr = 10, mr = 10, gr = 10, hr = 5, xe = /* @__PURE__ */ new Set([
1
+ const Er = 10, Sr = 10, _r = 10, Tr = 5, Le = /* @__PURE__ */ new Set([
2
2
  "header",
3
3
  "section",
4
4
  "context",
@@ -14,7 +14,7 @@ function w(e) {
14
14
  const t = e;
15
15
  return typeof t.key == "string" || typeof t.value == "string";
16
16
  }
17
- function yr(e, t = () => {
17
+ function Ir(e, t = () => {
18
18
  }) {
19
19
  if (!Array.isArray(e)) return [];
20
20
  const n = [];
@@ -25,7 +25,7 @@ function yr(e, t = () => {
25
25
  }
26
26
  if (!r || typeof r != "object") continue;
27
27
  const i = r;
28
- if (!xe.has(i.type)) {
28
+ if (!Le.has(i.type)) {
29
29
  t(`unknown block type ${String(i.type)}`);
30
30
  continue;
31
31
  }
@@ -69,17 +69,17 @@ function yr(e, t = () => {
69
69
  }
70
70
  return n;
71
71
  }
72
- const Le = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, De = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
73
- function Pe(e) {
72
+ const De = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, Pe = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
73
+ function Ue(e) {
74
74
  if (typeof e != "string" || !e) return "";
75
75
  let t = e;
76
76
  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(`
77
77
  `).map(
78
78
  (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,}$/, "")
79
79
  ).join(`
80
- `), t = t.replace(Le, "$2"), t = t.replace(De, "$2"), t = t.replace(/~~(?=\S)([\s\S]*?\S)~~/g, "$1"), t = t.replace(/`([^`\n]+)`/g, "$1"), t.replace(/\s+/g, " ").trim();
80
+ `), t = t.replace(De, "$2"), t = t.replace(Pe, "$2"), t = t.replace(/~~(?=\S)([\s\S]*?\S)~~/g, "$1"), t = t.replace(/`([^`\n]+)`/g, "$1"), t.replace(/\s+/g, " ").trim();
81
81
  }
82
- function Ue(e) {
82
+ function Ke(e) {
83
83
  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();
84
84
  }
85
85
  function b(e) {
@@ -449,53 +449,53 @@ const m = {
449
449
  }
450
450
  };
451
451
  function K(e) {
452
- const t = e.payload, n = Pe(t.bodyText).trim() || t.bodySnippet?.trim() || Ue(t.body ?? "");
452
+ const t = e.payload, n = Ue(t.bodyText).trim() || t.bodySnippet?.trim() || Ke(t.body ?? "");
453
453
  return t.subject ? `${t.subject} — ${n}` : n;
454
454
  }
455
- function d(e) {
455
+ function p(e) {
456
456
  return m[e];
457
457
  }
458
- function Ar(e) {
459
- return d(e)?.icon ?? "circle";
458
+ function wr(e) {
459
+ return p(e)?.icon ?? "circle";
460
460
  }
461
- function br(e) {
462
- return d(e)?.channelKind;
461
+ function Mr(e) {
462
+ return p(e)?.channelKind;
463
463
  }
464
464
  function pe(e) {
465
465
  return e === "message" || e === "note";
466
466
  }
467
- function Er(e) {
468
- return pe(d(e)?.shape);
467
+ function kr(e) {
468
+ return pe(p(e)?.shape);
469
469
  }
470
- function Sr(e) {
471
- return d(e)?.replyable === !0;
470
+ function Cr(e) {
471
+ return p(e)?.replyable === !0;
472
472
  }
473
- function _r(e) {
474
- return d(e)?.carriesText === !0;
473
+ function Or(e) {
474
+ return p(e)?.carriesText === !0;
475
475
  }
476
- function Ke(e) {
477
- return d(e)?.countsAs;
476
+ function Ge(e) {
477
+ return p(e)?.countsAs;
478
478
  }
479
- function Tr(e) {
480
- return d(e)?.playbookAuthored === !0;
479
+ function Nr(e) {
480
+ return p(e)?.playbookAuthored === !0;
481
481
  }
482
- function Ir(e) {
483
- return d(e)?.connected === !0;
482
+ function vr(e) {
483
+ return p(e)?.connected === !0;
484
484
  }
485
- function wr(e) {
486
- const t = d(e);
485
+ function Rr(e) {
486
+ const t = p(e);
487
487
  return t?.shape === "artifact" && t?.carriesText === !0;
488
488
  }
489
489
  function je(e) {
490
- const t = d(e.type)?.snippet;
490
+ const t = p(e.type)?.snippet;
491
491
  return t ? t(e) : "";
492
492
  }
493
- function Mr(e, t) {
494
- const n = d(e.type)?.timeline;
493
+ function $r(e, t) {
494
+ const n = p(e.type)?.timeline;
495
495
  return n ? n(e, t) : e.type.replace(/_/g, " ").toLowerCase();
496
496
  }
497
- function kr(e) {
498
- const t = d(e.type)?.joinUrl;
497
+ function xr(e) {
498
+ const t = p(e.type)?.joinUrl;
499
499
  return t ? t(e) : void 0;
500
500
  }
501
501
  function R(e, t) {
@@ -517,32 +517,32 @@ function $(e, t, n) {
517
517
  const i = n(e.key, r);
518
518
  return i === e.key ? null : i;
519
519
  }
520
- function Ge(e, t) {
520
+ function Be(e, t) {
521
521
  if (!e || typeof e == "string" || "value" in e) return null;
522
522
  const n = {};
523
523
  for (const [r, i] of Object.entries(e.params ?? {}))
524
524
  n[r] = R(t, i);
525
525
  return { key: e.key, params: n };
526
526
  }
527
- const j = 140;
528
- function Be(e) {
527
+ const G = 140;
528
+ function He(e) {
529
529
  const t = e.trim();
530
- return t.length <= j ? t : `${t.slice(0, j - 1).trimEnd()}…`;
530
+ return t.length <= G ? t : `${t.slice(0, G - 1).trimEnd()}…`;
531
531
  }
532
- function Cr(e, t) {
533
- const n = Ge(t?.text, e), r = t ? $(t.text, e, (i) => i) : null;
532
+ function Lr(e, t) {
533
+ const n = Be(t?.text, e), r = t ? $(t.text, e, (i) => i) : null;
534
534
  return {
535
535
  activityId: e.id,
536
536
  type: e.type,
537
- snippet: Be(r ?? je(e)),
537
+ snippet: He(r ?? je(e)),
538
538
  authorName: e.author?.name ?? "",
539
539
  direction: e.direction,
540
540
  createdAt: e.createdAt ?? Date.now(),
541
541
  ...n ? { snippetKey: n.key, snippetParams: n.params } : {}
542
542
  };
543
543
  }
544
- const He = (e) => e;
545
- function G(e) {
544
+ const Fe = (e) => e;
545
+ function j(e) {
546
546
  const t = m[e];
547
547
  return {
548
548
  type: e,
@@ -573,21 +573,21 @@ function B(e) {
573
573
  displayNameKey: e.displayNameKey
574
574
  };
575
575
  }
576
- class Fe {
577
- constructor(t = [], n = He) {
576
+ class Ve {
577
+ constructor(t = [], n = Fe) {
578
578
  this.translate = n;
579
579
  for (const r of t)
580
580
  r?.type && (r.type in m || this.declared.has(r.type) || this.declared.set(r.type, r));
581
581
  }
582
582
  declared = /* @__PURE__ */ new Map();
583
583
  get(t) {
584
- if (t in m) return G(t);
584
+ if (t in m) return j(t);
585
585
  const n = this.declared.get(t);
586
586
  return n ? B(n) : void 0;
587
587
  }
588
588
  /** Everything that may be offered as a trigger, built-in and declared. */
589
589
  triggerable() {
590
- const t = Object.keys(m).filter((r) => m[r].triggerable).map(G), n = [...this.declared.values()].map(B).filter((r) => r.triggerable);
590
+ const t = Object.keys(m).filter((r) => m[r].triggerable).map(j), n = [...this.declared.values()].map(B).filter((r) => r.triggerable);
591
591
  return [...t, ...n];
592
592
  }
593
593
  /**
@@ -659,8 +659,8 @@ class Fe {
659
659
  return this.translate;
660
660
  }
661
661
  }
662
- const Or = new Fe();
663
- function vr(e, t, n = []) {
662
+ const Dr = new Ve();
663
+ function Pr(e, t, n = []) {
664
664
  const r = e.createdAt;
665
665
  if (!r) return [];
666
666
  const i = new Set(n);
@@ -669,10 +669,10 @@ function vr(e, t, n = []) {
669
669
  function We(e) {
670
670
  return e.createdAt ?? 0;
671
671
  }
672
- function Nr(e) {
672
+ function Ur(e) {
673
673
  return e.type === "EMAIL_RECEIVED" || e.type === "EMAIL_SENT";
674
674
  }
675
- function Rr(e) {
675
+ function Kr(e) {
676
676
  return e.type === "CHAT_MESSAGE_SENT" || e.type === "CHAT_MESSAGE_RECEIVED";
677
677
  }
678
678
  const fe = [
@@ -768,23 +768,23 @@ const fe = [
768
768
  function T(e) {
769
769
  return fe.find((t) => t.id === e);
770
770
  }
771
- function $r(e) {
771
+ function Gr(e) {
772
772
  return T(e)?.label ?? e;
773
773
  }
774
- function xr(e, t = "gpt-5-mini") {
774
+ function jr(e, t = "gpt-5-mini") {
775
775
  return T(e)?.defaultModel ?? t;
776
776
  }
777
- function Lr(e) {
777
+ function Br(e) {
778
778
  return fe.filter((t) => t.capabilities.includes(e));
779
779
  }
780
- function Dr(e) {
780
+ function Hr(e) {
781
781
  const t = T(e);
782
782
  return !!t && !t.baseUrl;
783
783
  }
784
- function Pr(e, t) {
784
+ function Fr(e, t) {
785
785
  return t === "text" ? !0 : T(e)?.attachmentKinds?.includes(t) === !0;
786
786
  }
787
- function Ur(e, t) {
787
+ function Vr(e, t) {
788
788
  if (!e.enabled) return "ok";
789
789
  const n = H(e.hardLimitNanos), r = H(e.softLimitNanos);
790
790
  return n !== void 0 && t >= n ? "hard" : r !== void 0 && t >= r ? "soft" : "ok";
@@ -792,18 +792,18 @@ function Ur(e, t) {
792
792
  function H(e) {
793
793
  return typeof e == "number" ? e : void 0;
794
794
  }
795
- function Ve(e, t = "month") {
795
+ function ze(e, t = "month") {
796
796
  const n = new Date(e);
797
797
  return Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), 1);
798
798
  }
799
- function Kr(e, t = "month") {
800
- const n = new Date(Ve(e, t));
799
+ function Wr(e, t = "month") {
800
+ const n = new Date(ze(e, t));
801
801
  return `${n.getUTCFullYear()}-${String(n.getUTCMonth() + 1).padStart(2, "0")}`;
802
802
  }
803
- function jr(e) {
803
+ function zr(e) {
804
804
  return e?.listeningEnabled !== !1;
805
805
  }
806
- const Gr = [
806
+ const Xr = [
807
807
  { id: "agent", label: "Agent", labelSource: "user" },
808
808
  { id: "team", label: "Team", labelSource: "team" },
809
809
  { id: "inbox", label: "Inbox", labelSource: "inbox" },
@@ -816,44 +816,44 @@ const Gr = [
816
816
  function k(e) {
817
817
  return e < 10 ? `0${e}` : `${e}`;
818
818
  }
819
- function ze(e, t) {
819
+ function Xe(e, t) {
820
820
  const n = new Date(e), r = `${n.getUTCFullYear()}-${k(n.getUTCMonth() + 1)}-${k(n.getUTCDate())}`;
821
821
  return t === "day" ? r : `${r}T${k(n.getUTCHours())}`;
822
822
  }
823
- function Xe(e, t) {
823
+ function Ye(e, t) {
824
824
  const n = new Date(e);
825
825
  return n.setUTCMinutes(0, 0, 0), t === "day" && n.setUTCHours(0), n.getTime();
826
826
  }
827
- const Ye = 36e5, qe = 864e5;
828
- function Br(e, t, n) {
829
- const r = n === "hour" ? Ye : qe, i = [];
830
- for (let o = Xe(e, n); o <= t; o += r)
831
- i.push(ze(o, n));
827
+ const qe = 36e5, Je = 864e5;
828
+ function Yr(e, t, n) {
829
+ const r = n === "hour" ? qe : Je, i = [];
830
+ for (let o = Ye(e, n); o <= t; o += r)
831
+ i.push(Xe(o, n));
832
832
  return i;
833
833
  }
834
- const Je = [
834
+ const Ze = [
835
835
  { id: "resource", label: "Resource", labelSource: "raw" },
836
836
  { id: "origin", label: "Herkomst", labelSource: "raw" }
837
- ], Ze = Je.map((e) => e.id);
838
- function Qe(e, t) {
837
+ ], Qe = Ze.map((e) => e.id);
838
+ function et(e, t) {
839
839
  return `${e}.usage.${t}`;
840
840
  }
841
- function Hr(e, t) {
841
+ function qr(e, t) {
842
842
  return t.map((n) => ({
843
- id: Qe(e, n.unit),
843
+ id: et(e, n.unit),
844
844
  label: n.label,
845
845
  category: "Verbruik",
846
846
  valueType: n.valueType ?? "count",
847
847
  aggregation: "sum",
848
848
  supportedDimensions: [
849
849
  "provider",
850
- ...Ze,
850
+ ...Qe,
851
851
  ...n.extraDimensions ?? [],
852
852
  "time"
853
853
  ]
854
854
  }));
855
855
  }
856
- const me = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), F = 200, W = 100, V = 200, z = 12, X = 4, ge = 4e3, C = 500, Fr = 256 * 1024, et = /* @__PURE__ */ new Set([
856
+ const me = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), F = 200, V = 100, W = 200, z = 12, X = 4, ge = 4e3, C = 500, Jr = 256 * 1024, tt = /* @__PURE__ */ new Set([
857
857
  "heading",
858
858
  "paragraph",
859
859
  "list",
@@ -863,15 +863,15 @@ const me = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]
863
863
  "table",
864
864
  "kpi",
865
865
  "callout"
866
- ]), tt = ["http:", "https:", "mailto:", "tel:"], nt = /^[a-z][a-z0-9+.-]*:/i;
866
+ ]), nt = ["http:", "https:", "mailto:", "tel:"], rt = /^[a-z][a-z0-9+.-]*:/i;
867
867
  function he(e) {
868
868
  const t = e.trim().replace(/^<|>$/g, "");
869
869
  if (!t) return !1;
870
- const n = nt.exec(t)?.[0];
871
- return n ? tt.includes(n.toLowerCase()) : !t.startsWith("//");
870
+ const n = rt.exec(t)?.[0];
871
+ return n ? nt.includes(n.toLowerCase()) : !t.startsWith("//");
872
872
  }
873
- const rt = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
874
- function it(e) {
873
+ const it = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
874
+ function ot(e) {
875
875
  let t = "", n = 0;
876
876
  for (; n < e.length; ) {
877
877
  const r = e[n] === "!" && e[n + 1] === "[";
@@ -907,22 +907,22 @@ function Y(e, t, n, r) {
907
907
  }
908
908
  return -1;
909
909
  }
910
- function ot(e) {
911
- return it(e).replace(
912
- rt,
910
+ function at(e) {
911
+ return ot(e).replace(
912
+ it,
913
913
  (t, n, r) => he(r) ? t : ""
914
914
  );
915
915
  }
916
- function u(e, t = ge) {
917
- return typeof e == "string" ? ot(e).slice(0, t) : "";
916
+ function d(e, t = ge) {
917
+ return typeof e == "string" ? at(e).slice(0, t) : "";
918
918
  }
919
- function at(e, t = ge) {
919
+ function st(e, t = ge) {
920
920
  return typeof e == "string" ? e.slice(0, t) : "";
921
921
  }
922
- function st(e, t = "info") {
922
+ function ct(e, t = "info") {
923
923
  return typeof e == "string" && me.has(e) ? e : t;
924
924
  }
925
- function Wr(e, t = () => {
925
+ function Zr(e, t = () => {
926
926
  }) {
927
927
  if (!Array.isArray(e)) return [];
928
928
  const n = [];
@@ -933,14 +933,14 @@ function Wr(e, t = () => {
933
933
  }
934
934
  if (!r || typeof r != "object") continue;
935
935
  const i = r;
936
- if (!et.has(i.type)) {
936
+ if (!tt.has(i.type)) {
937
937
  t(`unknown block type ${String(i.type)}`);
938
938
  continue;
939
939
  }
940
940
  const o = typeof i.block_id == "string" ? { block_id: i.block_id } : {};
941
941
  switch (i.type) {
942
942
  case "heading": {
943
- const a = u(i.text);
943
+ const a = d(i.text);
944
944
  if (!a) {
945
945
  t("a heading without text");
946
946
  continue;
@@ -950,7 +950,7 @@ function Wr(e, t = () => {
950
950
  break;
951
951
  }
952
952
  case "paragraph": {
953
- const a = u(i.text);
953
+ const a = d(i.text);
954
954
  if (!a) {
955
955
  t("a paragraph without text");
956
956
  continue;
@@ -959,7 +959,7 @@ function Wr(e, t = () => {
959
959
  break;
960
960
  }
961
961
  case "quote": {
962
- const a = u(i.text);
962
+ const a = d(i.text);
963
963
  if (!a) {
964
964
  t("a quote without text");
965
965
  continue;
@@ -968,7 +968,7 @@ function Wr(e, t = () => {
968
968
  break;
969
969
  }
970
970
  case "code": {
971
- const a = at(i.text);
971
+ const a = st(i.text);
972
972
  if (!a) {
973
973
  t("a code block without text");
974
974
  continue;
@@ -982,15 +982,15 @@ function Wr(e, t = () => {
982
982
  break;
983
983
  case "list": {
984
984
  const a = Array.isArray(i.items) ? i.items : [], s = [];
985
- for (const p of a) {
986
- if (s.length >= W) {
987
- t(`more than ${W} list items`);
985
+ for (const l of a) {
986
+ if (s.length >= V) {
987
+ t(`more than ${V} list items`);
988
988
  break;
989
989
  }
990
- const f = u(p?.text);
990
+ const f = d(l?.text);
991
991
  if (!f) continue;
992
- const l = u(p?.lead, 200);
993
- s.push(l ? { lead: l, text: f } : { text: f });
992
+ const u = d(l?.lead, 200);
993
+ s.push(u ? { lead: u, text: f } : { text: f });
994
994
  }
995
995
  if (s.length === 0) {
996
996
  t("a list without usable items");
@@ -1002,33 +1002,33 @@ function Wr(e, t = () => {
1002
1002
  }
1003
1003
  case "table": {
1004
1004
  const a = Array.isArray(i.columns) ? i.columns : [], s = [];
1005
- for (const l of a) {
1005
+ for (const u of a) {
1006
1006
  if (s.length >= z) {
1007
1007
  t(`more than ${z} table columns`);
1008
1008
  break;
1009
1009
  }
1010
- const A = u(l?.label, C), I = l?.align === "right" ? "right" : void 0;
1010
+ const A = d(u?.label, C), I = u?.align === "right" ? "right" : void 0;
1011
1011
  s.push(I ? { label: A, align: I } : { label: A });
1012
1012
  }
1013
1013
  if (s.length === 0) {
1014
1014
  t("a table without columns");
1015
1015
  continue;
1016
1016
  }
1017
- const c = Array.isArray(i.rows) ? i.rows : [], p = [];
1018
- for (const l of c) {
1019
- if (p.length >= V) {
1020
- t(`more than ${V} table rows`);
1017
+ const c = Array.isArray(i.rows) ? i.rows : [], l = [];
1018
+ for (const u of c) {
1019
+ if (l.length >= W) {
1020
+ t(`more than ${W} table rows`);
1021
1021
  break;
1022
1022
  }
1023
- const A = Array.isArray(l) ? l : [];
1024
- p.push(s.map((I, $e) => u(A[$e], C)));
1023
+ const A = Array.isArray(u) ? u : [];
1024
+ l.push(s.map((I, xe) => d(A[xe], C)));
1025
1025
  }
1026
- const f = u(i.caption, C);
1026
+ const f = d(i.caption, C);
1027
1027
  n.push({
1028
1028
  ...o,
1029
1029
  type: "table",
1030
1030
  columns: s,
1031
- rows: p,
1031
+ rows: l,
1032
1032
  ...f ? { caption: f } : {}
1033
1033
  });
1034
1034
  break;
@@ -1040,11 +1040,11 @@ function Wr(e, t = () => {
1040
1040
  t(`more than ${X} kpi items`);
1041
1041
  break;
1042
1042
  }
1043
- const p = u(c?.value, 40), f = u(c?.label, 80);
1044
- if (!p || !f) continue;
1045
- const l = c?.tone;
1043
+ const l = d(c?.value, 40), f = d(c?.label, 80);
1044
+ if (!l || !f) continue;
1045
+ const u = c?.tone;
1046
1046
  s.push(
1047
- typeof l == "string" && me.has(l) ? { value: p, label: f, tone: l } : { value: p, label: f }
1047
+ typeof u == "string" && me.has(u) ? { value: l, label: f, tone: u } : { value: l, label: f }
1048
1048
  );
1049
1049
  }
1050
1050
  if (s.length === 0) {
@@ -1055,16 +1055,16 @@ function Wr(e, t = () => {
1055
1055
  break;
1056
1056
  }
1057
1057
  case "callout": {
1058
- const a = u(i.text);
1058
+ const a = d(i.text);
1059
1059
  if (!a) {
1060
1060
  t("a callout without text");
1061
1061
  continue;
1062
1062
  }
1063
- const s = u(i.title, 200);
1063
+ const s = d(i.title, 200);
1064
1064
  n.push({
1065
1065
  ...o,
1066
1066
  type: "callout",
1067
- tone: st(i.tone),
1067
+ tone: ct(i.tone),
1068
1068
  ...s ? { title: s } : {},
1069
1069
  text: a
1070
1070
  });
@@ -1074,10 +1074,10 @@ function Wr(e, t = () => {
1074
1074
  }
1075
1075
  return n;
1076
1076
  }
1077
- function Vr(e) {
1077
+ function Qr(e) {
1078
1078
  return JSON.stringify(e).length;
1079
1079
  }
1080
- function zr(e) {
1080
+ function ei(e) {
1081
1081
  return {
1082
1082
  blocks: e.length,
1083
1083
  types: e.map((t) => t.type),
@@ -1095,7 +1095,7 @@ function J(e, t, n) {
1095
1095
  ...t.map((i) => `| ${i.map(q).join(" | ")} |`)
1096
1096
  ];
1097
1097
  }
1098
- function ct(e) {
1098
+ function lt(e) {
1099
1099
  switch (e.type) {
1100
1100
  case "heading":
1101
1101
  return [`${"#".repeat(e.level)} ${e.text}`];
@@ -1129,11 +1129,11 @@ function ct(e) {
1129
1129
  return (e.title ? `**${e.title}** ${e.text}` : e.text).split(/\r?\n/).map((n) => `> ${n}`);
1130
1130
  }
1131
1131
  }
1132
- function Xr(e, t) {
1132
+ function ti(e, t) {
1133
1133
  const n = [], r = e.some((i) => i.type === "heading" && i.level === 1);
1134
1134
  t && !r && n.push(`# ${t}`);
1135
1135
  for (const i of e) {
1136
- const o = ct(i);
1136
+ const o = lt(i);
1137
1137
  o.length > 0 && n.push(o.join(`
1138
1138
  `));
1139
1139
  }
@@ -1143,40 +1143,40 @@ function Xr(e, t) {
1143
1143
  `;
1144
1144
  }
1145
1145
  const ye = (e) => `user:${e}`, Ae = (e) => `team:${e}`;
1146
- function Yr(e) {
1146
+ function ni(e) {
1147
1147
  const t = /* @__PURE__ */ new Set();
1148
1148
  for (const n of e ?? [])
1149
1149
  n?.id && (n.kind === "user" && t.add(ye(n.id)), n.kind === "team" && t.add(Ae(n.id)));
1150
1150
  return [...t].sort();
1151
1151
  }
1152
- function qr(e, t) {
1152
+ function ri(e, t) {
1153
1153
  return [ye(e), ...t.map(Ae)];
1154
1154
  }
1155
- function Jr(e) {
1155
+ function ii(e) {
1156
1156
  const t = /* @__PURE__ */ new Set();
1157
1157
  for (const n of e ?? [])
1158
1158
  n?.kind && t.add(n.kind);
1159
1159
  return [...t];
1160
1160
  }
1161
- const lt = ["done", "escalated"];
1162
- function Zr(e) {
1163
- return lt.includes(e);
1161
+ const ut = ["done", "escalated"], oi = ["open", "waiting"];
1162
+ function ai(e) {
1163
+ return ut.includes(e);
1164
1164
  }
1165
- const ut = "assignment";
1166
- function Qr(e) {
1167
- return `${ut}:${e}`;
1165
+ const dt = "assignment";
1166
+ function si(e) {
1167
+ return `${dt}:${e}`;
1168
1168
  }
1169
- function ei(e, t, n) {
1169
+ function ci(e, t, n) {
1170
1170
  if (e.direction === "inbound") return !0;
1171
1171
  if (e.author?.type === "user" && e.author.id === t) return !1;
1172
1172
  const r = e.payload?.mentions;
1173
1173
  return Array.isArray(r) && r.includes(t) ? !0 : n === "reply";
1174
1174
  }
1175
- function ti(e) {
1175
+ function li(e) {
1176
1176
  return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
1177
1177
  }
1178
- const dt = 12;
1179
- function ni(e, t, n = dt) {
1178
+ const pt = 12;
1179
+ function ui(e, t, n = pt) {
1180
1180
  const r = t + 1;
1181
1181
  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 ? {
1182
1182
  status: "escalated",
@@ -1190,104 +1190,131 @@ function ni(e, t, n = dt) {
1190
1190
  reason: "de agent rondde zijn beurt af zonder te zeggen wat er moet gebeuren (wachten, afronden of overdragen)"
1191
1191
  };
1192
1192
  }
1193
- const ri = /* @__PURE__ */ new Set(["mail", "message"]);
1194
- function pt(e, t) {
1193
+ const di = /* @__PURE__ */ new Set(["mail", "message"]);
1194
+ function ft(e, t) {
1195
1195
  const n = e.settings?.signatures?.[t];
1196
1196
  return !n?.enabled || !n.body || n.body.trim() === "" ? null : n;
1197
1197
  }
1198
- function ii(e, t, n, r = "html") {
1198
+ function pi(e, t, n, r = "html") {
1199
1199
  if (!e) return n;
1200
- const i = pt(e, t);
1200
+ const i = ft(e, t);
1201
1201
  return i ? `${n}${r === "text" ? `
1202
1202
 
1203
1203
  ` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${i.body}` : n;
1204
1204
  }
1205
- function oi(e) {
1205
+ function fi(e) {
1206
1206
  return e.endpoints ?? [];
1207
1207
  }
1208
- const ft = 36e5, mt = 864e5, g = -1 / 0, ai = (e) => e.score > g, _ = {
1208
+ const mt = 36e5, gt = 864e5, g = -1 / 0, mi = (e) => e.score > g, _ = {
1209
1209
  urgent: 40,
1210
1210
  high: 25,
1211
1211
  normal: 10,
1212
1212
  low: 0
1213
1213
  };
1214
- function si(e) {
1214
+ function gi(e) {
1215
1215
  return Object.fromEntries(e.map((t) => [t.resourceId, t]));
1216
1216
  }
1217
- const gt = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, ht = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
1217
+ const ht = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, be = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
1218
1218
  function yt(e, t) {
1219
- return !!(e && gt.test(e) || t && ht.test(t));
1219
+ return !!(e && ht.test(e) || t && be.test(t));
1220
1220
  }
1221
1221
  const At = 3, bt = 600;
1222
- function ci(e, t) {
1222
+ function hi(e, t) {
1223
1223
  return e >= At || t >= bt;
1224
1224
  }
1225
- function Et(e, t) {
1225
+ const Et = [
1226
+ "list-unsubscribe",
1227
+ "list-unsubscribe-post",
1228
+ "list-id",
1229
+ "precedence",
1230
+ "auto-submitted",
1231
+ "x-auto-response-suppress",
1232
+ "feedback-id",
1233
+ "x-mailer"
1234
+ ];
1235
+ function yi(e) {
1236
+ const t = {};
1237
+ for (const n of e) {
1238
+ const r = n.name?.toLowerCase();
1239
+ r && n.value !== void 0 && Et.includes(r) && (t[r] = n.value);
1240
+ }
1241
+ return t;
1242
+ }
1243
+ const St = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|notifications?|bounce|postmaster|mailer)@/i, _t = /(^|[._+-])(newsletter|nieuwsbrief|marketing|mailing)@/i;
1244
+ function Ai(e) {
1245
+ const t = e.headers ?? {}, n = e.from?.email, r = t["auto-submitted"]?.toLowerCase();
1246
+ if (r && r !== "no" || t["x-auto-response-suppress"] || n && St.test(n))
1247
+ return "automated";
1248
+ const i = t.precedence?.toLowerCase();
1249
+ if (t["list-unsubscribe"] || t["list-unsubscribe-post"] || t["list-id"] || i === "bulk" || i === "list" || e.body && be.test(e.body) || n && _t.test(n))
1250
+ return "marketing";
1251
+ }
1252
+ function Tt(e, t) {
1226
1253
  return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
1227
1254
  }
1228
- const St = ["open"], _t = 1e3, Tt = {
1255
+ const It = ["open"], wt = 1e3, Mt = {
1229
1256
  urgent: 1,
1230
1257
  high: 4,
1231
1258
  normal: 8,
1232
1259
  low: 24
1233
- }, It = 72;
1234
- function wt(e) {
1260
+ }, kt = 72;
1261
+ function Ct(e) {
1235
1262
  return e.lastActivityAt ?? (e.createdAt ? new Date(We(e)).getTime() : 0);
1236
1263
  }
1237
- function Mt(e, t) {
1238
- return kt(t.remindersById?.[e.id], e, t.now);
1264
+ function Ot(e, t) {
1265
+ return Nt(t.remindersById?.[e.id], e, t.now);
1239
1266
  }
1240
- function kt(e, t, n) {
1267
+ function Nt(e, t, n) {
1241
1268
  return !e || e.remindAt <= n ? !1 : !((t.lastActivityAt ?? 0) > e.parkedAt && t.lastActivityPreview?.direction === "inbound");
1242
1269
  }
1243
- const be = (e) => Ke(e) === "outbound_message", Ee = (e) => St.includes(e);
1270
+ const Ee = (e) => Ge(e) === "outbound_message", Se = (e) => It.includes(e);
1244
1271
  function x(e, t) {
1245
- return Math.max(0, (t - wt(e)) / ft);
1272
+ return Math.max(0, (t - Ct(e)) / mt);
1246
1273
  }
1247
- function Ct(e, t) {
1274
+ function vt(e, t) {
1248
1275
  const n = e.assignedInboxId ? t?.[e.assignedInboxId] : void 0;
1249
- return typeof n == "number" && n > 0 ? n : Tt[e.priority ?? "normal"];
1276
+ return typeof n == "number" && n > 0 ? n : Mt[e.priority ?? "normal"];
1250
1277
  }
1251
- function li(e) {
1278
+ function bi(e) {
1252
1279
  const t = {};
1253
1280
  for (const n of e)
1254
1281
  typeof n.slaHours == "number" && n.slaHours > 0 && (t[n.id] = n.slaHours);
1255
1282
  return t;
1256
1283
  }
1257
- function ui(e, t, n) {
1258
- return !Ee(e.status) || e.firstResponseAt ? !1 : x(e, t) > Ct(e, n);
1284
+ function Ei(e, t, n) {
1285
+ return !Se(e.status) || e.firstResponseAt ? !1 : x(e, t) > vt(e, n);
1259
1286
  }
1260
- function Ot(e, t) {
1287
+ function Rt(e, t) {
1261
1288
  const n = e.lastActivityPreview;
1262
- return n?.direction !== "outbound" || !be(n.type) ? !1 : x(e, t) < It;
1289
+ return n?.direction !== "outbound" || !Ee(n.type) ? !1 : x(e, t) < kt;
1263
1290
  }
1264
- function di(e, t) {
1265
- if (!Ee(e.status)) return { score: g, reasons: [] };
1291
+ function Si(e, t) {
1292
+ if (!Se(e.status)) return { score: g, reasons: [] };
1266
1293
  if (e.snoozedTill && e.snoozedTill > t.now) return { score: g, reasons: [] };
1267
- if (Ot(e, t.now)) return { score: g, reasons: [] };
1268
- if (Mt(e, t)) return { score: g, reasons: [] };
1294
+ if (Rt(e, t.now)) return { score: g, reasons: [] };
1295
+ if (Ot(e, t)) return { score: g, reasons: [] };
1269
1296
  let n = 0;
1270
1297
  const r = [], i = e.priority ?? "normal";
1271
- _[i] > 0 && (n += _[i], r.push(`priority:${i}`)), Et(e, t.userId) && (n += 20, r.push("unseen")), e.assignedUserId && e.assignedUserId === t.userId && (n += 15, r.push("assigned-to-you"));
1298
+ _[i] > 0 && (n += _[i], r.push(`priority:${i}`)), Tt(e, t.userId) && (n += 20, r.push("unseen")), e.assignedUserId && e.assignedUserId === t.userId && (n += 15, r.push("assigned-to-you"));
1272
1299
  const o = x(e, t.now);
1273
1300
  if (o > 0) {
1274
- const s = Math.min(o * 2, 30);
1275
- n += s, o >= 1 && r.push(`waiting:${Math.round(o)}h`);
1301
+ const c = Math.min(o * 2, 30);
1302
+ n += c, o >= 1 && r.push(`waiting:${Math.round(o)}h`);
1276
1303
  }
1277
1304
  const a = e.lastActivityPreview;
1278
- return a?.type === "AI_ACTION_PROPOSED" && (n += 30, r.push("awaiting-approval")), a?.direction === "outbound" && be(a.type) && (n += 10, r.push("no-reply")), !e.firstResponseAt && e.lastActivityPreview?.direction === "inbound" && (n += 10, r.push("awaiting-reply")), yt(e.remoteParty?.resource, e.lastActivityPreview?.snippet) && (n -= _t, r.push("bulk")), { score: n, reasons: r };
1305
+ return a?.type === "AI_ACTION_PROPOSED" && (n += 30, r.push("awaiting-approval")), a?.direction === "outbound" && Ee(a.type) && (n += 10, r.push("no-reply")), !e.firstResponseAt && e.lastActivityPreview?.direction === "inbound" && (n += 10, r.push("awaiting-reply")), (e.tags?.some((c) => c === "marketing" || c === "automated") || yt(e.remoteParty?.resource, e.lastActivityPreview?.snippet)) && (n -= wt, r.push("bulk")), { score: n, reasons: r };
1279
1306
  }
1280
- const pi = (e) => !!e.assignedUserId || !!e.assignedInboxId, fi = (e) => e.status === "closed", mi = (e) => ({
1307
+ const _i = (e) => !!e.assignedUserId || !!e.assignedInboxId, Ti = (e) => e.status === "closed", Ii = (e) => ({
1281
1308
  urgent: 10,
1282
1309
  high: 5,
1283
1310
  normal: 2,
1284
1311
  low: 1
1285
- })[e.priority] || 0, gi = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
1286
- function hi(e, t) {
1312
+ })[e.priority] || 0, wi = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
1313
+ function Mi(e, t) {
1287
1314
  const n = e.labels ?? [];
1288
1315
  return n.find((r) => r.locale === t)?.label ?? n[0]?.label ?? e.url;
1289
1316
  }
1290
- function yi(e, t, n) {
1317
+ function ki(e, t, n) {
1291
1318
  const r = e.translations ?? [];
1292
1319
  return r.find((i) => i.locale === t) ?? (n ? r.find((i) => i.locale === n) : void 0) ?? { locale: t };
1293
1320
  }
@@ -1306,36 +1333,36 @@ const Z = [
1306
1333
  { code: "fi", label: "Suomi", english: "Finnish" },
1307
1334
  { code: "tr", label: "Türkçe", english: "Turkish" }
1308
1335
  ];
1309
- function Se(e) {
1336
+ function _e(e) {
1310
1337
  const t = (e ?? "").toLowerCase();
1311
1338
  return Z.find((n) => n.code === t) ?? Z.find((n) => n.code === t.split("-")[0]);
1312
1339
  }
1313
- function Ai(e) {
1314
- return Se(e)?.label ?? e;
1340
+ function Ci(e) {
1341
+ return _e(e)?.label ?? e;
1315
1342
  }
1316
- function bi(e) {
1317
- const t = Se(e);
1343
+ function Oi(e) {
1344
+ const t = _e(e);
1318
1345
  return t ? t.english === t.label ? `${t.english} (${t.code})` : `${t.english} — ${t.label} (${t.code})` : e;
1319
1346
  }
1320
- const _e = 3;
1321
- function vt(e, t) {
1347
+ const Te = 3;
1348
+ function $t(e, t) {
1322
1349
  const n = /* @__PURE__ */ new Set();
1323
1350
  let r = 1, i = t.get(e)?.parentId;
1324
1351
  for (; i; ) {
1325
- if (n.has(i) || (n.add(i), r++, r > _e + 1)) return 1 / 0;
1352
+ if (n.has(i) || (n.add(i), r++, r > Te + 1)) return 1 / 0;
1326
1353
  i = t.get(i)?.parentId;
1327
1354
  }
1328
1355
  return r;
1329
1356
  }
1330
- function Ei(e, t, n) {
1357
+ function Ni(e, t, n) {
1331
1358
  if (!e) return !0;
1332
1359
  if (e === t) return !1;
1333
1360
  const r = new Map(n.map((a) => [a.id, a]));
1334
- if (!r.has(e) || t && Nt(e, t, r)) return !1;
1335
- const i = vt(e, r), o = t ? Te(t, n) : 1;
1336
- return i + o <= _e;
1361
+ if (!r.has(e) || t && xt(e, t, r)) return !1;
1362
+ const i = $t(e, r), o = t ? Ie(t, n) : 1;
1363
+ return i + o <= Te;
1337
1364
  }
1338
- function Nt(e, t, n) {
1365
+ function xt(e, t, n) {
1339
1366
  const r = /* @__PURE__ */ new Set();
1340
1367
  let i = n.get(e)?.parentId;
1341
1368
  for (; i; ) {
@@ -1345,23 +1372,23 @@ function Nt(e, t, n) {
1345
1372
  }
1346
1373
  return !1;
1347
1374
  }
1348
- function Te(e, t, n = /* @__PURE__ */ new Set()) {
1375
+ function Ie(e, t, n = /* @__PURE__ */ new Set()) {
1349
1376
  if (n.has(e)) return 1;
1350
1377
  n.add(e);
1351
1378
  const r = t.filter((i) => i.parentId === e);
1352
- return r.length ? 1 + Math.max(...r.map((i) => Te(i.id, t, n))) : 1;
1379
+ return r.length ? 1 + Math.max(...r.map((i) => Ie(i.id, t, n))) : 1;
1353
1380
  }
1354
- const Rt = "en";
1355
- function $t(e) {
1356
- return e.defaultLocale || e.locale || Rt;
1381
+ const Lt = "en";
1382
+ function Dt(e) {
1383
+ return e.defaultLocale || e.locale || Lt;
1357
1384
  }
1358
- function Si(e) {
1385
+ function vi(e) {
1359
1386
  const t = /* @__PURE__ */ new Set(), n = [];
1360
- for (const r of [$t(e), ...e.locales ?? []])
1387
+ for (const r of [Dt(e), ...e.locales ?? []])
1361
1388
  !r || t.has(r) || (t.add(r), n.push(r));
1362
1389
  return n;
1363
1390
  }
1364
- function _i(e, t, n) {
1391
+ function Ri(e, t, n) {
1365
1392
  const r = e.translations ?? [];
1366
1393
  return r.find((i) => i.locale === t)?.name ?? (n ? r.find((i) => i.locale === n)?.name : void 0) ?? e.name;
1367
1394
  }
@@ -1382,7 +1409,7 @@ function ee(e) {
1382
1409
  }
1383
1410
  return null;
1384
1411
  }
1385
- function xt(e, t) {
1412
+ function Pt(e, t) {
1386
1413
  switch (e.kind) {
1387
1414
  case "org":
1388
1415
  return !0;
@@ -1392,23 +1419,23 @@ function xt(e, t) {
1392
1419
  return e.userId === t.userId;
1393
1420
  }
1394
1421
  }
1395
- function Ti(e, t) {
1396
- return e.filter((n) => n.enabled && xt(n.ownerScope, t));
1422
+ function $i(e, t) {
1423
+ return e.filter((n) => n.enabled && Pt(n.ownerScope, t));
1397
1424
  }
1398
- function Ii(e) {
1425
+ function xi(e) {
1399
1426
  return e.credentialScope ? e.credentialScope : (e.authMode ?? "header") === "header" || e.oauth?.scope === "org" ? "shared" : "per-user";
1400
1427
  }
1401
- function wi(e) {
1428
+ function Li(e) {
1402
1429
  return `mcp__${e}__`;
1403
1430
  }
1404
- const Mi = 1e3, ki = 2e3, Ci = 500, Oi = 12e3, vi = 4e3, Lt = ["contact", "company", "work_item"];
1405
- function Ni(e) {
1431
+ const Di = 1e3, Pi = 2e3, Ui = 500, Ki = 12e3, Gi = 4e3, Ut = ["contact", "company", "work_item"];
1432
+ function ji(e) {
1406
1433
  if (!e) return !1;
1407
1434
  const t = e.slice(0, e.indexOf(":"));
1408
- return Lt.includes(t);
1435
+ return Ut.includes(t);
1409
1436
  }
1410
- const Ri = "onboarding-source", $i = ["support", "billing", "availability", "sales", "onboarding"], xi = ["keep", "replace"];
1411
- function Dt(e) {
1437
+ const Bi = "onboarding-source", Hi = ["support", "billing", "availability", "sales", "onboarding"], Fi = ["keep", "replace"];
1438
+ function Kt(e) {
1412
1439
  switch (e.kind) {
1413
1440
  case "user":
1414
1441
  return `user:${e.userId}`;
@@ -1418,7 +1445,7 @@ function Dt(e) {
1418
1445
  return "org";
1419
1446
  }
1420
1447
  }
1421
- function Li(e) {
1448
+ function Vi(e) {
1422
1449
  if (typeof e != "string") return;
1423
1450
  const t = e.trim();
1424
1451
  if (t === "org") return { kind: "org" };
@@ -1430,10 +1457,10 @@ function Li(e) {
1430
1457
  if (r === "team") return { kind: "team", teamId: i };
1431
1458
  }
1432
1459
  }
1433
- function Pt(e) {
1434
- return Dt(e);
1460
+ function Gt(e) {
1461
+ return Kt(e);
1435
1462
  }
1436
- function Ut(e) {
1463
+ function jt(e) {
1437
1464
  switch (e.kind) {
1438
1465
  case "personal":
1439
1466
  return { kind: "user", userId: e.userId };
@@ -1443,14 +1470,14 @@ function Ut(e) {
1443
1470
  return { kind: "org" };
1444
1471
  }
1445
1472
  }
1446
- const Kt = Ut;
1447
- function Di(e) {
1448
- return e.agentId ? { kind: "user", userId: e.agentId } : Kt(e.ownerScope);
1473
+ const Bt = jt;
1474
+ function Wi(e) {
1475
+ return e.agentId ? { kind: "user", userId: e.agentId } : Bt(e.ownerScope);
1449
1476
  }
1450
- function Pi(e) {
1451
- return Pt(e);
1477
+ function zi(e) {
1478
+ return Gt(e);
1452
1479
  }
1453
- function Ui(e, t) {
1480
+ function Xi(e, t) {
1454
1481
  if (!t) return;
1455
1482
  let n = e;
1456
1483
  for (const r of t.split(".")) {
@@ -1459,24 +1486,24 @@ function Ui(e, t) {
1459
1486
  }
1460
1487
  return n;
1461
1488
  }
1462
- function Ki(e, t) {
1489
+ function Yi(e, t) {
1463
1490
  return e.targets.find((n) => n.activityTypes.includes(t));
1464
1491
  }
1465
- function ji(e, t) {
1492
+ function qi(e, t) {
1466
1493
  if (t)
1467
1494
  return e.targets.find((n) => n.id === t);
1468
1495
  }
1469
- function jt(e) {
1496
+ function Ht(e) {
1470
1497
  return e?.kind === "assignment";
1471
1498
  }
1472
- function Gi(e) {
1499
+ function Ji(e) {
1473
1500
  const { trigger: t, agentId: n, target: r, activityType: i, assigneeUserId: o, authorUserId: a } = e;
1474
- return jt(t) ? n ? r ? r.activityTypes.includes(i) ? o ? o !== n ? "assigned to someone else" : a && a === 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";
1501
+ return Ht(t) ? n ? r ? r.activityTypes.includes(i) ? o ? o !== n ? "assigned to someone else" : a && a === 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";
1475
1502
  }
1476
- function Bi(e) {
1503
+ function Zi(e) {
1477
1504
  return (e.startsWith("tool:") ? e.slice(5) : e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
1478
1505
  }
1479
- const Hi = [
1506
+ const Qi = [
1480
1507
  { name: "text", type: "string" },
1481
1508
  { name: "subject", type: "string" },
1482
1509
  { name: "from", type: "string" },
@@ -1510,7 +1537,7 @@ const Hi = [
1510
1537
  // `buildTriggerVars` cannot fill it itself: the job does that with the catalog in hand, before
1511
1538
  // the trigger filter runs — like contactId/companyId above.
1512
1539
  { name: "assigneeUserId", type: "string" }
1513
- ], Fi = {
1540
+ ], eo = {
1514
1541
  topics: [
1515
1542
  { name: "topicId", type: "string" },
1516
1543
  { name: "topic", type: "string" },
@@ -1524,78 +1551,78 @@ const Hi = [
1524
1551
  // Deliberately empty: the fields come from `ClassifyStep.fields` and so differ per step.
1525
1552
  extract: []
1526
1553
  };
1527
- function Gt(e) {
1554
+ function Ft(e) {
1528
1555
  return `${e.type}:${e.id}`;
1529
1556
  }
1530
- const Bt = "interaction";
1531
- function Ht(e) {
1532
- return e?.type === Bt ? e.id : void 0;
1557
+ const Vt = "interaction";
1558
+ function Wt(e) {
1559
+ return e?.type === Vt ? e.id : void 0;
1533
1560
  }
1534
- const Ft = 64, Wt = 8e3;
1535
- function Wi(e) {
1561
+ const zt = 64, Xt = 8e3;
1562
+ function to(e) {
1536
1563
  const t = typeof e == "number" ? e : Number(String(e ?? "").trim());
1537
1564
  if (!(!Number.isFinite(t) || t <= 0))
1538
- return Math.min(Math.max(Math.round(t), Ft), Wt);
1565
+ return Math.min(Math.max(Math.round(t), zt), Xt);
1539
1566
  }
1540
- const Vi = { kind: "workflow", steps: [] };
1541
- function zi(e) {
1567
+ const no = { kind: "workflow", steps: [] };
1568
+ function ro(e) {
1542
1569
  return e?.kind === "workflow" ? e.steps : [];
1543
1570
  }
1544
- function Xi(e) {
1571
+ function io(e) {
1545
1572
  return e?.kind === "procedure" ? e.procedure : void 0;
1546
1573
  }
1547
- function Vt(e) {
1574
+ function Yt(e) {
1548
1575
  const t = e?.approved ?? 0, n = t + (e?.rejected ?? 0);
1549
1576
  return { total: n, rate: n ? t / n : 0 };
1550
1577
  }
1551
- const zt = 10, Xt = 0.9;
1552
- function Yi(e) {
1553
- const { total: t, rate: n } = Vt(e);
1554
- return t >= zt && n >= Xt;
1578
+ const qt = 10, Jt = 0.9;
1579
+ function oo(e) {
1580
+ const { total: t, rate: n } = Yt(e);
1581
+ return t >= qt && n >= Jt;
1555
1582
  }
1556
- const Yt = ["done", "escalated", "failed", "stopped"];
1557
- function qi(e) {
1558
- return Yt.includes(e);
1583
+ const Zt = ["done", "escalated", "failed", "stopped"];
1584
+ function ao(e) {
1585
+ return Zt.includes(e);
1559
1586
  }
1560
- function qt(e) {
1587
+ function Qt(e) {
1561
1588
  return e === "waiting";
1562
1589
  }
1563
- function Ji(e) {
1564
- return e === "running" || qt(e);
1590
+ function so(e) {
1591
+ return e === "running" || Qt(e);
1565
1592
  }
1566
- function Ie(e) {
1593
+ function we(e) {
1567
1594
  return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
1568
1595
  }
1569
- function Zi(e) {
1570
- const t = Ie(e);
1571
- return t ? Gt(t) : void 0;
1596
+ function co(e) {
1597
+ const t = we(e);
1598
+ return t ? Ft(t) : void 0;
1572
1599
  }
1573
- function Qi(e) {
1574
- return Ht(Ie(e));
1600
+ function lo(e) {
1601
+ return Wt(we(e));
1575
1602
  }
1576
- function eo(e, t) {
1603
+ function uo(e, t) {
1577
1604
  const n = e.accumulatedSeconds || 0;
1578
1605
  return e.runningSince ? n + Math.max(0, Math.floor((t - e.runningSince) / 1e3)) : n;
1579
1606
  }
1580
- function to(e, t) {
1607
+ function po(e, t) {
1581
1608
  const n = Math.max(1, Math.ceil(Math.max(0, e) / 60));
1582
1609
  if (!t || t === "exact") return n * 60;
1583
1610
  const r = Number(t);
1584
1611
  return !Number.isFinite(r) || r <= 0 ? n * 60 : Math.ceil(n / r) * r * 60;
1585
1612
  }
1586
- function no(e) {
1613
+ function fo(e) {
1587
1614
  const t = Math.max(0, Math.round(e / 60));
1588
1615
  return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
1589
1616
  }
1590
- function ro(e) {
1617
+ function mo(e) {
1591
1618
  const t = Math.max(0, Math.floor(e)), n = (o) => String(o).padStart(2, "0"), r = Math.floor(t / 60) % 60, i = Math.floor(t / 3600);
1592
1619
  return i > 0 ? `${i}:${n(r)}:${n(t % 60)}` : `${n(r)}:${n(t % 60)}`;
1593
1620
  }
1594
- function Jt(e) {
1621
+ function en(e) {
1595
1622
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
1596
1623
  }
1597
- function io(e, t) {
1598
- const n = Jt(e) || "werksoort", r = new Set(t);
1624
+ function go(e, t) {
1625
+ const n = en(e) || "werksoort", r = new Set(t);
1599
1626
  if (!r.has(n)) return n;
1600
1627
  for (let i = 2; i < 500; i++) {
1601
1628
  const o = `${n}-${i}`;
@@ -1603,29 +1630,29 @@ function io(e, t) {
1603
1630
  }
1604
1631
  return `${n}-${r.size + 1}`;
1605
1632
  }
1606
- function oo(e, t) {
1633
+ function ho(e, t) {
1607
1634
  const n = e.ownerScope;
1608
1635
  return !n || n.kind === "org" ? !0 : t.includes(n.teamId);
1609
1636
  }
1610
- function ao(e) {
1611
- return e.filter((t) => !t.archived).sort(Zt);
1637
+ function yo(e) {
1638
+ return e.filter((t) => !t.archived).sort(tn);
1612
1639
  }
1613
- function Zt(e, t) {
1640
+ function tn(e, t) {
1614
1641
  const n = (e.order ?? 0) - (t.order ?? 0);
1615
1642
  return n !== 0 ? n : (e.label || "").localeCompare(t.label || "");
1616
1643
  }
1617
- const Qt = 20, en = 20, O = 300;
1644
+ const nn = 20, rn = 20, O = 300;
1618
1645
  function h(e) {
1619
1646
  return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu, " ").replace(/\s+/g, " ").trim();
1620
1647
  }
1621
- function tn(e) {
1648
+ function on(e) {
1622
1649
  const t = e.replace(/\s+/g, " ").trim();
1623
1650
  if (t.length <= O) return t;
1624
1651
  const n = t.slice(0, O), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
1625
1652
  return r > O * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
1626
1653
  }
1627
- function so(e, t) {
1628
- const n = tn(t.text), r = h(n);
1654
+ function Ao(e, t) {
1655
+ const n = on(t.text), r = h(n);
1629
1656
  if (!r || (e.examples ?? []).some((a) => h(a) === r)) return null;
1630
1657
  const i = e.exampleCandidates ?? [], o = i.findIndex((a) => h(a.text) === r);
1631
1658
  if (o >= 0) {
@@ -1633,63 +1660,63 @@ function so(e, t) {
1633
1660
  const a = [...i];
1634
1661
  return a[o] = { ...a[o], corrected: !0, addedAt: t.addedAt }, te(a);
1635
1662
  }
1636
- return te([{ ...t, text: n }, ...i]).slice(0, en);
1663
+ return te([{ ...t, text: n }, ...i]).slice(0, rn);
1637
1664
  }
1638
1665
  function te(e) {
1639
1666
  return [...e].sort(
1640
1667
  (t, n) => Number(n.corrected) - Number(t.corrected) || n.addedAt - t.addedAt
1641
1668
  );
1642
1669
  }
1643
- function co(e, t) {
1670
+ function bo(e, t) {
1644
1671
  const n = h(t), r = (e.examples ?? []).filter((o) => o.trim());
1645
- return { examples: r.some((o) => h(o) === n) ? r : [...r, t].slice(-Qt), exampleCandidates: nn(e, t) };
1672
+ return { examples: r.some((o) => h(o) === n) ? r : [...r, t].slice(-nn), exampleCandidates: an(e, t) };
1646
1673
  }
1647
- function nn(e, t) {
1674
+ function an(e, t) {
1648
1675
  const n = h(t);
1649
1676
  return (e.exampleCandidates ?? []).filter((r) => h(r.text) !== n);
1650
1677
  }
1651
- function rn(e, t) {
1678
+ function sn(e, t) {
1652
1679
  const n = e.ownerScope;
1653
1680
  return n ? n.kind === "org" ? !0 : n.kind === "team" ? !!t && n.teamId === t : !1 : !1;
1654
1681
  }
1655
- function lo(e, t) {
1656
- return e.filter((n) => rn(n, t));
1682
+ function Eo(e, t) {
1683
+ return e.filter((n) => sn(n, t));
1657
1684
  }
1658
- function uo(e) {
1685
+ function So(e) {
1659
1686
  return e.type === "agent";
1660
1687
  }
1661
- const po = "WORK_COMMENT_ADDED", fo = "WORK_ITEM_ASSIGNED", mo = "WORK_ITEM_STATUS_CHANGED";
1662
- function on(e, t) {
1688
+ const _o = "WORK_COMMENT_ADDED", To = "WORK_ITEM_ASSIGNED", Io = "WORK_ITEM_STATUS_CHANGED";
1689
+ function cn(e, t) {
1663
1690
  const n = (r) => {
1664
1691
  const i = new Date(r);
1665
1692
  return i.setHours(0, 0, 0, 0), i.getTime();
1666
1693
  };
1667
- return Math.round((n(e) - n(t)) / mt);
1694
+ return Math.round((n(e) - n(t)) / gt);
1668
1695
  }
1669
- function go(e, t) {
1696
+ function wo(e, t) {
1670
1697
  if (e.closedAt != null) return { score: g, reasons: [] };
1671
1698
  const n = t.remindersById?.[e.id];
1672
1699
  if (n && n.remindAt > t.now) return { score: g, reasons: [] };
1673
1700
  let r = 0;
1674
1701
  const i = [], o = e.priority ?? "normal";
1675
1702
  if (_[o] > 0 && (r += _[o], i.push(`priority:${o}`)), typeof e.dueDate == "number") {
1676
- const a = on(e.dueDate, t.now);
1703
+ const a = cn(e.dueDate, t.now);
1677
1704
  a < 0 ? (r += 35, i.push("overdue")) : a === 0 && (r += 20, i.push("due-today"));
1678
1705
  }
1679
1706
  return e.source?.initiator === "system" && e.source.systemReason && (r += 15, i.push(`auto:${e.source.systemReason}`)), { score: r, reasons: i };
1680
1707
  }
1681
- const an = "work_item", sn = "work_project";
1682
- function cn(e) {
1683
- return `${an}:${e}`;
1708
+ const ln = "work_item", un = "work_project";
1709
+ function dn(e) {
1710
+ return `${ln}:${e}`;
1684
1711
  }
1685
- function we(e) {
1686
- return `${sn}:${e}`;
1712
+ function Me(e) {
1713
+ return `${un}:${e}`;
1687
1714
  }
1688
- function ho(e, t, n) {
1715
+ function Mo(e, t, n) {
1689
1716
  const r = `${e}-${t}`;
1690
1717
  return n ? `${r}-${n}` : r;
1691
1718
  }
1692
- function yo(e) {
1719
+ function ko(e) {
1693
1720
  const t = /^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e || "").trim());
1694
1721
  return t ? {
1695
1722
  projectKey: t[1].toUpperCase(),
@@ -1697,52 +1724,52 @@ function yo(e) {
1697
1724
  ...t[3] ? { subSequence: Number(t[3]) } : {}
1698
1725
  } : null;
1699
1726
  }
1700
- function Ao(e) {
1727
+ function Co(e) {
1701
1728
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 3) || "PRJ";
1702
1729
  }
1703
- function bo(e, t = 25) {
1704
- const n = /* @__PURE__ */ new Set([cn(e.id)]);
1705
- e.projectId && n.add(we(e.projectId));
1730
+ function Oo(e, t = 25) {
1731
+ const n = /* @__PURE__ */ new Set([dn(e.id)]);
1732
+ e.projectId && n.add(Me(e.projectId));
1706
1733
  for (const r of e.ancestorKeys ?? []) n.add(r);
1707
1734
  for (const r of e.partyKeys ?? []) n.add(r);
1708
1735
  return Array.from(n).slice(0, t);
1709
1736
  }
1710
- function Eo(e) {
1711
- return [we(e.id)];
1737
+ function No(e) {
1738
+ return [Me(e.id)];
1712
1739
  }
1713
1740
  const L = [
1714
1741
  { key: "open", label: "status_open", category: "todo", order: 0 },
1715
1742
  { key: "in_progress", label: "status_in_progress", category: "in_progress", order: 1 },
1716
1743
  { key: "done", label: "status_done", category: "done", order: 2 },
1717
1744
  { key: "cancelled", label: "status_cancelled", category: "done", order: 3 }
1718
- ], Me = L.map((e) => e.key);
1719
- function ln(e) {
1745
+ ], ke = L.map((e) => e.key);
1746
+ function pn(e) {
1720
1747
  return e?.statuses?.length ? e.statuses : L;
1721
1748
  }
1722
- function un(e, t) {
1749
+ function fn(e, t) {
1723
1750
  return t.find((n) => n.key === e)?.category ?? "todo";
1724
1751
  }
1725
- function So(e, t) {
1752
+ function vo(e, t) {
1726
1753
  return t.find((n) => n.key === e);
1727
1754
  }
1728
- function _o(e) {
1729
- const t = ln(e), n = e?.defaultStatusKey;
1730
- return n && t.some((r) => r.key === n) ? n : dn(t)[0]?.key ?? L[0].key;
1755
+ function Ro(e) {
1756
+ const t = pn(e), n = e?.defaultStatusKey;
1757
+ return n && t.some((r) => r.key === n) ? n : mn(t)[0]?.key ?? L[0].key;
1731
1758
  }
1732
- function dn(e) {
1759
+ function mn(e) {
1733
1760
  return [...e].sort((t, n) => {
1734
1761
  const r = (t.order ?? 0) - (n.order ?? 0);
1735
1762
  return r !== 0 ? r : (t.label || "").localeCompare(n.label || "");
1736
1763
  });
1737
1764
  }
1738
- function To(e, t) {
1739
- return un(e, t) === "done";
1765
+ function $o(e, t) {
1766
+ return fn(e, t) === "done";
1740
1767
  }
1741
- function pn(e) {
1768
+ function gn(e) {
1742
1769
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
1743
1770
  }
1744
- function Io(e, t) {
1745
- const n = pn(e) || "status", r = /* @__PURE__ */ new Set([...t, ...Me]);
1771
+ function xo(e, t) {
1772
+ const n = gn(e) || "status", r = /* @__PURE__ */ new Set([...t, ...ke]);
1746
1773
  if (!r.has(n)) return n;
1747
1774
  for (let i = 2; i < 500; i++) {
1748
1775
  const o = `${n}-${i}`;
@@ -1750,7 +1777,7 @@ function Io(e, t) {
1750
1777
  }
1751
1778
  return `${n}-${r.size + 1}`;
1752
1779
  }
1753
- function wo(e) {
1780
+ function Lo(e) {
1754
1781
  const t = [];
1755
1782
  if (!e.length) return [{ index: -1, reason: "empty" }];
1756
1783
  const n = /* @__PURE__ */ new Set();
@@ -1759,10 +1786,10 @@ function wo(e) {
1759
1786
  t.push({ index: i, reason: "missing_key" });
1760
1787
  return;
1761
1788
  }
1762
- Me.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);
1789
+ ke.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);
1763
1790
  }), 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;
1764
1791
  }
1765
- const fn = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), mn = /* @__PURE__ */ new Set([
1792
+ const hn = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), yn = /* @__PURE__ */ new Set([
1766
1793
  "text/plain",
1767
1794
  "text/markdown",
1768
1795
  "text/csv",
@@ -1771,67 +1798,67 @@ const fn = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "ima
1771
1798
  "application/xml",
1772
1799
  "text/xml"
1773
1800
  ]);
1774
- function gn(e) {
1801
+ function An(e) {
1775
1802
  const t = (e ?? "").trim().toLowerCase().split(";")[0];
1776
- return t ? fn.has(t) ? "image" : t === "application/pdf" ? "pdf" : mn.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
1803
+ return t ? hn.has(t) ? "image" : t === "application/pdf" ? "pdf" : yn.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
1777
1804
  }
1778
- const y = 1024 * 1024, hn = {
1805
+ const y = 1024 * 1024, bn = {
1779
1806
  image: 5 * y,
1780
1807
  pdf: 20 * y,
1781
1808
  text: 1 * y,
1782
1809
  audio: 20 * y
1783
- }, Mo = 25 * y, ko = 5;
1784
- function Co(e, t) {
1785
- const n = gn(e);
1786
- return n === "unsupported" ? "unsupported" : t > hn[n] ? "too-large" : null;
1810
+ }, Do = 25 * y, Po = 5;
1811
+ function Uo(e, t) {
1812
+ const n = An(e);
1813
+ return n === "unsupported" ? "unsupported" : t > bn[n] ? "too-large" : null;
1787
1814
  }
1788
- function Oo(e) {
1815
+ function Ko(e) {
1789
1816
  return e.access !== "read" && e.effect !== "internal";
1790
1817
  }
1791
- function yn(e) {
1818
+ function En(e) {
1792
1819
  return `${e.kind}:${e.id || e.url || e.title}`;
1793
1820
  }
1794
- function vo(e, t = []) {
1821
+ function Go(e, t = []) {
1795
1822
  const n = new Set(t), r = [], i = [];
1796
1823
  for (const o of e) {
1797
- const a = yn(o);
1824
+ const a = En(o);
1798
1825
  n.has(a) || (n.add(a), r.push(o), i.push(a));
1799
1826
  }
1800
1827
  return { sources: r, keys: i };
1801
1828
  }
1802
- const No = "assist-source", Ro = ["blocking", "due", "open"];
1803
- function $o(e, t) {
1829
+ const jo = "assist-source", Bo = ["blocking", "due", "open"];
1830
+ function Ho(e, t) {
1804
1831
  const [n, r] = (e.subjectKey ?? "").split(":");
1805
1832
  return n === t && r ? r : void 0;
1806
1833
  }
1807
1834
  const ne = { blocking: 0, due: 1, open: 2 };
1808
- function xo(e, t) {
1835
+ function Fo(e, t) {
1809
1836
  return ne[e.band ?? "open"] - ne[t.band ?? "open"] || (t.priority ?? 0) - (e.priority ?? 0) || e.id.localeCompare(t.id);
1810
1837
  }
1811
- function Lo(e) {
1838
+ function Vo(e) {
1812
1839
  return e.sessions.filter(
1813
1840
  (t) => t.id !== e.exceptSessionId && t.state === "connected" && e.canHold(t.providerId)
1814
1841
  );
1815
1842
  }
1816
- function Do(e) {
1843
+ function Wo(e) {
1817
1844
  return e.sessions.filter(
1818
1845
  (t) => t.id !== e.exceptSessionId && t.state === "connected" && !e.canHold(t.providerId)
1819
1846
  );
1820
1847
  }
1821
- function Po(e) {
1848
+ function zo(e) {
1822
1849
  return e.sessions.some(
1823
1850
  (n) => n.id !== e.exceptSessionId && (n.state === "connected" || n.state === "on_hold")
1824
1851
  ) ? { admit: !1, reason: "busy" } : { admit: !0 };
1825
1852
  }
1826
- function An(e, t) {
1827
- const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, i = t.intents.filter((a) => !n.has(a.intent)).map((a) => En(a, r[a.intent]));
1853
+ function Sn(e, t) {
1854
+ const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, i = t.intents.filter((a) => !n.has(a.intent)).map((a) => Tn(a, r[a.intent]));
1828
1855
  if (!e.extraIntents || e.extraIntents.length === 0) return i;
1829
1856
  const o = new Set(i.map((a) => a.intent));
1830
1857
  for (const a of e.extraIntents)
1831
1858
  o.has(a.intent) || (i.push(a), o.add(a.intent));
1832
1859
  return i;
1833
1860
  }
1834
- function bn(e, t) {
1861
+ function _n(e, t) {
1835
1862
  const n = {};
1836
1863
  for (const r of e.intents) {
1837
1864
  if (!r.togglable) continue;
@@ -1840,46 +1867,46 @@ function bn(e, t) {
1840
1867
  }
1841
1868
  return n;
1842
1869
  }
1843
- function Uo(e, t) {
1844
- const n = bn(e, t);
1870
+ function Xo(e, t) {
1871
+ const n = _n(e, t);
1845
1872
  return Object.entries(n).filter(([, r]) => !r).map(([r]) => r);
1846
1873
  }
1847
- function En(e, t) {
1874
+ function Tn(e, t) {
1848
1875
  return t ? {
1849
1876
  intent: t.intent ?? e.intent,
1850
1877
  targetSchemes: t.targetSchemes ?? e.targetSchemes,
1851
1878
  transport: t.transport ?? e.transport
1852
1879
  } : e;
1853
1880
  }
1854
- function Ko(e, t) {
1881
+ function Yo(e, t) {
1855
1882
  const n = [];
1856
1883
  for (const r of e) {
1857
1884
  if (!r.enabled) continue;
1858
1885
  const i = t[r.providerId];
1859
1886
  if (i)
1860
- for (const o of An(r, i))
1887
+ for (const o of Sn(r, i))
1861
1888
  n.push({ channel: r, description: i, capability: o });
1862
1889
  }
1863
1890
  return n;
1864
1891
  }
1865
- function jo(e, t) {
1892
+ function qo(e, t) {
1866
1893
  return t.filter((n) => n.capability.intent === e);
1867
1894
  }
1868
- function Sn(e, t) {
1895
+ function In(e, t) {
1869
1896
  return t.filter((n) => n.capability.targetSchemes.includes(e));
1870
1897
  }
1871
- function Go(e, t) {
1872
- return Sn(e.scheme, t);
1898
+ function Jo(e, t) {
1899
+ return In(e.scheme, t);
1873
1900
  }
1874
- function Bo(e, t, n) {
1901
+ function Zo(e, t, n) {
1875
1902
  const r = [];
1876
1903
  for (const i of e)
1877
1904
  for (const o of n)
1878
1905
  o.capability.intent === t && o.capability.targetSchemes.includes(i.scheme) && r.push({ channelIntent: o, endpoint: i });
1879
1906
  return r;
1880
1907
  }
1881
- var _n = /* @__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))(_n || {});
1882
- const Tn = {
1908
+ var wn = /* @__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))(wn || {});
1909
+ const Mn = {
1883
1910
  mailto: "mail",
1884
1911
  sip: "tel",
1885
1912
  tel: "tel",
@@ -1900,10 +1927,10 @@ const Tn = {
1900
1927
  id: "note",
1901
1928
  custom: "note"
1902
1929
  };
1903
- function Ho(e) {
1904
- return e ? Tn[e] ?? "note" : "note";
1930
+ function Qo(e) {
1931
+ return e ? Mn[e] ?? "note" : "note";
1905
1932
  }
1906
- const Fo = "message_window", Wo = "message_templates", Vo = {
1933
+ const ea = "message_window", ta = "message_templates", na = {
1907
1934
  // E-mail
1908
1935
  FROM: "from",
1909
1936
  TO: "to",
@@ -1920,19 +1947,19 @@ const Fo = "message_window", Wo = "message_templates", Vo = {
1920
1947
  // Voice/conference
1921
1948
  HOST: "host",
1922
1949
  PARTICIPANT: "participant"
1923
- }, zo = (e, t) => ({ intent: e, ...t }), Xo = "folder_management", Yo = "remote_search", qo = {
1950
+ }, ra = (e, t) => ({ intent: e, ...t }), ia = "folder_management", oa = "remote_search", aa = {
1924
1951
  ok: !1,
1925
1952
  code: "UNSUPPORTED",
1926
1953
  message: "Provider does not support this op"
1927
- }, Jo = "context.collect", Zo = "installation-id";
1928
- function Qo(e) {
1954
+ }, sa = "context.collect", ca = "installation-id";
1955
+ function la(e) {
1929
1956
  const t = [];
1930
1957
  for (const n of Object.keys(e))
1931
1958
  for (const r of Object.keys(e[n]))
1932
1959
  t.push({ lang: n, key: r, value: e[n][r] });
1933
1960
  return t;
1934
1961
  }
1935
- const ea = "notification-source", ta = (e, t) => `${e}.pref.${t}`, na = {
1962
+ const ua = "notification-source", da = (e, t) => `${e}.pref.${t}`, pa = {
1936
1963
  ai: [
1937
1964
  "account.read",
1938
1965
  "account.write",
@@ -2065,48 +2092,48 @@ const ea = "notification-source", ta = (e, t) => `${e}.pref.${t}`, na = {
2065
2092
  time: ["entry.read", "entry.write", "work-type.read", "work-type.write"],
2066
2093
  user: ["user.read", "user.write"],
2067
2094
  work: ["item.read", "item.write", "project.read", "project.write"]
2068
- }, ke = 9e4, In = ["out_of_office"], Ce = (e) => In.includes(e);
2069
- function ra(e, t, n) {
2070
- const r = n - e < ke, i = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
2095
+ }, Ce = 9e4, kn = ["out_of_office"], Oe = (e) => kn.includes(e);
2096
+ function fa(e, t, n) {
2097
+ const r = n - e < Ce, i = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
2071
2098
  if (!i?.status) return { online: r, status: r ? "available" : "offline" };
2072
2099
  const o = i.status;
2073
- return !r && !Ce(o) ? { online: !1, status: "offline" } : { online: r, status: o, message: i.message };
2100
+ return !r && !Oe(o) ? { online: !1, status: "offline" } : { online: r, status: o, message: i.message };
2074
2101
  }
2075
- function ia(e, t) {
2076
- const n = t - e.lastSeenAt < ke, r = n || Ce(e.status) ? e.status : "offline";
2102
+ function ma(e, t) {
2103
+ const n = t - e.lastSeenAt < Ce, r = n || Oe(e.status) ? e.status : "offline";
2077
2104
  return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
2078
2105
  }
2079
- function oa(e, t) {
2106
+ function ga(e, t) {
2080
2107
  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 };
2081
2108
  }
2082
- function aa(e) {
2109
+ function ha(e) {
2083
2110
  return e.providerAvailable && e.allowed;
2084
2111
  }
2085
- const sa = "resources.describe", ca = "resources.search", la = "resources.resolve", ua = "resources.attached";
2086
- function da(e) {
2112
+ const ya = "resources.describe", Aa = "resources.search", ba = "resources.resolve", Ea = "resources.attached";
2113
+ function Sa(e) {
2087
2114
  const t = e.indexOf(":");
2088
2115
  return t === -1 ? e : e.slice(0, t);
2089
2116
  }
2090
- const Oe = "auth";
2117
+ const _a = "/provider/scope/related", Ta = "/provider/scope/read", Ne = "auth";
2091
2118
  function ve(e) {
2092
2119
  const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
2093
2120
  return t ? t[1] : null;
2094
2121
  }
2095
- function pa(e) {
2122
+ function Ia(e) {
2096
2123
  const t = ve(e);
2097
- return t ? t !== Oe : typeof e == "string" && e.startsWith("/wake");
2124
+ return t ? t !== Ne : typeof e == "string" && e.startsWith("/wake");
2098
2125
  }
2099
- function fa(e) {
2100
- return typeof e != "string" || e === "" || e === "/" ? !0 : ve(e) === Oe;
2126
+ function wa(e) {
2127
+ return typeof e != "string" || e === "" || e === "/" ? !0 : ve(e) === Ne;
2101
2128
  }
2102
- function wn(e) {
2129
+ function Cn(e) {
2103
2130
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2104
2131
  }
2105
- function Mn(e) {
2106
- const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : `/${wn(r)}`).join("");
2132
+ function On(e) {
2133
+ const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : `/${Cn(r)}`).join("");
2107
2134
  return new RegExp(`^${n}\\/?$`);
2108
2135
  }
2109
- function kn(e, t) {
2136
+ function Nn(e, t) {
2110
2137
  const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean), i = {};
2111
2138
  return n.forEach((o, a) => {
2112
2139
  if (o.startsWith(":")) {
@@ -2115,14 +2142,14 @@ function kn(e, t) {
2115
2142
  }
2116
2143
  }), i;
2117
2144
  }
2118
- function Cn(e) {
2145
+ function vn(e) {
2119
2146
  return e.publicBasePath ?? `/apps/${e.name}`;
2120
2147
  }
2121
- function ma(e) {
2148
+ function Ma(e) {
2122
2149
  const t = [];
2123
2150
  for (const n of e) {
2124
2151
  if (!n?.name) continue;
2125
- const r = Cn(n);
2152
+ const r = vn(n);
2126
2153
  for (const i of n.routes ?? []) {
2127
2154
  if (!i.public) continue;
2128
2155
  const o = i.path === "/" ? "" : i.path;
@@ -2136,7 +2163,7 @@ function ma(e) {
2136
2163
  }
2137
2164
  return t;
2138
2165
  }
2139
- function On(e, t) {
2166
+ function Rn(e, t) {
2140
2167
  const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
2141
2168
  for (let i = 0; i < Math.min(n.length, r.length); i++) {
2142
2169
  const o = n[i].startsWith(":"), a = r[i].startsWith(":");
@@ -2144,17 +2171,17 @@ function On(e, t) {
2144
2171
  }
2145
2172
  return n.length > r.length;
2146
2173
  }
2147
- function vn(e, t) {
2174
+ function $n(e, t) {
2148
2175
  if (typeof e != "string") return null;
2149
2176
  let n = null;
2150
2177
  for (const r of t)
2151
- Mn(r.pattern).test(e) && (!n || On(r.pattern, n.pattern)) && (n = r);
2152
- return n ? { ...n, params: { ...n.props, ...kn(n.pattern, e) } } : null;
2178
+ On(r.pattern).test(e) && (!n || Rn(r.pattern, n.pattern)) && (n = r);
2179
+ return n ? { ...n, params: { ...n.props, ...Nn(n.pattern, e) } } : null;
2153
2180
  }
2154
- function ga(e, t) {
2155
- return vn(e, t) !== null;
2181
+ function ka(e, t) {
2182
+ return $n(e, t) !== null;
2156
2183
  }
2157
- const ha = "sync-source", ya = "sync-target", Aa = 20, Nn = {
2184
+ const Ca = "sync-source", Oa = "sync-target", Na = 20, xn = {
2158
2185
  afrikaans: [
2159
2186
  "[Muziek]",
2160
2187
  "(C) TV GELDERLAND 2021",
@@ -2304,14 +2331,14 @@ const ha = "sync-source", ya = "sync-target", Aa = 20, Nn = {
2304
2331
  "[MÚSICA]",
2305
2332
  "[Music cuts in British]"
2306
2333
  ]
2307
- }, Rn = (e) => {
2334
+ }, Ln = (e) => {
2308
2335
  let t = e;
2309
- return Object.values(Nn).forEach((n) => {
2336
+ return Object.values(xn).forEach((n) => {
2310
2337
  n.forEach((r) => {
2311
2338
  t = t.replaceAll(r, "");
2312
2339
  });
2313
2340
  }), t = t.replace(/\(.*?\)/g, ""), t = t.replace(/\[.*?\]/g, ""), t;
2314
- }, $n = 6e4, xn = 8e3, Ln = 2, Dn = 0.4, Pn = 3, Un = /* @__PURE__ */ new Set([
2341
+ }, Dn = 6e4, Pn = 8e3, Un = 2, Kn = 0.4, Gn = 3, jn = /* @__PURE__ */ new Set([
2315
2342
  "aan",
2316
2343
  "als",
2317
2344
  "ben",
@@ -2424,13 +2451,13 @@ const ha = "sync-source", ya = "sync-target", Aa = 20, Nn = {
2424
2451
  "you",
2425
2452
  "your"
2426
2453
  ]);
2427
- function Kn(e) {
2454
+ function Bn(e) {
2428
2455
  const t = /* @__PURE__ */ new Set();
2429
2456
  for (const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))
2430
- n.length < Pn || Un.has(n) || t.add(n);
2457
+ n.length < Gn || jn.has(n) || t.add(n);
2431
2458
  return [...t];
2432
2459
  }
2433
- function jn(e, t) {
2460
+ function Hn(e, t) {
2434
2461
  if (!e.length) return 0;
2435
2462
  if (!t.length) return 1;
2436
2463
  const n = new Set(t), r = new Set(e);
@@ -2438,38 +2465,38 @@ function jn(e, t) {
2438
2465
  for (const o of r) n.has(o) || (i += 1);
2439
2466
  return i / r.size;
2440
2467
  }
2441
- function Gn(e, t = $n) {
2468
+ function Fn(e, t = Dn) {
2442
2469
  const n = e.filter((a) => !a.partial && typeof a.text == "string");
2443
2470
  if (!n.length) return { text: "", segmentCount: 0 };
2444
2471
  const i = n.reduce((a, s) => Math.max(a, s.endedAt ?? 0), 0) - t;
2445
- return { text: n.filter((a) => (a.endedAt ?? 0) >= i).map((a) => Rn(a.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
2472
+ return { text: n.filter((a) => (a.endedAt ?? 0) >= i).map((a) => Ln(a.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
2446
2473
  }
2447
- const Bn = 60;
2448
- function ba(e, t, n = Bn) {
2474
+ const Vn = 60;
2475
+ function va(e, t, n = Vn) {
2449
2476
  const r = new Set(e), i = [...e];
2450
2477
  for (const o of t)
2451
2478
  !o || r.has(o) || (r.add(o), i.push(o));
2452
2479
  return i.slice(-n);
2453
2480
  }
2454
- function Ea(e) {
2481
+ function Ra(e) {
2455
2482
  const { segments: t, now: n, state: r } = e;
2456
- if (r.lastTriggerAt && n - r.lastTriggerAt < xn)
2483
+ if (r.lastTriggerAt && n - r.lastTriggerAt < Pn)
2457
2484
  return { trigger: !1, reason: "too_soon" };
2458
- const i = Gn(t, e.windowMs);
2485
+ const i = Fn(t, e.windowMs);
2459
2486
  if (!i.text) return { trigger: !1, reason: "no_speech" };
2460
2487
  const o = i.segmentCount - (r.lastSegmentCount ?? 0);
2461
- if (r.lastQueryTerms && o < Ln)
2488
+ if (r.lastQueryTerms && o < Un)
2462
2489
  return { trigger: !1, reason: "too_few_new" };
2463
- const a = Kn(i.text);
2464
- return a.length ? r.lastQueryTerms?.length && jn(a, r.lastQueryTerms) < Dn ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: i.text, terms: a, segmentCount: i.segmentCount } : { trigger: !1, reason: "no_speech" };
2490
+ const a = Bn(i.text);
2491
+ return a.length ? r.lastQueryTerms?.length && Hn(a, r.lastQueryTerms) < Kn ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: i.text, terms: a, segmentCount: i.segmentCount } : { trigger: !1, reason: "no_speech" };
2465
2492
  }
2466
- const Sa = [
2493
+ const $a = [
2467
2494
  "personal",
2468
2495
  "workspace",
2469
2496
  "connections",
2470
2497
  "work",
2471
2498
  "ai"
2472
- ], _a = "navNotice", D = {
2499
+ ], xa = "navNotice", D = {
2473
2500
  // The lower bounds are deliberately generous: service ranges (0800/0900) are
2474
2501
  // shorter than geographic numbers, and a too-strict minimum silently drops them.
2475
2502
  // An over-permissive key is harmless — it simply matches nothing.
@@ -2492,7 +2519,7 @@ const Sa = [
2492
2519
  PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
2493
2520
  US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
2494
2521
  CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
2495
- }, Hn = "NL", Fn = 15, Wn = 8, Vn = Array.from(
2522
+ }, Wn = "NL", zn = 15, Xn = 8, Yn = Array.from(
2496
2523
  new Set(Object.values(D).map((e) => e.callingCode))
2497
2524
  ).sort((e, t) => t.length - e.length);
2498
2525
  function re(e) {
@@ -2503,8 +2530,8 @@ function S(e, t) {
2503
2530
  return e.length >= t.nsnMin && e.length <= t.nsnMax;
2504
2531
  }
2505
2532
  function ie(e) {
2506
- if (e.length > Fn) return null;
2507
- for (const t of Vn) {
2533
+ if (e.length > zn) return null;
2534
+ for (const t of Yn) {
2508
2535
  if (!e.startsWith(t)) continue;
2509
2536
  const n = e.slice(t.length);
2510
2537
  for (const r of Object.values(D)) {
@@ -2514,16 +2541,16 @@ function ie(e) {
2514
2541
  }
2515
2542
  return null;
2516
2543
  }
2517
- return e.length < Wn ? null : `+${e}`;
2544
+ return e.length < Xn ? null : `+${e}`;
2518
2545
  }
2519
- function zn(e) {
2546
+ function qn(e) {
2520
2547
  let t = e.trim();
2521
2548
  const n = t.match(/^(sips?|tel|whatsapp):/i);
2522
2549
  n && (t = t.slice(n[0].length));
2523
2550
  const r = t.indexOf("@");
2524
2551
  return r >= 0 && (t = t.slice(0, r)), t.trim();
2525
2552
  }
2526
- function Ta(e) {
2553
+ function La(e) {
2527
2554
  if (!e) return !1;
2528
2555
  const t = e.indexOf("@");
2529
2556
  if (t <= 0) return !1;
@@ -2532,13 +2559,13 @@ function Ta(e) {
2532
2559
  }
2533
2560
  function oe(e, t) {
2534
2561
  if (!e) return null;
2535
- const n = zn(e);
2562
+ const n = qn(e);
2536
2563
  if (!n) return null;
2537
2564
  const r = n.startsWith("+"), i = n.replace(/\D/g, "");
2538
2565
  if (!i) return null;
2539
2566
  if (r) return ie(i);
2540
2567
  if (i.startsWith("00")) return ie(i.slice(2));
2541
- const o = re(t) ?? re(Hn);
2568
+ const o = re(t) ?? re(Wn);
2542
2569
  if (!o) return null;
2543
2570
  const a = o.trunkPrefix;
2544
2571
  if (a && i.startsWith(a)) {
@@ -2551,22 +2578,22 @@ function oe(e, t) {
2551
2578
  }
2552
2579
  return !a && S(i, o) ? `+${o.callingCode}${i}` : null;
2553
2580
  }
2554
- function Ia(e, t = 9) {
2581
+ function Da(e, t = 9) {
2555
2582
  const n = (e ?? "").replace(/\D/g, "");
2556
2583
  return n.length < t ? null : n.slice(-t);
2557
2584
  }
2558
- function Ne(e) {
2585
+ function Re(e) {
2559
2586
  if (!e) return null;
2560
2587
  const t = e.trim().toLowerCase(), n = t.lastIndexOf("@");
2561
2588
  if (n <= 0 || n === t.length - 1) return null;
2562
2589
  const r = t.slice(0, n).split("+")[0], i = t.slice(n + 1);
2563
2590
  return !r || !i.includes(".") ? null : `${r}@${i}`;
2564
2591
  }
2565
- function wa(e) {
2566
- const t = Ne(e);
2592
+ function Pa(e) {
2593
+ const t = Re(e);
2567
2594
  return t ? t.slice(t.lastIndexOf("@") + 1) : null;
2568
2595
  }
2569
- const Xn = /* @__PURE__ */ new Set([
2596
+ const Jn = /* @__PURE__ */ new Set([
2570
2597
  "co.uk",
2571
2598
  "org.uk",
2572
2599
  "gov.uk",
@@ -2576,14 +2603,14 @@ const Xn = /* @__PURE__ */ new Set([
2576
2603
  "com.br",
2577
2604
  "co.za"
2578
2605
  ]);
2579
- function Yn(e) {
2606
+ function Zn(e) {
2580
2607
  if (!e) return null;
2581
2608
  const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
2582
2609
  if (t.length < 2) return null;
2583
2610
  const n = t.slice(-2).join(".");
2584
- return Xn.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
2611
+ return Jn.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
2585
2612
  }
2586
- const qn = /* @__PURE__ */ new Set([
2613
+ const Qn = /* @__PURE__ */ new Set([
2587
2614
  "gmail.com",
2588
2615
  "googlemail.com",
2589
2616
  "outlook.com",
@@ -2628,16 +2655,16 @@ const qn = /* @__PURE__ */ new Set([
2628
2655
  "proximus.be",
2629
2656
  "scarlet.be"
2630
2657
  ]);
2631
- function Ma(e) {
2632
- const t = Yn(e);
2633
- return t ? qn.has(t) : !1;
2658
+ function Ua(e) {
2659
+ const t = Zn(e);
2660
+ return t ? Qn.has(t) : !1;
2634
2661
  }
2635
- function ka(e) {
2662
+ function Ka(e) {
2636
2663
  if (!e) return !1;
2637
2664
  const t = e.trim().toLowerCase();
2638
2665
  return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
2639
2666
  }
2640
- function Ca(e, t, n) {
2667
+ function Ga(e, t, n) {
2641
2668
  if (!e || !t) return null;
2642
2669
  const r = e.trim().toLowerCase();
2643
2670
  if (r === "tel" || r === "sms" || r === "whatsapp") {
@@ -2649,13 +2676,13 @@ function Ca(e, t, n) {
2649
2676
  return o ? `fax:${o}` : null;
2650
2677
  }
2651
2678
  if (r === "mailto" || r === "email") {
2652
- const o = Ne(t);
2679
+ const o = Re(t);
2653
2680
  return o ? `mailto:${o}` : null;
2654
2681
  }
2655
2682
  const i = t.trim().toLowerCase();
2656
2683
  return i ? `${r}:${i}` : null;
2657
2684
  }
2658
- const Jn = [
2685
+ const er = [
2659
2686
  /<blockquote/i,
2660
2687
  /class="?gmail_quote/i,
2661
2688
  // Gmail quote container
@@ -2668,67 +2695,72 @@ const Jn = [
2668
2695
  // Outlook underscore separator before "From:"
2669
2696
  /\bOn\b[\s\S]{0,200}?\bwrote:/i
2670
2697
  // Gmail "On <date> <name> wrote:"
2671
- ], ae = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, Zn = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
2672
- function Qn(e) {
2698
+ ], ae = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, tr = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
2699
+ function nr(e) {
2673
2700
  const t = e.split(`
2674
2701
  `);
2675
2702
  for (let n = 0; n < t.length; n++)
2676
- if (Zn.test(t[n]) || ae.test(t[n]) && t.slice(n + 1, n + 4).some((r) => ae.test(r)))
2703
+ if (tr.test(t[n]) || ae.test(t[n]) && t.slice(n + 1, n + 4).some((r) => ae.test(r)))
2677
2704
  return t.slice(0, n).join(`
2678
2705
  `).trim();
2679
2706
  return e;
2680
2707
  }
2681
- const er = /^(?:https?:|mailto:|tel:)/i, tr = /^(?:https?:|cid:|data:image\/)/i;
2682
- function v(e, t) {
2708
+ const rr = /^(?:https?:|mailto:|tel:)/i, ir = /^(?:https?:|cid:|data:image\/)/i;
2709
+ function N(e, t) {
2683
2710
  const n = e.match(new RegExp(`\\b${t}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s">]+))`, "i"));
2684
2711
  return (n?.[1] ?? n?.[2] ?? n?.[3] ?? "").trim();
2685
2712
  }
2686
- const nr = /(!\[[^\]]*\]\([^)]*\))/;
2713
+ const or = /(!\[[^\]]*\]\([^)]*\))/;
2687
2714
  function se(e) {
2688
- return e.replace(/\s+/g, " ").trim().split(nr).map((t, n) => n % 2 === 1 ? t : t.replace(/[[\]]/g, "\\$&")).join("");
2715
+ return e.replace(/\s+/g, " ").trim().split(or).map((t, n) => n % 2 === 1 ? t : t.replace(/[[\]]/g, "\\$&")).join("");
2689
2716
  }
2690
- function N(e) {
2717
+ function v(e) {
2691
2718
  return e.replace(
2692
2719
  /[()\s<>"]/g,
2693
2720
  (t) => `%${t.charCodeAt(0).toString(16).toUpperCase().padStart(2, "0")}`
2694
2721
  );
2695
2722
  }
2696
- function rr(e) {
2723
+ function ar(e) {
2697
2724
  return e.replace(/<img\b([^>]*?)\/?>/gi, (n, r) => {
2698
- const i = v(r, "src");
2699
- return tr.test(i) ? `![${se(v(r, "alt"))}](${N(i)})` : "";
2725
+ const i = N(r, "src");
2726
+ return ir.test(i) ? `![${se(N(r, "alt"))}](${v(i)})` : "";
2700
2727
  }).replace(
2701
2728
  /<a\b([^>]*)>([\s\S]*?)<\/a\s*>/gi,
2702
2729
  (n, r, i) => {
2703
- const o = se(i.replace(/<[^>]*>/g, "")), a = v(r, "href");
2704
- return er.test(a) ? `[${o || N(a)}](${N(a)})` : o;
2730
+ const o = se(i.replace(/<[^>]*>/g, "")), a = N(r, "href");
2731
+ return rr.test(a) ? `[${o || v(a)}](${v(a)})` : o;
2705
2732
  }
2706
2733
  );
2707
2734
  }
2708
- const ir = /<table\b[^>]*>((?:(?!<table\b)[\s\S])*?)<\/table\s*>/i, or = /<tr\b[^>]*>([\s\S]*?)<\/tr\s*>/gi, ar = /<(t[dh])\b([^>]*)>([\s\S]*?)<\/\1\s*>/gi, sr = /<(?:div|p|table|ul|ol|h[1-6])\b/i, cr = 40;
2709
- function lr(e) {
2735
+ const sr = /<table\b[^>]*>((?:(?!<table\b)[\s\S])*?)<\/table\s*>/i, cr = /<tr\b[^>]*>([\s\S]*?)<\/tr\s*>/gi, lr = /<(t[dh])\b([^>]*)>([\s\S]*?)<\/\1\s*>/gi;
2736
+ function ur(e, t) {
2737
+ return /<table\b/i.test(e) || e.includes(`
2738
+
2739
+ |`) || t.includes("![") || t.length > 200;
2740
+ }
2741
+ const dr = 40, pr = { left: "---", center: ":---:", right: "---:" };
2742
+ function fr(e) {
2743
+ const t = e.match(/align\s*[=:]\s*["']?\s*(right|center)/i);
2744
+ return t ? t[1].toLowerCase() : "left";
2745
+ }
2746
+ function mr(e) {
2710
2747
  return e.replace(/<[^>]*>/g, "").replace(/\s+/g, " ").trim().replace(/\|/g, "\\|");
2711
2748
  }
2712
- function ur(e) {
2749
+ function gr(e) {
2713
2750
  const t = [];
2714
- for (const a of e.matchAll(or)) {
2751
+ for (const a of e.matchAll(cr)) {
2715
2752
  const s = [];
2716
- for (const c of a[1].matchAll(ar)) {
2717
- if (sr.test(c[3])) return null;
2718
- s.push({
2719
- text: lr(c[3]),
2720
- // Excel writes both shapes, and a column of figures reads wrong ragged.
2721
- right: /align\s*[=:]\s*["']?\s*right/i.test(c[2])
2722
- });
2753
+ for (const c of a[1].matchAll(lr)) {
2754
+ const l = mr(c[3]);
2755
+ if (ur(c[3], l)) return null;
2756
+ s.push({ text: l, align: fr(c[2]) });
2723
2757
  }
2724
2758
  if (s.length === 0) return null;
2725
2759
  s.some((c) => c.text !== "") && t.push(s);
2726
2760
  }
2727
- const n = t.reduce((a, s) => Math.max(a, s.length), 0);
2728
- if (t.length < 2 || n < 2) return null;
2729
- const r = (a) => `| ${Array.from({ length: n }, (s, c) => a[c]?.text ?? "").join(" | ")} |`, i = Array.from({ length: n }, (a, s) => t[1][s]?.right ? "---:" : "---").join(
2730
- " | "
2731
- ), o = t.slice(1).map(r).join(`
2761
+ const n = t[0]?.length ?? 0;
2762
+ if (t.length < 2 || n < 2 || t.some((a) => a.length !== n)) return null;
2763
+ const r = (a) => `| ${a.map((s) => s.text).join(" | ")} |`, i = t[1].map((a) => pr[a.align]).join(" | "), o = t.slice(1).map(r).join(`
2732
2764
  `);
2733
2765
  return `
2734
2766
 
@@ -2738,12 +2770,20 @@ ${o}
2738
2770
 
2739
2771
  `;
2740
2772
  }
2741
- function dr(e) {
2773
+ function hr(e) {
2774
+ return e.replace(/<\/(t[dh])\s*>/gi, " ").replace(/<\/tr\s*>/gi, `
2775
+ `).replace(/<(?:tbody|thead|tfoot|caption|colgroup|col|tr|t[dh])\b[^>]*>/gi, "").replace(/<\/(?:tbody|thead|tfoot|caption|colgroup)\s*>/gi, "");
2776
+ }
2777
+ function yr(e) {
2742
2778
  let t = e;
2743
- for (let n = 0; n < cr; n++) {
2744
- const r = ir.exec(t);
2779
+ for (let n = 0; n < dr; n++) {
2780
+ const r = sr.exec(t);
2745
2781
  if (!r || r.index === void 0) break;
2746
- const o = ur(r[1]) ?? `<div>${r[1]}</div>`;
2782
+ const o = gr(r[1]) ?? `
2783
+
2784
+ ${hr(r[1])}
2785
+
2786
+ `;
2747
2787
  t = t.slice(0, r.index) + o + t.slice(r.index + r[0].length);
2748
2788
  }
2749
2789
  return t;
@@ -2751,7 +2791,7 @@ function dr(e) {
2751
2791
  function ce(e, t) {
2752
2792
  let n = e;
2753
2793
  return n = n.replace(/<(script|style)[\s\S]*?<\/\1>/gi, ""), n = n.replace(/<!--[\s\S]*?-->/g, ""), n = n.replace(/<br\s*\/?>/gi, `
2754
- `), t && (n = dr(rr(n))), n = n.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
2794
+ `), t && (n = yr(ar(n))), n = n.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
2755
2795
 
2756
2796
  `), n = n.replace(/<\/(div|li|tr)>/gi, `
2757
2797
  `), n = n.replace(/<\/(td|th)>/gi, " "), n = n.replace(/<[^>]+>/g, ""), n = n.replace(/<[^>]*$/, ""), n;
@@ -2759,8 +2799,30 @@ function ce(e, t) {
2759
2799
  function le(e) {
2760
2800
  return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
2761
2801
  }
2802
+ const Ar = {
2803
+ euro: "€",
2804
+ pound: "£",
2805
+ yen: "¥",
2806
+ cent: "¢",
2807
+ copy: "©",
2808
+ reg: "®",
2809
+ trade: "™",
2810
+ deg: "°",
2811
+ plusmn: "±",
2812
+ times: "×",
2813
+ middot: "·",
2814
+ bull: "•",
2815
+ hellip: "…",
2816
+ mdash: "—",
2817
+ ndash: "–",
2818
+ lsquo: "‘",
2819
+ rsquo: "’",
2820
+ ldquo: "“",
2821
+ rdquo: "”",
2822
+ apos: "'"
2823
+ };
2762
2824
  function ue(e) {
2763
- return e.replace(/&nbsp;/gi, " ").replace(/&lt;/gi, "<").replace(/&gt;/gi, ">").replace(/&quot;/gi, '"').replace(/&#(\d+);/g, (t, n) => le(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => le(parseInt(n, 16)) ?? t).replace(/&amp;/gi, "&");
2825
+ return e.replace(/&nbsp;/gi, " ").replace(/&([a-z]+);/gi, (t, n) => Ar[n.toLowerCase()] ?? t).replace(/&lt;/gi, "<").replace(/&gt;/gi, ">").replace(/&quot;/gi, '"').replace(/&#(\d+);/g, (t, n) => le(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => le(parseInt(n, 16)) ?? t).replace(/&amp;/gi, "&");
2764
2826
  }
2765
2827
  function de(e) {
2766
2828
  return e.replace(/\r/g, "").replace(/[ \t]+/g, " ").replace(/ *\n */g, `
@@ -2768,337 +2830,343 @@ function de(e) {
2768
2830
 
2769
2831
  `).trim();
2770
2832
  }
2771
- const pr = /<\s*(html|body|div|p|table|br|span)\b/i;
2772
- function Oa(e) {
2773
- return pr.test(e);
2833
+ const br = /<\s*(html|body|div|p|table|br|span)\b/i;
2834
+ function ja(e) {
2835
+ return br.test(e);
2774
2836
  }
2775
- function va(e) {
2776
- return Re(e, !1);
2837
+ function Ba(e) {
2838
+ return $e(e, !1);
2777
2839
  }
2778
- function Na(e) {
2779
- return Re(e, !0);
2840
+ function Ha(e) {
2841
+ return $e(e, !0);
2780
2842
  }
2781
- function Re(e, t) {
2843
+ function $e(e, t) {
2782
2844
  if (typeof e != "string" || !e) return "";
2783
2845
  let n = e.length;
2784
- for (const a of Jn) {
2846
+ for (const a of er) {
2785
2847
  const s = e.search(a);
2786
2848
  s >= 0 && s < n && (n = s);
2787
2849
  }
2788
2850
  const r = e.slice(0, n);
2789
2851
  let i = de(ue(ce(r, t)));
2790
- return i || (i = de(ue(ce(e, t)))), Qn(i) || i;
2852
+ return i || (i = de(ue(ce(e, t)))), nr(i) || i;
2791
2853
  }
2792
2854
  export {
2855
+ oi as ACTIVE_ASSIGNMENT_STATUSES,
2793
2856
  m as ACTIVITY_CATALOG,
2794
- hn as AI_ATTACHMENT_LIMITS,
2795
- ko as AI_ATTACHMENT_MAX_PER_TURN,
2796
- Mo as AI_ATTACHMENT_TURN_BUDGET,
2857
+ bn as AI_ATTACHMENT_LIMITS,
2858
+ Po as AI_ATTACHMENT_MAX_PER_TURN,
2859
+ Do as AI_ATTACHMENT_TURN_BUDGET,
2797
2860
  fe as AI_VENDORS,
2798
- tt as ALLOWED_LINK_SCHEMES,
2799
- na as APP_PERMISSIONS,
2861
+ nt as ALLOWED_LINK_SCHEMES,
2862
+ pa as APP_PERMISSIONS,
2800
2863
  F as ARTIFACT_MAX_BLOCKS,
2801
- Fr as ARTIFACT_MAX_BODY_BYTES,
2864
+ Jr as ARTIFACT_MAX_BODY_BYTES,
2802
2865
  C as ARTIFACT_MAX_CELL_LEN,
2803
2866
  X as ARTIFACT_MAX_KPI_ITEMS,
2804
- W as ARTIFACT_MAX_LIST_ITEMS,
2867
+ V as ARTIFACT_MAX_LIST_ITEMS,
2805
2868
  z as ARTIFACT_MAX_TABLE_COLUMNS,
2806
- V as ARTIFACT_MAX_TABLE_ROWS,
2869
+ W as ARTIFACT_MAX_TABLE_ROWS,
2807
2870
  ge as ARTIFACT_MAX_TEXT_LEN,
2808
- ut as ASSIGNMENT_SCOPE_KIND,
2809
- Ro as ASSIST_BANDS,
2810
- No as ASSIST_SOURCE_PROVIDER_GROUP,
2811
- St as ATTENTION_STATUSES,
2812
- Oe as AUTH_APP_NAME,
2813
- zt as AUTO_READY_MIN_PROPOSALS,
2814
- Xt as AUTO_READY_RATE,
2815
- Fe as ActivityTypeRegistry,
2816
- Or as BUILT_IN_ONLY,
2817
- _t as BULK_PENALTY,
2818
- xn as CADENCE_FLOOR_MS,
2819
- Ln as CADENCE_MIN_NEW_SEGMENTS,
2820
- Dn as CADENCE_MIN_NOVELTY,
2821
- $n as CADENCE_WINDOW_MS,
2822
- Fi as CLASSIFY_VARS,
2823
- Jo as CONTEXT_COLLECT_SERVICE,
2824
- Gr as CORE_DIMENSIONS,
2825
- _n as CommunicationScheme,
2826
- mt as DAY_MS,
2827
- vi as DEFAULT_MEMORY_BUDGET,
2828
- Hn as DEFAULT_PHONE_REGION,
2829
- Vi as EMPTY_WORKFLOW,
2830
- Xo as FEATURE_FOLDER_MANAGEMENT,
2831
- Yo as FEATURE_REMOTE_SEARCH,
2832
- It as FOLLOW_UP_HOURS,
2833
- ft as HOUR_MS,
2834
- pr as HTML_BODY_RE,
2871
+ dt as ASSIGNMENT_SCOPE_KIND,
2872
+ Bo as ASSIST_BANDS,
2873
+ jo as ASSIST_SOURCE_PROVIDER_GROUP,
2874
+ It as ATTENTION_STATUSES,
2875
+ Ne as AUTH_APP_NAME,
2876
+ qt as AUTO_READY_MIN_PROPOSALS,
2877
+ Jt as AUTO_READY_RATE,
2878
+ Ve as ActivityTypeRegistry,
2879
+ Dr as BUILT_IN_ONLY,
2880
+ wt as BULK_PENALTY,
2881
+ Pn as CADENCE_FLOOR_MS,
2882
+ Un as CADENCE_MIN_NEW_SEGMENTS,
2883
+ Kn as CADENCE_MIN_NOVELTY,
2884
+ Dn as CADENCE_WINDOW_MS,
2885
+ eo as CLASSIFY_VARS,
2886
+ sa as CONTEXT_COLLECT_SERVICE,
2887
+ Xr as CORE_DIMENSIONS,
2888
+ wn as CommunicationScheme,
2889
+ gt as DAY_MS,
2890
+ Gi as DEFAULT_MEMORY_BUDGET,
2891
+ Wn as DEFAULT_PHONE_REGION,
2892
+ no as EMPTY_WORKFLOW,
2893
+ ia as FEATURE_FOLDER_MANAGEMENT,
2894
+ oa as FEATURE_REMOTE_SEARCH,
2895
+ kt as FOLLOW_UP_HOURS,
2896
+ mt as HOUR_MS,
2897
+ br as HTML_BODY_RE,
2835
2898
  g as INELIGIBLE,
2836
- Zo as INSTALLATION_HEADER,
2837
- Bt as INTERACTION_KIND,
2838
- Vo as InteractionParticipantRole,
2839
- Rt as KB_FALLBACK_LOCALE,
2899
+ ca as INSTALLATION_HEADER,
2900
+ Vt as INTERACTION_KIND,
2901
+ na as InteractionParticipantRole,
2902
+ Lt as KB_FALLBACK_LOCALE,
2840
2903
  Z as KB_LOCALES,
2841
2904
  L as LOOSE_STATUSES,
2842
- hr as MAX_ACTIONS,
2843
- dt as MAX_ASSIGNMENT_TURNS,
2844
- fr as MAX_BLOCKS,
2845
- _e as MAX_COLLECTION_DEPTH,
2846
- mr as MAX_FIELDS,
2847
- gr as MAX_LIST_ITEMS,
2848
- Mi as MAX_MEMORY_BROWSE,
2849
- Oi as MAX_MEMORY_BUDGET,
2850
- ki as MAX_MEMORY_CHARS,
2851
- Bn as MAX_SHOWN_KEYS,
2852
- en as MAX_TOPIC_CANDIDATES,
2853
- Qt as MAX_TOPIC_EXAMPLES,
2905
+ Et as MAIL_HINT_HEADERS,
2906
+ Tr as MAX_ACTIONS,
2907
+ pt as MAX_ASSIGNMENT_TURNS,
2908
+ Er as MAX_BLOCKS,
2909
+ Te as MAX_COLLECTION_DEPTH,
2910
+ Sr as MAX_FIELDS,
2911
+ _r as MAX_LIST_ITEMS,
2912
+ Di as MAX_MEMORY_BROWSE,
2913
+ Ki as MAX_MEMORY_BUDGET,
2914
+ Pi as MAX_MEMORY_CHARS,
2915
+ Vn as MAX_SHOWN_KEYS,
2916
+ rn as MAX_TOPIC_CANDIDATES,
2917
+ nn as MAX_TOPIC_EXAMPLES,
2854
2918
  O as MAX_TOPIC_EXAMPLE_CHARS,
2855
- Ci as MIN_MEMORY_BUDGET,
2856
- _a as NAV_NOTICE_SLOT,
2857
- ea as NOTIFICATION_SOURCE_PROVIDER_GROUP,
2858
- Ri as ONBOARDING_SOURCE_PROVIDER_GROUP,
2919
+ Ui as MIN_MEMORY_BUDGET,
2920
+ xa as NAV_NOTICE_SLOT,
2921
+ ua as NOTIFICATION_SOURCE_PROVIDER_GROUP,
2922
+ Bi as ONBOARDING_SOURCE_PROVIDER_GROUP,
2859
2923
  D as PHONE_REGIONS,
2860
- ke as PRESENCE_ONLINE_WINDOW_MS,
2861
- In as PRESENCE_SURVIVES_OFFLINE,
2862
- xi as PROFILE_TOOL_DISPOSITIONS,
2863
- Wo as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
2864
- Fo as PROVIDER_FEATURE_MESSAGE_WINDOW,
2865
- qn as PUBLIC_EMAIL_DOMAINS,
2924
+ Ce as PRESENCE_ONLINE_WINDOW_MS,
2925
+ kn as PRESENCE_SURVIVES_OFFLINE,
2926
+ Fi as PROFILE_TOOL_DISPOSITIONS,
2927
+ ta as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
2928
+ ea as PROVIDER_FEATURE_MESSAGE_WINDOW,
2929
+ Qn as PUBLIC_EMAIL_DOMAINS,
2866
2930
  Q as READ_STEP_TYPES,
2867
- Lt as RELATED_SUBJECT_KINDS,
2868
- Me as RESERVED_STATUS_KEYS,
2869
- ua as RESOURCE_ATTACHED_SERVICE,
2870
- sa as RESOURCE_DESCRIBE_SERVICE,
2871
- la as RESOURCE_RESOLVE_SERVICE,
2872
- ca as RESOURCE_SEARCH_SERVICE,
2873
- Sa as SETTINGS_CATEGORIES,
2874
- ri as SIGNATURE_INTENTS,
2875
- Tt as SLA_HOURS_BY_PRIORITY,
2876
- Wt as STEP_MAX_TOKENS_MAX,
2877
- Ft as STEP_MAX_TOKENS_MIN,
2931
+ Ut as RELATED_SUBJECT_KINDS,
2932
+ ke as RESERVED_STATUS_KEYS,
2933
+ Ea as RESOURCE_ATTACHED_SERVICE,
2934
+ ya as RESOURCE_DESCRIBE_SERVICE,
2935
+ ba as RESOURCE_RESOLVE_SERVICE,
2936
+ Aa as RESOURCE_SEARCH_SERVICE,
2937
+ Ta as SCOPE_READ_ROUTE,
2938
+ _a as SCOPE_RELATED_ROUTE,
2939
+ $a as SETTINGS_CATEGORIES,
2940
+ di as SIGNATURE_INTENTS,
2941
+ Mt as SLA_HOURS_BY_PRIORITY,
2942
+ Xt as STEP_MAX_TOKENS_MAX,
2943
+ zt as STEP_MAX_TOKENS_MIN,
2878
2944
  bt as SUMMARY_MIN_LAST_CHARS,
2879
2945
  At as SUMMARY_MIN_MESSAGES,
2880
- Aa as SYNC_RUN_MAX_ERRORS,
2881
- ha as SYNC_SOURCE_PROVIDER_GROUP,
2882
- ya as SYNC_TARGET_PROVIDER_GROUP,
2883
- lt as TERMINAL_ASSIGNMENT_STATUSES,
2884
- Yt as TERMINAL_RUN_STATUSES,
2885
- Hi as TRIGGER_VARS,
2886
- qo as UNSUPPORTED,
2887
- Je as USAGE_DIMENSIONS,
2888
- Ze as USAGE_DIMENSION_IDS,
2889
- $i as WORK_AREAS,
2890
- po as WORK_COMMENT_ADDED,
2891
- fo as WORK_ITEM_ASSIGNED,
2892
- an as WORK_ITEM_SCOPE_KIND,
2893
- mo as WORK_ITEM_STATUS_CHANGED,
2894
- sn as WORK_PROJECT_SCOPE_KIND,
2946
+ Na as SYNC_RUN_MAX_ERRORS,
2947
+ Ca as SYNC_SOURCE_PROVIDER_GROUP,
2948
+ Oa as SYNC_TARGET_PROVIDER_GROUP,
2949
+ ut as TERMINAL_ASSIGNMENT_STATUSES,
2950
+ Zt as TERMINAL_RUN_STATUSES,
2951
+ Qi as TRIGGER_VARS,
2952
+ aa as UNSUPPORTED,
2953
+ Ze as USAGE_DIMENSIONS,
2954
+ Qe as USAGE_DIMENSION_IDS,
2955
+ Hi as WORK_AREAS,
2956
+ _o as WORK_COMMENT_ADDED,
2957
+ To as WORK_ITEM_ASSIGNED,
2958
+ ln as WORK_ITEM_SCOPE_KIND,
2959
+ Io as WORK_ITEM_STATUS_CHANGED,
2960
+ un as WORK_PROJECT_SCOPE_KIND,
2895
2961
  _ as W_PRIORITY,
2896
- co as acceptExampleCandidate,
2897
- Pt as actingIdentityKey,
2898
- ao as activeWorkTypes,
2899
- Ar as activityIconOf,
2900
- kr as activityJoinUrl,
2962
+ bo as acceptExampleCandidate,
2963
+ Gt as actingIdentityKey,
2964
+ yo as activeWorkTypes,
2965
+ wr as activityIconOf,
2966
+ xr as activityJoinUrl,
2901
2967
  je as activitySnippet,
2902
- Ge as activityTextParams,
2903
- Mr as activityTimelineText,
2968
+ Be as activityTextParams,
2969
+ $r as activityTimelineText,
2904
2970
  We as activityTimestamp,
2905
- d as activityTypeInfo,
2906
- Pi as actorKey,
2907
- so as addExampleCandidate,
2908
- ia as agePresenceEntry,
2909
- gn as aiAttachmentKind,
2910
- Co as aiAttachmentRejection,
2971
+ p as activityTypeInfo,
2972
+ zi as actorKey,
2973
+ Ao as addExampleCandidate,
2974
+ ma as agePresenceEntry,
2975
+ An as aiAttachmentKind,
2976
+ Uo as aiAttachmentRejection,
2911
2977
  H as aiBudgetLimit,
2912
- Kr as aiBudgetPeriodKey,
2913
- Ve as aiBudgetPeriodStart,
2914
- Ur as aiBudgetState,
2915
- Pr as aiVendorAcceptsAttachment,
2916
- xr as aiVendorDefaultModel,
2917
- $r as aiVendorLabel,
2918
- Dr as aiVendorNeedsBaseUrl,
2919
- Lr as aiVendorsWith,
2978
+ Wr as aiBudgetPeriodKey,
2979
+ ze as aiBudgetPeriodStart,
2980
+ Vr as aiBudgetState,
2981
+ Fr as aiVendorAcceptsAttachment,
2982
+ jr as aiVendorDefaultModel,
2983
+ Gr as aiVendorLabel,
2984
+ Hr as aiVendorNeedsBaseUrl,
2985
+ Br as aiVendorsWith,
2920
2986
  ve as appNameFromPath,
2921
- to as applyRounding,
2922
- ii as applySignature,
2923
- Vt as approvalRate,
2924
- Vr as artifactBodyBytes,
2925
- zr as artifactOutline,
2926
- Xr as artifactToMarkdown,
2927
- Gi as assignmentMismatch,
2928
- Qr as assignmentScopeKey,
2929
- ti as assignmentSubject,
2930
- Cr as buildActivityPreview,
2931
- Ko as buildChannelIntents,
2932
- Yr as buildShareKeys,
2933
- Gn as buildWindow,
2934
- Ei as canNestUnder,
2935
- _r as carriesText,
2936
- _i as categoryLabel,
2937
- un as categoryOf,
2938
- Ho as channelKindForScheme,
2939
- br as channelKindOf,
2940
- Wi as clampStepMaxTokens,
2941
- Na as cleanMessageMarkdown,
2942
- va as cleanMessageText,
2943
- xo as compareAssistRank,
2944
- Zt as compareWorkTypes,
2945
- ni as decideAssignmentState,
2946
- Ea as decideCadence,
2947
- Po as decideIncomingCall,
2948
- $t as defaultLocaleOf,
2949
- _o as defaultStatusKey,
2950
- zo as defineIntent,
2951
- vt as depthOf,
2952
- ra as derivePresence,
2953
- Uo as disabledIntentsFromCapabilities,
2954
- eo as elapsedSeconds,
2955
- wa as emailDomain,
2956
- Ca as endpointKey,
2957
- kn as extractParams,
2958
- Kn as extractTerms,
2959
- Go as filterByEndpoint,
2960
- jo as filterByIntent,
2961
- Sn as filterByTargetScheme,
2987
+ po as applyRounding,
2988
+ pi as applySignature,
2989
+ Yt as approvalRate,
2990
+ Qr as artifactBodyBytes,
2991
+ ei as artifactOutline,
2992
+ ti as artifactToMarkdown,
2993
+ Ji as assignmentMismatch,
2994
+ si as assignmentScopeKey,
2995
+ li as assignmentSubject,
2996
+ Lr as buildActivityPreview,
2997
+ Yo as buildChannelIntents,
2998
+ ni as buildShareKeys,
2999
+ Fn as buildWindow,
3000
+ Ni as canNestUnder,
3001
+ Or as carriesText,
3002
+ Ri as categoryLabel,
3003
+ fn as categoryOf,
3004
+ Qo as channelKindForScheme,
3005
+ Mr as channelKindOf,
3006
+ to as clampStepMaxTokens,
3007
+ Ai as classifyMail,
3008
+ Ha as cleanMessageMarkdown,
3009
+ Ba as cleanMessageText,
3010
+ Fo as compareAssistRank,
3011
+ tn as compareWorkTypes,
3012
+ ui as decideAssignmentState,
3013
+ Ra as decideCadence,
3014
+ zo as decideIncomingCall,
3015
+ Dt as defaultLocaleOf,
3016
+ Ro as defaultStatusKey,
3017
+ ra as defineIntent,
3018
+ $t as depthOf,
3019
+ fa as derivePresence,
3020
+ Xo as disabledIntentsFromCapabilities,
3021
+ uo as elapsedSeconds,
3022
+ Pa as emailDomain,
3023
+ Ga as endpointKey,
3024
+ Nn as extractParams,
3025
+ Bn as extractTerms,
3026
+ Jo as filterByEndpoint,
3027
+ qo as filterByIntent,
3028
+ In as filterByTargetScheme,
2962
3029
  T as findAiVendor,
2963
- Qo as flattenLocales,
2964
- Xe as floorToPeriod,
2965
- Dt as formatActingIdentity,
2966
- ro as formatClock,
2967
- no as formatHm,
2968
- ho as formatItemKey,
2969
- ze as formatPeriod,
2970
- vo as freshSources,
2971
- vr as getActivitySeenUserIds,
2972
- oi as getContactEndpoints,
2973
- gi as getShortTitle,
2974
- mi as getUrgencyScore,
2975
- Te as heightOf,
2976
- yi as helpCenterText,
2977
- Bi as humanizeAction,
2978
- Ht as interactionIdOf,
2979
- uo as isAgentUser,
2980
- pi as isAssigned,
2981
- Zr as isAssignmentTerminal,
2982
- jt as isAssignmentTrigger,
2983
- Yi as isAutoReady,
2984
- Ot as isAwaitingThem,
2985
- Rr as isChatMessageActivity,
2986
- fi as isClosed,
2987
- Ir as isConnectedType,
2988
- pa as isDeepLink,
2989
- Nt as isDescendant,
2990
- ai as isEligible,
2991
- Nr as isEmailActivity,
2992
- Oa as isHtmlBody,
2993
- Ji as isInFlight,
2994
- Et as isInteractionUnseen,
2995
- fa as isLandingPath,
3030
+ la as flattenLocales,
3031
+ Ye as floorToPeriod,
3032
+ Kt as formatActingIdentity,
3033
+ mo as formatClock,
3034
+ fo as formatHm,
3035
+ Mo as formatItemKey,
3036
+ Xe as formatPeriod,
3037
+ Go as freshSources,
3038
+ Pr as getActivitySeenUserIds,
3039
+ fi as getContactEndpoints,
3040
+ wi as getShortTitle,
3041
+ Ii as getUrgencyScore,
3042
+ Ie as heightOf,
3043
+ ki as helpCenterText,
3044
+ Zi as humanizeAction,
3045
+ Wt as interactionIdOf,
3046
+ So as isAgentUser,
3047
+ _i as isAssigned,
3048
+ ai as isAssignmentTerminal,
3049
+ Ht as isAssignmentTrigger,
3050
+ oo as isAutoReady,
3051
+ Rt as isAwaitingThem,
3052
+ Kr as isChatMessageActivity,
3053
+ Ti as isClosed,
3054
+ vr as isConnectedType,
3055
+ Ia as isDeepLink,
3056
+ xt as isDescendant,
3057
+ mi as isEligible,
3058
+ Ur as isEmailActivity,
3059
+ ja as isHtmlBody,
3060
+ so as isInFlight,
3061
+ Tt as isInteractionUnseen,
3062
+ wa as isLandingPath,
2996
3063
  yt as isLikelyBulk,
2997
3064
  pe as isMessageShape,
2998
- Er as isMessageType,
2999
- On as isMoreSpecificPattern,
3000
- Oo as isOutwardTool,
3001
- Mt as isParked,
3002
- qt as isPaused,
3003
- Tr as isPlaybookAuthoredType,
3004
- Ma as isPublicEmailDomain,
3005
- ga as isPublicPath,
3006
- kt as isReminderActive,
3007
- Sr as isReplyableType,
3008
- ui as isSlaAtRisk,
3009
- qi as isTerminal,
3010
- ci as isThreadLongEnough,
3011
- wr as isTranscriptType,
3012
- To as isWorkClosed,
3013
- oo as isWorkTypeVisible,
3014
- bo as itemDossierKeys,
3015
- ln as ladderFor,
3016
- hi as linkLabel,
3017
- jr as listeningAllowed,
3018
- bi as localeInstruction,
3019
- Ai as localeName,
3020
- Si as localesOf,
3021
- Ta as looksLikeEmail,
3022
- Bo as matchContactToIntents,
3023
- vn as matchPublicRoute,
3024
- Ii as mcpCredentialScope,
3025
- wi as mcpToolPrefix,
3026
- ba as mergeShownKeys,
3027
- Ke as messageCountsAs,
3028
- ka as needsPhoneRegion,
3029
- Wr as normalizeArtifactBlocks,
3030
- yr as normalizeBlocks,
3031
- Ne as normalizeEmail,
3065
+ kr as isMessageType,
3066
+ Rn as isMoreSpecificPattern,
3067
+ Ko as isOutwardTool,
3068
+ Ot as isParked,
3069
+ Qt as isPaused,
3070
+ Nr as isPlaybookAuthoredType,
3071
+ Ua as isPublicEmailDomain,
3072
+ ka as isPublicPath,
3073
+ Nt as isReminderActive,
3074
+ Cr as isReplyableType,
3075
+ Ei as isSlaAtRisk,
3076
+ ao as isTerminal,
3077
+ hi as isThreadLongEnough,
3078
+ Rr as isTranscriptType,
3079
+ $o as isWorkClosed,
3080
+ ho as isWorkTypeVisible,
3081
+ Oo as itemDossierKeys,
3082
+ pn as ladderFor,
3083
+ Mi as linkLabel,
3084
+ zr as listeningAllowed,
3085
+ Oi as localeInstruction,
3086
+ Ci as localeName,
3087
+ vi as localesOf,
3088
+ La as looksLikeEmail,
3089
+ Zo as matchContactToIntents,
3090
+ $n as matchPublicRoute,
3091
+ xi as mcpCredentialScope,
3092
+ Li as mcpToolPrefix,
3093
+ va as mergeShownKeys,
3094
+ Ge as messageCountsAs,
3095
+ Ka as needsPhoneRegion,
3096
+ Zr as normalizeArtifactBlocks,
3097
+ Ir as normalizeBlocks,
3098
+ Re as normalizeEmail,
3032
3099
  h as normalizeExample,
3033
- ta as notificationPrefKey,
3034
- jn as novelty,
3035
- si as parkMarksById,
3036
- Li as parseActingIdentity,
3037
- yo as parseItemKey,
3038
- Mn as pathToRegex,
3039
- Br as periodsInRange,
3040
- Ia as phoneSuffix,
3041
- Pe as plainTextFromMarkdown,
3042
- Kt as playbookActor,
3043
- Xi as procedureOf,
3044
- Eo as projectDossierKeys,
3045
- Cn as publicBasePathFor,
3046
- ma as publicRoutePatterns,
3100
+ da as notificationPrefKey,
3101
+ Hn as novelty,
3102
+ gi as parkMarksById,
3103
+ Vi as parseActingIdentity,
3104
+ ko as parseItemKey,
3105
+ On as pathToRegex,
3106
+ Yr as periodsInRange,
3107
+ Da as phoneSuffix,
3108
+ yi as pickMailHeaders,
3109
+ Ue as plainTextFromMarkdown,
3110
+ Bt as playbookActor,
3111
+ io as procedureOf,
3112
+ No as projectDossierKeys,
3113
+ vn as publicBasePathFor,
3114
+ Ma as publicRoutePatterns,
3047
3115
  R as readPath,
3048
3116
  ee as readStepError,
3049
- wt as recencyOf,
3050
- Gt as refKey,
3051
- Yn as registrableDomain,
3052
- nn as rejectExampleCandidate,
3053
- Ni as relatedByDefault,
3054
- bn as resolveAccountCapabilities,
3117
+ Ct as recencyOf,
3118
+ Ft as refKey,
3119
+ Zn as registrableDomain,
3120
+ an as rejectExampleCandidate,
3121
+ ji as relatedByDefault,
3122
+ _n as resolveAccountCapabilities,
3055
3123
  $ as resolveActivityText,
3056
- An as resolveChannelIntents,
3057
- pt as resolveSignature,
3058
- oa as resolveWorkMode,
3059
- da as resourceKindOf,
3060
- Di as runActor,
3061
- Qi as runInteractionId,
3062
- ot as sanitizeInline,
3063
- Rn as sanitizeTranscript,
3064
- di as scoreInteraction,
3065
- go as scoreWorkItem,
3066
- Ti as selectLenses,
3067
- Do as sessionsHoldCannotReach,
3068
- Lo as sessionsToHold,
3124
+ Sn as resolveChannelIntents,
3125
+ ft as resolveSignature,
3126
+ ga as resolveWorkMode,
3127
+ Sa as resourceKindOf,
3128
+ Wi as runActor,
3129
+ lo as runInteractionId,
3130
+ at as sanitizeInline,
3131
+ Ln as sanitizeTranscript,
3132
+ Si as scoreInteraction,
3133
+ wo as scoreWorkItem,
3134
+ $i as selectLenses,
3135
+ Wo as sessionsHoldCannotReach,
3136
+ Vo as sessionsToHold,
3069
3137
  Ae as shareKeyForTeam,
3070
3138
  ye as shareKeyForUser,
3071
- qr as shareKeysForViewer,
3072
- aa as shouldRunAudioPipeline,
3073
- li as slaHoursByInbox,
3074
- Ct as slaHoursFor,
3075
- dn as sortStatuses,
3076
- yn as sourceKey,
3077
- So as statusIn,
3078
- zi as stepsOf,
3079
- Ue as stripHtml,
3080
- Zi as subjectKeyOf,
3081
- Ie as subjectOf,
3082
- $o as subjectRef,
3083
- Ao as suggestProjectKey,
3084
- ji as targetById,
3085
- Ki as targetForActivityType,
3086
- Ut as toActingIdentity,
3139
+ ri as shareKeysForViewer,
3140
+ ha as shouldRunAudioPipeline,
3141
+ bi as slaHoursByInbox,
3142
+ vt as slaHoursFor,
3143
+ mn as sortStatuses,
3144
+ En as sourceKey,
3145
+ vo as statusIn,
3146
+ ro as stepsOf,
3147
+ Ke as stripHtml,
3148
+ co as subjectKeyOf,
3149
+ we as subjectOf,
3150
+ Ho as subjectRef,
3151
+ Co as suggestProjectKey,
3152
+ qi as targetById,
3153
+ Yi as targetForActivityType,
3154
+ jt as toActingIdentity,
3087
3155
  oe as toE164,
3088
- Jr as toolSourceKinds,
3089
- rn as topicOfferedForTeam,
3090
- lo as topicsForTeam,
3091
- tn as truncateExample,
3092
- Io as uniqueWorkStatusKey,
3093
- io as uniqueWorkTypeKey,
3094
- Qe as usageMetricId,
3095
- Hr as usageMetrics,
3096
- wo as validateStatuses,
3097
- Ui as valueAtPath,
3156
+ ii as toolSourceKinds,
3157
+ sn as topicOfferedForTeam,
3158
+ Eo as topicsForTeam,
3159
+ on as truncateExample,
3160
+ xo as uniqueWorkStatusKey,
3161
+ go as uniqueWorkTypeKey,
3162
+ et as usageMetricId,
3163
+ qr as usageMetrics,
3164
+ Lo as validateStatuses,
3165
+ Xi as valueAtPath,
3098
3166
  x as waitHoursOf,
3099
- ei as wakesAssignment,
3100
- cn as workItemScopeKey,
3101
- we as workProjectScopeKey,
3102
- pn as workStatusKey,
3103
- Jt as workTypeKey
3167
+ ci as wakesAssignment,
3168
+ dn as workItemScopeKey,
3169
+ Me as workProjectScopeKey,
3170
+ gn as workStatusKey,
3171
+ en as workTypeKey
3104
3172
  };