@builder.io/sdk-react-nextjs 0.12.5 → 0.12.7
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/{node/USE_CLIENT_BUNDLE-4ba4594d.js → browser/USE_CLIENT_BUNDLE-456ca2b5.js} +46 -45
- package/lib/browser/{USE_CLIENT_BUNDLE-70be4cc5.cjs → USE_CLIENT_BUNDLE-9d2b983d.cjs} +2 -2
- package/lib/{edge/USE_SERVER_BUNDLE-36de460d.js → browser/USE_SERVER_BUNDLE-e0f1c15b.js} +1 -1
- package/lib/{edge/USE_SERVER_BUNDLE-50c2f18b.cjs → browser/USE_SERVER_BUNDLE-ee4a5d19.cjs} +1 -1
- package/lib/browser/{bundle-f9f52242.js → bundle-56e0b400.js} +499 -439
- package/lib/browser/{bundle-bd9886c9.cjs → bundle-a408994f.cjs} +21 -21
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +6 -6
- package/lib/{browser/USE_CLIENT_BUNDLE-7492ecd8.js → edge/USE_CLIENT_BUNDLE-789e694f.js} +46 -45
- package/lib/{node/USE_CLIENT_BUNDLE-2f43c320.cjs → edge/USE_CLIENT_BUNDLE-a6a0becc.cjs} +2 -2
- package/lib/{node/USE_SERVER_BUNDLE-473d50ad.cjs → edge/USE_SERVER_BUNDLE-dbf92938.cjs} +1 -1
- package/lib/{node/USE_SERVER_BUNDLE-2534ef71.js → edge/USE_SERVER_BUNDLE-dffaa191.js} +1 -1
- package/lib/edge/{bundle-765860e3.js → bundle-4bf88f38.js} +812 -752
- package/lib/edge/{bundle-71cfdd3e.cjs → bundle-97ad81d1.cjs} +32 -32
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +6 -6
- package/lib/{edge/USE_CLIENT_BUNDLE-cb840c0f.js → node/USE_CLIENT_BUNDLE-499aeaa2.js} +46 -45
- package/lib/{edge/USE_CLIENT_BUNDLE-1148158d.cjs → node/USE_CLIENT_BUNDLE-b2f9be29.cjs} +2 -2
- package/lib/{browser/USE_SERVER_BUNDLE-875d4629.cjs → node/USE_SERVER_BUNDLE-b3ad9a89.cjs} +1 -1
- package/lib/{browser/USE_SERVER_BUNDLE-fe386ed3.js → node/USE_SERVER_BUNDLE-e3da6caa.js} +1 -1
- package/lib/node/{bundle-1c54df65.cjs → bundle-97b4832a.cjs} +4 -4
- package/lib/node/{bundle-305bb463.js → bundle-d3f89e99.js} +228 -168
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +6 -6
- package/package.json +1 -1
- package/types/cjs/components/block/animator.d.ts +5 -0
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/functions/evaluate/browser-runtime/browser.d.ts +5 -1
- package/types/cjs/types/builder-block.d.ts +18 -1
- package/types/esm/components/block/animator.d.ts +5 -0
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/functions/evaluate/browser-runtime/browser.d.ts +5 -1
- package/types/esm/types/builder-block.d.ts +18 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { LRUCache as
|
|
2
|
-
import { jsx as l, Fragment as
|
|
3
|
-
import { I as
|
|
1
|
+
import { LRUCache as Ve } from "lru-cache";
|
|
2
|
+
import { jsx as l, Fragment as S, jsxs as R } from "react/jsx-runtime";
|
|
3
|
+
import { I as $e, B as We, a as Oe, D as Ne, b as Fe, C as Le, E as Ue, F as _e, c as De, d as Me, S as je, V as He, e as Ke } from "./USE_CLIENT_BUNDLE-456ca2b5.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "next/navigation";
|
|
6
|
-
const
|
|
6
|
+
const ze = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), Zn = (e) => typeof e == "string" && ze.has(e.toLowerCase()), I = "rsc", M = () => {
|
|
7
7
|
switch (I) {
|
|
8
8
|
case "react":
|
|
9
9
|
case "reactNative":
|
|
@@ -16,7 +16,7 @@ const He = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr",
|
|
|
16
16
|
return "class";
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
-
function
|
|
19
|
+
function qe(e) {
|
|
20
20
|
var t;
|
|
21
21
|
return {
|
|
22
22
|
...(t = e.component) == null ? void 0 : t.options,
|
|
@@ -27,29 +27,29 @@ function Ke(e) {
|
|
|
27
27
|
builderBlock: e
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
const
|
|
31
|
-
log: (...e) => console.log(
|
|
32
|
-
error: (...e) => console.error(
|
|
33
|
-
warn: (...e) => console.warn(
|
|
34
|
-
debug: (...e) => console.debug(
|
|
30
|
+
const P = "[Builder.io]: ", x = {
|
|
31
|
+
log: (...e) => console.log(P, ...e),
|
|
32
|
+
error: (...e) => console.error(P, ...e),
|
|
33
|
+
warn: (...e) => console.warn(P, ...e),
|
|
34
|
+
debug: (...e) => console.debug(P, ...e)
|
|
35
35
|
};
|
|
36
|
-
function
|
|
36
|
+
function k() {
|
|
37
37
|
return typeof window < "u" && typeof document < "u";
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
return
|
|
39
|
+
function Ge() {
|
|
40
|
+
return k() && window.self !== window.top;
|
|
41
41
|
}
|
|
42
42
|
function j() {
|
|
43
|
-
return
|
|
43
|
+
return Ge() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
44
44
|
}
|
|
45
|
-
const
|
|
46
|
-
if (
|
|
45
|
+
const Ye = () => {
|
|
46
|
+
if (k()) {
|
|
47
47
|
const e = new URL(location.href);
|
|
48
48
|
return e.pathname === "" && (e.pathname = "/"), e;
|
|
49
49
|
} else
|
|
50
50
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
51
|
-
},
|
|
52
|
-
const e =
|
|
51
|
+
}, Je = () => typeof navigator == "object" && navigator.userAgent || "", le = () => {
|
|
52
|
+
const e = Je(), t = {
|
|
53
53
|
Android() {
|
|
54
54
|
return e.match(/Android/i);
|
|
55
55
|
},
|
|
@@ -68,13 +68,13 @@ const qe = () => {
|
|
|
68
68
|
any() {
|
|
69
69
|
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || I === "reactNative";
|
|
70
70
|
}
|
|
71
|
-
}, n = e.match(/Tablet|iPad/i), o =
|
|
71
|
+
}, n = e.match(/Tablet|iPad/i), o = Ye();
|
|
72
72
|
return {
|
|
73
73
|
urlPath: o == null ? void 0 : o.pathname,
|
|
74
74
|
host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
|
|
75
75
|
device: n ? "tablet" : t.any() ? "mobile" : "desktop"
|
|
76
76
|
};
|
|
77
|
-
},
|
|
77
|
+
}, Qe = ({
|
|
78
78
|
builder: e,
|
|
79
79
|
context: t,
|
|
80
80
|
event: n,
|
|
@@ -86,12 +86,12 @@ const qe = () => {
|
|
|
86
86
|
builder: e,
|
|
87
87
|
context: t,
|
|
88
88
|
event: n
|
|
89
|
-
}),
|
|
89
|
+
}), Xe = () => ({
|
|
90
90
|
isEditing: j(),
|
|
91
|
-
isBrowser:
|
|
92
|
-
isServer: !
|
|
93
|
-
getUserAttributes: () =>
|
|
94
|
-
}),
|
|
91
|
+
isBrowser: k(),
|
|
92
|
+
isServer: !k(),
|
|
93
|
+
getUserAttributes: () => le()
|
|
94
|
+
}), Ze = (e, {
|
|
95
95
|
isExpression: t = !0
|
|
96
96
|
}) => /* 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, G = ({
|
|
97
97
|
code: e,
|
|
@@ -99,67 +99,84 @@ const qe = () => {
|
|
|
99
99
|
context: n,
|
|
100
100
|
event: o,
|
|
101
101
|
localState: i,
|
|
102
|
-
rootSetState:
|
|
103
|
-
rootState:
|
|
102
|
+
rootSetState: r,
|
|
103
|
+
rootState: a
|
|
104
104
|
}) => {
|
|
105
|
-
const s =
|
|
105
|
+
const s = Qe({
|
|
106
106
|
builder: t,
|
|
107
107
|
context: n,
|
|
108
108
|
event: o,
|
|
109
|
-
state:
|
|
109
|
+
state: de({
|
|
110
|
+
rootState: a,
|
|
111
|
+
localState: i,
|
|
112
|
+
rootSetState: r
|
|
113
|
+
})
|
|
110
114
|
});
|
|
111
115
|
return new Function(...s.map(([c]) => c), e)(...s.map(([, c]) => c));
|
|
112
116
|
};
|
|
113
|
-
function
|
|
114
|
-
|
|
115
|
-
|
|
117
|
+
function de({
|
|
118
|
+
rootState: e,
|
|
119
|
+
localState: t,
|
|
120
|
+
rootSetState: n
|
|
121
|
+
}) {
|
|
116
122
|
return new Proxy(e, {
|
|
117
|
-
get: (o, i) =>
|
|
118
|
-
|
|
123
|
+
get: (o, i) => {
|
|
124
|
+
if (t && i in t)
|
|
125
|
+
return t[i];
|
|
126
|
+
const r = o[i];
|
|
127
|
+
return typeof r == "object" ? de({
|
|
128
|
+
rootState: r,
|
|
129
|
+
localState: void 0,
|
|
130
|
+
rootSetState: n ? (a) => {
|
|
131
|
+
o[i] = a, n(o);
|
|
132
|
+
} : void 0
|
|
133
|
+
}) : r;
|
|
134
|
+
},
|
|
135
|
+
set: (o, i, r) => {
|
|
119
136
|
if (t && i in t)
|
|
120
137
|
throw new Error("Writing to local state is not allowed as it is read-only.");
|
|
121
|
-
return
|
|
138
|
+
return o[i] = r, n == null || n(o), !0;
|
|
122
139
|
}
|
|
123
140
|
});
|
|
124
141
|
}
|
|
125
142
|
const C = (e) => e != null;
|
|
126
|
-
function
|
|
143
|
+
function et() {
|
|
127
144
|
var e;
|
|
128
145
|
return typeof process < "u" && C((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
|
|
129
146
|
}
|
|
130
|
-
const
|
|
147
|
+
const tt = () => {
|
|
131
148
|
var o;
|
|
132
|
-
if (!
|
|
149
|
+
if (!et())
|
|
133
150
|
return !1;
|
|
134
151
|
const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (o = process.env.NODE_OPTIONS) == null ? void 0 : o.includes("--no-node-snapshot");
|
|
135
152
|
return e && t && !n ? (x.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;
|
|
136
|
-
},
|
|
153
|
+
}, nt = (e) => (k() || tt(), G(e));
|
|
137
154
|
function H({
|
|
138
155
|
code: e,
|
|
139
156
|
context: t,
|
|
140
157
|
localState: n,
|
|
141
158
|
rootState: o,
|
|
142
159
|
rootSetState: i,
|
|
143
|
-
event:
|
|
144
|
-
isExpression:
|
|
160
|
+
event: r,
|
|
161
|
+
isExpression: a = !0
|
|
145
162
|
}) {
|
|
146
163
|
if (e === "") {
|
|
147
164
|
x.warn("Skipping evaluation of empty code block.");
|
|
148
165
|
return;
|
|
149
166
|
}
|
|
150
167
|
const s = {
|
|
151
|
-
code:
|
|
152
|
-
isExpression:
|
|
168
|
+
code: Ze(e, {
|
|
169
|
+
isExpression: a
|
|
153
170
|
}),
|
|
154
|
-
builder:
|
|
171
|
+
builder: Xe(),
|
|
155
172
|
context: t,
|
|
156
|
-
event:
|
|
173
|
+
event: r,
|
|
157
174
|
rootSetState: i,
|
|
158
175
|
rootState: o,
|
|
159
176
|
localState: n
|
|
160
177
|
};
|
|
161
178
|
try {
|
|
162
|
-
return
|
|
179
|
+
return nt(s);
|
|
163
180
|
} catch (c) {
|
|
164
181
|
x.error("Failed code evaluation: " + c.message, {
|
|
165
182
|
code: e
|
|
@@ -167,13 +184,13 @@ function H({
|
|
|
167
184
|
return;
|
|
168
185
|
}
|
|
169
186
|
}
|
|
170
|
-
const
|
|
187
|
+
const W = (e) => JSON.parse(JSON.stringify(e)), ot = (e, t, n) => {
|
|
171
188
|
if (Object(e) !== e)
|
|
172
189
|
return e;
|
|
173
190
|
const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
174
|
-
return o.slice(0, -1).reduce((i,
|
|
191
|
+
return o.slice(0, -1).reduce((i, r, a) => Object(i[r]) === i[r] ? i[r] : i[r] = Math.abs(Number(o[a + 1])) >> 0 === +o[a + 1] ? [] : {}, e)[o[o.length - 1]] = n, e;
|
|
175
192
|
};
|
|
176
|
-
const
|
|
193
|
+
const it = ({
|
|
177
194
|
block: e,
|
|
178
195
|
context: t,
|
|
179
196
|
localState: n,
|
|
@@ -182,13 +199,13 @@ const ot = ({
|
|
|
182
199
|
}) => {
|
|
183
200
|
if (!e.bindings)
|
|
184
201
|
return e;
|
|
185
|
-
const
|
|
186
|
-
...
|
|
202
|
+
const r = W(e), a = {
|
|
203
|
+
...r,
|
|
187
204
|
properties: {
|
|
188
|
-
...
|
|
205
|
+
...r.properties
|
|
189
206
|
},
|
|
190
207
|
actions: {
|
|
191
|
-
...
|
|
208
|
+
...r.actions
|
|
192
209
|
}
|
|
193
210
|
};
|
|
194
211
|
for (const s in e.bindings) {
|
|
@@ -199,41 +216,41 @@ const ot = ({
|
|
|
199
216
|
rootSetState: i,
|
|
200
217
|
context: t
|
|
201
218
|
});
|
|
202
|
-
|
|
219
|
+
ot(a, s, m);
|
|
203
220
|
}
|
|
204
|
-
return
|
|
221
|
+
return a;
|
|
205
222
|
};
|
|
206
|
-
function
|
|
223
|
+
function $({
|
|
207
224
|
block: e,
|
|
208
225
|
context: t,
|
|
209
226
|
shouldEvaluateBindings: n,
|
|
210
227
|
localState: o,
|
|
211
228
|
rootState: i,
|
|
212
|
-
rootSetState:
|
|
229
|
+
rootSetState: r
|
|
213
230
|
}) {
|
|
214
|
-
const
|
|
215
|
-
return n ?
|
|
216
|
-
block:
|
|
231
|
+
const a = e;
|
|
232
|
+
return n ? it({
|
|
233
|
+
block: a,
|
|
217
234
|
localState: o,
|
|
218
235
|
rootState: i,
|
|
219
|
-
rootSetState:
|
|
236
|
+
rootSetState: r,
|
|
220
237
|
context: t
|
|
221
|
-
}) :
|
|
238
|
+
}) : a;
|
|
222
239
|
}
|
|
223
|
-
const
|
|
240
|
+
const rt = ({
|
|
224
241
|
block: e,
|
|
225
242
|
context: t,
|
|
226
243
|
registeredComponents: n
|
|
227
244
|
}) => {
|
|
228
|
-
var
|
|
229
|
-
const o = (
|
|
245
|
+
var r;
|
|
246
|
+
const o = (r = $({
|
|
230
247
|
block: e,
|
|
231
248
|
localState: t.localState,
|
|
232
249
|
rootState: t.rootState,
|
|
233
250
|
rootSetState: t.rootSetState,
|
|
234
251
|
context: t.context,
|
|
235
252
|
shouldEvaluateBindings: !1
|
|
236
|
-
}).component) == null ? void 0 :
|
|
253
|
+
}).component) == null ? void 0 : r.name;
|
|
237
254
|
if (!o)
|
|
238
255
|
return null;
|
|
239
256
|
const i = n[o];
|
|
@@ -261,7 +278,7 @@ const it = ({
|
|
|
261
278
|
});
|
|
262
279
|
if (!Array.isArray(i))
|
|
263
280
|
return;
|
|
264
|
-
const
|
|
281
|
+
const r = n.collection.split(".").pop(), a = n.itemName || (r ? r + "Item" : "item");
|
|
265
282
|
return i.map((c, m) => ({
|
|
266
283
|
context: {
|
|
267
284
|
...t,
|
|
@@ -269,13 +286,13 @@ const it = ({
|
|
|
269
286
|
...t.localState,
|
|
270
287
|
$index: m,
|
|
271
288
|
$item: c,
|
|
272
|
-
[
|
|
273
|
-
[`$${
|
|
289
|
+
[a]: c,
|
|
290
|
+
[`$${a}Index`]: m
|
|
274
291
|
}
|
|
275
292
|
},
|
|
276
293
|
block: o
|
|
277
294
|
}));
|
|
278
|
-
},
|
|
295
|
+
}, ue = {
|
|
279
296
|
small: {
|
|
280
297
|
min: 320,
|
|
281
298
|
default: 321,
|
|
@@ -291,11 +308,11 @@ const it = ({
|
|
|
291
308
|
default: 991,
|
|
292
309
|
max: 1200
|
|
293
310
|
}
|
|
294
|
-
}, Y = (e, t =
|
|
311
|
+
}, Y = (e, t = ue) => `@media (max-width: ${t[e].max}px)`, me = ({
|
|
295
312
|
small: e,
|
|
296
313
|
medium: t
|
|
297
314
|
}) => {
|
|
298
|
-
const n =
|
|
315
|
+
const n = W(ue);
|
|
299
316
|
if (!e || !t)
|
|
300
317
|
return n;
|
|
301
318
|
const o = Math.floor(e / 2);
|
|
@@ -310,24 +327,24 @@ const it = ({
|
|
|
310
327
|
min: i,
|
|
311
328
|
default: i + 1
|
|
312
329
|
};
|
|
313
|
-
const
|
|
330
|
+
const r = n.medium.max + 1;
|
|
314
331
|
return n.large = {
|
|
315
332
|
max: 2e3,
|
|
316
333
|
// TODO: decide upper limit
|
|
317
|
-
min:
|
|
318
|
-
default:
|
|
334
|
+
min: r,
|
|
335
|
+
default: r + 1
|
|
319
336
|
}, n;
|
|
320
|
-
},
|
|
337
|
+
}, st = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), fe = (e) => Object.entries(e).map(([n, o]) => {
|
|
321
338
|
if (typeof o == "string")
|
|
322
|
-
return `${
|
|
323
|
-
}).filter(C),
|
|
339
|
+
return `${st(n)}: ${o};`;
|
|
340
|
+
}).filter(C), ct = (e) => fe(e).join(`
|
|
324
341
|
`), L = ({
|
|
325
342
|
mediaQuery: e,
|
|
326
343
|
className: t,
|
|
327
344
|
styles: n
|
|
328
345
|
}) => {
|
|
329
346
|
const o = `.${t} {
|
|
330
|
-
${
|
|
347
|
+
${ct(n)}
|
|
331
348
|
}`;
|
|
332
349
|
return e ? `${e} {
|
|
333
350
|
${o}
|
|
@@ -336,9 +353,9 @@ const it = ({
|
|
|
336
353
|
function O(e) {
|
|
337
354
|
return /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
|
|
338
355
|
}
|
|
339
|
-
function
|
|
356
|
+
function lt(e) {
|
|
340
357
|
const t = function() {
|
|
341
|
-
const i =
|
|
358
|
+
const i = $({
|
|
342
359
|
block: e.block,
|
|
343
360
|
localState: e.context.localState,
|
|
344
361
|
rootState: e.context.rootState,
|
|
@@ -349,16 +366,16 @@ function ct(e) {
|
|
|
349
366
|
return C(i.hide) ? !i.hide : C(i.show) ? i.show : !0;
|
|
350
367
|
}, n = function() {
|
|
351
368
|
var d;
|
|
352
|
-
const i =
|
|
369
|
+
const i = $({
|
|
353
370
|
block: e.block,
|
|
354
371
|
localState: e.context.localState,
|
|
355
372
|
rootState: e.context.rootState,
|
|
356
373
|
rootSetState: e.context.rootSetState,
|
|
357
374
|
context: e.context.context,
|
|
358
375
|
shouldEvaluateBindings: !0
|
|
359
|
-
}),
|
|
360
|
-
((d =
|
|
361
|
-
), c =
|
|
376
|
+
}), r = i.responsiveStyles, a = e.context.content, s = me(
|
|
377
|
+
((d = a == null ? void 0 : a.meta) == null ? void 0 : d.breakpoints) || {}
|
|
378
|
+
), c = r == null ? void 0 : r.large, m = r == null ? void 0 : r.medium, g = r == null ? void 0 : r.small, p = i.id;
|
|
362
379
|
if (!p)
|
|
363
380
|
return "";
|
|
364
381
|
const f = c ? L({
|
|
@@ -381,12 +398,12 @@ function ct(e) {
|
|
|
381
398
|
}) : "";
|
|
382
399
|
return [f, h, u].join(" ");
|
|
383
400
|
};
|
|
384
|
-
return /* @__PURE__ */ l(
|
|
401
|
+
return /* @__PURE__ */ l(S, { children: n() && t() ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(O, { styles: n() }) }) : null });
|
|
385
402
|
}
|
|
386
|
-
function
|
|
403
|
+
function dt(e) {
|
|
387
404
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
388
405
|
}
|
|
389
|
-
const
|
|
406
|
+
const ut = (e) => `on${dt(e)}`, mt = (e, t) => (n) => H({
|
|
390
407
|
code: e,
|
|
391
408
|
context: t.context,
|
|
392
409
|
localState: t.localState,
|
|
@@ -395,45 +412,45 @@ const dt = (e) => `on${lt(e)}`, ut = (e, t) => (n) => H({
|
|
|
395
412
|
event: n,
|
|
396
413
|
isExpression: !1
|
|
397
414
|
});
|
|
398
|
-
function
|
|
415
|
+
function eo(e) {
|
|
399
416
|
const t = {}, n = e.block.actions ?? {};
|
|
400
417
|
for (const o in n) {
|
|
401
418
|
if (!n.hasOwnProperty(o))
|
|
402
419
|
continue;
|
|
403
420
|
const i = n[o];
|
|
404
|
-
let
|
|
421
|
+
let r = ut(o);
|
|
405
422
|
if (e.stripPrefix)
|
|
406
423
|
switch (I) {
|
|
407
424
|
case "vue":
|
|
408
|
-
|
|
425
|
+
r = r.replace("v-on:", "");
|
|
409
426
|
break;
|
|
410
427
|
case "svelte":
|
|
411
|
-
|
|
428
|
+
r = r.replace("on:", "");
|
|
412
429
|
break;
|
|
413
430
|
}
|
|
414
|
-
t[
|
|
431
|
+
t[r] = mt(i, e);
|
|
415
432
|
}
|
|
416
433
|
return t;
|
|
417
434
|
}
|
|
418
|
-
function
|
|
435
|
+
function ft({
|
|
419
436
|
style: e
|
|
420
437
|
}) {
|
|
421
438
|
return e;
|
|
422
439
|
}
|
|
423
|
-
const
|
|
440
|
+
const ht = ({
|
|
424
441
|
block: e,
|
|
425
442
|
context: t
|
|
426
|
-
}) =>
|
|
443
|
+
}) => he(ft({
|
|
427
444
|
style: e.style || {},
|
|
428
445
|
context: t,
|
|
429
446
|
block: e
|
|
430
447
|
}));
|
|
431
|
-
function
|
|
448
|
+
function he(e) {
|
|
432
449
|
switch (I) {
|
|
433
450
|
case "svelte":
|
|
434
451
|
case "vue":
|
|
435
452
|
case "solid":
|
|
436
|
-
return
|
|
453
|
+
return fe(e).join(" ");
|
|
437
454
|
case "qwik":
|
|
438
455
|
case "reactNative":
|
|
439
456
|
case "react":
|
|
@@ -441,43 +458,43 @@ function me(e) {
|
|
|
441
458
|
return e;
|
|
442
459
|
}
|
|
443
460
|
}
|
|
444
|
-
function
|
|
461
|
+
function pt({
|
|
445
462
|
properties: e
|
|
446
463
|
}) {
|
|
447
464
|
return e;
|
|
448
465
|
}
|
|
449
|
-
const
|
|
466
|
+
const gt = (e) => ({
|
|
450
467
|
href: e.href
|
|
451
468
|
});
|
|
452
|
-
function
|
|
469
|
+
function bt({
|
|
453
470
|
block: e,
|
|
454
471
|
context: t
|
|
455
472
|
}) {
|
|
456
473
|
var o;
|
|
457
474
|
const n = {
|
|
458
|
-
...
|
|
475
|
+
...gt(e),
|
|
459
476
|
...e.properties,
|
|
460
477
|
"builder-id": e.id,
|
|
461
|
-
style:
|
|
478
|
+
style: ht({
|
|
462
479
|
block: e,
|
|
463
480
|
context: t
|
|
464
481
|
}),
|
|
465
482
|
[M()]: [e.id, "builder-block", e.class, (o = e.properties) == null ? void 0 : o.class].filter(Boolean).join(" ")
|
|
466
483
|
};
|
|
467
|
-
return
|
|
484
|
+
return pt({
|
|
468
485
|
properties: n,
|
|
469
486
|
context: t,
|
|
470
487
|
block: e
|
|
471
488
|
});
|
|
472
489
|
}
|
|
473
|
-
const
|
|
490
|
+
const yt = ({
|
|
474
491
|
componentOptions: e,
|
|
475
492
|
builderBlock: t,
|
|
476
493
|
context: n,
|
|
477
494
|
componentRef: o,
|
|
478
495
|
includeBlockProps: i,
|
|
479
|
-
isInteractive:
|
|
480
|
-
contextValue:
|
|
496
|
+
isInteractive: r,
|
|
497
|
+
contextValue: a
|
|
481
498
|
}) => {
|
|
482
499
|
const s = {
|
|
483
500
|
...e,
|
|
@@ -486,13 +503,13 @@ const bt = ({
|
|
|
486
503
|
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
487
504
|
*/
|
|
488
505
|
...i ? {
|
|
489
|
-
attributes:
|
|
506
|
+
attributes: bt({
|
|
490
507
|
block: t,
|
|
491
|
-
context:
|
|
508
|
+
context: a
|
|
492
509
|
})
|
|
493
510
|
} : {}
|
|
494
511
|
};
|
|
495
|
-
return
|
|
512
|
+
return r ? {
|
|
496
513
|
Wrapper: o,
|
|
497
514
|
block: t,
|
|
498
515
|
context: n,
|
|
@@ -502,11 +519,11 @@ const bt = ({
|
|
|
502
519
|
};
|
|
503
520
|
function J(e) {
|
|
504
521
|
var n;
|
|
505
|
-
const t = e.isInteractive ?
|
|
506
|
-
return /* @__PURE__ */ l(
|
|
522
|
+
const t = e.isInteractive ? $e : e.componentRef;
|
|
523
|
+
return /* @__PURE__ */ l(S, { children: e.componentRef ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(
|
|
507
524
|
t,
|
|
508
525
|
{
|
|
509
|
-
...
|
|
526
|
+
...yt({
|
|
510
527
|
componentOptions: e.componentOptions,
|
|
511
528
|
builderBlock: e.builderBlock,
|
|
512
529
|
context: e.context,
|
|
@@ -529,7 +546,7 @@ function J(e) {
|
|
|
529
546
|
}
|
|
530
547
|
) }) : null });
|
|
531
548
|
}
|
|
532
|
-
function
|
|
549
|
+
function St(e) {
|
|
533
550
|
const t = e.repeatContext;
|
|
534
551
|
return /* @__PURE__ */ l(
|
|
535
552
|
N,
|
|
@@ -544,7 +561,7 @@ function yt(e) {
|
|
|
544
561
|
function N(e) {
|
|
545
562
|
var m, g, p;
|
|
546
563
|
const t = function() {
|
|
547
|
-
return
|
|
564
|
+
return rt({
|
|
548
565
|
block: e.block,
|
|
549
566
|
context: e.context,
|
|
550
567
|
registeredComponents: e.registeredComponents
|
|
@@ -556,7 +573,7 @@ function N(e) {
|
|
|
556
573
|
});
|
|
557
574
|
}, o = function() {
|
|
558
575
|
var h;
|
|
559
|
-
return (h = e.block.repeat) != null && h.collection ? e.block :
|
|
576
|
+
return (h = e.block.repeat) != null && h.collection ? e.block : $({
|
|
560
577
|
block: e.block,
|
|
561
578
|
localState: e.context.localState,
|
|
562
579
|
rootState: e.context.rootState,
|
|
@@ -567,13 +584,13 @@ function N(e) {
|
|
|
567
584
|
}, i = function() {
|
|
568
585
|
var u;
|
|
569
586
|
return e.block.tagName === "a" || ((u = o().properties) == null ? void 0 : u.href) || o().href ? e.linkComponent || "a" : e.block.tagName || "div";
|
|
570
|
-
},
|
|
587
|
+
}, r = function() {
|
|
571
588
|
var d, y;
|
|
572
589
|
if ((d = e.block.repeat) != null && d.collection)
|
|
573
590
|
return !!((y = n()) != null && y.length);
|
|
574
591
|
const h = "hide" in o() ? o().hide : !1;
|
|
575
592
|
return ("show" in o() ? o().show : !0) && !h;
|
|
576
|
-
},
|
|
593
|
+
}, a = function() {
|
|
577
594
|
var u;
|
|
578
595
|
return !((u = t()) != null && u.component) && !n() ? o().children ?? [] : [];
|
|
579
596
|
}, s = function() {
|
|
@@ -582,7 +599,7 @@ function N(e) {
|
|
|
582
599
|
blockChildren: o().children ?? [],
|
|
583
600
|
componentRef: (h = t()) == null ? void 0 : h.component,
|
|
584
601
|
componentOptions: {
|
|
585
|
-
...
|
|
602
|
+
...qe(o()),
|
|
586
603
|
builderContext: e.context,
|
|
587
604
|
...((u = t()) == null ? void 0 : u.name) === "Core:Button" || ((d = t()) == null ? void 0 : d.name) === "Symbol" || ((y = t()) == null ? void 0 : y.name) === "Columns" ? {
|
|
588
605
|
builderLinkComponent: e.linkComponent
|
|
@@ -599,9 +616,9 @@ function N(e) {
|
|
|
599
616
|
isInteractive: !((T = t()) != null && T.isRSC)
|
|
600
617
|
};
|
|
601
618
|
}, c = e.context;
|
|
602
|
-
return /* @__PURE__ */ l(
|
|
603
|
-
/* @__PURE__ */ l(
|
|
604
|
-
(m = t()) != null && m.noWrap ? /* @__PURE__ */ l(
|
|
619
|
+
return /* @__PURE__ */ l(S, { children: r() ? /* @__PURE__ */ R(S, { children: [
|
|
620
|
+
/* @__PURE__ */ l(lt, { block: e.block, context: e.context }),
|
|
621
|
+
(m = t()) != null && m.noWrap ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(
|
|
605
622
|
J,
|
|
606
623
|
{
|
|
607
624
|
componentRef: s().componentRef,
|
|
@@ -614,8 +631,8 @@ function N(e) {
|
|
|
614
631
|
includeBlockProps: s().includeBlockProps,
|
|
615
632
|
isInteractive: s().isInteractive
|
|
616
633
|
}
|
|
617
|
-
) }) : /* @__PURE__ */ l(
|
|
618
|
-
|
|
634
|
+
) }) : /* @__PURE__ */ l(S, { children: n() ? /* @__PURE__ */ l(S, { children: (p = n()) == null ? void 0 : p.map((f, h) => /* @__PURE__ */ l(
|
|
635
|
+
St,
|
|
619
636
|
{
|
|
620
637
|
repeatContext: f.context,
|
|
621
638
|
block: f.block,
|
|
@@ -623,8 +640,8 @@ function N(e) {
|
|
|
623
640
|
linkComponent: e.linkComponent
|
|
624
641
|
},
|
|
625
642
|
h
|
|
626
|
-
)) }) : /* @__PURE__ */ l(
|
|
627
|
-
|
|
643
|
+
)) }) : /* @__PURE__ */ l(S, { children: /* @__PURE__ */ R(
|
|
644
|
+
We,
|
|
628
645
|
{
|
|
629
646
|
Wrapper: i(),
|
|
630
647
|
block: o(),
|
|
@@ -645,7 +662,7 @@ function N(e) {
|
|
|
645
662
|
isInteractive: s().isInteractive
|
|
646
663
|
}
|
|
647
664
|
),
|
|
648
|
-
(g =
|
|
665
|
+
(g = a()) == null ? void 0 : g.map((f) => /* @__PURE__ */ l(
|
|
649
666
|
N,
|
|
650
667
|
{
|
|
651
668
|
block: f,
|
|
@@ -663,7 +680,7 @@ function N(e) {
|
|
|
663
680
|
function F(e) {
|
|
664
681
|
var t, n, o;
|
|
665
682
|
return /* @__PURE__ */ l(
|
|
666
|
-
|
|
683
|
+
Oe,
|
|
667
684
|
{
|
|
668
685
|
blocks: e.blocks,
|
|
669
686
|
parent: e.parent,
|
|
@@ -671,7 +688,7 @@ function F(e) {
|
|
|
671
688
|
styleProp: e.styleProp,
|
|
672
689
|
BlocksWrapper: (t = e.context) == null ? void 0 : t.BlocksWrapper,
|
|
673
690
|
BlocksWrapperProps: (n = e.context) == null ? void 0 : n.BlocksWrapperProps,
|
|
674
|
-
children: e.blocks ? /* @__PURE__ */ l(
|
|
691
|
+
children: e.blocks ? /* @__PURE__ */ l(S, { children: (o = e.blocks) == null ? void 0 : o.map((i) => /* @__PURE__ */ l(
|
|
675
692
|
N,
|
|
676
693
|
{
|
|
677
694
|
block: i,
|
|
@@ -689,10 +706,10 @@ function kt(e) {
|
|
|
689
706
|
const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", i = function(d) {
|
|
690
707
|
var y;
|
|
691
708
|
return ((y = n[d]) == null ? void 0 : y.width) || 100 / n.length;
|
|
692
|
-
},
|
|
709
|
+
}, r = function(d) {
|
|
693
710
|
const y = t * (n.length - 1) / n.length;
|
|
694
711
|
return `calc(${i(d)}% - ${y}px)`;
|
|
695
|
-
},
|
|
712
|
+
}, a = function({
|
|
696
713
|
stackedStyle: d,
|
|
697
714
|
desktopStyle: y
|
|
698
715
|
}) {
|
|
@@ -705,13 +722,13 @@ function kt(e) {
|
|
|
705
722
|
}, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", m = function() {
|
|
706
723
|
return {
|
|
707
724
|
"--flex-dir": c,
|
|
708
|
-
"--flex-dir-tablet":
|
|
725
|
+
"--flex-dir-tablet": a({
|
|
709
726
|
stackedStyle: c,
|
|
710
727
|
desktopStyle: "row"
|
|
711
728
|
})
|
|
712
729
|
};
|
|
713
730
|
}, g = function(d) {
|
|
714
|
-
const y = d === 0 ? 0 : t, v =
|
|
731
|
+
const y = d === 0 ? 0 : t, v = r(d), b = `${y}px`, E = "100%", T = 0;
|
|
715
732
|
return {
|
|
716
733
|
...{
|
|
717
734
|
display: "flex",
|
|
@@ -728,18 +745,18 @@ function kt(e) {
|
|
|
728
745
|
stackedStyle: T,
|
|
729
746
|
desktopStyle: b
|
|
730
747
|
}),
|
|
731
|
-
"--column-width-tablet":
|
|
748
|
+
"--column-width-tablet": a({
|
|
732
749
|
stackedStyle: E,
|
|
733
750
|
desktopStyle: v
|
|
734
751
|
}),
|
|
735
|
-
"--column-margin-left-tablet":
|
|
752
|
+
"--column-margin-left-tablet": a({
|
|
736
753
|
stackedStyle: T,
|
|
737
754
|
desktopStyle: b
|
|
738
755
|
})
|
|
739
756
|
};
|
|
740
757
|
}, p = function(d) {
|
|
741
758
|
var v, b;
|
|
742
|
-
return
|
|
759
|
+
return me(
|
|
743
760
|
((b = (v = e.builderContext.content) == null ? void 0 : v.meta) == null ? void 0 : b.breakpoints) || {}
|
|
744
761
|
)[d].max;
|
|
745
762
|
}, f = function() {
|
|
@@ -769,16 +786,16 @@ function kt(e) {
|
|
|
769
786
|
},
|
|
770
787
|
`;
|
|
771
788
|
};
|
|
772
|
-
return /* @__PURE__ */ R(
|
|
789
|
+
return /* @__PURE__ */ R(S, { children: [
|
|
773
790
|
/* @__PURE__ */ R(
|
|
774
791
|
"div",
|
|
775
792
|
{
|
|
776
793
|
className: `builder-columns ${e.builderBlock.id}-breakpoints div-3d816b82`,
|
|
777
794
|
style: m(),
|
|
778
795
|
children: [
|
|
779
|
-
/* @__PURE__ */ l(
|
|
796
|
+
/* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(O, { styles: f() }) }),
|
|
780
797
|
(h = e.columns) == null ? void 0 : h.map((u, d) => /* @__PURE__ */ l(
|
|
781
|
-
|
|
798
|
+
Ne,
|
|
782
799
|
{
|
|
783
800
|
TagName: u.link ? e.builderLinkComponent || "a" : "div",
|
|
784
801
|
actionAttributes: {},
|
|
@@ -787,7 +804,7 @@ function kt(e) {
|
|
|
787
804
|
href: u.link
|
|
788
805
|
} : {},
|
|
789
806
|
[M()]: "builder-column",
|
|
790
|
-
style:
|
|
807
|
+
style: he(g(d))
|
|
791
808
|
},
|
|
792
809
|
children: /* @__PURE__ */ l(
|
|
793
810
|
F,
|
|
@@ -818,39 +835,39 @@ function kt(e) {
|
|
|
818
835
|
function Q(e) {
|
|
819
836
|
return e.replace(/http(s)?:/, "");
|
|
820
837
|
}
|
|
821
|
-
function
|
|
838
|
+
function vt(e = "", t, n) {
|
|
822
839
|
const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), i = e.indexOf("?") !== -1 ? "&" : "?";
|
|
823
840
|
return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + i + t + "=" + encodeURIComponent(n);
|
|
824
841
|
}
|
|
825
|
-
function
|
|
842
|
+
function xt(e, t) {
|
|
826
843
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
827
844
|
return e;
|
|
828
845
|
if (t === "master")
|
|
829
846
|
return Q(e);
|
|
830
847
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
831
848
|
if (n) {
|
|
832
|
-
const o = e.split(n[0]), i = n[3],
|
|
833
|
-
return Q(`${o[0]}_${
|
|
849
|
+
const o = e.split(n[0]), i = n[3], r = t.match("x") ? t : `${t}x`;
|
|
850
|
+
return Q(`${o[0]}_${r}${i}`);
|
|
834
851
|
}
|
|
835
852
|
return null;
|
|
836
853
|
}
|
|
837
|
-
function
|
|
854
|
+
function to(e) {
|
|
838
855
|
if (!e)
|
|
839
856
|
return e;
|
|
840
857
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
841
858
|
if (e.match(/builder\.io/)) {
|
|
842
859
|
let n = e;
|
|
843
860
|
const o = Number(e.split("?width=")[1]);
|
|
844
|
-
return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${
|
|
861
|
+
return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${vt(e, "width", i)} ${i}w`).concat([n]).join(", ");
|
|
845
862
|
}
|
|
846
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
863
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [xt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
|
|
847
864
|
}
|
|
848
|
-
const
|
|
865
|
+
const Ct = (e) => {
|
|
849
866
|
if (e === "localhost" || e === "127.0.0.1")
|
|
850
867
|
return e;
|
|
851
868
|
const t = e.split(".");
|
|
852
869
|
return t.length > 2 ? t.slice(1).join(".") : e;
|
|
853
|
-
},
|
|
870
|
+
}, pe = ({
|
|
854
871
|
name: e,
|
|
855
872
|
canTrack: t
|
|
856
873
|
}) => {
|
|
@@ -861,14 +878,14 @@ const xt = (e) => {
|
|
|
861
878
|
x.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
|
|
862
879
|
return;
|
|
863
880
|
}
|
|
864
|
-
},
|
|
881
|
+
}, ge = async (e) => pe(e), wt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(C).join("; "), It = [["secure", ""], ["SameSite", "None"]], Tt = ({
|
|
865
882
|
name: e,
|
|
866
883
|
value: t,
|
|
867
884
|
expires: n
|
|
868
885
|
}) => {
|
|
869
|
-
const i = (
|
|
870
|
-
return
|
|
871
|
-
},
|
|
886
|
+
const i = (k() ? location.protocol === "https:" : !0) ? It : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], a = [[e, t], ...r, ["path", "/"], ["domain", Ct(window.location.hostname)], ...i];
|
|
887
|
+
return wt(a);
|
|
888
|
+
}, be = async ({
|
|
872
889
|
name: e,
|
|
873
890
|
value: t,
|
|
874
891
|
expires: n,
|
|
@@ -877,7 +894,7 @@ const xt = (e) => {
|
|
|
877
894
|
try {
|
|
878
895
|
if (!o)
|
|
879
896
|
return;
|
|
880
|
-
const i =
|
|
897
|
+
const i = Tt({
|
|
881
898
|
name: e,
|
|
882
899
|
value: t,
|
|
883
900
|
expires: n
|
|
@@ -886,45 +903,45 @@ const xt = (e) => {
|
|
|
886
903
|
} catch (i) {
|
|
887
904
|
x.warn("[COOKIE] SET error: ", (i == null ? void 0 : i.message) || i);
|
|
888
905
|
}
|
|
889
|
-
},
|
|
906
|
+
}, Et = "builder.tests", K = (e) => `${Et}.${e}`, Rt = ({
|
|
890
907
|
contentId: e
|
|
891
|
-
}) =>
|
|
908
|
+
}) => ge({
|
|
892
909
|
name: K(e),
|
|
893
910
|
canTrack: !0
|
|
894
|
-
}),
|
|
911
|
+
}), At = ({
|
|
895
912
|
contentId: e
|
|
896
|
-
}) =>
|
|
913
|
+
}) => pe({
|
|
897
914
|
name: K(e),
|
|
898
915
|
canTrack: !0
|
|
899
916
|
}), Pt = ({
|
|
900
917
|
contentId: e,
|
|
901
918
|
value: t
|
|
902
|
-
}) =>
|
|
919
|
+
}) => be({
|
|
903
920
|
name: K(e),
|
|
904
921
|
value: t,
|
|
905
922
|
canTrack: !0
|
|
906
|
-
}),
|
|
923
|
+
}), ye = (e) => C(e.id) && C(e.variations) && Object.keys(e.variations).length > 0, Bt = ({
|
|
907
924
|
id: e,
|
|
908
925
|
variations: t
|
|
909
926
|
}) => {
|
|
910
927
|
var i;
|
|
911
928
|
let n = 0;
|
|
912
929
|
const o = Math.random();
|
|
913
|
-
for (const
|
|
914
|
-
const
|
|
915
|
-
if (n +=
|
|
916
|
-
return
|
|
930
|
+
for (const r in t) {
|
|
931
|
+
const a = (i = t[r]) == null ? void 0 : i.testRatio;
|
|
932
|
+
if (n += a, o < n)
|
|
933
|
+
return r;
|
|
917
934
|
}
|
|
918
935
|
return e;
|
|
919
|
-
},
|
|
920
|
-
const t =
|
|
936
|
+
}, Se = (e) => {
|
|
937
|
+
const t = Bt(e);
|
|
921
938
|
return Pt({
|
|
922
939
|
contentId: e.id,
|
|
923
940
|
value: t
|
|
924
941
|
}).catch((n) => {
|
|
925
942
|
x.error("could not store A/B test variation: ", n);
|
|
926
943
|
}), t;
|
|
927
|
-
},
|
|
944
|
+
}, ke = ({
|
|
928
945
|
item: e,
|
|
929
946
|
testGroupId: t
|
|
930
947
|
}) => {
|
|
@@ -946,14 +963,14 @@ const xt = (e) => {
|
|
|
946
963
|
return e;
|
|
947
964
|
if (!e)
|
|
948
965
|
return;
|
|
949
|
-
if (!
|
|
966
|
+
if (!ye(e))
|
|
950
967
|
return e;
|
|
951
|
-
const n =
|
|
968
|
+
const n = At({
|
|
952
969
|
contentId: e.id
|
|
953
|
-
}) ||
|
|
970
|
+
}) || Se({
|
|
954
971
|
variations: e.variations,
|
|
955
972
|
id: e.id
|
|
956
|
-
}), o =
|
|
973
|
+
}), o = ke({
|
|
957
974
|
item: e,
|
|
958
975
|
testGroupId: n
|
|
959
976
|
});
|
|
@@ -961,18 +978,18 @@ const xt = (e) => {
|
|
|
961
978
|
...e,
|
|
962
979
|
...o
|
|
963
980
|
};
|
|
964
|
-
},
|
|
981
|
+
}, $t = async ({
|
|
965
982
|
item: e,
|
|
966
983
|
canTrack: t
|
|
967
984
|
}) => {
|
|
968
|
-
if (!t || !
|
|
985
|
+
if (!t || !ye(e))
|
|
969
986
|
return e;
|
|
970
|
-
const o = await
|
|
987
|
+
const o = await Rt({
|
|
971
988
|
contentId: e.id
|
|
972
|
-
}) ||
|
|
989
|
+
}) || Se({
|
|
973
990
|
variations: e.variations,
|
|
974
991
|
id: e.id
|
|
975
|
-
}), i =
|
|
992
|
+
}), i = ke({
|
|
976
993
|
item: e,
|
|
977
994
|
testGroupId: o
|
|
978
995
|
});
|
|
@@ -980,7 +997,7 @@ const xt = (e) => {
|
|
|
980
997
|
...e,
|
|
981
998
|
...i
|
|
982
999
|
};
|
|
983
|
-
},
|
|
1000
|
+
}, U = (e) => C(e) ? e : !0, Wt = {
|
|
984
1001
|
name: "Core:Button",
|
|
985
1002
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
986
1003
|
defaultStyles: {
|
|
@@ -1013,7 +1030,7 @@ const xt = (e) => {
|
|
|
1013
1030
|
}],
|
|
1014
1031
|
static: !0,
|
|
1015
1032
|
noWrap: !0
|
|
1016
|
-
},
|
|
1033
|
+
}, Ot = {
|
|
1017
1034
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1018
1035
|
name: "Columns",
|
|
1019
1036
|
isRSC: !0,
|
|
@@ -1192,7 +1209,7 @@ const xt = (e) => {
|
|
|
1192
1209
|
});
|
|
1193
1210
|
}
|
|
1194
1211
|
const n = e.get("columns");
|
|
1195
|
-
Array.isArray(n) && n.find((i) => i.get("width")) && (n.find((
|
|
1212
|
+
Array.isArray(n) && n.find((i) => i.get("width")) && (n.find((r) => !r.get("width")) || n.reduce((s, c) => s + c.get("width"), 0) !== 100) && t();
|
|
1196
1213
|
}
|
|
1197
1214
|
}, {
|
|
1198
1215
|
name: "space",
|
|
@@ -1214,7 +1231,7 @@ const xt = (e) => {
|
|
|
1214
1231
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1215
1232
|
advanced: !0
|
|
1216
1233
|
}]
|
|
1217
|
-
},
|
|
1234
|
+
}, Nt = {
|
|
1218
1235
|
name: "Custom Code",
|
|
1219
1236
|
static: !0,
|
|
1220
1237
|
requiredPermissions: ["editCode"],
|
|
@@ -1236,7 +1253,7 @@ const xt = (e) => {
|
|
|
1236
1253
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
1237
1254
|
advanced: !0
|
|
1238
1255
|
}]
|
|
1239
|
-
},
|
|
1256
|
+
}, Ft = {
|
|
1240
1257
|
name: "Embed",
|
|
1241
1258
|
static: !0,
|
|
1242
1259
|
inputs: [{
|
|
@@ -1261,7 +1278,7 @@ const xt = (e) => {
|
|
|
1261
1278
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1262
1279
|
hideFromUI: !0
|
|
1263
1280
|
}]
|
|
1264
|
-
},
|
|
1281
|
+
}, Lt = ["text/javascript", "application/javascript", "application/ecmascript"], no = (e) => Lt.includes(e.type), Ut = {
|
|
1265
1282
|
name: "Fragment",
|
|
1266
1283
|
static: !0,
|
|
1267
1284
|
hidden: !0,
|
|
@@ -1287,7 +1304,7 @@ const xt = (e) => {
|
|
|
1287
1304
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
1288
1305
|
onChange: (e) => {
|
|
1289
1306
|
e.delete("srcset"), e.delete("noWebp");
|
|
1290
|
-
function n(
|
|
1307
|
+
function n(a, s = 6e4) {
|
|
1291
1308
|
return new Promise((c, m) => {
|
|
1292
1309
|
const g = document.createElement("img");
|
|
1293
1310
|
let p = !1;
|
|
@@ -1295,21 +1312,21 @@ const xt = (e) => {
|
|
|
1295
1312
|
p = !0, c(g);
|
|
1296
1313
|
}, g.addEventListener("error", (f) => {
|
|
1297
1314
|
console.warn("Image load failed", f.error), m(f.error);
|
|
1298
|
-
}), g.src =
|
|
1315
|
+
}), g.src = a, setTimeout(() => {
|
|
1299
1316
|
p || m(new Error("Image load timed out"));
|
|
1300
1317
|
}, s);
|
|
1301
1318
|
});
|
|
1302
1319
|
}
|
|
1303
|
-
function o(
|
|
1304
|
-
return Math.round(
|
|
1320
|
+
function o(a) {
|
|
1321
|
+
return Math.round(a * 1e3) / 1e3;
|
|
1305
1322
|
}
|
|
1306
|
-
const i = e.get("image"),
|
|
1307
|
-
if (fetch(i).then((
|
|
1308
|
-
|
|
1309
|
-
}), i && (!
|
|
1310
|
-
return n(i).then((
|
|
1323
|
+
const i = e.get("image"), r = e.get("aspectRatio");
|
|
1324
|
+
if (fetch(i).then((a) => a.blob()).then((a) => {
|
|
1325
|
+
a.type.includes("svg") && e.set("noWebp", !0);
|
|
1326
|
+
}), i && (!r || r === 0.7041))
|
|
1327
|
+
return n(i).then((a) => {
|
|
1311
1328
|
const s = e.get("aspectRatio");
|
|
1312
|
-
e.get("image") === i && (!s || s === 0.7041) &&
|
|
1329
|
+
e.get("image") === i && (!s || s === 0.7041) && a.width && a.height && (e.set("aspectRatio", o(a.height / a.width)), e.set("height", a.height), e.set("width", a.width));
|
|
1313
1330
|
});
|
|
1314
1331
|
}
|
|
1315
1332
|
}, {
|
|
@@ -1367,7 +1384,7 @@ const xt = (e) => {
|
|
|
1367
1384
|
advanced: !0,
|
|
1368
1385
|
defaultValue: 0.7041
|
|
1369
1386
|
}]
|
|
1370
|
-
},
|
|
1387
|
+
}, Dt = {
|
|
1371
1388
|
// friendlyName?
|
|
1372
1389
|
name: "Raw:Img",
|
|
1373
1390
|
hideFromInsertMenu: !0,
|
|
@@ -1381,7 +1398,7 @@ const xt = (e) => {
|
|
|
1381
1398
|
}],
|
|
1382
1399
|
noWrap: !0,
|
|
1383
1400
|
static: !0
|
|
1384
|
-
},
|
|
1401
|
+
}, Mt = {
|
|
1385
1402
|
name: "Core:Section",
|
|
1386
1403
|
static: !0,
|
|
1387
1404
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1420,7 +1437,7 @@ const xt = (e) => {
|
|
|
1420
1437
|
}
|
|
1421
1438
|
}
|
|
1422
1439
|
}]
|
|
1423
|
-
},
|
|
1440
|
+
}, jt = {
|
|
1424
1441
|
name: "Slot",
|
|
1425
1442
|
isRSC: !0,
|
|
1426
1443
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -1434,7 +1451,7 @@ const xt = (e) => {
|
|
|
1434
1451
|
defaultValue: "children"
|
|
1435
1452
|
}]
|
|
1436
1453
|
};
|
|
1437
|
-
function
|
|
1454
|
+
function Ht(e) {
|
|
1438
1455
|
var t, n, o;
|
|
1439
1456
|
return /* @__PURE__ */ l(
|
|
1440
1457
|
"div",
|
|
@@ -1457,7 +1474,7 @@ function jt(e) {
|
|
|
1457
1474
|
}
|
|
1458
1475
|
);
|
|
1459
1476
|
}
|
|
1460
|
-
const
|
|
1477
|
+
const Kt = {
|
|
1461
1478
|
name: "Symbol",
|
|
1462
1479
|
noWrap: !0,
|
|
1463
1480
|
static: !0,
|
|
@@ -1490,7 +1507,7 @@ const Ht = {
|
|
|
1490
1507
|
hideFromUI: !0,
|
|
1491
1508
|
type: "boolean"
|
|
1492
1509
|
}]
|
|
1493
|
-
},
|
|
1510
|
+
}, zt = {
|
|
1494
1511
|
name: "Text",
|
|
1495
1512
|
static: !0,
|
|
1496
1513
|
isRSC: !0,
|
|
@@ -1509,7 +1526,7 @@ const Ht = {
|
|
|
1509
1526
|
textAlign: "center"
|
|
1510
1527
|
}
|
|
1511
1528
|
};
|
|
1512
|
-
function
|
|
1529
|
+
function qt(e) {
|
|
1513
1530
|
var t;
|
|
1514
1531
|
return /* @__PURE__ */ l(
|
|
1515
1532
|
"div",
|
|
@@ -1522,7 +1539,7 @@ function zt(e) {
|
|
|
1522
1539
|
}
|
|
1523
1540
|
);
|
|
1524
1541
|
}
|
|
1525
|
-
const
|
|
1542
|
+
const Gt = {
|
|
1526
1543
|
name: "Video",
|
|
1527
1544
|
canHaveChildren: !0,
|
|
1528
1545
|
defaultStyles: {
|
|
@@ -1604,57 +1621,57 @@ const qt = {
|
|
|
1604
1621
|
advanced: !0
|
|
1605
1622
|
}]
|
|
1606
1623
|
}, X = () => [{
|
|
1607
|
-
component:
|
|
1624
|
+
component: Fe,
|
|
1608
1625
|
...Wt
|
|
1609
1626
|
}, {
|
|
1610
1627
|
component: kt,
|
|
1611
|
-
...$t
|
|
1612
|
-
}, {
|
|
1613
|
-
component: Ne,
|
|
1614
1628
|
...Ot
|
|
1615
1629
|
}, {
|
|
1616
|
-
component:
|
|
1630
|
+
component: Le,
|
|
1617
1631
|
...Nt
|
|
1618
1632
|
}, {
|
|
1619
|
-
component:
|
|
1620
|
-
...
|
|
1633
|
+
component: Ue,
|
|
1634
|
+
...Ft
|
|
1621
1635
|
}, {
|
|
1622
1636
|
component: _e,
|
|
1623
|
-
..._t
|
|
1624
|
-
}, {
|
|
1625
|
-
component: Ue,
|
|
1626
1637
|
...Ut
|
|
1627
1638
|
}, {
|
|
1628
1639
|
component: De,
|
|
1640
|
+
..._t
|
|
1641
|
+
}, {
|
|
1642
|
+
component: Me,
|
|
1629
1643
|
...Dt
|
|
1630
1644
|
}, {
|
|
1631
|
-
component:
|
|
1632
|
-
...
|
|
1645
|
+
component: je,
|
|
1646
|
+
...Mt
|
|
1633
1647
|
}, {
|
|
1634
|
-
component:
|
|
1648
|
+
component: qn,
|
|
1635
1649
|
...Kt
|
|
1636
1650
|
}, {
|
|
1637
|
-
component:
|
|
1638
|
-
...
|
|
1651
|
+
component: qt,
|
|
1652
|
+
...zt
|
|
1639
1653
|
}, {
|
|
1640
|
-
component:
|
|
1641
|
-
...
|
|
1642
|
-
}
|
|
1654
|
+
component: He,
|
|
1655
|
+
...Gt
|
|
1656
|
+
}, {
|
|
1657
|
+
component: Ht,
|
|
1658
|
+
...jt
|
|
1659
|
+
}], Z = [], oo = (e) => ({
|
|
1643
1660
|
type: "builder.registerComponent",
|
|
1644
|
-
data:
|
|
1645
|
-
}),
|
|
1661
|
+
data: _(e)
|
|
1662
|
+
}), Yt = (e) => {
|
|
1646
1663
|
const t = e.toString().trim();
|
|
1647
1664
|
return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
|
|
1648
|
-
},
|
|
1665
|
+
}, Jt = (e) => typeof e == "function" ? Yt(e) : W(e), _ = ({
|
|
1649
1666
|
inputs: e,
|
|
1650
1667
|
...t
|
|
1651
1668
|
}) => ({
|
|
1652
|
-
|
|
1653
|
-
inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [i,
|
|
1669
|
+
...W(t),
|
|
1670
|
+
inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [i, r]) => ({
|
|
1654
1671
|
...o,
|
|
1655
|
-
[i]:
|
|
1672
|
+
[i]: Jt(r)
|
|
1656
1673
|
}), {}))
|
|
1657
|
-
}),
|
|
1674
|
+
}), Qt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
1658
1675
|
function getAndSetVariantId() {
|
|
1659
1676
|
function setCookie(name, value, days) {
|
|
1660
1677
|
let expires = '';
|
|
@@ -1710,7 +1727,7 @@ const qt = {
|
|
|
1710
1727
|
}).join('');
|
|
1711
1728
|
styleEl.innerHTML = newStyleStr;
|
|
1712
1729
|
}
|
|
1713
|
-
}`,
|
|
1730
|
+
}`, Xt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
1714
1731
|
if (!navigator.cookieEnabled) {
|
|
1715
1732
|
return;
|
|
1716
1733
|
}
|
|
@@ -1744,24 +1761,24 @@ const qt = {
|
|
|
1744
1761
|
thisScriptEl?.remove();
|
|
1745
1762
|
}
|
|
1746
1763
|
return;
|
|
1747
|
-
}`,
|
|
1764
|
+
}`, ve = "builderIoAbTest", xe = "builderIoRenderContent", B = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
1748
1765
|
...t,
|
|
1749
1766
|
testVariationId: t.id,
|
|
1750
1767
|
id: e == null ? void 0 : e.id
|
|
1751
|
-
})),
|
|
1768
|
+
})), Zt = ({
|
|
1752
1769
|
canTrack: e,
|
|
1753
1770
|
content: t
|
|
1754
|
-
}) => !(!(
|
|
1755
|
-
window.${
|
|
1756
|
-
window.${
|
|
1757
|
-
`,
|
|
1758
|
-
window.${
|
|
1759
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
1760
|
-
)`,
|
|
1771
|
+
}) => !(!(B(t).length > 0) || !e || k()), en = (e) => e === "react" || e === "reactNative", Ce = en(I), tn = () => `
|
|
1772
|
+
window.${ve} = ${Qt}
|
|
1773
|
+
window.${xe} = ${Xt}
|
|
1774
|
+
`, nn = (e, t) => `
|
|
1775
|
+
window.${ve}(
|
|
1776
|
+
"${t}",${JSON.stringify(e)}, ${Ce}
|
|
1777
|
+
)`, on = ({
|
|
1761
1778
|
contentId: e,
|
|
1762
1779
|
variationId: t
|
|
1763
|
-
}) => `window.${
|
|
1764
|
-
"${t}", "${e}", ${
|
|
1780
|
+
}) => `window.${xe}(
|
|
1781
|
+
"${t}", "${e}", ${Ce}
|
|
1765
1782
|
)`;
|
|
1766
1783
|
function D(e) {
|
|
1767
1784
|
return /* @__PURE__ */ l(
|
|
@@ -1772,66 +1789,66 @@ function D(e) {
|
|
|
1772
1789
|
}
|
|
1773
1790
|
);
|
|
1774
1791
|
}
|
|
1775
|
-
const
|
|
1792
|
+
const rn = (e) => {
|
|
1776
1793
|
const t = e.get("preview"), n = e.get("overrides." + t);
|
|
1777
1794
|
return n || x.warn("No previewed ID found in search params."), n;
|
|
1778
1795
|
};
|
|
1779
1796
|
function an() {
|
|
1780
|
-
globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new
|
|
1797
|
+
globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new Ve({
|
|
1781
1798
|
max: 500,
|
|
1782
1799
|
// how long to live in ms
|
|
1783
1800
|
ttl: 1e3 * 60 * 5
|
|
1784
1801
|
}));
|
|
1785
1802
|
}
|
|
1786
|
-
function
|
|
1803
|
+
function sn(e) {
|
|
1787
1804
|
an();
|
|
1788
|
-
const t =
|
|
1805
|
+
const t = rn(e);
|
|
1789
1806
|
return typeof t == "string" ? globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t) : void 0;
|
|
1790
1807
|
}
|
|
1791
|
-
function
|
|
1808
|
+
function cn() {
|
|
1792
1809
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
1793
1810
|
}
|
|
1794
|
-
function
|
|
1795
|
-
const e =
|
|
1811
|
+
function ln() {
|
|
1812
|
+
const e = cn().fetch;
|
|
1796
1813
|
if (typeof e > "u")
|
|
1797
1814
|
throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
1798
1815
|
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
|
|
1799
1816
|
return e;
|
|
1800
1817
|
}
|
|
1801
|
-
const
|
|
1802
|
-
function
|
|
1818
|
+
const dn = ln();
|
|
1819
|
+
function V(e, t = null, n = ".") {
|
|
1803
1820
|
return Object.keys(e).reduce((o, i) => {
|
|
1804
|
-
const
|
|
1805
|
-
return [typeof
|
|
1821
|
+
const r = e[i], a = [t, i].filter(Boolean).join(n);
|
|
1822
|
+
return [typeof r == "object", r !== null, !(Array.isArray(r) && r.length === 0)].every(Boolean) ? {
|
|
1806
1823
|
...o,
|
|
1807
|
-
...
|
|
1824
|
+
...V(r, a, n)
|
|
1808
1825
|
} : {
|
|
1809
1826
|
...o,
|
|
1810
|
-
[
|
|
1827
|
+
[a]: r
|
|
1811
1828
|
};
|
|
1812
1829
|
}, {});
|
|
1813
1830
|
}
|
|
1814
|
-
const
|
|
1831
|
+
const un = "v3", ee = "builder.", mn = "options.", fn = (e) => {
|
|
1815
1832
|
const t = {};
|
|
1816
1833
|
return e.forEach((n, o) => {
|
|
1817
1834
|
t[o] = n;
|
|
1818
1835
|
}), t;
|
|
1819
|
-
},
|
|
1836
|
+
}, we = (e) => {
|
|
1820
1837
|
if (!e)
|
|
1821
1838
|
return {};
|
|
1822
|
-
const t =
|
|
1839
|
+
const t = Ie(e), n = {};
|
|
1823
1840
|
return Object.keys(t).forEach((o) => {
|
|
1824
1841
|
if (o.startsWith(ee)) {
|
|
1825
|
-
const i = o.replace(ee, "").replace(
|
|
1842
|
+
const i = o.replace(ee, "").replace(mn, "");
|
|
1826
1843
|
n[i] = t[o];
|
|
1827
1844
|
}
|
|
1828
1845
|
}), n;
|
|
1829
|
-
},
|
|
1830
|
-
if (!
|
|
1846
|
+
}, hn = () => {
|
|
1847
|
+
if (!k())
|
|
1831
1848
|
return {};
|
|
1832
1849
|
const e = new URLSearchParams(window.location.search);
|
|
1833
|
-
return
|
|
1834
|
-
},
|
|
1850
|
+
return we(e);
|
|
1851
|
+
}, Ie = (e) => e instanceof URLSearchParams ? fn(e) : e, te = (e) => typeof e == "number" && !isNaN(e) && e >= 0, z = (e) => {
|
|
1835
1852
|
let {
|
|
1836
1853
|
noTraverse: t = !1
|
|
1837
1854
|
} = e;
|
|
@@ -1839,12 +1856,12 @@ const dn = "v3", ee = "builder.", un = "options.", mn = (e) => {
|
|
|
1839
1856
|
limit: n = 30,
|
|
1840
1857
|
userAttributes: o,
|
|
1841
1858
|
query: i,
|
|
1842
|
-
model:
|
|
1843
|
-
apiKey:
|
|
1859
|
+
model: r,
|
|
1860
|
+
apiKey: a,
|
|
1844
1861
|
includeRefs: s = !0,
|
|
1845
1862
|
enrich: c,
|
|
1846
1863
|
locale: m,
|
|
1847
|
-
apiVersion: g =
|
|
1864
|
+
apiVersion: g = un,
|
|
1848
1865
|
fields: p,
|
|
1849
1866
|
omit: f,
|
|
1850
1867
|
offset: h,
|
|
@@ -1853,73 +1870,73 @@ const dn = "v3", ee = "builder.", un = "options.", mn = (e) => {
|
|
|
1853
1870
|
sort: y,
|
|
1854
1871
|
includeUnpublished: v
|
|
1855
1872
|
} = e;
|
|
1856
|
-
if (!
|
|
1873
|
+
if (!a)
|
|
1857
1874
|
throw new Error("Missing API key");
|
|
1858
1875
|
if (!["v2", "v3"].includes(g))
|
|
1859
1876
|
throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${g}'`);
|
|
1860
1877
|
(e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
|
|
1861
|
-
const b = new URL(`https://cdn.builder.io/api/${g}/content/${
|
|
1878
|
+
const b = new URL(`https://cdn.builder.io/api/${g}/content/${r}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${s}${m ? `&locale=${m}` : ""}${c ? `&enrich=${c}` : ""}`);
|
|
1862
1879
|
if (b.searchParams.set("omit", f || "meta.componentsUsed"), p && b.searchParams.set("fields", p), Number.isFinite(h) && h > -1 && b.searchParams.set("offset", String(Math.floor(h))), typeof v == "boolean" && b.searchParams.set("includeUnpublished", String(v)), u && te(u) && b.searchParams.set("cacheSeconds", String(u)), d && te(d) && b.searchParams.set("staleCacheSeconds", String(d)), y) {
|
|
1863
|
-
const w =
|
|
1880
|
+
const w = V({
|
|
1864
1881
|
sort: y
|
|
1865
1882
|
});
|
|
1866
|
-
for (const
|
|
1867
|
-
b.searchParams.set(
|
|
1883
|
+
for (const A in w)
|
|
1884
|
+
b.searchParams.set(A, JSON.stringify(w[A]));
|
|
1868
1885
|
}
|
|
1869
1886
|
const E = {
|
|
1870
|
-
...
|
|
1871
|
-
...
|
|
1872
|
-
}, T =
|
|
1887
|
+
...hn(),
|
|
1888
|
+
...Ie(e.options || {})
|
|
1889
|
+
}, T = V(E);
|
|
1873
1890
|
for (const w in T)
|
|
1874
1891
|
b.searchParams.set(w, String(T[w]));
|
|
1875
1892
|
if (o && b.searchParams.set("userAttributes", JSON.stringify(o)), i) {
|
|
1876
|
-
const w =
|
|
1893
|
+
const w = V({
|
|
1877
1894
|
query: i
|
|
1878
1895
|
});
|
|
1879
|
-
for (const
|
|
1880
|
-
b.searchParams.set(
|
|
1896
|
+
for (const A in w)
|
|
1897
|
+
b.searchParams.set(A, JSON.stringify(w[A]));
|
|
1881
1898
|
}
|
|
1882
1899
|
return b;
|
|
1883
|
-
},
|
|
1900
|
+
}, pn = (e) => "results" in e;
|
|
1884
1901
|
async function q(e) {
|
|
1885
|
-
const t = await
|
|
1902
|
+
const t = await Te({
|
|
1886
1903
|
...e,
|
|
1887
1904
|
limit: 1
|
|
1888
1905
|
});
|
|
1889
1906
|
return t && t[0] || null;
|
|
1890
1907
|
}
|
|
1891
|
-
const
|
|
1908
|
+
const io = q, gn = async (e) => {
|
|
1892
1909
|
const t = z(e);
|
|
1893
|
-
return await (await
|
|
1894
|
-
},
|
|
1895
|
-
const o =
|
|
1910
|
+
return await (await dn(t.href)).json();
|
|
1911
|
+
}, bn = async (e, t, n = z(e)) => {
|
|
1912
|
+
const o = U(e.canTrack);
|
|
1896
1913
|
if (n.search.includes("preview=")) {
|
|
1897
|
-
const
|
|
1898
|
-
for (const
|
|
1899
|
-
const s =
|
|
1900
|
-
|
|
1914
|
+
const r = [];
|
|
1915
|
+
for (const a of t.results) {
|
|
1916
|
+
const s = sn(n.searchParams);
|
|
1917
|
+
r.push(s || a);
|
|
1901
1918
|
}
|
|
1902
|
-
t.results =
|
|
1919
|
+
t.results = r;
|
|
1903
1920
|
}
|
|
1904
|
-
if (!o || !(
|
|
1921
|
+
if (!o || !(k() || I === "reactNative"))
|
|
1905
1922
|
return t.results;
|
|
1906
1923
|
try {
|
|
1907
|
-
const
|
|
1908
|
-
for (const
|
|
1909
|
-
|
|
1910
|
-
item:
|
|
1924
|
+
const r = [];
|
|
1925
|
+
for (const a of t.results)
|
|
1926
|
+
r.push(await $t({
|
|
1927
|
+
item: a,
|
|
1911
1928
|
canTrack: o
|
|
1912
1929
|
}));
|
|
1913
|
-
t.results =
|
|
1914
|
-
} catch (
|
|
1915
|
-
x.error("Could not process A/B tests. ",
|
|
1930
|
+
t.results = r;
|
|
1931
|
+
} catch (r) {
|
|
1932
|
+
x.error("Could not process A/B tests. ", r);
|
|
1916
1933
|
}
|
|
1917
1934
|
return t.results;
|
|
1918
1935
|
};
|
|
1919
|
-
async function
|
|
1936
|
+
async function Te(e) {
|
|
1920
1937
|
try {
|
|
1921
|
-
const t = z(e), n = await
|
|
1922
|
-
return
|
|
1938
|
+
const t = z(e), n = await gn(e);
|
|
1939
|
+
return pn(n) ? bn(e, n) : (x.error("Error fetching data. ", {
|
|
1923
1940
|
url: t,
|
|
1924
1941
|
content: n,
|
|
1925
1942
|
options: e
|
|
@@ -1928,13 +1945,13 @@ async function we(e) {
|
|
|
1928
1945
|
return x.error("Error fetching data. ", t), null;
|
|
1929
1946
|
}
|
|
1930
1947
|
}
|
|
1931
|
-
const
|
|
1932
|
-
function
|
|
1948
|
+
const ro = Te, yn = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
1949
|
+
function Sn(e, t) {
|
|
1933
1950
|
const n = new URL(t.origin), o = n.hostname;
|
|
1934
|
-
return (e ||
|
|
1951
|
+
return (e || yn).findIndex((i) => i.startsWith("*.") ? o.endsWith(i.slice(1)) : i === o) > -1;
|
|
1935
1952
|
}
|
|
1936
|
-
function
|
|
1937
|
-
return !
|
|
1953
|
+
function ao() {
|
|
1954
|
+
return !k() || j() ? !1 : location.search.indexOf("builder.preview=") !== -1;
|
|
1938
1955
|
}
|
|
1939
1956
|
function kn() {
|
|
1940
1957
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
@@ -1942,82 +1959,82 @@ function kn() {
|
|
|
1942
1959
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
1943
1960
|
});
|
|
1944
1961
|
}
|
|
1945
|
-
function
|
|
1962
|
+
function Ee() {
|
|
1946
1963
|
return kn().replace(/-/g, "");
|
|
1947
1964
|
}
|
|
1948
|
-
const
|
|
1965
|
+
const Re = "builderSessionId", vn = async ({
|
|
1949
1966
|
canTrack: e
|
|
1950
1967
|
}) => {
|
|
1951
1968
|
if (!e)
|
|
1952
1969
|
return;
|
|
1953
|
-
const t = await
|
|
1954
|
-
name:
|
|
1970
|
+
const t = await ge({
|
|
1971
|
+
name: Re,
|
|
1955
1972
|
canTrack: e
|
|
1956
1973
|
});
|
|
1957
1974
|
if (C(t))
|
|
1958
1975
|
return t;
|
|
1959
1976
|
{
|
|
1960
|
-
const n =
|
|
1961
|
-
return
|
|
1977
|
+
const n = xn();
|
|
1978
|
+
return Cn({
|
|
1962
1979
|
id: n,
|
|
1963
1980
|
canTrack: e
|
|
1964
1981
|
}), n;
|
|
1965
1982
|
}
|
|
1966
|
-
},
|
|
1983
|
+
}, xn = () => Ee(), Cn = ({
|
|
1967
1984
|
id: e,
|
|
1968
1985
|
canTrack: t
|
|
1969
|
-
}) =>
|
|
1970
|
-
name:
|
|
1986
|
+
}) => be({
|
|
1987
|
+
name: Re,
|
|
1971
1988
|
value: e,
|
|
1972
1989
|
canTrack: t
|
|
1973
|
-
}),
|
|
1990
|
+
}), Ae = () => k() && typeof localStorage < "u" ? localStorage : void 0, wn = ({
|
|
1974
1991
|
key: e,
|
|
1975
1992
|
canTrack: t
|
|
1976
1993
|
}) => {
|
|
1977
1994
|
var n;
|
|
1978
1995
|
try {
|
|
1979
|
-
return t ? (n =
|
|
1996
|
+
return t ? (n = Ae()) == null ? void 0 : n.getItem(e) : void 0;
|
|
1980
1997
|
} catch (o) {
|
|
1981
1998
|
console.debug("[LocalStorage] GET error: ", o);
|
|
1982
1999
|
return;
|
|
1983
2000
|
}
|
|
1984
|
-
},
|
|
2001
|
+
}, In = ({
|
|
1985
2002
|
key: e,
|
|
1986
2003
|
canTrack: t,
|
|
1987
2004
|
value: n
|
|
1988
2005
|
}) => {
|
|
1989
2006
|
var o;
|
|
1990
2007
|
try {
|
|
1991
|
-
t && ((o =
|
|
2008
|
+
t && ((o = Ae()) == null || o.setItem(e, n));
|
|
1992
2009
|
} catch (i) {
|
|
1993
2010
|
console.debug("[LocalStorage] SET error: ", i);
|
|
1994
2011
|
}
|
|
1995
|
-
},
|
|
2012
|
+
}, Pe = "builderVisitorId", Tn = ({
|
|
1996
2013
|
canTrack: e
|
|
1997
2014
|
}) => {
|
|
1998
2015
|
if (!e)
|
|
1999
2016
|
return;
|
|
2000
|
-
const t =
|
|
2001
|
-
key:
|
|
2017
|
+
const t = wn({
|
|
2018
|
+
key: Pe,
|
|
2002
2019
|
canTrack: e
|
|
2003
2020
|
});
|
|
2004
2021
|
if (C(t))
|
|
2005
2022
|
return t;
|
|
2006
2023
|
{
|
|
2007
|
-
const n =
|
|
2008
|
-
return
|
|
2024
|
+
const n = En();
|
|
2025
|
+
return Rn({
|
|
2009
2026
|
id: n,
|
|
2010
2027
|
canTrack: e
|
|
2011
2028
|
}), n;
|
|
2012
2029
|
}
|
|
2013
|
-
},
|
|
2030
|
+
}, En = () => Ee(), Rn = ({
|
|
2014
2031
|
id: e,
|
|
2015
2032
|
canTrack: t
|
|
2016
|
-
}) =>
|
|
2017
|
-
key:
|
|
2033
|
+
}) => In({
|
|
2034
|
+
key: Pe,
|
|
2018
2035
|
value: e,
|
|
2019
2036
|
canTrack: t
|
|
2020
|
-
}),
|
|
2037
|
+
}), An = async ({
|
|
2021
2038
|
canTrack: e
|
|
2022
2039
|
}) => {
|
|
2023
2040
|
if (!e)
|
|
@@ -2025,9 +2042,9 @@ const Te = "builderSessionId", Sn = async ({
|
|
|
2025
2042
|
visitorId: void 0,
|
|
2026
2043
|
sessionId: void 0
|
|
2027
2044
|
};
|
|
2028
|
-
const t = await
|
|
2045
|
+
const t = await vn({
|
|
2029
2046
|
canTrack: e
|
|
2030
|
-
}), n =
|
|
2047
|
+
}), n = Tn({
|
|
2031
2048
|
canTrack: e
|
|
2032
2049
|
});
|
|
2033
2050
|
return {
|
|
@@ -2048,19 +2065,19 @@ const Te = "builderSessionId", Sn = async ({
|
|
|
2048
2065
|
url: location.href,
|
|
2049
2066
|
...o
|
|
2050
2067
|
},
|
|
2051
|
-
...await
|
|
2068
|
+
...await An({
|
|
2052
2069
|
canTrack: t
|
|
2053
2070
|
}),
|
|
2054
|
-
userAttributes:
|
|
2071
|
+
userAttributes: le(),
|
|
2055
2072
|
ownerId: n
|
|
2056
2073
|
}
|
|
2057
2074
|
});
|
|
2058
|
-
async function
|
|
2075
|
+
async function Bn(e) {
|
|
2059
2076
|
if (!e.apiKey) {
|
|
2060
2077
|
x.error("Missing API key for track call. Please provide your API key.");
|
|
2061
2078
|
return;
|
|
2062
2079
|
}
|
|
2063
|
-
if (e.canTrack && !j() && (
|
|
2080
|
+
if (e.canTrack && !j() && (k() || I === "reactNative"))
|
|
2064
2081
|
return fetch("https://cdn.builder.io/api/v1/track", {
|
|
2065
2082
|
method: "POST",
|
|
2066
2083
|
body: JSON.stringify({
|
|
@@ -2074,7 +2091,7 @@ async function An(e) {
|
|
|
2074
2091
|
console.error("Failed to track: ", t);
|
|
2075
2092
|
});
|
|
2076
2093
|
}
|
|
2077
|
-
const
|
|
2094
|
+
const so = (e) => Bn({
|
|
2078
2095
|
...e,
|
|
2079
2096
|
canTrack: !0
|
|
2080
2097
|
});
|
|
@@ -2092,20 +2109,20 @@ const Vn = (e, t, n = !0) => {
|
|
|
2092
2109
|
return o;
|
|
2093
2110
|
} while (o = o.parentElement);
|
|
2094
2111
|
return null;
|
|
2095
|
-
},
|
|
2112
|
+
}, $n = (e) => Vn(e, (t) => {
|
|
2096
2113
|
const n = t.getAttribute("builder-id") || t.id;
|
|
2097
2114
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
2098
2115
|
}), oe = ({
|
|
2099
2116
|
event: e,
|
|
2100
2117
|
target: t
|
|
2101
2118
|
}) => {
|
|
2102
|
-
const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top,
|
|
2119
|
+
const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, r = ne(o / n.width), a = ne(i / n.height);
|
|
2103
2120
|
return {
|
|
2104
|
-
x:
|
|
2105
|
-
y:
|
|
2121
|
+
x: r,
|
|
2122
|
+
y: a
|
|
2106
2123
|
};
|
|
2107
|
-
},
|
|
2108
|
-
const t = e.target, n = t &&
|
|
2124
|
+
}, co = (e) => {
|
|
2125
|
+
const t = e.target, n = t && $n(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2109
2126
|
return {
|
|
2110
2127
|
targetBuilderElement: o || void 0,
|
|
2111
2128
|
metadata: {
|
|
@@ -2120,10 +2137,10 @@ const Vn = (e, t, n = !0) => {
|
|
|
2120
2137
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
2121
2138
|
}
|
|
2122
2139
|
};
|
|
2123
|
-
}, Wn = "0.12.
|
|
2124
|
-
function
|
|
2140
|
+
}, Wn = "0.12.7", ie = {};
|
|
2141
|
+
function On(e, t) {
|
|
2125
2142
|
let n = ie[e];
|
|
2126
|
-
if (n || (n = ie[e] = []), n.push(t),
|
|
2143
|
+
if (n || (n = ie[e] = []), n.push(t), k()) {
|
|
2127
2144
|
const o = {
|
|
2128
2145
|
type: "builder.register",
|
|
2129
2146
|
data: {
|
|
@@ -2138,8 +2155,8 @@ function $n(e, t) {
|
|
|
2138
2155
|
}
|
|
2139
2156
|
}
|
|
2140
2157
|
}
|
|
2141
|
-
const
|
|
2142
|
-
|
|
2158
|
+
const lo = () => {
|
|
2159
|
+
On("insertMenu", {
|
|
2143
2160
|
name: "_default",
|
|
2144
2161
|
default: !0,
|
|
2145
2162
|
items: [{
|
|
@@ -2161,10 +2178,10 @@ const io = () => {
|
|
|
2161
2178
|
}]
|
|
2162
2179
|
});
|
|
2163
2180
|
};
|
|
2164
|
-
let
|
|
2165
|
-
const
|
|
2181
|
+
let re = !1;
|
|
2182
|
+
const uo = (e = {}) => {
|
|
2166
2183
|
var t, n;
|
|
2167
|
-
|
|
2184
|
+
re || (re = !0, k() && ((t = window.parent) == null || t.postMessage({
|
|
2168
2185
|
type: "builder.sdkInfo",
|
|
2169
2186
|
data: {
|
|
2170
2187
|
target: I,
|
|
@@ -2181,8 +2198,8 @@ const ao = (e = {}) => {
|
|
|
2181
2198
|
options: e
|
|
2182
2199
|
}
|
|
2183
2200
|
}, "*"), window.addEventListener("message", (o) => {
|
|
2184
|
-
var
|
|
2185
|
-
if (!
|
|
2201
|
+
var r, a;
|
|
2202
|
+
if (!Sn(e.trustedHosts, o))
|
|
2186
2203
|
return;
|
|
2187
2204
|
const {
|
|
2188
2205
|
data: i
|
|
@@ -2197,7 +2214,7 @@ const ao = (e = {}) => {
|
|
|
2197
2214
|
} catch (h) {
|
|
2198
2215
|
f = h;
|
|
2199
2216
|
}
|
|
2200
|
-
f ? (
|
|
2217
|
+
f ? (r = window.parent) == null || r.postMessage({
|
|
2201
2218
|
type: "builder.evaluateError",
|
|
2202
2219
|
data: {
|
|
2203
2220
|
id: m,
|
|
@@ -2212,7 +2229,7 @@ const ao = (e = {}) => {
|
|
|
2212
2229
|
result: h
|
|
2213
2230
|
}
|
|
2214
2231
|
}, "*");
|
|
2215
|
-
}).catch(console.error) : (
|
|
2232
|
+
}).catch(console.error) : (a = window.parent) == null || a.postMessage({
|
|
2216
2233
|
type: "builder.evaluateResult",
|
|
2217
2234
|
data: {
|
|
2218
2235
|
result: p,
|
|
@@ -2223,9 +2240,51 @@ const ao = (e = {}) => {
|
|
|
2223
2240
|
}
|
|
2224
2241
|
}
|
|
2225
2242
|
})));
|
|
2226
|
-
}
|
|
2227
|
-
|
|
2228
|
-
const
|
|
2243
|
+
};
|
|
2244
|
+
function ae(e, ...t) {
|
|
2245
|
+
const n = Object(e);
|
|
2246
|
+
for (let o = 1; o < arguments.length; o++) {
|
|
2247
|
+
const i = arguments[o];
|
|
2248
|
+
if (i != null)
|
|
2249
|
+
for (const r in i)
|
|
2250
|
+
Object.prototype.hasOwnProperty.call(i, r) && (n[r] = i[r]);
|
|
2251
|
+
}
|
|
2252
|
+
return n;
|
|
2253
|
+
}
|
|
2254
|
+
const Nn = (e) => e ? e.replace(/([A-Z])/g, (t) => `-${t[0].toLowerCase()}`) : "";
|
|
2255
|
+
function Fn(e) {
|
|
2256
|
+
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
2257
|
+
}
|
|
2258
|
+
function Ln(e, t) {
|
|
2259
|
+
const n = Un(e), o = getComputedStyle(t), i = e.steps[0].styles, r = e.steps[e.steps.length - 1].styles, a = [i, r];
|
|
2260
|
+
for (const s of a)
|
|
2261
|
+
for (const c of n)
|
|
2262
|
+
c in s || (s[c] = o[c]);
|
|
2263
|
+
}
|
|
2264
|
+
function Un(e) {
|
|
2265
|
+
const t = [];
|
|
2266
|
+
for (const n of e.steps)
|
|
2267
|
+
for (const o in n.styles)
|
|
2268
|
+
t.indexOf(o) === -1 && t.push(o);
|
|
2269
|
+
return t;
|
|
2270
|
+
}
|
|
2271
|
+
function mo(e) {
|
|
2272
|
+
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
2273
|
+
if (!t.length) {
|
|
2274
|
+
Fn(e.elementId || e.id || "");
|
|
2275
|
+
return;
|
|
2276
|
+
}
|
|
2277
|
+
Array.from(t).forEach((n) => {
|
|
2278
|
+
Ln(e, n), n.style.transition = "none", n.style.transitionDelay = "0", ae(n.style, e.steps[0].styles), setTimeout(() => {
|
|
2279
|
+
n.style.transition = `all ${e.duration}s ${Nn(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), ae(n.style, e.steps[1].styles), setTimeout(() => {
|
|
2280
|
+
n.style.transition = "", n.style.transitionDelay = "";
|
|
2281
|
+
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
2282
|
+
});
|
|
2283
|
+
});
|
|
2284
|
+
}
|
|
2285
|
+
const _n = (e) => {
|
|
2286
|
+
var r;
|
|
2287
|
+
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((r = e == null ? void 0 : e.files) == null ? void 0 : r.regular);
|
|
2229
2288
|
let i = "";
|
|
2230
2289
|
if (o && t && n && (i += `
|
|
2231
2290
|
@font-face {
|
|
@@ -2235,36 +2294,36 @@ font-display: fallback;
|
|
|
2235
2294
|
font-weight: 400;
|
|
2236
2295
|
}
|
|
2237
2296
|
`.trim()), e.files)
|
|
2238
|
-
for (const
|
|
2239
|
-
if (!(String(Number(
|
|
2297
|
+
for (const a in e.files) {
|
|
2298
|
+
if (!(String(Number(a)) === a))
|
|
2240
2299
|
continue;
|
|
2241
|
-
const c = e.files[
|
|
2300
|
+
const c = e.files[a];
|
|
2242
2301
|
c && c !== o && (i += `
|
|
2243
2302
|
@font-face {
|
|
2244
2303
|
font-family: "${t}";
|
|
2245
2304
|
src: url('${c}') format('woff2');
|
|
2246
2305
|
font-display: fallback;
|
|
2247
|
-
font-weight: ${
|
|
2306
|
+
font-weight: ${a};
|
|
2248
2307
|
}
|
|
2249
2308
|
`.trim());
|
|
2250
2309
|
}
|
|
2251
2310
|
return i;
|
|
2252
|
-
},
|
|
2311
|
+
}, Dn = ({
|
|
2253
2312
|
customFonts: e
|
|
2254
2313
|
}) => {
|
|
2255
2314
|
var t;
|
|
2256
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
2257
|
-
},
|
|
2315
|
+
return ((t = e == null ? void 0 : e.map((n) => _n(n))) == null ? void 0 : t.join(" ")) || "";
|
|
2316
|
+
}, Mn = ({
|
|
2258
2317
|
cssCode: e,
|
|
2259
2318
|
contentId: t
|
|
2260
2319
|
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
|
|
2261
|
-
function
|
|
2320
|
+
function jn(e) {
|
|
2262
2321
|
const t = `
|
|
2263
|
-
${
|
|
2322
|
+
${Mn({
|
|
2264
2323
|
cssCode: e.cssCode,
|
|
2265
2324
|
contentId: e.contentId
|
|
2266
2325
|
})}
|
|
2267
|
-
${
|
|
2326
|
+
${Dn({
|
|
2268
2327
|
customFonts: e.customFonts
|
|
2269
2328
|
})}
|
|
2270
2329
|
|
|
@@ -2287,14 +2346,14 @@ ${Nn({
|
|
|
2287
2346
|
`.trim();
|
|
2288
2347
|
return /* @__PURE__ */ l(O, { styles: t });
|
|
2289
2348
|
}
|
|
2290
|
-
const
|
|
2349
|
+
const Hn = ({
|
|
2291
2350
|
content: e,
|
|
2292
2351
|
data: t,
|
|
2293
2352
|
locale: n
|
|
2294
2353
|
}) => {
|
|
2295
|
-
var
|
|
2296
|
-
const o = {}, i = ((
|
|
2297
|
-
return (s = (
|
|
2354
|
+
var r, a, s;
|
|
2355
|
+
const o = {}, i = ((r = e == null ? void 0 : e.data) == null ? void 0 : r.state) || {};
|
|
2356
|
+
return (s = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || s.forEach((c) => {
|
|
2298
2357
|
c.name && c.defaultValue !== void 0 && (o[c.name] = c.defaultValue);
|
|
2299
2358
|
}), {
|
|
2300
2359
|
...o,
|
|
@@ -2304,7 +2363,7 @@ const _n = ({
|
|
|
2304
2363
|
locale: n
|
|
2305
2364
|
} : {}
|
|
2306
2365
|
};
|
|
2307
|
-
},
|
|
2366
|
+
}, Kn = ({
|
|
2308
2367
|
content: e,
|
|
2309
2368
|
data: t
|
|
2310
2369
|
}) => e ? {
|
|
@@ -2315,13 +2374,13 @@ const _n = ({
|
|
|
2315
2374
|
},
|
|
2316
2375
|
meta: e == null ? void 0 : e.meta
|
|
2317
2376
|
} : void 0;
|
|
2318
|
-
function
|
|
2319
|
-
var i,
|
|
2320
|
-
const t =
|
|
2377
|
+
function se(e) {
|
|
2378
|
+
var i, r, a, s, c, m, g, p, f;
|
|
2379
|
+
const t = on({
|
|
2321
2380
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2322
2381
|
variationId: (i = e.content) == null ? void 0 : i.testVariationId,
|
|
2323
2382
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2324
|
-
contentId: (
|
|
2383
|
+
contentId: (r = e.content) == null ? void 0 : r.id
|
|
2325
2384
|
}), n = [
|
|
2326
2385
|
...X(),
|
|
2327
2386
|
// While this `components` object is deprecated, we must maintain support for it.
|
|
@@ -2336,17 +2395,17 @@ function re(e) {
|
|
|
2336
2395
|
...h,
|
|
2337
2396
|
[d.name]: {
|
|
2338
2397
|
component: u,
|
|
2339
|
-
...
|
|
2398
|
+
..._(d)
|
|
2340
2399
|
}
|
|
2341
2400
|
}),
|
|
2342
2401
|
{}
|
|
2343
2402
|
), o = {
|
|
2344
|
-
content:
|
|
2403
|
+
content: Kn({
|
|
2345
2404
|
content: e.content,
|
|
2346
2405
|
data: e.data
|
|
2347
2406
|
}),
|
|
2348
2407
|
localState: void 0,
|
|
2349
|
-
rootState:
|
|
2408
|
+
rootState: Hn({
|
|
2350
2409
|
content: e.content,
|
|
2351
2410
|
data: e.data,
|
|
2352
2411
|
locale: e.locale
|
|
@@ -2367,7 +2426,7 @@ function re(e) {
|
|
|
2367
2426
|
].reduce(
|
|
2368
2427
|
(h, { component: u, ...d }) => ({
|
|
2369
2428
|
...h,
|
|
2370
|
-
[d.name]:
|
|
2429
|
+
[d.name]: _(d)
|
|
2371
2430
|
}),
|
|
2372
2431
|
{}
|
|
2373
2432
|
),
|
|
@@ -2376,7 +2435,7 @@ function re(e) {
|
|
|
2376
2435
|
BlocksWrapperProps: e.blocksWrapperProps || {}
|
|
2377
2436
|
};
|
|
2378
2437
|
return /* @__PURE__ */ R(
|
|
2379
|
-
|
|
2438
|
+
Ke,
|
|
2380
2439
|
{
|
|
2381
2440
|
content: e.content,
|
|
2382
2441
|
data: e.data,
|
|
@@ -2394,11 +2453,11 @@ function re(e) {
|
|
|
2394
2453
|
linkComponent: e.linkComponent,
|
|
2395
2454
|
trustedHosts: e.trustedHosts,
|
|
2396
2455
|
children: [
|
|
2397
|
-
e.isSsrAbTest ? /* @__PURE__ */ l(
|
|
2398
|
-
/* @__PURE__ */ l(
|
|
2399
|
-
|
|
2456
|
+
e.isSsrAbTest ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(D, { scriptStr: t }) }) : null,
|
|
2457
|
+
/* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(
|
|
2458
|
+
jn,
|
|
2400
2459
|
{
|
|
2401
|
-
contentId: (
|
|
2460
|
+
contentId: (a = o.content) == null ? void 0 : a.id,
|
|
2402
2461
|
cssCode: (c = (s = o.content) == null ? void 0 : s.data) == null ? void 0 : c.cssCode,
|
|
2403
2462
|
customFonts: (g = (m = o.content) == null ? void 0 : m.data) == null ? void 0 : g.customFonts
|
|
2404
2463
|
}
|
|
@@ -2416,22 +2475,22 @@ function re(e) {
|
|
|
2416
2475
|
}
|
|
2417
2476
|
);
|
|
2418
2477
|
}
|
|
2419
|
-
function
|
|
2420
|
-
var
|
|
2421
|
-
const t =
|
|
2422
|
-
canTrack:
|
|
2478
|
+
function Be(e) {
|
|
2479
|
+
var r, a;
|
|
2480
|
+
const t = Zt({
|
|
2481
|
+
canTrack: U(e.canTrack),
|
|
2423
2482
|
content: e.content
|
|
2424
2483
|
}), n = function() {
|
|
2425
2484
|
var c;
|
|
2426
|
-
return
|
|
2427
|
-
|
|
2485
|
+
return nn(
|
|
2486
|
+
B(e.content).map((m) => ({
|
|
2428
2487
|
id: m.testVariationId,
|
|
2429
2488
|
testRatio: m.testRatio
|
|
2430
2489
|
})),
|
|
2431
2490
|
((c = e.content) == null ? void 0 : c.id) || ""
|
|
2432
2491
|
);
|
|
2433
2492
|
}, o = function() {
|
|
2434
|
-
return
|
|
2493
|
+
return B(e.content).map((c) => `.variant-${c.testVariationId} { display: none; } `).join("");
|
|
2435
2494
|
}, i = function() {
|
|
2436
2495
|
var c;
|
|
2437
2496
|
return t ? {
|
|
@@ -2439,22 +2498,22 @@ function Pe(e) {
|
|
|
2439
2498
|
testVariationId: (c = e.content) == null ? void 0 : c.id
|
|
2440
2499
|
} : Vt({
|
|
2441
2500
|
item: e.content,
|
|
2442
|
-
canTrack:
|
|
2501
|
+
canTrack: U(e.canTrack)
|
|
2443
2502
|
});
|
|
2444
2503
|
};
|
|
2445
|
-
return /* @__PURE__ */ R(
|
|
2446
|
-
!e.__isNestedRender && I !== "reactNative" ? /* @__PURE__ */ l(
|
|
2447
|
-
t ? /* @__PURE__ */ R(
|
|
2504
|
+
return /* @__PURE__ */ R(S, { children: [
|
|
2505
|
+
!e.__isNestedRender && I !== "reactNative" ? /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(D, { scriptStr: tn() }) }) : null,
|
|
2506
|
+
t ? /* @__PURE__ */ R(S, { children: [
|
|
2448
2507
|
/* @__PURE__ */ l(
|
|
2449
2508
|
O,
|
|
2450
2509
|
{
|
|
2451
|
-
id: `variants-styles-${(
|
|
2510
|
+
id: `variants-styles-${(r = e.content) == null ? void 0 : r.id}`,
|
|
2452
2511
|
styles: o()
|
|
2453
2512
|
}
|
|
2454
2513
|
),
|
|
2455
2514
|
/* @__PURE__ */ l(D, { scriptStr: n() }),
|
|
2456
|
-
(
|
|
2457
|
-
|
|
2515
|
+
(a = B(e.content)) == null ? void 0 : a.map((s) => /* @__PURE__ */ l(
|
|
2516
|
+
se,
|
|
2458
2517
|
{
|
|
2459
2518
|
content: s,
|
|
2460
2519
|
showContent: !1,
|
|
@@ -2480,7 +2539,7 @@ function Pe(e) {
|
|
|
2480
2539
|
))
|
|
2481
2540
|
] }) : null,
|
|
2482
2541
|
/* @__PURE__ */ l(
|
|
2483
|
-
|
|
2542
|
+
se,
|
|
2484
2543
|
{
|
|
2485
2544
|
content: i(),
|
|
2486
2545
|
showContent: !0,
|
|
@@ -2505,7 +2564,7 @@ function Pe(e) {
|
|
|
2505
2564
|
)
|
|
2506
2565
|
] });
|
|
2507
2566
|
}
|
|
2508
|
-
const
|
|
2567
|
+
const zn = async ({
|
|
2509
2568
|
builderContextValue: e,
|
|
2510
2569
|
symbol: t
|
|
2511
2570
|
}) => {
|
|
@@ -2524,8 +2583,8 @@ const Dn = async ({
|
|
|
2524
2583
|
x.error("Could not fetch symbol content: ", n);
|
|
2525
2584
|
});
|
|
2526
2585
|
};
|
|
2527
|
-
async function
|
|
2528
|
-
var o, i,
|
|
2586
|
+
async function qn(e) {
|
|
2587
|
+
var o, i, r, a, s;
|
|
2529
2588
|
const t = function() {
|
|
2530
2589
|
var m, g;
|
|
2531
2590
|
return [
|
|
@@ -2534,12 +2593,12 @@ async function Mn(e) {
|
|
|
2534
2593
|
(m = e.symbol) != null && m.inline ? "builder-inline-symbol" : void 0,
|
|
2535
2594
|
(g = e.symbol) != null && g.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
2536
2595
|
].filter(Boolean).join(" ");
|
|
2537
|
-
}, n = ((o = e.symbol) == null ? void 0 : o.content) || await
|
|
2596
|
+
}, n = ((o = e.symbol) == null ? void 0 : o.content) || await zn({
|
|
2538
2597
|
symbol: e.symbol,
|
|
2539
2598
|
builderContextValue: e.builderContext
|
|
2540
2599
|
});
|
|
2541
2600
|
return /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
|
|
2542
|
-
|
|
2601
|
+
Be,
|
|
2543
2602
|
{
|
|
2544
2603
|
__isNestedRender: !0,
|
|
2545
2604
|
apiVersion: e.builderContext.apiVersion,
|
|
@@ -2550,9 +2609,9 @@ async function Mn(e) {
|
|
|
2550
2609
|
},
|
|
2551
2610
|
customComponents: Object.values(e.builderComponents),
|
|
2552
2611
|
data: {
|
|
2553
|
-
...(
|
|
2612
|
+
...(r = e.symbol) == null ? void 0 : r.data,
|
|
2554
2613
|
...e.builderContext.localState,
|
|
2555
|
-
...(
|
|
2614
|
+
...(a = n == null ? void 0 : n.data) == null ? void 0 : a.state
|
|
2556
2615
|
},
|
|
2557
2616
|
model: (s = e.symbol) == null ? void 0 : s.model,
|
|
2558
2617
|
content: n,
|
|
@@ -2560,19 +2619,19 @@ async function Mn(e) {
|
|
|
2560
2619
|
}
|
|
2561
2620
|
) });
|
|
2562
2621
|
}
|
|
2563
|
-
const
|
|
2564
|
-
function
|
|
2565
|
-
if (
|
|
2566
|
-
Object.assign(
|
|
2622
|
+
const fo = F, ho = Be, ce = {};
|
|
2623
|
+
function po(e) {
|
|
2624
|
+
if (k()) {
|
|
2625
|
+
Object.assign(ce, e);
|
|
2567
2626
|
const t = {
|
|
2568
2627
|
type: "builder.settingsChange",
|
|
2569
|
-
data:
|
|
2628
|
+
data: ce
|
|
2570
2629
|
};
|
|
2571
2630
|
parent.postMessage(t, "*");
|
|
2572
2631
|
}
|
|
2573
2632
|
}
|
|
2574
|
-
const
|
|
2575
|
-
var o, i,
|
|
2633
|
+
const go = async (e) => {
|
|
2634
|
+
var o, i, r;
|
|
2576
2635
|
const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((i = e.userAttributes) == null ? void 0 : i.urlPath), n = {
|
|
2577
2636
|
...e,
|
|
2578
2637
|
apiKey: e.apiKey,
|
|
@@ -2583,7 +2642,7 @@ const lo = async (e) => {
|
|
|
2583
2642
|
urlPath: t
|
|
2584
2643
|
} : {}
|
|
2585
2644
|
},
|
|
2586
|
-
options:
|
|
2645
|
+
options: we(e.searchParams || ((r = e.url) == null ? void 0 : r.searchParams) || e.options)
|
|
2587
2646
|
};
|
|
2588
2647
|
return {
|
|
2589
2648
|
apiKey: n.apiKey,
|
|
@@ -2592,42 +2651,43 @@ const lo = async (e) => {
|
|
|
2592
2651
|
};
|
|
2593
2652
|
};
|
|
2594
2653
|
export {
|
|
2595
|
-
|
|
2654
|
+
bn as A,
|
|
2596
2655
|
F as B,
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2656
|
+
Be as C,
|
|
2657
|
+
Te as D,
|
|
2658
|
+
ro as E,
|
|
2659
|
+
io as F,
|
|
2660
|
+
we as G,
|
|
2661
|
+
so as H,
|
|
2662
|
+
go as I,
|
|
2663
|
+
fo as R,
|
|
2664
|
+
qn as S,
|
|
2665
|
+
qt as T,
|
|
2666
|
+
Bn as _,
|
|
2667
|
+
bt as a,
|
|
2668
|
+
eo as b,
|
|
2609
2669
|
j as c,
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2670
|
+
to as d,
|
|
2671
|
+
no as e,
|
|
2672
|
+
k as f,
|
|
2613
2673
|
M as g,
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2674
|
+
U as h,
|
|
2675
|
+
Zn as i,
|
|
2676
|
+
ao as j,
|
|
2677
|
+
Sn as k,
|
|
2618
2678
|
x as l,
|
|
2619
2679
|
H as m,
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2680
|
+
co as n,
|
|
2681
|
+
W as o,
|
|
2682
|
+
oo as p,
|
|
2623
2683
|
q,
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2684
|
+
lo as r,
|
|
2685
|
+
uo as s,
|
|
2686
|
+
mo as t,
|
|
2687
|
+
dn as u,
|
|
2688
|
+
an as v,
|
|
2689
|
+
ho as w,
|
|
2690
|
+
kt as x,
|
|
2691
|
+
On as y,
|
|
2692
|
+
po as z
|
|
2633
2693
|
};
|