@opencxh/domain 1.161.0 → 1.164.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities/custom-field-def/types.d.ts +29 -2
- package/dist/entities/time-entry/index.d.ts +1 -0
- package/dist/entities/time-entry/types.d.ts +36 -1
- package/dist/entities/time-entry/work-type.d.ts +44 -0
- package/dist/entities/time-entry/work-type.test.d.ts +1 -0
- package/dist/entities/work/index.d.ts +3 -0
- package/dist/entities/work/keys.d.ts +57 -0
- package/dist/entities/work/keys.test.d.ts +1 -0
- package/dist/entities/work/ladder.d.ts +97 -0
- package/dist/entities/work/ladder.test.d.ts +1 -0
- package/dist/entities/work/types.d.ts +255 -0
- package/dist/index.cjs +8 -8
- package/dist/index.d.ts +2 -0
- package/dist/index.js +930 -790
- package/dist/platform/resource-source.d.ts +94 -0
- package/dist/platform/scope.d.ts +19 -0
- package/dist/platform/sdk.d.ts +14 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
function
|
|
1
|
+
function Cn(e) {
|
|
2
2
|
return e.type === "EMAIL_RECEIVED" || e.type === "EMAIL_SENT";
|
|
3
3
|
}
|
|
4
|
-
function
|
|
4
|
+
function wn(e) {
|
|
5
5
|
return e.type === "CHAT_MESSAGE_SENT" || e.type === "CHAT_MESSAGE_RECEIVED";
|
|
6
6
|
}
|
|
7
|
-
const
|
|
7
|
+
const R = 10, T = 10, I = 10, M = 5, we = /* @__PURE__ */ new Set([
|
|
8
8
|
"header",
|
|
9
9
|
"section",
|
|
10
10
|
"context",
|
|
@@ -14,71 +14,71 @@ const L = 10, _ = 10, I = 10, M = 5, Me = /* @__PURE__ */ new Set([
|
|
|
14
14
|
"actions",
|
|
15
15
|
"attachments"
|
|
16
16
|
]);
|
|
17
|
-
function
|
|
17
|
+
function k(e) {
|
|
18
18
|
if (typeof e == "string") return e.length > 0;
|
|
19
19
|
if (!e || typeof e != "object") return !1;
|
|
20
20
|
const t = e;
|
|
21
21
|
return typeof t.key == "string" || typeof t.value == "string";
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Nn(e, t = () => {
|
|
24
24
|
}) {
|
|
25
25
|
if (!Array.isArray(e)) return [];
|
|
26
26
|
const n = [];
|
|
27
|
-
for (const
|
|
28
|
-
if (n.length >=
|
|
29
|
-
t("more than " +
|
|
27
|
+
for (const r of e) {
|
|
28
|
+
if (n.length >= R) {
|
|
29
|
+
t("more than " + R + " blocks; the rest was dropped");
|
|
30
30
|
break;
|
|
31
31
|
}
|
|
32
|
-
if (!
|
|
33
|
-
const
|
|
34
|
-
if (!
|
|
35
|
-
t("unknown block type " + String(
|
|
32
|
+
if (!r || typeof r != "object") continue;
|
|
33
|
+
const i = r;
|
|
34
|
+
if (!we.has(i.type)) {
|
|
35
|
+
t("unknown block type " + String(i.type));
|
|
36
36
|
continue;
|
|
37
37
|
}
|
|
38
|
-
switch (
|
|
38
|
+
switch (i.type) {
|
|
39
39
|
case "header":
|
|
40
|
-
if (!
|
|
40
|
+
if (!k(i.text)) {
|
|
41
41
|
t("a header without text");
|
|
42
42
|
continue;
|
|
43
43
|
}
|
|
44
44
|
break;
|
|
45
45
|
case "context":
|
|
46
|
-
if (!
|
|
46
|
+
if (!k(i.text)) {
|
|
47
47
|
t("a context block without text");
|
|
48
48
|
continue;
|
|
49
49
|
}
|
|
50
50
|
break;
|
|
51
51
|
case "image":
|
|
52
|
-
if (!
|
|
52
|
+
if (!i.url || !i.alt) {
|
|
53
53
|
t("an image without url or alt");
|
|
54
54
|
continue;
|
|
55
55
|
}
|
|
56
56
|
break;
|
|
57
57
|
case "section":
|
|
58
|
-
Array.isArray(
|
|
58
|
+
Array.isArray(i.fields) && i.fields.length > T && (t("more than " + T + " fields in a section"), i.fields = i.fields.slice(0, T));
|
|
59
59
|
break;
|
|
60
60
|
case "list":
|
|
61
|
-
if (!Array.isArray(
|
|
61
|
+
if (!Array.isArray(i.items) || i.items.length === 0) {
|
|
62
62
|
t("a list without items");
|
|
63
63
|
continue;
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
i.items.length > I && (t("more than " + I + " list items"), i.items = i.items.slice(0, I));
|
|
66
66
|
break;
|
|
67
67
|
case "actions": {
|
|
68
|
-
const a = Array.isArray(
|
|
68
|
+
const a = Array.isArray(i.elements) ? i.elements : [], o = a.filter((s) => s && s.action_id && s.invoke && k(s.text));
|
|
69
69
|
if (o.length !== a.length && t("an action without action_id, invoke or text"), o.length === 0) continue;
|
|
70
|
-
o.length > M && t("more than " + M + " actions"),
|
|
70
|
+
o.length > M && t("more than " + M + " actions"), i.elements = o.slice(0, M);
|
|
71
71
|
break;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
n.push(
|
|
74
|
+
n.push(i);
|
|
75
75
|
}
|
|
76
76
|
return n;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function Ne(e) {
|
|
79
79
|
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();
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function A(e) {
|
|
82
82
|
if (!e || e < 0) return "";
|
|
83
83
|
const t = Math.floor(e / 60), n = Math.floor(e % 60);
|
|
84
84
|
return `${t}:${n.toString().padStart(2, "0")}`;
|
|
@@ -86,13 +86,13 @@ function y(e) {
|
|
|
86
86
|
function D(e) {
|
|
87
87
|
return e ? ` — ${Math.floor(e / 60)}m ${e % 60}s` : "";
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function C(e) {
|
|
90
90
|
return e?.split("@")?.[0] || e || "";
|
|
91
91
|
}
|
|
92
92
|
function b(e) {
|
|
93
93
|
return e.map((t) => t.name).join(", ");
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function P(e) {
|
|
96
96
|
return e === "meeting" ? "Meeting" : e === "video" ? "Video call" : "Audio call";
|
|
97
97
|
}
|
|
98
98
|
const m = {
|
|
@@ -102,7 +102,7 @@ const m = {
|
|
|
102
102
|
channelKind: "voice",
|
|
103
103
|
icon: "phone",
|
|
104
104
|
snippet: () => "Gesprek gestart",
|
|
105
|
-
timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${
|
|
105
|
+
timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${C(e.payload.from)}` : `Outbound call started — ${C(e.payload.to)}`
|
|
106
106
|
},
|
|
107
107
|
VOICE_CALL_ANSWERED: {
|
|
108
108
|
shape: "event",
|
|
@@ -129,7 +129,7 @@ const m = {
|
|
|
129
129
|
shape: "event",
|
|
130
130
|
channelKind: "voice",
|
|
131
131
|
icon: "phone",
|
|
132
|
-
snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${
|
|
132
|
+
snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${A(e.payload.duration)})` : ""}`,
|
|
133
133
|
timeline: (e) => `Call ended${D(e.payload.duration)}`
|
|
134
134
|
},
|
|
135
135
|
VOICE_CALL_MISSED: {
|
|
@@ -137,7 +137,7 @@ const m = {
|
|
|
137
137
|
channelKind: "voice",
|
|
138
138
|
icon: "phone",
|
|
139
139
|
snippet: () => "Gemiste oproep",
|
|
140
|
-
timeline: (e) => `Missed call — ${
|
|
140
|
+
timeline: (e) => `Missed call — ${C(e.payload.from)}`
|
|
141
141
|
},
|
|
142
142
|
VOICE_CALL_FAILED: {
|
|
143
143
|
shape: "event",
|
|
@@ -184,7 +184,7 @@ const m = {
|
|
|
184
184
|
shape: "event",
|
|
185
185
|
channelKind: "video",
|
|
186
186
|
icon: "video",
|
|
187
|
-
snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${
|
|
187
|
+
snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${A(e.payload.duration)})` : ""}`,
|
|
188
188
|
timeline: () => "Video call ended"
|
|
189
189
|
},
|
|
190
190
|
VIDEO_CALL_MISSED: {
|
|
@@ -212,7 +212,7 @@ const m = {
|
|
|
212
212
|
replyable: !0,
|
|
213
213
|
carriesText: !0,
|
|
214
214
|
countsAs: "inbound_message",
|
|
215
|
-
snippet:
|
|
215
|
+
snippet: K
|
|
216
216
|
},
|
|
217
217
|
EMAIL_SENT: {
|
|
218
218
|
shape: "message",
|
|
@@ -222,7 +222,7 @@ const m = {
|
|
|
222
222
|
replyable: !0,
|
|
223
223
|
carriesText: !0,
|
|
224
224
|
countsAs: "outbound_message",
|
|
225
|
-
snippet:
|
|
225
|
+
snippet: K
|
|
226
226
|
},
|
|
227
227
|
/* ---- chat ---- */
|
|
228
228
|
CHAT_MESSAGE_SENT: {
|
|
@@ -279,15 +279,15 @@ const m = {
|
|
|
279
279
|
channelKind: "chat",
|
|
280
280
|
icon: "message-circle",
|
|
281
281
|
snippet: () => "Gesprek gestart",
|
|
282
|
-
timeline: (e) => `${
|
|
282
|
+
timeline: (e) => `${P(e.payload.callType)} started${e.payload.initiator ? ` by ${e.payload.initiator.name}` : ""}`,
|
|
283
283
|
joinUrl: (e) => e.payload.joinUrl
|
|
284
284
|
},
|
|
285
285
|
CHAT_CALL_ENDED: {
|
|
286
286
|
shape: "event",
|
|
287
287
|
channelKind: "chat",
|
|
288
288
|
icon: "message-circle",
|
|
289
|
-
snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${
|
|
290
|
-
timeline: (e) => `${
|
|
289
|
+
snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${A(e.payload.duration)})` : ""}`,
|
|
290
|
+
timeline: (e) => `${P(e.payload.callType)} ended${D(e.payload.duration)}`,
|
|
291
291
|
joinUrl: (e) => e.payload.joinUrl
|
|
292
292
|
},
|
|
293
293
|
CHAT_EVENT: {
|
|
@@ -376,7 +376,7 @@ const m = {
|
|
|
376
376
|
MEETING_ENDED: {
|
|
377
377
|
shape: "event",
|
|
378
378
|
icon: "calendar",
|
|
379
|
-
snippet: (e) => `Vergadering beëindigd${e.payload.duration ? ` (${
|
|
379
|
+
snippet: (e) => `Vergadering beëindigd${e.payload.duration ? ` (${A(e.payload.duration)})` : ""}`,
|
|
380
380
|
timeline: () => "Meeting ended"
|
|
381
381
|
},
|
|
382
382
|
MEETING_PARTICIPANT_JOINED: {
|
|
@@ -413,61 +413,61 @@ const m = {
|
|
|
413
413
|
timeline: (e, t) => `Assigned by ${t}`
|
|
414
414
|
}
|
|
415
415
|
};
|
|
416
|
-
function
|
|
417
|
-
const t = e.payload, n = t.bodySnippet?.trim() ||
|
|
416
|
+
function K(e) {
|
|
417
|
+
const t = e.payload, n = t.bodySnippet?.trim() || Ne(t.body ?? "");
|
|
418
418
|
return t.subject ? `${t.subject} — ${n}` : n;
|
|
419
419
|
}
|
|
420
420
|
function d(e) {
|
|
421
421
|
return m[e];
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function vn(e) {
|
|
424
424
|
return d(e)?.icon ?? "circle";
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function xn(e) {
|
|
427
427
|
return d(e)?.channelKind;
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function ce(e) {
|
|
430
430
|
return e === "message" || e === "note";
|
|
431
431
|
}
|
|
432
|
-
function
|
|
433
|
-
return
|
|
432
|
+
function On(e) {
|
|
433
|
+
return ce(d(e)?.shape);
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function $n(e) {
|
|
436
436
|
return d(e)?.replyable === !0;
|
|
437
437
|
}
|
|
438
|
-
function
|
|
438
|
+
function Ln(e) {
|
|
439
439
|
return d(e)?.carriesText === !0;
|
|
440
440
|
}
|
|
441
|
-
function
|
|
441
|
+
function Rn(e) {
|
|
442
442
|
return d(e)?.countsAs;
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function Dn(e) {
|
|
445
445
|
return d(e)?.playbookAuthored === !0;
|
|
446
446
|
}
|
|
447
|
-
function
|
|
447
|
+
function Pn(e) {
|
|
448
448
|
return d(e)?.connected === !0;
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function Kn(e) {
|
|
451
451
|
const t = d(e);
|
|
452
452
|
return t?.shape === "artifact" && t?.carriesText === !0;
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function ve(e) {
|
|
455
455
|
const t = d(e.type)?.snippet;
|
|
456
456
|
return t ? t(e) : "";
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function Un(e, t) {
|
|
459
459
|
const n = d(e.type)?.timeline;
|
|
460
460
|
return n ? n(e, t) : e.type.replace(/_/g, " ").toLowerCase();
|
|
461
461
|
}
|
|
462
|
-
function
|
|
462
|
+
function jn(e) {
|
|
463
463
|
const t = d(e.type)?.joinUrl;
|
|
464
464
|
return t ? t(e) : void 0;
|
|
465
465
|
}
|
|
466
466
|
function x(e, t) {
|
|
467
467
|
let n = e;
|
|
468
|
-
for (const
|
|
468
|
+
for (const r of t.split(".")) {
|
|
469
469
|
if (n == null || typeof n != "object") return "";
|
|
470
|
-
n = n[
|
|
470
|
+
n = n[r];
|
|
471
471
|
}
|
|
472
472
|
return n == null ? "" : typeof n == "string" ? n : typeof n == "number" || typeof n == "boolean" ? String(n) : "";
|
|
473
473
|
}
|
|
@@ -476,20 +476,20 @@ function O(e, t, n) {
|
|
|
476
476
|
if (typeof e == "string") return e || null;
|
|
477
477
|
if ("value" in e)
|
|
478
478
|
return x(t, e.value) || null;
|
|
479
|
-
const
|
|
479
|
+
const r = {};
|
|
480
480
|
for (const [a, o] of Object.entries(e.params ?? {}))
|
|
481
|
-
|
|
482
|
-
const
|
|
483
|
-
return
|
|
481
|
+
r[a] = x(t, o);
|
|
482
|
+
const i = n(e.key, r);
|
|
483
|
+
return i === e.key ? null : i;
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function xe(e, t) {
|
|
486
486
|
if (!e || typeof e == "string" || "value" in e) return null;
|
|
487
487
|
const n = {};
|
|
488
|
-
for (const [
|
|
489
|
-
n[
|
|
488
|
+
for (const [r, i] of Object.entries(e.params ?? {}))
|
|
489
|
+
n[r] = x(t, i);
|
|
490
490
|
return { key: e.key, params: n };
|
|
491
491
|
}
|
|
492
|
-
const
|
|
492
|
+
const Oe = (e) => e;
|
|
493
493
|
function U(e) {
|
|
494
494
|
const t = m[e];
|
|
495
495
|
return {
|
|
@@ -506,7 +506,7 @@ function U(e) {
|
|
|
506
506
|
displayNameKey: t.displayNameKey
|
|
507
507
|
};
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function j(e) {
|
|
510
510
|
return {
|
|
511
511
|
type: e.type,
|
|
512
512
|
shape: e.shape,
|
|
@@ -521,21 +521,21 @@ function K(e) {
|
|
|
521
521
|
displayNameKey: e.displayNameKey
|
|
522
522
|
};
|
|
523
523
|
}
|
|
524
|
-
class
|
|
525
|
-
constructor(t = [], n =
|
|
524
|
+
class $e {
|
|
525
|
+
constructor(t = [], n = Oe) {
|
|
526
526
|
this.translate = n;
|
|
527
|
-
for (const
|
|
528
|
-
|
|
527
|
+
for (const r of t)
|
|
528
|
+
r?.type && (r.type in m || this.declared.has(r.type) || this.declared.set(r.type, r));
|
|
529
529
|
}
|
|
530
530
|
declared = /* @__PURE__ */ new Map();
|
|
531
531
|
get(t) {
|
|
532
532
|
if (t in m) return U(t);
|
|
533
533
|
const n = this.declared.get(t);
|
|
534
|
-
return n ?
|
|
534
|
+
return n ? j(n) : void 0;
|
|
535
535
|
}
|
|
536
536
|
/** Alles wat als trigger aangeboden mag worden, ingebouwd en gedeclareerd. */
|
|
537
537
|
triggerable() {
|
|
538
|
-
const t = Object.keys(m).filter((
|
|
538
|
+
const t = Object.keys(m).filter((r) => m[r].triggerable).map(U), n = [...this.declared.values()].map(j).filter((r) => r.triggerable);
|
|
539
539
|
return [...t, ...n];
|
|
540
540
|
}
|
|
541
541
|
/**
|
|
@@ -544,17 +544,17 @@ class Ne {
|
|
|
544
544
|
* typenaam — dezelfde regel die de feed altijd al toonde voor onbekende types.
|
|
545
545
|
*/
|
|
546
546
|
timelineText(t, n) {
|
|
547
|
-
const
|
|
548
|
-
if (
|
|
549
|
-
const
|
|
550
|
-
return O(
|
|
547
|
+
const r = m[t.type];
|
|
548
|
+
if (r?.timeline) return r.timeline(t, n);
|
|
549
|
+
const i = this.declared.get(t.type);
|
|
550
|
+
return O(i?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
|
|
551
551
|
}
|
|
552
552
|
/** De regel voor de inboxlijst. Leeg wanneer het type niets te tonen heeft. */
|
|
553
553
|
snippet(t) {
|
|
554
554
|
const n = m[t.type];
|
|
555
555
|
if (n?.snippet) return n.snippet(t);
|
|
556
|
-
const
|
|
557
|
-
return O(
|
|
556
|
+
const r = this.declared.get(t.type);
|
|
557
|
+
return O(r?.text, t, this.translate) ?? "";
|
|
558
558
|
}
|
|
559
559
|
/** De descriptor zoals hij binnenkwam; nodig om `text` als sleutel op te slaan. */
|
|
560
560
|
descriptor(t) {
|
|
@@ -579,7 +579,7 @@ class Ne {
|
|
|
579
579
|
* {@link ResolvedActivityType}.
|
|
580
580
|
*/
|
|
581
581
|
isMessage(t) {
|
|
582
|
-
return
|
|
582
|
+
return ce(this.get(t)?.shape);
|
|
583
583
|
}
|
|
584
584
|
/** Kan een mens hierop antwoorden? Notities niet — die gaan nergens heen. */
|
|
585
585
|
isReplyable(t) {
|
|
@@ -607,33 +607,33 @@ class Ne {
|
|
|
607
607
|
return this.translate;
|
|
608
608
|
}
|
|
609
609
|
}
|
|
610
|
-
const
|
|
611
|
-
function
|
|
610
|
+
const Gn = new $e(), G = 140;
|
|
611
|
+
function Le(e) {
|
|
612
612
|
const t = e.trim();
|
|
613
|
-
return t.length <=
|
|
613
|
+
return t.length <= G ? t : t.slice(0, G - 1).trimEnd() + "…";
|
|
614
614
|
}
|
|
615
|
-
function
|
|
616
|
-
const n =
|
|
615
|
+
function Bn(e, t) {
|
|
616
|
+
const n = xe(t?.text, e), r = t ? O(t.text, e, (i) => i) : null;
|
|
617
617
|
return {
|
|
618
618
|
activityId: e.id,
|
|
619
619
|
type: e.type,
|
|
620
|
-
snippet:
|
|
620
|
+
snippet: Le(r ?? ve(e)),
|
|
621
621
|
authorName: e.author?.name ?? "",
|
|
622
622
|
direction: e.direction,
|
|
623
623
|
createdAt: e.createdAt ?? Date.now(),
|
|
624
624
|
...n ? { snippetKey: n.key, snippetParams: n.params } : {}
|
|
625
625
|
};
|
|
626
626
|
}
|
|
627
|
-
function
|
|
628
|
-
const
|
|
629
|
-
if (!
|
|
630
|
-
const
|
|
631
|
-
return e.author.type === "user" && e.author.id &&
|
|
627
|
+
function Fn(e, t, n = []) {
|
|
628
|
+
const r = e.createdAt;
|
|
629
|
+
if (!r) return [];
|
|
630
|
+
const i = new Set(n);
|
|
631
|
+
return e.author.type === "user" && e.author.id && i.add(e.author.id), Object.entries(t).filter(([a, o]) => o >= r && !i.has(a)).map(([a]) => a);
|
|
632
632
|
}
|
|
633
|
-
function
|
|
633
|
+
function Vn(e) {
|
|
634
634
|
return e.createdAt ?? 0;
|
|
635
635
|
}
|
|
636
|
-
const
|
|
636
|
+
const Hn = [
|
|
637
637
|
{ id: "agent", label: "Agent", labelSource: "user" },
|
|
638
638
|
{ id: "team", label: "Team", labelSource: "team" },
|
|
639
639
|
{ id: "inbox", label: "Inbox", labelSource: "inbox" },
|
|
@@ -643,54 +643,54 @@ const $n = [
|
|
|
643
643
|
{ id: "handledBy", label: "Afhandelaar", labelSource: "raw" },
|
|
644
644
|
{ id: "time", label: "Tijd", labelSource: "raw" }
|
|
645
645
|
];
|
|
646
|
-
function
|
|
646
|
+
function Wn(e) {
|
|
647
647
|
const t = [];
|
|
648
648
|
for (const n of Object.keys(e))
|
|
649
|
-
for (const
|
|
650
|
-
t.push({ lang: n, key:
|
|
649
|
+
for (const r of Object.keys(e[n]))
|
|
650
|
+
t.push({ lang: n, key: r, value: e[n][r] });
|
|
651
651
|
return t;
|
|
652
652
|
}
|
|
653
653
|
function w(e) {
|
|
654
654
|
return e < 10 ? `0${e}` : `${e}`;
|
|
655
655
|
}
|
|
656
|
-
function
|
|
657
|
-
const n = new Date(e),
|
|
658
|
-
return t === "day" ?
|
|
656
|
+
function Re(e, t) {
|
|
657
|
+
const n = new Date(e), r = `${n.getUTCFullYear()}-${w(n.getUTCMonth() + 1)}-${w(n.getUTCDate())}`;
|
|
658
|
+
return t === "day" ? r : `${r}T${w(n.getUTCHours())}`;
|
|
659
659
|
}
|
|
660
|
-
function
|
|
660
|
+
function De(e, t) {
|
|
661
661
|
const n = new Date(e);
|
|
662
662
|
return n.setUTCMinutes(0, 0, 0), t === "day" && n.setUTCHours(0), n.getTime();
|
|
663
663
|
}
|
|
664
|
-
const
|
|
665
|
-
function
|
|
666
|
-
const
|
|
667
|
-
for (let a =
|
|
668
|
-
|
|
669
|
-
return
|
|
664
|
+
const Pe = 36e5, Ke = 864e5;
|
|
665
|
+
function zn(e, t, n) {
|
|
666
|
+
const r = n === "hour" ? Pe : Ke, i = [];
|
|
667
|
+
for (let a = De(e, n); a <= t; a += r)
|
|
668
|
+
i.push(Re(a, n));
|
|
669
|
+
return i;
|
|
670
670
|
}
|
|
671
|
-
const
|
|
671
|
+
const Ue = [
|
|
672
672
|
{ id: "resource", label: "Resource", labelSource: "raw" },
|
|
673
673
|
{ id: "origin", label: "Herkomst", labelSource: "raw" }
|
|
674
|
-
],
|
|
675
|
-
function
|
|
674
|
+
], je = Ue.map((e) => e.id);
|
|
675
|
+
function Ge(e, t) {
|
|
676
676
|
return `${e}.usage.${t}`;
|
|
677
677
|
}
|
|
678
|
-
function
|
|
678
|
+
function Xn(e, t) {
|
|
679
679
|
return t.map((n) => ({
|
|
680
|
-
id:
|
|
680
|
+
id: Ge(e, n.unit),
|
|
681
681
|
label: n.label,
|
|
682
682
|
category: "Verbruik",
|
|
683
683
|
valueType: n.valueType ?? "count",
|
|
684
684
|
aggregation: "sum",
|
|
685
685
|
supportedDimensions: [
|
|
686
686
|
"provider",
|
|
687
|
-
...
|
|
687
|
+
...je,
|
|
688
688
|
...n.extraDimensions ?? [],
|
|
689
689
|
"time"
|
|
690
690
|
]
|
|
691
691
|
}));
|
|
692
692
|
}
|
|
693
|
-
const
|
|
693
|
+
const ue = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), B = 200, F = 100, V = 200, H = 12, W = 4, de = 4e3, N = 500, Yn = 256 * 1024, Be = /* @__PURE__ */ new Set([
|
|
694
694
|
"heading",
|
|
695
695
|
"paragraph",
|
|
696
696
|
"list",
|
|
@@ -700,94 +700,94 @@ const ce = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]
|
|
|
700
700
|
"table",
|
|
701
701
|
"kpi",
|
|
702
702
|
"callout"
|
|
703
|
-
]),
|
|
704
|
-
function
|
|
703
|
+
]), Fe = ["http:", "https:", "mailto:", "tel:"], Ve = /^[a-z][a-z0-9+.-]*:/i;
|
|
704
|
+
function pe(e) {
|
|
705
705
|
const t = e.trim().replace(/^<|>$/g, "");
|
|
706
706
|
if (!t) return !1;
|
|
707
|
-
const n =
|
|
708
|
-
return n ?
|
|
707
|
+
const n = Ve.exec(t)?.[0];
|
|
708
|
+
return n ? Fe.includes(n.toLowerCase()) : !t.startsWith("//");
|
|
709
709
|
}
|
|
710
|
-
const
|
|
711
|
-
function
|
|
710
|
+
const He = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
|
|
711
|
+
function We(e) {
|
|
712
712
|
let t = "", n = 0;
|
|
713
713
|
for (; n < e.length; ) {
|
|
714
|
-
const
|
|
715
|
-
if (e[n] !== "[" && !
|
|
714
|
+
const r = e[n] === "!" && e[n + 1] === "[";
|
|
715
|
+
if (e[n] !== "[" && !r) {
|
|
716
716
|
t += e[n], n += 1;
|
|
717
717
|
continue;
|
|
718
718
|
}
|
|
719
|
-
const
|
|
719
|
+
const i = n + (r ? 2 : 1), a = z(e, i, "[", "]");
|
|
720
720
|
if (a < 0 || e[a + 1] !== "(") {
|
|
721
721
|
t += e[n], n += 1;
|
|
722
722
|
continue;
|
|
723
723
|
}
|
|
724
|
-
const o =
|
|
724
|
+
const o = z(e, a + 2, "(", ")");
|
|
725
725
|
if (o < 0) {
|
|
726
726
|
t += e[n], n += 1;
|
|
727
727
|
continue;
|
|
728
728
|
}
|
|
729
|
-
const s = e.slice(
|
|
730
|
-
t +=
|
|
729
|
+
const s = e.slice(i, a), l = e.slice(a + 2, o).trim().split(/\s+/)[0] ?? "";
|
|
730
|
+
t += r || !pe(l) ? s : e.slice(n, o + 1), n = o + 1;
|
|
731
731
|
}
|
|
732
732
|
return t;
|
|
733
733
|
}
|
|
734
|
-
function
|
|
735
|
-
let
|
|
734
|
+
function z(e, t, n, r) {
|
|
735
|
+
let i = 1;
|
|
736
736
|
for (let a = t; a < e.length; a += 1) {
|
|
737
737
|
if (e[a] === "\\") {
|
|
738
738
|
a += 1;
|
|
739
739
|
continue;
|
|
740
740
|
}
|
|
741
|
-
if (e[a] === n)
|
|
742
|
-
else if (e[a] ===
|
|
741
|
+
if (e[a] === n) i += 1;
|
|
742
|
+
else if (e[a] === r && (i -= 1, i === 0))
|
|
743
743
|
return a;
|
|
744
744
|
}
|
|
745
745
|
return -1;
|
|
746
746
|
}
|
|
747
|
-
function
|
|
748
|
-
return
|
|
749
|
-
|
|
750
|
-
(t, n,
|
|
747
|
+
function ze(e) {
|
|
748
|
+
return We(e).replace(
|
|
749
|
+
He,
|
|
750
|
+
(t, n, r) => pe(r) ? t : ""
|
|
751
751
|
);
|
|
752
752
|
}
|
|
753
|
-
function u(e, t =
|
|
754
|
-
return typeof e == "string" ?
|
|
753
|
+
function u(e, t = de) {
|
|
754
|
+
return typeof e == "string" ? ze(e).slice(0, t) : "";
|
|
755
755
|
}
|
|
756
|
-
function
|
|
756
|
+
function Xe(e, t = de) {
|
|
757
757
|
return typeof e == "string" ? e.slice(0, t) : "";
|
|
758
758
|
}
|
|
759
|
-
function
|
|
760
|
-
return typeof e == "string" &&
|
|
759
|
+
function Ye(e, t = "info") {
|
|
760
|
+
return typeof e == "string" && ue.has(e) ? e : t;
|
|
761
761
|
}
|
|
762
|
-
function
|
|
762
|
+
function qn(e, t = () => {
|
|
763
763
|
}) {
|
|
764
764
|
if (!Array.isArray(e)) return [];
|
|
765
765
|
const n = [];
|
|
766
|
-
for (const
|
|
767
|
-
if (n.length >=
|
|
768
|
-
t("more than " +
|
|
766
|
+
for (const r of e) {
|
|
767
|
+
if (n.length >= B) {
|
|
768
|
+
t("more than " + B + " blocks; the rest was dropped");
|
|
769
769
|
break;
|
|
770
770
|
}
|
|
771
|
-
if (!
|
|
772
|
-
const
|
|
773
|
-
if (!
|
|
774
|
-
t("unknown block type " + String(
|
|
771
|
+
if (!r || typeof r != "object") continue;
|
|
772
|
+
const i = r;
|
|
773
|
+
if (!Be.has(i.type)) {
|
|
774
|
+
t("unknown block type " + String(i.type));
|
|
775
775
|
continue;
|
|
776
776
|
}
|
|
777
|
-
const a = typeof
|
|
778
|
-
switch (
|
|
777
|
+
const a = typeof i.block_id == "string" ? { block_id: i.block_id } : {};
|
|
778
|
+
switch (i.type) {
|
|
779
779
|
case "heading": {
|
|
780
|
-
const o = u(
|
|
780
|
+
const o = u(i.text);
|
|
781
781
|
if (!o) {
|
|
782
782
|
t("a heading without text");
|
|
783
783
|
continue;
|
|
784
784
|
}
|
|
785
|
-
const s =
|
|
785
|
+
const s = i.level === 2 || i.level === 3 ? i.level : 1;
|
|
786
786
|
n.push({ ...a, type: "heading", level: s, text: o });
|
|
787
787
|
break;
|
|
788
788
|
}
|
|
789
789
|
case "paragraph": {
|
|
790
|
-
const o = u(
|
|
790
|
+
const o = u(i.text);
|
|
791
791
|
if (!o) {
|
|
792
792
|
t("a paragraph without text");
|
|
793
793
|
continue;
|
|
@@ -796,7 +796,7 @@ function Un(e, t = () => {
|
|
|
796
796
|
break;
|
|
797
797
|
}
|
|
798
798
|
case "quote": {
|
|
799
|
-
const o = u(
|
|
799
|
+
const o = u(i.text);
|
|
800
800
|
if (!o) {
|
|
801
801
|
t("a quote without text");
|
|
802
802
|
continue;
|
|
@@ -805,12 +805,12 @@ function Un(e, t = () => {
|
|
|
805
805
|
break;
|
|
806
806
|
}
|
|
807
807
|
case "code": {
|
|
808
|
-
const o =
|
|
808
|
+
const o = Xe(i.text);
|
|
809
809
|
if (!o) {
|
|
810
810
|
t("a code block without text");
|
|
811
811
|
continue;
|
|
812
812
|
}
|
|
813
|
-
const s = typeof
|
|
813
|
+
const s = typeof i.lang == "string" ? { lang: i.lang.slice(0, 32) } : {};
|
|
814
814
|
n.push({ ...a, type: "code", ...s, text: o });
|
|
815
815
|
break;
|
|
816
816
|
}
|
|
@@ -818,10 +818,10 @@ function Un(e, t = () => {
|
|
|
818
818
|
n.push({ ...a, type: "divider" });
|
|
819
819
|
break;
|
|
820
820
|
case "list": {
|
|
821
|
-
const o = Array.isArray(
|
|
821
|
+
const o = Array.isArray(i.items) ? i.items : [], s = [];
|
|
822
822
|
for (const p of o) {
|
|
823
|
-
if (s.length >=
|
|
824
|
-
t("more than " +
|
|
823
|
+
if (s.length >= F) {
|
|
824
|
+
t("more than " + F + " list items");
|
|
825
825
|
break;
|
|
826
826
|
}
|
|
827
827
|
const f = u(p?.text);
|
|
@@ -833,36 +833,36 @@ function Un(e, t = () => {
|
|
|
833
833
|
t("a list without usable items");
|
|
834
834
|
continue;
|
|
835
835
|
}
|
|
836
|
-
const l =
|
|
836
|
+
const l = i.style === "numbered" ? "numbered" : "bulleted";
|
|
837
837
|
n.push({ ...a, type: "list", style: l, items: s });
|
|
838
838
|
break;
|
|
839
839
|
}
|
|
840
840
|
case "table": {
|
|
841
|
-
const o = Array.isArray(
|
|
841
|
+
const o = Array.isArray(i.columns) ? i.columns : [], s = [];
|
|
842
842
|
for (const c of o) {
|
|
843
843
|
if (s.length >= H) {
|
|
844
844
|
t("more than " + H + " table columns");
|
|
845
845
|
break;
|
|
846
846
|
}
|
|
847
|
-
const
|
|
848
|
-
s.push(
|
|
847
|
+
const y = u(c?.label, N), _ = c?.align === "right" ? "right" : void 0;
|
|
848
|
+
s.push(_ ? { label: y, align: _ } : { label: y });
|
|
849
849
|
}
|
|
850
850
|
if (s.length === 0) {
|
|
851
851
|
t("a table without columns");
|
|
852
852
|
continue;
|
|
853
853
|
}
|
|
854
|
-
const l = Array.isArray(
|
|
854
|
+
const l = Array.isArray(i.rows) ? i.rows : [], p = [];
|
|
855
855
|
for (const c of l) {
|
|
856
|
-
if (p.length >=
|
|
857
|
-
t("more than " +
|
|
856
|
+
if (p.length >= V) {
|
|
857
|
+
t("more than " + V + " table rows");
|
|
858
858
|
break;
|
|
859
859
|
}
|
|
860
|
-
const
|
|
860
|
+
const y = Array.isArray(c) ? c : [];
|
|
861
861
|
p.push(
|
|
862
|
-
s.map((
|
|
862
|
+
s.map((_, Ce) => u(y[Ce], N))
|
|
863
863
|
);
|
|
864
864
|
}
|
|
865
|
-
const f = u(
|
|
865
|
+
const f = u(i.caption, N);
|
|
866
866
|
n.push({
|
|
867
867
|
...a,
|
|
868
868
|
type: "table",
|
|
@@ -873,17 +873,17 @@ function Un(e, t = () => {
|
|
|
873
873
|
break;
|
|
874
874
|
}
|
|
875
875
|
case "kpi": {
|
|
876
|
-
const o = Array.isArray(
|
|
876
|
+
const o = Array.isArray(i.items) ? i.items : [], s = [];
|
|
877
877
|
for (const l of o) {
|
|
878
|
-
if (s.length >=
|
|
879
|
-
t("more than " +
|
|
878
|
+
if (s.length >= W) {
|
|
879
|
+
t("more than " + W + " kpi items");
|
|
880
880
|
break;
|
|
881
881
|
}
|
|
882
882
|
const p = u(l?.value, 40), f = u(l?.label, 80);
|
|
883
883
|
if (!p || !f) continue;
|
|
884
884
|
const c = l?.tone;
|
|
885
885
|
s.push(
|
|
886
|
-
typeof c == "string" &&
|
|
886
|
+
typeof c == "string" && ue.has(c) ? { value: p, label: f, tone: c } : { value: p, label: f }
|
|
887
887
|
);
|
|
888
888
|
}
|
|
889
889
|
if (s.length === 0) {
|
|
@@ -894,16 +894,16 @@ function Un(e, t = () => {
|
|
|
894
894
|
break;
|
|
895
895
|
}
|
|
896
896
|
case "callout": {
|
|
897
|
-
const o = u(
|
|
897
|
+
const o = u(i.text);
|
|
898
898
|
if (!o) {
|
|
899
899
|
t("a callout without text");
|
|
900
900
|
continue;
|
|
901
901
|
}
|
|
902
|
-
const s = u(
|
|
902
|
+
const s = u(i.title, 200);
|
|
903
903
|
n.push({
|
|
904
904
|
...a,
|
|
905
905
|
type: "callout",
|
|
906
|
-
tone:
|
|
906
|
+
tone: Ye(i.tone),
|
|
907
907
|
...s ? { title: s } : {},
|
|
908
908
|
text: o
|
|
909
909
|
});
|
|
@@ -913,28 +913,28 @@ function Un(e, t = () => {
|
|
|
913
913
|
}
|
|
914
914
|
return n;
|
|
915
915
|
}
|
|
916
|
-
function
|
|
916
|
+
function Jn(e) {
|
|
917
917
|
return JSON.stringify(e).length;
|
|
918
918
|
}
|
|
919
|
-
function
|
|
919
|
+
function Zn(e) {
|
|
920
920
|
return {
|
|
921
921
|
blocks: e.length,
|
|
922
922
|
types: e.map((t) => t.type),
|
|
923
923
|
headings: e.flatMap((t) => t.type === "heading" ? [t.text] : [])
|
|
924
924
|
};
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function X(e) {
|
|
927
927
|
return e.replace(/\|/g, "\\|").replace(/\r?\n/g, " ").trim();
|
|
928
928
|
}
|
|
929
|
-
function
|
|
930
|
-
const
|
|
929
|
+
function Y(e, t, n) {
|
|
930
|
+
const r = e.map((i, a) => n?.[a] === "right" ? "---:" : "---");
|
|
931
931
|
return [
|
|
932
|
-
`| ${e.map(
|
|
933
|
-
`| ${
|
|
934
|
-
...t.map((
|
|
932
|
+
`| ${e.map(X).join(" | ")} |`,
|
|
933
|
+
`| ${r.join(" | ")} |`,
|
|
934
|
+
...t.map((i) => `| ${i.map(X).join(" | ")} |`)
|
|
935
935
|
];
|
|
936
936
|
}
|
|
937
|
-
function
|
|
937
|
+
function qe(e) {
|
|
938
938
|
switch (e.type) {
|
|
939
939
|
case "heading":
|
|
940
940
|
return [`${"#".repeat(e.level)} ${e.text}`];
|
|
@@ -948,11 +948,11 @@ function ze(e) {
|
|
|
948
948
|
return ["---"];
|
|
949
949
|
case "list":
|
|
950
950
|
return e.items.map((t, n) => {
|
|
951
|
-
const
|
|
952
|
-
return t.lead ? `${
|
|
951
|
+
const r = e.style === "numbered" ? `${n + 1}.` : "-";
|
|
952
|
+
return t.lead ? `${r} **${t.lead}** ${t.text}` : `${r} ${t.text}`;
|
|
953
953
|
});
|
|
954
954
|
case "table": {
|
|
955
|
-
const t =
|
|
955
|
+
const t = Y(
|
|
956
956
|
e.columns.map((n) => n.label),
|
|
957
957
|
e.rows,
|
|
958
958
|
e.columns.map((n) => n.align ?? "left")
|
|
@@ -960,7 +960,7 @@ function ze(e) {
|
|
|
960
960
|
return e.caption ? [...t, "", `*${e.caption}*`] : t;
|
|
961
961
|
}
|
|
962
962
|
case "kpi":
|
|
963
|
-
return
|
|
963
|
+
return Y(
|
|
964
964
|
e.items.map((t) => t.value),
|
|
965
965
|
[e.items.map((t) => t.label)]
|
|
966
966
|
);
|
|
@@ -968,11 +968,11 @@ function ze(e) {
|
|
|
968
968
|
return (e.title ? `**${e.title}** ${e.text}` : e.text).split(/\r?\n/).map((n) => `> ${n}`);
|
|
969
969
|
}
|
|
970
970
|
}
|
|
971
|
-
function
|
|
972
|
-
const n = [],
|
|
973
|
-
t && !
|
|
974
|
-
for (const
|
|
975
|
-
const a =
|
|
971
|
+
function Qn(e, t) {
|
|
972
|
+
const n = [], r = e.some((i) => i.type === "heading" && i.level === 1);
|
|
973
|
+
t && !r && n.push(`# ${t}`);
|
|
974
|
+
for (const i of e) {
|
|
975
|
+
const a = qe(i);
|
|
976
976
|
a.length > 0 && n.push(a.join(`
|
|
977
977
|
`));
|
|
978
978
|
}
|
|
@@ -981,72 +981,72 @@ function Gn(e, t) {
|
|
|
981
981
|
`)}
|
|
982
982
|
`;
|
|
983
983
|
}
|
|
984
|
-
const
|
|
985
|
-
function
|
|
984
|
+
const fe = (e) => `user:${e}`, me = (e) => `team:${e}`;
|
|
985
|
+
function er(e) {
|
|
986
986
|
const t = /* @__PURE__ */ new Set();
|
|
987
987
|
for (const n of e ?? [])
|
|
988
|
-
n?.id && (n.kind === "user" && t.add(
|
|
988
|
+
n?.id && (n.kind === "user" && t.add(fe(n.id)), n.kind === "team" && t.add(me(n.id)));
|
|
989
989
|
return [...t].sort();
|
|
990
990
|
}
|
|
991
|
-
function
|
|
992
|
-
return [
|
|
991
|
+
function tr(e, t) {
|
|
992
|
+
return [fe(e), ...t.map(me)];
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function nr(e) {
|
|
995
995
|
const t = /* @__PURE__ */ new Set();
|
|
996
996
|
for (const n of e ?? [])
|
|
997
997
|
n?.kind && t.add(n.kind);
|
|
998
998
|
return [...t];
|
|
999
999
|
}
|
|
1000
|
-
const
|
|
1001
|
-
function
|
|
1002
|
-
return
|
|
1000
|
+
const Je = ["done", "escalated"];
|
|
1001
|
+
function rr(e) {
|
|
1002
|
+
return Je.includes(e);
|
|
1003
1003
|
}
|
|
1004
|
-
const
|
|
1005
|
-
function
|
|
1006
|
-
return `${
|
|
1004
|
+
const Ze = "assignment";
|
|
1005
|
+
function ir(e) {
|
|
1006
|
+
return `${Ze}:${e}`;
|
|
1007
1007
|
}
|
|
1008
|
-
function
|
|
1008
|
+
function ar(e, t, n) {
|
|
1009
1009
|
if (e.direction === "inbound") return !0;
|
|
1010
1010
|
if (e.author?.type === "user" && e.author.id === t) return !1;
|
|
1011
|
-
const
|
|
1012
|
-
return Array.isArray(
|
|
1011
|
+
const r = e.payload?.mentions;
|
|
1012
|
+
return Array.isArray(r) && r.includes(t) ? !0 : n === "reply";
|
|
1013
1013
|
}
|
|
1014
|
-
function
|
|
1014
|
+
function or(e) {
|
|
1015
1015
|
return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
|
|
1016
1016
|
}
|
|
1017
|
-
const
|
|
1018
|
-
function
|
|
1019
|
-
const
|
|
1020
|
-
return e ? e.kind === "done" ? { status: "done", waitingOn: null, turns:
|
|
1017
|
+
const Qe = 12;
|
|
1018
|
+
function sr(e, t, n = Qe) {
|
|
1019
|
+
const r = t + 1;
|
|
1020
|
+
return e ? e.kind === "done" ? { status: "done", waitingOn: null, turns: r, reason: e.note } : e.kind === "escalate" ? { status: "escalated", waitingOn: null, turns: r, reason: e.reason } : r >= n ? {
|
|
1021
1021
|
status: "escalated",
|
|
1022
1022
|
waitingOn: null,
|
|
1023
|
-
turns:
|
|
1023
|
+
turns: r,
|
|
1024
1024
|
reason: `na ${n} beurten nog niet afgerond, dus een mens neemt het over`
|
|
1025
|
-
} : { status: "waiting", waitingOn: e.on, turns:
|
|
1025
|
+
} : { status: "waiting", waitingOn: e.on, turns: r } : {
|
|
1026
1026
|
status: "escalated",
|
|
1027
1027
|
waitingOn: null,
|
|
1028
|
-
turns:
|
|
1028
|
+
turns: r,
|
|
1029
1029
|
reason: "de agent rondde zijn beurt af zonder te zeggen wat er moet gebeuren (wachten, afronden of overdragen)"
|
|
1030
1030
|
};
|
|
1031
1031
|
}
|
|
1032
|
-
const
|
|
1033
|
-
function
|
|
1032
|
+
const q = ["lookup", "condition", "parallel", "for-each"];
|
|
1033
|
+
function J(e) {
|
|
1034
1034
|
for (const t of e) {
|
|
1035
|
-
if (!
|
|
1036
|
-
return `staptype "${t.type}" mag niet meelezen (alleen ${
|
|
1035
|
+
if (!q.includes(t.type))
|
|
1036
|
+
return `staptype "${t.type}" mag niet meelezen (alleen ${q.join(", ")})`;
|
|
1037
1037
|
if (t.type === "parallel")
|
|
1038
1038
|
for (const n of t.branches ?? []) {
|
|
1039
|
-
const
|
|
1040
|
-
if (
|
|
1039
|
+
const r = J(n);
|
|
1040
|
+
if (r) return r;
|
|
1041
1041
|
}
|
|
1042
1042
|
if (t.type === "for-each") {
|
|
1043
|
-
const n =
|
|
1043
|
+
const n = J(t.body ?? []);
|
|
1044
1044
|
if (n) return n;
|
|
1045
1045
|
}
|
|
1046
1046
|
}
|
|
1047
1047
|
return null;
|
|
1048
1048
|
}
|
|
1049
|
-
function
|
|
1049
|
+
function et(e, t) {
|
|
1050
1050
|
switch (e.kind) {
|
|
1051
1051
|
case "org":
|
|
1052
1052
|
return !0;
|
|
@@ -1056,13 +1056,13 @@ function Je(e, t) {
|
|
|
1056
1056
|
return e.userId === t.userId;
|
|
1057
1057
|
}
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1060
|
-
return e.filter((n) => n.enabled &&
|
|
1059
|
+
function lr(e, t) {
|
|
1060
|
+
return e.filter((n) => n.enabled && et(n.ownerScope, t));
|
|
1061
1061
|
}
|
|
1062
|
-
function
|
|
1062
|
+
function cr(e) {
|
|
1063
1063
|
return (e.startsWith("tool:") ? e.slice(5) : e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
|
|
1064
1064
|
}
|
|
1065
|
-
const
|
|
1065
|
+
const ur = [
|
|
1066
1066
|
{ name: "text", type: "string" },
|
|
1067
1067
|
{ name: "subject", type: "string" },
|
|
1068
1068
|
{ name: "from", type: "string" },
|
|
@@ -1090,7 +1090,7 @@ const Qn = [
|
|
|
1090
1090
|
// dus `buildTriggerVars` kan hem niet zelf vullen: de job doet dat met de catalogus in de
|
|
1091
1091
|
// hand, vóór het trigger-filter draait — net als contactId/companyId hierboven.
|
|
1092
1092
|
{ name: "assigneeUserId", type: "string" }
|
|
1093
|
-
],
|
|
1093
|
+
], dr = {
|
|
1094
1094
|
topics: [
|
|
1095
1095
|
{ name: "topicId", type: "string" },
|
|
1096
1096
|
{ name: "topic", type: "string" },
|
|
@@ -1104,7 +1104,7 @@ const Qn = [
|
|
|
1104
1104
|
// Leeg met opzet: de velden komen uit `ClassifyStep.fields` en zijn dus per stap anders.
|
|
1105
1105
|
extract: []
|
|
1106
1106
|
};
|
|
1107
|
-
function
|
|
1107
|
+
function tt(e) {
|
|
1108
1108
|
switch (e.kind) {
|
|
1109
1109
|
case "user":
|
|
1110
1110
|
return `user:${e.userId}`;
|
|
@@ -1114,22 +1114,22 @@ function Qe(e) {
|
|
|
1114
1114
|
return "org";
|
|
1115
1115
|
}
|
|
1116
1116
|
}
|
|
1117
|
-
function
|
|
1117
|
+
function pr(e) {
|
|
1118
1118
|
if (typeof e != "string") return;
|
|
1119
1119
|
const t = e.trim();
|
|
1120
1120
|
if (t === "org") return { kind: "org" };
|
|
1121
1121
|
const n = t.indexOf(":");
|
|
1122
1122
|
if (n <= 0) return;
|
|
1123
|
-
const
|
|
1124
|
-
if (
|
|
1125
|
-
if (
|
|
1126
|
-
if (
|
|
1123
|
+
const r = t.slice(0, n), i = t.slice(n + 1).trim();
|
|
1124
|
+
if (i) {
|
|
1125
|
+
if (r === "user") return { kind: "user", userId: i };
|
|
1126
|
+
if (r === "team") return { kind: "team", teamId: i };
|
|
1127
1127
|
}
|
|
1128
1128
|
}
|
|
1129
|
-
function
|
|
1130
|
-
return
|
|
1129
|
+
function nt(e) {
|
|
1130
|
+
return tt(e);
|
|
1131
1131
|
}
|
|
1132
|
-
function
|
|
1132
|
+
function rt(e) {
|
|
1133
1133
|
switch (e.kind) {
|
|
1134
1134
|
case "personal":
|
|
1135
1135
|
return { kind: "user", userId: e.userId };
|
|
@@ -1139,84 +1139,84 @@ function et(e) {
|
|
|
1139
1139
|
return { kind: "org" };
|
|
1140
1140
|
}
|
|
1141
1141
|
}
|
|
1142
|
-
function
|
|
1143
|
-
return e.agentId ? { kind: "user", userId: e.agentId } :
|
|
1142
|
+
function fr(e) {
|
|
1143
|
+
return e.agentId ? { kind: "user", userId: e.agentId } : rt(e.ownerScope);
|
|
1144
1144
|
}
|
|
1145
|
-
function
|
|
1146
|
-
return
|
|
1145
|
+
function mr(e) {
|
|
1146
|
+
return nt(e);
|
|
1147
1147
|
}
|
|
1148
|
-
function
|
|
1148
|
+
function gr(e, t) {
|
|
1149
1149
|
if (!t) return;
|
|
1150
1150
|
let n = e;
|
|
1151
|
-
for (const
|
|
1151
|
+
for (const r of t.split(".")) {
|
|
1152
1152
|
if (n === null || typeof n != "object") return;
|
|
1153
|
-
n = n[
|
|
1153
|
+
n = n[r];
|
|
1154
1154
|
}
|
|
1155
1155
|
return n;
|
|
1156
1156
|
}
|
|
1157
|
-
function
|
|
1157
|
+
function hr(e, t) {
|
|
1158
1158
|
return e.targets.find((n) => n.activityTypes.includes(t));
|
|
1159
1159
|
}
|
|
1160
|
-
function
|
|
1160
|
+
function yr(e, t) {
|
|
1161
1161
|
if (t)
|
|
1162
1162
|
return e.targets.find((n) => n.id === t);
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1164
|
+
function it(e) {
|
|
1165
1165
|
return e?.kind === "assignment";
|
|
1166
1166
|
}
|
|
1167
|
-
function
|
|
1168
|
-
const { trigger: t, agentId: n, target:
|
|
1169
|
-
return
|
|
1167
|
+
function Ar(e) {
|
|
1168
|
+
const { trigger: t, agentId: n, target: r, activityType: i, assigneeUserId: a, authorUserId: o } = e;
|
|
1169
|
+
return it(t) ? n ? r ? r.activityTypes.includes(i) ? a ? a !== n ? "assigned to someone else" : o && o === n ? "the agent assigned this to itself, which would restart its own run" : null : `no assignee found at ${r.assigneePath}` : `activity type ${i} does not announce an assignment for ${r.id}` : `assignment target kind "${t.targetKind}" is not declared by any installed app` : "this playbook has no agent, so an assignment can never be for it" : "trigger is not an assignment trigger";
|
|
1170
1170
|
}
|
|
1171
|
-
function
|
|
1171
|
+
function at(e) {
|
|
1172
1172
|
return `${e.type}:${e.id}`;
|
|
1173
1173
|
}
|
|
1174
|
-
const
|
|
1175
|
-
function
|
|
1176
|
-
return e?.type ===
|
|
1174
|
+
const ot = "interaction";
|
|
1175
|
+
function st(e) {
|
|
1176
|
+
return e?.type === ot ? e.id : void 0;
|
|
1177
1177
|
}
|
|
1178
|
-
const
|
|
1179
|
-
function
|
|
1178
|
+
const lt = 64, ct = 8e3;
|
|
1179
|
+
function br(e) {
|
|
1180
1180
|
const t = typeof e == "number" ? e : Number(String(e ?? "").trim());
|
|
1181
1181
|
if (!(!Number.isFinite(t) || t <= 0))
|
|
1182
|
-
return Math.min(Math.max(Math.round(t),
|
|
1182
|
+
return Math.min(Math.max(Math.round(t), lt), ct);
|
|
1183
1183
|
}
|
|
1184
|
-
const
|
|
1185
|
-
function
|
|
1184
|
+
const Er = { kind: "workflow", steps: [] };
|
|
1185
|
+
function Sr(e) {
|
|
1186
1186
|
return e?.kind === "workflow" ? e.steps : [];
|
|
1187
1187
|
}
|
|
1188
|
-
function
|
|
1188
|
+
function _r(e) {
|
|
1189
1189
|
return e?.kind === "procedure" ? e.procedure : void 0;
|
|
1190
1190
|
}
|
|
1191
|
-
const
|
|
1192
|
-
function
|
|
1193
|
-
return
|
|
1191
|
+
const ut = ["done", "escalated", "failed", "stopped"];
|
|
1192
|
+
function Tr(e) {
|
|
1193
|
+
return ut.includes(e);
|
|
1194
1194
|
}
|
|
1195
|
-
function
|
|
1195
|
+
function dt(e) {
|
|
1196
1196
|
return e === "waiting";
|
|
1197
1197
|
}
|
|
1198
|
-
function
|
|
1199
|
-
return e === "running" ||
|
|
1198
|
+
function Ir(e) {
|
|
1199
|
+
return e === "running" || dt(e);
|
|
1200
1200
|
}
|
|
1201
|
-
function
|
|
1201
|
+
function ge(e) {
|
|
1202
1202
|
return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
|
|
1203
1203
|
}
|
|
1204
|
-
function
|
|
1205
|
-
const t =
|
|
1206
|
-
return t ?
|
|
1204
|
+
function Mr(e) {
|
|
1205
|
+
const t = ge(e);
|
|
1206
|
+
return t ? at(t) : void 0;
|
|
1207
1207
|
}
|
|
1208
|
-
function
|
|
1209
|
-
return
|
|
1208
|
+
function kr(e) {
|
|
1209
|
+
return st(ge(e));
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1211
|
+
function Cr(e, t) {
|
|
1212
1212
|
const n = e.labels ?? [];
|
|
1213
|
-
return n.find((
|
|
1213
|
+
return n.find((r) => r.locale === t)?.label ?? n[0]?.label ?? e.url;
|
|
1214
1214
|
}
|
|
1215
|
-
function
|
|
1216
|
-
const
|
|
1217
|
-
return
|
|
1215
|
+
function wr(e, t, n) {
|
|
1216
|
+
const r = e.translations ?? [];
|
|
1217
|
+
return r.find((i) => i.locale === t) ?? (n ? r.find((i) => i.locale === n) : void 0) ?? { locale: t };
|
|
1218
1218
|
}
|
|
1219
|
-
const
|
|
1219
|
+
const Z = [
|
|
1220
1220
|
{ code: "nl", label: "Nederlands", english: "Dutch" },
|
|
1221
1221
|
{ code: "en", label: "English", english: "English" },
|
|
1222
1222
|
{ code: "de", label: "Deutsch", english: "German" },
|
|
@@ -1231,105 +1231,105 @@ const J = [
|
|
|
1231
1231
|
{ code: "fi", label: "Suomi", english: "Finnish" },
|
|
1232
1232
|
{ code: "tr", label: "Türkçe", english: "Turkish" }
|
|
1233
1233
|
];
|
|
1234
|
-
function
|
|
1234
|
+
function he(e) {
|
|
1235
1235
|
const t = (e ?? "").toLowerCase();
|
|
1236
|
-
return
|
|
1236
|
+
return Z.find((n) => n.code === t) ?? Z.find((n) => n.code === t.split("-")[0]);
|
|
1237
1237
|
}
|
|
1238
|
-
function
|
|
1239
|
-
return
|
|
1238
|
+
function Nr(e) {
|
|
1239
|
+
return he(e)?.label ?? e;
|
|
1240
1240
|
}
|
|
1241
|
-
function
|
|
1242
|
-
const t =
|
|
1241
|
+
function vr(e) {
|
|
1242
|
+
const t = he(e);
|
|
1243
1243
|
return t ? t.english === t.label ? `${t.english} (${t.code})` : `${t.english} — ${t.label} (${t.code})` : e;
|
|
1244
1244
|
}
|
|
1245
|
-
const
|
|
1246
|
-
function
|
|
1245
|
+
const ye = 3;
|
|
1246
|
+
function pt(e, t) {
|
|
1247
1247
|
const n = /* @__PURE__ */ new Set();
|
|
1248
|
-
let
|
|
1249
|
-
for (;
|
|
1250
|
-
if (n.has(
|
|
1251
|
-
|
|
1248
|
+
let r = 1, i = t.get(e)?.parentId;
|
|
1249
|
+
for (; i; ) {
|
|
1250
|
+
if (n.has(i) || (n.add(i), r++, r > ye + 1)) return 1 / 0;
|
|
1251
|
+
i = t.get(i)?.parentId;
|
|
1252
1252
|
}
|
|
1253
|
-
return
|
|
1253
|
+
return r;
|
|
1254
1254
|
}
|
|
1255
|
-
function
|
|
1255
|
+
function xr(e, t, n) {
|
|
1256
1256
|
if (!e) return !0;
|
|
1257
1257
|
if (e === t) return !1;
|
|
1258
|
-
const
|
|
1259
|
-
if (!
|
|
1260
|
-
const
|
|
1261
|
-
return
|
|
1262
|
-
}
|
|
1263
|
-
function
|
|
1264
|
-
const
|
|
1265
|
-
let
|
|
1266
|
-
for (;
|
|
1267
|
-
if (
|
|
1268
|
-
if (
|
|
1269
|
-
|
|
1258
|
+
const r = new Map(n.map((o) => [o.id, o]));
|
|
1259
|
+
if (!r.has(e) || t && ft(e, t, r)) return !1;
|
|
1260
|
+
const i = pt(e, r), a = t ? Ae(t, n) : 1;
|
|
1261
|
+
return i + a <= ye;
|
|
1262
|
+
}
|
|
1263
|
+
function ft(e, t, n) {
|
|
1264
|
+
const r = /* @__PURE__ */ new Set();
|
|
1265
|
+
let i = n.get(e)?.parentId;
|
|
1266
|
+
for (; i; ) {
|
|
1267
|
+
if (i === t) return !0;
|
|
1268
|
+
if (r.has(i)) return !1;
|
|
1269
|
+
r.add(i), i = n.get(i)?.parentId;
|
|
1270
1270
|
}
|
|
1271
1271
|
return !1;
|
|
1272
1272
|
}
|
|
1273
1273
|
function Ae(e, t, n = /* @__PURE__ */ new Set()) {
|
|
1274
1274
|
if (n.has(e)) return 1;
|
|
1275
1275
|
n.add(e);
|
|
1276
|
-
const
|
|
1277
|
-
return
|
|
1276
|
+
const r = t.filter((i) => i.parentId === e);
|
|
1277
|
+
return r.length ? 1 + Math.max(...r.map((i) => Ae(i.id, t, n))) : 1;
|
|
1278
1278
|
}
|
|
1279
|
-
const
|
|
1280
|
-
function
|
|
1281
|
-
return e.defaultLocale || e.locale ||
|
|
1279
|
+
const mt = "en";
|
|
1280
|
+
function gt(e) {
|
|
1281
|
+
return e.defaultLocale || e.locale || mt;
|
|
1282
1282
|
}
|
|
1283
|
-
function
|
|
1283
|
+
function Or(e) {
|
|
1284
1284
|
const t = /* @__PURE__ */ new Set(), n = [];
|
|
1285
|
-
for (const
|
|
1286
|
-
!
|
|
1285
|
+
for (const r of [gt(e), ...e.locales ?? []])
|
|
1286
|
+
!r || t.has(r) || (t.add(r), n.push(r));
|
|
1287
1287
|
return n;
|
|
1288
1288
|
}
|
|
1289
|
-
function
|
|
1290
|
-
const
|
|
1291
|
-
return
|
|
1289
|
+
function $r(e, t, n) {
|
|
1290
|
+
const r = e.translations ?? [];
|
|
1291
|
+
return r.find((i) => i.locale === t)?.name ?? (n ? r.find((i) => i.locale === n)?.name : void 0) ?? e.name;
|
|
1292
1292
|
}
|
|
1293
|
-
const
|
|
1293
|
+
const ht = 20, yt = 20, v = 300;
|
|
1294
1294
|
function g(e) {
|
|
1295
1295
|
return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu, " ").replace(/\s+/g, " ").trim();
|
|
1296
1296
|
}
|
|
1297
|
-
function
|
|
1297
|
+
function At(e) {
|
|
1298
1298
|
const t = e.replace(/\s+/g, " ").trim();
|
|
1299
|
-
if (t.length <=
|
|
1300
|
-
const n = t.slice(0,
|
|
1301
|
-
return
|
|
1302
|
-
}
|
|
1303
|
-
function
|
|
1304
|
-
const n =
|
|
1305
|
-
if (!
|
|
1306
|
-
const
|
|
1299
|
+
if (t.length <= v) return t;
|
|
1300
|
+
const n = t.slice(0, v), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
|
|
1301
|
+
return r > v * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
|
|
1302
|
+
}
|
|
1303
|
+
function Lr(e, t) {
|
|
1304
|
+
const n = At(t.text), r = g(n);
|
|
1305
|
+
if (!r || (e.examples ?? []).some((o) => g(o) === r)) return null;
|
|
1306
|
+
const i = e.exampleCandidates ?? [], a = i.findIndex((o) => g(o.text) === r);
|
|
1307
1307
|
if (a >= 0) {
|
|
1308
|
-
if (
|
|
1309
|
-
const o = [...
|
|
1308
|
+
if (i[a].corrected || !t.corrected) return null;
|
|
1309
|
+
const o = [...i];
|
|
1310
1310
|
return o[a] = { ...o[a], corrected: !0, addedAt: t.addedAt }, Q(o);
|
|
1311
1311
|
}
|
|
1312
|
-
return Q([{ ...t, text: n }, ...
|
|
1312
|
+
return Q([{ ...t, text: n }, ...i]).slice(0, yt);
|
|
1313
1313
|
}
|
|
1314
1314
|
function Q(e) {
|
|
1315
1315
|
return [...e].sort((t, n) => Number(n.corrected) - Number(t.corrected) || n.addedAt - t.addedAt);
|
|
1316
1316
|
}
|
|
1317
|
-
function
|
|
1318
|
-
const n = g(t),
|
|
1319
|
-
return { examples:
|
|
1317
|
+
function Rr(e, t) {
|
|
1318
|
+
const n = g(t), r = (e.examples ?? []).filter((a) => a.trim());
|
|
1319
|
+
return { examples: r.some((a) => g(a) === n) ? r : [...r, t].slice(-ht), exampleCandidates: bt(e, t) };
|
|
1320
1320
|
}
|
|
1321
|
-
function
|
|
1321
|
+
function bt(e, t) {
|
|
1322
1322
|
const n = g(t);
|
|
1323
|
-
return (e.exampleCandidates ?? []).filter((
|
|
1323
|
+
return (e.exampleCandidates ?? []).filter((r) => g(r.text) !== n);
|
|
1324
1324
|
}
|
|
1325
|
-
function
|
|
1325
|
+
function Et(e, t) {
|
|
1326
1326
|
const n = e.ownerScope;
|
|
1327
1327
|
return n ? n.kind === "org" ? !0 : n.kind === "team" ? !!t && n.teamId === t : !1 : !1;
|
|
1328
1328
|
}
|
|
1329
|
-
function
|
|
1330
|
-
return e.filter((n) =>
|
|
1329
|
+
function Dr(e, t) {
|
|
1330
|
+
return e.filter((n) => Et(n, t));
|
|
1331
1331
|
}
|
|
1332
|
-
const
|
|
1332
|
+
const be = [
|
|
1333
1333
|
{
|
|
1334
1334
|
id: "openai",
|
|
1335
1335
|
attachmentKinds: ["image", "pdf"],
|
|
@@ -1421,95 +1421,201 @@ const ye = [
|
|
|
1421
1421
|
}
|
|
1422
1422
|
];
|
|
1423
1423
|
function S(e) {
|
|
1424
|
-
return
|
|
1424
|
+
return be.find((t) => t.id === e);
|
|
1425
1425
|
}
|
|
1426
|
-
function
|
|
1426
|
+
function Pr(e) {
|
|
1427
1427
|
return S(e)?.label ?? e;
|
|
1428
1428
|
}
|
|
1429
|
-
function
|
|
1429
|
+
function Kr(e, t = "gpt-5-mini") {
|
|
1430
1430
|
return S(e)?.defaultModel ?? t;
|
|
1431
1431
|
}
|
|
1432
|
-
function
|
|
1433
|
-
return
|
|
1432
|
+
function Ur(e) {
|
|
1433
|
+
return be.filter((t) => t.capabilities.includes(e));
|
|
1434
1434
|
}
|
|
1435
|
-
function
|
|
1435
|
+
function jr(e) {
|
|
1436
1436
|
const t = S(e);
|
|
1437
1437
|
return !!t && !t.baseUrl;
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1439
|
+
function Gr(e, t) {
|
|
1440
1440
|
return t === "text" ? !0 : S(e)?.attachmentKinds?.includes(t) === !0;
|
|
1441
1441
|
}
|
|
1442
|
-
function
|
|
1442
|
+
function Br(e, t) {
|
|
1443
1443
|
if (!e.enabled) return "ok";
|
|
1444
|
-
const n =
|
|
1445
|
-
return n !== void 0 && t >= n ? "hard" :
|
|
1444
|
+
const n = ee(e.hardLimitNanos), r = ee(e.softLimitNanos);
|
|
1445
|
+
return n !== void 0 && t >= n ? "hard" : r !== void 0 && t >= r ? "soft" : "ok";
|
|
1446
1446
|
}
|
|
1447
|
-
function
|
|
1447
|
+
function ee(e) {
|
|
1448
1448
|
return typeof e == "number" ? e : void 0;
|
|
1449
1449
|
}
|
|
1450
|
-
function
|
|
1450
|
+
function St(e, t = "month") {
|
|
1451
1451
|
const n = new Date(e);
|
|
1452
1452
|
return Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), 1);
|
|
1453
1453
|
}
|
|
1454
|
-
function
|
|
1455
|
-
const n = new Date(
|
|
1454
|
+
function Fr(e, t = "month") {
|
|
1455
|
+
const n = new Date(St(e, t));
|
|
1456
1456
|
return `${n.getUTCFullYear()}-${String(n.getUTCMonth() + 1).padStart(2, "0")}`;
|
|
1457
1457
|
}
|
|
1458
|
-
function
|
|
1458
|
+
function Vr(e) {
|
|
1459
1459
|
return e?.listeningEnabled !== !1;
|
|
1460
1460
|
}
|
|
1461
|
-
const
|
|
1462
|
-
function
|
|
1461
|
+
const Hr = /* @__PURE__ */ new Set(["mail", "message"]);
|
|
1462
|
+
function _t(e, t) {
|
|
1463
1463
|
const n = e.settings?.signatures?.[t];
|
|
1464
1464
|
return !n || !n.enabled || !n.body || n.body.trim() === "" ? null : n;
|
|
1465
1465
|
}
|
|
1466
|
-
function
|
|
1466
|
+
function Wr(e, t, n, r = "html") {
|
|
1467
1467
|
if (!e) return n;
|
|
1468
|
-
const
|
|
1469
|
-
return
|
|
1468
|
+
const i = _t(e, t);
|
|
1469
|
+
return i ? `${n}${r === "text" ? `
|
|
1470
1470
|
|
|
1471
|
-
` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${
|
|
1471
|
+
` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${i.body}` : n;
|
|
1472
1472
|
}
|
|
1473
|
-
function
|
|
1473
|
+
function zr(e) {
|
|
1474
1474
|
return e.endpoints ?? [];
|
|
1475
1475
|
}
|
|
1476
|
-
const
|
|
1476
|
+
const Xr = (e) => !!e.assignedUserId || !!e.assignedInboxId, Yr = (e) => e.status === "closed", qr = (e) => ({
|
|
1477
1477
|
urgent: 10,
|
|
1478
1478
|
high: 5,
|
|
1479
1479
|
normal: 2,
|
|
1480
1480
|
low: 1
|
|
1481
|
-
})[e.priority] || 0,
|
|
1482
|
-
function
|
|
1481
|
+
})[e.priority] || 0, Jr = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
|
|
1482
|
+
function Zr(e, t) {
|
|
1483
1483
|
return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
|
|
1484
1484
|
}
|
|
1485
|
-
const
|
|
1486
|
-
function
|
|
1485
|
+
const Qr = 1e3, ei = 2e3, ti = 500, ni = 12e3, ri = 4e3, Tt = ["contact", "company"];
|
|
1486
|
+
function ii(e) {
|
|
1487
1487
|
if (!e) return !1;
|
|
1488
1488
|
const t = e.slice(0, e.indexOf(":"));
|
|
1489
|
-
return
|
|
1489
|
+
return Tt.includes(t);
|
|
1490
1490
|
}
|
|
1491
|
-
function
|
|
1491
|
+
function ai(e, t) {
|
|
1492
1492
|
const n = e.accumulatedSeconds || 0;
|
|
1493
1493
|
return e.runningSince ? n + Math.max(0, Math.floor((t - e.runningSince) / 1e3)) : n;
|
|
1494
1494
|
}
|
|
1495
|
-
function
|
|
1495
|
+
function oi(e, t) {
|
|
1496
1496
|
const n = Math.max(1, Math.ceil(Math.max(0, e) / 60));
|
|
1497
1497
|
if (!t || t === "exact") return n * 60;
|
|
1498
|
-
const
|
|
1499
|
-
return !Number.isFinite(
|
|
1498
|
+
const r = Number(t);
|
|
1499
|
+
return !Number.isFinite(r) || r <= 0 ? n * 60 : Math.ceil(n / r) * r * 60;
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1501
|
+
function si(e) {
|
|
1502
1502
|
const t = Math.max(0, Math.round(e / 60));
|
|
1503
1503
|
return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
|
|
1504
1504
|
}
|
|
1505
|
-
function
|
|
1506
|
-
const t = Math.max(0, Math.floor(e)), n = (a) => String(a).padStart(2, "0"),
|
|
1507
|
-
return
|
|
1505
|
+
function li(e) {
|
|
1506
|
+
const t = Math.max(0, Math.floor(e)), n = (a) => String(a).padStart(2, "0"), r = Math.floor(t / 60) % 60, i = Math.floor(t / 3600);
|
|
1507
|
+
return i > 0 ? `${i}:${n(r)}:${n(t % 60)}` : `${n(r)}:${n(t % 60)}`;
|
|
1508
|
+
}
|
|
1509
|
+
function It(e) {
|
|
1510
|
+
return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
|
|
1511
|
+
}
|
|
1512
|
+
function ci(e, t) {
|
|
1513
|
+
const n = It(e) || "werksoort", r = new Set(t);
|
|
1514
|
+
if (!r.has(n)) return n;
|
|
1515
|
+
for (let i = 2; i < 500; i++) {
|
|
1516
|
+
const a = `${n}-${i}`;
|
|
1517
|
+
if (!r.has(a)) return a;
|
|
1518
|
+
}
|
|
1519
|
+
return `${n}-${r.size + 1}`;
|
|
1520
|
+
}
|
|
1521
|
+
function ui(e, t) {
|
|
1522
|
+
const n = e.ownerScope;
|
|
1523
|
+
return !n || n.kind === "org" ? !0 : t.includes(n.teamId);
|
|
1524
|
+
}
|
|
1525
|
+
function di(e) {
|
|
1526
|
+
return e.filter((t) => !t.archived).sort(Mt);
|
|
1527
|
+
}
|
|
1528
|
+
function Mt(e, t) {
|
|
1529
|
+
const n = (e.order ?? 0) - (t.order ?? 0);
|
|
1530
|
+
return n !== 0 ? n : (e.label || "").localeCompare(t.label || "");
|
|
1508
1531
|
}
|
|
1509
|
-
function
|
|
1532
|
+
function pi(e) {
|
|
1510
1533
|
return e.type === "agent";
|
|
1511
1534
|
}
|
|
1512
|
-
const
|
|
1535
|
+
const kt = "work_item", Ct = "work_project";
|
|
1536
|
+
function wt(e) {
|
|
1537
|
+
return `${kt}:${e}`;
|
|
1538
|
+
}
|
|
1539
|
+
function Ee(e) {
|
|
1540
|
+
return `${Ct}:${e}`;
|
|
1541
|
+
}
|
|
1542
|
+
function fi(e, t, n) {
|
|
1543
|
+
const r = `${e}-${t}`;
|
|
1544
|
+
return n ? `${r}-${n}` : r;
|
|
1545
|
+
}
|
|
1546
|
+
function mi(e) {
|
|
1547
|
+
const t = /^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e || "").trim());
|
|
1548
|
+
return t ? {
|
|
1549
|
+
projectKey: t[1].toUpperCase(),
|
|
1550
|
+
sequenceNumber: Number(t[2]),
|
|
1551
|
+
...t[3] ? { subSequence: Number(t[3]) } : {}
|
|
1552
|
+
} : null;
|
|
1553
|
+
}
|
|
1554
|
+
function gi(e) {
|
|
1555
|
+
return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 3) || "PRJ";
|
|
1556
|
+
}
|
|
1557
|
+
function hi(e, t = 25) {
|
|
1558
|
+
const n = /* @__PURE__ */ new Set([wt(e.id)]);
|
|
1559
|
+
e.projectId && n.add(Ee(e.projectId));
|
|
1560
|
+
for (const r of e.ancestorKeys ?? []) n.add(r);
|
|
1561
|
+
for (const r of e.partyKeys ?? []) n.add(r);
|
|
1562
|
+
return Array.from(n).slice(0, t);
|
|
1563
|
+
}
|
|
1564
|
+
function yi(e) {
|
|
1565
|
+
return [Ee(e.id)];
|
|
1566
|
+
}
|
|
1567
|
+
const $ = [
|
|
1568
|
+
{ key: "open", label: "status_open", category: "todo", order: 0 },
|
|
1569
|
+
{ key: "in_progress", label: "status_in_progress", category: "in_progress", order: 1 },
|
|
1570
|
+
{ key: "done", label: "status_done", category: "done", order: 2 }
|
|
1571
|
+
], Se = $.map((e) => e.key);
|
|
1572
|
+
function Nt(e) {
|
|
1573
|
+
return e?.statuses?.length ? e.statuses : $;
|
|
1574
|
+
}
|
|
1575
|
+
function vt(e, t) {
|
|
1576
|
+
return t.find((n) => n.key === e)?.category ?? "todo";
|
|
1577
|
+
}
|
|
1578
|
+
function Ai(e, t) {
|
|
1579
|
+
return t.find((n) => n.key === e);
|
|
1580
|
+
}
|
|
1581
|
+
function bi(e) {
|
|
1582
|
+
const t = Nt(e), n = e?.defaultStatusKey;
|
|
1583
|
+
return n && t.some((r) => r.key === n) ? n : xt(t)[0]?.key ?? $[0].key;
|
|
1584
|
+
}
|
|
1585
|
+
function xt(e) {
|
|
1586
|
+
return [...e].sort((t, n) => {
|
|
1587
|
+
const r = (t.order ?? 0) - (n.order ?? 0);
|
|
1588
|
+
return r !== 0 ? r : (t.label || "").localeCompare(n.label || "");
|
|
1589
|
+
});
|
|
1590
|
+
}
|
|
1591
|
+
function Ei(e, t) {
|
|
1592
|
+
return vt(e, t) === "done";
|
|
1593
|
+
}
|
|
1594
|
+
function Ot(e) {
|
|
1595
|
+
return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
|
|
1596
|
+
}
|
|
1597
|
+
function Si(e, t) {
|
|
1598
|
+
const n = Ot(e) || "status", r = /* @__PURE__ */ new Set([...t, ...Se]);
|
|
1599
|
+
if (!r.has(n)) return n;
|
|
1600
|
+
for (let i = 2; i < 500; i++) {
|
|
1601
|
+
const a = `${n}-${i}`;
|
|
1602
|
+
if (!r.has(a)) return a;
|
|
1603
|
+
}
|
|
1604
|
+
return `${n}-${r.size + 1}`;
|
|
1605
|
+
}
|
|
1606
|
+
function _i(e) {
|
|
1607
|
+
const t = [];
|
|
1608
|
+
if (!e.length) return [{ index: -1, reason: "empty" }];
|
|
1609
|
+
const n = /* @__PURE__ */ new Set();
|
|
1610
|
+
return e.forEach((r, i) => {
|
|
1611
|
+
if (!r.key) {
|
|
1612
|
+
t.push({ index: i, reason: "missing_key" });
|
|
1613
|
+
return;
|
|
1614
|
+
}
|
|
1615
|
+
Se.includes(r.key) && t.push({ index: i, reason: "reserved_key", key: r.key }), n.has(r.key) && t.push({ index: i, reason: "duplicate_key", key: r.key }), n.add(r.key);
|
|
1616
|
+
}), 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;
|
|
1617
|
+
}
|
|
1618
|
+
const L = {
|
|
1513
1619
|
// The lower bounds are deliberately generous: service ranges (0800/0900) are
|
|
1514
1620
|
// shorter than geographic numbers, and a too-strict minimum silently drops them.
|
|
1515
1621
|
// An over-permissive key is harmless — it simply matches nothing.
|
|
@@ -1532,81 +1638,81 @@ const $ = {
|
|
|
1532
1638
|
PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
|
|
1533
1639
|
US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
|
|
1534
1640
|
CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
|
|
1535
|
-
},
|
|
1536
|
-
new Set(Object.values(
|
|
1641
|
+
}, $t = "NL", Lt = 15, Rt = 8, Dt = Array.from(
|
|
1642
|
+
new Set(Object.values(L).map((e) => e.callingCode))
|
|
1537
1643
|
).sort((e, t) => t.length - e.length);
|
|
1538
|
-
function
|
|
1644
|
+
function te(e) {
|
|
1539
1645
|
if (e)
|
|
1540
|
-
return
|
|
1646
|
+
return L[e.trim().toUpperCase()];
|
|
1541
1647
|
}
|
|
1542
1648
|
function E(e, t) {
|
|
1543
1649
|
return e.length >= t.nsnMin && e.length <= t.nsnMax;
|
|
1544
1650
|
}
|
|
1545
|
-
function
|
|
1546
|
-
if (e.length >
|
|
1547
|
-
for (const t of
|
|
1651
|
+
function ne(e) {
|
|
1652
|
+
if (e.length > Lt) return null;
|
|
1653
|
+
for (const t of Dt) {
|
|
1548
1654
|
if (!e.startsWith(t)) continue;
|
|
1549
1655
|
const n = e.slice(t.length);
|
|
1550
|
-
for (const
|
|
1551
|
-
if (
|
|
1552
|
-
const
|
|
1553
|
-
if (E(a,
|
|
1656
|
+
for (const r of Object.values(L)) {
|
|
1657
|
+
if (r.callingCode !== t) continue;
|
|
1658
|
+
const i = r.trunkPrefix, a = i && n.startsWith(i) ? n.slice(i.length) : n;
|
|
1659
|
+
if (E(a, r)) return `+${t}${a}`;
|
|
1554
1660
|
}
|
|
1555
1661
|
return null;
|
|
1556
1662
|
}
|
|
1557
|
-
return e.length <
|
|
1663
|
+
return e.length < Rt ? null : `+${e}`;
|
|
1558
1664
|
}
|
|
1559
|
-
function
|
|
1665
|
+
function Pt(e) {
|
|
1560
1666
|
let t = e.trim();
|
|
1561
1667
|
const n = t.match(/^(sips?|tel|whatsapp):/i);
|
|
1562
1668
|
n && (t = t.slice(n[0].length));
|
|
1563
|
-
const
|
|
1564
|
-
return
|
|
1669
|
+
const r = t.indexOf("@");
|
|
1670
|
+
return r >= 0 && (t = t.slice(0, r)), t.trim();
|
|
1565
1671
|
}
|
|
1566
|
-
function
|
|
1672
|
+
function Ti(e) {
|
|
1567
1673
|
if (!e) return !1;
|
|
1568
1674
|
const t = e.indexOf("@");
|
|
1569
1675
|
if (t <= 0) return !1;
|
|
1570
1676
|
const n = e.slice(0, t).trim();
|
|
1571
1677
|
return !/^[+\d\s().-]+$/.test(n);
|
|
1572
1678
|
}
|
|
1573
|
-
function
|
|
1679
|
+
function re(e, t) {
|
|
1574
1680
|
if (!e) return null;
|
|
1575
|
-
const n =
|
|
1681
|
+
const n = Pt(e);
|
|
1576
1682
|
if (!n) return null;
|
|
1577
|
-
const
|
|
1578
|
-
if (!
|
|
1579
|
-
if (
|
|
1580
|
-
if (
|
|
1581
|
-
const a =
|
|
1683
|
+
const r = n.startsWith("+"), i = n.replace(/\D/g, "");
|
|
1684
|
+
if (!i) return null;
|
|
1685
|
+
if (r) return ne(i);
|
|
1686
|
+
if (i.startsWith("00")) return ne(i.slice(2));
|
|
1687
|
+
const a = te(t) ?? te($t);
|
|
1582
1688
|
if (!a) return null;
|
|
1583
1689
|
const o = a.trunkPrefix;
|
|
1584
|
-
if (o &&
|
|
1585
|
-
const s =
|
|
1690
|
+
if (o && i.startsWith(o)) {
|
|
1691
|
+
const s = i.slice(o.length);
|
|
1586
1692
|
return E(s, a) ? `+${a.callingCode}${s}` : null;
|
|
1587
1693
|
}
|
|
1588
|
-
if (
|
|
1589
|
-
const s =
|
|
1694
|
+
if (i.startsWith(a.callingCode)) {
|
|
1695
|
+
const s = i.slice(a.callingCode.length);
|
|
1590
1696
|
if (E(s, a)) return `+${a.callingCode}${s}`;
|
|
1591
1697
|
}
|
|
1592
|
-
return !o && E(
|
|
1698
|
+
return !o && E(i, a) ? `+${a.callingCode}${i}` : null;
|
|
1593
1699
|
}
|
|
1594
|
-
function
|
|
1700
|
+
function Ii(e, t = 9) {
|
|
1595
1701
|
const n = (e ?? "").replace(/\D/g, "");
|
|
1596
1702
|
return n.length < t ? null : n.slice(-t);
|
|
1597
1703
|
}
|
|
1598
|
-
function
|
|
1704
|
+
function _e(e) {
|
|
1599
1705
|
if (!e) return null;
|
|
1600
1706
|
const t = e.trim().toLowerCase(), n = t.lastIndexOf("@");
|
|
1601
1707
|
if (n <= 0 || n === t.length - 1) return null;
|
|
1602
|
-
const
|
|
1603
|
-
return !
|
|
1708
|
+
const r = t.slice(0, n).split("+")[0], i = t.slice(n + 1);
|
|
1709
|
+
return !r || !i.includes(".") ? null : `${r}@${i}`;
|
|
1604
1710
|
}
|
|
1605
|
-
function
|
|
1606
|
-
const t =
|
|
1711
|
+
function Mi(e) {
|
|
1712
|
+
const t = _e(e);
|
|
1607
1713
|
return t ? t.slice(t.lastIndexOf("@") + 1) : null;
|
|
1608
1714
|
}
|
|
1609
|
-
const
|
|
1715
|
+
const Kt = /* @__PURE__ */ new Set([
|
|
1610
1716
|
"co.uk",
|
|
1611
1717
|
"org.uk",
|
|
1612
1718
|
"gov.uk",
|
|
@@ -1616,14 +1722,14 @@ const Ct = /* @__PURE__ */ new Set([
|
|
|
1616
1722
|
"com.br",
|
|
1617
1723
|
"co.za"
|
|
1618
1724
|
]);
|
|
1619
|
-
function
|
|
1725
|
+
function Ut(e) {
|
|
1620
1726
|
if (!e) return null;
|
|
1621
1727
|
const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
|
|
1622
1728
|
if (t.length < 2) return null;
|
|
1623
1729
|
const n = t.slice(-2).join(".");
|
|
1624
|
-
return
|
|
1730
|
+
return Kt.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
|
|
1625
1731
|
}
|
|
1626
|
-
const
|
|
1732
|
+
const jt = /* @__PURE__ */ new Set([
|
|
1627
1733
|
"gmail.com",
|
|
1628
1734
|
"googlemail.com",
|
|
1629
1735
|
"outlook.com",
|
|
@@ -1668,44 +1774,44 @@ const wt = /* @__PURE__ */ new Set([
|
|
|
1668
1774
|
"proximus.be",
|
|
1669
1775
|
"scarlet.be"
|
|
1670
1776
|
]);
|
|
1671
|
-
function
|
|
1672
|
-
const t =
|
|
1673
|
-
return t ?
|
|
1777
|
+
function ki(e) {
|
|
1778
|
+
const t = Ut(e);
|
|
1779
|
+
return t ? jt.has(t) : !1;
|
|
1674
1780
|
}
|
|
1675
|
-
function
|
|
1781
|
+
function Ci(e) {
|
|
1676
1782
|
if (!e) return !1;
|
|
1677
1783
|
const t = e.trim().toLowerCase();
|
|
1678
1784
|
return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
|
|
1679
1785
|
}
|
|
1680
|
-
function
|
|
1786
|
+
function wi(e, t, n) {
|
|
1681
1787
|
if (!e || !t) return null;
|
|
1682
|
-
const
|
|
1683
|
-
if (
|
|
1684
|
-
const a =
|
|
1788
|
+
const r = e.trim().toLowerCase();
|
|
1789
|
+
if (r === "tel" || r === "sms" || r === "whatsapp") {
|
|
1790
|
+
const a = re(t, n);
|
|
1685
1791
|
return a ? `tel:${a}` : null;
|
|
1686
1792
|
}
|
|
1687
|
-
if (
|
|
1688
|
-
const a =
|
|
1793
|
+
if (r === "fax") {
|
|
1794
|
+
const a = re(t, n);
|
|
1689
1795
|
return a ? `fax:${a}` : null;
|
|
1690
1796
|
}
|
|
1691
|
-
if (
|
|
1692
|
-
const a =
|
|
1797
|
+
if (r === "mailto" || r === "email") {
|
|
1798
|
+
const a = _e(t);
|
|
1693
1799
|
return a ? `mailto:${a}` : null;
|
|
1694
1800
|
}
|
|
1695
|
-
const
|
|
1696
|
-
return
|
|
1801
|
+
const i = t.trim().toLowerCase();
|
|
1802
|
+
return i ? `${r}:${i}` : null;
|
|
1697
1803
|
}
|
|
1698
|
-
const
|
|
1699
|
-
function
|
|
1804
|
+
const Gt = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, Bt = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
|
|
1805
|
+
function Ni(e) {
|
|
1700
1806
|
if (typeof e != "string" || !e) return "";
|
|
1701
1807
|
let t = e;
|
|
1702
1808
|
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(`
|
|
1703
1809
|
`).map(
|
|
1704
1810
|
(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,}$/, "")
|
|
1705
1811
|
).join(`
|
|
1706
|
-
`), t = t.replace(
|
|
1812
|
+
`), t = t.replace(Gt, "$2"), t = t.replace(Bt, "$2"), t = t.replace(/~~(?=\S)([\s\S]*?\S)~~/g, "$1"), t = t.replace(/`([^`\n]+)`/g, "$1"), t.replace(/\s+/g, " ").trim();
|
|
1707
1813
|
}
|
|
1708
|
-
const
|
|
1814
|
+
const Ft = [
|
|
1709
1815
|
/<blockquote/i,
|
|
1710
1816
|
/class="?gmail_quote/i,
|
|
1711
1817
|
// Gmail quote container
|
|
@@ -1718,17 +1824,17 @@ const xt = [
|
|
|
1718
1824
|
// Outlook underscore separator before "From:"
|
|
1719
1825
|
/\bOn\b[\s\S]{0,200}?\bwrote:/i
|
|
1720
1826
|
// Gmail "On <date> <name> wrote:"
|
|
1721
|
-
], ie = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i,
|
|
1722
|
-
function
|
|
1827
|
+
], ie = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, Vt = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
|
|
1828
|
+
function Ht(e) {
|
|
1723
1829
|
const t = e.split(`
|
|
1724
1830
|
`);
|
|
1725
1831
|
for (let n = 0; n < t.length; n++)
|
|
1726
|
-
if (
|
|
1832
|
+
if (Vt.test(t[n]) || ie.test(t[n]) && t.slice(n + 1, n + 4).some((r) => ie.test(r)))
|
|
1727
1833
|
return t.slice(0, n).join(`
|
|
1728
1834
|
`).trim();
|
|
1729
1835
|
return e;
|
|
1730
1836
|
}
|
|
1731
|
-
function
|
|
1837
|
+
function ae(e) {
|
|
1732
1838
|
let t = e;
|
|
1733
1839
|
return t = t.replace(/<(script|style)[\s\S]*?<\/\1>/gi, ""), t = t.replace(/<br\s*\/?>/gi, `
|
|
1734
1840
|
`), t = t.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
|
|
@@ -1736,38 +1842,38 @@ function re(e) {
|
|
|
1736
1842
|
`), t = t.replace(/<\/(div|li|tr)>/gi, `
|
|
1737
1843
|
`), t = t.replace(/<\/(td|th)>/gi, " "), t = t.replace(/<[^>]+>/g, ""), t = t.replace(/<[^>]*$/, ""), t;
|
|
1738
1844
|
}
|
|
1739
|
-
function ae(e) {
|
|
1740
|
-
return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
|
|
1741
|
-
}
|
|
1742
1845
|
function oe(e) {
|
|
1743
|
-
return
|
|
1846
|
+
return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
|
|
1744
1847
|
}
|
|
1745
1848
|
function se(e) {
|
|
1849
|
+
return e.replace(/ /gi, " ").replace(/</gi, "<").replace(/>/gi, ">").replace(/"/gi, '"').replace(/&#(\d+);/g, (t, n) => oe(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => oe(parseInt(n, 16)) ?? t).replace(/&/gi, "&");
|
|
1850
|
+
}
|
|
1851
|
+
function le(e) {
|
|
1746
1852
|
return e.replace(/\r/g, "").replace(/[ \t]+/g, " ").replace(/ *\n */g, `
|
|
1747
1853
|
`).replace(/\n{3,}/g, `
|
|
1748
1854
|
|
|
1749
1855
|
`).trim();
|
|
1750
1856
|
}
|
|
1751
|
-
function
|
|
1857
|
+
function vi(e) {
|
|
1752
1858
|
if (typeof e != "string" || !e) return "";
|
|
1753
1859
|
let t = e.length;
|
|
1754
|
-
for (const a of
|
|
1860
|
+
for (const a of Ft) {
|
|
1755
1861
|
const o = e.search(a);
|
|
1756
1862
|
o >= 0 && o < t && (t = o);
|
|
1757
1863
|
}
|
|
1758
1864
|
const n = e.slice(0, t);
|
|
1759
|
-
let
|
|
1760
|
-
return
|
|
1865
|
+
let r = le(se(ae(n)));
|
|
1866
|
+
return r || (r = le(se(ae(e)))), Ht(r) || r;
|
|
1761
1867
|
}
|
|
1762
|
-
const
|
|
1763
|
-
function
|
|
1764
|
-
return !!(e &&
|
|
1868
|
+
const Wt = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, zt = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
|
|
1869
|
+
function xi(e, t) {
|
|
1870
|
+
return !!(e && Wt.test(e) || t && zt.test(t));
|
|
1765
1871
|
}
|
|
1766
|
-
const
|
|
1767
|
-
function
|
|
1768
|
-
return e >=
|
|
1872
|
+
const Xt = 3, Yt = 600;
|
|
1873
|
+
function Oi(e, t) {
|
|
1874
|
+
return e >= Xt || t >= Yt;
|
|
1769
1875
|
}
|
|
1770
|
-
const
|
|
1876
|
+
const qt = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), Jt = /* @__PURE__ */ new Set([
|
|
1771
1877
|
"text/plain",
|
|
1772
1878
|
"text/markdown",
|
|
1773
1879
|
"text/csv",
|
|
@@ -1776,88 +1882,88 @@ const Ut = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "ima
|
|
|
1776
1882
|
"application/xml",
|
|
1777
1883
|
"text/xml"
|
|
1778
1884
|
]);
|
|
1779
|
-
function
|
|
1885
|
+
function Zt(e) {
|
|
1780
1886
|
const t = (e ?? "").trim().toLowerCase().split(";")[0];
|
|
1781
|
-
return t ?
|
|
1887
|
+
return t ? qt.has(t) ? "image" : t === "application/pdf" ? "pdf" : Jt.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
|
|
1782
1888
|
}
|
|
1783
|
-
const h = 1024 * 1024,
|
|
1889
|
+
const h = 1024 * 1024, Qt = {
|
|
1784
1890
|
image: 5 * h,
|
|
1785
1891
|
pdf: 20 * h,
|
|
1786
1892
|
text: 1 * h,
|
|
1787
1893
|
audio: 20 * h
|
|
1788
|
-
},
|
|
1789
|
-
function
|
|
1790
|
-
const n =
|
|
1791
|
-
return n === "unsupported" ? "unsupported" : t >
|
|
1894
|
+
}, $i = 25 * h, Li = 5;
|
|
1895
|
+
function Ri(e, t) {
|
|
1896
|
+
const n = Zt(e);
|
|
1897
|
+
return n === "unsupported" ? "unsupported" : t > Qt[n] ? "too-large" : null;
|
|
1792
1898
|
}
|
|
1793
|
-
function
|
|
1899
|
+
function en(e) {
|
|
1794
1900
|
return `${e.kind}:${e.id || e.url || e.title}`;
|
|
1795
1901
|
}
|
|
1796
|
-
function
|
|
1797
|
-
const n = new Set(t),
|
|
1902
|
+
function Di(e, t = []) {
|
|
1903
|
+
const n = new Set(t), r = [], i = [];
|
|
1798
1904
|
for (const a of e) {
|
|
1799
|
-
const o =
|
|
1800
|
-
n.has(o) || (n.add(o),
|
|
1905
|
+
const o = en(a);
|
|
1906
|
+
n.has(o) || (n.add(o), r.push(a), i.push(o));
|
|
1801
1907
|
}
|
|
1802
|
-
return { sources:
|
|
1908
|
+
return { sources: r, keys: i };
|
|
1803
1909
|
}
|
|
1804
|
-
function
|
|
1805
|
-
const n = new Set(e.disabledIntents ?? []),
|
|
1806
|
-
if (!e.extraIntents || e.extraIntents.length === 0) return
|
|
1807
|
-
const a = new Set(
|
|
1910
|
+
function tn(e, t) {
|
|
1911
|
+
const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, i = t.intents.filter((o) => !n.has(o.intent)).map((o) => rn(o, r[o.intent]));
|
|
1912
|
+
if (!e.extraIntents || e.extraIntents.length === 0) return i;
|
|
1913
|
+
const a = new Set(i.map((o) => o.intent));
|
|
1808
1914
|
for (const o of e.extraIntents)
|
|
1809
|
-
a.has(o.intent) || (
|
|
1810
|
-
return
|
|
1915
|
+
a.has(o.intent) || (i.push(o), a.add(o.intent));
|
|
1916
|
+
return i;
|
|
1811
1917
|
}
|
|
1812
|
-
function
|
|
1918
|
+
function nn(e, t) {
|
|
1813
1919
|
const n = {};
|
|
1814
|
-
for (const
|
|
1815
|
-
if (!
|
|
1816
|
-
const
|
|
1817
|
-
n[
|
|
1920
|
+
for (const r of e.intents) {
|
|
1921
|
+
if (!r.togglable) continue;
|
|
1922
|
+
const i = t?.[r.intent];
|
|
1923
|
+
n[r.intent] = i ?? r.defaultEnabled ?? !0;
|
|
1818
1924
|
}
|
|
1819
1925
|
return n;
|
|
1820
1926
|
}
|
|
1821
|
-
function
|
|
1822
|
-
const n =
|
|
1823
|
-
return Object.entries(n).filter(([,
|
|
1927
|
+
function Pi(e, t) {
|
|
1928
|
+
const n = nn(e, t);
|
|
1929
|
+
return Object.entries(n).filter(([, r]) => !r).map(([r]) => r);
|
|
1824
1930
|
}
|
|
1825
|
-
function
|
|
1931
|
+
function rn(e, t) {
|
|
1826
1932
|
return t ? {
|
|
1827
1933
|
intent: t.intent ?? e.intent,
|
|
1828
1934
|
targetSchemes: t.targetSchemes ?? e.targetSchemes,
|
|
1829
1935
|
transport: t.transport ?? e.transport
|
|
1830
1936
|
} : e;
|
|
1831
1937
|
}
|
|
1832
|
-
function
|
|
1938
|
+
function Ki(e, t) {
|
|
1833
1939
|
const n = [];
|
|
1834
|
-
for (const
|
|
1835
|
-
if (!
|
|
1836
|
-
const
|
|
1837
|
-
if (
|
|
1838
|
-
for (const a of
|
|
1839
|
-
n.push({ channel:
|
|
1940
|
+
for (const r of e) {
|
|
1941
|
+
if (!r.enabled) continue;
|
|
1942
|
+
const i = t[r.providerId];
|
|
1943
|
+
if (i)
|
|
1944
|
+
for (const a of tn(r, i))
|
|
1945
|
+
n.push({ channel: r, description: i, capability: a });
|
|
1840
1946
|
}
|
|
1841
1947
|
return n;
|
|
1842
1948
|
}
|
|
1843
|
-
function
|
|
1949
|
+
function Ui(e, t) {
|
|
1844
1950
|
return t.filter((n) => n.capability.intent === e);
|
|
1845
1951
|
}
|
|
1846
|
-
function
|
|
1952
|
+
function an(e, t) {
|
|
1847
1953
|
return t.filter((n) => n.capability.targetSchemes.includes(e));
|
|
1848
1954
|
}
|
|
1849
|
-
function
|
|
1850
|
-
return
|
|
1955
|
+
function ji(e, t) {
|
|
1956
|
+
return an(e.scheme, t);
|
|
1851
1957
|
}
|
|
1852
|
-
function
|
|
1853
|
-
const
|
|
1854
|
-
for (const
|
|
1958
|
+
function Gi(e, t, n) {
|
|
1959
|
+
const r = [];
|
|
1960
|
+
for (const i of e)
|
|
1855
1961
|
for (const a of n)
|
|
1856
|
-
a.capability.intent === t && a.capability.targetSchemes.includes(
|
|
1857
|
-
return
|
|
1962
|
+
a.capability.intent === t && a.capability.targetSchemes.includes(i.scheme) && r.push({ channelIntent: a, endpoint: i });
|
|
1963
|
+
return r;
|
|
1858
1964
|
}
|
|
1859
|
-
var
|
|
1860
|
-
const
|
|
1965
|
+
var on = /* @__PURE__ */ ((e) => (e.MAILTO = "mailto", e.SIP = "sip", e.TEL = "tel", e.WEBHOOK = "webhook", e.USERNAME = "username", e.ID = "id", e.CUSTOM = "custom", e.URL = "url", e.TELEGRAM = "telegram", e.WHATSAPP = "whatsapp", e.MESSENGER = "messenger", e.INSTAGRAM = "instagram", e.VIBER = "viber", e.SMS = "sms", e.FAX = "fax", e.TEAMS = "teams", e.CALENDAR = "calendar", e))(on || {});
|
|
1966
|
+
const sn = {
|
|
1861
1967
|
mailto: "mail",
|
|
1862
1968
|
sip: "tel",
|
|
1863
1969
|
tel: "tel",
|
|
@@ -1879,10 +1985,10 @@ const Xt = {
|
|
|
1879
1985
|
id: "note",
|
|
1880
1986
|
custom: "note"
|
|
1881
1987
|
};
|
|
1882
|
-
function
|
|
1883
|
-
return e ?
|
|
1988
|
+
function Bi(e) {
|
|
1989
|
+
return e ? sn[e] ?? "note" : "note";
|
|
1884
1990
|
}
|
|
1885
|
-
const
|
|
1991
|
+
const Fi = "message_window", Vi = "message_templates", Hi = {
|
|
1886
1992
|
// E-mail
|
|
1887
1993
|
FROM: "from",
|
|
1888
1994
|
TO: "to",
|
|
@@ -1899,74 +2005,79 @@ const yr = "message_window", br = "message_templates", Er = {
|
|
|
1899
2005
|
// Voice/conference
|
|
1900
2006
|
HOST: "host",
|
|
1901
2007
|
PARTICIPANT: "participant"
|
|
1902
|
-
},
|
|
1903
|
-
function
|
|
2008
|
+
}, Wi = (e, t) => ({ intent: e, ...t }), zi = "folder_management", Xi = "remote_search", Yi = { ok: !1, code: "UNSUPPORTED", message: "Provider does not support this op" }, qi = "resources.describe", Ji = "resources.search", Zi = "resources.resolve";
|
|
2009
|
+
function Qi(e) {
|
|
2010
|
+
const t = e.indexOf(":");
|
|
2011
|
+
return t === -1 ? e : e.slice(0, t);
|
|
2012
|
+
}
|
|
2013
|
+
const Te = "auth";
|
|
2014
|
+
function Ie(e) {
|
|
1904
2015
|
const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
|
|
1905
2016
|
return t ? t[1] : null;
|
|
1906
2017
|
}
|
|
1907
|
-
function
|
|
1908
|
-
const t =
|
|
1909
|
-
return t ? t !==
|
|
2018
|
+
function ea(e) {
|
|
2019
|
+
const t = Ie(e);
|
|
2020
|
+
return t ? t !== Te : typeof e == "string" && e.startsWith("/wake");
|
|
1910
2021
|
}
|
|
1911
|
-
function
|
|
1912
|
-
return typeof e != "string" || e === "" || e === "/" ? !0 :
|
|
2022
|
+
function ta(e) {
|
|
2023
|
+
return typeof e != "string" || e === "" || e === "/" ? !0 : Ie(e) === Te;
|
|
1913
2024
|
}
|
|
1914
|
-
function
|
|
2025
|
+
function ln(e) {
|
|
1915
2026
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1916
2027
|
}
|
|
1917
|
-
function
|
|
1918
|
-
const n = e.split("/").filter(Boolean).map((
|
|
2028
|
+
function cn(e) {
|
|
2029
|
+
const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : "/" + ln(r)).join("");
|
|
1919
2030
|
return new RegExp(`^${n}\\/?$`);
|
|
1920
2031
|
}
|
|
1921
|
-
function
|
|
1922
|
-
const n = e.split("/").filter(Boolean),
|
|
2032
|
+
function un(e, t) {
|
|
2033
|
+
const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean), i = {};
|
|
1923
2034
|
return n.forEach((a, o) => {
|
|
1924
2035
|
if (a.startsWith(":")) {
|
|
1925
|
-
const s = a.endsWith("?") ? a.slice(1, -1) : a.slice(1), l =
|
|
1926
|
-
l && (
|
|
2036
|
+
const s = a.endsWith("?") ? a.slice(1, -1) : a.slice(1), l = r[o];
|
|
2037
|
+
l && (i[s] = l);
|
|
1927
2038
|
}
|
|
1928
|
-
}),
|
|
2039
|
+
}), i;
|
|
1929
2040
|
}
|
|
1930
|
-
function
|
|
2041
|
+
function dn(e) {
|
|
1931
2042
|
return e.publicBasePath ?? `/apps/${e.name}`;
|
|
1932
2043
|
}
|
|
1933
|
-
function
|
|
2044
|
+
function na(e) {
|
|
1934
2045
|
const t = [];
|
|
1935
2046
|
for (const n of e) {
|
|
1936
2047
|
if (!n?.name) continue;
|
|
1937
|
-
const
|
|
1938
|
-
for (const
|
|
1939
|
-
if (!
|
|
1940
|
-
const a =
|
|
2048
|
+
const r = dn(n);
|
|
2049
|
+
for (const i of n.routes ?? []) {
|
|
2050
|
+
if (!i.public) continue;
|
|
2051
|
+
const a = i.path === "/" ? "" : i.path;
|
|
1941
2052
|
t.push({
|
|
1942
2053
|
appName: n.name,
|
|
1943
|
-
resource:
|
|
1944
|
-
pattern: `${
|
|
1945
|
-
props:
|
|
2054
|
+
resource: i.resource,
|
|
2055
|
+
pattern: `${r}${a}`,
|
|
2056
|
+
props: i.props
|
|
1946
2057
|
});
|
|
1947
2058
|
}
|
|
1948
2059
|
}
|
|
1949
2060
|
return t;
|
|
1950
2061
|
}
|
|
1951
|
-
function
|
|
1952
|
-
const n = e.split("/").filter(Boolean),
|
|
1953
|
-
for (let
|
|
1954
|
-
const a = n[
|
|
2062
|
+
function pn(e, t) {
|
|
2063
|
+
const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
|
|
2064
|
+
for (let i = 0; i < Math.min(n.length, r.length); i++) {
|
|
2065
|
+
const a = n[i].startsWith(":"), o = r[i].startsWith(":");
|
|
1955
2066
|
if (a !== o) return o;
|
|
1956
2067
|
}
|
|
1957
|
-
return n.length >
|
|
2068
|
+
return n.length > r.length;
|
|
1958
2069
|
}
|
|
1959
|
-
function
|
|
2070
|
+
function fn(e, t) {
|
|
1960
2071
|
if (typeof e != "string") return null;
|
|
1961
2072
|
let n = null;
|
|
1962
|
-
for (const
|
|
1963
|
-
|
|
1964
|
-
return n ? { ...n, params: { ...n.props, ...
|
|
2073
|
+
for (const r of t)
|
|
2074
|
+
cn(r.pattern).test(e) && (!n || pn(r.pattern, n.pattern)) && (n = r);
|
|
2075
|
+
return n ? { ...n, params: { ...n.props, ...un(n.pattern, e) } } : null;
|
|
1965
2076
|
}
|
|
1966
|
-
function
|
|
1967
|
-
return
|
|
2077
|
+
function ra(e, t) {
|
|
2078
|
+
return fn(e, t) !== null;
|
|
1968
2079
|
}
|
|
1969
|
-
const
|
|
2080
|
+
const mn = {
|
|
1970
2081
|
afrikaans: [
|
|
1971
2082
|
"[Muziek]",
|
|
1972
2083
|
"(C) TV GELDERLAND 2021",
|
|
@@ -2116,14 +2227,14 @@ const tn = {
|
|
|
2116
2227
|
"[MÚSICA]",
|
|
2117
2228
|
"[Music cuts in British]"
|
|
2118
2229
|
]
|
|
2119
|
-
},
|
|
2230
|
+
}, gn = (e) => {
|
|
2120
2231
|
let t = e;
|
|
2121
|
-
return Object.values(
|
|
2122
|
-
n.forEach((
|
|
2123
|
-
t = t.replaceAll(
|
|
2232
|
+
return Object.values(mn).forEach((n) => {
|
|
2233
|
+
n.forEach((r) => {
|
|
2234
|
+
t = t.replaceAll(r, "");
|
|
2124
2235
|
});
|
|
2125
2236
|
}), t = t.replace(/\(.*?\)/g, ""), t = t.replace(/\[.*?\]/g, ""), t;
|
|
2126
|
-
},
|
|
2237
|
+
}, hn = 6e4, yn = 8e3, An = 2, bn = 0.4, En = 3, Sn = /* @__PURE__ */ new Set([
|
|
2127
2238
|
"aan",
|
|
2128
2239
|
"als",
|
|
2129
2240
|
"ben",
|
|
@@ -2236,290 +2347,319 @@ const tn = {
|
|
|
2236
2347
|
"you",
|
|
2237
2348
|
"your"
|
|
2238
2349
|
]);
|
|
2239
|
-
function
|
|
2350
|
+
function _n(e) {
|
|
2240
2351
|
const t = /* @__PURE__ */ new Set();
|
|
2241
2352
|
for (const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))
|
|
2242
|
-
n.length <
|
|
2353
|
+
n.length < En || Sn.has(n) || t.add(n);
|
|
2243
2354
|
return [...t];
|
|
2244
2355
|
}
|
|
2245
|
-
function
|
|
2356
|
+
function Tn(e, t) {
|
|
2246
2357
|
if (!e.length) return 0;
|
|
2247
2358
|
if (!t.length) return 1;
|
|
2248
|
-
const n = new Set(t),
|
|
2249
|
-
let
|
|
2250
|
-
for (const a of
|
|
2251
|
-
return
|
|
2359
|
+
const n = new Set(t), r = new Set(e);
|
|
2360
|
+
let i = 0;
|
|
2361
|
+
for (const a of r) n.has(a) || (i += 1);
|
|
2362
|
+
return i / r.size;
|
|
2252
2363
|
}
|
|
2253
|
-
function
|
|
2364
|
+
function In(e, t = hn) {
|
|
2254
2365
|
const n = e.filter((o) => !o.partial && typeof o.text == "string");
|
|
2255
2366
|
if (!n.length) return { text: "", segmentCount: 0 };
|
|
2256
|
-
const
|
|
2257
|
-
return { text: n.filter((o) => (o.endedAt ?? 0) >=
|
|
2367
|
+
const i = n.reduce((o, s) => Math.max(o, s.endedAt ?? 0), 0) - t;
|
|
2368
|
+
return { text: n.filter((o) => (o.endedAt ?? 0) >= i).map((o) => gn(o.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
|
|
2258
2369
|
}
|
|
2259
|
-
const
|
|
2260
|
-
function
|
|
2261
|
-
const
|
|
2370
|
+
const Mn = 60;
|
|
2371
|
+
function ia(e, t, n = Mn) {
|
|
2372
|
+
const r = new Set(e), i = [...e];
|
|
2262
2373
|
for (const a of t)
|
|
2263
|
-
!a ||
|
|
2264
|
-
return
|
|
2374
|
+
!a || r.has(a) || (r.add(a), i.push(a));
|
|
2375
|
+
return i.slice(-n);
|
|
2265
2376
|
}
|
|
2266
|
-
function
|
|
2267
|
-
const { segments: t, now: n, state:
|
|
2268
|
-
if (
|
|
2377
|
+
function aa(e) {
|
|
2378
|
+
const { segments: t, now: n, state: r } = e;
|
|
2379
|
+
if (r.lastTriggerAt && n - r.lastTriggerAt < yn)
|
|
2269
2380
|
return { trigger: !1, reason: "too_soon" };
|
|
2270
|
-
const
|
|
2271
|
-
if (!
|
|
2272
|
-
const a =
|
|
2273
|
-
if (
|
|
2381
|
+
const i = In(t, e.windowMs);
|
|
2382
|
+
if (!i.text) return { trigger: !1, reason: "no_speech" };
|
|
2383
|
+
const a = i.segmentCount - (r.lastSegmentCount ?? 0);
|
|
2384
|
+
if (r.lastQueryTerms && a < An)
|
|
2274
2385
|
return { trigger: !1, reason: "too_few_new" };
|
|
2275
|
-
const o =
|
|
2276
|
-
return o.length ?
|
|
2386
|
+
const o = _n(i.text);
|
|
2387
|
+
return o.length ? r.lastQueryTerms?.length && Tn(o, r.lastQueryTerms) < bn ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: i.text, terms: o, segmentCount: i.segmentCount } : { trigger: !1, reason: "no_speech" };
|
|
2277
2388
|
}
|
|
2278
|
-
const
|
|
2279
|
-
function
|
|
2280
|
-
const
|
|
2281
|
-
if (!
|
|
2282
|
-
const a =
|
|
2283
|
-
return !
|
|
2389
|
+
const Me = 9e4, kn = ["out_of_office"], ke = (e) => kn.includes(e);
|
|
2390
|
+
function oa(e, t, n) {
|
|
2391
|
+
const r = n - e < Me, i = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
|
|
2392
|
+
if (!i?.status) return { online: r, status: r ? "available" : "offline" };
|
|
2393
|
+
const a = i.status;
|
|
2394
|
+
return !r && !ke(a) ? { online: !1, status: "offline" } : { online: r, status: a, message: i.message };
|
|
2284
2395
|
}
|
|
2285
|
-
function
|
|
2286
|
-
const n = t - e.lastSeenAt <
|
|
2287
|
-
return n === e.online &&
|
|
2396
|
+
function sa(e, t) {
|
|
2397
|
+
const n = t - e.lastSeenAt < Me, r = n || ke(e.status) ? e.status : "offline";
|
|
2398
|
+
return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
|
|
2288
2399
|
}
|
|
2289
|
-
function
|
|
2400
|
+
function la(e, t) {
|
|
2290
2401
|
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 };
|
|
2291
2402
|
}
|
|
2292
|
-
function
|
|
2403
|
+
function ca(e) {
|
|
2293
2404
|
return e.providerAvailable && e.allowed;
|
|
2294
2405
|
}
|
|
2295
|
-
const
|
|
2406
|
+
const ua = "installation-id";
|
|
2296
2407
|
export {
|
|
2297
2408
|
m as ACTIVITY_CATALOG,
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2409
|
+
Qt as AI_ATTACHMENT_LIMITS,
|
|
2410
|
+
Li as AI_ATTACHMENT_MAX_PER_TURN,
|
|
2411
|
+
$i as AI_ATTACHMENT_TURN_BUDGET,
|
|
2412
|
+
be as AI_VENDORS,
|
|
2413
|
+
Fe as ALLOWED_LINK_SCHEMES,
|
|
2414
|
+
B as ARTIFACT_MAX_BLOCKS,
|
|
2415
|
+
Yn as ARTIFACT_MAX_BODY_BYTES,
|
|
2416
|
+
N as ARTIFACT_MAX_CELL_LEN,
|
|
2417
|
+
W as ARTIFACT_MAX_KPI_ITEMS,
|
|
2418
|
+
F as ARTIFACT_MAX_LIST_ITEMS,
|
|
2308
2419
|
H as ARTIFACT_MAX_TABLE_COLUMNS,
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2420
|
+
V as ARTIFACT_MAX_TABLE_ROWS,
|
|
2421
|
+
de as ARTIFACT_MAX_TEXT_LEN,
|
|
2422
|
+
Ze as ASSIGNMENT_SCOPE_KIND,
|
|
2423
|
+
Te as AUTH_APP_NAME,
|
|
2424
|
+
$e as ActivityTypeRegistry,
|
|
2425
|
+
Gn as BUILT_IN_ONLY,
|
|
2426
|
+
yn as CADENCE_FLOOR_MS,
|
|
2427
|
+
An as CADENCE_MIN_NEW_SEGMENTS,
|
|
2428
|
+
bn as CADENCE_MIN_NOVELTY,
|
|
2429
|
+
hn as CADENCE_WINDOW_MS,
|
|
2430
|
+
dr as CLASSIFY_VARS,
|
|
2431
|
+
Hn as CORE_DIMENSIONS,
|
|
2432
|
+
on as CommunicationScheme,
|
|
2433
|
+
ri as DEFAULT_MEMORY_BUDGET,
|
|
2434
|
+
$t as DEFAULT_PHONE_REGION,
|
|
2435
|
+
Er as EMPTY_WORKFLOW,
|
|
2436
|
+
zi as FEATURE_FOLDER_MANAGEMENT,
|
|
2437
|
+
Xi as FEATURE_REMOTE_SEARCH,
|
|
2438
|
+
ua as INSTALLATION_HEADER,
|
|
2439
|
+
ot as INTERACTION_KIND,
|
|
2440
|
+
Hi as InteractionParticipantRole,
|
|
2441
|
+
mt as KB_FALLBACK_LOCALE,
|
|
2442
|
+
Z as KB_LOCALES,
|
|
2443
|
+
$ as LOOSE_STATUSES,
|
|
2332
2444
|
M as MAX_ACTIONS,
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2445
|
+
Qe as MAX_ASSIGNMENT_TURNS,
|
|
2446
|
+
R as MAX_BLOCKS,
|
|
2447
|
+
ye as MAX_COLLECTION_DEPTH,
|
|
2448
|
+
T as MAX_FIELDS,
|
|
2337
2449
|
I as MAX_LIST_ITEMS,
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2450
|
+
Qr as MAX_MEMORY_BROWSE,
|
|
2451
|
+
ni as MAX_MEMORY_BUDGET,
|
|
2452
|
+
ei as MAX_MEMORY_CHARS,
|
|
2453
|
+
Mn as MAX_SHOWN_KEYS,
|
|
2454
|
+
yt as MAX_TOPIC_CANDIDATES,
|
|
2455
|
+
ht as MAX_TOPIC_EXAMPLES,
|
|
2456
|
+
v as MAX_TOPIC_EXAMPLE_CHARS,
|
|
2457
|
+
ti as MIN_MEMORY_BUDGET,
|
|
2458
|
+
L as PHONE_REGIONS,
|
|
2459
|
+
Me as PRESENCE_ONLINE_WINDOW_MS,
|
|
2460
|
+
kn as PRESENCE_SURVIVES_OFFLINE,
|
|
2461
|
+
Vi as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
|
|
2462
|
+
Fi as PROVIDER_FEATURE_MESSAGE_WINDOW,
|
|
2463
|
+
jt as PUBLIC_EMAIL_DOMAINS,
|
|
2464
|
+
q as READ_STEP_TYPES,
|
|
2465
|
+
Tt as RELATED_SUBJECT_KINDS,
|
|
2466
|
+
Se as RESERVED_STATUS_KEYS,
|
|
2467
|
+
qi as RESOURCE_DESCRIBE_SERVICE,
|
|
2468
|
+
Zi as RESOURCE_RESOLVE_SERVICE,
|
|
2469
|
+
Ji as RESOURCE_SEARCH_SERVICE,
|
|
2470
|
+
Hr as SIGNATURE_INTENTS,
|
|
2471
|
+
ct as STEP_MAX_TOKENS_MAX,
|
|
2472
|
+
lt as STEP_MAX_TOKENS_MIN,
|
|
2473
|
+
Yt as SUMMARY_MIN_LAST_CHARS,
|
|
2474
|
+
Xt as SUMMARY_MIN_MESSAGES,
|
|
2475
|
+
Je as TERMINAL_ASSIGNMENT_STATUSES,
|
|
2476
|
+
ut as TERMINAL_RUN_STATUSES,
|
|
2477
|
+
ur as TRIGGER_VARS,
|
|
2478
|
+
Yi as UNSUPPORTED,
|
|
2479
|
+
Ue as USAGE_DIMENSIONS,
|
|
2480
|
+
je as USAGE_DIMENSION_IDS,
|
|
2481
|
+
kt as WORK_ITEM_SCOPE_KIND,
|
|
2482
|
+
Ct as WORK_PROJECT_SCOPE_KIND,
|
|
2483
|
+
Rr as acceptExampleCandidate,
|
|
2484
|
+
nt as actingIdentityKey,
|
|
2485
|
+
di as activeWorkTypes,
|
|
2486
|
+
vn as activityIconOf,
|
|
2487
|
+
jn as activityJoinUrl,
|
|
2488
|
+
ve as activitySnippet,
|
|
2489
|
+
xe as activityTextParams,
|
|
2490
|
+
Un as activityTimelineText,
|
|
2491
|
+
Vn as activityTimestamp,
|
|
2373
2492
|
d as activityTypeInfo,
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2493
|
+
mr as actorKey,
|
|
2494
|
+
Lr as addExampleCandidate,
|
|
2495
|
+
sa as agePresenceEntry,
|
|
2496
|
+
Zt as aiAttachmentKind,
|
|
2497
|
+
Ri as aiAttachmentRejection,
|
|
2498
|
+
ee as aiBudgetLimit,
|
|
2499
|
+
Fr as aiBudgetPeriodKey,
|
|
2500
|
+
St as aiBudgetPeriodStart,
|
|
2501
|
+
Br as aiBudgetState,
|
|
2502
|
+
Gr as aiVendorAcceptsAttachment,
|
|
2503
|
+
Kr as aiVendorDefaultModel,
|
|
2504
|
+
Pr as aiVendorLabel,
|
|
2505
|
+
jr as aiVendorNeedsBaseUrl,
|
|
2506
|
+
Ur as aiVendorsWith,
|
|
2507
|
+
Ie as appNameFromPath,
|
|
2508
|
+
oi as applyRounding,
|
|
2509
|
+
Wr as applySignature,
|
|
2510
|
+
Jn as artifactBodyBytes,
|
|
2511
|
+
Zn as artifactOutline,
|
|
2512
|
+
Qn as artifactToMarkdown,
|
|
2513
|
+
Ar as assignmentMismatch,
|
|
2514
|
+
ir as assignmentScopeKey,
|
|
2515
|
+
or as assignmentSubject,
|
|
2516
|
+
Bn as buildActivityPreview,
|
|
2517
|
+
Ki as buildChannelIntents,
|
|
2518
|
+
er as buildShareKeys,
|
|
2519
|
+
In as buildWindow,
|
|
2520
|
+
xr as canNestUnder,
|
|
2521
|
+
Ln as carriesText,
|
|
2522
|
+
$r as categoryLabel,
|
|
2523
|
+
vt as categoryOf,
|
|
2524
|
+
Bi as channelKindForScheme,
|
|
2525
|
+
xn as channelKindOf,
|
|
2526
|
+
br as clampStepMaxTokens,
|
|
2527
|
+
vi as cleanMessageText,
|
|
2528
|
+
Mt as compareWorkTypes,
|
|
2529
|
+
sr as decideAssignmentState,
|
|
2530
|
+
aa as decideCadence,
|
|
2531
|
+
gt as defaultLocaleOf,
|
|
2532
|
+
bi as defaultStatusKey,
|
|
2533
|
+
Wi as defineIntent,
|
|
2534
|
+
pt as depthOf,
|
|
2535
|
+
oa as derivePresence,
|
|
2536
|
+
Pi as disabledIntentsFromCapabilities,
|
|
2537
|
+
ai as elapsedSeconds,
|
|
2538
|
+
Mi as emailDomain,
|
|
2539
|
+
wi as endpointKey,
|
|
2540
|
+
un as extractParams,
|
|
2541
|
+
_n as extractTerms,
|
|
2542
|
+
ji as filterByEndpoint,
|
|
2543
|
+
Ui as filterByIntent,
|
|
2544
|
+
an as filterByTargetScheme,
|
|
2423
2545
|
S as findAiVendor,
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2546
|
+
Wn as flattenLocales,
|
|
2547
|
+
De as floorToPeriod,
|
|
2548
|
+
tt as formatActingIdentity,
|
|
2549
|
+
li as formatClock,
|
|
2550
|
+
si as formatHm,
|
|
2551
|
+
fi as formatItemKey,
|
|
2552
|
+
Re as formatPeriod,
|
|
2553
|
+
Di as freshSources,
|
|
2554
|
+
Fn as getActivitySeenUserIds,
|
|
2555
|
+
zr as getContactEndpoints,
|
|
2556
|
+
Jr as getShortTitle,
|
|
2557
|
+
qr as getUrgencyScore,
|
|
2435
2558
|
Ae as heightOf,
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2559
|
+
wr as helpCenterText,
|
|
2560
|
+
cr as humanizeAction,
|
|
2561
|
+
st as interactionIdOf,
|
|
2562
|
+
pi as isAgentUser,
|
|
2563
|
+
Xr as isAssigned,
|
|
2564
|
+
rr as isAssignmentTerminal,
|
|
2565
|
+
it as isAssignmentTrigger,
|
|
2566
|
+
wn as isChatMessageActivity,
|
|
2567
|
+
Yr as isClosed,
|
|
2568
|
+
Pn as isConnectedType,
|
|
2569
|
+
ea as isDeepLink,
|
|
2570
|
+
ft as isDescendant,
|
|
2571
|
+
Cn as isEmailActivity,
|
|
2572
|
+
Ir as isInFlight,
|
|
2573
|
+
Zr as isInteractionUnseen,
|
|
2574
|
+
ta as isLandingPath,
|
|
2575
|
+
xi as isLikelyBulk,
|
|
2576
|
+
ce as isMessageShape,
|
|
2577
|
+
On as isMessageType,
|
|
2578
|
+
pn as isMoreSpecificPattern,
|
|
2579
|
+
dt as isPaused,
|
|
2580
|
+
Dn as isPlaybookAuthoredType,
|
|
2581
|
+
ki as isPublicEmailDomain,
|
|
2582
|
+
ra as isPublicPath,
|
|
2583
|
+
$n as isReplyableType,
|
|
2584
|
+
Tr as isTerminal,
|
|
2585
|
+
Oi as isThreadLongEnough,
|
|
2586
|
+
Kn as isTranscriptType,
|
|
2587
|
+
Ei as isWorkClosed,
|
|
2588
|
+
ui as isWorkTypeVisible,
|
|
2589
|
+
hi as itemDossierKeys,
|
|
2590
|
+
Nt as ladderFor,
|
|
2591
|
+
Cr as linkLabel,
|
|
2592
|
+
Vr as listeningAllowed,
|
|
2593
|
+
vr as localeInstruction,
|
|
2594
|
+
Nr as localeName,
|
|
2595
|
+
Or as localesOf,
|
|
2596
|
+
Ti as looksLikeEmail,
|
|
2597
|
+
Gi as matchContactToIntents,
|
|
2598
|
+
fn as matchPublicRoute,
|
|
2599
|
+
ia as mergeShownKeys,
|
|
2600
|
+
Rn as messageCountsAs,
|
|
2601
|
+
Ci as needsPhoneRegion,
|
|
2602
|
+
qn as normalizeArtifactBlocks,
|
|
2603
|
+
Nn as normalizeBlocks,
|
|
2604
|
+
_e as normalizeEmail,
|
|
2478
2605
|
g as normalizeExample,
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2606
|
+
Tn as novelty,
|
|
2607
|
+
pr as parseActingIdentity,
|
|
2608
|
+
mi as parseItemKey,
|
|
2609
|
+
cn as pathToRegex,
|
|
2610
|
+
zn as periodsInRange,
|
|
2611
|
+
Ii as phoneSuffix,
|
|
2612
|
+
Ni as plainTextFromMarkdown,
|
|
2613
|
+
rt as playbookActor,
|
|
2614
|
+
_r as procedureOf,
|
|
2615
|
+
yi as projectDossierKeys,
|
|
2616
|
+
dn as publicBasePathFor,
|
|
2617
|
+
na as publicRoutePatterns,
|
|
2489
2618
|
x as readPath,
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2619
|
+
J as readStepError,
|
|
2620
|
+
at as refKey,
|
|
2621
|
+
Ut as registrableDomain,
|
|
2622
|
+
bt as rejectExampleCandidate,
|
|
2623
|
+
ii as relatedByDefault,
|
|
2624
|
+
nn as resolveAccountCapabilities,
|
|
2496
2625
|
O as resolveActivityText,
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2626
|
+
tn as resolveChannelIntents,
|
|
2627
|
+
_t as resolveSignature,
|
|
2628
|
+
la as resolveWorkMode,
|
|
2629
|
+
Qi as resourceKindOf,
|
|
2630
|
+
fr as runActor,
|
|
2631
|
+
kr as runInteractionId,
|
|
2632
|
+
ze as sanitizeInline,
|
|
2633
|
+
gn as sanitizeTranscript,
|
|
2634
|
+
lr as selectLenses,
|
|
2635
|
+
me as shareKeyForTeam,
|
|
2636
|
+
fe as shareKeyForUser,
|
|
2637
|
+
tr as shareKeysForViewer,
|
|
2638
|
+
ca as shouldRunAudioPipeline,
|
|
2639
|
+
xt as sortStatuses,
|
|
2640
|
+
en as sourceKey,
|
|
2641
|
+
Ai as statusIn,
|
|
2642
|
+
Sr as stepsOf,
|
|
2643
|
+
Ne as stripHtml,
|
|
2644
|
+
Mr as subjectKeyOf,
|
|
2645
|
+
ge as subjectOf,
|
|
2646
|
+
gi as suggestProjectKey,
|
|
2647
|
+
yr as targetById,
|
|
2648
|
+
hr as targetForActivityType,
|
|
2649
|
+
re as toE164,
|
|
2650
|
+
nr as toolSourceKinds,
|
|
2651
|
+
Et as topicOfferedForTeam,
|
|
2652
|
+
Dr as topicsForTeam,
|
|
2653
|
+
At as truncateExample,
|
|
2654
|
+
Si as uniqueWorkStatusKey,
|
|
2655
|
+
ci as uniqueWorkTypeKey,
|
|
2656
|
+
Ge as usageMetricId,
|
|
2657
|
+
Xn as usageMetrics,
|
|
2658
|
+
_i as validateStatuses,
|
|
2659
|
+
gr as valueAtPath,
|
|
2660
|
+
ar as wakesAssignment,
|
|
2661
|
+
wt as workItemScopeKey,
|
|
2662
|
+
Ee as workProjectScopeKey,
|
|
2663
|
+
Ot as workStatusKey,
|
|
2664
|
+
It as workTypeKey
|
|
2525
2665
|
};
|