@rulecms/widget-vue 0.7.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 +36 -36
- package/dist/index.d.ts +218 -10
- package/dist/index.js +1440 -1146
- 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,64 +36,64 @@ function _t(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(
|
|
52
|
+
function i(a, c) {
|
|
53
53
|
var p;
|
|
54
|
-
e.get(
|
|
55
|
-
`RuleCMS widget: component library registered as "${
|
|
56
|
-
), e.set(
|
|
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
|
|
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
62
|
const d = /* @__PURE__ */ new Map();
|
|
63
|
-
for (const
|
|
64
|
-
const
|
|
65
|
-
|
|
63
|
+
for (const b of c) {
|
|
64
|
+
const C = e.get(b);
|
|
65
|
+
C && d.set(b, C);
|
|
66
66
|
}
|
|
67
|
-
const h =
|
|
67
|
+
const h = rn(d);
|
|
68
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 d =
|
|
76
|
+
const d = c == null ? void 0 : c[m];
|
|
77
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
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 u(
|
|
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
|
-
|
|
93
|
+
m.map(async (d) => {
|
|
94
94
|
if (e.has(d) || n.has(d))
|
|
95
95
|
return;
|
|
96
|
-
const h =
|
|
96
|
+
const h = c == null ? void 0 : c[d];
|
|
97
97
|
if (!h) {
|
|
98
98
|
console.error(
|
|
99
99
|
`RuleCMS widget: no component library registered for libraryId "${d}"; its components will not render.`
|
|
@@ -104,41 +104,41 @@ function te() {
|
|
|
104
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
112
|
`Registration for libraryId "${d}" did not resolve to a ComponentLibraryModule (expected { manifest, components }).`
|
|
113
113
|
);
|
|
114
|
-
i(d,
|
|
115
|
-
}).catch((
|
|
116
|
-
n.set(d,
|
|
114
|
+
i(d, g);
|
|
115
|
+
}).catch((C) => {
|
|
116
|
+
n.set(d, C), console.error(
|
|
117
117
|
`RuleCMS widget: failed to load component library "${d}":`,
|
|
118
|
-
|
|
118
|
+
C
|
|
119
119
|
);
|
|
120
120
|
}).finally(() => {
|
|
121
121
|
t.delete(d);
|
|
122
|
-
}), t.set(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 nr = {
|
|
|
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
|
-
},
|
|
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
158
|
function K(e) {
|
|
159
|
-
return typeof e == "string" && e.startsWith(
|
|
159
|
+
return typeof e == "string" && e.startsWith(ln);
|
|
160
160
|
}
|
|
161
|
-
function
|
|
162
|
-
return t ? t.replace(/\/$/, "") : K(e) ?
|
|
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 = K(t), s = 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 ir = ({ id: e, prefix: t }) => `${t}_${e}`, Kt = (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 dr(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
|
|
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 ye({
|
|
|
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 pr = /* @__PURE__ */ A({
|
|
|
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 pr = /* @__PURE__ */ A({
|
|
|
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 pr = /* @__PURE__ */ A({
|
|
|
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 pr = /* @__PURE__ */ A({
|
|
|
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 pr = /* @__PURE__ */ A({
|
|
|
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 pr = /* @__PURE__ */ A({
|
|
|
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 pr = /* @__PURE__ */ A({
|
|
|
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 pr = /* @__PURE__ */ A({
|
|
|
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 pr = /* @__PURE__ */ A({
|
|
|
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 pr = /* @__PURE__ */ A({
|
|
|
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 pr = /* @__PURE__ */ A({
|
|
|
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 pr = /* @__PURE__ */ A({
|
|
|
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,53 +816,53 @@ const pr = /* @__PURE__ */ A({
|
|
|
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 [d, h] of Object.entries(
|
|
843
|
-
n &&
|
|
844
|
-
...
|
|
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,
|
|
845
852
|
[d]: h
|
|
846
853
|
});
|
|
847
|
-
let p =
|
|
854
|
+
let p = ue(e);
|
|
848
855
|
for (const d in u)
|
|
849
856
|
if (d.includes("3-resolutions")) {
|
|
850
857
|
p = {
|
|
851
|
-
...
|
|
858
|
+
...ue(e) || {},
|
|
852
859
|
...u || {}
|
|
853
860
|
};
|
|
854
861
|
break;
|
|
855
862
|
}
|
|
856
|
-
const
|
|
857
|
-
if (n &&
|
|
858
|
-
const d = { ...
|
|
863
|
+
const m = Ro(a);
|
|
864
|
+
if (n && m.pointerEvents !== void 0) {
|
|
865
|
+
const d = { ...m };
|
|
859
866
|
return delete d.pointerEvents, {
|
|
860
867
|
componentAttributesBasedOnDevice: p,
|
|
861
868
|
componentStyles: d
|
|
@@ -863,40 +870,40 @@ function Re({
|
|
|
863
870
|
}
|
|
864
871
|
return {
|
|
865
872
|
componentAttributesBasedOnDevice: p,
|
|
866
|
-
componentStyles:
|
|
873
|
+
componentStyles: m
|
|
867
874
|
};
|
|
868
875
|
}
|
|
869
|
-
const
|
|
876
|
+
const Mo = (e) => {
|
|
870
877
|
const t = (e == null ? void 0 : e.rows) || [];
|
|
871
878
|
for (const n of t)
|
|
872
879
|
if (((n == null ? void 0 : n.columns) || []).length > 0)
|
|
873
880
|
return !0;
|
|
874
881
|
return (e == null ? void 0 : e.containerAttributes) && Object.keys(e.containerAttributes).length > 0;
|
|
875
|
-
},
|
|
876
|
-
function
|
|
882
|
+
}, jo = "var(--sl-spacing-x-small)";
|
|
883
|
+
function No(e) {
|
|
877
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);
|
|
878
885
|
}
|
|
879
|
-
function
|
|
886
|
+
function Wo({
|
|
880
887
|
row: e,
|
|
881
888
|
deviceDisplayType: t
|
|
882
889
|
}) {
|
|
883
890
|
var o;
|
|
884
|
-
const n =
|
|
891
|
+
const n = U({
|
|
885
892
|
deviceDisplayType: t,
|
|
886
893
|
componentAttributes: e.rowAttributes
|
|
887
894
|
});
|
|
888
895
|
return ((o = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : o["hide-component-3-resolutions"]) === "true";
|
|
889
896
|
}
|
|
890
|
-
function
|
|
897
|
+
function Vo({
|
|
891
898
|
row: e,
|
|
892
899
|
deviceDisplayType: t,
|
|
893
900
|
isComposeMode: n
|
|
894
901
|
}) {
|
|
895
902
|
var d;
|
|
896
|
-
const o = ((d =
|
|
903
|
+
const o = ((d = U({
|
|
897
904
|
deviceDisplayType: t,
|
|
898
905
|
componentAttributes: e.rowAttributes
|
|
899
|
-
})) == null ? void 0 : d.styles) || {}, s = o.justifyContent ?? e.horizontalAlignment ??
|
|
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([
|
|
900
907
|
"justifyContent",
|
|
901
908
|
"alignItems",
|
|
902
909
|
"flexDirection",
|
|
@@ -905,25 +912,25 @@ function go({
|
|
|
905
912
|
"alignContent",
|
|
906
913
|
"display"
|
|
907
914
|
]), p = {};
|
|
908
|
-
for (const [h,
|
|
909
|
-
|
|
910
|
-
const
|
|
915
|
+
for (const [h, b] of Object.entries(o))
|
|
916
|
+
c.has(h) || (p[h] = b);
|
|
917
|
+
const m = {
|
|
911
918
|
display: "flex",
|
|
912
|
-
flexDirection:
|
|
913
|
-
gap:
|
|
919
|
+
flexDirection: l,
|
|
920
|
+
gap: r,
|
|
914
921
|
flexWrap: u,
|
|
915
922
|
justifyContent: s,
|
|
916
923
|
alignItems: i,
|
|
917
924
|
...p
|
|
918
925
|
};
|
|
919
|
-
return
|
|
926
|
+
return a !== void 0 && (m.alignContent = a), m;
|
|
920
927
|
}
|
|
921
|
-
const
|
|
928
|
+
const _e = "css-classes-3-resolutions", Fo = 500, Bo = /[\x00-\x1f\x7f]/g, Oe = (e) => {
|
|
922
929
|
if (typeof e != "string")
|
|
923
930
|
return;
|
|
924
931
|
const t = /* @__PURE__ */ new Set(), n = [];
|
|
925
932
|
for (const s of e.split(/\s+/)) {
|
|
926
|
-
const i = s.replace(
|
|
933
|
+
const i = s.replace(Bo, "");
|
|
927
934
|
i && (t.has(i) || (t.add(i), n.push(i)));
|
|
928
935
|
}
|
|
929
936
|
if (!n.length)
|
|
@@ -931,12 +938,12 @@ const Ce = "css-classes-3-resolutions", bo = 500, Co = /[\x00-\x1f\x7f]/g, we =
|
|
|
931
938
|
let o = "";
|
|
932
939
|
for (const s of n) {
|
|
933
940
|
const i = o ? `${o} ${s}` : s;
|
|
934
|
-
if (i.length >
|
|
941
|
+
if (i.length > Fo)
|
|
935
942
|
break;
|
|
936
943
|
o = i;
|
|
937
944
|
}
|
|
938
945
|
return o.length ? o : void 0;
|
|
939
|
-
},
|
|
946
|
+
}, gt = "hide-component-3-resolutions", Ko = "pointer-events-3-resolutions", Uo = [
|
|
940
947
|
"width-3-resolutions",
|
|
941
948
|
"min-width-3-resolutions",
|
|
942
949
|
"max-width-3-resolutions",
|
|
@@ -951,23 +958,23 @@ const Ce = "css-classes-3-resolutions", bo = 500, Co = /[\x00-\x1f\x7f]/g, we =
|
|
|
951
958
|
"overflow-3-resolutions",
|
|
952
959
|
"overflow-x-3-resolutions",
|
|
953
960
|
"overflow-y-3-resolutions",
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
],
|
|
957
|
-
|
|
961
|
+
gt,
|
|
962
|
+
Ko
|
|
963
|
+
], zo = new Set(
|
|
964
|
+
Uo
|
|
958
965
|
);
|
|
959
|
-
function
|
|
966
|
+
function Me({
|
|
960
967
|
containerAttributes: e,
|
|
961
968
|
deviceDisplayType: t
|
|
962
969
|
}) {
|
|
963
970
|
var o;
|
|
964
|
-
const n =
|
|
971
|
+
const n = U({
|
|
965
972
|
deviceDisplayType: t,
|
|
966
973
|
componentAttributes: e
|
|
967
974
|
});
|
|
968
|
-
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";
|
|
969
976
|
}
|
|
970
|
-
function
|
|
977
|
+
function bt({
|
|
971
978
|
containerAttributes: e,
|
|
972
979
|
deviceDisplayType: t,
|
|
973
980
|
isComposeMode: n
|
|
@@ -977,44 +984,44 @@ function et({
|
|
|
977
984
|
return { styles: {} };
|
|
978
985
|
const o = n ? Object.fromEntries(
|
|
979
986
|
Object.entries(e).filter(
|
|
980
|
-
([
|
|
987
|
+
([l]) => !zo.has(l)
|
|
981
988
|
)
|
|
982
|
-
) : e, s =
|
|
989
|
+
) : e, s = U({
|
|
983
990
|
deviceDisplayType: t,
|
|
984
991
|
componentAttributes: o
|
|
985
992
|
});
|
|
986
993
|
return {
|
|
987
994
|
styles: (s == null ? void 0 : s.styles) ?? {},
|
|
988
|
-
cssClasses:
|
|
989
|
-
(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]
|
|
990
997
|
)
|
|
991
998
|
};
|
|
992
999
|
}
|
|
993
|
-
function
|
|
1000
|
+
function Ho(e) {
|
|
994
1001
|
return Object.keys(e.styles).length > 0 || !!e.cssClasses;
|
|
995
1002
|
}
|
|
996
|
-
function
|
|
1003
|
+
function Ct({
|
|
997
1004
|
containerAttributes: e,
|
|
998
1005
|
widgetContainerStyles: t
|
|
999
1006
|
}) {
|
|
1000
|
-
return ((e == null ? void 0 : e[
|
|
1007
|
+
return ((e == null ? void 0 : e[Ae]) || []).some(
|
|
1001
1008
|
(o) => o.toLowerCase().startsWith("height:")
|
|
1002
1009
|
) || t.styles.height !== void 0;
|
|
1003
1010
|
}
|
|
1004
|
-
const
|
|
1005
|
-
function
|
|
1011
|
+
const Go = "z-index-3-resolutions", wt = 0;
|
|
1012
|
+
function Yo(e) {
|
|
1006
1013
|
var t, n;
|
|
1007
1014
|
return !!((n = (t = e == null ? void 0 : e.overlayLayers) == null ? void 0 : t.layers) != null && n.length);
|
|
1008
1015
|
}
|
|
1009
|
-
function
|
|
1016
|
+
function He({
|
|
1010
1017
|
containerAttributes: e,
|
|
1011
1018
|
deviceDisplayType: t
|
|
1012
1019
|
}) {
|
|
1013
1020
|
var s;
|
|
1014
|
-
const n =
|
|
1021
|
+
const n = U({
|
|
1015
1022
|
deviceDisplayType: t,
|
|
1016
1023
|
componentAttributes: e
|
|
1017
|
-
}), 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];
|
|
1018
1025
|
if (typeof o == "number" && Number.isFinite(o))
|
|
1019
1026
|
return o;
|
|
1020
1027
|
if (typeof o == "string" && o.trim().length) {
|
|
@@ -1022,33 +1029,33 @@ function Oe({
|
|
|
1022
1029
|
if (Number.isFinite(i))
|
|
1023
1030
|
return i;
|
|
1024
1031
|
}
|
|
1025
|
-
return
|
|
1032
|
+
return wt;
|
|
1026
1033
|
}
|
|
1027
|
-
function
|
|
1034
|
+
function Xo(e, t) {
|
|
1028
1035
|
return e + t + 1;
|
|
1029
1036
|
}
|
|
1030
|
-
function
|
|
1037
|
+
function Jo({
|
|
1031
1038
|
containerAttributes: e,
|
|
1032
1039
|
deviceDisplayType: t
|
|
1033
1040
|
}) {
|
|
1034
1041
|
var s;
|
|
1035
|
-
const n =
|
|
1042
|
+
const n = U({
|
|
1036
1043
|
deviceDisplayType: t,
|
|
1037
1044
|
componentAttributes: e
|
|
1038
1045
|
}), o = (s = n == null ? void 0 : n.styles) == null ? void 0 : s.pointerEvents;
|
|
1039
1046
|
return typeof o == "string" ? o : void 0;
|
|
1040
1047
|
}
|
|
1041
|
-
function
|
|
1048
|
+
function qo({
|
|
1042
1049
|
layer: e,
|
|
1043
1050
|
deviceDisplayType: t
|
|
1044
1051
|
}) {
|
|
1045
1052
|
var n;
|
|
1046
|
-
return (n = e == null ? void 0 : e.rows) != null && n.length ?
|
|
1053
|
+
return (n = e == null ? void 0 : e.rows) != null && n.length ? Me({
|
|
1047
1054
|
containerAttributes: e.containerAttributes,
|
|
1048
1055
|
deviceDisplayType: t
|
|
1049
1056
|
}) : !0;
|
|
1050
1057
|
}
|
|
1051
|
-
function
|
|
1058
|
+
function Zo({
|
|
1052
1059
|
isWithinCollection: e,
|
|
1053
1060
|
baseDeclaresOwnHeight: t,
|
|
1054
1061
|
baseZIndex: n
|
|
@@ -1059,10 +1066,10 @@ function Do({
|
|
|
1059
1066
|
display: "flex",
|
|
1060
1067
|
flexDirection: "column",
|
|
1061
1068
|
...t ? {} : { height: e ? "auto" : "100%" },
|
|
1062
|
-
...n ===
|
|
1069
|
+
...n === wt ? {} : { zIndex: n }
|
|
1063
1070
|
};
|
|
1064
1071
|
}
|
|
1065
|
-
function
|
|
1072
|
+
function Qo({
|
|
1066
1073
|
zIndex: e,
|
|
1067
1074
|
pointerEvents: t
|
|
1068
1075
|
}) {
|
|
@@ -1077,8 +1084,8 @@ function $o({
|
|
|
1077
1084
|
...t ? { pointerEvents: t } : {}
|
|
1078
1085
|
};
|
|
1079
1086
|
}
|
|
1080
|
-
const
|
|
1081
|
-
function
|
|
1087
|
+
const fe = "/";
|
|
1088
|
+
function es({
|
|
1082
1089
|
componentProps: e,
|
|
1083
1090
|
ancestorColumnIds: t,
|
|
1084
1091
|
columnId: n
|
|
@@ -1087,40 +1094,50 @@ function Lo({
|
|
|
1087
1094
|
return;
|
|
1088
1095
|
const o = [...t ?? [], n];
|
|
1089
1096
|
for (let s = 0; s < o.length; s += 1) {
|
|
1090
|
-
const i = o.slice(s).join(
|
|
1091
|
-
if (
|
|
1092
|
-
return
|
|
1097
|
+
const i = o.slice(s).join(fe), l = e[i];
|
|
1098
|
+
if (l)
|
|
1099
|
+
return l;
|
|
1093
1100
|
}
|
|
1094
1101
|
}
|
|
1095
|
-
|
|
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({
|
|
1096
1113
|
displayItemList: e,
|
|
1097
1114
|
widgetCollections: t
|
|
1098
1115
|
}) {
|
|
1099
1116
|
const n = [], o = (s, i) => {
|
|
1100
|
-
var
|
|
1101
|
-
if ((
|
|
1102
|
-
for (const
|
|
1103
|
-
for (const u of
|
|
1104
|
-
if (!u.id || u.type ===
|
|
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)
|
|
1105
1122
|
continue;
|
|
1106
|
-
const
|
|
1107
|
-
if (
|
|
1108
|
-
const
|
|
1109
|
-
|
|
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]);
|
|
1110
1127
|
continue;
|
|
1111
1128
|
}
|
|
1112
1129
|
n.push(
|
|
1113
|
-
[...i, u.id].join(
|
|
1130
|
+
[...i, u.id].join(fe)
|
|
1114
1131
|
);
|
|
1115
1132
|
}
|
|
1116
1133
|
};
|
|
1117
1134
|
return o(e, []), n;
|
|
1118
1135
|
}
|
|
1119
|
-
function
|
|
1120
|
-
const n = `${
|
|
1136
|
+
function os(e, t) {
|
|
1137
|
+
const n = `${fe}${e}`;
|
|
1121
1138
|
return t.some((o) => o === e || o.endsWith(n));
|
|
1122
1139
|
}
|
|
1123
|
-
function
|
|
1140
|
+
function ss({
|
|
1124
1141
|
componentProps: e,
|
|
1125
1142
|
displayItemList: t,
|
|
1126
1143
|
widgetCollections: n
|
|
@@ -1128,13 +1145,13 @@ function Oo({
|
|
|
1128
1145
|
const o = e ? Object.keys(e) : [];
|
|
1129
1146
|
if (!o.length)
|
|
1130
1147
|
return [];
|
|
1131
|
-
const s =
|
|
1148
|
+
const s = ns({
|
|
1132
1149
|
displayItemList: t,
|
|
1133
1150
|
widgetCollections: n
|
|
1134
1151
|
});
|
|
1135
|
-
return o.filter((i) => !
|
|
1152
|
+
return o.filter((i) => !os(i, s));
|
|
1136
1153
|
}
|
|
1137
|
-
function
|
|
1154
|
+
function is({
|
|
1138
1155
|
componentProps: e,
|
|
1139
1156
|
displayItemList: t,
|
|
1140
1157
|
widgetCollections: n,
|
|
@@ -1142,7 +1159,7 @@ function _o({
|
|
|
1142
1159
|
}) {
|
|
1143
1160
|
if (process.env.NODE_ENV === "production")
|
|
1144
1161
|
return;
|
|
1145
|
-
const s =
|
|
1162
|
+
const s = ss({
|
|
1146
1163
|
componentProps: e,
|
|
1147
1164
|
displayItemList: t,
|
|
1148
1165
|
widgetCollections: n
|
|
@@ -1151,68 +1168,68 @@ function _o({
|
|
|
1151
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.`
|
|
1152
1169
|
);
|
|
1153
1170
|
}
|
|
1154
|
-
function
|
|
1171
|
+
function rs(e) {
|
|
1155
1172
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
1156
1173
|
}
|
|
1157
|
-
function
|
|
1174
|
+
function ls(e) {
|
|
1158
1175
|
if (e.all !== void 0 && e.all !== null)
|
|
1159
1176
|
return !1;
|
|
1160
1177
|
const t = e.phone, n = e.tablet, o = e.desktop;
|
|
1161
1178
|
return t !== n || t !== o || n !== o;
|
|
1162
1179
|
}
|
|
1163
|
-
function
|
|
1180
|
+
function Se(e) {
|
|
1164
1181
|
var t, n;
|
|
1165
1182
|
if (!((t = e == null ? void 0 : e.rows) != null && t.length))
|
|
1166
1183
|
return !1;
|
|
1167
|
-
if (
|
|
1184
|
+
if (we(e.containerAttributes))
|
|
1168
1185
|
return !0;
|
|
1169
1186
|
for (const o of e.rows) {
|
|
1170
|
-
if (
|
|
1187
|
+
if (we(o.rowAttributes))
|
|
1171
1188
|
return !0;
|
|
1172
1189
|
for (const s of o.columns)
|
|
1173
|
-
if (
|
|
1190
|
+
if (we(ue(s)))
|
|
1174
1191
|
return !0;
|
|
1175
1192
|
}
|
|
1176
1193
|
for (const o of ((n = e.overlayLayers) == null ? void 0 : n.layers) ?? [])
|
|
1177
|
-
if (
|
|
1194
|
+
if (Se(o))
|
|
1178
1195
|
return !0;
|
|
1179
1196
|
return !1;
|
|
1180
1197
|
}
|
|
1181
|
-
function
|
|
1198
|
+
function we(e) {
|
|
1182
1199
|
if (!e)
|
|
1183
1200
|
return !1;
|
|
1184
1201
|
for (const [t, n] of Object.entries(e))
|
|
1185
|
-
if (!(!t.includes("3-resolutions") || !
|
|
1202
|
+
if (!(!t.includes("3-resolutions") || !rs(n))) {
|
|
1186
1203
|
if (t === "hide-component-3-resolutions") {
|
|
1187
1204
|
const o = n, s = (i) => i === "true" || i === !0;
|
|
1188
1205
|
if (s(o.phone) !== s(o.tablet) || s(o.phone) !== s(o.desktop))
|
|
1189
1206
|
return !0;
|
|
1190
1207
|
continue;
|
|
1191
1208
|
}
|
|
1192
|
-
if (
|
|
1209
|
+
if (ls(n))
|
|
1193
1210
|
return !0;
|
|
1194
1211
|
}
|
|
1195
1212
|
return !1;
|
|
1196
1213
|
}
|
|
1197
|
-
function
|
|
1198
|
-
if (
|
|
1214
|
+
function cs(e, t) {
|
|
1215
|
+
if (Se(e))
|
|
1199
1216
|
return !0;
|
|
1200
1217
|
for (const n of Object.values(t))
|
|
1201
|
-
if (
|
|
1218
|
+
if (Se(n.collectionRows))
|
|
1202
1219
|
return !0;
|
|
1203
1220
|
return !1;
|
|
1204
1221
|
}
|
|
1205
|
-
const
|
|
1206
|
-
function
|
|
1222
|
+
const vt = parseInt(mt, 10), At = parseInt(ht, 10), as = vt + 1, us = At + 1;
|
|
1223
|
+
function ds(e) {
|
|
1207
1224
|
const t = `.${e}-phone`, n = `.${e}-tablet`, o = `.${e}-desktop`;
|
|
1208
1225
|
return `
|
|
1209
1226
|
${t}, ${n}, ${o} { display: none; }
|
|
1210
|
-
@media (max-width: ${
|
|
1211
|
-
@media (min-width: ${
|
|
1212
|
-
@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; } }
|
|
1213
1230
|
`.trim();
|
|
1214
1231
|
}
|
|
1215
|
-
function
|
|
1232
|
+
function ve(e) {
|
|
1216
1233
|
if (!e)
|
|
1217
1234
|
throw new Error("Source components plugin is required, but no plugins were provided");
|
|
1218
1235
|
const t = e.sourceComponents;
|
|
@@ -1226,7 +1243,7 @@ function le(e) {
|
|
|
1226
1243
|
);
|
|
1227
1244
|
return t;
|
|
1228
1245
|
}
|
|
1229
|
-
const
|
|
1246
|
+
const ps = ["hidden"], Ye = /* @__PURE__ */ S({
|
|
1230
1247
|
__name: "EmbedInVerticalContainer",
|
|
1231
1248
|
props: {
|
|
1232
1249
|
displayItemList: {},
|
|
@@ -1239,59 +1256,59 @@ const Bo = ["hidden"], _e = /* @__PURE__ */ A({
|
|
|
1239
1256
|
const t = e;
|
|
1240
1257
|
let n = 0;
|
|
1241
1258
|
const o = `rulecms-vc-${++n}`;
|
|
1242
|
-
function s(h,
|
|
1243
|
-
const
|
|
1244
|
-
return !!(
|
|
1259
|
+
function s(h, b, C) {
|
|
1260
|
+
const g = h && !C ? 3 : 1;
|
|
1261
|
+
return !!(b != null && b.length) && b.length > g;
|
|
1245
1262
|
}
|
|
1246
|
-
const i =
|
|
1247
|
-
var
|
|
1248
|
-
return (((
|
|
1263
|
+
const i = y(() => {
|
|
1264
|
+
var b;
|
|
1265
|
+
return (((b = t.displayItemList.containerAttributes) == null ? void 0 : b[Ae]) || []).join(`;
|
|
1249
1266
|
`);
|
|
1250
|
-
}),
|
|
1267
|
+
}), l = y(
|
|
1251
1268
|
() => i.value ? `.${o} {
|
|
1252
1269
|
${i.value}
|
|
1253
1270
|
}` : ""
|
|
1254
|
-
),
|
|
1255
|
-
() => !t.isComposeMode &&
|
|
1271
|
+
), r = y(
|
|
1272
|
+
() => !t.isComposeMode && Me({
|
|
1256
1273
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1257
1274
|
deviceDisplayType: t.deviceDisplayType
|
|
1258
1275
|
})
|
|
1259
|
-
), u =
|
|
1260
|
-
() =>
|
|
1276
|
+
), u = y(
|
|
1277
|
+
() => bt({
|
|
1261
1278
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1262
1279
|
deviceDisplayType: t.deviceDisplayType,
|
|
1263
1280
|
isComposeMode: t.isComposeMode
|
|
1264
1281
|
})
|
|
1265
|
-
),
|
|
1266
|
-
var
|
|
1267
|
-
const h = ((
|
|
1268
|
-
return t.isComposeMode && !t.isWithinCollection || t.showDropContainers || h.length > 0 ||
|
|
1269
|
-
}),
|
|
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(
|
|
1270
1287
|
() => [i.value ? o : void 0, u.value.cssClasses].filter(Boolean).join(" ")
|
|
1271
|
-
), p =
|
|
1272
|
-
...
|
|
1288
|
+
), p = y(() => ({
|
|
1289
|
+
...Ct({
|
|
1273
1290
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1274
1291
|
widgetContainerStyles: u.value
|
|
1275
1292
|
}) ? {} : { height: t.isWithinCollection ? "auto" : "100%" },
|
|
1276
1293
|
display: "flex",
|
|
1277
1294
|
flexDirection: "column",
|
|
1278
1295
|
...u.value.styles
|
|
1279
|
-
})),
|
|
1280
|
-
return (h,
|
|
1281
|
-
hidden:
|
|
1282
|
-
class:
|
|
1283
|
-
style:
|
|
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)
|
|
1284
1301
|
}, [
|
|
1285
|
-
i.value ? (f(),
|
|
1286
|
-
default:
|
|
1287
|
-
|
|
1302
|
+
i.value ? (f(), v(x("style"), { key: 0 }, {
|
|
1303
|
+
default: P(() => [
|
|
1304
|
+
j(M(l.value), 1)
|
|
1288
1305
|
]),
|
|
1289
1306
|
_: 1
|
|
1290
|
-
})) :
|
|
1291
|
-
|
|
1292
|
-
], 14,
|
|
1307
|
+
})) : T("", !0),
|
|
1308
|
+
Ie(h.$slots, "default")
|
|
1309
|
+
], 14, ps));
|
|
1293
1310
|
}
|
|
1294
|
-
}),
|
|
1311
|
+
}), fs = ["hidden"], Xe = /* @__PURE__ */ S({
|
|
1295
1312
|
__name: "EmbedInRow",
|
|
1296
1313
|
props: {
|
|
1297
1314
|
row: {},
|
|
@@ -1302,40 +1319,40 @@ ${i.value}
|
|
|
1302
1319
|
},
|
|
1303
1320
|
setup(e) {
|
|
1304
1321
|
const t = e;
|
|
1305
|
-
function n(
|
|
1322
|
+
function n(a, c, p) {
|
|
1306
1323
|
var d;
|
|
1307
|
-
const
|
|
1308
|
-
return !!((d =
|
|
1324
|
+
const m = a && !p ? 3 : 1;
|
|
1325
|
+
return !!((d = c == null ? void 0 : c.columns) != null && d.length) && c.columns.length > m;
|
|
1309
1326
|
}
|
|
1310
|
-
const o =
|
|
1311
|
-
() => !t.isComposeMode &&
|
|
1312
|
-
), s =
|
|
1313
|
-
() => t.showDropContainers ||
|
|
1314
|
-
), i =
|
|
1315
|
-
() =>
|
|
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({
|
|
1316
1333
|
row: t.row,
|
|
1317
1334
|
deviceDisplayType: t.deviceDisplayType,
|
|
1318
1335
|
isComposeMode: t.isComposeMode
|
|
1319
1336
|
})
|
|
1320
|
-
),
|
|
1321
|
-
var
|
|
1322
|
-
const
|
|
1337
|
+
), l = y(() => {
|
|
1338
|
+
var c;
|
|
1339
|
+
const a = U({
|
|
1323
1340
|
deviceDisplayType: t.deviceDisplayType,
|
|
1324
1341
|
componentAttributes: t.row.rowAttributes
|
|
1325
1342
|
});
|
|
1326
|
-
return
|
|
1327
|
-
(
|
|
1343
|
+
return Oe(
|
|
1344
|
+
(c = a == null ? void 0 : a.componentAttributesSpecificToDeviceType) == null ? void 0 : c[_e]
|
|
1328
1345
|
) ?? "";
|
|
1329
|
-
}),
|
|
1330
|
-
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", {
|
|
1331
1348
|
hidden: o.value || void 0,
|
|
1332
|
-
class:
|
|
1333
|
-
style:
|
|
1349
|
+
class: ie(r.value || void 0),
|
|
1350
|
+
style: D(u.value)
|
|
1334
1351
|
}, [
|
|
1335
|
-
|
|
1336
|
-
], 14,
|
|
1352
|
+
Ie(a.$slots, "default")
|
|
1353
|
+
], 14, fs));
|
|
1337
1354
|
}
|
|
1338
|
-
}),
|
|
1355
|
+
}), Et = [
|
|
1339
1356
|
"minWidth",
|
|
1340
1357
|
"maxWidth",
|
|
1341
1358
|
"minHeight",
|
|
@@ -1387,20 +1404,20 @@ ${i.value}
|
|
|
1387
1404
|
"textAlign",
|
|
1388
1405
|
"textDecoration",
|
|
1389
1406
|
"textTransform"
|
|
1390
|
-
],
|
|
1407
|
+
], ys = (e) => e != null && e !== "", ms = (e) => e ? Et.reduce(
|
|
1391
1408
|
(t, n) => {
|
|
1392
1409
|
const o = e[n];
|
|
1393
|
-
return
|
|
1410
|
+
return ys(o) && (t[n] = o), t;
|
|
1394
1411
|
},
|
|
1395
1412
|
{}
|
|
1396
|
-
) : {},
|
|
1413
|
+
) : {}, hs = (e) => {
|
|
1397
1414
|
if (!e)
|
|
1398
1415
|
return;
|
|
1399
1416
|
const t = { ...e };
|
|
1400
|
-
for (const n of
|
|
1417
|
+
for (const n of Et)
|
|
1401
1418
|
delete t[n];
|
|
1402
1419
|
return Object.keys(t).length ? t : void 0;
|
|
1403
|
-
},
|
|
1420
|
+
}, gs = (e) => Object.keys(e).length > 0, bs = (e, t) => {
|
|
1404
1421
|
const n = (e == null ? void 0 : e.noContainer) ?? !1, o = e == null ? void 0 : e.resolveNoContainer;
|
|
1405
1422
|
if (typeof o != "function")
|
|
1406
1423
|
return n;
|
|
@@ -1418,7 +1435,7 @@ ${i.value}
|
|
|
1418
1435
|
);
|
|
1419
1436
|
}
|
|
1420
1437
|
return n;
|
|
1421
|
-
},
|
|
1438
|
+
}, Cs = (e, t) => {
|
|
1422
1439
|
const n = e == null ? void 0 : e.resolveRendersOwnElement;
|
|
1423
1440
|
if (typeof n != "function")
|
|
1424
1441
|
return !1;
|
|
@@ -1436,7 +1453,7 @@ ${i.value}
|
|
|
1436
1453
|
);
|
|
1437
1454
|
}
|
|
1438
1455
|
return !1;
|
|
1439
|
-
},
|
|
1456
|
+
}, Je = /* @__PURE__ */ S({
|
|
1440
1457
|
__name: "DisplayComponent",
|
|
1441
1458
|
props: {
|
|
1442
1459
|
componentType: {},
|
|
@@ -1445,54 +1462,58 @@ ${i.value}
|
|
|
1445
1462
|
components: {},
|
|
1446
1463
|
styleProps: {},
|
|
1447
1464
|
widgetInstanceProps: {},
|
|
1465
|
+
pageViewType: {},
|
|
1466
|
+
columnPath: {},
|
|
1448
1467
|
mounts: {}
|
|
1449
1468
|
},
|
|
1450
1469
|
setup(e) {
|
|
1451
|
-
const t = e, n =
|
|
1470
|
+
const t = e, n = y(() => t.components[rt(t.libraryId, t.componentType)]), o = y(() => {
|
|
1452
1471
|
var h;
|
|
1453
1472
|
const d = (h = n.value) == null ? void 0 : h.card;
|
|
1454
1473
|
return d || (console.error(
|
|
1455
1474
|
`DisplayComponent: Component with type ${t.componentType}${t.libraryId ? ` (library "${t.libraryId}")` : ""} not found in components`
|
|
1456
1475
|
), null);
|
|
1457
|
-
}), s =
|
|
1476
|
+
}), s = y(() => ({
|
|
1458
1477
|
componentAttributes: t.componentAttributes,
|
|
1459
1478
|
styleProps: t.styleProps
|
|
1460
|
-
})), i =
|
|
1461
|
-
() => n.value ?
|
|
1462
|
-
),
|
|
1463
|
-
() => i.value ?
|
|
1464
|
-
), u =
|
|
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(
|
|
1465
1484
|
() => {
|
|
1466
1485
|
var d;
|
|
1467
|
-
return
|
|
1486
|
+
return Oe((d = t.componentAttributes) == null ? void 0 : d[_e]);
|
|
1468
1487
|
}
|
|
1469
|
-
),
|
|
1470
|
-
() => !i.value || (n.value ?
|
|
1471
|
-
), p =
|
|
1472
|
-
() => !
|
|
1473
|
-
),
|
|
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(() => ({
|
|
1474
1493
|
componentAttributes: t.componentAttributes,
|
|
1475
|
-
styleProps:
|
|
1494
|
+
styleProps: r.value,
|
|
1476
1495
|
className: p.value,
|
|
1477
1496
|
widgetInstanceProps: t.widgetInstanceProps,
|
|
1497
|
+
pageViewType: t.pageViewType,
|
|
1498
|
+
columnPath: t.columnPath,
|
|
1478
1499
|
mounts: t.mounts
|
|
1479
1500
|
}));
|
|
1480
|
-
return (d, h) => o.value ? (f(),
|
|
1481
|
-
|
|
1501
|
+
return (d, h) => o.value ? (f(), w(k, { key: 0 }, [
|
|
1502
|
+
a.value ? (f(), w("div", {
|
|
1482
1503
|
key: 0,
|
|
1483
|
-
class:
|
|
1484
|
-
style:
|
|
1504
|
+
class: ie(u.value || void 0),
|
|
1505
|
+
style: D(l.value)
|
|
1485
1506
|
}, [
|
|
1486
|
-
(f(),
|
|
1487
|
-
], 6)) : !
|
|
1507
|
+
(f(), v(x(o.value), ge(Ve(m.value)), null, 16))
|
|
1508
|
+
], 6)) : !c.value && u.value ? (f(), w("div", {
|
|
1488
1509
|
key: 1,
|
|
1489
|
-
class:
|
|
1510
|
+
class: ie(u.value)
|
|
1490
1511
|
}, [
|
|
1491
|
-
(f(),
|
|
1492
|
-
], 2)) : (f(),
|
|
1493
|
-
], 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);
|
|
1494
1515
|
}
|
|
1495
|
-
}),
|
|
1516
|
+
}), ws = ["data-rulecms-overlay-layer"], vs = /* @__PURE__ */ S({
|
|
1496
1517
|
__name: "RenderComponentsInner",
|
|
1497
1518
|
props: {
|
|
1498
1519
|
displayItemList: {},
|
|
@@ -1505,125 +1526,136 @@ ${i.value}
|
|
|
1505
1526
|
deviceDisplayType: {},
|
|
1506
1527
|
componentProps: {},
|
|
1507
1528
|
mounts: {},
|
|
1529
|
+
placeholderValues: {},
|
|
1508
1530
|
ancestorColumnIds: {}
|
|
1509
1531
|
},
|
|
1510
1532
|
setup(e) {
|
|
1511
|
-
const t = e, n = () =>
|
|
1512
|
-
() => !t.isComposeMode &&
|
|
1533
|
+
const t = e, n = () => ve(t.plugins).components, o = y(
|
|
1534
|
+
() => !t.isComposeMode && Yo(t.displayItemList) && !Me({
|
|
1513
1535
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1514
1536
|
deviceDisplayType: t.deviceDisplayType
|
|
1515
1537
|
})
|
|
1516
|
-
), s =
|
|
1517
|
-
const
|
|
1538
|
+
), s = y(() => {
|
|
1539
|
+
const d = He({
|
|
1518
1540
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1519
1541
|
deviceDisplayType: t.deviceDisplayType
|
|
1520
1542
|
});
|
|
1521
|
-
return
|
|
1543
|
+
return Zo({
|
|
1522
1544
|
isWithinCollection: t.isWithinCollection,
|
|
1523
|
-
baseDeclaresOwnHeight:
|
|
1545
|
+
baseDeclaresOwnHeight: Ct({
|
|
1524
1546
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1525
|
-
widgetContainerStyles:
|
|
1547
|
+
widgetContainerStyles: bt({
|
|
1526
1548
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1527
1549
|
deviceDisplayType: t.deviceDisplayType,
|
|
1528
1550
|
isComposeMode: t.isComposeMode
|
|
1529
1551
|
})
|
|
1530
1552
|
}),
|
|
1531
|
-
baseZIndex:
|
|
1553
|
+
baseZIndex: d
|
|
1532
1554
|
});
|
|
1533
|
-
}), i =
|
|
1534
|
-
var
|
|
1535
|
-
const
|
|
1555
|
+
}), i = y(() => {
|
|
1556
|
+
var b;
|
|
1557
|
+
const d = ((b = t.displayItemList.overlayLayers) == null ? void 0 : b.layers) ?? [], h = He({
|
|
1536
1558
|
containerAttributes: t.displayItemList.containerAttributes,
|
|
1537
1559
|
deviceDisplayType: t.deviceDisplayType
|
|
1538
1560
|
});
|
|
1539
|
-
return
|
|
1561
|
+
return d.flatMap((C, g) => qo({ layer: C, deviceDisplayType: t.deviceDisplayType }) ? [] : [
|
|
1540
1562
|
{
|
|
1541
|
-
index:
|
|
1542
|
-
layer:
|
|
1543
|
-
boxStyles:
|
|
1544
|
-
zIndex:
|
|
1545
|
-
pointerEvents:
|
|
1546
|
-
containerAttributes:
|
|
1563
|
+
index: g,
|
|
1564
|
+
layer: C,
|
|
1565
|
+
boxStyles: Qo({
|
|
1566
|
+
zIndex: Xo(h, g),
|
|
1567
|
+
pointerEvents: Jo({
|
|
1568
|
+
containerAttributes: C.containerAttributes,
|
|
1547
1569
|
deviceDisplayType: t.deviceDisplayType
|
|
1548
1570
|
})
|
|
1549
1571
|
})
|
|
1550
1572
|
}
|
|
1551
1573
|
]);
|
|
1552
1574
|
});
|
|
1553
|
-
function
|
|
1554
|
-
if (t.isComposeMode &&
|
|
1575
|
+
function l(d) {
|
|
1576
|
+
if (t.isComposeMode && d.type === Pe.DroppableBox)
|
|
1555
1577
|
return !1;
|
|
1556
|
-
const { componentAttributesBasedOnDevice:
|
|
1557
|
-
col:
|
|
1578
|
+
const { componentAttributesBasedOnDevice: h } = ze({
|
|
1579
|
+
col: d,
|
|
1558
1580
|
deviceDisplayType: t.deviceDisplayType,
|
|
1559
1581
|
isComposeMode: t.isComposeMode,
|
|
1560
|
-
sourceComponentsPlugin:
|
|
1561
|
-
}),
|
|
1562
|
-
return !(!t.isComposeMode &&
|
|
1582
|
+
sourceComponentsPlugin: ve(t.plugins)
|
|
1583
|
+
}), b = !!h && h["hide-component-3-resolutions"] === "true";
|
|
1584
|
+
return !(!t.isComposeMode && b);
|
|
1563
1585
|
}
|
|
1564
|
-
function
|
|
1565
|
-
const { componentAttributesBasedOnDevice:
|
|
1566
|
-
col:
|
|
1586
|
+
function r(d) {
|
|
1587
|
+
const { componentAttributesBasedOnDevice: h, componentStyles: b } = ze({
|
|
1588
|
+
col: d,
|
|
1567
1589
|
deviceDisplayType: t.deviceDisplayType,
|
|
1568
1590
|
isComposeMode: t.isComposeMode,
|
|
1569
|
-
sourceComponentsPlugin:
|
|
1591
|
+
sourceComponentsPlugin: ve(t.plugins)
|
|
1570
1592
|
});
|
|
1571
1593
|
return {
|
|
1572
|
-
componentAttributes:
|
|
1573
|
-
styleProps:
|
|
1594
|
+
componentAttributes: h,
|
|
1595
|
+
styleProps: b
|
|
1574
1596
|
};
|
|
1575
1597
|
}
|
|
1576
|
-
function u(
|
|
1577
|
-
const
|
|
1578
|
-
if (!(
|
|
1598
|
+
function u(d) {
|
|
1599
|
+
const h = ft(d.type);
|
|
1600
|
+
if (!(h != null && h.length))
|
|
1579
1601
|
return null;
|
|
1580
|
-
const
|
|
1581
|
-
if (!
|
|
1602
|
+
const b = d.collection ?? t.widgetCollections[h];
|
|
1603
|
+
if (!b)
|
|
1582
1604
|
throw new Error(
|
|
1583
|
-
`DisplayCollection - Collection with ID ${
|
|
1605
|
+
`DisplayCollection - Collection with ID ${h} not found in widgetCollections. Available collections: ${Object.keys(t.widgetCollections).join(", ")}`
|
|
1584
1606
|
);
|
|
1585
|
-
return !
|
|
1607
|
+
return !b.collectionRows || !Mo(b.collectionRows) ? null : b.collectionRows;
|
|
1586
1608
|
}
|
|
1587
|
-
function
|
|
1588
|
-
return [...t.ancestorColumnIds ?? [],
|
|
1609
|
+
function a(d) {
|
|
1610
|
+
return [...t.ancestorColumnIds ?? [], d];
|
|
1589
1611
|
}
|
|
1590
|
-
function
|
|
1591
|
-
return
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
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
|
|
1595
1627
|
});
|
|
1596
1628
|
}
|
|
1597
|
-
return (
|
|
1598
|
-
const
|
|
1599
|
-
return o.value ? (f(),
|
|
1629
|
+
return (d, h) => {
|
|
1630
|
+
const b = Qt("RenderComponentsInner", !0);
|
|
1631
|
+
return o.value ? (f(), w("div", {
|
|
1600
1632
|
key: 0,
|
|
1601
|
-
style:
|
|
1633
|
+
style: D(s.value)
|
|
1602
1634
|
}, [
|
|
1603
|
-
|
|
1635
|
+
R(Ye, {
|
|
1604
1636
|
"display-item-list": e.displayItemList,
|
|
1605
1637
|
"is-compose-mode": e.isComposeMode,
|
|
1606
1638
|
"show-drop-containers": e.showDropContainers,
|
|
1607
1639
|
"is-within-collection": e.isWithinCollection,
|
|
1608
1640
|
"device-display-type": e.deviceDisplayType
|
|
1609
1641
|
}, {
|
|
1610
|
-
default:
|
|
1611
|
-
(f(!0),
|
|
1612
|
-
key:
|
|
1613
|
-
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,
|
|
1614
1646
|
"is-compose-mode": e.isComposeMode,
|
|
1615
1647
|
"show-drop-containers": e.showDropContainers,
|
|
1616
1648
|
"is-within-collection": e.isWithinCollection,
|
|
1617
1649
|
"device-display-type": e.deviceDisplayType
|
|
1618
1650
|
}, {
|
|
1619
|
-
default:
|
|
1620
|
-
(f(!0),
|
|
1621
|
-
key:
|
|
1651
|
+
default: P(() => [
|
|
1652
|
+
(f(!0), w(k, null, G(C.columns, (g) => (f(), w(k, {
|
|
1653
|
+
key: g.id
|
|
1622
1654
|
}, [
|
|
1623
|
-
|
|
1624
|
-
u(
|
|
1655
|
+
l(g) ? (f(), w(k, { key: 0 }, [
|
|
1656
|
+
u(g) ? (f(), v(b, {
|
|
1625
1657
|
key: 0,
|
|
1626
|
-
"display-item-list": u(
|
|
1658
|
+
"display-item-list": u(g),
|
|
1627
1659
|
"is-compose-mode": e.isComposeMode,
|
|
1628
1660
|
"is-within-collection": !0,
|
|
1629
1661
|
"widget-collections": e.widgetCollections,
|
|
@@ -1633,18 +1665,21 @@ ${i.value}
|
|
|
1633
1665
|
"device-display-type": e.deviceDisplayType,
|
|
1634
1666
|
"component-props": e.componentProps,
|
|
1635
1667
|
mounts: e.mounts,
|
|
1636
|
-
"
|
|
1637
|
-
|
|
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, {
|
|
1638
1671
|
key: 1,
|
|
1639
|
-
"component-type":
|
|
1640
|
-
"library-id":
|
|
1641
|
-
"component-attributes":
|
|
1672
|
+
"component-type": g.type,
|
|
1673
|
+
"library-id": g.libraryId,
|
|
1674
|
+
"component-attributes": r(g).componentAttributes,
|
|
1642
1675
|
components: n(),
|
|
1643
|
-
"style-props":
|
|
1644
|
-
"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),
|
|
1645
1680
|
mounts: e.mounts
|
|
1646
|
-
}, null, 8, ["component-type", "library-id", "component-attributes", "components", "style-props", "widget-instance-props", "mounts"]))
|
|
1647
|
-
], 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)
|
|
1648
1683
|
], 64))), 128))
|
|
1649
1684
|
]),
|
|
1650
1685
|
_: 2
|
|
@@ -1652,13 +1687,13 @@ ${i.value}
|
|
|
1652
1687
|
]),
|
|
1653
1688
|
_: 1
|
|
1654
1689
|
}, 8, ["display-item-list", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]),
|
|
1655
|
-
(f(!0),
|
|
1656
|
-
key:
|
|
1657
|
-
"data-rulecms-overlay-layer":
|
|
1658
|
-
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)
|
|
1659
1694
|
}, [
|
|
1660
|
-
|
|
1661
|
-
"display-item-list":
|
|
1695
|
+
R(b, {
|
|
1696
|
+
"display-item-list": C.layer,
|
|
1662
1697
|
"is-compose-mode": e.isComposeMode,
|
|
1663
1698
|
"is-within-collection": !1,
|
|
1664
1699
|
"widget-collections": e.widgetCollections,
|
|
@@ -1668,10 +1703,11 @@ ${i.value}
|
|
|
1668
1703
|
"device-display-type": e.deviceDisplayType,
|
|
1669
1704
|
"component-props": e.componentProps,
|
|
1670
1705
|
mounts: e.mounts,
|
|
1706
|
+
"placeholder-values": e.placeholderValues,
|
|
1671
1707
|
"ancestor-column-ids": e.ancestorColumnIds
|
|
1672
|
-
}, null, 8, ["display-item-list", "is-compose-mode", "widget-collections", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "ancestor-column-ids"])
|
|
1673
|
-
], 12,
|
|
1674
|
-
], 4)) : (f(),
|
|
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, {
|
|
1675
1711
|
key: 1,
|
|
1676
1712
|
"display-item-list": e.displayItemList,
|
|
1677
1713
|
"is-compose-mode": e.isComposeMode,
|
|
@@ -1679,23 +1715,23 @@ ${i.value}
|
|
|
1679
1715
|
"is-within-collection": e.isWithinCollection,
|
|
1680
1716
|
"device-display-type": e.deviceDisplayType
|
|
1681
1717
|
}, {
|
|
1682
|
-
default:
|
|
1683
|
-
(f(!0),
|
|
1684
|
-
key:
|
|
1685
|
-
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,
|
|
1686
1722
|
"is-compose-mode": e.isComposeMode,
|
|
1687
1723
|
"show-drop-containers": e.showDropContainers,
|
|
1688
1724
|
"is-within-collection": e.isWithinCollection,
|
|
1689
1725
|
"device-display-type": e.deviceDisplayType
|
|
1690
1726
|
}, {
|
|
1691
|
-
default:
|
|
1692
|
-
(f(!0),
|
|
1693
|
-
key:
|
|
1727
|
+
default: P(() => [
|
|
1728
|
+
(f(!0), w(k, null, G(C.columns, (g) => (f(), w(k, {
|
|
1729
|
+
key: g.id
|
|
1694
1730
|
}, [
|
|
1695
|
-
|
|
1696
|
-
u(
|
|
1731
|
+
l(g) ? (f(), w(k, { key: 0 }, [
|
|
1732
|
+
u(g) ? (f(), v(b, {
|
|
1697
1733
|
key: 0,
|
|
1698
|
-
"display-item-list": u(
|
|
1734
|
+
"display-item-list": u(g),
|
|
1699
1735
|
"is-compose-mode": e.isComposeMode,
|
|
1700
1736
|
"is-within-collection": !0,
|
|
1701
1737
|
"widget-collections": e.widgetCollections,
|
|
@@ -1705,18 +1741,21 @@ ${i.value}
|
|
|
1705
1741
|
"device-display-type": e.deviceDisplayType,
|
|
1706
1742
|
"component-props": e.componentProps,
|
|
1707
1743
|
mounts: e.mounts,
|
|
1708
|
-
"
|
|
1709
|
-
|
|
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, {
|
|
1710
1747
|
key: 1,
|
|
1711
|
-
"component-type":
|
|
1712
|
-
"library-id":
|
|
1713
|
-
"component-attributes":
|
|
1748
|
+
"component-type": g.type,
|
|
1749
|
+
"library-id": g.libraryId,
|
|
1750
|
+
"component-attributes": r(g).componentAttributes,
|
|
1714
1751
|
components: n(),
|
|
1715
|
-
"style-props":
|
|
1716
|
-
"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),
|
|
1717
1756
|
mounts: e.mounts
|
|
1718
|
-
}, null, 8, ["component-type", "library-id", "component-attributes", "components", "style-props", "widget-instance-props", "mounts"]))
|
|
1719
|
-
], 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)
|
|
1720
1759
|
], 64))), 128))
|
|
1721
1760
|
]),
|
|
1722
1761
|
_: 2
|
|
@@ -1726,7 +1765,7 @@ ${i.value}
|
|
|
1726
1765
|
}, 8, ["display-item-list", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]));
|
|
1727
1766
|
};
|
|
1728
1767
|
}
|
|
1729
|
-
}),
|
|
1768
|
+
}), ke = /* @__PURE__ */ S({
|
|
1730
1769
|
__name: "RenderComponentsForDevice",
|
|
1731
1770
|
props: {
|
|
1732
1771
|
displayItemList: {},
|
|
@@ -1739,12 +1778,13 @@ ${i.value}
|
|
|
1739
1778
|
plugins: {},
|
|
1740
1779
|
componentProps: {},
|
|
1741
1780
|
mounts: {},
|
|
1781
|
+
placeholderValues: {},
|
|
1742
1782
|
ancestorColumnIds: {}
|
|
1743
1783
|
},
|
|
1744
1784
|
setup(e) {
|
|
1745
1785
|
return (t, n) => {
|
|
1746
1786
|
var o, s;
|
|
1747
|
-
return (s = (o = e.displayItemList) == null ? void 0 : o.rows) != null && s.length ? (f(),
|
|
1787
|
+
return (s = (o = e.displayItemList) == null ? void 0 : o.rows) != null && s.length ? (f(), v(vs, {
|
|
1748
1788
|
key: 0,
|
|
1749
1789
|
"display-item-list": e.displayItemList,
|
|
1750
1790
|
"is-compose-mode": e.isComposeMode,
|
|
@@ -1756,27 +1796,28 @@ ${i.value}
|
|
|
1756
1796
|
"device-display-type": e.deviceDisplayType,
|
|
1757
1797
|
"component-props": e.componentProps,
|
|
1758
1798
|
mounts: e.mounts,
|
|
1799
|
+
"placeholder-values": e.placeholderValues,
|
|
1759
1800
|
"ancestor-column-ids": e.ancestorColumnIds
|
|
1760
|
-
}, 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);
|
|
1761
1802
|
};
|
|
1762
1803
|
}
|
|
1763
|
-
}),
|
|
1804
|
+
}), St = /* @__PURE__ */ S({
|
|
1764
1805
|
__name: "LibraryStylesheets",
|
|
1765
1806
|
props: {
|
|
1766
1807
|
stylesheets: {}
|
|
1767
1808
|
},
|
|
1768
1809
|
setup(e) {
|
|
1769
|
-
return (t, n) => (f(!0),
|
|
1770
|
-
key:
|
|
1810
|
+
return (t, n) => (f(!0), w(k, null, G(e.stylesheets ?? [], (o, s) => (f(), v(x("style"), {
|
|
1811
|
+
key: s,
|
|
1771
1812
|
"data-rulecms-library-stylesheet": ""
|
|
1772
1813
|
}, {
|
|
1773
|
-
default:
|
|
1774
|
-
|
|
1814
|
+
default: P(() => [
|
|
1815
|
+
j(M(o), 1)
|
|
1775
1816
|
]),
|
|
1776
1817
|
_: 2
|
|
1777
1818
|
}, 1024))), 128));
|
|
1778
1819
|
}
|
|
1779
|
-
}),
|
|
1820
|
+
}), As = /* @__PURE__ */ S({
|
|
1780
1821
|
__name: "BreakpointVariantRender",
|
|
1781
1822
|
props: {
|
|
1782
1823
|
displayItemList: {},
|
|
@@ -1784,32 +1825,33 @@ ${i.value}
|
|
|
1784
1825
|
plugins: {},
|
|
1785
1826
|
componentProps: {},
|
|
1786
1827
|
mounts: {},
|
|
1828
|
+
placeholderValues: {},
|
|
1787
1829
|
scopeIdInput: {}
|
|
1788
1830
|
},
|
|
1789
1831
|
setup(e) {
|
|
1790
1832
|
const t = ["Phone", "Tablet", "Desktop"];
|
|
1791
1833
|
let n = 0;
|
|
1792
|
-
const o = e, s = `rulecms-bp-${++n}`, i =
|
|
1793
|
-
() =>
|
|
1794
|
-
),
|
|
1795
|
-
return (u,
|
|
1796
|
-
var
|
|
1797
|
-
return f(),
|
|
1798
|
-
|
|
1799
|
-
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
|
|
1800
1842
|
}, null, 8, ["stylesheets"]),
|
|
1801
|
-
|
|
1802
|
-
(f(),
|
|
1803
|
-
default:
|
|
1804
|
-
|
|
1843
|
+
l.value ? (f(), w(k, { key: 1 }, [
|
|
1844
|
+
(f(), v(x("style"), null, {
|
|
1845
|
+
default: P(() => [
|
|
1846
|
+
j(M(r.value), 1)
|
|
1805
1847
|
]),
|
|
1806
1848
|
_: 1
|
|
1807
1849
|
})),
|
|
1808
|
-
(f(),
|
|
1850
|
+
(f(), w(k, null, G(t, (p) => z("div", {
|
|
1809
1851
|
key: p,
|
|
1810
|
-
class:
|
|
1852
|
+
class: ie(`${i.value}-${p.toLowerCase()}`)
|
|
1811
1853
|
}, [
|
|
1812
|
-
|
|
1854
|
+
R(ke, {
|
|
1813
1855
|
"display-item-list": e.displayItemList,
|
|
1814
1856
|
"is-compose-mode": !1,
|
|
1815
1857
|
"is-within-collection": !1,
|
|
@@ -1819,10 +1861,11 @@ ${i.value}
|
|
|
1819
1861
|
"device-display-type": p,
|
|
1820
1862
|
plugins: e.plugins,
|
|
1821
1863
|
"component-props": e.componentProps,
|
|
1822
|
-
mounts: e.mounts
|
|
1823
|
-
|
|
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"])
|
|
1824
1867
|
], 2)), 64))
|
|
1825
|
-
], 64)) : (f(),
|
|
1868
|
+
], 64)) : (f(), v(ke, {
|
|
1826
1869
|
key: 0,
|
|
1827
1870
|
"display-item-list": e.displayItemList,
|
|
1828
1871
|
"is-compose-mode": !1,
|
|
@@ -1833,13 +1876,14 @@ ${i.value}
|
|
|
1833
1876
|
"device-display-type": "Desktop",
|
|
1834
1877
|
plugins: e.plugins,
|
|
1835
1878
|
"component-props": e.componentProps,
|
|
1836
|
-
mounts: e.mounts
|
|
1837
|
-
|
|
1879
|
+
mounts: e.mounts,
|
|
1880
|
+
"placeholder-values": e.placeholderValues
|
|
1881
|
+
}, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts", "placeholder-values"]))
|
|
1838
1882
|
], 64);
|
|
1839
1883
|
};
|
|
1840
1884
|
}
|
|
1841
1885
|
});
|
|
1842
|
-
function
|
|
1886
|
+
function Es(e, t, n) {
|
|
1843
1887
|
if (e)
|
|
1844
1888
|
return "Phone";
|
|
1845
1889
|
if (t)
|
|
@@ -1847,7 +1891,7 @@ function Qo(e, t, n) {
|
|
|
1847
1891
|
const o = (n == null ? void 0 : n.toLowerCase()) || "desktop";
|
|
1848
1892
|
return o === "phone" ? "Phone" : o === "tablet" ? "Tablet" : "Desktop";
|
|
1849
1893
|
}
|
|
1850
|
-
const
|
|
1894
|
+
const Ss = `(max-width: ${mt})`, ks = `(max-width: ${ht})`, Ts = /* @__PURE__ */ S({
|
|
1851
1895
|
__name: "RenderComponents",
|
|
1852
1896
|
props: {
|
|
1853
1897
|
displayItemList: {},
|
|
@@ -1858,30 +1902,31 @@ const es = `(max-width: ${Ze})`, ts = `(max-width: ${qe})`, ns = /* @__PURE__ */
|
|
|
1858
1902
|
reduxDeviceDisplayType: {},
|
|
1859
1903
|
plugins: {},
|
|
1860
1904
|
componentProps: {},
|
|
1861
|
-
mounts: {}
|
|
1905
|
+
mounts: {},
|
|
1906
|
+
placeholderValues: {}
|
|
1862
1907
|
},
|
|
1863
1908
|
setup(e) {
|
|
1864
|
-
const t = e, n =
|
|
1909
|
+
const t = e, n = H("Desktop");
|
|
1865
1910
|
let o, s;
|
|
1866
1911
|
function i() {
|
|
1867
|
-
n.value =
|
|
1912
|
+
n.value = Es(
|
|
1868
1913
|
(o == null ? void 0 : o.matches) ?? !1,
|
|
1869
1914
|
(s == null ? void 0 : s.matches) ?? !1,
|
|
1870
1915
|
t.reduxDeviceDisplayType
|
|
1871
1916
|
);
|
|
1872
1917
|
}
|
|
1873
|
-
return
|
|
1874
|
-
typeof matchMedia == "function" && (o = matchMedia(
|
|
1875
|
-
}),
|
|
1918
|
+
return en(() => {
|
|
1919
|
+
typeof matchMedia == "function" && (o = matchMedia(Ss), s = matchMedia(ks), o.addEventListener("change", i), s.addEventListener("change", i)), i();
|
|
1920
|
+
}), it(() => {
|
|
1876
1921
|
o == null || o.removeEventListener("change", i), s == null || s.removeEventListener("change", i);
|
|
1877
|
-
}), (
|
|
1922
|
+
}), (l, r) => {
|
|
1878
1923
|
var u;
|
|
1879
|
-
return f(),
|
|
1880
|
-
e.isWithinCollection ?
|
|
1924
|
+
return f(), w(k, null, [
|
|
1925
|
+
e.isWithinCollection ? T("", !0) : (f(), v(St, {
|
|
1881
1926
|
key: 0,
|
|
1882
1927
|
stylesheets: (u = e.plugins.sourceComponents) == null ? void 0 : u.stylesheets
|
|
1883
1928
|
}, null, 8, ["stylesheets"])),
|
|
1884
|
-
|
|
1929
|
+
R(ke, {
|
|
1885
1930
|
"display-item-list": e.displayItemList,
|
|
1886
1931
|
"is-compose-mode": e.isComposeMode,
|
|
1887
1932
|
"is-within-collection": e.isWithinCollection,
|
|
@@ -1891,20 +1936,21 @@ const es = `(max-width: ${Ze})`, ts = `(max-width: ${qe})`, ns = /* @__PURE__ */
|
|
|
1891
1936
|
"device-display-type": n.value,
|
|
1892
1937
|
plugins: e.plugins,
|
|
1893
1938
|
"component-props": e.componentProps,
|
|
1894
|
-
mounts: e.mounts
|
|
1895
|
-
|
|
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"])
|
|
1896
1942
|
], 64);
|
|
1897
1943
|
};
|
|
1898
1944
|
}
|
|
1899
1945
|
});
|
|
1900
|
-
function
|
|
1946
|
+
function kt(e) {
|
|
1901
1947
|
return e !== !1;
|
|
1902
1948
|
}
|
|
1903
|
-
const
|
|
1949
|
+
const Is = ["utilities", "components"], Ps = new Set(Is), Tt = (e) => typeof e == "string" && Ps.has(e), Ds = (e) => e.split(`
|
|
1904
1950
|
`).map((t) => t.length > 0 ? ` ${t}` : t).join(`
|
|
1905
|
-
`),
|
|
1906
|
-
${
|
|
1907
|
-
}` : e : null,
|
|
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) => {
|
|
1908
1954
|
let t = 0;
|
|
1909
1955
|
for (const n of e)
|
|
1910
1956
|
if (n === "{")
|
|
@@ -1912,43 +1958,43 @@ ${is(e)}
|
|
|
1912
1958
|
else if (n === "}" && (t -= 1, t < 0))
|
|
1913
1959
|
return !1;
|
|
1914
1960
|
return t === 0;
|
|
1915
|
-
},
|
|
1961
|
+
}, Ns = (e) => {
|
|
1916
1962
|
const t = e.startsWith(".") ? e.slice(1) : e;
|
|
1917
|
-
return !t || t.length > 200 || t.startsWith(".") ||
|
|
1918
|
-
},
|
|
1963
|
+
return !t || t.length > 200 || t.startsWith(".") || Os.test(t) ? !1 : Ms.test(t);
|
|
1964
|
+
}, Ws = (e) => {
|
|
1919
1965
|
const t = e.trim();
|
|
1920
|
-
if (!t || t.length > 4e3 ||
|
|
1966
|
+
if (!t || t.length > 4e3 || _s.test(t) || !js(t))
|
|
1921
1967
|
return !1;
|
|
1922
1968
|
const n = t.toLowerCase();
|
|
1923
|
-
return !
|
|
1924
|
-
},
|
|
1969
|
+
return !Rs.some((o) => n.includes(o));
|
|
1970
|
+
}, Vs = (e) => {
|
|
1925
1971
|
if (!e)
|
|
1926
1972
|
return {};
|
|
1927
1973
|
const t = {};
|
|
1928
1974
|
for (const [n, o] of Object.entries(e)) {
|
|
1929
1975
|
const s = n.startsWith(".") ? n.slice(1) : n.trim();
|
|
1930
|
-
if (!
|
|
1976
|
+
if (!Ns(s) || typeof o != "string")
|
|
1931
1977
|
continue;
|
|
1932
1978
|
const i = o.trim();
|
|
1933
|
-
|
|
1979
|
+
Ws(i) && (t[s] = i);
|
|
1934
1980
|
}
|
|
1935
1981
|
return t;
|
|
1936
|
-
},
|
|
1982
|
+
}, Fs = (e) => e.split(`
|
|
1937
1983
|
`).map((t) => ` ${t}`).join(`
|
|
1938
|
-
`),
|
|
1939
|
-
if (!
|
|
1984
|
+
`), Bs = (e, t, n, o) => {
|
|
1985
|
+
if (!kt(n))
|
|
1940
1986
|
return null;
|
|
1941
|
-
const s =
|
|
1987
|
+
const s = Vs(t), i = Object.keys(s);
|
|
1942
1988
|
if (i.length === 0 || !e)
|
|
1943
1989
|
return null;
|
|
1944
|
-
const
|
|
1945
|
-
(u) => `${
|
|
1946
|
-
${
|
|
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])}
|
|
1947
1993
|
}`
|
|
1948
1994
|
).join(`
|
|
1949
1995
|
`);
|
|
1950
|
-
return
|
|
1951
|
-
},
|
|
1996
|
+
return xs(r, o);
|
|
1997
|
+
}, Ks = /* @__PURE__ */ S({
|
|
1952
1998
|
__name: "ProjectCssClassesStylesheet",
|
|
1953
1999
|
props: {
|
|
1954
2000
|
publishedKey: {},
|
|
@@ -1956,29 +2002,29 @@ ${gs(s[u])}
|
|
|
1956
2002
|
classLayer: {}
|
|
1957
2003
|
},
|
|
1958
2004
|
setup(e) {
|
|
1959
|
-
const t = e, n =
|
|
1960
|
-
() =>
|
|
2005
|
+
const t = e, n = y(
|
|
2006
|
+
() => Bs(
|
|
1961
2007
|
t.publishedKey,
|
|
1962
2008
|
t.classes,
|
|
1963
2009
|
void 0,
|
|
1964
2010
|
t.classLayer
|
|
1965
2011
|
)
|
|
1966
2012
|
);
|
|
1967
|
-
return (o, s) => n.value ? (f(),
|
|
2013
|
+
return (o, s) => n.value ? (f(), v(x("style"), {
|
|
1968
2014
|
key: 0,
|
|
1969
2015
|
"data-rulecms-project-class-definitions": ""
|
|
1970
2016
|
}, {
|
|
1971
|
-
default:
|
|
1972
|
-
|
|
2017
|
+
default: P(() => [
|
|
2018
|
+
j(M(n.value), 1)
|
|
1973
2019
|
]),
|
|
1974
2020
|
_: 1
|
|
1975
|
-
})) :
|
|
2021
|
+
})) : T("", !0);
|
|
1976
2022
|
}
|
|
1977
2023
|
});
|
|
1978
|
-
function
|
|
2024
|
+
function je(e) {
|
|
1979
2025
|
return e !== !1;
|
|
1980
2026
|
}
|
|
1981
|
-
const
|
|
2027
|
+
const It = (e) => e.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), Us = /* @__PURE__ */ new Set([
|
|
1982
2028
|
"serif",
|
|
1983
2029
|
"sans-serif",
|
|
1984
2030
|
"monospace",
|
|
@@ -1992,84 +2038,84 @@ const at = (e) => e.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), ws = /* @__PURE
|
|
|
1992
2038
|
"emoji",
|
|
1993
2039
|
"math",
|
|
1994
2040
|
"fangsong"
|
|
1995
|
-
]),
|
|
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) => {
|
|
1996
2042
|
if (!Array.isArray(e))
|
|
1997
2043
|
return [];
|
|
1998
2044
|
const o = [];
|
|
1999
2045
|
for (const s of e) {
|
|
2000
|
-
if (!s || typeof s != "object" || o.length >=
|
|
2046
|
+
if (!s || typeof s != "object" || o.length >= qs)
|
|
2001
2047
|
continue;
|
|
2002
2048
|
const i = s;
|
|
2003
|
-
if (
|
|
2049
|
+
if (!ei(i.name))
|
|
2004
2050
|
continue;
|
|
2005
|
-
const
|
|
2006
|
-
if (t.has(
|
|
2051
|
+
const l = i.name.trim();
|
|
2052
|
+
if (t.has(l))
|
|
2007
2053
|
continue;
|
|
2008
|
-
const
|
|
2009
|
-
for (const
|
|
2010
|
-
if (
|
|
2054
|
+
const r = [], u = /* @__PURE__ */ new Set();
|
|
2055
|
+
for (const c of i.overrideColors ?? []) {
|
|
2056
|
+
if (r.length >= Zs)
|
|
2011
2057
|
break;
|
|
2012
|
-
const p =
|
|
2013
|
-
p === null || u.has(p) || !
|
|
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() }));
|
|
2014
2060
|
}
|
|
2015
|
-
|
|
2016
|
-
const
|
|
2017
|
-
|
|
2018
|
-
name:
|
|
2019
|
-
...
|
|
2020
|
-
...
|
|
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 } : {}
|
|
2021
2067
|
});
|
|
2022
2068
|
}
|
|
2023
2069
|
return o;
|
|
2024
|
-
},
|
|
2025
|
-
var
|
|
2070
|
+
}, ye = (e) => {
|
|
2071
|
+
var l;
|
|
2026
2072
|
if (!Array.isArray(e))
|
|
2027
2073
|
return [];
|
|
2028
2074
|
const t = [], n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), s = { current: !1 };
|
|
2029
2075
|
let i = !1;
|
|
2030
|
-
for (const
|
|
2031
|
-
if (!
|
|
2076
|
+
for (const r of e) {
|
|
2077
|
+
if (!r || !qe(r.family))
|
|
2032
2078
|
continue;
|
|
2033
|
-
const u =
|
|
2034
|
-
if (n.has(
|
|
2079
|
+
const u = r.family.trim(), a = u.toLowerCase();
|
|
2080
|
+
if (n.has(a) || t.length >= 12)
|
|
2035
2081
|
continue;
|
|
2036
|
-
const
|
|
2037
|
-
let
|
|
2038
|
-
if (((
|
|
2039
|
-
if (!
|
|
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))
|
|
2040
2086
|
continue;
|
|
2041
|
-
const
|
|
2042
|
-
if (
|
|
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)
|
|
2043
2089
|
continue;
|
|
2044
|
-
|
|
2090
|
+
m = { kind: "google", weights: C };
|
|
2045
2091
|
}
|
|
2046
|
-
n.add(
|
|
2047
|
-
const d =
|
|
2092
|
+
n.add(a);
|
|
2093
|
+
const d = r.applyToWidget === !0 && !i;
|
|
2048
2094
|
d && (i = !0);
|
|
2049
|
-
const h =
|
|
2095
|
+
const h = oi(r.palettes, o, s);
|
|
2050
2096
|
t.push({
|
|
2051
2097
|
family: u,
|
|
2052
2098
|
...p ? { cssVariable: p } : {},
|
|
2053
|
-
fallbacks:
|
|
2099
|
+
fallbacks: c,
|
|
2054
2100
|
applyToWidget: d,
|
|
2055
|
-
source:
|
|
2101
|
+
source: m,
|
|
2056
2102
|
...h.length > 0 ? { palettes: h } : {}
|
|
2057
2103
|
});
|
|
2058
2104
|
}
|
|
2059
2105
|
return t;
|
|
2060
|
-
},
|
|
2061
|
-
const t =
|
|
2106
|
+
}, si = (e) => {
|
|
2107
|
+
const t = ye(e).filter((n) => n.source.kind === "google").map((n) => {
|
|
2062
2108
|
const o = n.source.kind === "google" ? n.source.weights.join(";") : "400";
|
|
2063
2109
|
return `family=${n.family.replace(/ /g, "+")}:wght@${o}`;
|
|
2064
2110
|
});
|
|
2065
2111
|
return t.length === 0 ? null : `https://fonts.googleapis.com/css2?${t.join("&")}&display=swap`;
|
|
2066
|
-
},
|
|
2112
|
+
}, ii = (e) => [Te(e.family), ...(e.fallbacks ?? []).map(Te)].join(", "), ri = (e) => {
|
|
2067
2113
|
const t = [];
|
|
2068
2114
|
for (const n of e)
|
|
2069
2115
|
for (const o of n.palettes ?? []) {
|
|
2070
|
-
const s = [` font-family: ${
|
|
2116
|
+
const s = [` font-family: ${Te(n.family)};`];
|
|
2071
2117
|
if (o.overrideColors && o.overrideColors.length > 0) {
|
|
2072
|
-
const i = o.overrideColors.map((
|
|
2118
|
+
const i = o.overrideColors.map((l) => `${l.index} ${l.color}`).join(", ");
|
|
2073
2119
|
s.push(` override-colors: ${i};`);
|
|
2074
2120
|
}
|
|
2075
2121
|
t.push(`@font-palette-values ${o.name} {
|
|
@@ -2080,31 +2126,31 @@ ${s.join(`
|
|
|
2080
2126
|
return t.length > 0 ? t.join(`
|
|
2081
2127
|
|
|
2082
2128
|
`) : null;
|
|
2083
|
-
},
|
|
2129
|
+
}, li = (e) => {
|
|
2084
2130
|
for (const t of e)
|
|
2085
2131
|
for (const n of t.palettes ?? [])
|
|
2086
2132
|
if (n.applyToWidget)
|
|
2087
2133
|
return n.name;
|
|
2088
|
-
},
|
|
2089
|
-
if (!
|
|
2134
|
+
}, ci = (e, t, n) => {
|
|
2135
|
+
if (!je(n) || !e)
|
|
2090
2136
|
return null;
|
|
2091
|
-
const o =
|
|
2092
|
-
for (const
|
|
2093
|
-
const
|
|
2094
|
-
|
|
2095
|
-
` font-family: ${
|
|
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};`
|
|
2096
2142
|
);
|
|
2097
2143
|
}
|
|
2098
|
-
const i =
|
|
2144
|
+
const i = li(o);
|
|
2099
2145
|
i && s.push(` font-palette: ${i};`);
|
|
2100
|
-
const
|
|
2146
|
+
const l = ri(o), r = `[data-rulecms-published-key="${It(e)}"] > *`, u = s.length > 0 ? `${r} {
|
|
2101
2147
|
${s.join(`
|
|
2102
2148
|
`)}
|
|
2103
2149
|
}` : null;
|
|
2104
|
-
return !
|
|
2150
|
+
return !l && !u ? null : l ? u ? `${l}
|
|
2105
2151
|
|
|
2106
|
-
${u}` :
|
|
2107
|
-
},
|
|
2152
|
+
${u}` : l : u;
|
|
2153
|
+
}, ai = ["href"], ui = /* @__PURE__ */ S({
|
|
2108
2154
|
__name: "ProjectCssFontsStylesheet",
|
|
2109
2155
|
props: {
|
|
2110
2156
|
publishedKey: {},
|
|
@@ -2112,34 +2158,34 @@ ${u}` : r : u;
|
|
|
2112
2158
|
includeFontFaces: { type: [Boolean, null] }
|
|
2113
2159
|
},
|
|
2114
2160
|
setup(e) {
|
|
2115
|
-
const t = e, n =
|
|
2116
|
-
() =>
|
|
2117
|
-
), s =
|
|
2118
|
-
() =>
|
|
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)
|
|
2119
2165
|
);
|
|
2120
|
-
return (i,
|
|
2121
|
-
o.value ? (f(),
|
|
2166
|
+
return (i, l) => (f(), w(k, null, [
|
|
2167
|
+
o.value ? (f(), w("link", {
|
|
2122
2168
|
key: 0,
|
|
2123
2169
|
rel: "stylesheet",
|
|
2124
2170
|
href: o.value,
|
|
2125
2171
|
"data-rulecms-project-fonts": ""
|
|
2126
|
-
}, null, 8,
|
|
2127
|
-
s.value ? (f(),
|
|
2172
|
+
}, null, 8, ai)) : T("", !0),
|
|
2173
|
+
s.value ? (f(), v(x("style"), {
|
|
2128
2174
|
key: 1,
|
|
2129
2175
|
"data-rulecms-project-fonts": ""
|
|
2130
2176
|
}, {
|
|
2131
|
-
default:
|
|
2132
|
-
|
|
2177
|
+
default: P(() => [
|
|
2178
|
+
j(M(s.value), 1)
|
|
2133
2179
|
]),
|
|
2134
2180
|
_: 1
|
|
2135
|
-
})) :
|
|
2181
|
+
})) : T("", !0)
|
|
2136
2182
|
], 64));
|
|
2137
2183
|
}
|
|
2138
2184
|
});
|
|
2139
|
-
function
|
|
2185
|
+
function Pt(e) {
|
|
2140
2186
|
return e !== !1;
|
|
2141
2187
|
}
|
|
2142
|
-
const
|
|
2188
|
+
const di = 80, pi = 4e3, fi = 32, Dt = [
|
|
2143
2189
|
"url(",
|
|
2144
2190
|
"@import",
|
|
2145
2191
|
"@font-face",
|
|
@@ -2150,7 +2196,7 @@ const Fs = 80, Bs = 4e3, Ks = 32, dt = [
|
|
|
2150
2196
|
"javascript:",
|
|
2151
2197
|
"expression(",
|
|
2152
2198
|
"behavior:"
|
|
2153
|
-
],
|
|
2199
|
+
], yi = /[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/, mi = /^[A-Za-z_][\w-]*$/, hi = (e) => {
|
|
2154
2200
|
let t = 0;
|
|
2155
2201
|
for (const n of e)
|
|
2156
2202
|
if (n === "{")
|
|
@@ -2158,12 +2204,12 @@ const Fs = 80, Bs = 4e3, Ks = 32, dt = [
|
|
|
2158
2204
|
else if (n === "}" && (t -= 1, t < 0))
|
|
2159
2205
|
return !1;
|
|
2160
2206
|
return t === 0;
|
|
2161
|
-
},
|
|
2162
|
-
if (!e || e.length >
|
|
2207
|
+
}, gi = (e) => {
|
|
2208
|
+
if (!e || e.length > di || e.includes("@") || e.includes(".") || /\s/.test(e))
|
|
2163
2209
|
return !1;
|
|
2164
2210
|
const t = e.toLowerCase();
|
|
2165
|
-
return
|
|
2166
|
-
},
|
|
2211
|
+
return Dt.some((n) => t.includes(n)) ? !1 : mi.test(e);
|
|
2212
|
+
}, bi = (e) => {
|
|
2167
2213
|
const t = e.trim();
|
|
2168
2214
|
if (t === "")
|
|
2169
2215
|
return !1;
|
|
@@ -2175,7 +2221,7 @@ const Fs = 80, Bs = 4e3, Ks = 32, dt = [
|
|
|
2175
2221
|
return !1;
|
|
2176
2222
|
const s = Number(o[1]);
|
|
2177
2223
|
return s >= 0 && s <= 100;
|
|
2178
|
-
},
|
|
2224
|
+
}, Ci = (e) => {
|
|
2179
2225
|
let t = 0;
|
|
2180
2226
|
const n = e.length;
|
|
2181
2227
|
let o = 0;
|
|
@@ -2185,137 +2231,137 @@ const Fs = 80, Bs = 4e3, Ks = 32, dt = [
|
|
|
2185
2231
|
};
|
|
2186
2232
|
for (s(); t < n; ) {
|
|
2187
2233
|
const i = e.indexOf("{", t);
|
|
2188
|
-
if (i === -1 || !e.slice(t, i).trim().split(",").every((
|
|
2234
|
+
if (i === -1 || !e.slice(t, i).trim().split(",").every((a) => bi(a)))
|
|
2189
2235
|
return !1;
|
|
2190
2236
|
t = i + 1;
|
|
2191
|
-
const
|
|
2192
|
-
if (
|
|
2237
|
+
const r = e.indexOf("}", t);
|
|
2238
|
+
if (r === -1)
|
|
2193
2239
|
return !1;
|
|
2194
|
-
const u = e.slice(t,
|
|
2240
|
+
const u = e.slice(t, r);
|
|
2195
2241
|
if (u.includes("{") || u.includes("}") || u.includes("@"))
|
|
2196
2242
|
return !1;
|
|
2197
|
-
t =
|
|
2243
|
+
t = r + 1, o += 1, s();
|
|
2198
2244
|
}
|
|
2199
2245
|
return o > 0;
|
|
2200
|
-
},
|
|
2246
|
+
}, wi = (e) => {
|
|
2201
2247
|
const t = e.trim();
|
|
2202
|
-
if (!t || t.length >
|
|
2248
|
+
if (!t || t.length > pi || yi.test(t) || !hi(t))
|
|
2203
2249
|
return !1;
|
|
2204
2250
|
const n = t.toLowerCase();
|
|
2205
|
-
return
|
|
2206
|
-
},
|
|
2251
|
+
return Dt.some((o) => n.includes(o)) || t.includes("@") ? !1 : Ci(t);
|
|
2252
|
+
}, xt = (e) => {
|
|
2207
2253
|
if (!e)
|
|
2208
2254
|
return {};
|
|
2209
2255
|
const t = {};
|
|
2210
2256
|
for (const [n, o] of Object.entries(e)) {
|
|
2211
2257
|
const s = n.trim();
|
|
2212
|
-
if (!
|
|
2258
|
+
if (!gi(s) || t[s] !== void 0 || typeof o != "string")
|
|
2213
2259
|
continue;
|
|
2214
2260
|
const i = o.trim();
|
|
2215
|
-
if (
|
|
2261
|
+
if (wi(i) && (t[s] = i, Object.keys(t).length === fi))
|
|
2216
2262
|
break;
|
|
2217
2263
|
}
|
|
2218
2264
|
return Object.fromEntries(
|
|
2219
2265
|
Object.entries(t).sort(([n], [o]) => n.localeCompare(o))
|
|
2220
2266
|
);
|
|
2221
|
-
},
|
|
2267
|
+
}, vi = (e) => e.split(`
|
|
2222
2268
|
`).map((t) => ` ${t}`).join(`
|
|
2223
|
-
`),
|
|
2224
|
-
if (!
|
|
2269
|
+
`), Ai = (e, t, n) => {
|
|
2270
|
+
if (!Pt(n))
|
|
2225
2271
|
return null;
|
|
2226
|
-
const o =
|
|
2272
|
+
const o = xt(t), s = Object.keys(o);
|
|
2227
2273
|
return s.length === 0 ? null : s.map((i) => `@keyframes ${i} {
|
|
2228
|
-
${
|
|
2274
|
+
${vi(o[i])}
|
|
2229
2275
|
}`).join(`
|
|
2230
2276
|
|
|
2231
2277
|
`);
|
|
2232
|
-
},
|
|
2278
|
+
}, Ei = /* @__PURE__ */ S({
|
|
2233
2279
|
__name: "ProjectCssKeyframesStylesheet",
|
|
2234
2280
|
props: {
|
|
2235
2281
|
publishedKey: {},
|
|
2236
2282
|
keyframes: {}
|
|
2237
2283
|
},
|
|
2238
2284
|
setup(e) {
|
|
2239
|
-
const t = e, n =
|
|
2240
|
-
() =>
|
|
2285
|
+
const t = e, n = y(
|
|
2286
|
+
() => Ai(t.publishedKey, t.keyframes)
|
|
2241
2287
|
);
|
|
2242
|
-
return (o, s) => n.value ? (f(),
|
|
2288
|
+
return (o, s) => n.value ? (f(), v(x("style"), {
|
|
2243
2289
|
key: 0,
|
|
2244
2290
|
"data-rulecms-project-keyframes": ""
|
|
2245
2291
|
}, {
|
|
2246
|
-
default:
|
|
2247
|
-
|
|
2292
|
+
default: P(() => [
|
|
2293
|
+
j(M(n.value), 1)
|
|
2248
2294
|
]),
|
|
2249
2295
|
_: 1
|
|
2250
|
-
})) :
|
|
2296
|
+
})) : T("", !0);
|
|
2251
2297
|
}
|
|
2252
|
-
}),
|
|
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) => {
|
|
2253
2299
|
for (const t of e)
|
|
2254
2300
|
if (t === "{" || t === "}")
|
|
2255
2301
|
return !1;
|
|
2256
2302
|
return !0;
|
|
2257
|
-
},
|
|
2258
|
-
if (!e || e.length >
|
|
2303
|
+
}, xi = (e) => {
|
|
2304
|
+
if (!e || e.length > Si || e.includes("@") || e.includes(".") || /\s/.test(e))
|
|
2259
2305
|
return !1;
|
|
2260
2306
|
const t = e.toLowerCase();
|
|
2261
|
-
return
|
|
2262
|
-
},
|
|
2307
|
+
return Lt.some((n) => t.includes(n)) ? !1 : Pi.test(e);
|
|
2308
|
+
}, $i = (e) => {
|
|
2263
2309
|
const t = e.trim();
|
|
2264
|
-
if (!t || t.length >
|
|
2310
|
+
if (!t || t.length > ki || Ii.test(t) || !Di(t))
|
|
2265
2311
|
return !1;
|
|
2266
2312
|
const n = t.toLowerCase();
|
|
2267
|
-
return !
|
|
2268
|
-
},
|
|
2313
|
+
return !Lt.some((o) => n.includes(o));
|
|
2314
|
+
}, Rt = (e) => {
|
|
2269
2315
|
if (!e)
|
|
2270
2316
|
return {};
|
|
2271
2317
|
const t = {};
|
|
2272
2318
|
for (const [n, o] of Object.entries(e)) {
|
|
2273
2319
|
const s = n.trim();
|
|
2274
|
-
if (!
|
|
2320
|
+
if (!xi(s) || t[s] !== void 0 || typeof o != "string")
|
|
2275
2321
|
continue;
|
|
2276
2322
|
const i = o.trim();
|
|
2277
|
-
if (
|
|
2323
|
+
if ($i(i) && (t[s] = i, Object.keys(t).length === Ti))
|
|
2278
2324
|
break;
|
|
2279
2325
|
}
|
|
2280
2326
|
return Object.fromEntries(
|
|
2281
2327
|
Object.entries(t).sort(([n], [o]) => n.localeCompare(o))
|
|
2282
2328
|
);
|
|
2283
|
-
},
|
|
2329
|
+
}, Li = (e) => e.split(`
|
|
2284
2330
|
`).map((t) => ` ${t}`).join(`
|
|
2285
|
-
`),
|
|
2286
|
-
if (
|
|
2331
|
+
`), Ri = (e, t, n) => {
|
|
2332
|
+
if (!$t(n))
|
|
2287
2333
|
return null;
|
|
2288
|
-
const o =
|
|
2334
|
+
const o = Rt(t), s = Object.keys(o);
|
|
2289
2335
|
return s.length === 0 ? null : s.map((i) => `@position-try ${i} {
|
|
2290
|
-
${
|
|
2336
|
+
${Li(o[i])}
|
|
2291
2337
|
}`).join(`
|
|
2292
2338
|
|
|
2293
2339
|
`);
|
|
2294
|
-
},
|
|
2340
|
+
}, _i = /* @__PURE__ */ S({
|
|
2295
2341
|
__name: "ProjectCssPositionTryStylesheet",
|
|
2296
2342
|
props: {
|
|
2297
2343
|
publishedKey: {},
|
|
2298
2344
|
positionTry: {}
|
|
2299
2345
|
},
|
|
2300
2346
|
setup(e) {
|
|
2301
|
-
const t = e, n =
|
|
2302
|
-
() =>
|
|
2347
|
+
const t = e, n = y(
|
|
2348
|
+
() => Ri(t.publishedKey, t.positionTry)
|
|
2303
2349
|
);
|
|
2304
|
-
return (o, s) => n.value ? (f(),
|
|
2350
|
+
return (o, s) => n.value ? (f(), v(x("style"), {
|
|
2305
2351
|
key: 0,
|
|
2306
2352
|
"data-rulecms-project-position-try": ""
|
|
2307
2353
|
}, {
|
|
2308
|
-
default:
|
|
2309
|
-
|
|
2354
|
+
default: P(() => [
|
|
2355
|
+
j(M(n.value), 1)
|
|
2310
2356
|
]),
|
|
2311
2357
|
_: 1
|
|
2312
|
-
})) :
|
|
2358
|
+
})) : T("", !0);
|
|
2313
2359
|
}
|
|
2314
2360
|
});
|
|
2315
|
-
function
|
|
2361
|
+
function _t(e) {
|
|
2316
2362
|
return e !== !1;
|
|
2317
2363
|
}
|
|
2318
|
-
const
|
|
2364
|
+
const Oi = [
|
|
2319
2365
|
"*",
|
|
2320
2366
|
"<number>",
|
|
2321
2367
|
"<integer>",
|
|
@@ -2327,18 +2373,18 @@ const di = [
|
|
|
2327
2373
|
"<time>",
|
|
2328
2374
|
"<transform-function>",
|
|
2329
2375
|
"<transform-list>"
|
|
2330
|
-
],
|
|
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) => {
|
|
2331
2377
|
if (!Array.isArray(e))
|
|
2332
2378
|
return [];
|
|
2333
2379
|
const t = [], n = /* @__PURE__ */ new Set();
|
|
2334
2380
|
for (const o of e) {
|
|
2335
|
-
if (!o || typeof o.name != "string" || !
|
|
2381
|
+
if (!o || typeof o.name != "string" || !Q(o.name.trim()))
|
|
2336
2382
|
continue;
|
|
2337
2383
|
const s = o.name.trim();
|
|
2338
|
-
if (n.has(s) || t.length >=
|
|
2384
|
+
if (n.has(s) || t.length >= Ni || !Vi(o.syntax) || typeof o.inherits != "boolean")
|
|
2339
2385
|
continue;
|
|
2340
2386
|
const i = typeof o.initialValue == "string" ? o.initialValue.trim() : "";
|
|
2341
|
-
|
|
2387
|
+
Fi(i, o.syntax) && (n.add(s), t.push({
|
|
2342
2388
|
name: s,
|
|
2343
2389
|
syntax: o.syntax,
|
|
2344
2390
|
inherits: o.inherits,
|
|
@@ -2346,7 +2392,7 @@ const di = [
|
|
|
2346
2392
|
}));
|
|
2347
2393
|
}
|
|
2348
2394
|
return t;
|
|
2349
|
-
},
|
|
2395
|
+
}, Bi = (e) => {
|
|
2350
2396
|
const t = [
|
|
2351
2397
|
`@property ${e.name} {`,
|
|
2352
2398
|
` syntax: "${e.syntax}";`,
|
|
@@ -2354,311 +2400,400 @@ const di = [
|
|
|
2354
2400
|
];
|
|
2355
2401
|
return e.initialValue !== "" && t.push(` initial-value: ${e.initialValue};`), t.push("}"), t.join(`
|
|
2356
2402
|
`);
|
|
2357
|
-
},
|
|
2358
|
-
if (!
|
|
2403
|
+
}, Ki = (e, t, n) => {
|
|
2404
|
+
if (!_t(n))
|
|
2359
2405
|
return null;
|
|
2360
|
-
const o =
|
|
2361
|
-
return o.length === 0 ? null : o.map(
|
|
2406
|
+
const o = Ot(t);
|
|
2407
|
+
return o.length === 0 ? null : o.map(Bi).join(`
|
|
2362
2408
|
|
|
2363
2409
|
`);
|
|
2364
|
-
},
|
|
2410
|
+
}, Ui = /* @__PURE__ */ S({
|
|
2365
2411
|
__name: "ProjectCssPropertiesStylesheet",
|
|
2366
2412
|
props: {
|
|
2367
2413
|
publishedKey: {},
|
|
2368
2414
|
cssProperties: {}
|
|
2369
2415
|
},
|
|
2370
2416
|
setup(e) {
|
|
2371
|
-
const t = e, n =
|
|
2372
|
-
() =>
|
|
2417
|
+
const t = e, n = y(
|
|
2418
|
+
() => Ki(t.publishedKey, t.cssProperties)
|
|
2373
2419
|
);
|
|
2374
|
-
return (o, s) => n.value ? (f(),
|
|
2420
|
+
return (o, s) => n.value ? (f(), v(x("style"), {
|
|
2375
2421
|
key: 0,
|
|
2376
2422
|
"data-rulecms-project-css-properties": ""
|
|
2377
2423
|
}, {
|
|
2378
|
-
default:
|
|
2379
|
-
|
|
2424
|
+
default: P(() => [
|
|
2425
|
+
j(M(n.value), 1)
|
|
2380
2426
|
]),
|
|
2381
2427
|
_: 1
|
|
2382
|
-
})) :
|
|
2428
|
+
})) : T("", !0);
|
|
2383
2429
|
}
|
|
2384
2430
|
});
|
|
2385
|
-
function
|
|
2431
|
+
function Mt(e) {
|
|
2386
2432
|
return e !== !1;
|
|
2387
2433
|
}
|
|
2388
|
-
const
|
|
2434
|
+
const jt = (e) => e.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), zi = /[{};]/, Hi = (e) => {
|
|
2389
2435
|
if (!e)
|
|
2390
2436
|
return {};
|
|
2391
2437
|
const t = {};
|
|
2392
2438
|
for (const [n, o] of Object.entries(e)) {
|
|
2393
|
-
if (!
|
|
2439
|
+
if (!Q(n) || typeof o != "string")
|
|
2394
2440
|
continue;
|
|
2395
2441
|
const s = o.trim();
|
|
2396
|
-
s === "" ||
|
|
2442
|
+
s === "" || zi.test(s) || (t[n.trim()] = s);
|
|
2397
2443
|
}
|
|
2398
2444
|
return t;
|
|
2399
|
-
},
|
|
2400
|
-
if (!
|
|
2445
|
+
}, Gi = (e, t, n) => {
|
|
2446
|
+
if (!Mt(n))
|
|
2401
2447
|
return null;
|
|
2402
|
-
const o =
|
|
2448
|
+
const o = Hi(t), s = Object.keys(o);
|
|
2403
2449
|
if (s.length === 0 || !e)
|
|
2404
2450
|
return null;
|
|
2405
|
-
const i = `[data-rulecms-published-key="${
|
|
2451
|
+
const i = `[data-rulecms-published-key="${jt(e)}"] > *`, l = s.sort((r, u) => r.localeCompare(u)).map((r) => ` ${r}: ${o[r]};`).join(`
|
|
2406
2452
|
`);
|
|
2407
2453
|
return `${i} {
|
|
2408
|
-
${
|
|
2454
|
+
${l}
|
|
2409
2455
|
}`;
|
|
2410
2456
|
};
|
|
2411
|
-
function
|
|
2457
|
+
function Nt(e) {
|
|
2412
2458
|
return e !== !1;
|
|
2413
2459
|
}
|
|
2414
|
-
const
|
|
2460
|
+
const Yi = 5, Xi = 200, Ji = [
|
|
2415
2461
|
{ kind: "prefers-color-scheme", value: "dark" },
|
|
2416
2462
|
{ kind: "prefers-color-scheme", value: "light" },
|
|
2417
2463
|
{ kind: "html-class", value: "dark" },
|
|
2418
2464
|
{ kind: "data-theme", value: "dark" },
|
|
2419
2465
|
{ kind: "data-theme", value: "light" }
|
|
2420
|
-
],
|
|
2466
|
+
], qi = /[{};]/, Zi = (e) => {
|
|
2421
2467
|
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
2422
2468
|
return !1;
|
|
2423
2469
|
const t = e;
|
|
2424
|
-
return
|
|
2470
|
+
return Ji.some(
|
|
2425
2471
|
(n) => n.kind === t.kind && n.value === t.value
|
|
2426
2472
|
);
|
|
2427
|
-
},
|
|
2473
|
+
}, Qi = (e) => {
|
|
2428
2474
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
2429
2475
|
return {};
|
|
2430
2476
|
const t = {};
|
|
2431
2477
|
for (const [n, o] of Object.entries(e)) {
|
|
2432
|
-
if (!
|
|
2478
|
+
if (!Q(n) || typeof o != "string")
|
|
2433
2479
|
continue;
|
|
2434
2480
|
const s = o.trim();
|
|
2435
|
-
s === "" ||
|
|
2481
|
+
s === "" || qi.test(s) || s.includes("url(") || s.includes("@") || (t[n.trim()] = s);
|
|
2436
2482
|
}
|
|
2437
2483
|
return Object.fromEntries(
|
|
2438
2484
|
Object.entries(t).sort(([n], [o]) => n.localeCompare(o))
|
|
2439
2485
|
);
|
|
2440
|
-
},
|
|
2486
|
+
}, Wt = (e) => {
|
|
2441
2487
|
if (!Array.isArray(e))
|
|
2442
2488
|
return [];
|
|
2443
2489
|
const t = [], n = /* @__PURE__ */ new Set();
|
|
2444
2490
|
let o = 0;
|
|
2445
2491
|
for (const s of e) {
|
|
2446
|
-
if (!s || !
|
|
2492
|
+
if (!s || !Zi(s.condition))
|
|
2447
2493
|
continue;
|
|
2448
2494
|
const i = `${s.condition.kind}:${s.condition.value}`;
|
|
2449
2495
|
if (n.has(i))
|
|
2450
2496
|
continue;
|
|
2451
|
-
const
|
|
2452
|
-
if (!(Object.keys(
|
|
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))
|
|
2453
2499
|
break;
|
|
2454
2500
|
}
|
|
2455
2501
|
return t;
|
|
2456
|
-
},
|
|
2502
|
+
}, er = (e, t) => {
|
|
2457
2503
|
const n = Object.entries(e).map(([o, s]) => ` ${o}: ${s};`);
|
|
2458
2504
|
return `${t} {
|
|
2459
2505
|
${n.join(`
|
|
2460
2506
|
`)}
|
|
2461
2507
|
}`;
|
|
2462
|
-
},
|
|
2508
|
+
}, tr = (e) => e.split(`
|
|
2463
2509
|
`).map((t) => ` ${t}`).join(`
|
|
2464
|
-
`),
|
|
2465
|
-
const n =
|
|
2510
|
+
`), nr = (e, t) => {
|
|
2511
|
+
const n = er(e.variables, t), { kind: o, value: s } = e.condition;
|
|
2466
2512
|
return o === "prefers-color-scheme" ? `@media (prefers-color-scheme: ${s}) {
|
|
2467
|
-
${
|
|
2513
|
+
${tr(n)}
|
|
2468
2514
|
}` : o === "html-class" ? `html.${s} ${n}` : `[data-theme="${s}"] ${n}`;
|
|
2469
|
-
},
|
|
2470
|
-
if (!
|
|
2515
|
+
}, or = (e, t, n) => {
|
|
2516
|
+
if (!Nt(n) || !e)
|
|
2471
2517
|
return null;
|
|
2472
|
-
const o =
|
|
2518
|
+
const o = Wt(t);
|
|
2473
2519
|
if (o.length === 0)
|
|
2474
2520
|
return null;
|
|
2475
|
-
const s = `[data-rulecms-published-key="${
|
|
2476
|
-
return o.map((i) =>
|
|
2521
|
+
const s = `[data-rulecms-published-key="${jt(e)}"] > *`;
|
|
2522
|
+
return o.map((i) => nr(i, s)).join(`
|
|
2477
2523
|
|
|
2478
2524
|
`);
|
|
2479
|
-
},
|
|
2525
|
+
}, sr = /* @__PURE__ */ S({
|
|
2480
2526
|
__name: "ProjectCssThemesStylesheet",
|
|
2481
2527
|
props: {
|
|
2482
2528
|
publishedKey: {},
|
|
2483
2529
|
themes: {}
|
|
2484
2530
|
},
|
|
2485
2531
|
setup(e) {
|
|
2486
|
-
const t = e, n =
|
|
2487
|
-
() =>
|
|
2532
|
+
const t = e, n = y(
|
|
2533
|
+
() => or(t.publishedKey, t.themes)
|
|
2488
2534
|
);
|
|
2489
|
-
return (o, s) => n.value ? (f(),
|
|
2535
|
+
return (o, s) => n.value ? (f(), v(x("style"), {
|
|
2490
2536
|
key: 0,
|
|
2491
2537
|
"data-rulecms-project-themes": ""
|
|
2492
2538
|
}, {
|
|
2493
|
-
default:
|
|
2494
|
-
|
|
2539
|
+
default: P(() => [
|
|
2540
|
+
j(M(n.value), 1)
|
|
2495
2541
|
]),
|
|
2496
2542
|
_: 1
|
|
2497
|
-
})) :
|
|
2543
|
+
})) : T("", !0);
|
|
2498
2544
|
}
|
|
2499
|
-
}),
|
|
2545
|
+
}), ir = /* @__PURE__ */ S({
|
|
2500
2546
|
__name: "ProjectCssVariablesStylesheet",
|
|
2501
2547
|
props: {
|
|
2502
2548
|
publishedKey: {},
|
|
2503
2549
|
variables: {}
|
|
2504
2550
|
},
|
|
2505
2551
|
setup(e) {
|
|
2506
|
-
const t = e, n =
|
|
2507
|
-
() =>
|
|
2552
|
+
const t = e, n = y(
|
|
2553
|
+
() => Gi(t.publishedKey, t.variables)
|
|
2508
2554
|
);
|
|
2509
|
-
return (o, s) => n.value ? (f(),
|
|
2555
|
+
return (o, s) => n.value ? (f(), v(x("style"), {
|
|
2510
2556
|
key: 0,
|
|
2511
2557
|
"data-rulecms-project-css-variables": ""
|
|
2512
2558
|
}, {
|
|
2513
|
-
default:
|
|
2514
|
-
|
|
2559
|
+
default: P(() => [
|
|
2560
|
+
j(M(n.value), 1)
|
|
2515
2561
|
]),
|
|
2516
2562
|
_: 1
|
|
2517
|
-
})) :
|
|
2563
|
+
})) : T("", !0);
|
|
2518
2564
|
}
|
|
2519
2565
|
});
|
|
2520
|
-
function
|
|
2566
|
+
function Vt(e) {
|
|
2521
2567
|
return e !== !1;
|
|
2522
2568
|
}
|
|
2523
|
-
const
|
|
2569
|
+
const rr = [
|
|
2524
2570
|
"light",
|
|
2525
2571
|
"dark",
|
|
2526
2572
|
"light dark"
|
|
2527
|
-
],
|
|
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) => {
|
|
2528
2574
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
2529
2575
|
return null;
|
|
2530
|
-
const t =
|
|
2531
|
-
...typeof e.colorScheme == "string" &&
|
|
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 } : {},
|
|
2532
2578
|
...t ? { selectionBackground: t } : {},
|
|
2533
2579
|
...n ? { selectionColor: n } : {},
|
|
2534
2580
|
...o ? { caretColor: o } : {},
|
|
2535
2581
|
...s ? { scrollbarColor: s } : {},
|
|
2536
|
-
...typeof e.scrollbarWidth == "string" &&
|
|
2582
|
+
...typeof e.scrollbarWidth == "string" && ar.has(e.scrollbarWidth) ? { scrollbarWidth: e.scrollbarWidth } : {}
|
|
2537
2583
|
};
|
|
2538
2584
|
return Object.keys(i).length > 0 ? i : null;
|
|
2539
|
-
},
|
|
2540
|
-
if (!
|
|
2585
|
+
}, pr = (e, t, n) => {
|
|
2586
|
+
if (!Vt(n) || !e)
|
|
2541
2587
|
return null;
|
|
2542
|
-
const o =
|
|
2588
|
+
const o = Ft(t);
|
|
2543
2589
|
if (!o)
|
|
2544
2590
|
return null;
|
|
2545
|
-
const s = `[data-rulecms-published-key="${
|
|
2591
|
+
const s = `[data-rulecms-published-key="${It(e)}"]`, i = [];
|
|
2546
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};`);
|
|
2547
|
-
const r = [];
|
|
2548
|
-
o.selectionBackground && r.push(` background: ${o.selectionBackground};`), o.selectionColor && r.push(` color: ${o.selectionColor};`);
|
|
2549
2593
|
const l = [];
|
|
2550
|
-
|
|
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} > * {
|
|
2551
2597
|
${i.join(`
|
|
2552
2598
|
`)}
|
|
2553
|
-
}`),
|
|
2554
|
-
${
|
|
2599
|
+
}`), l.length > 0 && r.push(`${s} > * ::selection {
|
|
2600
|
+
${l.join(`
|
|
2555
2601
|
`)}
|
|
2556
|
-
}`),
|
|
2602
|
+
}`), r.length > 0 ? r.join(`
|
|
2557
2603
|
`) : null;
|
|
2558
|
-
},
|
|
2604
|
+
}, fr = /* @__PURE__ */ S({
|
|
2559
2605
|
__name: "ProjectCssWidgetChromeStylesheet",
|
|
2560
2606
|
props: {
|
|
2561
2607
|
publishedKey: {},
|
|
2562
2608
|
widgetChrome: {}
|
|
2563
2609
|
},
|
|
2564
2610
|
setup(e) {
|
|
2565
|
-
const t = e, n =
|
|
2566
|
-
() =>
|
|
2611
|
+
const t = e, n = y(
|
|
2612
|
+
() => pr(t.publishedKey, t.widgetChrome)
|
|
2567
2613
|
);
|
|
2568
|
-
return (o, s) => n.value ? (f(),
|
|
2614
|
+
return (o, s) => n.value ? (f(), v(x("style"), {
|
|
2569
2615
|
key: 0,
|
|
2570
2616
|
"data-rulecms-project-widget-chrome": ""
|
|
2571
2617
|
}, {
|
|
2572
|
-
default:
|
|
2573
|
-
|
|
2618
|
+
default: P(() => [
|
|
2619
|
+
j(M(n.value), 1)
|
|
2574
2620
|
]),
|
|
2575
2621
|
_: 1
|
|
2576
|
-
})) :
|
|
2622
|
+
})) : T("", !0);
|
|
2577
2623
|
}
|
|
2578
2624
|
});
|
|
2579
|
-
function
|
|
2625
|
+
function yr(e) {
|
|
2580
2626
|
return e !== !1;
|
|
2581
2627
|
}
|
|
2582
|
-
function
|
|
2628
|
+
function mr(e) {
|
|
2583
2629
|
const t = {};
|
|
2584
2630
|
return Object.entries(e).forEach(([n, o]) => {
|
|
2585
2631
|
const s = { ...o };
|
|
2586
2632
|
if (s.itemList)
|
|
2587
2633
|
try {
|
|
2588
2634
|
s.collectionRows = typeof s.itemList == "string" ? JSON.parse(s.itemList) : s.itemList;
|
|
2589
|
-
} catch (
|
|
2590
|
-
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: [] };
|
|
2591
2637
|
}
|
|
2592
2638
|
let i = `${s.name}$${n}`;
|
|
2593
2639
|
s.parentId && (i = `${i}@${s.parentId}`), t[i] = s;
|
|
2594
2640
|
}), t;
|
|
2595
2641
|
}
|
|
2596
|
-
function
|
|
2642
|
+
function hr(e) {
|
|
2597
2643
|
return typeof e.itemList == "string" ? JSON.parse(e.itemList) : e.itemList;
|
|
2598
2644
|
}
|
|
2599
|
-
function
|
|
2600
|
-
const t =
|
|
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;
|
|
2601
2647
|
return {
|
|
2602
|
-
displayItemList:
|
|
2603
|
-
widgetCollections:
|
|
2648
|
+
displayItemList: hr(e.widget),
|
|
2649
|
+
widgetCollections: mr(e.childCollections),
|
|
2604
2650
|
...e.libraries ? { libraries: e.libraries } : {},
|
|
2605
|
-
...
|
|
2606
|
-
...
|
|
2607
|
-
...
|
|
2608
|
-
...
|
|
2609
|
-
...
|
|
2610
|
-
...
|
|
2611
|
-
...
|
|
2612
|
-
...
|
|
2613
|
-
|
|
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 } : {}
|
|
2614
2660
|
};
|
|
2615
2661
|
}
|
|
2616
|
-
function
|
|
2617
|
-
const t = e.registry ??
|
|
2662
|
+
function gr(e) {
|
|
2663
|
+
const t = e.registry ?? pe(), n = De({
|
|
2618
2664
|
displayItemList: e.displayItemList,
|
|
2619
2665
|
widgetCollections: e.widgetCollections
|
|
2620
2666
|
});
|
|
2621
2667
|
return t.resolveSync({ registrations: e.libraries, referenced: n });
|
|
2622
2668
|
}
|
|
2623
|
-
function
|
|
2624
|
-
const t = e.registry ??
|
|
2669
|
+
function br(e) {
|
|
2670
|
+
const t = e.registry ?? pe(), n = De({
|
|
2625
2671
|
displayItemList: e.displayItemList,
|
|
2626
2672
|
widgetCollections: e.widgetCollections
|
|
2627
2673
|
});
|
|
2628
2674
|
return t.resolve({ registrations: e.libraries, referenced: n });
|
|
2629
2675
|
}
|
|
2630
|
-
|
|
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 = {
|
|
2631
2766
|
display: "flex",
|
|
2632
2767
|
justifyContent: "center",
|
|
2633
2768
|
alignItems: "center",
|
|
2634
2769
|
padding: "3rem",
|
|
2635
2770
|
color: "#e2e8f0"
|
|
2636
|
-
},
|
|
2771
|
+
}, Ir = {
|
|
2637
2772
|
display: "flex",
|
|
2638
2773
|
alignItems: "center",
|
|
2639
2774
|
gap: "1rem"
|
|
2640
|
-
},
|
|
2775
|
+
}, Pr = {
|
|
2641
2776
|
width: "40px",
|
|
2642
2777
|
height: "40px",
|
|
2643
2778
|
border: "4px solid #4a5568",
|
|
2644
2779
|
borderTopColor: "#63b3ed",
|
|
2645
2780
|
borderRadius: "50%",
|
|
2646
2781
|
animation: "spin 1s linear infinite"
|
|
2647
|
-
},
|
|
2782
|
+
}, et = {
|
|
2648
2783
|
padding: "1.5rem",
|
|
2649
2784
|
backgroundColor: "#742a2a",
|
|
2650
2785
|
border: "1px solid #9b2c2c",
|
|
2651
2786
|
borderRadius: "8px",
|
|
2652
2787
|
color: "#fed7d7"
|
|
2653
|
-
},
|
|
2788
|
+
}, tt = {
|
|
2654
2789
|
fontSize: "16px",
|
|
2655
2790
|
fontWeight: "600",
|
|
2656
2791
|
marginBottom: "0.5rem",
|
|
2657
2792
|
color: "#feb2b2"
|
|
2658
|
-
},
|
|
2793
|
+
}, nt = {
|
|
2659
2794
|
fontSize: "14px",
|
|
2660
2795
|
color: "#fed7d7"
|
|
2661
|
-
},
|
|
2796
|
+
}, Dr = `
|
|
2662
2797
|
@keyframes spin {
|
|
2663
2798
|
from {
|
|
2664
2799
|
transform: rotate(0deg);
|
|
@@ -2667,109 +2802,176 @@ const Xi = {
|
|
|
2667
2802
|
transform: rotate(360deg);
|
|
2668
2803
|
}
|
|
2669
2804
|
}
|
|
2670
|
-
`,
|
|
2805
|
+
`, Jr = "data-rulecms-published-key", xr = ["data-rulecms-published-key"], qr = /* @__PURE__ */ S({
|
|
2671
2806
|
__name: "RuleCMSWidget",
|
|
2672
2807
|
props: {
|
|
2673
2808
|
publishedKey: {},
|
|
2809
|
+
rulesetPublishedKey: {},
|
|
2810
|
+
params: {},
|
|
2811
|
+
anonymousId: { type: [String, Boolean] },
|
|
2812
|
+
fallbackPublishedKey: {},
|
|
2813
|
+
contentType: {},
|
|
2674
2814
|
token: {},
|
|
2675
2815
|
endpoint: {},
|
|
2676
2816
|
mode: { default: "client-fetch" },
|
|
2677
2817
|
initialData: {},
|
|
2678
2818
|
libraries: {},
|
|
2679
2819
|
componentProps: {},
|
|
2680
|
-
mounts: {}
|
|
2820
|
+
mounts: {},
|
|
2821
|
+
placeholderValues: {},
|
|
2822
|
+
onSelection: {}
|
|
2681
2823
|
},
|
|
2682
2824
|
setup(e) {
|
|
2683
|
-
const t = e, n =
|
|
2684
|
-
sourceComponents:
|
|
2685
|
-
}));
|
|
2686
|
-
let
|
|
2687
|
-
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() {
|
|
2688
2830
|
if (!i.value) {
|
|
2689
|
-
|
|
2831
|
+
l.value = null;
|
|
2690
2832
|
return;
|
|
2691
2833
|
}
|
|
2692
|
-
const
|
|
2834
|
+
const I = t.libraries ?? (n == null ? void 0 : n.libraries), $ = n == null ? void 0 : n.libraryRegistry, V = gr({
|
|
2693
2835
|
displayItemList: i.value.displayItemList,
|
|
2694
2836
|
widgetCollections: i.value.widgetCollections,
|
|
2695
|
-
libraries:
|
|
2696
|
-
registry:
|
|
2837
|
+
libraries: I,
|
|
2838
|
+
registry: $
|
|
2697
2839
|
});
|
|
2698
|
-
if (
|
|
2699
|
-
|
|
2840
|
+
if (V) {
|
|
2841
|
+
l.value = V;
|
|
2700
2842
|
return;
|
|
2701
2843
|
}
|
|
2702
|
-
|
|
2844
|
+
br({
|
|
2703
2845
|
displayItemList: i.value.displayItemList,
|
|
2704
2846
|
widgetCollections: i.value.widgetCollections,
|
|
2705
|
-
libraries:
|
|
2706
|
-
registry:
|
|
2707
|
-
}).then((
|
|
2708
|
-
|
|
2847
|
+
libraries: I,
|
|
2848
|
+
registry: $
|
|
2849
|
+
}).then((_) => {
|
|
2850
|
+
l.value = _;
|
|
2709
2851
|
});
|
|
2710
2852
|
}
|
|
2711
|
-
function
|
|
2712
|
-
i.value &&
|
|
2853
|
+
function g() {
|
|
2854
|
+
i.value && is({
|
|
2713
2855
|
componentProps: t.componentProps,
|
|
2714
2856
|
displayItemList: i.value.displayItemList,
|
|
2715
2857
|
widgetCollections: i.value.widgetCollections,
|
|
2716
|
-
publishedKey:
|
|
2858
|
+
publishedKey: p.value
|
|
2717
2859
|
});
|
|
2718
2860
|
}
|
|
2719
|
-
function
|
|
2720
|
-
if (
|
|
2861
|
+
function ee() {
|
|
2862
|
+
if (h || typeof document > "u")
|
|
2721
2863
|
return;
|
|
2722
|
-
const
|
|
2723
|
-
if (!document.getElementById(
|
|
2724
|
-
const
|
|
2725
|
-
|
|
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($);
|
|
2726
2868
|
}
|
|
2727
|
-
|
|
2869
|
+
h = !0;
|
|
2728
2870
|
}
|
|
2729
|
-
function
|
|
2730
|
-
const
|
|
2731
|
-
if (!t.publishedKey || !
|
|
2732
|
-
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;
|
|
2733
2875
|
return;
|
|
2734
2876
|
}
|
|
2735
|
-
const
|
|
2736
|
-
|
|
2737
|
-
|
|
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();
|
|
2738
2889
|
return;
|
|
2739
2890
|
}
|
|
2740
|
-
|
|
2741
|
-
const
|
|
2742
|
-
|
|
2743
|
-
const
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
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
|
+
}
|
|
2756
2916
|
}
|
|
2757
|
-
|
|
2758
|
-
|
|
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;
|
|
2934
|
+
}
|
|
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);
|
|
2759
2956
|
}).finally(() => {
|
|
2760
|
-
o.value = !1;
|
|
2957
|
+
b === le && (o.value = !1);
|
|
2761
2958
|
});
|
|
2762
2959
|
}
|
|
2763
|
-
function
|
|
2960
|
+
function Gt() {
|
|
2764
2961
|
if (t.mode === "pre-fetched") {
|
|
2765
|
-
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();
|
|
2766
2963
|
return;
|
|
2767
2964
|
}
|
|
2768
|
-
|
|
2965
|
+
ee(), me();
|
|
2769
2966
|
}
|
|
2770
|
-
|
|
2967
|
+
st(
|
|
2771
2968
|
() => [
|
|
2772
2969
|
t.publishedKey,
|
|
2970
|
+
t.rulesetPublishedKey,
|
|
2971
|
+
t.params,
|
|
2972
|
+
t.anonymousId,
|
|
2973
|
+
t.fallbackPublishedKey,
|
|
2974
|
+
t.contentType,
|
|
2773
2975
|
t.token,
|
|
2774
2976
|
t.endpoint,
|
|
2775
2977
|
t.mode,
|
|
@@ -2778,90 +2980,97 @@ const Xi = {
|
|
|
2778
2980
|
t.componentProps
|
|
2779
2981
|
],
|
|
2780
2982
|
() => {
|
|
2781
|
-
|
|
2983
|
+
Gt();
|
|
2782
2984
|
},
|
|
2783
2985
|
{ immediate: !0 }
|
|
2784
|
-
),
|
|
2785
|
-
|
|
2786
|
-
})
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
"
|
|
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,
|
|
2790
2998
|
style: { display: "contents" }
|
|
2791
2999
|
}, [
|
|
2792
|
-
|
|
2793
|
-
"published-key":
|
|
2794
|
-
fonts: (
|
|
3000
|
+
R(ui, {
|
|
3001
|
+
"published-key": p.value,
|
|
3002
|
+
fonts: (V = i.value) == null ? void 0 : V.fontFaces
|
|
2795
3003
|
}, null, 8, ["published-key", "fonts"]),
|
|
2796
|
-
|
|
2797
|
-
"published-key":
|
|
2798
|
-
keyframes: (
|
|
3004
|
+
R(Ei, {
|
|
3005
|
+
"published-key": p.value,
|
|
3006
|
+
keyframes: (_ = i.value) == null ? void 0 : _.keyframes
|
|
2799
3007
|
}, null, 8, ["published-key", "keyframes"]),
|
|
2800
|
-
|
|
2801
|
-
"published-key":
|
|
2802
|
-
themes: (
|
|
3008
|
+
R(sr, {
|
|
3009
|
+
"published-key": p.value,
|
|
3010
|
+
themes: (X = i.value) == null ? void 0 : X.themes
|
|
2803
3011
|
}, null, 8, ["published-key", "themes"]),
|
|
2804
|
-
|
|
2805
|
-
"published-key":
|
|
2806
|
-
"css-properties": (
|
|
3012
|
+
R(Ui, {
|
|
3013
|
+
"published-key": p.value,
|
|
3014
|
+
"css-properties": (ne = i.value) == null ? void 0 : ne.cssProperties
|
|
2807
3015
|
}, null, 8, ["published-key", "css-properties"]),
|
|
2808
|
-
|
|
2809
|
-
"published-key":
|
|
2810
|
-
"widget-chrome": (
|
|
3016
|
+
R(fr, {
|
|
3017
|
+
"published-key": p.value,
|
|
3018
|
+
"widget-chrome": (oe = i.value) == null ? void 0 : oe.widgetChrome
|
|
2811
3019
|
}, null, 8, ["published-key", "widget-chrome"]),
|
|
2812
|
-
|
|
2813
|
-
"published-key":
|
|
2814
|
-
"position-try": (
|
|
3020
|
+
R(_i, {
|
|
3021
|
+
"published-key": p.value,
|
|
3022
|
+
"position-try": (le = i.value) == null ? void 0 : le.positionTry
|
|
2815
3023
|
}, null, 8, ["published-key", "position-try"]),
|
|
2816
|
-
|
|
2817
|
-
"published-key":
|
|
2818
|
-
variables: (
|
|
3024
|
+
R(ir, {
|
|
3025
|
+
"published-key": p.value,
|
|
3026
|
+
variables: (se = i.value) == null ? void 0 : se.cssVariables
|
|
2819
3027
|
}, null, 8, ["published-key", "variables"]),
|
|
2820
|
-
|
|
2821
|
-
"published-key":
|
|
2822
|
-
classes: (
|
|
2823
|
-
"class-layer": (
|
|
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
|
|
2824
3032
|
}, null, 8, ["published-key", "classes", "class-layer"]),
|
|
2825
|
-
e.mode !== "pre-fetched" && o.value ? (f(),
|
|
3033
|
+
e.mode !== "pre-fetched" && o.value ? (f(), w("div", {
|
|
2826
3034
|
key: 0,
|
|
2827
|
-
style:
|
|
3035
|
+
style: D(F(Tr))
|
|
2828
3036
|
}, [
|
|
2829
|
-
|
|
2830
|
-
style:
|
|
3037
|
+
z("div", {
|
|
3038
|
+
style: D(F(Ir))
|
|
2831
3039
|
}, [
|
|
2832
|
-
|
|
2833
|
-
style:
|
|
3040
|
+
z("div", {
|
|
3041
|
+
style: D(F(Pr))
|
|
2834
3042
|
}, null, 4)
|
|
2835
3043
|
], 4)
|
|
2836
|
-
], 4)) : e.mode !== "pre-fetched" && s.value ? (f(),
|
|
3044
|
+
], 4)) : e.mode !== "pre-fetched" && s.value ? (f(), w("div", {
|
|
2837
3045
|
key: 1,
|
|
2838
|
-
style:
|
|
3046
|
+
style: D(F(et))
|
|
2839
3047
|
}, [
|
|
2840
|
-
|
|
2841
|
-
style:
|
|
3048
|
+
z("div", {
|
|
3049
|
+
style: D(F(tt))
|
|
2842
3050
|
}, "Error Loading Widget", 4),
|
|
2843
|
-
|
|
2844
|
-
style:
|
|
2845
|
-
},
|
|
2846
|
-
], 4)) : e.mode !== "pre-fetched" && !i.value ? (f(),
|
|
3051
|
+
z("div", {
|
|
3052
|
+
style: D(F(nt))
|
|
3053
|
+
}, M(s.value), 5)
|
|
3054
|
+
], 4)) : e.mode !== "pre-fetched" && !i.value ? (f(), w("div", {
|
|
2847
3055
|
key: 2,
|
|
2848
|
-
style:
|
|
3056
|
+
style: D(F(et))
|
|
2849
3057
|
}, [
|
|
2850
|
-
|
|
2851
|
-
style:
|
|
3058
|
+
z("div", {
|
|
3059
|
+
style: D(F(tt))
|
|
2852
3060
|
}, "No Widget Data", 4),
|
|
2853
|
-
|
|
2854
|
-
style:
|
|
3061
|
+
z("div", {
|
|
3062
|
+
style: D(F(nt))
|
|
2855
3063
|
}, "No widget data available", 4)
|
|
2856
|
-
], 4)) :
|
|
2857
|
-
|
|
3064
|
+
], 4)) : l.value && i.value ? (f(), w(k, { key: 3 }, [
|
|
3065
|
+
a.value ? (f(), v(As, {
|
|
2858
3066
|
key: 0,
|
|
2859
3067
|
"display-item-list": i.value.displayItemList,
|
|
2860
3068
|
"widget-collections": i.value.widgetCollections,
|
|
2861
|
-
plugins:
|
|
3069
|
+
plugins: c.value,
|
|
2862
3070
|
"component-props": e.componentProps,
|
|
2863
|
-
mounts: e.mounts
|
|
2864
|
-
|
|
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, {
|
|
2865
3074
|
key: 1,
|
|
2866
3075
|
"display-item-list": i.value.displayItemList,
|
|
2867
3076
|
"is-compose-mode": !1,
|
|
@@ -2869,203 +3078,288 @@ const Xi = {
|
|
|
2869
3078
|
"widget-collections": i.value.widgetCollections,
|
|
2870
3079
|
"show-drop-containers": !1,
|
|
2871
3080
|
"redux-device-display-type": "desktop",
|
|
2872
|
-
plugins:
|
|
3081
|
+
plugins: c.value,
|
|
2873
3082
|
"component-props": e.componentProps,
|
|
2874
|
-
mounts: e.mounts
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
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);
|
|
2878
3088
|
};
|
|
2879
3089
|
}
|
|
2880
|
-
});
|
|
2881
|
-
class
|
|
3090
|
+
}), $r = 6e4;
|
|
3091
|
+
class Y extends Error {
|
|
2882
3092
|
constructor(n, o) {
|
|
2883
3093
|
super(n);
|
|
2884
|
-
|
|
3094
|
+
We(this, "status");
|
|
2885
3095
|
this.name = "FetchRuleCMSWidgetError", this.status = o;
|
|
2886
3096
|
}
|
|
2887
3097
|
}
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
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, {
|
|
2897
3132
|
method: "GET",
|
|
2898
|
-
|
|
2899
|
-
...
|
|
2900
|
-
|
|
3133
|
+
...i ? { cache: "no-store" } : {},
|
|
3134
|
+
...o
|
|
3135
|
+
});
|
|
3136
|
+
if (!r.ok)
|
|
3137
|
+
throw new Y(await zt(r), r.status);
|
|
3138
|
+
const u = await r.json();
|
|
3139
|
+
if (!u.success)
|
|
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
|
|
2901
3153
|
});
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
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"
|
|
2907
3192
|
);
|
|
2908
3193
|
}
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
return Et(l.data);
|
|
3194
|
+
if (!o)
|
|
3195
|
+
throw new Y("Token is required");
|
|
3196
|
+
return e.rulesetPublishedKey ? Rr(e) : Ht(e);
|
|
2913
3197
|
}
|
|
2914
|
-
async function
|
|
2915
|
-
const { data: t, libraries: n } = e, o =
|
|
3198
|
+
async function el(e) {
|
|
3199
|
+
const { data: t, libraries: n } = e, o = De({
|
|
2916
3200
|
displayItemList: t.displayItemList,
|
|
2917
3201
|
widgetCollections: t.widgetCollections
|
|
2918
3202
|
});
|
|
2919
|
-
return
|
|
3203
|
+
return pe().resolve({ registrations: n, referenced: o });
|
|
2920
3204
|
}
|
|
2921
3205
|
export {
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
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,
|
|
3037
3329
|
K as isDevClientToken,
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
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
|
|
3071
3365
|
};
|