@opencxh/domain 1.232.0 → 1.233.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities/analytics/index.d.ts +1 -0
- package/dist/entities/analytics/picker.d.ts +49 -0
- package/dist/entities/analytics/picker.test.d.ts +1 -0
- package/dist/entities/planning/capacity.d.ts +69 -0
- package/dist/entities/planning/capacity.test.d.ts +1 -0
- package/dist/entities/planning/contracts.d.ts +118 -0
- package/dist/entities/planning/coverage.d.ts +73 -0
- package/dist/entities/planning/coverage.test.d.ts +1 -0
- package/dist/entities/planning/erlang.d.ts +37 -0
- package/dist/entities/planning/erlang.test.d.ts +1 -0
- package/dist/entities/planning/forecast.d.ts +34 -0
- package/dist/entities/planning/forecast.test.d.ts +1 -0
- package/dist/entities/planning/index.d.ts +11 -0
- package/dist/entities/planning/keys.d.ts +12 -0
- package/dist/entities/planning/kinds.d.ts +56 -0
- package/dist/entities/planning/pattern.d.ts +63 -0
- package/dist/entities/planning/spread.d.ts +61 -0
- package/dist/entities/planning/spread.test.d.ts +1 -0
- package/dist/entities/planning/terms.d.ts +42 -0
- package/dist/entities/planning/types.d.ts +188 -0
- package/dist/entities/strategy/levels.d.ts +12 -0
- package/dist/entities/strategy/progress.d.ts +12 -4
- package/dist/index.cjs +16 -16
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1979 -1495
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const Ii = 10, Mi = 10, ki = 10, vi = 5, Wt = /* @__PURE__ */ new Set([
|
|
2
2
|
"header",
|
|
3
3
|
"section",
|
|
4
4
|
"context",
|
|
@@ -8,13 +8,13 @@ const Ci = 10, vi = 10, Ni = 10, xi = 5, _t = /* @__PURE__ */ new Set([
|
|
|
8
8
|
"actions",
|
|
9
9
|
"attachments"
|
|
10
10
|
]);
|
|
11
|
-
function
|
|
11
|
+
function te(e) {
|
|
12
12
|
if (typeof e == "string") return e.length > 0;
|
|
13
13
|
if (!e || typeof e != "object") return !1;
|
|
14
14
|
const t = e;
|
|
15
15
|
return typeof t.key == "string" || typeof t.value == "string";
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function Oi(e, t = () => {
|
|
18
18
|
}) {
|
|
19
19
|
if (!Array.isArray(e)) return [];
|
|
20
20
|
const n = [];
|
|
@@ -24,89 +24,89 @@ function Ri(e, t = () => {
|
|
|
24
24
|
break;
|
|
25
25
|
}
|
|
26
26
|
if (!r || typeof r != "object") continue;
|
|
27
|
-
const
|
|
28
|
-
if (!
|
|
29
|
-
t(`unknown block type ${String(
|
|
27
|
+
const o = r;
|
|
28
|
+
if (!Wt.has(o.type)) {
|
|
29
|
+
t(`unknown block type ${String(o.type)}`);
|
|
30
30
|
continue;
|
|
31
31
|
}
|
|
32
|
-
switch (
|
|
32
|
+
switch (o.type) {
|
|
33
33
|
case "header":
|
|
34
|
-
if (!
|
|
34
|
+
if (!te(o.text)) {
|
|
35
35
|
t("a header without text");
|
|
36
36
|
continue;
|
|
37
37
|
}
|
|
38
38
|
break;
|
|
39
39
|
case "context":
|
|
40
|
-
if (!
|
|
40
|
+
if (!te(o.text)) {
|
|
41
41
|
t("a context block without text");
|
|
42
42
|
continue;
|
|
43
43
|
}
|
|
44
44
|
break;
|
|
45
45
|
case "image":
|
|
46
|
-
if (!
|
|
46
|
+
if (!o.url || !o.alt) {
|
|
47
47
|
t("an image without url or alt");
|
|
48
48
|
continue;
|
|
49
49
|
}
|
|
50
50
|
break;
|
|
51
51
|
case "section":
|
|
52
|
-
Array.isArray(
|
|
52
|
+
Array.isArray(o.fields) && o.fields.length > 10 && (t("more than 10 fields in a section"), o.fields = o.fields.slice(0, 10));
|
|
53
53
|
break;
|
|
54
54
|
case "list":
|
|
55
|
-
if (!Array.isArray(
|
|
55
|
+
if (!Array.isArray(o.items) || o.items.length === 0) {
|
|
56
56
|
t("a list without items");
|
|
57
57
|
continue;
|
|
58
58
|
}
|
|
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 i = Array.isArray(o.elements) ? o.elements : [], s = i.filter((a) => a?.action_id && a.invoke && te(a.text));
|
|
63
|
+
if (s.length !== i.length && t("an action without action_id, invoke or text"), s.length === 0) continue;
|
|
64
|
+
s.length > 5 && t("more than 5 actions"), o.elements = s.slice(0, 5);
|
|
65
65
|
break;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
n.push(
|
|
68
|
+
n.push(o);
|
|
69
69
|
}
|
|
70
70
|
return n;
|
|
71
71
|
}
|
|
72
|
-
const
|
|
73
|
-
function
|
|
72
|
+
const Vt = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, zt = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
|
|
73
|
+
function Yt(e) {
|
|
74
74
|
if (typeof e != "string" || !e) return "";
|
|
75
75
|
let t = e;
|
|
76
76
|
return t = t.replace(/```[a-z]*\n?/gi, "").replace(/~~~[a-z]*\n?/gi, ""), t = t.replace(/!\[([^\]]*)\]\([^)]*\)/g, "$1"), t = t.replace(/\[([^\]]*)\]\([^)]*\)/g, "$1"), t = t.replace(/\[([^\]]*)\]\[[^\]]*\]/g, "$1"), t = t.replace(/<((?:https?|mailto):[^>\s]+)>/gi, "$1"), t = t.split(`
|
|
77
77
|
`).map(
|
|
78
78
|
(n) => n.replace(/^\s{0,3}#{1,6}\s+/, "").replace(/^\s{0,3}>\s?/, "").replace(/^\s*[-*+]\s+/, "").replace(/^\s*\d+[.)]\s+/, "").replace(/^\s*(?:[-*_]\s*){3,}$/, "")
|
|
79
79
|
).join(`
|
|
80
|
-
`), t = t.replace(
|
|
80
|
+
`), t = t.replace(Vt, "$2"), t = t.replace(zt, "$2"), t = t.replace(/~~(?=\S)([\s\S]*?\S)~~/g, "$1"), t = t.replace(/`([^`\n]+)`/g, "$1"), t.replace(/\s+/g, " ").trim();
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Xt(e) {
|
|
83
83
|
return e.replace(/<style[\s\S]*?<\/style>/gi, " ").replace(/<script[\s\S]*?<\/script>/gi, " ").replace(/<[^>]+>/g, " ").replace(/ /g, " ").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(/\s+/g, " ").trim();
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function G(e) {
|
|
86
86
|
if (!e || e < 0) return "";
|
|
87
87
|
const t = Math.floor(e / 60), n = Math.floor(e % 60);
|
|
88
88
|
return `${t}:${n.toString().padStart(2, "0")}`;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function ke(e) {
|
|
91
91
|
return e ? ` — ${Math.floor(e / 60)}m ${e % 60}s` : "";
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function ne(e) {
|
|
94
94
|
return e?.split("@")?.[0] || e || "";
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function W(e) {
|
|
97
97
|
return e.map((t) => t.name).join(", ");
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function ve(e) {
|
|
100
100
|
return e === "meeting" ? "Meeting" : e === "video" ? "Video call" : "Audio call";
|
|
101
101
|
}
|
|
102
|
-
const
|
|
102
|
+
const N = {
|
|
103
103
|
/* ---- voice ---- */
|
|
104
104
|
VOICE_CALL_STARTED: {
|
|
105
105
|
shape: "event",
|
|
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 — ${ne(e.payload.from)}` : `Outbound call started — ${ne(e.payload.to)}`
|
|
110
110
|
},
|
|
111
111
|
VOICE_CALL_ANSWERED: {
|
|
112
112
|
shape: "event",
|
|
@@ -133,15 +133,15 @@ const _ = {
|
|
|
133
133
|
shape: "event",
|
|
134
134
|
channelKind: "voice",
|
|
135
135
|
icon: "phone",
|
|
136
|
-
snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${
|
|
137
|
-
timeline: (e) => `Call ended${
|
|
136
|
+
snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${G(e.payload.duration)})` : ""}`,
|
|
137
|
+
timeline: (e) => `Call ended${ke(e.payload.duration)}`
|
|
138
138
|
},
|
|
139
139
|
VOICE_CALL_MISSED: {
|
|
140
140
|
shape: "event",
|
|
141
141
|
channelKind: "voice",
|
|
142
142
|
icon: "phone",
|
|
143
143
|
snippet: () => "Gemiste oproep",
|
|
144
|
-
timeline: (e) => `Missed call — ${
|
|
144
|
+
timeline: (e) => `Missed call — ${ne(e.payload.from)}`
|
|
145
145
|
},
|
|
146
146
|
VOICE_CALL_FAILED: {
|
|
147
147
|
shape: "event",
|
|
@@ -188,7 +188,7 @@ const _ = {
|
|
|
188
188
|
shape: "event",
|
|
189
189
|
channelKind: "video",
|
|
190
190
|
icon: "video",
|
|
191
|
-
snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${
|
|
191
|
+
snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${G(e.payload.duration)})` : ""}`,
|
|
192
192
|
timeline: () => "Video call ended"
|
|
193
193
|
},
|
|
194
194
|
VIDEO_CALL_MISSED: {
|
|
@@ -216,7 +216,7 @@ const _ = {
|
|
|
216
216
|
replyable: !0,
|
|
217
217
|
carriesText: !0,
|
|
218
218
|
countsAs: "inbound_message",
|
|
219
|
-
snippet:
|
|
219
|
+
snippet: Oe
|
|
220
220
|
},
|
|
221
221
|
EMAIL_SENT: {
|
|
222
222
|
shape: "message",
|
|
@@ -226,7 +226,7 @@ const _ = {
|
|
|
226
226
|
replyable: !0,
|
|
227
227
|
carriesText: !0,
|
|
228
228
|
countsAs: "outbound_message",
|
|
229
|
-
snippet:
|
|
229
|
+
snippet: Oe
|
|
230
230
|
},
|
|
231
231
|
/* ---- chat ---- */
|
|
232
232
|
CHAT_MESSAGE_SENT: {
|
|
@@ -255,9 +255,9 @@ const _ = {
|
|
|
255
255
|
shape: "event",
|
|
256
256
|
channelKind: "chat",
|
|
257
257
|
icon: "message-circle",
|
|
258
|
-
snippet: (e) => `${
|
|
258
|
+
snippet: (e) => `${W(e.payload.members)} toegevoegd`,
|
|
259
259
|
timeline: (e) => {
|
|
260
|
-
const t =
|
|
260
|
+
const t = W(e.payload.members) || "Someone", n = e.payload.initiator?.name ? ` · added by ${e.payload.initiator.name}` : "";
|
|
261
261
|
return `${t} joined the chat${n}`;
|
|
262
262
|
}
|
|
263
263
|
},
|
|
@@ -265,9 +265,9 @@ const _ = {
|
|
|
265
265
|
shape: "event",
|
|
266
266
|
channelKind: "chat",
|
|
267
267
|
icon: "message-circle",
|
|
268
|
-
snippet: (e) => `${
|
|
268
|
+
snippet: (e) => `${W(e.payload.members)} verlaten`,
|
|
269
269
|
timeline: (e) => {
|
|
270
|
-
const t =
|
|
270
|
+
const t = W(e.payload.members) || "Someone", n = e.payload.initiator?.name ? ` · removed by ${e.payload.initiator.name}` : "";
|
|
271
271
|
return `${t} left the chat${n}`;
|
|
272
272
|
}
|
|
273
273
|
},
|
|
@@ -283,15 +283,15 @@ const _ = {
|
|
|
283
283
|
channelKind: "chat",
|
|
284
284
|
icon: "message-circle",
|
|
285
285
|
snippet: () => "Gesprek gestart",
|
|
286
|
-
timeline: (e) => `${
|
|
286
|
+
timeline: (e) => `${ve(e.payload.callType)} started${e.payload.initiator ? ` by ${e.payload.initiator.name}` : ""}`,
|
|
287
287
|
joinUrl: (e) => e.payload.joinUrl
|
|
288
288
|
},
|
|
289
289
|
CHAT_CALL_ENDED: {
|
|
290
290
|
shape: "event",
|
|
291
291
|
channelKind: "chat",
|
|
292
292
|
icon: "message-circle",
|
|
293
|
-
snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${
|
|
294
|
-
timeline: (e) => `${
|
|
293
|
+
snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${G(e.payload.duration)})` : ""}`,
|
|
294
|
+
timeline: (e) => `${ve(e.payload.callType)} ended${ke(e.payload.duration)}`,
|
|
295
295
|
joinUrl: (e) => e.payload.joinUrl
|
|
296
296
|
},
|
|
297
297
|
CHAT_EVENT: {
|
|
@@ -380,7 +380,7 @@ const _ = {
|
|
|
380
380
|
MEETING_ENDED: {
|
|
381
381
|
shape: "event",
|
|
382
382
|
icon: "calendar",
|
|
383
|
-
snippet: (e) => `Vergadering beëindigd${e.payload.duration ? ` (${
|
|
383
|
+
snippet: (e) => `Vergadering beëindigd${e.payload.duration ? ` (${G(e.payload.duration)})` : ""}`,
|
|
384
384
|
timeline: () => "Meeting ended"
|
|
385
385
|
},
|
|
386
386
|
MEETING_PARTICIPANT_JOINED: {
|
|
@@ -460,63 +460,63 @@ const _ = {
|
|
|
460
460
|
timeline: (e, t) => `Status changed by ${t}`
|
|
461
461
|
}
|
|
462
462
|
};
|
|
463
|
-
function
|
|
464
|
-
const t = e.payload, n =
|
|
463
|
+
function Oe(e) {
|
|
464
|
+
const t = e.payload, n = Yt(t.bodyText).trim() || t.bodySnippet?.trim() || Xt(t.body ?? "");
|
|
465
465
|
return t.subject ? `${t.subject} — ${n}` : n;
|
|
466
466
|
}
|
|
467
|
-
function
|
|
468
|
-
return
|
|
467
|
+
function M(e) {
|
|
468
|
+
return N[e];
|
|
469
469
|
}
|
|
470
|
-
function
|
|
471
|
-
return
|
|
470
|
+
function Ci(e) {
|
|
471
|
+
return M(e)?.icon ?? "circle";
|
|
472
472
|
}
|
|
473
|
-
function
|
|
474
|
-
return
|
|
473
|
+
function Ni(e) {
|
|
474
|
+
return M(e)?.channelKind;
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function dt(e) {
|
|
477
477
|
return e === "message" || e === "note";
|
|
478
478
|
}
|
|
479
|
-
function
|
|
480
|
-
return
|
|
479
|
+
function xi(e) {
|
|
480
|
+
return dt(M(e)?.shape);
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function ft(e) {
|
|
483
483
|
return e === "note";
|
|
484
484
|
}
|
|
485
|
-
function
|
|
486
|
-
return
|
|
485
|
+
function Ri(e) {
|
|
486
|
+
return ft(M(e)?.shape);
|
|
487
487
|
}
|
|
488
|
-
function
|
|
489
|
-
return
|
|
488
|
+
function Di(e) {
|
|
489
|
+
return M(e)?.replyable === !0;
|
|
490
490
|
}
|
|
491
|
-
function
|
|
492
|
-
return
|
|
491
|
+
function $i(e) {
|
|
492
|
+
return M(e)?.carriesText === !0;
|
|
493
493
|
}
|
|
494
|
-
function
|
|
495
|
-
return
|
|
494
|
+
function qt(e) {
|
|
495
|
+
return M(e)?.countsAs;
|
|
496
496
|
}
|
|
497
|
-
function
|
|
498
|
-
return
|
|
497
|
+
function Li(e) {
|
|
498
|
+
return M(e)?.playbookAuthored === !0;
|
|
499
499
|
}
|
|
500
|
-
function
|
|
501
|
-
return
|
|
500
|
+
function Pi(e) {
|
|
501
|
+
return M(e)?.connected === !0;
|
|
502
502
|
}
|
|
503
|
-
function
|
|
504
|
-
const t =
|
|
503
|
+
function Ui(e) {
|
|
504
|
+
const t = M(e);
|
|
505
505
|
return t?.shape === "artifact" && t?.carriesText === !0;
|
|
506
506
|
}
|
|
507
|
-
function
|
|
508
|
-
const t =
|
|
507
|
+
function Jt(e) {
|
|
508
|
+
const t = M(e.type)?.snippet;
|
|
509
509
|
return t ? t(e) : "";
|
|
510
510
|
}
|
|
511
|
-
function
|
|
512
|
-
const n =
|
|
511
|
+
function Ki(e, t) {
|
|
512
|
+
const n = M(e.type)?.timeline;
|
|
513
513
|
return n ? n(e, t) : e.type.replace(/_/g, " ").toLowerCase();
|
|
514
514
|
}
|
|
515
|
-
function
|
|
516
|
-
const t =
|
|
515
|
+
function Fi(e) {
|
|
516
|
+
const t = M(e.type)?.joinUrl;
|
|
517
517
|
return t ? t(e) : void 0;
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function le(e, t) {
|
|
520
520
|
let n = e;
|
|
521
521
|
for (const r of t.split(".")) {
|
|
522
522
|
if (n == null || typeof n != "object") return "";
|
|
@@ -524,44 +524,44 @@ function Y(e, t) {
|
|
|
524
524
|
}
|
|
525
525
|
return n == null ? "" : typeof n == "string" ? n : typeof n == "number" || typeof n == "boolean" ? String(n) : "";
|
|
526
526
|
}
|
|
527
|
-
function
|
|
527
|
+
function ue(e, t, n) {
|
|
528
528
|
if (e === void 0) return null;
|
|
529
529
|
if (typeof e == "string") return e || null;
|
|
530
530
|
if ("value" in e)
|
|
531
|
-
return
|
|
531
|
+
return le(t, e.value) || null;
|
|
532
532
|
const r = {};
|
|
533
|
-
for (const [
|
|
534
|
-
r[
|
|
535
|
-
const
|
|
536
|
-
return
|
|
533
|
+
for (const [i, s] of Object.entries(e.params ?? {}))
|
|
534
|
+
r[i] = le(t, s);
|
|
535
|
+
const o = n(e.key, r);
|
|
536
|
+
return o === e.key ? null : o;
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function Zt(e, t) {
|
|
539
539
|
if (!e || typeof e == "string" || "value" in e) return null;
|
|
540
540
|
const n = {};
|
|
541
|
-
for (const [r,
|
|
542
|
-
n[r] =
|
|
541
|
+
for (const [r, o] of Object.entries(e.params ?? {}))
|
|
542
|
+
n[r] = le(t, o);
|
|
543
543
|
return { key: e.key, params: n };
|
|
544
544
|
}
|
|
545
|
-
const
|
|
546
|
-
function
|
|
545
|
+
const Ce = 140;
|
|
546
|
+
function Qt(e) {
|
|
547
547
|
const t = e.trim();
|
|
548
|
-
return t.length <=
|
|
548
|
+
return t.length <= Ce ? t : `${t.slice(0, Ce - 1).trimEnd()}…`;
|
|
549
549
|
}
|
|
550
|
-
function
|
|
551
|
-
const n =
|
|
550
|
+
function Bi(e, t) {
|
|
551
|
+
const n = Zt(t?.text, e), r = t ? ue(t.text, e, (o) => o) : null;
|
|
552
552
|
return {
|
|
553
553
|
activityId: e.id,
|
|
554
554
|
type: e.type,
|
|
555
|
-
snippet:
|
|
555
|
+
snippet: Qt(r ?? Jt(e)),
|
|
556
556
|
authorName: e.author?.name ?? "",
|
|
557
557
|
direction: e.direction,
|
|
558
558
|
createdAt: e.createdAt ?? Date.now(),
|
|
559
559
|
...n ? { snippetKey: n.key, snippetParams: n.params } : {}
|
|
560
560
|
};
|
|
561
561
|
}
|
|
562
|
-
const
|
|
563
|
-
function
|
|
564
|
-
const t =
|
|
562
|
+
const en = (e) => e;
|
|
563
|
+
function Ne(e) {
|
|
564
|
+
const t = N[e];
|
|
565
565
|
return {
|
|
566
566
|
type: e,
|
|
567
567
|
shape: t.shape,
|
|
@@ -576,7 +576,7 @@ function ge(e) {
|
|
|
576
576
|
displayNameKey: t.displayNameKey
|
|
577
577
|
};
|
|
578
578
|
}
|
|
579
|
-
function
|
|
579
|
+
function xe(e) {
|
|
580
580
|
return {
|
|
581
581
|
type: e.type,
|
|
582
582
|
shape: e.shape,
|
|
@@ -591,21 +591,21 @@ function he(e) {
|
|
|
591
591
|
displayNameKey: e.displayNameKey
|
|
592
592
|
};
|
|
593
593
|
}
|
|
594
|
-
class
|
|
595
|
-
constructor(t = [], n =
|
|
594
|
+
class tn {
|
|
595
|
+
constructor(t = [], n = en) {
|
|
596
596
|
this.translate = n;
|
|
597
597
|
for (const r of t)
|
|
598
|
-
r?.type && (r.type in
|
|
598
|
+
r?.type && (r.type in N || this.declared.has(r.type) || this.declared.set(r.type, r));
|
|
599
599
|
}
|
|
600
600
|
declared = /* @__PURE__ */ new Map();
|
|
601
601
|
get(t) {
|
|
602
|
-
if (t in
|
|
602
|
+
if (t in N) return Ne(t);
|
|
603
603
|
const n = this.declared.get(t);
|
|
604
|
-
return n ?
|
|
604
|
+
return n ? xe(n) : void 0;
|
|
605
605
|
}
|
|
606
606
|
/** Everything that may be offered as a trigger, built-in and declared. */
|
|
607
607
|
triggerable() {
|
|
608
|
-
const t = Object.keys(
|
|
608
|
+
const t = Object.keys(N).filter((r) => N[r].triggerable).map(Ne), n = [...this.declared.values()].map(xe).filter((r) => r.triggerable);
|
|
609
609
|
return [...t, ...n];
|
|
610
610
|
}
|
|
611
611
|
/**
|
|
@@ -614,17 +614,17 @@ class xt {
|
|
|
614
614
|
* the feed always showed for unknown types.
|
|
615
615
|
*/
|
|
616
616
|
timelineText(t, n) {
|
|
617
|
-
const r =
|
|
617
|
+
const r = N[t.type];
|
|
618
618
|
if (r?.timeline) return r.timeline(t, n);
|
|
619
|
-
const
|
|
620
|
-
return
|
|
619
|
+
const o = this.declared.get(t.type);
|
|
620
|
+
return ue(o?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
|
|
621
621
|
}
|
|
622
622
|
/** The line for the inbox list. Empty when the type has nothing to show. */
|
|
623
623
|
snippet(t) {
|
|
624
|
-
const n =
|
|
624
|
+
const n = N[t.type];
|
|
625
625
|
if (n?.snippet) return n.snippet(t);
|
|
626
626
|
const r = this.declared.get(t.type);
|
|
627
|
-
return
|
|
627
|
+
return ue(r?.text, t, this.translate) ?? "";
|
|
628
628
|
}
|
|
629
629
|
/** The descriptor as it arrived; needed to store `text` as a key. */
|
|
630
630
|
descriptor(t) {
|
|
@@ -649,11 +649,11 @@ class xt {
|
|
|
649
649
|
* {@link ResolvedActivityType}.
|
|
650
650
|
*/
|
|
651
651
|
isMessage(t) {
|
|
652
|
-
return
|
|
652
|
+
return dt(this.get(t)?.shape);
|
|
653
653
|
}
|
|
654
654
|
/** Folds into the list under the message it answers. See {@link isNoteShape}. */
|
|
655
655
|
nestsUnderParent(t) {
|
|
656
|
-
return
|
|
656
|
+
return ft(this.get(t)?.shape);
|
|
657
657
|
}
|
|
658
658
|
/** Can a person reply to this? Notes cannot — those go nowhere. */
|
|
659
659
|
isReplyable(t) {
|
|
@@ -681,23 +681,23 @@ class xt {
|
|
|
681
681
|
return this.translate;
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
|
-
const
|
|
685
|
-
function
|
|
684
|
+
const Hi = new tn();
|
|
685
|
+
function ji(e, t, n = []) {
|
|
686
686
|
const r = e.createdAt;
|
|
687
687
|
if (!r) return [];
|
|
688
|
-
const
|
|
689
|
-
return e.author.type === "user" && e.author.id &&
|
|
688
|
+
const o = new Set(n);
|
|
689
|
+
return e.author.type === "user" && e.author.id && o.add(e.author.id), Object.entries(t).filter(([i, s]) => s >= r && !o.has(i)).map(([i]) => i);
|
|
690
690
|
}
|
|
691
|
-
function
|
|
691
|
+
function nn(e) {
|
|
692
692
|
return e.createdAt ?? 0;
|
|
693
693
|
}
|
|
694
|
-
function
|
|
694
|
+
function Gi(e) {
|
|
695
695
|
return e.type === "EMAIL_RECEIVED" || e.type === "EMAIL_SENT";
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function Wi(e) {
|
|
698
698
|
return e.type === "CHAT_MESSAGE_SENT" || e.type === "CHAT_MESSAGE_RECEIVED";
|
|
699
699
|
}
|
|
700
|
-
const
|
|
700
|
+
const pt = [
|
|
701
701
|
{
|
|
702
702
|
id: "openai",
|
|
703
703
|
attachmentKinds: ["image", "pdf"],
|
|
@@ -787,45 +787,45 @@ const ze = [
|
|
|
787
787
|
defaultModel: "default"
|
|
788
788
|
}
|
|
789
789
|
];
|
|
790
|
-
function
|
|
791
|
-
return
|
|
790
|
+
function Z(e) {
|
|
791
|
+
return pt.find((t) => t.id === e);
|
|
792
792
|
}
|
|
793
|
-
function
|
|
794
|
-
return
|
|
793
|
+
function Vi(e) {
|
|
794
|
+
return Z(e)?.label ?? e;
|
|
795
795
|
}
|
|
796
|
-
function
|
|
797
|
-
return
|
|
796
|
+
function zi(e, t = "gpt-5-mini") {
|
|
797
|
+
return Z(e)?.defaultModel ?? t;
|
|
798
798
|
}
|
|
799
|
-
function
|
|
800
|
-
return
|
|
799
|
+
function Yi(e) {
|
|
800
|
+
return pt.filter((t) => t.capabilities.includes(e));
|
|
801
801
|
}
|
|
802
|
-
function
|
|
803
|
-
const t =
|
|
802
|
+
function Xi(e) {
|
|
803
|
+
const t = Z(e);
|
|
804
804
|
return !!t && !t.baseUrl;
|
|
805
805
|
}
|
|
806
|
-
function
|
|
807
|
-
return t === "text" ? !0 :
|
|
806
|
+
function qi(e, t) {
|
|
807
|
+
return t === "text" ? !0 : Z(e)?.attachmentKinds?.includes(t) === !0;
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function Ji(e, t) {
|
|
810
810
|
if (!e.enabled) return "ok";
|
|
811
|
-
const n =
|
|
811
|
+
const n = Re(e.hardLimitNanos), r = Re(e.softLimitNanos);
|
|
812
812
|
return n !== void 0 && t >= n ? "hard" : r !== void 0 && t >= r ? "soft" : "ok";
|
|
813
813
|
}
|
|
814
|
-
function
|
|
814
|
+
function Re(e) {
|
|
815
815
|
return typeof e == "number" ? e : void 0;
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function rn(e, t = "month") {
|
|
818
818
|
const n = new Date(e);
|
|
819
819
|
return Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), 1);
|
|
820
820
|
}
|
|
821
|
-
function
|
|
822
|
-
const n = new Date(
|
|
821
|
+
function Zi(e, t = "month") {
|
|
822
|
+
const n = new Date(rn(e, t));
|
|
823
823
|
return `${n.getUTCFullYear()}-${String(n.getUTCMonth() + 1).padStart(2, "0")}`;
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function Qi(e) {
|
|
826
826
|
return e?.listeningEnabled !== !1;
|
|
827
827
|
}
|
|
828
|
-
const
|
|
828
|
+
const es = [
|
|
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,47 +835,64 @@ const io = [
|
|
|
835
835
|
{ id: "handledBy", label: "Afhandelaar", labelSource: "raw" },
|
|
836
836
|
{ id: "time", label: "Tijd", labelSource: "raw" }
|
|
837
837
|
];
|
|
838
|
-
function
|
|
838
|
+
function re(e) {
|
|
839
839
|
return e < 10 ? `0${e}` : `${e}`;
|
|
840
840
|
}
|
|
841
|
-
function
|
|
842
|
-
const n = new Date(e), r = `${n.getUTCFullYear()}-${
|
|
843
|
-
return t === "day" ? r : `${r}T${
|
|
841
|
+
function F(e, t) {
|
|
842
|
+
const n = new Date(e), r = `${n.getUTCFullYear()}-${re(n.getUTCMonth() + 1)}-${re(n.getUTCDate())}`;
|
|
843
|
+
return t === "day" ? r : `${r}T${re(n.getUTCHours())}`;
|
|
844
844
|
}
|
|
845
|
-
function
|
|
845
|
+
function B(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
|
-
const
|
|
850
|
-
function
|
|
851
|
-
const r = n === "hour" ?
|
|
852
|
-
for (let
|
|
853
|
-
|
|
854
|
-
return
|
|
849
|
+
const on = 36e5, sn = 864e5;
|
|
850
|
+
function ts(e, t, n) {
|
|
851
|
+
const r = n === "hour" ? on : sn, o = [];
|
|
852
|
+
for (let i = B(e, n); i <= t; i += r)
|
|
853
|
+
o.push(F(i, n));
|
|
854
|
+
return o;
|
|
855
|
+
}
|
|
856
|
+
const an = /* @__PURE__ */ new Set(["time"]);
|
|
857
|
+
function ns(e, t, n) {
|
|
858
|
+
if (!e) return [];
|
|
859
|
+
const r = new Set(e.supportedDimensions ?? []);
|
|
860
|
+
return t.filter((o) => r.has(o.id) && !an.has(o.id)).map((o) => ({
|
|
861
|
+
id: o.id,
|
|
862
|
+
label: o.label,
|
|
863
|
+
options: o.options?.length ? o.options : n[o.id] ?? []
|
|
864
|
+
})).filter((o) => o.options.length > 0);
|
|
865
|
+
}
|
|
866
|
+
function rs(e, t) {
|
|
867
|
+
const n = t.find((o) => o.id === e.dimensionId), r = n?.options.find((o) => o.value === e.value);
|
|
868
|
+
return `${n?.label ?? e.dimensionId} · ${r?.label ?? e.value}`;
|
|
869
|
+
}
|
|
870
|
+
function os(e) {
|
|
871
|
+
return { value: e.id, label: `${e.category} · ${e.label}` };
|
|
855
872
|
}
|
|
856
|
-
const
|
|
873
|
+
const cn = [
|
|
857
874
|
{ id: "resource", label: "Resource", labelSource: "raw" },
|
|
858
875
|
{ id: "origin", label: "Herkomst", labelSource: "raw" }
|
|
859
|
-
],
|
|
860
|
-
function
|
|
876
|
+
], ln = cn.map((e) => e.id);
|
|
877
|
+
function un(e, t) {
|
|
861
878
|
return `${e}.usage.${t}`;
|
|
862
879
|
}
|
|
863
|
-
function
|
|
880
|
+
function is(e, t) {
|
|
864
881
|
return t.map((n) => ({
|
|
865
|
-
id:
|
|
882
|
+
id: un(e, n.unit),
|
|
866
883
|
label: n.label,
|
|
867
884
|
category: "Verbruik",
|
|
868
885
|
valueType: n.valueType ?? "count",
|
|
869
886
|
aggregation: "sum",
|
|
870
887
|
supportedDimensions: [
|
|
871
888
|
"provider",
|
|
872
|
-
...
|
|
889
|
+
...ln,
|
|
873
890
|
...n.extraDimensions ?? [],
|
|
874
891
|
"time"
|
|
875
892
|
]
|
|
876
893
|
}));
|
|
877
894
|
}
|
|
878
|
-
const
|
|
895
|
+
const mt = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), De = 200, $e = 100, Le = 200, Pe = 12, Ue = 4, gt = 4e3, oe = 500, ss = 256 * 1024, dn = /* @__PURE__ */ new Set([
|
|
879
896
|
"heading",
|
|
880
897
|
"paragraph",
|
|
881
898
|
"list",
|
|
@@ -885,15 +902,15 @@ const Xe = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]
|
|
|
885
902
|
"table",
|
|
886
903
|
"kpi",
|
|
887
904
|
"callout"
|
|
888
|
-
]),
|
|
889
|
-
function
|
|
905
|
+
]), fn = ["http:", "https:", "mailto:", "tel:"], pn = /^[a-z][a-z0-9+.-]*:/i;
|
|
906
|
+
function ht(e) {
|
|
890
907
|
const t = e.trim().replace(/^<|>$/g, "");
|
|
891
908
|
if (!t) return !1;
|
|
892
|
-
const n =
|
|
893
|
-
return n ?
|
|
909
|
+
const n = pn.exec(t)?.[0];
|
|
910
|
+
return n ? fn.includes(n.toLowerCase()) : !t.startsWith("//");
|
|
894
911
|
}
|
|
895
|
-
const
|
|
896
|
-
function
|
|
912
|
+
const mn = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
|
|
913
|
+
function gn(e) {
|
|
897
914
|
let t = "", n = 0;
|
|
898
915
|
for (; n < e.length; ) {
|
|
899
916
|
const r = e[n] === "!" && e[n + 1] === "[";
|
|
@@ -901,194 +918,194 @@ function Vt(e) {
|
|
|
901
918
|
t += e[n], n += 1;
|
|
902
919
|
continue;
|
|
903
920
|
}
|
|
904
|
-
const
|
|
905
|
-
if (
|
|
921
|
+
const o = n + (r ? 2 : 1), i = Ke(e, o, "[", "]");
|
|
922
|
+
if (i < 0 || e[i + 1] !== "(") {
|
|
906
923
|
t += e[n], n += 1;
|
|
907
924
|
continue;
|
|
908
925
|
}
|
|
909
|
-
const
|
|
910
|
-
if (
|
|
926
|
+
const s = Ke(e, i + 2, "(", ")");
|
|
927
|
+
if (s < 0) {
|
|
911
928
|
t += e[n], n += 1;
|
|
912
929
|
continue;
|
|
913
930
|
}
|
|
914
|
-
const
|
|
915
|
-
t += r || !
|
|
931
|
+
const a = e.slice(o, i), l = e.slice(i + 2, s).trim().split(/\s+/)[0] ?? "";
|
|
932
|
+
t += r || !ht(l) ? a : e.slice(n, s + 1), n = s + 1;
|
|
916
933
|
}
|
|
917
934
|
return t;
|
|
918
935
|
}
|
|
919
|
-
function
|
|
920
|
-
let
|
|
921
|
-
for (let
|
|
922
|
-
if (e[
|
|
923
|
-
|
|
936
|
+
function Ke(e, t, n, r) {
|
|
937
|
+
let o = 1;
|
|
938
|
+
for (let i = t; i < e.length; i += 1) {
|
|
939
|
+
if (e[i] === "\\") {
|
|
940
|
+
i += 1;
|
|
924
941
|
continue;
|
|
925
942
|
}
|
|
926
|
-
if (e[
|
|
927
|
-
else if (e[
|
|
928
|
-
return
|
|
943
|
+
if (e[i] === n) o += 1;
|
|
944
|
+
else if (e[i] === r && (o -= 1, o === 0))
|
|
945
|
+
return i;
|
|
929
946
|
}
|
|
930
947
|
return -1;
|
|
931
948
|
}
|
|
932
|
-
function
|
|
933
|
-
return
|
|
934
|
-
|
|
935
|
-
(t, n, r) =>
|
|
949
|
+
function hn(e) {
|
|
950
|
+
return gn(e).replace(
|
|
951
|
+
mn,
|
|
952
|
+
(t, n, r) => ht(r) ? t : ""
|
|
936
953
|
);
|
|
937
954
|
}
|
|
938
|
-
function
|
|
939
|
-
return typeof e == "string" ?
|
|
955
|
+
function v(e, t = gt) {
|
|
956
|
+
return typeof e == "string" ? hn(e).slice(0, t) : "";
|
|
940
957
|
}
|
|
941
|
-
function
|
|
958
|
+
function yn(e, t = gt) {
|
|
942
959
|
return typeof e == "string" ? e.slice(0, t) : "";
|
|
943
960
|
}
|
|
944
|
-
function
|
|
945
|
-
return typeof e == "string" &&
|
|
961
|
+
function bn(e, t = "info") {
|
|
962
|
+
return typeof e == "string" && mt.has(e) ? e : t;
|
|
946
963
|
}
|
|
947
|
-
function
|
|
964
|
+
function as(e, t = () => {
|
|
948
965
|
}) {
|
|
949
966
|
if (!Array.isArray(e)) return [];
|
|
950
967
|
const n = [];
|
|
951
968
|
for (const r of e) {
|
|
952
|
-
if (n.length >=
|
|
953
|
-
t(`more than ${
|
|
969
|
+
if (n.length >= De) {
|
|
970
|
+
t(`more than ${De} blocks; the rest was dropped`);
|
|
954
971
|
break;
|
|
955
972
|
}
|
|
956
973
|
if (!r || typeof r != "object") continue;
|
|
957
|
-
const
|
|
958
|
-
if (!
|
|
959
|
-
t(`unknown block type ${String(
|
|
974
|
+
const o = r;
|
|
975
|
+
if (!dn.has(o.type)) {
|
|
976
|
+
t(`unknown block type ${String(o.type)}`);
|
|
960
977
|
continue;
|
|
961
978
|
}
|
|
962
|
-
const
|
|
963
|
-
switch (
|
|
979
|
+
const i = typeof o.block_id == "string" ? { block_id: o.block_id } : {};
|
|
980
|
+
switch (o.type) {
|
|
964
981
|
case "heading": {
|
|
965
|
-
const
|
|
966
|
-
if (!
|
|
982
|
+
const s = v(o.text);
|
|
983
|
+
if (!s) {
|
|
967
984
|
t("a heading without text");
|
|
968
985
|
continue;
|
|
969
986
|
}
|
|
970
|
-
const
|
|
971
|
-
n.push({ ...
|
|
987
|
+
const a = o.level === 2 || o.level === 3 ? o.level : 1;
|
|
988
|
+
n.push({ ...i, type: "heading", level: a, text: s });
|
|
972
989
|
break;
|
|
973
990
|
}
|
|
974
991
|
case "paragraph": {
|
|
975
|
-
const
|
|
976
|
-
if (!
|
|
992
|
+
const s = v(o.text);
|
|
993
|
+
if (!s) {
|
|
977
994
|
t("a paragraph without text");
|
|
978
995
|
continue;
|
|
979
996
|
}
|
|
980
|
-
n.push({ ...
|
|
997
|
+
n.push({ ...i, type: "paragraph", text: s });
|
|
981
998
|
break;
|
|
982
999
|
}
|
|
983
1000
|
case "quote": {
|
|
984
|
-
const
|
|
985
|
-
if (!
|
|
1001
|
+
const s = v(o.text);
|
|
1002
|
+
if (!s) {
|
|
986
1003
|
t("a quote without text");
|
|
987
1004
|
continue;
|
|
988
1005
|
}
|
|
989
|
-
n.push({ ...
|
|
1006
|
+
n.push({ ...i, type: "quote", text: s });
|
|
990
1007
|
break;
|
|
991
1008
|
}
|
|
992
1009
|
case "code": {
|
|
993
|
-
const
|
|
994
|
-
if (!
|
|
1010
|
+
const s = yn(o.text);
|
|
1011
|
+
if (!s) {
|
|
995
1012
|
t("a code block without text");
|
|
996
1013
|
continue;
|
|
997
1014
|
}
|
|
998
|
-
const
|
|
999
|
-
n.push({ ...
|
|
1015
|
+
const a = typeof o.lang == "string" ? { lang: o.lang.slice(0, 32) } : {};
|
|
1016
|
+
n.push({ ...i, type: "code", ...a, text: s });
|
|
1000
1017
|
break;
|
|
1001
1018
|
}
|
|
1002
1019
|
case "divider":
|
|
1003
|
-
n.push({ ...
|
|
1020
|
+
n.push({ ...i, type: "divider" });
|
|
1004
1021
|
break;
|
|
1005
1022
|
case "list": {
|
|
1006
|
-
const
|
|
1007
|
-
for (const
|
|
1008
|
-
if (
|
|
1009
|
-
t(`more than ${
|
|
1023
|
+
const s = Array.isArray(o.items) ? o.items : [], a = [];
|
|
1024
|
+
for (const d of s) {
|
|
1025
|
+
if (a.length >= $e) {
|
|
1026
|
+
t(`more than ${$e} list items`);
|
|
1010
1027
|
break;
|
|
1011
1028
|
}
|
|
1012
|
-
const
|
|
1013
|
-
if (!
|
|
1014
|
-
const
|
|
1015
|
-
|
|
1029
|
+
const p = v(d?.text);
|
|
1030
|
+
if (!p) continue;
|
|
1031
|
+
const c = v(d?.lead, 200);
|
|
1032
|
+
a.push(c ? { lead: c, text: p } : { text: p });
|
|
1016
1033
|
}
|
|
1017
|
-
if (
|
|
1034
|
+
if (a.length === 0) {
|
|
1018
1035
|
t("a list without usable items");
|
|
1019
1036
|
continue;
|
|
1020
1037
|
}
|
|
1021
|
-
const
|
|
1022
|
-
n.push({ ...
|
|
1038
|
+
const l = o.style === "numbered" ? "numbered" : "bulleted";
|
|
1039
|
+
n.push({ ...i, type: "list", style: l, items: a });
|
|
1023
1040
|
break;
|
|
1024
1041
|
}
|
|
1025
1042
|
case "table": {
|
|
1026
|
-
const
|
|
1027
|
-
for (const
|
|
1028
|
-
if (
|
|
1029
|
-
t(`more than ${
|
|
1043
|
+
const s = Array.isArray(o.columns) ? o.columns : [], a = [];
|
|
1044
|
+
for (const c of s) {
|
|
1045
|
+
if (a.length >= Pe) {
|
|
1046
|
+
t(`more than ${Pe} table columns`);
|
|
1030
1047
|
break;
|
|
1031
1048
|
}
|
|
1032
|
-
const
|
|
1033
|
-
|
|
1049
|
+
const h = v(c?.label, oe), A = c?.align === "right" ? "right" : void 0;
|
|
1050
|
+
a.push(A ? { label: h, align: A } : { label: h });
|
|
1034
1051
|
}
|
|
1035
|
-
if (
|
|
1052
|
+
if (a.length === 0) {
|
|
1036
1053
|
t("a table without columns");
|
|
1037
1054
|
continue;
|
|
1038
1055
|
}
|
|
1039
|
-
const
|
|
1040
|
-
for (const
|
|
1041
|
-
if (
|
|
1042
|
-
t(`more than ${
|
|
1056
|
+
const l = Array.isArray(o.rows) ? o.rows : [], d = [];
|
|
1057
|
+
for (const c of l) {
|
|
1058
|
+
if (d.length >= Le) {
|
|
1059
|
+
t(`more than ${Le} table rows`);
|
|
1043
1060
|
break;
|
|
1044
1061
|
}
|
|
1045
|
-
const
|
|
1046
|
-
|
|
1062
|
+
const h = Array.isArray(c) ? c : [];
|
|
1063
|
+
d.push(a.map((A, E) => v(h[E], oe)));
|
|
1047
1064
|
}
|
|
1048
|
-
const
|
|
1065
|
+
const p = v(o.caption, oe);
|
|
1049
1066
|
n.push({
|
|
1050
|
-
...
|
|
1067
|
+
...i,
|
|
1051
1068
|
type: "table",
|
|
1052
|
-
columns:
|
|
1053
|
-
rows:
|
|
1054
|
-
...
|
|
1069
|
+
columns: a,
|
|
1070
|
+
rows: d,
|
|
1071
|
+
...p ? { caption: p } : {}
|
|
1055
1072
|
});
|
|
1056
1073
|
break;
|
|
1057
1074
|
}
|
|
1058
1075
|
case "kpi": {
|
|
1059
|
-
const
|
|
1060
|
-
for (const
|
|
1061
|
-
if (
|
|
1062
|
-
t(`more than ${
|
|
1076
|
+
const s = Array.isArray(o.items) ? o.items : [], a = [];
|
|
1077
|
+
for (const l of s) {
|
|
1078
|
+
if (a.length >= Ue) {
|
|
1079
|
+
t(`more than ${Ue} kpi items`);
|
|
1063
1080
|
break;
|
|
1064
1081
|
}
|
|
1065
|
-
const
|
|
1066
|
-
if (!
|
|
1067
|
-
const
|
|
1068
|
-
|
|
1069
|
-
typeof
|
|
1082
|
+
const d = v(l?.value, 40), p = v(l?.label, 80);
|
|
1083
|
+
if (!d || !p) continue;
|
|
1084
|
+
const c = l?.tone;
|
|
1085
|
+
a.push(
|
|
1086
|
+
typeof c == "string" && mt.has(c) ? { value: d, label: p, tone: c } : { value: d, label: p }
|
|
1070
1087
|
);
|
|
1071
1088
|
}
|
|
1072
|
-
if (
|
|
1089
|
+
if (a.length === 0) {
|
|
1073
1090
|
t("a kpi block without usable items");
|
|
1074
1091
|
continue;
|
|
1075
1092
|
}
|
|
1076
|
-
n.push({ ...
|
|
1093
|
+
n.push({ ...i, type: "kpi", items: a });
|
|
1077
1094
|
break;
|
|
1078
1095
|
}
|
|
1079
1096
|
case "callout": {
|
|
1080
|
-
const
|
|
1081
|
-
if (!
|
|
1097
|
+
const s = v(o.text);
|
|
1098
|
+
if (!s) {
|
|
1082
1099
|
t("a callout without text");
|
|
1083
1100
|
continue;
|
|
1084
1101
|
}
|
|
1085
|
-
const
|
|
1102
|
+
const a = v(o.title, 200);
|
|
1086
1103
|
n.push({
|
|
1087
|
-
...
|
|
1104
|
+
...i,
|
|
1088
1105
|
type: "callout",
|
|
1089
|
-
tone:
|
|
1090
|
-
...
|
|
1091
|
-
text:
|
|
1106
|
+
tone: bn(o.tone),
|
|
1107
|
+
...a ? { title: a } : {},
|
|
1108
|
+
text: s
|
|
1092
1109
|
});
|
|
1093
1110
|
break;
|
|
1094
1111
|
}
|
|
@@ -1096,28 +1113,28 @@ function co(e, t = () => {
|
|
|
1096
1113
|
}
|
|
1097
1114
|
return n;
|
|
1098
1115
|
}
|
|
1099
|
-
function
|
|
1116
|
+
function cs(e) {
|
|
1100
1117
|
return JSON.stringify(e).length;
|
|
1101
1118
|
}
|
|
1102
|
-
function
|
|
1119
|
+
function ls(e) {
|
|
1103
1120
|
return {
|
|
1104
1121
|
blocks: e.length,
|
|
1105
1122
|
types: e.map((t) => t.type),
|
|
1106
1123
|
headings: e.flatMap((t) => t.type === "heading" ? [t.text] : [])
|
|
1107
1124
|
};
|
|
1108
1125
|
}
|
|
1109
|
-
function
|
|
1126
|
+
function Fe(e) {
|
|
1110
1127
|
return e.replace(/\|/g, "\\|").replace(/\r?\n/g, " ").trim();
|
|
1111
1128
|
}
|
|
1112
|
-
function
|
|
1113
|
-
const r = e.map((
|
|
1129
|
+
function Be(e, t, n) {
|
|
1130
|
+
const r = e.map((o, i) => n?.[i] === "right" ? "---:" : "---");
|
|
1114
1131
|
return [
|
|
1115
|
-
`| ${e.map(
|
|
1132
|
+
`| ${e.map(Fe).join(" | ")} |`,
|
|
1116
1133
|
`| ${r.join(" | ")} |`,
|
|
1117
|
-
...t.map((
|
|
1134
|
+
...t.map((o) => `| ${o.map(Fe).join(" | ")} |`)
|
|
1118
1135
|
];
|
|
1119
1136
|
}
|
|
1120
|
-
function
|
|
1137
|
+
function An(e) {
|
|
1121
1138
|
switch (e.type) {
|
|
1122
1139
|
case "heading":
|
|
1123
1140
|
return [`${"#".repeat(e.level)} ${e.text}`];
|
|
@@ -1135,7 +1152,7 @@ function qt(e) {
|
|
|
1135
1152
|
return t.lead ? `${r} **${t.lead}** ${t.text}` : `${r} ${t.text}`;
|
|
1136
1153
|
});
|
|
1137
1154
|
case "table": {
|
|
1138
|
-
const t =
|
|
1155
|
+
const t = Be(
|
|
1139
1156
|
e.columns.map((n) => n.label),
|
|
1140
1157
|
e.rows,
|
|
1141
1158
|
e.columns.map((n) => n.align ?? "left")
|
|
@@ -1143,7 +1160,7 @@ function qt(e) {
|
|
|
1143
1160
|
return e.caption ? [...t, "", `*${e.caption}*`] : t;
|
|
1144
1161
|
}
|
|
1145
1162
|
case "kpi":
|
|
1146
|
-
return
|
|
1163
|
+
return Be(
|
|
1147
1164
|
e.items.map((t) => t.value),
|
|
1148
1165
|
[e.items.map((t) => t.label)]
|
|
1149
1166
|
);
|
|
@@ -1151,12 +1168,12 @@ function qt(e) {
|
|
|
1151
1168
|
return (e.title ? `**${e.title}** ${e.text}` : e.text).split(/\r?\n/).map((n) => `> ${n}`);
|
|
1152
1169
|
}
|
|
1153
1170
|
}
|
|
1154
|
-
function
|
|
1155
|
-
const n = [], r = e.some((
|
|
1171
|
+
function us(e, t) {
|
|
1172
|
+
const n = [], r = e.some((o) => o.type === "heading" && o.level === 1);
|
|
1156
1173
|
t && !r && n.push(`# ${t}`);
|
|
1157
|
-
for (const
|
|
1158
|
-
const
|
|
1159
|
-
|
|
1174
|
+
for (const o of e) {
|
|
1175
|
+
const i = An(o);
|
|
1176
|
+
i.length > 0 && n.push(i.join(`
|
|
1160
1177
|
`));
|
|
1161
1178
|
}
|
|
1162
1179
|
return `${n.join(`
|
|
@@ -1164,45 +1181,45 @@ function po(e, t) {
|
|
|
1164
1181
|
`)}
|
|
1165
1182
|
`;
|
|
1166
1183
|
}
|
|
1167
|
-
const
|
|
1168
|
-
function
|
|
1184
|
+
const yt = (e) => `user:${e}`, bt = (e) => `team:${e}`;
|
|
1185
|
+
function ds(e) {
|
|
1169
1186
|
const t = /* @__PURE__ */ new Set();
|
|
1170
1187
|
for (const n of e ?? [])
|
|
1171
|
-
n?.id && (n.kind === "user" && t.add(
|
|
1188
|
+
n?.id && (n.kind === "user" && t.add(yt(n.id)), n.kind === "team" && t.add(bt(n.id)));
|
|
1172
1189
|
return [...t].sort();
|
|
1173
1190
|
}
|
|
1174
|
-
function
|
|
1175
|
-
return [
|
|
1191
|
+
function fs(e, t) {
|
|
1192
|
+
return [yt(e), ...t.map(bt)];
|
|
1176
1193
|
}
|
|
1177
|
-
function
|
|
1194
|
+
function ps(e) {
|
|
1178
1195
|
const t = /* @__PURE__ */ new Set();
|
|
1179
1196
|
for (const n of e ?? [])
|
|
1180
1197
|
n?.kind && t.add(n.kind);
|
|
1181
1198
|
return [...t];
|
|
1182
1199
|
}
|
|
1183
|
-
const
|
|
1184
|
-
function
|
|
1185
|
-
return
|
|
1200
|
+
const En = ["done", "escalated"], ms = ["open", "waiting"];
|
|
1201
|
+
function gs(e) {
|
|
1202
|
+
return En.includes(e);
|
|
1186
1203
|
}
|
|
1187
|
-
const
|
|
1188
|
-
function
|
|
1189
|
-
return `${
|
|
1204
|
+
const Sn = "assignment";
|
|
1205
|
+
function hs(e) {
|
|
1206
|
+
return `${Sn}:${e}`;
|
|
1190
1207
|
}
|
|
1191
|
-
function
|
|
1208
|
+
function ys(e, t, n, r) {
|
|
1192
1209
|
if (e.direction === "inbound") return !0;
|
|
1193
1210
|
if (e.author?.type === "user" && e.author.id === t) return !1;
|
|
1194
|
-
const
|
|
1195
|
-
return Array.isArray(
|
|
1211
|
+
const o = e.payload?.mentions;
|
|
1212
|
+
return Array.isArray(o) && o.includes(t) || r && r === t ? !0 : n === "reply";
|
|
1196
1213
|
}
|
|
1197
|
-
function
|
|
1198
|
-
const { targetAuthorId: t, reactorId: n, agentId: r, on:
|
|
1199
|
-
return !
|
|
1214
|
+
function bs(e) {
|
|
1215
|
+
const { targetAuthorId: t, reactorId: n, agentId: r, on: o } = e;
|
|
1216
|
+
return !o || !t || t !== r ? !1 : n !== r;
|
|
1200
1217
|
}
|
|
1201
|
-
function
|
|
1218
|
+
function As(e) {
|
|
1202
1219
|
return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
|
|
1203
1220
|
}
|
|
1204
|
-
const
|
|
1205
|
-
function
|
|
1221
|
+
const _n = 12;
|
|
1222
|
+
function Es(e, t, n = _n) {
|
|
1206
1223
|
const r = t + 1;
|
|
1207
1224
|
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 ? {
|
|
1208
1225
|
status: "escalated",
|
|
@@ -1216,39 +1233,39 @@ function _o(e, t, n = Qt) {
|
|
|
1216
1233
|
reason: "de agent rondde zijn beurt af zonder te zeggen wat er moet gebeuren (wachten, afronden of overdragen)"
|
|
1217
1234
|
};
|
|
1218
1235
|
}
|
|
1219
|
-
const
|
|
1220
|
-
function
|
|
1236
|
+
const Ss = /* @__PURE__ */ new Set(["mail", "message"]);
|
|
1237
|
+
function Tn(e, t) {
|
|
1221
1238
|
const n = e.settings?.signatures?.[t];
|
|
1222
1239
|
return !n?.enabled || !n.body || n.body.trim() === "" ? null : n;
|
|
1223
1240
|
}
|
|
1224
|
-
function
|
|
1241
|
+
function _s(e, t, n, r = "html") {
|
|
1225
1242
|
if (!e) return n;
|
|
1226
|
-
const
|
|
1227
|
-
return
|
|
1243
|
+
const o = Tn(e, t);
|
|
1244
|
+
return o ? `${n}${r === "text" ? `
|
|
1228
1245
|
|
|
1229
|
-
` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${
|
|
1246
|
+
` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${o.body}` : n;
|
|
1230
1247
|
}
|
|
1231
|
-
function
|
|
1248
|
+
function Ts(e) {
|
|
1232
1249
|
return e.endpoints ?? [];
|
|
1233
1250
|
}
|
|
1234
|
-
const
|
|
1251
|
+
const wn = 36e5, In = 864e5, R = -1 / 0, ws = (e) => e.score > R, X = {
|
|
1235
1252
|
urgent: 40,
|
|
1236
1253
|
high: 25,
|
|
1237
1254
|
normal: 10,
|
|
1238
1255
|
low: 0
|
|
1239
1256
|
};
|
|
1240
|
-
function
|
|
1257
|
+
function Is(e) {
|
|
1241
1258
|
return Object.fromEntries(e.map((t) => [t.resourceId, t]));
|
|
1242
1259
|
}
|
|
1243
|
-
const
|
|
1244
|
-
function
|
|
1245
|
-
return !!(e &&
|
|
1260
|
+
const Mn = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, At = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
|
|
1261
|
+
function kn(e, t) {
|
|
1262
|
+
return !!(e && Mn.test(e) || t && At.test(t));
|
|
1246
1263
|
}
|
|
1247
|
-
const
|
|
1248
|
-
function
|
|
1249
|
-
return e >=
|
|
1264
|
+
const vn = 3, On = 600;
|
|
1265
|
+
function Ms(e, t) {
|
|
1266
|
+
return e >= vn || t >= On;
|
|
1250
1267
|
}
|
|
1251
|
-
const
|
|
1268
|
+
const Cn = [
|
|
1252
1269
|
"list-unsubscribe",
|
|
1253
1270
|
"list-unsubscribe-post",
|
|
1254
1271
|
"list-id",
|
|
@@ -1258,93 +1275,93 @@ const cn = [
|
|
|
1258
1275
|
"feedback-id",
|
|
1259
1276
|
"x-mailer"
|
|
1260
1277
|
];
|
|
1261
|
-
function
|
|
1278
|
+
function ks(e) {
|
|
1262
1279
|
const t = {};
|
|
1263
1280
|
for (const n of e) {
|
|
1264
1281
|
const r = n.name?.toLowerCase();
|
|
1265
|
-
r && n.value !== void 0 &&
|
|
1282
|
+
r && n.value !== void 0 && Cn.includes(r) && (t[r] = n.value);
|
|
1266
1283
|
}
|
|
1267
1284
|
return t;
|
|
1268
1285
|
}
|
|
1269
|
-
const
|
|
1270
|
-
function
|
|
1286
|
+
const Nn = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|notifications?|bounce|postmaster|mailer)@/i, xn = /(^|[._+-])(newsletter|nieuwsbrief|marketing|mailing)@/i;
|
|
1287
|
+
function vs(e) {
|
|
1271
1288
|
const t = e.headers ?? {}, n = e.from?.email, r = t["auto-submitted"]?.toLowerCase();
|
|
1272
|
-
if (r && r !== "no" || t["x-auto-response-suppress"] || n &&
|
|
1289
|
+
if (r && r !== "no" || t["x-auto-response-suppress"] || n && Nn.test(n))
|
|
1273
1290
|
return "automated";
|
|
1274
|
-
const
|
|
1275
|
-
if (t["list-unsubscribe"] || t["list-unsubscribe-post"] || t["list-id"] ||
|
|
1291
|
+
const o = t.precedence?.toLowerCase();
|
|
1292
|
+
if (t["list-unsubscribe"] || t["list-unsubscribe-post"] || t["list-id"] || o === "bulk" || o === "list" || e.body && At.test(e.body) || n && xn.test(n))
|
|
1276
1293
|
return "marketing";
|
|
1277
1294
|
}
|
|
1278
|
-
function
|
|
1295
|
+
function Rn(e, t) {
|
|
1279
1296
|
return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
|
|
1280
1297
|
}
|
|
1281
|
-
const
|
|
1298
|
+
const Dn = ["open"], $n = 1e3, Ln = {
|
|
1282
1299
|
urgent: 1,
|
|
1283
1300
|
high: 4,
|
|
1284
1301
|
normal: 8,
|
|
1285
1302
|
low: 24
|
|
1286
|
-
},
|
|
1287
|
-
function
|
|
1288
|
-
return e.lastActivityAt ?? (e.createdAt ? new Date(
|
|
1303
|
+
}, Pn = 72;
|
|
1304
|
+
function Un(e) {
|
|
1305
|
+
return e.lastActivityAt ?? (e.createdAt ? new Date(nn(e)).getTime() : 0);
|
|
1289
1306
|
}
|
|
1290
|
-
function
|
|
1291
|
-
return
|
|
1307
|
+
function Kn(e, t) {
|
|
1308
|
+
return Fn(t.remindersById?.[e.id], e, t.now);
|
|
1292
1309
|
}
|
|
1293
|
-
function
|
|
1310
|
+
function Fn(e, t, n) {
|
|
1294
1311
|
return !e || e.remindAt <= n ? !1 : !((t.lastActivityAt ?? 0) > e.parkedAt && t.lastActivityPreview?.direction === "inbound");
|
|
1295
1312
|
}
|
|
1296
|
-
const
|
|
1297
|
-
function
|
|
1298
|
-
return Math.max(0, (t -
|
|
1313
|
+
const Et = (e) => qt(e) === "outbound_message", St = (e) => Dn.includes(e);
|
|
1314
|
+
function Ee(e, t) {
|
|
1315
|
+
return Math.max(0, (t - Un(e)) / wn);
|
|
1299
1316
|
}
|
|
1300
|
-
function
|
|
1317
|
+
function Bn(e, t) {
|
|
1301
1318
|
const n = e.assignedInboxId ? t?.[e.assignedInboxId] : void 0;
|
|
1302
|
-
return typeof n == "number" && n > 0 ? n :
|
|
1319
|
+
return typeof n == "number" && n > 0 ? n : Ln[e.priority ?? "normal"];
|
|
1303
1320
|
}
|
|
1304
|
-
function
|
|
1321
|
+
function Os(e) {
|
|
1305
1322
|
const t = {};
|
|
1306
1323
|
for (const n of e)
|
|
1307
1324
|
typeof n.slaHours == "number" && n.slaHours > 0 && (t[n.id] = n.slaHours);
|
|
1308
1325
|
return t;
|
|
1309
1326
|
}
|
|
1310
|
-
function
|
|
1311
|
-
return !
|
|
1327
|
+
function Cs(e, t, n) {
|
|
1328
|
+
return !St(e.status) || e.firstResponseAt ? !1 : Ee(e, t) > Bn(e, n);
|
|
1312
1329
|
}
|
|
1313
|
-
function
|
|
1330
|
+
function Hn(e, t) {
|
|
1314
1331
|
const n = e.lastActivityPreview;
|
|
1315
|
-
return n?.direction !== "outbound" || !
|
|
1332
|
+
return n?.direction !== "outbound" || !Et(n.type) ? !1 : Ee(e, t) < Pn;
|
|
1316
1333
|
}
|
|
1317
|
-
function
|
|
1318
|
-
if (!
|
|
1319
|
-
if (e.snoozedTill && e.snoozedTill > t.now) return { score:
|
|
1320
|
-
if (
|
|
1321
|
-
if (
|
|
1334
|
+
function Ns(e, t) {
|
|
1335
|
+
if (!St(e.status)) return { score: R, reasons: [] };
|
|
1336
|
+
if (e.snoozedTill && e.snoozedTill > t.now) return { score: R, reasons: [] };
|
|
1337
|
+
if (Hn(e, t.now)) return { score: R, reasons: [] };
|
|
1338
|
+
if (Kn(e, t)) return { score: R, reasons: [] };
|
|
1322
1339
|
let n = 0;
|
|
1323
|
-
const r = [],
|
|
1324
|
-
|
|
1325
|
-
const
|
|
1326
|
-
if (
|
|
1327
|
-
const
|
|
1328
|
-
n +=
|
|
1340
|
+
const r = [], o = e.priority ?? "normal";
|
|
1341
|
+
X[o] > 0 && (n += X[o], r.push(`priority:${o}`)), Rn(e, t.userId) && (n += 20, r.push("unseen")), e.assignedUserId && e.assignedUserId === t.userId && (n += 15, r.push("assigned-to-you"));
|
|
1342
|
+
const i = Ee(e, t.now);
|
|
1343
|
+
if (i > 0) {
|
|
1344
|
+
const l = Math.min(i * 2, 30);
|
|
1345
|
+
n += l, i >= 1 && r.push(`waiting:${Math.round(i)}h`);
|
|
1329
1346
|
}
|
|
1330
|
-
const
|
|
1331
|
-
return
|
|
1347
|
+
const s = e.lastActivityPreview;
|
|
1348
|
+
return s?.type === "AI_ACTION_PROPOSED" && (n += 30, r.push("awaiting-approval")), s?.direction === "outbound" && Et(s.type) && (n += 10, r.push("no-reply")), !e.firstResponseAt && e.lastActivityPreview?.direction === "inbound" && (n += 10, r.push("awaiting-reply")), (e.tags?.some((l) => l === "marketing" || l === "automated") || kn(e.remoteParty?.resource, e.lastActivityPreview?.snippet)) && (n -= $n, r.push("bulk")), { score: n, reasons: r };
|
|
1332
1349
|
}
|
|
1333
|
-
const
|
|
1350
|
+
const xs = (e) => !!e.assignedUserId || !!e.assignedInboxId, Rs = (e) => e.status === "closed", Ds = (e) => ({
|
|
1334
1351
|
urgent: 10,
|
|
1335
1352
|
high: 5,
|
|
1336
1353
|
normal: 2,
|
|
1337
1354
|
low: 1
|
|
1338
|
-
})[e.priority] || 0,
|
|
1339
|
-
function
|
|
1355
|
+
})[e.priority] || 0, $s = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
|
|
1356
|
+
function Ls(e, t) {
|
|
1340
1357
|
const n = e.labels ?? [];
|
|
1341
1358
|
return n.find((r) => r.locale === t)?.label ?? n[0]?.label ?? e.url;
|
|
1342
1359
|
}
|
|
1343
|
-
function
|
|
1360
|
+
function Ps(e, t, n) {
|
|
1344
1361
|
const r = e.translations ?? [];
|
|
1345
|
-
return r.find((
|
|
1362
|
+
return r.find((o) => o.locale === t) ?? (n ? r.find((o) => o.locale === n) : void 0) ?? { locale: t };
|
|
1346
1363
|
}
|
|
1347
|
-
const
|
|
1364
|
+
const He = [
|
|
1348
1365
|
{ code: "nl", label: "Nederlands", english: "Dutch" },
|
|
1349
1366
|
{ code: "en", label: "English", english: "English" },
|
|
1350
1367
|
{ code: "de", label: "Deutsch", english: "German" },
|
|
@@ -1359,83 +1376,83 @@ const Me = [
|
|
|
1359
1376
|
{ code: "fi", label: "Suomi", english: "Finnish" },
|
|
1360
1377
|
{ code: "tr", label: "Türkçe", english: "Turkish" }
|
|
1361
1378
|
];
|
|
1362
|
-
function
|
|
1379
|
+
function _t(e) {
|
|
1363
1380
|
const t = (e ?? "").toLowerCase();
|
|
1364
|
-
return
|
|
1381
|
+
return He.find((n) => n.code === t) ?? He.find((n) => n.code === t.split("-")[0]);
|
|
1365
1382
|
}
|
|
1366
|
-
function
|
|
1367
|
-
return
|
|
1383
|
+
function Us(e) {
|
|
1384
|
+
return _t(e)?.label ?? e;
|
|
1368
1385
|
}
|
|
1369
|
-
function
|
|
1370
|
-
const t =
|
|
1386
|
+
function Ks(e) {
|
|
1387
|
+
const t = _t(e);
|
|
1371
1388
|
return t ? t.english === t.label ? `${t.english} (${t.code})` : `${t.english} — ${t.label} (${t.code})` : e;
|
|
1372
1389
|
}
|
|
1373
|
-
const
|
|
1374
|
-
function
|
|
1390
|
+
const Tt = 3;
|
|
1391
|
+
function jn(e, t) {
|
|
1375
1392
|
const n = /* @__PURE__ */ new Set();
|
|
1376
|
-
let r = 1,
|
|
1377
|
-
for (;
|
|
1378
|
-
if (n.has(
|
|
1379
|
-
|
|
1393
|
+
let r = 1, o = t.get(e)?.parentId;
|
|
1394
|
+
for (; o; ) {
|
|
1395
|
+
if (n.has(o) || (n.add(o), r++, r > Tt + 1)) return 1 / 0;
|
|
1396
|
+
o = t.get(o)?.parentId;
|
|
1380
1397
|
}
|
|
1381
1398
|
return r;
|
|
1382
1399
|
}
|
|
1383
|
-
function
|
|
1400
|
+
function Fs(e, t, n) {
|
|
1384
1401
|
if (!e) return !0;
|
|
1385
1402
|
if (e === t) return !1;
|
|
1386
|
-
const r = new Map(n.map((
|
|
1387
|
-
if (!r.has(e) || t &&
|
|
1388
|
-
const
|
|
1389
|
-
return
|
|
1403
|
+
const r = new Map(n.map((s) => [s.id, s]));
|
|
1404
|
+
if (!r.has(e) || t && Gn(e, t, r)) return !1;
|
|
1405
|
+
const o = jn(e, r), i = t ? wt(t, n) : 1;
|
|
1406
|
+
return o + i <= Tt;
|
|
1390
1407
|
}
|
|
1391
|
-
function
|
|
1408
|
+
function Gn(e, t, n) {
|
|
1392
1409
|
const r = /* @__PURE__ */ new Set();
|
|
1393
|
-
let
|
|
1394
|
-
for (;
|
|
1395
|
-
if (
|
|
1396
|
-
if (r.has(
|
|
1397
|
-
r.add(
|
|
1410
|
+
let o = n.get(e)?.parentId;
|
|
1411
|
+
for (; o; ) {
|
|
1412
|
+
if (o === t) return !0;
|
|
1413
|
+
if (r.has(o)) return !1;
|
|
1414
|
+
r.add(o), o = n.get(o)?.parentId;
|
|
1398
1415
|
}
|
|
1399
1416
|
return !1;
|
|
1400
1417
|
}
|
|
1401
|
-
function
|
|
1418
|
+
function wt(e, t, n = /* @__PURE__ */ new Set()) {
|
|
1402
1419
|
if (n.has(e)) return 1;
|
|
1403
1420
|
n.add(e);
|
|
1404
|
-
const r = t.filter((
|
|
1405
|
-
return r.length ? 1 + Math.max(...r.map((
|
|
1421
|
+
const r = t.filter((o) => o.parentId === e);
|
|
1422
|
+
return r.length ? 1 + Math.max(...r.map((o) => wt(o.id, t, n))) : 1;
|
|
1406
1423
|
}
|
|
1407
|
-
const
|
|
1408
|
-
function
|
|
1409
|
-
return e.defaultLocale || e.locale ||
|
|
1424
|
+
const Wn = "en";
|
|
1425
|
+
function Vn(e) {
|
|
1426
|
+
return e.defaultLocale || e.locale || Wn;
|
|
1410
1427
|
}
|
|
1411
|
-
function
|
|
1428
|
+
function Bs(e) {
|
|
1412
1429
|
const t = /* @__PURE__ */ new Set(), n = [];
|
|
1413
|
-
for (const r of [
|
|
1430
|
+
for (const r of [Vn(e), ...e.locales ?? []])
|
|
1414
1431
|
!r || t.has(r) || (t.add(r), n.push(r));
|
|
1415
1432
|
return n;
|
|
1416
1433
|
}
|
|
1417
|
-
function
|
|
1434
|
+
function Hs(e, t, n) {
|
|
1418
1435
|
const r = e.translations ?? [];
|
|
1419
|
-
return r.find((
|
|
1436
|
+
return r.find((o) => o.locale === t)?.name ?? (n ? r.find((o) => o.locale === n)?.name : void 0) ?? e.name;
|
|
1420
1437
|
}
|
|
1421
|
-
const
|
|
1422
|
-
function
|
|
1438
|
+
const je = ["lookup", "condition", "parallel", "for-each"];
|
|
1439
|
+
function Ge(e) {
|
|
1423
1440
|
for (const t of e) {
|
|
1424
|
-
if (!
|
|
1425
|
-
return `staptype "${t.type}" mag niet meelezen (alleen ${
|
|
1441
|
+
if (!je.includes(t.type))
|
|
1442
|
+
return `staptype "${t.type}" mag niet meelezen (alleen ${je.join(", ")})`;
|
|
1426
1443
|
if (t.type === "parallel")
|
|
1427
1444
|
for (const n of t.branches ?? []) {
|
|
1428
|
-
const r =
|
|
1445
|
+
const r = Ge(n);
|
|
1429
1446
|
if (r) return r;
|
|
1430
1447
|
}
|
|
1431
1448
|
if (t.type === "for-each") {
|
|
1432
|
-
const n =
|
|
1449
|
+
const n = Ge(t.body ?? []);
|
|
1433
1450
|
if (n) return n;
|
|
1434
1451
|
}
|
|
1435
1452
|
}
|
|
1436
1453
|
return null;
|
|
1437
1454
|
}
|
|
1438
|
-
function
|
|
1455
|
+
function zn(e, t) {
|
|
1439
1456
|
switch (e.kind) {
|
|
1440
1457
|
case "org":
|
|
1441
1458
|
return !0;
|
|
@@ -1445,23 +1462,445 @@ function In(e, t) {
|
|
|
1445
1462
|
return e.userId === t.userId;
|
|
1446
1463
|
}
|
|
1447
1464
|
}
|
|
1448
|
-
function
|
|
1449
|
-
return e.filter((n) => n.enabled &&
|
|
1465
|
+
function js(e, t) {
|
|
1466
|
+
return e.filter((n) => n.enabled && zn(n.ownerScope, t));
|
|
1450
1467
|
}
|
|
1451
|
-
function
|
|
1468
|
+
function Gs(e) {
|
|
1452
1469
|
return e.credentialScope ? e.credentialScope : (e.authMode ?? "header") === "header" || e.oauth?.scope === "org" ? "shared" : "per-user";
|
|
1453
1470
|
}
|
|
1454
|
-
function
|
|
1471
|
+
function Ws(e) {
|
|
1455
1472
|
return `mcp__${e}__`;
|
|
1456
1473
|
}
|
|
1457
|
-
const
|
|
1458
|
-
function
|
|
1474
|
+
const Vs = 1e3, zs = 2e3, Ys = 500, Xs = 12e3, qs = 4e3, Yn = ["contact", "company", "work_item"];
|
|
1475
|
+
function Js(e) {
|
|
1459
1476
|
if (!e) return !1;
|
|
1460
1477
|
const t = e.slice(0, e.indexOf(":"));
|
|
1461
|
-
return
|
|
1478
|
+
return Yn.includes(t);
|
|
1479
|
+
}
|
|
1480
|
+
const Zs = "onboarding-source", Qs = ["support", "billing", "availability", "sales", "onboarding"], ea = ["keep", "replace"], Se = [
|
|
1481
|
+
{
|
|
1482
|
+
key: "shift",
|
|
1483
|
+
label: "kind_shift",
|
|
1484
|
+
capacity: !0,
|
|
1485
|
+
productive: !1,
|
|
1486
|
+
absent: !1,
|
|
1487
|
+
icon: "calendar-clock"
|
|
1488
|
+
},
|
|
1489
|
+
{
|
|
1490
|
+
key: "allocation",
|
|
1491
|
+
label: "kind_allocation",
|
|
1492
|
+
capacity: !1,
|
|
1493
|
+
productive: !0,
|
|
1494
|
+
absent: !1,
|
|
1495
|
+
icon: "briefcase"
|
|
1496
|
+
},
|
|
1497
|
+
{
|
|
1498
|
+
key: "meeting",
|
|
1499
|
+
label: "kind_meeting",
|
|
1500
|
+
capacity: !1,
|
|
1501
|
+
productive: !1,
|
|
1502
|
+
absent: !1,
|
|
1503
|
+
icon: "users"
|
|
1504
|
+
},
|
|
1505
|
+
{
|
|
1506
|
+
key: "travel",
|
|
1507
|
+
label: "kind_travel",
|
|
1508
|
+
capacity: !1,
|
|
1509
|
+
productive: !1,
|
|
1510
|
+
absent: !1,
|
|
1511
|
+
icon: "car"
|
|
1512
|
+
},
|
|
1513
|
+
{
|
|
1514
|
+
key: "training",
|
|
1515
|
+
label: "kind_training",
|
|
1516
|
+
capacity: !1,
|
|
1517
|
+
productive: !1,
|
|
1518
|
+
absent: !1,
|
|
1519
|
+
icon: "graduation-cap"
|
|
1520
|
+
},
|
|
1521
|
+
{
|
|
1522
|
+
key: "break",
|
|
1523
|
+
label: "kind_break",
|
|
1524
|
+
capacity: !1,
|
|
1525
|
+
productive: !1,
|
|
1526
|
+
absent: !1,
|
|
1527
|
+
icon: "coffee"
|
|
1528
|
+
},
|
|
1529
|
+
{
|
|
1530
|
+
key: "absence",
|
|
1531
|
+
label: "kind_absence",
|
|
1532
|
+
capacity: !1,
|
|
1533
|
+
productive: !1,
|
|
1534
|
+
absent: !0,
|
|
1535
|
+
approvable: !0,
|
|
1536
|
+
icon: "palmtree"
|
|
1537
|
+
},
|
|
1538
|
+
{
|
|
1539
|
+
key: "sick",
|
|
1540
|
+
label: "kind_sick",
|
|
1541
|
+
capacity: !1,
|
|
1542
|
+
productive: !1,
|
|
1543
|
+
absent: !0,
|
|
1544
|
+
icon: "thermometer"
|
|
1545
|
+
},
|
|
1546
|
+
{
|
|
1547
|
+
key: "holiday",
|
|
1548
|
+
label: "kind_holiday",
|
|
1549
|
+
capacity: !1,
|
|
1550
|
+
productive: !1,
|
|
1551
|
+
absent: !0,
|
|
1552
|
+
icon: "party-popper"
|
|
1553
|
+
}
|
|
1554
|
+
], Xn = {
|
|
1555
|
+
key: "unknown",
|
|
1556
|
+
label: "kind_unknown",
|
|
1557
|
+
capacity: !1,
|
|
1558
|
+
productive: !1,
|
|
1559
|
+
absent: !1
|
|
1560
|
+
};
|
|
1561
|
+
function $(e, t = Se) {
|
|
1562
|
+
return t.find((n) => n.key === e) ?? { ...Xn, key: e };
|
|
1563
|
+
}
|
|
1564
|
+
function q(e) {
|
|
1565
|
+
return e === "published" || e === "approved";
|
|
1566
|
+
}
|
|
1567
|
+
function qn(e, t, n = Se) {
|
|
1568
|
+
if (e.workstreamId !== t) return !1;
|
|
1569
|
+
const r = $(e.kindKey, n);
|
|
1570
|
+
return r.absent ? !1 : r.productive || r.capacity;
|
|
1571
|
+
}
|
|
1572
|
+
function ta(e, t = Se) {
|
|
1573
|
+
if (!e.userId || !q(e.status)) return !1;
|
|
1574
|
+
const n = $(e.kindKey, t);
|
|
1575
|
+
return n.capacity || n.productive || n.absent;
|
|
1576
|
+
}
|
|
1577
|
+
const Jn = 864e5;
|
|
1578
|
+
function Zn(e, t) {
|
|
1579
|
+
const n = new Date(e), r = new Date(t);
|
|
1580
|
+
return n.setHours(12, 0, 0, 0), r.setHours(12, 0, 0, 0), Math.round((r.getTime() - n.getTime()) / Jn);
|
|
1581
|
+
}
|
|
1582
|
+
function It(e, t) {
|
|
1583
|
+
const n = e.cycleMinutes.length;
|
|
1584
|
+
return n === 0 ? 0 : (Zn(e.anchor, t) % n + n) % n;
|
|
1585
|
+
}
|
|
1586
|
+
function Mt(e, t) {
|
|
1587
|
+
return e.effectiveFrom !== void 0 && t < e.effectiveFrom ? 0 : e.cycleMinutes[It(e, t)] ?? 0;
|
|
1588
|
+
}
|
|
1589
|
+
function kt(e, t) {
|
|
1590
|
+
return e.startTimes?.[It(e, t)];
|
|
1591
|
+
}
|
|
1592
|
+
function vt(e, t, n, r) {
|
|
1593
|
+
const o = e.filter(
|
|
1594
|
+
(a) => a.effectiveFrom === void 0 || a.effectiveFrom <= r
|
|
1595
|
+
), i = (a) => a.sort((l, d) => (d.effectiveFrom ?? 0) - (l.effectiveFrom ?? 0))[0], s = i(o.filter((a) => a.userId === t));
|
|
1596
|
+
return s || i(
|
|
1597
|
+
o.filter((a) => !a.userId && a.teamId && n.includes(a.teamId))
|
|
1598
|
+
);
|
|
1599
|
+
}
|
|
1600
|
+
function Qn(e, t, n) {
|
|
1601
|
+
return e.filter(
|
|
1602
|
+
(r) => r.userId === t && (r.effectiveFrom === void 0 || r.effectiveFrom <= n)
|
|
1603
|
+
).sort((r, o) => (o.effectiveFrom ?? 0) - (r.effectiveFrom ?? 0))[0];
|
|
1604
|
+
}
|
|
1605
|
+
const We = 864e5;
|
|
1606
|
+
function er(e) {
|
|
1607
|
+
const t = new Date(e);
|
|
1608
|
+
return t.setHours(0, 0, 0, 0), t.getTime();
|
|
1609
|
+
}
|
|
1610
|
+
function Ve(e, t, n, r) {
|
|
1611
|
+
const o = Math.min(t, r) - Math.max(e, n);
|
|
1612
|
+
return o > 0 ? o / 1e3 : 0;
|
|
1613
|
+
}
|
|
1614
|
+
const ze = { interval: 0, day: 1, week: 2 };
|
|
1615
|
+
function na(e, t) {
|
|
1616
|
+
const { entries: n, patterns: r = [], terms: o = [] } = t, i = n.filter(
|
|
1617
|
+
(c) => c.userId && q(c.status) && $(c.kindKey).capacity
|
|
1618
|
+
), s = n.filter(
|
|
1619
|
+
(c) => c.userId && q(c.status) && $(c.kindKey).absent
|
|
1620
|
+
), a = t.userIds ?? [
|
|
1621
|
+
.../* @__PURE__ */ new Set([
|
|
1622
|
+
...i.map((c) => c.userId),
|
|
1623
|
+
...r.map((c) => c.userId),
|
|
1624
|
+
...o.map((c) => c.userId)
|
|
1625
|
+
])
|
|
1626
|
+
].filter((c) => !!c), l = {};
|
|
1627
|
+
let d = "interval";
|
|
1628
|
+
const p = (c) => {
|
|
1629
|
+
ze[c] > ze[d] && (d = c);
|
|
1630
|
+
};
|
|
1631
|
+
for (const c of a) {
|
|
1632
|
+
const h = t.teamIdsOf?.(c) ?? [];
|
|
1633
|
+
let A = 0, E = 0, b = 0;
|
|
1634
|
+
for (let u = er(e.from); u < e.to; u += We) {
|
|
1635
|
+
const _ = Math.max(u, e.from), w = Math.min(u + We, e.to);
|
|
1636
|
+
b++;
|
|
1637
|
+
const C = i.filter((I) => I.userId === c).reduce((I, L) => I + Ve(L.start, L.end, _, w), 0);
|
|
1638
|
+
if (C > 0) {
|
|
1639
|
+
A += C;
|
|
1640
|
+
continue;
|
|
1641
|
+
}
|
|
1642
|
+
const k = vt(r, c, h, u), x = k ? Mt(k, u) : 0;
|
|
1643
|
+
if (k && x > 0) {
|
|
1644
|
+
A += x * 60, p(kt(k, u) ? "interval" : "day");
|
|
1645
|
+
continue;
|
|
1646
|
+
}
|
|
1647
|
+
k || E++;
|
|
1648
|
+
}
|
|
1649
|
+
if (E > 0) {
|
|
1650
|
+
const u = Qn(o, c, e.from);
|
|
1651
|
+
u && (A += u.weeklyMinutes * 60 * (E / 7), p("week"));
|
|
1652
|
+
}
|
|
1653
|
+
const T = s.filter((u) => u.userId === c).reduce(
|
|
1654
|
+
(u, _) => u + Ve(_.start, _.end, e.from, e.to),
|
|
1655
|
+
0
|
|
1656
|
+
), f = Math.max(0, A - T);
|
|
1657
|
+
(f > 0 || b > 0) && (l[c] = f);
|
|
1658
|
+
}
|
|
1659
|
+
return {
|
|
1660
|
+
seconds: Object.values(l).reduce((c, h) => c + h, 0),
|
|
1661
|
+
precision: d,
|
|
1662
|
+
byUser: l
|
|
1663
|
+
};
|
|
1664
|
+
}
|
|
1665
|
+
function ra(e, t) {
|
|
1666
|
+
const n = /* @__PURE__ */ new Map();
|
|
1667
|
+
for (const s of e) {
|
|
1668
|
+
const a = s.userId ?? null;
|
|
1669
|
+
n.set(a, (n.get(a) ?? 0) + s.seconds);
|
|
1670
|
+
}
|
|
1671
|
+
const o = [.../* @__PURE__ */ new Set([
|
|
1672
|
+
...Object.keys(t.byUser),
|
|
1673
|
+
...[...n.keys()].filter((s) => s !== null)
|
|
1674
|
+
])].map((s) => {
|
|
1675
|
+
const a = n.get(s) ?? 0, l = t.byUser[s] ?? 0;
|
|
1676
|
+
return {
|
|
1677
|
+
userId: s,
|
|
1678
|
+
requiredSeconds: a,
|
|
1679
|
+
capacitySeconds: l,
|
|
1680
|
+
netSeconds: l - a
|
|
1681
|
+
};
|
|
1682
|
+
});
|
|
1683
|
+
o.sort((s, a) => s.netSeconds - a.netSeconds);
|
|
1684
|
+
const i = n.get(null) ?? 0;
|
|
1685
|
+
return i > 0 && o.push({ userId: null, requiredSeconds: i, capacitySeconds: 0, netSeconds: -i }), o;
|
|
1686
|
+
}
|
|
1687
|
+
const oa = "demand-source", Ye = 1e3;
|
|
1688
|
+
function tr(e, t) {
|
|
1689
|
+
let n = 1;
|
|
1690
|
+
for (let r = 1; r <= e; r++)
|
|
1691
|
+
n = t * n / (r + t * n);
|
|
1692
|
+
return n;
|
|
1693
|
+
}
|
|
1694
|
+
function nr(e, t) {
|
|
1695
|
+
if (e <= 0) return 1;
|
|
1696
|
+
if (t <= 0) return 0;
|
|
1697
|
+
if (e <= t) return 1;
|
|
1698
|
+
const n = tr(e, t), r = t / e;
|
|
1699
|
+
return n / (1 - r * (1 - n));
|
|
1700
|
+
}
|
|
1701
|
+
function rr(e, t, n, r) {
|
|
1702
|
+
return r <= 0 ? 1 : e <= t ? 0 : 1 - nr(e, t) * Math.exp(-(e - t) * n / r);
|
|
1703
|
+
}
|
|
1704
|
+
function or(e, t, n) {
|
|
1705
|
+
return n <= 0 ? 0 : e * t / n;
|
|
1706
|
+
}
|
|
1707
|
+
function ir(e, t, n, r) {
|
|
1708
|
+
if (e <= 0 || t <= 0) return 0;
|
|
1709
|
+
const o = or(e, t, n);
|
|
1710
|
+
if (o <= 0) return 0;
|
|
1711
|
+
const i = r.serviceLevelPercent / 100, s = r.maxOccupancyPercent ? r.maxOccupancyPercent / 100 : void 0;
|
|
1712
|
+
for (let a = Math.max(1, Math.ceil(o)); a <= Ye; a++)
|
|
1713
|
+
if (!(a <= o) && !(rr(a, o, r.targetSeconds, t) < i) && !(s && o / a > s))
|
|
1714
|
+
return a;
|
|
1715
|
+
return Ye;
|
|
1716
|
+
}
|
|
1717
|
+
const sr = 36e5, ar = 864e5;
|
|
1718
|
+
function cr(e) {
|
|
1719
|
+
return e === "day" ? ar : sr;
|
|
1720
|
+
}
|
|
1721
|
+
function ia(e, t) {
|
|
1722
|
+
return e.start < t.end && t.start < e.end;
|
|
1723
|
+
}
|
|
1724
|
+
function ie(e, t, n) {
|
|
1725
|
+
const r = Math.min(e.end, n) - Math.max(e.start, t);
|
|
1726
|
+
return r > 0 ? r / 1e3 : 0;
|
|
1727
|
+
}
|
|
1728
|
+
function lr(e, t, n) {
|
|
1729
|
+
const r = e.handleSeconds ?? 0, o = e.seconds ?? (e.volume !== void 0 ? e.volume * r : 0);
|
|
1730
|
+
if (o <= 0 && !e.volume) return { seconds: 0, headcount: 0 };
|
|
1731
|
+
const i = (t.unplannedLossPercent ?? 0) / 100, s = i > 0 && i < 1 ? 1 / (1 - i) : 1;
|
|
1732
|
+
if (t.model === "queue" && e.volume !== void 0 && r > 0) {
|
|
1733
|
+
const a = ir(e.volume, r, n, t);
|
|
1734
|
+
return { seconds: o, headcount: a * s };
|
|
1735
|
+
}
|
|
1736
|
+
return { seconds: o, headcount: o / n * s };
|
|
1737
|
+
}
|
|
1738
|
+
function sa(e) {
|
|
1739
|
+
const { entries: t, workstreamId: n, staffing: r, demand: o, range: i } = e, s = e.grain ?? "hour", a = cr(s), l = a / 1e3, d = e.kinds, p = t.filter((b) => q(b.status)), c = p.filter((b) => qn(b, n, d)), h = p.filter((b) => $(b.kindKey, d).capacity), A = p.filter((b) => $(b.kindKey, d).absent), E = [];
|
|
1740
|
+
for (let b = B(i.from, s); b < i.to; b += a) {
|
|
1741
|
+
const T = b + a, f = F(b, s);
|
|
1742
|
+
let u = 0;
|
|
1743
|
+
for (const I of c) u += ie(I, b, T);
|
|
1744
|
+
let _ = 0;
|
|
1745
|
+
for (const I of h) _ += ie(I, b, T);
|
|
1746
|
+
let w = 0;
|
|
1747
|
+
for (const I of A) w += ie(I, b, T);
|
|
1748
|
+
const C = o?.[f] ?? {}, k = lr(C, r, l), x = u / l;
|
|
1749
|
+
E.push({
|
|
1750
|
+
period: f,
|
|
1751
|
+
forecastVolume: C.volume,
|
|
1752
|
+
requiredSeconds: k.seconds,
|
|
1753
|
+
requiredHeadcount: k.headcount,
|
|
1754
|
+
scheduledSeconds: u,
|
|
1755
|
+
scheduledHeadcount: x,
|
|
1756
|
+
netHeadcount: x - k.headcount,
|
|
1757
|
+
capacitySeconds: _,
|
|
1758
|
+
absentSeconds: w
|
|
1759
|
+
});
|
|
1760
|
+
}
|
|
1761
|
+
return E;
|
|
1762
|
+
}
|
|
1763
|
+
function ur(e, t) {
|
|
1764
|
+
return e.workTypeKey ?? t?.defaultWorkTypeKey;
|
|
1765
|
+
}
|
|
1766
|
+
function aa(e, t, n) {
|
|
1767
|
+
const r = ur(e, t);
|
|
1768
|
+
return r ? n.find((o) => o.key === r)?.defaultBillable ?? !1 : !1;
|
|
1769
|
+
}
|
|
1770
|
+
function ca(e) {
|
|
1771
|
+
return e.filter(
|
|
1772
|
+
(t) => t.netHeadcount < 0 && t.requiredHeadcount > 0
|
|
1773
|
+
);
|
|
1774
|
+
}
|
|
1775
|
+
const dr = 36e5, de = 6048e5, fr = 8, pr = 0.5, mr = 2;
|
|
1776
|
+
function gr(e) {
|
|
1777
|
+
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;
|
|
1778
|
+
return Date.UTC(t, n - 1, r, o);
|
|
1779
|
+
}
|
|
1780
|
+
function hr(e, t, n) {
|
|
1781
|
+
const r = [];
|
|
1782
|
+
for (let i = 0; i < n; i++) {
|
|
1783
|
+
const s = t - i * de, a = s - de;
|
|
1784
|
+
let l = 0, d = !1;
|
|
1785
|
+
for (const [p, c] of e)
|
|
1786
|
+
p >= a && p < s && (l += c, d = !0);
|
|
1787
|
+
d && r.push(l);
|
|
1788
|
+
}
|
|
1789
|
+
if (r.length < 2) return 1;
|
|
1790
|
+
const o = r.reduce((i, s) => i + s, 0) / r.length;
|
|
1791
|
+
return o <= 0 ? 1 : Math.min(mr, Math.max(pr, r[0] / o));
|
|
1792
|
+
}
|
|
1793
|
+
function yr(e, t) {
|
|
1794
|
+
if (!e?.length) return;
|
|
1795
|
+
let n;
|
|
1796
|
+
for (const r of e)
|
|
1797
|
+
t >= r.from && t < r.to && (n = r);
|
|
1798
|
+
return n;
|
|
1799
|
+
}
|
|
1800
|
+
function la(e, t, n) {
|
|
1801
|
+
const r = Math.max(1, n?.weeks ?? fr), o = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
|
|
1802
|
+
for (const l of e)
|
|
1803
|
+
o.set(gr(l.period), l.value), i.add(l.period.slice(0, 10));
|
|
1804
|
+
const s = hr(o, B(t.from, "hour"), r), a = [];
|
|
1805
|
+
for (let l = B(t.from, "hour"); l < t.to; l += dr) {
|
|
1806
|
+
let d = 0, p = 0;
|
|
1807
|
+
for (let A = 1; A <= r; A++) {
|
|
1808
|
+
const E = l - A * de, T = o.get(E) ?? (i.has(F(E, "day")) ? 0 : void 0);
|
|
1809
|
+
if (T === void 0) continue;
|
|
1810
|
+
const f = r - A + 1;
|
|
1811
|
+
d += T * f, p += f;
|
|
1812
|
+
}
|
|
1813
|
+
let c = p > 0 ? d / p * s : 0;
|
|
1814
|
+
const h = yr(n?.adjustments, l);
|
|
1815
|
+
h?.absoluteVolume !== void 0 ? c = h.absoluteVolume : h?.factor !== void 0 && (c *= h.factor), a.push({ period: F(l, "hour"), volume: c });
|
|
1816
|
+
}
|
|
1817
|
+
return a;
|
|
1818
|
+
}
|
|
1819
|
+
const br = "schedule_entry", Ar = "workstream";
|
|
1820
|
+
function ua(e) {
|
|
1821
|
+
return `${br}:${e}`;
|
|
1822
|
+
}
|
|
1823
|
+
function da(e) {
|
|
1824
|
+
return `${Ar}:${e}`;
|
|
1462
1825
|
}
|
|
1463
|
-
const
|
|
1464
|
-
function
|
|
1826
|
+
const fe = 36e5, P = 864e5;
|
|
1827
|
+
function Er(e, t) {
|
|
1828
|
+
const n = t === "day" ? P : fe, r = [];
|
|
1829
|
+
for (let o = B(e.from, t); o < e.to; o += n) r.push(o);
|
|
1830
|
+
return r;
|
|
1831
|
+
}
|
|
1832
|
+
function Xe(e, t, n, r) {
|
|
1833
|
+
const o = Math.min(t, r) - Math.max(e, n);
|
|
1834
|
+
return o > 0 ? o / 1e3 : 0;
|
|
1835
|
+
}
|
|
1836
|
+
function fa(e, t, n = {}) {
|
|
1837
|
+
const r = n.grain ?? "hour", o = Er(t, r), i = r === "day" ? P : fe, s = new Map(o.map((c) => [c, 0])), a = e.filter((c) => c.userId && $(c.kindKey).capacity), l = n.userIds?.length ? new Set(n.userIds) : null, d = /* @__PURE__ */ new Set();
|
|
1838
|
+
for (const c of a)
|
|
1839
|
+
if (!(l && c.userId && !l.has(c.userId))) {
|
|
1840
|
+
for (const h of o) {
|
|
1841
|
+
const A = Xe(c.start, c.end, h, h + i);
|
|
1842
|
+
A > 0 && s.set(h, (s.get(h) ?? 0) + A);
|
|
1843
|
+
}
|
|
1844
|
+
for (let h = V(c.start); h < c.end; h += P)
|
|
1845
|
+
d.add(`${c.userId}:${V(h)}`);
|
|
1846
|
+
}
|
|
1847
|
+
const p = n.userIds ?? [
|
|
1848
|
+
...new Set(a.map((c) => c.userId).filter(Boolean))
|
|
1849
|
+
];
|
|
1850
|
+
if (n.patterns?.length)
|
|
1851
|
+
for (const c of p) {
|
|
1852
|
+
const h = n.teamIdsOf?.(c) ?? [];
|
|
1853
|
+
for (let A = V(t.from); A < t.to; A += P) {
|
|
1854
|
+
const E = V(A);
|
|
1855
|
+
if (d.has(`${c}:${E}`)) continue;
|
|
1856
|
+
const b = vt(n.patterns, c, h, E);
|
|
1857
|
+
if (!b) continue;
|
|
1858
|
+
const T = Mt(b, E);
|
|
1859
|
+
if (T <= 0) continue;
|
|
1860
|
+
const f = kt(b, E);
|
|
1861
|
+
if (f) {
|
|
1862
|
+
const [w, C] = f.split(":").map(Number), k = E + w * fe + (C ?? 0) * 6e4, x = k + T * 6e4;
|
|
1863
|
+
for (const I of o) {
|
|
1864
|
+
const L = Xe(k, x, I, I + i);
|
|
1865
|
+
L > 0 && s.set(I, (s.get(I) ?? 0) + L);
|
|
1866
|
+
}
|
|
1867
|
+
continue;
|
|
1868
|
+
}
|
|
1869
|
+
const u = o.filter((w) => w >= E && w < E + P);
|
|
1870
|
+
if (!u.length) continue;
|
|
1871
|
+
const _ = T * 60 / u.length;
|
|
1872
|
+
for (const w of u) s.set(w, (s.get(w) ?? 0) + _);
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1875
|
+
return o.map((c) => ({ period: F(c, r), weight: s.get(c) ?? 0 }));
|
|
1876
|
+
}
|
|
1877
|
+
function V(e) {
|
|
1878
|
+
const t = new Date(e);
|
|
1879
|
+
return t.setHours(0, 0, 0, 0), t.getTime();
|
|
1880
|
+
}
|
|
1881
|
+
function Sr(e, t) {
|
|
1882
|
+
if (e <= 0 || !t.length) return [];
|
|
1883
|
+
const n = t.reduce((r, o) => r + Math.max(0, o.weight), 0);
|
|
1884
|
+
if (n <= 0) {
|
|
1885
|
+
const r = e / t.length;
|
|
1886
|
+
return t.map((o) => ({ period: o.period, seconds: r }));
|
|
1887
|
+
}
|
|
1888
|
+
return t.filter((r) => r.weight > 0).map((r) => ({ period: r.period, seconds: e * r.weight / n }));
|
|
1889
|
+
}
|
|
1890
|
+
function pa(e, t, n) {
|
|
1891
|
+
const r = /* @__PURE__ */ new Map();
|
|
1892
|
+
for (const o of e) {
|
|
1893
|
+
const i = o.by ? t.filter((a) => n(a.period) < o.by) : t, s = i.length ? i : t;
|
|
1894
|
+
for (const a of Sr(o.seconds, s)) {
|
|
1895
|
+
const l = `${a.period}|${o.userId ?? ""}`, d = r.get(l);
|
|
1896
|
+
d ? d.seconds += a.seconds : r.set(l, { ...a, userId: o.userId });
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
return [...r.values()].sort(
|
|
1900
|
+
(o, i) => o.period.localeCompare(i.period) || (o.userId ?? "").localeCompare(i.userId ?? "")
|
|
1901
|
+
);
|
|
1902
|
+
}
|
|
1903
|
+
function _r(e) {
|
|
1465
1904
|
switch (e.kind) {
|
|
1466
1905
|
case "user":
|
|
1467
1906
|
return `user:${e.userId}`;
|
|
@@ -1471,22 +1910,22 @@ function kn(e) {
|
|
|
1471
1910
|
return "org";
|
|
1472
1911
|
}
|
|
1473
1912
|
}
|
|
1474
|
-
function
|
|
1913
|
+
function ma(e) {
|
|
1475
1914
|
if (typeof e != "string") return;
|
|
1476
1915
|
const t = e.trim();
|
|
1477
1916
|
if (t === "org") return { kind: "org" };
|
|
1478
1917
|
const n = t.indexOf(":");
|
|
1479
1918
|
if (n <= 0) return;
|
|
1480
|
-
const r = t.slice(0, n),
|
|
1481
|
-
if (
|
|
1482
|
-
if (r === "user") return { kind: "user", userId:
|
|
1483
|
-
if (r === "team") return { kind: "team", teamId:
|
|
1919
|
+
const r = t.slice(0, n), o = t.slice(n + 1).trim();
|
|
1920
|
+
if (o) {
|
|
1921
|
+
if (r === "user") return { kind: "user", userId: o };
|
|
1922
|
+
if (r === "team") return { kind: "team", teamId: o };
|
|
1484
1923
|
}
|
|
1485
1924
|
}
|
|
1486
|
-
function
|
|
1487
|
-
return
|
|
1925
|
+
function Tr(e) {
|
|
1926
|
+
return _r(e);
|
|
1488
1927
|
}
|
|
1489
|
-
function
|
|
1928
|
+
function wr(e) {
|
|
1490
1929
|
switch (e.kind) {
|
|
1491
1930
|
case "personal":
|
|
1492
1931
|
return { kind: "user", userId: e.userId };
|
|
@@ -1496,14 +1935,14 @@ function Cn(e) {
|
|
|
1496
1935
|
return { kind: "org" };
|
|
1497
1936
|
}
|
|
1498
1937
|
}
|
|
1499
|
-
const
|
|
1500
|
-
function
|
|
1501
|
-
return e.agentId ? { kind: "user", userId: e.agentId } :
|
|
1938
|
+
const Ir = wr;
|
|
1939
|
+
function ga(e) {
|
|
1940
|
+
return e.agentId ? { kind: "user", userId: e.agentId } : Ir(e.ownerScope);
|
|
1502
1941
|
}
|
|
1503
|
-
function
|
|
1504
|
-
return
|
|
1942
|
+
function ha(e) {
|
|
1943
|
+
return Tr(e);
|
|
1505
1944
|
}
|
|
1506
|
-
function
|
|
1945
|
+
function ya(e, t) {
|
|
1507
1946
|
if (!t) return;
|
|
1508
1947
|
let n = e;
|
|
1509
1948
|
for (const r of t.split(".")) {
|
|
@@ -1512,24 +1951,24 @@ function aa(e, t) {
|
|
|
1512
1951
|
}
|
|
1513
1952
|
return n;
|
|
1514
1953
|
}
|
|
1515
|
-
function
|
|
1954
|
+
function ba(e, t) {
|
|
1516
1955
|
return e.targets.find((n) => n.activityTypes.includes(t));
|
|
1517
1956
|
}
|
|
1518
|
-
function
|
|
1957
|
+
function Aa(e, t) {
|
|
1519
1958
|
if (t)
|
|
1520
1959
|
return e.targets.find((n) => n.id === t);
|
|
1521
1960
|
}
|
|
1522
|
-
function
|
|
1961
|
+
function Mr(e) {
|
|
1523
1962
|
return e?.kind === "assignment";
|
|
1524
1963
|
}
|
|
1525
|
-
function
|
|
1526
|
-
const { trigger: t, agentId: n, target: r, activityType:
|
|
1527
|
-
return
|
|
1964
|
+
function Ea(e) {
|
|
1965
|
+
const { trigger: t, agentId: n, target: r, activityType: o, assigneeUserId: i, authorUserId: s } = e;
|
|
1966
|
+
return Mr(t) ? n ? r ? r.activityTypes.includes(o) ? i ? i !== n ? "assigned to someone else" : s && s === 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";
|
|
1528
1967
|
}
|
|
1529
|
-
function
|
|
1968
|
+
function Sa(e) {
|
|
1530
1969
|
return (e.startsWith("tool:") ? e.slice(5) : e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
|
|
1531
1970
|
}
|
|
1532
|
-
const
|
|
1971
|
+
const _a = [
|
|
1533
1972
|
{ name: "text", type: "string" },
|
|
1534
1973
|
{ name: "subject", type: "string" },
|
|
1535
1974
|
{ name: "from", type: "string" },
|
|
@@ -1569,7 +2008,7 @@ const da = [
|
|
|
1569
2008
|
// `buildTriggerVars` cannot fill it itself: the job does that with the catalog in hand, before
|
|
1570
2009
|
// the trigger filter runs — like contactId/companyId above.
|
|
1571
2010
|
{ name: "assigneeUserId", type: "string" }
|
|
1572
|
-
],
|
|
2011
|
+
], Ta = {
|
|
1573
2012
|
topics: [
|
|
1574
2013
|
{ name: "topicId", type: "string" },
|
|
1575
2014
|
{ name: "topic", type: "string" },
|
|
@@ -1583,303 +2022,307 @@ const da = [
|
|
|
1583
2022
|
// Deliberately empty: the fields come from `ClassifyStep.fields` and so differ per step.
|
|
1584
2023
|
extract: []
|
|
1585
2024
|
};
|
|
1586
|
-
function
|
|
2025
|
+
function kr(e) {
|
|
1587
2026
|
return `${e.type}:${e.id}`;
|
|
1588
2027
|
}
|
|
1589
|
-
const
|
|
1590
|
-
function
|
|
1591
|
-
return e?.type ===
|
|
2028
|
+
const vr = "interaction";
|
|
2029
|
+
function Or(e) {
|
|
2030
|
+
return e?.type === vr ? e.id : void 0;
|
|
1592
2031
|
}
|
|
1593
|
-
const
|
|
1594
|
-
function
|
|
2032
|
+
const Cr = 64, Nr = 8e3;
|
|
2033
|
+
function wa(e) {
|
|
1595
2034
|
const t = typeof e == "number" ? e : Number(String(e ?? "").trim());
|
|
1596
2035
|
if (!(!Number.isFinite(t) || t <= 0))
|
|
1597
|
-
return Math.min(Math.max(Math.round(t),
|
|
2036
|
+
return Math.min(Math.max(Math.round(t), Cr), Nr);
|
|
1598
2037
|
}
|
|
1599
|
-
const
|
|
1600
|
-
function
|
|
2038
|
+
const Ia = { kind: "workflow", steps: [] };
|
|
2039
|
+
function Ma(e) {
|
|
1601
2040
|
return e?.kind === "workflow" ? e.steps : [];
|
|
1602
2041
|
}
|
|
1603
|
-
function
|
|
2042
|
+
function ka(e) {
|
|
1604
2043
|
return e?.kind === "procedure" ? e.procedure : void 0;
|
|
1605
2044
|
}
|
|
1606
|
-
function
|
|
2045
|
+
function xr(e) {
|
|
1607
2046
|
const t = e?.approved ?? 0, n = t + (e?.rejected ?? 0);
|
|
1608
2047
|
return { total: n, rate: n ? t / n : 0 };
|
|
1609
2048
|
}
|
|
1610
|
-
const
|
|
1611
|
-
function
|
|
1612
|
-
const { total: t, rate: n } =
|
|
1613
|
-
return t >=
|
|
2049
|
+
const Rr = 10, Dr = 0.9;
|
|
2050
|
+
function va(e) {
|
|
2051
|
+
const { total: t, rate: n } = xr(e);
|
|
2052
|
+
return t >= Rr && n >= Dr;
|
|
1614
2053
|
}
|
|
1615
|
-
const
|
|
1616
|
-
function
|
|
1617
|
-
return
|
|
2054
|
+
const $r = ["done", "escalated", "failed", "stopped"];
|
|
2055
|
+
function Oa(e) {
|
|
2056
|
+
return $r.includes(e);
|
|
1618
2057
|
}
|
|
1619
|
-
function
|
|
2058
|
+
function Lr(e) {
|
|
1620
2059
|
return e === "waiting";
|
|
1621
2060
|
}
|
|
1622
|
-
function
|
|
1623
|
-
return e === "running" ||
|
|
2061
|
+
function Ca(e) {
|
|
2062
|
+
return e === "running" || Lr(e);
|
|
1624
2063
|
}
|
|
1625
|
-
function
|
|
2064
|
+
function Ot(e) {
|
|
1626
2065
|
return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
|
|
1627
2066
|
}
|
|
1628
|
-
function
|
|
1629
|
-
const t =
|
|
1630
|
-
return t ?
|
|
2067
|
+
function Na(e) {
|
|
2068
|
+
const t = Ot(e);
|
|
2069
|
+
return t ? kr(t) : void 0;
|
|
1631
2070
|
}
|
|
1632
|
-
function
|
|
1633
|
-
return
|
|
2071
|
+
function xa(e) {
|
|
2072
|
+
return Or(Ot(e));
|
|
1634
2073
|
}
|
|
1635
|
-
function
|
|
2074
|
+
function Ra(e) {
|
|
1636
2075
|
const t = [], n = /* @__PURE__ */ new Map();
|
|
1637
|
-
for (const r of [...e].sort(
|
|
1638
|
-
const
|
|
1639
|
-
if (
|
|
1640
|
-
|
|
2076
|
+
for (const r of [...e].sort(Pr)) {
|
|
2077
|
+
const o = n.get(r.emoji);
|
|
2078
|
+
if (o) {
|
|
2079
|
+
o.push(r.actor);
|
|
1641
2080
|
continue;
|
|
1642
2081
|
}
|
|
1643
2082
|
t.push(r.emoji), n.set(r.emoji, [r.actor]);
|
|
1644
2083
|
}
|
|
1645
2084
|
return t.map((r) => {
|
|
1646
|
-
const
|
|
1647
|
-
return { emoji: r, count:
|
|
1648
|
-
}).sort((r,
|
|
2085
|
+
const o = n.get(r);
|
|
2086
|
+
return { emoji: r, count: o.length, actors: o };
|
|
2087
|
+
}).sort((r, o) => o.count - r.count || t.indexOf(r.emoji) - t.indexOf(o.emoji));
|
|
1649
2088
|
}
|
|
1650
|
-
const
|
|
1651
|
-
function
|
|
2089
|
+
const Pr = (e, t) => (e.createdAt ?? 0) - (t.createdAt ?? 0);
|
|
2090
|
+
function Da(e, t) {
|
|
1652
2091
|
return t ? e.actors.some((n) => n.type === "user" && n.id === t) : !1;
|
|
1653
2092
|
}
|
|
1654
|
-
const
|
|
1655
|
-
function
|
|
2093
|
+
const pe = 6e4, Ur = 36e5, H = 864e5, Ct = 800;
|
|
2094
|
+
function qe(e, t) {
|
|
1656
2095
|
const n = Date.UTC(e, t + 1, 0);
|
|
1657
|
-
return n - new Date(n).getUTCDay() *
|
|
2096
|
+
return n - new Date(n).getUTCDay() * H + Ur;
|
|
1658
2097
|
}
|
|
1659
|
-
function
|
|
2098
|
+
function Kr(e) {
|
|
1660
2099
|
const t = new Date(e).getUTCFullYear();
|
|
1661
|
-
return e >=
|
|
2100
|
+
return e >= qe(t, 2) && e < qe(t, 9);
|
|
1662
2101
|
}
|
|
1663
|
-
function
|
|
1664
|
-
const n = t.dst === "eu" &&
|
|
1665
|
-
return (t.utcOffsetMinutes + n) *
|
|
2102
|
+
function Nt(e, t) {
|
|
2103
|
+
const n = t.dst === "eu" && Kr(e) ? 60 : 0;
|
|
2104
|
+
return (t.utcOffsetMinutes + n) * pe;
|
|
1666
2105
|
}
|
|
1667
|
-
function
|
|
2106
|
+
function Fr(e) {
|
|
1668
2107
|
return (e + 3) % 7 + 1;
|
|
1669
2108
|
}
|
|
1670
|
-
function
|
|
1671
|
-
const n =
|
|
1672
|
-
if (!t.days.includes(
|
|
1673
|
-
const
|
|
2109
|
+
function xt(e, t) {
|
|
2110
|
+
const n = Nt(e, t), r = e + n, o = Math.floor(r / H);
|
|
2111
|
+
if (!t.days.includes(Fr(o))) return null;
|
|
2112
|
+
const i = o * H;
|
|
1674
2113
|
return {
|
|
1675
|
-
open:
|
|
1676
|
-
close:
|
|
2114
|
+
open: i + t.fromMinutes * pe - n,
|
|
2115
|
+
close: i + t.toMinutes * pe - n
|
|
1677
2116
|
};
|
|
1678
2117
|
}
|
|
1679
|
-
function
|
|
1680
|
-
const n =
|
|
1681
|
-
return (Math.floor(r /
|
|
2118
|
+
function Rt(e, t) {
|
|
2119
|
+
const n = Nt(e, t), r = e + n;
|
|
2120
|
+
return (Math.floor(r / H) + 1) * H - n;
|
|
1682
2121
|
}
|
|
1683
|
-
function
|
|
2122
|
+
function me(e, t, n) {
|
|
1684
2123
|
if (t <= e) return 0;
|
|
1685
2124
|
if (!n) return t - e;
|
|
1686
|
-
let r = 0,
|
|
1687
|
-
for (let
|
|
1688
|
-
const
|
|
1689
|
-
if (
|
|
1690
|
-
const
|
|
1691
|
-
|
|
2125
|
+
let r = 0, o = e;
|
|
2126
|
+
for (let i = 0; i < Ct && o < t; i++) {
|
|
2127
|
+
const s = xt(o, n);
|
|
2128
|
+
if (s) {
|
|
2129
|
+
const a = Math.max(o, s.open), l = Math.min(t, s.close);
|
|
2130
|
+
l > a && (r += l - a);
|
|
1692
2131
|
}
|
|
1693
|
-
|
|
2132
|
+
o = Rt(o, n);
|
|
1694
2133
|
}
|
|
1695
2134
|
return r;
|
|
1696
2135
|
}
|
|
1697
|
-
function
|
|
2136
|
+
function _e(e, t, n) {
|
|
1698
2137
|
if (!n) return e + t;
|
|
1699
|
-
let r = t,
|
|
1700
|
-
for (let
|
|
1701
|
-
const
|
|
1702
|
-
if (
|
|
1703
|
-
const
|
|
1704
|
-
if (
|
|
1705
|
-
const
|
|
1706
|
-
if (r <=
|
|
1707
|
-
r -=
|
|
2138
|
+
let r = t, o = e;
|
|
2139
|
+
for (let i = 0; i < Ct; i++) {
|
|
2140
|
+
const s = xt(o, n);
|
|
2141
|
+
if (s) {
|
|
2142
|
+
const a = Math.max(o, s.open);
|
|
2143
|
+
if (s.close > a) {
|
|
2144
|
+
const l = s.close - a;
|
|
2145
|
+
if (r <= l) return a + r;
|
|
2146
|
+
r -= l;
|
|
1708
2147
|
}
|
|
1709
2148
|
}
|
|
1710
|
-
|
|
2149
|
+
o = Rt(o, n);
|
|
1711
2150
|
}
|
|
1712
2151
|
return e + t;
|
|
1713
2152
|
}
|
|
1714
|
-
function
|
|
2153
|
+
function $a(e) {
|
|
1715
2154
|
const t = /^([01]\d|2[0-3]):([0-5]\d)$/.exec(e);
|
|
1716
2155
|
return t ? Number(t[1]) * 60 + Number(t[2]) : null;
|
|
1717
2156
|
}
|
|
1718
|
-
const
|
|
1719
|
-
function
|
|
1720
|
-
return e === "snoozed" ?
|
|
2157
|
+
const ge = 1, he = 2;
|
|
2158
|
+
function La(e) {
|
|
2159
|
+
return e === "snoozed" ? ge : he;
|
|
1721
2160
|
}
|
|
1722
|
-
function
|
|
2161
|
+
function Te(e) {
|
|
1723
2162
|
const t = e.calendar;
|
|
1724
2163
|
return t && Array.isArray(t.days) ? t : null;
|
|
1725
2164
|
}
|
|
1726
|
-
const
|
|
2165
|
+
const Pa = [
|
|
1727
2166
|
"speed_of_answer",
|
|
1728
2167
|
"first_response",
|
|
1729
2168
|
"next_response",
|
|
1730
2169
|
"resolution",
|
|
1731
2170
|
"close"
|
|
1732
|
-
],
|
|
1733
|
-
function
|
|
2171
|
+
], Ua = ["snoozed", "waiting_for_customer"], Br = 6e4, Dt = ["speed_of_answer", "first_response", "next_response"], Hr = [...Dt, "resolution", "close"];
|
|
2172
|
+
function j(e) {
|
|
1734
2173
|
return e.state === "running" || e.state === "paused";
|
|
1735
2174
|
}
|
|
1736
|
-
function
|
|
1737
|
-
return
|
|
1738
|
-
}
|
|
1739
|
-
function
|
|
1740
|
-
return
|
|
1741
|
-
}
|
|
1742
|
-
function
|
|
1743
|
-
if (!
|
|
1744
|
-
const
|
|
1745
|
-
return e.state === "paused" ? { pauseBits:
|
|
1746
|
-
}
|
|
1747
|
-
function
|
|
1748
|
-
if (!
|
|
1749
|
-
const
|
|
1750
|
-
return
|
|
1751
|
-
}
|
|
1752
|
-
function
|
|
1753
|
-
const
|
|
1754
|
-
|
|
1755
|
-
},
|
|
1756
|
-
for (const
|
|
1757
|
-
|
|
1758
|
-
},
|
|
1759
|
-
for (const
|
|
1760
|
-
|
|
1761
|
-
},
|
|
1762
|
-
for (const
|
|
1763
|
-
},
|
|
1764
|
-
for (const
|
|
1765
|
-
},
|
|
1766
|
-
const
|
|
1767
|
-
if (!
|
|
1768
|
-
const
|
|
1769
|
-
|
|
2175
|
+
function jr(e, t) {
|
|
2176
|
+
return j(e) ? { state: (e.state === "paused" ? e.remainingMs > 0 : t <= e.dueAt) ? "hit" : "missed", settledAt: Math.max(t, e.startedAt) } : null;
|
|
2177
|
+
}
|
|
2178
|
+
function Je(e) {
|
|
2179
|
+
return j(e) ? { state: "void" } : null;
|
|
2180
|
+
}
|
|
2181
|
+
function Gr(e, t, n, r) {
|
|
2182
|
+
if (!j(e) || (e.pauseBits & t) !== 0) return null;
|
|
2183
|
+
const o = e.pauseBits | t;
|
|
2184
|
+
return e.state === "paused" ? { pauseBits: o } : { pauseBits: o, state: "paused", remainingMs: me(n, e.dueAt, r) };
|
|
2185
|
+
}
|
|
2186
|
+
function Wr(e, t, n, r) {
|
|
2187
|
+
if (!j(e) || (e.pauseBits & t) === 0) return null;
|
|
2188
|
+
const o = e.pauseBits & ~t;
|
|
2189
|
+
return o !== 0 ? { pauseBits: o } : { pauseBits: o, state: "running", dueAt: _e(n, e.remainingMs, r) };
|
|
2190
|
+
}
|
|
2191
|
+
function Ka({ event: e, at: t, now: n, clocks: r, profile: o }) {
|
|
2192
|
+
const i = Te(o), s = Math.min(t, n), a = r.map((f) => ({ ...f })), l = [], d = (f, u) => {
|
|
2193
|
+
u && (l.push({ op: "patch", clockId: f.id, patch: u }), Object.assign(f, u));
|
|
2194
|
+
}, p = (f) => {
|
|
2195
|
+
for (const u of a)
|
|
2196
|
+
u.metric === f && d(u, jr(u, s));
|
|
2197
|
+
}, c = (f) => {
|
|
2198
|
+
for (const u of a)
|
|
2199
|
+
f.includes(u.metric) && d(u, Je(u));
|
|
2200
|
+
}, h = (f) => {
|
|
2201
|
+
for (const u of a) d(u, Gr(u, f, s, i));
|
|
2202
|
+
}, A = (f) => {
|
|
2203
|
+
for (const u of a) d(u, Wr(u, f, s, i));
|
|
2204
|
+
}, E = (f) => a.reduce((u, _) => _.metric === f ? Math.max(u, _.attempt) : u, 0) + 1, b = (f) => a.some((u) => u.metric === f && j(u)), T = (f, u) => {
|
|
2205
|
+
const _ = o.targets.find((C) => C.metric === f);
|
|
2206
|
+
if (!_) return;
|
|
2207
|
+
const w = _.minutes * Br;
|
|
2208
|
+
l.push({
|
|
1770
2209
|
op: "start",
|
|
1771
|
-
metric:
|
|
1772
|
-
attempt:
|
|
1773
|
-
startedAt:
|
|
1774
|
-
targetMs:
|
|
1775
|
-
dueAt:
|
|
2210
|
+
metric: f,
|
|
2211
|
+
attempt: E(f),
|
|
2212
|
+
startedAt: u,
|
|
2213
|
+
targetMs: w,
|
|
2214
|
+
dueAt: _e(u, w, i)
|
|
1776
2215
|
});
|
|
1777
2216
|
};
|
|
1778
2217
|
switch (e) {
|
|
1779
2218
|
case "apply": {
|
|
1780
|
-
for (const
|
|
1781
|
-
|
|
1782
|
-
for (const
|
|
1783
|
-
if (
|
|
1784
|
-
|
|
1785
|
-
(
|
|
1786
|
-
) ||
|
|
2219
|
+
for (const f of a)
|
|
2220
|
+
f.profileId !== o.id && d(f, Je(f));
|
|
2221
|
+
for (const f of o.targets) {
|
|
2222
|
+
if (f.metric === "next_response") continue;
|
|
2223
|
+
a.some(
|
|
2224
|
+
(_) => _.metric === f.metric && _.profileId === o.id
|
|
2225
|
+
) || T(f.metric, s);
|
|
1787
2226
|
}
|
|
1788
2227
|
break;
|
|
1789
2228
|
}
|
|
1790
2229
|
case "answered":
|
|
1791
|
-
|
|
2230
|
+
p("speed_of_answer");
|
|
1792
2231
|
break;
|
|
1793
2232
|
case "outbound": {
|
|
1794
|
-
|
|
2233
|
+
p("first_response"), p("next_response"), o.pauseOn.includes("waiting_for_customer") && h(he);
|
|
1795
2234
|
break;
|
|
1796
2235
|
}
|
|
1797
2236
|
case "inbound": {
|
|
1798
|
-
|
|
2237
|
+
A(he), !b("first_response") && !b("next_response") && T("next_response", s);
|
|
1799
2238
|
break;
|
|
1800
2239
|
}
|
|
1801
2240
|
case "resolved":
|
|
1802
|
-
|
|
2241
|
+
p("resolution");
|
|
1803
2242
|
break;
|
|
1804
2243
|
case "closed":
|
|
1805
|
-
|
|
2244
|
+
p("close"), p("resolution"), c(Dt);
|
|
1806
2245
|
break;
|
|
1807
2246
|
case "reopened":
|
|
1808
|
-
|
|
2247
|
+
b("resolution") || T("resolution", s), b("close") || T("close", s);
|
|
1809
2248
|
break;
|
|
1810
2249
|
case "snoozed":
|
|
1811
|
-
|
|
2250
|
+
o.pauseOn.includes("snoozed") && h(ge);
|
|
1812
2251
|
break;
|
|
1813
2252
|
case "unsnoozed":
|
|
1814
|
-
|
|
2253
|
+
A(ge);
|
|
1815
2254
|
break;
|
|
1816
2255
|
case "discarded":
|
|
1817
|
-
|
|
2256
|
+
c(Hr);
|
|
1818
2257
|
break;
|
|
1819
2258
|
}
|
|
1820
|
-
return
|
|
2259
|
+
return l;
|
|
1821
2260
|
}
|
|
1822
|
-
function
|
|
2261
|
+
function Vr(e) {
|
|
1823
2262
|
return e.state === "running" || e.state === "paused";
|
|
1824
2263
|
}
|
|
1825
|
-
function
|
|
1826
|
-
const n =
|
|
1827
|
-
return e.state === "paused" ? e.remainingMs : t >= e.dueAt ? -
|
|
2264
|
+
function ye(e, t) {
|
|
2265
|
+
const n = Te(e);
|
|
2266
|
+
return e.state === "paused" ? e.remainingMs : t >= e.dueAt ? -me(e.dueAt, t, n) : me(t, e.dueAt, n);
|
|
1828
2267
|
}
|
|
1829
|
-
function
|
|
1830
|
-
return e.state === "paused" ?
|
|
2268
|
+
function Fa(e, t) {
|
|
2269
|
+
return e.state === "paused" ? _e(t, e.remainingMs, Te(e)) : e.dueAt;
|
|
1831
2270
|
}
|
|
1832
|
-
function
|
|
1833
|
-
const n = e.filter(
|
|
2271
|
+
function Ba(e, t) {
|
|
2272
|
+
const n = e.filter(Vr);
|
|
1834
2273
|
if (!n.length) return;
|
|
1835
|
-
const r = n.filter((
|
|
2274
|
+
const r = n.filter((i) => i.state === "running");
|
|
1836
2275
|
return (r.length ? r : n).reduce(
|
|
1837
|
-
(
|
|
2276
|
+
(i, s) => ye(s, t) < ye(i, t) ? s : i
|
|
1838
2277
|
);
|
|
1839
2278
|
}
|
|
1840
|
-
function
|
|
2279
|
+
function Ha(e, t) {
|
|
1841
2280
|
if (e.state === "missed") return "breached";
|
|
1842
2281
|
if (e.state === "hit") return "met";
|
|
1843
2282
|
if (e.state === "paused") return "paused";
|
|
1844
2283
|
if (e.state === "void") return "met";
|
|
1845
|
-
const n =
|
|
2284
|
+
const n = ye(e, t);
|
|
1846
2285
|
return n <= 0 ? "breached" : n <= e.targetMs / 5 ? "urgent" : "running";
|
|
1847
2286
|
}
|
|
1848
|
-
function
|
|
1849
|
-
const t = Math.floor(Math.abs(e) / 1e3), n = Math.floor(t / 86400), r = Math.floor(t % 86400 / 3600),
|
|
1850
|
-
return n ? r ? `${n}d ${r}u` : `${n}d` : r ?
|
|
2287
|
+
function ja(e) {
|
|
2288
|
+
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);
|
|
2289
|
+
return n ? r ? `${n}d ${r}u` : `${n}d` : r ? o ? `${r}u ${o}m` : `${r}u` : o ? `${o}m` : `${t % 60}s`;
|
|
1851
2290
|
}
|
|
1852
|
-
const
|
|
1853
|
-
function
|
|
1854
|
-
return `${
|
|
2291
|
+
const zr = "strategy_item";
|
|
2292
|
+
function $t(e) {
|
|
2293
|
+
return `${zr}:${e}`;
|
|
1855
2294
|
}
|
|
1856
|
-
function
|
|
1857
|
-
const n = /* @__PURE__ */ new Set([
|
|
2295
|
+
function Ga(e, t = 25) {
|
|
2296
|
+
const n = /* @__PURE__ */ new Set([$t(e.id)]);
|
|
1858
2297
|
for (const r of e.ancestorKeys ?? []) n.add(r);
|
|
1859
2298
|
return Array.from(n).slice(0, t);
|
|
1860
2299
|
}
|
|
1861
|
-
function
|
|
1862
|
-
return e ? [...e.ancestorKeys ?? [],
|
|
2300
|
+
function Wa(e) {
|
|
2301
|
+
return e ? [...e.ancestorKeys ?? [], $t(e.id)] : [];
|
|
1863
2302
|
}
|
|
1864
|
-
const
|
|
2303
|
+
const Q = [
|
|
1865
2304
|
{ key: "area", label: "level_area", order: 10, measurable: !1, icon: "compass" },
|
|
1866
2305
|
{ key: "objective", label: "level_objective", order: 20, measurable: !0, icon: "target" },
|
|
1867
2306
|
{ key: "key_result", label: "level_key_result", order: 30, measurable: !0, icon: "gauge" }
|
|
1868
|
-
],
|
|
1869
|
-
function
|
|
2307
|
+
], Yr = 999, Xr = 7;
|
|
2308
|
+
function qr(e, t = Q) {
|
|
1870
2309
|
return t.find((n) => n.key === e);
|
|
1871
2310
|
}
|
|
1872
|
-
function
|
|
1873
|
-
return
|
|
2311
|
+
function be(e, t = Q) {
|
|
2312
|
+
return qr(e, t)?.order ?? Yr;
|
|
1874
2313
|
}
|
|
1875
|
-
function
|
|
1876
|
-
return
|
|
2314
|
+
function Va(e, t, n = Q) {
|
|
2315
|
+
return be(t, n) <= be(e, n);
|
|
1877
2316
|
}
|
|
1878
|
-
function
|
|
2317
|
+
function za(e, t = Q) {
|
|
2318
|
+
const n = be(e, t);
|
|
2319
|
+
return t.filter((o) => o.order > n).sort((o, i) => o.order - i.order)[0]?.key ?? e;
|
|
2320
|
+
}
|
|
2321
|
+
function Ya(e) {
|
|
1879
2322
|
const t = e.trim().toLowerCase();
|
|
1880
2323
|
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;
|
|
1881
2324
|
}
|
|
1882
|
-
const
|
|
2325
|
+
const Ae = {
|
|
1883
2326
|
pending: "open",
|
|
1884
2327
|
on_track: "open",
|
|
1885
2328
|
at_risk: "open",
|
|
@@ -1888,155 +2331,157 @@ const ne = {
|
|
|
1888
2331
|
achieved: "closed",
|
|
1889
2332
|
missed: "closed"
|
|
1890
2333
|
};
|
|
1891
|
-
function
|
|
1892
|
-
return
|
|
2334
|
+
function Xa(e) {
|
|
2335
|
+
return Ae[e] ?? "open";
|
|
1893
2336
|
}
|
|
1894
|
-
function
|
|
1895
|
-
return Object.keys(
|
|
1896
|
-
(t) => e.includes(
|
|
2337
|
+
function qa(e) {
|
|
2338
|
+
return Object.keys(Ae).filter(
|
|
2339
|
+
(t) => e.includes(Ae[t])
|
|
1897
2340
|
);
|
|
1898
2341
|
}
|
|
1899
|
-
const
|
|
1900
|
-
function
|
|
1901
|
-
const { direction: n } = e, r = e.startValue ?? 0,
|
|
1902
|
-
|
|
2342
|
+
const Jr = 864e5, ee = (e) => e <= 0 ? 0 : e > 1 ? 1 : e;
|
|
2343
|
+
function Ja(e, t) {
|
|
2344
|
+
const { direction: n } = e, r = e.startValue ?? 0, o = e.targetValue ?? 0;
|
|
2345
|
+
if (!Number.isFinite(t)) return 0;
|
|
2346
|
+
const i = n === "down" ? t <= o : t >= o, s = o - r;
|
|
2347
|
+
return (n === "down" ? s < 0 : s > 0) ? ee((t - r) / s) : i ? 1 : 0;
|
|
1903
2348
|
}
|
|
1904
|
-
function
|
|
2349
|
+
function Za(e, t) {
|
|
1905
2350
|
const { startDate: n, targetDate: r } = e;
|
|
1906
2351
|
if (!(typeof n != "number" || typeof r != "number") && !(r <= n))
|
|
1907
|
-
return
|
|
2352
|
+
return ee((t - n) / (r - n));
|
|
1908
2353
|
}
|
|
1909
|
-
const
|
|
1910
|
-
function
|
|
2354
|
+
const Zr = 0.1, Qr = 0.25;
|
|
2355
|
+
function Qa(e, t) {
|
|
1911
2356
|
if (typeof e != "number" || typeof t != "number") return;
|
|
1912
2357
|
if (e >= 1) return "achieved";
|
|
1913
2358
|
const n = t - e;
|
|
1914
|
-
return n >=
|
|
2359
|
+
return n >= Qr ? "off_track" : n >= Zr ? "at_risk" : "on_track";
|
|
1915
2360
|
}
|
|
1916
|
-
function
|
|
2361
|
+
function ec(e, t) {
|
|
1917
2362
|
if (t)
|
|
1918
|
-
return
|
|
2363
|
+
return ee(e / t);
|
|
1919
2364
|
}
|
|
1920
|
-
function
|
|
2365
|
+
function tc(e) {
|
|
1921
2366
|
const t = e.map((n) => n.progress?.ratio).filter((n) => typeof n == "number" && Number.isFinite(n));
|
|
1922
2367
|
if (t.length)
|
|
1923
|
-
return
|
|
2368
|
+
return ee(t.reduce((n, r) => n + r, 0) / t.length);
|
|
1924
2369
|
}
|
|
1925
|
-
function
|
|
2370
|
+
function nc(e, t) {
|
|
1926
2371
|
const n = e.lastCheckInAt ?? e.createdAt;
|
|
1927
2372
|
if (typeof n != "number") return 0;
|
|
1928
|
-
const r = (e.checkInEveryDays ??
|
|
1929
|
-
return
|
|
2373
|
+
const r = (e.checkInEveryDays ?? Xr) * Jr, o = t - n - r;
|
|
2374
|
+
return o > 0 ? o : 0;
|
|
1930
2375
|
}
|
|
1931
|
-
function
|
|
2376
|
+
function rc(e) {
|
|
1932
2377
|
return e.targetDate ?? Number.MAX_SAFE_INTEGER;
|
|
1933
2378
|
}
|
|
1934
|
-
function
|
|
2379
|
+
function oc(e, t) {
|
|
1935
2380
|
const n = e.accumulatedSeconds || 0;
|
|
1936
2381
|
return e.runningSince ? n + Math.max(0, Math.floor((t - e.runningSince) / 1e3)) : n;
|
|
1937
2382
|
}
|
|
1938
|
-
function
|
|
2383
|
+
function ic(e, t) {
|
|
1939
2384
|
const n = Math.max(1, Math.ceil(Math.max(0, e) / 60));
|
|
1940
2385
|
if (!t || t === "exact") return n * 60;
|
|
1941
2386
|
const r = Number(t);
|
|
1942
2387
|
return !Number.isFinite(r) || r <= 0 ? n * 60 : Math.ceil(n / r) * r * 60;
|
|
1943
2388
|
}
|
|
1944
|
-
function
|
|
2389
|
+
function sc(e) {
|
|
1945
2390
|
const t = Math.max(0, Math.round(e / 60));
|
|
1946
2391
|
return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
|
|
1947
2392
|
}
|
|
1948
|
-
function
|
|
1949
|
-
const t = Math.max(0, Math.floor(e)), n = (
|
|
1950
|
-
return
|
|
2393
|
+
function ac(e) {
|
|
2394
|
+
const t = Math.max(0, Math.floor(e)), n = (i) => String(i).padStart(2, "0"), r = Math.floor(t / 60) % 60, o = Math.floor(t / 3600);
|
|
2395
|
+
return o > 0 ? `${o}:${n(r)}:${n(t % 60)}` : `${n(r)}:${n(t % 60)}`;
|
|
1951
2396
|
}
|
|
1952
|
-
function
|
|
2397
|
+
function eo(e) {
|
|
1953
2398
|
return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
|
|
1954
2399
|
}
|
|
1955
|
-
function
|
|
1956
|
-
const n =
|
|
2400
|
+
function cc(e, t) {
|
|
2401
|
+
const n = eo(e) || "werksoort", r = new Set(t);
|
|
1957
2402
|
if (!r.has(n)) return n;
|
|
1958
|
-
for (let
|
|
1959
|
-
const
|
|
1960
|
-
if (!r.has(
|
|
2403
|
+
for (let o = 2; o < 500; o++) {
|
|
2404
|
+
const i = `${n}-${o}`;
|
|
2405
|
+
if (!r.has(i)) return i;
|
|
1961
2406
|
}
|
|
1962
2407
|
return `${n}-${r.size + 1}`;
|
|
1963
2408
|
}
|
|
1964
|
-
function
|
|
2409
|
+
function lc(e, t) {
|
|
1965
2410
|
const n = e.ownerScope;
|
|
1966
2411
|
return !n || n.kind === "org" ? !0 : t.includes(n.teamId);
|
|
1967
2412
|
}
|
|
1968
|
-
function
|
|
1969
|
-
return e.filter((t) => !t.archived).sort(
|
|
2413
|
+
function uc(e) {
|
|
2414
|
+
return e.filter((t) => !t.archived).sort(to);
|
|
1970
2415
|
}
|
|
1971
|
-
function
|
|
2416
|
+
function to(e, t) {
|
|
1972
2417
|
const n = (e.order ?? 0) - (t.order ?? 0);
|
|
1973
2418
|
return n !== 0 ? n : (e.label || "").localeCompare(t.label || "");
|
|
1974
2419
|
}
|
|
1975
|
-
const
|
|
1976
|
-
function
|
|
2420
|
+
const no = 20, ro = 20, se = 300;
|
|
2421
|
+
function D(e) {
|
|
1977
2422
|
return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu, " ").replace(/\s+/g, " ").trim();
|
|
1978
2423
|
}
|
|
1979
|
-
function
|
|
2424
|
+
function oo(e) {
|
|
1980
2425
|
const t = e.replace(/\s+/g, " ").trim();
|
|
1981
|
-
if (t.length <=
|
|
1982
|
-
const n = t.slice(0,
|
|
1983
|
-
return r >
|
|
1984
|
-
}
|
|
1985
|
-
function
|
|
1986
|
-
const n =
|
|
1987
|
-
if (!r || (e.examples ?? []).some((
|
|
1988
|
-
const
|
|
1989
|
-
if (
|
|
1990
|
-
if (i
|
|
1991
|
-
const
|
|
1992
|
-
return
|
|
2426
|
+
if (t.length <= se) return t;
|
|
2427
|
+
const n = t.slice(0, se), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
|
|
2428
|
+
return r > se * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
|
|
2429
|
+
}
|
|
2430
|
+
function dc(e, t) {
|
|
2431
|
+
const n = oo(t.text), r = D(n);
|
|
2432
|
+
if (!r || (e.examples ?? []).some((s) => D(s) === r)) return null;
|
|
2433
|
+
const o = e.exampleCandidates ?? [], i = o.findIndex((s) => D(s.text) === r);
|
|
2434
|
+
if (i >= 0) {
|
|
2435
|
+
if (o[i].corrected || !t.corrected) return null;
|
|
2436
|
+
const s = [...o];
|
|
2437
|
+
return s[i] = { ...s[i], corrected: !0, addedAt: t.addedAt }, Ze(s);
|
|
1993
2438
|
}
|
|
1994
|
-
return
|
|
2439
|
+
return Ze([{ ...t, text: n }, ...o]).slice(0, ro);
|
|
1995
2440
|
}
|
|
1996
|
-
function
|
|
2441
|
+
function Ze(e) {
|
|
1997
2442
|
return [...e].sort(
|
|
1998
2443
|
(t, n) => Number(n.corrected) - Number(t.corrected) || n.addedAt - t.addedAt
|
|
1999
2444
|
);
|
|
2000
2445
|
}
|
|
2001
|
-
function
|
|
2002
|
-
const n =
|
|
2003
|
-
return { examples: r.some((
|
|
2446
|
+
function fc(e, t) {
|
|
2447
|
+
const n = D(t), r = (e.examples ?? []).filter((i) => i.trim());
|
|
2448
|
+
return { examples: r.some((i) => D(i) === n) ? r : [...r, t].slice(-no), exampleCandidates: io(e, t) };
|
|
2004
2449
|
}
|
|
2005
|
-
function
|
|
2006
|
-
const n =
|
|
2007
|
-
return (e.exampleCandidates ?? []).filter((r) =>
|
|
2450
|
+
function io(e, t) {
|
|
2451
|
+
const n = D(t);
|
|
2452
|
+
return (e.exampleCandidates ?? []).filter((r) => D(r.text) !== n);
|
|
2008
2453
|
}
|
|
2009
|
-
function
|
|
2454
|
+
function so(e, t) {
|
|
2010
2455
|
const n = e.ownerScope;
|
|
2011
2456
|
return n ? n.kind === "org" ? !0 : n.kind === "team" ? !!t && n.teamId === t : !1 : !1;
|
|
2012
2457
|
}
|
|
2013
|
-
function
|
|
2014
|
-
return e.filter((n) =>
|
|
2458
|
+
function pc(e, t) {
|
|
2459
|
+
return e.filter((n) => so(n, t));
|
|
2015
2460
|
}
|
|
2016
|
-
function
|
|
2461
|
+
function mc(e) {
|
|
2017
2462
|
return e.type === "agent";
|
|
2018
2463
|
}
|
|
2019
|
-
const
|
|
2020
|
-
function
|
|
2464
|
+
const gc = "WORK_COMMENT_ADDED", hc = "WORK_ITEM_ASSIGNED", yc = "WORK_ITEM_STATUS_CHANGED";
|
|
2465
|
+
function ao(e, t) {
|
|
2021
2466
|
const n = (r) => {
|
|
2022
|
-
const
|
|
2023
|
-
return
|
|
2467
|
+
const o = new Date(r);
|
|
2468
|
+
return o.setHours(0, 0, 0, 0), o.getTime();
|
|
2024
2469
|
};
|
|
2025
|
-
return Math.round((n(e) - n(t)) /
|
|
2470
|
+
return Math.round((n(e) - n(t)) / In);
|
|
2026
2471
|
}
|
|
2027
|
-
function
|
|
2028
|
-
if (e.closedAt != null) return { score:
|
|
2472
|
+
function bc(e, t) {
|
|
2473
|
+
if (e.closedAt != null) return { score: R, reasons: [] };
|
|
2029
2474
|
const n = t.remindersById?.[e.id];
|
|
2030
|
-
if (n && n.remindAt > t.now) return { score:
|
|
2475
|
+
if (n && n.remindAt > t.now) return { score: R, reasons: [] };
|
|
2031
2476
|
let r = 0;
|
|
2032
|
-
const
|
|
2033
|
-
if (
|
|
2034
|
-
const
|
|
2035
|
-
|
|
2477
|
+
const o = [], i = e.priority ?? "normal";
|
|
2478
|
+
if (X[i] > 0 && (r += X[i], o.push(`priority:${i}`)), typeof e.dueDate == "number") {
|
|
2479
|
+
const s = ao(e.dueDate, t.now);
|
|
2480
|
+
s < 0 ? (r += 35, o.push("overdue")) : s === 0 && (r += 20, o.push("due-today"));
|
|
2036
2481
|
}
|
|
2037
|
-
return e.source?.initiator === "system" && e.source.systemReason && (r += 15,
|
|
2482
|
+
return e.source?.initiator === "system" && e.source.systemReason && (r += 15, o.push(`auto:${e.source.systemReason}`)), { score: r, reasons: o };
|
|
2038
2483
|
}
|
|
2039
|
-
const
|
|
2484
|
+
const we = [
|
|
2040
2485
|
{ key: "task", label: "type_task" },
|
|
2041
2486
|
{ key: "bug", label: "type_bug" },
|
|
2042
2487
|
{ key: "story", label: "type_story" },
|
|
@@ -2044,35 +2489,35 @@ const se = [
|
|
|
2044
2489
|
{ key: "subtask", label: "type_subtask" },
|
|
2045
2490
|
{ key: "case", label: "type_case" },
|
|
2046
2491
|
{ key: "deal", label: "type_deal" }
|
|
2047
|
-
],
|
|
2048
|
-
function
|
|
2049
|
-
return e?.types?.length ? e.types :
|
|
2492
|
+
], Ac = we.map((e) => e.key);
|
|
2493
|
+
function Ec(e) {
|
|
2494
|
+
return e?.types?.length ? e.types : we;
|
|
2050
2495
|
}
|
|
2051
|
-
function
|
|
2496
|
+
function Sc(e, t) {
|
|
2052
2497
|
return t.find((n) => n.key === e);
|
|
2053
2498
|
}
|
|
2054
|
-
function
|
|
2499
|
+
function _c(e) {
|
|
2055
2500
|
const t = e.trim().toLowerCase();
|
|
2056
2501
|
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;
|
|
2057
2502
|
}
|
|
2058
|
-
function
|
|
2059
|
-
return e.map((t) =>
|
|
2503
|
+
function Tc(...e) {
|
|
2504
|
+
return e.map((t) => we.find((n) => n.key === t)).filter((t) => !!t);
|
|
2060
2505
|
}
|
|
2061
|
-
const
|
|
2062
|
-
function
|
|
2063
|
-
return `${
|
|
2506
|
+
const co = "work_item", lo = "work_project", uo = "work_activity", wc = "work_cycle";
|
|
2507
|
+
function fo(e) {
|
|
2508
|
+
return `${co}:${e}`;
|
|
2064
2509
|
}
|
|
2065
|
-
function
|
|
2066
|
-
return `${
|
|
2510
|
+
function Lt(e) {
|
|
2511
|
+
return `${lo}:${e}`;
|
|
2067
2512
|
}
|
|
2068
|
-
function
|
|
2069
|
-
return `${
|
|
2513
|
+
function Ic(e) {
|
|
2514
|
+
return `${uo}:${e}`;
|
|
2070
2515
|
}
|
|
2071
|
-
function
|
|
2516
|
+
function Mc(e, t, n) {
|
|
2072
2517
|
const r = `${e}-${t}`;
|
|
2073
2518
|
return n ? `${r}-${n}` : r;
|
|
2074
2519
|
}
|
|
2075
|
-
function
|
|
2520
|
+
function kc(e) {
|
|
2076
2521
|
const t = /^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e || "").trim());
|
|
2077
2522
|
return t ? {
|
|
2078
2523
|
projectKey: t[1].toUpperCase(),
|
|
@@ -2080,78 +2525,78 @@ function gs(e) {
|
|
|
2080
2525
|
...t[3] ? { subSequence: Number(t[3]) } : {}
|
|
2081
2526
|
} : null;
|
|
2082
2527
|
}
|
|
2083
|
-
function
|
|
2528
|
+
function vc(e) {
|
|
2084
2529
|
return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 3) || "PRJ";
|
|
2085
2530
|
}
|
|
2086
|
-
function
|
|
2087
|
-
const n = /* @__PURE__ */ new Set([
|
|
2088
|
-
e.projectId && n.add(
|
|
2531
|
+
function Oc(e, t = 25) {
|
|
2532
|
+
const n = /* @__PURE__ */ new Set([fo(e.id)]);
|
|
2533
|
+
e.projectId && n.add(Lt(e.projectId));
|
|
2089
2534
|
for (const r of e.ancestorKeys ?? []) n.add(r);
|
|
2090
2535
|
for (const r of e.partyKeys ?? []) n.add(r);
|
|
2091
2536
|
return Array.from(n).slice(0, t);
|
|
2092
2537
|
}
|
|
2093
|
-
function
|
|
2094
|
-
return [
|
|
2538
|
+
function Cc(e) {
|
|
2539
|
+
return [Lt(e.id)];
|
|
2095
2540
|
}
|
|
2096
|
-
const
|
|
2541
|
+
const Ie = [
|
|
2097
2542
|
{ key: "open", label: "status_open", category: "todo", order: 0 },
|
|
2098
2543
|
{ key: "in_progress", label: "status_in_progress", category: "in_progress", order: 1 },
|
|
2099
2544
|
{ key: "done", label: "status_done", category: "done", order: 2 },
|
|
2100
2545
|
{ key: "cancelled", label: "status_cancelled", category: "done", order: 3 }
|
|
2101
|
-
],
|
|
2102
|
-
function
|
|
2103
|
-
return e?.statuses?.length ? e.statuses :
|
|
2546
|
+
], Pt = Ie.map((e) => e.key);
|
|
2547
|
+
function po(e) {
|
|
2548
|
+
return e?.statuses?.length ? e.statuses : Ie;
|
|
2104
2549
|
}
|
|
2105
|
-
function
|
|
2550
|
+
function mo(e, t) {
|
|
2106
2551
|
return t.find((n) => n.key === e)?.category ?? "todo";
|
|
2107
2552
|
}
|
|
2108
|
-
function
|
|
2553
|
+
function Nc(e, t) {
|
|
2109
2554
|
return t.find((n) => n.key === e);
|
|
2110
2555
|
}
|
|
2111
|
-
function
|
|
2112
|
-
const t =
|
|
2113
|
-
return n && t.some((r) => r.key === n) ? n :
|
|
2556
|
+
function xc(e) {
|
|
2557
|
+
const t = po(e), n = e?.defaultStatusKey;
|
|
2558
|
+
return n && t.some((r) => r.key === n) ? n : go(t)[0]?.key ?? Ie[0].key;
|
|
2114
2559
|
}
|
|
2115
|
-
function
|
|
2560
|
+
function go(e) {
|
|
2116
2561
|
return [...e].sort((t, n) => {
|
|
2117
2562
|
const r = (t.order ?? 0) - (n.order ?? 0);
|
|
2118
2563
|
return r !== 0 ? r : (t.label || "").localeCompare(n.label || "");
|
|
2119
2564
|
});
|
|
2120
2565
|
}
|
|
2121
|
-
function
|
|
2122
|
-
return
|
|
2566
|
+
function Rc(e, t) {
|
|
2567
|
+
return mo(e, t) === "done";
|
|
2123
2568
|
}
|
|
2124
|
-
function
|
|
2569
|
+
function ho(e) {
|
|
2125
2570
|
return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
|
|
2126
2571
|
}
|
|
2127
|
-
function
|
|
2128
|
-
const n =
|
|
2572
|
+
function Dc(e, t) {
|
|
2573
|
+
const n = ho(e) || "status", r = /* @__PURE__ */ new Set([...t, ...Pt]);
|
|
2129
2574
|
if (!r.has(n)) return n;
|
|
2130
|
-
for (let
|
|
2131
|
-
const
|
|
2132
|
-
if (!r.has(
|
|
2575
|
+
for (let o = 2; o < 500; o++) {
|
|
2576
|
+
const i = `${n}-${o}`;
|
|
2577
|
+
if (!r.has(i)) return i;
|
|
2133
2578
|
}
|
|
2134
2579
|
return `${n}-${r.size + 1}`;
|
|
2135
2580
|
}
|
|
2136
|
-
function
|
|
2581
|
+
function $c(e) {
|
|
2137
2582
|
const t = [];
|
|
2138
2583
|
if (!e.length) return [{ index: -1, reason: "empty" }];
|
|
2139
2584
|
const n = /* @__PURE__ */ new Set();
|
|
2140
|
-
return e.forEach((r,
|
|
2585
|
+
return e.forEach((r, o) => {
|
|
2141
2586
|
if (!r.key) {
|
|
2142
|
-
t.push({ index:
|
|
2587
|
+
t.push({ index: o, reason: "missing_key" });
|
|
2143
2588
|
return;
|
|
2144
2589
|
}
|
|
2145
|
-
|
|
2590
|
+
Pt.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);
|
|
2146
2591
|
}), 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;
|
|
2147
2592
|
}
|
|
2148
|
-
function
|
|
2593
|
+
function Lc(e) {
|
|
2149
2594
|
return e.startDate ?? Number.MAX_SAFE_INTEGER;
|
|
2150
2595
|
}
|
|
2151
|
-
function
|
|
2596
|
+
function Pc(e) {
|
|
2152
2597
|
return e.completedAt ? "completed" : e.startedAt ? "active" : "planned";
|
|
2153
2598
|
}
|
|
2154
|
-
const
|
|
2599
|
+
const yo = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), bo = /* @__PURE__ */ new Set([
|
|
2155
2600
|
"text/plain",
|
|
2156
2601
|
"text/markdown",
|
|
2157
2602
|
"text/csv",
|
|
@@ -2160,115 +2605,115 @@ const Sr = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "ima
|
|
|
2160
2605
|
"application/xml",
|
|
2161
2606
|
"text/xml"
|
|
2162
2607
|
]);
|
|
2163
|
-
function
|
|
2608
|
+
function Ao(e) {
|
|
2164
2609
|
const t = (e ?? "").trim().toLowerCase().split(";")[0];
|
|
2165
|
-
return t ?
|
|
2166
|
-
}
|
|
2167
|
-
const
|
|
2168
|
-
image: 5 *
|
|
2169
|
-
pdf: 20 *
|
|
2170
|
-
text: 1 *
|
|
2171
|
-
audio: 20 *
|
|
2172
|
-
},
|
|
2173
|
-
function
|
|
2174
|
-
const n =
|
|
2175
|
-
return n === "unsupported" ? "unsupported" : t >
|
|
2176
|
-
}
|
|
2177
|
-
function
|
|
2610
|
+
return t ? yo.has(t) ? "image" : t === "application/pdf" ? "pdf" : bo.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
|
|
2611
|
+
}
|
|
2612
|
+
const U = 1024 * 1024, Eo = {
|
|
2613
|
+
image: 5 * U,
|
|
2614
|
+
pdf: 20 * U,
|
|
2615
|
+
text: 1 * U,
|
|
2616
|
+
audio: 20 * U
|
|
2617
|
+
}, Uc = 25 * U, Kc = 5;
|
|
2618
|
+
function Fc(e, t) {
|
|
2619
|
+
const n = Ao(e);
|
|
2620
|
+
return n === "unsupported" ? "unsupported" : t > Eo[n] ? "too-large" : null;
|
|
2621
|
+
}
|
|
2622
|
+
function Bc(e) {
|
|
2178
2623
|
return e.access !== "read" && e.effect !== "internal";
|
|
2179
2624
|
}
|
|
2180
|
-
function
|
|
2625
|
+
function So(e) {
|
|
2181
2626
|
return `${e.kind}:${e.id || e.url || e.title}`;
|
|
2182
2627
|
}
|
|
2183
|
-
function
|
|
2184
|
-
const n = new Set(t), r = [],
|
|
2185
|
-
for (const
|
|
2186
|
-
const
|
|
2187
|
-
n.has(
|
|
2628
|
+
function Hc(e, t = []) {
|
|
2629
|
+
const n = new Set(t), r = [], o = [];
|
|
2630
|
+
for (const i of e) {
|
|
2631
|
+
const s = So(i);
|
|
2632
|
+
n.has(s) || (n.add(s), r.push(i), o.push(s));
|
|
2188
2633
|
}
|
|
2189
|
-
return { sources: r, keys:
|
|
2634
|
+
return { sources: r, keys: o };
|
|
2190
2635
|
}
|
|
2191
|
-
const
|
|
2192
|
-
function
|
|
2636
|
+
const jc = "assist-source", Gc = ["blocking", "due", "open"];
|
|
2637
|
+
function Wc(e, t) {
|
|
2193
2638
|
const [n, r] = (e.subjectKey ?? "").split(":");
|
|
2194
2639
|
return n === t && r ? r : void 0;
|
|
2195
2640
|
}
|
|
2196
|
-
const
|
|
2197
|
-
function
|
|
2198
|
-
return
|
|
2641
|
+
const Qe = { blocking: 0, due: 1, open: 2 };
|
|
2642
|
+
function Vc(e, t) {
|
|
2643
|
+
return Qe[e.band ?? "open"] - Qe[t.band ?? "open"] || (t.priority ?? 0) - (e.priority ?? 0) || e.id.localeCompare(t.id);
|
|
2199
2644
|
}
|
|
2200
|
-
function
|
|
2645
|
+
function zc(e) {
|
|
2201
2646
|
return e.sessions.filter(
|
|
2202
2647
|
(t) => t.id !== e.exceptSessionId && t.state === "connected" && e.canHold(t.providerId)
|
|
2203
2648
|
);
|
|
2204
2649
|
}
|
|
2205
|
-
function
|
|
2650
|
+
function Yc(e) {
|
|
2206
2651
|
return e.sessions.filter(
|
|
2207
2652
|
(t) => t.id !== e.exceptSessionId && t.state === "connected" && !e.canHold(t.providerId)
|
|
2208
2653
|
);
|
|
2209
2654
|
}
|
|
2210
|
-
function
|
|
2655
|
+
function Xc(e) {
|
|
2211
2656
|
return e.sessions.some(
|
|
2212
2657
|
(n) => n.id !== e.exceptSessionId && (n.state === "connected" || n.state === "on_hold")
|
|
2213
2658
|
) ? { admit: !1, reason: "busy" } : { admit: !0 };
|
|
2214
2659
|
}
|
|
2215
|
-
function
|
|
2216
|
-
const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {},
|
|
2217
|
-
if (!e.extraIntents || e.extraIntents.length === 0) return
|
|
2218
|
-
const
|
|
2219
|
-
for (const
|
|
2220
|
-
|
|
2221
|
-
return
|
|
2660
|
+
function _o(e, t) {
|
|
2661
|
+
const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, o = t.intents.filter((s) => !n.has(s.intent)).map((s) => wo(s, r[s.intent]));
|
|
2662
|
+
if (!e.extraIntents || e.extraIntents.length === 0) return o;
|
|
2663
|
+
const i = new Set(o.map((s) => s.intent));
|
|
2664
|
+
for (const s of e.extraIntents)
|
|
2665
|
+
i.has(s.intent) || (o.push(s), i.add(s.intent));
|
|
2666
|
+
return o;
|
|
2222
2667
|
}
|
|
2223
|
-
function
|
|
2668
|
+
function To(e, t) {
|
|
2224
2669
|
const n = {};
|
|
2225
2670
|
for (const r of e.intents) {
|
|
2226
2671
|
if (!r.togglable) continue;
|
|
2227
|
-
const
|
|
2228
|
-
n[r.intent] =
|
|
2672
|
+
const o = t?.[r.intent];
|
|
2673
|
+
n[r.intent] = o ?? r.defaultEnabled ?? !0;
|
|
2229
2674
|
}
|
|
2230
2675
|
return n;
|
|
2231
2676
|
}
|
|
2232
|
-
function
|
|
2233
|
-
const n =
|
|
2677
|
+
function qc(e, t) {
|
|
2678
|
+
const n = To(e, t);
|
|
2234
2679
|
return Object.entries(n).filter(([, r]) => !r).map(([r]) => r);
|
|
2235
2680
|
}
|
|
2236
|
-
function
|
|
2681
|
+
function wo(e, t) {
|
|
2237
2682
|
return t ? {
|
|
2238
2683
|
intent: t.intent ?? e.intent,
|
|
2239
2684
|
targetSchemes: t.targetSchemes ?? e.targetSchemes,
|
|
2240
2685
|
transport: t.transport ?? e.transport
|
|
2241
2686
|
} : e;
|
|
2242
2687
|
}
|
|
2243
|
-
function
|
|
2688
|
+
function Jc(e, t) {
|
|
2244
2689
|
const n = [];
|
|
2245
2690
|
for (const r of e) {
|
|
2246
2691
|
if (!r.enabled) continue;
|
|
2247
|
-
const
|
|
2248
|
-
if (
|
|
2249
|
-
for (const
|
|
2250
|
-
n.push({ channel: r, description:
|
|
2692
|
+
const o = t[r.providerId];
|
|
2693
|
+
if (o)
|
|
2694
|
+
for (const i of _o(r, o))
|
|
2695
|
+
n.push({ channel: r, description: o, capability: i });
|
|
2251
2696
|
}
|
|
2252
2697
|
return n;
|
|
2253
2698
|
}
|
|
2254
|
-
function
|
|
2699
|
+
function Zc(e, t) {
|
|
2255
2700
|
return t.filter((n) => n.capability.intent === e);
|
|
2256
2701
|
}
|
|
2257
|
-
function
|
|
2702
|
+
function Io(e, t) {
|
|
2258
2703
|
return t.filter((n) => n.capability.targetSchemes.includes(e));
|
|
2259
2704
|
}
|
|
2260
|
-
function
|
|
2261
|
-
return
|
|
2705
|
+
function Qc(e, t) {
|
|
2706
|
+
return Io(e.scheme, t);
|
|
2262
2707
|
}
|
|
2263
|
-
function
|
|
2708
|
+
function el(e, t, n) {
|
|
2264
2709
|
const r = [];
|
|
2265
|
-
for (const
|
|
2266
|
-
for (const
|
|
2267
|
-
|
|
2710
|
+
for (const o of e)
|
|
2711
|
+
for (const i of n)
|
|
2712
|
+
i.capability.intent === t && i.capability.targetSchemes.includes(o.scheme) && r.push({ channelIntent: i, endpoint: o });
|
|
2268
2713
|
return r;
|
|
2269
2714
|
}
|
|
2270
|
-
var
|
|
2271
|
-
const
|
|
2715
|
+
var Mo = /* @__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))(Mo || {});
|
|
2716
|
+
const ko = {
|
|
2272
2717
|
mailto: "mail",
|
|
2273
2718
|
sip: "tel",
|
|
2274
2719
|
tel: "tel",
|
|
@@ -2289,10 +2734,10 @@ const Nr = {
|
|
|
2289
2734
|
id: "note",
|
|
2290
2735
|
custom: "note"
|
|
2291
2736
|
};
|
|
2292
|
-
function
|
|
2293
|
-
return e ?
|
|
2737
|
+
function tl(e) {
|
|
2738
|
+
return e ? ko[e] ?? "note" : "note";
|
|
2294
2739
|
}
|
|
2295
|
-
const
|
|
2740
|
+
const nl = "message_window", rl = "message_templates", ol = {
|
|
2296
2741
|
// E-mail
|
|
2297
2742
|
FROM: "from",
|
|
2298
2743
|
TO: "to",
|
|
@@ -2309,39 +2754,39 @@ const Gs = "message_window", Ws = "message_templates", Vs = {
|
|
|
2309
2754
|
// Voice/conference
|
|
2310
2755
|
HOST: "host",
|
|
2311
2756
|
PARTICIPANT: "participant"
|
|
2312
|
-
},
|
|
2757
|
+
}, il = (e, t) => ({ intent: e, ...t }), sl = "folder_management", al = "remote_search", cl = "message_reactions", ll = {
|
|
2313
2758
|
ok: !1,
|
|
2314
2759
|
code: "UNSUPPORTED",
|
|
2315
2760
|
message: "Provider does not support this op"
|
|
2316
|
-
},
|
|
2317
|
-
function
|
|
2761
|
+
}, ul = "connector", dl = "context.collect", y = (e) => ({ type: "string", description: e }), g = (e) => ({ type: "number", description: e }), z = (e) => ({ type: "boolean", description: e }), O = y("Sheet name. Omit for the sheet the user is looking at."), et = y("Slide id, as `inspect` reports it.");
|
|
2762
|
+
function m(e, t, n, r, o, i) {
|
|
2318
2763
|
return {
|
|
2319
2764
|
op: e,
|
|
2320
2765
|
kinds: t,
|
|
2321
2766
|
summary: n,
|
|
2322
|
-
parameters: { type: "object", properties: r, required:
|
|
2323
|
-
undoable:
|
|
2324
|
-
visible:
|
|
2767
|
+
parameters: { type: "object", properties: r, required: o },
|
|
2768
|
+
undoable: i.undoable,
|
|
2769
|
+
visible: i.visible
|
|
2325
2770
|
};
|
|
2326
2771
|
}
|
|
2327
|
-
const
|
|
2328
|
-
|
|
2772
|
+
const K = { undoable: !1, visible: !0 }, S = { undoable: !0, visible: !0 }, tt = { undoable: !1, visible: !0 }, J = { undoable: !1, visible: !1 }, vo = [
|
|
2773
|
+
m(
|
|
2329
2774
|
"pdf.goToPage",
|
|
2330
2775
|
["pdf"],
|
|
2331
2776
|
"Scroll the viewer to a page.",
|
|
2332
|
-
{ page:
|
|
2777
|
+
{ page: g("1-based page number.") },
|
|
2333
2778
|
["page"],
|
|
2334
|
-
|
|
2779
|
+
K
|
|
2335
2780
|
),
|
|
2336
|
-
|
|
2781
|
+
m(
|
|
2337
2782
|
"pdf.search",
|
|
2338
2783
|
["pdf"],
|
|
2339
2784
|
"Search the document and highlight the matches, as the find bar does.",
|
|
2340
|
-
{ query:
|
|
2785
|
+
{ query: y("Text to find."), next: z("Jump to the next match instead of the first.") },
|
|
2341
2786
|
["query"],
|
|
2342
|
-
|
|
2787
|
+
K
|
|
2343
2788
|
),
|
|
2344
|
-
|
|
2789
|
+
m(
|
|
2345
2790
|
"pdf.setTool",
|
|
2346
2791
|
["pdf"],
|
|
2347
2792
|
"Select a markup tool for the user, so their next click draws it.",
|
|
@@ -2353,23 +2798,23 @@ const O = { undoable: !1, visible: !0 }, g = { undoable: !0, visible: !0 }, $e =
|
|
|
2353
2798
|
}
|
|
2354
2799
|
},
|
|
2355
2800
|
["tool"],
|
|
2356
|
-
|
|
2801
|
+
K
|
|
2357
2802
|
),
|
|
2358
|
-
|
|
2803
|
+
m(
|
|
2359
2804
|
"pdf.fillField",
|
|
2360
2805
|
["pdf"],
|
|
2361
2806
|
"Fill one form field of a fillable PDF.",
|
|
2362
2807
|
{
|
|
2363
|
-
field:
|
|
2808
|
+
field: y("Field name, exactly as `inspect` reports it under `fields`."),
|
|
2364
2809
|
value: {
|
|
2365
2810
|
type: ["string", "boolean"],
|
|
2366
2811
|
description: "Text for a text field, true/false for a checkbox or radio."
|
|
2367
2812
|
}
|
|
2368
2813
|
},
|
|
2369
2814
|
["field", "value"],
|
|
2370
|
-
|
|
2815
|
+
S
|
|
2371
2816
|
),
|
|
2372
|
-
|
|
2817
|
+
m(
|
|
2373
2818
|
"pdf.reorderPages",
|
|
2374
2819
|
["pdf"],
|
|
2375
2820
|
"Put the pages in a different order. Pages left out are deleted.",
|
|
@@ -2381,52 +2826,52 @@ const O = { undoable: !1, visible: !0 }, g = { undoable: !0, visible: !0 }, $e =
|
|
|
2381
2826
|
}
|
|
2382
2827
|
},
|
|
2383
2828
|
["order"],
|
|
2384
|
-
|
|
2829
|
+
tt
|
|
2385
2830
|
),
|
|
2386
|
-
|
|
2831
|
+
m(
|
|
2387
2832
|
"pdf.deletePages",
|
|
2388
2833
|
["pdf"],
|
|
2389
2834
|
"Remove pages, keeping the rest in order.",
|
|
2390
2835
|
{ pages: { type: "array", items: { type: "number" }, description: "1-based page numbers." } },
|
|
2391
2836
|
["pages"],
|
|
2392
|
-
|
|
2837
|
+
tt
|
|
2393
2838
|
),
|
|
2394
|
-
|
|
2839
|
+
m(
|
|
2395
2840
|
"pdf.addNote",
|
|
2396
2841
|
["pdf"],
|
|
2397
2842
|
"Place a text note on a page. Written on save; not visible before that.",
|
|
2398
2843
|
{
|
|
2399
|
-
page:
|
|
2400
|
-
text:
|
|
2401
|
-
left:
|
|
2402
|
-
top:
|
|
2403
|
-
width:
|
|
2404
|
-
height:
|
|
2405
|
-
fontSize:
|
|
2844
|
+
page: g("1-based page number."),
|
|
2845
|
+
text: y("The note's text."),
|
|
2846
|
+
left: g("Distance from the left edge, in PDF points (72 per inch)."),
|
|
2847
|
+
top: g("Distance from the top edge, in PDF points."),
|
|
2848
|
+
width: g("Box width in points. Omit for a sensible default."),
|
|
2849
|
+
height: g("Box height in points. Omit for a sensible default."),
|
|
2850
|
+
fontSize: g("Font size in points. Omit for 12.")
|
|
2406
2851
|
},
|
|
2407
2852
|
["page", "text", "left", "top"],
|
|
2408
|
-
|
|
2853
|
+
J
|
|
2409
2854
|
),
|
|
2410
|
-
|
|
2855
|
+
m(
|
|
2411
2856
|
"pdf.highlightText",
|
|
2412
2857
|
["pdf"],
|
|
2413
2858
|
"Highlight a phrase on a page. Written on save; not visible before that.",
|
|
2414
2859
|
{
|
|
2415
|
-
page:
|
|
2416
|
-
text:
|
|
2417
|
-
occurrence:
|
|
2860
|
+
page: g("1-based page number."),
|
|
2861
|
+
text: y("The exact phrase to highlight, as it appears in the page's text."),
|
|
2862
|
+
occurrence: g("Which occurrence on that page, 1-based. Omit for the first.")
|
|
2418
2863
|
},
|
|
2419
2864
|
["page", "text"],
|
|
2420
|
-
|
|
2865
|
+
J
|
|
2421
2866
|
)
|
|
2422
|
-
],
|
|
2423
|
-
|
|
2867
|
+
], Oo = [
|
|
2868
|
+
m(
|
|
2424
2869
|
"sheet.setValues",
|
|
2425
2870
|
["sheet"],
|
|
2426
2871
|
"Write a block of values. The block's shape must match the range.",
|
|
2427
2872
|
{
|
|
2428
|
-
sheet:
|
|
2429
|
-
range:
|
|
2873
|
+
sheet: O,
|
|
2874
|
+
range: y("A1 notation, e.g. `B2:D5` or a single `A1`."),
|
|
2430
2875
|
values: {
|
|
2431
2876
|
type: "array",
|
|
2432
2877
|
items: { type: "array", items: { type: ["string", "number", "boolean", "null"] } },
|
|
@@ -2434,261 +2879,261 @@ const O = { undoable: !1, visible: !0 }, g = { undoable: !0, visible: !0 }, $e =
|
|
|
2434
2879
|
}
|
|
2435
2880
|
},
|
|
2436
2881
|
["range", "values"],
|
|
2437
|
-
|
|
2882
|
+
S
|
|
2438
2883
|
),
|
|
2439
|
-
|
|
2884
|
+
m(
|
|
2440
2885
|
"sheet.setFormula",
|
|
2441
2886
|
["sheet"],
|
|
2442
2887
|
"Put a formula in every cell of a range.",
|
|
2443
|
-
{ sheet:
|
|
2888
|
+
{ sheet: O, range: y("A1 notation."), formula: y("Including the leading `=`.") },
|
|
2444
2889
|
["range", "formula"],
|
|
2445
|
-
|
|
2890
|
+
S
|
|
2446
2891
|
),
|
|
2447
|
-
|
|
2892
|
+
m(
|
|
2448
2893
|
"sheet.setStyle",
|
|
2449
2894
|
["sheet"],
|
|
2450
2895
|
"Change the look of a range. Only the properties you pass are touched.",
|
|
2451
2896
|
{
|
|
2452
|
-
sheet:
|
|
2453
|
-
range:
|
|
2454
|
-
bold:
|
|
2455
|
-
italic:
|
|
2456
|
-
fontSize:
|
|
2457
|
-
fontColor:
|
|
2458
|
-
background:
|
|
2897
|
+
sheet: O,
|
|
2898
|
+
range: y("A1 notation."),
|
|
2899
|
+
bold: z("Bold on or off."),
|
|
2900
|
+
italic: z("Italic on or off."),
|
|
2901
|
+
fontSize: g("Point size."),
|
|
2902
|
+
fontColor: y("CSS colour, e.g. `#b91c1c`."),
|
|
2903
|
+
background: y("CSS colour for the cell fill."),
|
|
2459
2904
|
horizontalAlignment: {
|
|
2460
2905
|
type: "string",
|
|
2461
2906
|
enum: ["left", "center", "right"],
|
|
2462
2907
|
description: "Horizontal alignment."
|
|
2463
2908
|
},
|
|
2464
|
-
numberFormat:
|
|
2909
|
+
numberFormat: y("Number format pattern, e.g. `#,##0.00` or `0%`.")
|
|
2465
2910
|
},
|
|
2466
2911
|
["range"],
|
|
2467
|
-
|
|
2912
|
+
S
|
|
2468
2913
|
),
|
|
2469
|
-
|
|
2914
|
+
m(
|
|
2470
2915
|
"sheet.insertRows",
|
|
2471
2916
|
["sheet"],
|
|
2472
2917
|
"Insert empty rows, pushing the rest down.",
|
|
2473
2918
|
{
|
|
2474
|
-
sheet:
|
|
2475
|
-
at:
|
|
2476
|
-
count:
|
|
2919
|
+
sheet: O,
|
|
2920
|
+
at: g("1-based row number to insert before."),
|
|
2921
|
+
count: g("How many. Omit for 1.")
|
|
2477
2922
|
},
|
|
2478
2923
|
["at"],
|
|
2479
|
-
|
|
2924
|
+
S
|
|
2480
2925
|
),
|
|
2481
|
-
|
|
2926
|
+
m(
|
|
2482
2927
|
"sheet.deleteRows",
|
|
2483
2928
|
["sheet"],
|
|
2484
2929
|
"Delete rows, pulling the rest up.",
|
|
2485
|
-
{ sheet:
|
|
2930
|
+
{ sheet: O, at: g("1-based first row to delete."), count: g("How many. Omit for 1.") },
|
|
2486
2931
|
["at"],
|
|
2487
|
-
|
|
2932
|
+
S
|
|
2488
2933
|
),
|
|
2489
|
-
|
|
2934
|
+
m(
|
|
2490
2935
|
"sheet.insertColumns",
|
|
2491
2936
|
["sheet"],
|
|
2492
2937
|
"Insert empty columns, pushing the rest right.",
|
|
2493
2938
|
{
|
|
2494
|
-
sheet:
|
|
2495
|
-
at:
|
|
2496
|
-
count:
|
|
2939
|
+
sheet: O,
|
|
2940
|
+
at: g("1-based column number to insert before."),
|
|
2941
|
+
count: g("How many. Omit for 1.")
|
|
2497
2942
|
},
|
|
2498
2943
|
["at"],
|
|
2499
|
-
|
|
2944
|
+
S
|
|
2500
2945
|
),
|
|
2501
|
-
|
|
2946
|
+
m(
|
|
2502
2947
|
"sheet.deleteColumns",
|
|
2503
2948
|
["sheet"],
|
|
2504
2949
|
"Delete columns, pulling the rest left.",
|
|
2505
2950
|
{
|
|
2506
|
-
sheet:
|
|
2507
|
-
at:
|
|
2508
|
-
count:
|
|
2951
|
+
sheet: O,
|
|
2952
|
+
at: g("1-based first column to delete."),
|
|
2953
|
+
count: g("How many. Omit for 1.")
|
|
2509
2954
|
},
|
|
2510
2955
|
["at"],
|
|
2511
|
-
|
|
2956
|
+
S
|
|
2512
2957
|
),
|
|
2513
|
-
|
|
2958
|
+
m(
|
|
2514
2959
|
"sheet.merge",
|
|
2515
2960
|
["sheet"],
|
|
2516
2961
|
"Merge a range into one cell.",
|
|
2517
|
-
{ sheet:
|
|
2962
|
+
{ sheet: O, range: y("A1 notation.") },
|
|
2518
2963
|
["range"],
|
|
2519
|
-
|
|
2964
|
+
S
|
|
2520
2965
|
),
|
|
2521
|
-
|
|
2966
|
+
m(
|
|
2522
2967
|
"sheet.unmerge",
|
|
2523
2968
|
["sheet"],
|
|
2524
2969
|
"Break merged cells in a range apart.",
|
|
2525
|
-
{ sheet:
|
|
2970
|
+
{ sheet: O, range: y("A1 notation.") },
|
|
2526
2971
|
["range"],
|
|
2527
|
-
|
|
2972
|
+
S
|
|
2528
2973
|
),
|
|
2529
|
-
|
|
2974
|
+
m(
|
|
2530
2975
|
"sheet.sort",
|
|
2531
2976
|
["sheet"],
|
|
2532
2977
|
"Sort a range on one of its columns.",
|
|
2533
2978
|
{
|
|
2534
|
-
sheet:
|
|
2535
|
-
range:
|
|
2536
|
-
column:
|
|
2537
|
-
ascending:
|
|
2979
|
+
sheet: O,
|
|
2980
|
+
range: y("A1 notation covering the rows to sort, header excluded."),
|
|
2981
|
+
column: g("1-based column *within the range*, not within the sheet."),
|
|
2982
|
+
ascending: z("Ascending. Omit for ascending.")
|
|
2538
2983
|
},
|
|
2539
2984
|
["range", "column"],
|
|
2540
|
-
|
|
2985
|
+
S
|
|
2541
2986
|
),
|
|
2542
|
-
|
|
2987
|
+
m(
|
|
2543
2988
|
"sheet.insertSheet",
|
|
2544
2989
|
["sheet"],
|
|
2545
2990
|
"Add a new sheet.",
|
|
2546
|
-
{ name:
|
|
2991
|
+
{ name: y("Name for the new sheet.") },
|
|
2547
2992
|
["name"],
|
|
2548
|
-
|
|
2993
|
+
S
|
|
2549
2994
|
),
|
|
2550
|
-
|
|
2995
|
+
m(
|
|
2551
2996
|
"sheet.renameSheet",
|
|
2552
2997
|
["sheet"],
|
|
2553
2998
|
"Rename a sheet.",
|
|
2554
|
-
{ sheet:
|
|
2999
|
+
{ sheet: y("Current name."), name: y("New name.") },
|
|
2555
3000
|
["sheet", "name"],
|
|
2556
|
-
|
|
3001
|
+
S
|
|
2557
3002
|
),
|
|
2558
|
-
|
|
3003
|
+
m(
|
|
2559
3004
|
"sheet.deleteSheet",
|
|
2560
3005
|
["sheet"],
|
|
2561
3006
|
"Remove a sheet and everything on it.",
|
|
2562
|
-
{ sheet:
|
|
3007
|
+
{ sheet: y("Name of the sheet to delete.") },
|
|
2563
3008
|
["sheet"],
|
|
2564
|
-
|
|
3009
|
+
S
|
|
2565
3010
|
),
|
|
2566
|
-
|
|
3011
|
+
m(
|
|
2567
3012
|
"sheet.activate",
|
|
2568
3013
|
["sheet"],
|
|
2569
3014
|
"Show the user a sheet and select a range on it.",
|
|
2570
|
-
{ sheet:
|
|
3015
|
+
{ sheet: O, range: y("A1 notation to select. Omit to only switch sheets.") },
|
|
2571
3016
|
[],
|
|
2572
|
-
|
|
3017
|
+
K
|
|
2573
3018
|
)
|
|
2574
|
-
],
|
|
2575
|
-
|
|
3019
|
+
], Co = [
|
|
3020
|
+
m(
|
|
2576
3021
|
"word.replaceParagraph",
|
|
2577
3022
|
["word"],
|
|
2578
3023
|
"Rewrite one whole paragraph, keeping its style. This is the verb for shortening or rephrasing something; call it once per paragraph.",
|
|
2579
3024
|
{
|
|
2580
|
-
at:
|
|
2581
|
-
text:
|
|
3025
|
+
at: g("The offset the paragraph starts at, exactly as `inspect` prints it."),
|
|
3026
|
+
text: y("The new text for that paragraph. A newline starts a further paragraph.")
|
|
2582
3027
|
},
|
|
2583
3028
|
["at", "text"],
|
|
2584
|
-
|
|
3029
|
+
S
|
|
2585
3030
|
),
|
|
2586
|
-
|
|
3031
|
+
m(
|
|
2587
3032
|
"word.replaceRange",
|
|
2588
3033
|
["word"],
|
|
2589
3034
|
"Replace a stretch of text inside a paragraph - a sentence, a phrase. To rewrite whole paragraphs use word.replaceParagraph: a range covering several paragraph styles is refused, because a replacement carries one style and would set the whole span in the first.",
|
|
2590
3035
|
{
|
|
2591
|
-
start:
|
|
2592
|
-
end:
|
|
2593
|
-
text:
|
|
3036
|
+
start: g("Character offset where the replaced text starts, as `inspect` reports offsets."),
|
|
3037
|
+
end: g("Character offset just past the last character to replace."),
|
|
3038
|
+
text: y("The replacement text. A newline starts a new paragraph.")
|
|
2594
3039
|
},
|
|
2595
3040
|
["start", "end", "text"],
|
|
2596
|
-
|
|
3041
|
+
S
|
|
2597
3042
|
),
|
|
2598
|
-
|
|
3043
|
+
m(
|
|
2599
3044
|
"word.insertText",
|
|
2600
3045
|
["word"],
|
|
2601
3046
|
"Insert text at a character offset, without removing anything.",
|
|
2602
3047
|
{
|
|
2603
|
-
index:
|
|
2604
|
-
text:
|
|
3048
|
+
index: g("Character offset, as `inspect` reports offsets."),
|
|
3049
|
+
text: y("The text to insert.")
|
|
2605
3050
|
},
|
|
2606
3051
|
["index", "text"],
|
|
2607
|
-
|
|
3052
|
+
S
|
|
2608
3053
|
),
|
|
2609
|
-
|
|
3054
|
+
m(
|
|
2610
3055
|
"word.appendText",
|
|
2611
3056
|
["word"],
|
|
2612
3057
|
"Add text at the end of the document.",
|
|
2613
|
-
{ text:
|
|
3058
|
+
{ text: y("The text to append.") },
|
|
2614
3059
|
["text"],
|
|
2615
|
-
|
|
3060
|
+
S
|
|
2616
3061
|
),
|
|
2617
|
-
|
|
3062
|
+
m(
|
|
2618
3063
|
"word.insertParagraph",
|
|
2619
3064
|
["word"],
|
|
2620
3065
|
"Start a new paragraph, optionally with text in it.",
|
|
2621
3066
|
{
|
|
2622
|
-
text:
|
|
2623
|
-
index:
|
|
3067
|
+
text: y("Paragraph text. Newlines start further paragraphs."),
|
|
3068
|
+
index: g("Character offset to insert at. Omit for the end of the document.")
|
|
2624
3069
|
},
|
|
2625
3070
|
[],
|
|
2626
|
-
|
|
3071
|
+
S
|
|
2627
3072
|
),
|
|
2628
|
-
|
|
3073
|
+
m(
|
|
2629
3074
|
"word.setSelection",
|
|
2630
3075
|
["word"],
|
|
2631
3076
|
"Put the user's cursor on a stretch of text, and move the reading window there: the page context carries one window of a long document, and the text around this offset arrives in the next turn.",
|
|
2632
|
-
{ start:
|
|
3077
|
+
{ start: g("Start character offset."), end: g("End character offset. Omit for a caret.") },
|
|
2633
3078
|
["start"],
|
|
2634
|
-
|
|
3079
|
+
K
|
|
2635
3080
|
)
|
|
2636
|
-
],
|
|
2637
|
-
|
|
3081
|
+
], No = [
|
|
3082
|
+
m(
|
|
2638
3083
|
"slides.setText",
|
|
2639
3084
|
["slides"],
|
|
2640
3085
|
"Replace the text of one shape. Written on save; not visible before that, and not undoable.",
|
|
2641
3086
|
{
|
|
2642
|
-
slide:
|
|
2643
|
-
element:
|
|
2644
|
-
text:
|
|
3087
|
+
slide: et,
|
|
3088
|
+
element: y("Element id, as `inspect` reports it."),
|
|
3089
|
+
text: y("The new text.")
|
|
2645
3090
|
},
|
|
2646
3091
|
["slide", "element", "text"],
|
|
2647
|
-
|
|
3092
|
+
J
|
|
2648
3093
|
),
|
|
2649
|
-
|
|
3094
|
+
m(
|
|
2650
3095
|
"slides.setTransform",
|
|
2651
3096
|
["slides"],
|
|
2652
3097
|
"Move or resize one shape. Only the values you pass change. Written on save; not visible before that, and not undoable.",
|
|
2653
3098
|
{
|
|
2654
|
-
slide:
|
|
2655
|
-
element:
|
|
2656
|
-
left:
|
|
2657
|
-
top:
|
|
2658
|
-
width:
|
|
2659
|
-
height:
|
|
3099
|
+
slide: et,
|
|
3100
|
+
element: y("Element id."),
|
|
3101
|
+
left: g("Distance from the left edge, in pixels."),
|
|
3102
|
+
top: g("Distance from the top edge, in pixels."),
|
|
3103
|
+
width: g("Width in pixels."),
|
|
3104
|
+
height: g("Height in pixels.")
|
|
2660
3105
|
},
|
|
2661
3106
|
["slide", "element"],
|
|
2662
|
-
|
|
3107
|
+
J
|
|
2663
3108
|
)
|
|
2664
|
-
],
|
|
2665
|
-
...
|
|
2666
|
-
...
|
|
2667
|
-
...
|
|
2668
|
-
|
|
3109
|
+
], Ut = [
|
|
3110
|
+
...vo,
|
|
3111
|
+
...Oo,
|
|
3112
|
+
...Co,
|
|
3113
|
+
...No
|
|
2669
3114
|
];
|
|
2670
|
-
function
|
|
2671
|
-
return
|
|
3115
|
+
function fl(e) {
|
|
3116
|
+
return Ut.filter((t) => t.kinds.includes(e));
|
|
2672
3117
|
}
|
|
2673
|
-
function
|
|
2674
|
-
return
|
|
3118
|
+
function pl(e) {
|
|
3119
|
+
return Ut.find((t) => t.op === e);
|
|
2675
3120
|
}
|
|
2676
|
-
const
|
|
2677
|
-
function
|
|
3121
|
+
const ml = "documents.describe", gl = "documents.inspect", hl = "documents.apply";
|
|
3122
|
+
function yl(e) {
|
|
2678
3123
|
const t = e.indexOf(":");
|
|
2679
3124
|
if (t !== -1) return e.slice(0, t);
|
|
2680
3125
|
const n = e.indexOf(".");
|
|
2681
3126
|
return n === -1 ? e : e.slice(0, n);
|
|
2682
3127
|
}
|
|
2683
|
-
const
|
|
2684
|
-
function
|
|
3128
|
+
const bl = "installation-id";
|
|
3129
|
+
function Al(e) {
|
|
2685
3130
|
const t = [];
|
|
2686
3131
|
for (const n of Object.keys(e))
|
|
2687
3132
|
for (const r of Object.keys(e[n]))
|
|
2688
3133
|
t.push({ lang: n, key: r, value: e[n][r] });
|
|
2689
3134
|
return t;
|
|
2690
3135
|
}
|
|
2691
|
-
const
|
|
3136
|
+
const El = "notification-source", Sl = (e, t) => `${e}.pref.${t}`, _l = {
|
|
2692
3137
|
ai: [
|
|
2693
3138
|
"account.read",
|
|
2694
3139
|
"account.write",
|
|
@@ -2823,96 +3268,96 @@ const cc = "notification-source", lc = (e, t) => `${e}.pref.${t}`, uc = {
|
|
|
2823
3268
|
time: ["entry.read", "entry.write", "work-type.read", "work-type.write"],
|
|
2824
3269
|
user: ["user.read", "user.write"],
|
|
2825
3270
|
work: ["item.read", "item.write", "project.read", "project.write"]
|
|
2826
|
-
},
|
|
2827
|
-
function
|
|
2828
|
-
const r = n - e <
|
|
2829
|
-
if (!
|
|
2830
|
-
const
|
|
2831
|
-
return !r && !
|
|
2832
|
-
}
|
|
2833
|
-
function
|
|
2834
|
-
const n = t - e.lastSeenAt <
|
|
3271
|
+
}, Kt = 9e4, xo = ["out_of_office"], Ft = (e) => xo.includes(e);
|
|
3272
|
+
function Tl(e, t, n) {
|
|
3273
|
+
const r = n - e < Kt, o = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
|
|
3274
|
+
if (!o?.status) return { online: r, status: r ? "available" : "offline" };
|
|
3275
|
+
const i = o.status;
|
|
3276
|
+
return !r && !Ft(i) ? { online: !1, status: "offline" } : { online: r, status: i, message: o.message };
|
|
3277
|
+
}
|
|
3278
|
+
function wl(e, t) {
|
|
3279
|
+
const n = t - e.lastSeenAt < Kt, r = n || Ft(e.status) ? e.status : "offline";
|
|
2835
3280
|
return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
|
|
2836
3281
|
}
|
|
2837
|
-
function
|
|
3282
|
+
function Il(e, t) {
|
|
2838
3283
|
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 };
|
|
2839
3284
|
}
|
|
2840
|
-
function
|
|
3285
|
+
function Ml(e) {
|
|
2841
3286
|
return e.providerAvailable && e.allowed;
|
|
2842
3287
|
}
|
|
2843
|
-
const
|
|
2844
|
-
function
|
|
3288
|
+
const kl = "resources.describe", vl = "resources.search", Ol = "resources.resolve", Cl = "resources.attached";
|
|
3289
|
+
function Nl(e) {
|
|
2845
3290
|
const t = e.indexOf(":");
|
|
2846
3291
|
return t === -1 ? e : e.slice(0, t);
|
|
2847
3292
|
}
|
|
2848
|
-
const
|
|
2849
|
-
function
|
|
3293
|
+
const xl = "/provider/scope/related", Rl = "/provider/scope/read", Bt = "auth";
|
|
3294
|
+
function Ht(e) {
|
|
2850
3295
|
const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
|
|
2851
3296
|
return t ? t[1] : null;
|
|
2852
3297
|
}
|
|
2853
|
-
function
|
|
2854
|
-
const t =
|
|
2855
|
-
return t ? t !==
|
|
3298
|
+
function Dl(e) {
|
|
3299
|
+
const t = Ht(e);
|
|
3300
|
+
return t ? t !== Bt : typeof e == "string" && e.startsWith("/wake");
|
|
2856
3301
|
}
|
|
2857
|
-
function
|
|
2858
|
-
return typeof e != "string" || e === "" || e === "/" ? !0 :
|
|
3302
|
+
function $l(e) {
|
|
3303
|
+
return typeof e != "string" || e === "" || e === "/" ? !0 : Ht(e) === Bt;
|
|
2859
3304
|
}
|
|
2860
|
-
function
|
|
3305
|
+
function Ro(e) {
|
|
2861
3306
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2862
3307
|
}
|
|
2863
|
-
function
|
|
2864
|
-
const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : `/${
|
|
3308
|
+
function Do(e) {
|
|
3309
|
+
const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : `/${Ro(r)}`).join("");
|
|
2865
3310
|
return new RegExp(`^${n}\\/?$`);
|
|
2866
3311
|
}
|
|
2867
|
-
function
|
|
2868
|
-
const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean),
|
|
2869
|
-
return n.forEach((
|
|
2870
|
-
if (
|
|
2871
|
-
const
|
|
2872
|
-
|
|
3312
|
+
function $o(e, t) {
|
|
3313
|
+
const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean), o = {};
|
|
3314
|
+
return n.forEach((i, s) => {
|
|
3315
|
+
if (i.startsWith(":")) {
|
|
3316
|
+
const a = i.endsWith("?") ? i.slice(1, -1) : i.slice(1), l = r[s];
|
|
3317
|
+
l && (o[a] = l);
|
|
2873
3318
|
}
|
|
2874
|
-
}),
|
|
3319
|
+
}), o;
|
|
2875
3320
|
}
|
|
2876
|
-
function
|
|
3321
|
+
function Lo(e) {
|
|
2877
3322
|
return e.publicBasePath ?? `/apps/${e.name}`;
|
|
2878
3323
|
}
|
|
2879
|
-
function
|
|
3324
|
+
function Ll(e) {
|
|
2880
3325
|
const t = [];
|
|
2881
3326
|
for (const n of e) {
|
|
2882
3327
|
if (!n?.name) continue;
|
|
2883
|
-
const r =
|
|
2884
|
-
for (const
|
|
2885
|
-
if (!
|
|
2886
|
-
const
|
|
3328
|
+
const r = Lo(n);
|
|
3329
|
+
for (const o of n.routes ?? []) {
|
|
3330
|
+
if (!o.public) continue;
|
|
3331
|
+
const i = o.path === "/" ? "" : o.path;
|
|
2887
3332
|
t.push({
|
|
2888
3333
|
appName: n.name,
|
|
2889
|
-
resource:
|
|
2890
|
-
pattern: `${r}${
|
|
2891
|
-
props:
|
|
3334
|
+
resource: o.resource,
|
|
3335
|
+
pattern: `${r}${i}`,
|
|
3336
|
+
props: o.props
|
|
2892
3337
|
});
|
|
2893
3338
|
}
|
|
2894
3339
|
}
|
|
2895
3340
|
return t;
|
|
2896
3341
|
}
|
|
2897
|
-
function
|
|
3342
|
+
function Po(e, t) {
|
|
2898
3343
|
const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
|
|
2899
|
-
for (let
|
|
2900
|
-
const
|
|
2901
|
-
if (
|
|
3344
|
+
for (let o = 0; o < Math.min(n.length, r.length); o++) {
|
|
3345
|
+
const i = n[o].startsWith(":"), s = r[o].startsWith(":");
|
|
3346
|
+
if (i !== s) return s;
|
|
2902
3347
|
}
|
|
2903
3348
|
return n.length > r.length;
|
|
2904
3349
|
}
|
|
2905
|
-
function
|
|
3350
|
+
function Uo(e, t) {
|
|
2906
3351
|
if (typeof e != "string") return null;
|
|
2907
3352
|
let n = null;
|
|
2908
3353
|
for (const r of t)
|
|
2909
|
-
|
|
2910
|
-
return n ? { ...n, params: { ...n.props,
|
|
3354
|
+
Do(r.pattern).test(e) && (!n || Po(r.pattern, n.pattern)) && (n = r);
|
|
3355
|
+
return n ? { ...n, params: { ...n.props, ...$o(n.pattern, e) } } : null;
|
|
2911
3356
|
}
|
|
2912
|
-
function
|
|
2913
|
-
return
|
|
3357
|
+
function Pl(e, t) {
|
|
3358
|
+
return Uo(e, t) !== null;
|
|
2914
3359
|
}
|
|
2915
|
-
const
|
|
3360
|
+
const Ul = 10 * 1024 * 1024, Kl = 25 * 1024 * 1024, Fl = "sync-target", Bl = 20, Ko = {
|
|
2916
3361
|
afrikaans: [
|
|
2917
3362
|
"[Muziek]",
|
|
2918
3363
|
"(C) TV GELDERLAND 2021",
|
|
@@ -3062,14 +3507,14 @@ const Mc = 10 * 1024 * 1024, kc = 25 * 1024 * 1024, Oc = "sync-target", Cc = 20,
|
|
|
3062
3507
|
"[MÚSICA]",
|
|
3063
3508
|
"[Music cuts in British]"
|
|
3064
3509
|
]
|
|
3065
|
-
},
|
|
3510
|
+
}, Fo = (e) => {
|
|
3066
3511
|
let t = e;
|
|
3067
|
-
return Object.values(
|
|
3512
|
+
return Object.values(Ko).forEach((n) => {
|
|
3068
3513
|
n.forEach((r) => {
|
|
3069
3514
|
t = t.replaceAll(r, "");
|
|
3070
3515
|
});
|
|
3071
3516
|
}), t = t.replace(/\(.*?\)/g, ""), t = t.replace(/\[.*?\]/g, ""), t;
|
|
3072
|
-
},
|
|
3517
|
+
}, Bo = 6e4, Ho = 8e3, jo = 2, Go = 0.4, Wo = 3, Vo = /* @__PURE__ */ new Set([
|
|
3073
3518
|
"aan",
|
|
3074
3519
|
"als",
|
|
3075
3520
|
"ben",
|
|
@@ -3182,52 +3627,52 @@ const Mc = 10 * 1024 * 1024, kc = 25 * 1024 * 1024, Oc = "sync-target", Cc = 20,
|
|
|
3182
3627
|
"you",
|
|
3183
3628
|
"your"
|
|
3184
3629
|
]);
|
|
3185
|
-
function
|
|
3630
|
+
function zo(e) {
|
|
3186
3631
|
const t = /* @__PURE__ */ new Set();
|
|
3187
3632
|
for (const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))
|
|
3188
|
-
n.length <
|
|
3633
|
+
n.length < Wo || Vo.has(n) || t.add(n);
|
|
3189
3634
|
return [...t];
|
|
3190
3635
|
}
|
|
3191
|
-
function
|
|
3636
|
+
function Yo(e, t) {
|
|
3192
3637
|
if (!e.length) return 0;
|
|
3193
3638
|
if (!t.length) return 1;
|
|
3194
3639
|
const n = new Set(t), r = new Set(e);
|
|
3195
|
-
let
|
|
3196
|
-
for (const
|
|
3197
|
-
return
|
|
3640
|
+
let o = 0;
|
|
3641
|
+
for (const i of r) n.has(i) || (o += 1);
|
|
3642
|
+
return o / r.size;
|
|
3198
3643
|
}
|
|
3199
|
-
function
|
|
3200
|
-
const n = e.filter((
|
|
3644
|
+
function Xo(e, t = Bo) {
|
|
3645
|
+
const n = e.filter((s) => !s.partial && typeof s.text == "string");
|
|
3201
3646
|
if (!n.length) return { text: "", segmentCount: 0 };
|
|
3202
|
-
const
|
|
3203
|
-
return { text: n.filter((
|
|
3647
|
+
const o = n.reduce((s, a) => Math.max(s, a.endedAt ?? 0), 0) - t;
|
|
3648
|
+
return { text: n.filter((s) => (s.endedAt ?? 0) >= o).map((s) => Fo(s.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
|
|
3204
3649
|
}
|
|
3205
|
-
const
|
|
3206
|
-
function
|
|
3207
|
-
const r = new Set(e),
|
|
3208
|
-
for (const
|
|
3209
|
-
!
|
|
3210
|
-
return
|
|
3650
|
+
const qo = 60;
|
|
3651
|
+
function Hl(e, t, n = qo) {
|
|
3652
|
+
const r = new Set(e), o = [...e];
|
|
3653
|
+
for (const i of t)
|
|
3654
|
+
!i || r.has(i) || (r.add(i), o.push(i));
|
|
3655
|
+
return o.slice(-n);
|
|
3211
3656
|
}
|
|
3212
|
-
function
|
|
3657
|
+
function jl(e) {
|
|
3213
3658
|
const { segments: t, now: n, state: r } = e;
|
|
3214
|
-
if (r.lastTriggerAt && n - r.lastTriggerAt <
|
|
3659
|
+
if (r.lastTriggerAt && n - r.lastTriggerAt < Ho)
|
|
3215
3660
|
return { trigger: !1, reason: "too_soon" };
|
|
3216
|
-
const
|
|
3217
|
-
if (!
|
|
3218
|
-
const
|
|
3219
|
-
if (r.lastQueryTerms &&
|
|
3661
|
+
const o = Xo(t, e.windowMs);
|
|
3662
|
+
if (!o.text) return { trigger: !1, reason: "no_speech" };
|
|
3663
|
+
const i = o.segmentCount - (r.lastSegmentCount ?? 0);
|
|
3664
|
+
if (r.lastQueryTerms && i < jo)
|
|
3220
3665
|
return { trigger: !1, reason: "too_few_new" };
|
|
3221
|
-
const
|
|
3222
|
-
return
|
|
3666
|
+
const s = zo(o.text);
|
|
3667
|
+
return s.length ? r.lastQueryTerms?.length && Yo(s, r.lastQueryTerms) < Go ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: o.text, terms: s, segmentCount: o.segmentCount } : { trigger: !1, reason: "no_speech" };
|
|
3223
3668
|
}
|
|
3224
|
-
const
|
|
3669
|
+
const Gl = [
|
|
3225
3670
|
"personal",
|
|
3226
3671
|
"workspace",
|
|
3227
3672
|
"connections",
|
|
3228
3673
|
"work",
|
|
3229
3674
|
"ai"
|
|
3230
|
-
],
|
|
3675
|
+
], Wl = "navNotice", Me = {
|
|
3231
3676
|
// The lower bounds are deliberately generous: service ranges (0800/0900) are
|
|
3232
3677
|
// shorter than geographic numbers, and a too-strict minimum silently drops them.
|
|
3233
3678
|
// An over-permissive key is harmless — it simply matches nothing.
|
|
@@ -3250,81 +3695,81 @@ const xc = [
|
|
|
3250
3695
|
PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
|
|
3251
3696
|
US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
|
|
3252
3697
|
CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
|
|
3253
|
-
},
|
|
3254
|
-
new Set(Object.values(
|
|
3698
|
+
}, Jo = "NL", Zo = 15, Qo = 8, ei = Array.from(
|
|
3699
|
+
new Set(Object.values(Me).map((e) => e.callingCode))
|
|
3255
3700
|
).sort((e, t) => t.length - e.length);
|
|
3256
|
-
function
|
|
3701
|
+
function nt(e) {
|
|
3257
3702
|
if (e)
|
|
3258
|
-
return
|
|
3703
|
+
return Me[e.trim().toUpperCase()];
|
|
3259
3704
|
}
|
|
3260
|
-
function
|
|
3705
|
+
function Y(e, t) {
|
|
3261
3706
|
return e.length >= t.nsnMin && e.length <= t.nsnMax;
|
|
3262
3707
|
}
|
|
3263
|
-
function
|
|
3264
|
-
if (e.length >
|
|
3265
|
-
for (const t of
|
|
3708
|
+
function rt(e) {
|
|
3709
|
+
if (e.length > Zo) return null;
|
|
3710
|
+
for (const t of ei) {
|
|
3266
3711
|
if (!e.startsWith(t)) continue;
|
|
3267
3712
|
const n = e.slice(t.length);
|
|
3268
|
-
for (const r of Object.values(
|
|
3713
|
+
for (const r of Object.values(Me)) {
|
|
3269
3714
|
if (r.callingCode !== t) continue;
|
|
3270
|
-
const
|
|
3271
|
-
if (
|
|
3715
|
+
const o = r.trunkPrefix, i = o && n.startsWith(o) ? n.slice(o.length) : n;
|
|
3716
|
+
if (Y(i, r)) return `+${t}${i}`;
|
|
3272
3717
|
}
|
|
3273
3718
|
return null;
|
|
3274
3719
|
}
|
|
3275
|
-
return e.length <
|
|
3720
|
+
return e.length < Qo ? null : `+${e}`;
|
|
3276
3721
|
}
|
|
3277
|
-
function
|
|
3722
|
+
function ti(e) {
|
|
3278
3723
|
let t = e.trim();
|
|
3279
3724
|
const n = t.match(/^(sips?|tel|whatsapp):/i);
|
|
3280
3725
|
n && (t = t.slice(n[0].length));
|
|
3281
3726
|
const r = t.indexOf("@");
|
|
3282
3727
|
return r >= 0 && (t = t.slice(0, r)), t.trim();
|
|
3283
3728
|
}
|
|
3284
|
-
function
|
|
3729
|
+
function Vl(e) {
|
|
3285
3730
|
if (!e) return !1;
|
|
3286
3731
|
const t = e.indexOf("@");
|
|
3287
3732
|
if (t <= 0) return !1;
|
|
3288
3733
|
const n = e.slice(0, t).trim();
|
|
3289
3734
|
return !/^[+\d\s().-]+$/.test(n);
|
|
3290
3735
|
}
|
|
3291
|
-
function
|
|
3736
|
+
function ot(e, t) {
|
|
3292
3737
|
if (!e) return null;
|
|
3293
|
-
const n =
|
|
3738
|
+
const n = ti(e);
|
|
3294
3739
|
if (!n) return null;
|
|
3295
|
-
const r = n.startsWith("+"),
|
|
3296
|
-
if (!i) return null;
|
|
3297
|
-
if (r) return Pe(i);
|
|
3298
|
-
if (i.startsWith("00")) return Pe(i.slice(2));
|
|
3299
|
-
const o = Le(t) ?? Le(ti);
|
|
3740
|
+
const r = n.startsWith("+"), o = n.replace(/\D/g, "");
|
|
3300
3741
|
if (!o) return null;
|
|
3301
|
-
|
|
3302
|
-
if (
|
|
3303
|
-
|
|
3304
|
-
|
|
3742
|
+
if (r) return rt(o);
|
|
3743
|
+
if (o.startsWith("00")) return rt(o.slice(2));
|
|
3744
|
+
const i = nt(t) ?? nt(Jo);
|
|
3745
|
+
if (!i) return null;
|
|
3746
|
+
const s = i.trunkPrefix;
|
|
3747
|
+
if (s && o.startsWith(s)) {
|
|
3748
|
+
const a = o.slice(s.length);
|
|
3749
|
+
return Y(a, i) ? `+${i.callingCode}${a}` : null;
|
|
3305
3750
|
}
|
|
3306
|
-
if (
|
|
3307
|
-
const
|
|
3308
|
-
if (
|
|
3751
|
+
if (o.startsWith(i.callingCode)) {
|
|
3752
|
+
const a = o.slice(i.callingCode.length);
|
|
3753
|
+
if (Y(a, i)) return `+${i.callingCode}${a}`;
|
|
3309
3754
|
}
|
|
3310
|
-
return !
|
|
3755
|
+
return !s && Y(o, i) ? `+${i.callingCode}${o}` : null;
|
|
3311
3756
|
}
|
|
3312
|
-
function
|
|
3757
|
+
function zl(e, t = 9) {
|
|
3313
3758
|
const n = (e ?? "").replace(/\D/g, "");
|
|
3314
3759
|
return n.length < t ? null : n.slice(-t);
|
|
3315
3760
|
}
|
|
3316
|
-
function
|
|
3761
|
+
function jt(e) {
|
|
3317
3762
|
if (!e) return null;
|
|
3318
3763
|
const t = e.trim().toLowerCase(), n = t.lastIndexOf("@");
|
|
3319
3764
|
if (n <= 0 || n === t.length - 1) return null;
|
|
3320
|
-
const r = t.slice(0, n).split("+")[0],
|
|
3321
|
-
return !r || !
|
|
3765
|
+
const r = t.slice(0, n).split("+")[0], o = t.slice(n + 1);
|
|
3766
|
+
return !r || !o.includes(".") ? null : `${r}@${o}`;
|
|
3322
3767
|
}
|
|
3323
|
-
function
|
|
3324
|
-
const t =
|
|
3768
|
+
function Yl(e) {
|
|
3769
|
+
const t = jt(e);
|
|
3325
3770
|
return t ? t.slice(t.lastIndexOf("@") + 1) : null;
|
|
3326
3771
|
}
|
|
3327
|
-
const
|
|
3772
|
+
const ni = /* @__PURE__ */ new Set([
|
|
3328
3773
|
"co.uk",
|
|
3329
3774
|
"org.uk",
|
|
3330
3775
|
"gov.uk",
|
|
@@ -3334,14 +3779,14 @@ const ai = /* @__PURE__ */ new Set([
|
|
|
3334
3779
|
"com.br",
|
|
3335
3780
|
"co.za"
|
|
3336
3781
|
]);
|
|
3337
|
-
function
|
|
3782
|
+
function ri(e) {
|
|
3338
3783
|
if (!e) return null;
|
|
3339
3784
|
const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
|
|
3340
3785
|
if (t.length < 2) return null;
|
|
3341
3786
|
const n = t.slice(-2).join(".");
|
|
3342
|
-
return
|
|
3787
|
+
return ni.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
|
|
3343
3788
|
}
|
|
3344
|
-
const
|
|
3789
|
+
const oi = /* @__PURE__ */ new Set([
|
|
3345
3790
|
"gmail.com",
|
|
3346
3791
|
"googlemail.com",
|
|
3347
3792
|
"outlook.com",
|
|
@@ -3386,34 +3831,34 @@ const ci = /* @__PURE__ */ new Set([
|
|
|
3386
3831
|
"proximus.be",
|
|
3387
3832
|
"scarlet.be"
|
|
3388
3833
|
]);
|
|
3389
|
-
function
|
|
3390
|
-
const t =
|
|
3391
|
-
return t ?
|
|
3834
|
+
function Xl(e) {
|
|
3835
|
+
const t = ri(e);
|
|
3836
|
+
return t ? oi.has(t) : !1;
|
|
3392
3837
|
}
|
|
3393
|
-
function
|
|
3838
|
+
function ql(e) {
|
|
3394
3839
|
if (!e) return !1;
|
|
3395
3840
|
const t = e.trim().toLowerCase();
|
|
3396
3841
|
return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
|
|
3397
3842
|
}
|
|
3398
|
-
function
|
|
3843
|
+
function Jl(e, t, n) {
|
|
3399
3844
|
if (!e || !t) return null;
|
|
3400
3845
|
const r = e.trim().toLowerCase();
|
|
3401
3846
|
if (r === "tel" || r === "sms" || r === "whatsapp") {
|
|
3402
|
-
const
|
|
3403
|
-
return
|
|
3847
|
+
const i = ot(t, n);
|
|
3848
|
+
return i ? `tel:${i}` : null;
|
|
3404
3849
|
}
|
|
3405
3850
|
if (r === "fax") {
|
|
3406
|
-
const
|
|
3407
|
-
return
|
|
3851
|
+
const i = ot(t, n);
|
|
3852
|
+
return i ? `fax:${i}` : null;
|
|
3408
3853
|
}
|
|
3409
3854
|
if (r === "mailto" || r === "email") {
|
|
3410
|
-
const
|
|
3411
|
-
return
|
|
3855
|
+
const i = jt(t);
|
|
3856
|
+
return i ? `mailto:${i}` : null;
|
|
3412
3857
|
}
|
|
3413
|
-
const
|
|
3414
|
-
return
|
|
3858
|
+
const o = t.trim().toLowerCase();
|
|
3859
|
+
return o ? `${r}:${o}` : null;
|
|
3415
3860
|
}
|
|
3416
|
-
const
|
|
3861
|
+
const ii = [
|
|
3417
3862
|
/<blockquote/i,
|
|
3418
3863
|
/class="?gmail_quote/i,
|
|
3419
3864
|
// Gmail quote container
|
|
@@ -3426,111 +3871,111 @@ const li = [
|
|
|
3426
3871
|
// Outlook underscore separator before "From:"
|
|
3427
3872
|
/\bOn\b[\s\S]{0,200}?\bwrote:/i
|
|
3428
3873
|
// Gmail "On <date> <name> wrote:"
|
|
3429
|
-
],
|
|
3430
|
-
function
|
|
3874
|
+
], it = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, si = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
|
|
3875
|
+
function ai(e) {
|
|
3431
3876
|
const t = e.split(`
|
|
3432
3877
|
`);
|
|
3433
3878
|
for (let n = 0; n < t.length; n++)
|
|
3434
|
-
if (
|
|
3879
|
+
if (si.test(t[n]) || it.test(t[n]) && t.slice(n + 1, n + 4).some((r) => it.test(r)))
|
|
3435
3880
|
return t.slice(0, n).join(`
|
|
3436
3881
|
`).trim();
|
|
3437
3882
|
return e;
|
|
3438
3883
|
}
|
|
3439
|
-
const
|
|
3440
|
-
function
|
|
3884
|
+
const ci = /^(?:https?:|mailto:|tel:)/i, li = /^(?:https?:|cid:|data:image\/)/i;
|
|
3885
|
+
function ae(e, t) {
|
|
3441
3886
|
const n = e.match(new RegExp(`\\b${t}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s">]+))`, "i"));
|
|
3442
3887
|
return (n?.[1] ?? n?.[2] ?? n?.[3] ?? "").trim();
|
|
3443
3888
|
}
|
|
3444
|
-
const
|
|
3445
|
-
function
|
|
3446
|
-
return e.replace(/\s+/g, " ").trim().split(
|
|
3889
|
+
const ui = /(!\[[^\]]*\]\([^)]*\))/;
|
|
3890
|
+
function st(e) {
|
|
3891
|
+
return e.replace(/\s+/g, " ").trim().split(ui).map((t, n) => n % 2 === 1 ? t : t.replace(/[[\]]/g, "\\$&")).join("");
|
|
3447
3892
|
}
|
|
3448
|
-
function
|
|
3893
|
+
function ce(e) {
|
|
3449
3894
|
return e.replace(
|
|
3450
3895
|
/[()\s<>"]/g,
|
|
3451
3896
|
(t) => `%${t.charCodeAt(0).toString(16).toUpperCase().padStart(2, "0")}`
|
|
3452
3897
|
);
|
|
3453
3898
|
}
|
|
3454
|
-
function
|
|
3899
|
+
function di(e) {
|
|
3455
3900
|
return e.replace(/<img\b([^>]*?)\/?>/gi, (n, r) => {
|
|
3456
|
-
const
|
|
3457
|
-
return
|
|
3901
|
+
const o = ae(r, "src");
|
|
3902
|
+
return li.test(o) ? `})` : "";
|
|
3458
3903
|
}).replace(
|
|
3459
3904
|
/<a\b([^>]*)>([\s\S]*?)<\/a\s*>/gi,
|
|
3460
|
-
(n, r,
|
|
3461
|
-
const
|
|
3462
|
-
return
|
|
3905
|
+
(n, r, o) => {
|
|
3906
|
+
const i = st(o.replace(/<[^>]*>/g, "")), s = ae(r, "href");
|
|
3907
|
+
return ci.test(s) ? `[${i || ce(s)}](${ce(s)})` : i;
|
|
3463
3908
|
}
|
|
3464
3909
|
);
|
|
3465
3910
|
}
|
|
3466
|
-
const
|
|
3467
|
-
function
|
|
3911
|
+
const fi = /<table\b[^>]*>((?:(?!<table\b)[\s\S])*?)<\/table\s*>/i, pi = /<tr\b[^>]*>([\s\S]*?)<\/tr\s*>/gi, mi = /<(t[dh])\b([^>]*)>([\s\S]*?)<\/\1\s*>/gi;
|
|
3912
|
+
function gi(e, t) {
|
|
3468
3913
|
return /<table\b/i.test(e) || e.includes(`
|
|
3469
3914
|
|
|
3470
3915
|
|`) || t.includes("![") || t.length > 200;
|
|
3471
3916
|
}
|
|
3472
|
-
const
|
|
3473
|
-
function
|
|
3917
|
+
const hi = 40, yi = { left: "---", center: ":---:", right: "---:" };
|
|
3918
|
+
function bi(e) {
|
|
3474
3919
|
const t = e.match(/align\s*[=:]\s*["']?\s*(right|center)/i);
|
|
3475
3920
|
return t ? t[1].toLowerCase() : "left";
|
|
3476
3921
|
}
|
|
3477
|
-
function
|
|
3922
|
+
function Ai(e) {
|
|
3478
3923
|
return e.replace(/<[^>]*>/g, "").replace(/\s+/g, " ").trim().replace(/\|/g, "\\|");
|
|
3479
3924
|
}
|
|
3480
|
-
function
|
|
3925
|
+
function Ei(e) {
|
|
3481
3926
|
const t = [];
|
|
3482
|
-
for (const
|
|
3483
|
-
const
|
|
3484
|
-
for (const
|
|
3485
|
-
const
|
|
3486
|
-
if (
|
|
3487
|
-
|
|
3927
|
+
for (const s of e.matchAll(pi)) {
|
|
3928
|
+
const a = [];
|
|
3929
|
+
for (const l of s[1].matchAll(mi)) {
|
|
3930
|
+
const d = Ai(l[3]);
|
|
3931
|
+
if (gi(l[3], d)) return null;
|
|
3932
|
+
a.push({ text: d, align: bi(l[2]) });
|
|
3488
3933
|
}
|
|
3489
|
-
if (
|
|
3490
|
-
|
|
3934
|
+
if (a.length === 0) return null;
|
|
3935
|
+
a.some((l) => l.text !== "") && t.push(a);
|
|
3491
3936
|
}
|
|
3492
3937
|
const n = t[0]?.length ?? 0;
|
|
3493
|
-
if (t.length < 2 || n < 2 || t.some((
|
|
3494
|
-
const r = (
|
|
3938
|
+
if (t.length < 2 || n < 2 || t.some((s) => s.length !== n)) return null;
|
|
3939
|
+
const r = (s) => `| ${s.map((a) => a.text).join(" | ")} |`, o = t[1].map((s) => yi[s.align]).join(" | "), i = t.slice(1).map(r).join(`
|
|
3495
3940
|
`);
|
|
3496
3941
|
return `
|
|
3497
3942
|
|
|
3498
3943
|
${r(t[0])}
|
|
3499
|
-
| ${
|
|
3500
|
-
${
|
|
3944
|
+
| ${o} |
|
|
3945
|
+
${i}
|
|
3501
3946
|
|
|
3502
3947
|
`;
|
|
3503
3948
|
}
|
|
3504
|
-
function
|
|
3949
|
+
function Si(e) {
|
|
3505
3950
|
return e.replace(/<\/(t[dh])\s*>/gi, " ").replace(/<\/tr\s*>/gi, `
|
|
3506
3951
|
`).replace(/<(?:tbody|thead|tfoot|caption|colgroup|col|tr|t[dh])\b[^>]*>/gi, "").replace(/<\/(?:tbody|thead|tfoot|caption|colgroup)\s*>/gi, "");
|
|
3507
3952
|
}
|
|
3508
|
-
function
|
|
3953
|
+
function _i(e) {
|
|
3509
3954
|
let t = e;
|
|
3510
|
-
for (let n = 0; n <
|
|
3511
|
-
const r =
|
|
3955
|
+
for (let n = 0; n < hi; n++) {
|
|
3956
|
+
const r = fi.exec(t);
|
|
3512
3957
|
if (!r || r.index === void 0) break;
|
|
3513
|
-
const
|
|
3958
|
+
const i = Ei(r[1]) ?? `
|
|
3514
3959
|
|
|
3515
|
-
${
|
|
3960
|
+
${Si(r[1])}
|
|
3516
3961
|
|
|
3517
3962
|
`;
|
|
3518
|
-
t = t.slice(0, r.index) +
|
|
3963
|
+
t = t.slice(0, r.index) + i + t.slice(r.index + r[0].length);
|
|
3519
3964
|
}
|
|
3520
3965
|
return t;
|
|
3521
3966
|
}
|
|
3522
|
-
function
|
|
3967
|
+
function at(e, t) {
|
|
3523
3968
|
let n = e;
|
|
3524
3969
|
return n = n.replace(/<(script|style)[\s\S]*?<\/\1>/gi, ""), n = n.replace(/<!--[\s\S]*?-->/g, ""), n = n.replace(/<br\s*\/?>/gi, `
|
|
3525
|
-
`), t && (n =
|
|
3970
|
+
`), t && (n = _i(di(n))), n = n.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
|
|
3526
3971
|
|
|
3527
3972
|
`), n = n.replace(/<\/(div|li|tr)>/gi, `
|
|
3528
3973
|
`), n = n.replace(/<\/(td|th)>/gi, " "), n = n.replace(/<[^>]+>/g, ""), n = n.replace(/<[^>]*$/, ""), n;
|
|
3529
3974
|
}
|
|
3530
|
-
function
|
|
3975
|
+
function ct(e) {
|
|
3531
3976
|
return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
|
|
3532
3977
|
}
|
|
3533
|
-
const
|
|
3978
|
+
const Ti = {
|
|
3534
3979
|
euro: "€",
|
|
3535
3980
|
pound: "£",
|
|
3536
3981
|
yen: "¥",
|
|
@@ -3552,416 +3997,455 @@ const ki = {
|
|
|
3552
3997
|
rdquo: "”",
|
|
3553
3998
|
apos: "'"
|
|
3554
3999
|
};
|
|
3555
|
-
function
|
|
3556
|
-
return e.replace(/ /gi, " ").replace(/&([a-z]+);/gi, (t, n) =>
|
|
4000
|
+
function lt(e) {
|
|
4001
|
+
return e.replace(/ /gi, " ").replace(/&([a-z]+);/gi, (t, n) => Ti[n.toLowerCase()] ?? t).replace(/</gi, "<").replace(/>/gi, ">").replace(/"/gi, '"').replace(/&#(\d+);/g, (t, n) => ct(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => ct(parseInt(n, 16)) ?? t).replace(/&/gi, "&");
|
|
3557
4002
|
}
|
|
3558
|
-
function
|
|
4003
|
+
function ut(e) {
|
|
3559
4004
|
return e.replace(/\r/g, "").replace(/[ \t]+/g, " ").replace(/ *\n */g, `
|
|
3560
4005
|
`).replace(/\n{3,}/g, `
|
|
3561
4006
|
|
|
3562
4007
|
`).trim();
|
|
3563
4008
|
}
|
|
3564
|
-
const
|
|
3565
|
-
function
|
|
3566
|
-
return
|
|
4009
|
+
const wi = /<\s*(html|body|div|p|table|br|span)\b/i;
|
|
4010
|
+
function Zl(e) {
|
|
4011
|
+
return wi.test(e);
|
|
3567
4012
|
}
|
|
3568
|
-
function
|
|
3569
|
-
return
|
|
4013
|
+
function Ql(e) {
|
|
4014
|
+
return Gt(e, !1);
|
|
3570
4015
|
}
|
|
3571
|
-
function
|
|
3572
|
-
return
|
|
4016
|
+
function eu(e) {
|
|
4017
|
+
return Gt(e, !0);
|
|
3573
4018
|
}
|
|
3574
|
-
function
|
|
4019
|
+
function Gt(e, t) {
|
|
3575
4020
|
if (typeof e != "string" || !e) return "";
|
|
3576
4021
|
let n = e.length;
|
|
3577
|
-
for (const
|
|
3578
|
-
const
|
|
3579
|
-
|
|
4022
|
+
for (const s of ii) {
|
|
4023
|
+
const a = e.search(s);
|
|
4024
|
+
a >= 0 && a < n && (n = a);
|
|
3580
4025
|
}
|
|
3581
4026
|
const r = e.slice(0, n);
|
|
3582
|
-
let
|
|
3583
|
-
return
|
|
4027
|
+
let o = ut(lt(at(r, t)));
|
|
4028
|
+
return o || (o = ut(lt(at(e, t)))), ai(o) || o;
|
|
3584
4029
|
}
|
|
3585
4030
|
export {
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
4031
|
+
ms as ACTIVE_ASSIGNMENT_STATUSES,
|
|
4032
|
+
N as ACTIVITY_CATALOG,
|
|
4033
|
+
Eo as AI_ATTACHMENT_LIMITS,
|
|
4034
|
+
Kc as AI_ATTACHMENT_MAX_PER_TURN,
|
|
4035
|
+
Uc as AI_ATTACHMENT_TURN_BUDGET,
|
|
4036
|
+
pt as AI_VENDORS,
|
|
4037
|
+
fn as ALLOWED_LINK_SCHEMES,
|
|
4038
|
+
_l as APP_PERMISSIONS,
|
|
4039
|
+
De as ARTIFACT_MAX_BLOCKS,
|
|
4040
|
+
ss as ARTIFACT_MAX_BODY_BYTES,
|
|
4041
|
+
oe as ARTIFACT_MAX_CELL_LEN,
|
|
4042
|
+
Ue as ARTIFACT_MAX_KPI_ITEMS,
|
|
4043
|
+
$e as ARTIFACT_MAX_LIST_ITEMS,
|
|
4044
|
+
Pe as ARTIFACT_MAX_TABLE_COLUMNS,
|
|
4045
|
+
Le as ARTIFACT_MAX_TABLE_ROWS,
|
|
4046
|
+
gt as ARTIFACT_MAX_TEXT_LEN,
|
|
4047
|
+
Sn as ASSIGNMENT_SCOPE_KIND,
|
|
4048
|
+
Gc as ASSIST_BANDS,
|
|
4049
|
+
jc as ASSIST_SOURCE_PROVIDER_GROUP,
|
|
4050
|
+
Dn as ATTENTION_STATUSES,
|
|
4051
|
+
Zr as AT_RISK_GAP,
|
|
4052
|
+
Bt as AUTH_APP_NAME,
|
|
4053
|
+
Rr as AUTO_READY_MIN_PROPOSALS,
|
|
4054
|
+
Dr as AUTO_READY_RATE,
|
|
4055
|
+
tn as ActivityTypeRegistry,
|
|
4056
|
+
Hi as BUILT_IN_ONLY,
|
|
4057
|
+
$n as BULK_PENALTY,
|
|
4058
|
+
Ho as CADENCE_FLOOR_MS,
|
|
4059
|
+
jo as CADENCE_MIN_NEW_SEGMENTS,
|
|
4060
|
+
Go as CADENCE_MIN_NOVELTY,
|
|
4061
|
+
Bo as CADENCE_WINDOW_MS,
|
|
4062
|
+
Ta as CLASSIFY_VARS,
|
|
4063
|
+
ul as CONNECTOR_PROVIDER_GROUP,
|
|
4064
|
+
dl as CONTEXT_COLLECT_SERVICE,
|
|
4065
|
+
es as CORE_DIMENSIONS,
|
|
4066
|
+
Mo as CommunicationScheme,
|
|
4067
|
+
In as DAY_MS,
|
|
4068
|
+
Xr as DEFAULT_CHECK_IN_DAYS,
|
|
4069
|
+
fr as DEFAULT_FORECAST_WEEKS,
|
|
4070
|
+
qs as DEFAULT_MEMORY_BUDGET,
|
|
4071
|
+
Jo as DEFAULT_PHONE_REGION,
|
|
4072
|
+
oa as DEMAND_SOURCE_PROVIDER_GROUP,
|
|
4073
|
+
hl as DOCUMENT_APPLY_SERVICE,
|
|
4074
|
+
ml as DOCUMENT_DESCRIBE_SERVICE,
|
|
4075
|
+
gl as DOCUMENT_INSPECT_SERVICE,
|
|
4076
|
+
Ut as DOCUMENT_OPERATIONS,
|
|
4077
|
+
Ia as EMPTY_WORKFLOW,
|
|
4078
|
+
sl as FEATURE_FOLDER_MANAGEMENT,
|
|
4079
|
+
cl as FEATURE_MESSAGE_REACTIONS,
|
|
4080
|
+
al as FEATURE_REMOTE_SEARCH,
|
|
4081
|
+
Se as FIXED_KINDS,
|
|
4082
|
+
Q as FIXED_LEVELS,
|
|
4083
|
+
we as FIXED_TYPES,
|
|
4084
|
+
Pn as FOLLOW_UP_HOURS,
|
|
4085
|
+
wn as HOUR_MS,
|
|
4086
|
+
wi as HTML_BODY_RE,
|
|
4087
|
+
R as INELIGIBLE,
|
|
4088
|
+
bl as INSTALLATION_HEADER,
|
|
4089
|
+
vr as INTERACTION_KIND,
|
|
4090
|
+
ol as InteractionParticipantRole,
|
|
4091
|
+
Wn as KB_FALLBACK_LOCALE,
|
|
4092
|
+
He as KB_LOCALES,
|
|
4093
|
+
Ie as LOOSE_STATUSES,
|
|
4094
|
+
Cn as MAIL_HINT_HEADERS,
|
|
4095
|
+
vi as MAX_ACTIONS,
|
|
4096
|
+
_n as MAX_ASSIGNMENT_TURNS,
|
|
4097
|
+
Ii as MAX_BLOCKS,
|
|
4098
|
+
Tt as MAX_COLLECTION_DEPTH,
|
|
4099
|
+
Ul as MAX_EDITABLE_FILE_BYTES,
|
|
4100
|
+
Mi as MAX_FIELDS,
|
|
4101
|
+
ki as MAX_LIST_ITEMS,
|
|
4102
|
+
Vs as MAX_MEMORY_BROWSE,
|
|
4103
|
+
Xs as MAX_MEMORY_BUDGET,
|
|
4104
|
+
zs as MAX_MEMORY_CHARS,
|
|
4105
|
+
qo as MAX_SHOWN_KEYS,
|
|
4106
|
+
ro as MAX_TOPIC_CANDIDATES,
|
|
4107
|
+
no as MAX_TOPIC_EXAMPLES,
|
|
4108
|
+
se as MAX_TOPIC_EXAMPLE_CHARS,
|
|
4109
|
+
Kl as MAX_VIEWABLE_FILE_BYTES,
|
|
4110
|
+
Ys as MIN_MEMORY_BUDGET,
|
|
4111
|
+
Wl as NAV_NOTICE_SLOT,
|
|
4112
|
+
El as NOTIFICATION_SOURCE_PROVIDER_GROUP,
|
|
4113
|
+
Qr as OFF_TRACK_GAP,
|
|
4114
|
+
Zs as ONBOARDING_SOURCE_PROVIDER_GROUP,
|
|
4115
|
+
ge as PAUSE_SNOOZED,
|
|
4116
|
+
he as PAUSE_WAITING_FOR_CUSTOMER,
|
|
4117
|
+
Me as PHONE_REGIONS,
|
|
4118
|
+
Kt as PRESENCE_ONLINE_WINDOW_MS,
|
|
4119
|
+
xo as PRESENCE_SURVIVES_OFFLINE,
|
|
4120
|
+
ea as PROFILE_TOOL_DISPOSITIONS,
|
|
4121
|
+
rl as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
|
|
4122
|
+
nl as PROVIDER_FEATURE_MESSAGE_WINDOW,
|
|
4123
|
+
oi as PUBLIC_EMAIL_DOMAINS,
|
|
4124
|
+
je as READ_STEP_TYPES,
|
|
4125
|
+
Yn as RELATED_SUBJECT_KINDS,
|
|
4126
|
+
Pt as RESERVED_STATUS_KEYS,
|
|
4127
|
+
Ac as RESERVED_TYPE_KEYS,
|
|
4128
|
+
Cl as RESOURCE_ATTACHED_SERVICE,
|
|
4129
|
+
kl as RESOURCE_DESCRIBE_SERVICE,
|
|
4130
|
+
Ol as RESOURCE_RESOLVE_SERVICE,
|
|
4131
|
+
vl as RESOURCE_SEARCH_SERVICE,
|
|
4132
|
+
br as SCHEDULE_ENTRY_SCOPE_KIND,
|
|
4133
|
+
Rl as SCOPE_READ_ROUTE,
|
|
4134
|
+
xl as SCOPE_RELATED_ROUTE,
|
|
4135
|
+
Gl as SETTINGS_CATEGORIES,
|
|
4136
|
+
Ss as SIGNATURE_INTENTS,
|
|
4137
|
+
Ln as SLA_HOURS_BY_PRIORITY,
|
|
4138
|
+
Pa as SLA_METRICS,
|
|
4139
|
+
Ua as SLA_PAUSE_REASONS,
|
|
4140
|
+
Nr as STEP_MAX_TOKENS_MAX,
|
|
4141
|
+
Cr as STEP_MAX_TOKENS_MIN,
|
|
4142
|
+
zr as STRATEGY_ITEM_SCOPE_KIND,
|
|
4143
|
+
On as SUMMARY_MIN_LAST_CHARS,
|
|
4144
|
+
vn as SUMMARY_MIN_MESSAGES,
|
|
4145
|
+
Bl as SYNC_RUN_MAX_ERRORS,
|
|
4146
|
+
Fl as SYNC_TARGET_PROVIDER_GROUP,
|
|
4147
|
+
En as TERMINAL_ASSIGNMENT_STATUSES,
|
|
4148
|
+
$r as TERMINAL_RUN_STATUSES,
|
|
4149
|
+
_a as TRIGGER_VARS,
|
|
4150
|
+
Xn as UNKNOWN_KIND,
|
|
4151
|
+
Yr as UNKNOWN_LEVEL_ORDER,
|
|
4152
|
+
ll as UNSUPPORTED,
|
|
4153
|
+
cn as USAGE_DIMENSIONS,
|
|
4154
|
+
ln as USAGE_DIMENSION_IDS,
|
|
4155
|
+
Ar as WORKSTREAM_SCOPE_KIND,
|
|
4156
|
+
uo as WORK_ACTIVITY_SCOPE_KIND,
|
|
4157
|
+
Qs as WORK_AREAS,
|
|
4158
|
+
gc as WORK_COMMENT_ADDED,
|
|
4159
|
+
wc as WORK_CYCLE_SYNC_KIND,
|
|
4160
|
+
hc as WORK_ITEM_ASSIGNED,
|
|
4161
|
+
co as WORK_ITEM_SCOPE_KIND,
|
|
4162
|
+
yc as WORK_ITEM_STATUS_CHANGED,
|
|
4163
|
+
lo as WORK_PROJECT_SCOPE_KIND,
|
|
4164
|
+
X as W_PRIORITY,
|
|
4165
|
+
fc as acceptExampleCandidate,
|
|
4166
|
+
Tr as actingIdentityKey,
|
|
4167
|
+
uc as activeWorkTypes,
|
|
4168
|
+
Ci as activityIconOf,
|
|
4169
|
+
Fi as activityJoinUrl,
|
|
4170
|
+
Jt as activitySnippet,
|
|
4171
|
+
Zt as activityTextParams,
|
|
4172
|
+
Ki as activityTimelineText,
|
|
4173
|
+
nn as activityTimestamp,
|
|
4174
|
+
M as activityTypeInfo,
|
|
4175
|
+
ha as actorKey,
|
|
4176
|
+
dc as addExampleCandidate,
|
|
4177
|
+
_e as addWorkingMs,
|
|
4178
|
+
wl as agePresenceEntry,
|
|
4179
|
+
Ao as aiAttachmentKind,
|
|
4180
|
+
Fc as aiAttachmentRejection,
|
|
4181
|
+
Re as aiBudgetLimit,
|
|
4182
|
+
Zi as aiBudgetPeriodKey,
|
|
4183
|
+
rn as aiBudgetPeriodStart,
|
|
4184
|
+
Ji as aiBudgetState,
|
|
4185
|
+
qi as aiVendorAcceptsAttachment,
|
|
4186
|
+
zi as aiVendorDefaultModel,
|
|
4187
|
+
Vi as aiVendorLabel,
|
|
4188
|
+
Xi as aiVendorNeedsBaseUrl,
|
|
4189
|
+
Yi as aiVendorsWith,
|
|
4190
|
+
Ht as appNameFromPath,
|
|
4191
|
+
ic as applyRounding,
|
|
4192
|
+
_s as applySignature,
|
|
4193
|
+
xr as approvalRate,
|
|
4194
|
+
cs as artifactBodyBytes,
|
|
4195
|
+
ls as artifactOutline,
|
|
4196
|
+
us as artifactToMarkdown,
|
|
4197
|
+
Ea as assignmentMismatch,
|
|
4198
|
+
hs as assignmentScopeKey,
|
|
4199
|
+
As as assignmentSubject,
|
|
4200
|
+
ta as belongsOnCalendar,
|
|
4201
|
+
Bi as buildActivityPreview,
|
|
4202
|
+
Jc as buildChannelIntents,
|
|
4203
|
+
ds as buildShareKeys,
|
|
4204
|
+
Xo as buildWindow,
|
|
4205
|
+
Zn as calendarDaysBetween,
|
|
4206
|
+
Te as calendarOf,
|
|
4207
|
+
Fs as canNestUnder,
|
|
4208
|
+
Va as canParent,
|
|
4209
|
+
na as capacityTotal,
|
|
4210
|
+
fa as capacityWeights,
|
|
4211
|
+
$i as carriesText,
|
|
4212
|
+
Hs as categoryLabel,
|
|
4213
|
+
mo as categoryOf,
|
|
4214
|
+
tl as channelKindForScheme,
|
|
4215
|
+
Ni as channelKindOf,
|
|
4216
|
+
nc as checkInOverdueMs,
|
|
4217
|
+
wa as clampStepMaxTokens,
|
|
4218
|
+
vs as classifyMail,
|
|
4219
|
+
eu as cleanMessageMarkdown,
|
|
4220
|
+
Ql as cleanMessageText,
|
|
4221
|
+
Vc as compareAssistRank,
|
|
4222
|
+
to as compareWorkTypes,
|
|
4223
|
+
q as countsAsPlanned,
|
|
4224
|
+
ra as coverageByPerson,
|
|
4225
|
+
sa as coverageFor,
|
|
4226
|
+
qn as coversWorkstream,
|
|
4227
|
+
It as cycleDayIndex,
|
|
4228
|
+
Lc as cycleOrder,
|
|
4229
|
+
Pc as cycleState,
|
|
4230
|
+
Es as decideAssignmentState,
|
|
4231
|
+
jl as decideCadence,
|
|
4232
|
+
Xc as decideIncomingCall,
|
|
4233
|
+
Vn as defaultLocaleOf,
|
|
4234
|
+
xc as defaultStatusKey,
|
|
4235
|
+
il as defineIntent,
|
|
4236
|
+
jn as depthOf,
|
|
4237
|
+
Tl as derivePresence,
|
|
4238
|
+
rs as describeClause,
|
|
4239
|
+
qc as disabledIntentsFromCapabilities,
|
|
4240
|
+
yl as documentKindOf,
|
|
4241
|
+
Fa as dueAtOf,
|
|
4242
|
+
oc as elapsedSeconds,
|
|
4243
|
+
Yl as emailDomain,
|
|
4244
|
+
Jl as endpointKey,
|
|
4245
|
+
nr as erlangC,
|
|
4246
|
+
$o as extractParams,
|
|
4247
|
+
zo as extractTerms,
|
|
4248
|
+
Qc as filterByEndpoint,
|
|
4249
|
+
Zc as filterByIntent,
|
|
4250
|
+
Io as filterByTargetScheme,
|
|
4251
|
+
ns as filterableDimensions,
|
|
4252
|
+
Z as findAiVendor,
|
|
4253
|
+
Ya as fixedLevelForName,
|
|
4254
|
+
_c as fixedTypeForName,
|
|
4255
|
+
Tc as fixedTypes,
|
|
4256
|
+
Al as flattenLocales,
|
|
4257
|
+
B as floorToPeriod,
|
|
4258
|
+
la as forecastIntervals,
|
|
4259
|
+
_r as formatActingIdentity,
|
|
4260
|
+
ac as formatClock,
|
|
4261
|
+
sc as formatHm,
|
|
4262
|
+
Mc as formatItemKey,
|
|
4263
|
+
F as formatPeriod,
|
|
4264
|
+
ja as formatSlaDuration,
|
|
4265
|
+
Hc as freshSources,
|
|
4266
|
+
ji as getActivitySeenUserIds,
|
|
4267
|
+
Ts as getContactEndpoints,
|
|
4268
|
+
$s as getShortTitle,
|
|
4269
|
+
Ds as getUrgencyScore,
|
|
4270
|
+
Da as hasReacted,
|
|
4271
|
+
Xa as healthCategory,
|
|
4272
|
+
qa as healthsInCategory,
|
|
4273
|
+
wt as heightOf,
|
|
4274
|
+
Ps as helpCenterText,
|
|
4275
|
+
Sa as humanizeAction,
|
|
4276
|
+
Or as interactionIdOf,
|
|
4277
|
+
mc as isAgentUser,
|
|
4278
|
+
xs as isAssigned,
|
|
4279
|
+
gs as isAssignmentTerminal,
|
|
4280
|
+
Mr as isAssignmentTrigger,
|
|
4281
|
+
va as isAutoReady,
|
|
4282
|
+
Hn as isAwaitingThem,
|
|
4283
|
+
Wi as isChatMessageActivity,
|
|
4284
|
+
Rs as isClosed,
|
|
4285
|
+
Pi as isConnectedType,
|
|
4286
|
+
Dl as isDeepLink,
|
|
4287
|
+
Gn as isDescendant,
|
|
4288
|
+
ws as isEligible,
|
|
4289
|
+
Gi as isEmailActivity,
|
|
4290
|
+
Zl as isHtmlBody,
|
|
4291
|
+
Ca as isInFlight,
|
|
4292
|
+
Rn as isInteractionUnseen,
|
|
4293
|
+
$l as isLandingPath,
|
|
4294
|
+
kn as isLikelyBulk,
|
|
4295
|
+
dt as isMessageShape,
|
|
4296
|
+
xi as isMessageType,
|
|
4297
|
+
Po as isMoreSpecificPattern,
|
|
4298
|
+
ft as isNoteShape,
|
|
4299
|
+
Vr as isOpenClock,
|
|
4300
|
+
Bc as isOutwardTool,
|
|
4301
|
+
Kn as isParked,
|
|
4302
|
+
Lr as isPaused,
|
|
4303
|
+
Li as isPlaybookAuthoredType,
|
|
4304
|
+
Xl as isPublicEmailDomain,
|
|
4305
|
+
Pl as isPublicPath,
|
|
4306
|
+
Fn as isReminderActive,
|
|
4307
|
+
Di as isReplyableType,
|
|
4308
|
+
Cs as isSlaAtRisk,
|
|
4309
|
+
Oa as isTerminal,
|
|
4310
|
+
Ms as isThreadLongEnough,
|
|
4311
|
+
Ui as isTranscriptType,
|
|
4312
|
+
Rc as isWorkClosed,
|
|
4313
|
+
lc as isWorkTypeVisible,
|
|
4314
|
+
Oc as itemDossierKeys,
|
|
4315
|
+
$ as kindFor,
|
|
4316
|
+
po as ladderFor,
|
|
4317
|
+
qr as levelIn,
|
|
4318
|
+
be as levelOrder,
|
|
4319
|
+
Ls as linkLabel,
|
|
4320
|
+
Qi as listeningAllowed,
|
|
4321
|
+
Ks as localeInstruction,
|
|
4322
|
+
Us as localeName,
|
|
4323
|
+
Bs as localesOf,
|
|
4324
|
+
Vl as looksLikeEmail,
|
|
4325
|
+
el as matchContactToIntents,
|
|
4326
|
+
Uo as matchPublicRoute,
|
|
4327
|
+
Gs as mcpCredentialScope,
|
|
4328
|
+
Ws as mcpToolPrefix,
|
|
4329
|
+
Ja as measureRatio,
|
|
4330
|
+
Hl as mergeShownKeys,
|
|
4331
|
+
qt as messageCountsAs,
|
|
4332
|
+
os as metricOption,
|
|
4333
|
+
Mt as minutesOn,
|
|
4334
|
+
ql as needsPhoneRegion,
|
|
4335
|
+
Ri as nestsUnderParent,
|
|
4336
|
+
za as nextLevelBelow,
|
|
4337
|
+
Ba as nextSlaClock,
|
|
4338
|
+
as as normalizeArtifactBlocks,
|
|
4339
|
+
Oi as normalizeBlocks,
|
|
4340
|
+
jt as normalizeEmail,
|
|
4341
|
+
D as normalizeExample,
|
|
4342
|
+
Sl as notificationPrefKey,
|
|
4343
|
+
Yo as novelty,
|
|
4344
|
+
pl as operationDescriptor,
|
|
4345
|
+
fl as operationsForKind,
|
|
4346
|
+
ie as overlapSeconds,
|
|
4347
|
+
ia as overlaps,
|
|
4348
|
+
Za as paceRatio,
|
|
4349
|
+
Is as parkMarksById,
|
|
4350
|
+
ma as parseActingIdentity,
|
|
4351
|
+
$a as parseClockMinutes,
|
|
4352
|
+
kc as parseItemKey,
|
|
4353
|
+
Do as pathToRegex,
|
|
4354
|
+
vt as patternFor,
|
|
4355
|
+
kt as patternStartTime,
|
|
4356
|
+
La as pauseBitFor,
|
|
4357
|
+
ts as periodsInRange,
|
|
4358
|
+
zl as phoneSuffix,
|
|
4359
|
+
ks as pickMailHeaders,
|
|
4360
|
+
pa as placeLumps,
|
|
4361
|
+
Yt as plainTextFromMarkdown,
|
|
4362
|
+
Ka as planSlaEvent,
|
|
4363
|
+
aa as plannedBillable,
|
|
4364
|
+
ur as plannedWorkTypeKey,
|
|
4365
|
+
Ir as playbookActor,
|
|
4366
|
+
ka as procedureOf,
|
|
4367
|
+
Cc as projectDossierKeys,
|
|
4368
|
+
Lo as publicBasePathFor,
|
|
4369
|
+
Ll as publicRoutePatterns,
|
|
4370
|
+
bs as reactionWakesAssignment,
|
|
4371
|
+
le as readPath,
|
|
4372
|
+
Ge as readStepError,
|
|
4373
|
+
Un as recencyOf,
|
|
4374
|
+
kr as refKey,
|
|
4375
|
+
ri as registrableDomain,
|
|
4376
|
+
io as rejectExampleCandidate,
|
|
4377
|
+
Js as relatedByDefault,
|
|
4378
|
+
ye as remainingMsOf,
|
|
4379
|
+
ir as requiredAgents,
|
|
4380
|
+
lr as requirementFor,
|
|
4381
|
+
To as resolveAccountCapabilities,
|
|
4382
|
+
ue as resolveActivityText,
|
|
4383
|
+
_o as resolveChannelIntents,
|
|
4384
|
+
Tn as resolveSignature,
|
|
4385
|
+
Il as resolveWorkMode,
|
|
4386
|
+
Nl as resourceKindOf,
|
|
4387
|
+
tc as rollupChildren,
|
|
4388
|
+
ga as runActor,
|
|
4389
|
+
xa as runInteractionId,
|
|
4390
|
+
hn as sanitizeInline,
|
|
4391
|
+
Fo as sanitizeTranscript,
|
|
4392
|
+
ua as scheduleEntryScopeKey,
|
|
4393
|
+
Ns as scoreInteraction,
|
|
4394
|
+
bc as scoreWorkItem,
|
|
4395
|
+
js as selectLenses,
|
|
4396
|
+
rr as serviceLevel,
|
|
4397
|
+
Yc as sessionsHoldCannotReach,
|
|
4398
|
+
zc as sessionsToHold,
|
|
4399
|
+
bt as shareKeyForTeam,
|
|
4400
|
+
yt as shareKeyForUser,
|
|
4401
|
+
fs as shareKeysForViewer,
|
|
4402
|
+
ca as shortfalls,
|
|
4403
|
+
Ml as shouldRunAudioPipeline,
|
|
4404
|
+
Ha as slaBadgeTone,
|
|
4405
|
+
Os as slaHoursByInbox,
|
|
4406
|
+
Bn as slaHoursFor,
|
|
4407
|
+
go as sortStatuses,
|
|
4408
|
+
So as sourceKey,
|
|
4409
|
+
Sr as spreadOverWeights,
|
|
4410
|
+
Nc as statusIn,
|
|
4411
|
+
Ma as stepsOf,
|
|
4412
|
+
Wa as strategyAncestorKeysFor,
|
|
4413
|
+
Ga as strategyDossierKeys,
|
|
4414
|
+
$t as strategyItemScopeKey,
|
|
4415
|
+
Xt as stripHtml,
|
|
4416
|
+
Na as subjectKeyOf,
|
|
4417
|
+
Ot as subjectOf,
|
|
4418
|
+
Wc as subjectRef,
|
|
4419
|
+
vc as suggestProjectKey,
|
|
4420
|
+
Qa as suggestedHealth,
|
|
4421
|
+
Ra as summarizeReactions,
|
|
4422
|
+
Aa as targetById,
|
|
4423
|
+
ba as targetForActivityType,
|
|
4424
|
+
rc as targetOrder,
|
|
4425
|
+
Qn as termsFor,
|
|
4426
|
+
wr as toActingIdentity,
|
|
4427
|
+
ot as toE164,
|
|
4428
|
+
ps as toolSourceKinds,
|
|
4429
|
+
so as topicOfferedForTeam,
|
|
4430
|
+
pc as topicsForTeam,
|
|
4431
|
+
or as trafficIntensity,
|
|
4432
|
+
oo as truncateExample,
|
|
4433
|
+
Sc as typeIn,
|
|
4434
|
+
Ec as typesFor,
|
|
4435
|
+
Dc as uniqueWorkStatusKey,
|
|
4436
|
+
cc as uniqueWorkTypeKey,
|
|
4437
|
+
un as usageMetricId,
|
|
4438
|
+
is as usageMetrics,
|
|
4439
|
+
$c as validateStatuses,
|
|
4440
|
+
ya as valueAtPath,
|
|
4441
|
+
Ee as waitHoursOf,
|
|
4442
|
+
ys as wakesAssignment,
|
|
4443
|
+
Ic as workActivityScopeKey,
|
|
4444
|
+
fo as workItemScopeKey,
|
|
4445
|
+
Lt as workProjectScopeKey,
|
|
4446
|
+
ec as workRatio,
|
|
4447
|
+
ho as workStatusKey,
|
|
4448
|
+
eo as workTypeKey,
|
|
4449
|
+
me as workingMsBetween,
|
|
4450
|
+
da as workstreamScopeKey
|
|
3967
4451
|
};
|