@builder.io/sdk-react 1.0.11 → 1.0.12
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/lib/browser/blocks-exports.cjs +30 -30
- package/lib/browser/blocks-exports.mjs +875 -842
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-acc5a9c8.js → server-entry-34e4efb1.js} +1 -1
- package/lib/browser/{server-entry-4829e1ce.cjs → server-entry-60df1736.cjs} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/blocks-03ffaaf9.cjs +32 -0
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{blocks-244199ab.js → blocks-f8d5d3a0.js} +1003 -967
- package/lib/edge/{button-8cd5d71a.cjs → button-5137d1bc.cjs} +1 -1
- package/lib/edge/{button-73916377.js → button-5543875e.js} +3 -3
- package/lib/edge/{columns-c7d9b9f1.js → columns-a05f9fd8.js} +33 -33
- package/lib/edge/{columns-88c9df52.cjs → columns-ad62a5ce.cjs} +2 -2
- package/lib/edge/{content-variants-d5455178.js → content-variants-74109911.js} +106 -99
- package/lib/edge/{content-variants-1a65d814.cjs → content-variants-e6ba9024.cjs} +6 -6
- package/lib/edge/dynamic-renderer-8b343325.js +8 -0
- package/lib/edge/{dynamic-renderer-1c9f24c0.cjs → dynamic-renderer-b29b45ca.cjs} +1 -1
- package/lib/edge/{form-ad532981.js → form-67a4ec0b.js} +56 -66
- package/lib/edge/form-ee52f842.cjs +1 -0
- package/lib/edge/{get-class-prop-name-1178de8b.js → get-class-prop-name-25116ae3.js} +1 -1
- package/lib/edge/{get-class-prop-name-c082f4f3.cjs → get-class-prop-name-7ab1534a.cjs} +1 -1
- package/lib/edge/{image-2cc909d9.js → image-0008c792.js} +25 -25
- package/lib/edge/image-ee3dd857.cjs +17 -0
- package/lib/edge/{img-f61f7931.cjs → img-147fc69c.cjs} +1 -1
- package/lib/edge/{img-749d10ed.js → img-43af4666.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-ccec5aae.js → input-35088f50.js} +1 -1
- package/lib/edge/{input-184da708.cjs → input-90830684.cjs} +1 -1
- package/lib/edge/{select-a5fc0333.cjs → select-1e63f097.cjs} +1 -1
- package/lib/edge/{select-50a6db92.js → select-ee16e4ee.js} +1 -1
- package/lib/edge/{server-entry-178f215d.cjs → server-entry-39e6b4a6.cjs} +1 -1
- package/lib/edge/{server-entry-1cbf5bef.js → server-entry-f2d127da.js} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-d3ff8e4d.cjs → slot-3db582db.cjs} +1 -1
- package/lib/edge/{slot-dad01f2d.js → slot-45a2e0bf.js} +4 -4
- package/lib/edge/{symbol-b6db0014.js → symbol-75231166.js} +2 -2
- package/lib/edge/{symbol-31283b30.cjs → symbol-c533a54f.cjs} +1 -1
- package/lib/edge/{video-d02ff89b.js → video-58c2cc8d.js} +15 -15
- package/lib/edge/video-e20dcbbc.cjs +1 -0
- package/lib/node/blocks-exports.cjs +17 -17
- package/lib/node/blocks-exports.mjs +473 -440
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +1 -1
- package/lib/node/{server-entry-856d379b.cjs → server-entry-81eab45c.cjs} +1 -1
- package/lib/node/{server-entry-09a75819.js → server-entry-a0cd9606.js} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +1 -1
- package/types/components/block/block.helpers.d.ts +4 -0
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/functions/evaluate/evaluate.d.ts +3 -1
- package/types/functions/evaluate/helpers.d.ts +1 -0
- package/lib/edge/blocks-a05f6af2.cjs +0 -32
- package/lib/edge/dynamic-renderer-96ba4e48.js +0 -8
- package/lib/edge/form-713c6da6.cjs +0 -1
- package/lib/edge/image-7e1361ce.cjs +0 -17
- package/lib/edge/video-64014cc4.cjs +0 -1
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
var je = Object.defineProperty;
|
|
3
|
+
var Ue = (e, t, n) => t in e ? je(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
4
|
+
var oe = (e, t, n) => (Ue(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
5
|
+
import { jsx as c, Fragment as E, jsxs as N } from "react/jsx-runtime";
|
|
6
|
+
import { TARGET as Y, isEditing as L, isBrowser as q, getUserAttributes as He, checkIsDefined as Z, logger as _, fastClone as se, registerInsertMenu as Ke, setupBrowserForEditing as qe, createRegisterComponentMessage as _e, getDefaultCanTrack as ee, _track as be, isPreviewing as ze, fetchOneEntry as Ee, createEditorListener as Je, fetch as Ye, serializeComponentInfo as ye, handleABTestingSync as Ge } from "./server-entry-34e4efb1.js";
|
|
7
|
+
import { createContext as Re, useState as S, useEffect as W, useContext as pe, useRef as ne, createElement as ce } from "react";
|
|
8
|
+
const Qe = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), Xe = (e) => typeof e == "string" && Qe.has(e.toLowerCase());
|
|
9
|
+
function de(e) {
|
|
10
|
+
return /* @__PURE__ */ c(E, { children: Xe(e.TagName) ? /* @__PURE__ */ c(E, { children: /* @__PURE__ */ c(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ c(E, { children: typeof e.TagName == "string" ? /* @__PURE__ */ c(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) : /* @__PURE__ */ c(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) });
|
|
8
11
|
}
|
|
9
|
-
const
|
|
10
|
-
switch (
|
|
12
|
+
const z = () => {
|
|
13
|
+
switch (Y) {
|
|
11
14
|
case "react":
|
|
12
15
|
case "reactNative":
|
|
13
16
|
case "rsc":
|
|
@@ -19,13 +22,13 @@ const K = () => {
|
|
|
19
22
|
return "class";
|
|
20
23
|
}
|
|
21
24
|
};
|
|
22
|
-
function
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
|
|
25
|
+
function Ze(e) {
|
|
26
|
+
return /* @__PURE__ */ c(
|
|
27
|
+
de,
|
|
25
28
|
{
|
|
26
29
|
attributes: {
|
|
27
30
|
...e.attributes,
|
|
28
|
-
[
|
|
31
|
+
[z()]: `${e.link ? "" : "builder-button"} ${e.attributes[z()] || ""}`,
|
|
29
32
|
...e.link ? {
|
|
30
33
|
href: e.link,
|
|
31
34
|
target: e.openLinkInNewTab ? "_blank" : void 0,
|
|
@@ -40,7 +43,7 @@ function Je(e) {
|
|
|
40
43
|
}
|
|
41
44
|
);
|
|
42
45
|
}
|
|
43
|
-
const
|
|
46
|
+
const ue = Re({
|
|
44
47
|
content: null,
|
|
45
48
|
context: {},
|
|
46
49
|
localState: void 0,
|
|
@@ -53,8 +56,8 @@ const se = Ie({
|
|
|
53
56
|
inheritedStyles: {},
|
|
54
57
|
BlocksWrapper: "div",
|
|
55
58
|
BlocksWrapperProps: {}
|
|
56
|
-
}),
|
|
57
|
-
function
|
|
59
|
+
}), Pe = Re({ registeredComponents: {} });
|
|
60
|
+
function et(e) {
|
|
58
61
|
var t;
|
|
59
62
|
return {
|
|
60
63
|
...(t = e.component) == null ? void 0 : t.options,
|
|
@@ -65,7 +68,7 @@ function Ye(e) {
|
|
|
65
68
|
builderBlock: e
|
|
66
69
|
};
|
|
67
70
|
}
|
|
68
|
-
const
|
|
71
|
+
const tt = ({
|
|
69
72
|
builder: e,
|
|
70
73
|
context: t,
|
|
71
74
|
event: n,
|
|
@@ -77,14 +80,14 @@ const Ge = ({
|
|
|
77
80
|
builder: e,
|
|
78
81
|
context: t,
|
|
79
82
|
event: n
|
|
80
|
-
}),
|
|
81
|
-
isEditing:
|
|
82
|
-
isBrowser:
|
|
83
|
-
isServer: !
|
|
84
|
-
getUserAttributes: () =>
|
|
85
|
-
}),
|
|
83
|
+
}), nt = () => ({
|
|
84
|
+
isEditing: L(),
|
|
85
|
+
isBrowser: q(),
|
|
86
|
+
isServer: !q(),
|
|
87
|
+
getUserAttributes: () => He()
|
|
88
|
+
}), it = (e, {
|
|
86
89
|
isExpression: t = !0
|
|
87
|
-
}) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e,
|
|
90
|
+
}) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e, Se = ({
|
|
88
91
|
code: e,
|
|
89
92
|
builder: t,
|
|
90
93
|
context: n,
|
|
@@ -93,19 +96,19 @@ const Ge = ({
|
|
|
93
96
|
rootSetState: a,
|
|
94
97
|
rootState: r
|
|
95
98
|
}) => {
|
|
96
|
-
const
|
|
99
|
+
const l = tt({
|
|
97
100
|
builder: t,
|
|
98
101
|
context: n,
|
|
99
102
|
event: i,
|
|
100
|
-
state:
|
|
103
|
+
state: Ve({
|
|
101
104
|
rootState: r,
|
|
102
105
|
localState: o,
|
|
103
106
|
rootSetState: a
|
|
104
107
|
})
|
|
105
108
|
});
|
|
106
|
-
return new Function(...
|
|
109
|
+
return new Function(...l.map(([d]) => d), e)(...l.map(([, d]) => d));
|
|
107
110
|
};
|
|
108
|
-
function
|
|
111
|
+
function Ve({
|
|
109
112
|
rootState: e,
|
|
110
113
|
localState: t,
|
|
111
114
|
rootSetState: n
|
|
@@ -115,7 +118,7 @@ function Ee({
|
|
|
115
118
|
if (t && o in t)
|
|
116
119
|
return t[o];
|
|
117
120
|
const a = i[o];
|
|
118
|
-
return typeof a == "object" ?
|
|
121
|
+
return typeof a == "object" && a !== null ? Ve({
|
|
119
122
|
rootState: a,
|
|
120
123
|
localState: void 0,
|
|
121
124
|
rootSetState: n ? (r) => {
|
|
@@ -130,57 +133,87 @@ function Ee({
|
|
|
130
133
|
}
|
|
131
134
|
});
|
|
132
135
|
}
|
|
133
|
-
function
|
|
136
|
+
function ot() {
|
|
134
137
|
var e;
|
|
135
|
-
return typeof process != "undefined" &&
|
|
138
|
+
return typeof process != "undefined" && Z((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
|
|
136
139
|
}
|
|
137
|
-
const
|
|
140
|
+
const at = () => {
|
|
138
141
|
var i;
|
|
139
|
-
if (!
|
|
142
|
+
if (!ot())
|
|
140
143
|
return !1;
|
|
141
144
|
const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (i = process.env.NODE_OPTIONS) == null ? void 0 : i.includes("--no-node-snapshot");
|
|
142
145
|
return e && t && !n ? (_.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), !0) : !1;
|
|
143
|
-
},
|
|
144
|
-
|
|
146
|
+
}, rt = (e) => (q() || at(), Se(e)), D = class D {
|
|
147
|
+
static getCacheKey(t) {
|
|
148
|
+
return JSON.stringify({
|
|
149
|
+
...t,
|
|
150
|
+
// replace the event with a random number to break cache
|
|
151
|
+
// thats because we can't serialize the event object due to circular refs in DOM node refs.
|
|
152
|
+
event: t.event ? Math.random() : void 0
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
static getCachedValue(t) {
|
|
156
|
+
return D.cache.get(t);
|
|
157
|
+
}
|
|
158
|
+
static setCachedValue(t, n) {
|
|
159
|
+
D.cache.size > 20 && D.cache.delete(D.cache.keys().next().value), D.cache.set(t, {
|
|
160
|
+
value: n
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
oe(D, "cacheLimit", 20), oe(D, "cache", /* @__PURE__ */ new Map());
|
|
165
|
+
let H = D;
|
|
166
|
+
function J({
|
|
145
167
|
code: e,
|
|
146
168
|
context: t,
|
|
147
169
|
localState: n,
|
|
148
170
|
rootState: i,
|
|
149
171
|
rootSetState: o,
|
|
150
172
|
event: a,
|
|
151
|
-
isExpression: r = !0
|
|
173
|
+
isExpression: r = !0,
|
|
174
|
+
enableCache: l
|
|
152
175
|
}) {
|
|
153
176
|
if (e === "") {
|
|
154
177
|
_.warn("Skipping evaluation of empty code block.");
|
|
155
178
|
return;
|
|
156
179
|
}
|
|
157
|
-
const
|
|
158
|
-
code:
|
|
180
|
+
const d = {
|
|
181
|
+
code: it(e, {
|
|
159
182
|
isExpression: r
|
|
160
183
|
}),
|
|
161
|
-
builder:
|
|
184
|
+
builder: nt(),
|
|
162
185
|
context: t,
|
|
163
186
|
event: a,
|
|
164
187
|
rootSetState: o,
|
|
165
188
|
rootState: i,
|
|
166
189
|
localState: n
|
|
167
190
|
};
|
|
191
|
+
if (l) {
|
|
192
|
+
const s = H.getCacheKey(d), u = H.getCachedValue(s);
|
|
193
|
+
if (u)
|
|
194
|
+
return u.value;
|
|
195
|
+
}
|
|
168
196
|
try {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
197
|
+
const s = rt(d);
|
|
198
|
+
if (l) {
|
|
199
|
+
const u = H.getCacheKey(d);
|
|
200
|
+
H.setCachedValue(u, s);
|
|
201
|
+
}
|
|
202
|
+
return s;
|
|
203
|
+
} catch (s) {
|
|
204
|
+
_.error("Failed code evaluation: " + s.message, {
|
|
172
205
|
code: e
|
|
173
206
|
});
|
|
174
207
|
return;
|
|
175
208
|
}
|
|
176
209
|
}
|
|
177
|
-
const
|
|
210
|
+
const Be = (e, t, n) => {
|
|
178
211
|
if (Object(e) !== e)
|
|
179
212
|
return e;
|
|
180
213
|
const i = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
181
214
|
return i.slice(0, -1).reduce((o, a, r) => Object(o[a]) === o[a] ? o[a] : o[a] = Math.abs(Number(i[r + 1])) >> 0 === +i[r + 1] ? [] : {}, e)[i[i.length - 1]] = n, e;
|
|
182
215
|
};
|
|
183
|
-
const
|
|
216
|
+
const lt = ({
|
|
184
217
|
block: e,
|
|
185
218
|
context: t,
|
|
186
219
|
localState: n,
|
|
@@ -189,7 +222,7 @@ const nt = ({
|
|
|
189
222
|
}) => {
|
|
190
223
|
if (!e.bindings)
|
|
191
224
|
return e;
|
|
192
|
-
const a =
|
|
225
|
+
const a = se(e), r = {
|
|
193
226
|
...a,
|
|
194
227
|
properties: {
|
|
195
228
|
...a.properties
|
|
@@ -198,19 +231,20 @@ const nt = ({
|
|
|
198
231
|
...a.actions
|
|
199
232
|
}
|
|
200
233
|
};
|
|
201
|
-
for (const
|
|
202
|
-
const
|
|
203
|
-
code:
|
|
234
|
+
for (const l in e.bindings) {
|
|
235
|
+
const d = e.bindings[l], s = J({
|
|
236
|
+
code: d,
|
|
204
237
|
localState: n,
|
|
205
238
|
rootState: i,
|
|
206
239
|
rootSetState: o,
|
|
207
|
-
context: t
|
|
240
|
+
context: t,
|
|
241
|
+
enableCache: !0
|
|
208
242
|
});
|
|
209
|
-
|
|
243
|
+
Be(r, l, s);
|
|
210
244
|
}
|
|
211
245
|
return r;
|
|
212
246
|
};
|
|
213
|
-
function
|
|
247
|
+
function te({
|
|
214
248
|
block: e,
|
|
215
249
|
context: t,
|
|
216
250
|
shouldEvaluateBindings: n,
|
|
@@ -219,7 +253,7 @@ function Z({
|
|
|
219
253
|
rootSetState: a
|
|
220
254
|
}) {
|
|
221
255
|
const r = e;
|
|
222
|
-
return n ?
|
|
256
|
+
return n ? lt({
|
|
223
257
|
block: r,
|
|
224
258
|
localState: i,
|
|
225
259
|
rootState: o,
|
|
@@ -227,19 +261,19 @@ function Z({
|
|
|
227
261
|
context: t
|
|
228
262
|
}) : r;
|
|
229
263
|
}
|
|
230
|
-
function
|
|
231
|
-
let i, o, a, r = null,
|
|
232
|
-
const
|
|
233
|
-
|
|
264
|
+
function st(e, t, n = {}) {
|
|
265
|
+
let i, o, a, r = null, l = 0;
|
|
266
|
+
const d = function() {
|
|
267
|
+
l = n.leading === !1 ? 0 : Date.now(), r = null, a = e.apply(i, o), r || (i = o = null);
|
|
234
268
|
};
|
|
235
269
|
return function() {
|
|
236
|
-
const
|
|
237
|
-
!
|
|
238
|
-
const u = t - (
|
|
239
|
-
return i = this, o = arguments, u <= 0 || u > t ? (r && (clearTimeout(r), r = null),
|
|
270
|
+
const s = Date.now();
|
|
271
|
+
!l && n.leading === !1 && (l = s);
|
|
272
|
+
const u = t - (s - l);
|
|
273
|
+
return i = this, o = arguments, u <= 0 || u > t ? (r && (clearTimeout(r), r = null), l = s, a = e.apply(i, o), r || (i = o = null)) : !r && n.trailing !== !1 && (r = setTimeout(d, u)), a;
|
|
240
274
|
};
|
|
241
275
|
}
|
|
242
|
-
function
|
|
276
|
+
function j(e, ...t) {
|
|
243
277
|
const n = Object(e);
|
|
244
278
|
for (let i = 1; i < arguments.length; i++) {
|
|
245
279
|
const o = arguments[i];
|
|
@@ -249,113 +283,155 @@ function O(e, ...t) {
|
|
|
249
283
|
}
|
|
250
284
|
return n;
|
|
251
285
|
}
|
|
252
|
-
const
|
|
253
|
-
function
|
|
286
|
+
const me = (e) => e ? e.replace(/([A-Z])/g, (t) => `-${t[0].toLowerCase()}`) : "";
|
|
287
|
+
function ct(e) {
|
|
254
288
|
for (const t of e)
|
|
255
289
|
switch (t.trigger) {
|
|
256
290
|
case "pageLoad":
|
|
257
|
-
|
|
291
|
+
We(t);
|
|
258
292
|
break;
|
|
259
293
|
case "hover":
|
|
260
|
-
|
|
294
|
+
ut(t);
|
|
261
295
|
break;
|
|
262
296
|
case "scrollInView":
|
|
263
|
-
|
|
297
|
+
mt(t);
|
|
264
298
|
break;
|
|
265
299
|
}
|
|
266
300
|
}
|
|
267
|
-
function
|
|
301
|
+
function fe(e) {
|
|
268
302
|
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
269
303
|
}
|
|
270
|
-
function
|
|
271
|
-
const n =
|
|
272
|
-
for (const
|
|
273
|
-
for (const
|
|
274
|
-
|
|
304
|
+
function he(e, t) {
|
|
305
|
+
const n = dt(e), i = getComputedStyle(t), o = e.steps[0].styles, a = e.steps[e.steps.length - 1].styles, r = [o, a];
|
|
306
|
+
for (const l of r)
|
|
307
|
+
for (const d of n)
|
|
308
|
+
d in l || (l[d] = i[d]);
|
|
275
309
|
}
|
|
276
|
-
function
|
|
310
|
+
function dt(e) {
|
|
277
311
|
const t = [];
|
|
278
312
|
for (const n of e.steps)
|
|
279
313
|
for (const i in n.styles)
|
|
280
314
|
t.indexOf(i) === -1 && t.push(i);
|
|
281
315
|
return t;
|
|
282
316
|
}
|
|
283
|
-
function
|
|
317
|
+
function We(e) {
|
|
284
318
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
285
319
|
if (!t.length) {
|
|
286
|
-
|
|
320
|
+
fe(e.elementId || e.id || "");
|
|
287
321
|
return;
|
|
288
322
|
}
|
|
289
323
|
Array.from(t).forEach((n) => {
|
|
290
|
-
|
|
291
|
-
n.style.transition = `all ${e.duration}s ${
|
|
324
|
+
he(e, n), n.style.transition = "none", n.style.transitionDelay = "0", j(n.style, e.steps[0].styles), setTimeout(() => {
|
|
325
|
+
n.style.transition = `all ${e.duration}s ${me(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), j(n.style, e.steps[1].styles), setTimeout(() => {
|
|
292
326
|
n.style.transition = "", n.style.transitionDelay = "";
|
|
293
327
|
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
294
328
|
});
|
|
295
329
|
});
|
|
296
330
|
}
|
|
297
|
-
function
|
|
331
|
+
function ut(e) {
|
|
298
332
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
299
333
|
if (!t.length) {
|
|
300
|
-
|
|
334
|
+
fe(e.elementId || e.id || "");
|
|
301
335
|
return;
|
|
302
336
|
}
|
|
303
337
|
Array.from(t).forEach((n) => {
|
|
304
|
-
|
|
338
|
+
he(e, n);
|
|
305
339
|
const i = e.steps[0].styles, o = e.steps[1].styles;
|
|
306
340
|
function a() {
|
|
307
|
-
|
|
341
|
+
j(n.style, i);
|
|
308
342
|
}
|
|
309
343
|
function r() {
|
|
310
|
-
|
|
344
|
+
j(n.style, o);
|
|
311
345
|
}
|
|
312
346
|
a(), n.addEventListener("mouseenter", r), n.addEventListener("mouseleave", a), setTimeout(() => {
|
|
313
|
-
n.style.transition = `all ${e.duration}s ${
|
|
347
|
+
n.style.transition = `all ${e.duration}s ${me(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
314
348
|
});
|
|
315
349
|
});
|
|
316
350
|
}
|
|
317
|
-
function
|
|
351
|
+
function mt(e) {
|
|
318
352
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
319
353
|
if (!t.length) {
|
|
320
|
-
|
|
354
|
+
fe(e.elementId || e.id || "");
|
|
321
355
|
return;
|
|
322
356
|
}
|
|
323
357
|
Array.from(t).forEach((n) => {
|
|
324
|
-
|
|
358
|
+
he(e, n);
|
|
325
359
|
let i = !1, o = !1;
|
|
326
360
|
function a() {
|
|
327
|
-
!i &&
|
|
328
|
-
|
|
361
|
+
!i && l(n) ? (i = !0, o = !0, setTimeout(() => {
|
|
362
|
+
j(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", r), setTimeout(() => {
|
|
329
363
|
o = !1, e.repeat || (n.style.transition = "", n.style.transitionDelay = "");
|
|
330
364
|
}, (e.duration + (e.delay || 0)) * 1e3 + 100);
|
|
331
|
-
})) : e.repeat && i && !o && !
|
|
365
|
+
})) : e.repeat && i && !o && !l(n) && (i = !1, j(n.style, e.steps[0].styles));
|
|
332
366
|
}
|
|
333
|
-
const r =
|
|
367
|
+
const r = st(a, 200, {
|
|
334
368
|
leading: !1
|
|
335
369
|
});
|
|
336
|
-
function
|
|
337
|
-
const
|
|
338
|
-
return
|
|
370
|
+
function l(u) {
|
|
371
|
+
const m = u.getBoundingClientRect(), h = window.innerHeight, y = (e.thresholdPercent || 0) / 100 * h;
|
|
372
|
+
return m.bottom > y && m.top < h - y;
|
|
339
373
|
}
|
|
340
|
-
const
|
|
341
|
-
function
|
|
342
|
-
|
|
374
|
+
const d = e.steps[0].styles;
|
|
375
|
+
function s() {
|
|
376
|
+
j(n.style, d);
|
|
343
377
|
}
|
|
344
|
-
|
|
345
|
-
n.style.transition = `all ${e.duration}s ${
|
|
378
|
+
s(), setTimeout(() => {
|
|
379
|
+
n.style.transition = `all ${e.duration}s ${me(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
346
380
|
}), document.addEventListener("scroll", r, {
|
|
347
381
|
capture: !0,
|
|
348
382
|
passive: !0
|
|
349
383
|
}), a();
|
|
350
384
|
});
|
|
351
385
|
}
|
|
352
|
-
const
|
|
386
|
+
const ft = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), Ae = (e) => Object.entries(e).map(([n, i]) => {
|
|
387
|
+
if (typeof i == "string")
|
|
388
|
+
return `${ft(n)}: ${i};`;
|
|
389
|
+
}).filter(Z), ht = (e) => Ae(e).join(`
|
|
390
|
+
`), ae = ({
|
|
391
|
+
mediaQuery: e,
|
|
392
|
+
className: t,
|
|
393
|
+
styles: n
|
|
394
|
+
}) => {
|
|
395
|
+
const i = `.${t} {
|
|
396
|
+
${ht(n)}
|
|
397
|
+
}`;
|
|
398
|
+
return e ? `${e} {
|
|
399
|
+
${i}
|
|
400
|
+
}` : i;
|
|
401
|
+
};
|
|
402
|
+
function gt({
|
|
403
|
+
style: e
|
|
404
|
+
}) {
|
|
405
|
+
return e;
|
|
406
|
+
}
|
|
407
|
+
const bt = ({
|
|
408
|
+
block: e,
|
|
409
|
+
context: t
|
|
410
|
+
}) => Fe(gt({
|
|
411
|
+
style: e.style || {},
|
|
412
|
+
context: t,
|
|
413
|
+
block: e
|
|
414
|
+
}));
|
|
415
|
+
function Fe(e) {
|
|
416
|
+
switch (Y) {
|
|
417
|
+
case "svelte":
|
|
418
|
+
case "vue":
|
|
419
|
+
case "solid":
|
|
420
|
+
return Ae(e).join(" ");
|
|
421
|
+
case "qwik":
|
|
422
|
+
case "reactNative":
|
|
423
|
+
case "react":
|
|
424
|
+
case "rsc":
|
|
425
|
+
return e;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
const yt = ({
|
|
353
429
|
block: e,
|
|
354
430
|
context: t,
|
|
355
431
|
registeredComponents: n
|
|
356
432
|
}) => {
|
|
357
433
|
var a;
|
|
358
|
-
const i = (a =
|
|
434
|
+
const i = (a = te({
|
|
359
435
|
block: e,
|
|
360
436
|
localState: t.localState,
|
|
361
437
|
rootState: t.rootState,
|
|
@@ -371,7 +447,7 @@ const st = ({
|
|
|
371
447
|
console.warn(`
|
|
372
448
|
Could not find a registered component named "${i}".
|
|
373
449
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
374
|
-
},
|
|
450
|
+
}, pt = ({
|
|
375
451
|
block: e,
|
|
376
452
|
context: t
|
|
377
453
|
}) => {
|
|
@@ -381,30 +457,31 @@ const st = ({
|
|
|
381
457
|
} = e;
|
|
382
458
|
if (!(n != null && n.collection))
|
|
383
459
|
return;
|
|
384
|
-
const o =
|
|
460
|
+
const o = J({
|
|
385
461
|
code: n.collection,
|
|
386
462
|
localState: t.localState,
|
|
387
463
|
rootState: t.rootState,
|
|
388
464
|
rootSetState: t.rootSetState,
|
|
389
|
-
context: t.context
|
|
465
|
+
context: t.context,
|
|
466
|
+
enableCache: !0
|
|
390
467
|
});
|
|
391
468
|
if (!Array.isArray(o))
|
|
392
469
|
return;
|
|
393
470
|
const a = n.collection.split(".").pop(), r = n.itemName || (a ? a + "Item" : "item");
|
|
394
|
-
return o.map((
|
|
471
|
+
return o.map((d, s) => ({
|
|
395
472
|
context: {
|
|
396
473
|
...t,
|
|
397
474
|
localState: {
|
|
398
475
|
...t.localState,
|
|
399
|
-
$index:
|
|
400
|
-
$item:
|
|
401
|
-
[r]:
|
|
402
|
-
[`$${r}Index`]:
|
|
476
|
+
$index: s,
|
|
477
|
+
$item: d,
|
|
478
|
+
[r]: d,
|
|
479
|
+
[`$${r}Index`]: s
|
|
403
480
|
}
|
|
404
481
|
},
|
|
405
482
|
block: i
|
|
406
483
|
}));
|
|
407
|
-
},
|
|
484
|
+
}, Ne = {
|
|
408
485
|
small: {
|
|
409
486
|
min: 320,
|
|
410
487
|
default: 321,
|
|
@@ -420,11 +497,11 @@ const st = ({
|
|
|
420
497
|
default: 991,
|
|
421
498
|
max: 1200
|
|
422
499
|
}
|
|
423
|
-
},
|
|
500
|
+
}, xe = (e, t = Ne) => `@media (max-width: ${t[e].max}px)`, $e = ({
|
|
424
501
|
small: e,
|
|
425
502
|
medium: t
|
|
426
503
|
}) => {
|
|
427
|
-
const n =
|
|
504
|
+
const n = se(Ne);
|
|
428
505
|
if (!e || !t)
|
|
429
506
|
return n;
|
|
430
507
|
const i = Math.floor(e / 2);
|
|
@@ -446,28 +523,13 @@ const st = ({
|
|
|
446
523
|
min: a,
|
|
447
524
|
default: a + 1
|
|
448
525
|
}, n;
|
|
449
|
-
}, dt = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), We = (e) => Object.entries(e).map(([n, i]) => {
|
|
450
|
-
if (typeof i == "string")
|
|
451
|
-
return `${dt(n)}: ${i};`;
|
|
452
|
-
}).filter(Q), ut = (e) => We(e).join(`
|
|
453
|
-
`), ne = ({
|
|
454
|
-
mediaQuery: e,
|
|
455
|
-
className: t,
|
|
456
|
-
styles: n
|
|
457
|
-
}) => {
|
|
458
|
-
const i = `.${t} {
|
|
459
|
-
${ut(n)}
|
|
460
|
-
}`;
|
|
461
|
-
return e ? `${e} {
|
|
462
|
-
${i}
|
|
463
|
-
}` : i;
|
|
464
526
|
};
|
|
465
|
-
function
|
|
466
|
-
return /* @__PURE__ */
|
|
527
|
+
function ie(e) {
|
|
528
|
+
return /* @__PURE__ */ c("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
|
|
467
529
|
}
|
|
468
|
-
function
|
|
530
|
+
function St(e) {
|
|
469
531
|
function t() {
|
|
470
|
-
const i =
|
|
532
|
+
const i = te({
|
|
471
533
|
block: e.block,
|
|
472
534
|
localState: e.context.localState,
|
|
473
535
|
rootState: e.context.rootState,
|
|
@@ -475,66 +537,67 @@ function mt(e) {
|
|
|
475
537
|
context: e.context.context,
|
|
476
538
|
shouldEvaluateBindings: !0
|
|
477
539
|
});
|
|
478
|
-
return
|
|
540
|
+
return Z(i.hide) ? !i.hide : Z(i.show) ? i.show : !0;
|
|
479
541
|
}
|
|
480
542
|
function n() {
|
|
481
|
-
var
|
|
482
|
-
const i =
|
|
543
|
+
var y;
|
|
544
|
+
const i = te({
|
|
483
545
|
block: e.block,
|
|
484
546
|
localState: e.context.localState,
|
|
485
547
|
rootState: e.context.rootState,
|
|
486
548
|
rootSetState: e.context.rootSetState,
|
|
487
549
|
context: e.context.context,
|
|
488
550
|
shouldEvaluateBindings: !0
|
|
489
|
-
}), o = i.responsiveStyles, a = e.context.content, r =
|
|
490
|
-
((
|
|
491
|
-
),
|
|
551
|
+
}), o = i.responsiveStyles, a = e.context.content, r = $e(
|
|
552
|
+
((y = a == null ? void 0 : a.meta) == null ? void 0 : y.breakpoints) || {}
|
|
553
|
+
), l = o == null ? void 0 : o.large, d = o == null ? void 0 : o.medium, s = o == null ? void 0 : o.small, u = i.id;
|
|
492
554
|
if (!u)
|
|
493
555
|
return "";
|
|
494
|
-
const
|
|
556
|
+
const m = l ? ae({
|
|
495
557
|
className: u,
|
|
496
|
-
styles:
|
|
497
|
-
}) : "",
|
|
558
|
+
styles: l
|
|
559
|
+
}) : "", h = d ? ae({
|
|
498
560
|
className: u,
|
|
499
|
-
styles:
|
|
500
|
-
mediaQuery:
|
|
561
|
+
styles: d,
|
|
562
|
+
mediaQuery: xe(
|
|
501
563
|
"medium",
|
|
502
564
|
r
|
|
503
565
|
)
|
|
504
|
-
}) : "",
|
|
566
|
+
}) : "", b = s ? ae({
|
|
505
567
|
className: u,
|
|
506
|
-
styles:
|
|
507
|
-
mediaQuery:
|
|
568
|
+
styles: s,
|
|
569
|
+
mediaQuery: xe(
|
|
508
570
|
"small",
|
|
509
571
|
r
|
|
510
572
|
)
|
|
511
573
|
}) : "";
|
|
512
|
-
return [
|
|
574
|
+
return [m, h, b].join(" ");
|
|
513
575
|
}
|
|
514
|
-
return /* @__PURE__ */
|
|
576
|
+
return /* @__PURE__ */ c(E, { children: n() && t() ? /* @__PURE__ */ c(E, { children: /* @__PURE__ */ c(ie, { styles: n() }) }) : null });
|
|
515
577
|
}
|
|
516
|
-
function
|
|
578
|
+
function xt(e) {
|
|
517
579
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
518
580
|
}
|
|
519
|
-
const
|
|
581
|
+
const vt = (e) => `on${xt(e)}`, kt = (e, t) => (n) => J({
|
|
520
582
|
code: e,
|
|
521
583
|
context: t.context,
|
|
522
584
|
localState: t.localState,
|
|
523
585
|
rootState: t.rootState,
|
|
524
586
|
rootSetState: t.rootSetState,
|
|
525
587
|
event: n,
|
|
526
|
-
isExpression: !1
|
|
588
|
+
isExpression: !1,
|
|
589
|
+
enableCache: !0
|
|
527
590
|
});
|
|
528
|
-
function
|
|
591
|
+
function Le(e) {
|
|
529
592
|
var i;
|
|
530
593
|
const t = {}, n = (i = e.block.actions) != null ? i : {};
|
|
531
594
|
for (const o in n) {
|
|
532
595
|
if (!n.hasOwnProperty(o))
|
|
533
596
|
continue;
|
|
534
597
|
const a = n[o];
|
|
535
|
-
let r =
|
|
598
|
+
let r = vt(o);
|
|
536
599
|
if (e.stripPrefix)
|
|
537
|
-
switch (
|
|
600
|
+
switch (Y) {
|
|
538
601
|
case "vue":
|
|
539
602
|
r = r.replace("v-on:", "");
|
|
540
603
|
break;
|
|
@@ -542,75 +605,49 @@ function Ae(e) {
|
|
|
542
605
|
r = r.replace("on:", "");
|
|
543
606
|
break;
|
|
544
607
|
}
|
|
545
|
-
t[r] =
|
|
608
|
+
t[r] = kt(a, e);
|
|
546
609
|
}
|
|
547
610
|
return t;
|
|
548
611
|
}
|
|
549
|
-
function
|
|
550
|
-
style: e
|
|
551
|
-
}) {
|
|
552
|
-
return e;
|
|
553
|
-
}
|
|
554
|
-
const yt = ({
|
|
555
|
-
block: e,
|
|
556
|
-
context: t
|
|
557
|
-
}) => Fe(bt({
|
|
558
|
-
style: e.style || {},
|
|
559
|
-
context: t,
|
|
560
|
-
block: e
|
|
561
|
-
}));
|
|
562
|
-
function Fe(e) {
|
|
563
|
-
switch (z) {
|
|
564
|
-
case "svelte":
|
|
565
|
-
case "vue":
|
|
566
|
-
case "solid":
|
|
567
|
-
return We(e).join(" ");
|
|
568
|
-
case "qwik":
|
|
569
|
-
case "reactNative":
|
|
570
|
-
case "react":
|
|
571
|
-
case "rsc":
|
|
572
|
-
return e;
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
function pt({
|
|
612
|
+
function Ct({
|
|
576
613
|
properties: e
|
|
577
614
|
}) {
|
|
578
615
|
return e;
|
|
579
616
|
}
|
|
580
|
-
const
|
|
617
|
+
const wt = (e) => ({
|
|
581
618
|
href: e.href
|
|
582
619
|
});
|
|
583
|
-
function
|
|
620
|
+
function ge({
|
|
584
621
|
block: e,
|
|
585
622
|
context: t
|
|
586
623
|
}) {
|
|
587
624
|
var i;
|
|
588
625
|
const n = {
|
|
589
|
-
...
|
|
626
|
+
...wt(e),
|
|
590
627
|
...e.properties,
|
|
591
628
|
"builder-id": e.id,
|
|
592
|
-
style:
|
|
629
|
+
style: bt({
|
|
593
630
|
block: e,
|
|
594
631
|
context: t
|
|
595
632
|
}),
|
|
596
|
-
[
|
|
633
|
+
[z()]: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
|
|
597
634
|
};
|
|
598
|
-
return
|
|
635
|
+
return Ct({
|
|
599
636
|
properties: n,
|
|
600
637
|
context: t,
|
|
601
638
|
block: e
|
|
602
639
|
});
|
|
603
640
|
}
|
|
604
|
-
function
|
|
605
|
-
return /* @__PURE__ */
|
|
606
|
-
|
|
641
|
+
function It(e) {
|
|
642
|
+
return /* @__PURE__ */ c(
|
|
643
|
+
de,
|
|
607
644
|
{
|
|
608
645
|
TagName: e.Wrapper,
|
|
609
|
-
attributes:
|
|
646
|
+
attributes: ge({
|
|
610
647
|
block: e.block,
|
|
611
648
|
context: e.context
|
|
612
649
|
}),
|
|
613
|
-
actionAttributes:
|
|
650
|
+
actionAttributes: Le({
|
|
614
651
|
block: e.block,
|
|
615
652
|
rootState: e.context.rootState,
|
|
616
653
|
rootSetState: e.context.rootSetState,
|
|
@@ -622,17 +659,17 @@ function St(e) {
|
|
|
622
659
|
}
|
|
623
660
|
);
|
|
624
661
|
}
|
|
625
|
-
function
|
|
626
|
-
return /* @__PURE__ */
|
|
662
|
+
function Tt(e) {
|
|
663
|
+
return /* @__PURE__ */ c(
|
|
627
664
|
e.Wrapper,
|
|
628
665
|
{
|
|
629
666
|
...e.wrapperProps,
|
|
630
667
|
attributes: e.includeBlockProps ? {
|
|
631
|
-
...
|
|
668
|
+
...ge({
|
|
632
669
|
block: e.block,
|
|
633
670
|
context: e.context
|
|
634
671
|
}),
|
|
635
|
-
...
|
|
672
|
+
...Le({
|
|
636
673
|
block: e.block,
|
|
637
674
|
rootState: e.context.rootState,
|
|
638
675
|
rootSetState: e.context.rootSetState,
|
|
@@ -644,7 +681,7 @@ function vt(e) {
|
|
|
644
681
|
}
|
|
645
682
|
);
|
|
646
683
|
}
|
|
647
|
-
const
|
|
684
|
+
const Et = ({
|
|
648
685
|
componentOptions: e,
|
|
649
686
|
builderBlock: t,
|
|
650
687
|
context: n,
|
|
@@ -653,14 +690,14 @@ const kt = ({
|
|
|
653
690
|
isInteractive: a,
|
|
654
691
|
contextValue: r
|
|
655
692
|
}) => {
|
|
656
|
-
const
|
|
693
|
+
const l = {
|
|
657
694
|
...e,
|
|
658
695
|
/**
|
|
659
696
|
* If `noWrap` is set to `true`, then the block's props/attributes are provided to the
|
|
660
697
|
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
661
698
|
*/
|
|
662
699
|
...o ? {
|
|
663
|
-
attributes:
|
|
700
|
+
attributes: ge({
|
|
664
701
|
block: t,
|
|
665
702
|
context: r
|
|
666
703
|
})
|
|
@@ -672,17 +709,17 @@ const kt = ({
|
|
|
672
709
|
context: n,
|
|
673
710
|
wrapperProps: e,
|
|
674
711
|
includeBlockProps: o
|
|
675
|
-
} :
|
|
712
|
+
} : l;
|
|
676
713
|
};
|
|
677
|
-
function
|
|
714
|
+
function ve(e) {
|
|
678
715
|
var i;
|
|
679
|
-
const [t, n] =
|
|
680
|
-
() => e.isInteractive ?
|
|
716
|
+
const [t, n] = S(
|
|
717
|
+
() => e.isInteractive ? Tt : e.componentRef
|
|
681
718
|
);
|
|
682
|
-
return /* @__PURE__ */
|
|
719
|
+
return /* @__PURE__ */ c(E, { children: e.componentRef ? /* @__PURE__ */ c(E, { children: /* @__PURE__ */ c(
|
|
683
720
|
t,
|
|
684
721
|
{
|
|
685
|
-
...
|
|
722
|
+
...Et({
|
|
686
723
|
componentOptions: e.componentOptions,
|
|
687
724
|
builderBlock: e.builderBlock,
|
|
688
725
|
context: e.context,
|
|
@@ -692,8 +729,8 @@ function pe(e) {
|
|
|
692
729
|
isInteractive: e.isInteractive,
|
|
693
730
|
contextValue: e.context
|
|
694
731
|
}),
|
|
695
|
-
children: (i = e.blockChildren) == null ? void 0 : i.map((o) => /* @__PURE__ */
|
|
696
|
-
|
|
732
|
+
children: (i = e.blockChildren) == null ? void 0 : i.map((o) => /* @__PURE__ */ c(
|
|
733
|
+
G,
|
|
697
734
|
{
|
|
698
735
|
block: o,
|
|
699
736
|
context: e.context,
|
|
@@ -705,10 +742,10 @@ function pe(e) {
|
|
|
705
742
|
}
|
|
706
743
|
) }) : null });
|
|
707
744
|
}
|
|
708
|
-
function
|
|
709
|
-
const [t, n] =
|
|
710
|
-
return /* @__PURE__ */
|
|
711
|
-
|
|
745
|
+
function Rt(e) {
|
|
746
|
+
const [t, n] = S(() => e.repeatContext);
|
|
747
|
+
return /* @__PURE__ */ c(ue.Provider, { value: t, children: /* @__PURE__ */ c(
|
|
748
|
+
G,
|
|
712
749
|
{
|
|
713
750
|
block: e.block,
|
|
714
751
|
context: t,
|
|
@@ -717,24 +754,24 @@ function Ct(e) {
|
|
|
717
754
|
}
|
|
718
755
|
) });
|
|
719
756
|
}
|
|
720
|
-
function
|
|
721
|
-
var
|
|
757
|
+
function G(e) {
|
|
758
|
+
var d, s, u;
|
|
722
759
|
function t() {
|
|
723
|
-
return
|
|
760
|
+
return yt({
|
|
724
761
|
block: e.block,
|
|
725
762
|
context: e.context,
|
|
726
763
|
registeredComponents: e.registeredComponents
|
|
727
764
|
});
|
|
728
765
|
}
|
|
729
766
|
function n() {
|
|
730
|
-
return
|
|
767
|
+
return pt({
|
|
731
768
|
block: e.block,
|
|
732
769
|
context: e.context
|
|
733
770
|
});
|
|
734
771
|
}
|
|
735
772
|
function i() {
|
|
736
|
-
var
|
|
737
|
-
return (
|
|
773
|
+
var m;
|
|
774
|
+
return (m = e.block.repeat) != null && m.collection ? e.block : te({
|
|
738
775
|
block: e.block,
|
|
739
776
|
localState: e.context.localState,
|
|
740
777
|
rootState: e.context.rootState,
|
|
@@ -744,121 +781,120 @@ function J(e) {
|
|
|
744
781
|
});
|
|
745
782
|
}
|
|
746
783
|
function o() {
|
|
747
|
-
var
|
|
748
|
-
return e.block.tagName === "a" || ((
|
|
784
|
+
var h;
|
|
785
|
+
return e.block.tagName === "a" || ((h = i().properties) == null ? void 0 : h.href) || i().href ? e.linkComponent || "a" : e.block.tagName || "div";
|
|
749
786
|
}
|
|
750
787
|
function a() {
|
|
751
|
-
var
|
|
752
|
-
if ((
|
|
753
|
-
return !!((
|
|
754
|
-
const
|
|
755
|
-
return ("show" in i() ? i().show : !0) && !
|
|
788
|
+
var b, y;
|
|
789
|
+
if ((b = e.block.repeat) != null && b.collection)
|
|
790
|
+
return !!((y = n == null ? void 0 : n()) != null && y.length);
|
|
791
|
+
const m = "hide" in i() ? i().hide : !1;
|
|
792
|
+
return ("show" in i() ? i().show : !0) && !m;
|
|
756
793
|
}
|
|
757
794
|
function r() {
|
|
758
|
-
var
|
|
759
|
-
return !((
|
|
795
|
+
var h, b;
|
|
796
|
+
return !((h = t == null ? void 0 : t()) != null && h.component) && !n() ? (b = i().children) != null ? b : [] : [];
|
|
760
797
|
}
|
|
761
|
-
function
|
|
762
|
-
var
|
|
798
|
+
function l() {
|
|
799
|
+
var m, h, b, y, T, R, B, p, w, V, P;
|
|
763
800
|
return {
|
|
764
|
-
blockChildren: (
|
|
765
|
-
componentRef: (
|
|
801
|
+
blockChildren: (m = i().children) != null ? m : [],
|
|
802
|
+
componentRef: (h = t == null ? void 0 : t()) == null ? void 0 : h.component,
|
|
766
803
|
componentOptions: {
|
|
767
|
-
...
|
|
804
|
+
...et(i()),
|
|
768
805
|
builderContext: e.context,
|
|
769
|
-
...((
|
|
806
|
+
...((b = t == null ? void 0 : t()) == null ? void 0 : b.name) === "Core:Button" || ((y = t == null ? void 0 : t()) == null ? void 0 : y.name) === "Symbol" || ((T = t == null ? void 0 : t()) == null ? void 0 : T.name) === "Columns" || ((R = t == null ? void 0 : t()) == null ? void 0 : R.name) === "Form:Form" ? {
|
|
770
807
|
builderLinkComponent: e.linkComponent
|
|
771
808
|
} : {},
|
|
772
|
-
...((
|
|
809
|
+
...((B = t == null ? void 0 : t()) == null ? void 0 : B.name) === "Symbol" || ((p = t == null ? void 0 : t()) == null ? void 0 : p.name) === "Columns" || ((w = t == null ? void 0 : t()) == null ? void 0 : w.name) === "Form:Form" ? {
|
|
773
810
|
builderComponents: e.registeredComponents
|
|
774
811
|
} : {}
|
|
775
812
|
},
|
|
776
|
-
context:
|
|
813
|
+
context: e.context,
|
|
777
814
|
linkComponent: e.linkComponent,
|
|
778
815
|
registeredComponents: e.registeredComponents,
|
|
779
816
|
builderBlock: i(),
|
|
780
|
-
includeBlockProps: ((
|
|
781
|
-
isInteractive: !((
|
|
817
|
+
includeBlockProps: ((V = t == null ? void 0 : t()) == null ? void 0 : V.noWrap) === !0,
|
|
818
|
+
isInteractive: !((P = t == null ? void 0 : t()) != null && P.isRSC)
|
|
782
819
|
};
|
|
783
820
|
}
|
|
784
|
-
const [c, d] = x(() => e.context);
|
|
785
821
|
return W(() => {
|
|
786
|
-
const
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
...
|
|
790
|
-
elementId:
|
|
822
|
+
const m = i().id, h = i().animations;
|
|
823
|
+
h && m && ct(
|
|
824
|
+
h.filter((b) => b.trigger !== "hover").map((b) => ({
|
|
825
|
+
...b,
|
|
826
|
+
elementId: m
|
|
791
827
|
}))
|
|
792
828
|
);
|
|
793
|
-
}, []), /* @__PURE__ */
|
|
794
|
-
/* @__PURE__ */
|
|
795
|
-
(
|
|
796
|
-
|
|
829
|
+
}, []), /* @__PURE__ */ c(E, { children: a() ? /* @__PURE__ */ N(E, { children: [
|
|
830
|
+
/* @__PURE__ */ c(St, { block: e.block, context: e.context }),
|
|
831
|
+
(d = t == null ? void 0 : t()) != null && d.noWrap ? /* @__PURE__ */ c(E, { children: /* @__PURE__ */ c(
|
|
832
|
+
ve,
|
|
797
833
|
{
|
|
798
|
-
componentRef:
|
|
799
|
-
componentOptions:
|
|
800
|
-
blockChildren:
|
|
801
|
-
context:
|
|
802
|
-
registeredComponents:
|
|
803
|
-
linkComponent:
|
|
804
|
-
builderBlock:
|
|
805
|
-
includeBlockProps:
|
|
806
|
-
isInteractive:
|
|
834
|
+
componentRef: l().componentRef,
|
|
835
|
+
componentOptions: l().componentOptions,
|
|
836
|
+
blockChildren: l().blockChildren,
|
|
837
|
+
context: l().context,
|
|
838
|
+
registeredComponents: l().registeredComponents,
|
|
839
|
+
linkComponent: l().linkComponent,
|
|
840
|
+
builderBlock: l().builderBlock,
|
|
841
|
+
includeBlockProps: l().includeBlockProps,
|
|
842
|
+
isInteractive: l().isInteractive
|
|
807
843
|
}
|
|
808
|
-
) }) : /* @__PURE__ */
|
|
809
|
-
|
|
844
|
+
) }) : /* @__PURE__ */ c(E, { children: n() ? /* @__PURE__ */ c(E, { children: (u = n()) == null ? void 0 : u.map((m, h) => /* @__PURE__ */ c(
|
|
845
|
+
Rt,
|
|
810
846
|
{
|
|
811
|
-
repeatContext:
|
|
812
|
-
block:
|
|
847
|
+
repeatContext: m.context,
|
|
848
|
+
block: m.block,
|
|
813
849
|
registeredComponents: e.registeredComponents,
|
|
814
850
|
linkComponent: e.linkComponent
|
|
815
851
|
},
|
|
816
|
-
|
|
817
|
-
)) }) : /* @__PURE__ */
|
|
818
|
-
|
|
852
|
+
h
|
|
853
|
+
)) }) : /* @__PURE__ */ N(
|
|
854
|
+
It,
|
|
819
855
|
{
|
|
820
856
|
Wrapper: o(),
|
|
821
857
|
block: i(),
|
|
822
858
|
context: e.context,
|
|
823
859
|
linkComponent: e.linkComponent,
|
|
824
860
|
children: [
|
|
825
|
-
/* @__PURE__ */
|
|
826
|
-
|
|
861
|
+
/* @__PURE__ */ c(
|
|
862
|
+
ve,
|
|
827
863
|
{
|
|
828
|
-
componentRef:
|
|
829
|
-
componentOptions:
|
|
830
|
-
blockChildren:
|
|
831
|
-
context:
|
|
832
|
-
registeredComponents:
|
|
833
|
-
linkComponent:
|
|
834
|
-
builderBlock:
|
|
835
|
-
includeBlockProps:
|
|
836
|
-
isInteractive:
|
|
864
|
+
componentRef: l().componentRef,
|
|
865
|
+
componentOptions: l().componentOptions,
|
|
866
|
+
blockChildren: l().blockChildren,
|
|
867
|
+
context: l().context,
|
|
868
|
+
registeredComponents: l().registeredComponents,
|
|
869
|
+
linkComponent: l().linkComponent,
|
|
870
|
+
builderBlock: l().builderBlock,
|
|
871
|
+
includeBlockProps: l().includeBlockProps,
|
|
872
|
+
isInteractive: l().isInteractive
|
|
837
873
|
}
|
|
838
874
|
),
|
|
839
|
-
(
|
|
840
|
-
|
|
875
|
+
(s = r()) == null ? void 0 : s.map((m) => /* @__PURE__ */ c(
|
|
876
|
+
G,
|
|
841
877
|
{
|
|
842
|
-
block:
|
|
843
|
-
context: c,
|
|
878
|
+
block: m,
|
|
844
879
|
registeredComponents: e.registeredComponents,
|
|
845
|
-
linkComponent: e.linkComponent
|
|
880
|
+
linkComponent: e.linkComponent,
|
|
881
|
+
context: e.context
|
|
846
882
|
},
|
|
847
|
-
|
|
883
|
+
m.id
|
|
848
884
|
))
|
|
849
885
|
]
|
|
850
886
|
}
|
|
851
|
-
) })
|
|
887
|
+
) })
|
|
852
888
|
] }) : null });
|
|
853
889
|
}
|
|
854
|
-
function
|
|
890
|
+
function Pt(e) {
|
|
855
891
|
function t() {
|
|
856
892
|
var o;
|
|
857
893
|
return "builder-blocks" + ((o = e.blocks) != null && o.length ? "" : " no-blocks");
|
|
858
894
|
}
|
|
859
895
|
function n() {
|
|
860
896
|
var o, a;
|
|
861
|
-
|
|
897
|
+
L() && !((o = e.blocks) != null && o.length) && ((a = window.parent) == null || a.postMessage(
|
|
862
898
|
{
|
|
863
899
|
type: "builder.clickEmptyBlocks",
|
|
864
900
|
data: {
|
|
@@ -871,7 +907,7 @@ function wt(e) {
|
|
|
871
907
|
}
|
|
872
908
|
function i() {
|
|
873
909
|
var o, a;
|
|
874
|
-
|
|
910
|
+
L() && !((o = e.blocks) != null && o.length) && ((a = window.parent) == null || a.postMessage(
|
|
875
911
|
{
|
|
876
912
|
type: "builder.hoverEmptyBlocks",
|
|
877
913
|
data: {
|
|
@@ -882,11 +918,11 @@ function wt(e) {
|
|
|
882
918
|
"*"
|
|
883
919
|
));
|
|
884
920
|
}
|
|
885
|
-
return /* @__PURE__ */ N(
|
|
886
|
-
/* @__PURE__ */
|
|
921
|
+
return /* @__PURE__ */ N(E, { children: [
|
|
922
|
+
/* @__PURE__ */ c(
|
|
887
923
|
e.BlocksWrapper,
|
|
888
924
|
{
|
|
889
|
-
className: t() + " props-blocks-wrapper-
|
|
925
|
+
className: t() + " props-blocks-wrapper-7cd1560e",
|
|
890
926
|
"builder-path": e.path,
|
|
891
927
|
"builder-parent-id": e.parent,
|
|
892
928
|
style: e.styleProp,
|
|
@@ -897,18 +933,18 @@ function wt(e) {
|
|
|
897
933
|
children: e.children
|
|
898
934
|
}
|
|
899
935
|
),
|
|
900
|
-
/* @__PURE__ */
|
|
936
|
+
/* @__PURE__ */ c("style", { children: `.props-blocks-wrapper-7cd1560e {
|
|
901
937
|
display: flex;
|
|
902
938
|
flex-direction: column;
|
|
903
939
|
align-items: stretch;
|
|
904
940
|
}` })
|
|
905
941
|
] });
|
|
906
942
|
}
|
|
907
|
-
function
|
|
943
|
+
function K(e) {
|
|
908
944
|
var i, o, a;
|
|
909
|
-
const t =
|
|
910
|
-
return /* @__PURE__ */
|
|
911
|
-
|
|
945
|
+
const t = pe(ue), n = pe(Pe);
|
|
946
|
+
return /* @__PURE__ */ c(
|
|
947
|
+
Pt,
|
|
912
948
|
{
|
|
913
949
|
blocks: e.blocks,
|
|
914
950
|
parent: e.parent,
|
|
@@ -916,8 +952,8 @@ function U(e) {
|
|
|
916
952
|
styleProp: e.styleProp,
|
|
917
953
|
BlocksWrapper: ((i = e.context) == null ? void 0 : i.BlocksWrapper) || t.BlocksWrapper,
|
|
918
954
|
BlocksWrapperProps: ((o = e.context) == null ? void 0 : o.BlocksWrapperProps) || t.BlocksWrapperProps,
|
|
919
|
-
children: e.blocks ? /* @__PURE__ */
|
|
920
|
-
|
|
955
|
+
children: e.blocks ? /* @__PURE__ */ c(E, { children: (a = e.blocks) == null ? void 0 : a.map((r) => /* @__PURE__ */ c(
|
|
956
|
+
G,
|
|
921
957
|
{
|
|
922
958
|
block: r,
|
|
923
959
|
linkComponent: e.linkComponent,
|
|
@@ -929,47 +965,47 @@ function U(e) {
|
|
|
929
965
|
}
|
|
930
966
|
);
|
|
931
967
|
}
|
|
932
|
-
function
|
|
968
|
+
function Vt(e) {
|
|
933
969
|
var B;
|
|
934
|
-
const [t, n] =
|
|
970
|
+
const [t, n] = S(
|
|
935
971
|
() => typeof e.space == "number" ? e.space || 0 : 20
|
|
936
|
-
), [i, o] =
|
|
972
|
+
), [i, o] = S(() => e.columns || []), [a, r] = S(
|
|
937
973
|
() => e.stackColumnsAt || "tablet"
|
|
938
974
|
);
|
|
939
|
-
function
|
|
940
|
-
var
|
|
941
|
-
return ((
|
|
975
|
+
function l(p) {
|
|
976
|
+
var w;
|
|
977
|
+
return ((w = i[p]) == null ? void 0 : w.width) || 100 / i.length;
|
|
942
978
|
}
|
|
943
|
-
function
|
|
944
|
-
const
|
|
945
|
-
return `calc(${
|
|
979
|
+
function d(p) {
|
|
980
|
+
const w = t * (i.length - 1) / i.length;
|
|
981
|
+
return `calc(${l(p)}% - ${w}px)`;
|
|
946
982
|
}
|
|
947
|
-
function
|
|
948
|
-
stackedStyle:
|
|
949
|
-
desktopStyle:
|
|
983
|
+
function s({
|
|
984
|
+
stackedStyle: p,
|
|
985
|
+
desktopStyle: w
|
|
950
986
|
}) {
|
|
951
|
-
return a === "tablet" ?
|
|
987
|
+
return a === "tablet" ? p : w;
|
|
952
988
|
}
|
|
953
989
|
function u({
|
|
954
|
-
stackedStyle:
|
|
955
|
-
desktopStyle:
|
|
990
|
+
stackedStyle: p,
|
|
991
|
+
desktopStyle: w
|
|
956
992
|
}) {
|
|
957
|
-
return a === "never" ?
|
|
993
|
+
return a === "never" ? w : p;
|
|
958
994
|
}
|
|
959
|
-
const [
|
|
995
|
+
const [m, h] = S(
|
|
960
996
|
() => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
|
|
961
997
|
);
|
|
962
|
-
function
|
|
998
|
+
function b() {
|
|
963
999
|
return {
|
|
964
|
-
"--flex-dir":
|
|
965
|
-
"--flex-dir-tablet":
|
|
966
|
-
stackedStyle:
|
|
1000
|
+
"--flex-dir": m,
|
|
1001
|
+
"--flex-dir-tablet": s({
|
|
1002
|
+
stackedStyle: m,
|
|
967
1003
|
desktopStyle: "row"
|
|
968
1004
|
})
|
|
969
1005
|
};
|
|
970
1006
|
}
|
|
971
|
-
function
|
|
972
|
-
const
|
|
1007
|
+
function y(p) {
|
|
1008
|
+
const w = p === 0 ? 0 : t, V = d(p), P = `${w}px`, M = "100%", O = 0;
|
|
973
1009
|
return {
|
|
974
1010
|
...{
|
|
975
1011
|
display: "flex",
|
|
@@ -979,32 +1015,32 @@ function It(e) {
|
|
|
979
1015
|
width: V,
|
|
980
1016
|
["marginLeft"]: P,
|
|
981
1017
|
"--column-width-mobile": u({
|
|
982
|
-
stackedStyle:
|
|
1018
|
+
stackedStyle: M,
|
|
983
1019
|
desktopStyle: V
|
|
984
1020
|
}),
|
|
985
1021
|
"--column-margin-left-mobile": u({
|
|
986
|
-
stackedStyle:
|
|
1022
|
+
stackedStyle: O,
|
|
987
1023
|
desktopStyle: P
|
|
988
1024
|
}),
|
|
989
|
-
"--column-width-tablet":
|
|
990
|
-
stackedStyle:
|
|
1025
|
+
"--column-width-tablet": s({
|
|
1026
|
+
stackedStyle: M,
|
|
991
1027
|
desktopStyle: V
|
|
992
1028
|
}),
|
|
993
|
-
"--column-margin-left-tablet":
|
|
994
|
-
stackedStyle:
|
|
1029
|
+
"--column-margin-left-tablet": s({
|
|
1030
|
+
stackedStyle: O,
|
|
995
1031
|
desktopStyle: P
|
|
996
1032
|
})
|
|
997
1033
|
};
|
|
998
1034
|
}
|
|
999
|
-
function
|
|
1035
|
+
function T(p) {
|
|
1000
1036
|
var V, P;
|
|
1001
|
-
return
|
|
1037
|
+
return $e(
|
|
1002
1038
|
((P = (V = e.builderContext.content) == null ? void 0 : V.meta) == null ? void 0 : P.breakpoints) || {}
|
|
1003
|
-
)[
|
|
1039
|
+
)[p].max;
|
|
1004
1040
|
}
|
|
1005
1041
|
function R() {
|
|
1006
1042
|
return `
|
|
1007
|
-
@media (max-width: ${
|
|
1043
|
+
@media (max-width: ${T("medium")}px) {
|
|
1008
1044
|
.${e.builderBlock.id}-breakpoints {
|
|
1009
1045
|
flex-direction: var(--flex-dir-tablet);
|
|
1010
1046
|
align-items: stretch;
|
|
@@ -1016,7 +1052,7 @@ function It(e) {
|
|
|
1016
1052
|
}
|
|
1017
1053
|
}
|
|
1018
1054
|
|
|
1019
|
-
@media (max-width: ${
|
|
1055
|
+
@media (max-width: ${T("small")}px) {
|
|
1020
1056
|
.${e.builderBlock.id}-breakpoints {
|
|
1021
1057
|
flex-direction: var(--flex-dir);
|
|
1022
1058
|
align-items: stretch;
|
|
@@ -1029,30 +1065,30 @@ function It(e) {
|
|
|
1029
1065
|
},
|
|
1030
1066
|
`;
|
|
1031
1067
|
}
|
|
1032
|
-
return /* @__PURE__ */ N(
|
|
1068
|
+
return /* @__PURE__ */ N(E, { children: [
|
|
1033
1069
|
/* @__PURE__ */ N(
|
|
1034
1070
|
"div",
|
|
1035
1071
|
{
|
|
1036
|
-
className: `builder-columns ${e.builderBlock.id}-breakpoints div-
|
|
1037
|
-
style:
|
|
1072
|
+
className: `builder-columns ${e.builderBlock.id}-breakpoints div-5e636bea`,
|
|
1073
|
+
style: b(),
|
|
1038
1074
|
children: [
|
|
1039
|
-
/* @__PURE__ */
|
|
1040
|
-
(B = e.columns) == null ? void 0 : B.map((
|
|
1041
|
-
|
|
1075
|
+
/* @__PURE__ */ c(ie, { styles: R() }),
|
|
1076
|
+
(B = e.columns) == null ? void 0 : B.map((p, w) => /* @__PURE__ */ c(
|
|
1077
|
+
de,
|
|
1042
1078
|
{
|
|
1043
|
-
TagName:
|
|
1079
|
+
TagName: p.link ? e.builderLinkComponent || "a" : "div",
|
|
1044
1080
|
actionAttributes: {},
|
|
1045
1081
|
attributes: {
|
|
1046
|
-
...
|
|
1047
|
-
href:
|
|
1082
|
+
...p.link ? {
|
|
1083
|
+
href: p.link
|
|
1048
1084
|
} : {},
|
|
1049
|
-
[
|
|
1050
|
-
style: Fe(
|
|
1085
|
+
[z()]: "builder-column",
|
|
1086
|
+
style: Fe(y(w))
|
|
1051
1087
|
},
|
|
1052
|
-
children: /* @__PURE__ */
|
|
1053
|
-
|
|
1088
|
+
children: /* @__PURE__ */ c(
|
|
1089
|
+
K,
|
|
1054
1090
|
{
|
|
1055
|
-
path: `component.options.columns.${
|
|
1091
|
+
path: `component.options.columns.${w}.blocks`,
|
|
1056
1092
|
parent: e.builderBlock.id,
|
|
1057
1093
|
styleProp: {
|
|
1058
1094
|
flexGrow: "1"
|
|
@@ -1060,89 +1096,89 @@ function It(e) {
|
|
|
1060
1096
|
context: e.builderContext,
|
|
1061
1097
|
registeredComponents: e.builderComponents,
|
|
1062
1098
|
linkComponent: e.builderLinkComponent,
|
|
1063
|
-
blocks:
|
|
1099
|
+
blocks: p.blocks
|
|
1064
1100
|
}
|
|
1065
1101
|
)
|
|
1066
1102
|
},
|
|
1067
|
-
|
|
1103
|
+
w
|
|
1068
1104
|
))
|
|
1069
1105
|
]
|
|
1070
1106
|
}
|
|
1071
1107
|
),
|
|
1072
|
-
/* @__PURE__ */
|
|
1108
|
+
/* @__PURE__ */ c("style", { children: `.div-5e636bea {
|
|
1073
1109
|
display: flex;
|
|
1074
1110
|
line-height: normal;
|
|
1075
1111
|
}` })
|
|
1076
1112
|
] });
|
|
1077
1113
|
}
|
|
1078
|
-
function
|
|
1079
|
-
return /* @__PURE__ */
|
|
1114
|
+
function Bt(e) {
|
|
1115
|
+
return /* @__PURE__ */ c("span", { children: e.children });
|
|
1080
1116
|
}
|
|
1081
|
-
function
|
|
1117
|
+
function ke(e) {
|
|
1082
1118
|
return e.replace(/http(s)?:/, "");
|
|
1083
1119
|
}
|
|
1084
|
-
function
|
|
1120
|
+
function Wt(e = "", t, n) {
|
|
1085
1121
|
const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), o = e.indexOf("?") !== -1 ? "&" : "?";
|
|
1086
1122
|
return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + o + t + "=" + encodeURIComponent(n);
|
|
1087
1123
|
}
|
|
1088
|
-
function
|
|
1124
|
+
function At(e, t) {
|
|
1089
1125
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
1090
1126
|
return e;
|
|
1091
1127
|
if (t === "master")
|
|
1092
|
-
return
|
|
1128
|
+
return ke(e);
|
|
1093
1129
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
1094
1130
|
if (n) {
|
|
1095
1131
|
const i = e.split(n[0]), o = n[3], a = t.match("x") ? t : `${t}x`;
|
|
1096
|
-
return
|
|
1132
|
+
return ke(`${i[0]}_${a}${o}`);
|
|
1097
1133
|
}
|
|
1098
1134
|
return null;
|
|
1099
1135
|
}
|
|
1100
|
-
function
|
|
1136
|
+
function re(e) {
|
|
1101
1137
|
if (!e)
|
|
1102
1138
|
return e;
|
|
1103
1139
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
1104
1140
|
if (e.match(/builder\.io/)) {
|
|
1105
1141
|
let n = e;
|
|
1106
1142
|
const i = Number(e.split("?width=")[1]);
|
|
1107
|
-
return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${
|
|
1143
|
+
return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${Wt(e, "width", o)} ${o}w`).concat([n]).join(", ");
|
|
1108
1144
|
}
|
|
1109
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
1145
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [At(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
|
|
1110
1146
|
}
|
|
1111
|
-
function
|
|
1112
|
-
var o, a, r,
|
|
1147
|
+
function Ft(e) {
|
|
1148
|
+
var o, a, r, l;
|
|
1113
1149
|
function t() {
|
|
1114
1150
|
var u;
|
|
1115
|
-
const
|
|
1116
|
-
if (!
|
|
1151
|
+
const s = e.image || e.src;
|
|
1152
|
+
if (!s || // We can auto add srcset for cdn.builder.io and shopify
|
|
1117
1153
|
// images, otherwise you can supply this prop manually
|
|
1118
|
-
!(
|
|
1154
|
+
!(s.match(/builder\.io/) || s.match(/cdn\.shopify\.com/)))
|
|
1119
1155
|
return e.srcset;
|
|
1120
1156
|
if (e.srcset && ((u = e.image) != null && u.includes("builder.io/api/v1/image"))) {
|
|
1121
1157
|
if (!e.srcset.includes(e.image.split("?")[0]))
|
|
1122
|
-
return console.debug("Removed given srcset"),
|
|
1158
|
+
return console.debug("Removed given srcset"), re(s);
|
|
1123
1159
|
} else if (e.image && !e.srcset)
|
|
1124
|
-
return
|
|
1125
|
-
return
|
|
1160
|
+
return re(s);
|
|
1161
|
+
return re(s);
|
|
1126
1162
|
}
|
|
1127
1163
|
function n() {
|
|
1128
|
-
var
|
|
1129
|
-
return (
|
|
1164
|
+
var d;
|
|
1165
|
+
return (d = t == null ? void 0 : t()) != null && d.match(/builder\.io/) && !e.noWebp ? t().replace(/\?/g, "?format=webp&") : "";
|
|
1130
1166
|
}
|
|
1131
1167
|
function i() {
|
|
1132
|
-
const
|
|
1168
|
+
const d = {
|
|
1133
1169
|
position: "absolute",
|
|
1134
1170
|
height: "100%",
|
|
1135
1171
|
width: "100%",
|
|
1136
1172
|
left: "0px",
|
|
1137
1173
|
top: "0px"
|
|
1138
1174
|
};
|
|
1139
|
-
return e.aspectRatio ?
|
|
1175
|
+
return e.aspectRatio ? d : void 0;
|
|
1140
1176
|
}
|
|
1141
|
-
return /* @__PURE__ */ N(
|
|
1142
|
-
/* @__PURE__ */ N(
|
|
1177
|
+
return /* @__PURE__ */ N(E, { children: [
|
|
1178
|
+
/* @__PURE__ */ N(E, { children: [
|
|
1143
1179
|
/* @__PURE__ */ N("picture", { children: [
|
|
1144
|
-
n() ? /* @__PURE__ */
|
|
1145
|
-
/* @__PURE__ */
|
|
1180
|
+
n() ? /* @__PURE__ */ c("source", { type: "image/webp", srcSet: n() }) : null,
|
|
1181
|
+
/* @__PURE__ */ c(
|
|
1146
1182
|
"img",
|
|
1147
1183
|
{
|
|
1148
1184
|
loading: "lazy",
|
|
@@ -1153,33 +1189,33 @@ function Pt(e) {
|
|
|
1153
1189
|
objectFit: e.backgroundSize || "cover",
|
|
1154
1190
|
...i()
|
|
1155
1191
|
},
|
|
1156
|
-
className: "builder-image" + (e.className ? " " + e.className : "") + " img-
|
|
1192
|
+
className: "builder-image" + (e.className ? " " + e.className : "") + " img-a0c95e8c",
|
|
1157
1193
|
src: e.image,
|
|
1158
1194
|
srcSet: t(),
|
|
1159
1195
|
sizes: e.sizes
|
|
1160
1196
|
}
|
|
1161
1197
|
)
|
|
1162
1198
|
] }),
|
|
1163
|
-
e.aspectRatio && !((a = (o = e.builderBlock) == null ? void 0 : o.children) != null && a.length && e.fitContent) ? /* @__PURE__ */
|
|
1199
|
+
e.aspectRatio && !((a = (o = e.builderBlock) == null ? void 0 : o.children) != null && a.length && e.fitContent) ? /* @__PURE__ */ c(
|
|
1164
1200
|
"div",
|
|
1165
1201
|
{
|
|
1166
|
-
className: "builder-image-sizer div-
|
|
1202
|
+
className: "builder-image-sizer div-a0c95e8c",
|
|
1167
1203
|
style: {
|
|
1168
1204
|
paddingTop: e.aspectRatio * 100 + "%"
|
|
1169
1205
|
}
|
|
1170
1206
|
}
|
|
1171
|
-
)
|
|
1172
|
-
(
|
|
1173
|
-
!e.fitContent && e.children ? /* @__PURE__ */
|
|
1207
|
+
) : null,
|
|
1208
|
+
(l = (r = e.builderBlock) == null ? void 0 : r.children) != null && l.length && e.fitContent ? /* @__PURE__ */ c(E, { children: e.children }) : null,
|
|
1209
|
+
!e.fitContent && e.children ? /* @__PURE__ */ c("div", { className: "div-a0c95e8c-2", children: e.children }) : null
|
|
1174
1210
|
] }),
|
|
1175
|
-
/* @__PURE__ */
|
|
1211
|
+
/* @__PURE__ */ c("style", { children: `.img-a0c95e8c {
|
|
1176
1212
|
opacity: 1;
|
|
1177
1213
|
transition: opacity 0.2s ease-in-out;
|
|
1178
|
-
}.div-
|
|
1214
|
+
}.div-a0c95e8c {
|
|
1179
1215
|
width: 100%;
|
|
1180
1216
|
pointer-events: none;
|
|
1181
1217
|
font-size: 0;
|
|
1182
|
-
}.div-
|
|
1218
|
+
}.div-a0c95e8c-2 {
|
|
1183
1219
|
display: flex;
|
|
1184
1220
|
flex-direction: column;
|
|
1185
1221
|
align-items: stretch;
|
|
@@ -1191,8 +1227,8 @@ function Pt(e) {
|
|
|
1191
1227
|
}` })
|
|
1192
1228
|
] });
|
|
1193
1229
|
}
|
|
1194
|
-
function
|
|
1195
|
-
return /* @__PURE__ */
|
|
1230
|
+
function Nt(e) {
|
|
1231
|
+
return /* @__PURE__ */ c(
|
|
1196
1232
|
"section",
|
|
1197
1233
|
{
|
|
1198
1234
|
...e.attributes,
|
|
@@ -1212,7 +1248,7 @@ function Vt(e) {
|
|
|
1212
1248
|
}
|
|
1213
1249
|
);
|
|
1214
1250
|
}
|
|
1215
|
-
const
|
|
1251
|
+
const $t = {
|
|
1216
1252
|
name: "Core:Button",
|
|
1217
1253
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1218
1254
|
defaultStyles: {
|
|
@@ -1245,7 +1281,7 @@ const Bt = {
|
|
|
1245
1281
|
}],
|
|
1246
1282
|
static: !0,
|
|
1247
1283
|
noWrap: !0
|
|
1248
|
-
},
|
|
1284
|
+
}, Lt = {
|
|
1249
1285
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1250
1286
|
name: "Columns",
|
|
1251
1287
|
isRSC: !0,
|
|
@@ -1424,7 +1460,7 @@ const Bt = {
|
|
|
1424
1460
|
});
|
|
1425
1461
|
}
|
|
1426
1462
|
const n = e.get("columns");
|
|
1427
|
-
Array.isArray(n) && n.find((o) => o.get("width")) && (n.find((a) => !a.get("width")) || n.reduce((
|
|
1463
|
+
Array.isArray(n) && n.find((o) => o.get("width")) && (n.find((a) => !a.get("width")) || n.reduce((l, d) => l + d.get("width"), 0) !== 100) && t();
|
|
1428
1464
|
}
|
|
1429
1465
|
}, {
|
|
1430
1466
|
name: "space",
|
|
@@ -1446,13 +1482,13 @@ const Bt = {
|
|
|
1446
1482
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1447
1483
|
advanced: !0
|
|
1448
1484
|
}]
|
|
1449
|
-
},
|
|
1485
|
+
}, Dt = {
|
|
1450
1486
|
name: "Fragment",
|
|
1451
1487
|
static: !0,
|
|
1452
1488
|
hidden: !0,
|
|
1453
1489
|
canHaveChildren: !0,
|
|
1454
1490
|
noWrap: !0
|
|
1455
|
-
},
|
|
1491
|
+
}, Mt = {
|
|
1456
1492
|
name: "Image",
|
|
1457
1493
|
static: !0,
|
|
1458
1494
|
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
@@ -1472,17 +1508,17 @@ const Bt = {
|
|
|
1472
1508
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
1473
1509
|
onChange: (e) => {
|
|
1474
1510
|
e.delete("srcset"), e.delete("noWebp");
|
|
1475
|
-
function n(r,
|
|
1476
|
-
return new Promise((
|
|
1511
|
+
function n(r, l = 6e4) {
|
|
1512
|
+
return new Promise((d, s) => {
|
|
1477
1513
|
const u = document.createElement("img");
|
|
1478
|
-
let
|
|
1514
|
+
let m = !1;
|
|
1479
1515
|
u.onload = () => {
|
|
1480
|
-
|
|
1481
|
-
}, u.addEventListener("error", (
|
|
1482
|
-
console.warn("Image load failed",
|
|
1516
|
+
m = !0, d(u);
|
|
1517
|
+
}, u.addEventListener("error", (h) => {
|
|
1518
|
+
console.warn("Image load failed", h.error), s(h.error);
|
|
1483
1519
|
}), u.src = r, setTimeout(() => {
|
|
1484
|
-
|
|
1485
|
-
},
|
|
1520
|
+
m || s(new Error("Image load timed out"));
|
|
1521
|
+
}, l);
|
|
1486
1522
|
});
|
|
1487
1523
|
}
|
|
1488
1524
|
function i(r) {
|
|
@@ -1493,8 +1529,8 @@ const Bt = {
|
|
|
1493
1529
|
r.type.includes("svg") && e.set("noWebp", !0);
|
|
1494
1530
|
}), o && (!a || a === 0.7041))
|
|
1495
1531
|
return n(o).then((r) => {
|
|
1496
|
-
const
|
|
1497
|
-
e.get("image") === o && (!
|
|
1532
|
+
const l = e.get("aspectRatio");
|
|
1533
|
+
e.get("image") === o && (!l || l === 0.7041) && r.width && r.height && (e.set("aspectRatio", i(r.height / r.width)), e.set("height", r.height), e.set("width", r.width));
|
|
1498
1534
|
});
|
|
1499
1535
|
}
|
|
1500
1536
|
}, {
|
|
@@ -1552,7 +1588,7 @@ const Bt = {
|
|
|
1552
1588
|
advanced: !0,
|
|
1553
1589
|
defaultValue: 0.7041
|
|
1554
1590
|
}]
|
|
1555
|
-
},
|
|
1591
|
+
}, Ot = {
|
|
1556
1592
|
name: "Core:Section",
|
|
1557
1593
|
static: !0,
|
|
1558
1594
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1591,7 +1627,7 @@ const Bt = {
|
|
|
1591
1627
|
}
|
|
1592
1628
|
}
|
|
1593
1629
|
}]
|
|
1594
|
-
},
|
|
1630
|
+
}, jt = {
|
|
1595
1631
|
name: "Slot",
|
|
1596
1632
|
isRSC: !0,
|
|
1597
1633
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -1605,9 +1641,9 @@ const Bt = {
|
|
|
1605
1641
|
defaultValue: "children"
|
|
1606
1642
|
}]
|
|
1607
1643
|
};
|
|
1608
|
-
function
|
|
1644
|
+
function Ut(e) {
|
|
1609
1645
|
var t, n, i;
|
|
1610
|
-
return /* @__PURE__ */
|
|
1646
|
+
return /* @__PURE__ */ c(
|
|
1611
1647
|
"div",
|
|
1612
1648
|
{
|
|
1613
1649
|
style: {
|
|
@@ -1616,8 +1652,8 @@ function Lt(e) {
|
|
|
1616
1652
|
...!((t = e.builderContext.context) != null && t.symbolId) && {
|
|
1617
1653
|
"builder-slot": e.name
|
|
1618
1654
|
},
|
|
1619
|
-
children: /* @__PURE__ */
|
|
1620
|
-
|
|
1655
|
+
children: /* @__PURE__ */ c(
|
|
1656
|
+
K,
|
|
1621
1657
|
{
|
|
1622
1658
|
parent: (n = e.builderContext.context) == null ? void 0 : n.symbolId,
|
|
1623
1659
|
path: `symbol.data.${e.name}`,
|
|
@@ -1628,7 +1664,7 @@ function Lt(e) {
|
|
|
1628
1664
|
}
|
|
1629
1665
|
);
|
|
1630
1666
|
}
|
|
1631
|
-
const
|
|
1667
|
+
const Ht = {
|
|
1632
1668
|
name: "Symbol",
|
|
1633
1669
|
noWrap: !0,
|
|
1634
1670
|
static: !0,
|
|
@@ -1661,7 +1697,7 @@ const Dt = {
|
|
|
1661
1697
|
hideFromUI: !0,
|
|
1662
1698
|
type: "boolean"
|
|
1663
1699
|
}]
|
|
1664
|
-
},
|
|
1700
|
+
}, Kt = {
|
|
1665
1701
|
name: "Text",
|
|
1666
1702
|
static: !0,
|
|
1667
1703
|
isRSC: !0,
|
|
@@ -1680,9 +1716,9 @@ const Dt = {
|
|
|
1680
1716
|
textAlign: "center"
|
|
1681
1717
|
}
|
|
1682
1718
|
};
|
|
1683
|
-
function
|
|
1719
|
+
function qt(e) {
|
|
1684
1720
|
var t;
|
|
1685
|
-
return /* @__PURE__ */
|
|
1721
|
+
return /* @__PURE__ */ c(
|
|
1686
1722
|
"div",
|
|
1687
1723
|
{
|
|
1688
1724
|
className: "builder-text",
|
|
@@ -1693,7 +1729,7 @@ function Ot(e) {
|
|
|
1693
1729
|
}
|
|
1694
1730
|
);
|
|
1695
1731
|
}
|
|
1696
|
-
const
|
|
1732
|
+
const _t = {
|
|
1697
1733
|
name: "Custom Code",
|
|
1698
1734
|
static: !0,
|
|
1699
1735
|
requiredPermissions: ["editCode"],
|
|
@@ -1716,36 +1752,36 @@ const jt = {
|
|
|
1716
1752
|
advanced: !0
|
|
1717
1753
|
}]
|
|
1718
1754
|
};
|
|
1719
|
-
function
|
|
1720
|
-
const t =
|
|
1755
|
+
function zt(e) {
|
|
1756
|
+
const t = ne(null), [n, i] = S(() => []), [o, a] = S(() => []);
|
|
1721
1757
|
return W(() => {
|
|
1722
|
-
var
|
|
1723
|
-
if (!((
|
|
1758
|
+
var l;
|
|
1759
|
+
if (!((l = t.current) != null && l.getElementsByTagName) || typeof window == "undefined")
|
|
1724
1760
|
return;
|
|
1725
1761
|
const r = t.current.getElementsByTagName("script");
|
|
1726
|
-
for (let
|
|
1727
|
-
const
|
|
1728
|
-
if (
|
|
1729
|
-
if (n.includes(
|
|
1762
|
+
for (let d = 0; d < r.length; d++) {
|
|
1763
|
+
const s = r[d];
|
|
1764
|
+
if (s.src) {
|
|
1765
|
+
if (n.includes(s.src))
|
|
1730
1766
|
continue;
|
|
1731
|
-
n.push(
|
|
1767
|
+
n.push(s.src);
|
|
1732
1768
|
const u = document.createElement("script");
|
|
1733
|
-
u.async = !0, u.src =
|
|
1734
|
-
} else if (!
|
|
1769
|
+
u.async = !0, u.src = s.src, document.head.appendChild(u);
|
|
1770
|
+
} else if (!s.type || [
|
|
1735
1771
|
"text/javascript",
|
|
1736
1772
|
"application/javascript",
|
|
1737
1773
|
"application/ecmascript"
|
|
1738
|
-
].includes(
|
|
1739
|
-
if (o.includes(
|
|
1774
|
+
].includes(s.type)) {
|
|
1775
|
+
if (o.includes(s.innerText))
|
|
1740
1776
|
continue;
|
|
1741
1777
|
try {
|
|
1742
|
-
o.push(
|
|
1778
|
+
o.push(s.innerText), new Function(s.innerText)();
|
|
1743
1779
|
} catch (u) {
|
|
1744
1780
|
console.warn("`CustomCode`: Error running script:", u);
|
|
1745
1781
|
}
|
|
1746
1782
|
}
|
|
1747
1783
|
}
|
|
1748
|
-
}, []), /* @__PURE__ */
|
|
1784
|
+
}, []), /* @__PURE__ */ c(
|
|
1749
1785
|
"div",
|
|
1750
1786
|
{
|
|
1751
1787
|
ref: t,
|
|
@@ -1754,7 +1790,7 @@ function Ut(e) {
|
|
|
1754
1790
|
}
|
|
1755
1791
|
);
|
|
1756
1792
|
}
|
|
1757
|
-
const
|
|
1793
|
+
const Jt = {
|
|
1758
1794
|
name: "Embed",
|
|
1759
1795
|
static: !0,
|
|
1760
1796
|
inputs: [{
|
|
@@ -1779,30 +1815,30 @@ const Ht = {
|
|
|
1779
1815
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1780
1816
|
hideFromUI: !0
|
|
1781
1817
|
}]
|
|
1782
|
-
},
|
|
1783
|
-
function
|
|
1784
|
-
const t =
|
|
1785
|
-
function
|
|
1818
|
+
}, Yt = ["text/javascript", "application/javascript", "application/ecmascript"], Gt = (e) => Yt.includes(e.type);
|
|
1819
|
+
function Qt(e) {
|
|
1820
|
+
const t = ne(null), [n, i] = S(() => []), [o, a] = S(() => []), [r, l] = S(() => !1);
|
|
1821
|
+
function d() {
|
|
1786
1822
|
if (!t.current || !t.current.getElementsByTagName)
|
|
1787
1823
|
return;
|
|
1788
|
-
const
|
|
1789
|
-
for (let u = 0; u <
|
|
1790
|
-
const
|
|
1791
|
-
if (
|
|
1792
|
-
n.push(
|
|
1793
|
-
const
|
|
1794
|
-
|
|
1795
|
-
} else if (
|
|
1824
|
+
const s = t.current.getElementsByTagName("script");
|
|
1825
|
+
for (let u = 0; u < s.length; u++) {
|
|
1826
|
+
const m = s[u];
|
|
1827
|
+
if (m.src && !n.includes(m.src)) {
|
|
1828
|
+
n.push(m.src);
|
|
1829
|
+
const h = document.createElement("script");
|
|
1830
|
+
h.async = !0, h.src = m.src, document.head.appendChild(h);
|
|
1831
|
+
} else if (Gt(m) && !o.includes(m.innerText))
|
|
1796
1832
|
try {
|
|
1797
|
-
o.push(
|
|
1798
|
-
} catch (
|
|
1799
|
-
console.warn("`Embed`: Error running script:",
|
|
1833
|
+
o.push(m.innerText), new Function(m.innerText)();
|
|
1834
|
+
} catch (h) {
|
|
1835
|
+
console.warn("`Embed`: Error running script:", h);
|
|
1800
1836
|
}
|
|
1801
1837
|
}
|
|
1802
1838
|
}
|
|
1803
1839
|
return W(() => {
|
|
1804
|
-
t.current && !r && (
|
|
1805
|
-
}, [t.current, r]), /* @__PURE__ */
|
|
1840
|
+
t.current && !r && (l(!0), d());
|
|
1841
|
+
}, [t.current, r]), /* @__PURE__ */ c(
|
|
1806
1842
|
"div",
|
|
1807
1843
|
{
|
|
1808
1844
|
className: "builder-embed",
|
|
@@ -1811,7 +1847,7 @@ function qt(e) {
|
|
|
1811
1847
|
}
|
|
1812
1848
|
);
|
|
1813
1849
|
}
|
|
1814
|
-
const
|
|
1850
|
+
const Xt = {
|
|
1815
1851
|
name: "Form:Form",
|
|
1816
1852
|
// editableTags: ['builder-form-error']
|
|
1817
1853
|
defaults: {
|
|
@@ -2042,99 +2078,99 @@ const zt = {
|
|
|
2042
2078
|
}
|
|
2043
2079
|
}
|
|
2044
2080
|
}]
|
|
2045
|
-
},
|
|
2081
|
+
}, Zt = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"], en = () => {
|
|
2046
2082
|
const e = process.env.NODE_ENV || "production";
|
|
2047
|
-
return
|
|
2048
|
-
},
|
|
2083
|
+
return Zt.includes(e) ? e : "production";
|
|
2084
|
+
}, tn = (e, t, n) => {
|
|
2049
2085
|
const i = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((o, a) => o != null ? o[a] : o, e);
|
|
2050
2086
|
return i === void 0 || i === e ? n : i;
|
|
2051
2087
|
};
|
|
2052
|
-
function
|
|
2053
|
-
var
|
|
2054
|
-
const t =
|
|
2055
|
-
function
|
|
2056
|
-
var
|
|
2057
|
-
const
|
|
2088
|
+
function nn(e) {
|
|
2089
|
+
var m, h;
|
|
2090
|
+
const t = ne(null), [n, i] = S(() => "unsubmitted"), [o, a] = S(() => null), [r, l] = S(() => "");
|
|
2091
|
+
function d(b) {
|
|
2092
|
+
var T, R;
|
|
2093
|
+
const y = {
|
|
2058
2094
|
...e.builderContext.rootState,
|
|
2059
|
-
...
|
|
2095
|
+
...b
|
|
2060
2096
|
};
|
|
2061
|
-
e.builderContext.rootSetState ? (R = (
|
|
2097
|
+
e.builderContext.rootSetState ? (R = (T = e.builderContext).rootSetState) == null || R.call(T, y) : e.builderContext.rootState = y;
|
|
2062
2098
|
}
|
|
2063
|
-
function
|
|
2064
|
-
return
|
|
2099
|
+
function s() {
|
|
2100
|
+
return L() && e.previewState || n;
|
|
2065
2101
|
}
|
|
2066
|
-
function u(
|
|
2067
|
-
var
|
|
2068
|
-
const
|
|
2102
|
+
function u(b) {
|
|
2103
|
+
var T;
|
|
2104
|
+
const y = e.sendWithJs || e.sendSubmissionsTo === "email";
|
|
2069
2105
|
if (e.sendSubmissionsTo === "zapier")
|
|
2070
|
-
|
|
2071
|
-
else if (
|
|
2106
|
+
b.preventDefault();
|
|
2107
|
+
else if (y) {
|
|
2072
2108
|
if (!(e.action || e.sendSubmissionsTo === "email")) {
|
|
2073
|
-
|
|
2109
|
+
b.preventDefault();
|
|
2074
2110
|
return;
|
|
2075
2111
|
}
|
|
2076
|
-
|
|
2077
|
-
const R =
|
|
2078
|
-
let
|
|
2079
|
-
const
|
|
2080
|
-
|
|
2081
|
-
).filter((
|
|
2082
|
-
let
|
|
2083
|
-
const
|
|
2084
|
-
if (
|
|
2085
|
-
if (
|
|
2086
|
-
if (
|
|
2087
|
-
return
|
|
2088
|
-
key:
|
|
2089
|
-
value:
|
|
2112
|
+
b.preventDefault();
|
|
2113
|
+
const R = b.currentTarget, B = e.customHeaders || {};
|
|
2114
|
+
let p;
|
|
2115
|
+
const w = new FormData(R), V = Array.from(
|
|
2116
|
+
b.currentTarget.querySelectorAll("input,select,textarea")
|
|
2117
|
+
).filter((f) => !!f.name).map((f) => {
|
|
2118
|
+
let I;
|
|
2119
|
+
const $ = f.name;
|
|
2120
|
+
if (f instanceof HTMLInputElement)
|
|
2121
|
+
if (f.type === "radio") {
|
|
2122
|
+
if (f.checked)
|
|
2123
|
+
return I = f.name, {
|
|
2124
|
+
key: $,
|
|
2125
|
+
value: I
|
|
2090
2126
|
};
|
|
2091
|
-
} else if (
|
|
2092
|
-
|
|
2093
|
-
else if (
|
|
2094
|
-
const A =
|
|
2095
|
-
isNaN(A) || (
|
|
2127
|
+
} else if (f.type === "checkbox")
|
|
2128
|
+
I = f.checked;
|
|
2129
|
+
else if (f.type === "number" || f.type === "range") {
|
|
2130
|
+
const A = f.valueAsNumber;
|
|
2131
|
+
isNaN(A) || (I = A);
|
|
2096
2132
|
} else
|
|
2097
|
-
|
|
2133
|
+
f.type === "file" ? I = f.files : I = f.value;
|
|
2098
2134
|
else
|
|
2099
|
-
|
|
2135
|
+
I = f.value;
|
|
2100
2136
|
return {
|
|
2101
|
-
key:
|
|
2102
|
-
value:
|
|
2137
|
+
key: $,
|
|
2138
|
+
value: I
|
|
2103
2139
|
};
|
|
2104
2140
|
});
|
|
2105
2141
|
let P = e.contentType;
|
|
2106
|
-
if (e.sendSubmissionsTo === "email" && (P = "multipart/form-data"), Array.from(V).forEach(({ value:
|
|
2107
|
-
(
|
|
2142
|
+
if (e.sendSubmissionsTo === "email" && (P = "multipart/form-data"), Array.from(V).forEach(({ value: f }) => {
|
|
2143
|
+
(f instanceof File || Array.isArray(f) && f[0] instanceof File || f instanceof FileList) && (P = "multipart/form-data");
|
|
2108
2144
|
}), P !== "application/json")
|
|
2109
|
-
|
|
2145
|
+
p = w;
|
|
2110
2146
|
else {
|
|
2111
|
-
const
|
|
2112
|
-
Array.from(V).forEach(({ value:
|
|
2113
|
-
|
|
2114
|
-
}),
|
|
2147
|
+
const f = {};
|
|
2148
|
+
Array.from(V).forEach(({ value: I, key: $ }) => {
|
|
2149
|
+
Be(f, $, I);
|
|
2150
|
+
}), p = JSON.stringify(f);
|
|
2115
2151
|
}
|
|
2116
|
-
P && P !== "multipart/form-data" && (
|
|
2117
|
-
const
|
|
2118
|
-
if (t.current && (t.current.dispatchEvent(
|
|
2152
|
+
P && P !== "multipart/form-data" && (y && ((T = e.action) != null && T.includes("zapier.com")) || (B["content-type"] = P));
|
|
2153
|
+
const M = new CustomEvent("presubmit", { detail: { body: p } });
|
|
2154
|
+
if (t.current && (t.current.dispatchEvent(M), M.defaultPrevented))
|
|
2119
2155
|
return;
|
|
2120
2156
|
i("sending");
|
|
2121
|
-
const
|
|
2157
|
+
const O = `${en() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(
|
|
2122
2158
|
e.sendSubmissionsToEmail || ""
|
|
2123
2159
|
)}&name=${encodeURIComponent(e.name || "")}`;
|
|
2124
2160
|
fetch(
|
|
2125
|
-
e.sendSubmissionsTo === "email" ?
|
|
2126
|
-
{ body:
|
|
2161
|
+
e.sendSubmissionsTo === "email" ? O : e.action,
|
|
2162
|
+
{ body: p, headers: B, method: e.method || "post" }
|
|
2127
2163
|
).then(
|
|
2128
|
-
async (
|
|
2129
|
-
let
|
|
2130
|
-
const
|
|
2131
|
-
if (
|
|
2132
|
-
let A =
|
|
2133
|
-
A && (typeof A != "string" && (A = JSON.stringify(A)),
|
|
2164
|
+
async (f) => {
|
|
2165
|
+
let I;
|
|
2166
|
+
const $ = f.headers.get("content-type");
|
|
2167
|
+
if ($ && $.indexOf("application/json") !== -1 ? I = await f.json() : I = await f.text(), !f.ok && e.errorMessagePath) {
|
|
2168
|
+
let A = tn(I, e.errorMessagePath);
|
|
2169
|
+
A && (typeof A != "string" && (A = JSON.stringify(A)), l(A), d({ formErrorMessage: A }));
|
|
2134
2170
|
}
|
|
2135
|
-
if (a(
|
|
2171
|
+
if (a(I), i(f.ok ? "success" : "error"), f.ok) {
|
|
2136
2172
|
const A = new CustomEvent("submit:success", {
|
|
2137
|
-
detail: { res:
|
|
2173
|
+
detail: { res: f, body: I }
|
|
2138
2174
|
});
|
|
2139
2175
|
if (t.current) {
|
|
2140
2176
|
if (t.current.dispatchEvent(A), A.defaultPrevented)
|
|
@@ -2143,24 +2179,24 @@ function Qt(e) {
|
|
|
2143
2179
|
}
|
|
2144
2180
|
if (e.successUrl)
|
|
2145
2181
|
if (t.current) {
|
|
2146
|
-
const
|
|
2182
|
+
const g = new CustomEvent("route", {
|
|
2147
2183
|
detail: { url: e.successUrl }
|
|
2148
2184
|
});
|
|
2149
|
-
t.current.dispatchEvent(
|
|
2185
|
+
t.current.dispatchEvent(g), g.defaultPrevented || (location.href = e.successUrl);
|
|
2150
2186
|
} else
|
|
2151
2187
|
location.href = e.successUrl;
|
|
2152
2188
|
}
|
|
2153
2189
|
},
|
|
2154
|
-
(
|
|
2155
|
-
const
|
|
2156
|
-
detail: { error:
|
|
2190
|
+
(f) => {
|
|
2191
|
+
const I = new CustomEvent("submit:error", {
|
|
2192
|
+
detail: { error: f }
|
|
2157
2193
|
});
|
|
2158
|
-
t.current && (t.current.dispatchEvent(
|
|
2194
|
+
t.current && (t.current.dispatchEvent(I), I.defaultPrevented) || (a(f), i("error"));
|
|
2159
2195
|
}
|
|
2160
2196
|
);
|
|
2161
2197
|
}
|
|
2162
2198
|
}
|
|
2163
|
-
return /* @__PURE__ */ N(
|
|
2199
|
+
return /* @__PURE__ */ N(E, { children: [
|
|
2164
2200
|
" ",
|
|
2165
2201
|
/* @__PURE__ */ N(
|
|
2166
2202
|
"form",
|
|
@@ -2170,63 +2206,53 @@ function Qt(e) {
|
|
|
2170
2206
|
action: !e.sendWithJs && e.action,
|
|
2171
2207
|
method: e.method,
|
|
2172
2208
|
name: e.name,
|
|
2173
|
-
onSubmit: (
|
|
2209
|
+
onSubmit: (b) => u(b),
|
|
2174
2210
|
...e.attributes,
|
|
2175
2211
|
children: [
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
J,
|
|
2212
|
+
e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ c(E, { children: (h = (m = e.builderBlock) == null ? void 0 : m.children) == null ? void 0 : h.map((b, y) => /* @__PURE__ */ c(
|
|
2213
|
+
G,
|
|
2179
2214
|
{
|
|
2180
|
-
block:
|
|
2215
|
+
block: b,
|
|
2181
2216
|
context: e.builderContext,
|
|
2182
2217
|
registeredComponents: e.builderComponents,
|
|
2183
2218
|
linkComponent: e.builderLinkComponent
|
|
2184
2219
|
},
|
|
2185
|
-
`form-block-${
|
|
2220
|
+
`form-block-${y}`
|
|
2186
2221
|
)) }) : null,
|
|
2187
|
-
"
|
|
2188
|
-
|
|
2189
|
-
U,
|
|
2222
|
+
s() === "error" ? /* @__PURE__ */ c(
|
|
2223
|
+
K,
|
|
2190
2224
|
{
|
|
2191
2225
|
path: "errorMessage",
|
|
2192
2226
|
blocks: e.errorMessage,
|
|
2193
2227
|
context: e.builderContext
|
|
2194
2228
|
}
|
|
2195
|
-
)
|
|
2196
|
-
"
|
|
2197
|
-
|
|
2198
|
-
U,
|
|
2229
|
+
) : null,
|
|
2230
|
+
s() === "sending" ? /* @__PURE__ */ c(
|
|
2231
|
+
K,
|
|
2199
2232
|
{
|
|
2200
2233
|
path: "sendingMessage",
|
|
2201
2234
|
blocks: e.sendingMessage,
|
|
2202
2235
|
context: e.builderContext
|
|
2203
2236
|
}
|
|
2204
|
-
)
|
|
2205
|
-
" ",
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
JSON.stringify(o, null, 2),
|
|
2209
|
-
" "
|
|
2210
|
-
] }) }) : null,
|
|
2211
|
-
" ",
|
|
2212
|
-
d() === "success" ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(
|
|
2213
|
-
U,
|
|
2237
|
+
) : null,
|
|
2238
|
+
s() === "error" && o ? /* @__PURE__ */ c("pre", { className: "builder-form-error-text pre-31bf8a14", children: JSON.stringify(o, null, 2) }) : null,
|
|
2239
|
+
s() === "success" ? /* @__PURE__ */ c(
|
|
2240
|
+
K,
|
|
2214
2241
|
{
|
|
2215
2242
|
path: "successMessage",
|
|
2216
2243
|
blocks: e.successMessage,
|
|
2217
2244
|
context: e.builderContext
|
|
2218
2245
|
}
|
|
2219
|
-
)
|
|
2220
|
-
" "
|
|
2246
|
+
) : null
|
|
2221
2247
|
]
|
|
2222
2248
|
}
|
|
2223
2249
|
),
|
|
2224
2250
|
" ",
|
|
2225
|
-
/* @__PURE__ */
|
|
2251
|
+
/* @__PURE__ */ c("style", { children: ".pre-31bf8a14 { padding: 10px; color: red; text-align: center; }" }),
|
|
2226
2252
|
" "
|
|
2227
2253
|
] });
|
|
2228
2254
|
}
|
|
2229
|
-
const
|
|
2255
|
+
const on = {
|
|
2230
2256
|
name: "Form:Input",
|
|
2231
2257
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
2232
2258
|
inputs: [
|
|
@@ -2278,12 +2304,12 @@ const Xt = {
|
|
|
2278
2304
|
borderColor: "#ccc"
|
|
2279
2305
|
}
|
|
2280
2306
|
};
|
|
2281
|
-
function
|
|
2282
|
-
return /* @__PURE__ */
|
|
2307
|
+
function an(e) {
|
|
2308
|
+
return /* @__PURE__ */ ce(
|
|
2283
2309
|
"input",
|
|
2284
2310
|
{
|
|
2285
2311
|
...e.attributes,
|
|
2286
|
-
key:
|
|
2312
|
+
key: L() && e.defaultValue ? e.defaultValue : "default-key",
|
|
2287
2313
|
placeholder: e.placeholder,
|
|
2288
2314
|
type: e.type,
|
|
2289
2315
|
name: e.name,
|
|
@@ -2293,7 +2319,7 @@ function Zt(e) {
|
|
|
2293
2319
|
}
|
|
2294
2320
|
);
|
|
2295
2321
|
}
|
|
2296
|
-
const
|
|
2322
|
+
const rn = {
|
|
2297
2323
|
name: "Form:Select",
|
|
2298
2324
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
2299
2325
|
defaultStyles: {
|
|
@@ -2336,21 +2362,21 @@ const en = {
|
|
|
2336
2362
|
static: !0,
|
|
2337
2363
|
noWrap: !0
|
|
2338
2364
|
};
|
|
2339
|
-
function
|
|
2365
|
+
function ln(e) {
|
|
2340
2366
|
var t;
|
|
2341
|
-
return /* @__PURE__ */
|
|
2367
|
+
return /* @__PURE__ */ ce(
|
|
2342
2368
|
"select",
|
|
2343
2369
|
{
|
|
2344
2370
|
...e.attributes,
|
|
2345
2371
|
value: e.value,
|
|
2346
|
-
key:
|
|
2372
|
+
key: L() && e.defaultValue ? e.defaultValue : "default-key",
|
|
2347
2373
|
defaultValue: e.defaultValue,
|
|
2348
2374
|
name: e.name
|
|
2349
2375
|
},
|
|
2350
|
-
(t = e.options) == null ? void 0 : t.map((n) => /* @__PURE__ */
|
|
2376
|
+
(t = e.options) == null ? void 0 : t.map((n) => /* @__PURE__ */ c("option", { value: n.value, children: n.name || n.value }))
|
|
2351
2377
|
);
|
|
2352
2378
|
}
|
|
2353
|
-
const
|
|
2379
|
+
const sn = {
|
|
2354
2380
|
name: "Form:SubmitButton",
|
|
2355
2381
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
2356
2382
|
defaultStyles: {
|
|
@@ -2376,10 +2402,10 @@ const nn = {
|
|
|
2376
2402
|
// TODO: defaultChildren
|
|
2377
2403
|
// canHaveChildren: true,
|
|
2378
2404
|
};
|
|
2379
|
-
function
|
|
2380
|
-
return /* @__PURE__ */
|
|
2405
|
+
function cn(e) {
|
|
2406
|
+
return /* @__PURE__ */ c("button", { type: "submit", ...e.attributes, children: e.text });
|
|
2381
2407
|
}
|
|
2382
|
-
const
|
|
2408
|
+
const dn = {
|
|
2383
2409
|
// friendlyName?
|
|
2384
2410
|
name: "Raw:Img",
|
|
2385
2411
|
hideFromInsertMenu: !0,
|
|
@@ -2394,8 +2420,8 @@ const an = {
|
|
|
2394
2420
|
noWrap: !0,
|
|
2395
2421
|
static: !0
|
|
2396
2422
|
};
|
|
2397
|
-
function
|
|
2398
|
-
return /* @__PURE__ */
|
|
2423
|
+
function un(e) {
|
|
2424
|
+
return /* @__PURE__ */ c(
|
|
2399
2425
|
"img",
|
|
2400
2426
|
{
|
|
2401
2427
|
style: {
|
|
@@ -2406,10 +2432,10 @@ function rn(e) {
|
|
|
2406
2432
|
src: e.imgSrc || e.image,
|
|
2407
2433
|
...e.attributes
|
|
2408
2434
|
},
|
|
2409
|
-
|
|
2435
|
+
L() && e.imgSrc || "default-key"
|
|
2410
2436
|
);
|
|
2411
2437
|
}
|
|
2412
|
-
const
|
|
2438
|
+
const mn = {
|
|
2413
2439
|
name: "Video",
|
|
2414
2440
|
canHaveChildren: !0,
|
|
2415
2441
|
defaultStyles: {
|
|
@@ -2491,8 +2517,8 @@ const ln = {
|
|
|
2491
2517
|
advanced: !0
|
|
2492
2518
|
}]
|
|
2493
2519
|
};
|
|
2494
|
-
function
|
|
2495
|
-
var i, o, a, r,
|
|
2520
|
+
function fn(e) {
|
|
2521
|
+
var i, o, a, r, l, d, s;
|
|
2496
2522
|
function t() {
|
|
2497
2523
|
return {
|
|
2498
2524
|
...e.autoPlay === !0 ? {
|
|
@@ -2524,7 +2550,7 @@ function sn(e) {
|
|
|
2524
2550
|
position: "relative"
|
|
2525
2551
|
},
|
|
2526
2552
|
children: [
|
|
2527
|
-
/* @__PURE__ */
|
|
2553
|
+
/* @__PURE__ */ c(
|
|
2528
2554
|
"video",
|
|
2529
2555
|
{
|
|
2530
2556
|
className: "builder-video",
|
|
@@ -2546,10 +2572,10 @@ function sn(e) {
|
|
|
2546
2572
|
},
|
|
2547
2573
|
src: e.video || "no-src",
|
|
2548
2574
|
poster: e.posterImage,
|
|
2549
|
-
children: e.lazyLoad ? null : /* @__PURE__ */
|
|
2575
|
+
children: e.lazyLoad ? null : /* @__PURE__ */ c("source", { type: "video/mp4", src: e.video })
|
|
2550
2576
|
}
|
|
2551
2577
|
),
|
|
2552
|
-
e.aspectRatio && !(e.fitContent && ((a = (o = e.builderBlock) == null ? void 0 : o.children) != null && a.length)) ? /* @__PURE__ */
|
|
2578
|
+
e.aspectRatio && !(e.fitContent && ((a = (o = e.builderBlock) == null ? void 0 : o.children) != null && a.length)) ? /* @__PURE__ */ c(
|
|
2553
2579
|
"div",
|
|
2554
2580
|
{
|
|
2555
2581
|
style: {
|
|
@@ -2559,8 +2585,8 @@ function sn(e) {
|
|
|
2559
2585
|
fontSize: "0px"
|
|
2560
2586
|
}
|
|
2561
2587
|
}
|
|
2562
|
-
)
|
|
2563
|
-
(
|
|
2588
|
+
) : null,
|
|
2589
|
+
(l = (r = e.builderBlock) == null ? void 0 : r.children) != null && l.length && e.fitContent ? /* @__PURE__ */ c(
|
|
2564
2590
|
"div",
|
|
2565
2591
|
{
|
|
2566
2592
|
style: {
|
|
@@ -2570,8 +2596,8 @@ function sn(e) {
|
|
|
2570
2596
|
},
|
|
2571
2597
|
children: e.children
|
|
2572
2598
|
}
|
|
2573
|
-
)
|
|
2574
|
-
(
|
|
2599
|
+
) : null,
|
|
2600
|
+
(s = (d = e.builderBlock) == null ? void 0 : d.children) != null && s.length && !e.fitContent ? /* @__PURE__ */ c(
|
|
2575
2601
|
"div",
|
|
2576
2602
|
{
|
|
2577
2603
|
style: {
|
|
@@ -2587,60 +2613,60 @@ function sn(e) {
|
|
|
2587
2613
|
},
|
|
2588
2614
|
children: e.children
|
|
2589
2615
|
}
|
|
2590
|
-
)
|
|
2616
|
+
) : null
|
|
2591
2617
|
]
|
|
2592
2618
|
}
|
|
2593
2619
|
);
|
|
2594
2620
|
}
|
|
2595
|
-
const
|
|
2596
|
-
component:
|
|
2597
|
-
...
|
|
2598
|
-
}, {
|
|
2599
|
-
component: qt,
|
|
2600
|
-
...Ht
|
|
2621
|
+
const hn = () => [{
|
|
2622
|
+
component: zt,
|
|
2623
|
+
..._t
|
|
2601
2624
|
}, {
|
|
2602
2625
|
component: Qt,
|
|
2603
|
-
...
|
|
2626
|
+
...Jt
|
|
2604
2627
|
}, {
|
|
2605
|
-
component:
|
|
2628
|
+
component: nn,
|
|
2606
2629
|
...Xt
|
|
2607
2630
|
}, {
|
|
2608
|
-
component:
|
|
2609
|
-
...
|
|
2631
|
+
component: an,
|
|
2632
|
+
...on
|
|
2610
2633
|
}, {
|
|
2611
|
-
component:
|
|
2612
|
-
...
|
|
2634
|
+
component: cn,
|
|
2635
|
+
...sn
|
|
2613
2636
|
}, {
|
|
2614
|
-
component:
|
|
2615
|
-
...
|
|
2637
|
+
component: ln,
|
|
2638
|
+
...rn
|
|
2616
2639
|
}, {
|
|
2617
|
-
component:
|
|
2618
|
-
...
|
|
2619
|
-
}], Se = () => [{
|
|
2620
|
-
component: Je,
|
|
2621
|
-
...Bt
|
|
2640
|
+
component: un,
|
|
2641
|
+
...dn
|
|
2622
2642
|
}, {
|
|
2623
|
-
component:
|
|
2624
|
-
...
|
|
2625
|
-
}, {
|
|
2626
|
-
component:
|
|
2627
|
-
|
|
2628
|
-
}, {
|
|
2629
|
-
component: Pt,
|
|
2630
|
-
...Ft
|
|
2643
|
+
component: fn,
|
|
2644
|
+
...mn
|
|
2645
|
+
}], Ce = () => [{
|
|
2646
|
+
component: Ze,
|
|
2647
|
+
...$t
|
|
2631
2648
|
}, {
|
|
2632
2649
|
component: Vt,
|
|
2633
|
-
...
|
|
2634
|
-
}, {
|
|
2635
|
-
component: Lt,
|
|
2636
|
-
...$t
|
|
2650
|
+
...Lt
|
|
2637
2651
|
}, {
|
|
2638
|
-
component:
|
|
2652
|
+
component: Bt,
|
|
2639
2653
|
...Dt
|
|
2640
2654
|
}, {
|
|
2641
|
-
component:
|
|
2655
|
+
component: Ft,
|
|
2642
2656
|
...Mt
|
|
2643
|
-
},
|
|
2657
|
+
}, {
|
|
2658
|
+
component: Nt,
|
|
2659
|
+
...Ot
|
|
2660
|
+
}, {
|
|
2661
|
+
component: Ut,
|
|
2662
|
+
...jt
|
|
2663
|
+
}, {
|
|
2664
|
+
component: Fn,
|
|
2665
|
+
...Ht
|
|
2666
|
+
}, {
|
|
2667
|
+
component: qt,
|
|
2668
|
+
...Kt
|
|
2669
|
+
}, ...hn()], gn = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
2644
2670
|
function getAndSetVariantId() {
|
|
2645
2671
|
function setCookie(name, value, days) {
|
|
2646
2672
|
let expires = '';
|
|
@@ -2696,7 +2722,7 @@ const cn = () => [{
|
|
|
2696
2722
|
}).join('');
|
|
2697
2723
|
styleEl.innerHTML = newStyleStr;
|
|
2698
2724
|
}
|
|
2699
|
-
}`,
|
|
2725
|
+
}`, bn = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
2700
2726
|
if (!navigator.cookieEnabled) {
|
|
2701
2727
|
return;
|
|
2702
2728
|
}
|
|
@@ -2730,27 +2756,27 @@ const cn = () => [{
|
|
|
2730
2756
|
thisScriptEl?.remove();
|
|
2731
2757
|
}
|
|
2732
2758
|
return;
|
|
2733
|
-
}`,
|
|
2759
|
+
}`, De = "builderIoAbTest", Me = "builderIoRenderContent", X = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
2734
2760
|
...t,
|
|
2735
2761
|
testVariationId: t.id,
|
|
2736
2762
|
id: e == null ? void 0 : e.id
|
|
2737
|
-
})),
|
|
2763
|
+
})), yn = ({
|
|
2738
2764
|
canTrack: e,
|
|
2739
2765
|
content: t
|
|
2740
|
-
}) => !(!(
|
|
2741
|
-
window.${
|
|
2742
|
-
window.${
|
|
2743
|
-
`,
|
|
2744
|
-
window.${
|
|
2745
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
2746
|
-
)`,
|
|
2766
|
+
}) => !(!(X(t).length > 0) || !e || q()), pn = (e) => e === "react" || e === "reactNative", Oe = pn(Y), Sn = () => `
|
|
2767
|
+
window.${De} = ${gn}
|
|
2768
|
+
window.${Me} = ${bn}
|
|
2769
|
+
`, xn = (e, t) => `
|
|
2770
|
+
window.${De}(
|
|
2771
|
+
"${t}",${JSON.stringify(e)}, ${Oe}
|
|
2772
|
+
)`, vn = ({
|
|
2747
2773
|
contentId: e,
|
|
2748
2774
|
variationId: t
|
|
2749
|
-
}) => `window.${
|
|
2750
|
-
"${t}", "${e}", ${
|
|
2775
|
+
}) => `window.${Me}(
|
|
2776
|
+
"${t}", "${e}", ${Oe}
|
|
2751
2777
|
)`;
|
|
2752
|
-
function
|
|
2753
|
-
return /* @__PURE__ */
|
|
2778
|
+
function le(e) {
|
|
2779
|
+
return /* @__PURE__ */ c(
|
|
2754
2780
|
"script",
|
|
2755
2781
|
{
|
|
2756
2782
|
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
@@ -2758,10 +2784,10 @@ function oe(e) {
|
|
|
2758
2784
|
}
|
|
2759
2785
|
);
|
|
2760
2786
|
}
|
|
2761
|
-
function
|
|
2787
|
+
function we(e) {
|
|
2762
2788
|
return Math.round(e * 1e3) / 1e3;
|
|
2763
2789
|
}
|
|
2764
|
-
const
|
|
2790
|
+
const kn = (e, t, n = !0) => {
|
|
2765
2791
|
if (!(e instanceof HTMLElement))
|
|
2766
2792
|
return null;
|
|
2767
2793
|
let i = n ? e : e.parentElement;
|
|
@@ -2772,28 +2798,28 @@ const yn = (e, t, n = !0) => {
|
|
|
2772
2798
|
return i;
|
|
2773
2799
|
} while (i = i.parentElement);
|
|
2774
2800
|
return null;
|
|
2775
|
-
},
|
|
2801
|
+
}, Cn = (e) => kn(e, (t) => {
|
|
2776
2802
|
const n = t.getAttribute("builder-id") || t.id;
|
|
2777
2803
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
2778
|
-
}),
|
|
2804
|
+
}), Ie = ({
|
|
2779
2805
|
event: e,
|
|
2780
2806
|
target: t
|
|
2781
2807
|
}) => {
|
|
2782
|
-
const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top, a =
|
|
2808
|
+
const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top, a = we(i / n.width), r = we(o / n.height);
|
|
2783
2809
|
return {
|
|
2784
2810
|
x: a,
|
|
2785
2811
|
y: r
|
|
2786
2812
|
};
|
|
2787
|
-
},
|
|
2788
|
-
const t = e.target, n = t &&
|
|
2813
|
+
}, wn = (e) => {
|
|
2814
|
+
const t = e.target, n = t && Cn(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2789
2815
|
return {
|
|
2790
2816
|
targetBuilderElement: i || void 0,
|
|
2791
2817
|
metadata: {
|
|
2792
|
-
targetOffset: t ?
|
|
2818
|
+
targetOffset: t ? Ie({
|
|
2793
2819
|
event: e,
|
|
2794
2820
|
target: t
|
|
2795
2821
|
}) : void 0,
|
|
2796
|
-
builderTargetOffset: n ?
|
|
2822
|
+
builderTargetOffset: n ? Ie({
|
|
2797
2823
|
event: e,
|
|
2798
2824
|
target: n
|
|
2799
2825
|
}) : void 0,
|
|
@@ -2801,142 +2827,149 @@ const yn = (e, t, n = !0) => {
|
|
|
2801
2827
|
}
|
|
2802
2828
|
};
|
|
2803
2829
|
};
|
|
2804
|
-
function
|
|
2805
|
-
var P,
|
|
2806
|
-
const t =
|
|
2807
|
-
|
|
2808
|
-
function o(
|
|
2809
|
-
var
|
|
2810
|
-
const
|
|
2830
|
+
function In(e) {
|
|
2831
|
+
var P, M, O, f, I, $, A;
|
|
2832
|
+
const t = ne(null), [n, i] = S(() => 0);
|
|
2833
|
+
S(() => !0);
|
|
2834
|
+
function o(g) {
|
|
2835
|
+
var v, k;
|
|
2836
|
+
const x = {
|
|
2811
2837
|
...e.builderContextSignal.rootState,
|
|
2812
|
-
...
|
|
2838
|
+
...g
|
|
2813
2839
|
};
|
|
2814
|
-
e.builderContextSignal.rootSetState ? (
|
|
2815
|
-
...
|
|
2816
|
-
rootState:
|
|
2840
|
+
e.builderContextSignal.rootSetState ? (k = (v = e.builderContextSignal).rootSetState) == null || k.call(v, x) : e.setBuilderContextSignal((C) => ({
|
|
2841
|
+
...C,
|
|
2842
|
+
rootState: x
|
|
2817
2843
|
}));
|
|
2818
2844
|
}
|
|
2819
|
-
function a(
|
|
2820
|
-
var
|
|
2821
|
-
const
|
|
2845
|
+
function a(g) {
|
|
2846
|
+
var v, k, C, F, U;
|
|
2847
|
+
const x = {
|
|
2822
2848
|
...e.builderContextSignal.content,
|
|
2823
|
-
...
|
|
2849
|
+
...g,
|
|
2824
2850
|
data: {
|
|
2825
|
-
...(
|
|
2826
|
-
...
|
|
2851
|
+
...(v = e.builderContextSignal.content) == null ? void 0 : v.data,
|
|
2852
|
+
...g == null ? void 0 : g.data
|
|
2827
2853
|
},
|
|
2828
2854
|
meta: {
|
|
2829
|
-
...(
|
|
2830
|
-
...
|
|
2831
|
-
breakpoints: ((
|
|
2855
|
+
...(k = e.builderContextSignal.content) == null ? void 0 : k.meta,
|
|
2856
|
+
...g == null ? void 0 : g.meta,
|
|
2857
|
+
breakpoints: ((C = g == null ? void 0 : g.meta) == null ? void 0 : C.breakpoints) || ((U = (F = e.builderContextSignal.content) == null ? void 0 : F.meta) == null ? void 0 : U.breakpoints)
|
|
2832
2858
|
}
|
|
2833
2859
|
};
|
|
2834
|
-
e.setBuilderContextSignal((
|
|
2835
|
-
...
|
|
2836
|
-
content:
|
|
2860
|
+
e.setBuilderContextSignal((Q) => ({
|
|
2861
|
+
...Q,
|
|
2862
|
+
content: x
|
|
2837
2863
|
}));
|
|
2838
2864
|
}
|
|
2839
|
-
|
|
2840
|
-
const [r,
|
|
2865
|
+
S(() => 0);
|
|
2866
|
+
const [r, l] = S(
|
|
2841
2867
|
() => !1
|
|
2842
|
-
), [
|
|
2868
|
+
), [d, s] = S(
|
|
2843
2869
|
() => e.contentWrapper || "div"
|
|
2844
2870
|
);
|
|
2845
|
-
function u(
|
|
2846
|
-
return
|
|
2871
|
+
function u(g) {
|
|
2872
|
+
return Je({
|
|
2847
2873
|
model: e.model,
|
|
2848
2874
|
trustedHosts: e.trustedHosts,
|
|
2849
2875
|
callbacks: {
|
|
2850
|
-
configureSdk: (
|
|
2851
|
-
var
|
|
2852
|
-
const { breakpoints:
|
|
2853
|
-
!
|
|
2876
|
+
configureSdk: (x) => {
|
|
2877
|
+
var C;
|
|
2878
|
+
const { breakpoints: v, contentId: k } = x;
|
|
2879
|
+
!k || k !== ((C = e.builderContextSignal.content) == null ? void 0 : C.id) || v && (a({
|
|
2854
2880
|
meta: {
|
|
2855
|
-
breakpoints:
|
|
2881
|
+
breakpoints: v
|
|
2856
2882
|
}
|
|
2857
2883
|
}), i(n + 1));
|
|
2858
2884
|
},
|
|
2859
|
-
animation: (
|
|
2860
|
-
|
|
2885
|
+
animation: (x) => {
|
|
2886
|
+
We(x);
|
|
2861
2887
|
},
|
|
2862
|
-
contentUpdate: (
|
|
2863
|
-
a(
|
|
2888
|
+
contentUpdate: (x) => {
|
|
2889
|
+
a(x), i(n + 1);
|
|
2864
2890
|
}
|
|
2865
2891
|
}
|
|
2866
|
-
})(
|
|
2892
|
+
})(g);
|
|
2867
2893
|
}
|
|
2868
|
-
function
|
|
2869
|
-
var
|
|
2870
|
-
const
|
|
2871
|
-
|
|
2872
|
-
code:
|
|
2894
|
+
function m() {
|
|
2895
|
+
var x, v;
|
|
2896
|
+
const g = (v = (x = e.builderContextSignal.content) == null ? void 0 : x.data) == null ? void 0 : v.jsCode;
|
|
2897
|
+
g && J({
|
|
2898
|
+
code: g,
|
|
2873
2899
|
context: e.context || {},
|
|
2874
2900
|
localState: void 0,
|
|
2875
2901
|
rootState: e.builderContextSignal.rootState,
|
|
2876
|
-
rootSetState: e.builderContextSignal.rootSetState
|
|
2902
|
+
rootSetState: e.builderContextSignal.rootSetState,
|
|
2903
|
+
/**
|
|
2904
|
+
* We don't want to cache the result of the JS code, since it's arbitrary side effect code.
|
|
2905
|
+
*/
|
|
2906
|
+
enableCache: !1
|
|
2877
2907
|
});
|
|
2878
2908
|
}
|
|
2879
|
-
const [
|
|
2880
|
-
function R(
|
|
2881
|
-
var
|
|
2909
|
+
const [h, b] = S(() => ({})), [y, T] = S(() => !1);
|
|
2910
|
+
function R(g) {
|
|
2911
|
+
var x, v;
|
|
2882
2912
|
if (e.builderContextSignal.content) {
|
|
2883
|
-
const
|
|
2884
|
-
|
|
2913
|
+
const k = (x = e.builderContextSignal.content) == null ? void 0 : x.testVariationId, C = (v = e.builderContextSignal.content) == null ? void 0 : v.id;
|
|
2914
|
+
be({
|
|
2885
2915
|
type: "click",
|
|
2886
|
-
canTrack:
|
|
2887
|
-
contentId:
|
|
2916
|
+
canTrack: ee(e.canTrack),
|
|
2917
|
+
contentId: C,
|
|
2888
2918
|
apiKey: e.apiKey,
|
|
2889
|
-
variationId:
|
|
2890
|
-
...
|
|
2891
|
-
unique: !
|
|
2919
|
+
variationId: k !== C ? k : void 0,
|
|
2920
|
+
...wn(g),
|
|
2921
|
+
unique: !y
|
|
2892
2922
|
});
|
|
2893
2923
|
}
|
|
2894
|
-
|
|
2924
|
+
y || T(!0);
|
|
2895
2925
|
}
|
|
2896
|
-
function B(
|
|
2897
|
-
return
|
|
2926
|
+
function B(g) {
|
|
2927
|
+
return g.replace(
|
|
2898
2928
|
/{{([^}]+)}}/g,
|
|
2899
|
-
(
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2929
|
+
(x, v) => String(
|
|
2930
|
+
J({
|
|
2931
|
+
code: v,
|
|
2932
|
+
context: e.context || {},
|
|
2933
|
+
localState: void 0,
|
|
2934
|
+
rootState: e.builderContextSignal.rootState,
|
|
2935
|
+
rootSetState: e.builderContextSignal.rootSetState,
|
|
2936
|
+
enableCache: !0
|
|
2937
|
+
})
|
|
2938
|
+
)
|
|
2906
2939
|
);
|
|
2907
2940
|
}
|
|
2908
|
-
function
|
|
2909
|
-
|
|
2910
|
-
var
|
|
2911
|
-
const
|
|
2941
|
+
function p({ url: g, key: x }) {
|
|
2942
|
+
Ye(g).then((v) => v.json()).then((v) => {
|
|
2943
|
+
var C, F;
|
|
2944
|
+
const k = {
|
|
2912
2945
|
...e.builderContextSignal.rootState,
|
|
2913
|
-
[
|
|
2946
|
+
[x]: v
|
|
2914
2947
|
};
|
|
2915
|
-
(F = (
|
|
2916
|
-
}).catch((
|
|
2917
|
-
console.error("error fetching dynamic data",
|
|
2948
|
+
(F = (C = e.builderContextSignal).rootSetState) == null || F.call(C, k), h[x] = !0;
|
|
2949
|
+
}).catch((v) => {
|
|
2950
|
+
console.error("error fetching dynamic data", g, v);
|
|
2918
2951
|
});
|
|
2919
2952
|
}
|
|
2920
|
-
function
|
|
2921
|
-
var
|
|
2922
|
-
const
|
|
2923
|
-
Object.entries(
|
|
2924
|
-
if (F && (!
|
|
2925
|
-
const
|
|
2926
|
-
|
|
2927
|
-
url:
|
|
2928
|
-
key:
|
|
2953
|
+
function w() {
|
|
2954
|
+
var x, v, k;
|
|
2955
|
+
const g = (k = (v = (x = e.builderContextSignal.content) == null ? void 0 : x.data) == null ? void 0 : v.httpRequests) != null ? k : {};
|
|
2956
|
+
Object.entries(g).forEach(([C, F]) => {
|
|
2957
|
+
if (F && (!h[C] || L())) {
|
|
2958
|
+
const U = B(F);
|
|
2959
|
+
p({
|
|
2960
|
+
url: U,
|
|
2961
|
+
key: C
|
|
2929
2962
|
});
|
|
2930
2963
|
}
|
|
2931
2964
|
});
|
|
2932
2965
|
}
|
|
2933
2966
|
function V() {
|
|
2934
|
-
|
|
2967
|
+
L() && window.dispatchEvent(
|
|
2935
2968
|
new CustomEvent(
|
|
2936
2969
|
"builder:component:stateChange",
|
|
2937
2970
|
{
|
|
2938
2971
|
detail: {
|
|
2939
|
-
state:
|
|
2972
|
+
state: se(e.builderContextSignal.rootState),
|
|
2940
2973
|
ref: {
|
|
2941
2974
|
name: e.model
|
|
2942
2975
|
}
|
|
@@ -2946,9 +2979,9 @@ function Sn(e) {
|
|
|
2946
2979
|
);
|
|
2947
2980
|
}
|
|
2948
2981
|
return W(() => {
|
|
2949
|
-
var
|
|
2950
|
-
if (
|
|
2951
|
-
if (
|
|
2982
|
+
var g, x;
|
|
2983
|
+
if (q()) {
|
|
2984
|
+
if (L() && (i(n + 1), window.addEventListener("message", u), Ke(), qe({
|
|
2952
2985
|
...e.locale ? {
|
|
2953
2986
|
locale: e.locale
|
|
2954
2987
|
} : {},
|
|
@@ -2960,48 +2993,48 @@ function Sn(e) {
|
|
|
2960
2993
|
} : {}
|
|
2961
2994
|
}), Object.values(
|
|
2962
2995
|
e.builderContextSignal.componentInfos
|
|
2963
|
-
).forEach((
|
|
2996
|
+
).forEach((k) => {
|
|
2964
2997
|
var F;
|
|
2965
|
-
const
|
|
2966
|
-
(F = window.parent) == null || F.postMessage(
|
|
2998
|
+
const C = _e(k);
|
|
2999
|
+
(F = window.parent) == null || F.postMessage(C, "*");
|
|
2967
3000
|
}), window.addEventListener(
|
|
2968
3001
|
"builder:component:stateChangeListenerActivated",
|
|
2969
3002
|
V
|
|
2970
|
-
)), e.builderContextSignal.content &&
|
|
2971
|
-
const
|
|
2972
|
-
|
|
3003
|
+
)), e.builderContextSignal.content && ee(e.canTrack)) {
|
|
3004
|
+
const k = (g = e.builderContextSignal.content) == null ? void 0 : g.testVariationId, C = (x = e.builderContextSignal.content) == null ? void 0 : x.id, F = e.apiKey;
|
|
3005
|
+
be({
|
|
2973
3006
|
type: "impression",
|
|
2974
3007
|
canTrack: !0,
|
|
2975
|
-
contentId:
|
|
3008
|
+
contentId: C,
|
|
2976
3009
|
apiKey: F,
|
|
2977
|
-
variationId:
|
|
3010
|
+
variationId: k !== C ? k : void 0
|
|
2978
3011
|
});
|
|
2979
3012
|
}
|
|
2980
|
-
if (
|
|
2981
|
-
const
|
|
2982
|
-
`builder.preview.${
|
|
2983
|
-
),
|
|
2984
|
-
|
|
3013
|
+
if (ze()) {
|
|
3014
|
+
const k = new URL(location.href).searchParams, C = k.get("builder.preview"), F = k.get(
|
|
3015
|
+
`builder.preview.${C}`
|
|
3016
|
+
), U = k.get("apiKey") || k.get("builder.space");
|
|
3017
|
+
C === e.model && U === e.apiKey && (!e.content || F === e.content.id) && Ee({
|
|
2985
3018
|
model: e.model,
|
|
2986
3019
|
apiKey: e.apiKey,
|
|
2987
3020
|
apiVersion: e.builderContextSignal.apiVersion
|
|
2988
|
-
}).then((
|
|
2989
|
-
|
|
3021
|
+
}).then((Q) => {
|
|
3022
|
+
Q && a(Q);
|
|
2990
3023
|
});
|
|
2991
3024
|
}
|
|
2992
3025
|
}
|
|
2993
3026
|
}, []), W(() => {
|
|
2994
3027
|
e.apiKey || _.error(
|
|
2995
3028
|
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
2996
|
-
),
|
|
3029
|
+
), m(), w(), V();
|
|
2997
3030
|
}, []), W(() => {
|
|
2998
3031
|
e.content && a(e.content);
|
|
2999
3032
|
}, [e.content]), W(() => {
|
|
3000
3033
|
}, [r]), W(() => {
|
|
3001
|
-
|
|
3002
|
-
}, [(
|
|
3003
|
-
|
|
3004
|
-
}, [(
|
|
3034
|
+
m();
|
|
3035
|
+
}, [(M = (P = e.builderContextSignal.content) == null ? void 0 : P.data) == null ? void 0 : M.jsCode]), W(() => {
|
|
3036
|
+
w();
|
|
3037
|
+
}, [(f = (O = e.builderContextSignal.content) == null ? void 0 : O.data) == null ? void 0 : f.httpRequests]), W(() => {
|
|
3005
3038
|
V();
|
|
3006
3039
|
}, [e.builderContextSignal.rootState]), W(() => {
|
|
3007
3040
|
e.data && o(e.data);
|
|
@@ -3010,29 +3043,29 @@ function Sn(e) {
|
|
|
3010
3043
|
locale: e.locale
|
|
3011
3044
|
});
|
|
3012
3045
|
}, [e.locale]), W(() => () => {
|
|
3013
|
-
|
|
3046
|
+
q() && (window.removeEventListener("message", u), window.removeEventListener(
|
|
3014
3047
|
"builder:component:stateChangeListenerActivated",
|
|
3015
3048
|
V
|
|
3016
3049
|
));
|
|
3017
|
-
}, []), /* @__PURE__ */
|
|
3018
|
-
|
|
3050
|
+
}, []), /* @__PURE__ */ c(ue.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ ce(
|
|
3051
|
+
d,
|
|
3019
3052
|
{
|
|
3020
3053
|
key: n,
|
|
3021
3054
|
ref: t,
|
|
3022
|
-
onClick: (
|
|
3023
|
-
"builder-content-id": (
|
|
3055
|
+
onClick: (g) => R(g),
|
|
3056
|
+
"builder-content-id": (I = e.builderContextSignal.content) == null ? void 0 : I.id,
|
|
3024
3057
|
"builder-model": e.model,
|
|
3025
3058
|
...e.showContent ? {} : {
|
|
3026
3059
|
hidden: !0,
|
|
3027
3060
|
"aria-hidden": !0
|
|
3028
3061
|
},
|
|
3029
3062
|
...e.contentWrapperProps,
|
|
3030
|
-
className: `variant-${((
|
|
3063
|
+
className: `variant-${(($ = e.content) == null ? void 0 : $.testVariationId) || ((A = e.content) == null ? void 0 : A.id)}`
|
|
3031
3064
|
},
|
|
3032
3065
|
e.children
|
|
3033
|
-
)
|
|
3066
|
+
) : null });
|
|
3034
3067
|
}
|
|
3035
|
-
const
|
|
3068
|
+
const Tn = (e) => {
|
|
3036
3069
|
var a, r;
|
|
3037
3070
|
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (r = e.fileUrl) != null ? r : (a = e == null ? void 0 : e.files) == null ? void 0 : a.regular;
|
|
3038
3071
|
let o = "";
|
|
@@ -3044,37 +3077,37 @@ font-display: fallback;
|
|
|
3044
3077
|
font-weight: 400;
|
|
3045
3078
|
}
|
|
3046
3079
|
`.trim()), e.files)
|
|
3047
|
-
for (const
|
|
3048
|
-
if (!(String(Number(
|
|
3080
|
+
for (const l in e.files) {
|
|
3081
|
+
if (!(String(Number(l)) === l))
|
|
3049
3082
|
continue;
|
|
3050
|
-
const
|
|
3051
|
-
|
|
3083
|
+
const s = e.files[l];
|
|
3084
|
+
s && s !== i && (o += `
|
|
3052
3085
|
@font-face {
|
|
3053
3086
|
font-family: "${t}";
|
|
3054
|
-
src: url('${
|
|
3087
|
+
src: url('${s}') format('woff2');
|
|
3055
3088
|
font-display: fallback;
|
|
3056
|
-
font-weight: ${
|
|
3089
|
+
font-weight: ${l};
|
|
3057
3090
|
}
|
|
3058
3091
|
`.trim());
|
|
3059
3092
|
}
|
|
3060
3093
|
return o;
|
|
3061
|
-
},
|
|
3094
|
+
}, En = ({
|
|
3062
3095
|
customFonts: e
|
|
3063
3096
|
}) => {
|
|
3064
3097
|
var t;
|
|
3065
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
3066
|
-
},
|
|
3098
|
+
return ((t = e == null ? void 0 : e.map((n) => Tn(n))) == null ? void 0 : t.join(" ")) || "";
|
|
3099
|
+
}, Rn = ({
|
|
3067
3100
|
cssCode: e,
|
|
3068
3101
|
contentId: t
|
|
3069
3102
|
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
|
|
3070
|
-
function
|
|
3071
|
-
const [t, n] =
|
|
3103
|
+
function Pn(e) {
|
|
3104
|
+
const [t, n] = S(
|
|
3072
3105
|
() => `
|
|
3073
|
-
${
|
|
3106
|
+
${Rn({
|
|
3074
3107
|
cssCode: e.cssCode,
|
|
3075
3108
|
contentId: e.contentId
|
|
3076
3109
|
})}
|
|
3077
|
-
${
|
|
3110
|
+
${En({
|
|
3078
3111
|
customFonts: e.customFonts
|
|
3079
3112
|
})}
|
|
3080
3113
|
|
|
@@ -3096,17 +3129,17 @@ ${kn({
|
|
|
3096
3129
|
}
|
|
3097
3130
|
`.trim()
|
|
3098
3131
|
);
|
|
3099
|
-
return /* @__PURE__ */
|
|
3132
|
+
return /* @__PURE__ */ c(ie, { styles: t });
|
|
3100
3133
|
}
|
|
3101
|
-
const
|
|
3134
|
+
const Vn = ({
|
|
3102
3135
|
content: e,
|
|
3103
3136
|
data: t,
|
|
3104
3137
|
locale: n
|
|
3105
3138
|
}) => {
|
|
3106
|
-
var a, r,
|
|
3139
|
+
var a, r, l;
|
|
3107
3140
|
const i = {}, o = ((a = e == null ? void 0 : e.data) == null ? void 0 : a.state) || {};
|
|
3108
|
-
return (
|
|
3109
|
-
|
|
3141
|
+
return (l = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || l.forEach((d) => {
|
|
3142
|
+
d.name && d.defaultValue !== void 0 && (i[d.name] = d.defaultValue);
|
|
3110
3143
|
}), {
|
|
3111
3144
|
...i,
|
|
3112
3145
|
...o,
|
|
@@ -3115,7 +3148,7 @@ const In = ({
|
|
|
3115
3148
|
locale: n
|
|
3116
3149
|
} : {}
|
|
3117
3150
|
};
|
|
3118
|
-
},
|
|
3151
|
+
}, Bn = ({
|
|
3119
3152
|
content: e,
|
|
3120
3153
|
data: t
|
|
3121
3154
|
}) => e ? {
|
|
@@ -3126,46 +3159,46 @@ const In = ({
|
|
|
3126
3159
|
},
|
|
3127
3160
|
meta: e == null ? void 0 : e.meta
|
|
3128
3161
|
} : void 0;
|
|
3129
|
-
function
|
|
3130
|
-
var
|
|
3131
|
-
const [t, n] =
|
|
3162
|
+
function Te(e) {
|
|
3163
|
+
var d, s, u, m, h, b, y;
|
|
3164
|
+
const [t, n] = S(
|
|
3132
3165
|
() => {
|
|
3133
|
-
var
|
|
3134
|
-
return
|
|
3166
|
+
var T, R;
|
|
3167
|
+
return vn({
|
|
3135
3168
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3136
|
-
variationId: (
|
|
3169
|
+
variationId: (T = e.content) == null ? void 0 : T.testVariationId,
|
|
3137
3170
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3138
3171
|
contentId: (R = e.content) == null ? void 0 : R.id
|
|
3139
3172
|
});
|
|
3140
3173
|
}
|
|
3141
3174
|
);
|
|
3142
|
-
function i(
|
|
3143
|
-
|
|
3175
|
+
function i(T) {
|
|
3176
|
+
l((R) => ({
|
|
3144
3177
|
...R,
|
|
3145
|
-
rootState:
|
|
3178
|
+
rootState: T
|
|
3146
3179
|
}));
|
|
3147
3180
|
}
|
|
3148
|
-
const [o, a] =
|
|
3181
|
+
const [o, a] = S(
|
|
3149
3182
|
() => [
|
|
3150
|
-
...
|
|
3183
|
+
...Ce(),
|
|
3151
3184
|
...e.customComponents || []
|
|
3152
3185
|
].reduce(
|
|
3153
|
-
(
|
|
3154
|
-
...
|
|
3186
|
+
(T, { component: R, ...B }) => ({
|
|
3187
|
+
...T,
|
|
3155
3188
|
[B.name]: {
|
|
3156
3189
|
component: R,
|
|
3157
|
-
...
|
|
3190
|
+
...ye(B)
|
|
3158
3191
|
}
|
|
3159
3192
|
}),
|
|
3160
3193
|
{}
|
|
3161
3194
|
)
|
|
3162
|
-
), [r,
|
|
3163
|
-
content:
|
|
3195
|
+
), [r, l] = S(() => ({
|
|
3196
|
+
content: Bn({
|
|
3164
3197
|
content: e.content,
|
|
3165
3198
|
data: e.data
|
|
3166
3199
|
}),
|
|
3167
3200
|
localState: void 0,
|
|
3168
|
-
rootState:
|
|
3201
|
+
rootState: Vn({
|
|
3169
3202
|
content: e.content,
|
|
3170
3203
|
data: e.data,
|
|
3171
3204
|
locale: e.locale
|
|
@@ -3175,12 +3208,12 @@ function Ce(e) {
|
|
|
3175
3208
|
apiKey: e.apiKey,
|
|
3176
3209
|
apiVersion: e.apiVersion,
|
|
3177
3210
|
componentInfos: [
|
|
3178
|
-
...
|
|
3211
|
+
...Ce(),
|
|
3179
3212
|
...e.customComponents || []
|
|
3180
3213
|
].reduce(
|
|
3181
|
-
(
|
|
3182
|
-
...
|
|
3183
|
-
[B.name]:
|
|
3214
|
+
(T, { component: R, ...B }) => ({
|
|
3215
|
+
...T,
|
|
3216
|
+
[B.name]: ye(B)
|
|
3184
3217
|
}),
|
|
3185
3218
|
{}
|
|
3186
3219
|
),
|
|
@@ -3188,14 +3221,14 @@ function Ce(e) {
|
|
|
3188
3221
|
BlocksWrapper: e.blocksWrapper || "div",
|
|
3189
3222
|
BlocksWrapperProps: e.blocksWrapperProps || {}
|
|
3190
3223
|
}));
|
|
3191
|
-
return /* @__PURE__ */
|
|
3192
|
-
|
|
3224
|
+
return /* @__PURE__ */ c(
|
|
3225
|
+
Pe.Provider,
|
|
3193
3226
|
{
|
|
3194
3227
|
value: {
|
|
3195
3228
|
registeredComponents: o
|
|
3196
3229
|
},
|
|
3197
3230
|
children: /* @__PURE__ */ N(
|
|
3198
|
-
|
|
3231
|
+
In,
|
|
3199
3232
|
{
|
|
3200
3233
|
content: e.content,
|
|
3201
3234
|
data: e.data,
|
|
@@ -3211,21 +3244,21 @@ function Ce(e) {
|
|
|
3211
3244
|
contentWrapperProps: e.contentWrapperProps,
|
|
3212
3245
|
linkComponent: e.linkComponent,
|
|
3213
3246
|
trustedHosts: e.trustedHosts,
|
|
3214
|
-
setBuilderContextSignal:
|
|
3247
|
+
setBuilderContextSignal: l,
|
|
3215
3248
|
children: [
|
|
3216
|
-
e.isSsrAbTest ? /* @__PURE__ */
|
|
3217
|
-
/* @__PURE__ */
|
|
3218
|
-
|
|
3249
|
+
e.isSsrAbTest ? /* @__PURE__ */ c(le, { scriptStr: t }) : null,
|
|
3250
|
+
/* @__PURE__ */ c(
|
|
3251
|
+
Pn,
|
|
3219
3252
|
{
|
|
3220
|
-
contentId: (
|
|
3221
|
-
cssCode: (u = (
|
|
3222
|
-
customFonts: (
|
|
3253
|
+
contentId: (d = r.content) == null ? void 0 : d.id,
|
|
3254
|
+
cssCode: (u = (s = r.content) == null ? void 0 : s.data) == null ? void 0 : u.cssCode,
|
|
3255
|
+
customFonts: (h = (m = r.content) == null ? void 0 : m.data) == null ? void 0 : h.customFonts
|
|
3223
3256
|
}
|
|
3224
|
-
)
|
|
3225
|
-
/* @__PURE__ */
|
|
3226
|
-
|
|
3257
|
+
),
|
|
3258
|
+
/* @__PURE__ */ c(
|
|
3259
|
+
K,
|
|
3227
3260
|
{
|
|
3228
|
-
blocks: (
|
|
3261
|
+
blocks: (y = (b = r.content) == null ? void 0 : b.data) == null ? void 0 : y.blocks,
|
|
3229
3262
|
context: r,
|
|
3230
3263
|
registeredComponents: o,
|
|
3231
3264
|
linkComponent: e.linkComponent
|
|
@@ -3237,53 +3270,53 @@ function Ce(e) {
|
|
|
3237
3270
|
}
|
|
3238
3271
|
);
|
|
3239
3272
|
}
|
|
3240
|
-
function
|
|
3241
|
-
var r,
|
|
3242
|
-
const [t, n] =
|
|
3243
|
-
() =>
|
|
3244
|
-
canTrack:
|
|
3273
|
+
function Wn(e) {
|
|
3274
|
+
var r, l;
|
|
3275
|
+
const [t, n] = S(
|
|
3276
|
+
() => yn({
|
|
3277
|
+
canTrack: ee(e.canTrack),
|
|
3245
3278
|
content: e.content
|
|
3246
3279
|
})
|
|
3247
3280
|
);
|
|
3248
3281
|
function i() {
|
|
3249
|
-
var
|
|
3250
|
-
return
|
|
3251
|
-
|
|
3252
|
-
id:
|
|
3253
|
-
testRatio:
|
|
3282
|
+
var d;
|
|
3283
|
+
return xn(
|
|
3284
|
+
X(e.content).map((s) => ({
|
|
3285
|
+
id: s.testVariationId,
|
|
3286
|
+
testRatio: s.testRatio
|
|
3254
3287
|
})),
|
|
3255
|
-
((
|
|
3288
|
+
((d = e.content) == null ? void 0 : d.id) || ""
|
|
3256
3289
|
);
|
|
3257
3290
|
}
|
|
3258
3291
|
function o() {
|
|
3259
|
-
return
|
|
3292
|
+
return X(e.content).map((d) => `.variant-${d.testVariationId} { display: none; } `).join("");
|
|
3260
3293
|
}
|
|
3261
3294
|
function a() {
|
|
3262
|
-
var
|
|
3295
|
+
var d;
|
|
3263
3296
|
return t ? {
|
|
3264
3297
|
...e.content,
|
|
3265
|
-
testVariationId: (
|
|
3266
|
-
} :
|
|
3298
|
+
testVariationId: (d = e.content) == null ? void 0 : d.id
|
|
3299
|
+
} : Ge({
|
|
3267
3300
|
item: e.content,
|
|
3268
|
-
canTrack:
|
|
3301
|
+
canTrack: ee(e.canTrack)
|
|
3269
3302
|
});
|
|
3270
3303
|
}
|
|
3271
3304
|
return W(() => {
|
|
3272
|
-
}, []), /* @__PURE__ */ N(
|
|
3273
|
-
!e.__isNestedRender &&
|
|
3274
|
-
t ? /* @__PURE__ */ N(
|
|
3275
|
-
/* @__PURE__ */
|
|
3276
|
-
|
|
3305
|
+
}, []), /* @__PURE__ */ N(E, { children: [
|
|
3306
|
+
!e.__isNestedRender && Y !== "reactNative" ? /* @__PURE__ */ c(le, { scriptStr: Sn() }) : null,
|
|
3307
|
+
t ? /* @__PURE__ */ N(E, { children: [
|
|
3308
|
+
/* @__PURE__ */ c(
|
|
3309
|
+
ie,
|
|
3277
3310
|
{
|
|
3278
3311
|
id: `variants-styles-${(r = e.content) == null ? void 0 : r.id}`,
|
|
3279
3312
|
styles: o()
|
|
3280
3313
|
}
|
|
3281
3314
|
),
|
|
3282
|
-
/* @__PURE__ */
|
|
3283
|
-
(
|
|
3284
|
-
|
|
3315
|
+
/* @__PURE__ */ c(le, { scriptStr: i() }),
|
|
3316
|
+
(l = X(e.content)) == null ? void 0 : l.map((d) => /* @__PURE__ */ c(
|
|
3317
|
+
Te,
|
|
3285
3318
|
{
|
|
3286
|
-
content:
|
|
3319
|
+
content: d,
|
|
3287
3320
|
showContent: !1,
|
|
3288
3321
|
model: e.model,
|
|
3289
3322
|
data: e.data,
|
|
@@ -3302,11 +3335,11 @@ function En(e) {
|
|
|
3302
3335
|
contentWrapperProps: e.contentWrapperProps,
|
|
3303
3336
|
trustedHosts: e.trustedHosts
|
|
3304
3337
|
},
|
|
3305
|
-
|
|
3338
|
+
d.testVariationId
|
|
3306
3339
|
))
|
|
3307
3340
|
] }) : null,
|
|
3308
|
-
/* @__PURE__ */
|
|
3309
|
-
|
|
3341
|
+
/* @__PURE__ */ c(
|
|
3342
|
+
Te,
|
|
3310
3343
|
{
|
|
3311
3344
|
content: a(),
|
|
3312
3345
|
showContent: !0,
|
|
@@ -3330,13 +3363,13 @@ function En(e) {
|
|
|
3330
3363
|
)
|
|
3331
3364
|
] });
|
|
3332
3365
|
}
|
|
3333
|
-
const
|
|
3366
|
+
const An = async ({
|
|
3334
3367
|
builderContextValue: e,
|
|
3335
3368
|
symbol: t
|
|
3336
3369
|
}) => {
|
|
3337
3370
|
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
3338
3371
|
(e != null && e.apiKey))
|
|
3339
|
-
return
|
|
3372
|
+
return Ee({
|
|
3340
3373
|
model: t.model,
|
|
3341
3374
|
apiKey: e.apiKey,
|
|
3342
3375
|
apiVersion: e.apiVersion,
|
|
@@ -3349,34 +3382,34 @@ const Rn = async ({
|
|
|
3349
3382
|
_.error("Could not fetch symbol content: ", n);
|
|
3350
3383
|
});
|
|
3351
3384
|
};
|
|
3352
|
-
function
|
|
3353
|
-
var a, r,
|
|
3385
|
+
function Fn(e) {
|
|
3386
|
+
var a, r, l, d;
|
|
3354
3387
|
function t() {
|
|
3355
|
-
var
|
|
3388
|
+
var s, u;
|
|
3356
3389
|
return [
|
|
3357
|
-
e.attributes[
|
|
3390
|
+
e.attributes[z()],
|
|
3358
3391
|
"builder-symbol",
|
|
3359
|
-
(
|
|
3392
|
+
(s = e.symbol) != null && s.inline ? "builder-inline-symbol" : void 0,
|
|
3360
3393
|
(u = e.symbol) != null && u.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
3361
3394
|
].filter(Boolean).join(" ");
|
|
3362
3395
|
}
|
|
3363
|
-
const [n, i] =
|
|
3364
|
-
var
|
|
3365
|
-
return (
|
|
3396
|
+
const [n, i] = S(() => {
|
|
3397
|
+
var s;
|
|
3398
|
+
return (s = e.symbol) == null ? void 0 : s.content;
|
|
3366
3399
|
});
|
|
3367
3400
|
function o() {
|
|
3368
|
-
n ||
|
|
3401
|
+
n || An({
|
|
3369
3402
|
symbol: e.symbol,
|
|
3370
3403
|
builderContextValue: e.builderContext
|
|
3371
|
-
}).then((
|
|
3372
|
-
|
|
3404
|
+
}).then((s) => {
|
|
3405
|
+
s && i(s);
|
|
3373
3406
|
});
|
|
3374
3407
|
}
|
|
3375
3408
|
return W(() => {
|
|
3376
3409
|
}, []), W(() => {
|
|
3377
3410
|
o();
|
|
3378
|
-
}, [e.symbol]), /* @__PURE__ */
|
|
3379
|
-
|
|
3411
|
+
}, [e.symbol]), /* @__PURE__ */ c("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ c(
|
|
3412
|
+
Wn,
|
|
3380
3413
|
{
|
|
3381
3414
|
__isNestedRender: !0,
|
|
3382
3415
|
apiVersion: e.builderContext.apiVersion,
|
|
@@ -3389,9 +3422,9 @@ function Pn(e) {
|
|
|
3389
3422
|
data: {
|
|
3390
3423
|
...(r = e.symbol) == null ? void 0 : r.data,
|
|
3391
3424
|
...e.builderContext.localState,
|
|
3392
|
-
...(
|
|
3425
|
+
...(l = n == null ? void 0 : n.data) == null ? void 0 : l.state
|
|
3393
3426
|
},
|
|
3394
|
-
model: (
|
|
3427
|
+
model: (d = e.symbol) == null ? void 0 : d.model,
|
|
3395
3428
|
content: n,
|
|
3396
3429
|
linkComponent: e.builderLinkComponent,
|
|
3397
3430
|
blocksWrapper: "div",
|
|
@@ -3400,14 +3433,14 @@ function Pn(e) {
|
|
|
3400
3433
|
) });
|
|
3401
3434
|
}
|
|
3402
3435
|
export {
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3436
|
+
K as Blocks,
|
|
3437
|
+
Ze as Button,
|
|
3438
|
+
Vt as Columns,
|
|
3439
|
+
Wn as Content,
|
|
3440
|
+
Bt as Fragment,
|
|
3441
|
+
Ft as Image,
|
|
3442
|
+
Nt as Section,
|
|
3443
|
+
Fn as Symbol,
|
|
3444
|
+
qt as Text,
|
|
3445
|
+
fn as Video
|
|
3413
3446
|
};
|