react-blockkit 0.3.1 → 0.3.3

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
@@ -49,8 +49,8 @@ function m() {
49
49
  else {
50
50
  var S = null;
51
51
  for (var C in m) {
52
- var w = m[C];
53
- w !== void 0 && (n.includes(C) || (w != null && (s ??= {}, S ??= {}, S[C] = w), n.push(C), l = null));
52
+ var ee = m[C];
53
+ ee !== void 0 && (n.includes(C) || (ee != null && (s ??= {}, S ??= {}, S[C] = ee), n.push(C), l = null));
54
54
  }
55
55
  S != null && (s = Object.assign(S, s));
56
56
  }
@@ -103,18 +103,320 @@ function x() {
103
103
  return r(y);
104
104
  }
105
105
  //#endregion
106
+ //#region src/icons.tsx
107
+ function S({ children: e, fill: t = "none", name: n, size: r }) {
108
+ return /* @__PURE__ */ u("svg", {
109
+ className: "x1lliihq x2lah0s",
110
+ "aria-hidden": "true",
111
+ "data-icon": n,
112
+ fill: t,
113
+ focusable: "false",
114
+ height: r,
115
+ stroke: "currentColor",
116
+ strokeLinecap: "round",
117
+ strokeLinejoin: "round",
118
+ strokeWidth: 2,
119
+ viewBox: "0 0 24 24",
120
+ width: r,
121
+ xmlns: "http://www.w3.org/2000/svg",
122
+ children: e
123
+ });
124
+ }
125
+ function C({ size: e = 16 }) {
126
+ return /* @__PURE__ */ d(S, {
127
+ name: "calendar-days",
128
+ size: e,
129
+ children: [
130
+ /* @__PURE__ */ u("path", { d: "M8 2v4" }),
131
+ /* @__PURE__ */ u("path", { d: "M16 2v4" }),
132
+ /* @__PURE__ */ u("rect", {
133
+ width: "18",
134
+ height: "18",
135
+ x: "3",
136
+ y: "4",
137
+ rx: "2"
138
+ }),
139
+ /* @__PURE__ */ u("path", { d: "M3 10h18" }),
140
+ /* @__PURE__ */ u("path", { d: "M8 14h.01" }),
141
+ /* @__PURE__ */ u("path", { d: "M12 14h.01" }),
142
+ /* @__PURE__ */ u("path", { d: "M16 14h.01" }),
143
+ /* @__PURE__ */ u("path", { d: "M8 18h.01" }),
144
+ /* @__PURE__ */ u("path", { d: "M12 18h.01" }),
145
+ /* @__PURE__ */ u("path", { d: "M16 18h.01" })
146
+ ]
147
+ });
148
+ }
149
+ function ee({ size: e = 16 }) {
150
+ return /* @__PURE__ */ u(S, {
151
+ name: "chevron-down",
152
+ size: e,
153
+ children: /* @__PURE__ */ u("path", { d: "m6 9 6 6 6-6" })
154
+ });
155
+ }
156
+ function te({ size: e = 16 }) {
157
+ return /* @__PURE__ */ u(S, {
158
+ name: "chevron-left",
159
+ size: e,
160
+ children: /* @__PURE__ */ u("path", { d: "m15 18-6-6 6-6" })
161
+ });
162
+ }
163
+ function ne({ size: e = 16 }) {
164
+ return /* @__PURE__ */ u(S, {
165
+ name: "chevron-right",
166
+ size: e,
167
+ children: /* @__PURE__ */ u("path", { d: "m9 18 6-6-6-6" })
168
+ });
169
+ }
170
+ function re({ size: e = 16 }) {
171
+ return /* @__PURE__ */ u(S, {
172
+ name: "circle",
173
+ size: e,
174
+ children: /* @__PURE__ */ u("circle", {
175
+ cx: "12",
176
+ cy: "12",
177
+ r: "10"
178
+ })
179
+ });
180
+ }
181
+ function ie({ size: e = 16 }) {
182
+ return /* @__PURE__ */ d(S, {
183
+ name: "circle-alert",
184
+ size: e,
185
+ children: [
186
+ /* @__PURE__ */ u("circle", {
187
+ cx: "12",
188
+ cy: "12",
189
+ r: "10"
190
+ }),
191
+ /* @__PURE__ */ u("line", {
192
+ x1: "12",
193
+ x2: "12",
194
+ y1: "8",
195
+ y2: "12"
196
+ }),
197
+ /* @__PURE__ */ u("line", {
198
+ x1: "12",
199
+ x2: "12.01",
200
+ y1: "16",
201
+ y2: "16"
202
+ })
203
+ ]
204
+ });
205
+ }
206
+ function ae({ size: e = 16 }) {
207
+ return /* @__PURE__ */ d(S, {
208
+ name: "circle-check",
209
+ size: e,
210
+ children: [/* @__PURE__ */ u("circle", {
211
+ cx: "12",
212
+ cy: "12",
213
+ r: "10"
214
+ }), /* @__PURE__ */ u("path", { d: "m9 12 2 2 4-4" })]
215
+ });
216
+ }
217
+ function oe({ size: e = 16 }) {
218
+ return /* @__PURE__ */ d(S, {
219
+ name: "ellipsis",
220
+ size: e,
221
+ children: [
222
+ /* @__PURE__ */ u("circle", {
223
+ cx: "12",
224
+ cy: "12",
225
+ r: "1"
226
+ }),
227
+ /* @__PURE__ */ u("circle", {
228
+ cx: "19",
229
+ cy: "12",
230
+ r: "1"
231
+ }),
232
+ /* @__PURE__ */ u("circle", {
233
+ cx: "5",
234
+ cy: "12",
235
+ r: "1"
236
+ })
237
+ ]
238
+ });
239
+ }
240
+ function se({ size: e = 16 }) {
241
+ return /* @__PURE__ */ d(S, {
242
+ name: "ellipsis-vertical",
243
+ size: e,
244
+ children: [
245
+ /* @__PURE__ */ u("circle", {
246
+ cx: "12",
247
+ cy: "12",
248
+ r: "1"
249
+ }),
250
+ /* @__PURE__ */ u("circle", {
251
+ cx: "12",
252
+ cy: "5",
253
+ r: "1"
254
+ }),
255
+ /* @__PURE__ */ u("circle", {
256
+ cx: "12",
257
+ cy: "19",
258
+ r: "1"
259
+ })
260
+ ]
261
+ });
262
+ }
263
+ function ce({ size: e = 16 }) {
264
+ return /* @__PURE__ */ d(S, {
265
+ name: "expand",
266
+ size: e,
267
+ children: [
268
+ /* @__PURE__ */ u("path", { d: "m15 15 6 6" }),
269
+ /* @__PURE__ */ u("path", { d: "m15 9 6-6" }),
270
+ /* @__PURE__ */ u("path", { d: "M21 16v5h-5" }),
271
+ /* @__PURE__ */ u("path", { d: "M21 8V3h-5" }),
272
+ /* @__PURE__ */ u("path", { d: "M3 16v5h5" }),
273
+ /* @__PURE__ */ u("path", { d: "m3 21 6-6" }),
274
+ /* @__PURE__ */ u("path", { d: "M3 8V3h5" }),
275
+ /* @__PURE__ */ u("path", { d: "M9 9 3 3" })
276
+ ]
277
+ });
278
+ }
279
+ function le({ size: e = 16 }) {
280
+ return /* @__PURE__ */ d(S, {
281
+ name: "image",
282
+ size: e,
283
+ children: [
284
+ /* @__PURE__ */ u("rect", {
285
+ width: "18",
286
+ height: "18",
287
+ x: "3",
288
+ y: "3",
289
+ rx: "2",
290
+ ry: "2"
291
+ }),
292
+ /* @__PURE__ */ u("circle", {
293
+ cx: "9",
294
+ cy: "9",
295
+ r: "2"
296
+ }),
297
+ /* @__PURE__ */ u("path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" })
298
+ ]
299
+ });
300
+ }
301
+ function ue({ size: e = 16 }) {
302
+ return /* @__PURE__ */ d(S, {
303
+ name: "info",
304
+ size: e,
305
+ children: [
306
+ /* @__PURE__ */ u("circle", {
307
+ cx: "12",
308
+ cy: "12",
309
+ r: "10"
310
+ }),
311
+ /* @__PURE__ */ u("path", { d: "M12 16v-4" }),
312
+ /* @__PURE__ */ u("path", { d: "M12 8h.01" })
313
+ ]
314
+ });
315
+ }
316
+ function de({ size: e = 16 }) {
317
+ return /* @__PURE__ */ u(S, {
318
+ name: "loader-circle",
319
+ size: e,
320
+ children: /* @__PURE__ */ u("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
321
+ });
322
+ }
323
+ function fe({ size: e = 16 }) {
324
+ return /* @__PURE__ */ u(S, {
325
+ name: "paperclip",
326
+ size: e,
327
+ children: /* @__PURE__ */ u("path", { d: "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" })
328
+ });
329
+ }
330
+ function pe({ size: e = 16 }) {
331
+ return /* @__PURE__ */ u(S, {
332
+ fill: "currentColor",
333
+ name: "play",
334
+ size: e,
335
+ children: /* @__PURE__ */ u("path", { d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" })
336
+ });
337
+ }
338
+ function me({ size: e = 16 }) {
339
+ return /* @__PURE__ */ d(S, {
340
+ name: "rocket",
341
+ size: e,
342
+ children: [
343
+ /* @__PURE__ */ u("path", { d: "M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5" }),
344
+ /* @__PURE__ */ u("path", { d: "M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09" }),
345
+ /* @__PURE__ */ u("path", { d: "M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z" }),
346
+ /* @__PURE__ */ u("path", { d: "M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05" })
347
+ ]
348
+ });
349
+ }
350
+ function he({ size: e = 16 }) {
351
+ return /* @__PURE__ */ d(S, {
352
+ name: "search",
353
+ size: e,
354
+ children: [/* @__PURE__ */ u("path", { d: "m21 21-4.34-4.34" }), /* @__PURE__ */ u("circle", {
355
+ cx: "11",
356
+ cy: "11",
357
+ r: "8"
358
+ })]
359
+ });
360
+ }
361
+ function ge({ size: e = 16 }) {
362
+ return /* @__PURE__ */ d(S, {
363
+ name: "thumbs-down",
364
+ size: e,
365
+ children: [/* @__PURE__ */ u("path", { d: "M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z" }), /* @__PURE__ */ u("path", { d: "M17 14V2" })]
366
+ });
367
+ }
368
+ function _e({ size: e = 16 }) {
369
+ return /* @__PURE__ */ d(S, {
370
+ name: "thumbs-up",
371
+ size: e,
372
+ children: [/* @__PURE__ */ u("path", { d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z" }), /* @__PURE__ */ u("path", { d: "M7 10v12" })]
373
+ });
374
+ }
375
+ function ve({ size: e = 16 }) {
376
+ return /* @__PURE__ */ d(S, {
377
+ name: "trash-2",
378
+ size: e,
379
+ children: [
380
+ /* @__PURE__ */ u("path", { d: "M10 11v6" }),
381
+ /* @__PURE__ */ u("path", { d: "M14 11v6" }),
382
+ /* @__PURE__ */ u("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
383
+ /* @__PURE__ */ u("path", { d: "M3 6h18" }),
384
+ /* @__PURE__ */ u("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
385
+ ]
386
+ });
387
+ }
388
+ function ye({ size: e = 16 }) {
389
+ return /* @__PURE__ */ d(S, {
390
+ name: "triangle-alert",
391
+ size: e,
392
+ children: [
393
+ /* @__PURE__ */ u("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
394
+ /* @__PURE__ */ u("path", { d: "M12 9v4" }),
395
+ /* @__PURE__ */ u("path", { d: "M12 17h.01" })
396
+ ]
397
+ });
398
+ }
399
+ var be = {
400
+ calendar: C,
401
+ ellipsis: oe,
402
+ play: pe,
403
+ rocket: me,
404
+ search: he,
405
+ trash: ve
406
+ };
407
+ //#endregion
106
408
  //#region src/runtime.ts
107
- function S(e) {
409
+ function w(e) {
108
410
  return typeof e == "object" && !!e && !Array.isArray(e);
109
411
  }
110
- function C(e) {
111
- if (S(e)) return typeof e.type == "string" ? e.type : void 0;
412
+ function T(e) {
413
+ if (w(e)) return typeof e.type == "string" ? e.type : void 0;
112
414
  }
113
- function w(e) {
114
- if (S(e)) return typeof e.block_id == "string" ? e.block_id : void 0;
415
+ function xe(e) {
416
+ if (w(e)) return typeof e.block_id == "string" ? e.block_id : void 0;
115
417
  }
116
- function T(e, t) {
117
- if (!S(e)) return `Unsupported ${t}`;
418
+ function E(e, t) {
419
+ if (!w(e)) return `Unsupported ${t}`;
118
420
  for (let t of [
119
421
  "text",
120
422
  "label",
@@ -125,17 +427,17 @@ function T(e, t) {
125
427
  let n = e[t];
126
428
  if (typeof n == "string" && n.length > 0) return n;
127
429
  }
128
- let n = C(e);
430
+ let n = T(e);
129
431
  return n === void 0 ? `Unsupported ${t}` : `Unsupported ${t}: ${n}`;
130
432
  }
131
433
  //#endregion
132
434
  //#region src/safe-url.ts
133
- function E(e) {
435
+ function D(e) {
134
436
  return e !== void 0 && /^(?:https?:|mailto:)/i.test(e) ? e : void 0;
135
437
  }
136
438
  //#endregion
137
439
  //#region src/tokens.stylex.ts
138
- var ee = {
440
+ var Se = {
139
441
  surface: "var(--xf210bc)",
140
442
  surfaceRaised: "var(--xop8b6t)",
141
443
  surfaceSunken: "var(--xajfn77)",
@@ -206,13 +508,13 @@ var ee = {
206
508
  chartSeriesTint5: "var(--x1nud87m)",
207
509
  chartSeriesTint6: "var(--x1t1bkho)",
208
510
  __varGroupHash__: "xpd22m1"
209
- }, te = {
511
+ }, Ce = {
210
512
  xpd22m1: "x1l73jb5 xpd22m1",
211
513
  $$css: !0
212
- }, ne = {
514
+ }, we = {
213
515
  xpd22m1: "xky7mqn xpd22m1",
214
516
  $$css: !0
215
- }, D = {
517
+ }, O = {
216
518
  root: {
217
519
  kWkggS: "xfs8zev",
218
520
  kMwMTN: "xr3bju4",
@@ -371,6 +673,26 @@ var ee = {
371
673
  kZCmMZ: "x1j7nfk9",
372
674
  $$css: !0
373
675
  },
676
+ listItemTask: {
677
+ kGNEyG: "x1cy8zhl",
678
+ k1xSpc: "x78zum5",
679
+ kH6xsr: "x3ct3a4",
680
+ keTefX: "x9pbi5e",
681
+ $$css: !0
682
+ },
683
+ listTaskCheckbox: {
684
+ kGNEyG: "x6s0dn4",
685
+ k1xSpc: "x3nfvp2",
686
+ kmuXW: "x2lah0s",
687
+ kZKoxP: "xx3o462",
688
+ kjj79g: "xl56j7k",
689
+ k1K539: "xat24cr",
690
+ keoZOQ: "x7r5mf7",
691
+ k71WvV: "xbelrpt",
692
+ keTefX: "x1xkedpm",
693
+ kzqmXN: "x17z2i9w",
694
+ $$css: !0
695
+ },
374
696
  listBullet: {
375
697
  k3DiCg: "x14alfy",
376
698
  kuPSpR: "xo40evb",
@@ -489,6 +811,15 @@ var ee = {
489
811
  kVIFPx: "x19kjcj4",
490
812
  $$css: !0
491
813
  },
814
+ imagePlaceholder: {
815
+ kGNEyG: "x6s0dn4",
816
+ kWkggS: "x1fatxfb",
817
+ kMwMTN: "xlx0kvv",
818
+ k1xSpc: "x78zum5",
819
+ kjj79g: "xl56j7k",
820
+ kAzted: "x1wxaq2x",
821
+ $$css: !0
822
+ },
492
823
  accessoryImage: {
493
824
  kaIpWk: "xsqv9me",
494
825
  kZKoxP: "x14nwjz3",
@@ -602,15 +933,20 @@ var ee = {
602
933
  },
603
934
  pickerIcon: {
604
935
  kMwMTN: "xvuv4jf",
605
- kGuDYH: "xfifm61",
606
- kLqNvP: "xuhg197",
936
+ k1xSpc: "x78zum5",
937
+ k87sOh: "xwa60dl",
938
+ kLqNvP: "xrr41r3",
607
939
  kVAEAm: "x10l6tqk",
940
+ k3aq6I: "x1cb1t30",
608
941
  $$css: !0
609
942
  },
610
943
  pickerChevron: {
611
944
  kMwMTN: "xvuv4jf",
612
- kt4wiu: "x1vikou4",
945
+ k1xSpc: "x78zum5",
946
+ k87sOh: "xwa60dl",
947
+ kt4wiu: "x1jot08o",
613
948
  kVAEAm: "x10l6tqk",
949
+ k3aq6I: "x1cb1t30",
614
950
  $$css: !0
615
951
  },
616
952
  iconButton: {
@@ -619,6 +955,12 @@ var ee = {
619
955
  kg3NbH: "x17hd1w2",
620
956
  $$css: !0
621
957
  },
958
+ iconSlot: {
959
+ kGNEyG: "x6s0dn4",
960
+ k1xSpc: "x78zum5",
961
+ kmuXW: "x2lah0s",
962
+ $$css: !0
963
+ },
622
964
  select: {
623
965
  kysU6D: "xjyslct",
624
966
  kWkggS: "x1itzlyb",
@@ -635,6 +977,27 @@ var ee = {
635
977
  kg3NbH: "x1r82r8e",
636
978
  $$css: !0
637
979
  },
980
+ selectWrap: {
981
+ k1xSpc: "x3nfvp2",
982
+ ks0D6T: "x193iq5w",
983
+ kVAEAm: "x1n2onr6",
984
+ $$css: !0
985
+ },
986
+ selectWithChevron: {
987
+ kwRFfy: "xziim83",
988
+ kzqmXN: "xh8yej3",
989
+ $$css: !0
990
+ },
991
+ selectChevron: {
992
+ kMwMTN: "xr3bju4",
993
+ k1xSpc: "x78zum5",
994
+ k87sOh: "xwa60dl",
995
+ kt4wiu: "x1vikou4",
996
+ kfzvcC: "x47corl",
997
+ kVAEAm: "x10l6tqk",
998
+ k3aq6I: "x1cb1t30",
999
+ $$css: !0
1000
+ },
638
1001
  choiceGroup: {
639
1002
  ksu8eU: "xng3xce",
640
1003
  k1xSpc: "x78zum5",
@@ -802,6 +1165,10 @@ var ee = {
802
1165
  k5xd4v: "x1bhewko",
803
1166
  $$css: !0
804
1167
  },
1168
+ alertIcon: {
1169
+ kZKoxP: "xcdktbt",
1170
+ $$css: !0
1171
+ },
805
1172
  alert: {
806
1173
  kGNEyG: "x1cy8zhl",
807
1174
  kWkggS: "x1fatxfb",
@@ -852,6 +1219,13 @@ var ee = {
852
1219
  kg3NbH: "xzgshkr",
853
1220
  $$css: !0
854
1221
  },
1222
+ containerChevron: {
1223
+ kGNEyG: "x6s0dn4",
1224
+ kMwMTN: "xlx0kvv",
1225
+ k1xSpc: "x78zum5",
1226
+ kmuXW: "x2lah0s",
1227
+ $$css: !0
1228
+ },
855
1229
  containerHeaderDivider: {
856
1230
  kL6WhQ: "x17fznl5",
857
1231
  kfdmCh: "x1q0q8m5",
@@ -1092,6 +1466,11 @@ var ee = {
1092
1466
  kzqmXN: "x35muul",
1093
1467
  $$css: !0
1094
1468
  },
1469
+ dataTableFilterIcon: {
1470
+ kMwMTN: "xr3bju4",
1471
+ kZCmMZ: "xty9v0q",
1472
+ $$css: !0
1473
+ },
1095
1474
  dataTableFilterInput: {
1096
1475
  kWkggS: "xjbqb8w",
1097
1476
  ksu8eU: "xng3xce",
@@ -1253,6 +1632,27 @@ var ee = {
1253
1632
  kg3NbH: "x1r82r8e",
1254
1633
  $$css: !0
1255
1634
  },
1635
+ videoThumbnail: {
1636
+ k1xSpc: "x1lliihq",
1637
+ kVAEAm: "x1n2onr6",
1638
+ $$css: !0
1639
+ },
1640
+ videoPlayBadge: {
1641
+ kGNEyG: "x6s0dn4",
1642
+ kWkggS: "x1frzhxr",
1643
+ kaIpWk: "x10hpsqq",
1644
+ kMwMTN: "x1f7m26b",
1645
+ k1xSpc: "x78zum5",
1646
+ kZKoxP: "xsdox4t",
1647
+ k87sOh: "xwa60dl",
1648
+ kLqNvP: "xbudbmw",
1649
+ kjj79g: "xl56j7k",
1650
+ kfzvcC: "x47corl",
1651
+ kVAEAm: "x10l6tqk",
1652
+ k3aq6I: "x11lhmoz",
1653
+ kzqmXN: "x1useyqa",
1654
+ $$css: !0
1655
+ },
1256
1656
  visuallyHidden: {
1257
1657
  kMcinP: "xeh89do",
1258
1658
  kz4h6p: "x1hyvwdk",
@@ -1263,7 +1663,7 @@ var ee = {
1263
1663
  kzqmXN: "x1i1rx1s",
1264
1664
  $$css: !0
1265
1665
  }
1266
- }, O = {
1666
+ }, k = {
1267
1667
  fill1: {
1268
1668
  kDwRjp: "xtzl89e",
1269
1669
  $$css: !0
@@ -1432,86 +1832,86 @@ var ee = {
1432
1832
  kDwRjp: "x1mnwzol",
1433
1833
  $$css: !0
1434
1834
  }
1435
- }, re = {
1436
- fill: O.fill1,
1437
- stroke: O.stroke1,
1438
- swatch: O.swatch1,
1439
- tint: O.tint1
1440
- }, ie = [
1441
- re,
1835
+ }, Te = {
1836
+ fill: k.fill1,
1837
+ stroke: k.stroke1,
1838
+ swatch: k.swatch1,
1839
+ tint: k.tint1
1840
+ }, Ee = [
1841
+ Te,
1442
1842
  {
1443
- fill: O.fill2,
1444
- stroke: O.stroke2,
1445
- swatch: O.swatch2,
1446
- tint: O.tint2
1843
+ fill: k.fill2,
1844
+ stroke: k.stroke2,
1845
+ swatch: k.swatch2,
1846
+ tint: k.tint2
1447
1847
  },
1448
1848
  {
1449
- fill: O.fill3,
1450
- stroke: O.stroke3,
1451
- swatch: O.swatch3,
1452
- tint: O.tint3
1849
+ fill: k.fill3,
1850
+ stroke: k.stroke3,
1851
+ swatch: k.swatch3,
1852
+ tint: k.tint3
1453
1853
  },
1454
1854
  {
1455
- fill: O.fill4,
1456
- stroke: O.stroke4,
1457
- swatch: O.swatch4,
1458
- tint: O.tint4
1855
+ fill: k.fill4,
1856
+ stroke: k.stroke4,
1857
+ swatch: k.swatch4,
1858
+ tint: k.tint4
1459
1859
  },
1460
1860
  {
1461
- fill: O.fill5,
1462
- stroke: O.stroke5,
1463
- swatch: O.swatch5,
1464
- tint: O.tint5
1861
+ fill: k.fill5,
1862
+ stroke: k.stroke5,
1863
+ swatch: k.swatch5,
1864
+ tint: k.tint5
1465
1865
  },
1466
1866
  {
1467
- fill: O.fill6,
1468
- stroke: O.stroke6,
1469
- swatch: O.swatch6,
1470
- tint: O.tint6
1867
+ fill: k.fill6,
1868
+ stroke: k.stroke6,
1869
+ swatch: k.swatch6,
1870
+ tint: k.tint6
1471
1871
  },
1472
1872
  {
1473
- fill: O.fill7,
1474
- stroke: O.stroke7,
1475
- swatch: O.swatch7,
1476
- tint: O.fill7
1873
+ fill: k.fill7,
1874
+ stroke: k.stroke7,
1875
+ swatch: k.swatch7,
1876
+ tint: k.fill7
1477
1877
  },
1478
1878
  {
1479
- fill: O.fill8,
1480
- stroke: O.stroke8,
1481
- swatch: O.swatch8,
1482
- tint: O.fill8
1879
+ fill: k.fill8,
1880
+ stroke: k.stroke8,
1881
+ swatch: k.swatch8,
1882
+ tint: k.fill8
1483
1883
  },
1484
1884
  {
1485
- fill: O.fill9,
1486
- stroke: O.stroke9,
1487
- swatch: O.swatch9,
1488
- tint: O.fill9
1885
+ fill: k.fill9,
1886
+ stroke: k.stroke9,
1887
+ swatch: k.swatch9,
1888
+ tint: k.fill9
1489
1889
  },
1490
1890
  {
1491
- fill: O.fill10,
1492
- stroke: O.stroke10,
1493
- swatch: O.swatch10,
1494
- tint: O.fill10
1891
+ fill: k.fill10,
1892
+ stroke: k.stroke10,
1893
+ swatch: k.swatch10,
1894
+ tint: k.fill10
1495
1895
  },
1496
1896
  {
1497
- fill: O.fill11,
1498
- stroke: O.stroke11,
1499
- swatch: O.swatch11,
1500
- tint: O.fill11
1897
+ fill: k.fill11,
1898
+ stroke: k.stroke11,
1899
+ swatch: k.swatch11,
1900
+ tint: k.fill11
1501
1901
  },
1502
1902
  {
1503
- fill: O.fill12,
1504
- stroke: O.stroke12,
1505
- swatch: O.swatch12,
1506
- tint: O.fill12
1903
+ fill: k.fill12,
1904
+ stroke: k.stroke12,
1905
+ swatch: k.swatch12,
1906
+ tint: k.fill12
1507
1907
  }
1508
1908
  ];
1509
- function k(e, t) {
1909
+ function A(e, t) {
1510
1910
  return e === void 0 ? t : t === void 0 || t.length === 0 ? e : `${e} ${t}`;
1511
1911
  }
1512
1912
  //#endregion
1513
1913
  //#region src/text/date.ts
1514
- var ae = /\{([a-z_]+)\}/g, oe = [
1914
+ var De = /\{([a-z_]+)\}/g, Oe = [
1515
1915
  "January",
1516
1916
  "February",
1517
1917
  "March",
@@ -1524,7 +1924,7 @@ var ae = /\{([a-z_]+)\}/g, oe = [
1524
1924
  "October",
1525
1925
  "November",
1526
1926
  "December"
1527
- ], se = [
1927
+ ], ke = [
1528
1928
  "Jan",
1529
1929
  "Feb",
1530
1930
  "Mar",
@@ -1537,7 +1937,7 @@ var ae = /\{([a-z_]+)\}/g, oe = [
1537
1937
  "Oct",
1538
1938
  "Nov",
1539
1939
  "Dec"
1540
- ], ce = [
1940
+ ], Ae = [
1541
1941
  "Sunday",
1542
1942
  "Monday",
1543
1943
  "Tuesday",
@@ -1546,10 +1946,10 @@ var ae = /\{([a-z_]+)\}/g, oe = [
1546
1946
  "Friday",
1547
1947
  "Saturday"
1548
1948
  ];
1549
- function A(e) {
1949
+ function j(e) {
1550
1950
  return String(e).padStart(2, "0");
1551
1951
  }
1552
- function le(e) {
1952
+ function je(e) {
1553
1953
  let t = e % 100;
1554
1954
  if (t >= 11 && t <= 13) return `${String(e)}th`;
1555
1955
  switch (e % 10) {
@@ -1559,36 +1959,36 @@ function le(e) {
1559
1959
  default: return `${String(e)}th`;
1560
1960
  }
1561
1961
  }
1562
- function ue(e, t) {
1563
- let n = t.getUTCDate(), r = oe[t.getUTCMonth()] ?? "", i = se[t.getUTCMonth()] ?? "", a = ce[t.getUTCDay()] ?? "", o = t.getUTCFullYear();
1962
+ function Me(e, t) {
1963
+ let n = t.getUTCDate(), r = Oe[t.getUTCMonth()] ?? "", i = ke[t.getUTCMonth()] ?? "", a = Ae[t.getUTCDay()] ?? "", o = t.getUTCFullYear();
1564
1964
  switch (e) {
1565
- case "date_num": return `${String(o)}-${A(t.getUTCMonth() + 1)}-${A(n)}`;
1566
- case "date_slash": return `${A(t.getUTCMonth() + 1)}/${A(n)}/${String(o)}`;
1965
+ case "date_num": return `${String(o)}-${j(t.getUTCMonth() + 1)}-${j(n)}`;
1966
+ case "date_slash": return `${j(t.getUTCMonth() + 1)}/${j(n)}/${String(o)}`;
1567
1967
  case "date_long":
1568
1968
  case "date_long_pretty":
1569
- case "day_divider_pretty": return `${a}, ${r} ${le(n)}, ${String(o)}`;
1969
+ case "day_divider_pretty": return `${a}, ${r} ${je(n)}, ${String(o)}`;
1570
1970
  case "date_long_full": return `${r} ${String(n)}, ${String(o)}`;
1571
1971
  case "date":
1572
- case "date_pretty": return `${r} ${le(n)}, ${String(o)}`;
1972
+ case "date_pretty": return `${r} ${je(n)}, ${String(o)}`;
1573
1973
  case "date_short":
1574
1974
  case "date_short_pretty": return `${i} ${String(n)}, ${String(o)}`;
1575
- case "time": return `${A(t.getUTCHours())}:${A(t.getUTCMinutes())}`;
1576
- case "time_secs": return `${A(t.getUTCHours())}:${A(t.getUTCMinutes())}:${A(t.getUTCSeconds())}`;
1975
+ case "time": return `${j(t.getUTCHours())}:${j(t.getUTCMinutes())}`;
1976
+ case "time_secs": return `${j(t.getUTCHours())}:${j(t.getUTCMinutes())}:${j(t.getUTCSeconds())}`;
1577
1977
  default: return;
1578
1978
  }
1579
1979
  }
1580
- function de(e, t, n) {
1980
+ function Ne(e, t, n) {
1581
1981
  let r = /* @__PURE__ */ new Date(e * 1e3);
1582
1982
  if (!Number.isFinite(e) || Number.isNaN(r.getTime())) return n ?? String(e);
1583
- let i = !1, a = t.replace(ae, (e, t) => {
1584
- let n = ue(t, r);
1983
+ let i = !1, a = t.replace(De, (e, t) => {
1984
+ let n = Me(t, r);
1585
1985
  return n === void 0 ? (i = !0, "") : n;
1586
1986
  });
1587
1987
  return t.length === 0 || i ? n ?? r.toISOString().slice(0, 10) : a;
1588
1988
  }
1589
1989
  //#endregion
1590
1990
  //#region src/text/emoji.ts
1591
- var fe = {
1991
+ var Pe = {
1592
1992
  "+1": "👍",
1593
1993
  "-1": "👎",
1594
1994
  100: "💯",
@@ -1625,12 +2025,12 @@ var fe = {
1625
2025
  wink: "😉",
1626
2026
  x: "❌",
1627
2027
  zap: "⚡"
1628
- }, pe = /^[0-9a-f]{1,6}(?:-[0-9a-f]{1,6})*$/i;
1629
- function me(e) {
1630
- return fe[e];
2028
+ }, Fe = /^[0-9a-f]{1,6}(?:-[0-9a-f]{1,6})*$/i;
2029
+ function Ie(e) {
2030
+ return Pe[e];
1631
2031
  }
1632
- function he(e) {
1633
- if (e === void 0 || !pe.test(e)) return;
2032
+ function Le(e) {
2033
+ if (e === void 0 || !Fe.test(e)) return;
1634
2034
  let t = e.split("-").map((e) => Number.parseInt(e, 16));
1635
2035
  if (!t.some((e) => !Number.isFinite(e))) try {
1636
2036
  return String.fromCodePoint(...t);
@@ -1640,7 +2040,7 @@ function he(e) {
1640
2040
  }
1641
2041
  //#endregion
1642
2042
  //#region src/text/RichText.tsx
1643
- var ge = {
2043
+ var Re = {
1644
2044
  attachment_mention: !0,
1645
2045
  broadcast: !0,
1646
2046
  canvas: !0,
@@ -1663,13 +2063,13 @@ var ge = {
1663
2063
  usergroup: !0,
1664
2064
  work_object_mention: !0,
1665
2065
  workflow_mention: !0
1666
- }, _e = {
2066
+ }, ze = {
1667
2067
  rich_text_list: !0,
1668
2068
  rich_text_preformatted: !0,
1669
2069
  rich_text_quote: !0,
1670
2070
  rich_text_section: !0
1671
2071
  };
1672
- function ve(e) {
2072
+ function Be(e) {
1673
2073
  switch (e.type) {
1674
2074
  case "broadcast":
1675
2075
  case "channel":
@@ -1696,9 +2096,9 @@ function ve(e) {
1696
2096
  }
1697
2097
  return _(e);
1698
2098
  }
1699
- function ye(e) {
1700
- let t = C(e);
1701
- if (t === void 0 || !(t in ge) || !S(e)) return !1;
2099
+ function Ve(e) {
2100
+ let t = T(e);
2101
+ if (t === void 0 || !(t in Re) || !w(e)) return !1;
1702
2102
  switch (t) {
1703
2103
  case "text": return typeof e.text == "string";
1704
2104
  case "link": return typeof e.url == "string";
@@ -1713,92 +2113,92 @@ function ye(e) {
1713
2113
  default: return !0;
1714
2114
  }
1715
2115
  }
1716
- function be(e) {
1717
- let t = C(e);
1718
- return t === void 0 || !(t in _e) || !S(e) || !Array.isArray(e.elements) ? !1 : t !== "rich_text_list" || e.elements.every((e) => S(e) && e.type === "rich_text_section" && Array.isArray(e.elements));
2116
+ function He(e) {
2117
+ let t = T(e);
2118
+ return t === void 0 || !(t in ze) || !w(e) || !Array.isArray(e.elements) ? !1 : t !== "rich_text_list" || e.elements.every((e) => w(e) && e.type === "rich_text_section" && Array.isArray(e.elements));
1719
2119
  }
1720
- function j(e, t) {
2120
+ function M(e, t) {
1721
2121
  let n = e;
1722
2122
  return t?.bold === !0 && (n = /* @__PURE__ */ u("strong", {
1723
- ...g(D.bold),
2123
+ ...g(O.bold),
1724
2124
  children: n
1725
2125
  })), t?.italic === !0 && (n = /* @__PURE__ */ u("em", {
1726
- ...g(D.italic),
2126
+ ...g(O.italic),
1727
2127
  children: n
1728
2128
  })), t?.strike === !0 && (n = /* @__PURE__ */ u("s", {
1729
- ...g(D.strike),
2129
+ ...g(O.strike),
1730
2130
  children: n
1731
2131
  })), t?.underline === !0 && (n = /* @__PURE__ */ u("span", {
1732
- ...g(D.underline),
2132
+ ...g(O.underline),
1733
2133
  children: n
1734
2134
  })), t?.code === !0 && (n = /* @__PURE__ */ u("code", {
1735
- ...g(D.inlineCode),
2135
+ ...g(O.inlineCode),
1736
2136
  children: n
1737
2137
  })), n;
1738
2138
  }
1739
- function xe(e) {
2139
+ function Ue(e) {
1740
2140
  return e.text ?? e.id ?? e.user_id ?? e.channel_id ?? e.team_id ?? e.file_id ?? e.canvas_id ?? e.record_id ?? e.message_ts ?? e.workflow_id ?? e.type;
1741
2141
  }
1742
- function Se({ element: e }) {
2142
+ function We({ element: e }) {
1743
2143
  let { resolvers: t } = x();
1744
- if (!ye(e)) return /* @__PURE__ */ u("span", {
1745
- ...g(D.reference),
1746
- "data-unhandled-rich-text-element": C(e) ?? "unknown",
1747
- children: T(e, "rich text element")
2144
+ if (!Ve(e)) return /* @__PURE__ */ u("span", {
2145
+ ...g(O.reference),
2146
+ "data-unhandled-rich-text-element": T(e) ?? "unknown",
2147
+ children: E(e, "rich text element")
1748
2148
  });
1749
- let n = ve(e);
2149
+ let n = Be(e);
1750
2150
  switch (e.type) {
1751
- case "text": return j(e.text, n);
2151
+ case "text": return M(e.text, n);
1752
2152
  case "link": {
1753
- let t = E(e.url), r = e.text ?? e.url;
1754
- return t === void 0 ? j(r, n) : /* @__PURE__ */ u("a", {
1755
- ...g(D.link),
2153
+ let t = D(e.url), r = e.text ?? e.url;
2154
+ return t === void 0 ? M(r, n) : /* @__PURE__ */ u("a", {
2155
+ ...g(O.link),
1756
2156
  href: t,
1757
2157
  rel: "noreferrer",
1758
- children: j(r, n)
2158
+ children: M(r, n)
1759
2159
  });
1760
2160
  }
1761
2161
  case "emoji": return /* @__PURE__ */ u("span", {
1762
2162
  "aria-label": `:${e.name}:`,
1763
2163
  role: "img",
1764
- children: j(t.emoji?.(e.name, e.unicode) ?? he(e.unicode) ?? me(e.name) ?? `:${e.name}:`, n)
2164
+ children: M(t.emoji?.(e.name, e.unicode) ?? Le(e.unicode) ?? Ie(e.name) ?? `:${e.name}:`, n)
1765
2165
  });
1766
2166
  case "user": return /* @__PURE__ */ u("span", {
1767
- ...g(D.mention),
1768
- children: j(/* @__PURE__ */ d(l, { children: ["@", t.user?.(e.user_id) ?? e.user_id] }), n)
2167
+ ...g(O.mention),
2168
+ children: M(/* @__PURE__ */ d(l, { children: ["@", t.user?.(e.user_id) ?? e.user_id] }), n)
1769
2169
  });
1770
2170
  case "usergroup": return /* @__PURE__ */ u("span", {
1771
- ...g(D.mention),
1772
- children: j(/* @__PURE__ */ d(l, { children: ["@", t.usergroup?.(e.usergroup_id) ?? e.usergroup_id] }), n)
2171
+ ...g(O.mention),
2172
+ children: M(/* @__PURE__ */ d(l, { children: ["@", t.usergroup?.(e.usergroup_id) ?? e.usergroup_id] }), n)
1773
2173
  });
1774
2174
  case "channel": return /* @__PURE__ */ u("span", {
1775
- ...g(D.mention),
1776
- children: j(/* @__PURE__ */ d(l, { children: ["#", t.channel?.(e.channel_id) ?? e.channel_id] }), n)
2175
+ ...g(O.mention),
2176
+ children: M(/* @__PURE__ */ d(l, { children: ["#", t.channel?.(e.channel_id) ?? e.channel_id] }), n)
1777
2177
  });
1778
2178
  case "team": return /* @__PURE__ */ u("span", {
1779
- ...g(D.mention),
1780
- children: j(/* @__PURE__ */ d(l, { children: ["@", t.team?.(e.team_id) ?? e.team_id] }), n)
2179
+ ...g(O.mention),
2180
+ children: M(/* @__PURE__ */ d(l, { children: ["@", t.team?.(e.team_id) ?? e.team_id] }), n)
1781
2181
  });
1782
2182
  case "broadcast": return /* @__PURE__ */ u("span", {
1783
- ...g(D.mention),
1784
- children: j(`@${e.range}`, n)
2183
+ ...g(O.mention),
2184
+ children: M(`@${e.range}`, n)
1785
2185
  });
1786
2186
  case "date": {
1787
- let r = t.date?.(e.timestamp, e.format) ?? de(e.timestamp, e.format, e.fallback), i = E(e.url);
1788
- return i === void 0 ? j(r, n) : /* @__PURE__ */ u("a", {
1789
- ...g(D.link),
2187
+ let r = t.date?.(e.timestamp, e.format) ?? Ne(e.timestamp, e.format, e.fallback), i = D(e.url);
2188
+ return i === void 0 ? M(r, n) : /* @__PURE__ */ u("a", {
2189
+ ...g(O.link),
1790
2190
  href: i,
1791
2191
  rel: "noreferrer",
1792
- children: j(r, n)
2192
+ children: M(r, n)
1793
2193
  });
1794
2194
  }
1795
2195
  case "color": return /* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u("span", {
1796
- ...g(D.colorSwatch),
2196
+ ...g(O.colorSwatch),
1797
2197
  "aria-hidden": "true",
1798
2198
  style: { backgroundColor: e.value }
1799
- }), j(e.value, n)] });
2199
+ }), M(e.value, n)] });
1800
2200
  case "citation": return /* @__PURE__ */ d("span", {
1801
- ...g(D.reference),
2201
+ ...g(O.reference),
1802
2202
  children: [
1803
2203
  "[",
1804
2204
  e.index ?? e.text ?? "source",
@@ -1816,15 +2216,15 @@ function Se({ element: e }) {
1816
2216
  case "tag":
1817
2217
  case "work_object_mention":
1818
2218
  case "workflow_mention": return /* @__PURE__ */ u("span", {
1819
- ...g(D.reference),
1820
- children: xe(e)
2219
+ ...g(O.reference),
2220
+ children: Ue(e)
1821
2221
  });
1822
2222
  }
1823
2223
  return _(e);
1824
2224
  }
1825
- function Ce({ element: e }) {
2225
+ function Ge({ element: e }) {
1826
2226
  let { resolvers: t } = x();
1827
- if (ye(e)) {
2227
+ if (Ve(e)) {
1828
2228
  switch (e.type) {
1829
2229
  case "text": return e.text;
1830
2230
  case "link": return e.text ?? e.url;
@@ -1834,7 +2234,7 @@ function Ce({ element: e }) {
1834
2234
  case "team": return /* @__PURE__ */ d(l, { children: ["@", t.team?.(e.team_id) ?? e.team_id] });
1835
2235
  case "broadcast": return `@${e.range}`;
1836
2236
  case "emoji": return `:${e.name}:`;
1837
- case "date": return t.date?.(e.timestamp, e.format) ?? de(e.timestamp, e.format, e.fallback);
2237
+ case "date": return t.date?.(e.timestamp, e.format) ?? Ne(e.timestamp, e.format, e.fallback);
1838
2238
  case "color": return e.value;
1839
2239
  case "citation": return `[${e.index ?? e.text ?? "source"}]`;
1840
2240
  case "attachment_mention":
@@ -1847,61 +2247,61 @@ function Ce({ element: e }) {
1847
2247
  case "salesforce_data_field":
1848
2248
  case "tag":
1849
2249
  case "work_object_mention":
1850
- case "workflow_mention": return xe(e);
2250
+ case "workflow_mention": return Ue(e);
1851
2251
  }
1852
2252
  return _(e);
1853
2253
  }
1854
2254
  return /* @__PURE__ */ u("span", {
1855
- ...g(D.reference),
1856
- "data-unhandled-rich-text-element": C(e) ?? "unknown",
1857
- children: T(e, "rich text element")
2255
+ ...g(O.reference),
2256
+ "data-unhandled-rich-text-element": T(e) ?? "unknown",
2257
+ children: E(e, "rich text element")
1858
2258
  });
1859
2259
  }
1860
- function we(e) {
2260
+ function Ke(e) {
1861
2261
  let t = e % 3;
1862
- return t === 1 ? D.listOrderedAlpha : t === 2 ? D.listOrderedRoman : D.listOrdered;
2262
+ return t === 1 ? O.listOrderedAlpha : t === 2 ? O.listOrderedRoman : O.listOrdered;
1863
2263
  }
1864
- function Te(e) {
2264
+ function qe(e) {
1865
2265
  let t = e % 3;
1866
- return t === 1 ? D.listBulletAlternate : t === 2 ? D.listBulletSquare : D.listBullet;
2266
+ return t === 1 ? O.listBulletAlternate : t === 2 ? O.listBulletSquare : O.listBullet;
1867
2267
  }
1868
- function Ee({ element: e, path: n }) {
1869
- if (!be(e)) return /* @__PURE__ */ u("div", {
1870
- ...g(D.unhandled),
1871
- "data-unhandled-rich-text-container": C(e) ?? "unknown",
1872
- children: T(e, "rich text container")
2268
+ function Je({ element: e, path: n }) {
2269
+ if (!He(e)) return /* @__PURE__ */ u("div", {
2270
+ ...g(O.unhandled),
2271
+ "data-unhandled-rich-text-container": T(e) ?? "unknown",
2272
+ children: E(e, "rich text container")
1873
2273
  });
1874
2274
  switch (e.type) {
1875
2275
  case "rich_text_section": return /* @__PURE__ */ u("div", {
1876
- ...g(D.richSection),
2276
+ ...g(O.richSection),
1877
2277
  "data-rich-text-section": !0,
1878
- children: e.elements.map((e, t) => /* @__PURE__ */ u(Se, { element: e }, `${C(e) ?? "unknown"}-${String(t)}`))
2278
+ children: e.elements.map((e, t) => /* @__PURE__ */ u(We, { element: e }, `${T(e) ?? "unknown"}-${String(t)}`))
1879
2279
  });
1880
2280
  case "rich_text_quote": return /* @__PURE__ */ u("blockquote", {
1881
- ...g(D.quote, e.border === 1 && D.richBorder),
2281
+ ...g(O.quote, e.border === 1 && O.richBorder),
1882
2282
  "data-border": e.border ?? 0,
1883
- children: e.elements.map((e, t) => /* @__PURE__ */ u(Se, { element: e }, `${C(e) ?? "unknown"}-${String(t)}`))
2283
+ children: e.elements.map((e, t) => /* @__PURE__ */ u(We, { element: e }, `${T(e) ?? "unknown"}-${String(t)}`))
1884
2284
  });
1885
2285
  case "rich_text_preformatted": return /* @__PURE__ */ u("pre", {
1886
- ...g(D.pre, e.border === 1 && D.richBorder),
2286
+ ...g(O.pre, e.border === 1 && O.richBorder),
1887
2287
  "data-border": e.border ?? 0,
1888
2288
  "data-language": e.language,
1889
- children: e.elements.map((e, t) => /* @__PURE__ */ u(Ce, { element: e }, `${C(e) ?? "unknown"}-${String(t)}`))
2289
+ children: e.elements.map((e, t) => /* @__PURE__ */ u(Ge, { element: e }, `${T(e) ?? "unknown"}-${String(t)}`))
1890
2290
  });
1891
2291
  case "rich_text_list": {
1892
- let r = Number.isFinite(e.indent) ? Math.trunc(e.indent ?? 0) : 0, i = Math.min(8, Math.max(0, r)), a = Number.isFinite(e.offset) ? Math.trunc(e.offset ?? 0) : 0, o = Math.max(1, a + 1), s = { marginInlineStart: i * 28 }, c = e.style === "ordered" ? D.listItemOrdered : [D.listItemBullet, Te(i)], l = e.elements.map((e, r) => /* @__PURE__ */ t("li", {
2292
+ let r = Number.isFinite(e.indent) ? Math.trunc(e.indent ?? 0) : 0, i = Math.min(8, Math.max(0, r)), a = Number.isFinite(e.offset) ? Math.trunc(e.offset ?? 0) : 0, o = Math.max(1, a + 1), s = { marginInlineStart: i * 28 }, c = e.style === "ordered" ? O.listItemOrdered : [O.listItemBullet, qe(i)], l = e.elements.map((e, r) => /* @__PURE__ */ t("li", {
1893
2293
  ...g(c),
1894
2294
  key: `${n}.elements[${String(r)}]`
1895
- }, e.elements.map((e, t) => /* @__PURE__ */ u(Se, { element: e }, `${C(e) ?? "unknown"}-${String(t)}`))));
2295
+ }, e.elements.map((e, t) => /* @__PURE__ */ u(We, { element: e }, `${T(e) ?? "unknown"}-${String(t)}`))));
1896
2296
  return e.style === "ordered" ? /* @__PURE__ */ u("ol", {
1897
- ...g(D.list, we(i), e.border === 1 && D.richBorder),
2297
+ ...g(O.list, Ke(i), e.border === 1 && O.richBorder),
1898
2298
  "data-border": e.border ?? 0,
1899
2299
  "data-indent": i,
1900
2300
  start: o,
1901
2301
  style: s,
1902
2302
  children: l
1903
2303
  }) : /* @__PURE__ */ u("ul", {
1904
- ...g(D.list, e.border === 1 && D.richBorder),
2304
+ ...g(O.list, e.border === 1 && O.richBorder),
1905
2305
  "data-border": e.border ?? 0,
1906
2306
  "data-indent": i,
1907
2307
  style: s,
@@ -1911,24 +2311,24 @@ function Ee({ element: e, path: n }) {
1911
2311
  }
1912
2312
  return _(e);
1913
2313
  }
1914
- function M({ block: e, className: t, path: n = "block" }) {
1915
- let r = g(D.richText), i = e, a = S(i) ? i.elements : void 0;
2314
+ function N({ block: e, className: t, path: n = "block" }) {
2315
+ let r = g(O.richText), i = e, a = w(i) ? i.elements : void 0;
1916
2316
  return /* @__PURE__ */ u("div", {
1917
2317
  ...r,
1918
- className: k(r.className, t),
1919
- children: Array.isArray(a) ? a.map((e, t) => /* @__PURE__ */ u(Ee, {
2318
+ className: A(r.className, t),
2319
+ children: Array.isArray(a) ? a.map((e, t) => /* @__PURE__ */ u(Je, {
1920
2320
  element: e,
1921
2321
  path: `${n}.elements[${String(t)}]`
1922
- }, `${C(e) ?? "unknown"}-${String(t)}`)) : /* @__PURE__ */ u("div", {
1923
- ...g(D.unhandled),
2322
+ }, `${T(e) ?? "unknown"}-${String(t)}`)) : /* @__PURE__ */ u("div", {
2323
+ ...g(O.unhandled),
1924
2324
  "data-unhandled-rich-text-block": !0,
1925
- children: T(i, "rich text block")
2325
+ children: E(i, "rich text block")
1926
2326
  })
1927
2327
  });
1928
2328
  }
1929
2329
  //#endregion
1930
2330
  //#region src/elements/Elements.tsx
1931
- var De = {
2331
+ var Ye = {
1932
2332
  button: !0,
1933
2333
  channels_select: !0,
1934
2334
  checkboxes: !0,
@@ -1955,68 +2355,68 @@ var De = {
1955
2355
  users_select: !0,
1956
2356
  workflow_button: !0
1957
2357
  };
1958
- function Oe(e) {
1959
- let t = C(e);
1960
- return t !== void 0 && t in De;
2358
+ function Xe(e) {
2359
+ let t = T(e);
2360
+ return t !== void 0 && t in Ye;
1961
2361
  }
1962
- function ke(e) {
1963
- if (!S(e)) return;
2362
+ function Ze(e) {
2363
+ if (!w(e)) return;
1964
2364
  if ("image_url" in e) return typeof e.image_url == "string" ? e.image_url : void 0;
1965
2365
  let t = e.slack_file;
1966
- if (S(t) && typeof t.url == "string") return t.url;
2366
+ if (w(t) && typeof t.url == "string") return t.url;
1967
2367
  }
1968
- function Ae(e) {
1969
- return S(e) && typeof e.text == "string";
2368
+ function Qe(e) {
2369
+ return w(e) && typeof e.text == "string";
1970
2370
  }
1971
- function je(e) {
2371
+ function $e(e) {
1972
2372
  return e === void 0 || typeof e == "string";
1973
2373
  }
1974
- function Me(e) {
1975
- return S(e) && Ae(e.text) && je(e.value) && (e.description === void 0 || Ae(e.description));
2374
+ function et(e) {
2375
+ return w(e) && Qe(e.text) && $e(e.value) && (e.description === void 0 || Qe(e.description));
1976
2376
  }
1977
- function Ne(e) {
1978
- return Array.isArray(e) && e.every(Me);
2377
+ function tt(e) {
2378
+ return Array.isArray(e) && e.every(et);
1979
2379
  }
1980
- function Pe(e) {
2380
+ function nt(e) {
1981
2381
  return Array.isArray(e) && e.every((e) => typeof e == "string");
1982
2382
  }
1983
- function Fe(e) {
1984
- return S(e) && Ae(e.text);
2383
+ function rt(e) {
2384
+ return w(e) && Qe(e.text);
1985
2385
  }
1986
- function Ie(e) {
1987
- return !S(e) || !Ne(e.options) ? !1 : C(e) === "checkboxes" ? e.initial_options === void 0 || Ne(e.initial_options) : e.initial_option === void 0 || Me(e.initial_option);
2386
+ function it(e) {
2387
+ return !w(e) || !tt(e.options) ? !1 : T(e) === "checkboxes" ? e.initial_options === void 0 || tt(e.initial_options) : e.initial_option === void 0 || et(e.initial_option);
1988
2388
  }
1989
- function Le(e) {
1990
- return e.placeholder === void 0 || Ae(e.placeholder);
2389
+ function at(e) {
2390
+ return e.placeholder === void 0 || Qe(e.placeholder);
1991
2391
  }
1992
- function Re(e) {
2392
+ function ot(e) {
1993
2393
  let t = e.option_groups;
1994
- return (e.options === void 0 || Ne(e.options)) && (t === void 0 || Array.isArray(t) && t.every((e) => S(e) && Ne(e.options)));
1995
- }
1996
- function ze(e) {
1997
- if (!S(e) || !Le(e)) return !1;
1998
- switch (C(e) ?? "") {
1999
- case "static_select": return Re(e) && (e.initial_option === void 0 || Me(e.initial_option));
2000
- case "multi_static_select": return Re(e) && (e.initial_options === void 0 || Ne(e.initial_options));
2001
- case "external_select": return e.initial_option === void 0 || Me(e.initial_option);
2002
- case "multi_external_select": return e.initial_options === void 0 || Ne(e.initial_options);
2003
- case "users_select": return je(e.initial_user);
2004
- case "multi_users_select": return e.initial_users === void 0 || Pe(e.initial_users);
2005
- case "channels_select": return je(e.initial_channel);
2006
- case "multi_channels_select": return e.initial_channels === void 0 || Pe(e.initial_channels);
2007
- case "conversations_select": return je(e.initial_conversation);
2008
- case "multi_conversations_select": return e.initial_conversations === void 0 || Pe(e.initial_conversations);
2394
+ return (e.options === void 0 || tt(e.options)) && (t === void 0 || Array.isArray(t) && t.every((e) => w(e) && tt(e.options)));
2395
+ }
2396
+ function st(e) {
2397
+ if (!w(e) || !at(e)) return !1;
2398
+ switch (T(e) ?? "") {
2399
+ case "static_select": return ot(e) && (e.initial_option === void 0 || et(e.initial_option));
2400
+ case "multi_static_select": return ot(e) && (e.initial_options === void 0 || tt(e.initial_options));
2401
+ case "external_select": return e.initial_option === void 0 || et(e.initial_option);
2402
+ case "multi_external_select": return e.initial_options === void 0 || tt(e.initial_options);
2403
+ case "users_select": return $e(e.initial_user);
2404
+ case "multi_users_select": return e.initial_users === void 0 || nt(e.initial_users);
2405
+ case "channels_select": return $e(e.initial_channel);
2406
+ case "multi_channels_select": return e.initial_channels === void 0 || nt(e.initial_channels);
2407
+ case "conversations_select": return $e(e.initial_conversation);
2408
+ case "multi_conversations_select": return e.initial_conversations === void 0 || nt(e.initial_conversations);
2009
2409
  default: return !1;
2010
2410
  }
2011
2411
  }
2012
- function Be(e) {
2013
- if (!S(e)) return !1;
2014
- switch (C(e) ?? "") {
2412
+ function ct(e) {
2413
+ if (!w(e)) return !1;
2414
+ switch (T(e) ?? "") {
2015
2415
  case "plain_text_input":
2016
2416
  case "email_text_input":
2017
2417
  case "url_text_input":
2018
- case "number_input": return Le(e);
2019
- case "datepicker": return je(e.initial_date);
2418
+ case "number_input": return at(e);
2419
+ case "datepicker": return $e(e.initial_date);
2020
2420
  case "file_input": return e.filetypes === void 0 || Array.isArray(e.filetypes);
2021
2421
  case "datetimepicker":
2022
2422
  case "timepicker":
@@ -2024,71 +2424,76 @@ function Be(e) {
2024
2424
  default: return !1;
2025
2425
  }
2026
2426
  }
2027
- function N({ className: e, element: t }) {
2028
- let n = g(D.unhandled);
2427
+ function P({ className: e, element: t }) {
2428
+ let n = g(O.unhandled);
2029
2429
  return /* @__PURE__ */ u("span", {
2030
2430
  ...n,
2031
- className: k(n.className, e),
2032
- "data-unhandled-element": C(t) ?? "unknown",
2033
- children: T(t, "Block Kit element")
2431
+ className: A(n.className, e),
2432
+ "data-unhandled-element": T(t) ?? "unknown",
2433
+ children: E(t, "Block Kit element")
2034
2434
  });
2035
2435
  }
2036
- function P({ className: e, element: t, variant: n }) {
2037
- let r = g(D.image, n === "accessory" && D.accessoryImage, n === "cardHero" && D.cardHero, n === "cardIcon" && D.cardIcon, n === "context" && D.contextImage), i = t, a = S(i) && typeof i.alt_text == "string" ? i.alt_text : T(i, "image"), o = ke(t);
2038
- return o === void 0 ? /* @__PURE__ */ u("div", {
2039
- ...r,
2040
- "aria-label": a,
2041
- className: k(r.className, e),
2042
- role: "img"
2043
- }) : /* @__PURE__ */ u("img", {
2436
+ function F({ className: e, element: t, variant: n }) {
2437
+ let r = g(O.image, n === "accessory" && O.accessoryImage, n === "cardHero" && O.cardHero, n === "cardIcon" && O.cardIcon, n === "context" && O.contextImage), i = t, a = w(i) && typeof i.alt_text == "string" ? i.alt_text : E(i, "image"), o = Ze(t);
2438
+ if (o === void 0) {
2439
+ let t = g(O.image, O.imagePlaceholder, n === "accessory" && O.accessoryImage, n === "cardHero" && O.cardHero, n === "cardIcon" && O.cardIcon, n === "context" && O.contextImage);
2440
+ return /* @__PURE__ */ u("div", {
2441
+ ...t,
2442
+ "aria-label": a,
2443
+ className: A(t.className, e),
2444
+ role: "img",
2445
+ children: /* @__PURE__ */ u(le, { size: n === "context" ? 14 : 28 })
2446
+ });
2447
+ }
2448
+ return /* @__PURE__ */ u("img", {
2044
2449
  ...r,
2045
2450
  alt: a,
2046
- className: k(r.className, e),
2451
+ className: A(r.className, e),
2047
2452
  src: o
2048
2453
  });
2049
2454
  }
2050
- function Ve({ blockId: e, className: t, element: n }) {
2455
+ function lt({ blockId: e, className: t, element: n }) {
2051
2456
  let { onAction: r } = x();
2052
- if (!Fe(n)) return /* @__PURE__ */ u(N, {
2457
+ if (!rt(n)) return /* @__PURE__ */ u(P, {
2053
2458
  className: t,
2054
2459
  element: n
2055
2460
  });
2056
- let i = g(D.button, n.style === "primary" && D.buttonPrimary, n.style === "danger" && D.buttonDanger), a = () => {
2461
+ let i = g(O.button, n.style === "primary" && O.buttonPrimary, n.style === "danger" && O.buttonDanger), a = () => {
2057
2462
  n.action_id !== void 0 && r?.({
2058
2463
  actionId: n.action_id,
2059
2464
  type: n.type,
2060
2465
  ...e === void 0 ? {} : { blockId: e },
2061
2466
  ...n.value === void 0 ? {} : { value: n.value }
2062
2467
  });
2063
- }, o = E(n.url);
2468
+ }, o = D(n.url);
2064
2469
  return o === void 0 ? /* @__PURE__ */ u("button", {
2065
2470
  ...i,
2066
2471
  "aria-label": n.accessibility_label,
2067
- className: k(i.className, t),
2472
+ className: A(i.className, t),
2068
2473
  onClick: a,
2069
2474
  type: "button",
2070
2475
  children: n.text.text
2071
2476
  }) : /* @__PURE__ */ u("a", {
2072
2477
  ...i,
2073
2478
  "aria-label": n.accessibility_label,
2074
- className: k(i.className, t),
2479
+ className: A(i.className, t),
2075
2480
  href: o,
2076
2481
  onClick: a,
2077
2482
  rel: "noreferrer",
2078
2483
  children: n.text.text
2079
2484
  });
2080
2485
  }
2081
- function He({ blockId: e, className: t, element: n }) {
2486
+ function ut({ blockId: e, className: t, element: n }) {
2082
2487
  let { onAction: r } = x();
2083
- if (!S(n)) return /* @__PURE__ */ u(N, {
2488
+ if (!w(n)) return /* @__PURE__ */ u(P, {
2084
2489
  className: t,
2085
2490
  element: n
2086
2491
  });
2087
- let i = g(D.button, D.overflowButton);
2492
+ let i = g(O.button, O.overflowButton);
2088
2493
  return /* @__PURE__ */ u("button", {
2089
2494
  ...i,
2090
2495
  "aria-label": "More options",
2091
- className: k(i.className, t),
2496
+ className: A(i.className, t),
2092
2497
  onClick: () => {
2093
2498
  n.action_id !== void 0 && r?.({
2094
2499
  actionId: n.action_id,
@@ -2097,33 +2502,33 @@ function He({ blockId: e, className: t, element: n }) {
2097
2502
  });
2098
2503
  },
2099
2504
  type: "button",
2100
- children: "⋯"
2505
+ children: /* @__PURE__ */ u(oe, { size: 16 })
2101
2506
  });
2102
2507
  }
2103
- function Ue(e, t) {
2508
+ function dt(e, t) {
2104
2509
  return e.value ?? `${e.text.text}-${String(t)}`;
2105
2510
  }
2106
- function We(e, t) {
2511
+ function ft(e, t) {
2107
2512
  return t?.some((t) => t.value === e.value && t.text.text === e.text.text) ?? !1;
2108
2513
  }
2109
- function Ge({ blockId: e, className: n, element: r }) {
2514
+ function pt({ blockId: e, className: n, element: r }) {
2110
2515
  let { onAction: i } = x(), o = a();
2111
- if (!Ie(r)) return /* @__PURE__ */ u(N, {
2516
+ if (!it(r)) return /* @__PURE__ */ u(P, {
2112
2517
  className: n,
2113
2518
  element: r
2114
2519
  });
2115
- let s = g(D.choiceGroup), c = r.type === "checkboxes" ? r.initial_options : r.initial_option === void 0 ? void 0 : [r.initial_option];
2520
+ let s = g(O.choiceGroup), c = r.type === "checkboxes" ? r.initial_options : r.initial_option === void 0 ? void 0 : [r.initial_option];
2116
2521
  return /* @__PURE__ */ u("fieldset", {
2117
2522
  ...s,
2118
- className: k(s.className, n),
2523
+ className: A(s.className, n),
2119
2524
  "data-element-type": r.type,
2120
2525
  children: r.options.map((n, a) => {
2121
- let s = Ue(n, a);
2526
+ let s = dt(n, a);
2122
2527
  return /* @__PURE__ */ t("label", {
2123
- ...g(D.choice),
2528
+ ...g(O.choice),
2124
2529
  key: s
2125
2530
  }, /* @__PURE__ */ u("input", {
2126
- defaultChecked: We(n, c),
2531
+ defaultChecked: ft(n, c),
2127
2532
  name: o,
2128
2533
  onChange: (t) => {
2129
2534
  if (r.action_id !== void 0) {
@@ -2139,49 +2544,49 @@ function Ge({ blockId: e, className: n, element: r }) {
2139
2544
  type: r.type === "checkboxes" ? "checkbox" : "radio",
2140
2545
  value: s
2141
2546
  }), /* @__PURE__ */ d("span", { children: [n.text.text, n.description === void 0 ? null : /* @__PURE__ */ d("span", {
2142
- ...g(D.smallText),
2547
+ ...g(O.smallText),
2143
2548
  children: [" ", n.description.text]
2144
2549
  })] }));
2145
2550
  })
2146
2551
  });
2147
2552
  }
2148
- function Ke(e) {
2553
+ function mt(e) {
2149
2554
  return e.options === void 0 ? e.option_groups?.flatMap((e) => e.options) ?? [] : e.options;
2150
2555
  }
2151
- function qe(e) {
2556
+ function ht(e) {
2152
2557
  return e.map((e, t) => ({
2153
2558
  label: e.text.text,
2154
- value: Ue(e, t)
2559
+ value: dt(e, t)
2155
2560
  }));
2156
2561
  }
2157
- function Je(e) {
2562
+ function gt(e) {
2158
2563
  return e.map((e) => ({
2159
2564
  label: e,
2160
2565
  value: e
2161
2566
  }));
2162
2567
  }
2163
- function Ye(e) {
2568
+ function _t(e) {
2164
2569
  switch (e.type) {
2165
2570
  case "static_select":
2166
- case "multi_static_select": return qe(Ke(e));
2167
- case "external_select": return e.initial_option === void 0 ? [] : qe([e.initial_option]);
2168
- case "multi_external_select": return qe(e.initial_options ?? []);
2169
- case "users_select": return Je(e.initial_user === void 0 ? [] : [e.initial_user]);
2170
- case "multi_users_select": return Je(e.initial_users ?? []);
2171
- case "channels_select": return Je(e.initial_channel === void 0 ? [] : [e.initial_channel]);
2172
- case "multi_channels_select": return Je(e.initial_channels ?? []);
2173
- case "conversations_select": return Je(e.initial_conversation === void 0 ? [] : [e.initial_conversation]);
2174
- case "multi_conversations_select": return Je(e.initial_conversations ?? []);
2571
+ case "multi_static_select": return ht(mt(e));
2572
+ case "external_select": return e.initial_option === void 0 ? [] : ht([e.initial_option]);
2573
+ case "multi_external_select": return ht(e.initial_options ?? []);
2574
+ case "users_select": return gt(e.initial_user === void 0 ? [] : [e.initial_user]);
2575
+ case "multi_users_select": return gt(e.initial_users ?? []);
2576
+ case "channels_select": return gt(e.initial_channel === void 0 ? [] : [e.initial_channel]);
2577
+ case "multi_channels_select": return gt(e.initial_channels ?? []);
2578
+ case "conversations_select": return gt(e.initial_conversation === void 0 ? [] : [e.initial_conversation]);
2579
+ case "multi_conversations_select": return gt(e.initial_conversations ?? []);
2175
2580
  }
2176
2581
  return _(e);
2177
2582
  }
2178
- function Xe(e, t) {
2179
- return e.flatMap((e, n) => We(e, t) ? [Ue(e, n)] : []);
2583
+ function vt(e, t) {
2584
+ return e.flatMap((e, n) => ft(e, t) ? [dt(e, n)] : []);
2180
2585
  }
2181
- function Ze(e, t) {
2586
+ function yt(e, t) {
2182
2587
  switch (e.type) {
2183
- case "static_select": return Xe(Ke(e), e.initial_option === void 0 ? void 0 : [e.initial_option]);
2184
- case "multi_static_select": return Xe(Ke(e), e.initial_options);
2588
+ case "static_select": return vt(mt(e), e.initial_option === void 0 ? void 0 : [e.initial_option]);
2589
+ case "multi_static_select": return vt(mt(e), e.initial_options);
2185
2590
  case "external_select":
2186
2591
  case "multi_external_select":
2187
2592
  case "users_select":
@@ -2193,7 +2598,7 @@ function Ze(e, t) {
2193
2598
  }
2194
2599
  return _(e);
2195
2600
  }
2196
- function Qe(e) {
2601
+ function bt(e) {
2197
2602
  if ("placeholder" in e && e.placeholder !== void 0) return e.placeholder.text;
2198
2603
  switch (e.type) {
2199
2604
  case "users_select":
@@ -2209,13 +2614,13 @@ function Qe(e) {
2209
2614
  }
2210
2615
  return _(e);
2211
2616
  }
2212
- function $e({ blockId: e, className: t, element: n }) {
2617
+ function xt({ blockId: e, className: t, element: n }) {
2213
2618
  let { onAction: r } = x();
2214
- if (!ze(n)) return /* @__PURE__ */ u(N, {
2619
+ if (!st(n)) return /* @__PURE__ */ u(P, {
2215
2620
  className: t,
2216
2621
  element: n
2217
2622
  });
2218
- let i = g(D.select), a = n.type.startsWith("multi_"), o = Ye(n), s = Ze(n, o), c = (t) => {
2623
+ let i = g(O.select), a = n.type.startsWith("multi_"), o = _t(n), s = yt(n, o), c = (t) => {
2219
2624
  if (n.action_id !== void 0) {
2220
2625
  let i = Array.from(t.currentTarget.selectedOptions, (e) => e.value);
2221
2626
  r?.({
@@ -2225,51 +2630,67 @@ function $e({ blockId: e, className: t, element: n }) {
2225
2630
  ...a ? { values: i } : { value: t.currentTarget.value }
2226
2631
  });
2227
2632
  }
2228
- };
2229
- return /* @__PURE__ */ d("select", {
2633
+ }, f = /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("option", {
2634
+ disabled: !0,
2635
+ value: "",
2636
+ children: bt(n)
2637
+ }), o.length === 0 ? /* @__PURE__ */ u("option", {
2638
+ value: "preview",
2639
+ children: "Preview option"
2640
+ }) : o.map((e) => /* @__PURE__ */ u("option", {
2641
+ value: e.value,
2642
+ children: e.label
2643
+ }, e.value))] });
2644
+ if (a) return /* @__PURE__ */ u("select", {
2230
2645
  ...i,
2231
- "aria-label": Qe(n),
2232
- className: k(i.className, t),
2233
- defaultValue: a ? s : s[0] ?? "",
2234
- multiple: a,
2646
+ "aria-label": bt(n),
2647
+ className: A(i.className, t),
2648
+ defaultValue: s,
2649
+ multiple: !0,
2235
2650
  onChange: c,
2236
- children: [/* @__PURE__ */ u("option", {
2237
- disabled: !0,
2238
- value: "",
2239
- children: Qe(n)
2240
- }), o.length === 0 ? /* @__PURE__ */ u("option", {
2241
- value: "preview",
2242
- children: "Preview option"
2243
- }) : o.map((e) => /* @__PURE__ */ u("option", {
2244
- value: e.value,
2245
- children: e.label
2246
- }, e.value))]
2651
+ children: f
2652
+ });
2653
+ let p = g(O.selectWrap);
2654
+ return /* @__PURE__ */ d("span", {
2655
+ ...p,
2656
+ className: A(p.className, t),
2657
+ children: [/* @__PURE__ */ u("select", {
2658
+ ...g(O.select, O.selectWithChevron),
2659
+ "aria-label": bt(n),
2660
+ defaultValue: s[0] ?? "",
2661
+ onChange: c,
2662
+ children: f
2663
+ }), /* @__PURE__ */ u("span", {
2664
+ ...g(O.selectChevron),
2665
+ "aria-hidden": "true",
2666
+ children: /* @__PURE__ */ u(ee, { size: 16 })
2667
+ })]
2247
2668
  });
2248
2669
  }
2249
- function et(e) {
2670
+ function St(e) {
2250
2671
  return String(e).padStart(2, "0");
2251
2672
  }
2252
- function tt(e) {
2253
- return `${String(e.getFullYear())}-${et(e.getMonth() + 1)}-${et(e.getDate())}`;
2673
+ function Ct(e) {
2674
+ return `${String(e.getFullYear())}-${St(e.getMonth() + 1)}-${St(e.getDate())}`;
2254
2675
  }
2255
- function nt(e) {
2676
+ function wt(e) {
2256
2677
  if (e === void 0) return "Select a date";
2257
- if (e === tt(/* @__PURE__ */ new Date())) return "Today";
2678
+ if (e === Ct(/* @__PURE__ */ new Date())) return "Today";
2258
2679
  let [t = "", n = "", r = ""] = e.split("-");
2259
2680
  return `${n}/${r}/${t}`;
2260
2681
  }
2261
- function rt(e) {
2682
+ function Tt(e) {
2262
2683
  if (e === void 0) return;
2263
2684
  let t = /* @__PURE__ */ new Date(e * 1e3);
2264
- if (!Number.isNaN(t.getTime())) return `${String(t.getFullYear())}-${et(t.getMonth() + 1)}-${et(t.getDate())}T${et(t.getHours())}:${et(t.getMinutes())}`;
2685
+ if (!Number.isNaN(t.getTime())) return `${String(t.getFullYear())}-${St(t.getMonth() + 1)}-${St(t.getDate())}T${St(t.getHours())}:${St(t.getMinutes())}`;
2265
2686
  }
2266
- function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2687
+ function Et({ blockId: e, className: t, element: n, path: r = "element" }) {
2267
2688
  let { onAction: i } = x();
2268
- if (!Be(n)) return /* @__PURE__ */ u(N, {
2689
+ if (!ct(n)) return /* @__PURE__ */ u(P, {
2269
2690
  className: t,
2270
2691
  element: n
2271
2692
  });
2272
- let a = g(D.input), o = (t) => {
2693
+ let a = g(O.input), o = (t) => {
2273
2694
  n.action_id !== void 0 && i?.({
2274
2695
  actionId: n.action_id,
2275
2696
  type: n.type,
@@ -2282,7 +2703,7 @@ function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2282
2703
  switch (n.type) {
2283
2704
  case "plain_text_input": return n.multiline === !0 ? /* @__PURE__ */ u("textarea", {
2284
2705
  ...a,
2285
- className: k(a.className, t),
2706
+ className: A(a.className, t),
2286
2707
  defaultValue: n.initial_value,
2287
2708
  maxLength: n.max_length,
2288
2709
  minLength: n.min_length,
@@ -2291,7 +2712,7 @@ function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2291
2712
  rows: 4
2292
2713
  }) : /* @__PURE__ */ u("input", {
2293
2714
  ...a,
2294
- className: k(a.className, t),
2715
+ className: A(a.className, t),
2295
2716
  defaultValue: n.initial_value,
2296
2717
  maxLength: n.max_length,
2297
2718
  minLength: n.min_length,
@@ -2301,7 +2722,7 @@ function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2301
2722
  });
2302
2723
  case "email_text_input": return /* @__PURE__ */ u("input", {
2303
2724
  ...a,
2304
- className: k(a.className, t),
2725
+ className: A(a.className, t),
2305
2726
  defaultValue: n.initial_value,
2306
2727
  onChange: s,
2307
2728
  placeholder: n.placeholder?.text,
@@ -2309,7 +2730,7 @@ function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2309
2730
  });
2310
2731
  case "url_text_input": return /* @__PURE__ */ u("input", {
2311
2732
  ...a,
2312
- className: k(a.className, t),
2733
+ className: A(a.className, t),
2313
2734
  defaultValue: n.initial_value,
2314
2735
  onChange: s,
2315
2736
  placeholder: n.placeholder?.text,
@@ -2317,7 +2738,7 @@ function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2317
2738
  });
2318
2739
  case "number_input": return /* @__PURE__ */ u("input", {
2319
2740
  ...a,
2320
- className: k(a.className, t),
2741
+ className: A(a.className, t),
2321
2742
  defaultValue: n.initial_value,
2322
2743
  max: n.max_value,
2323
2744
  min: n.min_value,
@@ -2327,40 +2748,40 @@ function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2327
2748
  type: "number"
2328
2749
  });
2329
2750
  case "datepicker": {
2330
- let e = g(D.button, D.picker);
2751
+ let e = g(O.button, O.picker);
2331
2752
  return /* @__PURE__ */ d("button", {
2332
2753
  ...e,
2333
2754
  "aria-label": "Date",
2334
- className: k(e.className, t),
2755
+ className: A(e.className, t),
2335
2756
  onClick: () => {
2336
2757
  o(n.initial_date ?? "");
2337
2758
  },
2338
2759
  type: "button",
2339
2760
  children: [
2340
2761
  /* @__PURE__ */ u("span", {
2341
- ...g(D.pickerIcon),
2762
+ ...g(O.pickerIcon),
2342
2763
  "aria-hidden": "true",
2343
- children: "▦"
2764
+ children: /* @__PURE__ */ u(C, { size: 16 })
2344
2765
  }),
2345
- nt(n.initial_date),
2766
+ wt(n.initial_date),
2346
2767
  /* @__PURE__ */ u("span", {
2347
- ...g(D.pickerChevron),
2768
+ ...g(O.pickerChevron),
2348
2769
  "aria-hidden": "true",
2349
- children: "⌄"
2770
+ children: /* @__PURE__ */ u(ee, { size: 16 })
2350
2771
  })
2351
2772
  ]
2352
2773
  });
2353
2774
  }
2354
2775
  case "datetimepicker": return /* @__PURE__ */ u("input", {
2355
2776
  ...a,
2356
- className: k(a.className, t),
2357
- defaultValue: rt(n.initial_date_time),
2777
+ className: A(a.className, t),
2778
+ defaultValue: Tt(n.initial_date_time),
2358
2779
  onChange: s,
2359
2780
  type: "datetime-local"
2360
2781
  });
2361
2782
  case "timepicker": return /* @__PURE__ */ u("input", {
2362
2783
  ...a,
2363
- className: k(a.className, t),
2784
+ className: A(a.className, t),
2364
2785
  defaultValue: n.initial_time,
2365
2786
  onChange: s,
2366
2787
  type: "time"
@@ -2368,7 +2789,7 @@ function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2368
2789
  case "file_input": return /* @__PURE__ */ u("input", {
2369
2790
  ...a,
2370
2791
  accept: n.filetypes?.map((e) => `.${e}`).join(","),
2371
- className: k(a.className, t),
2792
+ className: A(a.className, t),
2372
2793
  multiple: (n.max_files ?? 10) > 1,
2373
2794
  onChange: (e) => {
2374
2795
  o(e.currentTarget.files?.[0]?.name ?? "");
@@ -2377,14 +2798,14 @@ function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2377
2798
  });
2378
2799
  case "rich_text_input": return /* @__PURE__ */ u("div", {
2379
2800
  ...a,
2380
- className: k(a.className, t),
2801
+ className: A(a.className, t),
2381
2802
  contentEditable: !0,
2382
2803
  onInput: (e) => {
2383
2804
  o(e.currentTarget.textContent ?? "");
2384
2805
  },
2385
2806
  role: "textbox",
2386
2807
  suppressContentEditableWarning: !0,
2387
- children: n.initial_value === void 0 ? null : /* @__PURE__ */ u(M, {
2808
+ children: n.initial_value === void 0 ? null : /* @__PURE__ */ u(N, {
2388
2809
  block: n.initial_value,
2389
2810
  path: `${r}.initial_value`
2390
2811
  })
@@ -2392,28 +2813,28 @@ function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2392
2813
  }
2393
2814
  return _(n);
2394
2815
  }
2395
- function at({ blockId: e, className: t, element: n, path: r = "element" }) {
2396
- if (!Oe(n)) return /* @__PURE__ */ u(N, {
2816
+ function Dt({ blockId: e, className: t, element: n, path: r = "element" }) {
2817
+ if (!Xe(n)) return /* @__PURE__ */ u(P, {
2397
2818
  className: t,
2398
2819
  element: n
2399
2820
  });
2400
- if (n.type === "image") return /* @__PURE__ */ u(P, {
2821
+ if (n.type === "image") return /* @__PURE__ */ u(F, {
2401
2822
  className: t,
2402
2823
  element: n
2403
2824
  });
2404
2825
  switch (n.type) {
2405
- case "button": return /* @__PURE__ */ u(Ve, {
2826
+ case "button": return /* @__PURE__ */ u(lt, {
2406
2827
  blockId: e,
2407
2828
  className: t,
2408
2829
  element: n
2409
2830
  });
2410
2831
  case "checkboxes":
2411
- case "radio_buttons": return /* @__PURE__ */ u(Ge, {
2832
+ case "radio_buttons": return /* @__PURE__ */ u(pt, {
2412
2833
  blockId: e,
2413
2834
  className: t,
2414
2835
  element: n
2415
2836
  });
2416
- case "overflow": return /* @__PURE__ */ u(He, {
2837
+ case "overflow": return /* @__PURE__ */ u(ut, {
2417
2838
  blockId: e,
2418
2839
  className: t,
2419
2840
  element: n
@@ -2427,7 +2848,7 @@ function at({ blockId: e, className: t, element: n, path: r = "element" }) {
2427
2848
  case "multi_static_select":
2428
2849
  case "multi_users_select":
2429
2850
  case "static_select":
2430
- case "users_select": return /* @__PURE__ */ u($e, {
2851
+ case "users_select": return /* @__PURE__ */ u(xt, {
2431
2852
  blockId: e,
2432
2853
  className: t,
2433
2854
  element: n
@@ -2440,21 +2861,21 @@ function at({ blockId: e, className: t, element: n, path: r = "element" }) {
2440
2861
  case "plain_text_input":
2441
2862
  case "rich_text_input":
2442
2863
  case "timepicker":
2443
- case "url_text_input": return /* @__PURE__ */ u(it, {
2864
+ case "url_text_input": return /* @__PURE__ */ u(Et, {
2444
2865
  blockId: e,
2445
2866
  className: t,
2446
2867
  element: n,
2447
2868
  path: r
2448
2869
  });
2449
2870
  case "workflow_button": {
2450
- if (!Fe(n)) return /* @__PURE__ */ u(N, {
2871
+ if (!rt(n)) return /* @__PURE__ */ u(P, {
2451
2872
  className: t,
2452
2873
  element: n
2453
2874
  });
2454
- let e = g(D.button);
2875
+ let e = g(O.button);
2455
2876
  return /* @__PURE__ */ u("button", {
2456
2877
  ...e,
2457
- className: k(e.className, t),
2878
+ className: A(e.className, t),
2458
2879
  type: "button",
2459
2880
  children: n.text.text
2460
2881
  });
@@ -2464,19 +2885,19 @@ function at({ blockId: e, className: t, element: n, path: r = "element" }) {
2464
2885
  }
2465
2886
  //#endregion
2466
2887
  //#region src/text/Mrkdwn.tsx
2467
- var ot = /* @__PURE__ */ new Set([
2888
+ var Ot = /* @__PURE__ */ new Set([
2468
2889
  "*",
2469
2890
  "_",
2470
2891
  "~",
2471
2892
  "`",
2472
2893
  "<",
2473
2894
  ":"
2474
- ]), st = /^[a-z0-9_+-]{1,64}$/, ct = /[A-Za-z0-9]/;
2475
- function lt(e) {
2895
+ ]), kt = /^[a-z0-9_+-]{1,64}$/, At = /[A-Za-z0-9]/;
2896
+ function jt(e) {
2476
2897
  return e.replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&amp;", "&");
2477
2898
  }
2478
- function ut(e) {
2479
- let t = lt(e);
2899
+ function Mt(e) {
2900
+ let t = jt(e);
2480
2901
  if (t.startsWith("@")) {
2481
2902
  let [e = "", n] = t.slice(1).split("|", 2);
2482
2903
  return {
@@ -2530,14 +2951,14 @@ function ut(e) {
2530
2951
  label: t
2531
2952
  };
2532
2953
  }
2533
- function dt(e, t) {
2534
- for (let n = t; n < e.length; n += 1) if (ot.has(e[n] ?? "")) return n;
2954
+ function Nt(e, t) {
2955
+ for (let n = t; n < e.length; n += 1) if (Ot.has(e[n] ?? "")) return n;
2535
2956
  return e.length;
2536
2957
  }
2537
- function ft(e, t) {
2958
+ function Pt(e, t) {
2538
2959
  if (t > 16) return [{
2539
2960
  kind: "text",
2540
- value: lt(e)
2961
+ value: jt(e)
2541
2962
  }];
2542
2963
  let n = [], r = 0;
2543
2964
  for (; r < e.length;) {
@@ -2546,7 +2967,7 @@ function ft(e, t) {
2546
2967
  if (t >= 0) {
2547
2968
  n.push({
2548
2969
  kind: "code_block",
2549
- value: lt(e.slice(r + 3, t))
2970
+ value: jt(e.slice(r + 3, t))
2550
2971
  }), r = t + 3;
2551
2972
  continue;
2552
2973
  }
@@ -2557,7 +2978,7 @@ function ft(e, t) {
2557
2978
  if (t > r + 1) {
2558
2979
  n.push({
2559
2980
  kind: "code",
2560
- value: lt(e.slice(r + 1, t))
2981
+ value: jt(e.slice(r + 1, t))
2561
2982
  }), r = t + 1;
2562
2983
  continue;
2563
2984
  }
@@ -2567,7 +2988,7 @@ function ft(e, t) {
2567
2988
  if (a > r + 1) {
2568
2989
  let o = i === "*" ? "bold" : i === "_" ? "italic" : "strike";
2569
2990
  n.push({
2570
- children: ft(e.slice(r + 1, a), t + 1),
2991
+ children: Pt(e.slice(r + 1, a), t + 1),
2571
2992
  kind: o
2572
2993
  }), r = a + 1;
2573
2994
  continue;
@@ -2576,7 +2997,7 @@ function ft(e, t) {
2576
2997
  if (i === "<") {
2577
2998
  let t = e.indexOf(">", r + 1);
2578
2999
  if (t >= 0) {
2579
- let i = ut(e.slice(r + 1, t));
3000
+ let i = Mt(e.slice(r + 1, t));
2580
3001
  if (i !== void 0) {
2581
3002
  n.push(i), r = t + 1;
2582
3003
  continue;
@@ -2584,8 +3005,8 @@ function ft(e, t) {
2584
3005
  }
2585
3006
  }
2586
3007
  if (i === ":") {
2587
- let t = e.indexOf(":", r + 1), i = t < 0 ? "" : e.slice(r + 1, t), a = r === 0 || !ct.test(e[r - 1] ?? ""), o = t < 0 || t + 1 >= e.length || !ct.test(e[t + 1] ?? "");
2588
- if (t > r + 1 && a && o && st.test(i)) {
3008
+ let t = e.indexOf(":", r + 1), i = t < 0 ? "" : e.slice(r + 1, t), a = r === 0 || !At.test(e[r - 1] ?? ""), o = t < 0 || t + 1 >= e.length || !At.test(e[t + 1] ?? "");
3009
+ if (t > r + 1 && a && o && kt.test(i)) {
2589
3010
  n.push({
2590
3011
  kind: "emoji",
2591
3012
  name: i
@@ -2593,79 +3014,79 @@ function ft(e, t) {
2593
3014
  continue;
2594
3015
  }
2595
3016
  }
2596
- let a = dt(e, r + 1);
3017
+ let a = Nt(e, r + 1);
2597
3018
  n.push({
2598
3019
  kind: "text",
2599
- value: lt(e.slice(r, a))
3020
+ value: jt(e.slice(r, a))
2600
3021
  }), r = a;
2601
3022
  }
2602
3023
  return n;
2603
3024
  }
2604
- function pt(e) {
2605
- return ft(e, 0);
3025
+ function Ft(e) {
3026
+ return Pt(e, 0);
2606
3027
  }
2607
- function mt({ token: e }) {
3028
+ function It({ token: e }) {
2608
3029
  let { resolvers: t } = x();
2609
3030
  switch (e.kind) {
2610
3031
  case "text": return e.value;
2611
3032
  case "bold": return /* @__PURE__ */ u("strong", {
2612
- ...g(D.bold),
2613
- children: e.children.map((e, t) => /* @__PURE__ */ u(mt, { token: e }, `${e.kind}-${String(t)}`))
3033
+ ...g(O.bold),
3034
+ children: e.children.map((e, t) => /* @__PURE__ */ u(It, { token: e }, `${e.kind}-${String(t)}`))
2614
3035
  });
2615
3036
  case "italic": return /* @__PURE__ */ u("em", {
2616
- ...g(D.italic),
2617
- children: e.children.map((e, t) => /* @__PURE__ */ u(mt, { token: e }, `${e.kind}-${String(t)}`))
3037
+ ...g(O.italic),
3038
+ children: e.children.map((e, t) => /* @__PURE__ */ u(It, { token: e }, `${e.kind}-${String(t)}`))
2618
3039
  });
2619
3040
  case "strike": return /* @__PURE__ */ u("s", {
2620
- ...g(D.strike),
2621
- children: e.children.map((e, t) => /* @__PURE__ */ u(mt, { token: e }, `${e.kind}-${String(t)}`))
3041
+ ...g(O.strike),
3042
+ children: e.children.map((e, t) => /* @__PURE__ */ u(It, { token: e }, `${e.kind}-${String(t)}`))
2622
3043
  });
2623
3044
  case "code": return /* @__PURE__ */ u("code", {
2624
- ...g(D.inlineCode),
3045
+ ...g(O.inlineCode),
2625
3046
  children: e.value
2626
3047
  });
2627
3048
  case "code_block": return /* @__PURE__ */ u("pre", {
2628
- ...g(D.pre),
3049
+ ...g(O.pre),
2629
3050
  children: e.value
2630
3051
  });
2631
3052
  case "emoji": return /* @__PURE__ */ u("span", {
2632
3053
  "aria-label": `:${e.name}:`,
2633
3054
  role: "img",
2634
- children: t.emoji?.(e.name) ?? me(e.name) ?? `:${e.name}:`
3055
+ children: t.emoji?.(e.name) ?? Ie(e.name) ?? `:${e.name}:`
2635
3056
  });
2636
3057
  case "link": {
2637
- let t = E(e.href);
3058
+ let t = D(e.href);
2638
3059
  return t === void 0 ? e.label : /* @__PURE__ */ u("a", {
2639
- ...g(D.link),
3060
+ ...g(O.link),
2640
3061
  href: t,
2641
3062
  rel: "noreferrer",
2642
3063
  children: e.label
2643
3064
  });
2644
3065
  }
2645
3066
  case "user": return /* @__PURE__ */ d("span", {
2646
- ...g(D.mention),
3067
+ ...g(O.mention),
2647
3068
  children: ["@", t.user?.(e.id) ?? e.fallback ?? e.id]
2648
3069
  });
2649
3070
  case "channel": return /* @__PURE__ */ d("span", {
2650
- ...g(D.mention),
3071
+ ...g(O.mention),
2651
3072
  children: ["#", t.channel?.(e.id) ?? e.fallback ?? e.id]
2652
3073
  });
2653
3074
  case "usergroup": return /* @__PURE__ */ d("span", {
2654
- ...g(D.mention),
3075
+ ...g(O.mention),
2655
3076
  children: ["@", t.usergroup?.(e.id) ?? e.fallback ?? e.id]
2656
3077
  });
2657
3078
  case "team": return /* @__PURE__ */ d("span", {
2658
- ...g(D.mention),
3079
+ ...g(O.mention),
2659
3080
  children: ["@", t.team?.(e.id) ?? e.id]
2660
3081
  });
2661
3082
  case "broadcast": return /* @__PURE__ */ d("span", {
2662
- ...g(D.mention),
3083
+ ...g(O.mention),
2663
3084
  children: ["@", e.range]
2664
3085
  });
2665
3086
  case "date": {
2666
- let n = Number(e.id), r = Number.isFinite(n) ? t.date?.(n, e.format ?? "") ?? de(n, e.format ?? "", e.fallback) : e.fallback ?? e.id, i = E(e.href);
3087
+ let n = Number(e.id), r = Number.isFinite(n) ? t.date?.(n, e.format ?? "") ?? Ne(n, e.format ?? "", e.fallback) : e.fallback ?? e.id, i = D(e.href);
2667
3088
  return i === void 0 ? r : /* @__PURE__ */ u("a", {
2668
- ...g(D.link),
3089
+ ...g(O.link),
2669
3090
  href: i,
2670
3091
  rel: "noreferrer",
2671
3092
  children: r
@@ -2674,43 +3095,45 @@ function mt({ token: e }) {
2674
3095
  }
2675
3096
  return _(e);
2676
3097
  }
2677
- function F({ className: e, text: t }) {
2678
- let n = g(D.text);
2679
- return /* @__PURE__ */ u("div", {
2680
- ...n,
2681
- className: k(n.className, e),
2682
- children: pt(t).map((e, t) => /* @__PURE__ */ u(mt, { token: e }, `${e.kind}-${String(t)}`))
3098
+ function I({ className: e, inline: t = !1, text: n }) {
3099
+ let r = g(O.text), i = {
3100
+ ...r,
3101
+ className: A(r.className, e)
3102
+ }, a = Ft(n).map((e, t) => /* @__PURE__ */ u(It, { token: e }, `${e.kind}-${String(t)}`));
3103
+ return u(t ? "span" : "div", {
3104
+ ...i,
3105
+ children: a
2683
3106
  });
2684
3107
  }
2685
3108
  //#endregion
2686
3109
  //#region src/text/Text.tsx
2687
- function I({ className: e, text: t }) {
2688
- let n = t, r = S(n) && typeof n.text == "string" ? n.text : T(n, "text");
2689
- if (C(n) === "mrkdwn") return /* @__PURE__ */ u(F, {
3110
+ function L({ className: e, text: t }) {
3111
+ let n = t, r = w(n) && typeof n.text == "string" ? n.text : E(n, "text");
3112
+ if (T(n) === "mrkdwn") return /* @__PURE__ */ u(I, {
2690
3113
  className: e,
2691
3114
  text: r
2692
3115
  });
2693
- let i = g(D.text);
3116
+ let i = g(O.text);
2694
3117
  return /* @__PURE__ */ u("div", {
2695
3118
  ...i,
2696
- className: k(i.className, e),
3119
+ className: A(i.className, e),
2697
3120
  children: r
2698
3121
  });
2699
3122
  }
2700
3123
  //#endregion
2701
3124
  //#region src/text/Markdown.tsx
2702
- function ht(e) {
3125
+ function Lt(e) {
2703
3126
  let t = e.trim();
2704
3127
  return t === "---" || t === "***" || t === "___";
2705
3128
  }
2706
- function gt(e) {
3129
+ function Rt(e) {
2707
3130
  let t = e.trim().replace(/^\|/, "").replace(/\|$/, "").split("|");
2708
3131
  return t.length > 0 && t.every((e) => /^:?-{3,}:?$/.test(e.trim()));
2709
3132
  }
2710
- function _t(e) {
3133
+ function zt(e) {
2711
3134
  return e.trim().replace(/^\|/, "").replace(/\|$/, "").split("|").map((e) => e.trim());
2712
3135
  }
2713
- function vt(e) {
3136
+ function Bt(e) {
2714
3137
  let t = /^\s*[-*+]\s+\[([ xX])\]\s+(.+)$/.exec(e);
2715
3138
  if (t !== null) return {
2716
3139
  checked: (t[1] ?? "").toLowerCase() === "x",
@@ -2731,7 +3154,7 @@ function vt(e) {
2731
3154
  text: r[1] ?? ""
2732
3155
  };
2733
3156
  }
2734
- function yt(e) {
3157
+ function Vt(e) {
2735
3158
  let t = e.split("\n"), n = [], r = 0;
2736
3159
  for (; r < t.length;) {
2737
3160
  let e = t[r] ?? "";
@@ -2749,9 +3172,9 @@ function yt(e) {
2749
3172
  });
2750
3173
  continue;
2751
3174
  }
2752
- if (e.includes("|") && r + 1 < t.length && gt(t[r + 1] ?? "")) {
2753
- let i = _t(e), a = [];
2754
- for (r += 2; r < t.length && (t[r] ?? "").includes("|");) a.push(_t(t[r] ?? "")), r += 1;
3175
+ if (e.includes("|") && r + 1 < t.length && Rt(t[r + 1] ?? "")) {
3176
+ let i = zt(e), a = [];
3177
+ for (r += 2; r < t.length && (t[r] ?? "").includes("|");) a.push(zt(t[r] ?? "")), r += 1;
2755
3178
  n.push({
2756
3179
  headers: i,
2757
3180
  kind: "table",
@@ -2759,7 +3182,7 @@ function yt(e) {
2759
3182
  });
2760
3183
  continue;
2761
3184
  }
2762
- if (ht(e)) {
3185
+ if (Lt(e)) {
2763
3186
  n.push({ kind: "divider" }), r += 1;
2764
3187
  continue;
2765
3188
  }
@@ -2772,11 +3195,11 @@ function yt(e) {
2772
3195
  }), r += 1;
2773
3196
  continue;
2774
3197
  }
2775
- let a = vt(e);
3198
+ let a = Bt(e);
2776
3199
  if (a !== void 0) {
2777
3200
  let e = [a];
2778
3201
  for (r += 1; r < t.length;) {
2779
- let n = vt(t[r] ?? "");
3202
+ let n = Bt(t[r] ?? "");
2780
3203
  if (n === void 0 || n.ordered !== a.ordered) break;
2781
3204
  e.push(n), r += 1;
2782
3205
  }
@@ -2799,7 +3222,7 @@ function yt(e) {
2799
3222
  let o = [e];
2800
3223
  for (r += 1; r < t.length && (t[r] ?? "").trim().length > 0;) {
2801
3224
  let e = t[r] ?? "";
2802
- if (e.trimStart().startsWith("```") || ht(e) || /^(#{1,6})\s+/.test(e) || vt(e) !== void 0 || e.trimStart().startsWith(">")) break;
3225
+ if (e.trimStart().startsWith("```") || Lt(e) || /^(#{1,6})\s+/.test(e) || Bt(e) !== void 0 || e.trimStart().startsWith(">")) break;
2803
3226
  o.push(e), r += 1;
2804
3227
  }
2805
3228
  n.push({
@@ -2809,116 +3232,122 @@ function yt(e) {
2809
3232
  }
2810
3233
  return n;
2811
3234
  }
2812
- function L(e) {
3235
+ function Ht(e) {
2813
3236
  return e.replace(/\[([^\]]+)\]\((https?:\/\/[^)\s]+)\)/g, "<$2|$1>").replaceAll("**", "*").replaceAll("__", "*").replaceAll("~~", "~");
2814
3237
  }
2815
- function bt(e) {
2816
- return e <= 1 ? D.heading1 : e === 2 ? D.heading2 : e === 3 ? D.heading3 : D.heading4;
3238
+ function Ut(e) {
3239
+ return e <= 1 ? O.heading1 : e === 2 ? O.heading2 : e === 3 ? O.heading3 : O.heading4;
2817
3240
  }
2818
- function xt({ token: e }) {
3241
+ function Wt({ token: e }) {
2819
3242
  switch (e.kind) {
2820
- case "paragraph": return /* @__PURE__ */ u(F, { text: L(e.text) });
3243
+ case "paragraph": return /* @__PURE__ */ u(I, { text: Ht(e.text) });
2821
3244
  case "quote": return /* @__PURE__ */ u("blockquote", {
2822
- ...g(D.quote),
2823
- children: /* @__PURE__ */ u(F, { text: L(e.text) })
3245
+ ...g(O.quote),
3246
+ children: /* @__PURE__ */ u(I, { text: Ht(e.text) })
2824
3247
  });
2825
3248
  case "heading": return /* @__PURE__ */ u("div", {
2826
- ...g(D.heading, bt(e.level)),
2827
- children: /* @__PURE__ */ u(F, { text: L(e.text) })
3249
+ ...g(O.heading, Ut(e.level)),
3250
+ children: /* @__PURE__ */ u(I, { text: Ht(e.text) })
2828
3251
  });
2829
- case "divider": return /* @__PURE__ */ u("hr", { ...g(D.divider) });
3252
+ case "divider": return /* @__PURE__ */ u("hr", { ...g(O.divider) });
2830
3253
  case "code": return /* @__PURE__ */ u("pre", {
2831
- ...g(D.pre),
3254
+ ...g(O.pre),
2832
3255
  "data-language": e.language,
2833
3256
  children: e.text
2834
3257
  });
2835
3258
  case "list": {
2836
- let n = e.ordered ? D.listItemOrdered : [D.listItemBullet, D.listBullet], r = e.items.map((e, r) => /* @__PURE__ */ t("li", {
2837
- ...g(n),
2838
- key: `${e.text}-${String(r)}`
2839
- }, e.task ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("input", {
2840
- checked: e.checked,
2841
- disabled: !0,
2842
- readOnly: !0,
2843
- type: "checkbox"
2844
- }), " "] }) : null, /* @__PURE__ */ u(F, { text: L(e.text) })));
3259
+ let n = e.items.map((n, r) => /* @__PURE__ */ t("li", {
3260
+ ...g(e.ordered ? O.listItemOrdered : n.task ? O.listItemTask : [O.listItemBullet, O.listBullet]),
3261
+ key: `${n.text}-${String(r)}`
3262
+ }, n.task ? /* @__PURE__ */ u("span", {
3263
+ ...g(O.listTaskCheckbox),
3264
+ children: /* @__PURE__ */ u("input", {
3265
+ checked: n.checked,
3266
+ disabled: !0,
3267
+ readOnly: !0,
3268
+ type: "checkbox"
3269
+ })
3270
+ }) : null, /* @__PURE__ */ u(I, {
3271
+ inline: !0,
3272
+ text: Ht(n.text)
3273
+ })));
2845
3274
  return e.ordered ? /* @__PURE__ */ u("ol", {
2846
- ...g(D.list, D.listOrdered),
2847
- children: r
3275
+ ...g(O.list, O.listOrdered),
3276
+ children: n
2848
3277
  }) : /* @__PURE__ */ u("ul", {
2849
- ...g(D.list),
2850
- children: r
3278
+ ...g(O.list),
3279
+ children: n
2851
3280
  });
2852
3281
  }
2853
3282
  case "table": return /* @__PURE__ */ u("div", {
2854
- ...g(D.tableScroller),
3283
+ ...g(O.tableScroller),
2855
3284
  children: /* @__PURE__ */ d("table", {
2856
- ...g(D.table),
3285
+ ...g(O.table),
2857
3286
  children: [/* @__PURE__ */ u("thead", { children: /* @__PURE__ */ u("tr", { children: e.headers.map((e, n) => /* @__PURE__ */ t("th", {
2858
- ...g(D.tableCell, D.tableHeader, n === 0 && D.tableCellFirstColumn),
3287
+ ...g(O.tableCell, O.tableHeader, n === 0 && O.tableCellFirstColumn),
2859
3288
  key: `${e}-${String(n)}`,
2860
3289
  scope: "col"
2861
- }, /* @__PURE__ */ u(F, { text: L(e) }))) }) }), /* @__PURE__ */ u("tbody", { children: e.rows.map((e, n) => /* @__PURE__ */ u("tr", { children: e.map((e, n) => /* @__PURE__ */ t("td", {
2862
- ...g(D.tableCell, n === 0 && D.tableCellFirstColumn),
3290
+ }, /* @__PURE__ */ u(I, { text: Ht(e) }))) }) }), /* @__PURE__ */ u("tbody", { children: e.rows.map((e, n) => /* @__PURE__ */ u("tr", { children: e.map((e, n) => /* @__PURE__ */ t("td", {
3291
+ ...g(O.tableCell, n === 0 && O.tableCellFirstColumn),
2863
3292
  key: `${e}-${String(n)}`
2864
- }, /* @__PURE__ */ u(F, { text: L(e) }))) }, `row-${String(n)}`)) })]
3293
+ }, /* @__PURE__ */ u(I, { text: Ht(e) }))) }, `row-${String(n)}`)) })]
2865
3294
  })
2866
3295
  });
2867
3296
  }
2868
3297
  return _(e);
2869
3298
  }
2870
- function St({ markdown: e }) {
3299
+ function Gt({ markdown: e }) {
2871
3300
  return /* @__PURE__ */ u("div", {
2872
- ...g(D.markdown),
2873
- children: yt(e).map((e, t) => /* @__PURE__ */ u(xt, { token: e }, `${e.kind}-${String(t)}`))
3301
+ ...g(O.markdown),
3302
+ children: Vt(e).map((e, t) => /* @__PURE__ */ u(Wt, { token: e }, `${e.kind}-${String(t)}`))
2874
3303
  });
2875
3304
  }
2876
3305
  //#endregion
2877
3306
  //#region src/blocks/BasicBlocks.tsx
2878
- function Ct(e) {
2879
- return S(e) && e.type === "image";
3307
+ function Kt(e) {
3308
+ return w(e) && e.type === "image";
2880
3309
  }
2881
3310
  function R({ blockId: e, blockType: t, children: n, className: r }) {
2882
- let i = g(D.block);
3311
+ let i = g(O.block);
2883
3312
  return /* @__PURE__ */ u("div", {
2884
3313
  ...i,
2885
- className: k(i.className, r),
3314
+ className: A(i.className, r),
2886
3315
  "data-block-id": e,
2887
3316
  "data-block-type": t,
2888
3317
  children: n
2889
3318
  });
2890
3319
  }
2891
- function wt({ block: e, className: t, path: n = "block" }) {
3320
+ function qt({ block: e, className: t, path: n = "block" }) {
2892
3321
  let r = e.accessory, i = Array.isArray(e.fields) ? e.fields : void 0;
2893
3322
  return /* @__PURE__ */ u(R, {
2894
3323
  blockId: e.block_id,
2895
3324
  blockType: e.type,
2896
3325
  className: t,
2897
3326
  children: /* @__PURE__ */ d("div", {
2898
- ...g(D.section),
3327
+ ...g(O.section),
2899
3328
  children: [/* @__PURE__ */ d("div", {
2900
- ...g(D.sectionContent),
2901
- children: [e.text === void 0 ? null : /* @__PURE__ */ u(I, { text: e.text }), i === void 0 ? null : /* @__PURE__ */ u("div", {
2902
- ...g(D.fields),
2903
- children: i.map((e, t) => /* @__PURE__ */ u(I, { text: e }, `${C(e) ?? "unknown"}-${String(t)}`))
3329
+ ...g(O.sectionContent),
3330
+ children: [e.text === void 0 ? null : /* @__PURE__ */ u(L, { text: e.text }), i === void 0 ? null : /* @__PURE__ */ u("div", {
3331
+ ...g(O.fields),
3332
+ children: i.map((e, t) => /* @__PURE__ */ u(L, { text: e }, `${T(e) ?? "unknown"}-${String(t)}`))
2904
3333
  })]
2905
- }), r === void 0 ? null : Ct(r) ? /* @__PURE__ */ u("div", {
2906
- ...g(D.accessory),
2907
- children: /* @__PURE__ */ u(P, {
3334
+ }), r === void 0 ? null : Kt(r) ? /* @__PURE__ */ u("div", {
3335
+ ...g(O.accessory),
3336
+ children: /* @__PURE__ */ u(F, {
2908
3337
  element: r,
2909
3338
  variant: "accessory"
2910
3339
  })
2911
- }) : /* @__PURE__ */ u(at, {
3340
+ }) : /* @__PURE__ */ u(Dt, {
2912
3341
  blockId: e.block_id,
2913
- className: g(D.accessory).className,
3342
+ className: g(O.accessory).className,
2914
3343
  element: e.accessory,
2915
3344
  path: `${n}.accessory`
2916
3345
  })]
2917
3346
  })
2918
3347
  });
2919
3348
  }
2920
- function Tt({ block: e, className: t }) {
2921
- let n = e.level === void 0 ? void 0 : Math.trunc(e.level), r = n === void 0 || Number.isNaN(n) ? void 0 : Math.min(4, Math.max(1, n)), i = e.text, a = S(i) && typeof i.text == "string" ? i.text : T(e, "header"), o = g(D.heading, r === 1 && D.heading1, (r === void 0 || r === 2) && D.heading2, r === 3 && D.heading3, r === 4 && D.heading4), s = u(r === 1 ? "h1" : r === 3 ? "h3" : r === 4 ? "h4" : "h2", {
3349
+ function Jt({ block: e, className: t }) {
3350
+ let n = e.level === void 0 ? void 0 : Math.trunc(e.level), r = n === void 0 || Number.isNaN(n) ? void 0 : Math.min(4, Math.max(1, n)), i = e.text, a = w(i) && typeof i.text == "string" ? i.text : E(e, "header"), o = g(O.heading, r === 1 && O.heading1, (r === void 0 || r === 2) && O.heading2, r === 3 && O.heading3, r === 4 && O.heading4), s = u(r === 1 ? "h1" : r === 3 ? "h3" : r === 4 ? "h4" : "h2", {
2922
3351
  ...o,
2923
3352
  children: a
2924
3353
  });
@@ -2929,106 +3358,114 @@ function Tt({ block: e, className: t }) {
2929
3358
  children: s
2930
3359
  });
2931
3360
  }
2932
- function Et({ block: e, className: t }) {
3361
+ function Yt({ block: e, className: t }) {
2933
3362
  return /* @__PURE__ */ u(R, {
2934
3363
  blockId: e.block_id,
2935
3364
  blockType: e.type,
2936
3365
  className: t,
2937
- children: /* @__PURE__ */ u("hr", { ...g(D.divider) })
3366
+ children: /* @__PURE__ */ u("hr", { ...g(O.divider) })
2938
3367
  });
2939
3368
  }
2940
- function Dt({ block: e, className: t }) {
3369
+ function Xt({ block: e, className: t }) {
2941
3370
  return /* @__PURE__ */ d(R, {
2942
3371
  blockId: e.block_id,
2943
3372
  blockType: e.type,
2944
3373
  className: t,
2945
- children: [/* @__PURE__ */ u(P, { element: e }), e.title === void 0 ? null : /* @__PURE__ */ u(I, {
2946
- className: g(D.smallText).className,
3374
+ children: [/* @__PURE__ */ u(F, { element: e }), e.title === void 0 ? null : /* @__PURE__ */ u(L, {
3375
+ className: g(O.smallText).className,
2947
3376
  text: e.title
2948
3377
  })]
2949
3378
  });
2950
3379
  }
2951
- function Ot(e) {
2952
- return S(e) && (e.type === "mrkdwn" || e.type === "plain_text") && typeof e.text == "string";
3380
+ function Zt(e) {
3381
+ return w(e) && (e.type === "mrkdwn" || e.type === "plain_text") && typeof e.text == "string";
2953
3382
  }
2954
- function kt({ block: e, className: n }) {
3383
+ function Qt({ block: e, className: n }) {
2955
3384
  let r = e.elements;
2956
3385
  return /* @__PURE__ */ u(R, {
2957
3386
  blockId: e.block_id,
2958
3387
  blockType: e.type,
2959
3388
  className: n,
2960
3389
  children: /* @__PURE__ */ u("div", {
2961
- ...g(D.context),
2962
- children: Array.isArray(r) ? r.map((e, n) => Ct(e) ? /* @__PURE__ */ u(P, {
3390
+ ...g(O.context),
3391
+ children: Array.isArray(r) ? r.map((e, n) => Kt(e) ? /* @__PURE__ */ u(F, {
2963
3392
  element: e,
2964
3393
  variant: "context"
2965
- }, `${e.type}-${String(n)}`) : Ot(e) ? /* @__PURE__ */ t("div", {
2966
- ...g(D.contextElement),
3394
+ }, `${e.type}-${String(n)}`) : Zt(e) ? /* @__PURE__ */ t("div", {
3395
+ ...g(O.contextElement),
2967
3396
  key: `${e.type}-${String(n)}`
2968
- }, /* @__PURE__ */ u(I, {
2969
- className: g(D.contextText).className,
3397
+ }, /* @__PURE__ */ u(L, {
3398
+ className: g(O.contextText).className,
2970
3399
  text: e
2971
3400
  })) : /* @__PURE__ */ t("span", {
2972
- ...g(D.unhandled),
2973
- "data-unhandled-element": C(e) ?? "unknown",
3401
+ ...g(O.unhandled),
3402
+ "data-unhandled-element": T(e) ?? "unknown",
2974
3403
  key: `unhandled-${String(n)}`
2975
- }, T(e, "context element"))) : /* @__PURE__ */ u("span", {
2976
- ...g(D.unhandled),
3404
+ }, E(e, "context element"))) : /* @__PURE__ */ u("span", {
3405
+ ...g(O.unhandled),
2977
3406
  "data-unhandled-element": "context",
2978
- children: T(e, "context block")
3407
+ children: E(e, "context block")
2979
3408
  })
2980
3409
  })
2981
3410
  });
2982
3411
  }
2983
- function At({ block: e, className: t, path: n = "block" }) {
3412
+ function $t({ block: e, className: t, path: n = "block" }) {
2984
3413
  return /* @__PURE__ */ u(R, {
2985
3414
  blockId: e.block_id,
2986
3415
  blockType: e.type,
2987
3416
  className: t,
2988
- children: /* @__PURE__ */ u(M, {
3417
+ children: /* @__PURE__ */ u(N, {
2989
3418
  block: e,
2990
3419
  path: n
2991
3420
  })
2992
3421
  });
2993
3422
  }
2994
- function jt({ block: e, className: t }) {
2995
- let n = typeof e.text == "string" ? e.text : T(e, "markdown block");
3423
+ function en({ block: e, className: t }) {
3424
+ let n = typeof e.text == "string" ? e.text : E(e, "markdown block");
2996
3425
  return /* @__PURE__ */ u(R, {
2997
3426
  blockId: e.block_id,
2998
3427
  blockType: e.type,
2999
3428
  className: t,
3000
- children: /* @__PURE__ */ u(St, { markdown: n })
3429
+ children: /* @__PURE__ */ u(Gt, { markdown: n })
3001
3430
  });
3002
3431
  }
3003
- function Mt({ block: e, className: t }) {
3432
+ function tn({ block: e, className: t }) {
3004
3433
  return /* @__PURE__ */ u(R, {
3005
3434
  blockId: e.block_id,
3006
3435
  blockType: e.type,
3007
3436
  className: t,
3008
3437
  children: /* @__PURE__ */ d("div", {
3009
- ...g(D.file),
3438
+ ...g(O.file),
3010
3439
  children: [/* @__PURE__ */ u("span", {
3440
+ ...g(O.iconSlot),
3011
3441
  "aria-hidden": "true",
3012
- children: "📎"
3442
+ children: /* @__PURE__ */ u(fe, { size: 20 })
3013
3443
  }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("strong", { children: "Remote file" }), /* @__PURE__ */ u("div", {
3014
- ...g(D.smallText),
3444
+ ...g(O.smallText),
3015
3445
  children: e.external_id
3016
3446
  })] })]
3017
3447
  })
3018
3448
  });
3019
3449
  }
3020
- function Nt({ block: e, className: t }) {
3021
- let n = E(typeof e.title_url == "string" ? e.title_url : typeof e.video_url == "string" ? e.video_url : void 0), r = e.title, i = S(r) && typeof r.text == "string" ? r.text : T(e, "video"), a = e.description, o = S(a) && typeof a.text == "string" ? a.text : void 0, s = typeof e.alt_text == "string" ? e.alt_text : T(e, "video"), c = typeof e.thumbnail_url == "string" ? e.thumbnail_url : void 0, f = /* @__PURE__ */ d(l, { children: [c === void 0 ? null : /* @__PURE__ */ u("img", {
3022
- ...g(D.image, D.cardHero),
3023
- alt: s,
3024
- src: c
3450
+ function nn({ block: e, className: t }) {
3451
+ let n = D(typeof e.title_url == "string" ? e.title_url : typeof e.video_url == "string" ? e.video_url : void 0), r = e.title, i = w(r) && typeof r.text == "string" ? r.text : E(e, "video"), a = e.description, o = w(a) && typeof a.text == "string" ? a.text : void 0, s = typeof e.alt_text == "string" ? e.alt_text : E(e, "video"), c = typeof e.thumbnail_url == "string" ? e.thumbnail_url : void 0, f = /* @__PURE__ */ d(l, { children: [c === void 0 ? null : /* @__PURE__ */ d("span", {
3452
+ ...g(O.videoThumbnail),
3453
+ children: [/* @__PURE__ */ u("img", {
3454
+ ...g(O.image, O.cardHero),
3455
+ alt: s,
3456
+ src: c
3457
+ }), /* @__PURE__ */ u("span", {
3458
+ ...g(O.videoPlayBadge),
3459
+ "aria-hidden": "true",
3460
+ children: /* @__PURE__ */ u(pe, { size: 20 })
3461
+ })]
3025
3462
  }), /* @__PURE__ */ d("div", {
3026
- ...g(D.cardContent),
3463
+ ...g(O.cardContent),
3027
3464
  children: [
3028
3465
  /* @__PURE__ */ u("strong", { children: i }),
3029
3466
  o,
3030
3467
  typeof e.provider_name == "string" ? /* @__PURE__ */ u("span", {
3031
- ...g(D.smallText),
3468
+ ...g(O.smallText),
3032
3469
  children: e.provider_name
3033
3470
  }) : null
3034
3471
  ]
@@ -3038,11 +3475,11 @@ function Nt({ block: e, className: t }) {
3038
3475
  blockType: e.type,
3039
3476
  className: t,
3040
3477
  children: n === void 0 ? /* @__PURE__ */ u("div", {
3041
- ...g(D.card),
3478
+ ...g(O.card),
3042
3479
  "aria-label": s,
3043
3480
  children: f
3044
3481
  }) : /* @__PURE__ */ u("a", {
3045
- ...g(D.card),
3482
+ ...g(O.card),
3046
3483
  "aria-label": s,
3047
3484
  href: n,
3048
3485
  rel: "noreferrer",
@@ -3052,12 +3489,12 @@ function Nt({ block: e, className: t }) {
3052
3489
  }
3053
3490
  //#endregion
3054
3491
  //#region src/blocks/AdvancedBlocks.tsx
3055
- function Pt({ align: e = "left", cell: t, className: n, firstColumn: r = !1, header: i = !1, path: a = "cell", scope: o = "col", wrapped: s = !1 }) {
3056
- let c = g(D.tableCell, i && D.tableHeader, r && D.tableCellFirstColumn, s && D.tableCellWrapped), l;
3057
- if (!S(t)) l = T(t, "table cell");
3492
+ function rn({ align: e = "left", cell: t, className: n, firstColumn: r = !1, header: i = !1, path: a = "cell", scope: o = "col", wrapped: s = !1 }) {
3493
+ let c = g(O.tableCell, i && O.tableHeader, r && O.tableCellFirstColumn, s && O.tableCellWrapped), l;
3494
+ if (!w(t)) l = E(t, "table cell");
3058
3495
  else switch (t.type) {
3059
3496
  case "rich_text":
3060
- l = /* @__PURE__ */ u(M, {
3497
+ l = /* @__PURE__ */ u(N, {
3061
3498
  block: t,
3062
3499
  path: a
3063
3500
  });
@@ -3068,42 +3505,42 @@ function Pt({ align: e = "left", cell: t, className: n, firstColumn: r = !1, hea
3068
3505
  case "raw_text":
3069
3506
  l = t.text;
3070
3507
  break;
3071
- default: l = T(t, "table cell");
3508
+ default: l = E(t, "table cell");
3072
3509
  }
3073
3510
  return i ? /* @__PURE__ */ u("th", {
3074
3511
  ...c,
3075
- className: k(c.className, n),
3512
+ className: A(c.className, n),
3076
3513
  scope: o,
3077
3514
  style: { textAlign: e },
3078
3515
  children: l
3079
3516
  }) : /* @__PURE__ */ u("td", {
3080
3517
  ...c,
3081
- className: k(c.className, n),
3518
+ className: A(c.className, n),
3082
3519
  style: { textAlign: e },
3083
3520
  children: l
3084
3521
  });
3085
3522
  }
3086
- function Ft(e) {
3523
+ function an(e) {
3087
3524
  return Array.isArray(e);
3088
3525
  }
3089
- function It({ block: e, className: t, path: n = "block" }) {
3090
- let r = Array.isArray(e.rows) ? e.rows.filter(Ft) : [], i = e.column_settings;
3526
+ function on({ block: e, className: t, path: n = "block" }) {
3527
+ let r = Array.isArray(e.rows) ? e.rows.filter(an) : [], i = e.column_settings;
3091
3528
  return /* @__PURE__ */ u(R, {
3092
3529
  blockId: e.block_id,
3093
3530
  blockType: e.type,
3094
3531
  className: t,
3095
3532
  children: /* @__PURE__ */ u("div", {
3096
- ...g(D.tableScroller),
3533
+ ...g(O.tableScroller),
3097
3534
  children: /* @__PURE__ */ d("table", {
3098
- ...g(D.table),
3099
- children: [/* @__PURE__ */ u("thead", { children: /* @__PURE__ */ u("tr", { children: (r[0] ?? []).map((e, t) => /* @__PURE__ */ u(Pt, {
3535
+ ...g(O.table),
3536
+ children: [/* @__PURE__ */ u("thead", { children: /* @__PURE__ */ u("tr", { children: (r[0] ?? []).map((e, t) => /* @__PURE__ */ u(rn, {
3100
3537
  align: i?.[t]?.align,
3101
3538
  cell: e,
3102
3539
  firstColumn: t === 0,
3103
3540
  header: !0,
3104
3541
  path: `${n}.rows[0][${String(t)}]`,
3105
3542
  wrapped: i?.[t]?.is_wrapped
3106
- }, `header-${String(t)}`)) }) }), /* @__PURE__ */ u("tbody", { children: r.slice(1).map((e, t) => /* @__PURE__ */ u("tr", { children: e.map((e, r) => /* @__PURE__ */ u(Pt, {
3543
+ }, `header-${String(t)}`)) }) }), /* @__PURE__ */ u("tbody", { children: r.slice(1).map((e, t) => /* @__PURE__ */ u("tr", { children: e.map((e, r) => /* @__PURE__ */ u(rn, {
3107
3544
  align: i?.[r]?.align,
3108
3545
  cell: e,
3109
3546
  firstColumn: r === 0,
@@ -3114,21 +3551,21 @@ function It({ block: e, className: t, path: n = "block" }) {
3114
3551
  })
3115
3552
  });
3116
3553
  }
3117
- function Lt({ cell: e, path: t }) {
3118
- if (!S(e)) return T(e, "table cell");
3554
+ function sn({ cell: e, path: t }) {
3555
+ if (!w(e)) return E(e, "table cell");
3119
3556
  switch (e.type) {
3120
- case "rich_text": return /* @__PURE__ */ u(M, {
3557
+ case "rich_text": return /* @__PURE__ */ u(N, {
3121
3558
  block: e,
3122
3559
  path: t
3123
3560
  });
3124
3561
  case "raw_number": return e.text ?? String(e.value);
3125
3562
  case "raw_text": return e.text;
3126
- default: return T(e, "table cell");
3563
+ default: return E(e, "table cell");
3127
3564
  }
3128
3565
  }
3129
- function Rt(e) {
3566
+ function cn(e) {
3130
3567
  let t = e;
3131
- if (!S(t)) return "";
3568
+ if (!w(t)) return "";
3132
3569
  if (e.type === "raw_text") {
3133
3570
  let e = t.text;
3134
3571
  return typeof e == "string" ? e : "";
@@ -3145,28 +3582,29 @@ function Rt(e) {
3145
3582
  }
3146
3583
  return "";
3147
3584
  }
3148
- function zt({ block: e, className: n, path: r = "block" }) {
3149
- let i = e.page_size ?? 5, a = Number.isFinite(i) && i > 0 ? Math.max(1, Math.trunc(i)) : 5, o = Array.isArray(e.rows) ? e.rows.filter(Ft) : [], s = e.row_header_column_index ?? 0, l = typeof e.caption == "string" ? e.caption : void 0, [f, p] = c(0), [m, h] = c(""), _ = o[0] ?? [], v = m.trim().toLowerCase(), y = v === "" ? o.slice(1) : o.slice(1).filter((e) => e.some((e) => Rt(e).toLowerCase().includes(v))), b = Math.max(1, Math.ceil(y.length / a)), x = Math.min(f, b - 1), S = y.slice(x * a, (x + 1) * a), C = S.length - 1;
3585
+ function ln({ block: e, className: n, path: r = "block" }) {
3586
+ let i = e.page_size ?? 5, a = Number.isFinite(i) && i > 0 ? Math.max(1, Math.trunc(i)) : 5, o = Array.isArray(e.rows) ? e.rows.filter(an) : [], s = e.row_header_column_index ?? 0, l = typeof e.caption == "string" ? e.caption : void 0, [f, p] = c(0), [m, h] = c(""), _ = o[0] ?? [], v = m.trim().toLowerCase(), y = v === "" ? o.slice(1) : o.slice(1).filter((e) => e.some((e) => cn(e).toLowerCase().includes(v))), b = Math.max(1, Math.ceil(y.length / a)), x = Math.min(f, b - 1), S = y.slice(x * a, (x + 1) * a), C = S.length - 1;
3150
3587
  return /* @__PURE__ */ u(R, {
3151
3588
  blockId: e.block_id,
3152
3589
  blockType: e.type,
3153
3590
  className: n,
3154
3591
  children: /* @__PURE__ */ d("div", {
3155
- ...g(D.dataTable),
3592
+ ...g(O.dataTable),
3156
3593
  children: [/* @__PURE__ */ d("div", {
3157
- ...g(D.dataTableHeaderBar),
3594
+ ...g(O.dataTableHeaderBar),
3158
3595
  children: [
3159
3596
  /* @__PURE__ */ u("span", {
3160
- ...g(D.dataTableTitle),
3597
+ ...g(O.dataTableTitle),
3161
3598
  children: l
3162
3599
  }),
3163
3600
  /* @__PURE__ */ d("span", {
3164
- ...g(D.dataTableFilter),
3601
+ ...g(O.dataTableFilter),
3165
3602
  children: [/* @__PURE__ */ u("span", {
3603
+ ...g(O.dataTableFilterIcon),
3166
3604
  "aria-hidden": "true",
3167
- children: "⌕"
3605
+ children: /* @__PURE__ */ u(he, { size: 13 })
3168
3606
  }), /* @__PURE__ */ u("input", {
3169
- ...g(D.dataTableFilterInput),
3607
+ ...g(O.dataTableFilterInput),
3170
3608
  "aria-label": l === void 0 ? "Filter table" : `Filter ${l}`,
3171
3609
  onChange: (e) => {
3172
3610
  h(e.target.value), p(0);
@@ -3177,45 +3615,39 @@ function zt({ block: e, className: n, path: r = "block" }) {
3177
3615
  })]
3178
3616
  }),
3179
3617
  /* @__PURE__ */ u("button", {
3180
- ...g(D.dataTableIconButton),
3618
+ ...g(O.dataTableIconButton),
3181
3619
  "aria-label": l === void 0 ? "Expand table" : `View ${l}`,
3182
3620
  type: "button",
3183
- children: /* @__PURE__ */ u("span", {
3184
- "aria-hidden": "true",
3185
- children: "⤢"
3186
- })
3621
+ children: /* @__PURE__ */ u(ce, { size: 18 })
3187
3622
  }),
3188
3623
  /* @__PURE__ */ u("button", {
3189
- ...g(D.dataTableIconButton),
3624
+ ...g(O.dataTableIconButton),
3190
3625
  "aria-label": "More actions",
3191
3626
  type: "button",
3192
- children: /* @__PURE__ */ u("span", {
3193
- "aria-hidden": "true",
3194
- children: "⋮"
3195
- })
3627
+ children: /* @__PURE__ */ u(se, { size: 16 })
3196
3628
  })
3197
3629
  ]
3198
3630
  }), /* @__PURE__ */ d("div", {
3199
- ...g(D.dataTableBand, b <= 1 && D.dataTableBandUnpaginated),
3631
+ ...g(O.dataTableBand, b <= 1 && O.dataTableBandUnpaginated),
3200
3632
  children: [/* @__PURE__ */ d("table", {
3201
- ...g(D.dataTableTable),
3633
+ ...g(O.dataTableTable),
3202
3634
  children: [
3203
3635
  l === void 0 ? null : /* @__PURE__ */ u("caption", {
3204
- ...g(D.visuallyHidden),
3636
+ ...g(O.visuallyHidden),
3205
3637
  children: l
3206
3638
  }),
3207
3639
  /* @__PURE__ */ u("thead", { children: /* @__PURE__ */ u("tr", { children: _.map((e, n) => /* @__PURE__ */ t("th", {
3208
- ...g(D.dataTableTh),
3640
+ ...g(O.dataTableTh),
3209
3641
  key: `header-${String(n)}`,
3210
3642
  scope: "col"
3211
- }, /* @__PURE__ */ u(Lt, {
3643
+ }, /* @__PURE__ */ u(sn, {
3212
3644
  cell: e,
3213
3645
  path: `${r}.rows[0][${String(n)}]`
3214
3646
  }))) }) }),
3215
3647
  /* @__PURE__ */ u("tbody", { children: S.map((e, n) => {
3216
3648
  let i = x * a + n + 1, o = e.length - 1;
3217
3649
  return /* @__PURE__ */ u("tr", { children: e.map((e, a) => {
3218
- let c = g(D.dataTableTd, n === 0 && a === 0 && D.dataTableRadiusTopStart, n === 0 && a === o && D.dataTableRadiusTopEnd, n === C && a === 0 && D.dataTableRadiusBottomStart, n === C && a === o && D.dataTableRadiusBottomEnd), l = /* @__PURE__ */ u(Lt, {
3650
+ let c = g(O.dataTableTd, n === 0 && a === 0 && O.dataTableRadiusTopStart, n === 0 && a === o && O.dataTableRadiusTopEnd, n === C && a === 0 && O.dataTableRadiusBottomStart, n === C && a === o && O.dataTableRadiusBottomEnd), l = /* @__PURE__ */ u(sn, {
3219
3651
  cell: e,
3220
3652
  path: `${r}.rows[${String(i)}][${String(a)}]`
3221
3653
  });
@@ -3231,23 +3663,20 @@ function zt({ block: e, className: n, path: r = "block" }) {
3231
3663
  }) })
3232
3664
  ]
3233
3665
  }), b <= 1 ? null : /* @__PURE__ */ d("div", {
3234
- ...g(D.dataTablePagination),
3666
+ ...g(O.dataTablePagination),
3235
3667
  children: [
3236
3668
  /* @__PURE__ */ u("button", {
3237
- ...g(D.dataTablePageChevron),
3669
+ ...g(O.dataTablePageChevron),
3238
3670
  "aria-label": "Previous",
3239
3671
  disabled: x === 0,
3240
3672
  onClick: () => {
3241
3673
  p((e) => Math.max(0, e - 1));
3242
3674
  },
3243
3675
  type: "button",
3244
- children: /* @__PURE__ */ u("span", {
3245
- "aria-hidden": "true",
3246
- children: "‹"
3247
- })
3676
+ children: /* @__PURE__ */ u(te, { size: 14 })
3248
3677
  }),
3249
3678
  Array.from({ length: b }, (e, n) => /* @__PURE__ */ t("button", {
3250
- ...g(D.dataTablePageButton, n === x && D.dataTablePageButtonActive),
3679
+ ...g(O.dataTablePageButton, n === x && O.dataTablePageButtonActive),
3251
3680
  "aria-current": n === x ? "page" : void 0,
3252
3681
  key: `page-${String(n)}`,
3253
3682
  onClick: () => {
@@ -3256,17 +3685,14 @@ function zt({ block: e, className: n, path: r = "block" }) {
3256
3685
  type: "button"
3257
3686
  }, n + 1)),
3258
3687
  /* @__PURE__ */ u("button", {
3259
- ...g(D.dataTablePageChevron),
3688
+ ...g(O.dataTablePageChevron),
3260
3689
  "aria-label": "Next",
3261
3690
  disabled: x === b - 1,
3262
3691
  onClick: () => {
3263
3692
  p((e) => Math.min(b - 1, e + 1));
3264
3693
  },
3265
3694
  type: "button",
3266
- children: /* @__PURE__ */ u("span", {
3267
- "aria-hidden": "true",
3268
- children: "›"
3269
- })
3695
+ children: /* @__PURE__ */ u(ne, { size: 14 })
3270
3696
  })
3271
3697
  ]
3272
3698
  })]
@@ -3274,135 +3700,143 @@ function zt({ block: e, className: n, path: r = "block" }) {
3274
3700
  })
3275
3701
  });
3276
3702
  }
3277
- function Bt({ block: e, className: t }) {
3703
+ function un({ name: e }) {
3704
+ let t = typeof e == "string" ? be[e] : void 0;
3705
+ return /* @__PURE__ */ u("span", {
3706
+ ...g(O.iconSlot),
3707
+ "aria-hidden": "true",
3708
+ "data-slack-icon": typeof e == "string" ? e : "unknown",
3709
+ children: u(t === void 0 ? le : t, { size: 24 })
3710
+ });
3711
+ }
3712
+ function dn({ block: e, className: t }) {
3278
3713
  let n = Array.isArray(e.actions) ? e.actions : void 0;
3279
3714
  return /* @__PURE__ */ u(R, {
3280
3715
  blockId: e.block_id,
3281
3716
  blockType: e.type,
3282
3717
  className: t,
3283
3718
  children: /* @__PURE__ */ d("div", {
3284
- ...g(D.card),
3719
+ ...g(O.card),
3285
3720
  children: [
3286
- e.hero_image === void 0 ? null : /* @__PURE__ */ u(P, {
3721
+ e.hero_image === void 0 ? null : /* @__PURE__ */ u(F, {
3287
3722
  element: e.hero_image,
3288
3723
  variant: "cardHero"
3289
3724
  }),
3290
3725
  /* @__PURE__ */ d("div", {
3291
- ...g(D.cardContent),
3726
+ ...g(O.cardContent),
3292
3727
  children: [
3293
3728
  e.icon === void 0 && e.slack_icon === void 0 && e.title === void 0 && e.subtitle === void 0 ? null : /* @__PURE__ */ d("div", {
3294
- ...g(D.cardHeading),
3295
- children: [e.icon === void 0 ? e.slack_icon === void 0 ? null : /* @__PURE__ */ u("span", {
3296
- "aria-hidden": "true",
3297
- children: "◆"
3298
- }) : /* @__PURE__ */ u(P, {
3729
+ ...g(O.cardHeading),
3730
+ children: [e.icon === void 0 ? e.slack_icon === void 0 ? null : /* @__PURE__ */ u(un, { name: w(e.slack_icon) ? e.slack_icon.name : void 0 }) : /* @__PURE__ */ u(F, {
3299
3731
  element: e.icon,
3300
3732
  variant: "cardIcon"
3301
- }), /* @__PURE__ */ d("div", { children: [e.title === void 0 ? null : /* @__PURE__ */ u(I, {
3302
- className: g(D.cardTitle).className,
3733
+ }), /* @__PURE__ */ d("div", { children: [e.title === void 0 ? null : /* @__PURE__ */ u(L, {
3734
+ className: g(O.cardTitle).className,
3303
3735
  text: e.title
3304
- }), e.subtitle === void 0 ? null : /* @__PURE__ */ u(I, {
3305
- className: g(D.smallText).className,
3736
+ }), e.subtitle === void 0 ? null : /* @__PURE__ */ u(L, {
3737
+ className: g(O.smallText).className,
3306
3738
  text: e.subtitle
3307
3739
  })] })]
3308
3740
  }),
3309
- e.body === void 0 ? null : /* @__PURE__ */ u(I, { text: e.body }),
3310
- e.subtext === void 0 ? null : /* @__PURE__ */ u(I, {
3311
- className: g(D.smallText).className,
3741
+ e.body === void 0 ? null : /* @__PURE__ */ u(L, { text: e.body }),
3742
+ e.subtext === void 0 ? null : /* @__PURE__ */ u(L, {
3743
+ className: g(O.smallText).className,
3312
3744
  text: e.subtext
3313
3745
  })
3314
3746
  ]
3315
3747
  }),
3316
3748
  n === void 0 ? null : /* @__PURE__ */ u("div", {
3317
- ...g(D.cardActions),
3318
- children: n.map((t, n) => /* @__PURE__ */ u(Ve, {
3749
+ ...g(O.cardActions),
3750
+ children: n.map((t, n) => /* @__PURE__ */ u(lt, {
3319
3751
  blockId: e.block_id,
3320
3752
  element: t
3321
- }, `${S(t) && typeof t.action_id == "string" ? t.action_id : "button"}-${String(n)}`))
3753
+ }, `${w(t) && typeof t.action_id == "string" ? t.action_id : "button"}-${String(n)}`))
3322
3754
  })
3323
3755
  ]
3324
3756
  })
3325
3757
  });
3326
3758
  }
3327
- function Vt(e) {
3328
- return S(e) && e.type === "card";
3759
+ function fn(e) {
3760
+ return w(e) && e.type === "card";
3329
3761
  }
3330
- function Ht({ block: e, className: n, path: r = "block" }) {
3762
+ function pn({ block: e, className: n, path: r = "block" }) {
3331
3763
  let i = e.elements;
3332
3764
  return /* @__PURE__ */ u(R, {
3333
3765
  blockId: e.block_id,
3334
3766
  blockType: e.type,
3335
3767
  className: n,
3336
3768
  children: /* @__PURE__ */ u("div", {
3337
- ...g(D.carousel),
3338
- children: Array.isArray(i) ? i.map((e, n) => Vt(e) ? /* @__PURE__ */ u(Bt, {
3769
+ ...g(O.carousel),
3770
+ children: Array.isArray(i) ? i.map((e, n) => fn(e) ? /* @__PURE__ */ u(dn, {
3339
3771
  block: e,
3340
- className: g(D.carouselCard).className,
3772
+ className: g(O.carouselCard).className,
3341
3773
  path: `${r}.elements[${String(n)}]`
3342
- }, `${w(e) ?? "card"}-${String(n)}`) : /* @__PURE__ */ t("div", {
3343
- ...g(D.unhandled),
3774
+ }, `${xe(e) ?? "card"}-${String(n)}`) : /* @__PURE__ */ t("div", {
3775
+ ...g(O.unhandled),
3344
3776
  "data-unhandled-block": !0,
3345
3777
  key: `unknown-${String(n)}`
3346
- }, T(e, "carousel card"))) : null
3778
+ }, E(e, "carousel card"))) : null
3347
3779
  })
3348
3780
  });
3349
3781
  }
3350
- function Ut({ block: e, className: t }) {
3782
+ function mn({ block: e, className: t }) {
3351
3783
  let n = e.level ?? "default";
3352
3784
  return /* @__PURE__ */ u(R, {
3353
3785
  blockId: e.block_id,
3354
3786
  blockType: e.type,
3355
3787
  className: t,
3356
3788
  children: /* @__PURE__ */ d("div", {
3357
- ...g(D.alert, n === "info" && D.alertInfo, n === "warning" && D.alertWarning, n === "error" && D.alertError, n === "success" && D.alertSuccess),
3789
+ ...g(O.alert, n === "info" && O.alertInfo, n === "warning" && O.alertWarning, n === "error" && O.alertError, n === "success" && O.alertSuccess),
3358
3790
  children: [/* @__PURE__ */ u("span", {
3791
+ ...g(O.iconSlot, O.alertIcon),
3359
3792
  "aria-hidden": "true",
3360
- children: n === "warning" ? "⚠" : n === "error" ? "!" : n === "success" ? "✓" : "i"
3361
- }), /* @__PURE__ */ u(I, { text: e.text })]
3793
+ children: u(n === "warning" || n === "error" ? ye : n === "success" ? ae : ue, { size: 20 })
3794
+ }), /* @__PURE__ */ u(L, { text: e.text })]
3362
3795
  })
3363
3796
  });
3364
3797
  }
3365
- function Wt({ block: e, className: n, path: r = "block" }) {
3366
- let i = e.sources, a = typeof e.status == "string" ? e.status : "unknown", o = typeof e.title == "string" ? e.title : T(e, "task");
3798
+ function hn({ block: e, className: n, path: r = "block" }) {
3799
+ let i = e.sources, a = typeof e.status == "string" ? e.status : "unknown", o = typeof e.title == "string" ? e.title : E(e, "task");
3367
3800
  return /* @__PURE__ */ u(R, {
3368
3801
  blockId: e.block_id,
3369
3802
  blockType: e.type,
3370
3803
  className: n,
3371
3804
  children: /* @__PURE__ */ d("div", {
3372
- ...g(D.task),
3805
+ ...g(O.task),
3373
3806
  children: [
3374
3807
  /* @__PURE__ */ d("div", {
3375
- ...g(D.taskHeading),
3808
+ ...g(O.taskHeading),
3376
3809
  children: [
3377
3810
  /* @__PURE__ */ u("span", {
3811
+ ...g(O.iconSlot),
3378
3812
  "aria-hidden": "true",
3379
- children: a === "complete" ? "✓" : a === "error" ? "!" : a === "in_progress" ? "◌" : "○"
3813
+ children: u(a === "complete" ? ae : a === "error" ? ie : a === "in_progress" ? de : re, { size: 16 })
3380
3814
  }),
3381
3815
  /* @__PURE__ */ u("span", { children: o }),
3382
3816
  /* @__PURE__ */ u("span", {
3383
- ...g(D.taskStatus),
3817
+ ...g(O.taskStatus),
3384
3818
  children: a
3385
3819
  })
3386
3820
  ]
3387
3821
  }),
3388
- e.details === void 0 ? null : /* @__PURE__ */ u(M, {
3822
+ e.details === void 0 ? null : /* @__PURE__ */ u(N, {
3389
3823
  block: e.details,
3390
3824
  path: `${r}.details`
3391
3825
  }),
3392
- e.output === void 0 ? null : /* @__PURE__ */ u(M, {
3826
+ e.output === void 0 ? null : /* @__PURE__ */ u(N, {
3393
3827
  block: e.output,
3394
3828
  path: `${r}.output`
3395
3829
  }),
3396
3830
  Array.isArray(i) ? /* @__PURE__ */ u("div", {
3397
- ...g(D.context),
3831
+ ...g(O.context),
3398
3832
  children: i.map((e, n) => {
3399
- if (!S(e)) return /* @__PURE__ */ t("span", {
3400
- ...g(D.unhandled),
3833
+ if (!w(e)) return /* @__PURE__ */ t("span", {
3834
+ ...g(O.unhandled),
3401
3835
  key: `unknown-${String(n)}`
3402
- }, T(e, "task source"));
3403
- let r = E(typeof e.url == "string" ? e.url : void 0), i = typeof e.text == "string" ? e.text : T(e, "task source"), a = `${typeof e.url == "string" ? e.url : `source-${String(n)}`}-${String(n)}`;
3836
+ }, E(e, "task source"));
3837
+ let r = D(typeof e.url == "string" ? e.url : void 0), i = typeof e.text == "string" ? e.text : E(e, "task source"), a = `${typeof e.url == "string" ? e.url : `source-${String(n)}`}-${String(n)}`;
3404
3838
  return r === void 0 ? /* @__PURE__ */ u("span", { children: i }, a) : /* @__PURE__ */ t("a", {
3405
- ...g(D.link),
3839
+ ...g(O.link),
3406
3840
  href: r,
3407
3841
  key: a,
3408
3842
  rel: "noreferrer"
@@ -3413,31 +3847,31 @@ function Wt({ block: e, className: n, path: r = "block" }) {
3413
3847
  })
3414
3848
  });
3415
3849
  }
3416
- function Gt(e) {
3417
- return S(e) && e.type === "task_card";
3850
+ function gn(e) {
3851
+ return w(e) && e.type === "task_card";
3418
3852
  }
3419
- function Kt({ block: e, className: n, path: r = "block" }) {
3420
- let i = e.tasks, a = typeof e.title == "string" ? e.title : T(e, "plan");
3853
+ function _n({ block: e, className: n, path: r = "block" }) {
3854
+ let i = e.tasks, a = typeof e.title == "string" ? e.title : E(e, "plan");
3421
3855
  return /* @__PURE__ */ u(R, {
3422
3856
  blockId: e.block_id,
3423
3857
  blockType: e.type,
3424
3858
  className: n,
3425
3859
  children: /* @__PURE__ */ d("div", {
3426
- ...g(D.plan),
3427
- children: [/* @__PURE__ */ u("strong", { children: a }), Array.isArray(i) ? i.map((e, n) => Gt(e) ? /* @__PURE__ */ u(Wt, {
3860
+ ...g(O.plan),
3861
+ children: [/* @__PURE__ */ u("strong", { children: a }), Array.isArray(i) ? i.map((e, n) => gn(e) ? /* @__PURE__ */ u(hn, {
3428
3862
  block: e,
3429
3863
  path: `${r}.tasks[${String(n)}]`
3430
3864
  }, `${typeof e.task_id == "string" ? e.task_id : "task"}-${String(n)}`) : /* @__PURE__ */ t("div", {
3431
- ...g(D.unhandled),
3865
+ ...g(O.unhandled),
3432
3866
  "data-unhandled-block": !0,
3433
3867
  key: `unknown-${String(n)}`
3434
- }, T(e, "plan task"))) : null]
3868
+ }, E(e, "plan task"))) : null]
3435
3869
  })
3436
3870
  });
3437
3871
  }
3438
3872
  //#endregion
3439
3873
  //#region src/constants.ts
3440
- var qt = 3e3, Jt = 3e3, Yt = 2e3, Xt = 3e3, Zt = 2e3, Qt = 2e3, $t = 12e3, en = 3e3, tn = 2e3, nn = 1e4, rn = 2e4, an = [
3874
+ var vn = 3e3, yn = 3e3, bn = 2e3, xn = 3e3, Sn = 2e3, Cn = 2e3, wn = 12e3, Tn = 3e3, En = 2e3, Dn = 1e4, On = 2e4, kn = [
3441
3875
  "actions",
3442
3876
  "alert",
3443
3877
  "card",
@@ -3459,9 +3893,9 @@ var qt = 3e3, Jt = 3e3, Yt = 2e3, Xt = 3e3, Zt = 2e3, Qt = 2e3, $t = 12e3, en =
3459
3893
  "table",
3460
3894
  "task_card",
3461
3895
  "video"
3462
- ], on = 554;
3463
- function sn() {
3464
- let [e, t] = c(on + 26), r = s(void 0), a = n((e) => {
3896
+ ], An = 554;
3897
+ function jn() {
3898
+ let [e, t] = c(An + 26), r = s(void 0), a = n((e) => {
3465
3899
  if (r.current?.disconnect(), r.current = void 0, e === null) return;
3466
3900
  let n = () => {
3467
3901
  let n = e.getBoundingClientRect().width;
@@ -3476,22 +3910,22 @@ function sn() {
3476
3910
  width: e
3477
3911
  };
3478
3912
  }
3479
- function cn(e, t) {
3913
+ function Mn(e, t) {
3480
3914
  let n = e / Math.max(1, t), r = 10 ** Math.floor(Math.log10(n)), i = n / r;
3481
3915
  return i >= Math.sqrt(50) ? r * 10 : i >= Math.sqrt(10) ? r * 5 : i >= Math.SQRT2 ? r * 2 : r;
3482
3916
  }
3483
- function ln(e, t) {
3484
- let n = Math.min(0, e), r = t > n ? t : n + 1, i = cn(r - n, 4), a = Math.floor(n / i), o = Math.ceil(r / i), s = [];
3917
+ function Nn(e, t) {
3918
+ let n = Math.min(0, e), r = t > n ? t : n + 1, i = Mn(r - n, 4), a = Math.floor(n / i), o = Math.ceil(r / i), s = [];
3485
3919
  for (let e = a; e <= o; e += 1) s.push(e * i);
3486
3920
  return s;
3487
3921
  }
3488
- function un(e) {
3922
+ function Pn(e) {
3489
3923
  return Math.ceil(e - .5) + .5;
3490
3924
  }
3491
- function dn(e, t) {
3925
+ function Fn(e, t) {
3492
3926
  let n = 0, r = 0;
3493
3927
  for (let e of t) n = Math.min(n, e), r = Math.max(r, e);
3494
- let i = ln(n, r), a = i[0] ?? 0, o = (i[i.length - 1] ?? 1) - a || 1;
3928
+ let i = Nn(n, r), a = i[0] ?? 0, o = (i[i.length - 1] ?? 1) - a || 1;
3495
3929
  return {
3496
3930
  plotLeft: 74,
3497
3931
  plotRight: e,
@@ -3500,14 +3934,14 @@ function dn(e, t) {
3500
3934
  y: (e) => 334 - (e - a) / o * 325
3501
3935
  };
3502
3936
  }
3503
- function fn(e) {
3504
- return ie[e % ie.length] ?? re;
3937
+ function In(e) {
3938
+ return Ee[e % Ee.length] ?? Te;
3505
3939
  }
3506
- function pn(e, t) {
3940
+ function Ln(e, t) {
3507
3941
  let n = new Map(e.data.map((e) => [e.label, e]));
3508
3942
  return t.map((e) => n.get(e));
3509
3943
  }
3510
- function mn(e, t, n, r) {
3944
+ function Rn(e, t, n, r) {
3511
3945
  let i = Math.min(4, t / 2, Math.abs(r - n)), a = e, o = e + t;
3512
3946
  return [
3513
3947
  `M${String(a + i)} ${String(n)}`,
@@ -3520,7 +3954,7 @@ function mn(e, t, n, r) {
3520
3954
  "Z"
3521
3955
  ].join("");
3522
3956
  }
3523
- function hn(e) {
3957
+ function zn(e) {
3524
3958
  if (e.length === 0) return "";
3525
3959
  let t = e[0];
3526
3960
  if (t === void 0) return "";
@@ -3547,18 +3981,18 @@ function hn(e) {
3547
3981
  }
3548
3982
  return r.join("");
3549
3983
  }
3550
- function gn({ geometry: e }) {
3984
+ function Bn({ geometry: e }) {
3551
3985
  let { plotLeft: n, plotRight: r, ticks: i, y: a } = e;
3552
3986
  return /* @__PURE__ */ d(l, { children: [i.map((e) => {
3553
- let i = un(a(e));
3987
+ let i = Pn(a(e));
3554
3988
  return /* @__PURE__ */ t("path", {
3555
- ...g(D.chartGridline),
3989
+ ...g(O.chartGridline),
3556
3990
  d: `M${String(n)} ${String(i)}L${String(r)} ${String(i)}`,
3557
3991
  fill: "none",
3558
3992
  key: `grid-${String(e)}`
3559
3993
  });
3560
3994
  }), i.map((e) => /* @__PURE__ */ t("text", {
3561
- ...g(D.chartTickText),
3995
+ ...g(O.chartTickText),
3562
3996
  dy: "0.32em",
3563
3997
  key: `tick-${String(e)}`,
3564
3998
  textAnchor: "end",
@@ -3566,35 +4000,35 @@ function gn({ geometry: e }) {
3566
4000
  y: a(e)
3567
4001
  }, e))] });
3568
4002
  }
3569
- function _n({ categories: e, tickX: n }) {
4003
+ function Vn({ categories: e, tickX: n }) {
3570
4004
  return /* @__PURE__ */ u(l, { children: e.map((e, r) => /* @__PURE__ */ t("text", {
3571
- ...g(D.chartTickText),
4005
+ ...g(O.chartTickText),
3572
4006
  key: `${e}-${String(r)}`,
3573
4007
  textAnchor: "middle",
3574
4008
  x: n(r),
3575
4009
  y: 351
3576
4010
  }, e)) });
3577
4011
  }
3578
- function vn(e, t) {
4012
+ function Hn(e, t) {
3579
4013
  let n = e * Math.min(.155, Math.max(.075, .175 - .02 * t));
3580
4014
  return {
3581
4015
  barWidth: (e - 2 * n) / (1.1 * t - .1),
3582
4016
  outer: n
3583
4017
  };
3584
4018
  }
3585
- function yn({ chart: e, svgWidth: n, title: r }) {
4019
+ function Un({ chart: e, svgWidth: n, title: r }) {
3586
4020
  let i = e.axis_config.categories, a = e.series.map((e) => ({
3587
- points: pn(e, i),
4021
+ points: Ln(e, i),
3588
4022
  series: e
3589
- })), o = dn(n, a.flatMap(({ points: e }) => e.flatMap((e) => e === void 0 ? [] : [e.value]))), { plotLeft: s, plotRight: c, y: l } = o, f, p;
4023
+ })), o = Fn(n, a.flatMap(({ points: e }) => e.flatMap((e) => e === void 0 ? [] : [e.value]))), { plotLeft: s, plotRight: c, y: l } = o, f, p;
3590
4024
  if (e.type === "bar") {
3591
- let n = (c - s) / Math.max(1, i.length), { barWidth: r, outer: o } = vn(n, Math.max(1, e.series.length));
4025
+ let n = (c - s) / Math.max(1, i.length), { barWidth: r, outer: o } = Hn(n, Math.max(1, e.series.length));
3592
4026
  p = (e) => s + n * (e + .5), f = a.map(({ points: e, series: i }, a) => e.map((e, c) => {
3593
4027
  if (e === void 0) return null;
3594
4028
  let u = s + c * n + o + 1.1 * r * a;
3595
4029
  return /* @__PURE__ */ t("path", {
3596
- ...g(fn(a).fill),
3597
- d: mn(u, r, l(e.value), 334),
4030
+ ...g(In(a).fill),
4031
+ d: Rn(u, r, l(e.value), 334),
3598
4032
  "data-category": e.label,
3599
4033
  "data-series": i.name,
3600
4034
  key: `${i.name}-${String(a)}-${e.label}-${String(c)}`
@@ -3606,15 +4040,15 @@ function yn({ chart: e, svgWidth: n, title: r }) {
3606
4040
  let a = t.flatMap((e, t) => e === void 0 ? [] : [{
3607
4041
  x: n(t),
3608
4042
  y: l(e.value)
3609
- }]), o = hn(a);
4043
+ }]), o = zn(a);
3610
4044
  if (o === "") return null;
3611
4045
  let s = a[a.length - 1], c = a[0];
3612
4046
  return /* @__PURE__ */ d("g", { children: [e.type === "area" && c !== void 0 && s !== void 0 ? /* @__PURE__ */ u("path", {
3613
- ...g(fn(i).tint, D.chartAreaFill, i >= 6 && D.chartAreaFallbackFill),
4047
+ ...g(In(i).tint, O.chartAreaFill, i >= 6 && O.chartAreaFallbackFill),
3614
4048
  d: `${o}L${String(s.x)} 334L${String(c.x)} 334Z`,
3615
4049
  "data-series-area": r.name
3616
4050
  }) : null, /* @__PURE__ */ u("path", {
3617
- ...g(fn(i).stroke, D.chartLinePath),
4051
+ ...g(In(i).stroke, O.chartLinePath),
3618
4052
  d: o,
3619
4053
  "data-series": r.name,
3620
4054
  fill: "none"
@@ -3622,31 +4056,31 @@ function yn({ chart: e, svgWidth: n, title: r }) {
3622
4056
  });
3623
4057
  }
3624
4058
  return /* @__PURE__ */ d("svg", {
3625
- ...g(D.chartSvg),
4059
+ ...g(O.chartSvg),
3626
4060
  "aria-label": r,
3627
4061
  height: 360,
3628
4062
  role: "img",
3629
4063
  width: n,
3630
4064
  children: [
3631
- /* @__PURE__ */ u(gn, { geometry: o }),
4065
+ /* @__PURE__ */ u(Bn, { geometry: o }),
3632
4066
  f,
3633
- /* @__PURE__ */ u(_n, {
4067
+ /* @__PURE__ */ u(Vn, {
3634
4068
  categories: i,
3635
4069
  tickX: p
3636
4070
  })
3637
4071
  ]
3638
4072
  });
3639
4073
  }
3640
- function bn(e, t, n, r) {
4074
+ function Wn(e, t, n, r) {
3641
4075
  return {
3642
4076
  x: e + n * Math.sin(r),
3643
4077
  y: t - n * Math.cos(r)
3644
4078
  };
3645
4079
  }
3646
- function xn({ chart: e, svgWidth: n, title: r }) {
4080
+ function Gn({ chart: e, svgWidth: n, title: r }) {
3647
4081
  let i = e.segments.map((e) => Number.isFinite(e.value) ? Math.max(0, e.value) : 0), a = i.reduce((e, t) => e + t, 0);
3648
4082
  if (a <= 0) return /* @__PURE__ */ u("div", {
3649
- ...g(D.unhandled),
4083
+ ...g(O.unhandled),
3650
4084
  "aria-label": `${r}: no chart data`,
3651
4085
  "data-empty-chart": !0,
3652
4086
  role: "img",
@@ -3655,16 +4089,16 @@ function xn({ chart: e, svgWidth: n, title: r }) {
3655
4089
  let o = n / 2, s = 0, c = e.segments.map((e, n) => {
3656
4090
  let r = (i[n] ?? 0) / a, c = s * 2 * Math.PI;
3657
4091
  s += r;
3658
- let l = s * 2 * Math.PI, u = bn(o, 180, 144, c), d = bn(o, 180, 144, l), f = +(l - c > Math.PI), p = r >= 1 ? `M${String(o)} 36A144 144 0 1 1 ${String(o)} 324A144 144 0 1 1 ${String(o)} 36Z` : `M${String(u.x)} ${String(u.y)}A144 144 0 ${String(f)} 1 ${String(d.x)} ${String(d.y)}L${String(o)} 180Z`;
4092
+ let l = s * 2 * Math.PI, u = Wn(o, 180, 144, c), d = Wn(o, 180, 144, l), f = +(l - c > Math.PI), p = r >= 1 ? `M${String(o)} 36A144 144 0 1 1 ${String(o)} 324A144 144 0 1 1 ${String(o)} 36Z` : `M${String(u.x)} ${String(u.y)}A144 144 0 ${String(f)} 1 ${String(d.x)} ${String(d.y)}L${String(o)} 180Z`;
3659
4093
  return r <= 0 ? null : /* @__PURE__ */ t("path", {
3660
- ...g(fn(n).fill, D.pieSlice),
4094
+ ...g(In(n).fill, O.pieSlice),
3661
4095
  d: p,
3662
4096
  "data-segment": e.label,
3663
4097
  key: `${e.label}-${String(n)}`
3664
4098
  });
3665
4099
  });
3666
4100
  return /* @__PURE__ */ u("svg", {
3667
- ...g(D.chartSvg),
4101
+ ...g(O.chartSvg),
3668
4102
  "aria-label": r,
3669
4103
  height: 360,
3670
4104
  role: "img",
@@ -3672,41 +4106,41 @@ function xn({ chart: e, svgWidth: n, title: r }) {
3672
4106
  children: c
3673
4107
  });
3674
4108
  }
3675
- var Sn = {
4109
+ var Kn = {
3676
4110
  area: !0,
3677
4111
  bar: !0,
3678
4112
  line: !0
3679
4113
  };
3680
- function Cn(e) {
3681
- return S(e) && typeof e.label == "string" && typeof e.value == "number" && Number.isFinite(e.value);
4114
+ function qn(e) {
4115
+ return w(e) && typeof e.label == "string" && typeof e.value == "number" && Number.isFinite(e.value);
3682
4116
  }
3683
- function wn(e) {
3684
- return S(e) && typeof e.label == "string" && typeof e.value == "number" && Number.isFinite(e.value);
4117
+ function Jn(e) {
4118
+ return w(e) && typeof e.label == "string" && typeof e.value == "number" && Number.isFinite(e.value);
3685
4119
  }
3686
- function Tn(e) {
3687
- return S(e) && typeof e.name == "string" && Array.isArray(e.data) && e.data.every(wn);
4120
+ function Yn(e) {
4121
+ return w(e) && typeof e.name == "string" && Array.isArray(e.data) && e.data.every(Jn);
3688
4122
  }
3689
- function En(e) {
3690
- return S(e) && e.type === "pie" && Array.isArray(e.segments) && e.segments.every(Cn);
4123
+ function Xn(e) {
4124
+ return w(e) && e.type === "pie" && Array.isArray(e.segments) && e.segments.every(qn);
3691
4125
  }
3692
- function Dn(e) {
3693
- if (!S(e)) return !1;
4126
+ function Zn(e) {
4127
+ if (!w(e)) return !1;
3694
4128
  let t = e.type;
3695
- if (typeof t != "string" || !(t in Sn)) return !1;
4129
+ if (typeof t != "string" || !(t in Kn)) return !1;
3696
4130
  let n = e.axis_config;
3697
- return Array.isArray(e.series) && e.series.every(Tn) && S(n) && Array.isArray(n.categories) && n.categories.every((e) => typeof e == "string");
4131
+ return Array.isArray(e.series) && e.series.every(Yn) && w(n) && Array.isArray(n.categories) && n.categories.every((e) => typeof e == "string");
3698
4132
  }
3699
- function On({ block: e, className: n }) {
3700
- let r = e.chart, i = typeof e.title == "string" ? e.title : T(e, "chart"), { ref: a, width: o } = sn(), s = Math.min(624, Math.max(400, o)) - 26, c = Dn(r) ? r : void 0, l = c === void 0 && En(r) ? r : void 0, f, p;
4133
+ function Qn({ block: e, className: n }) {
4134
+ let r = e.chart, i = typeof e.title == "string" ? e.title : E(e, "chart"), { ref: a, width: o } = jn(), s = Math.min(624, Math.max(400, o)) - 26, c = Zn(r) ? r : void 0, l = c === void 0 && Xn(r) ? r : void 0, f, p;
3701
4135
  l === void 0 ? c === void 0 ? (f = /* @__PURE__ */ u("div", {
3702
- ...g(D.unhandled),
3703
- "data-unhandled-chart-type": C(r) ?? "unknown",
3704
- children: T(r, "chart")
3705
- }), p = []) : (f = /* @__PURE__ */ u(yn, {
4136
+ ...g(O.unhandled),
4137
+ "data-unhandled-chart-type": T(r) ?? "unknown",
4138
+ children: E(r, "chart")
4139
+ }), p = []) : (f = /* @__PURE__ */ u(Un, {
3706
4140
  chart: c,
3707
4141
  svgWidth: s,
3708
4142
  title: i
3709
- }), p = c.series.map((e) => e.name)) : (f = /* @__PURE__ */ u(xn, {
4143
+ }), p = c.series.map((e) => e.name)) : (f = /* @__PURE__ */ u(Gn, {
3710
4144
  chart: l,
3711
4145
  svgWidth: s,
3712
4146
  title: i
@@ -3717,39 +4151,39 @@ function On({ block: e, className: n }) {
3717
4151
  blockType: e.type,
3718
4152
  className: n,
3719
4153
  children: /* @__PURE__ */ u("div", {
3720
- ...g(D.chartScroller),
4154
+ ...g(O.chartScroller),
3721
4155
  children: /* @__PURE__ */ u("div", {
3722
- ...g(D.chartCard),
4156
+ ...g(O.chartCard),
3723
4157
  ref: a,
3724
4158
  children: /* @__PURE__ */ d("div", {
3725
- ...g(D.chartContent),
4159
+ ...g(O.chartContent),
3726
4160
  children: [/* @__PURE__ */ u("h3", {
3727
- ...g(D.chartTitle),
4161
+ ...g(O.chartTitle),
3728
4162
  children: i
3729
4163
  }), /* @__PURE__ */ d("div", {
3730
- ...g(D.chartPlotArea),
4164
+ ...g(O.chartPlotArea),
3731
4165
  children: [
3732
4166
  /* @__PURE__ */ d("div", {
3733
- ...g(D.chartCanvas),
4167
+ ...g(O.chartCanvas),
3734
4168
  children: [f, h === void 0 ? null : /* @__PURE__ */ u("div", {
3735
- ...g(D.chartYAxisLabel),
4169
+ ...g(O.chartYAxisLabel),
3736
4170
  children: /* @__PURE__ */ u("span", {
3737
- ...g(D.chartYAxisLabelText),
4171
+ ...g(O.chartYAxisLabelText),
3738
4172
  children: h
3739
4173
  })
3740
4174
  })]
3741
4175
  }),
3742
4176
  c === void 0 ? null : /* @__PURE__ */ u("div", {
3743
- ...g(D.chartXAxisLabel),
4177
+ ...g(O.chartXAxisLabel),
3744
4178
  children: m
3745
4179
  }),
3746
4180
  p.length === 0 ? null : /* @__PURE__ */ u("div", {
3747
- ...g(D.chartLegend, c !== void 0 && D.chartLegendCartesian),
4181
+ ...g(O.chartLegend, c !== void 0 && O.chartLegendCartesian),
3748
4182
  children: p.map((e, n) => /* @__PURE__ */ t("span", {
3749
- ...g(D.chartLegendItem),
4183
+ ...g(O.chartLegendItem),
3750
4184
  key: `${e}-${String(n)}`
3751
4185
  }, /* @__PURE__ */ u("span", {
3752
- ...g(D.chartLegendSwatch, fn(n).swatch),
4186
+ ...g(O.chartLegendSwatch, In(n).swatch),
3753
4187
  "aria-hidden": "true"
3754
4188
  }), e))
3755
4189
  })
@@ -3762,243 +4196,249 @@ function On({ block: e, className: n }) {
3762
4196
  }
3763
4197
  //#endregion
3764
4198
  //#region src/blocks/InteractiveBlocks.tsx
3765
- function kn(e) {
3766
- return S(e) && S(e.text) && typeof e.text.text == "string";
4199
+ function $n(e) {
4200
+ return w(e) && w(e.text) && typeof e.text.text == "string";
3767
4201
  }
3768
- function An(e) {
3769
- return S(e) && e.type === "feedback_buttons" && kn(e.positive_button) && kn(e.negative_button);
4202
+ function er(e) {
4203
+ return w(e) && e.type === "feedback_buttons" && $n(e.positive_button) && $n(e.negative_button);
3770
4204
  }
3771
- function jn(e) {
3772
- return S(e) && e.type === "icon_button" && kn(e);
4205
+ function tr(e) {
4206
+ return w(e) && e.type === "icon_button" && $n(e);
3773
4207
  }
3774
- function Mn({ block: e, className: t, path: n = "block" }) {
3775
- let r = g(D.block, D.actions), i = Array.isArray(e.elements) ? e.elements : [];
4208
+ function nr({ block: e, className: t, path: n = "block" }) {
4209
+ let r = g(O.block, O.actions), i = Array.isArray(e.elements) ? e.elements : [];
3776
4210
  return /* @__PURE__ */ u("div", {
3777
4211
  ...r,
3778
- className: k(r.className, t),
4212
+ className: A(r.className, t),
3779
4213
  "data-block-id": e.block_id,
3780
4214
  "data-block-type": e.type,
3781
- children: i.map((t, r) => /* @__PURE__ */ u(at, {
4215
+ children: i.map((t, r) => /* @__PURE__ */ u(Dt, {
3782
4216
  blockId: e.block_id,
3783
4217
  element: t,
3784
4218
  path: `${n}.elements[${String(r)}]`
3785
- }, `${C(t) ?? "unknown"}-${S(t) && typeof t.action_id == "string" ? t.action_id : "action"}-${String(r)}`))
4219
+ }, `${T(t) ?? "unknown"}-${w(t) && typeof t.action_id == "string" ? t.action_id : "action"}-${String(r)}`))
3786
4220
  });
3787
4221
  }
3788
- function Nn({ block: e, className: t, path: n = "block" }) {
3789
- let r = g(D.block, D.inputBlock), i = e.label;
4222
+ function rr({ block: e, className: t, path: n = "block" }) {
4223
+ let r = g(O.block, O.inputBlock), i = e.label;
3790
4224
  return /* @__PURE__ */ d("div", {
3791
4225
  ...r,
3792
- className: k(r.className, t),
4226
+ className: A(r.className, t),
3793
4227
  "data-block-id": e.block_id,
3794
4228
  "data-block-type": e.type,
3795
4229
  children: [
3796
4230
  /* @__PURE__ */ d("div", {
3797
- ...g(D.inputLabel),
3798
- children: [S(i) && typeof i.text == "string" ? i.text : T(i, "input label"), e.optional === !0 ? null : /* @__PURE__ */ u("span", {
3799
- ...g(D.required),
4231
+ ...g(O.inputLabel),
4232
+ children: [w(i) && typeof i.text == "string" ? i.text : E(i, "input label"), e.optional === !0 ? null : /* @__PURE__ */ u("span", {
4233
+ ...g(O.required),
3800
4234
  "aria-hidden": "true",
3801
4235
  children: "*"
3802
4236
  })]
3803
4237
  }),
3804
- /* @__PURE__ */ u(at, {
4238
+ /* @__PURE__ */ u(Dt, {
3805
4239
  blockId: e.block_id,
3806
4240
  element: e.element,
3807
4241
  path: `${n}.element`
3808
4242
  }),
3809
4243
  e.hint === void 0 ? null : /* @__PURE__ */ u("div", {
3810
- ...g(D.smallText),
3811
- children: S(e.hint) && typeof e.hint.text == "string" ? e.hint.text : T(e.hint, "input hint")
4244
+ ...g(O.smallText),
4245
+ children: w(e.hint) && typeof e.hint.text == "string" ? e.hint.text : E(e.hint, "input hint")
3812
4246
  })
3813
4247
  ]
3814
4248
  });
3815
4249
  }
3816
- function Pn(e, t) {
4250
+ function ir(e, t) {
3817
4251
  return t === "positive" ? e.positive_button.text.text : e.negative_button.text.text;
3818
4252
  }
3819
- function Fn({ block: e, className: n }) {
3820
- let { onAction: r } = x(), i = g(D.block, D.actions), a = e.elements;
4253
+ function ar({ block: e, className: n }) {
4254
+ let { onAction: r } = x(), i = g(O.block, O.actions), a = e.elements;
3821
4255
  return /* @__PURE__ */ u("div", {
3822
4256
  ...i,
3823
- className: k(i.className, n),
4257
+ className: A(i.className, n),
3824
4258
  "data-block-id": e.block_id,
3825
4259
  "data-block-type": e.type,
3826
- children: Array.isArray(a) ? a.map((n, i) => jn(n) ? /* @__PURE__ */ t("button", {
3827
- ...g(D.button, D.iconButton),
3828
- "aria-label": n.accessibility_label ?? n.text.text,
3829
- key: `${n.type}-${n.action_id ?? "button"}-${String(i)}`,
3830
- onClick: () => {
3831
- n.action_id !== void 0 && r?.({
3832
- actionId: n.action_id,
3833
- type: n.type,
3834
- ...e.block_id === void 0 ? {} : { blockId: e.block_id },
3835
- ...n.value === void 0 ? {} : { value: n.value }
3836
- });
3837
- },
3838
- title: n.text.text,
3839
- type: "button"
3840
- }, n.icon === "trash" ? "⌫" : n.icon) : An(n) ? /* @__PURE__ */ t("div", {
3841
- ...g(D.actions),
3842
- key: `${n.type}-${n.action_id ?? "feedback"}-${String(i)}`
3843
- }, /* @__PURE__ */ u("button", {
3844
- ...g(D.button, D.iconButton),
3845
- "aria-label": Pn(n, "positive"),
3846
- onClick: () => {
3847
- n.action_id !== void 0 && r?.({
3848
- actionId: n.action_id,
3849
- type: n.type,
3850
- value: n.positive_button.value,
3851
- ...e.block_id === void 0 ? {} : { blockId: e.block_id }
3852
- });
3853
- },
3854
- type: "button",
3855
- children: "👍"
3856
- }), /* @__PURE__ */ u("button", {
3857
- ...g(D.button, D.iconButton),
3858
- "aria-label": Pn(n, "negative"),
3859
- onClick: () => {
3860
- n.action_id !== void 0 && r?.({
3861
- actionId: n.action_id,
3862
- type: n.type,
3863
- value: n.negative_button.value,
3864
- ...e.block_id === void 0 ? {} : { blockId: e.block_id }
3865
- });
3866
- },
3867
- type: "button",
3868
- children: "👎"
3869
- })) : /* @__PURE__ */ t("div", {
3870
- ...g(D.unhandled),
3871
- "data-unhandled-element": C(n) ?? "unknown",
3872
- key: `unhandled-${String(i)}`
3873
- }, T(n, "context action"))) : /* @__PURE__ */ u("div", {
3874
- ...g(D.unhandled),
4260
+ children: Array.isArray(a) ? a.map((n, i) => {
4261
+ if (tr(n)) {
4262
+ let a = g(O.button, O.iconButton), o = be[n.icon];
4263
+ return /* @__PURE__ */ t("button", {
4264
+ ...a,
4265
+ "aria-label": n.accessibility_label ?? n.text.text,
4266
+ key: `${n.type}-${n.action_id ?? "button"}-${String(i)}`,
4267
+ onClick: () => {
4268
+ n.action_id !== void 0 && r?.({
4269
+ actionId: n.action_id,
4270
+ type: n.type,
4271
+ ...e.block_id === void 0 ? {} : { blockId: e.block_id },
4272
+ ...n.value === void 0 ? {} : { value: n.value }
4273
+ });
4274
+ },
4275
+ title: n.text.text,
4276
+ type: "button"
4277
+ }, o === void 0 ? n.icon : /* @__PURE__ */ u(o, { size: 16 }));
4278
+ }
4279
+ return er(n) ? /* @__PURE__ */ t("div", {
4280
+ ...g(O.actions),
4281
+ key: `${n.type}-${n.action_id ?? "feedback"}-${String(i)}`
4282
+ }, /* @__PURE__ */ u("button", {
4283
+ ...g(O.button, O.iconButton),
4284
+ "aria-label": ir(n, "positive"),
4285
+ onClick: () => {
4286
+ n.action_id !== void 0 && r?.({
4287
+ actionId: n.action_id,
4288
+ type: n.type,
4289
+ value: n.positive_button.value,
4290
+ ...e.block_id === void 0 ? {} : { blockId: e.block_id }
4291
+ });
4292
+ },
4293
+ type: "button",
4294
+ children: /* @__PURE__ */ u(_e, { size: 16 })
4295
+ }), /* @__PURE__ */ u("button", {
4296
+ ...g(O.button, O.iconButton),
4297
+ "aria-label": ir(n, "negative"),
4298
+ onClick: () => {
4299
+ n.action_id !== void 0 && r?.({
4300
+ actionId: n.action_id,
4301
+ type: n.type,
4302
+ value: n.negative_button.value,
4303
+ ...e.block_id === void 0 ? {} : { blockId: e.block_id }
4304
+ });
4305
+ },
4306
+ type: "button",
4307
+ children: /* @__PURE__ */ u(ge, { size: 16 })
4308
+ })) : /* @__PURE__ */ t("div", {
4309
+ ...g(O.unhandled),
4310
+ "data-unhandled-element": T(n) ?? "unknown",
4311
+ key: `unhandled-${String(i)}`
4312
+ }, E(n, "context action"));
4313
+ }) : /* @__PURE__ */ u("div", {
4314
+ ...g(O.unhandled),
3875
4315
  "data-unhandled-element": "context_actions",
3876
- children: T(e, "context actions block")
4316
+ children: E(e, "context actions block")
3877
4317
  })
3878
4318
  });
3879
4319
  }
3880
4320
  //#endregion
3881
4321
  //#region src/Block.tsx
3882
- var In = new Set(an);
3883
- function Ln(e) {
3884
- let t = C(e);
3885
- return t !== void 0 && In.has(t);
3886
- }
3887
- function Rn({ block: e, className: t, path: n = "block" }) {
3888
- let r = C(e);
3889
- if (!Ln(e)) {
3890
- let n = g(D.block, D.unhandled);
4322
+ var or = new Set(kn);
4323
+ function sr(e) {
4324
+ let t = T(e);
4325
+ return t !== void 0 && or.has(t);
4326
+ }
4327
+ function cr({ block: e, className: t, path: n = "block" }) {
4328
+ let r = T(e);
4329
+ if (!sr(e)) {
4330
+ let n = g(O.block, O.unhandled);
3891
4331
  return /* @__PURE__ */ u("div", {
3892
4332
  ...n,
3893
- className: k(n.className, t),
4333
+ className: A(n.className, t),
3894
4334
  "data-block-type": r ?? "unknown",
3895
4335
  "data-unhandled-block": !0,
3896
4336
  role: "note",
3897
- children: T(e, "Slack block")
4337
+ children: E(e, "Slack block")
3898
4338
  });
3899
4339
  }
3900
4340
  switch (e.type) {
3901
- case "actions": return /* @__PURE__ */ u(Mn, {
4341
+ case "actions": return /* @__PURE__ */ u(nr, {
3902
4342
  block: e,
3903
4343
  className: t,
3904
4344
  path: n
3905
4345
  });
3906
- case "alert": return /* @__PURE__ */ u(Ut, {
4346
+ case "alert": return /* @__PURE__ */ u(mn, {
3907
4347
  block: e,
3908
4348
  className: t,
3909
4349
  path: n
3910
4350
  });
3911
- case "card": return /* @__PURE__ */ u(Bt, {
4351
+ case "card": return /* @__PURE__ */ u(dn, {
3912
4352
  block: e,
3913
4353
  className: t,
3914
4354
  path: n
3915
4355
  });
3916
- case "carousel": return /* @__PURE__ */ u(Ht, {
4356
+ case "carousel": return /* @__PURE__ */ u(pn, {
3917
4357
  block: e,
3918
4358
  className: t,
3919
4359
  path: n
3920
4360
  });
3921
- case "container": return /* @__PURE__ */ u(Wn, {
4361
+ case "container": return /* @__PURE__ */ u(mr, {
3922
4362
  block: e,
3923
4363
  className: t,
3924
4364
  path: n
3925
4365
  });
3926
- case "context": return /* @__PURE__ */ u(kt, {
4366
+ case "context": return /* @__PURE__ */ u(Qt, {
3927
4367
  block: e,
3928
4368
  className: t,
3929
4369
  path: n
3930
4370
  });
3931
- case "context_actions": return /* @__PURE__ */ u(Fn, {
4371
+ case "context_actions": return /* @__PURE__ */ u(ar, {
3932
4372
  block: e,
3933
4373
  className: t,
3934
4374
  path: n
3935
4375
  });
3936
- case "data_table": return /* @__PURE__ */ u(zt, {
4376
+ case "data_table": return /* @__PURE__ */ u(ln, {
3937
4377
  block: e,
3938
4378
  className: t,
3939
4379
  path: n
3940
4380
  });
3941
- case "data_visualization": return /* @__PURE__ */ u(On, {
4381
+ case "data_visualization": return /* @__PURE__ */ u(Qn, {
3942
4382
  block: e,
3943
4383
  className: t,
3944
4384
  path: n
3945
4385
  });
3946
- case "divider": return /* @__PURE__ */ u(Et, {
4386
+ case "divider": return /* @__PURE__ */ u(Yt, {
3947
4387
  block: e,
3948
4388
  className: t,
3949
4389
  path: n
3950
4390
  });
3951
- case "file": return /* @__PURE__ */ u(Mt, {
4391
+ case "file": return /* @__PURE__ */ u(tn, {
3952
4392
  block: e,
3953
4393
  className: t,
3954
4394
  path: n
3955
4395
  });
3956
- case "header": return /* @__PURE__ */ u(Tt, {
4396
+ case "header": return /* @__PURE__ */ u(Jt, {
3957
4397
  block: e,
3958
4398
  className: t,
3959
4399
  path: n
3960
4400
  });
3961
- case "image": return /* @__PURE__ */ u(Dt, {
4401
+ case "image": return /* @__PURE__ */ u(Xt, {
3962
4402
  block: e,
3963
4403
  className: t,
3964
4404
  path: n
3965
4405
  });
3966
- case "input": return /* @__PURE__ */ u(Nn, {
4406
+ case "input": return /* @__PURE__ */ u(rr, {
3967
4407
  block: e,
3968
4408
  className: t,
3969
4409
  path: n
3970
4410
  });
3971
- case "markdown": return /* @__PURE__ */ u(jt, {
4411
+ case "markdown": return /* @__PURE__ */ u(en, {
3972
4412
  block: e,
3973
4413
  className: t,
3974
4414
  path: n
3975
4415
  });
3976
- case "plan": return /* @__PURE__ */ u(Kt, {
4416
+ case "plan": return /* @__PURE__ */ u(_n, {
3977
4417
  block: e,
3978
4418
  className: t,
3979
4419
  path: n
3980
4420
  });
3981
- case "rich_text": return /* @__PURE__ */ u(At, {
4421
+ case "rich_text": return /* @__PURE__ */ u($t, {
3982
4422
  block: e,
3983
4423
  className: t,
3984
4424
  path: n
3985
4425
  });
3986
- case "section": return /* @__PURE__ */ u(wt, {
4426
+ case "section": return /* @__PURE__ */ u(qt, {
3987
4427
  block: e,
3988
4428
  className: t,
3989
4429
  path: n
3990
4430
  });
3991
- case "table": return /* @__PURE__ */ u(It, {
4431
+ case "table": return /* @__PURE__ */ u(on, {
3992
4432
  block: e,
3993
4433
  className: t,
3994
4434
  path: n
3995
4435
  });
3996
- case "task_card": return /* @__PURE__ */ u(Wt, {
4436
+ case "task_card": return /* @__PURE__ */ u(hn, {
3997
4437
  block: e,
3998
4438
  className: t,
3999
4439
  path: n
4000
4440
  });
4001
- case "video": return /* @__PURE__ */ u(Nt, {
4441
+ case "video": return /* @__PURE__ */ u(nn, {
4002
4442
  block: e,
4003
4443
  className: t,
4004
4444
  path: n
@@ -4006,10 +4446,10 @@ function Rn({ block: e, className: t, path: n = "block" }) {
4006
4446
  default: return _(e);
4007
4447
  }
4008
4448
  }
4009
- function zn(e) {
4010
- return /* @__PURE__ */ u(Rn, { ...e });
4449
+ function lr(e) {
4450
+ return /* @__PURE__ */ u(cr, { ...e });
4011
4451
  }
4012
- var Bn = {
4452
+ var ur = {
4013
4453
  actions: !0,
4014
4454
  context: !0,
4015
4455
  divider: !0,
@@ -4022,65 +4462,70 @@ var Bn = {
4022
4462
  table: !0,
4023
4463
  video: !0
4024
4464
  };
4025
- function Vn(e) {
4026
- let t = C(e);
4027
- return t !== void 0 && t in Bn;
4465
+ function dr(e) {
4466
+ let t = T(e);
4467
+ return t !== void 0 && t in ur;
4028
4468
  }
4029
- function Hn({ block: e, path: t }) {
4469
+ function fr({ block: e, path: t }) {
4030
4470
  let n = e.title, r = e.subtitle;
4031
- return /* @__PURE__ */ d(l, { children: [e.icon === void 0 ? null : /* @__PURE__ */ u(P, {
4471
+ return /* @__PURE__ */ d(l, { children: [e.icon === void 0 ? null : /* @__PURE__ */ u(F, {
4032
4472
  element: e.icon,
4033
4473
  variant: "cardIcon"
4034
- }), /* @__PURE__ */ d("div", { children: [e.rich_text_title === void 0 ? e.title === void 0 ? null : /* @__PURE__ */ u("strong", { children: S(n) && typeof n.text == "string" ? n.text : T(n, "container title") }) : /* @__PURE__ */ u(M, {
4474
+ }), /* @__PURE__ */ d("div", { children: [e.rich_text_title === void 0 ? e.title === void 0 ? null : /* @__PURE__ */ u("strong", { children: w(n) && typeof n.text == "string" ? n.text : E(n, "container title") }) : /* @__PURE__ */ u(N, {
4035
4475
  block: e.rich_text_title,
4036
4476
  path: `${t}.rich_text_title`
4037
4477
  }), e.subtitle === void 0 ? null : /* @__PURE__ */ u("div", {
4038
- ...g(D.smallText),
4039
- children: S(r) && typeof r.text == "string" ? r.text : T(r, "container subtitle")
4478
+ ...g(O.smallText),
4479
+ children: w(r) && typeof r.text == "string" ? r.text : E(r, "container subtitle")
4040
4480
  })] })] });
4041
4481
  }
4042
- function Un({ block: e, path: n }) {
4482
+ function pr({ block: e, path: n }) {
4043
4483
  let r = e.child_blocks;
4044
4484
  return /* @__PURE__ */ u("div", {
4045
- ...g(D.containerBody),
4046
- children: Array.isArray(r) ? r.map((e, r) => Vn(e) ? /* @__PURE__ */ u(Rn, {
4485
+ ...g(O.containerBody),
4486
+ children: Array.isArray(r) ? r.map((e, r) => dr(e) ? /* @__PURE__ */ u(cr, {
4047
4487
  block: e,
4048
4488
  path: `${n}.child_blocks[${String(r)}]`
4049
- }, `${C(e) ?? "unknown"}-${w(e) ?? "block"}-${String(r)}`) : /* @__PURE__ */ t("div", {
4050
- ...g(D.unhandled),
4051
- "data-block-type": C(e) ?? "unknown",
4489
+ }, `${T(e) ?? "unknown"}-${xe(e) ?? "block"}-${String(r)}`) : /* @__PURE__ */ t("div", {
4490
+ ...g(O.unhandled),
4491
+ "data-block-type": T(e) ?? "unknown",
4052
4492
  "data-unhandled-block": !0,
4053
4493
  key: `unknown-${String(r)}`
4054
- }, T(e, "Slack block"))) : null
4494
+ }, E(e, "Slack block"))) : null
4055
4495
  });
4056
4496
  }
4057
- function Wn({ block: e, className: t, path: n = "block" }) {
4497
+ function mr({ block: e, className: t, path: n = "block" }) {
4058
4498
  return /* @__PURE__ */ u(R, {
4059
4499
  blockId: e.block_id,
4060
4500
  blockType: e.type,
4061
4501
  className: t,
4062
4502
  children: e.is_collapsible === !0 ? /* @__PURE__ */ d("details", {
4063
- ...g(D.container),
4503
+ ...g(O.container),
4064
4504
  open: e.default_collapsed !== !0,
4065
- children: [/* @__PURE__ */ u("summary", {
4066
- ...g(D.containerHeader, e.has_header_divider === !0 && D.containerHeaderDivider),
4067
- children: /* @__PURE__ */ u(Hn, {
4505
+ children: [/* @__PURE__ */ d("summary", {
4506
+ ...g(O.containerHeader, e.has_header_divider === !0 && O.containerHeaderDivider),
4507
+ children: [/* @__PURE__ */ u("span", {
4508
+ ...g(O.containerChevron),
4509
+ "aria-hidden": "true",
4510
+ "data-container-chevron": !0,
4511
+ children: /* @__PURE__ */ u(ne, { size: 16 })
4512
+ }), /* @__PURE__ */ u(fr, {
4068
4513
  block: e,
4069
4514
  path: n
4070
- })
4071
- }), /* @__PURE__ */ u(Un, {
4515
+ })]
4516
+ }), /* @__PURE__ */ u(pr, {
4072
4517
  block: e,
4073
4518
  path: n
4074
4519
  })]
4075
4520
  }) : /* @__PURE__ */ d("div", {
4076
- ...g(D.container),
4521
+ ...g(O.container),
4077
4522
  children: [/* @__PURE__ */ u("div", {
4078
- ...g(D.containerHeader, e.has_header_divider === !0 && D.containerHeaderDivider),
4079
- children: /* @__PURE__ */ u(Hn, {
4523
+ ...g(O.containerHeader, e.has_header_divider === !0 && O.containerHeaderDivider),
4524
+ children: /* @__PURE__ */ u(fr, {
4080
4525
  block: e,
4081
4526
  path: n
4082
4527
  })
4083
- }), /* @__PURE__ */ u(Un, {
4528
+ }), /* @__PURE__ */ u(pr, {
4084
4529
  block: e,
4085
4530
  path: n
4086
4531
  })]
@@ -4089,7 +4534,7 @@ function Wn({ block: e, className: t, path: n = "block" }) {
4089
4534
  }
4090
4535
  //#endregion
4091
4536
  //#region src/errors.ts
4092
- var Gn = class extends Error {
4537
+ var hr = class extends Error {
4093
4538
  code;
4094
4539
  path;
4095
4540
  name;
@@ -4099,12 +4544,12 @@ var Gn = class extends Error {
4099
4544
  };
4100
4545
  //#endregion
4101
4546
  //#region src/BlockKit.tsx
4102
- function Kn(e) {
4547
+ function gr(e) {
4103
4548
  let t = e;
4104
4549
  if (typeof e == "string") try {
4105
4550
  t = JSON.parse(e);
4106
4551
  } catch {
4107
- throw new Gn("data: expected valid JSON", {
4552
+ throw new hr("data: expected valid JSON", {
4108
4553
  code: "invalid_json",
4109
4554
  path: "data"
4110
4555
  });
@@ -4112,7 +4557,7 @@ function Kn(e) {
4112
4557
  return Array.isArray(t) ? {
4113
4558
  blockListPath: "data",
4114
4559
  blocks: t
4115
- } : S(t) && Array.isArray(t.blocks) ? {
4560
+ } : w(t) && Array.isArray(t.blocks) ? {
4116
4561
  blockListPath: "data.blocks",
4117
4562
  blocks: t.blocks
4118
4563
  } : {
@@ -4120,8 +4565,8 @@ function Kn(e) {
4120
4565
  blocks: [t]
4121
4566
  };
4122
4567
  }
4123
- function qn({ "aria-label": e = "Slack Block Kit preview", className: t, data: n, onAction: r, resolvers: i, surface: a = "message", theme: s = "light" }) {
4124
- let c = o(() => Kn(n), [n]), l = g(s === "dark" ? ne : te, D.root, s === "dark" ? D.rootDark : D.rootLight);
4568
+ function _r({ "aria-label": e = "Slack Block Kit preview", className: t, data: n, onAction: r, resolvers: i, surface: a = "message", theme: s = "light" }) {
4569
+ let c = o(() => gr(n), [n]), l = g(s === "dark" ? we : Ce, O.root, s === "dark" ? O.rootDark : O.rootLight);
4125
4570
  return /* @__PURE__ */ u(b, {
4126
4571
  onAction: r,
4127
4572
  resolvers: i,
@@ -4129,31 +4574,31 @@ function qn({ "aria-label": e = "Slack Block Kit preview", className: t, data: n
4129
4574
  children: /* @__PURE__ */ u("div", {
4130
4575
  ...l,
4131
4576
  "aria-label": e,
4132
- className: k(l.className, t),
4577
+ className: A(l.className, t),
4133
4578
  "data-block-kit-root": !0,
4134
4579
  "data-surface": a,
4135
4580
  "data-theme": s,
4136
4581
  role: "article",
4137
- children: c.blocks.map((e, t) => /* @__PURE__ */ u(Rn, {
4582
+ children: c.blocks.map((e, t) => /* @__PURE__ */ u(cr, {
4138
4583
  block: e,
4139
4584
  path: `${c.blockListPath}[${String(t)}]`
4140
- }, `${C(e) ?? "unknown"}-${w(e) ?? "block"}-${String(t)}`))
4585
+ }, `${T(e) ?? "unknown"}-${xe(e) ?? "block"}-${String(t)}`))
4141
4586
  })
4142
4587
  });
4143
4588
  }
4144
4589
  //#endregion
4145
4590
  //#region src/validation.ts
4146
- function Jn(e, t, n) {
4147
- throw new Gn(n, {
4591
+ function vr(e, t, n) {
4592
+ throw new hr(n, {
4148
4593
  code: e,
4149
4594
  path: t
4150
4595
  });
4151
4596
  }
4152
4597
  function z(e, t, n, r) {
4153
- e || Jn(t, n, r);
4598
+ e || vr(t, n, r);
4154
4599
  }
4155
4600
  function B(e, t) {
4156
- z(S(e), "invalid_type", t, "expected an object");
4601
+ z(w(e), "invalid_type", t, "expected an object");
4157
4602
  }
4158
4603
  function V(e, t) {
4159
4604
  z(Array.isArray(e), "invalid_type", t, "expected an array");
@@ -4179,67 +4624,67 @@ function q(e, t, n) {
4179
4624
  function J(e, t) {
4180
4625
  H(e.type, `${t}.type`), U(e.block_id, `${t}.block_id`, { max: 255 });
4181
4626
  }
4182
- function Y(e, t, n = qt) {
4627
+ function Y(e, t, n = vn) {
4183
4628
  B(e, t), q(e.type, ["plain_text", "mrkdwn"], `${t}.type`), H(e.text, `${t}.text`, { max: n }), e.type === "plain_text" ? (G(e.emoji, `${t}.emoji`), z(e.verbatim === void 0, "invalid_value", `${t}.verbatim`, "verbatim is only legal on mrkdwn text")) : (G(e.verbatim, `${t}.verbatim`), z(e.emoji === void 0, "invalid_value", `${t}.emoji`, "emoji is only legal on plain_text"));
4184
4629
  }
4185
- function Yn(e, t = "text", n = qt) {
4630
+ function yr(e, t = "text", n = vn) {
4186
4631
  Y(e, t, n);
4187
4632
  }
4188
- function X(e, t, n = qt) {
4189
- Y(e, t, n), z(S(e) && e.type === "plain_text", "invalid_value", `${t}.type`, "expected \"plain_text\"");
4633
+ function X(e, t, n = vn) {
4634
+ Y(e, t, n), z(w(e) && e.type === "plain_text", "invalid_value", `${t}.type`, "expected \"plain_text\"");
4190
4635
  }
4191
- function Xn(e, t) {
4636
+ function br(e, t) {
4192
4637
  B(e, t);
4193
4638
  let n = e.id !== void 0, r = e.url !== void 0;
4194
- z(n !== r, "invalid_value", t, "must contain exactly one of id or url"), n && H(e.id, `${t}.id`), r && H(e.url, `${t}.url`, { max: Xt });
4639
+ z(n !== r, "invalid_value", t, "must contain exactly one of id or url"), n && H(e.id, `${t}.id`), r && H(e.url, `${t}.url`, { max: xn });
4195
4640
  }
4196
4641
  function Z(e, t) {
4197
- B(e, t), K(e, "image", t), H(e.alt_text, `${t}.alt_text`, { max: Zt });
4642
+ B(e, t), K(e, "image", t), H(e.alt_text, `${t}.alt_text`, { max: Sn });
4198
4643
  let n = e.image_url !== void 0, r = e.slack_file !== void 0;
4199
- z(n !== r, "invalid_value", t, "must contain exactly one of image_url or slack_file"), n && H(e.image_url, `${t}.image_url`, { max: Xt }), r && Xn(e.slack_file, `${t}.slack_file`);
4644
+ z(n !== r, "invalid_value", t, "must contain exactly one of image_url or slack_file"), n && H(e.image_url, `${t}.image_url`, { max: xn }), r && br(e.slack_file, `${t}.slack_file`);
4200
4645
  }
4201
- function Zn(e, t = "element") {
4646
+ function xr(e, t = "element") {
4202
4647
  Z(e, t);
4203
4648
  }
4204
- function Qn(e, t) {
4205
- B(e, t), Y(e.text, `${t}.text`, 75), U(e.value, `${t}.value`, { max: 75 }), U(e.url, `${t}.url`, { max: en }), e.description !== void 0 && X(e.description, `${t}.description`, 75);
4649
+ function Sr(e, t) {
4650
+ B(e, t), Y(e.text, `${t}.text`, 75), U(e.value, `${t}.value`, { max: 75 }), U(e.url, `${t}.url`, { max: Tn }), e.description !== void 0 && X(e.description, `${t}.description`, 75);
4206
4651
  }
4207
- function $n(e, t, n) {
4652
+ function Cr(e, t, n) {
4208
4653
  V(e, t), z(e.length > 0, "missing_field", t, "must contain at least one option"), z(e.length <= n, "limit_exceeded", t, `must contain at most ${String(n)} options`), e.forEach((e, n) => {
4209
- Qn(e, `${t}[${String(n)}]`);
4654
+ Sr(e, `${t}[${String(n)}]`);
4210
4655
  });
4211
4656
  }
4212
- function er(e, t) {
4657
+ function wr(e, t) {
4213
4658
  U(e.action_id, `${t}.action_id`, { max: 255 });
4214
4659
  }
4215
- function tr(e, t) {
4660
+ function Tr(e, t) {
4216
4661
  e.placeholder !== void 0 && X(e.placeholder, `${t}.placeholder`, 150);
4217
4662
  }
4218
- function nr(e, t) {
4219
- B(e, t), K(e, "button", t), er(e, t), X(e.text, `${t}.text`, 75), U(e.url, `${t}.url`, { max: en }), U(e.value, `${t}.value`, { max: tn }), U(e.accessibility_label, `${t}.accessibility_label`, { max: 75 }), e.style !== void 0 && q(e.style, ["primary", "danger"], `${t}.style`);
4663
+ function Er(e, t) {
4664
+ B(e, t), K(e, "button", t), wr(e, t), X(e.text, `${t}.text`, 75), U(e.url, `${t}.url`, { max: Tn }), U(e.value, `${t}.value`, { max: En }), U(e.accessibility_label, `${t}.accessibility_label`, { max: 75 }), e.style !== void 0 && q(e.style, ["primary", "danger"], `${t}.style`);
4220
4665
  }
4221
- function rr(e, t) {
4666
+ function Dr(e, t) {
4222
4667
  let n = e.options !== void 0, r = e.option_groups !== void 0;
4223
- z(n !== r, "invalid_value", t, "must contain exactly one of options or option_groups"), n && $n(e.options, `${t}.options`, 100), r && (V(e.option_groups, `${t}.option_groups`), z(e.option_groups.length <= 100, "limit_exceeded", `${t}.option_groups`, "must contain at most 100 groups"), e.option_groups.forEach((e, n) => {
4668
+ z(n !== r, "invalid_value", t, "must contain exactly one of options or option_groups"), n && Cr(e.options, `${t}.options`, 100), r && (V(e.option_groups, `${t}.option_groups`), z(e.option_groups.length <= 100, "limit_exceeded", `${t}.option_groups`, "must contain at most 100 groups"), e.option_groups.forEach((e, n) => {
4224
4669
  let r = `${t}.option_groups[${String(n)}]`;
4225
- B(e, r), X(e.label, `${r}.label`, 75), $n(e.options, `${r}.options`, 100);
4670
+ B(e, r), X(e.label, `${r}.label`, 75), Cr(e.options, `${r}.options`, 100);
4226
4671
  }));
4227
4672
  }
4228
- function ir(e, t) {
4229
- switch (B(e, t), H(e.type, `${t}.type`), er(e, t), tr(e, t), e.type) {
4673
+ function Or(e, t) {
4674
+ switch (B(e, t), H(e.type, `${t}.type`), wr(e, t), Tr(e, t), e.type) {
4230
4675
  case "button":
4231
- nr(e, t);
4676
+ Er(e, t);
4232
4677
  return;
4233
4678
  case "checkboxes":
4234
4679
  case "radio_buttons":
4235
- $n(e.options, `${t}.options`, 10);
4680
+ Cr(e.options, `${t}.options`, 10);
4236
4681
  return;
4237
4682
  case "overflow":
4238
- $n(e.options, `${t}.options`, 5);
4683
+ Cr(e.options, `${t}.options`, 5);
4239
4684
  return;
4240
4685
  case "static_select":
4241
4686
  case "multi_static_select":
4242
- rr(e, t);
4687
+ Dr(e, t);
4243
4688
  return;
4244
4689
  case "external_select":
4245
4690
  case "multi_external_select":
@@ -4285,13 +4730,13 @@ function ir(e, t) {
4285
4730
  case "workflow_button":
4286
4731
  X(e.text, `${t}.text`, 75), B(e.workflow, `${t}.workflow`), B(e.workflow.trigger, `${t}.workflow.trigger`), H(e.workflow.trigger.url, `${t}.workflow.trigger.url`);
4287
4732
  return;
4288
- default: Jn("unsupported_element", `${t}.type`, `unsupported element "${e.type}"`);
4733
+ default: vr("unsupported_element", `${t}.type`, `unsupported element "${e.type}"`);
4289
4734
  }
4290
4735
  }
4291
- function ar(e, t = "element") {
4292
- ir(e, t);
4736
+ function kr(e, t = "element") {
4737
+ Or(e, t);
4293
4738
  }
4294
- function or(e, t) {
4739
+ function Ar(e, t) {
4295
4740
  if (e !== void 0) {
4296
4741
  B(e, t);
4297
4742
  for (let n of [
@@ -4303,8 +4748,8 @@ function or(e, t) {
4303
4748
  ]) G(e[n], `${t}.${n}`);
4304
4749
  }
4305
4750
  }
4306
- function sr(e, t) {
4307
- switch (B(e, t), H(e.type, `${t}.type`), or(e.style, `${t}.style`), e.type) {
4751
+ function jr(e, t) {
4752
+ switch (B(e, t), H(e.type, `${t}.type`), Ar(e.style, `${t}.style`), e.type) {
4308
4753
  case "text":
4309
4754
  H(e.text, `${t}.text`, { allowEmpty: !0 });
4310
4755
  return;
@@ -4358,12 +4803,12 @@ function sr(e, t) {
4358
4803
  case "workflow_mention":
4359
4804
  z(Object.keys(e).length > 1, "missing_field", t, `${e.type} must contain its reference fields`);
4360
4805
  return;
4361
- default: Jn("unsupported_element", `${t}.type`, `unsupported rich text element "${e.type}"`);
4806
+ default: vr("unsupported_element", `${t}.type`, `unsupported rich text element "${e.type}"`);
4362
4807
  }
4363
4808
  }
4364
- function cr(e, t) {
4809
+ function Mr(e, t) {
4365
4810
  V(e, t), e.forEach((e, n) => {
4366
- sr(e, `${t}[${String(n)}]`);
4811
+ jr(e, `${t}[${String(n)}]`);
4367
4812
  });
4368
4813
  }
4369
4814
  function Q(e, t) {
@@ -4372,7 +4817,7 @@ function Q(e, t) {
4372
4817
  switch (B(e, r), H(e.type, `${r}.type`), e.type) {
4373
4818
  case "rich_text_section":
4374
4819
  case "rich_text_quote":
4375
- cr(e.elements, `${r}.elements`);
4820
+ Mr(e.elements, `${r}.elements`);
4376
4821
  return;
4377
4822
  case "rich_text_list":
4378
4823
  q(e.style, ["bullet", "ordered"], `${r}.style`), e.indent !== void 0 && W(e.indent, `${r}.indent`, {
@@ -4384,25 +4829,25 @@ function Q(e, t) {
4384
4829
  min: 0
4385
4830
  }), V(e.elements, `${r}.elements`), e.elements.forEach((e, t) => {
4386
4831
  let n = `${r}.elements[${String(t)}]`;
4387
- B(e, n), K(e, "rich_text_section", n), cr(e.elements, `${n}.elements`);
4832
+ B(e, n), K(e, "rich_text_section", n), Mr(e.elements, `${n}.elements`);
4388
4833
  });
4389
4834
  return;
4390
4835
  case "rich_text_preformatted":
4391
- cr(e.elements, `${r}.elements`), U(e.language, `${r}.language`);
4836
+ Mr(e.elements, `${r}.elements`), U(e.language, `${r}.language`);
4392
4837
  return;
4393
- default: Jn("unsupported_element", `${r}.type`, `unsupported rich text container "${e.type}"`);
4838
+ default: vr("unsupported_element", `${r}.type`, `unsupported rich text container "${e.type}"`);
4394
4839
  }
4395
4840
  });
4396
4841
  }
4397
- function lr(e, t = "block") {
4842
+ function Nr(e, t = "block") {
4398
4843
  Q(e, t);
4399
4844
  }
4400
- function ur(e, t) {
4845
+ function Pr(e, t) {
4401
4846
  B(e, t), K(e, "section", t), J(e, t);
4402
4847
  let n = e.text !== void 0, r = e.fields !== void 0;
4403
- z(n || r, "missing_field", t, "requires text or fields"), n && Y(e.text, `${t}.text`, Jt), r && (V(e.fields, `${t}.fields`), z(e.fields.length > 0 && e.fields.length <= 10, "limit_exceeded", `${t}.fields`, "must contain 1–10 text objects"), e.fields.forEach((e, n) => {
4404
- Y(e, `${t}.fields[${String(n)}]`, Yt);
4405
- })), e.accessory !== void 0 && (B(e.accessory, `${t}.accessory`), e.accessory.type === "image" ? Z(e.accessory, `${t}.accessory`) : (ir(e.accessory, `${t}.accessory`), z(![
4848
+ z(n || r, "missing_field", t, "requires text or fields"), n && Y(e.text, `${t}.text`, yn), r && (V(e.fields, `${t}.fields`), z(e.fields.length > 0 && e.fields.length <= 10, "limit_exceeded", `${t}.fields`, "must contain 1–10 text objects"), e.fields.forEach((e, n) => {
4849
+ Y(e, `${t}.fields[${String(n)}]`, bn);
4850
+ })), e.accessory !== void 0 && (B(e.accessory, `${t}.accessory`), e.accessory.type === "image" ? Z(e.accessory, `${t}.accessory`) : (Or(e.accessory, `${t}.accessory`), z(![
4406
4851
  "datetimepicker",
4407
4852
  "file_input",
4408
4853
  "plain_text_input",
@@ -4412,26 +4857,26 @@ function ur(e, t) {
4412
4857
  "rich_text_input"
4413
4858
  ].includes(String(e.accessory.type)), "invalid_value", `${t}.accessory.type`, "element is not legal as a section accessory"))), G(e.expand, `${t}.expand`);
4414
4859
  }
4415
- function dr(e, t) {
4860
+ function Fr(e, t) {
4416
4861
  B(e, t), K(e, "header", t), J(e, t), X(e.text, `${t}.text`, 150), e.level !== void 0 && W(e.level, `${t}.level`, {
4417
4862
  integer: !0,
4418
4863
  min: 1,
4419
4864
  max: 4
4420
4865
  });
4421
4866
  }
4422
- function fr(e, t) {
4423
- Z(e, t), B(e, t), J(e, t), e.title !== void 0 && X(e.title, `${t}.title`, Qt);
4867
+ function Ir(e, t) {
4868
+ Z(e, t), B(e, t), J(e, t), e.title !== void 0 && X(e.title, `${t}.title`, Cn);
4424
4869
  }
4425
- function pr(e, t) {
4870
+ function Lr(e, t) {
4426
4871
  B(e, t), K(e, "context", t), J(e, t), V(e.elements, `${t}.elements`), z(e.elements.length > 0 && e.elements.length <= 10, "limit_exceeded", `${t}.elements`, "must contain 1–10 elements"), e.elements.forEach((e, n) => {
4427
4872
  let r = `${t}.elements[${String(n)}]`;
4428
4873
  B(e, r), e.type === "image" ? Z(e, r) : Y(e, r);
4429
4874
  });
4430
4875
  }
4431
- function mr(e, t) {
4876
+ function Rr(e, t) {
4432
4877
  B(e, t), K(e, "actions", t), J(e, t), V(e.elements, `${t}.elements`), z(e.elements.length > 0 && e.elements.length <= 25, "limit_exceeded", `${t}.elements`, "must contain 1–25 elements"), e.elements.forEach((e, n) => {
4433
4878
  let r = `${t}.elements[${String(n)}]`;
4434
- ir(e, r), B(e, r), z([
4879
+ Or(e, r), B(e, r), z([
4435
4880
  "button",
4436
4881
  "checkboxes",
4437
4882
  "datepicker",
@@ -4454,8 +4899,8 @@ function mr(e, t) {
4454
4899
  ].includes(String(e.type)), "invalid_value", `${r}.type`, "element is not legal inside an actions block");
4455
4900
  });
4456
4901
  }
4457
- function hr(e, t) {
4458
- B(e, t), K(e, "input", t), J(e, t), X(e.label, `${t}.label`, 2e3), e.hint !== void 0 && X(e.hint, `${t}.hint`, 2e3), G(e.optional, `${t}.optional`), G(e.dispatch_action, `${t}.dispatch_action`), ir(e.element, `${t}.element`), B(e.element, `${t}.element`), z(![
4902
+ function zr(e, t) {
4903
+ B(e, t), K(e, "input", t), J(e, t), X(e.label, `${t}.label`, 2e3), e.hint !== void 0 && X(e.hint, `${t}.hint`, 2e3), G(e.optional, `${t}.optional`), G(e.dispatch_action, `${t}.dispatch_action`), Or(e.element, `${t}.element`), B(e.element, `${t}.element`), z(![
4459
4904
  "button",
4460
4905
  "overflow",
4461
4906
  "workflow_button",
@@ -4463,18 +4908,18 @@ function hr(e, t) {
4463
4908
  "feedback_buttons"
4464
4909
  ].includes(String(e.element.type)), "invalid_value", `${t}.element.type`, "element is not legal inside an input block"), z(!(e.dispatch_action === !0 && e.element.type === "file_input"), "invalid_value", `${t}.dispatch_action`, "dispatch_action is incompatible with file_input");
4465
4910
  }
4466
- function gr(e) {
4467
- if (!S(e)) return 0;
4911
+ function Br(e) {
4912
+ if (!w(e)) return 0;
4468
4913
  if (e.type === "raw_text") return typeof e.text == "string" ? e.text.length : 0;
4469
4914
  if (e.type === "raw_number") return typeof e.text == "string" ? e.text.length : typeof e.value == "number" ? String(e.value).length : 0;
4470
4915
  if (e.type === "rich_text" && Array.isArray(e.elements)) {
4471
4916
  let t = 0;
4472
- for (let n of e.elements) if (!(!S(n) || !Array.isArray(n.elements))) for (let e of n.elements) S(e) && (typeof e.text == "string" ? t += e.text.length : typeof e.url == "string" && (t += e.url.length));
4917
+ for (let n of e.elements) if (!(!w(n) || !Array.isArray(n.elements))) for (let e of n.elements) w(e) && (typeof e.text == "string" ? t += e.text.length : typeof e.url == "string" && (t += e.url.length));
4473
4918
  return t;
4474
4919
  }
4475
4920
  return 0;
4476
4921
  }
4477
- function _r(e, t, n) {
4922
+ function Vr(e, t, n) {
4478
4923
  switch (B(e, t), H(e.type, `${t}.type`), e.type) {
4479
4924
  case "raw_text":
4480
4925
  H(e.text, `${t}.text`);
@@ -4485,21 +4930,21 @@ function _r(e, t, n) {
4485
4930
  case "rich_text":
4486
4931
  z(n, "invalid_value", t, "rich_text is not legal in this row"), Q(e, t);
4487
4932
  return;
4488
- default: Jn("invalid_value", `${t}.type`, `unsupported table cell "${e.type}"`);
4933
+ default: vr("invalid_value", `${t}.type`, `unsupported table cell "${e.type}"`);
4489
4934
  }
4490
4935
  }
4491
- function vr(e, t, n, r, i) {
4936
+ function Hr(e, t, n, r, i) {
4492
4937
  V(e, t), z(e.length > 0, "missing_field", t, "must contain at least one row"), z(e.length <= n, "limit_exceeded", t, `must contain at most ${String(n)} rows`);
4493
4938
  let a, o = 0;
4494
4939
  return e.forEach((e, n) => {
4495
4940
  let r = `${t}[${String(n)}]`;
4496
4941
  V(e, r), z(e.length > 0 && e.length <= 20, "limit_exceeded", r, "must contain 1–20 cells"), a === void 0 ? a = e.length : z(e.length === a, "invalid_value", r, "all table rows must contain the same number of cells"), e.forEach((e, t) => {
4497
- _r(e, `${r}[${String(t)}]`, i || n !== 0), o += gr(e);
4942
+ Vr(e, `${r}[${String(t)}]`, i || n !== 0), o += Br(e);
4498
4943
  });
4499
4944
  }), z(o <= r, "limit_exceeded", t, `cell content must contain at most ${String(r)} characters`), a ?? 0;
4500
4945
  }
4501
- function yr(e, t) {
4502
- B(e, t), K(e, "table", t), J(e, t), vr(e.rows, `${t}.rows`, 100, nn, !0), e.column_settings !== void 0 && (V(e.column_settings, `${t}.column_settings`), z(e.column_settings.length <= 20, "limit_exceeded", `${t}.column_settings`, "must contain at most 20 entries"), e.column_settings.forEach((e, n) => {
4946
+ function Ur(e, t) {
4947
+ B(e, t), K(e, "table", t), J(e, t), Hr(e.rows, `${t}.rows`, 100, Dn, !0), e.column_settings !== void 0 && (V(e.column_settings, `${t}.column_settings`), z(e.column_settings.length <= 20, "limit_exceeded", `${t}.column_settings`, "must contain at most 20 entries"), e.column_settings.forEach((e, n) => {
4503
4948
  if (e === null) return;
4504
4949
  let r = `${t}.column_settings[${String(n)}]`;
4505
4950
  B(e, r), e.align !== void 0 && q(e.align, [
@@ -4509,9 +4954,9 @@ function yr(e, t) {
4509
4954
  ], `${r}.align`), G(e.is_wrapped, `${r}.is_wrapped`);
4510
4955
  }));
4511
4956
  }
4512
- function br(e, t) {
4957
+ function Wr(e, t) {
4513
4958
  B(e, t), K(e, "data_table", t), J(e, t), H(e.caption, `${t}.caption`);
4514
- let n = vr(e.rows, `${t}.rows`, 201, rn, !1);
4959
+ let n = Hr(e.rows, `${t}.rows`, 201, On, !1);
4515
4960
  V(e.rows, `${t}.rows`), z(e.rows.length >= 2, "invalid_value", `${t}.rows`, "requires a header row and at least one data row"), e.page_size !== void 0 && W(e.page_size, `${t}.page_size`, {
4516
4961
  integer: !0,
4517
4962
  min: 1,
@@ -4522,7 +4967,7 @@ function br(e, t) {
4522
4967
  max: n - 1
4523
4968
  });
4524
4969
  }
4525
- function xr(e, t) {
4970
+ function Gr(e, t) {
4526
4971
  if (B(e, t), K(e, "data_visualization", t), J(e, t), H(e.title, `${t}.title`, { max: 50 }), B(e.chart, `${t}.chart`), H(e.chart.type, `${t}.chart.type`), e.chart.type === "pie") {
4527
4972
  V(e.chart.segments, `${t}.chart.segments`), z(e.chart.segments.length > 0 && e.chart.segments.length <= 12, "limit_exceeded", `${t}.chart.segments`, "must contain 1–12 segments"), e.chart.segments.forEach((e, n) => {
4528
4973
  let r = `${t}.chart.segments[${String(n)}]`;
@@ -4551,20 +4996,20 @@ function xr(e, t) {
4551
4996
  });
4552
4997
  });
4553
4998
  }
4554
- function Sr(e, t) {
4999
+ function Kr(e, t) {
4555
5000
  B(e, t), K(e, "card", t), J(e, t), z(e.hero_image !== void 0 || e.title !== void 0 || e.actions !== void 0 || e.body !== void 0, "missing_field", t, "requires at least one of hero_image, title, actions, or body"), e.hero_image !== void 0 && Z(e.hero_image, `${t}.hero_image`), e.icon !== void 0 && Z(e.icon, `${t}.icon`), z(!(e.icon !== void 0 && e.slack_icon !== void 0), "invalid_value", t, "icon and slack_icon are mutually exclusive"), e.slack_icon !== void 0 && (B(e.slack_icon, `${t}.slack_icon`), K(e.slack_icon, "icon", `${t}.slack_icon`), H(e.slack_icon.name, `${t}.slack_icon.name`));
4556
5001
  for (let n of ["title", "subtitle"]) e[n] !== void 0 && Y(e[n], `${t}.${n}`, 150);
4557
5002
  for (let n of ["body", "subtext"]) e[n] !== void 0 && Y(e[n], `${t}.${n}`, 200);
4558
5003
  e.actions !== void 0 && (V(e.actions, `${t}.actions`), z(e.actions.length > 0 && e.actions.length <= 3, "limit_exceeded", `${t}.actions`, "must contain 1–3 buttons"), e.actions.forEach((e, n) => {
4559
- nr(e, `${t}.actions[${String(n)}]`);
5004
+ Er(e, `${t}.actions[${String(n)}]`);
4560
5005
  }));
4561
5006
  }
4562
- function Cr(e, t) {
5007
+ function qr(e, t) {
4563
5008
  B(e, t), K(e, "carousel", t), J(e, t), V(e.elements, `${t}.elements`), z(e.elements.length > 0 && e.elements.length <= 10, "limit_exceeded", `${t}.elements`, "must contain 1–10 cards"), e.elements.forEach((e, n) => {
4564
- Sr(e, `${t}.elements[${String(n)}]`);
5009
+ Kr(e, `${t}.elements[${String(n)}]`);
4565
5010
  });
4566
5011
  }
4567
- function wr(e, t, n) {
5012
+ function Jr(e, t, n) {
4568
5013
  B(e, n), K(e, "alert", n), J(e, n), z(t === "modal", "surface_mismatch", n, "alert blocks are only legal on modal surfaces"), Y(e.text, `${n}.text`, 200), e.level !== void 0 && q(e.level, [
4569
5014
  "default",
4570
5015
  "info",
@@ -4573,21 +5018,21 @@ function wr(e, t, n) {
4573
5018
  "success"
4574
5019
  ], `${n}.level`);
4575
5020
  }
4576
- function Tr(e, t) {
5021
+ function Yr(e, t) {
4577
5022
  B(e, t), K(e, "context_actions", t), J(e, t), V(e.elements, `${t}.elements`), z(e.elements.length > 0 && e.elements.length <= 5, "limit_exceeded", `${t}.elements`, "must contain 1–5 elements"), e.elements.forEach((e, n) => {
4578
5023
  let r = `${t}.elements[${String(n)}]`;
4579
- if (B(e, r), er(e, r), e.type === "icon_button") {
4580
- q(e.icon, ["trash"], `${r}.icon`), X(e.text, `${r}.text`, 75), U(e.value, `${r}.value`, { max: tn });
5024
+ if (B(e, r), wr(e, r), e.type === "icon_button") {
5025
+ q(e.icon, ["trash"], `${r}.icon`), X(e.text, `${r}.text`, 75), U(e.value, `${r}.value`, { max: En });
4581
5026
  return;
4582
5027
  }
4583
5028
  z(e.type === "feedback_buttons", "unsupported_element", `${r}.type`, "context_actions only accepts icon_button or feedback_buttons");
4584
5029
  for (let t of ["positive_button", "negative_button"]) {
4585
5030
  let n = `${r}.${t}`;
4586
- B(e[t], n), X(e[t].text, `${n}.text`, 75), H(e[t].value, `${n}.value`, { max: tn });
5031
+ B(e[t], n), X(e[t].text, `${n}.text`, 75), H(e[t].value, `${n}.value`, { max: En });
4587
5032
  }
4588
5033
  });
4589
5034
  }
4590
- function Er(e, t) {
5035
+ function Xr(e, t) {
4591
5036
  B(e, t), K(e, "task_card", t), J(e, t), H(e.task_id, `${t}.task_id`), H(e.title, `${t}.title`), q(e.status, [
4592
5037
  "pending",
4593
5038
  "in_progress",
@@ -4598,12 +5043,12 @@ function Er(e, t) {
4598
5043
  B(e, r), K(e, "url", r), H(e.url, `${r}.url`), H(e.text, `${r}.text`);
4599
5044
  }));
4600
5045
  }
4601
- function Dr(e, t) {
5046
+ function Zr(e, t) {
4602
5047
  B(e, t), K(e, "plan", t), J(e, t), H(e.title, `${t}.title`), e.tasks !== void 0 && (V(e.tasks, `${t}.tasks`), e.tasks.forEach((e, n) => {
4603
- Er(e, `${t}.tasks[${String(n)}]`);
5048
+ Xr(e, `${t}.tasks[${String(n)}]`);
4604
5049
  }));
4605
5050
  }
4606
- function Or(e, t) {
5051
+ function Qr(e, t) {
4607
5052
  B(e, t), K(e, "container", t), J(e, t), z(e.title !== void 0 || e.rich_text_title !== void 0, "missing_field", t, "requires title or rich_text_title"), e.title !== void 0 && X(e.title, `${t}.title`, 150), e.rich_text_title !== void 0 && Q(e.rich_text_title, `${t}.rich_text_title`), e.subtitle !== void 0 && X(e.subtitle, `${t}.subtitle`, 150), e.icon !== void 0 && Z(e.icon, `${t}.icon`), e.width !== void 0 && q(e.width, [
4608
5053
  "narrow",
4609
5054
  "standard",
@@ -4625,122 +5070,122 @@ function Or(e, t) {
4625
5070
  ];
4626
5071
  e.child_blocks.forEach((e, r) => {
4627
5072
  let i = `${t}.child_blocks[${String(r)}]`;
4628
- B(e, i), H(e.type, `${i}.type`), z(n.includes(e.type), "invalid_value", `${i}.type`, `"${e.type}" is not legal inside a container`), jr(e, "message", i);
5073
+ B(e, i), H(e.type, `${i}.type`), z(n.includes(e.type), "invalid_value", `${i}.type`, `"${e.type}" is not legal inside a container`), ti(e, "message", i);
4629
5074
  });
4630
5075
  }
4631
- function kr(e, t) {
5076
+ function $r(e, t) {
4632
5077
  B(e, t), K(e, "file", t), J(e, t), z(e.source === "remote", "invalid_value", `${t}.source`, "expected \"remote\""), H(e.external_id, `${t}.external_id`);
4633
5078
  }
4634
- function Ar(e, t) {
4635
- B(e, t), K(e, "video", t), J(e, t), H(e.video_url, `${t}.video_url`), H(e.thumbnail_url, `${t}.thumbnail_url`), H(e.alt_text, `${t}.alt_text`, { max: Zt }), X(e.title, `${t}.title`, 199), e.description !== void 0 && X(e.description, `${t}.description`, 199), U(e.author_name, `${t}.author_name`, { max: 49 });
5079
+ function ei(e, t) {
5080
+ B(e, t), K(e, "video", t), J(e, t), H(e.video_url, `${t}.video_url`), H(e.thumbnail_url, `${t}.thumbnail_url`), H(e.alt_text, `${t}.alt_text`, { max: Sn }), X(e.title, `${t}.title`, 199), e.description !== void 0 && X(e.description, `${t}.description`, 199), U(e.author_name, `${t}.author_name`, { max: 49 });
4636
5081
  }
4637
5082
  function $(e, t, n) {
4638
5083
  z(e === "message", "surface_mismatch", t, `${n} blocks are only documented for message surfaces`);
4639
5084
  }
4640
- function jr(e, t = "message", n = "block") {
5085
+ function ti(e, t = "message", n = "block") {
4641
5086
  switch (B(e, n), J(e, n), e.type) {
4642
5087
  case "actions":
4643
- mr(e, n);
5088
+ Rr(e, n);
4644
5089
  return;
4645
5090
  case "alert":
4646
- wr(e, t, n);
5091
+ Jr(e, t, n);
4647
5092
  return;
4648
5093
  case "card":
4649
- $(t, n, e.type), Sr(e, n);
5094
+ $(t, n, e.type), Kr(e, n);
4650
5095
  return;
4651
5096
  case "carousel":
4652
- $(t, n, e.type), Cr(e, n);
5097
+ $(t, n, e.type), qr(e, n);
4653
5098
  return;
4654
5099
  case "container":
4655
- $(t, n, e.type), Or(e, n);
5100
+ $(t, n, e.type), Qr(e, n);
4656
5101
  return;
4657
5102
  case "context":
4658
- pr(e, n);
5103
+ Lr(e, n);
4659
5104
  return;
4660
5105
  case "context_actions":
4661
- $(t, n, e.type), Tr(e, n);
5106
+ $(t, n, e.type), Yr(e, n);
4662
5107
  return;
4663
5108
  case "data_table":
4664
- $(t, n, e.type), br(e, n);
5109
+ $(t, n, e.type), Wr(e, n);
4665
5110
  return;
4666
5111
  case "data_visualization":
4667
- $(t, n, e.type), xr(e, n);
5112
+ $(t, n, e.type), Gr(e, n);
4668
5113
  return;
4669
5114
  case "divider":
4670
5115
  K(e, "divider", n);
4671
5116
  return;
4672
5117
  case "file":
4673
- $(t, n, e.type), kr(e, n);
5118
+ $(t, n, e.type), $r(e, n);
4674
5119
  return;
4675
5120
  case "header":
4676
- dr(e, n);
5121
+ Fr(e, n);
4677
5122
  return;
4678
5123
  case "image":
4679
- fr(e, n);
5124
+ Ir(e, n);
4680
5125
  return;
4681
5126
  case "input":
4682
- hr(e, n);
5127
+ zr(e, n);
4683
5128
  return;
4684
5129
  case "markdown":
4685
- $(t, n, e.type), H(e.text, `${n}.text`, { max: $t });
5130
+ $(t, n, e.type), H(e.text, `${n}.text`, { max: wn });
4686
5131
  return;
4687
5132
  case "plan":
4688
- $(t, n, e.type), Dr(e, n);
5133
+ $(t, n, e.type), Zr(e, n);
4689
5134
  return;
4690
5135
  case "rich_text":
4691
5136
  Q(e, n);
4692
5137
  return;
4693
5138
  case "section":
4694
- ur(e, n);
5139
+ Pr(e, n);
4695
5140
  return;
4696
5141
  case "table":
4697
- $(t, n, e.type), yr(e, n);
5142
+ $(t, n, e.type), Ur(e, n);
4698
5143
  return;
4699
5144
  case "task_card":
4700
- $(t, n, e.type), Er(e, n);
5145
+ $(t, n, e.type), Xr(e, n);
4701
5146
  return;
4702
5147
  case "video":
4703
- Ar(e, n);
5148
+ ei(e, n);
4704
5149
  return;
4705
- default: Jn("unsupported_block", `${n}.type`, `unsupported block "${String(e.type)}"`);
5150
+ default: vr("unsupported_block", `${n}.type`, `unsupported block "${String(e.type)}"`);
4706
5151
  }
4707
5152
  }
4708
- function Mr(e, t, n = "message", r = "block") {
4709
- jr(e, n, r), z(e.type === t, "invalid_value", `${r}.type`, `expected "${t}"`);
5153
+ function ni(e, t, n = "message", r = "block") {
5154
+ ti(e, n, r), z(e.type === t, "invalid_value", `${r}.type`, `expected "${t}"`);
4710
5155
  }
4711
- function Nr(e, t) {
5156
+ function ri(e, t) {
4712
5157
  return Array.isArray(e) ? e : (B(e, t), V(e.blocks, `${t}.blocks`), e.blocks);
4713
5158
  }
4714
- function Pr(e, t = "message", n = "data") {
4715
- let r = Array.isArray(e) ? n : `${n}.blocks`, i = Nr(e, n), a = t === "message" ? 50 : 100;
5159
+ function ii(e, t = "message", n = "data") {
5160
+ let r = Array.isArray(e) ? n : `${n}.blocks`, i = ri(e, n), a = t === "message" ? 50 : 100;
4716
5161
  z(i.length <= a, "limit_exceeded", r, `${t} surfaces accept at most ${String(a)} blocks`);
4717
5162
  let o = 0, s = 0, c = 0, l = /* @__PURE__ */ new Set();
4718
5163
  i.forEach((e, n) => {
4719
5164
  let i = `${r}[${String(n)}]`;
4720
- if (jr(e, t, i), e.block_id !== void 0 && (z(!l.has(e.block_id), "duplicate_id", `${i}.block_id`, `"${e.block_id}" is already used in this payload`), l.add(e.block_id)), e.type === "markdown") o += e.text.length;
4721
- else if (e.type === "table") for (let t of e.rows) for (let e of t) s += gr(e);
4722
- else if (e.type === "data_table") for (let t of e.rows) for (let e of t) c += gr(e);
4723
- }), z(o <= $t, "limit_exceeded", r, `markdown blocks exceed the cumulative ${String($t)} character limit`), z(s <= nn, "limit_exceeded", r, `table cells exceed the cumulative ${String(nn)} character limit`), z(c <= rn, "limit_exceeded", r, `data_table cells exceed the cumulative ${String(rn)} character limit`);
5165
+ if (ti(e, t, i), e.block_id !== void 0 && (z(!l.has(e.block_id), "duplicate_id", `${i}.block_id`, `"${e.block_id}" is already used in this payload`), l.add(e.block_id)), e.type === "markdown") o += e.text.length;
5166
+ else if (e.type === "table") for (let t of e.rows) for (let e of t) s += Br(e);
5167
+ else if (e.type === "data_table") for (let t of e.rows) for (let e of t) c += Br(e);
5168
+ }), z(o <= wn, "limit_exceeded", r, `markdown blocks exceed the cumulative ${String(wn)} character limit`), z(s <= Dn, "limit_exceeded", r, `table cells exceed the cumulative ${String(Dn)} character limit`), z(c <= On, "limit_exceeded", r, `data_table cells exceed the cumulative ${String(On)} character limit`);
4724
5169
  }
4725
- function Fr(e, t = "message") {
5170
+ function ai(e, t = "message") {
4726
5171
  let n = e;
4727
5172
  if (typeof e == "string") try {
4728
5173
  n = JSON.parse(e);
4729
5174
  } catch {
4730
- throw new Gn("expected valid JSON", {
5175
+ throw new hr("expected valid JSON", {
4731
5176
  code: "invalid_json",
4732
5177
  path: "data"
4733
5178
  });
4734
5179
  }
4735
- return Pr(n, t), n;
5180
+ return ii(n, t), n;
4736
5181
  }
4737
- function Ir(e) {
4738
- return Lr(e) ? e.blocks : e;
5182
+ function oi(e) {
5183
+ return si(e) ? e.blocks : e;
4739
5184
  }
4740
- function Lr(e) {
5185
+ function si(e) {
4741
5186
  return !Array.isArray(e);
4742
5187
  }
4743
5188
  //#endregion
4744
- export { Mn as ActionsBlock, Ut as AlertBlock, zn as Block, qn as BlockKit, Gn as BlockKitInvariantError, b as BlockKitProvider, Ve as ButtonElement, Bt as CardBlock, Ht as CarouselBlock, Ge as ChoiceGroup, Wn as ContainerBlock, Fn as ContextActionsBlock, kt as ContextBlock, zt as DataTableBlock, On as DataVisualizationBlock, Et as DividerBlock, Mt as FileBlock, Tt as HeaderBlock, Dt as ImageBlock, P as ImageElement, Nn as InputBlock, it as InputElement, at as InteractiveElement, St as Markdown, jt as MarkdownBlock, F as Mrkdwn, He as OverflowElement, Kt as PlanBlock, M as RichText, At as RichTextBlock, wt as SectionBlock, $e as SelectElement, It as TableBlock, Pt as TableCell, Wt as TaskCardBlock, I as Text, Nt as VideoBlock, Pr as assertBlockKitData, Mr as assertBlockType, Zn as assertImageElementData, ar as assertInteractiveElementData, jr as assertRenderableBlock, lr as assertRichTextBlockData, Yn as assertTextObjectData, Ir as blocksOf, ne as darkTheme, te as lightTheme, Fr as parseBlockKitData, yt as tokenizeMarkdown, pt as tokenizeMrkdwn, ee as tokens, x as useBlockKitContext };
5189
+ export { nr as ActionsBlock, mn as AlertBlock, lr as Block, _r as BlockKit, hr as BlockKitInvariantError, b as BlockKitProvider, lt as ButtonElement, dn as CardBlock, pn as CarouselBlock, pt as ChoiceGroup, mr as ContainerBlock, ar as ContextActionsBlock, Qt as ContextBlock, ln as DataTableBlock, Qn as DataVisualizationBlock, Yt as DividerBlock, tn as FileBlock, Jt as HeaderBlock, Xt as ImageBlock, F as ImageElement, rr as InputBlock, Et as InputElement, Dt as InteractiveElement, Gt as Markdown, en as MarkdownBlock, I as Mrkdwn, ut as OverflowElement, _n as PlanBlock, N as RichText, $t as RichTextBlock, qt as SectionBlock, xt as SelectElement, on as TableBlock, rn as TableCell, hn as TaskCardBlock, L as Text, nn as VideoBlock, ii as assertBlockKitData, ni as assertBlockType, xr as assertImageElementData, kr as assertInteractiveElementData, ti as assertRenderableBlock, Nr as assertRichTextBlockData, yr as assertTextObjectData, oi as blocksOf, we as darkTheme, Ce as lightTheme, ai as parseBlockKitData, Vt as tokenizeMarkdown, Ft as tokenizeMrkdwn, Se as tokens, x as useBlockKitContext };
4745
5190
 
4746
5191
  //# sourceMappingURL=index.js.map