@builder.io/sdk-react 1.0.17 → 1.0.19-dev-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/blocks-exports.cjs +14 -14
- package/lib/browser/blocks-exports.mjs +350 -339
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +22 -21
- package/lib/browser/init.cjs +1 -0
- package/lib/browser/init.mjs +13 -0
- package/lib/browser/{server-entry-a7b75909.cjs → server-entry-1a86f409.cjs} +1 -1
- package/lib/browser/{server-entry-064a8b7f.js → server-entry-cfff49d1.js} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{blocks-1f59d1c0.cjs → blocks-0397d1b3.cjs} +9 -9
- package/lib/edge/{blocks-fe027bf7.js → blocks-055d1c68.js} +209 -223
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +27 -13
- package/lib/edge/{button-8fdd068a.js → button-14d13356.js} +3 -3
- package/lib/edge/{button-36ac5d97.cjs → button-58695538.cjs} +1 -1
- package/lib/edge/{columns-4f789807.js → columns-41560f8a.js} +48 -47
- package/lib/edge/columns-88c413d0.cjs +28 -0
- package/lib/edge/{content-variants-a26825d5.js → content-variants-8d6bee85.js} +75 -75
- package/lib/edge/{content-variants-87f99284.cjs → content-variants-b0cbabea.cjs} +5 -5
- package/lib/edge/dynamic-blocks-exports.cjs +2 -0
- package/lib/edge/dynamic-blocks-exports.mjs +4 -1
- package/lib/edge/{dynamic-renderer-b29b45ca.cjs → dynamic-renderer-1c9f24c0.cjs} +1 -1
- package/lib/edge/dynamic-renderer-96ba4e48.js +8 -0
- package/lib/edge/form-489500da.cjs +1 -0
- package/lib/edge/{form-004ab04e.js → form-56a68fe5.js} +69 -58
- package/lib/edge/{get-class-prop-name-ee5eac9d.js → get-class-prop-name-859a7f60.js} +1 -1
- package/lib/edge/{get-class-prop-name-522545c4.cjs → get-class-prop-name-f1301669.cjs} +1 -1
- package/lib/edge/{image-0008c792.js → image-2cc909d9.js} +25 -25
- package/lib/edge/image-7e1361ce.cjs +17 -0
- package/lib/edge/{img-d311451e.cjs → img-0c1e53c0.cjs} +1 -1
- package/lib/edge/{img-5d36c59d.js → img-b4ff1bef.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +22 -21
- package/lib/edge/init.cjs +1 -0
- package/lib/edge/init.mjs +13 -0
- package/lib/edge/{input-34a4e538.cjs → input-2103da14.cjs} +1 -1
- package/lib/edge/{input-211240f4.js → input-c6fee09c.js} +1 -1
- package/lib/edge/{select-a425b313.cjs → select-b8ad0a4c.cjs} +1 -1
- package/lib/edge/{select-e592f42a.js → select-f260d051.js} +1 -1
- package/lib/edge/{server-entry-04a076eb.cjs → server-entry-00891f33.cjs} +1 -1
- package/lib/edge/{server-entry-633c4fab.js → server-entry-d46a218d.js} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/slot-6546a4c9.cjs +1 -0
- package/lib/edge/{slot-20e9bd0c.js → slot-6b53b8c4.js} +7 -6
- package/lib/edge/{symbol-8aa6a69b.js → symbol-324dadc8.js} +2 -2
- package/lib/edge/{symbol-441a42f8.cjs → symbol-636383eb.cjs} +1 -1
- package/lib/edge/video-64014cc4.cjs +1 -0
- package/lib/edge/{video-58c2cc8d.js → video-d02ff89b.js} +15 -15
- package/lib/node/blocks-exports.cjs +32 -72
- package/lib/node/blocks-exports.mjs +902 -1017
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +24 -22
- package/lib/node/init.cjs +1 -0
- package/lib/node/init.mjs +9 -0
- package/lib/node/node-runtime-1ca09d03.js +137 -0
- package/lib/node/node-runtime-87cf9b13.cjs +41 -0
- package/lib/node/{server-entry-a2617044.js → server-entry-8c84ddbd.js} +1 -1
- package/lib/node/{server-entry-e66a06c7.cjs → server-entry-ff6fc2b4.cjs} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +6 -1
- package/types/blocks/form/component-info.d.ts +2 -0
- package/types/blocks/form/form.d.ts +3 -0
- package/types/blocks/input/component-info.d.ts +2 -0
- package/types/blocks/input/input.d.ts +15 -0
- package/types/blocks/select/component-info.d.ts +2 -0
- package/types/blocks/select/select.d.ts +16 -0
- package/types/blocks/submit-button/component-info.d.ts +2 -0
- package/types/blocks/submit-button/submit-button.d.ts +10 -0
- package/types/components/content/components/context-updater.d.ts +5 -0
- package/types/components/dynamic-renderer.d.ts +3 -0
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/context/index.d.ts +1 -0
- package/types/functions/evaluate/node-runtime/init.d.ts +10 -0
- package/types/functions/evaluate/node-runtime/node-runtime.d.ts +6 -0
- package/types/functions/get-content/types.d.ts +3 -3
- package/types/functions/get-react-native-block-styles.d.ts +15 -0
- package/types/functions/sanitize-react-native-block-styles.d.ts +3 -0
- package/types/functions/sanitize-rn-allowed-css.d.ts +8 -0
- package/types/index-helpers/blocks-exports.d.ts +4 -0
- package/types/node-runtime/index.d.ts +1 -0
- package/types/node-runtime/node-runtime.d.ts +9 -0
- package/types/node-runtime.d.ts +1 -0
- package/lib/edge/columns-36bdc015.cjs +0 -28
- package/lib/edge/dynamic-renderer-8b343325.js +0 -8
- package/lib/edge/form-6b599bb9.cjs +0 -1
- package/lib/edge/image-ee3dd857.cjs +0 -17
- package/lib/edge/slot-1547b467.cjs +0 -1
- package/lib/edge/video-e20dcbbc.cjs +0 -1
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { TARGET,
|
|
7
|
-
import { createContext, useState, useEffect, useContext, useRef, createElement } from "react";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
var Le = Object.defineProperty;
|
|
3
|
+
var De = (e, t, n) => t in e ? Le(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
4
|
+
var ee = (e, t, n) => (De(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
5
|
+
import { jsx as l, Fragment as g, jsxs as B } from "react/jsx-runtime";
|
|
6
|
+
import { TARGET as q, checkIsDefined as J, logger as U, isBrowser as Y, fastClone as oe, isEditing as F, registerInsertMenu as Me, setupBrowserForEditing as je, createRegisterComponentMessage as Oe, getDefaultCanTrack as G, _track as ue, isPreviewing as Ue, fetchOneEntry as ve, createEditorListener as He, fetch as Ke, serializeComponentInfo as me, handleABTestingSync as qe } from "./server-entry-8c84ddbd.js";
|
|
7
|
+
import { createContext as ke, useState as C, useEffect as V, useContext as fe, useRef as X, createElement as Ce } from "react";
|
|
8
|
+
import { getFunctionArguments as _e, runInNode as ze, parseCode as Je, getBuilderGlobals as Ye, set as we } from "./node-runtime-1ca09d03.js";
|
|
9
|
+
const Ge = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), Qe = (e) => typeof e == "string" && Ge.has(e.toLowerCase());
|
|
10
|
+
function ae(e) {
|
|
11
|
+
return /* @__PURE__ */ l(g, { children: Qe(e.TagName) ? /* @__PURE__ */ l(g, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ l(g, { children: typeof e.TagName == "string" ? /* @__PURE__ */ l(g, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) : /* @__PURE__ */ l(g, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) }) });
|
|
12
|
+
}
|
|
13
|
+
const H = () => {
|
|
14
|
+
switch (q) {
|
|
14
15
|
case "react":
|
|
15
16
|
case "reactNative":
|
|
16
17
|
case "rsc":
|
|
@@ -22,13 +23,13 @@ const getClassPropName = () => {
|
|
|
22
23
|
return "class";
|
|
23
24
|
}
|
|
24
25
|
};
|
|
25
|
-
function
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
|
|
26
|
+
function Xe(e) {
|
|
27
|
+
return /* @__PURE__ */ l(
|
|
28
|
+
ae,
|
|
28
29
|
{
|
|
29
30
|
attributes: {
|
|
30
31
|
...e.attributes,
|
|
31
|
-
[
|
|
32
|
+
[H()]: `${e.link ? "" : "builder-button"} ${e.attributes[H()] || ""}`,
|
|
32
33
|
...e.link ? {
|
|
33
34
|
href: e.link,
|
|
34
35
|
target: e.openLinkInNewTab ? "_blank" : void 0,
|
|
@@ -43,7 +44,7 @@ function Button(e) {
|
|
|
43
44
|
}
|
|
44
45
|
);
|
|
45
46
|
}
|
|
46
|
-
const
|
|
47
|
+
const re = ke({
|
|
47
48
|
content: null,
|
|
48
49
|
context: {},
|
|
49
50
|
localState: void 0,
|
|
@@ -56,8 +57,8 @@ const builderContext = createContext({
|
|
|
56
57
|
inheritedStyles: {},
|
|
57
58
|
BlocksWrapper: "div",
|
|
58
59
|
BlocksWrapperProps: {}
|
|
59
|
-
}),
|
|
60
|
-
function
|
|
60
|
+
}), Ie = ke({ registeredComponents: {} });
|
|
61
|
+
function Ze(e) {
|
|
61
62
|
var t;
|
|
62
63
|
return {
|
|
63
64
|
...(t = e.component) == null ? void 0 : t.options,
|
|
@@ -68,47 +69,28 @@ function getBlockComponentOptions(e) {
|
|
|
68
69
|
builderBlock: e
|
|
69
70
|
};
|
|
70
71
|
}
|
|
71
|
-
const
|
|
72
|
-
builder: e,
|
|
73
|
-
context: t,
|
|
74
|
-
event: n,
|
|
75
|
-
state: i
|
|
76
|
-
}) => Object.entries({
|
|
77
|
-
state: i,
|
|
78
|
-
Builder: e,
|
|
79
|
-
// legacy
|
|
80
|
-
builder: e,
|
|
81
|
-
context: t,
|
|
82
|
-
event: n
|
|
83
|
-
}), getBuilderGlobals = () => ({
|
|
84
|
-
isEditing: isEditing(),
|
|
85
|
-
isBrowser: isBrowser(),
|
|
86
|
-
isServer: !isBrowser(),
|
|
87
|
-
getUserAttributes: () => getUserAttributes()
|
|
88
|
-
}), parseCode = (e, {
|
|
89
|
-
isExpression: t = !0
|
|
90
|
-
}) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e, runInBrowser = ({
|
|
72
|
+
const et = ({
|
|
91
73
|
code: e,
|
|
92
74
|
builder: t,
|
|
93
75
|
context: n,
|
|
94
76
|
event: i,
|
|
95
77
|
localState: o,
|
|
96
|
-
rootSetState:
|
|
97
|
-
rootState:
|
|
78
|
+
rootSetState: r,
|
|
79
|
+
rootState: a
|
|
98
80
|
}) => {
|
|
99
|
-
const s =
|
|
81
|
+
const s = _e({
|
|
100
82
|
builder: t,
|
|
101
83
|
context: n,
|
|
102
84
|
event: i,
|
|
103
|
-
state:
|
|
104
|
-
rootState:
|
|
85
|
+
state: Te({
|
|
86
|
+
rootState: a,
|
|
105
87
|
localState: o,
|
|
106
|
-
rootSetState:
|
|
88
|
+
rootSetState: r
|
|
107
89
|
})
|
|
108
90
|
});
|
|
109
|
-
return new Function(...s.map(([
|
|
91
|
+
return new Function(...s.map(([d]) => d), e)(...s.map(([, d]) => d));
|
|
110
92
|
};
|
|
111
|
-
function
|
|
93
|
+
function Te({
|
|
112
94
|
rootState: e,
|
|
113
95
|
localState: t,
|
|
114
96
|
rootSetState: n
|
|
@@ -117,138 +99,33 @@ function flattenState({
|
|
|
117
99
|
get: (i, o) => {
|
|
118
100
|
if (t && o in t)
|
|
119
101
|
return t[o];
|
|
120
|
-
const
|
|
121
|
-
return typeof
|
|
122
|
-
rootState:
|
|
102
|
+
const r = i[o];
|
|
103
|
+
return typeof r == "object" && r !== null ? Te({
|
|
104
|
+
rootState: r,
|
|
123
105
|
localState: void 0,
|
|
124
|
-
rootSetState: n ? (
|
|
125
|
-
i[o] =
|
|
106
|
+
rootSetState: n ? (a) => {
|
|
107
|
+
i[o] = a, n(i);
|
|
126
108
|
} : void 0
|
|
127
|
-
}) :
|
|
109
|
+
}) : r;
|
|
128
110
|
},
|
|
129
|
-
set: (i, o,
|
|
111
|
+
set: (i, o, r) => {
|
|
130
112
|
if (t && o in t)
|
|
131
113
|
throw new Error("Writing to local state is not allowed as it is read-only.");
|
|
132
|
-
return i[o] =
|
|
114
|
+
return i[o] = r, n == null || n(i), !0;
|
|
133
115
|
}
|
|
134
116
|
});
|
|
135
117
|
}
|
|
136
|
-
|
|
137
|
-
if (Object(e) !== e)
|
|
138
|
-
return e;
|
|
139
|
-
const i = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
140
|
-
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;
|
|
141
|
-
}, noop = () => {
|
|
142
|
-
};
|
|
143
|
-
let safeDynamicRequire = noop;
|
|
144
|
-
try {
|
|
145
|
-
safeDynamicRequire = eval("require");
|
|
146
|
-
} catch (e) {
|
|
147
|
-
}
|
|
148
|
-
const getSyncValName = (e) => `bldr_${e}_sync`, BUILDER_SET_STATE_NAME = "BUILDER_SET_STATE", INJECTED_IVM_GLOBAL = "BUILDER_IVM", REF_TO_PROXY_FN = `
|
|
149
|
-
var refToProxy = (obj) => {
|
|
150
|
-
if (typeof obj !== 'object' || obj === null) {
|
|
151
|
-
return obj;
|
|
152
|
-
}
|
|
153
|
-
return new Proxy({}, {
|
|
154
|
-
get(target, key) {
|
|
155
|
-
if (key === 'copySync') {
|
|
156
|
-
return () => obj.copySync();
|
|
157
|
-
}
|
|
158
|
-
const val = obj.getSync(key);
|
|
159
|
-
if (typeof val?.getSync === 'function') {
|
|
160
|
-
return refToProxy(val);
|
|
161
|
-
}
|
|
162
|
-
return val;
|
|
163
|
-
},
|
|
164
|
-
set(target, key, value) {
|
|
165
|
-
const v = typeof value === 'object' ? new ${INJECTED_IVM_GLOBAL}.Reference(value) : value;
|
|
166
|
-
obj.setSync(key, v);
|
|
167
|
-
${BUILDER_SET_STATE_NAME}(key, value)
|
|
168
|
-
},
|
|
169
|
-
deleteProperty(target, key) {
|
|
170
|
-
obj.deleteSync(key);
|
|
171
|
-
}
|
|
172
|
-
})
|
|
173
|
-
}
|
|
174
|
-
`, processCode = ({
|
|
175
|
-
code: e,
|
|
176
|
-
args: t
|
|
177
|
-
}) => {
|
|
178
|
-
const n = t.map(([i]) => `var ${i} = refToProxy(${getSyncValName(i)}); `).join("");
|
|
179
|
-
return `
|
|
180
|
-
${REF_TO_PROXY_FN}
|
|
181
|
-
${n}
|
|
182
|
-
function theFunction() {
|
|
183
|
-
${e}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
let output = theFunction()
|
|
187
|
-
|
|
188
|
-
if (typeof output === 'object' && output !== null) {
|
|
189
|
-
output = JSON.stringify(output.copySync ? output.copySync() : output);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
output;
|
|
193
|
-
`;
|
|
194
|
-
}, getIsolateContext = () => {
|
|
195
|
-
const e = safeDynamicRequire("isolated-vm");
|
|
196
|
-
return new e.Isolate({
|
|
197
|
-
memoryLimit: 128
|
|
198
|
-
}).createContextSync();
|
|
199
|
-
}, runInNode = ({
|
|
200
|
-
code: e,
|
|
201
|
-
builder: t,
|
|
202
|
-
context: n,
|
|
203
|
-
event: i,
|
|
204
|
-
localState: o,
|
|
205
|
-
rootSetState: a,
|
|
206
|
-
rootState: r
|
|
207
|
-
}) => {
|
|
208
|
-
const s = safeDynamicRequire("isolated-vm"), c = fastClone({
|
|
209
|
-
...r,
|
|
210
|
-
...o
|
|
211
|
-
}), l = getFunctionArguments({
|
|
212
|
-
builder: t,
|
|
213
|
-
context: n,
|
|
214
|
-
event: i,
|
|
215
|
-
state: c
|
|
216
|
-
}), u = getIsolateContext(), m = u.global;
|
|
217
|
-
m.setSync("global", m.derefInto()), m.setSync("log", function(...y) {
|
|
218
|
-
console.log(...y);
|
|
219
|
-
}), m.setSync(BUILDER_SET_STATE_NAME, function(y, p) {
|
|
220
|
-
set(r, y, p), a == null || a(r);
|
|
221
|
-
}), l.forEach(([y, p]) => {
|
|
222
|
-
const k = typeof p == "object" ? new s.Reference(
|
|
223
|
-
// workaround: methods with default values for arguments is not being cloned over
|
|
224
|
-
y === "builder" ? {
|
|
225
|
-
...p,
|
|
226
|
-
getUserAttributes: () => p.getUserAttributes()
|
|
227
|
-
} : p
|
|
228
|
-
) : null;
|
|
229
|
-
m.setSync(getSyncValName(y), k);
|
|
230
|
-
}), m.setSync(INJECTED_IVM_GLOBAL, s);
|
|
231
|
-
const g = processCode({
|
|
232
|
-
code: e,
|
|
233
|
-
args: l
|
|
234
|
-
}), h = u.evalSync(g);
|
|
235
|
-
try {
|
|
236
|
-
return JSON.parse(h);
|
|
237
|
-
} catch {
|
|
238
|
-
return h;
|
|
239
|
-
}
|
|
240
|
-
};
|
|
241
|
-
function isNodeRuntime() {
|
|
118
|
+
function tt() {
|
|
242
119
|
var e;
|
|
243
|
-
return typeof process != "undefined" &&
|
|
120
|
+
return typeof process != "undefined" && J((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
|
|
244
121
|
}
|
|
245
|
-
const
|
|
122
|
+
const nt = () => {
|
|
246
123
|
var i;
|
|
247
|
-
if (!
|
|
124
|
+
if (!tt())
|
|
248
125
|
return !1;
|
|
249
126
|
const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (i = process.env.NODE_OPTIONS) == null ? void 0 : i.includes("--no-node-snapshot");
|
|
250
|
-
return e && t && !n ? (
|
|
251
|
-
},
|
|
127
|
+
return e && t && !n ? (U.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;
|
|
128
|
+
}, it = (e) => Y() || nt() ? et(e) : ze(e), A = class A {
|
|
252
129
|
static getCacheKey(t) {
|
|
253
130
|
return JSON.stringify({
|
|
254
131
|
...t,
|
|
@@ -258,64 +135,61 @@ const shouldForceBrowserRuntimeInNode = () => {
|
|
|
258
135
|
});
|
|
259
136
|
}
|
|
260
137
|
static getCachedValue(t) {
|
|
261
|
-
return
|
|
138
|
+
return A.cache.get(t);
|
|
262
139
|
}
|
|
263
140
|
static setCachedValue(t, n) {
|
|
264
|
-
|
|
141
|
+
A.cache.size > 20 && A.cache.delete(A.cache.keys().next().value), A.cache.set(t, {
|
|
265
142
|
value: n
|
|
266
143
|
});
|
|
267
144
|
}
|
|
268
145
|
};
|
|
269
|
-
|
|
270
|
-
let
|
|
271
|
-
function
|
|
146
|
+
ee(A, "cacheLimit", 20), ee(A, "cache", /* @__PURE__ */ new Map());
|
|
147
|
+
let j = A;
|
|
148
|
+
function K({
|
|
272
149
|
code: e,
|
|
273
150
|
context: t,
|
|
274
151
|
localState: n,
|
|
275
152
|
rootState: i,
|
|
276
153
|
rootSetState: o,
|
|
277
|
-
event:
|
|
278
|
-
isExpression:
|
|
154
|
+
event: r,
|
|
155
|
+
isExpression: a = !0,
|
|
279
156
|
enableCache: s
|
|
280
157
|
}) {
|
|
281
158
|
if (e === "") {
|
|
282
|
-
|
|
159
|
+
U.warn("Skipping evaluation of empty code block.");
|
|
283
160
|
return;
|
|
284
161
|
}
|
|
285
|
-
const
|
|
286
|
-
code:
|
|
287
|
-
isExpression:
|
|
162
|
+
const d = {
|
|
163
|
+
code: Je(e, {
|
|
164
|
+
isExpression: a
|
|
288
165
|
}),
|
|
289
|
-
builder:
|
|
166
|
+
builder: Ye(),
|
|
290
167
|
context: t,
|
|
291
|
-
event:
|
|
168
|
+
event: r,
|
|
292
169
|
rootSetState: o,
|
|
293
170
|
rootState: i,
|
|
294
171
|
localState: n
|
|
295
172
|
};
|
|
296
173
|
if (s) {
|
|
297
|
-
const
|
|
298
|
-
if (
|
|
299
|
-
return
|
|
174
|
+
const c = j.getCacheKey(d), m = j.getCachedValue(c);
|
|
175
|
+
if (m)
|
|
176
|
+
return m.value;
|
|
300
177
|
}
|
|
301
178
|
try {
|
|
302
|
-
const
|
|
179
|
+
const c = it(d);
|
|
303
180
|
if (s) {
|
|
304
|
-
const
|
|
305
|
-
|
|
181
|
+
const m = j.getCacheKey(d);
|
|
182
|
+
j.setCachedValue(m, c);
|
|
306
183
|
}
|
|
307
|
-
return
|
|
308
|
-
} catch (
|
|
309
|
-
|
|
184
|
+
return c;
|
|
185
|
+
} catch (c) {
|
|
186
|
+
U.error("Failed code evaluation: " + c.message, {
|
|
310
187
|
code: e
|
|
311
188
|
});
|
|
312
189
|
return;
|
|
313
190
|
}
|
|
314
191
|
}
|
|
315
|
-
|
|
316
|
-
return e;
|
|
317
|
-
}
|
|
318
|
-
const evaluateBindings = ({
|
|
192
|
+
const ot = ({
|
|
319
193
|
block: e,
|
|
320
194
|
context: t,
|
|
321
195
|
localState: n,
|
|
@@ -324,202 +198,202 @@ const evaluateBindings = ({
|
|
|
324
198
|
}) => {
|
|
325
199
|
if (!e.bindings)
|
|
326
200
|
return e;
|
|
327
|
-
const
|
|
328
|
-
...
|
|
201
|
+
const r = oe(e), a = {
|
|
202
|
+
...r,
|
|
329
203
|
properties: {
|
|
330
|
-
...
|
|
204
|
+
...r.properties
|
|
331
205
|
},
|
|
332
206
|
actions: {
|
|
333
|
-
...
|
|
207
|
+
...r.actions
|
|
334
208
|
}
|
|
335
209
|
};
|
|
336
210
|
for (const s in e.bindings) {
|
|
337
|
-
const
|
|
338
|
-
code:
|
|
211
|
+
const d = e.bindings[s], c = K({
|
|
212
|
+
code: d,
|
|
339
213
|
localState: n,
|
|
340
214
|
rootState: i,
|
|
341
215
|
rootSetState: o,
|
|
342
216
|
context: t,
|
|
343
217
|
enableCache: !0
|
|
344
218
|
});
|
|
345
|
-
|
|
219
|
+
we(a, s, c);
|
|
346
220
|
}
|
|
347
|
-
return
|
|
221
|
+
return a;
|
|
348
222
|
};
|
|
349
|
-
function
|
|
223
|
+
function Q({
|
|
350
224
|
block: e,
|
|
351
225
|
context: t,
|
|
352
226
|
shouldEvaluateBindings: n,
|
|
353
227
|
localState: i,
|
|
354
228
|
rootState: o,
|
|
355
|
-
rootSetState:
|
|
229
|
+
rootSetState: r
|
|
356
230
|
}) {
|
|
357
|
-
const
|
|
358
|
-
return n ?
|
|
359
|
-
block:
|
|
231
|
+
const a = e;
|
|
232
|
+
return n ? ot({
|
|
233
|
+
block: a,
|
|
360
234
|
localState: i,
|
|
361
235
|
rootState: o,
|
|
362
|
-
rootSetState:
|
|
236
|
+
rootSetState: r,
|
|
363
237
|
context: t
|
|
364
|
-
}) :
|
|
238
|
+
}) : a;
|
|
365
239
|
}
|
|
366
|
-
function
|
|
367
|
-
let i, o,
|
|
368
|
-
const
|
|
369
|
-
s = n.leading === !1 ? 0 : Date.now(),
|
|
240
|
+
function at(e, t, n = {}) {
|
|
241
|
+
let i, o, r, a = null, s = 0;
|
|
242
|
+
const d = function() {
|
|
243
|
+
s = n.leading === !1 ? 0 : Date.now(), a = null, r = e.apply(i, o), a || (i = o = null);
|
|
370
244
|
};
|
|
371
245
|
return function() {
|
|
372
|
-
const
|
|
373
|
-
!s && n.leading === !1 && (s =
|
|
374
|
-
const
|
|
375
|
-
return i = this, o = arguments,
|
|
246
|
+
const c = Date.now();
|
|
247
|
+
!s && n.leading === !1 && (s = c);
|
|
248
|
+
const m = t - (c - s);
|
|
249
|
+
return i = this, o = arguments, m <= 0 || m > t ? (a && (clearTimeout(a), a = null), s = c, r = e.apply(i, o), a || (i = o = null)) : !a && n.trailing !== !1 && (a = setTimeout(d, m)), r;
|
|
376
250
|
};
|
|
377
251
|
}
|
|
378
|
-
function
|
|
252
|
+
function D(e, ...t) {
|
|
379
253
|
const n = Object(e);
|
|
380
254
|
for (let i = 1; i < arguments.length; i++) {
|
|
381
255
|
const o = arguments[i];
|
|
382
256
|
if (o != null)
|
|
383
|
-
for (const
|
|
384
|
-
Object.prototype.hasOwnProperty.call(o,
|
|
257
|
+
for (const r in o)
|
|
258
|
+
Object.prototype.hasOwnProperty.call(o, r) && (n[r] = o[r]);
|
|
385
259
|
}
|
|
386
260
|
return n;
|
|
387
261
|
}
|
|
388
|
-
const
|
|
389
|
-
function
|
|
262
|
+
const le = (e) => e ? e.replace(/([A-Z])/g, (t) => `-${t[0].toLowerCase()}`) : "";
|
|
263
|
+
function rt(e) {
|
|
390
264
|
for (const t of e)
|
|
391
265
|
switch (t.trigger) {
|
|
392
266
|
case "pageLoad":
|
|
393
|
-
|
|
267
|
+
Ee(t);
|
|
394
268
|
break;
|
|
395
269
|
case "hover":
|
|
396
|
-
|
|
270
|
+
st(t);
|
|
397
271
|
break;
|
|
398
272
|
case "scrollInView":
|
|
399
|
-
|
|
273
|
+
ct(t);
|
|
400
274
|
break;
|
|
401
275
|
}
|
|
402
276
|
}
|
|
403
|
-
function
|
|
277
|
+
function se(e) {
|
|
404
278
|
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
405
279
|
}
|
|
406
|
-
function
|
|
407
|
-
const n =
|
|
408
|
-
for (const s of
|
|
409
|
-
for (const
|
|
410
|
-
|
|
280
|
+
function ce(e, t) {
|
|
281
|
+
const n = lt(e), i = getComputedStyle(t), o = e.steps[0].styles, r = e.steps[e.steps.length - 1].styles, a = [o, r];
|
|
282
|
+
for (const s of a)
|
|
283
|
+
for (const d of n)
|
|
284
|
+
d in s || (s[d] = i[d]);
|
|
411
285
|
}
|
|
412
|
-
function
|
|
286
|
+
function lt(e) {
|
|
413
287
|
const t = [];
|
|
414
288
|
for (const n of e.steps)
|
|
415
289
|
for (const i in n.styles)
|
|
416
290
|
t.indexOf(i) === -1 && t.push(i);
|
|
417
291
|
return t;
|
|
418
292
|
}
|
|
419
|
-
function
|
|
293
|
+
function Ee(e) {
|
|
420
294
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
421
295
|
if (!t.length) {
|
|
422
|
-
|
|
296
|
+
se(e.elementId || e.id || "");
|
|
423
297
|
return;
|
|
424
298
|
}
|
|
425
299
|
Array.from(t).forEach((n) => {
|
|
426
|
-
|
|
427
|
-
n.style.transition = `all ${e.duration}s ${
|
|
300
|
+
ce(e, n), n.style.transition = "none", n.style.transitionDelay = "0", D(n.style, e.steps[0].styles), setTimeout(() => {
|
|
301
|
+
n.style.transition = `all ${e.duration}s ${le(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), D(n.style, e.steps[1].styles), setTimeout(() => {
|
|
428
302
|
n.style.transition = "", n.style.transitionDelay = "";
|
|
429
303
|
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
430
304
|
});
|
|
431
305
|
});
|
|
432
306
|
}
|
|
433
|
-
function
|
|
307
|
+
function st(e) {
|
|
434
308
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
435
309
|
if (!t.length) {
|
|
436
|
-
|
|
310
|
+
se(e.elementId || e.id || "");
|
|
437
311
|
return;
|
|
438
312
|
}
|
|
439
313
|
Array.from(t).forEach((n) => {
|
|
440
|
-
|
|
314
|
+
ce(e, n);
|
|
441
315
|
const i = e.steps[0].styles, o = e.steps[1].styles;
|
|
442
|
-
function a() {
|
|
443
|
-
assign(n.style, i);
|
|
444
|
-
}
|
|
445
316
|
function r() {
|
|
446
|
-
|
|
317
|
+
D(n.style, i);
|
|
447
318
|
}
|
|
448
|
-
|
|
449
|
-
|
|
319
|
+
function a() {
|
|
320
|
+
D(n.style, o);
|
|
321
|
+
}
|
|
322
|
+
r(), n.addEventListener("mouseenter", a), n.addEventListener("mouseleave", r), setTimeout(() => {
|
|
323
|
+
n.style.transition = `all ${e.duration}s ${le(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
450
324
|
});
|
|
451
325
|
});
|
|
452
326
|
}
|
|
453
|
-
function
|
|
327
|
+
function ct(e) {
|
|
454
328
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
455
329
|
if (!t.length) {
|
|
456
|
-
|
|
330
|
+
se(e.elementId || e.id || "");
|
|
457
331
|
return;
|
|
458
332
|
}
|
|
459
333
|
Array.from(t).forEach((n) => {
|
|
460
|
-
|
|
334
|
+
ce(e, n);
|
|
461
335
|
let i = !1, o = !1;
|
|
462
|
-
function
|
|
336
|
+
function r() {
|
|
463
337
|
!i && s(n) ? (i = !0, o = !0, setTimeout(() => {
|
|
464
|
-
|
|
338
|
+
D(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", a), setTimeout(() => {
|
|
465
339
|
o = !1, e.repeat || (n.style.transition = "", n.style.transitionDelay = "");
|
|
466
340
|
}, (e.duration + (e.delay || 0)) * 1e3 + 100);
|
|
467
|
-
})) : e.repeat && i && !o && !s(n) && (i = !1,
|
|
341
|
+
})) : e.repeat && i && !o && !s(n) && (i = !1, D(n.style, e.steps[0].styles));
|
|
468
342
|
}
|
|
469
|
-
const
|
|
343
|
+
const a = at(r, 200, {
|
|
470
344
|
leading: !1
|
|
471
345
|
});
|
|
472
|
-
function s(
|
|
473
|
-
const
|
|
474
|
-
return
|
|
346
|
+
function s(m) {
|
|
347
|
+
const f = m.getBoundingClientRect(), b = window.innerHeight, v = (e.thresholdPercent || 0) / 100 * b;
|
|
348
|
+
return f.bottom > v && f.top < b - v;
|
|
475
349
|
}
|
|
476
|
-
const
|
|
477
|
-
function
|
|
478
|
-
|
|
350
|
+
const d = e.steps[0].styles;
|
|
351
|
+
function c() {
|
|
352
|
+
D(n.style, d);
|
|
479
353
|
}
|
|
480
|
-
|
|
481
|
-
n.style.transition = `all ${e.duration}s ${
|
|
482
|
-
}), document.addEventListener("scroll",
|
|
354
|
+
c(), setTimeout(() => {
|
|
355
|
+
n.style.transition = `all ${e.duration}s ${le(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
356
|
+
}), document.addEventListener("scroll", a, {
|
|
483
357
|
capture: !0,
|
|
484
358
|
passive: !0
|
|
485
|
-
}),
|
|
359
|
+
}), r();
|
|
486
360
|
});
|
|
487
361
|
}
|
|
488
|
-
const
|
|
362
|
+
const dt = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), Re = (e) => Object.entries(e).map(([n, i]) => {
|
|
489
363
|
if (typeof i == "string")
|
|
490
|
-
return `${
|
|
491
|
-
}).filter(
|
|
492
|
-
`),
|
|
364
|
+
return `${dt(n)}: ${i};`;
|
|
365
|
+
}).filter(J), ut = (e) => Re(e).join(`
|
|
366
|
+
`), te = ({
|
|
493
367
|
mediaQuery: e,
|
|
494
368
|
className: t,
|
|
495
369
|
styles: n
|
|
496
370
|
}) => {
|
|
497
371
|
const i = `.${t} {
|
|
498
|
-
${
|
|
372
|
+
${ut(n)}
|
|
499
373
|
}`;
|
|
500
374
|
return e ? `${e} {
|
|
501
375
|
${i}
|
|
502
376
|
}` : i;
|
|
503
377
|
};
|
|
504
|
-
function
|
|
378
|
+
function mt({
|
|
505
379
|
style: e
|
|
506
380
|
}) {
|
|
507
381
|
return e;
|
|
508
382
|
}
|
|
509
|
-
const
|
|
383
|
+
const ft = ({
|
|
510
384
|
block: e,
|
|
511
385
|
context: t
|
|
512
|
-
}) =>
|
|
386
|
+
}) => Pe(mt({
|
|
513
387
|
style: e.style || {},
|
|
514
388
|
context: t,
|
|
515
389
|
block: e
|
|
516
390
|
}));
|
|
517
|
-
function
|
|
518
|
-
switch (
|
|
391
|
+
function Pe(e) {
|
|
392
|
+
switch (q) {
|
|
519
393
|
case "svelte":
|
|
520
394
|
case "vue":
|
|
521
395
|
case "solid":
|
|
522
|
-
return
|
|
396
|
+
return Re(e).join(" ");
|
|
523
397
|
case "qwik":
|
|
524
398
|
case "reactNative":
|
|
525
399
|
case "react":
|
|
@@ -527,20 +401,20 @@ function mapStyleObjToStrIfNeeded(e) {
|
|
|
527
401
|
return e;
|
|
528
402
|
}
|
|
529
403
|
}
|
|
530
|
-
const
|
|
404
|
+
const ht = ({
|
|
531
405
|
block: e,
|
|
532
406
|
context: t,
|
|
533
407
|
registeredComponents: n
|
|
534
408
|
}) => {
|
|
535
|
-
var
|
|
536
|
-
const i = (
|
|
409
|
+
var r;
|
|
410
|
+
const i = (r = Q({
|
|
537
411
|
block: e,
|
|
538
412
|
localState: t.localState,
|
|
539
413
|
rootState: t.rootState,
|
|
540
414
|
rootSetState: t.rootSetState,
|
|
541
415
|
context: t.context,
|
|
542
416
|
shouldEvaluateBindings: !1
|
|
543
|
-
}).component) == null ? void 0 :
|
|
417
|
+
}).component) == null ? void 0 : r.name;
|
|
544
418
|
if (!i)
|
|
545
419
|
return null;
|
|
546
420
|
const o = n[i];
|
|
@@ -549,7 +423,7 @@ const getComponent = ({
|
|
|
549
423
|
console.warn(`
|
|
550
424
|
Could not find a registered component named "${i}".
|
|
551
425
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
552
|
-
},
|
|
426
|
+
}, gt = ({
|
|
553
427
|
block: e,
|
|
554
428
|
context: t
|
|
555
429
|
}) => {
|
|
@@ -559,7 +433,7 @@ const getComponent = ({
|
|
|
559
433
|
} = e;
|
|
560
434
|
if (!(n != null && n.collection))
|
|
561
435
|
return;
|
|
562
|
-
const o =
|
|
436
|
+
const o = K({
|
|
563
437
|
code: n.collection,
|
|
564
438
|
localState: t.localState,
|
|
565
439
|
rootState: t.rootState,
|
|
@@ -569,21 +443,21 @@ const getComponent = ({
|
|
|
569
443
|
});
|
|
570
444
|
if (!Array.isArray(o))
|
|
571
445
|
return;
|
|
572
|
-
const
|
|
573
|
-
return o.map((
|
|
446
|
+
const r = n.collection.split(".").pop(), a = n.itemName || (r ? r + "Item" : "item");
|
|
447
|
+
return o.map((d, c) => ({
|
|
574
448
|
context: {
|
|
575
449
|
...t,
|
|
576
450
|
localState: {
|
|
577
451
|
...t.localState,
|
|
578
|
-
$index:
|
|
579
|
-
$item:
|
|
580
|
-
[
|
|
581
|
-
[`$${
|
|
452
|
+
$index: c,
|
|
453
|
+
$item: d,
|
|
454
|
+
[a]: d,
|
|
455
|
+
[`$${a}Index`]: c
|
|
582
456
|
}
|
|
583
457
|
},
|
|
584
458
|
block: i
|
|
585
459
|
}));
|
|
586
|
-
},
|
|
460
|
+
}, Ve = {
|
|
587
461
|
small: {
|
|
588
462
|
min: 320,
|
|
589
463
|
default: 321,
|
|
@@ -599,11 +473,11 @@ const getComponent = ({
|
|
|
599
473
|
default: 991,
|
|
600
474
|
max: 1200
|
|
601
475
|
}
|
|
602
|
-
},
|
|
476
|
+
}, he = (e, t = Ve) => `@media (max-width: ${t[e].max}px)`, Be = ({
|
|
603
477
|
small: e,
|
|
604
478
|
medium: t
|
|
605
479
|
}) => {
|
|
606
|
-
const n =
|
|
480
|
+
const n = oe(Ve);
|
|
607
481
|
if (!e || !t)
|
|
608
482
|
return n;
|
|
609
483
|
const i = Math.floor(e / 2);
|
|
@@ -618,16 +492,16 @@ const getComponent = ({
|
|
|
618
492
|
min: o,
|
|
619
493
|
default: o + 1
|
|
620
494
|
};
|
|
621
|
-
const
|
|
495
|
+
const r = n.medium.max + 1;
|
|
622
496
|
return n.large = {
|
|
623
497
|
max: 2e3,
|
|
624
498
|
// TODO: decide upper limit
|
|
625
|
-
min:
|
|
626
|
-
default:
|
|
499
|
+
min: r,
|
|
500
|
+
default: r + 1
|
|
627
501
|
}, n;
|
|
628
502
|
};
|
|
629
|
-
function
|
|
630
|
-
return /* @__PURE__ */
|
|
503
|
+
function Z(e) {
|
|
504
|
+
return /* @__PURE__ */ l(
|
|
631
505
|
"style",
|
|
632
506
|
{
|
|
633
507
|
dangerouslySetInnerHTML: { __html: e.styles },
|
|
@@ -635,9 +509,9 @@ function InlinedStyles(e) {
|
|
|
635
509
|
}
|
|
636
510
|
);
|
|
637
511
|
}
|
|
638
|
-
function
|
|
512
|
+
function bt(e) {
|
|
639
513
|
function t() {
|
|
640
|
-
const i =
|
|
514
|
+
const i = Q({
|
|
641
515
|
block: e.block,
|
|
642
516
|
localState: e.context.localState,
|
|
643
517
|
rootState: e.context.rootState,
|
|
@@ -645,48 +519,48 @@ function BlockStyles(e) {
|
|
|
645
519
|
context: e.context.context,
|
|
646
520
|
shouldEvaluateBindings: !0
|
|
647
521
|
});
|
|
648
|
-
return
|
|
522
|
+
return J(i.hide) ? !i.hide : J(i.show) ? i.show : !0;
|
|
649
523
|
}
|
|
650
524
|
function n() {
|
|
651
|
-
var
|
|
652
|
-
const i =
|
|
525
|
+
var v;
|
|
526
|
+
const i = Q({
|
|
653
527
|
block: e.block,
|
|
654
528
|
localState: e.context.localState,
|
|
655
529
|
rootState: e.context.rootState,
|
|
656
530
|
rootSetState: e.context.rootSetState,
|
|
657
531
|
context: e.context.context,
|
|
658
532
|
shouldEvaluateBindings: !0
|
|
659
|
-
}), o = i.responsiveStyles,
|
|
660
|
-
((
|
|
661
|
-
), s = o == null ? void 0 : o.large,
|
|
662
|
-
if (!
|
|
533
|
+
}), o = i.responsiveStyles, r = e.context.content, a = Be(
|
|
534
|
+
((v = r == null ? void 0 : r.meta) == null ? void 0 : v.breakpoints) || {}
|
|
535
|
+
), s = o == null ? void 0 : o.large, d = o == null ? void 0 : o.medium, c = o == null ? void 0 : o.small, m = i.id;
|
|
536
|
+
if (!m)
|
|
663
537
|
return "";
|
|
664
|
-
const
|
|
665
|
-
className:
|
|
538
|
+
const f = s ? te({
|
|
539
|
+
className: m,
|
|
666
540
|
styles: s
|
|
667
|
-
}) : "",
|
|
668
|
-
className:
|
|
669
|
-
styles:
|
|
670
|
-
mediaQuery:
|
|
541
|
+
}) : "", b = d ? te({
|
|
542
|
+
className: m,
|
|
543
|
+
styles: d,
|
|
544
|
+
mediaQuery: he(
|
|
671
545
|
"medium",
|
|
672
|
-
|
|
546
|
+
a
|
|
673
547
|
)
|
|
674
|
-
}) : "",
|
|
675
|
-
className:
|
|
676
|
-
styles:
|
|
677
|
-
mediaQuery:
|
|
548
|
+
}) : "", p = c ? te({
|
|
549
|
+
className: m,
|
|
550
|
+
styles: c,
|
|
551
|
+
mediaQuery: he(
|
|
678
552
|
"small",
|
|
679
|
-
|
|
553
|
+
a
|
|
680
554
|
)
|
|
681
555
|
}) : "";
|
|
682
|
-
return [
|
|
556
|
+
return [f, b, p].join(" ");
|
|
683
557
|
}
|
|
684
|
-
return /* @__PURE__ */
|
|
558
|
+
return /* @__PURE__ */ l(g, { children: n() && t() ? /* @__PURE__ */ l(g, { children: /* @__PURE__ */ l(Z, { id: "builderio-block", styles: n() }) }) : null });
|
|
685
559
|
}
|
|
686
|
-
function
|
|
560
|
+
function yt(e) {
|
|
687
561
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
688
562
|
}
|
|
689
|
-
const
|
|
563
|
+
const pt = (e) => `on${yt(e)}`, xt = (e, t) => (n) => K({
|
|
690
564
|
code: e,
|
|
691
565
|
context: t.context,
|
|
692
566
|
localState: t.localState,
|
|
@@ -696,66 +570,66 @@ const getEventHandlerName = (e) => `on${capitalizeFirstLetter(e)}`, createEventH
|
|
|
696
570
|
isExpression: !1,
|
|
697
571
|
enableCache: !0
|
|
698
572
|
});
|
|
699
|
-
function
|
|
573
|
+
function We(e) {
|
|
700
574
|
var i;
|
|
701
575
|
const t = {}, n = (i = e.block.actions) != null ? i : {};
|
|
702
576
|
for (const o in n) {
|
|
703
577
|
if (!n.hasOwnProperty(o))
|
|
704
578
|
continue;
|
|
705
|
-
const
|
|
706
|
-
let
|
|
579
|
+
const r = n[o];
|
|
580
|
+
let a = pt(o);
|
|
707
581
|
if (e.stripPrefix)
|
|
708
|
-
switch (
|
|
582
|
+
switch (q) {
|
|
709
583
|
case "vue":
|
|
710
|
-
|
|
584
|
+
a = a.replace("v-on:", "");
|
|
711
585
|
break;
|
|
712
586
|
case "svelte":
|
|
713
|
-
|
|
587
|
+
a = a.replace("on:", "");
|
|
714
588
|
break;
|
|
715
589
|
}
|
|
716
|
-
t[
|
|
590
|
+
t[a] = xt(r, e);
|
|
717
591
|
}
|
|
718
592
|
return t;
|
|
719
593
|
}
|
|
720
|
-
function
|
|
594
|
+
function St({
|
|
721
595
|
properties: e
|
|
722
596
|
}) {
|
|
723
597
|
return e;
|
|
724
598
|
}
|
|
725
|
-
const
|
|
599
|
+
const vt = (e) => ({
|
|
726
600
|
href: e.href
|
|
727
601
|
});
|
|
728
|
-
function
|
|
602
|
+
function de({
|
|
729
603
|
block: e,
|
|
730
604
|
context: t
|
|
731
605
|
}) {
|
|
732
606
|
var i;
|
|
733
607
|
const n = {
|
|
734
|
-
...
|
|
608
|
+
...vt(e),
|
|
735
609
|
...e.properties,
|
|
736
610
|
"builder-id": e.id,
|
|
737
|
-
style:
|
|
611
|
+
style: ft({
|
|
738
612
|
block: e,
|
|
739
613
|
context: t
|
|
740
614
|
}),
|
|
741
|
-
[
|
|
615
|
+
[H()]: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
|
|
742
616
|
};
|
|
743
|
-
return
|
|
617
|
+
return St({
|
|
744
618
|
properties: n,
|
|
745
619
|
context: t,
|
|
746
620
|
block: e
|
|
747
621
|
});
|
|
748
622
|
}
|
|
749
|
-
function
|
|
750
|
-
return /* @__PURE__ */
|
|
751
|
-
|
|
623
|
+
function kt(e) {
|
|
624
|
+
return /* @__PURE__ */ l(
|
|
625
|
+
ae,
|
|
752
626
|
{
|
|
753
627
|
TagName: e.Wrapper,
|
|
754
|
-
attributes:
|
|
628
|
+
attributes: de({
|
|
755
629
|
block: e.block,
|
|
756
630
|
context: e.context
|
|
757
631
|
}),
|
|
758
|
-
actionAttributes:
|
|
632
|
+
actionAttributes: We({
|
|
759
633
|
block: e.block,
|
|
760
634
|
rootState: e.context.rootState,
|
|
761
635
|
rootSetState: e.context.rootSetState,
|
|
@@ -767,17 +641,17 @@ function BlockWrapper(e) {
|
|
|
767
641
|
}
|
|
768
642
|
);
|
|
769
643
|
}
|
|
770
|
-
function
|
|
771
|
-
return /* @__PURE__ */
|
|
644
|
+
function Ct(e) {
|
|
645
|
+
return /* @__PURE__ */ l(
|
|
772
646
|
e.Wrapper,
|
|
773
647
|
{
|
|
774
648
|
...e.wrapperProps,
|
|
775
649
|
attributes: e.includeBlockProps ? {
|
|
776
|
-
...
|
|
650
|
+
...de({
|
|
777
651
|
block: e.block,
|
|
778
652
|
context: e.context
|
|
779
653
|
}),
|
|
780
|
-
...
|
|
654
|
+
...We({
|
|
781
655
|
block: e.block,
|
|
782
656
|
rootState: e.context.rootState,
|
|
783
657
|
rootSetState: e.context.rootSetState,
|
|
@@ -789,14 +663,14 @@ function InteractiveElement(e) {
|
|
|
789
663
|
}
|
|
790
664
|
);
|
|
791
665
|
}
|
|
792
|
-
const
|
|
666
|
+
const wt = ({
|
|
793
667
|
componentOptions: e,
|
|
794
668
|
builderBlock: t,
|
|
795
669
|
context: n,
|
|
796
670
|
componentRef: i,
|
|
797
671
|
includeBlockProps: o,
|
|
798
|
-
isInteractive:
|
|
799
|
-
contextValue:
|
|
672
|
+
isInteractive: r,
|
|
673
|
+
contextValue: a
|
|
800
674
|
}) => {
|
|
801
675
|
const s = {
|
|
802
676
|
...e,
|
|
@@ -805,13 +679,13 @@ const getWrapperProps = ({
|
|
|
805
679
|
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
806
680
|
*/
|
|
807
681
|
...o ? {
|
|
808
|
-
attributes:
|
|
682
|
+
attributes: de({
|
|
809
683
|
block: t,
|
|
810
|
-
context:
|
|
684
|
+
context: a
|
|
811
685
|
})
|
|
812
686
|
} : {}
|
|
813
687
|
};
|
|
814
|
-
return
|
|
688
|
+
return r ? {
|
|
815
689
|
Wrapper: i,
|
|
816
690
|
block: t,
|
|
817
691
|
context: n,
|
|
@@ -819,15 +693,15 @@ const getWrapperProps = ({
|
|
|
819
693
|
includeBlockProps: o
|
|
820
694
|
} : s;
|
|
821
695
|
};
|
|
822
|
-
function
|
|
696
|
+
function ge(e) {
|
|
823
697
|
var i;
|
|
824
|
-
const [t, n] =
|
|
825
|
-
() => e.isInteractive ?
|
|
698
|
+
const [t, n] = C(
|
|
699
|
+
() => e.isInteractive ? Ct : e.componentRef
|
|
826
700
|
);
|
|
827
|
-
return /* @__PURE__ */
|
|
701
|
+
return /* @__PURE__ */ l(g, { children: e.componentRef ? /* @__PURE__ */ l(g, { children: /* @__PURE__ */ l(
|
|
828
702
|
t,
|
|
829
703
|
{
|
|
830
|
-
...
|
|
704
|
+
...wt({
|
|
831
705
|
componentOptions: e.componentOptions,
|
|
832
706
|
builderBlock: e.builderBlock,
|
|
833
707
|
context: e.context,
|
|
@@ -837,8 +711,8 @@ function ComponentRef(e) {
|
|
|
837
711
|
isInteractive: e.isInteractive,
|
|
838
712
|
contextValue: e.context
|
|
839
713
|
}),
|
|
840
|
-
children: (i = e.blockChildren) == null ? void 0 : i.map((o) => /* @__PURE__ */
|
|
841
|
-
|
|
714
|
+
children: (i = e.blockChildren) == null ? void 0 : i.map((o) => /* @__PURE__ */ l(
|
|
715
|
+
_,
|
|
842
716
|
{
|
|
843
717
|
block: o,
|
|
844
718
|
context: e.context,
|
|
@@ -850,10 +724,10 @@ function ComponentRef(e) {
|
|
|
850
724
|
}
|
|
851
725
|
) }) : null });
|
|
852
726
|
}
|
|
853
|
-
function
|
|
854
|
-
const [t, n] =
|
|
855
|
-
return /* @__PURE__ */
|
|
856
|
-
|
|
727
|
+
function It(e) {
|
|
728
|
+
const [t, n] = C(() => e.repeatContext);
|
|
729
|
+
return /* @__PURE__ */ l(re.Provider, { value: t, children: /* @__PURE__ */ l(
|
|
730
|
+
_,
|
|
857
731
|
{
|
|
858
732
|
block: e.block,
|
|
859
733
|
context: t,
|
|
@@ -862,24 +736,24 @@ function RepeatedBlock(e) {
|
|
|
862
736
|
}
|
|
863
737
|
) });
|
|
864
738
|
}
|
|
865
|
-
function
|
|
866
|
-
var
|
|
739
|
+
function _(e) {
|
|
740
|
+
var d, c, m;
|
|
867
741
|
function t() {
|
|
868
|
-
return
|
|
742
|
+
return ht({
|
|
869
743
|
block: e.block,
|
|
870
744
|
context: e.context,
|
|
871
745
|
registeredComponents: e.registeredComponents
|
|
872
746
|
});
|
|
873
747
|
}
|
|
874
748
|
function n() {
|
|
875
|
-
return
|
|
749
|
+
return gt({
|
|
876
750
|
block: e.block,
|
|
877
751
|
context: e.context
|
|
878
752
|
});
|
|
879
753
|
}
|
|
880
754
|
function i() {
|
|
881
|
-
var
|
|
882
|
-
return (
|
|
755
|
+
var f;
|
|
756
|
+
return (f = e.block.repeat) != null && f.collection ? e.block : Q({
|
|
883
757
|
block: e.block,
|
|
884
758
|
localState: e.context.localState,
|
|
885
759
|
rootState: e.context.rootState,
|
|
@@ -889,32 +763,32 @@ function Block(e) {
|
|
|
889
763
|
});
|
|
890
764
|
}
|
|
891
765
|
function o() {
|
|
892
|
-
var
|
|
893
|
-
return e.block.tagName === "a" || ((
|
|
894
|
-
}
|
|
895
|
-
function a() {
|
|
896
|
-
var h, y;
|
|
897
|
-
if ((h = e.block.repeat) != null && h.collection)
|
|
898
|
-
return !!((y = n == null ? void 0 : n()) != null && y.length);
|
|
899
|
-
const m = "hide" in i() ? i().hide : !1;
|
|
900
|
-
return ("show" in i() ? i().show : !0) && !m;
|
|
766
|
+
var b;
|
|
767
|
+
return e.block.tagName === "a" || ((b = i().properties) == null ? void 0 : b.href) || i().href ? e.linkComponent || "a" : e.block.tagName || "div";
|
|
901
768
|
}
|
|
902
769
|
function r() {
|
|
903
|
-
var
|
|
904
|
-
|
|
770
|
+
var p, v;
|
|
771
|
+
if ((p = e.block.repeat) != null && p.collection)
|
|
772
|
+
return !!((v = n == null ? void 0 : n()) != null && v.length);
|
|
773
|
+
const f = "hide" in i() ? i().hide : !1;
|
|
774
|
+
return ("show" in i() ? i().show : !0) && !f;
|
|
775
|
+
}
|
|
776
|
+
function a() {
|
|
777
|
+
var b, p;
|
|
778
|
+
return !((b = t == null ? void 0 : t()) != null && b.component) && !n() ? (p = i().children) != null ? p : [] : [];
|
|
905
779
|
}
|
|
906
780
|
function s() {
|
|
907
|
-
var
|
|
781
|
+
var f, b, p, v, w, T, R, x, I, P, E;
|
|
908
782
|
return {
|
|
909
|
-
blockChildren: (
|
|
910
|
-
componentRef: (
|
|
783
|
+
blockChildren: (f = i().children) != null ? f : [],
|
|
784
|
+
componentRef: (b = t == null ? void 0 : t()) == null ? void 0 : b.component,
|
|
911
785
|
componentOptions: {
|
|
912
|
-
...
|
|
786
|
+
...Ze(i()),
|
|
913
787
|
builderContext: e.context,
|
|
914
|
-
...((
|
|
788
|
+
...((p = t == null ? void 0 : t()) == null ? void 0 : p.name) === "Core:Button" || ((v = t == null ? void 0 : t()) == null ? void 0 : v.name) === "Symbol" || ((w = t == null ? void 0 : t()) == null ? void 0 : w.name) === "Columns" || ((T = t == null ? void 0 : t()) == null ? void 0 : T.name) === "Form:Form" ? {
|
|
915
789
|
builderLinkComponent: e.linkComponent
|
|
916
790
|
} : {},
|
|
917
|
-
...((
|
|
791
|
+
...((R = t == null ? void 0 : t()) == null ? void 0 : R.name) === "Symbol" || ((x = t == null ? void 0 : t()) == null ? void 0 : x.name) === "Columns" || ((I = t == null ? void 0 : t()) == null ? void 0 : I.name) === "Form:Form" ? {
|
|
918
792
|
builderComponents: e.registeredComponents
|
|
919
793
|
} : {}
|
|
920
794
|
},
|
|
@@ -922,22 +796,22 @@ function Block(e) {
|
|
|
922
796
|
linkComponent: e.linkComponent,
|
|
923
797
|
registeredComponents: e.registeredComponents,
|
|
924
798
|
builderBlock: i(),
|
|
925
|
-
includeBlockProps: ((
|
|
926
|
-
isInteractive: !((
|
|
799
|
+
includeBlockProps: ((P = t == null ? void 0 : t()) == null ? void 0 : P.noWrap) === !0,
|
|
800
|
+
isInteractive: !((E = t == null ? void 0 : t()) != null && E.isRSC)
|
|
927
801
|
};
|
|
928
802
|
}
|
|
929
|
-
return
|
|
930
|
-
const
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
...
|
|
934
|
-
elementId:
|
|
803
|
+
return V(() => {
|
|
804
|
+
const f = i().id, b = i().animations;
|
|
805
|
+
b && f && rt(
|
|
806
|
+
b.filter((p) => p.trigger !== "hover").map((p) => ({
|
|
807
|
+
...p,
|
|
808
|
+
elementId: f
|
|
935
809
|
}))
|
|
936
810
|
);
|
|
937
|
-
}, []), /* @__PURE__ */
|
|
938
|
-
/* @__PURE__ */
|
|
939
|
-
(
|
|
940
|
-
|
|
811
|
+
}, []), /* @__PURE__ */ l(g, { children: r() ? /* @__PURE__ */ B(g, { children: [
|
|
812
|
+
/* @__PURE__ */ l(bt, { block: e.block, context: e.context }),
|
|
813
|
+
(d = t == null ? void 0 : t()) != null && d.noWrap ? /* @__PURE__ */ l(g, { children: /* @__PURE__ */ l(
|
|
814
|
+
ge,
|
|
941
815
|
{
|
|
942
816
|
componentRef: s().componentRef,
|
|
943
817
|
componentOptions: s().componentOptions,
|
|
@@ -949,25 +823,25 @@ function Block(e) {
|
|
|
949
823
|
includeBlockProps: s().includeBlockProps,
|
|
950
824
|
isInteractive: s().isInteractive
|
|
951
825
|
}
|
|
952
|
-
) }) : /* @__PURE__ */
|
|
953
|
-
|
|
826
|
+
) }) : /* @__PURE__ */ l(g, { children: n() ? /* @__PURE__ */ l(g, { children: (m = n()) == null ? void 0 : m.map((f, b) => /* @__PURE__ */ l(
|
|
827
|
+
It,
|
|
954
828
|
{
|
|
955
|
-
repeatContext:
|
|
956
|
-
block:
|
|
829
|
+
repeatContext: f.context,
|
|
830
|
+
block: f.block,
|
|
957
831
|
registeredComponents: e.registeredComponents,
|
|
958
832
|
linkComponent: e.linkComponent
|
|
959
833
|
},
|
|
960
|
-
|
|
961
|
-
)) }) : /* @__PURE__ */
|
|
962
|
-
|
|
834
|
+
b
|
|
835
|
+
)) }) : /* @__PURE__ */ l(g, { children: /* @__PURE__ */ B(
|
|
836
|
+
kt,
|
|
963
837
|
{
|
|
964
838
|
Wrapper: o(),
|
|
965
839
|
block: i(),
|
|
966
840
|
context: e.context,
|
|
967
841
|
linkComponent: e.linkComponent,
|
|
968
842
|
children: [
|
|
969
|
-
/* @__PURE__ */
|
|
970
|
-
|
|
843
|
+
/* @__PURE__ */ l(
|
|
844
|
+
ge,
|
|
971
845
|
{
|
|
972
846
|
componentRef: s().componentRef,
|
|
973
847
|
componentOptions: s().componentOptions,
|
|
@@ -980,29 +854,29 @@ function Block(e) {
|
|
|
980
854
|
isInteractive: s().isInteractive
|
|
981
855
|
}
|
|
982
856
|
),
|
|
983
|
-
(
|
|
984
|
-
|
|
857
|
+
(c = a()) == null ? void 0 : c.map((f) => /* @__PURE__ */ l(
|
|
858
|
+
_,
|
|
985
859
|
{
|
|
986
|
-
block:
|
|
860
|
+
block: f,
|
|
987
861
|
registeredComponents: e.registeredComponents,
|
|
988
862
|
linkComponent: e.linkComponent,
|
|
989
863
|
context: e.context
|
|
990
864
|
},
|
|
991
|
-
|
|
865
|
+
f.id
|
|
992
866
|
))
|
|
993
867
|
]
|
|
994
868
|
}
|
|
995
|
-
) })
|
|
869
|
+
) }) })
|
|
996
870
|
] }) : null });
|
|
997
871
|
}
|
|
998
|
-
function
|
|
872
|
+
function Tt(e) {
|
|
999
873
|
function t() {
|
|
1000
874
|
var o;
|
|
1001
875
|
return "builder-blocks" + ((o = e.blocks) != null && o.length ? "" : " no-blocks");
|
|
1002
876
|
}
|
|
1003
877
|
function n() {
|
|
1004
|
-
var o,
|
|
1005
|
-
|
|
878
|
+
var o, r;
|
|
879
|
+
F() && !((o = e.blocks) != null && o.length) && ((r = window.parent) == null || r.postMessage(
|
|
1006
880
|
{
|
|
1007
881
|
type: "builder.clickEmptyBlocks",
|
|
1008
882
|
data: {
|
|
@@ -1014,8 +888,8 @@ function BlocksWrapper(e) {
|
|
|
1014
888
|
));
|
|
1015
889
|
}
|
|
1016
890
|
function i() {
|
|
1017
|
-
var o,
|
|
1018
|
-
|
|
891
|
+
var o, r;
|
|
892
|
+
F() && !((o = e.blocks) != null && o.length) && ((r = window.parent) == null || r.postMessage(
|
|
1019
893
|
{
|
|
1020
894
|
type: "builder.hoverEmptyBlocks",
|
|
1021
895
|
data: {
|
|
@@ -1026,11 +900,11 @@ function BlocksWrapper(e) {
|
|
|
1026
900
|
"*"
|
|
1027
901
|
));
|
|
1028
902
|
}
|
|
1029
|
-
return /* @__PURE__ */
|
|
1030
|
-
/* @__PURE__ */
|
|
903
|
+
return /* @__PURE__ */ B(g, { children: [
|
|
904
|
+
/* @__PURE__ */ l(
|
|
1031
905
|
e.BlocksWrapper,
|
|
1032
906
|
{
|
|
1033
|
-
className: t() + " props-blocks-wrapper-
|
|
907
|
+
className: t() + " props-blocks-wrapper-7354e098",
|
|
1034
908
|
"builder-path": e.path,
|
|
1035
909
|
"builder-parent-id": e.parent,
|
|
1036
910
|
style: e.styleProp,
|
|
@@ -1041,18 +915,18 @@ function BlocksWrapper(e) {
|
|
|
1041
915
|
children: e.children
|
|
1042
916
|
}
|
|
1043
917
|
),
|
|
1044
|
-
/* @__PURE__ */
|
|
918
|
+
/* @__PURE__ */ l("style", { children: `.props-blocks-wrapper-7354e098 {
|
|
1045
919
|
display: flex;
|
|
1046
920
|
flex-direction: column;
|
|
1047
921
|
align-items: stretch;
|
|
1048
922
|
}` })
|
|
1049
923
|
] });
|
|
1050
924
|
}
|
|
1051
|
-
function
|
|
1052
|
-
var i, o,
|
|
1053
|
-
const t =
|
|
1054
|
-
return /* @__PURE__ */
|
|
1055
|
-
|
|
925
|
+
function O(e) {
|
|
926
|
+
var i, o, r;
|
|
927
|
+
const t = fe(re), n = fe(Ie);
|
|
928
|
+
return /* @__PURE__ */ l(
|
|
929
|
+
Tt,
|
|
1056
930
|
{
|
|
1057
931
|
blocks: e.blocks,
|
|
1058
932
|
parent: e.parent,
|
|
@@ -1060,95 +934,95 @@ function Blocks(e) {
|
|
|
1060
934
|
styleProp: e.styleProp,
|
|
1061
935
|
BlocksWrapper: ((i = e.context) == null ? void 0 : i.BlocksWrapper) || t.BlocksWrapper,
|
|
1062
936
|
BlocksWrapperProps: ((o = e.context) == null ? void 0 : o.BlocksWrapperProps) || t.BlocksWrapperProps,
|
|
1063
|
-
children: e.blocks ? /* @__PURE__ */
|
|
1064
|
-
|
|
937
|
+
children: e.blocks ? /* @__PURE__ */ l(g, { children: (r = e.blocks) == null ? void 0 : r.map((a) => /* @__PURE__ */ l(
|
|
938
|
+
_,
|
|
1065
939
|
{
|
|
1066
|
-
block:
|
|
940
|
+
block: a,
|
|
1067
941
|
linkComponent: e.linkComponent,
|
|
1068
942
|
context: e.context || t,
|
|
1069
943
|
registeredComponents: e.registeredComponents || n.registeredComponents
|
|
1070
944
|
},
|
|
1071
|
-
|
|
945
|
+
a.id
|
|
1072
946
|
)) }) : null
|
|
1073
947
|
}
|
|
1074
948
|
);
|
|
1075
949
|
}
|
|
1076
|
-
function
|
|
1077
|
-
var
|
|
1078
|
-
const [t, n] =
|
|
950
|
+
function Et(e) {
|
|
951
|
+
var R;
|
|
952
|
+
const [t, n] = C(
|
|
1079
953
|
() => typeof e.space == "number" ? e.space || 0 : 20
|
|
1080
|
-
), [i, o] =
|
|
954
|
+
), [i, o] = C(() => e.columns || []), [r, a] = C(
|
|
1081
955
|
() => e.stackColumnsAt || "tablet"
|
|
1082
956
|
);
|
|
1083
|
-
function s(
|
|
1084
|
-
var
|
|
1085
|
-
return ((
|
|
957
|
+
function s(x) {
|
|
958
|
+
var I;
|
|
959
|
+
return ((I = i[x]) == null ? void 0 : I.width) || 100 / i.length;
|
|
1086
960
|
}
|
|
1087
|
-
function
|
|
1088
|
-
const
|
|
1089
|
-
return `calc(${s(
|
|
961
|
+
function d(x) {
|
|
962
|
+
const I = t * (i.length - 1) / i.length;
|
|
963
|
+
return `calc(${s(x)}% - ${I}px)`;
|
|
1090
964
|
}
|
|
1091
|
-
function
|
|
1092
|
-
stackedStyle:
|
|
1093
|
-
desktopStyle:
|
|
965
|
+
function c({
|
|
966
|
+
stackedStyle: x,
|
|
967
|
+
desktopStyle: I
|
|
1094
968
|
}) {
|
|
1095
|
-
return
|
|
969
|
+
return r === "tablet" ? x : I;
|
|
1096
970
|
}
|
|
1097
|
-
function
|
|
1098
|
-
stackedStyle:
|
|
1099
|
-
desktopStyle:
|
|
971
|
+
function m({
|
|
972
|
+
stackedStyle: x,
|
|
973
|
+
desktopStyle: I
|
|
1100
974
|
}) {
|
|
1101
|
-
return
|
|
975
|
+
return r === "never" ? I : x;
|
|
1102
976
|
}
|
|
1103
|
-
const [
|
|
977
|
+
const [f, b] = C(
|
|
1104
978
|
() => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
|
|
1105
979
|
);
|
|
1106
|
-
function
|
|
980
|
+
function p() {
|
|
1107
981
|
return {
|
|
1108
|
-
"--flex-dir":
|
|
1109
|
-
"--flex-dir-tablet":
|
|
1110
|
-
stackedStyle:
|
|
982
|
+
"--flex-dir": f,
|
|
983
|
+
"--flex-dir-tablet": c({
|
|
984
|
+
stackedStyle: f,
|
|
1111
985
|
desktopStyle: "row"
|
|
1112
986
|
})
|
|
1113
987
|
};
|
|
1114
988
|
}
|
|
1115
|
-
function
|
|
1116
|
-
const
|
|
989
|
+
function v(x) {
|
|
990
|
+
const I = x === 0 ? 0 : t, P = d(x), E = `${I}px`, $ = "100%", L = 0;
|
|
1117
991
|
return {
|
|
1118
992
|
...{
|
|
1119
993
|
display: "flex",
|
|
1120
994
|
flexDirection: "column",
|
|
1121
995
|
alignItems: "stretch"
|
|
1122
996
|
},
|
|
1123
|
-
width:
|
|
1124
|
-
["marginLeft"]:
|
|
1125
|
-
"--column-width-mobile":
|
|
1126
|
-
stackedStyle:
|
|
997
|
+
width: P,
|
|
998
|
+
["marginLeft"]: E,
|
|
999
|
+
"--column-width-mobile": m({
|
|
1000
|
+
stackedStyle: $,
|
|
1001
|
+
desktopStyle: P
|
|
1002
|
+
}),
|
|
1003
|
+
"--column-margin-left-mobile": m({
|
|
1004
|
+
stackedStyle: L,
|
|
1127
1005
|
desktopStyle: E
|
|
1128
1006
|
}),
|
|
1129
|
-
"--column-
|
|
1130
|
-
stackedStyle:
|
|
1131
|
-
desktopStyle:
|
|
1007
|
+
"--column-width-tablet": c({
|
|
1008
|
+
stackedStyle: $,
|
|
1009
|
+
desktopStyle: P
|
|
1132
1010
|
}),
|
|
1133
|
-
"--column-
|
|
1134
|
-
stackedStyle:
|
|
1011
|
+
"--column-margin-left-tablet": c({
|
|
1012
|
+
stackedStyle: L,
|
|
1135
1013
|
desktopStyle: E
|
|
1136
|
-
}),
|
|
1137
|
-
"--column-margin-left-tablet": l({
|
|
1138
|
-
stackedStyle: j,
|
|
1139
|
-
desktopStyle: I
|
|
1140
1014
|
})
|
|
1141
1015
|
};
|
|
1142
1016
|
}
|
|
1143
|
-
function
|
|
1144
|
-
var
|
|
1145
|
-
return
|
|
1146
|
-
((
|
|
1147
|
-
)[
|
|
1017
|
+
function w(x) {
|
|
1018
|
+
var P, E;
|
|
1019
|
+
return Be(
|
|
1020
|
+
((E = (P = e.builderContext.content) == null ? void 0 : P.meta) == null ? void 0 : E.breakpoints) || {}
|
|
1021
|
+
)[x].max;
|
|
1148
1022
|
}
|
|
1149
|
-
function
|
|
1023
|
+
function T() {
|
|
1150
1024
|
return `
|
|
1151
|
-
@media (max-width: ${
|
|
1025
|
+
@media (max-width: ${w("medium")}px) {
|
|
1152
1026
|
.${e.builderBlock.id}-breakpoints {
|
|
1153
1027
|
flex-direction: var(--flex-dir-tablet);
|
|
1154
1028
|
align-items: stretch;
|
|
@@ -1160,7 +1034,7 @@ function Columns(e) {
|
|
|
1160
1034
|
}
|
|
1161
1035
|
}
|
|
1162
1036
|
|
|
1163
|
-
@media (max-width: ${
|
|
1037
|
+
@media (max-width: ${w("small")}px) {
|
|
1164
1038
|
.${e.builderBlock.id}-breakpoints {
|
|
1165
1039
|
flex-direction: var(--flex-dir);
|
|
1166
1040
|
align-items: stretch;
|
|
@@ -1173,30 +1047,30 @@ function Columns(e) {
|
|
|
1173
1047
|
},
|
|
1174
1048
|
`;
|
|
1175
1049
|
}
|
|
1176
|
-
return /* @__PURE__ */
|
|
1177
|
-
/* @__PURE__ */
|
|
1050
|
+
return /* @__PURE__ */ B(g, { children: [
|
|
1051
|
+
/* @__PURE__ */ B(
|
|
1178
1052
|
"div",
|
|
1179
1053
|
{
|
|
1180
|
-
className: `builder-columns ${e.builderBlock.id}-breakpoints div-
|
|
1181
|
-
style:
|
|
1054
|
+
className: `builder-columns ${e.builderBlock.id}-breakpoints div-7a098ce6`,
|
|
1055
|
+
style: p(),
|
|
1182
1056
|
children: [
|
|
1183
|
-
/* @__PURE__ */
|
|
1184
|
-
(
|
|
1185
|
-
|
|
1057
|
+
/* @__PURE__ */ l(g, { children: /* @__PURE__ */ l(Z, { id: "builderio-columns", styles: T() }) }),
|
|
1058
|
+
(R = e.columns) == null ? void 0 : R.map((x, I) => /* @__PURE__ */ l(
|
|
1059
|
+
ae,
|
|
1186
1060
|
{
|
|
1187
|
-
TagName:
|
|
1061
|
+
TagName: x.link ? e.builderLinkComponent || "a" : "div",
|
|
1188
1062
|
actionAttributes: {},
|
|
1189
1063
|
attributes: {
|
|
1190
|
-
...
|
|
1191
|
-
href:
|
|
1064
|
+
...x.link ? {
|
|
1065
|
+
href: x.link
|
|
1192
1066
|
} : {},
|
|
1193
|
-
[
|
|
1194
|
-
style:
|
|
1067
|
+
[H()]: "builder-column",
|
|
1068
|
+
style: Pe(v(I))
|
|
1195
1069
|
},
|
|
1196
|
-
children: /* @__PURE__ */
|
|
1197
|
-
|
|
1070
|
+
children: /* @__PURE__ */ l(
|
|
1071
|
+
O,
|
|
1198
1072
|
{
|
|
1199
|
-
path: `component.options.columns.${
|
|
1073
|
+
path: `component.options.columns.${I}.blocks`,
|
|
1200
1074
|
parent: e.builderBlock.id,
|
|
1201
1075
|
styleProp: {
|
|
1202
1076
|
flexGrow: "1"
|
|
@@ -1204,89 +1078,89 @@ function Columns(e) {
|
|
|
1204
1078
|
context: e.builderContext,
|
|
1205
1079
|
registeredComponents: e.builderComponents,
|
|
1206
1080
|
linkComponent: e.builderLinkComponent,
|
|
1207
|
-
blocks:
|
|
1081
|
+
blocks: x.blocks
|
|
1208
1082
|
}
|
|
1209
1083
|
)
|
|
1210
1084
|
},
|
|
1211
|
-
|
|
1085
|
+
I
|
|
1212
1086
|
))
|
|
1213
1087
|
]
|
|
1214
1088
|
}
|
|
1215
1089
|
),
|
|
1216
|
-
/* @__PURE__ */
|
|
1090
|
+
/* @__PURE__ */ l("style", { children: `.div-7a098ce6 {
|
|
1217
1091
|
display: flex;
|
|
1218
1092
|
line-height: normal;
|
|
1219
1093
|
}` })
|
|
1220
1094
|
] });
|
|
1221
1095
|
}
|
|
1222
|
-
function
|
|
1223
|
-
return /* @__PURE__ */
|
|
1096
|
+
function Rt(e) {
|
|
1097
|
+
return /* @__PURE__ */ l("span", { children: e.children });
|
|
1224
1098
|
}
|
|
1225
|
-
function
|
|
1099
|
+
function be(e) {
|
|
1226
1100
|
return e.replace(/http(s)?:/, "");
|
|
1227
1101
|
}
|
|
1228
|
-
function
|
|
1102
|
+
function Pt(e = "", t, n) {
|
|
1229
1103
|
const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), o = e.indexOf("?") !== -1 ? "&" : "?";
|
|
1230
1104
|
return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + o + t + "=" + encodeURIComponent(n);
|
|
1231
1105
|
}
|
|
1232
|
-
function
|
|
1106
|
+
function Vt(e, t) {
|
|
1233
1107
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
1234
1108
|
return e;
|
|
1235
1109
|
if (t === "master")
|
|
1236
|
-
return
|
|
1110
|
+
return be(e);
|
|
1237
1111
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
1238
1112
|
if (n) {
|
|
1239
|
-
const i = e.split(n[0]), o = n[3],
|
|
1240
|
-
return
|
|
1113
|
+
const i = e.split(n[0]), o = n[3], r = t.match("x") ? t : `${t}x`;
|
|
1114
|
+
return be(`${i[0]}_${r}${o}`);
|
|
1241
1115
|
}
|
|
1242
1116
|
return null;
|
|
1243
1117
|
}
|
|
1244
|
-
function
|
|
1118
|
+
function ne(e) {
|
|
1245
1119
|
if (!e)
|
|
1246
1120
|
return e;
|
|
1247
1121
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
1248
1122
|
if (e.match(/builder\.io/)) {
|
|
1249
1123
|
let n = e;
|
|
1250
1124
|
const i = Number(e.split("?width=")[1]);
|
|
1251
|
-
return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${
|
|
1125
|
+
return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${Pt(e, "width", o)} ${o}w`).concat([n]).join(", ");
|
|
1252
1126
|
}
|
|
1253
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
1127
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [Vt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
|
|
1254
1128
|
}
|
|
1255
|
-
function
|
|
1256
|
-
var o,
|
|
1129
|
+
function Bt(e) {
|
|
1130
|
+
var o, r, a, s;
|
|
1257
1131
|
function t() {
|
|
1258
|
-
var
|
|
1259
|
-
const
|
|
1260
|
-
if (!
|
|
1132
|
+
var m;
|
|
1133
|
+
const c = e.image || e.src;
|
|
1134
|
+
if (!c || // We can auto add srcset for cdn.builder.io and shopify
|
|
1261
1135
|
// images, otherwise you can supply this prop manually
|
|
1262
|
-
!(
|
|
1136
|
+
!(c.match(/builder\.io/) || c.match(/cdn\.shopify\.com/)))
|
|
1263
1137
|
return e.srcset;
|
|
1264
|
-
if (e.srcset && ((
|
|
1138
|
+
if (e.srcset && ((m = e.image) != null && m.includes("builder.io/api/v1/image"))) {
|
|
1265
1139
|
if (!e.srcset.includes(e.image.split("?")[0]))
|
|
1266
|
-
return console.debug("Removed given srcset"),
|
|
1140
|
+
return console.debug("Removed given srcset"), ne(c);
|
|
1267
1141
|
} else if (e.image && !e.srcset)
|
|
1268
|
-
return
|
|
1269
|
-
return
|
|
1142
|
+
return ne(c);
|
|
1143
|
+
return ne(c);
|
|
1270
1144
|
}
|
|
1271
1145
|
function n() {
|
|
1272
|
-
var
|
|
1273
|
-
return (
|
|
1146
|
+
var d;
|
|
1147
|
+
return (d = t == null ? void 0 : t()) != null && d.match(/builder\.io/) && !e.noWebp ? t().replace(/\?/g, "?format=webp&") : "";
|
|
1274
1148
|
}
|
|
1275
1149
|
function i() {
|
|
1276
|
-
const
|
|
1150
|
+
const d = {
|
|
1277
1151
|
position: "absolute",
|
|
1278
1152
|
height: "100%",
|
|
1279
1153
|
width: "100%",
|
|
1280
1154
|
left: "0px",
|
|
1281
1155
|
top: "0px"
|
|
1282
1156
|
};
|
|
1283
|
-
return e.aspectRatio ?
|
|
1157
|
+
return e.aspectRatio ? d : void 0;
|
|
1284
1158
|
}
|
|
1285
|
-
return /* @__PURE__ */
|
|
1286
|
-
/* @__PURE__ */
|
|
1287
|
-
/* @__PURE__ */
|
|
1288
|
-
n() ? /* @__PURE__ */
|
|
1289
|
-
/* @__PURE__ */
|
|
1159
|
+
return /* @__PURE__ */ B(g, { children: [
|
|
1160
|
+
/* @__PURE__ */ B(g, { children: [
|
|
1161
|
+
/* @__PURE__ */ B("picture", { children: [
|
|
1162
|
+
n() ? /* @__PURE__ */ l(g, { children: /* @__PURE__ */ l("source", { type: "image/webp", srcSet: n() }) }) : null,
|
|
1163
|
+
/* @__PURE__ */ l(
|
|
1290
1164
|
"img",
|
|
1291
1165
|
{
|
|
1292
1166
|
loading: "lazy",
|
|
@@ -1297,33 +1171,33 @@ function Image(e) {
|
|
|
1297
1171
|
objectFit: e.backgroundSize || "cover",
|
|
1298
1172
|
...i()
|
|
1299
1173
|
},
|
|
1300
|
-
className: "builder-image" + (e.className ? " " + e.className : "") + " img-
|
|
1174
|
+
className: "builder-image" + (e.className ? " " + e.className : "") + " img-0614da04",
|
|
1301
1175
|
src: e.image,
|
|
1302
1176
|
srcSet: t(),
|
|
1303
1177
|
sizes: e.sizes
|
|
1304
1178
|
}
|
|
1305
1179
|
)
|
|
1306
1180
|
] }),
|
|
1307
|
-
e.aspectRatio && !((
|
|
1181
|
+
e.aspectRatio && !((r = (o = e.builderBlock) == null ? void 0 : o.children) != null && r.length && e.fitContent) ? /* @__PURE__ */ l(g, { children: /* @__PURE__ */ l(
|
|
1308
1182
|
"div",
|
|
1309
1183
|
{
|
|
1310
|
-
className: "builder-image-sizer div-
|
|
1184
|
+
className: "builder-image-sizer div-0614da04",
|
|
1311
1185
|
style: {
|
|
1312
1186
|
paddingTop: e.aspectRatio * 100 + "%"
|
|
1313
1187
|
}
|
|
1314
1188
|
}
|
|
1315
|
-
) : null,
|
|
1316
|
-
(s = (
|
|
1317
|
-
!e.fitContent && e.children ? /* @__PURE__ */
|
|
1189
|
+
) }) : null,
|
|
1190
|
+
(s = (a = e.builderBlock) == null ? void 0 : a.children) != null && s.length && e.fitContent ? /* @__PURE__ */ l(g, { children: e.children }) : null,
|
|
1191
|
+
!e.fitContent && e.children ? /* @__PURE__ */ l(g, { children: /* @__PURE__ */ l("div", { className: "div-0614da04-2", children: e.children }) }) : null
|
|
1318
1192
|
] }),
|
|
1319
|
-
/* @__PURE__ */
|
|
1193
|
+
/* @__PURE__ */ l("style", { children: `.img-0614da04 {
|
|
1320
1194
|
opacity: 1;
|
|
1321
1195
|
transition: opacity 0.2s ease-in-out;
|
|
1322
|
-
}.div-
|
|
1196
|
+
}.div-0614da04 {
|
|
1323
1197
|
width: 100%;
|
|
1324
1198
|
pointer-events: none;
|
|
1325
1199
|
font-size: 0;
|
|
1326
|
-
}.div-
|
|
1200
|
+
}.div-0614da04-2 {
|
|
1327
1201
|
display: flex;
|
|
1328
1202
|
flex-direction: column;
|
|
1329
1203
|
align-items: stretch;
|
|
@@ -1335,8 +1209,8 @@ function Image(e) {
|
|
|
1335
1209
|
}` })
|
|
1336
1210
|
] });
|
|
1337
1211
|
}
|
|
1338
|
-
function
|
|
1339
|
-
return /* @__PURE__ */
|
|
1212
|
+
function Wt(e) {
|
|
1213
|
+
return /* @__PURE__ */ l(
|
|
1340
1214
|
"section",
|
|
1341
1215
|
{
|
|
1342
1216
|
...e.attributes,
|
|
@@ -1356,7 +1230,7 @@ function SectionComponent(e) {
|
|
|
1356
1230
|
}
|
|
1357
1231
|
);
|
|
1358
1232
|
}
|
|
1359
|
-
const
|
|
1233
|
+
const Nt = {
|
|
1360
1234
|
name: "Core:Button",
|
|
1361
1235
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1362
1236
|
defaultStyles: {
|
|
@@ -1389,7 +1263,7 @@ const componentInfo$f = {
|
|
|
1389
1263
|
}],
|
|
1390
1264
|
static: !0,
|
|
1391
1265
|
noWrap: !0
|
|
1392
|
-
},
|
|
1266
|
+
}, At = {
|
|
1393
1267
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1394
1268
|
name: "Columns",
|
|
1395
1269
|
isRSC: !0,
|
|
@@ -1568,7 +1442,7 @@ const componentInfo$f = {
|
|
|
1568
1442
|
});
|
|
1569
1443
|
}
|
|
1570
1444
|
const n = e.get("columns");
|
|
1571
|
-
Array.isArray(n) && n.find((o) => o.get("width")) && (n.find((
|
|
1445
|
+
Array.isArray(n) && n.find((o) => o.get("width")) && (n.find((r) => !r.get("width")) || n.reduce((s, d) => s + d.get("width"), 0) !== 100) && t();
|
|
1572
1446
|
}
|
|
1573
1447
|
}, {
|
|
1574
1448
|
name: "space",
|
|
@@ -1590,13 +1464,13 @@ const componentInfo$f = {
|
|
|
1590
1464
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1591
1465
|
advanced: !0
|
|
1592
1466
|
}]
|
|
1593
|
-
},
|
|
1467
|
+
}, Ft = {
|
|
1594
1468
|
name: "Fragment",
|
|
1595
1469
|
static: !0,
|
|
1596
1470
|
hidden: !0,
|
|
1597
1471
|
canHaveChildren: !0,
|
|
1598
1472
|
noWrap: !0
|
|
1599
|
-
},
|
|
1473
|
+
}, $t = {
|
|
1600
1474
|
name: "Image",
|
|
1601
1475
|
static: !0,
|
|
1602
1476
|
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",
|
|
@@ -1616,29 +1490,29 @@ const componentInfo$f = {
|
|
|
1616
1490
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
1617
1491
|
onChange: (e) => {
|
|
1618
1492
|
e.delete("srcset"), e.delete("noWebp");
|
|
1619
|
-
function n(
|
|
1620
|
-
return new Promise((
|
|
1621
|
-
const
|
|
1622
|
-
let
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
},
|
|
1626
|
-
console.warn("Image load failed",
|
|
1627
|
-
}),
|
|
1628
|
-
|
|
1493
|
+
function n(a, s = 6e4) {
|
|
1494
|
+
return new Promise((d, c) => {
|
|
1495
|
+
const m = document.createElement("img");
|
|
1496
|
+
let f = !1;
|
|
1497
|
+
m.onload = () => {
|
|
1498
|
+
f = !0, d(m);
|
|
1499
|
+
}, m.addEventListener("error", (b) => {
|
|
1500
|
+
console.warn("Image load failed", b.error), c(b.error);
|
|
1501
|
+
}), m.src = a, setTimeout(() => {
|
|
1502
|
+
f || c(new Error("Image load timed out"));
|
|
1629
1503
|
}, s);
|
|
1630
1504
|
});
|
|
1631
1505
|
}
|
|
1632
|
-
function i(
|
|
1633
|
-
return Math.round(
|
|
1506
|
+
function i(a) {
|
|
1507
|
+
return Math.round(a * 1e3) / 1e3;
|
|
1634
1508
|
}
|
|
1635
|
-
const o = e.get("image"),
|
|
1636
|
-
if (fetch(o).then((
|
|
1637
|
-
|
|
1638
|
-
}), o && (!
|
|
1639
|
-
return n(o).then((
|
|
1509
|
+
const o = e.get("image"), r = e.get("aspectRatio");
|
|
1510
|
+
if (fetch(o).then((a) => a.blob()).then((a) => {
|
|
1511
|
+
a.type.includes("svg") && e.set("noWebp", !0);
|
|
1512
|
+
}), o && (!r || r === 0.7041))
|
|
1513
|
+
return n(o).then((a) => {
|
|
1640
1514
|
const s = e.get("aspectRatio");
|
|
1641
|
-
e.get("image") === o && (!s || s === 0.7041) &&
|
|
1515
|
+
e.get("image") === o && (!s || s === 0.7041) && a.width && a.height && (e.set("aspectRatio", i(a.height / a.width)), e.set("height", a.height), e.set("width", a.width));
|
|
1642
1516
|
});
|
|
1643
1517
|
}
|
|
1644
1518
|
}, {
|
|
@@ -1696,7 +1570,7 @@ const componentInfo$f = {
|
|
|
1696
1570
|
advanced: !0,
|
|
1697
1571
|
defaultValue: 0.7041
|
|
1698
1572
|
}]
|
|
1699
|
-
},
|
|
1573
|
+
}, Lt = {
|
|
1700
1574
|
name: "Core:Section",
|
|
1701
1575
|
static: !0,
|
|
1702
1576
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1735,7 +1609,7 @@ const componentInfo$f = {
|
|
|
1735
1609
|
}
|
|
1736
1610
|
}
|
|
1737
1611
|
}]
|
|
1738
|
-
},
|
|
1612
|
+
}, Dt = {
|
|
1739
1613
|
name: "Slot",
|
|
1740
1614
|
isRSC: !0,
|
|
1741
1615
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -1749,9 +1623,9 @@ const componentInfo$f = {
|
|
|
1749
1623
|
defaultValue: "children"
|
|
1750
1624
|
}]
|
|
1751
1625
|
};
|
|
1752
|
-
function
|
|
1626
|
+
function Mt(e) {
|
|
1753
1627
|
var t, n, i;
|
|
1754
|
-
return /* @__PURE__ */
|
|
1628
|
+
return /* @__PURE__ */ l(
|
|
1755
1629
|
"div",
|
|
1756
1630
|
{
|
|
1757
1631
|
style: {
|
|
@@ -1760,8 +1634,8 @@ function Slot(e) {
|
|
|
1760
1634
|
...!((t = e.builderContext.context) != null && t.symbolId) && {
|
|
1761
1635
|
"builder-slot": e.name
|
|
1762
1636
|
},
|
|
1763
|
-
children: /* @__PURE__ */
|
|
1764
|
-
|
|
1637
|
+
children: /* @__PURE__ */ l(
|
|
1638
|
+
O,
|
|
1765
1639
|
{
|
|
1766
1640
|
parent: (n = e.builderContext.context) == null ? void 0 : n.symbolId,
|
|
1767
1641
|
path: `symbol.data.${e.name}`,
|
|
@@ -1772,7 +1646,7 @@ function Slot(e) {
|
|
|
1772
1646
|
}
|
|
1773
1647
|
);
|
|
1774
1648
|
}
|
|
1775
|
-
const
|
|
1649
|
+
const jt = {
|
|
1776
1650
|
name: "Symbol",
|
|
1777
1651
|
noWrap: !0,
|
|
1778
1652
|
static: !0,
|
|
@@ -1805,7 +1679,7 @@ const componentInfo$9 = {
|
|
|
1805
1679
|
hideFromUI: !0,
|
|
1806
1680
|
type: "boolean"
|
|
1807
1681
|
}]
|
|
1808
|
-
},
|
|
1682
|
+
}, Ot = {
|
|
1809
1683
|
name: "Text",
|
|
1810
1684
|
static: !0,
|
|
1811
1685
|
isRSC: !0,
|
|
@@ -1824,9 +1698,9 @@ const componentInfo$9 = {
|
|
|
1824
1698
|
textAlign: "center"
|
|
1825
1699
|
}
|
|
1826
1700
|
};
|
|
1827
|
-
function
|
|
1701
|
+
function Ut(e) {
|
|
1828
1702
|
var t;
|
|
1829
|
-
return /* @__PURE__ */
|
|
1703
|
+
return /* @__PURE__ */ l(
|
|
1830
1704
|
"div",
|
|
1831
1705
|
{
|
|
1832
1706
|
className: "builder-text",
|
|
@@ -1837,7 +1711,7 @@ function Text(e) {
|
|
|
1837
1711
|
}
|
|
1838
1712
|
);
|
|
1839
1713
|
}
|
|
1840
|
-
const
|
|
1714
|
+
const Ht = {
|
|
1841
1715
|
name: "Custom Code",
|
|
1842
1716
|
static: !0,
|
|
1843
1717
|
requiredPermissions: ["editCode"],
|
|
@@ -1860,36 +1734,36 @@ const componentInfo$7 = {
|
|
|
1860
1734
|
advanced: !0
|
|
1861
1735
|
}]
|
|
1862
1736
|
};
|
|
1863
|
-
function
|
|
1864
|
-
const t =
|
|
1865
|
-
return
|
|
1737
|
+
function Kt(e) {
|
|
1738
|
+
const t = X(null), [n, i] = C(() => []), [o, r] = C(() => []);
|
|
1739
|
+
return V(() => {
|
|
1866
1740
|
var s;
|
|
1867
1741
|
if (!((s = t.current) != null && s.getElementsByTagName) || typeof window == "undefined")
|
|
1868
1742
|
return;
|
|
1869
|
-
const
|
|
1870
|
-
for (let
|
|
1871
|
-
const
|
|
1872
|
-
if (
|
|
1873
|
-
if (n.includes(
|
|
1743
|
+
const a = t.current.getElementsByTagName("script");
|
|
1744
|
+
for (let d = 0; d < a.length; d++) {
|
|
1745
|
+
const c = a[d];
|
|
1746
|
+
if (c.src) {
|
|
1747
|
+
if (n.includes(c.src))
|
|
1874
1748
|
continue;
|
|
1875
|
-
n.push(
|
|
1876
|
-
const
|
|
1877
|
-
|
|
1878
|
-
} else if (!
|
|
1749
|
+
n.push(c.src);
|
|
1750
|
+
const m = document.createElement("script");
|
|
1751
|
+
m.async = !0, m.src = c.src, document.head.appendChild(m);
|
|
1752
|
+
} else if (!c.type || [
|
|
1879
1753
|
"text/javascript",
|
|
1880
1754
|
"application/javascript",
|
|
1881
1755
|
"application/ecmascript"
|
|
1882
|
-
].includes(
|
|
1883
|
-
if (o.includes(
|
|
1756
|
+
].includes(c.type)) {
|
|
1757
|
+
if (o.includes(c.innerText))
|
|
1884
1758
|
continue;
|
|
1885
1759
|
try {
|
|
1886
|
-
o.push(
|
|
1887
|
-
} catch (
|
|
1888
|
-
console.warn("`CustomCode`: Error running script:",
|
|
1760
|
+
o.push(c.innerText), new Function(c.innerText)();
|
|
1761
|
+
} catch (m) {
|
|
1762
|
+
console.warn("`CustomCode`: Error running script:", m);
|
|
1889
1763
|
}
|
|
1890
1764
|
}
|
|
1891
1765
|
}
|
|
1892
|
-
}, []), /* @__PURE__ */
|
|
1766
|
+
}, []), /* @__PURE__ */ l(
|
|
1893
1767
|
"div",
|
|
1894
1768
|
{
|
|
1895
1769
|
ref: t,
|
|
@@ -1898,7 +1772,7 @@ function CustomCode(e) {
|
|
|
1898
1772
|
}
|
|
1899
1773
|
);
|
|
1900
1774
|
}
|
|
1901
|
-
const
|
|
1775
|
+
const qt = {
|
|
1902
1776
|
name: "Embed",
|
|
1903
1777
|
static: !0,
|
|
1904
1778
|
inputs: [{
|
|
@@ -1923,30 +1797,30 @@ const componentInfo$6 = {
|
|
|
1923
1797
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1924
1798
|
hideFromUI: !0
|
|
1925
1799
|
}]
|
|
1926
|
-
},
|
|
1927
|
-
function
|
|
1928
|
-
const t =
|
|
1929
|
-
function
|
|
1800
|
+
}, _t = ["text/javascript", "application/javascript", "application/ecmascript"], zt = (e) => _t.includes(e.type);
|
|
1801
|
+
function Jt(e) {
|
|
1802
|
+
const t = X(null), [n, i] = C(() => []), [o, r] = C(() => []), [a, s] = C(() => !1);
|
|
1803
|
+
function d() {
|
|
1930
1804
|
if (!t.current || !t.current.getElementsByTagName)
|
|
1931
1805
|
return;
|
|
1932
|
-
const
|
|
1933
|
-
for (let
|
|
1934
|
-
const
|
|
1935
|
-
if (
|
|
1936
|
-
n.push(
|
|
1937
|
-
const
|
|
1938
|
-
|
|
1939
|
-
} else if (
|
|
1806
|
+
const c = t.current.getElementsByTagName("script");
|
|
1807
|
+
for (let m = 0; m < c.length; m++) {
|
|
1808
|
+
const f = c[m];
|
|
1809
|
+
if (f.src && !n.includes(f.src)) {
|
|
1810
|
+
n.push(f.src);
|
|
1811
|
+
const b = document.createElement("script");
|
|
1812
|
+
b.async = !0, b.src = f.src, document.head.appendChild(b);
|
|
1813
|
+
} else if (zt(f) && !o.includes(f.innerText))
|
|
1940
1814
|
try {
|
|
1941
|
-
o.push(
|
|
1942
|
-
} catch (
|
|
1943
|
-
console.warn("`Embed`: Error running script:",
|
|
1815
|
+
o.push(f.innerText), new Function(f.innerText)();
|
|
1816
|
+
} catch (b) {
|
|
1817
|
+
console.warn("`Embed`: Error running script:", b);
|
|
1944
1818
|
}
|
|
1945
1819
|
}
|
|
1946
1820
|
}
|
|
1947
|
-
return
|
|
1948
|
-
t.current && !
|
|
1949
|
-
}, [t.current,
|
|
1821
|
+
return V(() => {
|
|
1822
|
+
t.current && !a && (s(!0), d());
|
|
1823
|
+
}, [t.current, a]), /* @__PURE__ */ l(
|
|
1950
1824
|
"div",
|
|
1951
1825
|
{
|
|
1952
1826
|
className: "builder-embed",
|
|
@@ -1955,7 +1829,7 @@ function Embed(e) {
|
|
|
1955
1829
|
}
|
|
1956
1830
|
);
|
|
1957
1831
|
}
|
|
1958
|
-
const
|
|
1832
|
+
const Yt = {
|
|
1959
1833
|
name: "Form:Form",
|
|
1960
1834
|
// editableTags: ['builder-form-error']
|
|
1961
1835
|
defaults: {
|
|
@@ -2186,127 +2060,127 @@ const componentInfo$5 = {
|
|
|
2186
2060
|
}
|
|
2187
2061
|
}
|
|
2188
2062
|
}]
|
|
2189
|
-
},
|
|
2063
|
+
}, Gt = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"], Qt = () => {
|
|
2190
2064
|
const e = process.env.NODE_ENV || "production";
|
|
2191
|
-
return
|
|
2192
|
-
},
|
|
2193
|
-
const i = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((o,
|
|
2065
|
+
return Gt.includes(e) ? e : "production";
|
|
2066
|
+
}, Xt = (e, t, n) => {
|
|
2067
|
+
const i = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((o, r) => o != null ? o[r] : o, e);
|
|
2194
2068
|
return i === void 0 || i === e ? n : i;
|
|
2195
2069
|
};
|
|
2196
|
-
function
|
|
2197
|
-
var
|
|
2198
|
-
const t =
|
|
2199
|
-
function
|
|
2200
|
-
var
|
|
2201
|
-
const
|
|
2070
|
+
function Zt(e) {
|
|
2071
|
+
var f, b;
|
|
2072
|
+
const t = X(null), [n, i] = C(() => "unsubmitted"), [o, r] = C(() => null), [a, s] = C(() => "");
|
|
2073
|
+
function d(p) {
|
|
2074
|
+
var w, T;
|
|
2075
|
+
const v = {
|
|
2202
2076
|
...e.builderContext.rootState,
|
|
2203
|
-
...
|
|
2077
|
+
...p
|
|
2204
2078
|
};
|
|
2205
|
-
e.builderContext.rootSetState ? (
|
|
2079
|
+
e.builderContext.rootSetState ? (T = (w = e.builderContext).rootSetState) == null || T.call(w, v) : e.builderContext.rootState = v;
|
|
2206
2080
|
}
|
|
2207
|
-
function
|
|
2208
|
-
return
|
|
2081
|
+
function c() {
|
|
2082
|
+
return F() && e.previewState || n;
|
|
2209
2083
|
}
|
|
2210
|
-
function
|
|
2211
|
-
var
|
|
2212
|
-
const
|
|
2084
|
+
function m(p) {
|
|
2085
|
+
var w;
|
|
2086
|
+
const v = e.sendWithJs || e.sendSubmissionsTo === "email";
|
|
2213
2087
|
if (e.sendSubmissionsTo === "zapier")
|
|
2214
|
-
|
|
2215
|
-
else if (
|
|
2088
|
+
p.preventDefault();
|
|
2089
|
+
else if (v) {
|
|
2216
2090
|
if (!(e.action || e.sendSubmissionsTo === "email")) {
|
|
2217
|
-
|
|
2091
|
+
p.preventDefault();
|
|
2218
2092
|
return;
|
|
2219
2093
|
}
|
|
2220
|
-
|
|
2221
|
-
const
|
|
2222
|
-
let
|
|
2223
|
-
const
|
|
2224
|
-
|
|
2225
|
-
).filter((
|
|
2226
|
-
let
|
|
2227
|
-
const
|
|
2228
|
-
if (
|
|
2229
|
-
if (
|
|
2230
|
-
if (
|
|
2231
|
-
return
|
|
2232
|
-
key:
|
|
2233
|
-
value:
|
|
2094
|
+
p.preventDefault();
|
|
2095
|
+
const T = p.currentTarget, R = e.customHeaders || {};
|
|
2096
|
+
let x;
|
|
2097
|
+
const I = new FormData(T), P = Array.from(
|
|
2098
|
+
p.currentTarget.querySelectorAll("input,select,textarea")
|
|
2099
|
+
).filter((u) => !!u.name).map((u) => {
|
|
2100
|
+
let h;
|
|
2101
|
+
const k = u.name;
|
|
2102
|
+
if (u instanceof HTMLInputElement)
|
|
2103
|
+
if (u.type === "radio") {
|
|
2104
|
+
if (u.checked)
|
|
2105
|
+
return h = u.name, {
|
|
2106
|
+
key: k,
|
|
2107
|
+
value: h
|
|
2234
2108
|
};
|
|
2235
|
-
} else if (
|
|
2236
|
-
|
|
2237
|
-
else if (
|
|
2238
|
-
const
|
|
2239
|
-
isNaN(
|
|
2109
|
+
} else if (u.type === "checkbox")
|
|
2110
|
+
h = u.checked;
|
|
2111
|
+
else if (u.type === "number" || u.type === "range") {
|
|
2112
|
+
const y = u.valueAsNumber;
|
|
2113
|
+
isNaN(y) || (h = y);
|
|
2240
2114
|
} else
|
|
2241
|
-
|
|
2115
|
+
u.type === "file" ? h = u.files : h = u.value;
|
|
2242
2116
|
else
|
|
2243
|
-
|
|
2117
|
+
h = u.value;
|
|
2244
2118
|
return {
|
|
2245
|
-
key:
|
|
2246
|
-
value:
|
|
2119
|
+
key: k,
|
|
2120
|
+
value: h
|
|
2247
2121
|
};
|
|
2248
2122
|
});
|
|
2249
|
-
let
|
|
2250
|
-
if (e.sendSubmissionsTo === "email" && (
|
|
2251
|
-
(
|
|
2252
|
-
}),
|
|
2253
|
-
|
|
2123
|
+
let E = e.contentType;
|
|
2124
|
+
if (e.sendSubmissionsTo === "email" && (E = "multipart/form-data"), Array.from(P).forEach(({ value: u }) => {
|
|
2125
|
+
(u instanceof File || Array.isArray(u) && u[0] instanceof File || u instanceof FileList) && (E = "multipart/form-data");
|
|
2126
|
+
}), E !== "application/json")
|
|
2127
|
+
x = I;
|
|
2254
2128
|
else {
|
|
2255
|
-
const
|
|
2256
|
-
Array.from(
|
|
2257
|
-
|
|
2258
|
-
}),
|
|
2129
|
+
const u = {};
|
|
2130
|
+
Array.from(P).forEach(({ value: h, key: k }) => {
|
|
2131
|
+
we(u, k, h);
|
|
2132
|
+
}), x = JSON.stringify(u);
|
|
2259
2133
|
}
|
|
2260
|
-
|
|
2261
|
-
const
|
|
2262
|
-
if (t.current && (t.current.dispatchEvent(
|
|
2134
|
+
E && E !== "multipart/form-data" && (v && ((w = e.action) != null && w.includes("zapier.com")) || (R["content-type"] = E));
|
|
2135
|
+
const $ = new CustomEvent("presubmit", { detail: { body: x } });
|
|
2136
|
+
if (t.current && (t.current.dispatchEvent($), $.defaultPrevented))
|
|
2263
2137
|
return;
|
|
2264
2138
|
i("sending");
|
|
2265
|
-
const
|
|
2139
|
+
const L = `${Qt() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(
|
|
2266
2140
|
e.sendSubmissionsToEmail || ""
|
|
2267
2141
|
)}&name=${encodeURIComponent(e.name || "")}`;
|
|
2268
2142
|
fetch(
|
|
2269
|
-
e.sendSubmissionsTo === "email" ?
|
|
2270
|
-
{ body:
|
|
2143
|
+
e.sendSubmissionsTo === "email" ? L : e.action,
|
|
2144
|
+
{ body: x, headers: R, method: e.method || "post" }
|
|
2271
2145
|
).then(
|
|
2272
|
-
async (
|
|
2273
|
-
let
|
|
2274
|
-
const
|
|
2275
|
-
if (
|
|
2276
|
-
let
|
|
2277
|
-
|
|
2146
|
+
async (u) => {
|
|
2147
|
+
let h;
|
|
2148
|
+
const k = u.headers.get("content-type");
|
|
2149
|
+
if (k && k.indexOf("application/json") !== -1 ? h = await u.json() : h = await u.text(), !u.ok && e.errorMessagePath) {
|
|
2150
|
+
let y = Xt(h, e.errorMessagePath);
|
|
2151
|
+
y && (typeof y != "string" && (y = JSON.stringify(y)), s(y), d({ formErrorMessage: y }));
|
|
2278
2152
|
}
|
|
2279
|
-
if (
|
|
2280
|
-
const
|
|
2281
|
-
detail: { res:
|
|
2153
|
+
if (r(h), i(u.ok ? "success" : "error"), u.ok) {
|
|
2154
|
+
const y = new CustomEvent("submit:success", {
|
|
2155
|
+
detail: { res: u, body: h }
|
|
2282
2156
|
});
|
|
2283
2157
|
if (t.current) {
|
|
2284
|
-
if (t.current.dispatchEvent(
|
|
2158
|
+
if (t.current.dispatchEvent(y), y.defaultPrevented)
|
|
2285
2159
|
return;
|
|
2286
2160
|
e.resetFormOnSubmit !== !1 && t.current.reset();
|
|
2287
2161
|
}
|
|
2288
2162
|
if (e.successUrl)
|
|
2289
2163
|
if (t.current) {
|
|
2290
|
-
const
|
|
2164
|
+
const S = new CustomEvent("route", {
|
|
2291
2165
|
detail: { url: e.successUrl }
|
|
2292
2166
|
});
|
|
2293
|
-
t.current.dispatchEvent(
|
|
2167
|
+
t.current.dispatchEvent(S), S.defaultPrevented || (location.href = e.successUrl);
|
|
2294
2168
|
} else
|
|
2295
2169
|
location.href = e.successUrl;
|
|
2296
2170
|
}
|
|
2297
2171
|
},
|
|
2298
|
-
(
|
|
2299
|
-
const
|
|
2300
|
-
detail: { error:
|
|
2172
|
+
(u) => {
|
|
2173
|
+
const h = new CustomEvent("submit:error", {
|
|
2174
|
+
detail: { error: u }
|
|
2301
2175
|
});
|
|
2302
|
-
t.current && (t.current.dispatchEvent(
|
|
2176
|
+
t.current && (t.current.dispatchEvent(h), h.defaultPrevented) || (r(u), i("error"));
|
|
2303
2177
|
}
|
|
2304
2178
|
);
|
|
2305
2179
|
}
|
|
2306
2180
|
}
|
|
2307
|
-
return /* @__PURE__ */
|
|
2181
|
+
return /* @__PURE__ */ B(g, { children: [
|
|
2308
2182
|
" ",
|
|
2309
|
-
/* @__PURE__ */
|
|
2183
|
+
/* @__PURE__ */ B(
|
|
2310
2184
|
"form",
|
|
2311
2185
|
{
|
|
2312
2186
|
validate: e.validate,
|
|
@@ -2314,53 +2188,63 @@ function FormComponent(e) {
|
|
|
2314
2188
|
action: !e.sendWithJs && e.action,
|
|
2315
2189
|
method: e.method,
|
|
2316
2190
|
name: e.name,
|
|
2317
|
-
onSubmit: (
|
|
2191
|
+
onSubmit: (p) => m(p),
|
|
2318
2192
|
...e.attributes,
|
|
2319
2193
|
children: [
|
|
2320
|
-
|
|
2321
|
-
|
|
2194
|
+
" ",
|
|
2195
|
+
e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ l(g, { children: (b = (f = e.builderBlock) == null ? void 0 : f.children) == null ? void 0 : b.map((p, v) => /* @__PURE__ */ l(
|
|
2196
|
+
_,
|
|
2322
2197
|
{
|
|
2323
|
-
block:
|
|
2198
|
+
block: p,
|
|
2324
2199
|
context: e.builderContext,
|
|
2325
2200
|
registeredComponents: e.builderComponents,
|
|
2326
2201
|
linkComponent: e.builderLinkComponent
|
|
2327
2202
|
},
|
|
2328
|
-
`form-block-${
|
|
2203
|
+
`form-block-${v}`
|
|
2329
2204
|
)) }) : null,
|
|
2330
|
-
|
|
2331
|
-
|
|
2205
|
+
" ",
|
|
2206
|
+
c() === "error" ? /* @__PURE__ */ l(g, { children: /* @__PURE__ */ l(
|
|
2207
|
+
O,
|
|
2332
2208
|
{
|
|
2333
2209
|
path: "errorMessage",
|
|
2334
2210
|
blocks: e.errorMessage,
|
|
2335
2211
|
context: e.builderContext
|
|
2336
2212
|
}
|
|
2337
|
-
) : null,
|
|
2338
|
-
|
|
2339
|
-
|
|
2213
|
+
) }) : null,
|
|
2214
|
+
" ",
|
|
2215
|
+
c() === "sending" ? /* @__PURE__ */ l(g, { children: /* @__PURE__ */ l(
|
|
2216
|
+
O,
|
|
2340
2217
|
{
|
|
2341
2218
|
path: "sendingMessage",
|
|
2342
2219
|
blocks: e.sendingMessage,
|
|
2343
2220
|
context: e.builderContext
|
|
2344
2221
|
}
|
|
2345
|
-
) : null,
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2222
|
+
) }) : null,
|
|
2223
|
+
" ",
|
|
2224
|
+
c() === "error" && o ? /* @__PURE__ */ l(g, { children: /* @__PURE__ */ B("pre", { className: "builder-form-error-text pre-25b9edf0", children: [
|
|
2225
|
+
" ",
|
|
2226
|
+
JSON.stringify(o, null, 2),
|
|
2227
|
+
" "
|
|
2228
|
+
] }) }) : null,
|
|
2229
|
+
" ",
|
|
2230
|
+
c() === "success" ? /* @__PURE__ */ l(g, { children: /* @__PURE__ */ l(
|
|
2231
|
+
O,
|
|
2349
2232
|
{
|
|
2350
2233
|
path: "successMessage",
|
|
2351
2234
|
blocks: e.successMessage,
|
|
2352
2235
|
context: e.builderContext
|
|
2353
2236
|
}
|
|
2354
|
-
) : null
|
|
2237
|
+
) }) : null,
|
|
2238
|
+
" "
|
|
2355
2239
|
]
|
|
2356
2240
|
}
|
|
2357
2241
|
),
|
|
2358
2242
|
" ",
|
|
2359
|
-
/* @__PURE__ */
|
|
2243
|
+
/* @__PURE__ */ l("style", { children: ".pre-25b9edf0 { padding: 10px; color: red; text-align: center; }" }),
|
|
2360
2244
|
" "
|
|
2361
2245
|
] });
|
|
2362
2246
|
}
|
|
2363
|
-
const
|
|
2247
|
+
const en = {
|
|
2364
2248
|
name: "Form:Input",
|
|
2365
2249
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
2366
2250
|
inputs: [
|
|
@@ -2412,12 +2296,12 @@ const componentInfo$4 = {
|
|
|
2412
2296
|
borderColor: "#ccc"
|
|
2413
2297
|
}
|
|
2414
2298
|
};
|
|
2415
|
-
function
|
|
2416
|
-
return /* @__PURE__ */
|
|
2299
|
+
function tn(e) {
|
|
2300
|
+
return /* @__PURE__ */ Ce(
|
|
2417
2301
|
"input",
|
|
2418
2302
|
{
|
|
2419
2303
|
...e.attributes,
|
|
2420
|
-
key:
|
|
2304
|
+
key: F() && e.defaultValue ? e.defaultValue : "default-key",
|
|
2421
2305
|
placeholder: e.placeholder,
|
|
2422
2306
|
type: e.type,
|
|
2423
2307
|
name: e.name,
|
|
@@ -2427,7 +2311,7 @@ function FormInputComponent(e) {
|
|
|
2427
2311
|
}
|
|
2428
2312
|
);
|
|
2429
2313
|
}
|
|
2430
|
-
const
|
|
2314
|
+
const nn = {
|
|
2431
2315
|
name: "Form:Select",
|
|
2432
2316
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
2433
2317
|
defaultStyles: {
|
|
@@ -2470,21 +2354,21 @@ const componentInfo$3 = {
|
|
|
2470
2354
|
static: !0,
|
|
2471
2355
|
noWrap: !0
|
|
2472
2356
|
};
|
|
2473
|
-
function
|
|
2357
|
+
function on(e) {
|
|
2474
2358
|
var t;
|
|
2475
|
-
return /* @__PURE__ */
|
|
2359
|
+
return /* @__PURE__ */ Ce(
|
|
2476
2360
|
"select",
|
|
2477
2361
|
{
|
|
2478
2362
|
...e.attributes,
|
|
2479
2363
|
value: e.value,
|
|
2480
|
-
key:
|
|
2364
|
+
key: F() && e.defaultValue ? e.defaultValue : "default-key",
|
|
2481
2365
|
defaultValue: e.defaultValue,
|
|
2482
2366
|
name: e.name
|
|
2483
2367
|
},
|
|
2484
|
-
(t = e.options) == null ? void 0 : t.map((n) => /* @__PURE__ */
|
|
2368
|
+
(t = e.options) == null ? void 0 : t.map((n) => /* @__PURE__ */ l("option", { value: n.value, children: n.name || n.value }))
|
|
2485
2369
|
);
|
|
2486
2370
|
}
|
|
2487
|
-
const
|
|
2371
|
+
const an = {
|
|
2488
2372
|
name: "Form:SubmitButton",
|
|
2489
2373
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
2490
2374
|
defaultStyles: {
|
|
@@ -2510,10 +2394,10 @@ const componentInfo$2 = {
|
|
|
2510
2394
|
// TODO: defaultChildren
|
|
2511
2395
|
// canHaveChildren: true,
|
|
2512
2396
|
};
|
|
2513
|
-
function
|
|
2514
|
-
return /* @__PURE__ */
|
|
2397
|
+
function rn(e) {
|
|
2398
|
+
return /* @__PURE__ */ l("button", { type: "submit", ...e.attributes, children: e.text });
|
|
2515
2399
|
}
|
|
2516
|
-
const
|
|
2400
|
+
const ln = {
|
|
2517
2401
|
// friendlyName?
|
|
2518
2402
|
name: "Raw:Img",
|
|
2519
2403
|
hideFromInsertMenu: !0,
|
|
@@ -2528,8 +2412,8 @@ const componentInfo$1 = {
|
|
|
2528
2412
|
noWrap: !0,
|
|
2529
2413
|
static: !0
|
|
2530
2414
|
};
|
|
2531
|
-
function
|
|
2532
|
-
return /* @__PURE__ */
|
|
2415
|
+
function sn(e) {
|
|
2416
|
+
return /* @__PURE__ */ l(
|
|
2533
2417
|
"img",
|
|
2534
2418
|
{
|
|
2535
2419
|
style: {
|
|
@@ -2540,10 +2424,10 @@ function ImgComponent(e) {
|
|
|
2540
2424
|
src: e.imgSrc || e.image,
|
|
2541
2425
|
...e.attributes
|
|
2542
2426
|
},
|
|
2543
|
-
|
|
2427
|
+
F() && e.imgSrc || "default-key"
|
|
2544
2428
|
);
|
|
2545
2429
|
}
|
|
2546
|
-
const
|
|
2430
|
+
const cn = {
|
|
2547
2431
|
name: "Video",
|
|
2548
2432
|
canHaveChildren: !0,
|
|
2549
2433
|
defaultStyles: {
|
|
@@ -2625,8 +2509,8 @@ const componentInfo = {
|
|
|
2625
2509
|
advanced: !0
|
|
2626
2510
|
}]
|
|
2627
2511
|
};
|
|
2628
|
-
function
|
|
2629
|
-
var i, o,
|
|
2512
|
+
function dn(e) {
|
|
2513
|
+
var i, o, r, a, s, d, c;
|
|
2630
2514
|
function t() {
|
|
2631
2515
|
return {
|
|
2632
2516
|
...e.autoPlay === !0 ? {
|
|
@@ -2651,14 +2535,14 @@ function Video(e) {
|
|
|
2651
2535
|
...t()
|
|
2652
2536
|
};
|
|
2653
2537
|
}
|
|
2654
|
-
return /* @__PURE__ */
|
|
2538
|
+
return /* @__PURE__ */ B(
|
|
2655
2539
|
"div",
|
|
2656
2540
|
{
|
|
2657
2541
|
style: {
|
|
2658
2542
|
position: "relative"
|
|
2659
2543
|
},
|
|
2660
2544
|
children: [
|
|
2661
|
-
/* @__PURE__ */
|
|
2545
|
+
/* @__PURE__ */ l(
|
|
2662
2546
|
"video",
|
|
2663
2547
|
{
|
|
2664
2548
|
className: "builder-video",
|
|
@@ -2680,10 +2564,10 @@ function Video(e) {
|
|
|
2680
2564
|
},
|
|
2681
2565
|
src: e.video || "no-src",
|
|
2682
2566
|
poster: e.posterImage,
|
|
2683
|
-
children: e.lazyLoad ? null : /* @__PURE__ */
|
|
2567
|
+
children: e.lazyLoad ? null : /* @__PURE__ */ l("source", { type: "video/mp4", src: e.video })
|
|
2684
2568
|
}
|
|
2685
2569
|
),
|
|
2686
|
-
e.aspectRatio && !(e.fitContent && ((
|
|
2570
|
+
e.aspectRatio && !(e.fitContent && ((r = (o = e.builderBlock) == null ? void 0 : o.children) != null && r.length)) ? /* @__PURE__ */ l(g, { children: /* @__PURE__ */ l(
|
|
2687
2571
|
"div",
|
|
2688
2572
|
{
|
|
2689
2573
|
style: {
|
|
@@ -2693,8 +2577,8 @@ function Video(e) {
|
|
|
2693
2577
|
fontSize: "0px"
|
|
2694
2578
|
}
|
|
2695
2579
|
}
|
|
2696
|
-
) : null,
|
|
2697
|
-
(s = (
|
|
2580
|
+
) }) : null,
|
|
2581
|
+
(s = (a = e.builderBlock) == null ? void 0 : a.children) != null && s.length && e.fitContent ? /* @__PURE__ */ l(g, { children: /* @__PURE__ */ l(
|
|
2698
2582
|
"div",
|
|
2699
2583
|
{
|
|
2700
2584
|
style: {
|
|
@@ -2704,8 +2588,8 @@ function Video(e) {
|
|
|
2704
2588
|
},
|
|
2705
2589
|
children: e.children
|
|
2706
2590
|
}
|
|
2707
|
-
) : null,
|
|
2708
|
-
(
|
|
2591
|
+
) }) : null,
|
|
2592
|
+
(c = (d = e.builderBlock) == null ? void 0 : d.children) != null && c.length && !e.fitContent ? /* @__PURE__ */ l(g, { children: /* @__PURE__ */ l(
|
|
2709
2593
|
"div",
|
|
2710
2594
|
{
|
|
2711
2595
|
style: {
|
|
@@ -2721,60 +2605,60 @@ function Video(e) {
|
|
|
2721
2605
|
},
|
|
2722
2606
|
children: e.children
|
|
2723
2607
|
}
|
|
2724
|
-
) : null
|
|
2608
|
+
) }) : null
|
|
2725
2609
|
]
|
|
2726
2610
|
}
|
|
2727
2611
|
);
|
|
2728
2612
|
}
|
|
2729
|
-
const
|
|
2730
|
-
component:
|
|
2731
|
-
...
|
|
2613
|
+
const un = () => [{
|
|
2614
|
+
component: Kt,
|
|
2615
|
+
...Ht
|
|
2732
2616
|
}, {
|
|
2733
|
-
component:
|
|
2734
|
-
...
|
|
2617
|
+
component: Jt,
|
|
2618
|
+
...qt
|
|
2735
2619
|
}, {
|
|
2736
|
-
component:
|
|
2737
|
-
...
|
|
2620
|
+
component: Zt,
|
|
2621
|
+
...Yt
|
|
2738
2622
|
}, {
|
|
2739
|
-
component:
|
|
2740
|
-
...
|
|
2623
|
+
component: tn,
|
|
2624
|
+
...en
|
|
2741
2625
|
}, {
|
|
2742
|
-
component:
|
|
2743
|
-
...
|
|
2626
|
+
component: rn,
|
|
2627
|
+
...an
|
|
2744
2628
|
}, {
|
|
2745
|
-
component:
|
|
2746
|
-
...
|
|
2629
|
+
component: on,
|
|
2630
|
+
...nn
|
|
2747
2631
|
}, {
|
|
2748
|
-
component:
|
|
2749
|
-
...
|
|
2632
|
+
component: sn,
|
|
2633
|
+
...ln
|
|
2750
2634
|
}, {
|
|
2751
|
-
component:
|
|
2752
|
-
...
|
|
2753
|
-
}],
|
|
2754
|
-
component:
|
|
2755
|
-
...
|
|
2635
|
+
component: dn,
|
|
2636
|
+
...cn
|
|
2637
|
+
}], ye = () => [{
|
|
2638
|
+
component: Xe,
|
|
2639
|
+
...Nt
|
|
2756
2640
|
}, {
|
|
2757
|
-
component:
|
|
2758
|
-
...
|
|
2641
|
+
component: Et,
|
|
2642
|
+
...At
|
|
2759
2643
|
}, {
|
|
2760
|
-
component:
|
|
2761
|
-
...
|
|
2644
|
+
component: Rt,
|
|
2645
|
+
...Ft
|
|
2762
2646
|
}, {
|
|
2763
|
-
component:
|
|
2764
|
-
|
|
2647
|
+
component: Bt,
|
|
2648
|
+
...$t
|
|
2765
2649
|
}, {
|
|
2766
|
-
component:
|
|
2767
|
-
...
|
|
2650
|
+
component: Wt,
|
|
2651
|
+
...Lt
|
|
2768
2652
|
}, {
|
|
2769
|
-
component:
|
|
2770
|
-
...
|
|
2653
|
+
component: Mt,
|
|
2654
|
+
...Dt
|
|
2771
2655
|
}, {
|
|
2772
|
-
component:
|
|
2773
|
-
...
|
|
2656
|
+
component: Nn,
|
|
2657
|
+
...jt
|
|
2774
2658
|
}, {
|
|
2775
|
-
component:
|
|
2776
|
-
...
|
|
2777
|
-
}, ...
|
|
2659
|
+
component: Ut,
|
|
2660
|
+
...Ot
|
|
2661
|
+
}, ...un()], mn = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
2778
2662
|
function getAndSetVariantId() {
|
|
2779
2663
|
function setCookie(name, value, days) {
|
|
2780
2664
|
let expires = '';
|
|
@@ -2830,7 +2714,7 @@ const getExtraComponents = () => [{
|
|
|
2830
2714
|
}).join('');
|
|
2831
2715
|
styleEl.innerHTML = newStyleStr;
|
|
2832
2716
|
}
|
|
2833
|
-
}`,
|
|
2717
|
+
}`, fn = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
2834
2718
|
if (!navigator.cookieEnabled) {
|
|
2835
2719
|
return;
|
|
2836
2720
|
}
|
|
@@ -2864,27 +2748,27 @@ const getExtraComponents = () => [{
|
|
|
2864
2748
|
thisScriptEl?.remove();
|
|
2865
2749
|
}
|
|
2866
2750
|
return;
|
|
2867
|
-
}`,
|
|
2751
|
+
}`, Ne = "builderIoAbTest", Ae = "builderIoRenderContent", z = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
2868
2752
|
...t,
|
|
2869
2753
|
testVariationId: t.id,
|
|
2870
2754
|
id: e == null ? void 0 : e.id
|
|
2871
|
-
})),
|
|
2755
|
+
})), hn = ({
|
|
2872
2756
|
canTrack: e,
|
|
2873
2757
|
content: t
|
|
2874
|
-
}) => !(!(
|
|
2875
|
-
window.${
|
|
2876
|
-
window.${
|
|
2877
|
-
`,
|
|
2878
|
-
window.${
|
|
2879
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
2880
|
-
)`,
|
|
2758
|
+
}) => !(!(z(t).length > 0) || !e || Y()), gn = (e) => e === "react" || e === "reactNative", Fe = gn(q), bn = () => `
|
|
2759
|
+
window.${Ne} = ${mn}
|
|
2760
|
+
window.${Ae} = ${fn}
|
|
2761
|
+
`, yn = (e, t) => `
|
|
2762
|
+
window.${Ne}(
|
|
2763
|
+
"${t}",${JSON.stringify(e)}, ${Fe}
|
|
2764
|
+
)`, pn = ({
|
|
2881
2765
|
contentId: e,
|
|
2882
2766
|
variationId: t
|
|
2883
|
-
}) => `window.${
|
|
2884
|
-
"${t}", "${e}", ${
|
|
2767
|
+
}) => `window.${Ae}(
|
|
2768
|
+
"${t}", "${e}", ${Fe}
|
|
2885
2769
|
)`;
|
|
2886
|
-
function
|
|
2887
|
-
return /* @__PURE__ */
|
|
2770
|
+
function ie(e) {
|
|
2771
|
+
return /* @__PURE__ */ l(
|
|
2888
2772
|
"script",
|
|
2889
2773
|
{
|
|
2890
2774
|
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
@@ -2892,10 +2776,10 @@ function InlinedScript(e) {
|
|
|
2892
2776
|
}
|
|
2893
2777
|
);
|
|
2894
2778
|
}
|
|
2895
|
-
function
|
|
2779
|
+
function pe(e) {
|
|
2896
2780
|
return Math.round(e * 1e3) / 1e3;
|
|
2897
2781
|
}
|
|
2898
|
-
const
|
|
2782
|
+
const xn = (e, t, n = !0) => {
|
|
2899
2783
|
if (!(e instanceof HTMLElement))
|
|
2900
2784
|
return null;
|
|
2901
2785
|
let i = n ? e : e.parentElement;
|
|
@@ -2906,28 +2790,28 @@ const findParentElement = (e, t, n = !0) => {
|
|
|
2906
2790
|
return i;
|
|
2907
2791
|
} while (i = i.parentElement);
|
|
2908
2792
|
return null;
|
|
2909
|
-
},
|
|
2793
|
+
}, Sn = (e) => xn(e, (t) => {
|
|
2910
2794
|
const n = t.getAttribute("builder-id") || t.id;
|
|
2911
2795
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
2912
|
-
}),
|
|
2796
|
+
}), xe = ({
|
|
2913
2797
|
event: e,
|
|
2914
2798
|
target: t
|
|
2915
2799
|
}) => {
|
|
2916
|
-
const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top,
|
|
2800
|
+
const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top, r = pe(i / n.width), a = pe(o / n.height);
|
|
2917
2801
|
return {
|
|
2918
|
-
x:
|
|
2919
|
-
y:
|
|
2802
|
+
x: r,
|
|
2803
|
+
y: a
|
|
2920
2804
|
};
|
|
2921
|
-
},
|
|
2922
|
-
const t = e.target, n = t &&
|
|
2805
|
+
}, vn = (e) => {
|
|
2806
|
+
const t = e.target, n = t && Sn(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2923
2807
|
return {
|
|
2924
2808
|
targetBuilderElement: i || void 0,
|
|
2925
2809
|
metadata: {
|
|
2926
|
-
targetOffset: t ?
|
|
2810
|
+
targetOffset: t ? xe({
|
|
2927
2811
|
event: e,
|
|
2928
2812
|
target: t
|
|
2929
2813
|
}) : void 0,
|
|
2930
|
-
builderTargetOffset: n ?
|
|
2814
|
+
builderTargetOffset: n ? xe({
|
|
2931
2815
|
event: e,
|
|
2932
2816
|
target: n
|
|
2933
2817
|
}) : void 0,
|
|
@@ -2935,71 +2819,71 @@ const findParentElement = (e, t, n = !0) => {
|
|
|
2935
2819
|
}
|
|
2936
2820
|
};
|
|
2937
2821
|
};
|
|
2938
|
-
function
|
|
2939
|
-
var
|
|
2940
|
-
const t =
|
|
2941
|
-
function n(
|
|
2942
|
-
var
|
|
2943
|
-
const
|
|
2822
|
+
function kn(e) {
|
|
2823
|
+
var R, x, I, P, E, $, L;
|
|
2824
|
+
const t = X(null);
|
|
2825
|
+
function n(u) {
|
|
2826
|
+
var k, y;
|
|
2827
|
+
const h = {
|
|
2944
2828
|
...e.builderContextSignal.rootState,
|
|
2945
|
-
...
|
|
2829
|
+
...u
|
|
2946
2830
|
};
|
|
2947
|
-
e.builderContextSignal.rootSetState ? (
|
|
2948
|
-
...
|
|
2949
|
-
rootState:
|
|
2831
|
+
e.builderContextSignal.rootSetState ? (y = (k = e.builderContextSignal).rootSetState) == null || y.call(k, h) : e.setBuilderContextSignal((S) => ({
|
|
2832
|
+
...S,
|
|
2833
|
+
rootState: h
|
|
2950
2834
|
}));
|
|
2951
2835
|
}
|
|
2952
|
-
function i(
|
|
2953
|
-
var
|
|
2954
|
-
const
|
|
2836
|
+
function i(u) {
|
|
2837
|
+
var k, y, S, W, M;
|
|
2838
|
+
const h = {
|
|
2955
2839
|
...e.builderContextSignal.content,
|
|
2956
|
-
...
|
|
2840
|
+
...u,
|
|
2957
2841
|
data: {
|
|
2958
|
-
...(
|
|
2959
|
-
...
|
|
2842
|
+
...(k = e.builderContextSignal.content) == null ? void 0 : k.data,
|
|
2843
|
+
...u == null ? void 0 : u.data
|
|
2960
2844
|
},
|
|
2961
2845
|
meta: {
|
|
2962
|
-
...(
|
|
2963
|
-
...
|
|
2964
|
-
breakpoints: ((
|
|
2846
|
+
...(y = e.builderContextSignal.content) == null ? void 0 : y.meta,
|
|
2847
|
+
...u == null ? void 0 : u.meta,
|
|
2848
|
+
breakpoints: ((S = u == null ? void 0 : u.meta) == null ? void 0 : S.breakpoints) || ((M = (W = e.builderContextSignal.content) == null ? void 0 : W.meta) == null ? void 0 : M.breakpoints)
|
|
2965
2849
|
}
|
|
2966
2850
|
};
|
|
2967
|
-
e.setBuilderContextSignal((
|
|
2968
|
-
...
|
|
2969
|
-
content:
|
|
2851
|
+
e.setBuilderContextSignal((N) => ({
|
|
2852
|
+
...N,
|
|
2853
|
+
content: h
|
|
2970
2854
|
}));
|
|
2971
2855
|
}
|
|
2972
|
-
const [o,
|
|
2856
|
+
const [o, r] = C(
|
|
2973
2857
|
() => e.contentWrapper || "div"
|
|
2974
2858
|
);
|
|
2975
|
-
function
|
|
2976
|
-
return
|
|
2859
|
+
function a(u) {
|
|
2860
|
+
return He({
|
|
2977
2861
|
model: e.model,
|
|
2978
2862
|
trustedHosts: e.trustedHosts,
|
|
2979
2863
|
callbacks: {
|
|
2980
|
-
configureSdk: (
|
|
2981
|
-
var
|
|
2982
|
-
const { breakpoints:
|
|
2983
|
-
!
|
|
2864
|
+
configureSdk: (h) => {
|
|
2865
|
+
var S;
|
|
2866
|
+
const { breakpoints: k, contentId: y } = h;
|
|
2867
|
+
!y || y !== ((S = e.builderContextSignal.content) == null ? void 0 : S.id) || k && i({
|
|
2984
2868
|
meta: {
|
|
2985
|
-
breakpoints:
|
|
2869
|
+
breakpoints: k
|
|
2986
2870
|
}
|
|
2987
2871
|
});
|
|
2988
2872
|
},
|
|
2989
|
-
animation: (
|
|
2990
|
-
|
|
2873
|
+
animation: (h) => {
|
|
2874
|
+
Ee(h);
|
|
2991
2875
|
},
|
|
2992
|
-
contentUpdate: (
|
|
2993
|
-
i(
|
|
2876
|
+
contentUpdate: (h) => {
|
|
2877
|
+
i(h);
|
|
2994
2878
|
}
|
|
2995
2879
|
}
|
|
2996
|
-
})(
|
|
2880
|
+
})(u);
|
|
2997
2881
|
}
|
|
2998
2882
|
function s() {
|
|
2999
|
-
var
|
|
3000
|
-
const
|
|
3001
|
-
|
|
3002
|
-
code:
|
|
2883
|
+
var h, k;
|
|
2884
|
+
const u = (k = (h = e.builderContextSignal.content) == null ? void 0 : h.data) == null ? void 0 : k.jsCode;
|
|
2885
|
+
u && K({
|
|
2886
|
+
code: u,
|
|
3003
2887
|
context: e.context || {},
|
|
3004
2888
|
localState: void 0,
|
|
3005
2889
|
rootState: e.builderContextSignal.rootState,
|
|
@@ -3010,35 +2894,35 @@ function EnableEditor(e) {
|
|
|
3010
2894
|
enableCache: !1
|
|
3011
2895
|
});
|
|
3012
2896
|
}
|
|
3013
|
-
const [
|
|
3014
|
-
function
|
|
3015
|
-
var
|
|
2897
|
+
const [d, c] = C(() => ({})), [m, f] = C(() => ({})), [b, p] = C(() => !1);
|
|
2898
|
+
function v(u) {
|
|
2899
|
+
var h, k;
|
|
3016
2900
|
if (e.builderContextSignal.content) {
|
|
3017
|
-
const
|
|
3018
|
-
|
|
2901
|
+
const y = (h = e.builderContextSignal.content) == null ? void 0 : h.testVariationId, S = (k = e.builderContextSignal.content) == null ? void 0 : k.id;
|
|
2902
|
+
ue({
|
|
3019
2903
|
type: "click",
|
|
3020
|
-
canTrack:
|
|
3021
|
-
contentId:
|
|
2904
|
+
canTrack: G(e.canTrack),
|
|
2905
|
+
contentId: S,
|
|
3022
2906
|
apiKey: e.apiKey,
|
|
3023
|
-
variationId:
|
|
3024
|
-
...
|
|
3025
|
-
unique: !
|
|
2907
|
+
variationId: y !== S ? y : void 0,
|
|
2908
|
+
...vn(u),
|
|
2909
|
+
unique: !b
|
|
3026
2910
|
});
|
|
3027
2911
|
}
|
|
3028
|
-
|
|
2912
|
+
b || p(!0);
|
|
3029
2913
|
}
|
|
3030
|
-
function
|
|
3031
|
-
var
|
|
3032
|
-
const
|
|
3033
|
-
Object.entries(
|
|
3034
|
-
if (!
|
|
2914
|
+
function w() {
|
|
2915
|
+
var h, k, y;
|
|
2916
|
+
const u = (y = (k = (h = e.builderContextSignal.content) == null ? void 0 : h.data) == null ? void 0 : k.httpRequests) != null ? y : {};
|
|
2917
|
+
Object.entries(u).forEach(([S, W]) => {
|
|
2918
|
+
if (!W || m[S] || d[S] && !F())
|
|
3035
2919
|
return;
|
|
3036
|
-
|
|
3037
|
-
const
|
|
2920
|
+
m[S] = !0;
|
|
2921
|
+
const M = W.replace(
|
|
3038
2922
|
/{{([^}]+)}}/g,
|
|
3039
|
-
(
|
|
3040
|
-
|
|
3041
|
-
code:
|
|
2923
|
+
(N, $e) => String(
|
|
2924
|
+
K({
|
|
2925
|
+
code: $e,
|
|
3042
2926
|
context: e.context || {},
|
|
3043
2927
|
localState: void 0,
|
|
3044
2928
|
rootState: e.builderContextSignal.rootState,
|
|
@@ -3047,24 +2931,24 @@ function EnableEditor(e) {
|
|
|
3047
2931
|
})
|
|
3048
2932
|
)
|
|
3049
2933
|
);
|
|
3050
|
-
|
|
2934
|
+
Ke(M).then((N) => N.json()).then((N) => {
|
|
3051
2935
|
n({
|
|
3052
|
-
[
|
|
3053
|
-
}),
|
|
3054
|
-
}).catch((
|
|
3055
|
-
console.error("error fetching dynamic data",
|
|
2936
|
+
[S]: N
|
|
2937
|
+
}), d[S] = !0;
|
|
2938
|
+
}).catch((N) => {
|
|
2939
|
+
console.error("error fetching dynamic data", W, N);
|
|
3056
2940
|
}).finally(() => {
|
|
3057
|
-
|
|
2941
|
+
m[S] = !1;
|
|
3058
2942
|
});
|
|
3059
2943
|
});
|
|
3060
2944
|
}
|
|
3061
|
-
function
|
|
3062
|
-
|
|
2945
|
+
function T() {
|
|
2946
|
+
F() && window.dispatchEvent(
|
|
3063
2947
|
new CustomEvent(
|
|
3064
2948
|
"builder:component:stateChange",
|
|
3065
2949
|
{
|
|
3066
2950
|
detail: {
|
|
3067
|
-
state:
|
|
2951
|
+
state: oe(e.builderContextSignal.rootState),
|
|
3068
2952
|
ref: {
|
|
3069
2953
|
name: e.model
|
|
3070
2954
|
}
|
|
@@ -3073,10 +2957,10 @@ function EnableEditor(e) {
|
|
|
3073
2957
|
)
|
|
3074
2958
|
);
|
|
3075
2959
|
}
|
|
3076
|
-
return
|
|
3077
|
-
var
|
|
3078
|
-
if (
|
|
3079
|
-
if (
|
|
2960
|
+
return V(() => {
|
|
2961
|
+
var u, h;
|
|
2962
|
+
if (Y()) {
|
|
2963
|
+
if (F() && (window.addEventListener("message", a), Me(), je({
|
|
3080
2964
|
...e.locale ? {
|
|
3081
2965
|
locale: e.locale
|
|
3082
2966
|
} : {},
|
|
@@ -3088,79 +2972,79 @@ function EnableEditor(e) {
|
|
|
3088
2972
|
} : {}
|
|
3089
2973
|
}), Object.values(
|
|
3090
2974
|
e.builderContextSignal.componentInfos
|
|
3091
|
-
).forEach((
|
|
3092
|
-
var
|
|
3093
|
-
const
|
|
3094
|
-
(
|
|
2975
|
+
).forEach((y) => {
|
|
2976
|
+
var W;
|
|
2977
|
+
const S = Oe(y);
|
|
2978
|
+
(W = window.parent) == null || W.postMessage(S, "*");
|
|
3095
2979
|
}), window.addEventListener(
|
|
3096
2980
|
"builder:component:stateChangeListenerActivated",
|
|
3097
|
-
|
|
3098
|
-
)), e.builderContextSignal.content &&
|
|
3099
|
-
const
|
|
3100
|
-
|
|
2981
|
+
T
|
|
2982
|
+
)), e.builderContextSignal.content && G(e.canTrack)) {
|
|
2983
|
+
const y = (u = e.builderContextSignal.content) == null ? void 0 : u.testVariationId, S = (h = e.builderContextSignal.content) == null ? void 0 : h.id, W = e.apiKey;
|
|
2984
|
+
ue({
|
|
3101
2985
|
type: "impression",
|
|
3102
2986
|
canTrack: !0,
|
|
3103
|
-
contentId:
|
|
3104
|
-
apiKey:
|
|
3105
|
-
variationId:
|
|
2987
|
+
contentId: S,
|
|
2988
|
+
apiKey: W,
|
|
2989
|
+
variationId: y !== S ? y : void 0
|
|
3106
2990
|
});
|
|
3107
2991
|
}
|
|
3108
|
-
if (
|
|
3109
|
-
const
|
|
3110
|
-
`builder.preview.${
|
|
3111
|
-
),
|
|
3112
|
-
|
|
2992
|
+
if (Ue()) {
|
|
2993
|
+
const y = new URL(location.href).searchParams, S = y.get("builder.preview"), W = y.get(
|
|
2994
|
+
`builder.preview.${S}`
|
|
2995
|
+
), M = y.get("apiKey") || y.get("builder.space");
|
|
2996
|
+
S === e.model && M === e.apiKey && (!e.content || W === e.content.id) && ve({
|
|
3113
2997
|
model: e.model,
|
|
3114
2998
|
apiKey: e.apiKey,
|
|
3115
2999
|
apiVersion: e.builderContextSignal.apiVersion
|
|
3116
|
-
}).then((
|
|
3117
|
-
|
|
3000
|
+
}).then((N) => {
|
|
3001
|
+
N && i(N);
|
|
3118
3002
|
});
|
|
3119
3003
|
}
|
|
3120
3004
|
}
|
|
3121
|
-
}, []),
|
|
3122
|
-
e.apiKey ||
|
|
3005
|
+
}, []), V(() => {
|
|
3006
|
+
e.apiKey || U.error(
|
|
3123
3007
|
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
3124
|
-
), s(),
|
|
3125
|
-
}, []),
|
|
3008
|
+
), s(), w(), T();
|
|
3009
|
+
}, []), V(() => {
|
|
3126
3010
|
e.content && i(e.content);
|
|
3127
|
-
}, [e.content]),
|
|
3011
|
+
}, [e.content]), V(() => {
|
|
3128
3012
|
s();
|
|
3129
|
-
}, [(
|
|
3130
|
-
|
|
3131
|
-
}, [(
|
|
3132
|
-
|
|
3133
|
-
}, [e.builderContextSignal.rootState]),
|
|
3013
|
+
}, [(x = (R = e.builderContextSignal.content) == null ? void 0 : R.data) == null ? void 0 : x.jsCode]), V(() => {
|
|
3014
|
+
w();
|
|
3015
|
+
}, [(P = (I = e.builderContextSignal.content) == null ? void 0 : I.data) == null ? void 0 : P.httpRequests]), V(() => {
|
|
3016
|
+
T();
|
|
3017
|
+
}, [e.builderContextSignal.rootState]), V(() => {
|
|
3134
3018
|
e.data && n(e.data);
|
|
3135
|
-
}, [e.data]),
|
|
3019
|
+
}, [e.data]), V(() => {
|
|
3136
3020
|
e.locale && n({
|
|
3137
3021
|
locale: e.locale
|
|
3138
3022
|
});
|
|
3139
|
-
}, [e.locale]),
|
|
3140
|
-
|
|
3023
|
+
}, [e.locale]), V(() => () => {
|
|
3024
|
+
Y() && (window.removeEventListener("message", a), window.removeEventListener(
|
|
3141
3025
|
"builder:component:stateChangeListenerActivated",
|
|
3142
|
-
|
|
3026
|
+
T
|
|
3143
3027
|
));
|
|
3144
|
-
}, []), /* @__PURE__ */
|
|
3028
|
+
}, []), /* @__PURE__ */ l(re.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ l(g, { children: /* @__PURE__ */ l(
|
|
3145
3029
|
o,
|
|
3146
3030
|
{
|
|
3147
3031
|
ref: t,
|
|
3148
|
-
onClick: (
|
|
3149
|
-
"builder-content-id": (
|
|
3032
|
+
onClick: (u) => v(u),
|
|
3033
|
+
"builder-content-id": (E = e.builderContextSignal.content) == null ? void 0 : E.id,
|
|
3150
3034
|
"builder-model": e.model,
|
|
3151
3035
|
...e.showContent ? {} : {
|
|
3152
3036
|
hidden: !0,
|
|
3153
3037
|
"aria-hidden": !0
|
|
3154
3038
|
},
|
|
3155
3039
|
...e.contentWrapperProps,
|
|
3156
|
-
className: `variant-${((
|
|
3040
|
+
className: `variant-${(($ = e.content) == null ? void 0 : $.testVariationId) || ((L = e.content) == null ? void 0 : L.id)}`,
|
|
3157
3041
|
children: e.children
|
|
3158
3042
|
}
|
|
3159
|
-
) : null });
|
|
3043
|
+
) }) : null });
|
|
3160
3044
|
}
|
|
3161
|
-
const
|
|
3162
|
-
var
|
|
3163
|
-
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (
|
|
3045
|
+
const Cn = (e) => {
|
|
3046
|
+
var r, a;
|
|
3047
|
+
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (a = e.fileUrl) != null ? a : (r = e == null ? void 0 : e.files) == null ? void 0 : r.regular;
|
|
3164
3048
|
let o = "";
|
|
3165
3049
|
if (i && t && n && (o += `
|
|
3166
3050
|
@font-face {
|
|
@@ -3173,26 +3057,26 @@ font-weight: 400;
|
|
|
3173
3057
|
for (const s in e.files) {
|
|
3174
3058
|
if (!(String(Number(s)) === s))
|
|
3175
3059
|
continue;
|
|
3176
|
-
const
|
|
3177
|
-
|
|
3060
|
+
const c = e.files[s];
|
|
3061
|
+
c && c !== i && (o += `
|
|
3178
3062
|
@font-face {
|
|
3179
3063
|
font-family: "${t}";
|
|
3180
|
-
src: url('${
|
|
3064
|
+
src: url('${c}') format('woff2');
|
|
3181
3065
|
font-display: fallback;
|
|
3182
3066
|
font-weight: ${s};
|
|
3183
3067
|
}
|
|
3184
3068
|
`.trim());
|
|
3185
3069
|
}
|
|
3186
3070
|
return o;
|
|
3187
|
-
},
|
|
3071
|
+
}, wn = ({
|
|
3188
3072
|
customFonts: e
|
|
3189
3073
|
}) => {
|
|
3190
3074
|
var t;
|
|
3191
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
3192
|
-
},
|
|
3075
|
+
return ((t = e == null ? void 0 : e.map((n) => Cn(n))) == null ? void 0 : t.join(" ")) || "";
|
|
3076
|
+
}, In = ({
|
|
3193
3077
|
cssCode: e,
|
|
3194
3078
|
contentId: t
|
|
3195
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
3079
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", Tn = `
|
|
3196
3080
|
.builder-button {
|
|
3197
3081
|
all: unset;
|
|
3198
3082
|
}
|
|
@@ -3209,31 +3093,31 @@ font-weight: ${s};
|
|
|
3209
3093
|
text-align: inherit;
|
|
3210
3094
|
font-family: inherit;
|
|
3211
3095
|
}
|
|
3212
|
-
`,
|
|
3213
|
-
function
|
|
3214
|
-
const [t, n] =
|
|
3096
|
+
`, En = (e) => e ? "" : Tn;
|
|
3097
|
+
function Rn(e) {
|
|
3098
|
+
const [t, n] = C(
|
|
3215
3099
|
() => `
|
|
3216
|
-
${
|
|
3100
|
+
${In({
|
|
3217
3101
|
cssCode: e.cssCode,
|
|
3218
3102
|
contentId: e.contentId
|
|
3219
3103
|
})}
|
|
3220
|
-
${
|
|
3104
|
+
${wn({
|
|
3221
3105
|
customFonts: e.customFonts
|
|
3222
3106
|
})}
|
|
3223
|
-
${
|
|
3107
|
+
${En(e.isNestedRender)}
|
|
3224
3108
|
`.trim()
|
|
3225
3109
|
);
|
|
3226
|
-
return /* @__PURE__ */
|
|
3110
|
+
return /* @__PURE__ */ l(Z, { id: "builderio-content", styles: t });
|
|
3227
3111
|
}
|
|
3228
|
-
const
|
|
3112
|
+
const Pn = ({
|
|
3229
3113
|
content: e,
|
|
3230
3114
|
data: t,
|
|
3231
3115
|
locale: n
|
|
3232
3116
|
}) => {
|
|
3233
|
-
var
|
|
3234
|
-
const i = {}, o = ((
|
|
3235
|
-
return (s = (
|
|
3236
|
-
|
|
3117
|
+
var r, a, s;
|
|
3118
|
+
const i = {}, o = ((r = e == null ? void 0 : e.data) == null ? void 0 : r.state) || {};
|
|
3119
|
+
return (s = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || s.forEach((d) => {
|
|
3120
|
+
d.name && d.defaultValue !== void 0 && (i[d.name] = d.defaultValue);
|
|
3237
3121
|
}), {
|
|
3238
3122
|
...i,
|
|
3239
3123
|
...o,
|
|
@@ -3242,7 +3126,7 @@ const getRootStateInitialValue = ({
|
|
|
3242
3126
|
locale: n
|
|
3243
3127
|
} : {}
|
|
3244
3128
|
};
|
|
3245
|
-
},
|
|
3129
|
+
}, Vn = ({
|
|
3246
3130
|
content: e,
|
|
3247
3131
|
data: t
|
|
3248
3132
|
}) => e ? {
|
|
@@ -3253,46 +3137,46 @@ const getRootStateInitialValue = ({
|
|
|
3253
3137
|
},
|
|
3254
3138
|
meta: e == null ? void 0 : e.meta
|
|
3255
3139
|
} : void 0;
|
|
3256
|
-
function
|
|
3257
|
-
var
|
|
3258
|
-
const [t, n] =
|
|
3140
|
+
function Se(e) {
|
|
3141
|
+
var d, c, m, f, b, p, v;
|
|
3142
|
+
const [t, n] = C(
|
|
3259
3143
|
() => {
|
|
3260
|
-
var
|
|
3261
|
-
return
|
|
3144
|
+
var w, T;
|
|
3145
|
+
return pn({
|
|
3262
3146
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3263
|
-
variationId: (
|
|
3147
|
+
variationId: (w = e.content) == null ? void 0 : w.testVariationId,
|
|
3264
3148
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3265
|
-
contentId: (
|
|
3149
|
+
contentId: (T = e.content) == null ? void 0 : T.id
|
|
3266
3150
|
});
|
|
3267
3151
|
}
|
|
3268
3152
|
);
|
|
3269
|
-
function i(
|
|
3270
|
-
s((
|
|
3271
|
-
...
|
|
3272
|
-
rootState:
|
|
3153
|
+
function i(w) {
|
|
3154
|
+
s((T) => ({
|
|
3155
|
+
...T,
|
|
3156
|
+
rootState: w
|
|
3273
3157
|
}));
|
|
3274
3158
|
}
|
|
3275
|
-
const [o,
|
|
3159
|
+
const [o, r] = C(
|
|
3276
3160
|
() => [
|
|
3277
|
-
...
|
|
3161
|
+
...ye(),
|
|
3278
3162
|
...e.customComponents || []
|
|
3279
3163
|
].reduce(
|
|
3280
|
-
(
|
|
3281
|
-
...
|
|
3282
|
-
[
|
|
3283
|
-
component:
|
|
3284
|
-
...
|
|
3164
|
+
(w, { component: T, ...R }) => ({
|
|
3165
|
+
...w,
|
|
3166
|
+
[R.name]: {
|
|
3167
|
+
component: T,
|
|
3168
|
+
...me(R)
|
|
3285
3169
|
}
|
|
3286
3170
|
}),
|
|
3287
3171
|
{}
|
|
3288
3172
|
)
|
|
3289
|
-
), [
|
|
3290
|
-
content:
|
|
3173
|
+
), [a, s] = C(() => ({
|
|
3174
|
+
content: Vn({
|
|
3291
3175
|
content: e.content,
|
|
3292
3176
|
data: e.data
|
|
3293
3177
|
}),
|
|
3294
3178
|
localState: void 0,
|
|
3295
|
-
rootState:
|
|
3179
|
+
rootState: Pn({
|
|
3296
3180
|
content: e.content,
|
|
3297
3181
|
data: e.data,
|
|
3298
3182
|
locale: e.locale
|
|
@@ -3302,12 +3186,12 @@ function ContentComponent(e) {
|
|
|
3302
3186
|
apiKey: e.apiKey,
|
|
3303
3187
|
apiVersion: e.apiVersion,
|
|
3304
3188
|
componentInfos: [
|
|
3305
|
-
...
|
|
3189
|
+
...ye(),
|
|
3306
3190
|
...e.customComponents || []
|
|
3307
3191
|
].reduce(
|
|
3308
|
-
(
|
|
3309
|
-
...
|
|
3310
|
-
[
|
|
3192
|
+
(w, { component: T, ...R }) => ({
|
|
3193
|
+
...w,
|
|
3194
|
+
[R.name]: me(R)
|
|
3311
3195
|
}),
|
|
3312
3196
|
{}
|
|
3313
3197
|
),
|
|
@@ -3315,14 +3199,14 @@ function ContentComponent(e) {
|
|
|
3315
3199
|
BlocksWrapper: e.blocksWrapper || "div",
|
|
3316
3200
|
BlocksWrapperProps: e.blocksWrapperProps || {}
|
|
3317
3201
|
}));
|
|
3318
|
-
return /* @__PURE__ */
|
|
3319
|
-
|
|
3202
|
+
return /* @__PURE__ */ l(
|
|
3203
|
+
Ie.Provider,
|
|
3320
3204
|
{
|
|
3321
3205
|
value: {
|
|
3322
3206
|
registeredComponents: o
|
|
3323
3207
|
},
|
|
3324
|
-
children: /* @__PURE__ */
|
|
3325
|
-
|
|
3208
|
+
children: /* @__PURE__ */ B(
|
|
3209
|
+
kn,
|
|
3326
3210
|
{
|
|
3327
3211
|
content: e.content,
|
|
3328
3212
|
data: e.data,
|
|
@@ -3333,34 +3217,34 @@ function ContentComponent(e) {
|
|
|
3333
3217
|
locale: e.locale,
|
|
3334
3218
|
enrich: e.enrich,
|
|
3335
3219
|
showContent: e.showContent,
|
|
3336
|
-
builderContextSignal:
|
|
3220
|
+
builderContextSignal: a,
|
|
3337
3221
|
contentWrapper: e.contentWrapper,
|
|
3338
3222
|
contentWrapperProps: e.contentWrapperProps,
|
|
3339
3223
|
linkComponent: e.linkComponent,
|
|
3340
3224
|
trustedHosts: e.trustedHosts,
|
|
3341
3225
|
setBuilderContextSignal: s,
|
|
3342
3226
|
children: [
|
|
3343
|
-
e.isSsrAbTest ? /* @__PURE__ */
|
|
3344
|
-
|
|
3227
|
+
e.isSsrAbTest ? /* @__PURE__ */ l(g, { children: /* @__PURE__ */ l(
|
|
3228
|
+
ie,
|
|
3345
3229
|
{
|
|
3346
3230
|
id: "builderio-variant-visibility",
|
|
3347
3231
|
scriptStr: t
|
|
3348
3232
|
}
|
|
3349
|
-
) : null,
|
|
3350
|
-
/* @__PURE__ */
|
|
3351
|
-
|
|
3233
|
+
) }) : null,
|
|
3234
|
+
/* @__PURE__ */ l(g, { children: /* @__PURE__ */ l(
|
|
3235
|
+
Rn,
|
|
3352
3236
|
{
|
|
3353
3237
|
isNestedRender: e.isNestedRender,
|
|
3354
|
-
contentId: (
|
|
3355
|
-
cssCode: (
|
|
3356
|
-
customFonts: (
|
|
3238
|
+
contentId: (d = a.content) == null ? void 0 : d.id,
|
|
3239
|
+
cssCode: (m = (c = a.content) == null ? void 0 : c.data) == null ? void 0 : m.cssCode,
|
|
3240
|
+
customFonts: (b = (f = a.content) == null ? void 0 : f.data) == null ? void 0 : b.customFonts
|
|
3357
3241
|
}
|
|
3358
|
-
),
|
|
3359
|
-
/* @__PURE__ */
|
|
3360
|
-
|
|
3242
|
+
) }),
|
|
3243
|
+
/* @__PURE__ */ l(
|
|
3244
|
+
O,
|
|
3361
3245
|
{
|
|
3362
|
-
blocks: (
|
|
3363
|
-
context:
|
|
3246
|
+
blocks: (v = (p = a.content) == null ? void 0 : p.data) == null ? void 0 : v.blocks,
|
|
3247
|
+
context: a,
|
|
3364
3248
|
registeredComponents: o,
|
|
3365
3249
|
linkComponent: e.linkComponent
|
|
3366
3250
|
}
|
|
@@ -3371,63 +3255,63 @@ function ContentComponent(e) {
|
|
|
3371
3255
|
}
|
|
3372
3256
|
);
|
|
3373
3257
|
}
|
|
3374
|
-
function
|
|
3375
|
-
var
|
|
3376
|
-
const [t, n] =
|
|
3377
|
-
() =>
|
|
3378
|
-
canTrack:
|
|
3258
|
+
function Bn(e) {
|
|
3259
|
+
var a;
|
|
3260
|
+
const [t, n] = C(
|
|
3261
|
+
() => hn({
|
|
3262
|
+
canTrack: G(e.canTrack),
|
|
3379
3263
|
content: e.content
|
|
3380
3264
|
})
|
|
3381
3265
|
);
|
|
3382
3266
|
function i() {
|
|
3383
3267
|
var s;
|
|
3384
|
-
return
|
|
3385
|
-
|
|
3386
|
-
id:
|
|
3387
|
-
testRatio:
|
|
3268
|
+
return yn(
|
|
3269
|
+
z(e.content).map((d) => ({
|
|
3270
|
+
id: d.testVariationId,
|
|
3271
|
+
testRatio: d.testRatio
|
|
3388
3272
|
})),
|
|
3389
3273
|
((s = e.content) == null ? void 0 : s.id) || ""
|
|
3390
3274
|
);
|
|
3391
3275
|
}
|
|
3392
3276
|
function o() {
|
|
3393
|
-
return
|
|
3277
|
+
return z(e.content).map((s) => `.variant-${s.testVariationId} { display: none; } `).join("");
|
|
3394
3278
|
}
|
|
3395
|
-
function
|
|
3279
|
+
function r() {
|
|
3396
3280
|
var s;
|
|
3397
3281
|
return t ? {
|
|
3398
3282
|
...e.content,
|
|
3399
3283
|
testVariationId: (s = e.content) == null ? void 0 : s.id
|
|
3400
|
-
} :
|
|
3284
|
+
} : qe({
|
|
3401
3285
|
item: e.content,
|
|
3402
|
-
canTrack:
|
|
3286
|
+
canTrack: G(e.canTrack)
|
|
3403
3287
|
});
|
|
3404
3288
|
}
|
|
3405
|
-
return
|
|
3406
|
-
}, []), /* @__PURE__ */
|
|
3407
|
-
!e.isNestedRender &&
|
|
3408
|
-
|
|
3289
|
+
return V(() => {
|
|
3290
|
+
}, []), /* @__PURE__ */ B(g, { children: [
|
|
3291
|
+
!e.isNestedRender && q !== "reactNative" ? /* @__PURE__ */ l(g, { children: /* @__PURE__ */ l(
|
|
3292
|
+
ie,
|
|
3409
3293
|
{
|
|
3410
3294
|
id: "builderio-init-variants-fns",
|
|
3411
|
-
scriptStr:
|
|
3295
|
+
scriptStr: bn()
|
|
3412
3296
|
}
|
|
3413
|
-
) : null,
|
|
3414
|
-
t ? /* @__PURE__ */
|
|
3415
|
-
/* @__PURE__ */
|
|
3416
|
-
|
|
3297
|
+
) }) : null,
|
|
3298
|
+
t ? /* @__PURE__ */ B(g, { children: [
|
|
3299
|
+
/* @__PURE__ */ l(
|
|
3300
|
+
Z,
|
|
3417
3301
|
{
|
|
3418
3302
|
id: "builderio-variants",
|
|
3419
3303
|
styles: o()
|
|
3420
3304
|
}
|
|
3421
3305
|
),
|
|
3422
|
-
/* @__PURE__ */
|
|
3423
|
-
|
|
3306
|
+
/* @__PURE__ */ l(
|
|
3307
|
+
ie,
|
|
3424
3308
|
{
|
|
3425
3309
|
id: "builderio-variants-visibility",
|
|
3426
3310
|
scriptStr: i()
|
|
3427
3311
|
}
|
|
3428
3312
|
),
|
|
3429
|
-
(
|
|
3430
|
-
|
|
3313
|
+
(a = z(e.content)) == null ? void 0 : a.map((s) => /* @__PURE__ */ l(
|
|
3314
|
+
Se,
|
|
3431
3315
|
{
|
|
3432
3316
|
isNestedRender: e.isNestedRender,
|
|
3433
3317
|
content: s,
|
|
@@ -3452,11 +3336,11 @@ function ContentVariants(e) {
|
|
|
3452
3336
|
s.testVariationId
|
|
3453
3337
|
))
|
|
3454
3338
|
] }) : null,
|
|
3455
|
-
/* @__PURE__ */
|
|
3456
|
-
|
|
3339
|
+
/* @__PURE__ */ l(
|
|
3340
|
+
Se,
|
|
3457
3341
|
{
|
|
3458
3342
|
isNestedRender: e.isNestedRender,
|
|
3459
|
-
content:
|
|
3343
|
+
content: r(),
|
|
3460
3344
|
showContent: !0,
|
|
3461
3345
|
model: e.model,
|
|
3462
3346
|
data: e.data,
|
|
@@ -3478,13 +3362,13 @@ function ContentVariants(e) {
|
|
|
3478
3362
|
)
|
|
3479
3363
|
] });
|
|
3480
3364
|
}
|
|
3481
|
-
const
|
|
3365
|
+
const Wn = async ({
|
|
3482
3366
|
builderContextValue: e,
|
|
3483
3367
|
symbol: t
|
|
3484
3368
|
}) => {
|
|
3485
3369
|
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
3486
3370
|
(e != null && e.apiKey))
|
|
3487
|
-
return
|
|
3371
|
+
return ve({
|
|
3488
3372
|
model: t.model,
|
|
3489
3373
|
apiKey: e.apiKey,
|
|
3490
3374
|
apiVersion: e.apiVersion,
|
|
@@ -3494,52 +3378,52 @@ const fetchSymbolContent = async ({
|
|
|
3494
3378
|
}
|
|
3495
3379
|
}
|
|
3496
3380
|
}).catch((n) => {
|
|
3497
|
-
|
|
3381
|
+
U.error("Could not fetch symbol content: ", n);
|
|
3498
3382
|
});
|
|
3499
3383
|
};
|
|
3500
|
-
function
|
|
3501
|
-
var
|
|
3384
|
+
function Nn(e) {
|
|
3385
|
+
var r, a, s, d;
|
|
3502
3386
|
function t() {
|
|
3503
|
-
var
|
|
3387
|
+
var c, m;
|
|
3504
3388
|
return [
|
|
3505
|
-
e.attributes[
|
|
3389
|
+
e.attributes[H()],
|
|
3506
3390
|
"builder-symbol",
|
|
3507
|
-
(
|
|
3508
|
-
(
|
|
3391
|
+
(c = e.symbol) != null && c.inline ? "builder-inline-symbol" : void 0,
|
|
3392
|
+
(m = e.symbol) != null && m.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
3509
3393
|
].filter(Boolean).join(" ");
|
|
3510
3394
|
}
|
|
3511
|
-
const [n, i] =
|
|
3512
|
-
var
|
|
3513
|
-
return (
|
|
3395
|
+
const [n, i] = C(() => {
|
|
3396
|
+
var c;
|
|
3397
|
+
return (c = e.symbol) == null ? void 0 : c.content;
|
|
3514
3398
|
});
|
|
3515
3399
|
function o() {
|
|
3516
|
-
n ||
|
|
3400
|
+
n || Wn({
|
|
3517
3401
|
symbol: e.symbol,
|
|
3518
3402
|
builderContextValue: e.builderContext
|
|
3519
|
-
}).then((
|
|
3520
|
-
|
|
3403
|
+
}).then((c) => {
|
|
3404
|
+
c && i(c);
|
|
3521
3405
|
});
|
|
3522
3406
|
}
|
|
3523
|
-
return
|
|
3524
|
-
}, []),
|
|
3407
|
+
return V(() => {
|
|
3408
|
+
}, []), V(() => {
|
|
3525
3409
|
o();
|
|
3526
|
-
}, [e.symbol]), /* @__PURE__ */
|
|
3527
|
-
|
|
3410
|
+
}, [e.symbol]), /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
|
|
3411
|
+
Bn,
|
|
3528
3412
|
{
|
|
3529
3413
|
isNestedRender: !0,
|
|
3530
3414
|
apiVersion: e.builderContext.apiVersion,
|
|
3531
3415
|
apiKey: e.builderContext.apiKey,
|
|
3532
3416
|
context: {
|
|
3533
3417
|
...e.builderContext.context,
|
|
3534
|
-
symbolId: (
|
|
3418
|
+
symbolId: (r = e.builderBlock) == null ? void 0 : r.id
|
|
3535
3419
|
},
|
|
3536
3420
|
customComponents: Object.values(e.builderComponents),
|
|
3537
3421
|
data: {
|
|
3538
|
-
...(
|
|
3422
|
+
...(a = e.symbol) == null ? void 0 : a.data,
|
|
3539
3423
|
...e.builderContext.localState,
|
|
3540
3424
|
...(s = n == null ? void 0 : n.data) == null ? void 0 : s.state
|
|
3541
3425
|
},
|
|
3542
|
-
model: (
|
|
3426
|
+
model: (d = e.symbol) == null ? void 0 : d.model,
|
|
3543
3427
|
content: n,
|
|
3544
3428
|
linkComponent: e.builderLinkComponent,
|
|
3545
3429
|
blocksWrapper: "div",
|
|
@@ -3548,14 +3432,15 @@ function Symbol$1(e) {
|
|
|
3548
3432
|
) });
|
|
3549
3433
|
}
|
|
3550
3434
|
export {
|
|
3551
|
-
Blocks,
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3435
|
+
O as Blocks,
|
|
3436
|
+
re as BuilderContext,
|
|
3437
|
+
Xe as Button,
|
|
3438
|
+
Et as Columns,
|
|
3439
|
+
Bn as Content,
|
|
3440
|
+
Rt as Fragment,
|
|
3441
|
+
Bt as Image,
|
|
3442
|
+
Wt as Section,
|
|
3443
|
+
Nn as Symbol,
|
|
3444
|
+
Ut as Text,
|
|
3445
|
+
dn as Video
|
|
3561
3446
|
};
|