@orangelogic/design-system 2.63.0-pr83530.6 → 2.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/library/chunks/array.DCtvHiLS.js +81 -0
  2. package/library/chunks/{color-swatch-group.gu6NbIB_.js → color-swatch-group.BaFFkIh8.js} +3 -3
  3. package/library/chunks/content-builder.Bf7kqzDI.js +42 -0
  4. package/library/chunks/{index.Bhnf0N8Q.js → index.DlyaD23D.js} +177 -177
  5. package/library/chunks/{list-editor.Bp1jMvFz.js → list-editor.OXCgQphx.js} +2 -2
  6. package/library/chunks/{responsive.DgQTIrna.js → responsive.CA6dcNiM.js} +1 -1
  7. package/library/chunks/{table.DUcvVqNw.js → table.D34xVq4y.js} +1384 -1396
  8. package/library/components/atoms.js +1 -1
  9. package/library/components/color-swatch-group.js +4 -4
  10. package/library/components/list-editor.js +2 -2
  11. package/library/components/molecules.js +1 -1
  12. package/library/components/organisms.js +1 -1
  13. package/library/components/table.js +1 -1
  14. package/library/components/types.js +304 -303
  15. package/library/package.json +1 -1
  16. package/library/packages/atoms/src/components/table/table.d.ts +10 -13
  17. package/library/packages/atoms/src/components/table/table.utils.d.ts +4 -0
  18. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Clipboard/Clipboard.d.ts +6 -7
  19. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Export/ExportColumn.d.ts +2 -2
  20. package/library/packages/types/src/table.d.ts +0 -28
  21. package/library/react-web-component.d.ts +3 -7
  22. package/library/utils.js +19 -19
  23. package/package.json +1 -1
  24. package/library/chunks/content-builder.Bxi6k2LA.js +0 -121
  25. package/library/packages/atoms/src/components/table/tabulator-tables/core/types.d.ts +0 -14
@@ -0,0 +1,81 @@
1
+ function g(n, r) {
2
+ return n.filter((e, t) => t !== r);
3
+ }
4
+ function w(n, r) {
5
+ return n.filter((e, t) => !r.includes(t));
6
+ }
7
+ function v(n, r, e) {
8
+ return [...n.slice(0, r), e, ...n.slice(r)];
9
+ }
10
+ function h(n, r, e) {
11
+ return [...n.slice(0, r), ...e, ...n.slice(r)];
12
+ }
13
+ function F(n, r, e) {
14
+ return n.findIndex((t) => t[r] === e);
15
+ }
16
+ function M(n, r, e) {
17
+ const t = [...n], s = g(t, r);
18
+ let o = e;
19
+ return o >= n.length - 1 && (o = o + 1), v(s, o, n[r]);
20
+ }
21
+ function T(n, r, e) {
22
+ const t = [...n], s = w(t, r), o = e !== 0 ? r.reduce(
23
+ (u, f) => e > f ? u - 1 : u,
24
+ e
25
+ ) : e;
26
+ return h(
27
+ s,
28
+ o,
29
+ r.map((u) => n[u])
30
+ );
31
+ }
32
+ function b(n, r) {
33
+ return n.reduce(
34
+ (e, t) => {
35
+ const s = t[r];
36
+ return e[s] ??= [], e[s].push(t), e;
37
+ },
38
+ {}
39
+ );
40
+ }
41
+ function y(n, r, e) {
42
+ if (!n.length)
43
+ return [r];
44
+ const t = e.findIndex(
45
+ (i) => i.id === r
46
+ ), s = n[n.length - 1], o = e.findIndex(
47
+ (i) => i.id === s
48
+ );
49
+ if (t < 0 || o < 0)
50
+ return [r];
51
+ const c = e.reduce(
52
+ (i, l, x) => (i[l.id] = x, i),
53
+ {}
54
+ ), u = t > o, f = u ? o : t, A = u ? t : o, d = e.slice(f, A + 1).filter((i) => !(!i || n.includes(i.id))).map((i) => i.id), p = u ? d : [...d].reverse(), a = n.includes(r) ? n.slice(0, n.indexOf(r) + 1) : [...n, ...p];
55
+ return a.sort((i, l) => c[i] - c[l]), a;
56
+ }
57
+ function E(n, r, e, t, s, o) {
58
+ const c = e + 1;
59
+ if (n.length < 2)
60
+ throw new Error("Values array must contain at least 2 elements");
61
+ if (e < 0 || c >= n.length)
62
+ throw new Error("Invalid index or not enough values to adjust");
63
+ if (t < 0)
64
+ throw new Error("Minimum value must be non-negative");
65
+ let u = s + r;
66
+ u < t && (r = t - s, u = t);
67
+ let f = o - r;
68
+ f < t && (r = o - t, u = s + r, f = t), n[e] = parseFloat(u.toFixed(2)), n[c] = parseFloat(f.toFixed(2));
69
+ }
70
+ export {
71
+ T as a,
72
+ g as b,
73
+ v as c,
74
+ M as d,
75
+ E as e,
76
+ F as f,
77
+ b as g,
78
+ h as i,
79
+ y as m,
80
+ w as r
81
+ };
@@ -1,15 +1,15 @@
1
1
  import z from "../components/space.js";
2
- import { C as $ } from "./table.DUcvVqNw.js";
2
+ import { C as $ } from "./table.D34xVq4y.js";
3
3
  import { C as k } from "./typography.oDzoLbZS.js";
4
4
  import { n as h, C as F } from "./lib-cortex-element.CVMmyPMC.js";
5
5
  import { C, a as m } from "./color-swatch.B7XXHxx1.js";
6
6
  import { c as A } from "./component.styles.DMSLciL5.js";
7
- import { D as p } from "./content-builder.Bxi6k2LA.js";
7
+ import { D as p } from "./content-builder.Bf7kqzDI.js";
8
8
  import { c as S } from "./custom-element.L4WJXn1j.js";
9
9
  import { d as T } from "./debounce.DaHuiSGU.js";
10
10
  import { L as E } from "./i18n.BMRLOAZR.js";
11
11
  import { w as x } from "./watch.q1sEjPWL.js";
12
- import { g as D, a as R } from "./responsive.DgQTIrna.js";
12
+ import { g as D, a as R } from "./responsive.CA6dcNiM.js";
13
13
  import { x as l, B as H, i as O } from "./lit-element.jLBm65_O.js";
14
14
  import { r as d } from "./state.CSDxrqLd.js";
15
15
  import { e as P } from "./query.BBf1UFkC.js";
@@ -0,0 +1,42 @@
1
+ import { c as t } from "./capitalize.WSkCXkNE.js";
2
+ var n = /* @__PURE__ */ ((a) => (a.Desktop = "desktop", a.Mobile = "mobile", a.Tablet = "tablet", a))(n || {});
3
+ const e = {
4
+ canvasWidth: "",
5
+ height: "",
6
+ id: "desktop",
7
+ maxWidth: "",
8
+ name: t(
9
+ "desktop"
10
+ /* Desktop */
11
+ )
12
+ }, l = {
13
+ canvasWidth: "770px",
14
+ height: "",
15
+ id: "tablet",
16
+ maxWidth: "1280px",
17
+ name: t(
18
+ "tablet"
19
+ /* Tablet */
20
+ )
21
+ }, r = {
22
+ canvasWidth: "320px",
23
+ height: "",
24
+ id: "mobile",
25
+ maxWidth: "480px",
26
+ name: t(
27
+ "mobile"
28
+ /* Mobile */
29
+ )
30
+ }, g = [e, l, r];
31
+ var d = /* @__PURE__ */ ((a) => (a.All = "ALL", a.CanDelete = "CanDelete", a.CanDownload = "CanDownload", a.CanFind = "CanFind", a.CanManageRights = "CanManageRights", a.CanMove = "CanMove", a.CanRead = "CanRead", a.CanReadAll = "CanReadAll", a.CanReadAndWrite = "CanReadAndWrite", a.CanReadLarge = "CanReadLarge", a.CanReadMedium = "CanReadMedium", a.CanReadOriginal = "CanReadOriginal", a.CanShare = "CanShare", a.CanUpload = "CanUpload", a.CanWrite = "CanWrite", a.None = "NONE", a))(d || {}), o = /* @__PURE__ */ ((a) => (a.All = "all", a.Audio = "audio", a.Image = "image", a.Other = "other", a.Video = "video", a))(o || {}), C = /* @__PURE__ */ ((a) => (a.Content = "content", a.Template = "template", a))(C || {}), i = /* @__PURE__ */ ((a) => (a.Administrator = "Administrator", a.Designer = "Designer", a.Editor = "Editor", a))(i || {}), h = /* @__PURE__ */ ((a) => (a.Accordion = "BlockAccordion", a.Analytics = "BlockAnalytics", a.Button = "BlockButton", a.Carousel = "BlockCarousel", a.ColorSwatches = "BlockColorSwatches", a.Column = "BlockCell", a.ColumnGroup = "BlockColumns", a.Divider = "BlockDivider", a.FontKit = "BlockFontKit", a.Gallery = "BlockGallery", a.Header = "BlockHeader", a.Image = "BlockImage", a.RichText = "BlockRichText", a.SearchBox = "BlockSearchBox", a.TabGroup = "BlockTabs", a.Text = "BlockText", a.Timeline = "BlockTimeline", a.Video = "BlockVideo", a))(h || {}), u = /* @__PURE__ */ ((a) => (a.Carousel = "carousel", a.Gallery = "gallery", a))(u || {}), A = /* @__PURE__ */ ((a) => (a.Templates = "TEMPLATES", a.TranslatableAttributes = "TRANSLATABLE_ATTRIBUTES", a.TranslatableTexts = "TRANSLATABLE_TEXTS", a))(A || {});
32
+ export {
33
+ o as A,
34
+ h as B,
35
+ n as D,
36
+ C as E,
37
+ d as P,
38
+ i as T,
39
+ u as a,
40
+ A as b,
41
+ g as c
42
+ };
@@ -1,5 +1,5 @@
1
1
  import { a as S } from "./url.LjsR2sB5.js";
2
- import "./content-builder.Bxi6k2LA.js";
2
+ import "./array.DCtvHiLS.js";
3
3
  import "./browser.BHOCIF_A.js";
4
4
  import "./color.vLD2sNTs.js";
5
5
  import "./modal.U1QltQKe.js";
@@ -23,12 +23,52 @@ import "./toast.BXNbwZV8.js";
23
23
  import "./image.mbpyiQpQ.js";
24
24
  import "./number.CjNxU7Xs.js";
25
25
  import "./parse.Cu5nBDTb.js";
26
- import "./responsive.DgQTIrna.js";
26
+ import "./responsive.CA6dcNiM.js";
27
27
  import "./string.Cp_XNbnV.js";
28
28
  import "./template.CsJd8Pb_.js";
29
29
  import "./time.D_uFZqqe.js";
30
+ function ut(t, e) {
31
+ return typeof Storage < "u" && localStorage.getItem(t) !== null ? localStorage.getItem(t) : e;
32
+ }
33
+ function ct(t, e) {
34
+ typeof Storage < "u" && localStorage.setItem(t, e.toString());
35
+ }
36
+ class ht {
37
+ constructor(e) {
38
+ this.currentZIndex = M(), (this.host = e).addController(this);
39
+ }
40
+ hostConnected() {
41
+ }
42
+ hostDisconnected() {
43
+ }
44
+ async activatePopup() {
45
+ this.currentZIndex = M();
46
+ }
47
+ }
48
+ const mt = (t) => t.ctrlKey || t.metaKey;
30
49
  var d = /* @__PURE__ */ ((t) => (t.DoNothing = "do-nothing", t.DownloadAsset = "download-asset", t.ExpandAssetInFullScreen = "expand-asset-in-full-screen", t.OpenAssetOverview = "open-asset-overview", t.OpenLink = "open-link", t.OpenPage = "open-page", t.OpenSpace = "open-space", t.ShareAsset = "share-asset", t.ShowAssetInLibrary = "show-asset-in-library", t))(d || {}), b = /* @__PURE__ */ ((t) => (t.Bento = "bento", t.Carousel = "carousel", t.Grid = "grid", t.Ribbon = "ribbon", t))(b || {}), E = /* @__PURE__ */ ((t) => (t.Expand = "expand", t.Split = "split", t))(E || {}), L = /* @__PURE__ */ ((t) => (t.Api = "api", t.Manual = "manual", t))(L || {}), O = /* @__PURE__ */ ((t) => (t.Automatic = "automatic", t.Custom = "custom", t))(O || {}), f = /* @__PURE__ */ ((t) => (t.DoNothing = "do-nothing", t.OpenAssetInLibrary = "open-asset-in-library", t.OpenAssetOverview = "open-asset-overview", t.Zoom = "zoom", t))(f || {});
31
- function ut(t) {
50
+ function dt(t) {
51
+ const e = new FormData(t), s = {};
52
+ return e.forEach((n, r) => {
53
+ if (Reflect.has(s, r)) {
54
+ const o = s[r];
55
+ Array.isArray(o) ? o.push(n) : s[r] = [s[r], n];
56
+ } else
57
+ s[r] = n;
58
+ }), s;
59
+ }
60
+ function A(t) {
61
+ const s = [...t.getRootNode().querySelectorAll("*")], n = [...t.elements], r = x.get(t), o = r ? Array.from(r) : [];
62
+ return [...n, ...o].sort(
63
+ (i, a) => s.indexOf(i) < s.indexOf(a) ? -1 : s.indexOf(i) > s.indexOf(a) ? 1 : 0
64
+ );
65
+ }
66
+ function ft(t) {
67
+ return A(t).some(
68
+ (s) => s.hasAttribute("data-user-valid") || s.hasAttribute("data-user-invalid")
69
+ );
70
+ }
71
+ function pt(t) {
32
72
  if (!this.ownerDocument.defaultView?.Matrix3 || !t)
33
73
  return;
34
74
  const e = this.ownerDocument.defaultView?.location.origin;
@@ -40,7 +80,7 @@ function ut(t) {
40
80
  e
41
81
  );
42
82
  }
43
- function ct(t) {
83
+ function gt(t) {
44
84
  if (!this.ownerDocument.defaultView?.Matrix3 || !t)
45
85
  return;
46
86
  const e = this.ownerDocument.defaultView?.location.origin;
@@ -52,13 +92,13 @@ function ct(t) {
52
92
  e
53
93
  );
54
94
  }
55
- function ht(t, e = void 0) {
95
+ function wt(t, e = void 0) {
56
96
  !this.ownerDocument.defaultView?.Matrix3 || !t || this.ownerDocument.defaultView?.open(
57
97
  S(t, "https://", !0),
58
98
  e ?? "_blank"
59
99
  );
60
100
  }
61
- function mt(t) {
101
+ function yt(t) {
62
102
  if (!this.ownerDocument.defaultView?.Matrix3 || !t)
63
103
  return;
64
104
  const e = this.ownerDocument.defaultView?.location.origin;
@@ -70,7 +110,7 @@ function mt(t) {
70
110
  e
71
111
  );
72
112
  }
73
- function dt(t, e) {
113
+ function Dt(t, e) {
74
114
  if (!this.ownerDocument.defaultView?.Matrix3 || !t || !e)
75
115
  return;
76
116
  const s = this.ownerDocument.defaultView?.location.origin;
@@ -79,7 +119,7 @@ function dt(t, e) {
79
119
  s
80
120
  );
81
121
  }
82
- function ft(t) {
122
+ function Mt(t) {
83
123
  switch (t) {
84
124
  case d.OpenAssetOverview:
85
125
  return f.OpenAssetOverview;
@@ -91,19 +131,108 @@ function ft(t) {
91
131
  return t;
92
132
  }
93
133
  }
94
- class pt {
95
- constructor(e) {
96
- this.currentZIndex = M(), (this.host = e).addController(this);
97
- }
98
- hostConnected() {
99
- }
100
- hostDisconnected() {
134
+ function Ct(t, e) {
135
+ const s = {}, n = new Set(e);
136
+ return Object.keys(t).forEach((r) => {
137
+ n.has(r) || (s[r] = t[r]);
138
+ }), s;
139
+ }
140
+ function vt(t, e) {
141
+ const s = {};
142
+ return e.forEach((n) => {
143
+ n in t && (s[n] = t[n]);
144
+ }), s;
145
+ }
146
+ const I = 10;
147
+ function St(t, e) {
148
+ let s = 0, n = t.length;
149
+ for (; s < n; ) {
150
+ const r = Math.floor((s + n) / 2);
151
+ t[r].time < e.time ? s = r + 1 : n = r;
101
152
  }
102
- async activatePopup() {
103
- this.currentZIndex = M();
153
+ t.splice(s, 0, e);
154
+ }
155
+ function F(t, e, s) {
156
+ return t.find(
157
+ (n) => n.col === e && n.row === s
158
+ ) ?? null;
159
+ }
160
+ function k(t, e, s) {
161
+ return new Promise((n) => {
162
+ if (e > 0 && Math.abs(t.currentTime - e) < 1e-3) {
163
+ n();
164
+ return;
165
+ }
166
+ if (e === 0) {
167
+ const r = () => {
168
+ t.removeEventListener("seeked", r);
169
+ const o = () => {
170
+ t.removeEventListener("seeked", o), n();
171
+ };
172
+ t.addEventListener("seeked", o), t.currentTime = 0;
173
+ };
174
+ t.addEventListener("seeked", r), t.currentTime = s;
175
+ } else {
176
+ const r = () => {
177
+ t.removeEventListener("seeked", r), n();
178
+ };
179
+ t.addEventListener("seeked", r), t.currentTime = e;
180
+ }
181
+ });
182
+ }
183
+ async function* xt({
184
+ cache: t,
185
+ canvas: e,
186
+ duration: s,
187
+ maxInterval: n,
188
+ src: r,
189
+ video: o
190
+ }) {
191
+ if (!e)
192
+ throw new Error("Canvas is required");
193
+ if (!o)
194
+ throw new Error("Video is required");
195
+ const { columns: i, frameHeight: a, frameWidth: h, rows: l, spriteCtx: v } = e;
196
+ try {
197
+ for (let u = 0; u < l; u++)
198
+ for (let c = 0; c < i; c++) {
199
+ const p = u * i + c, m = p * n;
200
+ if (m >= s)
201
+ continue;
202
+ const g = c * h, w = u * a, y = F(t[r] ?? [], c, u), D = c === i - 1 && u === l - 1 || m + n >= s;
203
+ y ? yield { ...y, isLastFrame: D } : (await k(o, m, n), v.drawImage(
204
+ o,
205
+ g,
206
+ w,
207
+ h,
208
+ a
209
+ ), yield {
210
+ col: c,
211
+ columns: i,
212
+ frameHeight: a,
213
+ frameWidth: h,
214
+ index: p,
215
+ isLastFrame: D,
216
+ row: u,
217
+ rows: l,
218
+ time: Number(m.toFixed(I)),
219
+ x: g,
220
+ y: w
221
+ }), await new Promise(requestAnimationFrame);
222
+ }
223
+ } catch {
104
224
  }
105
225
  }
106
- class gt {
226
+ function bt({
227
+ duration: t,
228
+ frameWidth: e,
229
+ playbackSpeed: s,
230
+ scale: n
231
+ }) {
232
+ let r = e * s / n;
233
+ return r > t && (r = t / 2), r;
234
+ }
235
+ class Et {
107
236
  constructor(e, s = {}) {
108
237
  this.element = e, this.noChildDrag = s.noChildDrag ?? !1, this.dragThreshold = s.dragThreshold ?? 5, this.isDragging = !1, this.hasDragged = !1, this.startX = 0, this.startY = 0, this.lastClientX = 0, this.lastClientY = 0, this.onMouseDown = this.onMouseDown.bind(this), this.onMouseMove = this.onMouseMove.bind(this), this.onMouseUp = this.onMouseUp.bind(this), this.onClick = this.onClick.bind(this), this.attach();
109
238
  }
@@ -129,14 +258,13 @@ class gt {
129
258
  this.hasDragged && (e.stopImmediatePropagation(), e.preventDefault());
130
259
  }
131
260
  }
132
- const wt = (t) => t.ctrlKey || t.metaKey;
133
261
  function C(t, e) {
134
262
  if (!t?.document)
135
263
  return !1;
136
264
  const s = "mmmmmmmmmmwwwwwww", n = "32px", o = t.document.createElement("canvas").getContext("2d"), i = (l) => o ? (o.font = `${n} ${l}, monospace`, o.measureText(s).width) : 0, a = i("monospace");
137
265
  return i(e) !== a;
138
266
  }
139
- function yt(t, e) {
267
+ function Lt(t, e) {
140
268
  if (!t?.document.fonts)
141
269
  return !1;
142
270
  let s = !1;
@@ -144,7 +272,7 @@ function yt(t, e) {
144
272
  n.family.replace(/['"]/g, "").toLowerCase() === e.toLowerCase() && (s = !0);
145
273
  }), s ? !0 : C(t, e);
146
274
  }
147
- function A(t) {
275
+ function V(t) {
148
276
  const e = /\bitalic\b/i, s = /\b(semi[-\s]?condensed|condensed)\b/i, n = (r) => {
149
277
  const o = r.fontFamily.toLowerCase(), i = r.fontStyle.toLowerCase(), a = e.test(i), h = s.test(o);
150
278
  let l = 0;
@@ -159,7 +287,7 @@ function A(t) {
159
287
  return i.weight !== a.weight ? i.weight - a.weight : i.styleRank !== a.styleRank ? i.styleRank - a.styleRank : i.family.localeCompare(a.family);
160
288
  });
161
289
  }
162
- function Dt(t, e, s = [300, 400, 500, 700, 900], n = ["normal", "italic"]) {
290
+ function Ot(t, e, s = [300, 400, 500, 700, 900], n = ["normal", "italic"]) {
163
291
  const r = [];
164
292
  if (C(t, e))
165
293
  for (const o of s)
@@ -170,30 +298,9 @@ function Dt(t, e, s = [300, 400, 500, 700, 900], n = ["normal", "italic"]) {
170
298
  fontWeight: o.toString(),
171
299
  src: ""
172
300
  });
173
- return A(r);
174
- }
175
- function Mt(t) {
176
- const e = new FormData(t), s = {};
177
- return e.forEach((n, r) => {
178
- if (Reflect.has(s, r)) {
179
- const o = s[r];
180
- Array.isArray(o) ? o.push(n) : s[r] = [s[r], n];
181
- } else
182
- s[r] = n;
183
- }), s;
184
- }
185
- function I(t) {
186
- const s = [...t.getRootNode().querySelectorAll("*")], n = [...t.elements], r = x.get(t), o = r ? Array.from(r) : [];
187
- return [...n, ...o].sort(
188
- (i, a) => s.indexOf(i) < s.indexOf(a) ? -1 : s.indexOf(i) > s.indexOf(a) ? 1 : 0
189
- );
190
- }
191
- function Ct(t) {
192
- return I(t).some(
193
- (s) => s.hasAttribute("data-user-valid") || s.hasAttribute("data-user-invalid")
194
- );
301
+ return V(r);
195
302
  }
196
- class vt {
303
+ class At {
197
304
  constructor(e = null) {
198
305
  this.history = e !== null ? [e] : [], this.redoStack = [];
199
306
  }
@@ -230,144 +337,37 @@ class vt {
230
337
  return [...this.history];
231
338
  }
232
339
  }
233
- function St(t, e) {
234
- const s = {}, n = new Set(e);
235
- return Object.keys(t).forEach((r) => {
236
- n.has(r) || (s[r] = t[r]);
237
- }), s;
238
- }
239
- function xt(t, e) {
240
- const s = {};
241
- return e.forEach((n) => {
242
- n in t && (s[n] = t[n]);
243
- }), s;
244
- }
245
- function bt(t, e) {
246
- return typeof Storage < "u" && localStorage.getItem(t) !== null ? localStorage.getItem(t) : e;
247
- }
248
- function Et(t, e) {
249
- typeof Storage < "u" && localStorage.setItem(t, e.toString());
250
- }
251
- const F = 10;
252
- function Lt(t, e) {
253
- let s = 0, n = t.length;
254
- for (; s < n; ) {
255
- const r = Math.floor((s + n) / 2);
256
- t[r].time < e.time ? s = r + 1 : n = r;
257
- }
258
- t.splice(s, 0, e);
259
- }
260
- function k(t, e, s) {
261
- return t.find(
262
- (n) => n.col === e && n.row === s
263
- ) ?? null;
264
- }
265
- function V(t, e, s) {
266
- return new Promise((n) => {
267
- if (e > 0 && Math.abs(t.currentTime - e) < 1e-3) {
268
- n();
269
- return;
270
- }
271
- if (e === 0) {
272
- const r = () => {
273
- t.removeEventListener("seeked", r);
274
- const o = () => {
275
- t.removeEventListener("seeked", o), n();
276
- };
277
- t.addEventListener("seeked", o), t.currentTime = 0;
278
- };
279
- t.addEventListener("seeked", r), t.currentTime = s;
280
- } else {
281
- const r = () => {
282
- t.removeEventListener("seeked", r), n();
283
- };
284
- t.addEventListener("seeked", r), t.currentTime = e;
285
- }
286
- });
287
- }
288
- async function* Ot({
289
- cache: t,
290
- canvas: e,
291
- duration: s,
292
- maxInterval: n,
293
- src: r,
294
- video: o
295
- }) {
296
- if (!e)
297
- throw new Error("Canvas is required");
298
- if (!o)
299
- throw new Error("Video is required");
300
- const { columns: i, frameHeight: a, frameWidth: h, rows: l, spriteCtx: v } = e;
301
- try {
302
- for (let u = 0; u < l; u++)
303
- for (let c = 0; c < i; c++) {
304
- const p = u * i + c, m = p * n;
305
- if (m >= s)
306
- continue;
307
- const g = c * h, w = u * a, y = k(t[r] ?? [], c, u), D = c === i - 1 && u === l - 1 || m + n >= s;
308
- y ? yield { ...y, isLastFrame: D } : (await V(o, m, n), v.drawImage(
309
- o,
310
- g,
311
- w,
312
- h,
313
- a
314
- ), yield {
315
- col: c,
316
- columns: i,
317
- frameHeight: a,
318
- frameWidth: h,
319
- index: p,
320
- isLastFrame: D,
321
- row: u,
322
- rows: l,
323
- time: Number(m.toFixed(F)),
324
- x: g,
325
- y: w
326
- }), await new Promise(requestAnimationFrame);
327
- }
328
- } catch {
329
- }
330
- }
331
- function At({
332
- duration: t,
333
- frameWidth: e,
334
- playbackSpeed: s,
335
- scale: n
336
- }) {
337
- let r = e * s / n;
338
- return r > t && (r = t / 2), r;
339
- }
340
340
  export {
341
- pt as C,
342
- gt as D,
341
+ ht as C,
342
+ Et as D,
343
343
  b as G,
344
- vt as H,
344
+ At as H,
345
345
  E as O,
346
- F as P,
346
+ I as P,
347
347
  L as S,
348
348
  d as a,
349
349
  O as b,
350
350
  f as c,
351
- Ct as d,
352
- Ot as e,
353
- k as f,
354
- At as g,
355
- Lt as h,
356
- wt as i,
357
- ut as j,
358
- ct as k,
359
- ht as l,
360
- dt as m,
351
+ ft as d,
352
+ xt as e,
353
+ F as f,
354
+ bt as g,
355
+ St as h,
356
+ mt as i,
357
+ pt as j,
358
+ gt as k,
359
+ wt as l,
360
+ Dt as m,
361
361
  C as n,
362
- St as o,
363
- yt as p,
364
- A as q,
365
- bt as r,
366
- mt as s,
367
- ft as t,
368
- Dt as u,
369
- Mt as v,
370
- Et as w,
371
- I as x,
372
- xt as y
362
+ Ct as o,
363
+ Lt as p,
364
+ V as q,
365
+ ut as r,
366
+ yt as s,
367
+ Mt as t,
368
+ Ot as u,
369
+ dt as v,
370
+ ct as w,
371
+ A as x,
372
+ vt as y
373
373
  };
@@ -7,7 +7,7 @@ import P from "../components/line-clamp.js";
7
7
  import F from "../components/radio.js";
8
8
  import B from "../components/radio-group.js";
9
9
  import E from "../components/space.js";
10
- import { C as K, H as U } from "./table.DUcvVqNw.js";
10
+ import { C as K, H as U } from "./table.D34xVq4y.js";
11
11
  import { C as L } from "./typography.oDzoLbZS.js";
12
12
  import { n as o, C as T } from "./lib-cortex-element.CVMmyPMC.js";
13
13
  import { c as D } from "./component.styles.DMSLciL5.js";
@@ -29,7 +29,7 @@ import Z from "../components/icon-button.js";
29
29
  import { C as Q } from "./image.bndP5q2c.js";
30
30
  import { a as ee, D as w } from "./asset.CG_yXtWK.js";
31
31
  import { a as ae } from "./index.Cpamj0jB.js";
32
- import { A as v } from "./content-builder.Bxi6k2LA.js";
32
+ import { A as v } from "./content-builder.Bf7kqzDI.js";
33
33
  import { e as te, t as I } from "./string.Cp_XNbnV.js";
34
34
  import { t as ie } from "./toast.BXNbwZV8.js";
35
35
  var A, k;
@@ -1,4 +1,4 @@
1
- import { D as i } from "./content-builder.Bxi6k2LA.js";
1
+ import { D as i } from "./content-builder.Bf7kqzDI.js";
2
2
  function s(r, t = [350, 696, 1024]) {
3
3
  const o = getComputedStyle(r), e = [
4
4
  Number.parseFloat(o.getPropertyValue("--breakpoint-mobile").trim()),