@builder.io/sdk-react 3.0.5 → 3.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/blocks-exports.cjs +166 -29
- package/lib/browser/blocks-exports.mjs +1179 -765
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +17 -16
- package/lib/browser/server-entry-a1c64831.cjs +2 -0
- package/lib/browser/{server-entry-785c0408.js → server-entry-df5e89e5.js} +279 -237
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-cd6e0363.js → accordion-289f3464.js} +1 -1
- package/lib/edge/{accordion-190c4426.cjs → accordion-fbfb71f4.cjs} +1 -1
- package/lib/edge/{blocks-766e8d45.cjs → blocks-459a090b.cjs} +10 -10
- package/lib/edge/{blocks-fe2d7c1a.js → blocks-582a7fd7.js} +87 -87
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +13 -12
- package/lib/edge/{button-6a27481c.js → button-9b112da6.js} +2 -2
- package/lib/edge/{button-694fcd4f.cjs → button-da357144.cjs} +1 -1
- package/lib/edge/{columns-b38bf0f7.cjs → columns-a211113f.cjs} +1 -1
- package/lib/edge/{columns-90e6407e.js → columns-aba58dda.js} +3 -3
- package/lib/edge/{content-variants-cbb89349.js → content-variants-08f4371c.js} +165 -124
- package/lib/edge/content-variants-4b5899b5.cjs +134 -0
- package/lib/edge/dynamic-blocks-exports.cjs +3 -1
- package/lib/edge/dynamic-blocks-exports.mjs +5 -2
- package/lib/edge/{form-16bbf874.js → form-4d4553c2.js} +3 -3
- package/lib/edge/{form-547645eb.cjs → form-e3a3afd4.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-8b719c6b.js → get-class-prop-name-38c2baca.js} +1 -1
- package/lib/edge/{get-class-prop-name-58770197.cjs → get-class-prop-name-fbe244e3.cjs} +1 -1
- package/lib/edge/{img-8859c851.cjs → img-8d549af8.cjs} +1 -1
- package/lib/edge/{img-d3351743.js → img-c49066fa.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +18 -17
- package/lib/edge/{input-4fe0fc6d.cjs → input-1ae3842f.cjs} +1 -1
- package/lib/edge/{input-24c601b4.js → input-e7301f4e.js} +1 -1
- package/lib/edge/personalization-container-035be6ba.js +384 -0
- package/lib/edge/personalization-container-25cd8b5e.cjs +138 -0
- package/lib/edge/{select-af05377b.js → select-4187b229.js} +1 -1
- package/lib/edge/{select-c73bd418.cjs → select-64fdaa79.cjs} +1 -1
- package/lib/edge/server-entry-2ef4e66a.cjs +2 -0
- package/lib/edge/{server-entry-67bfc740.js → server-entry-61fca4f7.js} +322 -280
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-759c8dd9.cjs → slot-995f63c2.cjs} +1 -1
- package/lib/edge/{slot-32a4df0c.js → slot-d6c46a42.js} +3 -3
- package/lib/edge/{symbol-8d63aa7d.cjs → symbol-498daa97.cjs} +1 -1
- package/lib/edge/{symbol-50360a37.js → symbol-623dc717.js} +2 -2
- package/lib/edge/{tabs-6535c934.js → tabs-12ba41b1.js} +3 -3
- package/lib/edge/{tabs-fc6c1700.cjs → tabs-d39499cd.cjs} +1 -1
- package/lib/node/blocks-exports.cjs +168 -31
- package/lib/node/blocks-exports.mjs +1292 -878
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +17 -16
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +3 -3
- package/lib/node/{server-entry-ffc70868.js → server-entry-27d9d31e.js} +279 -237
- package/lib/node/server-entry-98ebff74.cjs +2 -0
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{setIvm-2cea7252.js → setIvm-2dde9074.js} +1 -1
- package/lib/node/{setIvm-4ce0db03.cjs → setIvm-784fe19f.cjs} +1 -1
- package/lib/node/setIvm.cjs +1 -1
- package/lib/node/setIvm.mjs +2 -2
- package/lib/node/{should-force-browser-runtime-in-node-c0d50009.js → should-force-browser-runtime-in-node-80f081c8.js} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-d3e6df07.cjs → should-force-browser-runtime-in-node-cd6baa94.cjs} +1 -1
- package/package.json +1 -1
- package/types/blocks/personalization-container/component-info.d.ts +2 -0
- package/types/blocks/personalization-container/helpers/inlined-fns.d.ts +8 -0
- package/types/blocks/personalization-container/helpers.d.ts +27 -0
- package/types/blocks/personalization-container/index.d.ts +1 -0
- package/types/blocks/personalization-container/personalization-container.d.ts +4 -0
- package/types/blocks/personalization-container/personalization-container.types.d.ts +14 -0
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/helpers/user-attributes.d.ts +17 -0
- package/types/index-helpers/blocks-exports.d.ts +1 -0
- package/types/types/input.d.ts +1 -0
- package/lib/browser/server-entry-101d66b8.cjs +0 -2
- package/lib/edge/content-variants-4e385c19.cjs +0 -134
- package/lib/edge/server-entry-3c7fa63a.cjs +0 -2
- package/lib/node/server-entry-95273908.cjs +0 -2
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
2
|
+
import { TARGET as O, isEditing as W, isBrowser as $, getUserAttributes as Ke, checkIsDefined as K, logger as Q, isPreviewing as Y, userAttributesService as de, getDefaultCanTrack as _, logFetch as Ie, registerInsertMenu as Je, setupBrowserForEditing as Ge, createRegisterComponentMessage as Qe, _track as me, fetchOneEntry as Ee, createEditorListener as Ye, serializeIncludingFunctions as fe, handleABTestingSync as Xe } from "./server-entry-df5e89e5.js";
|
|
3
|
+
import { setClientUserAttributes as Si } from "./server-entry-df5e89e5.js";
|
|
4
|
+
import { jsx as s, Fragment as R, jsxs as V } from "react/jsx-runtime";
|
|
5
|
+
import * as Ze from "react";
|
|
6
|
+
import { createContext as Re, useEffect as N, useState as E, useRef as F, useContext as he, createElement as Pe } from "react";
|
|
7
|
+
const et = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), tt = (e) => typeof e == "string" && et.has(e.toLowerCase());
|
|
7
8
|
function re(e) {
|
|
8
|
-
return /* @__PURE__ */ s(
|
|
9
|
+
return /* @__PURE__ */ s(R, { children: tt(e.TagName) ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ s(R, { children: typeof e.TagName == "string" ? /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) : /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) });
|
|
9
10
|
}
|
|
10
|
-
const
|
|
11
|
-
switch (
|
|
11
|
+
const q = () => {
|
|
12
|
+
switch (O) {
|
|
12
13
|
case "react":
|
|
13
14
|
case "reactNative":
|
|
14
15
|
case "rsc":
|
|
@@ -21,11 +22,11 @@ const _ = () => {
|
|
|
21
22
|
return "class";
|
|
22
23
|
}
|
|
23
24
|
};
|
|
24
|
-
function
|
|
25
|
+
function nt(e) {
|
|
25
26
|
function t() {
|
|
26
27
|
return {
|
|
27
28
|
...e.attributes,
|
|
28
|
-
[
|
|
29
|
+
[q()]: `${e.link ? "" : "builder-button"} ${e.attributes[q()] || ""}`,
|
|
29
30
|
...e.link ? {
|
|
30
31
|
href: e.link,
|
|
31
32
|
target: e.openLinkInNewTab ? "_blank" : void 0,
|
|
@@ -45,7 +46,7 @@ function tt(e) {
|
|
|
45
46
|
}
|
|
46
47
|
);
|
|
47
48
|
}
|
|
48
|
-
const le =
|
|
49
|
+
const le = Re({
|
|
49
50
|
content: null,
|
|
50
51
|
context: {},
|
|
51
52
|
localState: void 0,
|
|
@@ -60,10 +61,10 @@ const le = Ee({
|
|
|
60
61
|
BlocksWrapperProps: {},
|
|
61
62
|
nonce: "",
|
|
62
63
|
model: ""
|
|
63
|
-
}),
|
|
64
|
+
}), Ve = Re({ registeredComponents: {} }), Be = (e, t, n) => {
|
|
64
65
|
const i = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((o, a) => o != null ? o[a] : o, e);
|
|
65
66
|
return i === void 0 || i === e ? n : i;
|
|
66
|
-
},
|
|
67
|
+
}, it = ({
|
|
67
68
|
builder: e,
|
|
68
69
|
context: t,
|
|
69
70
|
event: n,
|
|
@@ -75,15 +76,15 @@ const le = Ee({
|
|
|
75
76
|
builder: e,
|
|
76
77
|
context: t,
|
|
77
78
|
event: n
|
|
78
|
-
}),
|
|
79
|
+
}), ot = () => ({
|
|
79
80
|
isEditing: W(),
|
|
80
|
-
isBrowser:
|
|
81
|
-
isServer:
|
|
82
|
-
getUserAttributes: () =>
|
|
83
|
-
}),
|
|
81
|
+
isBrowser: $(),
|
|
82
|
+
isServer: !$(),
|
|
83
|
+
getUserAttributes: () => Ke()
|
|
84
|
+
}), at = (e, {
|
|
84
85
|
isExpression: t = !0
|
|
85
86
|
}) => /* 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;
|
|
86
|
-
function
|
|
87
|
+
function Ne({
|
|
87
88
|
rootState: e,
|
|
88
89
|
localState: t,
|
|
89
90
|
rootSetState: n
|
|
@@ -93,7 +94,7 @@ function Ve({
|
|
|
93
94
|
if (t && o in t)
|
|
94
95
|
return t[o];
|
|
95
96
|
const a = i[o];
|
|
96
|
-
return typeof a == "object" && a !== null ?
|
|
97
|
+
return typeof a == "object" && a !== null ? Ne({
|
|
97
98
|
rootState: a,
|
|
98
99
|
localState: void 0,
|
|
99
100
|
rootSetState: n ? (r) => {
|
|
@@ -108,7 +109,7 @@ function Ve({
|
|
|
108
109
|
}
|
|
109
110
|
});
|
|
110
111
|
}
|
|
111
|
-
const
|
|
112
|
+
const ge = ({
|
|
112
113
|
code: e,
|
|
113
114
|
builder: t,
|
|
114
115
|
context: n,
|
|
@@ -117,35 +118,35 @@ const he = ({
|
|
|
117
118
|
rootSetState: a,
|
|
118
119
|
rootState: r
|
|
119
120
|
}) => {
|
|
120
|
-
const l =
|
|
121
|
+
const l = it({
|
|
121
122
|
builder: t,
|
|
122
123
|
context: n,
|
|
123
124
|
event: i,
|
|
124
|
-
state:
|
|
125
|
+
state: Ne({
|
|
125
126
|
rootState: r,
|
|
126
127
|
localState: o,
|
|
127
128
|
rootSetState: a
|
|
128
129
|
})
|
|
129
130
|
});
|
|
130
|
-
return new Function(...l.map(([
|
|
131
|
+
return new Function(...l.map(([u]) => u), e)(...l.map(([, u]) => u));
|
|
131
132
|
};
|
|
132
|
-
function
|
|
133
|
+
function rt() {
|
|
133
134
|
var e;
|
|
134
|
-
return typeof process != "undefined" &&
|
|
135
|
+
return typeof process != "undefined" && K((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
|
|
135
136
|
}
|
|
136
|
-
const
|
|
137
|
+
const lt = ({
|
|
137
138
|
shouldLogWarning: e
|
|
138
139
|
}) => {
|
|
139
140
|
var o;
|
|
140
|
-
if (!
|
|
141
|
+
if (!rt())
|
|
141
142
|
return !1;
|
|
142
143
|
const t = process.arch === "arm64", n = process.version.startsWith("v20"), i = (o = process.env.NODE_OPTIONS) == null ? void 0 : o.includes("--no-node-snapshot");
|
|
143
|
-
return t && n && !i ? (e &&
|
|
144
|
-
},
|
|
144
|
+
return t && n && !i ? (e && Q.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;
|
|
145
|
+
}, st = (e) => ($() || lt({
|
|
145
146
|
shouldLogWarning: !0
|
|
146
|
-
}),
|
|
147
|
+
}), ge(e)), ct = /^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/, ut = /(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/, dt = (e) => {
|
|
147
148
|
var t, n, i, o, a, r;
|
|
148
|
-
return ((i = (n = (t =
|
|
149
|
+
return ((i = (n = (t = ct.exec(e.trim())) == null ? void 0 : t.groups) == null ? void 0 : n.getPath) == null ? void 0 : i.slice(1)) || ((r = (a = (o = ut.exec(e.trim())) == null ? void 0 : o.groups) == null ? void 0 : a.getPath) == null ? void 0 : r.slice(1));
|
|
149
150
|
};
|
|
150
151
|
function L({
|
|
151
152
|
code: e,
|
|
@@ -164,11 +165,11 @@ function L({
|
|
|
164
165
|
...i,
|
|
165
166
|
...n
|
|
166
167
|
}, l);
|
|
167
|
-
const
|
|
168
|
-
code:
|
|
168
|
+
const u = {
|
|
169
|
+
code: at(e, {
|
|
169
170
|
isExpression: r
|
|
170
171
|
}),
|
|
171
|
-
builder:
|
|
172
|
+
builder: ot(),
|
|
172
173
|
context: t,
|
|
173
174
|
event: a,
|
|
174
175
|
rootSetState: o,
|
|
@@ -176,23 +177,23 @@ function L({
|
|
|
176
177
|
localState: n
|
|
177
178
|
};
|
|
178
179
|
try {
|
|
179
|
-
return
|
|
180
|
+
return st(u);
|
|
180
181
|
} catch (c) {
|
|
181
|
-
|
|
182
|
+
Q.error("Failed code evaluation: " + c.message, {
|
|
182
183
|
code: e
|
|
183
184
|
});
|
|
184
185
|
return;
|
|
185
186
|
}
|
|
186
187
|
}
|
|
187
|
-
function
|
|
188
|
+
function mt(e, t) {
|
|
188
189
|
var n;
|
|
189
190
|
return {
|
|
190
191
|
...(n = e.component) == null ? void 0 : n.options,
|
|
191
192
|
...e.options,
|
|
192
|
-
...
|
|
193
|
+
...ft(e, t)
|
|
193
194
|
};
|
|
194
195
|
}
|
|
195
|
-
const
|
|
196
|
+
const ft = (e, t) => {
|
|
196
197
|
var n, i;
|
|
197
198
|
if (((n = e.component) == null ? void 0 : n.name) === "Text" && ((i = e.component.options) != null && i.text) && typeof e.component.options.text == "string")
|
|
198
199
|
return {
|
|
@@ -206,13 +207,13 @@ const mt = (e, t) => {
|
|
|
206
207
|
}))
|
|
207
208
|
};
|
|
208
209
|
};
|
|
209
|
-
function
|
|
210
|
+
function ht(e, ...t) {
|
|
210
211
|
const n = Object.assign({}, e);
|
|
211
212
|
for (const i of t)
|
|
212
213
|
delete n[i];
|
|
213
214
|
return n;
|
|
214
215
|
}
|
|
215
|
-
function
|
|
216
|
+
function J(e, t, n = null, i = null, o = /* @__PURE__ */ new WeakSet()) {
|
|
216
217
|
if (e == null || typeof e != "object") {
|
|
217
218
|
t(e, (a) => {
|
|
218
219
|
n !== null && i !== null && (n[i] = a);
|
|
@@ -220,59 +221,59 @@ function K(e, t, n = null, i = null, o = /* @__PURE__ */ new WeakSet()) {
|
|
|
220
221
|
return;
|
|
221
222
|
}
|
|
222
223
|
o.has(e) || (o.add(e), Array.isArray(e) ? e.forEach((a, r) => {
|
|
223
|
-
t(a, (
|
|
224
|
-
e[r] =
|
|
225
|
-
}),
|
|
224
|
+
t(a, (u) => {
|
|
225
|
+
e[r] = u;
|
|
226
|
+
}), J(a, t, e, r, o);
|
|
226
227
|
}) : Object.entries(e).forEach(([a, r]) => {
|
|
227
|
-
t(r, (
|
|
228
|
-
e[a] =
|
|
229
|
-
}),
|
|
228
|
+
t(r, (u) => {
|
|
229
|
+
e[a] = u;
|
|
230
|
+
}), J(r, t, e, a, o);
|
|
230
231
|
}));
|
|
231
232
|
}
|
|
232
233
|
function Ae(e) {
|
|
233
234
|
return e && typeof e == "object" && e["@type"] === "@builder.io/core:LocalizedValue";
|
|
234
235
|
}
|
|
235
|
-
function
|
|
236
|
+
function gt(e) {
|
|
236
237
|
if (!e || !Object.getOwnPropertyNames(e).length)
|
|
237
238
|
return !1;
|
|
238
239
|
let t = !1;
|
|
239
|
-
return
|
|
240
|
+
return J(e, (n) => {
|
|
240
241
|
if (Ae(n)) {
|
|
241
242
|
t = !0;
|
|
242
243
|
return;
|
|
243
244
|
}
|
|
244
245
|
}), t;
|
|
245
246
|
}
|
|
246
|
-
function
|
|
247
|
-
return !e || !Object.getOwnPropertyNames(e).length ? {} : (
|
|
247
|
+
function bt(e, t) {
|
|
248
|
+
return !e || !Object.getOwnPropertyNames(e).length ? {} : (J(e, (n, i) => {
|
|
248
249
|
var o;
|
|
249
250
|
Ae(n) && i((o = n[t]) != null ? o : void 0);
|
|
250
251
|
}), e);
|
|
251
252
|
}
|
|
252
|
-
function
|
|
253
|
+
function pt(e, t) {
|
|
253
254
|
var n, i;
|
|
254
|
-
return (n = e.component) != null && n.options &&
|
|
255
|
+
return (n = e.component) != null && n.options && gt((i = e.component) == null ? void 0 : i.options) && (t || console.warn("[Builder.io] In order to use localized fields in Builder, you must pass a locale prop to the BuilderComponent or to options object while fetching the content to resolve localized fields. Learn more: https://www.builder.io/c/docs/localization-inline#targeting-and-inline-localization"), e.component.options = bt(e.component.options, t != null ? t : "Default")), e;
|
|
255
256
|
}
|
|
256
|
-
const se = (e) => JSON.parse(JSON.stringify(e)),
|
|
257
|
+
const se = (e) => JSON.parse(JSON.stringify(e)), We = (e, t, n) => {
|
|
257
258
|
if (Object(e) !== e)
|
|
258
259
|
return e;
|
|
259
260
|
const i = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
260
261
|
return i.slice(0, -1).reduce((o, a, r) => Object(o[a]) === o[a] ? o[a] : o[a] = Math.abs(Number(i[r + 1])) >> 0 === +i[r + 1] ? [] : {}, e)[i[i.length - 1]] = n, e;
|
|
261
262
|
};
|
|
262
|
-
function
|
|
263
|
+
function ae(e) {
|
|
263
264
|
if (e === null || typeof e != "object")
|
|
264
265
|
return e;
|
|
265
266
|
if (Array.isArray(e))
|
|
266
|
-
return e.map((n) =>
|
|
267
|
+
return e.map((n) => ae(n));
|
|
267
268
|
if (e["@type"] === "@builder.io/sdk:Element")
|
|
268
269
|
return e;
|
|
269
270
|
const t = {};
|
|
270
271
|
for (const n in e)
|
|
271
|
-
n !== "meta" && Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
272
|
+
n !== "meta" && Object.prototype.hasOwnProperty.call(e, n) && (t[n] = ae(e[n]));
|
|
272
273
|
return t;
|
|
273
274
|
}
|
|
274
|
-
const
|
|
275
|
-
if (
|
|
275
|
+
const yt = ["svelte", "vue", "angular", "qwik", "solid"].includes(O), vt = (e) => {
|
|
276
|
+
if (yt) {
|
|
276
277
|
const t = se(e);
|
|
277
278
|
return {
|
|
278
279
|
...t,
|
|
@@ -284,7 +285,7 @@ const pt = ["svelte", "vue", "angular", "qwik", "solid"].includes($), yt = (e) =
|
|
|
284
285
|
}
|
|
285
286
|
};
|
|
286
287
|
} else {
|
|
287
|
-
const t =
|
|
288
|
+
const t = ae(ht(e, "children", "meta"));
|
|
288
289
|
return {
|
|
289
290
|
...t,
|
|
290
291
|
properties: {
|
|
@@ -306,27 +307,27 @@ const pt = ["svelte", "vue", "angular", "qwik", "solid"].includes($), yt = (e) =
|
|
|
306
307
|
}) => {
|
|
307
308
|
if (!e.bindings)
|
|
308
309
|
return e;
|
|
309
|
-
const a =
|
|
310
|
+
const a = vt(e);
|
|
310
311
|
for (const r in e.bindings) {
|
|
311
|
-
const l = e.bindings[r],
|
|
312
|
+
const l = e.bindings[r], u = L({
|
|
312
313
|
code: l,
|
|
313
314
|
localState: n,
|
|
314
315
|
rootState: i,
|
|
315
316
|
rootSetState: o,
|
|
316
317
|
context: t
|
|
317
318
|
});
|
|
318
|
-
|
|
319
|
+
We(a, r, u);
|
|
319
320
|
}
|
|
320
321
|
return a;
|
|
321
322
|
};
|
|
322
|
-
function
|
|
323
|
+
function St({
|
|
323
324
|
block: e,
|
|
324
325
|
context: t,
|
|
325
326
|
localState: n,
|
|
326
327
|
rootState: i,
|
|
327
328
|
rootSetState: o
|
|
328
329
|
}) {
|
|
329
|
-
let a =
|
|
330
|
+
let a = pt(e, i.locale);
|
|
330
331
|
return a = a, xt({
|
|
331
332
|
block: a,
|
|
332
333
|
localState: n,
|
|
@@ -335,17 +336,17 @@ function vt({
|
|
|
335
336
|
context: t
|
|
336
337
|
});
|
|
337
338
|
}
|
|
338
|
-
const
|
|
339
|
-
function
|
|
339
|
+
const X = (e) => e ? e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
|
|
340
|
+
function kt(e, t, n = {}) {
|
|
340
341
|
let i, o, a, r = null, l = 0;
|
|
341
|
-
const
|
|
342
|
+
const u = function() {
|
|
342
343
|
l = n.leading === !1 ? 0 : Date.now(), r = null, a = e.apply(i, o), r || (i = o = null);
|
|
343
344
|
};
|
|
344
345
|
return function() {
|
|
345
346
|
const c = Date.now();
|
|
346
347
|
!l && n.leading === !1 && (l = c);
|
|
347
348
|
const h = t - (c - l);
|
|
348
|
-
return i = this, o = arguments, h <= 0 || h > t ? (r && (clearTimeout(r), r = null), l = c, a = e.apply(i, o), r || (i = o = null)) : !r && n.trailing !== !1 && (r = setTimeout(
|
|
349
|
+
return i = this, o = arguments, h <= 0 || h > t ? (r && (clearTimeout(r), r = null), l = c, a = e.apply(i, o), r || (i = o = null)) : !r && n.trailing !== !1 && (r = setTimeout(u, h)), a;
|
|
349
350
|
};
|
|
350
351
|
}
|
|
351
352
|
function U(e, ...t) {
|
|
@@ -358,55 +359,55 @@ function U(e, ...t) {
|
|
|
358
359
|
}
|
|
359
360
|
return n;
|
|
360
361
|
}
|
|
361
|
-
function
|
|
362
|
+
function Ct(e) {
|
|
362
363
|
for (const t of e)
|
|
363
364
|
switch (t.trigger) {
|
|
364
365
|
case "pageLoad":
|
|
365
|
-
|
|
366
|
+
Fe(t);
|
|
366
367
|
break;
|
|
367
368
|
case "scrollInView":
|
|
368
|
-
|
|
369
|
+
wt(t);
|
|
369
370
|
break;
|
|
370
371
|
}
|
|
371
372
|
}
|
|
372
|
-
function
|
|
373
|
+
function De(e) {
|
|
373
374
|
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
374
375
|
}
|
|
375
|
-
function
|
|
376
|
-
const n =
|
|
376
|
+
function $e(e, t) {
|
|
377
|
+
const n = Tt(e), i = getComputedStyle(t), o = e.steps[0].styles, a = e.steps[e.steps.length - 1].styles, r = [o, a];
|
|
377
378
|
for (const l of r)
|
|
378
|
-
for (const
|
|
379
|
-
|
|
379
|
+
for (const u of n)
|
|
380
|
+
u in l || (l[u] = i[u]);
|
|
380
381
|
}
|
|
381
|
-
function
|
|
382
|
+
function Tt(e) {
|
|
382
383
|
const t = [];
|
|
383
384
|
for (const n of e.steps)
|
|
384
385
|
for (const i in n.styles)
|
|
385
386
|
t.indexOf(i) === -1 && t.push(i);
|
|
386
387
|
return t;
|
|
387
388
|
}
|
|
388
|
-
function
|
|
389
|
+
function Fe(e) {
|
|
389
390
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
390
391
|
if (!t.length) {
|
|
391
|
-
|
|
392
|
+
De(e.elementId || e.id || "");
|
|
392
393
|
return;
|
|
393
394
|
}
|
|
394
395
|
Array.from(t).forEach((n) => {
|
|
395
|
-
|
|
396
|
-
n.style.transition = `all ${e.duration}s ${
|
|
396
|
+
$e(e, n), n.style.transition = "none", n.style.transitionDelay = "0", U(n.style, e.steps[0].styles), setTimeout(() => {
|
|
397
|
+
n.style.transition = `all ${e.duration}s ${X(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), U(n.style, e.steps[1].styles), setTimeout(() => {
|
|
397
398
|
n.style.transition = "", n.style.transitionDelay = "";
|
|
398
399
|
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
399
400
|
});
|
|
400
401
|
});
|
|
401
402
|
}
|
|
402
|
-
function
|
|
403
|
+
function wt(e) {
|
|
403
404
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
404
405
|
if (!t.length) {
|
|
405
|
-
|
|
406
|
+
De(e.elementId || e.id || "");
|
|
406
407
|
return;
|
|
407
408
|
}
|
|
408
409
|
Array.from(t).forEach((n) => {
|
|
409
|
-
|
|
410
|
+
$e(e, n);
|
|
410
411
|
let i = !1, o = !1;
|
|
411
412
|
function a() {
|
|
412
413
|
!i && l(n) ? (i = !0, o = !0, setTimeout(() => {
|
|
@@ -415,19 +416,19 @@ function Tt(e) {
|
|
|
415
416
|
}, (e.duration + (e.delay || 0)) * 1e3 + 100);
|
|
416
417
|
})) : e.repeat && i && !o && !l(n) && (i = !1, U(n.style, e.steps[0].styles));
|
|
417
418
|
}
|
|
418
|
-
const r =
|
|
419
|
+
const r = kt(a, 200, {
|
|
419
420
|
leading: !1
|
|
420
421
|
});
|
|
421
422
|
function l(h) {
|
|
422
|
-
const
|
|
423
|
-
return
|
|
423
|
+
const g = h.getBoundingClientRect(), f = window.innerHeight, d = (e.thresholdPercent || 0) / 100 * f;
|
|
424
|
+
return g.bottom > d && g.top < f - d;
|
|
424
425
|
}
|
|
425
|
-
const
|
|
426
|
+
const u = e.steps[0].styles;
|
|
426
427
|
function c() {
|
|
427
|
-
U(n.style,
|
|
428
|
+
U(n.style, u);
|
|
428
429
|
}
|
|
429
430
|
c(), setTimeout(() => {
|
|
430
|
-
n.style.transition = `all ${e.duration}s ${
|
|
431
|
+
n.style.transition = `all ${e.duration}s ${X(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
431
432
|
}), document.addEventListener("scroll", r, {
|
|
432
433
|
capture: !0,
|
|
433
434
|
passive: !0
|
|
@@ -436,9 +437,9 @@ function Tt(e) {
|
|
|
436
437
|
}
|
|
437
438
|
const Oe = (e) => Object.entries(e).map(([n, i]) => {
|
|
438
439
|
if (typeof i == "string")
|
|
439
|
-
return `${
|
|
440
|
-
}).filter(
|
|
441
|
-
`),
|
|
440
|
+
return `${X(n)}: ${i};`;
|
|
441
|
+
}).filter(K), It = (e) => Oe(e).join(`
|
|
442
|
+
`), j = ({
|
|
442
443
|
mediaQuery: e,
|
|
443
444
|
className: t,
|
|
444
445
|
styles: n
|
|
@@ -450,21 +451,21 @@ const Oe = (e) => Object.entries(e).map(([n, i]) => {
|
|
|
450
451
|
${i}
|
|
451
452
|
}` : i;
|
|
452
453
|
};
|
|
453
|
-
function
|
|
454
|
+
function Et({
|
|
454
455
|
style: e
|
|
455
456
|
}) {
|
|
456
457
|
return e;
|
|
457
458
|
}
|
|
458
|
-
const
|
|
459
|
+
const Rt = ({
|
|
459
460
|
block: e,
|
|
460
461
|
context: t
|
|
461
|
-
}) =>
|
|
462
|
+
}) => Le(Et({
|
|
462
463
|
style: e.style || {},
|
|
463
464
|
context: t,
|
|
464
465
|
block: e
|
|
465
466
|
}));
|
|
466
|
-
function
|
|
467
|
-
switch (
|
|
467
|
+
function Le(e) {
|
|
468
|
+
switch (O) {
|
|
468
469
|
case "svelte":
|
|
469
470
|
case "vue":
|
|
470
471
|
case "solid":
|
|
@@ -477,7 +478,7 @@ function De(e) {
|
|
|
477
478
|
return e;
|
|
478
479
|
}
|
|
479
480
|
}
|
|
480
|
-
const
|
|
481
|
+
const Ue = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includes(t) : !1 : !0, Pt = ({
|
|
481
482
|
block: e,
|
|
482
483
|
registeredComponents: t,
|
|
483
484
|
model: n
|
|
@@ -487,14 +488,14 @@ const Le = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includ
|
|
|
487
488
|
if (!i)
|
|
488
489
|
return null;
|
|
489
490
|
const o = t[i];
|
|
490
|
-
if (!o ||
|
|
491
|
+
if (!o || Ue(o, n)) {
|
|
491
492
|
console.warn(`
|
|
492
493
|
Could not find a registered component named "${i}".
|
|
493
494
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
494
495
|
return;
|
|
495
496
|
} else
|
|
496
497
|
return o;
|
|
497
|
-
},
|
|
498
|
+
}, Vt = ({
|
|
498
499
|
block: e,
|
|
499
500
|
context: t
|
|
500
501
|
}) => {
|
|
@@ -514,14 +515,14 @@ const Le = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includ
|
|
|
514
515
|
if (!Array.isArray(o))
|
|
515
516
|
return;
|
|
516
517
|
const a = n.collection.split(".").pop(), r = n.itemName || (a ? a + "Item" : "item");
|
|
517
|
-
return o.map((
|
|
518
|
+
return o.map((u, c) => ({
|
|
518
519
|
context: {
|
|
519
520
|
...t,
|
|
520
521
|
localState: {
|
|
521
522
|
...t.localState,
|
|
522
523
|
$index: c,
|
|
523
|
-
$item:
|
|
524
|
-
[r]:
|
|
524
|
+
$item: u,
|
|
525
|
+
[r]: u,
|
|
525
526
|
[`$${r}Index`]: c
|
|
526
527
|
}
|
|
527
528
|
},
|
|
@@ -532,22 +533,22 @@ const Le = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includ
|
|
|
532
533
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderLinkComponent ? {
|
|
533
534
|
builderLinkComponent: t
|
|
534
535
|
} : {};
|
|
535
|
-
},
|
|
536
|
+
}, Nt = (e, t, n) => {
|
|
536
537
|
var i;
|
|
537
538
|
return (i = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && i.builderComponents ? {
|
|
538
|
-
builderComponents: Object.fromEntries(Object.entries(t).filter(([a, r]) => !
|
|
539
|
+
builderComponents: Object.fromEntries(Object.entries(t).filter(([a, r]) => !Ue(r, n)))
|
|
539
540
|
} : {};
|
|
540
541
|
}, At = (e, t) => {
|
|
541
542
|
var n;
|
|
542
543
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderBlock ? {
|
|
543
544
|
builderBlock: t
|
|
544
545
|
} : {};
|
|
545
|
-
},
|
|
546
|
+
}, Wt = (e, t) => {
|
|
546
547
|
var n;
|
|
547
548
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderContext ? {
|
|
548
549
|
builderContext: t
|
|
549
550
|
} : {};
|
|
550
|
-
},
|
|
551
|
+
}, _e = {
|
|
551
552
|
small: {
|
|
552
553
|
min: 320,
|
|
553
554
|
default: 321,
|
|
@@ -563,11 +564,11 @@ const Le = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includ
|
|
|
563
564
|
default: 991,
|
|
564
565
|
max: 1200
|
|
565
566
|
}
|
|
566
|
-
},
|
|
567
|
+
}, be = (e, t = _e) => `@media (max-width: ${t[e].max}px)`, qe = ({
|
|
567
568
|
small: e,
|
|
568
569
|
medium: t
|
|
569
570
|
}) => {
|
|
570
|
-
const n = se(
|
|
571
|
+
const n = se(_e);
|
|
571
572
|
if (!e || !t)
|
|
572
573
|
return n;
|
|
573
574
|
const i = Math.floor(e / 2);
|
|
@@ -590,7 +591,7 @@ const Le = (e, t) => e ? t ? e.models && e.models.length > 0 && !e.models.includ
|
|
|
590
591
|
default: a + 1
|
|
591
592
|
}, n;
|
|
592
593
|
};
|
|
593
|
-
function
|
|
594
|
+
function H(e) {
|
|
594
595
|
return /* @__PURE__ */ s(
|
|
595
596
|
"style",
|
|
596
597
|
{
|
|
@@ -600,59 +601,59 @@ function Y(e) {
|
|
|
600
601
|
}
|
|
601
602
|
);
|
|
602
603
|
}
|
|
603
|
-
function
|
|
604
|
+
function Dt(e) {
|
|
604
605
|
function t() {
|
|
605
606
|
const i = e.block;
|
|
606
|
-
return
|
|
607
|
+
return K(i.hide) ? !i.hide : K(i.show) ? i.show : !0;
|
|
607
608
|
}
|
|
608
609
|
function n() {
|
|
609
|
-
var
|
|
610
|
-
const i = e.block, o = i.responsiveStyles, a = e.context.content, r =
|
|
611
|
-
((
|
|
612
|
-
), l = o == null ? void 0 : o.large,
|
|
610
|
+
var v, y, x;
|
|
611
|
+
const i = e.block, o = i.responsiveStyles, a = e.context.content, r = qe(
|
|
612
|
+
((v = a == null ? void 0 : a.meta) == null ? void 0 : v.breakpoints) || {}
|
|
613
|
+
), l = o == null ? void 0 : o.large, u = o == null ? void 0 : o.medium, c = o == null ? void 0 : o.small, h = i.id;
|
|
613
614
|
if (!h)
|
|
614
615
|
return "";
|
|
615
|
-
const
|
|
616
|
+
const g = l ? j({
|
|
616
617
|
className: h,
|
|
617
618
|
styles: l
|
|
618
|
-
}) : "",
|
|
619
|
+
}) : "", f = u ? j({
|
|
619
620
|
className: h,
|
|
620
|
-
styles:
|
|
621
|
-
mediaQuery:
|
|
621
|
+
styles: u,
|
|
622
|
+
mediaQuery: be(
|
|
622
623
|
"medium",
|
|
623
624
|
r
|
|
624
625
|
)
|
|
625
|
-
}) : "", k = c ?
|
|
626
|
+
}) : "", k = c ? j({
|
|
626
627
|
className: h,
|
|
627
628
|
styles: c,
|
|
628
|
-
mediaQuery:
|
|
629
|
+
mediaQuery: be(
|
|
629
630
|
"small",
|
|
630
631
|
r
|
|
631
632
|
)
|
|
632
|
-
}) : "",
|
|
633
|
-
let
|
|
634
|
-
if (
|
|
635
|
-
const
|
|
636
|
-
|
|
633
|
+
}) : "", d = i.animations && i.animations.find((T) => T.trigger === "hover");
|
|
634
|
+
let b = "";
|
|
635
|
+
if (d) {
|
|
636
|
+
const T = ((x = (y = d.steps) == null ? void 0 : y[1]) == null ? void 0 : x.styles) || {};
|
|
637
|
+
b = j({
|
|
637
638
|
className: `${h}:hover`,
|
|
638
639
|
styles: {
|
|
639
|
-
...
|
|
640
|
-
transition: `all ${
|
|
641
|
-
|
|
640
|
+
...T,
|
|
641
|
+
transition: `all ${d.duration}s ${X(
|
|
642
|
+
d.easing
|
|
642
643
|
)}`,
|
|
643
|
-
transitionDelay:
|
|
644
|
+
transitionDelay: d.delay ? `${d.delay}s` : "0s"
|
|
644
645
|
}
|
|
645
646
|
}) || "";
|
|
646
647
|
}
|
|
647
648
|
return [
|
|
648
|
-
|
|
649
|
-
|
|
649
|
+
g,
|
|
650
|
+
f,
|
|
650
651
|
k,
|
|
651
|
-
|
|
652
|
+
b
|
|
652
653
|
].join(" ");
|
|
653
654
|
}
|
|
654
|
-
return /* @__PURE__ */ s(
|
|
655
|
-
|
|
655
|
+
return /* @__PURE__ */ s(R, { children: n() && t() ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(
|
|
656
|
+
H,
|
|
656
657
|
{
|
|
657
658
|
id: "builderio-block",
|
|
658
659
|
styles: n(),
|
|
@@ -660,10 +661,10 @@ function Wt(e) {
|
|
|
660
661
|
}
|
|
661
662
|
) }) : null });
|
|
662
663
|
}
|
|
663
|
-
function
|
|
664
|
+
function $t(e) {
|
|
664
665
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
665
666
|
}
|
|
666
|
-
const
|
|
667
|
+
const Ft = (e) => `on${$t(e)}`, Ot = (e, t) => (n) => L({
|
|
667
668
|
code: e,
|
|
668
669
|
context: t.context,
|
|
669
670
|
localState: t.localState,
|
|
@@ -679,9 +680,9 @@ function He(e) {
|
|
|
679
680
|
if (!n.hasOwnProperty(o))
|
|
680
681
|
continue;
|
|
681
682
|
const a = n[o];
|
|
682
|
-
let r =
|
|
683
|
+
let r = Ft(o);
|
|
683
684
|
if (e.stripPrefix)
|
|
684
|
-
switch (
|
|
685
|
+
switch (O) {
|
|
685
686
|
case "vue":
|
|
686
687
|
r = r.replace("v-on:", "");
|
|
687
688
|
break;
|
|
@@ -693,12 +694,12 @@ function He(e) {
|
|
|
693
694
|
}
|
|
694
695
|
return t;
|
|
695
696
|
}
|
|
696
|
-
function
|
|
697
|
+
function Lt({
|
|
697
698
|
properties: e
|
|
698
699
|
}) {
|
|
699
700
|
return e;
|
|
700
701
|
}
|
|
701
|
-
const
|
|
702
|
+
const Ut = (e) => ({
|
|
702
703
|
href: e.href
|
|
703
704
|
});
|
|
704
705
|
function ce({
|
|
@@ -707,22 +708,22 @@ function ce({
|
|
|
707
708
|
}) {
|
|
708
709
|
var i;
|
|
709
710
|
const n = {
|
|
710
|
-
...
|
|
711
|
+
...Ut(e),
|
|
711
712
|
...e.properties,
|
|
712
713
|
"builder-id": e.id,
|
|
713
|
-
style:
|
|
714
|
+
style: Rt({
|
|
714
715
|
block: e,
|
|
715
716
|
context: t
|
|
716
717
|
}),
|
|
717
|
-
[
|
|
718
|
+
[q()]: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
|
|
718
719
|
};
|
|
719
|
-
return
|
|
720
|
+
return Lt({
|
|
720
721
|
properties: n,
|
|
721
722
|
context: t,
|
|
722
723
|
block: e
|
|
723
724
|
});
|
|
724
725
|
}
|
|
725
|
-
function
|
|
726
|
+
function _t(e) {
|
|
726
727
|
return /* @__PURE__ */ s(
|
|
727
728
|
re,
|
|
728
729
|
{
|
|
@@ -743,9 +744,9 @@ function Ut(e) {
|
|
|
743
744
|
}
|
|
744
745
|
);
|
|
745
746
|
}
|
|
746
|
-
function
|
|
747
|
-
return
|
|
748
|
-
}, []), /* @__PURE__ */ s(
|
|
747
|
+
function qt(e) {
|
|
748
|
+
return N(() => {
|
|
749
|
+
}, []), /* @__PURE__ */ s(R, { children: e.children });
|
|
749
750
|
}
|
|
750
751
|
function Ht(e) {
|
|
751
752
|
function t() {
|
|
@@ -763,8 +764,8 @@ function Ht(e) {
|
|
|
763
764
|
})
|
|
764
765
|
} : {};
|
|
765
766
|
}
|
|
766
|
-
return /* @__PURE__ */ s(
|
|
767
|
-
|
|
767
|
+
return /* @__PURE__ */ s(R, { children: e.Wrapper.load ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(
|
|
768
|
+
qt,
|
|
768
769
|
{
|
|
769
770
|
load: e.Wrapper.load,
|
|
770
771
|
fallback: e.Wrapper.fallback,
|
|
@@ -804,12 +805,12 @@ const Mt = ({
|
|
|
804
805
|
includeBlockProps: o
|
|
805
806
|
} : l;
|
|
806
807
|
};
|
|
807
|
-
function
|
|
808
|
+
function pe(e) {
|
|
808
809
|
var i;
|
|
809
|
-
const [t, n] =
|
|
810
|
+
const [t, n] = E(
|
|
810
811
|
() => e.isInteractive ? Ht : e.componentRef
|
|
811
812
|
);
|
|
812
|
-
return /* @__PURE__ */ s(
|
|
813
|
+
return /* @__PURE__ */ s(R, { children: e.componentRef ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(
|
|
813
814
|
t,
|
|
814
815
|
{
|
|
815
816
|
...Mt({
|
|
@@ -823,7 +824,7 @@ function be(e) {
|
|
|
823
824
|
contextValue: e.context
|
|
824
825
|
}),
|
|
825
826
|
children: (i = e.blockChildren) == null ? void 0 : i.map((o) => /* @__PURE__ */ s(
|
|
826
|
-
|
|
827
|
+
Z,
|
|
827
828
|
{
|
|
828
829
|
block: o,
|
|
829
830
|
context: e.context,
|
|
@@ -835,10 +836,10 @@ function be(e) {
|
|
|
835
836
|
}
|
|
836
837
|
) }) : null });
|
|
837
838
|
}
|
|
838
|
-
function
|
|
839
|
-
const [t, n] =
|
|
839
|
+
function ye(e) {
|
|
840
|
+
const [t, n] = E(() => e.repeatContext);
|
|
840
841
|
return /* @__PURE__ */ s(le.Provider, { value: t, children: /* @__PURE__ */ s(
|
|
841
|
-
|
|
842
|
+
Z,
|
|
842
843
|
{
|
|
843
844
|
block: e.block,
|
|
844
845
|
context: t,
|
|
@@ -847,64 +848,64 @@ function pe(e) {
|
|
|
847
848
|
}
|
|
848
849
|
) });
|
|
849
850
|
}
|
|
850
|
-
function
|
|
851
|
-
var h,
|
|
851
|
+
function Z(e) {
|
|
852
|
+
var h, g, f, k;
|
|
852
853
|
function t() {
|
|
853
|
-
return
|
|
854
|
+
return Vt({
|
|
854
855
|
block: e.block,
|
|
855
856
|
context: e.context
|
|
856
857
|
});
|
|
857
858
|
}
|
|
858
|
-
const [n, i] =
|
|
859
|
+
const [n, i] = E(() => ({
|
|
859
860
|
value: null,
|
|
860
861
|
update: !1
|
|
861
862
|
}));
|
|
862
863
|
function o() {
|
|
863
|
-
var
|
|
864
|
-
if (n.value && !n.update && !
|
|
864
|
+
var b;
|
|
865
|
+
if (n.value && !n.update && !Y())
|
|
865
866
|
return n.value;
|
|
866
|
-
const
|
|
867
|
+
const d = (b = e.block.repeat) != null && b.collection ? e.block : St({
|
|
867
868
|
block: e.block,
|
|
868
869
|
localState: e.context.localState,
|
|
869
870
|
rootState: e.context.rootState,
|
|
870
871
|
rootSetState: e.context.rootSetState,
|
|
871
872
|
context: e.context.context
|
|
872
873
|
});
|
|
873
|
-
return n.value =
|
|
874
|
+
return n.value = d, n.update = !1, d;
|
|
874
875
|
}
|
|
875
876
|
function a() {
|
|
876
|
-
return
|
|
877
|
+
return Pt({
|
|
877
878
|
block: o(),
|
|
878
879
|
registeredComponents: e.registeredComponents,
|
|
879
880
|
model: e.context.model
|
|
880
881
|
});
|
|
881
882
|
}
|
|
882
883
|
function r() {
|
|
883
|
-
var
|
|
884
|
-
return e.block.tagName === "a" || ((
|
|
884
|
+
var b;
|
|
885
|
+
return e.block.tagName === "a" || ((b = o().properties) == null ? void 0 : b.href) || o().href ? e.linkComponent || "a" : e.block.tagName || "div";
|
|
885
886
|
}
|
|
886
887
|
function l() {
|
|
887
|
-
var y, b;
|
|
888
|
-
if ((y = e.block.repeat) != null && y.collection)
|
|
889
|
-
return !!((b = t == null ? void 0 : t()) != null && b.length);
|
|
890
|
-
const g = "hide" in o() ? o().hide : !1;
|
|
891
|
-
return ("show" in o() ? o().show : !0) && !g;
|
|
892
|
-
}
|
|
893
|
-
function d() {
|
|
894
888
|
var v, y;
|
|
895
|
-
|
|
889
|
+
if ((v = e.block.repeat) != null && v.collection)
|
|
890
|
+
return !!((y = t == null ? void 0 : t()) != null && y.length);
|
|
891
|
+
const d = "hide" in o() ? o().hide : !1;
|
|
892
|
+
return ("show" in o() ? o().show : !0) && !d;
|
|
893
|
+
}
|
|
894
|
+
function u() {
|
|
895
|
+
var b, v;
|
|
896
|
+
return !((b = a == null ? void 0 : a()) != null && b.component) && !t() ? (v = o().children) != null ? v : [] : [];
|
|
896
897
|
}
|
|
897
898
|
function c() {
|
|
898
|
-
var
|
|
899
|
+
var d, b, v, y;
|
|
899
900
|
return {
|
|
900
|
-
blockChildren: (
|
|
901
|
-
componentRef: (
|
|
901
|
+
blockChildren: (d = o().children) != null ? d : [],
|
|
902
|
+
componentRef: (b = a == null ? void 0 : a()) == null ? void 0 : b.component,
|
|
902
903
|
componentOptions: {
|
|
903
|
-
...
|
|
904
|
+
...mt(o(), e.context),
|
|
904
905
|
...At(a(), o()),
|
|
905
|
-
...
|
|
906
|
+
...Wt(a(), e.context),
|
|
906
907
|
...Bt(a(), e.linkComponent),
|
|
907
|
-
...
|
|
908
|
+
...Nt(
|
|
908
909
|
a(),
|
|
909
910
|
e.registeredComponents,
|
|
910
911
|
e.context.model
|
|
@@ -914,33 +915,33 @@ function Q(e) {
|
|
|
914
915
|
linkComponent: e.linkComponent,
|
|
915
916
|
registeredComponents: e.registeredComponents,
|
|
916
917
|
builderBlock: o(),
|
|
917
|
-
includeBlockProps: ((
|
|
918
|
-
isInteractive: !((
|
|
918
|
+
includeBlockProps: ((v = a == null ? void 0 : a()) == null ? void 0 : v.noWrap) === !0,
|
|
919
|
+
isInteractive: !((y = a == null ? void 0 : a()) != null && y.isRSC && O === "rsc")
|
|
919
920
|
};
|
|
920
921
|
}
|
|
921
|
-
return
|
|
922
|
-
const
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
...
|
|
926
|
-
elementId:
|
|
922
|
+
return N(() => {
|
|
923
|
+
const d = o().id, b = o().animations;
|
|
924
|
+
b && d && Ct(
|
|
925
|
+
b.map((v) => ({
|
|
926
|
+
...v,
|
|
927
|
+
elementId: d
|
|
927
928
|
}))
|
|
928
929
|
);
|
|
929
|
-
}, []),
|
|
930
|
+
}, []), N(() => {
|
|
930
931
|
n.update = !0;
|
|
931
|
-
}), /* @__PURE__ */ s(
|
|
932
|
-
/* @__PURE__ */ s(
|
|
933
|
-
(h = a == null ? void 0 : a()) != null && h.noWrap ? t() ? /* @__PURE__ */ s(
|
|
934
|
-
|
|
932
|
+
}), /* @__PURE__ */ s(R, { children: l() ? /* @__PURE__ */ V(R, { children: [
|
|
933
|
+
/* @__PURE__ */ s(Dt, { block: o(), context: e.context }),
|
|
934
|
+
(h = a == null ? void 0 : a()) != null && h.noWrap ? t() ? /* @__PURE__ */ s(R, { children: (k = t()) == null ? void 0 : k.map((d, b) => /* @__PURE__ */ s(
|
|
935
|
+
ye,
|
|
935
936
|
{
|
|
936
|
-
repeatContext:
|
|
937
|
-
block:
|
|
937
|
+
repeatContext: d.context,
|
|
938
|
+
block: d.block,
|
|
938
939
|
registeredComponents: e.registeredComponents,
|
|
939
940
|
linkComponent: e.linkComponent
|
|
940
941
|
},
|
|
941
|
-
|
|
942
|
+
b
|
|
942
943
|
)) }) : /* @__PURE__ */ s(
|
|
943
|
-
|
|
944
|
+
pe,
|
|
944
945
|
{
|
|
945
946
|
componentRef: c().componentRef,
|
|
946
947
|
componentOptions: c().componentOptions,
|
|
@@ -952,24 +953,24 @@ function Q(e) {
|
|
|
952
953
|
includeBlockProps: c().includeBlockProps,
|
|
953
954
|
isInteractive: c().isInteractive
|
|
954
955
|
}
|
|
955
|
-
) : /* @__PURE__ */ s(
|
|
956
|
-
|
|
956
|
+
) : /* @__PURE__ */ s(R, { children: t() ? /* @__PURE__ */ s(R, { children: (f = t()) == null ? void 0 : f.map((d, b) => /* @__PURE__ */ s(
|
|
957
|
+
ye,
|
|
957
958
|
{
|
|
958
|
-
repeatContext:
|
|
959
|
-
block:
|
|
959
|
+
repeatContext: d.context,
|
|
960
|
+
block: d.block,
|
|
960
961
|
registeredComponents: e.registeredComponents,
|
|
961
962
|
linkComponent: e.linkComponent
|
|
962
963
|
},
|
|
963
|
-
|
|
964
|
-
)) }) : /* @__PURE__ */
|
|
965
|
-
|
|
964
|
+
b
|
|
965
|
+
)) }) : /* @__PURE__ */ V(
|
|
966
|
+
_t,
|
|
966
967
|
{
|
|
967
968
|
Wrapper: r(),
|
|
968
969
|
block: o(),
|
|
969
970
|
context: e.context,
|
|
970
971
|
children: [
|
|
971
972
|
/* @__PURE__ */ s(
|
|
972
|
-
|
|
973
|
+
pe,
|
|
973
974
|
{
|
|
974
975
|
componentRef: c().componentRef,
|
|
975
976
|
componentOptions: c().componentOptions,
|
|
@@ -982,15 +983,15 @@ function Q(e) {
|
|
|
982
983
|
isInteractive: c().isInteractive
|
|
983
984
|
}
|
|
984
985
|
),
|
|
985
|
-
(
|
|
986
|
-
|
|
986
|
+
(g = u()) == null ? void 0 : g.map((d) => /* @__PURE__ */ s(
|
|
987
|
+
Z,
|
|
987
988
|
{
|
|
988
|
-
block:
|
|
989
|
+
block: d,
|
|
989
990
|
registeredComponents: e.registeredComponents,
|
|
990
991
|
linkComponent: e.linkComponent,
|
|
991
992
|
context: e.context
|
|
992
993
|
},
|
|
993
|
-
|
|
994
|
+
d.id
|
|
994
995
|
))
|
|
995
996
|
]
|
|
996
997
|
}
|
|
@@ -998,7 +999,7 @@ function Q(e) {
|
|
|
998
999
|
] }) : null });
|
|
999
1000
|
}
|
|
1000
1001
|
function jt(e) {
|
|
1001
|
-
const t =
|
|
1002
|
+
const t = F(null);
|
|
1002
1003
|
function n() {
|
|
1003
1004
|
var r;
|
|
1004
1005
|
return [
|
|
@@ -1010,8 +1011,8 @@ function jt(e) {
|
|
|
1010
1011
|
function i() {
|
|
1011
1012
|
if (!e.path)
|
|
1012
1013
|
return;
|
|
1013
|
-
const r = "component.options.";
|
|
1014
|
-
return e.path.startsWith(r) ? e.path : `${
|
|
1014
|
+
const r = "this.", l = "component.options.";
|
|
1015
|
+
return e.path.startsWith(r) ? e.path.replace(r, "") : e.path.startsWith(l) ? e.path : `${l}${e.path || ""}`;
|
|
1015
1016
|
}
|
|
1016
1017
|
function o() {
|
|
1017
1018
|
var r, l;
|
|
@@ -1039,13 +1040,13 @@ function jt(e) {
|
|
|
1039
1040
|
"*"
|
|
1040
1041
|
));
|
|
1041
1042
|
}
|
|
1042
|
-
return
|
|
1043
|
-
}, []), /* @__PURE__ */
|
|
1043
|
+
return N(() => {
|
|
1044
|
+
}, []), /* @__PURE__ */ V(R, { children: [
|
|
1044
1045
|
/* @__PURE__ */ s(
|
|
1045
1046
|
e.BlocksWrapper,
|
|
1046
1047
|
{
|
|
1047
1048
|
ref: t,
|
|
1048
|
-
className: n() + " props-blocks-wrapper-
|
|
1049
|
+
className: n() + " props-blocks-wrapper-2936bbfc",
|
|
1049
1050
|
"builder-path": i(),
|
|
1050
1051
|
"builder-parent-id": e.parent,
|
|
1051
1052
|
style: e.styleProp,
|
|
@@ -1056,16 +1057,16 @@ function jt(e) {
|
|
|
1056
1057
|
children: e.children
|
|
1057
1058
|
}
|
|
1058
1059
|
),
|
|
1059
|
-
/* @__PURE__ */ s("style", { children: `.props-blocks-wrapper-
|
|
1060
|
+
/* @__PURE__ */ s("style", { children: `.props-blocks-wrapper-2936bbfc {
|
|
1060
1061
|
display: flex;
|
|
1061
1062
|
flex-direction: column;
|
|
1062
1063
|
align-items: stretch;
|
|
1063
1064
|
}` })
|
|
1064
1065
|
] });
|
|
1065
1066
|
}
|
|
1066
|
-
function
|
|
1067
|
+
function D(e) {
|
|
1067
1068
|
var i, o, a;
|
|
1068
|
-
const t =
|
|
1069
|
+
const t = he(le), n = he(Ve);
|
|
1069
1070
|
return /* @__PURE__ */ s(
|
|
1070
1071
|
jt,
|
|
1071
1072
|
{
|
|
@@ -1076,8 +1077,8 @@ function F(e) {
|
|
|
1076
1077
|
classNameProp: e.className,
|
|
1077
1078
|
BlocksWrapper: ((i = e.context) == null ? void 0 : i.BlocksWrapper) || (t == null ? void 0 : t.BlocksWrapper),
|
|
1078
1079
|
BlocksWrapperProps: ((o = e.context) == null ? void 0 : o.BlocksWrapperProps) || (t == null ? void 0 : t.BlocksWrapperProps),
|
|
1079
|
-
children: e.blocks ? /* @__PURE__ */ s(
|
|
1080
|
-
|
|
1080
|
+
children: e.blocks ? /* @__PURE__ */ s(R, { children: (a = e.blocks) == null ? void 0 : a.map((r) => /* @__PURE__ */ s(
|
|
1081
|
+
Z,
|
|
1081
1082
|
{
|
|
1082
1083
|
block: r,
|
|
1083
1084
|
linkComponent: e.linkComponent,
|
|
@@ -1089,9 +1090,9 @@ function F(e) {
|
|
|
1089
1090
|
}
|
|
1090
1091
|
);
|
|
1091
1092
|
}
|
|
1092
|
-
const
|
|
1093
|
-
function
|
|
1094
|
-
var
|
|
1093
|
+
const zt = (e) => `builder-columns ${e}-breakpoints`;
|
|
1094
|
+
function Kt(e) {
|
|
1095
|
+
var b, v;
|
|
1095
1096
|
function t() {
|
|
1096
1097
|
return typeof e.space == "number" ? e.space || 0 : 20;
|
|
1097
1098
|
}
|
|
@@ -1101,28 +1102,28 @@ function zt(e) {
|
|
|
1101
1102
|
function i() {
|
|
1102
1103
|
return e.stackColumnsAt || "tablet";
|
|
1103
1104
|
}
|
|
1104
|
-
function o(
|
|
1105
|
-
return
|
|
1105
|
+
function o(y) {
|
|
1106
|
+
return y.link ? e.builderLinkComponent || "a" : "div";
|
|
1106
1107
|
}
|
|
1107
|
-
function a(
|
|
1108
|
-
var
|
|
1109
|
-
return ((
|
|
1108
|
+
function a(y) {
|
|
1109
|
+
var x;
|
|
1110
|
+
return ((x = n()[y]) == null ? void 0 : x.width) || 100 / n().length;
|
|
1110
1111
|
}
|
|
1111
|
-
function r(
|
|
1112
|
-
const
|
|
1113
|
-
return `calc(${
|
|
1112
|
+
function r(y) {
|
|
1113
|
+
const x = a(y), T = t() * (n().length - 1) * (x / 100);
|
|
1114
|
+
return `calc(${x}% - ${T}px)`;
|
|
1114
1115
|
}
|
|
1115
1116
|
function l({
|
|
1116
|
-
stackedStyle:
|
|
1117
|
-
desktopStyle:
|
|
1117
|
+
stackedStyle: y,
|
|
1118
|
+
desktopStyle: x
|
|
1118
1119
|
}) {
|
|
1119
|
-
return i() === "tablet" ?
|
|
1120
|
+
return i() === "tablet" ? y : x;
|
|
1120
1121
|
}
|
|
1121
|
-
function
|
|
1122
|
-
stackedStyle:
|
|
1123
|
-
desktopStyle:
|
|
1122
|
+
function u({
|
|
1123
|
+
stackedStyle: y,
|
|
1124
|
+
desktopStyle: x
|
|
1124
1125
|
}) {
|
|
1125
|
-
return i() === "never" ?
|
|
1126
|
+
return i() === "never" ? x : y;
|
|
1126
1127
|
}
|
|
1127
1128
|
function c() {
|
|
1128
1129
|
return e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column";
|
|
@@ -1136,114 +1137,114 @@ function zt(e) {
|
|
|
1136
1137
|
})
|
|
1137
1138
|
};
|
|
1138
1139
|
}
|
|
1139
|
-
function
|
|
1140
|
-
const
|
|
1140
|
+
function g(y) {
|
|
1141
|
+
const x = y === 0 ? 0 : t(), T = r(y), P = `${x}px`, I = "100%", S = 0;
|
|
1141
1142
|
return {
|
|
1142
1143
|
...{
|
|
1143
1144
|
display: "flex",
|
|
1144
1145
|
flexDirection: "column",
|
|
1145
1146
|
alignItems: "stretch"
|
|
1146
1147
|
},
|
|
1147
|
-
width:
|
|
1148
|
+
width: T,
|
|
1148
1149
|
["marginLeft"]: P,
|
|
1149
|
-
"--column-width-mobile":
|
|
1150
|
+
"--column-width-mobile": u({
|
|
1150
1151
|
stackedStyle: I,
|
|
1151
|
-
desktopStyle:
|
|
1152
|
+
desktopStyle: T
|
|
1152
1153
|
}),
|
|
1153
|
-
"--column-margin-left-mobile":
|
|
1154
|
-
stackedStyle:
|
|
1154
|
+
"--column-margin-left-mobile": u({
|
|
1155
|
+
stackedStyle: S,
|
|
1155
1156
|
desktopStyle: P
|
|
1156
1157
|
}),
|
|
1157
1158
|
"--column-width-tablet": l({
|
|
1158
1159
|
stackedStyle: I,
|
|
1159
|
-
desktopStyle:
|
|
1160
|
+
desktopStyle: T
|
|
1160
1161
|
}),
|
|
1161
1162
|
"--column-margin-left-tablet": l({
|
|
1162
|
-
stackedStyle:
|
|
1163
|
+
stackedStyle: S,
|
|
1163
1164
|
desktopStyle: P
|
|
1164
1165
|
})
|
|
1165
1166
|
};
|
|
1166
1167
|
}
|
|
1167
|
-
function
|
|
1168
|
-
var
|
|
1169
|
-
return
|
|
1170
|
-
((P = (
|
|
1171
|
-
)[
|
|
1168
|
+
function f(y) {
|
|
1169
|
+
var T, P;
|
|
1170
|
+
return qe(
|
|
1171
|
+
((P = (T = e.builderContext.content) == null ? void 0 : T.meta) == null ? void 0 : P.breakpoints) || {}
|
|
1172
|
+
)[y].max;
|
|
1172
1173
|
}
|
|
1173
1174
|
function k() {
|
|
1174
|
-
const
|
|
1175
|
+
const y = `.${e.builderBlock.id}-breakpoints > .builder-column`;
|
|
1175
1176
|
return `
|
|
1176
|
-
@media (max-width: ${
|
|
1177
|
+
@media (max-width: ${f("medium")}px) {
|
|
1177
1178
|
.${e.builderBlock.id}-breakpoints {
|
|
1178
1179
|
flex-direction: var(--flex-dir-tablet);
|
|
1179
1180
|
align-items: stretch;
|
|
1180
1181
|
}
|
|
1181
1182
|
|
|
1182
|
-
${
|
|
1183
|
+
${y} {
|
|
1183
1184
|
width: var(--column-width-tablet) !important;
|
|
1184
1185
|
margin-left: var(--column-margin-left-tablet) !important;
|
|
1185
1186
|
}
|
|
1186
1187
|
}
|
|
1187
1188
|
|
|
1188
|
-
@media (max-width: ${
|
|
1189
|
+
@media (max-width: ${f("small")}px) {
|
|
1189
1190
|
.${e.builderBlock.id}-breakpoints {
|
|
1190
1191
|
flex-direction: var(--flex-dir);
|
|
1191
1192
|
align-items: stretch;
|
|
1192
1193
|
}
|
|
1193
1194
|
|
|
1194
|
-
${
|
|
1195
|
+
${y} {
|
|
1195
1196
|
width: var(--column-width-mobile) !important;
|
|
1196
1197
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
1197
1198
|
}
|
|
1198
1199
|
},
|
|
1199
1200
|
`;
|
|
1200
1201
|
}
|
|
1201
|
-
function
|
|
1202
|
+
function d(y, x) {
|
|
1202
1203
|
return {
|
|
1203
|
-
...
|
|
1204
|
-
href:
|
|
1204
|
+
...y.link ? {
|
|
1205
|
+
href: y.link
|
|
1205
1206
|
} : {},
|
|
1206
|
-
[
|
|
1207
|
-
style:
|
|
1207
|
+
[q()]: "builder-column",
|
|
1208
|
+
style: Le(g(x))
|
|
1208
1209
|
};
|
|
1209
1210
|
}
|
|
1210
|
-
return /* @__PURE__ */
|
|
1211
|
-
/* @__PURE__ */
|
|
1211
|
+
return /* @__PURE__ */ V(R, { children: [
|
|
1212
|
+
/* @__PURE__ */ V(
|
|
1212
1213
|
"div",
|
|
1213
1214
|
{
|
|
1214
|
-
className:
|
|
1215
|
+
className: zt((b = e.builderBlock) == null ? void 0 : b.id) + " div-a6f3faac",
|
|
1215
1216
|
style: h(),
|
|
1216
1217
|
children: [
|
|
1217
1218
|
/* @__PURE__ */ s(
|
|
1218
|
-
|
|
1219
|
+
H,
|
|
1219
1220
|
{
|
|
1220
1221
|
id: "builderio-columns",
|
|
1221
1222
|
styles: k(),
|
|
1222
1223
|
nonce: e.builderContext.nonce
|
|
1223
1224
|
}
|
|
1224
1225
|
),
|
|
1225
|
-
(
|
|
1226
|
+
(v = e.columns) == null ? void 0 : v.map((y, x) => /* @__PURE__ */ s(
|
|
1226
1227
|
re,
|
|
1227
1228
|
{
|
|
1228
|
-
TagName: o(
|
|
1229
|
+
TagName: o(y),
|
|
1229
1230
|
actionAttributes: {},
|
|
1230
|
-
attributes:
|
|
1231
|
+
attributes: d(y, x),
|
|
1231
1232
|
children: /* @__PURE__ */ s(
|
|
1232
|
-
|
|
1233
|
+
D,
|
|
1233
1234
|
{
|
|
1234
|
-
path: `columns.${
|
|
1235
|
+
path: `columns.${x}.blocks`,
|
|
1235
1236
|
parent: e.builderBlock.id,
|
|
1236
1237
|
context: e.builderContext,
|
|
1237
1238
|
registeredComponents: e.builderComponents,
|
|
1238
1239
|
linkComponent: e.builderLinkComponent,
|
|
1239
|
-
blocks:
|
|
1240
|
+
blocks: y.blocks,
|
|
1240
1241
|
styleProp: {
|
|
1241
1242
|
flexGrow: "1"
|
|
1242
1243
|
}
|
|
1243
1244
|
}
|
|
1244
1245
|
)
|
|
1245
1246
|
},
|
|
1246
|
-
|
|
1247
|
+
x
|
|
1247
1248
|
))
|
|
1248
1249
|
]
|
|
1249
1250
|
}
|
|
@@ -1254,55 +1255,55 @@ function zt(e) {
|
|
|
1254
1255
|
}` })
|
|
1255
1256
|
] });
|
|
1256
1257
|
}
|
|
1257
|
-
function
|
|
1258
|
+
function Jt(e) {
|
|
1258
1259
|
return /* @__PURE__ */ s("span", { children: e.children });
|
|
1259
1260
|
}
|
|
1260
|
-
function
|
|
1261
|
+
function ve(e) {
|
|
1261
1262
|
return e.replace(/http(s)?:/, "");
|
|
1262
1263
|
}
|
|
1263
|
-
function
|
|
1264
|
+
function Gt(e = "", t, n) {
|
|
1264
1265
|
const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), o = e.indexOf("?") !== -1 ? "&" : "?";
|
|
1265
1266
|
return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + o + t + "=" + encodeURIComponent(n);
|
|
1266
1267
|
}
|
|
1267
|
-
function
|
|
1268
|
+
function Qt(e, t) {
|
|
1268
1269
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
1269
1270
|
return e;
|
|
1270
1271
|
if (t === "master")
|
|
1271
|
-
return
|
|
1272
|
+
return ve(e);
|
|
1272
1273
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
1273
1274
|
if (n) {
|
|
1274
1275
|
const i = e.split(n[0]), o = n[3], a = t.match("x") ? t : `${t}x`;
|
|
1275
|
-
return
|
|
1276
|
+
return ve(`${i[0]}_${a}${o}`);
|
|
1276
1277
|
}
|
|
1277
1278
|
return null;
|
|
1278
1279
|
}
|
|
1279
|
-
function
|
|
1280
|
+
function ee(e) {
|
|
1280
1281
|
if (!e)
|
|
1281
1282
|
return e;
|
|
1282
1283
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
1283
1284
|
if (e.match(/builder\.io/)) {
|
|
1284
1285
|
let n = e;
|
|
1285
1286
|
const i = Number(e.split("?width=")[1]);
|
|
1286
|
-
return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${
|
|
1287
|
+
return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${Gt(e, "width", o)} ${o}w`).concat([n]).join(", ");
|
|
1287
1288
|
}
|
|
1288
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
1289
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [Qt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
|
|
1289
1290
|
}
|
|
1290
1291
|
function Yt(e) {
|
|
1291
|
-
var o, a, r, l,
|
|
1292
|
+
var o, a, r, l, u, c;
|
|
1292
1293
|
function t() {
|
|
1293
|
-
var
|
|
1294
|
-
const
|
|
1295
|
-
if (!
|
|
1294
|
+
var f;
|
|
1295
|
+
const g = e.image || e.src;
|
|
1296
|
+
if (!g || // We can auto add srcset for cdn.builder.io and shopify
|
|
1296
1297
|
// images, otherwise you can supply this prop manually
|
|
1297
|
-
!(typeof
|
|
1298
|
+
!(typeof g == "string" && (g.match(/builder\.io/) || g.match(/cdn\.shopify\.com/))))
|
|
1298
1299
|
return e.srcset;
|
|
1299
1300
|
if (!e.noWebp) {
|
|
1300
|
-
if (e.srcset && ((
|
|
1301
|
+
if (e.srcset && ((f = e.image) != null && f.includes("builder.io/api/v1/image"))) {
|
|
1301
1302
|
if (!e.srcset.includes(e.image.split("?")[0]))
|
|
1302
|
-
return console.debug("Removed given srcset"),
|
|
1303
|
+
return console.debug("Removed given srcset"), ee(g);
|
|
1303
1304
|
} else if (e.image && !e.srcset)
|
|
1304
|
-
return
|
|
1305
|
-
return
|
|
1305
|
+
return ee(g);
|
|
1306
|
+
return ee(g);
|
|
1306
1307
|
}
|
|
1307
1308
|
}
|
|
1308
1309
|
function n() {
|
|
@@ -1319,9 +1320,9 @@ function Yt(e) {
|
|
|
1319
1320
|
};
|
|
1320
1321
|
return e.aspectRatio ? h : void 0;
|
|
1321
1322
|
}
|
|
1322
|
-
return /* @__PURE__ */
|
|
1323
|
-
/* @__PURE__ */
|
|
1324
|
-
/* @__PURE__ */
|
|
1323
|
+
return /* @__PURE__ */ V(R, { children: [
|
|
1324
|
+
/* @__PURE__ */ V(R, { children: [
|
|
1325
|
+
/* @__PURE__ */ V("picture", { children: [
|
|
1325
1326
|
n() ? /* @__PURE__ */ s("source", { type: "image/webp", srcSet: n() }) : null,
|
|
1326
1327
|
/* @__PURE__ */ s(
|
|
1327
1328
|
"img",
|
|
@@ -1351,8 +1352,8 @@ function Yt(e) {
|
|
|
1351
1352
|
}
|
|
1352
1353
|
}
|
|
1353
1354
|
) : null,
|
|
1354
|
-
(l = (r = e.builderBlock) == null ? void 0 : r.children) != null && l.length && e.fitContent ? /* @__PURE__ */ s(
|
|
1355
|
-
!e.fitContent && ((c = (
|
|
1355
|
+
(l = (r = e.builderBlock) == null ? void 0 : r.children) != null && l.length && e.fitContent ? /* @__PURE__ */ s(R, { children: e.children }) : null,
|
|
1356
|
+
!e.fitContent && ((c = (u = e.builderBlock) == null ? void 0 : u.children) != null && c.length) ? /* @__PURE__ */ s("div", { className: "div-9dac2184-2", children: e.children }) : null
|
|
1356
1357
|
] }),
|
|
1357
1358
|
/* @__PURE__ */ s("style", { children: `.img-9dac2184 {
|
|
1358
1359
|
opacity: 1;
|
|
@@ -1373,7 +1374,7 @@ function Yt(e) {
|
|
|
1373
1374
|
}` })
|
|
1374
1375
|
] });
|
|
1375
1376
|
}
|
|
1376
|
-
function
|
|
1377
|
+
function Xt(e) {
|
|
1377
1378
|
return /* @__PURE__ */ s(
|
|
1378
1379
|
"section",
|
|
1379
1380
|
{
|
|
@@ -1394,7 +1395,7 @@ function Qt(e) {
|
|
|
1394
1395
|
}
|
|
1395
1396
|
);
|
|
1396
1397
|
}
|
|
1397
|
-
const
|
|
1398
|
+
const te = {
|
|
1398
1399
|
"@type": "@builder.io/sdk:Element",
|
|
1399
1400
|
layerName: "Accordion item title",
|
|
1400
1401
|
responsiveStyles: {
|
|
@@ -1423,7 +1424,7 @@ const Z = {
|
|
|
1423
1424
|
}
|
|
1424
1425
|
}
|
|
1425
1426
|
}]
|
|
1426
|
-
},
|
|
1427
|
+
}, ne = {
|
|
1427
1428
|
"@type": "@builder.io/sdk:Element",
|
|
1428
1429
|
layerName: "Accordion item detail",
|
|
1429
1430
|
responsiveStyles: {
|
|
@@ -1454,7 +1455,7 @@ const Z = {
|
|
|
1454
1455
|
}
|
|
1455
1456
|
}
|
|
1456
1457
|
}]
|
|
1457
|
-
},
|
|
1458
|
+
}, Zt = {
|
|
1458
1459
|
name: "Builder:Accordion",
|
|
1459
1460
|
canHaveChildren: !0,
|
|
1460
1461
|
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
@@ -1471,19 +1472,19 @@ const Z = {
|
|
|
1471
1472
|
name: "title",
|
|
1472
1473
|
type: "uiBlocks",
|
|
1473
1474
|
hideFromUI: !0,
|
|
1474
|
-
defaultValue: [
|
|
1475
|
+
defaultValue: [te]
|
|
1475
1476
|
}, {
|
|
1476
1477
|
name: "detail",
|
|
1477
1478
|
type: "uiBlocks",
|
|
1478
1479
|
hideFromUI: !0,
|
|
1479
|
-
defaultValue: [
|
|
1480
|
+
defaultValue: [ne]
|
|
1480
1481
|
}],
|
|
1481
1482
|
defaultValue: [{
|
|
1482
|
-
title: [
|
|
1483
|
-
detail: [
|
|
1483
|
+
title: [te],
|
|
1484
|
+
detail: [ne]
|
|
1484
1485
|
}, {
|
|
1485
|
-
title: [
|
|
1486
|
-
detail: [
|
|
1486
|
+
title: [te],
|
|
1487
|
+
detail: [ne]
|
|
1487
1488
|
}],
|
|
1488
1489
|
showIf: (e) => !e.get("useChildrenForItems")
|
|
1489
1490
|
}, {
|
|
@@ -1519,9 +1520,9 @@ const Z = {
|
|
|
1519
1520
|
builderLinkComponent: !0
|
|
1520
1521
|
}
|
|
1521
1522
|
}, xe = (e) => e.toString();
|
|
1522
|
-
function
|
|
1523
|
-
var
|
|
1524
|
-
const [t, n] =
|
|
1523
|
+
function en(e) {
|
|
1524
|
+
var g;
|
|
1525
|
+
const [t, n] = E(() => []);
|
|
1525
1526
|
function i() {
|
|
1526
1527
|
return !!(e.grid || e.oneAtATime);
|
|
1527
1528
|
}
|
|
@@ -1547,57 +1548,57 @@ function Zt(e) {
|
|
|
1547
1548
|
cursor: "pointer"
|
|
1548
1549
|
};
|
|
1549
1550
|
return Object.fromEntries(
|
|
1550
|
-
Object.entries(k).filter(([
|
|
1551
|
+
Object.entries(k).filter(([d, b]) => b !== void 0)
|
|
1551
1552
|
);
|
|
1552
1553
|
}
|
|
1553
|
-
function r(
|
|
1554
|
-
return `builder-accordion-title builder-accordion-title-${t.includes(
|
|
1554
|
+
function r(f) {
|
|
1555
|
+
return `builder-accordion-title builder-accordion-title-${t.includes(f) ? "open" : "closed"}`;
|
|
1555
1556
|
}
|
|
1556
|
-
function l(
|
|
1557
|
-
return `builder-accordion-detail builder-accordion-detail-${t.includes(
|
|
1557
|
+
function l(f) {
|
|
1558
|
+
return `builder-accordion-detail builder-accordion-detail-${t.includes(f) ? "open" : "closed"}`;
|
|
1558
1559
|
}
|
|
1559
|
-
function
|
|
1560
|
-
let
|
|
1560
|
+
function u() {
|
|
1561
|
+
let f = null;
|
|
1561
1562
|
if (e.grid && t.length && document) {
|
|
1562
|
-
const
|
|
1563
|
-
let
|
|
1564
|
-
`.builder-accordion-title[data-index="${
|
|
1563
|
+
const d = t[0];
|
|
1564
|
+
let v = document.querySelector(
|
|
1565
|
+
`.builder-accordion-title[data-index="${d}"]`
|
|
1565
1566
|
);
|
|
1566
|
-
if (
|
|
1567
|
-
let
|
|
1568
|
-
for (;
|
|
1569
|
-
if (
|
|
1570
|
-
if (
|
|
1567
|
+
if (f = d, v) {
|
|
1568
|
+
let y = v.getBoundingClientRect();
|
|
1569
|
+
for (; v = v && v.nextElementSibling; )
|
|
1570
|
+
if (v) {
|
|
1571
|
+
if (v.classList.contains("builder-accordion-detail"))
|
|
1571
1572
|
continue;
|
|
1572
|
-
const
|
|
1573
|
-
if (
|
|
1574
|
-
const
|
|
1575
|
-
|
|
1573
|
+
const x = v.getBoundingClientRect();
|
|
1574
|
+
if (x.left > y.left) {
|
|
1575
|
+
const T = parseInt(
|
|
1576
|
+
v.getAttribute("data-index") || "",
|
|
1576
1577
|
10
|
|
1577
1578
|
);
|
|
1578
|
-
isNaN(
|
|
1579
|
+
isNaN(T) || (y = x, f = T);
|
|
1579
1580
|
} else
|
|
1580
1581
|
break;
|
|
1581
1582
|
}
|
|
1582
1583
|
}
|
|
1583
1584
|
}
|
|
1584
|
-
return typeof
|
|
1585
|
+
return typeof f == "number" && (f = f + 1), f;
|
|
1585
1586
|
}
|
|
1586
1587
|
function c() {
|
|
1587
|
-
const
|
|
1588
|
-
order: typeof
|
|
1588
|
+
const f = {
|
|
1589
|
+
order: typeof u() == "number" ? u() : void 0,
|
|
1589
1590
|
...e.grid && {
|
|
1590
1591
|
width: "100%"
|
|
1591
1592
|
}
|
|
1592
1593
|
};
|
|
1593
1594
|
return Object.fromEntries(
|
|
1594
|
-
Object.entries(
|
|
1595
|
+
Object.entries(f).filter(([k, d]) => d !== void 0)
|
|
1595
1596
|
);
|
|
1596
1597
|
}
|
|
1597
|
-
function h(
|
|
1598
|
-
t.includes(
|
|
1598
|
+
function h(f) {
|
|
1599
|
+
t.includes(f) ? n(i() ? [] : t.filter((k) => k !== f)) : n(i() ? [f] : t.concat(f));
|
|
1599
1600
|
}
|
|
1600
|
-
return /* @__PURE__ */ s("div", { className: "builder-accordion", style: o(), children: (
|
|
1601
|
+
return /* @__PURE__ */ s("div", { className: "builder-accordion", style: o(), children: (g = e.items) == null ? void 0 : g.map((f, k) => /* @__PURE__ */ V(Ze.Fragment, { children: [
|
|
1601
1602
|
/* @__PURE__ */ s(
|
|
1602
1603
|
"div",
|
|
1603
1604
|
{
|
|
@@ -1606,15 +1607,15 @@ function Zt(e) {
|
|
|
1606
1607
|
...a(),
|
|
1607
1608
|
...e.grid && {
|
|
1608
1609
|
width: e.gridRowWidth,
|
|
1609
|
-
order:
|
|
1610
|
+
order: u() !== null ? xe(k) : xe(k + 1)
|
|
1610
1611
|
}
|
|
1611
1612
|
},
|
|
1612
1613
|
"data-index": k,
|
|
1613
|
-
onClick: (
|
|
1614
|
+
onClick: (d) => h(k),
|
|
1614
1615
|
children: /* @__PURE__ */ s(
|
|
1615
|
-
|
|
1616
|
+
D,
|
|
1616
1617
|
{
|
|
1617
|
-
blocks:
|
|
1618
|
+
blocks: f.title,
|
|
1618
1619
|
path: `items.${k}.title`,
|
|
1619
1620
|
parent: e.builderBlock.id,
|
|
1620
1621
|
context: e.builderContext,
|
|
@@ -1630,9 +1631,9 @@ function Zt(e) {
|
|
|
1630
1631
|
className: l(k),
|
|
1631
1632
|
style: c(),
|
|
1632
1633
|
children: /* @__PURE__ */ s(
|
|
1633
|
-
|
|
1634
|
+
D,
|
|
1634
1635
|
{
|
|
1635
|
-
blocks:
|
|
1636
|
+
blocks: f.detail,
|
|
1636
1637
|
path: `items.${k}.detail`,
|
|
1637
1638
|
parent: e.builderBlock.id,
|
|
1638
1639
|
context: e.builderContext,
|
|
@@ -1644,7 +1645,7 @@ function Zt(e) {
|
|
|
1644
1645
|
) : null
|
|
1645
1646
|
] }, k)) });
|
|
1646
1647
|
}
|
|
1647
|
-
const
|
|
1648
|
+
const tn = {
|
|
1648
1649
|
name: "Core:Button",
|
|
1649
1650
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1650
1651
|
defaultStyles: {
|
|
@@ -1680,7 +1681,7 @@ const en = {
|
|
|
1680
1681
|
shouldReceiveBuilderProps: {
|
|
1681
1682
|
builderLinkComponent: !0
|
|
1682
1683
|
}
|
|
1683
|
-
},
|
|
1684
|
+
}, nn = {
|
|
1684
1685
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1685
1686
|
name: "Columns",
|
|
1686
1687
|
isRSC: !0,
|
|
@@ -1859,7 +1860,7 @@ const en = {
|
|
|
1859
1860
|
});
|
|
1860
1861
|
}
|
|
1861
1862
|
const n = e.get("columns");
|
|
1862
|
-
Array.isArray(n) && n.find((o) => o.get("width")) && (n.find((a) => !a.get("width")) || n.reduce((l,
|
|
1863
|
+
Array.isArray(n) && n.find((o) => o.get("width")) && (n.find((a) => !a.get("width")) || n.reduce((l, u) => l + u.get("width"), 0) !== 100) && t();
|
|
1863
1864
|
}
|
|
1864
1865
|
}, {
|
|
1865
1866
|
name: "space",
|
|
@@ -1887,13 +1888,13 @@ const en = {
|
|
|
1887
1888
|
builderComponents: !0,
|
|
1888
1889
|
builderLinkComponent: !0
|
|
1889
1890
|
}
|
|
1890
|
-
},
|
|
1891
|
+
}, on = {
|
|
1891
1892
|
name: "Fragment",
|
|
1892
1893
|
static: !0,
|
|
1893
1894
|
hidden: !0,
|
|
1894
1895
|
canHaveChildren: !0,
|
|
1895
1896
|
noWrap: !0
|
|
1896
|
-
},
|
|
1897
|
+
}, ue = ["jpeg", "jpg", "png", "svg", "webp", "gif", "jfif", "pjpeg", "pjp", "apng", "avif", "tif", "tiff", "heif", "bmp", "eps", "raw", "cr2", "nef", "orf", "sr2", "psd", "heic", "dib", "ai"], an = ["mp4", "webm", "mkv", "flv", "vob", "ogv", "ogg", "drc", "gif", "gifv", "mng", "avi", "mov", "qt", "mts", "m2ts", "ts", "wmv", "yuv", "rm", "rmvb", "viv", "asf", "amv", "m4p", "mpeg", "mpe", "m2v", "m4v", "svi", "3gp", "3g2", "mxf", "roq", "nsv", "f4v", "f4p", "f4a", "f4b"], rn = {
|
|
1897
1898
|
name: "Image",
|
|
1898
1899
|
static: !0,
|
|
1899
1900
|
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",
|
|
@@ -1908,21 +1909,21 @@ const en = {
|
|
|
1908
1909
|
name: "image",
|
|
1909
1910
|
type: "file",
|
|
1910
1911
|
bubble: !0,
|
|
1911
|
-
allowedFileTypes:
|
|
1912
|
+
allowedFileTypes: ue,
|
|
1912
1913
|
required: !0,
|
|
1913
1914
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
1914
1915
|
onChange: (e) => {
|
|
1915
1916
|
e.delete("srcset"), e.delete("noWebp");
|
|
1916
1917
|
function n(r, l = 6e4) {
|
|
1917
|
-
return new Promise((
|
|
1918
|
+
return new Promise((u, c) => {
|
|
1918
1919
|
const h = document.createElement("img");
|
|
1919
|
-
let
|
|
1920
|
+
let g = !1;
|
|
1920
1921
|
h.onload = () => {
|
|
1921
|
-
|
|
1922
|
-
}, h.addEventListener("error", (
|
|
1923
|
-
console.warn("Image load failed",
|
|
1922
|
+
g = !0, u(h);
|
|
1923
|
+
}, h.addEventListener("error", (f) => {
|
|
1924
|
+
console.warn("Image load failed", f.error), c(f.error);
|
|
1924
1925
|
}), h.src = r, setTimeout(() => {
|
|
1925
|
-
|
|
1926
|
+
g || c(new Error("Image load timed out"));
|
|
1926
1927
|
}, l);
|
|
1927
1928
|
});
|
|
1928
1929
|
}
|
|
@@ -2001,7 +2002,426 @@ const en = {
|
|
|
2001
2002
|
shouldReceiveBuilderProps: {
|
|
2002
2003
|
builderBlock: !0
|
|
2003
2004
|
}
|
|
2004
|
-
},
|
|
2005
|
+
}, ln = {
|
|
2006
|
+
name: "PersonalizationContainer",
|
|
2007
|
+
shouldReceiveBuilderProps: {
|
|
2008
|
+
builderBlock: !0,
|
|
2009
|
+
builderContext: !0
|
|
2010
|
+
},
|
|
2011
|
+
noWrap: !0,
|
|
2012
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F37229ed30d8c41dfb10b8cca1992053a",
|
|
2013
|
+
canHaveChildren: !0,
|
|
2014
|
+
inputs: [{
|
|
2015
|
+
name: "variants",
|
|
2016
|
+
defaultValue: [],
|
|
2017
|
+
behavior: "personalizationVariantList",
|
|
2018
|
+
type: "list",
|
|
2019
|
+
subFields: [{
|
|
2020
|
+
name: "name",
|
|
2021
|
+
type: "text"
|
|
2022
|
+
}, {
|
|
2023
|
+
name: "query",
|
|
2024
|
+
friendlyName: "Targeting rules",
|
|
2025
|
+
type: "BuilderQuery",
|
|
2026
|
+
defaultValue: []
|
|
2027
|
+
}, {
|
|
2028
|
+
name: "startDate",
|
|
2029
|
+
type: "date"
|
|
2030
|
+
}, {
|
|
2031
|
+
name: "endDate",
|
|
2032
|
+
type: "date"
|
|
2033
|
+
}, {
|
|
2034
|
+
name: "blocks",
|
|
2035
|
+
type: "uiBlocks",
|
|
2036
|
+
hideFromUI: !0,
|
|
2037
|
+
defaultValue: []
|
|
2038
|
+
}]
|
|
2039
|
+
}]
|
|
2040
|
+
};
|
|
2041
|
+
function G(e) {
|
|
2042
|
+
return /* @__PURE__ */ s(
|
|
2043
|
+
"script",
|
|
2044
|
+
{
|
|
2045
|
+
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
2046
|
+
"data-id": e.id,
|
|
2047
|
+
nonce: e.nonce || ""
|
|
2048
|
+
}
|
|
2049
|
+
);
|
|
2050
|
+
}
|
|
2051
|
+
function sn(e, t, n, i) {
|
|
2052
|
+
function o(c) {
|
|
2053
|
+
return typeof c == "string";
|
|
2054
|
+
}
|
|
2055
|
+
function a(c) {
|
|
2056
|
+
return typeof c == "number";
|
|
2057
|
+
}
|
|
2058
|
+
function r(c, h) {
|
|
2059
|
+
return (() => {
|
|
2060
|
+
const f = h.property, k = h.operator;
|
|
2061
|
+
let d = h.value;
|
|
2062
|
+
if (h && h.property === "urlPath" && h.value && typeof h.value == "string" && h.value !== "/" && h.value.endsWith("/") && (d = h.value.slice(0, -1)), !(f && k))
|
|
2063
|
+
return !0;
|
|
2064
|
+
if (Array.isArray(d))
|
|
2065
|
+
return k === "isNot" ? d.every((v) => r(c, {
|
|
2066
|
+
property: f,
|
|
2067
|
+
operator: k,
|
|
2068
|
+
value: v
|
|
2069
|
+
})) : !!d.find((v) => r(c, {
|
|
2070
|
+
property: f,
|
|
2071
|
+
operator: k,
|
|
2072
|
+
value: v
|
|
2073
|
+
}));
|
|
2074
|
+
const b = c[f];
|
|
2075
|
+
if (Array.isArray(b))
|
|
2076
|
+
return b.includes(d);
|
|
2077
|
+
switch (k) {
|
|
2078
|
+
case "is":
|
|
2079
|
+
return b === d;
|
|
2080
|
+
case "isNot":
|
|
2081
|
+
return b !== d;
|
|
2082
|
+
case "contains":
|
|
2083
|
+
return (o(b) || Array.isArray(b)) && b.includes(String(d));
|
|
2084
|
+
case "startsWith":
|
|
2085
|
+
return o(b) && b.startsWith(String(d));
|
|
2086
|
+
case "endsWith":
|
|
2087
|
+
return o(b) && b.endsWith(String(d));
|
|
2088
|
+
case "greaterThan":
|
|
2089
|
+
return a(b) && a(d) && b > d;
|
|
2090
|
+
case "lessThan":
|
|
2091
|
+
return a(b) && a(d) && b < d;
|
|
2092
|
+
case "greaterThanOrEqualTo":
|
|
2093
|
+
return a(b) && a(d) && b >= d;
|
|
2094
|
+
case "lessThanOrEqualTo":
|
|
2095
|
+
return a(b) && a(d) && b <= d;
|
|
2096
|
+
default:
|
|
2097
|
+
return !1;
|
|
2098
|
+
}
|
|
2099
|
+
})();
|
|
2100
|
+
}
|
|
2101
|
+
const l = {
|
|
2102
|
+
query: t,
|
|
2103
|
+
startDate: n,
|
|
2104
|
+
endDate: i
|
|
2105
|
+
}, u = e.date && new Date(e.date) || /* @__PURE__ */ new Date();
|
|
2106
|
+
return l.startDate && new Date(l.startDate) > u || l.endDate && new Date(l.endDate) < u ? !1 : !l.query || !l.query.length ? !0 : l.query.every((c) => r(e, c));
|
|
2107
|
+
}
|
|
2108
|
+
const cn = `function getPersonalizedVariant(variants, blockId, locale) {
|
|
2109
|
+
if (!navigator.cookieEnabled) {
|
|
2110
|
+
return;
|
|
2111
|
+
}
|
|
2112
|
+
function getCookie(name) {
|
|
2113
|
+
const nameEQ = name + '=';
|
|
2114
|
+
const ca = document.cookie.split(';');
|
|
2115
|
+
for (let i = 0; i < ca.length; i++) {
|
|
2116
|
+
let c = ca[i];
|
|
2117
|
+
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
|
|
2118
|
+
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
|
|
2119
|
+
}
|
|
2120
|
+
return null;
|
|
2121
|
+
}
|
|
2122
|
+
function removeVariants() {
|
|
2123
|
+
variants?.forEach(function (_, index) {
|
|
2124
|
+
document.querySelector('template[data-variant-id="' + blockId + '-' + index + '"]')?.remove();
|
|
2125
|
+
});
|
|
2126
|
+
document.querySelector('script[data-id="variants-script-' + blockId + '"]')?.remove();
|
|
2127
|
+
document.querySelector('style[data-id="variants-styles-' + blockId + '"]')?.remove();
|
|
2128
|
+
}
|
|
2129
|
+
const attributes = JSON.parse(getCookie('builder.userAttributes') || '{}');
|
|
2130
|
+
if (locale) {
|
|
2131
|
+
attributes.locale = locale;
|
|
2132
|
+
}
|
|
2133
|
+
const winningVariantIndex = variants?.findIndex(function (variant) {
|
|
2134
|
+
return filterWithCustomTargeting(attributes, variant.query, variant.startDate, variant.endDate);
|
|
2135
|
+
});
|
|
2136
|
+
const isDebug = location.href.includes('builder.debug=true');
|
|
2137
|
+
if (isDebug) {
|
|
2138
|
+
console.debug('PersonalizationContainer', {
|
|
2139
|
+
attributes,
|
|
2140
|
+
variants,
|
|
2141
|
+
winningVariantIndex
|
|
2142
|
+
});
|
|
2143
|
+
}
|
|
2144
|
+
if (winningVariantIndex !== -1) {
|
|
2145
|
+
const winningVariant = document.querySelector('template[data-variant-id="' + blockId + '-' + winningVariantIndex + '"]');
|
|
2146
|
+
if (winningVariant) {
|
|
2147
|
+
const parentNode = winningVariant.parentNode;
|
|
2148
|
+
if (parentNode) {
|
|
2149
|
+
const newParent = parentNode.cloneNode(false);
|
|
2150
|
+
newParent.appendChild(winningVariant.content.firstChild);
|
|
2151
|
+
newParent.appendChild(winningVariant.content.lastChild);
|
|
2152
|
+
parentNode.parentNode?.replaceChild(newParent, parentNode);
|
|
2153
|
+
}
|
|
2154
|
+
if (isDebug) {
|
|
2155
|
+
console.debug('PersonalizationContainer', 'Winning variant Replaced:', winningVariant);
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
} else if (variants && variants.length > 0) {
|
|
2159
|
+
removeVariants();
|
|
2160
|
+
}
|
|
2161
|
+
}`, un = `function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {
|
|
2162
|
+
function isString(val) {
|
|
2163
|
+
return typeof val === 'string';
|
|
2164
|
+
}
|
|
2165
|
+
function isNumber(val) {
|
|
2166
|
+
return typeof val === 'number';
|
|
2167
|
+
}
|
|
2168
|
+
function objectMatchesQuery(userattr, query) {
|
|
2169
|
+
const result = (() => {
|
|
2170
|
+
const property = query.property;
|
|
2171
|
+
const operator = query.operator;
|
|
2172
|
+
let testValue = query.value;
|
|
2173
|
+
if (query && query.property === 'urlPath' && query.value && typeof query.value === 'string' && query.value !== '/' && query.value.endsWith('/')) {
|
|
2174
|
+
testValue = query.value.slice(0, -1);
|
|
2175
|
+
}
|
|
2176
|
+
if (!(property && operator)) {
|
|
2177
|
+
return true;
|
|
2178
|
+
}
|
|
2179
|
+
if (Array.isArray(testValue)) {
|
|
2180
|
+
if (operator === 'isNot') {
|
|
2181
|
+
return testValue.every(val => objectMatchesQuery(userattr, {
|
|
2182
|
+
property,
|
|
2183
|
+
operator,
|
|
2184
|
+
value: val
|
|
2185
|
+
}));
|
|
2186
|
+
}
|
|
2187
|
+
return !!testValue.find(val => objectMatchesQuery(userattr, {
|
|
2188
|
+
property,
|
|
2189
|
+
operator,
|
|
2190
|
+
value: val
|
|
2191
|
+
}));
|
|
2192
|
+
}
|
|
2193
|
+
const value = userattr[property];
|
|
2194
|
+
if (Array.isArray(value)) {
|
|
2195
|
+
return value.includes(testValue);
|
|
2196
|
+
}
|
|
2197
|
+
switch (operator) {
|
|
2198
|
+
case 'is':
|
|
2199
|
+
return value === testValue;
|
|
2200
|
+
case 'isNot':
|
|
2201
|
+
return value !== testValue;
|
|
2202
|
+
case 'contains':
|
|
2203
|
+
return (isString(value) || Array.isArray(value)) && value.includes(String(testValue));
|
|
2204
|
+
case 'startsWith':
|
|
2205
|
+
return isString(value) && value.startsWith(String(testValue));
|
|
2206
|
+
case 'endsWith':
|
|
2207
|
+
return isString(value) && value.endsWith(String(testValue));
|
|
2208
|
+
case 'greaterThan':
|
|
2209
|
+
return isNumber(value) && isNumber(testValue) && value > testValue;
|
|
2210
|
+
case 'lessThan':
|
|
2211
|
+
return isNumber(value) && isNumber(testValue) && value < testValue;
|
|
2212
|
+
case 'greaterThanOrEqualTo':
|
|
2213
|
+
return isNumber(value) && isNumber(testValue) && value >= testValue;
|
|
2214
|
+
case 'lessThanOrEqualTo':
|
|
2215
|
+
return isNumber(value) && isNumber(testValue) && value <= testValue;
|
|
2216
|
+
default:
|
|
2217
|
+
return false;
|
|
2218
|
+
}
|
|
2219
|
+
})();
|
|
2220
|
+
return result;
|
|
2221
|
+
}
|
|
2222
|
+
const item = {
|
|
2223
|
+
query,
|
|
2224
|
+
startDate,
|
|
2225
|
+
endDate
|
|
2226
|
+
};
|
|
2227
|
+
const now = userAttributes.date && new Date(userAttributes.date) || new Date();
|
|
2228
|
+
if (item.startDate && new Date(item.startDate) > now) {
|
|
2229
|
+
return false;
|
|
2230
|
+
} else if (item.endDate && new Date(item.endDate) < now) {
|
|
2231
|
+
return false;
|
|
2232
|
+
}
|
|
2233
|
+
if (!item.query || !item.query.length) {
|
|
2234
|
+
return true;
|
|
2235
|
+
}
|
|
2236
|
+
return item.query.every(filter => {
|
|
2237
|
+
return objectMatchesQuery(userAttributes, filter);
|
|
2238
|
+
});
|
|
2239
|
+
}`;
|
|
2240
|
+
function dn(e, t) {
|
|
2241
|
+
return !(!(e && e.length > 0) || !t || $());
|
|
2242
|
+
}
|
|
2243
|
+
function mn({
|
|
2244
|
+
variants: e,
|
|
2245
|
+
previewingIndex: t,
|
|
2246
|
+
isHydrated: n,
|
|
2247
|
+
filteredVariants: i,
|
|
2248
|
+
fallbackBlocks: o
|
|
2249
|
+
}) {
|
|
2250
|
+
var r;
|
|
2251
|
+
const a = {
|
|
2252
|
+
blocks: o != null ? o : [],
|
|
2253
|
+
path: "this.children"
|
|
2254
|
+
};
|
|
2255
|
+
if (n && W())
|
|
2256
|
+
return typeof t == "number" && t < ((r = e == null ? void 0 : e.length) != null ? r : 0) ? {
|
|
2257
|
+
blocks: e[t].blocks,
|
|
2258
|
+
path: `component.options.variants.${t}.blocks`
|
|
2259
|
+
} : a;
|
|
2260
|
+
if ($()) {
|
|
2261
|
+
const l = i == null ? void 0 : i[0];
|
|
2262
|
+
if (l)
|
|
2263
|
+
return {
|
|
2264
|
+
blocks: l.blocks,
|
|
2265
|
+
path: `component.options.variants.${e == null ? void 0 : e.indexOf(l)}.blocks`
|
|
2266
|
+
};
|
|
2267
|
+
}
|
|
2268
|
+
return a;
|
|
2269
|
+
}
|
|
2270
|
+
const fn = (e, t, n) => `
|
|
2271
|
+
(function() {
|
|
2272
|
+
${un}
|
|
2273
|
+
${cn}
|
|
2274
|
+
getPersonalizedVariant(${JSON.stringify(e)}, "${t}"${n ? `, "${n}"` : ""})
|
|
2275
|
+
})();
|
|
2276
|
+
`;
|
|
2277
|
+
function hn(e) {
|
|
2278
|
+
var b, v, y, x, T, P, I;
|
|
2279
|
+
const t = F(null), [n, i] = E(
|
|
2280
|
+
() => de.getUserAttributes()
|
|
2281
|
+
), [o, a] = E(
|
|
2282
|
+
() => {
|
|
2283
|
+
var S, m, p;
|
|
2284
|
+
return fn(
|
|
2285
|
+
e.variants,
|
|
2286
|
+
((S = e.builderBlock) == null ? void 0 : S.id) || "none",
|
|
2287
|
+
(p = (m = e.builderContext) == null ? void 0 : m.rootState) == null ? void 0 : p.locale
|
|
2288
|
+
);
|
|
2289
|
+
}
|
|
2290
|
+
), [r, l] = E(() => []), [u, c] = E(
|
|
2291
|
+
() => {
|
|
2292
|
+
var S;
|
|
2293
|
+
return dn(
|
|
2294
|
+
e.variants,
|
|
2295
|
+
_((S = e.builderContext) == null ? void 0 : S.canTrack)
|
|
2296
|
+
);
|
|
2297
|
+
}
|
|
2298
|
+
), [h, g] = E(() => !1);
|
|
2299
|
+
function f() {
|
|
2300
|
+
return (e.variants || []).filter((S) => {
|
|
2301
|
+
var m, p, C, w;
|
|
2302
|
+
return sn(
|
|
2303
|
+
{
|
|
2304
|
+
...(p = (m = e.builderContext) == null ? void 0 : m.rootState) != null && p.locale ? {
|
|
2305
|
+
locale: (w = (C = e.builderContext) == null ? void 0 : C.rootState) == null ? void 0 : w.locale
|
|
2306
|
+
} : {},
|
|
2307
|
+
...n
|
|
2308
|
+
},
|
|
2309
|
+
S.query,
|
|
2310
|
+
S.startDate,
|
|
2311
|
+
S.endDate
|
|
2312
|
+
);
|
|
2313
|
+
});
|
|
2314
|
+
}
|
|
2315
|
+
function k() {
|
|
2316
|
+
var S;
|
|
2317
|
+
return mn({
|
|
2318
|
+
variants: e.variants,
|
|
2319
|
+
fallbackBlocks: (S = e.builderBlock) == null ? void 0 : S.children,
|
|
2320
|
+
isHydrated: h,
|
|
2321
|
+
filteredVariants: f(),
|
|
2322
|
+
previewingIndex: e.previewingIndex
|
|
2323
|
+
});
|
|
2324
|
+
}
|
|
2325
|
+
function d() {
|
|
2326
|
+
return (e.variants || []).map(
|
|
2327
|
+
(S, m) => {
|
|
2328
|
+
var p;
|
|
2329
|
+
return `[data-variant-id="${(p = e.builderBlock) == null ? void 0 : p.id}-${m}"] { display: none; } `;
|
|
2330
|
+
}
|
|
2331
|
+
).join("");
|
|
2332
|
+
}
|
|
2333
|
+
return N(() => {
|
|
2334
|
+
var m;
|
|
2335
|
+
g(!0);
|
|
2336
|
+
const S = de.subscribeOnUserAttributesChange(
|
|
2337
|
+
(p) => {
|
|
2338
|
+
i(p);
|
|
2339
|
+
}
|
|
2340
|
+
);
|
|
2341
|
+
if (!(W() || Y())) {
|
|
2342
|
+
const p = f()[0];
|
|
2343
|
+
t.current && (t.current.dispatchEvent(
|
|
2344
|
+
new CustomEvent("builder.variantLoaded", {
|
|
2345
|
+
detail: {
|
|
2346
|
+
variant: p || "default",
|
|
2347
|
+
content: (m = e.builderContext) == null ? void 0 : m.content
|
|
2348
|
+
},
|
|
2349
|
+
bubbles: !0
|
|
2350
|
+
})
|
|
2351
|
+
), new IntersectionObserver((w) => {
|
|
2352
|
+
w.forEach((B) => {
|
|
2353
|
+
var A;
|
|
2354
|
+
B.isIntersecting && t.current && t.current.dispatchEvent(
|
|
2355
|
+
new CustomEvent("builder.variantDisplayed", {
|
|
2356
|
+
detail: {
|
|
2357
|
+
variant: p || "default",
|
|
2358
|
+
content: (A = e.builderContext) == null ? void 0 : A.content
|
|
2359
|
+
},
|
|
2360
|
+
bubbles: !0
|
|
2361
|
+
})
|
|
2362
|
+
);
|
|
2363
|
+
});
|
|
2364
|
+
}).observe(t.current));
|
|
2365
|
+
}
|
|
2366
|
+
r.push(S);
|
|
2367
|
+
}, []), N(() => () => {
|
|
2368
|
+
r.forEach((S) => S());
|
|
2369
|
+
}, []), /* @__PURE__ */ V(
|
|
2370
|
+
"div",
|
|
2371
|
+
{
|
|
2372
|
+
ref: t,
|
|
2373
|
+
...e.attributes,
|
|
2374
|
+
className: `builder-personalization-container ${((b = e.attributes) == null ? void 0 : b.className) || ""}`,
|
|
2375
|
+
children: [
|
|
2376
|
+
u ? /* @__PURE__ */ V(R, { children: [
|
|
2377
|
+
(v = e.variants) == null ? void 0 : v.map((S, m) => {
|
|
2378
|
+
var p, C;
|
|
2379
|
+
return /* @__PURE__ */ s(
|
|
2380
|
+
"template",
|
|
2381
|
+
{
|
|
2382
|
+
"data-variant-id": `${(p = e.builderBlock) == null ? void 0 : p.id}-${m}`,
|
|
2383
|
+
children: /* @__PURE__ */ s(
|
|
2384
|
+
D,
|
|
2385
|
+
{
|
|
2386
|
+
blocks: S.blocks,
|
|
2387
|
+
parent: (C = e.builderBlock) == null ? void 0 : C.id,
|
|
2388
|
+
path: `component.options.variants.${m}.blocks`
|
|
2389
|
+
}
|
|
2390
|
+
)
|
|
2391
|
+
},
|
|
2392
|
+
m
|
|
2393
|
+
);
|
|
2394
|
+
}),
|
|
2395
|
+
/* @__PURE__ */ s(
|
|
2396
|
+
H,
|
|
2397
|
+
{
|
|
2398
|
+
nonce: ((y = e.builderContext) == null ? void 0 : y.nonce) || "",
|
|
2399
|
+
styles: d(),
|
|
2400
|
+
id: `variants-styles-${(x = e.builderBlock) == null ? void 0 : x.id}`
|
|
2401
|
+
}
|
|
2402
|
+
),
|
|
2403
|
+
/* @__PURE__ */ s(
|
|
2404
|
+
G,
|
|
2405
|
+
{
|
|
2406
|
+
nonce: ((T = e.builderContext) == null ? void 0 : T.nonce) || "",
|
|
2407
|
+
scriptStr: o,
|
|
2408
|
+
id: `variants-script-${(P = e.builderBlock) == null ? void 0 : P.id}`
|
|
2409
|
+
}
|
|
2410
|
+
)
|
|
2411
|
+
] }) : null,
|
|
2412
|
+
/* @__PURE__ */ s(
|
|
2413
|
+
D,
|
|
2414
|
+
{
|
|
2415
|
+
blocks: k().blocks,
|
|
2416
|
+
parent: (I = e.builderBlock) == null ? void 0 : I.id,
|
|
2417
|
+
path: k().path
|
|
2418
|
+
}
|
|
2419
|
+
)
|
|
2420
|
+
]
|
|
2421
|
+
}
|
|
2422
|
+
);
|
|
2423
|
+
}
|
|
2424
|
+
const gn = {
|
|
2005
2425
|
name: "Core:Section",
|
|
2006
2426
|
static: !0,
|
|
2007
2427
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -2040,7 +2460,7 @@ const en = {
|
|
|
2040
2460
|
}
|
|
2041
2461
|
}
|
|
2042
2462
|
}]
|
|
2043
|
-
},
|
|
2463
|
+
}, bn = {
|
|
2044
2464
|
name: "Slot",
|
|
2045
2465
|
isRSC: !0,
|
|
2046
2466
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -2058,7 +2478,7 @@ const en = {
|
|
|
2058
2478
|
builderComponents: !0
|
|
2059
2479
|
}
|
|
2060
2480
|
};
|
|
2061
|
-
function
|
|
2481
|
+
function pn(e) {
|
|
2062
2482
|
var t, n, i;
|
|
2063
2483
|
return /* @__PURE__ */ s(
|
|
2064
2484
|
"div",
|
|
@@ -2070,7 +2490,7 @@ function sn(e) {
|
|
|
2070
2490
|
"builder-slot": e.name
|
|
2071
2491
|
},
|
|
2072
2492
|
children: /* @__PURE__ */ s(
|
|
2073
|
-
|
|
2493
|
+
D,
|
|
2074
2494
|
{
|
|
2075
2495
|
parent: (n = e.builderContext.context) == null ? void 0 : n.symbolId,
|
|
2076
2496
|
path: `symbol.data.${e.name}`,
|
|
@@ -2082,7 +2502,7 @@ function sn(e) {
|
|
|
2082
2502
|
}
|
|
2083
2503
|
);
|
|
2084
2504
|
}
|
|
2085
|
-
const
|
|
2505
|
+
const yn = {
|
|
2086
2506
|
name: "Symbol",
|
|
2087
2507
|
noWrap: !0,
|
|
2088
2508
|
static: !0,
|
|
@@ -2121,7 +2541,7 @@ const cn = {
|
|
|
2121
2541
|
builderComponents: !0,
|
|
2122
2542
|
builderLinkComponent: !0
|
|
2123
2543
|
}
|
|
2124
|
-
},
|
|
2544
|
+
}, ie = {
|
|
2125
2545
|
"@type": "@builder.io/sdk:Element",
|
|
2126
2546
|
responsiveStyles: {
|
|
2127
2547
|
large: {
|
|
@@ -2143,7 +2563,7 @@ const cn = {
|
|
|
2143
2563
|
text: "New tab"
|
|
2144
2564
|
}
|
|
2145
2565
|
}
|
|
2146
|
-
},
|
|
2566
|
+
}, oe = {
|
|
2147
2567
|
"@type": "@builder.io/sdk:Element",
|
|
2148
2568
|
responsiveStyles: {
|
|
2149
2569
|
large: {
|
|
@@ -2159,7 +2579,7 @@ const cn = {
|
|
|
2159
2579
|
text: "New tab content "
|
|
2160
2580
|
}
|
|
2161
2581
|
}
|
|
2162
|
-
},
|
|
2582
|
+
}, vn = {
|
|
2163
2583
|
name: "Builder: Tabs",
|
|
2164
2584
|
inputs: [{
|
|
2165
2585
|
name: "tabs",
|
|
@@ -2169,16 +2589,16 @@ const cn = {
|
|
|
2169
2589
|
name: "label",
|
|
2170
2590
|
type: "uiBlocks",
|
|
2171
2591
|
hideFromUI: !0,
|
|
2172
|
-
defaultValue: [
|
|
2592
|
+
defaultValue: [ie]
|
|
2173
2593
|
}, {
|
|
2174
2594
|
name: "content",
|
|
2175
2595
|
type: "uiBlocks",
|
|
2176
2596
|
hideFromUI: !0,
|
|
2177
|
-
defaultValue: [
|
|
2597
|
+
defaultValue: [oe]
|
|
2178
2598
|
}],
|
|
2179
2599
|
defaultValue: [{
|
|
2180
2600
|
label: [{
|
|
2181
|
-
...
|
|
2601
|
+
...ie,
|
|
2182
2602
|
component: {
|
|
2183
2603
|
name: "Text",
|
|
2184
2604
|
options: {
|
|
@@ -2187,7 +2607,7 @@ const cn = {
|
|
|
2187
2607
|
}
|
|
2188
2608
|
}],
|
|
2189
2609
|
content: [{
|
|
2190
|
-
...
|
|
2610
|
+
...oe,
|
|
2191
2611
|
component: {
|
|
2192
2612
|
name: "Text",
|
|
2193
2613
|
options: {
|
|
@@ -2197,7 +2617,7 @@ const cn = {
|
|
|
2197
2617
|
}]
|
|
2198
2618
|
}, {
|
|
2199
2619
|
label: [{
|
|
2200
|
-
...
|
|
2620
|
+
...ie,
|
|
2201
2621
|
component: {
|
|
2202
2622
|
name: "Text",
|
|
2203
2623
|
options: {
|
|
@@ -2206,7 +2626,7 @@ const cn = {
|
|
|
2206
2626
|
}
|
|
2207
2627
|
}],
|
|
2208
2628
|
content: [{
|
|
2209
|
-
...
|
|
2629
|
+
...oe,
|
|
2210
2630
|
component: {
|
|
2211
2631
|
name: "Text",
|
|
2212
2632
|
options: {
|
|
@@ -2263,9 +2683,9 @@ const cn = {
|
|
|
2263
2683
|
builderLinkComponent: !0
|
|
2264
2684
|
}
|
|
2265
2685
|
};
|
|
2266
|
-
function
|
|
2686
|
+
function xn(e) {
|
|
2267
2687
|
var a;
|
|
2268
|
-
const [t, n] =
|
|
2688
|
+
const [t, n] = E(
|
|
2269
2689
|
() => e.defaultActiveTab ? e.defaultActiveTab - 1 : 0
|
|
2270
2690
|
);
|
|
2271
2691
|
function i(r) {
|
|
@@ -2274,7 +2694,7 @@ function un(e) {
|
|
|
2274
2694
|
function o(r) {
|
|
2275
2695
|
r === t && e.collapsible ? n(-1) : n(r);
|
|
2276
2696
|
}
|
|
2277
|
-
return /* @__PURE__ */
|
|
2697
|
+
return /* @__PURE__ */ V("div", { children: [
|
|
2278
2698
|
/* @__PURE__ */ s(
|
|
2279
2699
|
"div",
|
|
2280
2700
|
{
|
|
@@ -2292,9 +2712,9 @@ function un(e) {
|
|
|
2292
2712
|
style: {
|
|
2293
2713
|
...t === l ? e.activeTabStyle : {}
|
|
2294
2714
|
},
|
|
2295
|
-
onClick: (
|
|
2715
|
+
onClick: (u) => o(l),
|
|
2296
2716
|
children: /* @__PURE__ */ s(
|
|
2297
|
-
|
|
2717
|
+
D,
|
|
2298
2718
|
{
|
|
2299
2719
|
parent: e.builderBlock.id,
|
|
2300
2720
|
path: `tabs.${l}.label`,
|
|
@@ -2310,7 +2730,7 @@ function un(e) {
|
|
|
2310
2730
|
}
|
|
2311
2731
|
),
|
|
2312
2732
|
i(t) ? /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
|
|
2313
|
-
|
|
2733
|
+
D,
|
|
2314
2734
|
{
|
|
2315
2735
|
parent: e.builderBlock.id,
|
|
2316
2736
|
path: `tabs.${t}.content`,
|
|
@@ -2322,7 +2742,7 @@ function un(e) {
|
|
|
2322
2742
|
) }) : null
|
|
2323
2743
|
] });
|
|
2324
2744
|
}
|
|
2325
|
-
const
|
|
2745
|
+
const Sn = {
|
|
2326
2746
|
shouldReceiveBuilderProps: {
|
|
2327
2747
|
builderBlock: !1,
|
|
2328
2748
|
builderContext: !0
|
|
@@ -2345,7 +2765,7 @@ const mn = {
|
|
|
2345
2765
|
textAlign: "center"
|
|
2346
2766
|
}
|
|
2347
2767
|
};
|
|
2348
|
-
function
|
|
2768
|
+
function kn(e) {
|
|
2349
2769
|
var t;
|
|
2350
2770
|
return /* @__PURE__ */ s(
|
|
2351
2771
|
"div",
|
|
@@ -2358,7 +2778,7 @@ function fn(e) {
|
|
|
2358
2778
|
}
|
|
2359
2779
|
);
|
|
2360
2780
|
}
|
|
2361
|
-
const
|
|
2781
|
+
const Cn = {
|
|
2362
2782
|
name: "Custom Code",
|
|
2363
2783
|
static: !0,
|
|
2364
2784
|
requiredPermissions: ["editCode"],
|
|
@@ -2381,15 +2801,15 @@ const hn = {
|
|
|
2381
2801
|
advanced: !0
|
|
2382
2802
|
}]
|
|
2383
2803
|
};
|
|
2384
|
-
function
|
|
2385
|
-
const t =
|
|
2386
|
-
return
|
|
2804
|
+
function Tn(e) {
|
|
2805
|
+
const t = F(null), [n, i] = E(() => []), [o, a] = E(() => []);
|
|
2806
|
+
return N(() => {
|
|
2387
2807
|
var l;
|
|
2388
2808
|
if (!((l = t.current) != null && l.getElementsByTagName) || typeof window == "undefined")
|
|
2389
2809
|
return;
|
|
2390
2810
|
const r = t.current.getElementsByTagName("script");
|
|
2391
|
-
for (let
|
|
2392
|
-
const c = r[
|
|
2811
|
+
for (let u = 0; u < r.length; u++) {
|
|
2812
|
+
const c = r[u];
|
|
2393
2813
|
if (c.src) {
|
|
2394
2814
|
if (n.includes(c.src))
|
|
2395
2815
|
continue;
|
|
@@ -2419,7 +2839,7 @@ function gn(e) {
|
|
|
2419
2839
|
}
|
|
2420
2840
|
);
|
|
2421
2841
|
}
|
|
2422
|
-
const
|
|
2842
|
+
const wn = {
|
|
2423
2843
|
name: "Embed",
|
|
2424
2844
|
static: !0,
|
|
2425
2845
|
inputs: [{
|
|
@@ -2434,29 +2854,29 @@ const bn = {
|
|
|
2434
2854
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
2435
2855
|
hideFromUI: !0
|
|
2436
2856
|
}]
|
|
2437
|
-
},
|
|
2438
|
-
function
|
|
2439
|
-
const t =
|
|
2440
|
-
function
|
|
2857
|
+
}, In = ["text/javascript", "application/javascript", "application/ecmascript"], En = (e) => In.includes(e.type);
|
|
2858
|
+
function Rn(e) {
|
|
2859
|
+
const t = F(null), [n, i] = E(() => []), [o, a] = E(() => []), [r, l] = E(() => !1);
|
|
2860
|
+
function u() {
|
|
2441
2861
|
if (!t.current || !t.current.getElementsByTagName)
|
|
2442
2862
|
return;
|
|
2443
2863
|
const c = t.current.getElementsByTagName("script");
|
|
2444
2864
|
for (let h = 0; h < c.length; h++) {
|
|
2445
|
-
const
|
|
2446
|
-
if (
|
|
2447
|
-
n.push(
|
|
2448
|
-
const
|
|
2449
|
-
|
|
2450
|
-
} else if (
|
|
2865
|
+
const g = c[h];
|
|
2866
|
+
if (g.src && !n.includes(g.src)) {
|
|
2867
|
+
n.push(g.src);
|
|
2868
|
+
const f = document.createElement("script");
|
|
2869
|
+
f.async = !0, f.src = g.src, document.head.appendChild(f);
|
|
2870
|
+
} else if (En(g) && !o.includes(g.innerText))
|
|
2451
2871
|
try {
|
|
2452
|
-
o.push(
|
|
2453
|
-
} catch (
|
|
2454
|
-
console.warn("`Embed`: Error running script:",
|
|
2872
|
+
o.push(g.innerText), new Function(g.innerText)();
|
|
2873
|
+
} catch (f) {
|
|
2874
|
+
console.warn("`Embed`: Error running script:", f);
|
|
2455
2875
|
}
|
|
2456
2876
|
}
|
|
2457
2877
|
}
|
|
2458
|
-
return
|
|
2459
|
-
t.current && !r && (l(!0),
|
|
2878
|
+
return N(() => {
|
|
2879
|
+
t.current && !r && (l(!0), u());
|
|
2460
2880
|
}, [t.current, r]), /* @__PURE__ */ s(
|
|
2461
2881
|
"div",
|
|
2462
2882
|
{
|
|
@@ -2466,7 +2886,7 @@ function xn(e) {
|
|
|
2466
2886
|
}
|
|
2467
2887
|
);
|
|
2468
2888
|
}
|
|
2469
|
-
const
|
|
2889
|
+
const Pn = {
|
|
2470
2890
|
name: "Form:Form",
|
|
2471
2891
|
// editableTags: ['builder-form-error']
|
|
2472
2892
|
defaults: {
|
|
@@ -2703,118 +3123,118 @@ const vn = {
|
|
|
2703
3123
|
builderComponents: !0,
|
|
2704
3124
|
builderLinkComponent: !0
|
|
2705
3125
|
}
|
|
2706
|
-
},
|
|
3126
|
+
}, Vn = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"], Bn = () => {
|
|
2707
3127
|
const e = process.env.NODE_ENV || "production";
|
|
2708
|
-
return
|
|
3128
|
+
return Vn.includes(e) ? e : "production";
|
|
2709
3129
|
};
|
|
2710
|
-
function
|
|
2711
|
-
const t =
|
|
2712
|
-
function
|
|
2713
|
-
var k,
|
|
2714
|
-
const
|
|
3130
|
+
function Nn(e) {
|
|
3131
|
+
const t = F(null), [n, i] = E(() => "unsubmitted"), [o, a] = E(() => null), [r, l] = E(() => "");
|
|
3132
|
+
function u(g) {
|
|
3133
|
+
var k, d;
|
|
3134
|
+
const f = {
|
|
2715
3135
|
...e.builderContext.rootState,
|
|
2716
|
-
...
|
|
3136
|
+
...g
|
|
2717
3137
|
};
|
|
2718
|
-
e.builderContext.rootSetState ? (
|
|
3138
|
+
e.builderContext.rootSetState ? (d = (k = e.builderContext).rootSetState) == null || d.call(k, f) : e.builderContext.rootState = f;
|
|
2719
3139
|
}
|
|
2720
3140
|
function c() {
|
|
2721
3141
|
return W() && e.previewState || n;
|
|
2722
3142
|
}
|
|
2723
|
-
function h(
|
|
3143
|
+
function h(g) {
|
|
2724
3144
|
var k;
|
|
2725
|
-
const
|
|
3145
|
+
const f = e.sendWithJs || e.sendSubmissionsTo === "email";
|
|
2726
3146
|
if (e.sendSubmissionsTo === "zapier")
|
|
2727
|
-
|
|
2728
|
-
else if (
|
|
3147
|
+
g.preventDefault();
|
|
3148
|
+
else if (f) {
|
|
2729
3149
|
if (!(e.action || e.sendSubmissionsTo === "email")) {
|
|
2730
|
-
|
|
3150
|
+
g.preventDefault();
|
|
2731
3151
|
return;
|
|
2732
3152
|
}
|
|
2733
|
-
|
|
2734
|
-
const
|
|
2735
|
-
let
|
|
2736
|
-
const
|
|
2737
|
-
let
|
|
2738
|
-
const
|
|
2739
|
-
if (
|
|
2740
|
-
if (
|
|
2741
|
-
if (
|
|
2742
|
-
return
|
|
2743
|
-
key:
|
|
2744
|
-
value:
|
|
3153
|
+
g.preventDefault();
|
|
3154
|
+
const d = g.currentTarget || g.target, b = e.customHeaders || {};
|
|
3155
|
+
let v;
|
|
3156
|
+
const y = new FormData(d), x = Array.from(d.querySelectorAll("input,select,textarea")).filter((m) => !!m.name).map((m) => {
|
|
3157
|
+
let p;
|
|
3158
|
+
const C = m.name;
|
|
3159
|
+
if (m instanceof HTMLInputElement)
|
|
3160
|
+
if (m.type === "radio") {
|
|
3161
|
+
if (m.checked)
|
|
3162
|
+
return p = m.name, {
|
|
3163
|
+
key: C,
|
|
3164
|
+
value: p
|
|
2745
3165
|
};
|
|
2746
|
-
} else if (
|
|
2747
|
-
|
|
2748
|
-
else if (
|
|
2749
|
-
const
|
|
2750
|
-
isNaN(
|
|
3166
|
+
} else if (m.type === "checkbox")
|
|
3167
|
+
p = m.checked;
|
|
3168
|
+
else if (m.type === "number" || m.type === "range") {
|
|
3169
|
+
const w = m.valueAsNumber;
|
|
3170
|
+
isNaN(w) || (p = w);
|
|
2751
3171
|
} else
|
|
2752
|
-
|
|
3172
|
+
m.type === "file" ? p = m.files : p = m.value;
|
|
2753
3173
|
else
|
|
2754
|
-
|
|
3174
|
+
p = m.value;
|
|
2755
3175
|
return {
|
|
2756
|
-
key:
|
|
2757
|
-
value:
|
|
3176
|
+
key: C,
|
|
3177
|
+
value: p
|
|
2758
3178
|
};
|
|
2759
3179
|
});
|
|
2760
|
-
let
|
|
2761
|
-
if (e.sendSubmissionsTo === "email" && (
|
|
2762
|
-
(
|
|
2763
|
-
}),
|
|
2764
|
-
|
|
3180
|
+
let T = e.contentType;
|
|
3181
|
+
if (e.sendSubmissionsTo === "email" && (T = "multipart/form-data"), Array.from(x).forEach(({ value: m }) => {
|
|
3182
|
+
(m instanceof File || Array.isArray(m) && m[0] instanceof File || m instanceof FileList) && (T = "multipart/form-data");
|
|
3183
|
+
}), T !== "application/json")
|
|
3184
|
+
v = y;
|
|
2765
3185
|
else {
|
|
2766
|
-
const
|
|
2767
|
-
Array.from(
|
|
2768
|
-
|
|
2769
|
-
}),
|
|
3186
|
+
const m = {};
|
|
3187
|
+
Array.from(x).forEach(({ value: p, key: C }) => {
|
|
3188
|
+
We(m, C, p);
|
|
3189
|
+
}), v = JSON.stringify(m);
|
|
2770
3190
|
}
|
|
2771
|
-
|
|
2772
|
-
const P = new CustomEvent("presubmit", { detail: { body:
|
|
3191
|
+
T && T !== "multipart/form-data" && (f && ((k = e.action) != null && k.includes("zapier.com")) || (b["content-type"] = T));
|
|
3192
|
+
const P = new CustomEvent("presubmit", { detail: { body: v } });
|
|
2773
3193
|
if (t.current && (t.current.dispatchEvent(P), P.defaultPrevented))
|
|
2774
3194
|
return;
|
|
2775
3195
|
i("sending");
|
|
2776
|
-
const I = `${
|
|
3196
|
+
const I = `${Bn() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(
|
|
2777
3197
|
e.sendSubmissionsToEmail || ""
|
|
2778
|
-
)}&name=${encodeURIComponent(e.name || "")}`,
|
|
2779
|
-
Ie(
|
|
2780
|
-
async (
|
|
2781
|
-
let
|
|
2782
|
-
const
|
|
2783
|
-
if (
|
|
2784
|
-
let
|
|
2785
|
-
|
|
3198
|
+
)}&name=${encodeURIComponent(e.name || "")}`, S = e.sendSubmissionsTo === "email" ? I : e.action;
|
|
3199
|
+
Ie(S), fetch(S, { body: v, headers: b, method: e.method || "post" }).then(
|
|
3200
|
+
async (m) => {
|
|
3201
|
+
let p;
|
|
3202
|
+
const C = m.headers.get("content-type");
|
|
3203
|
+
if (C && C.indexOf("application/json") !== -1 ? p = await m.json() : p = await m.text(), !m.ok && e.errorMessagePath) {
|
|
3204
|
+
let w = Be(p, e.errorMessagePath);
|
|
3205
|
+
w && (typeof w != "string" && (w = JSON.stringify(w)), l(w), u({ formErrorMessage: w }));
|
|
2786
3206
|
}
|
|
2787
|
-
if (a(
|
|
2788
|
-
const
|
|
2789
|
-
detail: { res:
|
|
3207
|
+
if (a(p), i(m.ok ? "success" : "error"), m.ok) {
|
|
3208
|
+
const w = new CustomEvent("submit:success", {
|
|
3209
|
+
detail: { res: m, body: p }
|
|
2790
3210
|
});
|
|
2791
3211
|
if (t.current) {
|
|
2792
|
-
if (t.current.dispatchEvent(
|
|
3212
|
+
if (t.current.dispatchEvent(w), w.defaultPrevented)
|
|
2793
3213
|
return;
|
|
2794
3214
|
e.resetFormOnSubmit !== !1 && t.current.reset();
|
|
2795
3215
|
}
|
|
2796
3216
|
if (e.successUrl)
|
|
2797
3217
|
if (t.current) {
|
|
2798
|
-
const
|
|
3218
|
+
const B = new CustomEvent("route", {
|
|
2799
3219
|
detail: { url: e.successUrl }
|
|
2800
3220
|
});
|
|
2801
|
-
t.current.dispatchEvent(
|
|
3221
|
+
t.current.dispatchEvent(B), B.defaultPrevented || (location.href = e.successUrl);
|
|
2802
3222
|
} else
|
|
2803
3223
|
location.href = e.successUrl;
|
|
2804
3224
|
}
|
|
2805
3225
|
},
|
|
2806
|
-
(
|
|
2807
|
-
const
|
|
2808
|
-
detail: { error:
|
|
3226
|
+
(m) => {
|
|
3227
|
+
const p = new CustomEvent("submit:error", {
|
|
3228
|
+
detail: { error: m }
|
|
2809
3229
|
});
|
|
2810
|
-
t.current && (t.current.dispatchEvent(
|
|
3230
|
+
t.current && (t.current.dispatchEvent(p), p.defaultPrevented) || (a(m), i("error"));
|
|
2811
3231
|
}
|
|
2812
3232
|
);
|
|
2813
3233
|
}
|
|
2814
3234
|
}
|
|
2815
|
-
return /* @__PURE__ */
|
|
3235
|
+
return /* @__PURE__ */ V(R, { children: [
|
|
2816
3236
|
" ",
|
|
2817
|
-
/* @__PURE__ */
|
|
3237
|
+
/* @__PURE__ */ V(
|
|
2818
3238
|
"form",
|
|
2819
3239
|
{
|
|
2820
3240
|
validate: e.validate,
|
|
@@ -2822,12 +3242,12 @@ function Cn(e) {
|
|
|
2822
3242
|
action: !e.sendWithJs && e.action,
|
|
2823
3243
|
method: e.method,
|
|
2824
3244
|
name: e.name,
|
|
2825
|
-
onSubmit: (
|
|
3245
|
+
onSubmit: (g) => h(g),
|
|
2826
3246
|
...e.attributes,
|
|
2827
3247
|
children: [
|
|
2828
3248
|
e.children,
|
|
2829
3249
|
c() === "error" ? /* @__PURE__ */ s(
|
|
2830
|
-
|
|
3250
|
+
D,
|
|
2831
3251
|
{
|
|
2832
3252
|
path: "errorMessage",
|
|
2833
3253
|
blocks: e.errorMessage,
|
|
@@ -2835,7 +3255,7 @@ function Cn(e) {
|
|
|
2835
3255
|
}
|
|
2836
3256
|
) : null,
|
|
2837
3257
|
c() === "sending" ? /* @__PURE__ */ s(
|
|
2838
|
-
|
|
3258
|
+
D,
|
|
2839
3259
|
{
|
|
2840
3260
|
path: "sendingMessage",
|
|
2841
3261
|
blocks: e.sendingMessage,
|
|
@@ -2844,7 +3264,7 @@ function Cn(e) {
|
|
|
2844
3264
|
) : null,
|
|
2845
3265
|
c() === "error" && o ? /* @__PURE__ */ s("pre", { className: "builder-form-error-text pre-7acc3b46", children: JSON.stringify(o, null, 2) }) : null,
|
|
2846
3266
|
c() === "success" ? /* @__PURE__ */ s(
|
|
2847
|
-
|
|
3267
|
+
D,
|
|
2848
3268
|
{
|
|
2849
3269
|
path: "successMessage",
|
|
2850
3270
|
blocks: e.successMessage,
|
|
@@ -2859,7 +3279,7 @@ function Cn(e) {
|
|
|
2859
3279
|
" "
|
|
2860
3280
|
] });
|
|
2861
3281
|
}
|
|
2862
|
-
const
|
|
3282
|
+
const An = {
|
|
2863
3283
|
name: "Form:Input",
|
|
2864
3284
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
2865
3285
|
inputs: [
|
|
@@ -2911,8 +3331,8 @@ const Tn = {
|
|
|
2911
3331
|
borderColor: "#ccc"
|
|
2912
3332
|
}
|
|
2913
3333
|
};
|
|
2914
|
-
function
|
|
2915
|
-
return /* @__PURE__ */
|
|
3334
|
+
function Wn(e) {
|
|
3335
|
+
return /* @__PURE__ */ Pe(
|
|
2916
3336
|
"input",
|
|
2917
3337
|
{
|
|
2918
3338
|
...e.attributes,
|
|
@@ -2926,7 +3346,7 @@ function In(e) {
|
|
|
2926
3346
|
}
|
|
2927
3347
|
);
|
|
2928
3348
|
}
|
|
2929
|
-
const
|
|
3349
|
+
const Dn = {
|
|
2930
3350
|
name: "Form:Select",
|
|
2931
3351
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
2932
3352
|
defaultStyles: {
|
|
@@ -2969,9 +3389,9 @@ const wn = {
|
|
|
2969
3389
|
static: !0,
|
|
2970
3390
|
noWrap: !0
|
|
2971
3391
|
};
|
|
2972
|
-
function
|
|
3392
|
+
function $n(e) {
|
|
2973
3393
|
var t;
|
|
2974
|
-
return /* @__PURE__ */
|
|
3394
|
+
return /* @__PURE__ */ Pe(
|
|
2975
3395
|
"select",
|
|
2976
3396
|
{
|
|
2977
3397
|
...e.attributes,
|
|
@@ -2984,7 +3404,7 @@ function En(e) {
|
|
|
2984
3404
|
(t = e.options) == null ? void 0 : t.map((n, i) => /* @__PURE__ */ s("option", { value: n.value, children: n.name || n.value }, `${n.name}-${i}`))
|
|
2985
3405
|
);
|
|
2986
3406
|
}
|
|
2987
|
-
const
|
|
3407
|
+
const Fn = {
|
|
2988
3408
|
name: "Form:SubmitButton",
|
|
2989
3409
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
2990
3410
|
defaultStyles: {
|
|
@@ -3010,10 +3430,10 @@ const Rn = {
|
|
|
3010
3430
|
// TODO: defaultChildren
|
|
3011
3431
|
// canHaveChildren: true,
|
|
3012
3432
|
};
|
|
3013
|
-
function
|
|
3433
|
+
function On(e) {
|
|
3014
3434
|
return /* @__PURE__ */ s("button", { type: "submit", ...e.attributes, children: e.text });
|
|
3015
3435
|
}
|
|
3016
|
-
const
|
|
3436
|
+
const Ln = {
|
|
3017
3437
|
name: "Form:TextArea",
|
|
3018
3438
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
3019
3439
|
inputs: [{
|
|
@@ -3050,7 +3470,7 @@ const Bn = {
|
|
|
3050
3470
|
static: !0,
|
|
3051
3471
|
noWrap: !0
|
|
3052
3472
|
};
|
|
3053
|
-
function
|
|
3473
|
+
function Un(e) {
|
|
3054
3474
|
return /* @__PURE__ */ s(
|
|
3055
3475
|
"textarea",
|
|
3056
3476
|
{
|
|
@@ -3063,7 +3483,7 @@ function Vn(e) {
|
|
|
3063
3483
|
}
|
|
3064
3484
|
);
|
|
3065
3485
|
}
|
|
3066
|
-
const
|
|
3486
|
+
const _n = {
|
|
3067
3487
|
// friendlyName?
|
|
3068
3488
|
name: "Raw:Img",
|
|
3069
3489
|
hideFromInsertMenu: !0,
|
|
@@ -3072,13 +3492,13 @@ const An = {
|
|
|
3072
3492
|
name: "image",
|
|
3073
3493
|
bubble: !0,
|
|
3074
3494
|
type: "file",
|
|
3075
|
-
allowedFileTypes:
|
|
3495
|
+
allowedFileTypes: ue,
|
|
3076
3496
|
required: !0
|
|
3077
3497
|
}],
|
|
3078
3498
|
noWrap: !0,
|
|
3079
3499
|
static: !0
|
|
3080
3500
|
};
|
|
3081
|
-
function
|
|
3501
|
+
function qn(e) {
|
|
3082
3502
|
return /* @__PURE__ */ s(
|
|
3083
3503
|
"img",
|
|
3084
3504
|
{
|
|
@@ -3093,7 +3513,7 @@ function Nn(e) {
|
|
|
3093
3513
|
W() && e.imgSrc || "default-key"
|
|
3094
3514
|
);
|
|
3095
3515
|
}
|
|
3096
|
-
const
|
|
3516
|
+
const Hn = {
|
|
3097
3517
|
name: "Video",
|
|
3098
3518
|
canHaveChildren: !0,
|
|
3099
3519
|
defaultStyles: {
|
|
@@ -3104,14 +3524,14 @@ const Wn = {
|
|
|
3104
3524
|
inputs: [{
|
|
3105
3525
|
name: "video",
|
|
3106
3526
|
type: "file",
|
|
3107
|
-
allowedFileTypes:
|
|
3527
|
+
allowedFileTypes: an,
|
|
3108
3528
|
bubble: !0,
|
|
3109
3529
|
defaultValue: "https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",
|
|
3110
3530
|
required: !0
|
|
3111
3531
|
}, {
|
|
3112
3532
|
name: "posterImage",
|
|
3113
3533
|
type: "file",
|
|
3114
|
-
allowedFileTypes:
|
|
3534
|
+
allowedFileTypes: ue,
|
|
3115
3535
|
helperText: "Image to show before the video plays"
|
|
3116
3536
|
}, {
|
|
3117
3537
|
name: "autoPlay",
|
|
@@ -3178,8 +3598,8 @@ const Wn = {
|
|
|
3178
3598
|
builderBlock: !0
|
|
3179
3599
|
}
|
|
3180
3600
|
};
|
|
3181
|
-
function
|
|
3182
|
-
var i, o, a, r, l,
|
|
3601
|
+
function Mn(e) {
|
|
3602
|
+
var i, o, a, r, l, u, c;
|
|
3183
3603
|
function t() {
|
|
3184
3604
|
return {
|
|
3185
3605
|
...e.autoPlay === !0 ? {
|
|
@@ -3204,7 +3624,7 @@ function Fn(e) {
|
|
|
3204
3624
|
...t()
|
|
3205
3625
|
};
|
|
3206
3626
|
}
|
|
3207
|
-
return /* @__PURE__ */
|
|
3627
|
+
return /* @__PURE__ */ V(
|
|
3208
3628
|
"div",
|
|
3209
3629
|
{
|
|
3210
3630
|
style: {
|
|
@@ -3257,7 +3677,7 @@ function Fn(e) {
|
|
|
3257
3677
|
children: e.children
|
|
3258
3678
|
}
|
|
3259
3679
|
) : null,
|
|
3260
|
-
(c = (
|
|
3680
|
+
(c = (u = e.builderBlock) == null ? void 0 : u.children) != null && c.length && !e.fitContent ? /* @__PURE__ */ s(
|
|
3261
3681
|
"div",
|
|
3262
3682
|
{
|
|
3263
3683
|
style: {
|
|
@@ -3278,64 +3698,67 @@ function Fn(e) {
|
|
|
3278
3698
|
}
|
|
3279
3699
|
);
|
|
3280
3700
|
}
|
|
3281
|
-
const
|
|
3282
|
-
component:
|
|
3283
|
-
...
|
|
3701
|
+
const jn = () => [{
|
|
3702
|
+
component: Tn,
|
|
3703
|
+
...Cn
|
|
3284
3704
|
}, {
|
|
3285
|
-
component:
|
|
3286
|
-
...
|
|
3705
|
+
component: Rn,
|
|
3706
|
+
...wn
|
|
3287
3707
|
}, {
|
|
3288
|
-
component:
|
|
3289
|
-
...
|
|
3708
|
+
component: Nn,
|
|
3709
|
+
...Pn
|
|
3290
3710
|
}, {
|
|
3291
|
-
component:
|
|
3292
|
-
...
|
|
3711
|
+
component: Wn,
|
|
3712
|
+
...An
|
|
3293
3713
|
}, {
|
|
3294
|
-
component:
|
|
3295
|
-
...
|
|
3714
|
+
component: On,
|
|
3715
|
+
...Fn
|
|
3296
3716
|
}, {
|
|
3297
|
-
component:
|
|
3298
|
-
...
|
|
3717
|
+
component: $n,
|
|
3718
|
+
...Dn
|
|
3299
3719
|
}, {
|
|
3300
|
-
component:
|
|
3301
|
-
...
|
|
3720
|
+
component: Un,
|
|
3721
|
+
...Ln
|
|
3302
3722
|
}, {
|
|
3303
|
-
component:
|
|
3304
|
-
...
|
|
3723
|
+
component: qn,
|
|
3724
|
+
..._n
|
|
3305
3725
|
}, {
|
|
3306
|
-
component:
|
|
3307
|
-
...
|
|
3308
|
-
}],
|
|
3309
|
-
component:
|
|
3310
|
-
...en
|
|
3311
|
-
}, {
|
|
3312
|
-
component: zt,
|
|
3726
|
+
component: Mn,
|
|
3727
|
+
...Hn
|
|
3728
|
+
}], Se = () => [{
|
|
3729
|
+
component: nt,
|
|
3313
3730
|
...tn
|
|
3314
3731
|
}, {
|
|
3315
3732
|
component: Kt,
|
|
3316
3733
|
...nn
|
|
3317
3734
|
}, {
|
|
3318
|
-
component:
|
|
3319
|
-
...
|
|
3735
|
+
component: Jt,
|
|
3736
|
+
...on
|
|
3320
3737
|
}, {
|
|
3321
|
-
component:
|
|
3738
|
+
component: Yt,
|
|
3322
3739
|
...rn
|
|
3323
3740
|
}, {
|
|
3324
|
-
component:
|
|
3325
|
-
...
|
|
3741
|
+
component: Xt,
|
|
3742
|
+
...gn
|
|
3326
3743
|
}, {
|
|
3327
|
-
component:
|
|
3328
|
-
...
|
|
3744
|
+
component: pn,
|
|
3745
|
+
...bn
|
|
3746
|
+
}, {
|
|
3747
|
+
component: gi,
|
|
3748
|
+
...yn
|
|
3329
3749
|
}, {
|
|
3330
|
-
component:
|
|
3331
|
-
...
|
|
3750
|
+
component: kn,
|
|
3751
|
+
...Sn
|
|
3332
3752
|
}, {
|
|
3333
|
-
component:
|
|
3334
|
-
...
|
|
3753
|
+
component: hn,
|
|
3754
|
+
...ln
|
|
3335
3755
|
}, {
|
|
3336
|
-
component:
|
|
3337
|
-
...
|
|
3338
|
-
},
|
|
3756
|
+
component: xn,
|
|
3757
|
+
...vn
|
|
3758
|
+
}, {
|
|
3759
|
+
component: en,
|
|
3760
|
+
...Zt
|
|
3761
|
+
}, ...jn()], zn = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
3339
3762
|
function getAndSetVariantId() {
|
|
3340
3763
|
function setCookie(name, value, days) {
|
|
3341
3764
|
let expires = '';
|
|
@@ -3391,7 +3814,7 @@ const $n = () => [{
|
|
|
3391
3814
|
}).join('');
|
|
3392
3815
|
styleEl.innerHTML = newStyleStr;
|
|
3393
3816
|
}
|
|
3394
|
-
}`,
|
|
3817
|
+
}`, Kn = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
3395
3818
|
if (!navigator.cookieEnabled) {
|
|
3396
3819
|
return;
|
|
3397
3820
|
}
|
|
@@ -3425,39 +3848,29 @@ const $n = () => [{
|
|
|
3425
3848
|
thisScriptEl?.remove();
|
|
3426
3849
|
}
|
|
3427
3850
|
return;
|
|
3428
|
-
}`, Me = "builderIoAbTest", je = "builderIoRenderContent",
|
|
3851
|
+
}`, Me = "builderIoAbTest", je = "builderIoRenderContent", z = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
3429
3852
|
...t,
|
|
3430
3853
|
testVariationId: t.id,
|
|
3431
3854
|
id: e == null ? void 0 : e.id
|
|
3432
|
-
})),
|
|
3855
|
+
})), Jn = ({
|
|
3433
3856
|
canTrack: e,
|
|
3434
3857
|
content: t
|
|
3435
|
-
}) => !(!(
|
|
3436
|
-
window.${Me} = ${
|
|
3437
|
-
window.${je} = ${
|
|
3438
|
-
`,
|
|
3858
|
+
}) => !(!(z(t).length > 0) || !e || $()), Gn = (e) => e === "react" || e === "reactNative", ze = Gn(O), Qn = () => `
|
|
3859
|
+
window.${Me} = ${zn}
|
|
3860
|
+
window.${je} = ${Kn}
|
|
3861
|
+
`, Yn = (e, t) => `
|
|
3439
3862
|
window.${Me}(
|
|
3440
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
3441
|
-
)`,
|
|
3863
|
+
"${t}",${JSON.stringify(e)}, ${ze}
|
|
3864
|
+
)`, Xn = ({
|
|
3442
3865
|
contentId: e,
|
|
3443
3866
|
variationId: t
|
|
3444
3867
|
}) => `window.${je}(
|
|
3445
|
-
"${t}", "${e}", ${
|
|
3868
|
+
"${t}", "${e}", ${ze}
|
|
3446
3869
|
)`;
|
|
3447
|
-
function
|
|
3448
|
-
return /* @__PURE__ */ s(
|
|
3449
|
-
"script",
|
|
3450
|
-
{
|
|
3451
|
-
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
3452
|
-
"data-id": e.id,
|
|
3453
|
-
nonce: e.nonce || ""
|
|
3454
|
-
}
|
|
3455
|
-
);
|
|
3456
|
-
}
|
|
3457
|
-
function Se(e) {
|
|
3870
|
+
function ke(e) {
|
|
3458
3871
|
return Math.round(e * 1e3) / 1e3;
|
|
3459
3872
|
}
|
|
3460
|
-
const
|
|
3873
|
+
const Zn = (e, t, n = !0) => {
|
|
3461
3874
|
if (!(e instanceof HTMLElement))
|
|
3462
3875
|
return null;
|
|
3463
3876
|
let i = n ? e : e.parentElement;
|
|
@@ -3468,35 +3881,35 @@ const jn = (e, t, n = !0) => {
|
|
|
3468
3881
|
return i;
|
|
3469
3882
|
} while (i = i.parentElement);
|
|
3470
3883
|
return null;
|
|
3471
|
-
},
|
|
3884
|
+
}, ei = (e) => Zn(e, (t) => {
|
|
3472
3885
|
const n = t.getAttribute("builder-id") || t.id;
|
|
3473
3886
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
3474
|
-
}),
|
|
3887
|
+
}), Ce = ({
|
|
3475
3888
|
event: e,
|
|
3476
3889
|
target: t
|
|
3477
3890
|
}) => {
|
|
3478
|
-
const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top, a =
|
|
3891
|
+
const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top, a = ke(i / n.width), r = ke(o / n.height);
|
|
3479
3892
|
return {
|
|
3480
3893
|
x: a,
|
|
3481
3894
|
y: r
|
|
3482
3895
|
};
|
|
3483
|
-
},
|
|
3484
|
-
const t = e.target, n = t &&
|
|
3896
|
+
}, ti = (e) => {
|
|
3897
|
+
const t = e.target, n = t && ei(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
3485
3898
|
return {
|
|
3486
3899
|
targetBuilderElement: i || void 0,
|
|
3487
3900
|
metadata: {
|
|
3488
|
-
targetOffset: t ?
|
|
3901
|
+
targetOffset: t ? Ce({
|
|
3489
3902
|
event: e,
|
|
3490
3903
|
target: t
|
|
3491
3904
|
}) : void 0,
|
|
3492
|
-
builderTargetOffset: n ?
|
|
3905
|
+
builderTargetOffset: n ? Ce({
|
|
3493
3906
|
event: e,
|
|
3494
3907
|
target: n
|
|
3495
3908
|
}) : void 0,
|
|
3496
3909
|
builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
|
|
3497
3910
|
}
|
|
3498
3911
|
};
|
|
3499
|
-
},
|
|
3912
|
+
}, ni = ["svelte", "qwik", "vue"], Te = () => ni.includes(O) && (W() || Y()), ii = (e) => {
|
|
3500
3913
|
var a, r;
|
|
3501
3914
|
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (r = e.fileUrl) != null ? r : (a = e == null ? void 0 : e.files) == null ? void 0 : a.regular;
|
|
3502
3915
|
let o = "";
|
|
@@ -3522,15 +3935,15 @@ font-weight: ${l};
|
|
|
3522
3935
|
`.trim());
|
|
3523
3936
|
}
|
|
3524
3937
|
return o;
|
|
3525
|
-
},
|
|
3938
|
+
}, oi = ({
|
|
3526
3939
|
customFonts: e
|
|
3527
3940
|
}) => {
|
|
3528
3941
|
var t;
|
|
3529
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
3530
|
-
},
|
|
3942
|
+
return ((t = e == null ? void 0 : e.map((n) => ii(n))) == null ? void 0 : t.join(" ")) || "";
|
|
3943
|
+
}, ai = ({
|
|
3531
3944
|
cssCode: e,
|
|
3532
3945
|
contentId: t
|
|
3533
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
3946
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", ri = `
|
|
3534
3947
|
.builder-button {
|
|
3535
3948
|
all: unset;
|
|
3536
3949
|
}
|
|
@@ -3547,39 +3960,39 @@ font-weight: ${l};
|
|
|
3547
3960
|
text-align: inherit;
|
|
3548
3961
|
font-family: inherit;
|
|
3549
3962
|
}
|
|
3550
|
-
`,
|
|
3551
|
-
function
|
|
3552
|
-
var
|
|
3553
|
-
const t =
|
|
3963
|
+
`, li = (e) => e ? "" : ri, si = (e) => `variant-${e}`;
|
|
3964
|
+
function ci(e) {
|
|
3965
|
+
var x, T, P;
|
|
3966
|
+
const t = F(null);
|
|
3554
3967
|
function n(I) {
|
|
3555
|
-
var
|
|
3556
|
-
const
|
|
3968
|
+
var m, p;
|
|
3969
|
+
const S = {
|
|
3557
3970
|
...e.builderContextSignal.rootState,
|
|
3558
3971
|
...I
|
|
3559
3972
|
};
|
|
3560
|
-
e.builderContextSignal.rootSetState ? (
|
|
3561
|
-
...
|
|
3562
|
-
rootState:
|
|
3973
|
+
e.builderContextSignal.rootSetState ? (p = (m = e.builderContextSignal).rootSetState) == null || p.call(m, S) : e.setBuilderContextSignal((C) => ({
|
|
3974
|
+
...C,
|
|
3975
|
+
rootState: S
|
|
3563
3976
|
}));
|
|
3564
3977
|
}
|
|
3565
3978
|
function i(I) {
|
|
3566
|
-
var
|
|
3567
|
-
const
|
|
3979
|
+
var m, p, C, w, B;
|
|
3980
|
+
const S = {
|
|
3568
3981
|
...e.builderContextSignal.content,
|
|
3569
3982
|
...I,
|
|
3570
3983
|
data: {
|
|
3571
|
-
...(
|
|
3984
|
+
...(m = e.builderContextSignal.content) == null ? void 0 : m.data,
|
|
3572
3985
|
...I == null ? void 0 : I.data
|
|
3573
3986
|
},
|
|
3574
3987
|
meta: {
|
|
3575
|
-
...(
|
|
3988
|
+
...(p = e.builderContextSignal.content) == null ? void 0 : p.meta,
|
|
3576
3989
|
...I == null ? void 0 : I.meta,
|
|
3577
|
-
breakpoints: ((
|
|
3990
|
+
breakpoints: ((C = I == null ? void 0 : I.meta) == null ? void 0 : C.breakpoints) || ((B = (w = e.builderContextSignal.content) == null ? void 0 : w.meta) == null ? void 0 : B.breakpoints)
|
|
3578
3991
|
}
|
|
3579
3992
|
};
|
|
3580
|
-
e.setBuilderContextSignal((
|
|
3581
|
-
...
|
|
3582
|
-
content:
|
|
3993
|
+
e.setBuilderContextSignal((A) => ({
|
|
3994
|
+
...A,
|
|
3995
|
+
content: S
|
|
3583
3996
|
}));
|
|
3584
3997
|
}
|
|
3585
3998
|
function o() {
|
|
@@ -3588,7 +4001,7 @@ function ei(e) {
|
|
|
3588
4001
|
"aria-hidden": !0
|
|
3589
4002
|
};
|
|
3590
4003
|
}
|
|
3591
|
-
const [a, r] =
|
|
4004
|
+
const [a, r] = E(
|
|
3592
4005
|
() => e.contentWrapper || "div"
|
|
3593
4006
|
);
|
|
3594
4007
|
function l(I) {
|
|
@@ -3596,54 +4009,54 @@ function ei(e) {
|
|
|
3596
4009
|
model: e.model,
|
|
3597
4010
|
trustedHosts: e.trustedHosts,
|
|
3598
4011
|
callbacks: {
|
|
3599
|
-
configureSdk: (
|
|
3600
|
-
var
|
|
3601
|
-
const { breakpoints:
|
|
3602
|
-
!
|
|
4012
|
+
configureSdk: (S) => {
|
|
4013
|
+
var C;
|
|
4014
|
+
const { breakpoints: m, contentId: p } = S;
|
|
4015
|
+
!p || p !== ((C = e.builderContextSignal.content) == null ? void 0 : C.id) || m && i({
|
|
3603
4016
|
meta: {
|
|
3604
|
-
breakpoints:
|
|
4017
|
+
breakpoints: m
|
|
3605
4018
|
}
|
|
3606
4019
|
});
|
|
3607
4020
|
},
|
|
3608
|
-
animation: (
|
|
3609
|
-
|
|
4021
|
+
animation: (S) => {
|
|
4022
|
+
Fe(S);
|
|
3610
4023
|
},
|
|
3611
|
-
contentUpdate: (
|
|
3612
|
-
i(
|
|
4024
|
+
contentUpdate: (S) => {
|
|
4025
|
+
i(S);
|
|
3613
4026
|
}
|
|
3614
4027
|
}
|
|
3615
4028
|
})(I);
|
|
3616
4029
|
}
|
|
3617
|
-
const [
|
|
3618
|
-
function
|
|
3619
|
-
var
|
|
4030
|
+
const [u, c] = E(() => ({})), [h, g] = E(() => ({})), [f, k] = E(() => !1);
|
|
4031
|
+
function d(I) {
|
|
4032
|
+
var S, m;
|
|
3620
4033
|
if (e.builderContextSignal.content) {
|
|
3621
|
-
const
|
|
3622
|
-
|
|
4034
|
+
const p = (S = e.builderContextSignal.content) == null ? void 0 : S.testVariationId, C = (m = e.builderContextSignal.content) == null ? void 0 : m.id;
|
|
4035
|
+
me({
|
|
3623
4036
|
apiHost: e.apiHost,
|
|
3624
4037
|
type: "click",
|
|
3625
|
-
canTrack:
|
|
3626
|
-
contentId:
|
|
4038
|
+
canTrack: _(e.canTrack),
|
|
4039
|
+
contentId: C,
|
|
3627
4040
|
apiKey: e.apiKey,
|
|
3628
|
-
variationId:
|
|
3629
|
-
...
|
|
3630
|
-
unique: !
|
|
4041
|
+
variationId: p !== C ? p : void 0,
|
|
4042
|
+
...ti(I),
|
|
4043
|
+
unique: !f
|
|
3631
4044
|
});
|
|
3632
4045
|
}
|
|
3633
|
-
|
|
4046
|
+
f || k(!0);
|
|
3634
4047
|
}
|
|
3635
|
-
function
|
|
3636
|
-
var
|
|
3637
|
-
const I = (
|
|
3638
|
-
Object.entries(I).forEach(([
|
|
3639
|
-
if (!
|
|
4048
|
+
function b() {
|
|
4049
|
+
var S, m, p;
|
|
4050
|
+
const I = (p = (m = (S = e.builderContextSignal.content) == null ? void 0 : S.data) == null ? void 0 : m.httpRequests) != null ? p : {};
|
|
4051
|
+
Object.entries(I).forEach(([C, w]) => {
|
|
4052
|
+
if (!w || h[C] || u[C] && !W())
|
|
3640
4053
|
return;
|
|
3641
|
-
h[
|
|
3642
|
-
const
|
|
4054
|
+
h[C] = !0;
|
|
4055
|
+
const B = w.replace(
|
|
3643
4056
|
/{{([^}]+)}}/g,
|
|
3644
|
-
(
|
|
4057
|
+
(A, M) => String(
|
|
3645
4058
|
L({
|
|
3646
|
-
code:
|
|
4059
|
+
code: M,
|
|
3647
4060
|
context: e.context || {},
|
|
3648
4061
|
localState: void 0,
|
|
3649
4062
|
rootState: e.builderContextSignal.rootState,
|
|
@@ -3651,18 +4064,18 @@ function ei(e) {
|
|
|
3651
4064
|
})
|
|
3652
4065
|
)
|
|
3653
4066
|
);
|
|
3654
|
-
Ie(
|
|
4067
|
+
Ie(B), fetch(B).then((A) => A.json()).then((A) => {
|
|
3655
4068
|
n({
|
|
3656
|
-
[
|
|
3657
|
-
}),
|
|
3658
|
-
}).catch((
|
|
3659
|
-
console.error("error fetching dynamic data",
|
|
4069
|
+
[C]: A
|
|
4070
|
+
}), u[C] = !0;
|
|
4071
|
+
}).catch((A) => {
|
|
4072
|
+
console.error("error fetching dynamic data", w, A);
|
|
3660
4073
|
}).finally(() => {
|
|
3661
|
-
h[
|
|
4074
|
+
h[C] = !1;
|
|
3662
4075
|
});
|
|
3663
4076
|
});
|
|
3664
4077
|
}
|
|
3665
|
-
function
|
|
4078
|
+
function v() {
|
|
3666
4079
|
W() && window.dispatchEvent(
|
|
3667
4080
|
new CustomEvent(
|
|
3668
4081
|
"builder:component:stateChange",
|
|
@@ -3677,11 +4090,11 @@ function ei(e) {
|
|
|
3677
4090
|
)
|
|
3678
4091
|
);
|
|
3679
4092
|
}
|
|
3680
|
-
const
|
|
3681
|
-
return
|
|
3682
|
-
var I,
|
|
3683
|
-
if (
|
|
3684
|
-
if (W() && !e.isNestedRender && (window.addEventListener("message", l),
|
|
4093
|
+
const y = F(!1);
|
|
4094
|
+
return y.current || (b(), v(), y.current = !0), N(() => {
|
|
4095
|
+
var I, S, m;
|
|
4096
|
+
if ($()) {
|
|
4097
|
+
if (W() && !e.isNestedRender && (window.addEventListener("message", l), Je(), Ge({
|
|
3685
4098
|
...e.locale ? {
|
|
3686
4099
|
locale: e.locale
|
|
3687
4100
|
} : {},
|
|
@@ -3693,71 +4106,71 @@ function ei(e) {
|
|
|
3693
4106
|
} : {}
|
|
3694
4107
|
}), Object.values(
|
|
3695
4108
|
e.builderContextSignal.componentInfos
|
|
3696
|
-
).forEach((
|
|
3697
|
-
var
|
|
3698
|
-
if (!e.model || !((
|
|
3699
|
-
const
|
|
3700
|
-
(
|
|
4109
|
+
).forEach((C) => {
|
|
4110
|
+
var w, B;
|
|
4111
|
+
if (!e.model || !((w = C.models) != null && w.length) || C.models.includes(e.model)) {
|
|
4112
|
+
const A = Qe(C);
|
|
4113
|
+
(B = window.parent) == null || B.postMessage(A, "*");
|
|
3701
4114
|
}
|
|
3702
4115
|
}), window.addEventListener(
|
|
3703
4116
|
"builder:component:stateChangeListenerActivated",
|
|
3704
|
-
|
|
3705
|
-
)), e.builderContextSignal.content &&
|
|
3706
|
-
const
|
|
3707
|
-
|
|
4117
|
+
v
|
|
4118
|
+
)), e.builderContextSignal.content && _(e.canTrack)) {
|
|
4119
|
+
const C = (I = e.builderContextSignal.content) == null ? void 0 : I.testVariationId, w = (S = e.builderContextSignal.content) == null ? void 0 : S.id, B = e.apiKey;
|
|
4120
|
+
me({
|
|
3708
4121
|
apiHost: e.apiHost,
|
|
3709
4122
|
type: "impression",
|
|
3710
4123
|
canTrack: !0,
|
|
3711
|
-
contentId:
|
|
3712
|
-
apiKey:
|
|
3713
|
-
variationId:
|
|
4124
|
+
contentId: w,
|
|
4125
|
+
apiKey: B,
|
|
4126
|
+
variationId: C !== w ? C : void 0
|
|
3714
4127
|
});
|
|
3715
4128
|
}
|
|
3716
|
-
if (
|
|
3717
|
-
const
|
|
3718
|
-
`builder.overrides.${
|
|
3719
|
-
),
|
|
3720
|
-
(
|
|
4129
|
+
if (Y() && !W()) {
|
|
4130
|
+
const C = new URL(location.href).searchParams, w = C.get("builder.preview"), B = C.get(
|
|
4131
|
+
`builder.overrides.${w}`
|
|
4132
|
+
), A = C.get("apiKey") || C.get("builder.space");
|
|
4133
|
+
(w === "BUILDER_STUDIO" || w === e.model && A === e.apiKey && (!e.content || B === e.content.id)) && Ee({
|
|
3721
4134
|
model: e.model || "",
|
|
3722
4135
|
apiKey: e.apiKey,
|
|
3723
4136
|
apiVersion: e.builderContextSignal.apiVersion,
|
|
3724
|
-
...
|
|
4137
|
+
...w === "BUILDER_STUDIO" && ((m = e.context) != null && m.symbolId) ? {
|
|
3725
4138
|
query: {
|
|
3726
4139
|
id: e.context.symbolId
|
|
3727
4140
|
}
|
|
3728
4141
|
} : {}
|
|
3729
|
-
}).then((
|
|
3730
|
-
|
|
4142
|
+
}).then((M) => {
|
|
4143
|
+
M && i(M);
|
|
3731
4144
|
});
|
|
3732
4145
|
}
|
|
3733
4146
|
}
|
|
3734
|
-
}, []),
|
|
4147
|
+
}, []), N(() => {
|
|
3735
4148
|
e.content && i(e.content);
|
|
3736
|
-
}, [e.content]),
|
|
3737
|
-
|
|
3738
|
-
}, [e.builderContextSignal.rootState]),
|
|
4149
|
+
}, [e.content]), N(() => {
|
|
4150
|
+
v();
|
|
4151
|
+
}, [e.builderContextSignal.rootState]), N(() => {
|
|
3739
4152
|
e.data && n(e.data);
|
|
3740
|
-
}, [e.data]),
|
|
4153
|
+
}, [e.data]), N(() => {
|
|
3741
4154
|
e.locale && n({
|
|
3742
4155
|
locale: e.locale
|
|
3743
4156
|
});
|
|
3744
|
-
}, [e.locale]),
|
|
3745
|
-
|
|
4157
|
+
}, [e.locale]), N(() => () => {
|
|
4158
|
+
$() && (window.removeEventListener("message", l), window.removeEventListener(
|
|
3746
4159
|
"builder:component:stateChangeListenerActivated",
|
|
3747
|
-
|
|
4160
|
+
v
|
|
3748
4161
|
));
|
|
3749
|
-
}, []), /* @__PURE__ */ s(le.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ||
|
|
4162
|
+
}, []), /* @__PURE__ */ s(le.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content || Te() ? /* @__PURE__ */ s(
|
|
3750
4163
|
a,
|
|
3751
4164
|
{
|
|
3752
4165
|
ref: t,
|
|
3753
|
-
onClick: (I) =>
|
|
3754
|
-
"builder-content-id": (
|
|
4166
|
+
onClick: (I) => d(I),
|
|
4167
|
+
"builder-content-id": (x = e.builderContextSignal.content) == null ? void 0 : x.id,
|
|
3755
4168
|
"builder-model": e.model,
|
|
3756
|
-
className:
|
|
3757
|
-
((
|
|
4169
|
+
className: si(
|
|
4170
|
+
((T = e.content) == null ? void 0 : T.testVariationId) || ((P = e.content) == null ? void 0 : P.id)
|
|
3758
4171
|
),
|
|
3759
4172
|
style: {
|
|
3760
|
-
display: !e.builderContextSignal.content &&
|
|
4173
|
+
display: !e.builderContextSignal.content && Te() ? "none" : void 0
|
|
3761
4174
|
},
|
|
3762
4175
|
...o(),
|
|
3763
4176
|
...e.contentWrapperProps,
|
|
@@ -3765,21 +4178,21 @@ function ei(e) {
|
|
|
3765
4178
|
}
|
|
3766
4179
|
) : null });
|
|
3767
4180
|
}
|
|
3768
|
-
function
|
|
3769
|
-
const [t, n] =
|
|
4181
|
+
function ui(e) {
|
|
4182
|
+
const [t, n] = E(
|
|
3770
4183
|
() => `
|
|
3771
|
-
${
|
|
4184
|
+
${ai({
|
|
3772
4185
|
cssCode: e.cssCode,
|
|
3773
4186
|
contentId: e.contentId
|
|
3774
4187
|
})}
|
|
3775
|
-
${
|
|
4188
|
+
${oi({
|
|
3776
4189
|
customFonts: e.customFonts
|
|
3777
4190
|
})}
|
|
3778
|
-
${
|
|
4191
|
+
${li(e.isNestedRender)}
|
|
3779
4192
|
`.trim()
|
|
3780
4193
|
);
|
|
3781
4194
|
return /* @__PURE__ */ s(
|
|
3782
|
-
|
|
4195
|
+
H,
|
|
3783
4196
|
{
|
|
3784
4197
|
id: "builderio-content",
|
|
3785
4198
|
styles: t,
|
|
@@ -3787,15 +4200,15 @@ ${Xn(e.isNestedRender)}
|
|
|
3787
4200
|
}
|
|
3788
4201
|
);
|
|
3789
4202
|
}
|
|
3790
|
-
const
|
|
4203
|
+
const di = ({
|
|
3791
4204
|
content: e,
|
|
3792
4205
|
data: t,
|
|
3793
4206
|
locale: n
|
|
3794
4207
|
}) => {
|
|
3795
4208
|
var a, r, l;
|
|
3796
4209
|
const i = {}, o = ((a = e == null ? void 0 : e.data) == null ? void 0 : a.state) || {};
|
|
3797
|
-
return (l = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || l.forEach((
|
|
3798
|
-
|
|
4210
|
+
return (l = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || l.forEach((u) => {
|
|
4211
|
+
u.name && u.defaultValue !== void 0 && (i[u.name] = u.defaultValue);
|
|
3799
4212
|
}), {
|
|
3800
4213
|
...i,
|
|
3801
4214
|
...o,
|
|
@@ -3804,7 +4217,7 @@ const ni = ({
|
|
|
3804
4217
|
locale: n
|
|
3805
4218
|
} : {}
|
|
3806
4219
|
};
|
|
3807
|
-
},
|
|
4220
|
+
}, mi = ({
|
|
3808
4221
|
content: e,
|
|
3809
4222
|
data: t
|
|
3810
4223
|
}) => e ? {
|
|
@@ -3815,46 +4228,46 @@ const ni = ({
|
|
|
3815
4228
|
},
|
|
3816
4229
|
meta: e == null ? void 0 : e.meta
|
|
3817
4230
|
} : void 0;
|
|
3818
|
-
function
|
|
3819
|
-
var c, h,
|
|
3820
|
-
const [t, n] =
|
|
4231
|
+
function we(e) {
|
|
4232
|
+
var c, h, g, f, k, d, b, v, y;
|
|
4233
|
+
const [t, n] = E(
|
|
3821
4234
|
() => {
|
|
3822
|
-
var
|
|
3823
|
-
return
|
|
4235
|
+
var x, T;
|
|
4236
|
+
return Xn({
|
|
3824
4237
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3825
|
-
variationId: (
|
|
4238
|
+
variationId: (x = e.content) == null ? void 0 : x.testVariationId,
|
|
3826
4239
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3827
|
-
contentId: (
|
|
4240
|
+
contentId: (T = e.content) == null ? void 0 : T.id
|
|
3828
4241
|
});
|
|
3829
4242
|
}
|
|
3830
4243
|
);
|
|
3831
|
-
function i(
|
|
3832
|
-
l((
|
|
3833
|
-
...
|
|
3834
|
-
rootState:
|
|
4244
|
+
function i(x) {
|
|
4245
|
+
l((T) => ({
|
|
4246
|
+
...T,
|
|
4247
|
+
rootState: x
|
|
3835
4248
|
}));
|
|
3836
4249
|
}
|
|
3837
|
-
const [o, a] =
|
|
4250
|
+
const [o, a] = E(
|
|
3838
4251
|
() => [
|
|
3839
|
-
...
|
|
4252
|
+
...Se(),
|
|
3840
4253
|
...e.customComponents || []
|
|
3841
4254
|
].reduce(
|
|
3842
|
-
(
|
|
3843
|
-
...
|
|
4255
|
+
(x, { component: T, ...P }) => ({
|
|
4256
|
+
...x,
|
|
3844
4257
|
[P.name]: {
|
|
3845
|
-
component:
|
|
3846
|
-
...
|
|
4258
|
+
component: T,
|
|
4259
|
+
...fe(P)
|
|
3847
4260
|
}
|
|
3848
4261
|
}),
|
|
3849
4262
|
{}
|
|
3850
4263
|
)
|
|
3851
|
-
), [r, l] =
|
|
3852
|
-
content:
|
|
4264
|
+
), [r, l] = E(() => ({
|
|
4265
|
+
content: mi({
|
|
3853
4266
|
content: e.content,
|
|
3854
4267
|
data: e.data
|
|
3855
4268
|
}),
|
|
3856
4269
|
localState: void 0,
|
|
3857
|
-
rootState:
|
|
4270
|
+
rootState: di({
|
|
3858
4271
|
content: e.content,
|
|
3859
4272
|
data: e.data,
|
|
3860
4273
|
locale: e.locale
|
|
@@ -3865,12 +4278,12 @@ function Te(e) {
|
|
|
3865
4278
|
apiKey: e.apiKey,
|
|
3866
4279
|
apiVersion: e.apiVersion,
|
|
3867
4280
|
componentInfos: [
|
|
3868
|
-
...
|
|
4281
|
+
...Se(),
|
|
3869
4282
|
...e.customComponents || []
|
|
3870
4283
|
].reduce(
|
|
3871
|
-
(
|
|
3872
|
-
...
|
|
3873
|
-
[P.name]:
|
|
4284
|
+
(x, { component: T, ...P }) => ({
|
|
4285
|
+
...x,
|
|
4286
|
+
[P.name]: fe(P)
|
|
3874
4287
|
}),
|
|
3875
4288
|
{}
|
|
3876
4289
|
),
|
|
@@ -3879,31 +4292,31 @@ function Te(e) {
|
|
|
3879
4292
|
BlocksWrapperProps: e.blocksWrapperProps || {},
|
|
3880
4293
|
nonce: e.nonce || "",
|
|
3881
4294
|
model: e.model || ""
|
|
3882
|
-
})),
|
|
3883
|
-
if (!
|
|
3884
|
-
e.apiKey ||
|
|
4295
|
+
})), u = F(!1);
|
|
4296
|
+
if (!u.current) {
|
|
4297
|
+
e.apiKey || Q.error(
|
|
3885
4298
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
3886
4299
|
);
|
|
3887
|
-
const
|
|
3888
|
-
|
|
3889
|
-
code:
|
|
4300
|
+
const x = (h = (c = r.content) == null ? void 0 : c.data) == null ? void 0 : h.jsCode;
|
|
4301
|
+
x && L({
|
|
4302
|
+
code: x,
|
|
3890
4303
|
context: e.context || {},
|
|
3891
4304
|
localState: void 0,
|
|
3892
4305
|
rootState: r.rootState,
|
|
3893
|
-
rootSetState: (
|
|
3894
|
-
Object.assign(r.rootState,
|
|
4306
|
+
rootSetState: (T) => {
|
|
4307
|
+
Object.assign(r.rootState, T);
|
|
3895
4308
|
},
|
|
3896
4309
|
isExpression: !1
|
|
3897
|
-
}),
|
|
4310
|
+
}), u.current = !0;
|
|
3898
4311
|
}
|
|
3899
4312
|
return /* @__PURE__ */ s(
|
|
3900
|
-
|
|
4313
|
+
Ve.Provider,
|
|
3901
4314
|
{
|
|
3902
4315
|
value: {
|
|
3903
4316
|
registeredComponents: o
|
|
3904
4317
|
},
|
|
3905
|
-
children: /* @__PURE__ */
|
|
3906
|
-
|
|
4318
|
+
children: /* @__PURE__ */ V(
|
|
4319
|
+
ci,
|
|
3907
4320
|
{
|
|
3908
4321
|
apiHost: e.apiHost,
|
|
3909
4322
|
nonce: e.nonce,
|
|
@@ -3924,7 +4337,7 @@ function Te(e) {
|
|
|
3924
4337
|
setBuilderContextSignal: l,
|
|
3925
4338
|
children: [
|
|
3926
4339
|
e.isSsrAbTest ? /* @__PURE__ */ s(
|
|
3927
|
-
|
|
4340
|
+
G,
|
|
3928
4341
|
{
|
|
3929
4342
|
id: "builderio-variant-visibility",
|
|
3930
4343
|
scriptStr: t,
|
|
@@ -3932,19 +4345,19 @@ function Te(e) {
|
|
|
3932
4345
|
}
|
|
3933
4346
|
) : null,
|
|
3934
4347
|
/* @__PURE__ */ s(
|
|
3935
|
-
|
|
4348
|
+
ui,
|
|
3936
4349
|
{
|
|
3937
4350
|
nonce: e.nonce || "",
|
|
3938
4351
|
isNestedRender: e.isNestedRender,
|
|
3939
|
-
contentId: (
|
|
3940
|
-
cssCode: (k = (
|
|
3941
|
-
customFonts: (
|
|
4352
|
+
contentId: (g = r.content) == null ? void 0 : g.id,
|
|
4353
|
+
cssCode: (k = (f = r.content) == null ? void 0 : f.data) == null ? void 0 : k.cssCode,
|
|
4354
|
+
customFonts: (b = (d = r.content) == null ? void 0 : d.data) == null ? void 0 : b.customFonts
|
|
3942
4355
|
}
|
|
3943
4356
|
),
|
|
3944
4357
|
/* @__PURE__ */ s(
|
|
3945
|
-
|
|
4358
|
+
D,
|
|
3946
4359
|
{
|
|
3947
|
-
blocks: (
|
|
4360
|
+
blocks: (y = (v = r.content) == null ? void 0 : v.data) == null ? void 0 : y.blocks,
|
|
3948
4361
|
context: r,
|
|
3949
4362
|
registeredComponents: o,
|
|
3950
4363
|
linkComponent: e.linkComponent
|
|
@@ -3956,50 +4369,50 @@ function Te(e) {
|
|
|
3956
4369
|
}
|
|
3957
4370
|
);
|
|
3958
4371
|
}
|
|
3959
|
-
function
|
|
4372
|
+
function fi(e) {
|
|
3960
4373
|
var r;
|
|
3961
|
-
const [t, n] =
|
|
3962
|
-
() =>
|
|
3963
|
-
canTrack:
|
|
4374
|
+
const [t, n] = E(
|
|
4375
|
+
() => Jn({
|
|
4376
|
+
canTrack: _(e.canTrack),
|
|
3964
4377
|
content: e.content
|
|
3965
4378
|
})
|
|
3966
4379
|
);
|
|
3967
4380
|
function i() {
|
|
3968
4381
|
var l;
|
|
3969
|
-
return
|
|
3970
|
-
|
|
3971
|
-
id:
|
|
3972
|
-
testRatio:
|
|
4382
|
+
return Yn(
|
|
4383
|
+
z(e.content).map((u) => ({
|
|
4384
|
+
id: u.testVariationId,
|
|
4385
|
+
testRatio: u.testRatio
|
|
3973
4386
|
})),
|
|
3974
4387
|
((l = e.content) == null ? void 0 : l.id) || ""
|
|
3975
4388
|
);
|
|
3976
4389
|
}
|
|
3977
4390
|
function o() {
|
|
3978
|
-
return
|
|
4391
|
+
return z(e.content).map((l) => `.variant-${l.testVariationId} { display: none; } `).join("");
|
|
3979
4392
|
}
|
|
3980
4393
|
function a() {
|
|
3981
4394
|
var l;
|
|
3982
4395
|
return t ? {
|
|
3983
4396
|
...e.content,
|
|
3984
4397
|
testVariationId: (l = e.content) == null ? void 0 : l.id
|
|
3985
|
-
} :
|
|
4398
|
+
} : Xe({
|
|
3986
4399
|
item: e.content,
|
|
3987
|
-
canTrack:
|
|
4400
|
+
canTrack: _(e.canTrack)
|
|
3988
4401
|
});
|
|
3989
4402
|
}
|
|
3990
|
-
return
|
|
3991
|
-
}, []), /* @__PURE__ */
|
|
3992
|
-
!e.isNestedRender &&
|
|
3993
|
-
|
|
4403
|
+
return N(() => {
|
|
4404
|
+
}, []), /* @__PURE__ */ V(R, { children: [
|
|
4405
|
+
!e.isNestedRender && O !== "reactNative" ? /* @__PURE__ */ s(
|
|
4406
|
+
G,
|
|
3994
4407
|
{
|
|
3995
4408
|
id: "builderio-init-variants-fns",
|
|
3996
|
-
scriptStr:
|
|
4409
|
+
scriptStr: Qn(),
|
|
3997
4410
|
nonce: e.nonce || ""
|
|
3998
4411
|
}
|
|
3999
4412
|
) : null,
|
|
4000
|
-
t ? /* @__PURE__ */
|
|
4413
|
+
t ? /* @__PURE__ */ V(R, { children: [
|
|
4001
4414
|
/* @__PURE__ */ s(
|
|
4002
|
-
|
|
4415
|
+
H,
|
|
4003
4416
|
{
|
|
4004
4417
|
id: "builderio-variants",
|
|
4005
4418
|
styles: o(),
|
|
@@ -4007,15 +4420,15 @@ function oi(e) {
|
|
|
4007
4420
|
}
|
|
4008
4421
|
),
|
|
4009
4422
|
/* @__PURE__ */ s(
|
|
4010
|
-
|
|
4423
|
+
G,
|
|
4011
4424
|
{
|
|
4012
4425
|
id: "builderio-variants-visibility",
|
|
4013
4426
|
scriptStr: i(),
|
|
4014
4427
|
nonce: e.nonce || ""
|
|
4015
4428
|
}
|
|
4016
4429
|
),
|
|
4017
|
-
(r =
|
|
4018
|
-
|
|
4430
|
+
(r = z(e.content)) == null ? void 0 : r.map((l) => /* @__PURE__ */ s(
|
|
4431
|
+
we,
|
|
4019
4432
|
{
|
|
4020
4433
|
apiHost: e.apiHost,
|
|
4021
4434
|
isNestedRender: e.isNestedRender,
|
|
@@ -4043,7 +4456,7 @@ function oi(e) {
|
|
|
4043
4456
|
))
|
|
4044
4457
|
] }) : null,
|
|
4045
4458
|
/* @__PURE__ */ s(
|
|
4046
|
-
|
|
4459
|
+
we,
|
|
4047
4460
|
{
|
|
4048
4461
|
apiHost: e.apiHost,
|
|
4049
4462
|
nonce: e.nonce,
|
|
@@ -4070,13 +4483,13 @@ function oi(e) {
|
|
|
4070
4483
|
)
|
|
4071
4484
|
] });
|
|
4072
4485
|
}
|
|
4073
|
-
const
|
|
4486
|
+
const hi = async ({
|
|
4074
4487
|
builderContextValue: e,
|
|
4075
4488
|
symbol: t
|
|
4076
4489
|
}) => {
|
|
4077
4490
|
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
4078
4491
|
(e != null && e.apiKey))
|
|
4079
|
-
return
|
|
4492
|
+
return Ee({
|
|
4080
4493
|
model: t.model,
|
|
4081
4494
|
apiKey: e.apiKey,
|
|
4082
4495
|
apiVersion: e.apiVersion,
|
|
@@ -4086,11 +4499,11 @@ const ai = async ({
|
|
|
4086
4499
|
}
|
|
4087
4500
|
}
|
|
4088
4501
|
}).catch((n) => {
|
|
4089
|
-
|
|
4502
|
+
Q.error("Could not fetch symbol content: ", n);
|
|
4090
4503
|
});
|
|
4091
4504
|
};
|
|
4092
|
-
function
|
|
4093
|
-
var l,
|
|
4505
|
+
function gi(e) {
|
|
4506
|
+
var l, u, c, h;
|
|
4094
4507
|
function t() {
|
|
4095
4508
|
return "div";
|
|
4096
4509
|
}
|
|
@@ -4098,31 +4511,31 @@ function ri(e) {
|
|
|
4098
4511
|
return "div";
|
|
4099
4512
|
}
|
|
4100
4513
|
function i() {
|
|
4101
|
-
var
|
|
4514
|
+
var g, f;
|
|
4102
4515
|
return [
|
|
4103
|
-
e.attributes[
|
|
4516
|
+
e.attributes[q()],
|
|
4104
4517
|
"builder-symbol",
|
|
4105
|
-
(
|
|
4106
|
-
(
|
|
4518
|
+
(g = e.symbol) != null && g.inline ? "builder-inline-symbol" : void 0,
|
|
4519
|
+
(f = e.symbol) != null && f.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
4107
4520
|
].filter(Boolean).join(" ");
|
|
4108
4521
|
}
|
|
4109
|
-
const [o, a] =
|
|
4110
|
-
var
|
|
4111
|
-
return (
|
|
4522
|
+
const [o, a] = E(() => {
|
|
4523
|
+
var g;
|
|
4524
|
+
return (g = e.symbol) == null ? void 0 : g.content;
|
|
4112
4525
|
});
|
|
4113
4526
|
function r() {
|
|
4114
|
-
o ||
|
|
4527
|
+
o || hi({
|
|
4115
4528
|
symbol: e.symbol,
|
|
4116
4529
|
builderContextValue: e.builderContext
|
|
4117
|
-
}).then((
|
|
4118
|
-
|
|
4530
|
+
}).then((g) => {
|
|
4531
|
+
g && a(g);
|
|
4119
4532
|
});
|
|
4120
4533
|
}
|
|
4121
|
-
return
|
|
4122
|
-
}, []),
|
|
4534
|
+
return N(() => {
|
|
4535
|
+
}, []), N(() => {
|
|
4123
4536
|
r();
|
|
4124
4537
|
}, [e.symbol]), /* @__PURE__ */ s("div", { ...e.attributes, className: i(), children: /* @__PURE__ */ s(
|
|
4125
|
-
|
|
4538
|
+
fi,
|
|
4126
4539
|
{
|
|
4127
4540
|
nonce: e.builderContext.nonce,
|
|
4128
4541
|
isNestedRender: !0,
|
|
@@ -4134,7 +4547,7 @@ function ri(e) {
|
|
|
4134
4547
|
},
|
|
4135
4548
|
customComponents: Object.values(e.builderComponents),
|
|
4136
4549
|
data: {
|
|
4137
|
-
...(
|
|
4550
|
+
...(u = e.symbol) == null ? void 0 : u.data,
|
|
4138
4551
|
...e.builderContext.localState,
|
|
4139
4552
|
...(c = o == null ? void 0 : o.data) == null ? void 0 : c.state
|
|
4140
4553
|
},
|
|
@@ -4148,15 +4561,16 @@ function ri(e) {
|
|
|
4148
4561
|
) });
|
|
4149
4562
|
}
|
|
4150
4563
|
export {
|
|
4151
|
-
|
|
4564
|
+
D as Blocks,
|
|
4152
4565
|
le as BuilderContext,
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4566
|
+
nt as Button,
|
|
4567
|
+
Kt as Columns,
|
|
4568
|
+
fi as Content,
|
|
4569
|
+
Jt as Fragment,
|
|
4157
4570
|
Yt as Image,
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4571
|
+
Xt as Section,
|
|
4572
|
+
gi as Symbol,
|
|
4573
|
+
kn as Text,
|
|
4574
|
+
Mn as Video,
|
|
4575
|
+
Si as setClientUserAttributes
|
|
4162
4576
|
};
|