@opencxh/domain 1.246.0 → 1.248.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/entities/business-entity/index.d.ts +1 -0
- package/dist/entities/business-entity/types.d.ts +74 -0
- package/dist/entities/business-entity/types.test.d.ts +1 -0
- package/dist/entities/catalog/types.d.ts +10 -0
- package/dist/entities/document-template/types.d.ts +13 -4
- package/dist/entities/money/tax.d.ts +9 -0
- package/dist/entities/transaction/keys.d.ts +17 -0
- package/dist/entities/transaction/keys.test.d.ts +1 -0
- package/dist/entities/transaction/types.d.ts +7 -0
- package/dist/index.cjs +17 -17
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1258 -1232
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const ai = 10, ci = 10, li = 10, ui = 5, on = /* @__PURE__ */ new Set([
|
|
2
2
|
"header",
|
|
3
3
|
"section",
|
|
4
4
|
"context",
|
|
@@ -14,7 +14,7 @@ function oe(e) {
|
|
|
14
14
|
const t = e;
|
|
15
15
|
return typeof t.key == "string" || typeof t.value == "string";
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function di(e, t = () => {
|
|
18
18
|
}) {
|
|
19
19
|
if (!Array.isArray(e)) return [];
|
|
20
20
|
const n = [];
|
|
@@ -59,9 +59,9 @@ function ls(e, t = () => {
|
|
|
59
59
|
o.items.length > 10 && (t("more than 10 list items"), o.items = o.items.slice(0, 10));
|
|
60
60
|
break;
|
|
61
61
|
case "actions": {
|
|
62
|
-
const
|
|
63
|
-
if (
|
|
64
|
-
|
|
62
|
+
const s = Array.isArray(o.elements) ? o.elements : [], i = s.filter((a) => a?.action_id && a.invoke && oe(a.text));
|
|
63
|
+
if (i.length !== s.length && t("an action without action_id, invoke or text"), i.length === 0) continue;
|
|
64
|
+
i.length > 5 && t("more than 5 actions"), o.elements = i.slice(0, 5);
|
|
65
65
|
break;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
@@ -90,7 +90,7 @@ function X(e) {
|
|
|
90
90
|
function Le(e) {
|
|
91
91
|
return e ? ` — ${Math.floor(e / 60)}m ${e % 60}s` : "";
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function se(e) {
|
|
94
94
|
return e?.split("@")?.[0] || e || "";
|
|
95
95
|
}
|
|
96
96
|
function Y(e) {
|
|
@@ -106,7 +106,7 @@ const R = {
|
|
|
106
106
|
channelKind: "voice",
|
|
107
107
|
icon: "phone",
|
|
108
108
|
snippet: () => "Gesprek gestart",
|
|
109
|
-
timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${
|
|
109
|
+
timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${se(e.payload.from)}` : `Outbound call started — ${se(e.payload.to)}`
|
|
110
110
|
},
|
|
111
111
|
VOICE_CALL_ANSWERED: {
|
|
112
112
|
shape: "event",
|
|
@@ -141,7 +141,7 @@ const R = {
|
|
|
141
141
|
channelKind: "voice",
|
|
142
142
|
icon: "phone",
|
|
143
143
|
snippet: () => "Gemiste oproep",
|
|
144
|
-
timeline: (e) => `Missed call — ${
|
|
144
|
+
timeline: (e) => `Missed call — ${se(e.payload.from)}`
|
|
145
145
|
},
|
|
146
146
|
VOICE_CALL_FAILED: {
|
|
147
147
|
shape: "event",
|
|
@@ -464,56 +464,56 @@ function Ke(e) {
|
|
|
464
464
|
const t = e.payload, n = cn(t.bodyText).trim() || t.bodySnippet?.trim() || ln(t.body ?? "");
|
|
465
465
|
return t.subject ? `${t.subject} — ${n}` : n;
|
|
466
466
|
}
|
|
467
|
-
function
|
|
467
|
+
function k(e) {
|
|
468
468
|
return R[e];
|
|
469
469
|
}
|
|
470
|
-
function
|
|
471
|
-
return
|
|
470
|
+
function pi(e) {
|
|
471
|
+
return k(e)?.icon ?? "circle";
|
|
472
472
|
}
|
|
473
|
-
function
|
|
474
|
-
return
|
|
473
|
+
function fi(e) {
|
|
474
|
+
return k(e)?.channelKind;
|
|
475
475
|
}
|
|
476
476
|
function Et(e) {
|
|
477
477
|
return e === "message" || e === "note";
|
|
478
478
|
}
|
|
479
|
-
function
|
|
480
|
-
return Et(
|
|
479
|
+
function mi(e) {
|
|
480
|
+
return Et(k(e)?.shape);
|
|
481
481
|
}
|
|
482
482
|
function It(e) {
|
|
483
483
|
return e === "note";
|
|
484
484
|
}
|
|
485
|
-
function
|
|
486
|
-
return It(
|
|
485
|
+
function hi(e) {
|
|
486
|
+
return It(k(e)?.shape);
|
|
487
487
|
}
|
|
488
|
-
function
|
|
489
|
-
return
|
|
488
|
+
function gi(e) {
|
|
489
|
+
return k(e)?.replyable === !0;
|
|
490
490
|
}
|
|
491
|
-
function
|
|
492
|
-
return
|
|
491
|
+
function yi(e) {
|
|
492
|
+
return k(e)?.carriesText === !0;
|
|
493
493
|
}
|
|
494
494
|
function un(e) {
|
|
495
|
-
return
|
|
495
|
+
return k(e)?.countsAs;
|
|
496
496
|
}
|
|
497
|
-
function
|
|
498
|
-
return
|
|
497
|
+
function bi(e) {
|
|
498
|
+
return k(e)?.playbookAuthored === !0;
|
|
499
499
|
}
|
|
500
|
-
function
|
|
501
|
-
return
|
|
500
|
+
function _i(e) {
|
|
501
|
+
return k(e)?.connected === !0;
|
|
502
502
|
}
|
|
503
|
-
function
|
|
504
|
-
const t =
|
|
503
|
+
function Ai(e) {
|
|
504
|
+
const t = k(e);
|
|
505
505
|
return t?.shape === "artifact" && t?.carriesText === !0;
|
|
506
506
|
}
|
|
507
507
|
function dn(e) {
|
|
508
|
-
const t =
|
|
508
|
+
const t = k(e.type)?.snippet;
|
|
509
509
|
return t ? t(e) : "";
|
|
510
510
|
}
|
|
511
|
-
function
|
|
512
|
-
const n =
|
|
511
|
+
function Si(e, t) {
|
|
512
|
+
const n = k(e.type)?.timeline;
|
|
513
513
|
return n ? n(e, t) : e.type.replace(/_/g, " ").toLowerCase();
|
|
514
514
|
}
|
|
515
|
-
function
|
|
516
|
-
const t =
|
|
515
|
+
function Ei(e) {
|
|
516
|
+
const t = k(e.type)?.joinUrl;
|
|
517
517
|
return t ? t(e) : void 0;
|
|
518
518
|
}
|
|
519
519
|
function fe(e, t) {
|
|
@@ -530,8 +530,8 @@ function me(e, t, n) {
|
|
|
530
530
|
if ("value" in e)
|
|
531
531
|
return fe(t, e.value) || null;
|
|
532
532
|
const r = {};
|
|
533
|
-
for (const [
|
|
534
|
-
r[
|
|
533
|
+
for (const [s, i] of Object.entries(e.params ?? {}))
|
|
534
|
+
r[s] = fe(t, i);
|
|
535
535
|
const o = n(e.key, r);
|
|
536
536
|
return o === e.key ? null : o;
|
|
537
537
|
}
|
|
@@ -547,7 +547,7 @@ function fn(e) {
|
|
|
547
547
|
const t = e.trim();
|
|
548
548
|
return t.length <= Ue ? t : `${t.slice(0, Ue - 1).trimEnd()}…`;
|
|
549
549
|
}
|
|
550
|
-
function
|
|
550
|
+
function Ii(e, t) {
|
|
551
551
|
const n = pn(t?.text, e), r = t ? me(t.text, e, (o) => o) : null;
|
|
552
552
|
return {
|
|
553
553
|
activityId: e.id,
|
|
@@ -681,20 +681,20 @@ class hn {
|
|
|
681
681
|
return this.translate;
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
|
-
const
|
|
685
|
-
function
|
|
684
|
+
const Ti = new hn();
|
|
685
|
+
function ki(e, t, n = []) {
|
|
686
686
|
const r = e.createdAt;
|
|
687
687
|
if (!r) return [];
|
|
688
688
|
const o = new Set(n);
|
|
689
|
-
return e.author.type === "user" && e.author.id && o.add(e.author.id), Object.entries(t).filter(([
|
|
689
|
+
return e.author.type === "user" && e.author.id && o.add(e.author.id), Object.entries(t).filter(([s, i]) => i >= r && !o.has(s)).map(([s]) => s);
|
|
690
690
|
}
|
|
691
691
|
function gn(e) {
|
|
692
692
|
return e.createdAt ?? 0;
|
|
693
693
|
}
|
|
694
|
-
function
|
|
694
|
+
function wi(e) {
|
|
695
695
|
return e.type === "EMAIL_RECEIVED" || e.type === "EMAIL_SENT";
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function vi(e) {
|
|
698
698
|
return e.type === "CHAT_MESSAGE_SENT" || e.type === "CHAT_MESSAGE_RECEIVED";
|
|
699
699
|
}
|
|
700
700
|
const Tt = [
|
|
@@ -790,23 +790,23 @@ const Tt = [
|
|
|
790
790
|
function te(e) {
|
|
791
791
|
return Tt.find((t) => t.id === e);
|
|
792
792
|
}
|
|
793
|
-
function
|
|
793
|
+
function Mi(e) {
|
|
794
794
|
return te(e)?.label ?? e;
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function Ci(e, t = "gpt-5-mini") {
|
|
797
797
|
return te(e)?.defaultModel ?? t;
|
|
798
798
|
}
|
|
799
|
-
function
|
|
799
|
+
function Oi(e) {
|
|
800
800
|
return Tt.filter((t) => t.capabilities.includes(e));
|
|
801
801
|
}
|
|
802
|
-
function
|
|
802
|
+
function xi(e) {
|
|
803
803
|
const t = te(e);
|
|
804
804
|
return !!t && !t.baseUrl;
|
|
805
805
|
}
|
|
806
|
-
function
|
|
806
|
+
function Ni(e, t) {
|
|
807
807
|
return t === "text" ? !0 : te(e)?.attachmentKinds?.includes(t) === !0;
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function Ri(e, t) {
|
|
810
810
|
if (!e.enabled) return "ok";
|
|
811
811
|
const n = je(e.hardLimitNanos), r = je(e.softLimitNanos);
|
|
812
812
|
return n !== void 0 && t >= n ? "hard" : r !== void 0 && t >= r ? "soft" : "ok";
|
|
@@ -818,14 +818,14 @@ function yn(e, t = "month") {
|
|
|
818
818
|
const n = new Date(e);
|
|
819
819
|
return Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), 1);
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function $i(e, t = "month") {
|
|
822
822
|
const n = new Date(yn(e, t));
|
|
823
823
|
return `${n.getUTCFullYear()}-${String(n.getUTCMonth() + 1).padStart(2, "0")}`;
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function Di(e) {
|
|
826
826
|
return e?.listeningEnabled !== !1;
|
|
827
827
|
}
|
|
828
|
-
const
|
|
828
|
+
const Li = [
|
|
829
829
|
{ id: "agent", label: "Agent", labelSource: "user" },
|
|
830
830
|
{ id: "team", label: "Team", labelSource: "team" },
|
|
831
831
|
{ id: "inbox", label: "Inbox", labelSource: "inbox" },
|
|
@@ -835,26 +835,26 @@ const Ds = [
|
|
|
835
835
|
{ id: "handledBy", label: "Afhandelaar", labelSource: "raw" },
|
|
836
836
|
{ id: "time", label: "Tijd", labelSource: "raw" }
|
|
837
837
|
];
|
|
838
|
-
function
|
|
838
|
+
function ie(e) {
|
|
839
839
|
return e < 10 ? `0${e}` : `${e}`;
|
|
840
840
|
}
|
|
841
841
|
function j(e, t) {
|
|
842
|
-
const n = new Date(e), r = `${n.getUTCFullYear()}-${
|
|
843
|
-
return t === "day" ? r : `${r}T${
|
|
842
|
+
const n = new Date(e), r = `${n.getUTCFullYear()}-${ie(n.getUTCMonth() + 1)}-${ie(n.getUTCDate())}`;
|
|
843
|
+
return t === "day" ? r : `${r}T${ie(n.getUTCHours())}`;
|
|
844
844
|
}
|
|
845
845
|
function H(e, t) {
|
|
846
846
|
const n = new Date(e);
|
|
847
847
|
return n.setUTCMinutes(0, 0, 0), t === "day" && n.setUTCHours(0), n.getTime();
|
|
848
848
|
}
|
|
849
849
|
const bn = 36e5, _n = 864e5;
|
|
850
|
-
function
|
|
850
|
+
function Pi(e, t, n) {
|
|
851
851
|
const r = n === "hour" ? bn : _n, o = [];
|
|
852
|
-
for (let
|
|
853
|
-
o.push(j(
|
|
852
|
+
for (let s = H(e, n); s <= t; s += r)
|
|
853
|
+
o.push(j(s, n));
|
|
854
854
|
return o;
|
|
855
855
|
}
|
|
856
856
|
const An = /* @__PURE__ */ new Set(["time"]);
|
|
857
|
-
function
|
|
857
|
+
function Ki(e, t, n) {
|
|
858
858
|
if (!e) return [];
|
|
859
859
|
const r = new Set(e.supportedDimensions ?? []);
|
|
860
860
|
return t.filter((o) => r.has(o.id) && !An.has(o.id)).map((o) => ({
|
|
@@ -863,11 +863,11 @@ function Ls(e, t, n) {
|
|
|
863
863
|
options: o.options?.length ? o.options : n[o.id] ?? []
|
|
864
864
|
})).filter((o) => o.options.length > 0);
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function Ui(e, t) {
|
|
867
867
|
const n = t.find((o) => o.id === e.dimensionId), r = n?.options.find((o) => o.value === e.value);
|
|
868
868
|
return `${n?.label ?? e.dimensionId} · ${r?.label ?? e.value}`;
|
|
869
869
|
}
|
|
870
|
-
function
|
|
870
|
+
function Fi(e) {
|
|
871
871
|
return { value: e.id, label: `${e.category} · ${e.label}` };
|
|
872
872
|
}
|
|
873
873
|
const Sn = [
|
|
@@ -877,7 +877,7 @@ const Sn = [
|
|
|
877
877
|
function In(e, t) {
|
|
878
878
|
return `${e}.usage.${t}`;
|
|
879
879
|
}
|
|
880
|
-
function
|
|
880
|
+
function Bi(e, t) {
|
|
881
881
|
return t.map((n) => ({
|
|
882
882
|
id: In(e, n.unit),
|
|
883
883
|
label: n.label,
|
|
@@ -892,7 +892,7 @@ function Us(e, t) {
|
|
|
892
892
|
]
|
|
893
893
|
}));
|
|
894
894
|
}
|
|
895
|
-
const
|
|
895
|
+
const kt = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), He = 200, Ge = 100, We = 200, Ve = 12, ze = 4, Xe = 10, Tn = 8, Ye = 12, wt = 4e3, q = 500, ji = 1024 * 1024, kn = /* @__PURE__ */ new Set([
|
|
896
896
|
"heading",
|
|
897
897
|
"paragraph",
|
|
898
898
|
"list",
|
|
@@ -906,14 +906,14 @@ const wt = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]
|
|
|
906
906
|
"letterhead",
|
|
907
907
|
"totals",
|
|
908
908
|
"pagebreak"
|
|
909
|
-
]),
|
|
910
|
-
function
|
|
909
|
+
]), wn = ["http:", "https:", "mailto:", "tel:"], vn = /^[a-z][a-z0-9+.-]*:/i;
|
|
910
|
+
function ve(e) {
|
|
911
911
|
const t = e.trim().replace(/^<|>$/g, "");
|
|
912
912
|
if (!t) return !1;
|
|
913
|
-
const n =
|
|
914
|
-
return n ?
|
|
913
|
+
const n = vn.exec(t)?.[0];
|
|
914
|
+
return n ? wn.includes(n.toLowerCase()) : !t.startsWith("//");
|
|
915
915
|
}
|
|
916
|
-
const
|
|
916
|
+
const Mn = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
|
|
917
917
|
function Cn(e) {
|
|
918
918
|
let t = "", n = 0;
|
|
919
919
|
for (; n < e.length; ) {
|
|
@@ -922,53 +922,53 @@ function Cn(e) {
|
|
|
922
922
|
t += e[n], n += 1;
|
|
923
923
|
continue;
|
|
924
924
|
}
|
|
925
|
-
const o = n + (r ? 2 : 1),
|
|
926
|
-
if (
|
|
925
|
+
const o = n + (r ? 2 : 1), s = qe(e, o, "[", "]");
|
|
926
|
+
if (s < 0 || e[s + 1] !== "(") {
|
|
927
927
|
t += e[n], n += 1;
|
|
928
928
|
continue;
|
|
929
929
|
}
|
|
930
|
-
const
|
|
931
|
-
if (
|
|
930
|
+
const i = qe(e, s + 2, "(", ")");
|
|
931
|
+
if (i < 0) {
|
|
932
932
|
t += e[n], n += 1;
|
|
933
933
|
continue;
|
|
934
934
|
}
|
|
935
|
-
const a = e.slice(o,
|
|
936
|
-
t += r || !
|
|
935
|
+
const a = e.slice(o, s), u = e.slice(s + 2, i).trim().split(/\s+/)[0] ?? "";
|
|
936
|
+
t += r || !ve(u) ? a : e.slice(n, i + 1), n = i + 1;
|
|
937
937
|
}
|
|
938
938
|
return t;
|
|
939
939
|
}
|
|
940
940
|
function qe(e, t, n, r) {
|
|
941
941
|
let o = 1;
|
|
942
|
-
for (let
|
|
943
|
-
if (e[
|
|
944
|
-
|
|
942
|
+
for (let s = t; s < e.length; s += 1) {
|
|
943
|
+
if (e[s] === "\\") {
|
|
944
|
+
s += 1;
|
|
945
945
|
continue;
|
|
946
946
|
}
|
|
947
|
-
if (e[
|
|
948
|
-
else if (e[
|
|
949
|
-
return
|
|
947
|
+
if (e[s] === n) o += 1;
|
|
948
|
+
else if (e[s] === r && (o -= 1, o === 0))
|
|
949
|
+
return s;
|
|
950
950
|
}
|
|
951
951
|
return -1;
|
|
952
952
|
}
|
|
953
953
|
function On(e) {
|
|
954
954
|
return Cn(e).replace(
|
|
955
|
-
|
|
956
|
-
(t, n, r) =>
|
|
955
|
+
Mn,
|
|
956
|
+
(t, n, r) => ve(r) ? t : ""
|
|
957
957
|
);
|
|
958
958
|
}
|
|
959
|
-
function T(e, t =
|
|
959
|
+
function T(e, t = wt) {
|
|
960
960
|
return typeof e == "string" ? On(e).slice(0, t) : "";
|
|
961
961
|
}
|
|
962
|
-
function xn(e, t =
|
|
962
|
+
function xn(e, t = wt) {
|
|
963
963
|
return typeof e == "string" ? e.slice(0, t) : "";
|
|
964
964
|
}
|
|
965
965
|
function U(e, t = 200) {
|
|
966
966
|
return T(e, t);
|
|
967
967
|
}
|
|
968
968
|
function Nn(e, t = "info") {
|
|
969
|
-
return typeof e == "string" &&
|
|
969
|
+
return typeof e == "string" && kt.has(e) ? e : t;
|
|
970
970
|
}
|
|
971
|
-
function
|
|
971
|
+
function Hi(e, t = () => {
|
|
972
972
|
}) {
|
|
973
973
|
if (!Array.isArray(e)) return [];
|
|
974
974
|
const n = [];
|
|
@@ -979,56 +979,56 @@ function Bs(e, t = () => {
|
|
|
979
979
|
}
|
|
980
980
|
if (!r || typeof r != "object") continue;
|
|
981
981
|
const o = r;
|
|
982
|
-
if (!
|
|
982
|
+
if (!kn.has(o.type)) {
|
|
983
983
|
t(`unknown block type ${String(o.type)}`);
|
|
984
984
|
continue;
|
|
985
985
|
}
|
|
986
|
-
const
|
|
986
|
+
const s = typeof o.block_id == "string" ? { block_id: o.block_id } : {};
|
|
987
987
|
switch (o.type) {
|
|
988
988
|
case "heading": {
|
|
989
|
-
const
|
|
990
|
-
if (!
|
|
989
|
+
const i = T(o.text);
|
|
990
|
+
if (!i) {
|
|
991
991
|
t("a heading without text");
|
|
992
992
|
continue;
|
|
993
993
|
}
|
|
994
994
|
const a = o.level === 2 || o.level === 3 ? o.level : 1;
|
|
995
|
-
n.push({ ...
|
|
995
|
+
n.push({ ...s, type: "heading", level: a, text: i });
|
|
996
996
|
break;
|
|
997
997
|
}
|
|
998
998
|
case "paragraph": {
|
|
999
|
-
const
|
|
1000
|
-
if (!
|
|
999
|
+
const i = T(o.text);
|
|
1000
|
+
if (!i) {
|
|
1001
1001
|
t("a paragraph without text");
|
|
1002
1002
|
continue;
|
|
1003
1003
|
}
|
|
1004
|
-
n.push({ ...
|
|
1004
|
+
n.push({ ...s, type: "paragraph", text: i });
|
|
1005
1005
|
break;
|
|
1006
1006
|
}
|
|
1007
1007
|
case "quote": {
|
|
1008
|
-
const
|
|
1009
|
-
if (!
|
|
1008
|
+
const i = T(o.text);
|
|
1009
|
+
if (!i) {
|
|
1010
1010
|
t("a quote without text");
|
|
1011
1011
|
continue;
|
|
1012
1012
|
}
|
|
1013
|
-
n.push({ ...
|
|
1013
|
+
n.push({ ...s, type: "quote", text: i });
|
|
1014
1014
|
break;
|
|
1015
1015
|
}
|
|
1016
1016
|
case "code": {
|
|
1017
|
-
const
|
|
1018
|
-
if (!
|
|
1017
|
+
const i = xn(o.text);
|
|
1018
|
+
if (!i) {
|
|
1019
1019
|
t("a code block without text");
|
|
1020
1020
|
continue;
|
|
1021
1021
|
}
|
|
1022
1022
|
const a = typeof o.lang == "string" ? { lang: o.lang.slice(0, 32) } : {};
|
|
1023
|
-
n.push({ ...
|
|
1023
|
+
n.push({ ...s, type: "code", ...a, text: i });
|
|
1024
1024
|
break;
|
|
1025
1025
|
}
|
|
1026
1026
|
case "divider":
|
|
1027
|
-
n.push({ ...
|
|
1027
|
+
n.push({ ...s, type: "divider" });
|
|
1028
1028
|
break;
|
|
1029
1029
|
case "list": {
|
|
1030
|
-
const
|
|
1031
|
-
for (const l of
|
|
1030
|
+
const i = Array.isArray(o.items) ? o.items : [], a = [];
|
|
1031
|
+
for (const l of i) {
|
|
1032
1032
|
if (a.length >= Ge) {
|
|
1033
1033
|
t(`more than ${Ge} list items`);
|
|
1034
1034
|
break;
|
|
@@ -1043,12 +1043,12 @@ function Bs(e, t = () => {
|
|
|
1043
1043
|
continue;
|
|
1044
1044
|
}
|
|
1045
1045
|
const u = o.style === "numbered" ? "numbered" : "bulleted";
|
|
1046
|
-
n.push({ ...
|
|
1046
|
+
n.push({ ...s, type: "list", style: u, items: a });
|
|
1047
1047
|
break;
|
|
1048
1048
|
}
|
|
1049
1049
|
case "table": {
|
|
1050
|
-
const
|
|
1051
|
-
for (const c of
|
|
1050
|
+
const i = Array.isArray(o.columns) ? o.columns : [], a = [];
|
|
1051
|
+
for (const c of i) {
|
|
1052
1052
|
if (a.length >= Ve) {
|
|
1053
1053
|
t(`more than ${Ve} table columns`);
|
|
1054
1054
|
break;
|
|
@@ -1071,7 +1071,7 @@ function Bs(e, t = () => {
|
|
|
1071
1071
|
}
|
|
1072
1072
|
const d = T(o.caption, q);
|
|
1073
1073
|
n.push({
|
|
1074
|
-
...
|
|
1074
|
+
...s,
|
|
1075
1075
|
type: "table",
|
|
1076
1076
|
columns: a,
|
|
1077
1077
|
rows: l,
|
|
@@ -1080,8 +1080,8 @@ function Bs(e, t = () => {
|
|
|
1080
1080
|
break;
|
|
1081
1081
|
}
|
|
1082
1082
|
case "kpi": {
|
|
1083
|
-
const
|
|
1084
|
-
for (const u of
|
|
1083
|
+
const i = Array.isArray(o.items) ? o.items : [], a = [];
|
|
1084
|
+
for (const u of i) {
|
|
1085
1085
|
if (a.length >= ze) {
|
|
1086
1086
|
t(`more than ${ze} kpi items`);
|
|
1087
1087
|
break;
|
|
@@ -1090,35 +1090,35 @@ function Bs(e, t = () => {
|
|
|
1090
1090
|
if (!l || !d) continue;
|
|
1091
1091
|
const c = u?.tone;
|
|
1092
1092
|
a.push(
|
|
1093
|
-
typeof c == "string" &&
|
|
1093
|
+
typeof c == "string" && kt.has(c) ? { value: l, label: d, tone: c } : { value: l, label: d }
|
|
1094
1094
|
);
|
|
1095
1095
|
}
|
|
1096
1096
|
if (a.length === 0) {
|
|
1097
1097
|
t("a kpi block without usable items");
|
|
1098
1098
|
continue;
|
|
1099
1099
|
}
|
|
1100
|
-
n.push({ ...
|
|
1100
|
+
n.push({ ...s, type: "kpi", items: a });
|
|
1101
1101
|
break;
|
|
1102
1102
|
}
|
|
1103
1103
|
case "image": {
|
|
1104
|
-
const
|
|
1105
|
-
if (!
|
|
1104
|
+
const i = typeof o.url == "string" ? o.url.trim() : "";
|
|
1105
|
+
if (!i || !ve(i)) {
|
|
1106
1106
|
t("an image without a usable url");
|
|
1107
1107
|
continue;
|
|
1108
1108
|
}
|
|
1109
1109
|
const a = T(o.alt, 200), u = T(o.caption, q);
|
|
1110
1110
|
n.push({
|
|
1111
|
-
...
|
|
1111
|
+
...s,
|
|
1112
1112
|
type: "image",
|
|
1113
|
-
url:
|
|
1113
|
+
url: i,
|
|
1114
1114
|
...a ? { alt: a } : {},
|
|
1115
1115
|
...u ? { caption: u } : {}
|
|
1116
1116
|
});
|
|
1117
1117
|
break;
|
|
1118
1118
|
}
|
|
1119
1119
|
case "letterhead": {
|
|
1120
|
-
const
|
|
1121
|
-
for (const d of
|
|
1120
|
+
const i = Array.isArray(o.fields) ? o.fields : [], a = [];
|
|
1121
|
+
for (const d of i) {
|
|
1122
1122
|
if (a.length >= Xe) {
|
|
1123
1123
|
t(`more than ${Xe} letterhead fields`);
|
|
1124
1124
|
break;
|
|
@@ -1134,7 +1134,7 @@ function Bs(e, t = () => {
|
|
|
1134
1134
|
continue;
|
|
1135
1135
|
}
|
|
1136
1136
|
n.push({
|
|
1137
|
-
...
|
|
1137
|
+
...s,
|
|
1138
1138
|
type: "letterhead",
|
|
1139
1139
|
fields: a,
|
|
1140
1140
|
...l.length > 0 ? { recipient: l } : {}
|
|
@@ -1142,7 +1142,7 @@ function Bs(e, t = () => {
|
|
|
1142
1142
|
break;
|
|
1143
1143
|
}
|
|
1144
1144
|
case "totals": {
|
|
1145
|
-
const
|
|
1145
|
+
const i = (l) => {
|
|
1146
1146
|
const d = Array.isArray(l) ? l : [], c = [];
|
|
1147
1147
|
for (const p of d) {
|
|
1148
1148
|
if (c.length >= Ye) {
|
|
@@ -1155,31 +1155,31 @@ function Bs(e, t = () => {
|
|
|
1155
1155
|
);
|
|
1156
1156
|
}
|
|
1157
1157
|
return c;
|
|
1158
|
-
}, a =
|
|
1158
|
+
}, a = i(o.rows);
|
|
1159
1159
|
if (a.length === 0 && !o.block_id) {
|
|
1160
1160
|
t("a totals block without usable rows");
|
|
1161
1161
|
continue;
|
|
1162
1162
|
}
|
|
1163
|
-
const u =
|
|
1164
|
-
n.push({ ...
|
|
1163
|
+
const u = i(o.taxRows);
|
|
1164
|
+
n.push({ ...s, type: "totals", rows: a, ...u.length > 0 ? { taxRows: u } : {} });
|
|
1165
1165
|
break;
|
|
1166
1166
|
}
|
|
1167
1167
|
case "pagebreak":
|
|
1168
|
-
n.push({ ...
|
|
1168
|
+
n.push({ ...s, type: "pagebreak" });
|
|
1169
1169
|
break;
|
|
1170
1170
|
case "callout": {
|
|
1171
|
-
const
|
|
1172
|
-
if (!
|
|
1171
|
+
const i = T(o.text);
|
|
1172
|
+
if (!i) {
|
|
1173
1173
|
t("a callout without text");
|
|
1174
1174
|
continue;
|
|
1175
1175
|
}
|
|
1176
1176
|
const a = T(o.title, 200);
|
|
1177
1177
|
n.push({
|
|
1178
|
-
...
|
|
1178
|
+
...s,
|
|
1179
1179
|
type: "callout",
|
|
1180
1180
|
tone: Nn(o.tone),
|
|
1181
1181
|
...a ? { title: a } : {},
|
|
1182
|
-
text:
|
|
1182
|
+
text: i
|
|
1183
1183
|
});
|
|
1184
1184
|
break;
|
|
1185
1185
|
}
|
|
@@ -1187,10 +1187,10 @@ function Bs(e, t = () => {
|
|
|
1187
1187
|
}
|
|
1188
1188
|
return n;
|
|
1189
1189
|
}
|
|
1190
|
-
function
|
|
1190
|
+
function Gi(e) {
|
|
1191
1191
|
return JSON.stringify(e).length;
|
|
1192
1192
|
}
|
|
1193
|
-
function
|
|
1193
|
+
function Wi(e) {
|
|
1194
1194
|
return {
|
|
1195
1195
|
blocks: e.length,
|
|
1196
1196
|
types: e.map((t) => t.type),
|
|
@@ -1201,7 +1201,7 @@ function Qe(e) {
|
|
|
1201
1201
|
return e.replace(/\|/g, "\\|").replace(/\r?\n/g, " ").trim();
|
|
1202
1202
|
}
|
|
1203
1203
|
function ae(e, t, n) {
|
|
1204
|
-
const r = e.map((o,
|
|
1204
|
+
const r = e.map((o, s) => n?.[s] === "right" ? "---:" : "---");
|
|
1205
1205
|
return [
|
|
1206
1206
|
`| ${e.map(Qe).join(" | ")} |`,
|
|
1207
1207
|
`| ${r.join(" | ")} |`,
|
|
@@ -1264,12 +1264,12 @@ function Rn(e) {
|
|
|
1264
1264
|
return ["---"];
|
|
1265
1265
|
}
|
|
1266
1266
|
}
|
|
1267
|
-
function
|
|
1267
|
+
function $n(e, t) {
|
|
1268
1268
|
const n = [], r = e.some((o) => o.type === "heading" && o.level === 1);
|
|
1269
1269
|
t && !r && n.push(`# ${t}`);
|
|
1270
1270
|
for (const o of e) {
|
|
1271
|
-
const
|
|
1272
|
-
|
|
1271
|
+
const s = Rn(o);
|
|
1272
|
+
s.length > 0 && n.push(s.join(`
|
|
1273
1273
|
`));
|
|
1274
1274
|
}
|
|
1275
1275
|
return `${n.join(`
|
|
@@ -1277,45 +1277,45 @@ function Dn(e, t) {
|
|
|
1277
1277
|
`)}
|
|
1278
1278
|
`;
|
|
1279
1279
|
}
|
|
1280
|
-
const
|
|
1281
|
-
function
|
|
1280
|
+
const vt = (e) => `user:${e}`, Mt = (e) => `team:${e}`;
|
|
1281
|
+
function Vi(e) {
|
|
1282
1282
|
const t = /* @__PURE__ */ new Set();
|
|
1283
1283
|
for (const n of e ?? [])
|
|
1284
|
-
n?.id && (n.kind === "user" && t.add(
|
|
1284
|
+
n?.id && (n.kind === "user" && t.add(vt(n.id)), n.kind === "team" && t.add(Mt(n.id)));
|
|
1285
1285
|
return [...t].sort();
|
|
1286
1286
|
}
|
|
1287
|
-
function
|
|
1288
|
-
return [
|
|
1287
|
+
function zi(e, t) {
|
|
1288
|
+
return [vt(e), ...t.map(Mt)];
|
|
1289
1289
|
}
|
|
1290
|
-
function
|
|
1290
|
+
function Xi(e) {
|
|
1291
1291
|
const t = /* @__PURE__ */ new Set();
|
|
1292
1292
|
for (const n of e ?? [])
|
|
1293
1293
|
n?.kind && t.add(n.kind);
|
|
1294
1294
|
return [...t];
|
|
1295
1295
|
}
|
|
1296
|
-
const
|
|
1297
|
-
function
|
|
1298
|
-
return
|
|
1296
|
+
const Dn = ["done", "escalated"], Yi = ["open", "waiting"];
|
|
1297
|
+
function qi(e) {
|
|
1298
|
+
return Dn.includes(e);
|
|
1299
1299
|
}
|
|
1300
1300
|
const Ln = "assignment";
|
|
1301
|
-
function
|
|
1301
|
+
function Qi(e) {
|
|
1302
1302
|
return `${Ln}:${e}`;
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1304
|
+
function Zi(e, t, n, r) {
|
|
1305
1305
|
if (e.direction === "inbound") return !0;
|
|
1306
1306
|
if (e.author?.type === "user" && e.author.id === t) return !1;
|
|
1307
1307
|
const o = e.payload?.mentions;
|
|
1308
1308
|
return Array.isArray(o) && o.includes(t) || r && r === t ? !0 : n === "reply";
|
|
1309
1309
|
}
|
|
1310
|
-
function
|
|
1310
|
+
function Ji(e) {
|
|
1311
1311
|
const { targetAuthorId: t, reactorId: n, agentId: r, on: o } = e;
|
|
1312
1312
|
return !o || !t || t !== r ? !1 : n !== r;
|
|
1313
1313
|
}
|
|
1314
|
-
function
|
|
1314
|
+
function ea(e) {
|
|
1315
1315
|
return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
|
|
1316
1316
|
}
|
|
1317
1317
|
const Pn = 12;
|
|
1318
|
-
function
|
|
1318
|
+
function ta(e, t, n = Pn) {
|
|
1319
1319
|
const r = t + 1;
|
|
1320
1320
|
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 ? {
|
|
1321
1321
|
status: "escalated",
|
|
@@ -1329,6 +1329,10 @@ function Js(e, t, n = Pn) {
|
|
|
1329
1329
|
reason: "de agent rondde zijn beurt af zonder te zeggen wat er moet gebeuren (wachten, afronden of overdragen)"
|
|
1330
1330
|
};
|
|
1331
1331
|
}
|
|
1332
|
+
const na = "organization.business-entities.list";
|
|
1333
|
+
function ra(e, t, n) {
|
|
1334
|
+
return e ? e === t : n;
|
|
1335
|
+
}
|
|
1332
1336
|
function Kn(e) {
|
|
1333
1337
|
const t = e.trim().replace(/[\s-]/g, "");
|
|
1334
1338
|
if (!/^\d+$/.test(t) || ![8, 12, 13, 14].includes(t.length)) return;
|
|
@@ -1341,7 +1345,7 @@ function Un(e) {
|
|
|
1341
1345
|
t += Number(e[n]) * (n % 2 === 0 ? 3 : 1);
|
|
1342
1346
|
return (10 - t % 10) % 10;
|
|
1343
1347
|
}
|
|
1344
|
-
function
|
|
1348
|
+
function oa(e, t) {
|
|
1345
1349
|
const n = t.trim(), r = Kn(n), o = [{ sku: n }, { barcodes: { $in: [n] } }];
|
|
1346
1350
|
return r && o.push({ gtin: r }), { organizationId: e, $or: o };
|
|
1347
1351
|
}
|
|
@@ -1353,25 +1357,25 @@ function Fn(e, t) {
|
|
|
1353
1357
|
const n = t.reduce((u, l) => u + l, 0);
|
|
1354
1358
|
if (n === 0) return t.map((u, l) => l === 0 ? e : 0);
|
|
1355
1359
|
const r = t.map((u) => e * u / n), o = r.map((u) => Math.trunc(u));
|
|
1356
|
-
let
|
|
1357
|
-
const
|
|
1358
|
-
for (let u = 0;
|
|
1359
|
-
o[
|
|
1360
|
+
let s = e - o.reduce((u, l) => u + l, 0);
|
|
1361
|
+
const i = r.map((u, l) => ({ index: l, fraction: Math.abs(u - o[l]) })).sort((u, l) => l.fraction - u.fraction), a = s < 0 ? -1 : 1;
|
|
1362
|
+
for (let u = 0; s !== 0 && u < i.length; u++)
|
|
1363
|
+
o[i[u].index] += a, s -= a;
|
|
1360
1364
|
return o;
|
|
1361
1365
|
}
|
|
1362
|
-
function
|
|
1363
|
-
const n = t.decimal ?? ",", r = t.group ?? ".", o = e < 0,
|
|
1366
|
+
function $(e, t = {}) {
|
|
1367
|
+
const n = t.decimal ?? ",", r = t.group ?? ".", o = e < 0, s = Math.abs(Math.trunc(e)).toString().padStart(3, "0"), i = s.slice(0, -2), a = s.slice(-2);
|
|
1364
1368
|
let u = "";
|
|
1365
|
-
for (let l = 0; l <
|
|
1366
|
-
l > 0 && (
|
|
1369
|
+
for (let l = 0; l < i.length; l++)
|
|
1370
|
+
l > 0 && (i.length - l) % 3 === 0 && (u += r), u += i[l];
|
|
1367
1371
|
return `${o ? "-" : ""}${u}${n}${a}`;
|
|
1368
1372
|
}
|
|
1369
|
-
function
|
|
1373
|
+
function sa(e) {
|
|
1370
1374
|
const t = e.trim().replace(/[\s ]/g, "");
|
|
1371
1375
|
if (!t) return;
|
|
1372
1376
|
const n = t.replace(/^[-+]?[^\d.,-]*/, "").replace(/[^\d.,-]+$/, ""), r = /^-/.test(t) || /-$/.test(t), o = n.replace(/-/g, "");
|
|
1373
1377
|
if (!o || !/^[\d.,]+$/.test(o)) return;
|
|
1374
|
-
const
|
|
1378
|
+
const s = o.lastIndexOf(","), i = o.lastIndexOf("."), a = Math.max(s, i), u = a === -1 ? "" : o.slice(a + 1), l = a !== -1 && u.length >= 1 && u.length <= 2, d = l ? o.slice(0, a) : o;
|
|
1375
1379
|
if (!Bn(d)) return;
|
|
1376
1380
|
const c = d.replace(/[.,]/g, ""), p = l ? u.padEnd(2, "0") : "00";
|
|
1377
1381
|
if (c === "") return;
|
|
@@ -1381,7 +1385,7 @@ function ta(e) {
|
|
|
1381
1385
|
function Bn(e) {
|
|
1382
1386
|
return /^\d+$/.test(e) ? !0 : e.includes(".") && e.includes(",") ? !1 : /^\d{1,3}([.,]\d{3})*$/.test(e);
|
|
1383
1387
|
}
|
|
1384
|
-
function
|
|
1388
|
+
function ia(e) {
|
|
1385
1389
|
return e.costPriceCents == null ? e.netCents : e.netCents - G(e.costPriceCents * e.quantity);
|
|
1386
1390
|
}
|
|
1387
1391
|
const jn = [
|
|
@@ -1406,20 +1410,20 @@ const jn = [
|
|
|
1406
1410
|
matches: (e, t) => !e.contractId && !e.companyId && !!e.segmentKey && e.segmentKey === t.segmentKey && !!e.categoryKey
|
|
1407
1411
|
}
|
|
1408
1412
|
];
|
|
1409
|
-
function
|
|
1413
|
+
function aa(e, t, n) {
|
|
1410
1414
|
const r = n.filter(
|
|
1411
1415
|
(o) => o.currency === e.currency && (o.validFrom == null || o.validFrom <= t.at) && (o.validTo == null || o.validTo >= t.at) && (o.minQuantity == null || t.quantity >= o.minQuantity) && (o.productId == null || o.productId === e.id) && (o.categoryKey == null || o.categoryKey === e.categoryKey) && (o.productId != null || o.categoryKey != null)
|
|
1412
1416
|
);
|
|
1413
1417
|
for (const o of jn) {
|
|
1414
|
-
const
|
|
1415
|
-
if (
|
|
1416
|
-
const
|
|
1418
|
+
const s = r.filter((a) => o.matches(a, t));
|
|
1419
|
+
if (s.length === 0) continue;
|
|
1420
|
+
const i = s.reduce(
|
|
1417
1421
|
(a, u) => (u.minQuantity ?? 0) >= (a.minQuantity ?? 0) ? u : a
|
|
1418
1422
|
);
|
|
1419
1423
|
return {
|
|
1420
|
-
unitPriceCents: Hn(
|
|
1421
|
-
sourceKey: (
|
|
1422
|
-
ruleId:
|
|
1424
|
+
unitPriceCents: Hn(i, e.listPriceCents),
|
|
1425
|
+
sourceKey: (i.minQuantity ?? 0) > 1 ? "tier" : o.key,
|
|
1426
|
+
ruleId: i.id
|
|
1423
1427
|
};
|
|
1424
1428
|
}
|
|
1425
1429
|
return { unitPriceCents: e.listPriceCents, sourceKey: "list" };
|
|
@@ -1427,34 +1431,34 @@ function ra(e, t, n) {
|
|
|
1427
1431
|
function Hn(e, t) {
|
|
1428
1432
|
return e.unitPriceCents != null ? e.unitPriceCents : e.discountPercent != null ? G(t * (1 - e.discountPercent / 100)) : t;
|
|
1429
1433
|
}
|
|
1430
|
-
const
|
|
1434
|
+
const ca = ["piece", "hour", "day", "month", "km", "license"], la = /* @__PURE__ */ new Set(["mail", "message"]);
|
|
1431
1435
|
function Gn(e, t) {
|
|
1432
1436
|
const n = e.settings?.signatures?.[t];
|
|
1433
1437
|
return !n?.enabled || !n.body || n.body.trim() === "" ? null : n;
|
|
1434
1438
|
}
|
|
1435
|
-
function
|
|
1439
|
+
function ua(e, t, n, r = "html") {
|
|
1436
1440
|
if (!e) return n;
|
|
1437
1441
|
const o = Gn(e, t);
|
|
1438
1442
|
return o ? `${n}${r === "text" ? `
|
|
1439
1443
|
|
|
1440
1444
|
` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${o.body}` : n;
|
|
1441
1445
|
}
|
|
1442
|
-
function
|
|
1446
|
+
function da(e) {
|
|
1443
1447
|
return e.endpoints ?? [];
|
|
1444
1448
|
}
|
|
1445
|
-
function
|
|
1449
|
+
function D(e) {
|
|
1446
1450
|
const t = (e ?? "").trim().toLowerCase();
|
|
1447
1451
|
if (t)
|
|
1448
1452
|
return t.split(/[-_]/)[0] || void 0;
|
|
1449
1453
|
}
|
|
1450
|
-
function
|
|
1451
|
-
return
|
|
1454
|
+
function pa(e) {
|
|
1455
|
+
return D(e.contactLocale) ?? D(e.companyLocale) ?? D(e.organizationLocale);
|
|
1452
1456
|
}
|
|
1453
|
-
function
|
|
1457
|
+
function fa(e, t, n, r) {
|
|
1454
1458
|
const o = e.filter((a) => a.key === t && !a.archived);
|
|
1455
1459
|
if (o.length === 0) return;
|
|
1456
|
-
const
|
|
1457
|
-
return o.find((a) =>
|
|
1460
|
+
const s = D(n), i = D(r);
|
|
1461
|
+
return o.find((a) => D(a.locale) === s) ?? o.find((a) => D(a.locale) === i) ?? // A row with no language at all is the single-language case: it is for everybody.
|
|
1458
1462
|
o.find((a) => !a.locale) ?? o[0];
|
|
1459
1463
|
}
|
|
1460
1464
|
const Wn = /\{([a-zA-Z0-9_.]+)\}/g;
|
|
@@ -1471,9 +1475,9 @@ function Vn(e) {
|
|
|
1471
1475
|
}
|
|
1472
1476
|
function zn(e, t, n) {
|
|
1473
1477
|
const r = [];
|
|
1474
|
-
return { text: e.replace(Wn, (
|
|
1475
|
-
const a = Ct(t,
|
|
1476
|
-
return a == null || a === "" ? (r.includes(
|
|
1478
|
+
return { text: e.replace(Wn, (s, i) => {
|
|
1479
|
+
const a = Ct(t, i);
|
|
1480
|
+
return a == null || a === "" ? (r.includes(i) || r.push(i), n ?? `{${i}}`) : Vn(a);
|
|
1477
1481
|
}), unresolved: r };
|
|
1478
1482
|
}
|
|
1479
1483
|
function Xn(e, t) {
|
|
@@ -1485,37 +1489,37 @@ function Xn(e, t) {
|
|
|
1485
1489
|
}
|
|
1486
1490
|
return e.equals !== void 0 ? n === e.equals : !0;
|
|
1487
1491
|
}
|
|
1488
|
-
function
|
|
1489
|
-
const
|
|
1492
|
+
function ma(e, t, n, r, o) {
|
|
1493
|
+
const s = [], i = [], a = /* @__PURE__ */ new Set(), u = (l) => {
|
|
1490
1494
|
const d = zn(l, t, o);
|
|
1491
|
-
for (const c of d.unresolved)
|
|
1495
|
+
for (const c of d.unresolved) s.includes(c) || s.push(c);
|
|
1492
1496
|
return d.text;
|
|
1493
1497
|
};
|
|
1494
1498
|
for (const l of e) {
|
|
1495
1499
|
if (l.block_id && !Xn(n?.[l.block_id], t)) continue;
|
|
1496
1500
|
const d = l.block_id ? r?.[l.block_id] : void 0;
|
|
1497
1501
|
if (d && l.block_id) {
|
|
1498
|
-
a.add(l.block_id),
|
|
1502
|
+
a.add(l.block_id), i.push(...d);
|
|
1499
1503
|
continue;
|
|
1500
1504
|
}
|
|
1501
1505
|
switch (l.type) {
|
|
1502
1506
|
case "heading":
|
|
1503
1507
|
case "paragraph":
|
|
1504
1508
|
case "quote":
|
|
1505
|
-
|
|
1509
|
+
i.push({ ...l, text: u(l.text) });
|
|
1506
1510
|
break;
|
|
1507
1511
|
case "callout":
|
|
1508
|
-
|
|
1512
|
+
i.push({
|
|
1509
1513
|
...l,
|
|
1510
1514
|
...l.title ? { title: u(l.title) } : {},
|
|
1511
1515
|
text: u(l.text)
|
|
1512
1516
|
});
|
|
1513
1517
|
break;
|
|
1514
1518
|
case "code":
|
|
1515
|
-
|
|
1519
|
+
i.push(l);
|
|
1516
1520
|
break;
|
|
1517
1521
|
case "list":
|
|
1518
|
-
|
|
1522
|
+
i.push({
|
|
1519
1523
|
...l,
|
|
1520
1524
|
items: l.items.map((c) => ({
|
|
1521
1525
|
...c.lead ? { lead: u(c.lead) } : {},
|
|
@@ -1524,7 +1528,7 @@ function ua(e, t, n, r, o) {
|
|
|
1524
1528
|
});
|
|
1525
1529
|
break;
|
|
1526
1530
|
case "table":
|
|
1527
|
-
|
|
1531
|
+
i.push({
|
|
1528
1532
|
...l,
|
|
1529
1533
|
columns: l.columns.map((c) => ({ ...c, label: u(c.label) })),
|
|
1530
1534
|
rows: l.rows.map((c) => c.map(u)),
|
|
@@ -1532,7 +1536,7 @@ function ua(e, t, n, r, o) {
|
|
|
1532
1536
|
});
|
|
1533
1537
|
break;
|
|
1534
1538
|
case "kpi":
|
|
1535
|
-
|
|
1539
|
+
i.push({
|
|
1536
1540
|
...l,
|
|
1537
1541
|
items: l.items.map((c) => ({
|
|
1538
1542
|
...c,
|
|
@@ -1542,14 +1546,14 @@ function ua(e, t, n, r, o) {
|
|
|
1542
1546
|
});
|
|
1543
1547
|
break;
|
|
1544
1548
|
case "letterhead":
|
|
1545
|
-
|
|
1549
|
+
i.push({
|
|
1546
1550
|
...l,
|
|
1547
1551
|
fields: l.fields.map((c) => ({ ...c, value: u(c.value) })),
|
|
1548
1552
|
...l.recipient ? { recipient: l.recipient.map(u) } : {}
|
|
1549
1553
|
});
|
|
1550
1554
|
break;
|
|
1551
1555
|
case "totals":
|
|
1552
|
-
|
|
1556
|
+
i.push({
|
|
1553
1557
|
...l,
|
|
1554
1558
|
rows: l.rows.map((c) => ({
|
|
1555
1559
|
...c,
|
|
@@ -1566,54 +1570,65 @@ function ua(e, t, n, r, o) {
|
|
|
1566
1570
|
});
|
|
1567
1571
|
break;
|
|
1568
1572
|
case "image":
|
|
1569
|
-
|
|
1573
|
+
i.push({
|
|
1570
1574
|
...l,
|
|
1571
1575
|
url: u(l.url),
|
|
1572
1576
|
...l.alt ? { alt: u(l.alt) } : {}
|
|
1573
1577
|
});
|
|
1574
1578
|
break;
|
|
1575
1579
|
default:
|
|
1576
|
-
|
|
1580
|
+
i.push(l);
|
|
1577
1581
|
}
|
|
1578
1582
|
}
|
|
1579
1583
|
return {
|
|
1580
|
-
blocks:
|
|
1581
|
-
unresolved:
|
|
1584
|
+
blocks: i,
|
|
1585
|
+
unresolved: s,
|
|
1582
1586
|
unusedSlots: Object.keys(r ?? {}).filter((l) => !a.has(l))
|
|
1583
1587
|
};
|
|
1584
1588
|
}
|
|
1585
|
-
function
|
|
1586
|
-
const t = e?.
|
|
1589
|
+
function Yn(e) {
|
|
1590
|
+
const t = e?.address, n = [t?.street, t?.houseNumber].filter(Boolean).join(" "), r = [t?.postalCode, t?.city].filter(Boolean).join(" ");
|
|
1587
1591
|
return {
|
|
1588
|
-
name:
|
|
1589
|
-
addressLines: [
|
|
1592
|
+
name: e?.name ?? "",
|
|
1593
|
+
addressLines: [n, r, t?.country ?? ""].filter(Boolean),
|
|
1590
1594
|
footerLines: [
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
+
e?.footerText ?? "",
|
|
1596
|
+
e?.kvkNumber ? `KvK ${e.kvkNumber}` : "",
|
|
1597
|
+
e?.vatNumber ? `Btw ${e.vatNumber}` : "",
|
|
1598
|
+
e?.iban ? `IBAN ${e.iban}` : ""
|
|
1595
1599
|
].filter(Boolean),
|
|
1596
1600
|
...e?.logo ? { logo: e.logo } : {}
|
|
1597
1601
|
};
|
|
1598
1602
|
}
|
|
1599
|
-
|
|
1603
|
+
function ha(e) {
|
|
1604
|
+
return Yn({
|
|
1605
|
+
name: e?.billing?.companyName || e?.name || e?.displayName || "",
|
|
1606
|
+
address: e?.address,
|
|
1607
|
+
kvkNumber: e?.billing?.kvkNumber,
|
|
1608
|
+
vatNumber: e?.billing?.vatNumber,
|
|
1609
|
+
iban: e?.houseStyle?.iban,
|
|
1610
|
+
footerText: e?.houseStyle?.footerText,
|
|
1611
|
+
logo: e?.logo
|
|
1612
|
+
});
|
|
1613
|
+
}
|
|
1614
|
+
const qn = 36e5, Qn = 864e5, L = -1 / 0, ga = (e) => e.score > L, J = {
|
|
1600
1615
|
urgent: 40,
|
|
1601
1616
|
high: 25,
|
|
1602
1617
|
normal: 10,
|
|
1603
1618
|
low: 0
|
|
1604
1619
|
};
|
|
1605
|
-
function
|
|
1620
|
+
function ya(e) {
|
|
1606
1621
|
return Object.fromEntries(e.map((t) => [t.resourceId, t]));
|
|
1607
1622
|
}
|
|
1608
|
-
const
|
|
1609
|
-
function
|
|
1610
|
-
return !!(e &&
|
|
1623
|
+
const Zn = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, Ot = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
|
|
1624
|
+
function Jn(e, t) {
|
|
1625
|
+
return !!(e && Zn.test(e) || t && Ot.test(t));
|
|
1611
1626
|
}
|
|
1612
|
-
const
|
|
1613
|
-
function
|
|
1614
|
-
return e >=
|
|
1627
|
+
const er = 3, tr = 600;
|
|
1628
|
+
function ba(e, t) {
|
|
1629
|
+
return e >= er || t >= tr;
|
|
1615
1630
|
}
|
|
1616
|
-
const
|
|
1631
|
+
const nr = [
|
|
1617
1632
|
"list-unsubscribe",
|
|
1618
1633
|
"list-unsubscribe-post",
|
|
1619
1634
|
"list-id",
|
|
@@ -1623,89 +1638,89 @@ const tr = [
|
|
|
1623
1638
|
"feedback-id",
|
|
1624
1639
|
"x-mailer"
|
|
1625
1640
|
];
|
|
1626
|
-
function
|
|
1641
|
+
function _a(e) {
|
|
1627
1642
|
const t = {};
|
|
1628
1643
|
for (const n of e) {
|
|
1629
1644
|
const r = n.name?.toLowerCase();
|
|
1630
|
-
r && n.value !== void 0 &&
|
|
1645
|
+
r && n.value !== void 0 && nr.includes(r) && (t[r] = n.value);
|
|
1631
1646
|
}
|
|
1632
1647
|
return t;
|
|
1633
1648
|
}
|
|
1634
|
-
const
|
|
1635
|
-
function
|
|
1649
|
+
const rr = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|notifications?|bounce|postmaster|mailer)@/i, or = /(^|[._+-])(newsletter|nieuwsbrief|marketing|mailing)@/i;
|
|
1650
|
+
function Aa(e) {
|
|
1636
1651
|
const t = e.headers ?? {}, n = e.from?.email, r = t["auto-submitted"]?.toLowerCase();
|
|
1637
|
-
if (r && r !== "no" || t["x-auto-response-suppress"] || n &&
|
|
1652
|
+
if (r && r !== "no" || t["x-auto-response-suppress"] || n && rr.test(n))
|
|
1638
1653
|
return "automated";
|
|
1639
1654
|
const o = t.precedence?.toLowerCase();
|
|
1640
|
-
if (t["list-unsubscribe"] || t["list-unsubscribe-post"] || t["list-id"] || o === "bulk" || o === "list" || e.body && Ot.test(e.body) || n &&
|
|
1655
|
+
if (t["list-unsubscribe"] || t["list-unsubscribe-post"] || t["list-id"] || o === "bulk" || o === "list" || e.body && Ot.test(e.body) || n && or.test(n))
|
|
1641
1656
|
return "marketing";
|
|
1642
1657
|
}
|
|
1643
|
-
function
|
|
1658
|
+
function sr(e, t) {
|
|
1644
1659
|
return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
|
|
1645
1660
|
}
|
|
1646
|
-
const ir = ["open"],
|
|
1661
|
+
const ir = ["open"], ar = 1e3, cr = {
|
|
1647
1662
|
urgent: 1,
|
|
1648
1663
|
high: 4,
|
|
1649
1664
|
normal: 8,
|
|
1650
1665
|
low: 24
|
|
1651
|
-
},
|
|
1652
|
-
function
|
|
1666
|
+
}, lr = 72;
|
|
1667
|
+
function ur(e) {
|
|
1653
1668
|
return e.lastActivityAt ?? (e.createdAt ? new Date(gn(e)).getTime() : 0);
|
|
1654
1669
|
}
|
|
1655
|
-
function
|
|
1656
|
-
return
|
|
1670
|
+
function dr(e, t) {
|
|
1671
|
+
return pr(t.remindersById?.[e.id], e, t.now);
|
|
1657
1672
|
}
|
|
1658
|
-
function
|
|
1673
|
+
function pr(e, t, n) {
|
|
1659
1674
|
return !e || e.remindAt <= n ? !1 : !((t.lastActivityAt ?? 0) > e.parkedAt && t.lastActivityPreview?.direction === "inbound");
|
|
1660
1675
|
}
|
|
1661
1676
|
const xt = (e) => un(e) === "outbound_message", Nt = (e) => ir.includes(e);
|
|
1662
|
-
function
|
|
1663
|
-
return Math.max(0, (t -
|
|
1677
|
+
function Me(e, t) {
|
|
1678
|
+
return Math.max(0, (t - ur(e)) / qn);
|
|
1664
1679
|
}
|
|
1665
|
-
function
|
|
1680
|
+
function fr(e, t) {
|
|
1666
1681
|
const n = e.assignedInboxId ? t?.[e.assignedInboxId] : void 0;
|
|
1667
|
-
return typeof n == "number" && n > 0 ? n :
|
|
1682
|
+
return typeof n == "number" && n > 0 ? n : cr[e.priority ?? "normal"];
|
|
1668
1683
|
}
|
|
1669
|
-
function
|
|
1684
|
+
function Sa(e) {
|
|
1670
1685
|
const t = {};
|
|
1671
1686
|
for (const n of e)
|
|
1672
1687
|
typeof n.slaHours == "number" && n.slaHours > 0 && (t[n.id] = n.slaHours);
|
|
1673
1688
|
return t;
|
|
1674
1689
|
}
|
|
1675
|
-
function
|
|
1676
|
-
return !Nt(e.status) || e.firstResponseAt ? !1 :
|
|
1690
|
+
function Ea(e, t, n) {
|
|
1691
|
+
return !Nt(e.status) || e.firstResponseAt ? !1 : Me(e, t) > fr(e, n);
|
|
1677
1692
|
}
|
|
1678
|
-
function
|
|
1693
|
+
function mr(e, t) {
|
|
1679
1694
|
const n = e.lastActivityPreview;
|
|
1680
|
-
return n?.direction !== "outbound" || !xt(n.type) ? !1 :
|
|
1695
|
+
return n?.direction !== "outbound" || !xt(n.type) ? !1 : Me(e, t) < lr;
|
|
1681
1696
|
}
|
|
1682
|
-
function
|
|
1697
|
+
function Ia(e, t) {
|
|
1683
1698
|
if (!Nt(e.status)) return { score: L, reasons: [] };
|
|
1684
1699
|
if (e.snoozedTill && e.snoozedTill > t.now) return { score: L, reasons: [] };
|
|
1685
|
-
if (
|
|
1686
|
-
if (
|
|
1700
|
+
if (mr(e, t.now)) return { score: L, reasons: [] };
|
|
1701
|
+
if (dr(e, t)) return { score: L, reasons: [] };
|
|
1687
1702
|
let n = 0;
|
|
1688
1703
|
const r = [], o = e.priority ?? "normal";
|
|
1689
|
-
J[o] > 0 && (n += J[o], r.push(`priority:${o}`)),
|
|
1690
|
-
const
|
|
1691
|
-
if (
|
|
1692
|
-
const u = Math.min(
|
|
1693
|
-
n += u,
|
|
1704
|
+
J[o] > 0 && (n += J[o], r.push(`priority:${o}`)), sr(e, t.userId) && (n += 20, r.push("unseen")), e.assignedUserId && e.assignedUserId === t.userId && (n += 15, r.push("assigned-to-you"));
|
|
1705
|
+
const s = Me(e, t.now);
|
|
1706
|
+
if (s > 0) {
|
|
1707
|
+
const u = Math.min(s * 2, 30);
|
|
1708
|
+
n += u, s >= 1 && r.push(`waiting:${Math.round(s)}h`);
|
|
1694
1709
|
}
|
|
1695
|
-
const
|
|
1696
|
-
return
|
|
1710
|
+
const i = e.lastActivityPreview;
|
|
1711
|
+
return i?.type === "AI_ACTION_PROPOSED" && (n += 30, r.push("awaiting-approval")), i?.direction === "outbound" && xt(i.type) && (n += 10, r.push("no-reply")), !e.firstResponseAt && e.lastActivityPreview?.direction === "inbound" && (n += 10, r.push("awaiting-reply")), (e.tags?.some((u) => u === "marketing" || u === "automated") || Jn(e.remoteParty?.resource, e.lastActivityPreview?.snippet)) && (n -= ar, r.push("bulk")), { score: n, reasons: r };
|
|
1697
1712
|
}
|
|
1698
|
-
const
|
|
1713
|
+
const Ta = (e) => !!e.assignedUserId || !!e.assignedInboxId, ka = (e) => e.status === "closed", wa = (e) => ({
|
|
1699
1714
|
urgent: 10,
|
|
1700
1715
|
high: 5,
|
|
1701
1716
|
normal: 2,
|
|
1702
1717
|
low: 1
|
|
1703
|
-
})[e.priority] || 0,
|
|
1704
|
-
function
|
|
1718
|
+
})[e.priority] || 0, va = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
|
|
1719
|
+
function Ma(e, t) {
|
|
1705
1720
|
const n = e.labels ?? [];
|
|
1706
1721
|
return n.find((r) => r.locale === t)?.label ?? n[0]?.label ?? e.url;
|
|
1707
1722
|
}
|
|
1708
|
-
function
|
|
1723
|
+
function Ca(e, t, n) {
|
|
1709
1724
|
const r = e.translations ?? [];
|
|
1710
1725
|
return r.find((o) => o.locale === t) ?? (n ? r.find((o) => o.locale === n) : void 0) ?? { locale: t };
|
|
1711
1726
|
}
|
|
@@ -1728,32 +1743,32 @@ function Rt(e) {
|
|
|
1728
1743
|
const t = (e ?? "").toLowerCase();
|
|
1729
1744
|
return Ze.find((n) => n.code === t) ?? Ze.find((n) => n.code === t.split("-")[0]);
|
|
1730
1745
|
}
|
|
1731
|
-
function
|
|
1746
|
+
function Oa(e) {
|
|
1732
1747
|
return Rt(e)?.label ?? e;
|
|
1733
1748
|
}
|
|
1734
|
-
function
|
|
1749
|
+
function xa(e) {
|
|
1735
1750
|
const t = Rt(e);
|
|
1736
1751
|
return t ? t.english === t.label ? `${t.english} (${t.code})` : `${t.english} — ${t.label} (${t.code})` : e;
|
|
1737
1752
|
}
|
|
1738
|
-
const
|
|
1739
|
-
function
|
|
1753
|
+
const $t = 3;
|
|
1754
|
+
function hr(e, t) {
|
|
1740
1755
|
const n = /* @__PURE__ */ new Set();
|
|
1741
1756
|
let r = 1, o = t.get(e)?.parentId;
|
|
1742
1757
|
for (; o; ) {
|
|
1743
|
-
if (n.has(o) || (n.add(o), r++, r >
|
|
1758
|
+
if (n.has(o) || (n.add(o), r++, r > $t + 1)) return 1 / 0;
|
|
1744
1759
|
o = t.get(o)?.parentId;
|
|
1745
1760
|
}
|
|
1746
1761
|
return r;
|
|
1747
1762
|
}
|
|
1748
|
-
function
|
|
1763
|
+
function Na(e, t, n) {
|
|
1749
1764
|
if (!e) return !0;
|
|
1750
1765
|
if (e === t) return !1;
|
|
1751
|
-
const r = new Map(n.map((
|
|
1752
|
-
if (!r.has(e) || t &&
|
|
1753
|
-
const o =
|
|
1754
|
-
return o +
|
|
1766
|
+
const r = new Map(n.map((i) => [i.id, i]));
|
|
1767
|
+
if (!r.has(e) || t && gr(e, t, r)) return !1;
|
|
1768
|
+
const o = hr(e, r), s = t ? Dt(t, n) : 1;
|
|
1769
|
+
return o + s <= $t;
|
|
1755
1770
|
}
|
|
1756
|
-
function
|
|
1771
|
+
function gr(e, t, n) {
|
|
1757
1772
|
const r = /* @__PURE__ */ new Set();
|
|
1758
1773
|
let o = n.get(e)?.parentId;
|
|
1759
1774
|
for (; o; ) {
|
|
@@ -1763,23 +1778,23 @@ function hr(e, t, n) {
|
|
|
1763
1778
|
}
|
|
1764
1779
|
return !1;
|
|
1765
1780
|
}
|
|
1766
|
-
function
|
|
1781
|
+
function Dt(e, t, n = /* @__PURE__ */ new Set()) {
|
|
1767
1782
|
if (n.has(e)) return 1;
|
|
1768
1783
|
n.add(e);
|
|
1769
1784
|
const r = t.filter((o) => o.parentId === e);
|
|
1770
|
-
return r.length ? 1 + Math.max(...r.map((o) =>
|
|
1785
|
+
return r.length ? 1 + Math.max(...r.map((o) => Dt(o.id, t, n))) : 1;
|
|
1771
1786
|
}
|
|
1772
|
-
const
|
|
1773
|
-
function
|
|
1774
|
-
return e.defaultLocale || e.locale ||
|
|
1787
|
+
const yr = "en";
|
|
1788
|
+
function br(e) {
|
|
1789
|
+
return e.defaultLocale || e.locale || yr;
|
|
1775
1790
|
}
|
|
1776
|
-
function
|
|
1791
|
+
function Ra(e) {
|
|
1777
1792
|
const t = /* @__PURE__ */ new Set(), n = [];
|
|
1778
|
-
for (const r of [
|
|
1793
|
+
for (const r of [br(e), ...e.locales ?? []])
|
|
1779
1794
|
!r || t.has(r) || (t.add(r), n.push(r));
|
|
1780
1795
|
return n;
|
|
1781
1796
|
}
|
|
1782
|
-
function
|
|
1797
|
+
function $a(e, t, n) {
|
|
1783
1798
|
const r = e.translations ?? [];
|
|
1784
1799
|
return r.find((o) => o.locale === t)?.name ?? (n ? r.find((o) => o.locale === n)?.name : void 0) ?? e.name;
|
|
1785
1800
|
}
|
|
@@ -1800,7 +1815,7 @@ function et(e) {
|
|
|
1800
1815
|
}
|
|
1801
1816
|
return null;
|
|
1802
1817
|
}
|
|
1803
|
-
function
|
|
1818
|
+
function _r(e, t) {
|
|
1804
1819
|
switch (e.kind) {
|
|
1805
1820
|
case "org":
|
|
1806
1821
|
return !0;
|
|
@@ -1810,29 +1825,29 @@ function br(e, t) {
|
|
|
1810
1825
|
return e.userId === t.userId;
|
|
1811
1826
|
}
|
|
1812
1827
|
}
|
|
1813
|
-
function
|
|
1814
|
-
return e.filter((n) => n.enabled &&
|
|
1828
|
+
function Da(e, t) {
|
|
1829
|
+
return e.filter((n) => n.enabled && _r(n.ownerScope, t));
|
|
1815
1830
|
}
|
|
1816
|
-
function
|
|
1831
|
+
function La(e) {
|
|
1817
1832
|
return e.credentialScope ? e.credentialScope : (e.authMode ?? "header") === "header" || e.oauth?.scope === "org" ? "shared" : "per-user";
|
|
1818
1833
|
}
|
|
1819
|
-
function
|
|
1834
|
+
function Pa(e) {
|
|
1820
1835
|
return `mcp__${e}__`;
|
|
1821
1836
|
}
|
|
1822
|
-
const
|
|
1823
|
-
function
|
|
1837
|
+
const Ka = 1e3, Ua = 2e3, Fa = 500, Ba = 12e3, ja = 4e3, Ar = ["contact", "company", "work_item"];
|
|
1838
|
+
function Ha(e) {
|
|
1824
1839
|
if (!e) return !1;
|
|
1825
1840
|
const t = e.slice(0, e.indexOf(":"));
|
|
1826
|
-
return
|
|
1841
|
+
return Ar.includes(t);
|
|
1827
1842
|
}
|
|
1828
|
-
const
|
|
1843
|
+
const Ga = [
|
|
1829
1844
|
{ key: "high", label: "tax_high", percent: 21, kind: "standard" },
|
|
1830
1845
|
{ key: "low", label: "tax_low", percent: 9, kind: "reduced" },
|
|
1831
1846
|
{ key: "zero", label: "tax_zero", percent: 0, kind: "zero" },
|
|
1832
1847
|
{ key: "reverse_charge", label: "tax_reverse_charge", percent: 0, kind: "reverse_charge" },
|
|
1833
1848
|
{ key: "exempt", label: "tax_exempt", percent: 0, kind: "exempt" }
|
|
1834
1849
|
];
|
|
1835
|
-
function
|
|
1850
|
+
function Sr(e, t) {
|
|
1836
1851
|
return t.find((n) => n.key === e) ?? {
|
|
1837
1852
|
key: e,
|
|
1838
1853
|
label: e,
|
|
@@ -1840,27 +1855,27 @@ function Ar(e, t) {
|
|
|
1840
1855
|
kind: "zero"
|
|
1841
1856
|
};
|
|
1842
1857
|
}
|
|
1843
|
-
function
|
|
1858
|
+
function Er(e) {
|
|
1844
1859
|
if (e.kind !== "product") return 0;
|
|
1845
1860
|
const t = 1 - (e.discountPercent ?? 0) / 100;
|
|
1846
1861
|
return G(e.quantity * e.unitPriceCents * t);
|
|
1847
1862
|
}
|
|
1848
|
-
function
|
|
1849
|
-
const r = e.map((l) => ({ ...l, netCents:
|
|
1863
|
+
function Wa(e, t, n) {
|
|
1864
|
+
const r = e.map((l) => ({ ...l, netCents: Er(l), taxCents: 0 })), o = /* @__PURE__ */ new Map();
|
|
1850
1865
|
for (let l = 0; l < r.length; l++) {
|
|
1851
1866
|
if (r[l].kind !== "product" || r[l].optional) continue;
|
|
1852
1867
|
const d = n ?? r[l].taxRateKey, c = o.get(d);
|
|
1853
1868
|
c ? c.push(l) : o.set(d, [l]);
|
|
1854
1869
|
}
|
|
1855
|
-
const
|
|
1856
|
-
let
|
|
1870
|
+
const s = [];
|
|
1871
|
+
let i = 0, a = 0;
|
|
1857
1872
|
for (const [l, d] of o) {
|
|
1858
|
-
const c =
|
|
1873
|
+
const c = Sr(l, t), p = d.reduce((m, E) => m + r[E].netCents, 0), f = G(p * c.percent / 100), y = Fn(
|
|
1859
1874
|
f,
|
|
1860
1875
|
d.map((m) => r[m].netCents)
|
|
1861
1876
|
);
|
|
1862
1877
|
for (let m = 0; m < d.length; m++) r[d[m]].taxCents = y[m];
|
|
1863
|
-
|
|
1878
|
+
s.push({ taxRateKey: l, netCents: p, taxCents: f }), i += p, a += f;
|
|
1864
1879
|
}
|
|
1865
1880
|
const u = r.reduce(
|
|
1866
1881
|
(l, d) => d.costPriceCents == null || d.optional ? l : l + G(d.costPriceCents * d.quantity),
|
|
@@ -1869,15 +1884,15 @@ function Ba(e, t, n) {
|
|
|
1869
1884
|
return {
|
|
1870
1885
|
lines: r,
|
|
1871
1886
|
totals: {
|
|
1872
|
-
netCents:
|
|
1887
|
+
netCents: i,
|
|
1873
1888
|
taxCents: a,
|
|
1874
|
-
grossCents:
|
|
1889
|
+
grossCents: i + a,
|
|
1875
1890
|
costCents: u,
|
|
1876
|
-
byRate:
|
|
1891
|
+
byRate: s
|
|
1877
1892
|
}
|
|
1878
1893
|
};
|
|
1879
1894
|
}
|
|
1880
|
-
const
|
|
1895
|
+
const Va = "onboarding-source", za = ["support", "billing", "availability", "sales", "onboarding"], Xa = ["keep", "replace"], Ce = [
|
|
1881
1896
|
{
|
|
1882
1897
|
key: "shift",
|
|
1883
1898
|
label: "kind_shift",
|
|
@@ -1951,7 +1966,7 @@ const ja = "onboarding-source", Ha = ["support", "billing", "availability", "sal
|
|
|
1951
1966
|
absent: !0,
|
|
1952
1967
|
icon: "party-popper"
|
|
1953
1968
|
}
|
|
1954
|
-
],
|
|
1969
|
+
], Ir = {
|
|
1955
1970
|
key: "unknown",
|
|
1956
1971
|
label: "kind_unknown",
|
|
1957
1972
|
capacity: !1,
|
|
@@ -1959,7 +1974,7 @@ const ja = "onboarding-source", Ha = ["support", "billing", "availability", "sal
|
|
|
1959
1974
|
absent: !1
|
|
1960
1975
|
};
|
|
1961
1976
|
function N(e, t = Ce) {
|
|
1962
|
-
return t.find((n) => n.key === e) ?? { ...
|
|
1977
|
+
return t.find((n) => n.key === e) ?? { ...Ir, key: e };
|
|
1963
1978
|
}
|
|
1964
1979
|
function W(e) {
|
|
1965
1980
|
return e === "published" || e === "approved";
|
|
@@ -1969,18 +1984,18 @@ function Lt(e, t, n = Ce) {
|
|
|
1969
1984
|
const r = N(e.kindKey, n);
|
|
1970
1985
|
return r.absent ? !1 : r.productive || r.capacity;
|
|
1971
1986
|
}
|
|
1972
|
-
function
|
|
1987
|
+
function Ya(e, t = Ce) {
|
|
1973
1988
|
if (!e.userId || !W(e.status)) return !1;
|
|
1974
1989
|
const n = N(e.kindKey, t);
|
|
1975
1990
|
return n.capacity || n.productive || n.absent;
|
|
1976
1991
|
}
|
|
1977
|
-
const
|
|
1978
|
-
function
|
|
1979
|
-
return Math.round((t - e) /
|
|
1992
|
+
const Tr = 864e5;
|
|
1993
|
+
function kr(e, t) {
|
|
1994
|
+
return Math.round((t - e) / Tr);
|
|
1980
1995
|
}
|
|
1981
1996
|
function Pt(e, t) {
|
|
1982
1997
|
const n = e.cycleMinutes.length;
|
|
1983
|
-
return n === 0 ? 0 : (
|
|
1998
|
+
return n === 0 ? 0 : (kr(e.anchor, t) % n + n) % n;
|
|
1984
1999
|
}
|
|
1985
2000
|
function Kt(e, t) {
|
|
1986
2001
|
return e.effectiveFrom !== void 0 && t < e.effectiveFrom ? 0 : e.cycleMinutes[Pt(e, t)] ?? 0;
|
|
@@ -1991,8 +2006,8 @@ function Ut(e, t) {
|
|
|
1991
2006
|
function Ft(e, t, n, r) {
|
|
1992
2007
|
const o = e.filter(
|
|
1993
2008
|
(a) => a.effectiveFrom === void 0 || a.effectiveFrom <= r
|
|
1994
|
-
),
|
|
1995
|
-
return
|
|
2009
|
+
), s = (a) => a.sort((u, l) => (l.effectiveFrom ?? 0) - (u.effectiveFrom ?? 0))[0], i = s(o.filter((a) => a.userId === t));
|
|
2010
|
+
return i || s(
|
|
1996
2011
|
o.filter((a) => !a.userId && a.teamId && n.includes(a.teamId))
|
|
1997
2012
|
);
|
|
1998
2013
|
}
|
|
@@ -2002,7 +2017,7 @@ function wr(e, t, n) {
|
|
|
2002
2017
|
).sort((r, o) => (o.effectiveFrom ?? 0) - (r.effectiveFrom ?? 0))[0];
|
|
2003
2018
|
}
|
|
2004
2019
|
const he = 864e5;
|
|
2005
|
-
function
|
|
2020
|
+
function vr(e) {
|
|
2006
2021
|
const t = Math.max(1, Math.round((e.to - e.from) / he));
|
|
2007
2022
|
return Array.from({ length: t }, (n, r) => e.from + r * he);
|
|
2008
2023
|
}
|
|
@@ -2011,14 +2026,14 @@ function ge(e, t, n, r) {
|
|
|
2011
2026
|
return o > 0 ? o / 1e3 : 0;
|
|
2012
2027
|
}
|
|
2013
2028
|
const tt = { interval: 0, day: 1, week: 2 };
|
|
2014
|
-
function
|
|
2015
|
-
const { entries: n, patterns: r = [], terms: o = [] } = t,
|
|
2029
|
+
function qa(e, t) {
|
|
2030
|
+
const { entries: n, patterns: r = [], terms: o = [] } = t, s = n.filter(
|
|
2016
2031
|
(c) => c.userId && W(c.status) && N(c.kindKey).capacity
|
|
2017
|
-
),
|
|
2032
|
+
), i = n.filter(
|
|
2018
2033
|
(c) => c.userId && W(c.status) && N(c.kindKey).absent
|
|
2019
2034
|
), a = t.userIds ?? [
|
|
2020
2035
|
.../* @__PURE__ */ new Set([
|
|
2021
|
-
...
|
|
2036
|
+
...s.map((c) => c.userId),
|
|
2022
2037
|
...r.map((c) => c.userId),
|
|
2023
2038
|
...o.map((c) => c.userId)
|
|
2024
2039
|
])
|
|
@@ -2030,26 +2045,26 @@ function Va(e, t) {
|
|
|
2030
2045
|
for (const c of a) {
|
|
2031
2046
|
const p = t.teamIdsOf?.(c) ?? [];
|
|
2032
2047
|
let f = 0, y = 0, m = 0;
|
|
2033
|
-
for (const h of
|
|
2048
|
+
for (const h of vr(e)) {
|
|
2034
2049
|
const S = Math.max(h, e.from), x = Math.min(h + he, e.to);
|
|
2035
2050
|
m++;
|
|
2036
|
-
const C =
|
|
2051
|
+
const C = s.filter((w) => w.userId === c).reduce((w, De) => w + ge(De.start, De.end, S, x), 0);
|
|
2037
2052
|
if (C > 0) {
|
|
2038
2053
|
f += C;
|
|
2039
2054
|
continue;
|
|
2040
2055
|
}
|
|
2041
|
-
const
|
|
2042
|
-
if (
|
|
2043
|
-
f += O * 60, d(Ut(
|
|
2056
|
+
const v = Ft(r, c, p, h), O = v ? Kt(v, h) : 0;
|
|
2057
|
+
if (v && O > 0) {
|
|
2058
|
+
f += O * 60, d(Ut(v, h) ? "interval" : "day");
|
|
2044
2059
|
continue;
|
|
2045
2060
|
}
|
|
2046
|
-
|
|
2061
|
+
v || y++;
|
|
2047
2062
|
}
|
|
2048
2063
|
if (y > 0) {
|
|
2049
2064
|
const h = wr(o, c, e.from);
|
|
2050
2065
|
h && (f += h.weeklyMinutes * 60 * (y / 7), d("week"));
|
|
2051
2066
|
}
|
|
2052
|
-
const E =
|
|
2067
|
+
const E = i.filter((h) => h.userId === c).reduce(
|
|
2053
2068
|
(h, S) => h + ge(S.start, S.end, e.from, e.to),
|
|
2054
2069
|
0
|
|
2055
2070
|
), g = Math.max(0, f - E);
|
|
@@ -2061,14 +2076,14 @@ function Va(e, t) {
|
|
|
2061
2076
|
byUser: u
|
|
2062
2077
|
};
|
|
2063
2078
|
}
|
|
2064
|
-
function
|
|
2079
|
+
function Qa(e, t) {
|
|
2065
2080
|
if (!e.some((a) => a.userId)) return [];
|
|
2066
2081
|
const n = "", r = /* @__PURE__ */ new Map();
|
|
2067
2082
|
for (const a of e) {
|
|
2068
2083
|
const u = a.userId ?? n;
|
|
2069
2084
|
r.set(u, (r.get(u) ?? 0) + a.seconds);
|
|
2070
2085
|
}
|
|
2071
|
-
const
|
|
2086
|
+
const s = [.../* @__PURE__ */ new Set([
|
|
2072
2087
|
...Object.keys(t.byUser),
|
|
2073
2088
|
...[...r.keys()].filter((a) => a !== n)
|
|
2074
2089
|
])].map((a) => {
|
|
@@ -2080,23 +2095,23 @@ function za(e, t) {
|
|
|
2080
2095
|
netSeconds: l - u
|
|
2081
2096
|
};
|
|
2082
2097
|
});
|
|
2083
|
-
|
|
2084
|
-
const
|
|
2085
|
-
return
|
|
2098
|
+
s.sort((a, u) => a.netSeconds - u.netSeconds);
|
|
2099
|
+
const i = r.get(n) ?? 0;
|
|
2100
|
+
return i > 0 && s.push({ requiredSeconds: i, capacitySeconds: 0, netSeconds: -i }), s;
|
|
2086
2101
|
}
|
|
2087
|
-
function
|
|
2102
|
+
function Za(e, t, n, r) {
|
|
2088
2103
|
const o = e.filter(
|
|
2089
|
-
(
|
|
2090
|
-
),
|
|
2091
|
-
([
|
|
2104
|
+
(i) => i.userId && W(i.status) && !N(i.kindKey).absent
|
|
2105
|
+
), s = Object.entries(r.byUser).map(
|
|
2106
|
+
([i, a]) => {
|
|
2092
2107
|
let u = 0, l = 0;
|
|
2093
2108
|
for (const d of o) {
|
|
2094
|
-
if (d.userId !==
|
|
2109
|
+
if (d.userId !== i || N(d.kindKey).capacity && !d.workstreamId) continue;
|
|
2095
2110
|
const c = ge(d.start, d.end, n.from, n.to);
|
|
2096
2111
|
c <= 0 || (Lt(d, t) ? u += c : l += c);
|
|
2097
2112
|
}
|
|
2098
2113
|
return {
|
|
2099
|
-
userId:
|
|
2114
|
+
userId: i,
|
|
2100
2115
|
capacitySeconds: a,
|
|
2101
2116
|
onThisSeconds: u,
|
|
2102
2117
|
elsewhereSeconds: l,
|
|
@@ -2104,149 +2119,149 @@ function Xa(e, t, n, r) {
|
|
|
2104
2119
|
};
|
|
2105
2120
|
}
|
|
2106
2121
|
);
|
|
2107
|
-
return
|
|
2122
|
+
return s.sort((i, a) => a.freeSeconds - i.freeSeconds), s;
|
|
2108
2123
|
}
|
|
2109
|
-
const
|
|
2124
|
+
const Ja = "demand-source", nt = 1e3;
|
|
2110
2125
|
function Mr(e, t) {
|
|
2111
2126
|
let n = 1;
|
|
2112
2127
|
for (let r = 1; r <= e; r++)
|
|
2113
2128
|
n = t * n / (r + t * n);
|
|
2114
2129
|
return n;
|
|
2115
2130
|
}
|
|
2116
|
-
function
|
|
2131
|
+
function Cr(e, t) {
|
|
2117
2132
|
if (e <= 0) return 1;
|
|
2118
2133
|
if (t <= 0) return 0;
|
|
2119
2134
|
if (e <= t) return 1;
|
|
2120
2135
|
const n = Mr(e, t), r = t / e;
|
|
2121
2136
|
return n / (1 - r * (1 - n));
|
|
2122
2137
|
}
|
|
2123
|
-
function
|
|
2124
|
-
return r <= 0 ? 1 : e <= t ? 0 : 1 -
|
|
2138
|
+
function Or(e, t, n, r) {
|
|
2139
|
+
return r <= 0 ? 1 : e <= t ? 0 : 1 - Cr(e, t) * Math.exp(-(e - t) * n / r);
|
|
2125
2140
|
}
|
|
2126
|
-
function
|
|
2141
|
+
function xr(e, t, n) {
|
|
2127
2142
|
return n <= 0 ? 0 : e * t / n;
|
|
2128
2143
|
}
|
|
2129
|
-
function
|
|
2144
|
+
function Nr(e, t, n, r) {
|
|
2130
2145
|
if (e <= 0 || t <= 0) return 0;
|
|
2131
|
-
const o =
|
|
2146
|
+
const o = xr(e, t, n);
|
|
2132
2147
|
if (o <= 0) return 0;
|
|
2133
|
-
const
|
|
2148
|
+
const s = r.serviceLevelPercent / 100, i = r.maxOccupancyPercent ? r.maxOccupancyPercent / 100 : void 0;
|
|
2134
2149
|
for (let a = Math.max(1, Math.ceil(o)); a <= nt; a++)
|
|
2135
|
-
if (!(a <= o) && !(
|
|
2150
|
+
if (!(a <= o) && !(Or(a, o, r.targetSeconds, t) < s) && !(i && o / a > i))
|
|
2136
2151
|
return a;
|
|
2137
2152
|
return nt;
|
|
2138
2153
|
}
|
|
2139
|
-
const
|
|
2154
|
+
const Rr = 36e5, $r = 864e5;
|
|
2140
2155
|
function Dr(e) {
|
|
2141
|
-
return e === "day" ?
|
|
2156
|
+
return e === "day" ? $r : Rr;
|
|
2142
2157
|
}
|
|
2143
|
-
function
|
|
2158
|
+
function ec(e, t) {
|
|
2144
2159
|
return e.start < t.end && t.start < e.end;
|
|
2145
2160
|
}
|
|
2146
2161
|
function ce(e, t, n) {
|
|
2147
2162
|
const r = Math.min(e.end, n) - Math.max(e.start, t);
|
|
2148
2163
|
return r > 0 ? r / 1e3 : 0;
|
|
2149
2164
|
}
|
|
2150
|
-
function
|
|
2165
|
+
function Lr(e, t, n) {
|
|
2151
2166
|
const r = e.handleSeconds ?? 0, o = e.seconds ?? (e.volume !== void 0 ? e.volume * r : 0);
|
|
2152
2167
|
if (o <= 0 && !e.volume) return { seconds: 0, headcount: 0 };
|
|
2153
|
-
const
|
|
2168
|
+
const s = (t.unplannedLossPercent ?? 0) / 100, i = s > 0 && s < 1 ? 1 / (1 - s) : 1;
|
|
2154
2169
|
if (t.model === "queue" && e.volume !== void 0 && r > 0) {
|
|
2155
|
-
const a =
|
|
2156
|
-
return { seconds: o, headcount: a *
|
|
2170
|
+
const a = Nr(e.volume, r, n, t);
|
|
2171
|
+
return { seconds: o, headcount: a * i };
|
|
2157
2172
|
}
|
|
2158
|
-
return { seconds: o, headcount: o / n *
|
|
2173
|
+
return { seconds: o, headcount: o / n * i };
|
|
2159
2174
|
}
|
|
2160
|
-
function
|
|
2161
|
-
const { entries: t, workstreamId: n, staffing: r, demand: o, range:
|
|
2162
|
-
for (let m = H(
|
|
2163
|
-
const E = m + a, g = j(m,
|
|
2175
|
+
function tc(e) {
|
|
2176
|
+
const { entries: t, workstreamId: n, staffing: r, demand: o, range: s } = e, i = e.grain ?? "hour", a = Dr(i), u = a / 1e3, l = e.kinds, d = t.filter((m) => W(m.status)), c = d.filter((m) => Lt(m, n, l)), p = d.filter((m) => N(m.kindKey, l).capacity), f = d.filter((m) => N(m.kindKey, l).absent), y = [];
|
|
2177
|
+
for (let m = H(s.from, i); m < s.to; m += a) {
|
|
2178
|
+
const E = m + a, g = j(m, i);
|
|
2164
2179
|
let h = 0;
|
|
2165
|
-
for (const
|
|
2180
|
+
for (const w of c) h += ce(w, m, E);
|
|
2166
2181
|
let S = 0;
|
|
2167
|
-
for (const
|
|
2182
|
+
for (const w of p) S += ce(w, m, E);
|
|
2168
2183
|
let x = 0;
|
|
2169
|
-
for (const
|
|
2170
|
-
const C = o?.[g] ?? {},
|
|
2184
|
+
for (const w of f) x += ce(w, m, E);
|
|
2185
|
+
const C = o?.[g] ?? {}, v = Lr(C, r, u), O = h / u;
|
|
2171
2186
|
y.push({
|
|
2172
2187
|
period: g,
|
|
2173
2188
|
forecastVolume: C.volume,
|
|
2174
|
-
requiredSeconds:
|
|
2175
|
-
requiredHeadcount:
|
|
2189
|
+
requiredSeconds: v.seconds,
|
|
2190
|
+
requiredHeadcount: v.headcount,
|
|
2176
2191
|
scheduledSeconds: h,
|
|
2177
2192
|
scheduledHeadcount: O,
|
|
2178
|
-
netHeadcount: O -
|
|
2193
|
+
netHeadcount: O - v.headcount,
|
|
2179
2194
|
capacitySeconds: S,
|
|
2180
2195
|
absentSeconds: x
|
|
2181
2196
|
});
|
|
2182
2197
|
}
|
|
2183
2198
|
return y;
|
|
2184
2199
|
}
|
|
2185
|
-
function
|
|
2200
|
+
function Pr(e, t) {
|
|
2186
2201
|
return e.workTypeKey ?? t?.defaultWorkTypeKey;
|
|
2187
2202
|
}
|
|
2188
|
-
function
|
|
2189
|
-
const r =
|
|
2203
|
+
function nc(e, t, n) {
|
|
2204
|
+
const r = Pr(e, t);
|
|
2190
2205
|
return r ? n.find((o) => o.key === r)?.defaultBillable ?? !1 : !1;
|
|
2191
2206
|
}
|
|
2192
|
-
function
|
|
2207
|
+
function rc(e) {
|
|
2193
2208
|
return e.filter(
|
|
2194
2209
|
(t) => t.netHeadcount < 0 && t.requiredHeadcount > 0
|
|
2195
2210
|
);
|
|
2196
2211
|
}
|
|
2197
|
-
const
|
|
2198
|
-
function
|
|
2212
|
+
const Kr = 36e5, ye = 6048e5, Ur = 8, Fr = 0.5, Br = 2;
|
|
2213
|
+
function jr(e) {
|
|
2199
2214
|
const t = Number(e.slice(0, 4)), n = Number(e.slice(5, 7)), r = Number(e.slice(8, 10)), o = e.length > 10 ? Number(e.slice(11, 13)) : 0;
|
|
2200
2215
|
return Date.UTC(t, n - 1, r, o);
|
|
2201
2216
|
}
|
|
2202
|
-
function
|
|
2217
|
+
function Hr(e, t, n) {
|
|
2203
2218
|
const r = [];
|
|
2204
|
-
for (let
|
|
2205
|
-
const
|
|
2219
|
+
for (let s = 0; s < n; s++) {
|
|
2220
|
+
const i = t - s * ye, a = i - ye;
|
|
2206
2221
|
let u = 0, l = !1;
|
|
2207
2222
|
for (const [d, c] of e)
|
|
2208
|
-
d >= a && d <
|
|
2223
|
+
d >= a && d < i && (u += c, l = !0);
|
|
2209
2224
|
l && r.push(u);
|
|
2210
2225
|
}
|
|
2211
2226
|
if (r.length < 2) return 1;
|
|
2212
|
-
const o = r.reduce((
|
|
2213
|
-
return o <= 0 ? 1 : Math.min(
|
|
2227
|
+
const o = r.reduce((s, i) => s + i, 0) / r.length;
|
|
2228
|
+
return o <= 0 ? 1 : Math.min(Br, Math.max(Fr, r[0] / o));
|
|
2214
2229
|
}
|
|
2215
|
-
function
|
|
2230
|
+
function Gr(e, t) {
|
|
2216
2231
|
if (!e?.length) return;
|
|
2217
2232
|
let n;
|
|
2218
2233
|
for (const r of e)
|
|
2219
2234
|
t >= r.from && t < r.to && (n = r);
|
|
2220
2235
|
return n;
|
|
2221
2236
|
}
|
|
2222
|
-
function
|
|
2223
|
-
const r = Math.max(1, n?.weeks ??
|
|
2237
|
+
function oc(e, t, n) {
|
|
2238
|
+
const r = Math.max(1, n?.weeks ?? Ur), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set();
|
|
2224
2239
|
for (const u of e)
|
|
2225
|
-
o.set(
|
|
2226
|
-
const
|
|
2227
|
-
for (let u = H(t.from, "hour"); u < t.to; u +=
|
|
2240
|
+
o.set(jr(u.period), u.value), s.add(u.period.slice(0, 10));
|
|
2241
|
+
const i = Hr(o, H(t.from, "hour"), r), a = [];
|
|
2242
|
+
for (let u = H(t.from, "hour"); u < t.to; u += Kr) {
|
|
2228
2243
|
let l = 0, d = 0;
|
|
2229
2244
|
for (let f = 1; f <= r; f++) {
|
|
2230
|
-
const y = u - f * ye, E = o.get(y) ?? (
|
|
2245
|
+
const y = u - f * ye, E = o.get(y) ?? (s.has(j(y, "day")) ? 0 : void 0);
|
|
2231
2246
|
if (E === void 0) continue;
|
|
2232
2247
|
const g = r - f + 1;
|
|
2233
2248
|
l += E * g, d += g;
|
|
2234
2249
|
}
|
|
2235
|
-
let c = d > 0 ? l / d *
|
|
2236
|
-
const p =
|
|
2250
|
+
let c = d > 0 ? l / d * i : 0;
|
|
2251
|
+
const p = Gr(n?.adjustments, u);
|
|
2237
2252
|
p?.absoluteVolume !== void 0 ? c = p.absoluteVolume : p?.factor !== void 0 && (c *= p.factor), a.push({ period: j(u, "hour"), volume: c });
|
|
2238
2253
|
}
|
|
2239
2254
|
return a;
|
|
2240
2255
|
}
|
|
2241
|
-
const
|
|
2242
|
-
function
|
|
2243
|
-
return `${Gr}:${e}`;
|
|
2244
|
-
}
|
|
2245
|
-
function nc(e) {
|
|
2256
|
+
const Wr = "schedule_entry", Vr = "workstream";
|
|
2257
|
+
function sc(e) {
|
|
2246
2258
|
return `${Wr}:${e}`;
|
|
2247
2259
|
}
|
|
2260
|
+
function ic(e) {
|
|
2261
|
+
return `${Vr}:${e}`;
|
|
2262
|
+
}
|
|
2248
2263
|
const be = 36e5, K = 864e5;
|
|
2249
|
-
function
|
|
2264
|
+
function zr(e, t) {
|
|
2250
2265
|
const n = t === "day" ? K : be, r = [];
|
|
2251
2266
|
for (let o = H(e.from, t); o < e.to; o += n) r.push(o);
|
|
2252
2267
|
return r;
|
|
@@ -2259,13 +2274,13 @@ function le(e, t, n, r) {
|
|
|
2259
2274
|
const o = Math.min(t, r) - Math.max(e, n);
|
|
2260
2275
|
return o > 0 ? o / 1e3 : 0;
|
|
2261
2276
|
}
|
|
2262
|
-
function
|
|
2263
|
-
const r = n.grain ?? "hour", o =
|
|
2277
|
+
function ac(e, t, n = {}) {
|
|
2278
|
+
const r = n.grain ?? "hour", o = zr(t, r), s = r === "day" ? K : be, i = new Map(o.map((c) => [c, 0])), a = e.filter((c) => c.userId && N(c.kindKey).capacity), u = n.userIds?.length ? new Set(n.userIds) : null, l = /* @__PURE__ */ new Set();
|
|
2264
2279
|
for (const c of a)
|
|
2265
2280
|
if (!(u && c.userId && !u.has(c.userId))) {
|
|
2266
2281
|
for (const p of o) {
|
|
2267
|
-
const f = le(c.start, c.end, p, p +
|
|
2268
|
-
f > 0 &&
|
|
2282
|
+
const f = le(c.start, c.end, p, p + s);
|
|
2283
|
+
f > 0 && i.set(p, (i.get(p) ?? 0) + f);
|
|
2269
2284
|
}
|
|
2270
2285
|
for (const p of rt(t))
|
|
2271
2286
|
le(c.start, c.end, p, p + K) > 0 && l.add(`${c.userId}:${p}`);
|
|
@@ -2287,22 +2302,22 @@ function rc(e, t, n = {}) {
|
|
|
2287
2302
|
if (m <= 0) continue;
|
|
2288
2303
|
const E = Ut(y, f);
|
|
2289
2304
|
if (E) {
|
|
2290
|
-
const [S, x] = E.split(":").map(Number), C = f + S * be + (x ?? 0) * 6e4,
|
|
2305
|
+
const [S, x] = E.split(":").map(Number), C = f + S * be + (x ?? 0) * 6e4, v = C + m * 6e4;
|
|
2291
2306
|
for (const O of o) {
|
|
2292
|
-
const
|
|
2293
|
-
|
|
2307
|
+
const w = le(C, v, O, O + s);
|
|
2308
|
+
w > 0 && i.set(O, (i.get(O) ?? 0) + w);
|
|
2294
2309
|
}
|
|
2295
2310
|
continue;
|
|
2296
2311
|
}
|
|
2297
2312
|
const g = o.filter((S) => S >= f && S < f + K);
|
|
2298
2313
|
if (!g.length) continue;
|
|
2299
2314
|
const h = m * 60 / g.length;
|
|
2300
|
-
for (const S of g)
|
|
2315
|
+
for (const S of g) i.set(S, (i.get(S) ?? 0) + h);
|
|
2301
2316
|
}
|
|
2302
2317
|
}
|
|
2303
|
-
return o.map((c) => ({ period: j(c, r), weight:
|
|
2318
|
+
return o.map((c) => ({ period: j(c, r), weight: i.get(c) ?? 0 }));
|
|
2304
2319
|
}
|
|
2305
|
-
function
|
|
2320
|
+
function Xr(e, t) {
|
|
2306
2321
|
if (e <= 0 || !t.length) return [];
|
|
2307
2322
|
const n = t.reduce((r, o) => r + Math.max(0, o.weight), 0);
|
|
2308
2323
|
if (n <= 0) {
|
|
@@ -2311,20 +2326,20 @@ function zr(e, t) {
|
|
|
2311
2326
|
}
|
|
2312
2327
|
return t.filter((r) => r.weight > 0).map((r) => ({ period: r.period, seconds: e * r.weight / n }));
|
|
2313
2328
|
}
|
|
2314
|
-
function
|
|
2329
|
+
function cc(e, t, n) {
|
|
2315
2330
|
const r = /* @__PURE__ */ new Map();
|
|
2316
2331
|
for (const o of e) {
|
|
2317
|
-
const
|
|
2318
|
-
for (const a of
|
|
2332
|
+
const s = o.by ? t.filter((a) => n(a.period) < o.by) : t, i = s.length ? s : t;
|
|
2333
|
+
for (const a of Xr(o.seconds, i)) {
|
|
2319
2334
|
const u = `${a.period}|${o.userId ?? ""}`, l = r.get(u);
|
|
2320
2335
|
l ? l.seconds += a.seconds : r.set(u, { ...a, userId: o.userId });
|
|
2321
2336
|
}
|
|
2322
2337
|
}
|
|
2323
2338
|
return [...r.values()].sort(
|
|
2324
|
-
(o,
|
|
2339
|
+
(o, s) => o.period.localeCompare(s.period) || (o.userId ?? "").localeCompare(s.userId ?? "")
|
|
2325
2340
|
);
|
|
2326
2341
|
}
|
|
2327
|
-
function
|
|
2342
|
+
function Yr(e) {
|
|
2328
2343
|
switch (e.kind) {
|
|
2329
2344
|
case "user":
|
|
2330
2345
|
return `user:${e.userId}`;
|
|
@@ -2334,7 +2349,7 @@ function Xr(e) {
|
|
|
2334
2349
|
return "org";
|
|
2335
2350
|
}
|
|
2336
2351
|
}
|
|
2337
|
-
function
|
|
2352
|
+
function lc(e) {
|
|
2338
2353
|
if (typeof e != "string") return;
|
|
2339
2354
|
const t = e.trim();
|
|
2340
2355
|
if (t === "org") return { kind: "org" };
|
|
@@ -2346,10 +2361,10 @@ function ic(e) {
|
|
|
2346
2361
|
if (r === "team") return { kind: "team", teamId: o };
|
|
2347
2362
|
}
|
|
2348
2363
|
}
|
|
2349
|
-
function Yr(e) {
|
|
2350
|
-
return Xr(e);
|
|
2351
|
-
}
|
|
2352
2364
|
function qr(e) {
|
|
2365
|
+
return Yr(e);
|
|
2366
|
+
}
|
|
2367
|
+
function Qr(e) {
|
|
2353
2368
|
switch (e.kind) {
|
|
2354
2369
|
case "personal":
|
|
2355
2370
|
return { kind: "user", userId: e.userId };
|
|
@@ -2359,14 +2374,14 @@ function qr(e) {
|
|
|
2359
2374
|
return { kind: "org" };
|
|
2360
2375
|
}
|
|
2361
2376
|
}
|
|
2362
|
-
const
|
|
2363
|
-
function
|
|
2364
|
-
return e.agentId ? { kind: "user", userId: e.agentId } :
|
|
2377
|
+
const Zr = Qr;
|
|
2378
|
+
function uc(e) {
|
|
2379
|
+
return e.agentId ? { kind: "user", userId: e.agentId } : Zr(e.ownerScope);
|
|
2365
2380
|
}
|
|
2366
|
-
function
|
|
2367
|
-
return
|
|
2381
|
+
function dc(e) {
|
|
2382
|
+
return qr(e);
|
|
2368
2383
|
}
|
|
2369
|
-
function
|
|
2384
|
+
function pc(e, t) {
|
|
2370
2385
|
if (!t) return;
|
|
2371
2386
|
let n = e;
|
|
2372
2387
|
for (const r of t.split(".")) {
|
|
@@ -2375,24 +2390,24 @@ function cc(e, t) {
|
|
|
2375
2390
|
}
|
|
2376
2391
|
return n;
|
|
2377
2392
|
}
|
|
2378
|
-
function
|
|
2393
|
+
function fc(e, t) {
|
|
2379
2394
|
return e.targets.find((n) => n.activityTypes.includes(t));
|
|
2380
2395
|
}
|
|
2381
|
-
function
|
|
2396
|
+
function mc(e, t) {
|
|
2382
2397
|
if (t)
|
|
2383
2398
|
return e.targets.find((n) => n.id === t);
|
|
2384
2399
|
}
|
|
2385
|
-
function
|
|
2400
|
+
function Jr(e) {
|
|
2386
2401
|
return e?.kind === "assignment";
|
|
2387
2402
|
}
|
|
2388
|
-
function
|
|
2389
|
-
const { trigger: t, agentId: n, target: r, activityType: o, assigneeUserId:
|
|
2390
|
-
return
|
|
2403
|
+
function hc(e) {
|
|
2404
|
+
const { trigger: t, agentId: n, target: r, activityType: o, assigneeUserId: s, authorUserId: i } = e;
|
|
2405
|
+
return Jr(t) ? n ? r ? r.activityTypes.includes(o) ? s ? s !== n ? "assigned to someone else" : i && i === n ? "the agent assigned this to itself, which would restart its own run" : null : `no assignee found at ${r.assigneePath}` : `activity type ${o} 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";
|
|
2391
2406
|
}
|
|
2392
|
-
function
|
|
2407
|
+
function gc(e) {
|
|
2393
2408
|
return (e.startsWith("tool:") ? e.slice(5) : e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
|
|
2394
2409
|
}
|
|
2395
|
-
const
|
|
2410
|
+
const yc = [
|
|
2396
2411
|
{ name: "text", type: "string" },
|
|
2397
2412
|
{ name: "subject", type: "string" },
|
|
2398
2413
|
{ name: "from", type: "string" },
|
|
@@ -2432,7 +2447,7 @@ const fc = [
|
|
|
2432
2447
|
// `buildTriggerVars` cannot fill it itself: the job does that with the catalog in hand, before
|
|
2433
2448
|
// the trigger filter runs — like contactId/companyId above.
|
|
2434
2449
|
{ name: "assigneeUserId", type: "string" }
|
|
2435
|
-
],
|
|
2450
|
+
], bc = {
|
|
2436
2451
|
topics: [
|
|
2437
2452
|
{ name: "topicId", type: "string" },
|
|
2438
2453
|
{ name: "topic", type: "string" },
|
|
@@ -2446,58 +2461,58 @@ const fc = [
|
|
|
2446
2461
|
// Deliberately empty: the fields come from `ClassifyStep.fields` and so differ per step.
|
|
2447
2462
|
extract: []
|
|
2448
2463
|
};
|
|
2449
|
-
function
|
|
2464
|
+
function eo(e) {
|
|
2450
2465
|
return `${e.type}:${e.id}`;
|
|
2451
2466
|
}
|
|
2452
|
-
const
|
|
2453
|
-
function
|
|
2454
|
-
return e?.type ===
|
|
2467
|
+
const to = "interaction";
|
|
2468
|
+
function no(e) {
|
|
2469
|
+
return e?.type === to ? e.id : void 0;
|
|
2455
2470
|
}
|
|
2456
|
-
const
|
|
2457
|
-
function
|
|
2471
|
+
const ro = 64, oo = 8e3;
|
|
2472
|
+
function _c(e) {
|
|
2458
2473
|
const t = typeof e == "number" ? e : Number(String(e ?? "").trim());
|
|
2459
2474
|
if (!(!Number.isFinite(t) || t <= 0))
|
|
2460
|
-
return Math.min(Math.max(Math.round(t),
|
|
2475
|
+
return Math.min(Math.max(Math.round(t), ro), oo);
|
|
2461
2476
|
}
|
|
2462
|
-
const
|
|
2463
|
-
function
|
|
2477
|
+
const Ac = { kind: "workflow", steps: [] };
|
|
2478
|
+
function Sc(e) {
|
|
2464
2479
|
return e?.kind === "workflow" ? e.steps : [];
|
|
2465
2480
|
}
|
|
2466
|
-
function
|
|
2481
|
+
function Ec(e) {
|
|
2467
2482
|
return e?.kind === "procedure" ? e.procedure : void 0;
|
|
2468
2483
|
}
|
|
2469
|
-
function
|
|
2484
|
+
function so(e) {
|
|
2470
2485
|
const t = e?.approved ?? 0, n = t + (e?.rejected ?? 0);
|
|
2471
2486
|
return { total: n, rate: n ? t / n : 0 };
|
|
2472
2487
|
}
|
|
2473
|
-
const io = 10,
|
|
2474
|
-
function
|
|
2475
|
-
const { total: t, rate: n } =
|
|
2476
|
-
return t >= io && n >=
|
|
2488
|
+
const io = 10, ao = 0.9;
|
|
2489
|
+
function Ic(e) {
|
|
2490
|
+
const { total: t, rate: n } = so(e);
|
|
2491
|
+
return t >= io && n >= ao;
|
|
2477
2492
|
}
|
|
2478
|
-
const
|
|
2479
|
-
function
|
|
2480
|
-
return
|
|
2493
|
+
const co = ["done", "escalated", "failed", "stopped"];
|
|
2494
|
+
function Tc(e) {
|
|
2495
|
+
return co.includes(e);
|
|
2481
2496
|
}
|
|
2482
|
-
function
|
|
2497
|
+
function lo(e) {
|
|
2483
2498
|
return e === "waiting";
|
|
2484
2499
|
}
|
|
2485
|
-
function
|
|
2486
|
-
return e === "running" ||
|
|
2500
|
+
function kc(e) {
|
|
2501
|
+
return e === "running" || lo(e);
|
|
2487
2502
|
}
|
|
2488
2503
|
function Bt(e) {
|
|
2489
2504
|
return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
|
|
2490
2505
|
}
|
|
2491
|
-
function
|
|
2506
|
+
function wc(e) {
|
|
2492
2507
|
const t = Bt(e);
|
|
2493
|
-
return t ?
|
|
2508
|
+
return t ? eo(t) : void 0;
|
|
2494
2509
|
}
|
|
2495
|
-
function
|
|
2496
|
-
return
|
|
2510
|
+
function vc(e) {
|
|
2511
|
+
return no(Bt(e));
|
|
2497
2512
|
}
|
|
2498
|
-
function
|
|
2513
|
+
function Mc(e) {
|
|
2499
2514
|
const t = [], n = /* @__PURE__ */ new Map();
|
|
2500
|
-
for (const r of [...e].sort(
|
|
2515
|
+
for (const r of [...e].sort(uo)) {
|
|
2501
2516
|
const o = n.get(r.emoji);
|
|
2502
2517
|
if (o) {
|
|
2503
2518
|
o.push(r.actor);
|
|
@@ -2510,33 +2525,33 @@ function Tc(e) {
|
|
|
2510
2525
|
return { emoji: r, count: o.length, actors: o };
|
|
2511
2526
|
}).sort((r, o) => o.count - r.count || t.indexOf(r.emoji) - t.indexOf(o.emoji));
|
|
2512
2527
|
}
|
|
2513
|
-
const
|
|
2514
|
-
function
|
|
2528
|
+
const uo = (e, t) => (e.createdAt ?? 0) - (t.createdAt ?? 0);
|
|
2529
|
+
function Cc(e, t) {
|
|
2515
2530
|
return t ? e.actors.some((n) => n.type === "user" && n.id === t) : !1;
|
|
2516
2531
|
}
|
|
2517
|
-
const _e = 6e4,
|
|
2532
|
+
const _e = 6e4, po = 36e5, V = 864e5, jt = 800;
|
|
2518
2533
|
function ot(e, t) {
|
|
2519
2534
|
const n = Date.UTC(e, t + 1, 0);
|
|
2520
|
-
return n - new Date(n).getUTCDay() * V +
|
|
2535
|
+
return n - new Date(n).getUTCDay() * V + po;
|
|
2521
2536
|
}
|
|
2522
|
-
function
|
|
2537
|
+
function fo(e) {
|
|
2523
2538
|
const t = new Date(e).getUTCFullYear();
|
|
2524
2539
|
return e >= ot(t, 2) && e < ot(t, 9);
|
|
2525
2540
|
}
|
|
2526
2541
|
function Ht(e, t) {
|
|
2527
|
-
const n = t.dst === "eu" &&
|
|
2542
|
+
const n = t.dst === "eu" && fo(e) ? 60 : 0;
|
|
2528
2543
|
return (t.utcOffsetMinutes + n) * _e;
|
|
2529
2544
|
}
|
|
2530
|
-
function
|
|
2545
|
+
function mo(e) {
|
|
2531
2546
|
return (e + 3) % 7 + 1;
|
|
2532
2547
|
}
|
|
2533
2548
|
function Gt(e, t) {
|
|
2534
2549
|
const n = Ht(e, t), r = e + n, o = Math.floor(r / V);
|
|
2535
|
-
if (!t.days.includes(
|
|
2536
|
-
const
|
|
2550
|
+
if (!t.days.includes(mo(o))) return null;
|
|
2551
|
+
const s = o * V;
|
|
2537
2552
|
return {
|
|
2538
|
-
open:
|
|
2539
|
-
close:
|
|
2553
|
+
open: s + t.fromMinutes * _e - n,
|
|
2554
|
+
close: s + t.toMinutes * _e - n
|
|
2540
2555
|
};
|
|
2541
2556
|
}
|
|
2542
2557
|
function Wt(e, t) {
|
|
@@ -2547,10 +2562,10 @@ function Ae(e, t, n) {
|
|
|
2547
2562
|
if (t <= e) return 0;
|
|
2548
2563
|
if (!n) return t - e;
|
|
2549
2564
|
let r = 0, o = e;
|
|
2550
|
-
for (let
|
|
2551
|
-
const
|
|
2552
|
-
if (
|
|
2553
|
-
const a = Math.max(o,
|
|
2565
|
+
for (let s = 0; s < jt && o < t; s++) {
|
|
2566
|
+
const i = Gt(o, n);
|
|
2567
|
+
if (i) {
|
|
2568
|
+
const a = Math.max(o, i.open), u = Math.min(t, i.close);
|
|
2554
2569
|
u > a && (r += u - a);
|
|
2555
2570
|
}
|
|
2556
2571
|
o = Wt(o, n);
|
|
@@ -2560,12 +2575,12 @@ function Ae(e, t, n) {
|
|
|
2560
2575
|
function Oe(e, t, n) {
|
|
2561
2576
|
if (!n) return e + t;
|
|
2562
2577
|
let r = t, o = e;
|
|
2563
|
-
for (let
|
|
2564
|
-
const
|
|
2565
|
-
if (
|
|
2566
|
-
const a = Math.max(o,
|
|
2567
|
-
if (
|
|
2568
|
-
const u =
|
|
2578
|
+
for (let s = 0; s < jt; s++) {
|
|
2579
|
+
const i = Gt(o, n);
|
|
2580
|
+
if (i) {
|
|
2581
|
+
const a = Math.max(o, i.open);
|
|
2582
|
+
if (i.close > a) {
|
|
2583
|
+
const u = i.close - a;
|
|
2569
2584
|
if (r <= u) return a + r;
|
|
2570
2585
|
r -= u;
|
|
2571
2586
|
}
|
|
@@ -2574,79 +2589,79 @@ function Oe(e, t, n) {
|
|
|
2574
2589
|
}
|
|
2575
2590
|
return e + t;
|
|
2576
2591
|
}
|
|
2577
|
-
function
|
|
2592
|
+
function Oc(e) {
|
|
2578
2593
|
const t = /^([01]\d|2[0-3]):([0-5]\d)$/.exec(e);
|
|
2579
2594
|
return t ? Number(t[1]) * 60 + Number(t[2]) : null;
|
|
2580
2595
|
}
|
|
2581
2596
|
const Se = 1, Ee = 2;
|
|
2582
|
-
function
|
|
2597
|
+
function xc(e) {
|
|
2583
2598
|
return e === "snoozed" ? Se : Ee;
|
|
2584
2599
|
}
|
|
2585
2600
|
function xe(e) {
|
|
2586
2601
|
const t = e.calendar;
|
|
2587
2602
|
return t && Array.isArray(t.days) ? t : null;
|
|
2588
2603
|
}
|
|
2589
|
-
const
|
|
2604
|
+
const Nc = [
|
|
2590
2605
|
"speed_of_answer",
|
|
2591
2606
|
"first_response",
|
|
2592
2607
|
"next_response",
|
|
2593
2608
|
"resolution",
|
|
2594
2609
|
"close"
|
|
2595
|
-
],
|
|
2610
|
+
], Rc = ["snoozed", "waiting_for_customer"], ho = 6e4, Vt = ["speed_of_answer", "first_response", "next_response"], go = [...Vt, "resolution", "close"];
|
|
2596
2611
|
function z(e) {
|
|
2597
2612
|
return e.state === "running" || e.state === "paused";
|
|
2598
2613
|
}
|
|
2599
|
-
function
|
|
2614
|
+
function yo(e, t) {
|
|
2600
2615
|
return z(e) ? { state: (e.state === "paused" ? e.remainingMs > 0 : t <= e.dueAt) ? "hit" : "missed", settledAt: Math.max(t, e.startedAt) } : null;
|
|
2601
2616
|
}
|
|
2602
|
-
function
|
|
2617
|
+
function st(e) {
|
|
2603
2618
|
return z(e) ? { state: "void" } : null;
|
|
2604
2619
|
}
|
|
2605
|
-
function
|
|
2620
|
+
function bo(e, t, n, r) {
|
|
2606
2621
|
if (!z(e) || (e.pauseBits & t) !== 0) return null;
|
|
2607
2622
|
const o = e.pauseBits | t;
|
|
2608
2623
|
return e.state === "paused" ? { pauseBits: o } : { pauseBits: o, state: "paused", remainingMs: Ae(n, e.dueAt, r) };
|
|
2609
2624
|
}
|
|
2610
|
-
function
|
|
2625
|
+
function _o(e, t, n, r) {
|
|
2611
2626
|
if (!z(e) || (e.pauseBits & t) === 0) return null;
|
|
2612
2627
|
const o = e.pauseBits & ~t;
|
|
2613
2628
|
return o !== 0 ? { pauseBits: o } : { pauseBits: o, state: "running", dueAt: Oe(n, e.remainingMs, r) };
|
|
2614
2629
|
}
|
|
2615
|
-
function
|
|
2616
|
-
const
|
|
2630
|
+
function $c({ event: e, at: t, now: n, clocks: r, profile: o }) {
|
|
2631
|
+
const s = xe(o), i = Math.min(t, n), a = r.map((g) => ({ ...g })), u = [], l = (g, h) => {
|
|
2617
2632
|
h && (u.push({ op: "patch", clockId: g.id, patch: h }), Object.assign(g, h));
|
|
2618
2633
|
}, d = (g) => {
|
|
2619
2634
|
for (const h of a)
|
|
2620
|
-
h.metric === g && l(h,
|
|
2635
|
+
h.metric === g && l(h, yo(h, i));
|
|
2621
2636
|
}, c = (g) => {
|
|
2622
2637
|
for (const h of a)
|
|
2623
|
-
g.includes(h.metric) && l(h,
|
|
2638
|
+
g.includes(h.metric) && l(h, st(h));
|
|
2624
2639
|
}, p = (g) => {
|
|
2625
|
-
for (const h of a) l(h,
|
|
2640
|
+
for (const h of a) l(h, bo(h, g, i, s));
|
|
2626
2641
|
}, f = (g) => {
|
|
2627
|
-
for (const h of a) l(h,
|
|
2642
|
+
for (const h of a) l(h, _o(h, g, i, s));
|
|
2628
2643
|
}, y = (g) => a.reduce((h, S) => S.metric === g ? Math.max(h, S.attempt) : h, 0) + 1, m = (g) => a.some((h) => h.metric === g && z(h)), E = (g, h) => {
|
|
2629
2644
|
const S = o.targets.find((C) => C.metric === g);
|
|
2630
2645
|
if (!S) return;
|
|
2631
|
-
const x = S.minutes *
|
|
2646
|
+
const x = S.minutes * ho;
|
|
2632
2647
|
u.push({
|
|
2633
2648
|
op: "start",
|
|
2634
2649
|
metric: g,
|
|
2635
2650
|
attempt: y(g),
|
|
2636
2651
|
startedAt: h,
|
|
2637
2652
|
targetMs: x,
|
|
2638
|
-
dueAt: Oe(h, x,
|
|
2653
|
+
dueAt: Oe(h, x, s)
|
|
2639
2654
|
});
|
|
2640
2655
|
};
|
|
2641
2656
|
switch (e) {
|
|
2642
2657
|
case "apply": {
|
|
2643
2658
|
for (const g of a)
|
|
2644
|
-
g.profileId !== o.id && l(g,
|
|
2659
|
+
g.profileId !== o.id && l(g, st(g));
|
|
2645
2660
|
for (const g of o.targets) {
|
|
2646
2661
|
if (g.metric === "next_response") continue;
|
|
2647
2662
|
a.some(
|
|
2648
2663
|
(S) => S.metric === g.metric && S.profileId === o.id
|
|
2649
|
-
) || E(g.metric,
|
|
2664
|
+
) || E(g.metric, i);
|
|
2650
2665
|
}
|
|
2651
2666
|
break;
|
|
2652
2667
|
}
|
|
@@ -2658,7 +2673,7 @@ function Oc({ event: e, at: t, now: n, clocks: r, profile: o }) {
|
|
|
2658
2673
|
break;
|
|
2659
2674
|
}
|
|
2660
2675
|
case "inbound": {
|
|
2661
|
-
f(Ee), !m("first_response") && !m("next_response") && E("next_response",
|
|
2676
|
+
f(Ee), !m("first_response") && !m("next_response") && E("next_response", i);
|
|
2662
2677
|
break;
|
|
2663
2678
|
}
|
|
2664
2679
|
case "resolved":
|
|
@@ -2668,7 +2683,7 @@ function Oc({ event: e, at: t, now: n, clocks: r, profile: o }) {
|
|
|
2668
2683
|
d("close"), d("resolution"), c(Vt);
|
|
2669
2684
|
break;
|
|
2670
2685
|
case "reopened":
|
|
2671
|
-
m("resolution") || E("resolution",
|
|
2686
|
+
m("resolution") || E("resolution", i), m("close") || E("close", i);
|
|
2672
2687
|
break;
|
|
2673
2688
|
case "snoozed":
|
|
2674
2689
|
o.pauseOn.includes("snoozed") && p(Se);
|
|
@@ -2677,30 +2692,30 @@ function Oc({ event: e, at: t, now: n, clocks: r, profile: o }) {
|
|
|
2677
2692
|
f(Se);
|
|
2678
2693
|
break;
|
|
2679
2694
|
case "discarded":
|
|
2680
|
-
c(
|
|
2695
|
+
c(go);
|
|
2681
2696
|
break;
|
|
2682
2697
|
}
|
|
2683
2698
|
return u;
|
|
2684
2699
|
}
|
|
2685
|
-
function
|
|
2700
|
+
function Ao(e) {
|
|
2686
2701
|
return e.state === "running" || e.state === "paused";
|
|
2687
2702
|
}
|
|
2688
2703
|
function Ie(e, t) {
|
|
2689
2704
|
const n = xe(e);
|
|
2690
2705
|
return e.state === "paused" ? e.remainingMs : t >= e.dueAt ? -Ae(e.dueAt, t, n) : Ae(t, e.dueAt, n);
|
|
2691
2706
|
}
|
|
2692
|
-
function
|
|
2707
|
+
function Dc(e, t) {
|
|
2693
2708
|
return e.state === "paused" ? Oe(t, e.remainingMs, xe(e)) : e.dueAt;
|
|
2694
2709
|
}
|
|
2695
|
-
function
|
|
2696
|
-
const n = e.filter(
|
|
2710
|
+
function Lc(e, t) {
|
|
2711
|
+
const n = e.filter(Ao);
|
|
2697
2712
|
if (!n.length) return;
|
|
2698
|
-
const r = n.filter((
|
|
2713
|
+
const r = n.filter((s) => s.state === "running");
|
|
2699
2714
|
return (r.length ? r : n).reduce(
|
|
2700
|
-
(
|
|
2715
|
+
(s, i) => Ie(i, t) < Ie(s, t) ? i : s
|
|
2701
2716
|
);
|
|
2702
2717
|
}
|
|
2703
|
-
function
|
|
2718
|
+
function Pc(e, t) {
|
|
2704
2719
|
if (e.state === "missed") return "breached";
|
|
2705
2720
|
if (e.state === "hit") return "met";
|
|
2706
2721
|
if (e.state === "paused") return "paused";
|
|
@@ -2708,45 +2723,45 @@ function Rc(e, t) {
|
|
|
2708
2723
|
const n = Ie(e, t);
|
|
2709
2724
|
return n <= 0 ? "breached" : n <= e.targetMs / 5 ? "urgent" : "running";
|
|
2710
2725
|
}
|
|
2711
|
-
function
|
|
2726
|
+
function Kc(e) {
|
|
2712
2727
|
const t = Math.floor(Math.abs(e) / 1e3), n = Math.floor(t / 86400), r = Math.floor(t % 86400 / 3600), o = Math.floor(t % 3600 / 60);
|
|
2713
2728
|
return n ? r ? `${n}d ${r}u` : `${n}d` : r ? o ? `${r}u ${o}m` : `${r}u` : o ? `${o}m` : `${t % 60}s`;
|
|
2714
2729
|
}
|
|
2715
|
-
const
|
|
2730
|
+
const So = "strategy_item";
|
|
2716
2731
|
function zt(e) {
|
|
2717
|
-
return `${
|
|
2732
|
+
return `${So}:${e}`;
|
|
2718
2733
|
}
|
|
2719
|
-
function
|
|
2734
|
+
function Uc(e, t = 25) {
|
|
2720
2735
|
const n = /* @__PURE__ */ new Set([zt(e.id)]);
|
|
2721
2736
|
for (const r of e.ancestorKeys ?? []) n.add(r);
|
|
2722
2737
|
return Array.from(n).slice(0, t);
|
|
2723
2738
|
}
|
|
2724
|
-
function
|
|
2739
|
+
function Fc(e) {
|
|
2725
2740
|
return e ? [...e.ancestorKeys ?? [], zt(e.id)] : [];
|
|
2726
2741
|
}
|
|
2727
2742
|
const ne = [
|
|
2728
2743
|
{ key: "area", label: "level_area", order: 10, measurable: !1, icon: "compass" },
|
|
2729
2744
|
{ key: "objective", label: "level_objective", order: 20, measurable: !0, icon: "target" },
|
|
2730
2745
|
{ key: "key_result", label: "level_key_result", order: 30, measurable: !0, icon: "gauge" }
|
|
2731
|
-
],
|
|
2732
|
-
function
|
|
2746
|
+
], Eo = 999, Io = 7;
|
|
2747
|
+
function To(e, t = ne) {
|
|
2733
2748
|
return t.find((n) => n.key === e);
|
|
2734
2749
|
}
|
|
2735
2750
|
function Te(e, t = ne) {
|
|
2736
|
-
return
|
|
2751
|
+
return To(e, t)?.order ?? Eo;
|
|
2737
2752
|
}
|
|
2738
|
-
function
|
|
2753
|
+
function Bc(e, t, n = ne) {
|
|
2739
2754
|
return Te(t, n) <= Te(e, n);
|
|
2740
2755
|
}
|
|
2741
|
-
function
|
|
2756
|
+
function jc(e, t = ne) {
|
|
2742
2757
|
const n = Te(e, t);
|
|
2743
|
-
return t.filter((o) => o.order > n).sort((o,
|
|
2758
|
+
return t.filter((o) => o.order > n).sort((o, s) => o.order - s.order)[0]?.key ?? e;
|
|
2744
2759
|
}
|
|
2745
|
-
function
|
|
2760
|
+
function Hc(e) {
|
|
2746
2761
|
const t = e.trim().toLowerCase();
|
|
2747
2762
|
return t ? t.includes("key result") || t.includes("keyresult") || t === "kr" ? "key_result" : t.includes("objective") || t.includes("goal") || t.includes("doel") ? "objective" : t.includes("focus") || t.includes("area") || t.includes("theme") ? "area" : null : null;
|
|
2748
2763
|
}
|
|
2749
|
-
const
|
|
2764
|
+
const ke = {
|
|
2750
2765
|
pending: "open",
|
|
2751
2766
|
on_track: "open",
|
|
2752
2767
|
at_risk: "open",
|
|
@@ -2755,132 +2770,132 @@ const we = {
|
|
|
2755
2770
|
achieved: "closed",
|
|
2756
2771
|
missed: "closed"
|
|
2757
2772
|
};
|
|
2758
|
-
function
|
|
2759
|
-
return
|
|
2773
|
+
function Gc(e) {
|
|
2774
|
+
return ke[e] ?? "open";
|
|
2760
2775
|
}
|
|
2761
|
-
function
|
|
2762
|
-
return Object.keys(
|
|
2763
|
-
(t) => e.includes(
|
|
2776
|
+
function Wc(e) {
|
|
2777
|
+
return Object.keys(ke).filter(
|
|
2778
|
+
(t) => e.includes(ke[t])
|
|
2764
2779
|
);
|
|
2765
2780
|
}
|
|
2766
|
-
const
|
|
2767
|
-
function
|
|
2781
|
+
const ko = 864e5, re = (e) => e <= 0 ? 0 : e > 1 ? 1 : e;
|
|
2782
|
+
function Vc(e, t) {
|
|
2768
2783
|
const { direction: n } = e, r = e.startValue ?? 0, o = e.targetValue ?? 0;
|
|
2769
2784
|
if (!Number.isFinite(t)) return 0;
|
|
2770
|
-
const
|
|
2771
|
-
return (n === "down" ?
|
|
2785
|
+
const s = n === "down" ? t <= o : t >= o, i = o - r;
|
|
2786
|
+
return (n === "down" ? i < 0 : i > 0) ? re((t - r) / i) : s ? 1 : 0;
|
|
2772
2787
|
}
|
|
2773
|
-
function
|
|
2788
|
+
function zc(e, t) {
|
|
2774
2789
|
const { startDate: n, targetDate: r } = e;
|
|
2775
2790
|
if (!(typeof n != "number" || typeof r != "number") && !(r <= n))
|
|
2776
2791
|
return re((t - n) / (r - n));
|
|
2777
2792
|
}
|
|
2778
|
-
const wo = 0.1,
|
|
2779
|
-
function
|
|
2793
|
+
const wo = 0.1, vo = 0.25;
|
|
2794
|
+
function Xc(e, t) {
|
|
2780
2795
|
if (typeof e != "number" || typeof t != "number") return;
|
|
2781
2796
|
if (e >= 1) return "achieved";
|
|
2782
2797
|
const n = t - e;
|
|
2783
|
-
return n >=
|
|
2798
|
+
return n >= vo ? "off_track" : n >= wo ? "at_risk" : "on_track";
|
|
2784
2799
|
}
|
|
2785
|
-
function
|
|
2800
|
+
function Yc(e, t) {
|
|
2786
2801
|
if (t)
|
|
2787
2802
|
return re(e / t);
|
|
2788
2803
|
}
|
|
2789
|
-
function
|
|
2804
|
+
function qc(e) {
|
|
2790
2805
|
const t = e.map((n) => n.progress?.ratio).filter((n) => typeof n == "number" && Number.isFinite(n));
|
|
2791
2806
|
if (t.length)
|
|
2792
2807
|
return re(t.reduce((n, r) => n + r, 0) / t.length);
|
|
2793
2808
|
}
|
|
2794
|
-
function
|
|
2809
|
+
function Qc(e, t) {
|
|
2795
2810
|
const n = e.lastCheckInAt ?? e.createdAt;
|
|
2796
2811
|
if (typeof n != "number") return 0;
|
|
2797
|
-
const r = (e.checkInEveryDays ??
|
|
2812
|
+
const r = (e.checkInEveryDays ?? Io) * ko, o = t - n - r;
|
|
2798
2813
|
return o > 0 ? o : 0;
|
|
2799
2814
|
}
|
|
2800
|
-
function
|
|
2815
|
+
function Zc(e) {
|
|
2801
2816
|
return e.targetDate ?? Number.MAX_SAFE_INTEGER;
|
|
2802
2817
|
}
|
|
2803
|
-
function
|
|
2818
|
+
function Jc(e, t) {
|
|
2804
2819
|
const n = e.accumulatedSeconds || 0;
|
|
2805
2820
|
return e.runningSince ? n + Math.max(0, Math.floor((t - e.runningSince) / 1e3)) : n;
|
|
2806
2821
|
}
|
|
2807
|
-
function
|
|
2822
|
+
function el(e, t) {
|
|
2808
2823
|
const n = Math.max(1, Math.ceil(Math.max(0, e) / 60));
|
|
2809
2824
|
if (!t || t === "exact") return n * 60;
|
|
2810
2825
|
const r = Number(t);
|
|
2811
2826
|
return !Number.isFinite(r) || r <= 0 ? n * 60 : Math.ceil(n / r) * r * 60;
|
|
2812
2827
|
}
|
|
2813
|
-
function
|
|
2828
|
+
function tl(e) {
|
|
2814
2829
|
const t = Math.max(0, Math.round(e / 60));
|
|
2815
2830
|
return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
|
|
2816
2831
|
}
|
|
2817
|
-
function
|
|
2818
|
-
const t = Math.max(0, Math.floor(e)), n = (
|
|
2832
|
+
function nl(e) {
|
|
2833
|
+
const t = Math.max(0, Math.floor(e)), n = (s) => String(s).padStart(2, "0"), r = Math.floor(t / 60) % 60, o = Math.floor(t / 3600);
|
|
2819
2834
|
return o > 0 ? `${o}:${n(r)}:${n(t % 60)}` : `${n(r)}:${n(t % 60)}`;
|
|
2820
2835
|
}
|
|
2821
2836
|
function Mo(e) {
|
|
2822
2837
|
return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
|
|
2823
2838
|
}
|
|
2824
|
-
function
|
|
2839
|
+
function rl(e, t) {
|
|
2825
2840
|
const n = Mo(e) || "werksoort", r = new Set(t);
|
|
2826
2841
|
if (!r.has(n)) return n;
|
|
2827
2842
|
for (let o = 2; o < 500; o++) {
|
|
2828
|
-
const
|
|
2829
|
-
if (!r.has(
|
|
2843
|
+
const s = `${n}-${o}`;
|
|
2844
|
+
if (!r.has(s)) return s;
|
|
2830
2845
|
}
|
|
2831
2846
|
return `${n}-${r.size + 1}`;
|
|
2832
2847
|
}
|
|
2833
|
-
function
|
|
2848
|
+
function ol(e, t) {
|
|
2834
2849
|
const n = e.ownerScope;
|
|
2835
2850
|
return !n || n.kind === "org" ? !0 : t.includes(n.teamId);
|
|
2836
2851
|
}
|
|
2837
|
-
function
|
|
2838
|
-
return e.filter((t) => !t.archived).sort(
|
|
2852
|
+
function sl(e) {
|
|
2853
|
+
return e.filter((t) => !t.archived).sort(Co);
|
|
2839
2854
|
}
|
|
2840
|
-
function
|
|
2855
|
+
function Co(e, t) {
|
|
2841
2856
|
const n = (e.order ?? 0) - (t.order ?? 0);
|
|
2842
2857
|
return n !== 0 ? n : (e.label || "").localeCompare(t.label || "");
|
|
2843
2858
|
}
|
|
2844
|
-
const
|
|
2859
|
+
const Oo = 20, xo = 20, ue = 300;
|
|
2845
2860
|
function P(e) {
|
|
2846
2861
|
return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu, " ").replace(/\s+/g, " ").trim();
|
|
2847
2862
|
}
|
|
2848
|
-
function
|
|
2863
|
+
function No(e) {
|
|
2849
2864
|
const t = e.replace(/\s+/g, " ").trim();
|
|
2850
2865
|
if (t.length <= ue) return t;
|
|
2851
2866
|
const n = t.slice(0, ue), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
|
|
2852
2867
|
return r > ue * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
|
|
2853
2868
|
}
|
|
2854
|
-
function
|
|
2855
|
-
const n =
|
|
2856
|
-
if (!r || (e.examples ?? []).some((
|
|
2857
|
-
const o = e.exampleCandidates ?? [],
|
|
2858
|
-
if (
|
|
2859
|
-
if (o[
|
|
2860
|
-
const
|
|
2861
|
-
return s
|
|
2869
|
+
function il(e, t) {
|
|
2870
|
+
const n = No(t.text), r = P(n);
|
|
2871
|
+
if (!r || (e.examples ?? []).some((i) => P(i) === r)) return null;
|
|
2872
|
+
const o = e.exampleCandidates ?? [], s = o.findIndex((i) => P(i.text) === r);
|
|
2873
|
+
if (s >= 0) {
|
|
2874
|
+
if (o[s].corrected || !t.corrected) return null;
|
|
2875
|
+
const i = [...o];
|
|
2876
|
+
return i[s] = { ...i[s], corrected: !0, addedAt: t.addedAt }, it(i);
|
|
2862
2877
|
}
|
|
2863
|
-
return
|
|
2878
|
+
return it([{ ...t, text: n }, ...o]).slice(0, xo);
|
|
2864
2879
|
}
|
|
2865
|
-
function
|
|
2880
|
+
function it(e) {
|
|
2866
2881
|
return [...e].sort(
|
|
2867
2882
|
(t, n) => Number(n.corrected) - Number(t.corrected) || n.addedAt - t.addedAt
|
|
2868
2883
|
);
|
|
2869
2884
|
}
|
|
2870
|
-
function
|
|
2871
|
-
const n = P(t), r = (e.examples ?? []).filter((
|
|
2872
|
-
return { examples: r.some((
|
|
2885
|
+
function al(e, t) {
|
|
2886
|
+
const n = P(t), r = (e.examples ?? []).filter((s) => s.trim());
|
|
2887
|
+
return { examples: r.some((s) => P(s) === n) ? r : [...r, t].slice(-Oo), exampleCandidates: Ro(e, t) };
|
|
2873
2888
|
}
|
|
2874
|
-
function
|
|
2889
|
+
function Ro(e, t) {
|
|
2875
2890
|
const n = P(t);
|
|
2876
2891
|
return (e.exampleCandidates ?? []).filter((r) => P(r.text) !== n);
|
|
2877
2892
|
}
|
|
2878
|
-
function
|
|
2893
|
+
function $o(e, t) {
|
|
2879
2894
|
const n = e.ownerScope;
|
|
2880
2895
|
return n ? n.kind === "org" ? !0 : n.kind === "team" ? !!t && n.teamId === t : !1 : !1;
|
|
2881
2896
|
}
|
|
2882
|
-
function
|
|
2883
|
-
return e.filter((n) =>
|
|
2897
|
+
function cl(e, t) {
|
|
2898
|
+
return e.filter((n) => $o(n, t));
|
|
2884
2899
|
}
|
|
2885
2900
|
const Xt = [
|
|
2886
2901
|
{
|
|
@@ -2912,7 +2927,7 @@ const Xt = [
|
|
|
2912
2927
|
statuses: ["draft", "open", "settled", "cancelled"]
|
|
2913
2928
|
}
|
|
2914
2929
|
];
|
|
2915
|
-
function
|
|
2930
|
+
function we(e) {
|
|
2916
2931
|
return Xt.find((t) => t.key === e) ?? {
|
|
2917
2932
|
key: e,
|
|
2918
2933
|
label: e,
|
|
@@ -2921,10 +2936,10 @@ function ke(e) {
|
|
|
2921
2936
|
statuses: ["draft"]
|
|
2922
2937
|
};
|
|
2923
2938
|
}
|
|
2924
|
-
function
|
|
2939
|
+
function ll(e) {
|
|
2925
2940
|
return e.issuedAt != null;
|
|
2926
2941
|
}
|
|
2927
|
-
const
|
|
2942
|
+
const ul = [
|
|
2928
2943
|
"status",
|
|
2929
2944
|
"fileRef",
|
|
2930
2945
|
"number",
|
|
@@ -2934,7 +2949,7 @@ const sl = [
|
|
|
2934
2949
|
"updatedAt"
|
|
2935
2950
|
];
|
|
2936
2951
|
function Do(e, t) {
|
|
2937
|
-
const n =
|
|
2952
|
+
const n = we(t).signFlip !== we(e.kindKey).signFlip, r = e.lines.map((o) => ({
|
|
2938
2953
|
...o,
|
|
2939
2954
|
quantity: n ? -o.quantity : o.quantity,
|
|
2940
2955
|
netCents: 0,
|
|
@@ -2945,6 +2960,9 @@ function Do(e, t) {
|
|
|
2945
2960
|
sourceTransactionId: e.id,
|
|
2946
2961
|
agreementId: e.agreementId,
|
|
2947
2962
|
version: 1,
|
|
2963
|
+
// Carried over on purpose: a revision of a quote must not quietly change which entity signs
|
|
2964
|
+
// it, and neither must the invoice that follows from it.
|
|
2965
|
+
businessEntityId: e.businessEntityId,
|
|
2948
2966
|
companyId: e.companyId,
|
|
2949
2967
|
contactId: e.contactId,
|
|
2950
2968
|
dealItemId: e.dealItemId,
|
|
@@ -2962,7 +2980,7 @@ function Do(e, t) {
|
|
|
2962
2980
|
source: e.source
|
|
2963
2981
|
};
|
|
2964
2982
|
}
|
|
2965
|
-
function
|
|
2983
|
+
function dl(e) {
|
|
2966
2984
|
return {
|
|
2967
2985
|
...Do(e, e.kindKey),
|
|
2968
2986
|
sourceTransactionId: e.sourceTransactionId,
|
|
@@ -2972,8 +2990,8 @@ function al(e) {
|
|
|
2972
2990
|
totals: e.totals
|
|
2973
2991
|
};
|
|
2974
2992
|
}
|
|
2975
|
-
function
|
|
2976
|
-
const n =
|
|
2993
|
+
function pl(e, t = {}) {
|
|
2994
|
+
const n = we(e.kindKey), r = e.totals ?? { netCents: 0, taxCents: 0, grossCents: 0 };
|
|
2977
2995
|
return {
|
|
2978
2996
|
customer: {
|
|
2979
2997
|
name: t.companyName ?? "",
|
|
@@ -2981,7 +2999,7 @@ function cl(e, t = {}) {
|
|
|
2981
2999
|
// One token per line of the address, plus `street` on its own for a template that wants
|
|
2982
3000
|
// the house number elsewhere. Empty stays empty: `fillText` reports it as a hole, and a
|
|
2983
3001
|
// recipient block missing its street is exactly what the issue gate has to refuse.
|
|
2984
|
-
address:
|
|
3002
|
+
address: Ko(t.companyAddress),
|
|
2985
3003
|
street: t.companyAddress?.street ?? "",
|
|
2986
3004
|
house_number: t.companyAddress?.houseNumber ?? "",
|
|
2987
3005
|
postal_code: t.companyAddress?.postalCode ?? "",
|
|
@@ -3000,14 +3018,14 @@ function cl(e, t = {}) {
|
|
|
3000
3018
|
valid_until: at(e.expiresAt)
|
|
3001
3019
|
},
|
|
3002
3020
|
totals: {
|
|
3003
|
-
net:
|
|
3004
|
-
tax:
|
|
3005
|
-
gross:
|
|
3021
|
+
net: $(r.netCents),
|
|
3022
|
+
tax: $(r.taxCents),
|
|
3023
|
+
gross: $(r.grossCents)
|
|
3006
3024
|
}
|
|
3007
3025
|
};
|
|
3008
3026
|
}
|
|
3009
|
-
function
|
|
3010
|
-
const r = e.totals ?? { netCents: 0, grossCents: 0, byRate: [] }, o = (a) => t.find((u) => u.key === a)?.percent ?? 0,
|
|
3027
|
+
function fl(e, t = [], n = Lo) {
|
|
3028
|
+
const r = e.totals ?? { netCents: 0, grossCents: 0, byRate: [] }, o = (a) => t.find((u) => u.key === a)?.percent ?? 0, s = {
|
|
3011
3029
|
block_id: "lines",
|
|
3012
3030
|
type: "table",
|
|
3013
3031
|
columns: [
|
|
@@ -3021,27 +3039,27 @@ function ll(e, t = [], n = $o) {
|
|
|
3021
3039
|
// A text line spans as a heading: empty money cells would read as "free".
|
|
3022
3040
|
[a.name, "", "", ""]
|
|
3023
3041
|
) : [
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3042
|
+
Po(a.name, a.description, a.optional, n.optional),
|
|
3043
|
+
Uo(a.quantity),
|
|
3044
|
+
$(a.unitPriceCents),
|
|
3045
|
+
$(a.netCents)
|
|
3028
3046
|
]
|
|
3029
3047
|
)
|
|
3030
|
-
},
|
|
3048
|
+
}, i = {
|
|
3031
3049
|
block_id: "totals",
|
|
3032
3050
|
type: "totals",
|
|
3033
3051
|
rows: [
|
|
3034
|
-
{ label: n.net, amount:
|
|
3035
|
-
{ label: n.gross, amount:
|
|
3052
|
+
{ label: n.net, amount: $(r.netCents) },
|
|
3053
|
+
{ label: n.gross, amount: $(r.grossCents), emphasis: !0 }
|
|
3036
3054
|
],
|
|
3037
3055
|
taxRows: r.byRate.map((a) => ({
|
|
3038
3056
|
label: `${n.tax} ${o(a.taxRateKey)}%`,
|
|
3039
|
-
amount:
|
|
3057
|
+
amount: $(a.taxCents)
|
|
3040
3058
|
}))
|
|
3041
3059
|
};
|
|
3042
|
-
return { lines: [
|
|
3060
|
+
return { lines: [s], totals: [i] };
|
|
3043
3061
|
}
|
|
3044
|
-
const
|
|
3062
|
+
const Lo = {
|
|
3045
3063
|
description: "Omschrijving",
|
|
3046
3064
|
optional: "optioneel",
|
|
3047
3065
|
quantity: "Aantal",
|
|
@@ -3050,14 +3068,14 @@ const $o = {
|
|
|
3050
3068
|
tax: "Btw",
|
|
3051
3069
|
gross: "Totaal"
|
|
3052
3070
|
};
|
|
3053
|
-
function
|
|
3071
|
+
function Po(e, t, n, r) {
|
|
3054
3072
|
const o = t ? `${e} — ${t}` : e;
|
|
3055
3073
|
return n ? `${o} (${r})` : o;
|
|
3056
3074
|
}
|
|
3057
|
-
function
|
|
3075
|
+
function Ko(e) {
|
|
3058
3076
|
return e?.street ? [e.street, e.houseNumber].filter(Boolean).join(" ") : "";
|
|
3059
3077
|
}
|
|
3060
|
-
function
|
|
3078
|
+
function Uo(e) {
|
|
3061
3079
|
return Number.isInteger(e) ? String(e) : String(e).replace(".", ",");
|
|
3062
3080
|
}
|
|
3063
3081
|
function at(e) {
|
|
@@ -3065,7 +3083,7 @@ function at(e) {
|
|
|
3065
3083
|
const t = new Date(e), n = (r) => String(r).padStart(2, "0");
|
|
3066
3084
|
return `${n(t.getDate())}-${n(t.getMonth() + 1)}-${t.getFullYear()}`;
|
|
3067
3085
|
}
|
|
3068
|
-
const
|
|
3086
|
+
const ml = [
|
|
3069
3087
|
{
|
|
3070
3088
|
block_id: "head",
|
|
3071
3089
|
type: "letterhead",
|
|
@@ -3098,39 +3116,43 @@ Hierbij onze offerte. Hieronder vindt u de specificatie.`
|
|
|
3098
3116
|
type: "paragraph",
|
|
3099
3117
|
text: "Genoemde bedragen zijn exclusief btw tenzij anders vermeld. Deze offerte is geldig tot {quote.valid_until}."
|
|
3100
3118
|
}
|
|
3101
|
-
],
|
|
3102
|
-
function
|
|
3119
|
+
], Fo = Xt.map((e) => e.key), Bo = "product";
|
|
3120
|
+
function jo(e, t) {
|
|
3103
3121
|
return `${e}:${t}`;
|
|
3104
3122
|
}
|
|
3105
|
-
function
|
|
3106
|
-
return `${
|
|
3123
|
+
function hl(e) {
|
|
3124
|
+
return `${Bo}:${e}`;
|
|
3107
3125
|
}
|
|
3108
|
-
function
|
|
3126
|
+
function gl(e) {
|
|
3109
3127
|
const t = e.indexOf(":");
|
|
3110
3128
|
if (t < 0) return;
|
|
3111
3129
|
const n = e.slice(0, t);
|
|
3112
|
-
return
|
|
3130
|
+
return Fo.includes(n) ? e.slice(t + 1) : void 0;
|
|
3113
3131
|
}
|
|
3114
|
-
function
|
|
3132
|
+
function yl(e) {
|
|
3133
|
+
const t = /* @__PURE__ */ new Set([jo(e.kindKey, e.id)]);
|
|
3134
|
+
return e.companyId && t.add(`company:${e.companyId}`), e.contactId && t.add(`contact:${e.contactId}`), e.dealItemId && t.add(`work_item:${e.dealItemId}`), Array.from(t);
|
|
3135
|
+
}
|
|
3136
|
+
function bl(e) {
|
|
3115
3137
|
return e.type === "agent";
|
|
3116
3138
|
}
|
|
3117
|
-
const
|
|
3118
|
-
function
|
|
3139
|
+
const _l = "WORK_COMMENT_ADDED", Al = "WORK_ITEM_ASSIGNED", Sl = "WORK_ITEM_STATUS_CHANGED";
|
|
3140
|
+
function Ho(e, t) {
|
|
3119
3141
|
const n = (r) => {
|
|
3120
3142
|
const o = new Date(r);
|
|
3121
3143
|
return o.setHours(0, 0, 0, 0), o.getTime();
|
|
3122
3144
|
};
|
|
3123
|
-
return Math.round((n(e) - n(t)) /
|
|
3145
|
+
return Math.round((n(e) - n(t)) / Qn);
|
|
3124
3146
|
}
|
|
3125
|
-
function
|
|
3147
|
+
function El(e, t) {
|
|
3126
3148
|
if (e.closedAt != null) return { score: L, reasons: [] };
|
|
3127
3149
|
const n = t.remindersById?.[e.id];
|
|
3128
3150
|
if (n && n.remindAt > t.now) return { score: L, reasons: [] };
|
|
3129
3151
|
let r = 0;
|
|
3130
|
-
const o = [],
|
|
3131
|
-
if (J[
|
|
3132
|
-
const
|
|
3133
|
-
|
|
3152
|
+
const o = [], s = e.priority ?? "normal";
|
|
3153
|
+
if (J[s] > 0 && (r += J[s], o.push(`priority:${s}`)), typeof e.dueDate == "number") {
|
|
3154
|
+
const i = Ho(e.dueDate, t.now);
|
|
3155
|
+
i < 0 ? (r += 35, o.push("overdue")) : i === 0 && (r += 20, o.push("due-today"));
|
|
3134
3156
|
}
|
|
3135
3157
|
return e.source?.initiator === "system" && e.source.systemReason && (r += 15, o.push(`auto:${e.source.systemReason}`)), { score: r, reasons: o };
|
|
3136
3158
|
}
|
|
@@ -3142,35 +3164,35 @@ const Ne = [
|
|
|
3142
3164
|
{ key: "subtask", label: "type_subtask" },
|
|
3143
3165
|
{ key: "case", label: "type_case" },
|
|
3144
3166
|
{ key: "deal", label: "type_deal" }
|
|
3145
|
-
],
|
|
3146
|
-
function
|
|
3167
|
+
], Il = Ne.map((e) => e.key);
|
|
3168
|
+
function Tl(e) {
|
|
3147
3169
|
return e?.types?.length ? e.types : Ne;
|
|
3148
3170
|
}
|
|
3149
|
-
function
|
|
3171
|
+
function kl(e, t) {
|
|
3150
3172
|
return t.find((n) => n.key === e);
|
|
3151
3173
|
}
|
|
3152
|
-
function
|
|
3174
|
+
function wl(e) {
|
|
3153
3175
|
const t = e.trim().toLowerCase();
|
|
3154
3176
|
return t ? t.includes("sub-task") || t.includes("subtask") || t.includes("sub task") ? "subtask" : t.includes("bug") || t.includes("defect") ? "bug" : t.includes("epic") ? "epic" : t.includes("story") ? "story" : t.includes("incident") || t.includes("problem") || t.includes("service request") || t.includes("change") ? "case" : t.includes("task") ? "task" : null : null;
|
|
3155
3177
|
}
|
|
3156
|
-
function
|
|
3178
|
+
function vl(...e) {
|
|
3157
3179
|
return e.map((t) => Ne.find((n) => n.key === t)).filter((t) => !!t);
|
|
3158
3180
|
}
|
|
3159
|
-
const
|
|
3160
|
-
function
|
|
3161
|
-
return `${
|
|
3181
|
+
const Go = "work_item", Wo = "work_project", Vo = "work_activity", Ml = "work_cycle";
|
|
3182
|
+
function zo(e) {
|
|
3183
|
+
return `${Go}:${e}`;
|
|
3162
3184
|
}
|
|
3163
3185
|
function Yt(e) {
|
|
3164
|
-
return `${
|
|
3186
|
+
return `${Wo}:${e}`;
|
|
3165
3187
|
}
|
|
3166
|
-
function
|
|
3167
|
-
return `${
|
|
3188
|
+
function Cl(e) {
|
|
3189
|
+
return `${Vo}:${e}`;
|
|
3168
3190
|
}
|
|
3169
|
-
function
|
|
3191
|
+
function Ol(e, t, n) {
|
|
3170
3192
|
const r = `${e}-${t}`;
|
|
3171
3193
|
return n ? `${r}-${n}` : r;
|
|
3172
3194
|
}
|
|
3173
|
-
function
|
|
3195
|
+
function xl(e) {
|
|
3174
3196
|
const t = /^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e || "").trim());
|
|
3175
3197
|
return t ? {
|
|
3176
3198
|
projectKey: t[1].toUpperCase(),
|
|
@@ -3178,17 +3200,17 @@ function Ml(e) {
|
|
|
3178
3200
|
...t[3] ? { subSequence: Number(t[3]) } : {}
|
|
3179
3201
|
} : null;
|
|
3180
3202
|
}
|
|
3181
|
-
function
|
|
3203
|
+
function Nl(e) {
|
|
3182
3204
|
return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 3) || "PRJ";
|
|
3183
3205
|
}
|
|
3184
|
-
function
|
|
3185
|
-
const n = /* @__PURE__ */ new Set([
|
|
3206
|
+
function Rl(e, t = 25) {
|
|
3207
|
+
const n = /* @__PURE__ */ new Set([zo(e.id)]);
|
|
3186
3208
|
e.projectId && n.add(Yt(e.projectId));
|
|
3187
3209
|
for (const r of e.ancestorKeys ?? []) n.add(r);
|
|
3188
3210
|
for (const r of e.partyKeys ?? []) n.add(r);
|
|
3189
3211
|
return Array.from(n).slice(0, t);
|
|
3190
3212
|
}
|
|
3191
|
-
function
|
|
3213
|
+
function $l(e) {
|
|
3192
3214
|
return [Yt(e.id)];
|
|
3193
3215
|
}
|
|
3194
3216
|
const Re = [
|
|
@@ -3197,41 +3219,41 @@ const Re = [
|
|
|
3197
3219
|
{ key: "done", label: "status_done", category: "done", order: 2 },
|
|
3198
3220
|
{ key: "cancelled", label: "status_cancelled", category: "done", order: 3 }
|
|
3199
3221
|
], qt = Re.map((e) => e.key);
|
|
3200
|
-
function
|
|
3222
|
+
function Xo(e) {
|
|
3201
3223
|
return e?.statuses?.length ? e.statuses : Re;
|
|
3202
3224
|
}
|
|
3203
|
-
function
|
|
3225
|
+
function Yo(e, t) {
|
|
3204
3226
|
return t.find((n) => n.key === e)?.category ?? "todo";
|
|
3205
3227
|
}
|
|
3206
|
-
function
|
|
3228
|
+
function Dl(e, t) {
|
|
3207
3229
|
return t.find((n) => n.key === e);
|
|
3208
3230
|
}
|
|
3209
|
-
function
|
|
3210
|
-
const t =
|
|
3211
|
-
return n && t.some((r) => r.key === n) ? n :
|
|
3231
|
+
function Ll(e) {
|
|
3232
|
+
const t = Xo(e), n = e?.defaultStatusKey;
|
|
3233
|
+
return n && t.some((r) => r.key === n) ? n : qo(t)[0]?.key ?? Re[0].key;
|
|
3212
3234
|
}
|
|
3213
|
-
function
|
|
3235
|
+
function qo(e) {
|
|
3214
3236
|
return [...e].sort((t, n) => {
|
|
3215
3237
|
const r = (t.order ?? 0) - (n.order ?? 0);
|
|
3216
3238
|
return r !== 0 ? r : (t.label || "").localeCompare(n.label || "");
|
|
3217
3239
|
});
|
|
3218
3240
|
}
|
|
3219
|
-
function
|
|
3220
|
-
return
|
|
3241
|
+
function Pl(e, t) {
|
|
3242
|
+
return Yo(e, t) === "done";
|
|
3221
3243
|
}
|
|
3222
|
-
function
|
|
3244
|
+
function Qo(e) {
|
|
3223
3245
|
return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
|
|
3224
3246
|
}
|
|
3225
|
-
function
|
|
3226
|
-
const n =
|
|
3247
|
+
function Kl(e, t) {
|
|
3248
|
+
const n = Qo(e) || "status", r = /* @__PURE__ */ new Set([...t, ...qt]);
|
|
3227
3249
|
if (!r.has(n)) return n;
|
|
3228
3250
|
for (let o = 2; o < 500; o++) {
|
|
3229
|
-
const
|
|
3230
|
-
if (!r.has(
|
|
3251
|
+
const s = `${n}-${o}`;
|
|
3252
|
+
if (!r.has(s)) return s;
|
|
3231
3253
|
}
|
|
3232
3254
|
return `${n}-${r.size + 1}`;
|
|
3233
3255
|
}
|
|
3234
|
-
function
|
|
3256
|
+
function Ul(e) {
|
|
3235
3257
|
const t = [];
|
|
3236
3258
|
if (!e.length) return [{ index: -1, reason: "empty" }];
|
|
3237
3259
|
const n = /* @__PURE__ */ new Set();
|
|
@@ -3243,13 +3265,13 @@ function $l(e) {
|
|
|
3243
3265
|
qt.includes(r.key) && t.push({ index: o, reason: "reserved_key", key: r.key }), n.has(r.key) && t.push({ index: o, reason: "duplicate_key", key: r.key }), n.add(r.key);
|
|
3244
3266
|
}), 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;
|
|
3245
3267
|
}
|
|
3246
|
-
function
|
|
3268
|
+
function Fl(e) {
|
|
3247
3269
|
return e.startDate ?? Number.MAX_SAFE_INTEGER;
|
|
3248
3270
|
}
|
|
3249
|
-
function
|
|
3271
|
+
function Bl(e) {
|
|
3250
3272
|
return e.completedAt ? "completed" : e.startedAt ? "active" : "planned";
|
|
3251
3273
|
}
|
|
3252
|
-
const
|
|
3274
|
+
const Zo = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), Jo = /* @__PURE__ */ new Set([
|
|
3253
3275
|
"text/plain",
|
|
3254
3276
|
"text/markdown",
|
|
3255
3277
|
"text/csv",
|
|
@@ -3258,67 +3280,67 @@ const qo = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "ima
|
|
|
3258
3280
|
"application/xml",
|
|
3259
3281
|
"text/xml"
|
|
3260
3282
|
]);
|
|
3261
|
-
function
|
|
3283
|
+
function es(e) {
|
|
3262
3284
|
const t = (e ?? "").trim().toLowerCase().split(";")[0];
|
|
3263
|
-
return t ?
|
|
3285
|
+
return t ? Zo.has(t) ? "image" : t === "application/pdf" ? "pdf" : Jo.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
|
|
3264
3286
|
}
|
|
3265
|
-
const F = 1024 * 1024,
|
|
3287
|
+
const F = 1024 * 1024, ts = {
|
|
3266
3288
|
image: 5 * F,
|
|
3267
3289
|
pdf: 20 * F,
|
|
3268
3290
|
text: 1 * F,
|
|
3269
3291
|
audio: 20 * F
|
|
3270
|
-
},
|
|
3271
|
-
function
|
|
3272
|
-
const n =
|
|
3273
|
-
return n === "unsupported" ? "unsupported" : t >
|
|
3292
|
+
}, jl = 25 * F, Hl = 5;
|
|
3293
|
+
function Gl(e, t) {
|
|
3294
|
+
const n = es(e);
|
|
3295
|
+
return n === "unsupported" ? "unsupported" : t > ts[n] ? "too-large" : null;
|
|
3274
3296
|
}
|
|
3275
|
-
function
|
|
3297
|
+
function Wl(e) {
|
|
3276
3298
|
return e.access !== "read" && e.effect !== "internal";
|
|
3277
3299
|
}
|
|
3278
|
-
function
|
|
3300
|
+
function ns(e) {
|
|
3279
3301
|
return `${e.kind}:${e.id || e.url || e.title}`;
|
|
3280
3302
|
}
|
|
3281
|
-
function
|
|
3303
|
+
function Vl(e, t = []) {
|
|
3282
3304
|
const n = new Set(t), r = [], o = [];
|
|
3283
|
-
for (const
|
|
3284
|
-
const
|
|
3285
|
-
n.has(
|
|
3305
|
+
for (const s of e) {
|
|
3306
|
+
const i = ns(s);
|
|
3307
|
+
n.has(i) || (n.add(i), r.push(s), o.push(i));
|
|
3286
3308
|
}
|
|
3287
3309
|
return { sources: r, keys: o };
|
|
3288
3310
|
}
|
|
3289
|
-
const
|
|
3290
|
-
function
|
|
3311
|
+
const zl = "assist-source", Xl = ["blocking", "due", "open"];
|
|
3312
|
+
function Yl(e, t) {
|
|
3291
3313
|
const [n, r] = (e.subjectKey ?? "").split(":");
|
|
3292
3314
|
return n === t && r ? r : void 0;
|
|
3293
3315
|
}
|
|
3294
3316
|
const ct = { blocking: 0, due: 1, open: 2 };
|
|
3295
|
-
function
|
|
3317
|
+
function ql(e, t) {
|
|
3296
3318
|
return ct[e.band ?? "open"] - ct[t.band ?? "open"] || (t.priority ?? 0) - (e.priority ?? 0) || e.id.localeCompare(t.id);
|
|
3297
3319
|
}
|
|
3298
|
-
function
|
|
3320
|
+
function Ql(e) {
|
|
3299
3321
|
return e.sessions.filter(
|
|
3300
3322
|
(t) => t.id !== e.exceptSessionId && t.state === "connected" && e.canHold(t.providerId)
|
|
3301
3323
|
);
|
|
3302
3324
|
}
|
|
3303
|
-
function
|
|
3325
|
+
function Zl(e) {
|
|
3304
3326
|
return e.sessions.filter(
|
|
3305
3327
|
(t) => t.id !== e.exceptSessionId && t.state === "connected" && !e.canHold(t.providerId)
|
|
3306
3328
|
);
|
|
3307
3329
|
}
|
|
3308
|
-
function
|
|
3330
|
+
function Jl(e) {
|
|
3309
3331
|
return e.sessions.some(
|
|
3310
3332
|
(n) => n.id !== e.exceptSessionId && (n.state === "connected" || n.state === "on_hold")
|
|
3311
3333
|
) ? { admit: !1, reason: "busy" } : { admit: !0 };
|
|
3312
3334
|
}
|
|
3313
|
-
function
|
|
3314
|
-
const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, o = t.intents.filter((
|
|
3335
|
+
function rs(e, t) {
|
|
3336
|
+
const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, o = t.intents.filter((i) => !n.has(i.intent)).map((i) => ss(i, r[i.intent]));
|
|
3315
3337
|
if (!e.extraIntents || e.extraIntents.length === 0) return o;
|
|
3316
|
-
const
|
|
3317
|
-
for (const
|
|
3318
|
-
|
|
3338
|
+
const s = new Set(o.map((i) => i.intent));
|
|
3339
|
+
for (const i of e.extraIntents)
|
|
3340
|
+
s.has(i.intent) || (o.push(i), s.add(i.intent));
|
|
3319
3341
|
return o;
|
|
3320
3342
|
}
|
|
3321
|
-
function
|
|
3343
|
+
function os(e, t) {
|
|
3322
3344
|
const n = {};
|
|
3323
3345
|
for (const r of e.intents) {
|
|
3324
3346
|
if (!r.togglable) continue;
|
|
@@ -3327,46 +3349,46 @@ function ni(e, t) {
|
|
|
3327
3349
|
}
|
|
3328
3350
|
return n;
|
|
3329
3351
|
}
|
|
3330
|
-
function
|
|
3331
|
-
const n =
|
|
3352
|
+
function eu(e, t) {
|
|
3353
|
+
const n = os(e, t);
|
|
3332
3354
|
return Object.entries(n).filter(([, r]) => !r).map(([r]) => r);
|
|
3333
3355
|
}
|
|
3334
|
-
function
|
|
3356
|
+
function ss(e, t) {
|
|
3335
3357
|
return t ? {
|
|
3336
3358
|
intent: t.intent ?? e.intent,
|
|
3337
3359
|
targetSchemes: t.targetSchemes ?? e.targetSchemes,
|
|
3338
3360
|
transport: t.transport ?? e.transport
|
|
3339
3361
|
} : e;
|
|
3340
3362
|
}
|
|
3341
|
-
function
|
|
3363
|
+
function tu(e, t) {
|
|
3342
3364
|
const n = [];
|
|
3343
3365
|
for (const r of e) {
|
|
3344
3366
|
if (!r.enabled) continue;
|
|
3345
3367
|
const o = t[r.providerId];
|
|
3346
3368
|
if (o)
|
|
3347
|
-
for (const
|
|
3348
|
-
n.push({ channel: r, description: o, capability:
|
|
3369
|
+
for (const s of rs(r, o))
|
|
3370
|
+
n.push({ channel: r, description: o, capability: s });
|
|
3349
3371
|
}
|
|
3350
3372
|
return n;
|
|
3351
3373
|
}
|
|
3352
|
-
function
|
|
3374
|
+
function nu(e, t) {
|
|
3353
3375
|
return t.filter((n) => n.capability.intent === e);
|
|
3354
3376
|
}
|
|
3355
|
-
function
|
|
3377
|
+
function is(e, t) {
|
|
3356
3378
|
return t.filter((n) => n.capability.targetSchemes.includes(e));
|
|
3357
3379
|
}
|
|
3358
|
-
function
|
|
3359
|
-
return
|
|
3380
|
+
function ru(e, t) {
|
|
3381
|
+
return is(e.scheme, t);
|
|
3360
3382
|
}
|
|
3361
|
-
function
|
|
3383
|
+
function ou(e, t, n) {
|
|
3362
3384
|
const r = [];
|
|
3363
3385
|
for (const o of e)
|
|
3364
|
-
for (const
|
|
3365
|
-
|
|
3386
|
+
for (const s of n)
|
|
3387
|
+
s.capability.intent === t && s.capability.targetSchemes.includes(o.scheme) && r.push({ channelIntent: s, endpoint: o });
|
|
3366
3388
|
return r;
|
|
3367
3389
|
}
|
|
3368
|
-
var
|
|
3369
|
-
const
|
|
3390
|
+
var as = /* @__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))(as || {});
|
|
3391
|
+
const cs = {
|
|
3370
3392
|
mailto: "mail",
|
|
3371
3393
|
sip: "tel",
|
|
3372
3394
|
tel: "tel",
|
|
@@ -3387,10 +3409,10 @@ const si = {
|
|
|
3387
3409
|
id: "note",
|
|
3388
3410
|
custom: "note"
|
|
3389
3411
|
};
|
|
3390
|
-
function
|
|
3391
|
-
return e ?
|
|
3412
|
+
function su(e) {
|
|
3413
|
+
return e ? cs[e] ?? "note" : "note";
|
|
3392
3414
|
}
|
|
3393
|
-
const
|
|
3415
|
+
const iu = "message_window", au = "message_templates", cu = {
|
|
3394
3416
|
// E-mail
|
|
3395
3417
|
FROM: "from",
|
|
3396
3418
|
TO: "to",
|
|
@@ -3407,22 +3429,22 @@ const nu = "message_window", ru = "message_templates", ou = {
|
|
|
3407
3429
|
// Voice/conference
|
|
3408
3430
|
HOST: "host",
|
|
3409
3431
|
PARTICIPANT: "participant"
|
|
3410
|
-
},
|
|
3432
|
+
}, lu = (e, t) => ({ intent: e, ...t }), uu = "folder_management", du = "remote_search", pu = "message_reactions", fu = {
|
|
3411
3433
|
ok: !1,
|
|
3412
3434
|
code: "UNSUPPORTED",
|
|
3413
3435
|
message: "Provider does not support this op"
|
|
3414
|
-
},
|
|
3415
|
-
function b(e, t, n, r, o,
|
|
3436
|
+
}, mu = "connector", hu = "context.collect", A = (e) => ({ type: "string", description: e }), _ = (e) => ({ type: "number", description: e }), Q = (e) => ({ type: "boolean", description: e }), M = A("Sheet name. Omit for the sheet the user is looking at."), lt = A("Slide id, as `inspect` reports it.");
|
|
3437
|
+
function b(e, t, n, r, o, s) {
|
|
3416
3438
|
return {
|
|
3417
3439
|
op: e,
|
|
3418
3440
|
kinds: t,
|
|
3419
3441
|
summary: n,
|
|
3420
3442
|
parameters: { type: "object", properties: r, required: o },
|
|
3421
|
-
undoable:
|
|
3422
|
-
visible:
|
|
3443
|
+
undoable: s.undoable,
|
|
3444
|
+
visible: s.visible
|
|
3423
3445
|
};
|
|
3424
3446
|
}
|
|
3425
|
-
const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut = { undoable: !1, visible: !0 }, ee = { undoable: !1, visible: !1 },
|
|
3447
|
+
const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut = { undoable: !1, visible: !0 }, ee = { undoable: !1, visible: !1 }, ls = [
|
|
3426
3448
|
b(
|
|
3427
3449
|
"pdf.goToPage",
|
|
3428
3450
|
["pdf"],
|
|
@@ -3517,13 +3539,13 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3517
3539
|
["page", "text"],
|
|
3518
3540
|
ee
|
|
3519
3541
|
)
|
|
3520
|
-
],
|
|
3542
|
+
], us = [
|
|
3521
3543
|
b(
|
|
3522
3544
|
"sheet.setValues",
|
|
3523
3545
|
["sheet"],
|
|
3524
3546
|
"Write a block of values. The block's shape must match the range.",
|
|
3525
3547
|
{
|
|
3526
|
-
sheet:
|
|
3548
|
+
sheet: M,
|
|
3527
3549
|
range: A("A1 notation, e.g. `B2:D5` or a single `A1`."),
|
|
3528
3550
|
values: {
|
|
3529
3551
|
type: "array",
|
|
@@ -3538,7 +3560,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3538
3560
|
"sheet.setFormula",
|
|
3539
3561
|
["sheet"],
|
|
3540
3562
|
"Put a formula in every cell of a range.",
|
|
3541
|
-
{ sheet:
|
|
3563
|
+
{ sheet: M, range: A("A1 notation."), formula: A("Including the leading `=`.") },
|
|
3542
3564
|
["range", "formula"],
|
|
3543
3565
|
I
|
|
3544
3566
|
),
|
|
@@ -3547,7 +3569,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3547
3569
|
["sheet"],
|
|
3548
3570
|
"Change the look of a range. Only the properties you pass are touched.",
|
|
3549
3571
|
{
|
|
3550
|
-
sheet:
|
|
3572
|
+
sheet: M,
|
|
3551
3573
|
range: A("A1 notation."),
|
|
3552
3574
|
bold: Q("Bold on or off."),
|
|
3553
3575
|
italic: Q("Italic on or off."),
|
|
@@ -3569,7 +3591,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3569
3591
|
["sheet"],
|
|
3570
3592
|
"Insert empty rows, pushing the rest down.",
|
|
3571
3593
|
{
|
|
3572
|
-
sheet:
|
|
3594
|
+
sheet: M,
|
|
3573
3595
|
at: _("1-based row number to insert before."),
|
|
3574
3596
|
count: _("How many. Omit for 1.")
|
|
3575
3597
|
},
|
|
@@ -3580,7 +3602,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3580
3602
|
"sheet.deleteRows",
|
|
3581
3603
|
["sheet"],
|
|
3582
3604
|
"Delete rows, pulling the rest up.",
|
|
3583
|
-
{ sheet:
|
|
3605
|
+
{ sheet: M, at: _("1-based first row to delete."), count: _("How many. Omit for 1.") },
|
|
3584
3606
|
["at"],
|
|
3585
3607
|
I
|
|
3586
3608
|
),
|
|
@@ -3589,7 +3611,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3589
3611
|
["sheet"],
|
|
3590
3612
|
"Insert empty columns, pushing the rest right.",
|
|
3591
3613
|
{
|
|
3592
|
-
sheet:
|
|
3614
|
+
sheet: M,
|
|
3593
3615
|
at: _("1-based column number to insert before."),
|
|
3594
3616
|
count: _("How many. Omit for 1.")
|
|
3595
3617
|
},
|
|
@@ -3601,7 +3623,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3601
3623
|
["sheet"],
|
|
3602
3624
|
"Delete columns, pulling the rest left.",
|
|
3603
3625
|
{
|
|
3604
|
-
sheet:
|
|
3626
|
+
sheet: M,
|
|
3605
3627
|
at: _("1-based first column to delete."),
|
|
3606
3628
|
count: _("How many. Omit for 1.")
|
|
3607
3629
|
},
|
|
@@ -3612,7 +3634,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3612
3634
|
"sheet.merge",
|
|
3613
3635
|
["sheet"],
|
|
3614
3636
|
"Merge a range into one cell.",
|
|
3615
|
-
{ sheet:
|
|
3637
|
+
{ sheet: M, range: A("A1 notation.") },
|
|
3616
3638
|
["range"],
|
|
3617
3639
|
I
|
|
3618
3640
|
),
|
|
@@ -3620,7 +3642,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3620
3642
|
"sheet.unmerge",
|
|
3621
3643
|
["sheet"],
|
|
3622
3644
|
"Break merged cells in a range apart.",
|
|
3623
|
-
{ sheet:
|
|
3645
|
+
{ sheet: M, range: A("A1 notation.") },
|
|
3624
3646
|
["range"],
|
|
3625
3647
|
I
|
|
3626
3648
|
),
|
|
@@ -3629,7 +3651,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3629
3651
|
["sheet"],
|
|
3630
3652
|
"Sort a range on one of its columns.",
|
|
3631
3653
|
{
|
|
3632
|
-
sheet:
|
|
3654
|
+
sheet: M,
|
|
3633
3655
|
range: A("A1 notation covering the rows to sort, header excluded."),
|
|
3634
3656
|
column: _("1-based column *within the range*, not within the sheet."),
|
|
3635
3657
|
ascending: Q("Ascending. Omit for ascending.")
|
|
@@ -3665,11 +3687,11 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3665
3687
|
"sheet.activate",
|
|
3666
3688
|
["sheet"],
|
|
3667
3689
|
"Show the user a sheet and select a range on it.",
|
|
3668
|
-
{ sheet:
|
|
3690
|
+
{ sheet: M, range: A("A1 notation to select. Omit to only switch sheets.") },
|
|
3669
3691
|
[],
|
|
3670
3692
|
B
|
|
3671
3693
|
)
|
|
3672
|
-
],
|
|
3694
|
+
], ds = [
|
|
3673
3695
|
b(
|
|
3674
3696
|
"word.replaceParagraph",
|
|
3675
3697
|
["word"],
|
|
@@ -3731,7 +3753,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3731
3753
|
["start"],
|
|
3732
3754
|
B
|
|
3733
3755
|
)
|
|
3734
|
-
],
|
|
3756
|
+
], ps = [
|
|
3735
3757
|
b(
|
|
3736
3758
|
"slides.setText",
|
|
3737
3759
|
["slides"],
|
|
@@ -3760,37 +3782,37 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3760
3782
|
ee
|
|
3761
3783
|
)
|
|
3762
3784
|
], Qt = [
|
|
3763
|
-
...
|
|
3764
|
-
...
|
|
3765
|
-
...
|
|
3766
|
-
...
|
|
3785
|
+
...ls,
|
|
3786
|
+
...us,
|
|
3787
|
+
...ds,
|
|
3788
|
+
...ps
|
|
3767
3789
|
];
|
|
3768
|
-
function
|
|
3790
|
+
function gu(e) {
|
|
3769
3791
|
return Qt.filter((t) => t.kinds.includes(e));
|
|
3770
3792
|
}
|
|
3771
|
-
function
|
|
3793
|
+
function yu(e) {
|
|
3772
3794
|
return Qt.find((t) => t.op === e);
|
|
3773
3795
|
}
|
|
3774
|
-
const dt = /(?: {2,}|\\)$/,
|
|
3796
|
+
const dt = /(?: {2,}|\\)$/, fs = /^\*\*([^*]+)\*\*\s+(.*)$/;
|
|
3775
3797
|
function pt(e) {
|
|
3776
|
-
const t =
|
|
3798
|
+
const t = fs.exec(e);
|
|
3777
3799
|
return t ? { lead: t[1], text: t[2] } : { text: e };
|
|
3778
3800
|
}
|
|
3779
|
-
function
|
|
3801
|
+
function bu(e) {
|
|
3780
3802
|
const t = (e ?? "").replace(/\r\n/g, `
|
|
3781
3803
|
`).split(`
|
|
3782
3804
|
`), n = [];
|
|
3783
3805
|
let r = null;
|
|
3784
3806
|
const o = () => {
|
|
3785
3807
|
r && n.push({ type: "list", style: r.style, items: r.items }), r = null;
|
|
3786
|
-
},
|
|
3808
|
+
}, s = (p, f) => {
|
|
3787
3809
|
r && r.style !== p && o(), r ? r.items.push(pt(f)) : r = { style: p, items: [pt(f)] };
|
|
3788
3810
|
};
|
|
3789
|
-
let
|
|
3811
|
+
let i = [], a = [];
|
|
3790
3812
|
const u = () => {
|
|
3791
|
-
if (
|
|
3792
|
-
const p =
|
|
3793
|
-
p && n.push({ type: "paragraph", text: p }),
|
|
3813
|
+
if (i.length) {
|
|
3814
|
+
const p = i.join("").trim();
|
|
3815
|
+
p && n.push({ type: "paragraph", text: p }), i = [];
|
|
3794
3816
|
}
|
|
3795
3817
|
}, l = () => {
|
|
3796
3818
|
a.length && (n.push({ type: "quote", text: a.join(`
|
|
@@ -3829,11 +3851,11 @@ function mu(e) {
|
|
|
3829
3851
|
continue;
|
|
3830
3852
|
}
|
|
3831
3853
|
if (/^\s*[-*]\s+/.test(p)) {
|
|
3832
|
-
u(), l(),
|
|
3854
|
+
u(), l(), s("bulleted", p.replace(/^\s*[-*]\s+/, "")), c++;
|
|
3833
3855
|
continue;
|
|
3834
3856
|
}
|
|
3835
3857
|
if (/^\s*\d+\.\s+/.test(p)) {
|
|
3836
|
-
u(), l(),
|
|
3858
|
+
u(), l(), s("numbered", p.replace(/^\s*\d+\.\s+/, "")), c++;
|
|
3837
3859
|
continue;
|
|
3838
3860
|
}
|
|
3839
3861
|
if (/^\s*(-{3,}|\*{3,}|_{3,})\s*$/.test(p)) {
|
|
@@ -3850,32 +3872,32 @@ function mu(e) {
|
|
|
3850
3872
|
}
|
|
3851
3873
|
l(), o();
|
|
3852
3874
|
const E = dt.test(p);
|
|
3853
|
-
|
|
3875
|
+
i.push(p.replace(dt, "").trim() + (E ? `
|
|
3854
3876
|
` : " ")), c++;
|
|
3855
3877
|
}
|
|
3856
3878
|
return d(), n;
|
|
3857
3879
|
}
|
|
3858
|
-
function
|
|
3859
|
-
return
|
|
3880
|
+
function _u(e, t) {
|
|
3881
|
+
return $n(e, t).replace(/^```.*$/gm, "").replace(/^\|[\s:|-]*\|$/gm, "").replace(/[ \t]*\|[ \t]*/g, " ").replace(/^[ \t]*(#{1,6}|>|[-*+]|\d+\.)[ \t]+/gm, "").replace(/!\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/\[([^\]]+)\]\([^)]*\)/g, "$1").replace(/(\*\*|__|\*|_|`|~~)/g, "").replace(/[ \t]+$/gm, "").replace(/\n{3,}/g, `
|
|
3860
3882
|
|
|
3861
3883
|
`).trim();
|
|
3862
3884
|
}
|
|
3863
|
-
const
|
|
3864
|
-
function
|
|
3885
|
+
const Au = "documents.describe", Su = "documents.inspect", Eu = "documents.apply";
|
|
3886
|
+
function Iu(e) {
|
|
3865
3887
|
const t = e.indexOf(":");
|
|
3866
3888
|
if (t !== -1) return e.slice(0, t);
|
|
3867
3889
|
const n = e.indexOf(".");
|
|
3868
3890
|
return n === -1 ? e : e.slice(0, n);
|
|
3869
3891
|
}
|
|
3870
|
-
const
|
|
3871
|
-
function
|
|
3892
|
+
const Tu = "installation-id";
|
|
3893
|
+
function ku(e) {
|
|
3872
3894
|
const t = [];
|
|
3873
3895
|
for (const n of Object.keys(e))
|
|
3874
3896
|
for (const r of Object.keys(e[n]))
|
|
3875
3897
|
t.push({ lang: n, key: r, value: e[n][r] });
|
|
3876
3898
|
return t;
|
|
3877
3899
|
}
|
|
3878
|
-
const
|
|
3900
|
+
const wu = "notification-source", vu = (e, t) => `${e}.pref.${t}`, Mu = {
|
|
3879
3901
|
ai: [
|
|
3880
3902
|
"account.read",
|
|
3881
3903
|
"account.write",
|
|
@@ -4010,96 +4032,96 @@ const Eu = "notification-source", Iu = (e, t) => `${e}.pref.${t}`, Tu = {
|
|
|
4010
4032
|
time: ["entry.read", "entry.write", "work-type.read", "work-type.write"],
|
|
4011
4033
|
user: ["user.read", "user.write"],
|
|
4012
4034
|
work: ["item.read", "item.write", "project.read", "project.write"]
|
|
4013
|
-
}, Zt = 9e4,
|
|
4014
|
-
function
|
|
4035
|
+
}, Zt = 9e4, ms = ["out_of_office"], Jt = (e) => ms.includes(e);
|
|
4036
|
+
function Cu(e, t, n) {
|
|
4015
4037
|
const r = n - e < Zt, o = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
|
|
4016
4038
|
if (!o?.status) return { online: r, status: r ? "available" : "offline" };
|
|
4017
|
-
const
|
|
4018
|
-
return !r && !Jt(
|
|
4039
|
+
const s = o.status;
|
|
4040
|
+
return !r && !Jt(s) ? { online: !1, status: "offline" } : { online: r, status: s, message: o.message };
|
|
4019
4041
|
}
|
|
4020
|
-
function
|
|
4042
|
+
function Ou(e, t) {
|
|
4021
4043
|
const n = t - e.lastSeenAt < Zt, r = n || Jt(e.status) ? e.status : "offline";
|
|
4022
4044
|
return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
|
|
4023
4045
|
}
|
|
4024
|
-
function
|
|
4046
|
+
function xu(e, t) {
|
|
4025
4047
|
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 };
|
|
4026
4048
|
}
|
|
4027
|
-
function
|
|
4049
|
+
function Nu(e) {
|
|
4028
4050
|
return e.providerAvailable && e.allowed;
|
|
4029
4051
|
}
|
|
4030
|
-
const
|
|
4031
|
-
function
|
|
4052
|
+
const Ru = "resources.describe", $u = "resources.search", Du = "resources.resolve", Lu = "resources.attached";
|
|
4053
|
+
function Pu(e) {
|
|
4032
4054
|
const t = e.indexOf(":");
|
|
4033
4055
|
return t === -1 ? e : e.slice(0, t);
|
|
4034
4056
|
}
|
|
4035
|
-
const
|
|
4057
|
+
const Ku = "/provider/scope/related", Uu = "/provider/scope/read", en = "auth";
|
|
4036
4058
|
function tn(e) {
|
|
4037
4059
|
const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
|
|
4038
4060
|
return t ? t[1] : null;
|
|
4039
4061
|
}
|
|
4040
|
-
function
|
|
4062
|
+
function Fu(e) {
|
|
4041
4063
|
const t = tn(e);
|
|
4042
4064
|
return t ? t !== en : typeof e == "string" && e.startsWith("/wake");
|
|
4043
4065
|
}
|
|
4044
|
-
function
|
|
4066
|
+
function Bu(e) {
|
|
4045
4067
|
return typeof e != "string" || e === "" || e === "/" ? !0 : tn(e) === en;
|
|
4046
4068
|
}
|
|
4047
|
-
function
|
|
4069
|
+
function hs(e) {
|
|
4048
4070
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
4049
4071
|
}
|
|
4050
|
-
function
|
|
4051
|
-
const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : `/${
|
|
4072
|
+
function gs(e) {
|
|
4073
|
+
const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : `/${hs(r)}`).join("");
|
|
4052
4074
|
return new RegExp(`^${n}\\/?$`);
|
|
4053
4075
|
}
|
|
4054
|
-
function
|
|
4076
|
+
function ys(e, t) {
|
|
4055
4077
|
const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean), o = {};
|
|
4056
|
-
return n.forEach((
|
|
4057
|
-
if (
|
|
4058
|
-
const a =
|
|
4078
|
+
return n.forEach((s, i) => {
|
|
4079
|
+
if (s.startsWith(":")) {
|
|
4080
|
+
const a = s.endsWith("?") ? s.slice(1, -1) : s.slice(1), u = r[i];
|
|
4059
4081
|
u && (o[a] = u);
|
|
4060
4082
|
}
|
|
4061
4083
|
}), o;
|
|
4062
4084
|
}
|
|
4063
|
-
function
|
|
4085
|
+
function bs(e) {
|
|
4064
4086
|
return e.publicBasePath ?? `/apps/${e.name}`;
|
|
4065
4087
|
}
|
|
4066
|
-
function
|
|
4088
|
+
function ju(e) {
|
|
4067
4089
|
const t = [];
|
|
4068
4090
|
for (const n of e) {
|
|
4069
4091
|
if (!n?.name) continue;
|
|
4070
|
-
const r =
|
|
4092
|
+
const r = bs(n);
|
|
4071
4093
|
for (const o of n.routes ?? []) {
|
|
4072
4094
|
if (!o.public) continue;
|
|
4073
|
-
const
|
|
4095
|
+
const s = o.path === "/" ? "" : o.path;
|
|
4074
4096
|
t.push({
|
|
4075
4097
|
appName: n.name,
|
|
4076
4098
|
resource: o.resource,
|
|
4077
|
-
pattern: `${r}${
|
|
4099
|
+
pattern: `${r}${s}`,
|
|
4078
4100
|
props: o.props
|
|
4079
4101
|
});
|
|
4080
4102
|
}
|
|
4081
4103
|
}
|
|
4082
4104
|
return t;
|
|
4083
4105
|
}
|
|
4084
|
-
function
|
|
4106
|
+
function _s(e, t) {
|
|
4085
4107
|
const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
|
|
4086
4108
|
for (let o = 0; o < Math.min(n.length, r.length); o++) {
|
|
4087
|
-
const
|
|
4088
|
-
if (
|
|
4109
|
+
const s = n[o].startsWith(":"), i = r[o].startsWith(":");
|
|
4110
|
+
if (s !== i) return i;
|
|
4089
4111
|
}
|
|
4090
4112
|
return n.length > r.length;
|
|
4091
4113
|
}
|
|
4092
|
-
function
|
|
4114
|
+
function As(e, t) {
|
|
4093
4115
|
if (typeof e != "string") return null;
|
|
4094
4116
|
let n = null;
|
|
4095
4117
|
for (const r of t)
|
|
4096
|
-
|
|
4097
|
-
return n ? { ...n, params: { ...n.props, ...
|
|
4118
|
+
gs(r.pattern).test(e) && (!n || _s(r.pattern, n.pattern)) && (n = r);
|
|
4119
|
+
return n ? { ...n, params: { ...n.props, ...ys(n.pattern, e) } } : null;
|
|
4098
4120
|
}
|
|
4099
|
-
function
|
|
4100
|
-
return
|
|
4121
|
+
function Hu(e, t) {
|
|
4122
|
+
return As(e, t) !== null;
|
|
4101
4123
|
}
|
|
4102
|
-
const
|
|
4124
|
+
const Gu = 10 * 1024 * 1024, Wu = 25 * 1024 * 1024, Vu = "sync-target", zu = 20, Ss = {
|
|
4103
4125
|
afrikaans: [
|
|
4104
4126
|
"[Muziek]",
|
|
4105
4127
|
"(C) TV GELDERLAND 2021",
|
|
@@ -4249,14 +4271,14 @@ const Fu = 10 * 1024 * 1024, Bu = 25 * 1024 * 1024, ju = "sync-target", Hu = 20,
|
|
|
4249
4271
|
"[MÚSICA]",
|
|
4250
4272
|
"[Music cuts in British]"
|
|
4251
4273
|
]
|
|
4252
|
-
},
|
|
4274
|
+
}, Es = (e) => {
|
|
4253
4275
|
let t = e;
|
|
4254
|
-
return Object.values(
|
|
4276
|
+
return Object.values(Ss).forEach((n) => {
|
|
4255
4277
|
n.forEach((r) => {
|
|
4256
4278
|
t = t.replaceAll(r, "");
|
|
4257
4279
|
});
|
|
4258
4280
|
}), t = t.replace(/\(.*?\)/g, ""), t = t.replace(/\[.*?\]/g, ""), t;
|
|
4259
|
-
},
|
|
4281
|
+
}, Is = 6e4, Ts = 8e3, ks = 2, ws = 0.4, vs = 3, Ms = /* @__PURE__ */ new Set([
|
|
4260
4282
|
"aan",
|
|
4261
4283
|
"als",
|
|
4262
4284
|
"ben",
|
|
@@ -4369,52 +4391,52 @@ const Fu = 10 * 1024 * 1024, Bu = 25 * 1024 * 1024, ju = "sync-target", Hu = 20,
|
|
|
4369
4391
|
"you",
|
|
4370
4392
|
"your"
|
|
4371
4393
|
]);
|
|
4372
|
-
function
|
|
4394
|
+
function Cs(e) {
|
|
4373
4395
|
const t = /* @__PURE__ */ new Set();
|
|
4374
4396
|
for (const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))
|
|
4375
|
-
n.length <
|
|
4397
|
+
n.length < vs || Ms.has(n) || t.add(n);
|
|
4376
4398
|
return [...t];
|
|
4377
4399
|
}
|
|
4378
|
-
function
|
|
4400
|
+
function Os(e, t) {
|
|
4379
4401
|
if (!e.length) return 0;
|
|
4380
4402
|
if (!t.length) return 1;
|
|
4381
4403
|
const n = new Set(t), r = new Set(e);
|
|
4382
4404
|
let o = 0;
|
|
4383
|
-
for (const
|
|
4405
|
+
for (const s of r) n.has(s) || (o += 1);
|
|
4384
4406
|
return o / r.size;
|
|
4385
4407
|
}
|
|
4386
|
-
function
|
|
4387
|
-
const n = e.filter((
|
|
4408
|
+
function xs(e, t = Is) {
|
|
4409
|
+
const n = e.filter((i) => !i.partial && typeof i.text == "string");
|
|
4388
4410
|
if (!n.length) return { text: "", segmentCount: 0 };
|
|
4389
|
-
const o = n.reduce((
|
|
4390
|
-
return { text: n.filter((
|
|
4411
|
+
const o = n.reduce((i, a) => Math.max(i, a.endedAt ?? 0), 0) - t;
|
|
4412
|
+
return { text: n.filter((i) => (i.endedAt ?? 0) >= o).map((i) => Es(i.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
|
|
4391
4413
|
}
|
|
4392
|
-
const
|
|
4393
|
-
function
|
|
4414
|
+
const Ns = 60;
|
|
4415
|
+
function Xu(e, t, n = Ns) {
|
|
4394
4416
|
const r = new Set(e), o = [...e];
|
|
4395
|
-
for (const
|
|
4396
|
-
!
|
|
4417
|
+
for (const s of t)
|
|
4418
|
+
!s || r.has(s) || (r.add(s), o.push(s));
|
|
4397
4419
|
return o.slice(-n);
|
|
4398
4420
|
}
|
|
4399
|
-
function
|
|
4421
|
+
function Yu(e) {
|
|
4400
4422
|
const { segments: t, now: n, state: r } = e;
|
|
4401
|
-
if (r.lastTriggerAt && n - r.lastTriggerAt <
|
|
4423
|
+
if (r.lastTriggerAt && n - r.lastTriggerAt < Ts)
|
|
4402
4424
|
return { trigger: !1, reason: "too_soon" };
|
|
4403
|
-
const o =
|
|
4425
|
+
const o = xs(t, e.windowMs);
|
|
4404
4426
|
if (!o.text) return { trigger: !1, reason: "no_speech" };
|
|
4405
|
-
const
|
|
4406
|
-
if (r.lastQueryTerms &&
|
|
4427
|
+
const s = o.segmentCount - (r.lastSegmentCount ?? 0);
|
|
4428
|
+
if (r.lastQueryTerms && s < ks)
|
|
4407
4429
|
return { trigger: !1, reason: "too_few_new" };
|
|
4408
|
-
const
|
|
4409
|
-
return
|
|
4430
|
+
const i = Cs(o.text);
|
|
4431
|
+
return i.length ? r.lastQueryTerms?.length && Os(i, r.lastQueryTerms) < ws ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: o.text, terms: i, segmentCount: o.segmentCount } : { trigger: !1, reason: "no_speech" };
|
|
4410
4432
|
}
|
|
4411
|
-
const
|
|
4433
|
+
const qu = [
|
|
4412
4434
|
"personal",
|
|
4413
4435
|
"workspace",
|
|
4414
4436
|
"connections",
|
|
4415
4437
|
"work",
|
|
4416
4438
|
"ai"
|
|
4417
|
-
],
|
|
4439
|
+
], Qu = "navNotice", $e = {
|
|
4418
4440
|
// The lower bounds are deliberately generous: service ranges (0800/0900) are
|
|
4419
4441
|
// shorter than geographic numbers, and a too-strict minimum silently drops them.
|
|
4420
4442
|
// An over-permissive key is harmless — it simply matches nothing.
|
|
@@ -4437,38 +4459,38 @@ const Vu = [
|
|
|
4437
4459
|
PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
|
|
4438
4460
|
US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
|
|
4439
4461
|
CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
|
|
4440
|
-
},
|
|
4441
|
-
new Set(Object.values(
|
|
4462
|
+
}, Rs = "NL", $s = 15, Ds = 8, Ls = Array.from(
|
|
4463
|
+
new Set(Object.values($e).map((e) => e.callingCode))
|
|
4442
4464
|
).sort((e, t) => t.length - e.length);
|
|
4443
4465
|
function ft(e) {
|
|
4444
4466
|
if (e)
|
|
4445
|
-
return
|
|
4467
|
+
return $e[e.trim().toUpperCase()];
|
|
4446
4468
|
}
|
|
4447
4469
|
function Z(e, t) {
|
|
4448
4470
|
return e.length >= t.nsnMin && e.length <= t.nsnMax;
|
|
4449
4471
|
}
|
|
4450
4472
|
function mt(e) {
|
|
4451
|
-
if (e.length >
|
|
4452
|
-
for (const t of
|
|
4473
|
+
if (e.length > $s) return null;
|
|
4474
|
+
for (const t of Ls) {
|
|
4453
4475
|
if (!e.startsWith(t)) continue;
|
|
4454
4476
|
const n = e.slice(t.length);
|
|
4455
|
-
for (const r of Object.values(
|
|
4477
|
+
for (const r of Object.values($e)) {
|
|
4456
4478
|
if (r.callingCode !== t) continue;
|
|
4457
|
-
const o = r.trunkPrefix,
|
|
4458
|
-
if (Z(
|
|
4479
|
+
const o = r.trunkPrefix, s = o && n.startsWith(o) ? n.slice(o.length) : n;
|
|
4480
|
+
if (Z(s, r)) return `+${t}${s}`;
|
|
4459
4481
|
}
|
|
4460
4482
|
return null;
|
|
4461
4483
|
}
|
|
4462
|
-
return e.length <
|
|
4484
|
+
return e.length < Ds ? null : `+${e}`;
|
|
4463
4485
|
}
|
|
4464
|
-
function
|
|
4486
|
+
function Ps(e) {
|
|
4465
4487
|
let t = e.trim();
|
|
4466
4488
|
const n = t.match(/^(sips?|tel|whatsapp):/i);
|
|
4467
4489
|
n && (t = t.slice(n[0].length));
|
|
4468
4490
|
const r = t.indexOf("@");
|
|
4469
4491
|
return r >= 0 && (t = t.slice(0, r)), t.trim();
|
|
4470
4492
|
}
|
|
4471
|
-
function
|
|
4493
|
+
function Zu(e) {
|
|
4472
4494
|
if (!e) return !1;
|
|
4473
4495
|
const t = e.indexOf("@");
|
|
4474
4496
|
if (t <= 0) return !1;
|
|
@@ -4477,26 +4499,26 @@ function Xu(e) {
|
|
|
4477
4499
|
}
|
|
4478
4500
|
function ht(e, t) {
|
|
4479
4501
|
if (!e) return null;
|
|
4480
|
-
const n =
|
|
4502
|
+
const n = Ps(e);
|
|
4481
4503
|
if (!n) return null;
|
|
4482
4504
|
const r = n.startsWith("+"), o = n.replace(/\D/g, "");
|
|
4483
4505
|
if (!o) return null;
|
|
4484
4506
|
if (r) return mt(o);
|
|
4485
4507
|
if (o.startsWith("00")) return mt(o.slice(2));
|
|
4486
|
-
const
|
|
4487
|
-
if (!
|
|
4488
|
-
const
|
|
4489
|
-
if (
|
|
4490
|
-
const a = o.slice(
|
|
4491
|
-
return Z(a,
|
|
4508
|
+
const s = ft(t) ?? ft(Rs);
|
|
4509
|
+
if (!s) return null;
|
|
4510
|
+
const i = s.trunkPrefix;
|
|
4511
|
+
if (i && o.startsWith(i)) {
|
|
4512
|
+
const a = o.slice(i.length);
|
|
4513
|
+
return Z(a, s) ? `+${s.callingCode}${a}` : null;
|
|
4492
4514
|
}
|
|
4493
|
-
if (o.startsWith(
|
|
4494
|
-
const a = o.slice(
|
|
4495
|
-
if (Z(a,
|
|
4515
|
+
if (o.startsWith(s.callingCode)) {
|
|
4516
|
+
const a = o.slice(s.callingCode.length);
|
|
4517
|
+
if (Z(a, s)) return `+${s.callingCode}${a}`;
|
|
4496
4518
|
}
|
|
4497
|
-
return !
|
|
4519
|
+
return !i && Z(o, s) ? `+${s.callingCode}${o}` : null;
|
|
4498
4520
|
}
|
|
4499
|
-
function
|
|
4521
|
+
function Ju(e, t = 9) {
|
|
4500
4522
|
const n = (e ?? "").replace(/\D/g, "");
|
|
4501
4523
|
return n.length < t ? null : n.slice(-t);
|
|
4502
4524
|
}
|
|
@@ -4507,11 +4529,11 @@ function nn(e) {
|
|
|
4507
4529
|
const r = t.slice(0, n).split("+")[0], o = t.slice(n + 1);
|
|
4508
4530
|
return !r || !o.includes(".") ? null : `${r}@${o}`;
|
|
4509
4531
|
}
|
|
4510
|
-
function
|
|
4532
|
+
function ed(e) {
|
|
4511
4533
|
const t = nn(e);
|
|
4512
4534
|
return t ? t.slice(t.lastIndexOf("@") + 1) : null;
|
|
4513
4535
|
}
|
|
4514
|
-
const
|
|
4536
|
+
const Ks = /* @__PURE__ */ new Set([
|
|
4515
4537
|
"co.uk",
|
|
4516
4538
|
"org.uk",
|
|
4517
4539
|
"gov.uk",
|
|
@@ -4521,14 +4543,14 @@ const Li = /* @__PURE__ */ new Set([
|
|
|
4521
4543
|
"com.br",
|
|
4522
4544
|
"co.za"
|
|
4523
4545
|
]);
|
|
4524
|
-
function
|
|
4546
|
+
function Us(e) {
|
|
4525
4547
|
if (!e) return null;
|
|
4526
4548
|
const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
|
|
4527
4549
|
if (t.length < 2) return null;
|
|
4528
4550
|
const n = t.slice(-2).join(".");
|
|
4529
|
-
return
|
|
4551
|
+
return Ks.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
|
|
4530
4552
|
}
|
|
4531
|
-
const
|
|
4553
|
+
const Fs = /* @__PURE__ */ new Set([
|
|
4532
4554
|
"gmail.com",
|
|
4533
4555
|
"googlemail.com",
|
|
4534
4556
|
"outlook.com",
|
|
@@ -4573,34 +4595,34 @@ const Ki = /* @__PURE__ */ new Set([
|
|
|
4573
4595
|
"proximus.be",
|
|
4574
4596
|
"scarlet.be"
|
|
4575
4597
|
]);
|
|
4576
|
-
function
|
|
4577
|
-
const t =
|
|
4578
|
-
return t ?
|
|
4598
|
+
function td(e) {
|
|
4599
|
+
const t = Us(e);
|
|
4600
|
+
return t ? Fs.has(t) : !1;
|
|
4579
4601
|
}
|
|
4580
|
-
function
|
|
4602
|
+
function nd(e) {
|
|
4581
4603
|
if (!e) return !1;
|
|
4582
4604
|
const t = e.trim().toLowerCase();
|
|
4583
4605
|
return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
|
|
4584
4606
|
}
|
|
4585
|
-
function
|
|
4607
|
+
function rd(e, t, n) {
|
|
4586
4608
|
if (!e || !t) return null;
|
|
4587
4609
|
const r = e.trim().toLowerCase();
|
|
4588
4610
|
if (r === "tel" || r === "sms" || r === "whatsapp") {
|
|
4589
|
-
const
|
|
4590
|
-
return
|
|
4611
|
+
const s = ht(t, n);
|
|
4612
|
+
return s ? `tel:${s}` : null;
|
|
4591
4613
|
}
|
|
4592
4614
|
if (r === "fax") {
|
|
4593
|
-
const
|
|
4594
|
-
return
|
|
4615
|
+
const s = ht(t, n);
|
|
4616
|
+
return s ? `fax:${s}` : null;
|
|
4595
4617
|
}
|
|
4596
4618
|
if (r === "mailto" || r === "email") {
|
|
4597
|
-
const
|
|
4598
|
-
return
|
|
4619
|
+
const s = nn(t);
|
|
4620
|
+
return s ? `mailto:${s}` : null;
|
|
4599
4621
|
}
|
|
4600
4622
|
const o = t.trim().toLowerCase();
|
|
4601
4623
|
return o ? `${r}:${o}` : null;
|
|
4602
4624
|
}
|
|
4603
|
-
const
|
|
4625
|
+
const Bs = [
|
|
4604
4626
|
/<blockquote/i,
|
|
4605
4627
|
/class="?gmail_quote/i,
|
|
4606
4628
|
// Gmail quote container
|
|
@@ -4613,24 +4635,24 @@ const Ui = [
|
|
|
4613
4635
|
// Outlook underscore separator before "From:"
|
|
4614
4636
|
/\bOn\b[\s\S]{0,200}?\bwrote:/i
|
|
4615
4637
|
// Gmail "On <date> <name> wrote:"
|
|
4616
|
-
], gt = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i,
|
|
4617
|
-
function
|
|
4638
|
+
], gt = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, js = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
|
|
4639
|
+
function Hs(e) {
|
|
4618
4640
|
const t = e.split(`
|
|
4619
4641
|
`);
|
|
4620
4642
|
for (let n = 0; n < t.length; n++)
|
|
4621
|
-
if (
|
|
4643
|
+
if (js.test(t[n]) || gt.test(t[n]) && t.slice(n + 1, n + 4).some((r) => gt.test(r)))
|
|
4622
4644
|
return t.slice(0, n).join(`
|
|
4623
4645
|
`).trim();
|
|
4624
4646
|
return e;
|
|
4625
4647
|
}
|
|
4626
|
-
const
|
|
4648
|
+
const Gs = /^(?:https?:|mailto:|tel:)/i, Ws = /^(?:https?:|cid:|data:image\/)/i;
|
|
4627
4649
|
function de(e, t) {
|
|
4628
4650
|
const n = e.match(new RegExp(`\\b${t}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s">]+))`, "i"));
|
|
4629
4651
|
return (n?.[1] ?? n?.[2] ?? n?.[3] ?? "").trim();
|
|
4630
4652
|
}
|
|
4631
|
-
const
|
|
4653
|
+
const Vs = /(!\[[^\]]*\]\([^)]*\))/;
|
|
4632
4654
|
function yt(e) {
|
|
4633
|
-
return e.replace(/\s+/g, " ").trim().split(
|
|
4655
|
+
return e.replace(/\s+/g, " ").trim().split(Vs).map((t, n) => n % 2 === 1 ? t : t.replace(/[[\]]/g, "\\$&")).join("");
|
|
4634
4656
|
}
|
|
4635
4657
|
function pe(e) {
|
|
4636
4658
|
return e.replace(
|
|
@@ -4638,78 +4660,78 @@ function pe(e) {
|
|
|
4638
4660
|
(t) => `%${t.charCodeAt(0).toString(16).toUpperCase().padStart(2, "0")}`
|
|
4639
4661
|
);
|
|
4640
4662
|
}
|
|
4641
|
-
function
|
|
4663
|
+
function zs(e) {
|
|
4642
4664
|
return e.replace(/<img\b([^>]*?)\/?>/gi, (n, r) => {
|
|
4643
4665
|
const o = de(r, "src");
|
|
4644
|
-
return
|
|
4666
|
+
return Ws.test(o) ? `})` : "";
|
|
4645
4667
|
}).replace(
|
|
4646
4668
|
/<a\b([^>]*)>([\s\S]*?)<\/a\s*>/gi,
|
|
4647
4669
|
(n, r, o) => {
|
|
4648
|
-
const
|
|
4649
|
-
return
|
|
4670
|
+
const s = yt(o.replace(/<[^>]*>/g, "")), i = de(r, "href");
|
|
4671
|
+
return Gs.test(i) ? `[${s || pe(i)}](${pe(i)})` : s;
|
|
4650
4672
|
}
|
|
4651
4673
|
);
|
|
4652
4674
|
}
|
|
4653
|
-
const
|
|
4654
|
-
function
|
|
4675
|
+
const Xs = /<table\b[^>]*>((?:(?!<table\b)[\s\S])*?)<\/table\s*>/i, Ys = /<tr\b[^>]*>([\s\S]*?)<\/tr\s*>/gi, qs = /<(t[dh])\b([^>]*)>([\s\S]*?)<\/\1\s*>/gi;
|
|
4676
|
+
function Qs(e, t) {
|
|
4655
4677
|
return /<table\b/i.test(e) || e.includes(`
|
|
4656
4678
|
|
|
4657
4679
|
|`) || t.includes("![") || t.length > 200;
|
|
4658
4680
|
}
|
|
4659
|
-
const
|
|
4660
|
-
function
|
|
4681
|
+
const Zs = 40, Js = { left: "---", center: ":---:", right: "---:" };
|
|
4682
|
+
function ei(e) {
|
|
4661
4683
|
const t = e.match(/align\s*[=:]\s*["']?\s*(right|center)/i);
|
|
4662
4684
|
return t ? t[1].toLowerCase() : "left";
|
|
4663
4685
|
}
|
|
4664
|
-
function
|
|
4686
|
+
function ti(e) {
|
|
4665
4687
|
return e.replace(/<[^>]*>/g, "").replace(/\s+/g, " ").trim().replace(/\|/g, "\\|");
|
|
4666
4688
|
}
|
|
4667
|
-
function
|
|
4689
|
+
function ni(e) {
|
|
4668
4690
|
const t = [];
|
|
4669
|
-
for (const
|
|
4691
|
+
for (const i of e.matchAll(Ys)) {
|
|
4670
4692
|
const a = [];
|
|
4671
|
-
for (const u of
|
|
4672
|
-
const l =
|
|
4673
|
-
if (
|
|
4674
|
-
a.push({ text: l, align:
|
|
4693
|
+
for (const u of i[1].matchAll(qs)) {
|
|
4694
|
+
const l = ti(u[3]);
|
|
4695
|
+
if (Qs(u[3], l)) return null;
|
|
4696
|
+
a.push({ text: l, align: ei(u[2]) });
|
|
4675
4697
|
}
|
|
4676
4698
|
if (a.length === 0) return null;
|
|
4677
4699
|
a.some((u) => u.text !== "") && t.push(a);
|
|
4678
4700
|
}
|
|
4679
4701
|
const n = t[0]?.length ?? 0;
|
|
4680
|
-
if (t.length < 2 || n < 2 || t.some((
|
|
4681
|
-
const r = (
|
|
4702
|
+
if (t.length < 2 || n < 2 || t.some((i) => i.length !== n)) return null;
|
|
4703
|
+
const r = (i) => `| ${i.map((a) => a.text).join(" | ")} |`, o = t[1].map((i) => Js[i.align]).join(" | "), s = t.slice(1).map(r).join(`
|
|
4682
4704
|
`);
|
|
4683
4705
|
return `
|
|
4684
4706
|
|
|
4685
4707
|
${r(t[0])}
|
|
4686
4708
|
| ${o} |
|
|
4687
|
-
${
|
|
4709
|
+
${s}
|
|
4688
4710
|
|
|
4689
4711
|
`;
|
|
4690
4712
|
}
|
|
4691
|
-
function
|
|
4713
|
+
function ri(e) {
|
|
4692
4714
|
return e.replace(/<\/(t[dh])\s*>/gi, " ").replace(/<\/tr\s*>/gi, `
|
|
4693
4715
|
`).replace(/<(?:tbody|thead|tfoot|caption|colgroup|col|tr|t[dh])\b[^>]*>/gi, "").replace(/<\/(?:tbody|thead|tfoot|caption|colgroup)\s*>/gi, "");
|
|
4694
4716
|
}
|
|
4695
|
-
function
|
|
4717
|
+
function oi(e) {
|
|
4696
4718
|
let t = e;
|
|
4697
|
-
for (let n = 0; n <
|
|
4698
|
-
const r =
|
|
4719
|
+
for (let n = 0; n < Zs; n++) {
|
|
4720
|
+
const r = Xs.exec(t);
|
|
4699
4721
|
if (!r || r.index === void 0) break;
|
|
4700
|
-
const
|
|
4722
|
+
const s = ni(r[1]) ?? `
|
|
4701
4723
|
|
|
4702
|
-
${
|
|
4724
|
+
${ri(r[1])}
|
|
4703
4725
|
|
|
4704
4726
|
`;
|
|
4705
|
-
t = t.slice(0, r.index) +
|
|
4727
|
+
t = t.slice(0, r.index) + s + t.slice(r.index + r[0].length);
|
|
4706
4728
|
}
|
|
4707
4729
|
return t;
|
|
4708
4730
|
}
|
|
4709
4731
|
function bt(e, t) {
|
|
4710
4732
|
let n = e;
|
|
4711
4733
|
return n = n.replace(/<(script|style)[\s\S]*?<\/\1>/gi, ""), n = n.replace(/<!--[\s\S]*?-->/g, ""), n = n.replace(/<br\s*\/?>/gi, `
|
|
4712
|
-
`), t && (n =
|
|
4734
|
+
`), t && (n = oi(zs(n))), n = n.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
|
|
4713
4735
|
|
|
4714
4736
|
`), n = n.replace(/<\/(div|li|tr)>/gi, `
|
|
4715
4737
|
`), n = n.replace(/<\/(td|th)>/gi, " "), n = n.replace(/<[^>]+>/g, ""), n = n.replace(/<[^>]*$/, ""), n;
|
|
@@ -4717,7 +4739,7 @@ function bt(e, t) {
|
|
|
4717
4739
|
function _t(e) {
|
|
4718
4740
|
return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
|
|
4719
4741
|
}
|
|
4720
|
-
const
|
|
4742
|
+
const si = {
|
|
4721
4743
|
euro: "€",
|
|
4722
4744
|
pound: "£",
|
|
4723
4745
|
yen: "¥",
|
|
@@ -4740,7 +4762,7 @@ const rs = {
|
|
|
4740
4762
|
apos: "'"
|
|
4741
4763
|
};
|
|
4742
4764
|
function At(e) {
|
|
4743
|
-
return e.replace(/ /gi, " ").replace(/&([a-z]+);/gi, (t, n) =>
|
|
4765
|
+
return e.replace(/ /gi, " ").replace(/&([a-z]+);/gi, (t, n) => si[n.toLowerCase()] ?? t).replace(/</gi, "<").replace(/>/gi, ">").replace(/"/gi, '"').replace(/&#(\d+);/g, (t, n) => _t(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => _t(parseInt(n, 16)) ?? t).replace(/&/gi, "&");
|
|
4744
4766
|
}
|
|
4745
4767
|
function St(e) {
|
|
4746
4768
|
return e.replace(/\r/g, "").replace(/[ \t]+/g, " ").replace(/ *\n */g, `
|
|
@@ -4748,76 +4770,77 @@ function St(e) {
|
|
|
4748
4770
|
|
|
4749
4771
|
`).trim();
|
|
4750
4772
|
}
|
|
4751
|
-
const
|
|
4752
|
-
function
|
|
4753
|
-
return
|
|
4773
|
+
const ii = /<\s*(html|body|div|p|table|br|span)\b/i;
|
|
4774
|
+
function od(e) {
|
|
4775
|
+
return ii.test(e);
|
|
4754
4776
|
}
|
|
4755
|
-
function
|
|
4777
|
+
function sd(e) {
|
|
4756
4778
|
return rn(e, !1);
|
|
4757
4779
|
}
|
|
4758
|
-
function
|
|
4780
|
+
function id(e) {
|
|
4759
4781
|
return rn(e, !0);
|
|
4760
4782
|
}
|
|
4761
4783
|
function rn(e, t) {
|
|
4762
4784
|
if (typeof e != "string" || !e) return "";
|
|
4763
4785
|
let n = e.length;
|
|
4764
|
-
for (const
|
|
4765
|
-
const a = e.search(
|
|
4786
|
+
for (const i of Bs) {
|
|
4787
|
+
const a = e.search(i);
|
|
4766
4788
|
a >= 0 && a < n && (n = a);
|
|
4767
4789
|
}
|
|
4768
4790
|
const r = e.slice(0, n);
|
|
4769
4791
|
let o = St(At(bt(r, t)));
|
|
4770
|
-
return o || (o = St(At(bt(e, t)))),
|
|
4792
|
+
return o || (o = St(At(bt(e, t)))), Hs(o) || o;
|
|
4771
4793
|
}
|
|
4772
4794
|
export {
|
|
4773
|
-
|
|
4795
|
+
Yi as ACTIVE_ASSIGNMENT_STATUSES,
|
|
4774
4796
|
R as ACTIVITY_CATALOG,
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4797
|
+
ts as AI_ATTACHMENT_LIMITS,
|
|
4798
|
+
Hl as AI_ATTACHMENT_MAX_PER_TURN,
|
|
4799
|
+
jl as AI_ATTACHMENT_TURN_BUDGET,
|
|
4778
4800
|
Tt as AI_VENDORS,
|
|
4779
|
-
|
|
4780
|
-
|
|
4801
|
+
wn as ALLOWED_LINK_SCHEMES,
|
|
4802
|
+
Mu as APP_PERMISSIONS,
|
|
4781
4803
|
He as ARTIFACT_MAX_BLOCKS,
|
|
4782
|
-
|
|
4804
|
+
ji as ARTIFACT_MAX_BODY_BYTES,
|
|
4783
4805
|
q as ARTIFACT_MAX_CELL_LEN,
|
|
4784
4806
|
ze as ARTIFACT_MAX_KPI_ITEMS,
|
|
4785
4807
|
Ge as ARTIFACT_MAX_LIST_ITEMS,
|
|
4786
4808
|
Ve as ARTIFACT_MAX_TABLE_COLUMNS,
|
|
4787
4809
|
We as ARTIFACT_MAX_TABLE_ROWS,
|
|
4788
|
-
|
|
4810
|
+
wt as ARTIFACT_MAX_TEXT_LEN,
|
|
4789
4811
|
Ln as ASSIGNMENT_SCOPE_KIND,
|
|
4790
|
-
|
|
4791
|
-
|
|
4812
|
+
Xl as ASSIST_BANDS,
|
|
4813
|
+
zl as ASSIST_SOURCE_PROVIDER_GROUP,
|
|
4792
4814
|
ir as ATTENTION_STATUSES,
|
|
4793
4815
|
wo as AT_RISK_GAP,
|
|
4794
4816
|
en as AUTH_APP_NAME,
|
|
4795
4817
|
io as AUTO_READY_MIN_PROPOSALS,
|
|
4796
|
-
|
|
4818
|
+
ao as AUTO_READY_RATE,
|
|
4797
4819
|
hn as ActivityTypeRegistry,
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4820
|
+
Ti as BUILT_IN_ONLY,
|
|
4821
|
+
ar as BULK_PENALTY,
|
|
4822
|
+
na as BUSINESS_ENTITY_LIST_SERVICE,
|
|
4823
|
+
Ts as CADENCE_FLOOR_MS,
|
|
4824
|
+
ks as CADENCE_MIN_NEW_SEGMENTS,
|
|
4825
|
+
ws as CADENCE_MIN_NOVELTY,
|
|
4826
|
+
Is as CADENCE_WINDOW_MS,
|
|
4827
|
+
bc as CLASSIFY_VARS,
|
|
4828
|
+
mu as CONNECTOR_PROVIDER_GROUP,
|
|
4829
|
+
hu as CONTEXT_COLLECT_SERVICE,
|
|
4830
|
+
Li as CORE_DIMENSIONS,
|
|
4831
|
+
as as CommunicationScheme,
|
|
4832
|
+
Qn as DAY_MS,
|
|
4833
|
+
Io as DEFAULT_CHECK_IN_DAYS,
|
|
4834
|
+
Ur as DEFAULT_FORECAST_WEEKS,
|
|
4835
|
+
ja as DEFAULT_MEMORY_BUDGET,
|
|
4836
|
+
Rs as DEFAULT_PHONE_REGION,
|
|
4837
|
+
ml as DEFAULT_QUOTE_TEMPLATE_BLOCKS,
|
|
4838
|
+
Ja as DEMAND_SOURCE_PROVIDER_GROUP,
|
|
4839
|
+
Eu as DOCUMENT_APPLY_SERVICE,
|
|
4840
|
+
Au as DOCUMENT_DESCRIBE_SERVICE,
|
|
4841
|
+
Su as DOCUMENT_INSPECT_SERVICE,
|
|
4819
4842
|
He as DOCUMENT_MAX_BLOCKS,
|
|
4820
|
-
|
|
4843
|
+
ji as DOCUMENT_MAX_BODY_BYTES,
|
|
4821
4844
|
q as DOCUMENT_MAX_CELL_LEN,
|
|
4822
4845
|
ze as DOCUMENT_MAX_KPI_ITEMS,
|
|
4823
4846
|
Xe as DOCUMENT_MAX_LETTERHEAD_FIELDS,
|
|
@@ -4825,423 +4848,426 @@ export {
|
|
|
4825
4848
|
Tn as DOCUMENT_MAX_RECIPIENT_LINES,
|
|
4826
4849
|
Ve as DOCUMENT_MAX_TABLE_COLUMNS,
|
|
4827
4850
|
We as DOCUMENT_MAX_TABLE_ROWS,
|
|
4828
|
-
|
|
4851
|
+
wt as DOCUMENT_MAX_TEXT_LEN,
|
|
4829
4852
|
Ye as DOCUMENT_MAX_TOTALS_ROWS,
|
|
4830
4853
|
Qt as DOCUMENT_OPERATIONS,
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4854
|
+
Lo as DUTCH_SLOT_LABELS,
|
|
4855
|
+
Ac as EMPTY_WORKFLOW,
|
|
4856
|
+
uu as FEATURE_FOLDER_MANAGEMENT,
|
|
4857
|
+
pu as FEATURE_MESSAGE_REACTIONS,
|
|
4858
|
+
du as FEATURE_REMOTE_SEARCH,
|
|
4836
4859
|
Ce as FIXED_KINDS,
|
|
4837
4860
|
ne as FIXED_LEVELS,
|
|
4838
4861
|
Ne as FIXED_TYPES,
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4862
|
+
ca as FIXED_UNITS,
|
|
4863
|
+
lr as FOLLOW_UP_HOURS,
|
|
4864
|
+
ul as FROZEN_WRITABLE_FIELDS,
|
|
4865
|
+
qn as HOUR_MS,
|
|
4866
|
+
ii as HTML_BODY_RE,
|
|
4844
4867
|
L as INELIGIBLE,
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4868
|
+
Tu as INSTALLATION_HEADER,
|
|
4869
|
+
to as INTERACTION_KIND,
|
|
4870
|
+
cu as InteractionParticipantRole,
|
|
4871
|
+
yr as KB_FALLBACK_LOCALE,
|
|
4849
4872
|
Ze as KB_LOCALES,
|
|
4850
4873
|
Ze as LOCALES,
|
|
4851
4874
|
Re as LOOSE_STATUSES,
|
|
4852
|
-
|
|
4853
|
-
|
|
4875
|
+
nr as MAIL_HINT_HEADERS,
|
|
4876
|
+
ui as MAX_ACTIONS,
|
|
4854
4877
|
Pn as MAX_ASSIGNMENT_TURNS,
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4878
|
+
ai as MAX_BLOCKS,
|
|
4879
|
+
$t as MAX_COLLECTION_DEPTH,
|
|
4880
|
+
Gu as MAX_EDITABLE_FILE_BYTES,
|
|
4881
|
+
ci as MAX_FIELDS,
|
|
4882
|
+
li as MAX_LIST_ITEMS,
|
|
4883
|
+
Ka as MAX_MEMORY_BROWSE,
|
|
4884
|
+
Ba as MAX_MEMORY_BUDGET,
|
|
4885
|
+
Ua as MAX_MEMORY_CHARS,
|
|
4886
|
+
Ns as MAX_SHOWN_KEYS,
|
|
4887
|
+
xo as MAX_TOPIC_CANDIDATES,
|
|
4888
|
+
Oo as MAX_TOPIC_EXAMPLES,
|
|
4866
4889
|
ue as MAX_TOPIC_EXAMPLE_CHARS,
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4890
|
+
Wu as MAX_VIEWABLE_FILE_BYTES,
|
|
4891
|
+
Fa as MIN_MEMORY_BUDGET,
|
|
4892
|
+
Qu as NAV_NOTICE_SLOT,
|
|
4893
|
+
Ga as NL_TAX_RATES,
|
|
4894
|
+
wu as NOTIFICATION_SOURCE_PROVIDER_GROUP,
|
|
4895
|
+
vo as OFF_TRACK_GAP,
|
|
4896
|
+
Va as ONBOARDING_SOURCE_PROVIDER_GROUP,
|
|
4874
4897
|
Se as PAUSE_SNOOZED,
|
|
4875
4898
|
Ee as PAUSE_WAITING_FOR_CUSTOMER,
|
|
4876
|
-
|
|
4899
|
+
$e as PHONE_REGIONS,
|
|
4877
4900
|
Zt as PRESENCE_ONLINE_WINDOW_MS,
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4901
|
+
ms as PRESENCE_SURVIVES_OFFLINE,
|
|
4902
|
+
Bo as PRODUCT_SCOPE_KIND,
|
|
4903
|
+
Xa as PROFILE_TOOL_DISPOSITIONS,
|
|
4904
|
+
au as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
|
|
4905
|
+
iu as PROVIDER_FEATURE_MESSAGE_WINDOW,
|
|
4906
|
+
Fs as PUBLIC_EMAIL_DOMAINS,
|
|
4884
4907
|
Je as READ_STEP_TYPES,
|
|
4885
|
-
|
|
4908
|
+
Ar as RELATED_SUBJECT_KINDS,
|
|
4886
4909
|
qt as RESERVED_STATUS_KEYS,
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4910
|
+
Il as RESERVED_TYPE_KEYS,
|
|
4911
|
+
Lu as RESOURCE_ATTACHED_SERVICE,
|
|
4912
|
+
Ru as RESOURCE_DESCRIBE_SERVICE,
|
|
4913
|
+
Du as RESOURCE_RESOLVE_SERVICE,
|
|
4914
|
+
$u as RESOURCE_SEARCH_SERVICE,
|
|
4915
|
+
Wr as SCHEDULE_ENTRY_SCOPE_KIND,
|
|
4916
|
+
Uu as SCOPE_READ_ROUTE,
|
|
4917
|
+
Ku as SCOPE_RELATED_ROUTE,
|
|
4918
|
+
qu as SETTINGS_CATEGORIES,
|
|
4919
|
+
la as SIGNATURE_INTENTS,
|
|
4920
|
+
cr as SLA_HOURS_BY_PRIORITY,
|
|
4921
|
+
Nc as SLA_METRICS,
|
|
4922
|
+
Rc as SLA_PAUSE_REASONS,
|
|
4923
|
+
oo as STEP_MAX_TOKENS_MAX,
|
|
4924
|
+
ro as STEP_MAX_TOKENS_MIN,
|
|
4925
|
+
So as STRATEGY_ITEM_SCOPE_KIND,
|
|
4926
|
+
tr as SUMMARY_MIN_LAST_CHARS,
|
|
4927
|
+
er as SUMMARY_MIN_MESSAGES,
|
|
4928
|
+
zu as SYNC_RUN_MAX_ERRORS,
|
|
4929
|
+
Vu as SYNC_TARGET_PROVIDER_GROUP,
|
|
4930
|
+
Dn as TERMINAL_ASSIGNMENT_STATUSES,
|
|
4931
|
+
co as TERMINAL_RUN_STATUSES,
|
|
4909
4932
|
Xt as TRANSACTION_KINDS,
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4933
|
+
Fo as TRANSACTION_SCOPE_KINDS,
|
|
4934
|
+
yc as TRIGGER_VARS,
|
|
4935
|
+
Ir as UNKNOWN_KIND,
|
|
4936
|
+
Eo as UNKNOWN_LEVEL_ORDER,
|
|
4937
|
+
fu as UNSUPPORTED,
|
|
4915
4938
|
Sn as USAGE_DIMENSIONS,
|
|
4916
4939
|
En as USAGE_DIMENSION_IDS,
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4940
|
+
Vr as WORKSTREAM_SCOPE_KIND,
|
|
4941
|
+
Vo as WORK_ACTIVITY_SCOPE_KIND,
|
|
4942
|
+
za as WORK_AREAS,
|
|
4943
|
+
_l as WORK_COMMENT_ADDED,
|
|
4944
|
+
Ml as WORK_CYCLE_SYNC_KIND,
|
|
4945
|
+
Al as WORK_ITEM_ASSIGNED,
|
|
4946
|
+
Go as WORK_ITEM_SCOPE_KIND,
|
|
4947
|
+
Sl as WORK_ITEM_STATUS_CHANGED,
|
|
4948
|
+
Wo as WORK_PROJECT_SCOPE_KIND,
|
|
4926
4949
|
J as W_PRIORITY,
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4950
|
+
al as acceptExampleCandidate,
|
|
4951
|
+
qr as actingIdentityKey,
|
|
4952
|
+
sl as activeWorkTypes,
|
|
4953
|
+
pi as activityIconOf,
|
|
4954
|
+
Ei as activityJoinUrl,
|
|
4932
4955
|
dn as activitySnippet,
|
|
4933
4956
|
pn as activityTextParams,
|
|
4934
|
-
|
|
4957
|
+
Si as activityTimelineText,
|
|
4935
4958
|
gn as activityTimestamp,
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4959
|
+
k as activityTypeInfo,
|
|
4960
|
+
dc as actorKey,
|
|
4961
|
+
il as addExampleCandidate,
|
|
4939
4962
|
Oe as addWorkingMs,
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4963
|
+
Ou as agePresenceEntry,
|
|
4964
|
+
es as aiAttachmentKind,
|
|
4965
|
+
Gl as aiAttachmentRejection,
|
|
4943
4966
|
je as aiBudgetLimit,
|
|
4944
|
-
|
|
4967
|
+
$i as aiBudgetPeriodKey,
|
|
4945
4968
|
yn as aiBudgetPeriodStart,
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4969
|
+
Ri as aiBudgetState,
|
|
4970
|
+
Ni as aiVendorAcceptsAttachment,
|
|
4971
|
+
Ci as aiVendorDefaultModel,
|
|
4972
|
+
Mi as aiVendorLabel,
|
|
4973
|
+
xi as aiVendorNeedsBaseUrl,
|
|
4974
|
+
Oi as aiVendorsWith,
|
|
4952
4975
|
Fn as allocate,
|
|
4953
4976
|
tn as appNameFromPath,
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4977
|
+
el as applyRounding,
|
|
4978
|
+
ua as applySignature,
|
|
4979
|
+
so as approvalRate,
|
|
4980
|
+
Gi as artifactBodyBytes,
|
|
4981
|
+
Wi as artifactOutline,
|
|
4982
|
+
$n as artifactToMarkdown,
|
|
4983
|
+
hc as assignmentMismatch,
|
|
4984
|
+
Qi as assignmentScopeKey,
|
|
4985
|
+
ea as assignmentSubject,
|
|
4986
|
+
Za as availabilityByPerson,
|
|
4987
|
+
Ya as belongsOnCalendar,
|
|
4988
|
+
ra as belongsToEntity,
|
|
4989
|
+
Ii as buildActivityPreview,
|
|
4990
|
+
tu as buildChannelIntents,
|
|
4991
|
+
Vi as buildShareKeys,
|
|
4992
|
+
xs as buildWindow,
|
|
4993
|
+
Yn as businessEntitySender,
|
|
4994
|
+
kr as calendarDaysBetween,
|
|
4970
4995
|
xe as calendarOf,
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4996
|
+
Na as canNestUnder,
|
|
4997
|
+
Bc as canParent,
|
|
4998
|
+
qa as capacityTotal,
|
|
4999
|
+
ac as capacityWeights,
|
|
5000
|
+
yi as carriesText,
|
|
5001
|
+
$a as categoryLabel,
|
|
5002
|
+
Yo as categoryOf,
|
|
5003
|
+
su as channelKindForScheme,
|
|
5004
|
+
fi as channelKindOf,
|
|
5005
|
+
Qc as checkInOverdueMs,
|
|
5006
|
+
_c as clampStepMaxTokens,
|
|
5007
|
+
Aa as classifyMail,
|
|
5008
|
+
id as cleanMessageMarkdown,
|
|
5009
|
+
sd as cleanMessageText,
|
|
5010
|
+
oa as codeQuery,
|
|
5011
|
+
ql as compareAssistRank,
|
|
5012
|
+
Co as compareWorkTypes,
|
|
4988
5013
|
Xn as conditionHolds,
|
|
4989
5014
|
Do as copyFrom,
|
|
4990
5015
|
W as countsAsPlanned,
|
|
4991
|
-
|
|
4992
|
-
|
|
5016
|
+
Qa as coverageByPerson,
|
|
5017
|
+
tc as coverageFor,
|
|
4993
5018
|
Lt as coversWorkstream,
|
|
4994
5019
|
Pt as cycleDayIndex,
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
+
Fl as cycleOrder,
|
|
5021
|
+
Bl as cycleState,
|
|
5022
|
+
ta as decideAssignmentState,
|
|
5023
|
+
Yu as decideCadence,
|
|
5024
|
+
Jl as decideIncomingCall,
|
|
5025
|
+
br as defaultLocaleOf,
|
|
5026
|
+
Ll as defaultStatusKey,
|
|
5027
|
+
lu as defineIntent,
|
|
5028
|
+
hr as depthOf,
|
|
5029
|
+
Cu as derivePresence,
|
|
5030
|
+
Ui as describeClause,
|
|
5031
|
+
eu as disabledIntentsFromCapabilities,
|
|
5032
|
+
Gi as documentBodyBytes,
|
|
5033
|
+
Iu as documentKindOf,
|
|
5034
|
+
Wi as documentOutline,
|
|
5035
|
+
$n as documentToMarkdown,
|
|
5036
|
+
_u as documentToText,
|
|
5037
|
+
Dc as dueAtOf,
|
|
5038
|
+
Jc as elapsedSeconds,
|
|
5039
|
+
ed as emailDomain,
|
|
5040
|
+
rd as endpointKey,
|
|
5041
|
+
Cr as erlangC,
|
|
5042
|
+
ys as extractParams,
|
|
5043
|
+
Cs as extractTerms,
|
|
5044
|
+
ma as fillDocument,
|
|
5020
5045
|
zn as fillText,
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5046
|
+
ru as filterByEndpoint,
|
|
5047
|
+
nu as filterByIntent,
|
|
5048
|
+
is as filterByTargetScheme,
|
|
5049
|
+
Ki as filterableDimensions,
|
|
5025
5050
|
te as findAiVendor,
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5051
|
+
Hc as fixedLevelForName,
|
|
5052
|
+
wl as fixedTypeForName,
|
|
5053
|
+
vl as fixedTypes,
|
|
5054
|
+
ku as flattenLocales,
|
|
5030
5055
|
H as floorToPeriod,
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5056
|
+
oc as forecastIntervals,
|
|
5057
|
+
Yr as formatActingIdentity,
|
|
5058
|
+
$ as formatCents,
|
|
5059
|
+
nl as formatClock,
|
|
5060
|
+
tl as formatHm,
|
|
5061
|
+
Ol as formatItemKey,
|
|
5037
5062
|
j as formatPeriod,
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5063
|
+
Kc as formatSlaDuration,
|
|
5064
|
+
Vl as freshSources,
|
|
5065
|
+
ki as getActivitySeenUserIds,
|
|
5066
|
+
da as getContactEndpoints,
|
|
5067
|
+
va as getShortTitle,
|
|
5068
|
+
wa as getUrgencyScore,
|
|
5069
|
+
Cc as hasReacted,
|
|
5070
|
+
Gc as healthCategory,
|
|
5071
|
+
Wc as healthsInCategory,
|
|
5072
|
+
Dt as heightOf,
|
|
5073
|
+
Ca as helpCenterText,
|
|
5074
|
+
gc as humanizeAction,
|
|
5075
|
+
no as interactionIdOf,
|
|
5076
|
+
bl as isAgentUser,
|
|
5077
|
+
Ta as isAssigned,
|
|
5078
|
+
qi as isAssignmentTerminal,
|
|
5079
|
+
Jr as isAssignmentTrigger,
|
|
5080
|
+
Ic as isAutoReady,
|
|
5081
|
+
mr as isAwaitingThem,
|
|
5082
|
+
vi as isChatMessageActivity,
|
|
5083
|
+
ka as isClosed,
|
|
5084
|
+
_i as isConnectedType,
|
|
5085
|
+
Fu as isDeepLink,
|
|
5086
|
+
gr as isDescendant,
|
|
5087
|
+
ga as isEligible,
|
|
5088
|
+
wi as isEmailActivity,
|
|
5089
|
+
ll as isFrozen,
|
|
5090
|
+
od as isHtmlBody,
|
|
5091
|
+
kc as isInFlight,
|
|
5092
|
+
sr as isInteractionUnseen,
|
|
5093
|
+
Bu as isLandingPath,
|
|
5094
|
+
Jn as isLikelyBulk,
|
|
5070
5095
|
Et as isMessageShape,
|
|
5071
|
-
|
|
5072
|
-
|
|
5096
|
+
mi as isMessageType,
|
|
5097
|
+
_s as isMoreSpecificPattern,
|
|
5073
5098
|
It as isNoteShape,
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5099
|
+
Ao as isOpenClock,
|
|
5100
|
+
Wl as isOutwardTool,
|
|
5101
|
+
dr as isParked,
|
|
5102
|
+
lo as isPaused,
|
|
5103
|
+
bi as isPlaybookAuthoredType,
|
|
5104
|
+
td as isPublicEmailDomain,
|
|
5105
|
+
Hu as isPublicPath,
|
|
5106
|
+
pr as isReminderActive,
|
|
5107
|
+
gi as isReplyableType,
|
|
5108
|
+
Ea as isSlaAtRisk,
|
|
5109
|
+
Tc as isTerminal,
|
|
5110
|
+
ba as isThreadLongEnough,
|
|
5111
|
+
Ai as isTranscriptType,
|
|
5112
|
+
Pl as isWorkClosed,
|
|
5113
|
+
ol as isWorkTypeVisible,
|
|
5114
|
+
Rl as itemDossierKeys,
|
|
5090
5115
|
N as kindFor,
|
|
5091
|
-
|
|
5092
|
-
|
|
5116
|
+
Xo as ladderFor,
|
|
5117
|
+
To as levelIn,
|
|
5093
5118
|
Te as levelOrder,
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5119
|
+
Er as lineNet,
|
|
5120
|
+
Ma as linkLabel,
|
|
5121
|
+
Di as listeningAllowed,
|
|
5122
|
+
xa as localeInstruction,
|
|
5123
|
+
Oa as localeName,
|
|
5124
|
+
Ra as localesOf,
|
|
5125
|
+
Zu as looksLikeEmail,
|
|
5101
5126
|
Ct as lookup,
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5127
|
+
ia as marginCents,
|
|
5128
|
+
bu as markdownToDocument,
|
|
5129
|
+
ou as matchContactToIntents,
|
|
5130
|
+
As as matchPublicRoute,
|
|
5131
|
+
La as mcpCredentialScope,
|
|
5132
|
+
Pa as mcpToolPrefix,
|
|
5133
|
+
Vc as measureRatio,
|
|
5134
|
+
Xu as mergeShownKeys,
|
|
5110
5135
|
un as messageCountsAs,
|
|
5111
|
-
|
|
5136
|
+
Fi as metricOption,
|
|
5112
5137
|
Kt as minutesOn,
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5138
|
+
nd as needsPhoneRegion,
|
|
5139
|
+
hi as nestsUnderParent,
|
|
5140
|
+
jc as nextLevelBelow,
|
|
5141
|
+
Lc as nextSlaClock,
|
|
5142
|
+
dl as nextVersion,
|
|
5143
|
+
Hi as normalizeArtifactBlocks,
|
|
5144
|
+
di as normalizeBlocks,
|
|
5145
|
+
Hi as normalizeDocumentBlocks,
|
|
5121
5146
|
nn as normalizeEmail,
|
|
5122
5147
|
P as normalizeExample,
|
|
5123
5148
|
Kn as normalizeGtin,
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5149
|
+
vu as notificationPrefKey,
|
|
5150
|
+
Os as novelty,
|
|
5151
|
+
yu as operationDescriptor,
|
|
5152
|
+
gu as operationsForKind,
|
|
5153
|
+
ha as organizationSender,
|
|
5129
5154
|
ce as overlapSeconds,
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5155
|
+
ec as overlaps,
|
|
5156
|
+
zc as paceRatio,
|
|
5157
|
+
ya as parkMarksById,
|
|
5158
|
+
lc as parseActingIdentity,
|
|
5159
|
+
sa as parseAmount,
|
|
5160
|
+
Oc as parseClockMinutes,
|
|
5161
|
+
xl as parseItemKey,
|
|
5162
|
+
gs as pathToRegex,
|
|
5138
5163
|
Ft as patternFor,
|
|
5139
5164
|
Ut as patternStartTime,
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5165
|
+
xc as pauseBitFor,
|
|
5166
|
+
Pi as periodsInRange,
|
|
5167
|
+
Ju as phoneSuffix,
|
|
5168
|
+
_a as pickMailHeaders,
|
|
5169
|
+
fa as pickTemplate,
|
|
5170
|
+
cc as placeLumps,
|
|
5146
5171
|
cn as plainTextFromMarkdown,
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5172
|
+
$c as planSlaEvent,
|
|
5173
|
+
nc as plannedBillable,
|
|
5174
|
+
Pr as plannedWorkTypeKey,
|
|
5175
|
+
Zr as playbookActor,
|
|
5176
|
+
Ec as procedureOf,
|
|
5177
|
+
hl as productScopeKey,
|
|
5178
|
+
$l as projectDossierKeys,
|
|
5179
|
+
bs as publicBasePathFor,
|
|
5180
|
+
ju as publicRoutePatterns,
|
|
5181
|
+
Ji as reactionWakesAssignment,
|
|
5157
5182
|
fe as readPath,
|
|
5158
5183
|
et as readStepError,
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5184
|
+
ur as recencyOf,
|
|
5185
|
+
pa as recipientLocale,
|
|
5186
|
+
eo as refKey,
|
|
5187
|
+
Us as registrableDomain,
|
|
5188
|
+
Ro as rejectExampleCandidate,
|
|
5189
|
+
Ha as relatedByDefault,
|
|
5165
5190
|
Ie as remainingMsOf,
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5191
|
+
Nr as requiredAgents,
|
|
5192
|
+
Lr as requirementFor,
|
|
5193
|
+
os as resolveAccountCapabilities,
|
|
5169
5194
|
me as resolveActivityText,
|
|
5170
|
-
|
|
5171
|
-
|
|
5195
|
+
rs as resolveChannelIntents,
|
|
5196
|
+
aa as resolvePrice,
|
|
5172
5197
|
Gn as resolveSignature,
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5198
|
+
xu as resolveWorkMode,
|
|
5199
|
+
Pu as resourceKindOf,
|
|
5200
|
+
qc as rollupChildren,
|
|
5176
5201
|
G as roundHalfUp,
|
|
5177
|
-
|
|
5178
|
-
|
|
5202
|
+
uc as runActor,
|
|
5203
|
+
vc as runInteractionId,
|
|
5179
5204
|
On as sanitizeInline,
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5205
|
+
Es as sanitizeTranscript,
|
|
5206
|
+
sc as scheduleEntryScopeKey,
|
|
5207
|
+
Ia as scoreInteraction,
|
|
5208
|
+
El as scoreWorkItem,
|
|
5209
|
+
Da as selectLenses,
|
|
5210
|
+
Or as serviceLevel,
|
|
5211
|
+
Zl as sessionsHoldCannotReach,
|
|
5212
|
+
Ql as sessionsToHold,
|
|
5213
|
+
Mt as shareKeyForTeam,
|
|
5214
|
+
vt as shareKeyForUser,
|
|
5215
|
+
zi as shareKeysForViewer,
|
|
5216
|
+
rc as shortfalls,
|
|
5217
|
+
Nu as shouldRunAudioPipeline,
|
|
5218
|
+
Pc as slaBadgeTone,
|
|
5219
|
+
Sa as slaHoursByInbox,
|
|
5220
|
+
fr as slaHoursFor,
|
|
5221
|
+
qo as sortStatuses,
|
|
5222
|
+
ns as sourceKey,
|
|
5223
|
+
Xr as spreadOverWeights,
|
|
5224
|
+
Dl as statusIn,
|
|
5225
|
+
Sc as stepsOf,
|
|
5226
|
+
Fc as strategyAncestorKeysFor,
|
|
5227
|
+
Uc as strategyDossierKeys,
|
|
5203
5228
|
zt as strategyItemScopeKey,
|
|
5204
5229
|
ln as stripHtml,
|
|
5205
|
-
|
|
5230
|
+
wc as subjectKeyOf,
|
|
5206
5231
|
Bt as subjectOf,
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5232
|
+
Yl as subjectRef,
|
|
5233
|
+
Nl as suggestProjectKey,
|
|
5234
|
+
Xc as suggestedHealth,
|
|
5235
|
+
Mc as summarizeReactions,
|
|
5236
|
+
mc as targetById,
|
|
5237
|
+
fc as targetForActivityType,
|
|
5238
|
+
Zc as targetOrder,
|
|
5239
|
+
Sr as taxRateFor,
|
|
5215
5240
|
wr as termsFor,
|
|
5216
|
-
|
|
5241
|
+
Qr as toActingIdentity,
|
|
5217
5242
|
ht as toE164,
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5243
|
+
Xi as toolSourceKinds,
|
|
5244
|
+
$o as topicOfferedForTeam,
|
|
5245
|
+
cl as topicsForTeam,
|
|
5246
|
+
xr as trafficIntensity,
|
|
5247
|
+
pl as transactionContext,
|
|
5248
|
+
yl as transactionDossierKeys,
|
|
5249
|
+
gl as transactionIdFromScope,
|
|
5250
|
+
we as transactionKind,
|
|
5251
|
+
jo as transactionScopeKey,
|
|
5252
|
+
fl as transactionSlots,
|
|
5253
|
+
Wa as transactionTotals,
|
|
5254
|
+
No as truncateExample,
|
|
5255
|
+
kl as typeIn,
|
|
5256
|
+
Tl as typesFor,
|
|
5257
|
+
Kl as uniqueWorkStatusKey,
|
|
5258
|
+
rl as uniqueWorkTypeKey,
|
|
5233
5259
|
In as usageMetricId,
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5260
|
+
Bi as usageMetrics,
|
|
5261
|
+
Ul as validateStatuses,
|
|
5262
|
+
pc as valueAtPath,
|
|
5263
|
+
Me as waitHoursOf,
|
|
5264
|
+
Zi as wakesAssignment,
|
|
5265
|
+
Cl as workActivityScopeKey,
|
|
5266
|
+
zo as workItemScopeKey,
|
|
5241
5267
|
Yt as workProjectScopeKey,
|
|
5242
|
-
|
|
5243
|
-
|
|
5268
|
+
Yc as workRatio,
|
|
5269
|
+
Qo as workStatusKey,
|
|
5244
5270
|
Mo as workTypeKey,
|
|
5245
5271
|
Ae as workingMsBetween,
|
|
5246
|
-
|
|
5272
|
+
ic as workstreamScopeKey
|
|
5247
5273
|
};
|