@opencxh/domain 1.160.0 → 1.162.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/assignment/types.d.ts +17 -12
- package/dist/entities/custom-field-def/types.d.ts +29 -2
- package/dist/entities/time-entry/duration.d.ts +22 -0
- package/dist/entities/time-entry/duration.test.d.ts +1 -0
- package/dist/entities/time-entry/index.d.ts +3 -0
- package/dist/entities/time-entry/types.d.ts +176 -0
- 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 +929 -776
- package/dist/platform/scope.d.ts +19 -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 D = 10, _ = 10, I = 10, M = 5, we = /* @__PURE__ */ new Set([
|
|
8
8
|
"header",
|
|
9
9
|
"section",
|
|
10
10
|
"context",
|
|
@@ -14,85 +14,85 @@ const $ = 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 >= D) {
|
|
29
|
+
t("more than " + D + " 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("more than " + _ + " fields in a section"), i.fields = i.fields.slice(0, _));
|
|
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")}`;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function R(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 K(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,15 +129,15 @@ const m = {
|
|
|
129
129
|
shape: "event",
|
|
130
130
|
channelKind: "voice",
|
|
131
131
|
icon: "phone",
|
|
132
|
-
snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${
|
|
133
|
-
timeline: (e) => `Call ended${
|
|
132
|
+
snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${A(e.payload.duration)})` : ""}`,
|
|
133
|
+
timeline: (e) => `Call ended${R(e.payload.duration)}`
|
|
134
134
|
},
|
|
135
135
|
VOICE_CALL_MISSED: {
|
|
136
136
|
shape: "event",
|
|
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: {
|
|
@@ -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) => `${K(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) => `${K(e.payload.callType)} ended${R(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: {
|
|
@@ -414,60 +414,60 @@ const m = {
|
|
|
414
414
|
}
|
|
415
415
|
};
|
|
416
416
|
function P(e) {
|
|
417
|
-
const t = e.payload, n = t.bodySnippet?.trim() ||
|
|
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 Dn(e) {
|
|
442
442
|
return d(e)?.countsAs;
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function Rn(e) {
|
|
445
445
|
return d(e)?.playbookAuthored === !0;
|
|
446
446
|
}
|
|
447
|
-
function
|
|
447
|
+
function Kn(e) {
|
|
448
448
|
return d(e)?.connected === !0;
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function Pn(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 Hn(e) {
|
|
634
634
|
return e.createdAt ?? 0;
|
|
635
635
|
}
|
|
636
|
-
const
|
|
636
|
+
const Vn = [
|
|
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 Ln = [
|
|
|
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
|
-
function
|
|
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 De(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 Re(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 Ke = 36e5, Pe = 864e5;
|
|
665
|
+
function zn(e, t, n) {
|
|
666
|
+
const r = n === "hour" ? Ke : Pe, i = [];
|
|
667
|
+
for (let a = Re(e, n); a <= t; a += r)
|
|
668
|
+
i.push(De(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, H = 200, V = 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:"], He = /^[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 = He.exec(t)?.[0];
|
|
708
|
+
return n ? Fe.includes(n.toLowerCase()) : !t.startsWith("//");
|
|
709
709
|
}
|
|
710
|
-
const
|
|
711
|
-
function
|
|
710
|
+
const Ve = /^[ \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
|
+
Ve,
|
|
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
|
-
if (s.length >=
|
|
844
|
-
t("more than " +
|
|
843
|
+
if (s.length >= V) {
|
|
844
|
+
t("more than " + V + " table columns");
|
|
845
845
|
break;
|
|
846
846
|
}
|
|
847
|
-
const
|
|
848
|
-
s.push(T ? { label:
|
|
847
|
+
const y = u(c?.label, N), T = c?.align === "right" ? "right" : void 0;
|
|
848
|
+
s.push(T ? { label: y, align: T } : { 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 >= H) {
|
|
857
|
+
t("more than " + H + " table rows");
|
|
858
858
|
break;
|
|
859
859
|
}
|
|
860
|
-
const
|
|
860
|
+
const y = Array.isArray(c) ? c : [];
|
|
861
861
|
p.push(
|
|
862
|
-
s.map((T,
|
|
862
|
+
s.map((T, 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 Tr(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 _r(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 Dr(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 Rr(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,76 +1421,200 @@ 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 Kr(e) {
|
|
1427
1427
|
return S(e)?.label ?? e;
|
|
1428
1428
|
}
|
|
1429
|
-
function
|
|
1429
|
+
function Pr(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 Hr(e) {
|
|
1459
1459
|
return e?.listeningEnabled !== !1;
|
|
1460
1460
|
}
|
|
1461
|
-
const
|
|
1462
|
-
function
|
|
1461
|
+
const Vr = /* @__PURE__ */ new Set(["mail", "message"]);
|
|
1462
|
+
function Tt(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 = Tt(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, _t = ["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 _t.includes(t);
|
|
1490
|
+
}
|
|
1491
|
+
function ai(e, t) {
|
|
1492
|
+
const n = e.accumulatedSeconds || 0;
|
|
1493
|
+
return e.runningSince ? n + Math.max(0, Math.floor((t - e.runningSince) / 1e3)) : n;
|
|
1494
|
+
}
|
|
1495
|
+
function oi(e, t) {
|
|
1496
|
+
const n = Math.max(1, Math.ceil(Math.max(0, e) / 60));
|
|
1497
|
+
if (!t || t === "exact") return n * 60;
|
|
1498
|
+
const r = Number(t);
|
|
1499
|
+
return !Number.isFinite(r) || r <= 0 ? n * 60 : Math.ceil(n / r) * r * 60;
|
|
1500
|
+
}
|
|
1501
|
+
function si(e) {
|
|
1502
|
+
const t = Math.max(0, Math.round(e / 60));
|
|
1503
|
+
return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
|
|
1504
|
+
}
|
|
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);
|
|
1490
1527
|
}
|
|
1491
|
-
function
|
|
1528
|
+
function Mt(e, t) {
|
|
1529
|
+
const n = (e.order ?? 0) - (t.order ?? 0);
|
|
1530
|
+
return n !== 0 ? n : (e.label || "").localeCompare(t.label || "");
|
|
1531
|
+
}
|
|
1532
|
+
function pi(e) {
|
|
1492
1533
|
return e.type === "agent";
|
|
1493
1534
|
}
|
|
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 Ti(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
|
+
}
|
|
1494
1618
|
const L = {
|
|
1495
1619
|
// The lower bounds are deliberately generous: service ranges (0800/0900) are
|
|
1496
1620
|
// shorter than geographic numbers, and a too-strict minimum silently drops them.
|
|
@@ -1514,81 +1638,81 @@ const L = {
|
|
|
1514
1638
|
PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
|
|
1515
1639
|
US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
|
|
1516
1640
|
CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
|
|
1517
|
-
},
|
|
1641
|
+
}, $t = "NL", Lt = 15, Dt = 8, Rt = Array.from(
|
|
1518
1642
|
new Set(Object.values(L).map((e) => e.callingCode))
|
|
1519
1643
|
).sort((e, t) => t.length - e.length);
|
|
1520
|
-
function
|
|
1644
|
+
function te(e) {
|
|
1521
1645
|
if (e)
|
|
1522
1646
|
return L[e.trim().toUpperCase()];
|
|
1523
1647
|
}
|
|
1524
1648
|
function E(e, t) {
|
|
1525
1649
|
return e.length >= t.nsnMin && e.length <= t.nsnMax;
|
|
1526
1650
|
}
|
|
1527
|
-
function
|
|
1528
|
-
if (e.length >
|
|
1529
|
-
for (const t of
|
|
1651
|
+
function ne(e) {
|
|
1652
|
+
if (e.length > Lt) return null;
|
|
1653
|
+
for (const t of Rt) {
|
|
1530
1654
|
if (!e.startsWith(t)) continue;
|
|
1531
1655
|
const n = e.slice(t.length);
|
|
1532
|
-
for (const
|
|
1533
|
-
if (
|
|
1534
|
-
const
|
|
1535
|
-
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}`;
|
|
1536
1660
|
}
|
|
1537
1661
|
return null;
|
|
1538
1662
|
}
|
|
1539
|
-
return e.length <
|
|
1663
|
+
return e.length < Dt ? null : `+${e}`;
|
|
1540
1664
|
}
|
|
1541
|
-
function
|
|
1665
|
+
function Kt(e) {
|
|
1542
1666
|
let t = e.trim();
|
|
1543
1667
|
const n = t.match(/^(sips?|tel|whatsapp):/i);
|
|
1544
1668
|
n && (t = t.slice(n[0].length));
|
|
1545
|
-
const
|
|
1546
|
-
return
|
|
1669
|
+
const r = t.indexOf("@");
|
|
1670
|
+
return r >= 0 && (t = t.slice(0, r)), t.trim();
|
|
1547
1671
|
}
|
|
1548
|
-
function
|
|
1672
|
+
function _i(e) {
|
|
1549
1673
|
if (!e) return !1;
|
|
1550
1674
|
const t = e.indexOf("@");
|
|
1551
1675
|
if (t <= 0) return !1;
|
|
1552
1676
|
const n = e.slice(0, t).trim();
|
|
1553
1677
|
return !/^[+\d\s().-]+$/.test(n);
|
|
1554
1678
|
}
|
|
1555
|
-
function
|
|
1679
|
+
function re(e, t) {
|
|
1556
1680
|
if (!e) return null;
|
|
1557
|
-
const n =
|
|
1681
|
+
const n = Kt(e);
|
|
1558
1682
|
if (!n) return null;
|
|
1559
|
-
const
|
|
1560
|
-
if (!
|
|
1561
|
-
if (
|
|
1562
|
-
if (
|
|
1563
|
-
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);
|
|
1564
1688
|
if (!a) return null;
|
|
1565
1689
|
const o = a.trunkPrefix;
|
|
1566
|
-
if (o &&
|
|
1567
|
-
const s =
|
|
1690
|
+
if (o && i.startsWith(o)) {
|
|
1691
|
+
const s = i.slice(o.length);
|
|
1568
1692
|
return E(s, a) ? `+${a.callingCode}${s}` : null;
|
|
1569
1693
|
}
|
|
1570
|
-
if (
|
|
1571
|
-
const s =
|
|
1694
|
+
if (i.startsWith(a.callingCode)) {
|
|
1695
|
+
const s = i.slice(a.callingCode.length);
|
|
1572
1696
|
if (E(s, a)) return `+${a.callingCode}${s}`;
|
|
1573
1697
|
}
|
|
1574
|
-
return !o && E(
|
|
1698
|
+
return !o && E(i, a) ? `+${a.callingCode}${i}` : null;
|
|
1575
1699
|
}
|
|
1576
|
-
function
|
|
1700
|
+
function Ii(e, t = 9) {
|
|
1577
1701
|
const n = (e ?? "").replace(/\D/g, "");
|
|
1578
1702
|
return n.length < t ? null : n.slice(-t);
|
|
1579
1703
|
}
|
|
1580
|
-
function
|
|
1704
|
+
function Te(e) {
|
|
1581
1705
|
if (!e) return null;
|
|
1582
1706
|
const t = e.trim().toLowerCase(), n = t.lastIndexOf("@");
|
|
1583
1707
|
if (n <= 0 || n === t.length - 1) return null;
|
|
1584
|
-
const
|
|
1585
|
-
return !
|
|
1708
|
+
const r = t.slice(0, n).split("+")[0], i = t.slice(n + 1);
|
|
1709
|
+
return !r || !i.includes(".") ? null : `${r}@${i}`;
|
|
1586
1710
|
}
|
|
1587
|
-
function
|
|
1588
|
-
const t =
|
|
1711
|
+
function Mi(e) {
|
|
1712
|
+
const t = Te(e);
|
|
1589
1713
|
return t ? t.slice(t.lastIndexOf("@") + 1) : null;
|
|
1590
1714
|
}
|
|
1591
|
-
const
|
|
1715
|
+
const Pt = /* @__PURE__ */ new Set([
|
|
1592
1716
|
"co.uk",
|
|
1593
1717
|
"org.uk",
|
|
1594
1718
|
"gov.uk",
|
|
@@ -1598,14 +1722,14 @@ const Ct = /* @__PURE__ */ new Set([
|
|
|
1598
1722
|
"com.br",
|
|
1599
1723
|
"co.za"
|
|
1600
1724
|
]);
|
|
1601
|
-
function
|
|
1725
|
+
function Ut(e) {
|
|
1602
1726
|
if (!e) return null;
|
|
1603
1727
|
const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
|
|
1604
1728
|
if (t.length < 2) return null;
|
|
1605
1729
|
const n = t.slice(-2).join(".");
|
|
1606
|
-
return
|
|
1730
|
+
return Pt.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
|
|
1607
1731
|
}
|
|
1608
|
-
const
|
|
1732
|
+
const jt = /* @__PURE__ */ new Set([
|
|
1609
1733
|
"gmail.com",
|
|
1610
1734
|
"googlemail.com",
|
|
1611
1735
|
"outlook.com",
|
|
@@ -1650,44 +1774,44 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
1650
1774
|
"proximus.be",
|
|
1651
1775
|
"scarlet.be"
|
|
1652
1776
|
]);
|
|
1653
|
-
function
|
|
1654
|
-
const t =
|
|
1655
|
-
return t ?
|
|
1777
|
+
function ki(e) {
|
|
1778
|
+
const t = Ut(e);
|
|
1779
|
+
return t ? jt.has(t) : !1;
|
|
1656
1780
|
}
|
|
1657
|
-
function
|
|
1781
|
+
function Ci(e) {
|
|
1658
1782
|
if (!e) return !1;
|
|
1659
1783
|
const t = e.trim().toLowerCase();
|
|
1660
1784
|
return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
|
|
1661
1785
|
}
|
|
1662
|
-
function
|
|
1786
|
+
function wi(e, t, n) {
|
|
1663
1787
|
if (!e || !t) return null;
|
|
1664
|
-
const
|
|
1665
|
-
if (
|
|
1666
|
-
const a =
|
|
1788
|
+
const r = e.trim().toLowerCase();
|
|
1789
|
+
if (r === "tel" || r === "sms" || r === "whatsapp") {
|
|
1790
|
+
const a = re(t, n);
|
|
1667
1791
|
return a ? `tel:${a}` : null;
|
|
1668
1792
|
}
|
|
1669
|
-
if (
|
|
1670
|
-
const a =
|
|
1793
|
+
if (r === "fax") {
|
|
1794
|
+
const a = re(t, n);
|
|
1671
1795
|
return a ? `fax:${a}` : null;
|
|
1672
1796
|
}
|
|
1673
|
-
if (
|
|
1674
|
-
const a =
|
|
1797
|
+
if (r === "mailto" || r === "email") {
|
|
1798
|
+
const a = Te(t);
|
|
1675
1799
|
return a ? `mailto:${a}` : null;
|
|
1676
1800
|
}
|
|
1677
|
-
const
|
|
1678
|
-
return
|
|
1801
|
+
const i = t.trim().toLowerCase();
|
|
1802
|
+
return i ? `${r}:${i}` : null;
|
|
1679
1803
|
}
|
|
1680
|
-
const
|
|
1681
|
-
function
|
|
1804
|
+
const Gt = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, Bt = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
|
|
1805
|
+
function Ni(e) {
|
|
1682
1806
|
if (typeof e != "string" || !e) return "";
|
|
1683
1807
|
let t = e;
|
|
1684
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(`
|
|
1685
1809
|
`).map(
|
|
1686
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,}$/, "")
|
|
1687
1811
|
).join(`
|
|
1688
|
-
`), 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();
|
|
1689
1813
|
}
|
|
1690
|
-
const
|
|
1814
|
+
const Ft = [
|
|
1691
1815
|
/<blockquote/i,
|
|
1692
1816
|
/class="?gmail_quote/i,
|
|
1693
1817
|
// Gmail quote container
|
|
@@ -1700,17 +1824,17 @@ const xt = [
|
|
|
1700
1824
|
// Outlook underscore separator before "From:"
|
|
1701
1825
|
/\bOn\b[\s\S]{0,200}?\bwrote:/i
|
|
1702
1826
|
// Gmail "On <date> <name> wrote:"
|
|
1703
|
-
], ie = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i,
|
|
1704
|
-
function
|
|
1827
|
+
], ie = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, Ht = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
|
|
1828
|
+
function Vt(e) {
|
|
1705
1829
|
const t = e.split(`
|
|
1706
1830
|
`);
|
|
1707
1831
|
for (let n = 0; n < t.length; n++)
|
|
1708
|
-
if (
|
|
1832
|
+
if (Ht.test(t[n]) || ie.test(t[n]) && t.slice(n + 1, n + 4).some((r) => ie.test(r)))
|
|
1709
1833
|
return t.slice(0, n).join(`
|
|
1710
1834
|
`).trim();
|
|
1711
1835
|
return e;
|
|
1712
1836
|
}
|
|
1713
|
-
function
|
|
1837
|
+
function ae(e) {
|
|
1714
1838
|
let t = e;
|
|
1715
1839
|
return t = t.replace(/<(script|style)[\s\S]*?<\/\1>/gi, ""), t = t.replace(/<br\s*\/?>/gi, `
|
|
1716
1840
|
`), t = t.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
|
|
@@ -1718,38 +1842,38 @@ function re(e) {
|
|
|
1718
1842
|
`), t = t.replace(/<\/(div|li|tr)>/gi, `
|
|
1719
1843
|
`), t = t.replace(/<\/(td|th)>/gi, " "), t = t.replace(/<[^>]+>/g, ""), t = t.replace(/<[^>]*$/, ""), t;
|
|
1720
1844
|
}
|
|
1721
|
-
function ae(e) {
|
|
1722
|
-
return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
|
|
1723
|
-
}
|
|
1724
1845
|
function oe(e) {
|
|
1725
|
-
return
|
|
1846
|
+
return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
|
|
1726
1847
|
}
|
|
1727
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) {
|
|
1728
1852
|
return e.replace(/\r/g, "").replace(/[ \t]+/g, " ").replace(/ *\n */g, `
|
|
1729
1853
|
`).replace(/\n{3,}/g, `
|
|
1730
1854
|
|
|
1731
1855
|
`).trim();
|
|
1732
1856
|
}
|
|
1733
|
-
function
|
|
1857
|
+
function vi(e) {
|
|
1734
1858
|
if (typeof e != "string" || !e) return "";
|
|
1735
1859
|
let t = e.length;
|
|
1736
|
-
for (const a of
|
|
1860
|
+
for (const a of Ft) {
|
|
1737
1861
|
const o = e.search(a);
|
|
1738
1862
|
o >= 0 && o < t && (t = o);
|
|
1739
1863
|
}
|
|
1740
1864
|
const n = e.slice(0, t);
|
|
1741
|
-
let
|
|
1742
|
-
return
|
|
1865
|
+
let r = le(se(ae(n)));
|
|
1866
|
+
return r || (r = le(se(ae(e)))), Vt(r) || r;
|
|
1743
1867
|
}
|
|
1744
|
-
const
|
|
1745
|
-
function
|
|
1746
|
-
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));
|
|
1747
1871
|
}
|
|
1748
|
-
const
|
|
1749
|
-
function
|
|
1750
|
-
return e >=
|
|
1872
|
+
const Xt = 3, Yt = 600;
|
|
1873
|
+
function Oi(e, t) {
|
|
1874
|
+
return e >= Xt || t >= Yt;
|
|
1751
1875
|
}
|
|
1752
|
-
const
|
|
1876
|
+
const qt = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), Jt = /* @__PURE__ */ new Set([
|
|
1753
1877
|
"text/plain",
|
|
1754
1878
|
"text/markdown",
|
|
1755
1879
|
"text/csv",
|
|
@@ -1758,88 +1882,88 @@ const Ut = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "ima
|
|
|
1758
1882
|
"application/xml",
|
|
1759
1883
|
"text/xml"
|
|
1760
1884
|
]);
|
|
1761
|
-
function
|
|
1885
|
+
function Zt(e) {
|
|
1762
1886
|
const t = (e ?? "").trim().toLowerCase().split(";")[0];
|
|
1763
|
-
return t ?
|
|
1887
|
+
return t ? qt.has(t) ? "image" : t === "application/pdf" ? "pdf" : Jt.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
|
|
1764
1888
|
}
|
|
1765
|
-
const h = 1024 * 1024,
|
|
1889
|
+
const h = 1024 * 1024, Qt = {
|
|
1766
1890
|
image: 5 * h,
|
|
1767
1891
|
pdf: 20 * h,
|
|
1768
1892
|
text: 1 * h,
|
|
1769
1893
|
audio: 20 * h
|
|
1770
|
-
},
|
|
1771
|
-
function
|
|
1772
|
-
const n =
|
|
1773
|
-
return n === "unsupported" ? "unsupported" : t >
|
|
1894
|
+
}, $i = 25 * h, Li = 5;
|
|
1895
|
+
function Di(e, t) {
|
|
1896
|
+
const n = Zt(e);
|
|
1897
|
+
return n === "unsupported" ? "unsupported" : t > Qt[n] ? "too-large" : null;
|
|
1774
1898
|
}
|
|
1775
|
-
function
|
|
1899
|
+
function en(e) {
|
|
1776
1900
|
return `${e.kind}:${e.id || e.url || e.title}`;
|
|
1777
1901
|
}
|
|
1778
|
-
function
|
|
1779
|
-
const n = new Set(t),
|
|
1902
|
+
function Ri(e, t = []) {
|
|
1903
|
+
const n = new Set(t), r = [], i = [];
|
|
1780
1904
|
for (const a of e) {
|
|
1781
|
-
const o =
|
|
1782
|
-
n.has(o) || (n.add(o),
|
|
1905
|
+
const o = en(a);
|
|
1906
|
+
n.has(o) || (n.add(o), r.push(a), i.push(o));
|
|
1783
1907
|
}
|
|
1784
|
-
return { sources:
|
|
1908
|
+
return { sources: r, keys: i };
|
|
1785
1909
|
}
|
|
1786
|
-
function
|
|
1787
|
-
const n = new Set(e.disabledIntents ?? []),
|
|
1788
|
-
if (!e.extraIntents || e.extraIntents.length === 0) return
|
|
1789
|
-
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));
|
|
1790
1914
|
for (const o of e.extraIntents)
|
|
1791
|
-
a.has(o.intent) || (
|
|
1792
|
-
return
|
|
1915
|
+
a.has(o.intent) || (i.push(o), a.add(o.intent));
|
|
1916
|
+
return i;
|
|
1793
1917
|
}
|
|
1794
|
-
function
|
|
1918
|
+
function nn(e, t) {
|
|
1795
1919
|
const n = {};
|
|
1796
|
-
for (const
|
|
1797
|
-
if (!
|
|
1798
|
-
const
|
|
1799
|
-
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;
|
|
1800
1924
|
}
|
|
1801
1925
|
return n;
|
|
1802
1926
|
}
|
|
1803
|
-
function
|
|
1804
|
-
const n =
|
|
1805
|
-
return Object.entries(n).filter(([,
|
|
1927
|
+
function Ki(e, t) {
|
|
1928
|
+
const n = nn(e, t);
|
|
1929
|
+
return Object.entries(n).filter(([, r]) => !r).map(([r]) => r);
|
|
1806
1930
|
}
|
|
1807
|
-
function
|
|
1931
|
+
function rn(e, t) {
|
|
1808
1932
|
return t ? {
|
|
1809
1933
|
intent: t.intent ?? e.intent,
|
|
1810
1934
|
targetSchemes: t.targetSchemes ?? e.targetSchemes,
|
|
1811
1935
|
transport: t.transport ?? e.transport
|
|
1812
1936
|
} : e;
|
|
1813
1937
|
}
|
|
1814
|
-
function
|
|
1938
|
+
function Pi(e, t) {
|
|
1815
1939
|
const n = [];
|
|
1816
|
-
for (const
|
|
1817
|
-
if (!
|
|
1818
|
-
const
|
|
1819
|
-
if (
|
|
1820
|
-
for (const a of
|
|
1821
|
-
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 });
|
|
1822
1946
|
}
|
|
1823
1947
|
return n;
|
|
1824
1948
|
}
|
|
1825
|
-
function
|
|
1949
|
+
function Ui(e, t) {
|
|
1826
1950
|
return t.filter((n) => n.capability.intent === e);
|
|
1827
1951
|
}
|
|
1828
|
-
function
|
|
1952
|
+
function an(e, t) {
|
|
1829
1953
|
return t.filter((n) => n.capability.targetSchemes.includes(e));
|
|
1830
1954
|
}
|
|
1831
|
-
function
|
|
1832
|
-
return
|
|
1955
|
+
function ji(e, t) {
|
|
1956
|
+
return an(e.scheme, t);
|
|
1833
1957
|
}
|
|
1834
|
-
function
|
|
1835
|
-
const
|
|
1836
|
-
for (const
|
|
1958
|
+
function Gi(e, t, n) {
|
|
1959
|
+
const r = [];
|
|
1960
|
+
for (const i of e)
|
|
1837
1961
|
for (const a of n)
|
|
1838
|
-
a.capability.intent === t && a.capability.targetSchemes.includes(
|
|
1839
|
-
return
|
|
1962
|
+
a.capability.intent === t && a.capability.targetSchemes.includes(i.scheme) && r.push({ channelIntent: a, endpoint: i });
|
|
1963
|
+
return r;
|
|
1840
1964
|
}
|
|
1841
|
-
var
|
|
1842
|
-
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 = {
|
|
1843
1967
|
mailto: "mail",
|
|
1844
1968
|
sip: "tel",
|
|
1845
1969
|
tel: "tel",
|
|
@@ -1861,10 +1985,10 @@ const Xt = {
|
|
|
1861
1985
|
id: "note",
|
|
1862
1986
|
custom: "note"
|
|
1863
1987
|
};
|
|
1864
|
-
function
|
|
1865
|
-
return e ?
|
|
1988
|
+
function Bi(e) {
|
|
1989
|
+
return e ? sn[e] ?? "note" : "note";
|
|
1866
1990
|
}
|
|
1867
|
-
const
|
|
1991
|
+
const Fi = "message_window", Hi = "message_templates", Vi = {
|
|
1868
1992
|
// E-mail
|
|
1869
1993
|
FROM: "from",
|
|
1870
1994
|
TO: "to",
|
|
@@ -1881,74 +2005,74 @@ const mr = "message_window", gr = "message_templates", hr = {
|
|
|
1881
2005
|
// Voice/conference
|
|
1882
2006
|
HOST: "host",
|
|
1883
2007
|
PARTICIPANT: "participant"
|
|
1884
|
-
},
|
|
1885
|
-
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" }, _e = "auth";
|
|
2009
|
+
function Ie(e) {
|
|
1886
2010
|
const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
|
|
1887
2011
|
return t ? t[1] : null;
|
|
1888
2012
|
}
|
|
1889
|
-
function
|
|
1890
|
-
const t =
|
|
1891
|
-
return t ? t !==
|
|
2013
|
+
function qi(e) {
|
|
2014
|
+
const t = Ie(e);
|
|
2015
|
+
return t ? t !== _e : typeof e == "string" && e.startsWith("/wake");
|
|
1892
2016
|
}
|
|
1893
|
-
function
|
|
1894
|
-
return typeof e != "string" || e === "" || e === "/" ? !0 :
|
|
2017
|
+
function Ji(e) {
|
|
2018
|
+
return typeof e != "string" || e === "" || e === "/" ? !0 : Ie(e) === _e;
|
|
1895
2019
|
}
|
|
1896
|
-
function
|
|
2020
|
+
function ln(e) {
|
|
1897
2021
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1898
2022
|
}
|
|
1899
|
-
function
|
|
1900
|
-
const n = e.split("/").filter(Boolean).map((
|
|
2023
|
+
function cn(e) {
|
|
2024
|
+
const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : "/" + ln(r)).join("");
|
|
1901
2025
|
return new RegExp(`^${n}\\/?$`);
|
|
1902
2026
|
}
|
|
1903
|
-
function
|
|
1904
|
-
const n = e.split("/").filter(Boolean),
|
|
2027
|
+
function un(e, t) {
|
|
2028
|
+
const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean), i = {};
|
|
1905
2029
|
return n.forEach((a, o) => {
|
|
1906
2030
|
if (a.startsWith(":")) {
|
|
1907
|
-
const s = a.endsWith("?") ? a.slice(1, -1) : a.slice(1), l =
|
|
1908
|
-
l && (
|
|
2031
|
+
const s = a.endsWith("?") ? a.slice(1, -1) : a.slice(1), l = r[o];
|
|
2032
|
+
l && (i[s] = l);
|
|
1909
2033
|
}
|
|
1910
|
-
}),
|
|
2034
|
+
}), i;
|
|
1911
2035
|
}
|
|
1912
|
-
function
|
|
2036
|
+
function dn(e) {
|
|
1913
2037
|
return e.publicBasePath ?? `/apps/${e.name}`;
|
|
1914
2038
|
}
|
|
1915
|
-
function
|
|
2039
|
+
function Zi(e) {
|
|
1916
2040
|
const t = [];
|
|
1917
2041
|
for (const n of e) {
|
|
1918
2042
|
if (!n?.name) continue;
|
|
1919
|
-
const
|
|
1920
|
-
for (const
|
|
1921
|
-
if (!
|
|
1922
|
-
const a =
|
|
2043
|
+
const r = dn(n);
|
|
2044
|
+
for (const i of n.routes ?? []) {
|
|
2045
|
+
if (!i.public) continue;
|
|
2046
|
+
const a = i.path === "/" ? "" : i.path;
|
|
1923
2047
|
t.push({
|
|
1924
2048
|
appName: n.name,
|
|
1925
|
-
resource:
|
|
1926
|
-
pattern: `${
|
|
1927
|
-
props:
|
|
2049
|
+
resource: i.resource,
|
|
2050
|
+
pattern: `${r}${a}`,
|
|
2051
|
+
props: i.props
|
|
1928
2052
|
});
|
|
1929
2053
|
}
|
|
1930
2054
|
}
|
|
1931
2055
|
return t;
|
|
1932
2056
|
}
|
|
1933
|
-
function
|
|
1934
|
-
const n = e.split("/").filter(Boolean),
|
|
1935
|
-
for (let
|
|
1936
|
-
const a = n[
|
|
2057
|
+
function pn(e, t) {
|
|
2058
|
+
const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
|
|
2059
|
+
for (let i = 0; i < Math.min(n.length, r.length); i++) {
|
|
2060
|
+
const a = n[i].startsWith(":"), o = r[i].startsWith(":");
|
|
1937
2061
|
if (a !== o) return o;
|
|
1938
2062
|
}
|
|
1939
|
-
return n.length >
|
|
2063
|
+
return n.length > r.length;
|
|
1940
2064
|
}
|
|
1941
|
-
function
|
|
2065
|
+
function fn(e, t) {
|
|
1942
2066
|
if (typeof e != "string") return null;
|
|
1943
2067
|
let n = null;
|
|
1944
|
-
for (const
|
|
1945
|
-
|
|
1946
|
-
return n ? { ...n, params: { ...n.props, ...
|
|
2068
|
+
for (const r of t)
|
|
2069
|
+
cn(r.pattern).test(e) && (!n || pn(r.pattern, n.pattern)) && (n = r);
|
|
2070
|
+
return n ? { ...n, params: { ...n.props, ...un(n.pattern, e) } } : null;
|
|
1947
2071
|
}
|
|
1948
|
-
function
|
|
1949
|
-
return
|
|
2072
|
+
function Qi(e, t) {
|
|
2073
|
+
return fn(e, t) !== null;
|
|
1950
2074
|
}
|
|
1951
|
-
const
|
|
2075
|
+
const mn = {
|
|
1952
2076
|
afrikaans: [
|
|
1953
2077
|
"[Muziek]",
|
|
1954
2078
|
"(C) TV GELDERLAND 2021",
|
|
@@ -2098,14 +2222,14 @@ const tn = {
|
|
|
2098
2222
|
"[MÚSICA]",
|
|
2099
2223
|
"[Music cuts in British]"
|
|
2100
2224
|
]
|
|
2101
|
-
},
|
|
2225
|
+
}, gn = (e) => {
|
|
2102
2226
|
let t = e;
|
|
2103
|
-
return Object.values(
|
|
2104
|
-
n.forEach((
|
|
2105
|
-
t = t.replaceAll(
|
|
2227
|
+
return Object.values(mn).forEach((n) => {
|
|
2228
|
+
n.forEach((r) => {
|
|
2229
|
+
t = t.replaceAll(r, "");
|
|
2106
2230
|
});
|
|
2107
2231
|
}), t = t.replace(/\(.*?\)/g, ""), t = t.replace(/\[.*?\]/g, ""), t;
|
|
2108
|
-
},
|
|
2232
|
+
}, hn = 6e4, yn = 8e3, An = 2, bn = 0.4, En = 3, Sn = /* @__PURE__ */ new Set([
|
|
2109
2233
|
"aan",
|
|
2110
2234
|
"als",
|
|
2111
2235
|
"ben",
|
|
@@ -2218,286 +2342,315 @@ const tn = {
|
|
|
2218
2342
|
"you",
|
|
2219
2343
|
"your"
|
|
2220
2344
|
]);
|
|
2221
|
-
function
|
|
2345
|
+
function Tn(e) {
|
|
2222
2346
|
const t = /* @__PURE__ */ new Set();
|
|
2223
2347
|
for (const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))
|
|
2224
|
-
n.length <
|
|
2348
|
+
n.length < En || Sn.has(n) || t.add(n);
|
|
2225
2349
|
return [...t];
|
|
2226
2350
|
}
|
|
2227
|
-
function
|
|
2351
|
+
function _n(e, t) {
|
|
2228
2352
|
if (!e.length) return 0;
|
|
2229
2353
|
if (!t.length) return 1;
|
|
2230
|
-
const n = new Set(t),
|
|
2231
|
-
let
|
|
2232
|
-
for (const a of
|
|
2233
|
-
return
|
|
2354
|
+
const n = new Set(t), r = new Set(e);
|
|
2355
|
+
let i = 0;
|
|
2356
|
+
for (const a of r) n.has(a) || (i += 1);
|
|
2357
|
+
return i / r.size;
|
|
2234
2358
|
}
|
|
2235
|
-
function
|
|
2359
|
+
function In(e, t = hn) {
|
|
2236
2360
|
const n = e.filter((o) => !o.partial && typeof o.text == "string");
|
|
2237
2361
|
if (!n.length) return { text: "", segmentCount: 0 };
|
|
2238
|
-
const
|
|
2239
|
-
return { text: n.filter((o) => (o.endedAt ?? 0) >=
|
|
2362
|
+
const i = n.reduce((o, s) => Math.max(o, s.endedAt ?? 0), 0) - t;
|
|
2363
|
+
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 };
|
|
2240
2364
|
}
|
|
2241
|
-
const
|
|
2242
|
-
function
|
|
2243
|
-
const
|
|
2365
|
+
const Mn = 60;
|
|
2366
|
+
function ea(e, t, n = Mn) {
|
|
2367
|
+
const r = new Set(e), i = [...e];
|
|
2244
2368
|
for (const a of t)
|
|
2245
|
-
!a ||
|
|
2246
|
-
return
|
|
2369
|
+
!a || r.has(a) || (r.add(a), i.push(a));
|
|
2370
|
+
return i.slice(-n);
|
|
2247
2371
|
}
|
|
2248
|
-
function
|
|
2249
|
-
const { segments: t, now: n, state:
|
|
2250
|
-
if (
|
|
2372
|
+
function ta(e) {
|
|
2373
|
+
const { segments: t, now: n, state: r } = e;
|
|
2374
|
+
if (r.lastTriggerAt && n - r.lastTriggerAt < yn)
|
|
2251
2375
|
return { trigger: !1, reason: "too_soon" };
|
|
2252
|
-
const
|
|
2253
|
-
if (!
|
|
2254
|
-
const a =
|
|
2255
|
-
if (
|
|
2376
|
+
const i = In(t, e.windowMs);
|
|
2377
|
+
if (!i.text) return { trigger: !1, reason: "no_speech" };
|
|
2378
|
+
const a = i.segmentCount - (r.lastSegmentCount ?? 0);
|
|
2379
|
+
if (r.lastQueryTerms && a < An)
|
|
2256
2380
|
return { trigger: !1, reason: "too_few_new" };
|
|
2257
|
-
const o =
|
|
2258
|
-
return o.length ?
|
|
2381
|
+
const o = Tn(i.text);
|
|
2382
|
+
return o.length ? r.lastQueryTerms?.length && _n(o, r.lastQueryTerms) < bn ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: i.text, terms: o, segmentCount: i.segmentCount } : { trigger: !1, reason: "no_speech" };
|
|
2259
2383
|
}
|
|
2260
|
-
const
|
|
2261
|
-
function
|
|
2262
|
-
const
|
|
2263
|
-
if (!
|
|
2264
|
-
const a =
|
|
2265
|
-
return !
|
|
2384
|
+
const Me = 9e4, kn = ["out_of_office"], ke = (e) => kn.includes(e);
|
|
2385
|
+
function na(e, t, n) {
|
|
2386
|
+
const r = n - e < Me, i = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
|
|
2387
|
+
if (!i?.status) return { online: r, status: r ? "available" : "offline" };
|
|
2388
|
+
const a = i.status;
|
|
2389
|
+
return !r && !ke(a) ? { online: !1, status: "offline" } : { online: r, status: a, message: i.message };
|
|
2266
2390
|
}
|
|
2267
|
-
function
|
|
2268
|
-
const n = t - e.lastSeenAt <
|
|
2269
|
-
return n === e.online &&
|
|
2391
|
+
function ra(e, t) {
|
|
2392
|
+
const n = t - e.lastSeenAt < Me, r = n || ke(e.status) ? e.status : "offline";
|
|
2393
|
+
return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
|
|
2270
2394
|
}
|
|
2271
|
-
function
|
|
2395
|
+
function ia(e, t) {
|
|
2272
2396
|
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 };
|
|
2273
2397
|
}
|
|
2274
|
-
function
|
|
2398
|
+
function aa(e) {
|
|
2275
2399
|
return e.providerAvailable && e.allowed;
|
|
2276
2400
|
}
|
|
2277
|
-
const
|
|
2401
|
+
const oa = "installation-id";
|
|
2278
2402
|
export {
|
|
2279
2403
|
m as ACTIVITY_CATALOG,
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2404
|
+
Qt as AI_ATTACHMENT_LIMITS,
|
|
2405
|
+
Li as AI_ATTACHMENT_MAX_PER_TURN,
|
|
2406
|
+
$i as AI_ATTACHMENT_TURN_BUDGET,
|
|
2407
|
+
be as AI_VENDORS,
|
|
2408
|
+
Fe as ALLOWED_LINK_SCHEMES,
|
|
2409
|
+
B as ARTIFACT_MAX_BLOCKS,
|
|
2410
|
+
Yn as ARTIFACT_MAX_BODY_BYTES,
|
|
2411
|
+
N as ARTIFACT_MAX_CELL_LEN,
|
|
2412
|
+
W as ARTIFACT_MAX_KPI_ITEMS,
|
|
2413
|
+
F as ARTIFACT_MAX_LIST_ITEMS,
|
|
2414
|
+
V as ARTIFACT_MAX_TABLE_COLUMNS,
|
|
2415
|
+
H as ARTIFACT_MAX_TABLE_ROWS,
|
|
2416
|
+
de as ARTIFACT_MAX_TEXT_LEN,
|
|
2417
|
+
Ze as ASSIGNMENT_SCOPE_KIND,
|
|
2418
|
+
_e as AUTH_APP_NAME,
|
|
2419
|
+
$e as ActivityTypeRegistry,
|
|
2420
|
+
Gn as BUILT_IN_ONLY,
|
|
2421
|
+
yn as CADENCE_FLOOR_MS,
|
|
2422
|
+
An as CADENCE_MIN_NEW_SEGMENTS,
|
|
2423
|
+
bn as CADENCE_MIN_NOVELTY,
|
|
2424
|
+
hn as CADENCE_WINDOW_MS,
|
|
2425
|
+
dr as CLASSIFY_VARS,
|
|
2426
|
+
Vn as CORE_DIMENSIONS,
|
|
2427
|
+
on as CommunicationScheme,
|
|
2428
|
+
ri as DEFAULT_MEMORY_BUDGET,
|
|
2429
|
+
$t as DEFAULT_PHONE_REGION,
|
|
2430
|
+
Er as EMPTY_WORKFLOW,
|
|
2431
|
+
zi as FEATURE_FOLDER_MANAGEMENT,
|
|
2432
|
+
Xi as FEATURE_REMOTE_SEARCH,
|
|
2433
|
+
oa as INSTALLATION_HEADER,
|
|
2434
|
+
ot as INTERACTION_KIND,
|
|
2435
|
+
Vi as InteractionParticipantRole,
|
|
2436
|
+
mt as KB_FALLBACK_LOCALE,
|
|
2437
|
+
Z as KB_LOCALES,
|
|
2438
|
+
$ as LOOSE_STATUSES,
|
|
2314
2439
|
M as MAX_ACTIONS,
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2440
|
+
Qe as MAX_ASSIGNMENT_TURNS,
|
|
2441
|
+
D as MAX_BLOCKS,
|
|
2442
|
+
ye as MAX_COLLECTION_DEPTH,
|
|
2318
2443
|
_ as MAX_FIELDS,
|
|
2319
2444
|
I as MAX_LIST_ITEMS,
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2445
|
+
Qr as MAX_MEMORY_BROWSE,
|
|
2446
|
+
ni as MAX_MEMORY_BUDGET,
|
|
2447
|
+
ei as MAX_MEMORY_CHARS,
|
|
2448
|
+
Mn as MAX_SHOWN_KEYS,
|
|
2449
|
+
yt as MAX_TOPIC_CANDIDATES,
|
|
2450
|
+
ht as MAX_TOPIC_EXAMPLES,
|
|
2451
|
+
v as MAX_TOPIC_EXAMPLE_CHARS,
|
|
2452
|
+
ti as MIN_MEMORY_BUDGET,
|
|
2328
2453
|
L as PHONE_REGIONS,
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2454
|
+
Me as PRESENCE_ONLINE_WINDOW_MS,
|
|
2455
|
+
kn as PRESENCE_SURVIVES_OFFLINE,
|
|
2456
|
+
Hi as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
|
|
2457
|
+
Fi as PROVIDER_FEATURE_MESSAGE_WINDOW,
|
|
2458
|
+
jt as PUBLIC_EMAIL_DOMAINS,
|
|
2459
|
+
q as READ_STEP_TYPES,
|
|
2460
|
+
_t as RELATED_SUBJECT_KINDS,
|
|
2461
|
+
Se as RESERVED_STATUS_KEYS,
|
|
2462
|
+
Vr as SIGNATURE_INTENTS,
|
|
2463
|
+
ct as STEP_MAX_TOKENS_MAX,
|
|
2464
|
+
lt as STEP_MAX_TOKENS_MIN,
|
|
2465
|
+
Yt as SUMMARY_MIN_LAST_CHARS,
|
|
2466
|
+
Xt as SUMMARY_MIN_MESSAGES,
|
|
2467
|
+
Je as TERMINAL_ASSIGNMENT_STATUSES,
|
|
2468
|
+
ut as TERMINAL_RUN_STATUSES,
|
|
2469
|
+
ur as TRIGGER_VARS,
|
|
2470
|
+
Yi as UNSUPPORTED,
|
|
2471
|
+
Ue as USAGE_DIMENSIONS,
|
|
2472
|
+
je as USAGE_DIMENSION_IDS,
|
|
2473
|
+
kt as WORK_ITEM_SCOPE_KIND,
|
|
2474
|
+
Ct as WORK_PROJECT_SCOPE_KIND,
|
|
2475
|
+
Dr as acceptExampleCandidate,
|
|
2476
|
+
nt as actingIdentityKey,
|
|
2477
|
+
di as activeWorkTypes,
|
|
2478
|
+
vn as activityIconOf,
|
|
2479
|
+
jn as activityJoinUrl,
|
|
2480
|
+
ve as activitySnippet,
|
|
2481
|
+
xe as activityTextParams,
|
|
2482
|
+
Un as activityTimelineText,
|
|
2483
|
+
Hn as activityTimestamp,
|
|
2355
2484
|
d as activityTypeInfo,
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
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
|
-
|
|
2485
|
+
mr as actorKey,
|
|
2486
|
+
Lr as addExampleCandidate,
|
|
2487
|
+
ra as agePresenceEntry,
|
|
2488
|
+
Zt as aiAttachmentKind,
|
|
2489
|
+
Di as aiAttachmentRejection,
|
|
2490
|
+
ee as aiBudgetLimit,
|
|
2491
|
+
Fr as aiBudgetPeriodKey,
|
|
2492
|
+
St as aiBudgetPeriodStart,
|
|
2493
|
+
Br as aiBudgetState,
|
|
2494
|
+
Gr as aiVendorAcceptsAttachment,
|
|
2495
|
+
Pr as aiVendorDefaultModel,
|
|
2496
|
+
Kr as aiVendorLabel,
|
|
2497
|
+
jr as aiVendorNeedsBaseUrl,
|
|
2498
|
+
Ur as aiVendorsWith,
|
|
2499
|
+
Ie as appNameFromPath,
|
|
2500
|
+
oi as applyRounding,
|
|
2501
|
+
Wr as applySignature,
|
|
2502
|
+
Jn as artifactBodyBytes,
|
|
2503
|
+
Zn as artifactOutline,
|
|
2504
|
+
Qn as artifactToMarkdown,
|
|
2505
|
+
Ar as assignmentMismatch,
|
|
2506
|
+
ir as assignmentScopeKey,
|
|
2507
|
+
or as assignmentSubject,
|
|
2508
|
+
Bn as buildActivityPreview,
|
|
2509
|
+
Pi as buildChannelIntents,
|
|
2510
|
+
er as buildShareKeys,
|
|
2511
|
+
In as buildWindow,
|
|
2512
|
+
xr as canNestUnder,
|
|
2513
|
+
Ln as carriesText,
|
|
2514
|
+
$r as categoryLabel,
|
|
2515
|
+
vt as categoryOf,
|
|
2516
|
+
Bi as channelKindForScheme,
|
|
2517
|
+
xn as channelKindOf,
|
|
2518
|
+
br as clampStepMaxTokens,
|
|
2519
|
+
vi as cleanMessageText,
|
|
2520
|
+
Mt as compareWorkTypes,
|
|
2521
|
+
sr as decideAssignmentState,
|
|
2522
|
+
ta as decideCadence,
|
|
2523
|
+
gt as defaultLocaleOf,
|
|
2524
|
+
bi as defaultStatusKey,
|
|
2525
|
+
Wi as defineIntent,
|
|
2526
|
+
pt as depthOf,
|
|
2527
|
+
na as derivePresence,
|
|
2528
|
+
Ki as disabledIntentsFromCapabilities,
|
|
2529
|
+
ai as elapsedSeconds,
|
|
2530
|
+
Mi as emailDomain,
|
|
2531
|
+
wi as endpointKey,
|
|
2532
|
+
un as extractParams,
|
|
2533
|
+
Tn as extractTerms,
|
|
2534
|
+
ji as filterByEndpoint,
|
|
2535
|
+
Ui as filterByIntent,
|
|
2536
|
+
an as filterByTargetScheme,
|
|
2403
2537
|
S as findAiVendor,
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2538
|
+
Wn as flattenLocales,
|
|
2539
|
+
Re as floorToPeriod,
|
|
2540
|
+
tt as formatActingIdentity,
|
|
2541
|
+
li as formatClock,
|
|
2542
|
+
si as formatHm,
|
|
2543
|
+
fi as formatItemKey,
|
|
2544
|
+
De as formatPeriod,
|
|
2545
|
+
Ri as freshSources,
|
|
2546
|
+
Fn as getActivitySeenUserIds,
|
|
2547
|
+
zr as getContactEndpoints,
|
|
2548
|
+
Jr as getShortTitle,
|
|
2549
|
+
qr as getUrgencyScore,
|
|
2413
2550
|
Ae as heightOf,
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2551
|
+
wr as helpCenterText,
|
|
2552
|
+
cr as humanizeAction,
|
|
2553
|
+
st as interactionIdOf,
|
|
2554
|
+
pi as isAgentUser,
|
|
2555
|
+
Xr as isAssigned,
|
|
2556
|
+
rr as isAssignmentTerminal,
|
|
2557
|
+
it as isAssignmentTrigger,
|
|
2558
|
+
wn as isChatMessageActivity,
|
|
2559
|
+
Yr as isClosed,
|
|
2560
|
+
Kn as isConnectedType,
|
|
2561
|
+
qi as isDeepLink,
|
|
2562
|
+
ft as isDescendant,
|
|
2563
|
+
Cn as isEmailActivity,
|
|
2564
|
+
Ir as isInFlight,
|
|
2565
|
+
Zr as isInteractionUnseen,
|
|
2566
|
+
Ji as isLandingPath,
|
|
2567
|
+
xi as isLikelyBulk,
|
|
2568
|
+
ce as isMessageShape,
|
|
2569
|
+
On as isMessageType,
|
|
2570
|
+
pn as isMoreSpecificPattern,
|
|
2571
|
+
dt as isPaused,
|
|
2572
|
+
Rn as isPlaybookAuthoredType,
|
|
2573
|
+
ki as isPublicEmailDomain,
|
|
2574
|
+
Qi as isPublicPath,
|
|
2575
|
+
$n as isReplyableType,
|
|
2576
|
+
_r as isTerminal,
|
|
2577
|
+
Oi as isThreadLongEnough,
|
|
2578
|
+
Pn as isTranscriptType,
|
|
2579
|
+
Ei as isWorkClosed,
|
|
2580
|
+
ui as isWorkTypeVisible,
|
|
2581
|
+
hi as itemDossierKeys,
|
|
2582
|
+
Nt as ladderFor,
|
|
2583
|
+
Cr as linkLabel,
|
|
2584
|
+
Hr as listeningAllowed,
|
|
2585
|
+
vr as localeInstruction,
|
|
2586
|
+
Nr as localeName,
|
|
2587
|
+
Or as localesOf,
|
|
2588
|
+
_i as looksLikeEmail,
|
|
2589
|
+
Gi as matchContactToIntents,
|
|
2590
|
+
fn as matchPublicRoute,
|
|
2591
|
+
ea as mergeShownKeys,
|
|
2592
|
+
Dn as messageCountsAs,
|
|
2593
|
+
Ci as needsPhoneRegion,
|
|
2594
|
+
qn as normalizeArtifactBlocks,
|
|
2595
|
+
Nn as normalizeBlocks,
|
|
2596
|
+
Te as normalizeEmail,
|
|
2456
2597
|
g as normalizeExample,
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2598
|
+
_n as novelty,
|
|
2599
|
+
pr as parseActingIdentity,
|
|
2600
|
+
mi as parseItemKey,
|
|
2601
|
+
cn as pathToRegex,
|
|
2602
|
+
zn as periodsInRange,
|
|
2603
|
+
Ii as phoneSuffix,
|
|
2604
|
+
Ni as plainTextFromMarkdown,
|
|
2605
|
+
rt as playbookActor,
|
|
2606
|
+
Tr as procedureOf,
|
|
2607
|
+
yi as projectDossierKeys,
|
|
2608
|
+
dn as publicBasePathFor,
|
|
2609
|
+
Zi as publicRoutePatterns,
|
|
2467
2610
|
x as readPath,
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2611
|
+
J as readStepError,
|
|
2612
|
+
at as refKey,
|
|
2613
|
+
Ut as registrableDomain,
|
|
2614
|
+
bt as rejectExampleCandidate,
|
|
2615
|
+
ii as relatedByDefault,
|
|
2616
|
+
nn as resolveAccountCapabilities,
|
|
2474
2617
|
O as resolveActivityText,
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2618
|
+
tn as resolveChannelIntents,
|
|
2619
|
+
Tt as resolveSignature,
|
|
2620
|
+
ia as resolveWorkMode,
|
|
2621
|
+
fr as runActor,
|
|
2622
|
+
kr as runInteractionId,
|
|
2623
|
+
ze as sanitizeInline,
|
|
2624
|
+
gn as sanitizeTranscript,
|
|
2625
|
+
lr as selectLenses,
|
|
2626
|
+
me as shareKeyForTeam,
|
|
2627
|
+
fe as shareKeyForUser,
|
|
2628
|
+
tr as shareKeysForViewer,
|
|
2629
|
+
aa as shouldRunAudioPipeline,
|
|
2630
|
+
xt as sortStatuses,
|
|
2631
|
+
en as sourceKey,
|
|
2632
|
+
Ai as statusIn,
|
|
2633
|
+
Sr as stepsOf,
|
|
2634
|
+
Ne as stripHtml,
|
|
2635
|
+
Mr as subjectKeyOf,
|
|
2636
|
+
ge as subjectOf,
|
|
2637
|
+
gi as suggestProjectKey,
|
|
2638
|
+
yr as targetById,
|
|
2639
|
+
hr as targetForActivityType,
|
|
2640
|
+
re as toE164,
|
|
2641
|
+
nr as toolSourceKinds,
|
|
2642
|
+
Et as topicOfferedForTeam,
|
|
2643
|
+
Rr as topicsForTeam,
|
|
2644
|
+
At as truncateExample,
|
|
2645
|
+
Si as uniqueWorkStatusKey,
|
|
2646
|
+
ci as uniqueWorkTypeKey,
|
|
2647
|
+
Ge as usageMetricId,
|
|
2648
|
+
Xn as usageMetrics,
|
|
2649
|
+
Ti as validateStatuses,
|
|
2650
|
+
gr as valueAtPath,
|
|
2651
|
+
ar as wakesAssignment,
|
|
2652
|
+
wt as workItemScopeKey,
|
|
2653
|
+
Ee as workProjectScopeKey,
|
|
2654
|
+
Ot as workStatusKey,
|
|
2655
|
+
It as workTypeKey
|
|
2503
2656
|
};
|