@orangelogic/design-system 2.174.0 → 2.176.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 (21) hide show
  1. package/library/chunks/{color-swatch-group.C01UAz1A.js → color-swatch-group.NJnbc24w.js} +696 -699
  2. package/library/chunks/{color-swatch.DpzAGKQx.js → color-swatch.D6Gg5bpz.js} +1 -1
  3. package/library/chunks/{folder-select.BgWvY0t0.js → folder-select.Di9wfqIU.js} +77 -72
  4. package/library/components/color-swatch-group.js +2 -2
  5. package/library/components/color-swatch.js +1 -1
  6. package/library/components/copy-button.js +1 -1
  7. package/library/components/folder-select.js +1 -1
  8. package/library/components/molecules.js +2 -2
  9. package/library/components/organisms.js +1 -1
  10. package/library/components/types.js +16162 -16098
  11. package/library/package.json +1 -1
  12. package/library/packages/atoms/src/components/copy-button/copy-button.d.ts +3 -0
  13. package/library/packages/organisms/src/color-swatch-group/color-swatch-group.constants.d.ts +10 -66
  14. package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +1 -0
  15. package/library/packages/organisms/src/content-builder/content-builder.utils.d.ts +9 -0
  16. package/library/packages/organisms/src/content-builder/plugins/{telemetry.d.ts → telemetry/index.d.ts} +2 -0
  17. package/library/packages/organisms/src/content-builder/{content-builder.telemetry.d.ts → plugins/telemetry/measure.d.ts} +7 -19
  18. package/library/packages/organisms/src/content-builder/plugins/telemetry/metrics.d.ts +106 -0
  19. package/library/packages/utils/src/font/font.d.ts +23 -8
  20. package/library/utils.js +322 -311
  21. package/package.json +1 -1
package/library/utils.js CHANGED
@@ -1,39 +1,39 @@
1
- import { b as O } from "./chunks/url.Bd5rq4G0.js";
2
- import { R as Ct, e as xt, f as Mt, g as yt, U as St, a as Et, d as At, c as It, i as Lt, t as vt } from "./chunks/url.Bd5rq4G0.js";
3
- import { j as bt, f as Vt, b as Ft, c as Ot, g as kt, e as Yt, i as Nt, a as Ut, h as _t, m as Pt, d as Xt, r as Ht, t as Wt } from "./chunks/toast.CXEAfCvN.js";
4
- import { e as $t, a as Gt, f as zt, g as qt, d as Qt, b as Zt, c as jt, i as Jt, p as Kt, s as te } from "./chunks/browser.BHOCIF_A.js";
5
- import { d as re, C as ae, e as se, H as oe, R as ne, c as ie, h as le, f as ce, g as ue, l as me, a as fe, p as he, b as ge } from "./chunks/color.LzSGBy7o.js";
6
- import { a as pe, g as De } from "./chunks/active-elements.jTVWtBDp.js";
7
- import { a as we, p as Ce, c as xe, b as Me, s as ye, w as Se } from "./chunks/event.BeKOsirN.js";
8
- import { t as Ae } from "./chunks/converters.DkDtLstb.js";
9
- import { c as Le } from "./chunks/custom-element.L4WJXn1j.js";
10
- import { d as Re } from "./chunks/debounce.DaHuiSGU.js";
11
- import { d as Ve } from "./chunks/default-value.COZopaet.js";
12
- import { d as Oe } from "./chunks/drag.DenOh3AE.js";
13
- import { f as Ye } from "./chunks/focus-when-visible.jWSw9ks0.js";
14
- import { f as k } from "./chunks/form.CP9KLGjF.js";
15
- import { F as Ue, c as _e, g as Pe, v as Xe, a as He } from "./chunks/form.CP9KLGjF.js";
16
- import { L as Be, r as $e } from "./chunks/i18n.DbXTTLXx.js";
17
- import { c as ze, q as qe } from "./chunks/math.DuKzLacZ.js";
18
- import { g as Ze } from "./chunks/modal.Ct0bJBSe.js";
19
- import { g as Je, l as Ke, s as tr, u as er } from "./chunks/scroll.xtO5yojm.js";
1
+ import { b as Y } from "./chunks/url.Bd5rq4G0.js";
2
+ import { R as St, e as Et, f as At, g as It, U as Lt, a as Ft, d as Rt, c as bt, i as Vt, t as vt } from "./chunks/url.Bd5rq4G0.js";
3
+ import { j as kt, f as Yt, b as Ut, c as _t, g as Nt, e as Pt, i as Xt, a as Ht, h as Wt, m as Bt, d as Gt, r as $t, t as qt } from "./chunks/toast.CXEAfCvN.js";
4
+ import { e as Qt, a as Zt, f as jt, g as Jt, d as Kt, b as te, c as ee, i as re, p as ae, s as se } from "./chunks/browser.BHOCIF_A.js";
5
+ import { d as ne, C as ie, e as le, H as ce, R as ue, c as fe, h as me, f as he, g as ge, l as de, a as pe, p as De, b as Te } from "./chunks/color.LzSGBy7o.js";
6
+ import { a as Me, g as Ce } from "./chunks/active-elements.jTVWtBDp.js";
7
+ import { a as ye, p as Se, c as Ee, b as Ae, s as Ie, w as Le } from "./chunks/event.BeKOsirN.js";
8
+ import { t as Re } from "./chunks/converters.DkDtLstb.js";
9
+ import { c as Ve } from "./chunks/custom-element.L4WJXn1j.js";
10
+ import { d as Oe } from "./chunks/debounce.DaHuiSGU.js";
11
+ import { d as Ye } from "./chunks/default-value.COZopaet.js";
12
+ import { d as _e } from "./chunks/drag.DenOh3AE.js";
13
+ import { f as Pe } from "./chunks/focus-when-visible.jWSw9ks0.js";
14
+ import { f as U } from "./chunks/form.CP9KLGjF.js";
15
+ import { F as He, c as We, g as Be, v as Ge, a as $e } from "./chunks/form.CP9KLGjF.js";
16
+ import { L as ze, r as Qe } from "./chunks/i18n.DbXTTLXx.js";
17
+ import { c as je, q as Je } from "./chunks/math.DuKzLacZ.js";
18
+ import { g as tr } from "./chunks/modal.Ct0bJBSe.js";
19
+ import { g as rr, l as ar, s as sr, u as or } from "./chunks/scroll.xtO5yojm.js";
20
20
  import { k as y } from "./chunks/dom.C5aVLhKS.js";
21
- import { c as ar, d as sr, h as or, m as nr, a as ir, g as lr, j as cr, b as ur, f as mr, i as fr, e as hr, l as gr, s as dr } from "./chunks/dom.C5aVLhKS.js";
22
- import { H as Dr, a as Tr, g as wr } from "./chunks/slot.j5oheLJC.js";
23
- import { a as xr, g as Mr } from "./chunks/tabbable.BwnZBHrm.js";
24
- import { i as Sr } from "./chunks/user-agent.D9aPuOyL.js";
25
- import { w as Ar } from "./chunks/watch.DJF5K-8U.js";
26
- import { C as Lr } from "./chunks/calendar-grid.BWjcZL5W.js";
27
- import { b as Rr, c as br, f as Vr, h as Fr, g as Or, a as kr, i as Yr, d as Nr, n as Ur, e as _r, p as Pr, t as Xr } from "./chunks/date.iWq_pkIk.js";
28
- import { f as c, a as u, D as m } from "./chunks/date-picker.BGHn6qg8.js";
29
- import { a as Wr, b as Br, f as $r } from "./chunks/transformation.8uLv6uwG.js";
30
- import { c as zr, f as qr, e as Qr, b as Zr, g as jr, d as Jr, i as Kr, r as ta, a as ea } from "./chunks/image.Y5c_hFx8.js";
31
- import { b as aa, e as sa } from "./chunks/waveform.1U9U_0rd.js";
32
- import { c as na, b as ia, a as la, e as ca, d as ua, f as ma, g as fa, r as ha, s as ga } from "./chunks/number.Cx2ncfJJ.js";
33
- import { s as pa } from "./chunks/parse.Cu5nBDTb.js";
34
- import { b as Ta, o as wa, d as Ca, e as xa, f as Ma, m as ya, q as Sa, g as Ea, h as Aa, l as Ia, p as La, z as va, y as Ra, a as ba, c as Va, s as Fa, x as Oa, v as ka, t as Ya, r as Na, w as Ua, i as _a, n as Pa, u as Xa } from "./chunks/string.BhJ0Zogu.js";
35
- import { g as Wa, a as Ba } from "./chunks/template.ClovJacp.js";
36
- import { c as Ga, f as za, a as qa, g as Qa } from "./chunks/time.DYWuX2id.js";
21
+ import { c as ir, d as lr, h as cr, m as ur, a as fr, g as mr, j as hr, b as gr, f as dr, i as pr, e as Dr, l as Tr, s as wr } from "./chunks/dom.C5aVLhKS.js";
22
+ import { H as Cr, a as xr, g as yr } from "./chunks/slot.j5oheLJC.js";
23
+ import { a as Er, g as Ar } from "./chunks/tabbable.BwnZBHrm.js";
24
+ import { i as Lr } from "./chunks/user-agent.D9aPuOyL.js";
25
+ import { w as Rr } from "./chunks/watch.DJF5K-8U.js";
26
+ import { C as Vr } from "./chunks/calendar-grid.BWjcZL5W.js";
27
+ import { b as Or, c as kr, f as Yr, h as Ur, g as _r, a as Nr, i as Pr, d as Xr, n as Hr, e as Wr, p as Br, t as Gr } from "./chunks/date.iWq_pkIk.js";
28
+ import { f as c, a as u, D as f } from "./chunks/date-picker.BGHn6qg8.js";
29
+ import { a as qr, b as zr, f as Qr } from "./chunks/transformation.8uLv6uwG.js";
30
+ import { c as jr, f as Jr, e as Kr, b as ta, g as ea, d as ra, i as aa, r as sa, a as oa } from "./chunks/image.Y5c_hFx8.js";
31
+ import { b as ia, e as la } from "./chunks/waveform.1U9U_0rd.js";
32
+ import { c as ua, b as fa, a as ma, e as ha, d as ga, f as da, g as pa, r as Da, s as Ta } from "./chunks/number.Cx2ncfJJ.js";
33
+ import { s as Ma } from "./chunks/parse.Cu5nBDTb.js";
34
+ import { b as xa, o as ya, d as Sa, e as Ea, f as Aa, m as Ia, q as La, g as Fa, h as Ra, l as ba, p as Va, z as va, y as Oa, a as ka, c as Ya, s as Ua, x as _a, v as Na, t as Pa, r as Xa, w as Ha, i as Wa, n as Ba, u as Ga } from "./chunks/string.BhJ0Zogu.js";
35
+ import { g as qa, a as za } from "./chunks/template.ClovJacp.js";
36
+ import { c as Za, f as ja, a as Ja, g as Ka } from "./chunks/time.DYWuX2id.js";
37
37
  function n(t) {
38
38
  const e = t.getFullYear(), r = String(t.getMonth() + 1).padStart(2, "0"), s = String(t.getDate()).padStart(2, "0");
39
39
  return `${e}-${r}-${s}`;
@@ -59,7 +59,7 @@ function L(t) {
59
59
  const e = Math.floor(t.getMonth() / 3) * 3;
60
60
  return new Date(t.getFullYear(), e, 1);
61
61
  }
62
- function v(t) {
62
+ function F(t) {
63
63
  const e = Math.floor(t.getMonth() / 3) * 3;
64
64
  return new Date(t.getFullYear(), e + 3, 0);
65
65
  }
@@ -71,7 +71,7 @@ function b(t) {
71
71
  const e = t.getMonth() < 6 ? 0 : 6;
72
72
  return new Date(t.getFullYear(), e + 6, 0);
73
73
  }
74
- class G {
74
+ class Q {
75
75
  /**
76
76
  * Computes a date range from a preset value.
77
77
  *
@@ -94,7 +94,7 @@ class G {
94
94
  case c.today:
95
95
  return {
96
96
  fromDate: s,
97
- fromTime: m,
97
+ fromTime: f,
98
98
  toDate: s,
99
99
  toTime: u
100
100
  };
@@ -102,7 +102,7 @@ class G {
102
102
  const a = n(h(r, -1));
103
103
  return {
104
104
  fromDate: a,
105
- fromTime: m,
105
+ fromTime: f,
106
106
  toDate: a,
107
107
  toTime: u
108
108
  };
@@ -110,28 +110,28 @@ class G {
110
110
  case c.last2Days:
111
111
  return {
112
112
  fromDate: n(h(r, -1)),
113
- fromTime: m,
113
+ fromTime: f,
114
114
  toDate: s,
115
115
  toTime: u
116
116
  };
117
117
  case c.last3Days:
118
118
  return {
119
119
  fromDate: n(h(r, -2)),
120
- fromTime: m,
120
+ fromTime: f,
121
121
  toDate: s,
122
122
  toTime: u
123
123
  };
124
124
  case c.last30Days:
125
125
  return {
126
126
  fromDate: n(h(r, -29)),
127
- fromTime: m,
127
+ fromTime: f,
128
128
  toDate: s,
129
129
  toTime: u
130
130
  };
131
131
  case c.next30Days:
132
132
  return {
133
133
  fromDate: s,
134
- fromTime: m,
134
+ fromTime: f,
135
135
  toDate: n(h(r, 30)),
136
136
  toTime: u
137
137
  };
@@ -139,7 +139,7 @@ class G {
139
139
  const a = E(r);
140
140
  return {
141
141
  fromDate: n(a),
142
- fromTime: m,
142
+ fromTime: f,
143
143
  toDate: n(h(a, 6)),
144
144
  toTime: u
145
145
  };
@@ -148,7 +148,7 @@ class G {
148
148
  const a = h(E(r), -7);
149
149
  return {
150
150
  fromDate: n(a),
151
- fromTime: m,
151
+ fromTime: f,
152
152
  toDate: n(h(a, 6)),
153
153
  toTime: u
154
154
  };
@@ -156,7 +156,7 @@ class G {
156
156
  case c.thisMonth:
157
157
  return {
158
158
  fromDate: n(A(r)),
159
- fromTime: m,
159
+ fromTime: f,
160
160
  toDate: n(I(r)),
161
161
  toTime: u
162
162
  };
@@ -164,7 +164,7 @@ class G {
164
164
  const a = new Date(r.getFullYear(), r.getMonth() - 1, 1);
165
165
  return {
166
166
  fromDate: n(A(a)),
167
- fromTime: m,
167
+ fromTime: f,
168
168
  toDate: n(I(a)),
169
169
  toTime: u
170
170
  };
@@ -172,8 +172,8 @@ class G {
172
172
  case c.thisQuarter:
173
173
  return {
174
174
  fromDate: n(L(r)),
175
- fromTime: m,
176
- toDate: n(v(r)),
175
+ fromTime: f,
176
+ toDate: n(F(r)),
177
177
  toTime: u
178
178
  };
179
179
  case c.lastQuarter: {
@@ -184,15 +184,15 @@ class G {
184
184
  );
185
185
  return {
186
186
  fromDate: n(L(a)),
187
- fromTime: m,
188
- toDate: n(v(a)),
187
+ fromTime: f,
188
+ toDate: n(F(a)),
189
189
  toTime: u
190
190
  };
191
191
  }
192
192
  case c.thisHalfYear:
193
193
  return {
194
194
  fromDate: n(R(r)),
195
- fromTime: m,
195
+ fromTime: f,
196
196
  toDate: n(b(r)),
197
197
  toTime: u
198
198
  };
@@ -200,7 +200,7 @@ class G {
200
200
  const a = new Date(r.getFullYear(), r.getMonth() - 6, 1);
201
201
  return {
202
202
  fromDate: n(R(a)),
203
- fromTime: m,
203
+ fromTime: f,
204
204
  toDate: n(b(a)),
205
205
  toTime: u
206
206
  };
@@ -208,7 +208,7 @@ class G {
208
208
  case c.thisYear:
209
209
  return {
210
210
  fromDate: `${r.getFullYear()}-01-01`,
211
- fromTime: m,
211
+ fromTime: f,
212
212
  toDate: `${r.getFullYear()}-12-31`,
213
213
  toTime: u
214
214
  };
@@ -216,7 +216,7 @@ class G {
216
216
  const a = r.getFullYear() - 1;
217
217
  return {
218
218
  fromDate: `${a}-01-01`,
219
- fromTime: m,
219
+ fromTime: f,
220
220
  toDate: `${a}-12-31`,
221
221
  toTime: u
222
222
  };
@@ -225,7 +225,7 @@ class G {
225
225
  throw new Error(`Unsupported date range preset: ${e}`);
226
226
  }
227
227
  }
228
- function z(t) {
228
+ function Z(t) {
229
229
  const e = /* @__PURE__ */ new Date(`${t}T00:00:00Z`);
230
230
  if (Number.isNaN(e.getTime()))
231
231
  return 0;
@@ -236,7 +236,7 @@ function z(t) {
236
236
  const a = new Date(Date.UTC(r.getUTCFullYear(), 0, 1)), o = (r.getTime() - a.getTime()) / 864e5;
237
237
  return Math.ceil((o + 1) / 7);
238
238
  }
239
- function q(t) {
239
+ function j(t) {
240
240
  if (!this.ownerDocument.defaultView?.Matrix3 || !t)
241
241
  return;
242
242
  const e = this.ownerDocument.defaultView?.location.origin;
@@ -248,7 +248,7 @@ function q(t) {
248
248
  e
249
249
  );
250
250
  }
251
- function Q(t) {
251
+ function J(t) {
252
252
  if (!this.ownerDocument.defaultView?.Matrix3 || !t)
253
253
  return;
254
254
  const e = this.ownerDocument.defaultView?.location.origin;
@@ -260,13 +260,13 @@ function Q(t) {
260
260
  e
261
261
  );
262
262
  }
263
- function Z(t, e = void 0) {
263
+ function K(t, e = void 0) {
264
264
  !this.ownerDocument.defaultView?.Matrix3 || !t || this.ownerDocument.defaultView?.open(
265
- O(t, "https://", !0),
265
+ Y(t, "https://", !0),
266
266
  e ?? "_blank"
267
267
  );
268
268
  }
269
- function j(t) {
269
+ function tt(t) {
270
270
  if (!this.ownerDocument.defaultView?.Matrix3 || !t)
271
271
  return;
272
272
  const e = this.ownerDocument.defaultView?.location.origin;
@@ -278,7 +278,7 @@ function j(t) {
278
278
  e
279
279
  );
280
280
  }
281
- function J(t, e) {
281
+ function et(t, e) {
282
282
  if (!this.ownerDocument.defaultView?.Matrix3 || !t)
283
283
  return;
284
284
  const r = e || {}, s = this.ownerDocument.defaultView?.location.origin;
@@ -287,7 +287,7 @@ function J(t, e) {
287
287
  s
288
288
  );
289
289
  }
290
- class K {
290
+ class rt {
291
291
  constructor(e) {
292
292
  this.currentZIndex = y(), (this.host = e).addController(this);
293
293
  }
@@ -299,7 +299,7 @@ class K {
299
299
  this.currentZIndex = y();
300
300
  }
301
301
  }
302
- class tt {
302
+ class at {
303
303
  constructor(e, r = {}) {
304
304
  this.element = e, this.noChildDrag = r.noChildDrag ?? !1, this.dragThreshold = r.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();
305
305
  }
@@ -325,42 +325,51 @@ class tt {
325
325
  this.hasDragged && (e.stopImmediatePropagation(), e.preventDefault());
326
326
  }
327
327
  }
328
- const et = (t) => t.ctrlKey || t.metaKey;
329
- function rt(t) {
330
- return t.value ?? t.typeface.toLowerCase().replaceAll(" ", "-");
331
- }
332
- function at(t, e) {
333
- if (t.value != null && e.filter(
334
- (i) => i.value === t.value
335
- ).length <= 1)
336
- return t.value;
337
- const r = t.name.toLowerCase().replaceAll(" ", "-");
338
- if (e.filter((o) => o.name.toLowerCase().replaceAll(" ", "-") === r).length <= 1)
339
- return r;
340
- const a = [t.fontStyle, t.fontWeight].filter((o) => o != null).join("-");
341
- return a ? `${r}-${a}` : `${r}-${e.indexOf(t)}`;
342
- }
343
- function V(t, e) {
328
+ const st = (t) => t.ctrlKey || t.metaKey;
329
+ function V(t) {
330
+ return t.replaceAll(" ", "_");
331
+ }
332
+ function ot(t) {
333
+ return t.value ?? V(t.typeface);
334
+ }
335
+ function nt(t) {
336
+ const e = [
337
+ t.value || t.name,
338
+ t.fontStyle,
339
+ t.fontWeight
340
+ ].filter((r) => r != null && r !== "").join("_");
341
+ return V(e);
342
+ }
343
+ function v(t) {
344
+ return t.length >= 2 && (t.startsWith("'") && t.endsWith("'") || t.startsWith('"') && t.endsWith('"'));
345
+ }
346
+ function _(t) {
347
+ return v(t) || !t.includes(" ") ? t : `'${t.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
348
+ }
349
+ function it(t) {
350
+ return v(t) ? t.slice(1, -1).replace(/\\(.)/g, "$1") : t;
351
+ }
352
+ function O(t, e) {
344
353
  if (!t?.document)
345
354
  return !1;
346
- const r = "mmmmmmmmmmwwwwwww", s = "32px", o = t.document.createElement("canvas").getContext("2d"), i = (f) => o ? (o.font = `${s} ${f}, monospace`, o.measureText(r).width) : 0, l = i("monospace");
355
+ const r = "mmmmmmmmmmwwwwwww", s = "32px", o = t.document.createElement("canvas").getContext("2d"), i = (m) => o ? (o.font = `${s} ${_(m)}, monospace`, o.measureText(r).width) : 0, l = i("monospace");
347
356
  return i(e) !== l;
348
357
  }
349
- function st(t, e) {
358
+ function lt(t, e) {
350
359
  if (!t?.document?.fonts)
351
360
  return !1;
352
361
  let r = !1;
353
362
  return t.document.fonts.forEach((s) => {
354
363
  s.family.replace(/['"]/g, "").toLowerCase() === e.toLowerCase() && (r = !0);
355
- }), r ? !0 : V(t, e);
364
+ }), r ? !0 : O(t, e);
356
365
  }
357
- function Y(t) {
366
+ function N(t) {
358
367
  const e = /\bitalic\b/i, r = /\b(semi[-\s]?condensed|condensed)\b/i, s = (a) => {
359
368
  const o = a.fontFamily.toLowerCase(), i = a.fontStyle.toLowerCase(), l = e.test(i), p = r.test(o);
360
- let f = 0;
361
- return l && (f = 1), p && (f = l ? 3 : 2), {
369
+ let m = 0;
370
+ return l && (m = 1), p && (m = l ? 3 : 2), {
362
371
  family: a.fontFamily,
363
- styleRank: f,
372
+ styleRank: m,
364
373
  weight: Number(a.fontWeight)
365
374
  };
366
375
  };
@@ -369,9 +378,9 @@ function Y(t) {
369
378
  return i.weight !== l.weight ? i.weight - l.weight : i.styleRank !== l.styleRank ? i.styleRank - l.styleRank : i.family.localeCompare(l.family);
370
379
  });
371
380
  }
372
- function ot(t, e, r = [300, 400, 500, 700, 900], s = ["normal", "italic"]) {
381
+ function ct(t, e, r = [300, 400, 500, 700, 900], s = ["normal", "italic"]) {
373
382
  const a = [];
374
- if (V(t, e))
383
+ if (O(t, e))
375
384
  for (const o of r)
376
385
  for (const i of s)
377
386
  a.push({
@@ -380,9 +389,9 @@ function ot(t, e, r = [300, 400, 500, 700, 900], s = ["normal", "italic"]) {
380
389
  fontWeight: o.toString(),
381
390
  src: ""
382
391
  });
383
- return Y(a);
392
+ return N(a);
384
393
  }
385
- function nt(t) {
394
+ function ut(t) {
386
395
  const e = new FormData(t), r = {};
387
396
  return e.forEach((s, a) => {
388
397
  if (Reflect.has(r, a)) {
@@ -392,18 +401,18 @@ function nt(t) {
392
401
  r[a] = s;
393
402
  }), r;
394
403
  }
395
- function N(t) {
396
- const r = [...t.getRootNode().querySelectorAll("*")], s = [...t.elements], a = k.get(t), o = a ? Array.from(a) : [];
404
+ function P(t) {
405
+ const r = [...t.getRootNode().querySelectorAll("*")], s = [...t.elements], a = U.get(t), o = a ? Array.from(a) : [];
397
406
  return [...s, ...o].sort(
398
407
  (i, l) => r.indexOf(i) < r.indexOf(l) ? -1 : r.indexOf(i) > r.indexOf(l) ? 1 : 0
399
408
  );
400
409
  }
401
- function it(t) {
402
- return N(t).some(
410
+ function ft(t) {
411
+ return P(t).some(
403
412
  (r) => r.hasAttribute("data-user-valid") || r.hasAttribute("data-user-invalid")
404
413
  );
405
414
  }
406
- class lt {
415
+ class mt {
407
416
  constructor(e = null) {
408
417
  this.history = e !== null ? [e] : [], this.redoStack = [];
409
418
  }
@@ -440,20 +449,20 @@ class lt {
440
449
  return [...this.history];
441
450
  }
442
451
  }
443
- var U = /* @__PURE__ */ ((t) => (t.ArrowDown = "ArrowDown", t.ArrowLeft = "ArrowLeft", t.ArrowRight = "ArrowRight", t.ArrowUp = "ArrowUp", t.Enter = "Enter", t.Escape = "Escape", t.Tab = "Tab", t))(U || {});
444
- function ct(t, e) {
452
+ var X = /* @__PURE__ */ ((t) => (t.ArrowDown = "ArrowDown", t.ArrowLeft = "ArrowLeft", t.ArrowRight = "ArrowRight", t.ArrowUp = "ArrowUp", t.Enter = "Enter", t.Escape = "Escape", t.Tab = "Tab", t))(X || {});
453
+ function ht(t, e) {
445
454
  const r = {}, s = new Set(e);
446
455
  return Object.keys(t).forEach((a) => {
447
456
  s.has(a) || (r[a] = t[a]);
448
457
  }), r;
449
458
  }
450
- function ut(t, e) {
459
+ function gt(t, e) {
451
460
  const r = {};
452
461
  return e.forEach((s) => {
453
462
  s in t && (r[s] = t[s]);
454
463
  }), r;
455
464
  }
456
- function mt(t) {
465
+ function dt(t) {
457
466
  if (!t)
458
467
  return {};
459
468
  let e;
@@ -464,7 +473,7 @@ function mt(t) {
464
473
  }
465
474
  return typeof e != "object" ? {} : e;
466
475
  }
467
- function ft(t, e = !0) {
476
+ function pt(t, e = !0) {
468
477
  if (!t)
469
478
  return [];
470
479
  let r;
@@ -475,14 +484,14 @@ function ft(t, e = !0) {
475
484
  }
476
485
  return Array.isArray(r) ? e ? r.filter((s) => typeof s == "string") : r : [];
477
486
  }
478
- function ht(t, e) {
487
+ function Dt(t, e) {
479
488
  return typeof Storage < "u" && localStorage.getItem(t) !== null ? localStorage.getItem(t) : e;
480
489
  }
481
- function gt(t, e) {
490
+ function Tt(t, e) {
482
491
  typeof Storage < "u" && localStorage.setItem(t, e.toString());
483
492
  }
484
- const _ = 10;
485
- function dt(t, e) {
493
+ const H = 10;
494
+ function wt(t, e) {
486
495
  let r = 0, s = t.length;
487
496
  for (; r < s; ) {
488
497
  const a = Math.floor((r + s) / 2);
@@ -490,12 +499,12 @@ function dt(t, e) {
490
499
  }
491
500
  t.splice(r, 0, e);
492
501
  }
493
- function P(t, e, r) {
502
+ function W(t, e, r) {
494
503
  return t.find(
495
504
  (s) => s.col === e && s.row === r
496
505
  ) ?? null;
497
506
  }
498
- function X(t, e, r) {
507
+ function B(t, e, r) {
499
508
  return new Promise((s) => {
500
509
  if (e > 0 && Math.abs(t.currentTime - e) < 1e-3) {
501
510
  s();
@@ -518,7 +527,7 @@ function X(t, e, r) {
518
527
  }
519
528
  });
520
529
  }
521
- async function* pt({
530
+ async function* Mt({
522
531
  cache: t,
523
532
  canvas: e,
524
533
  duration: r,
@@ -530,18 +539,18 @@ async function* pt({
530
539
  throw new Error("Canvas is required");
531
540
  if (!o)
532
541
  throw new Error("Video is required");
533
- const { columns: i, frameHeight: l, frameWidth: p, rows: f, spriteCtx: F } = e;
542
+ const { columns: i, frameHeight: l, frameWidth: p, rows: m, spriteCtx: k } = e;
534
543
  try {
535
- for (let g = 0; g < f; g++)
544
+ for (let g = 0; g < m; g++)
536
545
  for (let d = 0; d < i; d++) {
537
546
  const T = g * i + d, D = T * s;
538
547
  if (D >= r)
539
548
  continue;
540
- const w = d * p, C = g * l, x = P(t[a] ?? [], d, g), M = d === i - 1 && g === f - 1 || D + s >= r;
541
- x ? yield { ...x, isLastFrame: M } : (await X(o, D, s), F.drawImage(
549
+ const w = d * p, M = g * l, C = W(t[a] ?? [], d, g), x = d === i - 1 && g === m - 1 || D + s >= r;
550
+ C ? yield { ...C, isLastFrame: x } : (await B(o, D, s), k.drawImage(
542
551
  o,
543
552
  w,
544
- C,
553
+ M,
545
554
  p,
546
555
  l
547
556
  ), yield {
@@ -550,18 +559,18 @@ async function* pt({
550
559
  frameHeight: l,
551
560
  frameWidth: p,
552
561
  index: T,
553
- isLastFrame: M,
562
+ isLastFrame: x,
554
563
  row: g,
555
- rows: f,
556
- time: Number(D.toFixed(_)),
564
+ rows: m,
565
+ time: Number(D.toFixed(H)),
557
566
  x: w,
558
- y: C
567
+ y: M
559
568
  }), await new Promise(requestAnimationFrame);
560
569
  }
561
570
  } catch {
562
571
  }
563
572
  }
564
- function Dt({
573
+ function Ct({
565
574
  duration: t,
566
575
  frameWidth: e,
567
576
  playbackSpeed: r,
@@ -571,200 +580,202 @@ function Dt({
571
580
  return a > t && (a = t / 2), a;
572
581
  }
573
582
  export {
574
- re as CMYK_VALIDATION_REGEX,
575
- Lr as CalendarGrid,
576
- ae as ColorType,
577
- K as CortexPopupController,
578
- G as DateRangePresets,
579
- tt as DragScroll,
580
- Ue as FormControlController,
581
- se as HEX_ALPHA_VALIDATION_REGEX,
582
- oe as HEX_VALIDATION_REGEX,
583
- Dr as HasSlotController,
584
- lt as HistoryManager,
585
- U as KeyboardKey,
586
- Be as LocalizeController,
587
- _ as PRECISION,
588
- Ct as RELATIVE_URL_REGEX,
589
- ne as RGB_VALIDATION_REGEX,
590
- xt as URL_DOMAIN_VALIDATION_REGEX,
591
- Mt as URL_INTRANET_DOMAIN_VALIDATION_REGEX,
592
- yt as URL_PROTOCOL_VALIDATION_REGEX,
593
- St as URL_VALIDATION_REGEX,
594
- pe as activeElements,
595
- Rr as addMonths,
596
- bt as adjustRelativeValues,
597
- we as animateTo,
598
- O as appendProtocol,
599
- Et as appendQueryParam,
600
- Wr as applyTransformationsToUrl,
601
- Br as buildTransformationString,
602
- aa as buildWaveformPath,
603
- zr as calculateAspectRatioFit,
604
- ze as clamp,
605
- qr as cleanImageFileName,
606
- Ga as clearZeroDurationParts,
607
- ie as convertColor,
608
- na as convertDataUnits,
609
- ia as convertDurationToMilliseconds,
610
- la as convertPixelsToAspectRatio,
611
- Qr as convertSrcToBlob,
612
- Zr as cropImage,
613
- ar as cssValueToPx,
614
- Le as customElement,
615
- _e as customErrorValidityState,
616
- Re as debounce,
617
- Ve as defaultValue,
618
- J as downloadAsset,
619
- Oe as drag,
620
- Ta as emptyToSpace,
621
- wa as escapeXML,
622
- le as extractColor,
623
- Ca as extractExtension,
624
- pt as extractFrames,
625
- xa as extractRootData,
626
- ca as extractValueAndUnit,
627
- sa as extractWaveformPeaks,
628
- $r as fetchCortexApi,
629
- $t as findAncestorWithBuggyStyle,
630
- Gt as findContainingBlock,
631
- zt as findCuttingAncestor,
632
- P as findFrameByColAndRow,
633
- Vt as findIndexByProp,
634
- Ye as focusWhenVisible,
635
- k as formCollections,
636
- ua as formatAspectRatioString,
637
- za as formatDurationPartsManually,
638
- br as formatIsoToDisplay,
639
- Vr as formatMonthYearLabel,
640
- ma as formatNumberWithGrouping,
641
- Ma as formatSecondsToTime,
642
- ya as formatTimeToSeconds,
643
- qa as formatWithIntlDurationFormat,
644
- fa as gcd,
645
- sr as getActiveElement,
646
- Ze as getActiveModals,
647
- Pe as getAssociatedForm,
648
- or as getAttributes,
649
- Sa as getAttributesString,
650
- Ft as getBreakpointsFromCSS,
651
- ot as getBrowserFontVariants,
652
- ce as getColorType,
653
- jr as getContainedImageSize,
654
- nr as getCortexPopupLayer,
583
+ ne as CMYK_VALIDATION_REGEX,
584
+ Vr as CalendarGrid,
585
+ ie as ColorType,
586
+ rt as CortexPopupController,
587
+ Q as DateRangePresets,
588
+ at as DragScroll,
589
+ He as FormControlController,
590
+ le as HEX_ALPHA_VALIDATION_REGEX,
591
+ ce as HEX_VALIDATION_REGEX,
592
+ Cr as HasSlotController,
593
+ mt as HistoryManager,
594
+ X as KeyboardKey,
595
+ ze as LocalizeController,
596
+ H as PRECISION,
597
+ St as RELATIVE_URL_REGEX,
598
+ ue as RGB_VALIDATION_REGEX,
599
+ Et as URL_DOMAIN_VALIDATION_REGEX,
600
+ At as URL_INTRANET_DOMAIN_VALIDATION_REGEX,
601
+ It as URL_PROTOCOL_VALIDATION_REGEX,
602
+ Lt as URL_VALIDATION_REGEX,
603
+ Me as activeElements,
604
+ Or as addMonths,
605
+ kt as adjustRelativeValues,
606
+ ye as animateTo,
607
+ Y as appendProtocol,
608
+ Ft as appendQueryParam,
609
+ qr as applyTransformationsToUrl,
610
+ zr as buildTransformationString,
611
+ ia as buildWaveformPath,
612
+ jr as calculateAspectRatioFit,
613
+ je as clamp,
614
+ Jr as cleanImageFileName,
615
+ Za as clearZeroDurationParts,
616
+ fe as convertColor,
617
+ ua as convertDataUnits,
618
+ fa as convertDurationToMilliseconds,
619
+ ma as convertPixelsToAspectRatio,
620
+ Kr as convertSrcToBlob,
621
+ ta as cropImage,
622
+ ir as cssValueToPx,
623
+ Ve as customElement,
624
+ We as customErrorValidityState,
625
+ Oe as debounce,
626
+ Ye as defaultValue,
627
+ et as downloadAsset,
628
+ _e as drag,
629
+ xa as emptyToSpace,
630
+ ya as escapeXML,
631
+ me as extractColor,
632
+ Sa as extractExtension,
633
+ Mt as extractFrames,
634
+ Ea as extractRootData,
635
+ ha as extractValueAndUnit,
636
+ la as extractWaveformPeaks,
637
+ Qr as fetchCortexApi,
638
+ Qt as findAncestorWithBuggyStyle,
639
+ Zt as findContainingBlock,
640
+ jt as findCuttingAncestor,
641
+ W as findFrameByColAndRow,
642
+ Yt as findIndexByProp,
643
+ Pe as focusWhenVisible,
644
+ U as formCollections,
645
+ ga as formatAspectRatioString,
646
+ ja as formatDurationPartsManually,
647
+ kr as formatIsoToDisplay,
648
+ Yr as formatMonthYearLabel,
649
+ da as formatNumberWithGrouping,
650
+ Aa as formatSecondsToTime,
651
+ Ia as formatTimeToSeconds,
652
+ Ja as formatWithIntlDurationFormat,
653
+ pa as gcd,
654
+ lr as getActiveElement,
655
+ tr as getActiveModals,
656
+ Be as getAssociatedForm,
657
+ cr as getAttributes,
658
+ La as getAttributesString,
659
+ Ut as getBreakpointsFromCSS,
660
+ ct as getBrowserFontVariants,
661
+ he as getColorType,
662
+ ea as getContainedImageSize,
663
+ ur as getCortexPopupLayer,
655
664
  y as getCurrentZIndex,
656
- Fr as getDateMask,
657
- De as getDeepestActiveElement,
658
- Ot as getDeviceType,
659
- Qa as getDurationPartsByUnitsFormat,
660
- ir as getElementFromHTMLString,
661
- lr as getElementFromTemplate,
662
- Or as getFirstDayOfWeek,
663
- at as getFontFamilyOptionValue,
664
- N as getFormControls,
665
- Wa as getHighlightedTitle,
666
- Ba as getHighlightedTitleHtml,
667
- Tr as getInnerHTML,
668
- Dt as getInterval,
669
- ue as getLightDarkCssString,
670
- Jr as getNaturalWidthHeight,
671
- cr as getNeededPaddingForBoxShadow,
672
- qt as getNextAncestor,
673
- Je as getOffset,
674
- ur as getRelativeClickPercentage,
675
- Ea as getRootIDString,
676
- xr as getTabbableBoundary,
677
- Mr as getTabbableElements,
678
- wr as getTextContent,
679
- kr as getTodayIsoDate,
680
- rt as getTypefaceOptionValue,
681
- kt as groupBy,
682
- Aa as htmlToPlainText,
683
- Yt as insertAtIndex,
684
- dt as insertFrameToCache,
685
- Nt as insertMultipleAtIndex,
686
- Qt as isChrome,
687
- Sr as isCortexAdobePlugin,
688
- mr as isDomElement,
689
- fr as isElementInHorizontalView,
690
- At as isExpiredAssetUrl,
691
- Zt as isFirefox,
692
- st as isFontFamilyAvailable,
693
- it as isFormInteracted,
694
- Ia as isGalleryItemCardType,
695
- jt as isIOS,
696
- hr as isInElement,
697
- et as isModKey,
698
- Jt as isSafari,
699
- Kr as isSaveSrcValid,
700
- It as isValidDomainOrIntranetUrl,
701
- Yr as isValidIsoDate,
702
- Lt as isValidUrl,
703
- Nr as isoToDate,
704
- z as isoWeekNumber,
705
- gr as loadScript,
706
- Ke as lockBodyScrolling,
707
- me as luminanceTextColor,
708
- Ut as moveMultipleToIndex,
709
- _t as moveToIndex,
710
- Pt as multiSelectTo,
711
- Ur as normalizeToIsoDate,
712
- ct as omit,
713
- q as openAssetOverview,
714
- Q as openFolderOverview,
715
- Z as openLink,
716
- La as padPath,
665
+ Ur as getDateMask,
666
+ Ce as getDeepestActiveElement,
667
+ _t as getDeviceType,
668
+ Ka as getDurationPartsByUnitsFormat,
669
+ fr as getElementFromHTMLString,
670
+ mr as getElementFromTemplate,
671
+ _r as getFirstDayOfWeek,
672
+ nt as getFontFamilyOptionValue,
673
+ P as getFormControls,
674
+ qa as getHighlightedTitle,
675
+ za as getHighlightedTitleHtml,
676
+ xr as getInnerHTML,
677
+ Ct as getInterval,
678
+ ge as getLightDarkCssString,
679
+ ra as getNaturalWidthHeight,
680
+ hr as getNeededPaddingForBoxShadow,
681
+ Jt as getNextAncestor,
682
+ rr as getOffset,
683
+ gr as getRelativeClickPercentage,
684
+ Fa as getRootIDString,
685
+ Er as getTabbableBoundary,
686
+ Ar as getTabbableElements,
687
+ yr as getTextContent,
688
+ Nr as getTodayIsoDate,
689
+ ot as getTypefaceOptionValue,
690
+ Nt as groupBy,
691
+ Ra as htmlToPlainText,
692
+ Pt as insertAtIndex,
693
+ wt as insertFrameToCache,
694
+ Xt as insertMultipleAtIndex,
695
+ Kt as isChrome,
696
+ Lr as isCortexAdobePlugin,
697
+ dr as isDomElement,
698
+ pr as isElementInHorizontalView,
699
+ Rt as isExpiredAssetUrl,
700
+ te as isFirefox,
701
+ lt as isFontFamilyAvailable,
702
+ ft as isFormInteracted,
703
+ ba as isGalleryItemCardType,
704
+ ee as isIOS,
705
+ Dr as isInElement,
706
+ st as isModKey,
707
+ re as isSafari,
708
+ aa as isSaveSrcValid,
709
+ bt as isValidDomainOrIntranetUrl,
710
+ Pr as isValidIsoDate,
711
+ Vt as isValidUrl,
712
+ Xr as isoToDate,
713
+ Z as isoWeekNumber,
714
+ Tr as loadScript,
715
+ ar as lockBodyScrolling,
716
+ de as luminanceTextColor,
717
+ Ht as moveMultipleToIndex,
718
+ Wt as moveToIndex,
719
+ Bt as multiSelectTo,
720
+ Hr as normalizeToIsoDate,
721
+ ht as omit,
722
+ j as openAssetOverview,
723
+ J as openFolderOverview,
724
+ K as openLink,
725
+ Va as padPath,
717
726
  va as parseBooleanString,
718
- fe as parseBorder,
719
- _r as parseDisplayToIso,
720
- Ce as parseDuration,
721
- Pr as parseIsoDate,
722
- mt as parseJsonString,
723
- he as parseLightDark,
724
- ft as parseListString,
725
- ge as parseShadow,
726
- ut as pick,
727
- Kt as popoverSupported,
728
- xe as prefersReducedMotion,
729
- qe as quantizeLargestRemainder,
730
- ht as readLocalStorageValue,
731
- Ra as reducePathToDirectChild,
732
- $e as registerTranslation,
733
- Xt as removeAtIndex,
734
- Ht as removeMultipleAtIndex,
735
- ta as resizeImage,
736
- ha as rotateBox,
737
- ea as rotateImage,
738
- ba as safeExtension,
739
- Va as safeString,
740
- Fa as sanitizeHTML,
741
- ga as sanitizeRotation,
742
- tr as scrollIntoView,
743
- nt as serialize,
744
- j as shareAsset,
745
- Me as shimKeyframesHeightAuto,
746
- dr as sortByTopPosition,
747
- Y as sortTypefaceVariants,
748
- pa as splitBoxValues,
749
- Oa as splitCamelCaseFormatted,
750
- ye as stopAnimations,
751
- te as supportHLS,
752
- V as testFontAvailability,
753
- Ae as timecodeConverter,
754
- ka as toCamelCase,
755
- Xr as toIsoDate,
756
- Ya as toKebabCase,
757
- Na as toPascalCase,
727
+ pe as parseBorder,
728
+ Wr as parseDisplayToIso,
729
+ Se as parseDuration,
730
+ Br as parseIsoDate,
731
+ dt as parseJsonString,
732
+ De as parseLightDark,
733
+ pt as parseListString,
734
+ Te as parseShadow,
735
+ gt as pick,
736
+ ae as popoverSupported,
737
+ Ee as prefersReducedMotion,
738
+ Je as quantizeLargestRemainder,
739
+ _ as quoteFontFamily,
740
+ Dt as readLocalStorageValue,
741
+ Oa as reducePathToDirectChild,
742
+ Qe as registerTranslation,
743
+ Gt as removeAtIndex,
744
+ $t as removeMultipleAtIndex,
745
+ sa as resizeImage,
746
+ Da as rotateBox,
747
+ oa as rotateImage,
748
+ ka as safeExtension,
749
+ Ya as safeString,
750
+ Ua as sanitizeHTML,
751
+ Ta as sanitizeRotation,
752
+ sr as scrollIntoView,
753
+ ut as serialize,
754
+ tt as shareAsset,
755
+ Ae as shimKeyframesHeightAuto,
756
+ wr as sortByTopPosition,
757
+ N as sortTypefaceVariants,
758
+ Ma as splitBoxValues,
759
+ _a as splitCamelCaseFormatted,
760
+ Ie as stopAnimations,
761
+ se as supportHLS,
762
+ O as testFontAvailability,
763
+ Re as timecodeConverter,
764
+ Na as toCamelCase,
765
+ Gr as toIsoDate,
766
+ Pa as toKebabCase,
767
+ Xa as toPascalCase,
758
768
  vt as toRelativeUrl,
759
- Ua as toTitleCase,
760
- Wt as toast,
761
- _a as truncateTextMiddle,
762
- Pa as unescapeXML,
763
- er as unlockBodyScrolling,
764
- Xa as upperFirst,
765
- Xe as validValidityState,
766
- He as valueMissingValidityState,
767
- Se as waitForEvent,
768
- Ar as watch,
769
- gt as writeLocalStorageValue
769
+ Ha as toTitleCase,
770
+ qt as toast,
771
+ Wa as truncateTextMiddle,
772
+ Ba as unescapeXML,
773
+ or as unlockBodyScrolling,
774
+ it as unquoteFontFamily,
775
+ Ga as upperFirst,
776
+ Ge as validValidityState,
777
+ $e as valueMissingValidityState,
778
+ Le as waitForEvent,
779
+ Rr as watch,
780
+ Tt as writeLocalStorageValue
770
781
  };