@builder.io/sdk-react-nextjs 0.7.0 → 0.7.1-1
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/USE_CLIENT_BUNDLE-34ca6573.js +23 -0
- package/lib/browser/USE_CLIENT_BUNDLE-35cf57f2.mjs +657 -0
- package/lib/browser/USE_SERVER_BUNDLE-5f0752b4.mjs +11 -0
- package/lib/{edge/USE_SERVER_BUNDLE-105e9ef3.js → browser/USE_SERVER_BUNDLE-da1cf240.js} +1 -1
- package/lib/browser/{bundle-3b073b16.mjs → bundle-f0e86750.mjs} +680 -663
- package/lib/browser/bundle-fa4c07cb.js +76 -0
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +7 -7
- package/lib/edge/USE_CLIENT_BUNDLE-2841cf29.js +23 -0
- package/lib/edge/USE_CLIENT_BUNDLE-aeac6d00.mjs +657 -0
- package/lib/edge/USE_SERVER_BUNDLE-015ab545.mjs +11 -0
- package/lib/{node/USE_SERVER_BUNDLE-d8c698c8.js → edge/USE_SERVER_BUNDLE-ef1618a6.js} +1 -1
- package/lib/edge/{bundle-ed178c62.mjs → bundle-3c711a0f.mjs} +2053 -2008
- package/lib/edge/bundle-bfbd5fa6.js +96 -0
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +7 -7
- package/lib/node/USE_CLIENT_BUNDLE-a30d8b97.js +23 -0
- package/lib/node/USE_CLIENT_BUNDLE-fc82531c.mjs +657 -0
- package/lib/node/USE_SERVER_BUNDLE-25e36fa7.mjs +11 -0
- package/lib/{browser/USE_SERVER_BUNDLE-d8c698c8.js → node/USE_SERVER_BUNDLE-b26e79d4.js} +1 -1
- package/lib/node/bundle-23b73f20.js +116 -0
- package/lib/node/{bundle-3b073b16.mjs → bundle-4a8d8d92.mjs} +895 -781
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +7 -7
- package/package.json +4 -3
- package/types/blocks/image/image.d.ts +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/functions/evaluate/choose-eval.d.ts +6 -0
- package/types/functions/evaluate/evaluate.d.ts +1 -5
- package/types/functions/evaluate/helpers.d.ts +7 -1
- package/types/functions/get-content/types.d.ts +94 -3
- package/lib/browser/USE_CLIENT_BUNDLE-3a41b1ba.js +0 -23
- package/lib/browser/USE_CLIENT_BUNDLE-fc8c1bc0.mjs +0 -618
- package/lib/browser/USE_SERVER_BUNDLE-226a15ac.mjs +0 -11
- package/lib/browser/bundle-0fae602b.js +0 -76
- package/lib/edge/USE_CLIENT_BUNDLE-0e9f8e67.mjs +0 -618
- package/lib/edge/USE_CLIENT_BUNDLE-d48583e8.js +0 -23
- package/lib/edge/USE_SERVER_BUNDLE-f6a1e321.mjs +0 -11
- package/lib/edge/bundle-0c1d9099.js +0 -96
- package/lib/node/USE_CLIENT_BUNDLE-3a41b1ba.js +0 -23
- package/lib/node/USE_CLIENT_BUNDLE-fc8c1bc0.mjs +0 -618
- package/lib/node/USE_SERVER_BUNDLE-226a15ac.mjs +0 -11
- package/lib/node/bundle-0fae602b.js +0 -76
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { LRUCache as
|
|
2
|
-
import { jsx as l, Fragment as x, jsxs as
|
|
3
|
-
import { createElement as
|
|
4
|
-
import { I as
|
|
1
|
+
import { LRUCache as $e } from "lru-cache";
|
|
2
|
+
import { jsx as l, Fragment as x, jsxs as C } from "react/jsx-runtime";
|
|
3
|
+
import { createElement as Pe } from "react";
|
|
4
|
+
import { I as Be, B as J, a as Fe, b as Oe, C as Ne, E as We, F as Le, c as Ue, d as Me, S as _e, V as je, e as Ke } from "./USE_CLIENT_BUNDLE-35cf57f2.mjs";
|
|
5
5
|
import "next/navigation";
|
|
6
|
-
const
|
|
6
|
+
const F = (e) => JSON.parse(JSON.stringify(e)), ue = {
|
|
7
7
|
small: {
|
|
8
8
|
min: 320,
|
|
9
9
|
default: 321,
|
|
@@ -19,11 +19,11 @@ const A = (e) => JSON.parse(JSON.stringify(e)), ae = {
|
|
|
19
19
|
default: 991,
|
|
20
20
|
max: 1200
|
|
21
21
|
}
|
|
22
|
-
},
|
|
22
|
+
}, Y = (e, t = ue) => `@media (max-width: ${t[e].max}px)`, de = ({
|
|
23
23
|
small: e,
|
|
24
24
|
medium: t
|
|
25
25
|
}) => {
|
|
26
|
-
const n =
|
|
26
|
+
const n = F(ue);
|
|
27
27
|
if (!e || !t)
|
|
28
28
|
return n;
|
|
29
29
|
const o = Math.floor(e / 2);
|
|
@@ -45,29 +45,29 @@ const A = (e) => JSON.parse(JSON.stringify(e)), ae = {
|
|
|
45
45
|
min: r,
|
|
46
46
|
default: r + 1
|
|
47
47
|
}, n;
|
|
48
|
-
},
|
|
49
|
-
log: (...e) => console.log(
|
|
50
|
-
error: (...e) => console.error(
|
|
51
|
-
warn: (...e) => console.warn(
|
|
52
|
-
debug: (...e) => console.debug(
|
|
48
|
+
}, T = "rsc", V = "[Builder.io]: ", k = {
|
|
49
|
+
log: (...e) => console.log(V, ...e),
|
|
50
|
+
error: (...e) => console.error(V, ...e),
|
|
51
|
+
warn: (...e) => console.warn(V, ...e),
|
|
52
|
+
debug: (...e) => console.debug(V, ...e)
|
|
53
53
|
};
|
|
54
54
|
function v() {
|
|
55
55
|
return typeof window < "u" && typeof document < "u";
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function He() {
|
|
58
58
|
return v() && window.self !== window.top;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
return
|
|
60
|
+
function j() {
|
|
61
|
+
return He() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
62
62
|
}
|
|
63
|
-
const
|
|
63
|
+
const De = () => {
|
|
64
64
|
if (v()) {
|
|
65
65
|
const e = new URL(location.href);
|
|
66
66
|
return e.pathname === "" && (e.pathname = "/"), e;
|
|
67
67
|
} else
|
|
68
68
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
69
|
-
},
|
|
70
|
-
const e =
|
|
69
|
+
}, ze = () => typeof navigator == "object" && navigator.userAgent || "", me = () => {
|
|
70
|
+
const e = ze(), t = {
|
|
71
71
|
Android() {
|
|
72
72
|
return e.match(/Android/i);
|
|
73
73
|
},
|
|
@@ -84,15 +84,15 @@ const _e = () => {
|
|
|
84
84
|
return e.match(/IEMobile/i) || e.match(/WPDesktop/i);
|
|
85
85
|
},
|
|
86
86
|
any() {
|
|
87
|
-
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() ||
|
|
87
|
+
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || T === "reactNative";
|
|
88
88
|
}
|
|
89
|
-
}, n = e.match(/Tablet|iPad/i), o =
|
|
89
|
+
}, n = e.match(/Tablet|iPad/i), o = De();
|
|
90
90
|
return {
|
|
91
91
|
urlPath: o == null ? void 0 : o.pathname,
|
|
92
92
|
host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
|
|
93
93
|
device: n ? "tablet" : t.any() ? "mobile" : "desktop"
|
|
94
94
|
};
|
|
95
|
-
},
|
|
95
|
+
}, qe = ({
|
|
96
96
|
builder: e,
|
|
97
97
|
context: t,
|
|
98
98
|
event: n,
|
|
@@ -104,7 +104,14 @@ const _e = () => {
|
|
|
104
104
|
builder: e,
|
|
105
105
|
context: t,
|
|
106
106
|
event: n
|
|
107
|
-
}),
|
|
107
|
+
}), Ge = () => ({
|
|
108
|
+
isEditing: j(),
|
|
109
|
+
isBrowser: v(),
|
|
110
|
+
isServer: !v(),
|
|
111
|
+
getUserAttributes: () => me()
|
|
112
|
+
}), Je = (e, {
|
|
113
|
+
isExpression: t = !0
|
|
114
|
+
}) => /* 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, X = ({
|
|
108
115
|
code: e,
|
|
109
116
|
builder: t,
|
|
110
117
|
context: n,
|
|
@@ -113,15 +120,15 @@ const _e = () => {
|
|
|
113
120
|
rootSetState: r,
|
|
114
121
|
rootState: a
|
|
115
122
|
}) => {
|
|
116
|
-
const c =
|
|
123
|
+
const c = qe({
|
|
117
124
|
builder: t,
|
|
118
125
|
context: n,
|
|
119
126
|
event: o,
|
|
120
|
-
state:
|
|
127
|
+
state: Ye(a, i, r)
|
|
121
128
|
});
|
|
122
129
|
return new Function(...c.map(([s]) => s), e)(...c.map(([, s]) => s));
|
|
123
130
|
};
|
|
124
|
-
function
|
|
131
|
+
function Ye(e, t, n) {
|
|
125
132
|
if (e === t)
|
|
126
133
|
throw new Error("rootState === localState");
|
|
127
134
|
return new Proxy(e, {
|
|
@@ -133,7 +140,8 @@ function De(e, t, n) {
|
|
|
133
140
|
}
|
|
134
141
|
});
|
|
135
142
|
}
|
|
136
|
-
|
|
143
|
+
const Xe = (e) => (v(), X(e));
|
|
144
|
+
function K({
|
|
137
145
|
code: e,
|
|
138
146
|
context: t,
|
|
139
147
|
localState: n,
|
|
@@ -147,13 +155,10 @@ function M({
|
|
|
147
155
|
return;
|
|
148
156
|
}
|
|
149
157
|
const c = {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}, f = {
|
|
155
|
-
code: /* we disable this for cases where we definitely don't want a return */ a && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e,
|
|
156
|
-
builder: c,
|
|
158
|
+
code: Je(e, {
|
|
159
|
+
isExpression: a
|
|
160
|
+
}),
|
|
161
|
+
builder: Ge(),
|
|
157
162
|
context: t,
|
|
158
163
|
event: r,
|
|
159
164
|
rootSetState: i,
|
|
@@ -161,21 +166,21 @@ function M({
|
|
|
161
166
|
localState: n
|
|
162
167
|
};
|
|
163
168
|
try {
|
|
164
|
-
return
|
|
165
|
-
} catch (
|
|
166
|
-
k.error("Failed code evaluation: " +
|
|
169
|
+
return Xe(c);
|
|
170
|
+
} catch (s) {
|
|
171
|
+
k.error("Failed code evaluation: " + s.message, {
|
|
167
172
|
code: e
|
|
168
173
|
});
|
|
169
174
|
return;
|
|
170
175
|
}
|
|
171
176
|
}
|
|
172
|
-
const
|
|
177
|
+
const Qe = (e, t, n) => {
|
|
173
178
|
if (Object(e) !== e)
|
|
174
179
|
return e;
|
|
175
180
|
const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
176
181
|
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;
|
|
177
182
|
};
|
|
178
|
-
const
|
|
183
|
+
const Ze = ({
|
|
179
184
|
block: e,
|
|
180
185
|
context: t,
|
|
181
186
|
localState: n,
|
|
@@ -184,7 +189,7 @@ const qe = ({
|
|
|
184
189
|
}) => {
|
|
185
190
|
if (!e.bindings)
|
|
186
191
|
return e;
|
|
187
|
-
const r =
|
|
192
|
+
const r = F(e), a = {
|
|
188
193
|
...r,
|
|
189
194
|
properties: {
|
|
190
195
|
...r.properties
|
|
@@ -194,18 +199,18 @@ const qe = ({
|
|
|
194
199
|
}
|
|
195
200
|
};
|
|
196
201
|
for (const c in e.bindings) {
|
|
197
|
-
const s = e.bindings[c],
|
|
202
|
+
const s = e.bindings[c], d = K({
|
|
198
203
|
code: s,
|
|
199
204
|
localState: n,
|
|
200
205
|
rootState: o,
|
|
201
206
|
rootSetState: i,
|
|
202
207
|
context: t
|
|
203
208
|
});
|
|
204
|
-
|
|
209
|
+
Qe(a, c, d);
|
|
205
210
|
}
|
|
206
211
|
return a;
|
|
207
212
|
};
|
|
208
|
-
function
|
|
213
|
+
function B({
|
|
209
214
|
block: e,
|
|
210
215
|
context: t,
|
|
211
216
|
shouldEvaluateBindings: n,
|
|
@@ -214,7 +219,7 @@ function E({
|
|
|
214
219
|
rootSetState: r
|
|
215
220
|
}) {
|
|
216
221
|
const a = e;
|
|
217
|
-
return n ?
|
|
222
|
+
return n ? Ze({
|
|
218
223
|
block: a,
|
|
219
224
|
localState: o,
|
|
220
225
|
rootState: i,
|
|
@@ -222,28 +227,28 @@ function E({
|
|
|
222
227
|
context: t
|
|
223
228
|
}) : a;
|
|
224
229
|
}
|
|
225
|
-
const
|
|
230
|
+
const et = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), I = (e) => e != null, fe = (e) => Object.entries(e).map(([n, o]) => {
|
|
226
231
|
if (typeof o == "string")
|
|
227
|
-
return `${
|
|
228
|
-
}).filter(
|
|
229
|
-
`),
|
|
232
|
+
return `${et(n)}: ${o};`;
|
|
233
|
+
}).filter(I), tt = (e) => fe(e).join(`
|
|
234
|
+
`), W = ({
|
|
230
235
|
mediaQuery: e,
|
|
231
236
|
className: t,
|
|
232
237
|
styles: n
|
|
233
238
|
}) => {
|
|
234
239
|
const o = `.${t} {
|
|
235
|
-
${
|
|
240
|
+
${tt(n)}
|
|
236
241
|
}`;
|
|
237
242
|
return e ? `${e} {
|
|
238
243
|
${o}
|
|
239
244
|
}` : o;
|
|
240
245
|
};
|
|
241
|
-
function
|
|
246
|
+
function O(e) {
|
|
242
247
|
return /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
|
|
243
248
|
}
|
|
244
|
-
function
|
|
249
|
+
function H(e) {
|
|
245
250
|
const t = function() {
|
|
246
|
-
const i =
|
|
251
|
+
const i = B({
|
|
247
252
|
block: e.block,
|
|
248
253
|
localState: e.context.localState,
|
|
249
254
|
rootState: e.context.rootState,
|
|
@@ -251,44 +256,44 @@ function U(e) {
|
|
|
251
256
|
context: e.context.context,
|
|
252
257
|
shouldEvaluateBindings: !0
|
|
253
258
|
});
|
|
254
|
-
return
|
|
259
|
+
return I(i.hide) ? !i.hide : I(i.show) ? i.show : !0;
|
|
255
260
|
}, n = function() {
|
|
256
|
-
var
|
|
257
|
-
const i =
|
|
261
|
+
var u;
|
|
262
|
+
const i = B({
|
|
258
263
|
block: e.block,
|
|
259
264
|
localState: e.context.localState,
|
|
260
265
|
rootState: e.context.rootState,
|
|
261
266
|
rootSetState: e.context.rootSetState,
|
|
262
267
|
context: e.context.context,
|
|
263
268
|
shouldEvaluateBindings: !0
|
|
264
|
-
}), r = i.responsiveStyles, a = e.context.content, c =
|
|
265
|
-
((
|
|
266
|
-
), s = r == null ? void 0 : r.large,
|
|
267
|
-
if (!
|
|
269
|
+
}), r = i.responsiveStyles, a = e.context.content, c = de(
|
|
270
|
+
((u = a == null ? void 0 : a.meta) == null ? void 0 : u.breakpoints) || {}
|
|
271
|
+
), s = r == null ? void 0 : r.large, d = r == null ? void 0 : r.medium, f = r == null ? void 0 : r.small, p = i.id;
|
|
272
|
+
if (!p)
|
|
268
273
|
return "";
|
|
269
|
-
const
|
|
270
|
-
className:
|
|
274
|
+
const b = s ? W({
|
|
275
|
+
className: p,
|
|
271
276
|
styles: s
|
|
272
|
-
}) : "", m =
|
|
273
|
-
className:
|
|
274
|
-
styles:
|
|
275
|
-
mediaQuery:
|
|
277
|
+
}) : "", m = d ? W({
|
|
278
|
+
className: p,
|
|
279
|
+
styles: d,
|
|
280
|
+
mediaQuery: Y(
|
|
276
281
|
"medium",
|
|
277
282
|
c
|
|
278
283
|
)
|
|
279
|
-
}) : "", h = f ?
|
|
280
|
-
className:
|
|
284
|
+
}) : "", h = f ? W({
|
|
285
|
+
className: p,
|
|
281
286
|
styles: f,
|
|
282
|
-
mediaQuery:
|
|
287
|
+
mediaQuery: Y(
|
|
283
288
|
"small",
|
|
284
289
|
c
|
|
285
290
|
)
|
|
286
291
|
}) : "";
|
|
287
|
-
return [
|
|
292
|
+
return [b, m, h].join(" ");
|
|
288
293
|
};
|
|
289
|
-
return /* @__PURE__ */ l(x, { children: n() && t() ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(
|
|
294
|
+
return /* @__PURE__ */ l(x, { children: n() && t() ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(O, { styles: n() }) }) : null });
|
|
290
295
|
}
|
|
291
|
-
function
|
|
296
|
+
function nt(e) {
|
|
292
297
|
var t;
|
|
293
298
|
return {
|
|
294
299
|
...(t = e.component) == null ? void 0 : t.options,
|
|
@@ -299,13 +304,13 @@ function Ye(e) {
|
|
|
299
304
|
builderBlock: e
|
|
300
305
|
};
|
|
301
306
|
}
|
|
302
|
-
const
|
|
307
|
+
const ot = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], L = (e) => typeof e == "string" && ot.includes(e.toLowerCase()), it = ({
|
|
303
308
|
block: e,
|
|
304
309
|
context: t,
|
|
305
310
|
registeredComponents: n
|
|
306
311
|
}) => {
|
|
307
312
|
var r;
|
|
308
|
-
const o = (r =
|
|
313
|
+
const o = (r = B({
|
|
309
314
|
block: e,
|
|
310
315
|
localState: t.localState,
|
|
311
316
|
rootState: t.rootState,
|
|
@@ -321,7 +326,7 @@ const Xe = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
321
326
|
console.warn(`
|
|
322
327
|
Could not find a registered component named "${o}".
|
|
323
328
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
324
|
-
},
|
|
329
|
+
}, rt = ({
|
|
325
330
|
block: e,
|
|
326
331
|
context: t
|
|
327
332
|
}) => {
|
|
@@ -331,7 +336,7 @@ const Xe = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
331
336
|
} = e;
|
|
332
337
|
if (!(n != null && n.collection))
|
|
333
338
|
return;
|
|
334
|
-
const i =
|
|
339
|
+
const i = K({
|
|
335
340
|
code: n.collection,
|
|
336
341
|
localState: t.localState,
|
|
337
342
|
rootState: t.rootState,
|
|
@@ -341,24 +346,24 @@ const Xe = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
341
346
|
if (!Array.isArray(i))
|
|
342
347
|
return;
|
|
343
348
|
const r = n.collection.split(".").pop(), a = n.itemName || (r ? r + "Item" : "item");
|
|
344
|
-
return i.map((s,
|
|
349
|
+
return i.map((s, d) => ({
|
|
345
350
|
context: {
|
|
346
351
|
...t,
|
|
347
352
|
localState: {
|
|
348
353
|
...t.localState,
|
|
349
|
-
$index:
|
|
354
|
+
$index: d,
|
|
350
355
|
$item: s,
|
|
351
356
|
[a]: s,
|
|
352
|
-
[`$${a}Index`]:
|
|
357
|
+
[`$${a}Index`]: d
|
|
353
358
|
}
|
|
354
359
|
},
|
|
355
360
|
block: o
|
|
356
361
|
}));
|
|
357
362
|
};
|
|
358
|
-
function
|
|
363
|
+
function at(e) {
|
|
359
364
|
const t = e.repeatContext;
|
|
360
365
|
return /* @__PURE__ */ l(
|
|
361
|
-
|
|
366
|
+
N,
|
|
362
367
|
{
|
|
363
368
|
block: e.block,
|
|
364
369
|
context: t,
|
|
@@ -366,10 +371,10 @@ function et(e) {
|
|
|
366
371
|
}
|
|
367
372
|
);
|
|
368
373
|
}
|
|
369
|
-
function
|
|
374
|
+
function st(e) {
|
|
370
375
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
371
376
|
}
|
|
372
|
-
const
|
|
377
|
+
const ct = (e) => `on${st(e)}`, lt = (e, t) => (n) => K({
|
|
373
378
|
code: e,
|
|
374
379
|
context: t.context,
|
|
375
380
|
localState: t.localState,
|
|
@@ -378,15 +383,15 @@ const nt = (e) => `on${tt(e)}`, ot = (e, t) => (n) => M({
|
|
|
378
383
|
event: n,
|
|
379
384
|
isExpression: !1
|
|
380
385
|
});
|
|
381
|
-
function
|
|
386
|
+
function Mn(e) {
|
|
382
387
|
const t = {}, n = e.block.actions ?? {};
|
|
383
388
|
for (const o in n) {
|
|
384
389
|
if (!n.hasOwnProperty(o))
|
|
385
390
|
continue;
|
|
386
391
|
const i = n[o];
|
|
387
|
-
let r =
|
|
392
|
+
let r = ct(o);
|
|
388
393
|
if (e.stripPrefix)
|
|
389
|
-
switch (
|
|
394
|
+
switch (T) {
|
|
390
395
|
case "vue2":
|
|
391
396
|
case "vue3":
|
|
392
397
|
r = r.replace("v-on:", "");
|
|
@@ -395,37 +400,37 @@ function On(e) {
|
|
|
395
400
|
r = r.replace("on:", "");
|
|
396
401
|
break;
|
|
397
402
|
}
|
|
398
|
-
t[r] =
|
|
403
|
+
t[r] = lt(i, e);
|
|
399
404
|
}
|
|
400
405
|
return t;
|
|
401
406
|
}
|
|
402
|
-
function
|
|
407
|
+
function ut(e) {
|
|
403
408
|
return e.className = e.class, delete e.class, e;
|
|
404
409
|
}
|
|
405
|
-
const
|
|
410
|
+
const dt = (e) => ({
|
|
406
411
|
href: e.href
|
|
407
412
|
});
|
|
408
|
-
function
|
|
413
|
+
function mt({
|
|
409
414
|
block: e,
|
|
410
415
|
context: t
|
|
411
416
|
}) {
|
|
412
417
|
var o;
|
|
413
418
|
const n = {
|
|
414
|
-
...
|
|
419
|
+
...dt(e),
|
|
415
420
|
...e.properties,
|
|
416
421
|
"builder-id": e.id,
|
|
417
|
-
style: e.style ?
|
|
422
|
+
style: e.style ? ft(e.style) : void 0,
|
|
418
423
|
class: [e.id, "builder-block", e.class, (o = e.properties) == null ? void 0 : o.class].filter(Boolean).join(" ")
|
|
419
424
|
};
|
|
420
|
-
return
|
|
425
|
+
return ut(n);
|
|
421
426
|
}
|
|
422
|
-
function
|
|
423
|
-
switch (
|
|
427
|
+
function ft(e) {
|
|
428
|
+
switch (T) {
|
|
424
429
|
case "svelte":
|
|
425
430
|
case "vue2":
|
|
426
431
|
case "vue3":
|
|
427
432
|
case "solid":
|
|
428
|
-
return
|
|
433
|
+
return fe(e).join(" ");
|
|
429
434
|
case "qwik":
|
|
430
435
|
case "reactNative":
|
|
431
436
|
case "react":
|
|
@@ -433,7 +438,7 @@ function st(e) {
|
|
|
433
438
|
return e;
|
|
434
439
|
}
|
|
435
440
|
}
|
|
436
|
-
const
|
|
441
|
+
const ht = ({
|
|
437
442
|
componentOptions: e,
|
|
438
443
|
builderBlock: t,
|
|
439
444
|
context: n,
|
|
@@ -453,19 +458,19 @@ const ct = ({
|
|
|
453
458
|
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
454
459
|
*/
|
|
455
460
|
...i ? {
|
|
456
|
-
attributes:
|
|
461
|
+
attributes: mt({
|
|
457
462
|
block: t,
|
|
458
463
|
context: a
|
|
459
464
|
})
|
|
460
465
|
} : {}
|
|
461
466
|
};
|
|
462
|
-
function
|
|
467
|
+
function Q(e) {
|
|
463
468
|
var n, o;
|
|
464
|
-
const t = e.isInteractive ?
|
|
465
|
-
return /* @__PURE__ */ l(x, { children: e.componentRef ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */
|
|
469
|
+
const t = e.isInteractive ? Be : e.componentRef;
|
|
470
|
+
return /* @__PURE__ */ l(x, { children: e.componentRef ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ C(
|
|
466
471
|
t,
|
|
467
472
|
{
|
|
468
|
-
...
|
|
473
|
+
...ht({
|
|
469
474
|
componentOptions: e.componentOptions,
|
|
470
475
|
builderBlock: e.builderBlock,
|
|
471
476
|
context: e.context,
|
|
@@ -476,7 +481,7 @@ function J(e) {
|
|
|
476
481
|
}),
|
|
477
482
|
children: [
|
|
478
483
|
(n = e.blockChildren) == null ? void 0 : n.map((i) => /* @__PURE__ */ l(
|
|
479
|
-
|
|
484
|
+
N,
|
|
480
485
|
{
|
|
481
486
|
block: i,
|
|
482
487
|
context: e.context,
|
|
@@ -485,7 +490,7 @@ function J(e) {
|
|
|
485
490
|
"block-" + i.id
|
|
486
491
|
)),
|
|
487
492
|
(o = e.blockChildren) == null ? void 0 : o.map((i) => /* @__PURE__ */ l(
|
|
488
|
-
|
|
493
|
+
H,
|
|
489
494
|
{
|
|
490
495
|
block: i,
|
|
491
496
|
context: e.context
|
|
@@ -496,21 +501,21 @@ function J(e) {
|
|
|
496
501
|
}
|
|
497
502
|
) }) : null });
|
|
498
503
|
}
|
|
499
|
-
function
|
|
500
|
-
var
|
|
504
|
+
function N(e) {
|
|
505
|
+
var d, f, p, b;
|
|
501
506
|
const t = function() {
|
|
502
|
-
return
|
|
507
|
+
return it({
|
|
503
508
|
block: e.block,
|
|
504
509
|
context: e.context,
|
|
505
510
|
registeredComponents: e.registeredComponents
|
|
506
511
|
});
|
|
507
512
|
}, n = function() {
|
|
508
|
-
return
|
|
513
|
+
return rt({
|
|
509
514
|
block: e.block,
|
|
510
515
|
context: e.context
|
|
511
516
|
});
|
|
512
517
|
}, o = function() {
|
|
513
|
-
return n() ? e.block :
|
|
518
|
+
return n() ? e.block : B({
|
|
514
519
|
block: e.block,
|
|
515
520
|
localState: e.context.localState,
|
|
516
521
|
rootState: e.context.rootState,
|
|
@@ -523,17 +528,17 @@ function $(e) {
|
|
|
523
528
|
}, r = function() {
|
|
524
529
|
return "hide" in o() ? !o().hide : "show" in o() ? o().show : !0;
|
|
525
530
|
}, a = function() {
|
|
526
|
-
var
|
|
527
|
-
return !((
|
|
531
|
+
var u;
|
|
532
|
+
return !((u = t()) != null && u.component) && !n() ? o().children ?? [] : [];
|
|
528
533
|
}, c = function() {
|
|
529
|
-
var h,
|
|
534
|
+
var h, u, y, S, g;
|
|
530
535
|
return {
|
|
531
536
|
blockChildren: o().children ?? [],
|
|
532
537
|
componentRef: (h = t()) == null ? void 0 : h.component,
|
|
533
538
|
componentOptions: {
|
|
534
|
-
...
|
|
539
|
+
...nt(o()),
|
|
535
540
|
builderContext: e.context,
|
|
536
|
-
...((
|
|
541
|
+
...((u = t()) == null ? void 0 : u.name) === "Symbol" || ((y = t()) == null ? void 0 : y.name) === "Columns" ? {
|
|
537
542
|
builderComponents: e.registeredComponents
|
|
538
543
|
} : {}
|
|
539
544
|
},
|
|
@@ -541,12 +546,12 @@ function $(e) {
|
|
|
541
546
|
registeredComponents: e.registeredComponents,
|
|
542
547
|
builderBlock: o(),
|
|
543
548
|
includeBlockProps: ((S = t()) == null ? void 0 : S.noWrap) === !0,
|
|
544
|
-
isInteractive: !((
|
|
549
|
+
isInteractive: !((g = t()) != null && g.isRSC)
|
|
545
550
|
};
|
|
546
551
|
}, s = e.context;
|
|
547
|
-
return /* @__PURE__ */ l(x, { children: r() ? /* @__PURE__ */ l(x, { children: (
|
|
548
|
-
|
|
549
|
-
|
|
552
|
+
return /* @__PURE__ */ l(x, { children: r() ? /* @__PURE__ */ l(x, { children: (d = t()) != null && d.noWrap ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(Q, { ...c() }) }) : /* @__PURE__ */ C(x, { children: [
|
|
553
|
+
L(i()) ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(
|
|
554
|
+
J,
|
|
550
555
|
{
|
|
551
556
|
Wrapper: i(),
|
|
552
557
|
block: o(),
|
|
@@ -554,8 +559,8 @@ function $(e) {
|
|
|
554
559
|
hasChildren: !1
|
|
555
560
|
}
|
|
556
561
|
) }) : null,
|
|
557
|
-
!
|
|
558
|
-
|
|
562
|
+
!L(i()) && n() ? /* @__PURE__ */ l(x, { children: (f = n()) == null ? void 0 : f.map((m, h) => /* @__PURE__ */ l(
|
|
563
|
+
at,
|
|
559
564
|
{
|
|
560
565
|
repeatContext: m.context,
|
|
561
566
|
block: m.block,
|
|
@@ -563,17 +568,17 @@ function $(e) {
|
|
|
563
568
|
},
|
|
564
569
|
h
|
|
565
570
|
)) }) : null,
|
|
566
|
-
!
|
|
567
|
-
|
|
571
|
+
!L(i()) && !n() ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ C(
|
|
572
|
+
J,
|
|
568
573
|
{
|
|
569
574
|
Wrapper: i(),
|
|
570
575
|
block: o(),
|
|
571
576
|
context: e.context,
|
|
572
577
|
hasChildren: !0,
|
|
573
578
|
children: [
|
|
574
|
-
/* @__PURE__ */ l(
|
|
575
|
-
(
|
|
576
|
-
|
|
579
|
+
/* @__PURE__ */ l(Q, { ...c() }),
|
|
580
|
+
(p = a()) == null ? void 0 : p.map((m) => /* @__PURE__ */ l(
|
|
581
|
+
N,
|
|
577
582
|
{
|
|
578
583
|
block: m,
|
|
579
584
|
context: s,
|
|
@@ -581,8 +586,8 @@ function $(e) {
|
|
|
581
586
|
},
|
|
582
587
|
"block-" + m.id
|
|
583
588
|
)),
|
|
584
|
-
(
|
|
585
|
-
|
|
589
|
+
(b = a()) == null ? void 0 : b.map((m) => /* @__PURE__ */ l(
|
|
590
|
+
H,
|
|
586
591
|
{
|
|
587
592
|
block: m,
|
|
588
593
|
context: s
|
|
@@ -594,10 +599,10 @@ function $(e) {
|
|
|
594
599
|
) }) : null
|
|
595
600
|
] }) }) : null });
|
|
596
601
|
}
|
|
597
|
-
function
|
|
602
|
+
function D(e) {
|
|
598
603
|
var t, n;
|
|
599
|
-
return /* @__PURE__ */
|
|
600
|
-
|
|
604
|
+
return /* @__PURE__ */ C(
|
|
605
|
+
Fe,
|
|
601
606
|
{
|
|
602
607
|
blocks: e.blocks,
|
|
603
608
|
parent: e.parent,
|
|
@@ -605,7 +610,7 @@ function _(e) {
|
|
|
605
610
|
styleProp: e.styleProp,
|
|
606
611
|
children: [
|
|
607
612
|
e.blocks ? /* @__PURE__ */ l(x, { children: (t = e.blocks) == null ? void 0 : t.map((o) => /* @__PURE__ */ l(
|
|
608
|
-
|
|
613
|
+
N,
|
|
609
614
|
{
|
|
610
615
|
block: o,
|
|
611
616
|
context: e.context,
|
|
@@ -614,7 +619,7 @@ function _(e) {
|
|
|
614
619
|
"render-block-" + o.id
|
|
615
620
|
)) }) : null,
|
|
616
621
|
e.blocks ? /* @__PURE__ */ l(x, { children: (n = e.blocks) == null ? void 0 : n.map((o) => /* @__PURE__ */ l(
|
|
617
|
-
|
|
622
|
+
H,
|
|
618
623
|
{
|
|
619
624
|
block: o,
|
|
620
625
|
context: e.context
|
|
@@ -625,25 +630,25 @@ function _(e) {
|
|
|
625
630
|
}
|
|
626
631
|
);
|
|
627
632
|
}
|
|
628
|
-
function
|
|
633
|
+
function gt(e) {
|
|
629
634
|
var m;
|
|
630
|
-
const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", i = function(
|
|
631
|
-
var
|
|
632
|
-
return ((
|
|
633
|
-
}, r = function(
|
|
634
|
-
const
|
|
635
|
-
return `calc(${i(
|
|
635
|
+
const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", i = function(u) {
|
|
636
|
+
var y;
|
|
637
|
+
return ((y = n[u]) == null ? void 0 : y.width) || 100 / n.length;
|
|
638
|
+
}, r = function(u) {
|
|
639
|
+
const y = t * (n.length - 1) / n.length;
|
|
640
|
+
return `calc(${i(u)}% - ${y}px)`;
|
|
636
641
|
}, a = function({
|
|
637
|
-
stackedStyle:
|
|
638
|
-
desktopStyle:
|
|
642
|
+
stackedStyle: u,
|
|
643
|
+
desktopStyle: y
|
|
639
644
|
}) {
|
|
640
|
-
return o === "tablet" ?
|
|
645
|
+
return o === "tablet" ? u : y;
|
|
641
646
|
}, c = function({
|
|
642
|
-
stackedStyle:
|
|
643
|
-
desktopStyle:
|
|
647
|
+
stackedStyle: u,
|
|
648
|
+
desktopStyle: y
|
|
644
649
|
}) {
|
|
645
|
-
return o === "never" ?
|
|
646
|
-
}, s = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
650
|
+
return o === "never" ? y : u;
|
|
651
|
+
}, s = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", d = function() {
|
|
647
652
|
return {
|
|
648
653
|
"--flex-dir": s,
|
|
649
654
|
"--flex-dir-tablet": a({
|
|
@@ -651,36 +656,36 @@ function lt(e) {
|
|
|
651
656
|
desktopStyle: "row"
|
|
652
657
|
})
|
|
653
658
|
};
|
|
654
|
-
}, f = function(
|
|
655
|
-
const
|
|
659
|
+
}, f = function(u) {
|
|
660
|
+
const y = u === 0 ? 0 : t, S = r(u), g = `${y}px`, A = "100%", R = 0;
|
|
656
661
|
return {
|
|
657
662
|
width: S,
|
|
658
|
-
["marginLeft"]:
|
|
663
|
+
["marginLeft"]: g,
|
|
659
664
|
"--column-width-mobile": c({
|
|
660
|
-
stackedStyle:
|
|
665
|
+
stackedStyle: A,
|
|
661
666
|
desktopStyle: S
|
|
662
667
|
}),
|
|
663
668
|
"--column-margin-left-mobile": c({
|
|
664
|
-
stackedStyle:
|
|
665
|
-
desktopStyle:
|
|
669
|
+
stackedStyle: R,
|
|
670
|
+
desktopStyle: g
|
|
666
671
|
}),
|
|
667
672
|
"--column-width-tablet": a({
|
|
668
|
-
stackedStyle:
|
|
673
|
+
stackedStyle: A,
|
|
669
674
|
desktopStyle: S
|
|
670
675
|
}),
|
|
671
676
|
"--column-margin-left-tablet": a({
|
|
672
|
-
stackedStyle:
|
|
673
|
-
desktopStyle:
|
|
677
|
+
stackedStyle: R,
|
|
678
|
+
desktopStyle: g
|
|
674
679
|
})
|
|
675
680
|
};
|
|
676
|
-
},
|
|
677
|
-
var S,
|
|
678
|
-
return
|
|
679
|
-
((
|
|
680
|
-
)[
|
|
681
|
-
},
|
|
681
|
+
}, p = function(u) {
|
|
682
|
+
var S, g;
|
|
683
|
+
return de(
|
|
684
|
+
((g = (S = e.builderContext.content) == null ? void 0 : S.meta) == null ? void 0 : g.breakpoints) || {}
|
|
685
|
+
)[u].max;
|
|
686
|
+
}, b = function() {
|
|
682
687
|
return `
|
|
683
|
-
@media (max-width: ${
|
|
688
|
+
@media (max-width: ${p("medium")}px) {
|
|
684
689
|
.${e.builderBlock.id}-breakpoints {
|
|
685
690
|
flex-direction: var(--flex-dir-tablet);
|
|
686
691
|
align-items: stretch;
|
|
@@ -692,7 +697,7 @@ function lt(e) {
|
|
|
692
697
|
}
|
|
693
698
|
}
|
|
694
699
|
|
|
695
|
-
@media (max-width: ${
|
|
700
|
+
@media (max-width: ${p("small")}px) {
|
|
696
701
|
.${e.builderBlock.id}-breakpoints {
|
|
697
702
|
flex-direction: var(--flex-dir);
|
|
698
703
|
align-items: stretch;
|
|
@@ -705,25 +710,25 @@ function lt(e) {
|
|
|
705
710
|
},
|
|
706
711
|
`;
|
|
707
712
|
};
|
|
708
|
-
return /* @__PURE__ */
|
|
709
|
-
/* @__PURE__ */
|
|
713
|
+
return /* @__PURE__ */ C(x, { children: [
|
|
714
|
+
/* @__PURE__ */ C(
|
|
710
715
|
"div",
|
|
711
716
|
{
|
|
712
|
-
className: `builder-columns ${e.builderBlock.id}-breakpoints div-
|
|
713
|
-
style:
|
|
717
|
+
className: `builder-columns ${e.builderBlock.id}-breakpoints div-666689ca`,
|
|
718
|
+
style: d(),
|
|
714
719
|
children: [
|
|
715
|
-
/* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(
|
|
716
|
-
(m = e.columns) == null ? void 0 : m.map((h,
|
|
720
|
+
/* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(O, { styles: b() }) }),
|
|
721
|
+
(m = e.columns) == null ? void 0 : m.map((h, u) => /* @__PURE__ */ Pe(
|
|
717
722
|
"div",
|
|
718
723
|
{
|
|
719
|
-
className: "builder-column div-
|
|
720
|
-
style: f(
|
|
721
|
-
key:
|
|
724
|
+
className: "builder-column div-666689ca-2",
|
|
725
|
+
style: f(u),
|
|
726
|
+
key: u
|
|
722
727
|
},
|
|
723
728
|
/* @__PURE__ */ l(
|
|
724
|
-
|
|
729
|
+
D,
|
|
725
730
|
{
|
|
726
|
-
path: `component.options.columns.${
|
|
731
|
+
path: `component.options.columns.${u}.blocks`,
|
|
727
732
|
parent: e.builderBlock.id,
|
|
728
733
|
styleProp: {
|
|
729
734
|
flexGrow: "1"
|
|
@@ -737,87 +742,87 @@ function lt(e) {
|
|
|
737
742
|
]
|
|
738
743
|
}
|
|
739
744
|
),
|
|
740
|
-
/* @__PURE__ */ l("style", { children: `.div-
|
|
745
|
+
/* @__PURE__ */ l("style", { children: `.div-666689ca {
|
|
741
746
|
display: flex;
|
|
742
747
|
line-height: normal;
|
|
743
|
-
}.div-
|
|
748
|
+
}.div-666689ca-2 {
|
|
744
749
|
display: flex;
|
|
745
750
|
flex-direction: column;
|
|
746
751
|
align-items: stretch;
|
|
747
752
|
}` })
|
|
748
753
|
] });
|
|
749
754
|
}
|
|
750
|
-
function
|
|
755
|
+
function Z(e) {
|
|
751
756
|
return e.replace(/http(s)?:/, "");
|
|
752
757
|
}
|
|
753
|
-
function
|
|
758
|
+
function pt(e = "", t, n) {
|
|
754
759
|
const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), i = e.indexOf("?") !== -1 ? "&" : "?";
|
|
755
760
|
return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + i + t + "=" + encodeURIComponent(n);
|
|
756
761
|
}
|
|
757
|
-
function
|
|
762
|
+
function bt(e, t) {
|
|
758
763
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
759
764
|
return e;
|
|
760
765
|
if (t === "master")
|
|
761
|
-
return
|
|
766
|
+
return Z(e);
|
|
762
767
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
763
768
|
if (n) {
|
|
764
769
|
const o = e.split(n[0]), i = n[3], r = t.match("x") ? t : `${t}x`;
|
|
765
|
-
return
|
|
770
|
+
return Z(`${o[0]}_${r}${i}`);
|
|
766
771
|
}
|
|
767
772
|
return null;
|
|
768
773
|
}
|
|
769
|
-
function
|
|
774
|
+
function _n(e) {
|
|
770
775
|
if (!e)
|
|
771
776
|
return e;
|
|
772
777
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
773
778
|
if (e.match(/builder\.io/)) {
|
|
774
779
|
let n = e;
|
|
775
780
|
const o = Number(e.split("?width=")[1]);
|
|
776
|
-
return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${
|
|
781
|
+
return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${pt(e, "width", i)} ${i}w`).concat([n]).join(", ");
|
|
777
782
|
}
|
|
778
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
783
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [bt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
|
|
779
784
|
}
|
|
780
|
-
const
|
|
785
|
+
const $ = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
781
786
|
...t,
|
|
782
787
|
testVariationId: t.id,
|
|
783
788
|
id: e == null ? void 0 : e.id
|
|
784
|
-
})),
|
|
789
|
+
})), yt = ({
|
|
785
790
|
canTrack: e,
|
|
786
791
|
content: t
|
|
787
|
-
}) => !(!(
|
|
788
|
-
function
|
|
792
|
+
}) => !(!($(t).length > 0) || !e || v());
|
|
793
|
+
function xt(e, t, n) {
|
|
789
794
|
var a;
|
|
790
795
|
function o() {
|
|
791
|
-
function c(h,
|
|
796
|
+
function c(h, u, y) {
|
|
792
797
|
let S = "";
|
|
793
|
-
if (
|
|
794
|
-
const
|
|
795
|
-
|
|
798
|
+
if (y) {
|
|
799
|
+
const g = /* @__PURE__ */ new Date();
|
|
800
|
+
g.setTime(g.getTime() + y * 24 * 60 * 60 * 1e3), S = "; expires=" + g.toUTCString();
|
|
796
801
|
}
|
|
797
|
-
document.cookie = h + "=" + (
|
|
802
|
+
document.cookie = h + "=" + (u || "") + S + "; path=/; Secure; SameSite=None";
|
|
798
803
|
}
|
|
799
804
|
function s(h) {
|
|
800
|
-
const
|
|
801
|
-
for (let S = 0; S <
|
|
802
|
-
let
|
|
803
|
-
for (;
|
|
804
|
-
|
|
805
|
-
if (
|
|
806
|
-
return
|
|
805
|
+
const u = h + "=", y = document.cookie.split(";");
|
|
806
|
+
for (let S = 0; S < y.length; S++) {
|
|
807
|
+
let g = y[S];
|
|
808
|
+
for (; g.charAt(0) === " "; )
|
|
809
|
+
g = g.substring(1, g.length);
|
|
810
|
+
if (g.indexOf(u) === 0)
|
|
811
|
+
return g.substring(u.length, g.length);
|
|
807
812
|
}
|
|
808
813
|
return null;
|
|
809
814
|
}
|
|
810
|
-
const
|
|
811
|
-
if (f &&
|
|
815
|
+
const d = `builder.tests.${e}`, f = s(d), p = t.map((h) => h.id).concat(e);
|
|
816
|
+
if (f && p.includes(f))
|
|
812
817
|
return f;
|
|
813
|
-
let
|
|
818
|
+
let b = 0;
|
|
814
819
|
const m = Math.random();
|
|
815
820
|
for (let h = 0; h < t.length; h++) {
|
|
816
|
-
const
|
|
817
|
-
if (
|
|
818
|
-
return c(
|
|
821
|
+
const u = t[h], y = u.testRatio;
|
|
822
|
+
if (b += y, m < b)
|
|
823
|
+
return c(d, u.id), u.id;
|
|
819
824
|
}
|
|
820
|
-
return c(
|
|
825
|
+
return c(d, e), e;
|
|
821
826
|
}
|
|
822
827
|
const i = o(), r = (a = document.currentScript) == null ? void 0 : a.previousElementSibling;
|
|
823
828
|
if (n) {
|
|
@@ -832,14 +837,14 @@ function ft(e, t, n) {
|
|
|
832
837
|
r.innerHTML = c;
|
|
833
838
|
}
|
|
834
839
|
}
|
|
835
|
-
function
|
|
840
|
+
function St(e, t, n) {
|
|
836
841
|
var s;
|
|
837
842
|
if (!navigator.cookieEnabled)
|
|
838
843
|
return;
|
|
839
|
-
function o(
|
|
840
|
-
const f =
|
|
841
|
-
for (let
|
|
842
|
-
let m =
|
|
844
|
+
function o(d) {
|
|
845
|
+
const f = d + "=", p = document.cookie.split(";");
|
|
846
|
+
for (let b = 0; b < p.length; b++) {
|
|
847
|
+
let m = p[b];
|
|
843
848
|
for (; m.charAt(0) === " "; )
|
|
844
849
|
m = m.substring(1, m.length);
|
|
845
850
|
if (m.indexOf(f) === 0)
|
|
@@ -857,18 +862,18 @@ function ht(e, t, n) {
|
|
|
857
862
|
return;
|
|
858
863
|
}
|
|
859
864
|
}
|
|
860
|
-
const
|
|
861
|
-
const e =
|
|
865
|
+
const vt = (e) => e === "react" || e === "reactNative", he = vt(T), ge = "builderIoAbTest", pe = "builderIoRenderContent", kt = () => {
|
|
866
|
+
const e = xt.toString().replace(/\s+/g, " "), t = St.toString().replace(/\s+/g, " ");
|
|
862
867
|
return `
|
|
863
|
-
window.${
|
|
864
|
-
window.${
|
|
868
|
+
window.${ge} = ${e}
|
|
869
|
+
window.${pe} = ${t}
|
|
865
870
|
`;
|
|
866
|
-
},
|
|
867
|
-
window.${
|
|
871
|
+
}, wt = (e, t) => `
|
|
872
|
+
window.${ge}("${t}",${JSON.stringify(e)}, ${he})`, Ct = ({
|
|
868
873
|
contentId: e,
|
|
869
874
|
variationId: t
|
|
870
875
|
}) => `
|
|
871
|
-
window.${
|
|
876
|
+
window.${pe}("${t}", "${e}", ${he})`, It = {
|
|
872
877
|
name: "Core:Button",
|
|
873
878
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
874
879
|
defaultStyles: {
|
|
@@ -901,7 +906,7 @@ const gt = (e) => e === "react" || e === "reactNative", ue = gt(I), de = "builde
|
|
|
901
906
|
}],
|
|
902
907
|
static: !0,
|
|
903
908
|
noWrap: !0
|
|
904
|
-
},
|
|
909
|
+
}, Tt = {
|
|
905
910
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
906
911
|
name: "Columns",
|
|
907
912
|
isRSC: !0,
|
|
@@ -1102,13 +1107,13 @@ const gt = (e) => e === "react" || e === "reactNative", ue = gt(I), de = "builde
|
|
|
1102
1107
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1103
1108
|
advanced: !0
|
|
1104
1109
|
}]
|
|
1105
|
-
},
|
|
1110
|
+
}, Rt = {
|
|
1106
1111
|
name: "Fragment",
|
|
1107
1112
|
static: !0,
|
|
1108
1113
|
hidden: !0,
|
|
1109
1114
|
canHaveChildren: !0,
|
|
1110
1115
|
noWrap: !0
|
|
1111
|
-
},
|
|
1116
|
+
}, Et = {
|
|
1112
1117
|
name: "Image",
|
|
1113
1118
|
static: !0,
|
|
1114
1119
|
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",
|
|
@@ -1129,15 +1134,15 @@ const gt = (e) => e === "react" || e === "reactNative", ue = gt(I), de = "builde
|
|
|
1129
1134
|
onChange: (e) => {
|
|
1130
1135
|
e.delete("srcset"), e.delete("noWebp");
|
|
1131
1136
|
function n(a, c = 6e4) {
|
|
1132
|
-
return new Promise((s,
|
|
1137
|
+
return new Promise((s, d) => {
|
|
1133
1138
|
const f = document.createElement("img");
|
|
1134
|
-
let
|
|
1139
|
+
let p = !1;
|
|
1135
1140
|
f.onload = () => {
|
|
1136
|
-
|
|
1137
|
-
}, f.addEventListener("error", (
|
|
1138
|
-
console.warn("Image load failed",
|
|
1141
|
+
p = !0, s(f);
|
|
1142
|
+
}, f.addEventListener("error", (b) => {
|
|
1143
|
+
console.warn("Image load failed", b.error), d(b.error);
|
|
1139
1144
|
}), f.src = a, setTimeout(() => {
|
|
1140
|
-
|
|
1145
|
+
p || d(new Error("Image load timed out"));
|
|
1141
1146
|
}, c);
|
|
1142
1147
|
});
|
|
1143
1148
|
}
|
|
@@ -1208,7 +1213,7 @@ const gt = (e) => e === "react" || e === "reactNative", ue = gt(I), de = "builde
|
|
|
1208
1213
|
advanced: !0,
|
|
1209
1214
|
defaultValue: 0.7041
|
|
1210
1215
|
}]
|
|
1211
|
-
},
|
|
1216
|
+
}, At = {
|
|
1212
1217
|
name: "Core:Section",
|
|
1213
1218
|
static: !0,
|
|
1214
1219
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1247,7 +1252,7 @@ const gt = (e) => e === "react" || e === "reactNative", ue = gt(I), de = "builde
|
|
|
1247
1252
|
}
|
|
1248
1253
|
}
|
|
1249
1254
|
}]
|
|
1250
|
-
},
|
|
1255
|
+
}, Vt = {
|
|
1251
1256
|
name: "Symbol",
|
|
1252
1257
|
noWrap: !0,
|
|
1253
1258
|
static: !0,
|
|
@@ -1280,7 +1285,7 @@ const gt = (e) => e === "react" || e === "reactNative", ue = gt(I), de = "builde
|
|
|
1280
1285
|
hideFromUI: !0,
|
|
1281
1286
|
type: "boolean"
|
|
1282
1287
|
}]
|
|
1283
|
-
},
|
|
1288
|
+
}, $t = {
|
|
1284
1289
|
name: "Text",
|
|
1285
1290
|
static: !0,
|
|
1286
1291
|
isRSC: !0,
|
|
@@ -1299,7 +1304,7 @@ const gt = (e) => e === "react" || e === "reactNative", ue = gt(I), de = "builde
|
|
|
1299
1304
|
textAlign: "center"
|
|
1300
1305
|
}
|
|
1301
1306
|
};
|
|
1302
|
-
function
|
|
1307
|
+
function Pt(e) {
|
|
1303
1308
|
var t;
|
|
1304
1309
|
return /* @__PURE__ */ l(
|
|
1305
1310
|
"div",
|
|
@@ -1312,7 +1317,7 @@ function Tt(e) {
|
|
|
1312
1317
|
}
|
|
1313
1318
|
);
|
|
1314
1319
|
}
|
|
1315
|
-
const
|
|
1320
|
+
const Bt = {
|
|
1316
1321
|
name: "Video",
|
|
1317
1322
|
canHaveChildren: !0,
|
|
1318
1323
|
defaultStyles: {
|
|
@@ -1393,7 +1398,7 @@ const Rt = {
|
|
|
1393
1398
|
defaultValue: !0,
|
|
1394
1399
|
advanced: !0
|
|
1395
1400
|
}]
|
|
1396
|
-
},
|
|
1401
|
+
}, Ft = {
|
|
1397
1402
|
name: "Embed",
|
|
1398
1403
|
static: !0,
|
|
1399
1404
|
inputs: [{
|
|
@@ -1418,7 +1423,7 @@ const Rt = {
|
|
|
1418
1423
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1419
1424
|
hideFromUI: !0
|
|
1420
1425
|
}]
|
|
1421
|
-
},
|
|
1426
|
+
}, Ot = ["text/javascript", "application/javascript", "application/ecmascript"], jn = (e) => Ot.includes(e.type), Nt = {
|
|
1422
1427
|
// friendlyName?
|
|
1423
1428
|
name: "Raw:Img",
|
|
1424
1429
|
hideFromInsertMenu: !0,
|
|
@@ -1432,7 +1437,7 @@ const Rt = {
|
|
|
1432
1437
|
}],
|
|
1433
1438
|
noWrap: !0,
|
|
1434
1439
|
static: !0
|
|
1435
|
-
},
|
|
1440
|
+
}, Wt = {
|
|
1436
1441
|
name: "Custom Code",
|
|
1437
1442
|
static: !0,
|
|
1438
1443
|
requiredPermissions: ["editCode"],
|
|
@@ -1454,55 +1459,55 @@ const Rt = {
|
|
|
1454
1459
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
1455
1460
|
advanced: !0
|
|
1456
1461
|
}]
|
|
1457
|
-
},
|
|
1458
|
-
component:
|
|
1459
|
-
...
|
|
1462
|
+
}, ee = () => [{
|
|
1463
|
+
component: Oe,
|
|
1464
|
+
...It
|
|
1460
1465
|
}, {
|
|
1461
|
-
component:
|
|
1462
|
-
...
|
|
1466
|
+
component: gt,
|
|
1467
|
+
...Tt
|
|
1463
1468
|
}, {
|
|
1464
|
-
component:
|
|
1465
|
-
|
|
1469
|
+
component: Ne,
|
|
1470
|
+
...Wt
|
|
1466
1471
|
}, {
|
|
1467
|
-
component:
|
|
1468
|
-
...
|
|
1472
|
+
component: We,
|
|
1473
|
+
...Ft
|
|
1469
1474
|
}, {
|
|
1470
|
-
component:
|
|
1471
|
-
...
|
|
1475
|
+
component: Le,
|
|
1476
|
+
...Rt
|
|
1472
1477
|
}, {
|
|
1473
|
-
component:
|
|
1474
|
-
...
|
|
1478
|
+
component: Ue,
|
|
1479
|
+
...Et
|
|
1475
1480
|
}, {
|
|
1476
|
-
component:
|
|
1477
|
-
...
|
|
1481
|
+
component: Me,
|
|
1482
|
+
...Nt
|
|
1478
1483
|
}, {
|
|
1479
|
-
component:
|
|
1480
|
-
...
|
|
1484
|
+
component: _e,
|
|
1485
|
+
...At
|
|
1481
1486
|
}, {
|
|
1482
|
-
component:
|
|
1483
|
-
...
|
|
1487
|
+
component: Fn,
|
|
1488
|
+
...Vt
|
|
1484
1489
|
}, {
|
|
1485
|
-
component:
|
|
1486
|
-
|
|
1490
|
+
component: Pt,
|
|
1491
|
+
...$t
|
|
1487
1492
|
}, {
|
|
1488
|
-
component:
|
|
1489
|
-
...
|
|
1490
|
-
}],
|
|
1493
|
+
component: je,
|
|
1494
|
+
...Bt
|
|
1495
|
+
}], te = [], Kn = (e) => ({
|
|
1491
1496
|
type: "builder.registerComponent",
|
|
1492
|
-
data:
|
|
1493
|
-
}),
|
|
1497
|
+
data: U(e)
|
|
1498
|
+
}), Lt = (e) => {
|
|
1494
1499
|
const t = e.toString().trim();
|
|
1495
1500
|
return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
|
|
1496
|
-
},
|
|
1501
|
+
}, Ut = (e) => typeof e == "function" ? Lt(e) : F(e), U = ({
|
|
1497
1502
|
inputs: e,
|
|
1498
1503
|
...t
|
|
1499
1504
|
}) => ({
|
|
1500
|
-
...
|
|
1505
|
+
...F(t),
|
|
1501
1506
|
inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [i, r]) => ({
|
|
1502
1507
|
...o,
|
|
1503
|
-
[i]:
|
|
1508
|
+
[i]: Ut(r)
|
|
1504
1509
|
}), {}))
|
|
1505
|
-
}),
|
|
1510
|
+
}), Mt = (e) => {
|
|
1506
1511
|
var r;
|
|
1507
1512
|
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);
|
|
1508
1513
|
let i = "";
|
|
@@ -1528,22 +1533,22 @@ font-weight: ${a};
|
|
|
1528
1533
|
`.trim());
|
|
1529
1534
|
}
|
|
1530
1535
|
return i;
|
|
1531
|
-
},
|
|
1536
|
+
}, _t = ({
|
|
1532
1537
|
customFonts: e
|
|
1533
1538
|
}) => {
|
|
1534
1539
|
var t;
|
|
1535
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
1536
|
-
},
|
|
1540
|
+
return ((t = e == null ? void 0 : e.map((n) => Mt(n))) == null ? void 0 : t.join(" ")) || "";
|
|
1541
|
+
}, jt = ({
|
|
1537
1542
|
cssCode: e,
|
|
1538
1543
|
contentId: t
|
|
1539
1544
|
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
|
|
1540
|
-
function
|
|
1545
|
+
function Kt(e) {
|
|
1541
1546
|
const t = `
|
|
1542
|
-
${
|
|
1547
|
+
${jt({
|
|
1543
1548
|
cssCode: e.cssCode,
|
|
1544
1549
|
contentId: e.contentId
|
|
1545
1550
|
})}
|
|
1546
|
-
${
|
|
1551
|
+
${_t({
|
|
1547
1552
|
customFonts: e.customFonts
|
|
1548
1553
|
})}
|
|
1549
1554
|
|
|
@@ -1560,9 +1565,9 @@ ${Ot({
|
|
|
1560
1565
|
font-family: inherit;
|
|
1561
1566
|
}
|
|
1562
1567
|
`.trim();
|
|
1563
|
-
return /* @__PURE__ */ l(
|
|
1568
|
+
return /* @__PURE__ */ l(O, { styles: t });
|
|
1564
1569
|
}
|
|
1565
|
-
const
|
|
1570
|
+
const Ht = ({
|
|
1566
1571
|
content: e,
|
|
1567
1572
|
data: t,
|
|
1568
1573
|
locale: n
|
|
@@ -1570,8 +1575,8 @@ const Lt = ({
|
|
|
1570
1575
|
var r, a, c;
|
|
1571
1576
|
const o = {};
|
|
1572
1577
|
(a = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || a.forEach((s) => {
|
|
1573
|
-
var
|
|
1574
|
-
s.name && s.defaultValue !== void 0 && ((
|
|
1578
|
+
var d;
|
|
1579
|
+
s.name && s.defaultValue !== void 0 && ((d = e == null ? void 0 : e.data) != null && d.state) && e.data.state[s.name] === void 0 && (o[s.name] = s.defaultValue);
|
|
1575
1580
|
});
|
|
1576
1581
|
const i = {
|
|
1577
1582
|
...(c = e == null ? void 0 : e.data) == null ? void 0 : c.state,
|
|
@@ -1584,7 +1589,7 @@ const Lt = ({
|
|
|
1584
1589
|
...o,
|
|
1585
1590
|
...i
|
|
1586
1591
|
};
|
|
1587
|
-
},
|
|
1592
|
+
}, Dt = ({
|
|
1588
1593
|
content: e,
|
|
1589
1594
|
data: t
|
|
1590
1595
|
}) => e ? {
|
|
@@ -1595,22 +1600,22 @@ const Lt = ({
|
|
|
1595
1600
|
},
|
|
1596
1601
|
meta: e == null ? void 0 : e.meta
|
|
1597
1602
|
} : void 0;
|
|
1598
|
-
function
|
|
1603
|
+
function zt() {
|
|
1599
1604
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
1600
1605
|
}
|
|
1601
|
-
function
|
|
1602
|
-
const e =
|
|
1606
|
+
function qt() {
|
|
1607
|
+
const e = zt().fetch;
|
|
1603
1608
|
if (typeof e > "u")
|
|
1604
1609
|
throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
1605
1610
|
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
|
|
1606
1611
|
return e;
|
|
1607
1612
|
}
|
|
1608
|
-
const
|
|
1613
|
+
const Gt = qt(), Jt = (e) => {
|
|
1609
1614
|
if (e === "localhost" || e === "127.0.0.1")
|
|
1610
1615
|
return e;
|
|
1611
1616
|
const t = e.split(".");
|
|
1612
1617
|
return t.length > 2 ? t.slice(1).join(".") : e;
|
|
1613
|
-
},
|
|
1618
|
+
}, be = ({
|
|
1614
1619
|
name: e,
|
|
1615
1620
|
canTrack: t
|
|
1616
1621
|
}) => {
|
|
@@ -1621,14 +1626,14 @@ const jt = _t(), Kt = (e) => {
|
|
|
1621
1626
|
k.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
|
|
1622
1627
|
return;
|
|
1623
1628
|
}
|
|
1624
|
-
},
|
|
1629
|
+
}, ye = async (e) => be(e), Yt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(I).join("; "), Xt = [["secure", ""], ["SameSite", "None"]], Qt = ({
|
|
1625
1630
|
name: e,
|
|
1626
1631
|
value: t,
|
|
1627
1632
|
expires: n
|
|
1628
1633
|
}) => {
|
|
1629
|
-
const i = (v() ? location.protocol === "https:" : !0) ?
|
|
1630
|
-
return
|
|
1631
|
-
},
|
|
1634
|
+
const i = (v() ? location.protocol === "https:" : !0) ? Xt : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], a = [[e, t], ...r, ["path", "/"], ["domain", Jt(window.location.hostname)], ...i];
|
|
1635
|
+
return Yt(a);
|
|
1636
|
+
}, xe = async ({
|
|
1632
1637
|
name: e,
|
|
1633
1638
|
value: t,
|
|
1634
1639
|
expires: n,
|
|
@@ -1637,7 +1642,7 @@ const jt = _t(), Kt = (e) => {
|
|
|
1637
1642
|
try {
|
|
1638
1643
|
if (!o)
|
|
1639
1644
|
return;
|
|
1640
|
-
const i =
|
|
1645
|
+
const i = Qt({
|
|
1641
1646
|
name: e,
|
|
1642
1647
|
value: t,
|
|
1643
1648
|
expires: n
|
|
@@ -1647,88 +1652,88 @@ const jt = _t(), Kt = (e) => {
|
|
|
1647
1652
|
k.warn("[COOKIE] SET error: ", (i == null ? void 0 : i.message) || i);
|
|
1648
1653
|
}
|
|
1649
1654
|
};
|
|
1650
|
-
function
|
|
1655
|
+
function Zt() {
|
|
1651
1656
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
1652
1657
|
const t = Math.random() * 16 | 0;
|
|
1653
1658
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
1654
1659
|
});
|
|
1655
1660
|
}
|
|
1656
|
-
function
|
|
1657
|
-
return
|
|
1661
|
+
function Se() {
|
|
1662
|
+
return Zt().replace(/-/g, "");
|
|
1658
1663
|
}
|
|
1659
|
-
const
|
|
1664
|
+
const ve = "builderSessionId", en = async ({
|
|
1660
1665
|
canTrack: e
|
|
1661
1666
|
}) => {
|
|
1662
1667
|
if (!e)
|
|
1663
1668
|
return;
|
|
1664
|
-
const t = await
|
|
1665
|
-
name:
|
|
1669
|
+
const t = await ye({
|
|
1670
|
+
name: ve,
|
|
1666
1671
|
canTrack: e
|
|
1667
1672
|
});
|
|
1668
|
-
if (
|
|
1673
|
+
if (I(t))
|
|
1669
1674
|
return t;
|
|
1670
1675
|
{
|
|
1671
|
-
const n =
|
|
1672
|
-
return
|
|
1676
|
+
const n = tn();
|
|
1677
|
+
return nn({
|
|
1673
1678
|
id: n,
|
|
1674
1679
|
canTrack: e
|
|
1675
1680
|
}), n;
|
|
1676
1681
|
}
|
|
1677
|
-
},
|
|
1682
|
+
}, tn = () => Se(), nn = ({
|
|
1678
1683
|
id: e,
|
|
1679
1684
|
canTrack: t
|
|
1680
|
-
}) =>
|
|
1681
|
-
name:
|
|
1685
|
+
}) => xe({
|
|
1686
|
+
name: ve,
|
|
1682
1687
|
value: e,
|
|
1683
1688
|
canTrack: t
|
|
1684
|
-
}),
|
|
1689
|
+
}), ke = () => v() && typeof localStorage < "u" ? localStorage : void 0, on = ({
|
|
1685
1690
|
key: e,
|
|
1686
1691
|
canTrack: t
|
|
1687
1692
|
}) => {
|
|
1688
1693
|
var n;
|
|
1689
1694
|
try {
|
|
1690
|
-
return t ? (n =
|
|
1695
|
+
return t ? (n = ke()) == null ? void 0 : n.getItem(e) : void 0;
|
|
1691
1696
|
} catch (o) {
|
|
1692
1697
|
console.debug("[LocalStorage] GET error: ", o);
|
|
1693
1698
|
return;
|
|
1694
1699
|
}
|
|
1695
|
-
},
|
|
1700
|
+
}, rn = ({
|
|
1696
1701
|
key: e,
|
|
1697
1702
|
canTrack: t,
|
|
1698
1703
|
value: n
|
|
1699
1704
|
}) => {
|
|
1700
1705
|
var o;
|
|
1701
1706
|
try {
|
|
1702
|
-
t && ((o =
|
|
1707
|
+
t && ((o = ke()) == null || o.setItem(e, n));
|
|
1703
1708
|
} catch (i) {
|
|
1704
1709
|
console.debug("[LocalStorage] SET error: ", i);
|
|
1705
1710
|
}
|
|
1706
|
-
},
|
|
1711
|
+
}, we = "builderVisitorId", an = ({
|
|
1707
1712
|
canTrack: e
|
|
1708
1713
|
}) => {
|
|
1709
1714
|
if (!e)
|
|
1710
1715
|
return;
|
|
1711
|
-
const t =
|
|
1712
|
-
key:
|
|
1716
|
+
const t = on({
|
|
1717
|
+
key: we,
|
|
1713
1718
|
canTrack: e
|
|
1714
1719
|
});
|
|
1715
|
-
if (
|
|
1720
|
+
if (I(t))
|
|
1716
1721
|
return t;
|
|
1717
1722
|
{
|
|
1718
|
-
const n =
|
|
1719
|
-
return
|
|
1723
|
+
const n = sn();
|
|
1724
|
+
return cn({
|
|
1720
1725
|
id: n,
|
|
1721
1726
|
canTrack: e
|
|
1722
1727
|
}), n;
|
|
1723
1728
|
}
|
|
1724
|
-
},
|
|
1729
|
+
}, sn = () => Se(), cn = ({
|
|
1725
1730
|
id: e,
|
|
1726
1731
|
canTrack: t
|
|
1727
|
-
}) =>
|
|
1728
|
-
key:
|
|
1732
|
+
}) => rn({
|
|
1733
|
+
key: we,
|
|
1729
1734
|
value: e,
|
|
1730
1735
|
canTrack: t
|
|
1731
|
-
}),
|
|
1736
|
+
}), ln = async ({
|
|
1732
1737
|
canTrack: e
|
|
1733
1738
|
}) => {
|
|
1734
1739
|
if (!e)
|
|
@@ -1736,16 +1741,16 @@ const be = "builderSessionId", Gt = async ({
|
|
|
1736
1741
|
visitorId: void 0,
|
|
1737
1742
|
sessionId: void 0
|
|
1738
1743
|
};
|
|
1739
|
-
const t = await
|
|
1744
|
+
const t = await en({
|
|
1740
1745
|
canTrack: e
|
|
1741
|
-
}), n =
|
|
1746
|
+
}), n = an({
|
|
1742
1747
|
canTrack: e
|
|
1743
1748
|
});
|
|
1744
1749
|
return {
|
|
1745
1750
|
sessionId: t,
|
|
1746
1751
|
visitorId: n
|
|
1747
1752
|
};
|
|
1748
|
-
},
|
|
1753
|
+
}, un = async ({
|
|
1749
1754
|
type: e,
|
|
1750
1755
|
canTrack: t,
|
|
1751
1756
|
apiKey: n,
|
|
@@ -1759,23 +1764,23 @@ const be = "builderSessionId", Gt = async ({
|
|
|
1759
1764
|
url: location.href,
|
|
1760
1765
|
...o
|
|
1761
1766
|
},
|
|
1762
|
-
...await
|
|
1767
|
+
...await ln({
|
|
1763
1768
|
canTrack: t
|
|
1764
1769
|
}),
|
|
1765
|
-
userAttributes:
|
|
1770
|
+
userAttributes: me(),
|
|
1766
1771
|
ownerId: n
|
|
1767
1772
|
}
|
|
1768
1773
|
});
|
|
1769
|
-
async function
|
|
1774
|
+
async function dn(e) {
|
|
1770
1775
|
if (!e.apiKey) {
|
|
1771
1776
|
k.error("Missing API key for track call. Please provide your API key.");
|
|
1772
1777
|
return;
|
|
1773
1778
|
}
|
|
1774
|
-
if (e.canTrack && !
|
|
1779
|
+
if (e.canTrack && !j() && (v() || T === "reactNative"))
|
|
1775
1780
|
return fetch("https://cdn.builder.io/api/v1/track", {
|
|
1776
1781
|
method: "POST",
|
|
1777
1782
|
body: JSON.stringify({
|
|
1778
|
-
events: [await
|
|
1783
|
+
events: [await un(e)]
|
|
1779
1784
|
}),
|
|
1780
1785
|
headers: {
|
|
1781
1786
|
"content-type": "application/json"
|
|
@@ -1785,13 +1790,13 @@ async function rn(e) {
|
|
|
1785
1790
|
console.error("Failed to track: ", t);
|
|
1786
1791
|
});
|
|
1787
1792
|
}
|
|
1788
|
-
const
|
|
1793
|
+
const Hn = (e) => dn({
|
|
1789
1794
|
...e,
|
|
1790
1795
|
canTrack: !0
|
|
1791
|
-
}),
|
|
1792
|
-
function
|
|
1793
|
-
let n =
|
|
1794
|
-
if (n || (n =
|
|
1796
|
+
}), mn = "0.7.1-0", ne = {};
|
|
1797
|
+
function fn(e, t) {
|
|
1798
|
+
let n = ne[e];
|
|
1799
|
+
if (n || (n = ne[e] = []), n.push(t), v()) {
|
|
1795
1800
|
const o = {
|
|
1796
1801
|
type: "builder.register",
|
|
1797
1802
|
data: {
|
|
@@ -1806,8 +1811,8 @@ function sn(e, t) {
|
|
|
1806
1811
|
}
|
|
1807
1812
|
}
|
|
1808
1813
|
}
|
|
1809
|
-
const
|
|
1810
|
-
|
|
1814
|
+
const Dn = () => {
|
|
1815
|
+
fn("insertMenu", {
|
|
1811
1816
|
name: "_default",
|
|
1812
1817
|
default: !0,
|
|
1813
1818
|
items: [{
|
|
@@ -1829,14 +1834,14 @@ const Un = () => {
|
|
|
1829
1834
|
}]
|
|
1830
1835
|
});
|
|
1831
1836
|
};
|
|
1832
|
-
let
|
|
1833
|
-
const
|
|
1837
|
+
let oe = !1;
|
|
1838
|
+
const zn = (e = {}) => {
|
|
1834
1839
|
var t, n;
|
|
1835
|
-
|
|
1840
|
+
oe || (oe = !0, v() && ((t = window.parent) == null || t.postMessage({
|
|
1836
1841
|
type: "builder.sdkInfo",
|
|
1837
1842
|
data: {
|
|
1838
|
-
target:
|
|
1839
|
-
version:
|
|
1843
|
+
target: T,
|
|
1844
|
+
version: mn,
|
|
1840
1845
|
supportsPatchUpdates: !1,
|
|
1841
1846
|
// Supports builder-model="..." attribute which is needed to
|
|
1842
1847
|
// scope our '+ add block' button styling
|
|
@@ -1855,26 +1860,26 @@ const _n = (e = {}) => {
|
|
|
1855
1860
|
if (o != null && o.type)
|
|
1856
1861
|
switch (o.type) {
|
|
1857
1862
|
case "builder.evaluate": {
|
|
1858
|
-
const a = o.data.text, c = o.data.arguments || [], s = o.data.id,
|
|
1859
|
-
let f,
|
|
1863
|
+
const a = o.data.text, c = o.data.arguments || [], s = o.data.id, d = new Function(a);
|
|
1864
|
+
let f, p = null;
|
|
1860
1865
|
try {
|
|
1861
|
-
f =
|
|
1862
|
-
} catch (
|
|
1863
|
-
|
|
1866
|
+
f = d.apply(null, c);
|
|
1867
|
+
} catch (b) {
|
|
1868
|
+
p = b;
|
|
1864
1869
|
}
|
|
1865
|
-
|
|
1870
|
+
p ? (i = window.parent) == null || i.postMessage({
|
|
1866
1871
|
type: "builder.evaluateError",
|
|
1867
1872
|
data: {
|
|
1868
1873
|
id: s,
|
|
1869
|
-
error:
|
|
1874
|
+
error: p.message
|
|
1870
1875
|
}
|
|
1871
|
-
}, "*") : f && typeof f.then == "function" ? f.then((
|
|
1876
|
+
}, "*") : f && typeof f.then == "function" ? f.then((b) => {
|
|
1872
1877
|
var m;
|
|
1873
1878
|
(m = window.parent) == null || m.postMessage({
|
|
1874
1879
|
type: "builder.evaluateResult",
|
|
1875
1880
|
data: {
|
|
1876
1881
|
id: s,
|
|
1877
|
-
result:
|
|
1882
|
+
result: b
|
|
1878
1883
|
}
|
|
1879
1884
|
}, "*");
|
|
1880
1885
|
}).catch(console.error) : (r = window.parent) == null || r.postMessage({
|
|
@@ -1889,10 +1894,10 @@ const _n = (e = {}) => {
|
|
|
1889
1894
|
}
|
|
1890
1895
|
})));
|
|
1891
1896
|
};
|
|
1892
|
-
function
|
|
1897
|
+
function ie(e) {
|
|
1893
1898
|
return Math.round(e * 1e3) / 1e3;
|
|
1894
1899
|
}
|
|
1895
|
-
const
|
|
1900
|
+
const hn = (e, t, n = !0) => {
|
|
1896
1901
|
if (!(e instanceof HTMLElement))
|
|
1897
1902
|
return null;
|
|
1898
1903
|
let o = n ? e : e.parentElement;
|
|
@@ -1903,44 +1908,278 @@ const cn = (e, t, n = !0) => {
|
|
|
1903
1908
|
return o;
|
|
1904
1909
|
} while (o = o.parentElement);
|
|
1905
1910
|
return null;
|
|
1906
|
-
},
|
|
1911
|
+
}, gn = (e) => hn(e, (t) => {
|
|
1907
1912
|
const n = t.getAttribute("builder-id") || t.id;
|
|
1908
1913
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
1909
|
-
}),
|
|
1914
|
+
}), re = ({
|
|
1910
1915
|
event: e,
|
|
1911
1916
|
target: t
|
|
1912
1917
|
}) => {
|
|
1913
|
-
const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, r =
|
|
1918
|
+
const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, r = ie(o / n.width), a = ie(i / n.height);
|
|
1914
1919
|
return {
|
|
1915
1920
|
x: r,
|
|
1916
1921
|
y: a
|
|
1917
1922
|
};
|
|
1918
|
-
},
|
|
1919
|
-
const t = e.target, n = t &&
|
|
1923
|
+
}, qn = (e) => {
|
|
1924
|
+
const t = e.target, n = t && gn(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
1920
1925
|
return {
|
|
1921
1926
|
targetBuilderElement: o || void 0,
|
|
1922
1927
|
metadata: {
|
|
1923
|
-
targetOffset: t ?
|
|
1928
|
+
targetOffset: t ? re({
|
|
1924
1929
|
event: e,
|
|
1925
1930
|
target: t
|
|
1926
1931
|
}) : void 0,
|
|
1927
|
-
builderTargetOffset: n ?
|
|
1932
|
+
builderTargetOffset: n ? re({
|
|
1928
1933
|
event: e,
|
|
1929
1934
|
target: n
|
|
1930
1935
|
}) : void 0,
|
|
1931
1936
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
1932
1937
|
}
|
|
1933
1938
|
};
|
|
1939
|
+
}, pn = "builder.tests", z = (e) => `${pn}.${e}`, bn = ({
|
|
1940
|
+
contentId: e
|
|
1941
|
+
}) => ye({
|
|
1942
|
+
name: z(e),
|
|
1943
|
+
canTrack: !0
|
|
1944
|
+
}), yn = ({
|
|
1945
|
+
contentId: e
|
|
1946
|
+
}) => be({
|
|
1947
|
+
name: z(e),
|
|
1948
|
+
canTrack: !0
|
|
1949
|
+
}), xn = ({
|
|
1950
|
+
contentId: e,
|
|
1951
|
+
value: t
|
|
1952
|
+
}) => xe({
|
|
1953
|
+
name: z(e),
|
|
1954
|
+
value: t,
|
|
1955
|
+
canTrack: !0
|
|
1956
|
+
}), Ce = (e) => I(e.id) && I(e.variations) && Object.keys(e.variations).length > 0, Sn = ({
|
|
1957
|
+
id: e,
|
|
1958
|
+
variations: t
|
|
1959
|
+
}) => {
|
|
1960
|
+
var i;
|
|
1961
|
+
let n = 0;
|
|
1962
|
+
const o = Math.random();
|
|
1963
|
+
for (const r in t) {
|
|
1964
|
+
const a = (i = t[r]) == null ? void 0 : i.testRatio;
|
|
1965
|
+
if (n += a, o < n)
|
|
1966
|
+
return r;
|
|
1967
|
+
}
|
|
1968
|
+
return e;
|
|
1969
|
+
}, Ie = (e) => {
|
|
1970
|
+
const t = Sn(e);
|
|
1971
|
+
return xn({
|
|
1972
|
+
contentId: e.id,
|
|
1973
|
+
value: t
|
|
1974
|
+
}).catch((n) => {
|
|
1975
|
+
k.error("could not store A/B test variation: ", n);
|
|
1976
|
+
}), t;
|
|
1977
|
+
}, Te = ({
|
|
1978
|
+
item: e,
|
|
1979
|
+
testGroupId: t
|
|
1980
|
+
}) => {
|
|
1981
|
+
const n = e.variations[t];
|
|
1982
|
+
return t === e.id || // handle edge-case where `testGroupId` points to non-existing variation
|
|
1983
|
+
!n ? {
|
|
1984
|
+
testVariationId: e.id,
|
|
1985
|
+
testVariationName: "Default"
|
|
1986
|
+
} : {
|
|
1987
|
+
data: n.data,
|
|
1988
|
+
testVariationId: n.id,
|
|
1989
|
+
testVariationName: n.name || (n.id === e.id ? "Default" : "")
|
|
1990
|
+
};
|
|
1991
|
+
}, vn = ({
|
|
1992
|
+
item: e,
|
|
1993
|
+
canTrack: t
|
|
1994
|
+
}) => {
|
|
1995
|
+
if (!t)
|
|
1996
|
+
return e;
|
|
1997
|
+
if (!e)
|
|
1998
|
+
return;
|
|
1999
|
+
if (!Ce(e))
|
|
2000
|
+
return e;
|
|
2001
|
+
const n = yn({
|
|
2002
|
+
contentId: e.id
|
|
2003
|
+
}) || Ie({
|
|
2004
|
+
variations: e.variations,
|
|
2005
|
+
id: e.id
|
|
2006
|
+
}), o = Te({
|
|
2007
|
+
item: e,
|
|
2008
|
+
testGroupId: n
|
|
2009
|
+
});
|
|
2010
|
+
return {
|
|
2011
|
+
...e,
|
|
2012
|
+
...o
|
|
2013
|
+
};
|
|
2014
|
+
}, kn = async ({
|
|
2015
|
+
item: e,
|
|
2016
|
+
canTrack: t
|
|
2017
|
+
}) => {
|
|
2018
|
+
if (!t || !Ce(e))
|
|
2019
|
+
return e;
|
|
2020
|
+
const o = await bn({
|
|
2021
|
+
contentId: e.id
|
|
2022
|
+
}) || Ie({
|
|
2023
|
+
variations: e.variations,
|
|
2024
|
+
id: e.id
|
|
2025
|
+
}), i = Te({
|
|
2026
|
+
item: e,
|
|
2027
|
+
testGroupId: o
|
|
2028
|
+
});
|
|
2029
|
+
return {
|
|
2030
|
+
...e,
|
|
2031
|
+
...i
|
|
2032
|
+
};
|
|
2033
|
+
}, M = (e) => I(e) ? e : !0, wn = (e) => {
|
|
2034
|
+
const t = e.get("preview"), n = e.get("overrides." + t);
|
|
2035
|
+
return n || k.warn("No previewed ID found in search params."), n;
|
|
1934
2036
|
};
|
|
1935
|
-
function
|
|
1936
|
-
globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new
|
|
2037
|
+
function Cn() {
|
|
2038
|
+
globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new $e({
|
|
1937
2039
|
max: 500,
|
|
1938
2040
|
// how long to live in ms
|
|
1939
2041
|
ttl: 1e3 * 60 * 5
|
|
1940
2042
|
}));
|
|
1941
2043
|
}
|
|
1942
|
-
|
|
1943
|
-
|
|
2044
|
+
function In(e) {
|
|
2045
|
+
Cn();
|
|
2046
|
+
const t = wn(e);
|
|
2047
|
+
return typeof t == "string" ? globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t) : void 0;
|
|
2048
|
+
}
|
|
2049
|
+
function P(e, t = null, n = ".") {
|
|
2050
|
+
return Object.keys(e).reduce((o, i) => {
|
|
2051
|
+
const r = e[i], a = [t, i].filter(Boolean).join(n);
|
|
2052
|
+
return [typeof r == "object", r !== null, !(Array.isArray(r) && r.length === 0)].every(Boolean) ? {
|
|
2053
|
+
...o,
|
|
2054
|
+
...P(r, a, n)
|
|
2055
|
+
} : {
|
|
2056
|
+
...o,
|
|
2057
|
+
[a]: r
|
|
2058
|
+
};
|
|
2059
|
+
}, {});
|
|
2060
|
+
}
|
|
2061
|
+
const ae = "builder.", Tn = "options.", Rn = (e) => {
|
|
2062
|
+
const t = {};
|
|
2063
|
+
return e.forEach((n, o) => {
|
|
2064
|
+
t[o] = n;
|
|
2065
|
+
}), t;
|
|
2066
|
+
}, Re = (e) => {
|
|
2067
|
+
if (!e)
|
|
2068
|
+
return {};
|
|
2069
|
+
const t = Ee(e), n = {};
|
|
2070
|
+
return Object.keys(t).forEach((o) => {
|
|
2071
|
+
if (o.startsWith(ae)) {
|
|
2072
|
+
const i = o.replace(ae, "").replace(Tn, "");
|
|
2073
|
+
n[i] = t[o];
|
|
2074
|
+
}
|
|
2075
|
+
}), n;
|
|
2076
|
+
}, En = () => {
|
|
2077
|
+
if (!v())
|
|
2078
|
+
return {};
|
|
2079
|
+
const e = new URLSearchParams(window.location.search);
|
|
2080
|
+
return Re(e);
|
|
2081
|
+
}, Ee = (e) => e instanceof URLSearchParams ? Rn(e) : e, An = "v3", se = (e) => typeof e == "number" && !isNaN(e) && e >= 0, q = (e) => {
|
|
2082
|
+
let {
|
|
2083
|
+
noTraverse: t = !1
|
|
2084
|
+
} = e;
|
|
2085
|
+
const {
|
|
2086
|
+
limit: n = 30,
|
|
2087
|
+
userAttributes: o,
|
|
2088
|
+
query: i,
|
|
2089
|
+
model: r,
|
|
2090
|
+
apiKey: a,
|
|
2091
|
+
includeRefs: c = !0,
|
|
2092
|
+
enrich: s,
|
|
2093
|
+
locale: d,
|
|
2094
|
+
apiVersion: f = An,
|
|
2095
|
+
fields: p,
|
|
2096
|
+
omit: b,
|
|
2097
|
+
offset: m,
|
|
2098
|
+
cacheSeconds: h,
|
|
2099
|
+
staleCacheSeconds: u,
|
|
2100
|
+
sort: y,
|
|
2101
|
+
includeUnpublished: S
|
|
2102
|
+
} = e;
|
|
2103
|
+
if (!a)
|
|
2104
|
+
throw new Error("Missing API key");
|
|
2105
|
+
if (!["v2", "v3"].includes(f))
|
|
2106
|
+
throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${f}'`);
|
|
2107
|
+
(e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
|
|
2108
|
+
const g = new URL(`https://cdn.builder.io/api/${f}/content/${r}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${c}${d ? `&locale=${d}` : ""}${s ? `&enrich=${s}` : ""}`);
|
|
2109
|
+
if (g.searchParams.set("omit", b || "meta.componentsUsed"), p && g.searchParams.set("fields", p), Number.isFinite(m) && m > -1 && g.searchParams.set("offset", String(Math.floor(m))), typeof S == "boolean" && g.searchParams.set("includeUnpublished", String(S)), h && se(h) && g.searchParams.set("cacheSeconds", String(h)), u && se(u) && g.searchParams.set("staleCacheSeconds", String(u)), y) {
|
|
2110
|
+
const w = P({
|
|
2111
|
+
sort: y
|
|
2112
|
+
});
|
|
2113
|
+
for (const E in w)
|
|
2114
|
+
g.searchParams.set(E, JSON.stringify(w[E]));
|
|
2115
|
+
}
|
|
2116
|
+
const A = {
|
|
2117
|
+
...En(),
|
|
2118
|
+
...Ee(e.options || {})
|
|
2119
|
+
}, R = P(A);
|
|
2120
|
+
for (const w in R)
|
|
2121
|
+
g.searchParams.set(w, String(R[w]));
|
|
2122
|
+
if (o && g.searchParams.set("userAttributes", JSON.stringify(o)), i) {
|
|
2123
|
+
const w = P({
|
|
2124
|
+
query: i
|
|
2125
|
+
});
|
|
2126
|
+
for (const E in w)
|
|
2127
|
+
g.searchParams.set(E, JSON.stringify(w[E]));
|
|
2128
|
+
}
|
|
2129
|
+
return g;
|
|
2130
|
+
}, Vn = (e) => "results" in e;
|
|
2131
|
+
async function G(e) {
|
|
2132
|
+
const t = await Ae({
|
|
2133
|
+
...e,
|
|
2134
|
+
limit: 1
|
|
2135
|
+
});
|
|
2136
|
+
return t && t.results[0] || null;
|
|
2137
|
+
}
|
|
2138
|
+
const Gn = G, $n = async (e) => {
|
|
2139
|
+
const t = q(e);
|
|
2140
|
+
return await (await Gt(t.href)).json();
|
|
2141
|
+
}, Pn = async (e, t, n = q(e)) => {
|
|
2142
|
+
const o = M(e.canTrack);
|
|
2143
|
+
if (n.search.includes("preview=")) {
|
|
2144
|
+
const r = [];
|
|
2145
|
+
for (const a of t.results) {
|
|
2146
|
+
const c = In(n.searchParams);
|
|
2147
|
+
r.push(c || a);
|
|
2148
|
+
}
|
|
2149
|
+
t.results = r;
|
|
2150
|
+
}
|
|
2151
|
+
if (!o || !(v() || T === "reactNative"))
|
|
2152
|
+
return t;
|
|
2153
|
+
try {
|
|
2154
|
+
const r = [];
|
|
2155
|
+
for (const a of t.results)
|
|
2156
|
+
r.push(await kn({
|
|
2157
|
+
item: a,
|
|
2158
|
+
canTrack: o
|
|
2159
|
+
}));
|
|
2160
|
+
t.results = r;
|
|
2161
|
+
} catch (r) {
|
|
2162
|
+
k.error("Could not process A/B tests. ", r);
|
|
2163
|
+
}
|
|
2164
|
+
return t;
|
|
2165
|
+
};
|
|
2166
|
+
async function Ae(e) {
|
|
2167
|
+
try {
|
|
2168
|
+
const t = q(e), n = await $n(e);
|
|
2169
|
+
return Vn(n) ? Pn(e, n) : (k.error("Error fetching data. ", {
|
|
2170
|
+
url: t,
|
|
2171
|
+
content: n,
|
|
2172
|
+
options: e
|
|
2173
|
+
}), null);
|
|
2174
|
+
} catch (t) {
|
|
2175
|
+
return k.error("Error fetching data. ", t), null;
|
|
2176
|
+
}
|
|
2177
|
+
}
|
|
2178
|
+
const Jn = Ae;
|
|
2179
|
+
function Yn() {
|
|
2180
|
+
return !v() || j() ? !1 : location.search.indexOf("builder.preview=") !== -1;
|
|
2181
|
+
}
|
|
2182
|
+
function _(e) {
|
|
1944
2183
|
return /* @__PURE__ */ l(
|
|
1945
2184
|
"script",
|
|
1946
2185
|
{
|
|
@@ -1949,38 +2188,38 @@ function W(e) {
|
|
|
1949
2188
|
}
|
|
1950
2189
|
);
|
|
1951
2190
|
}
|
|
1952
|
-
function
|
|
1953
|
-
var i, r, a, c, s,
|
|
1954
|
-
const t =
|
|
2191
|
+
function ce(e) {
|
|
2192
|
+
var i, r, a, c, s, d, f, p, b;
|
|
2193
|
+
const t = Ct({
|
|
1955
2194
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1956
2195
|
variationId: (i = e.content) == null ? void 0 : i.testVariationId,
|
|
1957
2196
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1958
2197
|
contentId: (r = e.content) == null ? void 0 : r.id
|
|
1959
2198
|
}), n = [
|
|
1960
|
-
...
|
|
2199
|
+
...ee(),
|
|
1961
2200
|
// While this `components` object is deprecated, we must maintain support for it.
|
|
1962
2201
|
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
1963
2202
|
// existing usage.
|
|
1964
2203
|
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
1965
2204
|
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
1966
|
-
...
|
|
2205
|
+
...te,
|
|
1967
2206
|
...e.customComponents || []
|
|
1968
2207
|
].reduce(
|
|
1969
|
-
(m, { component: h, ...
|
|
2208
|
+
(m, { component: h, ...u }) => ({
|
|
1970
2209
|
...m,
|
|
1971
|
-
[
|
|
2210
|
+
[u.name]: {
|
|
1972
2211
|
component: h,
|
|
1973
|
-
...
|
|
2212
|
+
...U(u)
|
|
1974
2213
|
}
|
|
1975
2214
|
}),
|
|
1976
2215
|
{}
|
|
1977
2216
|
), o = {
|
|
1978
|
-
content:
|
|
2217
|
+
content: Dt({
|
|
1979
2218
|
content: e.content,
|
|
1980
2219
|
data: e.data
|
|
1981
2220
|
}),
|
|
1982
2221
|
localState: void 0,
|
|
1983
|
-
rootState:
|
|
2222
|
+
rootState: Ht({
|
|
1984
2223
|
content: e.content,
|
|
1985
2224
|
data: e.data,
|
|
1986
2225
|
locale: e.locale
|
|
@@ -1990,25 +2229,25 @@ function oe(e) {
|
|
|
1990
2229
|
apiKey: e.apiKey,
|
|
1991
2230
|
apiVersion: e.apiVersion,
|
|
1992
2231
|
componentInfos: [
|
|
1993
|
-
...
|
|
2232
|
+
...ee(),
|
|
1994
2233
|
// While this `components` object is deprecated, we must maintain support for it.
|
|
1995
2234
|
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
1996
2235
|
// existing usage.
|
|
1997
2236
|
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
1998
2237
|
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
1999
|
-
...
|
|
2238
|
+
...te,
|
|
2000
2239
|
...e.customComponents || []
|
|
2001
2240
|
].reduce(
|
|
2002
|
-
(m, { component: h, ...
|
|
2241
|
+
(m, { component: h, ...u }) => ({
|
|
2003
2242
|
...m,
|
|
2004
|
-
[
|
|
2243
|
+
[u.name]: U(u)
|
|
2005
2244
|
}),
|
|
2006
2245
|
{}
|
|
2007
2246
|
),
|
|
2008
2247
|
inheritedStyles: {}
|
|
2009
2248
|
};
|
|
2010
|
-
return /* @__PURE__ */
|
|
2011
|
-
|
|
2249
|
+
return /* @__PURE__ */ C(
|
|
2250
|
+
Ke,
|
|
2012
2251
|
{
|
|
2013
2252
|
content: e.content,
|
|
2014
2253
|
model: e.model,
|
|
@@ -2022,19 +2261,19 @@ function oe(e) {
|
|
|
2022
2261
|
showContent: e.showContent,
|
|
2023
2262
|
builderContextSignal: o,
|
|
2024
2263
|
children: [
|
|
2025
|
-
e.isSsrAbTest ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(
|
|
2264
|
+
e.isSsrAbTest ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(_, { scriptStr: t }) }) : null,
|
|
2026
2265
|
/* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(
|
|
2027
|
-
|
|
2266
|
+
Kt,
|
|
2028
2267
|
{
|
|
2029
2268
|
contentId: (a = o.content) == null ? void 0 : a.id,
|
|
2030
2269
|
cssCode: (s = (c = o.content) == null ? void 0 : c.data) == null ? void 0 : s.cssCode,
|
|
2031
|
-
customFonts: (f = (
|
|
2270
|
+
customFonts: (f = (d = o.content) == null ? void 0 : d.data) == null ? void 0 : f.customFonts
|
|
2032
2271
|
}
|
|
2033
2272
|
) }),
|
|
2034
2273
|
/* @__PURE__ */ l(
|
|
2035
|
-
|
|
2274
|
+
D,
|
|
2036
2275
|
{
|
|
2037
|
-
blocks: (
|
|
2276
|
+
blocks: (b = (p = o.content) == null ? void 0 : p.data) == null ? void 0 : b.blocks,
|
|
2038
2277
|
context: o,
|
|
2039
2278
|
registeredComponents: n
|
|
2040
2279
|
}
|
|
@@ -2043,140 +2282,45 @@ function oe(e) {
|
|
|
2043
2282
|
}
|
|
2044
2283
|
);
|
|
2045
2284
|
}
|
|
2046
|
-
|
|
2047
|
-
contentId: e
|
|
2048
|
-
}) => he({
|
|
2049
|
-
name: j(e),
|
|
2050
|
-
canTrack: !0
|
|
2051
|
-
}), fn = ({
|
|
2052
|
-
contentId: e
|
|
2053
|
-
}) => fe({
|
|
2054
|
-
name: j(e),
|
|
2055
|
-
canTrack: !0
|
|
2056
|
-
}), hn = ({
|
|
2057
|
-
contentId: e,
|
|
2058
|
-
value: t
|
|
2059
|
-
}) => ge({
|
|
2060
|
-
name: j(e),
|
|
2061
|
-
value: t,
|
|
2062
|
-
canTrack: !0
|
|
2063
|
-
}), Se = (e) => C(e.id) && C(e.variations) && Object.keys(e.variations).length > 0, gn = ({
|
|
2064
|
-
id: e,
|
|
2065
|
-
variations: t
|
|
2066
|
-
}) => {
|
|
2067
|
-
var i;
|
|
2068
|
-
let n = 0;
|
|
2069
|
-
const o = Math.random();
|
|
2070
|
-
for (const r in t) {
|
|
2071
|
-
const a = (i = t[r]) == null ? void 0 : i.testRatio;
|
|
2072
|
-
if (n += a, o < n)
|
|
2073
|
-
return r;
|
|
2074
|
-
}
|
|
2075
|
-
return e;
|
|
2076
|
-
}, ve = (e) => {
|
|
2077
|
-
const t = gn(e);
|
|
2078
|
-
return hn({
|
|
2079
|
-
contentId: e.id,
|
|
2080
|
-
value: t
|
|
2081
|
-
}).catch((n) => {
|
|
2082
|
-
k.error("could not store A/B test variation: ", n);
|
|
2083
|
-
}), t;
|
|
2084
|
-
}, ke = ({
|
|
2085
|
-
item: e,
|
|
2086
|
-
testGroupId: t
|
|
2087
|
-
}) => {
|
|
2088
|
-
const n = e.variations[t];
|
|
2089
|
-
return t === e.id || // handle edge-case where `testGroupId` points to non-existing variation
|
|
2090
|
-
!n ? {
|
|
2091
|
-
testVariationId: e.id,
|
|
2092
|
-
testVariationName: "Default"
|
|
2093
|
-
} : {
|
|
2094
|
-
data: n.data,
|
|
2095
|
-
testVariationId: n.id,
|
|
2096
|
-
testVariationName: n.name || (n.id === e.id ? "Default" : "")
|
|
2097
|
-
};
|
|
2098
|
-
}, pn = ({
|
|
2099
|
-
item: e,
|
|
2100
|
-
canTrack: t
|
|
2101
|
-
}) => {
|
|
2102
|
-
if (!t)
|
|
2103
|
-
return e;
|
|
2104
|
-
if (!e)
|
|
2105
|
-
return;
|
|
2106
|
-
if (!Se(e))
|
|
2107
|
-
return e;
|
|
2108
|
-
const n = fn({
|
|
2109
|
-
contentId: e.id
|
|
2110
|
-
}) || ve({
|
|
2111
|
-
variations: e.variations,
|
|
2112
|
-
id: e.id
|
|
2113
|
-
}), o = ke({
|
|
2114
|
-
item: e,
|
|
2115
|
-
testGroupId: n
|
|
2116
|
-
});
|
|
2117
|
-
return {
|
|
2118
|
-
...e,
|
|
2119
|
-
...o
|
|
2120
|
-
};
|
|
2121
|
-
}, bn = async ({
|
|
2122
|
-
item: e,
|
|
2123
|
-
canTrack: t
|
|
2124
|
-
}) => {
|
|
2125
|
-
if (!t || !Se(e))
|
|
2126
|
-
return e;
|
|
2127
|
-
const o = await mn({
|
|
2128
|
-
contentId: e.id
|
|
2129
|
-
}) || ve({
|
|
2130
|
-
variations: e.variations,
|
|
2131
|
-
id: e.id
|
|
2132
|
-
}), i = ke({
|
|
2133
|
-
item: e,
|
|
2134
|
-
testGroupId: o
|
|
2135
|
-
});
|
|
2136
|
-
return {
|
|
2137
|
-
...e,
|
|
2138
|
-
...i
|
|
2139
|
-
};
|
|
2140
|
-
};
|
|
2141
|
-
function we(e) {
|
|
2285
|
+
function Ve(e) {
|
|
2142
2286
|
var r, a, c;
|
|
2143
|
-
const t =
|
|
2144
|
-
canTrack:
|
|
2287
|
+
const t = yt({
|
|
2288
|
+
canTrack: M(e.canTrack),
|
|
2145
2289
|
content: e.content
|
|
2146
2290
|
}), n = function() {
|
|
2147
|
-
var
|
|
2148
|
-
return
|
|
2149
|
-
|
|
2291
|
+
var d;
|
|
2292
|
+
return wt(
|
|
2293
|
+
$(e.content).map((f) => ({
|
|
2150
2294
|
id: f.testVariationId,
|
|
2151
2295
|
testRatio: f.testRatio
|
|
2152
2296
|
})),
|
|
2153
|
-
((
|
|
2297
|
+
((d = e.content) == null ? void 0 : d.id) || ""
|
|
2154
2298
|
);
|
|
2155
2299
|
}, o = function() {
|
|
2156
|
-
return
|
|
2300
|
+
return $(e.content).map((d) => `.variant-${d.testVariationId} { display: none; } `).join("");
|
|
2157
2301
|
}, i = function() {
|
|
2158
|
-
var
|
|
2302
|
+
var d;
|
|
2159
2303
|
return t ? {
|
|
2160
2304
|
...e.content,
|
|
2161
|
-
testVariationId: (
|
|
2162
|
-
} :
|
|
2305
|
+
testVariationId: (d = e.content) == null ? void 0 : d.id
|
|
2306
|
+
} : vn({
|
|
2163
2307
|
item: e.content,
|
|
2164
|
-
canTrack:
|
|
2308
|
+
canTrack: M(e.canTrack)
|
|
2165
2309
|
});
|
|
2166
2310
|
};
|
|
2167
|
-
return /* @__PURE__ */
|
|
2168
|
-
!e.__isNestedRender &&
|
|
2169
|
-
t ? /* @__PURE__ */
|
|
2311
|
+
return /* @__PURE__ */ C(x, { children: [
|
|
2312
|
+
!e.__isNestedRender && T !== "reactNative" ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(_, { scriptStr: kt() }) }) : null,
|
|
2313
|
+
t ? /* @__PURE__ */ C(x, { children: [
|
|
2170
2314
|
/* @__PURE__ */ l(
|
|
2171
|
-
|
|
2315
|
+
O,
|
|
2172
2316
|
{
|
|
2173
2317
|
id: `variants-styles-${(r = e.content) == null ? void 0 : r.id}`,
|
|
2174
2318
|
styles: o()
|
|
2175
2319
|
}
|
|
2176
2320
|
),
|
|
2177
|
-
/* @__PURE__ */ l(
|
|
2178
|
-
(a =
|
|
2179
|
-
|
|
2321
|
+
/* @__PURE__ */ l(_, { scriptStr: n() }),
|
|
2322
|
+
(a = $(e.content)) == null ? void 0 : a.map((s) => /* @__PURE__ */ l(
|
|
2323
|
+
ce,
|
|
2180
2324
|
{
|
|
2181
2325
|
content: s,
|
|
2182
2326
|
showContent: !1,
|
|
@@ -2197,7 +2341,7 @@ function we(e) {
|
|
|
2197
2341
|
))
|
|
2198
2342
|
] }) : null,
|
|
2199
2343
|
/* @__PURE__ */ l(
|
|
2200
|
-
|
|
2344
|
+
ce,
|
|
2201
2345
|
{
|
|
2202
2346
|
content: i(),
|
|
2203
2347
|
classNameProp: `variant-${(c = e.content) == null ? void 0 : c.id}`,
|
|
@@ -2217,13 +2361,13 @@ function we(e) {
|
|
|
2217
2361
|
)
|
|
2218
2362
|
] });
|
|
2219
2363
|
}
|
|
2220
|
-
const
|
|
2364
|
+
const Bn = async ({
|
|
2221
2365
|
builderContextValue: e,
|
|
2222
2366
|
symbol: t
|
|
2223
2367
|
}) => {
|
|
2224
2368
|
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
2225
2369
|
(e != null && e.apiKey))
|
|
2226
|
-
return
|
|
2370
|
+
return G({
|
|
2227
2371
|
model: t.model,
|
|
2228
2372
|
apiKey: e.apiKey,
|
|
2229
2373
|
apiVersion: e.apiVersion,
|
|
@@ -2236,22 +2380,22 @@ const yn = async ({
|
|
|
2236
2380
|
k.error("Could not fetch symbol content: ", n);
|
|
2237
2381
|
});
|
|
2238
2382
|
};
|
|
2239
|
-
async function
|
|
2383
|
+
async function Fn(e) {
|
|
2240
2384
|
var o, i, r, a;
|
|
2241
2385
|
const t = function() {
|
|
2242
|
-
var s,
|
|
2386
|
+
var s, d;
|
|
2243
2387
|
return [
|
|
2244
2388
|
e.attributes.className,
|
|
2245
2389
|
"builder-symbol",
|
|
2246
2390
|
(s = e.symbol) != null && s.inline ? "builder-inline-symbol" : void 0,
|
|
2247
|
-
(
|
|
2391
|
+
(d = e.symbol) != null && d.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
2248
2392
|
].filter(Boolean).join(" ");
|
|
2249
|
-
}, n = ((o = e.symbol) == null ? void 0 : o.content) || await
|
|
2393
|
+
}, n = ((o = e.symbol) == null ? void 0 : o.content) || await Bn({
|
|
2250
2394
|
symbol: e.symbol,
|
|
2251
2395
|
builderContextValue: e.builderContext
|
|
2252
2396
|
});
|
|
2253
2397
|
return /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
|
|
2254
|
-
|
|
2398
|
+
Ve,
|
|
2255
2399
|
{
|
|
2256
2400
|
__isNestedRender: !0,
|
|
2257
2401
|
apiVersion: e.builderContext.apiVersion,
|
|
@@ -2268,145 +2412,18 @@ async function xn(e) {
|
|
|
2268
2412
|
}
|
|
2269
2413
|
) });
|
|
2270
2414
|
}
|
|
2271
|
-
const
|
|
2272
|
-
function
|
|
2273
|
-
return !v() || L() ? !1 : location.search.indexOf("builder.preview=") !== -1;
|
|
2274
|
-
}
|
|
2275
|
-
const ie = {};
|
|
2276
|
-
function zn(e) {
|
|
2415
|
+
const Xn = D, Qn = Ve, le = {};
|
|
2416
|
+
function Zn(e) {
|
|
2277
2417
|
if (v()) {
|
|
2278
|
-
Object.assign(
|
|
2418
|
+
Object.assign(le, e);
|
|
2279
2419
|
const t = {
|
|
2280
2420
|
type: "builder.settingsChange",
|
|
2281
|
-
data:
|
|
2421
|
+
data: le
|
|
2282
2422
|
};
|
|
2283
2423
|
parent.postMessage(t, "*");
|
|
2284
2424
|
}
|
|
2285
2425
|
}
|
|
2286
|
-
const
|
|
2287
|
-
const t = e.get("preview"), n = e.get("overrides." + t);
|
|
2288
|
-
return n || k.warn("No previewed ID found in search params."), n;
|
|
2289
|
-
};
|
|
2290
|
-
function vn(e) {
|
|
2291
|
-
un();
|
|
2292
|
-
const t = Sn(e);
|
|
2293
|
-
return typeof t == "string" ? globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t) : void 0;
|
|
2294
|
-
}
|
|
2295
|
-
function N(e, t = null, n = ".") {
|
|
2296
|
-
return Object.keys(e).reduce((o, i) => {
|
|
2297
|
-
const r = e[i], a = [t, i].filter(Boolean).join(n);
|
|
2298
|
-
return [typeof r == "object", r !== null, !(Array.isArray(r) && r.length === 0)].every(Boolean) ? {
|
|
2299
|
-
...o,
|
|
2300
|
-
...N(r, a, n)
|
|
2301
|
-
} : {
|
|
2302
|
-
...o,
|
|
2303
|
-
[a]: r
|
|
2304
|
-
};
|
|
2305
|
-
}, {});
|
|
2306
|
-
}
|
|
2307
|
-
const re = "builder.", kn = "options.", wn = (e) => {
|
|
2308
|
-
const t = {};
|
|
2309
|
-
return e.forEach((n, o) => {
|
|
2310
|
-
t[o] = n;
|
|
2311
|
-
}), t;
|
|
2312
|
-
}, Ce = (e) => {
|
|
2313
|
-
if (!e)
|
|
2314
|
-
return {};
|
|
2315
|
-
const t = Ie(e), n = {};
|
|
2316
|
-
return Object.keys(t).forEach((o) => {
|
|
2317
|
-
if (o.startsWith(re)) {
|
|
2318
|
-
const i = o.replace(re, "").replace(kn, "");
|
|
2319
|
-
n[i] = t[o];
|
|
2320
|
-
}
|
|
2321
|
-
}), n;
|
|
2322
|
-
}, Cn = () => {
|
|
2323
|
-
if (!v())
|
|
2324
|
-
return {};
|
|
2325
|
-
const e = new URLSearchParams(window.location.search);
|
|
2326
|
-
return Ce(e);
|
|
2327
|
-
}, Ie = (e) => e instanceof URLSearchParams ? wn(e) : e, In = "v3", K = (e) => {
|
|
2328
|
-
let {
|
|
2329
|
-
noTraverse: t = !1
|
|
2330
|
-
} = e;
|
|
2331
|
-
const {
|
|
2332
|
-
limit: n = 30,
|
|
2333
|
-
userAttributes: o,
|
|
2334
|
-
query: i,
|
|
2335
|
-
model: r,
|
|
2336
|
-
apiKey: a,
|
|
2337
|
-
includeRefs: c = !0,
|
|
2338
|
-
enrich: s,
|
|
2339
|
-
locale: u,
|
|
2340
|
-
apiVersion: f = In
|
|
2341
|
-
} = e;
|
|
2342
|
-
if (!a)
|
|
2343
|
-
throw new Error("Missing API key");
|
|
2344
|
-
if (!["v2", "v3"].includes(f))
|
|
2345
|
-
throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${f}'`);
|
|
2346
|
-
(e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
|
|
2347
|
-
const g = new URL(`https://cdn.builder.io/api/${f}/content/${r}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${c}${u ? `&locale=${u}` : ""}${s ? `&enrich=${s}` : ""}`), p = {
|
|
2348
|
-
...Cn(),
|
|
2349
|
-
...Ie(e.options || {})
|
|
2350
|
-
}, m = N(p);
|
|
2351
|
-
for (const h in m)
|
|
2352
|
-
g.searchParams.set(h, String(m[h]));
|
|
2353
|
-
if (o && g.searchParams.set("userAttributes", JSON.stringify(o)), i) {
|
|
2354
|
-
const h = N({
|
|
2355
|
-
query: i
|
|
2356
|
-
});
|
|
2357
|
-
for (const d in h)
|
|
2358
|
-
g.searchParams.set(d, JSON.stringify(h[d]));
|
|
2359
|
-
}
|
|
2360
|
-
return g;
|
|
2361
|
-
}, Tn = (e) => "results" in e;
|
|
2362
|
-
async function H(e) {
|
|
2363
|
-
const t = await Te({
|
|
2364
|
-
...e,
|
|
2365
|
-
limit: 1
|
|
2366
|
-
});
|
|
2367
|
-
return t && t.results[0] || null;
|
|
2368
|
-
}
|
|
2369
|
-
const qn = H, Rn = async (e) => {
|
|
2370
|
-
const t = K(e);
|
|
2371
|
-
return await (await jt(t.href)).json();
|
|
2372
|
-
}, En = async (e, t, n = K(e)) => {
|
|
2373
|
-
const o = O(e.canTrack);
|
|
2374
|
-
if (n.search.includes("preview=")) {
|
|
2375
|
-
const r = [];
|
|
2376
|
-
for (const a of t.results) {
|
|
2377
|
-
const c = vn(n.searchParams);
|
|
2378
|
-
r.push(c || a);
|
|
2379
|
-
}
|
|
2380
|
-
t.results = r;
|
|
2381
|
-
}
|
|
2382
|
-
if (!o || !(v() || I === "reactNative"))
|
|
2383
|
-
return t;
|
|
2384
|
-
try {
|
|
2385
|
-
const r = [];
|
|
2386
|
-
for (const a of t.results)
|
|
2387
|
-
r.push(await bn({
|
|
2388
|
-
item: a,
|
|
2389
|
-
canTrack: o
|
|
2390
|
-
}));
|
|
2391
|
-
t.results = r;
|
|
2392
|
-
} catch (r) {
|
|
2393
|
-
k.error("Could not process A/B tests. ", r);
|
|
2394
|
-
}
|
|
2395
|
-
return t;
|
|
2396
|
-
};
|
|
2397
|
-
async function Te(e) {
|
|
2398
|
-
try {
|
|
2399
|
-
const t = K(e), n = await Rn(e);
|
|
2400
|
-
return Tn(n) ? En(e, n) : (k.error("Error fetching data. ", {
|
|
2401
|
-
url: t,
|
|
2402
|
-
content: n,
|
|
2403
|
-
options: e
|
|
2404
|
-
}), null);
|
|
2405
|
-
} catch (t) {
|
|
2406
|
-
return k.error("Error fetching data. ", t), null;
|
|
2407
|
-
}
|
|
2408
|
-
}
|
|
2409
|
-
const Gn = Te, Jn = async (e) => {
|
|
2426
|
+
const eo = async (e) => {
|
|
2410
2427
|
var o, i, r;
|
|
2411
2428
|
const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((i = e.userAttributes) == null ? void 0 : i.urlPath), n = {
|
|
2412
2429
|
...e,
|
|
@@ -2418,48 +2435,48 @@ const Gn = Te, Jn = async (e) => {
|
|
|
2418
2435
|
urlPath: t
|
|
2419
2436
|
} : {}
|
|
2420
2437
|
},
|
|
2421
|
-
options:
|
|
2438
|
+
options: Re(e.searchParams || ((r = e.url) == null ? void 0 : r.searchParams) || e.options)
|
|
2422
2439
|
};
|
|
2423
2440
|
return {
|
|
2424
2441
|
apiKey: n.apiKey,
|
|
2425
2442
|
model: n.model,
|
|
2426
|
-
content: await
|
|
2443
|
+
content: await G(n)
|
|
2427
2444
|
};
|
|
2428
2445
|
};
|
|
2429
2446
|
export {
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2447
|
+
Re as A,
|
|
2448
|
+
D as B,
|
|
2449
|
+
Ve as C,
|
|
2450
|
+
Hn as D,
|
|
2451
|
+
eo as E,
|
|
2452
|
+
Xn as R,
|
|
2453
|
+
Fn as S,
|
|
2454
|
+
Pt as T,
|
|
2455
|
+
dn as _,
|
|
2456
|
+
Mn as a,
|
|
2457
|
+
_n as b,
|
|
2458
|
+
jn as c,
|
|
2442
2459
|
v as d,
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2460
|
+
M as e,
|
|
2461
|
+
Yn as f,
|
|
2462
|
+
mt as g,
|
|
2463
|
+
K as h,
|
|
2464
|
+
j as i,
|
|
2465
|
+
qn as j,
|
|
2466
|
+
F as k,
|
|
2450
2467
|
k as l,
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2468
|
+
Kn as m,
|
|
2469
|
+
G as n,
|
|
2470
|
+
Gt as o,
|
|
2471
|
+
Cn as p,
|
|
2472
|
+
Qn as q,
|
|
2473
|
+
Dn as r,
|
|
2474
|
+
zn as s,
|
|
2475
|
+
gt as t,
|
|
2476
|
+
fn as u,
|
|
2477
|
+
Zn as v,
|
|
2478
|
+
Ae as w,
|
|
2479
|
+
Jn as x,
|
|
2480
|
+
Gn as y,
|
|
2481
|
+
Pn as z
|
|
2465
2482
|
};
|