@rulecms/widget-vue 0.6.0 → 0.8.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.cjs +59 -14
- package/dist/index.d.ts +387 -25
- package/dist/index.js +1872 -963
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
const
|
|
6
|
-
function
|
|
7
|
-
return !(e != null && e.length) || e ===
|
|
8
|
-
}
|
|
9
|
-
const
|
|
10
|
-
function
|
|
1
|
+
var Yt = Object.defineProperty;
|
|
2
|
+
var Xt = (e, t, n) => t in e ? Yt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var We = (e, t, n) => Xt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { defineComponent as S, reactive as Jt, watch as st, provide as qt, renderSlot as Ie, computed as y, openBlock as f, createElementBlock as w, normalizeStyle as D, normalizeClass as ie, createBlock as v, resolveDynamicComponent as x, withCtx as P, createTextVNode as j, toDisplayString as M, createCommentVNode as T, Fragment as k, normalizeProps as ge, guardReactiveProps as Ve, mergeProps as Zt, resolveComponent as Qt, createVNode as R, renderList as G, createElementVNode as z, ref as H, onMounted as en, onBeforeUnmount as it, inject as tn, unref as F } from "vue";
|
|
5
|
+
const re = "default";
|
|
6
|
+
function rt(e, t) {
|
|
7
|
+
return !(e != null && e.length) || e === re ? t : `${e}/${t}`;
|
|
8
|
+
}
|
|
9
|
+
const nn = `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 Fe(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
|
|
17
|
-
if (
|
|
16
|
+
function on(e) {
|
|
17
|
+
if (Fe(e))
|
|
18
18
|
return e;
|
|
19
19
|
const t = e;
|
|
20
|
-
return
|
|
20
|
+
return Fe(t == null ? void 0 : t.default) ? t.default : null;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
return e.usesDefaultLibrary ? [
|
|
22
|
+
function be(e) {
|
|
23
|
+
return e.usesDefaultLibrary ? [re, ...e.libraryIds] : [...e.libraryIds];
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
if (t.usesDefaultLibrary && !(e != null && e[
|
|
27
|
-
throw new Error(
|
|
25
|
+
function Be({ registrations: e, referenced: t }) {
|
|
26
|
+
if (t.usesDefaultLibrary && !(e != null && e[re]))
|
|
27
|
+
throw new Error(nn);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function sn(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 ut(e) {
|
|
|
36
36
|
}
|
|
37
37
|
return t.length > 0 ? t : void 0;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function rn(e) {
|
|
40
40
|
const t = {};
|
|
41
41
|
for (const [o, s] of e) {
|
|
42
|
-
const i = o ===
|
|
43
|
-
for (const [
|
|
44
|
-
t[i ?
|
|
42
|
+
const i = o === re;
|
|
43
|
+
for (const [l, r] of Object.entries(s.components))
|
|
44
|
+
t[i ? l : `${o}/${l}`] = r;
|
|
45
45
|
}
|
|
46
|
-
const n =
|
|
46
|
+
const n = sn(e);
|
|
47
47
|
return n ? { components: t, stylesheets: n } : { components: t };
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function pe() {
|
|
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(
|
|
53
|
-
var
|
|
54
|
-
e.get(
|
|
55
|
-
`RuleCMS widget: component library registered as "${
|
|
56
|
-
), e.set(
|
|
52
|
+
function i(a, c) {
|
|
53
|
+
var p;
|
|
54
|
+
e.get(a) !== c && ((p = c.manifest) != null && p.id && c.manifest.id !== a && console.warn(
|
|
55
|
+
`RuleCMS widget: component library registered as "${a}" declares manifest id "${c.manifest.id}". The registered id wins for resolution.`
|
|
56
|
+
), e.set(a, c), s += 1);
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
61
|
-
return
|
|
62
|
-
const
|
|
63
|
-
for (const
|
|
64
|
-
const
|
|
65
|
-
|
|
58
|
+
function l(a) {
|
|
59
|
+
const c = be(a), p = [...c].sort().join("|"), m = o.get(p);
|
|
60
|
+
if (m && m.loadedVersion === s)
|
|
61
|
+
return m.plugin;
|
|
62
|
+
const d = /* @__PURE__ */ new Map();
|
|
63
|
+
for (const b of c) {
|
|
64
|
+
const C = e.get(b);
|
|
65
|
+
C && d.set(b, C);
|
|
66
66
|
}
|
|
67
|
-
const
|
|
68
|
-
return o.set(
|
|
67
|
+
const h = rn(d);
|
|
68
|
+
return o.set(p, { loadedVersion: s, plugin: h }), h;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
|
|
72
|
-
const { registrations:
|
|
73
|
-
for (const
|
|
74
|
-
if (e.has(
|
|
70
|
+
function r(a) {
|
|
71
|
+
Be(a);
|
|
72
|
+
const { registrations: c, referenced: p } = a;
|
|
73
|
+
for (const m of be(p)) {
|
|
74
|
+
if (e.has(m) || n.has(m))
|
|
75
75
|
continue;
|
|
76
|
-
const
|
|
77
|
-
if (!
|
|
76
|
+
const d = c == null ? void 0 : c[m];
|
|
77
|
+
if (!d) {
|
|
78
78
|
console.error(
|
|
79
|
-
`RuleCMS widget: no component library registered for libraryId "${
|
|
80
|
-
), n.set(
|
|
79
|
+
`RuleCMS widget: no component library registered for libraryId "${m}"; its components will not render.`
|
|
80
|
+
), n.set(m, new Error(`No registration for libraryId "${m}"`));
|
|
81
81
|
continue;
|
|
82
82
|
}
|
|
83
|
-
if (typeof
|
|
83
|
+
if (typeof d == "function")
|
|
84
84
|
return null;
|
|
85
|
-
i(
|
|
85
|
+
i(m, d);
|
|
86
86
|
}
|
|
87
|
-
return
|
|
87
|
+
return l(p);
|
|
88
88
|
}
|
|
89
|
-
async function
|
|
90
|
-
|
|
91
|
-
const { registrations:
|
|
89
|
+
async function u(a) {
|
|
90
|
+
Be(a);
|
|
91
|
+
const { registrations: c, referenced: p } = a, m = be(p);
|
|
92
92
|
return await Promise.all(
|
|
93
|
-
|
|
94
|
-
if (e.has(
|
|
93
|
+
m.map(async (d) => {
|
|
94
|
+
if (e.has(d) || n.has(d))
|
|
95
95
|
return;
|
|
96
|
-
const
|
|
97
|
-
if (!
|
|
96
|
+
const h = c == null ? void 0 : c[d];
|
|
97
|
+
if (!h) {
|
|
98
98
|
console.error(
|
|
99
|
-
`RuleCMS widget: no component library registered for libraryId "${
|
|
100
|
-
), n.set(
|
|
99
|
+
`RuleCMS widget: no component library registered for libraryId "${d}"; its components will not render.`
|
|
100
|
+
), n.set(d, new Error(`No registration for libraryId "${d}"`));
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
|
-
if (typeof
|
|
104
|
-
i(
|
|
103
|
+
if (typeof h != "function") {
|
|
104
|
+
i(d, h);
|
|
105
105
|
return;
|
|
106
106
|
}
|
|
107
|
-
let
|
|
108
|
-
|
|
109
|
-
const
|
|
110
|
-
if (!
|
|
107
|
+
let b = t.get(d);
|
|
108
|
+
b || (b = h().then((C) => {
|
|
109
|
+
const g = on(C);
|
|
110
|
+
if (!g)
|
|
111
111
|
throw new Error(
|
|
112
|
-
`Registration for libraryId "${
|
|
112
|
+
`Registration for libraryId "${d}" did not resolve to a ComponentLibraryModule (expected { manifest, components }).`
|
|
113
113
|
);
|
|
114
|
-
i(
|
|
115
|
-
}).catch((
|
|
116
|
-
n.set(
|
|
117
|
-
`RuleCMS widget: failed to load component library "${
|
|
118
|
-
|
|
114
|
+
i(d, g);
|
|
115
|
+
}).catch((C) => {
|
|
116
|
+
n.set(d, C), console.error(
|
|
117
|
+
`RuleCMS widget: failed to load component library "${d}":`,
|
|
118
|
+
C
|
|
119
119
|
);
|
|
120
120
|
}).finally(() => {
|
|
121
|
-
t.delete(
|
|
122
|
-
}), t.set(
|
|
121
|
+
t.delete(d);
|
|
122
|
+
}), t.set(d, b)), await b;
|
|
123
123
|
})
|
|
124
|
-
),
|
|
124
|
+
), l(p);
|
|
125
125
|
}
|
|
126
|
-
return { resolveSync:
|
|
126
|
+
return { resolveSync: r, resolve: u };
|
|
127
127
|
}
|
|
128
|
-
const
|
|
128
|
+
const Ke = {
|
|
129
129
|
Preview: "Preview",
|
|
130
130
|
Compose: "Compose",
|
|
131
131
|
RenderedPage: "RenderedPage"
|
|
132
|
-
},
|
|
132
|
+
}, Pe = {
|
|
133
133
|
DroppableBox: "droppable-box"
|
|
134
|
-
},
|
|
134
|
+
}, Ue = {
|
|
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
|
-
},
|
|
141
|
+
}, jr = {
|
|
142
142
|
FlexStart: "flex-start",
|
|
143
143
|
FlexEnd: "flex-end",
|
|
144
144
|
Center: "center",
|
|
@@ -146,49 +146,56 @@ const ls = {
|
|
|
146
146
|
SpaceAround: "space-around",
|
|
147
147
|
SpaceEvenly: "space-evenly",
|
|
148
148
|
Stretch: "stretch"
|
|
149
|
-
},
|
|
149
|
+
}, Ae = "cssAttrArray", Nr = {
|
|
150
150
|
Phone: "phone",
|
|
151
151
|
Tablet: "tablet",
|
|
152
152
|
Desktop: "desktop"
|
|
153
|
-
},
|
|
153
|
+
}, lt = {
|
|
154
154
|
ComposerComponent: "ComposerWidget",
|
|
155
155
|
Collection: "Collection",
|
|
156
156
|
MoveComponentHandle: "MoveWidgetHandle"
|
|
157
|
-
},
|
|
158
|
-
function
|
|
159
|
-
return typeof e == "string" && e.startsWith(
|
|
157
|
+
}, ct = `${lt.Collection}_`, ln = "dev.", cn = "https://rulecms.com", an = "https://widget-cache.rulecms.com", un = "/api/v1/c/widget/get", dn = "/api/v1/c/dev/widget/get", pn = "/api/v1/c/widget/resolve", fn = "/api/v1/c/dev/widget/resolve";
|
|
158
|
+
function K(e) {
|
|
159
|
+
return typeof e == "string" && e.startsWith(ln);
|
|
160
160
|
}
|
|
161
|
-
function
|
|
162
|
-
return t ? t.replace(/\/$/, "") :
|
|
161
|
+
function at(e, t) {
|
|
162
|
+
return t ? t.replace(/\/$/, "") : K(e) ? cn : an;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function ut({
|
|
165
165
|
publishedKey: e,
|
|
166
166
|
token: t,
|
|
167
167
|
endpoint: n
|
|
168
168
|
}) {
|
|
169
|
-
const o =
|
|
170
|
-
return `${
|
|
169
|
+
const o = K(t), s = o ? dn : un, i = o ? new URLSearchParams({ widgetKey: e, token: t }) : new URLSearchParams({ publishedKey: e, token: t });
|
|
170
|
+
return `${at(t, n)}${s}?${i.toString()}`;
|
|
171
|
+
}
|
|
172
|
+
function dt({
|
|
173
|
+
token: e,
|
|
174
|
+
endpoint: t
|
|
175
|
+
}) {
|
|
176
|
+
const n = K(e) ? fn : pn;
|
|
177
|
+
return `${at(e, t)}${n}`;
|
|
171
178
|
}
|
|
172
|
-
const
|
|
179
|
+
const Wr = ({ id: e, prefix: t }) => `${t}_${e}`, yn = (e) => {
|
|
173
180
|
if (!(e != null && e.length) || !e.includes("_")) {
|
|
174
181
|
console.error(`Invalid drag item id: ${e}. Type does not exist.`);
|
|
175
182
|
return;
|
|
176
183
|
}
|
|
177
|
-
return
|
|
178
|
-
},
|
|
184
|
+
return mn(e);
|
|
185
|
+
}, pt = (e) => e.includes("_"), mn = (e) => {
|
|
179
186
|
const t = e.indexOf("_"), n = e.substring(0, t), o = e.substring(t + 1);
|
|
180
187
|
return {
|
|
181
188
|
prefix: n,
|
|
182
189
|
id: o
|
|
183
190
|
};
|
|
184
|
-
},
|
|
185
|
-
if (!
|
|
191
|
+
}, ft = (e) => {
|
|
192
|
+
if (!pt(e))
|
|
186
193
|
return;
|
|
187
|
-
const n =
|
|
188
|
-
return (n == null ? void 0 : n.prefix) ===
|
|
194
|
+
const n = yn(e);
|
|
195
|
+
return (n == null ? void 0 : n.prefix) === lt.Collection || console.error(
|
|
189
196
|
"getCollectionIdForCollectionType - Invalid component type: ${componentType}. Invalid prefix type."
|
|
190
197
|
), n == null ? void 0 : n.id;
|
|
191
|
-
},
|
|
198
|
+
}, Vr = (e) => {
|
|
192
199
|
if (!(e != null && e.length)) {
|
|
193
200
|
console.error("getNameAndInstanceIdFromWidgetKey: Missing widget key");
|
|
194
201
|
return;
|
|
@@ -203,47 +210,47 @@ const us = ({ id: e, prefix: t }) => `${t}_${e}`, bt = (e) => {
|
|
|
203
210
|
return { name: n, instanceId: t[1] };
|
|
204
211
|
const s = t[1].split("@");
|
|
205
212
|
return { name: n, instanceId: s[0], parentId: s[1] };
|
|
206
|
-
},
|
|
213
|
+
}, Fr = (e) => {
|
|
207
214
|
if (!(e != null && e.length))
|
|
208
215
|
return { errorMessage: "getNameFromWidgetKey: Missing widget key" };
|
|
209
216
|
const t = e.split("$");
|
|
210
217
|
return t.length < 2 ? { errorMessage: "getNameFromWidgetKey: Invalid widget key format" } : { name: t[0] };
|
|
211
|
-
},
|
|
212
|
-
var s, i,
|
|
218
|
+
}, hn = (e) => {
|
|
219
|
+
var s, i, l, r;
|
|
213
220
|
if (!e)
|
|
214
221
|
return { error: "getWidgetKeyForCollection: Missing collection" };
|
|
215
222
|
if (!((s = e.name) != null && s.length))
|
|
216
223
|
return { error: "getWidgetKeyForCollection: Missing collection name" };
|
|
217
224
|
const t = (i = e.name) == null ? void 0 : i.trim().toLowerCase();
|
|
218
|
-
if (!((
|
|
225
|
+
if (!((l = e.id) != null && l.length))
|
|
219
226
|
return { error: "getWidgetKeyForCollection: Missing collection id" };
|
|
220
|
-
const o = ((
|
|
227
|
+
const o = ((r = e.parentId) == null ? void 0 : r.length) ? `${e.id}@${e.parentId}` : `${e.id}`;
|
|
221
228
|
return { data: `${t}$${o}` };
|
|
222
|
-
},
|
|
223
|
-
var s, i,
|
|
229
|
+
}, gn = (e) => {
|
|
230
|
+
var s, i, l, r;
|
|
224
231
|
if (!e)
|
|
225
232
|
return { error: "getWidgetKeyForPublishedCollection: Missing collection" };
|
|
226
233
|
if (!((s = e.name) != null && s.length))
|
|
227
234
|
return { error: "getWidgetKeyForPublishedCollection: Missing collection name" };
|
|
228
235
|
const t = (i = e.name) == null ? void 0 : i.trim().toLowerCase();
|
|
229
|
-
if (!((
|
|
236
|
+
if (!((l = e.publishedKey) != null && l.length))
|
|
230
237
|
return { error: "getWidgetKeyForPublishedCollection: Missing collection publishedKey" };
|
|
231
|
-
const o = ((
|
|
238
|
+
const o = ((r = e.parentId) == null ? void 0 : r.length) ? `${e.publishedKey}@${e.parentId}` : `${e.publishedKey}`;
|
|
232
239
|
return { data: `${t}$${o}` };
|
|
233
|
-
},
|
|
234
|
-
const t =
|
|
235
|
-
return `${
|
|
236
|
-
},
|
|
237
|
-
const t =
|
|
238
|
-
return `${
|
|
239
|
-
},
|
|
240
|
-
function
|
|
241
|
-
return `${e}${
|
|
242
|
-
}
|
|
243
|
-
function
|
|
244
|
-
return `${
|
|
245
|
-
}
|
|
246
|
-
function
|
|
240
|
+
}, Br = (e) => {
|
|
241
|
+
const t = hn(e);
|
|
242
|
+
return `${ct}${t.data}`;
|
|
243
|
+
}, Kr = (e) => {
|
|
244
|
+
const t = gn(e);
|
|
245
|
+
return `${ct}${t.data}`;
|
|
246
|
+
}, Ee = "---", bn = "___";
|
|
247
|
+
function Cn(e, t) {
|
|
248
|
+
return `${e}${Ee}${t}`;
|
|
249
|
+
}
|
|
250
|
+
function Ur(e, t, n) {
|
|
251
|
+
return `${Cn(e, t)}${bn}${n}`;
|
|
252
|
+
}
|
|
253
|
+
function zr(e) {
|
|
247
254
|
const t = e.split(".");
|
|
248
255
|
if (t.length !== 3)
|
|
249
256
|
throw new Error(`Invalid version format: ${e}. Expected format: x.y.z`);
|
|
@@ -252,19 +259,19 @@ function gs(e) {
|
|
|
252
259
|
throw new Error(`Invalid patch version: ${t[2]}. Expected a number.`);
|
|
253
260
|
return `${n}.${o}.${s + 1}`;
|
|
254
261
|
}
|
|
255
|
-
function
|
|
262
|
+
function De({
|
|
256
263
|
displayItemList: e,
|
|
257
264
|
widgetCollections: t
|
|
258
265
|
}) {
|
|
259
266
|
const n = /* @__PURE__ */ new Set();
|
|
260
267
|
let o = !1;
|
|
261
268
|
const s = (i) => {
|
|
262
|
-
var r, u
|
|
263
|
-
if ((
|
|
264
|
-
for (const
|
|
265
|
-
if ((
|
|
266
|
-
for (const
|
|
267
|
-
|
|
269
|
+
var l, r, u;
|
|
270
|
+
if ((l = i == null ? void 0 : i.rows) != null && l.length) {
|
|
271
|
+
for (const a of i.rows)
|
|
272
|
+
if ((r = a == null ? void 0 : a.columns) != null && r.length)
|
|
273
|
+
for (const c of a.columns)
|
|
274
|
+
c.collection && s(c.collection.collectionRows), !(!c.type || c.type === Pe.DroppableBox) && (pt(c.type) || (!((u = c.libraryId) != null && u.length) || c.libraryId === re ? o = !0 : n.add(c.libraryId)));
|
|
268
275
|
}
|
|
269
276
|
};
|
|
270
277
|
s(e);
|
|
@@ -272,16 +279,16 @@ function ae({
|
|
|
272
279
|
s(i == null ? void 0 : i.collectionRows);
|
|
273
280
|
return { libraryIds: Array.from(n), usesDefaultLibrary: o };
|
|
274
281
|
}
|
|
275
|
-
const
|
|
276
|
-
function
|
|
282
|
+
const yt = Symbol("rulecms-widget-context");
|
|
283
|
+
function wn() {
|
|
277
284
|
return {
|
|
278
285
|
token: "",
|
|
279
286
|
endpoint: void 0,
|
|
280
287
|
libraries: void 0,
|
|
281
|
-
libraryRegistry:
|
|
288
|
+
libraryRegistry: pe()
|
|
282
289
|
};
|
|
283
290
|
}
|
|
284
|
-
const
|
|
291
|
+
const Hr = /* @__PURE__ */ S({
|
|
285
292
|
__name: "RuleCMSWidgetProvider",
|
|
286
293
|
props: {
|
|
287
294
|
token: {},
|
|
@@ -289,97 +296,97 @@ const hs = /* @__PURE__ */ D({
|
|
|
289
296
|
libraries: {}
|
|
290
297
|
},
|
|
291
298
|
setup(e) {
|
|
292
|
-
const t = e, n =
|
|
293
|
-
return
|
|
299
|
+
const t = e, n = Jt(wn());
|
|
300
|
+
return st(
|
|
294
301
|
() => [t.token, t.endpoint, t.libraries],
|
|
295
302
|
() => {
|
|
296
303
|
n.token = t.token, n.endpoint = t.endpoint, n.libraries = t.libraries;
|
|
297
304
|
},
|
|
298
305
|
{ immediate: !0 }
|
|
299
|
-
),
|
|
306
|
+
), qt(yt, n), (o, s) => Ie(o.$slots, "default");
|
|
300
307
|
}
|
|
301
|
-
}),
|
|
308
|
+
}), vn = "1200px", mt = "500px", ht = "820px", Gr = vn, An = "rulecms", En = 1920, Sn = {
|
|
302
309
|
f: "auto",
|
|
303
310
|
q: "auto",
|
|
304
311
|
c: "limit"
|
|
305
|
-
},
|
|
312
|
+
}, kn = /^[A-Za-z0-9][A-Za-z0-9._\-/]*$/, Tn = 300, In = /^[A-Za-z0-9][A-Za-z0-9_-]*$/, Pn = 100, Dn = /^https:\/\/[^\s"'()\\<>]+$/, xn = 2e3, $n = /^[A-Za-z0-9_,.:\-/]*$/, Ln = 300, Rn = (e) => typeof e == "string" && e.length <= Tn && kn.test(e), _n = (e) => typeof e == "string" && e.length <= Pn && In.test(e), On = (e) => typeof e == "string" && e.length <= xn && Dn.test(e), Mn = (e) => typeof e == "string" && e.length <= Ln && $n.test(e), jn = (e) => Object.entries(e).map(([t, n]) => `${t}_${n}`).join(","), Nn = (e) => {
|
|
306
313
|
const t = {};
|
|
307
314
|
for (const n of e.split(",")) {
|
|
308
315
|
const o = n.trim(), s = o.indexOf("_");
|
|
309
316
|
s <= 0 || (t[o.slice(0, s)] = o.slice(s + 1));
|
|
310
317
|
}
|
|
311
318
|
return t;
|
|
312
|
-
},
|
|
319
|
+
}, Wn = ({
|
|
313
320
|
publicId: e,
|
|
314
|
-
cloudName: t =
|
|
321
|
+
cloudName: t = An,
|
|
315
322
|
transformations: n,
|
|
316
|
-
width: o =
|
|
323
|
+
width: o = En
|
|
317
324
|
}) => {
|
|
318
|
-
const s = typeof n == "string" ?
|
|
319
|
-
...
|
|
325
|
+
const s = typeof n == "string" ? Nn(n) : n, i = {
|
|
326
|
+
...Sn,
|
|
320
327
|
...s,
|
|
321
328
|
w: o
|
|
322
329
|
};
|
|
323
330
|
return encodeURI(
|
|
324
|
-
`https://res.cloudinary.com/${t}/image/upload/${
|
|
331
|
+
`https://res.cloudinary.com/${t}/image/upload/${jn(i)}/${e}`
|
|
325
332
|
);
|
|
326
|
-
},
|
|
333
|
+
}, Vn = /^--[A-Za-z0-9_-]+$/, Fn = 200, Q = (e) => {
|
|
327
334
|
if (typeof e != "string")
|
|
328
335
|
return !1;
|
|
329
336
|
const t = e.trim();
|
|
330
|
-
return t.length <=
|
|
331
|
-
},
|
|
337
|
+
return t.length <= Fn && Vn.test(t);
|
|
338
|
+
}, W = (e) => `var(${e.trim()})`, E = (e) => {
|
|
332
339
|
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
333
340
|
return;
|
|
334
341
|
const t = e.cssVariable;
|
|
335
342
|
if (t != null)
|
|
336
|
-
return
|
|
337
|
-
},
|
|
343
|
+
return Q(t) ? t.trim() : void 0;
|
|
344
|
+
}, B = (e) => {
|
|
338
345
|
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
339
346
|
return !1;
|
|
340
347
|
const t = e.cssVariable;
|
|
341
|
-
return t == null ? !1 : !
|
|
342
|
-
},
|
|
343
|
-
const n =
|
|
344
|
-
return n ? { [t]:
|
|
345
|
-
},
|
|
346
|
-
if (typeof e != "object" || e === null || Array.isArray(e) ||
|
|
348
|
+
return t == null ? !1 : !Q(t);
|
|
349
|
+
}, Yr = (e, t) => {
|
|
350
|
+
const n = E(e);
|
|
351
|
+
return n ? { [t]: W(n) } : void 0;
|
|
352
|
+
}, Bn = (e) => {
|
|
353
|
+
if (typeof e != "object" || e === null || Array.isArray(e) || B(e))
|
|
347
354
|
return !1;
|
|
348
|
-
if (
|
|
355
|
+
if (E(e))
|
|
349
356
|
return !0;
|
|
350
357
|
const t = e;
|
|
351
|
-
return t.source === "none" ? !0 : t.source === "url" ?
|
|
352
|
-
},
|
|
358
|
+
return t.source === "none" ? !0 : t.source === "url" ? On(t.url) : t.source === "cloudinary" ? !Rn(t.publicId) || t.cloudName !== void 0 && t.cloudName !== null && !_n(t.cloudName) ? !1 : t.transformations === void 0 || t.transformations === null || Mn(t.transformations) : !1;
|
|
359
|
+
}, Kn = ["px", "%", "em", "rem", "vh", "vw"], xe = ["inherit", "unset"], Un = ["allSides", "top", "right", "bottom", "left"], q = (e, t = {}) => {
|
|
353
360
|
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
354
361
|
return !1;
|
|
355
362
|
const n = e;
|
|
356
|
-
return
|
|
357
|
-
},
|
|
363
|
+
return B(e) ? !1 : E(e) ? !0 : n.unit === "auto" ? t.allowAuto !== !1 : n.unit === "keyword" ? t.allowKeywords !== !1 && xe.includes(n.keyword) : Kn.includes(n.unit) ? typeof n.value != "number" || !Number.isFinite(n.value) ? !1 : t.allowNegative !== !1 || n.value >= 0 : !1;
|
|
364
|
+
}, zn = (e, t = {}) => {
|
|
358
365
|
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
359
366
|
return !1;
|
|
360
367
|
const n = e;
|
|
361
|
-
for (const o of
|
|
368
|
+
for (const o of Un) {
|
|
362
369
|
const s = n[o];
|
|
363
|
-
if (s != null && !
|
|
370
|
+
if (s != null && !q(s, t))
|
|
364
371
|
return !1;
|
|
365
372
|
}
|
|
366
373
|
return !0;
|
|
367
|
-
},
|
|
374
|
+
}, Hn = [...xe, "transparent", "currentColor"], Gn = /^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\([^)]+\)|hsla?\([^)]+\))$/, $e = (e) => {
|
|
368
375
|
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
369
376
|
return !1;
|
|
370
377
|
const t = e;
|
|
371
|
-
return
|
|
372
|
-
},
|
|
373
|
-
const t =
|
|
374
|
-
return t ?
|
|
375
|
-
},
|
|
378
|
+
return B(e) ? !1 : E(e) ? !0 : t.unit === "keyword" ? Hn.includes(t.keyword) : t.unit === "color" ? typeof t.value == "string" && Gn.test(t.value.trim()) : !1;
|
|
379
|
+
}, Le = (e) => {
|
|
380
|
+
const t = E(e);
|
|
381
|
+
return t ? W(t) : "unit" in e ? e.unit === "keyword" ? e.keyword : e.value.trim() : "";
|
|
382
|
+
}, Yn = (e, t) => typeof e == "object" && e !== null && !Array.isArray(e) ? !B(e) && !!E(e) : typeof e != "string" || !e.length ? !1 : t.includes(e) ? !0 : xe.includes(e), Xn = [
|
|
376
383
|
'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
|
|
377
384
|
'Georgia, "Times New Roman", Times, serif',
|
|
378
385
|
"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",
|
|
379
386
|
"Arial, Helvetica, sans-serif",
|
|
380
387
|
'"Helvetica Neue", Helvetica, Arial, sans-serif',
|
|
381
388
|
"Verdana, Geneva, sans-serif"
|
|
382
|
-
],
|
|
389
|
+
], Jn = [
|
|
383
390
|
"normal",
|
|
384
391
|
"bold",
|
|
385
392
|
"100",
|
|
@@ -391,43 +398,43 @@ const hs = /* @__PURE__ */ D({
|
|
|
391
398
|
"700",
|
|
392
399
|
"800",
|
|
393
400
|
"900"
|
|
394
|
-
],
|
|
401
|
+
], qn = ["normal", "italic", "oblique"], Zn = [
|
|
395
402
|
"left",
|
|
396
403
|
"center",
|
|
397
404
|
"right",
|
|
398
405
|
"justify",
|
|
399
406
|
"start",
|
|
400
407
|
"end"
|
|
401
|
-
],
|
|
408
|
+
], Qn = [
|
|
402
409
|
"none",
|
|
403
410
|
"underline",
|
|
404
411
|
"line-through",
|
|
405
412
|
"overline"
|
|
406
|
-
],
|
|
413
|
+
], eo = [
|
|
407
414
|
"none",
|
|
408
415
|
"uppercase",
|
|
409
416
|
"lowercase",
|
|
410
417
|
"capitalize"
|
|
411
|
-
],
|
|
418
|
+
], Ce = [
|
|
412
419
|
"visible",
|
|
413
420
|
"hidden",
|
|
414
421
|
"scroll",
|
|
415
422
|
"auto",
|
|
416
423
|
"clip"
|
|
417
|
-
],
|
|
424
|
+
], to = ["auto", "none"], no = [
|
|
418
425
|
"flex-start",
|
|
419
426
|
"flex-end",
|
|
420
427
|
"center",
|
|
421
428
|
"space-between",
|
|
422
429
|
"space-around",
|
|
423
430
|
"space-evenly"
|
|
424
|
-
],
|
|
431
|
+
], oo = [
|
|
425
432
|
"flex-start",
|
|
426
433
|
"flex-end",
|
|
427
434
|
"center",
|
|
428
435
|
"baseline",
|
|
429
436
|
"stretch"
|
|
430
|
-
],
|
|
437
|
+
], so = ["wrap", "nowrap"], io = [
|
|
431
438
|
"flex-start",
|
|
432
439
|
"flex-end",
|
|
433
440
|
"center",
|
|
@@ -435,12 +442,12 @@ const hs = /* @__PURE__ */ D({
|
|
|
435
442
|
"space-around",
|
|
436
443
|
"space-evenly",
|
|
437
444
|
"stretch"
|
|
438
|
-
],
|
|
445
|
+
], ro = [
|
|
439
446
|
"row",
|
|
440
447
|
"row-reverse",
|
|
441
448
|
"column",
|
|
442
449
|
"column-reverse"
|
|
443
|
-
],
|
|
450
|
+
], lo = ["cover", "contain", "auto"], co = [
|
|
444
451
|
"center center",
|
|
445
452
|
"center top",
|
|
446
453
|
"center bottom",
|
|
@@ -450,20 +457,20 @@ const hs = /* @__PURE__ */ D({
|
|
|
450
457
|
"right center",
|
|
451
458
|
"right top",
|
|
452
459
|
"right bottom"
|
|
453
|
-
],
|
|
460
|
+
], ao = [
|
|
454
461
|
"no-repeat",
|
|
455
462
|
"repeat",
|
|
456
463
|
"repeat-x",
|
|
457
464
|
"repeat-y",
|
|
458
465
|
"space",
|
|
459
466
|
"round"
|
|
460
|
-
],
|
|
467
|
+
], uo = [
|
|
461
468
|
"justifyContent",
|
|
462
469
|
"alignItems",
|
|
463
470
|
"flexWrap",
|
|
464
471
|
"alignContent",
|
|
465
472
|
"flexDirection"
|
|
466
|
-
],
|
|
473
|
+
], po = [
|
|
467
474
|
"none",
|
|
468
475
|
"solid",
|
|
469
476
|
"dashed",
|
|
@@ -473,107 +480,107 @@ const hs = /* @__PURE__ */ D({
|
|
|
473
480
|
"ridge",
|
|
474
481
|
"inset",
|
|
475
482
|
"outset"
|
|
476
|
-
],
|
|
483
|
+
], fo = (e) => typeof e == "object" && e !== null && !Array.isArray(e) ? !B(e) && !!E(e) : po.includes(e), yo = (e) => {
|
|
477
484
|
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
478
485
|
return !1;
|
|
479
486
|
const t = e;
|
|
480
|
-
return
|
|
481
|
-
},
|
|
487
|
+
return B(e) ? !1 : E(e) ? !0 : !(t.width !== void 0 && t.width !== null && !q(t.width, { allowAuto: !1, allowNegative: !1 }) || t.style !== void 0 && t.style !== null && !fo(t.style) || t.color !== void 0 && t.color !== null && !$e(t.color));
|
|
488
|
+
}, mo = {
|
|
482
489
|
allowAuto: !1,
|
|
483
490
|
allowKeywords: !1,
|
|
484
491
|
allowNegative: !0
|
|
485
|
-
},
|
|
492
|
+
}, ho = {
|
|
486
493
|
allowAuto: !1,
|
|
487
494
|
allowKeywords: !1,
|
|
488
495
|
allowNegative: !1
|
|
489
|
-
},
|
|
496
|
+
}, go = (e) => {
|
|
490
497
|
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
491
498
|
return !1;
|
|
492
499
|
const t = e;
|
|
493
|
-
if (
|
|
500
|
+
if (B(e))
|
|
494
501
|
return !1;
|
|
495
|
-
if (
|
|
502
|
+
if (E(e))
|
|
496
503
|
return !0;
|
|
497
504
|
for (const n of ["offsetX", "offsetY", "spread"]) {
|
|
498
505
|
const o = t[n];
|
|
499
|
-
if (o != null && !
|
|
506
|
+
if (o != null && !q(o, mo))
|
|
500
507
|
return !1;
|
|
501
508
|
}
|
|
502
|
-
return !(t.blur !== void 0 && t.blur !== null && !
|
|
503
|
-
},
|
|
509
|
+
return !(t.blur !== void 0 && t.blur !== null && !q(t.blur, ho) || t.color !== void 0 && t.color !== null && !$e(t.color) || t.inset !== void 0 && t.inset !== null && typeof t.inset != "boolean");
|
|
510
|
+
}, bo = (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, Co = (e) => {
|
|
504
511
|
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
505
512
|
return !1;
|
|
506
513
|
const t = e;
|
|
507
|
-
return
|
|
508
|
-
},
|
|
509
|
-
if (!
|
|
514
|
+
return B(e) ? !1 : E(e) ? !0 : t.unit === "number" ? typeof t.value == "number" && Number.isFinite(t.value) && t.value > 0 : q(e, { allowAuto: !1, allowNegative: !1 });
|
|
515
|
+
}, wo = (e) => typeof e == "object" && e !== null && !Array.isArray(e) ? !B(e) && !!E(e) : typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= 1, vo = (e) => {
|
|
516
|
+
if (!Bn(e))
|
|
510
517
|
return {};
|
|
511
|
-
const t =
|
|
518
|
+
const t = E(e);
|
|
512
519
|
if (t)
|
|
513
|
-
return { backgroundImage:
|
|
520
|
+
return { backgroundImage: W(t) };
|
|
514
521
|
const n = e;
|
|
515
522
|
return n.source === "none" ? { backgroundImage: "none" } : n.source === "url" ? { backgroundImage: `url("${n.url}")` } : {
|
|
516
|
-
backgroundImage: `url("${
|
|
523
|
+
backgroundImage: `url("${Wn({
|
|
517
524
|
publicId: n.publicId,
|
|
518
525
|
cloudName: n.cloudName,
|
|
519
526
|
transformations: n.transformations
|
|
520
527
|
})}")`
|
|
521
528
|
};
|
|
522
|
-
},
|
|
523
|
-
const t =
|
|
524
|
-
return t ?
|
|
525
|
-
},
|
|
526
|
-
if (!
|
|
529
|
+
}, Z = (e) => {
|
|
530
|
+
const t = E(e);
|
|
531
|
+
return t ? W(t) : "unit" in e ? e.unit === "auto" ? "auto" : e.unit === "keyword" ? e.keyword : `${e.value}${e.unit}` : "";
|
|
532
|
+
}, Ao = (e) => {
|
|
533
|
+
if (!yo(e))
|
|
527
534
|
return {};
|
|
528
|
-
const t =
|
|
535
|
+
const t = E(e);
|
|
529
536
|
if (t)
|
|
530
|
-
return { border:
|
|
537
|
+
return { border: W(t) };
|
|
531
538
|
const n = {};
|
|
532
|
-
if (e.width && (n.borderWidth =
|
|
533
|
-
const o =
|
|
534
|
-
n.borderStyle = o ?
|
|
539
|
+
if (e.width && (n.borderWidth = Z(e.width)), e.style) {
|
|
540
|
+
const o = E(e.style);
|
|
541
|
+
n.borderStyle = o ? W(o) : e.style;
|
|
535
542
|
}
|
|
536
|
-
return e.color && (n.borderColor =
|
|
537
|
-
},
|
|
538
|
-
if (!
|
|
543
|
+
return e.color && (n.borderColor = Le(e.color)), n;
|
|
544
|
+
}, ce = (e) => e ? Z(e) : "0px", Eo = (e) => {
|
|
545
|
+
if (!go(e) || !bo(e))
|
|
539
546
|
return {};
|
|
540
|
-
const t =
|
|
547
|
+
const t = E(e);
|
|
541
548
|
if (t)
|
|
542
|
-
return { boxShadow:
|
|
549
|
+
return { boxShadow: W(t) };
|
|
543
550
|
const n = [
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
551
|
+
ce(e.offsetX),
|
|
552
|
+
ce(e.offsetY),
|
|
553
|
+
ce(e.blur),
|
|
554
|
+
ce(e.spread)
|
|
548
555
|
];
|
|
549
|
-
return e.color && n.push(
|
|
550
|
-
},
|
|
551
|
-
if (!
|
|
556
|
+
return e.color && n.push(Le(e.color)), e.inset && n.unshift("inset"), { boxShadow: n.join(" ") };
|
|
557
|
+
}, So = (e) => `${e.charAt(0).toUpperCase()}${e.slice(1)}`, ko = (e, t) => {
|
|
558
|
+
if (!zn(e))
|
|
552
559
|
return {};
|
|
553
560
|
if (e.allSides)
|
|
554
|
-
return { [t]:
|
|
561
|
+
return { [t]: Z(e.allSides) };
|
|
555
562
|
const n = {};
|
|
556
563
|
for (const o of ["top", "right", "bottom", "left"]) {
|
|
557
564
|
const s = e[o];
|
|
558
|
-
s && (n[`${t}${
|
|
565
|
+
s && (n[`${t}${So(o)}`] = Z(s));
|
|
559
566
|
}
|
|
560
567
|
return n;
|
|
561
|
-
},
|
|
562
|
-
if (!
|
|
568
|
+
}, To = (e, t) => $e(e) ? { [t]: Le(e) } : {}, Io = (e, t, n) => {
|
|
569
|
+
if (!Yn(e, n))
|
|
563
570
|
return {};
|
|
564
|
-
const o =
|
|
565
|
-
return o ? { [t]:
|
|
566
|
-
},
|
|
567
|
-
if (!
|
|
571
|
+
const o = E(e);
|
|
572
|
+
return o ? { [t]: W(o) } : { [t]: e };
|
|
573
|
+
}, Po = (e, t, n = {}) => q(e, n) ? { [t]: Z(e) } : {}, Do = (e) => {
|
|
574
|
+
if (!Co(e))
|
|
568
575
|
return {};
|
|
569
|
-
const t =
|
|
570
|
-
return t ? { lineHeight:
|
|
571
|
-
},
|
|
572
|
-
if (!
|
|
576
|
+
const t = E(e);
|
|
577
|
+
return t ? { lineHeight: W(t) } : "unit" in e && e.unit === "number" ? { lineHeight: e.value } : { lineHeight: Z(e) };
|
|
578
|
+
}, xo = (e) => {
|
|
579
|
+
if (!wo(e))
|
|
573
580
|
return {};
|
|
574
|
-
const t =
|
|
575
|
-
return t ? { opacity:
|
|
576
|
-
},
|
|
581
|
+
const t = E(e);
|
|
582
|
+
return t ? { opacity: W(t) } : { opacity: e };
|
|
583
|
+
}, Re = {
|
|
577
584
|
// Box spacing (4-sided)
|
|
578
585
|
"margin-3-resolutions": { kind: "boxSpacing", cssProperty: "margin" },
|
|
579
586
|
"padding-3-resolutions": { kind: "boxSpacing", cssProperty: "padding" },
|
|
@@ -627,44 +634,44 @@ const hs = /* @__PURE__ */ D({
|
|
|
627
634
|
"justify-content-3-resolutions": {
|
|
628
635
|
kind: "enum",
|
|
629
636
|
cssProperty: "justifyContent",
|
|
630
|
-
allowedValues:
|
|
637
|
+
allowedValues: no
|
|
631
638
|
},
|
|
632
639
|
"align-items-3-resolutions": {
|
|
633
640
|
kind: "enum",
|
|
634
641
|
cssProperty: "alignItems",
|
|
635
|
-
allowedValues:
|
|
642
|
+
allowedValues: oo
|
|
636
643
|
},
|
|
637
644
|
"flex-wrap-3-resolutions": {
|
|
638
645
|
kind: "enum",
|
|
639
646
|
cssProperty: "flexWrap",
|
|
640
|
-
allowedValues:
|
|
647
|
+
allowedValues: so
|
|
641
648
|
},
|
|
642
649
|
"align-content-3-resolutions": {
|
|
643
650
|
kind: "enum",
|
|
644
651
|
cssProperty: "alignContent",
|
|
645
|
-
allowedValues:
|
|
652
|
+
allowedValues: io
|
|
646
653
|
},
|
|
647
654
|
"flex-direction-3-resolutions": {
|
|
648
655
|
kind: "enum",
|
|
649
656
|
cssProperty: "flexDirection",
|
|
650
|
-
allowedValues:
|
|
657
|
+
allowedValues: ro
|
|
651
658
|
},
|
|
652
659
|
// Overflow — shorthand and longhands are independent attributes; when
|
|
653
660
|
// both are set, the browser's cascade decides the effective overflow.
|
|
654
661
|
"overflow-3-resolutions": {
|
|
655
662
|
kind: "enum",
|
|
656
663
|
cssProperty: "overflow",
|
|
657
|
-
allowedValues:
|
|
664
|
+
allowedValues: Ce
|
|
658
665
|
},
|
|
659
666
|
"overflow-x-3-resolutions": {
|
|
660
667
|
kind: "enum",
|
|
661
668
|
cssProperty: "overflowX",
|
|
662
|
-
allowedValues:
|
|
669
|
+
allowedValues: Ce
|
|
663
670
|
},
|
|
664
671
|
"overflow-y-3-resolutions": {
|
|
665
672
|
kind: "enum",
|
|
666
673
|
cssProperty: "overflowY",
|
|
667
|
-
allowedValues:
|
|
674
|
+
allowedValues: Ce
|
|
668
675
|
},
|
|
669
676
|
// Color
|
|
670
677
|
// Pointer input. On an overlay layer this is lifted onto the absolutely
|
|
@@ -672,7 +679,7 @@ const hs = /* @__PURE__ */ D({
|
|
|
672
679
|
"pointer-events-3-resolutions": {
|
|
673
680
|
kind: "enum",
|
|
674
681
|
cssProperty: "pointerEvents",
|
|
675
|
-
allowedValues:
|
|
682
|
+
allowedValues: to
|
|
676
683
|
},
|
|
677
684
|
"background-color-3-resolutions": { kind: "color", cssProperty: "backgroundColor" },
|
|
678
685
|
"color-3-resolutions": { kind: "color", cssProperty: "color" },
|
|
@@ -683,17 +690,17 @@ const hs = /* @__PURE__ */ D({
|
|
|
683
690
|
"background-size-3-resolutions": {
|
|
684
691
|
kind: "enum",
|
|
685
692
|
cssProperty: "backgroundSize",
|
|
686
|
-
allowedValues:
|
|
693
|
+
allowedValues: lo
|
|
687
694
|
},
|
|
688
695
|
"background-position-3-resolutions": {
|
|
689
696
|
kind: "enum",
|
|
690
697
|
cssProperty: "backgroundPosition",
|
|
691
|
-
allowedValues:
|
|
698
|
+
allowedValues: co
|
|
692
699
|
},
|
|
693
700
|
"background-repeat-3-resolutions": {
|
|
694
701
|
kind: "enum",
|
|
695
702
|
cssProperty: "backgroundRepeat",
|
|
696
|
-
allowedValues:
|
|
703
|
+
allowedValues: ao
|
|
697
704
|
},
|
|
698
705
|
// Opacity (0–1 number)
|
|
699
706
|
"opacity-3-resolutions": { kind: "opacity" },
|
|
@@ -701,7 +708,7 @@ const hs = /* @__PURE__ */ D({
|
|
|
701
708
|
"font-family-3-resolutions": {
|
|
702
709
|
kind: "enum",
|
|
703
710
|
cssProperty: "fontFamily",
|
|
704
|
-
allowedValues:
|
|
711
|
+
allowedValues: Xn
|
|
705
712
|
},
|
|
706
713
|
"font-size-3-resolutions": {
|
|
707
714
|
kind: "length",
|
|
@@ -711,12 +718,12 @@ const hs = /* @__PURE__ */ D({
|
|
|
711
718
|
"font-weight-3-resolutions": {
|
|
712
719
|
kind: "enum",
|
|
713
720
|
cssProperty: "fontWeight",
|
|
714
|
-
allowedValues:
|
|
721
|
+
allowedValues: Jn
|
|
715
722
|
},
|
|
716
723
|
"font-style-3-resolutions": {
|
|
717
724
|
kind: "enum",
|
|
718
725
|
cssProperty: "fontStyle",
|
|
719
|
-
allowedValues:
|
|
726
|
+
allowedValues: qn
|
|
720
727
|
},
|
|
721
728
|
"line-height-3-resolutions": { kind: "lineHeight" },
|
|
722
729
|
"letter-spacing-3-resolutions": {
|
|
@@ -727,68 +734,68 @@ const hs = /* @__PURE__ */ D({
|
|
|
727
734
|
"text-align-3-resolutions": {
|
|
728
735
|
kind: "enum",
|
|
729
736
|
cssProperty: "textAlign",
|
|
730
|
-
allowedValues:
|
|
737
|
+
allowedValues: Zn
|
|
731
738
|
},
|
|
732
739
|
"text-decoration-3-resolutions": {
|
|
733
740
|
kind: "enum",
|
|
734
741
|
cssProperty: "textDecoration",
|
|
735
|
-
allowedValues:
|
|
742
|
+
allowedValues: Qn
|
|
736
743
|
},
|
|
737
744
|
"text-transform-3-resolutions": {
|
|
738
745
|
kind: "enum",
|
|
739
746
|
cssProperty: "textTransform",
|
|
740
|
-
allowedValues:
|
|
747
|
+
allowedValues: eo
|
|
741
748
|
}
|
|
742
|
-
},
|
|
743
|
-
const n =
|
|
749
|
+
}, $o = (e, t) => {
|
|
750
|
+
const n = Re[e];
|
|
744
751
|
if (!n)
|
|
745
752
|
return {};
|
|
746
753
|
switch (n.kind) {
|
|
747
754
|
case "boxSpacing":
|
|
748
|
-
return
|
|
755
|
+
return ko(t, n.cssProperty);
|
|
749
756
|
case "length":
|
|
750
|
-
return
|
|
757
|
+
return Po(t, n.cssProperty, n.capabilities);
|
|
751
758
|
case "border":
|
|
752
|
-
return
|
|
759
|
+
return Ao(t);
|
|
753
760
|
case "boxShadow":
|
|
754
|
-
return
|
|
761
|
+
return Eo(t);
|
|
755
762
|
case "color":
|
|
756
|
-
return
|
|
763
|
+
return To(t, n.cssProperty);
|
|
757
764
|
case "opacity":
|
|
758
|
-
return
|
|
765
|
+
return xo(t);
|
|
759
766
|
case "enum":
|
|
760
|
-
return
|
|
767
|
+
return Io(t, n.cssProperty, n.allowedValues);
|
|
761
768
|
case "lineHeight":
|
|
762
|
-
return
|
|
769
|
+
return Do(t);
|
|
763
770
|
case "backgroundImage":
|
|
764
|
-
return
|
|
771
|
+
return vo(t);
|
|
765
772
|
default:
|
|
766
773
|
return {};
|
|
767
774
|
}
|
|
768
|
-
},
|
|
769
|
-
Object.entries(
|
|
775
|
+
}, Xr = Object.fromEntries(
|
|
776
|
+
Object.entries(Re).filter(([, e]) => e.kind === "boxSpacing").map(([e, t]) => [
|
|
770
777
|
e,
|
|
771
778
|
t.cssProperty
|
|
772
779
|
])
|
|
773
|
-
),
|
|
774
|
-
(n) =>
|
|
775
|
-
) || e.display === "flex" ? e : { ...e, display: "flex" } : {},
|
|
780
|
+
), Lo = (e) => e != null && e !== "", Ro = (e) => e ? !uo.some(
|
|
781
|
+
(n) => Lo(e[n])
|
|
782
|
+
) || e.display === "flex" ? e : { ...e, display: "flex" } : {}, _o = ({
|
|
776
783
|
dbEntryType: e,
|
|
777
784
|
libraryId: t,
|
|
778
785
|
sourceComponentsPlugin: n
|
|
779
786
|
}) => {
|
|
780
787
|
if (!(e != null && e.length))
|
|
781
788
|
return;
|
|
782
|
-
const o = n.components[
|
|
789
|
+
const o = n.components[rt(t, e)];
|
|
783
790
|
if (!o || !("defaultAttributeValues" in o))
|
|
784
791
|
return;
|
|
785
792
|
const i = o.defaultAttributeValues;
|
|
786
793
|
if (i != null && i.length)
|
|
787
|
-
return i.reduce((
|
|
788
|
-
...
|
|
789
|
-
[
|
|
794
|
+
return i.reduce((l, r) => ({
|
|
795
|
+
...l,
|
|
796
|
+
[r.name]: r.defaultValues
|
|
790
797
|
}), {});
|
|
791
|
-
},
|
|
798
|
+
}, U = ({
|
|
792
799
|
deviceDisplayType: e,
|
|
793
800
|
componentAttributes: t
|
|
794
801
|
}) => {
|
|
@@ -800,8 +807,8 @@ const hs = /* @__PURE__ */ D({
|
|
|
800
807
|
)) {
|
|
801
808
|
if (!s.includes("3-resolutions") || !i)
|
|
802
809
|
continue;
|
|
803
|
-
const
|
|
804
|
-
o[s] =
|
|
810
|
+
const l = i.all, r = l ?? i[e.toLowerCase()];
|
|
811
|
+
o[s] = r, Re[s] && Object.assign(n, $o(s, r));
|
|
805
812
|
}
|
|
806
813
|
return Object.keys(n).length || Object.keys(o).length ? {
|
|
807
814
|
styles: Object.keys(n).length ? n : void 0,
|
|
@@ -809,86 +816,94 @@ const hs = /* @__PURE__ */ D({
|
|
|
809
816
|
o
|
|
810
817
|
).length ? o : void 0
|
|
811
818
|
} : void 0;
|
|
812
|
-
},
|
|
819
|
+
}, Oo = ({
|
|
813
820
|
defaultAttributes: e,
|
|
814
821
|
userModifiedAttributes: t
|
|
815
822
|
}) => e ? t ? { ...e, ...t } : e : t;
|
|
816
|
-
function
|
|
823
|
+
function ue(e) {
|
|
817
824
|
return e.componentAttributes ?? e.widgetAttributes;
|
|
818
825
|
}
|
|
819
|
-
function
|
|
826
|
+
function ze({
|
|
820
827
|
col: e,
|
|
821
828
|
deviceDisplayType: t,
|
|
822
829
|
isComposeMode: n,
|
|
823
830
|
sourceComponentsPlugin: o
|
|
824
831
|
}) {
|
|
825
|
-
const s =
|
|
832
|
+
const s = ue(e), i = _o({
|
|
826
833
|
dbEntryType: e.type,
|
|
827
834
|
libraryId: e.libraryId,
|
|
828
835
|
sourceComponentsPlugin: o
|
|
829
|
-
}) || [],
|
|
836
|
+
}) || [], l = Oo({
|
|
830
837
|
defaultAttributes: i,
|
|
831
838
|
userModifiedAttributes: s
|
|
832
|
-
}), { styles:
|
|
839
|
+
}), { styles: r, componentAttributesSpecificToDeviceType: u } = U({
|
|
833
840
|
deviceDisplayType: t,
|
|
834
|
-
componentAttributes:
|
|
841
|
+
componentAttributes: l
|
|
835
842
|
}) || {
|
|
836
843
|
styles: void 0,
|
|
837
844
|
componentAttributesSpecificToDeviceType: void 0
|
|
838
845
|
};
|
|
839
|
-
let
|
|
840
|
-
const
|
|
841
|
-
if (
|
|
842
|
-
for (const [
|
|
843
|
-
n &&
|
|
844
|
-
...
|
|
845
|
-
[
|
|
846
|
+
let a = {};
|
|
847
|
+
const c = {};
|
|
848
|
+
if (r)
|
|
849
|
+
for (const [d, h] of Object.entries(r))
|
|
850
|
+
n && c[d] || (a = {
|
|
851
|
+
...a,
|
|
852
|
+
[d]: h
|
|
846
853
|
});
|
|
847
|
-
let
|
|
848
|
-
for (const
|
|
849
|
-
if (
|
|
850
|
-
|
|
851
|
-
...
|
|
852
|
-
...
|
|
854
|
+
let p = ue(e);
|
|
855
|
+
for (const d in u)
|
|
856
|
+
if (d.includes("3-resolutions")) {
|
|
857
|
+
p = {
|
|
858
|
+
...ue(e) || {},
|
|
859
|
+
...u || {}
|
|
853
860
|
};
|
|
854
861
|
break;
|
|
855
862
|
}
|
|
863
|
+
const m = Ro(a);
|
|
864
|
+
if (n && m.pointerEvents !== void 0) {
|
|
865
|
+
const d = { ...m };
|
|
866
|
+
return delete d.pointerEvents, {
|
|
867
|
+
componentAttributesBasedOnDevice: p,
|
|
868
|
+
componentStyles: d
|
|
869
|
+
};
|
|
870
|
+
}
|
|
856
871
|
return {
|
|
857
|
-
componentAttributesBasedOnDevice:
|
|
858
|
-
componentStyles:
|
|
872
|
+
componentAttributesBasedOnDevice: p,
|
|
873
|
+
componentStyles: m
|
|
859
874
|
};
|
|
860
875
|
}
|
|
861
|
-
const
|
|
876
|
+
const Mo = (e) => {
|
|
862
877
|
const t = (e == null ? void 0 : e.rows) || [];
|
|
863
878
|
for (const n of t)
|
|
864
879
|
if (((n == null ? void 0 : n.columns) || []).length > 0)
|
|
865
880
|
return !0;
|
|
866
881
|
return (e == null ? void 0 : e.containerAttributes) && Object.keys(e.containerAttributes).length > 0;
|
|
867
|
-
},
|
|
868
|
-
function
|
|
882
|
+
}, jo = "var(--sl-spacing-x-small)";
|
|
883
|
+
function No(e) {
|
|
869
884
|
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);
|
|
870
885
|
}
|
|
871
|
-
function
|
|
886
|
+
function Wo({
|
|
872
887
|
row: e,
|
|
873
888
|
deviceDisplayType: t
|
|
874
889
|
}) {
|
|
875
890
|
var o;
|
|
876
|
-
const n =
|
|
891
|
+
const n = U({
|
|
877
892
|
deviceDisplayType: t,
|
|
878
893
|
componentAttributes: e.rowAttributes
|
|
879
894
|
});
|
|
880
895
|
return ((o = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : o["hide-component-3-resolutions"]) === "true";
|
|
881
896
|
}
|
|
882
|
-
function
|
|
897
|
+
function Vo({
|
|
883
898
|
row: e,
|
|
884
899
|
deviceDisplayType: t,
|
|
885
900
|
isComposeMode: n
|
|
886
901
|
}) {
|
|
887
|
-
var
|
|
888
|
-
const o = ((
|
|
902
|
+
var d;
|
|
903
|
+
const o = ((d = U({
|
|
889
904
|
deviceDisplayType: t,
|
|
890
905
|
componentAttributes: e.rowAttributes
|
|
891
|
-
})) == null ? void 0 :
|
|
906
|
+
})) == null ? void 0 : d.styles) || {}, s = o.justifyContent ?? e.horizontalAlignment ?? Ue.Center, i = o.alignItems ?? e.verticalAlignment ?? Ue.Center, l = o.flexDirection ?? "row", r = o.gap ?? e.gap ?? jo, u = n ? "nowrap" : o.flexWrap ?? e.flexWrap ?? "nowrap", a = o.alignContent ?? e.alignContent ?? void 0, c = /* @__PURE__ */ new Set([
|
|
892
907
|
"justifyContent",
|
|
893
908
|
"alignItems",
|
|
894
909
|
"flexDirection",
|
|
@@ -896,26 +911,26 @@ function Hn({
|
|
|
896
911
|
"flexWrap",
|
|
897
912
|
"alignContent",
|
|
898
913
|
"display"
|
|
899
|
-
]),
|
|
900
|
-
for (const [
|
|
901
|
-
|
|
902
|
-
const
|
|
914
|
+
]), p = {};
|
|
915
|
+
for (const [h, b] of Object.entries(o))
|
|
916
|
+
c.has(h) || (p[h] = b);
|
|
917
|
+
const m = {
|
|
903
918
|
display: "flex",
|
|
904
|
-
flexDirection:
|
|
905
|
-
gap:
|
|
906
|
-
flexWrap:
|
|
919
|
+
flexDirection: l,
|
|
920
|
+
gap: r,
|
|
921
|
+
flexWrap: u,
|
|
907
922
|
justifyContent: s,
|
|
908
923
|
alignItems: i,
|
|
909
|
-
...
|
|
924
|
+
...p
|
|
910
925
|
};
|
|
911
|
-
return
|
|
926
|
+
return a !== void 0 && (m.alignContent = a), m;
|
|
912
927
|
}
|
|
913
|
-
const
|
|
928
|
+
const _e = "css-classes-3-resolutions", Fo = 500, Bo = /[\x00-\x1f\x7f]/g, Oe = (e) => {
|
|
914
929
|
if (typeof e != "string")
|
|
915
930
|
return;
|
|
916
931
|
const t = /* @__PURE__ */ new Set(), n = [];
|
|
917
932
|
for (const s of e.split(/\s+/)) {
|
|
918
|
-
const i = s.replace(
|
|
933
|
+
const i = s.replace(Bo, "");
|
|
919
934
|
i && (t.has(i) || (t.add(i), n.push(i)));
|
|
920
935
|
}
|
|
921
936
|
if (!n.length)
|
|
@@ -923,12 +938,12 @@ const me = "css-classes-3-resolutions", zn = 500, Gn = /[\x00-\x1f\x7f]/g, ge =
|
|
|
923
938
|
let o = "";
|
|
924
939
|
for (const s of n) {
|
|
925
940
|
const i = o ? `${o} ${s}` : s;
|
|
926
|
-
if (i.length >
|
|
941
|
+
if (i.length > Fo)
|
|
927
942
|
break;
|
|
928
943
|
o = i;
|
|
929
944
|
}
|
|
930
945
|
return o.length ? o : void 0;
|
|
931
|
-
},
|
|
946
|
+
}, gt = "hide-component-3-resolutions", Ko = "pointer-events-3-resolutions", Uo = [
|
|
932
947
|
"width-3-resolutions",
|
|
933
948
|
"min-width-3-resolutions",
|
|
934
949
|
"max-width-3-resolutions",
|
|
@@ -943,23 +958,23 @@ const me = "css-classes-3-resolutions", zn = 500, Gn = /[\x00-\x1f\x7f]/g, ge =
|
|
|
943
958
|
"overflow-3-resolutions",
|
|
944
959
|
"overflow-x-3-resolutions",
|
|
945
960
|
"overflow-y-3-resolutions",
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
],
|
|
949
|
-
|
|
961
|
+
gt,
|
|
962
|
+
Ko
|
|
963
|
+
], zo = new Set(
|
|
964
|
+
Uo
|
|
950
965
|
);
|
|
951
|
-
function
|
|
966
|
+
function Me({
|
|
952
967
|
containerAttributes: e,
|
|
953
968
|
deviceDisplayType: t
|
|
954
969
|
}) {
|
|
955
970
|
var o;
|
|
956
|
-
const n =
|
|
971
|
+
const n = U({
|
|
957
972
|
deviceDisplayType: t,
|
|
958
973
|
componentAttributes: e
|
|
959
974
|
});
|
|
960
|
-
return ((o = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : o[
|
|
975
|
+
return ((o = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : o[gt]) === "true";
|
|
961
976
|
}
|
|
962
|
-
function
|
|
977
|
+
function bt({
|
|
963
978
|
containerAttributes: e,
|
|
964
979
|
deviceDisplayType: t,
|
|
965
980
|
isComposeMode: n
|
|
@@ -969,44 +984,44 @@ function _e({
|
|
|
969
984
|
return { styles: {} };
|
|
970
985
|
const o = n ? Object.fromEntries(
|
|
971
986
|
Object.entries(e).filter(
|
|
972
|
-
([
|
|
987
|
+
([l]) => !zo.has(l)
|
|
973
988
|
)
|
|
974
|
-
) : e, s =
|
|
989
|
+
) : e, s = U({
|
|
975
990
|
deviceDisplayType: t,
|
|
976
991
|
componentAttributes: o
|
|
977
992
|
});
|
|
978
993
|
return {
|
|
979
994
|
styles: (s == null ? void 0 : s.styles) ?? {},
|
|
980
|
-
cssClasses:
|
|
981
|
-
(i = s == null ? void 0 : s.componentAttributesSpecificToDeviceType) == null ? void 0 : i[
|
|
995
|
+
cssClasses: Oe(
|
|
996
|
+
(i = s == null ? void 0 : s.componentAttributesSpecificToDeviceType) == null ? void 0 : i[_e]
|
|
982
997
|
)
|
|
983
998
|
};
|
|
984
999
|
}
|
|
985
|
-
function
|
|
1000
|
+
function Ho(e) {
|
|
986
1001
|
return Object.keys(e.styles).length > 0 || !!e.cssClasses;
|
|
987
1002
|
}
|
|
988
|
-
function
|
|
1003
|
+
function Ct({
|
|
989
1004
|
containerAttributes: e,
|
|
990
1005
|
widgetContainerStyles: t
|
|
991
1006
|
}) {
|
|
992
|
-
return ((e == null ? void 0 : e[
|
|
1007
|
+
return ((e == null ? void 0 : e[Ae]) || []).some(
|
|
993
1008
|
(o) => o.toLowerCase().startsWith("height:")
|
|
994
1009
|
) || t.styles.height !== void 0;
|
|
995
1010
|
}
|
|
996
|
-
const
|
|
997
|
-
function
|
|
1011
|
+
const Go = "z-index-3-resolutions", wt = 0;
|
|
1012
|
+
function Yo(e) {
|
|
998
1013
|
var t, n;
|
|
999
1014
|
return !!((n = (t = e == null ? void 0 : e.overlayLayers) == null ? void 0 : t.layers) != null && n.length);
|
|
1000
1015
|
}
|
|
1001
|
-
function
|
|
1016
|
+
function He({
|
|
1002
1017
|
containerAttributes: e,
|
|
1003
1018
|
deviceDisplayType: t
|
|
1004
1019
|
}) {
|
|
1005
1020
|
var s;
|
|
1006
|
-
const n =
|
|
1021
|
+
const n = U({
|
|
1007
1022
|
deviceDisplayType: t,
|
|
1008
1023
|
componentAttributes: e
|
|
1009
|
-
}), o = (s = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : s[
|
|
1024
|
+
}), o = (s = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : s[Go];
|
|
1010
1025
|
if (typeof o == "number" && Number.isFinite(o))
|
|
1011
1026
|
return o;
|
|
1012
1027
|
if (typeof o == "string" && o.trim().length) {
|
|
@@ -1014,33 +1029,33 @@ function De({
|
|
|
1014
1029
|
if (Number.isFinite(i))
|
|
1015
1030
|
return i;
|
|
1016
1031
|
}
|
|
1017
|
-
return
|
|
1032
|
+
return wt;
|
|
1018
1033
|
}
|
|
1019
|
-
function
|
|
1034
|
+
function Xo(e, t) {
|
|
1020
1035
|
return e + t + 1;
|
|
1021
1036
|
}
|
|
1022
|
-
function
|
|
1037
|
+
function Jo({
|
|
1023
1038
|
containerAttributes: e,
|
|
1024
1039
|
deviceDisplayType: t
|
|
1025
1040
|
}) {
|
|
1026
1041
|
var s;
|
|
1027
|
-
const n =
|
|
1042
|
+
const n = U({
|
|
1028
1043
|
deviceDisplayType: t,
|
|
1029
1044
|
componentAttributes: e
|
|
1030
1045
|
}), o = (s = n == null ? void 0 : n.styles) == null ? void 0 : s.pointerEvents;
|
|
1031
1046
|
return typeof o == "string" ? o : void 0;
|
|
1032
1047
|
}
|
|
1033
|
-
function
|
|
1048
|
+
function qo({
|
|
1034
1049
|
layer: e,
|
|
1035
1050
|
deviceDisplayType: t
|
|
1036
1051
|
}) {
|
|
1037
1052
|
var n;
|
|
1038
|
-
return (n = e == null ? void 0 : e.rows) != null && n.length ?
|
|
1053
|
+
return (n = e == null ? void 0 : e.rows) != null && n.length ? Me({
|
|
1039
1054
|
containerAttributes: e.containerAttributes,
|
|
1040
1055
|
deviceDisplayType: t
|
|
1041
1056
|
}) : !0;
|
|
1042
1057
|
}
|
|
1043
|
-
function
|
|
1058
|
+
function Zo({
|
|
1044
1059
|
isWithinCollection: e,
|
|
1045
1060
|
baseDeclaresOwnHeight: t,
|
|
1046
1061
|
baseZIndex: n
|
|
@@ -1051,10 +1066,10 @@ function oo({
|
|
|
1051
1066
|
display: "flex",
|
|
1052
1067
|
flexDirection: "column",
|
|
1053
1068
|
...t ? {} : { height: e ? "auto" : "100%" },
|
|
1054
|
-
...n ===
|
|
1069
|
+
...n === wt ? {} : { zIndex: n }
|
|
1055
1070
|
};
|
|
1056
1071
|
}
|
|
1057
|
-
function
|
|
1072
|
+
function Qo({
|
|
1058
1073
|
zIndex: e,
|
|
1059
1074
|
pointerEvents: t
|
|
1060
1075
|
}) {
|
|
@@ -1069,8 +1084,8 @@ function so({
|
|
|
1069
1084
|
...t ? { pointerEvents: t } : {}
|
|
1070
1085
|
};
|
|
1071
1086
|
}
|
|
1072
|
-
const
|
|
1073
|
-
function
|
|
1087
|
+
const fe = "/";
|
|
1088
|
+
function es({
|
|
1074
1089
|
componentProps: e,
|
|
1075
1090
|
ancestorColumnIds: t,
|
|
1076
1091
|
columnId: n
|
|
@@ -1079,40 +1094,50 @@ function io({
|
|
|
1079
1094
|
return;
|
|
1080
1095
|
const o = [...t ?? [], n];
|
|
1081
1096
|
for (let s = 0; s < o.length; s += 1) {
|
|
1082
|
-
const i = o.slice(s).join(
|
|
1083
|
-
if (
|
|
1084
|
-
return
|
|
1097
|
+
const i = o.slice(s).join(fe), l = e[i];
|
|
1098
|
+
if (l)
|
|
1099
|
+
return l;
|
|
1085
1100
|
}
|
|
1086
1101
|
}
|
|
1087
|
-
|
|
1102
|
+
const Ge = "placeholderValues";
|
|
1103
|
+
function ts({
|
|
1104
|
+
widgetInstanceProps: e,
|
|
1105
|
+
placeholderValues: t
|
|
1106
|
+
}) {
|
|
1107
|
+
return t === void 0 || e != null && Object.prototype.hasOwnProperty.call(e, Ge) ? e : {
|
|
1108
|
+
...e,
|
|
1109
|
+
[Ge]: t
|
|
1110
|
+
};
|
|
1111
|
+
}
|
|
1112
|
+
function ns({
|
|
1088
1113
|
displayItemList: e,
|
|
1089
1114
|
widgetCollections: t
|
|
1090
1115
|
}) {
|
|
1091
1116
|
const n = [], o = (s, i) => {
|
|
1092
|
-
var
|
|
1093
|
-
if ((
|
|
1094
|
-
for (const
|
|
1095
|
-
for (const
|
|
1096
|
-
if (!
|
|
1117
|
+
var l;
|
|
1118
|
+
if ((l = s == null ? void 0 : s.rows) != null && l.length)
|
|
1119
|
+
for (const r of s.rows)
|
|
1120
|
+
for (const u of r.columns) {
|
|
1121
|
+
if (!u.id || u.type === Pe.DroppableBox)
|
|
1097
1122
|
continue;
|
|
1098
|
-
const
|
|
1099
|
-
if (
|
|
1100
|
-
const
|
|
1101
|
-
|
|
1123
|
+
const a = ft(u.type);
|
|
1124
|
+
if (a != null && a.length) {
|
|
1125
|
+
const c = u.collection ?? (t == null ? void 0 : t[a]);
|
|
1126
|
+
c && !i.includes(u.id) && o(c.collectionRows, [...i, u.id]);
|
|
1102
1127
|
continue;
|
|
1103
1128
|
}
|
|
1104
1129
|
n.push(
|
|
1105
|
-
[...i,
|
|
1130
|
+
[...i, u.id].join(fe)
|
|
1106
1131
|
);
|
|
1107
1132
|
}
|
|
1108
1133
|
};
|
|
1109
1134
|
return o(e, []), n;
|
|
1110
1135
|
}
|
|
1111
|
-
function
|
|
1112
|
-
const n = `${
|
|
1136
|
+
function os(e, t) {
|
|
1137
|
+
const n = `${fe}${e}`;
|
|
1113
1138
|
return t.some((o) => o === e || o.endsWith(n));
|
|
1114
1139
|
}
|
|
1115
|
-
function
|
|
1140
|
+
function ss({
|
|
1116
1141
|
componentProps: e,
|
|
1117
1142
|
displayItemList: t,
|
|
1118
1143
|
widgetCollections: n
|
|
@@ -1120,13 +1145,13 @@ function co({
|
|
|
1120
1145
|
const o = e ? Object.keys(e) : [];
|
|
1121
1146
|
if (!o.length)
|
|
1122
1147
|
return [];
|
|
1123
|
-
const s =
|
|
1148
|
+
const s = ns({
|
|
1124
1149
|
displayItemList: t,
|
|
1125
1150
|
widgetCollections: n
|
|
1126
1151
|
});
|
|
1127
|
-
return o.filter((i) => !
|
|
1152
|
+
return o.filter((i) => !os(i, s));
|
|
1128
1153
|
}
|
|
1129
|
-
function
|
|
1154
|
+
function is({
|
|
1130
1155
|
componentProps: e,
|
|
1131
1156
|
displayItemList: t,
|
|
1132
1157
|
widgetCollections: n,
|
|
@@ -1134,7 +1159,7 @@ function ao({
|
|
|
1134
1159
|
}) {
|
|
1135
1160
|
if (process.env.NODE_ENV === "production")
|
|
1136
1161
|
return;
|
|
1137
|
-
const s =
|
|
1162
|
+
const s = ss({
|
|
1138
1163
|
componentProps: e,
|
|
1139
1164
|
displayItemList: t,
|
|
1140
1165
|
widgetCollections: n
|
|
@@ -1143,68 +1168,68 @@ function ao({
|
|
|
1143
1168
|
`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.`
|
|
1144
1169
|
);
|
|
1145
1170
|
}
|
|
1146
|
-
function
|
|
1171
|
+
function rs(e) {
|
|
1147
1172
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
1148
1173
|
}
|
|
1149
|
-
function
|
|
1174
|
+
function ls(e) {
|
|
1150
1175
|
if (e.all !== void 0 && e.all !== null)
|
|
1151
1176
|
return !1;
|
|
1152
1177
|
const t = e.phone, n = e.tablet, o = e.desktop;
|
|
1153
1178
|
return t !== n || t !== o || n !== o;
|
|
1154
1179
|
}
|
|
1155
|
-
function
|
|
1180
|
+
function Se(e) {
|
|
1156
1181
|
var t, n;
|
|
1157
1182
|
if (!((t = e == null ? void 0 : e.rows) != null && t.length))
|
|
1158
1183
|
return !1;
|
|
1159
|
-
if (
|
|
1184
|
+
if (we(e.containerAttributes))
|
|
1160
1185
|
return !0;
|
|
1161
1186
|
for (const o of e.rows) {
|
|
1162
|
-
if (
|
|
1187
|
+
if (we(o.rowAttributes))
|
|
1163
1188
|
return !0;
|
|
1164
1189
|
for (const s of o.columns)
|
|
1165
|
-
if (
|
|
1190
|
+
if (we(ue(s)))
|
|
1166
1191
|
return !0;
|
|
1167
1192
|
}
|
|
1168
1193
|
for (const o of ((n = e.overlayLayers) == null ? void 0 : n.layers) ?? [])
|
|
1169
|
-
if (
|
|
1194
|
+
if (Se(o))
|
|
1170
1195
|
return !0;
|
|
1171
1196
|
return !1;
|
|
1172
1197
|
}
|
|
1173
|
-
function
|
|
1198
|
+
function we(e) {
|
|
1174
1199
|
if (!e)
|
|
1175
1200
|
return !1;
|
|
1176
1201
|
for (const [t, n] of Object.entries(e))
|
|
1177
|
-
if (!(!t.includes("3-resolutions") || !
|
|
1202
|
+
if (!(!t.includes("3-resolutions") || !rs(n))) {
|
|
1178
1203
|
if (t === "hide-component-3-resolutions") {
|
|
1179
1204
|
const o = n, s = (i) => i === "true" || i === !0;
|
|
1180
1205
|
if (s(o.phone) !== s(o.tablet) || s(o.phone) !== s(o.desktop))
|
|
1181
1206
|
return !0;
|
|
1182
1207
|
continue;
|
|
1183
1208
|
}
|
|
1184
|
-
if (
|
|
1209
|
+
if (ls(n))
|
|
1185
1210
|
return !0;
|
|
1186
1211
|
}
|
|
1187
1212
|
return !1;
|
|
1188
1213
|
}
|
|
1189
|
-
function
|
|
1190
|
-
if (
|
|
1214
|
+
function cs(e, t) {
|
|
1215
|
+
if (Se(e))
|
|
1191
1216
|
return !0;
|
|
1192
1217
|
for (const n of Object.values(t))
|
|
1193
|
-
if (
|
|
1218
|
+
if (Se(n.collectionRows))
|
|
1194
1219
|
return !0;
|
|
1195
1220
|
return !1;
|
|
1196
1221
|
}
|
|
1197
|
-
const
|
|
1198
|
-
function
|
|
1222
|
+
const vt = parseInt(mt, 10), At = parseInt(ht, 10), as = vt + 1, us = At + 1;
|
|
1223
|
+
function ds(e) {
|
|
1199
1224
|
const t = `.${e}-phone`, n = `.${e}-tablet`, o = `.${e}-desktop`;
|
|
1200
1225
|
return `
|
|
1201
1226
|
${t}, ${n}, ${o} { display: none; }
|
|
1202
|
-
@media (max-width: ${
|
|
1203
|
-
@media (min-width: ${
|
|
1204
|
-
@media (min-width: ${
|
|
1227
|
+
@media (max-width: ${vt}px) { ${t} { display: block; } }
|
|
1228
|
+
@media (min-width: ${as}px) and (max-width: ${At}px) { ${n} { display: block; } }
|
|
1229
|
+
@media (min-width: ${us}px) { ${o} { display: block; } }
|
|
1205
1230
|
`.trim();
|
|
1206
1231
|
}
|
|
1207
|
-
function
|
|
1232
|
+
function ve(e) {
|
|
1208
1233
|
if (!e)
|
|
1209
1234
|
throw new Error("Source components plugin is required, but no plugins were provided");
|
|
1210
1235
|
const t = e.sourceComponents;
|
|
@@ -1218,7 +1243,7 @@ function oe(e) {
|
|
|
1218
1243
|
);
|
|
1219
1244
|
return t;
|
|
1220
1245
|
}
|
|
1221
|
-
const
|
|
1246
|
+
const ps = ["hidden"], Ye = /* @__PURE__ */ S({
|
|
1222
1247
|
__name: "EmbedInVerticalContainer",
|
|
1223
1248
|
props: {
|
|
1224
1249
|
displayItemList: {},
|
|
@@ -1231,59 +1256,59 @@ const ho = ["hidden"], ke = /* @__PURE__ */ D({
|
|
|
1231
1256
|
const t = e;
|
|
1232
1257
|
let n = 0;
|
|
1233
1258
|
const o = `rulecms-vc-${++n}`;
|
|
1234
|
-
function s(
|
|
1235
|
-
const
|
|
1236
|
-
return !!(
|
|
1259
|
+
function s(h, b, C) {
|
|
1260
|
+
const g = h && !C ? 3 : 1;
|
|
1261
|
+
return !!(b != null && b.length) && b.length > g;
|
|
1237
1262
|
}
|
|
1238
|
-
const i =
|
|
1239
|
-
var
|
|
1240
|
-
return (((
|
|
1263
|
+
const i = y(() => {
|
|
1264
|
+
var b;
|
|
1265
|
+
return (((b = t.displayItemList.containerAttributes) == null ? void 0 : b[Ae]) || []).join(`;
|
|
1241
1266
|
`);
|
|
1242
|
-
}),
|
|
1267
|
+
}), l = y(
|
|
1243
1268
|
() => i.value ? `.${o} {
|
|
1244
1269
|
${i.value}
|
|
1245
1270
|
}` : ""
|
|
1246
|
-
),
|
|
1247
|
-
() => !t.isComposeMode &&
|
|
1271
|
+
), r = y(
|
|
1272
|
+
() => !t.isComposeMode && Me({
|
|
1248
1273
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1249
1274
|
deviceDisplayType: t.deviceDisplayType
|
|
1250
1275
|
})
|
|
1251
|
-
),
|
|
1252
|
-
() =>
|
|
1276
|
+
), u = y(
|
|
1277
|
+
() => bt({
|
|
1253
1278
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1254
1279
|
deviceDisplayType: t.deviceDisplayType,
|
|
1255
1280
|
isComposeMode: t.isComposeMode
|
|
1256
1281
|
})
|
|
1257
|
-
),
|
|
1258
|
-
var
|
|
1259
|
-
const
|
|
1260
|
-
return t.isComposeMode && !t.isWithinCollection || t.showDropContainers ||
|
|
1261
|
-
}),
|
|
1262
|
-
() => [i.value ? o : void 0,
|
|
1263
|
-
),
|
|
1264
|
-
...
|
|
1282
|
+
), a = y(() => {
|
|
1283
|
+
var C;
|
|
1284
|
+
const h = ((C = t.displayItemList.containerAttributes) == null ? void 0 : C[Ae]) || [], b = Ho(u.value);
|
|
1285
|
+
return t.isComposeMode && !t.isWithinCollection || t.showDropContainers || h.length > 0 || b || s(t.isComposeMode, t.displayItemList.rows, t.isWithinCollection);
|
|
1286
|
+
}), c = y(
|
|
1287
|
+
() => [i.value ? o : void 0, u.value.cssClasses].filter(Boolean).join(" ")
|
|
1288
|
+
), p = y(() => ({
|
|
1289
|
+
...Ct({
|
|
1265
1290
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1266
|
-
widgetContainerStyles:
|
|
1291
|
+
widgetContainerStyles: u.value
|
|
1267
1292
|
}) ? {} : { height: t.isWithinCollection ? "auto" : "100%" },
|
|
1268
1293
|
display: "flex",
|
|
1269
1294
|
flexDirection: "column",
|
|
1270
|
-
...
|
|
1271
|
-
})),
|
|
1272
|
-
return (
|
|
1273
|
-
hidden:
|
|
1274
|
-
class:
|
|
1275
|
-
style:
|
|
1295
|
+
...u.value.styles
|
|
1296
|
+
})), m = y(() => a.value ? c.value : ""), d = y(() => r.value ? { display: "none" } : a.value ? p.value : { display: "contents" });
|
|
1297
|
+
return (h, b) => (f(), w("div", {
|
|
1298
|
+
hidden: r.value || void 0,
|
|
1299
|
+
class: ie(m.value || void 0),
|
|
1300
|
+
style: D(d.value)
|
|
1276
1301
|
}, [
|
|
1277
|
-
i.value ? (
|
|
1278
|
-
default:
|
|
1279
|
-
|
|
1302
|
+
i.value ? (f(), v(x("style"), { key: 0 }, {
|
|
1303
|
+
default: P(() => [
|
|
1304
|
+
j(M(l.value), 1)
|
|
1280
1305
|
]),
|
|
1281
1306
|
_: 1
|
|
1282
|
-
})) :
|
|
1283
|
-
|
|
1284
|
-
], 14,
|
|
1307
|
+
})) : T("", !0),
|
|
1308
|
+
Ie(h.$slots, "default")
|
|
1309
|
+
], 14, ps));
|
|
1285
1310
|
}
|
|
1286
|
-
}),
|
|
1311
|
+
}), fs = ["hidden"], Xe = /* @__PURE__ */ S({
|
|
1287
1312
|
__name: "EmbedInRow",
|
|
1288
1313
|
props: {
|
|
1289
1314
|
row: {},
|
|
@@ -1294,40 +1319,40 @@ ${i.value}
|
|
|
1294
1319
|
},
|
|
1295
1320
|
setup(e) {
|
|
1296
1321
|
const t = e;
|
|
1297
|
-
function n(
|
|
1298
|
-
var
|
|
1299
|
-
const
|
|
1300
|
-
return !!((
|
|
1322
|
+
function n(a, c, p) {
|
|
1323
|
+
var d;
|
|
1324
|
+
const m = a && !p ? 3 : 1;
|
|
1325
|
+
return !!((d = c == null ? void 0 : c.columns) != null && d.length) && c.columns.length > m;
|
|
1301
1326
|
}
|
|
1302
|
-
const o =
|
|
1303
|
-
() => !t.isComposeMode &&
|
|
1304
|
-
), s =
|
|
1305
|
-
() => t.showDropContainers ||
|
|
1306
|
-
), i =
|
|
1307
|
-
() =>
|
|
1327
|
+
const o = y(
|
|
1328
|
+
() => !t.isComposeMode && Wo({ row: t.row, deviceDisplayType: t.deviceDisplayType })
|
|
1329
|
+
), s = y(
|
|
1330
|
+
() => t.showDropContainers || No(t.row) || n(t.isComposeMode, t.row, t.isWithinCollection)
|
|
1331
|
+
), i = y(
|
|
1332
|
+
() => Vo({
|
|
1308
1333
|
row: t.row,
|
|
1309
1334
|
deviceDisplayType: t.deviceDisplayType,
|
|
1310
1335
|
isComposeMode: t.isComposeMode
|
|
1311
1336
|
})
|
|
1312
|
-
),
|
|
1313
|
-
var
|
|
1314
|
-
const
|
|
1337
|
+
), l = y(() => {
|
|
1338
|
+
var c;
|
|
1339
|
+
const a = U({
|
|
1315
1340
|
deviceDisplayType: t.deviceDisplayType,
|
|
1316
1341
|
componentAttributes: t.row.rowAttributes
|
|
1317
1342
|
});
|
|
1318
|
-
return
|
|
1319
|
-
(
|
|
1343
|
+
return Oe(
|
|
1344
|
+
(c = a == null ? void 0 : a.componentAttributesSpecificToDeviceType) == null ? void 0 : c[_e]
|
|
1320
1345
|
) ?? "";
|
|
1321
|
-
}),
|
|
1322
|
-
return (
|
|
1346
|
+
}), r = y(() => s.value ? l.value : ""), u = y(() => o.value ? { display: "none" } : s.value ? i.value : { display: "contents" });
|
|
1347
|
+
return (a, c) => (f(), w("div", {
|
|
1323
1348
|
hidden: o.value || void 0,
|
|
1324
|
-
class:
|
|
1325
|
-
style:
|
|
1349
|
+
class: ie(r.value || void 0),
|
|
1350
|
+
style: D(u.value)
|
|
1326
1351
|
}, [
|
|
1327
|
-
|
|
1328
|
-
], 14,
|
|
1352
|
+
Ie(a.$slots, "default")
|
|
1353
|
+
], 14, fs));
|
|
1329
1354
|
}
|
|
1330
|
-
}),
|
|
1355
|
+
}), Et = [
|
|
1331
1356
|
"minWidth",
|
|
1332
1357
|
"maxWidth",
|
|
1333
1358
|
"minHeight",
|
|
@@ -1379,20 +1404,20 @@ ${i.value}
|
|
|
1379
1404
|
"textAlign",
|
|
1380
1405
|
"textDecoration",
|
|
1381
1406
|
"textTransform"
|
|
1382
|
-
],
|
|
1407
|
+
], ys = (e) => e != null && e !== "", ms = (e) => e ? Et.reduce(
|
|
1383
1408
|
(t, n) => {
|
|
1384
1409
|
const o = e[n];
|
|
1385
|
-
return
|
|
1410
|
+
return ys(o) && (t[n] = o), t;
|
|
1386
1411
|
},
|
|
1387
1412
|
{}
|
|
1388
|
-
) : {},
|
|
1413
|
+
) : {}, hs = (e) => {
|
|
1389
1414
|
if (!e)
|
|
1390
1415
|
return;
|
|
1391
1416
|
const t = { ...e };
|
|
1392
|
-
for (const n of
|
|
1417
|
+
for (const n of Et)
|
|
1393
1418
|
delete t[n];
|
|
1394
1419
|
return Object.keys(t).length ? t : void 0;
|
|
1395
|
-
},
|
|
1420
|
+
}, gs = (e) => Object.keys(e).length > 0, bs = (e, t) => {
|
|
1396
1421
|
const n = (e == null ? void 0 : e.noContainer) ?? !1, o = e == null ? void 0 : e.resolveNoContainer;
|
|
1397
1422
|
if (typeof o != "function")
|
|
1398
1423
|
return n;
|
|
@@ -1410,7 +1435,7 @@ ${i.value}
|
|
|
1410
1435
|
);
|
|
1411
1436
|
}
|
|
1412
1437
|
return n;
|
|
1413
|
-
},
|
|
1438
|
+
}, Cs = (e, t) => {
|
|
1414
1439
|
const n = e == null ? void 0 : e.resolveRendersOwnElement;
|
|
1415
1440
|
if (typeof n != "function")
|
|
1416
1441
|
return !1;
|
|
@@ -1428,7 +1453,7 @@ ${i.value}
|
|
|
1428
1453
|
);
|
|
1429
1454
|
}
|
|
1430
1455
|
return !1;
|
|
1431
|
-
},
|
|
1456
|
+
}, Je = /* @__PURE__ */ S({
|
|
1432
1457
|
__name: "DisplayComponent",
|
|
1433
1458
|
props: {
|
|
1434
1459
|
componentType: {},
|
|
@@ -1437,54 +1462,58 @@ ${i.value}
|
|
|
1437
1462
|
components: {},
|
|
1438
1463
|
styleProps: {},
|
|
1439
1464
|
widgetInstanceProps: {},
|
|
1465
|
+
pageViewType: {},
|
|
1466
|
+
columnPath: {},
|
|
1440
1467
|
mounts: {}
|
|
1441
1468
|
},
|
|
1442
1469
|
setup(e) {
|
|
1443
|
-
const t = e, n =
|
|
1444
|
-
var
|
|
1445
|
-
const
|
|
1446
|
-
return
|
|
1470
|
+
const t = e, n = y(() => t.components[rt(t.libraryId, t.componentType)]), o = y(() => {
|
|
1471
|
+
var h;
|
|
1472
|
+
const d = (h = n.value) == null ? void 0 : h.card;
|
|
1473
|
+
return d || (console.error(
|
|
1447
1474
|
`DisplayComponent: Component with type ${t.componentType}${t.libraryId ? ` (library "${t.libraryId}")` : ""} not found in components`
|
|
1448
1475
|
), null);
|
|
1449
|
-
}), s =
|
|
1476
|
+
}), s = y(() => ({
|
|
1450
1477
|
componentAttributes: t.componentAttributes,
|
|
1451
1478
|
styleProps: t.styleProps
|
|
1452
|
-
})), i =
|
|
1453
|
-
() => n.value ?
|
|
1454
|
-
),
|
|
1455
|
-
() => i.value ?
|
|
1456
|
-
),
|
|
1479
|
+
})), i = y(
|
|
1480
|
+
() => n.value ? bs(n.value, s.value) : !1
|
|
1481
|
+
), l = y(() => ms(t.styleProps)), r = y(
|
|
1482
|
+
() => i.value ? hs(t.styleProps) : t.styleProps
|
|
1483
|
+
), u = y(
|
|
1457
1484
|
() => {
|
|
1458
|
-
var
|
|
1459
|
-
return
|
|
1485
|
+
var d;
|
|
1486
|
+
return Oe((d = t.componentAttributes) == null ? void 0 : d[_e]);
|
|
1460
1487
|
}
|
|
1461
|
-
),
|
|
1462
|
-
() => !i.value || (n.value ?
|
|
1463
|
-
),
|
|
1464
|
-
() => !
|
|
1465
|
-
),
|
|
1488
|
+
), a = y(() => i.value && gs(l.value)), c = y(
|
|
1489
|
+
() => !i.value || (n.value ? Cs(n.value, s.value) : !1)
|
|
1490
|
+
), p = y(
|
|
1491
|
+
() => !a.value && c.value ? u.value : void 0
|
|
1492
|
+
), m = y(() => ({
|
|
1466
1493
|
componentAttributes: t.componentAttributes,
|
|
1467
|
-
styleProps:
|
|
1468
|
-
className:
|
|
1494
|
+
styleProps: r.value,
|
|
1495
|
+
className: p.value,
|
|
1469
1496
|
widgetInstanceProps: t.widgetInstanceProps,
|
|
1497
|
+
pageViewType: t.pageViewType,
|
|
1498
|
+
columnPath: t.columnPath,
|
|
1470
1499
|
mounts: t.mounts
|
|
1471
1500
|
}));
|
|
1472
|
-
return (
|
|
1473
|
-
|
|
1501
|
+
return (d, h) => o.value ? (f(), w(k, { key: 0 }, [
|
|
1502
|
+
a.value ? (f(), w("div", {
|
|
1474
1503
|
key: 0,
|
|
1475
|
-
class:
|
|
1476
|
-
style:
|
|
1504
|
+
class: ie(u.value || void 0),
|
|
1505
|
+
style: D(l.value)
|
|
1477
1506
|
}, [
|
|
1478
|
-
(
|
|
1479
|
-
], 6)) : !
|
|
1507
|
+
(f(), v(x(o.value), ge(Ve(m.value)), null, 16))
|
|
1508
|
+
], 6)) : !c.value && u.value ? (f(), w("div", {
|
|
1480
1509
|
key: 1,
|
|
1481
|
-
class:
|
|
1510
|
+
class: ie(u.value)
|
|
1482
1511
|
}, [
|
|
1483
|
-
(
|
|
1484
|
-
], 2)) : (
|
|
1485
|
-
], 64)) :
|
|
1512
|
+
(f(), v(x(o.value), ge(Ve(m.value)), null, 16))
|
|
1513
|
+
], 2)) : (f(), v(x(o.value), ge(Zt({ key: 2 }, m.value)), null, 16))
|
|
1514
|
+
], 64)) : T("", !0);
|
|
1486
1515
|
}
|
|
1487
|
-
}),
|
|
1516
|
+
}), ws = ["data-rulecms-overlay-layer"], vs = /* @__PURE__ */ S({
|
|
1488
1517
|
__name: "RenderComponentsInner",
|
|
1489
1518
|
props: {
|
|
1490
1519
|
displayItemList: {},
|
|
@@ -1497,24 +1526,25 @@ ${i.value}
|
|
|
1497
1526
|
deviceDisplayType: {},
|
|
1498
1527
|
componentProps: {},
|
|
1499
1528
|
mounts: {},
|
|
1529
|
+
placeholderValues: {},
|
|
1500
1530
|
ancestorColumnIds: {}
|
|
1501
1531
|
},
|
|
1502
1532
|
setup(e) {
|
|
1503
|
-
const t = e, n = () =>
|
|
1504
|
-
() => !t.isComposeMode &&
|
|
1533
|
+
const t = e, n = () => ve(t.plugins).components, o = y(
|
|
1534
|
+
() => !t.isComposeMode && Yo(t.displayItemList) && !Me({
|
|
1505
1535
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1506
1536
|
deviceDisplayType: t.deviceDisplayType
|
|
1507
1537
|
})
|
|
1508
|
-
), s =
|
|
1509
|
-
const d =
|
|
1538
|
+
), s = y(() => {
|
|
1539
|
+
const d = He({
|
|
1510
1540
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1511
1541
|
deviceDisplayType: t.deviceDisplayType
|
|
1512
1542
|
});
|
|
1513
|
-
return
|
|
1543
|
+
return Zo({
|
|
1514
1544
|
isWithinCollection: t.isWithinCollection,
|
|
1515
|
-
baseDeclaresOwnHeight:
|
|
1545
|
+
baseDeclaresOwnHeight: Ct({
|
|
1516
1546
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1517
|
-
widgetContainerStyles:
|
|
1547
|
+
widgetContainerStyles: bt({
|
|
1518
1548
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1519
1549
|
deviceDisplayType: t.deviceDisplayType,
|
|
1520
1550
|
isComposeMode: t.isComposeMode
|
|
@@ -1522,100 +1552,110 @@ ${i.value}
|
|
|
1522
1552
|
}),
|
|
1523
1553
|
baseZIndex: d
|
|
1524
1554
|
});
|
|
1525
|
-
}), i =
|
|
1526
|
-
var
|
|
1527
|
-
const d = ((
|
|
1555
|
+
}), i = y(() => {
|
|
1556
|
+
var b;
|
|
1557
|
+
const d = ((b = t.displayItemList.overlayLayers) == null ? void 0 : b.layers) ?? [], h = He({
|
|
1528
1558
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1529
1559
|
deviceDisplayType: t.deviceDisplayType
|
|
1530
1560
|
});
|
|
1531
|
-
return d.flatMap((
|
|
1561
|
+
return d.flatMap((C, g) => qo({ layer: C, deviceDisplayType: t.deviceDisplayType }) ? [] : [
|
|
1532
1562
|
{
|
|
1533
|
-
index:
|
|
1534
|
-
layer:
|
|
1535
|
-
boxStyles:
|
|
1536
|
-
zIndex:
|
|
1537
|
-
pointerEvents:
|
|
1538
|
-
containerAttributes:
|
|
1563
|
+
index: g,
|
|
1564
|
+
layer: C,
|
|
1565
|
+
boxStyles: Qo({
|
|
1566
|
+
zIndex: Xo(h, g),
|
|
1567
|
+
pointerEvents: Jo({
|
|
1568
|
+
containerAttributes: C.containerAttributes,
|
|
1539
1569
|
deviceDisplayType: t.deviceDisplayType
|
|
1540
1570
|
})
|
|
1541
1571
|
})
|
|
1542
1572
|
}
|
|
1543
1573
|
]);
|
|
1544
1574
|
});
|
|
1545
|
-
function
|
|
1546
|
-
if (t.isComposeMode && d.type ===
|
|
1575
|
+
function l(d) {
|
|
1576
|
+
if (t.isComposeMode && d.type === Pe.DroppableBox)
|
|
1547
1577
|
return !1;
|
|
1548
|
-
const { componentAttributesBasedOnDevice:
|
|
1578
|
+
const { componentAttributesBasedOnDevice: h } = ze({
|
|
1549
1579
|
col: d,
|
|
1550
1580
|
deviceDisplayType: t.deviceDisplayType,
|
|
1551
1581
|
isComposeMode: t.isComposeMode,
|
|
1552
|
-
sourceComponentsPlugin:
|
|
1553
|
-
}),
|
|
1554
|
-
return !(!t.isComposeMode &&
|
|
1582
|
+
sourceComponentsPlugin: ve(t.plugins)
|
|
1583
|
+
}), b = !!h && h["hide-component-3-resolutions"] === "true";
|
|
1584
|
+
return !(!t.isComposeMode && b);
|
|
1555
1585
|
}
|
|
1556
|
-
function
|
|
1557
|
-
const { componentAttributesBasedOnDevice:
|
|
1586
|
+
function r(d) {
|
|
1587
|
+
const { componentAttributesBasedOnDevice: h, componentStyles: b } = ze({
|
|
1558
1588
|
col: d,
|
|
1559
1589
|
deviceDisplayType: t.deviceDisplayType,
|
|
1560
1590
|
isComposeMode: t.isComposeMode,
|
|
1561
|
-
sourceComponentsPlugin:
|
|
1591
|
+
sourceComponentsPlugin: ve(t.plugins)
|
|
1562
1592
|
});
|
|
1563
1593
|
return {
|
|
1564
|
-
componentAttributes:
|
|
1565
|
-
styleProps:
|
|
1594
|
+
componentAttributes: h,
|
|
1595
|
+
styleProps: b
|
|
1566
1596
|
};
|
|
1567
1597
|
}
|
|
1568
|
-
function
|
|
1569
|
-
const
|
|
1570
|
-
if (!(
|
|
1598
|
+
function u(d) {
|
|
1599
|
+
const h = ft(d.type);
|
|
1600
|
+
if (!(h != null && h.length))
|
|
1571
1601
|
return null;
|
|
1572
|
-
const
|
|
1573
|
-
if (!
|
|
1602
|
+
const b = d.collection ?? t.widgetCollections[h];
|
|
1603
|
+
if (!b)
|
|
1574
1604
|
throw new Error(
|
|
1575
|
-
`DisplayCollection - Collection with ID ${
|
|
1605
|
+
`DisplayCollection - Collection with ID ${h} not found in widgetCollections. Available collections: ${Object.keys(t.widgetCollections).join(", ")}`
|
|
1576
1606
|
);
|
|
1577
|
-
return !
|
|
1607
|
+
return !b.collectionRows || !Mo(b.collectionRows) ? null : b.collectionRows;
|
|
1578
1608
|
}
|
|
1579
|
-
function
|
|
1609
|
+
function a(d) {
|
|
1580
1610
|
return [...t.ancestorColumnIds ?? [], d];
|
|
1581
1611
|
}
|
|
1582
|
-
function
|
|
1583
|
-
return
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1612
|
+
function c() {
|
|
1613
|
+
return t.isComposeMode ? Ke.Compose : Ke.RenderedPage;
|
|
1614
|
+
}
|
|
1615
|
+
function p(d) {
|
|
1616
|
+
if (!(t.isComposeMode || !d))
|
|
1617
|
+
return [...t.ancestorColumnIds ?? [], d].join(fe);
|
|
1618
|
+
}
|
|
1619
|
+
function m(d) {
|
|
1620
|
+
return ts({
|
|
1621
|
+
widgetInstanceProps: es({
|
|
1622
|
+
componentProps: t.componentProps,
|
|
1623
|
+
ancestorColumnIds: t.ancestorColumnIds,
|
|
1624
|
+
columnId: d
|
|
1625
|
+
}),
|
|
1626
|
+
placeholderValues: t.isComposeMode ? void 0 : t.placeholderValues
|
|
1587
1627
|
});
|
|
1588
1628
|
}
|
|
1589
|
-
return (d,
|
|
1590
|
-
const
|
|
1591
|
-
return o.value ? (
|
|
1629
|
+
return (d, h) => {
|
|
1630
|
+
const b = Qt("RenderComponentsInner", !0);
|
|
1631
|
+
return o.value ? (f(), w("div", {
|
|
1592
1632
|
key: 0,
|
|
1593
|
-
style:
|
|
1633
|
+
style: D(s.value)
|
|
1594
1634
|
}, [
|
|
1595
|
-
|
|
1635
|
+
R(Ye, {
|
|
1596
1636
|
"display-item-list": e.displayItemList,
|
|
1597
1637
|
"is-compose-mode": e.isComposeMode,
|
|
1598
1638
|
"show-drop-containers": e.showDropContainers,
|
|
1599
1639
|
"is-within-collection": e.isWithinCollection,
|
|
1600
1640
|
"device-display-type": e.deviceDisplayType
|
|
1601
1641
|
}, {
|
|
1602
|
-
default:
|
|
1603
|
-
(
|
|
1604
|
-
key:
|
|
1605
|
-
row:
|
|
1642
|
+
default: P(() => [
|
|
1643
|
+
(f(!0), w(k, null, G(e.displayItemList.rows, (C) => (f(), v(Xe, {
|
|
1644
|
+
key: C.id,
|
|
1645
|
+
row: C,
|
|
1606
1646
|
"is-compose-mode": e.isComposeMode,
|
|
1607
1647
|
"show-drop-containers": e.showDropContainers,
|
|
1608
1648
|
"is-within-collection": e.isWithinCollection,
|
|
1609
1649
|
"device-display-type": e.deviceDisplayType
|
|
1610
1650
|
}, {
|
|
1611
|
-
default:
|
|
1612
|
-
(
|
|
1613
|
-
key:
|
|
1651
|
+
default: P(() => [
|
|
1652
|
+
(f(!0), w(k, null, G(C.columns, (g) => (f(), w(k, {
|
|
1653
|
+
key: g.id
|
|
1614
1654
|
}, [
|
|
1615
|
-
|
|
1616
|
-
|
|
1655
|
+
l(g) ? (f(), w(k, { key: 0 }, [
|
|
1656
|
+
u(g) ? (f(), v(b, {
|
|
1617
1657
|
key: 0,
|
|
1618
|
-
"display-item-list":
|
|
1658
|
+
"display-item-list": u(g),
|
|
1619
1659
|
"is-compose-mode": e.isComposeMode,
|
|
1620
1660
|
"is-within-collection": !0,
|
|
1621
1661
|
"widget-collections": e.widgetCollections,
|
|
@@ -1625,18 +1665,21 @@ ${i.value}
|
|
|
1625
1665
|
"device-display-type": e.deviceDisplayType,
|
|
1626
1666
|
"component-props": e.componentProps,
|
|
1627
1667
|
mounts: e.mounts,
|
|
1628
|
-
"
|
|
1629
|
-
|
|
1668
|
+
"placeholder-values": e.placeholderValues,
|
|
1669
|
+
"ancestor-column-ids": a(g.id)
|
|
1670
|
+
}, null, 8, ["display-item-list", "is-compose-mode", "widget-collections", "show-drop-containers", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "placeholder-values", "ancestor-column-ids"])) : (f(), v(Je, {
|
|
1630
1671
|
key: 1,
|
|
1631
|
-
"component-type":
|
|
1632
|
-
"library-id":
|
|
1633
|
-
"component-attributes":
|
|
1672
|
+
"component-type": g.type,
|
|
1673
|
+
"library-id": g.libraryId,
|
|
1674
|
+
"component-attributes": r(g).componentAttributes,
|
|
1634
1675
|
components: n(),
|
|
1635
|
-
"style-props":
|
|
1636
|
-
"widget-instance-props":
|
|
1676
|
+
"style-props": r(g).styleProps,
|
|
1677
|
+
"widget-instance-props": m(g.id),
|
|
1678
|
+
"page-view-type": c(),
|
|
1679
|
+
"column-path": p(g.id),
|
|
1637
1680
|
mounts: e.mounts
|
|
1638
|
-
}, null, 8, ["component-type", "library-id", "component-attributes", "components", "style-props", "widget-instance-props", "mounts"]))
|
|
1639
|
-
], 64)) :
|
|
1681
|
+
}, null, 8, ["component-type", "library-id", "component-attributes", "components", "style-props", "widget-instance-props", "page-view-type", "column-path", "mounts"]))
|
|
1682
|
+
], 64)) : T("", !0)
|
|
1640
1683
|
], 64))), 128))
|
|
1641
1684
|
]),
|
|
1642
1685
|
_: 2
|
|
@@ -1644,13 +1687,13 @@ ${i.value}
|
|
|
1644
1687
|
]),
|
|
1645
1688
|
_: 1
|
|
1646
1689
|
}, 8, ["display-item-list", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]),
|
|
1647
|
-
(
|
|
1648
|
-
key:
|
|
1649
|
-
"data-rulecms-overlay-layer":
|
|
1650
|
-
style:
|
|
1690
|
+
(f(!0), w(k, null, G(i.value, (C) => (f(), w("div", {
|
|
1691
|
+
key: C.index,
|
|
1692
|
+
"data-rulecms-overlay-layer": C.index,
|
|
1693
|
+
style: D(C.boxStyles)
|
|
1651
1694
|
}, [
|
|
1652
|
-
|
|
1653
|
-
"display-item-list":
|
|
1695
|
+
R(b, {
|
|
1696
|
+
"display-item-list": C.layer,
|
|
1654
1697
|
"is-compose-mode": e.isComposeMode,
|
|
1655
1698
|
"is-within-collection": !1,
|
|
1656
1699
|
"widget-collections": e.widgetCollections,
|
|
@@ -1660,10 +1703,11 @@ ${i.value}
|
|
|
1660
1703
|
"device-display-type": e.deviceDisplayType,
|
|
1661
1704
|
"component-props": e.componentProps,
|
|
1662
1705
|
mounts: e.mounts,
|
|
1706
|
+
"placeholder-values": e.placeholderValues,
|
|
1663
1707
|
"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,
|
|
1666
|
-
], 4)) : (
|
|
1708
|
+
}, null, 8, ["display-item-list", "is-compose-mode", "widget-collections", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "placeholder-values", "ancestor-column-ids"])
|
|
1709
|
+
], 12, ws))), 128))
|
|
1710
|
+
], 4)) : (f(), v(Ye, {
|
|
1667
1711
|
key: 1,
|
|
1668
1712
|
"display-item-list": e.displayItemList,
|
|
1669
1713
|
"is-compose-mode": e.isComposeMode,
|
|
@@ -1671,23 +1715,23 @@ ${i.value}
|
|
|
1671
1715
|
"is-within-collection": e.isWithinCollection,
|
|
1672
1716
|
"device-display-type": e.deviceDisplayType
|
|
1673
1717
|
}, {
|
|
1674
|
-
default:
|
|
1675
|
-
(
|
|
1676
|
-
key:
|
|
1677
|
-
row:
|
|
1718
|
+
default: P(() => [
|
|
1719
|
+
(f(!0), w(k, null, G(e.displayItemList.rows, (C) => (f(), v(Xe, {
|
|
1720
|
+
key: C.id,
|
|
1721
|
+
row: C,
|
|
1678
1722
|
"is-compose-mode": e.isComposeMode,
|
|
1679
1723
|
"show-drop-containers": e.showDropContainers,
|
|
1680
1724
|
"is-within-collection": e.isWithinCollection,
|
|
1681
1725
|
"device-display-type": e.deviceDisplayType
|
|
1682
1726
|
}, {
|
|
1683
|
-
default:
|
|
1684
|
-
(
|
|
1685
|
-
key:
|
|
1727
|
+
default: P(() => [
|
|
1728
|
+
(f(!0), w(k, null, G(C.columns, (g) => (f(), w(k, {
|
|
1729
|
+
key: g.id
|
|
1686
1730
|
}, [
|
|
1687
|
-
|
|
1688
|
-
|
|
1731
|
+
l(g) ? (f(), w(k, { key: 0 }, [
|
|
1732
|
+
u(g) ? (f(), v(b, {
|
|
1689
1733
|
key: 0,
|
|
1690
|
-
"display-item-list":
|
|
1734
|
+
"display-item-list": u(g),
|
|
1691
1735
|
"is-compose-mode": e.isComposeMode,
|
|
1692
1736
|
"is-within-collection": !0,
|
|
1693
1737
|
"widget-collections": e.widgetCollections,
|
|
@@ -1697,18 +1741,21 @@ ${i.value}
|
|
|
1697
1741
|
"device-display-type": e.deviceDisplayType,
|
|
1698
1742
|
"component-props": e.componentProps,
|
|
1699
1743
|
mounts: e.mounts,
|
|
1700
|
-
"
|
|
1701
|
-
|
|
1744
|
+
"placeholder-values": e.placeholderValues,
|
|
1745
|
+
"ancestor-column-ids": a(g.id)
|
|
1746
|
+
}, null, 8, ["display-item-list", "is-compose-mode", "widget-collections", "show-drop-containers", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "placeholder-values", "ancestor-column-ids"])) : (f(), v(Je, {
|
|
1702
1747
|
key: 1,
|
|
1703
|
-
"component-type":
|
|
1704
|
-
"library-id":
|
|
1705
|
-
"component-attributes":
|
|
1748
|
+
"component-type": g.type,
|
|
1749
|
+
"library-id": g.libraryId,
|
|
1750
|
+
"component-attributes": r(g).componentAttributes,
|
|
1706
1751
|
components: n(),
|
|
1707
|
-
"style-props":
|
|
1708
|
-
"widget-instance-props":
|
|
1752
|
+
"style-props": r(g).styleProps,
|
|
1753
|
+
"widget-instance-props": m(g.id),
|
|
1754
|
+
"page-view-type": c(),
|
|
1755
|
+
"column-path": p(g.id),
|
|
1709
1756
|
mounts: e.mounts
|
|
1710
|
-
}, null, 8, ["component-type", "library-id", "component-attributes", "components", "style-props", "widget-instance-props", "mounts"]))
|
|
1711
|
-
], 64)) :
|
|
1757
|
+
}, null, 8, ["component-type", "library-id", "component-attributes", "components", "style-props", "widget-instance-props", "page-view-type", "column-path", "mounts"]))
|
|
1758
|
+
], 64)) : T("", !0)
|
|
1712
1759
|
], 64))), 128))
|
|
1713
1760
|
]),
|
|
1714
1761
|
_: 2
|
|
@@ -1718,7 +1765,7 @@ ${i.value}
|
|
|
1718
1765
|
}, 8, ["display-item-list", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]));
|
|
1719
1766
|
};
|
|
1720
1767
|
}
|
|
1721
|
-
}),
|
|
1768
|
+
}), ke = /* @__PURE__ */ S({
|
|
1722
1769
|
__name: "RenderComponentsForDevice",
|
|
1723
1770
|
props: {
|
|
1724
1771
|
displayItemList: {},
|
|
@@ -1731,12 +1778,13 @@ ${i.value}
|
|
|
1731
1778
|
plugins: {},
|
|
1732
1779
|
componentProps: {},
|
|
1733
1780
|
mounts: {},
|
|
1781
|
+
placeholderValues: {},
|
|
1734
1782
|
ancestorColumnIds: {}
|
|
1735
1783
|
},
|
|
1736
1784
|
setup(e) {
|
|
1737
1785
|
return (t, n) => {
|
|
1738
1786
|
var o, s;
|
|
1739
|
-
return (s = (o = e.displayItemList) == null ? void 0 : o.rows) != null && s.length ? (
|
|
1787
|
+
return (s = (o = e.displayItemList) == null ? void 0 : o.rows) != null && s.length ? (f(), v(vs, {
|
|
1740
1788
|
key: 0,
|
|
1741
1789
|
"display-item-list": e.displayItemList,
|
|
1742
1790
|
"is-compose-mode": e.isComposeMode,
|
|
@@ -1748,27 +1796,28 @@ ${i.value}
|
|
|
1748
1796
|
"device-display-type": e.deviceDisplayType,
|
|
1749
1797
|
"component-props": e.componentProps,
|
|
1750
1798
|
mounts: e.mounts,
|
|
1799
|
+
"placeholder-values": e.placeholderValues,
|
|
1751
1800
|
"ancestor-column-ids": e.ancestorColumnIds
|
|
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"])) :
|
|
1801
|
+
}, 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", "placeholder-values", "ancestor-column-ids"])) : T("", !0);
|
|
1753
1802
|
};
|
|
1754
1803
|
}
|
|
1755
|
-
}),
|
|
1804
|
+
}), St = /* @__PURE__ */ S({
|
|
1756
1805
|
__name: "LibraryStylesheets",
|
|
1757
1806
|
props: {
|
|
1758
1807
|
stylesheets: {}
|
|
1759
1808
|
},
|
|
1760
1809
|
setup(e) {
|
|
1761
|
-
return (t, n) => (
|
|
1762
|
-
key:
|
|
1810
|
+
return (t, n) => (f(!0), w(k, null, G(e.stylesheets ?? [], (o, s) => (f(), v(x("style"), {
|
|
1811
|
+
key: s,
|
|
1763
1812
|
"data-rulecms-library-stylesheet": ""
|
|
1764
1813
|
}, {
|
|
1765
|
-
default:
|
|
1766
|
-
|
|
1814
|
+
default: P(() => [
|
|
1815
|
+
j(M(o), 1)
|
|
1767
1816
|
]),
|
|
1768
1817
|
_: 2
|
|
1769
1818
|
}, 1024))), 128));
|
|
1770
1819
|
}
|
|
1771
|
-
}),
|
|
1820
|
+
}), As = /* @__PURE__ */ S({
|
|
1772
1821
|
__name: "BreakpointVariantRender",
|
|
1773
1822
|
props: {
|
|
1774
1823
|
displayItemList: {},
|
|
@@ -1776,45 +1825,47 @@ ${i.value}
|
|
|
1776
1825
|
plugins: {},
|
|
1777
1826
|
componentProps: {},
|
|
1778
1827
|
mounts: {},
|
|
1828
|
+
placeholderValues: {},
|
|
1779
1829
|
scopeIdInput: {}
|
|
1780
1830
|
},
|
|
1781
1831
|
setup(e) {
|
|
1782
1832
|
const t = ["Phone", "Tablet", "Desktop"];
|
|
1783
1833
|
let n = 0;
|
|
1784
|
-
const o = e, s = `rulecms-bp-${++n}`, i =
|
|
1785
|
-
() =>
|
|
1786
|
-
),
|
|
1787
|
-
return (
|
|
1788
|
-
var
|
|
1789
|
-
return
|
|
1790
|
-
|
|
1791
|
-
stylesheets: (
|
|
1834
|
+
const o = e, s = `rulecms-bp-${++n}`, i = y(() => o.scopeIdInput ?? s), l = y(
|
|
1835
|
+
() => cs(o.displayItemList, o.widgetCollections)
|
|
1836
|
+
), r = y(() => ds(i.value));
|
|
1837
|
+
return (u, a) => {
|
|
1838
|
+
var c;
|
|
1839
|
+
return f(), w(k, null, [
|
|
1840
|
+
R(St, {
|
|
1841
|
+
stylesheets: (c = e.plugins.sourceComponents) == null ? void 0 : c.stylesheets
|
|
1792
1842
|
}, null, 8, ["stylesheets"]),
|
|
1793
|
-
|
|
1794
|
-
(
|
|
1795
|
-
default:
|
|
1796
|
-
|
|
1843
|
+
l.value ? (f(), w(k, { key: 1 }, [
|
|
1844
|
+
(f(), v(x("style"), null, {
|
|
1845
|
+
default: P(() => [
|
|
1846
|
+
j(M(r.value), 1)
|
|
1797
1847
|
]),
|
|
1798
1848
|
_: 1
|
|
1799
1849
|
})),
|
|
1800
|
-
(
|
|
1801
|
-
key:
|
|
1802
|
-
class:
|
|
1850
|
+
(f(), w(k, null, G(t, (p) => z("div", {
|
|
1851
|
+
key: p,
|
|
1852
|
+
class: ie(`${i.value}-${p.toLowerCase()}`)
|
|
1803
1853
|
}, [
|
|
1804
|
-
|
|
1854
|
+
R(ke, {
|
|
1805
1855
|
"display-item-list": e.displayItemList,
|
|
1806
1856
|
"is-compose-mode": !1,
|
|
1807
1857
|
"is-within-collection": !1,
|
|
1808
1858
|
"widget-collections": e.widgetCollections,
|
|
1809
1859
|
"show-drop-containers": !1,
|
|
1810
1860
|
"redux-device-display-type": "desktop",
|
|
1811
|
-
"device-display-type":
|
|
1861
|
+
"device-display-type": p,
|
|
1812
1862
|
plugins: e.plugins,
|
|
1813
1863
|
"component-props": e.componentProps,
|
|
1814
|
-
mounts: e.mounts
|
|
1815
|
-
|
|
1864
|
+
mounts: e.mounts,
|
|
1865
|
+
"placeholder-values": e.placeholderValues
|
|
1866
|
+
}, null, 8, ["display-item-list", "widget-collections", "device-display-type", "plugins", "component-props", "mounts", "placeholder-values"])
|
|
1816
1867
|
], 2)), 64))
|
|
1817
|
-
], 64)) : (
|
|
1868
|
+
], 64)) : (f(), v(ke, {
|
|
1818
1869
|
key: 0,
|
|
1819
1870
|
"display-item-list": e.displayItemList,
|
|
1820
1871
|
"is-compose-mode": !1,
|
|
@@ -1825,13 +1876,14 @@ ${i.value}
|
|
|
1825
1876
|
"device-display-type": "Desktop",
|
|
1826
1877
|
plugins: e.plugins,
|
|
1827
1878
|
"component-props": e.componentProps,
|
|
1828
|
-
mounts: e.mounts
|
|
1829
|
-
|
|
1879
|
+
mounts: e.mounts,
|
|
1880
|
+
"placeholder-values": e.placeholderValues
|
|
1881
|
+
}, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts", "placeholder-values"]))
|
|
1830
1882
|
], 64);
|
|
1831
1883
|
};
|
|
1832
1884
|
}
|
|
1833
1885
|
});
|
|
1834
|
-
function
|
|
1886
|
+
function Es(e, t, n) {
|
|
1835
1887
|
if (e)
|
|
1836
1888
|
return "Phone";
|
|
1837
1889
|
if (t)
|
|
@@ -1839,7 +1891,7 @@ function xo(e, t, n) {
|
|
|
1839
1891
|
const o = (n == null ? void 0 : n.toLowerCase()) || "desktop";
|
|
1840
1892
|
return o === "phone" ? "Phone" : o === "tablet" ? "Tablet" : "Desktop";
|
|
1841
1893
|
}
|
|
1842
|
-
const
|
|
1894
|
+
const Ss = `(max-width: ${mt})`, ks = `(max-width: ${ht})`, Ts = /* @__PURE__ */ S({
|
|
1843
1895
|
__name: "RenderComponents",
|
|
1844
1896
|
props: {
|
|
1845
1897
|
displayItemList: {},
|
|
@@ -1850,30 +1902,31 @@ const Eo = `(max-width: ${Fe})`, Po = `(max-width: ${Ke})`, $o = /* @__PURE__ */
|
|
|
1850
1902
|
reduxDeviceDisplayType: {},
|
|
1851
1903
|
plugins: {},
|
|
1852
1904
|
componentProps: {},
|
|
1853
|
-
mounts: {}
|
|
1905
|
+
mounts: {},
|
|
1906
|
+
placeholderValues: {}
|
|
1854
1907
|
},
|
|
1855
1908
|
setup(e) {
|
|
1856
|
-
const t = e, n =
|
|
1909
|
+
const t = e, n = H("Desktop");
|
|
1857
1910
|
let o, s;
|
|
1858
1911
|
function i() {
|
|
1859
|
-
n.value =
|
|
1912
|
+
n.value = Es(
|
|
1860
1913
|
(o == null ? void 0 : o.matches) ?? !1,
|
|
1861
1914
|
(s == null ? void 0 : s.matches) ?? !1,
|
|
1862
1915
|
t.reduxDeviceDisplayType
|
|
1863
1916
|
);
|
|
1864
1917
|
}
|
|
1865
|
-
return
|
|
1866
|
-
typeof matchMedia == "function" && (o = matchMedia(
|
|
1867
|
-
}),
|
|
1918
|
+
return en(() => {
|
|
1919
|
+
typeof matchMedia == "function" && (o = matchMedia(Ss), s = matchMedia(ks), o.addEventListener("change", i), s.addEventListener("change", i)), i();
|
|
1920
|
+
}), it(() => {
|
|
1868
1921
|
o == null || o.removeEventListener("change", i), s == null || s.removeEventListener("change", i);
|
|
1869
|
-
}), (
|
|
1870
|
-
var
|
|
1871
|
-
return
|
|
1872
|
-
e.isWithinCollection ?
|
|
1922
|
+
}), (l, r) => {
|
|
1923
|
+
var u;
|
|
1924
|
+
return f(), w(k, null, [
|
|
1925
|
+
e.isWithinCollection ? T("", !0) : (f(), v(St, {
|
|
1873
1926
|
key: 0,
|
|
1874
|
-
stylesheets: (
|
|
1927
|
+
stylesheets: (u = e.plugins.sourceComponents) == null ? void 0 : u.stylesheets
|
|
1875
1928
|
}, null, 8, ["stylesheets"])),
|
|
1876
|
-
|
|
1929
|
+
R(ke, {
|
|
1877
1930
|
"display-item-list": e.displayItemList,
|
|
1878
1931
|
"is-compose-mode": e.isComposeMode,
|
|
1879
1932
|
"is-within-collection": e.isWithinCollection,
|
|
@@ -1883,16 +1936,21 @@ const Eo = `(max-width: ${Fe})`, Po = `(max-width: ${Ke})`, $o = /* @__PURE__ */
|
|
|
1883
1936
|
"device-display-type": n.value,
|
|
1884
1937
|
plugins: e.plugins,
|
|
1885
1938
|
"component-props": e.componentProps,
|
|
1886
|
-
mounts: e.mounts
|
|
1887
|
-
|
|
1939
|
+
mounts: e.mounts,
|
|
1940
|
+
"placeholder-values": e.placeholderValues
|
|
1941
|
+
}, null, 8, ["display-item-list", "is-compose-mode", "is-within-collection", "widget-collections", "show-drop-containers", "redux-device-display-type", "device-display-type", "plugins", "component-props", "mounts", "placeholder-values"])
|
|
1888
1942
|
], 64);
|
|
1889
1943
|
};
|
|
1890
1944
|
}
|
|
1891
1945
|
});
|
|
1892
|
-
function
|
|
1946
|
+
function kt(e) {
|
|
1893
1947
|
return e !== !1;
|
|
1894
1948
|
}
|
|
1895
|
-
const
|
|
1949
|
+
const Is = ["utilities", "components"], Ps = new Set(Is), Tt = (e) => typeof e == "string" && Ps.has(e), Ds = (e) => e.split(`
|
|
1950
|
+
`).map((t) => t.length > 0 ? ` ${t}` : t).join(`
|
|
1951
|
+
`), xs = (e, t) => e ? Tt(t) ? `@layer ${t} {
|
|
1952
|
+
${Ds(e)}
|
|
1953
|
+
}` : e : null, $s = (e) => e.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), Ls = (e) => e.replace(/[^A-Za-z0-9_-]/g, (t) => `\\${t}`), Rs = ["</", "<script", "@import", "javascript:", "vbscript:", "expression("], _s = /[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/, Os = /[\s{};"]/, Ms = /^[A-Za-z0-9_:%./[\]%-]+$/, js = (e) => {
|
|
1896
1954
|
let t = 0;
|
|
1897
1955
|
for (const n of e)
|
|
1898
1956
|
if (n === "{")
|
|
@@ -1900,175 +1958,842 @@ const Lo = (e) => e.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), Ro = (e) => e.r
|
|
|
1900
1958
|
else if (n === "}" && (t -= 1, t < 0))
|
|
1901
1959
|
return !1;
|
|
1902
1960
|
return t === 0;
|
|
1903
|
-
},
|
|
1961
|
+
}, Ns = (e) => {
|
|
1904
1962
|
const t = e.startsWith(".") ? e.slice(1) : e;
|
|
1905
|
-
return !t || t.length > 200 || t.startsWith(".") ||
|
|
1906
|
-
},
|
|
1963
|
+
return !t || t.length > 200 || t.startsWith(".") || Os.test(t) ? !1 : Ms.test(t);
|
|
1964
|
+
}, Ws = (e) => {
|
|
1907
1965
|
const t = e.trim();
|
|
1908
|
-
if (!t || t.length > 4e3 ||
|
|
1966
|
+
if (!t || t.length > 4e3 || _s.test(t) || !js(t))
|
|
1909
1967
|
return !1;
|
|
1910
1968
|
const n = t.toLowerCase();
|
|
1911
|
-
return !
|
|
1912
|
-
},
|
|
1969
|
+
return !Rs.some((o) => n.includes(o));
|
|
1970
|
+
}, Vs = (e) => {
|
|
1913
1971
|
if (!e)
|
|
1914
1972
|
return {};
|
|
1915
1973
|
const t = {};
|
|
1916
1974
|
for (const [n, o] of Object.entries(e)) {
|
|
1917
1975
|
const s = n.startsWith(".") ? n.slice(1) : n.trim();
|
|
1918
|
-
if (!
|
|
1976
|
+
if (!Ns(s) || typeof o != "string")
|
|
1919
1977
|
continue;
|
|
1920
1978
|
const i = o.trim();
|
|
1921
|
-
|
|
1979
|
+
Ws(i) && (t[s] = i);
|
|
1922
1980
|
}
|
|
1923
1981
|
return t;
|
|
1924
|
-
},
|
|
1982
|
+
}, Fs = (e) => e.split(`
|
|
1925
1983
|
`).map((t) => ` ${t}`).join(`
|
|
1926
|
-
`),
|
|
1927
|
-
if (!
|
|
1984
|
+
`), Bs = (e, t, n, o) => {
|
|
1985
|
+
if (!kt(n))
|
|
1928
1986
|
return null;
|
|
1929
|
-
const
|
|
1930
|
-
if (
|
|
1987
|
+
const s = Vs(t), i = Object.keys(s);
|
|
1988
|
+
if (i.length === 0 || !e)
|
|
1931
1989
|
return null;
|
|
1932
|
-
const
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
${Ko(o[r])}
|
|
1990
|
+
const l = `[data-rulecms-published-key="${$s(e)}"]`, r = i.sort((u, a) => u.localeCompare(a)).map(
|
|
1991
|
+
(u) => `${l} .${Ls(u)} {
|
|
1992
|
+
${Fs(s[u])}
|
|
1936
1993
|
}`
|
|
1937
1994
|
).join(`
|
|
1938
1995
|
`);
|
|
1939
|
-
|
|
1996
|
+
return xs(r, o);
|
|
1997
|
+
}, Ks = /* @__PURE__ */ S({
|
|
1940
1998
|
__name: "ProjectCssClassesStylesheet",
|
|
1941
1999
|
props: {
|
|
1942
2000
|
publishedKey: {},
|
|
1943
|
-
classes: {}
|
|
2001
|
+
classes: {},
|
|
2002
|
+
classLayer: {}
|
|
1944
2003
|
},
|
|
1945
2004
|
setup(e) {
|
|
1946
|
-
const t = e, n =
|
|
1947
|
-
() =>
|
|
2005
|
+
const t = e, n = y(
|
|
2006
|
+
() => Bs(
|
|
2007
|
+
t.publishedKey,
|
|
2008
|
+
t.classes,
|
|
2009
|
+
void 0,
|
|
2010
|
+
t.classLayer
|
|
2011
|
+
)
|
|
1948
2012
|
);
|
|
1949
|
-
return (o, s) => n.value ? (
|
|
2013
|
+
return (o, s) => n.value ? (f(), v(x("style"), {
|
|
1950
2014
|
key: 0,
|
|
1951
2015
|
"data-rulecms-project-class-definitions": ""
|
|
1952
2016
|
}, {
|
|
1953
|
-
default:
|
|
1954
|
-
|
|
2017
|
+
default: P(() => [
|
|
2018
|
+
j(M(n.value), 1)
|
|
1955
2019
|
]),
|
|
1956
2020
|
_: 1
|
|
1957
|
-
})) :
|
|
2021
|
+
})) : T("", !0);
|
|
1958
2022
|
}
|
|
1959
|
-
})
|
|
2023
|
+
});
|
|
2024
|
+
function je(e) {
|
|
2025
|
+
return e !== !1;
|
|
2026
|
+
}
|
|
2027
|
+
const It = (e) => e.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), Us = /* @__PURE__ */ new Set([
|
|
2028
|
+
"serif",
|
|
2029
|
+
"sans-serif",
|
|
2030
|
+
"monospace",
|
|
2031
|
+
"cursive",
|
|
2032
|
+
"fantasy",
|
|
2033
|
+
"system-ui",
|
|
2034
|
+
"ui-sans-serif",
|
|
2035
|
+
"ui-serif",
|
|
2036
|
+
"ui-monospace",
|
|
2037
|
+
"ui-rounded",
|
|
2038
|
+
"emoji",
|
|
2039
|
+
"math",
|
|
2040
|
+
"fangsong"
|
|
2041
|
+
]), zs = /^[a-zA-Z_\u00A0-\uFFFF-][a-zA-Z0-9_\u00A0-\uFFFF-]*$/, Hs = /url\(|@|[{};\\<>]|javascript:/i, Gs = /url\(|@|[{};\\<>]|javascript:|expression\(/i, Ys = /^--[A-Za-z_][\w-]*$/, Xs = /^[A-Za-z0-9 ]+$/, Js = /* @__PURE__ */ new Set([100, 200, 300, 400, 500, 600, 700, 800, 900]), qs = 4, Zs = 8, Qs = 255, Te = (e) => Us.has(e.toLowerCase()) || zs.test(e) ? e : `"${e.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`, qe = (e) => typeof e == "string" && e.trim() !== "" && e.trim().length <= 80 && !e.includes(",") && !Hs.test(e), ei = (e) => typeof e == "string" && Ys.test(e.trim()) && e.trim().length <= 80, ti = (e) => typeof e == "string" && e.trim() !== "" && e.trim().length <= 400 && !Gs.test(e), ni = (e) => typeof e != "number" || !Number.isInteger(e) || e < 0 || e > Qs ? null : e, oi = (e, t, n) => {
|
|
2042
|
+
if (!Array.isArray(e))
|
|
2043
|
+
return [];
|
|
2044
|
+
const o = [];
|
|
2045
|
+
for (const s of e) {
|
|
2046
|
+
if (!s || typeof s != "object" || o.length >= qs)
|
|
2047
|
+
continue;
|
|
2048
|
+
const i = s;
|
|
2049
|
+
if (!ei(i.name))
|
|
2050
|
+
continue;
|
|
2051
|
+
const l = i.name.trim();
|
|
2052
|
+
if (t.has(l))
|
|
2053
|
+
continue;
|
|
2054
|
+
const r = [], u = /* @__PURE__ */ new Set();
|
|
2055
|
+
for (const c of i.overrideColors ?? []) {
|
|
2056
|
+
if (r.length >= Zs)
|
|
2057
|
+
break;
|
|
2058
|
+
const p = ni(c == null ? void 0 : c.index);
|
|
2059
|
+
p === null || u.has(p) || !ti(c == null ? void 0 : c.color) || (u.add(p), r.push({ index: p, color: c.color.trim() }));
|
|
2060
|
+
}
|
|
2061
|
+
r.sort((c, p) => c.index - p.index);
|
|
2062
|
+
const a = i.applyToWidget === !0 && !n.current;
|
|
2063
|
+
a && (n.current = !0), t.add(l), o.push({
|
|
2064
|
+
name: l,
|
|
2065
|
+
...r.length > 0 ? { overrideColors: r } : {},
|
|
2066
|
+
...a ? { applyToWidget: !0 } : {}
|
|
2067
|
+
});
|
|
2068
|
+
}
|
|
2069
|
+
return o;
|
|
2070
|
+
}, ye = (e) => {
|
|
2071
|
+
var l;
|
|
2072
|
+
if (!Array.isArray(e))
|
|
2073
|
+
return [];
|
|
2074
|
+
const t = [], n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), s = { current: !1 };
|
|
2075
|
+
let i = !1;
|
|
2076
|
+
for (const r of e) {
|
|
2077
|
+
if (!r || !qe(r.family))
|
|
2078
|
+
continue;
|
|
2079
|
+
const u = r.family.trim(), a = u.toLowerCase();
|
|
2080
|
+
if (n.has(a) || t.length >= 12)
|
|
2081
|
+
continue;
|
|
2082
|
+
const c = (r.fallbacks ?? []).filter(qe).slice(0, 8), p = typeof r.cssVariable == "string" && Q(r.cssVariable.trim()) ? r.cssVariable.trim() : void 0;
|
|
2083
|
+
let m = { kind: "stack-only" };
|
|
2084
|
+
if (((l = r.source) == null ? void 0 : l.kind) === "google") {
|
|
2085
|
+
if (!Xs.test(u))
|
|
2086
|
+
continue;
|
|
2087
|
+
const C = (Array.isArray(r.source.weights) ? r.source.weights : []).filter((g) => typeof g == "number" && Js.has(g)).filter((g, ee, me) => me.indexOf(g) === ee).sort((g, ee) => g - ee);
|
|
2088
|
+
if (C.length === 0)
|
|
2089
|
+
continue;
|
|
2090
|
+
m = { kind: "google", weights: C };
|
|
2091
|
+
}
|
|
2092
|
+
n.add(a);
|
|
2093
|
+
const d = r.applyToWidget === !0 && !i;
|
|
2094
|
+
d && (i = !0);
|
|
2095
|
+
const h = oi(r.palettes, o, s);
|
|
2096
|
+
t.push({
|
|
2097
|
+
family: u,
|
|
2098
|
+
...p ? { cssVariable: p } : {},
|
|
2099
|
+
fallbacks: c,
|
|
2100
|
+
applyToWidget: d,
|
|
2101
|
+
source: m,
|
|
2102
|
+
...h.length > 0 ? { palettes: h } : {}
|
|
2103
|
+
});
|
|
2104
|
+
}
|
|
2105
|
+
return t;
|
|
2106
|
+
}, si = (e) => {
|
|
2107
|
+
const t = ye(e).filter((n) => n.source.kind === "google").map((n) => {
|
|
2108
|
+
const o = n.source.kind === "google" ? n.source.weights.join(";") : "400";
|
|
2109
|
+
return `family=${n.family.replace(/ /g, "+")}:wght@${o}`;
|
|
2110
|
+
});
|
|
2111
|
+
return t.length === 0 ? null : `https://fonts.googleapis.com/css2?${t.join("&")}&display=swap`;
|
|
2112
|
+
}, ii = (e) => [Te(e.family), ...(e.fallbacks ?? []).map(Te)].join(", "), ri = (e) => {
|
|
2113
|
+
const t = [];
|
|
2114
|
+
for (const n of e)
|
|
2115
|
+
for (const o of n.palettes ?? []) {
|
|
2116
|
+
const s = [` font-family: ${Te(n.family)};`];
|
|
2117
|
+
if (o.overrideColors && o.overrideColors.length > 0) {
|
|
2118
|
+
const i = o.overrideColors.map((l) => `${l.index} ${l.color}`).join(", ");
|
|
2119
|
+
s.push(` override-colors: ${i};`);
|
|
2120
|
+
}
|
|
2121
|
+
t.push(`@font-palette-values ${o.name} {
|
|
2122
|
+
${s.join(`
|
|
2123
|
+
`)}
|
|
2124
|
+
}`);
|
|
2125
|
+
}
|
|
2126
|
+
return t.length > 0 ? t.join(`
|
|
2127
|
+
|
|
2128
|
+
`) : null;
|
|
2129
|
+
}, li = (e) => {
|
|
2130
|
+
for (const t of e)
|
|
2131
|
+
for (const n of t.palettes ?? [])
|
|
2132
|
+
if (n.applyToWidget)
|
|
2133
|
+
return n.name;
|
|
2134
|
+
}, ci = (e, t, n) => {
|
|
2135
|
+
if (!je(n) || !e)
|
|
2136
|
+
return null;
|
|
2137
|
+
const o = ye(t), s = [];
|
|
2138
|
+
for (const a of o) {
|
|
2139
|
+
const c = ii(a);
|
|
2140
|
+
a.cssVariable && s.push(` ${a.cssVariable}: ${c};`), a.applyToWidget && s.push(
|
|
2141
|
+
` font-family: ${a.cssVariable ? `var(${a.cssVariable})` : c};`
|
|
2142
|
+
);
|
|
2143
|
+
}
|
|
2144
|
+
const i = li(o);
|
|
2145
|
+
i && s.push(` font-palette: ${i};`);
|
|
2146
|
+
const l = ri(o), r = `[data-rulecms-published-key="${It(e)}"] > *`, u = s.length > 0 ? `${r} {
|
|
2147
|
+
${s.join(`
|
|
2148
|
+
`)}
|
|
2149
|
+
}` : null;
|
|
2150
|
+
return !l && !u ? null : l ? u ? `${l}
|
|
2151
|
+
|
|
2152
|
+
${u}` : l : u;
|
|
2153
|
+
}, ai = ["href"], ui = /* @__PURE__ */ S({
|
|
2154
|
+
__name: "ProjectCssFontsStylesheet",
|
|
2155
|
+
props: {
|
|
2156
|
+
publishedKey: {},
|
|
2157
|
+
fonts: {},
|
|
2158
|
+
includeFontFaces: { type: [Boolean, null] }
|
|
2159
|
+
},
|
|
2160
|
+
setup(e) {
|
|
2161
|
+
const t = e, n = y(() => ye(t.fonts)), o = y(
|
|
2162
|
+
() => je(t.includeFontFaces) ? si(n.value) : null
|
|
2163
|
+
), s = y(
|
|
2164
|
+
() => ci(t.publishedKey, n.value, t.includeFontFaces)
|
|
2165
|
+
);
|
|
2166
|
+
return (i, l) => (f(), w(k, null, [
|
|
2167
|
+
o.value ? (f(), w("link", {
|
|
2168
|
+
key: 0,
|
|
2169
|
+
rel: "stylesheet",
|
|
2170
|
+
href: o.value,
|
|
2171
|
+
"data-rulecms-project-fonts": ""
|
|
2172
|
+
}, null, 8, ai)) : T("", !0),
|
|
2173
|
+
s.value ? (f(), v(x("style"), {
|
|
2174
|
+
key: 1,
|
|
2175
|
+
"data-rulecms-project-fonts": ""
|
|
2176
|
+
}, {
|
|
2177
|
+
default: P(() => [
|
|
2178
|
+
j(M(s.value), 1)
|
|
2179
|
+
]),
|
|
2180
|
+
_: 1
|
|
2181
|
+
})) : T("", !0)
|
|
2182
|
+
], 64));
|
|
2183
|
+
}
|
|
2184
|
+
});
|
|
2185
|
+
function Pt(e) {
|
|
2186
|
+
return e !== !1;
|
|
2187
|
+
}
|
|
2188
|
+
const di = 80, pi = 4e3, fi = 32, Dt = [
|
|
2189
|
+
"url(",
|
|
2190
|
+
"@import",
|
|
2191
|
+
"@font-face",
|
|
2192
|
+
"@media",
|
|
2193
|
+
"@keyframes",
|
|
2194
|
+
"</",
|
|
2195
|
+
"<script",
|
|
2196
|
+
"javascript:",
|
|
2197
|
+
"expression(",
|
|
2198
|
+
"behavior:"
|
|
2199
|
+
], yi = /[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/, mi = /^[A-Za-z_][\w-]*$/, hi = (e) => {
|
|
2200
|
+
let t = 0;
|
|
2201
|
+
for (const n of e)
|
|
2202
|
+
if (n === "{")
|
|
2203
|
+
t += 1;
|
|
2204
|
+
else if (n === "}" && (t -= 1, t < 0))
|
|
2205
|
+
return !1;
|
|
2206
|
+
return t === 0;
|
|
2207
|
+
}, gi = (e) => {
|
|
2208
|
+
if (!e || e.length > di || e.includes("@") || e.includes(".") || /\s/.test(e))
|
|
2209
|
+
return !1;
|
|
2210
|
+
const t = e.toLowerCase();
|
|
2211
|
+
return Dt.some((n) => t.includes(n)) ? !1 : mi.test(e);
|
|
2212
|
+
}, bi = (e) => {
|
|
2213
|
+
const t = e.trim();
|
|
2214
|
+
if (t === "")
|
|
2215
|
+
return !1;
|
|
2216
|
+
const n = t.toLowerCase();
|
|
2217
|
+
if (n === "from" || n === "to")
|
|
2218
|
+
return !0;
|
|
2219
|
+
const o = t.match(/^(\d{1,3}(?:\.\d+)?)%$/);
|
|
2220
|
+
if (!o)
|
|
2221
|
+
return !1;
|
|
2222
|
+
const s = Number(o[1]);
|
|
2223
|
+
return s >= 0 && s <= 100;
|
|
2224
|
+
}, Ci = (e) => {
|
|
2225
|
+
let t = 0;
|
|
2226
|
+
const n = e.length;
|
|
2227
|
+
let o = 0;
|
|
2228
|
+
const s = () => {
|
|
2229
|
+
for (; t < n && /\s/.test(e[t]); )
|
|
2230
|
+
t += 1;
|
|
2231
|
+
};
|
|
2232
|
+
for (s(); t < n; ) {
|
|
2233
|
+
const i = e.indexOf("{", t);
|
|
2234
|
+
if (i === -1 || !e.slice(t, i).trim().split(",").every((a) => bi(a)))
|
|
2235
|
+
return !1;
|
|
2236
|
+
t = i + 1;
|
|
2237
|
+
const r = e.indexOf("}", t);
|
|
2238
|
+
if (r === -1)
|
|
2239
|
+
return !1;
|
|
2240
|
+
const u = e.slice(t, r);
|
|
2241
|
+
if (u.includes("{") || u.includes("}") || u.includes("@"))
|
|
2242
|
+
return !1;
|
|
2243
|
+
t = r + 1, o += 1, s();
|
|
2244
|
+
}
|
|
2245
|
+
return o > 0;
|
|
2246
|
+
}, wi = (e) => {
|
|
2247
|
+
const t = e.trim();
|
|
2248
|
+
if (!t || t.length > pi || yi.test(t) || !hi(t))
|
|
2249
|
+
return !1;
|
|
2250
|
+
const n = t.toLowerCase();
|
|
2251
|
+
return Dt.some((o) => n.includes(o)) || t.includes("@") ? !1 : Ci(t);
|
|
2252
|
+
}, xt = (e) => {
|
|
2253
|
+
if (!e)
|
|
2254
|
+
return {};
|
|
2255
|
+
const t = {};
|
|
2256
|
+
for (const [n, o] of Object.entries(e)) {
|
|
2257
|
+
const s = n.trim();
|
|
2258
|
+
if (!gi(s) || t[s] !== void 0 || typeof o != "string")
|
|
2259
|
+
continue;
|
|
2260
|
+
const i = o.trim();
|
|
2261
|
+
if (wi(i) && (t[s] = i, Object.keys(t).length === fi))
|
|
2262
|
+
break;
|
|
2263
|
+
}
|
|
2264
|
+
return Object.fromEntries(
|
|
2265
|
+
Object.entries(t).sort(([n], [o]) => n.localeCompare(o))
|
|
2266
|
+
);
|
|
2267
|
+
}, vi = (e) => e.split(`
|
|
2268
|
+
`).map((t) => ` ${t}`).join(`
|
|
2269
|
+
`), Ai = (e, t, n) => {
|
|
2270
|
+
if (!Pt(n))
|
|
2271
|
+
return null;
|
|
2272
|
+
const o = xt(t), s = Object.keys(o);
|
|
2273
|
+
return s.length === 0 ? null : s.map((i) => `@keyframes ${i} {
|
|
2274
|
+
${vi(o[i])}
|
|
2275
|
+
}`).join(`
|
|
2276
|
+
|
|
2277
|
+
`);
|
|
2278
|
+
}, Ei = /* @__PURE__ */ S({
|
|
2279
|
+
__name: "ProjectCssKeyframesStylesheet",
|
|
2280
|
+
props: {
|
|
2281
|
+
publishedKey: {},
|
|
2282
|
+
keyframes: {}
|
|
2283
|
+
},
|
|
2284
|
+
setup(e) {
|
|
2285
|
+
const t = e, n = y(
|
|
2286
|
+
() => Ai(t.publishedKey, t.keyframes)
|
|
2287
|
+
);
|
|
2288
|
+
return (o, s) => n.value ? (f(), v(x("style"), {
|
|
2289
|
+
key: 0,
|
|
2290
|
+
"data-rulecms-project-keyframes": ""
|
|
2291
|
+
}, {
|
|
2292
|
+
default: P(() => [
|
|
2293
|
+
j(M(n.value), 1)
|
|
2294
|
+
]),
|
|
2295
|
+
_: 1
|
|
2296
|
+
})) : T("", !0);
|
|
2297
|
+
}
|
|
2298
|
+
}), $t = (e) => e !== !1, Si = 80, ki = 2e3, Ti = 16, Lt = ["url(", "@", "</", "<script", "javascript:", "expression("], Ii = /[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/, Pi = /^--[A-Za-z_][\w-]*$/, Di = (e) => {
|
|
2299
|
+
for (const t of e)
|
|
2300
|
+
if (t === "{" || t === "}")
|
|
2301
|
+
return !1;
|
|
2302
|
+
return !0;
|
|
2303
|
+
}, xi = (e) => {
|
|
2304
|
+
if (!e || e.length > Si || e.includes("@") || e.includes(".") || /\s/.test(e))
|
|
2305
|
+
return !1;
|
|
2306
|
+
const t = e.toLowerCase();
|
|
2307
|
+
return Lt.some((n) => t.includes(n)) ? !1 : Pi.test(e);
|
|
2308
|
+
}, $i = (e) => {
|
|
2309
|
+
const t = e.trim();
|
|
2310
|
+
if (!t || t.length > ki || Ii.test(t) || !Di(t))
|
|
2311
|
+
return !1;
|
|
2312
|
+
const n = t.toLowerCase();
|
|
2313
|
+
return !Lt.some((o) => n.includes(o));
|
|
2314
|
+
}, Rt = (e) => {
|
|
1960
2315
|
if (!e)
|
|
1961
2316
|
return {};
|
|
1962
2317
|
const t = {};
|
|
1963
2318
|
for (const [n, o] of Object.entries(e)) {
|
|
1964
|
-
|
|
2319
|
+
const s = n.trim();
|
|
2320
|
+
if (!xi(s) || t[s] !== void 0 || typeof o != "string")
|
|
2321
|
+
continue;
|
|
2322
|
+
const i = o.trim();
|
|
2323
|
+
if ($i(i) && (t[s] = i, Object.keys(t).length === Ti))
|
|
2324
|
+
break;
|
|
2325
|
+
}
|
|
2326
|
+
return Object.fromEntries(
|
|
2327
|
+
Object.entries(t).sort(([n], [o]) => n.localeCompare(o))
|
|
2328
|
+
);
|
|
2329
|
+
}, Li = (e) => e.split(`
|
|
2330
|
+
`).map((t) => ` ${t}`).join(`
|
|
2331
|
+
`), Ri = (e, t, n) => {
|
|
2332
|
+
if (!$t(n))
|
|
2333
|
+
return null;
|
|
2334
|
+
const o = Rt(t), s = Object.keys(o);
|
|
2335
|
+
return s.length === 0 ? null : s.map((i) => `@position-try ${i} {
|
|
2336
|
+
${Li(o[i])}
|
|
2337
|
+
}`).join(`
|
|
2338
|
+
|
|
2339
|
+
`);
|
|
2340
|
+
}, _i = /* @__PURE__ */ S({
|
|
2341
|
+
__name: "ProjectCssPositionTryStylesheet",
|
|
2342
|
+
props: {
|
|
2343
|
+
publishedKey: {},
|
|
2344
|
+
positionTry: {}
|
|
2345
|
+
},
|
|
2346
|
+
setup(e) {
|
|
2347
|
+
const t = e, n = y(
|
|
2348
|
+
() => Ri(t.publishedKey, t.positionTry)
|
|
2349
|
+
);
|
|
2350
|
+
return (o, s) => n.value ? (f(), v(x("style"), {
|
|
2351
|
+
key: 0,
|
|
2352
|
+
"data-rulecms-project-position-try": ""
|
|
2353
|
+
}, {
|
|
2354
|
+
default: P(() => [
|
|
2355
|
+
j(M(n.value), 1)
|
|
2356
|
+
]),
|
|
2357
|
+
_: 1
|
|
2358
|
+
})) : T("", !0);
|
|
2359
|
+
}
|
|
2360
|
+
});
|
|
2361
|
+
function _t(e) {
|
|
2362
|
+
return e !== !1;
|
|
2363
|
+
}
|
|
2364
|
+
const Oi = [
|
|
2365
|
+
"*",
|
|
2366
|
+
"<number>",
|
|
2367
|
+
"<integer>",
|
|
2368
|
+
"<length>",
|
|
2369
|
+
"<percentage>",
|
|
2370
|
+
"<length-percentage>",
|
|
2371
|
+
"<color>",
|
|
2372
|
+
"<angle>",
|
|
2373
|
+
"<time>",
|
|
2374
|
+
"<transform-function>",
|
|
2375
|
+
"<transform-list>"
|
|
2376
|
+
], Mi = new Set(Oi), ji = /[{};]/, Ni = 40, Wi = 200, Vi = (e) => typeof e == "string" && Mi.has(e), Fi = (e, t) => t !== "*" && e === "" ? !1 : t === "*" && e === "" ? !0 : !(e.length > Wi || ji.test(e) || e.includes("url(") || e.includes("@")), Ot = (e) => {
|
|
2377
|
+
if (!Array.isArray(e))
|
|
2378
|
+
return [];
|
|
2379
|
+
const t = [], n = /* @__PURE__ */ new Set();
|
|
2380
|
+
for (const o of e) {
|
|
2381
|
+
if (!o || typeof o.name != "string" || !Q(o.name.trim()))
|
|
2382
|
+
continue;
|
|
2383
|
+
const s = o.name.trim();
|
|
2384
|
+
if (n.has(s) || t.length >= Ni || !Vi(o.syntax) || typeof o.inherits != "boolean")
|
|
2385
|
+
continue;
|
|
2386
|
+
const i = typeof o.initialValue == "string" ? o.initialValue.trim() : "";
|
|
2387
|
+
Fi(i, o.syntax) && (n.add(s), t.push({
|
|
2388
|
+
name: s,
|
|
2389
|
+
syntax: o.syntax,
|
|
2390
|
+
inherits: o.inherits,
|
|
2391
|
+
initialValue: i
|
|
2392
|
+
}));
|
|
2393
|
+
}
|
|
2394
|
+
return t;
|
|
2395
|
+
}, Bi = (e) => {
|
|
2396
|
+
const t = [
|
|
2397
|
+
`@property ${e.name} {`,
|
|
2398
|
+
` syntax: "${e.syntax}";`,
|
|
2399
|
+
` inherits: ${e.inherits ? "true" : "false"};`
|
|
2400
|
+
];
|
|
2401
|
+
return e.initialValue !== "" && t.push(` initial-value: ${e.initialValue};`), t.push("}"), t.join(`
|
|
2402
|
+
`);
|
|
2403
|
+
}, Ki = (e, t, n) => {
|
|
2404
|
+
if (!_t(n))
|
|
2405
|
+
return null;
|
|
2406
|
+
const o = Ot(t);
|
|
2407
|
+
return o.length === 0 ? null : o.map(Bi).join(`
|
|
2408
|
+
|
|
2409
|
+
`);
|
|
2410
|
+
}, Ui = /* @__PURE__ */ S({
|
|
2411
|
+
__name: "ProjectCssPropertiesStylesheet",
|
|
2412
|
+
props: {
|
|
2413
|
+
publishedKey: {},
|
|
2414
|
+
cssProperties: {}
|
|
2415
|
+
},
|
|
2416
|
+
setup(e) {
|
|
2417
|
+
const t = e, n = y(
|
|
2418
|
+
() => Ki(t.publishedKey, t.cssProperties)
|
|
2419
|
+
);
|
|
2420
|
+
return (o, s) => n.value ? (f(), v(x("style"), {
|
|
2421
|
+
key: 0,
|
|
2422
|
+
"data-rulecms-project-css-properties": ""
|
|
2423
|
+
}, {
|
|
2424
|
+
default: P(() => [
|
|
2425
|
+
j(M(n.value), 1)
|
|
2426
|
+
]),
|
|
2427
|
+
_: 1
|
|
2428
|
+
})) : T("", !0);
|
|
2429
|
+
}
|
|
2430
|
+
});
|
|
2431
|
+
function Mt(e) {
|
|
2432
|
+
return e !== !1;
|
|
2433
|
+
}
|
|
2434
|
+
const jt = (e) => e.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), zi = /[{};]/, Hi = (e) => {
|
|
2435
|
+
if (!e)
|
|
2436
|
+
return {};
|
|
2437
|
+
const t = {};
|
|
2438
|
+
for (const [n, o] of Object.entries(e)) {
|
|
2439
|
+
if (!Q(n) || typeof o != "string")
|
|
1965
2440
|
continue;
|
|
1966
2441
|
const s = o.trim();
|
|
1967
|
-
s === "" ||
|
|
2442
|
+
s === "" || zi.test(s) || (t[n.trim()] = s);
|
|
1968
2443
|
}
|
|
1969
2444
|
return t;
|
|
1970
|
-
},
|
|
1971
|
-
|
|
1972
|
-
|
|
2445
|
+
}, Gi = (e, t, n) => {
|
|
2446
|
+
if (!Mt(n))
|
|
2447
|
+
return null;
|
|
2448
|
+
const o = Hi(t), s = Object.keys(o);
|
|
2449
|
+
if (s.length === 0 || !e)
|
|
1973
2450
|
return null;
|
|
1974
|
-
const
|
|
2451
|
+
const i = `[data-rulecms-published-key="${jt(e)}"] > *`, l = s.sort((r, u) => r.localeCompare(u)).map((r) => ` ${r}: ${o[r]};`).join(`
|
|
1975
2452
|
`);
|
|
1976
|
-
return `${
|
|
1977
|
-
${
|
|
2453
|
+
return `${i} {
|
|
2454
|
+
${l}
|
|
2455
|
+
}`;
|
|
2456
|
+
};
|
|
2457
|
+
function Nt(e) {
|
|
2458
|
+
return e !== !1;
|
|
2459
|
+
}
|
|
2460
|
+
const Yi = 5, Xi = 200, Ji = [
|
|
2461
|
+
{ kind: "prefers-color-scheme", value: "dark" },
|
|
2462
|
+
{ kind: "prefers-color-scheme", value: "light" },
|
|
2463
|
+
{ kind: "html-class", value: "dark" },
|
|
2464
|
+
{ kind: "data-theme", value: "dark" },
|
|
2465
|
+
{ kind: "data-theme", value: "light" }
|
|
2466
|
+
], qi = /[{};]/, Zi = (e) => {
|
|
2467
|
+
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
2468
|
+
return !1;
|
|
2469
|
+
const t = e;
|
|
2470
|
+
return Ji.some(
|
|
2471
|
+
(n) => n.kind === t.kind && n.value === t.value
|
|
2472
|
+
);
|
|
2473
|
+
}, Qi = (e) => {
|
|
2474
|
+
if (!e || typeof e != "object" || Array.isArray(e))
|
|
2475
|
+
return {};
|
|
2476
|
+
const t = {};
|
|
2477
|
+
for (const [n, o] of Object.entries(e)) {
|
|
2478
|
+
if (!Q(n) || typeof o != "string")
|
|
2479
|
+
continue;
|
|
2480
|
+
const s = o.trim();
|
|
2481
|
+
s === "" || qi.test(s) || s.includes("url(") || s.includes("@") || (t[n.trim()] = s);
|
|
2482
|
+
}
|
|
2483
|
+
return Object.fromEntries(
|
|
2484
|
+
Object.entries(t).sort(([n], [o]) => n.localeCompare(o))
|
|
2485
|
+
);
|
|
2486
|
+
}, Wt = (e) => {
|
|
2487
|
+
if (!Array.isArray(e))
|
|
2488
|
+
return [];
|
|
2489
|
+
const t = [], n = /* @__PURE__ */ new Set();
|
|
2490
|
+
let o = 0;
|
|
2491
|
+
for (const s of e) {
|
|
2492
|
+
if (!s || !Zi(s.condition))
|
|
2493
|
+
continue;
|
|
2494
|
+
const i = `${s.condition.kind}:${s.condition.value}`;
|
|
2495
|
+
if (n.has(i))
|
|
2496
|
+
continue;
|
|
2497
|
+
const l = Qi(s.variables), r = o + Object.keys(l).length;
|
|
2498
|
+
if (!(Object.keys(l).length === 0 || r > Xi) && (n.add(i), o = r, t.push({ condition: s.condition, variables: l }), t.length === Yi))
|
|
2499
|
+
break;
|
|
2500
|
+
}
|
|
2501
|
+
return t;
|
|
2502
|
+
}, er = (e, t) => {
|
|
2503
|
+
const n = Object.entries(e).map(([o, s]) => ` ${o}: ${s};`);
|
|
2504
|
+
return `${t} {
|
|
2505
|
+
${n.join(`
|
|
2506
|
+
`)}
|
|
1978
2507
|
}`;
|
|
1979
|
-
},
|
|
2508
|
+
}, tr = (e) => e.split(`
|
|
2509
|
+
`).map((t) => ` ${t}`).join(`
|
|
2510
|
+
`), nr = (e, t) => {
|
|
2511
|
+
const n = er(e.variables, t), { kind: o, value: s } = e.condition;
|
|
2512
|
+
return o === "prefers-color-scheme" ? `@media (prefers-color-scheme: ${s}) {
|
|
2513
|
+
${tr(n)}
|
|
2514
|
+
}` : o === "html-class" ? `html.${s} ${n}` : `[data-theme="${s}"] ${n}`;
|
|
2515
|
+
}, or = (e, t, n) => {
|
|
2516
|
+
if (!Nt(n) || !e)
|
|
2517
|
+
return null;
|
|
2518
|
+
const o = Wt(t);
|
|
2519
|
+
if (o.length === 0)
|
|
2520
|
+
return null;
|
|
2521
|
+
const s = `[data-rulecms-published-key="${jt(e)}"] > *`;
|
|
2522
|
+
return o.map((i) => nr(i, s)).join(`
|
|
2523
|
+
|
|
2524
|
+
`);
|
|
2525
|
+
}, sr = /* @__PURE__ */ S({
|
|
2526
|
+
__name: "ProjectCssThemesStylesheet",
|
|
2527
|
+
props: {
|
|
2528
|
+
publishedKey: {},
|
|
2529
|
+
themes: {}
|
|
2530
|
+
},
|
|
2531
|
+
setup(e) {
|
|
2532
|
+
const t = e, n = y(
|
|
2533
|
+
() => or(t.publishedKey, t.themes)
|
|
2534
|
+
);
|
|
2535
|
+
return (o, s) => n.value ? (f(), v(x("style"), {
|
|
2536
|
+
key: 0,
|
|
2537
|
+
"data-rulecms-project-themes": ""
|
|
2538
|
+
}, {
|
|
2539
|
+
default: P(() => [
|
|
2540
|
+
j(M(n.value), 1)
|
|
2541
|
+
]),
|
|
2542
|
+
_: 1
|
|
2543
|
+
})) : T("", !0);
|
|
2544
|
+
}
|
|
2545
|
+
}), ir = /* @__PURE__ */ S({
|
|
1980
2546
|
__name: "ProjectCssVariablesStylesheet",
|
|
1981
2547
|
props: {
|
|
1982
2548
|
publishedKey: {},
|
|
1983
2549
|
variables: {}
|
|
1984
2550
|
},
|
|
1985
2551
|
setup(e) {
|
|
1986
|
-
const t = e, n =
|
|
1987
|
-
() =>
|
|
2552
|
+
const t = e, n = y(
|
|
2553
|
+
() => Gi(t.publishedKey, t.variables)
|
|
1988
2554
|
);
|
|
1989
|
-
return (o, s) => n.value ? (
|
|
2555
|
+
return (o, s) => n.value ? (f(), v(x("style"), {
|
|
1990
2556
|
key: 0,
|
|
1991
2557
|
"data-rulecms-project-css-variables": ""
|
|
1992
2558
|
}, {
|
|
1993
|
-
default:
|
|
1994
|
-
|
|
2559
|
+
default: P(() => [
|
|
2560
|
+
j(M(n.value), 1)
|
|
2561
|
+
]),
|
|
2562
|
+
_: 1
|
|
2563
|
+
})) : T("", !0);
|
|
2564
|
+
}
|
|
2565
|
+
});
|
|
2566
|
+
function Vt(e) {
|
|
2567
|
+
return e !== !1;
|
|
2568
|
+
}
|
|
2569
|
+
const rr = [
|
|
2570
|
+
"light",
|
|
2571
|
+
"dark",
|
|
2572
|
+
"light dark"
|
|
2573
|
+
], lr = ["auto", "thin", "none"], cr = new Set(rr), ar = new Set(lr), ur = /[{};]|url\(|@/i, dr = (e) => typeof e == "string" && e.trim() !== "" && e.trim().length <= 400 && !ur.test(e), ae = (e) => dr(e) ? e.trim() : void 0, Ft = (e) => {
|
|
2574
|
+
if (!e || typeof e != "object" || Array.isArray(e))
|
|
2575
|
+
return null;
|
|
2576
|
+
const t = ae(e.selectionBackground), n = ae(e.selectionColor), o = ae(e.caretColor), s = ae(e.scrollbarColor), i = {
|
|
2577
|
+
...typeof e.colorScheme == "string" && cr.has(e.colorScheme) ? { colorScheme: e.colorScheme } : {},
|
|
2578
|
+
...t ? { selectionBackground: t } : {},
|
|
2579
|
+
...n ? { selectionColor: n } : {},
|
|
2580
|
+
...o ? { caretColor: o } : {},
|
|
2581
|
+
...s ? { scrollbarColor: s } : {},
|
|
2582
|
+
...typeof e.scrollbarWidth == "string" && ar.has(e.scrollbarWidth) ? { scrollbarWidth: e.scrollbarWidth } : {}
|
|
2583
|
+
};
|
|
2584
|
+
return Object.keys(i).length > 0 ? i : null;
|
|
2585
|
+
}, pr = (e, t, n) => {
|
|
2586
|
+
if (!Vt(n) || !e)
|
|
2587
|
+
return null;
|
|
2588
|
+
const o = Ft(t);
|
|
2589
|
+
if (!o)
|
|
2590
|
+
return null;
|
|
2591
|
+
const s = `[data-rulecms-published-key="${It(e)}"]`, i = [];
|
|
2592
|
+
o.colorScheme && i.push(` color-scheme: ${o.colorScheme};`), o.caretColor && i.push(` caret-color: ${o.caretColor};`), o.scrollbarWidth && i.push(` scrollbar-width: ${o.scrollbarWidth};`), o.scrollbarColor && i.push(` scrollbar-color: ${o.scrollbarColor};`);
|
|
2593
|
+
const l = [];
|
|
2594
|
+
o.selectionBackground && l.push(` background: ${o.selectionBackground};`), o.selectionColor && l.push(` color: ${o.selectionColor};`);
|
|
2595
|
+
const r = [];
|
|
2596
|
+
return i.length > 0 && r.push(`${s} > * {
|
|
2597
|
+
${i.join(`
|
|
2598
|
+
`)}
|
|
2599
|
+
}`), l.length > 0 && r.push(`${s} > * ::selection {
|
|
2600
|
+
${l.join(`
|
|
2601
|
+
`)}
|
|
2602
|
+
}`), r.length > 0 ? r.join(`
|
|
2603
|
+
`) : null;
|
|
2604
|
+
}, fr = /* @__PURE__ */ S({
|
|
2605
|
+
__name: "ProjectCssWidgetChromeStylesheet",
|
|
2606
|
+
props: {
|
|
2607
|
+
publishedKey: {},
|
|
2608
|
+
widgetChrome: {}
|
|
2609
|
+
},
|
|
2610
|
+
setup(e) {
|
|
2611
|
+
const t = e, n = y(
|
|
2612
|
+
() => pr(t.publishedKey, t.widgetChrome)
|
|
2613
|
+
);
|
|
2614
|
+
return (o, s) => n.value ? (f(), v(x("style"), {
|
|
2615
|
+
key: 0,
|
|
2616
|
+
"data-rulecms-project-widget-chrome": ""
|
|
2617
|
+
}, {
|
|
2618
|
+
default: P(() => [
|
|
2619
|
+
j(M(n.value), 1)
|
|
1995
2620
|
]),
|
|
1996
2621
|
_: 1
|
|
1997
|
-
})) :
|
|
2622
|
+
})) : T("", !0);
|
|
1998
2623
|
}
|
|
1999
2624
|
});
|
|
2000
|
-
function
|
|
2625
|
+
function yr(e) {
|
|
2626
|
+
return e !== !1;
|
|
2627
|
+
}
|
|
2628
|
+
function mr(e) {
|
|
2001
2629
|
const t = {};
|
|
2002
2630
|
return Object.entries(e).forEach(([n, o]) => {
|
|
2003
2631
|
const s = { ...o };
|
|
2004
2632
|
if (s.itemList)
|
|
2005
2633
|
try {
|
|
2006
2634
|
s.collectionRows = typeof s.itemList == "string" ? JSON.parse(s.itemList) : s.itemList;
|
|
2007
|
-
} catch (
|
|
2008
|
-
console.error(`Failed to parse itemList for collection ${n}:`,
|
|
2635
|
+
} catch (l) {
|
|
2636
|
+
console.error(`Failed to parse itemList for collection ${n}:`, l), s.collectionRows = { rows: [] };
|
|
2009
2637
|
}
|
|
2010
2638
|
let i = `${s.name}$${n}`;
|
|
2011
2639
|
s.parentId && (i = `${i}@${s.parentId}`), t[i] = s;
|
|
2012
2640
|
}), t;
|
|
2013
2641
|
}
|
|
2014
|
-
function
|
|
2642
|
+
function hr(e) {
|
|
2015
2643
|
return typeof e.itemList == "string" ? JSON.parse(e.itemList) : e.itemList;
|
|
2016
2644
|
}
|
|
2017
|
-
function
|
|
2645
|
+
function Ne(e) {
|
|
2646
|
+
const t = ye(e.fontFaces), n = xt(e.keyframes), o = Wt(e.themes), s = Ot(e.cssProperties), i = Ft(e.widgetChrome), l = Rt(e.positionTry), r = yr(e.includeClassLayer) && Tt(e.classLayer) ? e.classLayer : void 0;
|
|
2018
2647
|
return {
|
|
2019
|
-
displayItemList:
|
|
2020
|
-
widgetCollections:
|
|
2648
|
+
displayItemList: hr(e.widget),
|
|
2649
|
+
widgetCollections: mr(e.childCollections),
|
|
2021
2650
|
...e.libraries ? { libraries: e.libraries } : {},
|
|
2022
|
-
...e.cssVariables && Object.keys(e.cssVariables).length > 0 ? { cssVariables: e.cssVariables } : {},
|
|
2023
|
-
...
|
|
2651
|
+
...Mt(e.includeCssVariables) && e.cssVariables && Object.keys(e.cssVariables).length > 0 ? { cssVariables: e.cssVariables } : {},
|
|
2652
|
+
...kt(e.includeClassDefinitions) && e.classDefinitions && Object.keys(e.classDefinitions).length > 0 ? { classDefinitions: e.classDefinitions } : {},
|
|
2653
|
+
...je(e.includeFontFaces) && t.length > 0 ? { fontFaces: t } : {},
|
|
2654
|
+
...Pt(e.includeKeyframes) && Object.keys(n).length > 0 ? { keyframes: n } : {},
|
|
2655
|
+
...Nt(e.includeThemes) && o.length > 0 ? { themes: o } : {},
|
|
2656
|
+
..._t(e.includeCssProperties) && s.length > 0 ? { cssProperties: s } : {},
|
|
2657
|
+
...Vt(e.includeWidgetChrome) && i ? { widgetChrome: i } : {},
|
|
2658
|
+
...r ? { classLayer: r } : {},
|
|
2659
|
+
...$t(e.includePositionTry) && Object.keys(l).length > 0 ? { positionTry: l } : {}
|
|
2024
2660
|
};
|
|
2025
2661
|
}
|
|
2026
|
-
function
|
|
2027
|
-
const t = e.registry ??
|
|
2662
|
+
function gr(e) {
|
|
2663
|
+
const t = e.registry ?? pe(), n = De({
|
|
2028
2664
|
displayItemList: e.displayItemList,
|
|
2029
2665
|
widgetCollections: e.widgetCollections
|
|
2030
2666
|
});
|
|
2031
2667
|
return t.resolveSync({ registrations: e.libraries, referenced: n });
|
|
2032
2668
|
}
|
|
2033
|
-
function
|
|
2034
|
-
const t = e.registry ??
|
|
2669
|
+
function br(e) {
|
|
2670
|
+
const t = e.registry ?? pe(), n = De({
|
|
2035
2671
|
displayItemList: e.displayItemList,
|
|
2036
2672
|
widgetCollections: e.widgetCollections
|
|
2037
2673
|
});
|
|
2038
2674
|
return t.resolve({ registrations: e.libraries, referenced: n });
|
|
2039
2675
|
}
|
|
2040
|
-
|
|
2676
|
+
function Cr(e) {
|
|
2677
|
+
const t = e.lastIndexOf(Ee);
|
|
2678
|
+
return t === -1 ? e : e.slice(t + Ee.length);
|
|
2679
|
+
}
|
|
2680
|
+
const wr = "text/plain";
|
|
2681
|
+
function vr({
|
|
2682
|
+
token: e,
|
|
2683
|
+
rulesetPublishedKey: t,
|
|
2684
|
+
params: n
|
|
2685
|
+
}) {
|
|
2686
|
+
return K(e) ? {
|
|
2687
|
+
token: e,
|
|
2688
|
+
rulesetKey: Cr(t),
|
|
2689
|
+
...n ? { params: n } : {}
|
|
2690
|
+
} : {
|
|
2691
|
+
token: e,
|
|
2692
|
+
rulesetPublishedKey: t,
|
|
2693
|
+
...n ? { params: n } : {},
|
|
2694
|
+
mode: "payload"
|
|
2695
|
+
};
|
|
2696
|
+
}
|
|
2697
|
+
function Bt({
|
|
2698
|
+
contentType: e = wr,
|
|
2699
|
+
...t
|
|
2700
|
+
}) {
|
|
2701
|
+
return {
|
|
2702
|
+
method: "POST",
|
|
2703
|
+
headers: { "Content-Type": e },
|
|
2704
|
+
body: JSON.stringify(vr(t))
|
|
2705
|
+
};
|
|
2706
|
+
}
|
|
2707
|
+
const Ze = "rulecms_anon_id";
|
|
2708
|
+
function Qe() {
|
|
2709
|
+
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e) => {
|
|
2710
|
+
const t = Math.random() * 16 | 0;
|
|
2711
|
+
return (e === "x" ? t : t & 3 | 8).toString(16);
|
|
2712
|
+
});
|
|
2713
|
+
}
|
|
2714
|
+
function Ar() {
|
|
2715
|
+
if (!(typeof window > "u"))
|
|
2716
|
+
try {
|
|
2717
|
+
const e = window.localStorage.getItem(Ze);
|
|
2718
|
+
if (e)
|
|
2719
|
+
return e;
|
|
2720
|
+
const t = Qe();
|
|
2721
|
+
return window.localStorage.setItem(Ze, t), t;
|
|
2722
|
+
} catch {
|
|
2723
|
+
return Qe();
|
|
2724
|
+
}
|
|
2725
|
+
}
|
|
2726
|
+
function Kt(e) {
|
|
2727
|
+
return e >= 500;
|
|
2728
|
+
}
|
|
2729
|
+
function Er(e) {
|
|
2730
|
+
if (!(e != null && e.success) || !e.data)
|
|
2731
|
+
return null;
|
|
2732
|
+
const { selection: t, ...n } = e.data;
|
|
2733
|
+
return { raw: n, selection: t };
|
|
2734
|
+
}
|
|
2735
|
+
function Sr(e, t) {
|
|
2736
|
+
if (!(e != null && e.resolution) || !e.widget)
|
|
2737
|
+
return null;
|
|
2738
|
+
const { resolution: n, ...o } = e, s = {
|
|
2739
|
+
rulesetPublishedKey: t,
|
|
2740
|
+
outcome: n.outcome,
|
|
2741
|
+
ruleId: n.ruleId ?? null,
|
|
2742
|
+
variantId: n.variantId ?? null,
|
|
2743
|
+
widgetKey: n.widgetKey,
|
|
2744
|
+
widgetPublishedKey: n.widgetPublishedKey
|
|
2745
|
+
};
|
|
2746
|
+
return { raw: o, selection: s };
|
|
2747
|
+
}
|
|
2748
|
+
function Ut({
|
|
2749
|
+
token: e,
|
|
2750
|
+
rulesetPublishedKey: t,
|
|
2751
|
+
body: n
|
|
2752
|
+
}) {
|
|
2753
|
+
return K(e) ? Sr(n, t) : Er(n);
|
|
2754
|
+
}
|
|
2755
|
+
function kr(e) {
|
|
2756
|
+
return JSON.stringify(e, (t, n) => {
|
|
2757
|
+
if (n === null || typeof n != "object" || Array.isArray(n))
|
|
2758
|
+
return n;
|
|
2759
|
+
const o = {};
|
|
2760
|
+
for (const s of Object.keys(n).sort())
|
|
2761
|
+
o[s] = n[s];
|
|
2762
|
+
return o;
|
|
2763
|
+
});
|
|
2764
|
+
}
|
|
2765
|
+
const Tr = {
|
|
2041
2766
|
display: "flex",
|
|
2042
2767
|
justifyContent: "center",
|
|
2043
2768
|
alignItems: "center",
|
|
2044
2769
|
padding: "3rem",
|
|
2045
2770
|
color: "#e2e8f0"
|
|
2046
|
-
},
|
|
2771
|
+
}, Ir = {
|
|
2047
2772
|
display: "flex",
|
|
2048
2773
|
alignItems: "center",
|
|
2049
2774
|
gap: "1rem"
|
|
2050
|
-
},
|
|
2775
|
+
}, Pr = {
|
|
2051
2776
|
width: "40px",
|
|
2052
2777
|
height: "40px",
|
|
2053
2778
|
border: "4px solid #4a5568",
|
|
2054
2779
|
borderTopColor: "#63b3ed",
|
|
2055
2780
|
borderRadius: "50%",
|
|
2056
2781
|
animation: "spin 1s linear infinite"
|
|
2057
|
-
},
|
|
2782
|
+
}, et = {
|
|
2058
2783
|
padding: "1.5rem",
|
|
2059
2784
|
backgroundColor: "#742a2a",
|
|
2060
2785
|
border: "1px solid #9b2c2c",
|
|
2061
2786
|
borderRadius: "8px",
|
|
2062
2787
|
color: "#fed7d7"
|
|
2063
|
-
},
|
|
2788
|
+
}, tt = {
|
|
2064
2789
|
fontSize: "16px",
|
|
2065
2790
|
fontWeight: "600",
|
|
2066
2791
|
marginBottom: "0.5rem",
|
|
2067
2792
|
color: "#feb2b2"
|
|
2068
|
-
},
|
|
2793
|
+
}, nt = {
|
|
2069
2794
|
fontSize: "14px",
|
|
2070
2795
|
color: "#fed7d7"
|
|
2071
|
-
},
|
|
2796
|
+
}, Dr = `
|
|
2072
2797
|
@keyframes spin {
|
|
2073
2798
|
from {
|
|
2074
2799
|
transform: rotate(0deg);
|
|
@@ -2077,109 +2802,176 @@ const es = {
|
|
|
2077
2802
|
transform: rotate(360deg);
|
|
2078
2803
|
}
|
|
2079
2804
|
}
|
|
2080
|
-
`,
|
|
2805
|
+
`, Jr = "data-rulecms-published-key", xr = ["data-rulecms-published-key"], qr = /* @__PURE__ */ S({
|
|
2081
2806
|
__name: "RuleCMSWidget",
|
|
2082
2807
|
props: {
|
|
2083
2808
|
publishedKey: {},
|
|
2809
|
+
rulesetPublishedKey: {},
|
|
2810
|
+
params: {},
|
|
2811
|
+
anonymousId: { type: [String, Boolean] },
|
|
2812
|
+
fallbackPublishedKey: {},
|
|
2813
|
+
contentType: {},
|
|
2084
2814
|
token: {},
|
|
2085
2815
|
endpoint: {},
|
|
2086
2816
|
mode: { default: "client-fetch" },
|
|
2087
2817
|
initialData: {},
|
|
2088
2818
|
libraries: {},
|
|
2089
2819
|
componentProps: {},
|
|
2090
|
-
mounts: {}
|
|
2820
|
+
mounts: {},
|
|
2821
|
+
placeholderValues: {},
|
|
2822
|
+
onSelection: {}
|
|
2091
2823
|
},
|
|
2092
2824
|
setup(e) {
|
|
2093
|
-
const t = e, n =
|
|
2094
|
-
sourceComponents:
|
|
2095
|
-
}));
|
|
2096
|
-
let
|
|
2097
|
-
function
|
|
2825
|
+
const t = e, n = tn(yt, null), o = H(!0), s = H(null), i = H(null), l = H(null), r = H(null), u = H(""), a = y(() => t.mode === "pre-fetched"), c = y(() => ({
|
|
2826
|
+
sourceComponents: l.value ?? void 0
|
|
2827
|
+
})), p = y(() => t.publishedKey || u.value);
|
|
2828
|
+
let m = null, d = null, h = !1, b = 0;
|
|
2829
|
+
function C() {
|
|
2098
2830
|
if (!i.value) {
|
|
2099
|
-
|
|
2831
|
+
l.value = null;
|
|
2100
2832
|
return;
|
|
2101
2833
|
}
|
|
2102
|
-
const
|
|
2834
|
+
const I = t.libraries ?? (n == null ? void 0 : n.libraries), $ = n == null ? void 0 : n.libraryRegistry, V = gr({
|
|
2103
2835
|
displayItemList: i.value.displayItemList,
|
|
2104
2836
|
widgetCollections: i.value.widgetCollections,
|
|
2105
|
-
libraries:
|
|
2106
|
-
registry:
|
|
2837
|
+
libraries: I,
|
|
2838
|
+
registry: $
|
|
2107
2839
|
});
|
|
2108
|
-
if (
|
|
2109
|
-
|
|
2840
|
+
if (V) {
|
|
2841
|
+
l.value = V;
|
|
2110
2842
|
return;
|
|
2111
2843
|
}
|
|
2112
|
-
|
|
2844
|
+
br({
|
|
2113
2845
|
displayItemList: i.value.displayItemList,
|
|
2114
2846
|
widgetCollections: i.value.widgetCollections,
|
|
2115
|
-
libraries:
|
|
2116
|
-
registry:
|
|
2117
|
-
}).then((
|
|
2118
|
-
|
|
2847
|
+
libraries: I,
|
|
2848
|
+
registry: $
|
|
2849
|
+
}).then((_) => {
|
|
2850
|
+
l.value = _;
|
|
2119
2851
|
});
|
|
2120
2852
|
}
|
|
2121
|
-
function
|
|
2122
|
-
i.value &&
|
|
2853
|
+
function g() {
|
|
2854
|
+
i.value && is({
|
|
2123
2855
|
componentProps: t.componentProps,
|
|
2124
2856
|
displayItemList: i.value.displayItemList,
|
|
2125
2857
|
widgetCollections: i.value.widgetCollections,
|
|
2126
|
-
publishedKey:
|
|
2858
|
+
publishedKey: p.value
|
|
2127
2859
|
});
|
|
2128
2860
|
}
|
|
2129
|
-
function
|
|
2130
|
-
if (
|
|
2861
|
+
function ee() {
|
|
2862
|
+
if (h || typeof document > "u")
|
|
2131
2863
|
return;
|
|
2132
|
-
const
|
|
2133
|
-
if (!document.getElementById(
|
|
2134
|
-
const
|
|
2135
|
-
|
|
2864
|
+
const I = "rulecms-widget-spinner-styles";
|
|
2865
|
+
if (!document.getElementById(I)) {
|
|
2866
|
+
const $ = document.createElement("style");
|
|
2867
|
+
$.id = I, $.textContent = Dr, document.head.appendChild($);
|
|
2136
2868
|
}
|
|
2137
|
-
|
|
2869
|
+
h = !0;
|
|
2138
2870
|
}
|
|
2139
|
-
function
|
|
2140
|
-
const
|
|
2141
|
-
if (!t.publishedKey || !
|
|
2142
|
-
s.value =
|
|
2871
|
+
function me() {
|
|
2872
|
+
const I = t.token ?? (n == null ? void 0 : n.token), $ = t.endpoint ?? (n == null ? void 0 : n.endpoint), V = K(I), _ = t.rulesetPublishedKey;
|
|
2873
|
+
if (!t.publishedKey && !_ || !I) {
|
|
2874
|
+
!t.publishedKey && !_ ? s.value = _ !== void 0 ? V ? "Ruleset key is required" : "Ruleset published key is required" : V ? "Widget key is required" : "Published key is required" : s.value = "Token is required. Provide it either directly as a prop (`token`) or via RuleCMSWidgetProvider.", i.value = null, o.value = !1;
|
|
2143
2875
|
return;
|
|
2144
2876
|
}
|
|
2145
|
-
const
|
|
2146
|
-
|
|
2147
|
-
|
|
2877
|
+
const X = kr(t.params), ne = JSON.stringify({
|
|
2878
|
+
publishedKey: t.publishedKey,
|
|
2879
|
+
rulesetPublishedKey: _,
|
|
2880
|
+
token: I,
|
|
2881
|
+
endpoint: $,
|
|
2882
|
+
paramsKey: X,
|
|
2883
|
+
anonymousId: t.anonymousId,
|
|
2884
|
+
fallbackPublishedKey: t.fallbackPublishedKey,
|
|
2885
|
+
contentType: t.contentType
|
|
2886
|
+
});
|
|
2887
|
+
if (d === ne && i.value) {
|
|
2888
|
+
o.value = !1, C();
|
|
2148
2889
|
return;
|
|
2149
2890
|
}
|
|
2150
|
-
|
|
2151
|
-
const
|
|
2152
|
-
|
|
2153
|
-
const
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2891
|
+
m == null || m.abort(), m = new AbortController();
|
|
2892
|
+
const oe = m.signal;
|
|
2893
|
+
d = ne, o.value = !0, s.value = null;
|
|
2894
|
+
const le = ++b, se = async (A) => (await A.json().catch(() => ({ error: "Unknown error" }))).error || `Request failed with status ${A.status}`, J = async (A) => {
|
|
2895
|
+
const O = ut({ publishedKey: A, token: I, endpoint: $ }), N = await fetch(O, {
|
|
2896
|
+
method: "GET",
|
|
2897
|
+
...V ? { cache: "no-store" } : {},
|
|
2898
|
+
signal: oe
|
|
2899
|
+
});
|
|
2900
|
+
if (!N.ok)
|
|
2901
|
+
throw new te(await se(N));
|
|
2902
|
+
const L = await N.json();
|
|
2903
|
+
if (!L.success)
|
|
2904
|
+
throw new te("Failed to fetch widget data");
|
|
2905
|
+
return L.data;
|
|
2906
|
+
};
|
|
2907
|
+
(_ ? (async () => {
|
|
2908
|
+
const A = X ? JSON.parse(X) : {};
|
|
2909
|
+
if (t.anonymousId !== !1) {
|
|
2910
|
+
if (typeof t.anonymousId == "string")
|
|
2911
|
+
A.anonId = A.anonId ?? t.anonymousId;
|
|
2912
|
+
else if (A.anonId == null) {
|
|
2913
|
+
const L = Ar();
|
|
2914
|
+
L && (A.anonId = L);
|
|
2915
|
+
}
|
|
2916
|
+
}
|
|
2917
|
+
let O;
|
|
2918
|
+
try {
|
|
2919
|
+
O = await fetch(dt({ token: I, endpoint: $ }), {
|
|
2920
|
+
...Bt({
|
|
2921
|
+
token: I,
|
|
2922
|
+
rulesetPublishedKey: _,
|
|
2923
|
+
params: A,
|
|
2924
|
+
contentType: t.contentType
|
|
2925
|
+
}),
|
|
2926
|
+
signal: oe
|
|
2927
|
+
});
|
|
2928
|
+
} catch (L) {
|
|
2929
|
+
if (L instanceof DOMException && L.name === "AbortError")
|
|
2930
|
+
throw L;
|
|
2931
|
+
if (t.fallbackPublishedKey)
|
|
2932
|
+
return { raw: await J(t.fallbackPublishedKey), selection: null };
|
|
2933
|
+
throw L;
|
|
2166
2934
|
}
|
|
2167
|
-
|
|
2168
|
-
|
|
2935
|
+
if (!O.ok) {
|
|
2936
|
+
if (t.fallbackPublishedKey && Kt(O.status))
|
|
2937
|
+
return { raw: await J(t.fallbackPublishedKey), selection: null };
|
|
2938
|
+
throw new te(await se(O));
|
|
2939
|
+
}
|
|
2940
|
+
const N = Ut({
|
|
2941
|
+
token: I,
|
|
2942
|
+
rulesetPublishedKey: _,
|
|
2943
|
+
body: await O.json()
|
|
2944
|
+
});
|
|
2945
|
+
if (!N)
|
|
2946
|
+
throw new te("Failed to fetch widget data");
|
|
2947
|
+
return { raw: N.raw, selection: N.selection };
|
|
2948
|
+
})() : J(t.publishedKey).then((A) => ({
|
|
2949
|
+
raw: A,
|
|
2950
|
+
selection: null
|
|
2951
|
+
}))).then(({ raw: A, selection: O }) => {
|
|
2952
|
+
var N, L;
|
|
2953
|
+
i.value = Ne(A), u.value = ((N = A.widget) == null ? void 0 : N.publishedKey) ?? "", r.value = O, s.value = null, C(), g(), O && ((L = t.onSelection) == null || L.call(t, O));
|
|
2954
|
+
}).catch((A) => {
|
|
2955
|
+
A instanceof DOMException && A.name === "AbortError" || (console.error("Error fetching widget:", A), s.value = A instanceof te ? A.message : "Failed to fetch widget", i.value = null, r.value = null);
|
|
2169
2956
|
}).finally(() => {
|
|
2170
|
-
o.value = !1;
|
|
2957
|
+
b === le && (o.value = !1);
|
|
2171
2958
|
});
|
|
2172
2959
|
}
|
|
2173
|
-
function
|
|
2960
|
+
function Gt() {
|
|
2174
2961
|
if (t.mode === "pre-fetched") {
|
|
2175
|
-
i.value = t.initialData ?? null, o.value = !1, s.value = null,
|
|
2962
|
+
i.value = t.initialData ?? null, o.value = !1, s.value = null, C(), g();
|
|
2176
2963
|
return;
|
|
2177
2964
|
}
|
|
2178
|
-
|
|
2965
|
+
ee(), me();
|
|
2179
2966
|
}
|
|
2180
|
-
|
|
2967
|
+
st(
|
|
2181
2968
|
() => [
|
|
2182
2969
|
t.publishedKey,
|
|
2970
|
+
t.rulesetPublishedKey,
|
|
2971
|
+
t.params,
|
|
2972
|
+
t.anonymousId,
|
|
2973
|
+
t.fallbackPublishedKey,
|
|
2974
|
+
t.contentType,
|
|
2183
2975
|
t.token,
|
|
2184
2976
|
t.endpoint,
|
|
2185
2977
|
t.mode,
|
|
@@ -2188,65 +2980,97 @@ const es = {
|
|
|
2188
2980
|
t.componentProps
|
|
2189
2981
|
],
|
|
2190
2982
|
() => {
|
|
2191
|
-
|
|
2983
|
+
Gt();
|
|
2192
2984
|
},
|
|
2193
2985
|
{ immediate: !0 }
|
|
2194
|
-
),
|
|
2195
|
-
|
|
2196
|
-
})
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
"
|
|
2986
|
+
), it(() => {
|
|
2987
|
+
m == null || m.abort();
|
|
2988
|
+
});
|
|
2989
|
+
class te extends Error {
|
|
2990
|
+
constructor($) {
|
|
2991
|
+
super($), this.name = "FetchWidgetMessage";
|
|
2992
|
+
}
|
|
2993
|
+
}
|
|
2994
|
+
return (I, $) => {
|
|
2995
|
+
var V, _, X, ne, oe, le, se, J, he;
|
|
2996
|
+
return f(), w("span", {
|
|
2997
|
+
"data-rulecms-published-key": p.value,
|
|
2200
2998
|
style: { display: "contents" }
|
|
2201
2999
|
}, [
|
|
2202
|
-
|
|
2203
|
-
"published-key":
|
|
2204
|
-
|
|
3000
|
+
R(ui, {
|
|
3001
|
+
"published-key": p.value,
|
|
3002
|
+
fonts: (V = i.value) == null ? void 0 : V.fontFaces
|
|
3003
|
+
}, null, 8, ["published-key", "fonts"]),
|
|
3004
|
+
R(Ei, {
|
|
3005
|
+
"published-key": p.value,
|
|
3006
|
+
keyframes: (_ = i.value) == null ? void 0 : _.keyframes
|
|
3007
|
+
}, null, 8, ["published-key", "keyframes"]),
|
|
3008
|
+
R(sr, {
|
|
3009
|
+
"published-key": p.value,
|
|
3010
|
+
themes: (X = i.value) == null ? void 0 : X.themes
|
|
3011
|
+
}, null, 8, ["published-key", "themes"]),
|
|
3012
|
+
R(Ui, {
|
|
3013
|
+
"published-key": p.value,
|
|
3014
|
+
"css-properties": (ne = i.value) == null ? void 0 : ne.cssProperties
|
|
3015
|
+
}, null, 8, ["published-key", "css-properties"]),
|
|
3016
|
+
R(fr, {
|
|
3017
|
+
"published-key": p.value,
|
|
3018
|
+
"widget-chrome": (oe = i.value) == null ? void 0 : oe.widgetChrome
|
|
3019
|
+
}, null, 8, ["published-key", "widget-chrome"]),
|
|
3020
|
+
R(_i, {
|
|
3021
|
+
"published-key": p.value,
|
|
3022
|
+
"position-try": (le = i.value) == null ? void 0 : le.positionTry
|
|
3023
|
+
}, null, 8, ["published-key", "position-try"]),
|
|
3024
|
+
R(ir, {
|
|
3025
|
+
"published-key": p.value,
|
|
3026
|
+
variables: (se = i.value) == null ? void 0 : se.cssVariables
|
|
2205
3027
|
}, null, 8, ["published-key", "variables"]),
|
|
2206
|
-
|
|
2207
|
-
"published-key":
|
|
2208
|
-
classes: (
|
|
2209
|
-
|
|
2210
|
-
|
|
3028
|
+
R(Ks, {
|
|
3029
|
+
"published-key": p.value,
|
|
3030
|
+
classes: (J = i.value) == null ? void 0 : J.classDefinitions,
|
|
3031
|
+
"class-layer": (he = i.value) == null ? void 0 : he.classLayer
|
|
3032
|
+
}, null, 8, ["published-key", "classes", "class-layer"]),
|
|
3033
|
+
e.mode !== "pre-fetched" && o.value ? (f(), w("div", {
|
|
2211
3034
|
key: 0,
|
|
2212
|
-
style:
|
|
3035
|
+
style: D(F(Tr))
|
|
2213
3036
|
}, [
|
|
2214
|
-
|
|
2215
|
-
style:
|
|
3037
|
+
z("div", {
|
|
3038
|
+
style: D(F(Ir))
|
|
2216
3039
|
}, [
|
|
2217
|
-
|
|
2218
|
-
style:
|
|
3040
|
+
z("div", {
|
|
3041
|
+
style: D(F(Pr))
|
|
2219
3042
|
}, null, 4)
|
|
2220
3043
|
], 4)
|
|
2221
|
-
], 4)) : e.mode !== "pre-fetched" && s.value ? (
|
|
3044
|
+
], 4)) : e.mode !== "pre-fetched" && s.value ? (f(), w("div", {
|
|
2222
3045
|
key: 1,
|
|
2223
|
-
style:
|
|
3046
|
+
style: D(F(et))
|
|
2224
3047
|
}, [
|
|
2225
|
-
|
|
2226
|
-
style:
|
|
3048
|
+
z("div", {
|
|
3049
|
+
style: D(F(tt))
|
|
2227
3050
|
}, "Error Loading Widget", 4),
|
|
2228
|
-
|
|
2229
|
-
style:
|
|
2230
|
-
},
|
|
2231
|
-
], 4)) : e.mode !== "pre-fetched" && !i.value ? (
|
|
3051
|
+
z("div", {
|
|
3052
|
+
style: D(F(nt))
|
|
3053
|
+
}, M(s.value), 5)
|
|
3054
|
+
], 4)) : e.mode !== "pre-fetched" && !i.value ? (f(), w("div", {
|
|
2232
3055
|
key: 2,
|
|
2233
|
-
style:
|
|
3056
|
+
style: D(F(et))
|
|
2234
3057
|
}, [
|
|
2235
|
-
|
|
2236
|
-
style:
|
|
3058
|
+
z("div", {
|
|
3059
|
+
style: D(F(tt))
|
|
2237
3060
|
}, "No Widget Data", 4),
|
|
2238
|
-
|
|
2239
|
-
style:
|
|
3061
|
+
z("div", {
|
|
3062
|
+
style: D(F(nt))
|
|
2240
3063
|
}, "No widget data available", 4)
|
|
2241
|
-
], 4)) :
|
|
2242
|
-
|
|
3064
|
+
], 4)) : l.value && i.value ? (f(), w(k, { key: 3 }, [
|
|
3065
|
+
a.value ? (f(), v(As, {
|
|
2243
3066
|
key: 0,
|
|
2244
3067
|
"display-item-list": i.value.displayItemList,
|
|
2245
3068
|
"widget-collections": i.value.widgetCollections,
|
|
2246
|
-
plugins:
|
|
3069
|
+
plugins: c.value,
|
|
2247
3070
|
"component-props": e.componentProps,
|
|
2248
|
-
mounts: e.mounts
|
|
2249
|
-
|
|
3071
|
+
mounts: e.mounts,
|
|
3072
|
+
"placeholder-values": e.placeholderValues
|
|
3073
|
+
}, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts", "placeholder-values"])) : (f(), v(Ts, {
|
|
2250
3074
|
key: 1,
|
|
2251
3075
|
"display-item-list": i.value.displayItemList,
|
|
2252
3076
|
"is-compose-mode": !1,
|
|
@@ -2254,203 +3078,288 @@ const es = {
|
|
|
2254
3078
|
"widget-collections": i.value.widgetCollections,
|
|
2255
3079
|
"show-drop-containers": !1,
|
|
2256
3080
|
"redux-device-display-type": "desktop",
|
|
2257
|
-
plugins:
|
|
3081
|
+
plugins: c.value,
|
|
2258
3082
|
"component-props": e.componentProps,
|
|
2259
|
-
mounts: e.mounts
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
3083
|
+
mounts: e.mounts,
|
|
3084
|
+
"placeholder-values": e.placeholderValues
|
|
3085
|
+
}, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts", "placeholder-values"]))
|
|
3086
|
+
], 64)) : T("", !0)
|
|
3087
|
+
], 8, xr);
|
|
2263
3088
|
};
|
|
2264
3089
|
}
|
|
2265
|
-
});
|
|
2266
|
-
class
|
|
3090
|
+
}), $r = 6e4;
|
|
3091
|
+
class Y extends Error {
|
|
2267
3092
|
constructor(n, o) {
|
|
2268
3093
|
super(n);
|
|
2269
|
-
|
|
3094
|
+
We(this, "status");
|
|
2270
3095
|
this.name = "FetchRuleCMSWidgetError", this.status = o;
|
|
2271
3096
|
}
|
|
2272
3097
|
}
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
3098
|
+
const de = /* @__PURE__ */ new Map();
|
|
3099
|
+
function Zr() {
|
|
3100
|
+
de.clear();
|
|
3101
|
+
}
|
|
3102
|
+
function ot(e) {
|
|
3103
|
+
const t = e == null ? void 0 : e.cache;
|
|
3104
|
+
return t === "no-store" || t === "reload" || t === "no-cache";
|
|
3105
|
+
}
|
|
3106
|
+
function Lr(e, t) {
|
|
3107
|
+
const n = de.get(e);
|
|
3108
|
+
if (n) {
|
|
3109
|
+
if (n.expiresAt <= t) {
|
|
3110
|
+
de.delete(e);
|
|
3111
|
+
return;
|
|
3112
|
+
}
|
|
3113
|
+
return n.data;
|
|
3114
|
+
}
|
|
3115
|
+
}
|
|
3116
|
+
async function zt(e) {
|
|
3117
|
+
return (await e.json().catch(() => ({ error: "Unknown error" }))).error || `Request failed with status ${e.status}`;
|
|
3118
|
+
}
|
|
3119
|
+
async function Ht({
|
|
3120
|
+
publishedKey: e,
|
|
3121
|
+
token: t,
|
|
3122
|
+
endpoint: n,
|
|
3123
|
+
fetchOptions: o
|
|
3124
|
+
}) {
|
|
3125
|
+
const s = ut({ publishedKey: e, token: t, endpoint: n }), i = K(t), l = Date.now();
|
|
3126
|
+
if (!i && !ot(o)) {
|
|
3127
|
+
const c = Lr(s, l);
|
|
3128
|
+
if (c)
|
|
3129
|
+
return c;
|
|
3130
|
+
}
|
|
3131
|
+
const r = await fetch(s, {
|
|
2282
3132
|
method: "GET",
|
|
2283
|
-
|
|
2284
|
-
...
|
|
2285
|
-
...s
|
|
3133
|
+
...i ? { cache: "no-store" } : {},
|
|
3134
|
+
...o
|
|
2286
3135
|
});
|
|
2287
|
-
if (!r.ok)
|
|
2288
|
-
|
|
2289
|
-
throw new X(
|
|
2290
|
-
m.error || `Request failed with status ${r.status}`,
|
|
2291
|
-
r.status
|
|
2292
|
-
);
|
|
2293
|
-
}
|
|
3136
|
+
if (!r.ok)
|
|
3137
|
+
throw new Y(await zt(r), r.status);
|
|
2294
3138
|
const u = await r.json();
|
|
2295
3139
|
if (!u.success)
|
|
2296
|
-
throw new
|
|
2297
|
-
|
|
3140
|
+
throw new Y("Failed to fetch widget data");
|
|
3141
|
+
const a = Ne(u.data);
|
|
3142
|
+
return !i && !ot(o) && de.set(s, {
|
|
3143
|
+
expiresAt: l + $r,
|
|
3144
|
+
data: a
|
|
3145
|
+
}), a;
|
|
3146
|
+
}
|
|
3147
|
+
async function Rr(e) {
|
|
3148
|
+
const { rulesetPublishedKey: t, params: n, fallbackPublishedKey: o, contentType: s, token: i, endpoint: l, fetchOptions: r } = e, u = () => Ht({
|
|
3149
|
+
publishedKey: o,
|
|
3150
|
+
token: i,
|
|
3151
|
+
endpoint: l,
|
|
3152
|
+
fetchOptions: r
|
|
3153
|
+
});
|
|
3154
|
+
let a;
|
|
3155
|
+
try {
|
|
3156
|
+
a = await fetch(dt({ token: i, endpoint: l }), {
|
|
3157
|
+
...Bt({
|
|
3158
|
+
token: i,
|
|
3159
|
+
rulesetPublishedKey: t,
|
|
3160
|
+
params: n,
|
|
3161
|
+
contentType: s
|
|
3162
|
+
}),
|
|
3163
|
+
...r
|
|
3164
|
+
});
|
|
3165
|
+
} catch (p) {
|
|
3166
|
+
if (o)
|
|
3167
|
+
return u();
|
|
3168
|
+
throw p;
|
|
3169
|
+
}
|
|
3170
|
+
if (!a.ok) {
|
|
3171
|
+
if (o && Kt(a.status))
|
|
3172
|
+
return u();
|
|
3173
|
+
throw new Y(await zt(a), a.status);
|
|
3174
|
+
}
|
|
3175
|
+
const c = Ut({
|
|
3176
|
+
token: i,
|
|
3177
|
+
rulesetPublishedKey: t,
|
|
3178
|
+
body: await a.json()
|
|
3179
|
+
});
|
|
3180
|
+
if (!c)
|
|
3181
|
+
throw new Y("Failed to fetch widget data");
|
|
3182
|
+
return { ...Ne(c.raw), selection: c.selection };
|
|
3183
|
+
}
|
|
3184
|
+
async function Qr(e) {
|
|
3185
|
+
const { publishedKey: t, rulesetPublishedKey: n, token: o } = e;
|
|
3186
|
+
if (!t && !n) {
|
|
3187
|
+
const s = K(o);
|
|
3188
|
+
throw n !== void 0 ? new Y(
|
|
3189
|
+
s ? "Ruleset key is required" : "Ruleset published key is required"
|
|
3190
|
+
) : new Y(
|
|
3191
|
+
s ? "Widget key is required" : "Published key is required"
|
|
3192
|
+
);
|
|
3193
|
+
}
|
|
3194
|
+
if (!o)
|
|
3195
|
+
throw new Y("Token is required");
|
|
3196
|
+
return e.rulesetPublishedKey ? Rr(e) : Ht(e);
|
|
2298
3197
|
}
|
|
2299
|
-
async function
|
|
2300
|
-
const { data: t, libraries: n } = e, o =
|
|
3198
|
+
async function el(e) {
|
|
3199
|
+
const { data: t, libraries: n } = e, o = De({
|
|
2301
3200
|
displayItemList: t.displayItemList,
|
|
2302
3201
|
widgetCollections: t.widgetCollections
|
|
2303
3202
|
});
|
|
2304
|
-
return
|
|
3203
|
+
return pe().resolve({ registrations: n, referenced: o });
|
|
2305
3204
|
}
|
|
2306
3205
|
export {
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
3206
|
+
jr as AlignContentTypes,
|
|
3207
|
+
As as BreakpointVariantRender,
|
|
3208
|
+
ct as COLLECTION_TYPE_PREFIX,
|
|
3209
|
+
fe as COMPONENT_PROPS_PATH_SEPARATOR,
|
|
3210
|
+
_e as CSS_CLASSES_ATTRIBUTE_NAME,
|
|
3211
|
+
Fn as CSS_VARIABLE_NAME_MAX_LENGTH,
|
|
3212
|
+
Vn as CSS_VARIABLE_NAME_PATTERN,
|
|
3213
|
+
wt as DEFAULT_BASE_Z_INDEX,
|
|
3214
|
+
An as DEFAULT_CLOUDINARY_CLOUD_NAME,
|
|
3215
|
+
re as DEFAULT_LIBRARY_ID,
|
|
3216
|
+
$r as DEFAULT_PUBLISHED_WIDGET_CACHE_MS,
|
|
3217
|
+
jo as DEFAULT_ROW_GAP,
|
|
3218
|
+
ln as DEV_CLIENT_TOKEN_PREFIX,
|
|
3219
|
+
dn as DEV_WIDGET_API_PATH,
|
|
3220
|
+
fn as DEV_WIDGET_RESOLVE_API_PATH,
|
|
3221
|
+
Nr as DeviceDisplayTypes,
|
|
3222
|
+
Je as DisplayComponent,
|
|
3223
|
+
Pe as DisplayItemTypes,
|
|
3224
|
+
lt as DragItemIdPrefixTypes,
|
|
3225
|
+
bn as EMBEDDED_KEY_SEPARATOR,
|
|
3226
|
+
uo as FLEX_LAYOUT_STYLE_KEYS_THAT_DERIVE_DISPLAY,
|
|
3227
|
+
Y as FetchRuleCMSWidgetError,
|
|
3228
|
+
gt as HIDE_WIDGET_ATTRIBUTE_NAME,
|
|
3229
|
+
Ue as JustifyContentTypes,
|
|
3230
|
+
Ko as POINTER_EVENTS_ATTRIBUTE_NAME,
|
|
3231
|
+
Ee as PUBLISHED_KEY_SEPARATOR,
|
|
3232
|
+
un as PUBLISHED_WIDGET_API_PATH,
|
|
3233
|
+
pn as PUBLISHED_WIDGET_RESOLVE_API_PATH,
|
|
3234
|
+
Ke as PageViewTypes,
|
|
3235
|
+
Ze as RULECMS_ANONYMOUS_ID_STORAGE_KEY,
|
|
3236
|
+
cn as RULECMS_API_ORIGIN,
|
|
3237
|
+
Jr as RULECMS_PUBLISHED_KEY_ATTRIBUTE,
|
|
3238
|
+
yt as RULECMS_WIDGET_CONTEXT_KEY,
|
|
3239
|
+
Ts as RenderComponents,
|
|
3240
|
+
ke as RenderComponentsForDevice,
|
|
3241
|
+
vs as RenderComponentsInner,
|
|
3242
|
+
qr as RuleCMSWidget,
|
|
3243
|
+
Hr as RuleCMSWidgetProvider,
|
|
3244
|
+
Uo as WIDGET_ATTRIBUTES_IGNORED_IN_COMPOSE_MODE,
|
|
3245
|
+
an as WIDGET_CACHE_API_ORIGIN,
|
|
3246
|
+
Ge as WIDGET_PLACEHOLDER_VALUES_KEY,
|
|
3247
|
+
Go as Z_INDEX_WIDGET_ATTRIBUTE_NAME,
|
|
3248
|
+
io as alignContentAllowlist,
|
|
3249
|
+
oo as alignItemsAllowlist,
|
|
3250
|
+
co as backgroundPositionAllowlist,
|
|
3251
|
+
ao as backgroundRepeatAllowlist,
|
|
3252
|
+
lo as backgroundSizeAllowlist,
|
|
3253
|
+
po as borderStyleKeywords,
|
|
3254
|
+
Un as boxSpacingSideKeys,
|
|
3255
|
+
Xr as boxSpacingStyleAttributeEntries,
|
|
3256
|
+
Wn as buildCloudinaryBackgroundUrl,
|
|
3257
|
+
Qo as buildOverlayLayerBoxStyles,
|
|
3258
|
+
Zo as buildOverlayStackStyles,
|
|
3259
|
+
ut as buildWidgetFetchUrl,
|
|
3260
|
+
dt as buildWidgetResolveUrl,
|
|
3261
|
+
Zr as clearPublishedWidgetFetchCache,
|
|
3262
|
+
ns as collectComponentInstancePaths,
|
|
3263
|
+
De as collectReferencedLibraryIds,
|
|
3264
|
+
rn as composeSourceComponentsPlugin,
|
|
3265
|
+
pe as createComponentLibraryRegistry,
|
|
3266
|
+
Ae as cssAttrArrayKey,
|
|
3267
|
+
vn as defaultPageWidth,
|
|
3268
|
+
Ro as deriveDisplayFlexIfNeeded,
|
|
3269
|
+
Gr as desktopModeWidth,
|
|
3270
|
+
Qr as fetchRuleCMSWidget,
|
|
3271
|
+
ss as findUnmatchedComponentPropsKeys,
|
|
3272
|
+
ro as flexDirectionAllowlist,
|
|
3273
|
+
so as flexWrapAllowlist,
|
|
3274
|
+
Xn as fontFamilyAllowlist,
|
|
3275
|
+
qn as fontStyleAllowlist,
|
|
3276
|
+
Jn as fontWeightAllowlist,
|
|
3277
|
+
vo as formatBackgroundImageStyles,
|
|
3278
|
+
Ao as formatBorderStyles,
|
|
3279
|
+
Eo as formatBoxShadowStyles,
|
|
3280
|
+
ko as formatBoxSpacingStyles,
|
|
3281
|
+
To as formatCssColorStyles,
|
|
3282
|
+
Le as formatCssColorValue,
|
|
3283
|
+
Io as formatCssEnumStyles,
|
|
3284
|
+
Po as formatCssLengthStyles,
|
|
3285
|
+
W as formatCssVariable,
|
|
3286
|
+
Yr as formatCssVariableStyles,
|
|
3287
|
+
Do as formatLineHeightStyles,
|
|
3288
|
+
$o as formatObjectStyleAttribute,
|
|
3289
|
+
xo as formatOpacityStyles,
|
|
3290
|
+
Z as formatSpacingSideValue,
|
|
3291
|
+
Cn as generatePublishedKey,
|
|
3292
|
+
Ur as generatePublishedKeyForEmbedded,
|
|
3293
|
+
ft as getCollectionIdForCollectionType,
|
|
3294
|
+
ue as getColumnAttributes,
|
|
3295
|
+
ze as getComponentAttributesAndStyles,
|
|
3296
|
+
ve as getComponentsPluginFromPlugins,
|
|
3297
|
+
E as getCssVariableFromLeaf,
|
|
3298
|
+
_o as getDefaultDimensionAttributes,
|
|
3299
|
+
U as getDeviceTypeBasedAttributes,
|
|
3300
|
+
Wr as getDragItemId,
|
|
3301
|
+
yn as getDragItemPrefixAndId,
|
|
3302
|
+
mn as getIdAndPrefix,
|
|
3303
|
+
Oo as getMergedAttributes,
|
|
3304
|
+
Vr as getNameAndInstanceIdFromWidgetKey,
|
|
3305
|
+
Fr as getNameFromWidgetKey,
|
|
3306
|
+
Ar as getOrCreateAnonymousId,
|
|
3307
|
+
Xo as getOverlayLayerZIndex,
|
|
3308
|
+
hn as getWidgetKeyForCollection,
|
|
3309
|
+
Br as getWidgetKeyForCollectionWithPrefix,
|
|
3310
|
+
gn as getWidgetKeyForPublishedCollection,
|
|
3311
|
+
Kr as getWidgetKeyForPublishedCollectionWithPrefix,
|
|
3312
|
+
bo as hasBoxShadowLeaf,
|
|
3313
|
+
cs as hasDeviceDivergentValues,
|
|
3314
|
+
B as hasInvalidCssVariable,
|
|
3315
|
+
Mo as hasItems,
|
|
3316
|
+
Yo as hasOverlayLayers,
|
|
3317
|
+
zr as incrementVersion,
|
|
3318
|
+
Bn as isBackgroundImageValue,
|
|
3319
|
+
fo as isBorderStyleValue,
|
|
3320
|
+
yo as isBorderValue,
|
|
3321
|
+
go as isBoxShadowValue,
|
|
3322
|
+
zn as isBoxSpacingValue,
|
|
3323
|
+
_n as isCloudinaryCloudName,
|
|
3324
|
+
Rn as isCloudinaryPublicId,
|
|
3325
|
+
Mn as isCloudinaryTransformationString,
|
|
3326
|
+
$e as isCssColorValue,
|
|
3327
|
+
Yn as isCssEnumValue,
|
|
3328
|
+
Q as isCssVariableName,
|
|
3329
|
+
K as isDevClientToken,
|
|
3330
|
+
Co as isLineHeightValue,
|
|
3331
|
+
wo as isOpacityValue,
|
|
3332
|
+
qo as isOverlayLayerEmptyForDevice,
|
|
3333
|
+
Wo as isRowHiddenForDevice,
|
|
3334
|
+
On as isSafeImageUrl,
|
|
3335
|
+
q as isSpacingSideValue,
|
|
3336
|
+
Me as isWidgetHiddenForDevice,
|
|
3337
|
+
no as justifyContentAllowlist,
|
|
3338
|
+
Oe as normalizeCssClasses,
|
|
3339
|
+
Re as objectStyleAttributeRegistry,
|
|
3340
|
+
Ce as overflowAllowlist,
|
|
3341
|
+
mt as phoneModeWidth,
|
|
3342
|
+
to as pointerEventsAllowlist,
|
|
3343
|
+
Ne as prepareRuleCMSWidgetData,
|
|
3344
|
+
He as resolveBaseZIndex,
|
|
3345
|
+
rt as resolveKey,
|
|
3346
|
+
Jo as resolveOverlayLayerPointerEvents,
|
|
3347
|
+
Vo as resolveRowStyles,
|
|
3348
|
+
at as resolveWidgetApiOrigin,
|
|
3349
|
+
bt as resolveWidgetContainerStyles,
|
|
3350
|
+
es as resolveWidgetInstanceProps,
|
|
3351
|
+
el as resolveWidgetLibraries,
|
|
3352
|
+
No as rowBasedPropertiesAreAssigned,
|
|
3353
|
+
xe as spacingKeywords,
|
|
3354
|
+
Kn as spacingLengthUnits,
|
|
3355
|
+
kr as stableJsonStringify,
|
|
3356
|
+
ht as tabletModeWidth,
|
|
3357
|
+
Zn as textAlignAllowlist,
|
|
3358
|
+
Qn as textDecorationAllowlist,
|
|
3359
|
+
eo as textTransformAllowlist,
|
|
3360
|
+
pt as typeHasPrefix,
|
|
3361
|
+
is as warnUnmatchedComponentProps,
|
|
3362
|
+
Ho as widgetBasedPropertiesAreAssigned,
|
|
3363
|
+
Ct as widgetDeclaresOwnHeight,
|
|
3364
|
+
ts as withWidgetPlaceholderValues
|
|
2456
3365
|
};
|