@rulecms/widget-vue 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,32 +1,32 @@
1
- var He = Object.defineProperty;
2
- var Ge = (e, t, n) => t in e ? He(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var ye = (e, t, n) => Ge(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { defineComponent as D, reactive as ze, watch as De, provide as Ye, renderSlot as se, computed as y, openBlock as m, createElementBlock as b, normalizeStyle as S, normalizeClass as F, createBlock as A, resolveDynamicComponent as R, withCtx as V, createTextVNode as ie, toDisplayString as Y, createCommentVNode as W, Fragment as I, normalizeProps as Z, guardReactiveProps as ge, mergeProps as qe, resolveComponent as Xe, renderList as z, createVNode as ne, createElementVNode as $, ref as B, onMounted as Ze, onBeforeUnmount as xe, inject as Je, unref as T } from "vue";
1
+ var Qe = Object.defineProperty;
2
+ var et = (e, t, n) => t in e ? Qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var we = (e, t, n) => et(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { defineComponent as k, reactive as tt, watch as $e, provide as nt, renderSlot as le, computed as h, openBlock as y, createElementBlock as b, normalizeStyle as S, normalizeClass as U, createBlock as w, resolveDynamicComponent as O, withCtx as $, createTextVNode as X, toDisplayString as H, createCommentVNode as R, Fragment as A, normalizeProps as Q, guardReactiveProps as Ce, mergeProps as ot, resolveComponent as st, createVNode as V, renderList as W, createElementVNode as N, ref as K, onMounted as it, onBeforeUnmount as Re, inject as rt, unref as x } from "vue";
5
5
  const _ = "default";
6
- function Te(e, t) {
6
+ function Me(e, t) {
7
7
  return !(e != null && e.length) || e === _ ? t : `${e}/${t}`;
8
8
  }
9
- const Qe = `RuleCMS widget: this widget config uses components from the default component library, but no "default" library is registered. The default library is registered by the consumer app: add the RuleCMS default source components package as a direct dependency and register it, e.g. libraries: { default: sourceComponentsModule } (statically imported for SSR) or libraries: { default: () => import('<default source components package>') }. See the @rulecms/widget-vue README.`;
10
- function he(e) {
9
+ const lt = `RuleCMS widget: this widget config uses components from the default component library, but no "default" library is registered. The default library is registered by the consumer app: add the RuleCMS default source components package as a direct dependency and register it, e.g. libraries: { default: sourceComponentsModule } (statically imported for SSR) or libraries: { default: () => import('<default source components package>') }. See the @rulecms/widget-vue README.`;
10
+ function ve(e) {
11
11
  if (!e || typeof e != "object")
12
12
  return !1;
13
13
  const t = e;
14
14
  return !!t.manifest && typeof t.manifest == "object" && !!t.components && typeof t.components == "object" && !Array.isArray(t.components);
15
15
  }
16
- function et(e) {
17
- if (he(e))
16
+ function ct(e) {
17
+ if (ve(e))
18
18
  return e;
19
19
  const t = e;
20
- return he(t == null ? void 0 : t.default) ? t.default : null;
20
+ return ve(t == null ? void 0 : t.default) ? t.default : null;
21
21
  }
22
- function J(e) {
22
+ function ee(e) {
23
23
  return e.usesDefaultLibrary ? [_, ...e.libraryIds] : [...e.libraryIds];
24
24
  }
25
- function be({ registrations: e, referenced: t }) {
25
+ function Ae({ registrations: e, referenced: t }) {
26
26
  if (t.usesDefaultLibrary && !(e != null && e[_]))
27
- throw new Error(Qe);
27
+ throw new Error(lt);
28
28
  }
29
- function tt(e) {
29
+ function at(e) {
30
30
  const t = [], n = /* @__PURE__ */ new Set();
31
31
  for (const o of e.values()) {
32
32
  if (typeof o.stylesheet != "string")
@@ -36,109 +36,109 @@ function tt(e) {
36
36
  }
37
37
  return t.length > 0 ? t : void 0;
38
38
  }
39
- function nt(e) {
39
+ function ut(e) {
40
40
  const t = {};
41
41
  for (const [o, s] of e) {
42
42
  const i = o === _;
43
- for (const [c, d] of Object.entries(s.components))
44
- t[i ? c : `${o}/${c}`] = d;
43
+ for (const [r, u] of Object.entries(s.components))
44
+ t[i ? r : `${o}/${r}`] = u;
45
45
  }
46
- const n = tt(e);
46
+ const n = at(e);
47
47
  return n ? { components: t, stylesheets: n } : { components: t };
48
48
  }
49
- function q() {
49
+ function Z() {
50
50
  const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
51
51
  let s = 0;
52
- function i(r, l) {
53
- var f;
54
- e.get(r) !== l && ((f = l.manifest) != null && f.id && l.manifest.id !== r && console.warn(
55
- `RuleCMS widget: component library registered as "${r}" declares manifest id "${l.manifest.id}". The registered id wins for resolution.`
56
- ), e.set(r, l), s += 1);
52
+ function i(c, a) {
53
+ var d;
54
+ e.get(c) !== a && ((d = a.manifest) != null && d.id && a.manifest.id !== c && console.warn(
55
+ `RuleCMS widget: component library registered as "${c}" declares manifest id "${a.manifest.id}". The registered id wins for resolution.`
56
+ ), e.set(c, a), s += 1);
57
57
  }
58
- function c(r) {
59
- const l = J(r), f = [...l].sort().join("|"), u = o.get(f);
60
- if (u && u.loadedVersion === s)
61
- return u.plugin;
62
- const p = /* @__PURE__ */ new Map();
63
- for (const g of l) {
64
- const v = e.get(g);
65
- v && p.set(g, v);
58
+ function r(c) {
59
+ const a = ee(c), d = [...a].sort().join("|"), p = o.get(d);
60
+ if (p && p.loadedVersion === s)
61
+ return p.plugin;
62
+ const l = /* @__PURE__ */ new Map();
63
+ for (const f of a) {
64
+ const I = e.get(f);
65
+ I && l.set(f, I);
66
66
  }
67
- const h = nt(p);
68
- return o.set(f, { loadedVersion: s, plugin: h }), h;
67
+ const g = ut(l);
68
+ return o.set(d, { loadedVersion: s, plugin: g }), g;
69
69
  }
70
- function d(r) {
71
- be(r);
72
- const { registrations: l, referenced: f } = r;
73
- for (const u of J(f)) {
74
- if (e.has(u) || n.has(u))
70
+ function u(c) {
71
+ Ae(c);
72
+ const { registrations: a, referenced: d } = c;
73
+ for (const p of ee(d)) {
74
+ if (e.has(p) || n.has(p))
75
75
  continue;
76
- const p = l == null ? void 0 : l[u];
77
- if (!p) {
76
+ const l = a == null ? void 0 : a[p];
77
+ if (!l) {
78
78
  console.error(
79
- `RuleCMS widget: no component library registered for libraryId "${u}"; its components will not render.`
80
- ), n.set(u, new Error(`No registration for libraryId "${u}"`));
79
+ `RuleCMS widget: no component library registered for libraryId "${p}"; its components will not render.`
80
+ ), n.set(p, new Error(`No registration for libraryId "${p}"`));
81
81
  continue;
82
82
  }
83
- if (typeof p == "function")
83
+ if (typeof l == "function")
84
84
  return null;
85
- i(u, p);
85
+ i(p, l);
86
86
  }
87
- return c(f);
87
+ return r(d);
88
88
  }
89
- async function a(r) {
90
- be(r);
91
- const { registrations: l, referenced: f } = r, u = J(f);
89
+ async function m(c) {
90
+ Ae(c);
91
+ const { registrations: a, referenced: d } = c, p = ee(d);
92
92
  return await Promise.all(
93
- u.map(async (p) => {
94
- if (e.has(p) || n.has(p))
93
+ p.map(async (l) => {
94
+ if (e.has(l) || n.has(l))
95
95
  return;
96
- const h = l == null ? void 0 : l[p];
97
- if (!h) {
96
+ const g = a == null ? void 0 : a[l];
97
+ if (!g) {
98
98
  console.error(
99
- `RuleCMS widget: no component library registered for libraryId "${p}"; its components will not render.`
100
- ), n.set(p, new Error(`No registration for libraryId "${p}"`));
99
+ `RuleCMS widget: no component library registered for libraryId "${l}"; its components will not render.`
100
+ ), n.set(l, new Error(`No registration for libraryId "${l}"`));
101
101
  return;
102
102
  }
103
- if (typeof h != "function") {
104
- i(p, h);
103
+ if (typeof g != "function") {
104
+ i(l, g);
105
105
  return;
106
106
  }
107
- let g = t.get(p);
108
- g || (g = h().then((v) => {
109
- const C = et(v);
110
- if (!C)
107
+ let f = t.get(l);
108
+ f || (f = g().then((I) => {
109
+ const v = ct(I);
110
+ if (!v)
111
111
  throw new Error(
112
- `Registration for libraryId "${p}" did not resolve to a ComponentLibraryModule (expected { manifest, components }).`
112
+ `Registration for libraryId "${l}" did not resolve to a ComponentLibraryModule (expected { manifest, components }).`
113
113
  );
114
- i(p, C);
115
- }).catch((v) => {
116
- n.set(p, v), console.error(
117
- `RuleCMS widget: failed to load component library "${p}":`,
118
- v
114
+ i(l, v);
115
+ }).catch((I) => {
116
+ n.set(l, I), console.error(
117
+ `RuleCMS widget: failed to load component library "${l}":`,
118
+ I
119
119
  );
120
120
  }).finally(() => {
121
- t.delete(p);
122
- }), t.set(p, g)), await g;
121
+ t.delete(l);
122
+ }), t.set(l, f)), await f;
123
123
  })
124
- ), c(f);
124
+ ), r(d);
125
125
  }
126
- return { resolveSync: d, resolve: a };
126
+ return { resolveSync: u, resolve: m };
127
127
  }
128
- const Po = {
128
+ const Go = {
129
129
  Preview: "Preview",
130
130
  Compose: "Compose",
131
131
  RenderedPage: "RenderedPage"
132
- }, re = {
132
+ }, ce = {
133
133
  DroppableBox: "droppable-box"
134
- }, we = {
134
+ }, Ie = {
135
135
  FlexStart: "flex-start",
136
136
  FlexEnd: "flex-end",
137
137
  Center: "center",
138
138
  SpaceBetween: "space-between",
139
139
  SpaceAround: "space-around",
140
140
  SpaceEvenly: "space-evenly"
141
- }, Eo = {
141
+ }, Yo = {
142
142
  FlexStart: "flex-start",
143
143
  FlexEnd: "flex-end",
144
144
  Center: "center",
@@ -146,49 +146,49 @@ const Po = {
146
146
  SpaceAround: "space-around",
147
147
  SpaceEvenly: "space-evenly",
148
148
  Stretch: "stretch"
149
- }, Q = "cssAttrArray", $o = {
149
+ }, se = "cssAttrArray", qo = {
150
150
  Phone: "phone",
151
151
  Tablet: "tablet",
152
152
  Desktop: "desktop"
153
- }, Pe = {
153
+ }, Ne = {
154
154
  ComposerComponent: "ComposerWidget",
155
155
  Collection: "Collection",
156
156
  MoveComponentHandle: "MoveWidgetHandle"
157
- }, Ee = `${Pe.Collection}_`, ot = "dev.", st = "https://rulecms.com", it = "https://widget-cache.rulecms.com", rt = "/api/v1/c/widget/get", lt = "/api/v1/c/dev/widget/get";
158
- function L(e) {
159
- return typeof e == "string" && e.startsWith(ot);
157
+ }, We = `${Ne.Collection}_`, dt = "dev.", pt = "https://rulecms.com", ft = "https://widget-cache.rulecms.com", yt = "/api/v1/c/widget/get", mt = "/api/v1/c/dev/widget/get";
158
+ function j(e) {
159
+ return typeof e == "string" && e.startsWith(dt);
160
160
  }
161
- function ct(e, t) {
162
- return t ? t.replace(/\/$/, "") : L(e) ? st : it;
161
+ function gt(e, t) {
162
+ return t ? t.replace(/\/$/, "") : j(e) ? pt : ft;
163
163
  }
164
- function $e({
164
+ function Oe({
165
165
  publishedKey: e,
166
166
  token: t,
167
167
  endpoint: n
168
168
  }) {
169
- const o = L(t), s = o ? lt : rt, i = o ? new URLSearchParams({ widgetKey: e, token: t }) : new URLSearchParams({ publishedKey: e, token: t });
170
- return `${ct(t, n)}${s}?${i.toString()}`;
169
+ const o = j(t), s = o ? mt : yt, i = o ? new URLSearchParams({ widgetKey: e, token: t }) : new URLSearchParams({ publishedKey: e, token: t });
170
+ return `${gt(t, n)}${s}?${i.toString()}`;
171
171
  }
172
- const Ro = ({ id: e, prefix: t }) => `${t}_${e}`, at = (e) => {
172
+ const Xo = ({ id: e, prefix: t }) => `${t}_${e}`, ht = (e) => {
173
173
  if (!(e != null && e.length) || !e.includes("_")) {
174
174
  console.error(`Invalid drag item id: ${e}. Type does not exist.`);
175
175
  return;
176
176
  }
177
- return ut(e);
178
- }, Re = (e) => e.includes("_"), ut = (e) => {
177
+ return bt(e);
178
+ }, Ve = (e) => e.includes("_"), bt = (e) => {
179
179
  const t = e.indexOf("_"), n = e.substring(0, t), o = e.substring(t + 1);
180
180
  return {
181
181
  prefix: n,
182
182
  id: o
183
183
  };
184
- }, Le = (e) => {
185
- if (!Re(e))
184
+ }, je = (e) => {
185
+ if (!Ve(e))
186
186
  return;
187
- const n = at(e);
188
- return (n == null ? void 0 : n.prefix) === Pe.Collection || console.error(
187
+ const n = ht(e);
188
+ return (n == null ? void 0 : n.prefix) === Ne.Collection || console.error(
189
189
  "getCollectionIdForCollectionType - Invalid component type: ${componentType}. Invalid prefix type."
190
190
  ), n == null ? void 0 : n.id;
191
- }, Lo = (e) => {
191
+ }, Zo = (e) => {
192
192
  if (!(e != null && e.length)) {
193
193
  console.error("getNameAndInstanceIdFromWidgetKey: Missing widget key");
194
194
  return;
@@ -203,47 +203,47 @@ const Ro = ({ id: e, prefix: t }) => `${t}_${e}`, at = (e) => {
203
203
  return { name: n, instanceId: t[1] };
204
204
  const s = t[1].split("@");
205
205
  return { name: n, instanceId: s[0], parentId: s[1] };
206
- }, Mo = (e) => {
206
+ }, Jo = (e) => {
207
207
  if (!(e != null && e.length))
208
208
  return { errorMessage: "getNameFromWidgetKey: Missing widget key" };
209
209
  const t = e.split("$");
210
210
  return t.length < 2 ? { errorMessage: "getNameFromWidgetKey: Invalid widget key format" } : { name: t[0] };
211
- }, dt = (e) => {
212
- var s, i, c, d;
211
+ }, wt = (e) => {
212
+ var s, i, r, u;
213
213
  if (!e)
214
214
  return { error: "getWidgetKeyForCollection: Missing collection" };
215
215
  if (!((s = e.name) != null && s.length))
216
216
  return { error: "getWidgetKeyForCollection: Missing collection name" };
217
217
  const t = (i = e.name) == null ? void 0 : i.trim().toLowerCase();
218
- if (!((c = e.id) != null && c.length))
218
+ if (!((r = e.id) != null && r.length))
219
219
  return { error: "getWidgetKeyForCollection: Missing collection id" };
220
- const o = ((d = e.parentId) == null ? void 0 : d.length) ? `${e.id}@${e.parentId}` : `${e.id}`;
220
+ const o = ((u = e.parentId) == null ? void 0 : u.length) ? `${e.id}@${e.parentId}` : `${e.id}`;
221
221
  return { data: `${t}$${o}` };
222
- }, pt = (e) => {
223
- var s, i, c, d;
222
+ }, Ct = (e) => {
223
+ var s, i, r, u;
224
224
  if (!e)
225
225
  return { error: "getWidgetKeyForPublishedCollection: Missing collection" };
226
226
  if (!((s = e.name) != null && s.length))
227
227
  return { error: "getWidgetKeyForPublishedCollection: Missing collection name" };
228
228
  const t = (i = e.name) == null ? void 0 : i.trim().toLowerCase();
229
- if (!((c = e.publishedKey) != null && c.length))
229
+ if (!((r = e.publishedKey) != null && r.length))
230
230
  return { error: "getWidgetKeyForPublishedCollection: Missing collection publishedKey" };
231
- const o = ((d = e.parentId) == null ? void 0 : d.length) ? `${e.publishedKey}@${e.parentId}` : `${e.publishedKey}`;
231
+ const o = ((u = e.parentId) == null ? void 0 : u.length) ? `${e.publishedKey}@${e.parentId}` : `${e.publishedKey}`;
232
232
  return { data: `${t}$${o}` };
233
- }, No = (e) => {
234
- const t = dt(e);
235
- return `${Ee}${t.data}`;
236
- }, Wo = (e) => {
237
- const t = pt(e);
238
- return `${Ee}${t.data}`;
239
- }, ft = "---", mt = "___";
240
- function yt(e, t) {
241
- return `${e}${ft}${t}`;
233
+ }, Qo = (e) => {
234
+ const t = wt(e);
235
+ return `${We}${t.data}`;
236
+ }, es = (e) => {
237
+ const t = Ct(e);
238
+ return `${We}${t.data}`;
239
+ }, vt = "---", At = "___";
240
+ function It(e, t) {
241
+ return `${e}${vt}${t}`;
242
242
  }
243
- function Oo(e, t, n) {
244
- return `${yt(e, t)}${mt}${n}`;
243
+ function ts(e, t, n) {
244
+ return `${It(e, t)}${At}${n}`;
245
245
  }
246
- function jo(e) {
246
+ function ns(e) {
247
247
  const t = e.split(".");
248
248
  if (t.length !== 3)
249
249
  throw new Error(`Invalid version format: ${e}. Expected format: x.y.z`);
@@ -252,19 +252,19 @@ function jo(e) {
252
252
  throw new Error(`Invalid patch version: ${t[2]}. Expected a number.`);
253
253
  return `${n}.${o}.${s + 1}`;
254
254
  }
255
- function le({
255
+ function ae({
256
256
  displayItemList: e,
257
257
  widgetCollections: t
258
258
  }) {
259
259
  const n = /* @__PURE__ */ new Set();
260
260
  let o = !1;
261
261
  const s = (i) => {
262
- var c, d, a;
263
- if ((c = i == null ? void 0 : i.rows) != null && c.length) {
264
- for (const r of i.rows)
265
- if ((d = r == null ? void 0 : r.columns) != null && d.length)
266
- for (const l of r.columns)
267
- l.collection && s(l.collection.collectionRows), !(!l.type || l.type === re.DroppableBox) && (Re(l.type) || (!((a = l.libraryId) != null && a.length) || l.libraryId === _ ? o = !0 : n.add(l.libraryId)));
262
+ var r, u, m;
263
+ if ((r = i == null ? void 0 : i.rows) != null && r.length) {
264
+ for (const c of i.rows)
265
+ if ((u = c == null ? void 0 : c.columns) != null && u.length)
266
+ for (const a of c.columns)
267
+ a.collection && s(a.collection.collectionRows), !(!a.type || a.type === ce.DroppableBox) && (Ve(a.type) || (!((m = a.libraryId) != null && m.length) || a.libraryId === _ ? o = !0 : n.add(a.libraryId)));
268
268
  }
269
269
  };
270
270
  s(e);
@@ -272,16 +272,16 @@ function le({
272
272
  s(i == null ? void 0 : i.collectionRows);
273
273
  return { libraryIds: Array.from(n), usesDefaultLibrary: o };
274
274
  }
275
- const Me = Symbol("rulecms-widget-context");
276
- function gt() {
275
+ const Be = Symbol("rulecms-widget-context");
276
+ function St() {
277
277
  return {
278
278
  token: "",
279
279
  endpoint: void 0,
280
280
  libraries: void 0,
281
- libraryRegistry: q()
281
+ libraryRegistry: Z()
282
282
  };
283
283
  }
284
- const Bo = /* @__PURE__ */ D({
284
+ const os = /* @__PURE__ */ k({
285
285
  __name: "RuleCMSWidgetProvider",
286
286
  props: {
287
287
  token: {},
@@ -289,97 +289,97 @@ const Bo = /* @__PURE__ */ D({
289
289
  libraries: {}
290
290
  },
291
291
  setup(e) {
292
- const t = e, n = ze(gt());
293
- return De(
292
+ const t = e, n = tt(St());
293
+ return $e(
294
294
  () => [t.token, t.endpoint, t.libraries],
295
295
  () => {
296
296
  n.token = t.token, n.endpoint = t.endpoint, n.libraries = t.libraries;
297
297
  },
298
298
  { immediate: !0 }
299
- ), Ye(Me, n), (o, s) => se(o.$slots, "default");
299
+ ), nt(Be, n), (o, s) => le(o.$slots, "default");
300
300
  }
301
- }), ht = "1200px", Ne = "500px", We = "820px", Fo = ht, bt = "rulecms", wt = 1920, Ct = {
301
+ }), kt = "1200px", Fe = "500px", Ke = "820px", ss = kt, Dt = "rulecms", Tt = 1920, xt = {
302
302
  f: "auto",
303
303
  q: "auto",
304
304
  c: "limit"
305
- }, vt = /^[A-Za-z0-9][A-Za-z0-9._\-/]*$/, At = 300, St = /^[A-Za-z0-9][A-Za-z0-9_-]*$/, It = 100, kt = /^https:\/\/[^\s"'()\\<>]+$/, Dt = 2e3, xt = /^[A-Za-z0-9_,.:\-/]*$/, Tt = 300, Pt = (e) => typeof e == "string" && e.length <= At && vt.test(e), Et = (e) => typeof e == "string" && e.length <= It && St.test(e), $t = (e) => typeof e == "string" && e.length <= Dt && kt.test(e), Rt = (e) => typeof e == "string" && e.length <= Tt && xt.test(e), Lt = (e) => Object.entries(e).map(([t, n]) => `${t}_${n}`).join(","), Mt = (e) => {
305
+ }, Et = /^[A-Za-z0-9][A-Za-z0-9._\-/]*$/, Pt = 300, Lt = /^[A-Za-z0-9][A-Za-z0-9_-]*$/, $t = 100, Rt = /^https:\/\/[^\s"'()\\<>]+$/, Mt = 2e3, Nt = /^[A-Za-z0-9_,.:\-/]*$/, Wt = 300, Ot = (e) => typeof e == "string" && e.length <= Pt && Et.test(e), Vt = (e) => typeof e == "string" && e.length <= $t && Lt.test(e), jt = (e) => typeof e == "string" && e.length <= Mt && Rt.test(e), Bt = (e) => typeof e == "string" && e.length <= Wt && Nt.test(e), Ft = (e) => Object.entries(e).map(([t, n]) => `${t}_${n}`).join(","), Kt = (e) => {
306
306
  const t = {};
307
307
  for (const n of e.split(",")) {
308
308
  const o = n.trim(), s = o.indexOf("_");
309
309
  s <= 0 || (t[o.slice(0, s)] = o.slice(s + 1));
310
310
  }
311
311
  return t;
312
- }, Nt = ({
312
+ }, Ut = ({
313
313
  publicId: e,
314
- cloudName: t = bt,
314
+ cloudName: t = Dt,
315
315
  transformations: n,
316
- width: o = wt
316
+ width: o = Tt
317
317
  }) => {
318
- const s = typeof n == "string" ? Mt(n) : n, i = {
319
- ...Ct,
318
+ const s = typeof n == "string" ? Kt(n) : n, i = {
319
+ ...xt,
320
320
  ...s,
321
321
  w: o
322
322
  };
323
323
  return encodeURI(
324
- `https://res.cloudinary.com/${t}/image/upload/${Lt(i)}/${e}`
324
+ `https://res.cloudinary.com/${t}/image/upload/${Ft(i)}/${e}`
325
325
  );
326
- }, Wt = /^--[A-Za-z0-9_-]+$/, Ot = 200, Oe = (e) => {
326
+ }, Ht = /^--[A-Za-z0-9_-]+$/, _t = 200, ue = (e) => {
327
327
  if (typeof e != "string")
328
328
  return !1;
329
329
  const t = e.trim();
330
- return t.length <= Ot && Wt.test(t);
331
- }, k = (e) => `var(${e.trim()})`, w = (e) => {
330
+ return t.length <= _t && Ht.test(t);
331
+ }, D = (e) => `var(${e.trim()})`, C = (e) => {
332
332
  if (typeof e != "object" || e === null || Array.isArray(e))
333
333
  return;
334
334
  const t = e.cssVariable;
335
335
  if (t != null)
336
- return Oe(t) ? t.trim() : void 0;
337
- }, P = (e) => {
336
+ return ue(t) ? t.trim() : void 0;
337
+ }, E = (e) => {
338
338
  if (typeof e != "object" || e === null || Array.isArray(e))
339
339
  return !1;
340
340
  const t = e.cssVariable;
341
- return t == null ? !1 : !Oe(t);
342
- }, Vo = (e, t) => {
343
- const n = w(e);
344
- return n ? { [t]: k(n) } : void 0;
345
- }, jt = (e) => {
346
- if (typeof e != "object" || e === null || Array.isArray(e) || P(e))
341
+ return t == null ? !1 : !ue(t);
342
+ }, is = (e, t) => {
343
+ const n = C(e);
344
+ return n ? { [t]: D(n) } : void 0;
345
+ }, zt = (e) => {
346
+ if (typeof e != "object" || e === null || Array.isArray(e) || E(e))
347
347
  return !1;
348
- if (w(e))
348
+ if (C(e))
349
349
  return !0;
350
350
  const t = e;
351
- return t.source === "none" ? !0 : t.source === "url" ? $t(t.url) : t.source === "cloudinary" ? !Pt(t.publicId) || t.cloudName !== void 0 && t.cloudName !== null && !Et(t.cloudName) ? !1 : t.transformations === void 0 || t.transformations === null || Rt(t.transformations) : !1;
352
- }, Bt = ["px", "%", "em", "rem", "vh", "vw"], ce = ["inherit", "unset"], Ft = ["allSides", "top", "right", "bottom", "left"], M = (e, t = {}) => {
351
+ return t.source === "none" ? !0 : t.source === "url" ? jt(t.url) : t.source === "cloudinary" ? !Ot(t.publicId) || t.cloudName !== void 0 && t.cloudName !== null && !Vt(t.cloudName) ? !1 : t.transformations === void 0 || t.transformations === null || Bt(t.transformations) : !1;
352
+ }, Gt = ["px", "%", "em", "rem", "vh", "vw"], de = ["inherit", "unset"], Yt = ["allSides", "top", "right", "bottom", "left"], B = (e, t = {}) => {
353
353
  if (typeof e != "object" || e === null || Array.isArray(e))
354
354
  return !1;
355
355
  const n = e;
356
- return P(e) ? !1 : w(e) ? !0 : n.unit === "auto" ? t.allowAuto !== !1 : n.unit === "keyword" ? t.allowKeywords !== !1 && ce.includes(n.keyword) : Bt.includes(n.unit) ? typeof n.value != "number" || !Number.isFinite(n.value) ? !1 : t.allowNegative !== !1 || n.value >= 0 : !1;
357
- }, Vt = (e, t = {}) => {
356
+ return E(e) ? !1 : C(e) ? !0 : n.unit === "auto" ? t.allowAuto !== !1 : n.unit === "keyword" ? t.allowKeywords !== !1 && de.includes(n.keyword) : Gt.includes(n.unit) ? typeof n.value != "number" || !Number.isFinite(n.value) ? !1 : t.allowNegative !== !1 || n.value >= 0 : !1;
357
+ }, qt = (e, t = {}) => {
358
358
  if (typeof e != "object" || e === null || Array.isArray(e))
359
359
  return !1;
360
360
  const n = e;
361
- for (const o of Ft) {
361
+ for (const o of Yt) {
362
362
  const s = n[o];
363
- if (s != null && !M(s, t))
363
+ if (s != null && !B(s, t))
364
364
  return !1;
365
365
  }
366
366
  return !0;
367
- }, _t = [...ce, "transparent", "currentColor"], Kt = /^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\([^)]+\)|hsla?\([^)]+\))$/, ae = (e) => {
367
+ }, Xt = [...de, "transparent", "currentColor"], Zt = /^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\([^)]+\)|hsla?\([^)]+\))$/, pe = (e) => {
368
368
  if (typeof e != "object" || e === null || Array.isArray(e))
369
369
  return !1;
370
370
  const t = e;
371
- return P(e) ? !1 : w(e) ? !0 : t.unit === "keyword" ? _t.includes(t.keyword) : t.unit === "color" ? typeof t.value == "string" && Kt.test(t.value.trim()) : !1;
372
- }, ue = (e) => {
373
- const t = w(e);
374
- return t ? k(t) : "unit" in e ? e.unit === "keyword" ? e.keyword : e.value.trim() : "";
375
- }, Ut = (e, t) => typeof e == "object" && e !== null && !Array.isArray(e) ? !P(e) && !!w(e) : typeof e != "string" || !e.length ? !1 : t.includes(e) ? !0 : ce.includes(e), Ht = [
371
+ return E(e) ? !1 : C(e) ? !0 : t.unit === "keyword" ? Xt.includes(t.keyword) : t.unit === "color" ? typeof t.value == "string" && Zt.test(t.value.trim()) : !1;
372
+ }, fe = (e) => {
373
+ const t = C(e);
374
+ return t ? D(t) : "unit" in e ? e.unit === "keyword" ? e.keyword : e.value.trim() : "";
375
+ }, Jt = (e, t) => typeof e == "object" && e !== null && !Array.isArray(e) ? !E(e) && !!C(e) : typeof e != "string" || !e.length ? !1 : t.includes(e) ? !0 : de.includes(e), Qt = [
376
376
  'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
377
377
  'Georgia, "Times New Roman", Times, serif',
378
378
  "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",
379
379
  "Arial, Helvetica, sans-serif",
380
380
  '"Helvetica Neue", Helvetica, Arial, sans-serif',
381
381
  "Verdana, Geneva, sans-serif"
382
- ], Gt = [
382
+ ], en = [
383
383
  "normal",
384
384
  "bold",
385
385
  "100",
@@ -391,43 +391,43 @@ const Bo = /* @__PURE__ */ D({
391
391
  "700",
392
392
  "800",
393
393
  "900"
394
- ], zt = ["normal", "italic", "oblique"], Yt = [
394
+ ], tn = ["normal", "italic", "oblique"], nn = [
395
395
  "left",
396
396
  "center",
397
397
  "right",
398
398
  "justify",
399
399
  "start",
400
400
  "end"
401
- ], qt = [
401
+ ], on = [
402
402
  "none",
403
403
  "underline",
404
404
  "line-through",
405
405
  "overline"
406
- ], Xt = [
406
+ ], sn = [
407
407
  "none",
408
408
  "uppercase",
409
409
  "lowercase",
410
410
  "capitalize"
411
- ], ee = [
411
+ ], te = [
412
412
  "visible",
413
413
  "hidden",
414
414
  "scroll",
415
415
  "auto",
416
416
  "clip"
417
- ], Zt = [
417
+ ], rn = ["auto", "none"], ln = [
418
418
  "flex-start",
419
419
  "flex-end",
420
420
  "center",
421
421
  "space-between",
422
422
  "space-around",
423
423
  "space-evenly"
424
- ], Jt = [
424
+ ], cn = [
425
425
  "flex-start",
426
426
  "flex-end",
427
427
  "center",
428
428
  "baseline",
429
429
  "stretch"
430
- ], Qt = ["wrap", "nowrap"], en = [
430
+ ], an = ["wrap", "nowrap"], un = [
431
431
  "flex-start",
432
432
  "flex-end",
433
433
  "center",
@@ -435,12 +435,12 @@ const Bo = /* @__PURE__ */ D({
435
435
  "space-around",
436
436
  "space-evenly",
437
437
  "stretch"
438
- ], tn = [
438
+ ], dn = [
439
439
  "row",
440
440
  "row-reverse",
441
441
  "column",
442
442
  "column-reverse"
443
- ], nn = ["cover", "contain", "auto"], on = [
443
+ ], pn = ["cover", "contain", "auto"], fn = [
444
444
  "center center",
445
445
  "center top",
446
446
  "center bottom",
@@ -450,20 +450,20 @@ const Bo = /* @__PURE__ */ D({
450
450
  "right center",
451
451
  "right top",
452
452
  "right bottom"
453
- ], sn = [
453
+ ], yn = [
454
454
  "no-repeat",
455
455
  "repeat",
456
456
  "repeat-x",
457
457
  "repeat-y",
458
458
  "space",
459
459
  "round"
460
- ], rn = [
460
+ ], mn = [
461
461
  "justifyContent",
462
462
  "alignItems",
463
463
  "flexWrap",
464
464
  "alignContent",
465
465
  "flexDirection"
466
- ], ln = [
466
+ ], gn = [
467
467
  "none",
468
468
  "solid",
469
469
  "dashed",
@@ -473,107 +473,107 @@ const Bo = /* @__PURE__ */ D({
473
473
  "ridge",
474
474
  "inset",
475
475
  "outset"
476
- ], cn = (e) => typeof e == "object" && e !== null && !Array.isArray(e) ? !P(e) && !!w(e) : ln.includes(e), an = (e) => {
476
+ ], hn = (e) => typeof e == "object" && e !== null && !Array.isArray(e) ? !E(e) && !!C(e) : gn.includes(e), bn = (e) => {
477
477
  if (typeof e != "object" || e === null || Array.isArray(e))
478
478
  return !1;
479
479
  const t = e;
480
- return P(e) ? !1 : w(e) ? !0 : !(t.width !== void 0 && t.width !== null && !M(t.width, { allowAuto: !1, allowNegative: !1 }) || t.style !== void 0 && t.style !== null && !cn(t.style) || t.color !== void 0 && t.color !== null && !ae(t.color));
481
- }, un = {
480
+ return E(e) ? !1 : C(e) ? !0 : !(t.width !== void 0 && t.width !== null && !B(t.width, { allowAuto: !1, allowNegative: !1 }) || t.style !== void 0 && t.style !== null && !hn(t.style) || t.color !== void 0 && t.color !== null && !pe(t.color));
481
+ }, wn = {
482
482
  allowAuto: !1,
483
483
  allowKeywords: !1,
484
484
  allowNegative: !0
485
- }, dn = {
485
+ }, Cn = {
486
486
  allowAuto: !1,
487
487
  allowKeywords: !1,
488
488
  allowNegative: !1
489
- }, pn = (e) => {
489
+ }, vn = (e) => {
490
490
  if (typeof e != "object" || e === null || Array.isArray(e))
491
491
  return !1;
492
492
  const t = e;
493
- if (P(e))
493
+ if (E(e))
494
494
  return !1;
495
- if (w(e))
495
+ if (C(e))
496
496
  return !0;
497
497
  for (const n of ["offsetX", "offsetY", "spread"]) {
498
498
  const o = t[n];
499
- if (o != null && !M(o, un))
499
+ if (o != null && !B(o, wn))
500
500
  return !1;
501
501
  }
502
- return !(t.blur !== void 0 && t.blur !== null && !M(t.blur, dn) || t.color !== void 0 && t.color !== null && !ae(t.color) || t.inset !== void 0 && t.inset !== null && typeof t.inset != "boolean");
503
- }, fn = (e) => e ? e.cssVariable !== void 0 && e.cssVariable !== null || e.offsetX !== void 0 || e.offsetY !== void 0 || e.blur !== void 0 || e.spread !== void 0 || e.color !== void 0 : !1, mn = (e) => {
502
+ return !(t.blur !== void 0 && t.blur !== null && !B(t.blur, Cn) || t.color !== void 0 && t.color !== null && !pe(t.color) || t.inset !== void 0 && t.inset !== null && typeof t.inset != "boolean");
503
+ }, An = (e) => e ? e.cssVariable !== void 0 && e.cssVariable !== null || e.offsetX !== void 0 || e.offsetY !== void 0 || e.blur !== void 0 || e.spread !== void 0 || e.color !== void 0 : !1, In = (e) => {
504
504
  if (typeof e != "object" || e === null || Array.isArray(e))
505
505
  return !1;
506
506
  const t = e;
507
- return P(e) ? !1 : w(e) ? !0 : t.unit === "number" ? typeof t.value == "number" && Number.isFinite(t.value) && t.value > 0 : M(e, { allowAuto: !1, allowNegative: !1 });
508
- }, yn = (e) => typeof e == "object" && e !== null && !Array.isArray(e) ? !P(e) && !!w(e) : typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= 1, gn = (e) => {
509
- if (!jt(e))
507
+ return E(e) ? !1 : C(e) ? !0 : t.unit === "number" ? typeof t.value == "number" && Number.isFinite(t.value) && t.value > 0 : B(e, { allowAuto: !1, allowNegative: !1 });
508
+ }, Sn = (e) => typeof e == "object" && e !== null && !Array.isArray(e) ? !E(e) && !!C(e) : typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= 1, kn = (e) => {
509
+ if (!zt(e))
510
510
  return {};
511
- const t = w(e);
511
+ const t = C(e);
512
512
  if (t)
513
- return { backgroundImage: k(t) };
513
+ return { backgroundImage: D(t) };
514
514
  const n = e;
515
515
  return n.source === "none" ? { backgroundImage: "none" } : n.source === "url" ? { backgroundImage: `url("${n.url}")` } : {
516
- backgroundImage: `url("${Nt({
516
+ backgroundImage: `url("${Ut({
517
517
  publicId: n.publicId,
518
518
  cloudName: n.cloudName,
519
519
  transformations: n.transformations
520
520
  })}")`
521
521
  };
522
- }, N = (e) => {
523
- const t = w(e);
524
- return t ? k(t) : "unit" in e ? e.unit === "auto" ? "auto" : e.unit === "keyword" ? e.keyword : `${e.value}${e.unit}` : "";
525
- }, hn = (e) => {
526
- if (!an(e))
522
+ }, F = (e) => {
523
+ const t = C(e);
524
+ return t ? D(t) : "unit" in e ? e.unit === "auto" ? "auto" : e.unit === "keyword" ? e.keyword : `${e.value}${e.unit}` : "";
525
+ }, Dn = (e) => {
526
+ if (!bn(e))
527
527
  return {};
528
- const t = w(e);
528
+ const t = C(e);
529
529
  if (t)
530
- return { border: k(t) };
530
+ return { border: D(t) };
531
531
  const n = {};
532
- if (e.width && (n.borderWidth = N(e.width)), e.style) {
533
- const o = w(e.style);
534
- n.borderStyle = o ? k(o) : e.style;
532
+ if (e.width && (n.borderWidth = F(e.width)), e.style) {
533
+ const o = C(e.style);
534
+ n.borderStyle = o ? D(o) : e.style;
535
535
  }
536
- return e.color && (n.borderColor = ue(e.color)), n;
537
- }, U = (e) => e ? N(e) : "0px", bn = (e) => {
538
- if (!pn(e) || !fn(e))
536
+ return e.color && (n.borderColor = fe(e.color)), n;
537
+ }, G = (e) => e ? F(e) : "0px", Tn = (e) => {
538
+ if (!vn(e) || !An(e))
539
539
  return {};
540
- const t = w(e);
540
+ const t = C(e);
541
541
  if (t)
542
- return { boxShadow: k(t) };
542
+ return { boxShadow: D(t) };
543
543
  const n = [
544
- U(e.offsetX),
545
- U(e.offsetY),
546
- U(e.blur),
547
- U(e.spread)
544
+ G(e.offsetX),
545
+ G(e.offsetY),
546
+ G(e.blur),
547
+ G(e.spread)
548
548
  ];
549
- return e.color && n.push(ue(e.color)), e.inset && n.unshift("inset"), { boxShadow: n.join(" ") };
550
- }, wn = (e) => `${e.charAt(0).toUpperCase()}${e.slice(1)}`, Cn = (e, t) => {
551
- if (!Vt(e))
549
+ return e.color && n.push(fe(e.color)), e.inset && n.unshift("inset"), { boxShadow: n.join(" ") };
550
+ }, xn = (e) => `${e.charAt(0).toUpperCase()}${e.slice(1)}`, En = (e, t) => {
551
+ if (!qt(e))
552
552
  return {};
553
553
  if (e.allSides)
554
- return { [t]: N(e.allSides) };
554
+ return { [t]: F(e.allSides) };
555
555
  const n = {};
556
556
  for (const o of ["top", "right", "bottom", "left"]) {
557
557
  const s = e[o];
558
- s && (n[`${t}${wn(o)}`] = N(s));
558
+ s && (n[`${t}${xn(o)}`] = F(s));
559
559
  }
560
560
  return n;
561
- }, vn = (e, t) => ae(e) ? { [t]: ue(e) } : {}, An = (e, t, n) => {
562
- if (!Ut(e, n))
561
+ }, Pn = (e, t) => pe(e) ? { [t]: fe(e) } : {}, Ln = (e, t, n) => {
562
+ if (!Jt(e, n))
563
563
  return {};
564
- const o = w(e);
565
- return o ? { [t]: k(o) } : { [t]: e };
566
- }, Sn = (e, t, n = {}) => M(e, n) ? { [t]: N(e) } : {}, In = (e) => {
567
- if (!mn(e))
564
+ const o = C(e);
565
+ return o ? { [t]: D(o) } : { [t]: e };
566
+ }, $n = (e, t, n = {}) => B(e, n) ? { [t]: F(e) } : {}, Rn = (e) => {
567
+ if (!In(e))
568
568
  return {};
569
- const t = w(e);
570
- return t ? { lineHeight: k(t) } : "unit" in e && e.unit === "number" ? { lineHeight: e.value } : { lineHeight: N(e) };
571
- }, kn = (e) => {
572
- if (!yn(e))
569
+ const t = C(e);
570
+ return t ? { lineHeight: D(t) } : "unit" in e && e.unit === "number" ? { lineHeight: e.value } : { lineHeight: F(e) };
571
+ }, Mn = (e) => {
572
+ if (!Sn(e))
573
573
  return {};
574
- const t = w(e);
575
- return t ? { opacity: k(t) } : { opacity: e };
576
- }, de = {
574
+ const t = C(e);
575
+ return t ? { opacity: D(t) } : { opacity: e };
576
+ }, ye = {
577
577
  // Box spacing (4-sided)
578
578
  "margin-3-resolutions": { kind: "boxSpacing", cssProperty: "margin" },
579
579
  "padding-3-resolutions": { kind: "boxSpacing", cssProperty: "padding" },
@@ -627,46 +627,53 @@ const Bo = /* @__PURE__ */ D({
627
627
  "justify-content-3-resolutions": {
628
628
  kind: "enum",
629
629
  cssProperty: "justifyContent",
630
- allowedValues: Zt
630
+ allowedValues: ln
631
631
  },
632
632
  "align-items-3-resolutions": {
633
633
  kind: "enum",
634
634
  cssProperty: "alignItems",
635
- allowedValues: Jt
635
+ allowedValues: cn
636
636
  },
637
637
  "flex-wrap-3-resolutions": {
638
638
  kind: "enum",
639
639
  cssProperty: "flexWrap",
640
- allowedValues: Qt
640
+ allowedValues: an
641
641
  },
642
642
  "align-content-3-resolutions": {
643
643
  kind: "enum",
644
644
  cssProperty: "alignContent",
645
- allowedValues: en
645
+ allowedValues: un
646
646
  },
647
647
  "flex-direction-3-resolutions": {
648
648
  kind: "enum",
649
649
  cssProperty: "flexDirection",
650
- allowedValues: tn
650
+ allowedValues: dn
651
651
  },
652
652
  // Overflow — shorthand and longhands are independent attributes; when
653
653
  // both are set, the browser's cascade decides the effective overflow.
654
654
  "overflow-3-resolutions": {
655
655
  kind: "enum",
656
656
  cssProperty: "overflow",
657
- allowedValues: ee
657
+ allowedValues: te
658
658
  },
659
659
  "overflow-x-3-resolutions": {
660
660
  kind: "enum",
661
661
  cssProperty: "overflowX",
662
- allowedValues: ee
662
+ allowedValues: te
663
663
  },
664
664
  "overflow-y-3-resolutions": {
665
665
  kind: "enum",
666
666
  cssProperty: "overflowY",
667
- allowedValues: ee
667
+ allowedValues: te
668
668
  },
669
669
  // Color
670
+ // Pointer input. On an overlay layer this is lifted onto the absolutely
671
+ // positioned layer box — see resolveOverlayLayerPointerEvents.
672
+ "pointer-events-3-resolutions": {
673
+ kind: "enum",
674
+ cssProperty: "pointerEvents",
675
+ allowedValues: rn
676
+ },
670
677
  "background-color-3-resolutions": { kind: "color", cssProperty: "backgroundColor" },
671
678
  "color-3-resolutions": { kind: "color", cssProperty: "color" },
672
679
  // Background image and the painting properties that go with it. Independent
@@ -676,17 +683,17 @@ const Bo = /* @__PURE__ */ D({
676
683
  "background-size-3-resolutions": {
677
684
  kind: "enum",
678
685
  cssProperty: "backgroundSize",
679
- allowedValues: nn
686
+ allowedValues: pn
680
687
  },
681
688
  "background-position-3-resolutions": {
682
689
  kind: "enum",
683
690
  cssProperty: "backgroundPosition",
684
- allowedValues: on
691
+ allowedValues: fn
685
692
  },
686
693
  "background-repeat-3-resolutions": {
687
694
  kind: "enum",
688
695
  cssProperty: "backgroundRepeat",
689
- allowedValues: sn
696
+ allowedValues: yn
690
697
  },
691
698
  // Opacity (0–1 number)
692
699
  "opacity-3-resolutions": { kind: "opacity" },
@@ -694,7 +701,7 @@ const Bo = /* @__PURE__ */ D({
694
701
  "font-family-3-resolutions": {
695
702
  kind: "enum",
696
703
  cssProperty: "fontFamily",
697
- allowedValues: Ht
704
+ allowedValues: Qt
698
705
  },
699
706
  "font-size-3-resolutions": {
700
707
  kind: "length",
@@ -704,12 +711,12 @@ const Bo = /* @__PURE__ */ D({
704
711
  "font-weight-3-resolutions": {
705
712
  kind: "enum",
706
713
  cssProperty: "fontWeight",
707
- allowedValues: Gt
714
+ allowedValues: en
708
715
  },
709
716
  "font-style-3-resolutions": {
710
717
  kind: "enum",
711
718
  cssProperty: "fontStyle",
712
- allowedValues: zt
719
+ allowedValues: tn
713
720
  },
714
721
  "line-height-3-resolutions": { kind: "lineHeight" },
715
722
  "letter-spacing-3-resolutions": {
@@ -720,68 +727,68 @@ const Bo = /* @__PURE__ */ D({
720
727
  "text-align-3-resolutions": {
721
728
  kind: "enum",
722
729
  cssProperty: "textAlign",
723
- allowedValues: Yt
730
+ allowedValues: nn
724
731
  },
725
732
  "text-decoration-3-resolutions": {
726
733
  kind: "enum",
727
734
  cssProperty: "textDecoration",
728
- allowedValues: qt
735
+ allowedValues: on
729
736
  },
730
737
  "text-transform-3-resolutions": {
731
738
  kind: "enum",
732
739
  cssProperty: "textTransform",
733
- allowedValues: Xt
740
+ allowedValues: sn
734
741
  }
735
- }, Dn = (e, t) => {
736
- const n = de[e];
742
+ }, Nn = (e, t) => {
743
+ const n = ye[e];
737
744
  if (!n)
738
745
  return {};
739
746
  switch (n.kind) {
740
747
  case "boxSpacing":
741
- return Cn(t, n.cssProperty);
748
+ return En(t, n.cssProperty);
742
749
  case "length":
743
- return Sn(t, n.cssProperty, n.capabilities);
750
+ return $n(t, n.cssProperty, n.capabilities);
744
751
  case "border":
745
- return hn(t);
752
+ return Dn(t);
746
753
  case "boxShadow":
747
- return bn(t);
754
+ return Tn(t);
748
755
  case "color":
749
- return vn(t, n.cssProperty);
756
+ return Pn(t, n.cssProperty);
750
757
  case "opacity":
751
- return kn(t);
758
+ return Mn(t);
752
759
  case "enum":
753
- return An(t, n.cssProperty, n.allowedValues);
760
+ return Ln(t, n.cssProperty, n.allowedValues);
754
761
  case "lineHeight":
755
- return In(t);
762
+ return Rn(t);
756
763
  case "backgroundImage":
757
- return gn(t);
764
+ return kn(t);
758
765
  default:
759
766
  return {};
760
767
  }
761
- }, _o = Object.fromEntries(
762
- Object.entries(de).filter(([, e]) => e.kind === "boxSpacing").map(([e, t]) => [
768
+ }, rs = Object.fromEntries(
769
+ Object.entries(ye).filter(([, e]) => e.kind === "boxSpacing").map(([e, t]) => [
763
770
  e,
764
771
  t.cssProperty
765
772
  ])
766
- ), xn = (e) => e != null && e !== "", Tn = (e) => e ? !rn.some(
767
- (n) => xn(e[n])
768
- ) || e.display === "flex" ? e : { ...e, display: "flex" } : {}, Pn = ({
773
+ ), Wn = (e) => e != null && e !== "", On = (e) => e ? !mn.some(
774
+ (n) => Wn(e[n])
775
+ ) || e.display === "flex" ? e : { ...e, display: "flex" } : {}, Vn = ({
769
776
  dbEntryType: e,
770
777
  libraryId: t,
771
778
  sourceComponentsPlugin: n
772
779
  }) => {
773
780
  if (!(e != null && e.length))
774
781
  return;
775
- const o = n.components[Te(t, e)];
782
+ const o = n.components[Me(t, e)];
776
783
  if (!o || !("defaultAttributeValues" in o))
777
784
  return;
778
785
  const i = o.defaultAttributeValues;
779
786
  if (i != null && i.length)
780
- return i.reduce((c, d) => ({
781
- ...c,
782
- [d.name]: d.defaultValues
787
+ return i.reduce((r, u) => ({
788
+ ...r,
789
+ [u.name]: u.defaultValues
783
790
  }), {});
784
- }, O = ({
791
+ }, M = ({
785
792
  deviceDisplayType: e,
786
793
  componentAttributes: t
787
794
  }) => {
@@ -793,8 +800,8 @@ const Bo = /* @__PURE__ */ D({
793
800
  )) {
794
801
  if (!s.includes("3-resolutions") || !i)
795
802
  continue;
796
- const c = i.all, d = c ?? i[e.toLowerCase()];
797
- o[s] = d, de[s] && Object.assign(n, Dn(s, d));
803
+ const r = i.all, u = r ?? i[e.toLowerCase()];
804
+ o[s] = u, ye[s] && Object.assign(n, Nn(s, u));
798
805
  }
799
806
  return Object.keys(n).length || Object.keys(o).length ? {
800
807
  styles: Object.keys(n).length ? n : void 0,
@@ -802,86 +809,86 @@ const Bo = /* @__PURE__ */ D({
802
809
  o
803
810
  ).length ? o : void 0
804
811
  } : void 0;
805
- }, En = ({
812
+ }, jn = ({
806
813
  defaultAttributes: e,
807
814
  userModifiedAttributes: t
808
815
  }) => e ? t ? { ...e, ...t } : e : t;
809
- function G(e) {
816
+ function q(e) {
810
817
  return e.componentAttributes ?? e.widgetAttributes;
811
818
  }
812
- function Ce({
819
+ function Se({
813
820
  col: e,
814
821
  deviceDisplayType: t,
815
822
  isComposeMode: n,
816
823
  sourceComponentsPlugin: o
817
824
  }) {
818
- const s = G(e), i = Pn({
825
+ const s = q(e), i = Vn({
819
826
  dbEntryType: e.type,
820
827
  libraryId: e.libraryId,
821
828
  sourceComponentsPlugin: o
822
- }) || [], c = En({
829
+ }) || [], r = jn({
823
830
  defaultAttributes: i,
824
831
  userModifiedAttributes: s
825
- }), { styles: d, componentAttributesSpecificToDeviceType: a } = O({
832
+ }), { styles: u, componentAttributesSpecificToDeviceType: m } = M({
826
833
  deviceDisplayType: t,
827
- componentAttributes: c
834
+ componentAttributes: r
828
835
  }) || {
829
836
  styles: void 0,
830
837
  componentAttributesSpecificToDeviceType: void 0
831
838
  };
832
- let r = {};
833
- const l = {};
834
- if (d)
835
- for (const [u, p] of Object.entries(d))
836
- n && l[u] || (r = {
837
- ...r,
838
- [u]: p
839
+ let c = {};
840
+ const a = {};
841
+ if (u)
842
+ for (const [p, l] of Object.entries(u))
843
+ n && a[p] || (c = {
844
+ ...c,
845
+ [p]: l
839
846
  });
840
- let f = G(e);
841
- for (const u in a)
842
- if (u.includes("3-resolutions")) {
843
- f = {
844
- ...G(e) || {},
845
- ...a || {}
847
+ let d = q(e);
848
+ for (const p in m)
849
+ if (p.includes("3-resolutions")) {
850
+ d = {
851
+ ...q(e) || {},
852
+ ...m || {}
846
853
  };
847
854
  break;
848
855
  }
849
856
  return {
850
- componentAttributesBasedOnDevice: f,
851
- componentStyles: Tn(r)
857
+ componentAttributesBasedOnDevice: d,
858
+ componentStyles: On(c)
852
859
  };
853
860
  }
854
- const $n = (e) => {
861
+ const Bn = (e) => {
855
862
  const t = (e == null ? void 0 : e.rows) || [];
856
863
  for (const n of t)
857
864
  if (((n == null ? void 0 : n.columns) || []).length > 0)
858
865
  return !0;
859
866
  return (e == null ? void 0 : e.containerAttributes) && Object.keys(e.containerAttributes).length > 0;
860
- }, Rn = "var(--sl-spacing-x-small)";
861
- function Ln(e) {
867
+ }, Fn = "var(--sl-spacing-x-small)";
868
+ function Kn(e) {
862
869
  return e != null && e.horizontalAlignment || e != null && e.verticalAlignment || e != null && e.flexWrap || e != null && e.gap || e != null && e.alignContent ? !0 : !!(e != null && e.rowAttributes && Object.keys(e.rowAttributes).length > 0);
863
870
  }
864
- function Mn({
871
+ function Un({
865
872
  row: e,
866
873
  deviceDisplayType: t
867
874
  }) {
868
875
  var o;
869
- const n = O({
876
+ const n = M({
870
877
  deviceDisplayType: t,
871
878
  componentAttributes: e.rowAttributes
872
879
  });
873
880
  return ((o = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : o["hide-component-3-resolutions"]) === "true";
874
881
  }
875
- function Nn({
882
+ function Hn({
876
883
  row: e,
877
884
  deviceDisplayType: t,
878
885
  isComposeMode: n
879
886
  }) {
880
- var p;
881
- const o = ((p = O({
887
+ var l;
888
+ const o = ((l = M({
882
889
  deviceDisplayType: t,
883
890
  componentAttributes: e.rowAttributes
884
- })) == null ? void 0 : p.styles) || {}, s = o.justifyContent ?? e.horizontalAlignment ?? we.Center, i = o.alignItems ?? e.verticalAlignment ?? we.Center, c = o.flexDirection ?? "row", d = o.gap ?? e.gap ?? Rn, a = n ? "nowrap" : o.flexWrap ?? e.flexWrap ?? "nowrap", r = o.alignContent ?? e.alignContent ?? void 0, l = /* @__PURE__ */ new Set([
891
+ })) == null ? void 0 : l.styles) || {}, s = o.justifyContent ?? e.horizontalAlignment ?? Ie.Center, i = o.alignItems ?? e.verticalAlignment ?? Ie.Center, r = o.flexDirection ?? "row", u = o.gap ?? e.gap ?? Fn, m = n ? "nowrap" : o.flexWrap ?? e.flexWrap ?? "nowrap", c = o.alignContent ?? e.alignContent ?? void 0, a = /* @__PURE__ */ new Set([
885
892
  "justifyContent",
886
893
  "alignItems",
887
894
  "flexDirection",
@@ -889,26 +896,26 @@ function Nn({
889
896
  "flexWrap",
890
897
  "alignContent",
891
898
  "display"
892
- ]), f = {};
893
- for (const [h, g] of Object.entries(o))
894
- l.has(h) || (f[h] = g);
895
- const u = {
899
+ ]), d = {};
900
+ for (const [g, f] of Object.entries(o))
901
+ a.has(g) || (d[g] = f);
902
+ const p = {
896
903
  display: "flex",
897
- flexDirection: c,
898
- gap: d,
899
- flexWrap: a,
904
+ flexDirection: r,
905
+ gap: u,
906
+ flexWrap: m,
900
907
  justifyContent: s,
901
908
  alignItems: i,
902
- ...f
909
+ ...d
903
910
  };
904
- return r !== void 0 && (u.alignContent = r), u;
911
+ return c !== void 0 && (p.alignContent = c), p;
905
912
  }
906
- const pe = "css-classes-3-resolutions", Wn = 500, On = /[\x00-\x1f\x7f]/g, fe = (e) => {
913
+ const me = "css-classes-3-resolutions", _n = 500, zn = /[\x00-\x1f\x7f]/g, ge = (e) => {
907
914
  if (typeof e != "string")
908
915
  return;
909
916
  const t = /* @__PURE__ */ new Set(), n = [];
910
917
  for (const s of e.split(/\s+/)) {
911
- const i = s.replace(On, "");
918
+ const i = s.replace(zn, "");
912
919
  i && (t.has(i) || (t.add(i), n.push(i)));
913
920
  }
914
921
  if (!n.length)
@@ -916,12 +923,12 @@ const pe = "css-classes-3-resolutions", Wn = 500, On = /[\x00-\x1f\x7f]/g, fe =
916
923
  let o = "";
917
924
  for (const s of n) {
918
925
  const i = o ? `${o} ${s}` : s;
919
- if (i.length > Wn)
926
+ if (i.length > _n)
920
927
  break;
921
928
  o = i;
922
929
  }
923
930
  return o.length ? o : void 0;
924
- }, je = "hide-component-3-resolutions", jn = [
931
+ }, Ue = "hide-component-3-resolutions", Gn = "pointer-events-3-resolutions", Yn = [
925
932
  "width-3-resolutions",
926
933
  "min-width-3-resolutions",
927
934
  "max-width-3-resolutions",
@@ -936,22 +943,23 @@ const pe = "css-classes-3-resolutions", Wn = 500, On = /[\x00-\x1f\x7f]/g, fe =
936
943
  "overflow-3-resolutions",
937
944
  "overflow-x-3-resolutions",
938
945
  "overflow-y-3-resolutions",
939
- je
940
- ], Bn = new Set(
941
- jn
946
+ Ue,
947
+ Gn
948
+ ], qn = new Set(
949
+ Yn
942
950
  );
943
- function Fn({
951
+ function he({
944
952
  containerAttributes: e,
945
953
  deviceDisplayType: t
946
954
  }) {
947
955
  var o;
948
- const n = O({
956
+ const n = M({
949
957
  deviceDisplayType: t,
950
958
  componentAttributes: e
951
959
  });
952
- return ((o = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : o[je]) === "true";
960
+ return ((o = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : o[Ue]) === "true";
953
961
  }
954
- function Vn({
962
+ function He({
955
963
  containerAttributes: e,
956
964
  deviceDisplayType: t,
957
965
  isComposeMode: n
@@ -961,24 +969,108 @@ function Vn({
961
969
  return { styles: {} };
962
970
  const o = n ? Object.fromEntries(
963
971
  Object.entries(e).filter(
964
- ([c]) => !Bn.has(c)
972
+ ([r]) => !qn.has(r)
965
973
  )
966
- ) : e, s = O({
974
+ ) : e, s = M({
967
975
  deviceDisplayType: t,
968
976
  componentAttributes: o
969
977
  });
970
978
  return {
971
979
  styles: (s == null ? void 0 : s.styles) ?? {},
972
- cssClasses: fe(
973
- (i = s == null ? void 0 : s.componentAttributesSpecificToDeviceType) == null ? void 0 : i[pe]
980
+ cssClasses: ge(
981
+ (i = s == null ? void 0 : s.componentAttributesSpecificToDeviceType) == null ? void 0 : i[me]
974
982
  )
975
983
  };
976
984
  }
977
- function _n(e) {
985
+ function Xn(e) {
978
986
  return Object.keys(e.styles).length > 0 || !!e.cssClasses;
979
987
  }
980
- const me = "/";
981
- function Kn({
988
+ function _e({
989
+ containerAttributes: e,
990
+ widgetContainerStyles: t
991
+ }) {
992
+ return ((e == null ? void 0 : e[se]) || []).some(
993
+ (o) => o.toLowerCase().startsWith("height:")
994
+ ) || t.styles.height !== void 0;
995
+ }
996
+ const Zn = "z-index-3-resolutions", ze = 0;
997
+ function Jn(e) {
998
+ var t, n;
999
+ return !!((n = (t = e == null ? void 0 : e.overlayLayers) == null ? void 0 : t.layers) != null && n.length);
1000
+ }
1001
+ function ke({
1002
+ containerAttributes: e,
1003
+ deviceDisplayType: t
1004
+ }) {
1005
+ var s;
1006
+ const n = M({
1007
+ deviceDisplayType: t,
1008
+ componentAttributes: e
1009
+ }), o = (s = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : s[Zn];
1010
+ if (typeof o == "number" && Number.isFinite(o))
1011
+ return o;
1012
+ if (typeof o == "string" && o.trim().length) {
1013
+ const i = Number(o);
1014
+ if (Number.isFinite(i))
1015
+ return i;
1016
+ }
1017
+ return ze;
1018
+ }
1019
+ function Qn(e, t) {
1020
+ return e + t + 1;
1021
+ }
1022
+ function eo({
1023
+ containerAttributes: e,
1024
+ deviceDisplayType: t
1025
+ }) {
1026
+ var s;
1027
+ const n = M({
1028
+ deviceDisplayType: t,
1029
+ componentAttributes: e
1030
+ }), o = (s = n == null ? void 0 : n.styles) == null ? void 0 : s.pointerEvents;
1031
+ return typeof o == "string" ? o : void 0;
1032
+ }
1033
+ function to({
1034
+ layer: e,
1035
+ deviceDisplayType: t
1036
+ }) {
1037
+ var n;
1038
+ return (n = e == null ? void 0 : e.rows) != null && n.length ? he({
1039
+ containerAttributes: e.containerAttributes,
1040
+ deviceDisplayType: t
1041
+ }) : !0;
1042
+ }
1043
+ function no({
1044
+ isWithinCollection: e,
1045
+ baseDeclaresOwnHeight: t,
1046
+ baseZIndex: n
1047
+ }) {
1048
+ return {
1049
+ position: "relative",
1050
+ isolation: "isolate",
1051
+ display: "flex",
1052
+ flexDirection: "column",
1053
+ ...t ? {} : { height: e ? "auto" : "100%" },
1054
+ ...n === ze ? {} : { zIndex: n }
1055
+ };
1056
+ }
1057
+ function oo({
1058
+ zIndex: e,
1059
+ pointerEvents: t
1060
+ }) {
1061
+ return {
1062
+ position: "absolute",
1063
+ top: 0,
1064
+ left: 0,
1065
+ width: "100%",
1066
+ height: "100%",
1067
+ boxSizing: "border-box",
1068
+ zIndex: e,
1069
+ ...t ? { pointerEvents: t } : {}
1070
+ };
1071
+ }
1072
+ const be = "/";
1073
+ function so({
982
1074
  componentProps: e,
983
1075
  ancestorColumnIds: t,
984
1076
  columnId: n
@@ -987,40 +1079,40 @@ function Kn({
987
1079
  return;
988
1080
  const o = [...t ?? [], n];
989
1081
  for (let s = 0; s < o.length; s += 1) {
990
- const i = o.slice(s).join(me), c = e[i];
991
- if (c)
992
- return c;
1082
+ const i = o.slice(s).join(be), r = e[i];
1083
+ if (r)
1084
+ return r;
993
1085
  }
994
1086
  }
995
- function Un({
1087
+ function io({
996
1088
  displayItemList: e,
997
1089
  widgetCollections: t
998
1090
  }) {
999
1091
  const n = [], o = (s, i) => {
1000
- var c;
1001
- if ((c = s == null ? void 0 : s.rows) != null && c.length)
1002
- for (const d of s.rows)
1003
- for (const a of d.columns) {
1004
- if (!a.id || a.type === re.DroppableBox)
1092
+ var r;
1093
+ if ((r = s == null ? void 0 : s.rows) != null && r.length)
1094
+ for (const u of s.rows)
1095
+ for (const m of u.columns) {
1096
+ if (!m.id || m.type === ce.DroppableBox)
1005
1097
  continue;
1006
- const r = Le(a.type);
1007
- if (r != null && r.length) {
1008
- const l = a.collection ?? (t == null ? void 0 : t[r]);
1009
- l && !i.includes(a.id) && o(l.collectionRows, [...i, a.id]);
1098
+ const c = je(m.type);
1099
+ if (c != null && c.length) {
1100
+ const a = m.collection ?? (t == null ? void 0 : t[c]);
1101
+ a && !i.includes(m.id) && o(a.collectionRows, [...i, m.id]);
1010
1102
  continue;
1011
1103
  }
1012
1104
  n.push(
1013
- [...i, a.id].join(me)
1105
+ [...i, m.id].join(be)
1014
1106
  );
1015
1107
  }
1016
1108
  };
1017
1109
  return o(e, []), n;
1018
1110
  }
1019
- function Hn(e, t) {
1020
- const n = `${me}${e}`;
1111
+ function ro(e, t) {
1112
+ const n = `${be}${e}`;
1021
1113
  return t.some((o) => o === e || o.endsWith(n));
1022
1114
  }
1023
- function Gn({
1115
+ function lo({
1024
1116
  componentProps: e,
1025
1117
  displayItemList: t,
1026
1118
  widgetCollections: n
@@ -1028,13 +1120,13 @@ function Gn({
1028
1120
  const o = e ? Object.keys(e) : [];
1029
1121
  if (!o.length)
1030
1122
  return [];
1031
- const s = Un({
1123
+ const s = io({
1032
1124
  displayItemList: t,
1033
1125
  widgetCollections: n
1034
1126
  });
1035
- return o.filter((i) => !Hn(i, s));
1127
+ return o.filter((i) => !ro(i, s));
1036
1128
  }
1037
- function zn({
1129
+ function co({
1038
1130
  componentProps: e,
1039
1131
  displayItemList: t,
1040
1132
  widgetCollections: n,
@@ -1042,7 +1134,7 @@ function zn({
1042
1134
  }) {
1043
1135
  if (process.env.NODE_ENV === "production")
1044
1136
  return;
1045
- const s = Gn({
1137
+ const s = lo({
1046
1138
  componentProps: e,
1047
1139
  displayItemList: t,
1048
1140
  widgetCollections: n
@@ -1051,63 +1143,68 @@ function zn({
1051
1143
  `RuleCMSWidget "${o}": componentProps ${s.map((i) => `"${i}"`).join(", ")} ${s.length === 1 ? "matches" : "match"} no component in this widget, so those props were not passed to anything. Keys are column ids from the widget config — the composer's Modify drawer shows the id of the selected component.`
1052
1144
  );
1053
1145
  }
1054
- function Yn(e) {
1146
+ function ao(e) {
1055
1147
  return typeof e == "object" && e !== null && !Array.isArray(e);
1056
1148
  }
1057
- function qn(e) {
1149
+ function uo(e) {
1058
1150
  if (e.all !== void 0 && e.all !== null)
1059
1151
  return !1;
1060
1152
  const t = e.phone, n = e.tablet, o = e.desktop;
1061
1153
  return t !== n || t !== o || n !== o;
1062
1154
  }
1063
- function ve(e) {
1064
- var t;
1155
+ function ie(e) {
1156
+ var t, n;
1065
1157
  if (!((t = e == null ? void 0 : e.rows) != null && t.length))
1066
1158
  return !1;
1067
- for (const n of e.rows) {
1068
- if (Ae(n.rowAttributes))
1159
+ if (ne(e.containerAttributes))
1160
+ return !0;
1161
+ for (const o of e.rows) {
1162
+ if (ne(o.rowAttributes))
1069
1163
  return !0;
1070
- for (const o of n.columns)
1071
- if (Ae(G(o)))
1164
+ for (const s of o.columns)
1165
+ if (ne(q(s)))
1072
1166
  return !0;
1073
1167
  }
1168
+ for (const o of ((n = e.overlayLayers) == null ? void 0 : n.layers) ?? [])
1169
+ if (ie(o))
1170
+ return !0;
1074
1171
  return !1;
1075
1172
  }
1076
- function Ae(e) {
1173
+ function ne(e) {
1077
1174
  if (!e)
1078
1175
  return !1;
1079
1176
  for (const [t, n] of Object.entries(e))
1080
- if (!(!t.includes("3-resolutions") || !Yn(n))) {
1177
+ if (!(!t.includes("3-resolutions") || !ao(n))) {
1081
1178
  if (t === "hide-component-3-resolutions") {
1082
1179
  const o = n, s = (i) => i === "true" || i === !0;
1083
1180
  if (s(o.phone) !== s(o.tablet) || s(o.phone) !== s(o.desktop))
1084
1181
  return !0;
1085
1182
  continue;
1086
1183
  }
1087
- if (qn(n))
1184
+ if (uo(n))
1088
1185
  return !0;
1089
1186
  }
1090
1187
  return !1;
1091
1188
  }
1092
- function Xn(e, t) {
1093
- if (ve(e))
1189
+ function po(e, t) {
1190
+ if (ie(e))
1094
1191
  return !0;
1095
1192
  for (const n of Object.values(t))
1096
- if (ve(n.collectionRows))
1193
+ if (ie(n.collectionRows))
1097
1194
  return !0;
1098
1195
  return !1;
1099
1196
  }
1100
- const Be = parseInt(Ne, 10), Fe = parseInt(We, 10), Zn = Be + 1, Jn = Fe + 1;
1101
- function Qn(e) {
1197
+ const Ge = parseInt(Fe, 10), Ye = parseInt(Ke, 10), fo = Ge + 1, yo = Ye + 1;
1198
+ function mo(e) {
1102
1199
  const t = `.${e}-phone`, n = `.${e}-tablet`, o = `.${e}-desktop`;
1103
1200
  return `
1104
1201
  ${t}, ${n}, ${o} { display: none; }
1105
- @media (max-width: ${Be}px) { ${t} { display: block; } }
1106
- @media (min-width: ${Zn}px) and (max-width: ${Fe}px) { ${n} { display: block; } }
1107
- @media (min-width: ${Jn}px) { ${o} { display: block; } }
1202
+ @media (max-width: ${Ge}px) { ${t} { display: block; } }
1203
+ @media (min-width: ${fo}px) and (max-width: ${Ye}px) { ${n} { display: block; } }
1204
+ @media (min-width: ${yo}px) { ${o} { display: block; } }
1108
1205
  `.trim();
1109
1206
  }
1110
- function te(e) {
1207
+ function oe(e) {
1111
1208
  if (!e)
1112
1209
  throw new Error("Source components plugin is required, but no plugins were provided");
1113
1210
  const t = e.sourceComponents;
@@ -1121,7 +1218,7 @@ function te(e) {
1121
1218
  );
1122
1219
  return t;
1123
1220
  }
1124
- const eo = ["hidden"], to = /* @__PURE__ */ D({
1221
+ const go = ["hidden"], De = /* @__PURE__ */ k({
1125
1222
  __name: "EmbedInVerticalContainer",
1126
1223
  props: {
1127
1224
  displayItemList: {},
@@ -1134,59 +1231,59 @@ const eo = ["hidden"], to = /* @__PURE__ */ D({
1134
1231
  const t = e;
1135
1232
  let n = 0;
1136
1233
  const o = `rulecms-vc-${++n}`;
1137
- function s(h, g, v) {
1138
- const C = h && !v ? 3 : 1;
1139
- return !!(g != null && g.length) && g.length > C;
1234
+ function s(g, f, I) {
1235
+ const v = g && !I ? 3 : 1;
1236
+ return !!(f != null && f.length) && f.length > v;
1140
1237
  }
1141
- const i = y(() => {
1142
- var g;
1143
- return (((g = t.displayItemList.containerAttributes) == null ? void 0 : g[Q]) || []).join(`;
1238
+ const i = h(() => {
1239
+ var f;
1240
+ return (((f = t.displayItemList.containerAttributes) == null ? void 0 : f[se]) || []).join(`;
1144
1241
  `);
1145
- }), c = y(
1242
+ }), r = h(
1146
1243
  () => i.value ? `.${o} {
1147
1244
  ${i.value}
1148
1245
  }` : ""
1149
- ), d = y(
1150
- () => !t.isComposeMode && Fn({
1246
+ ), u = h(
1247
+ () => !t.isComposeMode && he({
1151
1248
  containerAttributes: t.displayItemList.containerAttributes,
1152
1249
  deviceDisplayType: t.deviceDisplayType
1153
1250
  })
1154
- ), a = y(
1155
- () => Vn({
1251
+ ), m = h(
1252
+ () => He({
1156
1253
  containerAttributes: t.displayItemList.containerAttributes,
1157
1254
  deviceDisplayType: t.deviceDisplayType,
1158
1255
  isComposeMode: t.isComposeMode
1159
1256
  })
1160
- ), r = y(() => {
1161
- var v;
1162
- const h = ((v = t.displayItemList.containerAttributes) == null ? void 0 : v[Q]) || [], g = _n(a.value);
1163
- return t.isComposeMode && !t.isWithinCollection || t.showDropContainers || h.length > 0 || g || s(t.isComposeMode, t.displayItemList.rows, t.isWithinCollection);
1164
- }), l = y(
1165
- () => [i.value ? o : void 0, a.value.cssClasses].filter(Boolean).join(" ")
1166
- ), f = y(() => {
1167
- var g;
1168
- return {
1169
- ...(((g = t.displayItemList.containerAttributes) == null ? void 0 : g[Q]) || []).some((v) => v.toLowerCase().startsWith("height:")) ? {} : { height: t.isWithinCollection ? "auto" : "100%" },
1170
- display: "flex",
1171
- flexDirection: "column",
1172
- ...a.value.styles
1173
- };
1174
- }), u = y(() => r.value ? l.value : ""), p = y(() => d.value ? { display: "none" } : r.value ? f.value : { display: "contents" });
1175
- return (h, g) => (m(), b("div", {
1176
- hidden: d.value || void 0,
1177
- class: F(u.value || void 0),
1178
- style: S(p.value)
1257
+ ), c = h(() => {
1258
+ var I;
1259
+ const g = ((I = t.displayItemList.containerAttributes) == null ? void 0 : I[se]) || [], f = Xn(m.value);
1260
+ return t.isComposeMode && !t.isWithinCollection || t.showDropContainers || g.length > 0 || f || s(t.isComposeMode, t.displayItemList.rows, t.isWithinCollection);
1261
+ }), a = h(
1262
+ () => [i.value ? o : void 0, m.value.cssClasses].filter(Boolean).join(" ")
1263
+ ), d = h(() => ({
1264
+ ..._e({
1265
+ containerAttributes: t.displayItemList.containerAttributes,
1266
+ widgetContainerStyles: m.value
1267
+ }) ? {} : { height: t.isWithinCollection ? "auto" : "100%" },
1268
+ display: "flex",
1269
+ flexDirection: "column",
1270
+ ...m.value.styles
1271
+ })), p = h(() => c.value ? a.value : ""), l = h(() => u.value ? { display: "none" } : c.value ? d.value : { display: "contents" });
1272
+ return (g, f) => (y(), b("div", {
1273
+ hidden: u.value || void 0,
1274
+ class: U(p.value || void 0),
1275
+ style: S(l.value)
1179
1276
  }, [
1180
- i.value ? (m(), A(R("style"), { key: 0 }, {
1181
- default: V(() => [
1182
- ie(Y(c.value), 1)
1277
+ i.value ? (y(), w(O("style"), { key: 0 }, {
1278
+ default: $(() => [
1279
+ X(H(r.value), 1)
1183
1280
  ]),
1184
1281
  _: 1
1185
- })) : W("", !0),
1186
- se(h.$slots, "default")
1187
- ], 14, eo));
1282
+ })) : R("", !0),
1283
+ le(g.$slots, "default")
1284
+ ], 14, go));
1188
1285
  }
1189
- }), no = ["hidden"], oo = /* @__PURE__ */ D({
1286
+ }), ho = ["hidden"], Te = /* @__PURE__ */ k({
1190
1287
  __name: "EmbedInRow",
1191
1288
  props: {
1192
1289
  row: {},
@@ -1197,40 +1294,40 @@ ${i.value}
1197
1294
  },
1198
1295
  setup(e) {
1199
1296
  const t = e;
1200
- function n(r, l, f) {
1201
- var p;
1202
- const u = r && !f ? 3 : 1;
1203
- return !!((p = l == null ? void 0 : l.columns) != null && p.length) && l.columns.length > u;
1297
+ function n(c, a, d) {
1298
+ var l;
1299
+ const p = c && !d ? 3 : 1;
1300
+ return !!((l = a == null ? void 0 : a.columns) != null && l.length) && a.columns.length > p;
1204
1301
  }
1205
- const o = y(
1206
- () => !t.isComposeMode && Mn({ row: t.row, deviceDisplayType: t.deviceDisplayType })
1207
- ), s = y(
1208
- () => t.showDropContainers || Ln(t.row) || n(t.isComposeMode, t.row, t.isWithinCollection)
1209
- ), i = y(
1210
- () => Nn({
1302
+ const o = h(
1303
+ () => !t.isComposeMode && Un({ row: t.row, deviceDisplayType: t.deviceDisplayType })
1304
+ ), s = h(
1305
+ () => t.showDropContainers || Kn(t.row) || n(t.isComposeMode, t.row, t.isWithinCollection)
1306
+ ), i = h(
1307
+ () => Hn({
1211
1308
  row: t.row,
1212
1309
  deviceDisplayType: t.deviceDisplayType,
1213
1310
  isComposeMode: t.isComposeMode
1214
1311
  })
1215
- ), c = y(() => {
1216
- var l;
1217
- const r = O({
1312
+ ), r = h(() => {
1313
+ var a;
1314
+ const c = M({
1218
1315
  deviceDisplayType: t.deviceDisplayType,
1219
1316
  componentAttributes: t.row.rowAttributes
1220
1317
  });
1221
- return fe(
1222
- (l = r == null ? void 0 : r.componentAttributesSpecificToDeviceType) == null ? void 0 : l[pe]
1318
+ return ge(
1319
+ (a = c == null ? void 0 : c.componentAttributesSpecificToDeviceType) == null ? void 0 : a[me]
1223
1320
  ) ?? "";
1224
- }), d = y(() => s.value ? c.value : ""), a = y(() => o.value ? { display: "none" } : s.value ? i.value : { display: "contents" });
1225
- return (r, l) => (m(), b("div", {
1321
+ }), u = h(() => s.value ? r.value : ""), m = h(() => o.value ? { display: "none" } : s.value ? i.value : { display: "contents" });
1322
+ return (c, a) => (y(), b("div", {
1226
1323
  hidden: o.value || void 0,
1227
- class: F(d.value || void 0),
1228
- style: S(a.value)
1324
+ class: U(u.value || void 0),
1325
+ style: S(m.value)
1229
1326
  }, [
1230
- se(r.$slots, "default")
1231
- ], 14, no));
1327
+ le(c.$slots, "default")
1328
+ ], 14, ho));
1232
1329
  }
1233
- }), Ve = [
1330
+ }), qe = [
1234
1331
  "minWidth",
1235
1332
  "maxWidth",
1236
1333
  "minHeight",
@@ -1282,20 +1379,20 @@ ${i.value}
1282
1379
  "textAlign",
1283
1380
  "textDecoration",
1284
1381
  "textTransform"
1285
- ], so = (e) => e != null && e !== "", io = (e) => e ? Ve.reduce(
1382
+ ], bo = (e) => e != null && e !== "", wo = (e) => e ? qe.reduce(
1286
1383
  (t, n) => {
1287
1384
  const o = e[n];
1288
- return so(o) && (t[n] = o), t;
1385
+ return bo(o) && (t[n] = o), t;
1289
1386
  },
1290
1387
  {}
1291
- ) : {}, ro = (e) => {
1388
+ ) : {}, Co = (e) => {
1292
1389
  if (!e)
1293
1390
  return;
1294
1391
  const t = { ...e };
1295
- for (const n of Ve)
1392
+ for (const n of qe)
1296
1393
  delete t[n];
1297
1394
  return Object.keys(t).length ? t : void 0;
1298
- }, lo = (e) => Object.keys(e).length > 0, co = (e, t) => {
1395
+ }, vo = (e) => Object.keys(e).length > 0, Ao = (e, t) => {
1299
1396
  const n = (e == null ? void 0 : e.noContainer) ?? !1, o = e == null ? void 0 : e.resolveNoContainer;
1300
1397
  if (typeof o != "function")
1301
1398
  return n;
@@ -1313,7 +1410,7 @@ ${i.value}
1313
1410
  );
1314
1411
  }
1315
1412
  return n;
1316
- }, ao = (e, t) => {
1413
+ }, Io = (e, t) => {
1317
1414
  const n = e == null ? void 0 : e.resolveRendersOwnElement;
1318
1415
  if (typeof n != "function")
1319
1416
  return !1;
@@ -1331,7 +1428,7 @@ ${i.value}
1331
1428
  );
1332
1429
  }
1333
1430
  return !1;
1334
- }, uo = /* @__PURE__ */ D({
1431
+ }, xe = /* @__PURE__ */ k({
1335
1432
  __name: "DisplayComponent",
1336
1433
  props: {
1337
1434
  componentType: {},
@@ -1343,51 +1440,51 @@ ${i.value}
1343
1440
  mounts: {}
1344
1441
  },
1345
1442
  setup(e) {
1346
- const t = e, n = y(() => t.components[Te(t.libraryId, t.componentType)]), o = y(() => {
1347
- var h;
1348
- const p = (h = n.value) == null ? void 0 : h.card;
1349
- return p || (console.error(
1443
+ const t = e, n = h(() => t.components[Me(t.libraryId, t.componentType)]), o = h(() => {
1444
+ var g;
1445
+ const l = (g = n.value) == null ? void 0 : g.card;
1446
+ return l || (console.error(
1350
1447
  `DisplayComponent: Component with type ${t.componentType}${t.libraryId ? ` (library "${t.libraryId}")` : ""} not found in components`
1351
1448
  ), null);
1352
- }), s = y(() => ({
1449
+ }), s = h(() => ({
1353
1450
  componentAttributes: t.componentAttributes,
1354
1451
  styleProps: t.styleProps
1355
- })), i = y(
1356
- () => n.value ? co(n.value, s.value) : !1
1357
- ), c = y(() => io(t.styleProps)), d = y(
1358
- () => i.value ? ro(t.styleProps) : t.styleProps
1359
- ), a = y(
1452
+ })), i = h(
1453
+ () => n.value ? Ao(n.value, s.value) : !1
1454
+ ), r = h(() => wo(t.styleProps)), u = h(
1455
+ () => i.value ? Co(t.styleProps) : t.styleProps
1456
+ ), m = h(
1360
1457
  () => {
1361
- var p;
1362
- return fe((p = t.componentAttributes) == null ? void 0 : p[pe]);
1458
+ var l;
1459
+ return ge((l = t.componentAttributes) == null ? void 0 : l[me]);
1363
1460
  }
1364
- ), r = y(() => i.value && lo(c.value)), l = y(
1365
- () => !i.value || (n.value ? ao(n.value, s.value) : !1)
1366
- ), f = y(
1367
- () => !r.value && l.value ? a.value : void 0
1368
- ), u = y(() => ({
1461
+ ), c = h(() => i.value && vo(r.value)), a = h(
1462
+ () => !i.value || (n.value ? Io(n.value, s.value) : !1)
1463
+ ), d = h(
1464
+ () => !c.value && a.value ? m.value : void 0
1465
+ ), p = h(() => ({
1369
1466
  componentAttributes: t.componentAttributes,
1370
- styleProps: d.value,
1371
- className: f.value,
1467
+ styleProps: u.value,
1468
+ className: d.value,
1372
1469
  widgetInstanceProps: t.widgetInstanceProps,
1373
1470
  mounts: t.mounts
1374
1471
  }));
1375
- return (p, h) => o.value ? (m(), b(I, { key: 0 }, [
1376
- r.value ? (m(), b("div", {
1472
+ return (l, g) => o.value ? (y(), b(A, { key: 0 }, [
1473
+ c.value ? (y(), b("div", {
1377
1474
  key: 0,
1378
- class: F(a.value || void 0),
1379
- style: S(c.value)
1475
+ class: U(m.value || void 0),
1476
+ style: S(r.value)
1380
1477
  }, [
1381
- (m(), A(R(o.value), Z(ge(u.value)), null, 16))
1382
- ], 6)) : !l.value && a.value ? (m(), b("div", {
1478
+ (y(), w(O(o.value), Q(Ce(p.value)), null, 16))
1479
+ ], 6)) : !a.value && m.value ? (y(), b("div", {
1383
1480
  key: 1,
1384
- class: F(a.value)
1481
+ class: U(m.value)
1385
1482
  }, [
1386
- (m(), A(R(o.value), Z(ge(u.value)), null, 16))
1387
- ], 2)) : (m(), A(R(o.value), Z(qe({ key: 2 }, u.value)), null, 16))
1388
- ], 64)) : W("", !0);
1483
+ (y(), w(O(o.value), Q(Ce(p.value)), null, 16))
1484
+ ], 2)) : (y(), w(O(o.value), Q(ot({ key: 2 }, p.value)), null, 16))
1485
+ ], 64)) : R("", !0);
1389
1486
  }
1390
- }), po = /* @__PURE__ */ D({
1487
+ }), So = ["data-rulecms-overlay-layer"], ko = /* @__PURE__ */ k({
1391
1488
  __name: "RenderComponentsInner",
1392
1489
  props: {
1393
1490
  displayItemList: {},
@@ -1403,77 +1500,194 @@ ${i.value}
1403
1500
  ancestorColumnIds: {}
1404
1501
  },
1405
1502
  setup(e) {
1406
- const t = e, n = () => te(t.plugins).components;
1407
- function o(a) {
1408
- if (t.isComposeMode && a.type === re.DroppableBox)
1503
+ const t = e, n = () => oe(t.plugins).components, o = h(
1504
+ () => !t.isComposeMode && Jn(t.displayItemList) && !he({
1505
+ containerAttributes: t.displayItemList.containerAttributes,
1506
+ deviceDisplayType: t.deviceDisplayType
1507
+ })
1508
+ ), s = h(() => {
1509
+ const d = ke({
1510
+ containerAttributes: t.displayItemList.containerAttributes,
1511
+ deviceDisplayType: t.deviceDisplayType
1512
+ });
1513
+ return no({
1514
+ isWithinCollection: t.isWithinCollection,
1515
+ baseDeclaresOwnHeight: _e({
1516
+ containerAttributes: t.displayItemList.containerAttributes,
1517
+ widgetContainerStyles: He({
1518
+ containerAttributes: t.displayItemList.containerAttributes,
1519
+ deviceDisplayType: t.deviceDisplayType,
1520
+ isComposeMode: t.isComposeMode
1521
+ })
1522
+ }),
1523
+ baseZIndex: d
1524
+ });
1525
+ }), i = h(() => {
1526
+ var l;
1527
+ const d = ((l = t.displayItemList.overlayLayers) == null ? void 0 : l.layers) ?? [], p = ke({
1528
+ containerAttributes: t.displayItemList.containerAttributes,
1529
+ deviceDisplayType: t.deviceDisplayType
1530
+ });
1531
+ return d.flatMap((g, f) => to({ layer: g, deviceDisplayType: t.deviceDisplayType }) ? [] : [
1532
+ {
1533
+ index: f,
1534
+ layer: g,
1535
+ boxStyles: oo({
1536
+ zIndex: Qn(p, f),
1537
+ pointerEvents: eo({
1538
+ containerAttributes: g.containerAttributes,
1539
+ deviceDisplayType: t.deviceDisplayType
1540
+ })
1541
+ })
1542
+ }
1543
+ ]);
1544
+ });
1545
+ function r(d) {
1546
+ if (t.isComposeMode && d.type === ce.DroppableBox)
1409
1547
  return !1;
1410
- const { componentAttributesBasedOnDevice: r } = Ce({
1411
- col: a,
1548
+ const { componentAttributesBasedOnDevice: p } = Se({
1549
+ col: d,
1412
1550
  deviceDisplayType: t.deviceDisplayType,
1413
1551
  isComposeMode: t.isComposeMode,
1414
- sourceComponentsPlugin: te(t.plugins)
1415
- }), l = !!r && r["hide-component-3-resolutions"] === "true";
1552
+ sourceComponentsPlugin: oe(t.plugins)
1553
+ }), l = !!p && p["hide-component-3-resolutions"] === "true";
1416
1554
  return !(!t.isComposeMode && l);
1417
1555
  }
1418
- function s(a) {
1419
- const { componentAttributesBasedOnDevice: r, componentStyles: l } = Ce({
1420
- col: a,
1556
+ function u(d) {
1557
+ const { componentAttributesBasedOnDevice: p, componentStyles: l } = Se({
1558
+ col: d,
1421
1559
  deviceDisplayType: t.deviceDisplayType,
1422
1560
  isComposeMode: t.isComposeMode,
1423
- sourceComponentsPlugin: te(t.plugins)
1561
+ sourceComponentsPlugin: oe(t.plugins)
1424
1562
  });
1425
1563
  return {
1426
- componentAttributes: r,
1564
+ componentAttributes: p,
1427
1565
  styleProps: l
1428
1566
  };
1429
1567
  }
1430
- function i(a) {
1431
- const r = Le(a.type);
1432
- if (!(r != null && r.length))
1568
+ function m(d) {
1569
+ const p = je(d.type);
1570
+ if (!(p != null && p.length))
1433
1571
  return null;
1434
- const l = a.collection ?? t.widgetCollections[r];
1572
+ const l = d.collection ?? t.widgetCollections[p];
1435
1573
  if (!l)
1436
1574
  throw new Error(
1437
- `DisplayCollection - Collection with ID ${r} not found in widgetCollections. Available collections: ${Object.keys(t.widgetCollections).join(", ")}`
1575
+ `DisplayCollection - Collection with ID ${p} not found in widgetCollections. Available collections: ${Object.keys(t.widgetCollections).join(", ")}`
1438
1576
  );
1439
- return !l.collectionRows || !$n(l.collectionRows) ? null : l.collectionRows;
1577
+ return !l.collectionRows || !Bn(l.collectionRows) ? null : l.collectionRows;
1440
1578
  }
1441
- function c(a) {
1442
- return [...t.ancestorColumnIds ?? [], a];
1579
+ function c(d) {
1580
+ return [...t.ancestorColumnIds ?? [], d];
1443
1581
  }
1444
- function d(a) {
1445
- return Kn({
1582
+ function a(d) {
1583
+ return so({
1446
1584
  componentProps: t.componentProps,
1447
1585
  ancestorColumnIds: t.ancestorColumnIds,
1448
- columnId: a
1586
+ columnId: d
1449
1587
  });
1450
1588
  }
1451
- return (a, r) => {
1452
- const l = Xe("RenderComponentsInner", !0);
1453
- return m(), A(to, {
1589
+ return (d, p) => {
1590
+ const l = st("RenderComponentsInner", !0);
1591
+ return o.value ? (y(), b("div", {
1592
+ key: 0,
1593
+ style: S(s.value)
1594
+ }, [
1595
+ V(De, {
1596
+ "display-item-list": e.displayItemList,
1597
+ "is-compose-mode": e.isComposeMode,
1598
+ "show-drop-containers": e.showDropContainers,
1599
+ "is-within-collection": e.isWithinCollection,
1600
+ "device-display-type": e.deviceDisplayType
1601
+ }, {
1602
+ default: $(() => [
1603
+ (y(!0), b(A, null, W(e.displayItemList.rows, (g) => (y(), w(Te, {
1604
+ key: g.id,
1605
+ row: g,
1606
+ "is-compose-mode": e.isComposeMode,
1607
+ "show-drop-containers": e.showDropContainers,
1608
+ "is-within-collection": e.isWithinCollection,
1609
+ "device-display-type": e.deviceDisplayType
1610
+ }, {
1611
+ default: $(() => [
1612
+ (y(!0), b(A, null, W(g.columns, (f) => (y(), b(A, {
1613
+ key: f.id
1614
+ }, [
1615
+ r(f) ? (y(), b(A, { key: 0 }, [
1616
+ m(f) ? (y(), w(l, {
1617
+ key: 0,
1618
+ "display-item-list": m(f),
1619
+ "is-compose-mode": e.isComposeMode,
1620
+ "is-within-collection": !0,
1621
+ "widget-collections": e.widgetCollections,
1622
+ "show-drop-containers": e.showDropContainers,
1623
+ "redux-device-display-type": e.reduxDeviceDisplayType,
1624
+ plugins: e.plugins,
1625
+ "device-display-type": e.deviceDisplayType,
1626
+ "component-props": e.componentProps,
1627
+ mounts: e.mounts,
1628
+ "ancestor-column-ids": c(f.id)
1629
+ }, null, 8, ["display-item-list", "is-compose-mode", "widget-collections", "show-drop-containers", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "ancestor-column-ids"])) : (y(), w(xe, {
1630
+ key: 1,
1631
+ "component-type": f.type,
1632
+ "library-id": f.libraryId,
1633
+ "component-attributes": u(f).componentAttributes,
1634
+ components: n(),
1635
+ "style-props": u(f).styleProps,
1636
+ "widget-instance-props": a(f.id),
1637
+ mounts: e.mounts
1638
+ }, null, 8, ["component-type", "library-id", "component-attributes", "components", "style-props", "widget-instance-props", "mounts"]))
1639
+ ], 64)) : R("", !0)
1640
+ ], 64))), 128))
1641
+ ]),
1642
+ _: 2
1643
+ }, 1032, ["row", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]))), 128))
1644
+ ]),
1645
+ _: 1
1646
+ }, 8, ["display-item-list", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]),
1647
+ (y(!0), b(A, null, W(i.value, (g) => (y(), b("div", {
1648
+ key: g.index,
1649
+ "data-rulecms-overlay-layer": g.index,
1650
+ style: S(g.boxStyles)
1651
+ }, [
1652
+ V(l, {
1653
+ "display-item-list": g.layer,
1654
+ "is-compose-mode": e.isComposeMode,
1655
+ "is-within-collection": !1,
1656
+ "widget-collections": e.widgetCollections,
1657
+ "show-drop-containers": !1,
1658
+ "redux-device-display-type": e.reduxDeviceDisplayType,
1659
+ plugins: e.plugins,
1660
+ "device-display-type": e.deviceDisplayType,
1661
+ "component-props": e.componentProps,
1662
+ mounts: e.mounts,
1663
+ "ancestor-column-ids": e.ancestorColumnIds
1664
+ }, null, 8, ["display-item-list", "is-compose-mode", "widget-collections", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "ancestor-column-ids"])
1665
+ ], 12, So))), 128))
1666
+ ], 4)) : (y(), w(De, {
1667
+ key: 1,
1454
1668
  "display-item-list": e.displayItemList,
1455
1669
  "is-compose-mode": e.isComposeMode,
1456
1670
  "show-drop-containers": e.showDropContainers,
1457
1671
  "is-within-collection": e.isWithinCollection,
1458
1672
  "device-display-type": e.deviceDisplayType
1459
1673
  }, {
1460
- default: V(() => [
1461
- (m(!0), b(I, null, z(e.displayItemList.rows, (f) => (m(), A(oo, {
1462
- key: f.id,
1463
- row: f,
1674
+ default: $(() => [
1675
+ (y(!0), b(A, null, W(e.displayItemList.rows, (g) => (y(), w(Te, {
1676
+ key: g.id,
1677
+ row: g,
1464
1678
  "is-compose-mode": e.isComposeMode,
1465
1679
  "show-drop-containers": e.showDropContainers,
1466
1680
  "is-within-collection": e.isWithinCollection,
1467
1681
  "device-display-type": e.deviceDisplayType
1468
1682
  }, {
1469
- default: V(() => [
1470
- (m(!0), b(I, null, z(f.columns, (u) => (m(), b(I, {
1471
- key: u.id
1683
+ default: $(() => [
1684
+ (y(!0), b(A, null, W(g.columns, (f) => (y(), b(A, {
1685
+ key: f.id
1472
1686
  }, [
1473
- o(u) ? (m(), b(I, { key: 0 }, [
1474
- i(u) ? (m(), A(l, {
1687
+ r(f) ? (y(), b(A, { key: 0 }, [
1688
+ m(f) ? (y(), w(l, {
1475
1689
  key: 0,
1476
- "display-item-list": i(u),
1690
+ "display-item-list": m(f),
1477
1691
  "is-compose-mode": e.isComposeMode,
1478
1692
  "is-within-collection": !0,
1479
1693
  "widget-collections": e.widgetCollections,
@@ -1483,28 +1697,28 @@ ${i.value}
1483
1697
  "device-display-type": e.deviceDisplayType,
1484
1698
  "component-props": e.componentProps,
1485
1699
  mounts: e.mounts,
1486
- "ancestor-column-ids": c(u.id)
1487
- }, null, 8, ["display-item-list", "is-compose-mode", "widget-collections", "show-drop-containers", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "ancestor-column-ids"])) : (m(), A(uo, {
1700
+ "ancestor-column-ids": c(f.id)
1701
+ }, null, 8, ["display-item-list", "is-compose-mode", "widget-collections", "show-drop-containers", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "ancestor-column-ids"])) : (y(), w(xe, {
1488
1702
  key: 1,
1489
- "component-type": u.type,
1490
- "library-id": u.libraryId,
1491
- "component-attributes": s(u).componentAttributes,
1703
+ "component-type": f.type,
1704
+ "library-id": f.libraryId,
1705
+ "component-attributes": u(f).componentAttributes,
1492
1706
  components: n(),
1493
- "style-props": s(u).styleProps,
1494
- "widget-instance-props": d(u.id),
1707
+ "style-props": u(f).styleProps,
1708
+ "widget-instance-props": a(f.id),
1495
1709
  mounts: e.mounts
1496
1710
  }, null, 8, ["component-type", "library-id", "component-attributes", "components", "style-props", "widget-instance-props", "mounts"]))
1497
- ], 64)) : W("", !0)
1711
+ ], 64)) : R("", !0)
1498
1712
  ], 64))), 128))
1499
1713
  ]),
1500
1714
  _: 2
1501
1715
  }, 1032, ["row", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]))), 128))
1502
1716
  ]),
1503
1717
  _: 1
1504
- }, 8, ["display-item-list", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]);
1718
+ }, 8, ["display-item-list", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]));
1505
1719
  };
1506
1720
  }
1507
- }), oe = /* @__PURE__ */ D({
1721
+ }), re = /* @__PURE__ */ k({
1508
1722
  __name: "RenderComponentsForDevice",
1509
1723
  props: {
1510
1724
  displayItemList: {},
@@ -1522,7 +1736,7 @@ ${i.value}
1522
1736
  setup(e) {
1523
1737
  return (t, n) => {
1524
1738
  var o, s;
1525
- return (s = (o = e.displayItemList) == null ? void 0 : o.rows) != null && s.length ? (m(), A(po, {
1739
+ return (s = (o = e.displayItemList) == null ? void 0 : o.rows) != null && s.length ? (y(), w(ko, {
1526
1740
  key: 0,
1527
1741
  "display-item-list": e.displayItemList,
1528
1742
  "is-compose-mode": e.isComposeMode,
@@ -1535,26 +1749,26 @@ ${i.value}
1535
1749
  "component-props": e.componentProps,
1536
1750
  mounts: e.mounts,
1537
1751
  "ancestor-column-ids": e.ancestorColumnIds
1538
- }, null, 8, ["display-item-list", "is-compose-mode", "is-within-collection", "widget-collections", "show-drop-containers", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "ancestor-column-ids"])) : W("", !0);
1752
+ }, null, 8, ["display-item-list", "is-compose-mode", "is-within-collection", "widget-collections", "show-drop-containers", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "ancestor-column-ids"])) : R("", !0);
1539
1753
  };
1540
1754
  }
1541
- }), _e = /* @__PURE__ */ D({
1755
+ }), Xe = /* @__PURE__ */ k({
1542
1756
  __name: "LibraryStylesheets",
1543
1757
  props: {
1544
1758
  stylesheets: {}
1545
1759
  },
1546
1760
  setup(e) {
1547
- return (t, n) => (m(!0), b(I, null, z(e.stylesheets ?? [], (o) => (m(), A(R("style"), {
1761
+ return (t, n) => (y(!0), b(A, null, W(e.stylesheets ?? [], (o) => (y(), w(O("style"), {
1548
1762
  key: o,
1549
1763
  "data-rulecms-library-stylesheet": ""
1550
1764
  }, {
1551
- default: V(() => [
1552
- ie(Y(o), 1)
1765
+ default: $(() => [
1766
+ X(H(o), 1)
1553
1767
  ]),
1554
1768
  _: 2
1555
1769
  }, 1024))), 128));
1556
1770
  }
1557
- }), fo = /* @__PURE__ */ D({
1771
+ }), Do = /* @__PURE__ */ k({
1558
1772
  __name: "BreakpointVariantRender",
1559
1773
  props: {
1560
1774
  displayItemList: {},
@@ -1567,40 +1781,40 @@ ${i.value}
1567
1781
  setup(e) {
1568
1782
  const t = ["Phone", "Tablet", "Desktop"];
1569
1783
  let n = 0;
1570
- const o = e, s = `rulecms-bp-${++n}`, i = y(() => o.scopeIdInput ?? s), c = y(
1571
- () => Xn(o.displayItemList, o.widgetCollections)
1572
- ), d = y(() => Qn(i.value));
1573
- return (a, r) => {
1574
- var l;
1575
- return m(), b(I, null, [
1576
- ne(_e, {
1577
- stylesheets: (l = e.plugins.sourceComponents) == null ? void 0 : l.stylesheets
1784
+ const o = e, s = `rulecms-bp-${++n}`, i = h(() => o.scopeIdInput ?? s), r = h(
1785
+ () => po(o.displayItemList, o.widgetCollections)
1786
+ ), u = h(() => mo(i.value));
1787
+ return (m, c) => {
1788
+ var a;
1789
+ return y(), b(A, null, [
1790
+ V(Xe, {
1791
+ stylesheets: (a = e.plugins.sourceComponents) == null ? void 0 : a.stylesheets
1578
1792
  }, null, 8, ["stylesheets"]),
1579
- c.value ? (m(), b(I, { key: 1 }, [
1580
- (m(), A(R("style"), null, {
1581
- default: V(() => [
1582
- ie(Y(d.value), 1)
1793
+ r.value ? (y(), b(A, { key: 1 }, [
1794
+ (y(), w(O("style"), null, {
1795
+ default: $(() => [
1796
+ X(H(u.value), 1)
1583
1797
  ]),
1584
1798
  _: 1
1585
1799
  })),
1586
- (m(), b(I, null, z(t, (f) => $("div", {
1587
- key: f,
1588
- class: F(`${i.value}-${f.toLowerCase()}`)
1800
+ (y(), b(A, null, W(t, (d) => N("div", {
1801
+ key: d,
1802
+ class: U(`${i.value}-${d.toLowerCase()}`)
1589
1803
  }, [
1590
- ne(oe, {
1804
+ V(re, {
1591
1805
  "display-item-list": e.displayItemList,
1592
1806
  "is-compose-mode": !1,
1593
1807
  "is-within-collection": !1,
1594
1808
  "widget-collections": e.widgetCollections,
1595
1809
  "show-drop-containers": !1,
1596
1810
  "redux-device-display-type": "desktop",
1597
- "device-display-type": f,
1811
+ "device-display-type": d,
1598
1812
  plugins: e.plugins,
1599
1813
  "component-props": e.componentProps,
1600
1814
  mounts: e.mounts
1601
1815
  }, null, 8, ["display-item-list", "widget-collections", "device-display-type", "plugins", "component-props", "mounts"])
1602
1816
  ], 2)), 64))
1603
- ], 64)) : (m(), A(oe, {
1817
+ ], 64)) : (y(), w(re, {
1604
1818
  key: 0,
1605
1819
  "display-item-list": e.displayItemList,
1606
1820
  "is-compose-mode": !1,
@@ -1617,7 +1831,7 @@ ${i.value}
1617
1831
  };
1618
1832
  }
1619
1833
  });
1620
- function mo(e, t, n) {
1834
+ function To(e, t, n) {
1621
1835
  if (e)
1622
1836
  return "Phone";
1623
1837
  if (t)
@@ -1625,7 +1839,7 @@ function mo(e, t, n) {
1625
1839
  const o = (n == null ? void 0 : n.toLowerCase()) || "desktop";
1626
1840
  return o === "phone" ? "Phone" : o === "tablet" ? "Tablet" : "Desktop";
1627
1841
  }
1628
- const yo = `(max-width: ${Ne})`, go = `(max-width: ${We})`, ho = /* @__PURE__ */ D({
1842
+ const xo = `(max-width: ${Fe})`, Eo = `(max-width: ${Ke})`, Po = /* @__PURE__ */ k({
1629
1843
  __name: "RenderComponents",
1630
1844
  props: {
1631
1845
  displayItemList: {},
@@ -1639,27 +1853,27 @@ const yo = `(max-width: ${Ne})`, go = `(max-width: ${We})`, ho = /* @__PURE__ */
1639
1853
  mounts: {}
1640
1854
  },
1641
1855
  setup(e) {
1642
- const t = e, n = B("Desktop");
1856
+ const t = e, n = K("Desktop");
1643
1857
  let o, s;
1644
1858
  function i() {
1645
- n.value = mo(
1859
+ n.value = To(
1646
1860
  (o == null ? void 0 : o.matches) ?? !1,
1647
1861
  (s == null ? void 0 : s.matches) ?? !1,
1648
1862
  t.reduxDeviceDisplayType
1649
1863
  );
1650
1864
  }
1651
- return Ze(() => {
1652
- typeof matchMedia == "function" && (o = matchMedia(yo), s = matchMedia(go), o.addEventListener("change", i), s.addEventListener("change", i)), i();
1653
- }), xe(() => {
1865
+ return it(() => {
1866
+ typeof matchMedia == "function" && (o = matchMedia(xo), s = matchMedia(Eo), o.addEventListener("change", i), s.addEventListener("change", i)), i();
1867
+ }), Re(() => {
1654
1868
  o == null || o.removeEventListener("change", i), s == null || s.removeEventListener("change", i);
1655
- }), (c, d) => {
1656
- var a;
1657
- return m(), b(I, null, [
1658
- e.isWithinCollection ? W("", !0) : (m(), A(_e, {
1869
+ }), (r, u) => {
1870
+ var m;
1871
+ return y(), b(A, null, [
1872
+ e.isWithinCollection ? R("", !0) : (y(), w(Xe, {
1659
1873
  key: 0,
1660
- stylesheets: (a = e.plugins.sourceComponents) == null ? void 0 : a.stylesheets
1874
+ stylesheets: (m = e.plugins.sourceComponents) == null ? void 0 : m.stylesheets
1661
1875
  }, null, 8, ["stylesheets"])),
1662
- ne(oe, {
1876
+ V(re, {
1663
1877
  "display-item-list": e.displayItemList,
1664
1878
  "is-compose-mode": e.isComposeMode,
1665
1879
  "is-within-collection": e.isWithinCollection,
@@ -1674,77 +1888,118 @@ const yo = `(max-width: ${Ne})`, go = `(max-width: ${We})`, ho = /* @__PURE__ */
1674
1888
  ], 64);
1675
1889
  };
1676
1890
  }
1891
+ }), Lo = (e) => e.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), $o = /[{};]/, Ro = (e) => {
1892
+ if (!e)
1893
+ return {};
1894
+ const t = {};
1895
+ for (const [n, o] of Object.entries(e)) {
1896
+ if (!ue(n) || typeof o != "string")
1897
+ continue;
1898
+ const s = o.trim();
1899
+ s === "" || $o.test(s) || (t[n.trim()] = s);
1900
+ }
1901
+ return t;
1902
+ }, Mo = (e, t) => {
1903
+ const n = Ro(t), o = Object.keys(n);
1904
+ if (o.length === 0 || !e)
1905
+ return null;
1906
+ const s = `[data-rulecms-published-key="${Lo(e)}"] > *`, i = o.sort((r, u) => r.localeCompare(u)).map((r) => ` ${r}: ${n[r]};`).join(`
1907
+ `);
1908
+ return `${s} {
1909
+ ${i}
1910
+ }`;
1911
+ }, No = /* @__PURE__ */ k({
1912
+ __name: "ProjectCssVariablesStylesheet",
1913
+ props: {
1914
+ publishedKey: {},
1915
+ variables: {}
1916
+ },
1917
+ setup(e) {
1918
+ const t = e, n = h(
1919
+ () => Mo(t.publishedKey, t.variables)
1920
+ );
1921
+ return (o, s) => n.value ? (y(), w(O("style"), {
1922
+ key: 0,
1923
+ "data-rulecms-project-css-variables": ""
1924
+ }, {
1925
+ default: $(() => [
1926
+ X(H(n.value), 1)
1927
+ ]),
1928
+ _: 1
1929
+ })) : R("", !0);
1930
+ }
1677
1931
  });
1678
- function bo(e) {
1932
+ function Wo(e) {
1679
1933
  const t = {};
1680
1934
  return Object.entries(e).forEach(([n, o]) => {
1681
1935
  const s = { ...o };
1682
1936
  if (s.itemList)
1683
1937
  try {
1684
1938
  s.collectionRows = typeof s.itemList == "string" ? JSON.parse(s.itemList) : s.itemList;
1685
- } catch (c) {
1686
- console.error(`Failed to parse itemList for collection ${n}:`, c), s.collectionRows = { rows: [] };
1939
+ } catch (r) {
1940
+ console.error(`Failed to parse itemList for collection ${n}:`, r), s.collectionRows = { rows: [] };
1687
1941
  }
1688
1942
  let i = `${s.name}$${n}`;
1689
1943
  s.parentId && (i = `${i}@${s.parentId}`), t[i] = s;
1690
1944
  }), t;
1691
1945
  }
1692
- function wo(e) {
1946
+ function Oo(e) {
1693
1947
  return typeof e.itemList == "string" ? JSON.parse(e.itemList) : e.itemList;
1694
1948
  }
1695
- function Ke(e) {
1949
+ function Ze(e) {
1696
1950
  return {
1697
- displayItemList: wo(e.widget),
1698
- widgetCollections: bo(e.childCollections),
1699
- ...e.libraries ? { libraries: e.libraries } : {}
1951
+ displayItemList: Oo(e.widget),
1952
+ widgetCollections: Wo(e.childCollections),
1953
+ ...e.libraries ? { libraries: e.libraries } : {},
1954
+ ...e.cssVariables && Object.keys(e.cssVariables).length > 0 ? { cssVariables: e.cssVariables } : {}
1700
1955
  };
1701
1956
  }
1702
- function Co(e) {
1703
- const t = e.registry ?? q(), n = le({
1957
+ function Vo(e) {
1958
+ const t = e.registry ?? Z(), n = ae({
1704
1959
  displayItemList: e.displayItemList,
1705
1960
  widgetCollections: e.widgetCollections
1706
1961
  });
1707
1962
  return t.resolveSync({ registrations: e.libraries, referenced: n });
1708
1963
  }
1709
- function vo(e) {
1710
- const t = e.registry ?? q(), n = le({
1964
+ function jo(e) {
1965
+ const t = e.registry ?? Z(), n = ae({
1711
1966
  displayItemList: e.displayItemList,
1712
1967
  widgetCollections: e.widgetCollections
1713
1968
  });
1714
1969
  return t.resolve({ registrations: e.libraries, referenced: n });
1715
1970
  }
1716
- const Ao = {
1971
+ const Bo = {
1717
1972
  display: "flex",
1718
1973
  justifyContent: "center",
1719
1974
  alignItems: "center",
1720
1975
  padding: "3rem",
1721
1976
  color: "#e2e8f0"
1722
- }, So = {
1977
+ }, Fo = {
1723
1978
  display: "flex",
1724
1979
  alignItems: "center",
1725
1980
  gap: "1rem"
1726
- }, Io = {
1981
+ }, Ko = {
1727
1982
  width: "40px",
1728
1983
  height: "40px",
1729
1984
  border: "4px solid #4a5568",
1730
1985
  borderTopColor: "#63b3ed",
1731
1986
  borderRadius: "50%",
1732
1987
  animation: "spin 1s linear infinite"
1733
- }, Se = {
1988
+ }, Ee = {
1734
1989
  padding: "1.5rem",
1735
1990
  backgroundColor: "#742a2a",
1736
1991
  border: "1px solid #9b2c2c",
1737
1992
  borderRadius: "8px",
1738
1993
  color: "#fed7d7"
1739
- }, Ie = {
1994
+ }, Pe = {
1740
1995
  fontSize: "16px",
1741
1996
  fontWeight: "600",
1742
1997
  marginBottom: "0.5rem",
1743
1998
  color: "#feb2b2"
1744
- }, ke = {
1999
+ }, Le = {
1745
2000
  fontSize: "14px",
1746
2001
  color: "#fed7d7"
1747
- }, ko = `
2002
+ }, Uo = `
1748
2003
  @keyframes spin {
1749
2004
  from {
1750
2005
  transform: rotate(0deg);
@@ -1753,7 +2008,7 @@ const Ao = {
1753
2008
  transform: rotate(360deg);
1754
2009
  }
1755
2010
  }
1756
- `, Ko = "data-rulecms-published-key", Do = ["data-rulecms-published-key"], Uo = /* @__PURE__ */ D({
2011
+ `, ls = "data-rulecms-published-key", Ho = ["data-rulecms-published-key"], cs = /* @__PURE__ */ k({
1757
2012
  __name: "RuleCMSWidget",
1758
2013
  props: {
1759
2014
  publishedKey: {},
@@ -1766,94 +2021,94 @@ const Ao = {
1766
2021
  mounts: {}
1767
2022
  },
1768
2023
  setup(e) {
1769
- const t = e, n = Je(Me, null), o = B(!1), s = B(null), i = B(null), c = B(null), d = y(() => t.mode === "pre-fetched"), a = y(() => ({
1770
- sourceComponents: c.value ?? void 0
2024
+ const t = e, n = rt(Be, null), o = K(!1), s = K(null), i = K(null), r = K(null), u = h(() => t.mode === "pre-fetched"), m = h(() => ({
2025
+ sourceComponents: r.value ?? void 0
1771
2026
  }));
1772
- let r = null, l = null, f = !1;
1773
- function u() {
2027
+ let c = null, a = null, d = !1;
2028
+ function p() {
1774
2029
  if (!i.value) {
1775
- c.value = null;
2030
+ r.value = null;
1776
2031
  return;
1777
2032
  }
1778
- const C = t.libraries ?? (n == null ? void 0 : n.libraries), x = n == null ? void 0 : n.libraryRegistry, j = Co({
2033
+ const v = t.libraries ?? (n == null ? void 0 : n.libraries), T = n == null ? void 0 : n.libraryRegistry, P = Vo({
1779
2034
  displayItemList: i.value.displayItemList,
1780
2035
  widgetCollections: i.value.widgetCollections,
1781
- libraries: C,
1782
- registry: x
2036
+ libraries: v,
2037
+ registry: T
1783
2038
  });
1784
- if (j) {
1785
- c.value = j;
2039
+ if (P) {
2040
+ r.value = P;
1786
2041
  return;
1787
2042
  }
1788
- vo({
2043
+ jo({
1789
2044
  displayItemList: i.value.displayItemList,
1790
2045
  widgetCollections: i.value.widgetCollections,
1791
- libraries: C,
1792
- registry: x
1793
- }).then((X) => {
1794
- c.value = X;
2046
+ libraries: v,
2047
+ registry: T
2048
+ }).then((J) => {
2049
+ r.value = J;
1795
2050
  });
1796
2051
  }
1797
- function p() {
1798
- i.value && zn({
2052
+ function l() {
2053
+ i.value && co({
1799
2054
  componentProps: t.componentProps,
1800
2055
  displayItemList: i.value.displayItemList,
1801
2056
  widgetCollections: i.value.widgetCollections,
1802
2057
  publishedKey: t.publishedKey
1803
2058
  });
1804
2059
  }
1805
- function h() {
1806
- if (f || typeof document > "u")
2060
+ function g() {
2061
+ if (d || typeof document > "u")
1807
2062
  return;
1808
- const C = "rulecms-widget-spinner-styles";
1809
- if (!document.getElementById(C)) {
1810
- const x = document.createElement("style");
1811
- x.id = C, x.textContent = ko, document.head.appendChild(x);
2063
+ const v = "rulecms-widget-spinner-styles";
2064
+ if (!document.getElementById(v)) {
2065
+ const T = document.createElement("style");
2066
+ T.id = v, T.textContent = Uo, document.head.appendChild(T);
1812
2067
  }
1813
- f = !0;
2068
+ d = !0;
1814
2069
  }
1815
- function g() {
1816
- const C = t.token ?? (n == null ? void 0 : n.token), x = t.endpoint ?? (n == null ? void 0 : n.endpoint);
1817
- if (!t.publishedKey || !C) {
1818
- s.value = t.publishedKey ? "Token is required. Provide it either directly as a prop (`token`) or via RuleCMSWidgetProvider." : L(C) ? "Widget key is required" : "Published key is required", i.value = null;
2070
+ function f() {
2071
+ const v = t.token ?? (n == null ? void 0 : n.token), T = t.endpoint ?? (n == null ? void 0 : n.endpoint);
2072
+ if (!t.publishedKey || !v) {
2073
+ s.value = t.publishedKey ? "Token is required. Provide it either directly as a prop (`token`) or via RuleCMSWidgetProvider." : j(v) ? "Widget key is required" : "Published key is required", i.value = null;
1819
2074
  return;
1820
2075
  }
1821
- const j = `${t.publishedKey}|${C}`;
1822
- if (l === j && i.value) {
1823
- u();
2076
+ const P = `${t.publishedKey}|${v}`;
2077
+ if (a === P && i.value) {
2078
+ p();
1824
2079
  return;
1825
2080
  }
1826
- r == null || r.abort(), r = new AbortController();
1827
- const X = r.signal;
1828
- l = j, o.value = !0, s.value = null;
1829
- const Ue = $e({ publishedKey: t.publishedKey, token: C, endpoint: x });
1830
- fetch(Ue, {
2081
+ c == null || c.abort(), c = new AbortController();
2082
+ const J = c.signal;
2083
+ a = P, o.value = !0, s.value = null;
2084
+ const Je = Oe({ publishedKey: t.publishedKey, token: v, endpoint: T });
2085
+ fetch(Je, {
1831
2086
  method: "GET",
1832
2087
  headers: { "Content-Type": "application/json" },
1833
- ...L(C) ? { cache: "no-store" } : {},
1834
- signal: X
1835
- }).then(async (E) => {
1836
- if (E.ok) {
1837
- const K = await E.json();
1838
- K.success ? (i.value = Ke(K.data), s.value = null, u(), p()) : (s.value = "Failed to fetch widget data", i.value = null);
2088
+ ...j(v) ? { cache: "no-store" } : {},
2089
+ signal: J
2090
+ }).then(async (L) => {
2091
+ if (L.ok) {
2092
+ const z = await L.json();
2093
+ z.success ? (i.value = Ze(z.data), s.value = null, p(), l()) : (s.value = "Failed to fetch widget data", i.value = null);
1839
2094
  } else {
1840
- const K = await E.json().catch(() => ({ error: "Unknown error" }));
1841
- s.value = K.error || `Request failed with status ${E.status}`, i.value = null;
2095
+ const z = await L.json().catch(() => ({ error: "Unknown error" }));
2096
+ s.value = z.error || `Request failed with status ${L.status}`, i.value = null;
1842
2097
  }
1843
- }).catch((E) => {
1844
- E instanceof DOMException && E.name === "AbortError" || (console.error("Error fetching widget:", E), s.value = "Failed to fetch widget", i.value = null);
2098
+ }).catch((L) => {
2099
+ L instanceof DOMException && L.name === "AbortError" || (console.error("Error fetching widget:", L), s.value = "Failed to fetch widget", i.value = null);
1845
2100
  }).finally(() => {
1846
2101
  o.value = !1;
1847
2102
  });
1848
2103
  }
1849
- function v() {
2104
+ function I() {
1850
2105
  if (t.mode === "pre-fetched") {
1851
- i.value = t.initialData ?? null, o.value = !1, s.value = null, u(), p();
2106
+ i.value = t.initialData ?? null, o.value = !1, s.value = null, p(), l();
1852
2107
  return;
1853
2108
  }
1854
- h(), g();
2109
+ g(), f();
1855
2110
  }
1856
- return De(
2111
+ return $e(
1857
2112
  () => [
1858
2113
  t.publishedKey,
1859
2114
  t.token,
@@ -1864,246 +2119,265 @@ const Ao = {
1864
2119
  t.componentProps
1865
2120
  ],
1866
2121
  () => {
1867
- v();
2122
+ I();
1868
2123
  },
1869
2124
  { immediate: !0 }
1870
- ), xe(() => {
1871
- r == null || r.abort();
1872
- }), (C, x) => (m(), b("span", {
1873
- "data-rulecms-published-key": e.publishedKey,
1874
- style: { display: "contents" }
1875
- }, [
1876
- e.mode !== "pre-fetched" && o.value ? (m(), b("div", {
1877
- key: 0,
1878
- style: S(T(Ao))
1879
- }, [
1880
- $("div", {
1881
- style: S(T(So))
1882
- }, [
1883
- $("div", {
1884
- style: S(T(Io))
1885
- }, null, 4)
1886
- ], 4)
1887
- ], 4)) : e.mode !== "pre-fetched" && s.value ? (m(), b("div", {
1888
- key: 1,
1889
- style: S(T(Se))
1890
- }, [
1891
- $("div", {
1892
- style: S(T(Ie))
1893
- }, "Error Loading Widget", 4),
1894
- $("div", {
1895
- style: S(T(ke))
1896
- }, Y(s.value), 5)
1897
- ], 4)) : e.mode !== "pre-fetched" && !i.value ? (m(), b("div", {
1898
- key: 2,
1899
- style: S(T(Se))
2125
+ ), Re(() => {
2126
+ c == null || c.abort();
2127
+ }), (v, T) => {
2128
+ var P;
2129
+ return y(), b("span", {
2130
+ "data-rulecms-published-key": e.publishedKey,
2131
+ style: { display: "contents" }
1900
2132
  }, [
1901
- $("div", {
1902
- style: S(T(Ie))
1903
- }, "No Widget Data", 4),
1904
- $("div", {
1905
- style: S(T(ke))
1906
- }, "No widget data available", 4)
1907
- ], 4)) : c.value && i.value ? (m(), b(I, { key: 3 }, [
1908
- d.value ? (m(), A(fo, {
2133
+ V(No, {
2134
+ "published-key": e.publishedKey,
2135
+ variables: (P = i.value) == null ? void 0 : P.cssVariables
2136
+ }, null, 8, ["published-key", "variables"]),
2137
+ e.mode !== "pre-fetched" && o.value ? (y(), b("div", {
1909
2138
  key: 0,
1910
- "display-item-list": i.value.displayItemList,
1911
- "widget-collections": i.value.widgetCollections,
1912
- plugins: a.value,
1913
- "component-props": e.componentProps,
1914
- mounts: e.mounts
1915
- }, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts"])) : (m(), A(ho, {
2139
+ style: S(x(Bo))
2140
+ }, [
2141
+ N("div", {
2142
+ style: S(x(Fo))
2143
+ }, [
2144
+ N("div", {
2145
+ style: S(x(Ko))
2146
+ }, null, 4)
2147
+ ], 4)
2148
+ ], 4)) : e.mode !== "pre-fetched" && s.value ? (y(), b("div", {
1916
2149
  key: 1,
1917
- "display-item-list": i.value.displayItemList,
1918
- "is-compose-mode": !1,
1919
- "is-within-collection": !1,
1920
- "widget-collections": i.value.widgetCollections,
1921
- "show-drop-containers": !1,
1922
- "redux-device-display-type": "desktop",
1923
- plugins: a.value,
1924
- "component-props": e.componentProps,
1925
- mounts: e.mounts
1926
- }, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts"]))
1927
- ], 64)) : W("", !0)
1928
- ], 8, Do));
2150
+ style: S(x(Ee))
2151
+ }, [
2152
+ N("div", {
2153
+ style: S(x(Pe))
2154
+ }, "Error Loading Widget", 4),
2155
+ N("div", {
2156
+ style: S(x(Le))
2157
+ }, H(s.value), 5)
2158
+ ], 4)) : e.mode !== "pre-fetched" && !i.value ? (y(), b("div", {
2159
+ key: 2,
2160
+ style: S(x(Ee))
2161
+ }, [
2162
+ N("div", {
2163
+ style: S(x(Pe))
2164
+ }, "No Widget Data", 4),
2165
+ N("div", {
2166
+ style: S(x(Le))
2167
+ }, "No widget data available", 4)
2168
+ ], 4)) : r.value && i.value ? (y(), b(A, { key: 3 }, [
2169
+ u.value ? (y(), w(Do, {
2170
+ key: 0,
2171
+ "display-item-list": i.value.displayItemList,
2172
+ "widget-collections": i.value.widgetCollections,
2173
+ plugins: m.value,
2174
+ "component-props": e.componentProps,
2175
+ mounts: e.mounts
2176
+ }, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts"])) : (y(), w(Po, {
2177
+ key: 1,
2178
+ "display-item-list": i.value.displayItemList,
2179
+ "is-compose-mode": !1,
2180
+ "is-within-collection": !1,
2181
+ "widget-collections": i.value.widgetCollections,
2182
+ "show-drop-containers": !1,
2183
+ "redux-device-display-type": "desktop",
2184
+ plugins: m.value,
2185
+ "component-props": e.componentProps,
2186
+ mounts: e.mounts
2187
+ }, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts"]))
2188
+ ], 64)) : R("", !0)
2189
+ ], 8, Ho);
2190
+ };
1929
2191
  }
1930
2192
  });
1931
- class H extends Error {
2193
+ class Y extends Error {
1932
2194
  constructor(n, o) {
1933
2195
  super(n);
1934
- ye(this, "status");
2196
+ we(this, "status");
1935
2197
  this.name = "FetchRuleCMSWidgetError", this.status = o;
1936
2198
  }
1937
2199
  }
1938
- async function Ho(e) {
2200
+ async function as(e) {
1939
2201
  const { publishedKey: t, token: n, endpoint: o, fetchOptions: s } = e;
1940
2202
  if (!t)
1941
- throw new H(
1942
- L(n) ? "Widget key is required" : "Published key is required"
2203
+ throw new Y(
2204
+ j(n) ? "Widget key is required" : "Published key is required"
1943
2205
  );
1944
2206
  if (!n)
1945
- throw new H("Token is required");
1946
- const i = $e({ publishedKey: t, token: n, endpoint: o }), c = await fetch(i, {
2207
+ throw new Y("Token is required");
2208
+ const i = Oe({ publishedKey: t, token: n, endpoint: o }), r = await fetch(i, {
1947
2209
  method: "GET",
1948
2210
  headers: { "Content-Type": "application/json" },
1949
- ...L(n) ? { cache: "no-store" } : {},
2211
+ ...j(n) ? { cache: "no-store" } : {},
1950
2212
  ...s
1951
2213
  });
1952
- if (!c.ok) {
1953
- const a = await c.json().catch(() => ({ error: "Unknown error" }));
1954
- throw new H(
1955
- a.error || `Request failed with status ${c.status}`,
1956
- c.status
2214
+ if (!r.ok) {
2215
+ const m = await r.json().catch(() => ({ error: "Unknown error" }));
2216
+ throw new Y(
2217
+ m.error || `Request failed with status ${r.status}`,
2218
+ r.status
1957
2219
  );
1958
2220
  }
1959
- const d = await c.json();
1960
- if (!d.success)
1961
- throw new H("Failed to fetch widget data");
1962
- return Ke(d.data);
2221
+ const u = await r.json();
2222
+ if (!u.success)
2223
+ throw new Y("Failed to fetch widget data");
2224
+ return Ze(u.data);
1963
2225
  }
1964
- async function Go(e) {
1965
- const { data: t, libraries: n } = e, o = le({
2226
+ async function us(e) {
2227
+ const { data: t, libraries: n } = e, o = ae({
1966
2228
  displayItemList: t.displayItemList,
1967
2229
  widgetCollections: t.widgetCollections
1968
2230
  });
1969
- return q().resolve({ registrations: n, referenced: o });
2231
+ return Z().resolve({ registrations: n, referenced: o });
1970
2232
  }
1971
2233
  export {
1972
- Eo as AlignContentTypes,
1973
- fo as BreakpointVariantRender,
1974
- Ee as COLLECTION_TYPE_PREFIX,
1975
- me as COMPONENT_PROPS_PATH_SEPARATOR,
1976
- pe as CSS_CLASSES_ATTRIBUTE_NAME,
1977
- Ot as CSS_VARIABLE_NAME_MAX_LENGTH,
1978
- Wt as CSS_VARIABLE_NAME_PATTERN,
1979
- bt as DEFAULT_CLOUDINARY_CLOUD_NAME,
2234
+ Yo as AlignContentTypes,
2235
+ Do as BreakpointVariantRender,
2236
+ We as COLLECTION_TYPE_PREFIX,
2237
+ be as COMPONENT_PROPS_PATH_SEPARATOR,
2238
+ me as CSS_CLASSES_ATTRIBUTE_NAME,
2239
+ _t as CSS_VARIABLE_NAME_MAX_LENGTH,
2240
+ Ht as CSS_VARIABLE_NAME_PATTERN,
2241
+ ze as DEFAULT_BASE_Z_INDEX,
2242
+ Dt as DEFAULT_CLOUDINARY_CLOUD_NAME,
1980
2243
  _ as DEFAULT_LIBRARY_ID,
1981
- Rn as DEFAULT_ROW_GAP,
1982
- ot as DEV_CLIENT_TOKEN_PREFIX,
1983
- lt as DEV_WIDGET_API_PATH,
1984
- $o as DeviceDisplayTypes,
1985
- uo as DisplayComponent,
1986
- re as DisplayItemTypes,
1987
- Pe as DragItemIdPrefixTypes,
1988
- mt as EMBEDDED_KEY_SEPARATOR,
1989
- rn as FLEX_LAYOUT_STYLE_KEYS_THAT_DERIVE_DISPLAY,
1990
- H as FetchRuleCMSWidgetError,
1991
- je as HIDE_WIDGET_ATTRIBUTE_NAME,
1992
- we as JustifyContentTypes,
1993
- ft as PUBLISHED_KEY_SEPARATOR,
1994
- rt as PUBLISHED_WIDGET_API_PATH,
1995
- Po as PageViewTypes,
1996
- st as RULECMS_API_ORIGIN,
1997
- Ko as RULECMS_PUBLISHED_KEY_ATTRIBUTE,
1998
- Me as RULECMS_WIDGET_CONTEXT_KEY,
1999
- ho as RenderComponents,
2000
- oe as RenderComponentsForDevice,
2001
- po as RenderComponentsInner,
2002
- Uo as RuleCMSWidget,
2003
- Bo as RuleCMSWidgetProvider,
2004
- jn as WIDGET_ATTRIBUTES_IGNORED_IN_COMPOSE_MODE,
2005
- it as WIDGET_CACHE_API_ORIGIN,
2006
- en as alignContentAllowlist,
2007
- Jt as alignItemsAllowlist,
2008
- on as backgroundPositionAllowlist,
2009
- sn as backgroundRepeatAllowlist,
2010
- nn as backgroundSizeAllowlist,
2011
- ln as borderStyleKeywords,
2012
- Ft as boxSpacingSideKeys,
2013
- _o as boxSpacingStyleAttributeEntries,
2014
- Nt as buildCloudinaryBackgroundUrl,
2015
- $e as buildWidgetFetchUrl,
2016
- Un as collectComponentInstancePaths,
2017
- le as collectReferencedLibraryIds,
2018
- nt as composeSourceComponentsPlugin,
2019
- q as createComponentLibraryRegistry,
2020
- Q as cssAttrArrayKey,
2021
- ht as defaultPageWidth,
2022
- Tn as deriveDisplayFlexIfNeeded,
2023
- Fo as desktopModeWidth,
2024
- Ho as fetchRuleCMSWidget,
2025
- Gn as findUnmatchedComponentPropsKeys,
2026
- tn as flexDirectionAllowlist,
2027
- Qt as flexWrapAllowlist,
2028
- Ht as fontFamilyAllowlist,
2029
- zt as fontStyleAllowlist,
2030
- Gt as fontWeightAllowlist,
2031
- gn as formatBackgroundImageStyles,
2032
- hn as formatBorderStyles,
2033
- bn as formatBoxShadowStyles,
2034
- Cn as formatBoxSpacingStyles,
2035
- vn as formatCssColorStyles,
2036
- ue as formatCssColorValue,
2037
- An as formatCssEnumStyles,
2038
- Sn as formatCssLengthStyles,
2039
- k as formatCssVariable,
2040
- Vo as formatCssVariableStyles,
2041
- In as formatLineHeightStyles,
2042
- Dn as formatObjectStyleAttribute,
2043
- kn as formatOpacityStyles,
2044
- N as formatSpacingSideValue,
2045
- yt as generatePublishedKey,
2046
- Oo as generatePublishedKeyForEmbedded,
2047
- Le as getCollectionIdForCollectionType,
2048
- G as getColumnAttributes,
2049
- Ce as getComponentAttributesAndStyles,
2050
- te as getComponentsPluginFromPlugins,
2051
- w as getCssVariableFromLeaf,
2052
- Pn as getDefaultDimensionAttributes,
2053
- O as getDeviceTypeBasedAttributes,
2054
- Ro as getDragItemId,
2055
- at as getDragItemPrefixAndId,
2056
- ut as getIdAndPrefix,
2057
- En as getMergedAttributes,
2058
- Lo as getNameAndInstanceIdFromWidgetKey,
2059
- Mo as getNameFromWidgetKey,
2060
- dt as getWidgetKeyForCollection,
2061
- No as getWidgetKeyForCollectionWithPrefix,
2062
- pt as getWidgetKeyForPublishedCollection,
2063
- Wo as getWidgetKeyForPublishedCollectionWithPrefix,
2064
- fn as hasBoxShadowLeaf,
2065
- Xn as hasDeviceDivergentValues,
2066
- P as hasInvalidCssVariable,
2067
- $n as hasItems,
2068
- jo as incrementVersion,
2069
- jt as isBackgroundImageValue,
2070
- cn as isBorderStyleValue,
2071
- an as isBorderValue,
2072
- pn as isBoxShadowValue,
2073
- Vt as isBoxSpacingValue,
2074
- Et as isCloudinaryCloudName,
2075
- Pt as isCloudinaryPublicId,
2076
- Rt as isCloudinaryTransformationString,
2077
- ae as isCssColorValue,
2078
- Ut as isCssEnumValue,
2079
- Oe as isCssVariableName,
2080
- L as isDevClientToken,
2081
- mn as isLineHeightValue,
2082
- yn as isOpacityValue,
2083
- Mn as isRowHiddenForDevice,
2084
- $t as isSafeImageUrl,
2085
- M as isSpacingSideValue,
2086
- Fn as isWidgetHiddenForDevice,
2087
- Zt as justifyContentAllowlist,
2088
- fe as normalizeCssClasses,
2089
- de as objectStyleAttributeRegistry,
2090
- ee as overflowAllowlist,
2091
- Ne as phoneModeWidth,
2092
- Ke as prepareRuleCMSWidgetData,
2093
- Te as resolveKey,
2094
- Nn as resolveRowStyles,
2095
- ct as resolveWidgetApiOrigin,
2096
- Vn as resolveWidgetContainerStyles,
2097
- Kn as resolveWidgetInstanceProps,
2098
- Go as resolveWidgetLibraries,
2099
- Ln as rowBasedPropertiesAreAssigned,
2100
- ce as spacingKeywords,
2101
- Bt as spacingLengthUnits,
2102
- We as tabletModeWidth,
2103
- Yt as textAlignAllowlist,
2104
- qt as textDecorationAllowlist,
2105
- Xt as textTransformAllowlist,
2106
- Re as typeHasPrefix,
2107
- zn as warnUnmatchedComponentProps,
2108
- _n as widgetBasedPropertiesAreAssigned
2244
+ Fn as DEFAULT_ROW_GAP,
2245
+ dt as DEV_CLIENT_TOKEN_PREFIX,
2246
+ mt as DEV_WIDGET_API_PATH,
2247
+ qo as DeviceDisplayTypes,
2248
+ xe as DisplayComponent,
2249
+ ce as DisplayItemTypes,
2250
+ Ne as DragItemIdPrefixTypes,
2251
+ At as EMBEDDED_KEY_SEPARATOR,
2252
+ mn as FLEX_LAYOUT_STYLE_KEYS_THAT_DERIVE_DISPLAY,
2253
+ Y as FetchRuleCMSWidgetError,
2254
+ Ue as HIDE_WIDGET_ATTRIBUTE_NAME,
2255
+ Ie as JustifyContentTypes,
2256
+ Gn as POINTER_EVENTS_ATTRIBUTE_NAME,
2257
+ vt as PUBLISHED_KEY_SEPARATOR,
2258
+ yt as PUBLISHED_WIDGET_API_PATH,
2259
+ Go as PageViewTypes,
2260
+ pt as RULECMS_API_ORIGIN,
2261
+ ls as RULECMS_PUBLISHED_KEY_ATTRIBUTE,
2262
+ Be as RULECMS_WIDGET_CONTEXT_KEY,
2263
+ Po as RenderComponents,
2264
+ re as RenderComponentsForDevice,
2265
+ ko as RenderComponentsInner,
2266
+ cs as RuleCMSWidget,
2267
+ os as RuleCMSWidgetProvider,
2268
+ Yn as WIDGET_ATTRIBUTES_IGNORED_IN_COMPOSE_MODE,
2269
+ ft as WIDGET_CACHE_API_ORIGIN,
2270
+ Zn as Z_INDEX_WIDGET_ATTRIBUTE_NAME,
2271
+ un as alignContentAllowlist,
2272
+ cn as alignItemsAllowlist,
2273
+ fn as backgroundPositionAllowlist,
2274
+ yn as backgroundRepeatAllowlist,
2275
+ pn as backgroundSizeAllowlist,
2276
+ gn as borderStyleKeywords,
2277
+ Yt as boxSpacingSideKeys,
2278
+ rs as boxSpacingStyleAttributeEntries,
2279
+ Ut as buildCloudinaryBackgroundUrl,
2280
+ oo as buildOverlayLayerBoxStyles,
2281
+ no as buildOverlayStackStyles,
2282
+ Oe as buildWidgetFetchUrl,
2283
+ io as collectComponentInstancePaths,
2284
+ ae as collectReferencedLibraryIds,
2285
+ ut as composeSourceComponentsPlugin,
2286
+ Z as createComponentLibraryRegistry,
2287
+ se as cssAttrArrayKey,
2288
+ kt as defaultPageWidth,
2289
+ On as deriveDisplayFlexIfNeeded,
2290
+ ss as desktopModeWidth,
2291
+ as as fetchRuleCMSWidget,
2292
+ lo as findUnmatchedComponentPropsKeys,
2293
+ dn as flexDirectionAllowlist,
2294
+ an as flexWrapAllowlist,
2295
+ Qt as fontFamilyAllowlist,
2296
+ tn as fontStyleAllowlist,
2297
+ en as fontWeightAllowlist,
2298
+ kn as formatBackgroundImageStyles,
2299
+ Dn as formatBorderStyles,
2300
+ Tn as formatBoxShadowStyles,
2301
+ En as formatBoxSpacingStyles,
2302
+ Pn as formatCssColorStyles,
2303
+ fe as formatCssColorValue,
2304
+ Ln as formatCssEnumStyles,
2305
+ $n as formatCssLengthStyles,
2306
+ D as formatCssVariable,
2307
+ is as formatCssVariableStyles,
2308
+ Rn as formatLineHeightStyles,
2309
+ Nn as formatObjectStyleAttribute,
2310
+ Mn as formatOpacityStyles,
2311
+ F as formatSpacingSideValue,
2312
+ It as generatePublishedKey,
2313
+ ts as generatePublishedKeyForEmbedded,
2314
+ je as getCollectionIdForCollectionType,
2315
+ q as getColumnAttributes,
2316
+ Se as getComponentAttributesAndStyles,
2317
+ oe as getComponentsPluginFromPlugins,
2318
+ C as getCssVariableFromLeaf,
2319
+ Vn as getDefaultDimensionAttributes,
2320
+ M as getDeviceTypeBasedAttributes,
2321
+ Xo as getDragItemId,
2322
+ ht as getDragItemPrefixAndId,
2323
+ bt as getIdAndPrefix,
2324
+ jn as getMergedAttributes,
2325
+ Zo as getNameAndInstanceIdFromWidgetKey,
2326
+ Jo as getNameFromWidgetKey,
2327
+ Qn as getOverlayLayerZIndex,
2328
+ wt as getWidgetKeyForCollection,
2329
+ Qo as getWidgetKeyForCollectionWithPrefix,
2330
+ Ct as getWidgetKeyForPublishedCollection,
2331
+ es as getWidgetKeyForPublishedCollectionWithPrefix,
2332
+ An as hasBoxShadowLeaf,
2333
+ po as hasDeviceDivergentValues,
2334
+ E as hasInvalidCssVariable,
2335
+ Bn as hasItems,
2336
+ Jn as hasOverlayLayers,
2337
+ ns as incrementVersion,
2338
+ zt as isBackgroundImageValue,
2339
+ hn as isBorderStyleValue,
2340
+ bn as isBorderValue,
2341
+ vn as isBoxShadowValue,
2342
+ qt as isBoxSpacingValue,
2343
+ Vt as isCloudinaryCloudName,
2344
+ Ot as isCloudinaryPublicId,
2345
+ Bt as isCloudinaryTransformationString,
2346
+ pe as isCssColorValue,
2347
+ Jt as isCssEnumValue,
2348
+ ue as isCssVariableName,
2349
+ j as isDevClientToken,
2350
+ In as isLineHeightValue,
2351
+ Sn as isOpacityValue,
2352
+ to as isOverlayLayerEmptyForDevice,
2353
+ Un as isRowHiddenForDevice,
2354
+ jt as isSafeImageUrl,
2355
+ B as isSpacingSideValue,
2356
+ he as isWidgetHiddenForDevice,
2357
+ ln as justifyContentAllowlist,
2358
+ ge as normalizeCssClasses,
2359
+ ye as objectStyleAttributeRegistry,
2360
+ te as overflowAllowlist,
2361
+ Fe as phoneModeWidth,
2362
+ rn as pointerEventsAllowlist,
2363
+ Ze as prepareRuleCMSWidgetData,
2364
+ ke as resolveBaseZIndex,
2365
+ Me as resolveKey,
2366
+ eo as resolveOverlayLayerPointerEvents,
2367
+ Hn as resolveRowStyles,
2368
+ gt as resolveWidgetApiOrigin,
2369
+ He as resolveWidgetContainerStyles,
2370
+ so as resolveWidgetInstanceProps,
2371
+ us as resolveWidgetLibraries,
2372
+ Kn as rowBasedPropertiesAreAssigned,
2373
+ de as spacingKeywords,
2374
+ Gt as spacingLengthUnits,
2375
+ Ke as tabletModeWidth,
2376
+ nn as textAlignAllowlist,
2377
+ on as textDecorationAllowlist,
2378
+ sn as textTransformAllowlist,
2379
+ Ve as typeHasPrefix,
2380
+ co as warnUnmatchedComponentProps,
2381
+ Xn as widgetBasedPropertiesAreAssigned,
2382
+ _e as widgetDeclaresOwnHeight
2109
2383
  };