@orangelogic/design-system 2.228.0 → 2.229.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 (116) hide show
  1. package/library/chunks/{asset-link-format.DLYctI8Q.js → asset-link-format.C524ORni.js} +723 -701
  2. package/library/chunks/{button.CrhpoXK8.js → button.ByfW1n1P.js} +1 -1
  3. package/library/chunks/{color-swatch-group.DMpWk1pm.js → color-swatch-group.BsS_WSkX.js} +9 -9
  4. package/library/chunks/{color-swatch.CSsvAlq8.js → color-swatch.BMsBeGVi.js} +1 -1
  5. package/library/chunks/{confirm-popover.CrB-N3KV.js → confirm-popover.sVFj9zPi.js} +3 -3
  6. package/library/chunks/{dialog.DWa11p4j.js → dialog.C1GgF9kf.js} +2 -2
  7. package/library/chunks/{document-viewer.D5885amO.js → document-viewer.BYoPlykW.js} +6 -6
  8. package/library/chunks/{dot-pagination.ry5d0ZtQ.js → dot-pagination.yATbscYF.js} +1 -1
  9. package/library/chunks/{folder-select.BIXyzMCY.js → folder-select.BVvQo_lR.js} +4 -4
  10. package/library/chunks/{header.CIdqF9dY.js → header.BXuOKS0L.js} +1 -1
  11. package/library/chunks/{i18n.CXIpdSSZ.js → i18n.Dv4-j3re.js} +4 -3
  12. package/library/chunks/{icon-button.BBLy-yj3.js → icon-button.N5YNs1qg.js} +1 -1
  13. package/library/chunks/{iframe.FHGbVxm4.js → iframe.b-u-DyQ0.js} +1 -1
  14. package/library/chunks/{image.BYDGEbte.js → image.6LrV-0hE.js} +2 -2
  15. package/library/chunks/{input.B1JamaTE.js → input.ve6RUdJ5.js} +1 -1
  16. package/library/chunks/{markdown.DP1DqzwO.js → markdown.CpZAccJx.js} +2 -2
  17. package/library/chunks/{option.C3DgnL2F.js → option.C7dkuxVF.js} +1 -1
  18. package/library/chunks/{pagination.DSi4odS9.js → pagination.s4rK5EBT.js} +5 -5
  19. package/library/chunks/{tab-group.PQnc285p.js → tab-group.CvUu5LK3.js} +3 -3
  20. package/library/chunks/{toast.GT3J-T2_.js → toast.CR5tYYn3.js} +1 -1
  21. package/library/chunks/transformation.0cnXfwVJ.js +415 -0
  22. package/library/chunks/{tree.BS7eGCf0.js → tree.yJto6M6E.js} +1 -1
  23. package/library/chunks/url.qYS-uQJe.js +89 -0
  24. package/library/components/alert.js +2 -2
  25. package/library/components/asset-link-format.js +4 -4
  26. package/library/components/atoms.js +14 -14
  27. package/library/components/audio.js +9 -5
  28. package/library/components/border-input-group.js +2 -2
  29. package/library/components/breadcrumb.js +1 -1
  30. package/library/components/button.js +2 -2
  31. package/library/components/color-picker.js +3 -3
  32. package/library/components/color-swatch-group.js +5 -5
  33. package/library/components/color-swatch.js +2 -2
  34. package/library/components/confirm-popover.js +4 -4
  35. package/library/components/copy-button.js +1 -1
  36. package/library/components/corner-position-input-group.js +3 -3
  37. package/library/components/date-calendar.js +1 -1
  38. package/library/components/details.js +1 -1
  39. package/library/components/dialog.js +3 -3
  40. package/library/components/document-viewer.js +3 -3
  41. package/library/components/dot-pagination.js +2 -2
  42. package/library/components/drawer.js +2 -2
  43. package/library/components/dropdown.js +32 -23
  44. package/library/components/dynamic-select.js +4 -4
  45. package/library/components/e-chart.js +1 -1
  46. package/library/components/element-clamp.js +2 -2
  47. package/library/components/file-on-demand.js +10 -10
  48. package/library/components/folder-select.js +4 -4
  49. package/library/components/format-bytes.js +1 -1
  50. package/library/components/format-date.js +1 -1
  51. package/library/components/format-number.js +1 -1
  52. package/library/components/format-time.js +1 -1
  53. package/library/components/header.js +2 -2
  54. package/library/components/icon-button.js +2 -2
  55. package/library/components/iframe.js +2 -2
  56. package/library/components/image-comparer.js +1 -1
  57. package/library/components/image.js +3 -3
  58. package/library/components/input.js +2 -2
  59. package/library/components/line-clamp.js +1 -1
  60. package/library/components/markdown.js +3 -3
  61. package/library/components/masonry.js +2 -2
  62. package/library/components/menu-item.js +1 -1
  63. package/library/components/menu.js +1 -1
  64. package/library/components/molecules.js +3 -3
  65. package/library/components/option.js +2 -2
  66. package/library/components/organisms.js +2 -2
  67. package/library/components/padding-input-group.js +1 -1
  68. package/library/components/pagination.js +6 -6
  69. package/library/components/popup.js +1 -1
  70. package/library/components/position-picker.js +1 -1
  71. package/library/components/progress-bar.js +1 -1
  72. package/library/components/progress-ring.js +1 -1
  73. package/library/components/range.js +1 -1
  74. package/library/components/rating.js +1 -1
  75. package/library/components/relative-time.js +1 -1
  76. package/library/components/select.js +2 -2
  77. package/library/components/shadow-input-group.js +1 -1
  78. package/library/components/share-option-list.js +1 -1
  79. package/library/components/sidebar.js +1 -1
  80. package/library/components/size-input-group.js +3 -3
  81. package/library/components/spinner.js +1 -1
  82. package/library/components/split-panel.js +1 -1
  83. package/library/components/tab-group.js +4 -4
  84. package/library/components/tab.js +2 -2
  85. package/library/components/tag.js +2 -2
  86. package/library/components/tooltip.js +1 -1
  87. package/library/components/tree-item.js +2 -2
  88. package/library/components/tree.js +2 -2
  89. package/library/components/typeface.js +2 -2
  90. package/library/components/types.js +19792 -19635
  91. package/library/components/video.js +2 -2
  92. package/library/package.json +1 -1
  93. package/library/packages/atoms/src/components/audio/audio.d.ts +2 -0
  94. package/library/packages/atoms/src/components/dropdown/dropdown.d.ts +6 -0
  95. package/library/packages/events/src/events.d.ts +0 -4
  96. package/library/packages/organisms/src/content-builder/blocks/audio/audio.d.ts +24 -0
  97. package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +12 -5
  98. package/library/packages/organisms/src/content-builder/blocks/video/video.d.ts +5 -4
  99. package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +5 -0
  100. package/library/packages/organisms/src/content-builder/content-builder.d.ts +17 -1
  101. package/library/packages/organisms/src/content-builder-viewer/content-builder-viewer.d.ts +9 -0
  102. package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +2 -1
  103. package/library/packages/tools/src/fetch-image/fetch-image.d.ts +27 -0
  104. package/library/packages/utils/src/asset-url-mode/asset-url-mode.d.ts +22 -0
  105. package/library/packages/utils/src/asset-url-mode/index.d.ts +1 -0
  106. package/library/packages/utils/src/custom-element/i18n.d.ts +1 -0
  107. package/library/packages/utils/src/url/url.d.ts +7 -0
  108. package/library/react-web-component.d.ts +13 -1
  109. package/library/utils.js +214 -213
  110. package/package.json +1 -1
  111. package/library/chunks/transformation.Bjs3TBPd.js +0 -376
  112. package/library/chunks/url.CGdWC06g.js +0 -76
  113. package/library/packages/events/src/cx-image-src-resolved.d.ts +0 -9
  114. package/library/packages/events/src/cx-timeline-data-resolved.d.ts +0 -10
  115. package/library/packages/events/src/cx-video-src-resolved.d.ts +0 -8
  116. package/library/packages/events/src/cx-video-thumbnail-resolved.d.ts +0 -8
@@ -1,376 +0,0 @@
1
- import { c as k } from "./capitalize.CIBKBL10.js";
2
- import { C as $, T as R, U as M } from "./asset-link-format.ClaYu_v8.js";
3
- import { P as v } from "./position-picker.DjnhxIKF.js";
4
- const L = window.location.origin.includes("localhost:") ? "https://local.orangelogic.com" : window.location.origin;
5
- function ae(e, i, n, u = L) {
6
- const c = new URL(u + "/" + e);
7
- return Array.isArray(n) ? n.forEach((a) => {
8
- a[1] && c.searchParams.append(a[0], a[1]);
9
- }) : n && Object.keys(n).forEach((a) => {
10
- n[a] && c.searchParams.append(a, n[a]);
11
- }), fetch(c, i);
12
- }
13
- const oe = "space-default";
14
- var p = /* @__PURE__ */ ((e) => (e.Desktop = "desktop", e.Mobile = "mobile", e.Tablet = "tablet", e))(p || {});
15
- const F = {
16
- canvasWidth: "",
17
- height: "",
18
- id: "desktop",
19
- maxWidth: "",
20
- name: k(
21
- "desktop"
22
- /* Desktop */
23
- )
24
- }, w = {
25
- canvasWidth: "770px",
26
- height: "",
27
- id: "tablet",
28
- maxWidth: "1280px",
29
- name: k(
30
- "tablet"
31
- /* Tablet */
32
- )
33
- }, W = {
34
- canvasWidth: "320px",
35
- height: "",
36
- id: "mobile",
37
- maxWidth: "480px",
38
- name: k(
39
- "mobile"
40
- /* Mobile */
41
- )
42
- }, re = [F, w, W];
43
- var B = /* @__PURE__ */ ((e) => (e.All = "ALL", e.CanDelete = "CanDelete", e.CanDownload = "CanDownload", e.CanFind = "CanFind", e.CanManageRights = "CanManageRights", e.CanMove = "CanMove", e.CanRead = "CanRead", e.CanReadAll = "CanReadAll", e.CanReadAndWrite = "CanReadAndWrite", e.CanReadLarge = "CanReadLarge", e.CanReadMedium = "CanReadMedium", e.CanReadOriginal = "CanReadOriginal", e.CanShare = "CanShare", e.CanUpload = "CanUpload", e.CanWrite = "CanWrite", e.None = "NONE", e))(B || {}), D = /* @__PURE__ */ ((e) => (e.All = "all", e.Audio = "audio", e.Image = "image", e.Other = "other", e.Video = "video", e))(D || {}), U = /* @__PURE__ */ ((e) => (e.Content = "content", e.Template = "template", e))(U || {}), G = /* @__PURE__ */ ((e) => (e.Administrator = "Administrator", e.Designer = "Designer", e.Editor = "Editor", e))(G || {}), I = /* @__PURE__ */ ((e) => (e.Accordion = "BlockAccordion", e.Analytics = "BlockAnalytics", e.Audio = "BlockAudio", e.Button = "BlockButton", e.Carousel = "BlockCarousel", e.ColorSwatches = "BlockColorSwatches", e.Column = "BlockCell", e.ColumnGroup = "BlockColumns", e.DamView = "BlockDamView", e.Divider = "BlockDivider", e.DocumentViewer = "BlockDocumentViewer", e.FontKit = "BlockFontKit", e.Gallery = "BlockGallery", e.Header = "BlockHeader", e.Image = "BlockImage", e.RichText = "BlockRichText", e.SearchBox = "BlockSearchBox", e.TabGroup = "BlockTabs", e.Text = "BlockText", e.Timeline = "BlockTimeline", e.Video = "BlockVideo", e))(I || {});
44
- const se = Object.values(I).filter(
45
- (e) => e !== "BlockCell"
46
- /* Column */
47
- );
48
- var K = /* @__PURE__ */ ((e) => (e.Carousel = "carousel", e.Gallery = "gallery", e))(K || {}), V = /* @__PURE__ */ ((e) => (e.Templates = "TEMPLATES", e.TranslatableAttributes = "TRANSLATABLE_ATTRIBUTES", e.TranslatableTexts = "TRANSLATABLE_TEXTS", e))(V || {});
49
- const _ = "/AssetLink/", X = {
50
- [v.BottomCenter]: $.South,
51
- [v.BottomLeft]: $.Southwest,
52
- [v.BottomRight]: $.Southeast,
53
- [v.CenterCenter]: $.Center,
54
- [v.CenterLeft]: $.West,
55
- [v.CenterRight]: $.East,
56
- [v.TopCenter]: $.North,
57
- [v.TopLeft]: $.Northwest,
58
- [v.TopRight]: $.Northeast
59
- }, g = "/t/", z = [400, 800, 1200, 1600, 2400], H = 0.15;
60
- function Y({
61
- asset: e,
62
- baseUrl: i,
63
- extension: n,
64
- options: u,
65
- parameters: c,
66
- transformations: a,
67
- useSession: f = ""
68
- }) {
69
- if (i == null)
70
- return "";
71
- let r = i;
72
- const h = a?.findLast(
73
- (l) => l.key === R.Quality
74
- );
75
- if (h && (a = [
76
- ...a?.filter(
77
- (l) => l.key !== R.Quality
78
- ) || [],
79
- h
80
- ]), a) {
81
- const l = [];
82
- for (let t = 0; t < a.length; t++) {
83
- const d = a[t];
84
- if (d.key === R.Rotate) {
85
- let o = d.value.rotation ?? 0;
86
- for (; a[t + 1]?.key === R.Rotate; )
87
- t++, o += a[t].value.rotation ?? 0;
88
- o !== 0 && l.push({ key: R.Rotate, value: { rotation: o } });
89
- } else
90
- l.push(d);
91
- }
92
- a = l;
93
- }
94
- a && a.length > 0 && (r += "/t/"), a?.forEach(({ key: l, value: t }) => {
95
- if (l === R.Resize) {
96
- if (t.unit === M.AspectRatio && t.ratioWidth && t.ratioHeight) {
97
- r += `re_ar_${t.ratioWidth}:${t.ratioHeight}/`;
98
- return;
99
- }
100
- const d = [
101
- ...[
102
- {
103
- key: "re_w_",
104
- value: Math.round(t.width ?? 0)
105
- },
106
- {
107
- key: "re_h_",
108
- value: Math.round(t.height ?? 0)
109
- }
110
- ].filter((o) => o.value !== void 0).map((o) => ({
111
- key: o.key,
112
- value: Math.round(Number(o.value))
113
- })),
114
- {
115
- key: "re_rm_",
116
- value: "stretch"
117
- }
118
- ];
119
- d.forEach(({ key: o, value: m }, A) => {
120
- r += `${o}${m}${A < d.length - 1 ? "," : ""}`;
121
- }), r += "/";
122
- }
123
- if (l === R.Crop) {
124
- const d = t.unit === M.AspectRatio && !!t.ratioWidth && !!t.ratioHeight, o = !t.disabledSize && !d, m = o && (t.x !== void 0 || t.y !== void 0), A = [
125
- ...[
126
- {
127
- key: "c_",
128
- value: t.mode
129
- },
130
- ...d ? [
131
- {
132
- key: "ar_",
133
- value: `${t.ratioWidth}:${t.ratioHeight}`
134
- }
135
- ] : [],
136
- ...o ? [
137
- {
138
- key: "c_w_",
139
- value: Math.round(t.width ?? 0)
140
- },
141
- {
142
- key: "c_h_",
143
- value: Math.round(t.height ?? 0)
144
- },
145
- {
146
- key: "c_x_",
147
- value: Math.round(t.x ?? 0) === 0 && u?.omitZeroXY ? void 0 : Math.round(t.x ?? 0)
148
- },
149
- {
150
- key: "c_y_",
151
- value: Math.round(t.y ?? 0) === 0 && u?.omitZeroXY ? void 0 : Math.round(t.y ?? 0)
152
- }
153
- ] : [],
154
- ...!m && t.focusMode && t.focusMode !== "manual" ? [
155
- {
156
- key: t.isFocusModeAuto ? "acm_" : "c_g_",
157
- value: t.focusMode
158
- }
159
- ] : [],
160
- ...!m && t.focusMode === "manual" && t.position ? [
161
- {
162
- key: "c_g_",
163
- value: X[t.position]
164
- }
165
- ] : []
166
- ].filter((C) => C.value !== void 0 && C.value !== null).map((C) => ({
167
- key: C.key,
168
- value: C.value
169
- })),
170
- ...d ? [] : [
171
- {
172
- key: "c_whu_",
173
- value: "pixel"
174
- }
175
- ]
176
- ];
177
- A.forEach(({ key: C, value: b }, x) => {
178
- const y = ["c_w_", "c_h_", "c_x_", "c_y_"].includes(C);
179
- r += `${C}${y ? Math.round(Number(b)) : b}${x < A.length - 1 ? "," : ""}`;
180
- }), r += "/";
181
- }
182
- if (l === R.Rotate && ([
183
- {
184
- key: "r_a_",
185
- value: t.rotation
186
- }
187
- ].filter((o) => o.value !== void 0).map((o) => ({
188
- key: o.key,
189
- value: Math.round(Number(o.value))
190
- })).forEach(({ key: o, value: m }) => {
191
- r += `${o}${m}`;
192
- }), r += "/"), l === R.Quality) {
193
- const d = [
194
- {
195
- key: "q_level_",
196
- value: t.quality
197
- }
198
- ].filter((o) => o.value !== void 0).map((o) => ({
199
- key: o.key,
200
- value: Math.round(Number(o.value))
201
- }));
202
- d.forEach(({ key: o, value: m }, A) => {
203
- r += `${o}${m}${A < d.length - 1 ? "," : ""}`;
204
- }), r += "/";
205
- }
206
- if (l === R.Metadata) {
207
- const d = [
208
- {
209
- key: "fl_keep_metadata",
210
- value: t.keepMetadata
211
- }
212
- ].filter((o) => o.value !== void 0).map((o) => ({ key: o.key, value: o.value }));
213
- d.forEach(({ key: o }, m) => {
214
- r += `${o}${m < d.length - 1 ? "," : ""}`;
215
- }), r += "/";
216
- }
217
- }), n && (r += `${e?.identifier ?? crypto.randomUUID()}${n}`);
218
- const s = [];
219
- return c && c.length > 0 && c.forEach(({ key: l, value: t }) => {
220
- s.push(
221
- `${encodeURIComponent(l.trim())}=${encodeURIComponent(t.trim())}`
222
- );
223
- }), i && f && s.push(`UseSession=${encodeURIComponent(f)}`), s.length > 0 && (r += `?${s.join("&")}`), r.endsWith("/") && (r = r.slice(0, -1)), r;
224
- }
225
- const E = ".auto";
226
- function ce(e, i, n = {}) {
227
- const u = n.format === T && S(n.extension), c = !!n.autoFormat && !u;
228
- if (!e || !i?.length && !c)
229
- return e;
230
- const a = i?.length ? Y({ baseUrl: "", transformations: i }).replace(/\/t\//g, "") : "";
231
- if (!a && !c)
232
- return e;
233
- const f = e.indexOf(_);
234
- if (f < 0)
235
- return a ? `${e}${g}${a}` : e;
236
- const r = e.slice(0, f + _.length), h = e.slice(f + _.length);
237
- if (!h)
238
- return e;
239
- const s = h.indexOf(g), l = s >= 0, t = h.indexOf("/"), d = l ? s : t, o = d >= 0 ? h.slice(0, d) : h, m = l ? h.slice(s + g.length) : t >= 0 ? h.slice(t + 1) : "", A = m.slice(m.lastIndexOf("/") + 1), C = A ? `${A.replace(/\.[^.]+$/, "")}${E}` : `${o.replace(/\.[^.]+$/, "")}${E}`, x = [a, c ? C : l ? "" : A].filter(
240
- Boolean
241
- );
242
- return x.length === 0 ? e : `${r}${o}${g}${x.join("/")}`;
243
- }
244
- function j(e) {
245
- return `re_w_${Math.round(e)}`;
246
- }
247
- function q(e, i) {
248
- if (!e || !Number.isFinite(i) || i <= 0)
249
- return e;
250
- const n = e.indexOf(_);
251
- if (n < 0)
252
- return e;
253
- const u = j(i), c = e.slice(0, n + _.length), a = e.slice(n + _.length), f = a.indexOf(g);
254
- if (f >= 0) {
255
- const h = a.slice(0, f), s = a.slice(
256
- f + g.length
257
- );
258
- return `${c}${h}${g}${u}/${s}`;
259
- }
260
- const r = a.indexOf("/");
261
- if (r >= 0) {
262
- const h = a.slice(0, r), s = a.slice(r);
263
- return `${c}${h}${g}${u}${s}`;
264
- }
265
- return `${c}${a}${g}${u}`;
266
- }
267
- function le(e) {
268
- const i = e.indexOf(_);
269
- return i < 0 ? !1 : e.slice(i + _.length).includes(g);
270
- }
271
- function Q(e) {
272
- const i = e.indexOf(_);
273
- if (i < 0)
274
- return !1;
275
- const n = e.slice(i + _.length), u = n.indexOf(g);
276
- return u < 0 ? !1 : n.slice(u + g.length).includes("/");
277
- }
278
- const T = "TRX", N = "TR1", Z = /* @__PURE__ */ new Set([
279
- "gif",
280
- "svg"
281
- ]);
282
- function O(e) {
283
- if (!e)
284
- return "";
285
- const i = e.trim().toLowerCase();
286
- return i.startsWith(".") ? i.slice(1) : i;
287
- }
288
- function S(e) {
289
- return O(e) === "gif";
290
- }
291
- const J = 1e3 * 1024 * 1024, P = {
292
- b: 1,
293
- byte: 1,
294
- bytes: 1,
295
- gb: 1024 ** 3,
296
- kb: 1024,
297
- mb: 1024 ** 2,
298
- tb: 1024 ** 4
299
- };
300
- function ee(e) {
301
- if (typeof e == "number")
302
- return Number.isFinite(e) && e >= 0 ? e : void 0;
303
- if (!e)
304
- return;
305
- const i = /^\s*([\d.,]+)\s*([a-z]*)\s*$/i.exec(e);
306
- if (!i)
307
- return;
308
- const n = Number(i[1].replace(/,/g, ""));
309
- if (!Number.isFinite(n) || n < 0)
310
- return;
311
- const u = i[2].toLowerCase();
312
- if (!u)
313
- return n;
314
- const c = P[u];
315
- return c === void 0 ? void 0 : n * c;
316
- }
317
- function de(e, i) {
318
- if (e)
319
- return;
320
- const n = typeof i == "number" ? i : Number(i ?? "");
321
- return Number.isFinite(n) && n > 0 ? n : void 0;
322
- }
323
- function ue(e, i) {
324
- if (!Z.has(O(e)))
325
- return N;
326
- const n = ee(i);
327
- return n !== void 0 && n > J ? N : T;
328
- }
329
- function he(e, i = {}) {
330
- if (!e.includes(_) || Q(e) || i.format === T && S(i.extension))
331
- return "";
332
- const { maxWidth: n, widths: u = z } = i, c = [...u].filter((s) => Number.isFinite(s) && s > 0).sort((s, l) => s - l);
333
- if (c.length === 0)
334
- return "";
335
- let a = c;
336
- if (n !== void 0 && Number.isFinite(n) && n > 0) {
337
- const s = c.filter((l) => l <= n);
338
- a = s.length > 0 ? s : [c[0]];
339
- }
340
- const f = n !== void 0 && Number.isFinite(n) && n > 0, h = (f ? a.filter(
341
- (s) => n > s * (1 + H)
342
- ) : a).map(
343
- (s) => `${q(e, s)} ${s}w`
344
- );
345
- return f && h.push(`${e} ${n}w`), h.join(", ");
346
- }
347
- function fe(e, i = 100) {
348
- return !Number.isFinite(e) || e <= 0 ? "" : `${Math.ceil(e / i) * i}px`;
349
- }
350
- export {
351
- D as A,
352
- I as B,
353
- p as D,
354
- U as E,
355
- B as P,
356
- oe as S,
357
- G as T,
358
- ce as a,
359
- he as b,
360
- de as c,
361
- Y as d,
362
- fe as e,
363
- ae as f,
364
- K as g,
365
- V as h,
366
- se as i,
367
- re as j,
368
- z as k,
369
- E as l,
370
- q as m,
371
- le as n,
372
- N as o,
373
- J as p,
374
- ee as q,
375
- ue as r
376
- };
@@ -1,76 +0,0 @@
1
- function R(t, a = globalThis.location.origin) {
2
- if (t) {
3
- try {
4
- const e = new URL(t);
5
- if (e.origin === a)
6
- return e.pathname + e.search + e.hash || "/";
7
- } catch {
8
- }
9
- return t;
10
- }
11
- }
12
- function r(t) {
13
- if (!t)
14
- return "";
15
- let a = t;
16
- try {
17
- a = new URL(t).pathname;
18
- } catch {
19
- a = t.split(/[?#]/)[0];
20
- }
21
- return a.replace(/\/+$/, "");
22
- }
23
- function f(t, a) {
24
- if (!t)
25
- return;
26
- if (a.some((n) => n.absoluteURL === t))
27
- return t;
28
- const e = r(t);
29
- if (!e)
30
- return;
31
- const s = a.filter(
32
- (n) => r(n.absoluteURL) === e
33
- ), [o] = s;
34
- return o ? s.some(
35
- (n) => n.absoluteURL !== o.absoluteURL
36
- ) ? void 0 : o.absoluteURL : void 0;
37
- }
38
- function p(t, a = "https://", e = !1) {
39
- return e && t.match(i) || t.match(/^[a-zA-Z][a-zA-Z\d+\-.]*:\/\//) ? t : `${a}${t}`;
40
- }
41
- function u(t, a, e) {
42
- if (!t)
43
- return t;
44
- const s = t.indexOf("#"), o = s === -1 ? t : t.slice(0, s), d = s === -1 ? "" : t.slice(s), n = o.includes("?") ? "&" : "?";
45
- return `${o}${n}${encodeURIComponent(a)}=${encodeURIComponent(e)}${d}`;
46
- }
47
- function _(t) {
48
- return !!t && t.toLowerCase().includes("expire");
49
- }
50
- function A(t) {
51
- try {
52
- return new URL(t), new RegExp(c, "i").test(t);
53
- } catch {
54
- return !1;
55
- }
56
- }
57
- const i = "^(?![a-zA-Z][a-zA-Z\\d+\\-.]*:\\/\\/)(?!([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,}($|\\/))[^\\s]+$", c = "^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[^\\s]*)?$", z = "^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.){2,}[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[^\\s]*)?$", h = "^((https?:\\/\\/)?[a-z\\d]([a-z\\d-]*[a-z\\d])*\\.[a-z\\d]([a-z\\d-]*[a-z\\d])*|(https?:\\/\\/)[a-z\\d]([a-z\\d-]*[a-z\\d])*)(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[^\\s]*)?$";
58
- function L(t) {
59
- return new RegExp(z, "i").test(t) || new RegExp(h, "i").test(t);
60
- }
61
- const E = "^(https?:\\/\\/)((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[^\\s]*)?$";
62
- export {
63
- i as R,
64
- c as U,
65
- u as a,
66
- p as b,
67
- L as c,
68
- _ as d,
69
- r as e,
70
- z as f,
71
- h as g,
72
- E as h,
73
- A as i,
74
- f as r,
75
- R as t
76
- };
@@ -1,9 +0,0 @@
1
- export type CxImageSrcResolvedEvent = CustomEvent<{
2
- src?: string;
3
- srcDarkMode?: string;
4
- }>;
5
- declare global {
6
- interface GlobalEventHandlersEventMap {
7
- 'cx-image-src-resolved': CxImageSrcResolvedEvent;
8
- }
9
- }
@@ -1,10 +0,0 @@
1
- import { TimelineItem } from '../../types/src/timeline';
2
-
3
- export type CxTimelineDataResolvedEvent = CustomEvent<{
4
- data: TimelineItem[];
5
- }>;
6
- declare global {
7
- interface GlobalEventHandlersEventMap {
8
- 'cx-timeline-data-resolved': CxTimelineDataResolvedEvent;
9
- }
10
- }
@@ -1,8 +0,0 @@
1
- export type CxVideoSrcResolvedEvent = CustomEvent<{
2
- formatSrc: string;
3
- }>;
4
- declare global {
5
- interface GlobalEventHandlersEventMap {
6
- 'cx-video-src-resolved': CxVideoSrcResolvedEvent;
7
- }
8
- }
@@ -1,8 +0,0 @@
1
- export type CxVideoThumbnailResolvedEvent = CustomEvent<{
2
- thumbnailSrc: string;
3
- }>;
4
- declare global {
5
- interface GlobalEventHandlersEventMap {
6
- 'cx-video-thumbnail-resolved': CxVideoThumbnailResolvedEvent;
7
- }
8
- }