@opencxh/domain 1.231.0 → 1.233.0

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